aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ABOUT-NLS625
-rw-r--r--AUTHORS462
-rw-r--r--CHANGES6597
-rw-r--r--COMPAT367
-rw-r--r--COPYING674
-rw-r--r--CWRU/PLATFORMS31
-rw-r--r--CWRU/README20
-rw-r--r--CWRU/changelog9326
-rw-r--r--CWRU/mh-folder-comp449
-rwxr-xr-xCWRU/misc/bison26
-rw-r--r--CWRU/misc/errlist.c57
-rw-r--r--CWRU/misc/hpux10-dlfcn.h63
-rw-r--r--CWRU/misc/open-files.c39
-rw-r--r--CWRU/misc/sigs.c47
-rw-r--r--CWRU/misc/sigstat.c226
-rw-r--r--CWRU/sh-redir-hack15
l---------ChangeLog1
-rw-r--r--INSTALL410
-rw-r--r--MANIFEST1131
-rw-r--r--MANIFEST.doc24
-rw-r--r--Makefile.in1526
-rw-r--r--NEWS1535
-rw-r--r--NOTES351
-rw-r--r--POSIX186
-rw-r--r--RBASH49
-rw-r--r--README96
-rw-r--r--Y2K4
-rw-r--r--aclocal.m44117
-rw-r--r--alias.c574
-rw-r--r--alias.h70
-rw-r--r--array.c1130
-rw-r--r--array.h119
-rw-r--r--arrayfunc.c1014
-rw-r--r--arrayfunc.h64
-rw-r--r--assoc.c529
-rw-r--r--assoc.h61
-rw-r--r--bashansi.h41
-rw-r--r--bashhist.c898
-rw-r--r--bashhist.h71
-rw-r--r--bashintl.h50
-rw-r--r--bashjmp.h43
-rw-r--r--bashline.c3663
-rw-r--r--bashline.h51
-rw-r--r--bashtypes.h42
-rw-r--r--bracecomp.c221
-rw-r--r--braces.c687
-rw-r--r--builtins.h61
-rw-r--r--builtins/Makefile.in659
-rw-r--r--builtins/alias.def241
-rw-r--r--builtins/bashgetopt.c175
-rw-r--r--builtins/bashgetopt.h39
-rw-r--r--builtins/bind.def332
-rw-r--r--builtins/break.def141
-rw-r--r--builtins/builtin.def85
-rw-r--r--builtins/caller.def153
-rw-r--r--builtins/cd.def513
-rw-r--r--builtins/colon.def67
-rw-r--r--builtins/command.def219
-rw-r--r--builtins/common.c890
-rw-r--r--builtins/common.h174
-rw-r--r--builtins/complete.def869
-rw-r--r--builtins/declare.def562
-rw-r--r--builtins/echo.def198
-rw-r--r--builtins/enable.def483
-rw-r--r--builtins/eval.def58
-rw-r--r--builtins/evalfile.c351
-rw-r--r--builtins/evalstring.c512
-rw-r--r--builtins/exec.def236
-rw-r--r--builtins/exit.def168
-rw-r--r--builtins/fc.def665
-rw-r--r--builtins/fg_bg.def186
-rw-r--r--builtins/getopt.c309
-rw-r--r--builtins/getopt.h65
-rw-r--r--builtins/getopts.def329
-rw-r--r--builtins/hash.def281
-rw-r--r--builtins/help.def385
-rw-r--r--builtins/history.def380
-rw-r--r--builtins/inlib.def80
-rw-r--r--builtins/jobs.def298
-rw-r--r--builtins/kill.def265
-rw-r--r--builtins/let.def129
-rw-r--r--builtins/mapfile.def351
-rw-r--r--builtins/mkbuiltins.c1595
-rw-r--r--builtins/printf.def1118
-rw-r--r--builtins/psize.c79
-rw-r--r--builtins/psize.sh45
-rw-r--r--builtins/pushd.def778
-rw-r--r--builtins/read.def985
-rw-r--r--builtins/reserved.def288
-rw-r--r--builtins/return.def76
-rw-r--r--builtins/set.def854
-rw-r--r--builtins/setattr.def514
-rw-r--r--builtins/shift.def101
-rw-r--r--builtins/shopt.def715
-rw-r--r--builtins/source.def190
-rw-r--r--builtins/suspend.def127
-rw-r--r--builtins/test.def154
-rw-r--r--builtins/times.def119
-rw-r--r--builtins/trap.def280
-rw-r--r--builtins/type.def403
-rw-r--r--builtins/ulimit.def772
-rw-r--r--builtins/umask.def316
-rw-r--r--builtins/wait.def186
-rw-r--r--command.h384
-rw-r--r--config-bot.h199
-rw-r--r--config-top.h111
-rw-r--r--config.h.in1110
-rwxr-xr-xconfigure32139
-rw-r--r--configure.in1156
-rw-r--r--conftypes.h58
-rw-r--r--copy_cmd.c450
-rw-r--r--cross-build/cygwin32.cache251
-rw-r--r--cross-build/opennt.cache169
-rw-r--r--cross-build/x86-beos.cache45
-rw-r--r--dispose_cmd.c342
-rw-r--r--dispose_cmd.h40
-rw-r--r--doc/._fdl.texibin0 -> 4096 bytes
-rw-r--r--doc/._fdl.txtbin0 -> 4096 bytes
-rw-r--r--doc/FAQ2199
-rw-r--r--doc/INTRO187
-rw-r--r--doc/Makefile.in304
-rw-r--r--doc/README36
-rw-r--r--doc/article.ms1114
-rw-r--r--doc/article.pdfbin0 -> 131900 bytes
-rw-r--r--doc/article.ps1418
-rw-r--r--doc/article.txt1111
-rw-r--r--doc/bash.05358
-rw-r--r--doc/bash.19720
-rw-r--r--doc/bash.html12571
-rw-r--r--doc/bash.pdfbin0 -> 288296 bytes
-rw-r--r--doc/bash.ps8202
-rw-r--r--doc/bashbug.050
-rw-r--r--doc/bashbug.164
-rw-r--r--doc/bashbug.ps284
-rw-r--r--doc/bashref.dvibin0 -> 663456 bytes
-rw-r--r--doc/bashref.html16225
-rw-r--r--doc/bashref.info10348
-rw-r--r--doc/bashref.pdfbin0 -> 559434 bytes
-rw-r--r--doc/bashref.ps16298
-rw-r--r--doc/bashref.texi7931
-rw-r--r--doc/builtins.01579
-rw-r--r--doc/builtins.117
-rw-r--r--doc/builtins.ps2651
-rw-r--r--doc/fdl.texi506
-rw-r--r--doc/fdl.txt451
-rwxr-xr-xdoc/htmlpost.sh19
-rwxr-xr-xdoc/infopost.sh8
-rw-r--r--doc/rbash.059
-rw-r--r--doc/rbash.18
-rw-r--r--doc/rbash.ps280
-rw-r--r--doc/rose94.pdfbin0 -> 228533 bytes
-rw-r--r--doc/rose94.ps1581
-rw-r--r--doc/texinfo.tex9250
-rw-r--r--doc/version.texi10
-rw-r--r--error.c455
-rw-r--r--error.h69
-rw-r--r--eval.c281
-rw-r--r--examples/INDEX.html824
-rw-r--r--examples/INDEX.txt198
-rw-r--r--examples/complete/bash_completion9401
-rw-r--r--examples/complete/bashcc-1.0.1.tar.gzbin0 -> 4609 bytes
-rw-r--r--examples/complete/complete-examples495
-rw-r--r--examples/complete/complete.freebsd31
-rw-r--r--examples/complete/complete.gnu-longopt43
-rw-r--r--examples/complete/complete.ianmac433
-rw-r--r--examples/complete/complete2.ianmac271
-rw-r--r--examples/functions/array-stuff103
-rw-r--r--examples/functions/array-to-string15
-rw-r--r--examples/functions/autoload111
-rw-r--r--examples/functions/autoload.v2192
-rw-r--r--examples/functions/autoload.v3125
-rw-r--r--examples/functions/basename23
-rw-r--r--examples/functions/basename243
-rw-r--r--examples/functions/coproc.bash108
-rw-r--r--examples/functions/coshell.README53
-rw-r--r--examples/functions/coshell.bash127
-rw-r--r--examples/functions/csh-compat48
-rw-r--r--examples/functions/dirfuncs142
-rw-r--r--examples/functions/dirname21
-rw-r--r--examples/functions/emptydir28
-rw-r--r--examples/functions/exitstat22
-rw-r--r--examples/functions/external50
-rw-r--r--examples/functions/fact13
-rw-r--r--examples/functions/fstty59
-rw-r--r--examples/functions/func27
-rw-r--r--examples/functions/gethtml35
-rw-r--r--examples/functions/getoptx.bash301
-rw-r--r--examples/functions/inetaddr60
-rw-r--r--examples/functions/inpath14
-rw-r--r--examples/functions/isnum.bash52
-rw-r--r--examples/functions/isnum222
-rw-r--r--examples/functions/isvalidip14
-rw-r--r--examples/functions/jdate.bash78
-rw-r--r--examples/functions/jj.bash12
-rw-r--r--examples/functions/keep62
-rw-r--r--examples/functions/ksh-cd35
-rw-r--r--examples/functions/ksh-compat-test40
-rw-r--r--examples/functions/kshenv228
-rw-r--r--examples/functions/login11
-rw-r--r--examples/functions/lowercase27
-rw-r--r--examples/functions/manpage129
-rw-r--r--examples/functions/mhfold16
-rw-r--r--examples/functions/notify.bash58
-rw-r--r--examples/functions/pathfuncs45
-rw-r--r--examples/functions/recurse63
-rw-r--r--examples/functions/repeat243
-rw-r--r--examples/functions/repeat312
-rw-r--r--examples/functions/seq29
-rw-r--r--examples/functions/seq237
-rw-r--r--examples/functions/shcat7
-rw-r--r--examples/functions/shcat219
-rw-r--r--examples/functions/sort-pos-params50
-rw-r--r--examples/functions/substr79
-rw-r--r--examples/functions/substr281
-rw-r--r--examples/functions/term35
-rw-r--r--examples/functions/whatis52
-rw-r--r--examples/functions/whence59
-rw-r--r--examples/functions/which44
-rw-r--r--examples/functions/xalias.bash22
-rw-r--r--examples/functions/xfind.bash52
-rw-r--r--examples/loadables/Makefile.in244
-rw-r--r--examples/loadables/README66
-rw-r--r--examples/loadables/basename.c111
-rw-r--r--examples/loadables/cat.c120
-rw-r--r--examples/loadables/cut.c379
-rw-r--r--examples/loadables/dirname.c116
-rw-r--r--examples/loadables/finfo.c602
-rw-r--r--examples/loadables/getconf.c1490
-rw-r--r--examples/loadables/getconf.h214
-rw-r--r--examples/loadables/head.c164
-rw-r--r--examples/loadables/hello.c64
-rw-r--r--examples/loadables/id.c328
-rw-r--r--examples/loadables/ln.c226
-rw-r--r--examples/loadables/logname.c73
-rw-r--r--examples/loadables/mkdir.c237
-rw-r--r--examples/loadables/mypid.c74
-rw-r--r--examples/loadables/necho.c53
-rw-r--r--examples/loadables/pathchk.c379
-rw-r--r--examples/loadables/perl/Makefile.in99
-rw-r--r--examples/loadables/perl/README6
-rw-r--r--examples/loadables/perl/bperl.c46
-rw-r--r--examples/loadables/perl/iperl.c24
-rw-r--r--examples/loadables/print.c191
-rw-r--r--examples/loadables/printenv.c93
-rw-r--r--examples/loadables/push.c116
-rw-r--r--examples/loadables/realpath.c140
-rw-r--r--examples/loadables/rmdir.c71
-rw-r--r--examples/loadables/sleep.c97
-rw-r--r--examples/loadables/strftime.c125
-rw-r--r--examples/loadables/sync.c52
-rw-r--r--examples/loadables/tee.c178
-rw-r--r--examples/loadables/template.c59
-rw-r--r--examples/loadables/truefalse.c70
-rw-r--r--examples/loadables/tty.c80
-rw-r--r--examples/loadables/uname.c160
-rw-r--r--examples/loadables/unlink.c73
-rw-r--r--examples/loadables/whoami.c73
-rwxr-xr-xexamples/misc/aliasconv.bash44
-rwxr-xr-xexamples/misc/aliasconv.sh42
-rwxr-xr-xexamples/misc/cshtobash139
-rw-r--r--examples/misc/suncmd.termcap30
-rw-r--r--examples/obashdb/PERMISSION27
-rw-r--r--examples/obashdb/README3
-rwxr-xr-xexamples/obashdb/bashdb581
-rw-r--r--examples/obashdb/bashdb.el177
-rw-r--r--examples/scripts.noah/PERMISSION29
-rw-r--r--examples/scripts.noah/README26
-rw-r--r--examples/scripts.noah/aref.bash44
-rw-r--r--examples/scripts.noah/bash.sub.bash28
-rw-r--r--examples/scripts.noah/bash_version.bash42
-rw-r--r--examples/scripts.noah/meta.bash37
-rw-r--r--examples/scripts.noah/mktmp.bash66
-rw-r--r--examples/scripts.noah/number.bash185
-rw-r--r--examples/scripts.noah/prompt.bash40
-rw-r--r--examples/scripts.noah/remap_keys.bash71
-rw-r--r--examples/scripts.noah/require.bash182
-rw-r--r--examples/scripts.noah/send_mail.bash140
-rw-r--r--examples/scripts.noah/shcat.bash49
-rw-r--r--examples/scripts.noah/source.bash63
-rw-r--r--examples/scripts.noah/string.bash226
-rw-r--r--examples/scripts.noah/stty.bash64
-rw-r--r--examples/scripts.noah/y_or_n_p.bash78
-rw-r--r--examples/scripts.v2/PERMISSION59
-rw-r--r--examples/scripts.v2/README37
-rw-r--r--examples/scripts.v2/arc2tarz85
-rw-r--r--examples/scripts.v2/bashrand76
-rw-r--r--examples/scripts.v2/cal2day.bash49
-rw-r--r--examples/scripts.v2/cdhist.bash176
-rw-r--r--examples/scripts.v2/corename43
-rw-r--r--examples/scripts.v2/fman281
-rwxr-xr-xexamples/scripts.v2/frcp288
-rw-r--r--examples/scripts.v2/lowercase44
-rw-r--r--examples/scripts.v2/ncp187
-rw-r--r--examples/scripts.v2/newext64
-rw-r--r--examples/scripts.v2/nmv187
-rw-r--r--examples/scripts.v2/pages187
-rw-r--r--examples/scripts.v2/pf127
-rw-r--r--examples/scripts.v2/pmtop25
-rw-r--r--examples/scripts.v2/ren585
-rw-r--r--examples/scripts.v2/rename122
-rw-r--r--examples/scripts.v2/repeat121
-rw-r--r--examples/scripts.v2/shprof66
-rw-r--r--examples/scripts.v2/untar80
-rw-r--r--examples/scripts.v2/uudec45
-rw-r--r--examples/scripts.v2/uuenc69
-rw-r--r--examples/scripts.v2/vtree137
-rw-r--r--examples/scripts.v2/where111
-rwxr-xr-xexamples/scripts/adventure.sh553
-rwxr-xr-xexamples/scripts/bcsh.sh1254
-rw-r--r--examples/scripts/cat.sh12
-rw-r--r--examples/scripts/center24
-rw-r--r--examples/scripts/dd-ex.sh476
-rw-r--r--examples/scripts/fixfiles.bash92
-rw-r--r--examples/scripts/hanoi.bash21
-rwxr-xr-xexamples/scripts/inpath19
-rwxr-xr-xexamples/scripts/krand.bash74
-rw-r--r--examples/scripts/line-input.bash184
-rw-r--r--examples/scripts/nohup.bash51
-rwxr-xr-xexamples/scripts/precedence75
-rw-r--r--examples/scripts/randomcard.bash18
-rwxr-xr-xexamples/scripts/scrollbar25
-rwxr-xr-xexamples/scripts/scrollbar224
-rw-r--r--examples/scripts/self-repro9
-rw-r--r--examples/scripts/showperm.bash53
-rwxr-xr-xexamples/scripts/shprompt137
-rw-r--r--examples/scripts/spin.bash21
-rw-r--r--examples/scripts/timeout53
-rwxr-xr-xexamples/scripts/timeout229
-rw-r--r--examples/scripts/timeout391
-rwxr-xr-xexamples/scripts/vtree243
-rw-r--r--examples/scripts/vtree399
-rw-r--r--examples/scripts/vtree3a100
-rw-r--r--examples/scripts/websrv.sh230
-rwxr-xr-xexamples/scripts/xterm_title27
-rwxr-xr-xexamples/scripts/zprintf26
-rw-r--r--examples/startup-files/Bash_aliases63
-rw-r--r--examples/startup-files/Bash_profile18
-rw-r--r--examples/startup-files/Bashrc.bfox70
-rw-r--r--examples/startup-files/README21
-rw-r--r--examples/startup-files/apple/README33
-rw-r--r--examples/startup-files/apple/aliases34
-rw-r--r--examples/startup-files/apple/bash.defaults22
-rw-r--r--examples/startup-files/apple/environment24
-rw-r--r--examples/startup-files/apple/login15
-rw-r--r--examples/startup-files/apple/logout10
-rw-r--r--examples/startup-files/apple/rc63
-rw-r--r--examples/startup-files/bash-profile39
-rw-r--r--examples/startup-files/bashrc132
-rw-r--r--execute_cmd.c5009
-rw-r--r--execute_cmd.h68
-rw-r--r--expr.c1353
-rw-r--r--externs.h475
-rw-r--r--findcmd.c608
-rw-r--r--findcmd.h35
-rw-r--r--flags.c354
-rw-r--r--flags.h79
-rw-r--r--general.c1136
-rw-r--r--general.h325
-rw-r--r--hashcmd.c196
-rw-r--r--hashcmd.h43
-rw-r--r--hashlib.c442
-rw-r--r--hashlib.h92
-rw-r--r--include/ansi_stdlib.h54
-rw-r--r--include/chartypes.h113
-rw-r--r--include/filecntl.h45
-rw-r--r--include/gettext.h70
-rw-r--r--include/maxpath.h75
-rw-r--r--include/memalloc.h62
-rw-r--r--include/ocache.h133
-rw-r--r--include/posixdir.h61
-rw-r--r--include/posixjmp.h40
-rw-r--r--include/posixselect.h47
-rw-r--r--include/posixstat.h142
-rw-r--r--include/posixtime.h49
-rw-r--r--include/posixwait.h103
-rw-r--r--include/shmbutil.h449
-rw-r--r--include/shtty.h112
-rw-r--r--include/stdc.h88
-rw-r--r--include/systimes.h55
-rw-r--r--include/typemax.h84
-rw-r--r--include/unionwait.h98
-rw-r--r--input.c648
-rw-r--r--input.h132
-rw-r--r--jobs.c4240
-rw-r--r--jobs.h245
-rw-r--r--lib/glob/Makefile.in158
-rw-r--r--lib/glob/collsyms.h140
-rw-r--r--lib/glob/doc/Makefile5
-rw-r--r--lib/glob/doc/glob.texi1
-rw-r--r--lib/glob/glob.c1100
-rw-r--r--lib/glob/glob.h42
-rw-r--r--lib/glob/glob_loop.c67
-rw-r--r--lib/glob/ndir.h50
-rw-r--r--lib/glob/sm_loop.c769
-rw-r--r--lib/glob/smatch.c392
-rw-r--r--lib/glob/strmatch.c79
-rw-r--r--lib/glob/strmatch.h62
-rw-r--r--lib/glob/xmbsrtowcs.c262
-rw-r--r--lib/intl/ChangeLog4
-rw-r--r--lib/intl/Makefile.in470
-rw-r--r--lib/intl/VERSION1
-rw-r--r--lib/intl/bindtextdom.c376
-rw-r--r--lib/intl/config.charset465
-rw-r--r--lib/intl/dcgettext.c61
-rw-r--r--lib/intl/dcigettext.c1248
-rw-r--r--lib/intl/dcngettext.c62
-rw-r--r--lib/intl/dgettext.c61
-rw-r--r--lib/intl/dngettext.c63
-rw-r--r--lib/intl/eval-plural.h116
-rw-r--r--lib/intl/explodename.c195
-rw-r--r--lib/intl/finddomain.c197
-rw-r--r--lib/intl/gettext.c66
-rw-r--r--lib/intl/gettextP.h226
-rw-r--r--lib/intl/gmo.h150
-rw-r--r--lib/intl/hash-string.h61
-rw-r--r--lib/intl/intl-compat.c152
-rw-r--r--lib/intl/l10nflist.c456
-rw-r--r--lib/intl/libgnuintl.h.in311
-rw-r--r--lib/intl/loadinfo.h159
-rw-r--r--lib/intl/loadmsgcat.c1324
-rw-r--r--lib/intl/localcharset.c399
-rw-r--r--lib/intl/localcharset.h43
-rw-r--r--lib/intl/locale.alias78
-rw-r--r--lib/intl/localealias.c421
-rw-r--r--lib/intl/localename.c774
-rw-r--r--lib/intl/log.c106
-rw-r--r--lib/intl/ngettext.c70
-rw-r--r--lib/intl/os2compat.c100
-rw-r--r--lib/intl/os2compat.h48
-rw-r--r--lib/intl/osdep.c26
-rw-r--r--lib/intl/plural-exp.c158
-rw-r--r--lib/intl/plural-exp.h128
-rw-r--r--lib/intl/plural.c1679
-rw-r--r--lib/intl/plural.y411
-rwxr-xr-xlib/intl/ref-add.sin29
-rwxr-xr-xlib/intl/ref-del.sin24
-rw-r--r--lib/intl/relocatable.c440
-rw-r--r--lib/intl/relocatable.h69
-rw-r--r--lib/intl/textdomain.c144
-rw-r--r--lib/malloc/Makefile.in137
-rw-r--r--lib/malloc/alloca.c482
-rw-r--r--lib/malloc/getpagesize.h60
-rw-r--r--lib/malloc/i386-alloca.s16
-rw-r--r--lib/malloc/imalloc.h168
-rw-r--r--lib/malloc/malloc.c1303
-rw-r--r--lib/malloc/mstats.h110
-rw-r--r--lib/malloc/shmalloc.h70
-rw-r--r--lib/malloc/stats.c205
-rw-r--r--lib/malloc/stub.c22
-rw-r--r--lib/malloc/table.c292
-rw-r--r--lib/malloc/table.h105
-rw-r--r--lib/malloc/trace.c126
-rw-r--r--lib/malloc/watch.c151
-rw-r--r--lib/malloc/watch.h41
-rw-r--r--lib/malloc/x386-alloca.s63
-rwxr-xr-xlib/malloc/xleaktrace47
-rw-r--r--lib/malloc/xmalloc.c94
-rw-r--r--lib/readline/COPYING674
-rw-r--r--lib/readline/ChangeLog403
-rw-r--r--lib/readline/Makefile.in367
-rw-r--r--lib/readline/README6
-rw-r--r--lib/readline/STANDALONE2
-rw-r--r--lib/readline/ansi_stdlib.h54
-rw-r--r--lib/readline/bind.c2370
-rw-r--r--lib/readline/callback.c261
-rw-r--r--lib/readline/chardefs.h164
-rw-r--r--lib/readline/compat.c113
-rw-r--r--lib/readline/complete.c2530
-rw-r--r--lib/readline/display.c2688
-rw-r--r--lib/readline/doc/._fdl.texibin0 -> 4096 bytes
-rw-r--r--lib/readline/doc/Makefile145
-rw-r--r--lib/readline/doc/fdl.texi506
-rw-r--r--lib/readline/doc/history.texi99
-rw-r--r--lib/readline/doc/hstech.texi573
-rw-r--r--lib/readline/doc/hsuser.texi464
-rw-r--r--lib/readline/doc/rlman.texi97
-rw-r--r--lib/readline/doc/rltech.texi2415
-rw-r--r--lib/readline/doc/rluser.texi2007
-rw-r--r--lib/readline/doc/rluserman.texi83
-rw-r--r--lib/readline/doc/version.texi10
-rw-r--r--lib/readline/emacs_keymap.c872
-rw-r--r--lib/readline/examples/Inputrc81
-rw-r--r--lib/readline/examples/Makefile44
-rw-r--r--lib/readline/examples/excallback.c191
-rw-r--r--lib/readline/examples/fileman.c488
-rw-r--r--lib/readline/examples/histexamp.c125
-rw-r--r--lib/readline/examples/manexamp.c111
-rw-r--r--lib/readline/examples/rl.c157
-rw-r--r--lib/readline/examples/rlcat.c179
-rw-r--r--lib/readline/examples/rltest.c92
-rw-r--r--lib/readline/funmap.c258
-rw-r--r--lib/readline/histexpand.c1621
-rw-r--r--lib/readline/histfile.c547
-rw-r--r--lib/readline/histlib.h82
-rw-r--r--lib/readline/history.c519
-rw-r--r--lib/readline/history.h266
-rw-r--r--lib/readline/histsearch.c194
-rw-r--r--lib/readline/input.c594
-rw-r--r--lib/readline/isearch.c674
-rw-r--r--lib/readline/keymaps.c162
-rw-r--r--lib/readline/keymaps.h102
-rw-r--r--lib/readline/kill.c694
-rw-r--r--lib/readline/macro.c271
-rw-r--r--lib/readline/mbutil.c375
-rw-r--r--lib/readline/misc.c655
-rw-r--r--lib/readline/nls.c252
-rw-r--r--lib/readline/parens.c173
-rw-r--r--lib/readline/posixdir.h61
-rw-r--r--lib/readline/posixjmp.h40
-rw-r--r--lib/readline/posixselect.h47
-rw-r--r--lib/readline/posixstat.h142
-rw-r--r--lib/readline/readline.c1257
-rw-r--r--lib/readline/readline.h885
-rw-r--r--lib/readline/rlconf.h61
-rw-r--r--lib/readline/rldefs.h162
-rw-r--r--lib/readline/rlmbutil.h154
-rw-r--r--lib/readline/rlprivate.h475
-rw-r--r--lib/readline/rlshell.h33
-rw-r--r--lib/readline/rlstdc.h45
-rw-r--r--lib/readline/rltty.c975
-rw-r--r--lib/readline/rltty.h80
-rw-r--r--lib/readline/rltypedefs.h93
-rw-r--r--lib/readline/rlwinsize.h58
-rw-r--r--lib/readline/savestring.c37
-rw-r--r--lib/readline/search.c570
-rw-r--r--lib/readline/shell.c208
-rw-r--r--lib/readline/signals.c670
-rw-r--r--lib/readline/tcap.h58
-rw-r--r--lib/readline/terminal.c731
-rw-r--r--lib/readline/text.c1679
-rw-r--r--lib/readline/tilde.c502
-rw-r--r--lib/readline/tilde.h80
-rw-r--r--lib/readline/undo.c331
-rw-r--r--lib/readline/util.c511
-rw-r--r--lib/readline/vi_keymap.c876
-rw-r--r--lib/readline/vi_mode.c1825
-rw-r--r--lib/readline/xmalloc.c89
-rw-r--r--lib/readline/xmalloc.h45
-rw-r--r--lib/sh/Makefile.in544
-rw-r--r--lib/sh/casemod.c244
-rw-r--r--lib/sh/clktck.c59
-rw-r--r--lib/sh/clock.c81
-rw-r--r--lib/sh/eaccess.c222
-rw-r--r--lib/sh/fdprintf.c70
-rw-r--r--lib/sh/fmtullong.c31
-rw-r--r--lib/sh/fmtulong.c190
-rw-r--r--lib/sh/fmtumax.c27
-rw-r--r--lib/sh/fnxform.c199
-rw-r--r--lib/sh/fpurge.c148
-rw-r--r--lib/sh/getcwd.c356
-rw-r--r--lib/sh/getenv.c233
-rw-r--r--lib/sh/inet_aton.c212
-rw-r--r--lib/sh/input_avail.c98
-rw-r--r--lib/sh/itos.c72
-rw-r--r--lib/sh/mailstat.c159
-rw-r--r--lib/sh/makepath.c128
-rw-r--r--lib/sh/mbscasecmp.c78
-rw-r--r--lib/sh/mbschr.c78
-rw-r--r--lib/sh/mbscmp.c72
-rw-r--r--lib/sh/memset.c29
-rw-r--r--lib/sh/mktime.c425
-rw-r--r--lib/sh/netconn.c82
-rw-r--r--lib/sh/netopen.c350
-rw-r--r--lib/sh/oslib.c296
-rw-r--r--lib/sh/pathcanon.c234
-rw-r--r--lib/sh/pathphys.c296
-rw-r--r--lib/sh/rename.c76
-rw-r--r--lib/sh/setlinebuf.c63
-rw-r--r--lib/sh/shmatch.c120
-rw-r--r--lib/sh/shquote.c278
-rw-r--r--lib/sh/shtty.c330
-rw-r--r--lib/sh/snprintf.c2173
-rw-r--r--lib/sh/spell.c212
-rw-r--r--lib/sh/strcasecmp.c84
-rw-r--r--lib/sh/strcasestr.c46
-rw-r--r--lib/sh/strerror.c74
-rw-r--r--lib/sh/strftime.c876
-rw-r--r--lib/sh/stringlist.c297
-rw-r--r--lib/sh/stringvec.c232
-rw-r--r--lib/sh/strnlen.c49
-rw-r--r--lib/sh/strpbrk.c49
-rw-r--r--lib/sh/strstr.c125
-rw-r--r--lib/sh/strtod.c201
-rw-r--r--lib/sh/strtoimax.c113
-rw-r--r--lib/sh/strtol.c259
-rw-r--r--lib/sh/strtoll.c30
-rw-r--r--lib/sh/strtoul.c30
-rw-r--r--lib/sh/strtoull.c31
-rw-r--r--lib/sh/strtoumax.c113
-rw-r--r--lib/sh/strtrans.c282
-rw-r--r--lib/sh/times.c77
-rw-r--r--lib/sh/timeval.c145
-rw-r--r--lib/sh/tmpfile.c220
-rw-r--r--lib/sh/uconvert.c116
-rw-r--r--lib/sh/ufuncs.c104
-rw-r--r--lib/sh/vprint.c85
-rw-r--r--lib/sh/wcsdup.c44
-rw-r--r--lib/sh/winsize.c96
-rw-r--r--lib/sh/zcatfd.c70
-rw-r--r--lib/sh/zgetline.c121
-rw-r--r--lib/sh/zmapfd.c90
-rw-r--r--lib/sh/zread.c173
-rw-r--r--lib/sh/zwrite.c64
-rw-r--r--lib/termcap/Makefile.in90
-rw-r--r--lib/termcap/ltcap.h30
-rw-r--r--lib/termcap/termcap.c815
-rw-r--r--lib/termcap/termcap.h63
-rw-r--r--lib/termcap/tparam.c345
-rw-r--r--lib/termcap/version.c22
-rw-r--r--lib/tilde/Makefile.in126
-rw-r--r--lib/tilde/README5
-rw-r--r--lib/tilde/shell.c69
-rw-r--r--lib/tilde/tilde.c502
-rw-r--r--lib/tilde/tilde.h80
-rw-r--r--list.c136
-rw-r--r--locale.c534
-rw-r--r--mailcheck.c485
-rw-r--r--mailcheck.h34
-rw-r--r--make_cmd.c888
-rw-r--r--make_cmd.h70
-rw-r--r--mksyntax.c415
-rw-r--r--nojobs.c938
-rw-r--r--parse.y5916
-rw-r--r--parser-built162
-rw-r--r--parser.h64
-rw-r--r--patchlevel.h30
-rw-r--r--pathexp.c486
-rw-r--r--pathexp.h102
-rw-r--r--pathnames.h.in33
-rw-r--r--pcomplete.c1546
-rw-r--r--pcomplete.h161
-rw-r--r--pcomplib.c225
-rw-r--r--po/LINGUAS2
-rw-r--r--po/Makefile.in.in359
-rw-r--r--po/Makevars41
-rw-r--r--po/POTFILES.in81
-rw-r--r--po/README1
-rw-r--r--po/Rules-builtins19
-rw-r--r--po/Rules-quot42
-rw-r--r--po/af.gmobin0 -> 1231 bytes
-rw-r--r--po/af.po4575
-rw-r--r--po/bash.pot3919
-rw-r--r--po/bg.gmobin0 -> 34844 bytes
-rw-r--r--po/bg.po5594
-rw-r--r--po/boldquot.sed10
-rw-r--r--po/ca.gmobin0 -> 9819 bytes
-rw-r--r--po/ca.po6487
-rw-r--r--po/cs.gmobin0 -> 152764 bytes
-rw-r--r--po/cs.po6121
-rw-r--r--po/de.gmobin0 -> 45438 bytes
-rw-r--r--po/de.po6579
-rw-r--r--po/en@boldquot.gmobin0 -> 159145 bytes
-rw-r--r--po/en@boldquot.header25
-rw-r--r--po/en@boldquot.po5474
-rw-r--r--po/en@quot.gmobin0 -> 157609 bytes
-rw-r--r--po/en@quot.header22
-rw-r--r--po/en@quot.po5436
-rw-r--r--po/eo.gmobin0 -> 141873 bytes
-rw-r--r--po/eo.po5614
-rw-r--r--po/es.gmobin0 -> 151298 bytes
-rw-r--r--po/es.po8446
-rw-r--r--po/et.gmobin0 -> 12257 bytes
-rw-r--r--po/et.po3941
-rw-r--r--po/fi.gmobin0 -> 147540 bytes
-rw-r--r--po/fi.po5469
-rw-r--r--po/fr.gmobin0 -> 26542 bytes
-rw-r--r--po/fr.po5593
-rw-r--r--po/ga.gmobin0 -> 62686 bytes
-rw-r--r--po/ga.po4324
-rw-r--r--po/hu.gmobin0 -> 9311 bytes
-rw-r--r--po/hu.po6302
-rw-r--r--po/id.gmobin0 -> 149543 bytes
-rw-r--r--po/id.po6296
-rw-r--r--po/insert-header.sin23
-rw-r--r--po/ja.gmobin0 -> 8183 bytes
-rw-r--r--po/ja.po4195
-rw-r--r--po/lt.gmobin0 -> 30754 bytes
-rw-r--r--po/lt.po4317
-rw-r--r--po/nl.gmobin0 -> 150781 bytes
-rw-r--r--po/nl.po5455
-rw-r--r--po/pl.gmobin0 -> 24983 bytes
-rw-r--r--po/pl.po5208
-rw-r--r--po/pt_BR.gmobin0 -> 9658 bytes
-rw-r--r--po/pt_BR.po6302
-rw-r--r--po/quot.sed6
-rw-r--r--po/remove-potcdate.sin19
-rw-r--r--po/ro.gmobin0 -> 9415 bytes
-rw-r--r--po/ro.po6410
-rw-r--r--po/ru.gmobin0 -> 9142 bytes
-rw-r--r--po/ru.po3973
-rw-r--r--po/sk.gmobin0 -> 150575 bytes
-rw-r--r--po/sk.po6018
-rw-r--r--po/sv.gmobin0 -> 146044 bytes
-rw-r--r--po/sv.po5453
-rw-r--r--po/tr.gmobin0 -> 24589 bytes
-rw-r--r--po/tr.po5510
-rw-r--r--po/vi.gmobin0 -> 161257 bytes
-rw-r--r--po/vi.po5499
-rw-r--r--po/zh_TW.gmobin0 -> 5993 bytes
-rw-r--r--po/zh_TW.po3942
-rw-r--r--print_cmd.c1540
-rw-r--r--quit.h53
-rw-r--r--redir.c1277
-rw-r--r--redir.h39
-rw-r--r--shell.c1854
-rw-r--r--shell.h167
-rw-r--r--sig.c664
-rw-r--r--sig.h137
-rw-r--r--siglist.c229
-rw-r--r--siglist.h44
-rw-r--r--stringlib.c287
-rw-r--r--subst.c9070
-rw-r--r--subst.h302
-rw-r--r--support/Makefile.in87
-rw-r--r--support/SYMLINKS18
-rw-r--r--support/bash.xbm60
-rw-r--r--support/bashbug.sh271
-rw-r--r--support/bashversion.c148
-rwxr-xr-xsupport/checkbashisms170
-rw-r--r--support/config.guess1529
-rwxr-xr-xsupport/config.rpath547
-rw-r--r--support/config.sub1665
-rwxr-xr-xsupport/fixlinks89
-rwxr-xr-xsupport/install.sh247
-rw-r--r--support/man2html.c4073
-rwxr-xr-xsupport/missing187
-rwxr-xr-xsupport/mkclone122
-rwxr-xr-xsupport/mkconffiles79
-rwxr-xr-xsupport/mkdirs47
-rwxr-xr-xsupport/mkinstalldirs111
-rw-r--r--support/mksignames.c111
-rwxr-xr-xsupport/mkversion.sh168
-rw-r--r--support/printenv.c71
-rwxr-xr-xsupport/printenv.sh27
-rw-r--r--support/recho.c67
-rwxr-xr-xsupport/rlvers.sh113
-rwxr-xr-xsupport/shobj-conf579
-rw-r--r--support/signames.c393
-rwxr-xr-xsupport/texi2dvi658
-rwxr-xr-xsupport/texi2html5428
-rw-r--r--support/xcase.c95
-rwxr-xr-xsupport/xenix-link.sh84
-rw-r--r--support/zecho.c43
-rw-r--r--syntax.h104
-rw-r--r--test.c830
-rw-r--r--test.h39
-rw-r--r--tests/COPYRIGHT6
-rw-r--r--tests/README3
-rw-r--r--tests/alias.right12
-rw-r--r--tests/alias.tests39
-rw-r--r--tests/alias1.sub20
-rw-r--r--tests/appendop.right18
-rw-r--r--tests/appendop.tests83
-rw-r--r--tests/arith-for.right74
-rw-r--r--tests/arith-for.tests94
-rw-r--r--tests/arith.right204
-rw-r--r--tests/arith.tests290
-rw-r--r--tests/arith1.sub38
-rw-r--r--tests/arith2.sub45
-rwxr-xr-xtests/array-at-star120
-rw-r--r--tests/array.right314
-rw-r--r--tests/array.tests388
-rw-r--r--tests/array1.sub1
-rw-r--r--tests/array2.right74
-rw-r--r--tests/array2.sub1
-rw-r--r--tests/array3.sub9
-rw-r--r--tests/array4.sub32
-rw-r--r--tests/array5.sub34
-rw-r--r--tests/array6.sub109
-rw-r--r--tests/array7.sub14
-rw-r--r--tests/array8.sub23
-rw-r--r--tests/array9.sub27
-rw-r--r--tests/assoc.right189
-rw-r--r--tests/assoc.tests186
-rw-r--r--tests/assoc1.sub16
-rw-r--r--tests/assoc2.sub15
-rw-r--r--tests/assoc3.sub15
-rw-r--r--tests/assoc4.sub22
-rw-r--r--tests/assoc5.sub27
-rw-r--r--tests/assoc6.sub146
-rw-r--r--tests/braces.right76
-rw-r--r--tests/braces.tests116
-rw-r--r--tests/builtins.right141
-rw-r--r--tests/builtins.tests253
-rw-r--r--tests/builtins1.sub14
-rw-r--r--tests/builtins2.sub10
-rw-r--r--tests/case.right6
-rw-r--r--tests/case.tests18
-rw-r--r--tests/casemod.right45
-rw-r--r--tests/casemod.tests99
-rw-r--r--tests/comsub-eof.right13
-rw-r--r--tests/comsub-eof.tests11
-rw-r--r--tests/comsub-eof0.sub4
-rw-r--r--tests/comsub-eof1.sub4
-rw-r--r--tests/comsub-eof2.sub2
-rw-r--r--tests/comsub-eof3.sub4
-rw-r--r--tests/comsub-eof4.sub4
-rw-r--r--tests/comsub-eof5.sub9
-rw-r--r--tests/comsub-posix.right57
-rw-r--r--tests/comsub-posix.tests207
-rw-r--r--tests/comsub-posix1.sub3
-rw-r--r--tests/comsub.right29
-rw-r--r--tests/comsub.tests44
-rw-r--r--tests/comsub1.sub48
-rw-r--r--tests/cond-regexp.sub42
-rw-r--r--tests/cond.right61
-rwxr-xr-xtests/cond.tests183
-rw-r--r--tests/coproc.right13
-rw-r--r--tests/coproc.tests45
-rw-r--r--tests/cprint.right72
-rw-r--r--tests/cprint.tests67
-rw-r--r--tests/dbg-support.right371
-rw-r--r--tests/dbg-support.sub26
-rwxr-xr-xtests/dbg-support.tests142
-rw-r--r--tests/dbg-support2.right7
-rwxr-xr-xtests/dbg-support2.tests26
-rw-r--r--tests/dbg-support3.sub39
-rwxr-xr-xtests/dollar-at-star238
-rw-r--r--tests/dollar-at1.sub29
-rw-r--r--tests/dollar-at2.sub19
-rw-r--r--tests/dollar-at3.sub9
-rw-r--r--tests/dollar-star1.sub31
-rw-r--r--tests/dollar-star2.sub26
-rw-r--r--tests/dollar-star3.sub18
-rw-r--r--tests/dollar-star4.sub9
-rw-r--r--tests/dollar-star5.sub16
-rw-r--r--tests/dollar.right168
-rw-r--r--tests/dstack.right55
-rw-r--r--tests/dstack.tests87
-rw-r--r--tests/dstack2.right24
-rw-r--r--tests/dstack2.tests33
-rw-r--r--tests/errors.right101
-rw-r--r--tests/errors.tests265
-rw-r--r--tests/exec.right55
-rwxr-xr-xtests/exec1.sub1
-rw-r--r--tests/exec2.sub5
-rw-r--r--tests/exec3.sub6
-rw-r--r--tests/exec4.sub8
-rw-r--r--tests/exec5.sub9
-rw-r--r--tests/exec6.sub54
-rw-r--r--tests/exec7.sub20
-rw-r--r--tests/exec8.sub1
-rw-r--r--tests/execscript114
-rw-r--r--tests/exp.right168
-rw-r--r--tests/exp.tests386
-rw-r--r--tests/exp1.sub21
-rw-r--r--tests/exp2.sub12
-rw-r--r--tests/exp3.sub7
-rw-r--r--tests/extglob.right90
-rw-r--r--tests/extglob.tests371
-rw-r--r--tests/extglob1.sub37
-rw-r--r--tests/extglob2.right70
-rwxr-xr-xtests/extglob2.tests90
-rw-r--r--tests/extglob3.right27
-rw-r--r--tests/extglob3.tests56
-rw-r--r--tests/func.right156
-rw-r--r--tests/func.tests176
-rw-r--r--tests/func1.sub55
-rw-r--r--tests/func2.sub27
-rw-r--r--tests/func3.sub54
-rw-r--r--tests/getopts.right56
-rw-r--r--tests/getopts.tests38
-rw-r--r--tests/getopts1.sub26
-rw-r--r--tests/getopts2.sub26
-rw-r--r--tests/getopts3.sub27
-rw-r--r--tests/getopts4.sub30
-rw-r--r--tests/getopts5.sub50
-rw-r--r--tests/getopts6.sub27
-rw-r--r--tests/getopts7.sub30
-rw-r--r--tests/glob.right135
-rw-r--r--tests/glob.tests388
-rw-r--r--tests/glob1.sub14
-rw-r--r--tests/globstar.right155
-rw-r--r--tests/globstar.tests41
-rw-r--r--tests/globstar1.sub21
-rw-r--r--tests/heredoc.right64
-rw-r--r--tests/heredoc.tests100
-rw-r--r--tests/heredoc1.sub16
-rw-r--r--tests/herestr.right28
-rw-r--r--tests/herestr.tests39
-rw-r--r--tests/histexp.right129
-rw-r--r--tests/histexp.tests124
-rw-r--r--tests/history.list4
-rw-r--r--tests/history.right146
-rw-r--r--tests/history.tests113
-rw-r--r--tests/history1.sub13
-rw-r--r--tests/history2.sub10
-rw-r--r--tests/ifs-posix.right1
-rw-r--r--tests/ifs-posix.tests257
-rw-r--r--tests/ifs.right10
-rw-r--r--tests/ifs.tests61
-rw-r--r--tests/input-line.sh4
-rw-r--r--tests/input-line.sub2
-rw-r--r--tests/input.right3
-rw-r--r--tests/intl.right13
-rw-r--r--tests/intl.tests41
-rw-r--r--tests/intl1.sub11
-rw-r--r--tests/invert.right10
-rw-r--r--tests/invert.tests19
-rw-r--r--tests/iquote.right61
-rw-r--r--tests/iquote.tests143
-rw-r--r--tests/jobs.right105
-rw-r--r--tests/jobs.tests185
-rw-r--r--tests/jobs1.sub17
-rw-r--r--tests/jobs2.sub13
-rw-r--r--tests/jobs3.sub26
-rw-r--r--tests/jobs4.sub24
-rw-r--r--tests/mapfile.data17
-rw-r--r--tests/mapfile.right138
-rw-r--r--tests/mapfile.tests42
-rw-r--r--tests/mapfile1.sub11
-rw-r--r--tests/misc/dev-tcp.tests16
-rw-r--r--tests/misc/perf-script81
-rw-r--r--tests/misc/perftest10
-rw-r--r--tests/misc/read-nchars.tests11
-rw-r--r--tests/misc/redir-t2.sh17
-rwxr-xr-xtests/misc/run-r2.sh1
-rwxr-xr-xtests/misc/sigint-1.sh9
-rwxr-xr-xtests/misc/sigint-2.sh7
-rwxr-xr-xtests/misc/sigint-3.sh11
-rwxr-xr-xtests/misc/sigint-4.sh13
-rw-r--r--tests/misc/test-minus-e.19
-rw-r--r--tests/misc/test-minus-e.211
-rw-r--r--tests/misc/wait-bg.tests25
-rw-r--r--tests/more-exp.right214
-rw-r--r--tests/more-exp.tests504
-rw-r--r--tests/new-exp.right542
-rw-r--r--tests/new-exp.tests576
-rw-r--r--tests/new-exp1.sub11
-rw-r--r--tests/new-exp2.sub36
-rw-r--r--tests/new-exp3.sub26
-rw-r--r--tests/new-exp4.sub31
-rw-r--r--tests/new-exp5.sub40
-rw-r--r--tests/new-exp6.sub29
-rw-r--r--tests/new-exp7.sub13
-rw-r--r--tests/nquote.right40
-rw-r--r--tests/nquote.tests118
-rw-r--r--tests/nquote1.right121
-rw-r--r--tests/nquote1.sub6
-rw-r--r--tests/nquote1.tests97
-rw-r--r--tests/nquote2.right76
-rw-r--r--tests/nquote2.tests82
-rw-r--r--tests/nquote3.right60
-rw-r--r--tests/nquote3.tests85
-rw-r--r--tests/nquote4.right18
-rw-r--r--tests/nquote4.tests24
-rw-r--r--tests/nquote5.right86
-rw-r--r--tests/nquote5.tests63
-rw-r--r--tests/posix2.right2
-rw-r--r--tests/posix2.tests179
-rw-r--r--tests/posixpat.right42
-rw-r--r--tests/posixpat.tests233
-rw-r--r--tests/prec.right28
-rwxr-xr-xtests/precedence75
-rw-r--r--tests/printf.rightbin0 -> 1510 bytes
-rw-r--r--tests/printf.tests311
-rw-r--r--tests/printf2.sub6
-rw-r--r--tests/quote.right68
-rw-r--r--tests/quote.tests111
-rw-r--r--tests/read.right65
-rw-r--r--tests/read.tests98
-rw-r--r--tests/read1.sub23
-rw-r--r--tests/read2.sub32
-rw-r--r--tests/read3.sub19
-rw-r--r--tests/read4.sub4
-rw-r--r--tests/read5.sub36
-rw-r--r--tests/read6.sub10
-rw-r--r--tests/redir.right141
-rw-r--r--tests/redir.tests189
-rw-r--r--tests/redir1.sub8
-rw-r--r--tests/redir2.sub1
-rw-r--r--tests/redir3.in12
-rw-r--r--tests/redir3.in22
-rw-r--r--tests/redir3.sub26
-rw-r--r--tests/redir4.in11
-rw-r--r--tests/redir4.sub56
-rw-r--r--tests/redir5.sub31
-rw-r--r--tests/redir6.sub8
-rw-r--r--tests/redir7.sub69
-rw-r--r--tests/redir8.sub59
-rw-r--r--tests/redir9.sub50
-rw-r--r--tests/rhs-exp.right74
-rw-r--r--tests/rhs-exp.tests49
-rw-r--r--tests/rsh.right13
-rw-r--r--tests/rsh.tests33
-rw-r--r--tests/run-alias2
-rw-r--r--tests/run-all29
-rw-r--r--tests/run-appendop2
-rw-r--r--tests/run-arith2
-rw-r--r--tests/run-arith-for2
-rw-r--r--tests/run-array6
-rw-r--r--tests/run-array24
-rw-r--r--tests/run-assoc4
-rw-r--r--tests/run-braces2
-rw-r--r--tests/run-builtins6
-rw-r--r--tests/run-case2
-rw-r--r--tests/run-casemod2
-rw-r--r--tests/run-comsub2
-rw-r--r--tests/run-comsub-eof2
-rw-r--r--tests/run-comsub-posix2
-rw-r--r--tests/run-cond7
-rw-r--r--tests/run-coproc4
-rw-r--r--tests/run-cprint2
-rwxr-xr-xtests/run-dbg-support11
-rwxr-xr-xtests/run-dbg-support216
-rw-r--r--tests/run-dirstack5
-rw-r--r--tests/run-dollars2
-rw-r--r--tests/run-errors2
-rw-r--r--tests/run-execscript9
-rw-r--r--tests/run-exp-tests2
-rw-r--r--tests/run-extglob4
-rw-r--r--tests/run-extglob24
-rw-r--r--tests/run-extglob34
-rw-r--r--tests/run-func5
-rw-r--r--tests/run-getopts2
-rw-r--r--tests/run-glob-test4
-rw-r--r--tests/run-globstar4
-rw-r--r--tests/run-heredoc2
-rw-r--r--tests/run-herestr2
-rw-r--r--tests/run-histexpand4
-rw-r--r--tests/run-history4
-rw-r--r--tests/run-ifs2
-rw-r--r--tests/run-ifs-posix2
-rw-r--r--tests/run-input-test2
-rw-r--r--tests/run-intl8
-rw-r--r--tests/run-invert2
-rw-r--r--tests/run-iquote2
-rw-r--r--tests/run-jobs7
-rw-r--r--tests/run-mapfile2
-rw-r--r--tests/run-minimal36
-rw-r--r--tests/run-more-exp2
-rw-r--r--tests/run-new-exp10
-rw-r--r--tests/run-nquote2
-rw-r--r--tests/run-nquote14
-rw-r--r--tests/run-nquote24
-rw-r--r--tests/run-nquote34
-rw-r--r--tests/run-nquote44
-rw-r--r--tests/run-nquote52
-rw-r--r--tests/run-posix22
-rw-r--r--tests/run-posixpat2
-rw-r--r--tests/run-precedence2
-rw-r--r--tests/run-printf5
-rw-r--r--tests/run-quote2
-rw-r--r--tests/run-read4
-rw-r--r--tests/run-redir7
-rw-r--r--tests/run-rhs-exp2
-rw-r--r--tests/run-rsh2
-rw-r--r--tests/run-set-e2
-rwxr-xr-xtests/run-set-x11
-rw-r--r--tests/run-shopt2
-rw-r--r--tests/run-strip2
-rw-r--r--tests/run-test4
-rw-r--r--tests/run-tilde2
-rw-r--r--tests/run-tilde22
-rw-r--r--tests/run-trap6
-rw-r--r--tests/run-type2
-rw-r--r--tests/run-varenv2
-rw-r--r--tests/run-vredir2
-rw-r--r--tests/set-e.right67
-rw-r--r--tests/set-e.tests110
-rw-r--r--tests/set-e1.sub59
-rw-r--r--tests/set-e2.sub10
-rw-r--r--tests/set-x.right56
-rwxr-xr-xtests/set-x.tests20
-rw-r--r--tests/set-x1.sub25
-rw-r--r--tests/shopt.right259
-rw-r--r--tests/shopt.tests94
-rw-r--r--tests/source1.sub1
-rw-r--r--tests/source2.sub5
-rw-r--r--tests/source3.sub1
-rw-r--r--tests/source4.sub1
-rw-r--r--tests/source5.sub19
-rw-r--r--tests/source6.sub31
-rw-r--r--tests/strip.right12
-rw-r--r--tests/strip.tests22
-rw-r--r--tests/test.right285
-rw-r--r--tests/test.tests426
-rw-r--r--tests/tilde.right25
-rw-r--r--tests/tilde.tests69
-rw-r--r--tests/tilde2.right24
-rw-r--r--tests/tilde2.tests70
-rw-r--r--tests/trap.right85
-rw-r--r--tests/trap.tests93
-rwxr-xr-xtests/trap1.sub4
-rwxr-xr-xtests/trap2.sub25
-rwxr-xr-xtests/trap2a.sub3
-rw-r--r--tests/trap3.sub9
-rw-r--r--tests/type.right82
-rw-r--r--tests/type.tests93
-rw-r--r--tests/type1.sub10
-rw-r--r--tests/type2.sub16
-rw-r--r--tests/varenv.right56
-rw-r--r--tests/varenv.sh206
-rw-r--r--tests/varenv1.sub28
-rw-r--r--tests/varenv2.sub44
-rw-r--r--tests/version8
-rw-r--r--tests/version.mini8
-rw-r--r--tests/vredir.right88
-rw-r--r--tests/vredir.tests44
-rw-r--r--tests/vredir1.sub17
-rw-r--r--tests/vredir2.sub52
-rw-r--r--tests/vredir3.sub8
-rw-r--r--tests/vredir4.sub22
-rw-r--r--tests/vredir5.sub23
-rw-r--r--trap.c1065
-rw-r--r--trap.h99
-rw-r--r--unwind_prot.c326
-rw-r--r--unwind_prot.h49
-rw-r--r--variables.c4690
-rw-r--r--variables.h386
-rw-r--r--version.c94
-rw-r--r--xmalloc.c223
-rw-r--r--xmalloc.h58
-rw-r--r--y.tab.c8246
-rw-r--r--y.tab.h162
1115 files changed, 560013 insertions, 0 deletions
diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644
index 0000000..47d5e39
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1,625 @@
+Notes on the Free Translation Project
+*************************************
+
+ Free software is going international! The Free Translation Project
+is a way to get maintainers of free software, translators, and users all
+together, so that will gradually become able to speak many languages.
+A few packages already provide translations for their messages.
+
+ If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site. But you do _not_
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+ Installers will find here some useful hints. These notes also
+explain how users should proceed for getting the programs to use the
+available translations. They tell how people wanting to contribute and
+work at translations should contact the appropriate team.
+
+ When reporting bugs in the `intl/' directory or bugs which may be
+related to internationalization, you should tell about the version of
+`gettext' which is used. The information can be found in the
+`intl/VERSION' file, in internationalized packages.
+
+Quick configuration advice
+==========================
+
+ If you want to exploit the full power of internationalization, you
+should configure it using
+
+ ./configure --with-included-gettext
+
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed. So far, only
+the `gettext' implementation in the GNU C library version 2 provides as
+many features (such as locale alias, message inheritance, automatic
+charset conversion or plural form handling) as the implementation here.
+It is also not possible to offer this additional functionality on top
+of a `catgets' implementation. Future versions of GNU `gettext' will
+very likely convey even more functionality. So it might be a good idea
+to change to GNU `gettext' as soon as possible.
+
+ So you need _not_ provide this option if you are using GNU libc 2 or
+you have installed a recent copy of the GNU gettext package with the
+included `libintl'.
+
+INSTALL Matters
+===============
+
+ Some packages are "localizable" when properly installed; the
+programs they contain can be made to speak your own native language.
+Most such packages use GNU `gettext'. Other packages have their own
+ways to internationalization, predating GNU `gettext'.
+
+ By default, this package will be installed to allow translation of
+messages. It will automatically detect whether the system already
+provides the GNU `gettext' functions. If not, the GNU `gettext' own
+library will be used. This library is wholly contained within this
+package, usually in the `intl/' subdirectory, so prior installation of
+the GNU `gettext' package is _not_ required. Installers may use
+special options at configuration time for changing the default
+behaviour. The commands:
+
+ ./configure --with-included-gettext
+ ./configure --disable-nls
+
+will respectively bypass any pre-existing `gettext' to use the
+internationalizing routines provided within this package, or else,
+_totally_ disable translation of messages.
+
+ When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl.a' file and
+will decide to use this. This might be not what is desirable. You
+should use the more recent version of the GNU `gettext' library. I.e.
+if the file `intl/VERSION' shows that the library which comes with this
+package is more recent, you should use
+
+ ./configure --with-included-gettext
+
+to prevent auto-detection.
+
+ The configuration process will not test for the `catgets' function
+and therefore it will not be used. The reason is that even an
+emulation of `gettext' on top of `catgets' could not provide all the
+extensions of the GNU `gettext' library.
+
+ Internationalized packages have usually many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language. Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package. However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+Using This Package
+==================
+
+ As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
+and `CC' is an ISO 3166 two-letter country code. For example, let's
+suppose that you speak German and live in Germany. At the shell
+prompt, merely execute `setenv LANG de_DE' (in `csh'),
+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
+This can be done from your `.login' or `.profile' file, once and for
+all.
+
+ You might think that the country code specification is redundant.
+But in fact, some languages have dialects in different countries. For
+example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
+country code serves to distinguish the dialects.
+
+ The locale naming convention of `LL_CC', with `LL' denoting the
+language and `CC' denoting the country, is the one use on systems based
+on GNU libc. On other systems, some variations of this scheme are
+used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
+locales supported by your system for your country by running the command
+`locale -a | grep '^LL''.
+
+ Not all programs have translations for all languages. By default, an
+English message is shown in place of a nonexistent translation. If you
+understand other languages, you can set up a priority list of languages.
+This is done through a different environment variable, called
+`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
+for the purpose of message handling, but you still need to have `LANG'
+set to the primary language; this is required by other parts of the
+system libraries. For example, some Swedish users who would rather
+read translations in German than English for when Swedish is not
+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
+
+ In the `LANGUAGE' environment variable, but not in the `LANG'
+environment variable, `LL_CC' combinations can be abbreviated as `LL'
+to denote the language's main dialect. For example, `de' is equivalent
+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
+(Portuguese as spoken in Portugal) in this context.
+
+Translating Teams
+=================
+
+ For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list. The up-to-date list of
+teams can be found at the Free Translation Project's homepage,
+`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
+area.
+
+ If you'd like to volunteer to _work_ at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is _not_ the same as the list itself, it has
+`-request' appended. For example, speakers of Swedish can send a
+message to `sv-request@li.org', having this message body:
+
+ subscribe
+
+ Keep in mind that team members are expected to participate
+_actively_ in translations, or at solving translational difficulties,
+rather than merely lurking around. If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to `translation@iro.umontreal.ca' to reach the
+coordinator for all translator teams.
+
+ The English team is special. It works at improving and uniformizing
+the terminology in use. Proven linguistic skill are praised more than
+programming skill, here.
+
+Available Packages
+==================
+
+ Languages are not equally supported in all packages. The following
+matrix shows the current state of internationalization, as of May 2003.
+The matrix shows, in regard of each package, for which languages PO
+files have been submitted to translation coordination, with a
+translation percentage of at least 50%.
+
+ Ready PO files am az be bg ca cs da de el en en_GB eo es
+ +-------------------------------------------+
+ a2ps | [] [] [] [] |
+ aegis | () |
+ anubis | |
+ ap-utils | |
+ bash | [] [] [] |
+ batchelor | |
+ bfd | [] [] |
+ binutils | [] [] |
+ bison | [] [] [] |
+ bluez-pin | [] [] |
+ clisp | |
+ clisp | [] [] [] |
+ coreutils | [] [] [] [] |
+ cpio | [] [] [] |
+ darkstat | () [] |
+ diffutils | [] [] [] [] [] [] [] |
+ e2fsprogs | [] [] |
+ enscript | [] [] [] [] |
+ error | [] [] [] [] [] |
+ fetchmail | [] () [] [] [] [] |
+ fileutils | [] [] [] |
+ findutils | [] [] [] [] [] [] |
+ flex | [] [] [] [] |
+ gas | [] |
+ gawk | [] [] [] [] |
+ gcal | [] |
+ gcc | [] [] |
+ gettext | [] [] [] [] [] |
+ gettext-runtime | [] [] [] [] [] |
+ gettext-tools | [] [] |
+ gimp-print | [] [] [] [] [] |
+ gliv | |
+ glunarclock | [] [] [] |
+ gnucash | () [] |
+ gnucash-glossary | [] () [] |
+ gnupg | [] () [] [] [] [] |
+ gpe-calendar | [] |
+ gpe-conf | [] |
+ gpe-contacts | [] |
+ gpe-edit | |
+ gpe-login | [] |
+ gpe-ownerinfo | [] |
+ gpe-sketchbook | [] |
+ gpe-timesheet | |
+ gpe-today | [] |
+ gpe-todo | [] |
+ gphoto2 | [] [] [] [] |
+ gprof | [] [] |
+ gpsdrive | () () () |
+ grep | [] [] [] [] [] |
+ gretl | [] |
+ hello | [] [] [] [] [] [] |
+ id-utils | [] [] |
+ indent | [] [] [] [] |
+ jpilot | [] [] [] [] |
+ jwhois | [] |
+ kbd | [] [] [] [] [] |
+ ld | [] [] |
+ libc | [] [] [] [] [] [] |
+ libgpewidget | [] |
+ libiconv | [] [] [] [] [] |
+ lifelines | [] () |
+ lilypond | [] |
+ lingoteach | |
+ lingoteach_lessons | () () |
+ lynx | [] [] [] [] |
+ m4 | [] [] [] [] |
+ mailutils | [] [] |
+ make | [] [] [] |
+ man-db | [] () [] [] () |
+ mysecretdiary | [] [] [] |
+ nano | [] () [] [] [] |
+ nano_1_0 | [] () [] [] [] |
+ opcodes | [] [] |
+ parted | [] [] [] [] [] |
+ ptx | [] [] [] [] [] |
+ python | |
+ radius | |
+ recode | [] [] [] [] [] [] |
+ screem | |
+ sed | [] [] [] [] [] |
+ sh-utils | [] [] [] |
+ sharutils | [] [] [] [] [] [] |
+ sketch | [] () [] |
+ soundtracker | [] [] [] |
+ sp | [] |
+ tar | [] [] [] [] |
+ texinfo | [] [] [] [] |
+ textutils | [] [] [] [] |
+ tin | () () |
+ util-linux | [] [] [] [] [] |
+ vorbis-tools | [] [] [] |
+ wastesedge | () |
+ wdiff | [] [] [] [] |
+ wget | [] [] [] [] [] [] [] |
+ xchat | [] [] [] |
+ xpad | |
+ +-------------------------------------------+
+ am az be bg ca cs da de el en en_GB eo es
+ 0 1 4 2 31 17 54 60 14 1 4 12 56
+
+ et fa fi fr ga gl he hr hu id it ja ko
+ +----------------------------------------+
+ a2ps | [] [] [] () () |
+ aegis | |
+ anubis | [] |
+ ap-utils | [] |
+ bash | [] [] |
+ batchelor | [] |
+ bfd | [] [] |
+ binutils | [] [] |
+ bison | [] [] [] [] |
+ bluez-pin | [] [] [] [] |
+ clisp | |
+ clisp | [] |
+ coreutils | [] [] [] [] |
+ cpio | [] [] [] [] |
+ darkstat | () [] [] [] |
+ diffutils | [] [] [] [] [] [] [] |
+ e2fsprogs | |
+ enscript | [] [] |
+ error | [] [] [] [] |
+ fetchmail | [] |
+ fileutils | [] [] [] [] [] |
+ findutils | [] [] [] [] [] [] [] [] [] [] [] |
+ flex | [] [] |
+ gas | [] |
+ gawk | [] [] |
+ gcal | [] |
+ gcc | [] |
+ gettext | [] [] [] |
+ gettext-runtime | [] [] [] [] |
+ gettext-tools | [] |
+ gimp-print | [] [] |
+ gliv | () |
+ glunarclock | [] [] [] [] |
+ gnucash | [] |
+ gnucash-glossary | [] |
+ gnupg | [] [] [] [] [] [] [] |
+ gpe-calendar | [] |
+ gpe-conf | |
+ gpe-contacts | [] |
+ gpe-edit | [] [] |
+ gpe-login | [] |
+ gpe-ownerinfo | [] [] [] |
+ gpe-sketchbook | [] |
+ gpe-timesheet | [] [] [] |
+ gpe-today | [] [] |
+ gpe-todo | [] [] |
+ gphoto2 | [] [] [] |
+ gprof | [] [] |
+ gpsdrive | () [] () () |
+ grep | [] [] [] [] [] [] [] [] [] [] [] |
+ gretl | [] |
+ hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
+ id-utils | [] [] [] |
+ indent | [] [] [] [] [] [] [] [] |
+ jpilot | [] () |
+ jwhois | [] [] [] [] |
+ kbd | [] |
+ ld | [] |
+ libc | [] [] [] [] [] [] |
+ libgpewidget | [] [] [] |
+ libiconv | [] [] [] [] [] [] [] [] |
+ lifelines | () |
+ lilypond | [] |
+ lingoteach | [] [] |
+ lingoteach_lessons | |
+ lynx | [] [] [] [] |
+ m4 | [] [] [] [] |
+ mailutils | |
+ make | [] [] [] [] [] [] |
+ man-db | [] () () |
+ mysecretdiary | [] [] |
+ nano | [] [] [] [] |
+ nano_1_0 | [] [] [] [] |
+ opcodes | [] [] |
+ parted | [] [] [] |
+ ptx | [] [] [] [] [] [] [] |
+ python | |
+ radius | |
+ recode | [] [] [] [] [] [] |
+ screem | |
+ sed | [] [] [] [] [] [] [] [] |
+ sh-utils | [] [] [] [] [] [] |
+ sharutils | [] [] [] [] [] |
+ sketch | [] |
+ soundtracker | [] [] [] |
+ sp | [] () |
+ tar | [] [] [] [] [] [] [] [] [] |
+ texinfo | [] [] [] [] |
+ textutils | [] [] [] [] [] |
+ tin | [] () |
+ util-linux | [] [] [] [] () [] |
+ vorbis-tools | [] |
+ wastesedge | () |
+ wdiff | [] [] [] [] [] |
+ wget | [] [] [] [] [] [] [] [] |
+ xchat | [] [] [] |
+ xpad | |
+ +----------------------------------------+
+ et fa fi fr ga gl he hr hu id it ja ko
+ 20 1 15 73 14 24 8 10 30 31 19 31 9
+
+ lg lt lv ms nb nl nn no pl pt pt_BR ro
+ +----------------------------------------+
+ a2ps | [] [] () () () [] [] |
+ aegis | () |
+ anubis | [] [] |
+ ap-utils | () |
+ bash | [] |
+ batchelor | |
+ bfd | |
+ binutils | |
+ bison | [] [] [] [] |
+ bluez-pin | [] |
+ clisp | |
+ clisp | [] |
+ coreutils | [] |
+ cpio | [] [] [] |
+ darkstat | [] [] [] [] |
+ diffutils | [] [] [] |
+ e2fsprogs | |
+ enscript | [] [] |
+ error | [] [] |
+ fetchmail | () () |
+ fileutils | [] |
+ findutils | [] [] [] [] |
+ flex | [] |
+ gas | |
+ gawk | [] |
+ gcal | |
+ gcc | |
+ gettext | [] |
+ gettext-runtime | [] |
+ gettext-tools | |
+ gimp-print | [] |
+ gliv | [] |
+ glunarclock | [] |
+ gnucash | |
+ gnucash-glossary | [] [] |
+ gnupg | |
+ gpe-calendar | [] [] |
+ gpe-conf | [] [] |
+ gpe-contacts | [] |
+ gpe-edit | [] [] |
+ gpe-login | [] [] |
+ gpe-ownerinfo | [] [] |
+ gpe-sketchbook | [] [] |
+ gpe-timesheet | [] [] |
+ gpe-today | [] [] |
+ gpe-todo | [] [] |
+ gphoto2 | |
+ gprof | [] |
+ gpsdrive | () () () |
+ grep | [] [] [] [] |
+ gretl | |
+ hello | [] [] [] [] [] [] [] [] [] |
+ id-utils | [] [] [] |
+ indent | [] [] [] |
+ jpilot | () () |
+ jwhois | [] [] [] |
+ kbd | |
+ ld | |
+ libc | [] [] [] [] |
+ libgpewidget | [] [] |
+ libiconv | [] [] |
+ lifelines | |
+ lilypond | [] |
+ lingoteach | |
+ lingoteach_lessons | |
+ lynx | [] [] |
+ m4 | [] [] [] [] |
+ mailutils | |
+ make | [] [] |
+ man-db | [] |
+ mysecretdiary | [] |
+ nano | [] [] [] [] |
+ nano_1_0 | [] [] [] [] |
+ opcodes | [] [] [] |
+ parted | [] [] [] |
+ ptx | [] [] [] [] [] [] [] |
+ python | |
+ radius | |
+ recode | [] [] [] |
+ screem | |
+ sed | [] [] |
+ sh-utils | [] |
+ sharutils | [] |
+ sketch | [] |
+ soundtracker | |
+ sp | |
+ tar | [] [] [] [] [] [] |
+ texinfo | [] |
+ textutils | [] |
+ tin | |
+ util-linux | [] [] |
+ vorbis-tools | [] [] |
+ wastesedge | |
+ wdiff | [] [] [] [] |
+ wget | [] [] [] |
+ xchat | [] [] |
+ xpad | [] |
+ +----------------------------------------+
+ lg lt lv ms nb nl nn no pl pt pt_BR ro
+ 0 0 2 11 7 26 3 4 18 15 34 34
+
+ ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW
+ +-------------------------------------------+
+ a2ps | [] [] [] [] [] | 16
+ aegis | () | 0
+ anubis | [] [] | 5
+ ap-utils | () | 1
+ bash | [] | 7
+ batchelor | | 1
+ bfd | [] [] [] | 7
+ binutils | [] [] [] | 7
+ bison | [] [] | 13
+ bluez-pin | | 7
+ clisp | | 0
+ clisp | | 5
+ coreutils | [] [] [] [] [] | 14
+ cpio | [] [] [] | 13
+ darkstat | [] () () | 9
+ diffutils | [] [] [] [] | 21
+ e2fsprogs | [] | 3
+ enscript | [] [] [] | 11
+ error | [] [] [] | 14
+ fetchmail | [] | 7
+ fileutils | [] [] [] [] [] [] | 15
+ findutils | [] [] [] [] [] [] | 27
+ flex | [] [] [] | 10
+ gas | [] | 3
+ gawk | [] [] | 9
+ gcal | [] [] | 4
+ gcc | [] | 4
+ gettext | [] [] [] [] [] [] | 15
+ gettext-runtime | [] [] [] [] [] [] | 16
+ gettext-tools | [] [] | 5
+ gimp-print | [] [] | 10
+ gliv | | 1
+ glunarclock | [] [] [] | 11
+ gnucash | [] [] | 4
+ gnucash-glossary | [] [] [] | 8
+ gnupg | [] [] [] [] | 16
+ gpe-calendar | [] | 5
+ gpe-conf | | 3
+ gpe-contacts | [] | 4
+ gpe-edit | [] | 5
+ gpe-login | [] | 5
+ gpe-ownerinfo | [] | 7
+ gpe-sketchbook | [] | 5
+ gpe-timesheet | [] | 6
+ gpe-today | [] | 6
+ gpe-todo | [] | 6
+ gphoto2 | [] [] | 9
+ gprof | [] [] | 7
+ gpsdrive | [] [] | 3
+ grep | [] [] [] [] | 24
+ gretl | | 2
+ hello | [] [] [] [] [] | 33
+ id-utils | [] [] [] | 11
+ indent | [] [] [] [] | 19
+ jpilot | [] [] [] [] [] | 10
+ jwhois | () () [] [] | 10
+ kbd | [] [] | 8
+ ld | [] [] | 5
+ libc | [] [] [] [] | 20
+ libgpewidget | | 6
+ libiconv | [] [] [] [] [] [] | 21
+ lifelines | [] | 2
+ lilypond | [] | 4
+ lingoteach | | 2
+ lingoteach_lessons | () | 0
+ lynx | [] [] [] [] | 14
+ m4 | [] [] [] | 15
+ mailutils | | 2
+ make | [] [] [] [] | 15
+ man-db | [] | 6
+ mysecretdiary | [] [] | 8
+ nano | [] [] [] | 15
+ nano_1_0 | [] [] [] | 15
+ opcodes | [] [] | 9
+ parted | [] [] | 13
+ ptx | [] [] [] | 22
+ python | | 0
+ radius | | 0
+ recode | [] [] [] [] | 19
+ screem | [] | 1
+ sed | [] [] [] [] [] | 20
+ sh-utils | [] [] [] | 13
+ sharutils | [] [] [] [] | 16
+ sketch | [] | 5
+ soundtracker | [] | 7
+ sp | [] | 3
+ tar | [] [] [] [] [] | 24
+ texinfo | [] [] [] [] | 13
+ textutils | [] [] [] [] [] | 15
+ tin | | 1
+ util-linux | [] [] | 14
+ vorbis-tools | [] | 7
+ wastesedge | | 0
+ wdiff | [] [] [] [] | 17
+ wget | [] [] [] [] [] [] [] | 25
+ xchat | [] [] [] | 11
+ xpad | | 1
+ +-------------------------------------------+
+ 50 teams ru sk sl sr sv ta tr uk vi wa zh_CN zh_TW
+ 97 domains 32 19 16 0 56 0 48 10 1 1 12 23 913
+
+ Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect. This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+ For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer. There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+ If May 2003 seems to be old, you may fetch a more recent copy of
+this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
+matrix with full percentage details can be found at
+`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
+
+Using `gettext' in new packages
+===============================
+
+ If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU `gettext' in your
+package. Of course you have to respect the GNU Library General Public
+License which covers the use of the GNU `gettext' library. This means
+in particular that even non-free programs can use `libintl' as a shared
+library, whereas only free software can use `libintl' as a static
+library or use modified versions of `libintl'.
+
+ Once the sources are changed appropriately and the setup can handle
+the use of `gettext' the only thing missing are the translations. The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project. Therefore the information given above
+applies also for every other Free Software Project. Contact
+`translation@iro.umontreal.ca' to make the `.pot' files available to
+the translation teams.
+
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..bd6d89b
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,462 @@
+#
+# Master author manifest for bash
+#
+# The files in lib/intl were taken from the GNU gettext distribution.
+#
+# Any files appearing in the bash distribution not listed in this file
+# were created by Chet Ramey.
+#
+# Filename authors (first is original author)
+#
+README Brian Fox, Chet Ramey
+INSTALL Brian Fox, Chet Ramey
+COPYING Brian Fox, Chet Ramey
+MANIFEST Brian Fox, Chet Ramey
+configure Chet Ramey
+Makefile.in Brian Fox, Chet Ramey
+configure.in Chet Ramey
+aclocal.m4 Chet Ramey
+config.h.top Chet Ramey
+config.h.bot Chet Ramey
+config.h.in Chet Ramey
+array.c Chet Ramey
+print_cmd.c Brian Fox, Chet Ramey
+general.c Brian Fox, Chet Ramey
+variables.c Brian Fox, Chet Ramey
+make_cmd.c Brian Fox, Chet Ramey
+copy_cmd.c Brian Fox, Chet Ramey
+unwind_prot.c Brian Fox, Chet Ramey
+dispose_cmd.c Brian Fox, Chet Ramey
+getcwd.c Roland McGrath, Brian Fox, Chet Ramey
+bashhist.c Chet Ramey
+hash.c Brian Fox, Chet Ramey
+parse.y Brian Fox, Chet Ramey
+subst.c Brian Fox, Chet Ramey
+shell.c Brian Fox, Chet Ramey
+sig.c Chet Ramey
+trap.c Brian Fox, Chet Ramey
+siglist.c Brian Fox, Chet Ramey
+version.c Brian Fox, Chet Ramey
+flags.c Brian Fox, Chet Ramey
+jobs.c Brian Fox, Chet Ramey
+input.c Chet Ramey
+mailcheck.c Brian Fox, Chet Ramey
+pathexp.c Chet Ramey
+test.c Brian Fox, Chet Ramey
+expr.c Chet Ramey, Brian Fox
+alias.c Brian Fox, Chet Ramey
+execute_cmd.c Brian Fox, Chet Ramey
+bashline.c Brian Fox, Chet Ramey
+braces.c Brian Fox, Chet Ramey
+bracecomp.c Brian Fox, Chet Ramey, Tom Tromey
+nojobs.c Brian Fox, Chet Ramey
+vprint.c Chet Ramey
+oslib.c Chet Ramey
+error.c Brian Fox, Chet Ramey
+xmalloc.c Brian Fox, Chet Ramey
+alias.h Brian Fox, Chet Ramey
+array.h Chet Ramey
+builtins.h Brian Fox, Chet Ramey
+parser.h Brian Fox, Chet Ramey
+variables.h Brian Fox, Chet Ramey
+machines.h Brian Fox, Chet Ramey
+jobs.h Brian Fox, Chet Ramey
+maxpath.h Brian Fox, Chet Ramey
+pathexp.h Chet Ramey
+mailcheck.h Chet Ramey
+filecntl.h Brian Fox, Chet Ramey
+hash.h Brian Fox, Chet Ramey
+quit.h Brian Fox, Chet Ramey
+flags.h Brian Fox, Chet Ramey
+shell.h Brian Fox, Chet Ramey
+bashjmp.h Chet Ramey
+sig.h Chet Ramey
+trap.h Brian Fox, Chet Ramey
+general.h Brian Fox, Chet Ramey
+unwind_prot.h Brian Fox, Chet Ramey
+input.h Brian Fox, Chet Ramey
+error.h Brian Fox, Chet Ramey
+command.h Brian Fox, Chet Ramey
+externs.h Chet Ramey
+siglist.h Chet Ramey
+subst.h Brian Fox, Chet Ramey
+dispose_cmd.h Brian Fox, Chet Ramey
+bashansi.h Brian Fox, Chet Ramey
+make_cmd.h Brian Fox, Chet Ramey
+bashhist.h Chet Ramey
+bashline.h Chet Ramey
+execute_cmd.h Chet Ramey
+bashtypes.h Chet Ramey
+bashtty.h Chet Ramey
+pathnames.h Chet Ramey
+y.tab.c Brian Fox, Chet Ramey
+y.tab.h Brian Fox, Chet Ramey
+parser-built Brian Fox, Chet Ramey
+posixstat.h Brian Fox, Chet Ramey
+stdc.h Chet Ramey
+ansi_stdlib.h Brian Fox, Chet Ramey
+memalloc.h Chet Ramey
+builtins/ChangeLog Brian Fox, Chet Ramey
+builtins/Makefile.in Brian Fox, Chet Ramey
+builtins/alias.def Brian Fox, Chet Ramey
+builtins/bind.def Brian Fox, Chet Ramey
+builtins/break.def Brian Fox, Chet Ramey
+builtins/builtin.def Brian Fox, Chet Ramey
+builtins/caller.def Rocky Bernstein, Chet Ramey
+builtins/cd.def Brian Fox, Chet Ramey
+builtins/colon.def Brian Fox, Chet Ramey
+builtins/command.def Brian Fox, Chet Ramey
+builtins/common.c Brian Fox, Chet Ramey
+builtins/declare.def Brian Fox, Chet Ramey
+builtins/echo.def Brian Fox, Chet Ramey
+builtins/enable.def Brian Fox, Chet Ramey
+builtins/eval.def Brian Fox, Chet Ramey
+builtins/exec.def Brian Fox, Chet Ramey
+builtins/exit.def Brian Fox, Chet Ramey
+builtins/fc.def Brian Fox, Chet Ramey
+builtins/fg_bg.def Brian Fox, Chet Ramey
+builtins/getopt.c Roland McGrath, Brian Fox, Chet Ramey
+builtins/getopt.h Roland McGrath, Brian Fox, Chet Ramey
+builtins/getopts.def Brian Fox, Chet Ramey
+builtins/hash.def Brian Fox, Chet Ramey
+builtins/hashcom.h Brian Fox, Chet Ramey
+builtins/help.def Brian Fox, Chet Ramey
+builtins/let.def Chet Ramey, Brian Fox
+builtins/history.def Brian Fox, Chet Ramey
+builtins/jobs.def Brian Fox, Chet Ramey
+builtins/kill.def Brian Fox, Chet Ramey
+builtins/mapfile.def Rocky Bernstein
+builtins/mkbuiltins.c Brian Fox, Chet Ramey
+builtins/pushd.def Brian Fox, Chet Ramey
+builtins/read.def Brian Fox, Chet Ramey
+builtins/reserved.def Brian Fox, Chet Ramey
+builtins/return.def Brian Fox, Chet Ramey
+builtins/set.def Brian Fox, Chet Ramey
+builtins/setattr.def Brian Fox, Chet Ramey
+builtins/shift.def Brian Fox, Chet Ramey
+builtins/shopt.def Chet Ramey
+builtins/source.def Brian Fox, Chet Ramey
+builtins/suspend.def Brian Fox, Chet Ramey
+builtins/test.def Brian Fox, Chet Ramey
+builtins/times.def Brian Fox, Chet Ramey
+builtins/trap.def Brian Fox, Chet Ramey
+builtins/type.def Brian Fox, Chet Ramey
+builtins/ulimit.def Chet Ramey, Brian Fox
+builtins/umask.def Brian Fox, Chet Ramey
+builtins/wait.def Brian Fox, Chet Ramey
+builtins/psize.c Chet Ramey, Brian Fox
+builtins/psize.sh Chet Ramey, Brian Fox
+builtins/inlib.def Chet Ramey
+builtins/bashgetopt.c Chet Ramey
+builtins/common.h Chet Ramey
+builtins/bashgetopt.h Chet Ramey
+lib/doc-support/texindex.c bug-texinfo@prep.ai.mit.edu, Chet Ramey
+lib/doc-support/Makefile.in Chet Ramey
+lib/doc-support/getopt.h Roland McGrath
+lib/doc-support/getopt.c Roland McGrath
+lib/doc-support/getopt1.c Roland McGrath
+lib/glob/ChangeLog Brian Fox, Chet Ramey
+lib/glob/Makefile.in Brian Fox, Chet Ramey
+lib/glob/strmatch.c Roland McGrath, Brian Fox, Chet Ramey
+lib/glob/strmatch.h Roland McGrath, Brian Fox, Chet Ramey
+lib/glob/glob.c Richard Stallman, Roland McGrath, Brian Fox, Chet Ramey
+lib/glob/glob.h Chet Ramey
+lib/glob/ndir.h Doug Gwyn, Richard Stallman
+lib/glob/doc/Makefile.in Brian Fox, Chet Ramey
+lib/glob/doc/glob.texi Brian Fox, Chet Ramey
+lib/malloc/Makefile.in Chet Ramey
+lib/malloc/alloca.c Doug Gwyn, Richard Stallman, Brian Fox, Chet Ramey
+lib/malloc/getpagesize.h Brian Fox, Chet Ramey
+lib/malloc/malloc.c Chris Kingsley, Mike Muuss, Richard Stallman, Brian Fox, Chet Ramey
+lib/malloc/gmalloc.c Mike Haertel, Roland McGrath
+lib/malloc/stub.c Chet Ramey
+lib/malloc/i386-alloca.s Richard Stallman
+lib/malloc/x386-alloca.s Chip Salzenberg, Richard Stallman
+lib/malloc/xmalloc.c Brian Fox, Chet Ramey
+lib/posixheaders/posixstat.h Brian Fox, Chet Ramey
+lib/posixheaders/ansi_stdlib.h Brian Fox, Chet Ramey
+lib/posixheaders/stdc.h Chet Ramey
+lib/posixheaders/memalloc.h Chet Ramey
+lib/posixheaders/filecntl.h Brian Fox, Chet Ramey
+lib/readline/Makefile.in Brian Fox, Chet Ramey
+lib/readline/COPYING Brian Fox, Chet Ramey
+lib/readline/ChangeLog Brian Fox, Chet Ramey
+lib/readline/readline.c Brian Fox, Chet Ramey
+lib/readline/vi_mode.c Brian Fox, Chet Ramey
+lib/readline/emacs_keymap.c Brian Fox, Chet Ramey
+lib/readline/vi_keymap.c Brian Fox, Chet Ramey
+lib/readline/funmap.c Brian Fox, Chet Ramey
+lib/readline/keymaps.c Brian Fox, Chet Ramey
+lib/readline/xmalloc.c Brian Fox, Chet Ramey
+lib/readline/search.c Brian Fox, Chet Ramey
+lib/readline/isearch.c Brian Fox, Chet Ramey
+lib/readline/parens.c Brian Fox, Chet Ramey
+lib/readline/rltty.c Brian Fox, Chet Ramey
+lib/readline/complete.c Brian Fox, Chet Ramey
+lib/readline/bind.c Brian Fox, Chet Ramey
+lib/readline/display.c Brian Fox, Chet Ramey
+lib/readline/signals.c Brian Fox, Chet Ramey
+lib/readline/kill.c Brian Fox, Chet Ramey
+lib/readline/undo.c Brian Fox, Chet Ramey
+lib/readline/input.c Brian Fox, Chet Ramey
+lib/readline/macro.c Brian Fox, Chet Ramey
+lib/readline/util.c Brian Fox, Chet Ramey
+lib/readline/callback.c Chet Ramey
+lib/readline/readline.h Brian Fox, Chet Ramey
+lib/readline/chardefs.h Brian Fox, Chet Ramey
+lib/readline/keymaps.h Brian Fox, Chet Ramey
+lib/readline/rldefs.h Brian Fox, Chet Ramey
+lib/readline/posixstat.h Brian Fox, Chet Ramey
+lib/readline/ansi_stdlib.h Brian Fox, Chet Ramey
+lib/readline/memalloc.h Chet Ramey
+lib/readline/rlconf.h Chet Ramey
+lib/readline/rltty.h Chet Ramey
+lib/readline/history.c Brian Fox, Chet Ramey
+lib/readline/histexpand.c Brian Fox, Chet Ramey
+lib/readline/histfile.c Brian Fox, Chet Ramey
+lib/readline/histsearch.c Brian Fox, Chet Ramey
+lib/readline/history.h Brian Fox, Chet Ramey
+lib/readline/histlib.h Brian Fox, Chet Ramey
+lib/readline/tilde.c Brian Fox, Chet Ramey
+lib/readline/tilde.h Brian Fox, Chet Ramey
+lib/readline/doc/texindex.c bug-texinfo@prep.ai.mit.edu, Chet Ramey
+lib/readline/doc/Makefile Brian Fox, Chet Ramey
+lib/readline/doc/rlman.texinfo Brian Fox, Chet Ramey
+lib/readline/doc/rltech.texinfo Brian Fox, Chet Ramey
+lib/readline/doc/rluser.texinfo Brian Fox, Chet Ramey
+lib/readline/doc/hist.texinfo Brian Fox, Chet Ramey
+lib/readline/doc/hstech.texinfo Brian Fox, Chet Ramey
+lib/readline/doc/hsuser.texinfo Brian Fox, Chet Ramey
+lib/readline/examples/Makefile Brian Fox
+lib/readline/examples/fileman.c Brian Fox
+lib/readline/examples/manexamp.c Brian Fox
+lib/readline/examples/histexamp.c Brian Fox, Chet Ramey
+lib/readline/examples/rltest.c Brian Fox, Chet Ramey
+lib/readline/examples/Inputrc Brian Fox, Chet Ramey
+lib/termcap/Makefile.in David MacKenzie, Chet Ramey
+lib/termcap/termcap.c David MacKenzie
+lib/termcap/termcap.h David MacKenzie
+lib/termcap/tparam.c David MacKenzie
+lib/termcap/version.c David MacKenzie
+lib/termcap/grot/termcap.info David MacKenzie
+lib/termcap/grot/termcap.info-1 David MacKenzie
+lib/termcap/grot/termcap.info-2 David MacKenzie
+lib/termcap/grot/termcap.info-3 David MacKenzie
+lib/termcap/grot/termcap.info-4 David MacKenzie
+lib/termcap/grot/NEWS David MacKenzie
+lib/termcap/grot/INSTALL David MacKenzie
+lib/termcap/grot/ChangeLog David MacKenzie
+lib/termcap/grot/texinfo.tex David MacKenzie
+lib/termcap/grot/termcap.texi David MacKenzie
+lib/termcap/grot/Makefile.in David MacKenzie
+lib/termcap/grot/configure David MacKenzie
+lib/termcap/grot/configure.in David MacKenzie
+lib/termcap/grot/COPYING David MacKenzie
+lib/termcap/grot/README David MacKenzie
+lib/tilde/ChangeLog Brian Fox, Chet Ramey
+lib/tilde/Makefile.in Brian Fox, Chet Ramey
+lib/tilde/doc/tilde.texi Brian Fox, Chet Ramey
+lib/tilde/doc/Makefile Brian Fox, Chet Ramey
+lib/tilde/tilde.c Brian Fox, Chet Ramey
+lib/tilde/tilde.h Brian Fox, Chet Ramey
+lib/tilde/memalloc.h Brian Fox, Chet Ramey
+CWRU/misc/open-files.c Chet Ramey
+CWRU/misc/sigs.c Chet Ramey
+CWRU/misc/pid.c Chet Ramey
+CWRU/misc/sigstat.c Chet Ramey
+CWRU/misc/bison Chet Ramey
+CWRU/misc/aux-machine-desc Chet Ramey
+CWRU/PLATFORMS Chet Ramey
+CWRU/README Chet Ramey
+CWRU/CWRU.CHANGES.051093 Chet Ramey
+CWRU/POSIX.NOTES Chet Ramey
+CWRU/CWRU.CHANGES.071193 Chet Ramey
+CWRU/CWRU.CHANGES.090393 Chet Ramey
+doc/Makefile.in Brian Fox, Chet Ramey
+doc/bash.1 Chet Ramey
+doc/builtins.1 Chet Ramey
+doc/bash.ps Chet Ramey
+doc/bash.txt Chet Ramey
+doc/readline.3 Chet Ramey
+doc/readline.ps Chet Ramey
+doc/readline.txt Chet Ramey
+doc/texinfo.tex Richard Stallman
+doc/features.texi Brian Fox, Chet Ramey
+doc/features.ps Brian Fox, Chet Ramey
+doc/features.info Brian Fox, Chet Ramey
+doc/features.dvi Brian Fox, Chet Ramey
+doc/bash_builtins.1 Chet Ramey
+doc/bash_builtins.ps Chet Ramey
+doc/bash_builtins.txt Chet Ramey
+doc/bash_builtins.readme Chet Ramey
+doc/article.ms Chet Ramey
+doc/FAQ Chet Ramey
+support/cat-s Brian Fox, Chet Ramey
+support/mksysdefs Brian Fox, Chet Ramey
+support/mkversion.c Brian Fox, Chet Ramey
+support/mksignames.c Brian Fox, Chet Ramey
+support/getcppsyms.c Brian Fox, Chet Ramey
+support/cppmagic Brian Fox, Chet Ramey
+support/pagesize.sh Chet Ramey, Brian Fox
+support/pagesize.c Chet Ramey, Brian Fox
+support/bash.xbm Brian Fox
+support/FAQ Brian Fox
+support/PORTING Brian Fox
+support/mklinks Brian Fox
+support/fixlinks Chet Ramey
+support/mkdirs Chet Ramey
+support/clone-bash Chet Ramey
+support/bashbug.sh Chet Ramey
+support/mkmachtype Chet Ramey
+support/recho.c Chet Ramey
+support/config.guess Per Bothner, Chet Ramey
+support/config.sub Richard Stallman, Chet Ramey
+support/install.sh MIT X Consortium (X11R5)
+support/endian.c Chet Ramey
+support/printenv Chet Ramey
+examples/precedence-tester Brian Fox, Chet Ramey
+examples/functions/substr Brian Fox, Chet Ramey
+examples/functions/kshenv Chet Ramey
+examples/functions/autoload Chet Ramey
+examples/functions/csh-compat Brian Fox, Chet Ramey
+examples/functions/shcat Chet Ramey
+examples/functions/substr2 Chet Ramey
+examples/functions/term Chet Ramey
+examples/functions/whatis Chet Ramey
+examples/functions/whence Chet Ramey
+examples/functions/func Chet Ramey
+examples/functions/dirname Brian Fox, Noah Friedman
+examples/functions/basename Brian Fox, Noah Friedman
+examples/functions/exitstat Noah Friedman, Roland McGrath
+examples/functions/external Noah Friedman
+examples/functions/fact Brian Fox
+examples/functions/manpage Tom Tromey
+examples/functions/fstty Chet Ramey
+examples/functions/jj.bash Chet Ramey
+examples/functions/notify.bash Chet Ramey
+examples/loadables/getconf.c J.T. Conklin
+examples/scripts/shprompt Chet Ramey
+examples/scripts/adventure.sh Chet Ramey, Doug Gwyn
+examples/scripts/bcsh.sh Chris Robertson, Chet Ramey
+examples/startup-files/Bashrc Brian Fox
+examples/startup-files/Bash_aliases Brian Fox
+examples/startup-files/Bash_profile Brian Fox
+examples/startup-files/bash-profile Brian Fox
+examples/startup-files/bashrc Chet Ramey
+examples/suncmd.termcap Brian Fox, Chet Ramey
+examples/alias-conv.sh Brian Fox, Chet Ramey
+tests/README Chet Ramey
+tests/arith.tests Chet Ramey
+tests/arith.right Chet Ramey
+tests/array.tests Chet Ramey
+tests/array.right Chet Ramey
+tests/dollar-at.sh Chet Ramey
+tests/dollar-star.sh Chet Ramey
+tests/dollar.right Chet Ramey
+tests/exp-tests Chet Ramey
+tests/exp.right Chet Ramey
+tests/glob-test Chet Ramey
+tests/glob.right Chet Ramey
+tests/ifs-test-1.sh Chet Ramey
+tests/ifs-test-2.sh Chet Ramey
+tests/ifs-test-3.sh Chet Ramey
+tests/ifs.1.right Chet Ramey
+tests/ifs.2.right Chet Ramey
+tests/ifs.3.right Chet Ramey
+tests/input-line.sh Chet Ramey
+tests/input-line.sub Chet Ramey
+tests/input.right Chet Ramey
+tests/minus-e Chet Ramey
+tests/minus-e.right Chet Ramey
+tests/new-exp.tests Chet Ramey
+tests/new-exp.right Chet Ramey
+tests/prec.right Chet Ramey
+tests/precedence Chet Ramey
+tests/run-all Chet Ramey
+tests/run-dollars Chet Ramey
+tests/run-exp-tests Chet Ramey
+tests/run-glob-test Chet Ramey
+tests/run-ifs-tests Chet Ramey
+tests/run-input-test Chet Ramey
+tests/run-minus-e Chet Ramey
+tests/run-new-exp Chet Ramey
+tests/run-precedence Chet Ramey
+tests/run-set-e-test Chet Ramey
+tests/run-strip Chet Ramey
+tests/run-varenv Chet Ramey
+tests/set-e-test Chet Ramey
+tests/set-e.right Chet Ramey
+tests/strip.tests Chet Ramey
+tests/strip.right Chet Ramey
+tests/tilde-tests Chet Ramey
+tests/tilde.right Chet Ramey
+tests/varenv.right Chet Ramey
+tests/varenv.sh Chet Ramey
+tests/misc/chld-trap.sh Chet Ramey
+tests/misc/dot-test-1.sh Chet Ramey
+tests/misc/dot-test-1.sub Chet Ramey
+tests/misc/gotest Chet Ramey
+tests/misc/perf-script Chet Ramey
+tests/misc/redir.t1.sh Chet Ramey
+tests/misc/redir.t2.sh Chet Ramey
+tests/misc/redir.t3.sh Chet Ramey
+tests/misc/redir.t3.sub Chet Ramey
+tests/misc/redir.t4.sh Chet Ramey
+tests/misc/run.r1.sh Chet Ramey
+tests/misc/run.r2.sh Chet Ramey
+tests/misc/run.r3.sh Chet Ramey
+tests/misc/sigint.t1.sh Chet Ramey
+tests/misc/sigint.t2.sh Chet Ramey
+tests/misc/sigint.t3.sh Chet Ramey
+tests/misc/sigint.t4.sh Chet Ramey
+tests/misc/test-minus-e.1 Chet Ramey
+tests/misc/test-minus-e.2 Chet Ramey
+lib/sh/Makefile.in Chet Ramey
+lib/sh/clktck.c Chet Ramey
+lib/sh/clock.c Chet Ramey
+lib/sh/fmtullong.c Chet Ramey
+lib/sh/fmtulong.c Chet Ramey
+lib/sh/getcwd.c Chet Ramey, Roland McGrath
+lib/sh/getenv.c Chet Ramey, Brian Fox
+lib/sh/inet_aton.c Chet Ramey, Ulrich Drepper, Paul Vixie
+lib/sh/itos.c Chet Ramey
+lib/sh/mailstat.c Chet Ramey
+lib/sh/makepath.c Chet Ramey
+lib/sh/mktime.c Chet Ramey, Paul Eggert
+lib/sh/netconn.c Chet Ramey
+lib/sh/netopen.c Chet Ramey
+lib/sh/oslib.c Chet Ramey, Brian Fox
+lib/sh/pathcanon.c Chet Ramey
+lib/sh/pathphys.c Chet Ramey
+lib/sh/rename.c Chet Ramey
+lib/sh/setlinebuf.c Chet Ramey, Brian Fox
+lib/sh/shquote.c Chet Ramey
+lib/sh/shtty.c Chet Ramey
+lib/sh/snprintf.c Chet Ramey, Unknown
+lib/sh/spell.c Chet Ramey
+lib/sh/strcasecmp.c Chet Ramey, Brian Fox
+lib/sh/strerror.c Chet Ramey, Brian Fox
+lib/sh/strftime.c Arnold Robbins
+lib/sh/strindex.c Chet Ramey
+lib/sh/stringlist.c Chet Ramey
+lib/sh/stringvec.c Chet Ramey
+lib/sh/strpbrk.c Roland McGrath
+lib/sh/strtod.c Chet Ramey, Roland McGrath
+lib/sh/strtoimax.c Chet Ramey, Paul Eggert
+lib/sh/strtol.c Chet Ramey, Paul Eggert
+lib/sh/strtoll.c Chet Ramey, Paul Eggert
+lib/sh/strtoul.c Chet Ramey, Paul Eggert
+lib/sh/strtoull.c Chet Ramey, Paul Eggert
+lib/sh/strtoumax.c Chet Ramey, Paul Eggert
+lib/sh/strtrans.c Chet Ramey
+lib/sh/times.c Chet Ramey, Brian Fox
+lib/sh/timeval.c Chet Ramey
+lib/sh/tmpfile.c Chet Ramey
+lib/sh/vprint.c Chet Ramey, Brian Fox
+lib/sh/xstrchr.c Chet Ramey, Mitsuru Chinen
+lib/sh/zread.c Chet Ramey
+lib/sh/zwrite.c Chet Ramey
+
+tests/posix-ifs.sh Glenn Fowler
+
+support/checkbashisms Julian Gilbey, Debian Linux team
diff --git a/CHANGES b/CHANGES
new file mode 100644
index 0000000..359e10d
--- /dev/null
+++ b/CHANGES
@@ -0,0 +1,6597 @@
+This document details the changes between this version, bash-4.1-rc,
+and the previous version, bash-4.1-beta.
+
+1. Changes to Bash
+
+a. Fixed a bug that caused printf to not return a partial value when it
+ encountered an error while converting an integer argument.
+
+b. Fixed a bug that caused setting one of the compatNN options to not
+ turn off the others.
+
+c. The (undocumented) --wordexp option is no longer included by default.
+
+d. Fixed a bug in conditional command execution that caused it to not
+ correctly ignore the exit status under certain circumstances.
+
+e. Added a configure-time check for correctly-working asprintf/snprintf.
+
+f. Fixed some problems with line number calculation and display when sourcing
+ a file in an interactive shell.
+
+g. Fixed a bug that caused the shell to crash when using `declare -A foo=bar'.
+
+h. Fixed a bug that caused an off-by-one error when calculating the directories
+ to display with the PROMPT_DIRTRIM option.
+
+2. Changes to Readline
+
+a. Fixed a bug that caused applications using the callback interface to not
+ react to SIGINT (or other signals) until another character arrived.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-4.1-beta,
+and the previous version, bash-4.1-alpha.
+
+1. Changes to Bash
+
+a. Fixed a bug in mapfile that caused the shell to crash if it was passed the
+ name of an associative array.
+
+b. Fixed a bug that caused the shell to incorrectly split case patterns if
+ they contained characters in $IFS.
+
+c. Fixed a bug that caused the shell to set $? to the wrong value when using
+ a construct ending with a variable assignment with set -x enabled and PS4
+ containing a command substitution.
+
+d. Fixed a bug that caused the shell to read commands incorrectly if an
+ expansion error occurred under certain conditions in a user-specified
+ subshell.
+
+e. Fixed a bug that caused the shell to set $? incorrectly if a parse error
+ occurred in an evaluation context ("eval", trap command, dot script, etc.)
+
+f. Fixed a bug that caused the shell to attempt command substitution
+ completion within a single-quoted string.
+
+g. Fixed a bug that caused the shell to insert an extra single quote during
+ word completion.
+
+h. Fixed a bug that caused the shell to crash if invoked with the environment
+ variable EMACS having a null value.
+
+i. Fixed a bug that caused bash to incorrectly report the presence of new
+ mail in a `maildir' environment.
+
+j. Fixed a bug that caused the shell to not recognize a here-document ending
+ delimiter inside a command substitution.
+
+k. Fixed a bug that caused the shell to crash when a a dynamic array variable
+ was assigned a scalar value.
+
+2. Changes to Readline
+
+3. New Features in Bash
+
+a. The mapfile/readarray builtin no longer stores the commands it invokes via
+ callbacks in the history list.
+
+b. There is a new `compat40' shopt option.
+
+c. The < and > operators to [[ do string comparisons using the current locale
+ only if the compatibility level is greater than 40 (set to 41 by default).
+
+4. New Features in Readline
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-4.1-alpha,
+and the previous version, bash-4.0-release.
+
+1. Changes to Bash
+
+a. Fixed bugs in the parser involving new parsing of the commands contained
+ in command substitution when the substitution is read.
+
+b. Fixed a bug that caused the shell to dump core when performing programmable
+ completion using a shell function.
+
+c. Fixed a bug in `mapfile' that caused it to invoke callbacks at the wrong
+ time.
+
+d. Fixed a bug that caused the shell to dump core when listing jobs in the
+ `exit' builtin.
+
+e. Fixed several bugs encountered when reading subscripts in associative
+ array assignments and expansions.
+
+f. Fixed a bug that under some circumstances caused an associative array to
+ be converted to an indexed array.
+
+g. Fixed a bug that caused syntax errors and SIGINT interrupts to not set
+ $? to a value > 128.
+
+h. Fixed a bug that caused the shell to remove FIFOs associated with process
+ substitution inside shell functions.
+
+i. Fixed a bug that caused terminal attributes to not be reset when the
+ `read' builtin timed out.
+
+j. Fixed a bug in brace expansion that caused unwanted zero padding of the
+ expanded terms.
+
+k. Fixed a bug that prevented the |& construct from working as intended when
+ used with a simple command with additional redirections.
+
+l. Fixed a bug with the case statment ;& terminator that caused the shell to
+ dereference a NULL pointer.
+
+m. Fixed a bug that caused assignment statements or redirections preceding
+ a simple command name to inhibit alias expansion.
+
+n. Fixed the behavior of `set -u' to conform to the latest Posix interpretation:
+ every expansion of an unset variable except $@ and $* will cause the
+ shell to exit.
+
+o. Fixed a bug that caused double-quoted expansions of $* inside word
+ expansions like ${x#$*} to not expand properly when $IFS is empty.
+
+p. Fixed a bug that caused traps to set $LINENO to the wrong value when they
+ execute.
+
+q. Fixed a bug that caused off-by-one errors when computing history lines in
+ the `fc' builtin.
+
+r. Fixed a bug that caused some terminating signals to not exit the shell
+ quickly enough, forcing the kernel to send the signal (e.g., SIGSEGV)
+ multiple times.
+
+s. Fixed a bug that caused the shell to attempt to add empty lines to the
+ history list when reading here documents.
+
+t. Made some internal changes that dramatically speeds up sequential indexed
+ array access.
+
+u. Fixed a bug that caused the shell to write past the end of a string when
+ completing a double-quoted string ending in a backslash.
+
+v. Fixed a bug that caused the shell to replace too many characters when a
+ pattern match was null in a ${foo//bar} expansion.
+
+w. Fixed bugs in the expansion of ** that caused duplicate directory names
+ and the contents of the current directory to be omitted.
+
+x. Fixed a bug that caused $? to not be set correctly when referencing an
+ unset variable with set -u and set -e enabled.
+
+y. Fixed a bug caused by executing an external program from the DEBUG trap
+ while a pipeline was running. The effect was to disturb the pipeline
+ state, occasionally causing it to hang.
+
+z. Fixed a bug that caused the ** glob expansion to dump core if it
+ encountered an unsearchable directory.
+
+aa. Fixed a bug that caused `command -v' and `command -V' to not honor the
+ path set by the -p option.
+
+bb. Fixed a bug that caused brace expansion to take place too soon in some
+ compound array assignments.
+
+cc. Fixed a bug that caused programmable completion functions' changes to
+ READLINE_POINT to not be reflected back to readline.
+
+dd. Fixed a bug that caused the shell to dump core if a trap was executed
+ during a shell assignment statement.
+
+ee. Fixed an off-by-one error when computing the number of positional
+ parameters for the ${@:0:n} expansion.
+
+ff. Fixed a problem with setting COMP_CWORD for programmable completion
+ functions that could leave it set to -1.
+
+gg. Fixed a bug that caused the ERR trap to be triggered in some cases where
+ `set -e' would not have caused the shell to exit.
+
+hh. Fixed a bug that caused changes made by `compopt' to not persist past the
+ completion function in which compopt was executed.
+
+ii. Fixed a bug that caused the list of hostname completions to not be cleared
+ when HOSTNAME was unset.
+
+jj. Fixed a bug that caused variable expansion in here documents to look in
+ any temporary environment.
+
+kk. Bash and readline can now convert file names between precomposed and
+ decomposed Unicode on Mac OS X ("keyboard" and file system forms,
+ respectively). This affects filename completion (using new
+ rl_filename_rewrite_hook), globbing, and readline redisplay.
+
+ll. The ERR and EXIT traps now see a non-zero value for $? when a parser
+ error after set -e has been enabled causes the shell to exit.
+
+mm. Fixed a bug that in brace expansion that caused zero-prefixed terms to
+ not contain the correct number of digits.
+
+nn. Fixed a bug that caused the shell to free non-allocated memory when
+ unsetting an associative array which had had a value implicitly assigned
+ to index "0".
+
+oo. Fixed a memory leak in the ${!prefix@} expansion.
+
+pp. Fixed a bug that caused printf to not correctly report all write errors.
+
+qq. Fixed a bug that caused single and double quotes to act as delimiters
+ when splitting a command line into words for programmable completion.
+
+rr. Fixed a bug that caused ** globbing that caused **/path/* to match every
+ directory, not just those matching `path'.
+
+ss. Fixed a bug that caused the shell to dump core when running `help' without
+ arguments if the terminal width was fewer than 7 characters.
+
+2. Changes to Readline
+
+a. The SIGWINCH signal handler now avoids calling the redisplay code if
+ one arrives while in the middle of redisplay.
+
+b. Changes to the timeout code to make sure that timeout values greater
+ than one second are handled better.
+
+c. Fixed a bug in the redisplay code that was triggered by a prompt
+ containing invisible characters exactly the width of the screen.
+
+d. Fixed a bug in the redisplay code encountered when running in horizontal
+ scroll mode.
+
+e. Fixed a bug that prevented menu completion from properly completing
+ filenames.
+
+f. Fixed a redisplay bug caused by a multibyte character causing a line to
+ wrap.
+
+g. Fixed a bug that caused key sequences of two characters to not be
+ recognized when a longer sequence identical in the first two characters
+ was bound.
+
+h. Fixed a bug that caused history expansion to be attempted on $'...'
+ single-quoted strings.
+
+i. Fixed a bug that caused incorrect redisplay when the prompt contained
+ multibyte characters in an `invisible' sequence bracketed by \[ and
+ \].
+
+j. Fixed a bug that caused history expansion to short-circuit after
+ encountering a multibyte character.
+
+3. New Features in Bash
+
+a. Here-documents within $(...) command substitutions may once more be
+ delimited by the closing right paren, instead of requiring a newline.
+
+b. Bash's file status checks (executable, readable, etc.) now take file
+ system ACLs into account on file systems that support them.
+
+c. Bash now passes environment variables with names that are not valid
+ shell variable names through into the environment passed to child
+ processes.
+
+d. The `execute-unix-command' readline function now attempts to clear and
+ reuse the current line rather than move to a new one after the command
+ executes.
+
+e. `printf -v' can now assign values to array indices.
+
+f. New `complete -E' and `compopt -E' options that work on the "empty"
+ completion: completion attempted on an empty command line.
+
+g. New complete/compgen/compopt -D option to define a `default' completion:
+ a completion to be invoked on command for which no completion has been
+ defined. If this function returns 124, programmable completion is
+ attempted again, allowing a user to dynamically build a set of completions
+ as completion is attempted by having the default completion function
+ install individual completion functions each time it is invoked.
+
+h. When displaying associative arrays, subscripts are now quoted.
+
+i. Changes to dabbrev-expand to make it more `emacs-like': no space appended
+ after matches, completions are not sorted, and most recent history entries
+ are presented first.
+
+j. The [[ and (( commands are now subject to the setting of `set -e' and the
+ ERR trap.
+
+k. The source/. builtin now removes NUL bytes from the file before attempting
+ to parse commands.
+
+l. There is a new configuration option (in config-top.h) that forces bash to
+ forward all history entries to syslog.
+
+m. A new variable $BASHOPTS to export shell options settable using `shopt' to
+ child processes.
+
+n. There is a new confgure option that forces the extglob option to be
+ enabled by default.
+
+o. New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
+ output to that file descriptor.
+
+p. If the optional left-hand-side of a redirection is of the form {var}, the
+ shell assigns the file descriptor used to $var or uses $var as the file
+ descriptor to move or close, depending on the redirection operator.
+
+q. The < and > operators to the [[ conditional command now do string
+ comparison according to the current locale.
+
+r. Programmable completion now uses the completion for `b' instead of `a'
+ when completion is attempted on a line like: a $(b c.
+
+s. Force extglob on temporarily when parsing the pattern argument to
+ the == and != operators to the [[ command, for compatibility.
+
+t. Changed the behavior of interrupting the wait builtin when a SIGCHLD is
+ received and a trap on SIGCHLD is set to be Posix-mode only.
+
+u. The read builtin has a new `-N nchars' option, which reads exactly NCHARS
+ characters, ignoring delimiters like newline.
+
+4. New Features in Readline
+
+a. New bindable function: menu-complete-backward.
+
+b. In the vi insertion keymap, C-n is now bound to menu-complete by default,
+ and C-p to menu-complete-backward.
+
+c. When in vi command mode, repeatedly hitting ESC now does nothing, even
+ when ESC introduces a bound key sequence. This is closer to how
+ historical vi behaves.
+
+d. New bindable function: skip-csi-sequence. Can be used as a default to
+ consume key sequences generated by keys like Home and End without having
+ to bind all keys.
+
+e. New application-settable function: rl_filename_rewrite_hook. Can be used
+ to rewite or modify filenames read from the file system before they are
+ compared to the word to be completed.
+
+f. New bindable variable: skip-completed-text, active when completing in the
+ middle of a word. If enabled, it means that characters in the completion
+ that match characters in the remainder of the word are "skipped" rather
+ than inserted into the line.
+
+g. The pre-readline-6.0 version of menu completion is available as
+ "old-menu-complete" for users who do not like the readline-6.0 version.
+
+h. New bindable variable: echo-control-characters. If enabled, and the
+ tty ECHOCTL bit is set, controls the echoing of characters corresponding
+ to keyboard-generated signals.
+
+i. New bindable variable: enable-meta-key. Controls whether or not readline
+ sends the smm/rmm sequences if the terminal indicates it has a meta key
+ that enables eight-bit characters.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-4.0-release,
+and the previous version, bash-4.0-rc1.
+
+1. Changes to Bash
+
+a. Changed the message printed when setlocale(3) fails to only include the
+ strerror error text if the call changes errno.
+
+b. Changed trap command execution to reset the line number before running a
+ trap (except DEBUG and RETURN traps).
+
+c. Fixed behavior of case-modifiying word expansions to not work on
+ individual words within a variable's value.
+
+d. Fixed a bug that caused mapfile to not be interruptible when run in an
+ interactive shell.
+
+e. Fixed a bug that caused mapfile to not run callbacks for the first line
+ read.
+
+f. Fixed a bug that caused mapfile to not honor EOF typed in an interactive
+ shell.
+
+g. Fixed the coprocess reaping code to not run straight from a signal handler.
+
+h. Fixed a bug that caused printf -b to ignore the first % conversion specifier
+ in the format string on 64-bit systems.
+
+i. Fixed a bug that caused incorrect word splitting when `:', `=', or `~'
+ appeared in $IFS.
+
+j. Fixed a bug that caused data corruption in the programmable completion code
+ when a shell function called from a completion aborted execution.
+
+k. Fixed a bug that caused the CPU usage reported by the `time' builtin to be
+ capped at 100%.
+
+l. Changed behavior of shell when -e option is in effect to reflect consensus
+ of Posix shell standardization working group.
+
+m. Fixed a bug introduced in bash-4.0-alpha that caused redirections to not
+ be displayed by `type' or `declare' when appearing in functions under
+ certain circumstances.
+
+2. Changes to Readline
+
+a. Fixed a bug that caused !(...) extended glob patterns to inhibit later
+ history expansion.
+
+b. Reworked the signal handling to avoid calling disallowed functions from a
+ signal handler.
+
+3. New Features in Bash
+
+a. `readarray' is now a synonym for `mapfile'.
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-4.0-rc1,
+and the previous version, bash-4.0-beta2.
+
+1. Changes to Bash
+
+a. Fixed a bug that caused parsing errors when a $()-style command
+ substitution was follwed immediately by a quoted newline.
+
+b. Fixed a bug that caused extended shell globbing patterns beginning with
+ `*(' to not work when used with pattern substitution word expansions.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-4.0-beta2,
+and the previous version, bash-4.0-beta.
+
+1. Changes to Bash
+
+a. Fixed a bug that caused failed word expansions to set $? but not
+ PIPESTATUS.
+
+b. Changed filename completion to quote the tilde in a filename with a
+ leading tilde that exists in the current directory.
+
+c. Fixed a bug that caused a file descriptor leak when performing
+ redirections attached to a compound command.
+
+d. Fixed a bug that caused expansions of $@ and $* to not exit the shell if
+ the -u option was enabled and there were no posititional parameters.
+
+e. Fixed a bug that resulted in bash not terminating immediately if a
+ terminating signal was received while performing output.
+
+f. Fixed a bug that caused the shell to crash after creating 256 process
+ substitutions during word completion.
+
+2. Changes to Readline
+
+a. Fixed a bug that caused redisplay errors when using prompts with invisible
+ characters and numeric arguments to a command in a multibyte locale.
+
+b. Fixed a bug that caused redisplay errors when using prompts with invisible
+ characters spanning more than two physical screen lines.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-4.0-beta,
+and the previous version, bash-4.0-alpha.
+
+1. Changes to Bash
+
+a. Fixed a typo that caused a variable to be used before initialization
+ while parsing Posix-style command substitutions.
+
+b. Fixed a bug that caused stray ^? when the expansion of a parameter used
+ as part of a pattern removal expansion is empty, but part of a non-
+ empty string.
+
+c. Fixed a bug that could cause strings not converted to numbers by strtol
+ to be treated as if the conversion had been successful.
+
+d. The `return' builtin now accepts no options and requires a `--' before
+ a negative return value, as Posix requires.
+
+e. Fixed a bug that caused local variables to be created with the empty
+ string for a value rather than no value.
+
+f. Changed behavior so the shell now acts as if it received an interrupt
+ when a pipeline is killed by SIGINT while executing a list.
+
+g. Fixed a bug that caused `declare var' and `typeset var' to initialize
+ `var' to the empty string.
+
+h. Changed `bind' builtin to print a warning but proceed if invoked when
+ line editing is not active.
+
+i. Fixed a bug that caused the shell to exit when the `errexit' option is
+ set and a command in a pipeline returns a non-zero exit status.
+
+j. Fixed a bug that caused the shell to not run the exit trap in a command
+ run with `bash -c' under some circumstances.
+
+k. Fixed a bug that caused parser errors to occasionally not set $? when
+ running commands with `eval'.
+
+l. Fixed a bug that caused stray control characters when evaluating compound
+ array assignments containing $'\x7f' escapes.
+
+m. Fixed a bug that caused redirections involving file descriptor 10 as the
+ target to behave incorrectly.
+
+n. Fixed a bug that could cause memory to be freed multiple times when
+ assigning to COMP_WORDBREAKS.
+
+o. Fixed a bug that could cause NULL pointer dereferences when COMP_WORDBREAKS
+ was unset.
+
+2. Changes to Readline
+
+3. New Features in Bash
+
+a. A value of 0 for the -t option to `read' now returns success if there is
+ input available to be read from the specified file descriptor.
+
+b. CDPATH and GLOBIGNORE are ignored when the shell is running in privileged
+ mode.
+
+c. New bindable readline functions shell-forward-word and shell-backward-word,
+ which move forward and backward words delimited by shell metacharacters
+ and honor shell quoting.
+
+d. New bindable readline functions shell-backward-kill-word and shell-kill-word
+ which kill words backward and forward, but use the same word boundaries
+ as shell-forward-word and shell-backward-word.
+
+4. New Features in Readline
+
+a. If the kernel supports it, readline displays special characters
+ corresponding to a keyboard-generated signal when the signal is received.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-4.0-alpha,
+and the previous version, bash-3.2-release.
+
+1. Changes to Bash
+
+a. Fixed several bugs in old-style `` command substitution parsing, including
+ comment parsing and quoted string handling.
+
+b. Fixed problems parsing arguments to the [[ command's =~ regular expression
+ matching operator: metacharacter and whitespace parsing.
+
+c. Fixed a bug that caused the shell to inappropriately reuse high-numbered
+ file descriptors it used internally.
+
+d. Fixed a bug in pattern replacement word expansions that caused a `/' as
+ the first character of an expanded pattern to be mistaken for a global
+ replacement specifier.
+
+e. Fixed several problems with the asprintf and snprintf replacement functions
+ that caused hangs and crashes.
+
+f. Fixed a bug in the calculation of the current and previous job that caused
+ it to refer to incorrect jobs.
+
+g. Fixed a bug in the check for the validity of a hashed command pathname that
+ caused unnecessary hash table deletions and additions.
+
+h. Fixed a bug that caused child processes to inherit the wrong value for $!.
+
+i. Fixed a bug that caused `.' to fail to read and execute commands from non-
+ regular files such as devices or named pipes.
+
+j. Fixed a bug in printf formatting for the %x and %X expansions that occurred
+ on some systems.
+
+k. Fixed a bug that caused the shell to crash when creating temporary files if
+ $TMPDIR named a non-writable directory.
+
+l. Fixed a bug that caused the shell to ignore $TMPDIR when creating temporary
+ files under some circumstances.
+
+m. Fixed a bug that caused named pipes created by process substitution to not
+ be cleaned up.
+
+n. Fixed a bug that caused HISTTIMEFORMAT to not be honored when it appeared
+ in the initial shell environment.
+
+o. Fixed several bugs in the expansion of $* and $@ (quoted and unquoted)
+ when IFS is null or contains non-whitespace characters; the same changes
+ apply to arrays subscripted with * or @.
+
+p. Fixed several problems with pattern substitution expansions on the
+ positional parameters and arrays subscripted with * or @ that occurred
+ when $IFS was set to the empty string.
+
+q. Made a change to the default locale initialization code that should
+ result in better behavior from the locale-aware library functions.
+
+r. Fixed a bug that caused compacting the jobs list to drop jobs.
+
+s. Fixed a bug that caused jumps back to the top-level processing loop from
+ a builtin command to leave the shell in an inconsistent state.
+
+t. Fixed a bug that caused characters that would be escaped internally to be
+ doubled when escaped with a backslash.
+
+u. Fixed the initialization of mailboxes to not cause maildirs to be read
+ (and stat(2) called for every message file) at shell startup.
+
+v. Fixed a bug that caused the shell to not display $PS2 when the read builtin
+ reads a line continued with a backslash.
+
+w. Fixed a bug that caused errors in word splitting when $IFS contained
+ characters used for internal quoting.
+
+x. Fixed bugs that caused problems with output from shell builtins not being
+ completely displayed on some systems.
+
+y. Fixed a bug that caused output to be lost when a redirection is acting on
+ the shell's output file descriptor.
+
+z. Fixed bugs caused by shell builtins not checking for all write errors.
+
+aa. Fixed a problem that caused the shell to dump core if expansions on the
+ pattern passed to the pattern removal word expansions resulted in expansion
+ errors.
+
+bb. Fixed a bug that caused bash to loop infinitely after creating and
+ waiting for 4096 jobs.
+
+cc. Fixed a bug that caused bash to lose the status of a background job under
+ certain circumstances.
+
+dd. Fixed a bug that caused bash to not look in the temporary environment
+ when performing variable lookup under certain circumstances.
+
+ee. Fixed a bug that caused bash to close file descriptors greater than 10
+ when they were used in redirections.
+
+ff. Fixed a problem that caused the shell to attempt to read from the standard
+ input when called as `bash -i script'.
+
+gg. Fixed a memory leak and variable initialization problems when the -v option
+ was supplied to `printf' that could cause incorrect results.
+
+hh. Fixed a bug that caused the `read' builtin to count bytes when the -n option
+ was supplied, rather than (possibly multibyte) characters.
+
+ii. Fixed a bug when displaying a function due to not converting the function
+ to an external form.
+
+jj. Changed job control initialization to ensure that the shell has a tty
+ as its controlling terminal before enabling job control.
+
+kk. Fixed a bug with the `test' builtin that caused it to misinterpret
+ arguments beginning with `-' but containing more than one character.
+
+ll. Fixed bug that could cause the shell to dump core in certain cases where
+ a command sets the SIGINT disposition to the default.
+
+mm. Fixed a bug in the pattern replacement (affecting both word expansion
+ and the `fc' builtin) that occurred when the pattern and replacement
+ strings were empty.
+
+nn. Fixed a bug that caused an arithmetic evaluation error to disable all
+ further evaluation.
+
+oo. Fixed a bug in pathname expansion that caused it to interpret backslashes
+ in the pathname as quoting characters.
+
+pp. Fixed a bug in the replacement getcwd() implementation that could cause
+ memory to be overwritten.
+
+qq. When in Posix mode, the `ulimit' builtin now uses a block size of 512 for
+ the `-c' and `-f' options.
+
+rr. Brace expansion now allows process substitutions to pass through unchanged.
+
+ss. Fixed a problem in the command name completion code to avoid quoting
+ escaped special characters twice when the command name begins with a tilde.
+
+tt. Fixed a problem in the printf builtin that resulted in single-byte
+ output for the "'" escape, even when using multibyte characters.
+
+uu. Fixed a bug that caused the failure exit status to be lost when redirections
+ attached to a compound command failed.
+
+vv. Fixed a bug that caused the internal random number generator to not be
+ re-seeded correctly when creating a subshell.
+
+ww. Fixed a bug that could cause the bash replacement getcwd to overwrite
+ memory.
+
+xx. Fixed a bug that caused the shell to not receive SIGINT if it was sent
+ while the shell was waiting for a command substitution to terminate, and
+ make sure the exit status is correct when it does.
+
+yy. Fixed a bug that resulted in the second and subsequent children spawned
+ by a shell begun to run a command substitution being placed into the
+ wrong process group.
+
+zz. Fixed a bug that caused the results of successful tilde expansion to be
+ subject to pathname expansion and word splitting.
+
+aaa. Fixed a bug that could cause the shell to hang if it encountered an
+ error that caused it to jump back to the top processing loop during a
+ command substitution or `eval' command.
+
+bbb. Fixed a bug that caused the `read' builtin to use the tty's attributes
+ instead of those of the file descriptor passed with the -u option when
+ processing the -n and -d options.
+
+ccc. Fixed a bug that caused incorrect expansion of ${array[@]:foo} if the
+ first character of $IFS was not whitespace.
+
+ddd. Fixed a bug that occurred when scanning for the ending delimiter of a
+ ${parameter/pat/sub} expansion.
+
+eee. Fixed a bug that caused the shell to inappropriately expand command
+ substitutions in words when expanding directory names for completion.
+
+fff. Fixed a bug that caused the `fc' builtin to look too far back in the
+ history list under certain circumstances.
+
+ggg. Fixed a bug that caused a shell running in Posix mode to search $PWD for
+ a file specified as an argument to source/. when the file was not found
+ in $PATH.
+
+hhh. Fixed a bug that caused the shell to modify the case of a command word
+ found via command completion when the shell was performing case-
+ insensitive completion.
+
+iii. Fixed a bug that caused the shell to search $PATH for an argument to
+ source/. even when it contained a `/'.
+
+jjj. Fixed a bug that caused brace expansion to misorder expansions when the
+ locale did not have a collating order like aAbBcC...zZ.
+
+kkk. Fixed a bug that did not allow `set +o history' to have any effect when
+ run in a startup file or from a sourced file.
+
+lll. Fixed a bug with the precedence of the ?: conditional arithmetic operator.
+
+mmm. Fixed a bug that caused side effects of temporary variable assignments
+ to persist in the shell environment.
+
+nnn. Fixed a bug that caused the terminal to be left in non-canonical mode
+ when using editing commands that invoke the an editor on the current
+ command line.
+
+ooo. Fixed a bug that caused globbing characters and characters in $IFS to not
+ be quoted appropriately when displaying assignment statements.
+
+ppp. Fixed a bug that caused the `-e' option to be inherited when sourcing a
+ file or evaluating a command with `eval' even if the return value of the
+ command was supposed to be ignored.
+
+qqq. Fixed a bug that caused the shell to attempt to created variables with
+ invalid names if such names appeared in the initial environment.
+
+rrr. Fixed a bug with quote removal in strings where the final character is a
+ backslash.
+
+sss. Fixed a bug that caused the effects of special variables to persist even
+ when the variables were unset as part of the shell reinitializing itself
+ to execute a shell script.
+
+ttt. Fixed a bug that caused the history to not be saved after `history -c' or
+ `history -d' was executed until a sufficient number of commands had been
+ saved to the history.
+
+uuu. Bash now parses command substitutions according to Posix rules: parsing
+ the command contained in $() to find the closing delimiter.
+
+vvv. Fixed a bug that caused traps on SIGCHLD set in a SIGCHLD handler to
+ not persist.
+
+www. Fixed a bug that didn't allow SIGCHLD to interrupt the `wait' builtin
+ as Posix specifies.
+
+xxx. Invalid numeric arguments to shell builtins no longer cause the shell to
+ short-circuit any executing compound command.
+
+yyy. Fixed a bug that caused the exit status to be lost when `break' was
+ used to short-circuit a loop's execution.
+
+zzz. Fixed a bug that caused stray ^? characters to be left in expansions of
+ "${array[*]}".
+
+aaaa. Bash now prints better error messages for here documents terminated by
+ EOF and for identifying the incorrect token in an invalid arithmetic
+ expression.
+
+bbbb. Fixed a bug in the variable length word expansion that caused it to
+ incorrectly calculate the number of multibyte characters.
+
+cccc. Fixed a race condition that could result in the top-level shell setting
+ the terminal's process group to an incorrect value if the process
+ group was changed by a child of a child of the shell.
+
+dddd. Fixed a bug that caused here documents belonging to commands within a
+ compound command to be displayed in a syntactially-incorrect form, which
+ prevented them from being re-read as input.
+
+eeee. The shell displays more warnings about failures to set the locale.
+
+ffff. Fixed a bug that caused the body of a here-document to not be saved to
+ the history list.
+
+gggg. Fixed a bug that caused configure to incorrectly conclude that FreeBSD
+ had /dev/fd available, resulting in problems with process substitution.
+
+2. Changes to Readline
+
+a. Fixed a number of redisplay errors in environments supporting multibyte
+ characters.
+
+b. Fixed bugs in vi command mode that caused motion commands to inappropriately
+ set the mark.
+
+c. When using the arrow keys in vi insertion mode, readline allows movement
+ beyond the current end of the line (unlike command mode).
+
+d. Fixed bugs that caused readline to loop when the terminal has been taken
+ away and reads return -1/EIO.
+
+e. Fixed bugs in redisplay occurring when displaying prompts containing
+ invisible characters.
+
+f. Fixed a bug that caused the completion append character to not be reset to
+ the default after an application-specified completion function changed it.
+
+g. Fixed a problem that caused incorrect positioning of the cursor while in
+ emacs editing mode when moving forward at the end of a line while using
+ a locale supporting multibyte characters.
+
+h. Fixed an off-by-one error that caused readline to drop every 511th
+ character of buffered input.
+
+i. Fixed a bug that resulted in SIGTERM not being caught or cleaned up.
+
+j. Fixed redisplay bugs caused by multiline prompts with invisible characters
+ or no characters following the final newline.
+
+k. Fixed redisplay bug caused by prompts consisting solely of invisible
+ characters.
+
+l. Fixed a bug in the code that buffers characters received very quickly in
+ succession which caused characters to be dropped.
+
+m. Fixed a bug that caused readline to reference uninitialized data structures
+ if it received a SIGWINCH before completing initialzation.
+
+n. Fixed a bug that caused the vi-mode `last command' to be set incorrectly
+ and therefore unrepeatable.
+
+o. Fixed a bug that caused readline to disable echoing when it was being used
+ with an output file descriptor that was not a terminal.
+
+p. Readline now blocks SIGINT while manipulating internal data structures
+ during redisplay.
+
+q. Fixed a bug in redisplay that caused readline to segfault when pasting a
+ very long line (over 130,000 characters).
+
+r. Fixed bugs in redisplay when using prompts with no visible printing
+ characters.
+
+3. New Features in Bash
+
+a. When using substring expansion on the positional parameters, a starting
+ index of 0 now causes $0 to be prefixed to the list.
+
+b. The `help' builtin now prints its columns with entries sorted vertically
+ rather than horizontally.
+
+c. There is a new variable, $BASHPID, which always returns the process id of
+ the current shell.
+
+d. There is a new `autocd' option that, when enabled, causes bash to attempt
+ to `cd' to a directory name that is supplied as the first word of a
+ simple command.
+
+e. There is a new `checkjobs' option that causes the shell to check for and
+ report any running or stopped jobs at exit.
+
+f. The programmable completion code exports a new COMP_TYPE variable, set to
+ a character describing the type of completion being attempted.
+
+g. The programmable completion code exports a new COMP_KEY variable, set to
+ the character that caused the completion to be invoked (e.g., TAB).
+
+h. If creation of a child process fails due to insufficient resources, bash
+ will try again several times before reporting failure.
+
+i. The programmable completion code now uses the same set of characters as
+ readline when breaking the command line into a list of words.
+
+j. The block multiplier for the ulimit -c and -f options is now 512 when in
+ Posix mode, as Posix specifies.
+
+k. Changed the behavior of the read builtin to save any partial input received
+ in the specified variable when the read builtin times out. This also
+ results in variables specified as arguments to read to be set to the empty
+ string when there is no input available. When the read builtin times out,
+ it returns an exit status greater than 128.
+
+l. The shell now has the notion of a `compatibility level', controlled by
+ new variables settable by `shopt'. Setting this variable currently
+ restores the bash-3.1 behavior when processing quoted strings on the rhs
+ of the `=~' operator to the `[[' command.
+
+m. The `ulimit' builtin now has new -b (socket buffer size) and -T (number
+ of threads) options.
+
+n. The -p option to `declare' now displays all variable values and attributes
+ (or function values and attributes if used with -f).
+
+o. There is a new `compopt' builtin that allows completion functions to modify
+ completion options for existing completions or the completion currently
+ being executed.
+
+p. The `read' builtin has a new -i option which inserts text into the reply
+ buffer when using readline.
+
+q. A new `-E' option to the complete builtin allows control of the default
+ behavior for completion on an empty line.
+
+r. There is now limited support for completing command name words containing
+ globbing characters.
+
+s. Changed format of internal help documentation for all builtins to roughly
+ follow man page format.
+
+t. The `help' builtin now has a new -d option, to display a short description,
+ and a -m option, to print help information in a man page-like format.
+
+u. There is a new `mapfile' builtin to populate an array with lines from a
+ given file.
+
+v. If a command is not found, the shell attempts to execute a shell function
+ named `command_not_found_handle', supplying the command words as the
+ function arguments.
+
+w. There is a new shell option: `globstar'. When enabled, the globbing code
+ treats `**' specially -- it matches all directories (and files within
+ them, when appropriate) recursively.
+
+x. There is a new shell option: `dirspell'. When enabled, the filename
+ completion code performs spelling correction on directory names during
+ completion.
+
+y. The `-t' option to the `read' builtin now supports fractional timeout
+ values.
+
+z. Brace expansion now allows zero-padding of expanded numeric values and
+ will add the proper number of zeroes to make sure all values contain the
+ same number of digits.
+
+aa. There is a new bash-specific bindable readline function: `dabbrev-expand'.
+ It uses menu completion on a set of words taken from the history list.
+
+bb. The command assigned to a key sequence with `bind -x' now sets two new
+ variables in the environment of the executed command: READLINE_LINE_BUFFER
+ and READLINE_POINT. The command can change the current readline line
+ and cursor position by modifying READLINE_LINE_BUFFER and READLINE_POINT,
+ respectively.
+
+cc. There is a new &>> redirection operator, which appends the standard output
+ and standard error to the named file.
+
+dd. The parser now understands `|&' as a synonym for `2>&1 |', which redirects
+ the standard error for a command through a pipe.
+
+ee. The new `;&' case statement action list terminator causes execution to
+ continue with the action associated with the next pattern in the
+ statement rather than terminating the command.
+
+ff. The new `;;&' case statement action list terminator causes the shell to
+ test the next set of patterns after completing execution of the current
+ action, rather than terminating the command.
+
+gg. The shell understands a new variable: PROMPT_DIRTRIM. When set to an
+ integer value greater than zero, prompt expansion of \w and \W will
+ retain only that number of trailing pathname components and replace
+ the intervening characters with `...'.
+
+hh. There are new case-modifying word expansions: uppercase (^[^]) and
+ lowercase (,[,]). They can work on either the first character or
+ array element, or globally. They accept an optional shell pattern
+ that determines which characters to modify. There is an optionally-
+ configured feature to include capitalization operators.
+
+ii. The shell provides associative array variables, with the appropriate
+ support to create, delete, assign values to, and expand them.
+
+jj. The `declare' builtin now has new -l (convert value to lowercase upon
+ assignment) and -u (convert value to uppercase upon assignment) options.
+ There is an optionally-configurable -c option to capitalize a value at
+ assignment.
+
+kk. There is a new `coproc' reserved word that specifies a coprocess: an
+ asynchronous command run with two pipes connected to the creating shell.
+ Coprocs can be named. The input and output file descriptors and the
+ PID of the coprocess are available to the calling shell in variables
+ with coproc-specific names.
+
+4. New Features in Readline
+
+a. A new variable, rl_sort_completion_matches; allows applications to inhibit
+ match list sorting (but beware: some things don't work right if
+ applications do this).
+
+b. A new variable, rl_completion_invoking_key; allows applications to discover
+ the key that invoked rl_complete or rl_menu_complete.
+
+c. The functions rl_block_sigint and rl_release_sigint are now public and
+ available to calling applications who want to protect critical sections
+ (like redisplay).
+
+d. The functions rl_save_state and rl_restore_state are now public and
+ available to calling applications; documented rest of readline's state
+ flag values.
+
+e. A new user-settable variable, `history-size', allows setting the maximum
+ number of entries in the history list.
+
+f. There is a new implementation of menu completion, with several improvements
+ over the old; the most notable improvement is a better `completions
+ browsing' mode.
+
+g. The menu completion code now uses the rl_menu_completion_entry_function
+ variable, allowing applications to provide their own menu completion
+ generators.
+
+h. There is support for replacing a prefix of a pathname with a `...' when
+ displaying possible completions. This is controllable by setting the
+ `completion-prefix-display-length' variable. Matches with a common prefix
+ longer than this value have the common prefix replaced with `...'.
+
+i. There is a new `revert-all-at-newline' variable. If enabled, readline will
+ undo all outstanding changes to all history lines when `accept-line' is
+ executed.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-3.2-release,
+and the previous version, bash-3.2-beta.
+
+1. Changes to Bash
+
+a. Fixed a bug that caused the temporary environment passed to a command to
+ affect the shell's environment under certain circumstances.
+
+b. Fixed a bug in the printf builtin that caused the %q format specifier to
+ ignore empty string arguments.
+
+c. Improved multibyte character environment detection at configuration time.
+
+d. Fixed a bug in the read builtin that left spurious escape characters in the
+ input after processing backslashes when assigning to an array variable.
+
+2. Changes to Readline
+
+a. Fixed a redisplay bug that occurred in multibyte-capable locales when the
+ prompt was one character longer than the screen width.
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-3.2-beta,
+and the previous version, bash-3.2-alpha.
+
+1. Changes to Bash
+
+a. Changed the lexical analyzer to treat locale-specific blank characters as
+ white space.
+
+b. Fixed a bug in command printing to avoid confusion between redirections and
+ process substitution.
+
+c. Fixed problems with cross-compiling originating from inherited environment
+ variables.
+
+d. Added write error reporting to printf builtin.
+
+e. Fixed a bug in the variable expansion code that could cause a core dump in
+ a multi-byte locale.
+
+f. Fixed a bug that caused substring expansion of a null string to return
+ incorrect results.
+
+g. BASH_COMMAND now retains its previous value while executing commands as the
+ result of a trap, as the documentation states.
+
+2. Changes to Readline
+
+a. Fixed a bug with prompt redisplay in a multi-byte locale to avoid redrawing
+ the prompt and input line multiple times.
+
+b. Fixed history expansion to not be confused by here-string redirection.
+
+c. Readline no longer treats read errors by converting them to newlines, as
+ it does with EOF. This caused partial lines to be returned from readline().
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-3.2-alpha,
+and the previous version, bash-3.1-release.
+
+1. Changes to Bash
+
+a. Fixed a source bug that caused the minimal configuration to not compile.
+
+b. Fixed memory leaks in error handling for the `read' builtin.
+
+c. Changed the [[ and (( compound commands to set PIPESTATUS with their exit
+ status.
+
+d. Fixed some parsing problems with compound array assignments.
+
+e. Added additional configuration changes for: NetBSD (incomplete multibyte
+ character support)
+
+f. Fixed two bugs with local array variable creation when shadowing a variable
+ of the same name from a previous context.
+
+g. Fixed the `read' builtin to restore the correct set of completion functions
+ if a timeout occurs.
+
+h. Added code to defer the initialization of HISTSIZE (and its stifling of the
+ history list) until the history file is loaded, allowing a startup file to
+ override the default value.
+
+i. Tightened up the arithmetic expression parsing to produce better error
+ messages when presented with invalid operators.
+
+j. Fixed the cross-compilation support to build the signal list at shell
+ invocation rather than compile time if cross-compiling.
+
+k. Fixed multibyte support for non-gcc compilers (or compilers that do not
+ allow automatic array variable sizing based on a non-constant value).
+
+l. Several fixes to the code that manages the list of terminated jobs and
+ their exit statuses, and the list of active and recently-terminated jobs
+ to avoid pid aliasing/wraparound and allocation errors.
+
+m. Fixed a problem that allowed scripts to die due to SIGINT while waiting
+ for children, even when started in the background or otherwise ignoring
+ SIGINT.
+
+n. Fixed a bug that caused shells invoked as -/bin/bash from not being
+ recognized as login shells.
+
+o. Fixed a problem that caused shells in the background to give the terminal
+ to a process group other than the foreground shell process group.
+
+p. Fixed a problem with extracting the `varname' in ${#varname}.
+
+q. Fixed the code that handles SIGQUIT to not exit immediately -- thereby
+ calling functions that may not be called in a signal handler context --
+ but set a flag and exit afterward (like SIGINT).
+
+r. Changed the brace expansion code to skip over braces that don't begin a
+ valid matched brace expansion construct.
+
+s. Fixed `typeset' and `declare' to not require that their shell function
+ operands to be valid shell identifiers.
+
+t. Changed `test' to use access(2) with a temporary uid/euid swap when testing
+ file attributes and running setuid, and access(2) in most other cases.
+
+u. Changed completion code to not attempt command name completion on a line
+ consisting solely of whitespace when no_empty_command_completion is set.
+
+v. The `hash' builtin now prints nothing in posix mode when the hash table is
+ empty, and prints a message to that effect to stdout instead of stderr
+ when not in posix mode.
+
+w. Fixed a bug in the extended pattern matching code that caused it to fail to
+ match periods with certain patterns.
+
+x. Fixed a bug that caused the shell to dump core when performing filename
+ generation in directories with thousands of files.
+
+y. Returned to the original Bourne shell rules for parsing ``: no recursive
+ parsing of embedded quoted strings or ${...} constructs.
+
+z. The inheritence of the DEBUG, RETURN, and ERR traps is now dependent only
+ on the settings of the `functrace' and `errtrace' shell options, rather
+ than whether or not the shell is in debugging mode.
+
+aa. Fixed a problem with $HOME being converted to ~ in the expansion of
+ members of the DIRSTACK array.
+
+bb. Fixed a problem with quoted arguments to arithmetic expansions in certain
+ constructs.
+
+cc. The command word completion code now no longer returns matching directories
+ while searching $PATH.
+
+dd. Fixed a bug with zero-padding and precision handling in snprintf()
+ replacement.
+
+ee. Fixed a bug that caused the command substitution code not to take embedded
+ shell comments into account.
+
+ff. Fixed a bug that caused $((...);(...)) to be misinterpreted as an
+ arithmetic substitution.
+
+gg. Fixed a bug in the prompt expansion code that inappropriately added a
+ \001 before a \002 under certain circumstances.
+
+hh. Fixed a bug that caused `unset LANG' to not properly reset the locale
+ (previous versions would set the locale back to what it was when bash
+ was started rather than the system's "native" locale).
+
+ii. Fixed a bug that could cause file descriptors > 10 to not be closed even
+ when closed explicitly by a script.
+
+jj. Fixed a bug that caused single quotes to be stripped from ANSI-C quoting
+ inside double-quoted command substitutions.
+
+kk. Fixed a bug that could cause core dumps when `return' was executed as the
+ last element of a pipeline inside a shell function.
+
+ll. Fixed a bug that caused DEBUG trap strings to overwrite commands stored in
+ the jobs list.
+
+2. Changes to Readline
+
+a. Fixed a problem that caused segmentation faults when using readline in
+ callback mode and typing consecutive DEL characters on an empty line.
+
+b. Fixed several redisplay problems with multibyte characters, all having to
+ do with the different code paths and variable meanings between single-byte
+ and multibyte character redisplay.
+
+c. Fixed a problem with key sequence translation when presented with the
+ sequence \M-\C-x.
+
+d. Fixed a problem that prevented the `a' command in vi mode from being
+ undone and redone properly.
+
+e. Fixed a problem that prevented empty inserts in vi mode from being undone
+ properly.
+
+f. Fixed a problem that caused readline to initialize with an incorrect idea
+ of whether or not the terminal can autowrap.
+
+g. Fixed output of key bindings (like bash `bind -p') to honor the setting of
+ convert-meta and use \e where appropriate.
+
+h. Changed the default filename completion function to call the filename
+ dequoting function if the directory completion hook isn't set. This means
+ that any directory completion hooks need to dequote the directory name,
+ since application-specific hooks need to know how the word was quoted,
+ even if no other changes are made.
+
+i. Fixed a bug with creating the prompt for a non-interactive search string
+ when there are non-printing characters in the primary prompt.
+
+j. Fixed a bug that caused prompts with invisible characters to be redrawn
+ multiple times in a multibyte locale.
+
+k. Fixed a bug that could cause the key sequence scanning code to return the
+ wrong function.
+
+l. Fixed a problem with the callback interface that caused it to fail when
+ using multi-character keyboard macros.
+
+m. Fixed a bug that could cause a core dump when an edited history entry was
+ re-executed under certain conditions.
+
+n. Fixed a bug that caused readline to reference freed memory when attmpting
+ to display a portion of the prompt.
+
+3. New Features in Bash
+
+a. Changed the parameter pattern replacement functions to not anchor the
+ pattern at the beginning of the string if doing global replacement - that
+ combination doesn't make any sense.
+
+b. When running in `word expansion only' mode (--wordexp option), inhibit
+ process substitution.
+
+c. Loadable builtins now work on MacOS X 10.[34].
+
+d. Shells running in posix mode no longer set $HOME, as POSIX requires.
+
+e. The code that checks for binary files being executed as shell scripts now
+ checks only for NUL rather than any non-printing character.
+
+f. Quoting the string argument to the [[ command's =~ operator now forces
+ string matching, as with the other pattern-matching operators.
+
+4. New Features in Readline
+
+a. Calling applications can now set the keyboard timeout to 0, allowing
+ poll-like behavior.
+
+b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
+ the default last-ditch startup file.
+
+c. The history file reading functions now allow windows-like \r\n line
+ terminators.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-3.1-release,
+and the previous version, bash-3.1-rc2.
+
+1. Changes to Readline
+
+a. Several changes to the multibyte redisplay code to fix problems with
+ prompts containing invisible characters.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-3.1-rc2,
+and the previous version, bash-3.1-rc1.
+
+1. Changes to Bash
+
+a. Fixed a bug that caused a DEBUG trap to overwrite a command string that's
+ eventually attached to a background job.
+
+b. Changed some code so that filenames with leading tildes with spaces in the
+ name aren't tilde-expanded by the bash completion code.
+
+c. Fixed a bug that caused the pushd builtin to fail to change to
+ directories with leading `-'.
+
+d. Fixed a small memory leak in the programmable completion code.
+
+2. Changes to Readline
+
+a. Fixed a redisplay bug caused by moving the cursor vertically to a line
+ with invisible characters in the prompt in a multibyte locale.
+
+b. Fixed a bug that could cause the terminal special chars to be bound in the
+ wrong keymap in vi mode.
+
+3. New Features in Bash
+
+a. If compiled for strict POSIX conformance, LINES and COLUMNS may now
+ override the true terminal size.
+
+4. New Features in Readline
+
+a. A new external application-controllable variable that allows the LINES
+ and COLUMNS environment variables to set the window size regardless of
+ what the kernel returns.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-3.1-rc1,
+and the previous version, bash-3.1-beta1.
+
+1. Changes to Bash
+
+a. Fixed a bug that could cause core dumps due to accessing the current
+ pipeline while in the middle of modifying it.
+
+b. Fixed a bug that caused pathnames with backslashes still quoting characters
+ to be passed to opendir().
+
+c. Command word completion now obeys the setting of completion-ignore-case.
+
+d. Fixed a problem with redirection that caused file descriptors greater than
+ 2 to be inappropriately marked as close-on-exec.
+
+e. In Posix mode, after `wait' is called to wait for a particular process
+ explicitly, that process is removed from the list of processes known to
+ the shell, and subsequent attempts to wait for it return errors.
+
+f. Fixed a bug that caused extended pattern matching to incorrectly scan
+ backslash-escaped pattern characters.
+
+g. Fixed a synchronization problem that could cause core dumps when handling
+ a SIGWINCH.
+
+h. Fixed a bug that caused an unmatched backquote to be accepted without an
+ error when processing here documents.
+
+i. Fixed a small memory leak in the `cd' builtin.
+
+j. Fix for MacOS X so it gets the values for the HOSTTYPE, MACHTYPE, and
+ OSTYPE variables at build time, to support universal binaries.
+
+k. Fixed a bug that could cause an exit trap to return the exit status of
+ the trap command rather than the status as it was before the trap was
+ run as the shell's exit status.
+
+2. New Features in Bash
+
+3. Changes to Readline
+
+a. Fixed a bug that caused reversing the incremental search direction to
+ not work correctly.
+
+b. Fixed the vi-mode `U' command to only undo up to the first time insert mode
+ was entered, as Posix specifies.
+
+c. Fixed a bug in the vi-mode `r' command that left the cursor in the wrong
+ place.
+
+4. New Features in Readline
+
+a. New application-callable auxiliary function, rl_variable_value, returns
+ a string corresponding to a readline variable's value.
+
+b. When parsing inputrc files and variable binding commands, the parser
+ strips trailing whitespace from values assigned to boolean variables
+ before checking them.
+
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-3.1-beta1,
+and the previous version, bash-3.1-alpha1.
+
+1. Changes to Bash
+
+a. Added some system-specific signal names.
+
+b. Fixed a typo in the ulimit builtin to make `x' the right option to
+ maniuplate the limit on file locks.
+
+c. Fixed a problem with using += to append to index 0 of an array variable
+ when not using subscript syntax.
+
+d. A few changes to configure.in to remove calls to obsolete or outdated
+ macros.
+
+e. Make sure changes to variables bash handles specially (e.g., LC_ALL) are
+ made when the variable is set in the temporary environment to a command.
+
+f. Make sure changes to variables bash handles specially (e.g., LC_ALL) are
+ made when the variable is modified using `printf -v'.
+
+g. The export environment is now remade on cygwin when HOME is changed, so
+ DLLs bash is linked against pick up the new value. This fixes problems
+ with tilde expansion when linking against and already-installed readline.
+
+h. Small fix to the logic for performing tilde expansion in posix mode, so
+ expansion on the right-hand side of an assignment statement takes place.
+
+i. Fixed a bug that prevented redirections associated with a shell function
+ from being executed when in a subshell.
+
+j. Fixed `source' and `.' builtins to not require an executable file when
+ searching $PATH for a file to source.
+
+k. Fixed a bug that caused incorrect word splitting in a function when IFS
+ was declared local, then unset.
+
+l. Fixed a problem with the `kill' builtin that prevented sending signals
+ to a process group under certain circumstances when providing a pid < 0.
+
+m. When in POSIX mode, `pwd' now checks that the value it prints is the same
+ directory as `.', even when displaying $PWD.
+
+n. Fixed a problem with the `read' builtin when reading a script from standard
+ input and reading data from the same file.
+
+o. Fixed a problem with the `type' and `command' builtins that caused absolute
+ pathnames to be displayed incorrectly.
+
+p. Some changes to the `bg' builtin for POSIX conformance.
+
+q. The `fc' builtin now removes the `fc' command that caused it to invoke an
+ editor on specified history entries from the history entirely, rather than
+ simply ignoring it.
+
+r. When in POSIX mode, the `v' command in vi editing mode simply invokes vi
+ on the current command, rather than checking $FCEDIT and $EDITOR.
+
+s. Fixed a small memory leak in the pathname canonicalization code.
+
+t. Fixed a bug that caused the expanded value of a $'...' string to be
+ incorrectly re-quoted if it occurred within a double-quoted ${...}
+ parameter expansion.
+
+u. Restored default emacs-mode key binding of M-TAB to dynamic-complete-history.
+
+v. Fixed a bug that caused core dumps when interrupting loops running builtins
+ on some systems.
+
+w. Make sure that some of the functions bash provides replacements for are
+ not cpp defines.
+
+x. The code that scans embedded commands for the parser (`...` and $(...)) is
+ now more aware of embedded comments and their effect on quoted strings.
+
+y. Changed the `-n' option to the `history' builtin to not reset the number of
+ history lines read in the current session after reading the new lines from
+ the history file if the history is being appended when it is written to
+ the file, since the appending takes care of the problem that the adjustment
+ was intended to solve.
+
+z. Improved the error message displayed when a shell script fails to execute
+ because the environment and size of command line arguments are too large.
+
+aa. A small fix to make sure that $HISTCMD is evaluated whenever the shell is
+ saving commands to the history list, not just when HISTSIZE is defined.
+
+2. Changes to Readline
+
+a. The `change-case' command now correctly changes the case of multibyte
+ characters.
+
+b. Changes to the shared library construction scripts to deal with Windows
+ DLL naming conventions for Cygwin.
+
+c. Fixed the redisplay code to avoid core dumps resulting from a poorly-timed
+ SIGWINCH.
+
+d. Fixed the non-incremental search code in vi mode to dispose of any current
+ undo list when copying a line from the history into the current editing
+ buffer.
+
+e. The variable assignment code now ignores whitespace at the end of lines
+ when assigning to boolean variables.
+
+f. The `C-w' binding in incremental search now understands multibyte
+ characters.
+
+3. New Features in Bash
+
+a. A new configuration option, `--enable-strict-posix-default', which will
+ build bash to be POSIX conforming by default.
+
+4. New Features in Readline
+
+a. If the rl_completion_query_items is set to a value < 0, readline never
+ asks the user whether or not to view the possible completions.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-3.1-alpha1,
+and the previous version, bash-3.0-release.
+
+1. Changes to Bash
+
+a. Fixed a bug that caused bash to crash if referencing an unset local array.
+
+b. Fixed a problem that caused tilde expansion to not be performed before
+ attempting globbing word completion.
+
+c. Fixed an incompatibility so that a first argument to trap that's a valid
+ signal number will be trated as a signal rather than a command to execute.
+
+d. Fixed ${#word} expansion to correctly compute the length of a string
+ containing multibyte characters.
+
+e. Fixed a bug that caused bash to not pass the correct flags for signal
+ disposition to child processes.
+
+f. Fixed a bug that caused `fc -l' to list one too many history entries.
+
+g. Some fixes to `fc' for POSIX conformance.
+
+h. Some fixes to job status display for POSIX conformance.
+
+i. Fixed a bug that caused `command -v' to display output if a command was not
+ found -- it should be silent.
+
+j. In POSIX mode, `type' and `command -[vV]' do not report non-executable
+ files, even if the shell will attempt to execute them.
+
+k. Fixed a bug that caused the `==' operator to the [[ command to not attempt
+ extended pattern matching.
+
+l. Fixed the brace expansion code to handle characters whose value exceeds 128.
+
+m. Fixed `printf' to handle strings with a leading `\0' whose length is
+ non-zero.
+
+n. Fixed a couple of problems with brace expansion where `${' was handled
+ incorrectly.
+
+o. Fixed off-by-one error when calculating the upper bound of `offset' when
+ processing the ${array[@]:offset:length} expansion.
+
+p. System-specific configuration changes for: FreeBSD 5.x, Interix, MacOS X
+ 10.4, Linux 2.4+ kernels, Linux 3.x kernels, Dragonfly BSD, QNX 6.x,
+ Cygwin
+
+q. Fixed a bug that caused the shell to ignore the status of the rightmost
+ command in a pipeline when the `pipefail' option was enabled.
+
+r. Fixed a completion bug that caused core dumps when expanding a directory
+ name.
+
+s. Fixed a bug that prevented `hash -d' from removing commands from the hash
+ table.
+
+t. Fixed word splitting to avoid really bad quadratic performance when
+ expanding long lists.
+
+u. Fixed a bug that caused negative offsets in substring expansion to use the
+ wrong values.
+
+v. Fixed a bug in printf that caused it to not return failure on write errors.
+
+w. Fixed a bug that caused commands in subshells to not be properly timed.
+
+x. The shell parser no longer attempts to parse a compound assignment specially
+ unless in a position where an assignment statement is acceptable or parsing
+ arguments to a builtin that accepts assignment statements.
+
+y. Fixed a problem that caused a `case' statement to be added to the history
+ incorrectly as a single command if the `case word' was on one line and the
+ `in' on another.
+
+z. Fixed a problem that caused internal shell quoting characters to be
+ incorrectly quoted with backslashes under some circumstances.
+
+aa. The shell now performs correct word splitting when IFS contains multibyte
+ characters.
+
+bb. The mail checking code now resets the cached file information if the size
+ drops to 0, even if the times don't change.
+
+cc. A completed command name that is found in $PATH as well as the name of a
+ directory in the current directory no longer has a slash appended in certain
+ circumstances: a single instance found in $PATH when `.' is not in $PATH,
+ and multiple instances found in $PATH, even when `.' is in $PATH.
+
+dd. Incorporated tilde expansion into the word expansion code rather than as a
+ separately-called function, fixing some cases where it was performed
+ inappropriately (e.g., after the second `=' in an assignment statement or
+ in a double-quoted parameter expansion).
+
+ee. Fixed several bugs encountered when parsing compound assignment statements,
+ so that compound assignments appearing as arguments to builtins are no
+ longer double-expanded.
+
+ff. Fixed a bug in the command execution code that caused asynchronous commands
+ containing command substitutions to not put the terminal in the wrong
+ process group.
+
+gg. Bash now handles the case where the WCONTINUED flag causes waitpid() to
+ return -1/EINVAL at runtime as well as configuration time.
+
+hh. Fixed parser to generate an error when the pipeline `argument' to `!' or
+ `time' is NULL.
+
+ii. The shell now takes a little more care when manipulating file descriptors
+ greater than 9 with the `exec' builtin.
+
+jj. Fixed a bug that caused variable assignments preceding the `command' builtin
+ preceding a special builtin to be preserved after the command completed in
+ POSIX mode.
+
+kk. Fixed a bug that allowed variables beginning with a digit to be created.
+
+ll. Fixed a bug that caused a \<newline> to be removed when parsing a $'...'
+ construct.
+
+mm. A shell whose name begins with `-' will now be a restricted shell if the
+ remainder of the name indicates it should be restricted.
+
+nn. Fixed a bug that could cause a core dump if FUNCNAME were changed or unset
+ during a function's execution.
+
+oo. Fixed a bug that caused executing a `return' in a function to not execute
+ a RETURN trap. The RETURN trap is inherited by shell functions only if
+ function tracing is globally enabled or has been enabled for that function.
+
+pp. Fixed cases where var[@] was not handled exactly like var, when var is a
+ scalar variable.
+
+qq. Fixed a bug that caused the first character after a SIGINT to be discarded
+ under certain circumstances.
+
+rr. Fixed exit status code so that a suspended job returns 128+signal as its
+ exit status (preventing commands after it in `&&' lists from being
+ executed).
+
+ss. Fixed a bug that caused the shell parser state to be changed by executing
+ a shell function as a result of word completion.
+
+tt. Fixed a long-standing bug that caused '\177' characters in variable
+ values to be discarded when expanded in double-quoted strings.
+
+uu. Fixed a bug that caused $RANDOM to be re-seeded multiple times in a
+ subshell environment.
+
+vv. Extensive changes to the job management code to avoid the pid-reuse and
+ pid-aliasing problems caused by retaining the exit status of too many jobs,
+ but still retain as many background job statuses as POSIX requires.
+
+ww. Fixed a parser bug in processing \<newline> that caused things like
+
+ ((echo 5) \
+ (echo 6))
+
+ to not work correctly.
+
+xx. `pwd -P' now sets $PWD to a directory name containing no symbolic links
+ when in posix mode, as POSIX requires.
+
+yy. In posix mode, bash no longer sets $PWD to a name containing no symbolic
+ links if a directory is chosen from $CDPATH.
+
+zz. The word splitting code now treats an IFS character that is not space,
+ tab, or newline and any adjacent IFS white space as a single delimiter, as
+ SUSv3/XPG6 require.
+
+aaa. The `read' builtin now checks whether or not the number of fields read is
+ exactly the same as the number of variables instead of just assigning the
+ rest of the line (minus any trailing IFS white space) to the last
+ variable. This is what POSIX/SUS/XPG all require.
+
+bbb. Fixed a bug that caused `read' to always check whether or not fd 0 was a
+ pipe, even when reading from another file descriptor.
+
+ccc. Fixed a bug that caused short-circuiting of execution even if the return
+ value was being inverted.
+
+ddd. Fixed a bug that caused a core dump while decoding \W escapes in PS1 if
+ PWD was unset.
+
+eee. Fixed a bug in `read' that counted internal quoting characters for the
+ purposes of `read -n'.
+
+fff. Fixed a bug so that a function definition in a pipeline causes a child
+ process to be forked at the right time.
+
+ggg. Bash will not attempt to link against a readline library that doesn't
+ have rl_gnu_readline_p == 1.
+
+hhh. Fixed a bug that caused `read' to consume one too many characters when
+ reading a fixed number of characters and the Nth character is a backslash.
+
+iii. Fixed a bug that caused `unset' on variables in the temporary environment
+ to leave them set when `unset' completed.
+
+jjj. Fixed a bug that caused bash to close fd 2 if an `exec' failed and the
+ shell didn't exit.
+
+kkk. The completion code is more careful to not turn `/' or `///' into `//',
+ for those systems on which `//' has special meaning.
+
+lll. Fixed a bug that caused command substitution in asynchronous commands to
+ close the wrong file descriptors.
+
+mmm. The shell no longer prints status messages about terminated background
+ processes unless job control is active.
+
+nnn. Fixed a bug that prevented multiple consecutive invocations of `history -s'
+ from adding all the commands to the history list.
+
+ooo. Added a couple of changes to make arithmetic expansion more consistent in
+ all its contexts (still not perfect).
+
+ppp. Fixed a bug that caused the parser to occasionally not find the right
+ terminating "`" in an old-style command substitution.
+
+qqq. Fixed a bug that caused core dumps when the shell was reading its non-
+ interactive input from fd 0 and fd 0 was duplicated and restored using a
+ combination of `exec' (to save) and redirection (to restore).
+
+rrr. Fixed a problem that caused loops in sourced scripts to not be cleaned
+ up properly when a `return' is executed.
+
+sss. Change internal command substitution completion function to append a slash
+ to directory names in the command.
+
+2. Changes to Readline
+
+a. Fixed a bug that caused multiliine prompts to be wrapped and displayed
+ incorrectly.
+
+b. Fixed a bug that caused ^P/^N in emacs mode to fail to display the current
+ line correctly.
+
+c. Fixed a problem in computing the number of invisible characters on the first
+ line of a prompt whose length exceeds the screen width.
+
+d. Fixed vi-mode searching so that failure preserves the current line rather
+ than the last line in the history list.
+
+e. Fixed the vi-mode `~' command (change-case) to have the correct behavior at
+ end-of-line when manipulating multibyte characters.
+
+f. Fixed the vi-mode `r' command (change-char) to have the correct behavior at
+ end-of-line when manipulating multibyte characters.
+
+g. Fixed multiple bugs in the redisplay of multibyte characters: displaying
+ prompts longer than the screen width containing multibyte characters,
+
+h. Fix the calculation of the number of physical characters in the prompt
+ string when it contains multibyte characters.
+
+i. A non-zero value for the `rl_complete_suppress_append' variable now causes
+ no `/' to be appended to a directory name.
+
+j. Fixed forward-word and backward-word to work when words contained
+ multibyte characters.
+
+k. Fixed a bug in finding the delimiter of a `?' substring when performing
+ history expansion in a locale that supports multibyte characters.
+
+l. Fixed a memory leak caused by not freeing the timestamp in a history entry.
+
+m. Fixed a bug that caused "\M-x" style key bindings to not obey the setting
+ of the `convert-meta' variable.
+
+n. Fixed saving and restoring primary prompt when prompting for incremental
+ and non-incremental searches; search prompts now display multibyte
+ characters correctly.
+
+o. Fixed a bug that caused keys originally bound to self-insert but shadowed
+ by a multi-character key sequence to not be inserted.
+
+p. Fixed code so rl_prep_term_function and rl_deprep_term_function aren't
+ dereferenced if NULL (matching the documentation).
+
+q. Extensive changes to readline to add enough state so that commands
+ requiring additional characters (searches, multi-key sequences, numeric
+ arguments, commands requiring an additional specifier character like
+ vi-mode change-char, etc.) work without synchronously waiting for
+ additional input.
+
+r. Lots of changes so readline builds and runs on MinGW.
+
+s. Readline no longer tries to modify the terminal settings when running in
+ callback mode.
+
+t. The Readline display code no longer sets the location of the last invisible
+ character in the prompt if the \[\] sequence is empty.
+
+3. New Features in Bash
+
+a. Bash now understands LC_TIME as a special variable so that time display
+ tracks the current locale.
+
+b. BASH_ARGC, BASH_ARGV, BASH_SOURCE, and BASH_LINENO are no longer created
+ as `invisible' variables and may not be unset.
+
+c. In POSIX mode, if `xpg_echo' option is enabled, the `echo' builtin doesn't
+ try to interpret any options at all, as POSIX requires.
+
+d. The `bg' builtin now accepts multiple arguments, as POSIX seems to specify.
+
+e. Fixed vi-mode word completion and glob expansion to perform tilde
+ expansion.
+
+f. The `**' mathematic exponentiation operator is now right-associative.
+
+g. The `ulimit' builtin has new options: -i (max number of pending signals),
+ -q (max size of POSIX message queues), and -x (max number of file locks).
+
+h. A bare `%' once again expands to the current job when used as a job
+ specifier.
+
+i. The `+=' assignment operator (append to the value of a string or array) is
+ now supported for assignment statements and arguments to builtin commands
+ that accept assignment statements.
+
+j. BASH_COMMAND now preserves its value when a DEBUG trap is executed.
+
+k. The `gnu_errfmt' option is enabled automatically if the shell is running
+ in an emacs terminal window.
+
+l. New configuration option: --single-help-strings. Causes long help text
+ to be written as a single string; intended to ease translation.
+
+m. The COMP_WORDBREAKS variable now causes the list of word break characters
+ to be emptied when the variable is unset.
+
+n. An unquoted expansion of $* when $IFS is empty now causes the positional
+ parameters to be concatenated if the expansion doesn't undergo word
+ splitting.
+
+o. Bash now inherits $_ from the environment if it appears there at startup.
+
+p. New shell option: nocasematch. If non-zero, shell pattern matching ignores
+ case when used by `case' and `[[' commands.
+
+q. The `printf' builtin takes a new option: -v var. That causes the output
+ to be placed into var instead of on stdout.
+
+r. By default, the shell no longer reports processes dying from SIGPIPE.
+
+s. Bash now sets the extern variable `environ' to the export environment it
+ creates, so C library functions that call getenv() (and can't use the
+ shell-provided replacement) get current values of environment variables.
+
+4. New Features in Readline
+
+a. The key sequence sent by the keypad `delete' key is now automatically
+ bound to delete-char.
+
+b. A negative argument to menu-complete now cycles backward through the
+ completion list.
+
+c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
+ readline will bind the terminal special characters to their readline
+ equivalents when it's called (on by default).
+
+d. New bindable command: vi-rubout. Saves deleted text for possible
+ reinsertion, as with any vi-mode `text modification' command; `X' is bound
+ to this in vi command mode.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-3.0-release,
+and the previous version, bash-3.0-rc1.
+
+1. Changes to Bash
+
+a. Fixed a boundary overrun that could cause segmentation faults when the
+ completion code hands an incomplete construct to the word expansion
+ functions.
+
+b. Changed posix mode behavior so that an error in a variable assignment
+ preceding a special builtin causes a non-interactive shell to exit.
+
+c. Change the directory expansion portion of the completion code to not
+ expand embedded command substitutions if the directory name appears in
+ the file system.
+
+d. Fixed a problem that caused `bash -r' to turn on restrictions before
+ reading the startup files.
+
+e. Fixed a problem with the default operation of the `umask' builtin.
+
+2. Changes to Readline
+
+a. Fixed a problem with readline saving the contents of the current line
+ before beginning a non-interactive search.
+
+b. Fixed a problem with EOF detection when using rl_event_hook.
+
+c. Fixed a problem with the vi mode `p' and `P' commands ignoring numeric
+ arguments.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-3.0-rc1,
+and the previous version, bash-3.0-beta1.
+
+1. Changes to Bash
+
+a. Fixed a bug that caused incorrect behavior when referecing element 0 of
+ an array using $array, element 0 was unset, and `set -u' was enabled.
+
+b. System-specific changes for: SCO Unix 3.2, Tandem.
+
+c. Fixed a bug that caused inappropriate word splitting when a variable was
+ expanded within a double-quoted string that also included $@.
+
+d. Fixed a bug that caused `pwd' to not display anything in physical mode
+ when the file system had changed underneath the shell.
+
+e. Fixed a bug in the pre- and post- increment and decrement parsing in the
+ expression evaluator that caused errors when the operands and corresponding
+ operators were separated by whitespace.
+
+f. Fixed a bug that caused `history -p' to add an entry to the history list,
+ counter to the documentation. (Keeps the history expansions invoked by
+ emacs-mode command line editing from doing that as well.)
+
+g. Fixed a bug that could cause a core dump if `cd' is asked to print out a
+ pathname longer than PATH_MAX characters.
+
+h. Fixed a bug that caused jobs to be put into the wrong process group under
+ some circumstances after enabling job control with `set -m'.
+
+i. `unalias' now returns failure if no alias name arguments are supplied.
+
+j. Documented the characters not allowed to appear in an alias name.
+
+k. $* is no longer expanded as if in double quotes when it appears in the
+ body of a here document, as the SUS seems to require.
+
+l. The `bashbug' script now uses a directory in $TMPDIR for exclusive
+ access rather than trying to guess how the underlying OS provides for
+ secure temporary file creation.
+
+m. Fixed a few problems with `cd' and `pwd' when asked to operate on pathnames
+ longer than PATH_MAX characters.
+
+n. Fixed a memory leak caused when creating multiple local array variables
+ with identical names.
+
+o. Fixed a problem with calls to getcwd() so that bash now operates better
+ when the full pathname to the current directory is longer than PATH_MAX
+ bytes.
+
+p. The `trap' builtin now reports an error if a single non-signal argument
+ is specified.
+
+q. Fixed a bug that caused `umask' to not work correctly when presented
+ with a mask of all 0s.
+
+r. When `getopts' reaches the end of options, OPTARG is unset, as POSIX
+ appears to specify.
+
+s. Interactive mode now depends on whether or not stdin and stderr are
+ connected to a tty; formerly it was stdin and stdout. POSIX requires
+ this.
+
+t. Fixed vi-mode completion to work more as POSIX specifies (e.g., doing the
+ right kind of filename generation).
+
+2. Changes to Readline
+
+a. Fixed a problem that could cause readline to refer to freed memory when
+ moving between history lines while doing searches.
+
+b. Improvements to the code that expands and displays prompt strings
+ containing multibyte characters.
+
+c. Fixed a problem with vi-mode not correctly remembering the numeric argument
+ to the last `c'hange command for later use with `.'.
+
+d. Fixed a bug in vi-mode that caused multi-digit count arguments to work
+ incorrectly.
+
+e. Fixed a problem in vi-mode that caused the last text modification command
+ to not be remembered across different command lines.
+
+f. Fixed problems with changing characters and changing case at the end of
+ the line.
+
+3. New Features in Bash
+
+a. The `jobs', `kill', and `wait' builtins now accept job control notation
+ even if job control is not enabled.
+
+b. The historical behavior of `trap' that allows a missing `action' argument
+ to cause each specified signal's handling to be reset to its default is
+ now only supported when `trap' is given a single non-option argument.
+
+4. New Features in Readline
+
+a. When listing completions, directories have a `/' appended if the
+ `mark-directories' option has been enabled.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-3.0-beta1,
+and the previous version, bash-3.0-alpha.
+
+1. Changes to Bash
+
+a. Fixes to build correctly when arrays are not compiled into the shell.
+
+b. Fixed command substitution to run any exit trap defined in the command
+ substitution before returning; the exit trap is not inherited from the
+ calling shell.
+
+c. Fixes to process group synchronization code so that every child process
+ attempts to set the terminal's process group; fixes some synchronization
+ problems on Linux kernels that schedule the child to always run before
+ the parent.
+
+d. Fixed processing of octal and hex constants in printf builtin for POSIX.2
+ compliance.
+
+e. Fixed a couple of core dumps in the pattern removal code.
+
+f. Fixes to the array subrange extraction code to deal better with sparse
+ arrays.
+
+g. Parser errors and other errors that result in the shell exiting now cause
+ the exit trap to be run.
+
+h. Change the command substitution completion functions to not append any
+ closing quote, because it would be inserted a closing "`" or ")".
+
+i. Fix history initialization so assignments to $histchars made in startup
+ files are honored.
+
+j. If an exit trap does not contain a call to `exit', the shell now uses
+ the exit status of the last command executed before the trap as the exit
+ status of the shell.
+
+k. The parser now prompts with $PS2 if it reads a newline while parsing a
+ compound array assignment statement.
+
+l. When performing a compound array assignment, the parser doesn't treat
+ words of the form [index]=value as assignments if they're the result of
+ expansions.
+
+m. Fixed a bug that caused `return' executed in a trap command to make the
+ shell think it was still running the trap.
+
+n. Fixed the value of errno set by the pathname canonicalization functions.
+
+o. Changed the grammar so that `time' alone on a line times a null command
+ rather than being a syntax error.
+
+p. The pattern substitution code no longer performs quote removal on the
+ pattern before trying to match it, as the pattern removal functions do.
+
+q. Fixed a bug that could cause core dumps when checking whether a quoted
+ command name was being completed.
+
+r. Fixes to the pattern removal and pattern replacement expansions to deal
+ with multibyte characters better (and faster).
+
+s. Fix to the substring expansion (${param:off[:len]}) to deal with (possibly
+ multibyte) characters instead of raw bytes.
+
+t. Fixed a bug that caused some key bindings set in an inputrc to be ignored
+ at shell startup.
+
+u. Fixed a bug that caused unsetting a local variable within a function to
+ not work correctly.
+
+v. Fixed a bug that caused invalid variables to be created when using
+ `read -a'.
+
+w. Fixed a bug that caused "$@" to expand incorrectly when used as the right
+ hand side of a parameter expansion such as ${word:="$@"} if the first
+ character of $IFS was not a space.
+
+x. Fixed a slight cosmetic problem when printing commands containing a
+ `>&word' redirection.
+
+y. Fixed a problem that could cause here documents to not be created correctly
+ if the system temporary directory did not allow writing.
+
+2. Changes to Readline
+
+a. Change to history expansion functions to treat `^' as equivalent to word
+ one, as the documention states.
+
+b. Some changes to the display code to improve display and redisplay of
+ multibyte characters.
+
+c. Changes to speed up the multibyte character redisplay code.
+
+d. Fixed a bug in the vi-mode `E' command that caused it to skip over the
+ last character of a word if invoked while point was on the word's
+ next-to-last character.
+
+e. Fixed a bug that could cause incorrect filename quoting when
+ case-insensitive completion was enabled and the word being completed
+ contained backslashes quoting word break characters.
+
+f. Fixed a bug in redisplay triggered when the prompt string contains
+ invisible characters.
+
+g. Fixed some display (and other) bugs encountered in multibyte locales
+ when a non-ascii character was the last character on a line.
+
+h. Fixed some display bugs caused by multibyte characters in prompt strings.
+
+i. Fixed a problem with history expansion caused by non-whitespace characters
+ used as history word delimiters.
+
+3. New Features in Bash
+
+a. printf builtin understands two new escape sequences: \" and \?.
+
+b. `echo -e' understands two new escape sequences: \" and \?.
+
+c. The GNU `gettext' package and libintl have been integrated; the shell's
+ messages can be translated into different languages.
+
+d. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'.
+
+e. The error message printed when bash cannot open a shell script supplied
+ as argument 1 now includes the name of the shell, to better identify
+ the error as coming from bash.
+
+4. New Features in Readline
+
+a. New application variable, rl_completion_quote_character, set to any
+ quote character readline finds before it calls the application completion
+ function.
+
+b. New application variable, rl_completion_suppress_quote, settable by an
+ application completion function. If set to non-zero, readline does not
+ attempt to append a closing quote to a completed word.
+
+c. New application variable, rl_completion_found_quote, set to a non-zero
+ value if readline determines that the word to be completed is quoted.
+ Set before readline calls any application completion function.
+
+d. New function hook, rl_completion_word_break_hook, called when readline
+ needs to break a line into words when completion is attempted. Allows
+ the word break characters to vary based on position in the line.
+
+e. New bindable command: unix-filename-rubout. Does the same thing as
+ unix-word-rubout, but adds `/' to the set of word delimiters.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-3.0-alpha,
+and the previous version, bash-2.05b-release.
+
+1. Changes to Bash
+
+a. Fixes so that the shell will compile without some of the default options
+ defined.
+
+b. Fixed an error message that did not pass enough arguments to printf.
+
+c. Fixed a bug that caused input redirection to a builtin inside a script
+ being read from standard input to result in the rest of the already-
+ read and buffered script to be discarded.
+
+d. Fixed a bug that caused subshell initialization to close the file
+ descriptor from which the shell was reading a script under certain
+ circumstances.
+
+e. Fixed a bug that caused the shell to not advance a string pointer over
+ a null wide character when doing string operations.
+
+f. Fixed the internal logout code so that shells that time out waiting for
+ input (using $TMOUT) run ~/.bash_logout.
+
+g. Portability and configuration changes for: cygwin, HP/UX, GNU/FreeBSD.
+
+h. The parser no longer adds implicit double quotes to ((...)) arithmetic
+ commands.
+
+i. The ((...)) arithmetic command evaluation code was fixed to not dump core
+ when the expanded string is null.
+
+j. The ((...)) arithmetic command evaluation code was fixed to not perform
+ variable assignments while expanding the expression.
+
+k. Fixed a bug that caused word splitting to be performed incorrectly when
+ IFS is set, but null.
+
+l. Fixed a bug in brace expansion that caused a quoted `$' preceding an
+ open brace to inhibit brace expansion.
+
+m. Fixed a bug that caused a leading `-' in the shell's name to cause it to
+ not be recognized as a restricted shell.
+
+n. Fixed a bug in the arithmetic evaluation code that could cause longjmps
+ to an invalid location and result in a core dump.
+
+o. Fixed a bug in the calculation of how many history lines are new in a
+ single shell session when reading new history lines from a file with
+ `history -n'.
+
+p. Fixed a bug in pathname canonicalization that caused the shell to dump
+ core when presented with a pathname longer than PATH_MAX.
+
+q. Fixed the parser so that it doesn't try to compare a char variable to
+ EOF, which fails when chars are unsigned.
+
+r. Fixed a bug in the simple command execution code that caused occasional
+ core dumps.
+
+s. The shell does a better job of saving any partial parsing state during
+ operations which cause a command to be executed while a line is being
+ entered and parsed.
+
+t. The completion code now splits words more like the expansion code when
+ $IFS is used to split.
+
+u. The locale code does a better job of recomputing the various locale
+ variable values when LC_ALL is unset.
+
+v. The programmable completion code does a better job of dequoting expanded
+ word lists before comparing them against the word to be matched.
+
+w. The shell no longer seg faults if the expanded value of $PS4 is null
+ and `set -x' is enabled.
+
+x. Fixed a bug that caused core dumps when a here string expanded to NULL.
+
+y. The mail checking code now makes sure the mailbox is bigger before
+ reporting the existence of new mail.
+
+z. The parser does not try to expand $'...' and $"..." when the appear
+ within double quotes unless the `extquote' option has been enabled with
+ `shopt'. For backwards compatibility, it is enabled by default.
+
+aa. Fixed a bug that caused `for x; do ...' and `select x; do ... to use
+ $@ instead of "$@" for the implicit list of arguments.
+
+bb. Fixed a bug that caused a subshell of a restricted shell (e.g., one
+ spawned to execute a pipeline) to not exit immediately if attempting
+ to use a command containing a slash.
+
+cc. Fixed a problem with empty replacements for a pattern that doesn't match
+ when performing ${param/word/} expansion.
+
+dd. Word expansions performed while expanding redirections no longer search
+ a command's temporary environment to expand variable values.
+
+ee. Improvements to the alias expansion code when expanding subsequent words
+ because an aliase's value ends with a space.
+
+ff. `cd -' now prints the current working directory after a successful chdir
+ even when the shell is not interactive, as the standard requires.
+
+gg. The shell does a better job of ensuring a child process dies of SIGINT
+ before resending SIGINT to itself.
+
+hh. The arithmetic expansion variable assignment code now does the right
+ thing when assigning to `special' variables like OPTIND.
+
+ii. When history expansion verification is enabled, the bash readline helper
+ functions that do history expansion on the current line don't print
+ the results.
+
+jj. Fixed bugs with multiple consecutive alias expansion when one of the
+ expansions ends with a space.
+
+kk. Fixed a problem in the programmable completion code that could cause core
+ dumps when trying to initialize a set of possible completions from a
+ list of variables.
+
+ll. The \[ and \] escape characters are now ignored when decoding the prompt
+ string if the shell is started with editing disabled.
+
+mm. Fixed a bug that could leave extra characters in a string when doing
+ quoted null character removal.
+
+nn. Command substitution and other subshell operations no longer reset the
+ line number (aids the bash debugger).
+
+oo. Better line number management when executing simple commands, conditional
+ commands, for commands, and select commands.
+
+pp. The globbing code now uses malloc, with its better failure properties,
+ rather than alloca().
+
+qq. Fixed a bug that caused expansions like #{a[2]:=value} to create the
+ appropriate array element instead of a variable named `a[2]'.
+
+rr. Fixed a bug in the handling of a `?(...)' pattern immediately following
+ a `*' when extglob is enabled.
+
+ss. Fixed a bug that caused a `return' invoked in an exit trap when exit is
+ invoked in a function to misbehave.
+
+tt. Fixed a bug that caused CTLESC and CTLNUL characters to not be escaped
+ by the internal shell string quoting functions.
+
+uu. Fixed a bug that caused quoted null characters in an expanded word list
+ to be inappropriately assigned to an array variable when using `read -a'.
+
+vv. Fixed a bug that caused redirections accompanying a null command to persist
+ in the current shell.
+
+ww. Fixed a bug that caused the prompt to be printed when the shell was
+ expanding a multiline alias.
+
+xx. Fixed a bug that resulted in core dumps when the completion for a command
+ changed the compspec.
+
+yy. Fixed a bug that caused evaluation of programmable completions to print
+ notifications of completed jobs.
+
+zz. Bash now disables line editing when $EMACS == `t' and $TERM == `dumb'
+ (which is what emacs shell windows do).
+
+aaa. In posix mode, `kill -l' causes signal names to be displayed without
+ a leading `SIG'.
+
+bbb. Clear error flag on standard output so it doesn't persist across multiple
+ builtin commands.
+
+ccc. In posix mode, `alias' displays alias values without the leading `alias',
+ so the output cannot be used as subsequent input.
+
+ddd. In posix mode, the `trap' builtin doesn't check whether or not its
+ first argument is a signal specification and revert the signal handling
+ to its original disposition if it is.
+
+eee. Fixed several bugs in the handling of "$*" and "${array[*]}" by the
+ pattern substitution and removal expansions.
+
+fff. Fixed several problems with the handling of ${array[@]}, ${array[*]},
+ $@, and $* by the indirect variable expansion code.
+
+ggg. Fixed a bug that did not allow `time' to be aliased.
+
+hhh. Improved the mail checking code so it won't check (and possibly cause an
+ NFS file system mount) until MAILPATH or MAIL is given a value -- there
+ is no default if DEFAULT_MAIL_DIRECTORY is not defined at compile time.
+ (It is computed by configure, but can be #undef'd in config-bot.h.)
+
+iii. If the `chkwinsize' option is enabled, the shell checks for window size
+ changes if a child process exits due to a signal.
+
+jjj. Removed the attempts to avoid adding a slash at the end of a completed
+ executable name if there was a directory with the same name in the
+ current directory.
+
+kkk. Fixed PATH lookup code so it treats the permission bits separately for
+ owner, group, and other, rather than checking them all.
+
+lll. Fixed the locale code to reset the parser's idea of the character class
+ <blank>, which controls how it splits tokens, when the locale changes.
+
+mmm. The shell now binds its special readline functions and key bindings only
+ if the user's inputrc file has not already bound them.
+
+nnn. The shell now reports on processes that dump core due to signals when
+ invoked as `-c command'.
+
+2. Changes to Readline
+
+a. Fixes to avoid core dumps because of null pointer references in the
+ multibyte character code.
+
+b. Fix to avoid infinite recursion caused by certain key combinations.
+
+c. Fixed a bug that caused the vi-mode `last command' to be set incorrectly.
+
+d. Readline no longer tries to read ahead more than one line of input, even
+ when more is available.
+
+e. Fixed the code that adjusts the point to not mishandle null wide
+ characters.
+
+f. Fixed a bug in the history expansion `g' modifier that caused it to skip
+ every other match.
+
+g. Fixed a bug that caused the prompt to overwrite previous output when the
+ output doesn't contain a newline and the locale supports multibyte
+ characters. This same change fixes the problem of readline redisplay
+ slowing down dramatically as the line gets longer in multibyte locales.
+
+h. History traversal with arrow keys in vi insertion mode causes the cursor
+ to be placed at the end of the new line, like in emacs mode.
+
+i. The locale initialization code does a better job of using the right
+ precedence and defaulting when checking the appropriate environment
+ variables.
+
+j. Fixed the history word tokenizer to handle <( and >( better when used as
+ part of bash.
+
+k. The overwrite mode code received several bug fixes to improve undo.
+
+l. Many speedups to the multibyte character redisplay code.
+
+m. The callback character reading interface should not hang waiting to read
+ keyboard input.
+
+n. Fixed a bug with redoing vi-mode `s' command.
+
+o. The code that initializes the terminal tracks changes made to the terminal
+ special characters with stty(1) (or equivalent), so that these changes
+ are reflected in the readline bindings. New application-callable function
+ to make it work: rl_tty_unset_default_bindings().
+
+p. Fixed a bug that could cause garbage to be inserted in the buffer when
+ changing character case in vi mode when using a multibyte locale.
+
+q. Fixed a bug in the redisplay code that caused problems on systems
+ supporting multibyte characters when moving between history lines when the
+ new line has more glyphs but fewer bytes.
+
+r. Undo and redo now work better after exiting vi insertion mode.
+
+s. Make sure system calls are restarted after a SIGWINCH is received using
+ SA_RESTART.
+
+t. Improvements to the code that displays possible completions when using
+ multibyte characters.
+
+u. Fixed a problem when parsing nested if statements in inputrc files.
+
+v. The completer now takes multibyte characters into account when looking for
+ quoted substrings on which to perform completion.
+
+w. The history search functions now perform better bounds checking on the
+ history list.
+
+3. New Features in Bash
+
+a. ANSI string expansion now implements the \x{hexdigits} escape.
+
+b. There is a new loadable `strftime' builtin.
+
+c. New variable, COMP_WORDBREAKS, which controls the readline completer's
+ idea of word break characters.
+
+d. The `type' builtin no longer reports on aliases unless alias expansion
+ will actually be performed.
+
+e. HISTCONTROL is now a colon-separated list of values, which permits
+ more extensibility and backwards compatibility.
+
+f. HISTCONTROL may now include the `erasedups' option, which causes all lines
+ matching a line being added to be removed from the history list.
+
+g. `configure' has a new `--enable-multibyte' argument that permits multibyte
+ character support to be disabled even on systems that support it.
+
+h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV,
+ BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING,
+ BASH_COMMAND
+
+i. FUNCNAME has been changed to support the debugger: it's now an array
+ variable.
+
+j. for, case, select, arithmetic commands now keep line number information
+ for the debugger.
+
+k. There is a new `RETURN' trap executed when a function or sourced script
+ returns (not inherited child processes; inherited by command substitution
+ if function tracing is enabled and the debugger is active).
+
+l. New invocation option: --debugger. Enables debugging and turns on new
+ `extdebug' shell option.
+
+m. New `functrace' and `errtrace' options to `set -o' cause DEBUG and ERR
+ traps, respectively, to be inherited by shell functions. Equivalent to
+ `set -T' and `set -E' respectively. The `functrace' option also controls
+ whether or not the DEBUG trap is inherited by sourced scripts.
+
+n. The DEBUG trap is run before binding the variable and running the action
+ list in a `for' command, binding the selection variable and running the
+ query in a `select' command, and before attempting a match in a `case'
+ command.
+
+o. New `--enable-debugger' option to `configure' to compile in the debugger
+ support code.
+
+p. `declare -F' now prints out extra line number and source file information
+ if the `extdebug' option is set.
+
+q. If `extdebug' is enabled, a non-zero return value from a DEBUG trap causes
+ the next command to be skipped, and a return value of 2 while in a
+ function or sourced script forces a `return'.
+
+r. New `caller' builtin to provide a call stack for the bash debugger.
+
+s. The DEBUG trap is run just before the first command in a function body is
+ executed, for the debugger.
+
+t. `for', `select', and `case' command heads are printed when `set -x' is
+ enabled.
+
+u. There is a new {x..y} brace expansion, which is shorthand for {x.x+1,
+ x+2,...,y}. x and y can be integers or single characters; the sequence
+ may ascend or descend; the increment is always 1.
+
+v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices)
+ of array.
+
+w. New `force_fignore' shopt option; if enabled, suffixes specified by
+ FIGNORE cause words to be ignored when performing word completion even
+ if they're the only possibilities.
+
+x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu
+ style' (filename:lineno:message) format.
+
+y. New `-o bashdefault' option to complete and compgen; if set, causes the
+ whole set of bash completions to be performed if the compspec doesn't
+ result in a match.
+
+z. New `-o plusdirs' option to complete and compgen; if set, causes directory
+ name completion to be performed and the results added to the rest of the
+ possible completions.
+
+aa. `kill' is available as a builtin even when the shell is built without
+ job control.
+
+bb. New HISTTIMEFORMAT variable; value is a format string to pass to
+ strftime(3). If set and not null, the `history' builtin prints out
+ timestamp information according to the specified format when displaying
+ history entries. If set, bash tells the history library to write out
+ timestamp information when the history file is written.
+
+cc. The [[ ... ]] command has a new binary `=~' operator that performs
+ extended regular expression (egrep-like) matching.
+
+dd. `configure' has a new `--enable-cond-regexp' option (enabled by default)
+ to enable the =~ operator and regexp matching in [[ ... ]].
+
+ee. Subexpressions matched by the =~ operator are placed in the new
+ BASH_REMATCH array variable.
+
+ff. New `failglob' option that causes an expansion error when pathname
+ expansion fails to produce a match.
+
+gg. New `set -o pipefail' option that causes a pipeline to return a failure
+ status if any of the processes in the pipeline fail, not just the last
+ one.
+
+4. New Features in Readline
+
+a. History expansion has a new `a' modifier equivalent to the `g' modifier
+ for compatibility with the BSD csh.
+
+b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
+ modifier, which performs a substitution once per word.
+
+c. All non-incremental search operations may now undo the operation of
+ replacing the current line with the history line.
+
+d. The text inserted by an `a' command in vi mode can be reinserted with
+ `.'.
+
+e. New bindable variable, `show-all-if-unmodified'. If set, the readline
+ completer will list possible completions immediately if there is more
+ than one completion and partial completion cannot be performed.
+
+f. There is a new application-callable `free_history_entry()' function.
+
+g. History list entries now contain timestamp information; the history file
+ functions know how to read and write timestamp information associated
+ with each entry.
+
+h. Four new key binding functions have been added:
+
+ rl_bind_key_if_unbound()
+ rl_bind_key_if_unbound_in_map()
+ rl_bind_keyseq_if_unbound()
+ rl_bind_keyseq_if_unbound_in_map()
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.05b-release,
+and the previous version, bash-2.05b-beta2.
+
+1. Changes to Bash
+
+a. Fixed an off-by-one error in the function that translates job
+ specifications.
+
+b. Note that we're running under Emacs and disable line editing if
+ $EMACS == `t'.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.05b-beta2,
+and the previous version, bash-2.05b-beta1.
+
+1. Changes to Bash
+
+a. Fixed the /= and %= arithmetic operators to catch division by zero.
+
+b. Added putenv, setenv, unsetenv to getenv replacement for completeness.
+
+c. Fixed a bug that could cause the -O expand_aliases invocation option
+ to not take effect.
+
+d. Fixed a problem with process substitution that resulted in incorrect
+ behavior when the number of process substitutions in an individual
+ command approached 64.
+
+2. Changes to Readline
+
+a. Fixed a problem with backward-char-search when on a system with support
+ for multibyte characters when running in a locale without any multibyte
+ characters.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.05b-beta1,
+and the previous version, bash-2.05b-alpha1.
+
+1. Changes to Bash
+
+a. Fixed a problem when parsing a POSIX.2 character class name while
+ evaluating a bracket expression containing multibyte characters.
+
+b. Changed the help text for `bind' to make it clear that any command
+ that may be placed in ~/.inputrc is a valid argument to `bind'.
+
+c. Added `help' builtin entries for `((', `[[', and arithmetic for.
+
+d. malloc updated again:
+ o slightly better overflow and underflow detection by putting the
+ chunk size at the beginning and end of the chunk and making
+ sure they match in free/realloc
+ o partial page allocated to make things page-aligned no longer
+ completely wasted
+ o block coalescing now enabled by default
+ o splitting and coalescing enabled for 32-byte chunks, the most
+ common size requested
+ o fixed a problem that resulted in spurious underflow messages and
+ aborts
+ o bin sizes are precomputed and stored in an array rather than
+ being computed at run time
+ o malloc will return memory blocks back to the system if the block
+ being freed is at the top of the heap and of sufficient size to
+ make it worthwhile
+ o malloc/free/realloc now inline memset instead of calling the
+ libc function; uses Duff's device for good performance
+
+e. Check for getservent(); make the service name completion code dependent
+ on its presence.
+
+f. Changed the readline callback that executes a command bound to a key
+ sequence to not save the executed command on the history list and to
+ save and restore the parsing state.
+
+g. Changes to lib/sh/snprintf.c: fixed some bugs in the `g' and `G'
+ floating point format display; implemented the "'" flag character
+ that turns on thousands' grouping; fixed behavior on systems where
+ MB_CUR_MAX does not evaluate to a constant.
+
+h. The `unset' builtin no longer returns a failure status when asked to
+ unset a previously-unset variable or function.
+
+i. Changes to the build system to make it easier to cross-compile bash
+ for different systems.
+
+j. Added `,' to the characters that are backslash-escaped during filename
+ completion, to avoid problems with complete-into-braces and RCS filenames
+ containing commas.
+
+k. Some changes to the multibyte character support code to avoid many calls
+ to strlen().
+
+l. Bash now correctly honors setting LANG to some value when LC_ALL does not
+ already have a value.
+
+m. Fixed a bug that could cause SIGSEGV when processing nested traps with
+ trap handlers.
+
+n. The `source/.' builtin now restores the positional parameters when it
+ returns unless they were changed using the `set' builtin during the file's
+ execution.
+
+o. Fixed a bug that caused a syntax error when a command was terminated by
+ EOF.
+
+2. New Features in Bash
+
+a. There is now support for placing the long help text into separate files
+ installed into ${datadir}/bash. Not enabled by default; can be turned
+ on with `--enable-separate-helpfiles' option to configure.
+
+b. All builtins that take operands accept a `--' pseudo-option, except
+ `echo'.
+
+c. The `echo' builtin now accepts \0xxx (zero to three octal digits following
+ the `0') in addition to \xxx (one to three octal digits) for SUSv3/XPG6/
+ POSIX.1-2001 compliance.
+
+3. Changes to Readline
+
+a. Fixed a small problem in _rl_insert_char with multibyte characters.
+
+b. Fixes from IBM for line wrapping problems when using multibyte characters.
+
+c. Fixed a problem which caused the display to be messed up when the last
+ line of a multi-line prompt (possibly containing invisible characters)
+ was longer than the screen width.
+
+d. Fixed a problem with the vi-mode `r' command that ocurred on systems with
+ support for multibyte characters when running in a locale without any
+ multibyte characters.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.05b-alpha1,
+and the previous version, bash-2.05a-release.
+
+1. Changes to Bash
+
+a. Some changes to work around inlining differences between compilers.
+
+b. Added more prototypes for internal shell typedefs, to catch argument
+ passing errors when using pointers to functions.
+
+c. The `cd' builtin now fails in posix mode when a valid directory cannot be
+ constructed from a relative pathname argument and the $PWD using pathname
+ canonicalization, and the -P option has not been supplied. Previously,
+ the shell would attempt to use what the user typed, leading to weird
+ values for $PWD and discrepancies between the value of $PWD and the
+ actual working directory.
+
+d. The `cd' builtin now resets $PWD when canonicalization fails but a chdir
+ to the pathname passed as an argument succeeds (when not in posix mode).
+
+e. The `fc' builtin has been fixed, as POSIX requires, to use the closest
+ history position in range when given an out-of-range argument.
+
+f. The history file loading code was changed to allow lines to be saved in
+ the history list from the shell startup files.
+
+g. `history -s args' now works better in compound commands.
+
+h. The tilde expansion code was fixed to better recognize when it's being
+ invoked in an assignment context, which enables expansion after `='
+ and `:'.
+
+i. Fixed the command name completion code so a slash is no longer appended
+ to a single match if there happens to be a directory with that name in
+ $PWD.
+
+j. Fixed compound array assignment to no longer perform alias expansion, to
+ allow reserved words as array members, and to not produce extra output
+ when the `-v' option had been enabled.
+
+k. Fixed the programmable completion code to better handle newlines in lists
+ of possible completions (e.g., `complete -W').
+
+l. Removed the reserved words from the `bash-builtins' manual page.
+
+m. Parser error reporting now attempts to do a better job of identifying the
+ token in error rather than doing straight textual analysis.
+
+n. Fixes for Inf/NaN, locales, wide/multibyte characters and zero-length
+ arguments in the library snprintf(3) replacement.
+
+o. `read -e' no longer does command name completion on the first word on
+ the line being read.
+
+p. `select' now returns failure if the read of the user's selection fails.
+
+q. Fixed a bug that could cause a core dump when setting $PIPESTATUS.
+
+r. Fixes to not allocate so many job slots when the shell is running a loop
+ with job control enabled in a subshell of an interactive shell.
+
+s. Fixed a bug in the trap code that caused traps to be inherited by
+ command substitutions in some cases.
+
+t. Fixed a bug that could cause alias expansion to inappropriately expand
+ the word following the alias.
+
+u. Fixed a bug in the `kill' builtin that mishandled negative pid arguments.
+
+v. The parser is less lenient when parsing assignment statements where the
+ characters before the `=' don't comprise a valid identifier.
+
+w. The arithmetic expression evaluation code now honors the setting of the
+ `-u' option when expanding variable names.
+
+x. Fixed the arithmetic evaluation code to allow array subscripts to be
+ assigned (`let b[7]=42') and auto-incremented and auto-decremented
+ (e.g., b[7]++).
+
+y. Reimplemented the existing prompt string date and time expansions using
+ strftime(3), which changed the output of \@ in some locales.
+
+z. Fixed a bug that could cause a core dump when a special shell variable
+ (like RANDOM) was converted to an array with a variable assignment.
+
+aa. Fixed a bug that would reset the handler for a signal the user had
+ trapped to a function that would exit the shell when setting the exit
+ trap in a non-interactive shell.
+
+bb. Changed the execve(2) wrapper code to check whether or not a failing
+ command is a directory before looking at whether a `#!' interpreter
+ failed for some reason.
+
+cc. Fixed a bug in the command printing code so it no longer inserts a `;'
+ after a newline, which produces a syntax error when reused as input.
+
+dd. The code that expands $PS4 no longer inherits the `-x' flag.
+
+ee. The bash-specific completion functions may now take advantage of the
+ double-TAB and M-? features of the standard readline completion
+ functions.
+
+ff. The mail checking code no longer prints a message if the checked file's
+ size has not increased, even if the access time is less than the modification time.
+
+gg. Rewrote the variable symbol table code: there is now a stack of
+ contexts, each possibly including a separate symbol table; there can
+ be more than one temporary environment supplied to nested invocations
+ of `./source'; the temporary environments no longer require so much
+ special-case code; shell functions now handle the temporary environment
+ and local variables more consistently; function scope exit is faster now
+ that the entire symbol table does not have to be traversed to dispose of
+ local variables; it is now easier to push vars from the temporary
+ environment to the shell's variable table in posix mode; some duplicated
+ code has been removed.
+
+hh. Regularized the error message printing code; builtin_error is now called
+ more consistently, and common error message strings are handled by small
+ functions. This should make eventual message translation easier.
+
+ii. Error messages now include the line number in a script when the shell
+ is not interactive.
+
+jj. Array subscript expansion now takes place even when the array variable is
+ unset, so side effects will take place.
+
+kk. Fixed a bug in the SICGHLD child-reaping code so that it won't find
+ jobs already marked as terminated if the OS reuses pids quickly enough.
+
+ll. Fixed a bug that could cause a signal to not interrupt the `wait'
+ builtin while it was waiting for a background process to terminate.
+
+mm. A couple of changes to make it easier for multiple shells to share history
+ files using `history -n', `history -r', and `history -w'.
+
+nn. The `getopts' builtin always increments OPTIND to point to the next
+ option to be handled when an option is returned, whether it's valid
+ or not, as POSIX 1003.x-2001 requires.
+
+oo. Changed some parts of the expansion code to avoid allocating and
+ immediately freeing memory without using the results for anything.
+
+pp. The shell now keeps track of $IFS internally, updating its internal map
+ each time the variable is assigned a new value (or at local scope exit).
+ This saves thousands of hash lookups for IFS, which, while individually
+ cheap, add up.
+
+qq. Rewrote the hash table code: searching and insertion are much faster now,
+ and it uses a better string hashing function; augmented the function
+ interface to simplify other parts of the code and remove duplicated code
+
+rr. The shell now uses a simple, generic `object cache' for allocating and
+ caching words and word lists, which were the major users of
+ malloc/free.
+
+ss. Fixed the assignment statement parsing code to allow whitespace and
+ newlines in subscripts when performing array element assignment.
+
+tt. The shell now issues many fewer calls to sigprocmask and other signal
+ masking system calls.
+
+uu. Fixed the `test' and conditional command file comparison operators to
+ work right when one file has a non-positive timestamp and the other
+ does not exist.
+
+vv. Fixed some cases where the special characters '\001' and '\177' in the
+ values of variables or positional parameters caused incorrect expansion
+ results.
+
+2. Changes to Readline
+
+a. Fixed output of comment-begin character when listing variable values.
+
+b. Added some default key bindings for common escape sequences produced by
+ HOME and END keys.
+
+c. Fixed the mark handling code to be more emacs-compatible.
+
+d. A bug was fixed in the code that prints possible completions to keep it
+ from printing empty strings in certain circumstances.
+
+e. Change the key sequence printing code to print ESC as M\- if ESC is a
+ meta-prefix character -- it's easier for users to understand than \e.
+
+f. Fixed unstifle_history() to return values that match the documentation.
+
+g. Fixed the event loop (rl_event_hook) to handle the case where the input
+ file descriptor is invalidated.
+
+h. Fixed the prompt display code to work better when the application has a
+ custom redisplay function.
+
+i. Changes to make reading and writing the history file a little faster, and
+ to cope with huge history files without calling abort(3) from xmalloc.
+
+j. The vi-mode `S' and `s' commands are now undone correctly.
+
+3. New Features in Bash
+
+a. If set, TMOUT is the default timeout for the `read' builtin.
+
+b. `type' has two new options: `-f' suppresses shell function lookup, and
+ `-P' forces a $PATH search.
+
+c. New code to handle multibyte characters.
+
+d. `select' was changed to be more ksh-compatible, in that the menu is
+ reprinted each time through the loop only if REPLY is set to NULL.
+ The previous behavior is available as a compile-time option.
+
+e. `complete -d' and `complete -o dirnames' now force a slash to be
+ appended to names which are symlinks to directories.
+
+f. There is now a bindable edit-and-execute-command readline command,
+ like the vi-mode `v' command, bound to C-xC-e in emacs mode.
+
+g. Added support for ksh93-like [:word:] character class in pattern matching.
+
+h. The $'...' quoting construct now expands \cX to Control-X.
+
+i. A new \D{...} prompt expansion; passes the `...' to strftime and inserts
+ the result into the expanded prompt.
+
+j. The shell now performs arithmetic in the largest integer size the
+ machine supports (intmax_t), instead of long.
+
+k. If a numeric argument is supplied to one of the bash globbing completion
+ functions, a `*' is appended to the word before expansion is attempted.
+
+l. The bash globbing completion functions now allow completions to be listed
+ with double tabs or if `show-all-if-ambiguous' is set.
+
+m. New `-o nospace' option for `complete' and `compgen' builtins; suppresses
+ readline's appending a space to the completed word.
+
+n. New `here-string' redirection operator: <<< word.
+
+o. When displaying variables, function attributes and definitions are shown
+ separately, allowing them to be re-used as input (attempting to re-use
+ the old output would result in syntax errors).
+
+p. There is a new configuration option `--enable-mem-scramble', controls
+ bash malloc behavior of writing garbage characters into memory at
+ allocation and free time.
+
+q. The `complete' and `compgen' builtins now have a new `-s/-A service'
+ option to complete on names from /etc/services.
+
+r. `read' has a new `-u fd' option to read from a specified file descriptor.
+
+s. Fix the completion code so that expansion errors in a directory name
+ don't cause a longjmp back to the command loop.
+
+t. Fixed word completion inside command substitution to work a little more
+ intuitively.
+
+u. The `printf' %q format specifier now uses $'...' quoting to print the
+ argument if it contains non-printing characters.
+
+v. The `declare' and `typeset' builtins have a new `-t' option. When applied
+ to functions, it causes the DEBUG trap to be inherited by the named
+ function. Currently has no effect on variables.
+
+w. The DEBUG trap is now run *before* simple commands, ((...)) commands,
+ [[...]] conditional commands, and for ((...)) loops.
+
+x. The expansion of $LINENO inside a shell function is only relative to the
+ function start if the shell is interactive -- if the shell is running a
+ script, $LINENO expands to the line number in the script. This is as
+ POSIX-2001 requires.
+
+y. The bash debugger in examples/bashdb has been modified to work with the
+ new DEBUG trap semantics, the command set has been made more gdb-like,
+ and the changes to $LINENO make debugging functions work better. Code
+ from Gary Vaughan.
+
+z. New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup
+ and close).
+
+aa. There is a new `-l' invocation option, equivalent to `--login'.
+
+bb. The `hash' builtin has a new `-l' option to list contents in a reusable
+ format, and a `-d' option to remove a name from the hash table.
+
+4. New Features in Readline
+
+a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both
+ be bound to readline functions. Now the arrow keys may be used in vi
+ insert mode.
+
+b. When listing completions, and the number of lines displayed is more than
+ the screen length, readline uses an internal pager to display the results.
+ This is controlled by the `page-completions' variable (default on).
+
+c. New code to handle editing and displaying multibyte characters.
+
+d. The behavior introduced in bash-2.05a of deciding whether or not to
+ append a slash to a completed name that is a symlink to a directory has
+ been made optional, controlled by the `mark-symlinked-directories'
+ variable (default is the 2.05a behavior).
+
+e. The `insert-comment' command now acts as a toggle if given a numeric
+ argument: if the first characters on the line don't specify a
+ comment, insert one; if they do, delete the comment text
+
+f. New application-settable completion variable:
+ rl_completion_mark_symlink_dirs, allows an application's completion
+ function to temporarily override the user's preference for appending
+ slashes to names which are symlinks to directories.
+
+g. New function available to application completion functions:
+ rl_completion_mode, to tell how the completion function was invoked
+ and decide which argument to supply to rl_complete_internal (to list
+ completions, etc.).
+
+h. Readline now has an overwrite mode, toggled by the `overwrite-mode'
+ bindable command, which could be bound to `Insert'.
+
+i. New application-settable completion variable:
+ rl_completion_suppress_append, inhibits appending of
+ rl_completion_append_character to completed words.
+
+j. New key bindings when reading an incremental search string: ^W yanks
+ the currently-matched word out of the current line into the search
+ string; ^Y yanks the rest of the current line into the search string,
+ DEL or ^H deletes characters from the search string.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.05a-release,
+and the previous version, bash-2.05a-rc1.
+
+1. Changes to Bash
+
+a. Fixed the `printf' builtin so that the variable name supplied as an
+ argument to a %n conversion must be a valid shell identifier.
+
+b. Improved the random number generator slightly.
+
+c. Changes to configuration to not put -I/usr/include into $CFLAGS, since
+ it messes up some includes.
+
+d. Corrected description of POSIXLY_CORRECT in man page and info manual.
+
+e. Fixed a couple of cases of incorrect function prototypes that sneaked
+ through and caused compilation problems.
+
+f. A few changes to avoid potential core dumps in the programmable completion
+ code.
+
+g. Fixed a configure problem that could cause a non-existent file to show
+ up in LIBOBJS.
+
+h. Fixed a configure problem that could cause siglist.o to not be built when
+ required.
+
+i. Changes to the strtoimax and strtoumax replacement functions to work
+ around buggy compilers.
+
+j. Fixed a problem with the snprintf replacement function that could
+ potentially cause a core dump.
+
+2. Changes to Readline
+
+a. Fixed a locale-specific problem in the vi-mode `goto mark' command.
+
+b. Fixed Makefile to not put -I/usr/include into CFLAGS, since it can cause
+ include file problems.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.05a-rc1,
+and the previous version, bash-2.05a-beta1.
+
+1. Changes to Bash
+
+a. Fixed the snprintf replacement to correctly implement the `alternate form'
+ of the %g and %G conversions.
+
+b. Fixed snprintf to correctly handle the optional precision with the %g and
+ %G conversions.
+
+c. Fixed the arithmetic evaluation code to correct the values of `@' and `_'
+ when translating base-64 constants (they were backwards).
+
+d. New library functions for formatting long and long long ints.
+
+e. Fixed a few places where negative array subscripts could have occurred,
+ mostly as the result of systems using signed characters.
+
+f. Fixed a few places that assumed a pid_t was no wider than an int.
+
+g. Fixed the `maildir' mail checking code to work on systems where a
+ `struct stat' doesn't include an `st_blocks' member.
+
+h. Fixed snprintf to make `unsigned long long' conversion formats (%llu)
+ work better.
+
+i. Fixed snprintf to not print a sign when asked to do an unsigned conversion.
+
+j. Made configure changes to avoid compiling empty source files in lib/sh.
+
+k. New replacement functions (if necessary) for strtoull, strtoll, strtoimax,
+ strtoumax.
+
+l. The `printf' builtin now handles the `ll' and `j' length modifiers
+ directly, since they can affect the type and width of the argument
+ passed to printf(3).
+
+m. Renamed a number of the bash-specific autoconf macros in aclocal.m4 to
+ have more sytematic naming, with accompanying changes to configure.in.
+
+n. Fixed snprintf to handle long doubles and the %a/%A conversions by
+ falling back to sprintf, as long as sprintf supports them.
+
+o. Fixed return value from vsnprintf/snprintf to be the number of characters
+ that would have been printed, even if that number exceeds the buffer
+ size passed as an argument.
+
+p. Bash no longer attempts to define its own versions of some ctype macros
+ if they are implemented as functions in libc but not as macros in
+ <ctype.h>.
+
+q. Changed the variable printing code (used by `set', `export', etc.) to
+ not use the $'...' syntax when in posix mode, since that caused
+ interoperability problems with other shells (most notably with autoconf).
+ When not in posix mode, it uses $'...' if the string to be printed
+ contains non-printing characters and regular single quotes otherwise.
+
+r. snprintf now recognizes the %F conversion.
+
+s. Fixed a bug that could cause the wrong status to be returned by a shell
+ function when the shell is compiled without job control and a null
+ command containing a command substutition was executed in the function.
+
+t. When in posix mode, the default value for MAILCHECK is 600.
+
+u. Bash only initializes FUNCNAME, GROUPS, and DIRSTACK as special variables
+ if they're not in the initial environment.
+
+v. If SECONDS appears in the initial environment with a valid integer value,
+ bash uses that as the starting value, as if an assignment had been
+ performed.
+
+w. Bash no longer auto-exports HOME, PATH, SHELL, or TERM, even though it
+ gives them default values if they don't appear in the initial environment.
+
+x. Bash no longer auto-exports HOSTNAME, HOSTTYPE, MACHTYPE, or OSTYPE,
+ even if it assigns them default values.
+
+y. Bash no longer removes the export attribute from SSH_CLIENT or SSH2_CLIENT
+ if they appear in the initial environment.
+
+z. Bash no longer attempts to discover if it's being run by sshd in order to
+ run the startup files. If the SSH_SOURCE_BASHRC is uncommented in
+ config-top.h it will attempt to do so as previously, but that's commented
+ out in the distributed version.
+
+aa. Fixed a typo in the code that tests for LC_NUMERIC.
+
+bb. The POSIXLY_CORRECT shell variable and its effects are now documented.
+
+cc. Some changes to several of the support shell scripts included in the
+ definitions to try to avoid race conditions and attacks.
+
+dd. Several changes to avoid warnings from `gcc -Wall'.
+
+ee. Fixed a problem with the `unset' builtin that could cause incorrect
+ results if asked to unset a variable and an array subscript in the
+ same command.
+
+ff. A few changes to the shell's temporary file creation code to avoid
+ potential file descriptor leaks and to prefer the system's idea of
+ the temporary directory to use.
+
+gg. Fixes to build with the C alloca in lib/malloc/alloca.c if the system
+ requires it but the shell has been configured --without-bash-malloc.
+
+hh. Updated the documentation to note that only interactive shells resend
+ SIGHUP to all jobs before exiting.
+
+ii. Fixes to only pass unquoted tilde words to tilde_expand, rather than
+ rely on tilde_expand or getpwnam(3) to handle the quotes (MacOS 10.x
+ will remove backslashes in any login name passed to getpwnam(3)).
+
+jj. Small change from Paul Eggert to make LINENO right in commands run with
+ `bash -c'.
+
+2. New Features in Bash
+
+a. The `printf' builtin now handles the %a and %A conversions if they're
+ implemented by printf(3).
+
+b. The `printf' builtin now handles the %F conversion (just about like %f).
+
+c. The `printf' builtin now handles the %n conversion like printf(3). The
+ corresponding argument is the name of a shell variable to which the
+ value is assigned.
+
+3. Changes to Readline
+
+a. Fixed a few places where negative array subscripts could have occurred.
+
+b. Fixed the vi-mode code to use a better method to determine the bounds of
+ the array used to hold the marks.
+
+c. Fixed the defines in chardefs.h to work better when chars are signed.
+
+d. Fixed configure.in to use the new names for bash autoconf macros.
+
+e. Readline no longer attempts to define its own versions of some ctype
+ macros if they are implemented as functions in libc but not as macros in
+ <ctype.h>.
+
+f. Fixed a problem where rl_backward could possibly set point to before
+ the beginning of the line.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.05a-beta1,
+and the previous version, bash-2.05a-alpha1.
+
+1. Changes to Bash
+
+a. Fixed a bug in the evalution of arithmetic `for' statements when the
+ expanded expression is NULL.
+
+b. Fixed an unassigned variable problem in the redirection printing code.
+
+c. Added more prototypes to extern function declarations in the header
+ files and to static function declarations in C source files.
+
+d. Make sure called functions have a prototype in scope, to get the arguments
+ and return values right instead of casting. Removed extern function
+ declarations from C source files that were already included in header
+ files.
+
+e. Changed some function arguments to use function typedefs in general.h so
+ the prototypes can be checked. The only use of Function and VFunction
+ now is for unwind-protects.
+
+f. More const changes to function arguments and appropriate variables.
+
+g. Changed the mail checking support to handle `maildir'-style mail
+ directories.
+
+h. Augmented the bash malloc to pass in the file and line number information
+ for each malloc, realloc, and free. This should result in better error
+ messages.
+
+i. The `old' gnu malloc is no longer a configuration option.
+
+j. Augmented the bash malloc with optional tracing and registering allocated
+ and freed memory.
+
+k. Prompt string decoding now saves and restores the value of $? when it
+ expands the prompt string, so command substitutions don't change $?.
+
+i. Array indices are now `long', since shell arithmetic is performed as long,
+ and the internal arrayind_t type is used consistently.
+
+j. Some more `unsigned char *' fixes from Paul Eggert.
+
+k. Fixed a bad call to builtin_error that could cause core dumps when making
+ local variables.
+
+l. `return' may no longer be used to terminate a `select' command, for
+ compatibility with ksh.
+
+m. Changed code that reads octal numbers to do a better job of detecting
+ overflows.
+
+n. The time formatting code no longer uses absolute indices into a buffer,
+ because the buffer size changes depending on the size of a `time_t'.
+
+o. `umask' now prints four digits when printing in octal mode, for
+ compatibility with other shells.
+
+p. Lots of changes to the `printf' builtin from Paul Eggert: it handles `L'
+ formats and long doubles better, and internal functions have been
+ simpified where appropriate.
+
+q. Some `time_t' fixes for machines were a time_t is bigger than a long.
+
+r. Replaced some bash-specific autoconf macros with standard equivalents.
+
+s. Improvmed the code that constructs temporary filenames to make the
+ generated names a bit more random.
+
+t. Added code that checks for ascii before calling any of the is* ctype
+ functions.
+
+u. Changed some places where a `char' was used as an array subscript to use
+ `unsigned char', since a `char' can be negative if it's signed by default.
+
+v. Lots of changes to the `ulimit' builtin from Paul Eggert to add support
+ for the new POSIX-200x RLIM_SAVED_CUR and RLIM_SAVED_MAX values and
+ simplify the code.
+
+w. `ulimit' now prints the description of a resource in any error message
+ relating to fetching or setting that resource's limits.
+
+x. The `snprintf' replacement now computes maximum values at compile
+ time rather than using huge constants for things like long long.
+
+y. Interactive shells now ignore `set -n'.
+
+z. Changed the malloc bookkeeping information so that it's now 8 bytes
+ instead of 12 on most 32-bit machines (saving 4 bytes per allocation),
+ restoring 8-byte alignment.
+
+aa. The malloc error reporting code now attempts to print the file and line
+ number of the call that caused the error.
+
+bb. Changed the redirection error reporting code to catch EBADF errors and
+ report the file descriptor number rather than the file being redirected
+ to or from (e.g., things like `exec 4242<x' where 4242 is an out-of-range
+ file descriptor).
+
+cc. `printf', `echo -e', and the $'...' code now process only two hex digits
+ after a `\x' escape sequence for compatibility with other shells, and
+ the documentation was changed to note that the octal and hex escape
+ sequences result in an eight-bit value rather than strict ASCII.
+
+2. Changes to Readline
+
+a. The completion code now attempts to do a better job of preserving the
+ case of the word the user typed if ignoring case in completions.
+
+b. Readline defaults to not echoing the input and lets the terminal
+ initialization code enable echoing if there is a controlling terminal.
+
+c. The key binding code now processes only two hex digits after a `\x'
+ escape sequence, and the documentation was changed to note that the
+ octal and hex escape sequences result in an eight-bit value rather
+ than strict ASCII.
+
+3. New Features in Bash
+
+a. The builtin `ulimit' now takes two new non-numeric arguments: `hard',
+ meaning the current hard limit, and `soft', meaning the current soft
+ limit, in addition to `unlimited'
+
+b. `ulimit' now prints the option letter associated with a particular
+ resource when printing more than one limit.
+
+c. `ulimit' prints `hard' or `soft' when a value is not `unlimited' but is
+ one of RLIM_SAVED_MAX or RLIM_SAVED_CUR, respectively.
+
+4. New Features in Readline
+
+a. New bindable variable `history-preserve-point'. If set, the history
+ code attempts to place the user at the same location on each history
+ line retrived with previous-history or next-history.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.05a-alpha1,
+and the previous version, bash-2.05-release.
+
+1. Changes to Bash
+
+a. Better checks in the redirection code for write errors.
+
+b. bashbug now uses $TMPDIR, defaulting to /tmp, and uses mktemp(1) more
+ portably.
+
+c. System-specific configuration changes for: Interix, OpenBSD, FreeBSD,
+ MacOS X.
+
+d. Some more `const' cleanups through the code.
+
+e. Fixed a typo in the /dev/fd redirection code, better checks for valid
+ numeric fds in /dev/fd.
+
+f. Fixed many parts of the shell to handle integer overflow more gracefully
+ and to do more stringent checks for valid numbers.
+
+g. Fixed mksignames to include config.h.
+
+h. Fixed an uninitialized variable problem that could cause the shell to core
+ dump when replacing characters in a string.
+
+i. New mechanism for updating the patch level when official patches are
+ released (patchlevel.h).
+
+j. configure.in changed to no longer require external files _distribution and
+ _patchlevel.
+
+k. Fixed non-interactive shell initialization problem when bash started as
+ `bash -i filename'.
+
+l. Fixed printf builtin conversion error handling to be POSIX.2-conformant.
+
+m. autoconf-2.52 is now used to build configure; autoconf-2.50 or newer is
+ required. Some of the bash-specific macros were removed, since they are
+ now standard.
+
+n. Startup files and files read with source or `.' are no longer required to
+ be regular files.
+
+o. Fixed core dump in builtin printf when user-supplied precision or field
+ width is 0.
+
+p. Fixed builtin printf to treat a negative field width as a positive field
+ width with left-justification.
+
+r. New unwind-protect implementation from Paul Eggert.
+
+s. Fixed an inadvertently-unclosed comment in the bash completion code that
+ caused programmable completions to not add trailing slashes or spaces to
+ completions.
+
+t. Fixed the process substitution code to cope better when stdin is closed.
+
+v. Fixes, mostly from Paul Eggert, for a few possible buffer overflows in
+ the shell.
+
+w. Fixes from Paul Eggert to avoid most of the type casts in the shell code,
+ and use more appropriate types for a number of variables.
+
+x. Command substition no longer inherits the DEBUG trap.
+
+y. Some fixes to the process substition code on machines without /dev/fd so
+ that named pipes are not removed inappropriately.
+
+z. The loadable `getconf' builtin is now much more complete, and will become
+ part of the shell in the future.
+
+aa. The select command no longer terminates on a `return', so it can be used
+ to return from an enclosing function (as ksh does it).
+
+bb. Fixed the extended pattern matching code to behave better when presented
+ with incorrectly-formed patterns.
+
+cc. Some changes were made with the intent of making cross-compilation easier.
+
+dd. The network code (/dev/tcp and /dev/udp redirections) uses getaddrinfo(3)
+ if it's available, which adds support for IPv6.
+
+ee. Subshells of login shells no longer source ~/.bash_logout when they exit.
+
+ff. Fixes so that subshells don't exit inappropriately if the -e option has
+ been set.
+
+gg. Restricted shells no longer allow functions to be exported.
+
+hh. Changes to the pattern matching code so extended pattern matching works
+ on systems with deficient shared library implementations, like MacOS X.
+
+ii. Better error messages when a script with a leading `#!interp' fails
+ to execute because of problems with `interp'.
+
+jj. Fixed `compgen' to handle the `-o default' option better.
+
+kk. Fixed the job control code to force an asynchronous process's standard
+ input to /dev/null only if job control is not active.
+
+ll. Fixed a possible infinite recursion problem when `fc ""=abc' (a null
+ pattern) is used to re-execute a previous command.
+
+mm. Fixed `declare [-a] var=value' to assign VALUE to element 0 if VAR is an
+ array variable. Similarly for `declare [-a] var[N]=value'. This is like
+ ksh93.
+
+nn. Fixed a bug that caused `read -a aname' to work even if ANAME had been
+ declared readonly.
+
+oo. Fixed a possible integer overflow problem when constructing names for
+ temporary files.
+
+2. New Features in Bash
+
+a. Added support for DESTDIR installation root prefix, so you can do a
+ `make install DESTDIR=bash-root' and do easier binary packaging.
+
+b. Added support for builtin printf "'" flag character as per latest POSIX
+ drafts.
+
+c. Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from
+ ISO C99).
+
+d. New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications
+ (bash doesn't use very much of what it returns).
+
+e. `set [-+]o nolog' is recognized as required by the latest POSIX drafts,
+ but ignored.
+
+f. New read-only `shopt' option: login_shell. Set to non-zero value if the
+ shell is a login shell.
+
+g. New `\A' prompt string escape sequence; expands to time in 24 HH:MM format.
+
+h. New `-A group/-g' option to complete and compgen; does group name
+ completion.
+
+i. New `-t' option to `hash' to list hash values for each filename argument.
+
+j. New [-+]O invocation option to set and unset `shopt' options at startup.
+
+k. configure's `--with-installed-readline' option now takes an optional
+ `=PATH' suffix to set the root of the tree where readline is installed
+ to PATH.
+
+l. The ksh-like `ERR' trap has been added. The `ERR' trap will be run
+ whenever the shell would have exited if the -e option were enabled.
+ It is not inherited by shell functions.
+
+m. `readonly', `export', and `declare' now print variables which have been
+ given attributes but not set by assigning a value as just a command and
+ a variable name (like `export foo') when listing, as the latest POSIX
+ drafts require.
+
+n. `bashbug' now requires that the subject be changed from the default.
+
+o. configure has a new `--enable-largefile' option, like other GNU utilities.
+
+p. `for' loops now allow empty word lists after `in', like the latest POSIX
+ drafts require.
+
+3. Changes to Readline
+
+a. More `const' and type casting fixes.
+
+b. Changed rl_message() to use vsnprintf(3) (if available) to fix buffer
+ overflow problems.
+
+c. The completion code no longer appends a `/' or ` ' to a match when
+ completing a symbolic link that resolves to a directory name, unless
+ the match does not add anything to the word being completed. This
+ means that a tab will complete the word up to the full name, but not
+ add anything, and a subsequent tab will add a slash.
+
+d. Fixed a trivial typo that made the vi-mode `dT' command not work.
+
+e. Fixed the tty code so that ^S and ^Q can be inserted with rl_quoted_insert.
+
+f. Fixed the tty code so that ^V works more than once.
+
+g. Changed the use of __P((...)) for function prototypes to PARAMS((...))
+ because the use of __P in typedefs conflicted g++ and glibc.
+
+4. New Features in Readline
+
+a. Added extern declaration for rl_get_termcap to readline.h, making it a
+ public function (it was always there, just not in readline.h).
+
+b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402,
+ RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2.
+
+c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION.
+
+d. New bindable boolean readline variable: match-hidden-files. Controls
+ completion of files beginning with a `.' (on Unix). Enabled by default.
+
+e. The history expansion code now allows any character to terminate a
+ `:first-' modifier, like csh.
+
+f. The incremental search code remembers the last search string and uses
+ it if ^R^R is typed without a search string.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.05-release,
+and the previous version, bash-2.05-beta2.
+
+1. Changes to Bash
+
+a. Make sure we note that the first line of a multi-line command was not
+ saved in the history if the tests for HISTCONTROL succeed, but the
+ HISTIGNORE check fails.
+
+b. Fixed a bug in the pattern matching code that caused `[' to be treated
+ as a special character inside a `[...]' bracket expression.
+
+c. Fixed a bug in the pattern matching code that caused `]' to terminate
+ a bracket expression even if it was the first character after the `['
+ (or a leading `!' or `^').
+
+d. Made a small change to report a more user-friendly error message if
+ execve(2) fails because of an error with the interpreter in a script
+ with a leading `#! interpreter'.
+
+e. If the OS does not support an exec(2) magic number of `#!', make sure we
+ have a non-null interpreter name before attempting to execute it.
+
+f. Fixed a bug that caused the shell process to end up in a different
+ process group than the controlling terminal if a job-control shell was
+ run with `exec' in the startup files.
+
+g. When started in POSIX mode, either by `bash --posix', `bash -o posix', or
+ `sh', $SHELLOPTS includes `posix' and POSIXLY_CORRECT is set.
+
+h. Fixed a problem that caused the `\W' prompt string escape sequence to
+ expand to nothing when $PWD was `//'.
+
+i. The `bashbug' shell script no longer uses $(...) command substitution.
+
+j. When `set' is invoked without options in POSIX mode, it no longer prints
+ the names and definitions of shell functions.
+
+2. Changes to Readline
+
+a. rl_set_paren_blink_timeout() is now documented.
+
+b. Corrected history.3 man page: `$' is not in the default value of
+ history_word_delimiters.
+
+c. If a hook function assigned to rl_event_hook sets rl_done to a non-zero
+ value, rl_read_key() now immediately returns '\n' (which is assumed to
+ be bound to accept-line).
+
+3. New Features in Bash
+
+a. The `>&word' redirection now works in POSIX mode as it does by default,
+ since POSIX.2 leaves it unspecified.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.05-beta2,
+and the previous version, bash-2.05-beta1.
+
+1. Changes to Bash
+
+a. Fixed a bug in the arithmetic evaluation code so that a^=b is supported.
+
+b. Fixed startup so posixly_correct is retained across subshells begun to
+ execute scripts without a leading `#!'.
+
+c. Fixed a bug that caused $(< file) to not work in a (...) subshell.
+
+d. Added config support for Linux running on the IBM S390.
+
+e. Fixed a bug that caused bash to get its input pointer out of sync when
+ reading commands through a pipe and running a command with standard
+ input redirected from a file.
+
+f. Made a change so that command completion now makes about half as many
+ stat(2) calls when searching the $PATH.
+
+g. Fixed a bug that caused variable assignments preceding `return' to not
+ be propagated to the shell environment in POSIX mode.
+
+h. Fixed a bug with ${parameter[:]?word} -- tilde expansion was not performed
+ on `word'.
+
+i. In POSIX mode, `break' and `continue' do not complain and return success
+ if called when the shell is not executing a loop.
+
+j. Fixed `bash -o posix' to work the same as `bash --posix'.
+
+k. Fixed a bug where variable assignments preceding `eval' or `source/.'
+ would not show up in the environment exported to subshells run by the
+ commands.
+
+l. In POSIX mode, shells started to execute command substitutions inherit
+ the value of the `-e' option from their parent shell.
+
+m. In POSIX mode, aliases are expanded even in non-interactive shells.
+
+n. Changed some of the job control messages to display the text required by
+ POSIX.2 when the shell is in POSIX mode.
+
+o. Fixed a bug in `test' that caused it to occasionally return incorrect
+ results when non-numeric arguments were supplied to `-t'.
+
+2. Changes to Readline
+
+a. Some changes were made to avoid gcc warnings with -Wall.
+
+b. rl_get_keymap_by_name now finds keymaps case-insensitively, so
+ `set keymap EMACS' works.
+
+c. The history file writing and truncation functions now return a useful
+ status on error.
+
+d. Fixed a bug that could cause applications to dereference a NULL pointer
+ if a NULL second argument was passed to history_expand().
+
+3. New Features in Bash
+
+a. doc/readline.3 has been moved to the readline distribution.
+
+4. New Features in Readline
+
+a. New function, rl_get_screen_size (int *rows, int *columns), returns
+ readline's idea of the screen dimensions.
+
+b. The timeout in rl_gather_tyi (readline keyboard input polling function)
+ is now settable via a function (rl_set_keyboard_input_timeout()).
+
+c. Renamed the max_input_history variable to history_max_entries; the old
+ variable is maintained for backwards compatibility.
+
+d. The list of characters that separate words for the history tokenizer is
+ now settable with a variable: history_word_delimiters. The default
+ value is as before.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.05-beta1,
+and the previous version, bash-2.05-alpha1.
+
+1. Changes to Bash
+
+a. Changes to allow shared library and object building on the GNU Hurd.
+
+b. Fixes to the way exported functions are placed into the environment and
+ cached.
+
+c. The globbing library once again respects locales when processing ranges
+ in bracket expressions while doing pattern matching.
+
+d. System-specific configuration changes for: Tru 64, Interix
+
+e. Bashbug now uses /usr/bin/editor as one of the editing alternatives, and
+ will use mktemp(1) or tempfile(1), if present, for temporary file creation.
+
+f. Bash no longer performs a binary file check on a script argument that's
+ really a tty (like /dev/fd/0 or /dev/stdin).
+
+g. Fixed a bug in the execution of shell scripts that caused the effects of
+ $BASH_ENV to be undone in some cases.
+
+h. Fixed several bugs that made `bash [-i] /dev/stdin' not work correctly.
+
+i. Several changes to the job control code to avoid some signal state
+ manipulation.
+
+j. The Bash malloc no longer blocks signals as often, which should make it
+ faster.
+
+k. Fixed a parsing bug that did not allow backslash to escape a single quote
+ inside a $'...' construct.
+
+l. Fixed a bug that caused things like ${var:=$'value'} to be parsed
+ incorrectly. This showed up in newer versions of autoconf.
+
+m. Fixed a bug in the bash-specific readline initialization that caused
+ key bindings to bash-specific function names appearing in .inputrc to
+ not be honored.
+
+n. Bash now sets the file descriptor it uses to save the file descriptor
+ opened on a shell script to close on exec.
+
+o. Fixed a bug in the prompt string decoding that caused it to misbehave
+ when presented an octal sequence of fewer than three characters.
+
+p. Fixed the `test' builtin to return an error if `[' is supplied a single
+ argument that is not `]'.
+
+q. Fixed a bug that caused subshells started to run executable shell scripts
+ without a leading `#!' to incorrectly inherit an argument list preceding
+ a shell builtin (like such a script called from a script sourced with `.',
+ where there were variable assignments preceding the `.' command)
+
+r. Fixed a bug that caused changes to variables supplied in an assignment
+ statement preceding a shell builtin to not be honored (like a script
+ run with `.').
+
+s. HOSTTYPE, OSTYPE, and MACHTYPE are set only if they do not have values
+ when the shell is started.
+
+t. Fixed a bug that caused SIGINT to kill shell scripts after the script
+ called `wait'.
+
+u. The `fc' builtin now tries to create its temporary files in the directory
+ named by $TMPDIR.
+
+v. Bash no longer calls any Readline functions or uses any Readline variables
+ not declared in readline.h.
+
+w. Fixed a bug that caused some substitutions involving $@ to not be split
+ correctly, especially expansions of the form ${paramterOPword}.
+
+x. SSH2_CLIENT is now treated like SSH_CLIENT and not auto-exported if it
+ appears in the initial environment.
+
+y. Fixed a couple of problems with shell scripts without a leading `#!'
+ being executed out of shell functions that could cause core dumps if
+ such a script attempted to execute `return'.
+
+z. Fixed a problem with the `-nt' and `-ot' binary operators for the
+ `test/[' builtin and the `[[' conditional command that caused wrong
+ return values if one of the file arguments did not exist.
+
+aa. Fixed a bug that caused non-interactive shells which had previously
+ executed `shopt -s expand_aliases' to fail to expand aliases in a
+ command like `(command) &'.
+
+2. Changes to Readline
+
+a. Changes to make most (but not yet all -- there is still crlf()) of the
+ exported readline functions declared in readline.h have an rl_ prefix.
+
+b. More `const' changes in function arguments, mostly for completion
+ functions.
+
+c. Fixed a bug in rl_forward that could cause the point to be set to before
+ the beginning of the line in vi mode.
+
+d. Fixed a bug in the callback read-char interface to make it work when a
+ readline function pushes some input onto the input stream with
+ rl_execute_next (like the incremental search functions).
+
+e. Fixed a file descriptor leak in the history file manipulation code that
+ was tripped when attempting to truncate a non-regular file (like
+ /dev/null).
+
+f. Some existing variables are now documented and part of the public
+ interface (declared in readline.h): rl_explict_arg, rl_numeric_arg,
+ rl_editing_mode, rl_last_func.
+
+g. Renamed rltty_set_default_bindings to rl_tty_set_default_bindings and
+ crlf to rl_crlf, so there are no public functions declared in readline.h
+ without an `rl_' prefix. The old functions still exist for backwards
+ compatibility.
+
+3. New Features in Bash
+
+a. A new loadable builtin, realpath, which canonicalizes and expands symlinks
+ in pathname arguments.
+
+b. When `set' is called without options, it prints function defintions in a
+ way that allows them to be reused as input. This affects `declare' and
+ `declare -p' as well.
+
+4. New Features in Readline
+
+a. New application-callable function rl_set_prompt(const char *prompt):
+ expands its prompt string argument and sets rl_prompt to the result.
+
+b. New application-callable function rl_set_screen_size(int rows, int cols):
+ public method for applications to set readline's idea of the screen
+ dimensions.
+
+c. The history example program (examples/histexamp.c) is now built as one
+ of the examples.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.05-alpha1,
+and the previous version, bash-2.04-release.
+
+1. Changes to Bash
+
+a. A fix was made to allow newlines in compond array assignments.
+
+b. configure now checks for real-time signals with unusable values.
+
+c. Interactive shells no longer exit if a substitution fails because of an
+ unset variable within a sourced file.
+
+d. Fixed a problem with incorrect matching of extended glob patterns when
+ doing pattern substitution.
+
+e. `{' is now quoted by the completion code when it appears in a filename.
+
+f. Fixed an error in pattern matching that caused the matcher to not
+ correctly skip the rest of a bracket expression after a character
+ matched.
+
+g. Fixed a bug in the IFS word splitting code to make a non-whitespace IFS
+ character preceded by IFS whitespace part of the current delimiter rather
+ than generating a separate field.
+
+h. The {!prefix@} expansion now generates separate words, analogous to $@,
+ when double-quoted.
+
+i. Command substitution now ignores NUL bytes in the command output, and the
+ parser ignores them on input.
+
+j. A fix was made to the job control code to prevent hanging processes when
+ the shell thinks background processes are running but the kernel returns
+ -1/ECHILD from waitpid().
+
+k. `pwd' now prints an error message if the write fails when displaying the
+ current directory.
+
+l. When in POSIX mode, the shell prints trap dispostions without a leading
+ `SIG' in the signal specification.
+
+m. Fixed a parser bug that caused the current command's line count to be
+ messed up by a compound array assignment.
+
+n. Fixed a bug in the unwind-protect code that caused bad behavior on machines
+ where ints and pointers are not the same size.
+
+o. System-specific configure changes for: MacOS X.
+
+p. Changes for Cygwin to translate \r\n and \r to \n and to set file
+ descriptors used for reading input to text mode in various places.
+
+q. Fixed a bug that caused `!' to occasionally not be honored when in
+ a (...) subshell.
+
+r. Bash no longer assumes that getcwd() will return any useful error message
+ in the buffer passed as an argument if the call fails.
+
+s. The `source', `.', and `fc' builtins no longer check whether a file is
+ binary before reading commands from it.
+
+t. Subshells no longer turn off job control when they exit, since that
+ sometimes resulted in the terminal being reset to the wrong process
+ group.
+
+u. The history code no longer tries to save the second and subsequent lines
+ of a multi-line command if the first line was not saved.
+
+v. The history saving code now does a better job of saving blank lines in a
+ multi-line command.
+
+w. Removed a `feature' that made `ulimit' silently translate `unlimited' to
+ the current hard limit, which obscured some kernel error returns.
+
+x. Fixed the grammar so that `}' is recognized as a reserved word after
+ another reserved word, rather than requiring a `;' or newline. This
+ means that constructs like
+
+ { { echo a b c ; } }
+
+ work as expected.
+
+y. Conditional commands ([[...]]) now perform tilde expansion on their
+ arguments.
+
+z. Noted in the documentation that `set -a' will cause functions to be
+ exported if they are defined after `set -a' is executed.
+
+aa. When an interactive login shell starts, if $PWD and $HOME refer to the
+ same directory but are not the same string, $PWD is set to $HOME.
+
+bb. Fixed `printf' to handle invalid floating point numbers better.
+
+cc. Temporary files are now created with random filenames, to improve security.
+
+dd. The readline initialization code now binds the custom bash functions and
+ key bindings after the readline defaults are set up.
+
+ee. Fixed the `source' builtin to no longer overwrite a shell function's
+ argument list, even if the sourced file changes the positional parameters.
+
+ff. A bug fix was made in the expansion of `$*' in contexts where it should
+ not be split, like assignment statements.
+
+gg. Fixed a bug in the parameter substring expansion to handle conditional
+ arithmetic expressions ( exp ? val1 : val2 ) without cutting the expression
+ off at the wrong `:'.
+
+hh. The `<>' redirection is no longer subject to the current setting of
+ `noclobber', as POSIX.2 specifies.
+
+ii. Fixed a bug in the conditional command parsing code that caused expressions
+ in parentheses to occasionally be parsed incorrectly.
+
+jj. Fixed a bug in the ((...)) arithmetic command to allow do...done or
+ {...} to follow the )) without an intervening list terminator.
+
+kk. `printf' now treats `\E' the same as `\e' when performing backslash escape
+ expansion for the `%b' format specifier.
+
+ll. When in POSIX mode, the shell no longer searches the current directory for
+ a file to be sourced with `.' or `source' if `.' is not in $PATH.
+
+mm. Interactive comments are no longer turned off when POSIX mode is disabled.
+
+nn. The UID, EUID, HOSTNAME variables are not set if they are in the shell's
+ environment when it starts up.
+
+oo. Fixed a bug in the `command' builtin so the effect of a command like
+ `command exec 4<file' is as if the `command' had been omitted.
+
+pp. ${foo[@]} and ${foo[*]} now work as in ksh93 if `foo' is not an array
+ variable.
+
+qq. ${#foo[X]}, where X is 0, @, or *, now work as in ksh93 if `foo' is not
+ an array variable.
+
+rr. The shell's idea of an absolute pathname now takes into account a
+ possible drive specification on Cygwin and other Windows systems.
+
+ss. Fixed a bug which caused incorrect parsing of some multi-character
+ constructs if they were split across input lines with backslash-newline
+ line continuation.
+
+tt. Fixed a bug that caused restricted shell mode to be set inappropriately
+ when trying to execute a shell script without a leading `#!'.
+
+uu. Shell function definitions no longer require that the body be a group
+ command ( {...} ), as POSIX.2 requires.
+
+vv. The `cd' and `pwd' builtins now process symlinks in pathnames internally
+ and should require many fewer calls to getcwd().
+
+ww. Fixed a bug that caused a pipeline's process group to be set incorrectly
+ if one of the pipeline elements contained a command substitution.
+
+xx. Fixed a bug that caused core dumps when expanding the value of HISTIGNORE.
+
+yy. The output of `set' is now quoted using $'...' so invisible characters are
+ displayed as escape sequences.
+
+zz. Fixed the help text for `unset', since PATH and IFS may both be unset.
+
+aaa. The shell no longer puts directory names into the command hash table.
+
+bbb. Fixed a bug in `read' that caused it to occasionally free memory twice if
+ it was interrupted after reading a large amount of data.
+
+ccc. Assignment statements that attempt to assign values to readonly variables
+ now cause the command to return an error status.
+
+ddd. Fixed a bug that could cause incorrect output if a $(<file) construct was
+ interrupted.
+
+eee. GROUPS and FUNCNAME now return an error status when assignment is
+ attempted, but may be unset (in which case they lose their special
+ properties). In all respects except unsetting, they are readonly.
+
+fff. The string-to-integer conversion code now ignores trailing whitespace in
+ the string, even if strtol(3) does not.
+
+ggg. The tcsh magic-space function now does a better job of inserting the
+ space close to where the point was before the history expansion, rather
+ than just appending it.
+
+hhh. Fixed a bug which caused a file sourced from an interactive shell to
+ fill up the jobs table if it ran lots of jobs.
+
+iii. Fixed a bug in the parameter pattern substitution code to avoid infinite
+ recursion on zero-length matches.
+
+2. Changes to Readline
+
+a. When setting the terminal attributes on systems using `struct termio',
+ readline waits for output to drain before changing the attributes.
+
+b. A fix was made to the history word tokenization code to avoid attempts to
+ dereference a null pointer.
+
+c. Readline now defaults rl_terminal_name to $TERM if the calling application
+ has left it unset, and tries to initialize with the resultant value.
+
+d. Instead of calling (*rl_getc_function)() directly to get input in certain
+ places, readline now calls rl_read_key() consistently.
+
+e. Fixed a bug in the completion code that allowed a backslash to quote a
+ single quote inside a single-quoted string.
+
+f. rl_prompt is no longer assigned directly from the argument to readline(),
+ but uses memory allocated by readline. This allows constant strings to
+ be passed to readline without problems arising when the prompt processing
+ code wants to modify the string.
+
+g. Fixed a bug that caused non-interactive history searches to return the
+ wrong line when performing multiple searches backward for the same string.
+
+h. Many variables, function arguments, and function return values are now
+ declared `const' where appropriate, to improve behavior when linking with
+ C++ code.
+
+i. The control character detection code now works better on systems where
+ `char' is unsigned by default.
+
+j. The vi-mode numeric argument is now capped at 999999, just like emacs mode.
+
+k. The Function, CPFunction, CPPFunction, and VFunction typedefs have been
+ replaced with a set of specific prototyped typedefs, though they are
+ still in the readline header files for backwards compatibility.
+
+m. Nearly all of the (undocumented) internal global variables in the library
+ now have an _rl_ prefix -- there were a number that did not, like
+ screenheight, screenwidth, alphabetic, etc.
+
+n. The ding() convenience function has been renamed to rl_ding(), though the
+ old function is still defined for backwards compatibility.
+
+o. The completion convenience functions filename_completion_function,
+ username_completion_function, and completion_matches now have an rl_
+ prefix, though the old names are still defined for backwards compatibility.
+
+p. The functions shared by readline and bash (linkage is satisfied from bash
+ when compiling with bash, and internally otherwise) now have an sh_ prefix.
+
+q. Changed the shared library creation procedure on Linux and BSD/OS 4.x so
+ that the `soname' contains only the major version number rather than the
+ major and minor numbers.
+
+r. Fixed a redisplay bug that occurred when the prompt spanned more than one
+ physical line and contained invisible characters.
+
+3. New Features in Bash
+
+a. Added a new `--init-file' invocation argument as a synonym for `--rcfile',
+ per the new GNU coding standards.
+
+b. The /dev/tcp and /dev/udp redirections now accept service names as well as
+ port numbers.
+
+c. `complete' and `compgen' now take a `-o value' option, which controls some
+ of the aspects of that compspec. Valid values are:
+
+ default - perform bash default completion if programmable
+ completion produces no matches
+ dirnames - perform directory name completion if programmable
+ completion produces no matches
+ filenames - tell readline that the compspec produces filenames,
+ so it can do things like append slashes to
+ directory names and suppress trailing spaces
+
+4. New Features in Readline
+
+a. The blink timeout for paren matching is now settable by applications.
+
+b. _rl_executing_macro has been renamed to rl_executing_macro, which means
+ it's now part of the public interface.
+
+c. Readline has a new variable, rl_readline_state, which is a bitmap that
+ encapsulates the current state of the library; intended for use by
+ callbacks and hook functions.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.04-release,
+and the previous version, bash-2.04-beta5.
+
+1. Changes to Bash
+
+a. Better compile-time and configure-time checks for the necessity of
+ inet_aton().
+
+b. A bug was fixed in the expansion of "${@:-}" when there are positional
+ parameters.
+
+c. A typo was fixed in the output of `complete'.
+
+d. The matches generated for a word by the `-W' argument to complete and
+ compgen are now matched against the word being completed, and only
+ matches are returned as the result.
+
+e. Some fixes were made for systems which do not restart read(2) when a
+ signal caught by bash is received.
+
+f. A bug was fixed which caused the umask to be set to 0 when an invalid
+ symbolic mode mask was parsed.
+
+g. Fixed a bug that could cause a core dump if a SIGCHLD was received while
+ performing an assignment statement using command substitution.
+
+h. Changed the word splitting function for programmable completion so cases
+ in which the cursor is between words are handled a bit better.
+
+2. Changes to Readline
+
+a. rl_funmap_names() is now documented.
+
+3. New Features in Bash
+
+a. The LC_NUMERIC variable is now treated specially, and used to set the
+ LC_NUMERIC locale category for number formatting, e.g., when `printf'
+ displays floating-point numbers.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.04-beta5,
+and the previous version, bash-2.04-beta4.
+
+1. Changes to Bash
+
+a. A couple of changes were made to the Makefiles for easier building on
+ non-Unix systems.
+
+b. Fixed a bug where the current prompt would be set to $PS2 at startup.
+
+c. The shell script that tests an already-installed version was changed to
+ remove the directory it created its test programs in at exit.
+
+d. Several changes were made to the code that tokenizes an input line for
+ the programmable completion code. Shell metacharacters will now appear
+ as individual words in the word list passed to the completion functions.
+ Some of the example completion shell functions were changed to understand
+ redirection operators.
+
+e. A bug was fixed that, under obscure circumstances, could confuse the
+ parser when a shell function was run by the programmable completion code.
+
+f. A bug was fixed in the ulimit builtin for systems not using getrlimit().
+
+g. The execution code now propagates the correct exit status back to the rest
+ of the code if the return value of a subshell command was being inverted.
+ Some new test cases for inverting return values with the `!' reserved
+ word have been added.
+
+h. Negative exponents in the arithmetic evaluation of v**e now return an
+ evaluation error.
+
+i. A bug that caused bash to check the wrong process in a pipeline for
+ abnormal termination (and consequently resetting the terminal attributes)
+ was fixed.
+
+j. Fixed a bug that caused $PS2 to be displayed after PROMPT_COMMAND was
+ executed.
+
+2. Changes to Readline
+
+1. Fixed a bug in a C preprocessor define that caused the keypad control
+ functions to be compiled out for all platforms except DJGPP.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.04-beta4,
+and the previous version, bash-2.04-beta3.
+
+1. Changes to Bash
+
+a. A couple of changes were made to the redirection to attempt to avoid
+ race conditions and malicious file replacement.
+
+2. A change was made to the string evaluation code (used for command
+ substitution, `eval', and the `.' builtin) to fix an obscure core
+ dump on alpha machines.
+
+3. A bug that caused $LINENO to be wrong when executing arithmetic for
+ commands was fixed.
+
+4. A couple of memory leaks in the programmable completion code were fixed.
+
+5. A bug that could cause a core dump by freeing memory twice during a call
+ to `eval' if `set -u' had been enabled and an undefined variable was
+ referenced was fixed.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.04-beta3,
+and the previous version, bash-2.04-beta2.
+
+1. Changes to Bash
+
+a. Bash should run the appropriate startup files when invoked by ssh2.
+
+b. Fixed a bug in the parsing of conditional commands that could cause a
+ core dump.
+
+c. Fixed a bug in parsing job specifications that occasionally caused
+ core dumps when an out-of-range job was referenced.
+
+d. Fixed the `type' and `command' builtins to do better reporting of
+ commands that are not found in $PATH or the hash table.
+
+e. Fixed a POSIX.2 compliance problem in the command builtin -- commands
+ are supposed to be reported as full pathnames.
+
+f. The `echo' builtin now returns failure if a write error occurs.
+
+g. Fixed a bug which caused the locale to not be reset correctly when
+ LC_ALL was unset.
+
+h. Changed description of `getopts' in man page and reference manual to make
+ it clear that option characters may be characters other than letters.
+
+i. If the shell exits while in a function, make sure that any trap on EXIT
+ doesn't think the function is still executing.
+
+j. Bashbug now tries harder to find a usable editor if $EDITOR is not set,
+ rather than simply defaulting to `emacs'.
+
+k. Changes to the scripts that guess and canonicalize the system type, from
+ the latest `automake' distribution via Debian.
+
+l. When using named pipes for process substitution, make sure the file
+ descriptors opened for reading are set to non-blocking mode.
+
+m. Fixed a bug that caused termination of pipelines that are killed by a
+ signal to not be reported in some cases.
+
+n. When not in literal-history mode, shell comment lines are not added to
+ the history list.
+
+o. When running in POSIX.2 mode, bash no longer performs word splitting on
+ the expanded value of the word supplied as the filename argument to
+ redirection operators.
+
+p. The prompt string decoding code now backslash-quotes only characters that
+ are special within double quotes when expanding the \w and \W escape
+ sequences.
+
+q. Fixed a bug in the prompt decoding code that could cause a non-interactive
+ shell to seg fault if `\u' was used in PS4 and the shell was in xtrace
+ mode.
+
+r. Fixed a bug that caused function definitions to be printed with any
+ redirections that should be attached to the entire function before the
+ closing brace.
+
+s. Changed the tilde expansion code for Cygwin systems to avoid creating
+ pathnames beginning with `//' if $HOME == `/'.
+
+t. Fixed a couple of autoconf tests to avoid creating files with fixed names
+ in /tmp.
+
+u. The `trap' and `kill' builtins now know the names of the POSIX.1b real-
+ time signals on systems which support them.
+
+2. Changes to Readline
+
+a. Fixed a problem with the single-quote quoting function that could cause
+ buffer overflows.
+
+b. Fixed a bug that caused incorrect `stat characters' to be printed if
+ the files being completed were in the root directory and visible-stats
+ was enabled.
+
+3. New Features in Bash
+
+a. There is a new `rbash.1' manual page, from the Debian release.
+
+b. The `--enable-usg-echo-default' option to `configure' has been renamed to
+ `--enable-xpg-echo-default'. The old option is still there for backwards
+ compatibility.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.04-beta2,
+and the previous version, bash-2.04-beta1.
+
+1. Changes to Bash
+
+a. Fixed a bug that could cause pipes to be closed inappropriately in
+ some obscure cases.
+
+b. Fixed a bug that caused creation of the exported environment to clobber
+ the current command string if there were any exported shell functions.
+
+c. Some changes were made to reduce bash's memory usage.
+
+d. Fixed a problem with programmable completion and filenames to be
+ completed containing quote characters.
+
+e. Changed the code the removes named pipes created for the <(...) and >(...)
+ expansions to defer removal until after any current shell function has
+ finished executing.
+
+f. Fixed a bug in `select' which caused it to not handle the `continue'
+ builtin correctly.
+
+g. Autoconf tests added for cygwin32 and mingw32.
+
+2. New Features in Bash
+
+a. The `--with-bash-malloc' configure option replaces `--with-gnu-malloc'
+ (which is still there for backwards compatibility).
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.04-beta1,
+and the previous version, bash-2.04-alpha1.
+
+1. Changes to Bash
+
+a. Fixed a bug in the programmable completion code that occurred when
+ trying to complete command lines containing a `;' or `@'.
+
+b. The file descriptor from which the shell is reading a script is now
+ moved to a file descriptor above the user-addressible range.
+
+c. Changes to `printf' so that it can handle integers beginning with 0
+ or 0x as octal and hex, respectively.
+
+d. Fixes to the programmable completion code so it handles nonsense like
+ `compgen -C xyz' gracefully.
+
+e. The shell no longer modifies the signal handler for SIGPROF, allowing
+ profiling again on certain systems.
+
+f. The shell checks for a new window size, if the user has requested it,
+ after a process exits due to a signal.
+
+g. Fixed a bug with variables with null values in a program's temporary
+ environment and the bash getenv() replacement.
+
+h. `declare' and the other builtins that take variable assignments as
+ arguments now honor `set -a' and mark modified variables for export.
+
+i. Some changes were made for --dump-po-strings mode when writing strings
+ with embedded newlines.
+
+j. The code that caches export strings from the initial environment now
+ duplicates the string rather than just pointing into the environment.
+
+k. The filename completion quoting code now uses single quotes by default
+ if the filename being completed contains newlines, since \<newline>
+ has a special meaning to the parser.
+
+l. Bash now uses typedefs bits32_t and u_bits32_t instead of int32_t and
+ u_int32_t, respectively to avoid conflicts on certain Unix versions.
+
+m. Configuration changes were made for: Rhapsody, Mac OS, FreeBSD-3.x.
+
+n. Fixed a problem with hostname-to-ip-address translation in the
+ /dev/(tcp|udp)/hostname/port redirection code.
+
+o. The texinfo manual has been reorganized slightly.
+
+p. Filename generation (globbing) range comparisons in bracket expressions
+ no longer use strcoll(3) even if it is available, since it has unwanted
+ effects in certain locales.
+
+q. Fixed a cosmetic problem in the source that caused the shell to not
+ compile if DPAREN_ARITHMETIC was not defined but ARITH_FOR_COMMAND was.
+
+r. Fixed a bug in the here-document code tripped when the file descriptor
+ opened to the file containing the text of the here document was the
+ same as a redirector specified by the user.
+
+s. Fixed a bug where the INVERT_RETURN flag was not being set for `pipeline'
+ in `time ! pipeline'.
+
+t. Fixed a bug with the `wait' builtin which manifested itself when an
+ interrupt was received while the shell was waiting for asynchronous
+ processes in a shell script.
+
+u. Fixed the DEBUG trap code so that it has the correct value of $?.
+
+v. Fixed a bug in the parameter pattern substitution code that could cause
+ the shell to attempt to free unallocated memory if the pattern started
+ with `/' and an expansion error occurs.
+
+w. Fixed a bug in the positional parameter substring code that could
+ cause the shell to loop freeing freed memory.
+
+x. Fixed a bug in the positional parameter pattern substitution code so
+ that it correctly handles null replacement strings with a pattern
+ string prefixed with `%' or `#'.
+
+y. The shell no longer attempts to import functions from the environment if
+ started with `-n'.
+
+z. Fixed a bug that caused `return' in a command substitution executed in
+ a shell function to return from the function in a subshell and continue
+ execution.
+
+aa. `hash -p /pathname/with/slashes name' is no longer allowed when the shell
+ is restricted.
+
+bb. The wait* job control functions now behave better if called when there
+ are no unwaited-for children.
+
+cc. Command substitution no longer unconditionally disables job control in
+ the subshell started to run the command.
+
+dd. A bug was fixed that occasionally caused traps to mess up the parser
+ state.
+
+ee. `bashbug' now honors user headers in the mail message it sends.
+
+ff. A bug was fixed that caused the `:p' history modifier to not print the
+ history expansion if the `histverify' option was set.
+
+2. Changes to Readline
+
+a. Fixed a bug in the redisplay code for lines with more than 256 line
+ breaks.
+
+b. A bug was fixed which caused invisible character markers to not be
+ stripped from the prompt string if the terminal was in no-echo mode.
+
+c. Readline no longer tries to get the variables it needs for redisplay
+ from the termcap entry if the calling application has specified its
+ own redisplay function. Readline treats the terminal as `dumb' in
+ this case.
+
+d. Fixes to the SIGWINCH code so that a multiple-line prompt with escape
+ sequences is redrawn correctly.
+
+3. New Features in Bash
+
+a. `bashbug' now accepts `--help' and `--version' options.
+
+b. There is a new `xpg_echo' option to `shopt' that controls the behavior
+ of echo with respect to backslash-escaped characters at runtime.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.04-alpha1,
+and the previous version, bash-2.04-devel.
+
+1. Changes to Bash
+
+a. Fixed a bug that could cause core dumps when performing substring
+ expansion.
+
+b. Shared object configuration changes for: Solaris, OSF/1
+
+c. The POSIX_GLOB_LIBRARY code that uses the POSIX.2 globbing facilities
+ for pathname expansion now understands GLOBIGNORE.
+
+d. The code that implements `eval' was changed to save the value of the
+ current prompt, so an eval in a shell function called by the programmable
+ completion code will not change the prompt to $PS2.
+
+e. Restored the undocumented NON_INTERACTIVE_LOGIN_SHELLS #define to
+ config-top.h. If this is defined, all login shells will read the
+ startup files, not just interactive and non-interactive started with
+ the `--login' option.
+
+f. Fixed a bug that caused the expansion code to occasionally dump core if
+ IFS contained characters > 128.
+
+g. Fixed a problem with the grammar so that a newline is not required
+ after the `))' in the new-style arithmetic for statement; a semicolon
+ may be used as expected.
+
+h. Variable indirection may now reference the shell's special variables.
+
+i. The $'...' and $"..." constructs are now added to the history correctly
+ if they contain newlines and command-oriented history is enabled.
+
+j. It is now an error to try to assign a value to a function-local copy
+ of a readonly shell variable (declared with the `local' builtin).
+
+2. Changes to Readline
+
+a. The history file code now uses O_BINARY mode when reading and writing
+ the history file on cygwin32.
+
+3. New Features in Bash
+
+a. A new programmable completion facility, with two new builtin commands:
+ complete and compgen.
+
+b. configure has a new option, `--enable-progcomp', to compile in the
+ programmable completion features (enabled by default).
+
+c. `shopt' has a new option, `progcomp', to enable and disable programmable
+ completion at runtime.
+
+d. Unsetting HOSTFILE now clears the list of hostnames used for completion.
+
+4. New Features in Readline
+
+a. A new variable, rl_gnu_readline_p, always 1. The intent is that an
+ application can verify whether or not it is linked with the `real'
+ readline library or some substitute.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.04-devel,
+and the previous version, bash-2.03-release.
+
+1. Changes to Bash
+
+a. System-specific configuration and source changes for: Interix, Rhapsody
+
+b. Fixed a bug in execute_cmd.c that resulted in a compile-time error if
+ JOB_CONTROL was not defined.
+
+c. An obscure race condition in the trap code was fixed.
+
+d. The string resulting from $'...' is now requoted to avoid any further
+ expansion.
+
+e. The $'...' quoting syntax now allows backslash to escape a single quote,
+ for ksh-93 compatibility.
+
+f. The $"..." quoting syntax now escapes backslashes and double quotes in
+ the translated string when displaying them with the --dump-po-strings
+ option.
+
+g. `echo -e' no longer converts \' to '.
+
+h. Fixes were made to the extended globbing code to handle embedded (...)
+ patterns better.
+
+i. Some improvements were made to the code that unsets `nodelay' mode on
+ the file descriptor from which bash is reading input.
+
+j. Some changes were made to the replacement termcap library for better
+ operation on MS-DOS.
+
+k. Some changes were made to the tilde expansion code to handle backslash
+ as a pathname separator on MS-DOS.
+
+l. The source has been reorganized a little bit -- there is now an `include'
+ subdirectory, and lib/posixheaders has been removed.
+
+m. Improvements were made to the `read' builtin so that it makes many
+ fewer read(2) system calls.
+
+n. The expansion of $- will include `c' and `s' when those options are
+ supplied at shell invocation.
+
+o. Several improvments were made to the completion code: variable completion
+ now works better when there are unterminated expansions, command
+ completion understands quotes better, and completion now works in certain
+ unclosed $(... constructs.
+
+p. The arithmetic expansion code was fixed to not need the value of a
+ variable being assigned a value (fixes the "ss=09; let ss=10" bug).
+
+q. Some changes were made to make exported environment creation faster.
+
+r. The html documentation will be installed into $(htmldir) if that variable
+ has a value when `make install' is run.
+
+s. Fixed a bug that would cause the bashrc file to be sourced inappropriately
+ when bash is started by sshd.
+
+t. The SSH_CLIENT environment variable is no longer auto-exported.
+
+u. A bug that caused redirections with (...) subshells to be performed in
+ the wrong order was fixed.
+
+v. A bug that occasionally caused inappropriate expansion of assignment
+ statements in compound array assignments was fixed.
+
+w. The code that parses the words in a compound array assignment was
+ simplified considerably and should work better now.
+
+x. Fixes to the non-job-control code in nojobs.c to make it POSIX.2-compliant
+ when a user attempts to retrieve the status of a terminated background
+ process.
+
+y. Fixes to the `printf' builtin so that it doesn't try to expand all
+ backslash escape sequences in the format string before parsing it for
+ % format specifiers.
+
+2. Changes to Readline
+
+a. The history library tries to truncate the history file only if it is a
+ regular file.
+
+b. A bug that caused _rl_dispatch to address negative array indices on
+ systems with signed chars was fixed.
+
+c. rl-yank-nth-arg now leaves the history position the same as when it was
+ called.
+
+d. Changes to the completion code to handle MS-DOS drive-letter:pathname
+ filenames.
+
+e. Completion is now case-insensitive by default on MS-DOS.
+
+f. Fixes to the history file manipulation code for MS-DOS.
+
+g. Readline attempts to bind the arrow keys to appropriate defaults on MS-DOS.
+
+h. Some fixes were made to the redisplay code for better operation on MS-DOS.
+
+i. The quoted-insert code will now insert tty special chars like ^C.
+
+j. A bug was fixed that caused the display code to reference memory before
+ the start of the prompt string.
+
+k. More support for __EMX__ (OS/2).
+
+l. A bug was fixed in readline's signal handling that could cause infinite
+ recursion in signal handlers.
+
+m. A bug was fixed that caused the point to be less than zero when rl_forward
+ was given a very large numeric argument.
+
+n. The vi-mode code now gets characters via the application-settable value
+ of rl_getc_function rather than calling rl_getc directly.
+
+3. New Features in Bash
+
+a. The history builtin has a `-d offset' option to delete the history entry
+ at position `offset'.
+
+b. The prompt expansion code has two new escape sequences: \j, the number of
+ active jobs; and \l, the basename of the shell's tty device name.
+
+c. The `bind' builtin has a new `-x' option to bind key sequences to shell
+ commands.
+
+d. There is a new shell option, no_empty_command_completion, which, when
+ enabled, disables command completion when TAB is typed on an empty line.
+
+e. The `help' builtin has a `-s' option to just print a builtin's usage
+ synopsys.
+
+f. There are several new arithmetic operators: id++, id-- (variable
+ post-increment/decrement), ++id, --id (variabl pre-increment/decrement),
+ expr1 , expr2 (comma operator).
+
+g. There is a new ksh-93 style arithmetic for command:
+ for ((expr1 ; expr2; expr3 )); do list; done
+
+h. The `read' builtin has a number of new options:
+ -t timeout only wait timeout seconds for input
+ -n nchars only read nchars from input instead of a full line
+ -d delim read until delim rather than newline
+ -s don't echo input chars as they are read
+
+i. The redirection code now handles several filenames specially:
+ /dev/fd/N, /dev/stdin, /dev/stdout, and /dev/stderr, whether or
+ not they are present in the file system.
+
+j. The redirection code now recognizes pathnames of the form
+ /dev/tcp/host/port and /dev/udp/host/port, and tries to open a socket
+ of the appropriate type to the specified port on the specified host.
+
+k. The ksh-93 ${!prefix*} expansion, which expands to the names of all
+ shell variables whose names start with prefix, has been implemented.
+
+l. There is a new dynamic variable, FUNCNAME, which expands to the name of
+ a currently-executing function. Assignments to FUNCNAME have no effect.
+
+m. The GROUPS variable is no longer readonly; assignments to it are silently
+ discarded. This means it can be unset.
+
+4. New Features in Readline
+
+a. Parentheses matching is now always compiled into readline, and enabled
+ or disabled when the value of the `blink-matching-paren' variable is
+ changed.
+
+b. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename.
+
+c. MS-DOS systems now use ~/_history as the default history file.
+
+d. history-search-{forward,backward} now leave the point at the end of the
+ line when the string to search for is empty, like
+ {reverse,forward}-search-history.
+
+e. history-search-{forward,backward} now leave the last history line found
+ in the readline buffer if the second or subsequent search fails.
+
+f. New function for use by applications: rl_on_new_line_with_prompt, used
+ when an application displays the prompt itself before calling readline().
+
+g. New variable for use by applications: rl_already_prompted. An application
+ that displays the prompt itself before calling readline() must set this to
+ a non-zero value.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.03-release,
+and the previous version, bash-2.03-beta2.
+
+1. Changes to Bash
+
+a. A file descriptor leak in the `fc' builtin was fixed.
+
+b. A bug was fixed in the `read' builtin that caused occasional spurious
+ failures when using `read -e'.
+
+c. The version code needed to use the value of the cpp variable
+ CONF_MACHTYPE rather than MACHTYPE.
+
+d. A new test was added to exercise the command printing and copying code.
+
+e. A bug was fixed that caused `time' to be recognized as a reserved word
+ if it was the first pattern in a `case' statement pattern list.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.03-beta2,
+and the previous version, bash-2.03-beta1.
+
+1. Changes to Bash
+
+a. Slight additions to support/shobj-conf, mostly for the benefit of AIX 4.2.
+
+b. config.{guess,sub} support added for the NEC SX4.
+
+c. Changed some of the cross-compiling sections of the configure macros in
+ aclocal.m4 so that configure won't abort.
+
+d. Slight changes to how the HTML versions of the bash and readline manuals
+ are generated.
+
+e. Fixed conditional command printing to avoid interpreting printf `%'-escapes
+ in arguments to [[.
+
+f. Don't include the bash malloc on all variants of the alpha processor.
+
+g. Changes to configure to make --enable-profiling work on Solaris 2.x.
+
+h. Fixed a bug that manifested itself when shell functions were called
+ between calls to `getopts'.
+
+i. Fixed pattern substitution so that a bare `#'as a pattern causes the
+ replacement string to be prefixed to the search string, and a bare
+ `%' causes the replacement string to be appended to the search string.
+
+j. Fixed a bug in the command execution code that caused child processes
+ to occasionally have the wrong value for $!.
+
+2. Changes to Readline
+
+a. Added code to the history library to catch history substitutions using
+ `&' without a previous history substitution or search having been
+ performed.
+
+3. New Features in Bash
+
+4. New Features in Readline
+
+a. New bindable variable: `isearch-terminators'.
+
+b. New bindable function: `forward-backward-delete-char' (unbound by default).
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.03-beta1,
+and the previous version, bash-2.03-alpha.
+
+1. Changes to Bash
+
+a. A change was made to the help text for `{...}' to make it clear that a
+ semicolon is required before the closing brace.
+
+b. A fix was made to the `test' builtin so that syntax errors cause test
+ to return an exit status > 1.
+
+c. Globbing is no longer performed on assignment statements that appear as
+ arguments to `assignment builtins' such as `export'.
+
+d. System-specific configuration changes were made for: Rhapsody,
+ AIX 4.2/gcc, BSD/OS 4.0.
+
+e. New loadable builtins: ln, unlink.
+
+f. Some fixes were made to the globbing code to handle extended glob patterns
+ which immediately follow a `*'.
+
+g. A fix was made to the command printing code to ensure that redirections
+ following compound commands have a space separating them from the rest
+ of the command.
+
+h. The pathname canonicalization code was changed to produce fewer leading
+ `//' sequences, since those are interpreted as network file system
+ pathnames on some systems.
+
+i. A fix was made so that loops containing `eval' commands in commands passed
+ to `bash -c' would not exit prematurely.
+
+j. Some changes were made to the job reaping code when the shell is not
+ interactive, so the shell will retain exit statuses longer for examination
+ by `wait'.
+
+k. A fix was made so that `jobs | command' works again.
+
+l. The erroneous compound array assignment var=((...)) is now a syntax error.
+
+m. A change was made to the dynamic loading code in `enable' to support
+ Tenon's MachTen.
+
+n. A fix was made to the globbing code so that extended globbing patterns
+ will correctly match `.' in a bracket expression.
+
+2. Changes to Readline
+
+a. A fix was made to the completion code in which a typo caused the wrong
+ value to be passed to the function that computed the longest common
+ prefix of the list of matches.
+
+b. The completion code now checks the value of rl_filename_completion_desired,
+ which is set by application-supplied completion functions to indicate
+ that filename completion is being performed, to decide whether or not to
+ call an application-supplied `ignore completions' function.
+
+3. New Features in Bash
+
+a. A change was made to the startup file code so that any shell begun with
+ the `--login' option, even non-interactive shells, will source the login
+ shell startup files.
+
+4. New Features in Readline
+
+a. A new variable, rl_erase_empty_line, which, if set by an application using
+ readline, will cause readline to erase, prompt and all, lines on which the
+ only thing typed was a newline.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.03-alpha,
+and the previous version, bash-2.02.1-release.
+
+1. Changes to Bash
+
+a. System-specific configuration changes were made for: Irix 6.x, Unixware 7.
+
+b. The texi2dvi and texi2html scripts were updated to the latest versions
+ from the net.
+
+c. The configure tests that determine which native type is 32 bits were
+ changed to not require a compiled program.
+
+d. Fixed a bug in shell_execve that could cause memory to be freed twice
+ after a failed exec.
+
+e. The `printf' test uses `diff -a' if it's available to prevent confusion
+ due to the non-ascii output.
+
+f. Shared object configuration is now performed by a shell script,
+ support/shobj-conf, which generates values to be substituted into
+ makefiles by configure.
+
+g. Some changes were made to `ulimit' to avoid the use of RLIM_INVALID as a
+ return value.
+
+h. Changes were made to `ulimit' to work around HPUX 9.x's peculiar
+ handling of RLIMIT_FILESIZE.
+
+i. Some new loadable builtins were added: id, printenv, sync, whoami, push,
+ mkdir. `pushd', `popd', and `dirs' can now be built as regular or
+ loadable builtins from the same source file.
+
+j. Changes were made to `printf' to handle NUL bytes in the expanded format
+ string.
+
+k. The various `make clean' Makefile targets now descend into lib/sh.
+
+l. The `type' builtin was changed to use the internal `getopt' so that things
+ like `type -ap' work as expected.
+
+m. There is a new configuration option, --with-installed-readline, to link
+ bash with a locally-installed version of readline. Only readline version
+ 4.0 and later releases can support this. Shared and static libraries
+ are supported. The installed include files are used.
+
+n. There is a new autoconf macro used to find which basic type is 64 bits.
+
+o. Dynamic linking and loadable builtins should now work on SCO 3.2v5*,
+ AIX 4.2 with gcc, Unixware 7, and many other systems using gcc, where
+ the `-shared' options works correctly.
+
+p. A bug was fixed in the bash filename completion code that caused memory to
+ be freed twice if a directory name containing an unset variable was
+ completed and the -u option was set.
+
+q. The prompt expansion code now quotes the `$' in the `\$' expansion so it
+ is not processed by subsequent parameter expansion.
+
+r. Fixed a parsing bug that caused a single or double quote after a `$$' to
+ trigger ANSI C expansion or locale translation.
+
+s. Fixed a bug in the globbing code that caused quoted filenames containing
+ no globbing characters to sometimes be incorrectly expanded.
+
+t. Changes to the default prompt strings if prompt string decoding is not
+ compiled into the shell.
+
+u. Added `do', `then', `else', `{', and `(' to the list of keywords that may
+ precede the `time' reserved word.
+
+v. The shell may now be cross-built for BeOS as well as cygwin32.
+
+w. The conditional command execution code now treats `=' the same as `=='
+ for deciding when to perform pattern matching.
+
+x. The `-e' option no longer causes the shell to exit if a command exits
+ with a non-zero status while running the startup files.
+
+y. The `printf' builtin no longer dumps core if a modifier is supplied in
+ the format string without a conversion character (e.g. `%h').
+
+z. Array assignments of the form a=(...) no longer show up in the history
+ list.
+
+aa. The parser was fixed to obey the POSIX.2 rules for finding the closing
+ `}' in a ${...} expression.
+
+bb. The history file is now opened with mode 0600 rather than 0666, so bash
+ no longer relies on the user's umask being set appropriately.
+
+cc. Setting LANG no longer causes LC_ALL to be assigned a value; bash now
+ relies on proper behavior from the C library.
+
+dd. Minor changes were made to allow quoted variable expansions using
+ ${...} to be completed correctly if there is no closing `"'.
+
+ee. Changes were made to builtins/Makefile.in so that configuring the shell
+ with `--enable-profiling' works right and builtins/mkbuiltins is
+ generated.
+
+2. Changes to Readline
+
+a. The version number is now 4.0.
+
+b. There is no longer any #ifdef SHELL code in the source files.
+
+c. Some changes were made to the key binding code to fix memory leaks and
+ better support Win32 systems.
+
+d. Fixed a silly typo in the paren matching code -- it's microseconds, not
+ milliseconds.
+
+e. The readline library should be compilable by C++ compilers.
+
+f. The readline.h public header file now includes function prototypes for
+ all readline functions, and some changes were made to fix errors in the
+ source files uncovered by the use of prototypes.
+
+g. The maximum numeric argument is now clamped at 1000000.
+
+h. Fixes to rl_yank_last_arg to make it behave better.
+
+i. Fixed a bug in the display code that caused core dumps if the prompt
+ string length exceeded 1024 characters.
+
+j. The menu completion code was fixed to properly insert a single completion
+ if there is only one match.
+
+k. A bug was fixed that caused the display code to improperly display tabs
+ after newlines.
+
+3. New Features in Bash
+
+a. New `shopt' option, `restricted_shell', indicating whether or not the
+ shell was started in restricted mode, for use in startup files.
+
+b. Filename generation is now performed on the words between ( and ) in
+ array assignments (which it probably should have done all along).
+
+c. OLDPWD is now auto-exported, as POSIX.2 seems to require.
+
+d. ENV and BASH_ENV are read-only variables in a restricted shell.
+
+4. New Features in Readline
+
+a. Many changes to the signal handling:
+ o Readline now catches SIGQUIT and cleans up the tty before returning;
+ o A new variable, rl_catch_signals, is available to application writers
+ to indicate to readline whether or not it should install its own
+ signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP,
+ SIGTTIN, and SIGTTOU;
+ o A new variable, rl_catch_sigwinch, is available to application
+ writers to indicate to readline whether or not it should install its
+ own signal handler for SIGWINCH, which will chain to the calling
+ applications's SIGWINCH handler, if one is installed;
+ o There is a new function, rl_free_line_state, for application signal
+ handlers to call to free up the state associated with the current
+ line after receiving a signal;
+ o There is a new function, rl_cleanup_after_signal, to clean up the
+ display and terminal state after receiving a signal;
+ o There is a new function, rl_reset_after_signal, to reinitialize the
+ terminal and display state after an application signal handler
+ returns and readline continues
+
+b. There is a new function, rl_resize_terminal, to reset readline's idea of
+ the screen size after a SIGWINCH.
+
+c. New public functions: rl_save_prompt and rl_restore_prompt. These were
+ previously private functions with a `_' prefix.
+
+d. New function hook: rl_pre_input_hook, called just before readline starts
+ reading input, after initialization.
+
+e. New function hook: rl_display_matches_hook, called when readline would
+ display the list of completion matches. The new function
+ rl_display_match_list is what readline uses internally, and is available
+ for use by application functions called via this hook.
+
+f. New bindable function, delete-char-or-list, like tcsh.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.02.1-release,
+and the previous version, bash-2.02-release.
+
+1. Changes to Bash
+
+a. A bug that caused the bash readline support to not compile unless aliases
+ and csh-style history were configured into the shell was fixed.
+
+b. Fixed a bug that could cause a core dump when here documents contained
+ more than 1000 characters.
+
+c. Fixed a bug that caused a CDPATH entry of "" to not be treated the same
+ as the current directory when in POSIX mode.
+
+d. Fixed an alignment problem with the memory returned by the bash malloc,
+ so returned memory is now 64-bit aligned.
+
+e. Fixed a bug that caused command substitutions executed within pipelines
+ to put the terminal in the wrong process group.
+
+f. Fixes to support/config.sub for: alphas, SCO Open Server and Open Desktop,
+ Unixware 2, and Unixware 7.
+
+g. Fixes to the pattern matching code to make it work correctly for eight-bit
+ characters.
+
+h. Fixed a problem that occasionally caused the shell to display the wrong
+ value for the new working directory when changing to a directory found
+ in $CDPATH when in physical mode.
+
+i. Fixed a bug that caused core dumps when using conditional commands in
+ shell functions.
+
+j. Fixed a bug that caused the printf builtin to loop forever if the format
+ string did not consume any of the arguments.
+
+k. Fixed a bug in the parameter expansion code that caused "$@" to be
+ incorrectly split if $IFS did not contain a space character.
+
+l. Fixed a bug that could cause a core dump when completing hostnames if
+ the number of matching hostnames was an exact multiple of 16.
+
+m. Fixed a bug that caused the shell to fork too early when a command
+ such as `%2 &' was given.
+
+2. Changes to Readline
+
+a. Fixed a problem with redisplay that showed up when the prompt string was
+ longer than the screen width and the prompt contained invisible characters.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.02-release,
+and the previous version, bash-2.02-beta2.
+
+1. Changes to Bash
+
+a. A bug was fixed that caused the terminal process group to be set
+ incorrectly when performing command substitution of builtins in a
+ pipeline.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.02-beta2,
+and the previous version, bash-2.02-beta1.
+
+1. Changes to Bash
+
+a. Attempting to `wait' for stopped jobs now generates a warning message.
+
+b. Pipelines which exit due to SIGPIPE in non-interactive shells are now
+ not reported if the shell is compiled -DDONT_REPORT_SIGPIPE.
+
+c. Some changes were made to builtins/psize.sh and support/bashbug.sh to
+ attempt to avoid some /tmp file races and surreptitious file
+ substitutions.
+
+d. Fixed a bug that caused the shell not to compile if configured with
+ dparen arithmetic but without aliases.
+
+e. Fixed a bug that caused the input stream to be switched when assigning
+ empty arrays with `bash -c'.
+
+f. A bug was fixed in the readline expansion glue code that caused bash to
+ dump core when expanding lines with an unclosed single quote.
+
+g. A fix was made to the `cd' builtin so that using a non-empty directory
+ from $CDPATH results in an absolute pathname of the new current working
+ directory to be displayed after the current directory is changed.
+
+h. Fixed a bug in the variable assignment code that caused the shell to
+ dump core when referencing an unset variable with `set -u' enabled in
+ an assignment statement preceding a command.
+
+i. Fixed a bug in the exit trap code that caused reserved words to not be
+ recognized under certain circumstances.
+
+j. Fixed a bug in the parameter pattern substitution code so that quote
+ removal is performed.
+
+k. The shell should now configure correctly on Apple Rhapsody systems.
+
+l. The `kill' builtin now prints a usage message if it is not passed any
+ arguments.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.02-beta1,
+and the previous version, bash-2.02-alpha1.
+
+1. Changes to Bash
+
+a. A few compilation bugs were fixed in the new extended globbing code.
+
+b. Executing arithmetic commands now sets the command name to `((' so
+ error messages look right.
+
+c. Fixed some build problems with various configuration options.
+
+d. The `printf' builtin now aborts immediately if an illegal format
+ character is encountered.
+
+e. The code that creates here-documents now behaves better if the file it's
+ trying to create already exists for some reason.
+
+f. Fixed a problem with the extended globbing code that made patterns like
+ `x+*' expand incorrectly.
+
+g. The prompt string expansion code no longer quotes tildes with backslashes.
+
+h. The bash getcwd() implementation in lib/sh/getcwd.c now behaves better in
+ the presence of lstat(2) failures.
+
+i. Fixed a bug with strsub() that caused core dumps when executing `fc -s'.
+
+j. The mail checking code now ensures that it has a valid default mailpath.
+
+k. A bug was fixed that caused local variables to be unset inappropriately
+ when sourcing a script from within another sourced script.
+
+l. A bug was fixed in the history saving code so that functions are saved
+ in the history list correctly if `cmdhist' is enabled, but `lithist'
+ is not.
+
+m. A bug was fixed that caused printf overflows when displaying error
+ messages.
+
+n. It should be easier to build the loadble builtins in examples/loadables,
+ though some manual editing of the generated Makefile is still required.
+
+o. The user's primary group is now always ${GROUPS[0]}.
+
+p. Some updates were made to support/config.guess from the GNU master copy.
+
+q. Some changes were made to the autoconf support for Solaris 2.6 large
+ files.
+
+r. The `command' builtins now does the right thing when confstr(3) cannot
+ find a value for _CS_PATH.
+
+s. Extended globbing expressions like `*.!(c)' are not history expanded if
+ `extglob' is enabled.
+
+t. Using the `-P' option to `cd' will force the value that is assigned to
+ PWD to not contain any symbolic links.
+
+2. Changes to Readline
+
+a. The code that prints completion listings now behaves better if one or
+ more of the filenames contains non-printable characters.
+
+b. The time delay when showing matching parentheses is now 0.5 seconds.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.02-alpha1,
+and the previous version, bash-2.01.1-release.
+
+1. Changes to Bash
+
+a. OS-specific configuration changes for: BSD/OS 3.x, Minix 2.x,
+ Solaris 2.6, SINIX SVR4.
+
+b. Changes were made to the generated `info' files so that `install-info'
+ works correctly.
+
+c. PWD is now auto-exported.
+
+d. A fix was made to the pipeline code to make sure that the shell forks
+ to execute simple commands consisting solely of assignment statements.
+
+e. Changes to the test suite for systems with 14-character filenames.
+
+f. The default sizes of some internal hash tables have been made smaller
+ to reduce the shell's memory footprint.
+
+g. The `((...))' arithmetic command is now executed directly instead of
+ being translated into `let "..."'.
+
+h. Fixes were made to the expansion code so that "$*", "$@", "${array[@]}",
+ and "${array[@]}" expand correctly when IFS does not contain a space
+ character, is unset, or is set to NULL.
+
+i. The indirect expansion code (${!var}) was changed so that the only
+ valid values of `var' are variable names, positional parameters, `#',
+ `@', and `*'.
+
+j. An arithmetic expression error in a $((...)) expansion now causes a
+ non-interactive shell running in posix mode to exit.
+
+k. Compound array assignment now splits the words within the parentheses
+ on shell metacharacters like the parser would before expansing them
+ and performing the assignment. This is for compatibility with ksh-93.
+
+l. The internal shell backslash-quoting code (used in the output of `set'
+ and completion) now quotes tildes if they appear at the start of the
+ string or after a `=' or `:'.
+
+m. A couple of bugs with `shopt -o' were fixed.
+
+n. `bash +o' now displays the same output as `set +o' before starting an
+ interactive shell.
+
+o. A bug that caused command substitution and the `eval' builtin to
+ occasionally free memory twice when an error was encountered was fixed.
+
+p. The filename globbing code no longer requires read permission for a
+ directory when the filename to be matched does not contain any globbing
+ characters, as POSIX.2 specifies.
+
+q. A bug was fixed so that the job containing the last asynchronous
+ process is not removed from the job table until a `wait' is executed
+ for that process or another asynchronous process is started. This
+ satisfies a POSIX.2 requirement.
+
+r. A `select' bug was fixed so that a non-numeric user response is treated
+ the same as a numeric response that is out of range.
+
+s. The shell no longer parses the value of SHELLOPTS from the environment
+ if it is restricted, running setuid, or running in `privileged mode'.
+
+t. Fixes were made to enable large file support on systems such as
+ Solaris 2.6, where the size of a file may be larger than can be held
+ in an `int'.
+
+u. The filename hashing code was fixed to not add `./' to the beginning of
+ filenames which already begin with `./'.
+
+v. The configure script was changed so that the GNU termcap library is not
+ compiled in if `prefer-curses' has been specified.
+
+w. HISTCONTROL and HISTIGNORE are no longer applied to the second and
+ subsequent lines of a multi-line command.
+
+x. A fix was made to `disown' so that it does a better job of catching
+ out-of-range jobs.
+
+y. Non-interactive shells no longer report the status of processes terminated
+ due to SIGINT, even if the standard output is a terminal.
+
+z. A bug that caused the output of `jobs' to have extra carriage returns
+ was fixed.
+
+aa. A bug that caused PIPESTATUS to not be set when builtins or shell
+ functions were executed in the foreground was fixed.
+
+bb. Bash now attempts to detect when it is being run by sshd, and treats
+ that case identically to being run by rshd.
+
+cc. A bug that caused `set -a' to export SHELLOPTS when one of the shell
+ options was changed was fixed.
+
+dd. The `kill' builtin now disallows empty or missing process id arguments
+ instead of treating them as identical to `0', which means the current
+ process.
+
+ee. `var=value declare -x var' now behaves identically to
+ `var=value export var'. Similarly for `var=value declare -r var' and
+ `var=value readonly var'.
+
+ff. A few memory leaks were fixed.
+
+gg. `alias' and `unalias' now print error messages when passed an argument
+ that is not an alias for printing or deletion, even when the shell is
+ not interactive, as POSIX.2 specifies.
+
+hh. `alias' and `alias -p' now return a status of 0 when no aliases are
+ defined, as POSIX.2 specifes.
+
+ii. `cd -' now prints the pathname of the new working directory if the shell
+ is interactive.
+
+jj. A fix was made so that the code that binds $PWD now copes with getcwd()
+ returning NULL.
+
+kk. `unset' now checks whether or not a function name it's trying to unset
+ is a valid shell identifier only when the shell is running in posix mode.
+
+ll. A change was made to the code that generates filenames for here documents
+ to make them less prone to name collisions.
+
+mm. The parser was changed so that `time' is recognized as a reserved word
+ only at the beginning of a pipeline.
+
+nn. The pathname canonicalization code was changed so that `//' is converted
+ into `/', but all other pathnames beginning with `//' are left alone, as
+ POSIX.2 specifies.
+
+oo. The `logout' builtin will no longer exit a non-interactive non-login
+ shell.
+
+2. Changes to Readline
+
+a. Fixed a problem in the readline test program rltest.c that caused a core
+ dump.
+
+b. The code that handles parser directives in inputrc files now displays
+ more error messages.
+
+c. The history expansion code was fixed so that the appearance of the
+ history comment character at the beginning of a word inhibits history
+ expansion for that word and the rest of the input line.
+
+3. New Features in Bash
+
+a. A new version of malloc, based on the older GNU malloc, that has many
+ changes, is more page-based, is more conservative with memory usage,
+ and does not `orphan' large blocks when they are freed.
+
+b. A new version of gmalloc, based on the old GLIBC malloc, with many
+ changes and range checking included by default.
+
+c. A new implementation of fnmatch(3) that includes full POSIX.2 Basic
+ Regular Expression matching, including character classes, collating
+ symbols, equivalence classes, and support for case-insensitive pattern
+ matching.
+
+d. ksh-88 egrep-style extended pattern matching ([@+*?!](patlist)) has been
+ implemented, controlled by a new `shopt' option, `extglob'.
+
+e. There is a new ksh-like `[[' compound command, which implements
+ extended `test' functionality.
+
+f. There is a new `printf' builtin, implemented according to the POSIX.2
+ specification.
+
+g. There is a new feature for command substitution: $(< filename) now expands
+ to the contents of `filename', with any trailing newlines removed
+ (equivalent to $(cat filename)).
+
+h. There are new tilde prefixes which expand to directories from the
+ directory stack.
+
+i. There is a new `**' arithmetic operator to do exponentiation.
+
+j. There are new configuration options to control how bash is linked:
+ `--enable-profiling', to allow bash to be profiled with gprof, and
+ `--enable-static-link', to allow bash to be linked statically.
+
+k. There is a new configuration option, `--enable-cond-command', which
+ controls whether or not the `[[' command is included. It is on by
+ default.
+
+l. There is a new configuration option, `--enable-extended-glob', which
+ controls whether or not the ksh extended globbing feature is included.
+ It is enabled by default.
+
+m. There is a new configuration #define in config.h.top that, when enabled,
+ will cause all login shells to source /etc/profile and one of the user-
+ specific login shell startup files, whether or not the shell is
+ interactive.
+
+n. There is a new invocation option, `--dump-po-strings', to dump
+ a shell script's translatable strings ($"...") in GNU `po' format.
+
+o. There is a new `shopt' option, `nocaseglob', to enable case-insensitive
+ pattern matching when globbing filenames and using the `case' construct.
+
+p. There is a new `shopt' option, `huponexit', which, when enabled, causes
+ the shell to send SIGHUP to all jobs when an interactive login shell
+ exits.
+
+q. `bind' has a new `-u' option, which takes a readline function name as an
+ argument and unbinds all key sequences bound to that function in a
+ specified keymap.
+
+r. `disown' now has `-a' and `-r' options, to limit operation to all jobs
+ and running jobs, respectively.
+
+s. The `shopt' `-p' option now causes output to be displayed in a reusable
+ format.
+
+t. `test' has a new `-N' option, which returns true if the filename argument
+ has been modified since it was last accessed.
+
+u. `umask' now has a `-p' option to print output in a reusable format.
+
+v. A new escape sequence, `\xNNN', has been added to the `echo -e' and $'...'
+ translation code. It expands to the character whose ascii code is NNN
+ in hexadecimal.
+
+w. The prompt string expansion code has a new `\r' escape sequence.
+
+x. The shell may now be cross-compiled for the CYGWIN32 environment on
+ a Unix machine.
+
+4. New Features in Readline
+
+a. There is now an option for `iterative' yank-last-arg handline, so a user
+ can keep entering `M-.', yanking the last argument of successive history
+ lines.
+
+b. New variable, `print-completions-horizontally', which causes completion
+ matches to be displayed across the screen (like `ls -x') rather than up
+ and down the screen (like `ls').
+
+c. New variable, `completion-ignore-case', which causes filename completion
+ and matching to be performed case-insensitively.
+
+d. There is a new bindable command, `magic-space', which causes history
+ expansion to be performed on the current readline buffer and a space to
+ be inserted into the result.
+
+e. There is a new bindable command, `menu-complete', which enables tcsh-like
+ menu completion (successive executions of menu-complete insert a single
+ completion match, cycling through the list of possible completions).
+
+f. There is a new bindable command, `paste-from-clipboard', for use on Win32
+ systems, to insert the text from the Win32 clipboard into the editing
+ buffer.
+
+g. The key sequence translation code now understands printf-style backslash
+ escape sequences, including \NNN octal escapes. These escape sequences
+ may be used in key sequence definitions or macro values.
+
+h. An `$include' inputrc file parser directive has been added.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.01.1-release,
+and the previous version, bash-2.01-release.
+
+1. Changes to Bash
+
+a. The select command was fixed to check the validity of the user's
+ input more strenuously.
+
+b. A bug was fixed that prevented `time' from timing commands correctly
+ when supplied as an argument to `bash -c'.
+
+c. A fix was made to the mail checking code to keep from adding the same
+ mail file to the list of files to check multiple times when parsing
+ $MAILPATH.
+
+d. Fixed an off-by-one error in the tilde expansion library.
+
+e. When using the compound array assignment syntax, the old value of
+ the array is cleared before assigning the new value.
+
+f. Fixed a bug that could cause a core dump when a trap handler was reset
+ to the default in the trap command associated with that signal.
+
+g. Fixed a bug in the locale code that occurred when assigning a value
+ to LC_ALL.
+
+h. A change was made to the parser so that words of the form xxx=(...)
+ are not considered compound assignment statements unless there are
+ characters before the `='.
+
+i. A fix was made to the command tracing code to correctly quote each
+ word of output.
+
+j. Some changes were made to the bash-specific autoconf tests to make them
+ more portable.
+
+k. Completion of words with globbing characters now correctly quotes the
+ result.
+
+l. The directory /var/spool/mail is now preferred to /usr/spool/mail when
+ configure is deciding on the default mail directory.
+
+m. The brace completion code was fixed to not quote the `{' and `}'.
+
+n. Some fixes were made to make $RANDOM more random in subshells.
+
+o. System-specific changes were made to configure for: SVR4.2
+
+p. Changes were made so that completion of words containing globbing chars
+ substitutes the result only if a single filename was matched.
+
+q. The window size is now recomputed after a job is stopped with SIGTSTP if
+ the user has set `checkwinsize' with `shopt'.
+
+r. When doing substring expansion, out-of-range substring specifiers now
+ cause nothing to be substituted rather than an expansion error.
+
+s. A fix was made so that you can no longer trap `SIGEXIT' or `SIGDEBUG' --
+ only `EXIT' and `DEBUG' are accepted.
+
+t. The display of trapped signals now uses the signal number if signals
+ for which bash does not know the name are trapped.
+
+u. A fix was made so that `bash -r' does not turn on restricted mode until
+ after the startup files are executed.
+
+v. A bug was fixed that occasionally caused a core dump when a variable
+ found in the temporary environment of export/declare/readonly had a
+ null value.
+
+w. A bug that occasionally caused unallocated memory to be passed to free()
+ when doing arithmetic substitution was fixed.
+
+x. A bug that caused a buffer overrun when expanding a prompt string
+ containing `\w' and ${#PWD} exceeded PATH_MAX was fixed.
+
+y. A problem with the completion code that occasionally caused it to
+ refer to a character before the beginning of the readline line buffer
+ was fixed.
+
+z. A bug was fixed so that the `read' builtin restarts reads when
+ interrupted by signals other than SIGINT.
+
+aa. Fixed a bug that caused a command to be freed twice when there was
+ an evaluation error in the `eval' command.
+
+2. Changes to Readline
+
+a. Added a missing `extern' to a declaration in readline.h that kept
+ readline from compiling cleanly on some systems.
+
+b. The history file is now opened with mode 0600 when it is written for
+ better security.
+
+c. Changes were made to the SIGWINCH handling code so that prompt redisplay
+ is done better.
+
+d. ^G now interrupts incremental searches correctly.
+
+e. A bug that caused a core dump when the set of characters to be quoted
+ when completing words was empty was fixed.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.01-release,
+and the previous version, bash-2.01-beta2.
+
+1. Changes to Bash
+
+a. The `distclean' target should remove the `printenv' executable if it
+ has been created.
+
+b. The test suite was changed slightly to ensure that the error messages
+ are printed in English.
+
+c. A bug that caused the shell to dump core when a filename containing a
+ `/' was passed to `hash' was fixed.
+
+d. Pathname canonicalization now leaves a leading `//' intact, as POSIX.1
+ requires.
+
+e. A memory leak when completing commands was fixed.
+
+f. A memory leak that occurred when checking the hash table for commands
+ with relative paths was fixed.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.01-beta2,
+and the previous version, bash-2.01-beta1.
+
+1. Changes to Bash
+
+a. The `ulimit' builtin translates RLIM_INFINITY to the hard limit only if
+ the current (soft) limit is less than or equal to the hard limit.
+
+b. Fixed a bug that caused the bash emulation of strcasecmp to produce
+ incorrect results.
+
+c. A bug that caused memory to be freed twice when a trap handler resets
+ the trap more than once was fixed.
+
+d. A bug that caused machines where sizeof (pointer) > sizeof (int) to
+ fail (and possibly dump core) when trying to unwind-protect a null
+ pointer was fixed.
+
+e. The startup files should not be run with job control enabled. This fix
+ allows SIGINT to once again interrupt startup file execution.
+
+f. Bash should not change the SIGPROF handler if it is set to something
+ other than SIG_DFL.
+
+g. The completion code that provides bash-specific completions for readline
+ now quotes characters that the readline code would treat as word break
+ characters if they appear in a file name.
+
+h. The completion code now correctly quotes filenames containing a `!',
+ even if the user attempted to use double quotes when attempting
+ completion.
+
+i. A bug that caused the shell to dump core when `disown' was called without
+ arguments and there was no current job was fixed.
+
+j. A construct like $((foo);bar) is now processed as a command substitution
+ rather than as a bad arithmetic substitution.
+
+k. A couple of bugs that caused `fc' to not obey the `cmdhist' and `lithist'
+ shell options when editing and re-executing a series of commands were
+ fixed.
+
+l. A fix was made to the grammar -- the list of commands between `do' and
+ `done' in the body of a `for' command should be treated the same as a
+ while loop.
+
+2. Changes to Readline
+
+a. A couple of bugs that caused the history search functions to attempt to
+ free a NULL pointer were fixed.
+
+b. If the C library provides setlocale(3), readline does not need to look
+ at various environment variables to decide whether or not to go into
+ eight-bit mode automatically -- just check whether the current locale
+ is not `C' or `POSIX'.
+
+c. If the filename completion function finds that a directory was not closed
+ by a previous (interrupted) completion, it closes the directory with
+ closedir().
+
+3. New Features in Bash
+
+a. New bindable readline commands: history-and-alias-expand-line and
+ alias-expand-line. The code was always in there, there was just no
+ way to execute it.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.01-beta1,
+and the previous version, bash-2.01-alpha1.
+
+1. Changes to Bash
+
+a. Fixed a problem that could cause file descriptors used for process
+ substitution to conflict with those used explicitly in redirections.
+
+b. Made it easier to regenerate configure if the user changes configure.in.
+
+c. ${GROUPS[0]} should always be the primary group, even on systems without
+ multiple groups.
+
+d. Spelling correction is no longer enabled by default.
+
+e. Fixes to quoting problems in `bashbug'.
+
+f. OS-specific configuration changes were made for: Irix 6.
+
+g. OS-specific code changes were made for: QNX.
+
+h. A more meaningful message is now printed when the file in /tmp for a
+ here document cannot be created.
+
+i. Many changes to the shell's variable initialization code to speed
+ non-interactive startup.
+
+j. Changes to the non-job-control code so that it does not try to open
+ /dev/tty.
+
+k. The output of `set' and `export' is once again sorted, as POSIX wants.
+
+l. Fixed a problem caused by a recursive call reparsing the value of
+ $SHELLOPTS.
+
+m. The tilde code no longer calls getenv() when it's compiled as part of
+ the shell, which should eliminate problems on systems that cannot
+ redefine getenv(), like the NeXT OS.
+
+n. Fixed a problem that caused `bash -o' or `bash +o' to not list all
+ the shell options.
+
+o. Fixed `ulimit' to convert RLIM_INFINITY to the appropriate hard limit
+ only if the hard limit is greater than the current (soft) limit.
+
+p. Fixed a problem that arose when building bash in a different directory
+ than the source and y.tab.[ch] were remade with something other than
+ bison. This came up most often on NetBSD.
+
+q. Fixed a problem with completion -- it thought that `pwd`/[TAB] indicated
+ an unfinished command completion (`/), which generated errors.
+
+r. The bash special tilde expansions (~-, ~+) are now attempted before
+ calling the standard tilde expansion code, which should eliminate the
+ problems people have been seeing with this on Solaris 2.5.1.
+
+s. Added support for <stdarg.h> to places where it was missing.
+
+t. Changed the code that reads the output of a command substitution to not
+ go through stdio. This reduces the memory requirements and is faster.
+
+u. A number of changes to speed up export environment creation were made.
+
+v. A number of memory leaks were fixed as the result of running the test
+ scripts through Purify.
+
+w. Fixed a bug that caused subshells forked to interpret executable
+ scripts without a leading `#!' to not reinitialize the values of
+ the shell options.
+
+2. Changes to Readline
+
+a. History library has less `#ifdef SHELL' code -- abstracted stuff out
+ into application-specific function hooks.
+
+b. Readline no longer calls getenv() if it's compiled as part of the shell,
+ which should eliminate problems on systems that cannot redefine getenv(),
+ like the NeXT OS.
+
+c. Fixed translation of ESC when `untranslating' macro values.
+
+d. The region kill operation now fixes the mark if it ends up beyond the
+ boundaries of the line after the region is deleted.
+
+3. New Features in Bash
+
+a. New argument for `configure': `--with-curses'. This can be used to
+ override the selection of the termcap library on systems where it is
+ deficient.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.01-alpha1,
+and the previous version, bash-2.0-release.
+
+1. Changes to Bash
+
+a. System-specific configuration changes for: FreeBSD, SunOS4, Irix,
+ MachTen, QNX 4.2, Harris Night Hawk, SunOS5.
+
+b. System-specific code changes were made for: Linux, 4.4 BSD, QNX 4.2,
+ HP-UX, AIX 4.2.
+
+c. A bug that caused the exec builtin to fail because the full pathname of
+ the command could not be found was fixed.
+
+d. The code that performs output redirections is now more resistant to
+ race conditions and possible security exploits.
+
+e. A bug that caused the shell to dump core when performing pattern
+ substitutions on variable values was fixed.
+
+f. More hosts are now recognized by the auto-configuration mechanism
+ (OpenBSD, QNX, others).
+
+g. Assignments to read-only variables that attempt to convert them to
+ arrays are now errors.
+
+h. A bug that caused shell scripts using array assignments in POSIX mode
+ to exit after the assignment was performed was fixed.
+
+i. The substring expansion code is now more careful about running off the
+ ends of the expanded variable value.
+
+j. A bug that caused completion to fail if a backquoted command substitution
+ appeared anywhere on the line was fixed.
+
+k. The `source' builtin no longer turns off history if it has been enabled
+ in a non-interactive shell.
+
+l. A bug that caused the shell to crash when `disown' was given a pid
+ instead of a job number was fixed.
+
+m. The `cd' spelling correction code will not try to change to `.' if no
+ directory entries match a single-character argument.
+
+n. A bad variable name supplied to `declare', `export', or `readonly' no
+ longer causes a non-interactive shell in POSIX mode to exit.
+
+o. Some fixes were made to the test suite to handle peculiarities of
+ various Unix versions.
+
+p. The bash completion code now quotes characters that readline would
+ treat as word breaks for completion but are not shell metacharacters.
+
+q. Bad options supplied at invocation now cause a usage message to be
+ displayed.
+
+r. Fixes were made to the code that handles DEBUG traps so that the trap
+ string is not freed inappropriately.
+
+s. Some changes were made to the bash debugger in examples/bashdb -- it
+ should be closer to working now.
+
+t. A problem that caused the default filename used for mail checking to be
+ wrong was fixed.
+
+u. A fix was made to the `echo' builtin so that NUL characters printed with
+ `echo -e' do not cause the output to be truncated.
+
+v. A fix was made to the job control code so that the shell behaves better
+ when monitor mode is enabled in a non-interactive shell.
+
+w. Bash no longer catches all of the terminating signals in a non-
+ interactive shell until a trap is set on EXIT, which should result in
+ quicker startup.
+
+x. A fix was made to the command timing code so that `time' can be used in
+ a loop.
+
+y. A fix was made to the parser so that `((cmd); cmd2)' is now parsed as
+ a nested subshell rather than strictly as an (erroneous) arithmetic
+ command.
+
+z. A fix was made to the globbing code so that it correctly matches quoted
+ filenames beginning with a `.'.
+
+aa. A bug in `fc' that caused some multi-line commands to not be stored as
+ one command in the history when they were re-executed after editing
+ (with `fc -e') was fixed.
+
+bb. The `ulimit' builtin now attempts to catch some classes of integer
+ overflows.
+
+cc. The command-oriented-history code no longer attempts to add `;'
+ inappropriately when a newline appears while reading a $(...) command
+ substitution.
+
+dd. A bug that caused the shell to dump core when `help --' was executed
+ was fixed.
+
+ee. A bug that caused the shell to crash when an unset variable appeared
+ in the body of a here document after `set -u' had been executed was
+ fixed.
+
+ff. Implicit input redirections from /dev/null for asynchronous commands
+ are now handled better.
+
+gg. A bug that caused the shell to fail to compile when configured with
+ `--disable-readline' was fixed.
+
+hh. The globbing code should now be interruptible.
+
+ii. Bash now notices when the `kill' builtin is used to send SIGCONT to a
+ stopped job and adjusts the data structures accordingly, as if `bg' had
+ been executed instead.
+
+jj. A bug that caused the shell to crash when mixing calls to `getopts'
+ and `shift' on the same set of positional parameters was fixed.
+
+kk. The command printing code now preserves the `-p' flag to `time'.
+
+ll. The command printing code now handles here documents better when there
+ are other redirections associated with the command.
+
+mm. The special glibc environment variable (NNN_GNU_nonoption_argv_flags_)
+ is no longer placed into the environment of executed commands -- users
+ of glibc had too many problems with it.
+
+nn. Reorganized the code that generates signames.h. The signal_names list
+ is now more complete but may be slightly different (SIGABRT is favored
+ over SIGIOT, for example). The preferred signal names are those
+ listed in the POSIX.2 standard.
+
+oo. `bashbug' now uses a filename shorter than 14 characters for its
+ temporary file, and asks for confirmation before sending the bug
+ report.
+
+pp. A bug that caused TAB completion in vi editing mode to not be turned
+ off when `set -o posix' was executed or back on when `set +o posix'
+ was executed was fixed.
+
+qq. A bug in the brace expansion code that caused brace expansions appearing
+ in new-style $(...) command substitutions to be inappropriately expanded
+ was fixed.
+
+rr. A bug in the readline hook shell-expand-line that could cause memory to
+ be inappropriately freed was fixed.
+
+ss. A bug that caused some arithmetic expressions containing `&&' and `||'
+ to be parsed with the wrong precedence has been fixed.
+
+tt. References to unbound variables after `set -u' has been executed now
+ cause the shell to exit immediately, as they should.
+
+uu. A bug that caused the shell to exit inappropriately when `set -e' had
+ been executed and a command's return status was being inverted with the
+ `!' reserved word was fixed.
+
+vv. A bug that could occasionally cause the shell to crash with a
+ divide-by-zero error when timing a command was fixed.
+
+ww. A bug that caused parameter pattern substitution to leave stray
+ backslashes in the replacement string when the expression is in
+ double quotes was fixed.
+
+xx. The `break' and `continue' builtins now break out of all loops when an
+ invalid count argument is supplied.
+
+yy. Fixed a bug that caused PATH to be set to the empty string if
+ `command -p' is executed with PATH unset.
+
+zz. Fixed `kill -l signum' to print the signal name without the `SIG' prefix,
+ as POSIX specifies.
+
+aaa. Fixed a bug that caused the shell to crash while setting $SHELLOPTS
+ if there were no shell options set.
+
+bbb. Fixed `export -p' and `readonly -p' so that when the shell is in POSIX
+ mode, their output is as POSIX.2 specifies.
+
+ccc. Fixed a bug in `readonly' so that `readonly -a avar=(...)' actually
+ creates an array variable.
+
+ddd. Fixed a bug that prevented `time' from correctly timing background
+ pipelines.
+
+2. Changes to Readline
+
+a. A bug that caused an extra newline to be printed when the cursor was on
+ an otherwise empty line was fixed.
+
+b. An instance of memory being used after it was freed was corrected.
+
+c. The redisplay code now works when the prompt is longer than the screen
+ width.
+
+d. `dump-macros' is now a bindable name, as it should have been all along.
+
+e. Non-printable characters are now expanded when displaying macros and
+ their values.
+
+f. The `dump-variables' and `dump-macros' commands now output a leading
+ newline if they're called as the result of a key sequence, rather
+ than directly by an application.
+
+3. New Features in Bash
+
+a. There is a new builtin array variable: GROUPS, the set of groups to which
+ the user belongs. This is used by the test suite.
+
+4. New Features in Readline
+
+a. If a key sequence bound to `universal-argument' is read while reading a
+ numeric argument started with `universal-argument', it terminates the
+ argument but is otherwise ignored. This provides a way to insert multiple
+ instances of a digit string, and is how GNU emacs does it.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.0-release,
+and the previous version, bash-2.0-beta3.
+
+1. Changes to Bash
+
+a. Fix to the `getopts' builtin so that it does the right thing when a
+ required option argument is not present.
+
+b. The completion code now updates the common prefix of matched names
+ after FIGNORE processing is done, since any names that were removed
+ may have changed the common prefix.
+
+c. Fixed a bug that made messages in MAILPATH entries not work correctly.
+
+d. Fixed a serious documentation error in the description of the new
+ ${parameter:offset[:length]} expansion.
+
+e. Fixes to make parameter substring expansion ({$param:offset[:length]})
+ work when within double quotes.
+
+f. Fixes to make ^A (CTLESC) survive an unquoted expansion of positional
+ parameters.
+
+g. Corrected a misspelling of `unlimited' in the output of `ulimit'.
+
+h. Fixed a bug that caused executable scripts without a leading `#!' to
+ occasionally pick up the wrong set of positional parameters.
+
+i. Linux systems now have a working `ulimit -v', using RLIMIT_AS.
+
+j. Updated config.guess so that many more machine types are recognized.
+
+k. Fixed a bug with backslash-quoted slashes in the ${param/pat[/sub]}
+ expansion.
+
+l. If the shell is named `-su', and `-c command' is supplied, read and
+ execute the login shell startup files even though the shell is not
+ interactive. This is to support the `-' option to `su'.
+
+m. Fixed a bug that caused core dumps when the DEBUG trap was ignored
+ with `trap "" DEBUG' and a shell function was subsequently executed.
+
+n. Fixed a bug that caused core dumps in the read builtin when IFS was
+ set to the null string and the input had leading whitespace.
+
+2. Changes to Readline
+
+a. Fixed a bug that caused a numeric argument of 1024 to be ignored when
+ inserting text.
+
+b. Fixed the display code so that the numeric argument is displayed as it's
+ being entered.
+
+c. Fixed the numeric argument reading code so that `M-- command' is
+ equivalent to `M--1 command', as the prompt implies.
+
+3. New Features in Bash
+
+a. `ulimit' now sets both hard and soft limits and reports the soft limit
+ by default (when neither -H nor -S is specified). This is compatible
+ with versions of sh and ksh that implement `ulimit'.
+
+b. Integer constants have been extended to base 64.
+
+4. New Features in Readline
+
+a. The `home' and `end' keys are now bound to beginning-of-line and
+ end-of-line, respectively, if the corresponding termcap capabilities
+ are present.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.0-beta3,
+and the previous version, bash-2.0-beta2.
+
+1. Changes to Bash
+
+a. System-specific changes for: AIX 4.2, SCO 3.2v[45], HP-UX.
+
+b. When in POSIX mode, variable assignments preceding a special builtin
+ persist in the shell environment after the builtin completes.
+
+c. Changed all calls to getwd() to getcwd(). Improved check for systems
+ where the libc getcwd() calls popen(), since that breaks on some
+ systems when job control is being used.
+
+d. Fixed a bug that caused seg faults when executing scripts with the
+ execute bit set but without a leading `#!'.
+
+e. The environment passed to executed commands is never sorted.
+
+f. A bug was fixed in the code that expands ${name[@]} to the number of
+ elements in an array variable.
+
+g. A bug was fixed in the array compound assignment code ( A=( ... ) ).
+
+h. Window size changes now correctly propagate down to readline if
+ the shopt `checkwinsize' option is enabled.
+
+i. A fix was made in the code that expands to the length of a variable
+ value (${#var}).
+
+j. A fix was made to the command builtin so that it did not turn on the
+ `no fork' flag inappropriately.
+
+k. A fix was made to make `set -n' work more reliably.
+
+l. A fix was made to the job control initialization code so that the
+ terminal process group is set to the shell's process group if the
+ shell changes its own process group.
+
+2. Changes to Readline
+
+a. System-specific changes for: SCO 3.2v[45].
+
+b. The behavior of the vi-mode `.' when redoing an `i' command was changed
+ to insert the text previously inserted by the `i' command rather than
+ simply entering insert mode.
+
+3. New features in Bash
+
+a. There is a new version of the autoload function package, in
+ examples/functions/autoload.v2, that uses arrays and provides more
+ functionality.
+
+b. Support for LC_COLLATE and locale-specific sorting of the results of
+ pathname expansion if strcoll() is available.
+
+4. New Features in Readline
+
+a. Support for locale-specific sorting of completion possibilities if
+ strcoll() is available.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.0-beta2,
+and the previous version, bash-2.0-beta1.
+
+1. Changes to Bash
+
+a. `pushd -' is once again equivalent to `pushd $OLDPWD'.
+
+b. OS-specific changes for: SCO 3.2v[45].
+
+c. A change was made to the fix for the recently-reported security hole
+ when reading characters with octal value 255 to make it work better on
+ systems with restartable system calls when not using readline.
+
+d. Some changes were made to the test suite so that it works if you
+ configure bash with --enable-usg-echo-default.
+
+e. A fix was made to the parsing of conditional arithmetic expressions.
+
+f. Illegal arithmetic bases now cause an arithmetic evaluation error rather
+ than being silently reset.
+
+g. Multiple arithmetic bases now cause an arithmetic evaluation error
+ instead of being ignored.
+
+h. A fix was made to the evaluation of ${param?word} to conform to POSIX.2.
+
+i. A bug that sometimes caused array indices to be evaluated twice (which
+ would cause errors when they contained assignment statements) was fixed.
+
+j. `ulimit' was rewritten to avoid problems with getrlimit(2) returning
+ unsigned values and to simplify the code.
+
+k. A bug in the command-oriented-history code that caused it to sometimes
+ put semicolons after right parens inappropriately was fixed.
+
+l. The values inserted into the prompt by the \w and \W escape sequences
+ are now quoted to prevent further expansion.
+
+m. An interactive shell invoked as `sh' now reads and executes commands
+ from the file named by $ENV when it starts up. If it's a login shell,
+ it does this after reading /etc/profile and ~/.profile.
+
+n. The file named by $ENV is never read by non-interactive shells.
+
+2. Changes to Readline
+
+a. A few changes were made to hide some macros and functions that should not
+ be public.
+
+b. An off-by-one error that caused seg faults in the history expansion code
+ was fixed.
+
+3. New Features in Bash
+
+a. The ksh-style ((...)) arithmetic command was implemented. It is exactly
+ identical to let "...". This is controlled by a new option to configure,
+ `--enable-dparen-arithmetic', which is on by default.
+
+b. There is a new #define available in config.h.top: SYS_BASH_LOGOUT. If
+ defined to a filename, bash reads and executes commands from that file
+ when a login shell exits. It's commented out by default.
+
+c. `ulimit' has a `-l' option that reports the maximum amount of data that
+ may be locked into memory on 4.4BSD-based systems.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.0-beta1,
+and the previous version, bash-2.0-alpha4.
+
+1. Changes to Bash
+
+a. A bug that sometimes caused traps to be ignored on signals the
+ shell treats specially was fixed.
+
+b. The internationalization code was changed to track the values of
+ LC_* variables and call setlocale() as appropriate. The TEXTDOMAIN
+ and TEXTDOMAINDIR variables are also tracked; changes cause calls
+ to textdomain() and bindtextdomain(), if available.
+
+c. A bug was fixed that sometimes caused double-quoted strings to be
+ parsed incorrectly.
+
+d. Changes were made so that the siglist code compiles correctly on
+ Solaris 2.5.
+
+e. Added `:' to the set of characters that cause word breaks for the
+ completion code so that pathnames in assignments to $PATH can be
+ completed.
+
+f. The `select' command was fixed to print $PS3 to stderr.
+
+g. Fixed an error in the manual page section describing the effect that
+ setting and unsetting GLOBIGNORE has on the setting of the `dotglob'
+ option.
+
+h. The time conversion code now uses CLK_TCK rather than CLOCKS_PER_SEC
+ on systems without gettimeofday() and resources.
+
+i. The getopt static variables are now initialized each time a subshell
+ is started, so subshells using `getopts' work right.
+
+j. A sign-extension bug that caused a possible security hole was fixed.
+
+k. The parser now reads characters between backquotes within a double-
+ quoted string as a single word, so double quotes in the backquoted
+ string don't terminate the enclosing double-quoted string.
+
+l. A bug that caused `^O' to work incorrectly when typed as the first
+ thing to an interactive shell was fixed.
+
+m. A rarely-exercised off-by-one error in the code that quotes variable
+ values was fixed.
+
+n. Some memory and file descriptor leaks encountered when running a
+ shell script that is executable but does not have a leading `#!'
+ were plugged.
+
+2. Changes to Readline
+
+a. A bug that sometimes caused incorrect results when trying to read
+ typeahead on systems without FIONREAD was fixed.
+
+3. New Features in Bash
+
+a. The command timing code now uses the value of the TIMEFORMAT variable
+ to format and display timing statistics.
+
+b. The `time' reserved word now accepts a `-p' option to force the
+ POSIX.2 output format.
+
+c. There are a couple of new and updated scripts to convert csh startup
+ files to bash format.
+
+d. There is a new builtin array variable: BASH_VERSINFO. The various
+ members hold the parts of the version information in BASH_VERSION,
+ plus the value of MACHTYPE.
+
+4. New Features in Readline
+
+a. Setting LANG to `en_US.ISO8859-1' now causes readline to enter
+ eight-bit mode.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.0-alpha4,
+and the previous version, bash-2.0-alpha3.
+
+1. Changes to Bash
+
+a. There is better detection of rsh connections on Solaris 2.
+
+b. Assignments to read-only variables preceding a command name are now
+ variable assignment errors. Variable assignment errors cause
+ non-interactive shells running in posix mode to exit.
+
+c. The word tokenizer was rewritten to handle nested quotes and pairs
+ ('', "", ``, ${...}, $(...), $[...], $'...', $"...", <(...), >(...))
+ correctly. Some of the parameter expansion code was updated as a
+ consequence.
+
+d. A fix was made to `test' when given three arguments so that a binary
+ operator is checked for first, before checking that the first argument
+ is `!'.
+
+e. 2''>/dev/null is no longer equivalent to 2>/dev/null.
+
+f. Parser error messages were regularized, and in most cases the name of
+ the shell script being read by a non-interactive shell is not printed
+ twice.
+
+g. A fix was made to the completion code so that it no longer removes the
+ text the user typed in some cases.
+
+h. The special glibc `getopt' environment variable is no longer put into
+ the environment on machines with small values of ARG_MAX.
+
+i. The expansion of ${...} now follows the POSIX.2 rules for finding the
+ closing `}'.
+
+j. The shell no longer displays spurious status messages for background
+ jobs in shell scripts that complete successfully when the script is
+ run from a terminal.
+
+k. `shopt -o' now correctly updates $SHELLOPTS.
+
+l. A bug that caused the $PATH searching code to return a non-executable
+ file even when an executable file with the same name appeared later in
+ $PATH was fixed.
+
+m. The shell now does tilde expansions on unquoted `:~' in assignment
+ statements when not in posix mode.
+
+n. Variable assignment errors when a command consists only of assignments
+ now cause non-interactive shells to exit when in posix mode.
+
+o. If the variable in a `for' or `select' command is read-only, or not a
+ legal shell identifier, a variable assignment error occurs.
+
+p. `test' now handles `-a' and `-o' as binary operators when three arguments
+ are supplied, and correctly parses `( word )' as equivalent to `word'.
+
+q. `test' was fixed so that file names of the form /dev/fd/NN mean the same
+ thing on all systems, even Linux.
+
+r. Fixed a bug in the globbing code that caused patterns with multiple
+ consecutive `*'s to not be matched correctly.
+
+s. Fixed a bug that caused $PS2 to not be printed when an interactive shell
+ not using readline is reading a here document.
+
+t. Fixed a bug that caused history expansion to be performed inappropriately
+ when a single-quoted string spanned more than one line.
+
+u. `getopts' now checks that the variable name passed by the user as the
+ second argument is a legal shell identifier and that the variable is
+ not read-only.
+
+v. Fixed `getopts' to obey POSIX.2 rules for setting $OPTIND when it
+ encounters an error.
+
+w. Fixed `set' to display variable values in a form that can be re-read.
+
+x. Fixed a bug in the code that keeps track of whether or not local variables
+ have been declared at the current level of function nesting.
+
+y. Non-interactive shells in posix mode now exit if the name in a function
+ declaration is not a legal identifier.
+
+z. The job control code now ignores stopped children when the shell is not
+ interactive.
+
+aa. The `cd' builtin no longer attempts spelling correction on the directory
+ name if the shell is not interactive, regardless of the setting of the
+ `cdspell' option.
+
+bb. Some OS-specific changes were made for SCO 3.2v[45] and AIX 4.2.
+
+cc. `time' now prints its output to stderr, as POSIX.2 specifies.
+
+2. Fixes to Readline
+
+a. After printing possible completions, all lines of a multi-line prompt
+ are redisplayed.
+
+b. Some changes were made to the terminal handling code in rltty.c to
+ work around AIX 4.2 bugs.
+
+3. New Features in Bash
+
+a. There is a new loadable builtin: sprintf, with calling syntax
+ sprintf var format [args]
+ This provides an easy way to simulate ksh left- and right-justified
+ variable values.
+
+b. The expansions of \h and \H in prompt strings were swapped. \h now
+ expands to the hostname up to the first `.', as in bash-1.14.
+
+4. New Features in Readline
+
+a. The bash-1.14 behavior when ^M is typed while doing an incremental
+ search was restored. ^J may now be used to terminate the search without
+ accepting the line.
+
+b. There is a new bindable variable: disable-completion. This inhibits
+ word completion and causes the completion character to be inserted as
+ if it had been bound to self-insert.
+
+------------------------------------------------------------------------------
+This document details the changes between this version, bash-2.0-alpha3,
+and the previous version, bash-2.0-alpha2.
+
+There is now a file `COMPAT' included in the distribution that lists the
+user-visible incompatibilities between 1.14 and 2.0.
+
+1. Changes to Bash
+
+a. Some work was done so that word splitting of the rhs of assignment
+ statements conforms more closely to historical practice.
+
+b. A couple of errant memory frees were fixed.
+
+c. A fix was made to the test builtin so it recognizes `<' and `>' as
+ binary operators.
+
+d. The GNU malloc in lib/malloc/malloc.c now scrambles memory as it's
+ allocated and freed. This is to catch callers that refer to freed
+ memory or assume something about newly-allocated memory.
+
+e. Fixed a problem with conversion to 12-hour time in the prompt
+ expansion code.
+
+f. Fixed a problem with configure's argument parsing order. Now you can
+ correctly turn on specific options after using --enable-minimal-config.
+
+g. The configure script now automatically disables the use of GNU malloc
+ on systems where it's appropriate (better than having people read the
+ NOTES file and do it manually).
+
+h. There are new prompt expansions (\v and \V) to insert version information
+ into the prompt strings.
+
+i. The default prompt string now includes the version number.
+
+j. Most of the builtins that take no options were changed to use the
+ internal getopt so they can produce proper error messages for -?
+ and incorrect options.
+
+k. Some system-specific changes were made for SVR4.2 and Solaris 2.5.
+
+l. Bash now uses PATH_MAX instead of MAXPATHLEN and NAME_MAX instead of
+ MAXNAMLEN.
+
+m. A couple of problems caused by uninitialized variables were fixed.
+
+n. There are a number of new loadable builtin examples: logname, basename,
+ dirname, tty, pathchk, tee, head, and rmdir. All of these conform to
+ POSIX.2.
+
+o. Bash now notices changes in TZ and calls tzset() if present, so
+ changing TZ will alter the time printed by prompt expansions.
+
+p. The source was reorganized a bit so I don't have to wait so long for
+ some files to compile, and to facilitate the creation of a `shell
+ library' at some future point.
+
+q. Bash no longer turns off job control if called as `sh', since the
+ POSIX.2 spec includes job control as a standard feature.
+
+r. `bash -o posix' now works as intended.
+
+s. Fixed a problem with the completion code: when completing a filename
+ that contained globbing characters, if show-all-if-ambiguous was set,
+ the completion code would remove the user's text.
+
+t. Fixed ulimit so that (hopefully) the full range of limits is available
+ on HPUX systems.
+
+u. A new `shopt' option (`hostcomplete') enables and disables hostname
+ completion.
+
+v. The shell no longer attempts to save the history on an abort(),
+ which is usually called by programming_error().
+
+w. The `-s' option to `fc' was changed to echo the command to be executed
+ to stderr instead of stdout.
+
+x. If the editor invoked by `fc -e' exits with a non-zero status, no
+ commands are executed.
+
+y. Fixed a bug that made the shopt `histverify' option work incorrectly.
+
+z. There is a new variable `MACHTYPE' whose value is the GNU-style
+ `cpu-company-system' system description as set by configure. (The
+ values of MACHTYPE and HOSTTYPE should really be swapped.)
+
+aa. The `ulimit' builtin now allows the maximum virtual memory size to be
+ set via setrlimit(2) if RLIMIT_VMEM is defined.
+
+bb. `bash -nc 'command'' no longer runs `command'.
+
+2. Changes to Readline
+
+a. Fixed a typo in the code that checked for FIONREAD in input.c.
+
+b. Fixed a bug in the code that outputs keybindings, so things like C-\
+ are quoted properly.
+
+c. Fixed a bug in the inputrc file parsing code to handle the problems
+ caused by inputrc files created from the output of `bind -p' in
+ previous versions of bash. The problem was due to the bug fixed
+ in item b above.
+
+d. Readline no longer turns off the terminal's meta key, and turns it on
+ once the first time it's called.
+
+------------------------------------------------------------------------------
+This file documents the changes between this version, bash-2.0-alpha2,
+and the previous version, bash-2.0-alpha.
+
+1. Changes to Bash
+
+a. The shell no longer thinks directories are executable.
+
+b. `disown' has a new option, `h', which inhibits the resending of SIGHUP
+ but does not remove the job from the jobs table.
+
+c. The varargs functions in error.c now use ANSI-C `stdarg' if available.
+
+d. The build process now treats the `build version' in .build as local to
+ the build directory, so different versions built from the same source
+ tree have different `build versions'.
+
+e. Some problems with the grammar have been fixed. (It used `list' in a few
+ productions where `compound_list' was needed. A `list' must be terminated
+ with a newline or semicolon; a `compound_list' need not be.)
+
+f. A fix was made to keep `wait' from hanging when waiting for all background
+ jobs.
+
+g. `bash --help' now writes its output to stdout, like the GNU Coding Standards
+ specify, and includes the machine type (the value of MACHTYPE).
+
+h. `bash --version' now prints more information and exits successfully, like
+ the GNU Coding Standards specify.
+
+i. The output of `time' and `times' now prints fractional seconds with three
+ places after the decimal point.
+
+j. A bug that caused process substitutions to screw up the pipeline printed
+ by `jobs' was fixed.
+
+k. Fixes were made to the code that implements $'...' and $"..." so they
+ work as documented.
+
+l. The process substitution code now opens named pipes for reading with
+ O_NONBLOCK to avoid hanging.
+
+m. Fixes were made to the trap code so the shell cleans up correctly if the
+ trap command contains a `return' and we're executing a function or
+ sourcing a script with `.'.
+
+n. Fixes to doc/Makefile.in so that it doesn't try to remake all of the
+ documentation (ps, dvi, etc.) on a `make install'.
+
+o. Fixed an auto-increment error that caused bash -c args to sometimes dump
+ core.
+
+p. Fixed a bug that caused $HISTIGNORE to fail when the history line
+ contained globbing characters.
+
+2. Changes to Readline
+
+a. There is a new string variable, rl_library_version, available for use by
+ applications. The current value is "2.1".
+
+b. A bug encountered when expand-tilde was enabled and file completion was
+ attempted on a word beginning with `~/' was fixed.
+
+c. A slight change was made to the incremental search termination behavior.
+ ESC still terminates the search, but if input is pending or arrives
+ within 0.1 seconds (on systems with select(2)), it is used as a prefix
+ character. This is intented to allow users to terminate searches with
+ the arrow keys and get the behavior they expect.
diff --git a/COMPAT b/COMPAT
new file mode 100644
index 0000000..3210cca
--- /dev/null
+++ b/COMPAT
@@ -0,0 +1,367 @@
+Compatibility with previous versions
+====================================
+
+This document details the incompatibilities between this version of bash,
+bash-4.1, and the previous widely-available versions, bash-2.x (which is
+still the `standard' version for a few Linux distributions) and bash-3.x.
+These were discovered by users of bash-2.x and 3.x, so this list is not
+comprehensive. Some of these incompatibilities occur between the current
+version and versions 2.0 and above.
+
+1. Bash uses a new quoting syntax, $"...", to do locale-specific
+ string translation. Users who have relied on the (undocumented)
+ behavior of bash-1.14 will have to change their scripts. For
+ instance, if you are doing something like this to get the value of
+ a variable whose name is the value of a second variable:
+
+ eval var2=$"$var1"
+
+ you will have to change to a different syntax.
+
+ This capability is directly supported by bash-2.0:
+
+ var2=${!var1}
+
+ This alternate syntax will work portably between bash-1.14 and bash-2.0:
+
+ eval var2=\$${var1}
+
+2. One of the bugs fixed in the YACC grammar tightens up the rules
+ concerning group commands ( {...} ). The `list' that composes the
+ body of the group command must be terminated by a newline or
+ semicolon. That's because the braces are reserved words, and are
+ recognized as such only when a reserved word is legal. This means
+ that while bash-1.14 accepted shell function definitions like this:
+
+ foo() { : }
+
+ bash-2.0 requires this:
+
+ foo() { :; }
+
+ This is also an issue for commands like this:
+
+ mkdir dir || { echo 'could not mkdir' ; exit 1; }
+
+ The syntax required by bash-2.0 is also accepted by bash-1.14.
+
+3. The options to `bind' have changed to make them more consistent with
+ the rest of the bash builtins. If you are using `bind -d' to list
+ the readline key bindings in a form that can be re-read, use `bind -p'
+ instead. If you were using `bind -v' to list the key bindings, use
+ `bind -P' instead.
+
+4. The `long' invocation options must now be prefixed by `--' instead
+ of `-'. (The old form is still accepted, for the time being.)
+
+5. There was a bug in the version of readline distributed with bash-1.14
+ that caused it to write badly-formatted key bindings when using
+ `bind -d'. The only key sequences that were affected are C-\ (which
+ should appear as \C-\\ in a key binding) and C-" (which should appear
+ as \C-\"). If these key sequences appear in your inputrc, as, for
+ example,
+
+ "\C-\": self-insert
+
+ they will need to be changed to something like the following:
+
+ "\C-\\": self-insert
+
+6. A number of people complained about having to use ESC to terminate an
+ incremental search, and asked for an alternate mechanism. Bash-2.03
+ uses the value of the settable readline variable `isearch-terminators'
+ to decide which characters should terminate an incremental search. If
+ that variable has not been set, ESC and Control-J will terminate a
+ search.
+
+7. Some variables have been removed: MAIL_WARNING, notify, history_control,
+ command_oriented_history, glob_dot_filenames, allow_null_glob_expansion,
+ nolinks, hostname_completion_file, noclobber, no_exit_on_failed_exec, and
+ cdable_vars. Most of them are now implemented with the new `shopt'
+ builtin; others were already implemented by `set'. Here is a list of
+ correspondences:
+
+ MAIL_WARNING shopt mailwarn
+ notify set -o notify
+ history_control HISTCONTROL
+ command_oriented_history shopt cmdhist
+ glob_dot_filenames shopt dotglob
+ allow_null_glob_expansion shopt nullglob
+ nolinks set -o physical
+ hostname_completion_file HOSTFILE
+ noclobber set -o noclobber
+ no_exit_on_failed_exec shopt execfail
+ cdable_vars shopt cdable_vars
+
+8. `ulimit' now sets both hard and soft limits and reports the soft limit
+ by default (when neither -H nor -S is specified). This is compatible
+ with versions of sh and ksh that implement `ulimit'. The bash-1.14
+ behavior of, for example,
+
+ ulimit -c 0
+
+ can be obtained with
+
+ ulimit -S -c 0
+
+ It may be useful to define an alias:
+
+ alias ulimit="ulimit -S"
+
+9. Bash-2.01 uses a new quoting syntax, $'...' to do ANSI-C string
+ translation. Backslash-escaped characters in ... are expanded and
+ replaced as specified by the ANSI C standard.
+
+10. The sourcing of startup files has changed somewhat. This is explained
+ more completely in the INVOCATION section of the manual page.
+
+ A non-interactive shell not named `sh' and not in posix mode reads
+ and executes commands from the file named by $BASH_ENV. A
+ non-interactive shell started by `su' and not in posix mode will read
+ startup files. No other non-interactive shells read any startup files.
+
+ An interactive shell started in posix mode reads and executes commands
+ from the file named by $ENV.
+
+11. The <> redirection operator was changed to conform to the POSIX.2 spec.
+ In the absence of any file descriptor specification preceding the `<>',
+ file descriptor 0 is used. In bash-1.14, this was the behavior only
+ when in POSIX mode. The bash-1.14 behavior may be obtained with
+
+ <>filename 1>&0
+
+12. The `alias' builtin now checks for invalid options and takes a `-p'
+ option to display output in POSIX mode. If you have old aliases beginning
+ with `-' or `+', you will have to add the `--' to the alias command
+ that declares them:
+
+ alias -x='chmod a-x' --> alias -- -x='chmod a-x'
+
+13. The behavior of range specificiers within bracket matching expressions
+ in the pattern matcher (e.g., [A-Z]) depends on the current locale,
+ specifically the value of the LC_COLLATE environment variable. Setting
+ this variable to C or POSIX will result in the traditional ASCII behavior
+ for range comparisons. If the locale is set to something else, e.g.,
+ en_US (specified by the LANG or LC_ALL variables), collation order is
+ locale-dependent. For example, the en_US locale sorts the upper and
+ lower case letters like this:
+
+ AaBb...Zz
+
+ so a range specification like [A-Z] will match every letter except `z'.
+ Other locales collate like
+
+ aAbBcC...zZ
+
+ which means that [A-Z] matches every letter except `a'.
+
+ The portable way to specify upper case letters is [:upper:] instead of
+ A-Z; lower case may be specified as [:lower:] instead of a-z.
+
+ Look at the manual pages for setlocale(3), strcoll(3), and, if it is
+ present, locale(1).
+
+ You can find your current locale information by running locale(1):
+
+ caleb.ins.cwru.edu(2)$ locale
+ LANG=en_US
+ LC_CTYPE="en_US"
+ LC_NUMERIC="en_US"
+ LC_TIME="en_US"
+ LC_COLLATE="en_US"
+ LC_MONETARY="en_US"
+ LC_MESSAGES="en_US"
+ LC_ALL=en_US
+
+ My advice is to put
+
+ export LC_COLLATE=C
+
+ into /etc/profile and inspect any shell scripts run from cron for
+ constructs like [A-Z]. This will prevent things like
+
+ rm [A-Z]*
+
+ from removing every file in the current directory except those beginning
+ with `z' and still allow individual users to change the collation order.
+ Users may put the above command into their own profiles as well, of course.
+
+14. Bash versions up to 1.14.7 included an undocumented `-l' operator to
+ the `test/[' builtin. It was a unary operator that expanded to the
+ length of its string argument. This let you do things like
+
+ test -l $variable -lt 20
+
+ for example.
+
+ This was included for backwards compatibility with old versions of the
+ Bourne shell, which did not provide an easy way to obtain the length of
+ the value of a shell variable.
+
+ This operator is not part of the POSIX standard, because one can (and
+ should) use ${#variable} to get the length of a variable's value.
+ Bash-2.x does not support it.
+
+15. Bash no longer auto-exports the HOME, PATH, SHELL, TERM, HOSTNAME,
+ HOSTTYPE, MACHTYPE, or OSTYPE variables. If they appear in the initial
+ environment, the export attribute will be set, but if bash provides a
+ default value, they will remain local to the current shell.
+
+16. Bash no longer initializes the FUNCNAME, GROUPS, or DIRSTACK variables
+ to have special behavior if they appear in the initial environment.
+
+17. Bash no longer removes the export attribute from the SSH_CLIENT or
+ SSH2_CLIENT variables, and no longer attempts to discover whether or
+ not it has been invoked by sshd in order to run the startup files.
+
+18. Bash no longer requires that the body of a function be a group command;
+ any compound command is accepted.
+
+19. As of bash-3.0, the pattern substitution operators no longer perform
+ quote removal on the pattern before attempting the match. This is the
+ way the pattern removal functions behave, and is more consistent.
+
+20. After bash-3.0 was released, I reimplemented tilde expansion, incorporating
+ it into the mainline word expansion code. This fixes the bug that caused
+ the results of tilde expansion to be re-expanded. There is one
+ incompatibility: a ${paramOPword} expansion within double quotes will not
+ perform tilde expansion on WORD. This is consistent with the other
+ expansions, and what POSIX specifies.
+
+21. A number of variables have the integer attribute by default, so the +=
+ assignment operator returns expected results: RANDOM, LINENO, MAILCHECK,
+ HISTCMD, OPTIND.
+
+22. Bash-3.x is much stricter about $LINENO correctly reflecting the line
+ number in a script; assignments to LINENO have little effect.
+
+23. By default, readline binds the terminal special characters to their
+ readline equivalents. As of bash-3.1/readline-5.1, this is optional and
+ controlled by the bind-tty-special-chars readline variable.
+
+24. The \W prompt string expansion abbreviates $HOME as `~'. The previous
+ behavior is available with ${PWD##/*/}.
+
+25. The arithmetic exponentiation operator is right-associative as of bash-3.1.
+
+26. The rules concerning valid alias names are stricter, as per POSIX.2.
+
+27. The Readline key binding functions now obey the convert-meta setting active
+ when the binding takes place, as the dispatch code does when characters
+ are read and processed.
+
+28. The historical behavior of `trap' reverting signal disposition to the
+ original handling in the absence of a valid first argument is implemented
+ only if the first argument is a valid signal number.
+
+29. In versions of bash after 3.1, the ${parameter//pattern/replacement}
+ expansion does not interpret `%' or `#' specially. Those anchors don't
+ have any real meaning when replacing every match.
+
+30. Beginning with bash-3.1, the combination of posix mode and enabling the
+ `xpg_echo' option causes echo to ignore all options, not looking for `-n'
+
+31. Beginning with bash-3.2, bash follows the Bourne-shell-style (and POSIX-
+ style) rules for parsing the contents of old-style backquoted command
+ substitutions. Previous versions of bash attempted to recursively parse
+ embedded quoted strings and shell constructs; bash-3.2 uses strict POSIX
+ rules to find the closing backquote and simply passes the contents of the
+ command substitution to a subshell for parsing and execution.
+
+32. Beginning with bash-3.2, bash uses access(2) when executing primaries for
+ the test builtin and the [[ compound command, rather than looking at the
+ file permission bits obtained with stat(2). This obeys restrictions of
+ the file system (e.g., read-only or noexec mounts) not available via stat.
+
+33. Bash-3.2 adopts the convention used by other string and pattern matching
+ operators for the `[[' compound command, and matches any quoted portion
+ of the right-hand-side argument to the =~ operator as a string rather
+ than a regular expression.
+
+34. Bash-4.0 allows the behavior in the previous item to be modified using
+ the notion of a shell `compatibility level'. If the compat31 shopt
+ option is set, quoting the pattern has no special effect.
+
+35. Bash-3.2 (patched) and Bash-4.0 fix a bug that leaves the shell in an
+ inconsistent internal state following an assignment error. One of the
+ changes means that compound commands or { ... } grouping commands are
+ aborted under some circumstances in which they previously were not.
+ This is what Posix specifies.
+
+36. Bash-4.0 now allows process substitution constructs to pass unchanged
+ through brace expansion, so any expansion of the contents will have to be
+ separately specified, and each process subsitution will have to be
+ separately entered.
+
+37. Bash-4.0 now allows SIGCHLD to interrupt the wait builtin, as Posix
+ specifies, so the SIGCHLD trap is no longer always invoked once per
+ exiting child if you are using `wait' to wait for all children.
+
+38. Since bash-4.0 now follows Posix rules for finding the closing delimiter
+ of a $() command substitution, it will not behave as previous versions
+ did, but will catch more syntax and parsing errors before spawning a
+ subshell to evaluate the command substitution.
+
+39. The programmable completion code uses the same set of delimiting characters
+ as readline when breaking the command line into words, rather than the
+ set of shell metacharacters, so programmable completion and readline
+ should be more consistent.
+
+40. When the read builtin times out, it attempts to assign any input read to
+ specified variables, which also causes variables to be set to the empty
+ string if there is not enough input. Previous versions discarded the
+ characters read.
+
+41. Beginning with bash-4.0, when one of the commands in a pipeline is killed
+ by a SIGINT while executing a command list, the shell acts as if it
+ received the interrupt. This can be disabled by setting the compat31 or
+ compat32 shell options.
+
+42. Bash-4.0 changes the handling of the set -e option so that the shell exits
+ if a pipeline fails (and not just if the last command in the failing
+ pipeline is a simple command). This is not as Posix specifies. There is
+ work underway to update this portion of the standard; the bash-4.0
+ behavior attempts to capture the consensus at the time of release.
+
+43. Bash-4.0 fixes a Posix mode bug that caused the . (source) builtin to
+ search the current directory for its filename argument, even if "." is
+ not in $PATH. Posix says that the shell shouldn't look in $PWD in this
+ case.
+
+44. Bash-4.1 uses the current locale when comparing strings using the < and
+ > operators to the `[[' command. This can be reverted to the previous
+ behavior by setting one of the `compatNN' shopt options.
+
+Shell Compatibility Level
+=========================
+
+Bash-4.0 introduced the concept of a `shell compatibility level', specified
+as a set of options to the shopt builtin (compat31, compat32, compat40 at
+this writing). There is only one current compatibility level -- each
+option is mutually exclusive. This list does not mention behavior that is
+standard for a particular version (e.g., setting compat32 means that quoting
+the rhs of the regexp matching operator quotes special regexp characters in
+the word, which is default behavior in bash-3.2 and above).
+
+compat31 set
+ - the < and > operators to the [[ command do not consider the current
+ locale when comparing strings
+ - quoting the rhs of the regexp matching operator (=~) has no
+ special effect
+
+compat32 set
+ - the < and > operators to the [[ command do not consider the current
+ locale when comparing strings
+
+compat40 set
+ - the < and > operators to the [[ command do not consider the current
+ locale when comparing strings
+ - interrupting a command list such as "a ; b ; c" causes the execution
+ of the entire list to be aborted
+
+-------------------------------------------------------------------------------
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without any warranty.
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/CWRU/PLATFORMS b/CWRU/PLATFORMS
new file mode 100644
index 0000000..f05caff
--- /dev/null
+++ b/CWRU/PLATFORMS
@@ -0,0 +1,31 @@
+The version of bash in this directory has been compiled on the
+following systems:
+
+By chet:
+
+SunOS 4.1.4
+SunOS 5.5
+BSDI BSD/OS 2.1
+FreeBSD 2.2
+NetBSD 1.2
+AIX 4.2
+AIX 4.1.4
+HP/UX 9.05, 10.01, 10.10, 10.20
+Linux 2.0.29 (libc 5.3.12)
+Linux 2.0.4 (libc 5.3.12)
+
+By other testers:
+
+SCO ODT 2.0
+SCO 3.2v5.0, 3.2v4.2
+SunOS 5.3
+SunOS 5.5
+BSD/OS 2.1
+FreeBSD 2.2
+SunOS 4.1.3
+Irix 5.3
+Irix 6.2
+Linux 2.0 (unknown distribution)
+Digital OSF/1 3.2
+GNU Hurd 0.1
+SVR4.2
diff --git a/CWRU/README b/CWRU/README
new file mode 100644
index 0000000..7d7ca1a
--- /dev/null
+++ b/CWRU/README
@@ -0,0 +1,20 @@
+Contents of this directory:
+
+changelog - my change log since the last release
+
+POSIX.NOTES - list of what changes for `posix mode'
+
+README - this file
+
+misc - directory with some useful tools
+
+The following are distributed `as-is'. They will not apply without some
+modification.
+
+sh-redir-hack - diff to parse.y to get redirections before
+ compound commands
+
+empty-for-wordlist - diff to parse.y to allow an empty wordlist after
+ the `in' keyword in a `for' statement
+
+mh-folder-comp - diffs that reportedly add MH folder completion
diff --git a/CWRU/changelog b/CWRU/changelog
new file mode 100644
index 0000000..085fdbd
--- /dev/null
+++ b/CWRU/changelog
@@ -0,0 +1,9326 @@
+ 7/27/2004
+ ---------
+
+[bash-3.0 released]
+
+ 7/28
+ ----
+array.c
+ - in array_insert(), make sure the value to be added is non-NULL before
+ calling savestring() on it
+
+builtins/reserved.def
+ - fix description of `CDPATH'
+
+lib/readline/display.c
+ - when expanding a prompt that spans multiple lines with embedded
+ newlines, set prompt_physical_chars from the portion after the
+ final newline, not the preceding portion. Bug reported by
+ "Ralf S. Engelschall" <rse@engelschall.com>
+
+make_cmd.c
+ - explicitly declare `lineno' in function prologue for make_case_command
+
+builtins/evalfile.c
+ - include `trap.h' for declaration for run_return_trap
+
+bashline.c
+ - fix a `return' without a value in enable_hostname_completion
+
+general.c
+ - include test.h for extern declaration for test_eaccess
+
+externs.h
+ - add declaration for zcatfd
+
+tests/{history,histexp}.tests
+ - unset HISTFILESIZE to avoid problems if a value of 0 is inherited
+ from the environment
+
+ 7/30
+ ----
+bashline.c
+ - small changes to glob_expand_word to perform tilde expansion before
+ attempting globbing
+
+builtins/Makefile.in
+ - fix the install-help target to not cd into the `helpfiles'
+ subdirectory, so a value of $INSTALL_DATA containing a relative
+ pathname (e.g., .././support/install.sh) remains valid
+
+ 7/31
+ ----
+subst.c
+ - new function, mbstrlen(s), returns length of a multibyte character
+ string
+
+include/shmbutil.h
+ - new macro, MB_STRLEN(s), calls mbstrlen or STRLEN as appropriate
+
+builtins/trap.def
+ - small change so that a first argument that's a valid signal number
+ (digits only -- no symbolic names) will be treated as a signal and
+ reverted back to the original handling disposition. Fixes debian
+ complaints
+
+subst.c
+ - call MB_STRLEN instead of STRLEN where appropriate in
+ parameter_brace_expand_length to handle multibyte characters properly
+ - call MB_STRLEN instead of strlen in verify_substring_values so that
+ negative substrings of strings with multibyte chars work properly
+
+ 8/1
+ ---
+jobs.c
+ - describe_pid needs to write to stderr, not stdout (POSIX)
+ - start_job, since it's only used by builtins (fg/bg), needs to write
+ its output to stdout, not stderr (POSIX)
+
+sig.c
+ - add an `orig_flags' member to struct terminating_signal so the
+ original signal handling flags (SA_RESTART, etc.) can be preserved
+ on POSIX systems
+ - make sure to preserve the signal flags state in
+ initialize_terminating_signals and reset them for child processes
+ in reset_terminating_signals
+
+builtins/fc.def
+ - fixed an off-by-one error that caused `fc -l' to list one too many
+ history entries
+ - in posix mode, `fc' should not list any indication as to whether or
+ not history lines have been modified (POSIX)
+ - when in posix mode, the default editor for `fc' should be `ed' (POSIX)
+
+doc/bashref.texi
+ - updated the description of `trap' behavior when given a first
+ argument that is a valid signal number
+ - noted that `fc -l' won't indicate whether a history entry has been
+ modified if the shell is in posix mode
+
+builtins/command.def
+ - fixed bug: `command -v' is supposed to be silent if a command is not
+ found
+
+builtins/hash.def
+ - `hash' should print its `hash table empty' message to stderr
+
+lib/readline/misc.c
+ - back out 7/7 change to _rl_maybe_save_line; it breaks emacs-mode ^P
+
+general.c
+ - changed base_pathname so that it will return reasonable results for
+ non-absolute pathnames -- this is what is intended by all of its
+ callers
+
+arrayfunc.c
+ - fix array_variable_part to return NULL if it finds an invisible
+ variable in the hash table. Fixes seg fault caused by referring to
+ unset local variable using array notation
+
+{locale,variables}.c
+ - support LC_TIME as a special locale variable so HISTTIMEFORMAT tracks
+ the current locale
+
+ 8/2
+ ---
+variables.c
+ - fixed small memory leak in makunbound() when a local array variable
+ is unset. Fix from William Park
+
+lib/readline/display.c
+ - fixed a problem when computing the number of invisible characters on
+ the first line of a prompt whose length exceeds the screen width
+ (should only happen when invisible characters occur after the
+ line wrap). Bug reported by agriffis@gentoo.org
+
+builtins/command.def
+ - `command -V' passes a new flag, CDESC_ABSPATH, which means to convert
+ to an absolute path
+
+builtins/type.def
+ - in posix mode, `type' and `command -v/-V' should not report
+ non-executable files, even if the execution code will attempt to
+ run them. Other posix shells do this
+
+doc/bashref.texi
+ - add note to POSIX Mode section describing behavior of type and command
+ when finding a non-executable file
+
+execute_cmd.c
+ - force extended_glob to 1 before calling binary_test in
+ execute_cond_node so that the right extended pattern matching gets
+ performed
+
+ 8/3
+ ---
+braces.c
+ - make sure lhs[0] and rhs[0] are cast to `unsigned char' so chars
+ with values > 128 are handled correctly
+
+builtins/printf.def
+ - change bexpand() and printstr() to handle strings with a leading
+ '\0' whose length is non-zero, since that's valid input for the
+ `%b' format specifier
+
+subst.c
+ - fix a couple of instances of find_variable that didn't check the
+ result for an invisible variable
+
+variables.c
+ - BASH_ARGC, BASH_ARGV, BASH_SOURCE, BASH_LINENO no longer created as
+ invisible vars
+
+pcomplete.c
+ - make sure COMP_WORDS is not invisible when bind_comp_words returns
+ - ditto for COMPREPLY in gen_shell_function_matches
+
+ 8/4
+ ---
+braces.c
+ - fix problem where ${ was ignored but did not increment the open
+ brace count. Bug reported by Tim Waugh <twaugh@redhat.com>
+
+variables.c
+ - if make_local_variable finds a variable in the correct context in
+ the right variable scope, make sure it's not invisible before
+ returning it
+
+ 8/5
+ ---
+builtins/trap.def
+ - fixed usage message to show `action' as not optional, though it
+ actually is when not in posix mode (for a single argument)
+
+ 8/7
+ ---
+configure.in
+ - kfreebsd-gnu has had its sbrk() problems fixed, and no longer needs
+ to be configured --without-gnu-malloc
+
+lib/readline/vi_mode.c
+ - in rl_vi_search, free any saved history line before starting the
+ search, so failure leaves you at that line, not the last line in
+ the history (assuming the current line is not the last history line).
+ Fix from llattanzi@apple.com to replace fix of 7/7
+
+ 8/9
+ ---
+support/Makefile.in
+ - renamed `mostly-clean' target to `mostlyclean'
+
+ 8/11
+ ----
+lib/readline/vi_mode.c
+ - make same change for EOL in multibyte character case of
+ rl_vi_change_char
+
+ 8/12
+ ----
+subst.c
+ - in verify_substring_values, fix off-by-one error checking bounds of
+ `offset', esp. in array values (e.g., getting the highest element
+ of an array)
+
+ 8/16
+ ----
+aclocal.m4
+ - change BASH_CHECK_DEV_FD to make sure that file descriptors > 2 are
+ accessible via /dev/fd, unlike FreeBSD 5.x
+
+lib/sh/strftime.c
+ - make sure `zone' is initialized with gettimeofday before it is used
+ - work around HPUX lack of `altzone' and differing definitions of
+ `timezone'
+
+lib/malloc/malloc.c
+ - internal_memalign and memalign now take a `size_t' as their first
+ argument, which seems to be the prevailing standard
+
+lib/malloc/{malloc.c,shmalloc.h}
+ - change sh_memalign to take a `size_t' as its first argument
+
+builtins/echo.def
+ - if posixly_correct and xpg_echo are both set, don't try to interpret
+ any arguments at all, as POSIX/XOPEN requires (fix inspired by Paul
+ Eggert)
+
+doc/bashref.texi
+ - amend description of bash posix mode to include new echo behavior
+
+builtins/fg_bg.def
+ - allow bg to take multiple job arguments, as posix seems to specify,
+ placing them all in the background, returning the status of the last
+ one as the status of `bg'
+
+lib/readline/vi_mode
+ - fix _rl_vi_change_mbchar_case (multibyte-char version of `~'
+ command) to have the right behavior at EOL -- handle case where vi
+ mode backs up at the end of the line
+
+ 8/18
+ ----
+array.c
+ - check for an empty array in array_rshift before shifting elements
+ and adjusting max_index
+ - check for null array in array_subrange
+
+jobs.c
+ - fix raw_job_exit_status to not ignore exit status of the last
+ process in the pipeline when `set -o pipefail' is enabled
+
+ 8/19
+ ----
+lib/readline/mbutil.c
+ - make sure _rl_find_next_mbchar_internal has a valid multibyte
+ character before it checks whether or not it's a zero-width
+ wide character and adjusts point accordingly
+
+ 8/24
+ ----
+bashline.c
+ - new function, bash_directory_expansion, duplicates the expansions
+ performed on the directory name by rl_filename_completion_function
+ - call bash_directory_expansion in command_word_completion_function
+ if we decide we're doing tilde expansion (and any other
+ canonicalization) on the directory name being completed
+
+ 8/25
+ ----
+configure.in
+ - use new-style AC_CHECK_HEADER to check for sys/ptem.h (which requires
+ sys/stream.h). The correct checks are in the code, but autoconf
+ complains if sys/stream.h is not included, rather than simply
+ checking for the header's presence
+
+ 8/26
+ ----
+builtins/hash.def
+ - fix a bug that prevented `hash -d' from working right (as soon as
+ hash removed a command from the table, the bug caused it to be added
+ right back)
+
+ 8/27
+ ----
+doc/{bash.1,bashref.texi}
+ - explicitly note that conditional primaries that operate on files
+ operate on the targets of symbolic links rather than the links
+ themselves
+
+ 8/30
+ ----
+lib/readline/display.c
+ - fix multibyte calculation of `physchars' in prompt expansion, to
+ handle double-width multibyte characters correctly
+ - changes to rl_redisplay to handle prompts longer than the screenwidth
+ that might contain double-width multibyte characters. Fixes from
+ Tomohiro Kubota
+
+ 9/6
+ ---
+subst.c
+ - change word_list_split to avoid really bad behavior caused by calling
+ list_append for each split word -- as the list gets long, you have
+ to traverse it every time. Keep a pointer to the end of the list and
+ and just tack onto it
+
+ 9/8
+ ---
+lib/readline/complete.c
+ - change fnprint to calculate the displayed width of a filename in
+ the same way as fnwidth
+
+subst.c
+ - in verify_substring_values, when expanding ${array[@]:offset}, make
+ sure negative offsets count from one greater than the array's
+ maximum index so things like ${x[@}: -1} work to give the last element
+ (requires fixing array tests)
+
+builtins/common.c
+ - new error function, sh_wrerror(), for builtins to call when a write
+ error occurs
+
+builtins/common.h
+ - extern declaration for sh_wrerror()
+
+builtins/cd.def
+ - change builtin_error call to use sh_wrerror()
+
+builtins/echo.def
+ - report write errors with sh_wrerror() instead of just returning
+ failure
+
+builtins/printf.def
+ - change printstr to return failure (-1) or success (0) indication
+ rather than void
+ - report write errors when printstr() fails, return failure
+ - if any of the PF/printf calls fail, report write error and return
+ failure
+
+execute_cmd.c
+ - change execute_in_subshell so the subshell command inherits the
+ command timing flags from the enclosing COMMAND *
+
+ 9/11
+ ----
+[prayers for the victims of 9/11/2001]
+
+lib/sh/strnlen.c
+ - new file, implementation of GNU libc extension function strnlen
+
+lib/sh/Makefile.in, {config.h,configure,Makefile}.in, MANIFEST
+ - changes for strnlen
+
+configure.in
+ - version changed to 3.1-devel
+
+doc/bash.1, lib/readline/doc/rluser.texi
+ - added description of `-o plusdirs' to complete/compgen (thanks,
+ Arnold)
+
+parse.y
+ - new parser_state flag, PST_ASSIGNOK, if set indicates we're parsing
+ arguments to a builtin that accepts assignment statement arguments
+ - turn on PST_ASSIGNOK in read_token_word when appropriate
+ - turn off PST_ASSIGNOK in read_token when appropriate
+ - don't attempt to parse a compound assignment specially unless we're
+ in a position where an assignment statement is acceptable, or
+ PST_ASSIGNOK is set
+
+ 9/13
+ ----
+variables.c
+ - make BASH_ARGC, BASH_ARGV, BASH_LINENO, and BASH_SOURCE
+ non-unsettable, since the shell uses those values internally
+
+expr.c
+ - make exponentiation right-associative, as is apparently correct
+
+ 9/16
+ ----
+arrayfunc.c
+ - make sure convert_var_to_array marks the environment as needing
+ recreation if the converted variable was exported
+
+ 9/17
+ ----
+braces.c
+ - mark ${ as introducing an additional level of braces only if it's
+ not in a quoted string -- quoted strings are handled before brace
+ matching is done
+
+parse.y
+ - fixed an obscure problem in history_delimiting_chars where the `in'
+ in a case statement could have a semicolon added after it, if the
+ `case word' was on a previous line
+
+support/config.guess
+ - support for newest versions of tandem non-stop kernel
+
+lib/readline/display.c
+ - in compute_lcd_of_matches, explicitly cast `text' to `char *' before
+ passing it to rl_filename_dequoting_function
+
+lib/readline/terminal.c
+ - bind the key sequence sent by the keypad `delete' key to delete-char
+ (same as ^D in emacs mode)
+
+builtins/ulimit.def
+ - in print_all_limits, don't print anything if get_limit returns
+ -1/EINVAL, indicating that the kernel doesn't support that particular
+ limit
+ - add -i (max number of pending signals), -q (max size of posix msg
+ queues), -x (max number of file locks) for systems (Linux) that
+ support them
+
+doc/{bash.1,bashref.texi}
+ - fix description of correspondence between FUNCNAME, BASH_LINENO,
+ and BASH_SOURCE indices in description of BASH_LINENO
+
+ 9/18
+ ----
+lib/sh/shquote.c
+ - don't quote CTLESC and CTLNUL with CTLESC in sh_backslash_quote, as
+ long as the resultant string never gets sent to the word expansion
+ functions without going through the shell parser
+
+externs.h
+ - add extern declarations for strnlen and strpbkrk from lib/sh
+
+subst.[ch]
+ - changes to handle case where IFS consists of multibyte characters.
+ Changed: string_extract_verbatim, split_at_delims,
+ string_list_dollar_star, string_list_dollar_at, list_string,
+ get_word_from_string, setifs
+
+ 9/19
+ ----
+mailcheck.c
+ - change file_mod_date_changed to reset the cached mail file data if
+ the file size drops to zero
+
+lib/readline/complete.c
+ - change append_to_match so that a non-zero value for
+ rl_completion_suppress_append will cause no `/' to be appended to a
+ directory name
+
+bashline.c
+ - experimental change to suppress appending a slash for a completed
+ filename that is found in PATH as well as a directory in the current
+ directory under certain circumstances: a single instance found in
+ $PATH when `.' is not in $PATH, and multiple instances found in the
+ $PATH, even when `.' is in the $PATH
+
+ 9/24
+ ----
+command.h
+ - new word flag: W_ASSIGNRHS, means word is rhs of assignment statement
+ - new word flag: W_NOTILDE, means word is not to be tilde expanded
+ - new word flag (internal): W_ITILDE, means the next character is a
+ tilde that should be expanded
+
+general.c
+ - new set of tilde suffixes for use when parsing the RHS of an
+ assignment statement and =~ should not be subject to tilde expansion
+ - if ASSIGN_P argument to bash_tilde_expand is 2, use tilde prefixes
+ for parsing RHS of assignment statement
+
+general.[ch]
+ - new function bash_tilde_find_word, drop-in replacement for
+ tilde_find_word
+
+subst.c
+ - call bash_tilde_expand with secord argument of 2 when expanding rhs
+ of an assignment statement, so tildes after second and subsequent
+ `=' in an assignment are not expanded
+ - new function, expand_string_assignment, to expand the rhs of an
+ assignment statement
+ - add `~' to EXP_CHAR, the characters that will cause the word
+ expansion functions to be called
+ - move tilde expansion into expand_word_internal instead of many
+ different calls to bash_tilde_expand scattered across different
+ functions. NOTE: This means that double quotes surrounding a
+ {paramOPword} expansion will cause tilde expansion to NOT be
+ performed on `word'. I think this is right, what POSIX specifies,
+ and consistent with the behavior of other characters in the rhs
+
+execute_cmd.c
+ - take out calls to bash_tilde_expand before calling word expansion
+ functions
+
+ 9/26
+ ----
+execute_cmd.c
+ - make sure to call UNBLOCK_CHILD before returning on a pipe creation
+ failure in execute_pipeline
+
+ 9/27
+ ----
+variables.c
+ - change get_bash_command to deal with the_printed_command_except_trap
+ being NULL
+
+execute_cmd.c
+ - fix execute_simple_command to deal with the_printed_command being
+ NULL when assigning to the_printed_command_except_trap -- fixes
+ seg fault in savestring()
+
+parse.y
+ - change the parser so that the closing `)' in a compound variable
+ assignment delimits a token -- ksh93 does it this way
+
+doc/{bash.1,bashref.texi}
+ - change description of tilde expansion to note that expansion is
+ attempted only after the first =~ in an assignment statement
+
+builtins/declare.def
+ - when assigning to an array variable with declare -a x=(...), make
+ sure the last character in the rhs of the variable assignment is
+ `)', not just that it appears somewhere
+
+ 9/28
+ ----
+command.h
+ - add a `W_NOEXPAND' flag to inhibit all expansion except quote removal
+ - add a `W_COMPASSIGN' flag to denote a word is a compound assignment
+ statement
+
+parse.y
+ - set W_COMPASSIGN on words that appear to be compound assignments
+
+subst.c
+ - pass W_NOXPAND and W_COMPASSIGN through end of expand_word_internal
+
+subst.[ch]
+ - new function, expand_assignment_string_to_string, calls
+ expand_string_assignment and then string_list on the result
+
+variables.c
+ - assign_in_env now calls expand_assignment_string_to_string
+
+ 9/30
+ ----
+builtins/common.c
+ - change get_job_spec so the null job `%' once again means the current
+ job
+
+ 10/1
+ ----
+subst.c
+ - do_assignment_internal now takes a WORD_DESC * as its first
+ argument, and uses its `word' member as the assignment string
+ - change expand_word_list_internal to call do_word_assignment instead
+ of do_assignment, passing it `word' instead of, e.g., `word->word'
+ - change extract_array_assignment_list to just return the passed
+ string minus a trailing `)' if the last character is a right
+ paren
+ - change do_assignment_internal to call extract_array_assignment_list
+
+subst.[ch]
+ - change do_assignment and do_assignment_no_expand to take a `char *'
+ instead of `const char *' first argument; change extern prototypes
+ - new function, do_word_assignment, takes a WORD_DESC * and calls
+ do_assignment_internal on it; add extern declaration with prototype
+
+general.h
+ - new typedef, sh_wassign_func_t, like sh_assign_func_t but takes a
+ WORD_DESC * as its first argument
+
+variables.[ch]
+ - assign_in_env now takes a WORD_DESC * as its first argument
+
+ 10/2
+ ----
+command.h
+ - new word flag, W_ASSNBLTIN, denotes that the word is a builtin
+ command (in a command position) that takes assignment statements
+ as arguments, like `declare'
+ - new word flags, W_ASSIGNARG, denotes that word is an assignment
+ statement given as argument to assignment builtin
+
+execute_cmd.c
+ - set W_ASSNBLTIN flag in fix_assignment_words if necessary (if there
+ are any arguments that are assignment statements)
+ - set W_ASSIGNARG flag in fix_assignment_words if necessary
+
+subst.c
+ - new function, do_compound_assignment, encapsulates the necessary
+ code to perform a compound array assignment (including creation of
+ local variables); called from do_assignment_internal
+ - to fix the double-expansion problem with compound array assignments
+ that are arguments to builtins like `declare', changed
+ shell_expand_word_list to treat those arguments like assignment
+ statements (with proper creation of local variables inside shell
+ functions) and pass the attribute-setting portion of the statement
+ onto the builtin. This is what ksh93 appears to do, from inspection
+ of the `ksh93 -x' output
+
+execute_cmd.c
+ - fix execute_simple_command: in case of pipeline or async command,
+ when forking early, set `subshell_environment' so that it can contain
+ both SUBSHELL_PIPE and SUBSHELL_ASYNC -- the two should not be
+ mutually exclusive. Fixes bug reported by pierre.humblet@ieee.org
+ - remove references to last_pid, old_command_subst_pid; use NO_PID as
+ a sentinel value to decide whether or not a child process has been
+ created and needs to be waited for. Submitted by
+ pierre.humblet@ieee.org to fix recycling-pid problem on cygwin
+
+doc/{bash.1,bashref.texi}
+ - fixed documentation of `@(pattern)' extended globbing operator --
+ it succeeds if the string matches one of the patterns, not exactly
+ one. This is what ksh93 does, too
+
+lib/readline/complete.c
+ - fixed rl_menu_complete so that a negative argument cycles backwards
+ through the list
+
+ 10/3
+ ----
+subst.c
+ - use W_COMPASSIGN flag in do_assignment_internal instead of deciding
+ lexically which assignments are compound array assignments
+
+ 10/6
+ ----
+support/shobj-conf
+ - additions for System V.5 from Boyd Gerber <gerberb@zenez.com>
+
+subst.c
+ - in command_substitute, if subshell_environment includes
+ SUBSHELL_ASYNC, call make_child with the `async_p' argument set to
+ non-zero. This keeps command substitutions for async commands or
+ pipelines from trying to give the terminal back to the shell's
+ pgrp. make sure to save and restore last_asynchronous_pid. Fix
+ suggested by <pierre.humblet@ieee.org>
+
+ 10/7
+ ----
+config.h.in
+ - add a placeholder definition for WCONTINUED_BROKEN
+
+ 10/9
+ ----
+aclocal.m4
+ - add BASH_CHECK_WCONTINUED, checks for glibc bug where WCONTINUED is
+ defined but rejected as invalid by waitpid(2)
+
+configure.in
+ - add call to BASH_CHECK_WCONTINUED, defines WCONTINUED_BROKEN
+
+redir.c
+ - experimental change to add_undo_redirect to save manipulations to
+ file descriptors >= SHELL_FD_BASE (10) on the list of redirections
+ to be undone even if `exec' causes the list to be discarded
+
+doc/{bash.1,bashref.texi}
+ - note that redirections using file descriptors > 9 should be used
+ carefully, because they might conflict with file descriptors the
+ shell uses internally
+
+ 10/11
+ -----
+parse.y
+ - fix pipeline_command production to handle case where `pipeline'
+ as `argument' of `!' or `time' is null (e.g., a syntax error not
+ handled by the grammar)
+
+ 10/13
+ -----
+lib/readline/readline.c
+ - new internal variable, _rl_bind_stty_chars; if non-zero, bind the
+ terminal special characters to readline equivalents at startup
+ - change readline_default_bindings() and reset_default_bindings() to
+ understand _rl_bind_stty_chars
+
+lib/readline/rlprivate.h
+ - new extern declaration for _rl_bind_stty_chars
+
+lib/readline/rltty.c
+ - change rl_prep_terminal to add support for _rl_bind_stty_chars
+
+ 10/15
+ -----
+lib/readline/bind.c
+ - new bindable variable, `bind-tty-special-chars', bound to value of
+ _rl_bind_stty_chars
+
+doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
+ - documented new readline variable `bind-tty-special-chars'
+
+builtins/pushd.def
+ - make the first check for option `--' skip the rest of option
+ checking
+
+ 10/16
+ -----
+lib/readline/shell.c
+ - change sh_set_lines_and_columns to prefer setenv, which has
+ predictable memory allocation behavior, to putenv, which does not
+
+ 10/19
+ -----
+variables.c
+ - change push_exported_var so that a tempenv variable has to have the
+ export attribute set (which they all do -- something to look at) and
+ the `propagate' attribute set to be propagated down to the next
+ scope
+
+execute_cmd.c
+ - change execute_builtin so that if CMD_COMMAND_BUILTIN is set in the
+ passed flags argument, call pop_scope with a value that says the
+ builtin is not special, since `command' means that preceding variable
+ assignments don't persist in the environment. Fixes problem with
+ variable assignments preceding command preceding special builtin
+ keeping those variable assignments around (when in posix mode)
+
+ 10/20
+ -----
+lib/sh/shquote.c
+ - new function, sh_mkdoublequoted, brackets a given string with
+ double quotes and returns a new string. Flags argument, if non-
+ zero, means to quote embedded double quotes with backslashes
+
+externs.h
+ - new extern declaration for sh_mkdoublequoted
+
+parse.y
+ - use sh_mkdoublequoted after calling localeexpand()
+
+lib/sh/strtrans.c
+ - change ansicstr to understand that (flags & 4) != 0 means to remove
+ backslash from unrecognized escape sequences
+
+general.c
+ - fix logic problem in assignment() that caused non-variable-starter
+ characters to be allowed, resulting in things like `1=xxx' creating
+ a variable `1' in the hash table
+
+ 10/21
+ -----
+bashline.c
+ - don't call programmable_completions with an assignment statement
+ argument
+
+ 10/22
+ -----
+lib/readline/rltty.c
+ - in prepare_terminal_settings, turn echoing on (readline_echoing_p)
+ if get_tty_settings fails because the input is not a terminal
+
+ 10/24
+ -----
+lib/readline/util.c
+ - include rlmbutil.h for multibyte definitions
+ - new function, _rl_walphabetic, wide char version of rl_alphabetic
+
+lib/readline/mbutil.c
+ - new function, _rl_char_value(buf, ind), returns value of (possibly
+ multibyte) character at buf[ind]
+
+lib/readline/rlmbutil.h
+ - extern defines for _rl_walphabetic and _rl_char_value for when
+ multibyte chars are not being used
+ - new wrapper definitions for _rl_find_next_mbchar (MB_NEXTCHAR) and
+ _rl_find_prev_mbchar (MB_PREVCHAR) that try to avoid unneeded
+ function calls
+
+lib/readline/text.c
+ - fix rl_foward_word to work with multibyte characters (or in a
+ multibyte locale) using above utility functions
+ - fix rl_backward_word to work with multibyte characters (or in a
+ multibyte locale) using above utility functions
+
+ 10/26
+ -----
+parse.y
+ - fix parse_matched_pair so that it doesn't swallow \<newline> when
+ parsing a $'...' construct (call shell_getc with different arg)
+
+ 10/28
+ -----
+lib/glob/glob.c
+ - after some (compiled-in) threshold, glob_vector will stop using
+ alloca to allocate `struct globval's and will switch to using
+ malloc, with appropriate cleanup before returning
+
+subst.c
+ - don't expand tildes after `=' in expand_word_internal, even if the
+ W_TILDEEXP flag is set, unless it's the first tilde in a word
+ marked W_ASSIGNMENT
+
+ 10/31
+ -----
+lib/readline/text.c
+ - make sure rl_point doesn't go below 0 in rl_delete_horizontal_space
+ (from SUSE, but not sent in)
+
+shell.c
+ - make sure shell_is_restricted skips over a single leading `-' in
+ the shell name (from SUSE, but not sent in)
+
+lib/readline/display.c
+ - disable `fast redisplay' at the end of the line if in a locale that
+ supports multibyte characters (from SUSE, but not sent in)
+
+lib/readline/histexpand.c
+ - fix a problem with finding the delimiter of a `?' substring when
+ compiled for multibyte characters (from SUSE, but not sent in)
+
+ 11/1
+ ----
+lib/readline/display.c
+ - correct some assignments to _rl_last_c_pos: when in a multibyte
+ locale, it's used as an absolute cursor position; when not using
+ multibyte characters, it's a buffer offset. I should have caught
+ this when the multibyte character support was donated
+
+ 11/5
+ ----
+general.c
+ - change `assignment()' to accept `+=' assignment operator
+
+arrayfunc.[ch]
+ - bind_array_variable and assign_array_element both take a new `flags'
+ argument
+ - assign_array_var_from_string, assign_array_from_string, and
+ assign_array_var_from_word_list now all take a new `flags' argument
+ - change assign_array_var_from_word_list to understand how to append
+ to an array variable
+ - change assign_array_var_from_string to understand how to append
+ to an array variable. It does not unset the previous value if
+ appending, allowing both old values to be changed and new ones to
+ be added
+
+subst.h
+ - new flag #defines to use for evaluating assignment statements
+
+{subst,variables}.c, builtins/{declare,read}.def
+ - change callers of assign_array_element and bind_array_variable
+ - change do_compound_assignment to understand assignment flags
+ - change do_assignment_internal to set assignment flags and pass them
+ to underlying functions
+
+pcomplete.c,builtins/{declare,read}.def
+ - fix callers of assign_array_var_from_string, assign_array_var_from_word_list
+
+variables.[ch]
+ - make_variable_value now takes a new `flags' argument
+ - make_variable_value now understands how to append to a particular
+ variable, using the old value
+ - bind_variable_value now takes a new `flags' argument
+ - change make_variable_value to understand ASS_APPEND flag
+ - bind_variable now takes a new `flags' argument
+ - bind_variable_internal now takes a new `flags' argument
+
+arrayfunc.c
+ - change callers of make_variable_value to add flags arg
+
+builtins/declare.def
+ - change callers of bind_variable_value to add flags arg
+
+{execute_cmd,mailcheck,pcomplete,shell,subst,variables}.c,parse.y
+builtins/{cd,command,declare,getopts,read,set,setattr}.def
+ - change callers of bind_variable to add flags arg
+
+variables.c
+ - change callers of bind_variable_internal
+ - change bind_variable_internal to pass assignment flags on to
+ make_variable_value
+ - change assign_in_env to treat `var+=value' like `var=value'
+
+arrayfunc.c
+ - break code that actually constructs the new value and assigns it
+ to a particular array index out into a new functions:
+ bind_array_var_internal. This fakes out make_variable_value by
+ passing a dummy SHELL_VAR * so it can do proper appending and other
+ += processing
+ - changes to assign_array_var_from_string to accept and process as if
+ they were `standalone' assignment statements array assignment words
+ of the form [ind]+=val
+
+ 11/7
+ ----
+builtins/declare.def
+ - added support for `declare [flags] var+=value'. `Flags' are applied
+ before the assignment is performed, which has implications for things
+ like `-i' -- if -i is supplied, arithmetic evaluation and increment
+ will be performed
+
+builtins/setattr.def
+ - add support for `+=' assignment for rest of `assignment builtins':
+ export, readonly
+
+ 11/12
+ -----
+lib/readline/display.c
+ - make sure prompt_physical_chars and prompt_invis_chars_first_line
+ are reset to 0 if the prompt string passed to rl_expand_prompt is
+ NULL or empty
+
+ 11/14
+ -----
+{configure,config.h}.in
+ - check for `raise', define HAVE_RAISE if available
+
+lib/intl/dcigettext.c
+ - make sure `raise' is defined if HAVE_RAISE is not before
+ eval-plurah.h is included
+
+lib/malloc/trace.c
+ - put extern declaration for imalloc_fopen inside the MALLOC_TRACE
+ #ifdef
+
+ 11/16
+ -----
+lib/intl/Makefile.in
+ - make sure SHELL is defined to cpp
+
+lib/intl/dcigettext.c
+ - make sure we use getcwd() even if HAVE_GETCWD is not defined after
+ including config.h; if SHELL is defined, #define HAVE_GETCWD
+
+ 11/18
+ -----
+trap.[ch]
+ - new function, int signal_in_progress(int sig), returns TRUE if the
+ trap handler for signal SIG is currently executing
+
+ 11/19
+ -----
+redir.c
+ - slightly change do_redirection_internal to set the close-on-exec
+ flag for file descriptors > 2 used to save file descriptors < 2
+ using explicit redirections (e.g., `exec 3>&1'). This keeps file
+ descriptors pointing to pipes from being left open but doesn't
+ change the shell's file descriptor semantics
+
+ 11/20
+ -----
+doc/{bash.1,bashref.texi}
+ - correct some minor typos, forwarded from doko@debian.org
+
+ 11/22
+ -----
+doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
+ - documented detail that yank-last-arg and yank-nth-arg use the history
+ arg expansion code (and, as a result, are subject to restrictions
+ of the history-comment character)
+
+ 11/23
+ -----
+execute_cmd.c
+ - changes so that BASH_COMMAND preserves its value into a DEBUG trap:
+ for commands, arithmetic for command expressions, select commands,
+ case commands, (( commands, [[ commands, simple commands
+
+ 11/24
+ -----
+doc/{bash.1,bashref.texi}
+ - changed description of `set' builtin slightly so that it is clear
+ that only variables are displayed in posix mode and that read-only
+ variables can't be reset by simply sourcing the output of `set'
+
+lib/sh/strftime.c
+ - don't try to redefine `inline' if it's already defined
+
+ 11/26
+ -----
+execute_cmd.c
+ - fix execute_function to check funcname_a after function execution,
+ since FUNCNAME can be changed or unset within a function
+
+ 11/27
+ -----
+builtins/evalfile.c
+ - make same changes as 11/26, this time to _evalfile
+
+execute_cmd.c
+ - change execute_function to run the return trap after a function
+ completes execution even if the shell is compiled without DEBUGGER
+ defined
+
+trap.c
+ - change reset_or_restore_signal_handlers so that the RETURN trap is
+ not inherited by command substitution when DEBUGGER is not defined
+
+ 11/30
+ -----
+lib/readline/misc.c
+ - fix memory leaks in _rl_free_history_entry and rl_maybe_replace_line
+ caused by not freeing `timestamp' member of history entry
+ - make sure timestamp is initialized to NULL in rl_maybe_save_line
+
+ 12/1
+ ----
+execute_cmd.c
+ - fix execute_function so a function calling `return' will run the
+ RETURN trap, if one's defined
+
+doc/{bash.1,bashref.texi}
+ - fix description of RETURN trap in various places to indicate that it's
+ only inherited by shell functions if function tracing is on globally
+ or has been enabled for that function
+ - fix documentation to indicate that the DEBUG and RETURN traps are
+ inherited under the same conditions
+
+execute_cmd.c
+ - a function does not inherit the RETURN trap if a DEBUG trap is
+ currently running
+
+ 12/2
+ ----
+lib/glob/xmbsrtowcs.c
+ - change xmbsrtowcs to handle the one case where malloc can fail
+ (though it should not matter) -- don't try to free a null pointer
+
+ 12/9
+ ----
+subst.c
+ - fix get_var_and_type to handle var[@], where `var' is a scalar
+ variable, identically to var -- all calling expansions can now
+ handle var[@] like var. Bug reported by agriffis@gentoo.org
+
+ 12/10
+ -----
+lib/readline/bind.c
+ - make new-style "\M-x" keybindings obey `convert-meta' settings
+ (bug reported by twaugh@redhat.com)
+
+ 12/14
+ -----
+builtins/set.def
+ - added description of `-' option to help text
+
+builtins/shopt.def
+ - fix bug that caused `gnu_errfmt' to not be compiled in unless
+ READLINE is defined
+
+ 12/16
+ -----
+subst.c
+ - fixed a typo in string_extract_verbatim in first call to MBLEN
+ (used `slen - 1' instead of `slen - i')
+
+ 12/17
+ -----
+subst.c
+ - avoid some calls to strlen if the value is only being used for
+ ADVANCE_CHAR and MB_CUR_MAX == 1 (since ADVANCE_CHAR doesn't need
+ it unless multibyte characters are possible)
+ - change string_extract_verbatim so it takes the length of the string
+ as a parameter, so we don't have to recompute the length of the same
+ string over and over again when doing word splitting (that kills if
+ it's a long string)
+
+ 12/18
+ -----
+subst.c
+ - in string_list_dollar_star, make sure to null-terminate the
+ separator if the character is longer than one byte
+
+ 12/22
+ -----
+doc/{bash.1,bashref.texi}
+ - changed text in quoting section explaining that double quotes do
+ not prevent history expansion from taking place, and that backslashes
+ escaping ! are not removed
+
+ 12/28
+ -----
+shell.c
+ - set gnu_error_format to 1 if running under emacs. This should allow
+ the emacs `next-error' stuff to work, at least for interactive shells
+
+parse.y
+ - change yy_stream_get to set interrupt_immediately before calling
+ getc_with_restart when the shell is interactive. This avoids the
+ synchronization problem caused by the call to QUIT in read_a_line,
+ which results in the first character after a SIGINT/^C to be
+ dropped
+
+ 12/30
+ -----
+builtins/mkbuiltins.c
+ - changes to write long documentation to arrays as a single string by
+ default, rather than an array of strings -- enabled by default
+ - new option, -S, to restore old behavior of writing multiple strings
+ for long documentation
+ - changes to avoid filenames written when the separate-filenames option
+ (-H) has been supplied being run through gettext
+
+configure.in
+ - new cofiguration option, --enable-single-help-strings (on by default),
+ causes help text to be stored as a single string (or smaller set than
+ one string per line)
+
+builtins/Makefile.in
+ - pass `-S' to mkbuiltins if single-help-strings is turned off
+
+doc/bashref.texi
+ - documented new `single-help-strings' configure option
+
+ 1/3/2005
+ --------
+jobs.c
+ - make wait_for return a non-zero status if the job or processed
+ waited for is suspended. Returns 128 + stop signal. This fixes
+ the problem with `echo one && sleep 5 && echo two' displaying
+ `two' after the sleep is suspended
+
+ 1/5
+ ---
+print_cmd.c
+ - change indirection_level_string so the code duplicates the first
+ character of $PS4 to indicate the indirection level, rather than
+ the first byte
+
+ 1/8
+ ---
+variables.c
+ - new special variable hook function for COMP_WORDBREAKS; sets
+ rl_completer_word_break_characters back to NULL when the variable
+ is unset
+ - change bind_variable_value to understand dynamic variables with
+ assign_function set, and handle them correctly. If the variable is
+ being appended to, use make_variable_value to create the new
+ value
+ - change bind_variable_internal to understand dynamic variables with
+ assign_function set, and handle them the same way
+ - RANDOM and LINENO now get the integer attribute, so appending works
+ as expected
+ - ditto for HISTCMD, MAILCHECK, OPTIND
+
+lib/readline/display.c
+ - change _rl_make_prompt_for_search to set prompt_physical_chars
+ appropriately
+ - rl_save_prompt and rl_restore_prompt save and restore
+ prompt_prefix_length
+ - change redraw_prompt to use rl_save_prompt and rl_restore_prompt
+ - change rl_restore_prompt to set the `save' variables back to
+ NULL/0 so code can check whether or not the prompt has been saved
+ - change rl_message and rl_clear_message to save and restore the
+ prompt if the caller has not already done it (using a simple
+ semaphore-like variable)
+ - change rl_message to call expand_prompt, so that local_prompt and
+ local_prompt prefix are set before calling the redisplay functions,
+ in case the prompt is longer than a screenwidth (fixes bug
+ reported to debian by epl@unimelb.edu.au)
+
+lib/readline/doc/rltech.texi
+ - make sure to note that rl_save_prompt should be called before
+ rl_message, and rl_restore_prompt before rl_clear_message
+
+pcomplete.c
+ - make sure to save and restore the parser state around the call to
+ execute_shell_function in gen_shell_function_matches. Fixes bug
+ reported by a050106.1.keeLae3x@captaincrumb.com (cute)
+
+lib/readline/readline.c
+ - fix _rl_dispatch_subseq in the case where we're recursing back up
+ the chain (r == -2) and we encounter a key shadowed by a keymap,
+ but originally bound to self-insert. Calling rl_dispatch with
+ ANYOTHERKEY as the first argument will call rl_insert, but with
+ ANYOTHERKEY (256) as the char to insert. Use the shadow keymap
+ and set things up to dispatch to rl_insert with the shadowed key
+ as the argument. Fixes the bug reported by Thomas Glanzmann
+ (sithglan@stud.uni-erlangen.de)
+
+ 1/13
+ ----
+command.h
+ - new word flag: W_HASQUOTEDNULL
+
+make_cmd.c
+ - new function to allocate a WORD_DESC * without doing anything with a
+ containing string: alloc_word_desc
+
+make_cmd.h
+ - extern declaration for alloc_word_desc
+
+dispose_cmd.c
+ - new function to just free a WORD_DESC * without freeing the contained
+ string: dispose_word_desc
+
+dispose_cmd.h
+ - extern declaration for dispose_word_desc
+
+subst.c
+ - change some places to use alloc_word_desc
+ - make same changes to word_list_quote_removal as were made to
+ word_list_split
+ - set W_HASQUOTEDNULL when a word is created with w->word[0] ==
+ CTLNUL and w->word[1] == '\0'
+
+subst.c
+ - parameter_brace_expand_word now returns a WORD_DESC * -- changed
+ callers to understand
+ - parameter_brace_expand_indir now returns a WORD_DESC * -- changed
+ callers to understand
+ - parameter_brace_expand_rhs now returns a WORD_DESC * -- changed
+ callers to understand
+ - remove W_HASQUOTEDNULL from a word's flags when remove_quoted_nulls
+ is called on the word's enclosed string
+
+ 1/15
+ ----
+subst.c
+ - param_expand now returns a WORD_DESC * -- changed callers to
+ understand
+ - parameter_brace_expand now returns a WORD_DESC * -- changed
+ callers to understand
+ - in expand_word_internal, only call remove_quoted_nulls after a word
+ is returned with W_HASQUOTEDNULL
+ - changes to pass W_HASQUOTEDNULL flag out of expand_word_internal;
+ changed callers to call remove_quoted_nulls only if return value has
+ W_HASQUOTEDNULL set. This is a mostly-complete fix for the
+ long-standing CTLNUL confusion between a quoted null expansion and
+ the expansion of a variable with a literal '\177' in its value
+ - change string_list_dollar_at to compute the separator character the
+ same way as string_list_dollar_star: using the already-computed
+ values generated in setifs()
+ - when expanding unquoted $*, if $IFS is empty, check whether or not
+ we're eventually going to split the results (e.g., on the rhs of an
+ assignment statement) and concatenate the positional parameters as
+ if the expansion were within double quotes if we're not going to
+ split
+
+tests/iquote.tests
+ - test cases based on old bug reports about the quoted-null vs. 0177
+ problem the recent code fixes
+
+ 1/16
+ ----
+dispose_cmd.c
+ - set w->word to 0 before putting a WORD_DESC * back in the cache in
+ dispose_word_desc; changed callers to delete those assignments
+
+variables.c
+ - change assign_random and get_random_value so that the random number
+ generator only gets re-seeded once in a subshell environment, and
+ assigning a value to RANDOM counts as seeding the generator. This
+ makes the sequences a little more predictable
+
+ 1/20
+ ----
+lib/readline/history.c
+ - fix replace_history_entry, remove_history to return NULL if
+ passed index is < 0
+
+ 1/22
+ ----
+lib/sh/netconn.c
+ - fix isnetconn() to understand that getpeername can return ENOTCONN
+ to indicate that an fd is not a socket
+
+configure.in
+ - set BUILD_DIR to contain backslashes to escape any spaces in the
+ directory name -- this is what make will accept in targets and
+ prerequisites, so it's better than trying to use double quotes
+ - set SIZE to the appropriate value if some cross-compiling tool
+ chain is being used; `size' by default (can be overridden by
+ SIZE environment variable)
+
+Makefile.in
+ - use $(SIZE) instead of size; set SIZE from configure
+
+ 1/31
+ ----
+arrayfunc.c
+ - in array_value_internal, return NULL right away if the variable's
+ value is NULL, instead of passing a null string to add_string_to_list
+
+ 2/1
+ ---
+jobs.h
+ - new struct to hold stats and counters for child processes and jobs
+ - change some uses of global and static variables to use members of
+ new struct (struct jobstats)
+
+ 2/2
+ ---
+
+jobs.[ch]
+ - change PRUNNING to PALIVE
+ - new define INVALID_JOB
+ - new macro get_job_by_jid(ind), currently expands to jobs[ind]
+ - new define J_JOBSTATE, operates on a JOB * like JOBSTATE operates on
+ a job index
+ - new function, reset_job_indices, called from delete_job if
+ js.j_lastj or js.j_firstj are removed
+ - change various functions to keep counters and stats in struct jobstats
+
+pcomplete.c, builtins/common.c, builtins/{exit,fg_bg,jobs,kill,wait}.def
+ - change global variables (e.g., job_slots) to struct members
+ (e.g., js.j_jobslots)
+ - use INVALID_JOB define where appropriate
+ - use get_job_by_jid and J_JOBSTATE where appropriate
+
+trap.c
+ - change reset_or_restore_signal_handler to not free the exit trap
+ string if the function pointer is reset_signal, which is used when
+ the trap strings shouldn't be freed, like in command substitution
+
+ 2/4
+ ---
+jobs.c
+ - new function, realloc_jobs_list, copies jobs array to newly-allocated
+ memory shrinking (or growing) size to have next multiple of JOB_SLOTS
+ greater than js.j_njobs
+ - change compact_jobs_list to just call reap_dead_jobs and then
+ realloc_jobs_list, simplifying it considerably
+ - discard_pipeline now returns `int': the number of processes freed
+ - slightly changed the logic deciding whether or not to call
+ compact_jobs_list: now non-interactive shells will compact the
+ list if it reaches MAX_JOBS_IN_ARRAY in size
+
+parse.y
+ - move test for backslash-newline after pop_string in shell_getc so
+ that things like
+
+ ((echo 5) \
+ (echo 6))
+
+ work right
+
+ 2/8
+ ---
+jobs.h
+ - new structs for holding status of exited background processes, as
+ POSIX specifies
+ - new job flag: J_ASYNC
+
+jobs.c
+ - new functions to manipulate struct holding status of exited
+ background processes
+ - new members in struct jobstats to hold pointer to last created job
+ and last created asynchronous job
+ - initialize js.c_childmax in initialize_job_control
+ - if the `async' arg to stop_pipeline is non-null, set the J_ASYNC
+ flag in the job struct
+ - set js.j_last_made_job and js.j_last_asynchronous_job in
+ stop_pipeline
+ - new function: find_last_proc, returns the PROCESS * to the last proc
+ in a job's pipeline
+ - changed find_last_pid to call find_last_proc
+ - change delete_job to call bgp_add on the last proc of the job being
+ deleted
+ - change delete_all_jobs and wait_for_background_pids to call bgp_clear
+
+ 2/9
+ ---
+jobs.c
+ - change wait_for_single_pid to look for pid in bgpids.list (using
+ bgp_search()) if find_pipeline returns NULL
+
+ 2/10
+ ----
+support/shobj-conf
+ - change the solaris-gcc stanza so that it auto-selects the appropriate
+ options for ld depending on which `ld' gcc says it's going to run
+
+ 2/11
+ ----
+jobs.h
+ - add support for PS_RECYCLED as a process state, add PRECYCLED macro
+ to test it. Change PALIVE and PRUNNING macros to not count processes
+ in PS_RECYCLED state
+
+execute_cmd.c
+ - restore use of last_pid as sentinel value; use NO_PID as sentinel
+ only if RECYCLES_PIDS is defined
+
+jobs.c
+ - change find_job to return a pointer to the PROCESS the desired pid
+ belongs to, analogous to find_pipeline returning pointer to JOB
+ - change find_job callers to add extra argument
+ - change running_only arguments to find_pipeline and find_job to
+ alive_only, since we don't want recycled pids returned here and it
+ better describes the result
+ - new function find_process, calls find_pipeline and searches the
+ returned pipeline for the PROCESS * describing the desired pid
+ - in make_child, if fork() returns the same pid as the value of
+ last_asynchronous_pid when RECYCLES_PIDS is defined, avoid pid
+ aliasing by resetting last_asynchronous_pid to 1
+ - use PRUNNING instead of child->running, since we, for the most
+ part, don't want to consider recycled pids (e.g., in make_child())
+ - call find_process instead of find_pipeline in waitchld()
+ - use PEXITED(p) instead of testing p->running == PS_DONE
+ - in make_child, call bgp_delete to remove a just-created pid from the
+ last of saved pid statuses
+ - in add_process, check whether or not pid being added is already in
+ the_pipeline or the jobs list (using find_process) and mark it as
+ recycled if so
+ - This set of fixes mostly came from Pierre Humblet
+ <pierre.humblet@ieee.org> to fix pid aliasing and reuse problems on
+ cygwin
+
+variables.c
+ - set $_ from the environment if we get it there, set to $0 by
+ default if not in env
+
+doc/{bashref.texi,bash.1}
+ - a couple of clarifying changes to the description of $_ based on
+ comments from Glenn Morris <gmorris+mail@ast.cam.ac.uk>
+
+ 2/15
+ ----
+shell.c
+ - use strstr instead of strmatch when checking whether $EMACS contains
+ `term' -- simpler and faster
+
+ 2/18
+ ----
+builtins/cd.def
+ - implement posix requirement that `pwd -P' set $PWD to a directory
+ name containing no symlinks
+ - add new function, setpwd(), just sets (and changes exported value)
+ of PWD
+
+doc/bashref.texi
+ - add note to posix mode section about pwd -P setting $PWD
+
+doc{bash.1,bashref.texi}
+ - added note that BASH_ARGC and BASH_ARGV are only set in extended
+ debug mode
+ - expand description of extdebug option to include everything changed
+ by extended debug mode
+
+ 2/19
+ ----
+pathexp.h
+ - new flag macro, FNMATCH_IGNCASE, evaluates to FNM_CASEFOLD if the
+ match_ignore_case variable is non-zero
+
+execute_cmd.c
+ - new variable, match_ignore_case
+ - change call to strmatch() in execute_case_command so it includes
+ FNMATCH_IGNCASE
+
+test.c
+ - change call to strmatch() in patcomp() so that pattern matching
+ calls for [[ ... ]] obey the match_ignore_case variable
+
+lib/sh/shmatch.c
+ - if match_ignore_case is set, enable REG_ICASE in the regexp match
+ flags
+
+builtins/shopt.def
+ - new settable option, `nocasematch', controls the match_ignore_case
+ variable. Currently alters pattern matching for case and [[ ... ]]
+ commands (==, !=, and =~ operators)
+
+doc/{bashref.texi,bash.1}
+ - updated descriptions of [[ and case to include reference to
+ nocasematch option
+
+ 2/22
+ ----
+builtins/mkbuiltins.c
+ - add `times' to the list of posix special builtins
+
+ 2/23
+ ----
+builtins/cd.def
+ - posix mode no longer turns on effect of -P option on $PWD if a
+ directory is chosen from CDPATH
+
+doc/bashref.texi
+ - clarified that in posix mode, reserved words are not alias expanded
+ only in a reserved word context
+ - removed item about cd, $CDPATH, and -P from posix mode section
+
+ 2/24
+ ----
+builtins/reserved.def
+ - minor cleanups to the description of `if'
+
+ 3/2
+ ---
+subst.c
+ - change list_string and get_word_from_string to explicitly treat an
+ IFS character that is not space, tab, or newline *and any adjacent
+ IFS white space* as a single delimiter, as SUSv3/XPG6 says
+
+builtins/read.def
+ - check whether or not the number of fields is exactly the same as
+ the number of variables instead of just assigning the rest of the
+ line (minus any trailing IFS white space) to the last variable.
+ This parses a field and checks whether or not it consumes all of
+ the input (including any trailing field delimiters), falling back
+ to the previous behavior if it does not. This is what POSIX.2
+ specifies, I believe (and the consensus of the austin-group list).
+ This requires a few tests in read.tests to be changed: backslashes
+ escaping IFS whitespace characters at the end of input cause the
+ whitespace characters to be preserved in the value assigned to the
+ variable, and the trailing non-whitespace field delimiter issue
+
+ 3/7
+ ---
+configure.in
+ - add -D_POSIX_SOURCE to the LOCAL_CFLAGS for Interix
+
+ 3/8
+ ---
+bashline.c
+ - make bash_directory_expansion a void function, since it doesn't have
+ any return value
+
+ 3/9
+ ---
+builtins/read.def
+ - when testing for a pipe, use `fd' instead of hard-coding 0, since we
+ can read from other file descriptors now
+
+lib/sh/zread.c
+ - in zsyncfd, only set lind and lused to 0 if the lseek succeeds.
+ If the lseek fails, we might steal input from other programs, but
+ a failed lseek won't cause us to erroneously discard input
+
+ 3/11
+ ----
+builtins/evalstring.c
+ - don't allow parse_and_execute to short-circuit and call exec() if
+ the command's return value is being inverted
+
+ 3/15
+ ----
+builtins/printf.def
+ - new macro PC to call putchar and increment number of chars printed -
+ fixes bug in computation of value for %n format char
+ - `tw' is now a global var so printstr can modify it using PC()
+ - convert PF macro to use asprintf into a local buffer
+ Preparation for printf -v var
+ - add code to add the text printed to a `variable buffer' if -v option
+ supplied. The buffer grows as needed
+ - printf now takes a `-v var' option to put the output into the variable
+ VAR rather than sending it to stdout. It does not:
+ print partial output on error (e.g., format string error)
+ handle NULs in the variable value, as usual
+
+ 3/16
+ ----
+parse.y
+ - fix bug in prompt string decoding that caused a core dump when PS1
+ contained \W and PWD was unset (null pointer deref)
+
+builtins/printf.def
+ - changed -v var behavior so it stores partial output into the named
+ variable upon an error
+
+ 3/24
+ ----
+lib/readline/bind.c
+ - bool_to_int now takes a `const char *' argument
+
+support/{printenv,recho,zecho}.c
+ - include config.h
+ - include "bashansi.h" for appropriate extern function declarations
+
+configure.in
+ - on MacOS X 10.4, compensate for loader not allowing static library
+ to override existing system dynamic library when compiling -dynamic
+ (affects readline and history libraries); so use absolute pathname
+ instead of -lreadline as library name
+
+lib/glob/{glob,sm_loop,smatch}.c
+ - make sure to cast arguments to (char *) or (unsigned char *) as
+ appropriate to avoid gcc4 warnings
+
+lib/glob/smatch.c
+ - collsym (single-byte version) now takes a (CHAR *) first argument to
+ match callers; cast argument to strncmp appropriately
+
+lib/sh/snprintf.c
+ - fix ldfallback and dfallback to handle width and precision specs in
+ the format passed to sprintf()
+ - fix STAR_ARGS macro to deal with negative field widths and precisions
+
+ 3/25
+ ----
+builtins/printf.def
+ - since a negative precision in a "x.x[fFgGeE]" format specifier should
+ be allowed but treated as if the precision were missing, let it
+ through
+
+lib/sh/snprintf.c
+ - fix * code to deal with a negative precision by treating it as if
+ the `.' and any digit string in the precision had not been specified
+ - fix format parsing code to deal with a negative inline precision,
+ e.g., "%4.-4f" by treating it as if the `'. and any digit string in
+ the precision had not been specified
+ - a `+' in a format specifier should only act as a flag if it comes
+ before a `.' (otherwise it is ignored)
+
+lib/readline/vi_mode.c
+ - new function, rl_vi_rubout, to rl_rubout as rl_vi_delete is to
+ rl_delete; saves deleted text for possible reinsertion as with any
+ vi-mode `text modification' command (fixes problem with `X' reported
+ by beat.wieland@gmx.ch)
+
+lib/readline/vi_keymap.c
+ - bind `X' in vi command mode to rl_vi_rubout
+
+lib/readline/funmap.c
+ - add a bindable `vi-rubout' command, runs rl_vi_rubout
+
+lib/readline/text.c
+ - rewrote internals of _rl_rubout_char to make structure cleaner
+
+lib/readline/{complete,text}.c
+ - changed code to remove #ifdef HANDLE_MULTIBYTE where possible
+
+ 3/28
+ ----
+lib/readline/examples/rl.c
+ - include <sys/stat.h> instead of posixstat.h if READLINE_LIBRARY not
+ defined
+
+subst.c
+ - fix mbstrlen to treat invalid multibyte sequences as sequences of
+ single-byte characters
+
+ 4/8
+ ---
+configure.in
+ - default SIZE to `:' if cross-compiling and an appropriate size for
+ the target is not found
+
+ 4/11
+ ----
+subst.c
+ - change match_upattern and match_wpattern to check whether or not the
+ supplied pattern matches anywhere in the supplied string, prefixing
+ and appending the pattern with `*' if necessary. If it doesn't we
+ can short-circuit immediately rather than waste time doing up to
+ N-1 unsuccessful calls to strmatch/wcsmatch (which kills for long
+ strings, even if the pattern is short)
+
+ 4/12
+ ----
+configure.in
+ - make sure the special case for MacOS X 10.4 only kicks in if the
+ `--with-installed-readline' option isn't supplied
+
+lib/readline/{callback,readline,signals}.c
+ - make sure rl_prep_term_function and rl_deprep_term_function aren't
+ dereferenced if NULL (as the documentation says)
+
+builtins/mkbuiltins.c
+ - don't bother with the special HAVE_BCOPY code; just use straight
+ assignments
+
+builtins/ulimit.def
+ - use _POSIX_PIPE_BUF in pipesize() if it's defined and PIPE_BUF is
+ not
+
+ 4/13
+ ----
+execute_cmd.c
+ - add cm_function_def to the list of control structures for which
+ child processes are forked when pipes come in or out
+
+ 4/14
+ ----
+builtins/read.def
+ - make sure the ^As added for internal quoting are not counted as
+ characters read when -n is supplied
+
+ 4/20
+ ----
+redir.c
+ - fix redir_open so that the repeat open on failure that AFS support
+ adds restores the correct value of errno for any error message
+
+ 4/26
+ ----
+
+Makefile.in
+ - make sure mksignames and mksyntax are invoked with the $(EXEEXT)
+ extension
+
+ 4/28
+ ----
+lib/readline/readline.h
+ - new state variable: RL_STATE_CALLBACK, means readline is using the
+ callback interface
+
+lib/readline/callback.c
+ - set RL_STATE_CALLBACK in rl_callback_handler_install, unset in
+ rl_callback_handler_remove
+
+ 4/29
+ ----
+config-top.h
+ - DONT_REPORT_SIGPIPE is now on by default, since it apparently
+ interferes with scripts
+
+configure.in
+ - arrange things so PGRP_PIPE is defined on Linux-2.4+ and version 3
+ kernels (ones that apparently schedule children to run before their
+ parent)
+
+ 4/30
+ ----
+builtins/caller.def
+ - add call to no_options, so it can handle `--' option
+
+doc/{bash.1,bashref.texi}
+ - note explicitly that test, :, true, and false don't understand --
+ as meaning the end of options
+
+ 5/7
+ ---
+support/shobj-conf
+ - darwin 8 needs the same LDFLAGS setting as darwin 7
+
+parse.y
+ - in save_parser_state, make sure we cast the return value from
+ xmalloc() to the right type
+ - remove casts to (char *) in calls to yyerror()
+
+lib/readline/signals.c
+ - make SIGQUIT and SIGALRM code conditional on their definition
+ - use raise() to send a signal if we don't have kill()
+
+lib/readline/display.c
+ - some MS-DOS and MINGW changes from the cygwin and mingw folks
+
+config.h.in
+ - add HAVE_PWD_H for <pwd.h>
+ - add HAVE_FCNTL, HAVE_KILL for respective system calls
+ - add HAVE_GETPW{ENT,NAM,UID} for passwd functions
+
+configure.in
+ - add check for <pwd.h>
+ - add checks for fcntl, kill system calls
+ - add checks for getpw{ent,nam,uid} C library functions
+ - pass a flag indicating we're cross compiling through to
+ CFLAGS_FOR_BUILD in Makefile.in
+
+lib/readline/complete.c
+ - guard inclusion of <pwd.h> with HAVE_PWD_H
+ - don't provide a missing declaration for getpwent if we don't have it
+ - guard calls to {get,end}pwent with HAVE_GETPWENT
+
+lib/readline/shell.c
+ - guard inclusion of <pwd.h> with HAVE_PWD_H
+ - guard inclusion of <fcntl.h> with HAVE_FCNTL_H
+ - don't provide a missing declaration for getpwuid if we don't have it
+ - guard calls to getpwuid with HAVE_GETPWUID
+ - don't bother with body of sh_unset_nodelay_mode if we don't have
+ fcntl
+
+lib/tilde/tilde.c
+ - guard inclusion of <pwd.h> with HAVE_PWD_H
+ - guard calls to getpw{nam,uid} with HAVE_GETPW{NAM,UID}
+ - guard calls to {get,end}pwent with HAVE_GETPWENT
+
+Makefile.in,builtins/Makefile.in
+ - @CROSS_COMPILE@ is substituted into CFLAGS_FOR_BUILD (equal to
+ -DCROSS_COMPILING if bash is being cross-compiled)
+
+ 5/9
+ ---
+aclocal.m4
+ - print version as `0.0' in RL_LIB_READLINE_VERSION if the
+ `rl_gnu_readline_p' variable isn't 1 (accept no imitations)
+
+ 5/11
+ ----
+lib/readline/rlprivate.h
+ - definition of a readline `search context', to be use for incremental
+ search initially and other types of search later. Original from
+ Bob Rossi as part of work on incremental searching problems when
+ using callback interface
+
+lib/readline/isearch.c
+ - functions to allocate and free search contexts
+ - function to take a search context and a character just read and
+ `dispatch' on it: change search parameters, add to search string,
+ search further, etc.
+ - isearch is now completely context-driven: a search context is
+ allocated and passed to the rest of the functions
+
+ 5/12
+ ----
+lib/readline/isearch.c
+ - an additional `isearch cleanup' function that can be called from
+ the callback interface functions when the search is to be terminated
+ - an additional `isearch callback' function that can be called from
+ rl_callback_read_char when input is available
+ - short-circuit from rl_search_history after initialization if
+ the callback interface is being used
+
+lib/readline/callback.c
+ - in rl_callback_read_char(), if RL_STATE_ISEARCH is set, call
+ _rl_isearch_callback to read the character and dispatch on it.
+ If RL_STATE_ISEARCH is unset when that call returns, and there is
+ input pending, call rl_callback_read_char() again so we don't
+ have to wait for new input to pick it up
+
+support/shobj-conf,configure.in
+ - add support for dragonfly bsd, the same as freebsd
+
+ 5/13-5/15
+ ---------
+lib/readline/callback.c
+ - support for readline functions to `register' a function that will
+ be called when more input is available, with a generic data
+ structure to encapsulate the arguments and parameters. Primarily
+ intended for functions that read a single additional character,
+ like quoted-insert
+ - support for callback code reading numeric arguments in a loop,
+ using readline state and an auxiliary variable
+ - support for callback code performing non-incremental searches using
+ the same search context struct as the isearch code
+
+lib/readline/{callback,display}.c
+ - if a callback function sets `_rl_redisplay_wanted', the redisplay
+ function will be called as soon as it returns
+
+lib/readline/input.c
+ - changes to _rl_read_mbchar to handle reading the null multibyte
+ character and translating it into '\0'
+
+lib/readline/misc.c
+ - break rl_digit_loop() into component functions that can be called
+ individually from the callback code more easily
+ - share some of the functions with rl_digit_loop1() in vi_mode.c
+
+lib/readline/readline.h
+ - change the version #defines to reflect readline 5.1
+
+lib/readline/search.c
+ - break code into smaller functions that can be composed to work with
+ the callback code more easily
+
+lib/readline/text.c
+ - in rl_quoted_insert(), don't mess around with the tty signals if
+ running in `callback mode'
+
+lib/readline/vi_mode.c
+ - changed set-mark, goto-mark, change-char, and char-search to work
+ when called by callback functions
+
+ 5/17
+ ----
+
+lib/readline/rlprivate.h
+ - new struct declaration for a `reading key sequence' context
+
+lib/readline/readline.c
+ - new variable, _rl_dispatching_keymap, keeps track of which keymap
+ we are currently searching
+ - functions to allocate and deallocate contexts for reading multi-char
+ key sequences
+
+ 5/18
+ ----
+lib/readline/rlprivate.h
+ - new struct defining a context for multiple-key key sequences (the
+ base case is escape-prefixed commands)
+
+lib/readline/readline.c
+ - change structure of _rl_dispatch_subseq to allow for callback code
+ to use it - rudimentary support for supporting the existing
+ recursion using a stack of contexts, each with a reference to the
+ previous
+ - fix so that ^G works when in callback mode
+
+lib/readline/callback.c
+ - call the appropriate multiple-key sequence callback if the state is
+ set
+
+ 5/19
+ ----
+lib/readline/readline.c
+ - broke code from _readline_internal_char after call to rl_dispatch
+ out into separate function: _rl_internal_char_cleanup, callable by
+ other parts of the code
+ - change _rl_internal_char_cleanup to unset _rl_want_redisplay after
+ it calls (*rl_redisplay_func)
+
+lib/readline/callback.c
+ - call _rl_internal_char_cleanup from rl_callback_read_char when
+ appropriate
+
+ 5/24
+ ----
+lib/readline/callback.c
+ - use _rl_dispatch_callback and a chain of _rl_keyseq_contexts to
+ simulate the recursion used to decode multicharacter key sequences
+ (even things like ESC- as meta-prefix)
+ - call setjmp in rl_callback_read_char to give things like rl_abort
+ a place to jump, since the saved location in readline() will not
+ be valid
+ - keep calling _rl_dispatch_callback from rl_callback_read_char while
+ we are still decoding a multi-key key sequence
+ - keep calling readline_internal_char from rl_callback_read_char while
+ we are reading characters from a macro
+
+lib/readline/macro.c
+ - use a slightly different strategy upon encountering the end of a macro
+ when using the callback interface: when the last character of a
+ macro is read, and we are reading a command, pop the macro off the
+ stack immediately so the loop in rl_callback_read_char terminates
+ when it should
+
+lib/readline/readline.c
+ - if longjmp() is called and we end up at the saved location while
+ using the callback interface, just return -- don't go back into a
+ blocking read
+ - new function to dispose a chain of rl_keyseq_cxts
+ - only read new input in _rl_dispatch_callback if the KSEQ_DISPATCHED
+ flag is not set in the current keyseq context -- if it is, we are
+ traversing the chain back up and should use what we already saved
+ - use -3 as a magic value from _rl_dispatch_subseq to indicate that
+ we're allocating a new context and moving downward in the chain
+ (a special return value for the benefit of _rl_dispatch_callback)
+
+lib/readline/rlprivate.h
+ - new extern declaration for _rl_keyseq_chain_dispose
+
+ 6/1
+ ---
+builtins/read.def
+ - fixed a bug that occurred when reading a set number of chars and
+ the nth char is a backslash (read one too many). Bug reported by
+ Chris Morgan <chmorgan@gmail.com>
+
+execute_cmd.c
+ - fix execute_builtin so the `unset' builtin also operates on the
+ temporary environment in POSIX mode (as well as source and eval),
+ so that unsetting variables in the temporary environment doesn't
+ leave them set when unset completes. Report by Eric Blake
+ <ebb9@byu.net>
+
+array.c
+ - fix from William Park for array_rshift when shifting right on an
+ empty array -- corrects calculation of array->max_index
+
+builtins/exec.def
+ - if an exec fails and the execfail option is set, don't call
+ restart_job_control unless the shell is interactive or job_control
+ is set
+
+jobs.c
+ - add a run-time check for WCONTINUED being defined in header files
+ but rejected with EINVAL by waitpid(). Fix from Maciej Rozycki
+ <macro@linux-mips.org>
+
+ 6/20
+ ----
+bashhist.c
+ - make sure calls to sv_histchars are protected by #ifdef BANG_HISTORY
+ - ditto for calls to history_expand_line_internal
+
+ 6/23
+ ----
+doc/bashref.texi
+ - remove extra blank lines in @menu constructs
+
+variables.c
+ - assign export_env to environ (extern char **) every time it changes
+ (mostly in add_to_export_env define), so maybe getenv will work on
+ systems that don't allow it to be replaced
+
+ 6/29
+ ----
+bashline.c
+ - in bash_directory_completion_hook, be careful about not turning `/'
+ into `//' and `//' into `///' for benefit of those systems that treat
+ `//' as some sort of `network root'. Fix from Eric Blake
+ <ebb9@byu.net>
+
+lib/readline/complete.c
+ - in to_print, do the right thing after stripping the trailing slash
+ from full_pathname: // doesn't turn into /, and /// doesn't become
+ //. Fix from Eric Blake <ebb9@byu.net>
+
+ 6/30
+ ----
+lib/malloc/trace.c
+ - include <unistd.h> if it's available for a definition of size_t
+
+jobs.c
+ - in wait_for, if a child process is marked as running but waitpid()
+ returns -1/ECHILD (e.g., when the bash process is being traced by
+ strace), make sure to increment c_reaped when marking the child as
+ dead
+ - in without_job_control, make sure to close the pgrp pipe after
+ calling start_pipeline
+
+ 7/1
+ ---
+Makefile.in
+ - only remove pathnames.h when the other files created by running
+ configure are removed (e.g., Makefile). Fix from William Park
+
+lib/sh/shquote.c
+ - since backslash-newline disappears when within double quotes, don't
+ add a backslash in front of a newline in sh_double_quote. Problem
+ reported by William Park
+
+jobs.c
+ - in notify_of_job_status, don't print status messages about
+ terminated background processes unless job control is active
+
+bashhist.c
+ - new variable, hist_last_line_pushed, set to 0 in really_add_history
+ (used by `history -s' code)
+
+bashhist.h
+ - new extern declaration for history -s
+
+builtins/history.def
+ - don't remove last history entry in push_history if it was added by
+ a call to push_history -- use hist_last_line_pushed as a sentinel
+ and set it after adding history entry. This allows multiple
+ calls to history -s to work right: adding all lines to the history
+ rather than deleting all but the last. Bug reported by Matthias
+ Schniedermeyer <ms@citd.de>
+ - pay attention to hist_last_line_pushed in expand_and_print_history()
+ so we don't delete an entry pushed by history -s
+
+ 7/4
+ ---
+print_cmd.c
+ - fix print_arith_for_command to not print so many blanks between
+ expressions in ((...))
+
+command.h
+ - new word flag: W_DQUOTE. Means word should be treated as if double
+ quoted
+
+make_cmd.c
+ - add W_DQUOTE to word flags in make_arith_for_expr
+
+parse.y
+ - add W_DQUOTE to word flags for (( ... )) arithmetic commands
+
+subst.c
+ - don't perform tilde expansion on a word with W_DQUOTE flag set
+ - don't perform process substitution on a word with W_DQUOTE flag set
+
+arrayfunc.c
+ - expand an array index within [...] the same way as an arithmetic
+ expansion between (( ... ))
+
+lib/readline/input.c
+ - use getch() instead of read() on mingw
+
+lib/readline/readline.c
+ - add a few key bindings for the arrow keys on mingw
+
+lib/readline/rldefs.h
+ - if on mingw, define NO_TTY_DRIVER
+
+lib/readline/rltty.c
+ - compile in the stub functions for _rl_{disable,restore}_tty_signals
+ if on mingw
+ - compile in stub function for rl_restart_output on mingw
+ - make sure enough functions and macros are defined to compile if
+ NO_TTY_DRIVER is defined (lightly tested - builds on MacOS X, at
+ least)
+
+ 7/7
+ ---
+command.h
+ - add a `flags' member to the PATTERN_LIST structure
+
+make_cmd.c
+ - intialize the `flags' member of a PATTERN_LIST when it's created
+
+builtins/psize.c
+ - protect extern declaration of errno with usual #ifdef errno
+
+configure.in, variables.c
+ - changes for QNX 6.x
+
+ 7/9
+ ---
+parse.y
+ - fix parse_matched_pair to handle single and double quoted strings
+ inside old-style command substitution (``) since they can each
+ quote the ` and embedded $-expansions. Report by Eric Blake
+ <ebb9@byu.net>
+
+{configure,Makefile}.in
+ - TILDE_LIB is now substituted into Makefile by configure
+
+configure.in
+ - if configuring --with-installed-readline on cygwin, set TILDE_LIB
+ to the empty string to avoid multiply-defined symbols. Cygwin
+ doesn't allow undefined symbols in dynamic libraries. Report by
+ Eric Blake <ebb9@byu.net>
+
+ 7/11
+ ----
+input.c
+ - in duplicate_buffered_stream, don't call free_buffered_stream if the
+ two buffered streams share the same b_buffer object (e.g., if they
+ had already been duplicated with a previous call). Fixes Debian bug
+ reported by eero17@bigfoot.com
+
+ 7/12
+ ----
+shell.c
+ - make set_shell_name more resistant to a NULL argument
+ - in bind_args, use < instead of != when counting the arguments and
+ making the arg list
+ - in main(), make sure arg_index is not initialized to a value greater
+ than argc
+
+ 7/14
+ ----
+lib/readline/display.c
+ - in expand_prompt, don't set the location of the last invisible
+ char if the sequence is zero length (\[\])
+
+ 7/15
+ ----
+doc/{bash.1,bashref.texi}
+ - document that the shell uses $TMPDIR when creating temporary files
+
+ 7/20
+ ----
+[bash-3.1-alpha1 frozen]
+
+ 7/29
+ ----
+builtins/evalstring.c
+ - make sure that parse_and_execute saves and restores the value of
+ loop_level, so loops in sourced scripts and eval'd strings don't
+ mess up the shell's parser state
+
+bashline.c
+ - change command_subst_completion_function to suppress appending
+ any character to a unique completion, instead of a space, unless
+ the last word in the quoted command substitution completes to a
+ directory name. In that case we append the expected slash
+
+ 8/1
+ ---
+builtins/printf.def
+ - make sure variables are initialized if their values are tested later
+
+[bash-3.1-alpha1 updated and re-frozen]
+
+ 8/2
+ ---
+variables.c
+ - make sure to call stifle_history with an `int' instead of an intmax_t.
+ Sometimes it makes a difference
+
+ 8/3
+ ---
+[bash-3.1-alpha1 released]
+
+support/mksignames.c
+ - add `SIGSTKFLT' (RHE3)
+ - add `SIGXRES' (Solaris 9)
+
+ 8/4
+ ---
+builtins/ulimit.def
+ - fix typo to make `x' the right option for locks
+ - add new options to short help synopsis
+
+variables.c
+ - use get_variable_value instead of direct reference to value_cell
+ in make_variable_value when appending to the current value, so
+ references to array variables without subscripts will be equivalent
+ to element 0
+
+lib/readline/text.c
+ - rewrote rl_change_case to correctly change the case of multibyte
+ characters where appropriate
+
+ 8/5
+ ---
+configure.in
+ - remove call to obsolete macro AC_ACVERSION
+ - remove special calls to AC_CYGWIN and AC_MINGW32; AC_CANONICAL_HOST
+ takes care of those cases
+
+general.h
+ - include `chartypes.h' for definition of ISALPHA
+ - fix definitions of ABSPATH and RELPATH for cygwin
+ - fix definition of ISDIRSEP for cygwin to allow backslash as a
+ directory name separator
+
+ 8/9
+ ---
+builtins/setattr.def
+ - when setting a variable from the temporary environment in
+ set_var_attribute (e.g., `LC_ALL=C export LC_ALL'), make sure to
+ call stupidly_hack_special_variables after binding the variable in
+ the current context
+
+builtins/printf.def
+ - make sure to call stupidly_hack_special_variables if using `printf -v'
+ to put formatted output in a shell variable
+
+ 8/11
+ ----
+support/shobj-conf
+ - new variable: SHLIB_LIBPREF, prefix for shared library name (defaults
+ to `lib'
+ - new variable: SHLIB_DLLVERSION, used on Cygwin to set the library
+ version number
+ - new variable: SHLIB_DOT, separator character between library name and
+ suffix and version information (defaults to `.')
+ - new stanza for cygwin to generate windows-compatible dll
+
+ 8/14
+ ----
+variables.c
+ - new special variable function for Cygwin, so the export environment
+ is remade when HOME is changed. The environment is the only way to
+ get information from the shell to cygwin dlls, for instanace, when
+ bash is compiled to use an already-installed libreadline
+
+variables.h
+ - new extern declaration for sv_home
+
+ 8/15
+ ----
+lib/readline/display.c
+ - call init_line_structures from rl_redisplay if vis_lbreaks == 0
+ to avoid consequences of a poorly-timed SIGWINCH
+
+ 8/16
+ ----
+subst.c
+ - fix logic for performing tilde expansion when in posix mode (don't
+ rely on W_TILDEEXP flag always being set, because it won't be when
+ expanding the RHS of assignment statement). Use W_TILDEEXP only
+ when deciding to expand a word marked as W_ASSIGNMENT that doesn't
+ precede a command name
+
+ 8/17
+ ----
+execute_cmd.c
+ - in execute_function, when subshell == 1, don't short-cut by using
+ the command contained in the group command -- if you do, any
+ redirections attached to the group command (function) don't get
+ executed
+
+general.h
+ - new #define, FS_READABLE, indicates file is readable by current
+ user
+
+findcmd.c
+ - rewrote file_status to use S_xxx POSIX file mode bits and to add
+ support for FS_READABLE (affects ./source and searching $PATH for
+ scripts whose names are supplied as arguments on the command line)
+ - change find_path_file to look for readable files -- source requires
+ it
+ - change find_in_path_element to do the right thing when FS_READABLE
+ is supplied as a flag
+
+doc/bashref.texi
+ - remove note about posix non-compliance in `.': we now require and
+ look for readable files when searching $PATH
+
+ 8/20
+ ----
+subst.c
+ - fix setifs to handle case where passed variable is non-zero but
+ v->value == 0 (as in an unset local variable); treat IFS as unset
+ in this case
+
+jobs.c
+ - in kill_pid, if asked to killpg a process or pgrp whose pgrp is
+ recorded as the same as the shell's, just call killpg and let the
+ chips fall where they may -- there may be other processes in that
+ pgrp that are not children of the shell, so killing each process
+ in the pipeline will not do a complete job, and killpg'ing each
+ such process will send too many signals in the majority of cases
+
+builtins/cd.def
+ - in posix mode, pwd needs to check that the value it prints and `.'
+ are the same file
+
+builtins/read.def
+ - if reading input from stdin in a non-interactive shell and calling
+ `read', call sync_buffered_stream to seek backward in the input
+ stream if necessary (XXX - should we do this for all shell builtins?)
+
+ 8/23
+ ----
+builtins/cd.def
+ - in posix mode, if canonicalization of the absolute pathname fails
+ because the path length exceeds PATH_MAX, but the length of the passed
+ (non-absolute) pathname does not, attempt the chdir, just as when
+ not in posix mode
+
+builtins/type.def
+ - don't have describe_command call sh_makepath if the full path found
+ is already an absolute pathname (sh_makepath will stick $PWD onto the
+ front of it)
+
+ 8/24
+ ----
+
+jobs.c
+ - in posix mode, don't have start_job print out and indication of
+ whether the job started by `bg' is the current or previous job
+ - change start_job to return success if a job to be resumed in the
+ background is already running. This means that bg won't fail when
+ asked to bg a background job, as SUSv3/XPG6 requires
+ - new function, init_job_stats, to zero out the global jobstats struct
+
+{jobs,nojobs}.c
+ - change kill_pid to handle pids < -1 by killing process groups
+
+jobs.h
+ - extern declaration for init_job_stats
+
+lib/readline/history.c
+ - check whether or not the history list is null in remove_history
+
+builtins/history.def
+ - delete_last_history is no longer static so fc builtin can use it
+
+builtins/fc.def
+ - use free_history_entry in fc_replhist instead of freeing struct
+ members individually
+ - call delete_last_history from fc_replhist instead of using inline
+ code
+ - if editing (-l not specified), make sure the fc command that caused
+ the editing is removed from the history list, as POSIX specifies
+
+builtins/kill.def
+ - just call kill_pid with any pid argument and let it handle pids < -1
+ This is the only way to let kill_pid know whether a negative pid or
+ a job spec was supplied as an argument to kill
+
+builtins/fg_bg.def
+ - force fg_bg to return EXECUTION_SUCCESS explicitly if called by bg
+ and start_job returns successfully
+ - bg now returns success only if all the specified jobs were resumed
+ successfully
+
+execute_cmd.c
+ - call init_job_stats from initialize_subshell to zero out the global
+ job stats structure
+
+ 8/25
+ ----
+bashline.c
+ - change vi_edit_and_execute_command to just call vi when in posix
+ mode, instead of checking $FCEDIT and $EDITOR
+
+lib/readline/search.c
+ - if in vi_mode, call rl_free_undo_list in make_history_line_current
+ to dispose of undo list accumulated while reading the search string
+ (if this isn't done, since vi mode leaves the current history
+ position at the entry which matched the search, the call to
+ rl_revert_line in rl_internal_teardown will mangle the matched
+ history entry using a bogus rl_undo_list)
+ - call rl_free_undo_list after reading a non-incremental search string
+ into rl_line_buffer -- that undo list should be discarded
+
+lib/readline/rlprivate.h
+ - add UNDO_LIST * member to search context struct
+
+lib/readline/isearch.c
+ - initialize UNDO_LIST *save_undo_list member of search context struct
+
+ 8/27
+ ----
+lib/readline/bind.c
+ - change rl_parse_and_bind to strip whitespace from the end of a
+ variable value assignment before calling rl_variable_bind
+
+doc/bash.1,lib/readline/doc/{rluser.texi,readline.3}
+ - clarified the language concerning parsing values for boolean
+ variables in assignment statements
+
+ 8/28
+ ----
+lib/sh/pathphys.c
+ - fix small memory leak in sh_realpath reported by Eric Blake
+
+ 8/31
+ ----
+doc/bashref.texi
+ - add additional notes to posix mode section
+
+ 9/3
+ ---
+parse.y
+ - if $'...' occurs within a ${...} parameter expansion within
+ double quotes, don't single-quote the expanded result -- the double
+ quotes will cause it to be expanded incorrectly
+
+ 9/4
+ ---
+builtins/fc.def
+ - if STRICT_POSIX is defined, the posix mode default for the editor to
+ use is $FCEDIT, then ed
+
+shell.c
+ - if STRICT_POSIX is defined, initialize `posixly_correct' to 1
+
+config.h.in
+ - add #undef STRICT_POSIX
+
+ 9/5
+ ---
+configure.in
+ - add new option argument, --enable-strict-posix-default, configures
+ bash to be posix-conformant (including defaulting echo to posix
+ conformance) by default
+
+builtins/echo.def
+ - if STRICT_POSIX is defined, default echo to xpg-style
+
+doc/bashref.texi
+ - describe the --enable-strict-posix-default option to configure
+
+ 9/10
+ ----
+builtins/mkbuiltins.c
+ - change to not generate N_(""), because the translated empty string is
+ special to GNU gettext
+
+ 9/13
+ ----
+lib/readline/complete.c
+ - a negative value for rl_completion_query_items means to not ask
+
+lib/readline/doc/{{rltech,rluser}.texi,readline.3}
+ - documented new semantics for rl_completion_query_items/
+ completion-query-items
+
+ 9/14
+ ----
+bashline.c
+ - bind M-TAB in emacs mode to dynamic-complete-history even if the
+ current binding is `tab-insert' (which is what it is by default),
+ not just if it's unbound
+
+ 9/15
+ ----
+eval.c
+ - call QUIT before calling dispose_command on current_command after
+ the `exec_done' label. If we dispose current_command first, the
+ longjmp might restore the value of current_command after we've
+ disposed it, and the subsequent call to dispose_command from the
+ DISCARD case will free memory twice
+
+ 9/16
+ ----
+lib/sh/strto[iu]max.c
+ - make sure the function being declared is not a cpp define before
+ defining it -- should fix problems on HP-UX
+
+ 9/19
+ ----
+Makefile.in
+ - make sure the binaries for the tests are at the front of $PATH
+
+ 9/22
+ ----
+parse.y
+ - new flag for parse_matched_pair: P_COMMAND, indicating that the
+ text being parsed is a command (`...`, $(...))
+ - change calls to parse_matched_pair to include P_COMMAND where
+ appropriate
+ - if P_COMMAND flag is set and the text is unquoted, check for comments
+ and don't try to parse embedded quoted strings if in a comment (still
+ not exactly right yet)
+
+ 9/24
+ ----
+builtins/history.def
+ - if running history -n, don't count these new lines as history lines
+ for the current session if the `histappend' shell option is set.
+ If we're just appending to the history file, the issue that caused
+ history_lines_this_session to be recalculated doesn't apply -- the
+ history file won't be missing any entries
+
+lib/readline/isearch.c
+ - fix C-w handler for isearch string reader to handle multibyte chars
+
+lib/readline/rlmbutil.h
+ - new defines for _rl_to_wupper and _rl_to_wlower
+
+lib/readline/text.c
+ - use _rl_to_wupper and _rl_to_wlower as appropriate
+
+ 9/26
+ ----
+execute_cmd.c
+ - in shell_execve, if the exec fails due to E2BIG or ENOMEM, just print
+ the appropriate error message instead of checking out any interpreter
+ specified with #!
+
+ 9/30
+ ----
+bashhist.c
+ - make $HISTCMD available anytime remember_on_history is non-zero,
+ which indicates that we're saving commands to the history, and
+ let it evaluate to 1 if we're not
+
+ 10/4
+ ----
+lib/sh/snprintf.c
+ - in floating(), make sure d != 0 before calling chkinfnan -- gcc on the
+ version of Solaris 9 I have translates 0 to -inf on the call
+
+[bash-3.1-beta1 frozen]
+
+ 10/6
+ ----
+jobs.c
+ - set the_pipeline to NULL right away in cleanup_the_pipeline, and
+ dispose a copy of the pointer so we don't mess with the_pipeline
+ while we're in the process of destroying it
+ - block and unblock SIGCHLD around manipulating the_pipeline in
+ cleanup_the_pipeline
+
+ 10/7
+ ----
+[bash-3.1-beta1 released]
+
+lib/readline/isearch.c
+ - when switching directions, make sure we turn off the SF_REVERSE
+ flag in the search context's flags word if we're going from reverse
+ to forward i-search
+
+lib/readline/bind.c
+ - new function, rl_variable_value, returns a string representing a
+ bindable readline variable's value
+ - new auxiliary function, _rl_get_string_variable_value, encapsulates
+ everything needed to get a bindable string variable's value
+ - rewrote rl_variable_dumper to use _rl_get_string_variable_value
+
+lib/readline/readline.h
+ - new extern declaration for rl_variable_value
+
+lib/readline/doc/rltech.texi
+ - documented rl_variable_value
+
+bashline.c
+ - in command_word_completion_function, if readline sets
+ rl_completion_found_quote, but doesn't set rl_completion_quote_character,
+ we have an embedded quoted string or backslash-escaped character in
+ the passed text. We need to dequote that before calling
+ filename_completion_function. So far, this is in place only for
+ absolute program names (those containing a `/')
+ - in command_word_completion_function, use rl_variable_value to decide
+ whether or not we should ignore case, and use strncasecmp instead of
+ strncmp where appropriate
+
+ 10/11
+ -----
+builtins/fc.def
+ - fixed a typo when using POSIX_FC_EDIT_COMMAND
+
+redir.h
+ - new flag values for redirections: RX_INTERNAL and RX_USER (currently
+ unused)
+
+redir.c
+ - add_undo_redirect and add_undo_close_redirect now set RX_INTERNAL
+ flag when making new redirects
+ - in do_redirection_internal, only set file descriptors > 2 to CLEXEC
+ if they're marked as RX_INTERNAL
+
+ 10/12
+ -----
+jobs.c
+ - in wait_for_single_pid, if in posix mode, remove the waited-for pid
+ from the list of background pids, forgetting it entirely. POSIX
+ conformance tests test for this.
+
+lib/readline/{readline.h,vi_mode.c}
+ - new state flag, RL_STATE_VICMDONCE, set after entering vi command
+ mode the first time; reset on each call to readline()
+
+ 10/13
+ -----
+lib/readline/undo.c
+ - in rl_revert_line, make sure that revert-line in vi mode leaves
+ rl_point set to 0 no matter the state of the line buffer
+
+lib/readline/vi_mode.c
+ - when entering vi_command mode for the first time, free any existing
+ undo list so the previous insertions won't be undone by the `U'
+ command. This is how POSIX.2 says `U' should work (and the test
+ suite tests for it)
+
+lib/readline/bind.c
+ - change rl_parse_and_bind so only `set' commands involving boolean
+ readline variables have trailing whitespace stripped from the value
+ string
+
+ 10/16
+ -----
+lib/glob/sm_loop.c
+ - fix patscan() to correctly scan backslash-escaped characters
+
+ 10/18
+ -----
+lib/sh/{winsize.c,Makefile.in},{jobs,nojobs}.c,Makefile.in,externs.h
+ - moved get_new_window_size from jobs.c/nojobs.c to new file,
+ lib/sh/winsize.c, made function global
+
+{jobs,nojobs,sig}.c,{jobs,sig}.h
+ - moved SIGWINCH handling code to sig.c rather than duplicate it in
+ jobs.c and nojobs.c
+ - call set_sigwinch_handler from sig.c code rather than job control
+ signal initialization
+
+sig.[ch]
+ - new variable, sigwinch_received, acts like interrupt_state for
+ SIGWINCH, set by sigwinch_sighandler. sigwinch_sighandler no longer
+ calls get_new_window_size
+
+parse.y
+ - add call to get_new_window_size if sigwinch_received at top of
+ shell_getc
+
+ 10/19
+ -----
+lib/malloc/malloc.c
+ - to avoid orphaning memory on free if the right bucket is busy, use a
+ new function xplit(mem, bucket) to split the block into two or more
+ smaller ones and add those to the right bucket (appropriately marking
+ it as busy)
+ - audit bsplit(), bcoalesce(), and xsplit() for proper use of busy[],
+ since they're dealing with two separate buckets
+
+ 10/22
+ -----
+subst.c
+ - new flag for string_extract: EX_REQMATCH, means to return an error
+ if a matching/closing character is not found before EOS
+ - new static flag variables: extract_string_error and extract_string_fatal
+ - change expand_word_internal to check for new error returns from
+ string_extract and return errors if appropriate
+
+ 10/23
+ -----
+builtins/cd.def
+ - make sure we free TDIR in change_to_directory after calling
+ set_working_directory (which allocates new memory) and other places
+ we short-circuit and return
+
+ 10/24
+ -----
+subst.c
+ - modified fix from 10/22 to allow bare ` to pass through (for
+ some backwards compatibility and more correctness)
+
+ 10/27
+ -----
+conftypes.h
+ - make MacOS X use the RHAPSODY code that gets HOSTTYPE, et al.
+ at build rather than configure time, to support universal binaries
+ (fix from llattanzi@apple.com)
+
+ 10/30
+ -----
+builtins/evalstring.c
+ - make sure we don't turn on CMD_NO_FORK in parse_and_execute if
+ we're running a trap command on signal receipt or exit
+
+execute_cmd.c
+ - in shell_execve, improve the error message a little bit if the
+ interpreter name in a #! exec header ends with a ^M (as in a DOS-
+ format file)
+
+ 11/1
+ ----
+lib/readline/vi_mode.c
+ - fix vi-mode `r' command to leave the cursor in the right place
+
+[bash-3.1-rc1 frozen]
+
+ 11/5
+ ----
+execute_cmd.c
+ - make sure a DEBUG trap doesn't overwrite a command string passed to
+ make_child in execute_simple_command
+
+bashline.c
+ - rearrange some code in bash_quote_filename so filenames with leading
+ tildes containing spaces aren't tilde-expanded before being
+ returned to the caller
+
+ 11/6
+ ----
+lib/readline/display.c
+ - when deciding where to move the cursor in rl_redisplay and needing
+ to move the cursor back after moving it vertically and compensate
+ for invisible characters in the prompt string, make sure that
+ _rl_last_c_pos is treated as an absolute cursor position in a
+ multibyte locale and the wrap offset (number of invisible characters)
+ is added explicitly when deciding how many characters to backspace
+
+ 11/10
+ -----
+lib/readline/terminal.c
+ - _rl_set_screen_size now interprets a lines or columns argument < 0
+ as an indication not to change the current value
+
+ 11/11
+ -----
+
+lib/readline/terminal.c
+ - new function, rl_reset_screen_size, calls _rl_get_screen_size to
+ reset readline's idea of the terminal size
+ - don't call _rl_get_screen_size in _rl_init_terminal_io if both
+ _rl_screenheight and _rl_screenwidth are > 0
+ - don't initialize _rl_screenheight and _rl_screenwidth to 0 in
+ _rl_init_terminal_io; let caller take care of it
+ - set _rl_screenheight and _rl_screenwidth to 0 before calling
+ _rl_init_terminal_io
+
+lib/readline/readline.h
+ - new extern declaration for rl_reset_screen_size
+
+lib/readline/doc/rltech.texi
+ - documented rl_reset_screen_size
+
+variables.c
+ - if readline is being used, compile in a special var function for
+ assignments to LINES and COLUMNS that calls rl_set_screen_size or
+ rl_reset_screen_size as appropriate. Only do this in posix mode
+ and only when STRICT_POSIX is defined at compile time
+ - new semaphore variable, winsize_assignment, set while doing an
+ assignment to LINES or COLUMNS
+ - new variable, winsize_assigned, says LINES or COLUMNS was assigned
+ to or found in the environment
+ - if in the middle of an assignment to LINES or COLUMNS, make
+ sh_set_lines_and_columns a no-op
+
+lib/sh/winsize.c
+ - get_new_window_size now takes two int * arguments, to return the
+ screen dimensions
+
+externs.h
+ - change extern declaration for get_new_window_size
+
+{jobs,nojobs}.c, parse.y
+ - change callers of get_new_window_size
+
+ 11/12
+ -----
+lib/readline/terminal.c
+ - new variable, rl_prefer_env_winsize, gives LINES and COLUMNS
+ precedence over values from the kernel when computing window size
+
+lib/readline/readline.h
+ - extern declaration for rl_prefer_env_winsize
+
+lib/readline/doc/rltech.texi
+ - document rl_prefer_env_winsize
+
+ 11/13
+ -----
+lib/readline/rltty.c
+ - change rl_prep_terminal to make sure we set and reset the tty
+ special characters in the vi insertion keymap if in vi mode. This
+ matters if we get accept-line for the previous line while in vi
+ command mode
+
+ 11/14
+ -----
+builtins/pushd.def
+ - make sure any call to cd_builtin includes a leading `--' from the
+ argument list (or constructs one)
+
+ 11/16
+ -----
+pcomplete.c
+ - fix small memory leak in gen_wordlist_matches
+
+[bash-3.1-rc2 frozen]
+
+ 11/21
+ -----
+[bash-3.1-rc2 released]
+
+ 11/23
+ -----
+lib/readline/display.c
+ - changes to rl_redisplay to compensate for update_line updating
+ _rl_last_c_pos without taking invisible characters in the line into
+ account. Important in multibyte locales where _rl_last_c_pos is an
+ absolute cursor position
+ - changes to _rl_move_cursor_relative to account for _rl_last_c_pos
+ being an absolute cursor position in a multibyte character locale
+ - rewrote _rl_move_cursor_relative to make it a little simpler
+
+ 11/29
+ -----
+lib/readline/display.c
+ - changes to rl_redisplay and update_line for update_line to communicate
+ upward that it took the number of invisible characters on the current
+ line into account when modifying _rl_last_c_pos
+ - in update_line, adjust _rl_last_c_pos by wrap_offset before calling
+ _rl_move_cursor_relative, so we pass correct information about the
+ true cursor position
+
+ 12/1
+ ----
+configure.in
+ - changed release status to `release'
+
+[bash-3.1 frozen]
+
+ 12/8
+ ----
+[bash-3.1 released]
+
+ 12/9
+ ----
+doc/{bash.1,version.texi},lib/readline/doc/version.texi
+ - remove `beta1' from man page footer and texinfo documents
+
+variables.c
+ - make sure winsize_assignment is protected by #ifdef READLINE, so
+ minimal shell will compile
+
+builtins/read.def
+ - make sure error cases free memory and run any unwind-protects to
+ avoid memory leaks
+
+ 12/10
+ -----
+execute_cmd.c
+ - change execute_command_internal to set $PIPESTATUS for ((...)) and
+ [[ ... ]] commands
+
+doc/{bash.1,bashref.texi,version.texi}
+ - add documentation for ulimit -[iqx] and bump revision date
+
+ 12/12
+ -----
+parse.y
+ - make sure parse_compound_assignment saves and restores the
+ PST_ASSIGNOK parser state flag around its calls to read_token.
+ Fixes bug reported by Mike Frysinger
+
+ 12/13
+ -----
+parse.y
+ - change parse_compound_assignment to save and restore the value of
+ last_read_token. Not sure why it was set unconditionally in the
+ first place after parsing the complete compound assignment
+
+ 12/14
+ -----
+lib/readline/text.c
+ - don't use return value of rl_kill_text (which always succeeds and
+ returns the number of characters killed) in rl_delete as an indication
+ of success or failure
+ - ditto for return value of rl_delete_text
+
+lib/readline/readline.c
+ - don't return the value of the called readline function as the return
+ value from _rl_dispatch_subseq; -1 means something different to the
+ callers (return 0 all the time to indicate that a readline function
+ was found and dispatched). Fix from Andreas Schwab for <DEL><DEL>
+ bug in callback interface first reported by Mike Frysinger
+
+execute_cmd.c
+ - fixed a typo in execute_case_command
+
+ 12/15
+ -----
+aclocal.m4
+ - add check for wctype() to BASH_CHECK_MULTIBYTE, define HAVE_WCTYPE
+
+config.h.in
+ - add HAVE_WCTYPE #define
+
+config-bot.h
+ - add HAVE_WCTYPE to the set of checks for HANDLE_MULTIBYTE. This
+ should catch the deficient NetBSD multibyte support
+
+ 12/16
+ -----
+parse.y
+ - use CTLESC instead of literal '\001' when decode_prompt_string
+ prefixes RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE
+
+ 12/20
+ -----
+lib/readline/display.c
+ - don't treat RL_PROMPT_START_IGNORE specially inside a sequence of
+ ignored characters
+ - keep track of the start of the current sequence of ignored
+ characters; make sure that an empty sequence of such characters
+ really is an empty sequence, not one that happens to end with '\001'
+ (RL_PROMPT_START_IGNORE)
+
+ 12/21
+ -----
+subst.c
+ - change expand_word_internal to process rest of `tilde-word' as a
+ regular part of the word if tilde expansion leaves the tilde-word
+ unchanged. This means that ~$USER expands to ~chet, which seems
+ more intuitive, and is effectively what bash-3.0 did
+
+ 12/23
+ -----
+subst.c
+ - when making a local array variable in do_compound_assignment, make
+ sure that we don't use a variable of the same name from a previous
+ context
+
+doc/bash.1
+ - documented expansions for word and patterns in case statement
+
+builtins/ulimit.def,doc/{bashref.texi,bash.1}
+ - added new -e and -r (nice and rtprio) options to ulimit; documented
+ them
+
+ 12/26
+ -----
+variables.c
+ - use `hmax' instead of `num' in sv_histsize to avoid integer overflow
+ problems with intmax_t
+
+builtins/read.def
+ - add unwind-protect to restore rl_attempted_completion_function in
+ case of a timeout
+
+{bashline,variables}.c
+ - move initialization of HISTSIZE from initialization path to
+ load_history, so it can be overridden by a value assigned in a
+ startup file
+
+lib/readline/misc.c
+ - add a missing `return r' so that rl_digit_loop returns a meaningful
+ value
+
+lib/readline/{bind,callback,display,isearch,rltty,search,text,vi_mode}.c
+ - minor cleanups to satisfy compiler warnings, mostly removing unused
+ variables
+
+ 12/27
+ -----
+support/Makefile.in
+ - add LIBS_FOR_BUILD support; defaults to ${LIBS}
+
+Makefile.in
+ - add LIBS_FOR_BUILD with no default value; use when linking programs
+ using CC_FOR_BUILD (e.g., bashversion)
+
+ 12/28
+ -----
+lib/readline/bind.c
+ - fix rl_translate_keyseq bad translation of \M-\C-x sequences
+
+execute_cmd.c
+ - in execute_arith_command, if the expression expands to more than one
+ word, make sure we join the words into a single string and pass the
+ entire thing to evalexp()
+
+expr.c
+ - new functions: _is_arithop(c), returns true if C is a valid single-
+ character arithmetic operator; _is_multiop(c), returns true if C is
+ a token corresponding to a valid multi-character arithmetic operator
+ - if we encounter a character that isn't a valid arithmetic
+ operator, throw an error. Try to be intelligent about what type of
+ error message to print
+
+subst.c
+ - new function, expand_arith_string, calls expand_string_if_necessary;
+ used where an arithmetic expression needs to be expanded
+
+subst.h
+ - new extern declaration for expand_arith_string
+
+arrayfunc.c
+ - in array_expand_index, call expand_arith_string to expand the
+ subscript in a fashion consistent with other arithmetic expressions
+
+subst.c
+ - fix parameter_brace_patsub so that we don't try to anchor the pattern
+ at the beginning or end of the string if we're doing global
+ replacement -- that combination doesn't doesn't make sense, and
+ the changed behavior is compatible with ksh93
+
+doc/{bash.1,bashref.texi}
+ - changed description of pattern substitution to match the new
+ semantics
+
+tests/new-exp.tests
+ - change tests to remove all ${pat//#rep} and ${pat//%rep}
+ expansions, since they don't mean the same thing anymore
+
+ 12/29
+ -----
+support/signames.c
+ - new file, initialize_signames() function from old mksignames.c. This
+ file builds the signal_names array
+
+support/mksignames.c
+ - strip out initialize_signames(), move to signames.c. This file only
+ writes signames.h
+ - set up to only write a stub signames.h if CROSS_COMPILING is defined,
+ with extern declaration for initialize_signames
+ - if not cross compiling, #define initialize_signames to nothing
+
+Makefile.in
+ - mksignames is now linked from mksignames.o and buildsignames.o
+ - add rules to build signames.o, assuming we're building it as part
+ of the shell (cross-compiling)
+
+trap.c
+ - call initialize_signames from initialize_traps
+
+configure.in
+ - set SIGNAMES_O to nothing (normal) or signames.o (cross-compiling),
+ substitute into Makefile
+ - don't set SIGNAMES_H if cross-compiling any more
+
+ 12/30
+ -----
+command.h
+ - new word flag: W_NOPROCSUB, inhibits process substitution on a word
+
+subst.c
+ - change expand_word_internal to suppress process substitution if the
+ word has the W_NOPROCSUB flag
+
+shell.c
+ - --wordexp turns on W_NOPROCSUB in addition to W_NOCOMSUB
+
+subst.c
+ - change string_list_dollar_at and string_list_dollar_star so that
+ MB_CUR_MAX is used to size an array only when using gcc, since gcc
+ can handle non-constant array sizes using a mechanism like alloca.
+ Other compilers, e.g. Sun's compiler, do not implement that
+ extension
+
+ 12/31
+ -----
+builtins/mkbuiltins.c
+ - when cross-compiling, don't include <config.h>, since it's for the
+ target rather than the host system. Instead, choose a reasonable
+ set of default #defines based on a minimal POSIX system
+
+jobs.c
+ - change find_process to handle a NULL return value from find_pipeline
+ - return immediately from delete_job if jobs[index] is already NULL or
+ if it has a null pipeline associated with it
+ - in delete_job, if find_last_proc returns NULL, don't try to call
+ bgp_delete
+
+ 1/7/2006
+ --------
+doc/bash.1
+ - patch from Tim Waugh to replace some literal single quotes with
+ \(aq, the groff special character for it
+
+jobs.c
+ - in realloc_jobs_list, make sure to zero out slots after j_lastj
+ in the new list
+
+ 1/9
+ ---
+support/mksignames.c
+ - make sure to include <signal.h> to get right value of NSIG from
+ (usually) <sys/signal.h>
+
+ 1/10
+ ----
+parse.y
+ - when calling parse_matched_pair on a $(...) command substitution,
+ don't pass the P_DQUOTE flag so that single quotes don't get
+ stripped from $'...' inside the command substitution. Bug report
+ and fix from Mike Stroyan <mike.stroyan@hp.com>
+
+jobs.c
+ - start maintaining true count of living children in js.c_living
+ - call reset_current in realloc_jobs_list, since old values for current
+ and previous job are most likely incorrect
+ - don't allocate a new list in realloc_jobs_list if the old size and
+ new size are the same; just compact the existing list
+ - make sure realloc_jobs_list updates value of js.j_njobs
+ - add some more itrace messages about non-null jobs after j_lastj in
+ jobs array
+
+ 1/11
+ ----
+bashjmp.h
+ - new value for second argument to longjmp: SIGEXIT. Reserved for
+ future use
+
+ 1/12
+ ----
+jobs.c
+ - add logic to make_child to figure out when pids wrap around
+ - turn second argument to delete_job into flags word, added flag to
+ prevent adding proc to bgpids list
+
+ 1/13
+ ----
+lib/readline/vi_mode.c
+ - move code that moves forward a character out of rl_vi_append_mode
+ into a separate function, _rl_vi_append_forward
+ - change _rl_vi_append_mode to save `a' as the last command, so it
+ can be redone properly
+ - new function _rl_vi_backup, moves point back a character taking
+ multibyte locales into account
+ - change rl_vi_redo to handle redoing an `a' command specially --
+ it should be redone like `i' but after moving forward a character
+ - change rl_vi_redo to use _rl_vi_backup to move point backward
+ after redoing `i' or `a'
+
+jobs.c
+ - new function, delete_old_job (pid), checks whether or not PID is in
+ a job in the jobs list. If so, and the job is dead, it just removes
+ the job from the list. If so, and the job is not dead, it zeros
+ the pid in the appropriate PROCESS so pid aliasing doesn't occur
+ - make_child calls delete_old_job to potentially remove an already-used
+ instance of the pid just forked from the jobs list if pids have
+ wrapped around. Finally fixes the bug reported by Tim Waugh
+ <twaugh@redhat.com>
+
+trap.c
+ - new define, GETORIGSIG(sig), gets the original handling for SIG and
+ sets SIG_HARD_IGNORE if that handler is SIG_IGN
+ - call GETORIGSIG from initialize_traps, get_original_signal, and
+ set_signal
+
+jobs.c
+ - in wait_for, if the original SIGINT handler is SIG_IGN, don't set
+ the handler to wait_sigint_handler. This keeps scripts started in
+ the background (and ignoring SIGINT) from dying due to SIGINT while
+ they're waiting for a child to exit. Bug reported by Ingemar
+ Nilsson <init@kth.se>
+
+lib/readline/vi_mode.c
+ - don't save text to buffer unless undo pointer points to a record of
+ type UNDO_INSERT; zero it out instead. This fixes bug reported by
+ Craig Turner <craig@synect.com> with redoing `ctd[ESC]' (empty
+ insert after change to)
+
+shell.c
+ - change set_shell_name so invocations like "-/bin/bash" are marked as
+ login shells
+
+doc/bash.1
+ - add note about destroying functions with `unset -f' to the section
+ on shell functions
+
+lib/readline/terminal.c
+ - if readline hasn't been initialized (_rl_term_autowrap == -1, the
+ value it's now initialized with), call _rl_init_terminal_io from
+ _rl_set_screen_size before deciding whether or not to decrement
+ _rl_screenwidth. Fixes bug from Mike Frysinger <vapier@gentoo.org>
+
+ 1/14
+ ----
+lib/readline/input.c
+ - allow rl_set_keyboard_input_timeout to set the timeout to 0, for
+ applications that want to use select() like a poll without any
+ waiting
+
+lib/readline/doc/rltech.texi
+ - documented valid values for timeout in rl_set_keyboard_input_timeout
+
+jobs.c
+ - in stop_pipeline, don't have the parent shell call give_terminal_to
+ if subshell_environment contains SUBSHELL_ASYNC (no background
+ process should ever give the terminal to anything other than
+ shell_pgrp)
+ - in make_child, don't give the terminal away if subshell_environment
+ contains SUBSHELL_ASYNC
+
+ 1/15
+ ----
+subst.c
+ - in parameter_brace_expand, if extracting ${#varname}, only allow
+ `}' to end the expansion, since none of the other expansions are
+ valid. Fixes Debian bug reported by Jan Nordhorlz <jckn@gmx.net>
+
+ 1/17
+ ----
+parse.y
+ - in parse_matched_pair, protect all character tests with the MBTEST
+ macro
+ - in parse_dparen, take out extra make_word after call to alloc_word_desc
+ (mem leak)
+
+ 1/18
+ ----
+parse.y
+ - in parse_matched_pair, add P_ALLOWESC to flags passed to recursive
+ parse_matched_pair call when encountering a single or double quote
+ inside a ``-style command substitution
+
+execute_cmd.c
+ - add call to QUIT at beginning of execute_command_internal; better
+ responsiveness to SIGINT
+
+ 1/21
+ ----
+lib/readline/bind.c
+ - change rl_invoking_keyseqs_in_map to honor the setting of
+ convert-meta when listing key bindings, since if convert-meta is off,
+ using '\M-' as the prefix for bindings in, for instance,
+ emacs-escape-keymap, is wrong. This affects `bind -p' output
+ - change rl_untranslate_keyseq to add '\e' instead of '\C-[' for
+ ESC
+
+execute_cmd.c
+ - add call to QUIT at end of execute_command
+
+ 1/23
+ ----
+lib/readline/display.c
+ - changed two places in update_line where a check of whether the cursor
+ is before the last invisible character in the prompt string to
+ differentiate between the multibyte character case (where
+ _rl_last_c_pos is a physical cursor position) and the single-byte
+ case (where it is a buffer index). This prevents many unnecessary
+ \r-redraw the line sequences. Reported by Dan Jacobson.
+
+ 1/24
+ ----
+quit.h
+ - wrap QUIT macro in do...while(0) like other compound statement
+ macros
+ - CHECK_TERMSIG define (placeholder for now); future use will be to
+ handle any received signals that should cause the shell to
+ terminate (e.g., SIGHUP)
+
+{input,jobs,nojobs}.c
+ - add calls to CHECK_TERMSIG where appropriate (reading input and
+ waiting for children)
+ - include quit.h if necessary
+
+ 1/25
+ ----
+parse.y
+ - undo change that makes `)' in a compound assignment delimit a token.
+ It messes up arithmetic expressions in assignments to `let', among
+ other things
+
+sig.h,{jobs,nojobs,sig,trap}.c,builtins/trap.def
+ - rename termination_unwind_protect to termsig_sighandler
+
+sig.c
+ - split termsig_sighandler into two functions: termsig_sighandler, which
+ runs as a signal handler and sets a flag noting that a terminating
+ signal was received, and termsig_handler, which runs when it is `safe'
+ to handle the signal and exit
+ - new terminate_immediately variable, similar to interrupt_immediately
+ - termsig_sighandler calls termsig_handler immediately if
+ terminate_immediately is non-zero
+
+quit.h
+ - change CHECK_TERMSIG macro to check terminating_signal and call
+ termsig_handler if it's non-zero
+ - add same check of terminating_signal and call to termsig_handler to
+ QUIT macro
+
+{jobs,nojobs}.c
+ - change call to termsig_sighandler to call termsig_handler directly,
+ as was intended
+
+parse.y,builtins/read.def
+ - set terminate_immediately to non-zero value when reading interactive
+ input, as is done with interrupt_immediately
+
+ 1/26
+ ----
+doc/{bash.1,bashref.texi}
+ - reworded the POSIX standard references to remove mention of POSIX.2
+ or 1003.2 -- it's all the 1003.1 standard now. Recommended by
+ Arnold Robbins
+
+ 1/27
+ ----
+lib/readline/complete.c
+ - move call to filename dequoting function into
+ rl_filename_completion_function; call only if directory completion
+ hook isn't set. This means that directory-completion-hook now needs
+ to dequote the directory name. We don't want to dequote the directory
+ name before calling the directory-completion-hook. Bug reported by
+ Andrew Parker <andrewparker@bigfoot.com>
+
+bashline.c
+ - add necessary directory name dequoting to bash_directory_expansion
+ and bash_directory_completion_hook
+
+lib/readline/doc/rltech.texi
+ - add note to description of rl_directory_completion_hook that it
+ needs to dequote the directory name even if no other expansions are
+ performed
+
+ 1/28
+ ----
+braces.c
+ - make sure that we skip over braces that don't start a valid matched
+ brace expansion construct in brace_expand -- there might be a valid
+ brace expansion after the unmatched `{' later in the string
+ - brace_gobbler now checks that when looking for a `}' to end a brace
+ expansion word, there is an unquoted `,' or `..' that's not inside
+ another pair of braces. Fixes the a{b{c,d}e}f problem reported by
+ Tim Waugh
+
+builtins/declare.def
+ - when not in posix mode, and operating on shell functions, typeset
+ and declare do not require their variable operands to be valid
+ shell identifiers. The other `attribute' builtins work this way.
+ Fixes inconsistency reported by Mike Frysinger <vapier@gentoo.org>
+
+{configure,config.h}.in
+ - add test for setregid, define HAVE_SETREGID and HAVE_DECL_SETREGID
+ as appropriate
+ - add test for eaccess, define HAVE_EACCESS if found
+
+lib/sh/eaccess.c
+ - new file, with sh_stat and sh_eaccess functions, moved from test.c
+ - renamed old sh_eaccess as sh_stataccess, since it uses the stat(2)
+ information to determine file accessibility
+ - new function, sh_euidaccess, to call when uid != euid or gid != egid;
+ temporarily swaps uid/euid and gid/egid around call to access
+ - rewrote sh_eaccess to call eaccess, access, sh_euidaccess or
+ sh_stataccess as appropriate. access(2) will take into account
+ things like ACLs, read-only file systems, file flags, and so on.
+
+lib/sh/Makefile.in,Makefile.in
+ - add necessary entries for eaccess.[co]
+
+test.c
+ - change calls to test_stat to call sh_stat
+
+{test,general}.c
+ - change calls to test_eaccess to call sh_eaccess
+
+externs.h
+ - new extern declaration for sh_eaccess
+
+test.[ch]
+ - remove test_stat and test_eaccess
+
+ 1/29
+ ----
+braces.c
+ - make change from 1/28 dependant on CSH_BRACE_COMPAT not being
+ defined (since old bash behavior is what csh does, defining
+ CSH_BRACE_COMPAT will produce old bash behavior)
+
+ 1/30
+ ----
+bashline.c
+ - last argument of bash_default_completion is now a flags word:
+ DEFCOMP_CMDPOS (in command position) is only current value
+ - attempt_shell_completion now computes flags before calling
+ bash_default_completion
+ - if no_empty_command_completion is set, bash does not attempt command
+ word completion even if not at the beginning of the line, as long
+ as the word to be completed is empty and start == end (catches
+ beginning of line and all whitespace preceding point)
+
+ 2/4
+ ---
+lib/readline/display.c
+ - change _rl_make_prompt_for_search to use rl_prompt and append the
+ search character to it, so the call to expand_prompt in rl_message
+ will process the non-printing characters correctly. Bug reported
+ by Mike Stroyan <mike.stroyan@hp.com>
+
+ 2/5
+ ---
+lib/readline/display.c
+ - fix off-by-one error when comparing against PROMPT_ENDING_INDEX,
+ which caused a prompt with invisible characters to be redrawn one
+ extra time in a multibyte locale. Change from <= to < fixes
+ multibyte locale, but I added 1 to single-byte definition of
+ PROMPT_ENDING_INDEX (worth checking) to compensate. Bug reported
+ by Egmont Koblinger <egmont@uhulinux.hu>
+
+ 2/8
+ ---
+lib/readline/terminal.c
+ - call _emx_get_screensize with wr, wc like ioctl code for consistency
+ - new function, _win_get_screensize, gets screen dimensions using
+ standard Windows API for mingw32 (code from Denis Pilat)
+ - call _win_get_screensize from _rl_get_screen_size on mingw32
+
+lib/readline/rlconf.h
+ - define SYS_INPUTRC (/etc/inputrc) as system-wide default inputrc
+ filename
+
+support/shobj-conf
+ - changes to make loadable builtins work on MacOS X 10.[34]
+
+builtins/pushd.def
+ - changes to make it work as a loadable builtin compiled with gcc4
+
+ 2/9
+ ---
+lib/readline/bind.c
+ - add SYS_INPUTRC as last-ditch default (if DEFAULT_INPUTRC does not
+ exist or can't be read) in rl_read_init_file
+
+lib/readline/doc/rluser.texi
+ - add description of /etc/inputrc as ultimate default startup file
+
+ 2/10
+ ----
+lib/readline/bind.c
+ - fix problem with rl_function_of_keyseq that returns a non-keymap
+ bound to a portion of the passed key sequence without processing
+ the entire thing. We can bind maps with existing non-map
+ functions using the ANYOTHERKEY binding code.
+
+variables.c
+ - shells running in posix mode do not set $HOME, as POSIX apparently
+ requires
+
+ 2/15
+ ----
+braces.c
+ - mkseq() now takes the increment as an argument; changed callers
+
+ 2/16
+ ----
+builtins/hash.def
+ - print `hash table empty' message to stdout instead of stderr
+
+ 2/17
+ ----
+lib/readline/readline.c
+ - when resetting rl_prompt in rl_set_prompt, make sure rl_display_prompt
+ is set when the function returns
+
+ 2/18
+ ----
+lib/readline/display.c
+ - further fixes to _rl_make_prompt_for_search from Eric Blake to deal
+ with multiple calls to expand_prompt
+
+ 2/21
+ ----
+builtins/hash.def
+ - don't print `hash table empty' message in posix mode
+
+ 2/27
+ ----
+lib/glob/sm_loop.c
+ - change extmatch() to turn off FNM_PERIOD in flags passed to recursive
+ calls to gmatch() when calling it with a substring after the start
+ of the string it receives. Changed `+', `*', `?, `@', and `!' cases
+ to do the right thing. Fixes bug reported by Benoit Vila
+ <bvila@free.fr>
+
+braces.c
+ - add QUIT; statements to mkseq to make large sequence generation
+ interruptible
+
+ 2/28
+ ----
+lib/glob/glob.c
+ - initialize nalloca in glob_vector
+
+ 3/1
+ ---
+lib/glob/glob.c
+ - in glob_vector, when freeing up the linked list after some error,
+ make sure to set `tmplink' to 0 if `firstlink' is set to 0, else we
+ get multiple-free errors
+
+ 3/5
+ ---
+trap.c
+ - inheritance of the DEBUG, RETURN, and ERR traps is now dependent
+ only on the `functrace' and `errtrace' shell options, as the
+ documentation says, rather than on whether or not the shell is in
+ debugging mode. Reported by Philip Susi <psusi@cfl.rr.com>
+
+parse.y
+ - in parse_matched_pair, don't recursively parse ${...} or other
+ ${...} constructs inside ``
+ - in parse_matched_pair, remove special code that recursively parses
+ quoted strings inside `` constructs. For Bourne shell compatibility
+
+ 3/6
+ ---
+builtins/pushd.def
+ - let get_directory_stack take take an `int flags' argument and convert
+ $HOME to ~ if flags&1 is non-zero
+
+builtins/common.h
+ - change extern declaration for get_directory_stack
+
+variables.c
+ - call get_directory_stack with an arg of 0 to inhibit converting
+ $HOME to ~ in the result. Fixes cd ${DIRSTACK[1]} problem
+ reported by Len Lattanzi <llattanzi@apple.com> (cd fails because
+ the tildes won't be expanded after variable expansion)
+
+jobs.c
+ - changed hangup_all_jobs slightly so stopped jobs marked J_NOHUP
+ won't get a SIGCONT
+
+general.c
+ - changed check_binary_file() to check for a NUL byte instead of a
+ non-printable character. Might at some point want to check
+ entire (possibly multibyte) characters instead of just bytes. Hint
+ from ksh via David Korn
+
+ 3/7
+ ---
+builtins/reserved.def
+ - changed runs of spaces to tabs in variables help text to make
+ indentation better when displayed
+
+builtins/mkbuiltins.c
+ - changes to avoid the annoying extra space that keeps gettext from
+ being passed an empty string
+
+ 3/9
+ ---
+lib/glob/glob.c
+ - make sure globbing is interrupted if the shell receives a terminating
+ signal
+
+ 3/14
+ ----
+lib/readline/search.c
+ - call rl_message with format argument of "%" in _rl_nsearch_init
+ to avoid `%' characters in the prompt string from being interpreted
+ as format specifiers to vsnprintf/vsprintf
+
+ 3/19
+ ----
+parse.y, eval.c, input.h
+ - change execute_prompt_command to execute_variable_command; takes the
+ variable name as a new second argument
+
+ 3/25
+ ----
+bashline.c
+ - command_word_completion_function keeps track of when it's searching
+ $PATH and doesn't return directory names as matches in that case.
+ Problem reported by Pascal Terjan <pterjan@mandriva.com>
+ - command_word_completion_function returns what it's passed as a
+ possible match if it's the name of a directory in the current
+ directory (only non-absolute pathnames are so tested).
+
+ 3/27
+ ----
+subst.c
+ - expand_arith_string takes a new argument: quoted. Either 0 (outside
+ subst.c) or Q_DOUBLE_QUOTES (substitution functions); changed callers
+
+subst.h
+ - changed extern declaration for expand_arith_string
+
+arrayfunc.c
+ - changed call to expand_arith_string in array_expand_index
+
+ 3/31
+ ----
+lib/readline/histfile.c
+ - change read_history_range to allow windows-like \r\n line endings
+
+execute_cmd.c
+ - add new variable, line_number_for_err_trap, currently set but not
+ used
+
+ 4/2
+ ---
+lib/sh/strtrans.c
+ - add code to echo -e and echo with xpg_echo enabled to require
+ a leading 0 to specify octal constants
+
+ 4/3
+ ---
+subst.c
+ - slight change to wcsdup() replacement: use memcpy instead of wcscpy
+
+parse.y
+ - before turning on W_COMPASSIGN, make sure the final character in the
+ token is a `(' (avoids problems with things like a=(4*3)/2)
+
+ 4/4
+ ---
+lib/sh/snprintf.c
+ - in number() and lnumber(), turn off PF_ZEROPAD if explicit precision
+ supplied in format
+ - change number() and lnumber() to correctly implement zero-padding
+ specified by a non-zero `.precision' part of the format
+
+subst.c
+ - new flag for extract_delimited_string: EX_COMMAND. For $(...), so
+ we can do things like skip over delimiters in comments. Added to
+ appropriate callers
+ - changes to extract_delimited_string to skip over shell comments when
+ extracting a command for $(...) (EX_COMMAND is contained in the
+ flags argument)
+
+ 4/5
+ ---
+subst.c
+ - first argument to skip_single_quoted is now a const char *
+ - new function, chk_arithsub, checks for valid arithmetic expressions
+ by balancing parentheses. Fix based on a patch from Len Lattanzi
+
+ 4/6
+ ---
+{configure,config.h}.in
+ - add separate test for isnan in libc, instead of piggybacking on
+ isinf-in-libc test
+
+lib/sh/snprintf.c
+ - separate the isnan replacement function so it's guarded by its own
+ HAVE_ISNAN_IN_LIBC define
+
+lib/sh/wcsdup.c
+ - new file, contains replacement wcsdup library function from subst.c
+ with change back to using wcscpy
+
+Makefile.in,lib/sh/Makefile.in
+ - make sure wcsdup.c is compiled and linked in
+
+subst.c
+ - wcsdup now found in libsh; removed static definition
+
+ 4/10
+ ----
+lib/readline/callback.c
+ - loop over body of rl_callback_read_char as long as there is additional
+ input rather than just calling readline_internal_char, which does
+ not handle multi-character key sequences or escape-prefixed chars
+
+lib/readline/macro.c
+ - make sure we turn off RL_STATE_MACROINPUT when the macro stack is
+ empty if we are reading additional input with RL_STATE_MOREINPUT
+
+support/shobj-conf
+ - Mac OS X no longer likes the `-bundle' option to gcc when creating a
+ dynamic shared library
+
+ 4/11
+ ----
+lib/tilde/tilde.c
+ - don't try to dereference user_entry if HAVE_GETPWENT isn't defined
+
+lib/readline/input.c
+ - make sure chars_avail is not used without being assigned a value in
+ rl_gather_tyi
+ - use _kbhit() to check for available input on Windows consoles, in
+ rl_gather_tyi and _rl_input_available
+
+ 4/21
+ ----
+lib/readline/display.c
+ - calculate (in expand_prompt) and keep track of length of local_prompt
+ in local_prompt_len; use where appropriate
+ - when using o_pos to check whether or not we need to adjust
+ _rl_last_c_pos after calling update_line, assume that it's correct
+ (a buffer index in non-multibyte locales and a cursor position in
+ multibyte locales) and adjust with wrap_offset as appropriate
+ - in update_line, set cpos_adjusted to 1 after calling
+ _rl_move_cursor_relative to move to the end of the displayed prompt
+ string
+ - in _rl_move_cursor_relative, check that the multibyte display
+ position is after the last invisible character in the prompt string
+ before offsetting it by the number of invisible characters in the
+ prompt (woff)
+
+ 4/26
+ ----
+lib/readline/doc/{rluser.texi,readline.3}
+ - make sure to note that key bindings don't allow any whitespace
+ between the key name or sequence to be bound and the colon
+
+ 4/28
+ ----
+lib/readline/display.c
+ - in update_line, make sure we compare _rl_last_c_pos as strictly less
+ than PROMPT_ENDING_INDEX, since it's 0-based, to avoid multiple
+ prompt redraws
+
+ 5/4
+ ---
+parse.y
+ - in decode_prompt_string, only prefix the expansion of \[ or \]
+ with CTLESC if the corresponding readline escape character is
+ CTLESC (coincidentally the same as \[) or CTLNUL. Bug report sent
+ by Mike Frysinger <vapier@gentoo.org> prompted the discovery
+
+aclocal.m4
+ - slight change to test for /dev/fd to compensate for a linux
+ failing; suggested by Mike Frysinger <vapier@gentoo.org>
+
+ 5/9
+ ---
+arrayfunc.c
+ - broke assign_array_var_from_string into two functions:
+ expand_compound_array_assignment and assign_compound_array_list;
+ assign_array_var_from_string just calls those functions now
+
+arrayfunc.h
+ - new extern declarations for expand_compound_array_assignment and
+ assign_compound_array_list
+
+subst.c
+ - in do_compound_assignment, call expand_compound_array_assignment
+ before creating the local variable so a previous inherited
+ value can be used when expanding the rhs of the compound assignment
+ statement
+
+ 5/11
+ ----
+doc/{bash.1,bashref.texi}
+ - clarifed `trap' description to make it clear that trapped signals
+ that are not set to SIG_IGN are reset when a subshell is created
+
+ 5/18
+ ----
+locale.c
+ - change reset_locale_vars to call setlocale (LC_ALL, "") if LANG
+ is unset or NULL
+ - if LANG is unset or NULL, reset the export environment before
+ calling setlocale in reset_locale_vars, and trust that it will
+ change the environment setlocale() inspects
+
+ 5/21
+ ----
+lib/readline/history.c
+ - new function, HIST_ENTRY *alloc_history_entry (char *string, char *ts);
+ creates a new history entry with text STRING and timestamp TS (both
+ of which may be NULL)
+ - new function, HIST_ENTRY *copy_history_entry (HIST_ENTRY *hist),
+ which copies the line and timestamp entries to new memory but just
+ copies the data member, since that's an opaque pointer
+ - new function, void replace_history_data (int which, histdata_t *old, histdata_t *new)
+ which replaces the `data' member of specified history entries with
+ NEW, as long as it is OLD. WHICH says which history entries to
+ modify
+ - add calls to replace_history_data in rl_free_undo_list and
+ rl_do_undo
+
+lib/readline/undo.c
+ - new function, alloc_undo_entry (enum undo_code what, int start, int end, char *text)
+ takes care of allocating and populating a struct for an individual
+ undo list entry
+ - new function: _rl_copy_undo_entry(UNDO_LIST *entry)
+ - new function: _rl_copy_undo_list(UNDO_LIST *head)
+
+lib/readline/rlprivate.h
+ - new extern declarations for _rl_copy_undo_{entry,list}
+
+execute_cmd.c
+ - change execute_cond_node so that quoting the rhs of the =~
+ operator forces string matching, like the == and != operators
+
+ 5/23
+ ----
+redir.c
+ - add_undo_redirect now takes as an additional argument the type of
+ redirection we're trying to undo
+ - don't add a "preservation" redirection for fds > SHELL_FD_BASE if
+ the redirection is closing the fd
+
+ 5/24
+ ----
+subst.c
+ - make sure that parameter_brace_substring leaves this_command_name
+ set to either NULL or its previous value after setting it so that
+ arithmetic evaluation errors while expanding substring values
+ contain meaningful information
+
+ 6/9
+ ---
+execute_cmd.c
+ - make sure that SUBSHELL_ASYNC and SUBSHELL_PIPE are set as flag bits
+ in subshell_environment, rather than setting only a single value
+ - change execute_subshell_builtin_or_function to give the `return'
+ builtin a place to longjmp to when executed in a subshell or pipeline
+ (mostly as the last command in a pipeline). Bug reported by
+ Oleg Verych <olecom@gmail.com>
+ - in execute_simple_command, make sure to call execute_disk_command
+ with the_printed_command_except_trap to keep DEBUG trap command
+ strings from overwriting the command strings associated with jobs
+ and printed in job control messages. Bug reported by Daniel Kahn
+ Gillmor <dkg-debian.org@fifthhorseman.net>
+
+[bash-3.2-alpha frozen]
+
+ 6/22
+ ----
+syntax.h
+ - add new CBLANK (for [:blank:] class) flag value for syntax table and
+ shellblank(c) character test macro
+
+mksyntax.c
+ - add support for setting CBLANK flag in the syntax table depending on
+ whether or not isblank(x) returns true for character x
+
+locale.c
+ - change locale_setblanks to set or unset CBLANK flag for each
+ character when locale changes
+
+parse.y
+ - change call to whitespace(c) in lexical analyzer (read_token()) to
+ call shellblank(c) instead, so locale-specific blank characters are
+ treated as white space. Fixes bug reported by Serge van deb Boom
+ <svdb+bug-bash@stack.nl>
+
+print_cmd.c
+ - when printing redirections, add a space between <, >, and <> and the
+ following word, to avoid conflicts with process substitution. Bug
+ reported by Ittay Dror <ittyad@qlusters.com>
+
+ 6/26
+ ----
+configure.in
+ - set CROSS_COMPILE to the empty string by default, so we don't inherit
+ a random value from the environment. Bug reported by
+ Lee Revell <rlrevell@joe-job.com>
+
+ 6/29
+ ----
+lib/glob/xmbsrtowcs.c
+ - make sure destp is non-null before assigning a 0 to *destp in
+ xdupmbstowcs. Fix from Louiwa Salem <loulwas@us.ibm.com>
+
+execute_cmd.c
+ - fix execute_in_subshell to make sure asynchronous isn't set to 0
+ before subshell_environment is set appropriately and
+ setup_async_signals is run. Based on report by Louiwa Salem
+ <loulwas@us.ibm.com>
+
+lib/readline/bind.c
+ - in rl_generic_bind(), make sure that the keys array is freed before
+ an error return. Fix from Louiwa Salem <loulwas@us.ibm.com>
+
+ 7/1
+ ---
+builtins/read.def
+ - make sure all editing code is protected with #ifdef READLINE, esp.
+ unwind-protect that restores the default completion function
+
+lib/readline/display.c
+ - make sure to set local_prompt_len in rl_message() [in bash-3.2-alpha]
+
+ 7/5
+ ---
+builtins/printf.def
+ - add more of echo's write error handling to printf. Suggested by
+ martin.wilck@fujitsu-siemens.com
+
+ 7/7
+ ---
+lib/readline/display.c
+ - save and restore local_prompt_len in rl_{save,restore}_prompt
+ [in bash-3.2-alpha]
+
+ 7/8
+ ---
+[bash-3.2-alpha released]
+
+ 7/9
+ ---
+lib/readline/display.c
+ - make sure that _rl_move_cursor_relative sets cpos_adjusted when it
+ offsets `dpos' by wrap_offset in a multi-byte locale. Bug reported
+ by Andreas Schwab and Egmont Koblinger
+
+subst.c
+ - make sure that the call to mbstowcs in string_extract_verbatim is
+ passed a string with enough space for the closing NUL. Reported
+ by Andreas Schwab
+
+ 7/18
+ ----
+lib/readline/{display,terminal}.c
+ - remove #ifdefs for HACK_TERMCAP_MOTION so we can use
+ _rl_term_forward_char in the redisplay code unconditionally
+
+lib/readline/rlprivate.h
+ - new extern declaration for _rl_term_forward_char
+
+lib/readline/display.c
+ - in _rl_move_cursor_relative, use `dpos' instead of `new' when
+ deciding whether or not a CR is faster than moving the cursor from
+ its current position
+ - in _rl_move_cursor_relative, we can use _rl_term_forward_char to
+ move the cursor forward in a multibyte locale, if it's available.
+ Since that function doesn't have a handle on where the cursor is in
+ the display buffer, it has to output a cr and print all the data.
+ Fixes rest of problem reported by Egmont Koblinger
+ - change variable denoting the position of the cursor in the line buffer
+ from c_pos (variable local to rl_redisplay) to cpos_buffer_position
+ (variable local to file) for future use by other functions
+
+ 7/25
+ ----
+lib/malloc/{stats,table}.h
+ - include <string.h> for prototypes for memset, strlen
+
+lib/termcap/{termcap,tparam}.c
+ - include <string.h> and provide macro replacement for bcopy if
+ necessary
+
+ 7/27
+ ----
+lib/readline/histexpand.c
+ - add support for `<<<' here-string redirection operator to
+ history_tokenize_word. Bug reported by agriffis@gentoo.org
+
+externs.h
+ - don't add prototype for strerror() if HAVE_STRERROR defined
+
+ 7/29
+ ----
+subst.c
+ - in list_string, use `string' instead of `s' -- s is not initialized
+
+ 8/9
+ ---
+subst.c
+ - fix parameter_brace_expand to set W_HASQUOTEDNULL in the WORD_DESC it
+ returns if the result of parameter_brace_substring is a quoted null
+ ("\177"). Fixes bug reported by Igor Peshansky <pechtcha@cs.nyu.edu>
+
+ 8/16
+ ----
+lib/readline/readline.h
+ - new #define, READERR, intended to be used to denote read/input errors
+
+lib/readline/input.c
+ - in rl_getc, if read() returns an error other than EINTR (after the
+ EWOULDBLOCK/EAGAIN cases are handled), return READERR rather than
+ converting return value to EOF if readline is reading a top-level
+ command (RL_STATE_READCMD)
+
+lib/readline/readline.c
+ - if rl_read_key returns READERR to readline_internal_char[loop],
+ abort as if it had read EOF on an empty line, without any conversion
+ to newline, which would cause a partial line to be executed. This
+ fixes the bug reported by Mathieu Bonnet <mathieu.bonnet@nalkym.org>
+
+aclocal.m4
+ - when testing for validity of /dev/fd/3, use /dev/null instead of
+ standard input, since the standard input fails with linux and `su'.
+ Bug reported by Greg Shafer <gschafer@zip.com.au>
+
+ 8/17
+ ----
+Makefile.in
+ - switch the TAGS and tags targets so TAGS is the output of `etags' and
+ tags is the output of `ctags'. Suggested by Masatake YAMATO
+
+ 8/25
+ ----
+execute_cmd.c
+ - change code to match documentation: set BASH_COMMAND (which takes its
+ value from the_printed_command_except_trap) only when not running a
+ trap. Rocky says the debugger is ok with this, and this is what his
+ original diffs did
+
+ 8/29
+ ----
+variables.c
+ - change set_if_not to create shell_variables if it is NULL, since
+ -o invocation options can cause variables to be set before the
+ environment is scanned
+
+[bash-3.2-beta frozen]
+
+ 9/5
+ ---
+[bash-3.2-beta released]
+
+ 9/8
+ ---
+variables.c
+ - change dispose_used_env_vars to call maybe_make_export_env
+ immediately if we're disposing a temporary environment, since
+ `environ' points to the export environment and getenv() will use
+ that on systems that don't allow getenv() to be replaced. This
+ could cause the temporary environment to affect the shell. Bug
+ reported by Vasco Pedro <vp@di.uevora.pt>
+
+builtins/echo.def,doc/{bash.1,bashref.texi}
+ - clarify that `echo -e' and echo when the `xpg_echo' shell option is
+ enabled require the \0 to precede any octal constant to be expanded.
+ Reported by Vasco Pedro <vp@di.uevora.pt>
+
+ 9/12
+ ----
+builtins/printf.def
+ - make sure `%q' format specifier outputs '' for empty string arguments
+ Bug reported by Egmont Koblinger <egmont@uhulinux.hu>
+
+make_cmd.c
+ - change make_here_document to echo lines in here-doc if set -v has
+ been executed. Reported by Eduardo Ochs <eduardoochs@gmail.com>
+
+aclocal.m4
+ - change BASH_CHECK_MULTIBYTE:
+ o replace check for wctomb with check for wcrtomb
+ o add checks for wcscoll, iswctype, iswupper, iswlower,
+ towupper, towlower
+ o add call to AC_FUNC_MBRTOWC to check for mbrtowc and mbstate_t
+ define HAVE_MBSTATE_T manually
+ o add checks for wchar_t, wctype_t, wint_t
+
+config.h.in
+ - add defines for wcscoll, iswctype, iswupper, iswlower, towupper,
+ towlower functions
+ - replace define for wctomb with one for wcrtomb
+ - add defines for wchar_t, wint_t, wctype_t types
+
+config-bot.h, lib/readline/rlmbutil.h
+ - add check for HAVE_LOCALE_H before defining HANDLE_MULTIBYTE
+ - add checks for: ISWCTYPE, ISWLOWER, ISWUPPER, TOWLOWER, TOWUPPER
+ - add checks for: WCTYPE_T, WCHAR_T, WCTYPE_T
+
+ 9/13
+ ----
+lib/readline/display.c
+ - when displaying prompts longer than the screenwidth in rl_redisplay,
+ and looking for the index of the last character whose buffer index
+ is <= the screen width to set up the inv_lbreaks array, make sure to
+ catch the case where the index == the screen width (an off-by-one
+ error occurs otherwise with prompts one character longer than the
+ screen width). Bug reported by Alexey Toptygin <alexeyt@freeshell.org>
+
+configure.in
+ - change DEBUGGER_START_FILE to start with ${ac_default_prefix}/share,
+ like bashdb installs itself. Reported by Nick Brown
+ <nickbroon@blueyonder.co.uk>
+
+ 9/14
+ ----
+lib/readline/display.c
+ - make multibyte code that computes the buffer indices of line breaks
+ for a multi-line prompt dependent on MB_CUR_MAX, so we don't take
+ the function call hit unless we're in a locale that can have
+ multibyte characters
+
+ 9/19
+ ----
+subst.c
+ - make dequote_list extern so other parts of the shell can use it
+
+subst.h
+ - extern declaration for dequote_list
+
+builtins/read.def
+ - call dequote_list before assigning words read to array variable if
+ we saw an escape character. Old code left spurious CTLESCs in the
+ string after processing backslashes. Bug reported by Daniel Dawson
+ <ddawson@icehouse.net>
+
+ 9/21
+ ----
+[bash-3.2 frozen]
+
+ 10/9
+ ----
+support/shobj-coonf
+ - change -fpic to -fPIC for FreeBSD systems (needed for SPARC at least)
+
+ 10/11
+ -----
+[bash-3.2 released]
+
+ 10/12
+ -----
+parse.y
+ - change parse_matched_pair to make sure `` command substitution does
+ not check for shell comments while parsing. Bug reported against
+ bash-3.2 by Greg Schaefer <gschafer@zip.com.au>
+
+ 10/14
+ -----
+parse.y
+ - add new parser_state flag: PST_REGEXP; means we are parsing a
+ regular expression following the =~ conditional operator
+ - cond_node sets PST_REGEXP after reading the `=~' operator
+ - change read_token to call read_token_word immediately if the
+ PST_REGEXP bit is set in parser_state
+ - change read_token_word to skip over `(' and `|' if PST_REGEXP is
+ set, since those characters are legitimate regexp chars (but still
+ parse matched pairs of parens)
+
+ 10/16
+ -----
+builtins/ulimit.def
+ - add -e and -r to $SHORT_DOC usage string
+
+po/ru.po
+ - fix encoding; Russian text in the file is actually encoded in KOI8-R
+
+ 10/23
+ -----
+shell.c
+ - make sure that the call to move_to_high_fd in open_shell_script
+ passes 1 for the `check_new' parameter so open high file descriptors
+ don't get closed and reused. Bug reported by Mike Stroyan
+ <mike.stroyan@hp.com>
+
+doc/bashref.texi
+ - fixes for typos and misspellings sent in by Brian Gough
+
+ 10/24
+ -----
+support/shobj-conf
+ - make netbsd shared library creation like openbsd's until I hear
+ differently (called using `gcc -shared')
+
+ 10/26
+ -----
+subst.c
+ - fix bug in parameter_brace_patsub so if the first character of the
+ expanded pattern is a `/', it is not taken as a global replacement
+ specifier. Bug reported on forums.nekochan.net
+
+ 10/27
+ -----
+builtins/printf.def
+ - if we need an extern declaration for asprintf, make sure we include
+ stdarg.h or varargs.h, whichever is appropriate
+ - if we do not have asprintf, add an extern declaration using
+ stdarg format. This fixes the bugs with %G on IRIX reported by
+ Matthew Woehlke <mwoehlke@tibco.com> and Stuart Shelton
+ <srcshelton@gmail.com>
+
+
+lib/sh/snprintf.c
+ - add note to not call log_10 with 0 argument -- we don't want to do
+ what real log10 does (-infinity/raise divide-by-zero exception)
+ - make sure numtoa (used by dtoa) takes the precision into account
+ when computing the fractional part with an argument of `0.0'
+ - make sure `g' and `G' formats don't print radix char if there are
+ no characters to be printed after it (change to floating())
+ - change callers of log_10 (exponent, 'g' and 'G' cases in
+ vsnprintf_internal) to not call it with 0 for argument. This fixes
+ the hang reported on IRIX by Matthew Woehlke <mwoehlke@tibco.com>
+ and Stuart Shelton <mwoehlke@tibco.com>
+
+ 10/28
+ -----
+builtins/{caller,pushd}.def
+ - changed longdoc strings in loadable builtin section to be single
+ strings, as put in the build directory builtins.c file, to aid
+ translators
+
+ 11/1
+ ----
+execute_cmd.c
+ - reset subshell_environment to 0 after make_child() call in
+ execute_null_command. Fix provided by Roy Marples
+ <uberlord@gentoo.org>
+
+ 11/7
+ ----
+lib/tilde/tilde.c
+lib/readline/{util,undo,callback,input,isearch,kill}.c
+ - make sure that memory allocated with xmalloc is freed with xfree
+
+ 11/9
+ ----
+lib/readline/display.c
+ - make sure that _rl_redisplay_after_sigwinch clears the last displayed
+ line instead of the current line (instead of assuming that the
+ cursor is on the last line). Fixes bug reported by Egmont
+ Koblinger <egmont@uhulinux.hu>
+
+ 11/10
+ -----
+lib/readline/display.c
+ - make sure that _rl_col_width is never called with MB_CUR_MAX == 1,
+ since it doesn't count invisible characters and they are not
+ compensated for. Added a warning in _rl_col_width if called when
+ MB_CUR_MAX == 1. Bug reported and solution suggested by Eric
+ Blake <ebb9@byu.net>
+
+ 11/11
+ -----
+lib/readline/display.c
+ - make sure _rl_wrapped_line is initialized to inv_lbsize int chars.
+ inv_lbsize and vis_lbsize are the same at that point, but it makes
+ the intent clearer. Fix from jan.kratochvil@redhat.com.
+ - in rl_redisplay, make sure we call memset on _rl_wrapped_line with
+ its full initialized size: inv_lbsize*sizeof(int). Fix from
+ jan.kratochvil@redhat.com.
+ - wrap the invisible and visible line variables and _rl_wrapped_line
+ into line_state structures, which can be swapped more efficiently.
+ Have to watch the wrapped_line field, since there's now one for
+ each struct. Changes from jan.kratochvil@redhat.com.
+
+lib/readline/complete.c
+ - in stat_char, check for `//server' on cygwin and return `/', since
+ it will always behave as a directory. Fix from Eric Blake
+
+lib/readline/histfile.c
+ - Cygwin's mmap() works in recent versions, so don't #undef HAVE_MMAP.
+ Recommendation from Eric Blake
+
+lib/readline/rlwinsize.h
+ - make sure tcflow() is defined on SCO Unix. Fix from William Bader
+
+aclocal.m4
+ - add check for localeconv to AM_INTL_SUBDIR macro
+
+config.h.in
+ - add HAVE_LOCALECONV
+
+lib/sh/snprintf.c
+ - add check for HAVE_LOCALECONV for GETLOCALEDATA macro
+
+general.[ch]
+ - first argument to legal_number is now `const char *'
+
+ 11/14
+ -----
+lib/readline/{readline,rlprivate}.h
+ - move rl_display_prompt declaration from rlprivate.h to readline.h
+
+lib/readline/util.h
+ - new function: rl_free(void *mem), for use by users of readline dlls
+ on Windows
+
+lib/readline/readline.h
+ - new extern declaration for rl_free
+
+lib/readline/doc/rltech.texi
+ - document rl_free and rl_display_prompt for use by application writers
+
+ 11/15
+ -----
+aclocal.m4
+ - change tests for /dev/fd and /dev/stdin to use constructs of the form
+ (exec test ... ) instead of test ... to avoid bash's /dev/fd and
+ /dev/stdin emulation
+
+ 11/16
+ -----
+jobs.c
+ - in delete_job, reset_current was being called before the job slot
+ was cleared -- moved after job_slots[job] was set to NULL. Fixes
+ bug reported by Dan Jacobson <jidanni@jidanni.org>
+
+ 11/19
+ -----
+findcmd.c
+ - when the checkhash option is set, fix the check for the hashed
+ pathname being an existing executable file. Old code required a
+ hash table deletion and re-addition. Bug reported by Linda
+ Walsh <bash@tlinx.org>
+
+ 11/21
+ -----
+subst.c
+ - in pos_params, handle case of `start' == 0 by making the list of
+ positional parameters begin with $0
+ - in parameter_brace_substring, increment `len' if start == 0, sicne
+ we will be adding $0 to the beginning of the list when we process it
+
+doc/{bash.1,bashref.texi}
+ - document new behavior of `0' offset when using substring expansion
+ with the positional parameters
+
+support/shobj-conf
+ - changes to shared object creation for loadable builtins on Mac OS X
+ 10.4 to use libtool instead of ld by specifying -dynamiclib
+ argument and changing options to be appropriate for libtool. This
+ winds up creating a dynamic shared library instead of an executable
+
+ 11/24
+ -----
+{jobs,nojobs}.c
+ - don't set last_asynchronous_pid to the child's pid in the child
+ for asynchronous jobs (for compatibility -- all other posix shells
+ seem to do it this way). This means that (echo $! )& echo $! should
+ display two different pids. Fix from discussion on the
+ austin-group-l list
+
+builtins/mkbuiltins.c
+ - change builtins.c file generation so short doc strings are marked for
+ gettext and available for subsequent translation. Suggestion by
+ Benno Schulenberg <bensberg@justemail.net>
+
+builtins/{bind,cd,hash,inlib,printf,pushd,test,times,ulimit}.def
+lib/malloc/malloc.c
+{shell,subst}.c
+ - fix a few strings that were not marked as translatable. Fix from
+ Benno Schulenberg <bensberg@justemail.net>
+
+lib/readline/misc.c
+ - new function, _rl_revert_all_lines(void). Goes through history,
+ reverting all entries to their initial state by undoing any undo
+ lists.
+
+lib/readline/rlprivate.h
+ - extern declaration for _rl_revert_all_lines
+
+rldefs.h
+ - add #undef HAVE_STRCOLL if STRCOLL_BROKEN is defined, prep to move
+ from config.h.in. Problem reported by Valerly Ushakov
+ <uwe@ptc.spbu.ru>
+
+ 11/25
+ -----
+lib/readline/readline.c
+ - call _rl_revert_all_lines from readline_internal_teardown if the
+ variable _rl_revert_all_at_newline is non-zero
+ - declare _rl_revert_all_lines initially 0
+
+ 11/27
+ -----
+doc/{bash.1,bashref.texi}
+ - make sure to be explicit that `typeset +r' cannot remove the readonly
+ attribute from a variable
+
+ 11/28
+ -----
+lib/sh/zmapfd.c
+ - new file, implements zmapfd(), which takes a file and returns its
+ contents in a string
+
+externs.h
+ - extern declaration for zmapfd
+
+ 11/29
+ -----
+builtins/evalfile.c
+ - in _evalfile, use zmapfd to read the contents of the file into a
+ string, rather than using the size reported by stat and reading that
+ many characters, if the file is not a regular file (for things like
+ named pipes, stat reports the size as 0)
+
+ 12/3
+ ----
+lib/sh/snprintf.c
+ - make sure number() sets the FL_UNSIGNED flag for %x and %X, so
+ fmtulong treats them as unsigned numbers. Fixes bug reported by
+ James Botte <James.M.Botte@lowes.com>
+
+ 12/13
+ -----
+lib/readline/util.c
+ - new function, _rl_ttymsg, for internal warning messages -- does
+ redisplay after printing message
+ - new function, _rl_errmsg, for internal warning/error messages --
+ does not do redisplay after printing message
+
+lib/readline/rlprivate.h
+ - new extern declaration for _rl_ttymsg, _rl_errmsg
+
+lib/readline/{bind,callback,complete,display,rltty}.c
+ - use _rl_ttymsg/_rl_errmsg instead of direct writes to stderr
+
+lib/sh/tmpfile.c
+ - in get_tmpdir(), make sure that $TMPDIR names a writable directory;
+ otherwise skip it. This catches names longer than PATH_MAX, but in
+ case it doesn't test that the length does not exceed PATH_MAX. Fixes
+ heap overrun bug reported by Eric Blake <ebb9@byu.net>
+
+ 12/16
+ -----
+builtin/{set,declare,shopt,trap,wait,bind,complete,enable,fc,history,read,setattr}.def
+doc/{bash.1,bashref.texi}
+ - improvements and clarifications to the help text associated with
+ several builtins, in some cases bringing them into line with the
+ man page text. From Benno Schulenberg <bensberg@justemail.net>
+
+doc/{bash.1,bashref.texi}
+ - add `E' and `T' to the synopsis of the set builtin.
+ From Benno Schulenberg <bensberg@justemail.net>
+
+builtins/{break,exit,fg_bg,hash,jobs,type,ulimit}.def
+builtins/{common,evalfile}.c
+{error,expr,jobs,mksyntax,nojobs,shell,subst,version,siglist}.c
+ - add gettextizing marks to untranslated strings
+ From Benno Schulenberg <bensberg@justemail.net>
+
+ 12/19
+ -----
+builtins/common.c
+ - change display_signal_list (used by `trap -l' and `kill -l') to use
+ five columns instead of 4 to display signal names
+
+builtins/help.def
+ - use the true terminal width instead of assuming 80 when displaying
+ help topics, leaving two characters of whitespace between horizontal
+ descriptions instead of 1
+ - change to print in columns with entries sorted down rather than across
+ (that is, like `ls' rather than `ls -x'). Change inspired by Benno
+ Schulenberg <bensberg@justemail.net>
+
+jobs.h
+ - give values to the JOB_STATE enumerations so they can be used as
+ bitmasks, too
+
+ 12/22
+ -----
+doc/{bash.1,bashref.texi}
+ - change description of `set' to make it clearer that you can use
+ `+' to turn off options
+ - clarify in the description of word splitting that sequences of
+ IFS whitespace at the beginning or end of the string are ignored
+
+ 12/26
+ -----
+doc/bashref.texi
+ - move `shopt' builtin to its own section; change internal references
+ from `Bash Builtins' to the new shopt builtin
+ - new section for builtins that modify shell behavior in `Shell
+ Builtin Commands'; move set and shopt to new section. Changes
+ inspired by Benno Schulenberg <bensberg@justemail.net>
+
+{redir,subst}.c
+ - add MT_USETMPDIR flag to calls to sh_mktmpfd and sh_mktmpname. Bug
+ reported by Eric Blake <ebb9@byu.net>
+
+{configure,Makefile}.in
+ - changes so that the pathname for DEBUGGER_START_FILE is substituted
+ into pathnames.h at make time (allowing more flexibility in setting
+ `prefix' or `datadir') instead of at configure time. Suggested by
+ Nick Brown <nickbroon@blueyonder.co.uk>
+
+shell.c
+ - declaration for have_devfd; initialized from HAVE_DEV_FD
+ - declaration for check_jobs_at_exit; initialized to 0
+ - declaration for autocd; initialized to 0
+
+variables.c
+ - new dynamic variable, BASHPID, always set from return value from
+ getpid() (changes even when $$ doesn't change). Idea from Bruce
+ Korb <bruce.corb@3pardata.com>
+
+builtins/exit.def
+ - if check_jobs_at_exit is non-zero, list jobs if there are any stopped
+ or running background jobs; don't exit shell if any running jobs
+
+execute_cmd.c
+ - in execute_simple_command, if the first word of a simple command is
+ a directory name (after looking for builtins, so `.' isn't caught)
+ that isn't found in $PATH, and `autocd' is non-zero, prefix a "cd"
+ to the command words
+
+builtins/shopt.def
+ - new `checkjobs' option, changes value of check_jobs_at_exit
+ - new `autocd' option, changes value of autocd
+
+pcomplete.c
+ - add COMP_TYPE, set to rl_completion_type, to list of variables set
+ by bind_compfunc_variables and unset by unbind_compfunc_variables
+
+doc/{bash.1,bashref.texi}
+ - document BASHPID
+ - document new shopt `checkjobs' option
+ - document new shopt `autocd' option
+ - document COMP_TYPE completion variable
+
+ 12/29
+ -----
+aclocal.m4
+ - in BASH_SYS_SIGLIST, check HAVE_DECL_SYS_SIGLIST instead of the
+ obsolete and no-longer-supported SYS_SIGLIST_DECLARED
+
+ 12/30
+ -----
+lib/readline/vi_mode.c
+ - add ` (backquote) to the list of vi motion characters
+ - in rl_vi_delete_to, rl_vi_change_to, and rl_vi_yank_to, don't delete
+ character under the cursor if the motion command moves the cursor
+ backward, so add F and T to the commands that don't cause the
+ mark to be adjusted
+ - add ` to the characters that don't cause the mark to be adjusted
+ when used as a motion command, since it's defined to behave that way
+ - when a motion character that may adjust the mark moves point
+ backward, don't adjust the mark so the character under the cursor
+ isn't deleted
+
+lib/readline/complete.c
+ - add variable rl_sort_completion_matches; allows application to
+ inhibit match list sorting
+ - add variable rl_completion_invoking_key; allows applications to
+ discover the key that invoked rl_complete or rl_menu_complete
+
+lib/readline/readline.h
+ - extern declarations for rl_completion_invoking_key and
+ rl_sort_completion_matches
+
+lib/readline/doc/rltech.texi
+ - documented rl_completion_invoking_key and rl_sort_completion_matches
+
+pcomplete.c
+ - export variable COMP_KEY to completion functions; initialized from
+ rl_completion_invoking_key; unset along with rest of completion
+ variables
+
+doc/{bash.1,bashref.texi},lib/readline/doc/rluser.texi
+ - document COMP_KEY
+
+[many files]
+ - changes to make variables and function parameters `const' for better
+ text sharing. Changes originally from Andreas Mohr
+ <andi@rhlx01.fht-esslingen.de>
+
+ 1/4/2007
+ --------
+lib/intl/Makefile.in
+ - use cmp before copying libgnuintl.h to libintl.h -- maybe save a few
+ rebuilds
+
+lib/builtins/Makefile
+ - fixes to build LIBINTL_H if necessary, dependency on this for
+ mkbuiltins.o prevented `make -j 6' from working correctly
+
+ 1/8
+ ---
+subst.c
+ - new function, fifos_pending(), returns the count of FIFOs in
+ fifo_list (process substitution)
+
+subst.h
+ - extern declaration for fifos_pending()
+
+execute_cmd.c
+ - in execute_simple_command, if CMD_NO_FORK is set before we call
+ execute_disk_command, make sure there are no FIFOs in the expanded
+ words (from process substitution) and turn off CMD_NO_FORK if there
+ are, so they can get unlinked when the command finishes
+
+ 1/10
+ ----
+subst.c
+ - read_comsub now takes a flags parameter and returns appropriate W_*
+ flags in it
+ - command_substitute now returns a WORD_DESC *, with the string it used
+ to return as the `word' and `flags' filled in appropriately
+
+subst.h
+ - changed extern declaration for command_substitute
+
+{pcomplete,subst}.c
+ - changed callers of command_substitute appropriately
+
+subst.c
+ - string_extract_verbatim now takes an additional int flags argument;
+ changed callers
+
+ 1/11
+ ----
+support/texi2html
+ - fix problem that caused index links to not be generated if the first
+ index node had a name different than the node name
+
+doc/bashref.texi
+ - encapsulated all indexes into a single `Indexes' appendix; works
+ around bug fixed in texi2html
+
+ 1/12
+ ----
+subst.c
+ - add call to sv_histtimefmt in initialize_variables so HISTTIMEFORMAT
+ from the environment is honored. Fix from Ark Submedes (heh)
+ <archimerged@gmail.com>
+
+lib/readline/histfile.c
+ - make sure that the first character following the history comment
+ character at the beginning of a line is a digit before interpreting
+ it as a timestamp for the previous line
+
+doc/{bash.1,bashref.texi},lib/readline/doc/hsuser.texi
+ - added detail to make it clear exactly how history timestamps are
+ saved to and read from the history file
+
+subst.c
+ - change quote_escapes to add CTLESC before spaces if IFS is null,
+ just in case we have to split on literal spaces later on (e.g., in
+ case of unquoted $@). Corresponding changes to dequote_escapes.
+ Fixes a couple of problems reported by Brett Stahlman
+ <brettstahlman@comcast.net>
+
+ 1/14
+ ----
+subst.c
+ - make same change to read_comsub to add CTLESC before ' ' if $IFS is
+ null, since we will split on literal spaces later
+
+ 1/15
+ ----
+array.c
+ - new function, array_quote_escapes (ARRAY *a), calls quote_escapes
+ on each element of the array in the same way array_quote calls
+ quote_string
+ - call array_quote_escapes if match is not quoted in array_patsub
+ - array_slice is now used, so remove the #ifdef INCLUDE_UNUSED define
+ - change structure of array_subrange to call array_slice to create a
+ new array with the desired subset of elements, then call array_quote
+ or array_quote_escapes as necessary, like array_patsub. Convert to
+ a string by calling array_to_string on the sliced-out array
+
+array.h
+ - new extern declaration for array_quote_escapes
+
+subst.c
+ - since array_patsub now calls quote_escapes as necessary, callers
+ don't need to call it after array_patsub returns. Fixes first bug
+ reported by Brett Stahlman <brettstahlman@comcast.net>
+ - since array_subrange now calls quote_escapes as necessary, callers
+ don't need to call it after array_patsub returns. Same fix as
+ for array_patsub
+
+ 1/31
+ ----
+configure.in
+ - add -DSOLARIS to LOCAL_CFLAGS for solaris x
+
+config-bot.h
+ - don't #undef HAVE_GETCWD if GETCWD_BROKEN and SOLARIS are both
+ defined. Solaris's loopback mount implementation breaks some of the
+ file system assumptions the replacement getcwd uses.
+
+builtins/common.c
+ - if GETCWD_BROKEN is defined, call getcwd with PATH_MAX for the size
+ argument, so it will allocate a buffer for the current working dir
+ with that size, instead of one that's `big enough'
+
+config.h.in
+ - add #undef PRI_MACROS_BROKEN for AIX 4.3.3
+
+pathexp.h
+ - new flag value for quote_string_for_globbing: QGLOB_REGEXP (quoting
+ an ERE for matching as a string)
+
+pathexp.c
+ - change quote_string_for_globbing to understand QGLOB_REGEXP
+
+execute_cmd.c
+ - change execute_cond_node to pass 2 (regexp match), 1 (shell pattern
+ match), or 0 (no matching) to cond_expand_word
+
+subst.c
+ - change cond_expand_word to translate SPECIAL==2 into passing
+ QGLOB_REGEXP to quote_string_for_globbing
+
+locale.c
+ - by default, if all else fails, set shell's idea of locale to ""
+ instead of its idea of `default_locale' -- the library functions
+ behave better with that value
+
+ 2/2
+ ---
+builtins/printf.def
+ - if PRI_MACROS_BROKEN is defined, #undef PRIdMAX (AIX 4.3.3 broken)
+
+ 2/3
+ ---
+Makefile.in,{builtins,doc}/Makefile.in,lib/*/Makefile.in
+ - add assignment for datarootdir as per GNU coding standards
+
+Makefile.in,builtins/Makefile.in,lib/intl/Makefile.in,po/Makefile.in.in
+ - use @localedir@ instead of $(datadir)/locale in assignment
+
+ 2/13
+ ----
+jobs.c
+ - fix compact_jobs_list to not return js.j_lastj, since that is in use
+ and should not be overwritten. Fix from Len Lattanzi
+ <llattanzi@apple.com>
+
+ 2/16
+ ----
+lib/readline/text.c
+ - change rl_forward_char to allow moving to the end of the line when
+ using the arrow keys in vi insertion mode, rather than having the
+ behavior identical between vi command and insertion modes. Change
+ suggested by Hugh Sasse <hgs@dmu.ac.uk>
+
+ 2/19
+ ----
+CWRU/audit-patch
+ - patch from Steve Grubb of RedHat <sgrubb@redhat.com> to make bash
+ audit root's behavior by logging commands using his audit
+ framework. Enabled if the shell's name is `aubash'.
+
+ 3/8
+ ---
+jobs.c
+ - use WSTATUS (p->status) instead of bare p->status. Fix from
+ Jim Brown <jim.brown@rsmas.miami.edu>
+
+ 3/9
+ ---
+lib/readline/{complete,input,isearch,misc,readline,text,vi_mode}.c
+ - make sure cases where rl_read_key returns -1 (usually due to EIO
+ because the controlling tty has gone away) are handled correctly.
+ Prompted by report from Thomas Loeber <ifp@loeber1.de>
+
+ 3/10
+ ----
+sig.c
+ - new function, top_level_cleanup, callable from contexts where some
+ cleanup needs to be performed before a non-fatal call to
+ jump_to_top_level
+
+sig.h
+ - new extern declaration for top_level_cleanup
+
+builtins/common.c
+ - add calls to top_level_cleanup before calls to jump_to_top_level
+ in a builtin command context (no_args(), get_numeric_arg()). Fixes
+ bug reported by Ian Watson
+
+lib/readline/display.c
+ - in _rl_move_cursor_relative, use `new' when comparing against
+ the last invisible character in the prompt, since they both denote
+ buffer indices when in a multibyte locale, whereas `dpos' is a
+ display position
+
+ 3/13
+ ----
+lib/readline/complete.c
+ - set rl_completion_append_character to the default (' ') in
+ set_completion_defaults(). Fixes bug reported by David Emerson
+ <demerson3x@angelbase.com>
+
+ 3/23
+ ----
+builtins/evalfile.c
+ - make sure read() returns a value >= 0 before using it as an index
+ into string[]
+ - use a variable of type `ssize_t' for return value from read()
+ - only try to read the entire contents of a regular file in one shot
+ if the file size is less than SSIZE_MAX. These fix problems
+ reported by hooanon05@yahoo.co.jp.
+
+include/typemax.h
+ - define SSIZE_MAX as 32767 if it's not defined
+
+lib/readline/display.c
+ - in rl_redisplay() and update_line(), if redrawing the prompt because
+ it contains invisible characters, make sure we redraw the character
+ indicating a modified history line and take it into account when
+ computing _rl_last_c_pos
+ - in update_line, if deleting characters and redrawing the new text,
+ make sure we adjust _rl_last_c_pos by wrap_offset in a multibyte
+ locale if the text we're drawing starts before or at the last
+ invisible character in the prompt string. Fixes bug reported on
+ bug-readline by J Pelkey <pelkeyj@gmail.com>
+
+parse.y
+ - when adding at CTLESC character to the current token, do not
+ escape it with CTLESC if pass_next_character indicates that the
+ CTLESC was escaped by a backslash. Fixes bug reported by
+ Paul Bagshaw <paul.bagshaw@orange-ftgroup.com>.
+
+ 3/25
+ ----
+lib/readline/text.c
+ - in rl_forward_char, short-circuit the loop if in emacs mode and
+ rl_point == rl_end. Fixes problem with multibyte locales
+ reported by Len Lattanzi <llattanzi@apple.com>
+
+ 3/29
+ ----
+command.h
+ - new flag for subshell_environment: SUBSHELL_PROCSUB, for process
+ substitution
+
+subst.c
+ - add SUBSHELL_PROCSUB to subshell_environment in process_substitute
+
+ 3/30
+ ----
+doc/Makefile.in
+ - fix installation of bash.info to understand that it is in the build
+ directory, not the source directory
+
+mailcheck.c
+ - new function, init_mail_dates, calls remember_mail_dates only if
+ there are no mailboxes in `mailfiles'
+ - new function, init_mail_file, initializes a FILEINFO, using the
+ last time mail was checked as the mtime and atime (or the time the
+ shell was started if last_time_mail_checked is uninitialized)
+ - call init_mail_file instead of update_mail_file in add_mail_file,
+ called from remember_mail_dates (which is supposed to initialize
+ the list of mail files)
+ - new convenience functions, alloc_mail_file and dispose_mail_file to
+ allocate and free FILEINFO structs
+
+mailcheck.h
+ - extern declaration for init_mail_dates
+
+shell.c
+ - call init_mail_dates instead of remember_mail_dates
+
+ 4/4
+ ---
+builtins/read.def
+ - changes to print $PS2 when a line is continued with a backslash in
+ an interactive shell. This is as POSIX requires
+
+ 4/5
+ ---
+subst.c
+ - make sure quote_escapes is only ever called when the word to be
+ escaped is not marked as double-quoted -- cleaner, and allows us
+ to make certain assumptions
+
+ 4/6
+ ---
+subst.c
+ - change all EX_* defines to begin with SX_
+ - new flag, SX_NOCTLESC, obeyed by string_extract_verbatim, tells it
+ to not obey CTLESC quoting
+ - change quote_escapes to not quote CTLESC with CTLESC if one of the
+ chars in $IFS is CTLESC, since the return value from quote_string
+ will be passed to word splitting and filename generation
+ - change read_comsub to do the same thing for unquoted command
+ substitutions
+ - change list_string to pass SX_NOCTLESC if CTLESC is one of the
+ chars in $IFS, so it will split on CTLESC instead of using it as a
+ quote character
+
+ 4/7
+ ---
+subst.c
+ - slight change to string_extract_verbatim to allow CTLESC to quote
+ CTLNUL even if SX_NOCTLESC is set in the flags passed, to protect
+ the CTLNULs from future calls to remove_quoted_nulls. Only
+ matters when $IFS contains CTLESC
+ - changes to cope with $IFS containing CTLNUL in the same way as the
+ CTLESC changes
+
+builtins/read.def
+ - changes to cope with $IFS containing CTLNUL in the same way as the
+ CTLESC changes
+
+ 4/16
+ ----
+lib/sh/strftime.c
+ - a couple of fixes to the `%z' code
+
+eval.c
+ - add an fflush after printing the auto-logout message
+
+ 4/24
+ ----
+subst.c
+ - add call to top_level_cleanup in exp_jump_to_top_level to get things
+ like unwind-protects and the loop levels cleaned up
+
+{arrayfunc,expr,variables}.c
+ - add calls to top_level_cleanup before jump_to_top_level()
+
+ 4/27
+ ----
+builtins/complete.def
+ - make sure the `command' argument to the -C option is printed with
+ single quotes, since multi-word commands will require them. Bug
+ reported by martin@snowplow.org
+
+execute_cmd.c
+ - change execute_builtin_or_function and execute_subshell_builtin_or_function
+ to call fflush(stdout) after the builtin or function returns, to
+ make sure that all output is flushed before the call returns. It
+ matters on cygwin. Fix suggested by Eric Blake <ebb9@byu.net>
+
+redir.c
+ - in do_redirection_internal, if the file descriptor being acted upon
+ is the same one used by the stdout stream, call fflush(stdout) to
+ make sure all output is flushed before changing the underlying fd
+ out from underneath stdio. Fix suggested by Eric Blake <ebb9@byu.net>
+
+
+ 4/30
+ ----
+
+builtins/common.c
+ - new function, sh_chkwrite(int), fflushes stdout and checks for error;
+ printing an error message and returning a new exit status if there's
+ an error on stdout. Takes exit status as argument; returns new exit
+ status (EXECUTION_FAILURE if write error)
+
+builtins/common.h
+ - new extern declaration for sh_chkwrite
+
+builtins/{alias,cd,complete,echo,fc,history,pushd,shopt,times,trap,type,ulimit,umask}.def
+ - change to use sh_chkwrite to report write errors
+
+builtins/fc.def
+ - if an error occurs while writing commands from the history to a file
+ to be executed, report a write error and return failure without
+ attempting to execute any commands
+
+ 5/1
+ ---
+builtins/{bind,declare,set,setattr}.def
+ - change to use sh_chkwrite to report write errors
+
+ 5/2
+ ---
+lib/readline/input.c
+ - fix off-by-one errors in _rl_get_char (pop_index) and rl_stuff_char
+ (push_index) that caused the 511th character in the buffer to be
+ discarded. Fixes bug reported by Tom Bjorkholm <tom.bjorkholm@ericsson.com>
+
+ 5/8
+ ---
+subst.c
+ - fix parameter_brace_remove_pattern to pass getpattern() newly-allocated
+ memory. If word expansions (particularly brace expansions) are
+ required, the expansion code will free the string passed to
+ expand_word_internal, and we don't want to free unallocated memory
+ (patstr++) or have duplicate frees (patstr). Fixes bug reported on
+ Red Hat bugzilla
+
+ 5/9
+ ---
+lib/readline/signals.c
+ - fix bug in rl_set_signals that caught SIGINT twice and didn't catch
+ SIGTERM. Bug reported by Ed Kwan <ed.kwan@onstor.com>
+
+ 5/18
+ ----
+jobs.c
+ - change compact_jobs_list to return 1 if js.j_lastj == 0 and there is
+ a job in jobs[0]; compact_jobs_list should never return an index
+ already occupied
+ - change reset_job_indices to avoid infinite looping when js.j_firstj
+ == 0 or js.j_firstj == js.j_jobslots upon function entry. Fixes
+ bug reported by osicka@post.cz
+
+ 5/20
+ ----
+
+execute_cmd.c
+ - new variable, executing_builtin, keeps track of number of "levels"
+ of builtins being executed; incremented by execute_builtin; saved
+ and restored by execute_simple_command
+
+subst.c
+ - new variable, assigning_in_environment, set and unset around calls
+ to assign_in_env by the expansion code
+
+variables.c
+ - use executing_builtin and assigning_in_environment to decide whether
+ or not to look into temporary_env when calling find_variable_internal.
+ Fixes problem reported by Kevin Quinn <kevquinn@gentoo.org>
+
+ 5/22
+ ----
+redir.c
+ - change add_undo_redirect to differentiate between file descriptors
+ greater than SHELL_FD_BASE (currently 10) used internally to save
+ others and then being the targets of user redirection and fds that
+ are just the target of user redirections. The former need to have
+ an `exec undo' redirect added to undo it in case exec throws away
+ redirections; the latter does not. We use the close-on-exec flag
+ for this: if it's set, we assume that the file descriptor is being
+ used internally to save another. Fixes problem reported by Ian
+ Jackson <ian@davenant.greenend.org.uk>
+
+shell.c
+ - new function, init_interactive_script(), does interactive initialization
+ for a script run with `bash -i script' -- does everything the same
+ as init_interactive except set `interactive == 1', which causes the
+ shell to read from the standard input, after calling
+ init_noninteractive
+ - call init_interactive_script if a script is run as `bash -i script'.
+ Fixes problem reported by Joseph Michaud <jmichaud@sgi.com>
+
+ 5/24
+ ----
+builtins/printf.def
+ - change vbadd to only call FASTCOPY if the passed buffer length is
+ > 1
+ - if the `-v' option is supplied and `vbuf' is already non-null from a
+ previous `printf -v var' call, set vbuf[0]=0 explicitly instead of
+ relying on vbadd to do it -- vbadd may not be called.
+ - fix PRETURN macro to set vbuf[0] == 0 if vbuf is not freed. These
+ should fix problem reported by Elmar Stellnberger <estellnb@yahoo.de>
+
+lib/readline/display.c
+ - fix update_line to deal with the case where col_lendiff > 0 (meaning
+ the new string takes up more screen real estate than the old) but
+ lendiff < 0 (meaning that it takes fewer bytes to do so). This can
+ happen when a multibyte prompt string is replaced with a longer one
+ containing only single-byte characters (e.g., when doing a reverse
+ i-search). Fixes gentoo bug reported by Peter Volkov
+ <torre_cremata@mail.ru>
+
+builtins/read.def
+ - make sure we only print $PS2 if the standard input is a terminal
+ - new function, read_mbchar, to read a multibyte character so we
+ can make sure we read entire multibyte chars when `read -n' is
+ used, rather than bytes. Only called when -n is supplied.
+ Fixes problem reported by Stanislav Brabec <sbrabec@suse.cz>
+
+ 5/25
+ ----
+externs.h
+ - new #defines for third argument to named_function_string:
+ FUNC_MULTILINE (don't suppress newlines) and FUNC_EXTERNAL (convert
+ to external display form)
+
+subst.h
+ - new extern declaration for remove_quoted_escapes
+
+subst.c
+ - remove_quoted_escapes is now global
+
+print_cmd.c
+ - in named_function_string, if FUNC_EXTERNAL is in the flags argument,
+ call remove_quoted_escapes to convert from internal to external form.
+ Fixes bug reported by Bo Andresen <bo.andresen@zlin.dk>
+
+variables.c,builtins/{declare,setattr,type}.def
+ - use FUNC_MULTILINE in calls to named_function_string as appropriate
+ - add FUNC_EXTERNAL to calls to named_function_string as appropriate
+
+ 5/27
+ ----
+{make_cmd,variables}.c
+ - changes to enable the shell to compile when debugger support is
+ configured out (function_def hash table and access functions). Fixes
+ bug reported by Horst Wente <horst.wente@acm.org>
+
+builtins/help.def
+ - fix bug in `help' two-column printing to avoid referencing
+ shell_builtins[num_shell_builtins]
+
+error.c
+ - in get_name_for_error, use dollar_vars[0] if the name returned from
+ looking in $BASH_SOURCE[0] is the empty string as well as if it's
+ null
+
+ 5/31
+ ----
+arrayfunc.c
+ - change array_value_internal to set *RTYPE to 1 if the reference is
+ array[*] and 2 if the reference is array[@]
+
+subst.c
+ - in parameter_brace_expand_word, set the flags returned by the word
+ desc to include W_HASQUOTEDNULL if array_value returns QUOTED_NULL
+ for an array reference like x[*] and the word is quoted. Fixes bug
+ reported by Christophe Martin <schplurtz@free.fr>
+
+ 6/1
+ ---
+jobs.c
+ - several changes to preserve errno if tcgetpgrp/tcgetattr/tcsetattr
+ fail, for subsequent error messages
+ - change initialize_job_control to turn off job control if the terminal
+ pgrp == -1 or is not equal to shell_pgrp (with an error message)
+ - in initialize_job_control, if the shell has been forced interactive
+ with -i, make sure stderr is hooked to a tty before using it as
+ the controlling terminal. If it's not, try to open /dev/tty and
+ assign it to shell_tty. Fixes problems reported by Derek Fawcus
+ <dfawcus@cisco.com>
+
+ 6/13
+ ----
+support/shobj-conf
+ - changes to support shared object and shared library creation on AIX
+ 5.x and later versions. From Niklas Edmundsson <nikke@acc.umu.se>
+
+ 6/17
+ ----
+builtins/mkbuiltins.c
+ - new array of builtins, posix_builtins, containing builtins listed
+ as special to the command search order by POSIX
+ - add POSIX_BUILTIN to the builtin flags if the builtin name is one
+ that's special to the posix command search order
+
+builtins.h
+ - new define, POSIX_BUILTIN, means that a builtin is special to the
+ posix command search order
+
+ 6/22
+ ----
+lib/readline/display.c
+ - new macro, WRAP_OFFSET, intended to replace W_OFFSET. Takes prompt
+ strings longer than one physical line with invisible characters on
+ the second line into account when calculating the number of
+ invisible characters on the current screen line
+ - use WRAP_OFFSET where appropriate (update_line, _rl_move_cursor_relative)
+ - change update_line to deal with adjusting _rl_last_c_pos in a
+ multibyte environment when the prompt has invisible chars on the
+ second line and redisplay has output the invisible characters
+ - change _rl_move_cursor_relative to adjust _rl_last_c_pos in a
+ multibyte environment when the prompt has invisible chars on the
+ second line and the redisplay draws the invisible character. Fixes
+ redisplay bug reported by Andreas Schwab <schwab@suse.de>
+
+
+ 7/11
+ ----
+
+lib/readline/rltty.c
+ - enable flush-output code for systems other than AIX 4.1. Problem
+ reported by Jan Kratochvil <jan.kratochvil@redhat.com>
+
+ 7/12
+ ----
+lib/readline/display.c
+ - set prompt_invis_chars_first_line from the portion of the prompt
+ following the final newline, instead of from the prefix. Fixes
+ bug reported on the Ubuntu bug list by dAniel hAhler
+ <ubuntu@thequod.de>
+
+ 7/13
+ ----
+variables.c
+ - use native __QNX__ and __QNXNTO__ cpp defines instead of qnx and
+ qnx6, respectively. Patch from Sean Boudreau <seanb@qnx.com>
+
+lib/sh/getcwd.c
+ - #undef HAVE_LSTAT on qnx, so it uses stat instead. Patch from
+ Sean Boudreau <seanb@qnx.com>
+
+ 7/21
+ ----
+builtins/common.c
+ - change sh_invalidnum to be a little smarter about octal and hex
+ numbers and change the message appropriately. Bug originally
+ reported on coreutils list by Jürgen Niinre <Jyrgen.Niinre@emt.ee>
+
+ 7/26
+ ----
+test.c
+ - make sure the string passed to test_unop has only a single character
+ following the `-'. Fixes bug reported by Michael A. Smith
+ <michael@smith-li.com>
+
+parse.y
+ - better input validation: make sure a word looks like a conditional
+ unary operator (-X) before calling test_unop
+
+ 7/28
+ ----
+trap.c
+ - in trap_handler, if it's called directly from the signal handler
+ (e.g., SIGINT sighandler, set by set_sigint_handler), but the
+ trap disposition has been reset to the default between the
+ assignment and receipt of the signal, check that the signal is
+ trapped and issue a warning if the shell was compiled with
+ debugging enabled. Fixes bug reported by Fergus Henderson
+ <fergus@google.com>
+
+ 8/1
+ ---
+lib/readline/{util,histexpand}.c
+ - fixes for small memory leaks from Michael Snyder <msnyder@sonic.net>
+
+ 8/18
+ ----
+Makefile.in
+ - add dependency on builtins/builtext.h to nojobs.o list. Fixes
+ `make -j 5' issue reported by Chris MacGregor <chris@bouncingdog.com>
+
+examples/loadables/Makefile.in
+ - add @LDFLAGS@ to SHOBJ_LDFLAGS assignment -- experimental. Suggested
+ by Mike Frysinger <vapier@gentoo.org>
+
+examples/loadables/{basename,cut,dirname,finfo,head,ln,logname,mkdir,pathchk,print,printenv,push,realpath,rmdir,sleep,tee,truefalse,tty,uname,unlink,whoami}.c
+ - fix up some includes. Fix from Mike Frysinger <vapier@gentoo.org>
+
+ 8/21
+ ----
+histexpand.c
+ - fix another memory leak in history_find_word. Bug report originally
+ from Michael Snyder <msnyder@sonic.net>; test case suggested by Jim
+ Blandy <jimb@codesourcery.com>
+
+ 8/26
+ ----
+subst.c
+ - change to do_assignment_internal to make an assignment to a variable
+ with the `noassign' internal attribute not a variable assignment
+ error.
+ - fix do_assignment_internal so assignment to a `noassign' variable
+ does not cause it to suddenly become visible if it's currently
+ invisible
+
+ 9/3
+ ---
+stringlib.c
+ - change strsub to check whether or not temp is non-null before
+ trying to null-terminate it. Also make sure temp is allocated
+ even if the pattern and replacement strings are empty, and set
+ to a copy of string (like ${foo//})
+ Bug report from Timo Lindfors <timo.lindfors@iki.fi>
+
+ 9/10
+ ----
+{config.h,Makefile,configure}.in,aclocal.m4
+ - new tests for fpurge and __fpurge
+
+lib/sh/fpurge.c, externs.h
+ - new file, fpurge(3) implementation with external decl in externs.h
+
+builtins/common.c
+ - add call to fpurge(stdout) to sh_chkwrite
+
+{redir,execute_cmd}.c
+ - add call to fpurge(stdout) after fflush(stdout) before changing
+ stdout file descriptor and after a builtin or function executes
+
+ 9/12
+ ----
+expr.c
+ - make sure noeval is set to 0 when a longjmp occurs, since it will
+ not be reset otherwise, and it can be set to 1 while processing
+ a {pre,post}-increment or {pre,post}-decrement token
+ - set noeval to 0 at the beginning of evalexp, since it's never
+ called recursively
+
+ 9/14
+ ----
+config-top.h
+ - new builder-modifiable define: DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS
+ Turning it on will cause errors from EPIPE to not be reported by
+ the normal shell write error message mechanism
+
+builtins/common.c
+ - if DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS is defined, don't print an
+ error message from sh_wrerror if errno == EPIPE. Suggestion from
+ Petr Sumbera <petr.sumbera@sun.com>
+
+ 9/19
+ ----
+{jobs,nojobs}.c,jobs.h
+ - add code to retry fork() after EAGAIN, with a progressively longer
+ sleep between attempts, up to FORKSLEEP_MAX (16) seconds. Suggested
+ by Martin Koeppe <mkoeppe@gmx.de>
+
+ 9/21
+ ----
+version.c
+ - change copyright year to 2007
+
+ 9/25
+ ----
+pathexp.c
+ - change quote_string_for_globbing to add a backslash in front of a
+ backslash appearing in the pathname string, since the globbing
+ code will interpret backslashes as quoting characters internally.
+ Bug reported by <herbert@gondor.apana.org.au> on the debian list
+ (443685)
+
+ 10/8
+ ----
+lib/readline/display.c
+ - in update_line, make sure _rl_last_c_pos is > 0 before setting
+ cpos_adjusted (or we actually moved the cursor to column 0 in
+ _rl_move_cursor_relative). Fixes redisplay bug with prompt with
+ only invisible characters reported by dAniel hAhler
+ <ubuntu@thequod.de>
+
+ 10/10
+ -----
+lib/readline/display.c
+ - in rl_redisplay, when calculating the new physical cursor position
+ in a multibyte locale (`tx'), do not call rl_backspace if tx ends
+ up < 0. Rest of fix for bug reported by dAniel hAhler
+ <ubuntu@thequod.de>
+
+ 10/12
+ -----
+lib/sh/getcwd.c
+ - fix memory overwrite problem that's possible if buf is NULL and
+ passed size is greater than the pathname length. Reported by
+ Ian Campbell <ian.campbell@xensource.com>
+
+builtins/ulimit.def
+ - change the multiplier for the -c and -f options (`blocks') to 512,
+ the traditional value (and the one POSIX specifies). Bug reported
+ by Pete Graner <pgraner@redhat.com>
+
+braces.c
+ - pass process substitution through unchanged the same as command
+ substitution. Prompted by suggestion from Stephane Chazelas
+ <stephane_chazelas@yahoo.fr>
+
+lib/readline/input.c
+ - in rl_unget_char, fix off-by-one error when resetting pop_index if
+ it's < 0. Bug reported by Uwe Doering <gemini@geminix.org>
+
+builtins/type.def
+ - change exit status of `type' to not successful if any of the
+ requested commands are not found. Reported by Stephane Chazleas
+ <stephane_chazelas@yahoo.fr>
+
+pcomplete.c
+ - change command_line_to_word_list to use rl_completer_word_break_characters
+ instead of the shell metacharacters to split words, so programmable
+ completion does the same thing readline does internally. Reported
+ by Vasily Tarasov <vtaras@sw.ru>
+
+ 10/16
+ -----
+bashline.c
+ - When completing a command name beginning with a tilde and containing
+ escaped specical characters, dequote the filename before prefixing
+ it to the matches, so the escapes are not quoted again. Reported
+ by neil@s-z.org
+
+ 10/17
+ -----
+expr.c
+ - in readtok(), don't reset lasttp if we've consumed the whitespace
+ at the end of the expression string. Fixes error message problem
+ reported by <anmaster@tele2.se>
+
+ 11/1
+ ----
+builtins/printf.def
+ - change asciicode() to return intmax_t; add multibyte character
+ support instead of assuming ASCII (depending on behavior of system
+ multibyte support functions). Fixes bug reported by Rich
+ Felker <dalias@aerifal.cx>
+
+ 11/5
+ ----
+execute_cmd.c
+ - if redirections attached to a compound command fail, make sure to
+ set last_command_exit_value when returning EXECUTION_FAILURE.
+ Fixes bug reported separately by Andreas Schwab <schwab@suse.de>
+ and Paul Eggert <eggert@cs.ucla.edu>
+
+ 11/9
+ ----
+builtins/read.def
+ - make sure the return value from get_word_from_string is freed if
+ non-null. Fixes memory leak bug reported by Lars Ellenberg
+ <lars.ellenberg@linbit.com>
+
+ 11/10
+ -----
+variables.c
+ - use getpid() as value of seeded_subshell to avoid problems with
+ random number generator not getting re-seeded correctly when
+ subshells are created. Fix from Tomas Janousek <tjanouse@redhat.com>
+
+lib/readline/display.c
+ - in update_line(), when outputting characters at the end of the line,
+ e.g., when displaying the prompt string, adjust _rl_last_c_pos by
+ wrap_offset if the text we're drawing begins before the last
+ invisible character in the line. Similar to fix from 5/24. Fixes
+ bug reported by Miroslav Lichvar <mlichvar@redhat.com>
+
+ 11/14
+ -----
+subst.c
+ - fix $[ expansion case to deal with extract_arithmetic_subst
+ returning NULL (if the `]' is missing) and return the construct
+ unchanged in that case. Fixes tab completion bug reported by
+ Heikki Hokkanen <hoxu@users.sf.net> (debian bug 451263)
+
+lib/readline/mbutil.c
+ - fix _rl_find_next_mbchar_internal to deal with invalid multibyte
+ character sequences when finding non-zero-length chars. Fixes
+ bug reported by Morita Sho <morita-pub-en-debian@inz.sakura.ne.jp>
+
+ 11/15
+ -----
+variables.c
+ - add new function `seedrand' to seed the bash random number
+ generator from more random data. Suggestion from Steve Grubb
+ <sgrubb@redhat.com>
+ - replace the rng in brand() with a slightly better one from FreeBSD
+ (filtered through Mac OS X 10.5). Replacement suggested by
+ Steve Grubb <sgrubb@redhat.com>
+
+ 11/21
+ -----
+configure.in
+ - darwin 9 also requires linking against libreadline.a and
+ libhistory.a because of Apple's questionable decision to ship a
+ libreadline "replacement" that doesn't provide all functions
+
+doc/{bash.1,bashref.texi}
+ - slight change to the text describing the effect of set -e when
+ in a || or && list
+
+ 12/5
+ ----
+jobs.c
+ - fix raw_job_exit_status to correct mixing of int/WAIT values (need
+ to return a WAIT)
+ - arrange so that children run as part of command substitutions also
+ set the SIGINT handler to wait_sigint_handler, since they effectively
+ don't do job control
+ - in wait_for, if a child run as part of a command substitution exits
+ due to SIGINT, resend the SIGINT to the waiting shell with kill(2).
+ This makes sure the exit status propagates
+
+doc/{bash.1,bashref.texi}
+ - tighten up the language describing when bash tries to see if its
+ stdin is a socket, so it can run the startup files. Suggested by
+ Vincent Lefevre <vincent@vinc17.org>
+
+eval.c
+ - in the DISCARD case of a longjmp to top_level, make sure
+ last_command_exit_value is set to EXECUTION_FAILURE if it's 0,
+ but leave existing non-zero values alone
+
+subst.c
+ - in command_substitute, don't reset pipeline_pgrp in the child
+ process -- this means that second and subsequent children spawned by
+ this comsub shell get put into the wrong process group, not the
+ shell's. Fix for bug reported by Ingo Molnar <mingo@elte.hu>
+
+ 12/6
+ ----
+support/shobj-conf
+ - make sure the cases for darwin8.x (Mac OS X 10.4.x) are extended to
+ darwin9.x (Mac OS X 10.5.x). Fixes problem originally reported
+ against readline-5.2 by schneecrash@gmail.com
+
+ 12/8
+ ----
+subst.c
+ - make sure to add the results of (successful) tilde expansion as a
+ quoted string, to inhibit pathname expansion and word splitting.
+ From recent Austin Group interpretation.
+
+include/shtty.h, lib/sh/shtty.c
+ - add ttfd_onechar, ttfd_noecho, ttfd_eightbit, ttfd_nocanon, and
+ ttfd_cbreak to set tty attributes associated with a particular
+ file descriptor (which is presumed to point to a terminal). Support
+ for fix for bug reported by b_bashbug@thebellsplace.com
+
+lib/readline/display.c
+ - make sure we only use rl_invis_chars_first_line when the number of
+ physical characters exceeds the screen width, since that's the
+ only time expand_prompt sets it to a valid value
+
+ 12/12
+ -----
+builtins/set.def
+ - change set_minus_o_option to return EX_USAGE if an invalid option
+ name is supplied. All callers can handle it.
+ - change set_builtin to return what set_minus_o_option returns if it's
+ not EXECUTION_SUCCESS. This allows EX_USAGE errors to abort a
+ shell running in posix mode
+
+ 12/14
+ -----
+builtins/read.def
+ - generalize the calls to the tty attribute functions to maintain a
+ local copy of the terminal attributes and use the fd supplied as
+ the argument to the -u option (default 0). Fix for bug reported
+ by b_bashbug@thebellsplace.com
+
+doc/bashref.texi, lib/readline/doc/{history,rlman,rluser,rluserman}.texi
+ - Slight changes to conform to the latest FSF documentation standards.
+ Patch from Karl Berry <karl@freefriends.org>
+
+ 12/20
+ -----
+execute_cmd.c
+ - after calling clear_unwind_protect_list, make sure we reset
+ parse_and_execute_level to 0, since there's nothing left to
+ restore it if top_level_cleanup tests it. Fixes bug reported
+ by Len Lattanzi <llattanzi@apple.com>
+
+ 12/31
+ -----
+lib/sh/getcwd.c
+ - new function, _path_checkino, checks whether the inode corresponding
+ to the path constructed from the first two arguments is the same as
+ the inode number passed as the third argument
+ - if BROKEN_DIRENT_D_INO is defined, meaning the d_ino/d_fileno
+ member of struct dirent doesn't contain valid values, use
+ _path_checkino instead of directly comparing against d_fileno.
+ Fixes Interix problem reported by Michael Haubenwallner
+ <haubi@gentoo.org>
+
+ 1/7/2008
+ --------
+array.c
+ - fix array_subrange to separate elements in returned string with
+ first char of $IFS if QUOTED is non-zero, since this indicates
+ the caller used ${array[@]:foo}. Fixes bug reported by Lea
+ Wiemann <lewiemann@gmail.com>
+
+ 1/8
+ ---
+subst.c
+ - new function returning a string containing the first character of
+ $IFS: char *ifs_firstchar(int *)
+
+subst.h
+ - extern declaration for ifs_firstchar()
+
+array.c
+ - call ifs_firstchar() to get first character of $IFS when needed
+ (array_subrange() and array_patsub())
+
+ 1/11
+ ----
+lib/readline/display.c
+ - use sentinel variable set at end of init_line_structures to decide
+ whether to call it from rl_redisplay, since early SIGWINCH on
+ Mac OS X that hits during this function can cause _rl_wrapped_line
+ to be referenced before initialization. Fix for bug reported by
+ Len Lattanzi <llattanzi@apple.com>
+
+subst.[ch]
+ - skip_to_delim is now compiled into the shell all the time, not just
+ when readline is linked in
+
+subst.c
+ - use skip_to_delim to find the `/' denoting the end of a pattern
+ in pattern substitution, since it knows more shell syntax than
+ quoted_strchr and understands multibyte characters. Fixes bug
+ reported by Dmitry V Golovashkin <Dmitry.Golovashkin@sas.com>
+
+ 1/15
+ ----
+subst.c
+ - add `flags' argument to skip_to_delim telling it whether or not to
+ set no_longjmp_on_fatal_error; set this flag when calling from the
+ readline completion code
+
+subst.h
+ - update extern declaration for skip_to_delim
+
+ 1/17
+ ----
+subst.c
+ - expand_prompt_string takes a third argument: the initial flags for
+ the WORD
+
+subst.h
+ - change extern declaration for expand_prompt_string to add third arg
+
+bashline.c
+ - pass W_NOCOMSUB as third argment to expand_prompt_string when
+ calling from bash_directory_completion_hook, since we don't want
+ to do command substitution from the completion code
+
+parse.y
+ - change call to expand_prompt_string
+
+ 1/18
+ ----
+doc/Makefile.in
+ - added an `install_builtins' rule to install the builtins.1 man page,
+ preprocessing it with sed to force `.so man1/bash.1', which some
+ versions of man require. Suggestion from Peter Breitenlohner
+ <peb@mppmu.mpg.de>
+ - new target `install_everything' that will install normal documentation
+ and builtins man page
+ - changed uninstall target to remove bash_builtins page from man
+ directory
+
+lib/readline/vi_mode.c
+ - new function, rl_vi_insert_mode, which calls rl_vi_start_inserting
+ to make sure the value of `last command to repeat' is set correctly.
+ Fix from Thomas Janousek <tjanouse@redhat.com>
+ - add support for redoing inserts made with the `I' command. Fix
+ from Thomas Janousek <tjanouse@redhat.com>
+ - add support for redoing inserts made with the `A' command
+
+lib/readline/readline.h
+ - new extern declaration for rl_vi_insert_mode
+
+lib/readline/{misc,readline,vi_mode,vi_keymap}.c
+ - change calls to rl_vi_insertion_mode to rl_vi_insert_mode
+
+ 1/19
+ ----
+builtins/read.def
+ - change timeout behavior when not reading from a tty device to save
+ any partial input in the variable list, but still return failure.
+ This also causes variables specified as arguments to read to be
+ set to null when there is no input available. Fix inspired by
+ Brian Craft <bcboy@thecraftstudio.com>
+
+ 1/21
+ ----
+builtins/fc.def
+ - change computation of last_hist to use remember_on_history instead
+ of a hard-coded `1'. This keeps fc -l -1 in PROMPT_COMMAND from
+ looking too far back
+
+ 1/25
+ ----
+lib/readline/complete.c
+ - fix fnwidth to use string[pos] instead of *string when testing the
+ current character for a control character or rubout
+
+ 2/2
+ ---
+general.c
+ - change posix_initialize to turn off source/. searching $PWD when
+ the file sourced is not found in $PATH. Fixes bug reported by
+ Paolo Bonzini <bonzini@gnu.org> and Eric Blake <ebb9@byu.net>
+
+ 2/9
+ ---
+builtins/*.def
+ - changes to text and formatting suggested by Jan Schampera
+ <jan.schampera@web.de>
+
+ 2/16
+ ----
+bashline.c
+ - change command_word_completion_function to use the word completion
+ found by readline, which matters only when ignoring case is on
+ and the completion found in the file system differs in case from
+ the text the user typed (this is what readline does for normal
+ filename completion). Fixes issue reported by Jian Wang
+ <jwang@a10networks.com.cn>.
+
+ 2/18
+ ----
+builtins/source.def
+ - if the filename passed as an argument contains a `/', don't search
+ $PATH. Not sure why it wasn't like this before
+
+ 2/21
+ ----
+lib/readline/terminal.c
+ - change rl_crlf so that the MINT system on ATARI systems adds a
+ carriage return before the \n
+
+ 2/22
+ ----
+doc/{bash.1,bashref.texi}
+ - added text to the EXIT STATUS section noting that exit statuses
+ fall between 0 and 255, inclusive
+
+support/mkversion.sh
+ - output a #define for DEFAULT_COMPAT_LEVEL (${major}${minor}; e.g. 32)
+ to version.h
+
+version.c
+ - int variable, shell_compatibility_level, set to DEFAULT_COMPAT_LEVEL
+ by default
+
+builtins/shopt.def
+ - new shopt variable, compat31, sets shell_compatibility_level to 31
+ (or back to default if unset)
+
+execute_cmd.c
+ - in execute_cond_node, restore bash-3.1 behavior of quoted rhs of
+ regexp matches if shell_compatibility_level == 31
+
+ 2/28
+ ----
+lib/readline/rltty.c
+ - set readline_echoing_p = 1 if tcgetattr fails and sets errno to
+ EINVAL, as Linux does when the fd is a pipe. Reported by Mike
+ Frysinger <vapier@gentoo.org>
+
+ 3/6
+ ---
+{MANIFEST,Makefile.in},lib/sh/{casemod,uconvert,ufuncs}.c
+ - new library sources from bash-4.0-devel tree
+
+lib/sh/spell.c
+ - moved cdspell() here from builtins/cd.def, renamed dirspell()
+
+externs.h
+ - new declarations for extern functions from new library files
+ - new extern declaration for lib/sh/spell.c:dirspell()
+
+builtins/cd.def
+ - call extern library function dirspell(); remove static cdspell()
+
+builtins/read.def
+ - when read times out, make sure input_string is null-terminated before
+ assigning any partial input read to the named variables
+
+ 3/10
+ ----
+lib/glob/xmbsrtowcs.c
+ - cut the number of memory allocations in xdupmbstowcs by not keeping
+ track of the indices if the caller hasn't asked for it
+
+ 3/17
+ ----
+builtins/fc.def
+ - make sure the adjustment to i in fc_gethnum uses the same formula
+ fc_builtin uses to calculate last_hist
+ - make sure that every time fc_gethnum is called, the fc command last
+ in the history list has not yet been deleted, since fc_gethnum
+ assumes that it has not. Fix from John Haxby <john.haxby@oracle.com>
+
+lib/readline/complete.c
+ - new private library function, _rl_reset_completion_state(), used to
+ reset any completion state internal to the library when a signal
+ is received
+ - call _rl_reset_completion_state() before returning from
+ rl_complete_internal
+
+lib/readline/rlprivate.h
+ - new extern declaration for _rl_reset_completion_state
+
+lib/readline/signals.c
+ - call _rl_reset_completion_state from rl_signal_handler on SIGINT.
+ This fixes one of the problems identified by Mika Fischer
+ <mf+ubuntu@zoopnet.de>
+
+pcomplete.c
+ - programmable_completions now saves pointer to the compspec it's
+ working with in new global variable CURCS
+ - new function, pcomp_set_readline_variables, that sets or unsets
+ readline variables based on a passed flags value (COPT_FILENAMES,
+ etc.)
+ - new function, pcomp_set_compspec_options, to set or unset bits in
+ the options word of a passed compspec (default CURCS)
+ - only call bash_dequote_filename (via rl_filename_dequoting_function)
+ from pcomp_filename_completion_function if the readline state
+ word indicates word completion is in progress
+
+pcomplete.h
+ - new extern declaration for curcs
+ - new extern declaration for pcomp_set_readline_variables
+ - new extern declaration for pcomp_set_compspec_options
+
+bashline.c
+ - fix bash_dequote_filename to implement shell quoting conventions:
+ 1. Inhibit backslash stripping within single quotes
+ 2. Inhibit backslash stripping within double quotes only if
+ the following character is one of the special ones
+ - call pcomp_set_readline_variables from attempt_shell_completion
+ instead of doing the equivalent inline
+
+ 3/18
+ ----
+bracecomp.c
+ - make sure we sort array of matches in byte order (using strcmp). so
+ the brace calculations work correctly even when the locale orders
+ characters like aAbBcC...zZ. Fixes bug reported by Torsten Nahm
+ <torstennahm@torstennahm.de>
+
+ 3/20
+ ----
+lib/readline/{rltty,signals}.c
+ - move block_sigint and release_sigint from rltty.c to signals.c; add
+ _rl_ prefix to make them public to the library; change callers.
+ From Jan Kratochvil <jan.kratochvil@redhat.com>
+
+lib/readline/rlprivate.h
+ - new extern declarations for _rl_block_sigint and _rl_release_sigint
+
+lib/readline/display.c
+ - add calls to _rl_block_sigint and _rl_release_sigint to rl_redisplay,
+ since it maniupluates global data structures. Fix from Jan
+ Kratochvil <jan.kratochvil@redhat.com>
+
+builtins/printf.def
+ - change calls to asprintf and manually adding to vbuf to use calls
+ to vsnprintf against vbuf directly -- if the number of characters
+ to be written overflows the buffer, realloc the buffer and use
+ vsnprintf again. This should reduce the memory used by printf.
+ Idea from Yuya Katayama <yuya999@gmail.com>
+
+lib/readline/doc/rltech.texi
+ - documented rest of readline's state flags, including RL_STATE_CALLBACK
+ - documented rl_save_state and rl_restore_state
+
+ 3/27
+ ----
+lib/readline/{rlprivate.h,{display,readline,rltty,terminal,text}.c}
+ - rename readline_echoing_p to _rl_echoing_p for namespace consistency
+
+lib/readline/{rlprivate.h,{callback,readline,util}.c}
+ - rename readline_top_level to _rl_top_level for namespace consistency
+
+builtins/ulimit.def
+ - new -b (socket buffer size) and -T (number of threads) options
+
+array.c
+ - fix bug in calculation of the array element assignment string length:
+ use length of `is' instead of `indstr'. Reported as ubuntu bug
+ #202885 by John McCabe-Dansted
+
+builtins/setattr.def
+ - new function, show_all_var_attributes, displays attributes and
+ values for all shell variables (or shell functions) in a reusable
+ format
+
+builtins/common.h
+ - new extern declaration for show_all_var_attributes
+
+builtins/declare.def
+ - change `declare -p' to print out all variable attributes and values,
+ and `declare -fp' to print out all function attributes and
+ definitions. Inspired by request from John Love-Jensen
+ <eljay@adobe.com>
+
+doc/{bash.1,bashref.texi}
+ - document new -b and -T options to ulimit
+ - tighten up language describing AND and OR lists
+ - add description of new behavior of `declare -p'
+
+ 3/28
+ ----
+pcomplete.c
+ - rename curcs -> pcomp_curcs
+ - new global completion variable, pcomp_curcmd, the current command
+ name being completed
+
+builtins/complete.def
+ - new builtin, compopt, allows completion options for command names
+ supplied as arguments or the current completion being executed to
+ be modified. Suggested by Mika Fischer <mf+ubuntu@zoopnet.de>
+
+ 3/30
+ ----
+doc/{bash.1,bashref.texi},lib/readline/doc/rluser.texi
+ - document new compopt builtin
+
+ 4/5
+ ---
+support/shobj-conf
+ - change solaris10 stanza to use -fPIC to fix 64-bit sparc_v9/solaris10
+ compilations. Fix from Fabian Groffen <grobian@gentoo.org>
+
+builtins/read.def
+ - added `-i text' option, inserts `text' into line if using readline.
+ Suggested by many, used some ideas from Kevin Pulo <kevin@pulo.com.au>
+
+doc/{bash.1,bashref.texi}
+ - document new `-i text' option to read builtin
+
+ 4/7
+ ---
+lib/readline/bind.c
+ - new settable variable, `history-size', sets the max number of
+ entries in the history list
+
+doc/bash.1,lib/readline/doc/{rluser.texi,readline.3}
+ - document new `history-size' settable readline variable
+
+ 4/8
+ ---
+builtins/complete.def
+ - change build_actions calling sequence to take a struct with `other'
+ (non-action) flag arguments (-p, -r)
+ - add support for `-E' option to build_actions and complete builtin --
+ modifies or displays (internal) `_EmptycmD_' completion spec
+
+bashline.c
+ - change attempt_shell_completion to try programmable completion on an
+ `empty' command line and return the results
+
+doc/bash.1,lib/readline/doc/rluser.texi
+ - documented new `-E' option to `complete'
+
+ 4/9
+ ---
+bashhist.c
+ - new variable, `enable_history_list', used to reflect setting of
+ `-o history' option
+ - change bash_history_{enable,disable,reinit} to set enable_history_list
+ as well as remember_on_history
+
+builtins/set.def
+ - use `enable_history_list' instead of `remember_on_history' to keep
+ value of `-o history' option
+
+builtins/evalstring.c
+ - instead of unwind-protecting remember_on_history, use a function to
+ restore it to the value of `enable_history_list' after
+ parse_and_execute runs the commands in the string. This allows
+ history to be turned off in a startup file, for instance. Problem
+ reported by Dan Jacobson <jidanni@jidanni.org>
+
+ 4/11
+ ----
+bashline.c
+ - limited support for completing command words with globbing characters
+ (only a single match completed on TAB, absolute or relative
+ pathnames supported, no $PATH searching, some support for displaying
+ possible matches, can be used with menu completion).
+ Suggested by Harald Koenig <h.koenig@science-computing.de>
+
+print_cmd.c
+ - change redirection printing to output r_err_and_out as `&>file',
+ since the man page says that's the preferred form
+
+ 4/12
+ ----
+builtins/*.def
+ - change long doc so the first line is a short description
+ - add `Exit Status:' section to each longdoc describing exit values
+
+builtins/help.def
+ - new `-d' option to print short description of each utility
+ - new `-m' option to print description of each builtin in a
+ pseudo-manpage format (inspired by ksh93)
+
+doc/{bash.1,bashref.texi}
+ - document new `-d' and `-m' options to `help'
+
+builtins/mapfile.def
+ - new builtin, `mapfile', imported from bash-4.0-devel branch
+
+tests/{mapfile.{data,right,tests},run-mapfile}
+ - tests for `mapfile' builtin
+
+doc/{bash.1,bashref.texi}
+ - added description of `mapfile' builtin
+
+MANIFEST,Makefile.in,builtins/Makefile.in
+ - added entries for mapfile source files
+
+arrayfunc.[ch]
+ - new function, bind_array_element, to support mapfile builtin
+
+ 4/20
+ ----
+expr.c
+ - fix operator precendence in expcond(): term after the `:' is
+ a conditional-expression, not a logical-OR-expression (using C
+ terminology). Bug reported by <archimerged@gmail.com>
+
+ 4/22
+ ----
+bashintl.h
+ - new P_ define for using ngettext to decide on plural forms
+ (currently unused)
+
+ 4/25
+ ----
+execute_cmd.c
+ - in execute_disk_command, if the command is not found, search for
+ a shell function named `command_not_found_handle' and call it
+ with the words in the command as arguments. Inspired by Debian
+ feature.
+
+doc/{bash.1,bashref.texi}
+ - document new command_not_found_handle behavior in COMMAND EXECUTION
+ section
+
+configure.in
+ - change default version to bash-4.0-devel
+
+ 4/28
+ ----
+variables.c
+ - change push_func_var and push_exported_var to call
+ stupidly_hack_special_variables if the temporary variable is going
+ to be disposed. This undoes any internal changes caused by a local
+ variable assignment in the environment or in a shell function. Bug
+ reported by Morita Sho <morita-pub-en-debian@inz.sakura.ne.jp> in
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=478096
+
+ 5/3
+ ---
+builtins/fc.def
+ - fixed a problem caused by change of 1/21 to use remember_on_history,
+ since it's turned off by parse_and_execute(), but can cause the
+ last command in history to be deleted and leave last_hist pointing
+ beyond the end of the history list. edit_and_execute_command can
+ do this.
+
+bashline.c
+ - new define, RL_BOOLEAN_VAR_VALUE, to take a readline boolean variable
+ and get its value as 0 or 1 (consider making readline global)
+ - put tty back into canonical mode before calling parse_and_execute in
+ edit_and_execute_command and then back into raw mode after it
+ returns. Fixes problem identified by <koersen@gmail.com>.
+
+ 5/4
+ ---
+lib/glob/glob.c
+ - code to support `globstar' option: GX_GLOBSTAR and two internal
+ flags. Changes to skipname, glob_vector, mbskipname, glob_filename.
+ New function finddirs().
+
+lib/glob/glob.h
+ - new defines to support globstar code
+
+builtins/shopt.def
+ - new shell option, `globstar', enables special handling of `**' in
+ glob patterns -- matches all directories recursively
+
+pathexp.h
+ - extern declaration for glob_star
+
+pathexp.c
+ - break inline code out of quote_globbing_chars into a separate
+ function to decide whether a character is a globbing char:
+ glob_char_p
+ - change shell_glob_filename to call glob_filename with the
+ GX_GLOBSTAR flag if glob_star is set
+
+doc/{bash.1,bashref.texi}
+ - document new `globstar' shell option
+
+arrayfunc.c
+ - new function, broken out of quote_array_assignment_chars:
+ quote_assign; extended from old code to make sure that globbing
+ chars and chars in $IFS are quoted when displaying assignment
+ statements, especially in compound array assignments
+
+ 5/5
+ ---
+bashline.c
+ - new variable, dircomplete_spelling, controls spelling correction
+ of directory names when doing filename completion
+ - change bash_directory_completion_hook to incorporate spelling
+ correction if initial canonicalization of directory name fails
+
+builtins/shopt.def
+ - new shell option, `dirspell', enables and disables spelling
+ correction of directory names during word completion
+
+builtins/read.def
+ - support for fractional timeout values (ival.uval); uses uconvert
+ and falarm/setitimer
+
+config.h.in
+ - new `HAVE_SETITIMER' define
+
+configure.in
+ - look for setitimer(2), define HAVE_SETITIMER if found
+
+doc/{bash.1,bashref.texi}
+ - document new `dirspell' shopt option
+ - document new fractional values to `read -t timeout'
+
+ 5/6
+ ---
+assoc.[ch]
+ - new files, basic support for associative array implementation
+
+general.h
+ - new extern declarations for sh_openpipe, sh_closepipe, trim_pathname
+
+general.c
+ - new functions: sh_openpipe to create a pipe and move the file
+ descriptors to a high range; sh_closepipe, to close pipe fds and
+ clean up, and trim_pathname, to replace portions of a pathname
+ with `...' (for prompting)
+
+jobs.c
+ - don't set last_asynchronous_pid in child shell (messes up $!, among
+ other things)
+
+parse.y,parser.h
+ - moved definitions of parser flags to parser.h
+
+array.c
+ - imported array_modcase (case-changing operations on arrays) from
+ 4.0-devel branch
+
+array.h
+ - new extern declaration for array_modcase
+
+lib/readline/complete.c
+ - new variable, rl_menu_completion_entry_function, generator for
+ rl_menu_complete
+ - new menu completion `browsing' implementation, with several
+ improvements over the old code. Inspired by Sami
+
+lib/readline/readline.h
+ - extern declaration for rl_menu_completion_entry_function
+
+ 5/8
+ ---
+lib/readline/complete.c
+ - add support for a third argument to fnprint and print_filename,
+ which supports replacing a specified portion of the pathnames
+ printed when displaying possible completions with a `...' (or
+ `___', if the prefix would be confused with a portion of the
+ filename)
+ - new variable, _rl_completion_prefix_display_length, sets the
+ number of characters in a common prefix to be replaced with an
+ ellipsis when displaying possible completions
+ - add support to _rl_display_match_list to find the length of the
+ common prefix of all items being displayed, and passing that
+ value to print_filename for possible replacement with an ellipsis
+ if that length is longer than _rl_completion_prefix_display_length
+
+lib/readline/bind.c
+ - add support for retrieving value of history-size variable to
+ _rl_get_string_variable_value
+ - new bindable variable, completion-prefix-display-length. When
+ displaying possible completions, matches with a common prefix
+ longer than this value have the common prefix replaced with an
+ ellipsis
+ - support for retrieving value of completion-prefix-display-length
+ variable to _rl_get_string_variable_value
+ - new bindable variable, revert-all-at-newline: if enabled, causes
+ all changes in history lines to be undone before readline returns
+ after processing a newline
+
+doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
+ - document new `completion-prefix-display-length' variable
+ - document new `revert-all-at-newline' variable
+
+execute_cmd.c
+ - change execute_builtin to not inherit the `-e' flag into commands
+ executed by the `command' or `source/.' builtins if we are supposed
+ to be ignoring the return value. This is like `eval'. Fixes bug
+ reported by Hiroshi Fujishima <hirobo@tonteki.org>
+
+ 5/10
+ ----
+variables.c
+ - when reading the initial environment, don't create variables with
+ names that are not valid shell identifiers. Fixes bug reported by
+ Stephane Chazleas <stephane_chazelas@yahoo.fr>
+
+ 5/13
+ ----
+subst.c
+ - fix string_quote_removal to gracefully handle the case where a
+ backslash is the final character in the string (leaves the backslash
+ in place). Fixes bug reported by Ian Robertson
+ <iroberts@u.washington.edu>
+
+ 5/16
+ ----
+support/checkbashisms
+ - Perl script that purports to check for bash-specific features in a
+ shell script. Lifted from Debian via ubuntu
+
+ 5/20
+ ----
+lib/readline/display.c
+ - in update_line, when deciding whether or not to adjust _rl_last_c_pos
+ in a multibyte environment after printing the last line of a multiline
+ prompt with invisible characters on the first and last lines, use
+ the number of inivisible chars on the first line in the calculation
+ deciding whether or not we're past the last invisible character and
+ need to adjust the cursor position. Old code used the number of
+ invisible chars on the last prompt line. Fixes bug reported by
+ stuff@slinkp.com.
+ - in update_line, when fixing _rl_last_c_pos after drawing the first
+ line of the prompt, use the number of invisible chars on the first
+ line as the offset, instead of the total number of invisible chars
+ - use prompt_multibyte_characters, the number of multibyte chars in
+ the prompt string, to short-circuit some relatively expensive
+ multibyte text processing in rl_redisplay
+
+ 5/21
+ ----
+variables.c
+ - new function, reinit_special_variables(), a hook for special
+ vars that need their hook functions called when they're unset as
+ a result of the shell reinitializing itself to run a script
+
+shell.c
+ - shell_reinitialize now calls reinit_special_variables
+ - shell_reinitialize now calls bashline_reset
+
+variables.h
+ - new extern declaration for reinit_special_variables
+
+bashline.c
+ - new function, bashline_reset(), called when the shell reinitializes
+ in shell_reinitialize. Right now, just resets
+ bash_readline_initialized to 0.
+
+bashline.h
+ - new extern declaration for bashline_reset()
+
+ 5/23
+ ----
+bashhist.c
+ - new function, bash_clear_history, clears the history and resets any
+ associated internal bash state
+
+bashhist.h
+ - extern declaration for bash_clear_history
+
+builtins/history.def
+ - call bash_clear_history instead of clear_history for `history -c'.
+ Fixes part of problem reported by Scott McDermott
+ <scott.m.mcdermott@gmail.com>
+ - decrement history_lines_this_session in delete_histent, called for
+ `history -d'
+
+builtins/history.def,bashhist.[ch]
+ - move delete_histent() to bashhist.c; rename to bash_delete_histent
+ - move delete_last_history() to bashhist.c; rename to
+ bash_delete_last_history()
+
+ 5/25
+ ----
+braces.c
+ - add another parameter to mkseq(), the number of digits to put into
+ each member of a numeric sequence (width), changes to determine
+ any zero-padding go into expand_seqterm
+ - changes to expand_seqterm to allow user-specified increments
+
+bashline.[ch],shell.c,sig.c
+ - switched names of bashline_reinitialize and bashline_reset to better
+ reflect their functions
+ - when searching $PATH for directories to use for command completion,
+ make sure to free `current_path' before going out of scope
+ - new bindable function `dabbrev-expand', which is more or less
+ menu completion using dynamic history completion as the generator
+ - changes to bash_execute_unix_command to set variables for the
+ executed command like programmable completion: READLINE_LINE
+ (rl_line_buffer) and READLINE_POINT (rl_point)
+ - change to bash_execute_unix_command to allow the executed command
+ to change the readline line buffer by modifying the value of
+ READLINE_LINE and to change rl_point by modifying the value of
+ READLINE_POINT
+
+common.h
+ - new SEVAL_ defines for later parse_string changes from 4.0-devel
+ branch
+
+command.h
+ - new defines for new &>> r_append_err_and_out redirection
+
+builtins/evalstring.c
+ - new function, parse_string, parses a command from a passed string
+ and returns the number of characters consumed. For satisfying
+ Posix rules when parsing command substitutions, from bash-4.0-devel
+ branch
+ - split out common prolog code from parse_string and
+ parse_and_execute into a separate function called from both
+
+parse.y
+ - small changes to add symbols needed for parse_string
+ - parser change to add `|&' as synonym for `2>&1 |'; translation is
+ performed at parse time so |& never shows up in output of
+ print_command, for instance. Picked up from zsh, merged in from
+ bash-4.0-devel branch
+
+parse.y,{redir,copy_cmd,dispose_cmd,make_cmd,print_cmd}.c
+ - implement new &>> r_append_err_and_out (like >>foo 2>&1); merged
+ in from bash-4.0-devel branch
+
+doc/{bash.1,bashref.texi},lib/readline/doc/rluser.texi
+ - document new optional increment in brace expansion
+ - document new zero-padded fixed-width integer brace expansion
+ - document new `dabbrev-expand' bindable readline command
+ - document new effects of `bind -x' setting and reading the values of
+ READLINE_LINE and READLINE_POINT
+ - document new |& synonym for `2>&1 |' pipeline operator
+
+ 5/26
+ ----
+parse.y - recognize new ;& and ;;& case action list terminator tokens and
+ implement them in the grammar, setting CASEPAT_FALLTHROUGH and
+ CASEPAT_TESTNEXT flags as appropriate
+
+print_cmd.c
+ - print new ;& and ;;& case clause action list terminators as
+ appropriate
+
+execute_cmd.c
+ - implement new case clause action list terminators:
+ ;& - fall through to actions associated with next pattern list
+ ;;& - fall through to tests in next pattern list
+
+doc/{bash.1,bashref.texi}
+ - document new ;& and ;;& case clause action list terminators
+
+ 5/28
+ ----
+jobs.c
+ - change waitchld so it treats SIGCHLD like SIGINT if `wait' is being
+ executed, and allows wait to jump out before running any trap set
+ on SIGCHLD. Fixes debian bug #483016 reported by Miroslav Rudisin
+ <miero@atrey.karlin.mff.cuni.cz>
+ - run_sigchld_trap is no longer static, so the trap code in trap.c
+ can call it
+ - change run_sigchld_trap to call set_impossible_sigchld_trap instead
+ of just using a call to restore_default_signal
+
+jobs.h
+ - new extern declaration for run_sigchld_trap
+
+trap.c
+ - fix run_pending_traps to run a SIGCHLD trap if the trap handler isn't
+ set to IMPOSSIBLE_TRAP_HANDLER
+ - in trap_handler, don't reset the SIGCHLD trap handler to trap_handler
+ if MUST_REINSTALL_SIGHANDLERS is defined
+ - new function, set_impossible_sigchld_handler, sets the trap string
+ associated with SIGCHLD to IMPOSSIBLE_TRAP_HANDLER; used as a sentinel
+ by run_sigchld_trap and maybe_set_sigchld_handler
+ - change maybe_set_sigchld_handler to set the SIGCHLD trap string only
+ if the current value is IMPOSSIBLE_TRAP_HANDLER. This ensures that
+ any traps on SIGCHLD set in a SIGCHLD handler will persist. Fixes
+ debian bug #483016 reported by Miroslav Rudisin
+ <miero@atrey.karlin.mff.cuni.cz>
+
+trap.h
+ - new extern declaration for set_impossible_sigchld_trap
+
+ 5/31
+ ----
+parse.y
+ - new function: parse_comsub(), parses $(...) by parsing command
+ between parens and making sure the next token is `)'. From
+ the bash-4.0-devel branch
+ - new function: xparse_dolparen, helper function for parsing
+ command substitutions in $(...). Called from subst.c to extract
+ a command substitution during word expansion. From bash-4.0-devel
+ branch
+ - new function: rewind_input_stream(). Rewinds bash_input.location.string
+ back to where it was before the shell parsed a $() command
+ substitution. From bash-4.0-devel branch
+ - changes to parse_matched_pair to combine most of the flag variables
+ (was_dollar, in_comment, and so on) into a local flags word
+
+ 6/2
+ ---
+parse.y
+ - call trim_pathname, which retains only the last $PROMPT_DIRTRIM
+ directories and replaces the intervening characters with `...',
+ when expanding \w and \W
+
+doc/{bash.1,bashref.texi}
+ - document the effect of setting PROMPT_DIRTRIM
+
+ 6/3
+ ---
+builtins/ulimit.def
+ - make the multiplier (block size) for -c and -f 512 bytes only if in
+ Posix mode and 1024 bytes otherwise (as in previous versions). Uses
+ POSIXBLK and BLOCK_SIZE defines to parameterize size based on value
+ of posixly_correct
+
+doc/bashref.texi
+ - document this addition to posix mode
+
+builtins/common.c
+ - change get_numeric_arg to have a calling sequence and return value
+ more closely mimicking general.c:legal_number(), with the addition
+ of a flags word
+ - add extra value for `fatal' argument to get_numeric_arg to force it
+ to return failure to the caller rather than longjmping
+
+builtins/common.h
+ - change prototype declaration for get_numeric_arg
+
+builtins/{break,shift}.def
+ - change calls to get_numeric_arg to deal with new semantics and calling
+ sequence
+
+builtins/history.def
+ - display_history now returns an int
+ - change calling sequence for get_numeric_arg in display_history
+ - display_history now returns failure to the caller if get_numeric_arg
+ detects an invalid number, rather than jumping back to the top level
+ - use value returned by display_history as return status of history
+ builtin, filtered through sh_chkwrite
+ - history no longer aborts compound commands on invalid arguments.
+ fixes problem reported by Chu Li <chul@cn.fujitsu.com>
+
+{braces,subst}.c
+ - extract_command_subst now takes a third flags argument; passed flags
+ are ORd into flags passed to other functions; changed callers
+
+subst.h
+ - move SX_* defines here from subst.c so parse.y:xparse_dolparen can
+ see them and behave appropriately
+ - extract_command_subst now takes a third flags argument; change
+ prototype
+
+subst.c
+ - change extract_command_subst to call xparse_dolparen when extracting
+ a $() construct
+ - change calls to extract_delimited_string to extract_command_subst
+ as appropriate
+ - if command_substitute returns a NULL word desc, don't call
+ dispose_word_desc on it
+
+parse.y
+ - change xparse_dolparen to use the SX_* flags now in subst.h
+
+ 6/16
+ ----
+subst.c
+ - in quote_list, set W_HASQUOTEDNULL flag in the word if quote_string
+ turns "" into CTLNUL
+ - in dequote_list, turn off W_HASQUOTEDNULL flag in the word if
+ dequote_string turns CTLNUL into ""
+ - new function, string_list_pos_params, encapsulates everything
+ needed to turn the positional parameters or an array indexed with
+ '@' or '*' into a string, including taking care of quoting and
+ using the first char of $IFS, when used in another expansion like
+ pattern removal or pattern substitution
+ - change list_remove_pattern, pos_params, pos_params_pat_subst to
+ call string_list_pos_params. Fixes problems reported by
+ Stephane Chazelas <stephane_chazelas@yahoo.fr>
+
+ 6/22
+ ----
+variables.h
+ - include assoc.h for associative arrays
+ - defines for case-modifying expansions and associative array variables
+ - sh_var_assign_func_t functions now take an extra char * parameter
+
+ 6/25
+ ----
+variables.c
+ - change declarations and definitions of sh_var_assign_func_t functions
+ to add the extra char * parameter: null_assign, null_array_assign,
+ assign_seconds, assign_random, assign_lineno, assign_subshell,
+ assign_dirstack
+ - change calls to var->assign_func to add extra char * argument
+ - broke part of body of dispose_variable out into a new function,
+ dispose_variable_value, which knows how to free all kinds of shell
+ variable data
+ - changes to deal with variables with the internal `nofree' attribute
+
+arrayfunc.c
+ - change calls to var->assign_func to add extra char * argument
+ - bind_array_var_internal now takes an extra `char *key' argument
+ - additions for associative array implementation; from bash-4.0-devel
+ tree
+
+arrayfunc.[ch],subst.c
+ - expand_compound_array_assignment now takes the variable as the first
+ argument (SHELL_VAR *); changed function definition and callers
+
+builtins/set.def
+ - changes to handle associative arrays in `unset'
+
+{execute_cmd,command}.h
+ - definitions for coproc implementation; from bash-4.0-devel tree
+
+variables.c
+ - new functions for associative arrays: make_new_assoc_variable,
+ make_local_assoc_variable
+
+ 6/26
+ ----
+variables.c
+ - more infrastructure for associative arrays; from bash-4.0-devel tree
+ - infrastructure for handling assignments to variables with
+ case-modifying attributes; from bash-4.0-devel tree
+
+config.h.in
+ - add #defines controlling case-modifying variable attributes and word
+ expansions
+
+configure.in
+ - add enable options for case-modifying variable attributes and word
+ expansions (--enable-casemod-attributes and --enable-casemod-expansions,
+ respectively); from bash-4.0-devel tree
+
+execute_cmd.c
+ - add code to fix_assignment_words to handle assignment statements to
+ "assignment builtins" that seem to be associative arrays. Imperfect
+
+subst.c
+ - array_remove_pattern now takes a SHELL_VAR * as its first argument
+ instead of an ARRAY *; from the bash-4.0-devel tree
+ - changes to array_length_reference for associative arrays; from the
+ bash-4.0-devel tree
+ - changes to get_var_and_type for associative arrays; from the
+ bash-4.0-devel tree
+ - changes to parameter_brace_substring for associative arrays; from the
+ bash-4.0-devel tree
+ - changes to param_expand for associative arrays; from the
+ bash-4.0-devel tree
+
+builtins/declare.def
+ - changes for associative arrays: new `-A' option, changes to make
+ local and global associative array variables; from the bash-4.0-devel
+ tree
+
+ 6/27
+ ----
+execute_cmd.c
+ - in execute_command_internal, when short-circuiting execution
+ because `breaking' or `continuing' is non-zero, preserve the exit
+ status by returning `last_command_exit_value' instead of an
+ unconditional EXECUTION_SUCCESS. Fixes bug reported by Roman
+ Rakus <rrakus@redhat.com>
+
+ 6/28
+ ----
+variables.c
+ - fix get_var_and_type to appropriately handle references like
+ ${varname[0]}, where `varname' is a scalar variable
+
+make_cmd.[ch],parse.y
+ - make_here_document now takes a second argument: the current line
+ number; changed caller (gather_here_documents)
+
+builtins/setattr.def
+ - added support for associative arrays and the `-A' variable attribute
+ option; from the bash-4.0-devel tree
+
+subst.c
+ - change code that transforms `declare -A xxx=(yyy)' to perform the
+ internal `declare -A xxx' before doing the variable assignment,
+ because associative arrays have to be declared before being assigned
+ to as such; uses new function make_internal_declare
+
+ 6/30
+ ----
+subst.[ch]
+ - dequote_escapes is now external; add declaration in subst.h
+ - remove_quoted_nulls is now external; add declaration in subst.h
+
+array.[ch]
+ - new functions for completeness: array_dequote, array_dequote_escapes,
+ array_remove_quoted_nulls
+ - array_subrange now calls array_remove_quoted_nulls for "${array[*]}".
+ Fixes bug reported by Vitor De Araujo <ux386@yahoo.com.br>
+ - array_patsub now calls array_remove_quoted_nulls for "${array[*]}"
+ - array_modcase now calls array_remove_quoted_nulls for "${array[*]}"
+ - array_patsub now handles the mflags&MATCH_QUOTED case appropriately
+ (that implies "${array[@]}")
+
+subst.c
+ - new functions for case-modifying word expansion suppport:
+ pos_params_casemod, parameter_brace_casemod; from bash-4.0-devel branch
+
+assoc.c
+ - new functions for completeness: assoc_remove_quoted_nulls
+ - assoc_patsub now calls assoc_remove_quoted_nulls for "${assoc[*]}"
+ - assoc_modcase now calls assoc_remove_quoted_nulls for "${array[*]}"
+ - assoc_patsub now handles the mflags&MATCH_QUOTED case appropriately
+ (that implies "${assoc[@]}")
+
+ 7/1
+ ---
+assoc.[ch]
+ - new function, assoc_subrange: takes a hash table, converts it to a
+ word list, and performs the subrange and indexing on that list
+ - new functions for completeness: assoc_dequote, assoc_dequote_escapes
+
+subst.c
+ - verify_substring_values now takes the variable SHELL_VAR * as its
+ new first argument; changed callers
+ - change verify_substring_values to handle associative arrays using the
+ number of elements as the upper bound
+ - brought in code to do case-modifying word expansions from
+ bash-4.0-devel branch, conditional on CASEMOD_EXPANSIONS
+
+input.c
+ - if the read(2) in getc_with_restart returns -1/EAGAIN, turn off
+ non-blocking mode on the file descriptor and try again. Fixes
+ problem reported by Glynn Clements <glynn@clements.plus.com>
+
+ 7/2
+ ---
+doc/{bash.1,bashref.texi}
+ - documented new case-modifying word expansions
+
+make_cmd.c
+ - change make_here_document to display a warning message including the
+ start line of a here document if it ends up delimited by EOF.
+ Addresses issue raised by Richard Neill <rn214@hermes.cam.ac.uk>
+
+subst.c
+ - in do_assignment_internal, make sure the `invisible' attribute is
+ unset before returning success
+
+ 7/3
+ ---
+config-top.h
+ - add `CASEMOD_CAPCASE' define to include or exclude the ~[~] word
+ expansion and the `capcase' variable attribute (declare -c)
+
+builtins/declare.def
+ - add support for manipulating the case-modifying attributes (new
+ declare -clu); from bash-4.0-devel branch
+
+builtins/setattr.def
+ - add support for reporting case-modifying attributes (-clu attributes);
+ from bash-4.0-devel branch
+
+doc/{bash.1,bashref.texi}
+ - specify that the read builtin timing out results in a return value
+ greater than 128
+ - document new `-l' and `-u' options to declare/typeset/local. Leave
+ `-c' undocumented for now
+
+ 7/4
+ ---
+make_cmd.[ch]
+ - make_coproc_command: construct a coproc; from bash-4.0-devel tree
+
+dispose_cmd.c
+ - dispose coproc command; from bash-4.0-devel tree
+
+copy_cmd.c
+ - copy a coproc command; from bash-4.0-devel tree
+
+print_cmd.c
+ - print a coproc command; from bash-4.0-devel tree
+
+shell.c
+ - dispoe the current coproc on shell exit; from bash-4.0-devel tree
+
+redir.c
+ - when closing redirects as part of user redirections, check whether
+ or not active coprocess fds are being closed and close the coproc
+ if so; from bash-4.0-devel tree
+
+config.h.in
+ - add define for COPROCESS_SUPPORT to include coprocesses
+
+configure.in
+ - add support for configuring coprocesses into and out of the build
+
+jobs.c
+ - in waitchld, check whether or not a coproc processs has exited;
+ from the bash-4.0-devel tree
+
+ 7/5
+ ---
+doc/bashref.texi
+ - document new --enable-coprocesses option that includes coprocess
+ support
+
+execute_cmd.c
+ - add functions for coprocess support, including execute_coproc and
+ code to call it when command->type == cm_coproc; from
+ bash-4.0-devel tree
+
+lib/sh/fdprintf.c
+ - new library function fdprintf(int fd, const char *format, ...);
+ printf to a file descriptor
+
+{configure,config.h}.in
+ - support for detecting fdprintf and compiling in replacement
+
+Makefile.in,lib/sh/Makefile.in
+ - add rules to include fdprintf.o
+
+doc/{bash.1,bashref.texi}
+ - documented coprocesses and `coproc' reserved word
+
+ 7/7
+ ---
+subst.c
+ - fix array_length_reference to use MB_STRLEN instead of STRLEN, so
+ multibyte characters in array values are computed correctly. Fixes
+ bug reported by Wang Xin <wxinee@gmail.com>
+
+ 7/10
+ ----
+jobs.c
+ - new function, maybe_give_terminal_to (old, new, flags), sets the
+ terminal pgrp to NEW if and only if it's currently set to OLD
+ - call maybe_give_terminal_to when the parent sets the terminal pgrp
+ to the pipeline pgrp in stop_pipeline, so we don't give the
+ terminal to the new job's pgrp unless it's currently owned by the
+ shell. Fixes race condition described by Joe Peterson
+ <joe@skyrush.com>, where parent bash may change tty pgrp after a
+ grandchild (interactive bash child of su) has changed it to
+ something else. The call to maybe_give_terminal_to makes explicit
+ a previously-implicit assumption
+
+aclocal.m4
+ - remove dependency on writable /tmp by creating directories in
+ build directory
+
+shell.c
+ - make changes to how bash sets no_line_editing and running_under_emacs
+ to deal with various emacs terminal emulators; use better check
+ for `eterm', since bash sends $PWD to eterm with control sequences
+ that confuse other programs. Problem reported by Micah Cowan
+ <micah@cowan.name>
+
+
+ 7/12
+ ----
+print_cmd.c
+ - break code that prints here-documents into two functions:
+ print_heredoc_header, which prints the operator and delimiter, and
+ print_heredoc_body, which prints the body text and closing delimiter
+ - change print_redirection to call print_heredoc_{header,body}
+ - sentinel variable, printing_connection, used when printing a command
+ of type `connection' (|, &&, ||, etc.)
+ - change print_redirection_list to save any here documents it finds
+ while printing a connection and save them in `deferred_heredocs'
+ - new function, print_deferred_heredocs, called from print_redirection
+ in the cm_connection case, calls print_heredoc_header for all the
+ here documents, then prints the operator (|, &&, ||, etc.), then
+ the here-document body. This preserves syntactic correctness; the
+ old code printed the control operator after the body of the here
+ document. Fixes bug reported by <buport@figpost.com>
+
+ 7/16
+ ----
+locale.c
+ - in set_locale_var, print a warning message if setlocale() fails any
+ time it's called -- required some code restructuring
+
+ 7/19
+ ----
+support/shobj-conf
+ - support for mingw32, contributed by Carlo Bramix
+ <carlo.bramix@libero.it>
+
+ 7/23
+ ----
+execute_cmd.c
+ - added support (currently unused) to manage a list of coprocs
+
+ 7/25
+ ----
+bashline.c
+ - add extern declarations for literal_history and force_append_history
+
+builtins/shopt.def
+ - include "bashhist.h" instead of having extern declarations for the
+ appropriate history variables
+
+parser.h
+ - new parser_state value: PST_HEREDOC, set when reading body of here-
+ document in parse.y:read_secondary_line
+
+parse.y
+ - set PST_HEREDOC bit in parser_state when reading a secondary line
+ for the body of a here-document
+ - change read_secondary_line to save lines in the body of a here-
+ document in the shell history list if remember_on_history is
+ set. Fixes bug reported by Gene Golub <gene_golub@hotmail.com>
+
+ 8/4
+ ---
+configure.in
+ - changed to 4.0-alpha
+
+lib/readline/readline.h
+ - changed constants to reflect readline-6.0 version
+
+ 8/11
+ ----
+lib/readline/signals.c
+ - make sure we don't use SIGWINCH without checking whether or not it's
+ defined. Fix from Pedro Alves <pedro@codesourcery.com>
+
+ 8/12
+ ----
+
+COPYING
+ - updated to GPLv3; edits in every file with a copyright or license
+ declaration to update to gpl3
+
+version.c
+ - update extended version info to latest gnu standard
+
+ 8/17
+ ----
+subst.c
+ - change exp_jump_to_top_level to only call top_level_cleanup if
+ parse_and_execute_level is 0. If it's not, the longjmp to
+ parse_and_execute will run the unwind-protect stack. Fixes bug
+ most recently reported by Roman Rakus <rrakus@redhat.com>
+
+ 8/18
+ ----
+support/config.{guess,sub}
+ - updated to newer versions from autoconf-2.62 distribution
+
+ 8/20
+ ----
+subst.c
+ - fixed parameter_brace_substring to differentiate between indexed and
+ associative arrays when computing second offset, instead of
+ assuming indexed array
+
+ 8/21
+ ----
+support/xcase.c
+ - simple program to convert input from lower to uppercase and vice
+ versa. Now used by coproc test suite, since `tr -u' is not
+ portable.
+
+ 8/22
+ ----
+doc/bash.1
+ - fixed description of the bindable edit-and-execute commands to note
+ they check $VISUAL first, instead of $FCEDIT. Fixed bug reported
+ by
+
+[bash-4.0-alpha frozen]
+
+ 8/28
+ ----
+[bash-4.0-alpha released]
+
+ 9/1
+ ---
+builtins/evalstring.c
+ - fixed typo in parse_string (ostring used uninitialized). Bug
+ reported by Andreas Schwab <schwab@suse.de>
+
+subst.c
+ - fix return value of parameter_brace_expand to set the
+ W_HASQUOTEDNULL flag in the returned WORD_DESC * if the return value
+ from parameter_brace_remove_pattern is a quoted null string. Fixes
+ bug reported by Andreas Schwab <schwab@suse.de>
+ - set the W_HASQUOTEDNULL flag in the return value from
+ parameter_brace_expand if the return value from parameter_brace_patsub
+ is a quoted null string
+
+ 9/6
+ ---
+builtins/read.def
+ - change read -t 0 to return success if there is input available to be
+ read -- allows scripts to poll for input. Uses input_avail libsh
+ function
+
+ 9/9
+ ---
+externs.h
+ - fix extern fpurge declaration -- use HAVE_DECL_FPURGE instead of
+ NEED_FPURGE_DECL, since the former is set by `configure'
+
+jobs.h
+ - add extern declaration for close_pgrp_pipe
+ - add a new job state JNONE (-1) to the enum
+
+jobs.c
+ - include execute_cmd.h for extern declarations for coproc functions
+
+subst.c
+ - include builtins/builtext.h for extern declarations for functions
+ implementing builtins (e.g., declare_builtin)
+
+arrayfunc.c
+ - include "pathexp.h" for extern declaration for glob_char_p
+
+braces.c
+ - add extern declaration for `asprintf'
+
+lib/readline/rlprivate.h
+ - add extern declarations for _rl_trace, _rl_tropen
+
+lib/sh/zgetline.c
+ - add extern declarations for zread, zreadc
+
+lib/sh/mktime.c
+ - include "bashansi.h" for string function declarations
+
+builtins/common.h
+ - add extern declaration for parse_string
+
+trap.c
+ - include jobs.h for extern declaration for run_sigchld_trap
+
+general.c
+ - fix call to strtoimax in legal_number; if ep == string when function
+ returns, the number was not converted, even if errno is not set.
+ Fix from Paul Jarc <prj@case.edu>
+
+ 9/11
+ ----
+[prayers for the victims of 9/11/2001]
+
+builtins/return.def
+ - call no_options, as Posix requires. This also has the effect of
+ disallowing negative return values unless they're prefixed by `--'
+
+ 9/13
+ ----
+builtins/bind.def
+ - add an error message when bind is used without line editing active,
+ instead of just returning an error status
+
+variables.c
+ - make sure make_local_variable never creates visible variables with
+ a value, whether or not a variable with the same name existed in a
+ previous context. This is consistent with ksh93. Fix from
+ <neil@s-z.org>
+
+ 9/16
+ ----
+execute_cmd.c
+ - add call to CHECK_TERMSIG in shell_execve after the call to execve
+ returns. Recommended by Roman Rakus <rrakus@redhat.com>
+ - add QUIT check in execute_connection after executing first command
+ in a `&' connection
+
+ 9/22
+ ----
+execute_cmd.c
+ - new semaphore variable, executing_list, incremented every time a
+ list (command1;command2 or command1 || command2 or command1 &&
+ command2) is executed; used as sentinel for rest of shell
+
+sig.c,builtins/evalstring.c
+ - set executing_list to 0 when throwing execution back to top level;
+ make sure to unwind-protect it in appropriate places
+
+jobs.c
+ - if a pipeline is killed by SIGINT while executing a list (when
+ executing_list is non-zero), make sure the shell acts as if an
+ interrupt occurred. The behavior is dependent on the shell
+ compatibility level being > 32 (bash-4.0 and above)
+
+ 9/23
+ ----
+redir.c
+ - don't bother reporting an error with a file descriptor, even if
+ the errno is EBADF, if the redirection error (e.g., NOCLOBBER)
+ can't have anything to do with the fd. Fixes bug reported by
+ "David A. Harding" <dave@dtrt.org>, debian bug #499633.
+
+ 9/24
+ ----
+builtins/declare.def
+ - make `declare [option] var' (and the `typeset' equivalent) create
+ invisible variables, instead of assigning the null string to a
+ visible variable. Fixes bug reported by Bernd Eggink <monoped@sudrala.de>
+
+ 9/25
+ ----
+builtins/common.[ch]
+ - new function, builtin_warning(), like builtin_error but for warning
+ messages
+
+builtins/bind.def
+ - experimental: print a warning, but go on, if line editing not active
+ when bind is invoked. Suggested by Rocky Bernstein
+ <rocky.bernstein@gmail.com>
+
+ 10/3
+ ----
+test.c
+ - use same_file instead of directly comparing st_dev and st_ino when
+ comparing files in filecomp(). From mingw32 patches submitted
+ by Hector Chu <hkcc2@cantab.net>
+
+ 10/4
+ ----
+
+redir.c
+ - in redirection_error(), use `error' instead of errno when comparing
+ against EBADF. From mingw32 patches submitted by Hector Chu
+ <hkcc2@cantab.net>
+
+shell.c
+ - in unset_bash_input(), reset bash_input.type to st_none after
+ closing the default buffered fd. From mingw32 patches submitted
+ by Hector Chu <hkcc2@cantab.net>
+
+builtins/cd.def
+ - ignore CDPATH when in privileged mode. Suggested by Paul Jarc
+ <prj@po.cwru.edu>
+
+variables.c
+ - change sv_globignore to only act if privileged mode is not enabled.
+ Suggested by Paul Jarc <prj@po.cwru.edu>
+
+doc/bash.1,bashref.texi
+ - document new treatment of CDPATH and GLOBIGNORE when privileged
+ mode is enabled
+
+builtins/read.def
+ - change prompt printing to occur after terminal is set to no-echo
+ mode. Based on suggestion from Stephane Chazelas
+ <stephane_chazelas@yahoo.fr>
+
+lib/readline/signals.c
+ - new variables to keep track of special characters corresponding to
+ SIGINT, SIGQUIT, and SIGTSTP
+ - new variable to keep track of whether tty is echoing control
+ characters corresponding to SIGINT, SIGQUIT, and SIGTSTP
+ - new function, _rl_echo_signal_char(int sig) to display the tty
+ special char generating SIGINT, SIGQUIT, or SIGTSTP. Based on
+ idea and code from Joe Peterson <joe@skyrush.com>
+ - call rl_echo_signal_char in rl_signal_handler: if the terminal
+ settings indicate it, readline will echo characters that generate
+ keyboard signals
+
+lib/readline/rltty.c
+ - set _rl_intr_char, _rl_quit_char, and _rl_susp_char to special
+ characters that generate signals from keyboard
+ - set _rl_echoctl if ECHOCTL tty flag is set
+
+lib/readline/rlprivate.h
+ - extern declarations for _rl_intr_char, _rl_quit_char, and
+ _rl_susp_char
+ - extern declaration for _rl_echoctl
+
+lib/readline/readline.h
+ - extern declaration for rl_echo_signal_char()
+
+lib/readline/doc/rltech.texi
+ - document rl_echo_signal_handler(): available for applications
+ that install their own signal handlers
+
+ 10/5
+ ----
+execute_cmd.c
+ - fix errexit logic to not cause the shell to exit when a command in
+ a pipeline fails. Fixes bug reported by Marcin Owsiany
+ <marcin@owsiany.pl>
+
+ 10/14
+ -----
+builtins/evalstring.c
+ - don't short-circuit execution in parse_and_execute if we want to
+ run an exit trap. Fixes bug reported by Steffen Kiess
+ <s-kiess@web.de>
+
+ 10/18
+ -----
+parse.y
+ - fix error production to only call YYACCEPT if the shell is currently
+ interactive and not in parse_and_execute (so parser errors in
+ things like eval will correctly set $?). Fixes bug reported by
+ marco-oweber@gmx.de
+
+execute_cmd.c
+ - make sure variable name errors in execute_for_command and non-
+ identifier function names in execute_intern_function set the
+ return status to EX_BADUSAGE (2), not EX_USAGE (258)
+
+parser.h
+ - new parser state, PST_REPARSE
+
+parse.y
+ - turn PST_REPARSE on in parse_string_to_word_list
+ - in parse_matched_pair, if parsing a single-quoted string and
+ PST_REPARSE is set, don't requote CTLESC or CTLNUL. Fixes bug with
+ compound array assignment using $'\x7f' reported by Antonio Macchi
+ <antonio_macchi@alice.it>
+
+ 10/23
+ -----
+configure.in
+ - define LOCAL_LDFLAGS as `-z interpose' on Solaris 8, 9, and 10 to
+ allow the bash malloc to interpose the libc malloc when called by
+ library functions pre-bound to the libc malloc. Suggested by
+ Serge Dussud <Serge.Dussud@Sun.COM>
+
+ 10/26
+ -----
+doc/bash.1
+ - add single-sentence descriptions to rest of parameter expansions.
+ Suggested by Ken Irving <fnkci@uaf.edu>
+
+ 10/27
+ -----
+subst.c
+ - rearrange code in skip_to_delims to allow quote characters and other
+ shell expansion characters to be delimiters
+ - add new flags value for inverting search: skip to the next character
+ NOT in the set of delimiters passed as an argument
+
+subst.h
+ - define for new SD_INVERT flag value for skip_to_delims
+
+ 10/28
+ -----
+bashline.c
+ - new bindable functions: shell-forward-word and shell-backward-word.
+ Like forward-word and backward-word, but understand shell quoting
+ and use shell metacharacters and whitespace as delimiters.
+ Suggested by Andre Majorel <amajorel@teaser.fr>
+ - new bindable functions: shell-kill-word and shell-backward-kill-word.
+ Like kill-word and backward-kill-word, but understand shell quoting
+ and use shell metacharacters and whitespace as delimiters.
+ Suggested by Andre Majorel <amajorel@teaser.fr>
+
+doc/bash.1,lib/readline/doc/rluser.texi
+ - documented shell-forward-word and shell-backward-word
+ - documented shell-kill-word and shell-backward-kill-word
+
+ 11/1
+ ----
+redir.c
+ - add extra argument to add_undo_redirect: fdbase. FD used to save
+ a file descriptor must be > fdbase if fdbase >= SHELL_FD_BASE. A
+ value of -1 for fdbase means to just use SHELL_FD_BASE. Fixes bug
+ with 0<&10 reported by Clark Jian Wang <dearvoid@gmail.com>
+
+ 11/5
+ ----
+unwind_prot.c
+ - new function: have_unwind_protects(); returns 1 if unwind_protect_list
+ is not empty
+
+unwind_prot.h
+ - extern declaration for have_unwind_protects
+
+builtins/evalstring.c
+ - in parse_and_execute_cleanup, make sure that we don't call
+ run_unwind_frame and expect it to decrement parse_and_execute_level
+ if there's no unwind_protect_list, since there's a while loop in
+ throw_to_top_level that calls parse_and_execute_cleanup as long as
+ parse_and_execute_level is non-zero
+
+ 11/9
+ ----
+variables.c
+ - fix the assign function for COMP_WORDBREAKS to allocate new memory
+ to store as the variable's value, to avoid freeing memory twice
+ if the variable is unset after rl_completer_word_break_characters
+ is freed and reallocated. Fix from Mike Stroyan <mike@stroyan.net
+
+ 11/11
+ -----
+bashline.c
+ - new function to reset the value of rl_completer_word_break_characters
+ while honoring setting of `hostcomplete': reset_completer_word_break_chars.
+
+bashline.h
+ - new extern declaration for reset_completer_word_break_chars.
+
+variables.c
+ - call reset_completer_word_break_chars in sv_comp_wordbreaks when the
+ variable is unset
+
+[bash-4.0-beta frozen]
+
+ 11/16
+ -----
+subst.c
+ - call set_pipestatus_from_exit in exp_jump_to_top_level so that
+ failed expansions that set $? will set $PIPESTATUS. Fixes bug
+ reported by Eric Blake <ebb9@byu.net>
+
+ 11/20
+ -----
+general.c
+ - new 'file_exists(fn)' primitive; just calls stat(2)
+
+general.h
+ - new extern declaration for file_exists
+
+bashline.c
+ - add `~' to rl_filename_quote_characters so make_quoted_replacement
+ will call bash_quote_filename for words containing `~'. Then
+ bash_quote_filename can make choices based on that
+ - change quote_word_break_chars to backslash-quote the tilde in a
+ filename with a leading tilde that exists in the current directory,
+ since we want to inhibit tilde expansion in this case
+
+execute_cmd.c
+ - call file_isdir from shell_execve instead of stat(2) directly
+
+bashhist.c
+ - use file_exists and file_isdir primitives instead of calling stat
+
+ 11/21
+ -----
+redir.c
+ - When undoing saving of non-standard file descriptors (>=3) using
+ file descriptors >= SHELL_FD_BASE, we set the saving fd to be
+ close-on-exec and use a flag (RX_SAVCLEXEC) to decide how to set
+ close-on-exec when the fd is restored. Set flag in add_undo_redirect,
+ check in do_redirection_internal. Fixes problem reported by Andreas
+ Schwab <schwab@suse.de>
+
+ 11/26
+ -----
+subst.c
+ - fix param_expand to have expansions of $@ and $* exit the shell if
+ there are no positional parameters and `set -u' is enabled. Fixes
+ bug reported by Dan Jacobson <jidanni@jidanni.org>
+
+ 11/27
+ -----
+lib/readline/display.c
+ - fix update_line to not call space_to_eol if current cursor position
+ (_rl_last_c_pos) indicates that we're already at end of line.
+ Partial fix for bug reported by Mike Frysinger <vapier@gentoo.org>
+ - in update_line, don't call insert_some_chars if that will start
+ before the last invisible character in the prompt string and not
+ draw the entire prompt string. More of the partial fix for bug
+ reported by Mike Frysinger <vapier@gentoo.org>
+ - fix update_line to adjust _rl_last_c_pos by wrap_offset when adding
+ characters beginning before the last invisible character in the
+ prompt. New code is same as previously existed in a different code
+ path. Rest of fix for bug from Mike Frysinger <vapier@gentoo.org>
+ - fix assignment of newline breaks (inv_lbreaks) to correctly account
+ for prompts longer than two screen lines containing invisible
+ characters. The assumption is that part of the invisible characters
+ are on the first line (prompt_invis_chars_first_line) and the
+ remainder are on the last (wrap_offset - prompt_invis_chars_first_line).
+ Fix is in rl_redisplay. part of fix for bug reported by
+ "Wesley J. Landaker" <wjl@icecavern.net> in
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=265182
+ [TENTATIVE]
+ - fix _rl_move_cursor_relative to correctly offset `dpos' by `woff'
+ when there are invisible characters on lines after the second by
+ using (_rl_screenwidth*_rl_last_v_pos) when seeing whether or not
+ we just wrote some invisible characters. Rest of fix for bug
+ reported in http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=265182
+ [TENTATIVE]
+
+ 12/11
+ -----
+sig.c
+ - reset the execution context before running the exit trap in
+ termsig_handler
+
+general.c
+ - set and unset terminate_immediately like interrupt_immediately in
+ bash_tilde_expand
+
+builtins/read.def
+ - change terminate_immediately to a counter instead of a flag, as
+ interrupt_immediately is used
+
+lib/readline/display.c
+ - slight change to fix from 11/27 to deal with prompts longer than a
+ screen line where the invisible characters all appear after the
+ line wrap. Fixes bug reported by Andreas Schwab <schwab@suse.de>
+
+builtins/{echo,printf}.def
+ - increment terminate_immediately at entry; decrement before returning.
+ Fix for bug reported by Ralf.Wildenhues@gmx.de
+
+ 12/16
+ -----
+subst.c
+ - fix off-by-one error in /dev/fd version of add_fifo_list; make
+ sure we add to totfds when it is == fd, not just when fd > totfds.
+ Fixes bug reported by marciso@gmail.com
+
+[bash-4.0-beta2 frozen]
+
+ 12/29
+ -----
+doc/{bash.1,bashref.texi}
+ - document more clearly that when not in Posix mode, command
+ substitution does not inherit the -e option. From bug report from
+ Freddy Vulto <fvulto@gmail.com>
+
+{execute_cmd,sig,builtins/evalstring}.c
+ - sentinel variable to keep track of whether or not we're supposed to
+ ignore the failure status of a command executed in a command
+ substitution even if the `-e' option is set: comsub_ignore_return
+ - increment and decrement comsub_ignore_return in execute_simple_command
+ before calling expand_words
+ - in parse_and_execute, if comsub_ignore_return is non-zero and the
+ SUBSHELL_COMSUB bit is set in subshell_environment, enable the
+ CMD_IGNORE_RETURN flag in every command executed from the passed
+ string. Fixes problem reported by Freddy Vulto <fvulto@gmail.com>
+ - make sure to reset comsub_ignore_return every time we throw to the
+ top level, like executing_list flag
+
+ 1/2/2009
+ --------
+parse.y
+ - fix to rewind_input_stream to handle case of $(...) command
+ substitution followed by a quoted literal newline. Report and fix
+ from Andreas Schwab <schwab@suse.de>
+
+ 1/7
+ ---
+
+subst.c
+ - fix match_wpattern and match_upattern to prefix a `*' to the
+ pattern even if it starts with a `*(' (if extglob is enabled)
+ before checking whether or not it can match anywhere in the
+ string. Fixes bug reported by os@sernet.de.
+
+[bash-4.0-rc1 frozen]
+
+ 1/9
+ ---
+locale.c
+ - since setlocale() doesn't set errno to anything meaningful,
+ don't include the strerror() result in the error message if
+ it fails
+ - make sure the error messages printed when setlocale fails are
+ localizable
+
+ 1/11
+ ----
+lib/readline/histexpand.c
+ - make sure that every time history_no_expand_chars is tested, we
+ also call the history_inhibit_expansion_function if it's set.
+ Fixes bug reported by Yang Zhang <yanghatespam@gmail.com>
+
+ 1/12
+ ----
+trap.c
+ - make sure to call parse_and_execute with the SEVAL_RESETLINE bit
+ set in the flags so it will reset the line number when running
+ the trap commands. Partial fix for bug reported by
+ peter360@fastmail.us
+
+ 1/14
+ ----
+builtins/reserved.def
+ - document `coproc' so it can be used with `help' builtin. Pointed
+ out by Pierre Gaston <pgas@freeshell.org>
+
+lib/sh/casemod.c
+ - added two new flags: CASE_UPFIRST and CASE_LOWFIRST to casemod
+ the first character of the passed string and pass the rest
+ through unchanged. Fixes bug reported by Jan Schampera
+ <jan.schampera@web.de>
+
+externs.h
+ - new defines for CASE_UPFIRST and CASE_LOWFIRST
+
+subst.c
+ - use CASE_UPFIRST for ^ and CASE_LOWFIRST for , casemod operators
+
+builtins/mapfile.def
+ - call zreset() before calling first zgetline(), to clean out any
+ remaining data in local buffer used by zreadc. Fixes bug
+ reported by Pierre Gaston <pierre.gaston@gmail.com>
+
+ 1/15
+ ----
+lib/sh/zread.c
+ - renamed zreadintr to zreadretry -- not perfect, but better
+ - new functions: zreadintr, which just calls read so it can be
+ interruptible, and zreadcintr, which is like zreadc but uses
+ zreadintr to fill the buffer
+
+lib/sh/zgetline.c
+ - in zgetline, when zread/zreadc return <= 0, make sure line is
+ non-null before assigning to line[nr]
+
+builtins/mapfile.def
+ - return an error right away if the supplied array variable name
+ refers to a readonly or noassign array
+ - set interrupt_immediately so calls to zgetline can be
+ interrupted. Fixes bug reported by Pierre Gaston
+ <pierre.gaston@gmail.com>
+ - if interactive, pass the SEVAL_INTERACT and SEVAL_NOHIST flags
+ to parse_and_execute when calling callbacks. Fixes bug reported
+ by Pierre Gaston <pierre.gaston@gmail.com>
+ - add `readarray' as a synonym for mapfile
+
+doc/{bash.1,bashref.texi}
+ - document behavior of mapfile builtin adding index of array element
+ to be assigned as additional argument to callback string. Reported
+ by Pierre Gaston <pierre.gaston@gmail.com>
+ - document readarray as synonym for mapfile
+
+builtins/common.c
+ - new error function, sh_ttyerror(set), prints an error message having
+ to do with setting or getting terminal attributes
+
+builtins/read.def
+ - print error message if read fails to set terminal attributes
+
+ 1/16
+ ----
+execute_cmd.c
+ - new function, coproc_reap, calls coproc_dispose if sh_coproc is
+ marked as COPROC_DEAD
+ - new function, cpl_reap, disposes coprocs marked as COPROC_DEAD
+ from coproc list
+ - change coproc_pidchk to just mark the coproc as dead instead of
+ calling coproc_dispose, so we don't call unsafe functions from
+ a signal handler. Fixes bug reported by Andreas Schwab
+ <schwab@suse.de>
+
+execute_cmd.h
+ - new extern declaration for coproc_reap
+
+command.h
+ - new flags for c_flags member of a struct coproc
+
+{jobs,nojobs}.c
+ - add call to coproc_reap in cleanup_dead_jobs, which will do the
+ right queueing or blocking of SIGCHLD
+
+trap.c
+ - modify change from 1/12 to not reset the line number when running
+ the DEBUG and RETURN traps
+
+ 1/18
+ ----
+lib/sh/casemod.c
+ - change default operations to work on entire passed string instead
+ of breaking into words at non-alpha-numerics. Use new
+ CASE_USEWORDS flag to enable by-word behavior. Fixes bug reported
+ by Jan Schampera <jan.schampera@web.de>
+
+builtins/printf.def
+ - in vbprintf, bracket each call to vsnprintf (which uses the args
+ passed to vbprintf) with SH_VA_START and va_end, so we can
+ reninitialize the argument list for each call. This is actually
+ what the C standard requires. Fixes bug that caused printf -b
+ to `ignore' first % format specifier if it came first in the
+ string. Reported by David Leverton <levertond@googlemail.com>
+
+builtins/mapfile.def
+ - start the line count at 1, since it doesn't get incremented before
+ (or after) reading the first line, so things like
+ `mapfile -n 5 -c 1 -C 'echo foo' array < file' work right and call
+ the callback after the first line is read. Fixes bug reported by
+ Pierre Gaston <pierre.gaston@gmail.com>
+
+ 1/22
+ ----
+lib/readline/complete.c
+ - set _rl_interrupt_immediately non-zero before reading from the file
+ system or calling an application-defined completion function
+
+lib/readline/signals.c
+ - renamed rl_signal_handler to _rl_handle_signal; new version of
+ rl_signal_handler that just calls _rl_handle_signal (for now)
+ - new function _rl_signal_handler that calls _rl_handle_signal without
+ any checking
+
+lib/readline/rlprivate.h
+ - new extern declaration for _rl_signal_handler
+ - new define, RL_CHECK_SIGNALS, checks whether or not _rl_caught_signal
+ is set and calls _rl_signal_handler if so
+
+lib/readline/{bind,input,readline}.c
+ - add RL_CHECK_SIGNALS in appropriate places
+
+lib/readline/signals.c
+ - change rl_signal_handler to set a flag and return rather than
+ run through the entire signal handling process. If
+ _rl_interrupt_immediately is set, call the signal handling code
+ right away instead of setting the flag. Initial fix for crash
+ bug reported by Roman Rakus <rrakus@redhat.com>
+
+aclocal.m4
+ - new macro, BASH_TYPE_SIG_ATOMIC_T, tests for sig_atomic_t in
+ <signal.h>, defines as int if not defined
+
+configure.in
+ - call BASH_TYPE_SIG_ATOMIC_T
+ - call AC_C_VOLATILE
+
+config.h.in
+ - empty define for sig_atomic_t
+ - empty define for volatile
+
+ 1/27
+ ----
+subst.c
+ - audit calls to add_character and change to add_ifs_character (which
+ quotes characters in $IFS). Affects primarily `:', `=', and `~'.
+ Fixes bug reported by Jan Schampera <jan.schampera@web.de>; fix
+ suggested by Stephane Chazelas <stephane_chazelas@yahoo.fr>
+
+ 2/1
+ ---
+configure.in
+ - call AC_C_RESTRICT
+
+config.h.in
+ - add empty defintion for `restrict'
+
+pcomplete.c
+ - use unwind_protects around call to execute_shell_function in
+ gen_shell_function_matches to prevent data corruption if
+ throw_to_top_level is called. Bug report and fix from
+ werner@suse.de.
+
+execute_cmd.c
+ - don't clamp CPU usage at 100% in print_formatted_time. Bug reported
+ by Linda Walsh <bash@tlinx.org>
+
+ 2/5
+ ---
+locale.c
+ - in set_locale_var, set errno to 0 before calling setlocale(), and
+ print strerror (errno) if setlocale fails and errno ends up non-zero
+
+ 2/6
+ ---
+configure.in
+ - backed out of solaris change from 10/23/2008 (adding `-z interpose'
+ to LDFLAGS) due to solaris updates to fix a linker problem.
+ Updatted by Serge Dussud <Serge.Dussud@Sun.COM>
+
+ 2/12
+ ----
+execute_cmd.c
+ - change execute_connection so failure of a pipeline will cause the
+ shell to exit if -e is on. From discussion on austin-group
+ mailing list
+ - change execute_command_internal so failure of a user-specified
+ subshell will cause the shell to exit if -e is on. From discussion
+ on austin-group mailing list
+
+ 2/13
+ ----
+doc/{bash.1,bashref.texi}
+ - clarified description of set -e option to accurately reflect current
+ implementation
+
+ 2/19
+ ----
+print_cmd.c
+ - fix print_deferred_heredocs to not print a space if the separator
+ string is null
+ - change print_deferred_heredocs to set `was_heredoc' after printing
+ something
+ - change connection printing code to only print the `;' separator
+ if we haven't just printed a here-document
+ - change connection printing code to print any deferred here
+ documents after the rhs of the connection. Fixes bug reported by
+ Bo Andresen <bo.andresen@zlin.dk>
+
+[bash-4.0 frozen]
+
+ 2/20
+ ----
+
+[bash-4.0 released]
+
+ 2/22
+ ----
+
+parse.y
+ - fix parse_comsub to not test a character for being a possible shell
+ metacharacter if LEX_PASSNEXT flag is set. Fixes bug reported by
+ Mike Frysinger <vapier@gentoo.org>
+
+pcomplete.c
+ - add call to save_parser_state (accidentally dropped from patch) to
+ gen_shell_function_matches. Fixes bug with bash_completion and
+ file/directory completion reported by phil@Arcturus.universe
+
+Makefile.in
+ - fix assignment to LDFLAGS_FOR_BUILD to match those in subdir
+ Makefiles. Fixes bug reported by Mike Frysinger <vapier@gentoo.org>
+
+builtins/mapfile.def
+ - make sure the callback quantum (-c option argument) is > 0. Fixes
+ bug reported by Stephane Chazleas <stephane_chazelas@yahoo.fr>
+
+ 2/23
+ ----
+parse.y
+ - fix save_token_state and restore_token_state to save and restore
+ current_token. Fixes bug reported by Bernd Eggink
+ <monoped@sudrala.de>
+
+builtins/exit.def
+ - check jobs[i] before checking whether or not it's running when
+ the checkjobs option is set and we're looking for running jobs
+ at exit. Fixes bug reported by Mike Frysinger <vapier@gentoo.org>
+
+ 2/24
+ ----
+siglist.c
+ - include bashintl.h for definition of _. Fixes bug reported by
+ Greg Wooledge <wooledg@eeg.ccf.org>
+
+ 2/25
+ ----
+subst.c
+ - new function, skip_matched_pair. Similar to skip_to_delim and
+ the extract_XXX family
+ - move skipsubscript here from arrayfunc.c; re-implement in terms of
+ skip_matched_pair. Fixes bugs reported by <anmaster@tele2.se>
+
+arrayfunc.c
+ - remove skipsubscript; moved to subst.c
+
+parse.y
+ - change reset_parser to set current_token to '\n'. Rest of fix for
+ bug reported by Bernd Eggink <monoped@sudrala.de>; earlier fix on
+ 2/23
+
+ 2/26
+ ----
+builtins/declare.def
+ - when given something like array[x]=y (which sets making_array_special
+ to 1), don't convert an associative array to an indexed array (line
+ 493). Part of fix for bug reported by Pierre Gaston
+ <pierre.gaston@gmail.com>
+ - if offset == 0, indicating that we do not have a valid assignment,
+ make sure any `name' containing a `[' is a valid array reference
+ before trying to go on. Not doing this leads to creating crazy
+ variables like `name[foo[bar]=bax'. Rest of fix for bug reported
+ by Pierre Gaston <pierre.gaston@gmail.com>
+
+assoc.c
+ - change assoc_to_assign to single-quote the array keys if `quoted' is
+ non-zero. Makes things easier to read with weird characters in the
+ key
+
+parse.y
+ - fix parse_comsub to not set LEX_HEREDELIM when it sees "<<<". Fixes
+ bug reported by Mike Frysinger <vapier@gentoo.org>
+
+ 2/27
+ ----
+parse.y
+ - fix report_syntax_error to set last_command_exit_value to
+ EX_BADUSAGE (2) instead of EX_USAGE (258), since there's nothing
+ that will translate that to something < 128 before reading the
+ next command. Partial fix for bug reported by Mike Frysinger
+ <vapier@gentoo.org>
+
+sig.c
+ - fix sigint_sighandler to set last_command_exit_value to sig+128
+ before calling throw_to_top_level. Rest of fix for bug reported
+ by Mike Frysinger <vapier@gentoo.org>
+
+jobs.c
+ - if fork() fails, set last_command_exit_value to 126 before calling
+ throw_to_top_level
+
+execute_cmd.c
+ - defer calling unlink_fifo_list in parent branch of
+ execute_disk_command if we're executing in a shell function
+ - change execute_function to call unlink_fifo_list before returning
+ if it's the top-level function
+
+ 3/2
+ ---
+builtins/read.def
+ - if read times out, make sure we remove the top element from the
+ unwind-protect stack (the free of input_string) and run the rest,
+ to reset the tty and readline and alarm states. Then we jump to
+ assigning the variables to any partial input. Fixes bug reported
+ by Christopher F. A. Johnson <cfajohnson@gmail.com>
+
+ 3/3
+ ---
+parse.y
+ - break comment checking code into a common COMMENT_BEGIN define so
+ we can use it in multiple places in parse_comsub
+ - in parse_comsub, don't alter the LEX_RESWDOK flag if we read a
+ `#' and we're checking comments, even though `#' isn't a `shell break'
+ character. Fixes bug reported by Mike Frysinger <vapier@gentoo.org>
+
+braces.c
+ - in expand_seqterm, decrease the total length of the rhs by the length
+ of any (optional) increment, so we don't end up with unwanted zero
+ padding because the rhs length is wrong. Fixes bug reported by
+ Carl Albing <albing@comcast.net>
+
+ 3/4
+ ---
+doc/{bash.1,bashref.texi}
+ - changes to clean up some of the language describing the effects of
+ terminal process groups on the ability to read from and write to
+ the terminal
+
+ 3/5
+ ---
+support/shobj-conf
+ - add host_vendor to string tested in switch to handle things like
+ gentoo/freebsd
+ - beginning with version 7, FreeBSD no longer has /usr/bin/objformat
+ or a.out binaries and libraries. It's always ELF. Fix from
+ Timothy Redaelli <drizzt@gentoo.org>
+
+parse.y
+ - in parse_comsub, allow comments if we are ready to read a
+ reserved word (tflags & LEX_RESWDOK), haven't read anything from
+ one yet (lex_rwlen == 0) and the current character is a '#'
+
+ 3/6
+ ---
+parse.y
+ - new lex flag for parse_comsub: LEX_INWORD. Turn it off when
+ we see a shell break character; turn it on or keep it on when
+ not a break character. Keep track of word length (reset to 0
+ when we turn on LEX_INWORD when it was off).
+ - don't use COMMENT_BEGIN in parse_comsub any more; test
+ whether or not LEX_INWORD is set and lex_wlen == 0 in addition
+ to tests for LEX_RESWDOK and lex_rwlen. Comments are valid
+ when at the start of a word
+ - move LEX_PASSNEXT code to the top of parse_comsub, so the rest
+ of the function doesn't have to check for the flag at different
+ places
+
+ 3/7
+ ---
+parse.y
+ - in parse_comsub, when looking for a reserved word (LEX_RESWDOK
+ non-zero), and in a case statement, we can see either an esac
+ or a pattern list. We handle an esac separately. We should
+ turn off LEX_RESWDOK if we see anything but a newline, since
+ we'll be reading a pattern list. Other part of fix for bug
+ reported by Mike Frysinger <vapier@gentoo.org> (rest of fix
+ on 3/3)
+
+ 3/10
+ ----
+{.,lib/readline}/doc/fdl.texi
+ - updated to FDL version 1.3
+
+ 3/11
+ ----
+parse.y
+ - when using the |& construct with a simple command preceding it, add
+ the implicit redirection to the simple command's redirection list,
+ since the redirections associated with the command struct are never
+ executed. Fixes bug reported by Matt Zyzik <Matt@ice.filescope.com>
+
+ 3/14
+ ----
+execute_cmd.c
+ - in execute_case_command, if ;& is used with no following pattern
+ list, make sure we don't reference a NULL pointer. Bug report and
+ fix from Clark Jian Wang <dearvoid@gmail.com>
+
+parse.y
+ - make parser_state global, so other files can use it
+ - command_word_acceptable now returns non-zero if PST_REDIRLIST bit
+ set in parser_state, so we accept assignment statements and
+ perform alias expansion. Fix for bug reported by Vincent
+ Lefevre <vincent@vinc17.org> (2/24/2009)
+
+parser.h
+ - add PST_REDIRLIST flag, notes that parser is currently parsing a
+ redirection list preceding a simple command
+
+make_cmd.c
+ - make_simple_command now turns on PST_REDIRLIST in parser_state when
+ creating a new simple command
+ - make_simple_command turns off PST_REDIRLIST in parser_state if it
+ adds a non-redirection to the command it's building
+ - clean_simple_command turns off PST_REDIRLIST to make sure it's off
+
+subst.c
+ - new flag for param_expand: PF_IGNUNBOUND, means to not exit if the
+ variable is unbound even if `set -u' is enabled
+ - change param_expand to not call err_unboundvar if the `pflags'
+ argument has the PF_IGNUNBOUND bit set
+ - parameter_brace_expand_word now takes an extra `pflags' argument to
+ pass down to param_expand; changed callers
+ - changed call to parameter_brace_expand_word in parameter_brace_expand
+ to add PF_IGNUNBOUND flag so ${@:-foo} doesn't cause the shell to
+ exit (but ${@} does) when there are no positional parameters. Fixes
+ Debian bug 519165 from Dan Jacobson <jidanni@jidanni.org>
+
+parse.y
+ - add code to parse_comsub to allow here-documents within command
+ substitutions to be delimited by the closing right paren, with the
+ usual warning about here documents delimited by EOF on execution.
+ Fixes regression from bash-3.2 noted in Red Hat bugzilla 485664 by
+ Ralf Corsepius
+
+ 3/15
+ ----
+subst.c
+ - string_list_dollar_at now checks for Q_PATQUOTE, which getpattern()
+ uses to denote Q_DOUBLE_QUOTES (?). Fixes a=abcd echo "${a#$*}"
+ when IFS= and args are `a b' as noted by Stephane Chazleas
+ <stephane_chazelas@yahoo.fr>
+ - param_expand now checks for Q_PATQUOTE and treats it identically
+ to Q_DOUBLE_QUOTES when expanding $*
+ - expand_word_unsplit now sets W_NOSPLIT in the flags of the word it
+ passes to expand_word_internal if $IFS is NULL
+ - expand_word_leave_quoted now sets expand_no_split_dollar_star and
+ the W_NOSPLIT bit in the word flags before calling
+ expand_word_internal if $IFS is NULL, just like expand_word_unsplit.
+ It is now virtually identical to expand_word_unsplit. Rest of fix for
+ problems reported by Stephane Chazleas <stephane_chazelas@yahoo.fr>
+
+ 3/20
+ ----
+trap.c
+ - in _run_trap_internal, don't pass SEVAL_RESETLINE as flag to
+ parse_and_execute if running the ERR trap (further modification
+ of change from 1/12)
+
+execute_cmd.c
+ - in execute_simple_command, set line_number to line_number_for_err_trap
+ before calling run_error_trap. Part of fix for bug reported by
+ Brian J. Murrell <brian@interlinx.bc.ca>
+ - change other places calling run_error_trap() to set and use
+ line_number_for_err_trap
+
+ 3/21
+ ----
+builtins/fc.def
+ - Even though command substitution through parse_and_execute turns
+ off remember_on_history, command substitution in a shell when
+ set -o history has been enabled (interactive or not) should use it
+ in the last_hist calculation as if it were on. Same calculation
+ in fc_gethnum and fc_builtin. Fixes bug reported by
+ Ian Kelling <smallnow@gmail.com>
+
+sig.c
+ - change termsig_sighandler to terminate immediately if it gets called
+ twice with the same signal before termsig_handler gets called. This
+ fixes the `looping on SIGSEGV' phenomenon reported by Linux users.
+
+parse.y
+ - in read_secondary_line, don't try to add NULL lines to the history
+ list. Report and patch from Lubomir Rintel <lkundrak@v3.sk>
+
+ 3/22
+ ----
+sig.c
+ - Augment change from 3/21 with explicit check for signals we *don't*
+ want this to happen for. Patch from Lubomir Rintel <lkundrak@v3.sk>
+
+ 3/28
+ ----
+array.c
+ - in array_reference, return NULL immediately if the desired index
+ is larger than the maximum
+ - add cache of last array referenced and last array element referenced;
+ use in array_reference to optimize case of sequential access;
+ invalidated where necessary in other functions
+ - array_rshift needs to set max_index to 0 if the array was empty
+ before shifting in the new element 0
+ - array_shift needs to use element_index(a->head->prev) to set the
+ max_index, not a simple decrement, to deal with sparse arrays
+
+ 4/1
+ ---
+bashline.c
+ - in bash_dequote_filename, return right away after copying the
+ backslash if the last character in the string to be expanded
+ is a backslash. The old code copied an extra NUL and overwrote
+ the bounds checking. Fixes bug reported by Shawn Starr
+ https://bugzilla.redhat.com/show_bug.cgi?id=488649
+
+ 4/3
+ ---
+subst.c
+ - in pat_subst.c, make sure to copy one character from the input
+ string in the case of a null pattern match, since we substitute
+ on the null match and then increment past the current character.
+ Not doing this means that each character of the original string
+ is replaced because of the null matches. Fixes debian bug
+ reported bhy Louis-David Mitterrand <ldm@apartia.fr>
+ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522160
+
+lib/sh/winsize.c
+ - incorporate contents of readline/rlwinsize.h to get all the various
+ system dependencies right when trying to find TIOCGWINSZ. Fixes
+ bug reported by Dan Price <dp@eng.sun.com>
+
+ 4/6
+ ---
+doc/{bash.1,bashref.texi}
+ - fix description of conditional `>' and `<' to remove statement that
+ the comparison pays attention to the current locale -- it has
+ always used strcmp
+
+lib/glob/glob.c
+ - fixed a bug in glob_filename that caused glob_dir_to_array to be
+ called to prepend a (globbed) directory name onto the results from
+ glob_vector, which, if we were globbing `**', glob_vector has
+ already done. Effect is to have the directory name(s) on there
+ twice. Fixes "dir*/**" bug reported by Matt Zyzik
+ <Matt@ice.filescope.com>
+
+ 4/8
+ ---
+doc/{bash.1,bashref.texi}
+ - fix short syntax summary of for command to reflect full bash
+ syntax (which is a superset of Posix syntax). Fixes bug reported
+ by Reuben Thomas <rrt@sc3d.org>
+
+ 4/10
+ ----
+{expr,subst}.c
+ - make sure last_command_exit_value is set to EXECUTION_FAILURE
+ before calling err_unboundvar, in case set -e is enabled and
+ the shell exits from there. Fixes bug reported by Freddy
+ Vulto <fvulto@gmail.com> and Piotr Zielinski
+ <piotr.zielinski@gmail.com>
+
+ 4/11
+ ----
+jobs.c
+ - in restore_pipeline, don't call discard_pipeline with a NULL
+ argument
+
+trap.c
+ - in run_debug_trap, make sure to save and restore the pipeline,
+ pipeline_pgrp, and state of the pipeline around running the debug
+ trap, then remove any job created by running the debug trap from
+ the jobs table when it completes. Fixes for two bugs reported
+ by lex@upc.ua
+
+ 4/12
+ ----
+lib/readline/signals.c
+ - new functions to block and release SIGWINCH like the SIGINT blocking
+ and releasing functions
+
+lib/readline/rlprivate.h
+ - new extern declarations for _rl_block_sigwinch and _rl_release_sigwinch
+
+lib/readline/display.c
+ - block SIGWINCH during redisplay like SIGINT. Should fix bug reported
+ by Nicolai Lissner <nlissne@linux01.org>
+
+ 4/13
+ ----
+lib/readline/readline.h
+ - new readline state variable: RL_STATE_REDISPLAYING
+
+lib/readline/display.c
+ - in rl_redisplay, don't block SIGWINCH during redisplay; just set
+ the REDISPLAYING state
+
+lib/readline/terminal.c
+ - in rl_resize_terminal, don't call rl_redisplay_after_sigwinch() if
+ we're already in the middle of redisplay (RL_STATE_REDISPLAYING).
+ Fix for bug reported by Nicolai Lissner <nlissne@linux01.org>
+
+ 4/15
+ ----
+parse.y
+ - fix parse_comsub to add check for \n when seeing whether the current
+ character can change to a state where a reserved word is legal,
+ since it is not a shell meta character. Fixes bug reported by
+ Bernd Eggink <monoped@sudrala.de>.
+
+ 4/17
+ ----
+jobs.c
+ - new functions to save and restore the pgrp_pipe (since there's only
+ one): save_pgrp_pipe and restore_pgrp_pipe
+
+trap.c
+ - run_debug_trap now saves and restores the pgrp_pipe before and
+ after calling the debug trap
+ - run_debug_trap now makes sure the terminal is owned by the pipeline
+ pgrp after the debug trap runs. Rest of fix for bug reported by
+ Oleksly Melnyk <o.melnyk@upc.ua> (lex@upc.ca)
+
+ 4/19
+ ----
+include/posixselect.h
+ - new include file, encapsulates select(2) includes and defines for
+ bash and readline. Inspired by patch from Mike Frysinger
+ <vapier@gentoo.org>
+
+lib/sh/input_avail.c
+ - include "posixselect.h"
+
+lib/readline/{input,parens}.c
+ - include "posixselect.h" instead of using inline includes
+ - use new USEC_TO_TIMEVAL define to make sure that values for timeouts
+ greater than one second are handled properly
+
+lib/sh/fpurge.c
+ - updated implementation, taken from gnulib
+
+ 4/21
+ ----
+lib/glob/glob.c
+ - in finddirs, don't try to free a return value of glob_error_return
+ from glob_vector. Bug and fix from werner@suse.de
+
+lib/readline/signals.c
+ - in rl_echo_signal_char, check that SIGQUIT and SIGTSTP are defined
+ before trying to use them. Bug report and fix from Volker Grabsch
+ <vog@notjusthosting.com>
+
+ 4/24
+ ----
+aclocal.m4
+ - add conditional inclusion of <stdint.h> to BASH_CHECK_TYPE
+
+bashtypes.h,lib/sh/strto[iu]max.c
+ - include <stdint.h> if present for any existing declaration of
+ intmax_t and uintmax_t. Fixes Interix problem reported by
+ Markus Duft <mduft@gentoo.org>
+
+lib/sh/strindex.c,externs.h,builtins/common.h
+ - renamed strindex to strcasestr to agree with other implementations
+ (e.g., BSD, MacOS X, gnulib); changed callers
+
+lib/sh/{strindex.c,Makefile.in},Makefile.in
+ - renamed strindex.c to strcasestr.c
+
+configure.in
+ - add strcasestr to call to AC_REPLACE_FUNCS, take advantage of
+ existing libc implementations
+
+config.h.in
+ - add define for HAVE_STRCASESTR
+
+lib/sh/mbscmp.c
+ - fix mbscmp to return correct values when the strings do not contain
+ valid multibyte characters. Ideas from gnulib
+
+xstrchr.c
+ - only compare current character against C if mblength == 1
+
+{shell,variables}.c
+ - changed some xstrchr calls back to strchr when the arguments cannot
+ contain multibyte characters
+
+lib/sh/{xstrchr.c,Makefile.in},Makefile.in
+ - renamed xstrchr to mbschr; renamed file to mbschr.c
+
+aclocal.m4
+ - change BASH_CHECK_MULTIBYTE to use AC_REPLACE_FUNCS(mbschr)
+
+externs.h
+ - extern declarations for mbscmp and mbschr, conditional on the usual
+ HAVE_MBSCMP and HAVE_MBSCHR defines
+
+general.h,{alias,arrayfunc,bashline,general,execute_cmd,subst}.c
+ - changed calls to xstrchr to mbschr
+
+doc/bash.1
+ - use `pathname expansion' consistently, not `filename expansion' or
+ `filename generation'
+
+doc/bashref.texi
+ - use the phrase `filename expansion' consistently (since this is
+ what the Gnu people prefer) instead of `pathname expansion' or
+ `filename generation'
+
+aclocal.m4,config.h.in
+ - check for mbscasecmp in BASH_CHECK_MULTIBYTE, define HAVE_MBSCASECMP
+ if found
+
+lib/sh/{mbscasecmp.c,Makefile.in}
+ - new file, case-insensitive multibyte string comparison
+
+externs.h
+ - extern declaration for mbscasecmp
+
+ 4/25
+ ----
+lib/readline/display.c
+ - in _rl_move_cursor_relative, don't adjust dpos by woff if it's
+ already less than woff (don't want it less than 0)
+ - in _rl_move_cursor_relative, short-circuit right away if the cursor
+ is at columns 0 and `new' is 0 (doesn't matter if it's a multibyte
+ locale or not, or whether there are invisible chars in the prompt)
+ - in _rl_move_cursor_relative, go ahead and adjust dpos if
+ prompt_physical_chars >= _rl_screenwidth (previous check was just > )
+ Fixes bug reported by Andreas Schwab <schwab@linux-m68k.org>
+
+ 4/28
+ ----
+lib/glob/glob.c
+ - in glob_vector, don't add an empty pathname ("") if we're adding the
+ currect directory to the dirlist and GX_NULLDIR is set -- we can just
+ ignore it, since the passed directory name (".") was created by
+ the caller. Fixes bug reported by Matt Zyzik <matt.zyzik@nyu.edu>
+
+ 5/5
+ ---
+subst.c
+ - make expansion of $@ and $* when set -u is in effect and there are
+ no positional parameters be a non-fatal error. This is the
+ consensus of the austin group, though it is not historical practice.
+ Message from Geoff Clare <20090505091501.GA10097@squonk.masqnet> of
+ 5 May 2009 and http://austingroupbugs.net/view.php?id=155
+
+
+ 5/20
+ ----
+lib/glob/glob.c
+ - tentative fix to glob_filename to compensate for glob_vector putting
+ null pathname at front of result vector when dflags&GX_NULLDIR.
+ Current fix manually removes empty string element from front of
+ result vector; a better fix would be to use a flag so glob_vector
+ doesn't add it at all. Augments patch from 4/28, which appears to
+ have broken some things. Fixes bug reported by Matt Zyzik
+ <matt.zyzik@nyu.edu>
+
+ 5/22
+ ----
+
+lib/glob/glob.c
+ - better fix for glob_filename; supersedes patch of 5/20. Now the
+ code does not set GX_ADDCURDIR if directory_len == 0 and the
+ function has not been called recursively ((flags & GX_ALLDIRS) == 0).
+ Better fix for bug reported by Matt Zyzik <matt.zyzik@nyu.edu>
+
+Makefile.in
+ - fix build race condition that occurs in some makes caused by
+ libreadline.a and libhistory.a containing some of the same files
+ (e.g., xmalloc.o) and conflicting when trying to build both at
+ the same time. Reported by Mike Frysinger <vapier@gentoo.org>
+
+ 5/25
+ ----
+lib/readline/vi_mode.c
+ - fix _rl_vi_initialize_line so that the loop counter is not
+ unsigned (it doesn't matter, but it eliminates a compiler warning).
+ Bug reported by Dave Caroline <dave.thearchivist@gmail.com>
+
+ 5/26
+ ----
+doc/{bash.1,bashref.texi}
+ - add text to the description of array variables making it clear
+ that an array variable is not considered set until a subscript
+ has been assigned a value
+
+ 5/29
+ ----
+lib/readline/text.c
+ - fix rl_change_case to handle case where mbrtowc doesn't find a
+ valid multibyte character
+
+lib/readline/vi_mode.c
+ - fix _rl_vi_change_mbchar_case to handle case where mbrtowc doesn't
+ find a valid multibyte character
+
+lib/sh/casemod.c
+ - fix sh_modcase to handle case where mbrtowc doesn't find a valid
+ multibyte character
+
+lib/readline/mbutil.c
+ - fix _rl_find_next_mbchar_internal to not call mbrtowc at the end of
+ the string, since implementations return different values -- just
+ break the loop immediately
+
+lib/readline/display.c
+ - fix rl_redisplay to make same sort of cursor position adjustments
+ based on multibyte locale and _rl_last_c_pos when performing
+ horizontal scrolling rather than line wrapping. Probably still
+ more to do. Fixes bug reported by jim@jim.sh
+
+ 6/5
+ ---
+doc/{bash.1,bashref.texi}
+ - added some more explanation of the inheritance of the ERR trap at
+ the suggestion of Thomas Pospisek <tpo@sourcepole.ch>
+
+findcmd.c
+ - use eaccess(2) if available in file_status to take other file
+ access mechanisms such as ACLs into account. Patch supplied
+ by werner@suse.de
+
+ 6/12
+ ----
+xmalloc.c
+ - also calculate lowest brk() value the first time xmalloc/xrealloc
+ (and their sh_ counterparts) are called
+ - error messages consolidated into a single function (allocerr/
+ sh_allocerr) to avoid string duplication
+
+ 6/16
+ ----
+variables.c
+ - changes to allow variables.c to be compiled if ALIAS is not defined.
+ Bug and fix from John Gatewood Ham <uraphalinuxserver@gmail.com>
+
+lib/sh/getcwd.c
+ - fix so systems defining BROKEN_DIRENT_D_INO have the necessary
+ defines. Fix from Jay Krell <jay.krell@cornell.edu>
+
+configure.in
+ - add -D_ALL_SOURCE to interix CFLAGS for struct timezone definition.
+ Bug and fix from John Gatewood Ham <uraphalinuxserver@gmail.com>
+
+ 6/29
+ ----
+variables.c
+ - change initialize_shell_variables to add environment variables with
+ invalid names to the variables hash table, but marking them as
+ invisible and imported
+ - new function, export_environment_candidate. Used when creating the
+ export environment for commands to include variables with invalid
+ names inherited from the initial environment. Apparently this
+ behavior is widespread
+ - change make_var_export_array to use export_environment_candidate
+ rather than visible_and_exported to test variables for inclusion
+ in the export environment
+
+ 7/1
+ ---
+builtins/read.def
+ - fix a memory leak where the number of fields is not the same as
+ the number of variables passed to `read'. Bug report from
+ werner@suse.de
+
+builtins/command.def
+ - move section of code that sets PATH from -p option before the
+ verbose-handling section, so command -v and command -V honor
+ the PATH set by command -p. Bug report and fix from
+ ohki@gssm.otsuka.tsukuba.ac.jp
+
+ 7/9
+ ---
+subst.c
+ - change brace_expand_word_list to defer brace expansion on compound
+ array assignments that are arguments to builtins like `declare',
+ deferring the expansion until the assignment statement is processed.
+ Fixes inconsistency reported by agriffis@n01se.net
+
+ 7/16
+ ----
+bashline.c
+ - fix bash_execute_unix_command to set rl_point correctly based on
+ READLINE_POINT. The old method of using save_point will not
+ work because maybe_make_readline_line will change rl_point. Bug
+ reported by Henning Bekel <h.bekel@googlemail.com>
+
+trap.c
+ - fix _run_trap_internal and run_pending_traps to save and restore
+ value of subst_assign_varlist so the dispose_words on it doesn't
+ leave dangling pointers after the trap handler runs. Fixes bug
+ reported by Marc Herbert <marc.herbert@gmail.com>
+
+ 7/22
+ ----
+subst.c
+ - fix off-by-one error in pos_params when computing positional
+ parameters beginning with index 0. Bug and fix from Isaac Good
+ <isaacgood@gmail.com>
+
+ 7/24
+ ----
+lib/readline/display.c
+ - add code to _rl_move_cursor_relative and _rl_col_width to short-
+ circuit a few special cases: prompt string and prompt string plus
+ line contents, both starting from 0. Saves a bunch of calls to
+ multibyte character functions using already-computed information.
+ As a side effect, fixes bug reported by Lasse Karkkainen
+ <tronic+8qug@trn.iki.fi>
+
+subst.c
+ - fixed a problem in split_at_delims that could leave *cwp set to -1
+ if the line ends in IFS whitespace and SENTINEL is one of those
+ whitespace characters. Fixes problem with setting COMP_CWORD for
+ programmable completion reported by Ville Skytta <ville.skytta@iki.fi>
+
+bashline.c
+ - change bash_execute_unix_command to clear the current line (if the
+ terminal supplies the "ce" attribute) instead of moving to a new
+ line. Inspired by report from Henning Bekel <h.bekel@googlemail.com>
+
+builtins/printf.def
+ - changes to allow printf -v var to assign to array indices, the way
+ the read builtin can. Suggested by Christopher F. A. Johnson
+ <cfajohnson@gmail.com>
+
+lib/readline/complete.c
+ - fix rl_old_menu_complete and rl_menu_complete to appropriately set
+ and unset RL_STATE_COMPLETING while generating the list of matches.
+ Fixes debian bug #538013 reported by Jerome Reybert
+ <jreybert@gmail.com>
+
+ 7/25
+ ----
+execute_cmd.c
+ - change execute_builtin to temporarily turn off and restore the ERR
+ trap for the eval/source/command builtins in the same way as we
+ temporarily disable and restore the setting of the -e option.
+ Fixes bug reported by Henning Garus <henning.garus@googlemail.com>
+
+ 7/27
+ ----
+shell.c
+ - add fflush(stdout) and fflush(stderr) to exit_shell before closing
+ any file descriptors at exit time (e.g., coproc pipes)
+
+ 7/30
+ ----
+lib/readline/complete.c
+ - new function rl_backward_menu_complete, just passes negative count
+ argument to rl_menu_complete
+ - change rl_menu_complete to act appropriately if rl_last_command is
+ rl_backward_menu_complete, so we can cycle forward and backward
+ through the list of completions
+
+lib/readline/doc/{readline.3,rluser.texi},doc/bash.1
+ - document new "menu-complete-backward" bindable readline function.
+ Suggested by Jason Spiro <jasonspiro04@gmail.com>
+
+lib/readline/vi_keymap.c
+ - add binding of C-n to menu-complete and C-p to menu-complete-backward
+ in vi-insert keymap, as suggested by Jason Spiro
+ <jasonspiro04@gmail.com>
+
+pcomplete.c
+ - fixed a bug in programmable_completions: the options it returned from
+ the compspec it found were set before generating the completions,
+ which meant that any changes made by "compopt" were overridden and
+ only in effect for the duration of the executing shell function
+ rather than the entire completion. Fixes bug reported by Ville
+ Skytta <ville.skytta@iki.fi>
+
+ 7/31
+ ----
+lib/readline/keymaps.c
+ - fixed memory leak in rl_discard_keymap by freeing storage associated
+ with hierarchical keymaps
+ - new convenience function, rl_free_keymap, that calls rl_discard_keymap
+ and frees the keymap passed as an argument
+
+lib/readline/util.c
+ - new bindable keymap function, _rl_null_function, to be used internally
+
+lib/readline/rlprivate.h
+ - extern declaration for _rl_null_function
+
+lib/readline/bind.c
+ - fix rl_generic_bind in the case where we are trying to override a
+ keymap with a null function (e.g., when trying to unbind it). We
+ can't use a NULL function pointer in ANYOTHERKEY since that's
+ indistinguishable from the keymap not having been overridden at all.
+ We use _rl_null_function instead, which simply does nothing. We
+ could add an rl_ding to it later. Fixes problem with hitting ESC
+ repeatedly while in vi command mode reported by James Rowell
+ <jrjimmy801-misc1@yahoo.com>
+
+builtins/bind.def
+ - call rl_bind_keyseq instead of rl_set_key for -r option
+
+lib/readline/readline.c
+ - Set vi_movement_keymap[ESC] to _rl_null_function after binding the
+ arrow keys in bind_arrow_keys() to allow vi-mode users to hit ESC
+ multiple times in vi command mode while still allowing the arrow
+ keys to work
+
+ 8/2
+ ---
+bashline.c
+ - fix clear_hostname_list by setting hostname_list_initialized to 0
+ after freeing all list members. Fixes bug reported by Freddy
+ Vulto <fvulto@gmail.com>
+
+lib/readline/display.c
+ - in update_line, if we copy data from one line to another because we
+ are wrapping a multibyte character from, say, the first line to the
+ second, we need to update OMAX and the line indices to account for
+ the moved data. Bug report and fix from Martin Hamrle
+ <martin.hamrle@gmail.com>
+
+ 8/3
+ ---
+pcomplete.h
+ - defines for EMPTYCMD ("_EmptycmD_") and DEFAULTCMD ("_DefaultCmD_")
+
+builtins/complete.def
+ - change compopt_builtin to make -E work on the "empty" command
+ completion
+ - fix print_compitem and print_compopts to replace EMPTYCMD with -E
+ - added -D (default) option to complete/compgen/compopt. No supporting
+ code yet
+
+doc/bash.1,lib/readline/doc/rluser.texi
+ - document new -D, -E options to compopt
+ - document new -D option to complete/compgen
+
+shell.h
+ - new define, EX_WEXPCOMSUB, value of 125
+ - new define, EX_RETRYFAIL, value of 124 (for programmable completion)
+
+subst.c
+ - use EX_WEXPCOMSUB instead of literal 125 as exit status when a shell
+ invoked to run wordexp(3) with the -n option supplied attempts a
+ command substitution
+
+pcomplete.c
+ - new define, PCOMP_RETRYFAIL, used to indicate a "failure, retry with
+ next completion" status to the programmable completion code
+
+ 8/4
+ ---
+pcomplete.c
+ - changed gen_shell_function_matches to take an extra parameter
+ indicating whether the specified shell function was not found or
+ returned the special "fail/retry" status, and, if it was either,
+ to not bother returning any matches list
+ - changed gen_compspec_completions to take an extra parameter to pass
+ through the "found" status from gen_shell_function_completions
+ - new function gen_progcomp_completions to take care of searching for
+ and evaluating a compspec for a particular word, saving its status,
+ and returning to its caller (programmable_completions) whether or
+ not to retry completion. This function also checks whether a
+ retry changed the compspec associated with a command and short-
+ circuits the retry if it has not
+ - changed programmable_completions to try default completion (if set)
+ if a specific completion was not found for a command
+ - changed programmable_completions to implement "fail/retry" semantics
+ for a shell function that returns 124 and changes the compspec
+ associated with the command. All based on proposal and changes from
+ Behdad Esfahbod (Red Hat bugzilla 475229)
+
+doc/bash.1,lib/readline/doc/rluser.texi
+ - documented new dynamic programmable completion functionality
+
+ 8/5
+ ---
+stringlib.c
+ - first argument to substring() is now `const char *'
+
+externs.h
+ - changed extern declaration for substring()
+
+subst.c
+ - skipsubscript now takes a third FLAGS argument, passes to
+ skip_matched_pair
+ - skip_matched_pair now interprets flags&1 to mean not to parse
+ matched pairs of quotes, backquotes, or shell word expansion
+ constructs
+
+{subst,general,expr}.c
+ - changed skipsubscript() callers
+
+assoc.c
+ - changed assoc_to_assign to double-quote the key if it contains any
+ shell metacharacters
+
+arrayfunc.c
+ - use skipsubscript in quote_assign rather than quote any glob
+ characters in the subscript of an array assignment
+ - in assign_compound_array_list, call skipsubscript with a flags
+ argument of 1 if assigning an associative array to avoid trying
+ to re-parse quoted strings
+
+redir.c
+ - set expanding_redir before expanding body of here documents and
+ here strings to avoid looking for variables in temporary env
+
+ 8/7
+ ---
+lib/readline/readline.c
+ - in _rl_dispatch_callback, return value of -3 means that we have
+ added to a key sequence, but there are previous matches in the
+ sequence. Don't call _rl_subseq_result if we get a -3 from a
+ previous context in the chain; just go back up the chain. Report
+ and fix from <freehaha@gmail.com>
+
+bashline.c
+ - fixes to history_completion_generator and bash_dabbrev_expand to
+ make dabbrev-expand inhibit suppressing of appending space char
+ to matches. Have to do it with the generator too because
+ rl_menu_complete turns off suppressing the appended space in
+ set_completion_defaults(). Suggestion from Dan Nicolaescu
+ <dann@ics.uci.edu>
+ - suppress completion match sorting in bash_dabbrev_expand by
+ setting rl_sort_completion_matches = 0. Suggestion from Dan
+ Nicolaescu <dann@ics.uci.edu>
+ - don't qsort history match list in build_history_completion_array
+ if dabbrev_expand_active == 1
+ - start the loop in build_history_completion_array that gathers words
+ from history for possible completions from the end of the list
+ rather than the beginning. It doesn't matter where you start if
+ the results are sorted, and dabbrev-expand is supposed to offer
+ the most recent completions first
+
+ 8/12
+ ----
+execute_cmd.c
+ - change to execute_command_internal to make [[ ... ]] conditional
+ command subject to settings of `set -e' and the ERR trap
+
+ 8/14
+ ----
+execute_cmd.c
+ - change to execute_command_internal to make (( ... )) arithmetic
+ command subject to settings of `set -e' and the ERR trap
+
+lib/readline/text.c
+ - new bindable function, rl_skip_csi_sequence, reads the characters
+ that make up a control sequence as defined by ECMA-48. Sequences
+ are introduced by the Control Sequence Indicator (CSI) and
+ contain a defined set of characters. Insert, End, Page Up and so
+ on are CSI sequences. Report and code from Andy Koppe
+ <andy.koppe@gmail.com>
+
+lib/readline/readline.h
+ - extern declaration for rl_skip_csi_sequence
+
+lib/readline/funmap.c
+ - new bindable command "skip-csi-sequence", runs rl_skip_csi_sequence
+
+doc/bash.1,lib/readline/doc/{readline.3,rluser.texi}
+ - documented new bindable command "skip-csi-sequence", unbound by
+ default
+
+builtins/evalfile.c
+ - fix _evalfile to remove embedded null bytes from the file read
+ into the string. Report and proposed fix from Roman Rakus
+ <rrakus@redhat.com>
+
+{configure,config.h}.in
+ - check for syslog(3), define HAVE_SYSLOG
+ - check for syslog.h, define HAVE_SYSLOG_H
+
+config-top.h
+ - new define SYSLOG_HISTORY, disabled by default
+
+config-bot.h
+ - if HAVE_SYSLOG or HAVE_SYSLOG_H are not defined, undef SYSLOG_HISTORY
+
+bashhist.c
+ - if SYSLOG_HISTORY is defined, call bash_syslog_history with the
+ line added to the history in bash_add_history.
+ - new function, bash_syslog_history(line), sends line to syslog at
+ user.info. The line is truncated to send no more than 600
+ (SYSLOG_MAXLEN) bytes to syslog. Feature requested by many, and
+ required by some national laws
+
+sig.c
+ - in termsig_handler, resend SIGHUP to children if subshell_environment
+ indicates we're a shell performing command or process substitution
+
+jobs.c
+ - add CHECK_TERMSIG calls to wait_for in addition to the ones in
+ waitchld()
+
+builtins/shopt.def
+ - new functions set_bashopts, parse_bashopts, and initialize_bashopts
+ to manage new environment variable $BASHOPTS, like $SHELLOPTS but
+ for shopt options
+ - change toggle_shopts to call set_bashopts after setting options, so
+ $BASHOPTS reflects new values
+
+shell.c
+ - call initialize_bashopts after calling initialize_shell_options at
+ shell startup
+
+configure.in
+ - new configure `enable' option --enable-exended-glob-default, to
+ set the initial default value of the `extglob' shell option
+
+config.h
+ - new define, EXTGLOB_DEFAULT, controlled by the `extended-glob-default'
+ configure option
+
+pathexp.c
+ - initialize extended_glob variable to EXTGLOB_DEFAULT
+
+doc/{bash.1,bashref.texi}
+ - document new $BASHOPTS variable and its behavior
+
+doc/bashref.texi
+ - document new --enable-extended-glob-default configure option
+
+ 8/16
+ ----
+print_cmd.c
+ - new variables: xtrace_fd and xtrace_fp, the file descriptor and
+ FILE * to which we send `set -x' tracing output. If fd == -1
+ then fp == STDERR, the default mode
+ - new function xtrace_init, sets xtrace_fd == -1 and xtrace_fp = stderr
+ - new function xtrace_set (fd, fp), sets xtrace_fd and xtrace_fp
+ to the arguments
+ - new function xtrace_reset, handles closing old xtrace fd/fp and
+ moving them back to -1/stderr
+ - new function xtrace_fdchck, calls xtrace_reset if the fd passed as
+ an argument is xtrace_fd
+ - change xtrace functions to fprintf to xtrace_fp instead of stderr
+
+shell.c
+ - call xtrace_init() very early in main()
+
+variables.c
+ - new special variable, BASH_XTRACEFD, holds file descriptor used for
+ set -x trace output. Inspired by suggestion from Bruce Korb
+ <bruce.korb@gmail.com>
+
+doc/{bash.1,bashref.texi}
+ - added description of new BASH_XTRACEFD variable
+
+redir.c
+ - add calls to xtrace_fdchk to the redirections that close file
+ descriptors, so we notice if we close BASH_XTRACEFD and compensate
+ accordingly (same places that call coproc_fdchk())
+
+ 8/18
+ ----
+lib/readline/text.c
+ - change to _rl_replace_text to add error checks: start must be <=
+ end, and we don't call rl_insert_text if passed the empty string
+
+config.h.in
+ - add define for HAVE_ICONV, already found by intl autoconf macros
+ - add define for HAVE_LOCALE_CHARSET
+
+aclocal.m4
+ - add check for locale_charset() to BASH_CHECK_MULTIBYTE
+
+lib/sh/fnxform.c
+ - new file with two public function: fnx_tofs and fnx_fromfs.
+ Primarily intended for use on MacOS X, they use iconv to convert
+ between whatever the current locale encoding is and "UTF-8-MAC",
+ a special encoding on OS X in which all characters are
+ decomposed unicode, as the HFS+ filesystem stores them. These
+ functions return a pointer to a local buffer, allocated once and
+ resized as necessary, to avoid too many allocations; callers
+ should not free the return value, since it may be the string
+ passed
+
+Makefile.in
+ - make sure LIBICONV is set by autoconf (@LIBICONV@) and added to
+ list of link libraries
+
+externs.h
+ - new extern declarations for fnx_fromfs and fnx_tofs
+
+lib/glob/glob.c
+ - convert the filename read using readdir() in glob_vector() using
+ fnx_fromfs and use that value in the call to strmatch. This
+ ensures that we're using the precomposed Unicode value of the
+ filename rather than the native decomposed form. Original bug
+ report from Len Lattanzi <llatanzi@apple.com>; fix inspired by
+ Guillaume Outters <guillaume.outters@free.fr>
+
+ 8/19
+ ----
+lib/readline/complete.c
+ - new completion hook: rl_filename_rewrite_hook, can rewrite or modify
+ filenames read from the filesystem before they are compared to the
+ word to be completed
+
+lib/readline/readline.h
+ - extern declaration for rl_filename_rewrite_hook
+
+lib/readline/doc/rltech.texi
+ - document rl_filename_rewrite_hook
+
+bashline.c
+ - new function, bash_filename_rewrite_hook, assigned to
+ rl_filename_rewrite_hook. Calls fnx_fromfs to convert from
+ filesystem format to "input" format. This makes completing
+ filenames with accented characters work on Mac OS X
+
+ 8/20
+ ----
+lib/readline/bind.c
+ - new bindable variable "skip-completed-text", bound to
+ _rl_skip_completed_text. If enabled, it means to note when
+ completing before the end of a word and skipping over characters
+ after rl_point that match in both the completion to be inserted
+ and the word being completed. It means that completing
+ `Makefile' with the cursor after the `e' results in `Makefile'
+ instead of `Makefilefile'. Inspired by an idea from Jared
+ Yanovich <phierunner@comcast.net> from back in 2004
+
+lib/readline/rlprivate.h
+ - extern declaration for _rl_skip_completed_text
+
+lib/readline/complete.c
+ - implement semantics of _rl_skip_completed_text in insert_match:
+ skip characters in `replacement' that match chars in rl_line_buffer
+ from the start of the word to be completed
+
+ 8/21
+ ----
+error.c
+ - change parser_error to set last_command_exit_value to 2 before
+ calling exit_shell (if set -e is enabled), so any exit or ERR
+ trap gets the right value of $?. Suggestion from Stefano
+ Lattarini <stefano.lattarini@gmail.com>
+
+braces.c
+ - fix expand_seqterm so that a non-zero-prefixed term that's longer
+ than a zero-prefixed term determines the length of each term
+ in the brace-expanded sequence. This means that things like
+ {01..100} will have three digits in all the elements of the
+ expanded list. Fixes bug reported by Jeff Haemer
+ <jeffrey.haemer@gmail.com>
+
+ 8/24
+ ----
+{arrayfunc,variables}.c
+ - when inserting a value into an associative array using syntax like
+ T=v where T is an already-declared associative array using key "0",
+ make sure the key is in newly-allocated memory so it can be freed
+ when the variable is unset. Fixes bug reported as redhat 518644
+ by Jon Fairbairn
+
+ 8/26
+ ----
+lib/readline/funmap.c
+ - add "old-menu-complete" binding for rl_old_menu_complete
+
+lib/readline/readline.h
+ - add extern declaration for rl_old_menu_complete
+
+subst.c
+ - fix memory leak when processing ${!prefix@}. Need to dispose all
+ words in the word list created from all matching variable. Fixes
+ bug reported by muszi@muszi.kite.hu.
+
+ 8/29
+ ----
+execute_cmd.c
+ - add fflush(stdout) and fflush(stderr) to child coproc code before
+ calling exit after execute_in_subshell
+
+ 8/31
+ ----
+lib/readline/{{bind,readline}.c,rlprivate.h}
+ - new bindable variable, "echo-control-characters", enabled by default.
+ This controls whether or not readline honors the tty ECHOCTL bit
+ and displays characters corresponding to keyboard-generated signals.
+ Controlled by _rl_echo_control_chars variable, declared in readline.c
+
+lib/readline/signals.c
+ - if _rl_echo_control_chars == 0, don't go through _rl_echo_signal_char
+
+
+lib/readline/doc/{readline.3,rluser.texi}
+ - document "echo-control-characters" bindable variable
+
+ 9/1
+ ---
+lib/readline/histexpand.c
+ - hist_string_extract_single_quoted now takes an additional argument:
+ a flags word. The only defined value (flags & 1) allows backslash
+ to quote the single quote. This is to inhibit history expansion
+ inside $'...' containing an escaped single quote.
+ - change history_expand to call hist_string_extract_single_quoted
+ with flags == 1 if it sees $'. Fixes bug reported by Sean
+ Donner <sean.donner@gmail.com>
+
+ 9/2
+ ---
+builtins/printf.def
+ - add a call to sh_wrerror if ferror() succeeds in the PRETURN macro,
+ to print an error message in the case that the final fflush fails
+ (for instance, because it attempts to write data that didn't have a
+ trailing newline). Fixes bug reported by Stefano Lattarini
+ <stefano.lattarini@gmail.com>
+
+ 9/7
+ ---
+arrayfunc.c
+ - some fixes to assign_compound_array_list to avoid null pointer
+ dereferences pointed out by clang/scan-build
+
+lib/glob/glob.c
+ - fixes to udequote_pathname and wdequote_pathname to avoid possible
+ null pointer dereferences pointed out by clang/scan-build
+
+lib/readline/undo.c
+ - fix to _rl_copy_undo_list (function unused) to avoid deref of
+ uninitialized pointer pointed out by clang/scan-build
+
+general.c
+ - fix string_to_rlimtype so it works if passed a null pointer (though
+ it never is)
+
+builtins/mapfile.def
+ - fix to mapfile() to avoid possible null pointer dereference pointed
+ out by clang/scan-build
+
+variables.c
+ - fix to valid_exportstr to avoid possible null pointer dereferences
+ pointed out by clang/scan-build
+
+bashline.c
+ - fix to bash_execute_unix_command to avoid possible null pointer
+ dereference if READLINE_LINE or READLINE_POINT is not bound
+
+ 9/11
+ ----
+[Prayers for the victimes of 9/11/2001]
+
+command.h
+ - add `rflags' member to struct redirect to hold private flags and
+ state information
+ - change redirector to a REDIRECTEE instead of int to prepare for
+ possible future changes
+
+{copy_cmd,dispose_cmd,make_cmd,print_cmd,redir}.c
+ - changes resulting from type change of `redirector' member of struct
+ redirect: change x->redirector to x->redirector.dest and add code
+ where appropriate to deal with x->redirector.filename
+
+make_cmd.h
+ - change extern declaration for make_redirection
+
+make_cmd.c
+ - first argument of make_redirection is now a `REDIRECTEE' to prepare
+ for possible future changes. First arg is now assigned directly to
+ redirector member instead of assigning int to redirector.dest
+
+{make_cmd,redir}.c,parse.y
+ - changes resulting from type change of first argument to
+ make_redirection from int to REDIRECTEE. In general, changes are
+ using REDIRECTEE sd and assigning old argument to sd.dest, then
+ passing sd to make_redirection
+
+make_cmd.[ch],parse.y
+ - add fourth argument to make_redirection: flags. Sets initial value
+ of `rflags' member of struct redirect
+ - changed all callers of make_redirection to add fourth argument of 0
+
+ 9/15
+ ----
+parse.y
+ - change read_token_word to return REDIR_WORD for tokens of the form
+ {var} where `var' is a valid shell identifier and the character
+ following the } is a `<' or `>'
+ - add REDIR_WORD versions of all input and output file redirections
+ and here documents
+
+print_cmd.c
+ - change input and output file redirection direction and here
+ document cases of print_redirection to print a varname
+ specification of the form {var} when appropriate. Still need
+ to fix rest of cases
+
+redir.c
+ - implement REDIR_VARASSIGN semantics for file input and output
+ redirections and here documents
+
+ 9/16
+ ----
+parse.y
+ - added REDIR_WORD versions of remaining redirection constructs except
+ for err_and_out ones
+
+redir.c
+ - handle REDIR_VARASSIGN semantics for rest of redirection constructs
+ - accommodate REDIR_VARASSIGN when translating redirections
+ - new function, redir_varvalue, does variable lookup for {v} when
+ redirection needs the value (e.g., r_close_this)
+
+print_cmd.c
+ - fix rest of cases to print {varname} when REDIR_VARASSIGN is set in
+ redirect->rflags
+
+doc/{bash.1,bashref.texi}
+ - document new {varname} REDIR_VARASSIGN form of redirections
+
+tests/vredir.{right,tests},vredir[1-5].sub
+ - tests for new {varname} REDIR_VARASSIGN form of redirections
+
+ 9/18
+ ----
+subst.c
+ - new flags argument to split_at_delims: these flags are ORd with
+ SD_NOJMP and passed to skip_to_delim
+ - change skip_to_delim to honor new SD_NOQUOTEDELIM flag by not
+ checking whether or not single and double quotes are delimiters
+ if it's set in passed flags until after skipping quoted strings.
+
+subst.h
+ - change extern declaration for split_at_delims
+ - new define for SD_NOQUOTEDELIM flag
+
+pcomplete.c
+ - pass SD_NOQUOTEDELIM in flags argument to split_at_delims so single
+ and double quotes, even though they're in
+ rl_completer_word_break_characters, don't act as word delimiters
+ for programmable completion. Fixes bug reported by Freddy
+ Vulto <fvulto@gmail.com>
+
+lib/glob/glob.c
+ - in glob_filename, after recursively scanning a directory specified
+ with `**', turn off GX_ALLDIRS|GX_ADDCURDIR before calling
+ glob_vector on the rest of the pathname, since it may not apply to
+ the rest of the pattern. Turned back on if the filename makes it
+ appropriate. Fixes bug reported by Anders Kaseorg <andersk@mit.edu>
+
+redir.c
+ - change execute_null_command to fork a child to execute if any of
+ the commands redirections have the REDIR_VARASSIGN flag set, since
+ those commands are not supposed to have side effects
+
+test.c
+ - < and > binary operators will obey the locale by using strcoll if
+ the TEST_LOCALE flag is passed to binary_test
+
+test.h
+ - new define for TEST_LOCALE
+
+execute_cmd.c
+ - execute_cond_node sets TEST_LOCALE so [[ str1 < str2 ]] (and >)
+ obey the locale. Fixes bug/incompatibility reported by Greg
+ Wooledge <wooledg@eeg.ccf.org>
+
+doc/{bash.1,bashref.texi}
+ - documented [[ command new locale-sensitive treatment of < and >
+
+ 9/24
+ ----
+configure.in
+ - add "darwin10" cases like darwin8 and darwin9 to handle linking with
+ included readline and history libraries
+
+ 9/26
+ ----
+lib/readline/display.c
+ - modify change of 7/24 to use prompt_physical_chars instead of
+ prompt_visible_length to account for visible multibyte characters in
+ the line (usually in the prompt). Fixes debian bug #547264
+ reported by Pietro Battiston <toobaz@email.it>
+ - add flags argument to _rl_col_width; changed callers. flags > 0
+ means that it's ok to use the already-computed prompt information;
+ flags == 0 means that we're expanding the prompt and we should not
+ short-circuit
+
+parse.y
+ - in decode_prompt_string, when expanding \w and \W on Mac OS X,
+ use fnx_fromfs to convert from "filesystem" form to "input" form.
+ This makes $PWD with multibyte characters work in the prompt
+ string on Mac OS X
+
+lib/sh/fnxform.c
+ - in fnx_fromfs and fnx_tofs, use templen instead of outlen as last
+ argument in calls to iconv, since outlen is used to keep track of
+ the size of the buffer, and iconv potentially modifies its
+ `outbytesleft' argument
+
+ 9/29
+ ----
+subst.c
+ - make skip_to_delim understand how to skip over process substitution
+ constructs the way it skips $(...) command substitution
+
+ 9/30
+ ----
+lib/readline/terminal.c
+ - don't set the `terminal has meta key' flag if the `MT' capability is
+ available; that means something completely different
+
+ 10/1
+ ----
+builtins/help.def
+ - make sure width is at least 7, since we pass `width/2 - 3' to strncpy
+ as the length argument. Terminal widths <= 6 are converted to 80.
+ Fixes bug reported by Chris Hall <c@pobox.co.uk>
+
+configure.in
+ - changed version to 4.1-alpha
+
+subst.h
+ - new flag for skip_to_delim: SD_NOSKIPCMD, which means to not skip
+ over embedded command and process substitutions, but rather to look
+ for delimiters within them
+
+subst.c
+ - implement semantics of SD_NOSKIPCMD in skip_to_delim
+
+bashline.c
+ - call skip_to_delim with SD_NOSKIPCMD from find_cmd_start, so
+ programmable completion can use the completion defined for `b' for
+ command lines like "a $(b c". Fixes inconsistency/bug reported by
+ Freddy Vulto <fvulto@gmail.com>
+
+parser.h
+ - replace unused PST_CMDTOKEN parser state value with PST_EXTPAT,
+ means currently parsing an extended glob pattern (extglob)
+
+parse.y
+ - fix cond_node() so that extended_glob is set before parsing the
+ rhs of the `==' or `!=' operators. For ksh93 compatibility.
+ - reset extended_glob to global value (saved in parse_cond_command())
+ in reset_parser()
+
+ 10/5
+ ----
+jobs.c
+ - change waitchld() to only interrupt the wait builtin when the shell
+ receives SIGCHLD in Posix mode. It's a posix requirement, but
+ makes easy things hard to do, like run a SIGCHLD trap for every
+ exiting child. Change prompted by question from Alex Efros
+ <powerman@powerman.name>
+
+doc/bashref.texi
+ - document new posix mode behavior about SIGCHLD arriving while the
+ wait builtin is executing when a trap on SIGCHLD has been set
+
+ 10/6
+ ----
+lib/readline/histexpand.c
+ - fix hist_expand to keep from stopping history expansion after the
+ first multibyte character (a `break' instead of a `continue').
+ Fixes debian bug (#549933) reported by Nikolaus Schulz
+ <microschulz@web.de>
+
+ 10/8
+ ----
+builtins/read.def
+ - implement new `-N nchars' option: read exactly NCHARS characters,
+ ignoring any delimiter, and don't split the result on $IFS.
+ Feature requested by Richard Stallman <rms@gnu.org>
+
+doc/{bash.1,bashref.texi}
+ - document new `read -N' option
+
+ 10/9
+ ----
+lib/readline/bind.c
+ - new bindable variable, "enable-meta-key", controls whether or not
+ readline enables any meta modifier key the terminal claims to
+ support. Suggested by Werner Fink <werner@suse.de>
+
+lib/readline/doc/{readline.3,rluser.texi},doc/bash.1
+ - document new readline "enable-meta-key" bindable variable
+
+ 10/10
+ -----
+trap.c
+ - new function, free_trap_string(), does what it says and turns off
+ SIG_TRAPPED flag without changing signal disposition
+
+[bash-4.1-alpha frozen]
+
+ 10/16
+ -----
+builtins/mapfile.def
+ - return an error if the variable passed is not an indexed array.
+ Fixes bug reported by Nick Hobson <nick.hobson@yahoo.com>
+ - change help text to make it clear that an indexed array is required
+
+doc/{bash.1,bashref.texi}
+ - changed description of mapfile to note that the array variable
+ argument must be an indexed array, and mapfile will return an
+ error if it is not
+
+subst.c
+ - change expand_string_unsplit and expand_string_leave_quoted to
+ add the (previously unused) W_NOSPLIT2 flag to the created word
+ - change expand_word_internal to understand W_NOSPLIT2 to mean that
+ we're not going to split on $IFS, so we should not quote any
+ characters in IFS that we add to the result string. Fixes bug
+ reported by Enrique Perez-Terron <enrio@online.no>
+ - change cond_expand_word similarly. Fixes rest of bug reported by
+ Enrique Perez-Terron <enrio@online.no>
+
+parse.y
+ - save and restore value of last_command_subst_pid around call to
+ expand_prompt_string in decode_prompt_string. Fixes bug that causes
+ $? to be set wrong when using a construct like false || A=3 when
+ set -x is enabled and $PS4 contains a command substitution. Reported
+ by Jeff Haemer <jeffrey.haemer@gmail.com>
+
+ 10/17
+ -----
+execute_cmd.c
+ - in execute_in_subshell, make sure we set setjmp(return_catch) before
+ running the command, in case the command or its word expansion
+ calls jump_to_top_level. Fixes bug reported by Nils Bernhard
+ <nils.bernhard@yahoo.de>
+
+subst.c
+ - new PF_NOSPLIT2 flag for param_expand
+ - parameter_brace_expand takes a new `pflags' argument, before the
+ `output' parameters; passes to param_expand as necessary
+ - change parameter_brace_expand to call parameter_brace_expand_word
+ with the PF_NOSPLIT2 flag if the pflags argument to
+ parameter_brace_expand has it set
+
+parse.y
+ - change report_syntax_error to set last_command_exit_value to
+ EX_BADSYNTAX if parse_and_execute_level is > 0, indicating a
+ syntax error while we're executing a dot script, eval string,
+ trap command, etc.
+
+builtins/evalstring.c
+ - in parse_and_execute, if parse_command() returns non-zero,
+ indicating a parse error, print a warning message if the conditions
+ would require a posix-mode shell to abort (parse error in a `.'
+ script or eval string)
+
+ 10/19
+ -----
+builtins/evalfile.c
+ - even if the `check binary' flag is not passed to _evalfile, return an
+ error after reading 128 null characters if called by `source', on
+ the assumption that it's probably a binary file. [This will be in
+ bash-4.1-beta]
+
+ 10/24
+ -----
+[bash-4.1-alpha released]
+
+bashline.c
+ - don't call command_substitution_completion_function if we're
+ completing a substring delimited by a single quote. Fixes bug
+ reported by bash-bugs@atu.cjb.net
+
+lib/readline/complete.c
+ - make sure _rl_skip_completed_text defaults to 0, as the
+ documentation states (incorrect in bash-4.1-alpha)
+ - in insert_match, skip over a close quote in the replacement text if
+ the character at point when completion is invoked is a single
+ quote. Fixes complaint from bash-bugs@atu.cjb.net
+
+ 10/26
+ -----
+shell.c
+ - in main, make sure "$EMACS" is non-null before calling strstr on its
+ value. Fixes Red Hat bug 530911 submitted by Mitchell Berger
+
+builtins/mapfile.def
+ - don't save callback commands in shell history. Suggested by
+ Jan Schampera <jan.schampera@web.de>
+
+mailcheck.c
+ - in file_mod_date_changed, make sure the modification time is later
+ than the saved modification date, not just that it's not equal.
+ Fix from Evgeniy Dushistov <dushistov@mail.ru>
+ - in file_access_date_changed, make sure the access time is later
+ than the saved access time, not just that it's not equal
+
+ 10/27
+ -----
+builtins/shopt.def
+ - added new `compat40' compatibility variable, with associated changes
+ to shell_compatibility_level(), since the default compatibility level
+ is now 41
+
+test.c
+ - make the < and > operators to [[ use strcoll() only if the shell
+ compatibility level is greater than 40 (it is 41 by default in
+ bash-4.1)
+
+ 10/28
+ -----
+support/shobj-conf
+ - decrease the default version of FreeBSD that creates shared libraries
+ to 4.x. Advice from Peter Jeremy <peterjeremy@acm.org>
+
+ 11/2
+ ----
+parse.y
+ - change parse_comsub to free `heredelim' and set it to 0 whenever the
+ comsub scanner finds the end of a here document. Really need to
+ implement a stack of here doc delimiters like in the parser (can we
+ use redir_stack here, too?)
+ - fix parse_comsub to not attempt to read another here doc delimiter
+ after seeing a shell break character (that is not newline) if we
+ already have one. Fixes Debian bash bug #553485, submitted by
+ Samuel Hym <samuel.hym@gmail.com>
+
+ 11/3
+ ----
+variables.c
+ - fix bind_variable_internal to call a variable's dynamic 'set function'
+ with the right arguments depending on whether its an associative
+ array, an indexed array, or a scalar. Fixes Ubuntu bug #471504
+ https://bugs.launchpad.net/ubuntu/+source/bash/+bug/471504 reported
+ by AJ Slater <aj.slater@gmail.com>
+
+[bash-4.1-beta frozen]
+
+ 11/11
+ -----
+builtins/printf.def
+ - in getintmax(), in the case of a conversion error, return the partial
+ value accumulated so far, which is suppose to be what
+ strtoimax/strtoll/strtol returns
+
+ 11/17
+ -----
+[bash-4.1-beta released]
+
+ 11/18
+ -----
+builtins/{common.h,shopt.def},shell.c
+ - changed shopt variable "set functions" to take the option name as
+ the first argument; changed function prototypes and callers
+
+builtins/shopt.def
+ - change set_compatibility_level() to turn off other compatNN options
+ when one is set -- enforce mutual exclusivity. Fixes problem noted
+ by Jan Schampera <jan.schampera@web.de>
+
+ 11/19
+ -----
+lib/readline/rltty.c
+ - make sure prepare_terminal_settings() tests for the presence of
+ ECHOCTL before using it. Fixes bug reported by Joachim Schmitz
+ <schmitz@hp.com>
+
+config-top.h
+ - new WORDEXP_OPTION define (off by default)
+
+shell.c
+ - don't include the --wordexp option or the supporting function
+ (run_wordexp) if WORDEXP_OPTION is not defined. Suggested by
+ Aharon Robbins <arnold@skeeve.com>
+
+execute_cmd.c
+ - in execute_cond_node, turn on comsub_ignore_return if the flags
+ indicate we're ignoring the return value before calling
+ cond_expand_word. Fixes bug reported by Anirban Sinha
+ <asinha@zeugmasystems.com>
+
+ 11/20
+ -----
+lib/sh/snprintf.c,builtins/printf.def
+ - change check for HAVE_ASPRINTF and HAVE_SNPRINTF to check if value
+ is 1 or 0 rather than whether they are defined or not. This allows
+ a value of 0 to enable function replacement
+
+configure.in,aclocal.m4
+ - new autoconf macro, BASH_FUNC_SNPRINTF, checks for snprintf present
+ and working as C99 specifies with a zero length argument. Idea
+ from Greg Wooledge <wooledg@eeg.ccf.org>
+ - new macro BASH_FUNC_VSNPRINTF, does same thing for vsnprintf
+
+ 11/25
+ -----
+subst.c
+ - in command_substitute, only tell parse_and_execute to reset the line
+ number in an interactive shell if sourcelevel == 0 -- we'll use the
+ line numbers from the sourced file
+
+execute_cmd.c
+ - in execute_simple_command, only subtract function_line_number from
+ line_number if sourcelevel == 0. If sourcing, we'll use the line
+ numbers from the sourced file. Fixes bug reported by Hugo
+ Mildenberger <Hugo.Mildenberger@namir.de>
+
+builtins/declare.def
+ - in declare_internal, call bind_assoc_variable instead of
+ bind_array_variable in the case of declare -A foo=bar. Fixes bug
+ reported by Bernd Eggink <monoped@sudrala.de>.
+
+ 11/27
+ -----
+lib/readline/util.c
+ - change declaration for _rl_walphabetic to use prototype, assuming
+ that any system with multibyte characters has a compiler that can
+ handle prototypes. Fix for AIX compilation problem reported by
+ Nick Hillman <nick_hillman@neverbox.com>
+
+ 11/28
+ -----
+execute_cmd.c
+ - make funcnest file-scope static and unwind-protect its value in
+ execute_function, so it can be used as a real measure of function
+ call nesting
+
+general.c
+ - fix off-by-one error in trim_pathname that caused it to short-circuit
+ when PROMPT_DIRTRIM == number of directories - 1. Fixes bug
+ reported by Dennis Williamson <dennistwilliamson@gmail.com>
+
+ 11/29
+ -----
+jobs.c
+ - when fork() returns -1/EAGAIN, call waitchld(-1, 0) so the shell can
+ reap any dead jobs before trying fork again. Currently disabled
+ until bash-4.2 development starts
+
+lib/readline/complete.c
+ - when incrementing _rl_interrupt_immediately, make sure it's greater
+ than 0 before decrementing it. In practice, not a problem, but
+ the right way to do it. Suggested by Jan Kratochvil
+ <jan.kratochvil@redhat.com>
+
+lib/readline/signals.c
+ - make sure rl_signal_handler doesn't set rl_caught_signal if
+ _rl_interrupt_immediately is set, so RL_CHECK_SIGNALS doesn't
+ cause it to be processed twice. Suggested by Jan Kratochvil
+ <jan.kratochvil@redhat.com>
+ - if the callback interface is being used, use the code path that
+ immediately handles signals. This restores the readline-5.2
+ behavior. Fixes GDB readline bug reported by Jan Kratochvil
+ <jan.kratochvil@redhat.com>
+
+ 12/18
+ -----
+[bash-4.1-rc1 released]
+
+ 12/22
+ -----
+config-top.h
+ - don't have SYSLOG_HISTORY enabled by default
+
+lib/sh/Makefile.in
+ - add explicit dependency on pathnames.h for parallel make support
+
+externs.h
+ - add extern declaration for xtrace_fdchk
+
+lib/sh/snprintf.c
+ - add local prototype declarations for isinf, isnan if we are providing
+ local definitions
+
+lib/sh/fnxform.c
+ - add extern declaration for get_locale_var if HAVE_LOCALE_CHARSET not
+ defined
+
+execute_cmd.c
+ - define NEED_FPURGE_DECL so we pick up any extern declaration for
+ fpurge (e.g., if the system doesn't provide it)
+
+builtins/shopt.def
+ - correct prototype and declaration for set_shellopts_after_change so
+ it's the correct type for shopt_set_func_t
+ - add new function shopt_enable_hostname_completion that is the correct
+ type for shopt_set_func_t; just calls enable_hostname_completion and
+ returns its result
+
+ 12/26
+ -----
+doc/{bash.1,bashref.texi}
+ - add \E and \" escape sequences to ANSI-C quoting description.
+ Suggested by Aharon Robbins <arnold@skeeve.com>
+
+ 12/29
+ -----
+doc/bash.1
+ - make sure shell and environment variable names are always in
+ `small caps' bold. Suggested by Aharon Robbins <arnold@skeeve.com>
+
+ 12/30
+ -----
+{execute_cmd.c,parse.y,Makefile}
+ - changes for building minimal configuration from Matthias Klose
+ <doko@debian.org>
+
+[bash-4.1 frozen]
diff --git a/CWRU/mh-folder-comp b/CWRU/mh-folder-comp
new file mode 100644
index 0000000..905000c
--- /dev/null
+++ b/CWRU/mh-folder-comp
@@ -0,0 +1,449 @@
+From jwe@che.utexas.edu Wed Sep 21 17:23:40 1994
+Flags: 10
+Return-Path: jwe@che.utexas.edu
+Received: from po.CWRU.Edu (root@po.CWRU.Edu [129.22.4.2]) by odin.INS.CWRU.Edu with ESMTP (8.6.8.1+cwru/CWRU-2.1-ins)
+ id RAA04010; Wed, 21 Sep 1994 17:23:39 -0400 (from jwe@che.utexas.edu for <chet@odin.INS.CWRU.Edu>)
+Received: from life.ai.mit.edu (life.ai.mit.edu [128.52.32.80]) by po.CWRU.Edu with SMTP (8.6.8.1+cwru/CWRU-2.2)
+ id RAA02121; Wed, 21 Sep 1994 17:23:28 -0400 (from jwe@che.utexas.edu for <chet@po.cwru.edu>)
+Received: from schoch.che.utexas.edu by life.ai.mit.edu (4.1/AI-4.10) for chet@po.cwru.edu id AA09989; Wed, 21 Sep 94 17:23:17 EDT
+Received: from localhost (jwe@localhost) by schoch.che.utexas.edu (8.6.8.1/8.6) with SMTP id QAA05737; Wed, 21 Sep 1994 16:22:01 -0500
+Message-Id: <199409212122.QAA05737@schoch.che.utexas.edu>
+To: march@tudor.com
+Cc: bug-bash@prep.ai.mit.edu
+Subject: Re: Completion feature possible?
+In-Reply-To: Your message of 21 Sep 94 13:30:22 EDT
+Date: Wed, 21 Sep 94 16:22:00 EDT
+From: John Eaton <jwe@che.utexas.edu>
+
+Gregory F. March <march@tudor.com> wrote:
+
+: I was having a discussion about MH with one of my friends the other
+: day and I got to thinking that the +folder/subfolder scheme for naming
+: mail folders is a real pain because completion doesn't work on
+: them. Someone then mentioned that zsh (I think) has the ability to
+: specify how to complete (I guess where to look for the files) for
+: different prefixes. Bash right now knows about '@', '~', and '$' (any
+: others?). It would be really helpful if one could define something
+: like:
+:
+: completion '+' "$HOME/Mail"
+:
+: in a config file someplace. Would this be easy? Is there a list of
+: TODO item that someone might want to add this to?
+
+It would be nice to have a general completion feature like this.
+
+Until that happens, maybe you will find the following patch useful.
+It makes MH folder name completion work with bash. The diffs are
+relative to version 1.14.2.
+
+I realize that changes to readline.c and and complete.c are not good
+since they add some MH-specific stuff to the readline code and not to
+bash, but when I first wrote this, I had no idea what else to do.
+
+Chet, would you consider adding this if it were cleaned up a bit?
+Made optional with cpp conditionals?
+
+This feature has been very useful to me for the last several years
+(since about 1.05 or 1.06, I think).
+
+Thanks,
+
+--
+John W. Eaton | 4.3BSD is not perfect. -- Leffler, et al. (1989).
+jwe@che.utexas.edu |
+
+
+-------------------------------cut here-------------------------------
+diff -rc bash-1.14.2/bashline.c bash-1.14.2.local/bashline.c
+*** bash-1.14.2/bashline.c Wed Aug 3 09:32:45 1994
+--- bash-1.14.2.local/bashline.c Wed Sep 21 15:39:04 1994
+***************
+*** 58,63 ****
+--- 58,64 ----
+ static char *hostname_completion_function ();
+ static char *command_word_completion_function ();
+ static char *command_subst_completion_function ();
++ static char *mh_folder_completion_function ();
+
+ static void snarf_hosts_from_file (), add_host_name ();
+ static void sort_hostname_list ();
+***************
+*** 90,95 ****
+--- 91,98 ----
+ bash_complete_username_internal (),
+ bash_complete_hostname (), bash_possible_hostname_completions (),
+ bash_complete_hostname_internal (),
++ bash_complete_mh_folder (), bash_possible_mh_folder_completions (),
++ bash_complete_mh_folder_internal (),
+ bash_complete_variable (), bash_possible_variable_completions (),
+ bash_complete_variable_internal (),
+ bash_complete_command (), bash_possible_command_completions (),
+***************
+*** 134,140 ****
+ rl_terminal_name = get_string_value ("TERM");
+ rl_instream = stdin;
+ rl_outstream = stderr;
+! rl_special_prefixes = "$@";
+
+ /* Allow conditional parsing of the ~/.inputrc file. */
+ rl_readline_name = "Bash";
+--- 137,143 ----
+ rl_terminal_name = get_string_value ("TERM");
+ rl_instream = stdin;
+ rl_outstream = stderr;
+! rl_special_prefixes = "$@+";
+
+ /* Allow conditional parsing of the ~/.inputrc file. */
+ rl_readline_name = "Bash";
+***************
+*** 193,198 ****
+--- 196,207 ----
+ rl_bind_key_in_map ('@', bash_possible_hostname_completions,
+ emacs_ctlx_keymap);
+
++ rl_add_defun ("complete-mh-folder", bash_complete_mh_folder, META('+'));
++ rl_add_defun ("possible-mh-folder-completions",
++ bash_possible_mh_folder_completions, -1);
++ rl_bind_key_in_map ('+', bash_possible_mh_folder_completions,
++ emacs_ctlx_keymap);
++
+ rl_add_defun ("complete-variable", bash_complete_variable, -1);
+ rl_bind_key_in_map ('$', bash_complete_variable, emacs_meta_keymap);
+ rl_add_defun ("possible-variable-completions",
+***************
+*** 656,661 ****
+--- 665,677 ----
+ if (!matches && *text == '@')
+ matches = completion_matches (text, hostname_completion_function);
+
++ /* Another one. Why not? If the word starts in '+', then look for
++ matching mh folders for completion first. */
++ if (!matches && *text == '+')
++ {
++ matches = completion_matches (text, mh_folder_completion_function);
++ }
++
+ /* And last, (but not least) if this word is in a command position, then
+ complete over possible command names, including aliases, functions,
+ and command names. */
+***************
+*** 1077,1082 ****
+--- 1093,1185 ----
+ return ((char *)NULL);
+ }
+
++ /* How about a completion function for mh folders? */
++ static char *
++ mh_folder_completion_function (text, state)
++ int state;
++ char *text;
++ {
++ extern int rl_filename_completion_desired;
++
++ extern char *get_mh_path ();
++
++ static char *mh_path = (char *)NULL;
++ static int len;
++ static int istate;
++ static char *val;
++ char *hint;
++
++ static char *mh_folder_hint = (char *)NULL;
++
++ /* If we don't have any state, make some. */
++ if (!state)
++ {
++ val = (char *)NULL;
++
++ if (mh_path)
++ free (mh_path);
++
++ mh_path = get_mh_path ();
++ if (!mh_path && !(hint[1] == '/' || hint[1] == '.'))
++ return ((char *)NULL);
++
++ len = strlen (mh_path);
++ }
++
++ if (mh_folder_hint)
++ free (mh_folder_hint);
++
++ hint = text;
++ if (*hint == '+')
++ hint++;
++
++ mh_folder_hint = (char *)xmalloc (2 + len + strlen (hint));
++ if (*hint == '/' || *hint == '.') {
++ len = -1;
++ sprintf (mh_folder_hint, "%s", hint);
++ } else
++ sprintf (mh_folder_hint, "%s/%s", mh_path, hint);
++
++ istate = (val != (char *)NULL);
++
++ again:
++ val = filename_completion_function (mh_folder_hint, istate);
++ istate = 1;
++
++ if (!val)
++ {
++ return ((char *)NULL);
++ }
++ else
++ {
++ char *ptr = val + len + 1, *temp;
++ struct stat sb;
++ int status = stat (val, &sb);
++
++ if (status != 0)
++ return ((char *)NULL);
++
++ if ((sb.st_mode & S_IFDIR) == S_IFDIR)
++ {
++ temp = (char *)xmalloc (2 + strlen (ptr));
++ *temp = '+';
++ strcpy (temp + 1, ptr);
++
++ free (val);
++ val = "";
++
++ rl_filename_completion_desired = 1;
++
++ return (temp);
++ }
++ else
++ {
++ free (val);
++ }
++ goto again;
++ }
++ }
++
+ /* History and alias expand the line. */
+ static char *
+ history_expand_line_internal (line)
+***************
+*** 1628,1633 ****
+--- 1731,1773 ----
+ {
+ bash_specific_completion
+ (what_to_do, (Function *)username_completion_function);
++ }
++
++ static void
++ bash_complete_mh_folder (ignore, ignore2)
++ int ignore, ignore2;
++ {
++ bash_complete_mh_folder_internal (TAB);
++ }
++
++ static void
++ bash_possible_mh_folder_completions (ignore, ignore2)
++ int ignore, ignore2;
++ {
++ bash_complete_mh_folder_internal ('?');
++ }
++
++ static void
++ bash_complete_mh_folder_internal (what_to_do)
++ int what_to_do;
++ {
++ Function *orig_func;
++ CPPFunction *orig_attempt_func;
++ char *orig_rl_completer_word_break_characters;
++ extern char *rl_completer_word_break_characters;
++
++ orig_func = rl_completion_entry_function;
++ orig_attempt_func = rl_attempted_completion_function;
++ orig_rl_completer_word_break_characters = rl_completer_word_break_characters;
++ rl_completion_entry_function = (Function *)mh_folder_completion_function;
++ rl_attempted_completion_function = (CPPFunction *)NULL;
++ rl_completer_word_break_characters = " \t\n\"\'";
++
++ rl_complete_internal (what_to_do);
++
++ rl_completion_entry_function = orig_func;
++ rl_attempted_completion_function = orig_attempt_func;
++ rl_completer_word_break_characters = orig_rl_completer_word_break_characters;
+ }
+
+ static void
+Only in bash-1.14.2.local: bashline.c.orig
+diff -rc bash-1.14.2/lib/readline/complete.c bash-1.14.2.local/lib/readline/complete.c
+*** bash-1.14.2/lib/readline/complete.c Tue Jul 26 12:59:57 1994
+--- bash-1.14.2.local/lib/readline/complete.c Wed Sep 21 15:41:19 1994
+***************
+*** 733,751 ****
+ if (rl_filename_completion_desired)
+ {
+ struct stat finfo;
+! char *filename = tilde_expand (matches[0]);
+
+! if ((stat (filename, &finfo) == 0) && S_ISDIR (finfo.st_mode))
+ {
+! if (rl_line_buffer[rl_point] != '/')
+! rl_insert_text ("/");
+ }
+! else
+ {
+! if (rl_point == rl_end)
+! rl_insert_text (temp_string);
+ }
+- free (filename);
+ }
+ else
+ {
+--- 733,768 ----
+ if (rl_filename_completion_desired)
+ {
+ struct stat finfo;
+! char *tilde_expand ();
+! char *plus_expand ();
+! char *filename = (char *) NULL;
+
+! switch (*matches[0])
+ {
+! case '+':
+! filename = plus_expand (matches[0]);
+! break;
+! case '~':
+! default:
+! filename = tilde_expand (matches[0]);
+! break;
+ }
+!
+! if (filename)
+ {
+! if ((stat (filename, &finfo) == 0)
+! && S_ISDIR (finfo.st_mode))
+! {
+! if (rl_line_buffer[rl_point] != '/')
+! rl_insert_text ("/");
+! }
+! else
+! {
+! if (rl_point == rl_end)
+! rl_insert_text (temp_string);
+! }
+! free (filename);
+ }
+ }
+ else
+ {
+Only in bash-1.14.2.local/lib/readline: diffs
+diff -rc bash-1.14.2/lib/readline/readline.c bash-1.14.2.local/lib/readline/readline.c
+*** bash-1.14.2/lib/readline/readline.c Fri Aug 12 12:47:46 1994
+--- bash-1.14.2.local/lib/readline/readline.c Wed Sep 21 15:36:07 1994
+***************
+*** 23,28 ****
+--- 23,29 ----
+ #define READLINE_LIBRARY
+
+ #include <stdio.h>
++ #include <string.h>
+ #include <sys/types.h>
+ #include <fcntl.h>
+ #if !defined (NO_SYS_FILE)
+***************
+*** 3518,3523 ****
+--- 3519,3616 ----
+ }
+
+ #endif /* TEST */
++
++ #define cr_whitespace(c) ((c) == '\r' || (c) == '\n' || whitespace(c))
++
++ char *
++ get_mh_path ()
++ {
++ static FILE *fp = (FILE *)NULL;
++ char buf[512]; /* XXX */
++ char profile[512]; /* XXX */
++ char *bp;
++ char *temp_home;
++ char *temp_path;
++
++ temp_home = (char *)getenv ("HOME");
++ if (!temp_home)
++ return ((char *)NULL);
++
++ strcpy (profile, temp_home);
++ strcat (profile, "/.mh_profile");
++
++ if (fp)
++ fclose (fp);
++
++ fp = fopen (profile, "r");
++ if (fp == (FILE *)NULL)
++ return ((char *)NULL);
++
++ while (fgets (buf, 512, fp) != (char *)NULL) /* XXX */
++ {
++ if ((bp = strstr (buf, "Path:")) != (char *)NULL)
++ {
++ bp += 5;
++ while (whitespace (*bp))
++ bp++;
++
++ if (*bp == '\0')
++ return ((char *)NULL);
++
++ temp_path = (char *)xmalloc (3 + strlen (bp) + strlen (temp_home));
++
++ strcpy (temp_path, temp_home);
++ strcat (temp_path, "/");
++ strcat (temp_path, bp);
++
++ bp = temp_path;
++
++ while (!(cr_whitespace (*bp)))
++ bp++;
++
++ *bp = '\0';
++
++ return temp_path;
++ }
++ }
++
++ return ((char *)NULL);
++ }
++
++ /* Expand FILENAME if it begins with a plus. This always returns
++ a new string. */
++ char *
++ plus_expand (filename)
++ char *filename;
++ {
++ static char *dirname = (char *)NULL;
++
++ if (filename && *filename == '+')
++ {
++ char *mh_path = get_mh_path ();
++
++ if (filename[1] == '/' || filename[1] == '.')
++ {
++ dirname = (char *)xmalloc (1 + strlen (filename));
++
++ strcpy(dirname, filename+1);
++
++ return dirname;
++ }
++
++ if (mh_path)
++ {
++ dirname = (char *)xmalloc (1 + strlen (filename) + strlen (mh_path));
++
++ strcpy (dirname, mh_path);
++ strcat (dirname, "/");
++ strcat (dirname, filename+1);
++
++ return dirname;
++ }
++ }
++ return (char *)NULL;
++ }
+
+
+ /*
+
diff --git a/CWRU/misc/bison b/CWRU/misc/bison
new file mode 100755
index 0000000..58aae79
--- /dev/null
+++ b/CWRU/misc/bison
@@ -0,0 +1,26 @@
+#! /bin/sh
+#
+# bison -- just call yacc
+#
+
+# Copyright (C) 1996-2002 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+if [ "$1" = '-y' ]; then
+ shift
+fi
+
+exec /usr/bin/yacc ${1+"$@"}
diff --git a/CWRU/misc/errlist.c b/CWRU/misc/errlist.c
new file mode 100644
index 0000000..53c368d
--- /dev/null
+++ b/CWRU/misc/errlist.c
@@ -0,0 +1,57 @@
+/*
+ * If necessary, link with lib/sh/libsh.a
+ */
+
+/* Copyright (C) 1998-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <stdio.h>
+#include <errno.h>
+
+extern char *strerror();
+
+extern int sys_nerr;
+
+int
+main(c, v)
+int c;
+char **v;
+{
+ int i, n;
+
+ if (c == 1) {
+ for (i = 1; i < sys_nerr; i++)
+ printf("%d --> %s\n", i, strerror(i));
+ } else {
+ for (i = 1; i < c; i++) {
+ n = atoi(v[i]);
+ printf("%d --> %s\n", n, strerror(n));
+ }
+ }
+ exit (0);
+}
+
+programming_error(a, b)
+char *a;
+int b;
+{
+}
+
+fatal_error()
+{
+}
diff --git a/CWRU/misc/hpux10-dlfcn.h b/CWRU/misc/hpux10-dlfcn.h
new file mode 100644
index 0000000..49d4428
--- /dev/null
+++ b/CWRU/misc/hpux10-dlfcn.h
@@ -0,0 +1,63 @@
+/*
+ * HPUX 10.x stubs to implement dl* in terms of shl*
+ *
+ * Not needed for later versions; HPUX 11.x has dlopen() and friends.
+ *
+ * configure also needs to be faked out. You can create a dummy libdl.a
+ * with stub entries for dlopen, dlclose, dlsym, and dlerror:
+ *
+ * int dlopen() { return(0);}
+ * int dlclose() { return(0);}
+ * int dlsym() { return(0);}
+ * int dlerror() { return(0);}
+ *
+ * This has not been tested; I just read the manual page and coded this up.
+ *
+ * According to the ld manual page, you need to link bash with -dld and add
+ * the -E flag to LOCAL_LDFLAGS.
+ */
+
+/* Copyright (C) 1998-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (__HPUX10_DLFCN_H__)
+
+#define __HPUX10_DLFCN_H__
+
+#include <dl.h>
+#include <errno.h>
+
+#ifndef errno
+extern int errno;
+#endif
+
+#define RTLD_LAZY BIND_DEFERRED
+#define RTLD_NOW BIND_IMMEDIATE
+#define RTLD_GLOBAL DYNAMIC_PATH
+
+char *bash_global_sym_addr;
+
+#define dlopen(file,mode) (void *)shl_load((file), (mode), 0L)
+
+#define dlclose(handle) shl_unload((shl_t)(handle))
+
+#define dlsym(handle,name) (bash_global_sym_addr=0,shl_findsym((shl_t *)&(handle),name,TYPE_UNDEFINED,&bash_global_sym_addr), (void *)bash_global_sym_addr)
+
+#define dlerror() strerror(errno)
+
+#endif /* __HPUX10_DLFCN_H__ */
diff --git a/CWRU/misc/open-files.c b/CWRU/misc/open-files.c
new file mode 100644
index 0000000..6a55577
--- /dev/null
+++ b/CWRU/misc/open-files.c
@@ -0,0 +1,39 @@
+/* open-files -- report files a process has open */
+
+/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <sys/types.h>
+#include <fcntl.h>
+#include <sys/file.h>
+
+#include <unistd.h>
+#include <stdlib.h>
+
+#include <stdio.h>
+
+main()
+{
+ register int i;
+
+ for (i = 0; i < getdtablesize(); i++) {
+ if (fcntl(i, F_GETFD, 0) != -1)
+ fprintf(stderr, "fd %d: open\n", i);
+ }
+ exit(0);
+}
diff --git a/CWRU/misc/sigs.c b/CWRU/misc/sigs.c
new file mode 100644
index 0000000..097ab31
--- /dev/null
+++ b/CWRU/misc/sigs.c
@@ -0,0 +1,47 @@
+/* sigs - print signal dispositions for a process */
+
+/* Copyright (C) 1990-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <signal.h>
+#include <stdio.h>
+
+extern char *sys_siglist[];
+
+typedef void sighandler();
+
+main(argc, argv)
+int argc;
+char **argv;
+{
+ register int i;
+ sighandler *h;
+
+ for (i = 1; i < NSIG; i++) {
+ h = signal(i, SIG_DFL);
+ if (h != SIG_DFL) {
+ if (h == SIG_IGN)
+ fprintf(stderr, "%d: ignored (%s)\n", i, sys_siglist[i]);
+ else
+ fprintf(stderr, "%d: caught (%s)\n", i, sys_siglist[i]);
+ }
+ }
+ exit(0);
+}
+
+
diff --git a/CWRU/misc/sigstat.c b/CWRU/misc/sigstat.c
new file mode 100644
index 0000000..9135baa
--- /dev/null
+++ b/CWRU/misc/sigstat.c
@@ -0,0 +1,226 @@
+/*
+ * sigstat - print out useful information about signal arguments
+ *
+ * Chet Ramey
+ * chet@po.cwru.edu
+ */
+
+/* Copyright (C) 1991-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <sys/types.h>
+#include <signal.h>
+#include <stdio.h>
+
+extern char *strrchr();
+static char *signames[NSIG];
+
+char *progname;
+
+void sigstat();
+
+main(argc, argv)
+int argc;
+char **argv;
+{
+ register int i;
+ char *t;
+
+ if (t = strrchr(argv[0], '/'))
+ progname = ++t;
+ else
+ progname = argv[0];
+ init_signames();
+ if (argc == 1) {
+ for (i = 1; i < NSIG; i++)
+ sigstat(i);
+ exit(0);
+ }
+ for (i = 1; i < argc; i++)
+ sigstat(atoi(argv[i]));
+ exit(0);
+}
+
+void
+sigstat(sig)
+int sig;
+{
+ struct sigaction oact;
+ char *signame;
+ sigset_t set, oset;
+ int blocked;
+
+ if (sig < 0 || sig >= NSIG) {
+ fprintf(stderr, "%s: %d: signal out of range\n", progname, sig);
+ return;
+ }
+ signame = signames[sig];
+ sigemptyset(&oset);
+ sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
+ if (sigismember(&oset, sig))
+ printf("%s: signal is blocked\n", signame);
+ sigaction(sig, (struct sigaction *)NULL, &oact);
+ if (oact.sa_handler == SIG_IGN)
+ printf("%s: signal is ignored\n", signame);
+ else if (oact.sa_handler == SIG_DFL)
+ printf("%s: signal is defaulted\n", signame);
+ else
+ printf("%s: signal is trapped (?)\n", signame);
+}
+
+init_signames()
+{
+ register int i;
+ bzero(signames, sizeof(signames));
+
+#if defined (SIGHUP) /* hangup */
+ signames[SIGHUP] = "SIGHUP";
+#endif
+#if defined (SIGINT) /* interrupt */
+ signames[SIGINT] = "SIGINT";
+#endif
+#if defined (SIGQUIT) /* quit */
+ signames[SIGQUIT] = "SIGQUIT";
+#endif
+#if defined (SIGILL) /* illegal instruction (not reset when caught) */
+ signames[SIGILL] = "SIGILL";
+#endif
+#if defined (SIGTRAP) /* trace trap (not reset when caught) */
+ signames[SIGTRAP] = "SIGTRAP";
+#endif
+#if defined (SIGABRT) /* */
+ signames[SIGABRT] = "SIGABRT";
+#endif
+#if defined (SIGIOT) /* IOT instruction */
+ signames[SIGIOT] = "SIGIOT";
+#endif
+#if defined (SIGEMT) /* EMT instruction */
+ signames[SIGEMT] = "SIGEMT";
+#endif
+#if defined (SIGFPE) /* floating point exception */
+ signames[SIGFPE] = "SIGFPE";
+#endif
+#if defined (SIGKILL) /* kill (cannot be caught or ignored) */
+ signames[SIGKILL] = "SIGKILL";
+#endif
+#if defined (SIGBUS) /* bus error */
+ signames[SIGBUS] = "SIGBUS";
+#endif
+#if defined (SIGSEGV) /* segmentation violation */
+ signames[SIGSEGV] = "SIGSEGV";
+#endif
+#if defined (SIGSYS) /* bad argument to system call */
+ signames[SIGSYS] = "SIGSYS";
+#endif
+#if defined (SIGPIPE) /* write on a pipe with no one to read it */
+ signames[SIGPIPE] = "SIGPIPE";
+#endif
+#if defined (SIGALRM) /* alarm clock */
+ signames[SIGALRM] = "SIGALRM";
+#endif
+#if defined (SIGTERM) /* software termination signal from kill */
+ signames[SIGTERM] = "SIGTERM";
+#endif
+#if defined (SIGCLD) /* Like SIGCHLD. */
+ signames[SIGCLD] = "SIGCLD";
+#endif
+#if defined (SIGPWR) /* Magic thing for some machines. */
+ signames[SIGPWR] = "SIGPWR";
+#endif
+#if defined (SIGPOLL) /* For keyboard input? */
+ signames[SIGPOLL] = "SIGPOLL";
+#endif
+#if defined (SIGURG) /* urgent condition on IO channel */
+ signames[SIGURG] = "SIGURG";
+#endif
+#if defined (SIGSTOP) /* sendable stop signal not from tty */
+ signames[SIGSTOP] = "SIGSTOP";
+#endif
+#if defined (SIGTSTP) /* stop signal from tty */
+ signames[SIGTSTP] = "SIGTSTP";
+#endif
+#if defined (SIGCONT) /* continue a stopped process */
+ signames[SIGCONT] = "SIGCONT";
+#endif
+#if defined (SIGCHLD) /* to parent on child stop or exit */
+ signames[SIGCHLD] = "SIGCHLD";
+#endif
+#if defined (SIGTTIN) /* to readers pgrp upon background tty read */
+ signames[SIGTTIN] = "SIGTTIN";
+#endif
+#if defined (SIGTTOU) /* like TTIN for output if (tp->t_local&LTOSTOP) */
+ signames[SIGTTOU] = "SIGTTOU";
+#endif
+#if defined (SIGIO) /* input/output possible signal */
+ signames[SIGIO] = "SIGIO";
+#endif
+#if defined (SIGXCPU) /* exceeded CPU time limit */
+ signames[SIGXCPU] = "SIGXCPU";
+#endif
+#if defined (SIGXFSZ) /* exceeded file size limit */
+ signames[SIGXFSZ] = "SIGXFSZ";
+#endif
+#if defined (SIGVTALRM) /* virtual time alarm */
+ signames[SIGVTALRM] = "SIGVTALRM";
+#endif
+#if defined (SIGPROF) /* profiling time alarm */
+ signames[SIGPROF] = "SIGPROF";
+#endif
+#if defined (SIGWINCH) /* window changed */
+ signames[SIGWINCH] = "SIGWINCH";
+#endif
+#if defined (SIGLOST) /* resource lost (eg, record-lock lost) */
+ signames[SIGLOST] = "SIGLOST";
+#endif
+#if defined (SIGUSR1) /* user defined signal 1 */
+ signames[SIGUSR1] = "SIGUSR1";
+#endif
+#if defined (SIGUSR2) /* user defined signal 2 */
+ signames[SIGUSR2] = "SIGUSR2";
+#endif
+#if defined (SIGMSG) /* HFT input data pending */
+ signames[SIGMSG] = "SIGMSG";
+#endif
+#if defined (SIGPWR) /* power failure imminent (save your data) */
+ signames[SIGPWR] = "SIGPWR";
+#endif
+#if defined (SIGDANGER) /* system crash imminent */
+ signames[SIGDANGER] = "SIGDANGER";
+#endif
+#if defined (SIGMIGRATE) /* migrate process to another CPU */
+ signames[SIGMIGRATE] = "SIGMIGRATE";
+#endif
+#if defined (SIGPRE) /* programming error */
+ signames[SIGPRE] = "SIGPRE";
+#endif
+#if defined (SIGGRANT) /* HFT monitor mode granted */
+ signames[SIGGRANT] = "SIGGRANT";
+#endif
+#if defined (SIGRETRACT) /* HFT monitor mode retracted */
+ signames[SIGRETRACT] = "SIGRETRACT";
+#endif
+#if defined (SIGSOUND) /* HFT sound sequence has completed */
+ signames[SIGSOUND] = "SIGSOUND";
+#endif
+
+ for (i = 0; i < NSIG; i++)
+ if (signames[i] == (char *)NULL) {
+ signames[i] = (char *)malloc (16);;
+ sprintf (signames[i], "signal %d", i);
+ }
+}
diff --git a/CWRU/sh-redir-hack b/CWRU/sh-redir-hack
new file mode 100644
index 0000000..413b297
--- /dev/null
+++ b/CWRU/sh-redir-hack
@@ -0,0 +1,15 @@
+Add to `subshell' production in parse.y and recompile -DREDIRECTION_HACK to
+get `< xx (command)' sh compatibility.
+
+ | redirections '(' list ')'
+ {
+#if defined (REDIRECTION_HACK)
+ /* XXX - C News sh compatibility hack - XXX */
+ $3->redirects = $1;
+ $3->flags |= CMD_WANT_SUBSHELL;
+ $$ = $3;
+#else
+ yyerror ();
+ YYABORT;
+#endif
+ }
diff --git a/ChangeLog b/ChangeLog
new file mode 120000
index 0000000..12c9a28
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1 @@
+CWRU/changelog \ No newline at end of file
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..b6293fc
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,410 @@
+Basic Installation
+==================
+
+These are installation instructions for Bash.
+
+The simplest way to compile Bash is:
+
+ 1. `cd' to the directory containing the source code and type
+ `./configure' to configure Bash for your system. If you're using
+ `csh' on an old version of System V, you might need to type `sh
+ ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes some time. While running, it prints
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile Bash and build the `bashbug' bug reporting
+ script.
+
+ 3. Optionally, type `make tests' to run the Bash test suite.
+
+ 4. Type `make install' to install `bash' and `bashbug'. This will
+ also install the manual pages and Info file.
+
+The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package
+(the top directory, the `builtins', `doc', and `support' directories,
+each directory under `lib', and several others). It also creates a
+`config.h' file containing system-dependent definitions. Finally, it
+creates a shell script named `config.status' that you can run in the
+future to recreate the current configuration, a file `config.cache'
+that saves the results of its tests to speed up reconfiguring, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure'). If at some point `config.cache' contains
+results you don't want to keep, you may remove or edit it.
+
+To find out more about the options and arguments that the `configure'
+script understands, type
+
+ bash-2.04$ ./configure --help
+
+at the Bash prompt in your Bash source directory.
+
+If you need to do unusual things to compile Bash, please try to figure
+out how `configure' could check whether or not to do them, and mail
+diffs or instructions to <bash-maintainers@gnu.org> so they can be
+considered for the next release.
+
+The file `configure.in' is used to create `configure' by a program
+called Autoconf. You only need `configure.in' if you want to change it
+or regenerate `configure' using a newer version of Autoconf. If you do
+this, make sure you are using Autoconf version 2.50 or newer.
+
+You can remove the program binaries and object files from the source
+code directory by typing `make clean'. To also remove the files that
+`configure' created (so you can compile Bash for a different kind of
+computer), type `make distclean'.
+
+Compilers and Options
+=====================
+
+Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. You can give `configure'
+initial values for variables by setting them in the environment. Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+
+ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+On systems that have the `env' program, you can do it like this:
+
+ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+The configuration process uses GCC to build Bash if it is available.
+
+Compiling For Multiple Architectures
+====================================
+
+You can compile Bash for more than one kind of computer at the same
+time, by placing the object files for each architecture in their own
+directory. To do this, you must use a version of `make' that supports
+the `VPATH' variable, such as GNU `make'. `cd' to the directory where
+you want the object files and executables to go and run the `configure'
+script from the source directory. You may need to supply the
+`--srcdir=PATH' argument to tell `configure' where the source files
+are. `configure' automatically checks for the source code in the
+directory that `configure' is in and in `..'.
+
+If you have to use a `make' that does not supports the `VPATH'
+variable, you can compile Bash for one architecture at a time in the
+source code directory. After you have installed Bash for one
+architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+Alternatively, if your system supports symbolic links, you can use the
+`support/mkclone' script to create a build tree which has symbolic
+links back to each file in the source directory. Here's an example
+that creates a build directory in the current directory from a source
+directory `/usr/gnu/src/bash-2.0':
+
+ bash /usr/gnu/src/bash-2.0/support/mkclone -s /usr/gnu/src/bash-2.0 .
+
+The `mkclone' script requires Bash, so you must have already built Bash
+for at least one architecture before you can create build directories
+for other architectures.
+
+Installation Names
+==================
+
+By default, `make install' will install into `/usr/local/bin',
+`/usr/local/man', etc. You can specify an installation prefix other
+than `/usr/local' by giving `configure' the option `--prefix=PATH', or
+by specifying a value for the `DESTDIR' `make' variable when running
+`make install'.
+
+You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', `make install' will
+use PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+Specifying the System Type
+==========================
+
+There may be some features `configure' can not figure out
+automatically, but need to determine by the type of host Bash will run
+on. Usually `configure' can figure that out, but if it prints a
+message saying it can not guess the host type, give it the
+`--host=TYPE' option. `TYPE' can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+`CPU-COMPANY-SYSTEM' (e.g., `i386-unknown-freebsd4.2').
+
+See the file `support/config.sub' for the possible values of each field.
+
+Sharing Defaults
+================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'. `configure'
+looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: the Bash `configure' looks for a site script, but not all
+`configure' scripts do.
+
+Operation Controls
+==================
+
+`configure' recognizes the following options to control how it operates.
+
+`--cache-file=FILE'
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
+
+`--help'
+ Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made.
+
+`--srcdir=DIR'
+ Look for the Bash source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--version'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`configure' also accepts some other, not widely used, boilerplate
+options. `configure --help' prints the complete list.
+
+Optional Features
+=================
+
+The Bash `configure' has a number of `--enable-FEATURE' options, where
+FEATURE indicates an optional part of Bash. There are also several
+`--with-PACKAGE' options, where PACKAGE is something like `bash-malloc'
+or `purify'. To turn off the default use of a package, use
+`--without-PACKAGE'. To configure Bash without a feature that is
+enabled by default, use `--disable-FEATURE'.
+
+Here is a complete list of the `--enable-' and `--with-' options that
+the Bash `configure' recognizes.
+
+`--with-afs'
+ Define if you are using the Andrew File System from Transarc.
+
+`--with-bash-malloc'
+ Use the Bash version of `malloc' in the directory `lib/malloc'.
+ This is not the same `malloc' that appears in GNU libc, but an
+ older version originally derived from the 4.2 BSD `malloc'. This
+ `malloc' is very fast, but wastes some space on each allocation.
+ This option is enabled by default. The `NOTES' file contains a
+ list of systems for which this should be turned off, and
+ `configure' disables this option automatically for a number of
+ systems.
+
+`--with-curses'
+ Use the curses library instead of the termcap library. This should
+ be supplied if your system has an inadequate or incomplete termcap
+ database.
+
+`--with-gnu-malloc'
+ A synonym for `--with-bash-malloc'.
+
+`--with-installed-readline[=PREFIX]'
+ Define this to make Bash link with a locally-installed version of
+ Readline rather than the version in `lib/readline'. This works
+ only with Readline 5.0 and later versions. If PREFIX is `yes' or
+ not supplied, `configure' uses the values of the make variables
+ `includedir' and `libdir', which are subdirectories of `prefix' by
+ default, to find the installed version of Readline if it is not in
+ the standard system include and library directories. If PREFIX is
+ `no', Bash links with the version in `lib/readline'. If PREFIX is
+ set to any other value, `configure' treats it as a directory
+ pathname and looks for the installed version of Readline in
+ subdirectories of that directory (include files in
+ PREFIX/`include' and the library in PREFIX/`lib').
+
+`--with-purify'
+ Define this to use the Purify memory allocation checker from
+ Rational Software.
+
+`--enable-minimal-config'
+ This produces a shell with minimal features, close to the
+ historical Bourne shell.
+
+There are several `--enable-' options that alter how Bash is compiled
+and linked, rather than changing run-time features.
+
+`--enable-largefile'
+ Enable support for large files
+ (http://www.sas.com/standards/large_file/x_open.20Mar96.html) if
+ the operating system requires special compiler options to build
+ programs which can access large files. This is enabled by
+ default, if the operating system provides large file support.
+
+`--enable-profiling'
+ This builds a Bash binary that produces profiling information to be
+ processed by `gprof' each time it is executed.
+
+`--enable-static-link'
+ This causes Bash to be linked statically, if `gcc' is being used.
+ This could be used to build a version to use as root's shell.
+
+The `minimal-config' option can be used to disable all of the following
+options, but it is processed first, so individual options may be
+enabled using `enable-FEATURE'.
+
+All of the following options except for `disabled-builtins' and
+`xpg-echo-default' are enabled by default, unless the operating system
+does not provide the necessary support.
+
+`--enable-alias'
+ Allow alias expansion and include the `alias' and `unalias'
+ builtins (*note Aliases::).
+
+`--enable-arith-for-command'
+ Include support for the alternate form of the `for' command that
+ behaves like the C language `for' statement (*note Looping
+ Constructs::).
+
+`--enable-array-variables'
+ Include support for one-dimensional array shell variables (*note
+ Arrays::).
+
+`--enable-bang-history'
+ Include support for `csh'-like history substitution (*note History
+ Interaction::).
+
+`--enable-brace-expansion'
+ Include `csh'-like brace expansion ( `b{a,b}c' ==> `bac bbc' ).
+ See *note Brace Expansion::, for a complete description.
+
+`--enable-casemod-attributes'
+ Include support for case-modifying attributes in the `declare'
+ builtin and assignment statements. Variables with the UPPERCASE
+ attribute, for example, will have their values converted to
+ uppercase upon assignment.
+
+`--enable-casemod-expansion'
+ Include support for case-modifying word expansions.
+
+`--enable-command-timing'
+ Include support for recognizing `time' as a reserved word and for
+ displaying timing statistics for the pipeline following `time'
+ (*note Pipelines::). This allows pipelines as well as shell
+ builtins and functions to be timed.
+
+`--enable-cond-command'
+ Include support for the `[[' conditional command. (*note
+ Conditional Constructs::).
+
+`--enable-cond-regexp'
+ Include support for matching POSIX regular expressions using the
+ `=~' binary operator in the `[[' conditional command. (*note
+ Conditional Constructs::).
+
+`--enable-coprocesses'
+ Include support for coprocesses and the `coproc' reserved word
+ (*note Pipelines::).
+
+`--enable-debugger'
+ Include support for the bash debugger (distributed separately).
+
+`--enable-directory-stack'
+ Include support for a `csh'-like directory stack and the `pushd',
+ `popd', and `dirs' builtins (*note The Directory Stack::).
+
+`--enable-disabled-builtins'
+ Allow builtin commands to be invoked via `builtin xxx' even after
+ `xxx' has been disabled using `enable -n xxx'. See *note Bash
+ Builtins::, for details of the `builtin' and `enable' builtin
+ commands.
+
+`--enable-dparen-arithmetic'
+ Include support for the `((...))' command (*note Conditional
+ Constructs::).
+
+`--enable-extended-glob'
+ Include support for the extended pattern matching features
+ described above under *note Pattern Matching::.
+
+`--enable-extended-glob-default'
+ Set the default value of the EXTGLOB shell option described above
+ under *note The Shopt Builtin:: to be enabled.
+
+`--enable-help-builtin'
+ Include the `help' builtin, which displays help on shell builtins
+ and variables (*note Bash Builtins::).
+
+`--enable-history'
+ Include command history and the `fc' and `history' builtin
+ commands (*note Bash History Facilities::).
+
+`--enable-job-control'
+ This enables the job control features (*note Job Control::), if
+ the operating system supports them.
+
+`--enable-multibyte'
+ This enables support for multibyte characters if the operating
+ system provides the necessary support.
+
+`--enable-net-redirections'
+ This enables the special handling of filenames of the form
+ `/dev/tcp/HOST/PORT' and `/dev/udp/HOST/PORT' when used in
+ redirections (*note Redirections::).
+
+`--enable-process-substitution'
+ This enables process substitution (*note Process Substitution::) if
+ the operating system provides the necessary support.
+
+`--enable-progcomp'
+ Enable the programmable completion facilities (*note Programmable
+ Completion::). If Readline is not enabled, this option has no
+ effect.
+
+`--enable-prompt-string-decoding'
+ Turn on the interpretation of a number of backslash-escaped
+ characters in the `$PS1', `$PS2', `$PS3', and `$PS4' prompt
+ strings. See *note Printing a Prompt::, for a complete list of
+ prompt string escape sequences.
+
+`--enable-readline'
+ Include support for command-line editing and history with the Bash
+ version of the Readline library (*note Command Line Editing::).
+
+`--enable-restricted'
+ Include support for a "restricted shell". If this is enabled,
+ Bash, when called as `rbash', enters a restricted mode. See *note
+ The Restricted Shell::, for a description of restricted mode.
+
+`--enable-select'
+ Include the `select' builtin, which allows the generation of simple
+ menus (*note Conditional Constructs::).
+
+`--enable-separate-helpfiles'
+ Use external files for the documentation displayed by the `help'
+ builtin instead of storing the text internally.
+
+`--enable-single-help-strings'
+ Store the text displayed by the `help' builtin as a single string
+ for each help topic. This aids in translating the text to
+ different languages. You may need to disable this if your
+ compiler cannot handle very long string literals.
+
+`--enable-strict-posix-default'
+ Make Bash POSIX-conformant by default (*note Bash POSIX Mode::).
+
+`--enable-usg-echo-default'
+ A synonym for `--enable-xpg-echo-default'.
+
+`--enable-xpg-echo-default'
+ Make the `echo' builtin expand backslash-escaped characters by
+ default, without requiring the `-e' option. This sets the default
+ value of the `xpg_echo' shell option to `on', which makes the Bash
+ `echo' behave more like the version specified in the Single Unix
+ Specification, version 3. *Note Bash Builtins::, for a
+ description of the escape sequences that `echo' recognizes.
+
+The file `config-top.h' contains C Preprocessor `#define' statements
+for options which are not settable from `configure'. Some of these are
+not meant to be changed; beware of the consequences if you do. Read
+the comments associated with each definition for more information about
+its effect.
diff --git a/MANIFEST b/MANIFEST
new file mode 100644
index 0000000..e42d7d7
--- /dev/null
+++ b/MANIFEST
@@ -0,0 +1,1131 @@
+#
+# 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/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/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/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/eaccess.c f
+lib/sh/fdprintf.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/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/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/vprint.c f
+lib/sh/wcsdup.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/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/sv.gmo f
+po/sv.po f
+po/tr.gmo f
+po/tr.po f
+po/vi.gmo f
+po/vi.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/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/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/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/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/cond.tests f
+tests/cond.right f
+tests/cond-regexp.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-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/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/exp.tests f
+tests/exp.right f
+tests/exp1.sub f
+tests/exp2.sub f
+tests/exp3.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/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/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/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/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-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/posixpat.tests f
+tests/posixpat.right f
+tests/prec.right f
+tests/precedence f
+tests/printf.tests f
+tests/printf.right f
+tests/printf2.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/rhs-exp.tests f
+tests/rhs-exp.right 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-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-posixpat 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/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/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
diff --git a/MANIFEST.doc b/MANIFEST.doc
new file mode 100644
index 0000000..736ad5b
--- /dev/null
+++ b/MANIFEST.doc
@@ -0,0 +1,24 @@
+#
+# Master Manifest file for documentation-only distribution
+#
+doc d
+MANIFEST.doc f
+doc/article.ps f
+doc/rose94.ps f
+doc/bash.ps f
+doc/bashbug.ps f
+doc/builtins.ps f
+doc/rbash.ps f
+doc/bashref.ps f
+doc/bashref.dvi f
+doc/bash.0 f
+doc/bashbug.0 f
+doc/builtins.0 f
+doc/rbash.0 f
+doc/article.txt f
+doc/bash.html f
+doc/bashref.html f
+doc/article.pdf f
+doc/bash.pdf f
+doc/bashref.pdf f
+doc/rose94.pdf f
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..f01d49c
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,1526 @@
+# Makefile for bash-4.0, version 3.5
+#
+# Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure the first target in the makefile is the right one
+all: .made
+
+PACKAGE = @PACKAGE_NAME@
+VERSION = @PACKAGE_VERSION@
+
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+
+# Include some boilerplate Gnu makefile definitions.
+prefix = @prefix@
+
+exec_prefix = @exec_prefix@
+
+datarootdir = @datarootdir@
+
+bindir = @bindir@
+libdir = @libdir@
+infodir = @infodir@
+includedir = @includedir@
+datadir = @datadir@
+localedir = @localedir@
+
+mandir = @mandir@
+manpfx = man
+
+man1ext = .1
+man1dir = $(mandir)/$(manpfx)1
+man3ext = .3
+man3dir = $(mandir)/$(manpfx)3
+
+htmldir = @htmldir@
+
+# Support an alternate destination root directory for package building
+DESTDIR =
+
+topdir = @top_srcdir@
+BUILD_DIR = @BUILD_DIR@
+top_builddir = @BUILD_DIR@
+srcdir = @srcdir@
+VPATH = .:@srcdir@
+
+@SET_MAKE@
+CC = @CC@
+CC_FOR_BUILD = @CC_FOR_BUILD@
+YACC = @YACC@
+SHELL = @MAKE_SHELL@
+CP = cp
+RM = rm -f
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+RANLIB = @RANLIB@
+SIZE = @SIZE@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALLMODE= -m 0755
+INSTALLMODE2 = -m 0555
+
+TESTSCRIPT = @TESTSCRIPT@
+
+DEBUGGER_START_FILE = @DEBUGGER_START_FILE@
+
+#If you have purify, and want to use it, uncomment this definition or
+# run the make as `make PURIFY=purify'
+# or run configure with the --with-purify argument.
+PURIFY = @PURIFY@
+
+# Here is a rule for making .o files from .c files that does not
+# force the type of the machine (like -M_MACHINE) into the flags.
+.c.o:
+ $(RM) $@
+ $(CC) $(CCFLAGS) -c $<
+
+EXEEXT = @EXEEXT@
+OBJEXT = @OBJEXT@
+
+# The name of this program and some version information.
+VERSPROG = bashversion$(EXEEXT)
+VERSOBJ = bashversion.$(OBJEXT)
+
+Program = bash$(EXEEXT)
+Version = @BASHVERS@
+PatchLevel = `$(BUILD_DIR)/$(VERSPROG) -p`
+RELSTATUS = @RELSTATUS@
+
+Machine = @host_cpu@
+OS = @host_os@
+VENDOR = @host_vendor@
+MACHTYPE = @host@
+
+# comment out for release
+DEBUG = @DEBUG@
+MALLOC_DEBUG = @MALLOC_DEBUG@
+
+THIS_SH = $(BUILD_DIR)/$(Program)
+
+# PROFILE_FLAGS is either -pg, to generate profiling info for use
+# with gprof, or nothing (the default).
+PROFILE_FLAGS= @PROFILE_FLAGS@
+
+CFLAGS = @CFLAGS@
+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ @CROSS_COMPILE@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
+LOCAL_CFLAGS = @LOCAL_CFLAGS@ ${DEBUG} ${MALLOC_DEBUG}
+DEFS = @DEFS@
+LOCAL_DEFS = @LOCAL_DEFS@
+
+LOCALE_DEFS = -DLOCALEDIR='"$(localedir)"' -DPACKAGE='"$(PACKAGE)"'
+
+LOCAL_LIBS = @LOCAL_LIBS@
+LIBS = $(BUILTINS_LIB) $(LIBRARIES) @LIBS@
+LIBS_FOR_BUILD =
+
+STATIC_LD = @STATIC_LD@
+LOCAL_LDFLAGS = @LOCAL_LDFLAGS@
+
+SYSTEM_FLAGS = -DPROGRAM='"$(Program)"' -DCONF_HOSTTYPE='"$(Machine)"' -DCONF_OSTYPE='"$(OS)"' -DCONF_MACHTYPE='"$(MACHTYPE)"' -DCONF_VENDOR='"$(VENDOR)"' $(LOCALE_DEFS)
+
+BASE_CCFLAGS = $(PROFILE_FLAGS) $(SYSTEM_FLAGS) $(LOCAL_DEFS) \
+ $(DEFS) $(LOCAL_CFLAGS) $(INCLUDES)
+
+CCFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(CFLAGS)
+
+CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
+
+LDFLAGS = @LDFLAGS@ $(STATIC_LD) $(LOCAL_LDFLAGS) $(PROFILE_FLAGS) $(CFLAGS)
+LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD)
+
+INCLUDES = -I. @RL_INCLUDE@ -I$(srcdir) -I$(BASHINCDIR) -I$(LIBSRC) $(INTL_INC)
+
+# Maybe add: -Wextra
+GCC_LINT_FLAGS = -O -Wall -Wshadow -Wpointer-arith -Wcast-qual -Wno-parentheses \
+ -Wcast-align -Wstrict-prototypes -Wconversion -Wformat \
+ -Wformat-nonliteral -Wmissing-braces -Wuninitialized \
+ -Wmissing-declarations -Winline \
+ -Wmissing-prototypes -Wtraditional -Wredundant-decls -pedantic
+
+GCC_LINT_CFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(GCC_LINT_FLAGS)
+
+#
+# Support libraries
+#
+
+dot = .
+
+LIBSUBDIR = lib
+LIBSRC = $(srcdir)/$(LIBSUBDIR)
+
+LIBBUILD = ${BUILD_DIR}/${LIBSUBDIR}
+
+SUBDIR_INCLUDES = -I. @RL_INCLUDE@ -I$(topdir) -I$(topdir)/$(LIBSUBDIR)
+
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+
+# the bash library
+# the library is a mix of functions that the C library does not provide on
+# some platforms and general shell utility functions
+SH_LIBSRC = $(LIBSRC)/sh
+SH_LIBDIR = $(dot)/${LIBSUBDIR}/sh
+SH_ABSSRC = ${topdir}/${SH_LIBSRC}
+
+SHLIB_SOURCE = ${SH_LIBSRC}/clktck.c ${SH_LIBSRC}/getcwd.c \
+ ${SH_LIBSRC}/getenv.c ${SH_LIBSRC}/oslib.c \
+ ${SH_LIBSRC}/setlinebuf.c \
+ ${SH_LIBSRC}/strcasecmp.c ${SH_LIBSRC}/strerror.c \
+ ${SH_LIBSRC}/strtod.c ${SH_LIBSRC}/strtol.c \
+ ${SH_LIBSRC}/strtoul.c ${SH_LIBSRC}/vprint.c \
+ ${SH_LIBSRC}/itos.c ${SH_LIBSRC}/rename.c \
+ ${SH_LIBSRC}/zread.c ${SH_LIBSRC}/zwrite.c \
+ ${SH_LIBSRC}/shtty.c ${SH_LIBSRC}/inet_aton.c \
+ ${SH_LIBSRC}/netopen.c ${SH_LIBSRC}/strpbrk.c \
+ ${SH_LIBSRC}/timeval.c ${SH_LIBSRC}/clock.c \
+ ${SH_LIBSRC}/makepath.c ${SH_LIBSRC}/pathcanon.c \
+ ${SH_LIBSRC}/pathphys.c ${SH_LIBSRC}/stringlist.c \
+ ${SH_LIBSRC}/stringvec.c ${SH_LIBSRC}/tmpfile.c \
+ ${SH_LIBSRC}/spell.c ${SH_LIBSRC}/strtrans.c \
+ ${SH_LIBSRC}/strcasestr.c ${SH_LIBSRC}/shquote.c \
+ ${SH_LIBSRC}/snprintf.c ${SH_LIBSRC}/mailstat.c \
+ ${SH_LIBSRC}/fmtulong.c ${SH_LIBSRC}/fmtullong.c \
+ ${SH_LIBSRC}/strtoll.c ${SH_LIBSRC}/strtoull.c \
+ ${SH_LIBSRC}/strtoimax.c ${SH_LIBSRC}/strtoumax.c \
+ ${SH_LIBSRC}/fmtumax.c ${SH_LIBSRC}/netconn.c \
+ ${SH_LIBSRC}/mktime.c ${SH_LIBSRC}/strftime.c \
+ ${SH_LIBSRC}/memset.c ${SH_LIBSRC}/mbschr.c \
+ ${SH_LIBSRC}/zcatfd.c ${SH_LIBSRC}/shmatch.c \
+ ${SH_LIBSRC}/strnlen.c ${SH_LIBSRC}/winsize.c \
+ ${SH_LIBSRC}/eaccess.c ${SH_LIBSRC}/wcsdup.c \
+ ${SH_LIBSRC}/zmapfd.c ${SH_LIBSRC}/fpurge.c \
+ ${SH_LIBSRC}/zgetline.c ${SH_LIBSRC}/mbscmp.c \
+ ${SH_LIBSRC}/casemod.c ${SH_LIBSRC}/uconvert.c \
+ ${SH_LIBSRC}/ufuncs.c ${SH_LIBSRC}/fdprintf.c \
+ ${SH_LIBSRC}/input_avail.c ${SH_LIBSRC}/mbscasecmp.c \
+ ${SH_LIBSRC}/fnxform.c
+
+SHLIB_LIB = -lsh
+SHLIB_LIBNAME = libsh.a
+SHLIB_LIBRARY = ${SH_LIBDIR}/${SHLIB_LIBNAME}
+SHLIB_LDFLAGS = -L${SH_LIBDIR}
+SHLIB_DEP = ${SHLIB_LIBRARY}
+
+# we assume for now that readline source is being shipped with bash
+RL_LIBSRC = $(LIBSRC)/readline
+RL_LIBDOC = $(RL_LIBSRC)/doc
+RL_LIBDIR = @RL_LIBDIR@
+RL_ABSSRC = ${topdir}/$(RL_LIBDIR)
+
+RL_INCLUDEDIR = @RL_INCLUDEDIR@
+
+READLINE_LIB = @READLINE_LIB@
+READLINE_LIBRARY = $(RL_LIBDIR)/libreadline.a
+READLINE_LDFLAGS = -L${RL_LIBDIR}
+READLINE_DEP = @READLINE_DEP@
+
+# The source, object and documentation of the GNU Readline library.
+READLINE_SOURCE = $(RL_LIBSRC)/rldefs.h $(RL_LIBSRC)/rlconf.h \
+ $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/tcap.h \
+ $(RL_LIBSRC)/chardefs.h $(RL_LIBSRC)/keymaps.h \
+ $(RL_LIBSRC)/history.h $(RL_LIBSRC)/histlib.h \
+ $(RL_LIBSRC)/posixstat.h $(RL_LIBSRC)/tilde.h \
+ $(RL_LIBSRC)/rlstdc.h ${RL_LIBSRC}/xmalloc.h \
+ $(RL_LIBSRC)/rlshell.h ${RL_LIBSRC}/rlprivate.h \
+ $(RL_LIBSRC)/funmap.c $(RL_LIBSRC)/emacs_keymap.c \
+ $(RL_LIBSRC)/search.c $(RL_LIBSRC)/vi_keymap.c \
+ $(RL_LIBSRC)/keymaps.c $(RL_LIBSRC)/parens.c \
+ $(RL_LIBSRC)/vi_mode.c $(RL_LIBSRC)/callback.c \
+ $(RL_LIBSRC)/readline.c $(RL_LIBSRC)/tilde.c \
+ $(RL_LIBSRC)/rltty.c $(RL_LIBSRC)/complete.c \
+ $(RL_LIBSRC)/bind.c $(RL_LIBSRC)/isearch.c \
+ $(RL_LIBSRC)/display.c $(RL_LIBSRC)/signals.c \
+ $(RL_LIBSRC)/util.c $(RL_LIBSRC)/kill.c $(RL_LIBSRC)/text.c \
+ $(RL_LIBSRC)/undo.c $(RL_LIBSRC)/macro.c \
+ $(RL_LIBSRC)/terminal.c $(RL_LIBSRC)/nls.c \
+ $(RL_LIBSRC)/input.c $(RL_LIBSRC)/xmalloc.c \
+ $(RL_LIBSRC)/shell.c $(RL_LIBSRC)/savestring.c \
+ $(RL_LIBSRC)/misc.c $(RL_LIBSRC)/mbutil.c $(RL_LIBSRC)/compat.c \
+ $(RL_LIBSRC)/histexpand.c $(RL_LIBSRC)/history.c \
+ $(RL_LIBSRC)/histsearch.c $(RL_LIBSRC)/histfile.c
+
+READLINE_OBJ = $(RL_LIBDIR)/readline.o $(RL_LIBDIR)/funmap.o \
+ $(RL_LIBDIR)/parens.o $(RL_LIBDIR)/search.o \
+ $(RL_LIBDIR)/keymaps.o $(RL_LIBDIR)/xmalloc.o \
+ $(RL_LIBDIR)/rltty.o $(RL_LIBDIR)/complete.o \
+ $(RL_LIBDIR)/bind.o $(RL_LIBDIR)/isearch.o \
+ $(RL_LIBDIR)/display.o $(RL_LIBDIR)/signals.o \
+ $(RL_LIBDIR)/tilde.o $(RL_LIBDIR)/util.o \
+ $(RL_LIBDIR)/kill.o $(RL_LIBDIR)/undo.o $(RL_LIBDIR)/nls.o \
+ $(RL_LIBDIR)/macro.o $(RL_LIBDIR)/input.o \
+ $(RL_LIBDIR)/terminal.o $(RL_LIBDIR)/callback.o \
+ $(RL_LIBDIR)/shell.o $(RL_LIBDIR)/savestring.o \
+ $(RL_LIBDIR)/mbutil.o $(RL_LIBDIR)/compat.o \
+ $(RL_LIBDIR)/history.o $(RL_LIBDIR)/histexpand.o \
+ $(RL_LIBDIR)/histsearch.o $(RL_LIBDIR)/histfile.o
+
+HIST_LIBSRC = $(LIBSRC)/readline
+HIST_LIBDIR = @HIST_LIBDIR@
+HIST_ABSSRC = ${topdir}/$(HIST_LIBDIR)
+
+HISTORY_LIB = @HISTORY_LIB@
+HISTORY_LIBRARY = $(HIST_LIBDIR)/libhistory.a
+HISTORY_LDFLAGS = -L$(HIST_LIBDIR)
+HISTORY_DEP = @HISTORY_DEP@
+
+# The source, object and documentation of the history library.
+HISTORY_SOURCE = $(HIST_LIBSRC)/history.c $(HIST_LIBSRC)/histexpand.c \
+ $(HIST_LIBSRC)/histsearch.c $(HIST_LIBSRC)/histfile.c \
+ $(HIST_LIBSRC)/shell.c \
+ $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/histlib.h
+HISTORY_OBJ = $(HIST_LIBDIR)/history.o $(HIST_LIBDIR)/histexpand.o \
+ $(HIST_LIBDIR)/histsearch.o $(HIST_LIBDIR)/histfile.o \
+ $(HIST_LIBDIR)/shell.o
+
+# You only need termcap (or curses) if you are linking with GNU Readline.
+TERM_LIBSRC = $(LIBSRC)/termcap
+TERM_LIBDIR = $(dot)/$(LIBSUBDIR)/termcap
+TERM_ABSSRC = ${topdir}/$(TERM_LIBDIR)
+
+TERMCAP_LIB = @TERMCAP_LIB@
+TERMCAP_LIBRARY = $(TERM_LIBDIR)/libtermcap.a
+TERMCAP_LDFLAGS = -L$(TERM_LIBDIR)
+TERMCAP_DEP = @TERMCAP_DEP@
+
+TERMCAP_SOURCE = $(TERM_LIBSRC)/termcap.c $(TERM_LIBSRC)/tparam.c
+TERMCAP_OBJ = $(TERM_LIBDIR)/termcap.o $(TERM_LIBDIR)/tparam.o
+
+GLOB_LIBSRC = $(LIBSRC)/glob
+GLOB_LIBDIR = $(dot)/$(LIBSUBDIR)/glob
+GLOB_ABSSRC = ${topdir}/$(GLOB_LIBDIR)
+
+GLOB_LIB = -lglob
+GLOB_LIBRARY = $(GLOB_LIBDIR)/libglob.a
+GLOB_LDFLAGS = -L$(GLOB_LIBDIR)
+GLOB_DEP = $(GLOB_LIBRARY)
+
+GLOB_SOURCE = $(GLOB_LIBSRC)/glob.c $(GLOB_LIBSRC)/strmatch.c \
+ $(GLOB_LIBSRC)/smatch.c $(GLOB_LIBSRC)/xmbsrtowcs.c \
+ $(GLOB_LIBSRC)/glob_loop.c $(GLOB_LIBSRC)/sm_loop.c \
+ $(GLOB_LIBSRC)/glob.h $(GLOB_LIBSRC)/strmatch.h
+GLOB_OBJ = $(GLOB_LIBDIR)/glob.o $(GLOB_LIBDIR)/strmatch.o \
+ $(GLOB_LIBDIR)/smatch.o $(GLOB_LIBDIR)/xmbsrtowcs.o
+
+# The source, object and documentation for the GNU Tilde library.
+TILDE_LIBSRC = $(LIBSRC)/tilde
+TILDE_LIBDIR = $(dot)/$(LIBSUBDIR)/tilde
+TILDE_ABSSRC = ${topdir}/$(TILDE_LIBDIR)
+
+TILDE_LIB = @TILDE_LIB@
+TILDE_LIBRARY = $(TILDE_LIBDIR)/libtilde.a
+TILDE_LDFLAGS = -L$(TILDE_LIBDIR)
+TILDE_DEP = $(TILDE_LIBRARY)
+
+TILDE_SOURCE = $(TILDE_LIBSRC)/tilde.c $(TILDE_LIBSRC)/tilde.h
+TILDE_OBJ = $(TILDE_LIBDIR)/tilde.o
+
+# libintl
+INTL_LIBSRC = $(LIBSRC)/intl
+INTL_LIBDIR = $(dot)/$(LIBSUBDIR)/intl
+INTL_ABSSRC = ${topdir}/$(INTL_LIB)
+INTL_BUILDDIR = ${LIBBUILD}/intl
+
+INTL_LIB = @LIBINTL@
+INTL_LIBRARY = $(INTL_LIBDIR)/libintl.a
+INTL_DEP = @INTL_DEP@
+INTL_INC = @INTL_INC@
+
+LIBINTL_H = @LIBINTL_H@
+
+# libiconv
+LIBICONV = @LIBICONV@
+
+# tests
+LIBINTL = @LIBINTL@
+LTLIBINTL = @LTLIBINTL@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+
+# Our malloc.
+MALLOC_TARGET = @MALLOC_TARGET@
+
+# set to alloca.o if we are using the C alloca in lib/malloc
+ALLOCA = @ALLOCA@
+
+ALLOC_LIBSRC = $(LIBSRC)/malloc
+ALLOC_LIBDIR = $(dot)/$(LIBSUBDIR)/malloc
+ALLOC_ABSSRC = ${topdir}/$(ALLOC_LIBDIR)
+
+MALLOC_SRC = @MALLOC_SRC@
+MALLOC_OTHERSRC = ${ALLOC_LIBSRC}/trace.c ${ALLOC_LIBSRC}/stats.c \
+ ${ALLOC_LIBSRC}/table.c ${ALLOC_LIBSRC}/watch.c
+MALLOC_SOURCE = ${ALLOC_LIBSRC}/${MALLOC_SRC} ${MALLOC_OTHERSRC}
+MALLOC_CFLAGS = -DRCHECK -Dbotch=programming_error ${MALLOC_DEBUG}
+
+MALLOC_LIB = @MALLOC_LIB@
+MALLOC_LIBRARY = @MALLOC_LIBRARY@
+MALLOC_LDFLAGS = @MALLOC_LDFLAGS@
+MALLOC_DEP = @MALLOC_DEP@
+
+ALLOC_HEADERS = $(ALLOC_LIBSRC)/getpagesize.h $(ALLOC_LIBSRC)/shmalloc.h \
+ $(ALLOC_LIBSRC)/imalloc.h $(ALLOC_LIBSRC)/mstats.h \
+ $(ALLOC_LIBSRC)/table.h $(ALLOC_LIBSRC)/watch.h
+
+$(MALLOC_LIBRARY): ${MALLOC_SOURCE} ${ALLOC_HEADERS} config.h
+ @(cd $(ALLOC_LIBDIR) && \
+ $(MAKE) $(MFLAGS) \
+ MALLOC_CFLAGS="$(MALLOC_CFLAGS)" ${MALLOC_TARGET} ) || exit 1
+
+BASHINCDIR = ${srcdir}/include
+BASHINCFILES = $(BASHINCDIR)/posixstat.h $(BASHINCDIR)/ansi_stdlib.h \
+ $(BASHINCDIR)/filecntl.h $(BASHINCDIR)/posixdir.h \
+ $(BASHINCDIR)/memalloc.h $(BASHINCDIR)/stdc.h \
+ $(BASHINCDIR)/posixjmp.h $(BASHINCDIR)/posixwait.h \
+ $(BASHINCDIR)/posixtime.h $(BASHINCDIR)/systimes.h \
+ $(BASHINCDIR)/unionwait.h $(BASHINCDIR)/maxpath.h \
+ $(BASHINCDIR)/shtty.h $(BASHINCDIR)/typemax.h \
+ $(BASHINCDIR)/ocache.h
+
+LIBRARIES = $(GLOB_LIB) $(SHLIB_LIB) $(READLINE_LIB) $(HISTORY_LIB) $(TERMCAP_LIB) \
+ $(TILDE_LIB) $(MALLOC_LIB) $(INTL_LIB) $(LIBICONV) $(LOCAL_LIBS)
+
+LIBDEP = $(GLOB_DEP) $(SHLIB_DEP) $(INTL_DEP) $(READLINE_DEP) $(HISTORY_DEP) $(TERMCAP_DEP) \
+ $(TILDE_DEP) $(MALLOC_DEP)
+
+LIBRARY_LDFLAGS = $(READLINE_LDFLAGS) $(HISTORY_LDFLAGS) $(GLOB_LDFLAGS) \
+ $(TILDE_LDFLAGS) $(MALLOC_LDFLAGS) $(SHLIB_LDFLAGS)
+
+#
+# The shell itself
+#
+
+# The main source code for the Bourne Again SHell.
+CSOURCES = shell.c eval.c parse.y general.c make_cmd.c print_cmd.c y.tab.c \
+ dispose_cmd.c execute_cmd.c variables.c $(GLOBC) version.c \
+ expr.c copy_cmd.c flags.c subst.c hashcmd.c hashlib.c mailcheck.c \
+ test.c trap.c alias.c jobs.c nojobs.c $(ALLOC_FILES) braces.c \
+ input.c bashhist.c array.c arrayfunc.c assoc.c sig.c pathexp.c \
+ unwind_prot.c siglist.c bashline.c bracecomp.c error.c \
+ list.c stringlib.c locale.c findcmd.c redir.c \
+ pcomplete.c pcomplib.c syntax.c xmalloc.c
+
+HSOURCES = shell.h flags.h trap.h hashcmd.h hashlib.h jobs.h builtins.h \
+ general.h variables.h config.h $(ALLOC_HEADERS) alias.h \
+ quit.h unwind_prot.h syntax.h ${GRAM_H} \
+ command.h input.h error.h bashansi.h dispose_cmd.h make_cmd.h \
+ subst.h externs.h siglist.h bashhist.h bashline.h bashtypes.h \
+ array.h arrayfunc.h sig.h mailcheck.h bashintl.h bashjmp.h \
+ execute_cmd.h parser.h pathexp.h pathnames.h pcomplete.h assoc.h \
+ $(BASHINCFILES)
+
+SOURCES = $(CSOURCES) $(HSOURCES) $(BUILTIN_DEFS)
+
+# header files chosen based on running of configure
+SIGNAMES_H = @SIGNAMES_H@
+
+# object files chosen based on running of configure
+JOBS_O = @JOBS_O@
+SIGLIST_O = @SIGLIST_O@
+SIGNAMES_O = @SIGNAMES_O@
+
+# Matching object files.
+OBJECTS = shell.o eval.o y.tab.o general.o make_cmd.o print_cmd.o $(GLOBO) \
+ dispose_cmd.o execute_cmd.o variables.o copy_cmd.o error.o \
+ expr.o flags.o $(JOBS_O) subst.o hashcmd.o hashlib.o mailcheck.o \
+ trap.o input.o unwind_prot.o pathexp.o sig.o test.o version.o \
+ alias.o array.o arrayfunc.o assoc.o braces.o bracecomp.o bashhist.o \
+ bashline.o $(SIGLIST_O) list.o stringlib.o locale.o findcmd.o redir.o \
+ pcomplete.o pcomplib.o syntax.o xmalloc.o $(SIGNAMES_O)
+
+# Where the source code of the shell builtins resides.
+BUILTIN_SRCDIR=$(srcdir)/builtins
+DEFSRC=$(BUILTIN_SRCDIR)
+BUILTIN_ABSSRC=${topdir}/builtins
+DEFDIR = $(dot)/builtins
+DEBUGGER_DIR = $(dot)/debugger
+
+BUILTIN_DEFS = $(DEFSRC)/alias.def $(DEFSRC)/bind.def $(DEFSRC)/break.def \
+ $(DEFSRC)/builtin.def $(DEFSRC)/cd.def $(DEFSRC)/colon.def \
+ $(DEFSRC)/command.def ${DEFSRC}/complete.def \
+ $(DEFSRC)/caller.def $(DEFSRC)/declare.def \
+ $(DEFSRC)/echo.def $(DEFSRC)/enable.def $(DEFSRC)/eval.def \
+ $(DEFSRC)/exec.def $(DEFSRC)/exit.def $(DEFSRC)/fc.def \
+ $(DEFSRC)/fg_bg.def $(DEFSRC)/hash.def $(DEFSRC)/help.def \
+ $(DEFSRC)/history.def $(DEFSRC)/jobs.def $(DEFSRC)/kill.def \
+ $(DEFSRC)/let.def $(DEFSRC)/read.def $(DEFSRC)/return.def \
+ $(DEFSRC)/set.def $(DEFSRC)/setattr.def $(DEFSRC)/shift.def \
+ $(DEFSRC)/source.def $(DEFSRC)/suspend.def $(DEFSRC)/test.def \
+ $(DEFSRC)/times.def $(DEFSRC)/trap.def $(DEFSRC)/type.def \
+ $(DEFSRC)/ulimit.def $(DEFSRC)/umask.def $(DEFSRC)/wait.def \
+ $(DEFSRC)/getopts.def $(DEFSRC)/reserved.def \
+ $(DEFSRC)/pushd.def $(DEFSRC)/shopt.def $(DEFSRC)/printf.def \
+ $(DEFSRC)/mapfile.def
+BUILTIN_C_SRC = $(DEFSRC)/mkbuiltins.c $(DEFSRC)/common.c \
+ $(DEFSRC)/evalstring.c $(DEFSRC)/evalfile.c \
+ $(DEFSRC)/bashgetopt.c $(GETOPT_SOURCE)
+BUILTIN_C_OBJ = $(DEFDIR)/common.o $(DEFDIR)/evalstring.o \
+ $(DEFDIR)/evalfile.o $(DEFDIR)/bashgetopt.o
+BUILTIN_OBJS = $(DEFDIR)/alias.o $(DEFDIR)/bind.o $(DEFDIR)/break.o \
+ $(DEFDIR)/builtin.o $(DEFDIR)/cd.o $(DEFDIR)/colon.o \
+ $(DEFDIR)/command.o $(DEFDIR)/caller.o $(DEFDIR)/declare.o \
+ $(DEFDIR)/echo.o $(DEFDIR)/enable.o $(DEFDIR)/eval.o \
+ $(DEFDIR)/exec.o $(DEFDIR)/exit.o $(DEFDIR)/fc.o \
+ $(DEFDIR)/fg_bg.o $(DEFDIR)/hash.o $(DEFDIR)/help.o \
+ $(DEFDIR)/history.o $(DEFDIR)/jobs.o $(DEFDIR)/kill.o \
+ $(DEFDIR)/let.o $(DEFDIR)/pushd.o $(DEFDIR)/read.o \
+ $(DEFDIR)/return.o $(DEFDIR)/shopt.o $(DEFDIR)/printf.o \
+ $(DEFDIR)/set.o $(DEFDIR)/setattr.o $(DEFDIR)/shift.o \
+ $(DEFDIR)/source.o $(DEFDIR)/suspend.o $(DEFDIR)/test.o \
+ $(DEFDIR)/times.o $(DEFDIR)/trap.o $(DEFDIR)/type.o \
+ $(DEFDIR)/ulimit.o $(DEFDIR)/umask.o $(DEFDIR)/wait.o \
+ $(DEFDIR)/getopts.o $(DEFDIR)/mapfile.o $(BUILTIN_C_OBJ)
+GETOPT_SOURCE = $(DEFSRC)/getopt.c $(DEFSRC)/getopt.h
+PSIZE_SOURCE = $(DEFSRC)/psize.sh $(DEFSRC)/psize.c
+
+BUILTINS_LIBRARY = $(DEFDIR)/libbuiltins.a
+BUILTINS_LIB = -lbuiltins
+BUILTINS_LDFLAGS = -L$(DEFDIR)
+BUILTINS_DEP = $(BUILTINS_LIBRARY)
+
+# Documentation for the shell.
+DOCSRC = $(srcdir)/doc
+DOCDIR = $(dot)/doc
+
+# Translations and other i18n support files
+PO_SRC = $(srcdir)/po/
+PO_DIR = $(dot)/po/
+
+SIGNAMES_SUPPORT = $(SUPPORT_SRC)mksignames.c
+
+SUPPORT_SRC = $(srcdir)/support/
+SDIR = $(dot)/support/
+
+TESTS_SUPPORT = recho$(EXEEXT) zecho$(EXEEXT) printenv$(EXEEXT) xcase$(EXEEXT)
+CREATED_SUPPORT = signames.h recho$(EXEEXT) zecho$(EXEEXT) printenv$(EXEEXT) \
+ tests/recho$(EXEEXT) tests/zecho$(EXEEXT) \
+ tests/printenv$(EXEEXT) xcase$(EXEEXT) tests/xcase$(EXEEXT) \
+ mksignames$(EXEEXT) lsignames.h \
+ mksyntax${EXEEXT} syntax.c $(VERSPROG) $(VERSOBJ) \
+ buildversion.o mksignames.o signames.o buildsignames.o
+CREATED_CONFIGURE = config.h config.cache config.status config.log \
+ stamp-h po/POTFILES
+CREATED_MAKEFILES = Makefile builtins/Makefile doc/Makefile \
+ lib/readline/Makefile lib/glob/Makefile \
+ lib/sh/Makefile lib/tilde/Makefile lib/malloc/Makefile \
+ lib/termcap/Makefile examples/loadables/Makefile \
+ examples/loadables/perl/Makefile support/Makefile \
+ lib/intl/Makefile po/Makefile po/Makefile.in
+
+# Keep GNU Make from exporting the entire environment for small machines.
+.NOEXPORT:
+
+.made: $(Program) bashbug
+ @echo "$(Program) last made for a $(Machine) running $(OS)" >.made
+
+$(Program): .build $(OBJECTS) $(BUILTINS_DEP) $(LIBDEP)
+ $(RM) $@
+ $(PURIFY) $(CC) $(BUILTINS_LDFLAGS) $(LIBRARY_LDFLAGS) $(LDFLAGS) -o $(Program) $(OBJECTS) $(LIBS)
+ ls -l $(Program)
+ -$(SIZE) $(Program)
+
+.build: $(SOURCES) config.h Makefile version.h $(VERSPROG)
+ @echo
+ @echo " ***********************************************************"
+ @echo " * *"
+ @echo " * `$(BUILD_DIR)/$(VERSPROG) -l`"
+ @echo " * *"
+ @echo " ***********************************************************"
+ @echo
+
+bashbug: $(SUPPORT_SRC)bashbug.sh config.h Makefile $(VERSPROG)
+ @sed -e "s%!MACHINE!%$(Machine)%" -e "s%!OS!%$(OS)%" \
+ -e "s%!CFLAGS!%$(CCFLAGS)%" -e "s%!CC!%$(CC)%" \
+ -e "s%!RELEASE!%$(Version)%" -e "s%!PATCHLEVEL!%$(PatchLevel)%" \
+ -e "s%!MACHTYPE!%$(MACHTYPE)%" -e "s%!RELSTATUS!%$(RELSTATUS)%" \
+ $(SUPPORT_SRC)bashbug.sh > $@
+ @chmod a+rx bashbug
+
+strip: $(Program) .made
+ strip $(Program)
+ ls -l $(Program)
+ -$(SIZE) $(Program)
+
+lint:
+ ${MAKE} ${MFLAGS} CFLAGS='${GCC_LINT_FLAGS}' .made
+
+version.h: $(SOURCES) config.h Makefile
+ $(SHELL) $(SUPPORT_SRC)mkversion.sh -b -S ${topdir} -s $(RELSTATUS) -d $(Version) -o newversion.h \
+ && mv newversion.h version.h
+
+bashversion$(EXEEXT): patchlevel.h conftypes.h version.h buildversion.o $(SUPPORT_SRC)bashversion.c
+ $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)bashversion.c buildversion.o ${LIBS_FOR_BUILD}
+
+buildversion.o: version.h conftypes.h patchlevel.h $(srcdir)/version.c
+ $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -DBUILDTOOL -c -o $@ $(srcdir)/version.c
+
+# old rules
+GRAM_H = parser-built
+y.tab.o: y.tab.c ${GRAM_H} command.h ${BASHINCDIR}/stdc.h input.h
+${GRAM_H}: y.tab.h
+ @-if test -f y.tab.h ; then \
+ cmp -s $@ y.tab.h 2>/dev/null || cp -p y.tab.h $@; \
+ fi
+y.tab.c y.tab.h: parse.y
+# -if test -f y.tab.h; then mv -f y.tab.h old-y.tab.h; fi
+ $(YACC) -d $(srcdir)/parse.y
+ touch parser-built
+# -if cmp -s old-y.tab.h y.tab.h; then mv old-y.tab.h y.tab.h; else cp -p y.tab.h ${GRAM_H}; fi
+
+# experimental new rules - work with GNU make but not BSD (or OSF) make
+#y.tab.o: y.tab.c y.tab.h
+#y.tab.c y.tab.h: parse.y command.h ${BASHINCDIR}/stdc.h input.h
+# -if test -f y.tab.h; then mv -f y.tab.h old-y.tab.h; fi
+# $(YACC) -d $(srcdir)/parse.y
+# -if cmp -s old-y.tab.h y.tab.h; then mv old-y.tab.h y.tab.h; fi
+
+$(READLINE_LIBRARY): config.h $(READLINE_SOURCE)
+ @echo making $@ in ${RL_LIBDIR}
+ @( { test "${RL_LIBDIR}" = "${libdir}" && exit 0; } || \
+ cd ${RL_LIBDIR} && $(MAKE) $(MFLAGS) libreadline.a) || exit 1
+
+$(HISTORY_LIBRARY): config.h $(HISTORY_SOURCE) $(READLINE_DEP)
+ @echo making $@ in ${HIST_LIBDIR}
+ @( { test "${HIST_LIBDIR}" = "${libdir}" && exit 0; } || \
+ cd ${HIST_LIBDIR} && $(MAKE) $(MFLAGS) libhistory.a) || exit 1
+
+$(GLOB_LIBRARY): config.h $(GLOB_SOURCE)
+ @echo making $@ in ${GLOB_LIBDIR}
+ @(cd ${GLOB_LIBDIR} && \
+ $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libglob.a) || exit 1
+
+$(TILDE_LIBRARY): config.h $(TILDE_SOURCE)
+ @echo making $@ in ${TILDE_LIBDIR}
+ @(cd ${TILDE_LIBDIR} && \
+ $(MAKE) $(MFLAGS) libtilde.a) || exit 1
+
+$(TERMCAP_LIBRARY): config.h ${TERMCAP_SOURCE}
+ @echo making $@ in ${TERM_LIBDIR}
+ @(cd ${TERM_LIBDIR} && \
+ $(MAKE) $(MFLAGS) libtermcap.a) || exit 1
+
+$(SHLIB_LIBRARY): config.h ${SHLIB_SOURCE}
+ @echo making $@ in ${SH_LIBDIR}
+ @(cd ${SH_LIBDIR} && \
+ $(MAKE) $(MFLAGS) DEBUG=${DEBUG} ${SHLIB_LIBNAME}) || exit 1
+
+${INTL_LIBRARY}: config.h ${INTL_LIBDIR}/Makefile
+ @echo making $@ in ${INTL_LIBDIR}
+ @(cd ${INTL_LIBDIR} && \
+ $(MAKE) $(MFLAGS) all) || exit 1
+
+${LIBINTL_H}: ${INTL_DEP}
+
+signames.o: $(SUPPORT_SRC)signames.c
+ $(RM) $@
+ $(CC) $(CCFLAGS) -c $(SUPPORT_SRC)signames.c
+
+buildsignames.o: $(SUPPORT_SRC)signames.c
+ $(RM) $@
+ $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -DBUILDTOOL -o $@ -c $(SUPPORT_SRC)signames.c
+
+mksignames.o: $(SUPPORT_SRC)mksignames.c
+ $(RM) $@
+ $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -DBUILDTOOL -c $(SUPPORT_SRC)mksignames.c
+
+mksignames$(EXEEXT): mksignames.o buildsignames.o
+ $(RM) $@
+ $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ mksignames.o buildsignames.o ${LIBS_FOR_BUILD}
+
+mksyntax$(EXEEXT): ${srcdir}/mksyntax.c config.h syntax.h ${BASHINCDIR}/chartypes.h
+ $(RM) $@
+ ${CC_FOR_BUILD} ${CCFLAGS_FOR_BUILD} -o $@ ${srcdir}/mksyntax.c ${LIBS_FOR_BUILD}
+
+# make a list of signals for the local system -- this is done when we're
+# *not* cross-compiling
+lsignames.h: mksignames$(EXEEXT)
+ $(RM) $@
+ ./mksignames$(EXEEXT) $@
+
+# copy the correct signames header file to signames.h
+signames.h: $(SIGNAMES_H)
+ -if cmp -s $(SIGNAMES_H) $@ ; then :; else $(RM) $@ ; $(CP) $(SIGNAMES_H) $@ ; fi
+
+syntax.c: mksyntax${EXEEXT} $(srcdir)/syntax.h
+ $(RM) $@
+ ./mksyntax$(EXEEXT) -o $@
+
+$(BUILTINS_LIBRARY): $(BUILTIN_DEFS) $(BUILTIN_C_SRC) config.h ${BASHINCDIR}/memalloc.h version.h
+ @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} libbuiltins.a ) || exit 1
+
+# these require special rules to circumvent make builtin rules
+${DEFDIR}/common.o: $(BUILTIN_SRCDIR)/common.c
+ @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} common.o) || exit 1
+
+${DEFDIR}/bashgetopt.o: $(BUILTIN_SRCDIR)/bashgetopt.c
+ @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) DEBUG=${DEBUG} bashgetopt.o) || exit 1
+
+${DEFDIR}/builtext.h: $(BUILTIN_DEFS)
+ @(cd $(DEFDIR) && $(MAKE) $(MFLAGS) builtext.h ) || exit 1
+
+# For the justification of the following Makefile rules, see node
+# `Automatic Remaking' in GNU Autoconf documentation.
+
+Makefile makefile: config.status $(srcdir)/Makefile.in
+ CONFIG_FILES=Makefile CONFIG_HEADERS= $(SHELL) ./config.status
+
+Makefiles makefiles: config.status $(srcdir)/Makefile.in
+ @for mf in $(CREATED_MAKEFILES); do \
+ CONFIG_FILES=$$mf CONFIG_HEADERS= $(SHELL) ./config.status ; \
+ done
+
+config.h: stamp-h
+
+stamp-h: config.status $(srcdir)/config.h.in $(srcdir)/config-top.h $(srcdir)/config-bot.h
+ CONFIG_FILES= CONFIG_HEADERS=config.h $(SHELL) ./config.status
+
+config.status: $(srcdir)/configure
+ $(SHELL) ./config.status --recheck
+
+pathnames.h: Makefile $(srcdir)/pathnames.h.in
+ @sed -e 's|@DEBUGGER_START_FILE\@|${DEBUGGER_START_FILE}|g' $(srcdir)/pathnames.h.in > pathnames.tmp
+ @if test -f $@; then \
+ cmp -s pathnames.tmp $@ || mv pathnames.tmp $@; \
+ else \
+ mv pathnames.tmp $@; \
+ fi
+ @${RM} pathnames.tmp
+
+# comment out for distribution
+$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/aclocal.m4 $(srcdir)/config.h.in
+ cd $(srcdir) && autoconf
+
+# for chet
+reconfig: force
+ sh $(srcdir)/configure -C
+
+#newversion: mkversion
+# $(RM) .build
+# ./mkversion -dir $(srcdir) -dist
+# mv -f newversion.h version.h
+# $(MAKE) -f $(srcdir)/Makefile $(MFLAGS) srcdir=$(srcdir)
+
+doc documentation: force
+ @(cd $(DOCDIR) ; $(MAKE) $(MFLAGS) )
+
+info dvi ps: force
+ @(cd $(DOCDIR) ; $(MAKE) $(MFLAGS) CFLAGS='$(CCFLAGS)' $@ )
+
+force:
+
+TAGS: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE)
+ etags $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE)
+
+tags: $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE)
+ ctags -x $(SOURCES) $(BUILTIN_C_SRC) $(LIBRARY_SOURCE) > $@
+
+# Targets that actually do things not part of the build
+
+installdirs:
+ @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(bindir)
+ @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(man1dir)
+ @${SHELL} $(SUPPORT_SRC)mkinstalldirs $(DESTDIR)$(infodir)
+ -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
+
+install: .made installdirs
+ $(INSTALL_PROGRAM) $(INSTALLMODE) $(Program) $(DESTDIR)$(bindir)/$(Program)
+ $(INSTALL_SCRIPT) $(INSTALLMODE2) bashbug $(DESTDIR)$(bindir)/bashbug
+ -( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \
+ man1dir=$(man1dir) man1ext=$(man1ext) \
+ man3dir=$(man3dir) man3ext=$(man3ext) \
+ infodir=$(infodir) htmldir=$(htmldir) DESTDIR=$(DESTDIR) $@ )
+ -( cd $(DEFDIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
+ -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
+
+install-strip:
+ $(MAKE) $(MFLAGS) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' \
+ prefix=${prefix} exec_prefix=${exec_prefix} \
+ DESTDIR=$(DESTDIR) install
+
+uninstall: .made
+ $(RM) $(DESTDIR)$(bindir)/$(Program) $(DESTDIR)$(bindir)/bashbug
+ -( cd $(DOCDIR) ; $(MAKE) $(MFLAGS) \
+ man1dir=$(man1dir) man1ext=$(man1ext) \
+ man3dir=$(man3dir) man3ext=$(man3ext) \
+ infodir=$(infodir) htmldir=$(htmldir) DESTDIR=$(DESTDIR) $@ )
+ -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
+
+.PHONY: basic-clean clean realclean maintainer-clean distclean mostlyclean maybe-clean
+
+LIB_SUBDIRS = ${RL_LIBDIR} ${HIST_LIBDIR} ${TERM_LIBDIR} ${GLOB_LIBDIR} \
+ ${INTL_LIBDIR} ${TILDE_LIBDIR} ${ALLOC_LIBDIR} ${SH_LIBDIR}
+
+basic-clean:
+ $(RM) $(OBJECTS) $(Program) bashbug
+ $(RM) .build .made version.h
+
+clean: basic-clean
+ ( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ )
+ ( cd builtins && $(MAKE) $(MFLAGS) $@ )
+ -( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ )
+ -for libdir in ${LIB_SUBDIRS}; do \
+ (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\
+ done
+ -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
+ $(RM) $(CREATED_SUPPORT)
+
+mostlyclean: basic-clean
+ ( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ )
+ ( cd builtins && $(MAKE) $(MFLAGS) $@ )
+ -( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ )
+ -for libdir in ${LIB_SUBDIRS}; do \
+ (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\
+ done
+ -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
+
+distclean: basic-clean maybe-clean
+ ( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ )
+ ( cd builtins && $(MAKE) $(MFLAGS) $@ )
+ -( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ )
+ -for libdir in ${LIB_SUBDIRS}; do \
+ (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\
+ done
+ -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
+ $(RM) $(CREATED_CONFIGURE) tags TAGS
+ $(RM) $(CREATED_SUPPORT) Makefile $(CREATED_MAKEFILES) pathnames.h
+
+maintainer-clean: basic-clean
+ @echo This command is intended for maintainers to use.
+ @echo It deletes files that may require special tools to rebuild.
+ $(RM) y.tab.c y.tab.h parser-built tags TAGS
+ ( cd $(DOCDIR) && $(MAKE) $(MFLAGS) $@ )
+ ( cd builtins && $(MAKE) $(MFLAGS) $@ )
+ ( cd $(SDIR) && $(MAKE) $(MFLAGS) $@ )
+ -for libdir in ${LIB_SUBDIRS}; do \
+ (cd $$libdir && test -f Makefile && $(MAKE) $(MFLAGS) $@) ;\
+ done
+ -( cd $(PO_DIR) ; $(MAKE) $(MFLAGS) DESTDIR=$(DESTDIR) $@ )
+ $(RM) $(CREATED_CONFIGURE) $(CREATED_MAKEFILES)
+ $(RM) $(CREATED_SUPPORT) Makefile pathnames.h
+
+maybe-clean:
+ -if test "X$(topdir)" != "X$(BUILD_DIR)" ; then \
+ $(RM) parser-built y.tab.c y.tab.h ; \
+ fi
+
+recho$(EXEEXT): $(SUPPORT_SRC)recho.c
+ @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)recho.c ${LIBS_FOR_BUILD}
+
+zecho$(EXEEXT): $(SUPPORT_SRC)zecho.c
+ @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)zecho.c ${LIBS_FOR_BUILD}
+
+printenv$(EXEEXT): $(SUPPORT_SRC)printenv.c
+ @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)printenv.c ${LIBS_FOR_BUILD}
+
+xcase$(EXEEXT): $(SUPPORT_SRC)xcase.c
+ @$(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(SUPPORT_SRC)xcase.c ${LIBS_FOR_BUILD}
+
+test tests check: force $(Program) $(TESTS_SUPPORT)
+ @-test -d tests || mkdir tests
+ @cp $(TESTS_SUPPORT) tests
+ @( cd $(srcdir)/tests && \
+ PATH=$(BUILD_DIR)/tests:$$PATH THIS_SH=$(THIS_SH) $(SHELL) ${TESTSCRIPT} )
+
+symlinks:
+ $(SHELL) $(SUPPORT_SRC)fixlinks -s $(srcdir)
+
+dist: force
+ @echo Bash distributions are created using $(srcdir)/support/mkdist.
+ @echo Here is a sample of the necessary commands:
+ @echo $(Program) $(srcdir)/support/mkdist -m $(srcdir)/MANIFEST -s $(srcdir) -r ${PACKAGE} $(PACKAGE_VERSION)
+ @echo tar cf $(PACKAGE)-${PACKAGE_VERSION}.tar ${PACKAGE}-$(PACKAGE_VERSION)
+ @echo gzip $(PACKAGE)-$(PACKAGE_VERSION).tar
+
+depend: depends
+
+depends: force
+ $(Program) $(SUPPORT_SRC)mkdep -c ${CC} -- ${CCFLAGS} ${CSOURCES}
+
+#### PRIVATE TARGETS ####
+hashtest: hashlib.c
+ $(CC) -DTEST_HASHING $(CCFLAGS) -o $@ $(srcdir)/hashlib.c
+
+############################ DEPENDENCIES ###############################
+
+# Files that depend on the definitions in config-top.h, which are not meant
+# to be changed
+bashhist.o: config-top.h
+shell.o: config-top.h
+input.o: config-top.h
+y.tab.o: config-top.h
+jobs.o: config-top.h
+nojobs.o: config-top.h
+execute_cmd.o: config-top.h
+variables.o: config-top.h
+builtins/command.o: config-top.h
+builtins/common.o: config-top.h
+builtins/break.o: config-top.h
+builtins/echo.o: config-top.h
+builtins/evalstring.o: config-top.h
+builtins/exit.o: config-top.h
+builtins/kill.o: config-top.h
+
+# shell basics
+copy_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+copy_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+copy_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+copy_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+dispose_cmd.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+dispose_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h
+dispose_cmd.o: error.h general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+dispose_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+dispose_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+dispose_cmd.o: ${BASHINCDIR}/ocache.h
+error.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h flags.h ${BASHINCDIR}/stdc.h error.h
+error.o: command.h general.h xmalloc.h externs.h input.h bashhist.h
+error.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+error.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+error.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+error.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+error.o: input.h execute_cmd.h
+eval.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h trap.h flags.h ${DEFSRC}/common.h
+eval.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+eval.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+eval.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+eval.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+eval.o: input.h execute_cmd.h
+execute_cmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+execute_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+execute_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+execute_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+execute_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+execute_cmd.o: ${BASHINCDIR}/memalloc.h ${GRAM_H} flags.h builtins.h jobs.h quit.h siglist.h
+execute_cmd.o: execute_cmd.h findcmd.h redir.h trap.h test.h pathexp.h
+execute_cmd.o: $(DEFSRC)/common.h ${DEFDIR}/builtext.h ${GLOB_LIBSRC}/strmatch.h
+execute_cmd.o: ${BASHINCDIR}/posixtime.h ${BASHINCDIR}/chartypes.h
+expr.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+expr.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+expr.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+expr.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+expr.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+expr.o: ${BASHINCDIR}/chartypes.h
+findcmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h
+findcmd.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/memalloc.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h
+findcmd.o: ${BASHINCDIR}/stdc.h error.h general.h xmalloc.h variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h
+findcmd.o: dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h externs.h
+findcmd.o: flags.h hashlib.h pathexp.h hashcmd.h
+findcmd.o: ${BASHINCDIR}/chartypes.h
+flags.o: config.h flags.h
+flags.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+flags.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+flags.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+flags.o: make_cmd.h subst.h sig.h pathnames.h externs.h bashhist.h
+general.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+general.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+general.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+general.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+general.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+general.o: ${BASHINCDIR}/maxpath.h ${BASHINCDIR}/posixtime.h
+general.o: ${BASHINCDIR}/chartypes.h
+hashcmd.o: config.h ${BASHINCDIR}/posixstat.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+hashcmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+hashcmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashcmd.h
+hashcmd.o: execute_cmd.h findcmd.h ${BASHINCDIR}/stdc.h pathnames.h hashlib.h
+hashlib.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+hashlib.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+hashlib.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+hashlib.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+hashlib.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+input.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+input.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h input.h error.h externs.h
+input.o: quit.h
+list.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+list.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+list.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+list.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+locale.o: config.h bashtypes.h bashintl.h ${LIBINTL_H} bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+locale.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+locale.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+locale.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+locale.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+locale.o: ${BASHINCDIR}/chartypes.h
+mailcheck.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+mailcheck.o: ${BASHINCDIR}/posixtime.h
+mailcheck.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+mailcheck.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+mailcheck.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+mailcheck.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+mailcheck.o: execute_cmd.h mailcheck.h
+make_cmd.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h bashansi.h
+make_cmd.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h error.h flags.h make_cmd.h
+make_cmd.o: variables.h arrayfunc.h conftypes.h array.h hashlib.h subst.h input.h externs.h
+make_cmd.o: jobs.h quit.h siglist.h syntax.h dispose_cmd.h
+make_cmd.o: ${BASHINCDIR}/shmbutil.h ${BASHINCDIR}/ocache.h
+y.tab.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/memalloc.h
+y.tab.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+y.tab.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+y.tab.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+y.tab.o: make_cmd.h subst.h sig.h pathnames.h externs.h test.h
+y.tab.o: trap.h flags.h parser.h input.h mailcheck.h $(DEFSRC)/common.h
+y.tab.o: $(DEFDIR)/builtext.h bashline.h bashhist.h jobs.h siglist.h alias.h
+pathexp.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+pathexp.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+pathexp.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+pathexp.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+pathexp.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+pathexp.o: pathexp.h flags.h
+pathexp.o: $(GLOB_LIBSRC)/glob.h $(GLOB_LIBSRC)/strmatch.h
+pathexp.o: ${BASHINCDIR}/shmbutil.h
+print_cmd.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+print_cmd.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+print_cmd.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+print_cmd.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+print_cmd.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+print_cmd.o: ${GRAM_H} $(DEFSRC)/common.h
+redir.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/filecntl.h
+redir.o: ${BASHINCDIR}/memalloc.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+redir.o: general.h xmalloc.h variables.h arrayfunc.h conftypes.h array.h hashlib.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h
+redir.o: dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h externs.h
+redir.o: flags.h execute_cmd.h redir.h input.h
+shell.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/filecntl.h
+shell.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+shell.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+shell.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+shell.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+shell.o: flags.h trap.h mailcheck.h builtins.h $(DEFSRC)/common.h
+shell.o: jobs.h siglist.h input.h execute_cmd.h findcmd.h bashhist.h bashline.h
+shell.o: ${GLOB_LIBSRC}/strmatch.h ${BASHINCDIR}/posixtime.h
+sig.o: config.h bashtypes.h
+sig.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+sig.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+sig.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+sig.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+sig.o: jobs.h siglist.h trap.h $(DEFSRC)/common.h bashline.h bashhist.h
+siglist.o: config.h bashtypes.h siglist.h trap.h
+stringlib.o: bashtypes.h ${BASHINCDIR}/chartypes.h
+stringlib.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+stringlib.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+stringlib.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+stringlib.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+stringlib.o: ${GLOB_LIBSRC}/glob.h ${GLOB_LIBSRC}/strmatch.h
+subst.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/posixstat.h
+subst.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+subst.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+subst.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+subst.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+subst.o: flags.h jobs.h siglist.h execute_cmd.h ${BASHINCDIR}/filecntl.h trap.h pathexp.h
+subst.o: mailcheck.h input.h $(DEFSRC)/getopt.h $(DEFSRC)/common.h
+subst.o: bashline.h bashhist.h ${GLOB_LIBSRC}/strmatch.h
+subst.o: ${BASHINCDIR}/chartypes.h
+subst.o: ${BASHINCDIR}/shmbutil.h
+subst.o: ${DEFDIR}/builtext.h
+test.o: bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h
+test.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+test.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+test.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+test.o: make_cmd.h subst.h sig.h pathnames.h externs.h test.h
+test.o: ${DEFSRC}/common.h
+trap.o: config.h bashtypes.h trap.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+trap.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+trap.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+trap.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+trap.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+trap.o: signames.h $(DEFSRC)/common.h
+trap.o: ${DEFDIR}/builtext.h jobs.h
+unwind_prot.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h command.h ${BASHINCDIR}/stdc.h
+unwind_prot.o: general.h xmalloc.h unwind_prot.h quit.h sig.h
+variables.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+variables.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+variables.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+variables.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+variables.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+variables.o: flags.h execute_cmd.h mailcheck.h input.h $(DEFSRC)/common.h
+variables.o: findcmd.h bashhist.h hashcmd.h pathexp.h
+variables.o: pcomplete.h ${BASHINCDIR}/chartypes.h
+variables.o: ${BASHINCDIR}/posixtime.h assoc.h
+version.o: conftypes.h patchlevel.h version.h
+xmalloc.o: config.h bashtypes.h ${BASHINCDIR}/ansi_stdlib.h error.h
+
+# job control
+
+jobs.o: config.h bashtypes.h trap.h ${BASHINCDIR}/filecntl.h input.h ${BASHINCDIR}/shtty.h
+jobs.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+jobs.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+jobs.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+jobs.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+jobs.o: execute_cmd.h make_cmd.h subst.h sig.h pathnames.h externs.h
+jobs.o: jobs.h flags.h $(DEFSRC)/common.h $(DEFDIR)/builtext.h
+jobs.o: ${BASHINCDIR}/posixwait.h ${BASHINCDIR}/unionwait.h
+jobs.o: ${BASHINCDIR}/posixtime.h
+nojobs.o: config.h bashtypes.h ${BASHINCDIR}/filecntl.h bashjmp.h ${BASHINCDIR}/posixjmp.h
+nojobs.o: command.h ${BASHINCDIR}/stdc.h general.h xmalloc.h jobs.h quit.h siglist.h externs.h
+nojobs.o: sig.h error.h ${BASHINCDIR}/shtty.h input.h
+nojobs.o: $(DEFDIR)/builtext.h
+
+# shell features that may be compiled in
+
+array.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+array.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+array.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+array.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+array.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+array.o: $(DEFSRC)/common.h
+arrayfunc.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+arrayfunc.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+arrayfunc.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+arrayfunc.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+arrayfunc.o: make_cmd.h subst.h sig.h pathnames.h externs.h pathexp.h
+arrayfunc.o: $(DEFSRC)/common.h
+arrayfunc.o: ${BASHINCDIR}/shmbutil.h
+assoc.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+assoc.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h
+assoc.o: command.h ${BASHINCDIR}/stdc.h error.h
+assoc.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h
+assoc.o: assoc.h hashlib.h
+assoc.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+assoc.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+assoc.o: $(DEFSRC)/common.h
+braces.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+braces.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+braces.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+braces.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+braces.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+braces.o: ${BASHINCDIR}/shmbutil.h
+alias.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h command.h ${BASHINCDIR}/stdc.h
+alias.o: general.h xmalloc.h bashtypes.h externs.h alias.h
+alias.o: pcomplete.h
+alias.o: ${BASHINCDIR}/chartypes.h
+
+pcomplib.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h bashtypes.h
+pcomplib.o: ${BASHINCDIR}/stdc.h hashlib.h pcomplete.h shell.h syntax.h
+pcomplib.o: bashjmp.h command.h general.h xmalloc.h error.h variables.h arrayfunc.h conftypes.h quit.h
+pcomplib.o: unwind_prot.h dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h
+pcomplib.o: externs.h ${BASHINCDIR}/maxpath.h
+
+pcomplete.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h bashtypes.h
+pcomplete.o: ${BASHINCDIR}/stdc.h hashlib.h pcomplete.h shell.h syntax.h
+pcomplete.o: bashjmp.h command.h general.h xmalloc.h error.h variables.h arrayfunc.h conftypes.h quit.h
+pcomplete.o: unwind_prot.h dispose_cmd.h make_cmd.h subst.h sig.h pathnames.h
+pcomplete.o: externs.h ${BASHINCDIR}/maxpath.h execute_cmd.h
+
+# library support files
+
+bashhist.o: config.h bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/posixstat.h
+bashhist.o: ${BASHINCDIR}/filecntl.h
+bashhist.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+bashhist.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+bashhist.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+bashhist.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+bashhist.o: flags.h input.h parser.h pathexp.h $(DEFSRC)/common.h bashline.h
+bashhist.o: $(GLOB_LIBSRC)/strmatch.h
+bashline.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+bashline.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h command.h ${BASHINCDIR}/stdc.h error.h
+bashline.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h array.h hashlib.h
+bashline.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+bashline.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+bashline.o: builtins.h bashhist.h bashline.h execute_cmd.h findcmd.h pathexp.h
+bashline.o: $(DEFSRC)/common.h $(GLOB_LIBSRC)/glob.h alias.h
+bashline.o: pcomplete.h ${BASHINCDIR}/chartypes.h input.h
+bracecomp.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+bracecomp.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h
+bracecomp.o: command.h ${BASHINCDIR}/stdc.h error.h
+bracecomp.o: general.h xmalloc.h bashtypes.h variables.h arrayfunc.h conftypes.h
+bracecomp.o: array.h hashlib.h alias.h builtins.h
+bracecomp.o: quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+bracecomp.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+
+# library dependencies
+
+bashline.o: $(RL_LIBSRC)/rlconf.h
+bashline.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/rlstdc.h
+bashline.o: $(RL_LIBSRC)/chardefs.h $(RL_LIBSRC)/readline.h
+bracecomp.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h
+bracecomp.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h
+y.tab.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h
+y.tab.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h
+subst.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/chardefs.h
+subst.o: $(RL_LIBSRC)/readline.h $(RL_LIBSRC)/rlstdc.h
+
+shell.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h
+subst.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h
+bashline.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h
+bashhist.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h
+y.tab.o: $(HIST_LIBSRC)/history.h $(HIST_LIBSRC)/rlstdc.h
+
+execute_cmd.o: $(TILDE_LIBSRC)/tilde.h
+general.o: $(TILDE_LIBSRC)/tilde.h
+mailcheck.o: $(TILDE_LIBSRC)/tilde.h
+shell.o: $(TILDE_LIBSRC)/tilde.h
+subst.o: $(TILDE_LIBSRC)/tilde.h
+variables.o: $(TILDE_LIBSRC)/tilde.h
+
+# libintl dependencies
+arrayfunc.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+bashhist.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+bashline.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+braces.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+error.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+eval.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+execute_cmd.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+expr.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+general.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+input.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+jobs.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+mailcheck.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+make_cmd.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+nojobs.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+parse.y: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+pcomplete.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+pcomplib.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+print_cmd.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+redir.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+shell.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+sig.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+siglist.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+subst.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+test.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+trap.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+variables.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+version.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+xmalloc.o: bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+
+signames.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+
+# XXX - dependencies checked through here
+
+# builtin c sources
+builtins/bashgetopt.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+builtins/bashgetopt.o: shell.h syntax.h config.h bashjmp.h command.h general.h xmalloc.h error.h
+builtins/bashgetopt.o: variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+builtins/bashgetopt.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+builtins/bashgetopt.o: $(DEFSRC)/common.h
+builtins/bashgetopt.o: ${BASHINCDIR}/chartypes.h
+builtins/common.o: bashtypes.h ${BASHINCDIR}/posixstat.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+builtins/common.o: shell.h syntax.h config.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h command.h
+builtins/common.o: ${BASHINCDIR}/memalloc.h variables.h arrayfunc.h conftypes.h input.h siglist.h
+builtins/common.o: quit.h unwind_prot.h ${BASHINCDIR}/maxpath.h jobs.h builtins.h
+builtins/common.o: dispose_cmd.h make_cmd.h subst.h externs.h bashhist.h
+builtins/common.o: execute_cmd.h ${BASHINCDIR}/stdc.h general.h xmalloc.h error.h pathnames.h
+builtins/common.o: ${DEFDIR}/builtext.h
+builtins/common.o: ${BASHINCDIR}/chartypes.h
+builtins/evalfile.o: bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+builtins/evalfile.o: shell.h syntax.h config.h bashjmp.h command.h general.h xmalloc.h error.h
+builtins/evalfile.o: variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+builtins/evalfile.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+builtins/evalfile.o: jobs.h builtins.h flags.h input.h execute_cmd.h
+builtins/evalfile.o: bashhist.h $(DEFSRC)/common.h
+builtins/evalstring.o: config.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+builtins/evalstring.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h command.h siglist.h
+builtins/evalstring.o: ${BASHINCDIR}/memalloc.h variables.h arrayfunc.h conftypes.h input.h
+builtins/evalstring.o: quit.h unwind_prot.h ${BASHINCDIR}/maxpath.h jobs.h builtins.h
+builtins/evalstring.o: dispose_cmd.h make_cmd.h subst.h externs.h
+builtins/evalstring.o: jobs.h builtins.h flags.h input.h execute_cmd.h
+builtins/evalstring.o: bashhist.h $(DEFSRC)/common.h pathnames.h
+builtins/getopt.o: config.h ${BASHINCDIR}/memalloc.h
+builtins/getopt.o: shell.h syntax.h bashjmp.h command.h general.h xmalloc.h error.h
+builtins/getopt.o: variables.h arrayfunc.h conftypes.h quit.h ${BASHINCDIR}/maxpath.h unwind_prot.h dispose_cmd.h
+builtins/getopt.o: make_cmd.h subst.h sig.h pathnames.h externs.h
+builtins/getopt.o: $(DEFSRC)/getopt.h
+builtins/mkbuiltins.o: config.h bashtypes.h ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h
+builtins/mkbuiltins.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+
+# builtin def files
+builtins/alias.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/alias.o: quit.h $(DEFSRC)/common.h pathnames.h
+builtins/alias.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h command.h ${BASHINCDIR}/stdc.h unwind_prot.h
+builtins/alias.o: dispose_cmd.h make_cmd.h subst.h externs.h variables.h arrayfunc.h conftypes.h
+builtins/bind.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/bind.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/bind.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h
+builtins/bind.o: $(DEFSRC)/bashgetopt.h pathnames.h
+builtins/break.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/break.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h
+builtins/break.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/break.o: pathnames.h
+builtins/builtin.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/builtin.o: quit.h $(DEFSRC)/common.h $(DEFSRC)/bashgetopt.h
+builtins/builtin.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/builtin.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/builtin.o: pathnames.h
+builtins/caller.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/caller.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/caller.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/caller.o: $(DEFSRC)/common.h quit.h
+builtins/caller.o: ${BASHINCDIR}/chartypes.h bashtypes.h
+builtins/caller.o: ${DEFDIR}/builtext.h pathnames.h
+builtins/cd.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/cd.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/cd.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/cd.o: $(DEFSRC)/common.h quit.h pathnames.h
+builtins/command.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/command.o: quit.h $(DEFSRC)/bashgetopt.h
+builtins/command.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/command.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h pathnames.h
+builtins/declare.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/declare.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h
+builtins/declare.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/declare.o: $(DEFSRC)/bashgetopt.h pathnames.h
+builtins/echo.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/echo.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h
+builtins/echo.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/echo.o: pathnames.h
+builtins/enable.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/enable.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h
+builtins/enable.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/enable.o: pcomplete.h pathnames.h
+builtins/eval.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/eval.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h
+builtins/eval.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/eval.o: pathnames.h
+builtins/exec.o: bashtypes.h pathnames.h
+builtins/exec.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/exec.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/exec.o: dispose_cmd.h make_cmd.h subst.h externs.h execute_cmd.h
+builtins/exec.o: findcmd.h flags.h quit.h $(DEFSRC)/common.h ${BASHINCDIR}/stdc.h
+builtins/exec.o: pathnames.h
+builtins/exit.o: bashtypes.h
+builtins/exit.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/exit.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h
+builtins/exit.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/exit.o: pathnames.h
+builtins/fc.o: bashtypes.h ${BASHINCDIR}/posixstat.h
+builtins/fc.o: bashansi.h ${BASHINCDIR}/ansi_stdlib.h builtins.h command.h ${BASHINCDIR}/stdc.h
+builtins/fc.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/fc.o: flags.h unwind_prot.h variables.h arrayfunc.h conftypes.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h
+builtins/fc.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h quit.h
+builtins/fc.o: $(DEFSRC)/bashgetopt.h bashhist.h pathnames.h
+builtins/fc.o: ${BASHINCDIR}/chartypes.h
+builtins/fg_bg.o: bashtypes.h $(DEFSRC)/bashgetopt.h
+builtins/fg_bg.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/fg_bg.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h
+builtins/fg_bg.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/fg_bg.o: pathnames.h
+builtins/getopts.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/getopts.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h
+builtins/getopts.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/getopts.o: pathnames.h
+builtins/hash.o: bashtypes.h
+builtins/hash.o: builtins.h command.h findcmd.h ${BASHINCDIR}/stdc.h $(DEFSRC)/common.h
+builtins/hash.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/hash.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h
+builtins/hash.o: pathnames.h
+builtins/help.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/help.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/help.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h
+builtins/help.o: $(GLOB_LIBSRC)/glob.h pathnames.h
+builtins/history.o: bashtypes.h pathnames.h
+builtins/history.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/history.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/history.o: ${BASHINCDIR}/filecntl.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h
+builtins/history.o: bashhist.h variables.h arrayfunc.h conftypes.h
+builtins/inlib.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/inlib.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h quit.h
+builtins/inlib.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/inlib.o: pathnames.h
+builtins/jobs.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/jobs.o: quit.h $(DEFSRC)/bashgetopt.h
+builtins/jobs.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/jobs.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/jobs.o: pathnames.h
+builtins/kill.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/kill.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/kill.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h trap.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/kill.o: pathnames.h
+builtins/let.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/let.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/let.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/let.o: pathnames.h
+builtins/printf.o: config.h ${BASHINCDIR}/memalloc.h bashjmp.h command.h error.h
+builtins/printf.o: general.h xmalloc.h quit.h dispose_cmd.h make_cmd.h subst.h
+builtins/printf.o: externs.h sig.h pathnames.h shell.h syntax.h unwind_prot.h
+builtins/printf.o: variables.h arrayfunc.h conftypes.h ${BASHINCDIR}/stdc.h $(DEFSRC)/bashgetopt.h
+builtins/printf.o: ${BASHINCDIR}/chartypes.h
+builtins/pushd.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/pushd.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/pushd.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/pushd.o: $(DEFSRC)/common.h pathnames.h
+builtins/read.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/read.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/read.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/read.o: pathnames.h
+builtins/return.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/return.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/return.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/return.o: pathnames.h
+builtins/set.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/set.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/set.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h flags.h
+builtins/set.o: pathnames.h
+builtins/setattr.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/setattr.o: quit.h $(DEFSRC)/common.h $(DEFSRC)/bashgetopt.h
+builtins/setattr.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/setattr.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/setattr.o: pathnames.h
+builtins/shift.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/shift.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/shift.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/shift.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/shift.o: pathnames.h
+builtins/shopt.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h
+builtins/shopt.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h
+builtins/shopt.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h unwind_prot.h variables.h arrayfunc.h conftypes.h ${BASHINCDIR}/maxpath.h
+builtins/shopt.o: $(DEFSRC)/common.h $(DEFSRC)/bashgetopt.h pathnames.h
+builtins/shopt.o: bashhist.h
+builtins/source.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/source.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/source.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/source.o: findcmd.h $(DEFSRC)/bashgetopt.h flags.h trap.h
+builtins/source.o: pathnames.h
+builtins/suspend.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/suspend.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/suspend.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/suspend.o: pathnames.h
+builtins/test.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/test.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/test.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/test.o: test.h pathnames.h
+builtins/times.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/times.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/times.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/times.o: pathnames.h
+builtins/trap.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/trap.o: quit.h $(DEFSRC)/common.h
+builtins/trap.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/trap.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/trap.o: pathnames.h
+builtins/type.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/type.o: quit.h $(DEFSRC)/common.h findcmd.h
+builtins/type.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/type.o: dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/type.o: pathnames.h
+builtins/ulimit.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/ulimit.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/ulimit.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/ulimit.o: pathnames.h
+builtins/umask.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/umask.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/umask.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/umask.o: ${BASHINCDIR}/chartypes.h pathnames.h
+builtins/wait.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/wait.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/wait.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/wait.o: ${BASHINCDIR}/chartypes.h pathnames.h
+
+builtins/complete.o: config.h shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h
+builtins/complete.o: unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/complete.o: bashtypes.h bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+builtins/complete.o: builtins.h pathnames.h
+builtins/complete.o: pcomplete.h
+builtins/complete.o: ${DEFSRC}/common.h ${DEFSRC}/bashgetopt.h
+builtins/mapfile.o: command.h config.h ${BASHINCDIR}/memalloc.h error.h general.h xmalloc.h ${BASHINCDIR}/maxpath.h
+builtins/mapfile.o: quit.h dispose_cmd.h make_cmd.h subst.h externs.h ${BASHINCDIR}/stdc.h
+builtins/mapfile.o: shell.h syntax.h bashjmp.h ${BASHINCDIR}/posixjmp.h sig.h unwind_prot.h variables.h arrayfunc.h conftypes.h
+builtins/mapfile.o: pathnames.h
+
+# libintl dependencies
+builtins/bind.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/break.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/caller.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/cd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/common.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/complete.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/declare.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/enable.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/evalfile.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/exec.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/exit.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/fc.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/fg_bg.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/getopt.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/hash.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/help.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/history.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/inlib.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/jobs.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/kill.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/let.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/mapfile.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/mkbuiltins.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/printf.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/pushd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/read.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/return.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/set.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/setattr.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/shift.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/shopt.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/source.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/suspend.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/type.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/ulimit.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+builtins/umask.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+
+# builtin library dependencies
+builtins/bind.o: $(RL_LIBSRC)/chardefs.h $(RL_LIBSRC)/readline.h
+builtins/bind.o: $(RL_LIBSRC)/keymaps.h $(RL_LIBSRC)/rlstdc.h
+
+builtins/bind.o: $(HIST_LIBSRC)/history.h $(RL_LIBSRC)/rlstdc.h
+builtins/fc.o: $(HIST_LIBSRC)/history.h $(RL_LIBSRC)/rlstdc.h
+builtins/history.o: $(HIST_LIBSRC)/history.h $(RL_LIBSRC)/rlstdc.h
+
+builtins/common.o: $(TILDE_LIBSRC)/tilde.h
+builtins/cd.o: $(TILDE_LIBSRC)/tilde.h
+
+builtins/alias.o: $(DEFSRC)/alias.def
+builtins/bind.o: $(DEFSRC)/bind.def
+builtins/break.o: $(DEFSRC)/break.def
+builtins/builtin.o: $(DEFSRC)/builtin.def
+builtins/caller.o: $(DEFSRC)/caller.def
+builtins/cd.o: $(DEFSRC)/cd.def
+builtins/colon.o: $(DEFSRC)/colon.def
+builtins/command.o: $(DEFSRC)/command.def
+builtins/complete.o: $(DEFSRC)/complete.def
+builtins/declare.o: $(DEFSRC)/declare.def
+builtins/echo.o: $(DEFSRC)/echo.def
+builtins/enable.o: $(DEFSRC)/enable.def
+builtins/eval.o: $(DEFSRC)/eval.def
+builtins/exec.o: $(DEFSRC)/exec.def
+builtins/exit.o: $(DEFSRC)/exit.def
+builtins/fc.o: $(DEFSRC)/fc.def
+builtins/fg_bg.o: $(DEFSRC)/fg_bg.def
+builtins/getopts.o: $(DEFSRC)/getopts.def
+builtins/hash.o: $(DEFSRC)/hash.def
+builtins/help.o: $(DEFSRC)/help.def
+builtins/history.o: $(DEFSRC)/history.def
+builtins/inlib.o: $(DEFSRC)/inlib.def
+builtins/jobs.o: $(DEFSRC)/jobs.def
+builtins/kill.o: $(DEFSRC)/kill.def
+builtins/let.o: $(DEFSRC)/let.def
+builtins/mapfile.o: $(DEFSRC)/mapfile.def
+builtins/pushd.o: $(DEFSRC)/pushd.def
+builtins/read.o: $(DEFSRC)/read.def
+builtins/reserved.o: $(DEFSRC)/reserved.def
+builtins/return.o: $(DEFSRC)/return.def
+builtins/set.o: $(DEFSRC)/set.def
+builtins/setattr.o: $(DEFSRC)/setattr.def
+builtins/shift.o: $(DEFSRC)/shift.def
+builtins/shopt.o: $(DEFSRC)/shopt.def
+builtins/source.o: $(DEFSRC)/source.def
+builtins/suspend.o: $(DEFSRC)/suspend.def
+builtins/test.o: $(DEFSRC)/test.def
+builtins/times.o: $(DEFSRC)/times.def
+builtins/trap.o: $(DEFSRC)/trap.def
+builtins/type.o: $(DEFSRC)/type.def
+builtins/ulimit.o: $(DEFSRC)/ulimit.def
+builtins/umask.o: $(DEFSRC)/umask.def
+builtins/wait.o: $(DEFSRC)/wait.def
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..8b1b7bc
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,1535 @@
+This is a terse description of the new features added to bash-4.1 since
+the release of bash-4.0. As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1. New Features in Bash
+
+a. Here-documents within $(...) command substitutions may once more be
+ delimited by the closing right paren, instead of requiring a newline.
+
+b. Bash's file status checks (executable, readable, etc.) now take file
+ system ACLs into account on file systems that support them.
+
+c. Bash now passes environment variables with names that are not valid
+ shell variable names through into the environment passed to child
+ processes.
+
+d. The `execute-unix-command' readline function now attempts to clear and
+ reuse the current line rather than move to a new one after the command
+ executes.
+
+e. `printf -v' can now assign values to array indices.
+
+f. New `complete -E' and `compopt -E' options that work on the "empty"
+ completion: completion attempted on an empty command line.
+
+g. New complete/compgen/compopt -D option to define a `default' completion:
+ a completion to be invoked on command for which no completion has been
+ defined. If this function returns 124, programmable completion is
+ attempted again, allowing a user to dynamically build a set of completions
+ as completion is attempted by having the default completion function
+ install individual completion functions each time it is invoked.
+
+h. When displaying associative arrays, subscripts are now quoted.
+
+i. Changes to dabbrev-expand to make it more `emacs-like': no space appended
+ after matches, completions are not sorted, and most recent history entries
+ are presented first.
+
+j. The [[ and (( commands are now subject to the setting of `set -e' and the
+ ERR trap.
+
+k. The source/. builtin now removes NUL bytes from the file before attempting
+ to parse commands.
+
+l. There is a new configuration option (in config-top.h) that forces bash to
+ forward all history entries to syslog.
+
+m. A new variable $BASHOPTS to export shell options settable using `shopt' to
+ child processes.
+
+n. There is a new confgure option that forces the extglob option to be
+ enabled by default.
+
+o. New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
+ output to that file descriptor.
+
+p. If the optional left-hand-side of a redirection is of the form {var}, the
+ shell assigns the file descriptor used to $var or uses $var as the file
+ descriptor to move or close, depending on the redirection operator.
+
+q. The < and > operators to the [[ conditional command now do string
+ comparison according to the current locale if the compatibility level
+ is greater than 40.
+
+r. Programmable completion now uses the completion for `b' instead of `a'
+ when completion is attempted on a line like: a $(b c.
+
+s. Force extglob on temporarily when parsing the pattern argument to
+ the == and != operators to the [[ command, for compatibility.
+
+t. Changed the behavior of interrupting the wait builtin when a SIGCHLD is
+ received and a trap on SIGCHLD is set to be Posix-mode only.
+
+u. The read builtin has a new `-N nchars' option, which reads exactly NCHARS
+ characters, ignoring delimiters like newline.
+
+v. The mapfile/readarray builtin no longer stores the commands it invokes via
+ callbacks in the history list.
+
+w. There is a new `compat40' shopt option.
+
+2. New Features in Readline
+
+a. New bindable function: menu-complete-backward.
+
+b. In the vi insertion keymap, C-n is now bound to menu-complete by default,
+ and C-p to menu-complete-backward.
+
+c. When in vi command mode, repeatedly hitting ESC now does nothing, even
+ when ESC introduces a bound key sequence. This is closer to how
+ historical vi behaves.
+
+d. New bindable function: skip-csi-sequence. Can be used as a default to
+ consume key sequences generated by keys like Home and End without having
+ to bind all keys.
+
+e. New application-settable function: rl_filename_rewrite_hook. Can be used
+ to rewite or modify filenames read from the file system before they are
+ compared to the word to be completed.
+
+f. New bindable variable: skip-completed-text, active when completing in the
+ middle of a word. If enabled, it means that characters in the completion
+ that match characters in the remainder of the word are "skipped" rather
+ than inserted into the line.
+
+g. The pre-readline-6.0 version of menu completion is available as
+ "old-menu-complete" for users who do not like the readline-6.0 version.
+
+h. New bindable variable: echo-control-characters. If enabled, and the
+ tty ECHOCTL bit is set, controls the echoing of characters corresponding
+ to keyboard-generated signals.
+
+i. New bindable variable: enable-meta-key. Controls whether or not readline
+ sends the smm/rmm sequences if the terminal indicates it has a meta key
+ that enables eight-bit characters.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to bash-4.0 since
+the release of bash-3.2. As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1. New Features in Bash
+
+a. When using substring expansion on the positional parameters, a starting
+ index of 0 now causes $0 to be prefixed to the list.
+
+b. The `help' builtin now prints its columns with entries sorted vertically
+ rather than horizontally.
+
+c. There is a new variable, $BASHPID, which always returns the process id of
+ the current shell.
+
+d. There is a new `autocd' option that, when enabled, causes bash to attempt
+ to `cd' to a directory name that is supplied as the first word of a
+ simple command.
+
+e. There is a new `checkjobs' option that causes the shell to check for and
+ report any running or stopped jobs at exit.
+
+f. The programmable completion code exports a new COMP_TYPE variable, set to
+ a character describing the type of completion being attempted.
+
+g. The programmable completion code exports a new COMP_KEY variable, set to
+ the character that caused the completion to be invoked (e.g., TAB).
+
+h. If creation of a child process fails due to insufficient resources, bash
+ will try again several times before reporting failure.
+
+i. The programmable completion code now uses the same set of characters as
+ readline when breaking the command line into a list of words.
+
+j. The block multiplier for the ulimit -c and -f options is now 512 when in
+ Posix mode, as Posix specifies.
+
+k. Changed the behavior of the read builtin to save any partial input received
+ in the specified variable when the read builtin times out. This also
+ results in variables specified as arguments to read to be set to the empty
+ string when there is no input available. When the read builtin times out,
+ it returns an exit status greater than 128.
+
+l. The shell now has the notion of a `compatibility level', controlled by
+ new variables settable by `shopt'. Setting this variable currently
+ restores the bash-3.1 behavior when processing quoted strings on the rhs
+ of the `=~' operator to the `[[' command.
+
+m. The `ulimit' builtin now has new -b (socket buffer size) and -T (number
+ of threads) options.
+
+n. The -p option to `declare' now displays all variable values and attributes
+ (or function values and attributes if used with -f).
+
+o. There is a new `compopt' builtin that allows completion functions to modify
+ completion options for existing completions or the completion currently
+ being executed.
+
+p. The `read' builtin has a new -i option which inserts text into the reply
+ buffer when using readline.
+
+q. A new `-E' option to the complete builtin allows control of the default
+ behavior for completion on an empty line.
+
+r. There is now limited support for completing command name words containing
+ globbing characters.
+
+s. Changed format of internal help documentation for all builtins to roughly
+ follow man page format.
+
+t. The `help' builtin now has a new -d option, to display a short description,
+ and a -m option, to print help information in a man page-like format.
+
+u. There is a new `mapfile' builtin to populate an array with lines from a
+ given file. The name `readarray' is a synonym.
+
+v. If a command is not found, the shell attempts to execute a shell function
+ named `command_not_found_handle', supplying the command words as the
+ function arguments.
+
+w. There is a new shell option: `globstar'. When enabled, the globbing code
+ treats `**' specially -- it matches all directories (and files within
+ them, when appropriate) recursively.
+
+x. There is a new shell option: `dirspell'. When enabled, the filename
+ completion code performs spelling correction on directory names during
+ completion.
+
+y. The `-t' option to the `read' builtin now supports fractional timeout
+ values.
+
+z. Brace expansion now allows zero-padding of expanded numeric values and
+ will add the proper number of zeroes to make sure all values contain the
+ same number of digits.
+
+aa. There is a new bash-specific bindable readline function: `dabbrev-expand'.
+ It uses menu completion on a set of words taken from the history list.
+
+bb. The command assigned to a key sequence with `bind -x' now sets two new
+ variables in the environment of the executed command: READLINE_LINE_BUFFER
+ and READLINE_POINT. The command can change the current readline line
+ and cursor position by modifying READLINE_LINE_BUFFER and READLINE_POINT,
+ respectively.
+
+cc. There is a new &>> redirection operator, which appends the standard output
+ and standard error to the named file.
+
+dd. The parser now understands `|&' as a synonym for `2>&1 |', which redirects
+ the standard error for a command through a pipe.
+
+ee. The new `;&' case statement action list terminator causes execution to
+ continue with the action associated with the next pattern in the
+ statement rather than terminating the command.
+
+ff. The new `;;&' case statement action list terminator causes the shell to
+ test the next set of patterns after completing execution of the current
+ action, rather than terminating the command.
+
+gg. The shell understands a new variable: PROMPT_DIRTRIM. When set to an
+ integer value greater than zero, prompt expansion of \w and \W will
+ retain only that number of trailing pathname components and replace
+ the intervening characters with `...'.
+
+hh. There are new case-modifying word expansions: uppercase (^[^]) and
+ lowercase (,[,]). They can work on either the first character or
+ array element, or globally. They accept an optional shell pattern
+ that determines which characters to modify. There is an optionally-
+ configured feature to include capitalization operators.
+
+ii. The shell provides associative array variables, with the appropriate
+ support to create, delete, assign values to, and expand them.
+
+jj. The `declare' builtin now has new -l (convert value to lowercase upon
+ assignment) and -u (convert value to uppercase upon assignment) options.
+ There is an optionally-configurable -c option to capitalize a value at
+ assignment.
+
+kk. There is a new `coproc' reserved word that specifies a coprocess: an
+ asynchronous command run with two pipes connected to the creating shell.
+ Coprocs can be named. The input and output file descriptors and the
+ PID of the coprocess are available to the calling shell in variables
+ with coproc-specific names.
+
+ll. A value of 0 for the -t option to `read' now returns success if there is
+ input available to be read from the specified file descriptor.
+
+mm. CDPATH and GLOBIGNORE are ignored when the shell is running in privileged
+ mode.
+
+nn. New bindable readline functions shell-forward-word and shell-backward-word,
+ which move forward and backward words delimited by shell metacharacters
+ and honor shell quoting.
+
+oo. New bindable readline functions shell-backward-kill-word and shell-kill-word
+ which kill words backward and forward, but use the same word boundaries
+ as shell-forward-word and shell-backward-word.
+
+2. New Features in Readline
+
+a. A new variable, rl_sort_completion_matches; allows applications to inhibit
+ match list sorting (but beware: some things don't work right if
+ applications do this).
+
+b. A new variable, rl_completion_invoking_key; allows applications to discover
+ the key that invoked rl_complete or rl_menu_complete.
+
+c. The functions rl_block_sigint and rl_release_sigint are now public and
+ available to calling applications who want to protect critical sections
+ (like redisplay).
+
+d. The functions rl_save_state and rl_restore_state are now public and
+ available to calling applications; documented rest of readline's state
+ flag values.
+
+e. A new user-settable variable, `history-size', allows setting the maximum
+ number of entries in the history list.
+
+f. There is a new implementation of menu completion, with several improvements
+ over the old; the most notable improvement is a better `completions
+ browsing' mode.
+
+g. The menu completion code now uses the rl_menu_completion_entry_function
+ variable, allowing applications to provide their own menu completion
+ generators.
+
+h. There is support for replacing a prefix of a pathname with a `...' when
+ displaying possible completions. This is controllable by setting the
+ `completion-prefix-display-length' variable. Matches with a common prefix
+ longer than this value have the common prefix replaced with `...'.
+
+i. There is a new `revert-all-at-newline' variable. If enabled, readline will
+ undo all outstanding changes to all history lines when `accept-line' is
+ executed.
+
+j. If the kernel supports it, readline displays special characters
+ corresponding to a keyboard-generated signal when the signal is received.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to bash-3.2 since
+the release of bash-3.1. As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1. New Features in Bash
+
+a. Changed the parameter pattern replacement functions to not anchor the
+ pattern at the beginning of the string if doing global replacement - that
+ combination doesn't make any sense.
+
+b. When running in `word expansion only' mode (--wordexp option), inhibit
+ process substitution.
+
+c. Loadable builtins now work on MacOS X 10.[34].
+
+d. Shells running in posix mode no longer set $HOME, as POSIX requires.
+
+e. The code that checks for binary files being executed as shell scripts now
+ checks only for NUL rather than any non-printing character.
+
+f. Quoting the string argument to the [[ command's =~ operator now forces
+ string matching, as with the other pattern-matching operators.
+
+2. New Features in Readline
+
+a. Calling applications can now set the keyboard timeout to 0, allowing
+ poll-like behavior.
+
+b. The value of SYS_INPUTRC (configurable at compilation time) is now used as
+ the default last-ditch startup file.
+
+c. The history file reading functions now allow windows-like \r\n line
+ terminators.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to bash-3.1 since
+the release of bash-3.0. As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1. New Features in Bash
+
+a. Bash now understands LC_TIME as a special variable so that time display
+ tracks the current locale.
+
+b. BASH_ARGC, BASH_ARGV, BASH_SOURCE, and BASH_LINENO are no longer created
+ as `invisible' variables and may not be unset.
+
+c. In POSIX mode, if `xpg_echo' option is enabled, the `echo' builtin doesn't
+ try to interpret any options at all, as POSIX requires.
+
+d. The `bg' builtin now accepts multiple arguments, as POSIX seems to specify.
+
+e. Fixed vi-mode word completion and glob expansion to perform tilde
+ expansion.
+
+f. The `**' mathematic exponentiation operator is now right-associative.
+
+g. The `ulimit' builtin has new options: -i (max number of pending signals),
+ -q (max size of POSIX message queues), and -x (max number of file locks).
+
+h. A bare `%' once again expands to the current job when used as a job
+ specifier.
+
+i. The `+=' assignment operator (append to the value of a string or array) is
+ now supported for assignment statements and arguments to builtin commands
+ that accept assignment statements.
+
+j. BASH_COMMAND now preserves its value when a DEBUG trap is executed.
+
+k. The `gnu_errfmt' option is enabled automatically if the shell is running
+ in an emacs terminal window.
+
+l. New configuration option: --single-help-strings. Causes long help text
+ to be written as a single string; intended to ease translation.
+
+m. The COMP_WORDBREAKS variable now causes the list of word break characters
+ to be emptied when the variable is unset.
+
+n. An unquoted expansion of $* when $IFS is empty now causes the positional
+ parameters to be concatenated if the expansion doesn't undergo word
+ splitting.
+
+o. Bash now inherits $_ from the environment if it appears there at startup.
+
+p. New shell option: nocasematch. If non-zero, shell pattern matching ignores
+ case when used by `case' and `[[' commands.
+
+q. The `printf' builtin takes a new option: -v var. That causes the output
+ to be placed into var instead of on stdout.
+
+r. By default, the shell no longer reports processes dying from SIGPIPE.
+
+s. Bash now sets the extern variable `environ' to the export environment it
+ creates, so C library functions that call getenv() (and can't use the
+ shell-provided replacement) get current values of environment variables.
+
+t. A new configuration option, `--enable-strict-posix-default', which will
+ build bash to be POSIX conforming by default.
+
+u. If compiled for strict POSIX conformance, LINES and COLUMNS may now
+ override the true terminal size.
+
+2. New Features in Readline
+
+a. The key sequence sent by the keypad `delete' key is now automatically
+ bound to delete-char.
+
+b. A negative argument to menu-complete now cycles backward through the
+ completion list.
+
+c. A new bindable readline variable: bind-tty-special-chars. If non-zero,
+ readline will bind the terminal special characters to their readline
+ equivalents when it's called (on by default).
+
+d. New bindable command: vi-rubout. Saves deleted text for possible
+ reinsertion, as with any vi-mode `text modification' command; `X' is bound
+ to this in vi command mode.
+
+e. A new external application-controllable variable that allows the LINES
+ and COLUMNS environment variables to set the window size regardless of
+ what the kernel returns: rl_prefer_env_winsize
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to bash-3.0 since
+the release of bash-2.05b. As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1. New Features in Bash
+
+a. ANSI string expansion now implements the \x{hexdigits} escape.
+
+b. There is a new loadable `strftime' builtin.
+
+c. New variable, COMP_WORDBREAKS, which controls the readline completer's
+ idea of word break characters.
+
+d. The `type' builtin no longer reports on aliases unless alias expansion
+ will actually be performed.
+
+e. HISTCONTROL is now a colon-separated list of values, which permits
+ more extensibility and backwards compatibility.
+
+f. HISTCONTROL may now include the `erasedups' option, which causes all lines
+ matching a line being added to be removed from the history list.
+
+g. `configure' has a new `--enable-multibyte' argument that permits multibyte
+ character support to be disabled even on systems that support it.
+
+h. New variables to support the bash debugger: BASH_ARGC, BASH_ARGV,
+ BASH_SOURCE, BASH_LINENO, BASH_SUBSHELL, BASH_EXECUTION_STRING,
+ BASH_COMMAND
+
+i. FUNCNAME has been changed to support the debugger: it's now an array
+ variable.
+
+j. for, case, select, arithmetic commands now keep line number information
+ for the debugger.
+
+k. There is a new `RETURN' trap executed when a function or sourced script
+ returns (not inherited child processes; inherited by command substitution
+ if function tracing is enabled and the debugger is active).
+
+l. New invocation option: --debugger. Enables debugging and turns on new
+ `extdebug' shell option.
+
+m. New `functrace' and `errtrace' options to `set -o' cause DEBUG and ERR
+ traps, respectively, to be inherited by shell functions. Equivalent to
+ `set -T' and `set -E' respectively. The `functrace' option also controls
+ whether or not the DEBUG trap is inherited by sourced scripts.
+
+n. The DEBUG trap is run before binding the variable and running the action
+ list in a `for' command, binding the selection variable and running the
+ query in a `select' command, and before attempting a match in a `case'
+ command.
+
+o. New `--enable-debugger' option to `configure' to compile in the debugger
+ support code.
+
+p. `declare -F' now prints out extra line number and source file information
+ if the `extdebug' option is set.
+
+q. If `extdebug' is enabled, a non-zero return value from a DEBUG trap causes
+ the next command to be skipped, and a return value of 2 while in a
+ function or sourced script forces a `return'.
+
+r. New `caller' builtin to provide a call stack for the bash debugger.
+
+s. The DEBUG trap is run just before the first command in a function body is
+ executed, for the debugger.
+
+t. `for', `select', and `case' command heads are printed when `set -x' is
+ enabled.
+
+u. There is a new {x..y} brace expansion, which is shorthand for {x.x+1,
+ x+2,...,y}. x and y can be integers or single characters; the sequence
+ may ascend or descend; the increment is always 1.
+
+v. New ksh93-like ${!array[@]} expansion, expands to all the keys (indices)
+ of array.
+
+w. New `force_fignore' shopt option; if enabled, suffixes specified by
+ FIGNORE cause words to be ignored when performing word completion even
+ if they're the only possibilities.
+
+x. New `gnu_errfmt' shopt option; if enabled, error messages follow the `gnu
+ style' (filename:lineno:message) format.
+
+y. New `-o bashdefault' option to complete and compgen; if set, causes the
+ whole set of bash completions to be performed if the compspec doesn't
+ result in a match.
+
+z. New `-o plusdirs' option to complete and compgen; if set, causes directory
+ name completion to be performed and the results added to the rest of the
+ possible completions.
+
+aa. `kill' is available as a builtin even when the shell is built without
+ job control.
+
+bb. New HISTTIMEFORMAT variable; value is a format string to pass to
+ strftime(3). If set and not null, the `history' builtin prints out
+ timestamp information according to the specified format when displaying
+ history entries. If set, bash tells the history library to write out
+ timestamp information when the history file is written.
+
+cc. The [[ ... ]] command has a new binary `=~' operator that performs
+ extended regular expression (egrep-like) matching.
+
+dd. `configure' has a new `--enable-cond-regexp' option (enabled by default)
+ to enable the =~ operator and regexp matching in [[ ... ]].
+
+ee. Subexpressions matched by the =~ operator are placed in the new
+ BASH_REMATCH array variable.
+
+ff. New `failglob' option that causes an expansion error when pathname
+ expansion fails to produce a match.
+
+gg. New `set -o pipefail' option that causes a pipeline to return a failure
+ status if any of the processes in the pipeline fail, not just the last
+ one.
+
+hh. printf builtin understands two new escape sequences: \" and \?.
+
+ii. `echo -e' understands two new escape sequences: \" and \?.
+
+jj. The GNU `gettext' package and libintl have been integrated; the shell's
+ messages can be translated into different languages.
+
+kk. The `\W' prompt expansion now abbreviates $HOME as `~', like `\w'.
+
+ll. The error message printed when bash cannot open a shell script supplied
+ as argument 1 now includes the name of the shell, to better identify
+ the error as coming from bash.
+
+mm. The parameter pattern removal and substitution expansions are now much
+ faster and more efficient when using multibyte characters.
+
+nn. The `jobs', `kill', and `wait' builtins now accept job control notation
+ even if job control is not enabled.
+
+oo. The historical behavior of `trap' that allows a missing `action' argument
+ to cause each specified signal's handling to be reset to its default is
+ now only supported when `trap' is given a single non-option argument.
+
+2. New Features in Readline
+
+a. History expansion has a new `a' modifier equivalent to the `g' modifier
+ for compatibility with the BSD csh.
+
+b. History expansion has a new `G' modifier equivalent to the BSD csh `g'
+ modifier, which performs a substitution once per word.
+
+c. All non-incremental search operations may now undo the operation of
+ replacing the current line with the history line.
+
+d. The text inserted by an `a' command in vi mode can be reinserted with
+ `.'.
+
+e. New bindable variable, `show-all-if-unmodified'. If set, the readline
+ completer will list possible completions immediately if there is more
+ than one completion and partial completion cannot be performed.
+
+f. There is a new application-callable `free_history_entry()' function.
+
+g. History list entries now contain timestamp information; the history file
+ functions know how to read and write timestamp information associated
+ with each entry.
+
+h. Four new key binding functions have been added:
+
+ rl_bind_key_if_unbound()
+ rl_bind_key_if_unbound_in_map()
+ rl_bind_keyseq_if_unbound()
+ rl_bind_keyseq_if_unbound_in_map()
+
+i. New application variable, rl_completion_quote_character, set to any
+ quote character readline finds before it calls the application completion
+ function.
+
+j. New application variable, rl_completion_suppress_quote, settable by an
+ application completion function. If set to non-zero, readline does not
+ attempt to append a closing quote to a completed word.
+
+k. New application variable, rl_completion_found_quote, set to a non-zero
+ value if readline determines that the word to be completed is quoted.
+ Set before readline calls any application completion function.
+
+l. New function hook, rl_completion_word_break_hook, called when readline
+ needs to break a line into words when completion is attempted. Allows
+ the word break characters to vary based on position in the line.
+
+m. New bindable command: unix-filename-rubout. Does the same thing as
+ unix-word-rubout, but adds `/' to the set of word delimiters.
+
+n. When listing completions, directories have a `/' appended if the
+ `mark-directories' option has been enabled.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to bash-2.05b since
+the release of bash-2.05a. As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1. New Features in Bash
+
+a. If set, TMOUT is the default timeout for the `read' builtin.
+
+b. `type' has two new options: `-f' suppresses shell function lookup, and
+ `-P' forces a $PATH search.
+
+c. New code to handle multibyte characters.
+
+d. `select' was changed to be more ksh-compatible, in that the menu is
+ reprinted each time through the loop only if REPLY is set to NULL.
+ The previous behavior is available as a compile-time option.
+
+e. `complete -d' and `complete -o dirnames' now force a slash to be
+ appended to names which are symlinks to directories.
+
+f. There is now a bindable edit-and-execute-command readline command,
+ like the vi-mode `v' command, bound to C-xC-e in emacs mode.
+
+g. Added support for ksh93-like [:word:] character class in pattern matching.
+
+h. The $'...' quoting construct now expands \cX to Control-X.
+
+i. A new \D{...} prompt expansion; passes the `...' to strftime and inserts
+ the result into the expanded prompt.
+
+j. The shell now performs arithmetic in the largest integer size the
+ machine supports (intmax_t), instead of long.
+
+k. If a numeric argument is supplied to one of the bash globbing completion
+ functions, a `*' is appended to the word before expansion is attempted.
+
+l. The bash globbing completion functions now allow completions to be listed
+ with double tabs or if `show-all-if-ambiguous' is set.
+
+m. New `-o nospace' option for `complete' and `compgen' builtins; suppresses
+ readline's appending a space to the completed word.
+
+n. New `here-string' redirection operator: <<< word.
+
+o. When displaying variables, function attributes and definitions are shown
+ separately, allowing them to be re-used as input (attempting to re-use
+ the old output would result in syntax errors).
+
+p. There is a new configuration option `--enable-mem-scramble', controls
+ bash malloc behavior of writing garbage characters into memory at
+ allocation and free time.
+
+q. The `complete' and `compgen' builtins now have a new `-s/-A service'
+ option to complete on names from /etc/services.
+
+r. `read' has a new `-u fd' option to read from a specified file descriptor.
+
+s. Fix the completion code so that expansion errors in a directory name
+ don't cause a longjmp back to the command loop.
+
+t. Fixed word completion inside command substitution to work a little more
+ intuitively.
+
+u. The `printf' %q format specifier now uses $'...' quoting to print the
+ argument if it contains non-printing characters.
+
+v. The `declare' and `typeset' builtins have a new `-t' option. When applied
+ to functions, it causes the DEBUG trap to be inherited by the named
+ function. Currently has no effect on variables.
+
+w. The DEBUG trap is now run *before* simple commands, ((...)) commands,
+ [[...]] conditional commands, and for ((...)) loops.
+
+x. The expansion of $LINENO inside a shell function is only relative to the
+ function start if the shell is interactive -- if the shell is running a
+ script, $LINENO expands to the line number in the script. This is as
+ POSIX-2001 requires.
+
+y. The bash debugger in examples/bashdb has been modified to work with the
+ new DEBUG trap semantics, the command set has been made more gdb-like,
+ and the changes to $LINENO make debugging functions work better. Code
+ from Gary Vaughan.
+
+z. New [n]<&word- and [n]>&word- redirections from ksh93 -- move fds (dup
+ and close).
+
+aa. There is a new `-l' invocation option, equivalent to `--login'.
+
+bb. The `hash' builtin has a new `-l' option to list contents in a reusable
+ format, and a `-d' option to remove a name from the hash table.
+
+cc. There is now support for placing the long help text into separate files
+ installed into ${datadir}/bash. Not enabled by default; can be turned
+ on with `--enable-separate-helpfiles' option to configure.
+
+dd. All builtins that take operands accept a `--' pseudo-option, except
+ `echo'.
+
+ee. The `echo' builtin now accepts \0xxx (zero to three octal digits following
+ the `0') in addition to \xxx (one to three octal digits) for SUSv3/XPG6/
+ POSIX.1-2001 compliance.
+
+
+2. New Features in Readline
+
+a. Support for key `subsequences': allows, e.g., ESC and ESC-a to both
+ be bound to readline functions. Now the arrow keys may be used in vi
+ insert mode.
+
+b. When listing completions, and the number of lines displayed is more than
+ the screen length, readline uses an internal pager to display the results.
+ This is controlled by the `page-completions' variable (default on).
+
+c. New code to handle editing and displaying multibyte characters.
+
+d. The behavior introduced in bash-2.05a of deciding whether or not to
+ append a slash to a completed name that is a symlink to a directory has
+ been made optional, controlled by the `mark-symlinked-directories'
+ variable (default is the 2.05a behavior).
+
+e. The `insert-comment' command now acts as a toggle if given a numeric
+ argument: if the first characters on the line don't specify a
+ comment, insert one; if they do, delete the comment text
+
+f. New application-settable completion variable:
+ rl_completion_mark_symlink_dirs, allows an application's completion
+ function to temporarily override the user's preference for appending
+ slashes to names which are symlinks to directories.
+
+g. New function available to application completion functions:
+ rl_completion_mode, to tell how the completion function was invoked
+ and decide which argument to supply to rl_complete_internal (to list
+ completions, etc.).
+
+h. Readline now has an overwrite mode, toggled by the `overwrite-mode'
+ bindable command, which could be bound to `Insert'.
+
+i. New application-settable completion variable:
+ rl_completion_suppress_append, inhibits appending of
+ rl_completion_append_character to completed words.
+
+j. New key bindings when reading an incremental search string: ^W yanks
+ the currently-matched word out of the current line into the search
+ string; ^Y yanks the rest of the current line into the search string,
+ DEL or ^H deletes characters from the search string.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to bash-2.05a since
+the release of bash-2.05. As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1. New Features in Bash
+
+a. Added support for DESTDIR installation root prefix, so you can do a
+ `make install DESTDIR=bash-root' and do easier binary packaging.
+
+b. Added support for builtin printf "'" flag character as per latest POSIX
+ drafts.
+
+c. Support for POSIX.2 printf(1) length specifiers `j', `t', and `z' (from
+ ISO C99).
+
+d. New autoconf macro, RL_LIB_READLINE_VERSION, for use by other applications
+ (bash doesn't use very much of what it returns).
+
+e. `set [-+]o nolog' is recognized as required by the latest POSIX drafts,
+ but ignored.
+
+f. New read-only `shopt' option: login_shell. Set to non-zero value if the
+ shell is a login shell.
+
+g. New `\A' prompt string escape sequence; expands to time in 24 HH:MM format.
+
+h. New `-A group/-g' option to complete and compgen; does group name
+ completion.
+
+i. New `-t' option to `hash' to list hash values for each filename argument.
+
+j. New [-+]O invocation option to set and unset `shopt' options at startup.
+
+k. configure's `--with-installed-readline' option now takes an optional
+ `=PATH' suffix to set the root of the tree where readline is installed
+ to PATH.
+
+l. The ksh-like `ERR' trap has been added. The `ERR' trap will be run
+ whenever the shell would have exited if the -e option were enabled.
+ It is not inherited by shell functions.
+
+m. `readonly', `export', and `declare' now print variables which have been
+ given attributes but not set by assigning a value as just a command and
+ a variable name (like `export foo') when listing, as the latest POSIX
+ drafts require.
+
+n. `bashbug' now requires that the subject be changed from the default.
+
+o. configure has a new `--enable-largefile' option, like other GNU utilities.
+
+p. `for' loops now allow empty word lists after `in', like the latest POSIX
+ drafts require.
+
+q. The builtin `ulimit' now takes two new non-numeric arguments: `hard',
+ meaning the current hard limit, and `soft', meaning the current soft
+ limit, in addition to `unlimited'
+
+r. `ulimit' now prints the option letter associated with a particular
+ resource when printing more than one limit.
+
+s. `ulimit' prints `hard' or `soft' when a value is not `unlimited' but is
+ one of RLIM_SAVED_MAX or RLIM_SAVED_CUR, respectively.
+
+t. The `printf' builtin now handles the %a and %A conversions if they're
+ implemented by printf(3).
+
+u. The `printf' builtin now handles the %F conversion (just about like %f).
+
+v. The `printf' builtin now handles the %n conversion like printf(3). The
+ corresponding argument is the name of a shell variable to which the
+ value is assigned.
+
+2. New Features in Readline
+
+a. Added extern declaration for rl_get_termcap to readline.h, making it a
+ public function (it was always there, just not in readline.h).
+
+b. New #defines in readline.h: RL_READLINE_VERSION, currently 0x0402,
+ RL_VERSION_MAJOR, currently 4, and RL_VERSION_MINOR, currently 2.
+
+c. New readline variable: rl_readline_version, mirrors RL_READLINE_VERSION.
+
+d. New bindable boolean readline variable: match-hidden-files. Controls
+ completion of files beginning with a `.' (on Unix). Enabled by default.
+
+e. The history expansion code now allows any character to terminate a
+ `:first-' modifier, like csh.
+
+f. New bindable variable `history-preserve-point'. If set, the history
+ code attempts to place the user at the same location on each history
+ line retrived with previous-history or next-history.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to bash-2.05 since
+the release of bash-2.04. As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1. New Features in Bash
+
+a. Added a new `--init-file' invocation argument as a synonym for `--rcfile',
+ per the new GNU coding standards.
+
+b. The /dev/tcp and /dev/udp redirections now accept service names as well as
+ port numbers.
+
+c. `complete' and `compgen' now take a `-o value' option, which controls some
+ of the aspects of that compspec. Valid values are:
+
+ default - perform bash default completion if programmable
+ completion produces no matches
+ dirnames - perform directory name completion if programmable
+ completion produces no matches
+ filenames - tell readline that the compspec produces filenames,
+ so it can do things like append slashes to
+ directory names and suppress trailing spaces
+
+d. A new loadable builtin, realpath, which canonicalizes and expands symlinks
+ in pathname arguments.
+
+e. When `set' is called without options, it prints function defintions in a
+ way that allows them to be reused as input. This affects `declare' and
+ `declare -p' as well. This only happens when the shell is not in POSIX
+ mode, since POSIX.2 forbids this behavior.
+
+f. Bash-2.05 once again honors the current locale setting when processing
+ ranges within pattern matching bracket expressions (e.g., [A-Z]).
+
+2. New Features in Readline
+
+a. The blink timeout for paren matching is now settable by applications,
+ via the rl_set_paren_blink_timeout() function.
+
+b. _rl_executing_macro has been renamed to rl_executing_macro, which means
+ it's now part of the public interface.
+
+c. Readline has a new variable, rl_readline_state, which is a bitmap that
+ encapsulates the current state of the library; intended for use by
+ callbacks and hook functions.
+
+d. New application-callable function rl_set_prompt(const char *prompt):
+ expands its prompt string argument and sets rl_prompt to the result.
+
+e. New application-callable function rl_set_screen_size(int rows, int cols):
+ public method for applications to set readline's idea of the screen
+ dimensions.
+
+f. New function, rl_get_screen_size (int *rows, int *columns), returns
+ readline's idea of the screen dimensions.
+
+g. The timeout in rl_gather_tyi (readline keyboard input polling function)
+ is now settable via a function (rl_set_keyboard_input_timeout()).
+
+h. Renamed the max_input_history variable to history_max_entries; the old
+ variable is maintained for backwards compatibility.
+
+i. The list of characters that separate words for the history tokenizer is
+ now settable with a variable: history_word_delimiters. The default
+ value is as before.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to bash-2.04 since
+the release of bash-2.03. As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1. New Features in Bash
+
+a. The history builtin has a `-d offset' option to delete the history entry
+ at position `offset'.
+
+b. The prompt expansion code has two new escape sequences: \j, the number of
+ active jobs; and \l, the basename of the shell's tty device name.
+
+c. The `bind' builtin has a new `-x' option to bind key sequences to shell
+ commands.
+
+d. There is a new shell option, no_empty_command_completion, which, when
+ enabled, disables command completion when TAB is typed on an empty line.
+
+e. The `help' builtin has a `-s' option to just print a builtin's usage
+ synopsis.
+
+f. There are several new arithmetic operators: id++, id-- (variable
+ post-increment/decrement), ++id, --id (variable pre-increment/decrement),
+ expr1 , expr2 (comma operator).
+
+g. There is a new ksh-93 style arithmetic for command:
+ for ((expr1 ; expr2; expr3 )); do list; done
+
+h. The `read' builtin has a number of new options:
+ -t timeout only wait timeout seconds for input
+ -n nchars only read nchars from input instead of a full line
+ -d delim read until delim rather than newline
+ -s don't echo input chars as they are read
+
+i. The redirection code now handles several filenames specially:
+ /dev/fd/N, /dev/stdin, /dev/stdout, and /dev/stderr, whether or
+ not they are present in the file system.
+
+j. The redirection code now recognizes pathnames of the form
+ /dev/tcp/host/port and /dev/udp/host/port, and tries to open a socket
+ of the appropriate type to the specified port on the specified host.
+
+k. The ksh-93 ${!prefix*} expansion, which expands to the names of all
+ shell variables with prefix PREFIX, has been implemented.
+
+l. There is a new dynamic variable, FUNCNAME, which expands to the name of
+ a currently-executing function. Assignments to FUNCNAME have no effect.
+
+m. The GROUPS variable is no longer readonly; assignments to it are silently
+ discarded. This means it can be unset.
+
+n. A new programmable completion facility, with two new builtin commands:
+ complete and compgen.
+
+o. configure has a new option, `--enable-progcomp', to compile in the
+ programmable completion features (enabled by default).
+
+p. `shopt' has a new option, `progcomp', to enable and disable programmable
+ completion at runtime.
+
+q. Unsetting HOSTFILE now clears the list of hostnames used for completion.
+
+r. configure has a new option, `--enable-bash-malloc', replacing the old
+ `--with-gnu-malloc' (which is still present for backwards compatibility).
+
+s. There is a new manual page describing rbash, the restricted shell.
+
+t. `bashbug' has new `--help' and `--version' options.
+
+u. `shopt' has a new `xpg_echo' option, which controls the behavior of
+ `echo' with respect to backslash-escaped characters at runtime.
+
+v. If NON_INTERACTIVE_LOGIN_SHELLS is defined, all login shells read the
+ startup files, even if they are not interactive.
+
+w. The LC_NUMERIC variable is now treated specially, and used to set the
+ LC_NUMERIC locale category for number formatting, e.g., when `printf'
+ displays floating-point numbers.
+
+2. New features in Readline
+
+a. Parentheses matching is now always compiled into readline, and enabled
+ or disabled when the value of the `blink-matching-paren' variable is
+ changed.
+
+b. MS-DOS systems now use ~/_inputrc as the last-ditch inputrc filename.
+
+c. MS-DOS systems now use ~/_history as the default history file.
+
+d. history-search-{forward,backward} now leave the point at the end of the
+ line when the string to search for is empty, like
+ {reverse,forward}-search-history.
+
+e. history-search-{forward,backward} now leave the last history line found
+ in the readline buffer if the second or subsequent search fails.
+
+f. New function for use by applications: rl_on_new_line_with_prompt, used
+ when an application displays the prompt itself before calling readline().
+
+g. New variable for use by applications: rl_already_prompted. An application
+ that displays the prompt itself before calling readline() must set this to
+ a non-zero value.
+
+h. A new variable, rl_gnu_readline_p, always 1. The intent is that an
+ application can verify whether or not it is linked with the `real'
+ readline library or some substitute.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to bash-2.03 since
+the release of bash-2.02. As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1. New Features in Bash
+
+a. New `shopt' option, `restricted_shell', indicating whether or not the
+ shell was started in restricted mode, for use in startup files.
+
+b. Filename generation is now performed on the words between ( and ) in
+ array assignments (which it probably should have done all along).
+
+c. OLDPWD is now auto-exported, as POSIX.2 seems to require.
+
+d. ENV and BASH_ENV are read-only variables in a restricted shell.
+
+e. A change was made to the startup file code so that any shell begun with
+ the `--login' option, even non-interactive shells, will source the login
+ shell startup files.
+
+2. New Features in Readline
+
+a. Many changes to the signal handling:
+ o Readline now catches SIGQUIT and cleans up the tty before returning;
+ o A new variable, rl_catch_signals, is available to application writers
+ to indicate to readline whether or not it should install its own
+ signal handlers for SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP,
+ SIGTTIN, and SIGTTOU;
+ o A new variable, rl_catch_sigwinch, is available to application
+ writers to indicate to readline whether or not it should install its
+ own signal handler for SIGWINCH, which will chain to the calling
+ applications's SIGWINCH handler, if one is installed;
+ o There is a new function, rl_free_line_state, for application signal
+ handlers to call to free up the state associated with the current
+ line after receiving a signal;
+ o There is a new function, rl_cleanup_after_signal, to clean up the
+ display and terminal state after receiving a signal;
+ o There is a new function, rl_reset_after_signal, to reinitialize the
+ terminal and display state after an application signal handler
+ returns and readline continues
+
+b. There is a new function, rl_resize_terminal, to reset readline's idea of
+ the screen size after a SIGWINCH.
+
+c. New public functions: rl_save_prompt and rl_restore_prompt. These were
+ previously private functions with a `_' prefix.
+
+d. New function hook: rl_pre_input_hook, called just before readline starts
+ reading input, after initialization.
+
+e. New function hook: rl_display_matches_hook, called when readline would
+ display the list of completion matches. The new function
+ rl_display_match_list is what readline uses internally, and is available
+ for use by application functions called via this hook.
+
+f. New bindable function, delete-char-or-list, like tcsh.
+
+g. A new variable, rl_erase_empty_line, which, if set by an application using
+ readline, will cause readline to erase, prompt and all, lines on which the
+ only thing typed was a newline.
+
+h. New bindable variable: `isearch-terminators'.
+
+i. New bindable function: `forward-backward-delete-char' (unbound by default).
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to bash-2.02 since
+the release of bash-2.01.1. As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1. New Features in Bash
+
+a. A new version of malloc, based on the older GNU malloc, that has many
+ changes, is more page-based, is more conservative with memory usage,
+ and does not `orphan' large blocks when they are freed.
+
+b. A new version of gmalloc, based on the old GLIBC malloc, with many
+ changes and range checking included by default.
+
+c. A new implementation of fnmatch(3) that includes full POSIX.2 Basic
+ Regular Expression matching, including character classes, collating
+ symbols, equivalence classes, and support for case-insensitive pattern
+ matching.
+
+d. ksh-88 egrep-style extended pattern matching ([@+*?!](patlist)) has been
+ implemented, controlled by a new `shopt' option, `extglob'.
+
+e. There is a new ksh-like `[[' compound command, which implements
+ extended `test' functionality.
+
+f. There is a new `printf' builtin, implemented according to the POSIX.2
+ specification.
+
+g. There is a new feature for command substitution: $(< filename) now expands
+ to the contents of `filename', with any trailing newlines removed
+ (equivalent to $(cat filename)).
+
+h. There are new tilde prefixes which expand to directories from the
+ directory stack.
+
+i. There is a new `**' arithmetic operator to do exponentiation.
+
+j. There are new configuration options to control how bash is linked:
+ `--enable-profiling', to allow bash to be profiled with gprof, and
+ `--enable-static-link', to allow bash to be linked statically.
+
+k. There is a new configuration option, `--enable-cond-command', which
+ controls whether or not the `[[' command is included. It is on by
+ default.
+
+l. There is a new configuration option, `--enable-extended-glob', which
+ controls whether or not the ksh extended globbing feature is included.
+ It is enabled by default.
+
+m. There is a new configuration #define in config.h.top that, when enabled,
+ will cause all login shells to source /etc/profile and one of the user-
+ specific login shell startup files, whether or not the shell is
+ interactive.
+
+n. There is a new invocation option, `--dump-po-strings', to dump
+ a shell script's translatable strings ($"...") in GNU `po' format.
+
+o. There is a new `shopt' option, `nocaseglob', to enable case-insensitive
+ pattern matching when globbing filenames and using the `case' construct.
+
+p. There is a new `shopt' option, `huponexit', which, when enabled, causes
+ the shell to send SIGHUP to all jobs when an interactive login shell
+ exits.
+
+q. `bind' has a new `-u' option, which takes a readline function name as an
+ argument and unbinds all key sequences bound to that function in a
+ specified keymap.
+
+r. `disown' now has `-a' and `-r' options, to limit operation to all jobs
+ and running jobs, respectively.
+
+s. The `shopt' `-p' option now causes output to be displayed in a reusable
+ format.
+
+t. `test' has a new `-N' option, which returns true if the filename argument
+ has been modified since it was last accessed.
+
+u. `umask' now has a `-p' option to print output in a reusable format.
+
+v. A new escape sequence, `\xNNN', has been added to the `echo -e' and $'...'
+ translation code. It expands to the character whose ascii code is NNN
+ in hexadecimal.
+
+w. The prompt string expansion code has a new `\r' escape sequence.
+
+x. The shell may now be cross-compiled for the CYGWIN32 environment on
+ a Unix machine.
+
+2. New Features in Readline
+
+a. There is now an option for `iterative' yank-last-arg handline, so a user
+ can keep entering `M-.', yanking the last argument of successive history
+ lines.
+
+b. New variable, `print-completions-horizontally', which causes completion
+ matches to be displayed across the screen (like `ls -x') rather than up
+ and down the screen (like `ls').
+
+c. New variable, `completion-ignore-case', which causes filename completion
+ and matching to be performed case-insensitively.
+
+d. There is a new bindable command, `magic-space', which causes history
+ expansion to be performed on the current readline buffer and a space to
+ be inserted into the result.
+
+e. There is a new bindable command, `menu-complete', which enables tcsh-like
+ menu completion (successive executions of menu-complete insert a single
+ completion match, cycling through the list of possible completions).
+
+f. There is a new bindable command, `paste-from-clipboard', for use on Win32
+ systems, to insert the text from the Win32 clipboard into the editing
+ buffer.
+
+g. The key sequence translation code now understands printf-style backslash
+ escape sequences, including \NNN octal escapes. These escape sequences
+ may be used in key sequence definitions or macro values.
+
+h. An `$include' inputrc file parser directive has been added.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to bash-2.01 since
+the release of bash-2.0. As always, the manual page (doc/bash.1) is the
+place to look for complete descriptions.
+
+1. New Features in Bash
+
+a. There is a new builtin array variable: GROUPS, the set of groups to which
+ the user belongs. This is used by the test suite.
+
+2. New Features in Readline
+
+a. If a key sequence bound to `universal-argument' is read while reading a
+ numeric argument started with `universal-argument', it terminates the
+ argument but is otherwise ignored. This provides a way to insert multiple
+ instances of a digit string, and is how GNU emacs does it.
+
+-------------------------------------------------------------------------------
+This is a terse description of the new features added to bash-2.0 since
+the release of bash-1.14.7. As always, the manual page (doc/bash.1) is
+the place to look for complete descriptions.
+
+1. New Features in Bash
+
+a. There is a new invocation option, -D, that dumps translatable strings
+ in a script.
+
+b. The `long' invocation options must now be prefixed with `--'.
+
+c. New long invocation options: --dump-strings, --help, --verbose
+
+d. The `nolineediting' invocation option was renamed to `noediting'.
+
+e. The `nobraceexpansion' and `quiet' long invocation options were removed.
+
+f. The `--help' and `--version' long options now work as the GNU coding
+ standards specify.
+
+g. If invoked as `sh', bash now enters posix mode after reading the
+ startup files, and reads and executes commands from the file named
+ by $ENV if interactive (as POSIX.2 specifies). A login shell invoked
+ as `sh' reads $ENV after /etc/profile and ~/.profile.
+
+h. There is a new reserved word, `time', for timing pipelines, builtin
+ commands, and shell functions. It uses the value of the TIMEFORMAT
+ variable as a format string describing how to print the timing
+ statistics.
+
+i. The $'...' quoting syntax expands ANSI-C escapes in ... and leaves the
+ result single-quoted.
+
+j. The $"..." quoting syntax performs locale-specific translation of ...
+ and leaves the result double-quoted.
+
+k. LINENO now works correctly in functions.
+
+l. New variables: DIRSTACK, PIPESTATUS, BASH_VERSINFO, HOSTNAME, SHELLOPTS,
+ MACHTYPE. The first three are array variables.
+
+m. The BASH_VERSION and BASH_VERSINFO variables now include the shell's
+ `release status' (alpha[N], beta[N], release).
+
+n. Some variables have been removed: MAIL_WARNING, notify, history_control,
+ command_oriented_history, glob_dot_filenames, allow_null_glob_expansion,
+ nolinks, hostname_completion_file, noclobber, no_exit_on_failed_exec, and
+ cdable_vars. Most of them are now implemented with the new `shopt'
+ builtin; others were already implemented by `set'.
+
+o. Bash now uses some new variables: LC_ALL, LC_MESSAGES, LC_CTYPE,
+ LC_COLLATE, LANG, GLOBIGNORE, HISTIGNORE.
+
+p. The shell now supports integer-indexed arrays of unlimited length,
+ with a new compound assignment syntax and changes to the appropriate
+ builtin commands (declare/typeset, read, readonly, etc.). The array
+ index may be an arithmetic expression.
+
+q. ${!var}: indirect variable expansion, equivalent to eval \${$var}.
+
+r. ${paramter:offset[:length]}: variable substring extraction.
+
+s. ${parameter/pattern[/[/]string]}: variable pattern substitution.
+
+t. The $[...] arithmetic expansion syntax is no longer supported, in
+ favor of $((...)).
+
+u. Aliases can now be expanded in shell scripts with a shell option
+ (shopt expand_aliases).
+
+v. History and history expansion can now be used in scripts with
+ set -o history and set -H.
+
+w. All builtins now return an exit status of 2 for incorrect usage.
+
+x. Interactive shells resend SIGHUP to all running or stopped children
+ if (and only if) they exit due to a SIGHUP.
+
+y. New prompting expansions: \a, \e, \H, \T, \@, \v, \V.
+
+z. Variable expansion in prompt strings is now controllable via a shell
+ option (shopt promptvars).
+
+aa. Bash now defaults to using command-oriented history.
+
+bb. The history file ($HISTFILE) is now truncated to $HISTFILESIZE after
+ being written.
+
+cc. The POSIX.2 conditional arithmetic evaluation syntax (expr ? expr : expr)
+ has been implemented.
+
+dd. Each builtin now accepts `--' to signify the end of the options, except
+ as documented (echo, etc.).
+
+ee. All builtins use -p to display values in a re-readable format where
+ appropriate, except as documented (echo, type, etc.).
+
+ff. The `alias' builtin has a new -p option.
+
+gg. Changes to the `bind' builtin:
+ o has new options: -psPSVr.
+ o the `-d' option was renamed to `-p'
+ o the `-v' option now dumps variables; the old `-v' is now `-P'
+
+hh. The `bye' synonym for `exit' was removed.
+
+ii. The -L and -P options to `cd' and `pwd' have been documented.
+
+jj. The `cd' builtin now does spelling correction on the directory name
+ by default. This is settable with a shell option (shopt cdspell).
+
+kk. The `declare' builtin has new options: -a, -F, -p.
+
+ll. The `dirs' builtin has new options: -c, -p, -v.
+
+mm. The new `disown' builtin removes jobs from the shell's jobs table
+ or inhibits the resending of SIGHUP when the shell receives a
+ SIGHUP.
+
+nn. The `echo' builtin has a new escape character: \e.
+
+oo. The `enable' builtin can now load new builtins dynamically from shared
+ objects on systems with the dlopen/dlsym interface. There are a number
+ of examples in the examples/loadables directory. There are also
+ new options: -d, -f, -s, -p.
+
+pp. The `-all' option to `enable' was removed in favor of `-a'.
+
+qq. The `exec' builtin has new options: -l, -c, -a.
+
+rr. The `hash' builtin has a new option: -p.
+
+ss. The `history' builtin has new options: -c, -p, -s.
+
+tt. The `jobs' builtin has new options: -r, -s.
+
+uu. The `kill' builtin has new options: -n signum, -l signame.
+
+vv. The `pushd' and `popd' builtins have a new option: -n.
+
+ww. The `read' builtin has new options: -p prompt, -e, -a.
+
+xx. The `readonly' builtin has a new -a option, and the -n option was removed.
+
+yy. Changes to the `set' builtin:
+ o new options: -B, -o keyword, -o onecmd, -o history
+ o options removed: -l, -d, -o nohash
+ o options changed: +o, -h, -o hashall
+ o now displays variables in a format that can be re-read as input
+
+zz. The new `shopt' builtin controls shell optional behavior previously
+ done by setting and unsetting certain shell variables.
+
+aaa. The `test' builtin has new operators: -o option, s1 == s2, s1 < s2,
+ and s1 > s2, where s1 and s2 are strings.
+
+bbb. There is a new trap, DEBUG, executed after every simple command.
+
+ccc. The `trap' builtin has a new -p option.
+
+ddd. The `ulimit' builtin has a new -l option on 4.4BSD-based systems.
+
+eee. The PS1, PS2, PATH, and IFS variables may now be unset.
+
+fff. The restricted shell mode has been expanded and is now documented.
+
+ggg. Security improvements:
+ o functions are not imported from the environment if running setuid
+ or with -p
+ o no startup files are sourced if running setuid or with -p
+
+hhh. The documentation has been overhauled: the texinfo manual was
+ expanded, and HTML versions of the man page and texinfo manual
+ are included.
+
+iii. Changes to Posix mode:
+ o Command lookup now finds special builtins before shell functions.
+ o Failure of a special builtin causes a non-interactive shell to
+ exit. Failures are defined in the POSIX.2 specification.
+ o If the `cd' builtin finds a directory to change to using $CDPATH,
+ the value assigned to PWD when `cd' completes does not contain
+ any symbolic links.
+ o A non-interactive shell exits if a variable assignment error
+ occurs when no command name follows the assignment statements.
+ o A non-interactive shell exits if the interation variable in a
+ `for' statement or the selection variable in a `select' statement
+ is read-only or another variable assignment error occurs.
+ o The `<>' redirection operator now opens a file for both stdin and
+ stdout by default, not just when in posix mode.
+ o Assignment statements preceding special builtins now persist in
+ the shell's environment when the builtin completes.
+
+ Posix mode is now completely POSIX.2-compliant (modulo bugs). When
+ invoked as sh, bash should be completely POSIX.2-compliant.
+
+jjj. The default value of PS1 is now "\s-\v\$ ".
+
+kkk. The ksh-like ((...)) arithmetic command syntax has been implemented.
+ This is exactly equivalent to `let "..."'.
+
+lll. Integer constants have been extended to base 64.
+
+mmm. The `ulimit' builtin now sets both hard and soft limits and reports the
+ soft limit by default.
+
+2. New Features in Readline
+
+a. New variables: enable-keypad, input-meta (new name for meta-flag),
+ mark-directories, visible-stats (now documented), disable-completion,
+ comment-begin.
+
+b. New bindable commands: kill-region, copy-region-as-kill,
+ copy-backward-word, copy-forward-word, set-mark, exchange-point-and-mark,
+ character-search, character-search-backward, insert-comment,
+ glob-expand-word, glob-list-expansions, dump-variables, dump-macros.
+
+c. New emacs keybindings: delete-horizontal-space (M-\),
+ insert-completions (M-*), possible-completions (M-=).
+
+d. The history-search-backward and history-search-forward commands were
+ modified to be the same as previous-line and next-line if point is at
+ the start of the line.
+
+e. More file types are available for the visible-stats mode.
+
+3. Changes of interest in the Bash implementation
+
+a. There is a new autoconf-based configuration mechanism.
+
+b. More things have been moved from Posix mode to standard shell behavior.
+
+c. The trace output (set -x) now inserts quotes where necessary so it can
+ be reused as input.
+
+d. There is a compile-time option for a system-wide interactive shell
+ startup file (disabled by default).
+
+e. The YACC grammar is smaller and tighter, and all 66 shift-reduce
+ conflicts are gone. Several parsing bugs have been fixed.
+
+f. Builtin option parsing has been regularized (using internal_getopt()),
+ with the exception of `echo', `type', and `set'.
+
+g. Builtins now return standard usage messages constructed from the
+ `short doc' used by the help builtin.
+
+h. Completion now quotes using backslashes by default, but honors
+ user-supplied quotes.
+
+i. The GNU libc malloc is available as a configure-time option.
+
+j. There are more internationalization features; bash uses gettext if
+ it is available. The $"..." translation syntax uses the current
+ locale and gettext.
+
+k. There is better reporting of job termination when the shell is not
+ interactive.
+
+l. The shell is somewhat more efficient: it uses a little less memory and
+ makes fewer system calls.
+
+4. Changes of interest in the Readline implementation
+
+a. There is now support for readline `callback' functions.
+
+b. There is now support for user-supplied input, redisplay, and terminal
+ preparation functions.
+
+c. Most of the shell-specific code in readline has been generalized or
+ removed.
+
+d. Most of the annoying redisplay bugs have been fixed, notably the problems
+ with incremental search and excessive redrawing when special characters
+ appear in the prompt string.
+
+e. There are new library functions and variables available to application
+ writers, most having to do with completion and quoting.
+
+f. The NEWLINE character (^J) is now treated as a search terminator by the
+ incremental search functions.
+-------------------------------------------------------------------------------
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without any warranty.
diff --git a/NOTES b/NOTES
new file mode 100644
index 0000000..4fe9e6c
--- /dev/null
+++ b/NOTES
@@ -0,0 +1,351 @@
+Platform-Specific Configuration and Operation Notes
+===================================================
+
+1. configure --without-gnu-malloc on:
+
+ alpha running OSF/1, Linux, or NetBSD (malloc needs 8-byte alignment;
+ bash malloc has 8-byte alignment now, but I have no alphas to test on)
+
+ next running NeXT/OS
+
+ all machines running SunOS YP code: SunOS4, SunOS5, HP/UX, if you
+ have problems with username completion or tilde expansion for
+ usernames found via YP/NIS
+
+ linux (optional, but don't do it if you're using Doug Lea's malloc)
+
+ QNX 4.2
+ other OSF/1 machines (KSR/1, HP, IBM AIX/ESA)
+ AIX
+ sparc SVR4, SVR4.2 (ICL reference port)
+ DG/UX
+ Cray
+
+ NetBSD/sparc (malloc needs 8-byte alignment; bash malloc has 8-byte
+ alignment now, but I have no NetBSD machines to test on)
+
+ BSD/OS 2.1, 3.x if you want to use loadable builtins
+
+ Motorola m68k machines running System V.3. There is a file descriptor
+ leak caused by using the bash malloc because closedir(3) needs to read
+ freed memory to find the file descriptor to close
+
+2. Configure using shlicc2 on BSD/OS 2.1 and BSD/OS 3.x to use loadable
+ builtins
+
+3. Bash cannot be built in a directory separate from the source directory
+ using configure --srcdir=... unless the version of `make' you're using
+ does $VPATH handling right. The script support/mkclone can be used to
+ create a `build tree' using symlinks to get around this.
+
+4. I've had reports that username completion (as well as tilde expansion
+ and \u prompt expansion) does not work on IRIX 5.3 when linking with
+ -lnsl. This is only a problem when you're running NIS, since
+ apparently -lnsl supports only /etc/passwd and not the NIS functions
+ for retrieving usernames and passwords. Editing the Makefile after
+ configure runs and removing the `-lnsl' from the assignment to `LIBS'
+ fixes the problem.
+
+5. There is a problem with the `makewhatis' script in older (pre-7.0)
+ versions of Red Hat Linux. Running `makewhatis' with bash-2.0 or
+ later versions results in error messages like this:
+
+ /usr/sbin/makewhatis: cd: manpath: No such file or directory
+ /usr/sbin/makewhatis: manpath/whatis: No such file or directory
+ chmod: manpath/whatis: No such file or directory
+ /usr/sbin/makewhatis: cd: catpath: No such file or directory
+ /usr/sbin/makewhatis: catpath/whatis: No such file or directory
+ chmod: catpath/whatis: No such file or directory
+
+ The problem is with `makewhatis'. Red Hat (and possibly other
+ Linux distributors) uses a construct like this in the code:
+
+ eval path=$"$pages"path
+
+ to do indirect variable expansion. This `happened to work' in
+ bash-1.14 and previous versions, but that was more an accident
+ of implementation than anything else -- it was never supported
+ and certainly is not portable.
+
+ Bash-2.0 has a new feature that gives a new meaning to $"...".
+ This is explained more completely in item 1 in the COMPAT file.
+
+ The three lines in the `makewhatis' script that need to be changed
+ look like this:
+
+ eval $topath=$"$topath":$name
+ [...]
+ eval path=$"$pages"path
+ [...]
+ eval path=$"$pages"path
+
+ The portable way to write this code is
+
+ eval $topath="\$$topath":$name
+ eval path="\$$pages"path
+ eval path="\$$pages"path
+
+ You could also experiment with another new bash feature: ${!var}.
+ This does indirect variable expansion, making the use of eval
+ unnecessary.
+
+6. There is a problem with syslogd on many Linux distributions (Red Hat
+ and Slackware are two that I have received reports about). syslogd
+ sends a SIGINT to its parent process, which is waiting for the daemon
+ to finish its initialization. The parent process then dies due to
+ the SIGINT, and bash reports it, causing unexpected console output
+ while the system is booting that looks something like
+
+ starting daemons: syslogd/etc/rc.d/rc.M: line 29: 38 Interrupt ${NET}/syslogd
+
+ Bash-2.0 reports events such as processes dying in scripts due to
+ signals when the standard output is a tty. Bash-1.14.x and previous
+ versions did not report such events.
+
+ This should probably be reported as a bug to whatever Linux distributor
+ people see the problem on. In my opinion, syslogd should be changed to
+ use some other method of communication, or the wrapper function (which
+ appeared to be `daemon' when I looked at it some time ago) or script
+ (which appeared to be `syslog') should catch SIGINT, since it's an
+ expected event, and exit cleanly.
+
+7. Several people have reported that `dip' (a program for SLIP/PPP
+ on Linux) does not work with bash-2.0 installed as /bin/sh.
+
+ I don't run any Linux boxes myself, and do not have the dip
+ code handy to look at, but the `problem' with bash-2.0, as
+ it has been related to me, is that bash requires the `-p'
+ option to be supplied at invocation if it is to run setuid
+ or setgid.
+
+ This means, among other things, that setuid or setgid programs
+ which call system(3) (a horrendously bad practice in any case)
+ relinquish their setuid/setgid status in the child that's forked
+ to execute /bin/sh.
+
+ The following is an *unofficial* patch to bash-2.0 that causes it
+ to not require `-p' to run setuid or setgid if invoked as `sh'.
+ It has been reported to work on Linux. It will make your system
+ vulnerable to bogus system(3) calls in setuid executables.
+
+--- ../bash-2.0.orig/shell.c Wed Dec 18 14:16:30 1996
++++ shell.c Fri Mar 7 13:12:03 1997
+@@ -347,7 +347,7 @@
+ if (posixly_correct)
+ posix_initialize (posixly_correct);
+
+- if (running_setuid && privileged_mode == 0)
++ if (running_setuid && privileged_mode == 0 && act_like_sh == 0)
+ disable_priv_mode ();
+
+ /* Need to get the argument to a -c option processed in the
+
+8. Some people have asked about binding all of the keys in a PC-keyboard-
+ style numeric keypad to readline functions. Here's something I
+ received from the gnu-win32 list that may help. Insert the following
+ lines into ~/.inputrc:
+
+# home key
+"\e[1~":beginning-of-line
+# insert key
+"\e[2~":kill-whole-line
+# del key
+"\e[3~":delete-char
+# end key
+"\e[4~":end-of-line
+# pgup key
+"\e[5~":history-search-forward
+# pgdn key
+"\e[6~":history-search-backward
+
+9. Hints for building under Minix 2.0 (Contributed by Terry R. McConnell,
+ <tmc@barnyard.syr.edu>)
+
+ The version of /bin/sh distributed with Minix is not up to the job of
+ running the configure script. The easiest solution is to swap /bin/sh
+ with /usr/bin/ash. Then use chmem(1) to increase the memory allocated
+ to /bin/sh. The following settings are known to work:
+
+ text data bss stack memory
+ 63552 9440 3304 65536 141832 /bin/sh
+
+ If you have problems with make or yacc it may be worthwhile first to
+ install the GNU versions of these utilities before attempting to build
+ bash. (As of this writing, all of these utilities are available for the
+ i386 as pre-built binaries via anonymous ftp at math.syr.edu in the
+ pub/mcconnell/minix directory. Note that the GNU version of yacc is called
+ bison.)
+
+ Unless you want to see lots of warnings about old-style declarations,
+ do LOCAL_CFLAGS=-wo; export LOCAL_CFLAGS before running configure.
+ (These warnings are harmless, but annoying.)
+
+ configure will insist that you supply a host type. For example, do
+ ./configure --host=i386-pc-minix.
+
+ Minix does not support the system calls required for a proper
+ implementation of ulimit(). The `ulimit' builtin will not be available.
+
+ Configure will fail to notice that many things like uid_t are indeed
+ typedef'd in <sys/types.h>, because it uses egrep for this purpose
+ and minix has no egrep. You could try making a link /usr/bin/egrep -->
+ /usr/bin/grep. Better is to install the GNU version of grep in
+ /usr/local/bin and make the link /usr/local/bin/egrep -->/usr/local/bin/grep.
+ (These must be hard links, of course, since Minix does not support
+ symbolic links.)
+
+ You will see many warnings of the form:
+ warning: unknown s_type: 98
+ I have no idea what this means, but it doesn't seem to matter.
+
+10. If you do not have /usr/ccs/bin in your PATH when building on SunOS 5.x
+ (Solaris 2), the configure script will be unable to find `ar' and
+ `ranlib' (of course, ranlib is unnecessary). Make sure your $PATH
+ includes /usr/ccs/bin on SunOS 5.x. This generally manifests itself
+ with libraries not being built and make reporting errors like
+ `cr: not found' when library construction is attempted.
+
+11. Building a statically-linked bash on Solaris 2.5.x, 2.6, 7, or 8 is
+ complicated.
+
+ It's not possible to build a completely statically-linked binary, since
+ part of the C library depends on dynamic linking. The following recipe
+ assumes that you're using gcc and the Solaris ld (/usr/ccs/bin/ld) on
+ Solaris 2.5.x or 2.6:
+
+ configure --enable-static-link
+ make STATIC_LD= LOCAL_LIBS='-Wl,-B,dynamic -ldl -Wl,-B,static'
+
+ This should result in a bash binary that depends only on libdl.so:
+
+ thor(2)$ ldd bash
+ libdl.so.1 => /usr/lib/libdl.so.1
+
+ If you're using the Sun C Compiler (Sun WorkShop C Compiler version
+ 4.2 was what I used), you should be able to get away with using
+
+ configure --enable-static-link
+ make STATIC_LD= LOCAL_LIBS='-B dynamic -ldl -B static'
+
+ If you want to completely remove any dependence on /usr, perhaps
+ to put a copy of bash in /sbin and have it available when /usr is
+ not mounted, force the build process to use the shared dl.so library
+ in /etc/lib.
+
+ For gcc, this would be something like
+
+ configure --enable-static-link
+ make STATIC_LD= LOCAL_LIBS='-Wl,-B,dynamic -Wl,-R/etc/lib -ldl -Wl,-B,static'
+
+ For Sun's WS4.2 cc
+
+ configure --enable-static-link
+ make STATIC_LD= LOCAL_LIBS='-B dynamic -R/etc/lib -ldl -B static'
+
+ seems to work, at least on Solaris 2.5.1:
+
+ thor(2)$ ldd bash
+ libdl.so.1 => /etc/lib/libdl.so.1
+
+ On Solaris 7 (Solaris 8, using the version of gcc on the free software
+ CD-ROM), the following recipe appears to work for gcc:
+
+ configure --enable-static-link
+ make STATIC_LD='-Wl,-Bstatic' LOCAL_LIBS='-Wl,-Bdynamic -Wl,-R/etc/lib -ldl -Wl,-Bstatic'
+
+ thor.ins.cwru.edu(2)$ ldd bash
+ libdl.so.1 => /etc/lib/libdl.so.1
+
+ Make the analogous changes if you are running Sun's C Compiler.
+
+ I have received word that adding -L/etc/lib (or the equivalent
+ -Wl,-L/etc/lib) might also be necessary, in addition to the -R/etc/lib.
+
+ On later versions of Solaris, it may be necessary to add -lnsl before
+ -ldl; statically-linked versions of bash using libnsl are not guaranteed
+ to work correctly on future versions of Solaris.
+
+12. Configuring bash to build it in a cross environment. Currently only
+ two native versions can be compiled this way, cygwin32 and x86 BeOS.
+ For BeOS, you would configure it like this:
+
+ export RANLIB=i586-beos-ranlib
+ export AR=i586-beos-ar
+ export CC=i586-beos-gcc
+ configure i586-beos
+
+ Similarly for cygwin32.
+
+13. Bash-2.05 has reverted to the bash-2.03 behavior of honoring the current
+ locale setting when processing ranges within pattern matching bracket
+ expressions ([A-Z]). This is what POSIX.2 and SUSv2 specify.
+
+ The behavior of the matcher in bash-2.05 depends on the current LC_COLLATE
+ setting. Setting this variable to `C' or `POSIX' will result in the
+ traditional behavior ([A-Z] matches all uppercase ASCII characters).
+ Many other locales, including the en_US locale (the default on many US
+ versions of Linux) collate the upper and lower case letters like this:
+
+ AaBb...Zz
+
+ which means that [A-Z] matches every letter except `z'.
+
+ The portable way to specify upper case letters is [:upper:] instead of
+ A-Z; lower case may be specified as [:lower:] instead of a-z.
+
+ Look at the manual pages for setlocale(3), strcoll(3), and, if it is
+ present, locale(1). If you have locale(1), you can use it to find
+ your current locale information even if you do not have any of the
+ LC_ variables set.
+
+ My advice is to put
+
+ export LC_COLLATE=C
+
+ into /etc/profile and inspect any shell scripts run from cron for
+ constructs like [A-Z]. This will prevent things like
+
+ rm [A-Z]*
+
+ from removing every file in the current directory except those beginning
+ with `z' and still allow individual users to change the collation order.
+ Users may put the above command into their own profiles as well, of course.
+
+14. Building on Interix (nee OpenNT), which Microsoft bought from Softway
+ Systems and has seemingly abandoned (thanks to Kevin Moore for this item).
+
+ 1. cp cross-build/opennt.cache config.cache
+
+ 2. If desired, edit pathnames.h to set the values of SYS_PROFILE and
+ DEFAULT_HOSTS_FILE appropriately.
+
+ 3. export CONFIG_SHELL=$INTERIX_ROOT/bin/sh
+
+ 4. ./configure --prefix=$INTERIX_ROOT/usr/local (or wherever you
+ want it).
+
+ 5. make; make install; enjoy
+
+15. Configure with `CC=xlc' if you don't have gcc on AIX 4.2 and later
+ versions. `xlc' running in `cc' mode has trouble compiling error.c.
+
+16. Configure --disable-multibyte on NetBSD versions (1.4 through at least
+ 1.6.1) that include wctype.h but do not define wctype_t.
+
+17. Do NOT use bison-1.75. It builds a non-working parser. The most
+ obvious effect is that constructs like "for i; do echo $i; done" don't
+ loop over the positional parameters.
+
+18. I have received reports that using -O2 with the MIPSpro results in a
+ binary that fails in strange ways. Using -O1 seems to work.
+
+19. There is special handling to ensure the shell links against static
+ versions of the included readline and history libraries on Mac OS X;
+ Apple ships inadequate dynamic libreadline and libhistory "replacements"
+ as standard libraries.
+
+20. If you're on a system like SGI Irix, and you get an error about not
+ being able to refer to a dynamic symbol
+ (ld: non-dynamic relocations refer to dynamic symbol PC), add
+ -DNEED_EXTERN_PC to the LOCAL_CFLAGS variable in lib/readline/Makefile.in
+ and rebuild.
diff --git a/POSIX b/POSIX
new file mode 100644
index 0000000..6c57b87
--- /dev/null
+++ b/POSIX
@@ -0,0 +1,186 @@
+6.11 Bash POSIX Mode
+====================
+
+Starting Bash with the `--posix' command-line option or executing `set
+-o posix' while Bash is running will cause Bash to conform more closely
+to the POSIX standard by changing the behavior to match that specified
+by POSIX in areas where the Bash default differs.
+
+When invoked as `sh', Bash enters POSIX mode after reading the startup
+files.
+
+The following list is what's changed when `POSIX mode' is in effect:
+
+ 1. When a command in the hash table no longer exists, Bash will
+ re-search `$PATH' to find the new location. This is also
+ available with `shopt -s checkhash'.
+
+ 2. The message printed by the job control code and builtins when a job
+ exits with a non-zero status is `Done(status)'.
+
+ 3. The message printed by the job control code and builtins when a job
+ is stopped is `Stopped(SIGNAME)', where SIGNAME is, for example,
+ `SIGTSTP'.
+
+ 4. The `bg' builtin uses the required format to describe each job
+ placed in the background, which does not include an indication of
+ whether the job is the current or previous job.
+
+ 5. Reserved words appearing in a context where reserved words are
+ recognized do not undergo alias expansion.
+
+ 6. The POSIX `PS1' and `PS2' expansions of `!' to the history number
+ and `!!' to `!' are enabled, and parameter expansion is performed
+ on the values of `PS1' and `PS2' regardless of the setting of the
+ `promptvars' option.
+
+ 7. The POSIX startup files are executed (`$ENV') rather than the
+ normal Bash files.
+
+ 8. Tilde expansion is only performed on assignments preceding a
+ command name, rather than on all assignment statements on the line.
+
+ 9. The default history file is `~/.sh_history' (this is the default
+ value of `$HISTFILE').
+
+ 10. The output of `kill -l' prints all the signal names on a single
+ line, separated by spaces, without the `SIG' prefix.
+
+ 11. The `kill' builtin does not accept signal names with a `SIG'
+ prefix.
+
+ 12. Non-interactive shells exit if FILENAME in `.' FILENAME is not
+ found.
+
+ 13. Non-interactive shells exit if a syntax error in an arithmetic
+ expansion results in an invalid expression.
+
+ 14. Redirection operators do not perform filename expansion on the word
+ in the redirection unless the shell is interactive.
+
+ 15. Redirection operators do not perform word splitting on the word in
+ the redirection.
+
+ 16. Function names must be valid shell `name's. That is, they may not
+ contain characters other than letters, digits, and underscores, and
+ may not start with a digit. Declaring a function with an invalid
+ name causes a fatal syntax error in non-interactive shells.
+
+ 17. POSIX special builtins are found before shell functions during
+ command lookup.
+
+ 18. If a POSIX special builtin returns an error status, a
+ non-interactive shell exits. The fatal errors are those listed in
+ the POSIX standard, and include things like passing incorrect
+ options, redirection errors, variable assignment errors for
+ assignments preceding the command name, and so on.
+
+ 19. If `CDPATH' is set, the `cd' builtin will not implicitly append
+ the current directory to it. This means that `cd' will fail if no
+ valid directory name can be constructed from any of the entries in
+ `$CDPATH', even if the a directory with the same name as the name
+ given as an argument to `cd' exists in the current directory.
+
+ 20. A non-interactive shell exits with an error status if a variable
+ assignment error occurs when no command name follows the assignment
+ statements. A variable assignment error occurs, for example, when
+ trying to assign a value to a readonly variable.
+
+ 21. A non-interactive shell exits with an error status if the iteration
+ variable in a `for' statement or the selection variable in a
+ `select' statement is a readonly variable.
+
+ 22. Process substitution is not available.
+
+ 23. Assignment statements preceding POSIX special builtins persist in
+ the shell environment after the builtin completes.
+
+ 24. Assignment statements preceding shell function calls persist in the
+ shell environment after the function returns, as if a POSIX
+ special builtin command had been executed.
+
+ 25. The `export' and `readonly' builtin commands display their output
+ in the format required by POSIX.
+
+ 26. The `trap' builtin displays signal names without the leading `SIG'.
+
+ 27. The `trap' builtin doesn't check the first argument for a possible
+ signal specification and revert the signal handling to the original
+ disposition if it is, unless that argument consists solely of
+ digits and is a valid signal number. If users want to reset the
+ handler for a given signal to the original disposition, they
+ should use `-' as the first argument.
+
+ 28. The `.' and `source' builtins do not search the current directory
+ for the filename argument if it is not found by searching `PATH'.
+
+ 29. Subshells spawned to execute command substitutions inherit the
+ value of the `-e' option from the parent shell. When not in POSIX
+ mode, Bash clears the `-e' option in such subshells.
+
+ 30. Alias expansion is always enabled, even in non-interactive shells.
+
+ 31. When the `alias' builtin displays alias definitions, it does not
+ display them with a leading `alias ' unless the `-p' option is
+ supplied.
+
+ 32. When the `set' builtin is invoked without options, it does not
+ display shell function names and definitions.
+
+ 33. When the `set' builtin is invoked without options, it displays
+ variable values without quotes, unless they contain shell
+ metacharacters, even if the result contains nonprinting characters.
+
+ 34. When the `cd' builtin is invoked in LOGICAL mode, and the pathname
+ constructed from `$PWD' and the directory name supplied as an
+ argument does not refer to an existing directory, `cd' will fail
+ instead of falling back to PHYSICAL mode.
+
+ 35. When the `pwd' builtin is supplied the `-P' option, it resets
+ `$PWD' to a pathname containing no symlinks.
+
+ 36. The `pwd' builtin verifies that the value it prints is the same as
+ the current directory, even if it is not asked to check the file
+ system with the `-P' option.
+
+ 37. When listing the history, the `fc' builtin does not include an
+ indication of whether or not a history entry has been modified.
+
+ 38. The default editor used by `fc' is `ed'.
+
+ 39. The `type' and `command' builtins will not report a non-executable
+ file as having been found, though the shell will attempt to
+ execute such a file if it is the only so-named file found in
+ `$PATH'.
+
+ 40. The `vi' editing mode will invoke the `vi' editor directly when
+ the `v' command is run, instead of checking `$VISUAL' and
+ `$EDITOR'.
+
+ 41. When the `xpg_echo' option is enabled, Bash does not attempt to
+ interpret any arguments to `echo' as options. Each argument is
+ displayed, after escape characters are converted.
+
+ 42. The `ulimit' builtin uses a block size of 512 bytes for the `-c'
+ and `-f' options.
+
+ 43. The arrival of `SIGCHLD' when a trap is set on `SIGCHLD' does not
+ interrupt the `wait' builtin and cause it to return immediately.
+ The trap command is run once for each child that exits.
+
+
+There is other POSIX behavior that Bash does not implement by default
+even when in POSIX mode. Specifically:
+
+ 1. The `fc' builtin checks `$EDITOR' as a program to edit history
+ entries if `FCEDIT' is unset, rather than defaulting directly to
+ `ed'. `fc' uses `ed' if `EDITOR' is unset.
+
+ 2. As noted above, Bash requires the `xpg_echo' option to be enabled
+ for the `echo' builtin to be fully conformant.
+
+
+Bash can be configured to be POSIX-conformant by default, by specifying
+the `--enable-strict-posix-default' to `configure' when building (*note
+Optional Features::).
+
diff --git a/RBASH b/RBASH
new file mode 100644
index 0000000..0e5c10b
--- /dev/null
+++ b/RBASH
@@ -0,0 +1,49 @@
+6.10 The Restricted Shell
+=========================
+
+If Bash is started with the name `rbash', or the `--restricted' or `-r'
+option is supplied at invocation, the shell becomes restricted. A
+restricted shell is used to set up an environment more controlled than
+the standard shell. A restricted shell behaves identically to `bash'
+with the exception that the following are disallowed or not performed:
+
+ * Changing directories with the `cd' builtin.
+
+ * Setting or unsetting the values of the `SHELL', `PATH', `ENV', or
+ `BASH_ENV' variables.
+
+ * Specifying command names containing slashes.
+
+ * Specifying a filename containing a slash as an argument to the `.'
+ builtin command.
+
+ * Specifying a filename containing a slash as an argument to the `-p'
+ option to the `hash' builtin command.
+
+ * Importing function definitions from the shell environment at
+ startup.
+
+ * Parsing the value of `SHELLOPTS' from the shell environment at
+ startup.
+
+ * Redirecting output using the `>', `>|', `<>', `>&', `&>', and `>>'
+ redirection operators.
+
+ * Using the `exec' builtin to replace the shell with another command.
+
+ * Adding or deleting builtin commands with the `-f' and `-d' options
+ to the `enable' builtin.
+
+ * Using the `enable' builtin command to enable disabled shell
+ builtins.
+
+ * Specifying the `-p' option to the `command' builtin.
+
+ * Turning off restricted mode with `set +r' or `set +o restricted'.
+
+These restrictions are enforced after any startup files are read.
+
+When a command that is found to be a shell script is executed (*note
+Shell Scripts::), `rbash' turns off any restrictions in the shell
+spawned to execute the script.
+
diff --git a/README b/README
new file mode 100644
index 0000000..c5c7159
--- /dev/null
+++ b/README
@@ -0,0 +1,96 @@
+Introduction
+============
+
+This is GNU Bash, version 4.1. Bash is the GNU Project's Bourne
+Again SHell, a complete implementation of the POSIX.2 shell spec,
+but also with interactive command line editing, job control on
+architectures that support it, csh-like features such as history
+substitution and brace expansion, and a slew of other features.
+For more information on the features of Bash that are new to this
+type of shell, see the file `doc/bashref.texi'. There is also a
+large Unix-style man page. The man page is the definitive description
+of the shell's features.
+
+See the file POSIX for a discussion of how the Bash defaults differ
+from the POSIX.2 spec and a description of the Bash `posix mode'.
+
+There are some user-visible incompatibilities between this version
+of Bash and previous widely-distributed versions, bash-3.2 and
+bash-4.0. For details, see the file COMPAT. The NEWS file tersely
+lists features that are new in this release.
+
+Bash is free software, distributed under the terms of the [GNU] General
+Public License as published by the Free Software Foundation,
+version 3 of the License (or any later version). For more information,
+see the file COPYING.
+
+A number of frequently-asked questions are answered in the file
+`doc/FAQ'.
+
+To compile Bash, try typing `./configure', then `make'. Bash
+auto-configures the build process, so no further intervention
+should be necessary. Bash builds with `gcc' by default if it is
+available. If you want to use `cc' instead, type
+
+ CC=cc ./configure
+
+if you are using a Bourne-style shell. If you are not, the following
+may work:
+
+ env CC=cc ./configure
+
+Read the file INSTALL in this directory for more information about how
+to customize and control the build process. The file NOTES contains
+platform-specific installation and configuration information.
+
+If you are a csh user and wish to convert your csh aliases to Bash
+aliases, you may wish to use the script `examples/misc/alias-conv.sh'
+as a starting point. The script `examples/misc/cshtobash' is a
+more ambitious script that attempts to do a more complete job.
+
+Reporting Bugs
+==============
+
+Bug reports for bash should be sent to:
+
+ bug-bash@gnu.org
+
+using the `bashbug' program that is built and installed at the same
+time as bash.
+
+The discussion list `bug-bash@gnu.org' often contains information
+about new ports of Bash, or discussions of new features or behavior
+changes that people would like. This mailing list is also available
+as a usenet newsgroup: gnu.bash.bug.
+
+When you send a bug report, please use the `bashbug' program that is
+built at the same time as bash. If bash fails to build, try building
+bashbug directly with `make bashbug'. If you cannot build `bashbug',
+please send mail to bug-bash@gnu.org with the following information:
+
+ * the version number and release status of Bash (e.g., 2.05a-release)
+ * the machine and OS that it is running on (you may run
+ `bashversion -l' from the bash build directory for this information)
+ * a list of the compilation flags or the contents of `config.h', if
+ appropriate
+ * a description of the bug
+ * a recipe for recreating the bug reliably
+ * a fix for the bug if you have one!
+
+The `bashbug' program includes much of this automatically.
+
+If you would like to contact the Bash maintainers directly, send mail
+to bash-maintainers@gnu.org.
+
+While the Bash maintainers do not promise to fix all bugs, we would
+like this shell to be the best that we can make it.
+
+Enjoy!
+
+Chet Ramey
+chet.ramey@case.edu
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved. This file is offered as-is,
+without any warranty.
diff --git a/Y2K b/Y2K
new file mode 100644
index 0000000..d12e352
--- /dev/null
+++ b/Y2K
@@ -0,0 +1,4 @@
+Since Bash does not manipulate date strings, it is Y2K-safe.
+
+The only thing that Bash does with date strings is manipulate the string
+returned by ctime(3) or strftime(3) in the prompt customization code.
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..10a4741
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,4117 @@
+dnl
+dnl Bash specific tests
+dnl
+dnl Some derived from PDKSH 5.1.3 autoconf tests
+dnl
+
+AC_DEFUN(BASH_C_LONG_LONG,
+[AC_CACHE_CHECK(for long long, ac_cv_c_long_long,
+[if test "$GCC" = yes; then
+ ac_cv_c_long_long=yes
+else
+AC_TRY_RUN([
+int
+main()
+{
+long long foo = 0;
+exit(sizeof(long long) < sizeof(long));
+}
+], ac_cv_c_long_long=yes, ac_cv_c_long_long=no)
+fi])
+if test $ac_cv_c_long_long = yes; then
+ AC_DEFINE(HAVE_LONG_LONG, 1, [Define if the `long long' type works.])
+fi
+])
+
+dnl
+dnl This is very similar to AC_C_LONG_DOUBLE, with the fix for IRIX
+dnl (< changed to <=) added.
+dnl
+AC_DEFUN(BASH_C_LONG_DOUBLE,
+[AC_CACHE_CHECK(for long double, ac_cv_c_long_double,
+[if test "$GCC" = yes; then
+ ac_cv_c_long_double=yes
+else
+AC_TRY_RUN([
+int
+main()
+{
+ /* The Stardent Vistra knows sizeof(long double), but does not
+ support it. */
+ long double foo = 0.0;
+ /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
+ /* On IRIX 5.3, the compiler converts long double to double with a warning,
+ but compiles this successfully. */
+ exit(sizeof(long double) <= sizeof(double));
+}
+], ac_cv_c_long_double=yes, ac_cv_c_long_double=no)
+fi])
+if test $ac_cv_c_long_double = yes; then
+ AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if the `long double' type works.])
+fi
+])
+
+dnl
+dnl Check for <inttypes.h>. This is separated out so that it can be
+dnl AC_REQUIREd.
+dnl
+dnl BASH_HEADER_INTTYPES
+AC_DEFUN(BASH_HEADER_INTTYPES,
+[
+ AC_CHECK_HEADERS(inttypes.h)
+])
+
+dnl
+dnl check for typedef'd symbols in header files, but allow the caller to
+dnl specify the include files to be checked in addition to the default
+dnl
+dnl BASH_CHECK_TYPE(TYPE, HEADERS, DEFAULT[, VALUE-IF-FOUND])
+AC_DEFUN(BASH_CHECK_TYPE,
+[
+AC_REQUIRE([AC_HEADER_STDC])dnl
+AC_REQUIRE([BASH_HEADER_INTTYPES])
+AC_MSG_CHECKING(for $1)
+AC_CACHE_VAL(bash_cv_type_$1,
+[AC_EGREP_CPP($1, [#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#if HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+$2
+], bash_cv_type_$1=yes, bash_cv_type_$1=no)])
+AC_MSG_RESULT($bash_cv_type_$1)
+ifelse($#, 4, [if test $bash_cv_type_$1 = yes; then
+ AC_DEFINE($4)
+ fi])
+if test $bash_cv_type_$1 = no; then
+ AC_DEFINE_UNQUOTED($1, $3)
+fi
+])
+
+dnl
+dnl BASH_CHECK_DECL(FUNC)
+dnl
+dnl Check for a declaration of FUNC in stdlib.h and inttypes.h like
+dnl AC_CHECK_DECL
+dnl
+AC_DEFUN(BASH_CHECK_DECL,
+[
+AC_REQUIRE([AC_HEADER_STDC])
+AC_REQUIRE([BASH_HEADER_INTTYPES])
+AC_CACHE_CHECK([for declaration of $1], bash_cv_decl_$1,
+[AC_TRY_LINK(
+[
+#if STDC_HEADERS
+# include <stdlib.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+],
+[return !$1;],
+bash_cv_decl_$1=yes, bash_cv_decl_$1=no)])
+bash_tr_func=HAVE_DECL_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+if test $bash_cv_decl_$1 = yes; then
+ AC_DEFINE_UNQUOTED($bash_tr_func, 1)
+else
+ AC_DEFINE_UNQUOTED($bash_tr_func, 0)
+fi
+])
+
+AC_DEFUN(BASH_DECL_PRINTF,
+[AC_MSG_CHECKING(for declaration of printf in <stdio.h>)
+AC_CACHE_VAL(bash_cv_printf_declared,
+[AC_TRY_RUN([
+#include <stdio.h>
+#ifdef __STDC__
+typedef int (*_bashfunc)(const char *, ...);
+#else
+typedef int (*_bashfunc)();
+#endif
+main()
+{
+_bashfunc pf;
+pf = (_bashfunc) printf;
+exit(pf == 0);
+}
+], bash_cv_printf_declared=yes, bash_cv_printf_declared=no,
+ [AC_MSG_WARN(cannot check printf declaration if cross compiling -- defaulting to yes)
+ bash_cv_printf_declared=yes]
+)])
+AC_MSG_RESULT($bash_cv_printf_declared)
+if test $bash_cv_printf_declared = yes; then
+AC_DEFINE(PRINTF_DECLARED)
+fi
+])
+
+AC_DEFUN(BASH_DECL_SBRK,
+[AC_MSG_CHECKING(for declaration of sbrk in <unistd.h>)
+AC_CACHE_VAL(bash_cv_sbrk_declared,
+[AC_EGREP_HEADER(sbrk, unistd.h,
+ bash_cv_sbrk_declared=yes, bash_cv_sbrk_declared=no)])
+AC_MSG_RESULT($bash_cv_sbrk_declared)
+if test $bash_cv_sbrk_declared = yes; then
+AC_DEFINE(SBRK_DECLARED)
+fi
+])
+
+dnl
+dnl Check for sys_siglist[] or _sys_siglist[]
+dnl
+AC_DEFUN(BASH_DECL_UNDER_SYS_SIGLIST,
+[AC_MSG_CHECKING([for _sys_siglist in signal.h or unistd.h])
+AC_CACHE_VAL(bash_cv_decl_under_sys_siglist,
+[AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <signal.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif], [ char *msg = _sys_siglist[2]; ],
+ bash_cv_decl_under_sys_siglist=yes, bash_cv_decl_under_sys_siglist=no,
+ [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)])])dnl
+AC_MSG_RESULT($bash_cv_decl_under_sys_siglist)
+if test $bash_cv_decl_under_sys_siglist = yes; then
+AC_DEFINE(UNDER_SYS_SIGLIST_DECLARED)
+fi
+])
+
+AC_DEFUN(BASH_UNDER_SYS_SIGLIST,
+[AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
+AC_MSG_CHECKING([for _sys_siglist in system C library])
+AC_CACHE_VAL(bash_cv_under_sys_siglist,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#include <signal.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifndef UNDER_SYS_SIGLIST_DECLARED
+extern char *_sys_siglist[];
+#endif
+main()
+{
+char *msg = (char *)_sys_siglist[2];
+exit(msg == 0);
+}],
+ bash_cv_under_sys_siglist=yes, bash_cv_under_sys_siglist=no,
+ [AC_MSG_WARN(cannot check for _sys_siglist[] if cross compiling -- defaulting to no)
+ bash_cv_under_sys_siglist=no])])
+AC_MSG_RESULT($bash_cv_under_sys_siglist)
+if test $bash_cv_under_sys_siglist = yes; then
+AC_DEFINE(HAVE_UNDER_SYS_SIGLIST)
+fi
+])
+
+AC_DEFUN(BASH_SYS_SIGLIST,
+[AC_REQUIRE([AC_DECL_SYS_SIGLIST])
+AC_MSG_CHECKING([for sys_siglist in system C library])
+AC_CACHE_VAL(bash_cv_sys_siglist,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#include <signal.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if !HAVE_DECL_SYS_SIGLIST
+extern char *sys_siglist[];
+#endif
+main()
+{
+char *msg = sys_siglist[2];
+exit(msg == 0);
+}],
+ bash_cv_sys_siglist=yes, bash_cv_sys_siglist=no,
+ [AC_MSG_WARN(cannot check for sys_siglist if cross compiling -- defaulting to no)
+ bash_cv_sys_siglist=no])])
+AC_MSG_RESULT($bash_cv_sys_siglist)
+if test $bash_cv_sys_siglist = yes; then
+AC_DEFINE(HAVE_SYS_SIGLIST)
+fi
+])
+
+dnl Check for the various permutations of sys_siglist and make sure we
+dnl compile in siglist.o if they're not defined
+AC_DEFUN(BASH_CHECK_SYS_SIGLIST, [
+AC_REQUIRE([BASH_SYS_SIGLIST])
+AC_REQUIRE([BASH_DECL_UNDER_SYS_SIGLIST])
+AC_REQUIRE([BASH_FUNC_STRSIGNAL])
+if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then
+ SIGLIST_O=siglist.o
+else
+ SIGLIST_O=
+fi
+AC_SUBST([SIGLIST_O])
+])
+
+dnl Check for sys_errlist[] and sys_nerr, check for declaration
+AC_DEFUN(BASH_SYS_ERRLIST,
+[AC_MSG_CHECKING([for sys_errlist and sys_nerr])
+AC_CACHE_VAL(bash_cv_sys_errlist,
+[AC_TRY_LINK([#include <errno.h>],
+[extern char *sys_errlist[];
+ extern int sys_nerr;
+ char *msg = sys_errlist[sys_nerr - 1];],
+ bash_cv_sys_errlist=yes, bash_cv_sys_errlist=no)])dnl
+AC_MSG_RESULT($bash_cv_sys_errlist)
+if test $bash_cv_sys_errlist = yes; then
+AC_DEFINE(HAVE_SYS_ERRLIST)
+fi
+])
+
+dnl
+dnl Check if dup2() does not clear the close on exec flag
+dnl
+AC_DEFUN(BASH_FUNC_DUP2_CLOEXEC_CHECK,
+[AC_MSG_CHECKING(if dup2 fails to clear the close-on-exec flag)
+AC_CACHE_VAL(bash_cv_dup2_broken,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#include <fcntl.h>
+main()
+{
+ int fd1, fd2, fl;
+ fd1 = open("/dev/null", 2);
+ if (fcntl(fd1, 2, 1) < 0)
+ exit(1);
+ fd2 = dup2(fd1, 1);
+ if (fd2 < 0)
+ exit(2);
+ fl = fcntl(fd2, 1, 0);
+ /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
+ exit(fl != 1);
+}
+], bash_cv_dup2_broken=yes, bash_cv_dup2_broken=no,
+ [AC_MSG_WARN(cannot check dup2 if cross compiling -- defaulting to no)
+ bash_cv_dup2_broken=no])
+])
+AC_MSG_RESULT($bash_cv_dup2_broken)
+if test $bash_cv_dup2_broken = yes; then
+AC_DEFINE(DUP2_BROKEN)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_STRSIGNAL,
+[AC_MSG_CHECKING([for the existence of strsignal])
+AC_CACHE_VAL(bash_cv_have_strsignal,
+[AC_TRY_LINK([#include <sys/types.h>
+#include <signal.h>],
+[char *s = (char *)strsignal(2);],
+ bash_cv_have_strsignal=yes, bash_cv_have_strsignal=no)])
+AC_MSG_RESULT($bash_cv_have_strsignal)
+if test $bash_cv_have_strsignal = yes; then
+AC_DEFINE(HAVE_STRSIGNAL)
+fi
+])
+
+dnl Check to see if opendir will open non-directories (not a nice thing)
+AC_DEFUN(BASH_FUNC_OPENDIR_CHECK,
+[AC_REQUIRE([AC_HEADER_DIRENT])dnl
+AC_MSG_CHECKING(if opendir() opens non-directories)
+AC_CACHE_VAL(bash_cv_opendir_not_robust,
+[AC_TRY_RUN([
+#include <stdio.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif /* SYSNDIR */
+# ifdef HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif /* SYSDIR */
+# ifdef HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif /* HAVE_DIRENT_H */
+main()
+{
+DIR *dir;
+int fd, err;
+err = mkdir("bash-aclocal", 0700);
+if (err < 0) {
+ perror("mkdir");
+ exit(1);
+}
+unlink("bash-aclocal/not_a_directory");
+fd = open("bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
+write(fd, "\n", 1);
+close(fd);
+dir = opendir("bash-aclocal/not_a_directory");
+unlink("bash-aclocal/not_a_directory");
+rmdir("bash-aclocal");
+exit (dir == 0);
+}], bash_cv_opendir_not_robust=yes,bash_cv_opendir_not_robust=no,
+ [AC_MSG_WARN(cannot check opendir if cross compiling -- defaulting to no)
+ bash_cv_opendir_not_robust=no]
+)])
+AC_MSG_RESULT($bash_cv_opendir_not_robust)
+if test $bash_cv_opendir_not_robust = yes; then
+AC_DEFINE(OPENDIR_NOT_ROBUST)
+fi
+])
+
+dnl
+AC_DEFUN(BASH_TYPE_SIGHANDLER,
+[AC_MSG_CHECKING([whether signal handlers are of type void])
+AC_CACHE_VAL(bash_cv_void_sighandler,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+#undef signal
+#endif
+#ifdef __cplusplus
+extern "C"
+#endif
+void (*signal ()) ();],
+[int i;], bash_cv_void_sighandler=yes, bash_cv_void_sighandler=no)])dnl
+AC_MSG_RESULT($bash_cv_void_sighandler)
+if test $bash_cv_void_sighandler = yes; then
+AC_DEFINE(VOID_SIGHANDLER)
+fi
+])
+
+dnl
+dnl A signed 16-bit integer quantity
+dnl
+AC_DEFUN(BASH_TYPE_BITS16_T,
+[
+if test "$ac_cv_sizeof_short" = 2; then
+ AC_CHECK_TYPE(bits16_t, short)
+elif test "$ac_cv_sizeof_char" = 2; then
+ AC_CHECK_TYPE(bits16_t, char)
+else
+ AC_CHECK_TYPE(bits16_t, short)
+fi
+])
+
+dnl
+dnl An unsigned 16-bit integer quantity
+dnl
+AC_DEFUN(BASH_TYPE_U_BITS16_T,
+[
+if test "$ac_cv_sizeof_short" = 2; then
+ AC_CHECK_TYPE(u_bits16_t, unsigned short)
+elif test "$ac_cv_sizeof_char" = 2; then
+ AC_CHECK_TYPE(u_bits16_t, unsigned char)
+else
+ AC_CHECK_TYPE(u_bits16_t, unsigned short)
+fi
+])
+
+dnl
+dnl A signed 32-bit integer quantity
+dnl
+AC_DEFUN(BASH_TYPE_BITS32_T,
+[
+if test "$ac_cv_sizeof_int" = 4; then
+ AC_CHECK_TYPE(bits32_t, int)
+elif test "$ac_cv_sizeof_long" = 4; then
+ AC_CHECK_TYPE(bits32_t, long)
+else
+ AC_CHECK_TYPE(bits32_t, int)
+fi
+])
+
+dnl
+dnl An unsigned 32-bit integer quantity
+dnl
+AC_DEFUN(BASH_TYPE_U_BITS32_T,
+[
+if test "$ac_cv_sizeof_int" = 4; then
+ AC_CHECK_TYPE(u_bits32_t, unsigned int)
+elif test "$ac_cv_sizeof_long" = 4; then
+ AC_CHECK_TYPE(u_bits32_t, unsigned long)
+else
+ AC_CHECK_TYPE(u_bits32_t, unsigned int)
+fi
+])
+
+AC_DEFUN(BASH_TYPE_PTRDIFF_T,
+[
+if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
+ AC_CHECK_TYPE(ptrdiff_t, int)
+elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
+ AC_CHECK_TYPE(ptrdiff_t, long)
+elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then
+ AC_CHECK_TYPE(ptrdiff_t, [long long])
+else
+ AC_CHECK_TYPE(ptrdiff_t, int)
+fi
+])
+
+dnl
+dnl A signed 64-bit quantity
+dnl
+AC_DEFUN(BASH_TYPE_BITS64_T,
+[
+if test "$ac_cv_sizeof_char_p" = 8; then
+ AC_CHECK_TYPE(bits64_t, char *)
+elif test "$ac_cv_sizeof_double" = 8; then
+ AC_CHECK_TYPE(bits64_t, double)
+elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then
+ AC_CHECK_TYPE(bits64_t, [long long])
+elif test "$ac_cv_sizeof_long" = 8; then
+ AC_CHECK_TYPE(bits64_t, long)
+else
+ AC_CHECK_TYPE(bits64_t, double)
+fi
+])
+
+AC_DEFUN(BASH_TYPE_LONG_LONG,
+[
+AC_CACHE_CHECK([for long long], bash_cv_type_long_long,
+[AC_TRY_LINK([
+long long ll = 1; int i = 63;],
+[
+long long llm = (long long) -1;
+return ll << i | ll >> i | llm / ll | llm % ll;
+], bash_cv_type_long_long='long long', bash_cv_type_long_long='long')])
+if test "$bash_cv_type_long_long" = 'long long'; then
+ AC_DEFINE(HAVE_LONG_LONG, 1)
+fi
+])
+
+AC_DEFUN(BASH_TYPE_UNSIGNED_LONG_LONG,
+[
+AC_CACHE_CHECK([for unsigned long long], bash_cv_type_unsigned_long_long,
+[AC_TRY_LINK([
+unsigned long long ull = 1; int i = 63;],
+[
+unsigned long long ullmax = (unsigned long long) -1;
+return ull << i | ull >> i | ullmax / ull | ullmax % ull;
+], bash_cv_type_unsigned_long_long='unsigned long long',
+ bash_cv_type_unsigned_long_long='unsigned long')])
+if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then
+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1)
+fi
+])
+
+dnl
+dnl Type of struct rlimit fields: some systems (OSF/1, NetBSD, RISC/os 5.0)
+dnl have a rlim_t, others (4.4BSD based systems) use quad_t, others use
+dnl long and still others use int (HP-UX 9.01, SunOS 4.1.3). To simplify
+dnl matters, this just checks for rlim_t, quad_t, or long.
+dnl
+AC_DEFUN(BASH_TYPE_RLIMIT,
+[AC_MSG_CHECKING(for size and type of struct rlimit fields)
+AC_CACHE_VAL(bash_cv_type_rlimit,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/resource.h>],
+[rlim_t xxx;], bash_cv_type_rlimit=rlim_t,[
+AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+main()
+{
+#ifdef HAVE_QUAD_T
+ struct rlimit rl;
+ if (sizeof(rl.rlim_cur) == sizeof(quad_t))
+ exit(0);
+#endif
+ exit(1);
+}], bash_cv_type_rlimit=quad_t, bash_cv_type_rlimit=long,
+ [AC_MSG_WARN(cannot check quad_t if cross compiling -- defaulting to long)
+ bash_cv_type_rlimit=long])])
+])
+AC_MSG_RESULT($bash_cv_type_rlimit)
+if test $bash_cv_type_rlimit = quad_t; then
+AC_DEFINE(RLIMTYPE, quad_t)
+elif test $bash_cv_type_rlimit = rlim_t; then
+AC_DEFINE(RLIMTYPE, rlim_t)
+fi
+])
+
+AC_DEFUN(BASH_TYPE_SIG_ATOMIC_T,
+[AC_CACHE_CHECK([for sig_atomic_t in signal.h], ac_cv_have_sig_atomic_t,
+[AC_TRY_LINK([
+#include <signal.h>
+],[ sig_atomic_t x; ],
+ac_cv_have_sig_atomic_t=yes, ac_cv_have_sig_atomic_t=no)])
+if test "$ac_cv_have_sig_atomic_t" = "no"
+then
+ AC_CHECK_TYPE(sig_atomic_t,int)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_LSTAT,
+[dnl Cannot use AC_CHECK_FUNCS(lstat) because Linux defines lstat() as an
+dnl inline function in <sys/stat.h>.
+AC_CACHE_CHECK([for lstat], bash_cv_func_lstat,
+[AC_TRY_LINK([
+#include <sys/types.h>
+#include <sys/stat.h>
+],[ lstat(".",(struct stat *)0); ],
+bash_cv_func_lstat=yes, bash_cv_func_lstat=no)])
+if test $bash_cv_func_lstat = yes; then
+ AC_DEFINE(HAVE_LSTAT)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_INET_ATON,
+[
+AC_CACHE_CHECK([for inet_aton], bash_cv_func_inet_aton,
+[AC_TRY_LINK([
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+struct in_addr ap;], [ inet_aton("127.0.0.1", &ap); ],
+bash_cv_func_inet_aton=yes, bash_cv_func_inet_aton=no)])
+if test $bash_cv_func_inet_aton = yes; then
+ AC_DEFINE(HAVE_INET_ATON)
+else
+ AC_LIBOBJ(inet_aton)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_GETENV,
+[AC_MSG_CHECKING(to see if getenv can be redefined)
+AC_CACHE_VAL(bash_cv_getenv_redef,
+[AC_TRY_RUN([
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#ifndef __STDC__
+# ifndef const
+# define const
+# endif
+#endif
+char *
+getenv (name)
+#if defined (__linux__) || defined (__bsdi__) || defined (convex)
+ const char *name;
+#else
+ char const *name;
+#endif /* !__linux__ && !__bsdi__ && !convex */
+{
+return "42";
+}
+main()
+{
+char *s;
+/* The next allows this program to run, but does not allow bash to link
+ when it redefines getenv. I'm not really interested in figuring out
+ why not. */
+#if defined (NeXT)
+exit(1);
+#endif
+s = getenv("ABCDE");
+exit(s == 0); /* force optimizer to leave getenv in */
+}
+], bash_cv_getenv_redef=yes, bash_cv_getenv_redef=no,
+ [AC_MSG_WARN(cannot check getenv redefinition if cross compiling -- defaulting to yes)
+ bash_cv_getenv_redef=yes]
+)])
+AC_MSG_RESULT($bash_cv_getenv_redef)
+if test $bash_cv_getenv_redef = yes; then
+AC_DEFINE(CAN_REDEFINE_GETENV)
+fi
+])
+
+# We should check for putenv before calling this
+AC_DEFUN(BASH_FUNC_STD_PUTENV,
+[
+AC_REQUIRE([AC_HEADER_STDC])
+AC_REQUIRE([AC_C_PROTOTYPES])
+AC_CACHE_CHECK([for standard-conformant putenv declaration], bash_cv_std_putenv,
+[AC_TRY_LINK([
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#ifndef __STDC__
+# ifndef const
+# define const
+# endif
+#endif
+#ifdef PROTOTYPES
+extern int putenv (char *);
+#else
+extern int putenv ();
+#endif
+],
+[return (putenv == 0);],
+bash_cv_std_putenv=yes, bash_cv_std_putenv=no
+)])
+if test $bash_cv_std_putenv = yes; then
+AC_DEFINE(HAVE_STD_PUTENV)
+fi
+])
+
+# We should check for unsetenv before calling this
+AC_DEFUN(BASH_FUNC_STD_UNSETENV,
+[
+AC_REQUIRE([AC_HEADER_STDC])
+AC_REQUIRE([AC_C_PROTOTYPES])
+AC_CACHE_CHECK([for standard-conformant unsetenv declaration], bash_cv_std_unsetenv,
+[AC_TRY_LINK([
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#ifndef __STDC__
+# ifndef const
+# define const
+# endif
+#endif
+#ifdef PROTOTYPES
+extern int unsetenv (const char *);
+#else
+extern int unsetenv ();
+#endif
+],
+[return (unsetenv == 0);],
+bash_cv_std_unsetenv=yes, bash_cv_std_unsetenv=no
+)])
+if test $bash_cv_std_unsetenv = yes; then
+AC_DEFINE(HAVE_STD_UNSETENV)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_ULIMIT_MAXFDS,
+[AC_MSG_CHECKING(whether ulimit can substitute for getdtablesize)
+AC_CACHE_VAL(bash_cv_ulimit_maxfds,
+[AC_TRY_RUN([
+main()
+{
+long maxfds = ulimit(4, 0L);
+exit (maxfds == -1L);
+}
+], bash_cv_ulimit_maxfds=yes, bash_cv_ulimit_maxfds=no,
+ [AC_MSG_WARN(cannot check ulimit if cross compiling -- defaulting to no)
+ bash_cv_ulimit_maxfds=no]
+)])
+AC_MSG_RESULT($bash_cv_ulimit_maxfds)
+if test $bash_cv_ulimit_maxfds = yes; then
+AC_DEFINE(ULIMIT_MAXFDS)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_GETCWD,
+[AC_MSG_CHECKING([if getcwd() will dynamically allocate memory with 0 size])
+AC_CACHE_VAL(bash_cv_getcwd_malloc,
+[AC_TRY_RUN([
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+main()
+{
+ char *xpwd;
+ xpwd = getcwd(0, 0);
+ exit (xpwd == 0);
+}
+], bash_cv_getcwd_malloc=yes, bash_cv_getcwd_malloc=no,
+ [AC_MSG_WARN(cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no)
+ bash_cv_getcwd_malloc=no]
+)])
+AC_MSG_RESULT($bash_cv_getcwd_malloc)
+if test $bash_cv_getcwd_malloc = no; then
+AC_DEFINE(GETCWD_BROKEN)
+AC_LIBOBJ(getcwd)
+fi
+])
+
+dnl
+dnl This needs BASH_CHECK_SOCKLIB, but since that's not called on every
+dnl system, we can't use AC_PREREQ
+dnl
+AC_DEFUN(BASH_FUNC_GETHOSTBYNAME,
+[if test "X$bash_cv_have_gethostbyname" = "X"; then
+_bash_needmsg=yes
+else
+AC_MSG_CHECKING(for gethostbyname in socket library)
+_bash_needmsg=
+fi
+AC_CACHE_VAL(bash_cv_have_gethostbyname,
+[AC_TRY_LINK([#include <netdb.h>],
+[ struct hostent *hp;
+ hp = gethostbyname("localhost");
+], bash_cv_have_gethostbyname=yes, bash_cv_have_gethostbyname=no)]
+)
+if test "X$_bash_needmsg" = Xyes; then
+ AC_MSG_CHECKING(for gethostbyname in socket library)
+fi
+AC_MSG_RESULT($bash_cv_have_gethostbyname)
+if test "$bash_cv_have_gethostbyname" = yes; then
+AC_DEFINE(HAVE_GETHOSTBYNAME)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_FNMATCH_EXTMATCH,
+[AC_MSG_CHECKING(if fnmatch does extended pattern matching with FNM_EXTMATCH)
+AC_CACHE_VAL(bash_cv_fnm_extmatch,
+[AC_TRY_RUN([
+#include <fnmatch.h>
+
+main()
+{
+#ifdef FNM_EXTMATCH
+ exit (0);
+#else
+ exit (1);
+#endif
+}
+], bash_cv_fnm_extmatch=yes, bash_cv_fnm_extmatch=no,
+ [AC_MSG_WARN(cannot check FNM_EXTMATCH if cross compiling -- defaulting to no)
+ bash_cv_fnm_extmatch=no])
+])
+AC_MSG_RESULT($bash_cv_fnm_extmatch)
+if test $bash_cv_fnm_extmatch = yes; then
+AC_DEFINE(HAVE_LIBC_FNM_EXTMATCH)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_POSIX_SETJMP,
+[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
+AC_MSG_CHECKING(for presence of POSIX-style sigsetjmp/siglongjmp)
+AC_CACHE_VAL(bash_cv_func_sigsetjmp,
+[AC_TRY_RUN([
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <signal.h>
+#include <setjmp.h>
+
+main()
+{
+#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
+exit (1);
+#else
+
+int code;
+sigset_t set, oset;
+sigjmp_buf xx;
+
+/* get the mask */
+sigemptyset(&set);
+sigemptyset(&oset);
+sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
+sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
+
+/* save it */
+code = sigsetjmp(xx, 1);
+if (code)
+ exit(0); /* could get sigmask and compare to oset here. */
+
+/* change it */
+sigaddset(&set, SIGINT);
+sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
+
+/* and siglongjmp */
+siglongjmp(xx, 10);
+exit(1);
+#endif
+}], bash_cv_func_sigsetjmp=present, bash_cv_func_sigsetjmp=missing,
+ [AC_MSG_WARN(cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing)
+ bash_cv_func_sigsetjmp=missing]
+)])
+AC_MSG_RESULT($bash_cv_func_sigsetjmp)
+if test $bash_cv_func_sigsetjmp = present; then
+AC_DEFINE(HAVE_POSIX_SIGSETJMP)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_STRCOLL,
+[
+AC_MSG_CHECKING(whether or not strcoll and strcmp differ)
+AC_CACHE_VAL(bash_cv_func_strcoll_broken,
+[AC_TRY_RUN([
+#include <stdio.h>
+#if defined (HAVE_LOCALE_H)
+#include <locale.h>
+#endif
+
+main(c, v)
+int c;
+char *v[];
+{
+ int r1, r2;
+ char *deflocale, *defcoll;
+
+#ifdef HAVE_SETLOCALE
+ deflocale = setlocale(LC_ALL, "");
+ defcoll = setlocale(LC_COLLATE, "");
+#endif
+
+#ifdef HAVE_STRCOLL
+ /* These two values are taken from tests/glob-test. */
+ r1 = strcoll("abd", "aXd");
+#else
+ r1 = 0;
+#endif
+ r2 = strcmp("abd", "aXd");
+
+ /* These two should both be greater than 0. It is permissible for
+ a system to return different values, as long as the sign is the
+ same. */
+
+ /* Exit with 1 (failure) if these two values are both > 0, since
+ this tests whether strcoll(3) is broken with respect to strcmp(3)
+ in the default locale. */
+ exit (r1 > 0 && r2 > 0);
+}
+], bash_cv_func_strcoll_broken=yes, bash_cv_func_strcoll_broken=no,
+ [AC_MSG_WARN(cannot check strcoll if cross compiling -- defaulting to no)
+ bash_cv_func_strcoll_broken=no]
+)])
+AC_MSG_RESULT($bash_cv_func_strcoll_broken)
+if test $bash_cv_func_strcoll_broken = yes; then
+AC_DEFINE(STRCOLL_BROKEN)
+fi
+])
+
+AC_DEFUN(BASH_FUNC_PRINTF_A_FORMAT,
+[AC_MSG_CHECKING([for printf floating point output in hex notation])
+AC_CACHE_VAL(bash_cv_printf_a_format,
+[AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+
+int
+main()
+{
+ double y = 0.0;
+ char abuf[1024];
+
+ sprintf(abuf, "%A", y);
+ exit(strchr(abuf, 'P') == (char *)0);
+}
+], bash_cv_printf_a_format=yes, bash_cv_printf_a_format=no,
+ [AC_MSG_WARN(cannot check printf if cross compiling -- defaulting to no)
+ bash_cv_printf_a_format=no]
+)])
+AC_MSG_RESULT($bash_cv_printf_a_format)
+if test $bash_cv_printf_a_format = yes; then
+AC_DEFINE(HAVE_PRINTF_A_FORMAT)
+fi
+])
+
+AC_DEFUN(BASH_STRUCT_TERMIOS_LDISC,
+[
+AC_CHECK_MEMBER(struct termios.c_line, AC_DEFINE(TERMIOS_LDISC), ,[
+#include <sys/types.h>
+#include <termios.h>
+])
+])
+
+AC_DEFUN(BASH_STRUCT_TERMIO_LDISC,
+[
+AC_CHECK_MEMBER(struct termio.c_line, AC_DEFINE(TERMIO_LDISC), ,[
+#include <sys/types.h>
+#include <termio.h>
+])
+])
+
+dnl
+dnl Like AC_STRUCT_ST_BLOCKS, but doesn't muck with LIBOBJS
+dnl
+dnl sets bash_cv_struct_stat_st_blocks
+dnl
+dnl unused for now; we'll see how AC_CHECK_MEMBERS works
+dnl
+AC_DEFUN(BASH_STRUCT_ST_BLOCKS,
+[
+AC_MSG_CHECKING([for struct stat.st_blocks])
+AC_CACHE_VAL(bash_cv_struct_stat_st_blocks,
+[AC_TRY_COMPILE(
+[
+#include <sys/types.h>
+#include <sys/stat.h>
+],
+[
+main()
+{
+static struct stat a;
+if (a.st_blocks) return 0;
+return 0;
+}
+], bash_cv_struct_stat_st_blocks=yes, bash_cv_struct_stat_st_blocks=no)
+])
+AC_MSG_RESULT($bash_cv_struct_stat_st_blocks)
+if test "$bash_cv_struct_stat_st_blocks" = "yes"; then
+AC_DEFINE(HAVE_STRUCT_STAT_ST_BLOCKS)
+fi
+])
+
+AC_DEFUN([BASH_CHECK_LIB_TERMCAP],
+[
+if test "X$bash_cv_termcap_lib" = "X"; then
+_bash_needmsg=yes
+else
+AC_MSG_CHECKING(which library has the termcap functions)
+_bash_needmsg=
+fi
+AC_CACHE_VAL(bash_cv_termcap_lib,
+[AC_CHECK_FUNC(tgetent, bash_cv_termcap_lib=libc,
+ [AC_CHECK_LIB(termcap, tgetent, bash_cv_termcap_lib=libtermcap,
+ [AC_CHECK_LIB(tinfo, tgetent, bash_cv_termcap_lib=libtinfo,
+ [AC_CHECK_LIB(curses, tgetent, bash_cv_termcap_lib=libcurses,
+ [AC_CHECK_LIB(ncurses, tgetent, bash_cv_termcap_lib=libncurses,
+ bash_cv_termcap_lib=gnutermcap)])])])])])
+if test "X$_bash_needmsg" = "Xyes"; then
+AC_MSG_CHECKING(which library has the termcap functions)
+fi
+AC_MSG_RESULT(using $bash_cv_termcap_lib)
+if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
+LDFLAGS="$LDFLAGS -L./lib/termcap"
+TERMCAP_LIB="./lib/termcap/libtermcap.a"
+TERMCAP_DEP="./lib/termcap/libtermcap.a"
+elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
+TERMCAP_LIB=-ltermcap
+TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libtinfo; then
+TERMCAP_LIB=-ltinfo
+TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libncurses; then
+TERMCAP_LIB=-lncurses
+TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libc; then
+TERMCAP_LIB=
+TERMCAP_DEP=
+else
+TERMCAP_LIB=-lcurses
+TERMCAP_DEP=
+fi
+])
+
+dnl
+dnl Check for the presence of getpeername in libsocket.
+dnl If libsocket is present, check for libnsl and add it to LIBS if
+dnl it's there, since most systems with libsocket require linking
+dnl with libnsl as well. This should only be called if getpeername
+dnl was not found in libc.
+dnl
+dnl NOTE: IF WE FIND GETPEERNAME, WE ASSUME THAT WE HAVE BIND/CONNECT
+dnl AS WELL
+dnl
+AC_DEFUN(BASH_CHECK_LIB_SOCKET,
+[
+if test "X$bash_cv_have_socklib" = "X"; then
+_bash_needmsg=
+else
+AC_MSG_CHECKING(for socket library)
+_bash_needmsg=yes
+fi
+AC_CACHE_VAL(bash_cv_have_socklib,
+[AC_CHECK_LIB(socket, getpeername,
+ bash_cv_have_socklib=yes, bash_cv_have_socklib=no, -lnsl)])
+if test "X$_bash_needmsg" = Xyes; then
+ AC_MSG_RESULT($bash_cv_have_socklib)
+ _bash_needmsg=
+fi
+if test $bash_cv_have_socklib = yes; then
+ # check for libnsl, add it to LIBS if present
+ if test "X$bash_cv_have_libnsl" = "X"; then
+ _bash_needmsg=
+ else
+ AC_MSG_CHECKING(for libnsl)
+ _bash_needmsg=yes
+ fi
+ AC_CACHE_VAL(bash_cv_have_libnsl,
+ [AC_CHECK_LIB(nsl, t_open,
+ bash_cv_have_libnsl=yes, bash_cv_have_libnsl=no)])
+ if test "X$_bash_needmsg" = Xyes; then
+ AC_MSG_RESULT($bash_cv_have_libnsl)
+ _bash_needmsg=
+ fi
+ if test $bash_cv_have_libnsl = yes; then
+ LIBS="-lsocket -lnsl $LIBS"
+ else
+ LIBS="-lsocket $LIBS"
+ fi
+ AC_DEFINE(HAVE_LIBSOCKET)
+ AC_DEFINE(HAVE_GETPEERNAME)
+fi
+])
+
+AC_DEFUN(BASH_STRUCT_DIRENT_D_INO,
+[AC_REQUIRE([AC_HEADER_DIRENT])
+AC_MSG_CHECKING(for struct dirent.d_ino)
+AC_CACHE_VAL(bash_cv_dirent_has_dino,
+[AC_TRY_COMPILE([
+#include <stdio.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif /* SYSNDIR */
+# ifdef HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif /* SYSDIR */
+# ifdef HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif /* HAVE_DIRENT_H */
+],[
+struct dirent d; int z; z = d.d_ino;
+], bash_cv_dirent_has_dino=yes, bash_cv_dirent_has_dino=no)])
+AC_MSG_RESULT($bash_cv_dirent_has_dino)
+if test $bash_cv_dirent_has_dino = yes; then
+AC_DEFINE(HAVE_STRUCT_DIRENT_D_INO)
+fi
+])
+
+AC_DEFUN(BASH_STRUCT_DIRENT_D_FILENO,
+[AC_REQUIRE([AC_HEADER_DIRENT])
+AC_MSG_CHECKING(for struct dirent.d_fileno)
+AC_CACHE_VAL(bash_cv_dirent_has_d_fileno,
+[AC_TRY_COMPILE([
+#include <stdio.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif /* SYSNDIR */
+# ifdef HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif /* SYSDIR */
+# ifdef HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif /* HAVE_DIRENT_H */
+],[
+struct dirent d; int z; z = d.d_fileno;
+], bash_cv_dirent_has_d_fileno=yes, bash_cv_dirent_has_d_fileno=no)])
+AC_MSG_RESULT($bash_cv_dirent_has_d_fileno)
+if test $bash_cv_dirent_has_d_fileno = yes; then
+AC_DEFINE(HAVE_STRUCT_DIRENT_D_FILENO)
+fi
+])
+
+AC_DEFUN(BASH_STRUCT_DIRENT_D_NAMLEN,
+[AC_REQUIRE([AC_HEADER_DIRENT])
+AC_MSG_CHECKING(for struct dirent.d_namlen)
+AC_CACHE_VAL(bash_cv_dirent_has_d_namlen,
+[AC_TRY_COMPILE([
+#include <stdio.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif /* SYSNDIR */
+# ifdef HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif /* SYSDIR */
+# ifdef HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif /* HAVE_DIRENT_H */
+],[
+struct dirent d; int z; z = d.d_namlen;
+], bash_cv_dirent_has_d_namlen=yes, bash_cv_dirent_has_d_namlen=no)])
+AC_MSG_RESULT($bash_cv_dirent_has_d_namlen)
+if test $bash_cv_dirent_has_d_namlen = yes; then
+AC_DEFINE(HAVE_STRUCT_DIRENT_D_NAMLEN)
+fi
+])
+
+AC_DEFUN(BASH_STRUCT_TIMEVAL,
+[AC_MSG_CHECKING(for struct timeval in sys/time.h and time.h)
+AC_CACHE_VAL(bash_cv_struct_timeval,
+[
+AC_EGREP_HEADER(struct timeval, sys/time.h,
+ bash_cv_struct_timeval=yes,
+ AC_EGREP_HEADER(struct timeval, time.h,
+ bash_cv_struct_timeval=yes,
+ bash_cv_struct_timeval=no))
+])
+AC_MSG_RESULT($bash_cv_struct_timeval)
+if test $bash_cv_struct_timeval = yes; then
+ AC_DEFINE(HAVE_TIMEVAL)
+fi
+])
+
+AC_DEFUN(BASH_STRUCT_TIMEZONE,
+[AC_MSG_CHECKING(for struct timezone in sys/time.h and time.h)
+AC_CACHE_VAL(bash_cv_struct_timezone,
+[
+AC_EGREP_HEADER(struct timezone, sys/time.h,
+ bash_cv_struct_timezone=yes,
+ AC_EGREP_HEADER(struct timezone, time.h,
+ bash_cv_struct_timezone=yes,
+ bash_cv_struct_timezone=no))
+])
+AC_MSG_RESULT($bash_cv_struct_timezone)
+if test $bash_cv_struct_timezone = yes; then
+ AC_DEFINE(HAVE_STRUCT_TIMEZONE)
+fi
+])
+
+AC_DEFUN(BASH_STRUCT_WINSIZE,
+[AC_MSG_CHECKING(for struct winsize in sys/ioctl.h and termios.h)
+AC_CACHE_VAL(bash_cv_struct_winsize_header,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/ioctl.h>], [struct winsize x;],
+ bash_cv_struct_winsize_header=ioctl_h,
+ [AC_TRY_COMPILE([#include <sys/types.h>
+#include <termios.h>], [struct winsize x;],
+ bash_cv_struct_winsize_header=termios_h, bash_cv_struct_winsize_header=other)
+])])
+if test $bash_cv_struct_winsize_header = ioctl_h; then
+ AC_MSG_RESULT(sys/ioctl.h)
+ AC_DEFINE(STRUCT_WINSIZE_IN_SYS_IOCTL)
+elif test $bash_cv_struct_winsize_header = termios_h; then
+ AC_MSG_RESULT(termios.h)
+ AC_DEFINE(STRUCT_WINSIZE_IN_TERMIOS)
+else
+ AC_MSG_RESULT(not found)
+fi
+])
+
+dnl Check type of signal routines (posix, 4.2bsd, 4.1bsd or v7)
+AC_DEFUN(BASH_SYS_SIGNAL_VINTAGE,
+[AC_REQUIRE([AC_TYPE_SIGNAL])
+AC_MSG_CHECKING(for type of signal functions)
+AC_CACHE_VAL(bash_cv_signal_vintage,
+[
+ AC_TRY_LINK([#include <signal.h>],[
+ sigset_t ss;
+ struct sigaction sa;
+ sigemptyset(&ss); sigsuspend(&ss);
+ sigaction(SIGINT, &sa, (struct sigaction *) 0);
+ sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
+ ], bash_cv_signal_vintage=posix,
+ [
+ AC_TRY_LINK([#include <signal.h>], [
+ int mask = sigmask(SIGINT);
+ sigsetmask(mask); sigblock(mask); sigpause(mask);
+ ], bash_cv_signal_vintage=4.2bsd,
+ [
+ AC_TRY_LINK([
+ #include <signal.h>
+ RETSIGTYPE foo() { }], [
+ int mask = sigmask(SIGINT);
+ sigset(SIGINT, foo); sigrelse(SIGINT);
+ sighold(SIGINT); sigpause(SIGINT);
+ ], bash_cv_signal_vintage=svr3, bash_cv_signal_vintage=v7
+ )]
+ )]
+)
+])
+AC_MSG_RESULT($bash_cv_signal_vintage)
+if test "$bash_cv_signal_vintage" = posix; then
+AC_DEFINE(HAVE_POSIX_SIGNALS)
+elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
+AC_DEFINE(HAVE_BSD_SIGNALS)
+elif test "$bash_cv_signal_vintage" = svr3; then
+AC_DEFINE(HAVE_USG_SIGHOLD)
+fi
+])
+
+dnl Check if the pgrp of setpgrp() can't be the pid of a zombie process.
+AC_DEFUN(BASH_SYS_PGRP_SYNC,
+[AC_REQUIRE([AC_FUNC_GETPGRP])
+AC_MSG_CHECKING(whether pgrps need synchronization)
+AC_CACHE_VAL(bash_cv_pgrp_pipe,
+[AC_TRY_RUN([
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+main()
+{
+# ifdef GETPGRP_VOID
+# define getpgID() getpgrp()
+# else
+# define getpgID() getpgrp(0)
+# define setpgid(x,y) setpgrp(x,y)
+# endif
+ int pid1, pid2, fds[2];
+ int status;
+ char ok;
+
+ switch (pid1 = fork()) {
+ case -1:
+ exit(1);
+ case 0:
+ setpgid(0, getpid());
+ exit(0);
+ }
+ setpgid(pid1, pid1);
+
+ sleep(2); /* let first child die */
+
+ if (pipe(fds) < 0)
+ exit(2);
+
+ switch (pid2 = fork()) {
+ case -1:
+ exit(3);
+ case 0:
+ setpgid(0, pid1);
+ ok = getpgID() == pid1;
+ write(fds[1], &ok, 1);
+ exit(0);
+ }
+ setpgid(pid2, pid1);
+
+ close(fds[1]);
+ if (read(fds[0], &ok, 1) != 1)
+ exit(4);
+ wait(&status);
+ wait(&status);
+ exit(ok ? 0 : 5);
+}
+], bash_cv_pgrp_pipe=no,bash_cv_pgrp_pipe=yes,
+ [AC_MSG_WARN(cannot check pgrp synchronization if cross compiling -- defaulting to no)
+ bash_cv_pgrp_pipe=no])
+])
+AC_MSG_RESULT($bash_cv_pgrp_pipe)
+if test $bash_cv_pgrp_pipe = yes; then
+AC_DEFINE(PGRP_PIPE)
+fi
+])
+
+AC_DEFUN(BASH_SYS_REINSTALL_SIGHANDLERS,
+[AC_REQUIRE([AC_TYPE_SIGNAL])
+AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
+AC_MSG_CHECKING([if signal handlers must be reinstalled when invoked])
+AC_CACHE_VAL(bash_cv_must_reinstall_sighandlers,
+[AC_TRY_RUN([
+#include <signal.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+typedef RETSIGTYPE sigfunc();
+
+int nsigint;
+
+#ifdef HAVE_POSIX_SIGNALS
+sigfunc *
+set_signal_handler(sig, handler)
+ int sig;
+ sigfunc *handler;
+{
+ struct sigaction act, oact;
+ act.sa_handler = handler;
+ act.sa_flags = 0;
+ sigemptyset (&act.sa_mask);
+ sigemptyset (&oact.sa_mask);
+ sigaction (sig, &act, &oact);
+ return (oact.sa_handler);
+}
+#else
+#define set_signal_handler(s, h) signal(s, h)
+#endif
+
+RETSIGTYPE
+sigint(s)
+int s;
+{
+ nsigint++;
+}
+
+main()
+{
+ nsigint = 0;
+ set_signal_handler(SIGINT, sigint);
+ kill((int)getpid(), SIGINT);
+ kill((int)getpid(), SIGINT);
+ exit(nsigint != 2);
+}
+], bash_cv_must_reinstall_sighandlers=no, bash_cv_must_reinstall_sighandlers=yes,
+ [AC_MSG_WARN(cannot check signal handling if cross compiling -- defaulting to no)
+ bash_cv_must_reinstall_sighandlers=no]
+)])
+AC_MSG_RESULT($bash_cv_must_reinstall_sighandlers)
+if test $bash_cv_must_reinstall_sighandlers = yes; then
+AC_DEFINE(MUST_REINSTALL_SIGHANDLERS)
+fi
+])
+
+dnl check that some necessary job control definitions are present
+AC_DEFUN(BASH_SYS_JOB_CONTROL_MISSING,
+[AC_REQUIRE([BASH_SYS_SIGNAL_VINTAGE])
+AC_MSG_CHECKING(for presence of necessary job control definitions)
+AC_CACHE_VAL(bash_cv_job_control_missing,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <signal.h>
+
+/* Add more tests in here as appropriate. */
+main()
+{
+/* signal type */
+#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
+exit(1);
+#endif
+
+/* signals and tty control. */
+#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
+exit (1);
+#endif
+
+/* process control */
+#if !defined (WNOHANG) || !defined (WUNTRACED)
+exit(1);
+#endif
+
+/* Posix systems have tcgetpgrp and waitpid. */
+#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
+exit(1);
+#endif
+
+#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
+exit(1);
+#endif
+
+/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
+#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
+exit(1);
+#endif
+
+exit(0);
+}], bash_cv_job_control_missing=present, bash_cv_job_control_missing=missing,
+ [AC_MSG_WARN(cannot check job control if cross-compiling -- defaulting to missing)
+ bash_cv_job_control_missing=missing]
+)])
+AC_MSG_RESULT($bash_cv_job_control_missing)
+if test $bash_cv_job_control_missing = missing; then
+AC_DEFINE(JOB_CONTROL_MISSING)
+fi
+])
+
+dnl check whether named pipes are present
+dnl this requires a previous check for mkfifo, but that is awkward to specify
+AC_DEFUN(BASH_SYS_NAMED_PIPES,
+[AC_MSG_CHECKING(for presence of named pipes)
+AC_CACHE_VAL(bash_cv_sys_named_pipes,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+/* Add more tests in here as appropriate. */
+main()
+{
+int fd, err;
+
+#if defined (HAVE_MKFIFO)
+exit (0);
+#endif
+
+#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
+exit (1);
+#endif
+
+#if defined (NeXT)
+exit (1);
+#endif
+err = mkdir("bash-aclocal", 0700);
+if (err < 0) {
+ perror ("mkdir");
+ exit(1);
+}
+fd = mknod ("bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
+if (fd == -1) {
+ rmdir ("bash-aclocal");
+ exit (1);
+}
+close(fd);
+unlink ("bash-aclocal/sh-np-autoconf");
+rmdir ("bash-aclocal");
+exit(0);
+}], bash_cv_sys_named_pipes=present, bash_cv_sys_named_pipes=missing,
+ [AC_MSG_WARN(cannot check for named pipes if cross-compiling -- defaulting to missing)
+ bash_cv_sys_named_pipes=missing]
+)])
+AC_MSG_RESULT($bash_cv_sys_named_pipes)
+if test $bash_cv_sys_named_pipes = missing; then
+AC_DEFINE(NAMED_PIPES_MISSING)
+fi
+])
+
+AC_DEFUN(BASH_SYS_DEFAULT_MAIL_DIR,
+[AC_MSG_CHECKING(for default mail directory)
+AC_CACHE_VAL(bash_cv_mail_dir,
+[if test -d /var/mail; then
+ bash_cv_mail_dir=/var/mail
+ elif test -d /var/spool/mail; then
+ bash_cv_mail_dir=/var/spool/mail
+ elif test -d /usr/mail; then
+ bash_cv_mail_dir=/usr/mail
+ elif test -d /usr/spool/mail; then
+ bash_cv_mail_dir=/usr/spool/mail
+ else
+ bash_cv_mail_dir=unknown
+ fi
+])
+AC_MSG_RESULT($bash_cv_mail_dir)
+AC_DEFINE_UNQUOTED(DEFAULT_MAIL_DIRECTORY, "$bash_cv_mail_dir")
+])
+
+AC_DEFUN(BASH_HAVE_TIOCGWINSZ,
+[AC_MSG_CHECKING(for TIOCGWINSZ in sys/ioctl.h)
+AC_CACHE_VAL(bash_cv_tiocgwinsz_in_ioctl,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/ioctl.h>], [int x = TIOCGWINSZ;],
+ bash_cv_tiocgwinsz_in_ioctl=yes,bash_cv_tiocgwinsz_in_ioctl=no)])
+AC_MSG_RESULT($bash_cv_tiocgwinsz_in_ioctl)
+if test $bash_cv_tiocgwinsz_in_ioctl = yes; then
+AC_DEFINE(GWINSZ_IN_SYS_IOCTL)
+fi
+])
+
+AC_DEFUN(BASH_HAVE_TIOCSTAT,
+[AC_MSG_CHECKING(for TIOCSTAT in sys/ioctl.h)
+AC_CACHE_VAL(bash_cv_tiocstat_in_ioctl,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/ioctl.h>], [int x = TIOCSTAT;],
+ bash_cv_tiocstat_in_ioctl=yes,bash_cv_tiocstat_in_ioctl=no)])
+AC_MSG_RESULT($bash_cv_tiocstat_in_ioctl)
+if test $bash_cv_tiocstat_in_ioctl = yes; then
+AC_DEFINE(TIOCSTAT_IN_SYS_IOCTL)
+fi
+])
+
+AC_DEFUN(BASH_HAVE_FIONREAD,
+[AC_MSG_CHECKING(for FIONREAD in sys/ioctl.h)
+AC_CACHE_VAL(bash_cv_fionread_in_ioctl,
+[AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/ioctl.h>], [int x = FIONREAD;],
+ bash_cv_fionread_in_ioctl=yes,bash_cv_fionread_in_ioctl=no)])
+AC_MSG_RESULT($bash_cv_fionread_in_ioctl)
+if test $bash_cv_fionread_in_ioctl = yes; then
+AC_DEFINE(FIONREAD_IN_SYS_IOCTL)
+fi
+])
+
+dnl
+dnl See if speed_t is declared in <sys/types.h>. Some versions of linux
+dnl require a definition of speed_t each time <termcap.h> is included,
+dnl but you can only get speed_t if you include <termios.h> (on some
+dnl versions) or <sys/types.h> (on others).
+dnl
+AC_DEFUN(BASH_CHECK_SPEED_T,
+[AC_MSG_CHECKING(for speed_t in sys/types.h)
+AC_CACHE_VAL(bash_cv_speed_t_in_sys_types,
+[AC_TRY_COMPILE([#include <sys/types.h>], [speed_t x;],
+ bash_cv_speed_t_in_sys_types=yes,bash_cv_speed_t_in_sys_types=no)])
+AC_MSG_RESULT($bash_cv_speed_t_in_sys_types)
+if test $bash_cv_speed_t_in_sys_types = yes; then
+AC_DEFINE(SPEED_T_IN_SYS_TYPES)
+fi
+])
+
+AC_DEFUN(BASH_CHECK_GETPW_FUNCS,
+[AC_MSG_CHECKING(whether getpw functions are declared in pwd.h)
+AC_CACHE_VAL(bash_cv_getpw_declared,
+[AC_EGREP_CPP(getpwuid,
+[
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <pwd.h>
+],
+bash_cv_getpw_declared=yes,bash_cv_getpw_declared=no)])
+AC_MSG_RESULT($bash_cv_getpw_declared)
+if test $bash_cv_getpw_declared = yes; then
+AC_DEFINE(HAVE_GETPW_DECLS)
+fi
+])
+
+AC_DEFUN(BASH_CHECK_DEV_FD,
+[AC_MSG_CHECKING(whether /dev/fd is available)
+AC_CACHE_VAL(bash_cv_dev_fd,
+[bash_cv_dev_fd=""
+if test -d /dev/fd && (exec test -r /dev/fd/0 < /dev/null) ; then
+# check for systems like FreeBSD 5 that only provide /dev/fd/[012]
+ if (exec test -r /dev/fd/3 3</dev/null) ; then
+ bash_cv_dev_fd=standard
+ else
+ bash_cv_dev_fd=absent
+ fi
+fi
+if test -z "$bash_cv_dev_fd" ; then
+ if test -d /proc/self/fd && (exec test -r /proc/self/fd/0 < /dev/null) ; then
+ bash_cv_dev_fd=whacky
+ else
+ bash_cv_dev_fd=absent
+ fi
+fi
+])
+AC_MSG_RESULT($bash_cv_dev_fd)
+if test $bash_cv_dev_fd = "standard"; then
+ AC_DEFINE(HAVE_DEV_FD)
+ AC_DEFINE(DEV_FD_PREFIX, "/dev/fd/")
+elif test $bash_cv_dev_fd = "whacky"; then
+ AC_DEFINE(HAVE_DEV_FD)
+ AC_DEFINE(DEV_FD_PREFIX, "/proc/self/fd/")
+fi
+])
+
+AC_DEFUN(BASH_CHECK_DEV_STDIN,
+[AC_MSG_CHECKING(whether /dev/stdin stdout stderr are available)
+AC_CACHE_VAL(bash_cv_dev_stdin,
+[if test -d /dev/fd && (exec test -r /dev/stdin < /dev/null) ; then
+ bash_cv_dev_stdin=present
+ elif test -d /proc/self/fd && (exec test -r /dev/stdin < /dev/null) ; then
+ bash_cv_dev_stdin=present
+ else
+ bash_cv_dev_stdin=absent
+ fi
+])
+AC_MSG_RESULT($bash_cv_dev_stdin)
+if test $bash_cv_dev_stdin = "present"; then
+ AC_DEFINE(HAVE_DEV_STDIN)
+fi
+])
+
+dnl
+dnl Check if HPUX needs _KERNEL defined for RLIMIT_* definitions
+dnl
+AC_DEFUN(BASH_CHECK_KERNEL_RLIMIT,
+[AC_MSG_CHECKING([whether $host_os needs _KERNEL for RLIMIT defines])
+AC_CACHE_VAL(bash_cv_kernel_rlimit,
+[AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/resource.h>
+],
+[
+ int f;
+ f = RLIMIT_DATA;
+], bash_cv_kernel_rlimit=no,
+[AC_TRY_COMPILE([
+#include <sys/types.h>
+#define _KERNEL
+#include <sys/resource.h>
+#undef _KERNEL
+],
+[
+ int f;
+ f = RLIMIT_DATA;
+], bash_cv_kernel_rlimit=yes, bash_cv_kernel_rlimit=no)]
+)])
+AC_MSG_RESULT($bash_cv_kernel_rlimit)
+if test $bash_cv_kernel_rlimit = yes; then
+AC_DEFINE(RLIMIT_NEEDS_KERNEL)
+fi
+])
+
+dnl
+dnl Check for 64-bit off_t -- used for malloc alignment
+dnl
+dnl C does not allow duplicate case labels, so the compile will fail if
+dnl sizeof(off_t) is > 4.
+dnl
+AC_DEFUN(BASH_CHECK_OFF_T_64,
+[AC_CACHE_CHECK(for 64-bit off_t, bash_cv_off_t_64,
+AC_TRY_COMPILE([
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+],[
+switch (0) case 0: case (sizeof (off_t) <= 4):;
+], bash_cv_off_t_64=no, bash_cv_off_t_64=yes))
+if test $bash_cv_off_t_64 = yes; then
+ AC_DEFINE(HAVE_OFF_T_64)
+fi])
+
+AC_DEFUN(BASH_CHECK_RTSIGS,
+[AC_MSG_CHECKING(for unusable real-time signals due to large values)
+AC_CACHE_VAL(bash_cv_unusable_rtsigs,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#include <signal.h>
+
+#ifndef NSIG
+# define NSIG 64
+#endif
+
+main ()
+{
+ int n_sigs = 2 * NSIG;
+#ifdef SIGRTMIN
+ int rtmin = SIGRTMIN;
+#else
+ int rtmin = 0;
+#endif
+
+ exit(rtmin < n_sigs);
+}], bash_cv_unusable_rtsigs=yes, bash_cv_unusable_rtsigs=no,
+ [AC_MSG_WARN(cannot check real-time signals if cross compiling -- defaulting to yes)
+ bash_cv_unusable_rtsigs=yes]
+)])
+AC_MSG_RESULT($bash_cv_unusable_rtsigs)
+if test $bash_cv_unusable_rtsigs = yes; then
+AC_DEFINE(UNUSABLE_RT_SIGNALS)
+fi
+])
+
+dnl
+dnl check for availability of multibyte characters and functions
+dnl
+dnl geez, I wish I didn't have to check for all of this stuff separately
+dnl
+AC_DEFUN(BASH_CHECK_MULTIBYTE,
+[
+AC_CHECK_HEADERS(wctype.h)
+AC_CHECK_HEADERS(wchar.h)
+AC_CHECK_HEADERS(langinfo.h)
+
+AC_CHECK_FUNC(mbrlen, AC_DEFINE(HAVE_MBRLEN))
+AC_CHECK_FUNC(mbscasecmp, AC_DEFINE(HAVE_MBSCMP))
+AC_CHECK_FUNC(mbscmp, AC_DEFINE(HAVE_MBSCMP))
+AC_CHECK_FUNC(mbsrtowcs, AC_DEFINE(HAVE_MBSRTOWCS))
+
+AC_REPLACE_FUNCS(mbschr)
+
+AC_CHECK_FUNC(wcrtomb, AC_DEFINE(HAVE_WCRTOMB))
+AC_CHECK_FUNC(wcscoll, AC_DEFINE(HAVE_WCSCOLL))
+AC_CHECK_FUNC(wcsdup, AC_DEFINE(HAVE_WCSDUP))
+AC_CHECK_FUNC(wcwidth, AC_DEFINE(HAVE_WCWIDTH))
+AC_CHECK_FUNC(wctype, AC_DEFINE(HAVE_WCTYPE))
+
+dnl checks for both mbrtowc and mbstate_t
+AC_FUNC_MBRTOWC
+if test $ac_cv_func_mbrtowc = yes; then
+ AC_DEFINE(HAVE_MBSTATE_T)
+fi
+
+AC_CHECK_FUNCS(iswlower iswupper towlower towupper iswctype)
+
+AC_CACHE_CHECK([for nl_langinfo and CODESET], bash_cv_langinfo_codeset,
+[AC_TRY_LINK(
+[#include <langinfo.h>],
+[char* cs = nl_langinfo(CODESET);],
+bash_cv_langinfo_codeset=yes, bash_cv_langinfo_codeset=no)])
+if test $bash_cv_langinfo_codeset = yes; then
+ AC_DEFINE(HAVE_LANGINFO_CODESET)
+fi
+
+dnl check for wchar_t in <wchar.h>
+AC_CACHE_CHECK([for wchar_t in wchar.h], bash_cv_type_wchar_t,
+[AC_TRY_COMPILE(
+[#include <wchar.h>
+],
+[
+ wchar_t foo;
+ foo = 0;
+], bash_cv_type_wchar_t=yes, bash_cv_type_wchar_t=no)])
+if test $bash_cv_type_wchar_t = yes; then
+ AC_DEFINE(HAVE_WCHAR_T, 1, [systems should define this type here])
+fi
+
+dnl check for wctype_t in <wctype.h>
+AC_CACHE_CHECK([for wctype_t in wctype.h], bash_cv_type_wctype_t,
+[AC_TRY_COMPILE(
+[#include <wctype.h>],
+[
+ wctype_t foo;
+ foo = 0;
+], bash_cv_type_wctype_t=yes, bash_cv_type_wctype_t=no)])
+if test $bash_cv_type_wctype_t = yes; then
+ AC_DEFINE(HAVE_WCTYPE_T, 1, [systems should define this type here])
+fi
+
+dnl check for wint_t in <wctype.h>
+AC_CACHE_CHECK([for wint_t in wctype.h], bash_cv_type_wint_t,
+[AC_TRY_COMPILE(
+[#include <wctype.h>],
+[
+ wint_t foo;
+ foo = 0;
+], bash_cv_type_wint_t=yes, bash_cv_type_wint_t=no)])
+if test $bash_cv_type_wint_t = yes; then
+ AC_DEFINE(HAVE_WINT_T, 1, [systems should define this type here])
+fi
+
+if test "$am_cv_func_iconv" = yes; then
+ OLDLIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_CHECK_FUNCS(locale_charset)
+ LIBS="$OLDLIBS"
+fi
+
+])
+
+dnl need: prefix exec_prefix libdir includedir CC TERMCAP_LIB
+dnl require:
+dnl AC_PROG_CC
+dnl BASH_CHECK_LIB_TERMCAP
+
+AC_DEFUN([RL_LIB_READLINE_VERSION],
+[
+AC_REQUIRE([BASH_CHECK_LIB_TERMCAP])
+
+AC_MSG_CHECKING([version of installed readline library])
+
+# What a pain in the ass this is.
+
+# save cpp and ld options
+_save_CFLAGS="$CFLAGS"
+_save_LDFLAGS="$LDFLAGS"
+_save_LIBS="$LIBS"
+
+# Don't set ac_cv_rl_prefix if the caller has already assigned a value. This
+# allows the caller to do something like $_rl_prefix=$withval if the user
+# specifies --with-installed-readline=PREFIX as an argument to configure
+
+if test -z "$ac_cv_rl_prefix"; then
+test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix}
+fi
+
+eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include
+eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib
+
+LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
+CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
+LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
+
+AC_CACHE_VAL(ac_cv_rl_version,
+[AC_TRY_RUN([
+#include <stdio.h>
+#include <readline/readline.h>
+
+extern int rl_gnu_readline_p;
+
+main()
+{
+ FILE *fp;
+ fp = fopen("conftest.rlv", "w");
+ if (fp == 0)
+ exit(1);
+ if (rl_gnu_readline_p != 1)
+ fprintf(fp, "0.0\n");
+ else
+ fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
+ fclose(fp);
+ exit(0);
+}
+],
+ac_cv_rl_version=`cat conftest.rlv`,
+ac_cv_rl_version='0.0',
+ac_cv_rl_version='4.2')])
+
+CFLAGS="$_save_CFLAGS"
+LDFLAGS="$_save_LDFLAGS"
+LIBS="$_save_LIBS"
+
+RL_MAJOR=0
+RL_MINOR=0
+
+# (
+case "$ac_cv_rl_version" in
+2*|3*|4*|5*|6*|7*|8*|9*)
+ RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'`
+ RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[[a-zA-Z]]*$::'`
+ ;;
+esac
+
+# (((
+case $RL_MAJOR in
+[[0-9][0-9]]) _RL_MAJOR=$RL_MAJOR ;;
+[[0-9]]) _RL_MAJOR=0$RL_MAJOR ;;
+*) _RL_MAJOR=00 ;;
+esac
+
+# (((
+case $RL_MINOR in
+[[0-9][0-9]]) _RL_MINOR=$RL_MINOR ;;
+[[0-9]]) _RL_MINOR=0$RL_MINOR ;;
+*) _RL_MINOR=00 ;;
+esac
+
+RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}"
+
+# Readline versions greater than 4.2 have these defines in readline.h
+
+if test $ac_cv_rl_version = '0.0' ; then
+ AC_MSG_WARN([Could not test version of installed readline library.])
+elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then
+ # set these for use by the caller
+ RL_PREFIX=$ac_cv_rl_prefix
+ RL_LIBDIR=$ac_cv_rl_libdir
+ RL_INCLUDEDIR=$ac_cv_rl_includedir
+ AC_MSG_RESULT($ac_cv_rl_version)
+else
+
+AC_DEFINE_UNQUOTED(RL_READLINE_VERSION, $RL_VERSION, [encoded version of the installed readline library])
+AC_DEFINE_UNQUOTED(RL_VERSION_MAJOR, $RL_MAJOR, [major version of installed readline library])
+AC_DEFINE_UNQUOTED(RL_VERSION_MINOR, $RL_MINOR, [minor version of installed readline library])
+
+AC_SUBST(RL_VERSION)
+AC_SUBST(RL_MAJOR)
+AC_SUBST(RL_MINOR)
+
+# set these for use by the caller
+RL_PREFIX=$ac_cv_rl_prefix
+RL_LIBDIR=$ac_cv_rl_libdir
+RL_INCLUDEDIR=$ac_cv_rl_includedir
+
+AC_MSG_RESULT($ac_cv_rl_version)
+
+fi
+])
+
+AC_DEFUN(BASH_FUNC_CTYPE_NONASCII,
+[
+AC_MSG_CHECKING(whether the ctype macros accept non-ascii characters)
+AC_CACHE_VAL(bash_cv_func_ctype_nonascii,
+[AC_TRY_RUN([
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+#include <stdio.h>
+#include <ctype.h>
+
+main(c, v)
+int c;
+char *v[];
+{
+ char *deflocale;
+ unsigned char x;
+ int r1, r2;
+
+#ifdef HAVE_SETLOCALE
+ /* We take a shot here. If that locale is not known, try the
+ system default. We try this one because '\342' (226) is
+ known to be a printable character in that locale. */
+ deflocale = setlocale(LC_ALL, "en_US.ISO8859-1");
+ if (deflocale == 0)
+ deflocale = setlocale(LC_ALL, "");
+#endif
+
+ x = '\342';
+ r1 = isprint(x);
+ x -= 128;
+ r2 = isprint(x);
+ exit (r1 == 0 || r2 == 0);
+}
+], bash_cv_func_ctype_nonascii=yes, bash_cv_func_ctype_nonascii=no,
+ [AC_MSG_WARN(cannot check ctype macros if cross compiling -- defaulting to no)
+ bash_cv_func_ctype_nonascii=no]
+)])
+AC_MSG_RESULT($bash_cv_func_ctype_nonascii)
+if test $bash_cv_func_ctype_nonascii = yes; then
+AC_DEFINE(CTYPE_NON_ASCII)
+fi
+])
+
+AC_DEFUN(BASH_CHECK_WCONTINUED,
+[
+AC_MSG_CHECKING(whether WCONTINUED flag to waitpid is unavailable or available but broken)
+AC_CACHE_VAL(bash_cv_wcontinued_broken,
+[AC_TRY_RUN([
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <errno.h>
+
+#ifndef errno
+extern int errno;
+#endif
+main()
+{
+ int x;
+
+ x = waitpid(-1, (int *)0, WNOHANG|WCONTINUED);
+ if (x == -1 && errno == EINVAL)
+ exit (1);
+ else
+ exit (0);
+}
+], bash_cv_wcontinued_broken=no,bash_cv_wcontinued_broken=yes,
+ [AC_MSG_WARN(cannot check WCONTINUED if cross compiling -- defaulting to no)
+ bash_cv_wcontinued_broken=no]
+)])
+AC_MSG_RESULT($bash_cv_wcontinued_broken)
+if test $bash_cv_wcontinued_broken = yes; then
+AC_DEFINE(WCONTINUED_BROKEN)
+fi
+])
+
+dnl
+dnl tests added for bashdb
+dnl
+
+
+AC_DEFUN([AM_PATH_LISPDIR],
+ [AC_ARG_WITH(lispdir, AC_HELP_STRING([--with-lispdir], [override the default lisp directory]),
+ [ lispdir="$withval"
+ AC_MSG_CHECKING([where .elc files should go])
+ AC_MSG_RESULT([$lispdir])],
+ [
+ # If set to t, that means we are running in a shell under Emacs.
+ # If you have an Emacs named "t", then use the full path.
+ test x"$EMACS" = xt && EMACS=
+ AC_CHECK_PROGS(EMACS, emacs xemacs, no)
+ if test $EMACS != "no"; then
+ if test x${lispdir+set} != xset; then
+ AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir], [dnl
+ am_cv_lispdir=`$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' | sed -n -e 's,/$,,' -e '/.*\/lib\/\(x\?emacs\/site-lisp\)$/{s,,${libdir}/\1,;p;q;}' -e '/.*\/share\/\(x\?emacs\/site-lisp\)$/{s,,${datadir}/\1,;p;q;}'`
+ if test -z "$am_cv_lispdir"; then
+ am_cv_lispdir='${datadir}/emacs/site-lisp'
+ fi
+ ])
+ lispdir="$am_cv_lispdir"
+ fi
+ fi
+ ])
+ AC_SUBST(lispdir)
+])
+
+dnl
+dnl tests added for gettext
+dnl
+# codeset.m4 serial AM1 (gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET);],
+ am_cv_langinfo_codeset=yes,
+ am_cv_langinfo_codeset=no)
+ ])
+ if test $am_cv_langinfo_codeset = yes; then
+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+ fi
+])
+# gettext.m4 serial 20 (gettext-0.12)
+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl default (if it is not specified or empty) is 'no-libtool'.
+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl depending on --{enable,disable}-{shared,static} and on the presence of
+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl implementations (in libc or libintl) without the ngettext() function
+dnl will be ignored. If NEEDSYMBOL is specified and is
+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries. If empty,
+dnl the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl and used.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl Catalog format: none
+dnl Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+ dnl Argument checking.
+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+ define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
+ define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
+
+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
+ ifelse(gt_included_intl, yes, [
+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
+ ])
+
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ dnl Ideally we would do this search only after the
+ dnl if test "$USE_NLS" = "yes"; then
+ dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+ dnl the configure script would need to contain the same shell code
+ dnl again, outside any 'if'. There are two solutions:
+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+ dnl documented, we avoid it.
+ ifelse(gt_included_intl, yes, , [
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+ ])
+
+ dnl Set USE_NLS.
+ AM_NLS
+
+ ifelse(gt_included_intl, yes, [
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+ ])
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+ ifelse(gt_included_intl, yes, [
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH(included-gettext,
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ ])
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If GNU gettext is available we use this. Else we have
+ dnl to fall back to GNU NLS library.
+
+ dnl Add a version number to the cache macros.
+ define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
+ define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
+ define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
+
+ AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
+ [AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+ [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
+ gt_cv_func_gnugettext_libc=yes,
+ gt_cv_func_gnugettext_libc=no)])
+
+ if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ ifelse(gt_included_intl, yes, , [
+ AM_ICONV_LINK
+ ])
+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+ dnl even if libiconv doesn't exist.
+ AC_LIB_LINKFLAGS_BODY([intl])
+ AC_CACHE_CHECK([for GNU gettext in libintl],
+ gt_cv_func_gnugettext_libintl,
+ [gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ dnl Now see whether libintl exists and does not depend on libiconv.
+ AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();],
+ [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
+ gt_cv_func_gnugettext_libintl=yes,
+ gt_cv_func_gnugettext_libintl=no)
+ dnl Now see whether libintl exists and depends on libiconv.
+ if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <libintl.h>
+]ifelse([$2], [need-formatstring-macros],
+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+], [])[extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();],
+ [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
+ [LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ gt_cv_func_gnugettext_libintl=yes
+ ])
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"])
+ fi
+
+ dnl If an already present or preinstalled GNU gettext() is found,
+ dnl use it. But if this macro is used in GNU gettext, and GNU
+ dnl gettext is already preinstalled in libintl, we update this
+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
+ if test "$gt_cv_func_gnugettext_libc" = "yes" \
+ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ dnl Reset the values set by searching for libintl.
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+ dnl GNU gettext is not found in the C library.
+ dnl Fall back on included GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions to use GNU gettext tools.
+ CATOBJEXT=.gmo
+ fi
+ ])
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ AC_DEFINE(ENABLE_NLS, 1,
+ [Define to 1 if translation of program messages to the user's native language
+ is requested.])
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ AC_MSG_CHECKING([whether to use NLS])
+ AC_MSG_RESULT([$USE_NLS])
+ if test "$USE_NLS" = "yes"; then
+ AC_MSG_CHECKING([where the gettext function comes from])
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ AC_MSG_RESULT([$gt_source])
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+ AC_MSG_CHECKING([how to link with libintl])
+ AC_MSG_RESULT([$LIBINTL])
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+ fi
+
+ dnl For backward compatibility. Some packages may be using this.
+ AC_DEFINE(HAVE_GETTEXT, 1,
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ AC_DEFINE(HAVE_DCGETTEXT, 1,
+ [Define if the GNU dcgettext() function is already present or preinstalled.])
+ fi
+
+ dnl We need to process the po/ directory.
+ POSUB=po
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+ dnl to 'yes' because some of the testsuite requires it.
+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+ BUILD_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(BUILD_INCLUDED_LIBINTL)
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(CATOBJEXT)
+
+ dnl For backward compatibility. Some configure.ins may be using this.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ DATADIRNAME=share
+ AC_SUBST(DATADIRNAME)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INSTOBJEXT=.mo
+ AC_SUBST(INSTOBJEXT)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ GENCAT=gencat
+ AC_SUBST(GENCAT)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ if test "$USE_INCLUDED_LIBINTL" = yes; then
+ INTLOBJS="\$(GETTOBJS)"
+ fi
+ AC_SUBST(INTLOBJS)
+
+ dnl Enable libtool support if the surrounding package wishes it.
+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+ AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+ ])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLLIBS="$LIBINTL"
+ AC_SUBST(INTLLIBS)
+
+ dnl Make all documented variables known to autoconf.
+ AC_SUBST(LIBINTL)
+ AC_SUBST(LTLIBINTL)
+ AC_SUBST(POSUB)
+])
+
+
+dnl Checks for all prerequisites of the intl subdirectory,
+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
+dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
+AC_DEFUN([AM_INTL_SUBDIR],
+[
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([AC_ISC_POSIX])dnl
+ AC_REQUIRE([AC_HEADER_STDC])dnl
+ AC_REQUIRE([AC_C_CONST])dnl
+ AC_REQUIRE([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+ AC_REQUIRE([jm_GLIBC21])dnl
+ AC_REQUIRE([gt_INTDIV0])dnl
+ AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
+ AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
+ AC_REQUIRE([gt_INTTYPES_PRI])dnl
+
+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+stdlib.h string.h unistd.h sys/param.h])
+ AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
+geteuid getgid getuid mempcpy munmap putenv setenv setlocale localeconv stpcpy \
+strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
+__fsetlocking])
+
+ AM_ICONV
+ AM_LANGINFO_CODESET
+ if test $ac_cv_header_locale_h = yes; then
+ AM_LC_MESSAGES
+ fi
+
+ dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+ dnl because plural.y uses bison specific features. It requires at least
+ dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+ dnl compile.
+ dnl bison is only needed for the maintainer (who touches plural.y). But in
+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+ dnl the rule in general Makefile. Now, some people carelessly touch the
+ dnl files or have a broken "make" program, hence the plural.c rule will
+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+ dnl present or too old.
+ AC_CHECK_PROGS([INTLBISON], [bison])
+ if test -z "$INTLBISON"; then
+ ac_verc_fail=yes
+ else
+ dnl Found it, now check the version.
+ AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ esac
+ AC_MSG_RESULT([$ac_prog_version])
+ fi
+ if test $ac_verc_fail = yes; then
+ INTLBISON=:
+ fi
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
+# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([jm_GLIBC21],
+ [
+ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+ ac_cv_gnu_library_2_1,
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ ac_cv_gnu_library_2_1=yes,
+ ac_cv_gnu_library_2_1=no)
+ ]
+ )
+ AC_SUBST(GLIBC21)
+ GLIBC21="$ac_cv_gnu_library_2_1"
+ ]
+)
+# iconv.m4 serial AM4 (gettext-0.11.3)
+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_func_iconv=yes)
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes)
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST(LIBICONV)
+ AC_SUBST(LTLIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL(am_cv_proto_iconv, [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([$]{ac_t:-
+ }[$]am_cv_proto_iconv)
+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+])
+# intdiv0.m4 serial 1 (gettext-0.11.3)
+dnl Copyright (C) 2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gt_INTDIV0],
+[
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
+ gt_cv_int_divbyzero_sigfpe,
+ [
+ AC_TRY_RUN([
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+#ifdef __cplusplus
+sigfpe_handler (int sig)
+#else
+sigfpe_handler (sig) int sig;
+#endif
+{
+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
+ exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+ signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+ signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL. */
+#if defined (__sparc__) && defined (__linux__)
+ signal (SIGILL, sigfpe_handler);
+#endif
+
+ z = x / y;
+ nan = y / y;
+ exit (1);
+}
+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
+ [
+ # Guess based on the CPU.
+ case "$host_cpu" in
+ alpha* | i[34567]86 | m68k | s390*)
+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
+ *)
+ gt_cv_int_divbyzero_sigfpe="guessing no";;
+ esac
+ ])
+ ])
+ case "$gt_cv_int_divbyzero_sigfpe" in
+ *yes) value=1;;
+ *) value=0;;
+ esac
+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
+ [Define if integer division by zero raises signal SIGFPE.])
+])
+# inttypes.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
+# <sys/types.h>.
+
+AC_DEFUN([gt_HEADER_INTTYPES_H],
+[
+ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
+ [
+ AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
+ ])
+ if test $gt_cv_header_inttypes_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
+ [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
+ fi
+])
+# inttypes_h.m4 serial 5 (gettext-0.12)
+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
+[
+ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [uintmax_t i = (uintmax_t) -1;],
+ jm_ac_cv_header_inttypes_h=yes,
+ jm_ac_cv_header_inttypes_h=no)])
+ if test $jm_ac_cv_header_inttypes_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
+ [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
+# inttypes-pri.m4 serial 1 (gettext-0.11.4)
+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values. This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+ AC_REQUIRE([gt_HEADER_INTTYPES_H])
+ if test $gt_cv_header_inttypes_h = yes; then
+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+ gt_cv_inttypes_pri_broken,
+ [
+ AC_TRY_COMPILE([#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
+ ])
+ fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+ AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+ fi
+])
+# isc-posix.m4 serial 2 (gettext-0.11.2)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
+
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+ [
+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+ ]
+)
+# lcmessage.m4 serial 3 (gettext-0.11.3)
+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([AM_LC_MESSAGES],
+[
+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+ if test $am_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
+ [Define if your <locale.h> file defines LC_MESSAGES.])
+ fi
+])
+# lib-ld.m4 serial 2 (gettext-0.12)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ acl_cv_prog_gnu_ld=yes
+else
+ acl_cv_prog_gnu_ld=no
+fi])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ [re_direlt='/[^/][^/]*/\.\./']
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
+# lib-link.m4 serial 4 (gettext-0.12)
+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIB[]NAME"
+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
+dnl hardcode_direct, hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ libext="$acl_cv_libext"
+ shlibext="$acl_cv_shlibext"
+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ hardcode_direct="$acl_cv_hardcode_direct"
+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE(rpath,
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib$1-prefix],
+[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
+ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+])
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */lib | */lib/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
+# lib-prefix.m4 serial 2 (gettext-0.12)
+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib-prefix],
+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
+# nls.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_DEFUN([AM_NLS],
+[
+ AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+])
+
+AC_DEFUN([AM_MKINSTALLDIRS],
+[
+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+ dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
+ dnl Try to locate it.
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ case "$ac_aux_dir" in
+ /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+ *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+ esac
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+ AC_SUBST(MKINSTALLDIRS)
+])
+# po.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
+ AC_REQUIRE([AM_NLS])dnl
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
+
+ dnl Search for GNU msgfmt in the PATH.
+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+ dnl The second test excludes FreeBSD msgfmt.
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+ dnl Search for GNU xgettext 0.12 or newer in the PATH.
+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+ dnl The second test excludes FreeBSD xgettext.
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+
+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
+
+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+ dnl Test whether we really found GNU msgfmt.
+ if test "$GMSGFMT" != ":"; then
+ dnl If it is no GNU msgfmt we define it as : so that the
+ dnl Makefiles still can work.
+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+ AC_MSG_RESULT(
+ [found $GMSGFMT program is not GNU msgfmt; ignore it])
+ GMSGFMT=":"
+ fi
+ fi
+
+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
+ dnl Test whether we really found GNU xgettext.
+ if test "$XGETTEXT" != ":"; then
+ dnl If it is no GNU xgettext we define it as : so that the
+ dnl Makefiles still can work.
+ if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ AC_MSG_RESULT(
+ [found xgettext program is not GNU xgettext; ignore it])
+ XGETTEXT=":"
+ fi
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+ fi
+
+ AC_OUTPUT_COMMANDS([
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ GMOFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done],
+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
+ # from automake.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+ ])
+])
+# progtest.m4 serial 3 (gettext-0.12)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ [[\\/]]* | ?:[[\\/]]*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+# stdint_h.m4 serial 3 (gettext-0.12)
+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([jm_AC_HEADER_STDINT_H],
+[
+ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <stdint.h>],
+ [uintmax_t i = (uintmax_t) -1;],
+ jm_ac_cv_header_stdint_h=yes,
+ jm_ac_cv_header_stdint_h=no)])
+ if test $jm_ac_cv_header_stdint_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
+ [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
+# uintmax_t.m4 serial 7 (gettext-0.12)
+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+AC_PREREQ(2.13)
+
+# Define uintmax_t to 'unsigned long' or 'unsigned long long'
+# if it is not already defined in <stdint.h> or <inttypes.h>.
+
+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
+[
+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
+ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
+ test $ac_cv_type_unsigned_long_long = yes \
+ && ac_type='unsigned long long' \
+ || ac_type='unsigned long'
+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
+ [Define to unsigned long or unsigned long long
+ if <stdint.h> and <inttypes.h> don't define.])
+ else
+ AC_DEFINE(HAVE_UINTMAX_T, 1,
+ [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
+ fi
+])
+# ulonglong.m4 serial 2 (fileutils-4.0.32, gettext-0.10.40)
+dnl Copyright (C) 1999-2002 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+dnl From Paul Eggert.
+
+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
+[
+ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
+ [AC_TRY_LINK([unsigned long long ull = 1; int i = 63;],
+ [unsigned long long ullmax = (unsigned long long) -1;
+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
+ ac_cv_type_unsigned_long_long=yes,
+ ac_cv_type_unsigned_long_long=no)])
+ if test $ac_cv_type_unsigned_long_long = yes; then
+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
+ [Define if you have the unsigned long long type.])
+ fi
+])
+
+dnl From gnulib
+AC_DEFUN([BASH_FUNC_FPURGE],
+[
+ AC_CHECK_FUNCS_ONCE([fpurge])
+ AC_CHECK_FUNCS_ONCE([__fpurge])
+ AC_CHECK_DECLS([fpurge], , , [#include <stdio.h>])
+])
+
+AC_DEFUN([BASH_FUNC_SNPRINTF],
+[
+ AC_CHECK_FUNCS_ONCE([snprintf])
+ if test X$ac_cv_func_snprintf = Xyes; then
+ AC_CACHE_CHECK([for standard-conformant snprintf], [bash_cv_func_snprintf],
+ [AC_TRY_RUN([
+#include <stdio.h>
+
+main()
+{
+ int n;
+ n = snprintf (0, 0, "%s", "0123456");
+ exit(n != 7);
+}
+], bash_cv_func_snprintf=yes, bash_cv_func_snprintf=no,
+ [AC_MSG_WARN([cannot check standard snprintf if cross-compiling])
+ bash_cv_func_snprintf=yes]
+)])
+ if test $bash_cv_func_snprintf = no; then
+ ac_cv_func_snprintf=no
+ fi
+ fi
+ if test $ac_cv_func_snprintf = no; then
+ AC_DEFINE(HAVE_SNPRINTF, 0,
+ [Define if you have a standard-conformant snprintf function.])
+ fi
+])
+
+AC_DEFUN([BASH_FUNC_VSNPRINTF],
+[
+ AC_CHECK_FUNCS_ONCE([vsnprintf])
+ if test X$ac_cv_func_vsnprintf = Xyes; then
+ AC_CACHE_CHECK([for standard-conformant vsnprintf], [bash_cv_func_vsnprintf],
+ [AC_TRY_RUN([
+#if HAVE_STDARG_H
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+
+static int
+#if HAVE_STDARG_H
+foo(const char *fmt, ...)
+#else
+foo(format, va_alist)
+ const char *format;
+ va_dcl
+#endif
+{
+ va_list args;
+ int n;
+
+#if HAVE_STDARG_H
+ va_start(args, fmt);
+#else
+ va_start(args);
+#endif
+ n = vsnprintf(0, 0, fmt, args);
+ va_end (args);
+ return n;
+}
+
+main()
+{
+ int n;
+ n = foo("%s", "0123456");
+ exit(n != 7);
+}
+], bash_cv_func_vsnprintf=yes, bash_cv_func_vsnprintf=no,
+ [AC_MSG_WARN([cannot check standard vsnprintf if cross-compiling])
+ bash_cv_func_vsnprintf=yes]
+)])
+ if test $bash_cv_func_vsnprintf = no; then
+ ac_cv_func_vsnprintf=no
+ fi
+ fi
+ if test $ac_cv_func_vsnprintf = no; then
+ AC_DEFINE(HAVE_VSNPRINTF, 0,
+ [Define if you have a standard-conformant vsnprintf function.])
+ fi
+])
diff --git a/alias.c b/alias.c
new file mode 100644
index 0000000..558665e
--- /dev/null
+++ b/alias.c
@@ -0,0 +1,574 @@
+/* alias.c -- Not a full alias, but just the kind that we use in the
+ shell. Csh style alias is somewhere else (`over there, in a box'). */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#if defined (ALIAS)
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include "chartypes.h"
+#include "bashansi.h"
+#include "command.h"
+#include "general.h"
+#include "externs.h"
+#include "alias.h"
+
+#if defined (PROGRAMMABLE_COMPLETION)
+# include "pcomplete.h"
+#endif
+
+#define ALIAS_HASH_BUCKETS 16 /* must be power of two */
+
+typedef int sh_alias_map_func_t __P((alias_t *));
+
+static void free_alias_data __P((PTR_T));
+static alias_t **map_over_aliases __P((sh_alias_map_func_t *));
+static void sort_aliases __P((alias_t **));
+static int qsort_alias_compare __P((alias_t **, alias_t **));
+
+#if defined (READLINE)
+static int skipquotes __P((char *, int));
+static int skipws __P((char *, int));
+static int rd_token __P((char *, int));
+#endif
+
+/* Non-zero means expand all words on the line. Otherwise, expand
+ after first expansion if the expansion ends in a space. */
+int alias_expand_all = 0;
+
+/* The list of aliases that we have. */
+HASH_TABLE *aliases = (HASH_TABLE *)NULL;
+
+void
+initialize_aliases ()
+{
+ if (aliases == 0)
+ aliases = hash_create (ALIAS_HASH_BUCKETS);
+}
+
+/* Scan the list of aliases looking for one with NAME. Return NULL
+ if the alias doesn't exist, else a pointer to the alias_t. */
+alias_t *
+find_alias (name)
+ char *name;
+{
+ BUCKET_CONTENTS *al;
+
+ if (aliases == 0)
+ return ((alias_t *)NULL);
+
+ al = hash_search (name, aliases, 0);
+ return (al ? (alias_t *)al->data : (alias_t *)NULL);
+}
+
+/* Return the value of the alias for NAME, or NULL if there is none. */
+char *
+get_alias_value (name)
+ char *name;
+{
+ alias_t *alias;
+
+ if (aliases == 0)
+ return ((char *)NULL);
+
+ alias = find_alias (name);
+ return (alias ? alias->value : (char *)NULL);
+}
+
+/* Make a new alias from NAME and VALUE. If NAME can be found,
+ then replace its value. */
+void
+add_alias (name, value)
+ char *name, *value;
+{
+ BUCKET_CONTENTS *elt;
+ alias_t *temp;
+ int n;
+
+ if (!aliases)
+ {
+ initialize_aliases ();
+ temp = (alias_t *)NULL;
+ }
+ else
+ temp = find_alias (name);
+
+ if (temp)
+ {
+ free (temp->value);
+ temp->value = savestring (value);
+ temp->flags &= ~AL_EXPANDNEXT;
+ n = value[strlen (value) - 1];
+ if (n == ' ' || n == '\t')
+ temp->flags |= AL_EXPANDNEXT;
+ }
+ else
+ {
+ temp = (alias_t *)xmalloc (sizeof (alias_t));
+ temp->name = savestring (name);
+ temp->value = savestring (value);
+ temp->flags = 0;
+
+ n = value[strlen (value) - 1];
+ if (n == ' ' || n == '\t')
+ temp->flags |= AL_EXPANDNEXT;
+
+ elt = hash_insert (savestring (name), aliases, HASH_NOSRCH);
+ elt->data = temp;
+#if defined (PROGRAMMABLE_COMPLETION)
+ set_itemlist_dirty (&it_aliases);
+#endif
+ }
+}
+
+/* Delete a single alias structure. */
+static void
+free_alias_data (data)
+ PTR_T data;
+{
+ register alias_t *a;
+
+ a = (alias_t *)data;
+ free (a->value);
+ free (a->name);
+ free (data);
+}
+
+/* Remove the alias with name NAME from the alias table. Returns
+ the number of aliases left in the table, or -1 if the alias didn't
+ exist. */
+int
+remove_alias (name)
+ char *name;
+{
+ BUCKET_CONTENTS *elt;
+
+ if (aliases == 0)
+ return (-1);
+
+ elt = hash_remove (name, aliases, 0);
+ if (elt)
+ {
+ free_alias_data (elt->data);
+ free (elt->key); /* alias name */
+ free (elt); /* XXX */
+#if defined (PROGRAMMABLE_COMPLETION)
+ set_itemlist_dirty (&it_aliases);
+#endif
+ return (aliases->nentries);
+ }
+ return (-1);
+}
+
+/* Delete all aliases. */
+void
+delete_all_aliases ()
+{
+ if (aliases == 0)
+ return;
+
+ hash_flush (aliases, free_alias_data);
+ hash_dispose (aliases);
+ aliases = (HASH_TABLE *)NULL;
+#if defined (PROGRAMMABLE_COMPLETION)
+ set_itemlist_dirty (&it_aliases);
+#endif
+}
+
+/* Return an array of aliases that satisfy the conditions tested by FUNCTION.
+ If FUNCTION is NULL, return all aliases. */
+static alias_t **
+map_over_aliases (function)
+ sh_alias_map_func_t *function;
+{
+ register int i;
+ register BUCKET_CONTENTS *tlist;
+ alias_t *alias, **list;
+ int list_index;
+
+ i = HASH_ENTRIES (aliases);
+ if (i == 0)
+ return ((alias_t **)NULL);
+
+ list = (alias_t **)xmalloc ((i + 1) * sizeof (alias_t *));
+ for (i = list_index = 0; i < aliases->nbuckets; i++)
+ {
+ for (tlist = hash_items (i, aliases); tlist; tlist = tlist->next)
+ {
+ alias = (alias_t *)tlist->data;
+
+ if (!function || (*function) (alias))
+ {
+ list[list_index++] = alias;
+ list[list_index] = (alias_t *)NULL;
+ }
+ }
+ }
+ return (list);
+}
+
+static void
+sort_aliases (array)
+ alias_t **array;
+{
+ qsort (array, strvec_len ((char **)array), sizeof (alias_t *), (QSFUNC *)qsort_alias_compare);
+}
+
+static int
+qsort_alias_compare (as1, as2)
+ alias_t **as1, **as2;
+{
+ int result;
+
+ if ((result = (*as1)->name[0] - (*as2)->name[0]) == 0)
+ result = strcmp ((*as1)->name, (*as2)->name);
+
+ return (result);
+}
+
+/* Return a sorted list of all defined aliases */
+alias_t **
+all_aliases ()
+{
+ alias_t **list;
+
+ if (aliases == 0 || HASH_ENTRIES (aliases) == 0)
+ return ((alias_t **)NULL);
+
+ list = map_over_aliases ((sh_alias_map_func_t *)NULL);
+ if (list)
+ sort_aliases (list);
+ return (list);
+}
+
+char *
+alias_expand_word (s)
+ char *s;
+{
+ alias_t *r;
+
+ r = find_alias (s);
+ return (r ? savestring (r->value) : (char *)NULL);
+}
+
+/* Readline support functions -- expand all aliases in a line. */
+
+#if defined (READLINE)
+
+/* Return non-zero if CHARACTER is a member of the class of characters
+ that are self-delimiting in the shell (this really means that these
+ characters delimit tokens). */
+#define self_delimiting(character) (member ((character), " \t\n\r;|&()"))
+
+/* Return non-zero if CHARACTER is a member of the class of characters
+ that delimit commands in the shell. */
+#define command_separator(character) (member ((character), "\r\n;|&("))
+
+/* If this is 1, we are checking the next token read for alias expansion
+ because it is the first word in a command. */
+static int command_word;
+
+/* This is for skipping quoted strings in alias expansions. */
+#define quote_char(c) (((c) == '\'') || ((c) == '"'))
+
+/* Consume a quoted string from STRING, starting at string[START] (so
+ string[START] is the opening quote character), and return the index
+ of the closing quote character matching the opening quote character.
+ This handles single matching pairs of unquoted quotes; it could afford
+ to be a little smarter... This skips words between balanced pairs of
+ quotes, words where the first character is quoted with a `\', and other
+ backslash-escaped characters. */
+
+static int
+skipquotes (string, start)
+ char *string;
+ int start;
+{
+ register int i;
+ int delimiter = string[start];
+
+ /* i starts at START + 1 because string[START] is the opening quote
+ character. */
+ for (i = start + 1 ; string[i] ; i++)
+ {
+ if (string[i] == '\\')
+ {
+ i++; /* skip backslash-quoted quote characters, too */
+ continue;
+ }
+
+ if (string[i] == delimiter)
+ return i;
+ }
+ return (i);
+}
+
+/* Skip the white space and any quoted characters in STRING, starting at
+ START. Return the new index into STRING, after zero or more characters
+ have been skipped. */
+static int
+skipws (string, start)
+ char *string;
+ int start;
+{
+ register int i;
+ int pass_next, backslash_quoted_word;
+ unsigned char peekc;
+
+ /* skip quoted strings, in ' or ", and words in which a character is quoted
+ with a `\'. */
+ i = backslash_quoted_word = pass_next = 0;
+
+ /* Skip leading whitespace (or separator characters), and quoted words.
+ But save it in the output. */
+
+ for (i = start; string[i]; i++)
+ {
+ if (pass_next)
+ {
+ pass_next = 0;
+ continue;
+ }
+
+ if (whitespace (string[i]))
+ {
+ backslash_quoted_word = 0; /* we are no longer in a backslash-quoted word */
+ continue;
+ }
+
+ if (string[i] == '\\')
+ {
+ peekc = string[i+1];
+ if (ISLETTER (peekc))
+ backslash_quoted_word++; /* this is a backslash-quoted word */
+ else
+ pass_next++;
+ continue;
+ }
+
+ /* This only handles single pairs of non-escaped quotes. This
+ overloads backslash_quoted_word to also mean that a word like
+ ""f is being scanned, so that the quotes will inhibit any expansion
+ of the word. */
+ if (quote_char(string[i]))
+ {
+ i = skipquotes (string, i);
+ /* This could be a line that contains a single quote character,
+ in which case skipquotes () terminates with string[i] == '\0'
+ (the end of the string). Check for that here. */
+ if (string[i] == '\0')
+ break;
+
+ peekc = string[i + 1];
+ if (ISLETTER (peekc))
+ backslash_quoted_word++;
+ continue;
+ }
+
+ /* If we're in the middle of some kind of quoted word, let it
+ pass through. */
+ if (backslash_quoted_word)
+ continue;
+
+ /* If this character is a shell command separator, then set a hint for
+ alias_expand that the next token is the first word in a command. */
+
+ if (command_separator (string[i]))
+ {
+ command_word++;
+ continue;
+ }
+ break;
+ }
+ return (i);
+}
+
+/* Characters that may appear in a token. Basically, anything except white
+ space and a token separator. */
+#define token_char(c) (!((whitespace (string[i]) || self_delimiting (string[i]))))
+
+/* Read from START in STRING until the next separator character, and return
+ the index of that separator. Skip backslash-quoted characters. Call
+ skipquotes () for quoted strings in the middle or at the end of tokens,
+ so all characters show up (e.g. foo'' and foo""bar) */
+static int
+rd_token (string, start)
+ char *string;
+ int start;
+{
+ register int i;
+
+ /* From here to next separator character is a token. */
+ for (i = start; string[i] && token_char (string[i]); i++)
+ {
+ if (string[i] == '\\')
+ {
+ i++; /* skip backslash-escaped character */
+ continue;
+ }
+
+ /* If this character is a quote character, we want to call skipquotes
+ to get the whole quoted portion as part of this word. That word
+ will not generally match an alias, even if te unquoted word would
+ have. The presence of the quotes in the token serves then to
+ inhibit expansion. */
+ if (quote_char (string[i]))
+ {
+ i = skipquotes (string, i);
+ /* This could be a line that contains a single quote character,
+ in which case skipquotes () terminates with string[i] == '\0'
+ (the end of the string). Check for that here. */
+ if (string[i] == '\0')
+ break;
+
+ /* Now string[i] is the matching quote character, and the
+ quoted portion of the token has been scanned. */
+ continue;
+ }
+ }
+ return (i);
+}
+
+/* Return a new line, with any aliases substituted. */
+char *
+alias_expand (string)
+ char *string;
+{
+ register int i, j, start;
+ char *line, *token;
+ int line_len, tl, real_start, expand_next, expand_this_token;
+ alias_t *alias;
+
+ line_len = strlen (string) + 1;
+ line = (char *)xmalloc (line_len);
+ token = (char *)xmalloc (line_len);
+
+ line[0] = i = 0;
+ expand_next = 0;
+ command_word = 1; /* initialized to expand the first word on the line */
+
+ /* Each time through the loop we find the next word in line. If it
+ has an alias, substitute the alias value. If the value ends in ` ',
+ then try again with the next word. Else, if there is no value, or if
+ the value does not end in space, we are done. */
+
+ for (;;)
+ {
+
+ token[0] = 0;
+ start = i;
+
+ /* Skip white space and quoted characters */
+ i = skipws (string, start);
+
+ if (start == i && string[i] == '\0')
+ {
+ free (token);
+ return (line);
+ }
+
+ /* copy the just-skipped characters into the output string,
+ expanding it if there is not enough room. */
+ j = strlen (line);
+ tl = i - start; /* number of characters just skipped */
+ RESIZE_MALLOCED_BUFFER (line, j, (tl + 1), line_len, (tl + 50));
+ strncpy (line + j, string + start, tl);
+ line[j + tl] = '\0';
+
+ real_start = i;
+
+ command_word = command_word || (command_separator (string[i]));
+ expand_this_token = (command_word || expand_next);
+ expand_next = 0;
+
+ /* Read the next token, and copy it into TOKEN. */
+ start = i;
+ i = rd_token (string, start);
+
+ tl = i - start; /* token length */
+
+ /* If tl == 0, but we're not at the end of the string, then we have a
+ single-character token, probably a delimiter */
+ if (tl == 0 && string[i] != '\0')
+ {
+ tl = 1;
+ i++; /* move past it */
+ }
+
+ strncpy (token, string + start, tl);
+ token [tl] = '\0';
+
+ /* If there is a backslash-escaped character quoted in TOKEN,
+ then we don't do alias expansion. This should check for all
+ other quoting characters, too. */
+ if (mbschr (token, '\\'))
+ expand_this_token = 0;
+
+ /* If we should be expanding here, if we are expanding all words, or if
+ we are in a location in the string where an expansion is supposed to
+ take place, see if this word has a substitution. If it does, then do
+ the expansion. Note that we defer the alias value lookup until we
+ are sure we are expanding this token. */
+
+ if ((token[0]) &&
+ (expand_this_token || alias_expand_all) &&
+ (alias = find_alias (token)))
+ {
+ char *v;
+ int vlen, llen;
+
+ v = alias->value;
+ vlen = strlen (v);
+ llen = strlen (line);
+
+ /* +3 because we possibly add one more character below. */
+ RESIZE_MALLOCED_BUFFER (line, llen, (vlen + 3), line_len, (vlen + 50));
+
+ strcpy (line + llen, v);
+
+ if ((expand_this_token && vlen && whitespace (v[vlen - 1])) ||
+ alias_expand_all)
+ expand_next = 1;
+ }
+ else
+ {
+ int llen, tlen;
+
+ llen = strlen (line);
+ tlen = i - real_start; /* tlen == strlen(token) */
+
+ RESIZE_MALLOCED_BUFFER (line, llen, (tlen + 1), line_len, (llen + tlen + 50));
+
+ strncpy (line + llen, string + real_start, tlen);
+ line[llen + tlen] = '\0';
+ }
+ command_word = 0;
+ }
+}
+#endif /* READLINE */
+#endif /* ALIAS */
diff --git a/alias.h b/alias.h
new file mode 100644
index 0000000..4d0075f
--- /dev/null
+++ b/alias.h
@@ -0,0 +1,70 @@
+/* alias.h -- structure definitions. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_ALIAS_H_)
+#define _ALIAS_H_
+
+#include "stdc.h"
+
+#include "hashlib.h"
+
+typedef struct alias {
+ char *name;
+ char *value;
+ char flags;
+} alias_t;
+
+/* Values for `flags' member of struct alias. */
+#define AL_EXPANDNEXT 0x1
+#define AL_BEINGEXPANDED 0x2
+
+/* The list of known aliases. */
+extern HASH_TABLE *aliases;
+
+extern void initialize_aliases __P((void));
+
+/* Scan the list of aliases looking for one with NAME. Return NULL
+ if the alias doesn't exist, else a pointer to the alias. */
+extern alias_t *find_alias __P((char *));
+
+/* Return the value of the alias for NAME, or NULL if there is none. */
+extern char *get_alias_value __P((char *));
+
+/* Make a new alias from NAME and VALUE. If NAME can be found,
+ then replace its value. */
+extern void add_alias __P((char *, char *));
+
+/* Remove the alias with name NAME from the alias list. Returns
+ the index of the removed alias, or -1 if the alias didn't exist. */
+extern int remove_alias __P((char *));
+
+/* Remove all aliases. */
+extern void delete_all_aliases __P((void));
+
+/* Return an array of all defined aliases. */
+extern alias_t **all_aliases __P((void));
+
+/* Expand a single word for aliases. */
+extern char *alias_expand_word __P((char *));
+
+/* Return a new line, with any aliases expanded. */
+extern char *alias_expand __P((char *));
+
+#endif /* _ALIAS_H_ */
diff --git a/array.c b/array.c
new file mode 100644
index 0000000..27fe170
--- /dev/null
+++ b/array.c
@@ -0,0 +1,1130 @@
+/*
+ * array.c - functions to create, destroy, access, and manipulate arrays
+ * of strings.
+ *
+ * Arrays are sparse doubly-linked lists. An element's index is stored
+ * with it.
+ *
+ * Chet Ramey
+ * chet@ins.cwru.edu
+ */
+
+/* Copyright (C) 1997-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#if defined (ARRAY_VARS)
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include "bashansi.h"
+
+#include "shell.h"
+#include "array.h"
+#include "builtins/common.h"
+
+#define ADD_BEFORE(ae, new) \
+ do { \
+ ae->prev->next = new; \
+ new->prev = ae->prev; \
+ ae->prev = new; \
+ new->next = ae; \
+ } while(0)
+
+static char *array_to_string_internal __P((ARRAY_ELEMENT *, ARRAY_ELEMENT *, char *, int));
+
+static ARRAY *lastarray = 0;
+static ARRAY_ELEMENT *lastref = 0;
+
+#define IS_LASTREF(a) ((a) == lastarray)
+
+#define INVALIDATE_LASTREF(a) \
+do { \
+ if ((a) == lastarray) { \
+ lastarray = 0; \
+ lastref = 0; \
+ } \
+} while (0)
+
+#define SET_LASTREF(a, e) \
+do { \
+ lastarray = (a); \
+ lastref = (e); \
+} while (0)
+
+#define UNSET_LASTREF() \
+do { \
+ lastarray = 0; \
+ lastref = 0; \
+} while (0)
+
+ARRAY *
+array_create()
+{
+ ARRAY *r;
+ ARRAY_ELEMENT *head;
+
+ r =(ARRAY *)xmalloc(sizeof(ARRAY));
+ r->type = array_indexed;
+ r->max_index = -1;
+ r->num_elements = 0;
+ head = array_create_element(-1, (char *)NULL); /* dummy head */
+ head->prev = head->next = head;
+ r->head = head;
+ return(r);
+}
+
+void
+array_flush (a)
+ARRAY *a;
+{
+ register ARRAY_ELEMENT *r, *r1;
+
+ if (a == 0)
+ return;
+ for (r = element_forw(a->head); r != a->head; ) {
+ r1 = element_forw(r);
+ array_dispose_element(r);
+ r = r1;
+ }
+ a->head->next = a->head->prev = a->head;
+ a->max_index = -1;
+ a->num_elements = 0;
+ INVALIDATE_LASTREF(a);
+}
+
+void
+array_dispose(a)
+ARRAY *a;
+{
+ if (a == 0)
+ return;
+ array_flush (a);
+ array_dispose_element(a->head);
+ free(a);
+}
+
+ARRAY *
+array_copy(a)
+ARRAY *a;
+{
+ ARRAY *a1;
+ ARRAY_ELEMENT *ae, *new;
+
+ if (a == 0)
+ return((ARRAY *) NULL);
+ a1 = array_create();
+ a1->type = a->type;
+ a1->max_index = a->max_index;
+ a1->num_elements = a->num_elements;
+ for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) {
+ new = array_create_element(element_index(ae), element_value(ae));
+ ADD_BEFORE(a1->head, new);
+ }
+ return(a1);
+}
+
+/*
+ * Make and return a new array composed of the elements in array A from
+ * S to E, inclusive.
+ */
+ARRAY *
+array_slice(array, s, e)
+ARRAY *array;
+ARRAY_ELEMENT *s, *e;
+{
+ ARRAY *a;
+ ARRAY_ELEMENT *p, *n;
+ int i;
+ arrayind_t mi;
+
+ a = array_create ();
+ a->type = array->type;
+
+ for (mi = 0, p = s, i = 0; p != e; p = element_forw(p), i++) {
+ n = array_create_element (element_index(p), element_value(p));
+ ADD_BEFORE(a->head, n);
+ mi = element_index(n);
+ }
+ a->num_elements = i;
+ a->max_index = mi;
+ return a;
+}
+
+/*
+ * Walk the array, calling FUNC once for each element, with the array
+ * element as the argument.
+ */
+void
+array_walk(a, func, udata)
+ARRAY *a;
+sh_ae_map_func_t *func;
+void *udata;
+{
+ register ARRAY_ELEMENT *ae;
+
+ if (a == 0 || array_empty(a))
+ return;
+ for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae))
+ if ((*func)(ae, udata) < 0)
+ return;
+}
+
+/*
+ * Shift the array A N elements to the left. Delete the first N elements
+ * and subtract N from the indices of the remaining elements. If FLAGS
+ * does not include AS_DISPOSE, this returns a singly-linked null-terminated
+ * list of elements so the caller can dispose of the chain. If FLAGS
+ * includes AS_DISPOSE, this function disposes of the shifted-out elements
+ * and returns NULL.
+ */
+ARRAY_ELEMENT *
+array_shift(a, n, flags)
+ARRAY *a;
+int n, flags;
+{
+ register ARRAY_ELEMENT *ae, *ret;
+ register int i;
+
+ if (a == 0 || array_empty(a) || n <= 0)
+ return ((ARRAY_ELEMENT *)NULL);
+
+ INVALIDATE_LASTREF(a);
+ for (i = 0, ret = ae = element_forw(a->head); ae != a->head && i < n; ae = element_forw(ae), i++)
+ ;
+ if (ae == a->head) {
+ /* Easy case; shifting out all of the elements */
+ if (flags & AS_DISPOSE) {
+ array_flush (a);
+ return ((ARRAY_ELEMENT *)NULL);
+ }
+ for (ae = ret; element_forw(ae) != a->head; ae = element_forw(ae))
+ ;
+ element_forw(ae) = (ARRAY_ELEMENT *)NULL;
+ a->head->next = a->head->prev = a->head;
+ a->max_index = -1;
+ a->num_elements = 0;
+ return ret;
+ }
+ /*
+ * ae now points to the list of elements we want to retain.
+ * ret points to the list we want to either destroy or return.
+ */
+ ae->prev->next = (ARRAY_ELEMENT *)NULL; /* null-terminate RET */
+
+ a->head->next = ae; /* slice RET out of the array */
+ ae->prev = a->head;
+
+ for ( ; ae != a->head; ae = element_forw(ae))
+ element_index(ae) -= n; /* renumber retained indices */
+
+ a->num_elements -= n; /* modify bookkeeping information */
+ a->max_index = element_index(a->head->prev);
+
+ if (flags & AS_DISPOSE) {
+ for (ae = ret; ae; ) {
+ ret = element_forw(ae);
+ array_dispose_element(ae);
+ ae = ret;
+ }
+ return ((ARRAY_ELEMENT *)NULL);
+ }
+
+ return ret;
+}
+
+/*
+ * Shift array A right N indices. If S is non-null, it becomes the value of
+ * the new element 0. Returns the number of elements in the array after the
+ * shift.
+ */
+int
+array_rshift (a, n, s)
+ARRAY *a;
+int n;
+char *s;
+{
+ register ARRAY_ELEMENT *ae, *new;
+
+ if (a == 0 || (array_empty(a) && s == 0))
+ return 0;
+ else if (n <= 0)
+ return (a->num_elements);
+
+ ae = element_forw(a->head);
+ if (s) {
+ new = array_create_element(0, s);
+ ADD_BEFORE(ae, new);
+ a->num_elements++;
+ if (array_num_elements(a) == 1) { /* array was empty */
+ a->max_index = 0;
+ return 1;
+ }
+ }
+
+ /*
+ * Renumber all elements in the array except the one we just added.
+ */
+ for ( ; ae != a->head; ae = element_forw(ae))
+ element_index(ae) += n;
+
+ a->max_index = element_index(a->head->prev);
+
+ INVALIDATE_LASTREF(a);
+ return (a->num_elements);
+}
+
+ARRAY_ELEMENT *
+array_unshift_element(a)
+ARRAY *a;
+{
+ return (array_shift (a, 1, 0));
+}
+
+int
+array_shift_element(a, v)
+ARRAY *a;
+char *v;
+{
+ return (array_rshift (a, 1, v));
+}
+
+ARRAY *
+array_quote(array)
+ARRAY *array;
+{
+ ARRAY_ELEMENT *a;
+ char *t;
+
+ if (array == 0 || array_head(array) == 0 || array_empty(array))
+ return (ARRAY *)NULL;
+ for (a = element_forw(array->head); a != array->head; a = element_forw(a)) {
+ t = quote_string (a->value);
+ FREE(a->value);
+ a->value = t;
+ }
+ return array;
+}
+
+ARRAY *
+array_quote_escapes(array)
+ARRAY *array;
+{
+ ARRAY_ELEMENT *a;
+ char *t;
+
+ if (array == 0 || array_head(array) == 0 || array_empty(array))
+ return (ARRAY *)NULL;
+ for (a = element_forw(array->head); a != array->head; a = element_forw(a)) {
+ t = quote_escapes (a->value);
+ FREE(a->value);
+ a->value = t;
+ }
+ return array;
+}
+
+ARRAY *
+array_dequote(array)
+ARRAY *array;
+{
+ ARRAY_ELEMENT *a;
+ char *t;
+
+ if (array == 0 || array_head(array) == 0 || array_empty(array))
+ return (ARRAY *)NULL;
+ for (a = element_forw(array->head); a != array->head; a = element_forw(a)) {
+ t = dequote_string (a->value);
+ FREE(a->value);
+ a->value = t;
+ }
+ return array;
+}
+
+ARRAY *
+array_dequote_escapes(array)
+ARRAY *array;
+{
+ ARRAY_ELEMENT *a;
+ char *t;
+
+ if (array == 0 || array_head(array) == 0 || array_empty(array))
+ return (ARRAY *)NULL;
+ for (a = element_forw(array->head); a != array->head; a = element_forw(a)) {
+ t = dequote_escapes (a->value);
+ FREE(a->value);
+ a->value = t;
+ }
+ return array;
+}
+
+ARRAY *
+array_remove_quoted_nulls(array)
+ARRAY *array;
+{
+ ARRAY_ELEMENT *a;
+ char *t;
+
+ if (array == 0 || array_head(array) == 0 || array_empty(array))
+ return (ARRAY *)NULL;
+ for (a = element_forw(array->head); a != array->head; a = element_forw(a))
+ a->value = remove_quoted_nulls (a->value);
+ return array;
+}
+
+/*
+ * Return a string whose elements are the members of array A beginning at
+ * index START and spanning NELEM members. Null elements are counted.
+ * Since arrays are sparse, unset array elements are not counted.
+ */
+char *
+array_subrange (a, start, nelem, starsub, quoted)
+ARRAY *a;
+arrayind_t start, nelem;
+int starsub, quoted;
+{
+ ARRAY *a2;
+ ARRAY_ELEMENT *h, *p;
+ arrayind_t i;
+ char *ifs, *sifs, *t;
+ int slen;
+
+ p = a ? array_head (a) : 0;
+ if (p == 0 || array_empty (a) || start > array_max_index(a))
+ return ((char *)NULL);
+
+ /*
+ * Find element with index START. If START corresponds to an unset
+ * element (arrays can be sparse), use the first element whose index
+ * is >= START. If START is < 0, we count START indices back from
+ * the end of A (not elements, even with sparse arrays -- START is an
+ * index).
+ */
+ for (p = element_forw(p); p != array_head(a) && start > element_index(p); p = element_forw(p))
+ ;
+
+ if (p == a->head)
+ return ((char *)NULL);
+
+ /* Starting at P, take NELEM elements, inclusive. */
+ for (i = 0, h = p; p != a->head && i < nelem; i++, p = element_forw(p))
+ ;
+
+ a2 = array_slice(a, h, p);
+
+ if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))
+ array_quote(a2);
+ else
+ array_quote_escapes(a2);
+
+ if (starsub && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))) {
+ /* ${array[*]} */
+ array_remove_quoted_nulls (a2);
+ sifs = ifs_firstchar ((int *)NULL);
+ t = array_to_string (a2, sifs, 0);
+ free (sifs);
+ } else if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) {
+ /* ${array[@]} */
+ sifs = ifs_firstchar (&slen);
+ ifs = getifs ();
+ if (ifs == 0 || *ifs == 0) {
+ if (slen < 2)
+ sifs = xrealloc(sifs, 2);
+ sifs[0] = ' ';
+ sifs[1] = '\0';
+ }
+ t = array_to_string (a2, sifs, 0);
+ free (sifs);
+ } else
+ t = array_to_string (a2, " ", 0);
+ array_dispose(a2);
+
+ return t;
+}
+
+char *
+array_patsub (a, pat, rep, mflags)
+ARRAY *a;
+char *pat, *rep;
+int mflags;
+{
+ ARRAY *a2;
+ ARRAY_ELEMENT *e;
+ char *t, *sifs, *ifs;
+ int slen;
+
+ if (a == 0 || array_head(a) == 0 || array_empty(a))
+ return ((char *)NULL);
+
+ a2 = array_copy(a);
+ for (e = element_forw(a2->head); e != a2->head; e = element_forw(e)) {
+ t = pat_subst(element_value(e), pat, rep, mflags);
+ FREE(element_value(e));
+ e->value = t;
+ }
+
+ if (mflags & MATCH_QUOTED)
+ array_quote(a2);
+ else
+ array_quote_escapes(a2);
+
+ if (mflags & MATCH_STARSUB) {
+ array_remove_quoted_nulls (a2);
+ sifs = ifs_firstchar((int *)NULL);
+ t = array_to_string (a2, sifs, 0);
+ free(sifs);
+ } else if (mflags & MATCH_QUOTED) {
+ /* ${array[@]} */
+ sifs = ifs_firstchar (&slen);
+ ifs = getifs ();
+ if (ifs == 0 || *ifs == 0) {
+ if (slen < 2)
+ sifs = xrealloc (sifs, 2);
+ sifs[0] = ' ';
+ sifs[1] = '\0';
+ }
+ t = array_to_string (a2, sifs, 0);
+ free(sifs);
+ } else
+ t = array_to_string (a2, " ", 0);
+ array_dispose (a2);
+
+ return t;
+}
+
+char *
+array_modcase (a, pat, modop, mflags)
+ARRAY *a;
+char *pat;
+int modop;
+int mflags;
+{
+ ARRAY *a2;
+ ARRAY_ELEMENT *e;
+ char *t, *sifs, *ifs;
+ int slen;
+
+ if (a == 0 || array_head(a) == 0 || array_empty(a))
+ return ((char *)NULL);
+
+ a2 = array_copy(a);
+ for (e = element_forw(a2->head); e != a2->head; e = element_forw(e)) {
+ t = sh_modcase(element_value(e), pat, modop);
+ FREE(element_value(e));
+ e->value = t;
+ }
+
+ if (mflags & MATCH_QUOTED)
+ array_quote(a2);
+ else
+ array_quote_escapes(a2);
+
+ if (mflags & MATCH_STARSUB) {
+ array_remove_quoted_nulls (a2);
+ sifs = ifs_firstchar((int *)NULL);
+ t = array_to_string (a2, sifs, 0);
+ free(sifs);
+ } else if (mflags & MATCH_QUOTED) {
+ /* ${array[@]} */
+ sifs = ifs_firstchar (&slen);
+ ifs = getifs ();
+ if (ifs == 0 || *ifs == 0) {
+ if (slen < 2)
+ sifs = xrealloc (sifs, 2);
+ sifs[0] = ' ';
+ sifs[1] = '\0';
+ }
+ t = array_to_string (a2, sifs, 0);
+ free(sifs);
+ } else
+ t = array_to_string (a2, " ", 0);
+ array_dispose (a2);
+
+ return t;
+}
+/*
+ * Allocate and return a new array element with index INDEX and value
+ * VALUE.
+ */
+ARRAY_ELEMENT *
+array_create_element(indx, value)
+arrayind_t indx;
+char *value;
+{
+ ARRAY_ELEMENT *r;
+
+ r = (ARRAY_ELEMENT *)xmalloc(sizeof(ARRAY_ELEMENT));
+ r->ind = indx;
+ r->value = value ? savestring(value) : (char *)NULL;
+ r->next = r->prev = (ARRAY_ELEMENT *) NULL;
+ return(r);
+}
+
+#ifdef INCLUDE_UNUSED
+ARRAY_ELEMENT *
+array_copy_element(ae)
+ARRAY_ELEMENT *ae;
+{
+ return(ae ? array_create_element(element_index(ae), element_value(ae))
+ : (ARRAY_ELEMENT *) NULL);
+}
+#endif
+
+void
+array_dispose_element(ae)
+ARRAY_ELEMENT *ae;
+{
+ if (ae) {
+ FREE(ae->value);
+ free(ae);
+ }
+}
+
+/*
+ * Add a new element with index I and value V to array A (a[i] = v).
+ */
+int
+array_insert(a, i, v)
+ARRAY *a;
+arrayind_t i;
+char *v;
+{
+ register ARRAY_ELEMENT *new, *ae;
+
+ if (a == 0)
+ return(-1);
+ new = array_create_element(i, v);
+ if (i > array_max_index(a)) {
+ /*
+ * Hook onto the end. This also works for an empty array.
+ * Fast path for the common case of allocating arrays
+ * sequentially.
+ */
+ ADD_BEFORE(a->head, new);
+ a->max_index = i;
+ a->num_elements++;
+ SET_LASTREF(a, new);
+ return(0);
+ }
+ /*
+ * Otherwise we search for the spot to insert it.
+ */
+ for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) {
+ if (element_index(ae) == i) {
+ /*
+ * Replacing an existing element.
+ */
+ array_dispose_element(new);
+ free(element_value(ae));
+ ae->value = v ? savestring(v) : (char *)NULL;
+ SET_LASTREF(a, ae);
+ return(0);
+ } else if (element_index(ae) > i) {
+ ADD_BEFORE(ae, new);
+ a->num_elements++;
+ SET_LASTREF(a, new);
+ return(0);
+ }
+ }
+ INVALIDATE_LASTREF(a);
+ return (-1); /* problem */
+}
+
+/*
+ * Delete the element with index I from array A and return it so the
+ * caller can dispose of it.
+ */
+ARRAY_ELEMENT *
+array_remove(a, i)
+ARRAY *a;
+arrayind_t i;
+{
+ register ARRAY_ELEMENT *ae;
+
+ if (a == 0 || array_empty(a))
+ return((ARRAY_ELEMENT *) NULL);
+ for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae))
+ if (element_index(ae) == i) {
+ ae->next->prev = ae->prev;
+ ae->prev->next = ae->next;
+ a->num_elements--;
+ if (i == array_max_index(a))
+ a->max_index = element_index(ae->prev);
+ INVALIDATE_LASTREF(a);
+ return(ae);
+ }
+ return((ARRAY_ELEMENT *) NULL);
+}
+
+/*
+ * Return the value of a[i].
+ */
+char *
+array_reference(a, i)
+ARRAY *a;
+arrayind_t i;
+{
+ register ARRAY_ELEMENT *ae;
+
+ if (a == 0 || array_empty(a))
+ return((char *) NULL);
+ if (i > array_max_index(a))
+ return((char *)NULL);
+ /* Keep roving pointer into array to optimize sequential access */
+ if (lastref && IS_LASTREF(a))
+ ae = (i >= element_index(lastref)) ? lastref : element_forw(a->head);
+ else
+ ae = element_forw(a->head);
+ for ( ; ae != a->head; ae = element_forw(ae))
+ if (element_index(ae) == i) {
+ SET_LASTREF(a, ae);
+ return(element_value(ae));
+ }
+ UNSET_LASTREF();
+ return((char *) NULL);
+}
+
+/* Convenience routines for the shell to translate to and from the form used
+ by the rest of the code. */
+
+WORD_LIST *
+array_to_word_list(a)
+ARRAY *a;
+{
+ WORD_LIST *list;
+ ARRAY_ELEMENT *ae;
+
+ if (a == 0 || array_empty(a))
+ return((WORD_LIST *)NULL);
+ list = (WORD_LIST *)NULL;
+ for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae))
+ list = make_word_list (make_bare_word(element_value(ae)), list);
+ return (REVERSE_LIST(list, WORD_LIST *));
+}
+
+ARRAY *
+array_from_word_list (list)
+WORD_LIST *list;
+{
+ ARRAY *a;
+
+ if (list == 0)
+ return((ARRAY *)NULL);
+ a = array_create();
+ return (array_assign_list (a, list));
+}
+
+WORD_LIST *
+array_keys_to_word_list(a)
+ARRAY *a;
+{
+ WORD_LIST *list;
+ ARRAY_ELEMENT *ae;
+ char *t;
+
+ if (a == 0 || array_empty(a))
+ return((WORD_LIST *)NULL);
+ list = (WORD_LIST *)NULL;
+ for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) {
+ t = itos(element_index(ae));
+ list = make_word_list (make_bare_word(t), list);
+ free(t);
+ }
+ return (REVERSE_LIST(list, WORD_LIST *));
+}
+
+ARRAY *
+array_assign_list (array, list)
+ARRAY *array;
+WORD_LIST *list;
+{
+ register WORD_LIST *l;
+ register arrayind_t i;
+
+ for (l = list, i = 0; l; l = l->next, i++)
+ array_insert(array, i, l->word->word);
+ return array;
+}
+
+char **
+array_to_argv (a)
+ARRAY *a;
+{
+ char **ret, *t;
+ int i;
+ ARRAY_ELEMENT *ae;
+
+ if (a == 0 || array_empty(a))
+ return ((char **)NULL);
+ ret = strvec_create (array_num_elements (a) + 1);
+ i = 0;
+ for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) {
+ t = element_value (ae);
+ ret[i++] = t ? savestring (t) : (char *)NULL;
+ }
+ ret[i] = (char *)NULL;
+ return (ret);
+}
+
+/*
+ * Return a string that is the concatenation of the elements in A from START
+ * to END, separated by SEP.
+ */
+static char *
+array_to_string_internal (start, end, sep, quoted)
+ARRAY_ELEMENT *start, *end;
+char *sep;
+int quoted;
+{
+ char *result, *t;
+ ARRAY_ELEMENT *ae;
+ int slen, rsize, rlen, reg;
+
+ if (start == end) /* XXX - should not happen */
+ return ((char *)NULL);
+
+ slen = strlen(sep);
+ result = NULL;
+ for (rsize = rlen = 0, ae = start; ae != end; ae = element_forw(ae)) {
+ if (rsize == 0)
+ result = (char *)xmalloc (rsize = 64);
+ if (element_value(ae)) {
+ t = quoted ? quote_string(element_value(ae)) : element_value(ae);
+ reg = strlen(t);
+ RESIZE_MALLOCED_BUFFER (result, rlen, (reg + slen + 2),
+ rsize, rsize);
+ strcpy(result + rlen, t);
+ rlen += reg;
+ if (quoted && t)
+ free(t);
+ /*
+ * Add a separator only after non-null elements.
+ */
+ if (element_forw(ae) != end) {
+ strcpy(result + rlen, sep);
+ rlen += slen;
+ }
+ }
+ }
+ if (result)
+ result[rlen] = '\0'; /* XXX */
+ return(result);
+}
+
+char *
+array_to_assign (a, quoted)
+ARRAY *a;
+int quoted;
+{
+ char *result, *valstr, *is;
+ char indstr[INT_STRLEN_BOUND(intmax_t) + 1];
+ ARRAY_ELEMENT *ae;
+ int rsize, rlen, elen;
+
+ if (a == 0 || array_empty (a))
+ return((char *)NULL);
+
+ result = (char *)xmalloc (rsize = 128);
+ result[0] = '(';
+ rlen = 1;
+
+ for (ae = element_forw(a->head); ae != a->head; ae = element_forw(ae)) {
+ is = inttostr (element_index(ae), indstr, sizeof(indstr));
+ valstr = element_value (ae) ? sh_double_quote (element_value(ae))
+ : (char *)NULL;
+ elen = STRLEN (is) + 8 + STRLEN (valstr);
+ RESIZE_MALLOCED_BUFFER (result, rlen, (elen + 1), rsize, rsize);
+
+ result[rlen++] = '[';
+ strcpy (result + rlen, is);
+ rlen += STRLEN (is);
+ result[rlen++] = ']';
+ result[rlen++] = '=';
+ if (valstr) {
+ strcpy (result + rlen, valstr);
+ rlen += STRLEN (valstr);
+ }
+
+ if (element_forw(ae) != a->head)
+ result[rlen++] = ' ';
+
+ FREE (valstr);
+ }
+ RESIZE_MALLOCED_BUFFER (result, rlen, 1, rsize, 8);
+ result[rlen++] = ')';
+ result[rlen] = '\0';
+ if (quoted) {
+ /* This is not as efficient as it could be... */
+ valstr = sh_single_quote (result);
+ free (result);
+ result = valstr;
+ }
+ return(result);
+}
+
+char *
+array_to_string (a, sep, quoted)
+ARRAY *a;
+char *sep;
+int quoted;
+{
+ if (a == 0)
+ return((char *)NULL);
+ if (array_empty(a))
+ return(savestring(""));
+ return (array_to_string_internal (element_forw(a->head), a->head, sep, quoted));
+}
+
+#if defined (INCLUDE_UNUSED) || defined (TEST_ARRAY)
+/*
+ * Return an array consisting of elements in S, separated by SEP
+ */
+ARRAY *
+array_from_string(s, sep)
+char *s, *sep;
+{
+ ARRAY *a;
+ WORD_LIST *w;
+
+ if (s == 0)
+ return((ARRAY *)NULL);
+ w = list_string (s, sep, 0);
+ if (w == 0)
+ return((ARRAY *)NULL);
+ a = array_from_word_list (w);
+ return (a);
+}
+#endif
+
+#if defined (TEST_ARRAY)
+/*
+ * To make a running version, compile -DTEST_ARRAY and link with:
+ * xmalloc.o syntax.o lib/malloc/libmalloc.a lib/sh/libsh.a
+ */
+int interrupt_immediately = 0;
+
+int
+signal_is_trapped(s)
+int s;
+{
+ return 0;
+}
+
+void
+fatal_error(const char *s, ...)
+{
+ fprintf(stderr, "array_test: fatal memory error\n");
+ abort();
+}
+
+void
+programming_error(const char *s, ...)
+{
+ fprintf(stderr, "array_test: fatal programming error\n");
+ abort();
+}
+
+WORD_DESC *
+make_bare_word (s)
+const char *s;
+{
+ WORD_DESC *w;
+
+ w = (WORD_DESC *)xmalloc(sizeof(WORD_DESC));
+ w->word = s ? savestring(s) : savestring ("");
+ w->flags = 0;
+ return w;
+}
+
+WORD_LIST *
+make_word_list(x, l)
+WORD_DESC *x;
+WORD_LIST *l;
+{
+ WORD_LIST *w;
+
+ w = (WORD_LIST *)xmalloc(sizeof(WORD_LIST));
+ w->word = x;
+ w->next = l;
+ return w;
+}
+
+WORD_LIST *
+list_string(s, t, i)
+char *s, *t;
+int i;
+{
+ char *r, *a;
+ WORD_LIST *wl;
+
+ if (s == 0)
+ return (WORD_LIST *)NULL;
+ r = savestring(s);
+ wl = (WORD_LIST *)NULL;
+ a = strtok(r, t);
+ while (a) {
+ wl = make_word_list (make_bare_word(a), wl);
+ a = strtok((char *)NULL, t);
+ }
+ return (REVERSE_LIST (wl, WORD_LIST *));
+}
+
+GENERIC_LIST *
+list_reverse (list)
+GENERIC_LIST *list;
+{
+ register GENERIC_LIST *next, *prev;
+
+ for (prev = 0; list; ) {
+ next = list->next;
+ list->next = prev;
+ prev = list;
+ list = next;
+ }
+ return prev;
+}
+
+char *
+pat_subst(s, t, u, i)
+char *s, *t, *u;
+int i;
+{
+ return ((char *)NULL);
+}
+
+char *
+quote_string(s)
+char *s;
+{
+ return savestring(s);
+}
+
+print_element(ae)
+ARRAY_ELEMENT *ae;
+{
+ char lbuf[INT_STRLEN_BOUND (intmax_t) + 1];
+
+ printf("array[%s] = %s\n",
+ inttostr (element_index(ae), lbuf, sizeof (lbuf)),
+ element_value(ae));
+}
+
+print_array(a)
+ARRAY *a;
+{
+ printf("\n");
+ array_walk(a, print_element, (void *)NULL);
+}
+
+main()
+{
+ ARRAY *a, *new_a, *copy_of_a;
+ ARRAY_ELEMENT *ae, *aew;
+ char *s;
+
+ a = array_create();
+ array_insert(a, 1, "one");
+ array_insert(a, 7, "seven");
+ array_insert(a, 4, "four");
+ array_insert(a, 1029, "one thousand twenty-nine");
+ array_insert(a, 12, "twelve");
+ array_insert(a, 42, "forty-two");
+ print_array(a);
+ s = array_to_string (a, " ", 0);
+ printf("s = %s\n", s);
+ copy_of_a = array_from_string(s, " ");
+ printf("copy_of_a:");
+ print_array(copy_of_a);
+ array_dispose(copy_of_a);
+ printf("\n");
+ free(s);
+ ae = array_remove(a, 4);
+ array_dispose_element(ae);
+ ae = array_remove(a, 1029);
+ array_dispose_element(ae);
+ array_insert(a, 16, "sixteen");
+ print_array(a);
+ s = array_to_string (a, " ", 0);
+ printf("s = %s\n", s);
+ copy_of_a = array_from_string(s, " ");
+ printf("copy_of_a:");
+ print_array(copy_of_a);
+ array_dispose(copy_of_a);
+ printf("\n");
+ free(s);
+ array_insert(a, 2, "two");
+ array_insert(a, 1029, "new one thousand twenty-nine");
+ array_insert(a, 0, "zero");
+ array_insert(a, 134, "");
+ print_array(a);
+ s = array_to_string (a, ":", 0);
+ printf("s = %s\n", s);
+ copy_of_a = array_from_string(s, ":");
+ printf("copy_of_a:");
+ print_array(copy_of_a);
+ array_dispose(copy_of_a);
+ printf("\n");
+ free(s);
+ new_a = array_copy(a);
+ print_array(new_a);
+ s = array_to_string (new_a, ":", 0);
+ printf("s = %s\n", s);
+ copy_of_a = array_from_string(s, ":");
+ free(s);
+ printf("copy_of_a:");
+ print_array(copy_of_a);
+ array_shift(copy_of_a, 2, AS_DISPOSE);
+ printf("copy_of_a shifted by two:");
+ print_array(copy_of_a);
+ ae = array_shift(copy_of_a, 2, 0);
+ printf("copy_of_a shifted by two:");
+ print_array(copy_of_a);
+ for ( ; ae; ) {
+ aew = element_forw(ae);
+ array_dispose_element(ae);
+ ae = aew;
+ }
+ array_rshift(copy_of_a, 1, (char *)0);
+ printf("copy_of_a rshift by 1:");
+ print_array(copy_of_a);
+ array_rshift(copy_of_a, 2, "new element zero");
+ printf("copy_of_a rshift again by 2 with new element zero:");
+ print_array(copy_of_a);
+ s = array_to_assign(copy_of_a, 0);
+ printf("copy_of_a=%s\n", s);
+ free(s);
+ ae = array_shift(copy_of_a, array_num_elements(copy_of_a), 0);
+ for ( ; ae; ) {
+ aew = element_forw(ae);
+ array_dispose_element(ae);
+ ae = aew;
+ }
+ array_dispose(copy_of_a);
+ printf("\n");
+ array_dispose(a);
+ array_dispose(new_a);
+}
+
+#endif /* TEST_ARRAY */
+#endif /* ARRAY_VARS */
diff --git a/array.h b/array.h
new file mode 100644
index 0000000..fb4f789
--- /dev/null
+++ b/array.h
@@ -0,0 +1,119 @@
+/* array.h -- definitions for the interface exported by array.c that allows
+ the rest of the shell to manipulate array variables. */
+
+/* Copyright (C) 1997-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+
+#ifndef _ARRAY_H_
+#define _ARRAY_H_
+
+#include "stdc.h"
+
+typedef intmax_t arrayind_t;
+
+enum atype {array_indexed, array_assoc};
+
+typedef struct array {
+ enum atype type;
+ arrayind_t max_index;
+ int num_elements;
+ struct array_element *head;
+} ARRAY;
+
+typedef struct array_element {
+ arrayind_t ind;
+ char *value;
+ struct array_element *next, *prev;
+} ARRAY_ELEMENT;
+
+typedef int sh_ae_map_func_t __P((ARRAY_ELEMENT *, void *));
+
+/* Basic operations on entire arrays */
+extern ARRAY *array_create __P((void));
+extern void array_flush __P((ARRAY *));
+extern void array_dispose __P((ARRAY *));
+extern ARRAY *array_copy __P((ARRAY *));
+extern ARRAY *array_slice __P((ARRAY *, ARRAY_ELEMENT *, ARRAY_ELEMENT *));
+extern void array_walk __P((ARRAY *, sh_ae_map_func_t *, void *));
+
+extern ARRAY_ELEMENT *array_shift __P((ARRAY *, int, int));
+extern int array_rshift __P((ARRAY *, int, char *));
+extern ARRAY_ELEMENT *array_unshift_element __P((ARRAY *));
+extern int array_shift_element __P((ARRAY *, char *));
+
+extern ARRAY *array_quote __P((ARRAY *));
+extern ARRAY *array_quote_escapes __P((ARRAY *));
+extern ARRAY *array_dequote __P((ARRAY *));
+extern ARRAY *array_dequote_escapes __P((ARRAY *));
+extern ARRAY *array_remove_quoted_nulls __P((ARRAY *));
+
+extern char *array_subrange __P((ARRAY *, arrayind_t, arrayind_t, int, int));
+extern char *array_patsub __P((ARRAY *, char *, char *, int));
+extern char *array_modcase __P((ARRAY *, char *, int, int));
+
+/* Basic operations on array elements. */
+extern ARRAY_ELEMENT *array_create_element __P((arrayind_t, char *));
+extern ARRAY_ELEMENT *array_copy_element __P((ARRAY_ELEMENT *));
+extern void array_dispose_element __P((ARRAY_ELEMENT *));
+
+extern int array_insert __P((ARRAY *, arrayind_t, char *));
+extern ARRAY_ELEMENT *array_remove __P((ARRAY *, arrayind_t));
+extern char *array_reference __P((ARRAY *, arrayind_t));
+
+/* Converting to and from arrays */
+extern WORD_LIST *array_to_word_list __P((ARRAY *));
+extern ARRAY *array_from_word_list __P((WORD_LIST *));
+extern WORD_LIST *array_keys_to_word_list __P((ARRAY *));
+
+extern ARRAY *array_assign_list __P((ARRAY *, WORD_LIST *));
+
+extern char **array_to_argv __P((ARRAY *));
+
+extern char *array_to_assign __P((ARRAY *, int));
+extern char *array_to_string __P((ARRAY *, char *, int));
+extern ARRAY *array_from_string __P((char *, char *));
+
+/* Flags for array_shift */
+#define AS_DISPOSE 0x01
+
+#define array_num_elements(a) ((a)->num_elements)
+#define array_max_index(a) ((a)->max_index)
+#define array_head(a) ((a)->head)
+#define array_empty(a) ((a)->num_elements == 0)
+
+#define element_value(ae) ((ae)->value)
+#define element_index(ae) ((ae)->ind)
+#define element_forw(ae) ((ae)->next)
+#define element_back(ae) ((ae)->prev)
+
+/* Convenience */
+#define array_push(a,v) \
+ do { array_rshift ((a), 1, (v)); } while (0)
+#define array_pop(a) \
+ do { array_dispose_element (array_shift ((a), 1, 0)); } while (0)
+
+#define GET_ARRAY_FROM_VAR(n, v, a) \
+ do { \
+ (v) = find_variable (n); \
+ (a) = ((v) && array_p ((v))) ? array_cell (v) : (ARRAY *)0; \
+ } while (0)
+
+#define ALL_ELEMENT_SUB(c) ((c) == '@' || (c) == '*')
+
+#endif /* _ARRAY_H_ */
diff --git a/arrayfunc.c b/arrayfunc.c
new file mode 100644
index 0000000..218faf3
--- /dev/null
+++ b/arrayfunc.c
@@ -0,0 +1,1014 @@
+/* arrayfunc.c -- High-level array functions used by other parts of the shell. */
+
+/* Copyright (C) 2001-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#if defined (ARRAY_VARS)
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+#include <stdio.h>
+
+#include "bashintl.h"
+
+#include "shell.h"
+#include "pathexp.h"
+
+#include "shmbutil.h"
+
+#include "builtins/common.h"
+
+extern char *this_command_name;
+extern int last_command_exit_value;
+extern int array_needs_making;
+
+static SHELL_VAR *bind_array_var_internal __P((SHELL_VAR *, arrayind_t, char *, char *, int));
+
+static char *quote_assign __P((const char *));
+static void quote_array_assignment_chars __P((WORD_LIST *));
+static char *array_value_internal __P((char *, int, int, int *));
+
+/* Standard error message to use when encountering an invalid array subscript */
+const char * const bash_badsub_errmsg = N_("bad array subscript");
+
+/* **************************************************************** */
+/* */
+/* Functions to manipulate array variables and perform assignments */
+/* */
+/* **************************************************************** */
+
+/* Convert a shell variable to an array variable. The original value is
+ saved as array[0]. */
+SHELL_VAR *
+convert_var_to_array (var)
+ SHELL_VAR *var;
+{
+ char *oldval;
+ ARRAY *array;
+
+ oldval = value_cell (var);
+ array = array_create ();
+ if (oldval)
+ array_insert (array, 0, oldval);
+
+ FREE (value_cell (var));
+ var_setarray (var, array);
+
+ /* these aren't valid anymore */
+ var->dynamic_value = (sh_var_value_func_t *)NULL;
+ var->assign_func = (sh_var_assign_func_t *)NULL;
+
+ INVALIDATE_EXPORTSTR (var);
+ if (exported_p (var))
+ array_needs_making++;
+
+ VSETATTR (var, att_array);
+ VUNSETATTR (var, att_invisible);
+
+ return var;
+}
+
+/* Convert a shell variable to an array variable. The original value is
+ saved as array[0]. */
+SHELL_VAR *
+convert_var_to_assoc (var)
+ SHELL_VAR *var;
+{
+ char *oldval;
+ HASH_TABLE *hash;
+
+ oldval = value_cell (var);
+ hash = assoc_create (0);
+ if (oldval)
+ assoc_insert (hash, savestring ("0"), oldval);
+
+ FREE (value_cell (var));
+ var_setassoc (var, hash);
+
+ /* these aren't valid anymore */
+ var->dynamic_value = (sh_var_value_func_t *)NULL;
+ var->assign_func = (sh_var_assign_func_t *)NULL;
+
+ INVALIDATE_EXPORTSTR (var);
+ if (exported_p (var))
+ array_needs_making++;
+
+ VSETATTR (var, att_assoc);
+ VUNSETATTR (var, att_invisible);
+
+ return var;
+}
+
+static SHELL_VAR *
+bind_array_var_internal (entry, ind, key, value, flags)
+ SHELL_VAR *entry;
+ arrayind_t ind;
+ char *key;
+ char *value;
+ int flags;
+{
+ SHELL_VAR *dentry;
+ char *newval;
+
+ /* If we're appending, we need the old value of the array reference, so
+ fake out make_variable_value with a dummy SHELL_VAR */
+ if (flags & ASS_APPEND)
+ {
+ dentry = (SHELL_VAR *)xmalloc (sizeof (SHELL_VAR));
+ dentry->name = savestring (entry->name);
+ if (assoc_p (entry))
+ newval = assoc_reference (assoc_cell (entry), key);
+ else
+ newval = array_reference (array_cell (entry), ind);
+ if (newval)
+ dentry->value = savestring (newval);
+ else
+ {
+ dentry->value = (char *)xmalloc (1);
+ dentry->value[0] = '\0';
+ }
+ dentry->exportstr = 0;
+ dentry->attributes = entry->attributes & ~(att_array|att_assoc|att_exported);
+ /* Leave the rest of the members uninitialized; the code doesn't look
+ at them. */
+ newval = make_variable_value (dentry, value, flags);
+ dispose_variable (dentry);
+ }
+ else
+ newval = make_variable_value (entry, value, flags);
+
+ if (entry->assign_func)
+ (*entry->assign_func) (entry, newval, ind, key);
+ else if (assoc_p (entry))
+ assoc_insert (assoc_cell (entry), key, newval);
+ else
+ array_insert (array_cell (entry), ind, newval);
+ FREE (newval);
+
+ return (entry);
+}
+
+/* Perform an array assignment name[ind]=value. If NAME already exists and
+ is not an array, and IND is 0, perform name=value instead. If NAME exists
+ and is not an array, and IND is not 0, convert it into an array with the
+ existing value as name[0].
+
+ If NAME does not exist, just create an array variable, no matter what
+ IND's value may be. */
+SHELL_VAR *
+bind_array_variable (name, ind, value, flags)
+ char *name;
+ arrayind_t ind;
+ char *value;
+ int flags;
+{
+ SHELL_VAR *entry;
+
+ entry = var_lookup (name, shell_variables);
+
+ if (entry == (SHELL_VAR *) 0)
+ entry = make_new_array_variable (name);
+ else if (readonly_p (entry) || noassign_p (entry))
+ {
+ if (readonly_p (entry))
+ err_readonly (name);
+ return (entry);
+ }
+ else if (array_p (entry) == 0)
+ entry = convert_var_to_array (entry);
+
+ /* ENTRY is an array variable, and ARRAY points to the value. */
+ return (bind_array_var_internal (entry, ind, 0, value, flags));
+}
+
+SHELL_VAR *
+bind_array_element (entry, ind, value, flags)
+ SHELL_VAR *entry;
+ arrayind_t ind;
+ char *value;
+ int flags;
+{
+ return (bind_array_var_internal (entry, ind, 0, value, flags));
+}
+
+SHELL_VAR *
+bind_assoc_variable (entry, name, key, value, flags)
+ SHELL_VAR *entry;
+ char *name;
+ char *key;
+ char *value;
+ int flags;
+{
+ SHELL_VAR *dentry;
+ char *newval;
+
+ if (readonly_p (entry) || noassign_p (entry))
+ {
+ if (readonly_p (entry))
+ err_readonly (name);
+ return (entry);
+ }
+
+ return (bind_array_var_internal (entry, 0, key, value, flags));
+}
+
+/* Parse NAME, a lhs of an assignment statement of the form v[s], and
+ assign VALUE to that array element by calling bind_array_variable(). */
+SHELL_VAR *
+assign_array_element (name, value, flags)
+ char *name, *value;
+ int flags;
+{
+ char *sub, *vname, *akey;
+ arrayind_t ind;
+ int sublen;
+ SHELL_VAR *entry;
+
+ vname = array_variable_name (name, &sub, &sublen);
+
+ if (vname == 0)
+ return ((SHELL_VAR *)NULL);
+
+ if ((ALL_ELEMENT_SUB (sub[0]) && sub[1] == ']') || (sublen <= 1))
+ {
+ free (vname);
+ err_badarraysub (name);
+ return ((SHELL_VAR *)NULL);
+ }
+
+ entry = find_variable (vname);
+
+ if (entry && assoc_p (entry))
+ {
+ sub[sublen-1] = '\0';
+ akey = expand_assignment_string_to_string (sub, 0); /* [ */
+ sub[sublen-1] = ']';
+ if (akey == 0 || *akey == 0)
+ {
+ free (vname);
+ err_badarraysub (name);
+ return ((SHELL_VAR *)NULL);
+ }
+ entry = bind_assoc_variable (entry, vname, akey, value, flags);
+ }
+ else
+ {
+ ind = array_expand_index (sub, sublen);
+ if (ind < 0)
+ {
+ free (vname);
+ err_badarraysub (name);
+ return ((SHELL_VAR *)NULL);
+ }
+ entry = bind_array_variable (vname, ind, value, flags);
+ }
+
+ free (vname);
+ return (entry);
+}
+
+/* Find the array variable corresponding to NAME. If there is no variable,
+ create a new array variable. If the variable exists but is not an array,
+ convert it to an indexed array. If FLAGS&1 is non-zero, an existing
+ variable is checked for the readonly or noassign attribute in preparation
+ for assignment (e.g., by the `read' builtin). If FLAGS&2 is non-zero, we
+ create an associative array. */
+SHELL_VAR *
+find_or_make_array_variable (name, flags)
+ char *name;
+ int flags;
+{
+ SHELL_VAR *var;
+
+ var = find_variable (name);
+
+ if (var == 0)
+ var = (flags & 2) ? make_new_assoc_variable (name) : make_new_array_variable (name);
+ else if ((flags & 1) && (readonly_p (var) || noassign_p (var)))
+ {
+ if (readonly_p (var))
+ err_readonly (name);
+ return ((SHELL_VAR *)NULL);
+ }
+ else if ((flags & 2) && array_p (var))
+ {
+ report_error (_("%s: cannot convert indexed to associative array"), name);
+ return ((SHELL_VAR *)NULL);
+ }
+ else if (array_p (var) == 0 && assoc_p (var) == 0)
+ var = convert_var_to_array (var);
+
+ return (var);
+}
+
+/* Perform a compound assignment statement for array NAME, where VALUE is
+ the text between the parens: NAME=( VALUE ) */
+SHELL_VAR *
+assign_array_from_string (name, value, flags)
+ char *name, *value;
+ int flags;
+{
+ SHELL_VAR *var;
+ int vflags;
+
+ vflags = 1;
+ if (flags & ASS_MKASSOC)
+ vflags |= 2;
+
+ var = find_or_make_array_variable (name, vflags);
+ if (var == 0)
+ return ((SHELL_VAR *)NULL);
+
+ return (assign_array_var_from_string (var, value, flags));
+}
+
+/* Sequentially assign the indices of indexed array variable VAR from the
+ words in LIST. */
+SHELL_VAR *
+assign_array_var_from_word_list (var, list, flags)
+ SHELL_VAR *var;
+ WORD_LIST *list;
+ int flags;
+{
+ register arrayind_t i;
+ register WORD_LIST *l;
+ ARRAY *a;
+
+ a = array_cell (var);
+ i = (flags & ASS_APPEND) ? array_max_index (a) + 1 : 0;
+
+ for (l = list; l; l = l->next, i++)
+ if (var->assign_func)
+ (*var->assign_func) (var, l->word->word, i, 0);
+ else
+ array_insert (a, i, l->word->word);
+ return var;
+}
+
+WORD_LIST *
+expand_compound_array_assignment (var, value, flags)
+ SHELL_VAR *var;
+ char *value;
+ int flags;
+{
+ WORD_LIST *list, *nlist;
+ char *val;
+ int ni;
+
+ /* I don't believe this condition is ever true any more. */
+ if (*value == '(') /*)*/
+ {
+ ni = 1;
+ val = extract_array_assignment_list (value, &ni);
+ if (val == 0)
+ return (WORD_LIST *)NULL;
+ }
+ else
+ val = value;
+
+ /* Expand the value string into a list of words, performing all the
+ shell expansions including pathname generation and word splitting. */
+ /* First we split the string on whitespace, using the shell parser
+ (ksh93 seems to do this). */
+ list = parse_string_to_word_list (val, 1, "array assign");
+
+ /* If we're using [subscript]=value, we need to quote each [ and ] to
+ prevent unwanted filename expansion. */
+ if (list)
+ quote_array_assignment_chars (list);
+
+ /* Now that we've split it, perform the shell expansions on each
+ word in the list. */
+ nlist = list ? expand_words_no_vars (list) : (WORD_LIST *)NULL;
+
+ dispose_words (list);
+
+ if (val != value)
+ free (val);
+
+ return nlist;
+}
+
+/* Callers ensure that VAR is not NULL */
+void
+assign_compound_array_list (var, nlist, flags)
+ SHELL_VAR *var;
+ WORD_LIST *nlist;
+ int flags;
+{
+ ARRAY *a;
+ HASH_TABLE *h;
+ WORD_LIST *list;
+ char *w, *val, *nval;
+ int len, iflags;
+ arrayind_t ind, last_ind;
+ char *akey;
+
+ a = (var && array_p (var)) ? array_cell (var) : (ARRAY *)0;
+ h = (var && assoc_p (var)) ? assoc_cell (var) : (HASH_TABLE *)0;
+
+ akey = (char *)0;
+ ind = 0;
+
+ /* Now that we are ready to assign values to the array, kill the existing
+ value. */
+ if ((flags & ASS_APPEND) == 0)
+ {
+ if (a && array_p (var))
+ array_flush (a);
+ else if (h && assoc_p (var))
+ assoc_flush (h);
+ }
+
+ last_ind = (a && (flags & ASS_APPEND)) ? array_max_index (a) + 1 : 0;
+
+ for (list = nlist; list; list = list->next)
+ {
+ iflags = flags;
+ w = list->word->word;
+
+ /* We have a word of the form [ind]=value */
+ if ((list->word->flags & W_ASSIGNMENT) && w[0] == '[')
+ {
+ len = skipsubscript (w, 0, (var && assoc_p (var) != 0));
+
+ /* XXX - changes for `+=' */
+ if (w[len] != ']' || (w[len+1] != '=' && (w[len+1] != '+' || w[len+2] != '=')))
+ {
+ if (assoc_p (var))
+ {
+ err_badarraysub (w);
+ continue;
+ }
+ nval = make_variable_value (var, w, flags);
+ if (var->assign_func)
+ (*var->assign_func) (var, nval, last_ind, 0);
+ else
+ array_insert (a, last_ind, nval);
+ FREE (nval);
+ last_ind++;
+ continue;
+ }
+
+ if (len == 1)
+ {
+ err_badarraysub (w);
+ continue;
+ }
+
+ if (ALL_ELEMENT_SUB (w[1]) && len == 2)
+ {
+ if (assoc_p (var))
+ report_error (_("%s: invalid associative array key"), w);
+ else
+ report_error (_("%s: cannot assign to non-numeric index"), w);
+ continue;
+ }
+
+ if (array_p (var))
+ {
+ ind = array_expand_index (w + 1, len);
+ if (ind < 0)
+ {
+ err_badarraysub (w);
+ continue;
+ }
+
+ last_ind = ind;
+ }
+ else if (assoc_p (var))
+ {
+ akey = substring (w, 1, len);
+ if (akey == 0 || *akey == 0)
+ {
+ err_badarraysub (w);
+ continue;
+ }
+ }
+
+ /* XXX - changes for `+=' -- just accept the syntax. ksh93 doesn't do this */
+ if (w[len + 1] == '+' && w[len + 2] == '=')
+ {
+ iflags |= ASS_APPEND;
+ val = w + len + 3;
+ }
+ else
+ val = w + len + 2;
+ }
+ else if (assoc_p (var))
+ {
+ report_error (_("%s: %s: must use subscript when assigning associative array"), var->name, w);
+ continue;
+ }
+ else /* No [ind]=value, just a stray `=' */
+ {
+ ind = last_ind;
+ val = w;
+ }
+
+ if (integer_p (var))
+ this_command_name = (char *)NULL; /* no command name for errors */
+ bind_array_var_internal (var, ind, akey, val, iflags);
+ last_ind++;
+ }
+}
+
+/* Perform a compound array assignment: VAR->name=( VALUE ). The
+ VALUE has already had the parentheses stripped. */
+SHELL_VAR *
+assign_array_var_from_string (var, value, flags)
+ SHELL_VAR *var;
+ char *value;
+ int flags;
+{
+ WORD_LIST *nlist;
+
+ if (value == 0)
+ return var;
+
+ nlist = expand_compound_array_assignment (var, value, flags);
+ assign_compound_array_list (var, nlist, flags);
+
+ if (nlist)
+ dispose_words (nlist);
+ return (var);
+}
+
+/* Quote globbing chars and characters in $IFS before the `=' in an assignment
+ statement (usually a compound array assignment) to protect them from
+ unwanted filename expansion or word splitting. */
+static char *
+quote_assign (string)
+ const char *string;
+{
+ size_t slen;
+ int saw_eq;
+ char *temp, *t, *subs;
+ const char *s, *send;
+ int ss, se;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+ send = string + slen;
+
+ t = temp = (char *)xmalloc (slen * 2 + 1);
+ saw_eq = 0;
+ for (s = string; *s; )
+ {
+ if (*s == '=')
+ saw_eq = 1;
+ if (saw_eq == 0 && *s == '[') /* looks like a subscript */
+ {
+ ss = s - string;
+ se = skipsubscript (string, ss, 0);
+ subs = substring (s, ss, se);
+ *t++ = '\\';
+ strcpy (t, subs);
+ t += se - ss;
+ *t++ = '\\';
+ *t++ = ']';
+ s += se + 1;
+ free (subs);
+ continue;
+ }
+ if (saw_eq == 0 && (glob_char_p (s) || isifs (*s)))
+ *t++ = '\\';
+
+ COPY_CHAR_P (t, s, send);
+ }
+ *t = '\0';
+ return temp;
+}
+
+/* For each word in a compound array assignment, if the word looks like
+ [ind]=value, quote globbing chars and characters in $IFS before the `='. */
+static void
+quote_array_assignment_chars (list)
+ WORD_LIST *list;
+{
+ char *nword;
+ WORD_LIST *l;
+
+ for (l = list; l; l = l->next)
+ {
+ if (l->word == 0 || l->word->word == 0 || l->word->word[0] == '\0')
+ continue; /* should not happen, but just in case... */
+ /* Don't bother if it doesn't look like [ind]=value */
+ if (l->word->word[0] != '[' || mbschr (l->word->word, '=') == 0) /* ] */
+ continue;
+ nword = quote_assign (l->word->word);
+ free (l->word->word);
+ l->word->word = nword;
+ }
+}
+
+/* skipsubscript moved to subst.c to use private functions. 2009/02/24. */
+
+/* This function is called with SUB pointing to just after the beginning
+ `[' of an array subscript and removes the array element to which SUB
+ expands from array VAR. A subscript of `*' or `@' unsets the array. */
+int
+unbind_array_element (var, sub)
+ SHELL_VAR *var;
+ char *sub;
+{
+ int len;
+ arrayind_t ind;
+ char *akey;
+ ARRAY_ELEMENT *ae;
+
+ len = skipsubscript (sub, 0, 0);
+ if (sub[len] != ']' || len == 0)
+ {
+ builtin_error ("%s[%s: %s", var->name, sub, _(bash_badsub_errmsg));
+ return -1;
+ }
+ sub[len] = '\0';
+
+ if (ALL_ELEMENT_SUB (sub[0]) && sub[1] == 0)
+ {
+ unbind_variable (var->name);
+ return (0);
+ }
+
+ if (assoc_p (var))
+ {
+ akey = expand_assignment_string_to_string (sub, 0); /* [ */
+ if (akey == 0 || *akey == 0)
+ {
+ builtin_error ("[%s]: %s", sub, _(bash_badsub_errmsg));
+ return -1;
+ }
+ assoc_remove (assoc_cell (var), akey);
+ }
+ else
+ {
+ ind = array_expand_index (sub, len+1);
+ if (ind < 0)
+ {
+ builtin_error ("[%s]: %s", sub, _(bash_badsub_errmsg));
+ return -1;
+ }
+ ae = array_remove (array_cell (var), ind);
+ if (ae)
+ array_dispose_element (ae);
+ }
+
+ return 0;
+}
+
+/* Format and output an array assignment in compound form VAR=(VALUES),
+ suitable for re-use as input. */
+void
+print_array_assignment (var, quoted)
+ SHELL_VAR *var;
+ int quoted;
+{
+ char *vstr;
+
+ vstr = array_to_assign (array_cell (var), quoted);
+
+ if (vstr == 0)
+ printf ("%s=%s\n", var->name, quoted ? "'()'" : "()");
+ else
+ {
+ printf ("%s=%s\n", var->name, vstr);
+ free (vstr);
+ }
+}
+
+/* Format and output an associative array assignment in compound form
+ VAR=(VALUES), suitable for re-use as input. */
+void
+print_assoc_assignment (var, quoted)
+ SHELL_VAR *var;
+ int quoted;
+{
+ char *vstr;
+
+ vstr = assoc_to_assign (assoc_cell (var), quoted);
+
+ if (vstr == 0)
+ printf ("%s=%s\n", var->name, quoted ? "'()'" : "()");
+ else
+ {
+ printf ("%s=%s\n", var->name, vstr);
+ free (vstr);
+ }
+}
+
+/***********************************************************************/
+/* */
+/* Utility functions to manage arrays and their contents for expansion */
+/* */
+/***********************************************************************/
+
+/* Return 1 if NAME is a properly-formed array reference v[sub]. */
+int
+valid_array_reference (name)
+ char *name;
+{
+ char *t;
+ int r, len;
+
+ t = mbschr (name, '['); /* ] */
+ if (t)
+ {
+ *t = '\0';
+ r = legal_identifier (name);
+ *t = '[';
+ if (r == 0)
+ return 0;
+ /* Check for a properly-terminated non-blank subscript. */
+ len = skipsubscript (t, 0, 0);
+ if (t[len] != ']' || len == 1)
+ return 0;
+ for (r = 1; r < len; r++)
+ if (whitespace (t[r]) == 0)
+ return 1;
+ return 0;
+ }
+ return 0;
+}
+
+/* Expand the array index beginning at S and extending LEN characters. */
+arrayind_t
+array_expand_index (s, len)
+ char *s;
+ int len;
+{
+ char *exp, *t;
+ int expok;
+ arrayind_t val;
+
+ exp = (char *)xmalloc (len);
+ strncpy (exp, s, len - 1);
+ exp[len - 1] = '\0';
+ t = expand_arith_string (exp, 0);
+ this_command_name = (char *)NULL;
+ val = evalexp (t, &expok);
+ free (t);
+ free (exp);
+ if (expok == 0)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+
+ top_level_cleanup ();
+ jump_to_top_level (DISCARD);
+ }
+ return val;
+}
+
+/* Return the name of the variable specified by S without any subscript.
+ If SUBP is non-null, return a pointer to the start of the subscript
+ in *SUBP. If LENP is non-null, the length of the subscript is returned
+ in *LENP. This returns newly-allocated memory. */
+char *
+array_variable_name (s, subp, lenp)
+ char *s, **subp;
+ int *lenp;
+{
+ char *t, *ret;
+ int ind, ni;
+
+ t = mbschr (s, '[');
+ if (t == 0)
+ {
+ if (subp)
+ *subp = t;
+ if (lenp)
+ *lenp = 0;
+ return ((char *)NULL);
+ }
+ ind = t - s;
+ ni = skipsubscript (s, ind, 0);
+ if (ni <= ind + 1 || s[ni] != ']')
+ {
+ err_badarraysub (s);
+ if (subp)
+ *subp = t;
+ if (lenp)
+ *lenp = 0;
+ return ((char *)NULL);
+ }
+
+ *t = '\0';
+ ret = savestring (s);
+ *t++ = '['; /* ] */
+
+ if (subp)
+ *subp = t;
+ if (lenp)
+ *lenp = ni - ind;
+
+ return ret;
+}
+
+/* Return the variable specified by S without any subscript. If SUBP is
+ non-null, return a pointer to the start of the subscript in *SUBP.
+ If LENP is non-null, the length of the subscript is returned in *LENP. */
+SHELL_VAR *
+array_variable_part (s, subp, lenp)
+ char *s, **subp;
+ int *lenp;
+{
+ char *t;
+ SHELL_VAR *var;
+
+ t = array_variable_name (s, subp, lenp);
+ if (t == 0)
+ return ((SHELL_VAR *)NULL);
+ var = find_variable (t);
+
+ free (t);
+ return (var == 0 || invisible_p (var)) ? (SHELL_VAR *)0 : var;
+}
+
+/* Return a string containing the elements in the array and subscript
+ described by S. If the subscript is * or @, obeys quoting rules akin
+ to the expansion of $* and $@ including double quoting. If RTYPE
+ is non-null it gets 1 if the array reference is name[*], 2 if the
+ reference is name[@], and 0 otherwise. */
+static char *
+array_value_internal (s, quoted, allow_all, rtype)
+ char *s;
+ int quoted, allow_all, *rtype;
+{
+ int len;
+ arrayind_t ind;
+ char *akey;
+ char *retval, *t, *temp;
+ WORD_LIST *l;
+ SHELL_VAR *var;
+
+ var = array_variable_part (s, &t, &len);
+
+ /* Expand the index, even if the variable doesn't exist, in case side
+ effects are needed, like ${w[i++]} where w is unset. */
+#if 0
+ if (var == 0)
+ return (char *)NULL;
+#endif
+
+ if (len == 0)
+ return ((char *)NULL); /* error message already printed */
+
+ /* [ */
+ if (ALL_ELEMENT_SUB (t[0]) && t[1] == ']')
+ {
+ if (rtype)
+ *rtype = (t[0] == '*') ? 1 : 2;
+ if (allow_all == 0)
+ {
+ err_badarraysub (s);
+ return ((char *)NULL);
+ }
+ else if (var == 0 || value_cell (var) == 0)
+ return ((char *)NULL);
+ else if (array_p (var) == 0 && assoc_p (var) == 0)
+ l = add_string_to_list (value_cell (var), (WORD_LIST *)NULL);
+ else if (assoc_p (var))
+ {
+ l = assoc_to_word_list (assoc_cell (var));
+ if (l == (WORD_LIST *)NULL)
+ return ((char *)NULL);
+ }
+ else
+ {
+ l = array_to_word_list (array_cell (var));
+ if (l == (WORD_LIST *)NULL)
+ return ((char *) NULL);
+ }
+
+ if (t[0] == '*' && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ {
+ temp = string_list_dollar_star (l);
+ retval = quote_string (temp);
+ free (temp);
+ }
+ else /* ${name[@]} or unquoted ${name[*]} */
+ retval = string_list_dollar_at (l, quoted);
+
+ dispose_words (l);
+ }
+ else
+ {
+ if (rtype)
+ *rtype = 0;
+ if (var == 0 || array_p (var) || assoc_p (var) == 0)
+ {
+ ind = array_expand_index (t, len);
+ if (ind < 0)
+ {
+index_error:
+ if (var)
+ err_badarraysub (var->name);
+ else
+ {
+ t[-1] = '\0';
+ err_badarraysub (s);
+ t[-1] = '['; /* ] */
+ }
+ return ((char *)NULL);
+ }
+ }
+ else if (assoc_p (var))
+ {
+ t[len - 1] = '\0';
+ akey = expand_assignment_string_to_string (t, 0); /* [ */
+ t[len - 1] = ']';
+ if (akey == 0 || *akey == 0)
+ goto index_error;
+ }
+
+ if (var == 0)
+ return ((char *)NULL);
+ if (array_p (var) == 0 && assoc_p (var) == 0)
+ return (ind == 0 ? value_cell (var) : (char *)NULL);
+ else if (assoc_p (var))
+ retval = assoc_reference (assoc_cell (var), akey);
+ else
+ retval = array_reference (array_cell (var), ind);
+ }
+
+ return retval;
+}
+
+/* Return a string containing the elements described by the array and
+ subscript contained in S, obeying quoting for subscripts * and @. */
+char *
+array_value (s, quoted, rtype)
+ char *s;
+ int quoted, *rtype;
+{
+ return (array_value_internal (s, quoted, 1, rtype));
+}
+
+/* Return the value of the array indexing expression S as a single string.
+ If ALLOW_ALL is 0, do not allow `@' and `*' subscripts. This is used
+ by other parts of the shell such as the arithmetic expression evaluator
+ in expr.c. */
+char *
+get_array_value (s, allow_all, rtype)
+ char *s;
+ int allow_all, *rtype;
+{
+ return (array_value_internal (s, 0, allow_all, rtype));
+}
+
+char *
+array_keys (s, quoted)
+ char *s;
+ int quoted;
+{
+ int len;
+ char *retval, *t, *temp;
+ WORD_LIST *l;
+ SHELL_VAR *var;
+
+ var = array_variable_part (s, &t, &len);
+
+ /* [ */
+ if (var == 0 || ALL_ELEMENT_SUB (t[0]) == 0 || t[1] != ']')
+ return (char *)NULL;
+
+ if (array_p (var) == 0 && assoc_p (var) == 0)
+ l = add_string_to_list ("0", (WORD_LIST *)NULL);
+ else if (assoc_p (var))
+ l = assoc_keys_to_word_list (assoc_cell (var));
+ else
+ l = array_keys_to_word_list (array_cell (var));
+ if (l == (WORD_LIST *)NULL)
+ return ((char *) NULL);
+
+ if (t[0] == '*' && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ {
+ temp = string_list_dollar_star (l);
+ retval = quote_string (temp);
+ free (temp);
+ }
+ else /* ${!name[@]} or unquoted ${!name[*]} */
+ retval = string_list_dollar_at (l, quoted);
+
+ dispose_words (l);
+ return retval;
+}
+#endif /* ARRAY_VARS */
diff --git a/arrayfunc.h b/arrayfunc.h
new file mode 100644
index 0000000..c12fc99
--- /dev/null
+++ b/arrayfunc.h
@@ -0,0 +1,64 @@
+/* arrayfunc.h -- declarations for miscellaneous array functions in arrayfunc.c */
+
+/* Copyright (C) 2001-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_ARRAYFUNC_H_)
+#define _ARRAYFUNC_H_
+
+/* Must include variables.h before including this file. */
+
+#if defined (ARRAY_VARS)
+
+extern SHELL_VAR *convert_var_to_array __P((SHELL_VAR *));
+extern SHELL_VAR *convert_var_to_assoc __P((SHELL_VAR *));
+
+extern SHELL_VAR *bind_array_variable __P((char *, arrayind_t, char *, int));
+extern SHELL_VAR *bind_array_element __P((SHELL_VAR *, arrayind_t, char *, int));
+extern SHELL_VAR *assign_array_element __P((char *, char *, int));
+
+extern SHELL_VAR *bind_assoc_variable __P((SHELL_VAR *, char *, char *, char *, int));
+
+extern SHELL_VAR *find_or_make_array_variable __P((char *, int));
+
+extern SHELL_VAR *assign_array_from_string __P((char *, char *, int));
+extern SHELL_VAR *assign_array_var_from_word_list __P((SHELL_VAR *, WORD_LIST *, int));
+
+extern WORD_LIST *expand_compound_array_assignment __P((SHELL_VAR *, char *, int));
+extern void assign_compound_array_list __P((SHELL_VAR *, WORD_LIST *, int));
+extern SHELL_VAR *assign_array_var_from_string __P((SHELL_VAR *, char *, int));
+
+extern int unbind_array_element __P((SHELL_VAR *, char *));
+extern int skipsubscript __P((const char *, int, int));
+
+extern void print_array_assignment __P((SHELL_VAR *, int));
+extern void print_assoc_assignment __P((SHELL_VAR *, int));
+
+extern arrayind_t array_expand_index __P((char *, int));
+extern int valid_array_reference __P((char *));
+extern char *array_value __P((char *, int, int *));
+extern char *get_array_value __P((char *, int, int *));
+
+extern char *array_keys __P((char *, int));
+
+extern char *array_variable_name __P((char *, char **, int *));
+extern SHELL_VAR *array_variable_part __P((char *, char **, int *));
+
+#endif
+
+#endif /* !_ARRAYFUNC_H_ */
diff --git a/assoc.c b/assoc.c
new file mode 100644
index 0000000..bbc7b17
--- /dev/null
+++ b/assoc.c
@@ -0,0 +1,529 @@
+/*
+ * assoc.c - functions to manipulate associative arrays
+ *
+ * Associative arrays are standard shell hash tables.
+ *
+ * Chet Ramey
+ * chet@ins.cwru.edu
+ */
+
+/* Copyright (C) 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#if defined (ARRAY_VARS)
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include "bashansi.h"
+
+#include "shell.h"
+#include "array.h"
+#include "assoc.h"
+#include "builtins/common.h"
+
+static WORD_LIST *assoc_to_word_list_internal __P((HASH_TABLE *, int));
+
+/* assoc_create == hash_create */
+
+void
+assoc_dispose (hash)
+ HASH_TABLE *hash;
+{
+ if (hash)
+ {
+ hash_flush (hash, 0);
+ hash_dispose (hash);
+ }
+}
+
+void
+assoc_flush (hash)
+ HASH_TABLE *hash;
+{
+ hash_flush (hash, 0);
+}
+
+int
+assoc_insert (hash, key, value)
+ HASH_TABLE *hash;
+ char *key;
+ char *value;
+{
+ BUCKET_CONTENTS *b;
+
+ b = hash_search (key, hash, HASH_CREATE);
+ if (b == 0)
+ return -1;
+ FREE (b->data);
+ b->data = value ? savestring (value) : (char *)0;
+ return (0);
+}
+
+void
+assoc_remove (hash, string)
+ HASH_TABLE *hash;
+ char *string;
+{
+ BUCKET_CONTENTS *b;
+
+ b = hash_remove (string, hash, 0);
+ if (b)
+ {
+ free ((char *)b->data);
+ free (b->key);
+ free (b);
+ }
+}
+
+char *
+assoc_reference (hash, string)
+ HASH_TABLE *hash;
+ char *string;
+{
+ BUCKET_CONTENTS *b;
+
+ if (hash == 0)
+ return (char *)0;
+
+ b = hash_search (string, hash, 0);
+ return (b ? (char *)b->data : 0);
+}
+
+/* Quote the data associated with each element of the hash table ASSOC,
+ using quote_string */
+HASH_TABLE *
+assoc_quote (h)
+ HASH_TABLE *h;
+{
+ int i;
+ BUCKET_CONTENTS *tlist;
+ char *t;
+
+ if (h == 0 || assoc_empty (h))
+ return ((HASH_TABLE *)NULL);
+
+ for (i = 0; i < h->nbuckets; i++)
+ for (tlist = hash_items (i, h); tlist; tlist = tlist->next)
+ {
+ t = quote_string ((char *)tlist->data);
+ FREE (tlist->data);
+ tlist->data = t;
+ }
+
+ return h;
+}
+
+/* Quote escape characters in the data associated with each element
+ of the hash table ASSOC, using quote_escapes */
+HASH_TABLE *
+assoc_quote_escapes (h)
+ HASH_TABLE *h;
+{
+ int i;
+ BUCKET_CONTENTS *tlist;
+ char *t;
+
+ if (h == 0 || assoc_empty (h))
+ return ((HASH_TABLE *)NULL);
+
+ for (i = 0; i < h->nbuckets; i++)
+ for (tlist = hash_items (i, h); tlist; tlist = tlist->next)
+ {
+ t = quote_escapes ((char *)tlist->data);
+ FREE (tlist->data);
+ tlist->data = t;
+ }
+
+ return h;
+}
+
+HASH_TABLE *
+assoc_dequote (h)
+ HASH_TABLE *h;
+{
+ int i;
+ BUCKET_CONTENTS *tlist;
+ char *t;
+
+ if (h == 0 || assoc_empty (h))
+ return ((HASH_TABLE *)NULL);
+
+ for (i = 0; i < h->nbuckets; i++)
+ for (tlist = hash_items (i, h); tlist; tlist = tlist->next)
+ {
+ t = dequote_string ((char *)tlist->data);
+ FREE (tlist->data);
+ tlist->data = t;
+ }
+
+ return h;
+}
+
+HASH_TABLE *
+assoc_dequote_escapes (h)
+ HASH_TABLE *h;
+{
+ int i;
+ BUCKET_CONTENTS *tlist;
+ char *t;
+
+ if (h == 0 || assoc_empty (h))
+ return ((HASH_TABLE *)NULL);
+
+ for (i = 0; i < h->nbuckets; i++)
+ for (tlist = hash_items (i, h); tlist; tlist = tlist->next)
+ {
+ t = dequote_escapes ((char *)tlist->data);
+ FREE (tlist->data);
+ tlist->data = t;
+ }
+
+ return h;
+}
+
+HASH_TABLE *
+assoc_remove_quoted_nulls (h)
+ HASH_TABLE *h;
+{
+ int i;
+ BUCKET_CONTENTS *tlist;
+ char *t;
+
+ if (h == 0 || assoc_empty (h))
+ return ((HASH_TABLE *)NULL);
+
+ for (i = 0; i < h->nbuckets; i++)
+ for (tlist = hash_items (i, h); tlist; tlist = tlist->next)
+ {
+ t = remove_quoted_nulls ((char *)tlist->data);
+ tlist->data = t;
+ }
+
+ return h;
+}
+
+/*
+ * Return a string whose elements are the members of array H beginning at
+ * the STARTth element and spanning NELEM members. Null elements are counted.
+ */
+char *
+assoc_subrange (hash, start, nelem, starsub, quoted)
+HASH_TABLE *hash;
+arrayind_t start, nelem;
+int starsub, quoted;
+{
+ WORD_LIST *l, *save, *h, *t;
+ int i, j;
+ char *ret;
+
+ if (assoc_empty (hash))
+ return ((char *)NULL);
+
+ save = l = assoc_to_word_list (hash);
+ if (save == 0)
+ return ((char *)NULL);
+
+ for (i = 1; l && i < start; i++)
+ l = l->next;
+ if (l == 0)
+ return ((char *)NULL);
+ for (j = 0,h = t = l; l && j < nelem; j++)
+ {
+ t = l;
+ l = l->next;
+ }
+
+ t->next = (WORD_LIST *)NULL;
+
+ ret = string_list_pos_params (starsub ? '*' : '@', h, quoted);
+
+ if (t != l)
+ t->next = l;
+
+ dispose_words (save);
+ return (ret);
+
+}
+
+char *
+assoc_patsub (h, pat, rep, mflags)
+ HASH_TABLE *h;
+ char *pat, *rep;
+ int mflags;
+{
+ BUCKET_CONTENTS *tlist;
+ int i, slen;
+ HASH_TABLE *h2;
+ char *t, *sifs, *ifs;
+
+ if (h == 0 || assoc_empty (h))
+ return ((char *)NULL);
+
+ h2 = assoc_copy (h);
+ for (i = 0; i < h2->nbuckets; i++)
+ for (tlist = hash_items (i, h2); tlist; tlist = tlist->next)
+ {
+ t = pat_subst ((char *)tlist->data, pat, rep, mflags);
+ FREE (tlist->data);
+ tlist->data = t;
+ }
+
+ if (mflags & MATCH_QUOTED)
+ assoc_quote (h2);
+ else
+ assoc_quote_escapes (h2);
+
+ if (mflags & MATCH_STARSUB)
+ {
+ assoc_remove_quoted_nulls (h2);
+ sifs = ifs_firstchar ((int *)NULL);
+ t = assoc_to_string (h2, sifs, 0);
+ free (sifs);
+ }
+ else if (mflags & MATCH_QUOTED)
+ {
+ /* ${array[@]} */
+ sifs = ifs_firstchar (&slen);
+ ifs = getifs ();
+ if (ifs == 0 || *ifs == 0)
+ {
+ if (slen < 2)
+ sifs = xrealloc (sifs, 2);
+ sifs[0] = ' ';
+ sifs[1] = '\0';
+ }
+ t = assoc_to_string (h2, sifs, 0);
+ free(sifs);
+ }
+ else
+ t = assoc_to_string (h2, " ", 0);
+
+ assoc_dispose (h2);
+
+ return t;
+}
+
+char *
+assoc_modcase (h, pat, modop, mflags)
+ HASH_TABLE *h;
+ char *pat;
+ int modop;
+ int mflags;
+{
+ BUCKET_CONTENTS *tlist;
+ int i, slen;
+ HASH_TABLE *h2;
+ char *t, *sifs, *ifs;
+
+ if (h == 0 || assoc_empty (h))
+ return ((char *)NULL);
+
+ h2 = assoc_copy (h);
+ for (i = 0; i < h2->nbuckets; i++)
+ for (tlist = hash_items (i, h2); tlist; tlist = tlist->next)
+ {
+ t = sh_modcase ((char *)tlist->data, pat, modop);
+ FREE (tlist->data);
+ tlist->data = t;
+ }
+
+ if (mflags & MATCH_QUOTED)
+ assoc_quote (h2);
+ else
+ assoc_quote_escapes (h2);
+
+ if (mflags & MATCH_STARSUB)
+ {
+ assoc_remove_quoted_nulls (h2);
+ sifs = ifs_firstchar ((int *)NULL);
+ t = assoc_to_string (h2, sifs, 0);
+ free (sifs);
+ }
+ else if (mflags & MATCH_QUOTED)
+ {
+ /* ${array[@]} */
+ sifs = ifs_firstchar (&slen);
+ ifs = getifs ();
+ if (ifs == 0 || *ifs == 0)
+ {
+ if (slen < 2)
+ sifs = xrealloc (sifs, 2);
+ sifs[0] = ' ';
+ sifs[1] = '\0';
+ }
+ t = assoc_to_string (h2, sifs, 0);
+ free(sifs);
+ }
+ else
+ t = assoc_to_string (h2, " ", 0);
+
+ assoc_dispose (h2);
+
+ return t;
+}
+
+char *
+assoc_to_assign (hash, quoted)
+ HASH_TABLE *hash;
+ int quoted;
+{
+ char *ret;
+ char *istr, *vstr;
+ int i, rsize, rlen, elen;
+ BUCKET_CONTENTS *tlist;
+
+ if (hash == 0 || assoc_empty (hash))
+ return (char *)0;
+
+ ret = xmalloc (rsize = 128);
+ ret[0] = '(';
+ rlen = 1;
+
+ for (i = 0; i < hash->nbuckets; i++)
+ for (tlist = hash_items (i, hash); tlist; tlist = tlist->next)
+ {
+#if 1
+ if (sh_contains_shell_metas (tlist->key))
+ istr = sh_double_quote (tlist->key);
+ else
+ istr = tlist->key;
+#else
+ istr = tlist->key;
+#endif
+ vstr = tlist->data ? sh_double_quote ((char *)tlist->data) : (char *)0;
+
+ elen = STRLEN (istr) + 8 + STRLEN (vstr);
+ RESIZE_MALLOCED_BUFFER (ret, rlen, (elen+1), rsize, rsize);
+
+ ret[rlen++] = '[';
+ strcpy (ret+rlen, istr);
+ rlen += STRLEN (istr);
+ ret[rlen++] = ']';
+ ret[rlen++] = '=';
+ if (vstr)
+ {
+ strcpy (ret + rlen, vstr);
+ rlen += STRLEN (vstr);
+ }
+ ret[rlen++] = ' ';
+
+
+ if (istr != tlist->key)
+ FREE (istr);
+
+ FREE (vstr);
+ }
+
+ RESIZE_MALLOCED_BUFFER (ret, rlen, 1, rsize, 8);
+ ret[rlen++] = ')';
+ ret[rlen] = '\0';
+
+ if (quoted)
+ {
+ vstr = sh_single_quote (ret);
+ free (ret);
+ ret = vstr;
+ }
+
+ return ret;
+}
+
+static WORD_LIST *
+assoc_to_word_list_internal (h, t)
+ HASH_TABLE *h;
+ int t;
+{
+ WORD_LIST *list;
+ int i;
+ BUCKET_CONTENTS *tlist;
+ char *w;
+
+ if (h == 0 || assoc_empty (h))
+ return((WORD_LIST *)NULL);
+ list = (WORD_LIST *)NULL;
+
+ for (i = 0; i < h->nbuckets; i++)
+ for (tlist = hash_items (i, h); tlist; tlist = tlist->next)
+ {
+ w = (t == 0) ? (char *)tlist->data : (char *)tlist->key;
+ list = make_word_list (make_bare_word(w), list);
+ }
+ return (REVERSE_LIST(list, WORD_LIST *));
+}
+
+WORD_LIST *
+assoc_to_word_list (h)
+ HASH_TABLE *h;
+{
+ return (assoc_to_word_list_internal (h, 0));
+}
+
+WORD_LIST *
+assoc_keys_to_word_list (h)
+ HASH_TABLE *h;
+{
+ return (assoc_to_word_list_internal (h, 1));
+}
+
+char *
+assoc_to_string (h, sep, quoted)
+ HASH_TABLE *h;
+ char *sep;
+ int quoted;
+{
+ BUCKET_CONTENTS *tlist;
+ int i;
+ char *result, *t, *w;
+ WORD_LIST *list, *l;
+
+ if (h == 0)
+ return ((char *)NULL);
+ if (assoc_empty (h))
+ return (savestring (""));
+
+ result = NULL;
+ list = NULL;
+ /* This might be better implemented directly, but it's simple to implement
+ by converting to a word list first, possibly quoting the data, then
+ using list_string */
+ for (i = 0; i < h->nbuckets; i++)
+ for (tlist = hash_items (i, h); tlist; tlist = tlist->next)
+ {
+ w = (char *)tlist->data;
+ if (w == 0)
+ continue;
+ t = quoted ? quote_string (w) : savestring (w);
+ list = make_word_list (make_bare_word(t), list);
+ FREE (t);
+ }
+
+ l = REVERSE_LIST(list, WORD_LIST *);
+
+ result = l ? string_list_internal (l, sep) : savestring ("");
+ return result;
+}
+
+#endif /* ARRAY_VARS */
diff --git a/assoc.h b/assoc.h
new file mode 100644
index 0000000..1ec1f6b
--- /dev/null
+++ b/assoc.h
@@ -0,0 +1,61 @@
+/* assoc.h -- definitions for the interface exported by assoc.c that allows
+ the rest of the shell to manipulate associative array variables. */
+
+/* Copyright (C) 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _ASSOC_H_
+#define _ASSOC_H_
+
+#include "stdc.h"
+#include "hashlib.h"
+
+#define assoc_empty(h) ((h)->nentries == 0)
+#define assoc_num_elements(h) ((h)->nentries)
+
+#define assoc_create(n) (hash_create((n)))
+
+#define assoc_copy(h) (hash_copy((h), 0))
+
+#define assoc_walk(h, f) (hash_walk((h), (f))
+
+extern void assoc_dispose __P((HASH_TABLE *));
+extern void assoc_flush __P((HASH_TABLE *));
+
+extern int assoc_insert __P((HASH_TABLE *, char *, char *));
+extern void assoc_remove __P((HASH_TABLE *, char *));
+
+extern char *assoc_reference __P((HASH_TABLE *, char *));
+
+extern char *assoc_subrange __P((HASH_TABLE *, arrayind_t, arrayind_t, int, int));
+extern char *assoc_patsub __P((HASH_TABLE *, char *, char *, int));
+extern char *assoc_modcase __P((HASH_TABLE *, char *, int, int));
+
+extern HASH_TABLE *assoc_quote __P((HASH_TABLE *));
+extern HASH_TABLE *assoc_quote_escapes __P((HASH_TABLE *));
+extern HASH_TABLE *assoc_dequote __P((HASH_TABLE *));
+extern HASH_TABLE *assoc_dequote_escapes __P((HASH_TABLE *));
+extern HASH_TABLE *assoc_remove_quoted_nulls __P((HASH_TABLE *));
+
+extern char *assoc_to_assign __P((HASH_TABLE *, int));
+
+extern WORD_LIST *assoc_to_word_list __P((HASH_TABLE *));
+extern WORD_LIST *assoc_keys_to_word_list __P((HASH_TABLE *));
+
+extern char *assoc_to_string __P((HASH_TABLE *, char *, int));
+#endif /* _ASSOC_H_ */
diff --git a/bashansi.h b/bashansi.h
new file mode 100644
index 0000000..2c33937
--- /dev/null
+++ b/bashansi.h
@@ -0,0 +1,41 @@
+/* bashansi.h -- Typically included information required by picky compilers. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_BASHANSI_H_)
+#define _BASHANSI_H_
+
+#if defined (HAVE_STRING_H)
+# if ! defined (STDC_HEADERS) && defined (HAVE_MEMORY_H)
+# include <memory.h>
+# endif
+# include <string.h>
+#endif /* !HAVE_STRING_H */
+
+#if defined (HAVE_STRINGS_H)
+# include <strings.h>
+#endif /* !HAVE_STRINGS_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* !HAVE_STDLIB_H */
+
+#endif /* !_BASHANSI_H_ */
diff --git a/bashhist.c b/bashhist.c
new file mode 100644
index 0000000..a80968f
--- /dev/null
+++ b/bashhist.c
@@ -0,0 +1,898 @@
+/* bashhist.c -- bash interface to the GNU history library. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#if defined (HISTORY)
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "bashtypes.h"
+#include <stdio.h>
+#include <errno.h>
+#include "bashansi.h"
+#include "posixstat.h"
+#include "filecntl.h"
+
+#include "bashintl.h"
+
+#if defined (SYSLOG_HISTORY)
+# include <syslog.h>
+#endif
+
+#include "shell.h"
+#include "flags.h"
+#include "input.h"
+#include "parser.h" /* for the struct dstack stuff. */
+#include "pathexp.h" /* for the struct ignorevar stuff */
+#include "bashhist.h" /* matching prototypes and declarations */
+#include "builtins/common.h"
+
+#include <readline/history.h>
+#include <glob/glob.h>
+#include <glob/strmatch.h>
+
+#if defined (READLINE)
+# include "bashline.h"
+extern int rl_done, rl_dispatching; /* should really include readline.h */
+#endif
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+static int histignore_item_func __P((struct ign *));
+static int check_history_control __P((char *));
+static void hc_erasedups __P((char *));
+static void really_add_history __P((char *));
+
+static struct ignorevar histignore =
+{
+ "HISTIGNORE",
+ (struct ign *)0,
+ 0,
+ (char *)0,
+ (sh_iv_item_func_t *)histignore_item_func,
+};
+
+#define HIGN_EXPAND 0x01
+
+/* Declarations of bash history variables. */
+/* Non-zero means to remember lines typed to the shell on the history
+ list. This is different than the user-controlled behaviour; this
+ becomes zero when we read lines from a file, for example. */
+int remember_on_history = 1;
+int enable_history_list = 1; /* value for `set -o history' */
+
+/* The number of lines that Bash has added to this history session. The
+ difference between the number of the top element in the history list
+ (offset from history_base) and the number of lines in the history file.
+ Appending this session's history to the history file resets this to 0. */
+int history_lines_this_session;
+
+/* The number of lines that Bash has read from the history file. */
+int history_lines_in_file;
+
+#if defined (BANG_HISTORY)
+/* Non-zero means do no history expansion on this line, regardless
+ of what history_expansion says. */
+int history_expansion_inhibited;
+#endif
+
+/* With the old default, every line was saved in the history individually.
+ I.e., if the user enters:
+ bash$ for i in a b c
+ > do
+ > echo $i
+ > done
+ Each line will be individually saved in the history.
+ bash$ history
+ 10 for i in a b c
+ 11 do
+ 12 echo $i
+ 13 done
+ 14 history
+ If the variable command_oriented_history is set, multiple lines
+ which form one command will be saved as one history entry.
+ bash$ for i in a b c
+ > do
+ > echo $i
+ > done
+ bash$ history
+ 10 for i in a b c
+ do
+ echo $i
+ done
+ 11 history
+ The user can then recall the whole command all at once instead
+ of just being able to recall one line at a time.
+
+ This is now enabled by default.
+ */
+int command_oriented_history = 1;
+
+/* Set to 1 if the first line of a possibly-multi-line command was saved
+ in the history list. Managed by maybe_add_history(), but global so
+ the history-manipluating builtins can see it. */
+int current_command_first_line_saved = 0;
+
+/* Non-zero means to store newlines in the history list when using
+ command_oriented_history rather than trying to use semicolons. */
+int literal_history;
+
+/* Non-zero means to append the history to the history file at shell
+ exit, even if the history has been stifled. */
+int force_append_history;
+
+/* A nit for picking at history saving. Flags have the following values:
+
+ Value == 0 means save all lines parsed by the shell on the history.
+ Value & HC_IGNSPACE means save all lines that do not start with a space.
+ Value & HC_IGNDUPS means save all lines that do not match the last
+ line saved.
+ Value & HC_ERASEDUPS means to remove all other matching lines from the
+ history list before saving the latest line. */
+int history_control;
+
+/* Set to 1 if the last command was added to the history list successfully
+ as a separate history entry; set to 0 if the line was ignored or added
+ to a previous entry as part of command-oriented-history processing. */
+int hist_last_line_added;
+
+/* Set to 1 if builtins/history.def:push_history added the last history
+ entry. */
+int hist_last_line_pushed;
+
+#if defined (READLINE)
+/* If non-zero, and readline is being used, the user is offered the
+ chance to re-edit a failed history expansion. */
+int history_reediting;
+
+/* If non-zero, and readline is being used, don't directly execute a
+ line with history substitution. Reload it into the editing buffer
+ instead and let the user further edit and confirm with a newline. */
+int hist_verify;
+
+#endif /* READLINE */
+
+/* Non-zero means to not save function definitions in the history list. */
+int dont_save_function_defs;
+
+/* Variables declared in other files used here. */
+extern int current_command_line_count;
+
+extern struct dstack dstack;
+
+static int bash_history_inhibit_expansion __P((char *, int));
+#if defined (READLINE)
+static void re_edit __P((char *));
+#endif
+static int history_expansion_p __P((char *));
+static int shell_comment __P((char *));
+static int should_expand __P((char *));
+static HIST_ENTRY *last_history_entry __P((void));
+static char *expand_histignore_pattern __P((char *));
+static int history_should_ignore __P((char *));
+
+/* Is the history expansion starting at string[i] one that should not
+ be expanded? */
+static int
+bash_history_inhibit_expansion (string, i)
+ char *string;
+ int i;
+{
+ /* The shell uses ! as a pattern negation character in globbing [...]
+ expressions, so let those pass without expansion. */
+ if (i > 0 && (string[i - 1] == '[') && member (']', string + i + 1))
+ return (1);
+ /* The shell uses ! as the indirect expansion character, so let those
+ expansions pass as well. */
+ else if (i > 1 && string[i - 1] == '{' && string[i - 2] == '$' &&
+ member ('}', string + i + 1))
+ return (1);
+#if defined (EXTENDED_GLOB)
+ else if (extended_glob && i > 1 && string[i+1] == '(' && member (')', string + i + 2))
+ return (1);
+#endif
+ else
+ return (0);
+}
+
+void
+bash_initialize_history ()
+{
+ history_quotes_inhibit_expansion = 1;
+ history_search_delimiter_chars = ";&()|<>";
+ history_inhibit_expansion_function = bash_history_inhibit_expansion;
+#if defined (BANG_HISTORY)
+ sv_histchars ("histchars");
+#endif
+}
+
+void
+bash_history_reinit (interact)
+ int interact;
+{
+#if defined (BANG_HISTORY)
+ history_expansion = interact != 0;
+ history_expansion_inhibited = 1;
+#endif
+ remember_on_history = enable_history_list = interact != 0;
+ history_inhibit_expansion_function = bash_history_inhibit_expansion;
+}
+
+void
+bash_history_disable ()
+{
+ remember_on_history = 0;
+#if defined (BANG_HISTORY)
+ history_expansion_inhibited = 1;
+#endif
+}
+
+void
+bash_history_enable ()
+{
+ remember_on_history = 1;
+#if defined (BANG_HISTORY)
+ history_expansion_inhibited = 0;
+#endif
+ history_inhibit_expansion_function = bash_history_inhibit_expansion;
+ sv_history_control ("HISTCONTROL");
+ sv_histignore ("HISTIGNORE");
+}
+
+/* Load the history list from the history file. */
+void
+load_history ()
+{
+ char *hf;
+
+ /* Truncate history file for interactive shells which desire it.
+ Note that the history file is automatically truncated to the
+ size of HISTSIZE if the user does not explicitly set the size
+ differently. */
+ set_if_not ("HISTSIZE", "500");
+ sv_histsize ("HISTSIZE");
+
+ set_if_not ("HISTFILESIZE", get_string_value ("HISTSIZE"));
+ sv_histsize ("HISTFILESIZE");
+
+ /* Read the history in HISTFILE into the history list. */
+ hf = get_string_value ("HISTFILE");
+
+ if (hf && *hf && file_exists (hf))
+ {
+ read_history (hf);
+ using_history ();
+ history_lines_in_file = where_history ();
+ }
+}
+
+void
+bash_clear_history ()
+{
+ clear_history ();
+ history_lines_this_session = 0;
+}
+
+/* Delete and free the history list entry at offset I. */
+int
+bash_delete_histent (i)
+ int i;
+{
+ HIST_ENTRY *discard;
+
+ discard = remove_history (i);
+ if (discard)
+ free_history_entry (discard);
+ history_lines_this_session--;
+
+ return 1;
+}
+
+int
+bash_delete_last_history ()
+{
+ register int i;
+ HIST_ENTRY **hlist, *histent;
+ int r;
+
+ hlist = history_list ();
+ if (hlist == NULL)
+ return 0;
+
+ for (i = 0; hlist[i]; i++)
+ ;
+ i--;
+
+ /* History_get () takes a parameter that must be offset by history_base. */
+ histent = history_get (history_base + i); /* Don't free this */
+ if (histent == NULL)
+ return 0;
+
+ r = bash_delete_histent (i);
+
+ if (where_history () > history_length)
+ history_set_pos (history_length);
+
+ return r;
+}
+
+#ifdef INCLUDE_UNUSED
+/* Write the existing history out to the history file. */
+void
+save_history ()
+{
+ char *hf;
+
+ hf = get_string_value ("HISTFILE");
+ if (hf && *hf && file_exists (hf))
+ {
+ /* Append only the lines that occurred this session to
+ the history file. */
+ using_history ();
+
+ if (history_lines_this_session < where_history () || force_append_history)
+ append_history (history_lines_this_session, hf);
+ else
+ write_history (hf);
+ sv_histsize ("HISTFILESIZE");
+ }
+}
+#endif
+
+int
+maybe_append_history (filename)
+ char *filename;
+{
+ int fd, result;
+ struct stat buf;
+
+ result = EXECUTION_SUCCESS;
+ if (history_lines_this_session && (history_lines_this_session < where_history ()))
+ {
+ /* If the filename was supplied, then create it if necessary. */
+ if (stat (filename, &buf) == -1 && errno == ENOENT)
+ {
+ fd = open (filename, O_WRONLY|O_CREAT, 0600);
+ if (fd < 0)
+ {
+ builtin_error (_("%s: cannot create: %s"), filename, strerror (errno));
+ return (EXECUTION_FAILURE);
+ }
+ close (fd);
+ }
+ result = append_history (history_lines_this_session, filename);
+ history_lines_in_file += history_lines_this_session;
+ history_lines_this_session = 0;
+ }
+ return (result);
+}
+
+/* If this is an interactive shell, then append the lines executed
+ this session to the history file. */
+int
+maybe_save_shell_history ()
+{
+ int result;
+ char *hf;
+
+ result = 0;
+ if (history_lines_this_session)
+ {
+ hf = get_string_value ("HISTFILE");
+
+ if (hf && *hf)
+ {
+ /* If the file doesn't exist, then create it. */
+ if (file_exists (hf) == 0)
+ {
+ int file;
+ file = open (hf, O_CREAT | O_TRUNC | O_WRONLY, 0600);
+ if (file != -1)
+ close (file);
+ }
+
+ /* Now actually append the lines if the history hasn't been
+ stifled. If the history has been stifled, rewrite the
+ history file. */
+ using_history ();
+ if (history_lines_this_session <= where_history () || force_append_history)
+ {
+ result = append_history (history_lines_this_session, hf);
+ history_lines_in_file += history_lines_this_session;
+ }
+ else
+ {
+ result = write_history (hf);
+ history_lines_in_file = history_lines_this_session;
+ }
+ history_lines_this_session = 0;
+
+ sv_histsize ("HISTFILESIZE");
+ }
+ }
+ return (result);
+}
+
+#if defined (READLINE)
+/* Tell readline () that we have some text for it to edit. */
+static void
+re_edit (text)
+ char *text;
+{
+ if (bash_input.type == st_stdin)
+ bash_re_edit (text);
+}
+#endif /* READLINE */
+
+/* Return 1 if this line needs history expansion. */
+static int
+history_expansion_p (line)
+ char *line;
+{
+ register char *s;
+
+ for (s = line; *s; s++)
+ if (*s == history_expansion_char || *s == history_subst_char)
+ return 1;
+ return 0;
+}
+
+/* Do pre-processing on LINE. If PRINT_CHANGES is non-zero, then
+ print the results of expanding the line if there were any changes.
+ If there is an error, return NULL, otherwise the expanded line is
+ returned. If ADDIT is non-zero the line is added to the history
+ list after history expansion. ADDIT is just a suggestion;
+ REMEMBER_ON_HISTORY can veto, and does.
+ Right now this does history expansion. */
+char *
+pre_process_line (line, print_changes, addit)
+ char *line;
+ int print_changes, addit;
+{
+ char *history_value;
+ char *return_value;
+ int expanded;
+
+ return_value = line;
+ expanded = 0;
+
+# if defined (BANG_HISTORY)
+ /* History expand the line. If this results in no errors, then
+ add that line to the history if ADDIT is non-zero. */
+ if (!history_expansion_inhibited && history_expansion && history_expansion_p (line))
+ {
+ expanded = history_expand (line, &history_value);
+
+ if (expanded)
+ {
+ if (print_changes)
+ {
+ if (expanded < 0)
+ internal_error ("%s", history_value);
+#if defined (READLINE)
+ else if (hist_verify == 0 || expanded == 2)
+#else
+ else
+#endif
+ fprintf (stderr, "%s\n", history_value);
+ }
+
+ /* If there was an error, return NULL. */
+ if (expanded < 0 || expanded == 2) /* 2 == print only */
+ {
+# if defined (READLINE)
+ if (expanded == 2 && rl_dispatching == 0 && *history_value)
+# else
+ if (expanded == 2 && *history_value)
+# endif /* !READLINE */
+ maybe_add_history (history_value);
+
+ free (history_value);
+
+# if defined (READLINE)
+ /* New hack. We can allow the user to edit the
+ failed history expansion. */
+ if (history_reediting && expanded < 0 && rl_done)
+ re_edit (line);
+# endif /* READLINE */
+ return ((char *)NULL);
+ }
+
+# if defined (READLINE)
+ if (hist_verify && expanded == 1)
+ {
+ re_edit (history_value);
+ return ((char *)NULL);
+ }
+# endif
+ }
+
+ /* Let other expansions know that return_value can be free'ed,
+ and that a line has been added to the history list. Note
+ that we only add lines that have something in them. */
+ expanded = 1;
+ return_value = history_value;
+ }
+# endif /* BANG_HISTORY */
+
+ if (addit && remember_on_history && *return_value)
+ maybe_add_history (return_value);
+
+#if 0
+ if (expanded == 0)
+ return_value = savestring (line);
+#endif
+
+ return (return_value);
+}
+
+/* Return 1 if the first non-whitespace character in LINE is a `#', indicating
+ * that the line is a shell comment. */
+static int
+shell_comment (line)
+ char *line;
+{
+ char *p;
+
+ for (p = line; p && *p && whitespace (*p); p++)
+ ;
+ return (p && *p == '#');
+}
+
+#ifdef INCLUDE_UNUSED
+/* Remove shell comments from LINE. A `#' and anything after it is a comment.
+ This isn't really useful yet, since it doesn't handle quoting. */
+static char *
+filter_comments (line)
+ char *line;
+{
+ char *p;
+
+ for (p = line; p && *p && *p != '#'; p++)
+ ;
+ if (p && *p == '#')
+ *p = '\0';
+ return (line);
+}
+#endif
+
+/* Check LINE against what HISTCONTROL says to do. Returns 1 if the line
+ should be saved; 0 if it should be discarded. */
+static int
+check_history_control (line)
+ char *line;
+{
+ HIST_ENTRY *temp;
+ int r;
+
+ if (history_control == 0)
+ return 1;
+
+ /* ignorespace or ignoreboth */
+ if ((history_control & HC_IGNSPACE) && *line == ' ')
+ return 0;
+
+ /* ignoredups or ignoreboth */
+ if (history_control & HC_IGNDUPS)
+ {
+ using_history ();
+ temp = previous_history ();
+
+ r = (temp == 0 || STREQ (temp->line, line) == 0);
+
+ using_history ();
+
+ if (r == 0)
+ return r;
+ }
+
+ return 1;
+}
+
+/* Remove all entries matching LINE from the history list. Triggered when
+ HISTCONTROL includes `erasedups'. */
+static void
+hc_erasedups (line)
+ char *line;
+{
+ HIST_ENTRY *temp;
+ int r;
+
+ using_history ();
+ while (temp = previous_history ())
+ {
+ if (STREQ (temp->line, line))
+ {
+ r = where_history ();
+ remove_history (r);
+ }
+ }
+ using_history ();
+}
+
+/* Add LINE to the history list, handling possibly multi-line compound
+ commands. We note whether or not we save the first line of each command
+ (which is usually the entire command and history entry), and don't add
+ the second and subsequent lines of a multi-line compound command if we
+ didn't save the first line. We don't usually save shell comment lines in
+ compound commands in the history, because they could have the effect of
+ commenting out the rest of the command when the entire command is saved as
+ a single history entry (when COMMAND_ORIENTED_HISTORY is enabled). If
+ LITERAL_HISTORY is set, we're saving lines in the history with embedded
+ newlines, so it's OK to save comment lines. We also make sure to save
+ multiple-line quoted strings or other constructs. */
+void
+maybe_add_history (line)
+ char *line;
+{
+ hist_last_line_added = 0;
+
+ /* Don't use the value of history_control to affect the second
+ and subsequent lines of a multi-line command (old code did
+ this only when command_oriented_history is enabled). */
+ if (current_command_line_count > 1)
+ {
+ if (current_command_first_line_saved &&
+ (literal_history || dstack.delimiter_depth != 0 || shell_comment (line) == 0))
+ bash_add_history (line);
+ return;
+ }
+
+ /* This is the first line of a (possible multi-line) command. Note whether
+ or not we should save the first line and remember it. */
+ current_command_first_line_saved = check_add_history (line, 0);
+}
+
+/* Just check LINE against HISTCONTROL and HISTIGNORE and add it to the
+ history if it's OK. Used by `history -s' as well as maybe_add_history().
+ Returns 1 if the line was saved in the history, 0 otherwise. */
+int
+check_add_history (line, force)
+ char *line;
+ int force;
+{
+ if (check_history_control (line) && history_should_ignore (line) == 0)
+ {
+ /* We're committed to saving the line. If the user has requested it,
+ remove other matching lines from the history. */
+ if (history_control & HC_ERASEDUPS)
+ hc_erasedups (line);
+
+ if (force)
+ {
+ really_add_history (line);
+ using_history ();
+ }
+ else
+ bash_add_history (line);
+ return 1;
+ }
+ return 0;
+}
+
+#if defined (SYSLOG_HISTORY)
+#define SYSLOG_MAXLEN 600
+
+void
+bash_syslog_history (line)
+ const char *line;
+{
+ char trunc[SYSLOG_MAXLEN];
+
+ if (strlen(line) < SYSLOG_MAXLEN)
+ syslog (SYSLOG_FACILITY|SYSLOG_LEVEL, "HISTORY: PID=%d UID=%d %s", getpid(), current_user.uid, line);
+ else
+ {
+ strncpy (trunc, line, SYSLOG_MAXLEN);
+ trunc[SYSLOG_MAXLEN - 1] = '\0';
+ syslog (SYSLOG_FACILITY|SYSLOG_LEVEL, "HISTORY (TRUNCATED): PID=%d UID=%d %s", getpid(), current_user.uid, trunc);
+ }
+}
+#endif
+
+/* Add a line to the history list.
+ The variable COMMAND_ORIENTED_HISTORY controls the style of history
+ remembering; when non-zero, and LINE is not the first line of a
+ complete parser construct, append LINE to the last history line instead
+ of adding it as a new line. */
+void
+bash_add_history (line)
+ char *line;
+{
+ int add_it, offset, curlen;
+ HIST_ENTRY *current, *old;
+ char *chars_to_add, *new_line;
+
+ add_it = 1;
+ if (command_oriented_history && current_command_line_count > 1)
+ {
+ chars_to_add = literal_history ? "\n" : history_delimiting_chars ();
+
+ using_history ();
+ current = previous_history ();
+
+ if (current)
+ {
+ /* If the previous line ended with an escaped newline (escaped
+ with backslash, but otherwise unquoted), then remove the quoted
+ newline, since that is what happens when the line is parsed. */
+ curlen = strlen (current->line);
+
+ if (dstack.delimiter_depth == 0 && current->line[curlen - 1] == '\\' &&
+ current->line[curlen - 2] != '\\')
+ {
+ current->line[curlen - 1] = '\0';
+ curlen--;
+ chars_to_add = "";
+ }
+
+ new_line = (char *)xmalloc (1
+ + curlen
+ + strlen (line)
+ + strlen (chars_to_add));
+ sprintf (new_line, "%s%s%s", current->line, chars_to_add, line);
+ offset = where_history ();
+ old = replace_history_entry (offset, new_line, current->data);
+ free (new_line);
+
+ if (old)
+ free_history_entry (old);
+
+ add_it = 0;
+ }
+ }
+
+ if (add_it)
+ really_add_history (line);
+
+#if defined (SYSLOG_HISTORY)
+ bash_syslog_history (line);
+#endif
+
+ using_history ();
+}
+
+static void
+really_add_history (line)
+ char *line;
+{
+ hist_last_line_added = 1;
+ hist_last_line_pushed = 0;
+ add_history (line);
+ history_lines_this_session++;
+}
+
+int
+history_number ()
+{
+ using_history ();
+ return (remember_on_history ? history_base + where_history () : 1);
+}
+
+static int
+should_expand (s)
+ char *s;
+{
+ char *p;
+
+ for (p = s; p && *p; p++)
+ {
+ if (*p == '\\')
+ p++;
+ else if (*p == '&')
+ return 1;
+ }
+ return 0;
+}
+
+static int
+histignore_item_func (ign)
+ struct ign *ign;
+{
+ if (should_expand (ign->val))
+ ign->flags |= HIGN_EXPAND;
+ return (0);
+}
+
+void
+setup_history_ignore (varname)
+ char *varname;
+{
+ setup_ignore_patterns (&histignore);
+}
+
+static HIST_ENTRY *
+last_history_entry ()
+{
+ HIST_ENTRY *he;
+
+ using_history ();
+ he = previous_history ();
+ using_history ();
+ return he;
+}
+
+char *
+last_history_line ()
+{
+ HIST_ENTRY *he;
+
+ he = last_history_entry ();
+ if (he == 0)
+ return ((char *)NULL);
+ return he->line;
+}
+
+static char *
+expand_histignore_pattern (pat)
+ char *pat;
+{
+ HIST_ENTRY *phe;
+ char *ret;
+
+ phe = last_history_entry ();
+
+ if (phe == (HIST_ENTRY *)0)
+ return (savestring (pat));
+
+ ret = strcreplace (pat, '&', phe->line, 1);
+
+ return ret;
+}
+
+/* Return 1 if we should not put LINE into the history according to the
+ patterns in HISTIGNORE. */
+static int
+history_should_ignore (line)
+ char *line;
+{
+ register int i, match;
+ char *npat;
+
+ if (histignore.num_ignores == 0)
+ return 0;
+
+ for (i = match = 0; i < histignore.num_ignores; i++)
+ {
+ if (histignore.ignores[i].flags & HIGN_EXPAND)
+ npat = expand_histignore_pattern (histignore.ignores[i].val);
+ else
+ npat = histignore.ignores[i].val;
+
+ match = strmatch (npat, line, FNMATCH_EXTFLAG) != FNM_NOMATCH;
+
+ if (histignore.ignores[i].flags & HIGN_EXPAND)
+ free (npat);
+
+ if (match)
+ break;
+ }
+
+ return match;
+}
+#endif /* HISTORY */
diff --git a/bashhist.h b/bashhist.h
new file mode 100644
index 0000000..c44e7c6
--- /dev/null
+++ b/bashhist.h
@@ -0,0 +1,71 @@
+/* bashhist.h -- interface to the bash history functions in bashhist.c. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_BASHHIST_H_)
+#define _BASHHIST_H_
+
+#include "stdc.h"
+
+/* Flag values for history_control */
+#define HC_IGNSPACE 0x01
+#define HC_IGNDUPS 0x02
+#define HC_ERASEDUPS 0x04
+
+#define HC_IGNBOTH (HC_IGNSPACE|HC_IGNDUPS)
+
+extern int remember_on_history;
+extern int enable_history_list; /* value for `set -o history' */
+extern int literal_history; /* controlled by `shopt lithist' */
+extern int force_append_history;
+extern int history_lines_this_session;
+extern int history_lines_in_file;
+extern int history_expansion;
+extern int history_control;
+extern int command_oriented_history;
+extern int current_command_first_line_saved;
+extern int hist_last_line_added;
+extern int hist_last_line_pushed;
+
+# if defined (BANG_HISTORY)
+extern int history_expansion_inhibited;
+# endif /* BANG_HISTORY */
+
+extern void bash_initialize_history __P((void));
+extern void bash_history_reinit __P((int));
+extern void bash_history_disable __P((void));
+extern void bash_history_enable __P((void));
+extern void bash_clear_history __P((void));
+extern int bash_delete_histent __P((int));
+extern int bash_delete_last_history __P((void));
+extern void load_history __P((void));
+extern void save_history __P((void));
+extern int maybe_append_history __P((char *));
+extern int maybe_save_shell_history __P((void));
+extern char *pre_process_line __P((char *, int, int));
+extern void maybe_add_history __P((char *));
+extern void bash_add_history __P((char *));
+extern int check_add_history __P((char *, int));
+extern int history_number __P((void));
+
+extern void setup_history_ignore __P((char *));
+
+extern char *last_history_line __P((void));
+
+#endif /* _BASHHIST_H_ */
diff --git a/bashintl.h b/bashintl.h
new file mode 100644
index 0000000..7e6b83f
--- /dev/null
+++ b/bashintl.h
@@ -0,0 +1,50 @@
+/* bashintl.h -- Internationalization functions and defines. */
+
+/* Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_BASHINTL_H_)
+#define _BASHINTL_H_
+
+#if defined (BUILDTOOL)
+# undef ENABLE_NLS
+# define ENABLE_NLS 0
+#endif
+
+/* Include this *after* config.h */
+#include "gettext.h"
+
+#if defined (HAVE_LOCALE_H)
+# include <locale.h>
+#endif
+
+#define _(msgid) gettext(msgid)
+#define N_(msgid) msgid
+#define D_(d, msgid) dgettext(d, msgid)
+
+#define P_(m1, m2, n) ngettext(m1, m2, n)
+
+#if defined (HAVE_SETLOCALE) && !defined (LC_ALL)
+# undef HAVE_SETLOCALE
+#endif
+
+#if !defined (HAVE_SETLOCALE)
+# define setlocale(cat, loc)
+#endif
+
+#endif /* !_BASHINTL_H_ */
diff --git a/bashjmp.h b/bashjmp.h
new file mode 100644
index 0000000..c26053d
--- /dev/null
+++ b/bashjmp.h
@@ -0,0 +1,43 @@
+/* bashjmp.h -- wrapper for setjmp.h with necessary bash definitions. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _BASHJMP_H_
+#define _BASHJMP_H_
+
+#include "posixjmp.h"
+
+extern procenv_t top_level;
+extern procenv_t subshell_top_level;
+extern procenv_t return_catch; /* used by `return' builtin */
+
+#define SHFUNC_RETURN() longjmp (return_catch, 1)
+
+#define COPY_PROCENV(old, save) \
+ xbcopy ((char *)old, (char *)save, sizeof (procenv_t));
+
+/* Values for the second argument to longjmp/siglongjmp. */
+#define NOT_JUMPED 0 /* Not returning from a longjmp. */
+#define FORCE_EOF 1 /* We want to stop parsing. */
+#define DISCARD 2 /* Discard current command. */
+#define EXITPROG 3 /* Unconditionally exit the program now. */
+#define ERREXIT 4 /* Exit due to error condition */
+#define SIGEXIT 5 /* Exit due to fatal terminating signal */
+
+#endif /* _BASHJMP_H_ */
diff --git a/bashline.c b/bashline.c
new file mode 100644
index 0000000..9b49d0b
--- /dev/null
+++ b/bashline.c
@@ -0,0 +1,3663 @@
+/* bashline.c -- Bash's interface to the readline library. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#if defined (READLINE)
+
+#include "bashtypes.h"
+#include "posixstat.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#if defined (HAVE_GRP_H)
+# include <grp.h>
+#endif
+
+#if defined (HAVE_NETDB_H)
+# include <netdb.h>
+#endif
+
+#include <stdio.h>
+#include "chartypes.h"
+#include "bashansi.h"
+#include "bashintl.h"
+
+#include "shell.h"
+#include "input.h"
+#include "builtins.h"
+#include "bashhist.h"
+#include "bashline.h"
+#include "execute_cmd.h"
+#include "findcmd.h"
+#include "pathexp.h"
+#include "shmbutil.h"
+
+#include "builtins/common.h"
+
+#include <readline/rlconf.h>
+#include <readline/readline.h>
+#include <readline/history.h>
+
+#include <glob/glob.h>
+
+#if defined (ALIAS)
+# include "alias.h"
+#endif
+
+#if defined (PROGRAMMABLE_COMPLETION)
+# include "pcomplete.h"
+#endif
+
+/* These should agree with the defines for emacs_mode and vi_mode in
+ rldefs.h, even though that's not a public readline header file. */
+#ifndef EMACS_EDITING_MODE
+# define NO_EDITING_MODE -1
+# define EMACS_EDITING_MODE 1
+# define VI_EDITING_MODE 0
+#endif
+
+#define RL_BOOLEAN_VARIABLE_VALUE(s) ((s)[0] == 'o' && (s)[1] == 'n' && (s)[2] == '\0')
+
+#if defined (BRACE_COMPLETION)
+extern int bash_brace_completion __P((int, int));
+#endif /* BRACE_COMPLETION */
+
+/* To avoid including curses.h/term.h/termcap.h and that whole mess. */
+extern int tputs __P((const char *string, int nlines, int (*outx)(int)));
+
+/* Forward declarations */
+
+/* Functions bound to keys in Readline for Bash users. */
+static int shell_expand_line __P((int, int));
+static int display_shell_version __P((int, int));
+static int operate_and_get_next __P((int, int));
+
+static int bash_ignore_filenames __P((char **));
+static int bash_ignore_everything __P((char **));
+
+#if defined (BANG_HISTORY)
+static char *history_expand_line_internal __P((char *));
+static int history_expand_line __P((int, int));
+static int tcsh_magic_space __P((int, int));
+#endif /* BANG_HISTORY */
+#ifdef ALIAS
+static int alias_expand_line __P((int, int));
+#endif
+#if defined (BANG_HISTORY) && defined (ALIAS)
+static int history_and_alias_expand_line __P((int, int));
+#endif
+
+static int bash_forward_shellword __P((int, int));
+static int bash_backward_shellword __P((int, int));
+static int bash_kill_shellword __P((int, int));
+static int bash_backward_kill_shellword __P((int, int));
+
+/* Helper functions for Readline. */
+static char *restore_tilde __P((char *, char *));
+
+static char *bash_filename_rewrite_hook __P((char *, int));
+static void bash_directory_expansion __P((char **));
+static int bash_directory_completion_hook __P((char **));
+static int filename_completion_ignore __P((char **));
+static int bash_push_line __P((void));
+
+static void cleanup_expansion_error __P((void));
+static void maybe_make_readline_line __P((char *));
+static void set_up_new_line __P((char *));
+
+static int check_redir __P((int));
+static char **attempt_shell_completion __P((const char *, int, int));
+static char *variable_completion_function __P((const char *, int));
+static char *hostname_completion_function __P((const char *, int));
+static char *command_subst_completion_function __P((const char *, int));
+
+static void build_history_completion_array __P((void));
+static char *history_completion_generator __P((const char *, int));
+static int dynamic_complete_history __P((int, int));
+static int bash_dabbrev_expand __P((int, int));
+
+static void initialize_hostname_list __P((void));
+static void add_host_name __P((char *));
+static void snarf_hosts_from_file __P((char *));
+static char **hostnames_matching __P((char *));
+
+static void _ignore_completion_names __P((char **, sh_ignore_func_t *));
+static int name_is_acceptable __P((const char *));
+static int test_for_directory __P((const char *));
+static int return_zero __P((const char *));
+
+static char *bash_dequote_filename __P((char *, int));
+static char *quote_word_break_chars __P((char *));
+static char *bash_quote_filename __P((char *, int, char *));
+
+static int putx __P((int));
+static int bash_execute_unix_command __P((int, int));
+static void init_unix_command_map __P((void));
+static int isolate_sequence __P((char *, int, int, int *));
+
+static int set_saved_history __P((void));
+
+#if defined (ALIAS)
+static int posix_edit_macros __P((int, int));
+#endif
+
+#if defined (PROGRAMMABLE_COMPLETION)
+static int find_cmd_start __P((int));
+static int find_cmd_end __P((int));
+static char *find_cmd_name __P((int));
+static char *prog_complete_return __P((const char *, int));
+
+static char **prog_complete_matches;
+#endif
+
+/* Variables used here but defined in other files. */
+#if defined (BANG_HISTORY)
+extern int hist_verify;
+#endif
+
+extern int current_command_line_count, last_command_exit_value;
+extern int array_needs_making;
+extern int posixly_correct, no_symbolic_links;
+extern char *current_prompt_string, *ps1_prompt;
+extern STRING_INT_ALIST word_token_alist[];
+extern sh_builtin_func_t *last_shell_builtin, *this_shell_builtin;
+
+/* SPECIFIC_COMPLETION_FUNCTIONS specifies that we have individual
+ completion functions which indicate what type of completion should be
+ done (at or before point) that can be bound to key sequences with
+ the readline library. */
+#define SPECIFIC_COMPLETION_FUNCTIONS
+
+#if defined (SPECIFIC_COMPLETION_FUNCTIONS)
+static int bash_specific_completion __P((int, rl_compentry_func_t *));
+
+static int bash_complete_filename_internal __P((int));
+static int bash_complete_username_internal __P((int));
+static int bash_complete_hostname_internal __P((int));
+static int bash_complete_variable_internal __P((int));
+static int bash_complete_command_internal __P((int));
+
+static int bash_complete_filename __P((int, int));
+static int bash_possible_filename_completions __P((int, int));
+static int bash_complete_username __P((int, int));
+static int bash_possible_username_completions __P((int, int));
+static int bash_complete_hostname __P((int, int));
+static int bash_possible_hostname_completions __P((int, int));
+static int bash_complete_variable __P((int, int));
+static int bash_possible_variable_completions __P((int, int));
+static int bash_complete_command __P((int, int));
+static int bash_possible_command_completions __P((int, int));
+
+static char *glob_complete_word __P((const char *, int));
+static int bash_glob_completion_internal __P((int));
+static int bash_glob_complete_word __P((int, int));
+static int bash_glob_expand_word __P((int, int));
+static int bash_glob_list_expansions __P((int, int));
+
+#endif /* SPECIFIC_COMPLETION_FUNCTIONS */
+
+static int edit_and_execute_command __P((int, int, int, char *));
+#if defined (VI_MODE)
+static int vi_edit_and_execute_command __P((int, int));
+static int bash_vi_complete __P((int, int));
+#endif
+static int emacs_edit_and_execute_command __P((int, int));
+
+/* Non-zero once initalize_readline () has been called. */
+int bash_readline_initialized = 0;
+
+/* If non-zero, we do hostname completion, breaking words at `@' and
+ trying to complete the stuff after the `@' from our own internal
+ host list. */
+int perform_hostname_completion = 1;
+
+/* If non-zero, we don't do command completion on an empty line. */
+int no_empty_command_completion;
+
+/* Set FORCE_FIGNORE if you want to honor FIGNORE even if it ignores the
+ only possible matches. Set to 0 if you want to match filenames if they
+ are the only possible matches, even if FIGNORE says to. */
+int force_fignore = 1;
+
+/* Perform spelling correction on directory names during word completion */
+int dircomplete_spelling = 0;
+
+static char *bash_completer_word_break_characters = " \t\n\"'@><=;|&(:";
+static char *bash_nohostname_word_break_characters = " \t\n\"'><=;|&(:";
+/* )) */
+
+static rl_hook_func_t *old_rl_startup_hook = (rl_hook_func_t *)NULL;
+
+static int dot_in_path = 0;
+
+/* Set to non-zero when dabbrev-expand is running */
+static int dabbrev_expand_active = 0;
+
+/* What kind of quoting is performed by bash_quote_filename:
+ COMPLETE_DQUOTE = double-quoting the filename
+ COMPLETE_SQUOTE = single_quoting the filename
+ COMPLETE_BSQUOTE = backslash-quoting special chars in the filename
+*/
+#define COMPLETE_DQUOTE 1
+#define COMPLETE_SQUOTE 2
+#define COMPLETE_BSQUOTE 3
+static int completion_quoting_style = COMPLETE_BSQUOTE;
+
+/* Flag values for the final argument to bash_default_completion */
+#define DEFCOMP_CMDPOS 1
+
+/* Change the readline VI-mode keymaps into or out of Posix.2 compliance.
+ Called when the shell is put into or out of `posix' mode. */
+void
+posix_readline_initialize (on_or_off)
+ int on_or_off;
+{
+ if (on_or_off)
+ rl_variable_bind ("comment-begin", "#");
+#if defined (VI_MODE)
+ rl_bind_key_in_map (CTRL ('I'), on_or_off ? rl_insert : rl_complete, vi_insertion_keymap);
+#endif
+}
+
+void
+reset_completer_word_break_chars ()
+{
+ rl_completer_word_break_characters = perform_hostname_completion ? savestring (bash_completer_word_break_characters) : savestring (bash_nohostname_word_break_characters);
+}
+
+/* When this function returns, rl_completer_word_break_characters points to
+ dynamically allocated memory. */
+int
+enable_hostname_completion (on_or_off)
+ int on_or_off;
+{
+ int old_value;
+ char *at, *nv, *nval;
+
+ old_value = perform_hostname_completion;
+
+ if (on_or_off)
+ {
+ perform_hostname_completion = 1;
+ rl_special_prefixes = "$@";
+ }
+ else
+ {
+ perform_hostname_completion = 0;
+ rl_special_prefixes = "$";
+ }
+
+ /* Now we need to figure out how to appropriately modify and assign
+ rl_completer_word_break_characters depending on whether we want
+ hostname completion on or off. */
+
+ /* If this is the first time this has been called
+ (bash_readline_initialized == 0), use the sames values as before, but
+ allocate new memory for rl_completer_word_break_characters. */
+
+ if (bash_readline_initialized == 0 &&
+ (rl_completer_word_break_characters == 0 ||
+ rl_completer_word_break_characters == rl_basic_word_break_characters))
+ {
+ if (on_or_off)
+ rl_completer_word_break_characters = savestring (bash_completer_word_break_characters);
+ else
+ rl_completer_word_break_characters = savestring (bash_nohostname_word_break_characters);
+ }
+ else
+ {
+ /* See if we have anything to do. */
+ at = strchr (rl_completer_word_break_characters, '@');
+ if ((at == 0 && on_or_off == 0) || (at != 0 && on_or_off != 0))
+ return old_value;
+
+ /* We have something to do. Do it. */
+ nval = (char *)xmalloc (strlen (rl_completer_word_break_characters) + 1 + on_or_off);
+
+ if (on_or_off == 0)
+ {
+ /* Turn it off -- just remove `@' from word break chars. We want
+ to remove all occurrences of `@' from the char list, so we loop
+ rather than just copy the rest of the list over AT. */
+ for (nv = nval, at = rl_completer_word_break_characters; *at; )
+ if (*at != '@')
+ *nv++ = *at++;
+ else
+ at++;
+ *nv = '\0';
+ }
+ else
+ {
+ nval[0] = '@';
+ strcpy (nval + 1, rl_completer_word_break_characters);
+ }
+
+ free (rl_completer_word_break_characters);
+ rl_completer_word_break_characters = nval;
+ }
+
+ return (old_value);
+}
+
+/* Called once from parse.y if we are going to use readline. */
+void
+initialize_readline ()
+{
+ rl_command_func_t *func;
+ char kseq[2];
+
+ if (bash_readline_initialized)
+ return;
+
+ rl_terminal_name = get_string_value ("TERM");
+ rl_instream = stdin;
+ rl_outstream = stderr;
+
+ /* Allow conditional parsing of the ~/.inputrc file. */
+ rl_readline_name = "Bash";
+
+ /* Add bindable names before calling rl_initialize so they may be
+ referenced in the various inputrc files. */
+ rl_add_defun ("shell-expand-line", shell_expand_line, -1);
+#ifdef BANG_HISTORY
+ rl_add_defun ("history-expand-line", history_expand_line, -1);
+ rl_add_defun ("magic-space", tcsh_magic_space, -1);
+#endif
+
+ rl_add_defun ("shell-forward-word", bash_forward_shellword, -1);
+ rl_add_defun ("shell-backward-word", bash_backward_shellword, -1);
+ rl_add_defun ("shell-kill-word", bash_kill_shellword, -1);
+ rl_add_defun ("shell-backward-kill-word", bash_backward_kill_shellword, -1);
+
+#ifdef ALIAS
+ rl_add_defun ("alias-expand-line", alias_expand_line, -1);
+# ifdef BANG_HISTORY
+ rl_add_defun ("history-and-alias-expand-line", history_and_alias_expand_line, -1);
+# endif
+#endif
+
+ /* Backwards compatibility. */
+ rl_add_defun ("insert-last-argument", rl_yank_last_arg, -1);
+
+ rl_add_defun ("operate-and-get-next", operate_and_get_next, -1);
+ rl_add_defun ("display-shell-version", display_shell_version, -1);
+ rl_add_defun ("edit-and-execute-command", emacs_edit_and_execute_command, -1);
+
+#if defined (BRACE_COMPLETION)
+ rl_add_defun ("complete-into-braces", bash_brace_completion, -1);
+#endif
+
+#if defined (SPECIFIC_COMPLETION_FUNCTIONS)
+ rl_add_defun ("complete-filename", bash_complete_filename, -1);
+ rl_add_defun ("possible-filename-completions", bash_possible_filename_completions, -1);
+ rl_add_defun ("complete-username", bash_complete_username, -1);
+ rl_add_defun ("possible-username-completions", bash_possible_username_completions, -1);
+ rl_add_defun ("complete-hostname", bash_complete_hostname, -1);
+ rl_add_defun ("possible-hostname-completions", bash_possible_hostname_completions, -1);
+ rl_add_defun ("complete-variable", bash_complete_variable, -1);
+ rl_add_defun ("possible-variable-completions", bash_possible_variable_completions, -1);
+ rl_add_defun ("complete-command", bash_complete_command, -1);
+ rl_add_defun ("possible-command-completions", bash_possible_command_completions, -1);
+ rl_add_defun ("glob-complete-word", bash_glob_complete_word, -1);
+ rl_add_defun ("glob-expand-word", bash_glob_expand_word, -1);
+ rl_add_defun ("glob-list-expansions", bash_glob_list_expansions, -1);
+#endif
+
+ rl_add_defun ("dynamic-complete-history", dynamic_complete_history, -1);
+ rl_add_defun ("dabbrev-expand", bash_dabbrev_expand, -1);
+
+ /* Bind defaults before binding our custom shell keybindings. */
+ if (RL_ISSTATE(RL_STATE_INITIALIZED) == 0)
+ rl_initialize ();
+
+ /* Bind up our special shell functions. */
+ rl_bind_key_if_unbound_in_map (CTRL('E'), shell_expand_line, emacs_meta_keymap);
+
+#ifdef BANG_HISTORY
+ rl_bind_key_if_unbound_in_map ('^', history_expand_line, emacs_meta_keymap);
+#endif
+
+ rl_bind_key_if_unbound_in_map (CTRL ('O'), operate_and_get_next, emacs_standard_keymap);
+ rl_bind_key_if_unbound_in_map (CTRL ('V'), display_shell_version, emacs_ctlx_keymap);
+
+ /* In Bash, the user can switch editing modes with "set -o [vi emacs]",
+ so it is not necessary to allow C-M-j for context switching. Turn
+ off this occasionally confusing behaviour. */
+ kseq[0] = CTRL('J');
+ kseq[1] = '\0';
+ func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL);
+ if (func == rl_vi_editing_mode)
+ rl_unbind_key_in_map (CTRL('J'), emacs_meta_keymap);
+ kseq[0] = CTRL('M');
+ func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL);
+ if (func == rl_vi_editing_mode)
+ rl_unbind_key_in_map (CTRL('M'), emacs_meta_keymap);
+#if defined (VI_MODE)
+ rl_unbind_key_in_map (CTRL('E'), vi_movement_keymap);
+#endif
+
+#if defined (BRACE_COMPLETION)
+ rl_bind_key_if_unbound_in_map ('{', bash_brace_completion, emacs_meta_keymap); /*}*/
+#endif /* BRACE_COMPLETION */
+
+#if defined (SPECIFIC_COMPLETION_FUNCTIONS)
+ rl_bind_key_if_unbound_in_map ('/', bash_complete_filename, emacs_meta_keymap);
+ rl_bind_key_if_unbound_in_map ('/', bash_possible_filename_completions, emacs_ctlx_keymap);
+
+ /* Have to jump through hoops here because there is a default binding for
+ M-~ (rl_tilde_expand) */
+ kseq[0] = '~';
+ kseq[1] = '\0';
+ func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL);
+ if (func == 0 || func == rl_tilde_expand)
+ rl_bind_keyseq_in_map (kseq, bash_complete_username, emacs_meta_keymap);
+
+ rl_bind_key_if_unbound_in_map ('~', bash_possible_username_completions, emacs_ctlx_keymap);
+
+ rl_bind_key_if_unbound_in_map ('@', bash_complete_hostname, emacs_meta_keymap);
+ rl_bind_key_if_unbound_in_map ('@', bash_possible_hostname_completions, emacs_ctlx_keymap);
+
+ rl_bind_key_if_unbound_in_map ('$', bash_complete_variable, emacs_meta_keymap);
+ rl_bind_key_if_unbound_in_map ('$', bash_possible_variable_completions, emacs_ctlx_keymap);
+
+ rl_bind_key_if_unbound_in_map ('!', bash_complete_command, emacs_meta_keymap);
+ rl_bind_key_if_unbound_in_map ('!', bash_possible_command_completions, emacs_ctlx_keymap);
+
+ rl_bind_key_if_unbound_in_map ('g', bash_glob_complete_word, emacs_meta_keymap);
+ rl_bind_key_if_unbound_in_map ('*', bash_glob_expand_word, emacs_ctlx_keymap);
+ rl_bind_key_if_unbound_in_map ('g', bash_glob_list_expansions, emacs_ctlx_keymap);
+
+#endif /* SPECIFIC_COMPLETION_FUNCTIONS */
+
+ kseq[0] = TAB;
+ kseq[1] = '\0';
+ func = rl_function_of_keyseq (kseq, emacs_meta_keymap, (int *)NULL);
+ if (func == 0 || func == rl_tab_insert)
+ rl_bind_key_in_map (TAB, dynamic_complete_history, emacs_meta_keymap);
+
+ /* Tell the completer that we want a crack first. */
+ rl_attempted_completion_function = attempt_shell_completion;
+
+ /* Tell the completer that we might want to follow symbolic links or
+ do other expansion on directory names. */
+ rl_directory_completion_hook = bash_directory_completion_hook;
+
+ rl_filename_rewrite_hook = bash_filename_rewrite_hook;
+
+ /* Tell the filename completer we want a chance to ignore some names. */
+ rl_ignore_some_completions_function = filename_completion_ignore;
+
+ /* Bind C-xC-e to invoke emacs and run result as commands. */
+ rl_bind_key_if_unbound_in_map (CTRL ('E'), emacs_edit_and_execute_command, emacs_ctlx_keymap);
+#if defined (VI_MODE)
+ rl_bind_key_if_unbound_in_map ('v', vi_edit_and_execute_command, vi_movement_keymap);
+# if defined (ALIAS)
+ rl_bind_key_if_unbound_in_map ('@', posix_edit_macros, vi_movement_keymap);
+# endif
+
+ rl_bind_key_in_map ('\\', bash_vi_complete, vi_movement_keymap);
+ rl_bind_key_in_map ('*', bash_vi_complete, vi_movement_keymap);
+ rl_bind_key_in_map ('=', bash_vi_complete, vi_movement_keymap);
+#endif
+
+ rl_completer_quote_characters = "'\"";
+
+ /* This sets rl_completer_word_break_characters and rl_special_prefixes
+ to the appropriate values, depending on whether or not hostname
+ completion is enabled. */
+ enable_hostname_completion (perform_hostname_completion);
+
+ /* characters that need to be quoted when appearing in filenames. */
+#if 0
+ rl_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!:{"; /*}*/
+#else
+ rl_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!:{~"; /*}*/
+#endif
+ rl_filename_quoting_function = bash_quote_filename;
+ rl_filename_dequoting_function = bash_dequote_filename;
+ rl_char_is_quoted_p = char_is_quoted;
+
+#if 0
+ /* This is superfluous and makes it impossible to use tab completion in
+ vi mode even when explicitly binding it in ~/.inputrc. sv_strict_posix()
+ should already have called posix_readline_initialize() when
+ posixly_correct was set. */
+ if (posixly_correct)
+ posix_readline_initialize (1);
+#endif
+
+ bash_readline_initialized = 1;
+}
+
+void
+bashline_reinitialize ()
+{
+ bash_readline_initialized = 0;
+}
+
+/* On Sun systems at least, rl_attempted_completion_function can end up
+ getting set to NULL, and rl_completion_entry_function set to do command
+ word completion if Bash is interrupted while trying to complete a command
+ word. This just resets all the completion functions to the right thing.
+ It's called from throw_to_top_level(). */
+void
+bashline_reset ()
+{
+ tilde_initialize ();
+ rl_attempted_completion_function = attempt_shell_completion;
+ rl_completion_entry_function = NULL;
+ rl_directory_completion_hook = bash_directory_completion_hook;
+ rl_ignore_some_completions_function = filename_completion_ignore;
+}
+
+/* Contains the line to push into readline. */
+static char *push_to_readline = (char *)NULL;
+
+/* Push the contents of push_to_readline into the
+ readline buffer. */
+static int
+bash_push_line ()
+{
+ if (push_to_readline)
+ {
+ rl_insert_text (push_to_readline);
+ free (push_to_readline);
+ push_to_readline = (char *)NULL;
+ rl_startup_hook = old_rl_startup_hook;
+ }
+ return 0;
+}
+
+/* Call this to set the initial text for the next line to read
+ from readline. */
+int
+bash_re_edit (line)
+ char *line;
+{
+ FREE (push_to_readline);
+
+ push_to_readline = savestring (line);
+ old_rl_startup_hook = rl_startup_hook;
+ rl_startup_hook = bash_push_line;
+
+ return (0);
+}
+
+static int
+display_shell_version (count, c)
+ int count, c;
+{
+ rl_crlf ();
+ show_shell_version (0);
+ putc ('\r', rl_outstream);
+ fflush (rl_outstream);
+ rl_on_new_line ();
+ rl_redisplay ();
+ return 0;
+}
+
+/* **************************************************************** */
+/* */
+/* Readline Stuff */
+/* */
+/* **************************************************************** */
+
+/* If the user requests hostname completion, then simply build a list
+ of hosts, and complete from that forever more, or at least until
+ HOSTFILE is unset. */
+
+/* THIS SHOULD BE A STRINGLIST. */
+/* The kept list of hostnames. */
+static char **hostname_list = (char **)NULL;
+
+/* The physical size of the above list. */
+static int hostname_list_size;
+
+/* The number of hostnames in the above list. */
+static int hostname_list_length;
+
+/* Whether or not HOSTNAME_LIST has been initialized. */
+int hostname_list_initialized = 0;
+
+/* Initialize the hostname completion table. */
+static void
+initialize_hostname_list ()
+{
+ char *temp;
+
+ temp = get_string_value ("HOSTFILE");
+ if (temp == 0)
+ temp = get_string_value ("hostname_completion_file");
+ if (temp == 0)
+ temp = DEFAULT_HOSTS_FILE;
+
+ snarf_hosts_from_file (temp);
+
+ if (hostname_list)
+ hostname_list_initialized++;
+}
+
+/* Add NAME to the list of hosts. */
+static void
+add_host_name (name)
+ char *name;
+{
+ if (hostname_list_length + 2 > hostname_list_size)
+ {
+ hostname_list_size = (hostname_list_size + 32) - (hostname_list_size % 32);
+ hostname_list = strvec_resize (hostname_list, hostname_list_size);
+ }
+
+ hostname_list[hostname_list_length++] = savestring (name);
+ hostname_list[hostname_list_length] = (char *)NULL;
+}
+
+#define cr_whitespace(c) ((c) == '\r' || (c) == '\n' || whitespace(c))
+
+static void
+snarf_hosts_from_file (filename)
+ char *filename;
+{
+ FILE *file;
+ char *temp, buffer[256], name[256];
+ register int i, start;
+
+ file = fopen (filename, "r");
+ if (file == 0)
+ return;
+
+ while (temp = fgets (buffer, 255, file))
+ {
+ /* Skip to first character. */
+ for (i = 0; buffer[i] && cr_whitespace (buffer[i]); i++)
+ ;
+
+ /* If comment or blank line, ignore. */
+ if (buffer[i] == '\0' || buffer[i] == '#')
+ continue;
+
+ /* If `preprocessor' directive, do the include. */
+ if (strncmp (buffer + i, "$include ", 9) == 0)
+ {
+ char *incfile, *t;
+
+ /* Find start of filename. */
+ for (incfile = buffer + i + 9; *incfile && whitespace (*incfile); incfile++)
+ ;
+
+ /* Find end of filename. */
+ for (t = incfile; *t && cr_whitespace (*t) == 0; t++)
+ ;
+
+ *t = '\0';
+
+ snarf_hosts_from_file (incfile);
+ continue;
+ }
+
+ /* Skip internet address if present. */
+ if (DIGIT (buffer[i]))
+ for (; buffer[i] && cr_whitespace (buffer[i]) == 0; i++);
+
+ /* Gobble up names. Each name is separated with whitespace. */
+ while (buffer[i])
+ {
+ for (; cr_whitespace (buffer[i]); i++)
+ ;
+ if (buffer[i] == '\0' || buffer[i] == '#')
+ break;
+
+ /* Isolate the current word. */
+ for (start = i; buffer[i] && cr_whitespace (buffer[i]) == 0; i++)
+ ;
+ if (i == start)
+ continue;
+ strncpy (name, buffer + start, i - start);
+ name[i - start] = '\0';
+ add_host_name (name);
+ }
+ }
+ fclose (file);
+}
+
+/* Return the hostname list. */
+char **
+get_hostname_list ()
+{
+ if (hostname_list_initialized == 0)
+ initialize_hostname_list ();
+ return (hostname_list);
+}
+
+void
+clear_hostname_list ()
+{
+ register int i;
+
+ if (hostname_list_initialized == 0)
+ return;
+ for (i = 0; i < hostname_list_length; i++)
+ free (hostname_list[i]);
+ hostname_list_length = hostname_list_initialized = 0;
+}
+
+/* Return a NULL terminated list of hostnames which begin with TEXT.
+ Initialize the hostname list the first time if neccessary.
+ The array is malloc ()'ed, but not the individual strings. */
+static char **
+hostnames_matching (text)
+ char *text;
+{
+ register int i, len, nmatch, rsize;
+ char **result;
+
+ if (hostname_list_initialized == 0)
+ initialize_hostname_list ();
+
+ if (hostname_list_initialized == 0)
+ return ((char **)NULL);
+
+ /* Special case. If TEXT consists of nothing, then the whole list is
+ what is desired. */
+ if (*text == '\0')
+ {
+ result = strvec_create (1 + hostname_list_length);
+ for (i = 0; i < hostname_list_length; i++)
+ result[i] = hostname_list[i];
+ result[i] = (char *)NULL;
+ return (result);
+ }
+
+ /* Scan until found, or failure. */
+ len = strlen (text);
+ result = (char **)NULL;
+ for (i = nmatch = rsize = 0; i < hostname_list_length; i++)
+ {
+ if (STREQN (text, hostname_list[i], len) == 0)
+ continue;
+
+ /* OK, it matches. Add it to the list. */
+ if (nmatch >= (rsize - 1))
+ {
+ rsize = (rsize + 16) - (rsize % 16);
+ result = strvec_resize (result, rsize);
+ }
+
+ result[nmatch++] = hostname_list[i];
+ }
+ if (nmatch)
+ result[nmatch] = (char *)NULL;
+ return (result);
+}
+
+/* The equivalent of the Korn shell C-o operate-and-get-next-history-line
+ editing command. */
+static int saved_history_line_to_use = -1;
+
+static int
+set_saved_history ()
+{
+ if (saved_history_line_to_use >= 0)
+ rl_get_previous_history (history_length - saved_history_line_to_use, 0);
+ saved_history_line_to_use = -1;
+ rl_startup_hook = old_rl_startup_hook;
+ return (0);
+}
+
+static int
+operate_and_get_next (count, c)
+ int count, c;
+{
+ int where;
+
+ /* Accept the current line. */
+ rl_newline (1, c);
+
+ /* Find the current line, and find the next line to use. */
+ where = where_history ();
+
+ if ((history_is_stifled () && (history_length >= history_max_entries)) ||
+ (where >= history_length - 1))
+ saved_history_line_to_use = where;
+ else
+ saved_history_line_to_use = where + 1;
+
+ old_rl_startup_hook = rl_startup_hook;
+ rl_startup_hook = set_saved_history;
+
+ return 0;
+}
+
+/* This vi mode command causes VI_EDIT_COMMAND to be run on the current
+ command being entered (if no explicit argument is given), otherwise on
+ a command from the history file. */
+
+#define VI_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-vi}}\""
+#define EMACS_EDIT_COMMAND "fc -e \"${VISUAL:-${EDITOR:-emacs}}\""
+#define POSIX_VI_EDIT_COMMAND "fc -e vi"
+
+static int
+edit_and_execute_command (count, c, editing_mode, edit_command)
+ int count, c, editing_mode;
+ char *edit_command;
+{
+ char *command, *metaval;
+ int r, cclc, rrs, metaflag;
+
+ rrs = rl_readline_state;
+ cclc = current_command_line_count;
+
+ /* Accept the current line. */
+ rl_newline (1, c);
+
+ if (rl_explicit_arg)
+ {
+ command = (char *)xmalloc (strlen (edit_command) + 8);
+ sprintf (command, "%s %d", edit_command, count);
+ }
+ else
+ {
+ /* Take the command we were just editing, add it to the history file,
+ then call fc to operate on it. We have to add a dummy command to
+ the end of the history because fc ignores the last command (assumes
+ it's supposed to deal with the command before the `fc'). */
+ using_history ();
+ bash_add_history (rl_line_buffer);
+ bash_add_history ("");
+ history_lines_this_session++;
+ using_history ();
+ command = savestring (edit_command);
+ }
+
+ metaval = rl_variable_value ("input-meta");
+ metaflag = RL_BOOLEAN_VARIABLE_VALUE (metaval);
+
+ /* Now, POSIX.1-2001 and SUSv3 say that the commands executed from the
+ temporary file should be placed into the history. We don't do that
+ yet. */
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
+ r = parse_and_execute (command, (editing_mode == VI_EDITING_MODE) ? "v" : "C-xC-e", SEVAL_NOHIST);
+ if (rl_prep_term_function)
+ (*rl_prep_term_function) (metaflag);
+
+ current_command_line_count = cclc;
+
+ /* Now erase the contents of the current line and undo the effects of the
+ rl_accept_line() above. We don't even want to make the text we just
+ executed available for undoing. */
+ rl_line_buffer[0] = '\0'; /* XXX */
+ rl_point = rl_end = 0;
+ rl_done = 0;
+ rl_readline_state = rrs;
+
+ rl_forced_update_display ();
+
+ return r;
+}
+
+#if defined (VI_MODE)
+static int
+vi_edit_and_execute_command (count, c)
+ int count, c;
+{
+ if (posixly_correct)
+ return (edit_and_execute_command (count, c, VI_EDITING_MODE, POSIX_VI_EDIT_COMMAND));
+ else
+ return (edit_and_execute_command (count, c, VI_EDITING_MODE, VI_EDIT_COMMAND));
+}
+#endif /* VI_MODE */
+
+static int
+emacs_edit_and_execute_command (count, c)
+ int count, c;
+{
+ return (edit_and_execute_command (count, c, EMACS_EDITING_MODE, EMACS_EDIT_COMMAND));
+}
+
+#if defined (ALIAS)
+static int
+posix_edit_macros (count, key)
+ int count, key;
+{
+ int c;
+ char alias_name[3], *alias_value, *macro;
+
+ c = rl_read_key ();
+ alias_name[0] = '_';
+ alias_name[1] = c;
+ alias_name[2] = '\0';
+
+ alias_value = get_alias_value (alias_name);
+ if (alias_value && *alias_value)
+ {
+ macro = savestring (alias_value);
+ rl_push_macro_input (macro);
+ }
+ return 0;
+}
+#endif
+
+/* Bindable commands that move `shell-words': that is, sequences of
+ non-unquoted-metacharacters. */
+
+#define WORDDELIM(c) (shellmeta(c) || shellblank(c))
+
+static int
+bash_forward_shellword (count, key)
+ int count, key;
+{
+ size_t slen;
+ int sindex, c, p;
+ DECLARE_MBSTATE;
+
+ if (count < 0)
+ return (bash_backward_shellword (-count, key));
+
+ /* The tricky part of this is deciding whether or not the first character
+ we're on is an unquoted metacharacter. Not completely handled yet. */
+ /* XXX - need to test this stuff with backslash-escaped shell
+ metacharacters and unclosed single- and double-quoted strings. */
+
+ p = rl_point;
+ slen = rl_end;
+
+ while (count)
+ {
+ if (p == rl_end)
+ {
+ rl_point = rl_end;
+ return 0;
+ }
+
+ /* Move forward until we hit a non-metacharacter. */
+ while (p < rl_end && (c = rl_line_buffer[p]) && WORDDELIM (c))
+ {
+ switch (c)
+ {
+ default:
+ ADVANCE_CHAR (rl_line_buffer, slen, p);
+ continue; /* straight back to loop, don't increment p */
+ case '\\':
+ if (p < rl_end && rl_line_buffer[p])
+ ADVANCE_CHAR (rl_line_buffer, slen, p);
+ break;
+ case '\'':
+ p = skip_to_delim (rl_line_buffer, ++p, "'", SD_NOJMP);
+ break;
+ case '"':
+ p = skip_to_delim (rl_line_buffer, ++p, "\"", SD_NOJMP);
+ break;
+ }
+
+ if (p < rl_end)
+ p++;
+ }
+
+ if (rl_line_buffer[p] == 0 || p == rl_end)
+ {
+ rl_point = rl_end;
+ rl_ding ();
+ return 0;
+ }
+
+ /* Now move forward until we hit a non-quoted metacharacter or EOL */
+ while (p < rl_end && (c = rl_line_buffer[p]) && WORDDELIM (c) == 0)
+ {
+ switch (c)
+ {
+ default:
+ ADVANCE_CHAR (rl_line_buffer, slen, p);
+ continue; /* straight back to loop, don't increment p */
+ case '\\':
+ if (p < rl_end && rl_line_buffer[p])
+ ADVANCE_CHAR (rl_line_buffer, slen, p);
+ break;
+ case '\'':
+ p = skip_to_delim (rl_line_buffer, ++p, "'", SD_NOJMP);
+ break;
+ case '"':
+ p = skip_to_delim (rl_line_buffer, ++p, "\"", SD_NOJMP);
+ break;
+ }
+
+ if (p < rl_end)
+ p++;
+ }
+
+ if (p == rl_end || rl_line_buffer[p] == 0)
+ {
+ rl_point = rl_end;
+ return (0);
+ }
+
+ count--;
+ }
+
+ rl_point = p;
+ return (0);
+}
+
+static int
+bash_backward_shellword (count, key)
+ int count, key;
+{
+ size_t slen;
+ int sindex, c, p;
+ DECLARE_MBSTATE;
+
+ if (count < 0)
+ return (bash_forward_shellword (-count, key));
+
+ p = rl_point;
+ slen = rl_end;
+
+ while (count)
+ {
+ if (p == 0)
+ {
+ rl_point = 0;
+ return 0;
+ }
+
+ /* Move backward until we hit a non-metacharacter. */
+ while (p > 0)
+ {
+ c = rl_line_buffer[p];
+ if (WORDDELIM (c) && char_is_quoted (rl_line_buffer, p) == 0)
+ BACKUP_CHAR (rl_line_buffer, slen, p);
+ break;
+ }
+
+ if (p == 0)
+ {
+ rl_point = 0;
+ return 0;
+ }
+
+ /* Now move backward until we hit a metacharacter or BOL. */
+ while (p > 0)
+ {
+ c = rl_line_buffer[p];
+ if (WORDDELIM (c) && char_is_quoted (rl_line_buffer, p) == 0)
+ break;
+ BACKUP_CHAR (rl_line_buffer, slen, p);
+ }
+
+ count--;
+ }
+
+ rl_point = p;
+ return 0;
+}
+
+static int
+bash_kill_shellword (count, key)
+ int count, key;
+{
+ int p;
+
+ if (count < 0)
+ return (bash_backward_kill_shellword (-count, key));
+
+ p = rl_point;
+ bash_forward_shellword (count, key);
+
+ if (rl_point != p)
+ rl_kill_text (p, rl_point);
+
+ rl_point = p;
+ if (rl_editing_mode == 1) /* 1 == emacs_mode */
+ rl_mark = rl_point;
+
+ return 0;
+}
+
+static int
+bash_backward_kill_shellword (count, key)
+ int count, key;
+{
+ int p;
+
+ if (count < 0)
+ return (bash_kill_shellword (-count, key));
+
+ p = rl_point;
+ bash_backward_shellword (count, key);
+
+ if (rl_point != p)
+ rl_kill_text (p, rl_point);
+
+ if (rl_editing_mode == 1) /* 1 == emacs_mode */
+ rl_mark = rl_point;
+
+ return 0;
+}
+
+
+/* **************************************************************** */
+/* */
+/* How To Do Shell Completion */
+/* */
+/* **************************************************************** */
+
+#define COMMAND_SEPARATORS ";|&{(`"
+/* )} */
+
+static int
+check_redir (ti)
+ int ti;
+{
+ register int this_char, prev_char;
+
+ /* Handle the two character tokens `>&', `<&', and `>|'.
+ We are not in a command position after one of these. */
+ this_char = rl_line_buffer[ti];
+ prev_char = rl_line_buffer[ti - 1];
+
+ if ((this_char == '&' && (prev_char == '<' || prev_char == '>')) ||
+ (this_char == '|' && prev_char == '>'))
+ return (1);
+ else if ((this_char == '{' && prev_char == '$') || /* } */
+ (char_is_quoted (rl_line_buffer, ti)))
+ return (1);
+ return (0);
+}
+
+#if defined (PROGRAMMABLE_COMPLETION)
+/*
+ * XXX - because of the <= start test, and setting os = s+1, this can
+ * potentially return os > start. This is probably not what we want to
+ * happen, but fix later after 2.05a-release.
+ */
+static int
+find_cmd_start (start)
+ int start;
+{
+ register int s, os;
+
+ os = 0;
+ while (((s = skip_to_delim (rl_line_buffer, os, COMMAND_SEPARATORS, SD_NOJMP|SD_NOSKIPCMD)) <= start) &&
+ rl_line_buffer[s])
+ os = s+1;
+ return os;
+}
+
+static int
+find_cmd_end (end)
+ int end;
+{
+ register int e;
+
+ e = skip_to_delim (rl_line_buffer, end, COMMAND_SEPARATORS, SD_NOJMP);
+ return e;
+}
+
+static char *
+find_cmd_name (start)
+ int start;
+{
+ char *name;
+ register int s, e;
+
+ for (s = start; whitespace (rl_line_buffer[s]); s++)
+ ;
+
+ /* skip until a shell break character */
+ e = skip_to_delim (rl_line_buffer, s, "()<>;&| \t\n", SD_NOJMP);
+
+ name = substring (rl_line_buffer, s, e);
+
+ return (name);
+}
+
+static char *
+prog_complete_return (text, matchnum)
+ const char *text;
+ int matchnum;
+{
+ static int ind;
+
+ if (matchnum == 0)
+ ind = 0;
+
+ if (prog_complete_matches == 0 || prog_complete_matches[ind] == 0)
+ return (char *)NULL;
+ return (prog_complete_matches[ind++]);
+}
+
+#endif /* PROGRAMMABLE_COMPLETION */
+
+/* Do some completion on TEXT. The indices of TEXT in RL_LINE_BUFFER are
+ at START and END. Return an array of matches, or NULL if none. */
+static char **
+attempt_shell_completion (text, start, end)
+ const char *text;
+ int start, end;
+{
+ int in_command_position, ti, saveti, qc, dflags;
+ char **matches, *command_separator_chars;
+
+ command_separator_chars = COMMAND_SEPARATORS;
+ matches = (char **)NULL;
+ rl_ignore_some_completions_function = filename_completion_ignore;
+
+ /* Determine if this could be a command word. It is if it appears at
+ the start of the line (ignoring preceding whitespace), or if it
+ appears after a character that separates commands. It cannot be a
+ command word if we aren't at the top-level prompt. */
+ ti = start - 1;
+ saveti = qc = -1;
+
+ while ((ti > -1) && (whitespace (rl_line_buffer[ti])))
+ ti--;
+
+#if 1
+ /* If this is an open quote, maybe we're trying to complete a quoted
+ command name. */
+ if (ti >= 0 && (rl_line_buffer[ti] == '"' || rl_line_buffer[ti] == '\''))
+ {
+ qc = rl_line_buffer[ti];
+ saveti = ti--;
+ while (ti > -1 && (whitespace (rl_line_buffer[ti])))
+ ti--;
+ }
+#endif
+
+ in_command_position = 0;
+ if (ti < 0)
+ {
+ /* Only do command completion at the start of a line when we
+ are prompting at the top level. */
+ if (current_prompt_string == ps1_prompt)
+ in_command_position++;
+ }
+ else if (member (rl_line_buffer[ti], command_separator_chars))
+ {
+ in_command_position++;
+
+ if (check_redir (ti) == 1)
+ in_command_position = 0;
+ }
+ else
+ {
+ /* This still could be in command position. It is possible
+ that all of the previous words on the line are variable
+ assignments. */
+ }
+
+ /* Check that we haven't incorrectly flagged a closed command substitution
+ as indicating we're in a command position. */
+ if (in_command_position && ti >= 0 && rl_line_buffer[ti] == '`' &&
+ *text != '`' && unclosed_pair (rl_line_buffer, end, "`") == 0)
+ in_command_position = 0;
+
+ /* Special handling for command substitution. If *TEXT is a backquote,
+ it can be the start or end of an old-style command substitution, or
+ unmatched. If it's unmatched, both calls to unclosed_pair will
+ succeed. Don't bother if readline found a single quote and we are
+ completing on the substring. */
+ if (*text == '`' && rl_completion_quote_character != '\'' &&
+ (in_command_position || (unclosed_pair (rl_line_buffer, start, "`") &&
+ unclosed_pair (rl_line_buffer, end, "`"))))
+ matches = rl_completion_matches (text, command_subst_completion_function);
+
+#if defined (PROGRAMMABLE_COMPLETION)
+ /* Attempt programmable completion. */
+ if (matches == 0 && (in_command_position == 0 || text[0] == '\0') &&
+ prog_completion_enabled && (progcomp_size () > 0) &&
+ current_prompt_string == ps1_prompt)
+ {
+ int s, e, foundcs;
+ char *n;
+
+ /* XXX - don't free the members */
+ if (prog_complete_matches)
+ free (prog_complete_matches);
+ prog_complete_matches = (char **)NULL;
+
+ s = find_cmd_start (start);
+ e = find_cmd_end (end);
+ n = find_cmd_name (s);
+ if (e == 0 && e == s && text[0] == '\0')
+ prog_complete_matches = programmable_completions ("_EmptycmD_", text, s, e, &foundcs);
+ else if (e > s && assignment (n, 0) == 0)
+ prog_complete_matches = programmable_completions (n, text, s, e, &foundcs);
+ else
+ foundcs = 0;
+ FREE (n);
+ /* XXX - if we found a COMPSPEC for the command, just return whatever
+ the programmable completion code returns, and disable the default
+ filename completion that readline will do unless the COPT_DEFAULT
+ option has been set with the `-o default' option to complete or
+ compopt. */
+ if (foundcs)
+ {
+ pcomp_set_readline_variables (foundcs, 1);
+ /* Turn what the programmable completion code returns into what
+ readline wants. I should have made compute_lcd_of_matches
+ external... */
+ matches = rl_completion_matches (text, prog_complete_return);
+ if ((foundcs & COPT_DEFAULT) == 0)
+ rl_attempted_completion_over = 1; /* no default */
+ if (matches || ((foundcs & COPT_BASHDEFAULT) == 0))
+ return (matches);
+ }
+ }
+#endif
+
+ if (matches == 0)
+ {
+ dflags = 0;
+ if (in_command_position)
+ dflags |= DEFCOMP_CMDPOS;
+ matches = bash_default_completion (text, start, end, qc, dflags);
+ }
+
+ return matches;
+}
+
+char **
+bash_default_completion (text, start, end, qc, compflags)
+ const char *text;
+ int start, end, qc, compflags;
+{
+ char **matches;
+
+ matches = (char **)NULL;
+
+ /* New posix-style command substitution or variable name? */
+ if (!matches && *text == '$')
+ {
+ if (qc != '\'' && text[1] == '(') /* ) */
+ matches = rl_completion_matches (text, command_subst_completion_function);
+ else
+ matches = rl_completion_matches (text, variable_completion_function);
+ }
+
+ /* If the word starts in `~', and there is no slash in the word, then
+ try completing this word as a username. */
+ if (matches ==0 && *text == '~' && mbschr (text, '/') == 0)
+ matches = rl_completion_matches (text, rl_username_completion_function);
+
+ /* Another one. Why not? If the word starts in '@', then look through
+ the world of known hostnames for completion first. */
+ if (!matches && perform_hostname_completion && *text == '@')
+ matches = rl_completion_matches (text, hostname_completion_function);
+
+ /* And last, (but not least) if this word is in a command position, then
+ complete over possible command names, including aliases, functions,
+ and command names. */
+ if (matches == 0 && (compflags & DEFCOMP_CMDPOS))
+ {
+ /* If END == START and text[0] == 0, we are trying to complete an empty
+ command word. */
+ if (no_empty_command_completion && end == start && text[0] == '\0')
+ {
+ matches = (char **)NULL;
+ rl_ignore_some_completions_function = bash_ignore_everything;
+ }
+ else
+ {
+#define CMD_IS_DIR(x) (absolute_pathname(x) == 0 && absolute_program(x) == 0 && *(x) != '~' && test_for_directory (x))
+
+ dot_in_path = 0;
+ matches = rl_completion_matches (text, command_word_completion_function);
+
+ /* If we are attempting command completion and nothing matches, we
+ do not want readline to perform filename completion for us. We
+ still want to be able to complete partial pathnames, so set the
+ completion ignore function to something which will remove
+ filenames and leave directories in the match list. */
+ if (matches == (char **)NULL)
+ rl_ignore_some_completions_function = bash_ignore_filenames;
+ else if (matches[1] == 0 && CMD_IS_DIR(matches[0]) && dot_in_path == 0)
+ /* If we found a single match, without looking in the current
+ directory (because it's not in $PATH), but the found name is
+ also a command in the current directory, suppress appending any
+ terminating character, since it's ambiguous. */
+ {
+ rl_completion_suppress_append = 1;
+ rl_filename_completion_desired = 0;
+ }
+ else if (matches[0] && matches[1] && STREQ (matches[0], matches[1]) && CMD_IS_DIR (matches[0]))
+ /* There are multiple instances of the same match (duplicate
+ completions haven't yet been removed). In this case, all of
+ the matches will be the same, and the duplicate removal code
+ will distill them all down to one. We turn on
+ rl_completion_suppress_append for the same reason as above.
+ Remember: we only care if there's eventually a single unique
+ completion. If there are multiple completions this won't
+ make a difference and the problem won't occur. */
+ {
+ rl_completion_suppress_append = 1;
+ rl_filename_completion_desired = 0;
+ }
+ }
+ }
+
+ /* This could be a globbing pattern, so try to expand it using pathname
+ expansion. */
+ if (!matches && glob_pattern_p (text))
+ {
+ matches = rl_completion_matches (text, glob_complete_word);
+ /* A glob expression that matches more than one filename is problematic.
+ If we match more than one filename, punt. */
+ if (matches && matches[1] && rl_completion_type == TAB)
+ {
+ strvec_dispose (matches);
+ matches = (char **)0;
+ }
+ }
+
+ return (matches);
+}
+
+/* This is the function to call when the word to complete is in a position
+ where a command word can be found. It grovels $PATH, looking for commands
+ that match. It also scans aliases, function names, and the shell_builtin
+ table. */
+char *
+command_word_completion_function (hint_text, state)
+ const char *hint_text;
+ int state;
+{
+ static char *hint = (char *)NULL;
+ static char *path = (char *)NULL;
+ static char *val = (char *)NULL;
+ static char *filename_hint = (char *)NULL;
+ static char *dequoted_hint = (char *)NULL;
+ static char *directory_part = (char *)NULL;
+ static char **glob_matches = (char **)NULL;
+ static int path_index, hint_len, dequoted_len, istate, igncase;
+ static int mapping_over, local_index, searching_path, hint_is_dir;
+ static int old_glob_ignore_case, globpat;
+ static SHELL_VAR **varlist = (SHELL_VAR **)NULL;
+#if defined (ALIAS)
+ static alias_t **alias_list = (alias_t **)NULL;
+#endif /* ALIAS */
+ char *temp;
+
+ /* We have to map over the possibilities for command words. If we have
+ no state, then make one just for that purpose. */
+ if (state == 0)
+ {
+ if (dequoted_hint && dequoted_hint != hint)
+ free (dequoted_hint);
+ if (hint)
+ free (hint);
+
+ mapping_over = searching_path = 0;
+ hint_is_dir = CMD_IS_DIR (hint_text);
+ val = (char *)NULL;
+
+ temp = rl_variable_value ("completion-ignore-case");
+ igncase = RL_BOOLEAN_VARIABLE_VALUE (temp);
+
+ if (glob_matches)
+ {
+ free (glob_matches);
+ glob_matches = (char **)NULL;
+ }
+
+ globpat = glob_pattern_p (hint_text);
+
+ /* If this is an absolute program name, do not check it against
+ aliases, reserved words, functions or builtins. We must check
+ whether or not it is unique, and, if so, whether that filename
+ is executable. */
+ if (globpat || absolute_program (hint_text))
+ {
+ /* Perform tilde expansion on what's passed, so we don't end up
+ passing filenames with tildes directly to stat(). */
+ if (*hint_text == '~')
+ {
+ hint = bash_tilde_expand (hint_text, 0);
+ directory_part = savestring (hint_text);
+ temp = strchr (directory_part, '/');
+ if (temp)
+ *temp = 0;
+ else
+ {
+ free (directory_part);
+ directory_part = (char *)NULL;
+ }
+ }
+ else
+ hint = savestring (hint_text);
+
+ dequoted_hint = hint;
+ /* If readline's completer found a quote character somewhere, but
+ didn't set the quote character, there must have been a quote
+ character embedded in the filename. It can't be at the start of
+ the filename, so we need to dequote the filename before we look
+ in the file system for it. */
+ if (rl_completion_found_quote && rl_completion_quote_character == 0)
+ {
+ dequoted_hint = bash_dequote_filename (hint, 0);
+ free (hint);
+ hint = dequoted_hint;
+ }
+ dequoted_len = hint_len = strlen (hint);
+
+ if (filename_hint)
+ free (filename_hint);
+
+ filename_hint = savestring (hint);
+
+ istate = 0;
+
+ if (globpat)
+ {
+ mapping_over = 5;
+ goto globword;
+ }
+ else
+ {
+ mapping_over = 4;
+ goto inner;
+ }
+ }
+
+ dequoted_hint = hint = savestring (hint_text);
+ dequoted_len = hint_len = strlen (hint);
+
+ if (rl_completion_found_quote && rl_completion_quote_character == 0)
+ {
+ dequoted_hint = bash_dequote_filename (hint, 0);
+ dequoted_len = strlen (dequoted_hint);
+ }
+
+ path = get_string_value ("PATH");
+ path_index = dot_in_path = 0;
+
+ /* Initialize the variables for each type of command word. */
+ local_index = 0;
+
+ if (varlist)
+ free (varlist);
+
+ varlist = all_visible_functions ();
+
+#if defined (ALIAS)
+ if (alias_list)
+ free (alias_list);
+
+ alias_list = all_aliases ();
+#endif /* ALIAS */
+ }
+
+ /* mapping_over says what we are currently hacking. Note that every case
+ in this list must fall through when there are no more possibilities. */
+
+ switch (mapping_over)
+ {
+ case 0: /* Aliases come first. */
+#if defined (ALIAS)
+ while (alias_list && alias_list[local_index])
+ {
+ register char *alias;
+
+ alias = alias_list[local_index++]->name;
+
+ if (STREQN (alias, hint, hint_len))
+ return (savestring (alias));
+ }
+#endif /* ALIAS */
+ local_index = 0;
+ mapping_over++;
+
+ case 1: /* Then shell reserved words. */
+ {
+ while (word_token_alist[local_index].word)
+ {
+ register char *reserved_word;
+
+ reserved_word = word_token_alist[local_index++].word;
+
+ if (STREQN (reserved_word, hint, hint_len))
+ return (savestring (reserved_word));
+ }
+ local_index = 0;
+ mapping_over++;
+ }
+
+ case 2: /* Then function names. */
+ while (varlist && varlist[local_index])
+ {
+ register char *varname;
+
+ varname = varlist[local_index++]->name;
+
+ if (STREQN (varname, hint, hint_len))
+ return (savestring (varname));
+ }
+ local_index = 0;
+ mapping_over++;
+
+ case 3: /* Then shell builtins. */
+ for (; local_index < num_shell_builtins; local_index++)
+ {
+ /* Ignore it if it doesn't have a function pointer or if it
+ is not currently enabled. */
+ if (!shell_builtins[local_index].function ||
+ (shell_builtins[local_index].flags & BUILTIN_ENABLED) == 0)
+ continue;
+
+ if (STREQN (shell_builtins[local_index].name, hint, hint_len))
+ {
+ int i = local_index++;
+
+ return (savestring (shell_builtins[i].name));
+ }
+ }
+ local_index = 0;
+ mapping_over++;
+ }
+
+globword:
+ /* Limited support for completing command words with globbing chars. Only
+ a single match (multiple matches that end up reducing the number of
+ characters in the common prefix are bad) will ever be returned on
+ regular completion. */
+ if (globpat)
+ {
+ if (state == 0)
+ {
+ glob_ignore_case = igncase;
+ glob_matches = shell_glob_filename (hint);
+ glob_ignore_case = old_glob_ignore_case;
+
+ if (GLOB_FAILED (glob_matches) || glob_matches == 0)
+ {
+ glob_matches = (char **)NULL;
+ return ((char *)NULL);
+ }
+
+ local_index = 0;
+
+ if (glob_matches[1] && rl_completion_type == TAB) /* multiple matches are bad */
+ return ((char *)NULL);
+ }
+
+ while (val = glob_matches[local_index++])
+ {
+ if (executable_or_directory (val))
+ {
+ if (*hint_text == '~')
+ {
+ temp = restore_tilde (val, directory_part);
+ free (val);
+ val = temp;
+ }
+ return (val);
+ }
+ free (val);
+ }
+
+ glob_ignore_case = old_glob_ignore_case;
+ return ((char *)NULL);
+ }
+
+ /* If the text passed is a directory in the current directory, return it
+ as a possible match. Executables in directories in the current
+ directory can be specified using relative pathnames and successfully
+ executed even when `.' is not in $PATH. */
+ if (hint_is_dir)
+ {
+ hint_is_dir = 0; /* only return the hint text once */
+ return (savestring (hint_text));
+ }
+
+ /* Repeatedly call filename_completion_function while we have
+ members of PATH left. Question: should we stat each file?
+ Answer: we call executable_file () on each file. */
+ outer:
+
+ istate = (val != (char *)NULL);
+
+ if (istate == 0)
+ {
+ char *current_path;
+
+ /* Get the next directory from the path. If there is none, then we
+ are all done. */
+ if (path == 0 || path[path_index] == 0 ||
+ (current_path = extract_colon_unit (path, &path_index)) == 0)
+ return ((char *)NULL);
+
+ searching_path = 1;
+ if (*current_path == 0)
+ {
+ free (current_path);
+ current_path = savestring (".");
+ }
+
+ if (*current_path == '~')
+ {
+ char *t;
+
+ t = bash_tilde_expand (current_path, 0);
+ free (current_path);
+ current_path = t;
+ }
+
+ if (current_path[0] == '.' && current_path[1] == '\0')
+ dot_in_path = 1;
+
+ if (filename_hint)
+ free (filename_hint);
+
+ filename_hint = sh_makepath (current_path, hint, 0);
+ free (current_path); /* XXX */
+ }
+
+ inner:
+ val = rl_filename_completion_function (filename_hint, istate);
+ istate = 1;
+
+ if (val == 0)
+ {
+ /* If the hint text is an absolute program, then don't bother
+ searching through PATH. */
+ if (absolute_program (hint))
+ return ((char *)NULL);
+
+ goto outer;
+ }
+ else
+ {
+ int match, freetemp;
+
+ if (absolute_program (hint))
+ {
+ if (igncase == 0)
+ match = strncmp (val, hint, hint_len) == 0;
+ else
+ match = strncasecmp (val, hint, hint_len) == 0;
+
+ /* If we performed tilde expansion, restore the original
+ filename. */
+ if (*hint_text == '~')
+ temp = restore_tilde (val, directory_part);
+ else
+ temp = savestring (val);
+ freetemp = 1;
+ }
+ else
+ {
+ temp = strrchr (val, '/');
+
+ if (temp)
+ {
+ temp++;
+ if (igncase == 0)
+ freetemp = match = strncmp (temp, hint, hint_len) == 0;
+ else
+ freetemp = match = strncasecmp (temp, hint, hint_len) == 0;
+ if (match)
+ temp = savestring (temp);
+ }
+ else
+ freetemp = match = 0;
+ }
+
+#if 0
+ /* If we have found a match, and it is an executable file or a
+ directory name, return it. */
+ if (match && executable_or_directory (val))
+#else
+ /* If we have found a match, and it is an executable file, return it.
+ We don't return directory names when searching $PATH, since the
+ bash execution code won't find executables in directories which
+ appear in directories in $PATH when they're specified using
+ relative pathnames. */
+ if (match && (searching_path ? executable_file (val) : executable_or_directory (val)))
+#endif
+ {
+ free (val);
+ val = ""; /* So it won't be NULL. */
+ return (temp);
+ }
+ else
+ {
+ if (freetemp)
+ free (temp);
+ free (val);
+ goto inner;
+ }
+ }
+}
+
+/* Completion inside an unterminated command substitution. */
+static char *
+command_subst_completion_function (text, state)
+ const char *text;
+ int state;
+{
+ static char **matches = (char **)NULL;
+ static const char *orig_start;
+ static char *filename_text = (char *)NULL;
+ static int cmd_index, start_len;
+ char *value;
+
+ if (state == 0)
+ {
+ if (filename_text)
+ free (filename_text);
+ orig_start = text;
+ if (*text == '`')
+ text++;
+ else if (*text == '$' && text[1] == '(') /* ) */
+ text += 2;
+ /* If the text was quoted, suppress any quote character that the
+ readline completion code would insert. */
+ rl_completion_suppress_quote = 1;
+ start_len = text - orig_start;
+ filename_text = savestring (text);
+ if (matches)
+ free (matches);
+
+ /*
+ * At this point we can entertain the idea of re-parsing
+ * `filename_text' into a (possibly incomplete) command name and
+ * arguments, and doing completion based on that. This is
+ * currently very rudimentary, but it is a small improvement.
+ */
+ for (value = filename_text + strlen (filename_text) - 1; value > filename_text; value--)
+ if (whitespace (*value) || member (*value, COMMAND_SEPARATORS))
+ break;
+ if (value <= filename_text)
+ matches = rl_completion_matches (filename_text, command_word_completion_function);
+ else
+ {
+ value++;
+ start_len += value - filename_text;
+ if (whitespace (value[-1]))
+ matches = rl_completion_matches (value, rl_filename_completion_function);
+ else
+ matches = rl_completion_matches (value, command_word_completion_function);
+ }
+
+ /* If there is more than one match, rl_completion_matches has already
+ put the lcd in matches[0]. Skip over it. */
+ cmd_index = matches && matches[0] && matches[1];
+
+ /* If there's a single match and it's a directory, set the append char
+ to the expected `/'. Otherwise, don't append anything. */
+ if (matches && matches[0] && matches[1] == 0 && test_for_directory (matches[0]))
+ rl_completion_append_character = '/';
+ else
+ rl_completion_suppress_append = 1;
+ }
+
+ if (!matches || !matches[cmd_index])
+ {
+ rl_filename_quoting_desired = 0; /* disable quoting */
+ return ((char *)NULL);
+ }
+ else
+ {
+ value = (char *)xmalloc (1 + start_len + strlen (matches[cmd_index]));
+
+ if (start_len == 1)
+ value[0] = *orig_start;
+ else
+ strncpy (value, orig_start, start_len);
+
+ strcpy (value + start_len, matches[cmd_index]);
+
+ cmd_index++;
+ return (value);
+ }
+}
+
+/* Okay, now we write the entry_function for variable completion. */
+static char *
+variable_completion_function (text, state)
+ const char *text;
+ int state;
+{
+ static char **varlist = (char **)NULL;
+ static int varlist_index;
+ static char *varname = (char *)NULL;
+ static int namelen;
+ static int first_char, first_char_loc;
+
+ if (!state)
+ {
+ if (varname)
+ free (varname);
+
+ first_char_loc = 0;
+ first_char = text[0];
+
+ if (first_char == '$')
+ first_char_loc++;
+
+ if (text[first_char_loc] == '{')
+ first_char_loc++;
+
+ varname = savestring (text + first_char_loc);
+
+ namelen = strlen (varname);
+ if (varlist)
+ strvec_dispose (varlist);
+
+ varlist = all_variables_matching_prefix (varname);
+ varlist_index = 0;
+ }
+
+ if (!varlist || !varlist[varlist_index])
+ {
+ return ((char *)NULL);
+ }
+ else
+ {
+ char *value;
+
+ value = (char *)xmalloc (4 + strlen (varlist[varlist_index]));
+
+ if (first_char_loc)
+ {
+ value[0] = first_char;
+ if (first_char_loc == 2)
+ value[1] = '{';
+ }
+
+ strcpy (value + first_char_loc, varlist[varlist_index]);
+ if (first_char_loc == 2)
+ strcat (value, "}");
+
+ varlist_index++;
+ return (value);
+ }
+}
+
+/* How about a completion function for hostnames? */
+static char *
+hostname_completion_function (text, state)
+ const char *text;
+ int state;
+{
+ static char **list = (char **)NULL;
+ static int list_index = 0;
+ static int first_char, first_char_loc;
+
+ /* If we don't have any state, make some. */
+ if (state == 0)
+ {
+ FREE (list);
+
+ list = (char **)NULL;
+
+ first_char_loc = 0;
+ first_char = *text;
+
+ if (first_char == '@')
+ first_char_loc++;
+
+ list = hostnames_matching ((char *)text+first_char_loc);
+ list_index = 0;
+ }
+
+ if (list && list[list_index])
+ {
+ char *t;
+
+ t = (char *)xmalloc (2 + strlen (list[list_index]));
+ *t = first_char;
+ strcpy (t + first_char_loc, list[list_index]);
+ list_index++;
+ return (t);
+ }
+
+ return ((char *)NULL);
+}
+
+/*
+ * A completion function for service names from /etc/services (or wherever).
+ */
+char *
+bash_servicename_completion_function (text, state)
+ const char *text;
+ int state;
+{
+#if defined (__WIN32__) || defined (__OPENNT) || !defined (HAVE_GETSERVENT)
+ return ((char *)NULL);
+#else
+ static char *sname = (char *)NULL;
+ static struct servent *srvent;
+ static int snamelen, firstc;
+ char *value;
+ char **alist, *aentry;
+ int afound;
+
+ if (state == 0)
+ {
+ FREE (sname);
+ firstc = *text;
+
+ sname = savestring (text);
+ snamelen = strlen (sname);
+ setservent (0);
+ }
+
+ while (srvent = getservent ())
+ {
+ afound = 0;
+ if (snamelen == 0 || (STREQN (sname, srvent->s_name, snamelen)))
+ break;
+ /* Not primary, check aliases */
+ for (alist = srvent->s_aliases; *alist; alist++)
+ {
+ aentry = *alist;
+ if (STREQN (sname, aentry, snamelen))
+ {
+ afound = 1;
+ break;
+ }
+ }
+
+ if (afound)
+ break;
+ }
+
+ if (srvent == 0)
+ {
+ endservent ();
+ return ((char *)NULL);
+ }
+
+ value = afound ? savestring (aentry) : savestring (srvent->s_name);
+ return value;
+#endif
+}
+
+/*
+ * A completion function for group names from /etc/group (or wherever).
+ */
+char *
+bash_groupname_completion_function (text, state)
+ const char *text;
+ int state;
+{
+#if defined (__WIN32__) || defined (__OPENNT) || !defined (HAVE_GRP_H)
+ return ((char *)NULL);
+#else
+ static char *gname = (char *)NULL;
+ static struct group *grent;
+ static int gnamelen;
+ char *value;
+
+ if (state == 0)
+ {
+ FREE (gname);
+ gname = savestring (text);
+ gnamelen = strlen (gname);
+
+ setgrent ();
+ }
+
+ while (grent = getgrent ())
+ {
+ if (gnamelen == 0 || (STREQN (gname, grent->gr_name, gnamelen)))
+ break;
+ }
+
+ if (grent == 0)
+ {
+ endgrent ();
+ return ((char *)NULL);
+ }
+
+ value = savestring (grent->gr_name);
+ return (value);
+#endif
+}
+
+/* Functions to perform history and alias expansions on the current line. */
+
+#if defined (BANG_HISTORY)
+/* Perform history expansion on the current line. If no history expansion
+ is done, pre_process_line() returns what it was passed, so we need to
+ allocate a new line here. */
+static char *
+history_expand_line_internal (line)
+ char *line;
+{
+ char *new_line;
+ int old_verify;
+
+ old_verify = hist_verify;
+ hist_verify = 0;
+ new_line = pre_process_line (line, 0, 0);
+ hist_verify = old_verify;
+
+ return (new_line == line) ? savestring (line) : new_line;
+}
+#endif
+
+/* There was an error in expansion. Let the preprocessor print
+ the error here. */
+static void
+cleanup_expansion_error ()
+{
+ char *to_free;
+#if defined (BANG_HISTORY)
+ int old_verify;
+
+ old_verify = hist_verify;
+ hist_verify = 0;
+#endif
+
+ fprintf (rl_outstream, "\r\n");
+ to_free = pre_process_line (rl_line_buffer, 1, 0);
+#if defined (BANG_HISTORY)
+ hist_verify = old_verify;
+#endif
+ if (to_free != rl_line_buffer)
+ FREE (to_free);
+ putc ('\r', rl_outstream);
+ rl_forced_update_display ();
+}
+
+/* If NEW_LINE differs from what is in the readline line buffer, add an
+ undo record to get from the readline line buffer contents to the new
+ line and make NEW_LINE the current readline line. */
+static void
+maybe_make_readline_line (new_line)
+ char *new_line;
+{
+ if (strcmp (new_line, rl_line_buffer) != 0)
+ {
+ rl_point = rl_end;
+
+ rl_add_undo (UNDO_BEGIN, 0, 0, 0);
+ rl_delete_text (0, rl_point);
+ rl_point = rl_end = rl_mark = 0;
+ rl_insert_text (new_line);
+ rl_add_undo (UNDO_END, 0, 0, 0);
+ }
+}
+
+/* Make NEW_LINE be the current readline line. This frees NEW_LINE. */
+static void
+set_up_new_line (new_line)
+ char *new_line;
+{
+ int old_point, at_end;
+
+ old_point = rl_point;
+ at_end = rl_point == rl_end;
+
+ /* If the line was history and alias expanded, then make that
+ be one thing to undo. */
+ maybe_make_readline_line (new_line);
+ free (new_line);
+
+ /* Place rl_point where we think it should go. */
+ if (at_end)
+ rl_point = rl_end;
+ else if (old_point < rl_end)
+ {
+ rl_point = old_point;
+ if (!whitespace (rl_line_buffer[rl_point]))
+ rl_forward_word (1, 0);
+ }
+}
+
+#if defined (ALIAS)
+/* Expand aliases in the current readline line. */
+static int
+alias_expand_line (count, ignore)
+ int count, ignore;
+{
+ char *new_line;
+
+ new_line = alias_expand (rl_line_buffer);
+
+ if (new_line)
+ {
+ set_up_new_line (new_line);
+ return (0);
+ }
+ else
+ {
+ cleanup_expansion_error ();
+ return (1);
+ }
+}
+#endif
+
+#if defined (BANG_HISTORY)
+/* History expand the line. */
+static int
+history_expand_line (count, ignore)
+ int count, ignore;
+{
+ char *new_line;
+
+ new_line = history_expand_line_internal (rl_line_buffer);
+
+ if (new_line)
+ {
+ set_up_new_line (new_line);
+ return (0);
+ }
+ else
+ {
+ cleanup_expansion_error ();
+ return (1);
+ }
+}
+
+/* Expand history substitutions in the current line and then insert a
+ space (hopefully close to where we were before). */
+static int
+tcsh_magic_space (count, ignore)
+ int count, ignore;
+{
+ int dist_from_end, old_point;
+
+ old_point = rl_point;
+ dist_from_end = rl_end - rl_point;
+ if (history_expand_line (count, ignore) == 0)
+ {
+ /* Try a simple heuristic from Stephen Gildea <gildea@intouchsys.com>.
+ This works if all expansions were before rl_point or if no expansions
+ were performed. */
+ rl_point = (old_point == 0) ? old_point : rl_end - dist_from_end;
+ rl_insert (1, ' ');
+ return (0);
+ }
+ else
+ return (1);
+}
+#endif /* BANG_HISTORY */
+
+/* History and alias expand the line. */
+static int
+history_and_alias_expand_line (count, ignore)
+ int count, ignore;
+{
+ char *new_line;
+
+ new_line = 0;
+#if defined (BANG_HISTORY)
+ new_line = history_expand_line_internal (rl_line_buffer);
+#endif
+
+#if defined (ALIAS)
+ if (new_line)
+ {
+ char *alias_line;
+
+ alias_line = alias_expand (new_line);
+ free (new_line);
+ new_line = alias_line;
+ }
+#endif /* ALIAS */
+
+ if (new_line)
+ {
+ set_up_new_line (new_line);
+ return (0);
+ }
+ else
+ {
+ cleanup_expansion_error ();
+ return (1);
+ }
+}
+
+/* History and alias expand the line, then perform the shell word
+ expansions by calling expand_string. This can't use set_up_new_line()
+ because we want the variable expansions as a separate undo'able
+ set of operations. */
+static int
+shell_expand_line (count, ignore)
+ int count, ignore;
+{
+ char *new_line;
+ WORD_LIST *expanded_string;
+
+ new_line = 0;
+#if defined (BANG_HISTORY)
+ new_line = history_expand_line_internal (rl_line_buffer);
+#endif
+
+#if defined (ALIAS)
+ if (new_line)
+ {
+ char *alias_line;
+
+ alias_line = alias_expand (new_line);
+ free (new_line);
+ new_line = alias_line;
+ }
+#endif /* ALIAS */
+
+ if (new_line)
+ {
+ int old_point = rl_point;
+ int at_end = rl_point == rl_end;
+
+ /* If the line was history and alias expanded, then make that
+ be one thing to undo. */
+ maybe_make_readline_line (new_line);
+ free (new_line);
+
+ /* If there is variable expansion to perform, do that as a separate
+ operation to be undone. */
+ new_line = savestring (rl_line_buffer);
+ expanded_string = expand_string (new_line, 0);
+ FREE (new_line);
+ if (expanded_string == 0)
+ {
+ new_line = (char *)xmalloc (1);
+ new_line[0] = '\0';
+ }
+ else
+ {
+ new_line = string_list (expanded_string);
+ dispose_words (expanded_string);
+ }
+
+ maybe_make_readline_line (new_line);
+ free (new_line);
+
+ /* Place rl_point where we think it should go. */
+ if (at_end)
+ rl_point = rl_end;
+ else if (old_point < rl_end)
+ {
+ rl_point = old_point;
+ if (!whitespace (rl_line_buffer[rl_point]))
+ rl_forward_word (1, 0);
+ }
+ return 0;
+ }
+ else
+ {
+ cleanup_expansion_error ();
+ return 1;
+ }
+}
+
+/* If FIGNORE is set, then don't match files with the given suffixes when
+ completing filenames. If only one of the possibilities has an acceptable
+ suffix, delete the others, else just return and let the completer
+ signal an error. It is called by the completer when real
+ completions are done on filenames by the completer's internal
+ function, not for completion lists (M-?) and not on "other"
+ completion types, such as hostnames or commands. */
+
+static struct ignorevar fignore =
+{
+ "FIGNORE",
+ (struct ign *)0,
+ 0,
+ (char *)0,
+ (sh_iv_item_func_t *) 0,
+};
+
+static void
+_ignore_completion_names (names, name_func)
+ char **names;
+ sh_ignore_func_t *name_func;
+{
+ char **newnames;
+ int idx, nidx;
+ char **oldnames;
+ int oidx;
+
+ /* If there is only one completion, see if it is acceptable. If it is
+ not, free it up. In any case, short-circuit and return. This is a
+ special case because names[0] is not the prefix of the list of names
+ if there is only one completion; it is the completion itself. */
+ if (names[1] == (char *)0)
+ {
+ if (force_fignore)
+ if ((*name_func) (names[0]) == 0)
+ {
+ free (names[0]);
+ names[0] = (char *)NULL;
+ }
+
+ return;
+ }
+
+ /* Allocate space for array to hold list of pointers to matching
+ filenames. The pointers are copied back to NAMES when done. */
+ for (nidx = 1; names[nidx]; nidx++)
+ ;
+ newnames = strvec_create (nidx + 1);
+
+ if (force_fignore == 0)
+ {
+ oldnames = strvec_create (nidx - 1);
+ oidx = 0;
+ }
+
+ newnames[0] = names[0];
+ for (idx = nidx = 1; names[idx]; idx++)
+ {
+ if ((*name_func) (names[idx]))
+ newnames[nidx++] = names[idx];
+ else if (force_fignore == 0)
+ oldnames[oidx++] = names[idx];
+ else
+ free (names[idx]);
+ }
+
+ newnames[nidx] = (char *)NULL;
+
+ /* If none are acceptable then let the completer handle it. */
+ if (nidx == 1)
+ {
+ if (force_fignore)
+ {
+ free (names[0]);
+ names[0] = (char *)NULL;
+ }
+ else
+ free (oldnames);
+
+ free (newnames);
+ return;
+ }
+
+ if (force_fignore == 0)
+ {
+ while (oidx)
+ free (oldnames[--oidx]);
+ free (oldnames);
+ }
+
+ /* If only one is acceptable, copy it to names[0] and return. */
+ if (nidx == 2)
+ {
+ free (names[0]);
+ names[0] = newnames[1];
+ names[1] = (char *)NULL;
+ free (newnames);
+ return;
+ }
+
+ /* Copy the acceptable names back to NAMES, set the new array end,
+ and return. */
+ for (nidx = 1; newnames[nidx]; nidx++)
+ names[nidx] = newnames[nidx];
+ names[nidx] = (char *)NULL;
+ free (newnames);
+}
+
+static int
+name_is_acceptable (name)
+ const char *name;
+{
+ struct ign *p;
+ int nlen;
+
+ for (nlen = strlen (name), p = fignore.ignores; p->val; p++)
+ {
+ if (nlen > p->len && p->len > 0 && STREQ (p->val, &name[nlen - p->len]))
+ return (0);
+ }
+
+ return (1);
+}
+
+#if 0
+static int
+ignore_dot_names (name)
+ char *name;
+{
+ return (name[0] != '.');
+}
+#endif
+
+static int
+filename_completion_ignore (names)
+ char **names;
+{
+#if 0
+ if (glob_dot_filenames == 0)
+ _ignore_completion_names (names, ignore_dot_names);
+#endif
+
+ setup_ignore_patterns (&fignore);
+
+ if (fignore.num_ignores == 0)
+ return 0;
+
+ _ignore_completion_names (names, name_is_acceptable);
+
+ return 0;
+}
+
+/* Return 1 if NAME is a directory. NAME undergoes tilde expansion. */
+static int
+test_for_directory (name)
+ const char *name;
+{
+ char *fn;
+ int r;
+
+ fn = bash_tilde_expand (name, 0);
+ r = file_isdir (fn);
+ free (fn);
+
+ return (r);
+}
+
+/* Remove files from NAMES, leaving directories. */
+static int
+bash_ignore_filenames (names)
+ char **names;
+{
+ _ignore_completion_names (names, test_for_directory);
+ return 0;
+}
+
+static int
+return_zero (name)
+ const char *name;
+{
+ return 0;
+}
+
+static int
+bash_ignore_everything (names)
+ char **names;
+{
+ _ignore_completion_names (names, return_zero);
+ return 0;
+}
+
+/* Replace a tilde-prefix in VAL with a `~', assuming the user typed it. VAL
+ is an expanded filename. DIRECTORY_PART is the tilde-prefix portion
+ of the un-tilde-expanded version of VAL (what the user typed). */
+static char *
+restore_tilde (val, directory_part)
+ char *val, *directory_part;
+{
+ int l, vl, dl2, xl;
+ char *dh2, *expdir, *ret;
+
+ vl = strlen (val);
+
+ /* We need to duplicate the expansions readline performs on the directory
+ portion before passing it to our completion function. */
+ dh2 = directory_part ? bash_dequote_filename (directory_part, 0) : 0;
+ bash_directory_expansion (&dh2);
+ dl2 = strlen (dh2);
+
+ expdir = bash_tilde_expand (directory_part, 0);
+ xl = strlen (expdir);
+ free (expdir);
+
+ /*
+ dh2 = unexpanded but dequoted tilde-prefix
+ dl2 = length of tilde-prefix
+ expdir = tilde-expanded tilde-prefix
+ xl = length of expanded tilde-prefix
+ l = length of remainder after tilde-prefix
+ */
+ l = (vl - xl) + 1;
+
+ ret = (char *)xmalloc (dl2 + 2 + l);
+ strcpy (ret, dh2);
+ strcpy (ret + dl2, val + xl);
+
+ free (dh2);
+ return (ret);
+}
+
+/* Simulate the expansions that will be performed by
+ rl_filename_completion_function. This must be called with the address of
+ a pointer to malloc'd memory. */
+static void
+bash_directory_expansion (dirname)
+ char **dirname;
+{
+ char *d, *nd;
+
+ d = savestring (*dirname);
+
+ if (rl_directory_rewrite_hook)
+ (*rl_directory_rewrite_hook) (&d);
+
+ if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&d))
+ {
+ free (*dirname);
+ *dirname = d;
+ }
+ else if (rl_completion_found_quote)
+ {
+ nd = bash_dequote_filename (d, rl_completion_quote_character);
+ free (*dirname);
+ free (d);
+ *dirname = nd;
+ }
+}
+
+/* If necessary, rewrite directory entry */
+static char *
+bash_filename_rewrite_hook (fname, fnlen)
+ char *fname;
+ int fnlen;
+{
+ char *conv;
+
+ conv = fnx_fromfs (fname, fnlen);
+ if (conv != fname)
+ conv = savestring (conv);
+ return conv;
+}
+
+/* Handle symbolic link references and other directory name
+ expansions while hacking completion. */
+static int
+bash_directory_completion_hook (dirname)
+ char **dirname;
+{
+ char *local_dirname, *new_dirname, *t;
+ int return_value, should_expand_dirname;
+ WORD_LIST *wl;
+ struct stat sb;
+
+ return_value = should_expand_dirname = 0;
+ local_dirname = *dirname;
+
+ if (mbschr (local_dirname, '$'))
+ should_expand_dirname = 1;
+ else
+ {
+ t = mbschr (local_dirname, '`');
+ if (t && unclosed_pair (local_dirname, strlen (local_dirname), "`") == 0)
+ should_expand_dirname = 1;
+ }
+
+#if defined (HAVE_LSTAT)
+ if (should_expand_dirname && lstat (local_dirname, &sb) == 0)
+#else
+ if (should_expand_dirname && stat (local_dirname, &sb) == 0)
+#endif
+ should_expand_dirname = 0;
+
+ if (should_expand_dirname)
+ {
+ new_dirname = savestring (local_dirname);
+ wl = expand_prompt_string (new_dirname, 0, W_NOCOMSUB); /* does the right thing */
+ if (wl)
+ {
+ *dirname = string_list (wl);
+ /* Tell the completer to replace the directory name only if we
+ actually expanded something. */
+ return_value = STREQ (local_dirname, *dirname) == 0;
+ free (local_dirname);
+ free (new_dirname);
+ dispose_words (wl);
+ local_dirname = *dirname;
+ }
+ else
+ {
+ free (new_dirname);
+ free (local_dirname);
+ *dirname = (char *)xmalloc (1);
+ **dirname = '\0';
+ return 1;
+ }
+ }
+ else
+ {
+ /* Dequote the filename even if we don't expand it. */
+ new_dirname = bash_dequote_filename (local_dirname, rl_completion_quote_character);
+ free (local_dirname);
+ local_dirname = *dirname = new_dirname;
+ }
+
+ if (no_symbolic_links == 0 && (local_dirname[0] != '.' || local_dirname[1]))
+ {
+ char *temp1, *temp2;
+ int len1, len2;
+
+ t = get_working_directory ("symlink-hook");
+ temp1 = make_absolute (local_dirname, t);
+ free (t);
+ temp2 = sh_canonpath (temp1, PATH_CHECKDOTDOT|PATH_CHECKEXISTS);
+
+ /* Try spelling correction if initial canonicalization fails. */
+ if (temp2 == 0 && dircomplete_spelling)
+ {
+ temp2 = dirspell (temp1);
+ if (temp2)
+ {
+ free (temp1);
+ temp1 = temp2;
+ temp2 = sh_canonpath (temp1, PATH_CHECKDOTDOT|PATH_CHECKEXISTS);
+ return_value = temp2 != 0;
+ }
+ }
+ /* If we can't canonicalize, bail. */
+ if (temp2 == 0)
+ {
+ free (temp1);
+ return 1;
+ }
+ len1 = strlen (temp1);
+ if (temp1[len1 - 1] == '/')
+ {
+ len2 = strlen (temp2);
+ if (len2 > 2) /* don't append `/' to `/' or `//' */
+ {
+ temp2 = (char *)xrealloc (temp2, len2 + 2);
+ temp2[len2] = '/';
+ temp2[len2 + 1] = '\0';
+ }
+ }
+ free (local_dirname);
+ *dirname = temp2;
+ free (temp1);
+ }
+ return (return_value);
+}
+
+static char **history_completion_array = (char **)NULL;
+static int harry_size;
+static int harry_len;
+
+static void
+build_history_completion_array ()
+{
+ register int i, j;
+ HIST_ENTRY **hlist;
+ char **tokens;
+
+ /* First, clear out the current dynamic history completion list. */
+ if (harry_size)
+ {
+ strvec_dispose (history_completion_array);
+ history_completion_array = (char **)NULL;
+ harry_size = 0;
+ harry_len = 0;
+ }
+
+ /* Next, grovel each line of history, making each shell-sized token
+ a separate entry in the history_completion_array. */
+ hlist = history_list ();
+
+ if (hlist)
+ {
+ for (i = 0; hlist[i]; i++)
+ ;
+ for ( --i; i >= 0; i--)
+ {
+ /* Separate each token, and place into an array. */
+ tokens = history_tokenize (hlist[i]->line);
+
+ for (j = 0; tokens && tokens[j]; j++)
+ {
+ if (harry_len + 2 > harry_size)
+ history_completion_array = strvec_resize (history_completion_array, harry_size += 10);
+
+ history_completion_array[harry_len++] = tokens[j];
+ history_completion_array[harry_len] = (char *)NULL;
+ }
+ free (tokens);
+ }
+
+ /* Sort the complete list of tokens. */
+ if (dabbrev_expand_active == 0)
+ qsort (history_completion_array, harry_len, sizeof (char *), (QSFUNC *)strvec_strcmp);
+ }
+}
+
+static char *
+history_completion_generator (hint_text, state)
+ const char *hint_text;
+ int state;
+{
+ static int local_index, len;
+ static const char *text;
+
+ /* If this is the first call to the generator, then initialize the
+ list of strings to complete over. */
+ if (state == 0)
+ {
+ if (dabbrev_expand_active) /* This is kind of messy */
+ rl_completion_suppress_append = 1;
+ local_index = 0;
+ build_history_completion_array ();
+ text = hint_text;
+ len = strlen (text);
+ }
+
+ while (history_completion_array && history_completion_array[local_index])
+ {
+ if (strncmp (text, history_completion_array[local_index++], len) == 0)
+ return (savestring (history_completion_array[local_index - 1]));
+ }
+ return ((char *)NULL);
+}
+
+static int
+dynamic_complete_history (count, key)
+ int count, key;
+{
+ int r;
+ rl_compentry_func_t *orig_func;
+ rl_completion_func_t *orig_attempt_func;
+
+ orig_func = rl_completion_entry_function;
+ orig_attempt_func = rl_attempted_completion_function;
+
+ rl_completion_entry_function = history_completion_generator;
+ rl_attempted_completion_function = (rl_completion_func_t *)NULL;
+
+ /* XXX - use rl_completion_mode here? */
+ if (rl_last_func == dynamic_complete_history)
+ r = rl_complete_internal ('?');
+ else
+ r = rl_complete_internal (TAB);
+
+ rl_completion_entry_function = orig_func;
+ rl_attempted_completion_function = orig_attempt_func;
+ return r;
+}
+
+static int
+bash_dabbrev_expand (count, key)
+ int count, key;
+{
+ int r, orig_suppress, orig_sort;
+ rl_compentry_func_t *orig_func;
+ rl_completion_func_t *orig_attempt_func;
+
+ orig_func = rl_menu_completion_entry_function;
+ orig_attempt_func = rl_attempted_completion_function;
+ orig_suppress = rl_completion_suppress_append;
+ orig_sort = rl_sort_completion_matches;
+
+ rl_menu_completion_entry_function = history_completion_generator;
+ rl_attempted_completion_function = (rl_completion_func_t *)NULL;
+ rl_filename_completion_desired = 0;
+ rl_completion_suppress_append = 1;
+ rl_sort_completion_matches = 0;
+
+ /* XXX - use rl_completion_mode here? */
+ dabbrev_expand_active = 1;
+ if (rl_last_func == bash_dabbrev_expand)
+ rl_last_func = rl_menu_complete;
+ r = rl_menu_complete (count, key);
+ dabbrev_expand_active = 0;
+
+ rl_last_func = bash_dabbrev_expand;
+ rl_menu_completion_entry_function = orig_func;
+ rl_attempted_completion_function = orig_attempt_func;
+ rl_completion_suppress_append = orig_suppress;
+ rl_sort_completion_matches = orig_sort;
+
+ return r;
+}
+
+#if defined (SPECIFIC_COMPLETION_FUNCTIONS)
+static int
+bash_complete_username (ignore, ignore2)
+ int ignore, ignore2;
+{
+ return bash_complete_username_internal (rl_completion_mode (bash_complete_username));
+}
+
+static int
+bash_possible_username_completions (ignore, ignore2)
+ int ignore, ignore2;
+{
+ return bash_complete_username_internal ('?');
+}
+
+static int
+bash_complete_username_internal (what_to_do)
+ int what_to_do;
+{
+ return bash_specific_completion (what_to_do, rl_username_completion_function);
+}
+
+static int
+bash_complete_filename (ignore, ignore2)
+ int ignore, ignore2;
+{
+ return bash_complete_filename_internal (rl_completion_mode (bash_complete_filename));
+}
+
+static int
+bash_possible_filename_completions (ignore, ignore2)
+ int ignore, ignore2;
+{
+ return bash_complete_filename_internal ('?');
+}
+
+static int
+bash_complete_filename_internal (what_to_do)
+ int what_to_do;
+{
+ rl_compentry_func_t *orig_func;
+ rl_completion_func_t *orig_attempt_func;
+ rl_icppfunc_t *orig_dir_func;
+ /*const*/ char *orig_rl_completer_word_break_characters;
+ int r;
+
+ orig_func = rl_completion_entry_function;
+ orig_attempt_func = rl_attempted_completion_function;
+ orig_dir_func = rl_directory_completion_hook;
+ orig_rl_completer_word_break_characters = rl_completer_word_break_characters;
+ rl_completion_entry_function = rl_filename_completion_function;
+ rl_attempted_completion_function = (rl_completion_func_t *)NULL;
+ rl_directory_completion_hook = (rl_icppfunc_t *)NULL;
+ rl_completer_word_break_characters = " \t\n\"\'";
+
+ r = rl_complete_internal (what_to_do);
+
+ rl_completion_entry_function = orig_func;
+ rl_attempted_completion_function = orig_attempt_func;
+ rl_directory_completion_hook = orig_dir_func;
+ rl_completer_word_break_characters = orig_rl_completer_word_break_characters;
+
+ return r;
+}
+
+static int
+bash_complete_hostname (ignore, ignore2)
+ int ignore, ignore2;
+{
+ return bash_complete_hostname_internal (rl_completion_mode (bash_complete_hostname));
+}
+
+static int
+bash_possible_hostname_completions (ignore, ignore2)
+ int ignore, ignore2;
+{
+ return bash_complete_hostname_internal ('?');
+}
+
+static int
+bash_complete_variable (ignore, ignore2)
+ int ignore, ignore2;
+{
+ return bash_complete_variable_internal (rl_completion_mode (bash_complete_variable));
+}
+
+static int
+bash_possible_variable_completions (ignore, ignore2)
+ int ignore, ignore2;
+{
+ return bash_complete_variable_internal ('?');
+}
+
+static int
+bash_complete_command (ignore, ignore2)
+ int ignore, ignore2;
+{
+ return bash_complete_command_internal (rl_completion_mode (bash_complete_command));
+}
+
+static int
+bash_possible_command_completions (ignore, ignore2)
+ int ignore, ignore2;
+{
+ return bash_complete_command_internal ('?');
+}
+
+static int
+bash_complete_hostname_internal (what_to_do)
+ int what_to_do;
+{
+ return bash_specific_completion (what_to_do, hostname_completion_function);
+}
+
+static int
+bash_complete_variable_internal (what_to_do)
+ int what_to_do;
+{
+ return bash_specific_completion (what_to_do, variable_completion_function);
+}
+
+static int
+bash_complete_command_internal (what_to_do)
+ int what_to_do;
+{
+ return bash_specific_completion (what_to_do, command_word_completion_function);
+}
+
+static char *globtext;
+static char *globorig;
+
+static char *
+glob_complete_word (text, state)
+ const char *text;
+ int state;
+{
+ static char **matches = (char **)NULL;
+ static int ind;
+ int glen;
+ char *ret, *ttext;
+
+ if (state == 0)
+ {
+ rl_filename_completion_desired = 1;
+ FREE (matches);
+ if (globorig != globtext)
+ FREE (globorig);
+ FREE (globtext);
+
+ ttext = bash_tilde_expand (text, 0);
+
+ if (rl_explicit_arg)
+ {
+ globorig = savestring (ttext);
+ glen = strlen (ttext);
+ globtext = (char *)xmalloc (glen + 2);
+ strcpy (globtext, ttext);
+ globtext[glen] = '*';
+ globtext[glen+1] = '\0';
+ }
+ else
+ globtext = globorig = savestring (ttext);
+
+ if (ttext != text)
+ free (ttext);
+
+ matches = shell_glob_filename (globtext);
+ if (GLOB_FAILED (matches))
+ matches = (char **)NULL;
+ ind = 0;
+ }
+
+ ret = matches ? matches[ind] : (char *)NULL;
+ ind++;
+ return ret;
+}
+
+static int
+bash_glob_completion_internal (what_to_do)
+ int what_to_do;
+{
+ return bash_specific_completion (what_to_do, glob_complete_word);
+}
+
+/* A special quoting function so we don't end up quoting globbing characters
+ in the word if there are no matches or multiple matches. */
+static char *
+bash_glob_quote_filename (s, rtype, qcp)
+ char *s;
+ int rtype;
+ char *qcp;
+{
+ if (globorig && qcp && *qcp == '\0' && STREQ (s, globorig))
+ return (savestring (s));
+ else
+ return (bash_quote_filename (s, rtype, qcp));
+}
+
+static int
+bash_glob_complete_word (count, key)
+ int count, key;
+{
+ int r;
+ rl_quote_func_t *orig_quoting_function;
+
+ if (rl_editing_mode == EMACS_EDITING_MODE)
+ rl_explicit_arg = 1; /* force `*' append */
+ orig_quoting_function = rl_filename_quoting_function;
+ rl_filename_quoting_function = bash_glob_quote_filename;
+
+ r = bash_glob_completion_internal (rl_completion_mode (bash_glob_complete_word));
+
+ rl_filename_quoting_function = orig_quoting_function;
+ return r;
+}
+
+static int
+bash_glob_expand_word (count, key)
+ int count, key;
+{
+ return bash_glob_completion_internal ('*');
+}
+
+static int
+bash_glob_list_expansions (count, key)
+ int count, key;
+{
+ return bash_glob_completion_internal ('?');
+}
+
+static int
+bash_specific_completion (what_to_do, generator)
+ int what_to_do;
+ rl_compentry_func_t *generator;
+{
+ rl_compentry_func_t *orig_func;
+ rl_completion_func_t *orig_attempt_func;
+ int r;
+
+ orig_func = rl_completion_entry_function;
+ orig_attempt_func = rl_attempted_completion_function;
+ rl_completion_entry_function = generator;
+ rl_attempted_completion_function = NULL;
+
+ r = rl_complete_internal (what_to_do);
+
+ rl_completion_entry_function = orig_func;
+ rl_attempted_completion_function = orig_attempt_func;
+
+ return r;
+}
+
+#endif /* SPECIFIC_COMPLETION_FUNCTIONS */
+
+#if defined (VI_MODE)
+/* Completion, from vi mode's point of view. This is a modified version of
+ rl_vi_complete which uses the bash globbing code to implement what POSIX
+ specifies, which is to append a `*' and attempt filename generation (which
+ has the side effect of expanding any globbing characters in the word). */
+static int
+bash_vi_complete (count, key)
+ int count, key;
+{
+#if defined (SPECIFIC_COMPLETION_FUNCTIONS)
+ int p, r;
+ char *t;
+
+ if ((rl_point < rl_end) && (!whitespace (rl_line_buffer[rl_point])))
+ {
+ if (!whitespace (rl_line_buffer[rl_point + 1]))
+ rl_vi_end_word (1, 'E');
+ rl_point++;
+ }
+
+ /* Find boundaries of current word, according to vi definition of a
+ `bigword'. */
+ t = 0;
+ if (rl_point > 0)
+ {
+ p = rl_point;
+ rl_vi_bWord (1, 'B');
+ r = rl_point;
+ rl_point = p;
+ p = r;
+
+ t = substring (rl_line_buffer, p, rl_point);
+ }
+
+ if (t && glob_pattern_p (t) == 0)
+ rl_explicit_arg = 1; /* XXX - force glob_complete_word to append `*' */
+ FREE (t);
+
+ if (key == '*') /* Expansion and replacement. */
+ r = bash_glob_expand_word (count, key);
+ else if (key == '=') /* List possible completions. */
+ r = bash_glob_list_expansions (count, key);
+ else if (key == '\\') /* Standard completion */
+ r = bash_glob_complete_word (count, key);
+ else
+ r = rl_complete (0, key);
+
+ if (key == '*' || key == '\\')
+ rl_vi_start_inserting (key, 1, 1);
+
+ return (r);
+#else
+ return rl_vi_complete (count, key);
+#endif /* !SPECIFIC_COMPLETION_FUNCTIONS */
+}
+#endif /* VI_MODE */
+
+/* Filename quoting for completion. */
+/* A function to strip unquoted quote characters (single quotes, double
+ quotes, and backslashes). It allows single quotes to appear
+ within double quotes, and vice versa. It should be smarter. */
+static char *
+bash_dequote_filename (text, quote_char)
+ char *text;
+ int quote_char;
+{
+ char *ret, *p, *r;
+ int l, quoted;
+
+ l = strlen (text);
+ ret = (char *)xmalloc (l + 1);
+ for (quoted = quote_char, p = text, r = ret; p && *p; p++)
+ {
+ /* Allow backslash-escaped characters to pass through unscathed. */
+ if (*p == '\\')
+ {
+ /* Backslashes are preserved within single quotes. */
+ if (quoted == '\'')
+ *r++ = *p;
+ /* Backslashes are preserved within double quotes unless the
+ character is one that is defined to be escaped */
+ else if (quoted == '"' && ((sh_syntaxtab[p[1]] & CBSDQUOTE) == 0))
+ *r++ = *p;
+
+ *r++ = *++p;
+ if (*p == '\0')
+ return ret; /* XXX - was break; */
+ continue;
+ }
+ /* Close quote. */
+ if (quoted && *p == quoted)
+ {
+ quoted = 0;
+ continue;
+ }
+ /* Open quote. */
+ if (quoted == 0 && (*p == '\'' || *p == '"'))
+ {
+ quoted = *p;
+ continue;
+ }
+ *r++ = *p;
+ }
+ *r = '\0';
+ return ret;
+}
+
+/* Quote characters that the readline completion code would treat as
+ word break characters with backslashes. Pass backslash-quoted
+ characters through without examination. */
+static char *
+quote_word_break_chars (text)
+ char *text;
+{
+ char *ret, *r, *s;
+ int l;
+
+ l = strlen (text);
+ ret = (char *)xmalloc ((2 * l) + 1);
+ for (s = text, r = ret; *s; s++)
+ {
+ /* Pass backslash-quoted characters through, including the backslash. */
+ if (*s == '\\')
+ {
+ *r++ = '\\';
+ *r++ = *++s;
+ if (*s == '\0')
+ break;
+ continue;
+ }
+ /* OK, we have an unquoted character. Check its presence in
+ rl_completer_word_break_characters. */
+ if (mbschr (rl_completer_word_break_characters, *s))
+ *r++ = '\\';
+ /* XXX -- check for standalone tildes here and backslash-quote them */
+ if (s == text && *s == '~' && file_exists (text))
+ *r++ = '\\';
+ *r++ = *s;
+ }
+ *r = '\0';
+ return ret;
+}
+
+/* Quote a filename using double quotes, single quotes, or backslashes
+ depending on the value of completion_quoting_style. If we're
+ completing using backslashes, we need to quote some additional
+ characters (those that readline treats as word breaks), so we call
+ quote_word_break_chars on the result. This returns newly-allocated
+ memory. */
+static char *
+bash_quote_filename (s, rtype, qcp)
+ char *s;
+ int rtype;
+ char *qcp;
+{
+ char *rtext, *mtext, *ret;
+ int rlen, cs;
+
+ rtext = (char *)NULL;
+
+ /* If RTYPE == MULT_MATCH, it means that there is
+ more than one match. In this case, we do not add
+ the closing quote or attempt to perform tilde
+ expansion. If RTYPE == SINGLE_MATCH, we try
+ to perform tilde expansion, because single and double
+ quotes inhibit tilde expansion by the shell. */
+
+ cs = completion_quoting_style;
+ /* Might need to modify the default completion style based on *qcp,
+ since it's set to any user-provided opening quote. We also change
+ to single-quoting if there is no user-provided opening quote and
+ the word being completed contains newlines, since those are not
+ quoted correctly using backslashes (a backslash-newline pair is
+ special to the shell parser). */
+ if (*qcp == '\0' && cs == COMPLETE_BSQUOTE && mbschr (s, '\n'))
+ cs = COMPLETE_SQUOTE;
+ else if (*qcp == '"')
+ cs = COMPLETE_DQUOTE;
+ else if (*qcp == '\'')
+ cs = COMPLETE_SQUOTE;
+#if defined (BANG_HISTORY)
+ else if (*qcp == '\0' && history_expansion && cs == COMPLETE_DQUOTE &&
+ history_expansion_inhibited == 0 && mbschr (s, '!'))
+ cs = COMPLETE_BSQUOTE;
+
+ if (*qcp == '"' && history_expansion && cs == COMPLETE_DQUOTE &&
+ history_expansion_inhibited == 0 && mbschr (s, '!'))
+ {
+ cs = COMPLETE_BSQUOTE;
+ *qcp = '\0';
+ }
+#endif
+
+ /* Don't tilde-expand backslash-quoted filenames, since only single and
+ double quotes inhibit tilde expansion. */
+ mtext = s;
+ if (mtext[0] == '~' && rtype == SINGLE_MATCH && cs != COMPLETE_BSQUOTE)
+ mtext = bash_tilde_expand (s, 0);
+
+ switch (cs)
+ {
+ case COMPLETE_DQUOTE:
+ rtext = sh_double_quote (mtext);
+ break;
+ case COMPLETE_SQUOTE:
+ rtext = sh_single_quote (mtext);
+ break;
+ case COMPLETE_BSQUOTE:
+ rtext = sh_backslash_quote (mtext);
+ break;
+ }
+
+ if (mtext != s)
+ free (mtext);
+
+ /* We may need to quote additional characters: those that readline treats
+ as word breaks that are not quoted by backslash_quote. */
+ if (rtext && cs == COMPLETE_BSQUOTE)
+ {
+ mtext = quote_word_break_chars (rtext);
+ free (rtext);
+ rtext = mtext;
+ }
+
+ /* Leave the opening quote intact. The readline completion code takes
+ care of avoiding doubled opening quotes. */
+ rlen = strlen (rtext);
+ ret = (char *)xmalloc (rlen + 1);
+ strcpy (ret, rtext);
+
+ /* If there are multiple matches, cut off the closing quote. */
+ if (rtype == MULT_MATCH && cs != COMPLETE_BSQUOTE)
+ ret[rlen - 1] = '\0';
+ free (rtext);
+ return ret;
+}
+
+/* Support for binding readline key sequences to Unix commands. */
+static Keymap cmd_xmap;
+
+static int
+putx(c)
+ int c;
+{
+ putc (c, rl_outstream);
+}
+
+static int
+bash_execute_unix_command (count, key)
+ int count; /* ignored */
+ int key;
+{
+ Keymap ckmap; /* current keymap */
+ Keymap xkmap; /* unix command executing keymap */
+ register int i, r;
+ intmax_t mi;
+ sh_parser_state_t ps;
+ char *cmd, *value, *l, *l1, *ce;
+ SHELL_VAR *v;
+ char ibuf[INT_STRLEN_BOUND(int) + 1];
+
+ /* First, we need to find the right command to execute. This is tricky,
+ because we might have already indirected into another keymap. */
+ ckmap = rl_get_keymap ();
+ if (ckmap != rl_executing_keymap)
+ {
+ /* bogus. we have to search. only handle one level of indirection. */
+ for (i = 0; i < KEYMAP_SIZE; i++)
+ {
+ if (ckmap[i].type == ISKMAP && (Keymap)ckmap[i].function == rl_executing_keymap)
+ break;
+ }
+ if (i < KEYMAP_SIZE)
+ xkmap = (Keymap)cmd_xmap[i].function;
+ else
+ {
+ rl_crlf ();
+ internal_error (_("bash_execute_unix_command: cannot find keymap for command"));
+ rl_forced_update_display ();
+ return 1;
+ }
+ }
+ else
+ xkmap = cmd_xmap;
+
+ cmd = (char *)xkmap[key].function;
+
+ if (cmd == 0)
+ {
+ rl_ding ();
+ return 1;
+ }
+
+ ce = rl_get_termcap ("ce");
+ if (ce) /* clear current line */
+ {
+ fprintf (rl_outstream, "\r");
+ tputs (ce, 1, putx);
+ fflush (rl_outstream);
+ }
+ else
+ rl_crlf (); /* move to a new line */
+
+ v = bind_variable ("READLINE_LINE", rl_line_buffer, 0);
+ if (v)
+ VSETATTR (v, att_exported);
+ l = v ? value_cell (v) : 0;
+ value = inttostr (rl_point, ibuf, sizeof (ibuf));
+ v = bind_int_variable ("READLINE_POINT", value);
+ if (v)
+ VSETATTR (v, att_exported);
+ array_needs_making = 1;
+
+ save_parser_state (&ps);
+ r = parse_and_execute (cmd, "bash_execute_unix_command", SEVAL_NOHIST|SEVAL_NOFREE);
+ restore_parser_state (&ps);
+
+ v = find_variable ("READLINE_LINE");
+ l1 = v ? value_cell (v) : 0;
+ if (l1 != l)
+ maybe_make_readline_line (value_cell (v));
+ v = find_variable ("READLINE_POINT");
+ if (v && legal_number (value_cell (v), &mi))
+ {
+ i = mi;
+ if (i != rl_point)
+ {
+ rl_point = i;
+ if (rl_point > rl_end)
+ rl_point = rl_end;
+ else if (rl_point < 0)
+ rl_point = 0;
+ }
+ }
+
+ unbind_variable ("READLINE_LINE");
+ unbind_variable ("READLINE_POINT");
+ array_needs_making = 1;
+
+ /* and restore the readline buffer and display after command execution. */
+ rl_forced_update_display ();
+ return 0;
+}
+
+static void
+init_unix_command_map ()
+{
+ cmd_xmap = rl_make_bare_keymap ();
+}
+
+static int
+isolate_sequence (string, ind, need_dquote, startp)
+ char *string;
+ int ind, need_dquote, *startp;
+{
+ register int i;
+ int c, passc, delim;
+
+ for (i = ind; string[i] && whitespace (string[i]); i++)
+ ;
+ /* NEED_DQUOTE means that the first non-white character *must* be `"'. */
+ if (need_dquote && string[i] != '"')
+ {
+ builtin_error (_("%s: first non-whitespace character is not `\"'"), string);
+ return -1;
+ }
+
+ /* We can have delimited strings even if NEED_DQUOTE == 0, like the command
+ string to bind the key sequence to. */
+ delim = (string[i] == '"' || string[i] == '\'') ? string[i] : 0;
+
+ if (startp)
+ *startp = delim ? ++i : i;
+
+ for (passc = 0; c = string[i]; i++)
+ {
+ if (passc)
+ {
+ passc = 0;
+ continue;
+ }
+ if (c == '\\')
+ {
+ passc++;
+ continue;
+ }
+ if (c == delim)
+ break;
+ }
+
+ if (delim && string[i] != delim)
+ {
+ builtin_error (_("no closing `%c' in %s"), delim, string);
+ return -1;
+ }
+
+ return i;
+}
+
+int
+bind_keyseq_to_unix_command (line)
+ char *line;
+{
+ Keymap kmap;
+ char *kseq, *value;
+ int i, kstart;
+
+ if (cmd_xmap == 0)
+ init_unix_command_map ();
+
+ kmap = rl_get_keymap ();
+
+ /* We duplicate some of the work done by rl_parse_and_bind here, but
+ this code only has to handle `"keyseq": ["]command["]' and can
+ generate an error for anything else. */
+ i = isolate_sequence (line, 0, 1, &kstart);
+ if (i < 0)
+ return -1;
+
+ /* Create the key sequence string to pass to rl_generic_bind */
+ kseq = substring (line, kstart, i);
+
+ for ( ; line[i] && line[i] != ':'; i++)
+ ;
+ if (line[i] != ':')
+ {
+ builtin_error (_("%s: missing colon separator"), line);
+ return -1;
+ }
+
+ i = isolate_sequence (line, i + 1, 0, &kstart);
+ if (i < 0)
+ return -1;
+
+ /* Create the value string containing the command to execute. */
+ value = substring (line, kstart, i);
+
+ /* Save the command to execute and the key sequence in the CMD_XMAP */
+ rl_generic_bind (ISMACR, kseq, value, cmd_xmap);
+
+ /* and bind the key sequence in the current keymap to a function that
+ understands how to execute from CMD_XMAP */
+ rl_bind_keyseq_in_map (kseq, bash_execute_unix_command, kmap);
+
+ return 0;
+}
+
+/* Used by the programmable completion code. Complete TEXT as a filename,
+ but return only directories as matches. Dequotes the filename before
+ attempting to find matches. */
+char **
+bash_directory_completion_matches (text)
+ const char *text;
+{
+ char **m1;
+ char *dfn;
+ int qc;
+
+ qc = rl_dispatching ? rl_completion_quote_character : 0;
+ dfn = bash_dequote_filename ((char *)text, qc);
+ m1 = rl_completion_matches (dfn, rl_filename_completion_function);
+ free (dfn);
+
+ if (m1 == 0 || m1[0] == 0)
+ return m1;
+ /* We don't bother recomputing the lcd of the matches, because it will just
+ get thrown away by the programmable completion code and recomputed
+ later. */
+ (void)bash_ignore_filenames (m1);
+ return m1;
+}
+
+char *
+bash_dequote_text (text)
+ const char *text;
+{
+ char *dtxt;
+ int qc;
+
+ qc = (text[0] == '"' || text[0] == '\'') ? text[0] : 0;
+ dtxt = bash_dequote_filename ((char *)text, qc);
+ return (dtxt);
+}
+#endif /* READLINE */
diff --git a/bashline.h b/bashline.h
new file mode 100644
index 0000000..9daa8f9
--- /dev/null
+++ b/bashline.h
@@ -0,0 +1,51 @@
+/* bashline.h -- interface to the bash readline functions in bashline.c. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_BASHLINE_H_)
+#define _BASHLINE_H_
+
+#include "stdc.h"
+
+extern int bash_readline_initialized;
+
+extern void posix_readline_initialize __P((int));
+extern void reset_completer_word_break_chars __P((void));
+extern int enable_hostname_completion __P((int));
+extern void initialize_readline __P((void));
+extern void bashline_reset __P((void));
+extern void bashline_reinitialize __P((void));
+extern int bash_re_edit __P((char *));
+
+extern int bind_keyseq_to_unix_command __P((char *));
+
+extern char **bash_default_completion __P((const char *, int, int, int, int));
+
+/* Used by programmable completion code. */
+extern char *command_word_completion_function __P((const char *, int));
+extern char *bash_groupname_completion_function __P((const char *, int));
+extern char *bash_servicename_completion_function __P((const char *, int));
+
+extern char **get_hostname_list __P((void));
+extern void clear_hostname_list __P((void));
+
+extern char **bash_directory_completion_matches __P((const char *));
+extern char *bash_dequote_text __P((const char *));
+
+#endif /* _BASHLINE_H_ */
diff --git a/bashtypes.h b/bashtypes.h
new file mode 100644
index 0000000..01afef4
--- /dev/null
+++ b/bashtypes.h
@@ -0,0 +1,42 @@
+/* bashtypes.h -- Bash system types. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_BASHTYPES_H_)
+# define _BASHTYPES_H_
+
+#if defined (CRAY)
+# define word __word
+#endif
+
+#include <sys/types.h>
+
+#if defined (CRAY)
+# undef word
+#endif
+
+#if defined (HAVE_INTTYPES_H)
+# include <inttypes.h>
+#endif
+
+#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#endif /* _BASHTYPES_H_ */
diff --git a/bracecomp.c b/bracecomp.c
new file mode 100644
index 0000000..cb218a2
--- /dev/null
+++ b/bracecomp.c
@@ -0,0 +1,221 @@
+/* bracecomp.c -- Complete a filename with the possible completions enclosed
+ in csh-style braces such that the list of completions is available to the
+ shell. */
+
+/* Original version by tromey@cns.caltech.edu, Fri Feb 7 1992. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#if defined (BRACE_EXPANSION) && defined (READLINE)
+
+#include <stdio.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+#include "shmbutil.h"
+
+#include "shell.h"
+#include <readline/readline.h>
+
+static int _strcompare __P((char **, char **));
+
+/* Find greatest common prefix of two strings. */
+static int
+string_gcd (s1, s2)
+ char *s1, *s2;
+{
+ register int i;
+
+ if (s1 == NULL || s2 == NULL)
+ return (0);
+
+ for (i = 0; *s1 && *s2; ++s1, ++s2, ++i)
+ {
+ if (*s1 != *s2)
+ break;
+ }
+
+ return (i);
+}
+
+static char *
+really_munge_braces (array, real_start, real_end, gcd_zero)
+ char **array;
+ int real_start, real_end, gcd_zero;
+{
+ int start, end, gcd;
+ char *result, *subterm, *x;
+ int result_size, flag, tlen;
+
+ flag = 0;
+
+ if (real_start == real_end)
+ {
+ x = array[real_start] ? sh_backslash_quote (array[real_start] + gcd_zero)
+ : sh_backslash_quote (array[0]);
+ return x;
+ }
+
+ result = (char *)xmalloc (result_size = 16);
+ *result = '\0';
+
+ for (start = real_start; start < real_end; start = end + 1)
+ {
+ gcd = strlen (array[start]);
+ for (end = start + 1; end < real_end; end++)
+ {
+ int temp;
+
+ temp = string_gcd (array[start], array[end]);
+
+ if (temp <= gcd_zero)
+ break;
+
+ gcd = temp;
+ }
+ end--;
+
+ if (gcd_zero == 0 && start == real_start && end != (real_end - 1))
+ {
+ /* In this case, add in a leading '{', because we are at
+ top level, and there isn't a consistent prefix. */
+ result_size += 1;
+ result = (char *)xrealloc (result, result_size);
+ result[0] = '{'; result[1] = '\0';
+ flag++;
+ }
+
+ /* Make sure we backslash quote every substring we insert into the
+ resultant brace expression. This is so the default filename
+ quoting function won't inappropriately quote the braces. */
+ if (start == end)
+ {
+ x = savestring (array[start] + gcd_zero);
+ subterm = sh_backslash_quote (x);
+ free (x);
+ }
+ else
+ {
+ /* If there is more than one element in the subarray,
+ insert the (quoted) prefix and an opening brace. */
+ tlen = gcd - gcd_zero;
+ x = (char *)xmalloc (tlen + 1);
+ strncpy (x, array[start] + gcd_zero, tlen);
+ x[tlen] = '\0';
+ subterm = sh_backslash_quote (x);
+ free (x);
+ result_size += strlen (subterm) + 1;
+ result = (char *)xrealloc (result, result_size);
+ strcat (result, subterm);
+ free (subterm);
+ strcat (result, "{");
+ subterm = really_munge_braces (array, start, end + 1, gcd);
+ subterm[strlen (subterm) - 1] = '}';
+ }
+
+ result_size += strlen (subterm) + 1;
+ result = (char *)xrealloc (result, result_size);
+ strcat (result, subterm);
+ strcat (result, ",");
+ free (subterm);
+ }
+
+ if (gcd_zero == 0)
+ result[strlen (result) - 1] = flag ? '}' : '\0';
+ return (result);
+}
+
+static int
+_strcompare (s1, s2)
+ char **s1, **s2;
+{
+ int result;
+
+ result = **s1 - **s2;
+ if (result == 0)
+ result = strcmp (*s1, *s2);
+
+ return result;
+}
+
+static int
+hack_braces_completion (names)
+ char **names;
+{
+ register int i;
+ char *temp;
+
+ i = strvec_len (names);
+ if (MB_CUR_MAX > 1 && i > 2)
+ qsort (names+1, i-1, sizeof (char *), (QSFUNC *)_strcompare);
+
+ temp = really_munge_braces (names, 1, i, 0);
+
+ for (i = 0; names[i]; ++i)
+ {
+ free (names[i]);
+ names[i] = NULL;
+ }
+ names[0] = temp;
+ return 0;
+}
+
+/* We handle quoting ourselves within hack_braces_completion, so we turn off
+ rl_filename_quoting_desired and rl_filename_quoting_function. */
+int
+bash_brace_completion (count, ignore)
+ int count, ignore;
+{
+ rl_compignore_func_t *orig_ignore_func;
+ rl_compentry_func_t *orig_entry_func;
+ rl_quote_func_t *orig_quoting_func;
+ rl_completion_func_t *orig_attempt_func;
+ int orig_quoting_desired, r;
+
+ orig_ignore_func = rl_ignore_some_completions_function;
+ orig_attempt_func = rl_attempted_completion_function;
+ orig_entry_func = rl_completion_entry_function;
+ orig_quoting_func = rl_filename_quoting_function;
+ orig_quoting_desired = rl_filename_quoting_desired;
+
+ rl_completion_entry_function = rl_filename_completion_function;
+ rl_attempted_completion_function = (rl_completion_func_t *)NULL;
+ rl_ignore_some_completions_function = hack_braces_completion;
+ rl_filename_quoting_function = (rl_quote_func_t *)NULL;
+ rl_filename_quoting_desired = 0;
+
+ r = rl_complete_internal (TAB);
+
+ rl_ignore_some_completions_function = orig_ignore_func;
+ rl_attempted_completion_function = orig_attempt_func;
+ rl_completion_entry_function = orig_entry_func;
+ rl_filename_quoting_function = orig_quoting_func;
+ rl_filename_quoting_desired = orig_quoting_desired;
+
+ return r;
+}
+#endif /* BRACE_EXPANSION && READLINE */
diff --git a/braces.c b/braces.c
new file mode 100644
index 0000000..45abe45
--- /dev/null
+++ b/braces.c
@@ -0,0 +1,687 @@
+/* braces.c -- code for doing word expansion in curly braces. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Stuff in curly braces gets expanded before all other shell expansions. */
+
+#include "config.h"
+
+#if defined (BRACE_EXPANSION)
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+
+#if defined (SHELL)
+# include "shell.h"
+#endif /* SHELL */
+
+#include "general.h"
+#include "shmbutil.h"
+#include "chartypes.h"
+
+#define brace_whitespace(c) (!(c) || (c) == ' ' || (c) == '\t' || (c) == '\n')
+
+#define BRACE_SEQ_SPECIFIER ".."
+
+extern int asprintf __P((char **, const char *, ...)) __attribute__((__format__ (printf, 2, 3)));
+
+/* Basic idea:
+
+ Segregate the text into 3 sections: preamble (stuff before an open brace),
+ postamble (stuff after the matching close brace) and amble (stuff after
+ preamble, and before postamble). Expand amble, and then tack on the
+ expansions to preamble. Expand postamble, and tack on the expansions to
+ the result so far.
+ */
+
+/* The character which is used to separate arguments. */
+static const int brace_arg_separator = ',';
+
+#if defined (__P)
+static int brace_gobbler __P((char *, size_t, int *, int));
+static char **expand_amble __P((char *, size_t, int));
+static char **expand_seqterm __P((char *, size_t));
+static char **mkseq __P((int, int, int, int, int));
+static char **array_concat __P((char **, char **));
+#else
+static int brace_gobbler ();
+static char **expand_amble ();
+static char **expand_seqterm ();
+static char **mkseq();
+static char **array_concat ();
+#endif
+
+#if 0
+static void
+dump_result (a)
+ char **a;
+{
+ int i;
+
+ for (i = 0; a[i]; i++)
+ printf ("dump_result: a[%d] = -%s-\n", i, a[i]);
+}
+#endif
+
+/* Return an array of strings; the brace expansion of TEXT. */
+char **
+brace_expand (text)
+ char *text;
+{
+ register int start;
+ size_t tlen;
+ char *preamble, *postamble, *amble;
+ size_t alen;
+ char **tack, **result;
+ int i, j, c, c1;
+
+ DECLARE_MBSTATE;
+
+ /* Find the text of the preamble. */
+ tlen = strlen (text);
+ i = 0;
+#if defined (CSH_BRACE_COMPAT)
+ c = brace_gobbler (text, tlen, &i, '{'); /* } */
+#else
+ /* Make sure that when we exit this loop, c == 0 or text[i] begins a
+ valid brace expansion sequence. */
+ do
+ {
+ c = brace_gobbler (text, tlen, &i, '{'); /* } */
+ c1 = c;
+ /* Verify that c begins a valid brace expansion word. If it doesn't, we
+ go on. Loop stops when there are no more open braces in the word. */
+ if (c)
+ {
+ start = j = i + 1; /* { */
+ c = brace_gobbler (text, tlen, &j, '}');
+ if (c == 0) /* it's not */
+ {
+ i++;
+ c = c1;
+ continue;
+ }
+ else /* it is */
+ {
+ c = c1;
+ break;
+ }
+ }
+ else
+ break;
+ }
+ while (c);
+#endif /* !CSH_BRACE_COMPAT */
+
+ preamble = (char *)xmalloc (i + 1);
+ strncpy (preamble, text, i);
+ preamble[i] = '\0';
+
+ result = (char **)xmalloc (2 * sizeof (char *));
+ result[0] = preamble;
+ result[1] = (char *)NULL;
+
+ /* Special case. If we never found an exciting character, then
+ the preamble is all of the text, so just return that. */
+ if (c != '{')
+ return (result);
+
+ /* Find the amble. This is the stuff inside this set of braces. */
+ start = ++i;
+ c = brace_gobbler (text, tlen, &i, '}');
+
+ /* What if there isn't a matching close brace? */
+ if (c == 0)
+ {
+#if defined (NOTDEF)
+ /* Well, if we found an unquoted BRACE_ARG_SEPARATOR between START
+ and I, then this should be an error. Otherwise, it isn't. */
+ j = start;
+ while (j < i)
+ {
+ if (text[j] == '\\')
+ {
+ j++;
+ ADVANCE_CHAR (text, tlen, j);
+ continue;
+ }
+
+ if (text[j] == brace_arg_separator)
+ { /* { */
+ strvec_dispose (result);
+ report_error ("no closing `%c' in %s", '}', text);
+ throw_to_top_level ();
+ }
+ ADVANCE_CHAR (text, tlen, j);
+ }
+#endif
+ free (preamble); /* Same as result[0]; see initialization. */
+ result[0] = savestring (text);
+ return (result);
+ }
+
+#if defined (SHELL)
+ amble = substring (text, start, i);
+ alen = i - start;
+#else
+ amble = (char *)xmalloc (1 + (i - start));
+ strncpy (amble, &text[start], (i - start));
+ alen = i - start;
+ amble[alen] = '\0';
+#endif
+
+#if defined (SHELL)
+ INITIALIZE_MBSTATE;
+
+ /* If the amble does not contain an unquoted BRACE_ARG_SEPARATOR, then
+ just return without doing any expansion. */
+ j = 0;
+ while (amble[j])
+ {
+ if (amble[j] == '\\')
+ {
+ j++;
+ ADVANCE_CHAR (amble, alen, j);
+ continue;
+ }
+
+ if (amble[j] == brace_arg_separator)
+ break;
+
+ ADVANCE_CHAR (amble, alen, j);
+ }
+
+ if (amble[j] == 0)
+ {
+ tack = expand_seqterm (amble, alen);
+ if (tack)
+ goto add_tack;
+ else
+ {
+ free (amble);
+ free (preamble);
+ result[0] = savestring (text);
+ return (result);
+ }
+ }
+#endif /* SHELL */
+
+ tack = expand_amble (amble, alen, 0);
+add_tack:
+ result = array_concat (result, tack);
+ free (amble);
+ strvec_dispose (tack);
+
+ postamble = text + i + 1;
+
+ tack = brace_expand (postamble);
+ result = array_concat (result, tack);
+ strvec_dispose (tack);
+
+ return (result);
+}
+
+/* Expand the text found inside of braces. We simply try to split the
+ text at BRACE_ARG_SEPARATORs into separate strings. We then brace
+ expand each slot which needs it, until there are no more slots which
+ need it. */
+static char **
+expand_amble (text, tlen, flags)
+ char *text;
+ size_t tlen;
+ int flags;
+{
+ char **result, **partial;
+ char *tem;
+ int start, i, c;
+
+ DECLARE_MBSTATE;
+
+ result = (char **)NULL;
+
+ start = i = 0;
+ c = 1;
+ while (c)
+ {
+ c = brace_gobbler (text, tlen, &i, brace_arg_separator);
+#if defined (SHELL)
+ tem = substring (text, start, i);
+#else
+ tem = (char *)xmalloc (1 + (i - start));
+ strncpy (tem, &text[start], (i - start));
+ tem[i- start] = '\0';
+#endif
+
+ partial = brace_expand (tem);
+
+ if (!result)
+ result = partial;
+ else
+ {
+ register int lr, lp, j;
+
+ lr = strvec_len (result);
+ lp = strvec_len (partial);
+
+ result = strvec_resize (result, lp + lr + 1);
+
+ for (j = 0; j < lp; j++)
+ result[lr + j] = partial[j];
+
+ result[lr + j] = (char *)NULL;
+ free (partial);
+ }
+ free (tem);
+ ADVANCE_CHAR (text, tlen, i);
+ start = i;
+ }
+ return (result);
+}
+
+#define ST_BAD 0
+#define ST_INT 1
+#define ST_CHAR 2
+#define ST_ZINT 3
+
+static char **
+mkseq (start, end, incr, type, width)
+ int start, end, incr, type, width;
+{
+ int n, i;
+ char **result, *t;
+
+ n = abs (end - start) + 1;
+ result = strvec_create (n + 1);
+
+ if (incr == 0)
+ incr = 1;
+
+ if (start > end && incr > 0)
+ incr = -incr;
+ else if (start < end && incr < 0)
+ incr = -incr;
+
+ /* Make sure we go through the loop at least once, so {3..3} prints `3' */
+ i = 0;
+ n = start;
+ do
+ {
+#if defined (SHELL)
+ QUIT; /* XXX - memory leak here */
+#endif
+ if (type == ST_INT)
+ result[i++] = itos (n);
+ else if (type == ST_ZINT)
+ {
+ int len;
+ len = asprintf (&t, "%0*d", width, n);
+ result[i++] = t;
+ }
+ else
+ {
+ t = (char *)xmalloc (2);
+ t[0] = n;
+ t[1] = '\0';
+ result[i++] = t;
+ }
+ n += incr;
+ if ((incr < 0 && n < end) || (incr > 0 && n > end))
+ break;
+ }
+ while (1);
+
+ result[i] = (char *)0;
+ return (result);
+}
+
+static char **
+expand_seqterm (text, tlen)
+ char *text;
+ size_t tlen;
+{
+ char *t, *lhs, *rhs;
+ int i, lhs_t, rhs_t, lhs_v, rhs_v, incr, lhs_l, rhs_l, width;
+ intmax_t tl, tr;
+ char **result, *ep, *oep;
+
+ t = strstr (text, BRACE_SEQ_SPECIFIER);
+ if (t == 0)
+ return ((char **)NULL);
+
+ lhs_l = t - text; /* index of start of BRACE_SEQ_SPECIFIER */
+ lhs = substring (text, 0, lhs_l);
+ rhs = substring (text, lhs_l + sizeof(BRACE_SEQ_SPECIFIER) - 1, tlen);
+
+ if (lhs[0] == 0 || rhs[0] == 0)
+ {
+ free (lhs);
+ free (rhs);
+ return ((char **)NULL);
+ }
+
+ /* Now figure out whether LHS and RHS are integers or letters. Both
+ sides have to match. */
+ lhs_t = (legal_number (lhs, &tl)) ? ST_INT :
+ ((ISALPHA (lhs[0]) && lhs[1] == 0) ? ST_CHAR : ST_BAD);
+
+ /* Decide on rhs and whether or not it looks like the user specified
+ an increment */
+ ep = 0;
+ if (ISDIGIT (rhs[0]) || ((rhs[0] == '+' || rhs[0] == '-') && ISDIGIT (rhs[1])))
+ {
+ rhs_t = ST_INT;
+ tr = strtoimax (rhs, &ep, 10);
+ if (ep && *ep != 0 && *ep != '.')
+ rhs_t = ST_BAD; /* invalid */
+ }
+ else if (ISALPHA (rhs[0]) && (rhs[1] == 0 || rhs[1] == '.'))
+ {
+ rhs_t = ST_CHAR;
+ ep = rhs + 1;
+ }
+ else
+ {
+ rhs_t = ST_BAD;
+ ep = 0;
+ }
+
+ incr = 1;
+ if (rhs_t != ST_BAD)
+ {
+ oep = ep;
+ if (ep && *ep == '.' && ep[1] == '.' && ep[2])
+ incr = strtoimax (ep + 2, &ep, 10);
+ if (*ep != 0)
+ rhs_t = ST_BAD; /* invalid incr */
+ tlen -= ep - oep;
+ }
+
+ if (lhs_t != rhs_t || lhs_t == ST_BAD || rhs_t == ST_BAD)
+ {
+ free (lhs);
+ free (rhs);
+ return ((char **)NULL);
+ }
+
+ /* OK, we have something. It's either a sequence of integers, ascending
+ or descending, or a sequence or letters, ditto. Generate the sequence,
+ put it into a string vector, and return it. */
+
+ if (lhs_t == ST_CHAR)
+ {
+ lhs_v = (unsigned char)lhs[0];
+ rhs_v = (unsigned char)rhs[0];
+ width = 1;
+ }
+ else
+ {
+ lhs_v = tl; /* integer truncation */
+ rhs_v = tr;
+
+ /* Decide whether or not the terms need zero-padding */
+ rhs_l = tlen - lhs_l - sizeof (BRACE_SEQ_SPECIFIER) + 1;
+ width = 0;
+ if (lhs_l > 1 && lhs[0] == '0')
+ width = lhs_l, lhs_t = ST_ZINT;
+ if (lhs_l > 2 && lhs[0] == '-' && lhs[1] == '0')
+ width = lhs_l, lhs_t = ST_ZINT;
+ if (rhs_l > 1 && rhs[0] == '0' && width < rhs_l)
+ width = rhs_l, lhs_t = ST_ZINT;
+ if (rhs_l > 2 && rhs[0] == '-' && rhs[1] == '0' && width < rhs_l)
+ width = rhs_l, lhs_t = ST_ZINT;
+
+ if (width < lhs_l && lhs_t == ST_ZINT)
+ width = lhs_l;
+ if (width < rhs_l && lhs_t == ST_ZINT)
+ width = rhs_l;
+ }
+
+ result = mkseq (lhs_v, rhs_v, incr, lhs_t, width);
+
+ free (lhs);
+ free (rhs);
+
+ return (result);
+}
+
+/* Start at INDEX, and skip characters in TEXT. Set INDEX to the
+ index of the character matching SATISFY. This understands about
+ quoting. Return the character that caused us to stop searching;
+ this is either the same as SATISFY, or 0. */
+/* If SATISFY is `}', we are looking for a brace expression, so we
+ should enforce the rules that govern valid brace expansions:
+ 1) to count as an arg separator, a comma or `..' has to be outside
+ an inner set of braces.
+*/
+static int
+brace_gobbler (text, tlen, indx, satisfy)
+ char *text;
+ size_t tlen;
+ int *indx;
+ int satisfy;
+{
+ register int i, c, quoted, level, commas, pass_next;
+#if defined (SHELL)
+ int si;
+ char *t;
+#endif
+ DECLARE_MBSTATE;
+
+ level = quoted = pass_next = 0;
+#if defined (CSH_BRACE_COMPAT)
+ commas = 1;
+#else
+ commas = (satisfy == '}') ? 0 : 1;
+#endif
+
+ i = *indx;
+ while (c = text[i])
+ {
+ if (pass_next)
+ {
+ pass_next = 0;
+ ADVANCE_CHAR (text, tlen, i);
+ continue;
+ }
+
+ /* A backslash escapes the next character. This allows backslash to
+ escape the quote character in a double-quoted string. */
+ if (c == '\\' && (quoted == 0 || quoted == '"' || quoted == '`'))
+ {
+ pass_next = 1;
+ i++;
+ continue;
+ }
+
+#if defined (SHELL)
+ /* If compiling for the shell, treat ${...} like \{...} */
+ if (c == '$' && text[i+1] == '{' && quoted != '\'') /* } */
+ {
+ pass_next = 1;
+ i++;
+ if (quoted == 0)
+ level++;
+ continue;
+ }
+#endif
+
+ if (quoted)
+ {
+ if (c == quoted)
+ quoted = 0;
+ ADVANCE_CHAR (text, tlen, i);
+ continue;
+ }
+
+ if (c == '"' || c == '\'' || c == '`')
+ {
+ quoted = c;
+ i++;
+ continue;
+ }
+
+#if defined (SHELL)
+ /* Pass new-style command and process substitutions through unchanged. */
+ if ((c == '$' || c == '<' || c == '>') && text[i+1] == '(') /* ) */
+ {
+ si = i + 2;
+ t = extract_command_subst (text, &si, 0);
+ i = si;
+ free (t);
+ i++;
+ continue;
+ }
+#endif
+
+ if (c == satisfy && level == 0 && quoted == 0 && commas > 0)
+ {
+ /* We ignore an open brace surrounded by whitespace, and also
+ an open brace followed immediately by a close brace preceded
+ by whitespace. */
+ if (c == '{' &&
+ ((!i || brace_whitespace (text[i - 1])) &&
+ (brace_whitespace (text[i + 1]) || text[i + 1] == '}')))
+ {
+ i++;
+ continue;
+ }
+
+ break;
+ }
+
+ if (c == '{')
+ level++;
+ else if (c == '}' && level)
+ level--;
+#if !defined (CSH_BRACE_COMPAT)
+ else if (satisfy == '}' && c == brace_arg_separator && level == 0)
+ commas++;
+ else if (satisfy == '}' && STREQN (text+i, BRACE_SEQ_SPECIFIER, 2) &&
+ text[i+2] != satisfy && level == 0)
+ commas++;
+#endif
+
+ ADVANCE_CHAR (text, tlen, i);
+ }
+
+ *indx = i;
+ return (c);
+}
+
+/* Return a new array of strings which is the result of appending each
+ string in ARR2 to each string in ARR1. The resultant array is
+ len (arr1) * len (arr2) long. For convenience, ARR1 (and its contents)
+ are free ()'ed. ARR1 can be NULL, in that case, a new version of ARR2
+ is returned. */
+static char **
+array_concat (arr1, arr2)
+ char **arr1, **arr2;
+{
+ register int i, j, len, len1, len2;
+ register char **result;
+
+ if (arr1 == 0)
+ return (strvec_copy (arr2));
+
+ if (arr2 == 0)
+ return (strvec_copy (arr1));
+
+ len1 = strvec_len (arr1);
+ len2 = strvec_len (arr2);
+
+ result = (char **)xmalloc ((1 + (len1 * len2)) * sizeof (char *));
+
+ len = 0;
+ for (i = 0; i < len1; i++)
+ {
+ int strlen_1 = strlen (arr1[i]);
+
+ for (j = 0; j < len2; j++)
+ {
+ result[len] = (char *)xmalloc (1 + strlen_1 + strlen (arr2[j]));
+ strcpy (result[len], arr1[i]);
+ strcpy (result[len] + strlen_1, arr2[j]);
+ len++;
+ }
+ free (arr1[i]);
+ }
+ free (arr1);
+
+ result[len] = (char *)NULL;
+ return (result);
+}
+
+#if defined (TEST)
+#include <stdio.h>
+
+fatal_error (format, arg1, arg2)
+ char *format, *arg1, *arg2;
+{
+ report_error (format, arg1, arg2);
+ exit (1);
+}
+
+report_error (format, arg1, arg2)
+ char *format, *arg1, *arg2;
+{
+ fprintf (stderr, format, arg1, arg2);
+ fprintf (stderr, "\n");
+}
+
+main ()
+{
+ char example[256];
+
+ for (;;)
+ {
+ char **result;
+ int i;
+
+ fprintf (stderr, "brace_expand> ");
+
+ if ((!fgets (example, 256, stdin)) ||
+ (strncmp (example, "quit", 4) == 0))
+ break;
+
+ if (strlen (example))
+ example[strlen (example) - 1] = '\0';
+
+ result = brace_expand (example);
+
+ for (i = 0; result[i]; i++)
+ printf ("%s\n", result[i]);
+
+ free_array (result);
+ }
+}
+
+/*
+ * Local variables:
+ * compile-command: "gcc -g -Bstatic -DTEST -o brace_expand braces.c general.o"
+ * end:
+ */
+
+#endif /* TEST */
+#endif /* BRACE_EXPANSION */
diff --git a/builtins.h b/builtins.h
new file mode 100644
index 0000000..8f7b461
--- /dev/null
+++ b/builtins.h
@@ -0,0 +1,61 @@
+/* builtins.h -- What a builtin looks like, and where to find them. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "command.h"
+#include "general.h"
+
+#if defined (ALIAS)
+#include "alias.h"
+#endif
+
+/* Flags describing various things about a builtin. */
+#define BUILTIN_ENABLED 0x01 /* This builtin is enabled. */
+#define BUILTIN_DELETED 0x02 /* This has been deleted with enable -d. */
+#define STATIC_BUILTIN 0x04 /* This builtin is not dynamically loaded. */
+#define SPECIAL_BUILTIN 0x08 /* This is a Posix `special' builtin. */
+#define ASSIGNMENT_BUILTIN 0x10 /* This builtin takes assignment statements. */
+#define POSIX_BUILTIN 0x20 /* This builtins is special in the Posix command search order. */
+
+#define BASE_INDENT 4
+
+/* The thing that we build the array of builtins out of. */
+struct builtin {
+ char *name; /* The name that the user types. */
+ sh_builtin_func_t *function; /* The address of the invoked function. */
+ int flags; /* One of the #defines above. */
+ char * const *long_doc; /* NULL terminated array of strings. */
+ const char *short_doc; /* Short version of documenation. */
+ char *handle; /* for future use */
+};
+
+/* Found in builtins.c, created by builtins/mkbuiltins. */
+extern int num_shell_builtins; /* Number of shell builtins. */
+extern struct builtin static_shell_builtins[];
+extern struct builtin *shell_builtins;
+extern struct builtin *current_builtin;
diff --git a/builtins/Makefile.in b/builtins/Makefile.in
new file mode 100644
index 0000000..42f8cb8
--- /dev/null
+++ b/builtins/Makefile.in
@@ -0,0 +1,659 @@
+# This Makefile for building libbuiltins.a is in -*- text -*- for Emacs.
+#
+# Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+PACKAGE = @PACKAGE_NAME@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+
+#
+SHELL = @MAKE_SHELL@
+RANLIB = @RANLIB@
+CC = @CC@
+CC_FOR_BUILD = @CC_FOR_BUILD@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+RM = rm -f
+CP = cp
+
+EXEEXT = @EXEEXT@
+
+prefix = @prefix@
+
+srcdir = @srcdir@
+VPATH = .:@srcdir@
+topdir = @top_srcdir@
+
+datarootdir = @datarootdir@
+
+includedir = @includedir@
+datadir = @datadir@
+localedir = @localedir@
+
+# Support an alternate destination root directory for package building
+DESTDIR =
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+BUILD_DIR = @BUILD_DIR@
+
+LIBBUILD = ${BUILD_DIR}/lib
+
+PROFILE_FLAGS = @PROFILE_FLAGS@
+CFLAGS = @CFLAGS@
+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@ @CROSS_COMPILE@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
+LOCAL_CFLAGS = @LOCAL_CFLAGS@ ${DEBUG}
+DEFS = @DEFS@
+LOCAL_DEFS = @LOCAL_DEFS@
+
+LIBS = @LIBS@
+LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS)
+LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD)
+LOCAL_LDFLAGS = @LOCAL_LDFLAGS@
+#LIBS_FOR_BUILD = @LIBS_FOR_BUILD@
+LIBS_FOR_BUILD = $(LIBS)
+
+BASHINCDIR = ${topdir}/include
+
+RL_INCLUDEDIR = @RL_INCLUDEDIR@
+
+INTL_LIBSRC = ${topdir}/lib/intl
+INTL_BUILDDIR = ${LIBBUILD}/intl
+INTL_LIBDIR = ${INTL_BUILDDIR}
+INTL_LIBRARY = ${INTL_BUILDDIR}/libintl.a
+INTL_INC = @INTL_INC@
+INTL_DEP = @INTL_DEP@
+LIBINTL_H = @LIBINTL_H@
+
+HELPDIR = @HELPDIR@
+MKDIRS = ${topdir}/support/mkdirs
+
+INCLUDES = -I. -I.. @RL_INCLUDE@ -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib -I$(srcdir) ${INTL_INC}
+
+BASE_CCFLAGS = ${PROFILE_FLAGS} $(DEFS) $(LOCAL_DEFS) $(SYSTEM_FLAGS) \
+ ${INCLUDES} $(LOCAL_CFLAGS)
+
+CCFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(CFLAGS)
+
+CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
+
+GCC_LINT_FLAGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \
+ -Wcast-align -Wstrict-prototypes -Wconversion \
+ -Wmissing-prototypes -Wtraditional -Wredundant-decls -pedantic
+
+MKBUILTINS = mkbuiltins$(EXEEXT)
+DIRECTDEFINE = -D $(srcdir)
+HELPDIRDEFINE = @HELPDIRDEFINE@
+HELPSTRINGS = @HELPSTRINGS@
+
+# xxx this is bad style
+RL_LIBSRC = $(topdir)/lib/readline
+
+.SUFFIXES:
+.SUFFIXES: .def .c .o
+# How to make a .o file from a .def file.
+.def.o:
+ $(RM) $@
+ ./$(MKBUILTINS) $(DIRECTDEFINE) $<
+ $(CC) -c $(CCFLAGS) $*.c || ( $(RM) $*.c ; exit 1 )
+ $(RM) $*.c
+
+# How to make a .c file from a .def file.
+.def.c:
+ $(RM) $@
+ ./$(MKBUILTINS) $(DIRECTDEFINE) $<
+
+# default rule for making a .o file from a .c file
+.c.o:
+ $(RM) $@
+ $(CC) -c $(CCFLAGS) $<
+
+DEFSRC = $(srcdir)/alias.def $(srcdir)/bind.def $(srcdir)/break.def \
+ $(srcdir)/builtin.def $(srcdir)/caller.def \
+ $(srcdir)/cd.def $(srcdir)/colon.def \
+ $(srcdir)/command.def $(srcdir)/declare.def $(srcdir)/echo.def \
+ $(srcdir)/enable.def $(srcdir)/eval.def $(srcdir)/getopts.def \
+ $(srcdir)/exec.def $(srcdir)/exit.def $(srcdir)/fc.def \
+ $(srcdir)/fg_bg.def $(srcdir)/hash.def $(srcdir)/help.def \
+ $(srcdir)/history.def $(srcdir)/jobs.def $(srcdir)/kill.def \
+ $(srcdir)/let.def $(srcdir)/read.def $(srcdir)/return.def \
+ $(srcdir)/set.def $(srcdir)/setattr.def $(srcdir)/shift.def \
+ $(srcdir)/source.def $(srcdir)/suspend.def $(srcdir)/test.def \
+ $(srcdir)/times.def $(srcdir)/trap.def $(srcdir)/type.def \
+ $(srcdir)/ulimit.def $(srcdir)/umask.def $(srcdir)/wait.def \
+ $(srcdir)/reserved.def $(srcdir)/pushd.def $(srcdir)/shopt.def \
+ $(srcdir)/printf.def $(srcdir)/complete.def $(srcdir)/mapfile.def
+
+STATIC_SOURCE = common.c evalstring.c evalfile.c getopt.c bashgetopt.c \
+ getopt.h
+
+OFILES = builtins.o \
+ alias.o bind.o break.o builtin.o caller.o cd.o colon.o command.o \
+ common.o declare.o echo.o enable.o eval.o evalfile.o \
+ evalstring.o exec.o exit.o fc.o fg_bg.o hash.o help.o history.o \
+ jobs.o kill.o let.o mapfile.o \
+ pushd.o read.o return.o set.o setattr.o shift.o source.o \
+ suspend.o test.o times.o trap.o type.o ulimit.o umask.o \
+ wait.o getopts.o shopt.o printf.o getopt.o bashgetopt.o complete.o
+
+CREATED_FILES = builtext.h builtins.c psize.aux pipesize.h
+
+all: $(MKBUILTINS) libbuiltins.a
+
+libbuiltins.a: $(MKBUILTINS) $(OFILES) builtins.o
+ $(RM) $@
+ $(AR) $(ARFLAGS) $@ $(OFILES)
+ -$(RANLIB) $@
+
+builtext.h builtins.c: $(MKBUILTINS) $(DEFSRC)
+ @-if test -f builtins.c; then mv -f builtins.c old-builtins.c; fi
+ @-if test -f builtext.h; then mv -f builtext.h old-builtext.h; fi
+ ./$(MKBUILTINS) -externfile builtext.h -structfile builtins.c \
+ -noproduction $(DIRECTDEFINE) $(HELPDIRDEFINE) $(HELPSTRINGS) $(DEFSRC)
+ @-if cmp -s old-builtext.h builtext.h 2>/dev/null; then \
+ mv old-builtext.h builtext.h; \
+ else \
+ $(RM) old-builtext.h; \
+ fi
+ @-if cmp -s old-builtins.c builtins.c 2>/dev/null; then \
+ mv old-builtins.c builtins.c; \
+ else \
+ $(RM) old-builtins.c; \
+ fi
+
+helpdoc: $(MKBUILTINS) $(DEFSRC)
+ ./$(MKBUILTINS) ${HELPDIRDEFINE} -noproduction $(DIRECTDEFINE) $(DEFSRC)
+
+install-help:
+ @-if test -n "${HELPDIR}" && test -d helpfiles ; then \
+ test -d $(DESTDIR)${HELPDIR} || ${SHELL} ${MKDIRS} $(DESTDIR)$(HELPDIR) ;\
+ ( for f in helpfiles/*; do \
+ echo installing $$f; \
+ ${INSTALL_DATA} $$f $(DESTDIR)$(HELPDIR); \
+ done; ) ; \
+ fi
+
+install: @HELPINSTALL@
+
+mkbuiltins.o: ../config.h
+mkbuiltins.o: mkbuiltins.c
+ $(RM) $@
+ $(CC_FOR_BUILD) -c $(CCFLAGS_FOR_BUILD) $<
+
+mkbuiltins$(EXEEXT): mkbuiltins.o
+ $(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $(MKBUILTINS) mkbuiltins.o $(LIBS_FOR_BUILD)
+
+# rules for deficient makes, like SunOS
+mkbuiltins.o: mkbuiltins.c
+builtins.o: builtins.c
+common.o: common.c
+bashgetopt.o: bashgetopt.c
+getopt.o: getopt.c
+evalstring.o: evalstring.c
+evalfile.o: evalfile.c
+
+ulimit.o: pipesize.h
+
+pipesize.h: psize.aux
+ $(SHELL) $(srcdir)/psize.sh > $@
+
+psize.aux: psize.c
+ $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) -o $@ $(srcdir)/psize.c
+
+documentation: builtins.texi
+
+builtins.texi: $(MKBUILTINS)
+ ./$(MKBUILTINS) -documentonly $(DEFSRC)
+
+clean:
+ $(RM) $(OFILES) $(CREATED_FILES) $(MKBUILTINS) mkbuiltins.o libbuiltins.a
+ -test -d helpfiles && $(RM) -r helpfiles
+
+mostlyclean:
+ $(RM) $(OFILES) libbuiltins.a
+
+distclean maintainer-clean: clean
+ $(RM) Makefile
+
+$(OFILES): $(MKBUILTINS) ../config.h
+
+../version.h: ../config.h ../Makefile Makefile
+ -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} version.h )
+
+# maintainer special - for now
+po: builtins.c
+ xgettext -L C -o $(topdir)/po/builtins.pot --keyword='N_' builtins.c 2>/dev/null
+
+${LIBINTL_H}:
+ @echo making $@ in ${INTL_BUILDDIR}
+ @(cd ${INTL_BUILDDIR} && \
+ $(MAKE) $(MFLAGS) libintl.h) || exit 1
+
+# dependencies
+
+alias.o: alias.def
+bind.o: bind.def
+break.o: break.def
+builtin.o: builtin.def
+caller.o: caller.def
+cd.o: cd.def
+colon.o: colon.def
+command.o: command.def
+declare.o: declare.def
+echo.o: echo.def
+enable.o: enable.def
+eval.o: eval.def
+exec.o: exec.def
+exit.o: exit.def
+fc.o: fc.def
+fg_bg.o: fg_bg.def
+hash.o: hash.def
+help.o: help.def
+history.o: history.def
+jobs.o: jobs.def
+kill.o: kill.def
+let.o: let.def
+mapfile.o: mapfile.def
+printf.o: printf.def
+pushd.o: pushd.def
+read.o: read.def
+return.o: return.def
+set.o: set.def
+setattr.o: setattr.def
+shift.o: shift.def
+shopt.o: shopt.def
+source.o: source.def
+suspend.o: suspend.def
+test.o: test.def
+times.o: times.def
+trap.o: trap.def
+type.o: type.def
+ulimit.o: ulimit.def
+umask.o: umask.def
+wait.o: wait.def
+getopts.o: getopts.def
+reserved.o: reserved.def
+complete.o: complete.def
+
+# C files
+bashgetopt.o: ../config.h $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h
+bashgetopt.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/bashjmp.h
+bashgetopt.o: $(topdir)/command.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/error.h
+bashgetopt.o: $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/quit.h $(BASHINCDIR)/maxpath.h
+bashgetopt.o: $(topdir)/unwind_prot.h $(topdir)/dispose_cmd.h
+bashgetopt.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/sig.h
+bashgetopt.o: ../pathnames.h $(topdir)/externs.h $(srcdir)/common.h
+bashgetopt.o: $(BASHINCDIR)/chartypes.h
+common.o: $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h
+common.o: $(topdir)/shell.h $(topdir)/syntax.h ../config.h $(topdir)/bashjmp.h $(BASHINCDIR)/posixjmp.h
+common.o: $(topdir)/sig.h $(topdir)/command.h
+common.o: $(topdir)/general.h $(topdir)/xmalloc.h $(BASHINCDIR)/stdc.h $(BASHINCDIR)/memalloc.h
+common.o: $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/input.h
+common.o: $(topdir)/siglist.h $(topdir)/bashhist.h $(topdir)/quit.h
+common.o: $(topdir)/unwind_prot.h $(BASHINCDIR)/maxpath.h $(topdir)/jobs.h
+common.o: $(topdir)/builtins.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+common.o: $(topdir)/subst.h $(topdir)/execute_cmd.h $(topdir)/error.h
+common.o: $(topdir)/externs.h ../pathnames.h ./builtext.h
+common.o: $(BASHINCDIR)/chartypes.h
+evalfile.o: $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h ${BASHINCDIR}/filecntl.h
+evalfile.o: $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h
+evalfile.o: $(topdir)/shell.h $(topdir)/syntax.h ../config.h $(topdir)/bashjmp.h
+evalfile.o: $(topdir)/command.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/error.h
+evalfile.o: $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/quit.h $(BASHINCDIR)/maxpath.h
+evalfile.o: $(topdir)/unwind_prot.h $(topdir)/dispose_cmd.h
+evalfile.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/sig.h
+evalfile.o: ../pathnames.h $(topdir)/externs.h
+evalfile.o: $(topdir)/jobs.h $(topdir)/builtins.h $(topdir)/flags.h
+evalfile.o: $(topdir)/input.h $(topdir)/execute_cmd.h
+evalfile.o: $(topdir)/bashhist.h $(srcdir)/common.h
+evalstring.o: ../config.h $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h
+evalstring.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/bashjmp.h $(BASHINCDIR)/posixjmp.h
+evalstring.o: $(topdir)/sig.h $(topdir)/command.h $(topdir)/siglist.h
+evalstring.o: $(BASHINCDIR)/memalloc.h $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/input.h
+evalstring.o: $(topdir)/quit.h $(topdir)/unwind_prot.h
+evalstring.o: $(BASHINCDIR)/maxpath.h $(topdir)/jobs.h $(topdir)/builtins.h
+evalstring.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h
+evalstring.o: $(topdir)/externs.h $(topdir)/jobs.h $(topdir)/builtins.h
+evalstring.o: $(topdir)/flags.h $(topdir)/input.h $(topdir)/execute_cmd.h
+evalstring.o: $(topdir)/bashhist.h $(srcdir)/common.h
+evalstring.o: $(topdir)/trap.h $(topdir)/redir.h ../pathnames.h
+getopt.o: ../config.h $(BASHINCDIR)/memalloc.h
+getopt.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/bashjmp.h $(topdir)/command.h
+getopt.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/error.h $(topdir)/variables.h $(topdir)/conftypes.h
+getopt.o: $(topdir)/quit.h $(BASHINCDIR)/maxpath.h $(topdir)/unwind_prot.h
+getopt.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h
+getopt.o: $(topdir)/sig.h ../pathnames.h $(topdir)/externs.h
+getopt.o: $(srcdir)/getopt.h
+mkbuiltins.o: ../config.h $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h
+mkbuiltins.o: ${BASHINCDIR}/filecntl.h
+mkbuiltins.o: $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h
+
+# def files
+alias.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+alias.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(BASHINCDIR)/maxpath.h
+alias.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+alias.o: $(topdir)/subst.h $(topdir)/externs.h $(srcdir)/common.h
+alias.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+alias.o: ../pathnames.h
+bind.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h
+bind.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+bind.o: $(topdir)/subst.h $(topdir)/externs.h $(srcdir)/bashgetopt.h
+bind.o: $(topdir)/general.h $(topdir)/xmalloc.h $(BASHINCDIR)/maxpath.h $(topdir)/bashline.h
+bind.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+bind.o: ../pathnames.h
+break.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+break.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+break.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+break.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+break.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+break.o: ../pathnames.h
+builtin.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+builtin.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/externs.h
+builtin.o: $(topdir)/quit.h $(srcdir)/common.h $(BASHINCDIR)/maxpath.h
+builtin.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h
+builtin.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+builtin.o: $(srcdir)/bashgetopt.h ../pathnames.h
+caller.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h
+caller.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/quit.h $(topdir)/dispose_cmd.h
+caller.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/externs.h
+caller.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+caller.o: $(srcdir)/common.h $(BASHINCDIR)/maxpath.h ./builtext.h
+caller.o: ${BASHINCDIR}/chartypes.h $(topdir)/bashtypes.h ../pathnames.h
+cd.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h
+cd.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/quit.h $(topdir)/dispose_cmd.h
+cd.o: $(topdir)/make_cmd.h $(topdir)/subst.h $(topdir)/externs.h
+cd.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+cd.o: $(srcdir)/common.h $(BASHINCDIR)/maxpath.h ../pathnames.h
+command.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+command.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/externs.h
+command.o: $(topdir)/quit.h $(srcdir)/bashgetopt.h $(BASHINCDIR)/maxpath.h
+command.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h
+command.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+command.o: ../pathnames.h
+declare.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+declare.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+declare.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+declare.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+declare.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+declare.o: $(topdir)/arrayfunc.h $(srcdir)/bashgetopt.h
+declare.o: ./builtext.h ../pathnames.h
+echo.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h
+echo.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/subst.h $(topdir)/externs.h
+echo.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+echo.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+echo.o: $(BASHINCDIR)/maxpath.h ../pathnames.h
+enable.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+enable.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+enable.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+enable.o: $(topdir)/subst.h $(topdir)/externs.h
+enable.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+enable.o: $(BASHINCDIR)/maxpath.h ../pathnames.h
+enable.o: $(topdir)/pcomplete.h
+eval.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+eval.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+eval.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+eval.o: $(topdir)/subst.h $(topdir)/externs.h
+eval.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+eval.o: $(BASHINCDIR)/maxpath.h ../pathnames.h
+exec.o: $(topdir)/bashtypes.h
+exec.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+exec.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+exec.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+exec.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/flags.h
+exec.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+exec.o: $(srcdir)/common.h $(topdir)/execute_cmd.h $(BASHINCDIR)/maxpath.h
+exec.o: $(topdir)/findcmd.h $(topdir)/jobs.h ../pathnames.h
+exit.o: $(topdir)/bashtypes.h
+exit.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+exit.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+exit.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+exit.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/jobs.h
+exit.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+exit.o: $(BASHINCDIR)/maxpath.h ./builtext.h ../pathnames.h
+fc.o: $(topdir)/bashtypes.h $(BASHINCDIR)/posixstat.h
+fc.o: $(topdir)/builtins.h $(topdir)/command.h $(srcdir)/bashgetopt.h
+fc.o: $(topdir)/bashhist.h
+fc.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h
+fc.o: $(topdir)/general.h $(topdir)/xmalloc.h $(BASHINCDIR)/maxpath.h
+fc.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+fc.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/shell.h $(topdir)/syntax.h
+fc.o: $(topdir)/flags.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+fc.o: $(topdir)/bashansi.h $(BASHINCDIR)/ansi_stdlib.h $(BASHINCDIR)/chartypes.h
+fc.o: ../pathnames.h
+fg_bg.o: $(topdir)/bashtypes.h $(srcdir)/bashgetopt.h
+fg_bg.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+fg_bg.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+fg_bg.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+fg_bg.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+fg_bg.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+fg_bg.o: $(topdir)/jobs.h ../pathnames.h
+getopts.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+getopts.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+getopts.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+getopts.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+getopts.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+getopts.o: ../pathnames.h
+hash.o: $(topdir)/builtins.h $(topdir)/command.h $(topdir)/quit.h
+hash.o: $(topdir)/findcmd.h $(topdir)/hashlib.h
+hash.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+hash.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+hash.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+hash.o: $(srcdir)/common.h $(BASHINCDIR)/maxpath.h ../pathnames.h
+help.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+help.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+help.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+help.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+help.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+help.o: ${srcdir}/common.h ../pathnames.h
+history.o: $(topdir)/bashtypes.h
+history.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+history.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+history.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+history.o: $(topdir)/subst.h $(topdir)/externs.h
+history.o: ${BASHINCDIR}/filecntl.h $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h
+history.o: $(topdir)/variables.h $(topdir)/conftypes.h $(topdir)/bashhist.h $(BASHINCDIR)/maxpath.h
+history.o: ../pathnames.h
+inlib.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+inlib.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+inlib.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+inlib.o: $(BASHINCDIR)/maxpath.h $(topdir)/subst.h $(topdir)/externs.h
+inlib.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h ../pathnames.h
+jobs.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h
+jobs.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/quit.h $(srcdir)/bashgetopt.h
+jobs.o: $(BASHINCDIR)/maxpath.h $(topdir)/externs.h $(topdir)/jobs.h
+jobs.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h
+jobs.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+jobs.o: ../pathnames.h
+kill.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/error.h
+kill.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/subst.h $(topdir)/externs.h
+kill.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+kill.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/trap.h $(topdir)/unwind_prot.h
+kill.o: $(topdir)/variables.h $(topdir)/conftypes.h $(BASHINCDIR)/maxpath.h
+kill.o: $(topdir)/jobs.h ../pathnames.h
+let.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+let.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+let.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+let.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+let.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+let.o: ../pathnames.h
+printf.o: ../config.h $(BASHINCDIR)/memalloc.h $(topdir)/bashjmp.h
+printf.o: $(topdir)/command.h $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+printf.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+printf.o: $(topdir)/subst.h $(topdir)/externs.h $(topdir)/sig.h
+printf.o: ../pathnames.h $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h
+printf.o: $(topdir)/variables.h $(topdir)/conftypes.h $(BASHINCDIR)/stdc.h $(srcdir)/bashgetopt.h
+printf.o: $(topdir)/bashtypes.h ${srcdir}/common.h $(BASHINCDIR)/chartypes.h
+printf.o: ../pathnames.h
+pushd.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+pushd.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+pushd.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+pushd.o: $(topdir)/subst.h $(topdir)/externs.h
+pushd.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+pushd.o: $(BASHINCDIR)/maxpath.h $(srcdir)/common.h ./builtext.h
+pushd.o: ../pathnames.h
+read.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+read.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+read.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+read.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+read.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+read.o: $(BASHINCDIR)/shtty.h
+read.o: $(topdir)/arrayfunc.h ../pathnames.h
+return.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+return.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+return.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+return.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+return.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+return.o: ../pathnames.h
+set.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+set.o: $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/subst.h $(topdir)/externs.h
+set.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+set.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+set.o: $(BASHINCDIR)/maxpath.h $(topdir)/error.h
+set.o: $(topdir)/arrayfunc.h ../pathnames.h
+setattr.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+setattr.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(BASHINCDIR)/maxpath.h
+setattr.o: $(topdir)/quit.h $(srcdir)/common.h $(srcdir)/bashgetopt.h
+setattr.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h
+setattr.o: $(topdir)/externs.h
+setattr.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+setattr.o: $(topdir)/arrayfunc.h ../pathnames.h
+shift.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+shift.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+shift.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+shift.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+shift.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+shift.o: ../pathnames.h
+shopt.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+shopt.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+shopt.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+shopt.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+shopt.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+shopt.o: $(srcdir)/common.h $(srcdir)/bashgetopt.h ../pathnames.h
+shopt.o: $(topdir)/bashhist.h
+source.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+source.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/findcmd.h
+source.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+source.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+source.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+source.o: $(srcdir)/bashgetopt.h $(topdir)/flags.h $(topdir)/trap.h
+source.o: ../pathnames.h
+suspend.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+suspend.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+suspend.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+suspend.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+suspend.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+suspend.o: $(topdir)/jobs.h ../pathnames.h
+test.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+test.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+test.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+test.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+test.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+test.o: $(topdir)/test.h ../pathnames.h
+times.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+times.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+times.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+times.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+times.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+times.o: $(BASHINCDIR)/posixtime.h ../pathnames.h
+trap.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+trap.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h $(topdir)/externs.h
+trap.o: $(topdir)/quit.h $(srcdir)/common.h $(BASHINCDIR)/maxpath.h
+trap.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h
+trap.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+trap.o: $(topdir)/findcmd.h ../pathnames.h
+type.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+type.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+type.o: $(topdir)/quit.h $(srcdir)/common.h $(BASHINCDIR)/maxpath.h
+type.o: $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h $(topdir)/subst.h
+type.o: $(topdir)/externs.h $(topdir)/hashcmd.h ../pathnames.h
+type.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+ulimit.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+ulimit.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+ulimit.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+ulimit.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+ulimit.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+ulimit.o: ../pathnames.h
+umask.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+umask.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+umask.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+umask.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+umask.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+umask.o: $(BASHINCDIR)/chartypes.h ../pathnames.h
+wait.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+wait.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+wait.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+wait.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+wait.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/unwind_prot.h $(topdir)/variables.h $(topdir)/conftypes.h
+wait.o: $(topdir)/jobs.h
+wait.o: $(BASHINCDIR)/chartypes.h ../pathnames.h
+
+complete.o: ../config.h ../pathnames.h
+complete.o: ${topdir}/shell.h $(topdir)/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h ${topdir}/sig.h
+complete.o: ${topdir}/unwind_prot.h ${topdir}/variables.h
+complete.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+complete.o: ${topdir}/builtins.h
+complete.o: ${topdir}/pcomplete.h
+complete.o: ${srcdir}/common.h ${srcdir}/bashgetopt.h
+mapfile.o: $(topdir)/command.h ../config.h $(BASHINCDIR)/memalloc.h
+mapfile.o: $(topdir)/error.h $(topdir)/general.h $(topdir)/xmalloc.h
+mapfile.o: $(topdir)/quit.h $(topdir)/dispose_cmd.h $(topdir)/make_cmd.h
+mapfile.o: $(topdir)/subst.h $(topdir)/externs.h $(BASHINCDIR)/maxpath.h
+mapfile.o: $(topdir)/shell.h $(topdir)/syntax.h $(topdir)/variables.h $(topdir)/conftypes.h
+mapfile.o: $(topdir)/arrayfunc.h ../pathnames.h
+
+#bind.o: $(RL_LIBSRC)chardefs.h $(RL_LIBSRC)readline.h $(RL_LIBSRC)keymaps.h
+
+# libintl dependencies
+bind.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+break.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+caller.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+cd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+common.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+complete.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+declare.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+enable.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+evalfile.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+exec.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+exit.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+fc.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+fg_bg.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+getopt.c: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+hash.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+help.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+history.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+inlib.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+jobs.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+kill.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+let.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+mapfile.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+mkbuiltins.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+printf.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+pushd.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+read.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+return.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+set.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+setattr.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+shift.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+shopt.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+source.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+suspend.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+type.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+ulimit.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+umask.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
diff --git a/builtins/alias.def b/builtins/alias.def
new file mode 100644
index 0000000..d760ceb
--- /dev/null
+++ b/builtins/alias.def
@@ -0,0 +1,241 @@
+This file is alias.def, from which is created alias.c
+It implements the builtins "alias" and "unalias" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$BUILTIN alias
+$FUNCTION alias_builtin
+$DEPENDS_ON ALIAS
+$PRODUCES alias.c
+$SHORT_DOC alias [-p] [name[=value] ... ]
+Define or display aliases.
+
+Without arguments, `alias' prints the list of aliases in the reusable
+form `alias NAME=VALUE' on standard output.
+
+Otherwise, an alias is defined for each NAME whose VALUE is given.
+A trailing space in VALUE causes the next word to be checked for
+alias substitution when the alias is expanded.
+
+Options:
+ -p Print all defined aliases in a reusable format
+
+Exit Status:
+alias returns true unless a NAME is supplied for which no alias has been
+defined.
+$END
+
+#include <config.h>
+
+#if defined (ALIAS)
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+# include "../bashansi.h"
+# include "../bashintl.h"
+
+# include <stdio.h>
+# include "../shell.h"
+# include "../alias.h"
+# include "common.h"
+# include "bashgetopt.h"
+
+/* Flags for print_alias */
+#define AL_REUSABLE 0x01
+
+static void print_alias __P((alias_t *, int));
+
+extern int posixly_correct;
+
+/* Hack the alias command in a Korn shell way. */
+int
+alias_builtin (list)
+ WORD_LIST *list;
+{
+ int any_failed, offset, pflag, dflags;
+ alias_t **alias_list, *t;
+ char *name, *value;
+
+ dflags = posixly_correct ? 0 : AL_REUSABLE;
+ pflag = 0;
+ reset_internal_getopt ();
+ while ((offset = internal_getopt (list, "p")) != -1)
+ {
+ switch (offset)
+ {
+ case 'p':
+ pflag = 1;
+ dflags |= AL_REUSABLE;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+
+ list = loptend;
+
+ if (list == 0 || pflag)
+ {
+ if (aliases == 0)
+ return (EXECUTION_SUCCESS);
+
+ alias_list = all_aliases ();
+
+ if (alias_list == 0)
+ return (EXECUTION_SUCCESS);
+
+ for (offset = 0; alias_list[offset]; offset++)
+ print_alias (alias_list[offset], dflags);
+
+ free (alias_list); /* XXX - Do not free the strings. */
+
+ if (list == 0)
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+ }
+
+ any_failed = 0;
+ while (list)
+ {
+ name = list->word->word;
+
+ for (offset = 0; name[offset] && name[offset] != '='; offset++)
+ ;
+
+ if (offset && name[offset] == '=')
+ {
+ name[offset] = '\0';
+ value = name + offset + 1;
+
+ if (legal_alias_name (name, 0) == 0)
+ {
+ builtin_error (_("`%s': invalid alias name"), name);
+ any_failed++;
+ }
+ else
+ add_alias (name, value);
+ }
+ else
+ {
+ t = find_alias (name);
+ if (t)
+ print_alias (t, dflags);
+ else
+ {
+ sh_notfound (name);
+ any_failed++;
+ }
+ }
+ list = list->next;
+ }
+
+ return (any_failed ? EXECUTION_FAILURE : EXECUTION_SUCCESS);
+}
+#endif /* ALIAS */
+
+$BUILTIN unalias
+$FUNCTION unalias_builtin
+$DEPENDS_ON ALIAS
+$SHORT_DOC unalias [-a] name [name ...]
+Remove each NAME from the list of defined aliases.
+
+Options:
+ -a remove all alias definitions.
+
+Return success unless a NAME is not an existing alias.
+$END
+
+#if defined (ALIAS)
+/* Remove aliases named in LIST from the aliases database. */
+int
+unalias_builtin (list)
+ register WORD_LIST *list;
+{
+ register alias_t *alias;
+ int opt, aflag;
+
+ aflag = 0;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "a")) != -1)
+ {
+ switch (opt)
+ {
+ case 'a':
+ aflag = 1;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+
+ list = loptend;
+
+ if (aflag)
+ {
+ delete_all_aliases ();
+ return (EXECUTION_SUCCESS);
+ }
+
+ if (list == 0)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ aflag = 0;
+ while (list)
+ {
+ alias = find_alias (list->word->word);
+
+ if (alias)
+ remove_alias (alias->name);
+ else
+ {
+ sh_notfound (list->word->word);
+ aflag++;
+ }
+
+ list = list->next;
+ }
+
+ return (aflag ? EXECUTION_FAILURE : EXECUTION_SUCCESS);
+}
+
+/* Output ALIAS in such a way as to allow it to be read back in. */
+static void
+print_alias (alias, flags)
+ alias_t *alias;
+ int flags;
+{
+ char *value;
+
+ value = sh_single_quote (alias->value);
+ if (flags & AL_REUSABLE)
+ printf ("alias ");
+ printf ("%s=%s\n", alias->name, value);
+ free (value);
+
+ fflush (stdout);
+}
+#endif /* ALIAS */
diff --git a/builtins/bashgetopt.c b/builtins/bashgetopt.c
new file mode 100644
index 0000000..b1b7070
--- /dev/null
+++ b/builtins/bashgetopt.c
@@ -0,0 +1,175 @@
+/* bashgetopt.c -- `getopt' for use by the builtins. */
+
+/* Copyright (C) 1992-2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "../bashansi.h"
+#include <chartypes.h>
+#include <errno.h>
+
+#include "../shell.h"
+#include "common.h"
+
+#define ISOPT(s) (((*(s) == '-') || (plus && *(s) == '+')) && (s)[1])
+#define NOTOPT(s) (((*(s) != '-') && (!plus || *(s) != '+')) || (s)[1] == '\0')
+
+static int sp;
+
+char *list_optarg;
+int list_optopt;
+int list_opttype;
+
+static WORD_LIST *lhead = (WORD_LIST *)NULL;
+WORD_LIST *lcurrent = (WORD_LIST *)NULL;
+WORD_LIST *loptend; /* Points to the first non-option argument in the list */
+
+int
+internal_getopt(list, opts)
+WORD_LIST *list;
+char *opts;
+{
+ register int c;
+ register char *cp;
+ int plus; /* nonzero means to handle +option */
+ static char errstr[3] = { '-', '\0', '\0' };
+
+ plus = *opts == '+';
+ if (plus)
+ opts++;
+
+ if (list == 0) {
+ list_optarg = (char *)NULL;
+ loptend = (WORD_LIST *)NULL; /* No non-option arguments */
+ return -1;
+ }
+
+ if (list != lhead || lhead == 0) {
+ /* Hmmm.... called with a different word list. Reset. */
+ sp = 1;
+ lcurrent = lhead = list;
+ loptend = (WORD_LIST *)NULL;
+ }
+
+ if (sp == 1) {
+ if (lcurrent == 0 || NOTOPT(lcurrent->word->word)) {
+ lhead = (WORD_LIST *)NULL;
+ loptend = lcurrent;
+ return(-1);
+ } else if (lcurrent->word->word[0] == '-' &&
+ lcurrent->word->word[1] == '-' &&
+ lcurrent->word->word[2] == 0) {
+ lhead = (WORD_LIST *)NULL;
+ loptend = lcurrent->next;
+ return(-1);
+ }
+ errstr[0] = list_opttype = lcurrent->word->word[0];
+ }
+
+ list_optopt = c = lcurrent->word->word[sp];
+
+ if (c == ':' || (cp = strchr(opts, c)) == NULL) {
+ errstr[1] = c;
+ sh_invalidopt (errstr);
+ if (lcurrent->word->word[++sp] == '\0') {
+ lcurrent = lcurrent->next;
+ sp = 1;
+ }
+ list_optarg = NULL;
+ if (lcurrent)
+ loptend = lcurrent->next;
+ return('?');
+ }
+
+ if (*++cp == ':' || *cp == ';') {
+ /* `:': Option requires an argument. */
+ /* `;': option argument may be missing */
+ /* We allow -l2 as equivalent to -l 2 */
+ if (lcurrent->word->word[sp+1]) {
+ list_optarg = lcurrent->word->word + sp + 1;
+ lcurrent = lcurrent->next;
+ /* If the specifier is `;', don't set optarg if the next
+ argument looks like another option. */
+#if 0
+ } else if (lcurrent->next && (*cp == ':' || lcurrent->next->word->word[0] != '-')) {
+#else
+ } else if (lcurrent->next && (*cp == ':' || NOTOPT(lcurrent->next->word->word))) {
+#endif
+ lcurrent = lcurrent->next;
+ list_optarg = lcurrent->word->word;
+ lcurrent = lcurrent->next;
+ } else if (*cp == ';') {
+ list_optarg = (char *)NULL;
+ lcurrent = lcurrent->next;
+ } else { /* lcurrent->next == NULL */
+ errstr[1] = c;
+ sh_needarg (errstr);
+ sp = 1;
+ list_optarg = (char *)NULL;
+ return('?');
+ }
+ sp = 1;
+ } else if (*cp == '#') {
+ /* option requires a numeric argument */
+ if (lcurrent->word->word[sp+1]) {
+ if (DIGIT(lcurrent->word->word[sp+1])) {
+ list_optarg = lcurrent->word->word + sp + 1;
+ lcurrent = lcurrent->next;
+ } else
+ list_optarg = (char *)NULL;
+ } else {
+ if (lcurrent->next && legal_number(lcurrent->next->word->word, (intmax_t *)0)) {
+ lcurrent = lcurrent->next;
+ list_optarg = lcurrent->word->word;
+ lcurrent = lcurrent->next;
+ } else {
+ errstr[1] = c;
+ sh_neednumarg (errstr);
+ sp = 1;
+ list_optarg = (char *)NULL;
+ return ('?');
+ }
+ }
+
+ } else {
+ /* No argument, just return the option. */
+ if (lcurrent->word->word[++sp] == '\0') {
+ sp = 1;
+ lcurrent = lcurrent->next;
+ }
+ list_optarg = (char *)NULL;
+ }
+
+ return(c);
+}
+
+/*
+ * reset_internal_getopt -- force the in[ft]ernal getopt to reset
+ */
+
+void
+reset_internal_getopt ()
+{
+ lhead = lcurrent = loptend = (WORD_LIST *)NULL;
+ sp = 1;
+}
diff --git a/builtins/bashgetopt.h b/builtins/bashgetopt.h
new file mode 100644
index 0000000..f2aea26
--- /dev/null
+++ b/builtins/bashgetopt.h
@@ -0,0 +1,39 @@
+/* bashgetopt.h -- extern declarations for stuff defined in bashgetopt.c. */
+
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* See getopt.h for the explanation of these variables. */
+
+#if !defined (__BASH_GETOPT_H)
+# define __BASH_GETOPT_H
+
+#include <stdc.h>
+
+extern char *list_optarg;
+
+extern int list_optopt;
+extern int list_opttype;
+
+extern WORD_LIST *lcurrent;
+extern WORD_LIST *loptend;
+
+extern int internal_getopt __P((WORD_LIST *, char *));
+extern void reset_internal_getopt __P((void));
+
+#endif /* !__BASH_GETOPT_H */
diff --git a/builtins/bind.def b/builtins/bind.def
new file mode 100644
index 0000000..d0c953b
--- /dev/null
+++ b/builtins/bind.def
@@ -0,0 +1,332 @@
+This file is bind.def, from which is created bind.c.
+It implements the builtin "bind" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES bind.c
+
+#include <config.h>
+
+$BUILTIN bind
+$DEPENDS_ON READLINE
+$FUNCTION bind_builtin
+$SHORT_DOC bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-x keyseq:shell-command] [keyseq:readline-function or readline-command]
+Set Readline key bindings and variables.
+
+Bind a key sequence to a Readline function or a macro, or set a
+Readline variable. The non-option argument syntax is equivalent to
+that found in ~/.inputrc, but must be passed as a single argument:
+e.g., bind '"\C-x\C-r": re-read-init-file'.
+
+Options:
+ -m keymap Use KEYMAP as the keymap for the duration of this
+ command. Acceptable keymap names are emacs,
+ emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,
+ vi-command, and vi-insert.
+ -l List names of functions.
+ -P List function names and bindings.
+ -p List functions and bindings in a form that can be
+ reused as input.
+ -S List key sequences that invoke macros and their values
+ -s List key sequences that invoke macros and their values
+ in a form that can be reused as input.
+ -V List variable names and values
+ -v List variable names and values in a form that can
+ be reused as input.
+ -q function-name Query about which keys invoke the named function.
+ -u function-name Unbind all keys which are bound to the named function.
+ -r keyseq Remove the binding for KEYSEQ.
+ -f filename Read key bindings from FILENAME.
+ -x keyseq:shell-command Cause SHELL-COMMAND to be executed when
+ KEYSEQ is entered.
+
+Exit Status:
+bind returns 0 unless an unrecognized option is given or an error occurs.
+$END
+
+#if defined (READLINE)
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+#include <readline/readline.h>
+#include <readline/history.h>
+
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../bashline.h"
+#include "bashgetopt.h"
+#include "common.h"
+
+static int query_bindings __P((char *));
+static int unbind_command __P((char *));
+
+extern int no_line_editing;
+
+#define BIND_RETURN(x) do { return_code = x; goto bind_exit; } while (0)
+
+#define LFLAG 0x0001
+#define PFLAG 0x0002
+#define FFLAG 0x0004
+#define VFLAG 0x0008
+#define QFLAG 0x0010
+#define MFLAG 0x0020
+#define RFLAG 0x0040
+#define PPFLAG 0x0080
+#define VVFLAG 0x0100
+#define SFLAG 0x0200
+#define SSFLAG 0x0400
+#define UFLAG 0x0800
+#define XFLAG 0x1000
+
+int
+bind_builtin (list)
+ WORD_LIST *list;
+{
+ int return_code;
+ Keymap kmap, saved_keymap;
+ int flags, opt;
+ char *initfile, *map_name, *fun_name, *unbind_name, *remove_seq, *cmd_seq;
+
+ if (no_line_editing)
+ {
+#if 0
+ builtin_error (_("line editing not enabled"));
+ return (EXECUTION_FAILURE);
+#else
+ builtin_warning (_("line editing not enabled"));
+#endif
+ }
+
+ kmap = saved_keymap = (Keymap) NULL;
+ flags = 0;
+ initfile = map_name = fun_name = unbind_name = remove_seq = (char *)NULL;
+ return_code = EXECUTION_SUCCESS;
+
+ if (bash_readline_initialized == 0)
+ initialize_readline ();
+
+ begin_unwind_frame ("bind_builtin");
+ unwind_protect_var (rl_outstream);
+
+ rl_outstream = stdout;
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "lvpVPsSf:q:u:m:r:x:")) != EOF)
+ {
+ switch (opt)
+ {
+ case 'l':
+ flags |= LFLAG;
+ break;
+ case 'v':
+ flags |= VFLAG;
+ break;
+ case 'p':
+ flags |= PFLAG;
+ break;
+ case 'f':
+ flags |= FFLAG;
+ initfile = list_optarg;
+ break;
+ case 'm':
+ flags |= MFLAG;
+ map_name = list_optarg;
+ break;
+ case 'q':
+ flags |= QFLAG;
+ fun_name = list_optarg;
+ break;
+ case 'u':
+ flags |= UFLAG;
+ unbind_name = list_optarg;
+ break;
+ case 'r':
+ flags |= RFLAG;
+ remove_seq = list_optarg;
+ break;
+ case 'V':
+ flags |= VVFLAG;
+ break;
+ case 'P':
+ flags |= PPFLAG;
+ break;
+ case 's':
+ flags |= SFLAG;
+ break;
+ case 'S':
+ flags |= SSFLAG;
+ break;
+ case 'x':
+ flags |= XFLAG;
+ cmd_seq = list_optarg;
+ break;
+ default:
+ builtin_usage ();
+ BIND_RETURN (EX_USAGE);
+ }
+ }
+
+ list = loptend;
+
+ /* First, see if we need to install a special keymap for this
+ command. Then start on the arguments. */
+
+ if ((flags & MFLAG) && map_name)
+ {
+ kmap = rl_get_keymap_by_name (map_name);
+ if (!kmap)
+ {
+ builtin_error (_("`%s': invalid keymap name"), map_name);
+ BIND_RETURN (EXECUTION_FAILURE);
+ }
+ }
+
+ if (kmap)
+ {
+ saved_keymap = rl_get_keymap ();
+ rl_set_keymap (kmap);
+ }
+
+ /* XXX - we need to add exclusive use tests here. It doesn't make sense
+ to use some of these options together. */
+ /* Now hack the option arguments */
+ if (flags & LFLAG)
+ rl_list_funmap_names ();
+
+ if (flags & PFLAG)
+ rl_function_dumper (1);
+
+ if (flags & PPFLAG)
+ rl_function_dumper (0);
+
+ if (flags & SFLAG)
+ rl_macro_dumper (1);
+
+ if (flags & SSFLAG)
+ rl_macro_dumper (0);
+
+ if (flags & VFLAG)
+ rl_variable_dumper (1);
+
+ if (flags & VVFLAG)
+ rl_variable_dumper (0);
+
+ if ((flags & FFLAG) && initfile)
+ {
+ if (rl_read_init_file (initfile) != 0)
+ {
+ builtin_error (_("%s: cannot read: %s"), initfile, strerror (errno));
+ BIND_RETURN (EXECUTION_FAILURE);
+ }
+ }
+
+ if ((flags & QFLAG) && fun_name)
+ return_code = query_bindings (fun_name);
+
+ if ((flags & UFLAG) && unbind_name)
+ return_code = unbind_command (unbind_name);
+
+ if ((flags & RFLAG) && remove_seq)
+ {
+ if (rl_bind_keyseq (remove_seq, (rl_command_func_t *)NULL) != 0)
+ {
+ builtin_error (_("`%s': cannot unbind"), remove_seq);
+ BIND_RETURN (EXECUTION_FAILURE);
+ }
+ }
+
+ if (flags & XFLAG)
+ return_code = bind_keyseq_to_unix_command (cmd_seq);
+
+ /* Process the rest of the arguments as binding specifications. */
+ while (list)
+ {
+ rl_parse_and_bind (list->word->word);
+ list = list->next;
+ }
+
+ bind_exit:
+ if (saved_keymap)
+ rl_set_keymap (saved_keymap);
+
+ run_unwind_frame ("bind_builtin");
+
+ return (sh_chkwrite (return_code));
+}
+
+static int
+query_bindings (name)
+ char *name;
+{
+ rl_command_func_t *function;
+ char **keyseqs;
+ int j;
+
+ function = rl_named_function (name);
+ if (function == 0)
+ {
+ builtin_error (_("`%s': unknown function name"), name);
+ return EXECUTION_FAILURE;
+ }
+
+ keyseqs = rl_invoking_keyseqs (function);
+
+ if (!keyseqs)
+ {
+ printf (_("%s is not bound to any keys.\n"), name);
+ return EXECUTION_FAILURE;
+ }
+
+ printf (_("%s can be invoked via "), name);
+ for (j = 0; j < 5 && keyseqs[j]; j++)
+ printf ("\"%s\"%s", keyseqs[j], keyseqs[j + 1] ? ", " : ".\n");
+ if (keyseqs[j])
+ printf ("...\n");
+ strvec_dispose (keyseqs);
+ return EXECUTION_SUCCESS;
+}
+
+static int
+unbind_command (name)
+ char *name;
+{
+ rl_command_func_t *function;
+
+ function = rl_named_function (name);
+ if (function == 0)
+ {
+ builtin_error (_("`%s': unknown function name"), name);
+ return EXECUTION_FAILURE;
+ }
+
+ rl_unbind_function_in_map (function, rl_get_keymap ());
+ return EXECUTION_SUCCESS;
+}
+#endif /* READLINE */
diff --git a/builtins/break.def b/builtins/break.def
new file mode 100644
index 0000000..232ac1a
--- /dev/null
+++ b/builtins/break.def
@@ -0,0 +1,141 @@
+This file is break.def, from which is created break.c.
+It implements the builtins "break" and "continue" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES break.c
+
+$BUILTIN break
+$FUNCTION break_builtin
+$SHORT_DOC break [n]
+Exit for, while, or until loops.
+
+Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing
+loops.
+
+Exit Status:
+The exit status is 0 unless N is not greater than or equal to 1.
+$END
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "common.h"
+
+extern char *this_command_name;
+extern int posixly_correct;
+
+static int check_loop_level __P((void));
+
+/* The depth of while's and until's. */
+int loop_level = 0;
+
+/* Non-zero when a "break" instruction is encountered. */
+int breaking = 0;
+
+/* Non-zero when we have encountered a continue instruction. */
+int continuing = 0;
+
+/* Set up to break x levels, where x defaults to 1, but can be specified
+ as the first argument. */
+int
+break_builtin (list)
+ WORD_LIST *list;
+{
+ intmax_t newbreak;
+
+ if (check_loop_level () == 0)
+ return (EXECUTION_SUCCESS);
+
+ (void)get_numeric_arg (list, 1, &newbreak);
+
+ if (newbreak <= 0)
+ {
+ sh_erange (list->word->word, _("loop count"));
+ breaking = loop_level;
+ return (EXECUTION_FAILURE);
+ }
+
+ if (newbreak > loop_level)
+ newbreak = loop_level;
+
+ breaking = newbreak;
+
+ return (EXECUTION_SUCCESS);
+}
+
+$BUILTIN continue
+$FUNCTION continue_builtin
+$SHORT_DOC continue [n]
+Resume for, while, or until loops.
+
+Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.
+If N is specified, resumes the Nth enclosing loop.
+
+Exit Status:
+The exit status is 0 unless N is not greater than or equal to 1.
+$END
+
+/* Set up to continue x levels, where x defaults to 1, but can be specified
+ as the first argument. */
+int
+continue_builtin (list)
+ WORD_LIST *list;
+{
+ intmax_t newcont;
+
+ if (check_loop_level () == 0)
+ return (EXECUTION_SUCCESS);
+
+ (void)get_numeric_arg (list, 1, &newcont);
+
+ if (newcont <= 0)
+ {
+ sh_erange (list->word->word, _("loop count"));
+ breaking = loop_level;
+ return (EXECUTION_FAILURE);
+ }
+
+ if (newcont > loop_level)
+ newcont = loop_level;
+
+ continuing = newcont;
+
+ return (EXECUTION_SUCCESS);
+}
+
+/* Return non-zero if a break or continue command would be okay.
+ Print an error message if break or continue is meaningless here. */
+static int
+check_loop_level ()
+{
+#if defined (BREAK_COMPLAINS)
+ if (loop_level == 0 && posixly_correct == 0)
+ builtin_error (_("only meaningful in a `for', `while', or `until' loop"));
+#endif /* BREAK_COMPLAINS */
+
+ return (loop_level);
+}
diff --git a/builtins/builtin.def b/builtins/builtin.def
new file mode 100644
index 0000000..3e765e4
--- /dev/null
+++ b/builtins/builtin.def
@@ -0,0 +1,85 @@
+This file is builtin.def, from which is created builtin.c.
+It implements the builtin "builtin" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES builtin.c
+
+$BUILTIN builtin
+$FUNCTION builtin_builtin
+$SHORT_DOC builtin [shell-builtin [arg ...]]
+Execute shell builtins.
+
+Execute SHELL-BUILTIN with arguments ARGs without performing command
+lookup. This is useful when you wish to reimplement a shell builtin
+as a shell function, but need to execute the builtin within the function.
+
+Exit Status:
+Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is
+not a shell builtin..
+$END
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "../shell.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+extern char *this_command_name;
+
+/* Run the command mentioned in list directly, without going through the
+ normal alias/function/builtin/filename lookup process. */
+int
+builtin_builtin (list)
+ WORD_LIST *list;
+{
+ sh_builtin_func_t *function;
+ register char *command;
+
+ if (no_options (list))
+ return (EX_USAGE);
+ list = loptend; /* skip over possible `--' */
+
+ if (list == 0)
+ return (EXECUTION_SUCCESS);
+
+ command = list->word->word;
+#if defined (DISABLED_BUILTINS)
+ function = builtin_address (command);
+#else /* !DISABLED_BUILTINS */
+ function = find_shell_builtin (command);
+#endif /* !DISABLED_BUILTINS */
+
+ if (!function)
+ {
+ sh_notbuiltin (command);
+ return (EXECUTION_FAILURE);
+ }
+ else
+ {
+ this_command_name = command;
+ list = list->next;
+ return ((*function) (list));
+ }
+}
diff --git a/builtins/caller.def b/builtins/caller.def
new file mode 100644
index 0000000..7ddbdad
--- /dev/null
+++ b/builtins/caller.def
@@ -0,0 +1,153 @@
+This file is caller.def, from which is created caller.c. It implements the
+builtin "caller" in Bash.
+
+Copyright (C) 2002-2008 Rocky Bernstein for Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES caller.c
+
+$BUILTIN caller
+$FUNCTION caller_builtin
+$DEPENDS_ON DEBUGGER
+$SHORT_DOC caller [expr]
+Return the context of the current subroutine call.
+
+Without EXPR, returns "$line $filename". With EXPR, returns
+"$line $subroutine $filename"; this extra information can be used to
+provide a stack trace.
+
+The value of EXPR indicates how many call frames to go back before the
+current one; the top frame is frame 0.
+
+Exit Status:
+Returns 0 unless the shell is not executing a shell function or EXPR
+is invalid.
+$END
+
+#include <config.h>
+#include <stdio.h>
+#include "chartypes.h"
+#include "bashtypes.h"
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <errno.h>
+
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "common.h"
+#include "builtext.h"
+#include "bashgetopt.h"
+
+#ifdef LOADABLE_BUILTIN
+# include "builtins.h"
+#endif
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+int
+caller_builtin (list)
+ WORD_LIST *list;
+{
+#if !defined (ARRAY_VARS)
+ printf ("1 NULL\n");
+ return (EXECUTION_FAILURE);
+#else
+ SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v;
+ ARRAY *funcname_a, *bash_source_a, *bash_lineno_a;
+ char *funcname_s, *source_s, *lineno_s;
+ intmax_t num;
+
+ GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a);
+ GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a);
+ GET_ARRAY_FROM_VAR ("BASH_LINENO", bash_lineno_v, bash_lineno_a);
+
+ if (bash_lineno_a == 0 || array_empty (bash_lineno_a))
+ return (EXECUTION_FAILURE);
+
+ if (bash_source_a == 0 || array_empty (bash_source_a))
+ return (EXECUTION_FAILURE);
+
+ if (no_options (list))
+ return (EX_USAGE);
+ list = loptend; /* skip over possible `--' */
+
+ /* If there is no argument list, then give short form: line filename. */
+ if (list == 0)
+ {
+ lineno_s = array_reference (bash_lineno_a, 0);
+ source_s = array_reference (bash_source_a, 1);
+ printf("%s %s\n", lineno_s ? lineno_s : "NULL", source_s ? source_s : "NULL");
+ return (EXECUTION_SUCCESS);
+ }
+
+ if (funcname_a == 0 || array_empty (funcname_a))
+ return (EXECUTION_FAILURE);
+
+ if (legal_number (list->word->word, &num))
+ {
+ lineno_s = array_reference (bash_lineno_a, num);
+ source_s = array_reference (bash_source_a, num+1);
+ funcname_s = array_reference (funcname_a, num+1);
+
+ if (lineno_s == NULL|| source_s == NULL || funcname_s == NULL)
+ return (EXECUTION_FAILURE);
+
+ printf("%s %s %s\n", lineno_s, funcname_s, source_s);
+ }
+ else
+ {
+ sh_invalidnum (list->word->word);
+ builtin_usage ();
+ return (EXECUTION_FAILURE);
+ }
+
+ return (EXECUTION_SUCCESS);
+#endif
+}
+
+#ifdef LOADABLE_BUILTIN
+static char *caller_doc[] = {
+N_("Returns the context of the current subroutine call.\n\
+ \n\
+ Without EXPR, returns "$line $filename". With EXPR, returns\n\
+ "$line $subroutine $filename"; this extra information can be used to\n\
+ provide a stack trace.\n\
+ \n\
+ The value of EXPR indicates how many call frames to go back before the\n\
+ current one; the top frame is frame 0."),
+ (char *)NULL
+};
+
+struct builtin caller_struct = {
+ "caller",
+ caller_builtin,
+ BUILTIN_ENABLED,
+ caller_doc,
+ "caller [EXPR]",
+ 0
+};
+
+#endif /* LOADABLE_BUILTIN */
diff --git a/builtins/cd.def b/builtins/cd.def
new file mode 100644
index 0000000..d53b258
--- /dev/null
+++ b/builtins/cd.def
@@ -0,0 +1,513 @@
+This file is cd.def, from which is created cd.c. It implements the
+builtins "cd" and "pwd" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES cd.c
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "../bashtypes.h"
+#include "posixdir.h"
+#include "posixstat.h"
+#ifndef _MINIX
+#include <sys/param.h>
+#endif
+
+#include <stdio.h>
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include <errno.h>
+#include <tilde/tilde.h>
+
+#include "../shell.h"
+#include "../flags.h"
+#include "maxpath.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+extern int posixly_correct;
+extern int array_needs_making;
+extern const char * const bash_getcwd_errstr;
+
+static int bindpwd __P((int));
+static void setpwd __P((char *));
+static char *resetpwd __P((char *));
+static int change_to_directory __P((char *, int));
+
+/* Change this to 1 to get cd spelling correction by default. */
+int cdspelling = 0;
+
+int cdable_vars;
+
+$BUILTIN cd
+$FUNCTION cd_builtin
+$SHORT_DOC cd [-L|-P] [dir]
+Change the shell working directory.
+
+Change the current directory to DIR. The default DIR is the value of the
+HOME shell variable.
+
+The variable CDPATH defines the search path for the directory containing
+DIR. Alternative directory names in CDPATH are separated by a colon (:).
+A null directory name is the same as the current directory. If DIR begins
+with a slash (/), then CDPATH is not used.
+
+If the directory is not found, and the shell option `cdable_vars' is set,
+the word is assumed to be a variable name. If that variable has a value,
+its value is used for DIR.
+
+Options:
+ -L force symbolic links to be followed
+ -P use the physical directory structure without following symbolic
+ links
+
+The default is to follow symbolic links, as if `-L' were specified.
+
+Exit Status:
+Returns 0 if the directory is changed; non-zero otherwise.
+$END
+
+/* Just set $PWD, don't change OLDPWD. Used by `pwd -P' in posix mode. */
+static void
+setpwd (dirname)
+ char *dirname;
+{
+ int old_anm;
+ SHELL_VAR *tvar;
+
+ old_anm = array_needs_making;
+ tvar = bind_variable ("PWD", dirname ? dirname : "", 0);
+ if (old_anm == 0 && array_needs_making && exported_p (tvar))
+ {
+ update_export_env_inplace ("PWD=", 4, dirname ? dirname : "");
+ array_needs_making = 0;
+ }
+}
+
+static int
+bindpwd (no_symlinks)
+ int no_symlinks;
+{
+ char *dirname, *pwdvar;
+ int old_anm, r;
+ SHELL_VAR *tvar;
+
+ r = sh_chkwrite (EXECUTION_SUCCESS);
+
+#define tcwd the_current_working_directory
+ dirname = tcwd ? (no_symlinks ? sh_physpath (tcwd, 0) : tcwd)
+ : get_working_directory ("cd");
+#undef tcwd
+
+ old_anm = array_needs_making;
+ pwdvar = get_string_value ("PWD");
+
+ tvar = bind_variable ("OLDPWD", pwdvar, 0);
+ if (old_anm == 0 && array_needs_making && exported_p (tvar))
+ {
+ update_export_env_inplace ("OLDPWD=", 7, pwdvar);
+ array_needs_making = 0;
+ }
+
+ setpwd (dirname);
+
+ if (dirname && dirname != the_current_working_directory)
+ free (dirname);
+
+ return (r);
+}
+
+/* Call get_working_directory to reset the value of
+ the_current_working_directory () */
+static char *
+resetpwd (caller)
+ char *caller;
+{
+ char *tdir;
+
+ FREE (the_current_working_directory);
+ the_current_working_directory = (char *)NULL;
+ tdir = get_working_directory (caller);
+ return (tdir);
+}
+
+#define LCD_DOVARS 0x001
+#define LCD_DOSPELL 0x002
+#define LCD_PRINTPATH 0x004
+#define LCD_FREEDIRNAME 0x010
+
+/* This builtin is ultimately the way that all user-visible commands should
+ change the current working directory. It is called by cd_to_string (),
+ so the programming interface is simple, and it handles errors and
+ restrictions properly. */
+int
+cd_builtin (list)
+ WORD_LIST *list;
+{
+ char *dirname, *cdpath, *path, *temp;
+ int path_index, no_symlinks, opt, lflag;
+
+#if defined (RESTRICTED_SHELL)
+ if (restricted)
+ {
+ sh_restricted ((char *)NULL);
+ return (EXECUTION_FAILURE);
+ }
+#endif /* RESTRICTED_SHELL */
+
+ no_symlinks = no_symbolic_links;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "LP")) != -1)
+ {
+ switch (opt)
+ {
+ case 'P':
+ no_symlinks = 1;
+ break;
+ case 'L':
+ no_symlinks = 0;
+ break;
+ default:
+ builtin_usage ();
+ return (EXECUTION_FAILURE);
+ }
+ }
+ list = loptend;
+
+ lflag = (cdable_vars ? LCD_DOVARS : 0) |
+ ((interactive && cdspelling) ? LCD_DOSPELL : 0);
+
+ if (list == 0)
+ {
+ /* `cd' without arguments is equivalent to `cd $HOME' */
+ dirname = get_string_value ("HOME");
+
+ if (dirname == 0)
+ {
+ builtin_error (_("HOME not set"));
+ return (EXECUTION_FAILURE);
+ }
+ lflag = 0;
+ }
+ else if (list->word->word[0] == '-' && list->word->word[1] == '\0')
+ {
+ /* This is `cd -', equivalent to `cd $OLDPWD' */
+ dirname = get_string_value ("OLDPWD");
+
+ if (dirname == 0)
+ {
+ builtin_error (_("OLDPWD not set"));
+ return (EXECUTION_FAILURE);
+ }
+#if 0
+ lflag = interactive ? LCD_PRINTPATH : 0;
+#else
+ lflag = LCD_PRINTPATH; /* According to SUSv3 */
+#endif
+ }
+ else if (absolute_pathname (list->word->word))
+ dirname = list->word->word;
+ else if (privileged_mode == 0 && (cdpath = get_string_value ("CDPATH")))
+ {
+ dirname = list->word->word;
+
+ /* Find directory in $CDPATH. */
+ path_index = 0;
+ while (path = extract_colon_unit (cdpath, &path_index))
+ {
+ /* OPT is 1 if the path element is non-empty */
+ opt = path[0] != '\0';
+ temp = sh_makepath (path, dirname, MP_DOTILDE);
+ free (path);
+
+ if (change_to_directory (temp, no_symlinks))
+ {
+ /* POSIX.2 says that if a nonempty directory from CDPATH
+ is used to find the directory to change to, the new
+ directory name is echoed to stdout, whether or not
+ the shell is interactive. */
+ if (opt && (path = no_symlinks ? temp : the_current_working_directory))
+ printf ("%s\n", path);
+
+ free (temp);
+#if 0
+ /* Posix.2 says that after using CDPATH, the resultant
+ value of $PWD will not contain `.' or `..'. */
+ return (bindpwd (posixly_correct || no_symlinks));
+#else
+ return (bindpwd (no_symlinks));
+#endif
+ }
+ else
+ free (temp);
+ }
+
+ /* POSIX.2 says that if `.' does not appear in $CDPATH, we don't
+ try the current directory, so we just punt now with an error
+ message if POSIXLY_CORRECT is non-zero. The check for cdpath[0]
+ is so we don't mistakenly treat a CDPATH value of "" as not
+ specifying the current directory. */
+ if (posixly_correct && cdpath[0])
+ {
+ builtin_error ("%s: %s", dirname, strerror (ENOENT));
+ return (EXECUTION_FAILURE);
+ }
+ }
+ else
+ dirname = list->word->word;
+
+ /* When we get here, DIRNAME is the directory to change to. If we
+ chdir successfully, just return. */
+ if (change_to_directory (dirname, no_symlinks))
+ {
+ if (lflag & LCD_PRINTPATH)
+ printf ("%s\n", dirname);
+ return (bindpwd (no_symlinks));
+ }
+
+ /* If the user requests it, then perhaps this is the name of
+ a shell variable, whose value contains the directory to
+ change to. */
+ if (lflag & LCD_DOVARS)
+ {
+ temp = get_string_value (dirname);
+ if (temp && change_to_directory (temp, no_symlinks))
+ {
+ printf ("%s\n", temp);
+ return (bindpwd (no_symlinks));
+ }
+ }
+
+ /* If the user requests it, try to find a directory name similar in
+ spelling to the one requested, in case the user made a simple
+ typo. This is similar to the UNIX 8th and 9th Edition shells. */
+ if (lflag & LCD_DOSPELL)
+ {
+ temp = dirspell (dirname);
+ if (temp && change_to_directory (temp, no_symlinks))
+ {
+ printf ("%s\n", temp);
+ return (bindpwd (no_symlinks));
+ }
+ else
+ FREE (temp);
+ }
+
+ builtin_error ("%s: %s", dirname, strerror (errno));
+ return (EXECUTION_FAILURE);
+}
+
+$BUILTIN pwd
+$FUNCTION pwd_builtin
+$SHORT_DOC pwd [-LP]
+Print the name of the current working directory.
+
+Options:
+ -L print the value of $PWD if it names the current working
+ directory
+ -P print the physical directory, without any symbolic links
+
+By default, `pwd' behaves as if `-L' were specified.
+
+Exit Status:
+Returns 0 unless an invalid option is given or the current directory
+cannot be read.
+$END
+
+/* Non-zero means that pwd always prints the physical directory, without
+ symbolic links. */
+static int verbatim_pwd;
+
+/* Print the name of the current working directory. */
+int
+pwd_builtin (list)
+ WORD_LIST *list;
+{
+ char *directory;
+ int opt, pflag;
+
+ verbatim_pwd = no_symbolic_links;
+ pflag = 0;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "LP")) != -1)
+ {
+ switch (opt)
+ {
+ case 'P':
+ verbatim_pwd = pflag = 1;
+ break;
+ case 'L':
+ verbatim_pwd = 0;
+ break;
+ default:
+ builtin_usage ();
+ return (EXECUTION_FAILURE);
+ }
+ }
+ list = loptend;
+
+#define tcwd the_current_working_directory
+
+ directory = tcwd ? (verbatim_pwd ? sh_physpath (tcwd, 0) : tcwd)
+ : get_working_directory ("pwd");
+
+ /* Try again using getcwd() if canonicalization fails (for instance, if
+ the file system has changed state underneath bash). */
+ if ((tcwd && directory == 0) ||
+ (posixly_correct && same_file (".", tcwd, (struct stat *)0, (struct stat *)0) == 0))
+ directory = resetpwd ("pwd");
+
+#undef tcwd
+
+ if (directory)
+ {
+ printf ("%s\n", directory);
+ /* This is dumb but posix-mandated. */
+ if (posixly_correct && pflag)
+ setpwd (directory);
+ if (directory != the_current_working_directory)
+ free (directory);
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+ }
+ else
+ return (EXECUTION_FAILURE);
+}
+
+/* Do the work of changing to the directory NEWDIR. Handle symbolic
+ link following, etc. This function *must* return with
+ the_current_working_directory either set to NULL (in which case
+ getcwd() will eventually be called), or set to a string corresponding
+ to the working directory. Return 1 on success, 0 on failure. */
+
+static int
+change_to_directory (newdir, nolinks)
+ char *newdir;
+ int nolinks;
+{
+ char *t, *tdir;
+ int err, canon_failed, r, ndlen, dlen;
+
+ tdir = (char *)NULL;
+
+ if (the_current_working_directory == 0)
+ {
+ t = get_working_directory ("chdir");
+ FREE (t);
+ }
+
+ t = make_absolute (newdir, the_current_working_directory);
+
+ /* TDIR is either the canonicalized absolute pathname of NEWDIR
+ (nolinks == 0) or the absolute physical pathname of NEWDIR
+ (nolinks != 0). */
+ tdir = nolinks ? sh_physpath (t, 0)
+ : sh_canonpath (t, PATH_CHECKDOTDOT|PATH_CHECKEXISTS);
+
+ ndlen = strlen (newdir);
+ dlen = strlen (t);
+
+ /* Use the canonicalized version of NEWDIR, or, if canonicalization
+ failed, use the non-canonical form. */
+ canon_failed = 0;
+ if (tdir && *tdir)
+ free (t);
+ else
+ {
+ FREE (tdir);
+ tdir = t;
+ canon_failed = 1;
+ }
+
+ /* In POSIX mode, if we're resolving symlinks logically and sh_canonpath
+ returns NULL (because it checks the path, it will return NULL if the
+ resolved path doesn't exist), fail immediately. */
+ if (posixly_correct && nolinks == 0 && canon_failed && (errno != ENAMETOOLONG || ndlen > PATH_MAX))
+ {
+#if defined ENAMETOOLONG
+ if (errno != ENOENT && errno != ENAMETOOLONG)
+#else
+ if (errno != ENOENT)
+#endif
+ errno = ENOTDIR;
+ free (tdir);
+ return (0);
+ }
+
+ /* If the chdir succeeds, update the_current_working_directory. */
+ if (chdir (nolinks ? newdir : tdir) == 0)
+ {
+ /* If canonicalization failed, but the chdir succeeded, reset the
+ shell's idea of the_current_working_directory. */
+ if (canon_failed)
+ {
+ t = resetpwd ("cd");
+ if (t == 0)
+ set_working_directory (tdir);
+ }
+ else
+ set_working_directory (tdir);
+
+ free (tdir);
+ return (1);
+ }
+
+ /* We failed to change to the appropriate directory name. If we tried
+ what the user passed (nolinks != 0), punt now. */
+ if (nolinks)
+ {
+ free (tdir);
+ return (0);
+ }
+
+ err = errno;
+
+ /* We're not in physical mode (nolinks == 0), but we failed to change to
+ the canonicalized directory name (TDIR). Try what the user passed
+ verbatim. If we succeed, reinitialize the_current_working_directory. */
+ if (chdir (newdir) == 0)
+ {
+ t = resetpwd ("cd");
+ if (t == 0)
+ set_working_directory (tdir);
+ else
+ free (t);
+
+ r = 1;
+ }
+ else
+ {
+ errno = err;
+ r = 0;
+ }
+
+ free (tdir);
+ return r;
+}
diff --git a/builtins/colon.def b/builtins/colon.def
new file mode 100644
index 0000000..4b78b30
--- /dev/null
+++ b/builtins/colon.def
@@ -0,0 +1,67 @@
+This file is colon.def, from which is created colon.c.
+It implements the builtin ":" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES colon.c
+
+$BUILTIN :
+$DOCNAME colon
+$FUNCTION colon_builtin
+$SHORT_DOC :
+Null command.
+
+No effect; the command does nothing.
+
+Exit Status:
+Always succeeds.
+$END
+
+$BUILTIN true
+$FUNCTION colon_builtin
+$SHORT_DOC true
+Return a successful result.
+
+Exit Status:
+Always succeeds.
+$END
+
+$BUILTIN false
+$FUNCTION false_builtin
+$SHORT_DOC false
+Return an unsuccessful result.
+
+Exit Status:
+Always fails.
+$END
+
+/* Return a successful result. */
+int
+colon_builtin (ignore)
+ char *ignore;
+{
+ return (0);
+}
+
+/* Return an unsuccessful result. */
+int
+false_builtin (ignore)
+ char *ignore;
+{
+ return (1);
+}
diff --git a/builtins/command.def b/builtins/command.def
new file mode 100644
index 0000000..1845279
--- /dev/null
+++ b/builtins/command.def
@@ -0,0 +1,219 @@
+This file is command.def, from which is created command.c.
+It implements the builtin "command" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES command.c
+
+$BUILTIN command
+$FUNCTION command_builtin
+$SHORT_DOC command [-pVv] command [arg ...]
+Execute a simple command or display information about commands.
+
+Runs COMMAND with ARGS suppressing shell function lookup, or display
+information about the specified COMMANDs. Can be used to invoke commands
+on disk when a function with the same name exists.
+
+Options:
+ -p use a default value for PATH that is guaranteed to find all of
+ the standard utilities
+ -v print a description of COMMAND similar to the `type' builtin
+ -V print a more verbose description of each COMMAND
+
+Exit Status:
+Returns exit status of COMMAND, or failure if COMMAND is not found.
+$END
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "../bashansi.h"
+
+#include "../shell.h"
+#include "../execute_cmd.h"
+#include "../flags.h"
+#include "bashgetopt.h"
+#include "common.h"
+
+#if defined (_CS_PATH) && defined (HAVE_CONFSTR) && !HAVE_DECL_CONFSTR
+extern size_t confstr __P((int, char *, size_t));
+#endif
+
+extern int subshell_environment;
+
+static void restore_path __P((char *));
+static char *get_standard_path __P((void));
+
+/* Run the commands mentioned in LIST without paying attention to shell
+ functions. */
+int
+command_builtin (list)
+ WORD_LIST *list;
+{
+ int result, verbose, use_standard_path, opt;
+ char *old_path, *standard_path;
+ COMMAND *command;
+
+ verbose = use_standard_path = 0;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "pvV")) != -1)
+ {
+ switch (opt)
+ {
+ case 'p':
+ use_standard_path = 1;
+ break;
+ case 'V':
+ verbose = CDESC_SHORTDESC|CDESC_ABSPATH; /* look in common.h for constants */
+ break;
+ case 'v':
+ verbose = CDESC_REUSABLE; /* ditto */
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ if (list == 0)
+ return (EXECUTION_SUCCESS);
+
+#if defined (RESTRICTED_SHELL)
+ if (use_standard_path && restricted)
+ {
+ sh_restricted ("-p");
+ return (EXECUTION_FAILURE);
+ }
+#endif
+
+ begin_unwind_frame ("command_builtin");
+
+ if (use_standard_path)
+ {
+ old_path = get_string_value ("PATH");
+ /* If old_path is NULL, $PATH is unset. If so, we want to make sure
+ it's unset after this command completes. */
+ if (old_path)
+ old_path = savestring (old_path);
+ add_unwind_protect ((Function *)restore_path, old_path);
+
+ standard_path = get_standard_path ();
+ bind_variable ("PATH", standard_path ? standard_path : "", 0);
+ stupidly_hack_special_variables ("PATH");
+ FREE (standard_path);
+ }
+
+ if (verbose)
+ {
+ int found, any_found;
+
+ for (any_found = 0; list; list = list->next)
+ {
+ found = describe_command (list->word->word, verbose);
+
+ if (found == 0 && verbose != CDESC_REUSABLE)
+ sh_notfound (list->word->word);
+
+ any_found += found;
+ }
+
+ run_unwind_frame ("command_builtin");
+ return (any_found ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
+ }
+
+#define COMMAND_BUILTIN_FLAGS (CMD_NO_FUNCTIONS | CMD_INHIBIT_EXPANSION | CMD_COMMAND_BUILTIN)
+
+ /* We don't want this to be reparsed (consider command echo 'foo &'), so
+ just make a simple_command structure and call execute_command with it. */
+ command = make_bare_simple_command ();
+ command->value.Simple->words = (WORD_LIST *)copy_word_list (list);
+ command->value.Simple->redirects = (REDIRECT *)NULL;
+ command->flags |= COMMAND_BUILTIN_FLAGS;
+ command->value.Simple->flags |= COMMAND_BUILTIN_FLAGS;
+#if 0
+ /* This breaks for things like ( cd /tmp ; command z ababa ; echo next )
+ or $(command echo a ; command echo b;) or even
+ { command echo a; command echo b; } & */
+ /* If we're in a subshell, see if we can get away without forking
+ again, since we've already forked to run this builtin. */
+ if (subshell_environment)
+ {
+ command->flags |= CMD_NO_FORK;
+ command->value.Simple->flags |= CMD_NO_FORK;
+ }
+#endif
+ add_unwind_protect ((char *)dispose_command, command);
+ result = execute_command (command);
+
+ run_unwind_frame ("command_builtin");
+
+ return (result);
+}
+
+/* Restore the value of the $PATH variable after replacing it when
+ executing `command -p'. */
+static void
+restore_path (var)
+ char *var;
+{
+ if (var)
+ {
+ bind_variable ("PATH", var, 0);
+ free (var);
+ }
+ else
+ unbind_variable ("PATH");
+
+ stupidly_hack_special_variables ("PATH");
+}
+
+/* Return a value for PATH that is guaranteed to find all of the standard
+ utilities. This uses Posix.2 configuration variables, if present. It
+ uses a value defined in config.h as a last resort. */
+static char *
+get_standard_path ()
+{
+#if defined (_CS_PATH) && defined (HAVE_CONFSTR)
+ char *p;
+ size_t len;
+
+ len = (size_t)confstr (_CS_PATH, (char *)NULL, (size_t)0);
+ if (len > 0)
+ {
+ p = (char *)xmalloc (len + 2);
+ *p = '\0';
+ confstr (_CS_PATH, p, len);
+ return (p);
+ }
+ else
+ return (savestring (STANDARD_UTILS_PATH));
+#else /* !_CS_PATH || !HAVE_CONFSTR */
+# if defined (CS_PATH)
+ return (savestring (CS_PATH));
+# else
+ return (savestring (STANDARD_UTILS_PATH));
+# endif /* !CS_PATH */
+#endif /* !_CS_PATH || !HAVE_CONFSTR */
+}
diff --git a/builtins/common.c b/builtins/common.c
new file mode 100644
index 0000000..f02e99c
--- /dev/null
+++ b/builtins/common.c
@@ -0,0 +1,890 @@
+/* common.c - utility functions for all builtins */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <chartypes.h>
+#include "../bashtypes.h"
+#include "posixstat.h"
+#include <signal.h>
+
+#include <errno.h>
+
+#if defined (PREFER_STDARG)
+# include <stdarg.h>
+#else
+# include <varargs.h>
+#endif
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#define NEED_FPURGE_DECL
+
+#include "../shell.h"
+#include "maxpath.h"
+#include "../flags.h"
+#include "../jobs.h"
+#include "../builtins.h"
+#include "../input.h"
+#include "../execute_cmd.h"
+#include "../trap.h"
+#include "bashgetopt.h"
+#include "common.h"
+#include "builtext.h"
+#include <tilde/tilde.h>
+
+#if defined (HISTORY)
+# include "../bashhist.h"
+#endif
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+extern int indirection_level, subshell_environment;
+extern int line_number;
+extern int last_command_exit_value;
+extern int running_trap;
+extern int posixly_correct;
+extern char *this_command_name, *shell_name;
+extern const char * const bash_getcwd_errstr;
+
+/* Used by some builtins and the mainline code. */
+sh_builtin_func_t *last_shell_builtin = (sh_builtin_func_t *)NULL;
+sh_builtin_func_t *this_shell_builtin = (sh_builtin_func_t *)NULL;
+
+/* **************************************************************** */
+/* */
+/* Error reporting, usage, and option processing */
+/* */
+/* **************************************************************** */
+
+/* This is a lot like report_error (), but it is for shell builtins
+ instead of shell control structures, and it won't ever exit the
+ shell. */
+
+static void
+builtin_error_prolog ()
+{
+ char *name;
+
+ name = get_name_for_error ();
+ fprintf (stderr, "%s: ", name);
+
+ if (interactive_shell == 0)
+ fprintf (stderr, _("line %d: "), executing_line_number ());
+
+ if (this_command_name && *this_command_name)
+ fprintf (stderr, "%s: ", this_command_name);
+}
+
+void
+#if defined (PREFER_STDARG)
+builtin_error (const char *format, ...)
+#else
+builtin_error (format, va_alist)
+ const char *format;
+ va_dcl
+#endif
+{
+ va_list args;
+
+ builtin_error_prolog ();
+
+ SH_VA_START (args, format);
+
+ vfprintf (stderr, format, args);
+ va_end (args);
+ fprintf (stderr, "\n");
+}
+
+void
+#if defined (PREFER_STDARG)
+builtin_warning (const char *format, ...)
+#else
+builtin_warning (format, va_alist)
+ const char *format;
+ va_dcl
+#endif
+{
+ va_list args;
+
+ builtin_error_prolog ();
+ fprintf (stderr, _("warning: "));
+
+ SH_VA_START (args, format);
+
+ vfprintf (stderr, format, args);
+ va_end (args);
+ fprintf (stderr, "\n");
+}
+
+/* Print a usage summary for the currently-executing builtin command. */
+void
+builtin_usage ()
+{
+ if (this_command_name && *this_command_name)
+ fprintf (stderr, _("%s: usage: "), this_command_name);
+ fprintf (stderr, "%s\n", current_builtin->short_doc);
+ fflush (stderr);
+}
+
+/* Return if LIST is NULL else barf and jump to top_level. Used by some
+ builtins that do not accept arguments. */
+void
+no_args (list)
+ WORD_LIST *list;
+{
+ if (list)
+ {
+ builtin_error (_("too many arguments"));
+ top_level_cleanup ();
+ jump_to_top_level (DISCARD);
+ }
+}
+
+/* Check that no options were given to the currently-executing builtin,
+ and return 0 if there were options. */
+int
+no_options (list)
+ WORD_LIST *list;
+{
+ reset_internal_getopt ();
+ if (internal_getopt (list, "") != -1)
+ {
+ builtin_usage ();
+ return (1);
+ }
+ return (0);
+}
+
+void
+sh_needarg (s)
+ char *s;
+{
+ builtin_error (_("%s: option requires an argument"), s);
+}
+
+void
+sh_neednumarg (s)
+ char *s;
+{
+ builtin_error (_("%s: numeric argument required"), s);
+}
+
+void
+sh_notfound (s)
+ char *s;
+{
+ builtin_error (_("%s: not found"), s);
+}
+
+/* Function called when one of the builtin commands detects an invalid
+ option. */
+void
+sh_invalidopt (s)
+ char *s;
+{
+ builtin_error (_("%s: invalid option"), s);
+}
+
+void
+sh_invalidoptname (s)
+ char *s;
+{
+ builtin_error (_("%s: invalid option name"), s);
+}
+
+void
+sh_invalidid (s)
+ char *s;
+{
+ builtin_error (_("`%s': not a valid identifier"), s);
+}
+
+void
+sh_invalidnum (s)
+ char *s;
+{
+ char *msg;
+
+ if (*s == '0' && isdigit (s[1]))
+ msg = _("invalid octal number");
+ else if (*s == '0' && s[1] == 'x')
+ msg = _("invalid hex number");
+ else
+ msg = _("invalid number");
+ builtin_error ("%s: %s", s, msg);
+}
+
+void
+sh_invalidsig (s)
+ char *s;
+{
+ builtin_error (_("%s: invalid signal specification"), s);
+}
+
+void
+sh_badpid (s)
+ char *s;
+{
+ builtin_error (_("`%s': not a pid or valid job spec"), s);
+}
+
+void
+sh_readonly (s)
+ const char *s;
+{
+ builtin_error (_("%s: readonly variable"), s);
+}
+
+void
+sh_erange (s, desc)
+ char *s, *desc;
+{
+ if (s)
+ builtin_error (_("%s: %s out of range"), s, desc ? desc : _("argument"));
+ else
+ builtin_error (_("%s out of range"), desc ? desc : _("argument"));
+}
+
+#if defined (JOB_CONTROL)
+void
+sh_badjob (s)
+ char *s;
+{
+ builtin_error (_("%s: no such job"), s);
+}
+
+void
+sh_nojobs (s)
+ char *s;
+{
+ if (s)
+ builtin_error (_("%s: no job control"), s);
+ else
+ builtin_error (_("no job control"));
+}
+#endif
+
+#if defined (RESTRICTED_SHELL)
+void
+sh_restricted (s)
+ char *s;
+{
+ if (s)
+ builtin_error (_("%s: restricted"), s);
+ else
+ builtin_error (_("restricted"));
+}
+#endif
+
+void
+sh_notbuiltin (s)
+ char *s;
+{
+ builtin_error (_("%s: not a shell builtin"), s);
+}
+
+void
+sh_wrerror ()
+{
+#if defined (DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS) && defined (EPIPE)
+ if (errno != EPIPE)
+#endif /* DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS && EPIPE */
+ builtin_error (_("write error: %s"), strerror (errno));
+}
+
+void
+sh_ttyerror (set)
+ int set;
+{
+ if (set)
+ builtin_error (_("error setting terminal attributes: %s"), strerror (errno));
+ else
+ builtin_error (_("error getting terminal attributes: %s"), strerror (errno));
+}
+
+int
+sh_chkwrite (s)
+ int s;
+{
+ fflush (stdout);
+ if (ferror (stdout))
+ {
+ sh_wrerror ();
+ fpurge (stdout);
+ clearerr (stdout);
+ return (EXECUTION_FAILURE);
+ }
+ return (s);
+}
+
+/* **************************************************************** */
+/* */
+/* Shell positional parameter manipulation */
+/* */
+/* **************************************************************** */
+
+/* Convert a WORD_LIST into a C-style argv. Return the number of elements
+ in the list in *IP, if IP is non-null. A convenience function for
+ loadable builtins; also used by `test'. */
+char **
+make_builtin_argv (list, ip)
+ WORD_LIST *list;
+ int *ip;
+{
+ char **argv;
+
+ argv = strvec_from_word_list (list, 0, 1, ip);
+ argv[0] = this_command_name;
+ return argv;
+}
+
+/* Remember LIST in $0 ... $9, and REST_OF_ARGS. If DESTRUCTIVE is
+ non-zero, then discard whatever the existing arguments are, else
+ only discard the ones that are to be replaced. */
+void
+remember_args (list, destructive)
+ WORD_LIST *list;
+ int destructive;
+{
+ register int i;
+
+ for (i = 1; i < 10; i++)
+ {
+ if ((destructive || list) && dollar_vars[i])
+ {
+ free (dollar_vars[i]);
+ dollar_vars[i] = (char *)NULL;
+ }
+
+ if (list)
+ {
+ dollar_vars[i] = savestring (list->word->word);
+ list = list->next;
+ }
+ }
+
+ /* If arguments remain, assign them to REST_OF_ARGS.
+ Note that copy_word_list (NULL) returns NULL, and
+ that dispose_words (NULL) does nothing. */
+ if (destructive || list)
+ {
+ dispose_words (rest_of_args);
+ rest_of_args = copy_word_list (list);
+ }
+
+ if (destructive)
+ set_dollar_vars_changed ();
+}
+
+static int changed_dollar_vars;
+
+/* Have the dollar variables been reset to new values since we last
+ checked? */
+int
+dollar_vars_changed ()
+{
+ return (changed_dollar_vars);
+}
+
+void
+set_dollar_vars_unchanged ()
+{
+ changed_dollar_vars = 0;
+}
+
+void
+set_dollar_vars_changed ()
+{
+ if (variable_context)
+ changed_dollar_vars |= ARGS_FUNC;
+ else if (this_shell_builtin == set_builtin)
+ changed_dollar_vars |= ARGS_SETBLTIN;
+ else
+ changed_dollar_vars |= ARGS_INVOC;
+}
+
+/* **************************************************************** */
+/* */
+/* Validating numeric input and arguments */
+/* */
+/* **************************************************************** */
+
+/* Read a numeric arg for this_command_name, the name of the shell builtin
+ that wants it. LIST is the word list that the arg is to come from.
+ Accept only the numeric argument; report an error if other arguments
+ follow. If FATAL is 1, call throw_to_top_level, which exits the
+ shell; if it's 2, call jump_to_top_level (DISCARD), which aborts the
+ current command; if FATAL is 0, return an indication of an invalid
+ number by setting *NUMOK == 0 and return -1. */
+int
+get_numeric_arg (list, fatal, count)
+ WORD_LIST *list;
+ int fatal;
+ intmax_t *count;
+{
+ char *arg;
+
+ if (count)
+ *count = 1;
+
+ if (list && list->word && ISOPTION (list->word->word, '-'))
+ list = list->next;
+
+ if (list)
+ {
+ arg = list->word->word;
+ if (arg == 0 || (legal_number (arg, count) == 0))
+ {
+ sh_neednumarg (list->word->word ? list->word->word : "`'");
+ if (fatal == 0)
+ return 0;
+ else if (fatal == 1) /* fatal == 1; abort */
+ throw_to_top_level ();
+ else /* fatal == 2; discard current command */
+ {
+ top_level_cleanup ();
+ jump_to_top_level (DISCARD);
+ }
+ }
+ no_args (list->next);
+ }
+
+ return (1);
+}
+
+/* Get an eight-bit status value from LIST */
+int
+get_exitstat (list)
+ WORD_LIST *list;
+{
+ int status;
+ intmax_t sval;
+ char *arg;
+
+ if (list && list->word && ISOPTION (list->word->word, '-'))
+ list = list->next;
+
+ if (list == 0)
+ return (last_command_exit_value);
+
+ arg = list->word->word;
+ if (arg == 0 || legal_number (arg, &sval) == 0)
+ {
+ sh_neednumarg (list->word->word ? list->word->word : "`'");
+ return 255;
+ }
+ no_args (list->next);
+
+ status = sval & 255;
+ return status;
+}
+
+/* Return the octal number parsed from STRING, or -1 to indicate
+ that the string contained a bad number. */
+int
+read_octal (string)
+ char *string;
+{
+ int result, digits;
+
+ result = digits = 0;
+ while (*string && ISOCTAL (*string))
+ {
+ digits++;
+ result = (result * 8) + (*string++ - '0');
+ if (result > 0777)
+ return -1;
+ }
+
+ if (digits == 0 || *string)
+ result = -1;
+
+ return (result);
+}
+
+/* **************************************************************** */
+/* */
+/* Manipulating the current working directory */
+/* */
+/* **************************************************************** */
+
+/* Return a consed string which is the current working directory.
+ FOR_WHOM is the name of the caller for error printing. */
+char *the_current_working_directory = (char *)NULL;
+
+char *
+get_working_directory (for_whom)
+ char *for_whom;
+{
+ if (no_symbolic_links)
+ {
+ FREE (the_current_working_directory);
+ the_current_working_directory = (char *)NULL;
+ }
+
+ if (the_current_working_directory == 0)
+ {
+#if defined (GETCWD_BROKEN)
+ the_current_working_directory = getcwd (0, PATH_MAX);
+#else
+ the_current_working_directory = getcwd (0, 0);
+#endif
+ if (the_current_working_directory == 0)
+ {
+ fprintf (stderr, _("%s: error retrieving current directory: %s: %s\n"),
+ (for_whom && *for_whom) ? for_whom : get_name_for_error (),
+ _(bash_getcwd_errstr), strerror (errno));
+ return (char *)NULL;
+ }
+ }
+
+ return (savestring (the_current_working_directory));
+}
+
+/* Make NAME our internal idea of the current working directory. */
+void
+set_working_directory (name)
+ char *name;
+{
+ FREE (the_current_working_directory);
+ the_current_working_directory = savestring (name);
+}
+
+/* **************************************************************** */
+/* */
+/* Job control support functions */
+/* */
+/* **************************************************************** */
+
+#if defined (JOB_CONTROL)
+int
+get_job_by_name (name, flags)
+ const char *name;
+ int flags;
+{
+ register int i, wl, cl, match, job;
+ register PROCESS *p;
+ register JOB *j;
+
+ job = NO_JOB;
+ wl = strlen (name);
+ for (i = js.j_jobslots - 1; i >= 0; i--)
+ {
+ j = get_job_by_jid (i);
+ if (j == 0 || ((flags & JM_STOPPED) && J_JOBSTATE(j) != JSTOPPED))
+ continue;
+
+ p = j->pipe;
+ do
+ {
+ if (flags & JM_EXACT)
+ {
+ cl = strlen (p->command);
+ match = STREQN (p->command, name, cl);
+ }
+ else if (flags & JM_SUBSTRING)
+ match = strcasestr (p->command, name) != (char *)0;
+ else
+ match = STREQN (p->command, name, wl);
+
+ if (match == 0)
+ {
+ p = p->next;
+ continue;
+ }
+ else if (flags & JM_FIRSTMATCH)
+ return i; /* return first match */
+ else if (job != NO_JOB)
+ {
+ if (this_shell_builtin)
+ builtin_error (_("%s: ambiguous job spec"), name);
+ else
+ report_error (_("%s: ambiguous job spec"), name);
+ return (DUP_JOB);
+ }
+ else
+ job = i;
+ }
+ while (p != j->pipe);
+ }
+
+ return (job);
+}
+
+/* Return the job spec found in LIST. */
+int
+get_job_spec (list)
+ WORD_LIST *list;
+{
+ register char *word;
+ int job, jflags;
+
+ if (list == 0)
+ return (js.j_current);
+
+ word = list->word->word;
+
+ if (*word == '\0')
+ return (NO_JOB);
+
+ if (*word == '%')
+ word++;
+
+ if (DIGIT (*word) && all_digits (word))
+ {
+ job = atoi (word);
+ return (job > js.j_jobslots ? NO_JOB : job - 1);
+ }
+
+ jflags = 0;
+ switch (*word)
+ {
+ case 0:
+ case '%':
+ case '+':
+ return (js.j_current);
+
+ case '-':
+ return (js.j_previous);
+
+ case '?': /* Substring search requested. */
+ jflags |= JM_SUBSTRING;
+ word++;
+ /* FALLTHROUGH */
+
+ default:
+ return get_job_by_name (word, jflags);
+ }
+}
+#endif /* JOB_CONTROL */
+
+/*
+ * NOTE: `kill' calls this function with forcecols == 0
+ */
+int
+display_signal_list (list, forcecols)
+ WORD_LIST *list;
+ int forcecols;
+{
+ register int i, column;
+ char *name;
+ int result, signum, dflags;
+ intmax_t lsignum;
+
+ result = EXECUTION_SUCCESS;
+ if (!list)
+ {
+ for (i = 1, column = 0; i < NSIG; i++)
+ {
+ name = signal_name (i);
+ if (STREQN (name, "SIGJUNK", 7) || STREQN (name, "Unknown", 7))
+ continue;
+
+ if (posixly_correct && !forcecols)
+ {
+ /* This is for the kill builtin. POSIX.2 says the signal names
+ are displayed without the `SIG' prefix. */
+ if (STREQN (name, "SIG", 3))
+ name += 3;
+ printf ("%s%s", name, (i == NSIG - 1) ? "" : " ");
+ }
+ else
+ {
+ printf ("%2d) %s", i, name);
+
+ if (++column < 5)
+ printf ("\t");
+ else
+ {
+ printf ("\n");
+ column = 0;
+ }
+ }
+ }
+
+ if ((posixly_correct && !forcecols) || column != 0)
+ printf ("\n");
+ return result;
+ }
+
+ /* List individual signal names or numbers. */
+ while (list)
+ {
+ if (legal_number (list->word->word, &lsignum))
+ {
+ /* This is specified by Posix.2 so that exit statuses can be
+ mapped into signal numbers. */
+ if (lsignum > 128)
+ lsignum -= 128;
+ if (lsignum < 0 || lsignum >= NSIG)
+ {
+ sh_invalidsig (list->word->word);
+ result = EXECUTION_FAILURE;
+ list = list->next;
+ continue;
+ }
+
+ signum = lsignum;
+ name = signal_name (signum);
+ if (STREQN (name, "SIGJUNK", 7) || STREQN (name, "Unknown", 7))
+ {
+ list = list->next;
+ continue;
+ }
+#if defined (JOB_CONTROL)
+ /* POSIX.2 says that `kill -l signum' prints the signal name without
+ the `SIG' prefix. */
+ printf ("%s\n", (this_shell_builtin == kill_builtin) ? name + 3 : name);
+#else
+ printf ("%s\n", name);
+#endif
+ }
+ else
+ {
+ dflags = DSIG_NOCASE;
+ if (posixly_correct == 0 || this_shell_builtin != kill_builtin)
+ dflags |= DSIG_SIGPREFIX;
+ signum = decode_signal (list->word->word, dflags);
+ if (signum == NO_SIG)
+ {
+ sh_invalidsig (list->word->word);
+ result = EXECUTION_FAILURE;
+ list = list->next;
+ continue;
+ }
+ printf ("%d\n", signum);
+ }
+ list = list->next;
+ }
+ return (result);
+}
+
+/* **************************************************************** */
+/* */
+/* Finding builtin commands and their functions */
+/* */
+/* **************************************************************** */
+
+/* Perform a binary search and return the address of the builtin function
+ whose name is NAME. If the function couldn't be found, or the builtin
+ is disabled or has no function associated with it, return NULL.
+ Return the address of the builtin.
+ DISABLED_OKAY means find it even if the builtin is disabled. */
+struct builtin *
+builtin_address_internal (name, disabled_okay)
+ char *name;
+ int disabled_okay;
+{
+ int hi, lo, mid, j;
+
+ hi = num_shell_builtins - 1;
+ lo = 0;
+
+ while (lo <= hi)
+ {
+ mid = (lo + hi) / 2;
+
+ j = shell_builtins[mid].name[0] - name[0];
+
+ if (j == 0)
+ j = strcmp (shell_builtins[mid].name, name);
+
+ if (j == 0)
+ {
+ /* It must have a function pointer. It must be enabled, or we
+ must have explicitly allowed disabled functions to be found,
+ and it must not have been deleted. */
+ if (shell_builtins[mid].function &&
+ ((shell_builtins[mid].flags & BUILTIN_DELETED) == 0) &&
+ ((shell_builtins[mid].flags & BUILTIN_ENABLED) || disabled_okay))
+ return (&shell_builtins[mid]);
+ else
+ return ((struct builtin *)NULL);
+ }
+ if (j > 0)
+ hi = mid - 1;
+ else
+ lo = mid + 1;
+ }
+ return ((struct builtin *)NULL);
+}
+
+/* Return the pointer to the function implementing builtin command NAME. */
+sh_builtin_func_t *
+find_shell_builtin (name)
+ char *name;
+{
+ current_builtin = builtin_address_internal (name, 0);
+ return (current_builtin ? current_builtin->function : (sh_builtin_func_t *)NULL);
+}
+
+/* Return the address of builtin with NAME, whether it is enabled or not. */
+sh_builtin_func_t *
+builtin_address (name)
+ char *name;
+{
+ current_builtin = builtin_address_internal (name, 1);
+ return (current_builtin ? current_builtin->function : (sh_builtin_func_t *)NULL);
+}
+
+/* Return the function implementing the builtin NAME, but only if it is a
+ POSIX.2 special builtin. */
+sh_builtin_func_t *
+find_special_builtin (name)
+ char *name;
+{
+ current_builtin = builtin_address_internal (name, 0);
+ return ((current_builtin && (current_builtin->flags & SPECIAL_BUILTIN)) ?
+ current_builtin->function :
+ (sh_builtin_func_t *)NULL);
+}
+
+static int
+shell_builtin_compare (sbp1, sbp2)
+ struct builtin *sbp1, *sbp2;
+{
+ int result;
+
+ if ((result = sbp1->name[0] - sbp2->name[0]) == 0)
+ result = strcmp (sbp1->name, sbp2->name);
+
+ return (result);
+}
+
+/* Sort the table of shell builtins so that the binary search will work
+ in find_shell_builtin. */
+void
+initialize_shell_builtins ()
+{
+ qsort (shell_builtins, num_shell_builtins, sizeof (struct builtin),
+ (QSFUNC *)shell_builtin_compare);
+}
diff --git a/builtins/common.h b/builtins/common.h
new file mode 100644
index 0000000..efbb078
--- /dev/null
+++ b/builtins/common.h
@@ -0,0 +1,174 @@
+/* common.h -- extern declarations for functions defined in common.c. */
+
+/* Copyright (C) 1993-2004 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (__COMMON_H)
+# define __COMMON_H
+
+#include "stdc.h"
+
+#define ISOPTION(s, c) (s[0] == '-' && !s[2] && s[1] == c)
+
+/* Flag values for parse_and_execute () */
+#define SEVAL_NONINT 0x001
+#define SEVAL_INTERACT 0x002
+#define SEVAL_NOHIST 0x004
+#define SEVAL_NOFREE 0x008
+#define SEVAL_RESETLINE 0x010
+#define SEVAL_PARSEONLY 0x020
+#define SEVAL_NOLONGJMP 0x040
+
+/* Flags for describe_command, shared between type.def and command.def */
+#define CDESC_ALL 0x001 /* type -a */
+#define CDESC_SHORTDESC 0x002 /* command -V */
+#define CDESC_REUSABLE 0x004 /* command -v */
+#define CDESC_TYPE 0x008 /* type -t */
+#define CDESC_PATH_ONLY 0x010 /* type -p */
+#define CDESC_FORCE_PATH 0x020 /* type -ap or type -P */
+#define CDESC_NOFUNCS 0x040 /* type -f */
+#define CDESC_ABSPATH 0x080 /* convert to absolute path, no ./ */
+
+/* Flags for get_job_by_name */
+#define JM_PREFIX 0x01 /* prefix of job name */
+#define JM_SUBSTRING 0x02 /* substring of job name */
+#define JM_EXACT 0x04 /* match job name exactly */
+#define JM_STOPPED 0x08 /* match stopped jobs only */
+#define JM_FIRSTMATCH 0x10 /* return first matching job */
+
+/* Flags for remember_args and value of changed_dollar_vars */
+#define ARGS_NONE 0x0
+#define ARGS_INVOC 0x01
+#define ARGS_FUNC 0x02
+#define ARGS_SETBLTIN 0x04
+
+/* Functions from common.c */
+extern void builtin_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2)));
+extern void builtin_warning __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2)));
+extern void builtin_usage __P((void));
+extern void no_args __P((WORD_LIST *));
+extern int no_options __P((WORD_LIST *));
+
+/* common error message functions */
+extern void sh_needarg __P((char *));
+extern void sh_neednumarg __P((char *));
+extern void sh_notfound __P((char *));
+extern void sh_invalidopt __P((char *));
+extern void sh_invalidoptname __P((char *));
+extern void sh_invalidid __P((char *));
+extern void sh_invalidnum __P((char *));
+extern void sh_invalidsig __P((char *));
+extern void sh_erange __P((char *, char *));
+extern void sh_badpid __P((char *));
+extern void sh_badjob __P((char *));
+extern void sh_readonly __P((const char *));
+extern void sh_nojobs __P((char *));
+extern void sh_restricted __P((char *));
+extern void sh_notbuiltin __P((char *));
+extern void sh_wrerror __P((void));
+extern void sh_ttyerror __P((int));
+extern int sh_chkwrite __P((int));
+
+extern char **make_builtin_argv __P((WORD_LIST *, int *));
+extern void remember_args __P((WORD_LIST *, int));
+
+extern int dollar_vars_changed __P((void));
+extern void set_dollar_vars_unchanged __P((void));
+extern void set_dollar_vars_changed __P((void));
+
+extern int get_numeric_arg __P((WORD_LIST *, int, intmax_t *));
+extern int get_exitstat __P((WORD_LIST *));
+extern int read_octal __P((char *));
+
+/* Keeps track of the current working directory. */
+extern char *the_current_working_directory;
+extern char *get_working_directory __P((char *));
+extern void set_working_directory __P((char *));
+
+#if defined (JOB_CONTROL)
+extern int get_job_by_name __P((const char *, int));
+extern int get_job_spec __P((WORD_LIST *));
+#endif
+extern int display_signal_list __P((WORD_LIST *, int));
+
+/* It's OK to declare a function as returning a Function * without
+ providing a definition of what a `Function' is. */
+extern struct builtin *builtin_address_internal __P((char *, int));
+extern sh_builtin_func_t *find_shell_builtin __P((char *));
+extern sh_builtin_func_t *builtin_address __P((char *));
+extern sh_builtin_func_t *find_special_builtin __P((char *));
+extern void initialize_shell_builtins __P((void));
+
+/* Functions from exit.def */
+extern void bash_logout __P((void));
+
+/* Functions from getopts.def */
+extern void getopts_reset __P((int));
+
+/* Functions from set.def */
+extern int minus_o_option_value __P((char *));
+extern void list_minus_o_opts __P((int, int));
+extern char **get_minus_o_opts __P((void));
+extern int set_minus_o_option __P((int, char *));
+
+extern void set_shellopts __P((void));
+extern void parse_shellopts __P((char *));
+extern void initialize_shell_options __P((int));
+
+extern void reset_shell_options __P((void));
+
+/* Functions from shopt.def */
+extern void reset_shopt_options __P((void));
+extern char **get_shopt_options __P((void));
+
+extern int shopt_setopt __P((char *, int));
+extern int shopt_listopt __P((char *, int));
+
+extern int set_login_shell __P((char *, int));
+
+extern void set_bashopts __P((void));
+extern void parse_bashopts __P((char *));
+extern void initialize_bashopts __P((int));
+
+/* Functions from type.def */
+extern int describe_command __P((char *, int));
+
+/* Functions from setattr.def */
+extern int set_or_show_attributes __P((WORD_LIST *, int, int));
+extern int show_all_var_attributes __P((int, int));
+extern int show_var_attributes __P((SHELL_VAR *, int, int));
+extern int show_name_attributes __P((char *, int));
+extern void set_var_attribute __P((char *, int, int));
+
+/* Functions from pushd.def */
+extern char *get_dirstack_from_string __P((char *));
+extern char *get_dirstack_element __P((intmax_t, int));
+extern void set_dirstack_element __P((intmax_t, int, char *));
+extern WORD_LIST *get_directory_stack __P((int));
+
+/* Functions from evalstring.c */
+extern int parse_and_execute __P((char *, const char *, int));
+extern void parse_and_execute_cleanup __P((void));
+extern int parse_string __P((char *, const char *, int, char **));
+
+/* Functions from evalfile.c */
+extern int maybe_execute_file __P((const char *, int));
+extern int source_file __P((const char *, int));
+extern int fc_execute_file __P((const char *));
+
+#endif /* !__COMMON_H */
diff --git a/builtins/complete.def b/builtins/complete.def
new file mode 100644
index 0000000..2267794
--- /dev/null
+++ b/builtins/complete.def
@@ -0,0 +1,869 @@
+This file is complete.def, from which is created complete.c.
+It implements the builtins "complete", "compgen", and "compopt" in Bash.
+
+Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES complete.c
+
+$BUILTIN complete
+$DEPENDS_ON PROGRAMMABLE_COMPLETION
+$FUNCTION complete_builtin
+$SHORT_DOC complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [name ...]
+Specify how arguments are to be completed by Readline.
+
+For each NAME, specify how arguments are to be completed. If no options
+are supplied, existing completion specifications are printed in a way that
+allows them to be reused as input.
+
+Options:
+ -p print existing completion specifications in a reusable format
+ -r remove a completion specification for each NAME, or, if no
+ NAMEs are supplied, all completion specifications
+ -D apply the completions and actions as the default for commands
+ without any specific completion defined
+ -E apply the completions and actions to "empty" commands --
+ completion attempted on a blank line
+
+When completion is attempted, the actions are applied in the order the
+uppercase-letter options are listed above. The -D option takes
+precedence over -E.
+
+Exit Status:
+Returns success unless an invalid option is supplied or an error occurs.
+$END
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "../bashtypes.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../builtins.h"
+#include "../pcomplete.h"
+#include "../bashline.h"
+
+#include "common.h"
+#include "bashgetopt.h"
+
+#include <readline/readline.h>
+
+#define STRDUP(x) ((x) ? savestring (x) : (char *)NULL)
+
+/* Structure containing all the non-action (binary) options; filled in by
+ build_actions(). */
+struct _optflags {
+ int pflag;
+ int rflag;
+ int Dflag;
+ int Eflag;
+};
+
+static int find_compact __P((char *));
+static int find_compopt __P((char *));
+
+static int build_actions __P((WORD_LIST *, struct _optflags *, unsigned long *, unsigned long *));
+
+static int remove_cmd_completions __P((WORD_LIST *));
+
+static int print_one_completion __P((char *, COMPSPEC *));
+static int print_compitem __P((BUCKET_CONTENTS *));
+static void print_compopts __P((const char *, COMPSPEC *, int));
+static void print_all_completions __P((void));
+static int print_cmd_completions __P((WORD_LIST *));
+
+static char *Garg, *Warg, *Parg, *Sarg, *Xarg, *Farg, *Carg;
+
+static const struct _compacts {
+ const char * const actname;
+ int actflag;
+ int actopt;
+} compacts[] = {
+ { "alias", CA_ALIAS, 'a' },
+ { "arrayvar", CA_ARRAYVAR, 0 },
+ { "binding", CA_BINDING, 0 },
+ { "builtin", CA_BUILTIN, 'b' },
+ { "command", CA_COMMAND, 'c' },
+ { "directory", CA_DIRECTORY, 'd' },
+ { "disabled", CA_DISABLED, 0 },
+ { "enabled", CA_ENABLED, 0 },
+ { "export", CA_EXPORT, 'e' },
+ { "file", CA_FILE, 'f' },
+ { "function", CA_FUNCTION, 0 },
+ { "helptopic", CA_BUILTIN, 0 }, /* for now */
+ { "hostname", CA_HOSTNAME, 0 },
+ { "group", CA_GROUP, 'g' },
+ { "job", CA_JOB, 'j' },
+ { "keyword", CA_KEYWORD, 'k' },
+ { "running", CA_RUNNING, 0 },
+ { "service", CA_SERVICE, 's' },
+ { "setopt", CA_SETOPT, 0 },
+ { "shopt", CA_SHOPT, 0 },
+ { "signal", CA_SIGNAL, 0 },
+ { "stopped", CA_STOPPED, 0 },
+ { "user", CA_USER, 'u' },
+ { "variable", CA_VARIABLE, 'v' },
+ { (char *)NULL, 0, 0 },
+};
+
+/* This should be a STRING_INT_ALIST */
+const static struct _compopt {
+ const char * const optname;
+ int optflag;
+} compopts[] = {
+ { "bashdefault", COPT_BASHDEFAULT },
+ { "default", COPT_DEFAULT },
+ { "dirnames", COPT_DIRNAMES },
+ { "filenames",COPT_FILENAMES},
+ { "nospace", COPT_NOSPACE },
+ { "plusdirs", COPT_PLUSDIRS },
+ { (char *)NULL, 0 },
+};
+
+static int
+find_compact (name)
+ char *name;
+{
+ register int i;
+
+ for (i = 0; compacts[i].actname; i++)
+ if (STREQ (name, compacts[i].actname))
+ return i;
+ return -1;
+}
+
+static int
+find_compopt (name)
+ char *name;
+{
+ register int i;
+
+ for (i = 0; compopts[i].optname; i++)
+ if (STREQ (name, compopts[i].optname))
+ return i;
+ return -1;
+}
+
+/* Build the actions and compspec options from the options specified in LIST.
+ ACTP is a pointer to an unsigned long in which to place the bitmap of
+ actions. OPTP is a pointer to an unsigned long in which to place the
+ btmap of compspec options (arguments to `-o'). PP, if non-null, gets 1
+ if -p is supplied; RP, if non-null, gets 1 if -r is supplied.
+ If either is null, the corresponding option generates an error.
+ This also sets variables corresponding to options that take arguments as
+ a side effect; the caller should ensure that those variables are set to
+ NULL before calling build_actions. Return value:
+ EX_USAGE = bad option
+ EXECUTION_SUCCESS = some options supplied
+ EXECUTION_FAILURE = no options supplied
+*/
+
+static int
+build_actions (list, flagp, actp, optp)
+ WORD_LIST *list;
+ struct _optflags *flagp;
+ unsigned long *actp, *optp;
+{
+ int opt, ind, opt_given;
+ unsigned long acts, copts;
+
+ acts = copts = (unsigned long)0L;
+ opt_given = 0;
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "abcdefgjko:prsuvA:G:W:P:S:X:F:C:DE")) != -1)
+ {
+ opt_given = 1;
+ switch (opt)
+ {
+ case 'r':
+ if (flagp)
+ {
+ flagp->rflag = 1;
+ break;
+ }
+ else
+ {
+ sh_invalidopt ("-r");
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ case 'p':
+ if (flagp)
+ {
+ flagp->pflag = 1;
+ break;
+ }
+ else
+ {
+ sh_invalidopt ("-p");
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ case 'a':
+ acts |= CA_ALIAS;
+ break;
+ case 'b':
+ acts |= CA_BUILTIN;
+ break;
+ case 'c':
+ acts |= CA_COMMAND;
+ break;
+ case 'd':
+ acts |= CA_DIRECTORY;
+ break;
+ case 'e':
+ acts |= CA_EXPORT;
+ break;
+ case 'f':
+ acts |= CA_FILE;
+ break;
+ case 'g':
+ acts |= CA_GROUP;
+ break;
+ case 'j':
+ acts |= CA_JOB;
+ break;
+ case 'k':
+ acts |= CA_KEYWORD;
+ break;
+ case 's':
+ acts |= CA_SERVICE;
+ break;
+ case 'u':
+ acts |= CA_USER;
+ break;
+ case 'v':
+ acts |= CA_VARIABLE;
+ break;
+ case 'o':
+ ind = find_compopt (list_optarg);
+ if (ind < 0)
+ {
+ sh_invalidoptname (list_optarg);
+ return (EX_USAGE);
+ }
+ copts |= compopts[ind].optflag;
+ break;
+ case 'A':
+ ind = find_compact (list_optarg);
+ if (ind < 0)
+ {
+ builtin_error (_("%s: invalid action name"), list_optarg);
+ return (EX_USAGE);
+ }
+ acts |= compacts[ind].actflag;
+ break;
+ case 'C':
+ Carg = list_optarg;
+ break;
+ case 'D':
+ if (flagp)
+ {
+ flagp->Dflag = 1;
+ break;
+ }
+ else
+ {
+ sh_invalidopt ("-D");
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ case 'E':
+ if (flagp)
+ {
+ flagp->Eflag = 1;
+ break;
+ }
+ else
+ {
+ sh_invalidopt ("-E");
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ case 'F':
+ Farg = list_optarg;
+ break;
+ case 'G':
+ Garg = list_optarg;
+ break;
+ case 'P':
+ Parg = list_optarg;
+ break;
+ case 'S':
+ Sarg = list_optarg;
+ break;
+ case 'W':
+ Warg = list_optarg;
+ break;
+ case 'X':
+ Xarg = list_optarg;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+
+ *actp = acts;
+ *optp = copts;
+
+ return (opt_given ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
+}
+
+/* Add, remove, and display completion specifiers. */
+int
+complete_builtin (list)
+ WORD_LIST *list;
+{
+ int opt_given, rval;
+ unsigned long acts, copts;
+ COMPSPEC *cs;
+ struct _optflags oflags;
+ WORD_LIST *l, *wl;
+
+ if (list == 0)
+ {
+ print_all_completions ();
+ return (EXECUTION_SUCCESS);
+ }
+
+ opt_given = oflags.pflag = oflags.rflag = oflags.Dflag = oflags.Eflag = 0;
+
+ acts = copts = (unsigned long)0L;
+ Garg = Warg = Parg = Sarg = Xarg = Farg = Carg = (char *)NULL;
+ cs = (COMPSPEC *)NULL;
+
+ /* Build the actions from the arguments. Also sets the [A-Z]arg variables
+ as a side effect if they are supplied as options. */
+ rval = build_actions (list, &oflags, &acts, &copts);
+ if (rval == EX_USAGE)
+ return (rval);
+ opt_given = rval != EXECUTION_FAILURE;
+
+ list = loptend;
+
+ wl = oflags.Dflag ? make_word_list (make_bare_word (DEFAULTCMD), (WORD_LIST *)NULL)
+ : (oflags.Eflag ? make_word_list (make_bare_word (EMPTYCMD), (WORD_LIST *)NULL) : 0);
+
+ /* -p overrides everything else */
+ if (oflags.pflag || (list == 0 && opt_given == 0))
+ {
+ if (wl)
+ {
+ rval = print_cmd_completions (wl);
+ dispose_words (wl);
+ return rval;
+ }
+ else if (list == 0)
+ {
+ print_all_completions ();
+ return (EXECUTION_SUCCESS);
+ }
+ return (print_cmd_completions (list));
+ }
+
+ /* next, -r overrides everything else. */
+ if (oflags.rflag)
+ {
+ if (wl)
+ {
+ rval = remove_cmd_completions (wl);
+ dispose_words (wl);
+ return rval;
+ }
+ else if (list == 0)
+ {
+ progcomp_flush ();
+ return (EXECUTION_SUCCESS);
+ }
+ return (remove_cmd_completions (list));
+ }
+
+ if (wl == 0 && list == 0 && opt_given)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ /* If we get here, we need to build a compspec and add it for each
+ remaining argument. */
+ cs = compspec_create ();
+ cs->actions = acts;
+ cs->options = copts;
+
+ cs->globpat = STRDUP (Garg);
+ cs->words = STRDUP (Warg);
+ cs->prefix = STRDUP (Parg);
+ cs->suffix = STRDUP (Sarg);
+ cs->funcname = STRDUP (Farg);
+ cs->command = STRDUP (Carg);
+ cs->filterpat = STRDUP (Xarg);
+
+ for (rval = EXECUTION_SUCCESS, l = wl ? wl : list ; l; l = l->next)
+ {
+ /* Add CS as the compspec for the specified commands. */
+ if (progcomp_insert (l->word->word, cs) == 0)
+ rval = EXECUTION_FAILURE;
+ }
+
+ dispose_words (wl);
+ return (rval);
+}
+
+static int
+remove_cmd_completions (list)
+ WORD_LIST *list;
+{
+ WORD_LIST *l;
+ int ret;
+
+ for (ret = EXECUTION_SUCCESS, l = list; l; l = l->next)
+ {
+ if (progcomp_remove (l->word->word) == 0)
+ {
+ builtin_error (_("%s: no completion specification"), l->word->word);
+ ret = EXECUTION_FAILURE;
+ }
+ }
+ return ret;
+}
+
+#define SQPRINTARG(a, f) \
+ do { \
+ if (a) \
+ { \
+ x = sh_single_quote (a); \
+ printf ("%s %s ", f, x); \
+ free (x); \
+ } \
+ } while (0)
+
+#define PRINTARG(a, f) \
+ do { \
+ if (a) \
+ printf ("%s %s ", f, a); \
+ } while (0)
+
+#define PRINTOPT(a, f) \
+ do { \
+ if (acts & a) \
+ printf ("%s ", f); \
+ } while (0)
+
+#define PRINTACT(a, f) \
+ do { \
+ if (acts & a) \
+ printf ("-A %s ", f); \
+ } while (0)
+
+#define PRINTCOMPOPT(a, f) \
+ do { \
+ if (copts & a) \
+ printf ("-o %s ", f); \
+ } while (0)
+
+#define XPRINTCOMPOPT(a, f) \
+ do { \
+ if (copts & a) \
+ printf ("-o %s ", f); \
+ else \
+ printf ("+o %s ", f); \
+ } while (0)
+
+static int
+print_one_completion (cmd, cs)
+ char *cmd;
+ COMPSPEC *cs;
+{
+ unsigned long acts, copts;
+ char *x;
+
+ printf ("complete ");
+
+ copts = cs->options;
+
+ /* First, print the -o options. */
+ PRINTCOMPOPT (COPT_BASHDEFAULT, "bashdefault");
+ PRINTCOMPOPT (COPT_DEFAULT, "default");
+ PRINTCOMPOPT (COPT_DIRNAMES, "dirnames");
+ PRINTCOMPOPT (COPT_FILENAMES, "filenames");
+ PRINTCOMPOPT (COPT_NOSPACE, "nospace");
+ PRINTCOMPOPT (COPT_PLUSDIRS, "plusdirs");
+
+ acts = cs->actions;
+
+ /* simple flags next */
+ PRINTOPT (CA_ALIAS, "-a");
+ PRINTOPT (CA_BUILTIN, "-b");
+ PRINTOPT (CA_COMMAND, "-c");
+ PRINTOPT (CA_DIRECTORY, "-d");
+ PRINTOPT (CA_EXPORT, "-e");
+ PRINTOPT (CA_FILE, "-f");
+ PRINTOPT (CA_GROUP, "-g");
+ PRINTOPT (CA_JOB, "-j");
+ PRINTOPT (CA_KEYWORD, "-k");
+ PRINTOPT (CA_SERVICE, "-s");
+ PRINTOPT (CA_USER, "-u");
+ PRINTOPT (CA_VARIABLE, "-v");
+
+ /* now the rest of the actions */
+ PRINTACT (CA_ARRAYVAR, "arrayvar");
+ PRINTACT (CA_BINDING, "binding");
+ PRINTACT (CA_DISABLED, "disabled");
+ PRINTACT (CA_ENABLED, "enabled");
+ PRINTACT (CA_FUNCTION, "function");
+ PRINTACT (CA_HELPTOPIC, "helptopic");
+ PRINTACT (CA_HOSTNAME, "hostname");
+ PRINTACT (CA_RUNNING, "running");
+ PRINTACT (CA_SETOPT, "setopt");
+ PRINTACT (CA_SHOPT, "shopt");
+ PRINTACT (CA_SIGNAL, "signal");
+ PRINTACT (CA_STOPPED, "stopped");
+
+ /* now the rest of the arguments */
+
+ /* arguments that require quoting */
+ SQPRINTARG (cs->globpat, "-G");
+ SQPRINTARG (cs->words, "-W");
+ SQPRINTARG (cs->prefix, "-P");
+ SQPRINTARG (cs->suffix, "-S");
+ SQPRINTARG (cs->filterpat, "-X");
+
+ SQPRINTARG (cs->command, "-C");
+
+ /* simple arguments that don't require quoting */
+ PRINTARG (cs->funcname, "-F");
+
+ if (STREQ (cmd, EMPTYCMD))
+ printf ("-E\n");
+ else if (STREQ (cmd, DEFAULTCMD))
+ printf ("-D\n");
+ else
+ printf ("%s\n", cmd);
+
+ return (0);
+}
+
+static void
+print_compopts (cmd, cs, full)
+ const char *cmd;
+ COMPSPEC *cs;
+ int full;
+{
+ int copts;
+
+ printf ("compopt ");
+ copts = cs->options;
+
+ if (full)
+ {
+ XPRINTCOMPOPT (COPT_BASHDEFAULT, "bashdefault");
+ XPRINTCOMPOPT (COPT_DEFAULT, "default");
+ XPRINTCOMPOPT (COPT_DIRNAMES, "dirnames");
+ XPRINTCOMPOPT (COPT_FILENAMES, "filenames");
+ XPRINTCOMPOPT (COPT_NOSPACE, "nospace");
+ XPRINTCOMPOPT (COPT_PLUSDIRS, "plusdirs");
+ }
+ else
+ {
+ PRINTCOMPOPT (COPT_BASHDEFAULT, "bashdefault");
+ PRINTCOMPOPT (COPT_DEFAULT, "default");
+ PRINTCOMPOPT (COPT_DIRNAMES, "dirnames");
+ PRINTCOMPOPT (COPT_FILENAMES, "filenames");
+ PRINTCOMPOPT (COPT_NOSPACE, "nospace");
+ PRINTCOMPOPT (COPT_PLUSDIRS, "plusdirs");
+ }
+
+ if (STREQ (cmd, EMPTYCMD))
+ printf ("-E\n");
+ else if (STREQ (cmd, DEFAULTCMD))
+ printf ("-D\n");
+ else
+ printf ("%s\n", cmd);
+}
+
+static int
+print_compitem (item)
+ BUCKET_CONTENTS *item;
+{
+ COMPSPEC *cs;
+ char *cmd;
+
+ cmd = item->key;
+ cs = (COMPSPEC *)item->data;
+
+ return (print_one_completion (cmd, cs));
+}
+
+static void
+print_all_completions ()
+{
+ progcomp_walk (print_compitem);
+}
+
+static int
+print_cmd_completions (list)
+ WORD_LIST *list;
+{
+ WORD_LIST *l;
+ COMPSPEC *cs;
+ int ret;
+
+ for (ret = EXECUTION_SUCCESS, l = list; l; l = l->next)
+ {
+ cs = progcomp_search (l->word->word);
+ if (cs)
+ print_one_completion (l->word->word, cs);
+ else
+ {
+ builtin_error (_("%s: no completion specification"), l->word->word);
+ ret = EXECUTION_FAILURE;
+ }
+ }
+
+ return (sh_chkwrite (ret));
+}
+
+$BUILTIN compgen
+$DEPENDS_ON PROGRAMMABLE_COMPLETION
+$FUNCTION compgen_builtin
+$SHORT_DOC compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]
+Display possible completions depending on the options.
+
+Intended to be used from within a shell function generating possible
+completions. If the optional WORD argument is supplied, matches against
+WORD are generated.
+
+Exit Status:
+Returns success unless an invalid option is supplied or an error occurs.
+$END
+
+int
+compgen_builtin (list)
+ WORD_LIST *list;
+{
+ int rval;
+ unsigned long acts, copts;
+ COMPSPEC *cs;
+ STRINGLIST *sl;
+ char *word, **matches;
+
+ if (list == 0)
+ return (EXECUTION_SUCCESS);
+
+ acts = copts = (unsigned long)0L;
+ Garg = Warg = Parg = Sarg = Xarg = Farg = Carg = (char *)NULL;
+ cs = (COMPSPEC *)NULL;
+
+ /* Build the actions from the arguments. Also sets the [A-Z]arg variables
+ as a side effect if they are supplied as options. */
+ rval = build_actions (list, (struct _optflags *)NULL, &acts, &copts);
+ if (rval == EX_USAGE)
+ return (rval);
+ if (rval == EXECUTION_FAILURE)
+ return (EXECUTION_SUCCESS);
+
+ list = loptend;
+
+ word = (list && list->word) ? list->word->word : "";
+
+ if (Farg)
+ builtin_error (_("warning: -F option may not work as you expect"));
+ if (Carg)
+ builtin_error (_("warning: -C option may not work as you expect"));
+
+ /* If we get here, we need to build a compspec and evaluate it. */
+ cs = compspec_create ();
+ cs->actions = acts;
+ cs->options = copts;
+ cs->refcount = 1;
+
+ cs->globpat = STRDUP (Garg);
+ cs->words = STRDUP (Warg);
+ cs->prefix = STRDUP (Parg);
+ cs->suffix = STRDUP (Sarg);
+ cs->funcname = STRDUP (Farg);
+ cs->command = STRDUP (Carg);
+ cs->filterpat = STRDUP (Xarg);
+
+ rval = EXECUTION_FAILURE;
+ sl = gen_compspec_completions (cs, "compgen", word, 0, 0, 0);
+
+ /* If the compspec wants the bash default completions, temporarily
+ turn off programmable completion and call the bash completion code. */
+ if ((sl == 0 || sl->list_len == 0) && (copts & COPT_BASHDEFAULT))
+ {
+ matches = bash_default_completion (word, 0, 0, 0, 0);
+ sl = completions_to_stringlist (matches);
+ strvec_dispose (matches);
+ }
+
+ /* This isn't perfect, but it's the best we can do, given what readline
+ exports from its set of completion utility functions. */
+ if ((sl == 0 || sl->list_len == 0) && (copts & COPT_DEFAULT))
+ {
+ matches = rl_completion_matches (word, rl_filename_completion_function);
+ sl = completions_to_stringlist (matches);
+ strvec_dispose (matches);
+ }
+
+ if (sl)
+ {
+ if (sl->list && sl->list_len)
+ {
+ rval = EXECUTION_SUCCESS;
+ strlist_print (sl, (char *)NULL);
+ }
+ strlist_dispose (sl);
+ }
+
+ compspec_dispose (cs);
+ return (rval);
+}
+
+$BUILTIN compopt
+$DEPENDS_ON PROGRAMMABLE_COMPLETION
+$FUNCTION compopt_builtin
+$SHORT_DOC compopt [-o|+o option] [-DE] [name ...]
+Modify or display completion options.
+
+Modify the completion options for each NAME, or, if no NAMEs are supplied,
+the completion currently begin executed. If no OPTIONs are givenm, print
+the completion options for each NAME or the current completion specification.
+
+Options:
+ -o option Set completion option OPTION for each NAME
+ -D Change options for the "default" command completion
+ -E Change options for the "empty" command completion
+
+Using `+o' instead of `-o' turns off the specified option.
+
+Arguments:
+
+Each NAME refers to a command for which a completion specification must
+have previously been defined using the `complete' builtin. If no NAMEs
+are supplied, compopt must be called by a function currently generating
+completions, and the options for that currently-executing completion
+generator are modified.
+
+Exit Status:
+Returns success unless an invalid option is supplied or NAME does not
+have a completion specification defined.
+$END
+
+int
+compopt_builtin (list)
+ WORD_LIST *list;
+{
+ int opts_on, opts_off, *opts, opt, oind, ret, Dflag, Eflag;
+ WORD_LIST *l, *wl;
+ COMPSPEC *cs;
+
+ opts_on = opts_off = Eflag = Dflag = 0;
+ ret = EXECUTION_SUCCESS;
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "+o:DE")) != EOF)
+ {
+ opts = (list_opttype == '-') ? &opts_on : &opts_off;
+
+ switch (opt)
+ {
+ case 'o':
+ oind = find_compopt (list_optarg);
+ if (oind < 0)
+ {
+ sh_invalidoptname (list_optarg);
+ return (EX_USAGE);
+ }
+ *opts |= compopts[oind].optflag;
+ break;
+ case 'D':
+ Dflag = 1;
+ break;
+ case 'E':
+ Eflag = 1;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ wl = Dflag ? make_word_list (make_bare_word (DEFAULTCMD), (WORD_LIST *)NULL)
+ : (Eflag ? make_word_list (make_bare_word (EMPTYCMD), (WORD_LIST *)NULL) : 0);
+
+ if (list == 0 && wl == 0)
+ {
+ if (RL_ISSTATE (RL_STATE_COMPLETING) == 0 || pcomp_curcs == 0)
+ {
+ builtin_error (_("not currently executing completion function"));
+ return (EXECUTION_FAILURE);
+ }
+ cs = pcomp_curcs;
+
+ if (opts_on == 0 && opts_off == 0)
+ {
+ print_compopts (pcomp_curcmd, cs, 1);
+ return (sh_chkwrite (ret));
+ }
+
+ /* Set the compspec options */
+ pcomp_set_compspec_options (cs, opts_on, 1);
+ pcomp_set_compspec_options (cs, opts_off, 0);
+
+ /* And change the readline variables the options control */
+ pcomp_set_readline_variables (opts_on, 1);
+ pcomp_set_readline_variables (opts_off, 0);
+
+ return (ret);
+ }
+
+ for (l = wl ? wl : list; l; l = l->next)
+ {
+ cs = progcomp_search (l->word->word);
+ if (cs == 0)
+ {
+ builtin_error (_("%s: no completion specification"), l->word->word);
+ ret = EXECUTION_FAILURE;
+ continue;
+ }
+ if (opts_on == 0 && opts_off == 0)
+ {
+ print_compopts (l->word->word, cs, 1);
+ continue; /* XXX -- fill in later */
+ }
+
+ /* Set the compspec options */
+ pcomp_set_compspec_options (cs, opts_on, 1);
+ pcomp_set_compspec_options (cs, opts_off, 0);
+ }
+
+ return (ret);
+}
diff --git a/builtins/declare.def b/builtins/declare.def
new file mode 100644
index 0000000..a0ce605
--- /dev/null
+++ b/builtins/declare.def
@@ -0,0 +1,562 @@
+This file is declare.def, from which is created declare.c.
+It implements the builtins "declare" and "local" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES declare.c
+
+$BUILTIN declare
+$FUNCTION declare_builtin
+$SHORT_DOC declare [-aAfFilrtux] [-p] [name[=value] ...]
+Set variable values and attributes.
+
+Declare variables and give them attributes. If no NAMEs are given,
+display the attributes and values of all variables.
+
+Options:
+ -f restrict action or display to function names and definitions
+ -F restrict display to function names only (plus line number and
+ source file when debugging)
+ -p display the attributes and value of each NAME
+
+Options which set attributes:
+ -a to make NAMEs indexed arrays (if supported)
+ -A to make NAMEs associative arrays (if supported)
+ -i to make NAMEs have the `integer' attribute
+ -l to convert NAMEs to lower case on assignment
+ -r to make NAMEs readonly
+ -t to make NAMEs have the `trace' attribute
+ -u to convert NAMEs to upper case on assignment
+ -x to make NAMEs export
+
+Using `+' instead of `-' turns off the given attribute.
+
+Variables with the integer attribute have arithmetic evaluation (see
+the `let' command) performed when the variable is assigned a value.
+
+When used in a function, `declare' makes NAMEs local, as with the `local'
+command.
+
+Exit Status:
+Returns success unless an invalid option is supplied or an error occurs.
+$END
+
+$BUILTIN typeset
+$FUNCTION declare_builtin
+$SHORT_DOC typeset [-aAfFilrtux] [-p] name[=value] ...
+Set variable values and attributes.
+
+Obsolete. See `help declare'.
+$END
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "common.h"
+#include "builtext.h"
+#include "bashgetopt.h"
+
+extern int array_needs_making;
+extern int posixly_correct;
+
+static int declare_internal __P((register WORD_LIST *, int));
+
+/* Declare or change variable attributes. */
+int
+declare_builtin (list)
+ register WORD_LIST *list;
+{
+ return (declare_internal (list, 0));
+}
+
+$BUILTIN local
+$FUNCTION local_builtin
+$SHORT_DOC local [option] name[=value] ...
+Define local variables.
+
+Create a local variable called NAME, and give it VALUE. OPTION can
+be any option accepted by `declare'.
+
+Local variables can only be used within a function; they are visible
+only to the function where they are defined and its children.
+
+Exit Status:
+Returns success unless an invalid option is supplied, an error occurs,
+or the shell is not executing a function.
+$END
+int
+local_builtin (list)
+ register WORD_LIST *list;
+{
+ if (variable_context)
+ return (declare_internal (list, 1));
+ else
+ {
+ builtin_error (_("can only be used in a function"));
+ return (EXECUTION_FAILURE);
+ }
+}
+
+#if defined (ARRAY_VARS)
+# define DECLARE_OPTS "+acfilprtuxAF"
+#else
+# define DECLARE_OPTS "+cfilprtuxF"
+#endif
+
+/* The workhorse function. */
+static int
+declare_internal (list, local_var)
+ register WORD_LIST *list;
+ int local_var;
+{
+ int flags_on, flags_off, *flags;
+ int any_failed, assign_error, pflag, nodefs, opt;
+ char *t, *subscript_start;
+ SHELL_VAR *var;
+ FUNCTION_DEF *shell_fn;
+
+ flags_on = flags_off = any_failed = assign_error = pflag = nodefs = 0;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, DECLARE_OPTS)) != EOF)
+ {
+ flags = list_opttype == '+' ? &flags_off : &flags_on;
+
+ switch (opt)
+ {
+ case 'a':
+#if defined (ARRAY_VARS)
+ *flags |= att_array;
+ break;
+#else
+ builtin_usage ();
+ return (EX_USAGE);
+#endif
+ case 'A':
+#if defined (ARRAY_VARS)
+ *flags |= att_assoc;
+ break;
+#else
+ builtin_usage ();
+ return (EX_USAGE);
+#endif
+ case 'p':
+ if (local_var == 0)
+ pflag++;
+ break;
+ case 'F':
+ nodefs++;
+ *flags |= att_function;
+ break;
+ case 'f':
+ *flags |= att_function;
+ break;
+ case 'i':
+ *flags |= att_integer;
+ break;
+ case 'r':
+ *flags |= att_readonly;
+ break;
+ case 't':
+ *flags |= att_trace;
+ break;
+ case 'x':
+ *flags |= att_exported;
+ array_needs_making = 1;
+ break;
+#if defined (CASEMOD_ATTRS)
+# if defined (CASEMOD_CAPCASE)
+ case 'c':
+ *flags |= att_capcase;
+ if (flags == &flags_on)
+ flags_off |= att_uppercase|att_lowercase;
+ break;
+# endif
+ case 'l':
+ *flags |= att_lowercase;
+ if (flags == &flags_on)
+ flags_off |= att_capcase|att_uppercase;
+ break;
+ case 'u':
+ *flags |= att_uppercase;
+ if (flags == &flags_on)
+ flags_off |= att_capcase|att_lowercase;
+ break;
+#endif /* CASEMOD_ATTRS */
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+
+ list = loptend;
+
+ /* If there are no more arguments left, then we just want to show
+ some variables. */
+ if (list == 0) /* declare -[aAfFirtx] */
+ {
+ /* Show local variables defined at this context level if this is
+ the `local' builtin. */
+ if (local_var)
+ {
+ register SHELL_VAR **vlist;
+ register int i;
+
+ vlist = all_local_variables ();
+
+ if (vlist)
+ {
+ for (i = 0; vlist[i]; i++)
+ print_assignment (vlist[i]);
+
+ free (vlist);
+ }
+ }
+ else if (pflag && (flags_on == 0 || flags_on == att_function))
+ show_all_var_attributes (flags_on == 0, nodefs);
+ else if (flags_on == 0)
+ return (set_builtin ((WORD_LIST *)NULL));
+ else
+ set_or_show_attributes ((WORD_LIST *)NULL, flags_on, nodefs);
+
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+ }
+
+ if (pflag) /* declare -p [-aAfFirtx] name [name...] */
+ {
+ for (any_failed = 0; list; list = list->next)
+ {
+ pflag = show_name_attributes (list->word->word, nodefs);
+ if (pflag)
+ {
+ sh_notfound (list->word->word);
+ any_failed++;
+ }
+ }
+ return (sh_chkwrite (any_failed ? EXECUTION_FAILURE : EXECUTION_SUCCESS));
+ }
+
+#define NEXT_VARIABLE() free (name); list = list->next; continue
+
+ /* There are arguments left, so we are making variables. */
+ while (list) /* declare [-aAfFirx] name [name ...] */
+ {
+ char *value, *name;
+ int offset, aflags;
+#if defined (ARRAY_VARS)
+ int making_array_special, compound_array_assign, simple_array_assign;
+#endif
+
+ name = savestring (list->word->word);
+ offset = assignment (name, 0);
+ aflags = 0;
+
+ if (offset) /* declare [-aAfFirx] name=value */
+ {
+ name[offset] = '\0';
+ value = name + offset + 1;
+ if (name[offset - 1] == '+')
+ {
+ aflags |= ASS_APPEND;
+ name[offset - 1] = '\0';
+ }
+ }
+ else
+ value = "";
+
+#if defined (ARRAY_VARS)
+ compound_array_assign = simple_array_assign = 0;
+ subscript_start = (char *)NULL;
+ if (t = strchr (name, '[')) /* ] */
+ {
+ /* If offset != 0 we have already validated any array reference */
+ if (offset == 0 && valid_array_reference (name) == 0)
+ {
+ sh_invalidid (name);
+ assign_error++;
+ NEXT_VARIABLE ();
+ }
+ subscript_start = t;
+ *t = '\0';
+ making_array_special = 1;
+ }
+ else
+ making_array_special = 0;
+#endif
+
+ /* If we're in posix mode or not looking for a shell function (since
+ shell function names don't have to be valid identifiers when the
+ shell's not in posix mode), check whether or not the argument is a
+ valid, well-formed shell identifier. */
+ if ((posixly_correct || (flags_on & att_function) == 0) && legal_identifier (name) == 0)
+ {
+ sh_invalidid (name);
+ assign_error++;
+ NEXT_VARIABLE ();
+ }
+
+ /* If VARIABLE_CONTEXT has a non-zero value, then we are executing
+ inside of a function. This means we should make local variables,
+ not global ones. */
+
+ /* XXX - this has consequences when we're making a local copy of a
+ variable that was in the temporary environment. Watch out
+ for this. */
+ if (variable_context && ((flags_on & att_function) == 0))
+ {
+#if defined (ARRAY_VARS)
+ if (flags_on & att_assoc)
+ var = make_local_assoc_variable (name);
+ else if ((flags_on & att_array) || making_array_special)
+ var = make_local_array_variable (name);
+ else
+#endif
+ var = make_local_variable (name);
+ if (var == 0)
+ {
+ any_failed++;
+ NEXT_VARIABLE ();
+ }
+ }
+ else
+ var = (SHELL_VAR *)NULL;
+
+ /* If we are declaring a function, then complain about it in some way.
+ We don't let people make functions by saying `typeset -f foo=bar'. */
+
+ /* There should be a way, however, to let people look at a particular
+ function definition by saying `typeset -f foo'. */
+
+ if (flags_on & att_function)
+ {
+ if (offset) /* declare -f [-rix] foo=bar */
+ {
+ builtin_error (_("cannot use `-f' to make functions"));
+ free (name);
+ return (EXECUTION_FAILURE);
+ }
+ else /* declare -f [-rx] name [name...] */
+ {
+ var = find_function (name);
+
+ if (var)
+ {
+ if (readonly_p (var) && (flags_off & att_readonly))
+ {
+ builtin_error (_("%s: readonly function"), name);
+ any_failed++;
+ NEXT_VARIABLE ();
+ }
+
+ /* declare -[Ff] name [name...] */
+ if (flags_on == att_function && flags_off == 0)
+ {
+#if defined (DEBUGGER)
+ if (nodefs && debugging_mode)
+ {
+ shell_fn = find_function_def (var->name);
+ if (shell_fn)
+ printf ("%s %d %s\n", var->name, shell_fn->line, shell_fn->source_file);
+ else
+ printf ("%s\n", var->name);
+ }
+ else
+#endif /* DEBUGGER */
+ {
+ t = nodefs ? var->name
+ : named_function_string (name, function_cell (var), FUNC_MULTILINE|FUNC_EXTERNAL);
+ printf ("%s\n", t);
+ any_failed = sh_chkwrite (any_failed);
+ }
+ }
+ else /* declare -[fF] -[rx] name [name...] */
+ {
+ VSETATTR (var, flags_on);
+ VUNSETATTR (var, flags_off);
+ }
+ }
+ else
+ any_failed++;
+ NEXT_VARIABLE ();
+ }
+ }
+ else /* declare -[aAirx] name [name...] */
+ {
+ /* Non-null if we just created or fetched a local variable. */
+ if (var == 0)
+ var = find_variable (name);
+
+ if (var == 0)
+ {
+#if defined (ARRAY_VARS)
+ if (flags_on & att_assoc)
+ var = make_new_assoc_variable (name);
+ else if ((flags_on & att_array) || making_array_special)
+ var = make_new_array_variable (name);
+ else
+#endif
+
+ if (offset)
+ var = bind_variable (name, "", 0);
+ else
+ {
+ var = bind_variable (name, (char *)NULL, 0);
+ VSETATTR (var, att_invisible);
+ }
+ }
+
+ /* Cannot use declare +r to turn off readonly attribute. */
+ if (readonly_p (var) && (flags_off & att_readonly))
+ {
+ sh_readonly (name);
+ any_failed++;
+ NEXT_VARIABLE ();
+ }
+
+ /* Cannot use declare to assign value to readonly or noassign
+ variable. */
+ if ((readonly_p (var) || noassign_p (var)) && offset)
+ {
+ if (readonly_p (var))
+ sh_readonly (name);
+ assign_error++;
+ NEXT_VARIABLE ();
+ }
+
+#if defined (ARRAY_VARS)
+ if ((making_array_special || (flags_on & (att_array|att_assoc)) || array_p (var) || assoc_p (var)) && offset)
+ {
+ int vlen;
+ vlen = STRLEN (value);
+
+ if (value[0] == '(' && value[vlen-1] == ')')
+ compound_array_assign = 1;
+ else
+ simple_array_assign = 1;
+ }
+
+ /* Cannot use declare +a name or declare +A name to remove an
+ array variable. */
+ if (((flags_off & att_array) && array_p (var)) || ((flags_off & att_assoc) && assoc_p (var)))
+ {
+ builtin_error (_("%s: cannot destroy array variables in this way"), name);
+ any_failed++;
+ NEXT_VARIABLE ();
+ }
+
+ if ((flags_on & att_array) && assoc_p (var))
+ {
+ builtin_error (_("%s: cannot convert associative to indexed array"), name);
+ any_failed++;
+ NEXT_VARIABLE ();
+ }
+ if ((flags_on & att_assoc) && array_p (var))
+ {
+ builtin_error (_("%s: cannot convert indexed to associative array"), name);
+ any_failed++;
+ NEXT_VARIABLE ();
+ }
+
+ /* declare -A name[[n]] makes name an associative array variable. */
+ if (flags_on & att_assoc)
+ {
+ if (assoc_p (var) == 0)
+ var = convert_var_to_assoc (var);
+ }
+ /* declare -a name[[n]] or declare name[n] makes name an indexed
+ array variable. */
+ else if ((making_array_special || (flags_on & att_array)) && array_p (var) == 0 && assoc_p (var) == 0)
+ var = convert_var_to_array (var);
+#endif /* ARRAY_VARS */
+
+ VSETATTR (var, flags_on);
+ VUNSETATTR (var, flags_off);
+
+#if defined (ARRAY_VARS)
+ if (offset && compound_array_assign)
+ assign_array_var_from_string (var, value, aflags);
+ else if (simple_array_assign && subscript_start)
+ {
+ /* declare [-aA] name[N]=value */
+ *subscript_start = '['; /* ] */
+ var = assign_array_element (name, value, 0); /* XXX - not aflags */
+ *subscript_start = '\0';
+ }
+ else if (simple_array_assign)
+ {
+ /* let bind_{array,assoc}_variable take care of this. */
+ if (assoc_p (var))
+ bind_assoc_variable (var, name, "0", value, aflags);
+ else
+ bind_array_variable (name, 0, value, aflags);
+ }
+ else
+#endif
+ /* bind_variable_value duplicates the essential internals of
+ bind_variable() */
+ if (offset)
+ bind_variable_value (var, value, aflags);
+
+ /* If we found this variable in the temporary environment, as with
+ `var=value declare -x var', make sure it is treated identically
+ to `var=value export var'. Do the same for `declare -r' and
+ `readonly'. Preserve the attributes, except for att_tempvar. */
+ /* XXX -- should this create a variable in the global scope, or
+ modify the local variable flags? ksh93 has it modify the
+ global scope.
+ Need to handle case like in set_var_attribute where a temporary
+ variable is in the same table as the function local vars. */
+ if ((flags_on & (att_exported|att_readonly)) && tempvar_p (var))
+ {
+ SHELL_VAR *tv;
+ char *tvalue;
+
+ tv = find_tempenv_variable (var->name);
+ if (tv)
+ {
+ tvalue = var_isset (var) ? savestring (value_cell (var)) : savestring ("");
+ tv = bind_variable (var->name, tvalue, 0);
+ tv->attributes |= var->attributes & ~att_tempvar;
+ if (tv->context > 0)
+ VSETATTR (tv, att_propagate);
+ free (tvalue);
+ }
+ VSETATTR (var, att_propagate);
+ }
+ }
+
+ stupidly_hack_special_variables (name);
+
+ NEXT_VARIABLE ();
+ }
+
+ return (assign_error ? EX_BADASSIGN
+ : ((any_failed == 0) ? EXECUTION_SUCCESS
+ : EXECUTION_FAILURE));
+}
diff --git a/builtins/echo.def b/builtins/echo.def
new file mode 100644
index 0000000..62c6199
--- /dev/null
+++ b/builtins/echo.def
@@ -0,0 +1,198 @@
+This file is echo.def, from which is created echo.c.
+It implements the builtin "echo" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES echo.c
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "../bashansi.h"
+
+#include <stdio.h>
+#include "../shell.h"
+
+#include "common.h"
+
+$BUILTIN echo
+$FUNCTION echo_builtin
+$DEPENDS_ON V9_ECHO
+$SHORT_DOC echo [-neE] [arg ...]
+Write arguments to the standard output.
+
+Display the ARGs on the standard output followed by a newline.
+
+Options:
+ -n do not append a newline
+ -e enable interpretation of the following backslash escapes
+ -E explicitly suppress interpretation of backslash escapes
+
+`echo' interprets the following backslash-escaped characters:
+ \a alert (bell)
+ \b backspace
+ \c suppress further output
+ \e escape character
+ \f form feed
+ \n new line
+ \r carriage return
+ \t horizontal tab
+ \v vertical tab
+ \\ backslash
+ \0nnn the character whose ASCII code is NNN (octal). NNN can be
+ 0 to 3 octal digits
+ \xHH the eight-bit character whose value is HH (hexadecimal). HH
+ can be one or two hex digits
+
+Exit Status:
+Returns success unless a write error occurs.
+$END
+
+$BUILTIN echo
+$FUNCTION echo_builtin
+$DEPENDS_ON !V9_ECHO
+$SHORT_DOC echo [-n] [arg ...]
+Write arguments to the standard output.
+
+Display the ARGs on the standard output followed by a newline.
+
+Options:
+ -n do not append a newline
+
+Exit Status:
+Returns success unless a write error occurs.
+$END
+
+#if defined (V9_ECHO)
+# define VALID_ECHO_OPTIONS "neE"
+#else /* !V9_ECHO */
+# define VALID_ECHO_OPTIONS "n"
+#endif /* !V9_ECHO */
+
+/* System V machines already have a /bin/sh with a v9 behaviour. We
+ give Bash the identical behaviour for these machines so that the
+ existing system shells won't barf. Regrettably, the SUS v2 has
+ standardized the Sys V echo behavior. This variable is external
+ so that we can have a `shopt' variable to control it at runtime. */
+#if defined (DEFAULT_ECHO_TO_XPG) || defined (STRICT_POSIX)
+int xpg_echo = 1;
+#else
+int xpg_echo = 0;
+#endif /* DEFAULT_ECHO_TO_XPG */
+
+extern int posixly_correct;
+
+/* Print the words in LIST to standard output. If the first word is
+ `-n', then don't print a trailing newline. We also support the
+ echo syntax from Version 9 Unix systems. */
+int
+echo_builtin (list)
+ WORD_LIST *list;
+{
+ int display_return, do_v9, i, len;
+ char *temp, *s;
+
+ do_v9 = xpg_echo;
+ display_return = 1;
+
+ if (posixly_correct && xpg_echo)
+ goto just_echo;
+
+ for (; list && (temp = list->word->word) && *temp == '-'; list = list->next)
+ {
+ /* If it appears that we are handling options, then make sure that
+ all of the options specified are actually valid. Otherwise, the
+ string should just be echoed. */
+ temp++;
+
+ for (i = 0; temp[i]; i++)
+ {
+ if (strchr (VALID_ECHO_OPTIONS, temp[i]) == 0)
+ break;
+ }
+
+ /* echo - and echo -<nonopt> both mean to just echo the arguments. */
+ if (*temp == 0 || temp[i])
+ break;
+
+ /* All of the options in TEMP are valid options to ECHO.
+ Handle them. */
+ while (i = *temp++)
+ {
+ switch (i)
+ {
+ case 'n':
+ display_return = 0;
+ break;
+#if defined (V9_ECHO)
+ case 'e':
+ do_v9 = 1;
+ break;
+ case 'E':
+ do_v9 = 0;
+ break;
+#endif /* V9_ECHO */
+ default:
+ goto just_echo; /* XXX */
+ }
+ }
+ }
+
+just_echo:
+
+ clearerr (stdout); /* clear error before writing and testing success */
+
+ terminate_immediately++;
+ while (list)
+ {
+ i = len = 0;
+ temp = do_v9 ? ansicstr (list->word->word, STRLEN (list->word->word), 1, &i, &len)
+ : list->word->word;
+ if (temp)
+ {
+ if (do_v9)
+ {
+ for (s = temp; len > 0; len--)
+ putchar (*s++);
+ }
+ else
+ printf ("%s", temp);
+#if defined (SunOS5)
+ fflush (stdout); /* Fix for bug in SunOS 5.5 printf(3) */
+#endif
+ }
+ if (do_v9 && temp)
+ free (temp);
+ list = list->next;
+ if (i)
+ {
+ display_return = 0;
+ break;
+ }
+ if (list)
+ putchar(' ');
+ }
+
+ if (display_return)
+ putchar ('\n');
+
+ terminate_immediately--;
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+}
diff --git a/builtins/enable.def b/builtins/enable.def
new file mode 100644
index 0000000..40cbb44
--- /dev/null
+++ b/builtins/enable.def
@@ -0,0 +1,483 @@
+This file is enable.def, from which is created enable.c.
+It implements the builtin "enable" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES enable.c
+
+$BUILTIN enable
+$FUNCTION enable_builtin
+$SHORT_DOC enable [-a] [-dnps] [-f filename] [name ...]
+Enable and disable shell builtins.
+
+Enables and disables builtin shell commands. Disabling allows you to
+execute a disk command which has the same name as a shell builtin
+without using a full pathname.
+
+Options:
+ -a print a list of builtins showing whether or not each is enabled
+ -n disable each NAME or display a list of disabled builtins
+ -p print the list of builtins in a reusable format
+ -s print only the names of Posix `special' builtins
+
+Options controlling dynamic loading:
+ -f Load builtin NAME from shared object FILENAME
+ -d Remove a builtin loaded with -f
+
+Without options, each NAME is enabled.
+
+To use the `test' found in $PATH instead of the shell builtin
+version, type `enable -n test'.
+
+Exit Status:
+Returns success unless NAME is not a shell builtin or an error occurs.
+$END
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../builtins.h"
+#include "../flags.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+#if defined (PROGRAMMABLE_COMPLETION)
+# include "../pcomplete.h"
+#endif
+
+#define ENABLED 1
+#define DISABLED 2
+#define SPECIAL 4
+
+#define AFLAG 0x01
+#define DFLAG 0x02
+#define FFLAG 0x04
+#define NFLAG 0x08
+#define PFLAG 0x10
+#define SFLAG 0x20
+
+#if defined (HAVE_DLOPEN) && defined (HAVE_DLSYM)
+static int dyn_load_builtin __P((WORD_LIST *, int, char *));
+#endif
+
+#if defined (HAVE_DLCLOSE)
+static int dyn_unload_builtin __P((char *));
+static void delete_builtin __P((struct builtin *));
+static int local_dlclose __P((void *));
+#endif
+
+static void list_some_builtins __P((int));
+static int enable_shell_command __P((char *, int));
+
+/* Enable/disable shell commands present in LIST. If list is not specified,
+ then print out a list of shell commands showing which are enabled and
+ which are disabled. */
+int
+enable_builtin (list)
+ WORD_LIST *list;
+{
+ int result, flags;
+ int opt, filter;
+#if defined (HAVE_DLOPEN) && defined (HAVE_DLSYM)
+ char *filename;
+#endif
+
+ result = EXECUTION_SUCCESS;
+ flags = 0;
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "adnpsf:")) != -1)
+ {
+ switch (opt)
+ {
+ case 'a':
+ flags |= AFLAG;
+ break;
+ case 'n':
+ flags |= NFLAG;
+ break;
+ case 'p':
+ flags |= PFLAG;
+ break;
+ case 's':
+ flags |= SFLAG;
+ break;
+ case 'f':
+#if defined (HAVE_DLOPEN) && defined (HAVE_DLSYM)
+ flags |= FFLAG;
+ filename = list_optarg;
+ break;
+#else
+ builtin_error (_("dynamic loading not available"));
+ return (EX_USAGE);
+#endif
+#if defined (HAVE_DLCLOSE)
+ case 'd':
+ flags |= DFLAG;
+ break;
+#else
+ builtin_error (_("dynamic loading not available"));
+ return (EX_USAGE);
+#endif /* HAVE_DLCLOSE */
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+
+ list = loptend;
+
+#if defined (RESTRICTED_SHELL)
+ /* Restricted shells cannot load new builtins. */
+ if (restricted && (flags & (FFLAG|DFLAG)))
+ {
+ sh_restricted ((char *)NULL);
+ return (EXECUTION_FAILURE);
+ }
+#endif
+
+ if (list == 0 || (flags & PFLAG))
+ {
+ filter = (flags & AFLAG) ? (ENABLED | DISABLED)
+ : (flags & NFLAG) ? DISABLED : ENABLED;
+
+ if (flags & SFLAG)
+ filter |= SPECIAL;
+
+ list_some_builtins (filter);
+ }
+#if defined (HAVE_DLOPEN) && defined (HAVE_DLSYM)
+ else if (flags & FFLAG)
+ {
+ filter = (flags & NFLAG) ? DISABLED : ENABLED;
+ if (flags & SFLAG)
+ filter |= SPECIAL;
+
+ result = dyn_load_builtin (list, filter, filename);
+#if defined (PROGRAMMABLE_COMPLETION)
+ set_itemlist_dirty (&it_builtins);
+#endif
+ }
+#endif
+#if defined (HAVE_DLCLOSE)
+ else if (flags & DFLAG)
+ {
+ while (list)
+ {
+ opt = dyn_unload_builtin (list->word->word);
+ if (opt == EXECUTION_FAILURE)
+ result = EXECUTION_FAILURE;
+ list = list->next;
+ }
+#if defined (PROGRAMMABLE_COMPLETION)
+ set_itemlist_dirty (&it_builtins);
+#endif
+ }
+#endif
+ else
+ {
+ while (list)
+ {
+ opt = enable_shell_command (list->word->word, flags & NFLAG);
+
+ if (opt == EXECUTION_FAILURE)
+ {
+ sh_notbuiltin (list->word->word);
+ result = EXECUTION_FAILURE;
+ }
+ list = list->next;
+ }
+ }
+ return (result);
+}
+
+/* List some builtins.
+ FILTER is a mask with two slots: ENABLED and DISABLED. */
+static void
+list_some_builtins (filter)
+ int filter;
+{
+ register int i;
+
+ for (i = 0; i < num_shell_builtins; i++)
+ {
+ if (shell_builtins[i].function == 0 || (shell_builtins[i].flags & BUILTIN_DELETED))
+ continue;
+
+ if ((filter & SPECIAL) &&
+ (shell_builtins[i].flags & SPECIAL_BUILTIN) == 0)
+ continue;
+
+ if ((filter & ENABLED) && (shell_builtins[i].flags & BUILTIN_ENABLED))
+ printf ("enable %s\n", shell_builtins[i].name);
+ else if ((filter & DISABLED) &&
+ ((shell_builtins[i].flags & BUILTIN_ENABLED) == 0))
+ printf ("enable -n %s\n", shell_builtins[i].name);
+ }
+}
+
+/* Enable the shell command NAME. If DISABLE_P is non-zero, then
+ disable NAME instead. */
+static int
+enable_shell_command (name, disable_p)
+ char *name;
+ int disable_p;
+{
+ struct builtin *b;
+
+ b = builtin_address_internal (name, 1);
+ if (b == 0)
+ return (EXECUTION_FAILURE);
+
+ if (disable_p)
+ b->flags &= ~BUILTIN_ENABLED;
+#if defined (RESTRICTED_SHELL)
+ else if (restricted && ((b->flags & BUILTIN_ENABLED) == 0))
+ {
+ sh_restricted ((char *)NULL);
+ return (EXECUTION_FAILURE);
+ }
+#endif
+ else
+ b->flags |= BUILTIN_ENABLED;
+
+#if defined (PROGRAMMABLE_COMPLETION)
+ set_itemlist_dirty (&it_enabled);
+ set_itemlist_dirty (&it_disabled);
+#endif
+
+ return (EXECUTION_SUCCESS);
+}
+
+#if defined (HAVE_DLOPEN) && defined (HAVE_DLSYM)
+
+#if defined (HAVE_DLFCN_H)
+# include <dlfcn.h>
+#endif
+
+static int
+dyn_load_builtin (list, flags, filename)
+ WORD_LIST *list;
+ int flags;
+ char *filename;
+{
+ WORD_LIST *l;
+ void *handle;
+
+ int total, size, new, replaced;
+ char *struct_name, *name;
+ struct builtin **new_builtins, *b, *new_shell_builtins, *old_builtin;
+
+ if (list == 0)
+ return (EXECUTION_FAILURE);
+
+#ifndef RTLD_LAZY
+#define RTLD_LAZY 1
+#endif
+
+#if defined (_AIX)
+ handle = dlopen (filename, RTLD_NOW|RTLD_GLOBAL);
+#else
+ handle = dlopen (filename, RTLD_LAZY);
+#endif /* !_AIX */
+
+ if (handle == 0)
+ {
+ builtin_error (_("cannot open shared object %s: %s"), filename, dlerror ());
+ return (EXECUTION_FAILURE);
+ }
+
+ for (new = 0, l = list; l; l = l->next, new++)
+ ;
+ new_builtins = (struct builtin **)xmalloc (new * sizeof (struct builtin *));
+
+ /* For each new builtin in the shared object, find it and its describing
+ structure. If this is overwriting an existing builtin, do so, otherwise
+ save the loaded struct for creating the new list of builtins. */
+ for (replaced = new = 0; list; list = list->next)
+ {
+ name = list->word->word;
+
+ size = strlen (name);
+ struct_name = (char *)xmalloc (size + 8);
+ strcpy (struct_name, name);
+ strcpy (struct_name + size, "_struct");
+
+ b = (struct builtin *)dlsym (handle, struct_name);
+ if (b == 0)
+ {
+ builtin_error (_("cannot find %s in shared object %s: %s"),
+ struct_name, filename, dlerror ());
+ free (struct_name);
+ continue;
+ }
+
+ free (struct_name);
+
+ b->flags &= ~STATIC_BUILTIN;
+ if (flags & SPECIAL)
+ b->flags |= SPECIAL_BUILTIN;
+ b->handle = handle;
+
+ if (old_builtin = builtin_address_internal (name, 1))
+ {
+ replaced++;
+ FASTCOPY ((char *)b, (char *)old_builtin, sizeof (struct builtin));
+ }
+ else
+ new_builtins[new++] = b;
+ }
+
+ if (replaced == 0 && new == 0)
+ {
+ free (new_builtins);
+ dlclose (handle);
+ return (EXECUTION_FAILURE);
+ }
+
+ if (new)
+ {
+ total = num_shell_builtins + new;
+ size = (total + 1) * sizeof (struct builtin);
+
+ new_shell_builtins = (struct builtin *)xmalloc (size);
+ FASTCOPY ((char *)shell_builtins, (char *)new_shell_builtins,
+ num_shell_builtins * sizeof (struct builtin));
+ for (replaced = 0; replaced < new; replaced++)
+ FASTCOPY ((char *)new_builtins[replaced],
+ (char *)&new_shell_builtins[num_shell_builtins + replaced],
+ sizeof (struct builtin));
+
+ new_shell_builtins[total].name = (char *)0;
+ new_shell_builtins[total].function = (sh_builtin_func_t *)0;
+ new_shell_builtins[total].flags = 0;
+
+ if (shell_builtins != static_shell_builtins)
+ free (shell_builtins);
+
+ shell_builtins = new_shell_builtins;
+ num_shell_builtins = total;
+ initialize_shell_builtins ();
+ }
+
+ free (new_builtins);
+ return (EXECUTION_SUCCESS);
+}
+#endif
+
+#if defined (HAVE_DLCLOSE)
+static void
+delete_builtin (b)
+ struct builtin *b;
+{
+ int ind, size;
+ struct builtin *new_shell_builtins;
+
+ /* XXX - funky pointer arithmetic - XXX */
+#ifdef __STDC__
+ ind = b - shell_builtins;
+#else
+ ind = ((int)b - (int)shell_builtins) / sizeof (struct builtin);
+#endif
+ size = num_shell_builtins * sizeof (struct builtin);
+ new_shell_builtins = (struct builtin *)xmalloc (size);
+
+ /* Copy shell_builtins[0]...shell_builtins[ind - 1] to new_shell_builtins */
+ if (ind)
+ FASTCOPY ((char *)shell_builtins, (char *)new_shell_builtins,
+ ind * sizeof (struct builtin));
+ /* Copy shell_builtins[ind+1]...shell_builtins[num_shell_builtins to
+ new_shell_builtins, starting at ind. */
+ FASTCOPY ((char *)(&shell_builtins[ind+1]),
+ (char *)(&new_shell_builtins[ind]),
+ (num_shell_builtins - ind) * sizeof (struct builtin));
+
+ if (shell_builtins != static_shell_builtins)
+ free (shell_builtins);
+
+ /* The result is still sorted. */
+ num_shell_builtins--;
+ shell_builtins = new_shell_builtins;
+}
+
+/* Tenon's MachTen has a dlclose that doesn't return a value, so we
+ finesse it with a local wrapper. */
+static int
+local_dlclose (handle)
+ void *handle;
+{
+#if !defined (__MACHTEN__)
+ return (dlclose (handle));
+#else /* __MACHTEN__ */
+ dlclose (handle);
+ return ((dlerror () != NULL) ? -1 : 0);
+#endif /* __MACHTEN__ */
+}
+
+static int
+dyn_unload_builtin (name)
+ char *name;
+{
+ struct builtin *b;
+ void *handle;
+ int ref, i;
+
+ b = builtin_address_internal (name, 1);
+ if (b == 0)
+ {
+ sh_notbuiltin (name);
+ return (EXECUTION_FAILURE);
+ }
+ if (b->flags & STATIC_BUILTIN)
+ {
+ builtin_error (_("%s: not dynamically loaded"), name);
+ return (EXECUTION_FAILURE);
+ }
+
+ handle = (void *)b->handle;
+ for (ref = i = 0; i < num_shell_builtins; i++)
+ {
+ if (shell_builtins[i].handle == b->handle)
+ ref++;
+ }
+
+ /* Don't remove the shared object unless the reference count of builtins
+ using it drops to zero. */
+ if (ref == 1 && local_dlclose (handle) != 0)
+ {
+ builtin_error (_("%s: cannot delete: %s"), name, dlerror ());
+ return (EXECUTION_FAILURE);
+ }
+
+ /* Now remove this entry from the builtin table and reinitialize. */
+ delete_builtin (b);
+
+ return (EXECUTION_SUCCESS);
+}
+#endif
diff --git a/builtins/eval.def b/builtins/eval.def
new file mode 100644
index 0000000..ee9a23d
--- /dev/null
+++ b/builtins/eval.def
@@ -0,0 +1,58 @@
+This file is eval.def, from which is created eval.c.
+It implements the builtin "eval" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES eval.c
+
+$BUILTIN eval
+$FUNCTION eval_builtin
+$SHORT_DOC eval [arg ...]
+Execute arguments as a shell command.
+
+Combine ARGs into a single string, use the result as input to the shell,
+and execute the resulting commands.
+
+Exit Status:
+Returns exit status of command or success if command is null.
+$END
+
+#include <config.h>
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "../shell.h"
+#include "bashgetopt.h"
+#include "common.h"
+
+/* Parse the string that these words make, and execute the command found. */
+int
+eval_builtin (list)
+ WORD_LIST *list;
+{
+ if (no_options (list))
+ return (EX_USAGE);
+ list = loptend; /* skip over possible `--' */
+
+ /* Note that parse_and_execute () frees the string it is passed. */
+ return (list ? parse_and_execute (string_list (list), "eval", SEVAL_NOHIST) : EXECUTION_SUCCESS);
+}
diff --git a/builtins/evalfile.c b/builtins/evalfile.c
new file mode 100644
index 0000000..972d039
--- /dev/null
+++ b/builtins/evalfile.c
@@ -0,0 +1,351 @@
+/* evalfile.c - read and evaluate commands from a file or file descriptor */
+
+/* Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "../bashtypes.h"
+#include "posixstat.h"
+#include "filecntl.h"
+
+#include <stdio.h>
+#include <signal.h>
+#include <errno.h>
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../jobs.h"
+#include "../builtins.h"
+#include "../flags.h"
+#include "../input.h"
+#include "../execute_cmd.h"
+#include "../trap.h"
+
+#if defined (HISTORY)
+# include "../bashhist.h"
+#endif
+
+#include <typemax.h>
+
+#include "common.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+/* Flags for _evalfile() */
+#define FEVAL_ENOENTOK 0x001
+#define FEVAL_BUILTIN 0x002
+#define FEVAL_UNWINDPROT 0x004
+#define FEVAL_NONINT 0x008
+#define FEVAL_LONGJMP 0x010
+#define FEVAL_HISTORY 0x020
+#define FEVAL_CHECKBINARY 0x040
+#define FEVAL_REGFILE 0x080
+#define FEVAL_NOPUSHARGS 0x100
+
+extern int posixly_correct;
+extern int indirection_level, subshell_environment;
+extern int return_catch_flag, return_catch_value;
+extern int last_command_exit_value;
+
+/* How many `levels' of sourced files we have. */
+int sourcelevel = 0;
+
+static int
+_evalfile (filename, flags)
+ const char *filename;
+ int flags;
+{
+ volatile int old_interactive;
+ procenv_t old_return_catch;
+ int return_val, fd, result, pflags, i, nnull;
+ ssize_t nr; /* return value from read(2) */
+ char *string;
+ struct stat finfo;
+ size_t file_size;
+ sh_vmsg_func_t *errfunc;
+#if defined (ARRAY_VARS)
+ SHELL_VAR *funcname_v, *nfv, *bash_source_v, *bash_lineno_v;
+ ARRAY *funcname_a, *bash_source_a, *bash_lineno_a;
+# if defined (DEBUGGER)
+ SHELL_VAR *bash_argv_v, *bash_argc_v;
+ ARRAY *bash_argv_a, *bash_argc_a;
+# endif
+ char *t, tt[2];
+#endif
+
+ USE_VAR(pflags);
+
+#if defined (ARRAY_VARS)
+ GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a);
+ GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a);
+ GET_ARRAY_FROM_VAR ("BASH_LINENO", bash_lineno_v, bash_lineno_a);
+# if defined (DEBUGGER)
+ GET_ARRAY_FROM_VAR ("BASH_ARGV", bash_argv_v, bash_argv_a);
+ GET_ARRAY_FROM_VAR ("BASH_ARGC", bash_argc_v, bash_argc_a);
+# endif
+#endif
+
+ fd = open (filename, O_RDONLY);
+
+ if (fd < 0 || (fstat (fd, &finfo) == -1))
+ {
+file_error_and_exit:
+ if (((flags & FEVAL_ENOENTOK) == 0) || errno != ENOENT)
+ file_error (filename);
+
+ if (flags & FEVAL_LONGJMP)
+ {
+ last_command_exit_value = 1;
+ jump_to_top_level (EXITPROG);
+ }
+
+ return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE
+ : ((errno == ENOENT) ? 0 : -1));
+ }
+
+ errfunc = ((flags & FEVAL_BUILTIN) ? builtin_error : internal_error);
+
+ if (S_ISDIR (finfo.st_mode))
+ {
+ (*errfunc) (_("%s: is a directory"), filename);
+ return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1);
+ }
+ else if ((flags & FEVAL_REGFILE) && S_ISREG (finfo.st_mode) == 0)
+ {
+ (*errfunc) (_("%s: not a regular file"), filename);
+ return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1);
+ }
+
+ file_size = (size_t)finfo.st_size;
+ /* Check for overflow with large files. */
+ if (file_size != finfo.st_size || file_size + 1 < file_size)
+ {
+ (*errfunc) (_("%s: file is too large"), filename);
+ return ((flags & FEVAL_BUILTIN) ? EXECUTION_FAILURE : -1);
+ }
+
+#if defined (__CYGWIN__) && defined (O_TEXT)
+ setmode (fd, O_TEXT);
+#endif
+
+ if (S_ISREG (finfo.st_mode) && file_size <= SSIZE_MAX)
+ {
+ string = (char *)xmalloc (1 + file_size);
+ nr = read (fd, string, file_size);
+ if (nr >= 0)
+ string[nr] = '\0';
+ }
+ else
+ nr = zmapfd (fd, &string, 0);
+
+ return_val = errno;
+ close (fd);
+ errno = return_val;
+
+ if (nr < 0) /* XXX was != file_size, not < 0 */
+ {
+ free (string);
+ goto file_error_and_exit;
+ }
+
+ if (nr == 0)
+ {
+ free (string);
+ return ((flags & FEVAL_BUILTIN) ? EXECUTION_SUCCESS : 1);
+ }
+
+ if ((flags & FEVAL_CHECKBINARY) &&
+ check_binary_file (string, (nr > 80) ? 80 : nr))
+ {
+ free (string);
+ (*errfunc) (_("%s: cannot execute binary file"), filename);
+ return ((flags & FEVAL_BUILTIN) ? EX_BINARY_FILE : -1);
+ }
+
+ i = strlen (string);
+ if (i < nr)
+ {
+ for (nnull = i = 0; i < nr; i++)
+ if (string[i] == '\0')
+ {
+ memmove (string+i, string+i+1, nr - i);
+ nr--;
+ /* Even if the `check binary' flag is not set, we want to avoid
+ sourcing files with more than 256 null characters -- that
+ probably indicates a binary file. */
+ if ((flags & FEVAL_BUILTIN) && ++nnull > 256)
+ {
+ free (string);
+ (*errfunc) (_("%s: cannot execute binary file"), filename);
+ return ((flags & FEVAL_BUILTIN) ? EX_BINARY_FILE : -1);
+ }
+ }
+ }
+
+ if (flags & FEVAL_UNWINDPROT)
+ {
+ begin_unwind_frame ("_evalfile");
+
+ unwind_protect_int (return_catch_flag);
+ unwind_protect_jmp_buf (return_catch);
+ if (flags & FEVAL_NONINT)
+ unwind_protect_int (interactive);
+ unwind_protect_int (sourcelevel);
+ }
+ else
+ {
+ COPY_PROCENV (return_catch, old_return_catch);
+ if (flags & FEVAL_NONINT)
+ old_interactive = interactive;
+ }
+
+ if (flags & FEVAL_NONINT)
+ interactive = 0;
+
+ return_catch_flag++;
+ sourcelevel++;
+
+#if defined (ARRAY_VARS)
+ array_push (bash_source_a, (char *)filename);
+ t = itos (executing_line_number ());
+ array_push (bash_lineno_a, t);
+ free (t);
+ array_push (funcname_a, "source"); /* not exactly right */
+# if defined (DEBUGGER)
+ /* Have to figure out a better way to do this when `source' is supplied
+ arguments */
+ if ((flags & FEVAL_NOPUSHARGS) == 0)
+ {
+ array_push (bash_argv_a, (char *)filename);
+ tt[0] = '1'; tt[1] = '\0';
+ array_push (bash_argc_a, tt);
+ }
+# endif
+#endif
+
+ /* set the flags to be passed to parse_and_execute */
+ pflags = SEVAL_RESETLINE;
+ pflags |= (flags & FEVAL_HISTORY) ? 0 : SEVAL_NOHIST;
+
+ if (flags & FEVAL_BUILTIN)
+ result = EXECUTION_SUCCESS;
+
+ return_val = setjmp (return_catch);
+
+ /* If `return' was seen outside of a function, but in the script, then
+ force parse_and_execute () to clean up. */
+ if (return_val)
+ {
+ parse_and_execute_cleanup ();
+ result = return_catch_value;
+ }
+ else
+ result = parse_and_execute (string, filename, pflags);
+
+ if (flags & FEVAL_UNWINDPROT)
+ run_unwind_frame ("_evalfile");
+ else
+ {
+ if (flags & FEVAL_NONINT)
+ interactive = old_interactive;
+ return_catch_flag--;
+ sourcelevel--;
+ COPY_PROCENV (old_return_catch, return_catch);
+ }
+
+#if defined (ARRAY_VARS)
+ /* These two variables cannot be unset, and cannot be affected by the
+ sourced file. */
+ array_pop (bash_source_a);
+ array_pop (bash_lineno_a);
+
+ /* FUNCNAME can be unset, and so can potentially be changed by the
+ sourced file. */
+ GET_ARRAY_FROM_VAR ("FUNCNAME", nfv, funcname_a);
+ if (nfv == funcname_v)
+ array_pop (funcname_a);
+# if defined (DEBUGGER)
+ if ((flags & FEVAL_NOPUSHARGS) == 0)
+ {
+ array_pop (bash_argc_a);
+ array_pop (bash_argv_a);
+ }
+# endif
+#endif
+
+ return ((flags & FEVAL_BUILTIN) ? result : 1);
+}
+
+int
+maybe_execute_file (fname, force_noninteractive)
+ const char *fname;
+ int force_noninteractive;
+{
+ char *filename;
+ int result, flags;
+
+ filename = bash_tilde_expand (fname, 0);
+ flags = FEVAL_ENOENTOK;
+ if (force_noninteractive)
+ flags |= FEVAL_NONINT;
+ result = _evalfile (filename, flags);
+ free (filename);
+ return result;
+}
+
+#if defined (HISTORY)
+int
+fc_execute_file (filename)
+ const char *filename;
+{
+ int flags;
+
+ /* We want these commands to show up in the history list if
+ remember_on_history is set. */
+ flags = FEVAL_ENOENTOK|FEVAL_HISTORY|FEVAL_REGFILE;
+ return (_evalfile (filename, flags));
+}
+#endif /* HISTORY */
+
+int
+source_file (filename, sflags)
+ const char *filename;
+ int sflags;
+{
+ int flags, rval;
+
+ flags = FEVAL_BUILTIN|FEVAL_UNWINDPROT|FEVAL_NONINT;
+ if (sflags)
+ flags |= FEVAL_NOPUSHARGS;
+ /* POSIX shells exit if non-interactive and file error. */
+ if (posixly_correct && !interactive_shell)
+ flags |= FEVAL_LONGJMP;
+ rval = _evalfile (filename, flags);
+
+ run_return_trap ();
+ return rval;
+}
diff --git a/builtins/evalstring.c b/builtins/evalstring.c
new file mode 100644
index 0000000..40abe00
--- /dev/null
+++ b/builtins/evalstring.c
@@ -0,0 +1,512 @@
+/* evalstring.c - evaluate a string as one or more shell commands.
+
+/* Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <signal.h>
+
+#include <errno.h>
+
+#include "filecntl.h"
+#include "../bashansi.h"
+
+#include "../shell.h"
+#include "../jobs.h"
+#include "../builtins.h"
+#include "../flags.h"
+#include "../input.h"
+#include "../execute_cmd.h"
+#include "../redir.h"
+#include "../trap.h"
+#include "../bashintl.h"
+
+#include <y.tab.h>
+
+#if defined (HISTORY)
+# include "../bashhist.h"
+#endif
+
+#include "common.h"
+#include "builtext.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+#define IS_BUILTIN(s) (builtin_address_internal(s, 0) != (struct builtin *)NULL)
+
+extern int indirection_level, subshell_environment;
+extern int line_number;
+extern int current_token, shell_eof_token;
+extern int last_command_exit_value;
+extern int running_trap;
+extern int loop_level;
+extern int executing_list;
+extern int comsub_ignore_return;
+extern int posixly_correct;
+extern sh_builtin_func_t *this_shell_builtin;
+
+int parse_and_execute_level = 0;
+
+static int cat_file __P((REDIRECT *));
+
+#define PE_TAG "parse_and_execute top"
+#define PS_TAG "parse_string top"
+
+#if defined (HISTORY)
+static void
+set_history_remembering ()
+{
+ remember_on_history = enable_history_list;
+}
+#endif
+
+/* How to force parse_and_execute () to clean up after itself. */
+void
+parse_and_execute_cleanup ()
+{
+ if (running_trap)
+ {
+ run_trap_cleanup (running_trap - 1);
+ unfreeze_jobs_list ();
+ }
+
+ if (have_unwind_protects ())
+ run_unwind_frame (PE_TAG);
+ else
+ parse_and_execute_level = 0; /* XXX */
+}
+
+static void
+parse_prologue (string, flags, tag)
+ char *string;
+ int flags;
+ char *tag;
+{
+ char *orig_string;
+ int x;
+
+ orig_string = string;
+ /* Unwind protect this invocation of parse_and_execute (). */
+ begin_unwind_frame (tag);
+ unwind_protect_int (parse_and_execute_level);
+ unwind_protect_jmp_buf (top_level);
+ unwind_protect_int (indirection_level);
+ unwind_protect_int (line_number);
+ unwind_protect_int (loop_level);
+ unwind_protect_int (executing_list);
+ unwind_protect_int (comsub_ignore_return);
+ if (flags & (SEVAL_NONINT|SEVAL_INTERACT))
+ unwind_protect_int (interactive);
+
+#if defined (HISTORY)
+ if (parse_and_execute_level == 0)
+ add_unwind_protect (set_history_remembering, (char *)NULL);
+ else
+ unwind_protect_int (remember_on_history); /* can be used in scripts */
+# if defined (BANG_HISTORY)
+ if (interactive_shell)
+ unwind_protect_int (history_expansion_inhibited);
+# endif /* BANG_HISTORY */
+#endif /* HISTORY */
+
+ if (interactive_shell)
+ {
+ x = get_current_prompt_level ();
+ add_unwind_protect (set_current_prompt_level, x);
+ }
+
+ add_unwind_protect (pop_stream, (char *)NULL);
+ if (orig_string && ((flags & SEVAL_NOFREE) == 0))
+ add_unwind_protect (xfree, orig_string);
+ end_unwind_frame ();
+
+ if (flags & (SEVAL_NONINT|SEVAL_INTERACT))
+ interactive = (flags & SEVAL_NONINT) ? 0 : 1;
+
+#if defined (HISTORY)
+ if (flags & SEVAL_NOHIST)
+ bash_history_disable ();
+#endif /* HISTORY */
+}
+
+/* Parse and execute the commands in STRING. Returns whatever
+ execute_command () returns. This frees STRING. FLAGS is a
+ flags word; look in common.h for the possible values. Actions
+ are:
+ (flags & SEVAL_NONINT) -> interactive = 0;
+ (flags & SEVAL_INTERACT) -> interactive = 1;
+ (flags & SEVAL_NOHIST) -> call bash_history_disable ()
+ (flags & SEVAL_NOFREE) -> don't free STRING when finished
+ (flags & SEVAL_RESETLINE) -> reset line_number to 1
+*/
+
+int
+parse_and_execute (string, from_file, flags)
+ char *string;
+ const char *from_file;
+ int flags;
+{
+ int code, lreset;
+ volatile int should_jump_to_top_level, last_result;
+ COMMAND *volatile command;
+
+ parse_prologue (string, flags, PE_TAG);
+
+ parse_and_execute_level++;
+
+ lreset = flags & SEVAL_RESETLINE;
+
+ /* Reset the line number if the caller wants us to. If we don't reset the
+ line number, we have to subtract one, because we will add one just
+ before executing the next command (resetting the line number sets it to
+ 0; the first line number is 1). */
+ push_stream (lreset);
+ if (lreset == 0)
+ line_number--;
+
+ indirection_level++;
+
+ code = should_jump_to_top_level = 0;
+ last_result = EXECUTION_SUCCESS;
+
+ with_input_from_string (string, from_file);
+ while (*(bash_input.location.string))
+ {
+ command = (COMMAND *)NULL;
+
+ if (interrupt_state)
+ {
+ last_result = EXECUTION_FAILURE;
+ break;
+ }
+
+ /* Provide a location for functions which `longjmp (top_level)' to
+ jump to. This prevents errors in substitution from restarting
+ the reader loop directly, for example. */
+ code = setjmp (top_level);
+
+ if (code)
+ {
+ should_jump_to_top_level = 0;
+ switch (code)
+ {
+ case FORCE_EOF:
+ case ERREXIT:
+ case EXITPROG:
+ if (command)
+ run_unwind_frame ("pe_dispose");
+ /* Remember to call longjmp (top_level) after the old
+ value for it is restored. */
+ should_jump_to_top_level = 1;
+ goto out;
+
+ case DISCARD:
+ if (command)
+ run_unwind_frame ("pe_dispose");
+ last_result = last_command_exit_value = EXECUTION_FAILURE; /* XXX */
+ if (subshell_environment)
+ {
+ should_jump_to_top_level = 1;
+ goto out;
+ }
+ else
+ {
+#if 0
+ dispose_command (command); /* pe_dispose does this */
+#endif
+ continue;
+ }
+
+ default:
+ command_error ("parse_and_execute", CMDERR_BADJUMP, code, 0);
+ break;
+ }
+ }
+
+ if (parse_command () == 0)
+ {
+ if ((flags & SEVAL_PARSEONLY) || (interactive_shell == 0 && read_but_dont_execute))
+ {
+ last_result = EXECUTION_SUCCESS;
+ dispose_command (global_command);
+ global_command = (COMMAND *)NULL;
+ }
+ else if (command = global_command)
+ {
+ struct fd_bitmap *bitmap;
+
+ bitmap = new_fd_bitmap (FD_BITMAP_SIZE);
+ begin_unwind_frame ("pe_dispose");
+ add_unwind_protect (dispose_fd_bitmap, bitmap);
+ add_unwind_protect (dispose_command, command); /* XXX */
+
+ global_command = (COMMAND *)NULL;
+
+ if ((subshell_environment & SUBSHELL_COMSUB) && comsub_ignore_return)
+ command->flags |= CMD_IGNORE_RETURN;
+
+#if defined (ONESHOT)
+ /*
+ * IF
+ * we were invoked as `bash -c' (startup_state == 2) AND
+ * parse_and_execute has not been called recursively AND
+ * we're not running a trap AND
+ * we have parsed the full command (string == '\0') AND
+ * we're not going to run the exit trap AND
+ * we have a simple command without redirections AND
+ * the command is not being timed AND
+ * the command's return status is not being inverted
+ * THEN
+ * tell the execution code that we don't need to fork
+ */
+ if (startup_state == 2 && parse_and_execute_level == 1 &&
+ running_trap == 0 &&
+ *bash_input.location.string == '\0' &&
+ command->type == cm_simple &&
+ signal_is_trapped (EXIT_TRAP) == 0 &&
+ command->redirects == 0 && command->value.Simple->redirects == 0 &&
+ ((command->flags & CMD_TIME_PIPELINE) == 0) &&
+ ((command->flags & CMD_INVERT_RETURN) == 0))
+ {
+ command->flags |= CMD_NO_FORK;
+ command->value.Simple->flags |= CMD_NO_FORK;
+ }
+#endif /* ONESHOT */
+
+ /* See if this is a candidate for $( <file ). */
+ if (startup_state == 2 &&
+ (subshell_environment & SUBSHELL_COMSUB) &&
+ *bash_input.location.string == '\0' &&
+ command->type == cm_simple && !command->redirects &&
+ (command->flags & CMD_TIME_PIPELINE) == 0 &&
+ command->value.Simple->words == 0 &&
+ command->value.Simple->redirects &&
+ command->value.Simple->redirects->next == 0 &&
+ command->value.Simple->redirects->instruction == r_input_direction)
+ {
+ int r;
+ r = cat_file (command->value.Simple->redirects);
+ last_result = (r < 0) ? EXECUTION_FAILURE : EXECUTION_SUCCESS;
+ }
+ else
+ last_result = execute_command_internal
+ (command, 0, NO_PIPE, NO_PIPE, bitmap);
+
+ dispose_command (command);
+ dispose_fd_bitmap (bitmap);
+ discard_unwind_frame ("pe_dispose");
+ }
+ }
+ else
+ {
+ last_result = EXECUTION_FAILURE;
+
+ if (interactive_shell == 0 && this_shell_builtin &&
+ (this_shell_builtin == source_builtin || this_shell_builtin == eval_builtin) &&
+ last_command_exit_value == EX_BADSYNTAX && posixly_correct)
+ {
+#if 0 /* XXX - for bash-4.2 */
+ should_jump_to_top_level = 1;
+ code = ERREXIT;
+ last_command_exit_value = EX_BADUSAGE;
+#else
+ internal_warning (_("syntax errors in . or eval will cause future versions of the shell to abort as Posix requires"));
+#endif
+ }
+
+ /* Since we are shell compatible, syntax errors in a script
+ abort the execution of the script. Right? */
+ break;
+ }
+ }
+
+ out:
+
+ run_unwind_frame (PE_TAG);
+
+ if (interrupt_state && parse_and_execute_level == 0)
+ {
+ /* An interrupt during non-interactive execution in an
+ interactive shell (e.g. via $PROMPT_COMMAND) should
+ not cause the shell to exit. */
+ interactive = interactive_shell;
+ throw_to_top_level ();
+ }
+
+ if (should_jump_to_top_level)
+ jump_to_top_level (code);
+
+ return (last_result);
+}
+
+/* Parse a command contained in STRING according to FLAGS and return the
+ number of characters consumed from the string. If non-NULL, set *ENDP
+ to the position in the string where the parse ended. Used to validate
+ command substitutions during parsing to obey Posix rules about finding
+ the end of the command and balancing parens. */
+int
+parse_string (string, from_file, flags, endp)
+ char *string;
+ const char *from_file;
+ int flags;
+ char **endp;
+{
+ int code, nc;
+ volatile int should_jump_to_top_level;
+ COMMAND *volatile command, *oglobal;
+ char *ostring;
+
+ parse_prologue (string, flags, PS_TAG);
+
+ /* Reset the line number if the caller wants us to. If we don't reset the
+ line number, we have to subtract one, because we will add one just
+ before executing the next command (resetting the line number sets it to
+ 0; the first line number is 1). */
+ push_stream (0);
+
+ code = should_jump_to_top_level = 0;
+ oglobal = global_command;
+ ostring = string;
+
+ with_input_from_string (string, from_file);
+ while (*(bash_input.location.string))
+ {
+ command = (COMMAND *)NULL;
+
+#if 0
+ if (interrupt_state)
+ break;
+#endif
+
+ /* Provide a location for functions which `longjmp (top_level)' to
+ jump to. */
+ code = setjmp (top_level);
+
+ if (code)
+ {
+#if defined (DEBUG)
+itrace("parse_string: longjmp executed: code = %d", code);
+#endif
+ should_jump_to_top_level = 0;
+ switch (code)
+ {
+ case FORCE_EOF:
+ case ERREXIT:
+ case EXITPROG:
+ case DISCARD: /* XXX */
+ if (command)
+ dispose_command (command);
+ /* Remember to call longjmp (top_level) after the old
+ value for it is restored. */
+ should_jump_to_top_level = 1;
+ goto out;
+
+ default:
+ command_error ("parse_string", CMDERR_BADJUMP, code, 0);
+ break;
+ }
+ }
+
+ if (parse_command () == 0)
+ {
+ dispose_command (global_command);
+ global_command = (COMMAND *)NULL;
+ }
+ else
+ {
+ if ((flags & SEVAL_NOLONGJMP) == 0)
+ {
+ should_jump_to_top_level = 1;
+ code = DISCARD;
+ }
+ else
+ reset_parser (); /* XXX - sets token_to_read */
+ break;
+ }
+
+ if (current_token == yacc_EOF || current_token == shell_eof_token)
+ break;
+ }
+
+ out:
+
+ global_command = oglobal;
+ nc = bash_input.location.string - ostring;
+ if (endp)
+ *endp = bash_input.location.string;
+
+ run_unwind_frame (PS_TAG);
+
+ if (should_jump_to_top_level)
+ jump_to_top_level (code);
+
+ return (nc);
+}
+
+/* Handle a $( < file ) command substitution. This expands the filename,
+ returning errors as appropriate, then just cats the file to the standard
+ output. */
+static int
+cat_file (r)
+ REDIRECT *r;
+{
+ char *fn;
+ int fd, rval;
+
+ if (r->instruction != r_input_direction)
+ return -1;
+
+ /* Get the filename. */
+ if (posixly_correct && !interactive_shell)
+ disallow_filename_globbing++;
+ fn = redirection_expand (r->redirectee.filename);
+ if (posixly_correct && !interactive_shell)
+ disallow_filename_globbing--;
+
+ if (fn == 0)
+ {
+ redirection_error (r, AMBIGUOUS_REDIRECT);
+ return -1;
+ }
+
+ fd = open(fn, O_RDONLY);
+ if (fd < 0)
+ {
+ file_error (fn);
+ free (fn);
+ return -1;
+ }
+
+ rval = zcatfd (fd, 1, fn);
+
+ free (fn);
+ close (fd);
+
+ return (rval);
+}
diff --git a/builtins/exec.def b/builtins/exec.def
new file mode 100644
index 0000000..0837a98
--- /dev/null
+++ b/builtins/exec.def
@@ -0,0 +1,236 @@
+This file is exec.def, from which is created exec.c.
+It implements the builtin "exec" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES exec.c
+
+$BUILTIN exec
+$FUNCTION exec_builtin
+$SHORT_DOC exec [-cl] [-a name] [command [arguments ...]] [redirection ...]
+Replace the shell with the given command.
+
+Execute COMMAND, replacing this shell with the specified program.
+ARGUMENTS become the arguments to COMMAND. If COMMAND is not specified,
+any redirections take effect in the current shell.
+
+Options:
+ -a name pass NAME as the zeroth argument to COMMAND
+ -c execute COMMAND with an empty environment
+ -l place a dash in the zeroth argument to COMMAND
+
+If the command cannot be executed, a non-interactive shell exits, unless
+the shell option `execfail' is set.
+
+Exit Status:
+Returns success unless COMMAND is not found or a redirection error occurs.
+$END
+
+#include <config.h>
+
+#include "../bashtypes.h"
+#include "posixstat.h"
+#include <signal.h>
+#include <errno.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../execute_cmd.h"
+#include "../findcmd.h"
+#if defined (JOB_CONTROL)
+# include "../jobs.h"
+#endif
+#include "../flags.h"
+#include "../trap.h"
+#if defined (HISTORY)
+# include "../bashhist.h"
+#endif
+#include "common.h"
+#include "bashgetopt.h"
+
+/* Not all systems declare ERRNO in errno.h... and some systems #define it! */
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+extern int subshell_environment;
+extern REDIRECT *redirection_undo_list;
+
+int no_exit_on_failed_exec;
+
+/* If the user wants this to look like a login shell, then
+ prepend a `-' onto NAME and return the new name. */
+static char *
+mkdashname (name)
+ char *name;
+{
+ char *ret;
+
+ ret = (char *)xmalloc (2 + strlen (name));
+ ret[0] = '-';
+ strcpy (ret + 1, name);
+ return ret;
+}
+
+int
+exec_builtin (list)
+ WORD_LIST *list;
+{
+ int exit_value = EXECUTION_FAILURE;
+ int cleanenv, login, opt;
+ char *argv0, *command, **args, **env, *newname, *com2;
+
+ cleanenv = login = 0;
+ argv0 = (char *)NULL;
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "cla:")) != -1)
+ {
+ switch (opt)
+ {
+ case 'c':
+ cleanenv = 1;
+ break;
+ case 'l':
+ login = 1;
+ break;
+ case 'a':
+ argv0 = list_optarg;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ /* First, let the redirections remain. */
+ dispose_redirects (redirection_undo_list);
+ redirection_undo_list = (REDIRECT *)NULL;
+
+ if (list == 0)
+ return (EXECUTION_SUCCESS);
+
+#if defined (RESTRICTED_SHELL)
+ if (restricted)
+ {
+ sh_restricted ((char *)NULL);
+ return (EXECUTION_FAILURE);
+ }
+#endif /* RESTRICTED_SHELL */
+
+ args = strvec_from_word_list (list, 1, 0, (int *)NULL);
+
+ /* A command with a slash anywhere in its name is not looked up in $PATH. */
+ command = absolute_program (args[0]) ? args[0] : search_for_command (args[0]);
+
+ if (command == 0)
+ {
+ sh_notfound (args[0]);
+ exit_value = EX_NOTFOUND; /* As per Posix.2, 3.14.6 */
+ goto failed_exec;
+ }
+
+ com2 = full_pathname (command);
+ if (com2)
+ {
+ if (command != args[0])
+ free (command);
+ command = com2;
+ }
+
+ if (argv0)
+ {
+ free (args[0]);
+ args[0] = login ? mkdashname (argv0) : savestring (argv0);
+ }
+ else if (login)
+ {
+ newname = mkdashname (args[0]);
+ free (args[0]);
+ args[0] = newname;
+ }
+
+ /* Decrement SHLVL by 1 so a new shell started here has the same value,
+ preserving the appearance. After we do that, we need to change the
+ exported environment to include the new value. */
+ if (cleanenv == 0)
+ adjust_shell_level (-1);
+
+ if (cleanenv)
+ env = (char **)NULL;
+ else
+ {
+ maybe_make_export_env ();
+ env = export_env;
+ }
+
+#if defined (HISTORY)
+ if (interactive_shell && subshell_environment == 0)
+ maybe_save_shell_history ();
+#endif /* HISTORY */
+
+ restore_original_signals ();
+
+#if defined (JOB_CONTROL)
+ if (subshell_environment == 0)
+ end_job_control ();
+#endif /* JOB_CONTROL */
+
+ shell_execve (command, args, env);
+
+ /* We have to set this to NULL because shell_execve has called realloc()
+ to stuff more items at the front of the array, which may have caused
+ the memory to be freed by realloc(). We don't want to free it twice. */
+ args = (char **)NULL;
+ if (cleanenv == 0)
+ adjust_shell_level (1);
+
+ if (executable_file (command) == 0)
+ {
+ builtin_error (_("%s: cannot execute: %s"), command, strerror (errno));
+ exit_value = EX_NOEXEC; /* As per Posix.2, 3.14.6 */
+ }
+ else
+ file_error (command);
+
+failed_exec:
+ FREE (command);
+
+ if (subshell_environment || (interactive == 0 && no_exit_on_failed_exec == 0))
+ exit_shell (exit_value);
+
+ if (args)
+ strvec_dispose (args);
+
+ initialize_traps ();
+ initialize_signals (1);
+
+#if defined (JOB_CONTROL)
+ if (interactive_shell || job_control)
+ restart_job_control ();
+#endif /* JOB_CONTROL */
+
+ return (exit_value);
+}
diff --git a/builtins/exit.def b/builtins/exit.def
new file mode 100644
index 0000000..34728eb
--- /dev/null
+++ b/builtins/exit.def
@@ -0,0 +1,168 @@
+This file is exit.def, from which is created exit.c.
+It implements the builtins "exit", and "logout" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES exit.c
+
+$BUILTIN exit
+$FUNCTION exit_builtin
+$SHORT_DOC exit [n]
+Exit the shell.
+
+Exits the shell with a status of N. If N is omitted, the exit status
+is that of the last command executed.
+$END
+
+#include <config.h>
+
+#include "../bashtypes.h"
+#include <stdio.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../jobs.h"
+
+#include "common.h"
+#include "builtext.h" /* for jobs_builtin */
+
+extern int check_jobs_at_exit;
+extern int last_command_exit_value;
+extern int running_trap, trap_saved_exit_value;
+extern int subshell_environment;
+extern sh_builtin_func_t *this_shell_builtin;
+extern sh_builtin_func_t *last_shell_builtin;
+
+static int exit_or_logout __P((WORD_LIST *));
+static int sourced_logout;
+
+int
+exit_builtin (list)
+ WORD_LIST *list;
+{
+ if (interactive)
+ {
+ fprintf (stderr, login_shell ? _("logout\n") : "exit\n");
+ fflush (stderr);
+ }
+
+ return (exit_or_logout (list));
+}
+
+$BUILTIN logout
+$FUNCTION logout_builtin
+$SHORT_DOC logout [n]
+Exit a login shell.
+
+Exits a login shell with exit status N. Returns an error if not executed
+in a login shell.
+$END
+
+/* How to logout. */
+int
+logout_builtin (list)
+ WORD_LIST *list;
+{
+ if (login_shell == 0 /* && interactive */)
+ {
+ builtin_error (_("not login shell: use `exit'"));
+ return (EXECUTION_FAILURE);
+ }
+ else
+ return (exit_or_logout (list));
+}
+
+static int
+exit_or_logout (list)
+ WORD_LIST *list;
+{
+ int exit_value;
+
+#if defined (JOB_CONTROL)
+ int exit_immediate_okay, stopmsg;
+
+ exit_immediate_okay = (interactive == 0 ||
+ last_shell_builtin == exit_builtin ||
+ last_shell_builtin == logout_builtin ||
+ last_shell_builtin == jobs_builtin);
+
+ /* Check for stopped jobs if the user wants to. */
+ if (exit_immediate_okay == 0)
+ {
+ register int i;
+ for (i = stopmsg = 0; i < js.j_jobslots; i++)
+ if (jobs[i] && STOPPED (i))
+ stopmsg = JSTOPPED;
+ else if (check_jobs_at_exit && stopmsg == 0 && jobs[i] && RUNNING (i))
+ stopmsg = JRUNNING;
+
+ if (stopmsg == JSTOPPED)
+ fprintf (stderr, _("There are stopped jobs.\n"));
+ else if (stopmsg == JRUNNING)
+ fprintf (stderr, _("There are running jobs.\n"));
+
+ if (stopmsg && check_jobs_at_exit)
+ list_all_jobs (JLIST_STANDARD);
+
+ if (stopmsg)
+ {
+ /* This is NOT superfluous because EOF can get here without
+ going through the command parser. Set both last and this
+ so that either `exit', `logout', or ^D will work to exit
+ immediately if nothing intervenes. */
+ this_shell_builtin = last_shell_builtin = exit_builtin;
+ return (EXECUTION_FAILURE);
+ }
+ }
+#endif /* JOB_CONTROL */
+
+ /* Get return value if present. This means that you can type
+ `logout 5' to a shell, and it returns 5. */
+
+ /* If we're running the exit trap (running_trap == 1, since running_trap
+ gets set to SIG+1), and we don't have a argument given to `exit'
+ (list == 0), use the exit status we saved before running the trap
+ commands (trap_saved_exit_value). */
+ exit_value = (running_trap == 1 && list == 0) ? trap_saved_exit_value : get_exitstat (list);
+
+ bash_logout ();
+
+ last_command_exit_value = exit_value;
+
+ /* Exit the program. */
+ jump_to_top_level (EXITPROG);
+ /*NOTREACHED*/
+}
+
+void
+bash_logout ()
+{
+ /* Run our `~/.bash_logout' file if it exists, and this is a login shell. */
+ if (login_shell && sourced_logout++ == 0 && subshell_environment == 0)
+ {
+ maybe_execute_file ("~/.bash_logout", 1);
+#ifdef SYS_BASH_LOGOUT
+ maybe_execute_file (SYS_BASH_LOGOUT, 1);
+#endif
+ }
+}
diff --git a/builtins/fc.def b/builtins/fc.def
new file mode 100644
index 0000000..a378d9d
--- /dev/null
+++ b/builtins/fc.def
@@ -0,0 +1,665 @@
+This file is fc.def, from which is created fc.c.
+It implements the builtin "fc" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES fc.c
+
+$BUILTIN fc
+$FUNCTION fc_builtin
+$DEPENDS_ON HISTORY
+$SHORT_DOC fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]
+Display or execute commands from the history list.
+
+fc is used to list or edit and re-execute commands from the history list.
+FIRST and LAST can be numbers specifying the range, or FIRST can be a
+string, which means the most recent command beginning with that
+string.
+
+Options:
+ -e ENAME select which editor to use. Default is FCEDIT, then EDITOR,
+ then vi
+ -l list lines instead of editing
+ -n omit line numbers when listing
+ -r reverse the order of the lines (newest listed first)
+
+With the `fc -s [pat=rep ...] [command]' format, COMMAND is
+re-executed after the substitution OLD=NEW is performed.
+
+A useful alias to use with this is r='fc -s', so that typing `r cc'
+runs the last command beginning with `cc' and typing `r' re-executes
+the last command.
+
+Exit Status:
+Returns success or status of executed command; non-zero if an error occurs.
+$END
+
+#include <config.h>
+
+#if defined (HISTORY)
+#ifndef _MINIX
+# include <sys/param.h>
+#endif
+#include "../bashtypes.h"
+#include "posixstat.h"
+#if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <chartypes.h>
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+#include <errno.h>
+
+#include "../shell.h"
+#include "../builtins.h"
+#include "../flags.h"
+#include "../bashhist.h"
+#include "maxpath.h"
+#include <readline/history.h>
+#include "bashgetopt.h"
+#include "common.h"
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+extern int current_command_line_count;
+extern int literal_history;
+extern int posixly_correct;
+extern int subshell_environment, interactive_shell;
+
+extern int unlink __P((const char *));
+
+extern FILE *sh_mktmpfp __P((char *, int, char **));
+
+/* **************************************************************** */
+/* */
+/* The K*rn shell style fc command (Fix Command) */
+/* */
+/* **************************************************************** */
+
+/* fc builtin command (fix command) for Bash for those who
+ like K*rn-style history better than csh-style.
+
+ fc [-e ename] [-nlr] [first] [last]
+
+ FIRST and LAST can be numbers specifying the range, or FIRST can be
+ a string, which means the most recent command beginning with that
+ string.
+
+ -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR,
+ then the editor which corresponds to the current readline editing
+ mode, then vi.
+
+ -l means list lines instead of editing.
+ -n means no line numbers listed.
+ -r means reverse the order of the lines (making it newest listed first).
+
+ fc -e - [pat=rep ...] [command]
+ fc -s [pat=rep ...] [command]
+
+ Equivalent to !command:sg/pat/rep execpt there can be multiple PAT=REP's.
+*/
+
+/* Data structure describing a list of global replacements to perform. */
+typedef struct repl {
+ struct repl *next;
+ char *pat;
+ char *rep;
+} REPL;
+
+/* Accessors for HIST_ENTRY lists that are called HLIST. */
+#define histline(i) (hlist[(i)]->line)
+#define histdata(i) (hlist[(i)]->data)
+
+#define FREE_RLIST() \
+ do { \
+ for (rl = rlist; rl; ) { \
+ REPL *r; \
+ r = rl->next; \
+ if (rl->pat) \
+ free (rl->pat); \
+ if (rl->rep) \
+ free (rl->rep); \
+ free (rl); \
+ rl = r; \
+ } \
+ } while (0)
+
+static char *fc_dosubs __P((char *, REPL *));
+static char *fc_gethist __P((char *, HIST_ENTRY **));
+static int fc_gethnum __P((char *, HIST_ENTRY **));
+static int fc_number __P((WORD_LIST *));
+static void fc_replhist __P((char *));
+#ifdef INCLUDE_UNUSED
+static char *fc_readline __P((FILE *));
+static void fc_addhist __P((char *));
+#endif
+
+/* String to execute on a file that we want to edit. */
+#define FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-vi}}"
+#if defined (STRICT_POSIX)
+# define POSIX_FC_EDIT_COMMAND "${FCEDIT:-ed}"
+#else
+# define POSIX_FC_EDIT_COMMAND "${FCEDIT:-${EDITOR:-ed}}"
+#endif
+
+int
+fc_builtin (list)
+ WORD_LIST *list;
+{
+ register int i;
+ register char *sep;
+ int numbering, reverse, listing, execute;
+ int histbeg, histend, last_hist, retval, opt, rh;
+ FILE *stream;
+ REPL *rlist, *rl;
+ char *ename, *command, *newcom, *fcedit;
+ HIST_ENTRY **hlist;
+ char *fn;
+
+ numbering = 1;
+ reverse = listing = execute = 0;
+ ename = (char *)NULL;
+
+ /* Parse out the options and set which of the two forms we're in. */
+ reset_internal_getopt ();
+ lcurrent = list; /* XXX */
+ while (fc_number (loptend = lcurrent) == 0 &&
+ (opt = internal_getopt (list, ":e:lnrs")) != -1)
+ {
+ switch (opt)
+ {
+ case 'n':
+ numbering = 0;
+ break;
+
+ case 'l':
+ listing = 1;
+ break;
+
+ case 'r':
+ reverse = 1;
+ break;
+
+ case 's':
+ execute = 1;
+ break;
+
+ case 'e':
+ ename = list_optarg;
+ break;
+
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+
+ list = loptend;
+
+ if (ename && (*ename == '-') && (ename[1] == '\0'))
+ execute = 1;
+
+ /* The "execute" form of the command (re-run, with possible string
+ substitutions). */
+ if (execute)
+ {
+ rlist = (REPL *)NULL;
+ while (list && ((sep = (char *)strchr (list->word->word, '=')) != NULL))
+ {
+ *sep++ = '\0';
+ rl = (REPL *)xmalloc (sizeof (REPL));
+ rl->next = (REPL *)NULL;
+ rl->pat = savestring (list->word->word);
+ rl->rep = savestring (sep);
+
+ if (rlist == NULL)
+ rlist = rl;
+ else
+ {
+ rl->next = rlist;
+ rlist = rl;
+ }
+ list = list->next;
+ }
+
+ /* If we have a list of substitutions to do, then reverse it
+ to get the replacements in the proper order. */
+
+ rlist = REVERSE_LIST (rlist, REPL *);
+
+ hlist = history_list ();
+
+ /* If we still have something in list, it is a command spec.
+ Otherwise, we use the most recent command in time. */
+ command = fc_gethist (list ? list->word->word : (char *)NULL, hlist);
+
+ if (command == NULL)
+ {
+ builtin_error (_("no command found"));
+ if (rlist)
+ FREE_RLIST ();
+
+ return (EXECUTION_FAILURE);
+ }
+
+ if (rlist)
+ {
+ newcom = fc_dosubs (command, rlist);
+ free (command);
+ FREE_RLIST ();
+ command = newcom;
+ }
+
+ fprintf (stderr, "%s\n", command);
+ fc_replhist (command); /* replace `fc -s' with command */
+ /* Posix says that the re-executed commands should be entered into the
+ history. */
+ return (parse_and_execute (command, "fc", SEVAL_NOHIST));
+ }
+
+ /* This is the second form of the command (the list-or-edit-and-rerun
+ form). */
+ hlist = history_list ();
+ if (hlist == 0)
+ return (EXECUTION_SUCCESS);
+ for (i = 0; hlist[i]; i++);
+
+ /* With the Bash implementation of history, the current command line
+ ("fc blah..." and so on) is already part of the history list by
+ the time we get to this point. This just skips over that command
+ and makes the last command that this deals with be the last command
+ the user entered before the fc. We need to check whether the
+ line was actually added (HISTIGNORE may have caused it to not be),
+ so we check hist_last_line_added. */
+
+ /* Even though command substitution through parse_and_execute turns off
+ remember_on_history, command substitution in a shell when set -o history
+ has been enabled (interactive or not) should use it in the last_hist
+ calculation as if it were on. */
+ rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list);
+ last_hist = i - rh - hist_last_line_added;
+
+ if (list)
+ {
+ histbeg = fc_gethnum (list->word->word, hlist);
+ list = list->next;
+
+ if (list)
+ histend = fc_gethnum (list->word->word, hlist);
+ else
+ histend = listing ? last_hist : histbeg;
+ }
+ else
+ {
+ /* The default for listing is the last 16 history items. */
+ if (listing)
+ {
+ histend = last_hist;
+ histbeg = histend - 16 + 1; /* +1 because loop below uses >= */
+ if (histbeg < 0)
+ histbeg = 0;
+ }
+ else
+ /* For editing, it is the last history command. */
+ histbeg = histend = last_hist;
+ }
+
+ /* "When not listing, the fc command that caused the editing shall not be
+ entered into the history list." */
+ if (listing == 0 && hist_last_line_added)
+ {
+ bash_delete_last_history ();
+ /* If we're editing a single command -- the last command in the
+ history -- and we just removed the dummy command added by
+ edit_and_execute_command (), we need to check whether or not we
+ just removed the last command in the history and need to back
+ the pointer up. remember_on_history is off because we're running
+ in parse_and_execute(). */
+ if (histbeg == histend && histend == last_hist && hlist[last_hist] == 0)
+ last_hist = histbeg = --histend;
+ }
+
+ /* We print error messages for line specifications out of range. */
+ if ((histbeg < 0) || (histend < 0))
+ {
+ sh_erange ((char *)NULL, _("history specification"));
+ return (EXECUTION_FAILURE);
+ }
+
+ if (histend < histbeg)
+ {
+ i = histend;
+ histend = histbeg;
+ histbeg = i;
+
+ reverse = 1;
+ }
+
+ if (listing)
+ stream = stdout;
+ else
+ {
+ numbering = 0;
+ stream = sh_mktmpfp ("bash-fc", MT_USERANDOM|MT_USETMPDIR, &fn);
+ if (stream == 0)
+ {
+ builtin_error (_("%s: cannot open temp file: %s"), fn ? fn : "", strerror (errno));
+ FREE (fn);
+ return (EXECUTION_FAILURE);
+ }
+ }
+
+ for (i = reverse ? histend : histbeg; reverse ? i >= histbeg : i <= histend; reverse ? i-- : i++)
+ {
+ QUIT;
+ if (numbering)
+ fprintf (stream, "%d", i + history_base);
+ if (listing)
+ {
+ if (posixly_correct)
+ fputs ("\t", stream);
+ else
+ fprintf (stream, "\t%c", histdata (i) ? '*' : ' ');
+ }
+ fprintf (stream, "%s\n", histline (i));
+ }
+
+ if (listing)
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+
+ fflush (stream);
+ if (ferror (stream))
+ {
+ sh_wrerror ();
+ fclose (stream);
+ return (EXECUTION_FAILURE);
+ }
+ fclose (stream);
+
+ /* Now edit the file of commands. */
+ if (ename)
+ {
+ command = (char *)xmalloc (strlen (ename) + strlen (fn) + 2);
+ sprintf (command, "%s %s", ename, fn);
+ }
+ else
+ {
+ fcedit = posixly_correct ? POSIX_FC_EDIT_COMMAND : FC_EDIT_COMMAND;
+ command = (char *)xmalloc (3 + strlen (fcedit) + strlen (fn));
+ sprintf (command, "%s %s", fcedit, fn);
+ }
+ retval = parse_and_execute (command, "fc", SEVAL_NOHIST);
+ if (retval != EXECUTION_SUCCESS)
+ {
+ unlink (fn);
+ free (fn);
+ return (EXECUTION_FAILURE);
+ }
+
+ /* Make sure parse_and_execute doesn't turn this off, even though a
+ call to parse_and_execute farther up the function call stack (e.g.,
+ if this is called by vi_edit_and_execute_command) may have already
+ called bash_history_disable. */
+ remember_on_history = 1;
+
+ /* Turn on the `v' flag while fc_execute_file runs so the commands
+ will be echoed as they are read by the parser. */
+ begin_unwind_frame ("fc builtin");
+ add_unwind_protect ((Function *)xfree, fn);
+ add_unwind_protect (unlink, fn);
+ unwind_protect_int (echo_input_at_read);
+ echo_input_at_read = 1;
+
+ retval = fc_execute_file (fn);
+
+ run_unwind_frame ("fc builtin");
+
+ return (retval);
+}
+
+/* Return 1 if LIST->word->word is a legal number for fc's use. */
+static int
+fc_number (list)
+ WORD_LIST *list;
+{
+ char *s;
+
+ if (list == 0)
+ return 0;
+ s = list->word->word;
+ if (*s == '-')
+ s++;
+ return (legal_number (s, (intmax_t *)NULL));
+}
+
+/* Return an absolute index into HLIST which corresponds to COMMAND. If
+ COMMAND is a number, then it was specified in relative terms. If it
+ is a string, then it is the start of a command line present in HLIST. */
+static int
+fc_gethnum (command, hlist)
+ char *command;
+ HIST_ENTRY **hlist;
+{
+ int sign, n, clen, rh;
+ register int i, j;
+ register char *s;
+
+ sign = 1;
+ /* Count history elements. */
+ for (i = 0; hlist[i]; i++);
+
+ /* With the Bash implementation of history, the current command line
+ ("fc blah..." and so on) is already part of the history list by
+ the time we get to this point. This just skips over that command
+ and makes the last command that this deals with be the last command
+ the user entered before the fc. We need to check whether the
+ line was actually added (HISTIGNORE may have caused it to not be),
+ so we check hist_last_line_added. This needs to agree with the
+ calculation of last_hist in fc_builtin above. */
+ /* Even though command substitution through parse_and_execute turns off
+ remember_on_history, command substitution in a shell when set -o history
+ has been enabled (interactive or not) should use it in the last_hist
+ calculation as if it were on. */
+ rh = remember_on_history || ((subshell_environment & SUBSHELL_COMSUB) && enable_history_list);
+ i -= rh + hist_last_line_added;
+
+ /* No specification defaults to most recent command. */
+ if (command == NULL)
+ return (i);
+
+ /* Otherwise, there is a specification. It can be a number relative to
+ the current position, or an absolute history number. */
+ s = command;
+
+ /* Handle possible leading minus sign. */
+ if (s && (*s == '-'))
+ {
+ sign = -1;
+ s++;
+ }
+
+ if (s && DIGIT(*s))
+ {
+ n = atoi (s);
+ n *= sign;
+
+ /* If the value is negative or zero, then it is an offset from
+ the current history item. */
+ if (n < 0)
+ {
+ n += i + 1;
+ return (n < 0 ? 0 : n);
+ }
+ else if (n == 0)
+ return (i);
+ else
+ {
+ n -= history_base;
+ return (i < n ? i : n);
+ }
+ }
+
+ clen = strlen (command);
+ for (j = i; j >= 0; j--)
+ {
+ if (STREQN (command, histline (j), clen))
+ return (j);
+ }
+ return (-1);
+}
+
+/* Locate the most recent history line which begins with
+ COMMAND in HLIST, and return a malloc()'ed copy of it. */
+static char *
+fc_gethist (command, hlist)
+ char *command;
+ HIST_ENTRY **hlist;
+{
+ int i;
+
+ if (hlist == 0)
+ return ((char *)NULL);
+
+ i = fc_gethnum (command, hlist);
+
+ if (i >= 0)
+ return (savestring (histline (i)));
+ else
+ return ((char *)NULL);
+}
+
+#ifdef INCLUDE_UNUSED
+/* Read the edited history lines from STREAM and return them
+ one at a time. This can read unlimited length lines. The
+ caller should free the storage. */
+static char *
+fc_readline (stream)
+ FILE *stream;
+{
+ register int c;
+ int line_len = 0, lindex = 0;
+ char *line = (char *)NULL;
+
+ while ((c = getc (stream)) != EOF)
+ {
+ if ((lindex + 2) >= line_len)
+ line = (char *)xrealloc (line, (line_len += 128));
+
+ if (c == '\n')
+ {
+ line[lindex++] = '\n';
+ line[lindex++] = '\0';
+ return (line);
+ }
+ else
+ line[lindex++] = c;
+ }
+
+ if (!lindex)
+ {
+ if (line)
+ free (line);
+
+ return ((char *)NULL);
+ }
+
+ if (lindex + 2 >= line_len)
+ line = (char *)xrealloc (line, lindex + 3);
+
+ line[lindex++] = '\n'; /* Finish with newline if none in file */
+ line[lindex++] = '\0';
+ return (line);
+}
+#endif
+
+/* Perform the SUBS on COMMAND.
+ SUBS is a list of substitutions, and COMMAND is a simple string.
+ Return a pointer to a malloc'ed string which contains the substituted
+ command. */
+static char *
+fc_dosubs (command, subs)
+ char *command;
+ REPL *subs;
+{
+ register char *new, *t;
+ register REPL *r;
+
+ for (new = savestring (command), r = subs; r; r = r->next)
+ {
+ t = strsub (new, r->pat, r->rep, 1);
+ free (new);
+ new = t;
+ }
+ return (new);
+}
+
+/* Use `command' to replace the last entry in the history list, which,
+ by this time, is `fc blah...'. The intent is that the new command
+ become the history entry, and that `fc' should never appear in the
+ history list. This way you can do `r' to your heart's content. */
+static void
+fc_replhist (command)
+ char *command;
+{
+ int n;
+
+ if (command == 0 || *command == '\0')
+ return;
+
+ n = strlen (command);
+ if (command[n - 1] == '\n')
+ command[n - 1] = '\0';
+
+ if (command && *command)
+ {
+ bash_delete_last_history ();
+ maybe_add_history (command); /* Obeys HISTCONTROL setting. */
+ }
+}
+
+#ifdef INCLUDE_UNUSED
+/* Add LINE to the history, after removing a single trailing newline. */
+static void
+fc_addhist (line)
+ char *line;
+{
+ register int n;
+
+ if (line == 0 || *line == 0)
+ return;
+
+ n = strlen (line);
+
+ if (line[n - 1] == '\n')
+ line[n - 1] = '\0';
+
+ if (line && *line)
+ maybe_add_history (line); /* Obeys HISTCONTROL setting. */
+}
+#endif
+
+#endif /* HISTORY */
diff --git a/builtins/fg_bg.def b/builtins/fg_bg.def
new file mode 100644
index 0000000..ae7e904
--- /dev/null
+++ b/builtins/fg_bg.def
@@ -0,0 +1,186 @@
+This file is fg_bg.def, from which is created fg_bg.c.
+It implements the builtins "bg" and "fg" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES fg_bg.c
+
+$BUILTIN fg
+$FUNCTION fg_builtin
+$DEPENDS_ON JOB_CONTROL
+$SHORT_DOC fg [job_spec]
+Move job to the foreground.
+
+Place the job identified by JOB_SPEC in the foreground, making it the
+current job. If JOB_SPEC is not present, the shell's notion of the
+current job is used.
+
+Exit Status:
+Status of command placed in foreground, or failure if an error occurs.
+$END
+
+#include <config.h>
+
+#include "../bashtypes.h"
+#include <signal.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../jobs.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+#if defined (JOB_CONTROL)
+extern char *this_command_name;
+
+static int fg_bg __P((WORD_LIST *, int));
+
+/* How to bring a job into the foreground. */
+int
+fg_builtin (list)
+ WORD_LIST *list;
+{
+ int fg_bit;
+ register WORD_LIST *t;
+
+ if (job_control == 0)
+ {
+ sh_nojobs ((char *)NULL);
+ return (EXECUTION_FAILURE);
+ }
+
+ if (no_options (list))
+ return (EX_USAGE);
+ list = loptend;
+
+ /* If the last arg on the line is '&', then start this job in the
+ background. Else, fg the job. */
+ for (t = list; t && t->next; t = t->next)
+ ;
+ fg_bit = (t && t->word->word[0] == '&' && t->word->word[1] == '\0') == 0;
+
+ return (fg_bg (list, fg_bit));
+}
+#endif /* JOB_CONTROL */
+
+$BUILTIN bg
+$FUNCTION bg_builtin
+$DEPENDS_ON JOB_CONTROL
+$SHORT_DOC bg [job_spec ...]
+Move jobs to the background.
+
+Place the jobs identified by each JOB_SPEC in the background, as if they
+had been started with `&'. If JOB_SPEC is not present, the shell's notion
+of the current job is used.
+
+Exit Status:
+Returns success unless job control is not enabled or an error occurs.
+$END
+
+#if defined (JOB_CONTROL)
+/* How to put a job into the background. */
+int
+bg_builtin (list)
+ WORD_LIST *list;
+{
+ int r;
+
+ if (job_control == 0)
+ {
+ sh_nojobs ((char *)NULL);
+ return (EXECUTION_FAILURE);
+ }
+
+ if (no_options (list))
+ return (EX_USAGE);
+ list = loptend;
+
+ /* This relies on the fact that fg_bg() takes a WORD_LIST *, but only acts
+ on the first member (if any) of that list. */
+ r = EXECUTION_SUCCESS;
+ do
+ {
+ if (fg_bg (list, 0) == EXECUTION_FAILURE)
+ r = EXECUTION_FAILURE;
+ if (list)
+ list = list->next;
+ }
+ while (list);
+
+ return r;
+}
+
+/* How to put a job into the foreground/background. */
+static int
+fg_bg (list, foreground)
+ WORD_LIST *list;
+ int foreground;
+{
+ sigset_t set, oset;
+ int job, status, old_async_pid;
+ JOB *j;
+
+ BLOCK_CHILD (set, oset);
+ job = get_job_spec (list);
+
+ if (INVALID_JOB (job))
+ {
+ if (job != DUP_JOB)
+ sh_badjob (list ? list->word->word : _("current"));
+
+ goto failure;
+ }
+
+ j = get_job_by_jid (job);
+ /* Or if j->pgrp == shell_pgrp. */
+ if (IS_JOBCONTROL (job) == 0)
+ {
+ builtin_error (_("job %d started without job control"), job + 1);
+ goto failure;
+ }
+
+ if (foreground == 0)
+ {
+ old_async_pid = last_asynchronous_pid;
+ last_asynchronous_pid = j->pgrp; /* As per Posix.2 5.4.2 */
+ }
+
+ status = start_job (job, foreground);
+
+ if (status >= 0)
+ {
+ /* win: */
+ UNBLOCK_CHILD (oset);
+ return (foreground ? status : EXECUTION_SUCCESS);
+ }
+ else
+ {
+ if (foreground == 0)
+ last_asynchronous_pid = old_async_pid;
+
+ failure:
+ UNBLOCK_CHILD (oset);
+ return (EXECUTION_FAILURE);
+ }
+}
+#endif /* JOB_CONTROL */
diff --git a/builtins/getopt.c b/builtins/getopt.c
new file mode 100644
index 0000000..feb18b5
--- /dev/null
+++ b/builtins/getopt.c
@@ -0,0 +1,309 @@
+/* getopt.c - getopt for Bash. Used by the getopt builtin. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include "memalloc.h"
+#include "../bashintl.h"
+#include "../shell.h"
+#include "getopt.h"
+
+/* For communication from `sh_getopt' to the caller.
+ When `sh_getopt' finds an option that takes an argument,
+ the argument value is returned here. */
+char *sh_optarg = 0;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `sh_getopt'.
+
+ On entry to `sh_getopt', zero means this is the first call; initialize.
+
+ When `sh_getopt' returns EOF, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `sh_optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+/* XXX 1003.2 says this must be 1 before any call. */
+int sh_optind = 0;
+
+/* Index of the current argument. */
+static int sh_curopt;
+
+/* The next char to be scanned in the option-element
+ in which the last option character we returned was found.
+ This allows us to pick up the scan where we left off.
+
+ If this is zero, or a null string, it means resume the scan
+ by advancing to the next ARGV-element. */
+
+static char *nextchar;
+static int sh_charindex;
+
+/* Callers store zero here to inhibit the error message
+ for unrecognized options. */
+
+int sh_opterr = 1;
+
+/* Set to an option character which was unrecognized.
+ This must be initialized on some systems to avoid linking in the
+ system's own getopt implementation. */
+
+int sh_optopt = '?';
+
+/* Set to 1 when we see an invalid option; public so getopts can reset it. */
+int sh_badopt = 0;
+
+/* Scan elements of ARGV (whose length is ARGC) for option characters
+ given in OPTSTRING.
+
+ If an element of ARGV starts with '-', and is not exactly "-" or "--",
+ then it is an option element. The characters of this element
+ (aside from the initial '-') are option characters. If `sh_getopt'
+ is called repeatedly, it returns successively each of the option characters
+ from each of the option elements.
+
+ If `sh_getopt' finds another option character, it returns that character,
+ updating `sh_optind' and `nextchar' so that the next call to `sh_getopt' can
+ resume the scan with the following option character or ARGV-element.
+
+ If there are no more option characters, `sh_getopt' returns `EOF'.
+ Then `sh_optind' is the index in ARGV of the first ARGV-element
+ that is not an option.
+
+ OPTSTRING is a string containing the legitimate option characters.
+ If an option character is seen that is not listed in OPTSTRING,
+ return '?' after printing an error message. If you set `sh_opterr' to
+ zero, the error message is suppressed but we still return '?'.
+
+ If a char in OPTSTRING is followed by a colon, that means it wants an arg,
+ so the following text in the same ARGV-element, or the text of the following
+ ARGV-element, is returned in `sh_optarg'. */
+
+/* 1003.2 specifies the format of this message. */
+#define BADOPT(x) fprintf (stderr, _("%s: illegal option -- %c\n"), argv[0], x)
+#define NEEDARG(x) fprintf (stderr, _("%s: option requires an argument -- %c\n"), argv[0], x)
+
+int
+sh_getopt (argc, argv, optstring)
+ int argc;
+ char *const *argv;
+ const char *optstring;
+{
+ char c, *temp;
+
+ sh_optarg = 0;
+
+ if (sh_optind >= argc || sh_optind < 0) /* XXX was sh_optind > argc */
+ {
+ sh_optind = argc;
+ return (EOF);
+ }
+
+ /* Initialize the internal data when the first call is made.
+ Start processing options with ARGV-element 1 (since ARGV-element 0
+ is the program name); the sequence of previously skipped
+ non-option ARGV-elements is empty. */
+
+ if (sh_optind == 0)
+ {
+ sh_optind = 1;
+ nextchar = (char *)NULL;
+ }
+
+ if (nextchar == 0 || *nextchar == '\0')
+ {
+ /* If we have done all the ARGV-elements, stop the scan. */
+ if (sh_optind >= argc)
+ return EOF;
+
+ temp = argv[sh_optind];
+
+ /* Special ARGV-element `--' means premature end of options.
+ Skip it like a null option, and return EOF. */
+ if (temp[0] == '-' && temp[1] == '-' && temp[2] == '\0')
+ {
+ sh_optind++;
+ return EOF;
+ }
+
+ /* If we have come to a non-option, either stop the scan or describe
+ it to the caller and pass it by. This makes the pseudo-option
+ `-' mean the end of options, but does not skip over it. */
+ if (temp[0] != '-' || temp[1] == '\0')
+ return EOF;
+
+ /* We have found another option-ARGV-element.
+ Start decoding its characters. */
+ nextchar = argv[sh_curopt = sh_optind] + 1;
+ sh_charindex = 1;
+ }
+
+ /* Look at and handle the next option-character. */
+
+ c = *nextchar++; sh_charindex++;
+ temp = strchr (optstring, c);
+
+ sh_optopt = c;
+
+ /* Increment `sh_optind' when we start to process its last character. */
+ if (nextchar == 0 || *nextchar == '\0')
+ {
+ sh_optind++;
+ nextchar = (char *)NULL;
+ }
+
+ if (sh_badopt = (temp == NULL || c == ':'))
+ {
+ if (sh_opterr)
+ BADOPT (c);
+
+ return '?';
+ }
+
+ if (temp[1] == ':')
+ {
+ if (nextchar && *nextchar)
+ {
+ /* This is an option that requires an argument. */
+ sh_optarg = nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ sh_optind++;
+ }
+ else if (sh_optind == argc)
+ {
+ if (sh_opterr)
+ NEEDARG (c);
+
+ sh_optopt = c;
+ sh_optarg = ""; /* Needed by getopts. */
+ c = (optstring[0] == ':') ? ':' : '?';
+ }
+ else
+ /* We already incremented `sh_optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ sh_optarg = argv[sh_optind++];
+ nextchar = (char *)NULL;
+ }
+ return c;
+}
+
+void
+sh_getopt_restore_state (argv)
+ char **argv;
+{
+ if (nextchar)
+ nextchar = argv[sh_curopt] + sh_charindex;
+}
+
+#if 0
+void
+sh_getopt_debug_restore_state (argv)
+ char **argv;
+{
+ if (nextchar && nextchar != argv[sh_curopt] + sh_charindex)
+ {
+ itrace("sh_getopt_debug_restore_state: resetting nextchar");
+ nextchar = argv[sh_curopt] + sh_charindex;
+ }
+}
+#endif
+
+#ifdef TEST
+
+/* Compile with -DTEST to make an executable for use in testing
+ the above definition of `sh_getopt'. */
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ int c;
+ int digit_sh_optind = 0;
+
+ while (1)
+ {
+ int this_option_sh_optind = sh_optind ? sh_optind : 1;
+
+ c = sh_getopt (argc, argv, "abc:d:0123456789");
+ if (c == EOF)
+ break;
+
+ switch (c)
+ {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (digit_sh_optind != 0 && digit_sh_optind != this_option_sh_optind)
+ printf ("digits occur in two different argv-elements.\n");
+ digit_sh_optind = this_option_sh_optind;
+ printf ("option %c\n", c);
+ break;
+
+ case 'a':
+ printf ("option a\n");
+ break;
+
+ case 'b':
+ printf ("option b\n");
+ break;
+
+ case 'c':
+ printf ("option c with value `%s'\n", sh_optarg);
+ break;
+
+ case '?':
+ break;
+
+ default:
+ printf ("?? sh_getopt returned character code 0%o ??\n", c);
+ }
+ }
+
+ if (sh_optind < argc)
+ {
+ printf ("non-option ARGV-elements: ");
+ while (sh_optind < argc)
+ printf ("%s ", argv[sh_optind++]);
+ printf ("\n");
+ }
+
+ exit (0);
+}
+
+#endif /* TEST */
diff --git a/builtins/getopt.h b/builtins/getopt.h
new file mode 100644
index 0000000..75fdec5
--- /dev/null
+++ b/builtins/getopt.h
@@ -0,0 +1,65 @@
+/* getopt.h - declarations for getopt. */
+
+/* Copyright (C) 1989, 1990, 1991, 1992, 1993, 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* XXX THIS HAS BEEN MODIFIED FOR INCORPORATION INTO BASH XXX */
+
+#ifndef _SH_GETOPT_H
+#define _SH_GETOPT_H 1
+
+#include "stdc.h"
+
+/* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+extern char *sh_optarg;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+
+ On entry to `getopt', zero means this is the first call; initialize.
+
+ When `getopt' returns EOF, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `sh_optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+extern int sh_optind;
+
+/* Callers store zero here to inhibit the error message `getopt' prints
+ for unrecognized options. */
+
+extern int sh_opterr;
+
+/* Set to an option character which was unrecognized. */
+
+extern int sh_optopt;
+
+/* Set to 1 when an unrecognized option is encountered. */
+extern int sh_badopt;
+
+extern int sh_getopt __P((int, char *const *, const char *));
+extern void sh_getopt_restore_state __P((char **));
+
+#endif /* _SH_GETOPT_H */
diff --git a/builtins/getopts.def b/builtins/getopts.def
new file mode 100644
index 0000000..c077c8e
--- /dev/null
+++ b/builtins/getopts.def
@@ -0,0 +1,329 @@
+This file is getopts.def, from which is created getopts.c.
+It implements the builtin "getopts" in Bash.
+
+Copyright (C) 1987-2004 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES getopts.c
+
+$BUILTIN getopts
+$FUNCTION getopts_builtin
+$SHORT_DOC getopts optstring name [arg]
+Parse option arguments.
+
+Getopts is used by shell procedures to parse positional parameters
+as options.
+
+OPTSTRING contains the option letters to be recognized; if a letter
+is followed by a colon, the option is expected to have an argument,
+which should be separated from it by white space.
+
+Each time it is invoked, getopts will place the next option in the
+shell variable $name, initializing name if it does not exist, and
+the index of the next argument to be processed into the shell
+variable OPTIND. OPTIND is initialized to 1 each time the shell or
+a shell script is invoked. When an option requires an argument,
+getopts places that argument into the shell variable OPTARG.
+
+getopts reports errors in one of two ways. If the first character
+of OPTSTRING is a colon, getopts uses silent error reporting. In
+this mode, no error messages are printed. If an invalid option is
+seen, getopts places the option character found into OPTARG. If a
+required argument is not found, getopts places a ':' into NAME and
+sets OPTARG to the option character found. If getopts is not in
+silent mode, and an invalid option is seen, getopts places '?' into
+NAME and unsets OPTARG. If a required argument is not found, a '?'
+is placed in NAME, OPTARG is unset, and a diagnostic message is
+printed.
+
+If the shell variable OPTERR has the value 0, getopts disables the
+printing of error messages, even if the first character of
+OPTSTRING is not a colon. OPTERR has the value 1 by default.
+
+Getopts normally parses the positional parameters ($0 - $9), but if
+more arguments are given, they are parsed instead.
+
+Exit Status:
+Returns success if an option is found; fails if the end of options is
+encountered or an error occurs.
+$END
+
+#include <config.h>
+
+#include <stdio.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "../bashansi.h"
+
+#include "../shell.h"
+#include "common.h"
+#include "bashgetopt.h"
+#include "getopt.h"
+
+#define G_EOF -1
+#define G_INVALID_OPT -2
+#define G_ARG_MISSING -3
+
+extern char *this_command_name;
+
+static int getopts_bind_variable __P((char *, char *));
+static int dogetopts __P((int, char **));
+
+/* getopts_reset is magic code for when OPTIND is reset. N is the
+ value that has just been assigned to OPTIND. */
+void
+getopts_reset (newind)
+ int newind;
+{
+ sh_optind = newind;
+ sh_badopt = 0;
+}
+
+static int
+getopts_bind_variable (name, value)
+ char *name, *value;
+{
+ SHELL_VAR *v;
+
+ if (legal_identifier (name))
+ {
+ v = bind_variable (name, value, 0);
+ return (v && (readonly_p (v) == 0)) ? EXECUTION_SUCCESS : EXECUTION_FAILURE;
+ }
+ else
+ {
+ sh_invalidid (name);
+ return (EXECUTION_FAILURE);
+ }
+}
+
+/* Error handling is now performed as specified by Posix.2, draft 11
+ (identical to that of ksh-88). The special handling is enabled if
+ the first character of the option string is a colon; this handling
+ disables diagnostic messages concerning missing option arguments
+ and invalid option characters. The handling is as follows.
+
+ INVALID OPTIONS:
+ name -> "?"
+ if (special_error) then
+ OPTARG = option character found
+ no error output
+ else
+ OPTARG unset
+ diagnostic message
+ fi
+
+ MISSING OPTION ARGUMENT;
+ if (special_error) then
+ name -> ":"
+ OPTARG = option character found
+ else
+ name -> "?"
+ OPTARG unset
+ diagnostic message
+ fi
+ */
+
+static int
+dogetopts (argc, argv)
+ int argc;
+ char **argv;
+{
+ int ret, special_error, old_opterr, i, n;
+ char strval[2], numval[16];
+ char *optstr; /* list of options */
+ char *name; /* variable to get flag val */
+ char *t;
+
+ if (argc < 3)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ /* argv[0] is "getopts". */
+
+ optstr = argv[1];
+ name = argv[2];
+ argc -= 2;
+ argv += 2;
+
+ special_error = optstr[0] == ':';
+
+ if (special_error)
+ {
+ old_opterr = sh_opterr;
+ optstr++;
+ sh_opterr = 0; /* suppress diagnostic messages */
+ }
+
+ if (argc > 1)
+ {
+ sh_getopt_restore_state (argv);
+ t = argv[0];
+ argv[0] = dollar_vars[0];
+ ret = sh_getopt (argc, argv, optstr);
+ argv[0] = t;
+ }
+ else if (rest_of_args == (WORD_LIST *)NULL)
+ {
+ for (i = 0; i < 10 && dollar_vars[i]; i++)
+ ;
+
+ sh_getopt_restore_state (dollar_vars);
+ ret = sh_getopt (i, dollar_vars, optstr);
+ }
+ else
+ {
+ register WORD_LIST *words;
+ char **v;
+
+ for (i = 0; i < 10 && dollar_vars[i]; i++)
+ ;
+ for (words = rest_of_args; words; words = words->next, i++)
+ ;
+ v = strvec_create (i + 1);
+ for (i = 0; i < 10 && dollar_vars[i]; i++)
+ v[i] = dollar_vars[i];
+ for (words = rest_of_args; words; words = words->next, i++)
+ v[i] = words->word->word;
+ v[i] = (char *)NULL;
+ sh_getopt_restore_state (v);
+ ret = sh_getopt (i, v, optstr);
+ free (v);
+ }
+
+ if (special_error)
+ sh_opterr = old_opterr;
+
+ /* Set the OPTIND variable in any case, to handle "--" skipping. It's
+ highly unlikely that 14 digits will be too few. */
+ if (sh_optind < 10)
+ {
+ numval[14] = sh_optind + '0';
+ numval[15] = '\0';
+ i = 14;
+ }
+ else
+ {
+ numval[i = 15] = '\0';
+ n = sh_optind;
+ do
+ {
+ numval[--i] = (n % 10) + '0';
+ }
+ while (n /= 10);
+ }
+ bind_variable ("OPTIND", numval + i, 0);
+
+ /* If an error occurred, decide which one it is and set the return
+ code appropriately. In all cases, the option character in error
+ is in OPTOPT. If an invalid option was encountered, OPTARG is
+ NULL. If a required option argument was missing, OPTARG points
+ to a NULL string (that is, sh_optarg[0] == 0). */
+ if (ret == '?')
+ {
+ if (sh_optarg == NULL)
+ ret = G_INVALID_OPT;
+ else if (sh_optarg[0] == '\0')
+ ret = G_ARG_MISSING;
+ }
+
+ if (ret == G_EOF)
+ {
+ unbind_variable ("OPTARG");
+ getopts_bind_variable (name, "?");
+ return (EXECUTION_FAILURE);
+ }
+
+ if (ret == G_INVALID_OPT)
+ {
+ /* Invalid option encountered. */
+ ret = getopts_bind_variable (name, "?");
+
+ if (special_error)
+ {
+ strval[0] = (char)sh_optopt;
+ strval[1] = '\0';
+ bind_variable ("OPTARG", strval, 0);
+ }
+ else
+ unbind_variable ("OPTARG");
+
+ return (ret);
+ }
+
+ if (ret == G_ARG_MISSING)
+ {
+ /* Required argument missing. */
+ if (special_error)
+ {
+ ret = getopts_bind_variable (name, ":");
+
+ strval[0] = (char)sh_optopt;
+ strval[1] = '\0';
+ bind_variable ("OPTARG", strval, 0);
+ }
+ else
+ {
+ ret = getopts_bind_variable (name, "?");
+ unbind_variable ("OPTARG");
+ }
+ return (ret);
+ }
+
+ bind_variable ("OPTARG", sh_optarg, 0);
+
+ strval[0] = (char) ret;
+ strval[1] = '\0';
+ return (getopts_bind_variable (name, strval));
+}
+
+/* The getopts builtin. Build an argv, and call dogetopts with it. */
+int
+getopts_builtin (list)
+ WORD_LIST *list;
+{
+ char **av;
+ int ac, ret;
+
+ if (list == 0)
+ {
+ builtin_usage ();
+ return EX_USAGE;
+ }
+
+ reset_internal_getopt ();
+ if (internal_getopt (list, "") != -1)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ list = loptend;
+
+ av = make_builtin_argv (list, &ac);
+ ret = dogetopts (ac, av);
+ free ((char *)av);
+
+ return (ret);
+}
diff --git a/builtins/hash.def b/builtins/hash.def
new file mode 100644
index 0000000..7a8aced
--- /dev/null
+++ b/builtins/hash.def
@@ -0,0 +1,281 @@
+This file is hash.def, from which is created hash.c.
+It implements the builtin "hash" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES hash.c
+
+$BUILTIN hash
+$FUNCTION hash_builtin
+$SHORT_DOC hash [-lr] [-p pathname] [-dt] [name ...]
+Remember or display program locations.
+
+Determine and remember the full pathname of each command NAME. If
+no arguments are given, information about remembered commands is displayed.
+
+Options:
+ -d forget the remembered location of each NAME
+ -l display in a format that may be reused as input
+ -p pathname use PATHNAME is the full pathname of NAME
+ -r forget all remembered locations
+ -t print the remembered location of each NAME, preceding
+ each location with the corresponding NAME if multiple
+ NAMEs are given
+Arguments:
+ NAME Each NAME is searched for in $PATH and added to the list
+ of remembered commands.
+
+Exit Status:
+Returns success unless NAME is not found or an invalid option is given.
+$END
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "../bashtypes.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <errno.h>
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../builtins.h"
+#include "../flags.h"
+#include "../findcmd.h"
+#include "../hashcmd.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+extern int posixly_correct;
+extern int dot_found_in_search;
+extern char *this_command_name;
+
+static int add_hashed_command __P((char *, int));
+static int print_hash_info __P((BUCKET_CONTENTS *));
+static int print_portable_hash_info __P((BUCKET_CONTENTS *));
+static int print_hashed_commands __P((int));
+static int list_hashed_filename_targets __P((WORD_LIST *, int));
+
+/* Print statistics on the current state of hashed commands. If LIST is
+ not empty, then rehash (or hash in the first place) the specified
+ commands. */
+int
+hash_builtin (list)
+ WORD_LIST *list;
+{
+ int expunge_hash_table, list_targets, list_portably, delete, opt;
+ char *w, *pathname;
+
+ if (hashing_enabled == 0)
+ {
+ builtin_error (_("hashing disabled"));
+ return (EXECUTION_FAILURE);
+ }
+
+ expunge_hash_table = list_targets = list_portably = delete = 0;
+ pathname = (char *)NULL;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "dlp:rt")) != -1)
+ {
+ switch (opt)
+ {
+ case 'd':
+ delete = 1;
+ break;
+ case 'l':
+ list_portably = 1;
+ break;
+ case 'p':
+ pathname = list_optarg;
+ break;
+ case 'r':
+ expunge_hash_table = 1;
+ break;
+ case 't':
+ list_targets = 1;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ /* hash -t requires at least one argument. */
+ if (list == 0 && list_targets)
+ {
+ sh_needarg ("-t");
+ return (EXECUTION_FAILURE);
+ }
+
+ /* We want hash -r to be silent, but hash -- to print hashing info, so
+ we test expunge_hash_table. */
+ if (list == 0 && expunge_hash_table == 0)
+ {
+ opt = print_hashed_commands (list_portably);
+ if (opt == 0 && posixly_correct == 0)
+ printf (_("%s: hash table empty\n"), this_command_name);
+
+ return (EXECUTION_SUCCESS);
+ }
+
+ if (expunge_hash_table)
+ phash_flush ();
+
+ /* If someone runs `hash -r -t xyz' he will be disappointed. */
+ if (list_targets)
+ return (list_hashed_filename_targets (list, list_portably));
+
+#if defined (RESTRICTED_SHELL)
+ if (restricted && pathname && strchr (pathname, '/'))
+ {
+ sh_restricted (pathname);
+ return (EXECUTION_FAILURE);
+ }
+#endif
+
+ for (opt = EXECUTION_SUCCESS; list; list = list->next)
+ {
+ /* Add, remove or rehash the specified commands. */
+ w = list->word->word;
+ if (pathname)
+ {
+ if (is_directory (pathname))
+ {
+#ifdef EISDIR
+ builtin_error ("%s: %s", pathname, strerror (EISDIR));
+#else
+ builtin_error (_("%s: is a directory"), pathname);
+#endif
+ opt = EXECUTION_FAILURE;
+ }
+ else
+ phash_insert (w, pathname, 0, 0);
+ }
+ else if (absolute_program (w))
+ continue;
+ else if (delete)
+ {
+ if (phash_remove (w))
+ {
+ sh_notfound (w);
+ opt = EXECUTION_FAILURE;
+ }
+ }
+ else if (add_hashed_command (w, 0))
+ opt = EXECUTION_FAILURE;
+ }
+
+ fflush (stdout);
+ return (opt);
+}
+
+static int
+add_hashed_command (w, quiet)
+ char *w;
+ int quiet;
+{
+ int rv;
+ char *full_path;
+
+ rv = 0;
+ if (find_function (w) == 0 && find_shell_builtin (w) == 0)
+ {
+ full_path = find_user_command (w);
+ if (full_path && executable_file (full_path))
+ phash_insert (w, full_path, dot_found_in_search, 0);
+ else
+ {
+ if (quiet == 0)
+ sh_notfound (w);
+ rv++;
+ }
+ FREE (full_path);
+ }
+ return (rv);
+}
+
+/* Print information about current hashed info. */
+static int
+print_hash_info (item)
+ BUCKET_CONTENTS *item;
+{
+ printf ("%4d\t%s\n", item->times_found, pathdata(item)->path);
+ return 0;
+}
+
+static int
+print_portable_hash_info (item)
+ BUCKET_CONTENTS *item;
+{
+ printf ("builtin hash -p %s %s\n", pathdata(item)->path, item->key);
+ return 0;
+}
+
+static int
+print_hashed_commands (fmt)
+ int fmt;
+{
+ if (hashed_filenames == 0 || HASH_ENTRIES (hashed_filenames) == 0)
+ return (0);
+
+ if (fmt == 0)
+ printf (_("hits\tcommand\n"));
+ hash_walk (hashed_filenames, fmt ? print_portable_hash_info : print_hash_info);
+ return (1);
+}
+
+static int
+list_hashed_filename_targets (list, fmt)
+ WORD_LIST *list;
+ int fmt;
+{
+ int all_found, multiple;
+ char *target;
+ WORD_LIST *l;
+
+ all_found = 1;
+ multiple = list->next != 0;
+
+ for (l = list; l; l = l->next)
+ {
+ target = phash_search (l->word->word);
+ if (target == 0)
+ {
+ all_found = 0;
+ sh_notfound (l->word->word);
+ continue;
+ }
+ if (fmt)
+ printf ("builtin hash -p %s %s\n", target, l->word->word);
+ else
+ {
+ if (multiple)
+ printf ("%s\t", l->word->word);
+ printf ("%s\n", target);
+ }
+ }
+
+ return (all_found ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
+}
diff --git a/builtins/help.def b/builtins/help.def
new file mode 100644
index 0000000..f857af9
--- /dev/null
+++ b/builtins/help.def
@@ -0,0 +1,385 @@
+This file is help.def, from which is created help.c.
+It implements the builtin "help" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES help.c
+
+$BUILTIN help
+$FUNCTION help_builtin
+$DEPENDS_ON HELP_BUILTIN
+$SHORT_DOC help [-dms] [pattern ...]
+Display information about builtin commands.
+
+Displays brief summaries of builtin commands. If PATTERN is
+specified, gives detailed help on all commands matching PATTERN,
+otherwise the list of help topics is printed.
+
+Options:
+ -d output short description for each topic
+ -m display usage in pseudo-manpage format
+ -s output only a short usage synopsis for each topic matching
+ PATTERN
+
+Arguments:
+ PATTERN Pattern specifiying a help topic
+
+Exit Status:
+Returns success unless PATTERN is not found or an invalid option is given.
+$END
+
+#include <config.h>
+
+#if defined (HELP_BUILTIN)
+#include <stdio.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <errno.h>
+
+#include <filecntl.h>
+
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../builtins.h"
+#include "../pathexp.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+#include <glob/strmatch.h>
+#include <glob/glob.h>
+
+#ifndef errno
+extern int errno;
+#endif
+
+extern const char * const bash_copyright;
+extern const char * const bash_license;
+
+static void show_builtin_command_help __P((void));
+static int open_helpfile __P((char *));
+static void show_desc __P((char *, int));
+static void show_manpage __P((char *, int));
+static void show_longdoc __P((int));
+
+/* Print out a list of the known functions in the shell, and what they do.
+ If LIST is supplied, print out the list which matches for each pattern
+ specified. */
+int
+help_builtin (list)
+ WORD_LIST *list;
+{
+ register int i;
+ char *pattern, *name;
+ int plen, match_found, sflag, dflag, mflag;
+
+ dflag = sflag = mflag = 0;
+ reset_internal_getopt ();
+ while ((i = internal_getopt (list, "dms")) != -1)
+ {
+ switch (i)
+ {
+ case 'd':
+ dflag = 1;
+ break;
+ case 'm':
+ mflag = 1;
+ break;
+ case 's':
+ sflag = 1;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ if (list == 0)
+ {
+ show_shell_version (0);
+ show_builtin_command_help ();
+ return (EXECUTION_SUCCESS);
+ }
+
+ /* We should consider making `help bash' do something. */
+
+ if (glob_pattern_p (list->word->word))
+ {
+ printf (ngettext ("Shell commands matching keyword `", "Shell commands matching keywords `", (list->next ? 2 : 1)));
+ print_word_list (list, ", ");
+ printf ("'\n\n");
+ }
+
+ for (match_found = 0, pattern = ""; list; list = list->next)
+ {
+ pattern = list->word->word;
+ plen = strlen (pattern);
+
+ for (i = 0; name = shell_builtins[i].name; i++)
+ {
+ QUIT;
+ if ((strncmp (pattern, name, plen) == 0) ||
+ (strmatch (pattern, name, FNMATCH_EXTFLAG) != FNM_NOMATCH))
+ {
+ match_found++;
+ if (dflag)
+ {
+ show_desc (name, i);
+ continue;
+ }
+ else if (mflag)
+ {
+ show_manpage (name, i);
+ continue;
+ }
+
+ printf ("%s: %s\n", name, shell_builtins[i].short_doc);
+
+ if (sflag == 0)
+ show_longdoc (i);
+ }
+ }
+ }
+
+ if (match_found == 0)
+ {
+ builtin_error (_("no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."), pattern, pattern, pattern);
+ return (EXECUTION_FAILURE);
+ }
+
+ fflush (stdout);
+ return (EXECUTION_SUCCESS);
+}
+
+static int
+open_helpfile (name)
+ char *name;
+{
+ int fd;
+
+ fd = open (name, O_RDONLY);
+ if (fd == -1)
+ {
+ builtin_error (_("%s: cannot open: %s"), name, strerror (errno));
+ return -1;
+ }
+ return fd;
+}
+
+/* By convention, enforced by mkbuiltins.c, if separate help files are being
+ used, the long_doc array contains one string -- the full pathname of the
+ help file for this builtin. */
+static void
+show_longdoc (i)
+ int i;
+{
+ register int j;
+ char * const *doc;
+ int fd;
+
+ doc = shell_builtins[i].long_doc;
+
+ if (doc && doc[0] && *doc[0] == '/' && doc[1] == (char *)NULL)
+ {
+ fd = open_helpfile (doc[0]);
+ if (fd < 0)
+ return;
+ zcatfd (fd, 1, doc[0]);
+ close (fd);
+ }
+ else
+ for (j = 0; doc[j]; j++)
+ printf ("%*s%s\n", BASE_INDENT, " ", _(doc[j]));
+}
+
+static void
+show_desc (name, i)
+ char *name;
+ int i;
+{
+ register int j;
+ char **doc, *line;
+ int fd, usefile;
+
+ doc = (char **)shell_builtins[i].long_doc;
+
+ usefile = (doc && doc[0] && *doc[0] == '/' && doc[1] == (char *)NULL);
+ if (usefile)
+ {
+ fd = open_helpfile (doc[0]);
+ if (fd < 0)
+ return;
+ zmapfd (fd, &line, doc[0]);
+ close (fd);
+ }
+ else
+ line = doc ? doc[0] : (char *)NULL;
+
+ printf ("%s - ", name);
+ for (j = 0; line && line[j]; j++)
+ {
+ putchar (line[j]);
+ if (line[j] == '\n')
+ break;
+ }
+
+ fflush (stdout);
+
+ if (usefile)
+ free (line);
+}
+
+/* Print builtin help in pseudo-manpage format. */
+static void
+show_manpage (name, i)
+ char *name;
+ int i;
+{
+ register int j;
+ char **doc, *line;
+ int fd, usefile;
+
+ doc = (char **)shell_builtins[i].long_doc;
+
+ usefile = (doc && doc[0] && *doc[0] == '/' && doc[1] == (char *)NULL);
+ if (usefile)
+ {
+ fd = open_helpfile (doc[0]);
+ if (fd < 0)
+ return;
+ zmapfd (fd, &line, doc[0]);
+ close (fd);
+ }
+ else
+ line = doc ? _(doc[0]) : (char *)NULL;
+
+ /* NAME */
+ printf ("NAME\n");
+ printf ("%*s%s - ", BASE_INDENT, " ", name);
+ for (j = 0; line && line[j]; j++)
+ {
+ putchar (line[j]);
+ if (line[j] == '\n')
+ break;
+ }
+ printf ("\n");
+
+ /* SYNOPSIS */
+ printf ("SYNOPSIS\n");
+ printf ("%*s%s\n\n", BASE_INDENT, " ", shell_builtins[i].short_doc);
+
+ /* DESCRIPTION */
+ printf ("DESCRIPTION\n");
+ if (usefile == 0)
+ {
+ for (j = 0; doc[j]; j++)
+ printf ("%*s%s\n", BASE_INDENT, " ", _(doc[j]));
+ }
+ else
+ {
+ for (j = 0; line && line[j]; j++)
+ {
+ putchar (line[j]);
+ if (line[j] == '\n')
+ printf ("%*s", BASE_INDENT, " ");
+ }
+ }
+ putchar ('\n');
+
+ /* SEE ALSO */
+ printf ("SEE ALSO\n");
+ printf ("%*sbash(1)\n\n", BASE_INDENT, " ");
+
+ /* IMPLEMENTATION */
+ printf ("IMPLEMENTATION\n");
+ printf ("%*s", BASE_INDENT, " ");
+ show_shell_version (0);
+ printf ("%*s", BASE_INDENT, " ");
+ printf ("%s\n", _(bash_copyright));
+ printf ("%*s", BASE_INDENT, " ");
+ printf ("%s\n", _(bash_license));
+
+ fflush (stdout);
+ if (usefile)
+ free (line);
+}
+
+static void
+show_builtin_command_help ()
+{
+ int i, j;
+ int height, width;
+ char *t, blurb[128];
+
+ printf (
+_("These shell commands are defined internally. Type `help' to see this list.\n\
+Type `help name' to find out more about the function `name'.\n\
+Use `info bash' to find out more about the shell in general.\n\
+Use `man -k' or `info' to find out more about commands not in this list.\n\
+\n\
+A star (*) next to a name means that the command is disabled.\n\
+\n"));
+
+ t = get_string_value ("COLUMNS");
+ width = (t && *t) ? atoi (t) : 80;
+ if (width <= 0)
+ width = 80;
+
+ width /= 2;
+ if (width > sizeof (blurb))
+ width = sizeof (blurb);
+ if (width <= 3)
+ width = 40;
+ height = (num_shell_builtins + 1) / 2; /* number of rows */
+
+ for (i = 0; i < height; i++)
+ {
+ QUIT;
+
+ /* first column */
+ blurb[0] = (shell_builtins[i].flags & BUILTIN_ENABLED) ? ' ' : '*';
+ strncpy (blurb + 1, shell_builtins[i].short_doc, width - 2);
+ blurb[width - 2] = '>'; /* indicate truncation */
+ blurb[width - 1] = '\0';
+ printf ("%s", blurb);
+ if (((i << 1) >= num_shell_builtins) || (i+height >= num_shell_builtins))
+ {
+ printf ("\n");
+ break;
+ }
+
+ /* two spaces */
+ for (j = strlen (blurb); j < width; j++)
+ putc (' ', stdout);
+
+ /* second column */
+ blurb[0] = (shell_builtins[i+height].flags & BUILTIN_ENABLED) ? ' ' : '*';
+ strncpy (blurb + 1, shell_builtins[i+height].short_doc, width - 3);
+ blurb[width - 3] = '>'; /* indicate truncation */
+ blurb[width - 2] = '\0';
+ printf ("%s\n", blurb);
+ }
+}
+#endif /* HELP_BUILTIN */
diff --git a/builtins/history.def b/builtins/history.def
new file mode 100644
index 0000000..e8249e9
--- /dev/null
+++ b/builtins/history.def
@@ -0,0 +1,380 @@
+This file is history.def, from which is created history.c.
+It implements the builtin "history" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES history.c
+
+$BUILTIN history
+$FUNCTION history_builtin
+$DEPENDS_ON HISTORY
+$SHORT_DOC history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]
+Display or manipulate the history list.
+
+Display the history list with line numbers, prefixing each modified
+entry with a `*'. An argument of N lists only the last N entries.
+
+Options:
+ -c clear the history list by deleting all of the entries
+ -d offset delete the history entry at offset OFFSET.
+
+ -a append history lines from this session to the history file
+ -n read all history lines not already read from the history file
+ -r read the history file and append the contents to the history
+ list
+ -w write the current history to the history file
+ and append them to the history list
+
+ -p perform history expansion on each ARG and display the result
+ without storing it in the history list
+ -s append the ARGs to the history list as a single entry
+
+If FILENAME is given, it is used as the history file. Otherwise,
+if $HISTFILE has a value, that is used, else ~/.bash_history.
+
+If the $HISTTIMEFORMAT variable is set and not null, its value is used
+as a format string for strftime(3) to print the time stamp associated
+with each displayed history entry. No time stamps are printed otherwise.
+
+Exit Status:
+Returns success unless an invalid option is given or an error occurs.
+$END
+
+#include <config.h>
+
+#if defined (HISTORY)
+#include "../bashtypes.h"
+#if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+#include "posixstat.h"
+#include "filecntl.h"
+#include <errno.h>
+#include <stdio.h>
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../bashhist.h"
+#include <readline/history.h>
+#include "bashgetopt.h"
+#include "common.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+extern int current_command_line_count;
+extern int force_append_history; /* shopt -s histappend */
+
+static char *histtime __P((HIST_ENTRY *, const char *));
+static int display_history __P((WORD_LIST *));
+static void push_history __P((WORD_LIST *));
+static int expand_and_print_history __P((WORD_LIST *));
+
+#define AFLAG 0x01
+#define RFLAG 0x02
+#define WFLAG 0x04
+#define NFLAG 0x08
+#define SFLAG 0x10
+#define PFLAG 0x20
+#define CFLAG 0x40
+#define DFLAG 0x80
+
+int
+history_builtin (list)
+ WORD_LIST *list;
+{
+ int flags, opt, result, old_history_lines, obase;
+ char *filename, *delete_arg;
+ intmax_t delete_offset;
+
+ flags = 0;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "acd:npsrw")) != -1)
+ {
+ switch (opt)
+ {
+ case 'a':
+ flags |= AFLAG;
+ break;
+ case 'c':
+ flags |= CFLAG;
+ break;
+ case 'n':
+ flags |= NFLAG;
+ break;
+ case 'r':
+ flags |= RFLAG;
+ break;
+ case 'w':
+ flags |= WFLAG;
+ break;
+ case 's':
+ flags |= SFLAG;
+ break;
+ case 'd':
+ flags |= DFLAG;
+ delete_arg = list_optarg;
+ break;
+ case 'p':
+#if defined (BANG_HISTORY)
+ flags |= PFLAG;
+#endif
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ opt = flags & (AFLAG|RFLAG|WFLAG|NFLAG);
+ if (opt && opt != AFLAG && opt != RFLAG && opt != WFLAG && opt != NFLAG)
+ {
+ builtin_error (_("cannot use more than one of -anrw"));
+ return (EXECUTION_FAILURE);
+ }
+
+ /* clear the history, but allow other arguments to add to it again. */
+ if (flags & CFLAG)
+ {
+ bash_clear_history ();
+ if (list == 0)
+ return (EXECUTION_SUCCESS);
+ }
+
+ if (flags & SFLAG)
+ {
+ if (list)
+ push_history (list);
+ return (EXECUTION_SUCCESS);
+ }
+#if defined (BANG_HISTORY)
+ else if (flags & PFLAG)
+ {
+ if (list)
+ return (expand_and_print_history (list));
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+ }
+#endif
+ else if (flags & DFLAG)
+ {
+ if ((legal_number (delete_arg, &delete_offset) == 0)
+ || (delete_offset < history_base)
+ || (delete_offset > (history_base + history_length)))
+ {
+ sh_erange (delete_arg, _("history position"));
+ return (EXECUTION_FAILURE);
+ }
+ opt = delete_offset;
+ result = bash_delete_histent (opt - history_base);
+ /* Since remove_history changes history_length, this can happen if
+ we delete the last history entry. */
+ if (where_history () > history_length)
+ history_set_pos (history_length);
+ return (result ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
+ }
+ else if ((flags & (AFLAG|RFLAG|NFLAG|WFLAG|CFLAG)) == 0)
+ {
+ result = display_history (list);
+ return (sh_chkwrite (result));
+ }
+
+ filename = list ? list->word->word : get_string_value ("HISTFILE");
+ result = EXECUTION_SUCCESS;
+
+ if (flags & AFLAG) /* Append session's history to file. */
+ result = maybe_append_history (filename);
+ else if (flags & WFLAG) /* Write entire history. */
+ result = write_history (filename);
+ else if (flags & RFLAG) /* Read entire file. */
+ result = read_history (filename);
+ else if (flags & NFLAG) /* Read `new' history from file. */
+ {
+ /* Read all of the lines in the file that we haven't already read. */
+ old_history_lines = history_lines_in_file;
+ obase = history_base;
+
+ using_history ();
+ result = read_history_range (filename, history_lines_in_file, -1);
+ using_history ();
+
+ history_lines_in_file = where_history ();
+
+ /* If we're rewriting the history file at shell exit rather than just
+ appending the lines from this session to it, the question is whether
+ we reset history_lines_this_session to 0, losing any history entries
+ we had before we read the new entries from the history file, or
+ whether we count the new entries we just read from the file as
+ history lines added during this session.
+ Right now, we do the latter. This will cause these history entries
+ to be written to the history file along with any intermediate entries
+ we add when we do a `history -a', but the alternative is losing
+ them altogether. */
+ if (force_append_history == 0)
+ history_lines_this_session += history_lines_in_file - old_history_lines +
+ history_base - obase;
+ }
+
+ return (result ? EXECUTION_FAILURE : EXECUTION_SUCCESS);
+}
+
+/* Accessors for HIST_ENTRY lists that are called HLIST. */
+#define histline(i) (hlist[(i)]->line)
+#define histdata(i) (hlist[(i)]->data)
+
+static char *
+histtime (hlist, histtimefmt)
+ HIST_ENTRY *hlist;
+ const char *histtimefmt;
+{
+ static char timestr[128];
+ time_t t;
+
+ t = history_get_time (hlist);
+ if (t)
+ strftime (timestr, sizeof (timestr), histtimefmt, localtime (&t));
+ else
+ strcpy (timestr, "??");
+ return timestr;
+}
+
+static int
+display_history (list)
+ WORD_LIST *list;
+{
+ register int i;
+ intmax_t limit;
+ HIST_ENTRY **hlist;
+ char *histtimefmt, *timestr;
+
+ if (list)
+ {
+ if (get_numeric_arg (list, 0, &limit) == 0)
+ return (EXECUTION_FAILURE);
+
+ if (limit < 0)
+ limit = -limit;
+ }
+ else
+ limit = -1;
+
+ hlist = history_list ();
+
+ if (hlist)
+ {
+ for (i = 0; hlist[i]; i++)
+ ;
+
+ if (0 <= limit && limit < i)
+ i -= limit;
+ else
+ i = 0;
+
+ histtimefmt = get_string_value ("HISTTIMEFORMAT");
+
+ while (hlist[i])
+ {
+ QUIT;
+
+ timestr = (histtimefmt && *histtimefmt) ? histtime (hlist[i], histtimefmt) : (char *)NULL;
+ printf ("%5d%c %s%s\n", i + history_base,
+ histdata(i) ? '*' : ' ',
+ ((timestr && *timestr) ? timestr : ""),
+ histline(i));
+ i++;
+ }
+ }
+
+ return (EXECUTION_SUCCESS);
+}
+
+/* Remove the last entry in the history list and add each argument in
+ LIST to the history. */
+static void
+push_history (list)
+ WORD_LIST *list;
+{
+ char *s;
+
+ /* Delete the last history entry if it was a single entry added to the
+ history list (generally the `history -s' itself), or if `history -s'
+ is being used in a compound command and the compound command was
+ added to the history as a single element (command-oriented history).
+ If you don't want history -s to remove the compound command from the
+ history, change #if 0 to #if 1 below. */
+#if 0
+ if (hist_last_line_pushed == 0 && hist_last_line_added && bash_delete_last_history () == 0)
+#else
+ if (hist_last_line_pushed == 0 &&
+ (hist_last_line_added ||
+ (current_command_line_count > 0 && current_command_first_line_saved && command_oriented_history))
+ && bash_delete_last_history () == 0)
+#endif
+ return;
+
+ s = string_list (list);
+ /* Call check_add_history with FORCE set to 1 to skip the check against
+ current_command_line_count. If history -s is used in a compound
+ command, the above code will delete the compound command's history
+ entry and this call will add the line to the history as a separate
+ entry. Without FORCE=1, if current_command_line_count were > 1, the
+ line would be appended to the entry before the just-deleted entry. */
+ check_add_history (s, 1); /* obeys HISTCONTROL, HISTIGNORE */
+
+ hist_last_line_pushed = 1; /* XXX */
+ free (s);
+}
+
+#if defined (BANG_HISTORY)
+static int
+expand_and_print_history (list)
+ WORD_LIST *list;
+{
+ char *s;
+ int r, result;
+
+ if (hist_last_line_pushed == 0 && hist_last_line_added && bash_delete_last_history () == 0)
+ return EXECUTION_FAILURE;
+ result = EXECUTION_SUCCESS;
+ while (list)
+ {
+ r = history_expand (list->word->word, &s);
+ if (r < 0)
+ {
+ builtin_error (_("%s: history expansion failed"), list->word->word);
+ result = EXECUTION_FAILURE;
+ }
+ else
+ {
+ fputs (s, stdout);
+ putchar ('\n');
+ }
+ FREE (s);
+ list = list->next;
+ }
+ fflush (stdout);
+ return result;
+}
+#endif /* BANG_HISTORY */
+#endif /* HISTORY */
diff --git a/builtins/inlib.def b/builtins/inlib.def
new file mode 100644
index 0000000..c4faf0d
--- /dev/null
+++ b/builtins/inlib.def
@@ -0,0 +1,80 @@
+This file is inlib.def, from which is created inlib.c.
+It implements the Apollo-specific builtin "inlib" in Bash.
+
+Copyright (C) 1987-2002 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES inlib.c
+#include <config.h>
+
+#include <stdio.h>
+#include "../shell.h"
+
+$BUILTIN inlib
+$FUNCTION inlib_builtin
+$DEPENDS_ON apollo
+$SHORT_DOC inlib pathname [pathname...]
+Install user-supplied library.
+
+Install a user-supplied library specified by pathname in the current
+shell process. The library is used to resolve external references
+in programs and libraries loaded after its installation. Note
+that the library is not loaded into the address space unless it is
+needed to resolve an external reference. The list of inlibed
+libraries is passed to all children of the current shell.
+
+Exit Status:
+Returns success unless PATHNAME is not found or an error occurs.
+$END
+
+#if defined (apollo)
+
+#include <apollo/base.h>
+#include <apollo/loader.h>
+
+inlib_builtin (list)
+ WORD_LIST *list;
+{
+ status_$t status;
+ int return_value;
+ short len;
+
+ if (!list)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ return_value = EXECUTION_SUCCESS;
+
+ while (list)
+ {
+ len = (short)strlen (list->word->word);
+ loader_$inlib (list->word->word, len, &status);
+
+ if (status.all != status_$ok)
+ {
+ builtin_error (_("%s: inlib failed"), list->word->word);
+ return_value = EXECUTION_FAILURE;
+ }
+
+ list = list->next;
+ }
+
+ return (return_value);
+}
+#endif /* apollo */
diff --git a/builtins/jobs.def b/builtins/jobs.def
new file mode 100644
index 0000000..b14e91f
--- /dev/null
+++ b/builtins/jobs.def
@@ -0,0 +1,298 @@
+This file is jobs.def, from which is created jobs.c.
+It implements the builtins "jobs" and "disown" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES jobs.c
+
+$BUILTIN jobs
+$FUNCTION jobs_builtin
+$DEPENDS_ON JOB_CONTROL
+$SHORT_DOC jobs [-lnprs] [jobspec ...] or jobs -x command [args]
+Display status of jobs.
+
+Lists the active jobs. JOBSPEC restricts output to that job.
+Without options, the status of all active jobs is displayed.
+
+Options:
+ -l lists process IDs in addition to the normal information
+ -n list only processes that have changed status since the last
+ notification
+ -p lists process IDs only
+ -r restrict output to running jobs
+ -s restrict output to stopped jobs
+
+If -x is supplied, COMMAND is run after all job specifications that
+appear in ARGS have been replaced with the process ID of that job's
+process group leader.
+
+Exit Status:
+Returns success unless an invalid option is given or an error occurs.
+If -x is used, returns the exit status of COMMAND.
+$END
+
+#include <config.h>
+
+#if defined (JOB_CONTROL)
+#include "../bashtypes.h"
+#include <signal.h>
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../jobs.h"
+#include "../execute_cmd.h"
+#include "bashgetopt.h"
+#include "common.h"
+
+#define JSTATE_ANY 0x0
+#define JSTATE_RUNNING 0x1
+#define JSTATE_STOPPED 0x2
+
+static int execute_list_with_replacements __P((WORD_LIST *));
+
+/* The `jobs' command. Prints outs a list of active jobs. If the
+ argument `-l' is given, then the process id's are printed also.
+ If the argument `-p' is given, print the process group leader's
+ pid only. If `-n' is given, only processes that have changed
+ status since the last notification are printed. If -x is given,
+ replace all job specs with the pid of the appropriate process
+ group leader and execute the command. The -r and -s options mean
+ to print info about running and stopped jobs only, respectively. */
+int
+jobs_builtin (list)
+ WORD_LIST *list;
+{
+ int form, execute, state, opt, any_failed, job;
+ sigset_t set, oset;
+
+ execute = any_failed = 0;
+ form = JLIST_STANDARD;
+ state = JSTATE_ANY;
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "lpnxrs")) != -1)
+ {
+ switch (opt)
+ {
+ case 'l':
+ form = JLIST_LONG;
+ break;
+ case 'p':
+ form = JLIST_PID_ONLY;
+ break;
+ case 'n':
+ form = JLIST_CHANGED_ONLY;
+ break;
+ case 'x':
+ if (form != JLIST_STANDARD)
+ {
+ builtin_error (_("no other options allowed with `-x'"));
+ return (EXECUTION_FAILURE);
+ }
+ execute++;
+ break;
+ case 'r':
+ state = JSTATE_RUNNING;
+ break;
+ case 's':
+ state = JSTATE_STOPPED;
+ break;
+
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+
+ list = loptend;
+
+ if (execute)
+ return (execute_list_with_replacements (list));
+
+ if (!list)
+ {
+ switch (state)
+ {
+ case JSTATE_ANY:
+ list_all_jobs (form);
+ break;
+ case JSTATE_RUNNING:
+ list_running_jobs (form);
+ break;
+ case JSTATE_STOPPED:
+ list_stopped_jobs (form);
+ break;
+ }
+ return (EXECUTION_SUCCESS);
+ }
+
+ while (list)
+ {
+ BLOCK_CHILD (set, oset);
+ job = get_job_spec (list);
+
+ if ((job == NO_JOB) || jobs == 0 || get_job_by_jid (job) == 0)
+ {
+ sh_badjob (list->word->word);
+ any_failed++;
+ }
+ else if (job != DUP_JOB)
+ list_one_job ((JOB *)NULL, form, 0, job);
+
+ UNBLOCK_CHILD (oset);
+ list = list->next;
+ }
+ return (any_failed ? EXECUTION_FAILURE : EXECUTION_SUCCESS);
+}
+
+static int
+execute_list_with_replacements (list)
+ WORD_LIST *list;
+{
+ register WORD_LIST *l;
+ int job, result;
+ COMMAND *command;
+ JOB *j;
+
+ /* First do the replacement of job specifications with pids. */
+ for (l = list; l; l = l->next)
+ {
+ if (l->word->word[0] == '%') /* we have a winner */
+ {
+ job = get_job_spec (l);
+
+ /* A bad job spec is not really a job spec! Pass it through. */
+ if (INVALID_JOB (job))
+ continue;
+
+ j = get_job_by_jid (job);
+ free (l->word->word);
+ l->word->word = itos (j->pgrp);
+ }
+ }
+
+ /* Next make a new simple command and execute it. */
+ begin_unwind_frame ("jobs_builtin");
+
+ command = make_bare_simple_command ();
+ command->value.Simple->words = copy_word_list (list);
+ command->value.Simple->redirects = (REDIRECT *)NULL;
+ command->flags |= CMD_INHIBIT_EXPANSION;
+ command->value.Simple->flags |= CMD_INHIBIT_EXPANSION;
+
+ add_unwind_protect (dispose_command, command);
+ result = execute_command (command);
+ dispose_command (command);
+
+ discard_unwind_frame ("jobs_builtin");
+ return (result);
+}
+#endif /* JOB_CONTROL */
+
+$BUILTIN disown
+$FUNCTION disown_builtin
+$DEPENDS_ON JOB_CONTROL
+$SHORT_DOC disown [-h] [-ar] [jobspec ...]
+Remove jobs from current shell.
+
+Removes each JOBSPEC argument from the table of active jobs. Without
+any JOBSPECs, the shell uses its notion of the current job.
+
+Options:
+ -a remove all jobs if JOBSPEC is not supplied
+ -h mark each JOBSPEC so that SIGHUP is not sent to the job if the
+ shell receives a SIGHUP
+ -r remove only running jobs
+
+Exit Status:
+Returns success unless an invalid option or JOBSPEC is given.
+$END
+
+#if defined (JOB_CONTROL)
+int
+disown_builtin (list)
+ WORD_LIST *list;
+{
+ int opt, job, retval, nohup_only, running_jobs, all_jobs;
+ sigset_t set, oset;
+ intmax_t pid_value;
+
+ nohup_only = running_jobs = all_jobs = 0;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "ahr")) != -1)
+ {
+ switch (opt)
+ {
+ case 'a':
+ all_jobs = 1;
+ break;
+ case 'h':
+ nohup_only = 1;
+ break;
+ case 'r':
+ running_jobs = 1;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+ retval = EXECUTION_SUCCESS;
+
+ /* `disown -a' or `disown -r' */
+ if (list == 0 && (all_jobs || running_jobs))
+ {
+ if (nohup_only)
+ nohup_all_jobs (running_jobs);
+ else
+ delete_all_jobs (running_jobs);
+ return (EXECUTION_SUCCESS);
+ }
+
+ do
+ {
+ BLOCK_CHILD (set, oset);
+ job = (list && legal_number (list->word->word, &pid_value) && pid_value == (pid_t) pid_value)
+ ? get_job_by_pid ((pid_t) pid_value, 0)
+ : get_job_spec (list);
+
+ if (job == NO_JOB || jobs == 0 || INVALID_JOB (job))
+ {
+ sh_badjob (list ? list->word->word : _("current"));
+ retval = EXECUTION_FAILURE;
+ }
+ else if (nohup_only)
+ nohup_job (job);
+ else
+ delete_job (job, 1);
+ UNBLOCK_CHILD (oset);
+
+ if (list)
+ list = list->next;
+ }
+ while (list);
+
+ return (retval);
+}
+#endif /* JOB_CONTROL */
diff --git a/builtins/kill.def b/builtins/kill.def
new file mode 100644
index 0000000..18c3667
--- /dev/null
+++ b/builtins/kill.def
@@ -0,0 +1,265 @@
+This file is kill.def, from which is created kill.c.
+It implements the builtin "kill" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES kill.c
+
+$BUILTIN kill
+$FUNCTION kill_builtin
+$SHORT_DOC kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
+Send a signal to a job.
+
+Send the processes identified by PID or JOBSPEC the signal named by
+SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then
+SIGTERM is assumed.
+
+Options:
+ -s sig SIG is a signal name
+ -n sig SIG is a signal number
+ -l list the signal names; if arguments follow `-l' they are
+ assumed to be signal numbers for which names should be listed
+
+Kill is a shell builtin for two reasons: it allows job IDs to be used
+instead of process IDs, and allows processes to be killed if the limit
+on processes that you can create is reached.
+
+Exit Status:
+Returns success unless an invalid option is given or an error occurs.
+$END
+
+#include <config.h>
+
+#include <stdio.h>
+#include <errno.h>
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../trap.h"
+#include "../jobs.h"
+#include "common.h"
+
+/* Not all systems declare ERRNO in errno.h... and some systems #define it! */
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+extern int posixly_correct;
+
+static void kill_error __P((pid_t, int));
+
+#if !defined (CONTINUE_AFTER_KILL_ERROR)
+# define CONTINUE_OR_FAIL return (EXECUTION_FAILURE)
+#else
+# define CONTINUE_OR_FAIL goto continue_killing
+#endif /* CONTINUE_AFTER_KILL_ERROR */
+
+/* Here is the kill builtin. We only have it so that people can type
+ kill -KILL %1? No, if you fill up the process table this way you
+ can still kill some. */
+int
+kill_builtin (list)
+ WORD_LIST *list;
+{
+ int sig, any_succeeded, listing, saw_signal, dflags;
+ char *sigspec, *word;
+ pid_t pid;
+ intmax_t pid_value;
+
+ if (list == 0)
+ {
+ builtin_usage ();
+ return (EXECUTION_FAILURE);
+ }
+
+ any_succeeded = listing = saw_signal = 0;
+ sig = SIGTERM;
+ sigspec = "TERM";
+
+ dflags = DSIG_NOCASE | ((posixly_correct == 0) ? DSIG_SIGPREFIX : 0);
+ /* Process options. */
+ while (list)
+ {
+ word = list->word->word;
+
+ if (ISOPTION (word, 'l'))
+ {
+ listing++;
+ list = list->next;
+ }
+ else if (ISOPTION (word, 's') || ISOPTION (word, 'n'))
+ {
+ list = list->next;
+ if (list)
+ {
+ sigspec = list->word->word;
+ if (sigspec[0] == '0' && sigspec[1] == '\0')
+ sig = 0;
+ else
+ sig = decode_signal (sigspec, dflags);
+ list = list->next;
+#if 0
+ saw_signal++; /* XXX - for bash-4.2 */
+#endif
+ }
+ else
+ {
+ sh_needarg (word);
+ return (EXECUTION_FAILURE);
+ }
+ }
+ else if (ISOPTION (word, '-'))
+ {
+ list = list->next;
+ break;
+ }
+ else if (ISOPTION (word, '?'))
+ {
+ builtin_usage ();
+ return (EXECUTION_SUCCESS);
+ }
+ /* If this is a signal specification then process it. We only process
+ the first one seen; other arguments may signify process groups (e.g,
+ -num == process group num). */
+ else if (*word == '-' && saw_signal == 0)
+ {
+ sigspec = word + 1;
+ sig = decode_signal (sigspec, dflags);
+ saw_signal++;
+ list = list->next;
+ }
+ else
+ break;
+ }
+
+ if (listing)
+ return (display_signal_list (list, 0));
+
+ /* OK, we are killing processes. */
+ if (sig == NO_SIG)
+ {
+ sh_invalidsig (sigspec);
+ return (EXECUTION_FAILURE);
+ }
+
+ if (list == 0)
+ {
+ builtin_usage ();
+ return (EXECUTION_FAILURE);
+ }
+
+ while (list)
+ {
+ word = list->word->word;
+
+ if (*word == '-')
+ word++;
+
+ /* Use the entire argument in case of minus sign presence. */
+ if (*word && legal_number (list->word->word, &pid_value) && (pid_value == (pid_t)pid_value))
+ {
+ pid = (pid_t) pid_value;
+
+ if (kill_pid (pid, sig, pid < -1) < 0)
+ {
+ if (errno == EINVAL)
+ sh_invalidsig (sigspec);
+ else
+ kill_error (pid, errno);
+ CONTINUE_OR_FAIL;
+ }
+ else
+ any_succeeded++;
+ }
+#if defined (JOB_CONTROL)
+ else if (*list->word->word && *list->word->word != '%')
+ {
+ builtin_error (_("%s: arguments must be process or job IDs"), list->word->word);
+ CONTINUE_OR_FAIL;
+ }
+ else if (*word)
+ /* Posix.2 says you can kill without job control active (4.32.4) */
+ { /* Must be a job spec. Check it out. */
+ int job;
+ sigset_t set, oset;
+ JOB *j;
+
+ BLOCK_CHILD (set, oset);
+ job = get_job_spec (list);
+
+ if (INVALID_JOB (job))
+ {
+ if (job != DUP_JOB)
+ sh_badjob (list->word->word);
+ UNBLOCK_CHILD (oset);
+ CONTINUE_OR_FAIL;
+ }
+
+ j = get_job_by_jid (job);
+ /* Job spec used. Kill the process group. If the job was started
+ without job control, then its pgrp == shell_pgrp, so we have
+ to be careful. We take the pid of the first job in the pipeline
+ in that case. */
+ pid = IS_JOBCONTROL (job) ? j->pgrp : j->pipe->pid;
+
+ UNBLOCK_CHILD (oset);
+
+ if (kill_pid (pid, sig, 1) < 0)
+ {
+ if (errno == EINVAL)
+ sh_invalidsig (sigspec);
+ else
+ kill_error (pid, errno);
+ CONTINUE_OR_FAIL;
+ }
+ else
+ any_succeeded++;
+ }
+#endif /* !JOB_CONTROL */
+ else
+ {
+ sh_badpid (list->word->word);
+ CONTINUE_OR_FAIL;
+ }
+ continue_killing:
+ list = list->next;
+ }
+
+ return (any_succeeded ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
+}
+
+static void
+kill_error (pid, e)
+ pid_t pid;
+ int e;
+{
+ char *x;
+
+ x = strerror (e);
+ if (x == 0)
+ x = _("Unknown error");
+ builtin_error ("(%ld) - %s", (long)pid, x);
+}
diff --git a/builtins/let.def b/builtins/let.def
new file mode 100644
index 0000000..2601fb9
--- /dev/null
+++ b/builtins/let.def
@@ -0,0 +1,129 @@
+This file is let.def, from which is created let.c.
+It implements the builtin "let" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$BUILTIN let
+$FUNCTION let_builtin
+$PRODUCES let.c
+$SHORT_DOC let arg [arg ...]
+Evaluate arithmetic expressions.
+
+Evaluate each ARG as an arithmetic expression. Evaluation is done in
+fixed-width integers with no check for overflow, though division by 0
+is trapped and flagged as an error. The following list of operators is
+grouped into levels of equal-precedence operators. The levels are listed
+in order of decreasing precedence.
+
+ id++, id-- variable post-increment, post-decrement
+ ++id, --id variable pre-increment, pre-decrement
+ -, + unary minus, plus
+ !, ~ logical and bitwise negation
+ ** exponentiation
+ *, /, % multiplication, division, remainder
+ +, - addition, subtraction
+ <<, >> left and right bitwise shifts
+ <=, >=, <, > comparison
+ ==, != equality, inequality
+ & bitwise AND
+ ^ bitwise XOR
+ | bitwise OR
+ && logical AND
+ || logical OR
+ expr ? expr : expr
+ conditional operator
+ =, *=, /=, %=,
+ +=, -=, <<=, >>=,
+ &=, ^=, |= assignment
+
+Shell variables are allowed as operands. The name of the variable
+is replaced by its value (coerced to a fixed-width integer) within
+an expression. The variable need not have its integer attribute
+turned on to be used in an expression.
+
+Operators are evaluated in order of precedence. Sub-expressions in
+parentheses are evaluated first and may override the precedence
+rules above.
+
+Exit Status:
+If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise..
+$END
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "common.h"
+
+/* Arithmetic LET function. */
+int
+let_builtin (list)
+ WORD_LIST *list;
+{
+ intmax_t ret;
+ int expok;
+
+ /* Skip over leading `--' argument. */
+ if (list && list->word && ISOPTION (list->word->word, '-'))
+ list = list->next;
+
+ if (list == 0)
+ {
+ builtin_error (_("expression expected"));
+ return (EXECUTION_FAILURE);
+ }
+
+ for (; list; list = list->next)
+ {
+ ret = evalexp (list->word->word, &expok);
+ if (expok == 0)
+ return (EXECUTION_FAILURE);
+ }
+
+ return ((ret == 0) ? EXECUTION_FAILURE : EXECUTION_SUCCESS);
+}
+
+#ifdef INCLUDE_UNUSED
+int
+exp_builtin (list)
+ WORD_LIST *list;
+{
+ char *exp;
+ intmax_t ret;
+ int expok;
+
+ if (list == 0)
+ {
+ builtin_error (_("expression expected"));
+ return (EXECUTION_FAILURE);
+ }
+
+ exp = string_list (list);
+ ret = evalexp (exp, &expok);
+ (void)free (exp);
+ return (((ret == 0) || (expok == 0)) ? EXECUTION_FAILURE : EXECUTION_SUCCESS);
+}
+#endif
diff --git a/builtins/mapfile.def b/builtins/mapfile.def
new file mode 100644
index 0000000..0946de3
--- /dev/null
+++ b/builtins/mapfile.def
@@ -0,0 +1,351 @@
+This file is mapfile.def, from which is created mapfile.c.
+It implements the builtin "mapfile" in Bash.
+
+Copyright (C) 2005-2006 Rocky Bernstein for Free Software Foundation, Inc.
+Copyright (C) 2008,2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES mapfile.c
+
+$BUILTIN mapfile
+$FUNCTION mapfile_builtin
+$SHORT_DOC mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]
+Read lines from the standard input into an indexed array variable.
+
+Read lines from the standard input into the indexed array variable ARRAY, or
+from file descriptor FD if the -u option is supplied. The variable MAPFILE
+is the default ARRAY.
+
+Options:
+ -n count Copy at most COUNT lines. If COUNT is 0, all lines are copied.
+ -O origin Begin assigning to ARRAY at index ORIGIN. The default index is 0.
+ -s count Discard the first COUNT lines read.
+ -t Remove a trailing newline from each line read.
+ -u fd Read lines from file descriptor FD instead of the standard input.
+ -C callback Evaluate CALLBACK each time QUANTUM lines are read.
+ -c quantum Specify the number of lines read between each call to CALLBACK.
+
+Arguments:
+ ARRAY Array variable name to use for file data.
+
+If -C is supplied without -c, the default quantum is 5000. When
+CALLBACK is evaluated, it is supplied the index of the next array
+element to be assigned as an additional argument.
+
+If not supplied with an explicit origin, mapfile will clear ARRAY before
+assigning to it.
+
+Exit Status:
+Returns success unless an invalid option is given or ARRAY is readonly or
+not an indexed array.
+$END
+
+$BUILTIN readarray
+$FUNCTION mapfile_builtin
+$SHORT_DOC readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c quantum] [array]
+Read lines from a file into an array variable.
+
+A synonym for `mapfile'.
+$END
+
+#include <config.h>
+
+#include "builtins.h"
+#include "posixstat.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+#include "bashintl.h"
+
+#include <stdio.h>
+#include <errno.h>
+
+#include "../bashintl.h"
+#include "../shell.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+#if defined (ARRAY_VARS)
+
+#define DEFAULT_ARRAY_NAME "MAPFILE"
+
+/* The value specifying how frequently `mapfile' calls the callback. */
+#define DEFAULT_QUANTUM 5000
+
+/* Values for FLAGS */
+#define MAPF_CLEARARRAY 0x01
+#define MAPF_CHOP 0x02
+
+static int
+run_callback(callback, current_index)
+ const char *callback;
+ unsigned int current_index;
+{
+ unsigned int execlen;
+ char *execstr;
+ int flags;
+
+ execlen = strlen (callback) + 10;
+ /* 1 for space between %s and %d,
+ another 1 for the last nul char for C string. */
+ execlen += 2;
+ execstr = xmalloc (execlen);
+
+ flags = SEVAL_NOHIST;
+#if 0
+ if (interactive)
+ flags |= SEVAL_INTERACT;
+#endif
+ snprintf (execstr, execlen, "%s %d", callback, current_index);
+ return parse_and_execute(execstr, NULL, flags);
+}
+
+static void
+do_chop(line)
+ char * line;
+{
+ int length;
+
+ length = strlen (line);
+ if (length && line[length-1] == '\n')
+ line[length-1] = '\0';
+}
+
+static int
+mapfile (fd, line_count_goal, origin, nskip, callback_quantum, callback, array_name, flags)
+ int fd;
+ long line_count_goal, origin, nskip, callback_quantum;
+ char *callback, *array_name;
+ int flags;
+{
+ char *line;
+ size_t line_length;
+ unsigned int array_index, line_count;
+ SHELL_VAR *entry;
+ int unbuffered_read;
+
+ line = NULL;
+ line_length = 0;
+ unbuffered_read = 0;
+
+ /* The following check should be done before reading any lines. Doing it
+ here allows us to call bind_array_element instead of bind_array_variable
+ and skip the variable lookup on every call. */
+ entry = find_or_make_array_variable (array_name, 1);
+ if (entry == 0 || readonly_p (entry) || noassign_p (entry))
+ {
+ if (entry && readonly_p (entry))
+ err_readonly (array_name);
+
+ return (EXECUTION_FAILURE);
+ }
+ else if (array_p (entry) == 0)
+ {
+ builtin_error (_("%s: not an indexed array"), array_name);
+ return (EXECUTION_FAILURE);
+ }
+
+ if (flags & MAPF_CLEARARRAY)
+ array_flush (array_cell (entry));
+
+#ifndef __CYGWIN__
+ unbuffered_read = (lseek (fd, 0L, SEEK_CUR) < 0) && (errno == ESPIPE);
+#else
+ unbuffered_read = 1;
+#endif
+
+ zreset ();
+
+ /* Skip any lines at beginning of file? */
+ for (line_count = 0; line_count < nskip; line_count++)
+ if (zgetline (fd, &line, &line_length, unbuffered_read) < 0)
+ break;
+
+ line = 0;
+ line_length = 0;
+
+ /* Reset the buffer for bash own stream */
+ interrupt_immediately++;
+ for (array_index = origin, line_count = 1;
+ zgetline (fd, &line, &line_length, unbuffered_read) != -1;
+ array_index++, line_count++)
+ {
+ /* Have we exceeded # of lines to store? */
+ if (line_count_goal != 0 && line_count > line_count_goal)
+ break;
+
+ /* Remove trailing newlines? */
+ if (flags & MAPF_CHOP)
+ do_chop (line);
+
+ /* Has a callback been registered and if so is it time to call it? */
+ if (callback && line_count && (line_count % callback_quantum) == 0)
+ {
+ run_callback (callback, array_index);
+
+ /* Reset the buffer for bash own stream. */
+ if (unbuffered_read == 0)
+ zsyncfd (fd);
+ }
+
+ bind_array_element (entry, array_index, line, 0);
+ }
+
+ xfree (line);
+
+ if (unbuffered_read == 0)
+ zsyncfd (fd);
+
+ interrupt_immediately--;
+ return EXECUTION_SUCCESS;
+}
+
+int
+mapfile_builtin (list)
+ WORD_LIST *list;
+{
+ int opt, code, fd, clear_array, flags;
+ intmax_t intval;
+ long lines, origin, nskip, callback_quantum;
+ char *array_name, *callback;
+
+ clear_array = 1;
+ fd = 0;
+ lines = origin = nskip = 0;
+ flags = MAPF_CLEARARRAY;
+ callback_quantum = DEFAULT_QUANTUM;
+ callback = 0;
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "u:n:O:tC:c:s:")) != -1)
+ {
+ switch (opt)
+ {
+ case 'u':
+ code = legal_number (list_optarg, &intval);
+ if (code == 0 || intval < 0 || intval != (int)intval)
+ {
+ builtin_error (_("%s: invalid file descriptor specification"), list_optarg);
+ return (EXECUTION_FAILURE);
+ }
+ else
+ fd = intval;
+
+ if (sh_validfd (fd) == 0)
+ {
+ builtin_error (_("%d: invalid file descriptor: %s"), fd, strerror (errno));
+ return (EXECUTION_FAILURE);
+ }
+ break;
+
+ case 'n':
+ code = legal_number (list_optarg, &intval);
+ if (code == 0 || intval < 0 || intval != (unsigned)intval)
+ {
+ builtin_error (_("%s: invalid line count"), list_optarg);
+ return (EXECUTION_FAILURE);
+ }
+ else
+ lines = intval;
+ break;
+
+ case 'O':
+ code = legal_number (list_optarg, &intval);
+ if (code == 0 || intval < 0 || intval != (unsigned)intval)
+ {
+ builtin_error (_("%s: invalid array origin"), list_optarg);
+ return (EXECUTION_FAILURE);
+ }
+ else
+ origin = intval;
+ flags &= ~MAPF_CLEARARRAY;
+ break;
+ case 't':
+ flags |= MAPF_CHOP;
+ break;
+ case 'C':
+ callback = list_optarg;
+ break;
+ case 'c':
+ code = legal_number (list_optarg, &intval);
+ if (code == 0 || intval <= 0 || intval != (unsigned)intval)
+ {
+ builtin_error (_("%s: invalid callback quantum"), list_optarg);
+ return (EXECUTION_FAILURE);
+ }
+ else
+ callback_quantum = intval;
+ break;
+ case 's':
+ code = legal_number (list_optarg, &intval);
+ if (code == 0 || intval < 0 || intval != (unsigned)intval)
+ {
+ builtin_error (_("%s: invalid line count"), list_optarg);
+ return (EXECUTION_FAILURE);
+ }
+ else
+ nskip = intval;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ if (list == 0)
+ array_name = DEFAULT_ARRAY_NAME;
+ else if (list->word == 0 || list->word->word == 0)
+ {
+ builtin_error ("internal error: getting variable name");
+ return (EXECUTION_FAILURE);
+ }
+ else if (list->word->word[0] == '\0')
+ {
+ builtin_error (_("empty array variable name"));
+ return (EX_USAGE);
+ }
+ else
+ array_name = list->word->word;
+
+ if (legal_identifier (array_name) == 0 && valid_array_reference (array_name) == 0)
+ {
+ sh_invalidid (array_name);
+ return (EXECUTION_FAILURE);
+ }
+
+ return mapfile (fd, lines, origin, nskip, callback_quantum, callback, array_name, flags);
+}
+
+#else
+
+int
+mapfile_builtin (list)
+ WORD_LIST *list;
+{
+ builtin_error (_("array variable support required"));
+ return (EXECUTION_FAILURE);
+}
+
+#endif /* ARRAY_VARS */
diff --git a/builtins/mkbuiltins.c b/builtins/mkbuiltins.c
new file mode 100644
index 0000000..cdd45e4
--- /dev/null
+++ b/builtins/mkbuiltins.c
@@ -0,0 +1,1595 @@
+/* mkbuiltins.c - Create builtins.c, builtext.h, and builtdoc.c from
+ a single source file called builtins.def. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (CROSS_COMPILING)
+# include <config.h>
+#else /* CROSS_COMPILING */
+/* A conservative set of defines based on POSIX/SUS3/XPG6 */
+# define HAVE_UNISTD_H
+# define HAVE_STRING_H
+# define HAVE_STDLIB_H
+
+# define HAVE_RENAME
+#endif /* CROSS_COMPILING */
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#ifndef _MINIX
+# include "../bashtypes.h"
+# if defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+# endif
+#endif
+
+#include "posixstat.h"
+#include "filecntl.h"
+
+#include "../bashansi.h"
+#include <stdio.h>
+#include <errno.h>
+
+#include "stdc.h"
+
+#define DOCFILE "builtins.texi"
+
+#ifndef errno
+extern int errno;
+#endif
+
+static char *xmalloc (), *xrealloc ();
+
+#if !defined (__STDC__) && !defined (strcpy)
+extern char *strcpy ();
+#endif /* !__STDC__ && !strcpy */
+
+#define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x))
+#define whitespace(c) (((c) == ' ') || ((c) == '\t'))
+
+/* Flag values that builtins can have. */
+#define BUILTIN_FLAG_SPECIAL 0x01
+#define BUILTIN_FLAG_ASSIGNMENT 0x02
+#define BUILTIN_FLAG_POSIX_BUILTIN 0x04
+
+#define BASE_INDENT 4
+
+/* If this stream descriptor is non-zero, then write
+ texinfo documentation to it. */
+FILE *documentation_file = (FILE *)NULL;
+
+/* Non-zero means to only produce documentation. */
+int only_documentation = 0;
+
+/* Non-zero means to not do any productions. */
+int inhibit_production = 0;
+
+/* Non-zero means to produce separate help files for each builtin, named by
+ the builtin name, in `./helpfiles'. */
+int separate_helpfiles = 0;
+
+/* Non-zero means to create single C strings for each `longdoc', with
+ embedded newlines, for ease of translation. */
+int single_longdoc_strings = 1;
+
+/* The name of a directory into which the separate external help files will
+ eventually be installed. */
+char *helpfile_directory;
+
+/* The name of a directory to precede the filename when reporting
+ errors. */
+char *error_directory = (char *)NULL;
+
+/* The name of the structure file. */
+char *struct_filename = (char *)NULL;
+
+/* The name of the external declaration file. */
+char *extern_filename = (char *)NULL;
+
+/* Here is a structure for manipulating arrays of data. */
+typedef struct {
+ int size; /* Number of slots allocated to array. */
+ int sindex; /* Current location in array. */
+ int width; /* Size of each element. */
+ int growth_rate; /* How fast to grow. */
+ char **array; /* The array itself. */
+} ARRAY;
+
+/* Here is a structure defining a single BUILTIN. */
+typedef struct {
+ char *name; /* The name of this builtin. */
+ char *function; /* The name of the function to call. */
+ char *shortdoc; /* The short documentation for this builtin. */
+ char *docname; /* Possible name for documentation string. */
+ ARRAY *longdoc; /* The long documentation for this builtin. */
+ ARRAY *dependencies; /* Null terminated array of #define names. */
+ int flags; /* Flags for this builtin. */
+} BUILTIN_DESC;
+
+/* Here is a structure which defines a DEF file. */
+typedef struct {
+ char *filename; /* The name of the input def file. */
+ ARRAY *lines; /* The contents of the file. */
+ int line_number; /* The current line number. */
+ char *production; /* The name of the production file. */
+ FILE *output; /* Open file stream for PRODUCTION. */
+ ARRAY *builtins; /* Null terminated array of BUILTIN_DESC *. */
+} DEF_FILE;
+
+/* The array of all builtins encountered during execution of this code. */
+ARRAY *saved_builtins = (ARRAY *)NULL;
+
+/* The Posix.2 so-called `special' builtins. */
+char *special_builtins[] =
+{
+ ":", ".", "source", "break", "continue", "eval", "exec", "exit",
+ "export", "readonly", "return", "set", "shift", "times", "trap", "unset",
+ (char *)NULL
+};
+
+/* The builtin commands that take assignment statements as arguments. */
+char *assignment_builtins[] =
+{
+ "alias", "declare", "export", "local", "readonly", "typeset",
+ (char *)NULL
+};
+
+/* The builtin commands that are special to the POSIX search order. */
+char *posix_builtins[] =
+{
+ "alias", "bg", "cd", "command", "false", "fc", "fg", "getopts", "jobs",
+ "kill", "newgrp", "pwd", "read", "true", "umask", "unalias", "wait",
+ (char *)NULL
+};
+
+/* Forward declarations. */
+static int is_special_builtin ();
+static int is_assignment_builtin ();
+static int is_posix_builtin ();
+
+#if !defined (HAVE_RENAME)
+static int rename ();
+#endif
+
+void extract_info ();
+
+void file_error ();
+void line_error ();
+
+void write_file_headers ();
+void write_file_footers ();
+void write_ifdefs ();
+void write_endifs ();
+void write_documentation ();
+void write_longdocs ();
+void write_builtins ();
+
+int write_helpfiles ();
+
+void free_defs ();
+void add_documentation ();
+
+void must_be_building ();
+void remove_trailing_whitespace ();
+
+#define document_name(b) ((b)->docname ? (b)->docname : (b)->name)
+
+
+/* For each file mentioned on the command line, process it and
+ write the information to STRUCTFILE and EXTERNFILE, while
+ creating the production file if neccessary. */
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ int arg_index = 1;
+ FILE *structfile, *externfile;
+ char *documentation_filename, *temp_struct_filename;
+
+ structfile = externfile = (FILE *)NULL;
+ documentation_filename = DOCFILE;
+ temp_struct_filename = (char *)NULL;
+
+ while (arg_index < argc && argv[arg_index][0] == '-')
+ {
+ char *arg = argv[arg_index++];
+
+ if (strcmp (arg, "-externfile") == 0)
+ extern_filename = argv[arg_index++];
+ else if (strcmp (arg, "-structfile") == 0)
+ struct_filename = argv[arg_index++];
+ else if (strcmp (arg, "-noproduction") == 0)
+ inhibit_production = 1;
+ else if (strcmp (arg, "-document") == 0)
+ documentation_file = fopen (documentation_filename, "w");
+ else if (strcmp (arg, "-D") == 0)
+ {
+ int len;
+
+ if (error_directory)
+ free (error_directory);
+
+ error_directory = xmalloc (2 + strlen (argv[arg_index]));
+ strcpy (error_directory, argv[arg_index]);
+ len = strlen (error_directory);
+
+ if (len && error_directory[len - 1] != '/')
+ strcat (error_directory, "/");
+
+ arg_index++;
+ }
+ else if (strcmp (arg, "-documentonly") == 0)
+ {
+ only_documentation = 1;
+ documentation_file = fopen (documentation_filename, "w");
+ }
+ else if (strcmp (arg, "-H") == 0)
+ {
+ separate_helpfiles = 1;
+ helpfile_directory = argv[arg_index++];
+ }
+ else if (strcmp (arg, "-S") == 0)
+ single_longdoc_strings = 0;
+ else
+ {
+ fprintf (stderr, "%s: Unknown flag %s.\n", argv[0], arg);
+ exit (2);
+ }
+ }
+
+ /* If there are no files to process, just quit now. */
+ if (arg_index == argc)
+ exit (0);
+
+ if (!only_documentation)
+ {
+ /* Open the files. */
+ if (struct_filename)
+ {
+ temp_struct_filename = xmalloc (15);
+ sprintf (temp_struct_filename, "mk-%ld", (long) getpid ());
+ structfile = fopen (temp_struct_filename, "w");
+
+ if (!structfile)
+ file_error (temp_struct_filename);
+ }
+
+ if (extern_filename)
+ {
+ externfile = fopen (extern_filename, "w");
+
+ if (!externfile)
+ file_error (extern_filename);
+ }
+
+ /* Write out the headers. */
+ write_file_headers (structfile, externfile);
+ }
+
+ if (documentation_file)
+ {
+ fprintf (documentation_file, "@c Table of builtins created with %s.\n",
+ argv[0]);
+ fprintf (documentation_file, "@ftable @asis\n");
+ }
+
+ /* Process the .def files. */
+ while (arg_index < argc)
+ {
+ register char *arg;
+
+ arg = argv[arg_index++];
+
+ extract_info (arg, structfile, externfile);
+ }
+
+ /* Close the files. */
+ if (!only_documentation)
+ {
+ /* Write the footers. */
+ write_file_footers (structfile, externfile);
+
+ if (structfile)
+ {
+ write_longdocs (structfile, saved_builtins);
+ fclose (structfile);
+ rename (temp_struct_filename, struct_filename);
+ }
+
+ if (externfile)
+ fclose (externfile);
+ }
+
+ if (separate_helpfiles)
+ {
+ write_helpfiles (saved_builtins);
+ }
+
+ if (documentation_file)
+ {
+ fprintf (documentation_file, "@end ftable\n");
+ fclose (documentation_file);
+ }
+
+ exit (0);
+}
+
+/* **************************************************************** */
+/* */
+/* Array Functions and Manipulators */
+/* */
+/* **************************************************************** */
+
+/* Make a new array, and return a pointer to it. The array will
+ contain elements of size WIDTH, and is initialized to no elements. */
+ARRAY *
+array_create (width)
+ int width;
+{
+ ARRAY *array;
+
+ array = (ARRAY *)xmalloc (sizeof (ARRAY));
+ array->size = 0;
+ array->sindex = 0;
+ array->width = width;
+
+ /* Default to increasing size in units of 20. */
+ array->growth_rate = 20;
+
+ array->array = (char **)NULL;
+
+ return (array);
+}
+
+/* Copy the array of strings in ARRAY. */
+ARRAY *
+copy_string_array (array)
+ ARRAY *array;
+{
+ register int i;
+ ARRAY *copy;
+
+ if (!array)
+ return (ARRAY *)NULL;
+
+ copy = array_create (sizeof (char *));
+
+ copy->size = array->size;
+ copy->sindex = array->sindex;
+ copy->width = array->width;
+
+ copy->array = (char **)xmalloc ((1 + array->sindex) * sizeof (char *));
+
+ for (i = 0; i < array->sindex; i++)
+ copy->array[i] = savestring (array->array[i]);
+
+ copy->array[i] = (char *)NULL;
+
+ return (copy);
+}
+
+/* Add ELEMENT to ARRAY, growing the array if neccessary. */
+void
+array_add (element, array)
+ char *element;
+ ARRAY *array;
+{
+ if (array->sindex + 2 > array->size)
+ array->array = (char **)xrealloc
+ (array->array, (array->size += array->growth_rate) * array->width);
+
+ array->array[array->sindex++] = element;
+ array->array[array->sindex] = (char *)NULL;
+}
+
+/* Free an allocated array and data pointer. */
+void
+array_free (array)
+ ARRAY *array;
+{
+ if (array->array)
+ free (array->array);
+
+ free (array);
+}
+
+/* **************************************************************** */
+/* */
+/* Processing a DEF File */
+/* */
+/* **************************************************************** */
+
+/* The definition of a function. */
+typedef int Function ();
+typedef int mk_handler_func_t __P((char *, DEF_FILE *, char *));
+
+/* Structure handles processor directives. */
+typedef struct {
+ char *directive;
+ mk_handler_func_t *function;
+} HANDLER_ENTRY;
+
+extern int builtin_handler __P((char *, DEF_FILE *, char *));
+extern int function_handler __P((char *, DEF_FILE *, char *));
+extern int short_doc_handler __P((char *, DEF_FILE *, char *));
+extern int comment_handler __P((char *, DEF_FILE *, char *));
+extern int depends_on_handler __P((char *, DEF_FILE *, char *));
+extern int produces_handler __P((char *, DEF_FILE *, char *));
+extern int end_handler __P((char *, DEF_FILE *, char *));
+extern int docname_handler __P((char *, DEF_FILE *, char *));
+
+HANDLER_ENTRY handlers[] = {
+ { "BUILTIN", builtin_handler },
+ { "DOCNAME", docname_handler },
+ { "FUNCTION", function_handler },
+ { "SHORT_DOC", short_doc_handler },
+ { "$", comment_handler },
+ { "COMMENT", comment_handler },
+ { "DEPENDS_ON", depends_on_handler },
+ { "PRODUCES", produces_handler },
+ { "END", end_handler },
+ { (char *)NULL, (mk_handler_func_t *)NULL }
+};
+
+/* Return the entry in the table of handlers for NAME. */
+HANDLER_ENTRY *
+find_directive (directive)
+ char *directive;
+{
+ register int i;
+
+ for (i = 0; handlers[i].directive; i++)
+ if (strcmp (handlers[i].directive, directive) == 0)
+ return (&handlers[i]);
+
+ return ((HANDLER_ENTRY *)NULL);
+}
+
+/* Non-zero indicates that a $BUILTIN has been seen, but not
+ the corresponding $END. */
+static int building_builtin = 0;
+
+/* Non-zero means to output cpp line and file information before
+ printing the current line to the production file. */
+int output_cpp_line_info = 0;
+
+/* The main function of this program. Read FILENAME and act on what is
+ found. Lines not starting with a dollar sign are copied to the
+ $PRODUCES target, if one is present. Lines starting with a dollar sign
+ are directives to this program, specifying the name of the builtin, the
+ function to call, the short documentation and the long documentation
+ strings. FILENAME can contain multiple $BUILTINs, but only one $PRODUCES
+ target. After the file has been processed, write out the names of
+ builtins found in each $BUILTIN. Plain text found before the $PRODUCES
+ is ignored, as is "$$ comment text". */
+void
+extract_info (filename, structfile, externfile)
+ char *filename;
+ FILE *structfile, *externfile;
+{
+ register int i;
+ DEF_FILE *defs;
+ struct stat finfo;
+ size_t file_size;
+ char *buffer, *line;
+ int fd, nr;
+
+ if (stat (filename, &finfo) == -1)
+ file_error (filename);
+
+ fd = open (filename, O_RDONLY, 0666);
+
+ if (fd == -1)
+ file_error (filename);
+
+ file_size = (size_t)finfo.st_size;
+ buffer = xmalloc (1 + file_size);
+
+ if ((nr = read (fd, buffer, file_size)) < 0)
+ file_error (filename);
+
+ /* This is needed on WIN32, and does not hurt on Unix. */
+ if (nr < file_size)
+ file_size = nr;
+
+ close (fd);
+
+ if (nr == 0)
+ {
+ fprintf (stderr, "mkbuiltins: %s: skipping zero-length file\n", filename);
+ return;
+ }
+
+ /* Create and fill in the initial structure describing this file. */
+ defs = (DEF_FILE *)xmalloc (sizeof (DEF_FILE));
+ defs->filename = filename;
+ defs->lines = array_create (sizeof (char *));
+ defs->line_number = 0;
+ defs->production = (char *)NULL;
+ defs->output = (FILE *)NULL;
+ defs->builtins = (ARRAY *)NULL;
+
+ /* Build the array of lines. */
+ i = 0;
+ while (i < file_size)
+ {
+ array_add (&buffer[i], defs->lines);
+
+ while (buffer[i] != '\n' && i < file_size)
+ i++;
+ buffer[i++] = '\0';
+ }
+
+ /* Begin processing the input file. We don't write any output
+ until we have a file to write output to. */
+ output_cpp_line_info = 1;
+
+ /* Process each line in the array. */
+ for (i = 0; line = defs->lines->array[i]; i++)
+ {
+ defs->line_number = i;
+
+ if (*line == '$')
+ {
+ register int j;
+ char *directive;
+ HANDLER_ENTRY *handler;
+
+ /* Isolate the directive. */
+ for (j = 0; line[j] && !whitespace (line[j]); j++);
+
+ directive = xmalloc (j);
+ strncpy (directive, line + 1, j - 1);
+ directive[j -1] = '\0';
+
+ /* Get the function handler and call it. */
+ handler = find_directive (directive);
+
+ if (!handler)
+ {
+ line_error (defs, "Unknown directive `%s'", directive);
+ free (directive);
+ continue;
+ }
+ else
+ {
+ /* Advance to the first non-whitespace character. */
+ while (whitespace (line[j]))
+ j++;
+
+ /* Call the directive handler with the FILE, and ARGS. */
+ (*(handler->function)) (directive, defs, line + j);
+ }
+ free (directive);
+ }
+ else
+ {
+ if (building_builtin)
+ add_documentation (defs, line);
+ else if (defs->output)
+ {
+ if (output_cpp_line_info)
+ {
+ /* If we're handed an absolute pathname, don't prepend
+ the directory name. */
+ if (defs->filename[0] == '/')
+ fprintf (defs->output, "#line %d \"%s\"\n",
+ defs->line_number + 1, defs->filename);
+ else
+ fprintf (defs->output, "#line %d \"%s%s\"\n",
+ defs->line_number + 1,
+ error_directory ? error_directory : "./",
+ defs->filename);
+ output_cpp_line_info = 0;
+ }
+
+ fprintf (defs->output, "%s\n", line);
+ }
+ }
+ }
+
+ /* Close the production file. */
+ if (defs->output)
+ fclose (defs->output);
+
+ /* The file has been processed. Write the accumulated builtins to
+ the builtins.c file, and write the extern definitions to the
+ builtext.h file. */
+ write_builtins (defs, structfile, externfile);
+
+ free (buffer);
+ free_defs (defs);
+}
+
+#define free_safely(x) if (x) free (x)
+
+static void
+free_builtin (builtin)
+ BUILTIN_DESC *builtin;
+{
+ register int i;
+
+ free_safely (builtin->name);
+ free_safely (builtin->function);
+ free_safely (builtin->shortdoc);
+ free_safely (builtin->docname);
+
+ if (builtin->longdoc)
+ array_free (builtin->longdoc);
+
+ if (builtin->dependencies)
+ {
+ for (i = 0; builtin->dependencies->array[i]; i++)
+ free (builtin->dependencies->array[i]);
+ array_free (builtin->dependencies);
+ }
+}
+
+/* Free all of the memory allocated to a DEF_FILE. */
+void
+free_defs (defs)
+ DEF_FILE *defs;
+{
+ register int i;
+ register BUILTIN_DESC *builtin;
+
+ if (defs->production)
+ free (defs->production);
+
+ if (defs->lines)
+ array_free (defs->lines);
+
+ if (defs->builtins)
+ {
+ for (i = 0; builtin = (BUILTIN_DESC *)defs->builtins->array[i]; i++)
+ {
+ free_builtin (builtin);
+ free (builtin);
+ }
+ array_free (defs->builtins);
+ }
+ free (defs);
+}
+
+/* **************************************************************** */
+/* */
+/* The Handler Functions Themselves */
+/* */
+/* **************************************************************** */
+
+/* Strip surrounding whitespace from STRING, and
+ return a pointer to the start of it. */
+char *
+strip_whitespace (string)
+ char *string;
+{
+ while (whitespace (*string))
+ string++;
+
+ remove_trailing_whitespace (string);
+ return (string);
+}
+
+/* Remove only the trailing whitespace from STRING. */
+void
+remove_trailing_whitespace (string)
+ char *string;
+{
+ register int i;
+
+ i = strlen (string) - 1;
+
+ while (i > 0 && whitespace (string[i]))
+ i--;
+
+ string[++i] = '\0';
+}
+
+/* Ensure that there is a argument in STRING and return it.
+ FOR_WHOM is the name of the directive which needs the argument.
+ DEFS is the DEF_FILE in which the directive is found.
+ If there is no argument, produce an error. */
+char *
+get_arg (for_whom, defs, string)
+ char *for_whom, *string;
+ DEF_FILE *defs;
+{
+ char *new;
+
+ new = strip_whitespace (string);
+
+ if (!*new)
+ line_error (defs, "%s requires an argument", for_whom);
+
+ return (savestring (new));
+}
+
+/* Error if not building a builtin. */
+void
+must_be_building (directive, defs)
+ char *directive;
+ DEF_FILE *defs;
+{
+ if (!building_builtin)
+ line_error (defs, "%s must be inside of a $BUILTIN block", directive);
+}
+
+/* Return the current builtin. */
+BUILTIN_DESC *
+current_builtin (directive, defs)
+ char *directive;
+ DEF_FILE *defs;
+{
+ must_be_building (directive, defs);
+ if (defs->builtins)
+ return ((BUILTIN_DESC *)defs->builtins->array[defs->builtins->sindex - 1]);
+ else
+ return ((BUILTIN_DESC *)NULL);
+}
+
+/* Add LINE to the long documentation for the current builtin.
+ Ignore blank lines until the first non-blank line has been seen. */
+void
+add_documentation (defs, line)
+ DEF_FILE *defs;
+ char *line;
+{
+ register BUILTIN_DESC *builtin;
+
+ builtin = current_builtin ("(implied LONGDOC)", defs);
+
+ remove_trailing_whitespace (line);
+
+ if (!*line && !builtin->longdoc)
+ return;
+
+ if (!builtin->longdoc)
+ builtin->longdoc = array_create (sizeof (char *));
+
+ array_add (line, builtin->longdoc);
+}
+
+/* How to handle the $BUILTIN directive. */
+int
+builtin_handler (self, defs, arg)
+ char *self;
+ DEF_FILE *defs;
+ char *arg;
+{
+ BUILTIN_DESC *new;
+ char *name;
+
+ /* If we are already building a builtin, we cannot start a new one. */
+ if (building_builtin)
+ {
+ line_error (defs, "%s found before $END", self);
+ return (-1);
+ }
+
+ output_cpp_line_info++;
+
+ /* Get the name of this builtin, and stick it in the array. */
+ name = get_arg (self, defs, arg);
+
+ /* If this is the first builtin, create the array to hold them. */
+ if (!defs->builtins)
+ defs->builtins = array_create (sizeof (BUILTIN_DESC *));
+
+ new = (BUILTIN_DESC *)xmalloc (sizeof (BUILTIN_DESC));
+ new->name = name;
+ new->function = (char *)NULL;
+ new->shortdoc = (char *)NULL;
+ new->docname = (char *)NULL;
+ new->longdoc = (ARRAY *)NULL;
+ new->dependencies = (ARRAY *)NULL;
+ new->flags = 0;
+
+ if (is_special_builtin (name))
+ new->flags |= BUILTIN_FLAG_SPECIAL;
+ if (is_assignment_builtin (name))
+ new->flags |= BUILTIN_FLAG_ASSIGNMENT;
+ if (is_posix_builtin (name))
+ new->flags |= BUILTIN_FLAG_POSIX_BUILTIN;
+
+ array_add ((char *)new, defs->builtins);
+ building_builtin = 1;
+
+ return (0);
+}
+
+/* How to handle the $FUNCTION directive. */
+int
+function_handler (self, defs, arg)
+ char *self;
+ DEF_FILE *defs;
+ char *arg;
+{
+ register BUILTIN_DESC *builtin;
+
+ builtin = current_builtin (self, defs);
+
+ if (builtin == 0)
+ {
+ line_error (defs, "syntax error: no current builtin for $FUNCTION directive");
+ exit (1);
+ }
+ if (builtin->function)
+ line_error (defs, "%s already has a function (%s)",
+ builtin->name, builtin->function);
+ else
+ builtin->function = get_arg (self, defs, arg);
+
+ return (0);
+}
+
+/* How to handle the $DOCNAME directive. */
+int
+docname_handler (self, defs, arg)
+ char *self;
+ DEF_FILE *defs;
+ char *arg;
+{
+ register BUILTIN_DESC *builtin;
+
+ builtin = current_builtin (self, defs);
+
+ if (builtin->docname)
+ line_error (defs, "%s already had a docname (%s)",
+ builtin->name, builtin->docname);
+ else
+ builtin->docname = get_arg (self, defs, arg);
+
+ return (0);
+}
+
+/* How to handle the $SHORT_DOC directive. */
+int
+short_doc_handler (self, defs, arg)
+ char *self;
+ DEF_FILE *defs;
+ char *arg;
+{
+ register BUILTIN_DESC *builtin;
+
+ builtin = current_builtin (self, defs);
+
+ if (builtin->shortdoc)
+ line_error (defs, "%s already has short documentation (%s)",
+ builtin->name, builtin->shortdoc);
+ else
+ builtin->shortdoc = get_arg (self, defs, arg);
+
+ return (0);
+}
+
+/* How to handle the $COMMENT directive. */
+int
+comment_handler (self, defs, arg)
+ char *self;
+ DEF_FILE *defs;
+ char *arg;
+{
+ return (0);
+}
+
+/* How to handle the $DEPENDS_ON directive. */
+int
+depends_on_handler (self, defs, arg)
+ char *self;
+ DEF_FILE *defs;
+ char *arg;
+{
+ register BUILTIN_DESC *builtin;
+ char *dependent;
+
+ builtin = current_builtin (self, defs);
+ dependent = get_arg (self, defs, arg);
+
+ if (!builtin->dependencies)
+ builtin->dependencies = array_create (sizeof (char *));
+
+ array_add (dependent, builtin->dependencies);
+
+ return (0);
+}
+
+/* How to handle the $PRODUCES directive. */
+int
+produces_handler (self, defs, arg)
+ char *self;
+ DEF_FILE *defs;
+ char *arg;
+{
+ /* If just hacking documentation, don't change any of the production
+ files. */
+ if (only_documentation)
+ return (0);
+
+ output_cpp_line_info++;
+
+ if (defs->production)
+ line_error (defs, "%s already has a %s definition", defs->filename, self);
+ else
+ {
+ defs->production = get_arg (self, defs, arg);
+
+ if (inhibit_production)
+ return (0);
+
+ defs->output = fopen (defs->production, "w");
+
+ if (!defs->output)
+ file_error (defs->production);
+
+ fprintf (defs->output, "/* %s, created from %s. */\n",
+ defs->production, defs->filename);
+ }
+ return (0);
+}
+
+/* How to handle the $END directive. */
+int
+end_handler (self, defs, arg)
+ char *self;
+ DEF_FILE *defs;
+ char *arg;
+{
+ must_be_building (self, defs);
+ building_builtin = 0;
+ return (0);
+}
+
+/* **************************************************************** */
+/* */
+/* Error Handling Functions */
+/* */
+/* **************************************************************** */
+
+/* Produce an error for DEFS with FORMAT and ARGS. */
+void
+line_error (defs, format, arg1, arg2)
+ DEF_FILE *defs;
+ char *format, *arg1, *arg2;
+{
+ if (defs->filename[0] != '/')
+ fprintf (stderr, "%s", error_directory ? error_directory : "./");
+ fprintf (stderr, "%s:%d:", defs->filename, defs->line_number + 1);
+ fprintf (stderr, format, arg1, arg2);
+ fprintf (stderr, "\n");
+ fflush (stderr);
+}
+
+/* Print error message for FILENAME. */
+void
+file_error (filename)
+ char *filename;
+{
+ perror (filename);
+ exit (2);
+}
+
+/* **************************************************************** */
+/* */
+/* xmalloc and xrealloc () */
+/* */
+/* **************************************************************** */
+
+static void memory_error_and_abort ();
+
+static char *
+xmalloc (bytes)
+ int bytes;
+{
+ char *temp = (char *)malloc (bytes);
+
+ if (!temp)
+ memory_error_and_abort ();
+ return (temp);
+}
+
+static char *
+xrealloc (pointer, bytes)
+ char *pointer;
+ int bytes;
+{
+ char *temp;
+
+ if (!pointer)
+ temp = (char *)malloc (bytes);
+ else
+ temp = (char *)realloc (pointer, bytes);
+
+ if (!temp)
+ memory_error_and_abort ();
+
+ return (temp);
+}
+
+static void
+memory_error_and_abort ()
+{
+ fprintf (stderr, "mkbuiltins: out of virtual memory\n");
+ abort ();
+}
+
+/* **************************************************************** */
+/* */
+/* Creating the Struct and Extern Files */
+/* */
+/* **************************************************************** */
+
+/* Return a pointer to a newly allocated builtin which is
+ an exact copy of BUILTIN. */
+BUILTIN_DESC *
+copy_builtin (builtin)
+ BUILTIN_DESC *builtin;
+{
+ BUILTIN_DESC *new;
+
+ new = (BUILTIN_DESC *)xmalloc (sizeof (BUILTIN_DESC));
+
+ new->name = savestring (builtin->name);
+ new->shortdoc = savestring (builtin->shortdoc);
+ new->longdoc = copy_string_array (builtin->longdoc);
+ new->dependencies = copy_string_array (builtin->dependencies);
+
+ new->function =
+ builtin->function ? savestring (builtin->function) : (char *)NULL;
+ new->docname =
+ builtin->docname ? savestring (builtin->docname) : (char *)NULL;
+
+ return (new);
+}
+
+/* How to save away a builtin. */
+void
+save_builtin (builtin)
+ BUILTIN_DESC *builtin;
+{
+ BUILTIN_DESC *newbuiltin;
+
+ newbuiltin = copy_builtin (builtin);
+
+ /* If this is the first builtin to be saved, create the array
+ to hold it. */
+ if (!saved_builtins)
+ saved_builtins = array_create (sizeof (BUILTIN_DESC *));
+
+ array_add ((char *)newbuiltin, saved_builtins);
+}
+
+/* Flags that mean something to write_documentation (). */
+#define STRING_ARRAY 0x01
+#define TEXINFO 0x02
+#define PLAINTEXT 0x04
+#define HELPFILE 0x08
+
+char *structfile_header[] = {
+ "/* builtins.c -- the built in shell commands. */",
+ "",
+ "/* This file is manufactured by ./mkbuiltins, and should not be",
+ " edited by hand. See the source to mkbuiltins for details. */",
+ "",
+ "/* Copyright (C) 1987-2009 Free Software Foundation, Inc.",
+ "",
+ " This file is part of GNU Bash, the Bourne Again SHell.",
+ "",
+ " Bash is free software: you can redistribute it and/or modify",
+ " it under the terms of the GNU General Public License as published by",
+ " the Free Software Foundation, either version 3 of the License, or",
+ " (at your option) any later version.",
+ "",
+ " Bash is distributed in the hope that it will be useful,",
+ " but WITHOUT ANY WARRANTY; without even the implied warranty of",
+ " MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the",
+ " GNU General Public License for more details.",
+ "",
+ " You should have received a copy of the GNU General Public License",
+ " along with Bash. If not, see <http://www.gnu.org/licenses/>.",
+ "*/",
+ "",
+ "/* The list of shell builtins. Each element is name, function, flags,",
+ " long-doc, short-doc. The long-doc field contains a pointer to an array",
+ " of help lines. The function takes a WORD_LIST *; the first word in the",
+ " list is the first arg to the command. The list has already had word",
+ " expansion performed.",
+ "",
+ " Functions which need to look at only the simple commands (e.g.",
+ " the enable_builtin ()), should ignore entries where",
+ " (array[i].function == (sh_builtin_func_t *)NULL). Such entries are for",
+ " the list of shell reserved control structures, like `if' and `while'.",
+ " The end of the list is denoted with a NULL name field. */",
+ "",
+ "#include \"../builtins.h\"",
+ (char *)NULL
+ };
+
+char *structfile_footer[] = {
+ " { (char *)0x0, (sh_builtin_func_t *)0x0, 0, (char **)0x0, (char *)0x0 }",
+ "};",
+ "",
+ "struct builtin *shell_builtins = static_shell_builtins;",
+ "struct builtin *current_builtin;",
+ "",
+ "int num_shell_builtins =",
+ "\tsizeof (static_shell_builtins) / sizeof (struct builtin) - 1;",
+ (char *)NULL
+};
+
+/* Write out any neccessary opening information for
+ STRUCTFILE and EXTERNFILE. */
+void
+write_file_headers (structfile, externfile)
+ FILE *structfile, *externfile;
+{
+ register int i;
+
+ if (structfile)
+ {
+ for (i = 0; structfile_header[i]; i++)
+ fprintf (structfile, "%s\n", structfile_header[i]);
+
+ fprintf (structfile, "#include \"%s\"\n",
+ extern_filename ? extern_filename : "builtext.h");
+
+ fprintf (structfile, "#include \"bashintl.h\"\n");
+
+ fprintf (structfile, "\nstruct builtin static_shell_builtins[] = {\n");
+ }
+
+ if (externfile)
+ fprintf (externfile,
+ "/* %s - The list of builtins found in libbuiltins.a. */\n",
+ extern_filename ? extern_filename : "builtext.h");
+}
+
+/* Write out any necessary closing information for
+ STRUCTFILE and EXTERNFILE. */
+void
+write_file_footers (structfile, externfile)
+ FILE *structfile, *externfile;
+{
+ register int i;
+
+ /* Write out the footers. */
+ if (structfile)
+ {
+ for (i = 0; structfile_footer[i]; i++)
+ fprintf (structfile, "%s\n", structfile_footer[i]);
+ }
+}
+
+/* Write out the information accumulated in DEFS to
+ STRUCTFILE and EXTERNFILE. */
+void
+write_builtins (defs, structfile, externfile)
+ DEF_FILE *defs;
+ FILE *structfile, *externfile;
+{
+ register int i;
+
+ /* Write out the information. */
+ if (defs->builtins)
+ {
+ register BUILTIN_DESC *builtin;
+
+ for (i = 0; i < defs->builtins->sindex; i++)
+ {
+ builtin = (BUILTIN_DESC *)defs->builtins->array[i];
+
+ /* Write out any #ifdefs that may be there. */
+ if (!only_documentation)
+ {
+ if (builtin->dependencies)
+ {
+ write_ifdefs (externfile, builtin->dependencies->array);
+ write_ifdefs (structfile, builtin->dependencies->array);
+ }
+
+ /* Write the extern definition. */
+ if (externfile)
+ {
+ if (builtin->function)
+ fprintf (externfile, "extern int %s __P((WORD_LIST *));\n",
+ builtin->function);
+
+ fprintf (externfile, "extern char * const %s_doc[];\n",
+ document_name (builtin));
+ }
+
+ /* Write the structure definition. */
+ if (structfile)
+ {
+ fprintf (structfile, " { \"%s\", ", builtin->name);
+
+ if (builtin->function)
+ fprintf (structfile, "%s, ", builtin->function);
+ else
+ fprintf (structfile, "(sh_builtin_func_t *)0x0, ");
+
+ fprintf (structfile, "%s%s%s%s, %s_doc,\n",
+ "BUILTIN_ENABLED | STATIC_BUILTIN",
+ (builtin->flags & BUILTIN_FLAG_SPECIAL) ? " | SPECIAL_BUILTIN" : "",
+ (builtin->flags & BUILTIN_FLAG_ASSIGNMENT) ? " | ASSIGNMENT_BUILTIN" : "",
+ (builtin->flags & BUILTIN_FLAG_POSIX_BUILTIN) ? " | POSIX_BUILTIN" : "",
+ document_name (builtin));
+
+ fprintf
+ (structfile, " N_(\"%s\"), (char *)NULL },\n",
+ builtin->shortdoc ? builtin->shortdoc : builtin->name);
+
+ }
+
+ if (structfile || separate_helpfiles)
+ /* Save away this builtin for later writing of the
+ long documentation strings. */
+ save_builtin (builtin);
+
+ /* Write out the matching #endif, if neccessary. */
+ if (builtin->dependencies)
+ {
+ if (externfile)
+ write_endifs (externfile, builtin->dependencies->array);
+
+ if (structfile)
+ write_endifs (structfile, builtin->dependencies->array);
+ }
+ }
+
+ if (documentation_file)
+ {
+ fprintf (documentation_file, "@item %s\n", builtin->name);
+ write_documentation
+ (documentation_file, builtin->longdoc->array, 0, TEXINFO);
+ }
+ }
+ }
+}
+
+/* Write out the long documentation strings in BUILTINS to STREAM. */
+void
+write_longdocs (stream, builtins)
+ FILE *stream;
+ ARRAY *builtins;
+{
+ register int i;
+ register BUILTIN_DESC *builtin;
+ char *dname;
+ char *sarray[2];
+
+ for (i = 0; i < builtins->sindex; i++)
+ {
+ builtin = (BUILTIN_DESC *)builtins->array[i];
+
+ if (builtin->dependencies)
+ write_ifdefs (stream, builtin->dependencies->array);
+
+ /* Write the long documentation strings. */
+ dname = document_name (builtin);
+ fprintf (stream, "char * const %s_doc[] =", dname);
+
+ if (separate_helpfiles)
+ {
+ int l = strlen (helpfile_directory) + strlen (dname) + 1;
+ sarray[0] = (char *)xmalloc (l + 1);
+ sprintf (sarray[0], "%s/%s", helpfile_directory, dname);
+ sarray[1] = (char *)NULL;
+ write_documentation (stream, sarray, 0, STRING_ARRAY|HELPFILE);
+ free (sarray[0]);
+ }
+ else
+ write_documentation (stream, builtin->longdoc->array, 0, STRING_ARRAY);
+
+ if (builtin->dependencies)
+ write_endifs (stream, builtin->dependencies->array);
+
+ }
+}
+
+/* Write an #ifdef string saying what needs to be defined (or not defined)
+ in order to allow compilation of the code that will follow.
+ STREAM is the stream to write the information to,
+ DEFINES is a null terminated array of define names.
+ If a define is preceded by an `!', then the sense of the test is
+ reversed. */
+void
+write_ifdefs (stream, defines)
+ FILE *stream;
+ char **defines;
+{
+ register int i;
+
+ if (!stream)
+ return;
+
+ fprintf (stream, "#if ");
+
+ for (i = 0; defines[i]; i++)
+ {
+ char *def = defines[i];
+
+ if (*def == '!')
+ fprintf (stream, "!defined (%s)", def + 1);
+ else
+ fprintf (stream, "defined (%s)", def);
+
+ if (defines[i + 1])
+ fprintf (stream, " && ");
+ }
+ fprintf (stream, "\n");
+}
+
+/* Write an #endif string saying what defines controlled the compilation
+ of the immediately preceding code.
+ STREAM is the stream to write the information to.
+ DEFINES is a null terminated array of define names. */
+void
+write_endifs (stream, defines)
+ FILE *stream;
+ char **defines;
+{
+ register int i;
+
+ if (!stream)
+ return;
+
+ fprintf (stream, "#endif /* ");
+
+ for (i = 0; defines[i]; i++)
+ {
+ fprintf (stream, "%s", defines[i]);
+
+ if (defines[i + 1])
+ fprintf (stream, " && ");
+ }
+
+ fprintf (stream, " */\n");
+}
+
+/* Write DOCUMENTATION to STREAM, perhaps surrounding it with double-quotes
+ and quoting special characters in the string. Handle special things for
+ internationalization (gettext) and the single-string vs. multiple-strings
+ issues. */
+void
+write_documentation (stream, documentation, indentation, flags)
+ FILE *stream;
+ char **documentation;
+ int indentation, flags;
+{
+ register int i, j;
+ register char *line;
+ int string_array, texinfo, base_indent, last_cpp, filename_p;
+
+ if (stream == 0)
+ return;
+
+ string_array = flags & STRING_ARRAY;
+ filename_p = flags & HELPFILE;
+
+ if (string_array)
+ {
+ fprintf (stream, " {\n#if defined (HELP_BUILTIN)\n"); /* } */
+ if (single_longdoc_strings)
+ {
+ if (filename_p == 0)
+ {
+ if (documentation && documentation[0] && documentation[0][0])
+ fprintf (stream, "N_(\"");
+ else
+ fprintf (stream, "N_(\" "); /* the empty string translates specially. */
+ }
+ else
+ fprintf (stream, "\"");
+ }
+ }
+
+ base_indent = (string_array && single_longdoc_strings && filename_p == 0) ? BASE_INDENT : 0;
+
+ for (i = last_cpp = 0, texinfo = (flags & TEXINFO); line = documentation[i]; i++)
+ {
+ /* Allow #ifdef's to be written out verbatim, but don't put them into
+ separate help files. */
+ if (*line == '#')
+ {
+ if (string_array && filename_p == 0 && single_longdoc_strings == 0)
+ fprintf (stream, "%s\n", line);
+ last_cpp = 1;
+ continue;
+ }
+ else
+ last_cpp = 0;
+
+ /* prefix with N_( for gettext */
+ if (string_array && single_longdoc_strings == 0)
+ {
+ if (filename_p == 0)
+ {
+ if (line[0])
+ fprintf (stream, " N_(\"");
+ else
+ fprintf (stream, " N_(\" "); /* the empty string translates specially. */
+ }
+ else
+ fprintf (stream, " \"");
+ }
+
+ if (indentation)
+ for (j = 0; j < indentation; j++)
+ fprintf (stream, " ");
+
+ /* Don't indent the first line, because of how the help builtin works. */
+ if (i == 0)
+ indentation += base_indent;
+
+ if (string_array)
+ {
+ for (j = 0; line[j]; j++)
+ {
+ switch (line[j])
+ {
+ case '\\':
+ case '"':
+ fprintf (stream, "\\%c", line[j]);
+ break;
+
+ default:
+ fprintf (stream, "%c", line[j]);
+ }
+ }
+
+ /* closing right paren for gettext */
+ if (single_longdoc_strings == 0)
+ {
+ if (filename_p == 0)
+ fprintf (stream, "\"),\n");
+ else
+ fprintf (stream, "\",\n");
+ }
+ else if (documentation[i+1])
+ /* don't add extra newline after last line */
+ fprintf (stream, "\\n\\\n");
+ }
+ else if (texinfo)
+ {
+ for (j = 0; line[j]; j++)
+ {
+ switch (line[j])
+ {
+ case '@':
+ case '{':
+ case '}':
+ fprintf (stream, "@%c", line[j]);
+ break;
+
+ default:
+ fprintf (stream, "%c", line[j]);
+ }
+ }
+ fprintf (stream, "\n");
+ }
+ else
+ fprintf (stream, "%s\n", line);
+ }
+
+ /* closing right paren for gettext */
+ if (string_array && single_longdoc_strings)
+ {
+ if (filename_p == 0)
+ fprintf (stream, "\"),\n");
+ else
+ fprintf (stream, "\",\n");
+ }
+
+ if (string_array)
+ fprintf (stream, "#endif /* HELP_BUILTIN */\n (char *)NULL\n};\n");
+}
+
+int
+write_helpfiles (builtins)
+ ARRAY *builtins;
+{
+ char *helpfile, *bname;
+ FILE *helpfp;
+ int i, hdlen;
+ BUILTIN_DESC *builtin;
+
+ i = mkdir ("helpfiles", 0777);
+ if (i < 0 && errno != EEXIST)
+ {
+ fprintf (stderr, "write_helpfiles: helpfiles: cannot create directory\n");
+ return -1;
+ }
+
+ hdlen = strlen ("helpfiles/");
+ for (i = 0; i < builtins->sindex; i++)
+ {
+ builtin = (BUILTIN_DESC *)builtins->array[i];
+
+ bname = document_name (builtin);
+ helpfile = (char *)xmalloc (hdlen + strlen (bname) + 1);
+ sprintf (helpfile, "helpfiles/%s", bname);
+
+ helpfp = fopen (helpfile, "w");
+ if (helpfp == 0)
+ {
+ fprintf (stderr, "write_helpfiles: cannot open %s\n", helpfile);
+ free (helpfile);
+ continue;
+ }
+
+ write_documentation (helpfp, builtin->longdoc->array, 4, PLAINTEXT);
+
+ fflush (helpfp);
+ fclose (helpfp);
+ free (helpfile);
+ }
+ return 0;
+}
+
+static int
+_find_in_table (name, name_table)
+ char *name, *name_table[];
+{
+ register int i;
+
+ for (i = 0; name_table[i]; i++)
+ if (strcmp (name, name_table[i]) == 0)
+ return 1;
+ return 0;
+}
+
+static int
+is_special_builtin (name)
+ char *name;
+{
+ return (_find_in_table (name, special_builtins));
+}
+
+static int
+is_assignment_builtin (name)
+ char *name;
+{
+ return (_find_in_table (name, assignment_builtins));
+}
+
+static int
+is_posix_builtin (name)
+ char *name;
+{
+ return (_find_in_table (name, posix_builtins));
+}
+
+#if !defined (HAVE_RENAME)
+static int
+rename (from, to)
+ char *from, *to;
+{
+ unlink (to);
+ if (link (from, to) < 0)
+ return (-1);
+ unlink (from);
+ return (0);
+}
+#endif /* !HAVE_RENAME */
diff --git a/builtins/printf.def b/builtins/printf.def
new file mode 100644
index 0000000..277566f
--- /dev/null
+++ b/builtins/printf.def
@@ -0,0 +1,1118 @@
+This file is printf.def, from which is created printf.c.
+It implements the builtin "printf" in Bash.
+
+Copyright (C) 1997-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES printf.c
+
+$BUILTIN printf
+$FUNCTION printf_builtin
+$SHORT_DOC printf [-v var] format [arguments]
+Formats and prints ARGUMENTS under control of the FORMAT.
+
+Options:
+ -v var assign the output to shell variable VAR rather than
+ display it on the standard output
+
+FORMAT is a character string which contains three types of objects: plain
+characters, which are simply copied to standard output; character escape
+sequences, which are converted and copied to the standard output; and
+format specifications, each of which causes printing of the next successive
+argument.
+
+In addition to the standard format specifications described in printf(1)
+and printf(3), printf interprets:
+
+ %b expand backslash escape sequences in the corresponding argument
+ %q quote the argument in a way that can be reused as shell input
+
+Exit Status:
+Returns success unless an invalid option is given or a write or assignment
+error occurs.
+$END
+
+#include <config.h>
+
+#include "../bashtypes.h"
+
+#include <errno.h>
+#if defined (HAVE_LIMITS_H)
+# include <limits.h>
+#else
+ /* Assume 32-bit ints. */
+# define INT_MAX 2147483647
+# define INT_MIN (-2147483647-1)
+#endif
+
+#if defined (PREFER_STDARG)
+# include <stdarg.h>
+#else
+# include <varargs.h>
+#endif
+
+#include <stdio.h>
+#include <chartypes.h>
+
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "shmbutil.h"
+#include "stdc.h"
+#include "bashgetopt.h"
+#include "common.h"
+
+#if defined (PRI_MACROS_BROKEN)
+# undef PRIdMAX
+#endif
+
+#if !defined (PRIdMAX)
+# if HAVE_LONG_LONG
+# define PRIdMAX "lld"
+# else
+# define PRIdMAX "ld"
+# endif
+#endif
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+#define PC(c) \
+ do { \
+ char b[2]; \
+ tw++; \
+ b[0] = c; b[1] = '\0'; \
+ if (vflag) \
+ vbadd (b, 1); \
+ else \
+ putchar (c); \
+ } while (0)
+
+#define PF(f, func) \
+ do { \
+ int nw; \
+ clearerr (stdout); \
+ if (have_fieldwidth && have_precision) \
+ nw = vflag ? vbprintf (f, fieldwidth, precision, func) : printf (f, fieldwidth, precision, func); \
+ else if (have_fieldwidth) \
+ nw = vflag ? vbprintf (f, fieldwidth, func) : printf (f, fieldwidth, func); \
+ else if (have_precision) \
+ nw = vflag ? vbprintf (f, precision, func) : printf (f, precision, func); \
+ else \
+ nw = vflag ? vbprintf (f, func) : printf (f, func); \
+ tw += nw; \
+ if (ferror (stdout)) \
+ { \
+ sh_wrerror (); \
+ clearerr (stdout); \
+ return (EXECUTION_FAILURE); \
+ } \
+ } while (0)
+
+/* We free the buffer used by mklong() if it's `too big'. */
+#define PRETURN(value) \
+ do \
+ { \
+ if (vflag) \
+ { \
+ bind_printf_variable (vname, vbuf, 0); \
+ stupidly_hack_special_variables (vname); \
+ } \
+ if (conv_bufsize > 4096 ) \
+ { \
+ free (conv_buf); \
+ conv_bufsize = 0; \
+ conv_buf = 0; \
+ } \
+ if (vbsize > 4096) \
+ { \
+ free (vbuf); \
+ vbsize = 0; \
+ vbuf = 0; \
+ } \
+ else if (vbuf) \
+ vbuf[0] = 0; \
+ terminate_immediately--; \
+ fflush (stdout); \
+ if (ferror (stdout)) \
+ { \
+ sh_wrerror (); \
+ clearerr (stdout); \
+ return (EXECUTION_FAILURE); \
+ } \
+ return (value); \
+ } \
+ while (0)
+
+#define SKIP1 "#'-+ 0"
+#define LENMODS "hjlLtz"
+
+#if !HAVE_ASPRINTF
+extern int asprintf __P((char **, const char *, ...)) __attribute__((__format__ (printf, 2, 3)));
+#endif
+
+#if !HAVE_VSNPRINTF
+extern int vsnprintf __P((char *, size_t, const char *, va_list)) __attribute__((__format__ (printf, 3, 0)));
+#endif
+
+static void printf_erange __P((char *));
+static int printstr __P((char *, char *, int, int, int));
+static int tescape __P((char *, char *, int *));
+static char *bexpand __P((char *, int, int *, int *));
+static char *vbadd __P((char *, int));
+static int vbprintf __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2)));
+static char *mklong __P((char *, char *, size_t));
+static int getchr __P((void));
+static char *getstr __P((void));
+static int getint __P((void));
+static intmax_t getintmax __P((void));
+static uintmax_t getuintmax __P((void));
+static SHELL_VAR *bind_printf_variable __P((char *, char *, int));
+
+#if defined (HAVE_LONG_DOUBLE) && HAVE_DECL_STRTOLD && !defined(STRTOLD_BROKEN)
+typedef long double floatmax_t;
+# define FLOATMAX_CONV "L"
+# define strtofltmax strtold
+#else
+typedef double floatmax_t;
+# define FLOATMAX_CONV ""
+# define strtofltmax strtod
+#endif
+static floatmax_t getfloatmax __P((void));
+
+static intmax_t asciicode __P((void));
+
+static WORD_LIST *garglist;
+static int retval;
+static int conversion_error;
+
+/* printf -v var support */
+static int vflag = 0;
+static char *vbuf, *vname;
+static size_t vbsize;
+static int vblen;
+
+static intmax_t tw;
+
+static char *conv_buf;
+static size_t conv_bufsize;
+
+int
+printf_builtin (list)
+ WORD_LIST *list;
+{
+ int ch, fieldwidth, precision;
+ int have_fieldwidth, have_precision;
+ char convch, thisch, nextch, *format, *modstart, *fmt, *start;
+
+ conversion_error = 0;
+ retval = EXECUTION_SUCCESS;
+
+ vflag = 0;
+
+ reset_internal_getopt ();
+ while ((ch = internal_getopt (list, "v:")) != -1)
+ {
+ switch (ch)
+ {
+ case 'v':
+ vname = list_optarg;
+#if defined (ARRAY_VARS)
+ if (legal_identifier (vname) || valid_array_reference (vname))
+#else
+ if (legal_identifier (vname))
+#endif
+ {
+ vflag = 1;
+ vblen = 0;
+ if (vbuf)
+ vbuf[0] = 0;
+ }
+ else
+ {
+ sh_invalidid (vname);
+ return (EX_USAGE);
+ }
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend; /* skip over possible `--' */
+
+ if (list == 0)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ if (list->word->word == 0 || list->word->word[0] == '\0')
+ return (EXECUTION_SUCCESS);
+
+ format = list->word->word;
+ tw = 0;
+
+ garglist = list->next;
+
+ /* If the format string is empty after preprocessing, return immediately. */
+ if (format == 0 || *format == 0)
+ return (EXECUTION_SUCCESS);
+
+ terminate_immediately++;
+
+ /* Basic algorithm is to scan the format string for conversion
+ specifications -- once one is found, find out if the field
+ width or precision is a '*'; if it is, gather up value. Note,
+ format strings are reused as necessary to use up the provided
+ arguments, arguments of zero/null string are provided to use
+ up the format string. */
+ do
+ {
+ tw = 0;
+ /* find next format specification */
+ for (fmt = format; *fmt; fmt++)
+ {
+ precision = fieldwidth = 0;
+ have_fieldwidth = have_precision = 0;
+
+ if (*fmt == '\\')
+ {
+ fmt++;
+ /* A NULL third argument to tescape means to bypass the
+ special processing for arguments to %b. */
+ fmt += tescape (fmt, &nextch, (int *)NULL);
+ PC (nextch);
+ fmt--; /* for loop will increment it for us again */
+ continue;
+ }
+
+ if (*fmt != '%')
+ {
+ PC (*fmt);
+ continue;
+ }
+
+ /* ASSERT(*fmt == '%') */
+ start = fmt++;
+
+ if (*fmt == '%') /* %% prints a % */
+ {
+ PC ('%');
+ continue;
+ }
+
+ /* found format specification, skip to field width */
+ for (; *fmt && strchr(SKIP1, *fmt); ++fmt)
+ ;
+
+ /* Skip optional field width. */
+ if (*fmt == '*')
+ {
+ fmt++;
+ have_fieldwidth = 1;
+ fieldwidth = getint ();
+ }
+ else
+ while (DIGIT (*fmt))
+ fmt++;
+
+ /* Skip optional '.' and precision */
+ if (*fmt == '.')
+ {
+ ++fmt;
+ if (*fmt == '*')
+ {
+ fmt++;
+ have_precision = 1;
+ precision = getint ();
+ }
+ else
+ {
+ /* Negative precisions are allowed but treated as if the
+ precision were missing; I would like to allow a leading
+ `+' in the precision number as an extension, but lots
+ of asprintf/fprintf implementations get this wrong. */
+#if 0
+ if (*fmt == '-' || *fmt == '+')
+#else
+ if (*fmt == '-')
+#endif
+ fmt++;
+ while (DIGIT (*fmt))
+ fmt++;
+ }
+ }
+
+ /* skip possible format modifiers */
+ modstart = fmt;
+ while (*fmt && strchr (LENMODS, *fmt))
+ fmt++;
+
+ if (*fmt == 0)
+ {
+ builtin_error (_("`%s': missing format character"), start);
+ PRETURN (EXECUTION_FAILURE);
+ }
+
+ convch = *fmt;
+ thisch = modstart[0];
+ nextch = modstart[1];
+ modstart[0] = convch;
+ modstart[1] = '\0';
+
+ switch(convch)
+ {
+ case 'c':
+ {
+ char p;
+
+ p = getchr ();
+ PF(start, p);
+ break;
+ }
+
+ case 's':
+ {
+ char *p;
+
+ p = getstr ();
+ PF(start, p);
+ break;
+ }
+
+ case 'n':
+ {
+ char *var;
+
+ var = getstr ();
+ if (var && *var)
+ {
+ if (legal_identifier (var))
+ bind_var_to_int (var, tw);
+ else
+ {
+ sh_invalidid (var);
+ PRETURN (EXECUTION_FAILURE);
+ }
+ }
+ break;
+ }
+
+ case 'b': /* expand escapes in argument */
+ {
+ char *p, *xp;
+ int rlen, r;
+
+ p = getstr ();
+ ch = rlen = r = 0;
+ xp = bexpand (p, strlen (p), &ch, &rlen);
+
+ if (xp)
+ {
+ /* Have to use printstr because of possible NUL bytes
+ in XP -- printf does not handle that well. */
+ r = printstr (start, xp, rlen, fieldwidth, precision);
+ if (r < 0)
+ {
+ sh_wrerror ();
+ clearerr (stdout);
+ retval = EXECUTION_FAILURE;
+ }
+ free (xp);
+ }
+
+ if (ch || r < 0)
+ PRETURN (retval);
+ break;
+ }
+
+ case 'q': /* print with shell quoting */
+ {
+ char *p, *xp;
+ int r;
+
+ r = 0;
+ p = getstr ();
+ if (p && *p == 0) /* XXX - getstr never returns null */
+ xp = savestring ("''");
+ else if (ansic_shouldquote (p))
+ xp = ansic_quote (p, 0, (int *)0);
+ else
+ xp = sh_backslash_quote (p);
+ if (xp)
+ {
+ /* Use printstr to get fieldwidth and precision right. */
+ r = printstr (start, xp, strlen (xp), fieldwidth, precision);
+ if (r < 0)
+ {
+ sh_wrerror ();
+ clearerr (stdout);
+ }
+ free (xp);
+ }
+
+ if (r < 0)
+ PRETURN (EXECUTION_FAILURE);
+ break;
+ }
+
+ case 'd':
+ case 'i':
+ {
+ char *f;
+ long p;
+ intmax_t pp;
+
+ p = pp = getintmax ();
+ if (p != pp)
+ {
+ f = mklong (start, PRIdMAX, sizeof (PRIdMAX) - 2);
+ PF (f, pp);
+ }
+ else
+ {
+ /* Optimize the common case where the integer fits
+ in "long". This also works around some long
+ long and/or intmax_t library bugs in the common
+ case, e.g. glibc 2.2 x86. */
+ f = mklong (start, "l", 1);
+ PF (f, p);
+ }
+ break;
+ }
+
+ case 'o':
+ case 'u':
+ case 'x':
+ case 'X':
+ {
+ char *f;
+ unsigned long p;
+ uintmax_t pp;
+
+ p = pp = getuintmax ();
+ if (p != pp)
+ {
+ f = mklong (start, PRIdMAX, sizeof (PRIdMAX) - 2);
+ PF (f, pp);
+ }
+ else
+ {
+ f = mklong (start, "l", 1);
+ PF (f, p);
+ }
+ break;
+ }
+
+ case 'e':
+ case 'E':
+ case 'f':
+ case 'F':
+ case 'g':
+ case 'G':
+#if defined (HAVE_PRINTF_A_FORMAT)
+ case 'a':
+ case 'A':
+#endif
+ {
+ char *f;
+ floatmax_t p;
+
+ p = getfloatmax ();
+ f = mklong (start, FLOATMAX_CONV, sizeof(FLOATMAX_CONV) - 1);
+ PF (f, p);
+ break;
+ }
+
+ /* We don't output unrecognized format characters; we print an
+ error message and return a failure exit status. */
+ default:
+ builtin_error (_("`%c': invalid format character"), convch);
+ PRETURN (EXECUTION_FAILURE);
+ }
+
+ modstart[0] = thisch;
+ modstart[1] = nextch;
+ }
+
+ if (ferror (stdout))
+ {
+ sh_wrerror ();
+ clearerr (stdout);
+ PRETURN (EXECUTION_FAILURE);
+ }
+ }
+ while (garglist && garglist != list->next);
+
+ if (conversion_error)
+ retval = EXECUTION_FAILURE;
+
+ PRETURN (retval);
+}
+
+static void
+printf_erange (s)
+ char *s;
+{
+ builtin_error (_("warning: %s: %s"), s, strerror(ERANGE));
+}
+
+/* We duplicate a lot of what printf(3) does here. */
+static int
+printstr (fmt, string, len, fieldwidth, precision)
+ char *fmt; /* format */
+ char *string; /* expanded string argument */
+ int len; /* length of expanded string */
+ int fieldwidth; /* argument for width of `*' */
+ int precision; /* argument for precision of `*' */
+{
+#if 0
+ char *s;
+#endif
+ int padlen, nc, ljust, i;
+ int fw, pr; /* fieldwidth and precision */
+
+#if 0
+ if (string == 0 || *string == '\0')
+#else
+ if (string == 0 || len == 0)
+#endif
+ return 0;
+
+#if 0
+ s = fmt;
+#endif
+ if (*fmt == '%')
+ fmt++;
+
+ ljust = fw = 0;
+ pr = -1;
+
+ /* skip flags */
+ while (strchr (SKIP1, *fmt))
+ {
+ if (*fmt == '-')
+ ljust = 1;
+ fmt++;
+ }
+
+ /* get fieldwidth, if present */
+ if (*fmt == '*')
+ {
+ fmt++;
+ fw = fieldwidth;
+ if (fw < 0)
+ {
+ fw = -fw;
+ ljust = 1;
+ }
+ }
+ else if (DIGIT (*fmt))
+ {
+ fw = *fmt++ - '0';
+ while (DIGIT (*fmt))
+ fw = (fw * 10) + (*fmt++ - '0');
+ }
+
+ /* get precision, if present */
+ if (*fmt == '.')
+ {
+ fmt++;
+ if (*fmt == '*')
+ {
+ fmt++;
+ pr = precision;
+ }
+ else if (DIGIT (*fmt))
+ {
+ pr = *fmt++ - '0';
+ while (DIGIT (*fmt))
+ pr = (pr * 10) + (*fmt++ - '0');
+ }
+ }
+
+#if 0
+ /* If we remove this, get rid of `s'. */
+ if (*fmt != 'b' && *fmt != 'q')
+ {
+ internal_error ("format parsing problem: %s", s);
+ fw = pr = 0;
+ }
+#endif
+
+ /* chars from string to print */
+ nc = (pr >= 0 && pr <= len) ? pr : len;
+
+ padlen = fw - nc;
+ if (padlen < 0)
+ padlen = 0;
+ if (ljust)
+ padlen = -padlen;
+
+ /* leading pad characters */
+ for (; padlen > 0; padlen--)
+ PC (' ');
+
+ /* output NC characters from STRING */
+ for (i = 0; i < nc; i++)
+ PC (string[i]);
+
+ /* output any necessary trailing padding */
+ for (; padlen < 0; padlen++)
+ PC (' ');
+
+ return (ferror (stdout) ? -1 : 0);
+}
+
+/* Convert STRING by expanding the escape sequences specified by the
+ POSIX standard for printf's `%b' format string. If SAWC is non-null,
+ perform the processing appropriate for %b arguments. In particular,
+ recognize `\c' and use that as a string terminator. If we see \c, set
+ *SAWC to 1 before returning. LEN is the length of STRING. */
+
+/* Translate a single backslash-escape sequence starting at ESTART (the
+ character after the backslash) and return the number of characters
+ consumed by the sequence. CP is the place to return the translated
+ value. *SAWC is set to 1 if the escape sequence was \c, since that means
+ to short-circuit the rest of the processing. If SAWC is null, we don't
+ do the \c short-circuiting, and \c is treated as an unrecognized escape
+ sequence; we also bypass the other processing specific to %b arguments. */
+static int
+tescape (estart, cp, sawc)
+ char *estart;
+ char *cp;
+ int *sawc;
+{
+ register char *p;
+ int temp, c, evalue;
+
+ p = estart;
+
+ switch (c = *p++)
+ {
+#if defined (__STDC__)
+ case 'a': *cp = '\a'; break;
+#else
+ case 'a': *cp = '\007'; break;
+#endif
+
+ case 'b': *cp = '\b'; break;
+
+ case 'e':
+ case 'E': *cp = '\033'; break; /* ESC -- non-ANSI */
+
+ case 'f': *cp = '\f'; break;
+
+ case 'n': *cp = '\n'; break;
+
+ case 'r': *cp = '\r'; break;
+
+ case 't': *cp = '\t'; break;
+
+ case 'v': *cp = '\v'; break;
+
+ /* The octal escape sequences are `\0' followed by up to three octal
+ digits (if SAWC), or `\' followed by up to three octal digits (if
+ !SAWC). As an extension, we allow the latter form even if SAWC. */
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ evalue = OCTVALUE (c);
+ for (temp = 2 + (!evalue && !!sawc); ISOCTAL (*p) && temp--; p++)
+ evalue = (evalue * 8) + OCTVALUE (*p);
+ *cp = evalue & 0xFF;
+ break;
+
+ /* And, as another extension, we allow \xNNN, where each N is a
+ hex digit. */
+ case 'x':
+#if 0
+ for (evalue = 0; ISXDIGIT ((unsigned char)*p); p++)
+#else
+ for (temp = 2, evalue = 0; ISXDIGIT ((unsigned char)*p) && temp--; p++)
+#endif
+ evalue = (evalue * 16) + HEXVALUE (*p);
+ if (p == estart + 1)
+ {
+ builtin_error (_("missing hex digit for \\x"));
+ *cp = '\\';
+ return 0;
+ }
+ *cp = evalue & 0xFF;
+ break;
+
+ case '\\': /* \\ -> \ */
+ *cp = c;
+ break;
+
+ /* SAWC == 0 means that \', \", and \? are recognized as escape
+ sequences, though the only processing performed is backslash
+ removal. */
+ case '\'': case '"': case '?':
+ if (!sawc)
+ *cp = c;
+ else
+ {
+ *cp = '\\';
+ return 0;
+ }
+ break;
+
+ case 'c':
+ if (sawc)
+ {
+ *sawc = 1;
+ break;
+ }
+ /* other backslash escapes are passed through unaltered */
+ default:
+ *cp = '\\';
+ return 0;
+ }
+ return (p - estart);
+}
+
+static char *
+bexpand (string, len, sawc, lenp)
+ char *string;
+ int len, *sawc, *lenp;
+{
+ int temp;
+ char *ret, *r, *s, c;
+
+#if 0
+ if (string == 0 || *string == '\0')
+#else
+ if (string == 0 || len == 0)
+#endif
+ {
+ if (sawc)
+ *sawc = 0;
+ if (lenp)
+ *lenp = 0;
+ return ((char *)NULL);
+ }
+
+ ret = (char *)xmalloc (len + 1);
+ for (r = ret, s = string; s && *s; )
+ {
+ c = *s++;
+ if (c != '\\' || *s == '\0')
+ {
+ *r++ = c;
+ continue;
+ }
+ temp = 0;
+ s += tescape (s, &c, &temp);
+ if (temp)
+ {
+ if (sawc)
+ *sawc = 1;
+ break;
+ }
+
+ *r++ = c;
+ }
+
+ *r = '\0';
+ if (lenp)
+ *lenp = r - ret;
+ return ret;
+}
+
+static char *
+vbadd (buf, blen)
+ char *buf;
+ int blen;
+{
+ size_t nlen;
+
+ nlen = vblen + blen + 1;
+ if (nlen >= vbsize)
+ {
+ vbsize = ((nlen + 63) >> 6) << 6;
+ vbuf = (char *)xrealloc (vbuf, vbsize);
+ }
+
+ if (blen == 1)
+ vbuf[vblen++] = buf[0];
+ else if (blen > 1)
+ {
+ FASTCOPY (buf, vbuf + vblen, blen);
+ vblen += blen;
+ }
+ vbuf[vblen] = '\0';
+
+#ifdef DEBUG
+ if (strlen (vbuf) != vblen)
+ internal_error ("printf:vbadd: vblen (%d) != strlen (vbuf) (%d)", vblen, (int)strlen (vbuf));
+#endif
+
+ return vbuf;
+}
+
+static int
+#if defined (PREFER_STDARG)
+vbprintf (const char *format, ...)
+#else
+vbprintf (format, va_alist)
+ const char *format;
+ va_dcl
+#endif
+{
+ va_list args;
+ size_t nlen;
+ int blen;
+
+ SH_VA_START (args, format);
+ blen = vsnprintf (vbuf + vblen, vbsize - vblen, format, args);
+ va_end (args);
+
+ nlen = vblen + blen + 1;
+ if (nlen >= vbsize)
+ {
+ vbsize = ((nlen + 63) >> 6) << 6;
+ vbuf = (char *)xrealloc (vbuf, vbsize);
+ SH_VA_START (args, format);
+ blen = vsnprintf (vbuf + vblen, vbsize - vblen, format, args);
+ va_end (args);
+ }
+
+ vblen += blen;
+ vbuf[vblen] = '\0';
+
+#ifdef DEBUG
+ if (strlen (vbuf) != vblen)
+ internal_error ("printf:vbadd: vblen (%d) != strlen (vbuf) (%d)", vblen, (int)strlen (vbuf));
+#endif
+
+ return (blen);
+}
+
+static char *
+mklong (str, modifiers, mlen)
+ char *str;
+ char *modifiers;
+ size_t mlen;
+{
+ size_t len, slen;
+
+ slen = strlen (str);
+ len = slen + mlen + 1;
+
+ if (len > conv_bufsize)
+ {
+ conv_bufsize = (((len + 1023) >> 10) << 10);
+ conv_buf = (char *)xrealloc (conv_buf, conv_bufsize);
+ }
+
+ FASTCOPY (str, conv_buf, slen - 1);
+ FASTCOPY (modifiers, conv_buf + slen - 1, mlen);
+
+ conv_buf[len - 2] = str[slen - 1];
+ conv_buf[len - 1] = '\0';
+ return (conv_buf);
+}
+
+static int
+getchr ()
+{
+ int ret;
+
+ if (garglist == 0)
+ return ('\0');
+
+ ret = (int)garglist->word->word[0];
+ garglist = garglist->next;
+ return ret;
+}
+
+static char *
+getstr ()
+{
+ char *ret;
+
+ if (garglist == 0)
+ return ("");
+
+ ret = garglist->word->word;
+ garglist = garglist->next;
+ return ret;
+}
+
+static int
+getint ()
+{
+ intmax_t ret;
+
+ ret = getintmax ();
+
+ if (ret > INT_MAX)
+ {
+ printf_erange (garglist->word->word);
+ ret = INT_MAX;
+ }
+ else if (ret < INT_MIN)
+ {
+ printf_erange (garglist->word->word);
+ ret = INT_MIN;
+ }
+
+ return ((int)ret);
+}
+
+static intmax_t
+getintmax ()
+{
+ intmax_t ret;
+ char *ep;
+
+ if (garglist == 0)
+ return (0);
+
+ if (garglist->word->word[0] == '\'' || garglist->word->word[0] == '"')
+ return asciicode ();
+
+ errno = 0;
+ ret = strtoimax (garglist->word->word, &ep, 0);
+
+ if (*ep)
+ {
+ sh_invalidnum (garglist->word->word);
+ /* POSIX.2 says ``...a diagnostic message shall be written to standard
+ error, and the utility shall not exit with a zero exit status, but
+ shall continue processing any remaining operands and shall write the
+ value accumulated at the time the error was detected to standard
+ output.'' Yecch. */
+#if 0
+ ret = 0; /* return partially-converted value from strtoimax */
+#endif
+ conversion_error = 1;
+ }
+ else if (errno == ERANGE)
+ printf_erange (garglist->word->word);
+
+ garglist = garglist->next;
+ return (ret);
+}
+
+static uintmax_t
+getuintmax ()
+{
+ uintmax_t ret;
+ char *ep;
+
+ if (garglist == 0)
+ return (0);
+
+ if (garglist->word->word[0] == '\'' || garglist->word->word[0] == '"')
+ return asciicode ();
+
+ errno = 0;
+ ret = strtoumax (garglist->word->word, &ep, 0);
+
+ if (*ep)
+ {
+ sh_invalidnum (garglist->word->word);
+ /* Same POSIX.2 conversion error requirements as getintmax(). */
+ ret = 0;
+ conversion_error = 1;
+ }
+ else if (errno == ERANGE)
+ printf_erange (garglist->word->word);
+
+ garglist = garglist->next;
+ return (ret);
+}
+
+static floatmax_t
+getfloatmax ()
+{
+ floatmax_t ret;
+ char *ep;
+
+ if (garglist == 0)
+ return (0);
+
+ if (garglist->word->word[0] == '\'' || garglist->word->word[0] == '"')
+ return asciicode ();
+
+ errno = 0;
+ ret = strtofltmax (garglist->word->word, &ep);
+
+ if (*ep)
+ {
+ sh_invalidnum (garglist->word->word);
+ /* Same thing about POSIX.2 conversion error requirements. */
+ ret = 0;
+ conversion_error = 1;
+ }
+ else if (errno == ERANGE)
+ printf_erange (garglist->word->word);
+
+ garglist = garglist->next;
+ return (ret);
+}
+
+/* NO check is needed for garglist here. */
+static intmax_t
+asciicode ()
+{
+ register intmax_t ch;
+#if defined (HANDLE_MULTIBYTE)
+ wchar_t wc;
+ size_t mblength, slen;
+#endif
+ DECLARE_MBSTATE;
+
+#if defined (HANDLE_MULTIBYTE)
+ slen = strlen (garglist->word->word+1);
+ mblength = MBLEN (garglist->word->word+1, slen);
+ if (mblength > 1)
+ {
+ mblength = mbtowc (&wc, garglist->word->word+1, slen);
+ ch = wc; /* XXX */
+ }
+ else
+#endif
+ ch = (unsigned char)garglist->word->word[1];
+
+ garglist = garglist->next;
+ return (ch);
+}
+
+static SHELL_VAR *
+bind_printf_variable (name, value, flags)
+ char *name;
+ char *value;
+ int flags;
+{
+#if defined (ARRAY_VARS)
+ if (valid_array_reference (name) == 0)
+ return (bind_variable (name, value, flags));
+ else
+ return (assign_array_element (name, value, flags));
+#else /* !ARRAY_VARS */
+ return bind_variable (name, value, flags);
+#endif /* !ARRAY_VARS */
+}
diff --git a/builtins/psize.c b/builtins/psize.c
new file mode 100644
index 0000000..30881fb
--- /dev/null
+++ b/builtins/psize.c
@@ -0,0 +1,79 @@
+/* psize.c - Find pipe size. */
+
+/* Copyright (C) 1987, 1991 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Write output in 128-byte chunks until we get a sigpipe or write gets an
+ EPIPE. Then report how many bytes we wrote. We assume that this is the
+ pipe size. */
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#ifndef _MINIX
+#include "../bashtypes.h"
+#endif
+#include <signal.h>
+#include <errno.h>
+
+#include "../command.h"
+#include "../general.h"
+#include "../sig.h"
+
+#ifndef errno
+extern int errno;
+#endif
+
+int nw;
+
+sighandler
+sigpipe (sig)
+ int sig;
+{
+ fprintf (stderr, "%d\n", nw);
+ exit (0);
+}
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ char buf[128];
+ register int i;
+
+ for (i = 0; i < 128; i++)
+ buf[i] = ' ';
+
+ signal (SIGPIPE, sigpipe);
+
+ nw = 0;
+ for (;;)
+ {
+ int n;
+ n = write (1, buf, 128);
+ nw += n;
+ }
+ return (0);
+}
diff --git a/builtins/psize.sh b/builtins/psize.sh
new file mode 100644
index 0000000..c4d73e1
--- /dev/null
+++ b/builtins/psize.sh
@@ -0,0 +1,45 @@
+#! /bin/sh
+#
+# psize.sh -- determine this system's pipe size, and write a define to
+# pipesize.h so ulimit.c can use it.
+
+: ${TMPDIR:=/tmp}
+# try to use mktemp(1) if the system supports it
+{ TMPFILE="`mktemp $TMPDIR/pipsize.XXXXXX 2>/dev/null`"; } 2>/dev/null
+used_mktemp=true
+
+if [ -z "$TMPFILE" ]; then
+ TMPNAME=pipsize.$$
+ TMPFILE=$TMPDIR/$TMPNAME
+ used_mktemp=false
+fi
+
+trap 'rm -f "$TMPFILE" ; exit 1' 1 2 3 6 15
+trap 'rm -f "$TMPFILE"' 0
+
+echo "/*"
+echo " * pipesize.h"
+echo " *"
+echo " * This file is automatically generated by psize.sh"
+echo " * Do not edit!"
+echo " */"
+echo ""
+
+#
+# Try to avoid tempfile races. We can't really check for the file's
+# existance before we run psize.aux, because `test -e' is not portable,
+# `test -h' (test for symlinks) is not portable, and `test -f' only
+# checks for regular files. If we used mktemp(1), we're ahead of the
+# game.
+#
+$used_mktemp || rm -f "$TMPFILE"
+
+./psize.aux 2>"$TMPFILE" | sleep 3
+
+if [ -s "$TMPFILE" ]; then
+ echo "#define PIPESIZE `cat "$TMPFILE"`"
+else
+ echo "#define PIPESIZE 512"
+fi
+
+exit 0
diff --git a/builtins/pushd.def b/builtins/pushd.def
new file mode 100644
index 0000000..05b7529
--- /dev/null
+++ b/builtins/pushd.def
@@ -0,0 +1,778 @@
+This file is pushd.def, from which is created pushd.c. It implements the
+builtins "pushd", "popd", and "dirs" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES pushd.c
+
+$BUILTIN pushd
+$FUNCTION pushd_builtin
+$DEPENDS_ON PUSHD_AND_POPD
+$SHORT_DOC pushd [-n] [+N | -N | dir]
+Add directories to stack.
+
+Adds a directory to the top of the directory stack, or rotates
+the stack, making the new top of the stack the current working
+directory. With no arguments, exchanges the top two directories.
+
+Options:
+ -n Suppresses the normal change of directory when adding
+ directories to the stack, so only the stack is manipulated.
+
+Arguments:
+ +N Rotates the stack so that the Nth directory (counting
+ from the left of the list shown by `dirs', starting with
+ zero) is at the top.
+
+ -N Rotates the stack so that the Nth directory (counting
+ from the right of the list shown by `dirs', starting with
+ zero) is at the top.
+
+ dir Adds DIR to the directory stack at the top, making it the
+ new current working directory.
+
+The `dirs' builtin displays the directory stack.
+
+Exit Status:
+Returns success unless an invalid argument is supplied or the directory
+change fails.
+$END
+
+$BUILTIN popd
+$FUNCTION popd_builtin
+$DEPENDS_ON PUSHD_AND_POPD
+$SHORT_DOC popd [-n] [+N | -N]
+Remove directories from stack.
+
+Removes entries from the directory stack. With no arguments, removes
+the top directory from the stack, and changes to the new top directory.
+
+Options:
+ -n Suppresses the normal change of directory when removing
+ directories from the stack, so only the stack is manipulated.
+
+Arguments:
+ +N Removes the Nth entry counting from the left of the list
+ shown by `dirs', starting with zero. For example: `popd +0'
+ removes the first directory, `popd +1' the second.
+
+ -N Removes the Nth entry counting from the right of the list
+ shown by `dirs', starting with zero. For example: `popd -0'
+ removes the last directory, `popd -1' the next to last.
+
+The `dirs' builtin displays the directory stack.
+
+Exit Status:
+Returns success unless an invalid argument is supplied or the directory
+change fails.
+$END
+
+$BUILTIN dirs
+$FUNCTION dirs_builtin
+$DEPENDS_ON PUSHD_AND_POPD
+$SHORT_DOC dirs [-clpv] [+N] [-N]
+Display directory stack.
+
+Display the list of currently remembered directories. Directories
+find their way onto the list with the `pushd' command; you can get
+back up through the list with the `popd' command.
+
+Options:
+ -c clear the directory stack by deleting all of the elements
+ -l do not print tilde-prefixed versions of directories relative
+ to your home directory
+ -p print the directory stack with one entry per line
+ -v print the directory stack with one entry per line prefixed
+ with its position in the stack
+
+Arguments:
+ +N Displays the Nth entry counting from the left of the list shown by
+ dirs when invoked without options, starting with zero.
+
+ -N Displays the Nth entry counting from the right of the list shown by
+ dirs when invoked without options, starting with zero.
+
+Exit Status:
+Returns success unless an invalid option is supplied or an error occurs.
+$END
+
+#include <config.h>
+
+#if defined (PUSHD_AND_POPD)
+#include <stdio.h>
+#ifndef _MINIX
+# include <sys/param.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include <errno.h>
+
+#include <tilde/tilde.h>
+
+#include "../shell.h"
+#include "maxpath.h"
+#include "common.h"
+#include "builtext.h"
+
+#ifdef LOADABLE_BUILTIN
+# include "builtins.h"
+#endif
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+/* The list of remembered directories. */
+static char **pushd_directory_list = (char **)NULL;
+
+/* Number of existing slots in this list. */
+static int directory_list_size;
+
+/* Offset to the end of the list. */
+static int directory_list_offset;
+
+static void pushd_error __P((int, char *));
+static void clear_directory_stack __P((void));
+static int cd_to_string __P((char *));
+static int change_to_temp __P((char *));
+static void add_dirstack_element __P((char *));
+static int get_dirstack_index __P((intmax_t, int, int *));
+
+#define NOCD 0x01
+#define ROTATE 0x02
+#define LONGFORM 0x04
+#define CLEARSTAK 0x08
+
+int
+pushd_builtin (list)
+ WORD_LIST *list;
+{
+ WORD_LIST *orig_list;
+ char *temp, *current_directory, *top;
+ int j, flags, skipopt;
+ intmax_t num;
+ char direction;
+
+ orig_list = list;
+ if (list && list->word && ISOPTION (list->word->word, '-'))
+ {
+ list = list->next;
+ skipopt = 1;
+ }
+ else
+ skipopt = 0;
+
+ /* If there is no argument list then switch current and
+ top of list. */
+ if (list == 0)
+ {
+ if (directory_list_offset == 0)
+ {
+ builtin_error (_("no other directory"));
+ return (EXECUTION_FAILURE);
+ }
+
+ current_directory = get_working_directory ("pushd");
+ if (current_directory == 0)
+ return (EXECUTION_FAILURE);
+
+ j = directory_list_offset - 1;
+ temp = pushd_directory_list[j];
+ pushd_directory_list[j] = current_directory;
+ j = change_to_temp (temp);
+ free (temp);
+ return j;
+ }
+
+ for (flags = 0; skipopt == 0 && list; list = list->next)
+ {
+ if (ISOPTION (list->word->word, 'n'))
+ {
+ flags |= NOCD;
+ }
+ else if (ISOPTION (list->word->word, '-'))
+ {
+ list = list->next;
+ break;
+ }
+ else if (list->word->word[0] == '-' && list->word->word[1] == '\0')
+ /* Let `pushd -' work like it used to. */
+ break;
+ else if (((direction = list->word->word[0]) == '+') || direction == '-')
+ {
+ if (legal_number (list->word->word + 1, &num) == 0)
+ {
+ sh_invalidnum (list->word->word);
+ builtin_usage ();
+ return (EXECUTION_FAILURE);
+ }
+
+ if (direction == '-')
+ num = directory_list_offset - num;
+
+ if (num > directory_list_offset || num < 0)
+ {
+ pushd_error (directory_list_offset, list->word->word);
+ return (EXECUTION_FAILURE);
+ }
+ flags |= ROTATE;
+ }
+ else if (*list->word->word == '-')
+ {
+ sh_invalidopt (list->word->word);
+ builtin_usage ();
+ return (EXECUTION_FAILURE);
+ }
+ else
+ break;
+ }
+
+ if (flags & ROTATE)
+ {
+ /* Rotate the stack num times. Remember, the current
+ directory acts like it is part of the stack. */
+ temp = get_working_directory ("pushd");
+
+ if (num == 0)
+ {
+ j = ((flags & NOCD) == 0) ? change_to_temp (temp) : EXECUTION_SUCCESS;
+ free (temp);
+ return j;
+ }
+
+ do
+ {
+ top = pushd_directory_list[directory_list_offset - 1];
+
+ for (j = directory_list_offset - 2; j > -1; j--)
+ pushd_directory_list[j + 1] = pushd_directory_list[j];
+
+ pushd_directory_list[j + 1] = temp;
+
+ temp = top;
+ num--;
+ }
+ while (num);
+
+ j = ((flags & NOCD) == 0) ? change_to_temp (temp) : EXECUTION_SUCCESS;
+ free (temp);
+ return j;
+ }
+
+ if (list == 0)
+ return (EXECUTION_SUCCESS);
+
+ /* Change to the directory in list->word->word. Save the current
+ directory on the top of the stack. */
+ current_directory = get_working_directory ("pushd");
+ if (current_directory == 0)
+ return (EXECUTION_FAILURE);
+
+ j = ((flags & NOCD) == 0) ? cd_builtin (skipopt ? orig_list : list) : EXECUTION_SUCCESS;
+ if (j == EXECUTION_SUCCESS)
+ {
+ add_dirstack_element ((flags & NOCD) ? savestring (list->word->word) : current_directory);
+ dirs_builtin ((WORD_LIST *)NULL);
+ if (flags & NOCD)
+ free (current_directory);
+ return (EXECUTION_SUCCESS);
+ }
+ else
+ {
+ free (current_directory);
+ return (EXECUTION_FAILURE);
+ }
+}
+
+/* Pop the directory stack, and then change to the new top of the stack.
+ If LIST is non-null it should consist of a word +N or -N, which says
+ what element to delete from the stack. The default is the top one. */
+int
+popd_builtin (list)
+ WORD_LIST *list;
+{
+ register int i;
+ intmax_t which;
+ int flags;
+ char direction;
+ char *which_word;
+
+ which_word = (char *)NULL;
+ for (flags = 0, which = 0, direction = '+'; list; list = list->next)
+ {
+ if (ISOPTION (list->word->word, 'n'))
+ {
+ flags |= NOCD;
+ }
+ else if (ISOPTION (list->word->word, '-'))
+ {
+ list = list->next;
+ break;
+ }
+ else if (((direction = list->word->word[0]) == '+') || direction == '-')
+ {
+ if (legal_number (list->word->word + 1, &which) == 0)
+ {
+ sh_invalidnum (list->word->word);
+ builtin_usage ();
+ return (EXECUTION_FAILURE);
+ }
+ which_word = list->word->word;
+ }
+ else if (*list->word->word == '-')
+ {
+ sh_invalidopt (list->word->word);
+ builtin_usage ();
+ return (EXECUTION_FAILURE);
+ }
+ else
+ break;
+ }
+
+ if (which > directory_list_offset || (directory_list_offset == 0 && which == 0))
+ {
+ pushd_error (directory_list_offset, which_word ? which_word : "");
+ return (EXECUTION_FAILURE);
+ }
+
+ /* Handle case of no specification, or top of stack specification. */
+ if ((direction == '+' && which == 0) ||
+ (direction == '-' && which == directory_list_offset))
+ {
+ i = ((flags & NOCD) == 0) ? cd_to_string (pushd_directory_list[directory_list_offset - 1])
+ : EXECUTION_SUCCESS;
+ if (i != EXECUTION_SUCCESS)
+ return (i);
+ free (pushd_directory_list[--directory_list_offset]);
+ }
+ else
+ {
+ /* Since an offset other than the top directory was specified,
+ remove that directory from the list and shift the remainder
+ of the list into place. */
+ i = (direction == '+') ? directory_list_offset - which : which;
+ free (pushd_directory_list[i]);
+ directory_list_offset--;
+
+ /* Shift the remainder of the list into place. */
+ for (; i < directory_list_offset; i++)
+ pushd_directory_list[i] = pushd_directory_list[i + 1];
+ }
+
+ dirs_builtin ((WORD_LIST *)NULL);
+ return (EXECUTION_SUCCESS);
+}
+
+/* Print the current list of directories on the directory stack. */
+int
+dirs_builtin (list)
+ WORD_LIST *list;
+{
+ int flags, desired_index, index_flag, vflag;
+ intmax_t i;
+ char *temp, *w;
+
+ for (flags = vflag = index_flag = 0, desired_index = -1, w = ""; list; list = list->next)
+ {
+ if (ISOPTION (list->word->word, 'l'))
+ {
+ flags |= LONGFORM;
+ }
+ else if (ISOPTION (list->word->word, 'c'))
+ {
+ flags |= CLEARSTAK;
+ }
+ else if (ISOPTION (list->word->word, 'v'))
+ {
+ vflag |= 2;
+ }
+ else if (ISOPTION (list->word->word, 'p'))
+ {
+ vflag |= 1;
+ }
+ else if (ISOPTION (list->word->word, '-'))
+ {
+ list = list->next;
+ break;
+ }
+ else if (*list->word->word == '+' || *list->word->word == '-')
+ {
+ int sign;
+ if (legal_number (w = list->word->word + 1, &i) == 0)
+ {
+ sh_invalidnum (list->word->word);
+ builtin_usage ();
+ return (EXECUTION_FAILURE);
+ }
+ sign = (*list->word->word == '+') ? 1 : -1;
+ desired_index = get_dirstack_index (i, sign, &index_flag);
+ }
+ else
+ {
+ sh_invalidopt (list->word->word);
+ builtin_usage ();
+ return (EXECUTION_FAILURE);
+ }
+ }
+
+ if (flags & CLEARSTAK)
+ {
+ clear_directory_stack ();
+ return (EXECUTION_SUCCESS);
+ }
+
+ if (index_flag && (desired_index < 0 || desired_index > directory_list_offset))
+ {
+ pushd_error (directory_list_offset, w);
+ return (EXECUTION_FAILURE);
+ }
+
+#define DIRSTACK_FORMAT(temp) \
+ (flags & LONGFORM) ? temp : polite_directory_format (temp)
+
+ /* The first directory printed is always the current working directory. */
+ if (index_flag == 0 || (index_flag == 1 && desired_index == 0))
+ {
+ temp = get_working_directory ("dirs");
+ if (temp == 0)
+ temp = savestring (_("<no current directory>"));
+ if (vflag & 2)
+ printf ("%2d %s", 0, DIRSTACK_FORMAT (temp));
+ else
+ printf ("%s", DIRSTACK_FORMAT (temp));
+ free (temp);
+ if (index_flag)
+ {
+ putchar ('\n');
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+ }
+ }
+
+#define DIRSTACK_ENTRY(i) \
+ (flags & LONGFORM) ? pushd_directory_list[i] \
+ : polite_directory_format (pushd_directory_list[i])
+
+ /* Now print the requested directory stack entries. */
+ if (index_flag)
+ {
+ if (vflag & 2)
+ printf ("%2d %s", directory_list_offset - desired_index,
+ DIRSTACK_ENTRY (desired_index));
+ else
+ printf ("%s", DIRSTACK_ENTRY (desired_index));
+ }
+ else
+ for (i = directory_list_offset - 1; i >= 0; i--)
+ if (vflag >= 2)
+ printf ("\n%2d %s", directory_list_offset - (int)i, DIRSTACK_ENTRY (i));
+ else
+ printf ("%s%s", (vflag & 1) ? "\n" : " ", DIRSTACK_ENTRY (i));
+
+ putchar ('\n');
+
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+}
+
+static void
+pushd_error (offset, arg)
+ int offset;
+ char *arg;
+{
+ if (offset == 0)
+ builtin_error (_("directory stack empty"));
+ else
+ sh_erange (arg, _("directory stack index"));
+}
+
+static void
+clear_directory_stack ()
+{
+ register int i;
+
+ for (i = 0; i < directory_list_offset; i++)
+ free (pushd_directory_list[i]);
+ directory_list_offset = 0;
+}
+
+/* Switch to the directory in NAME. This uses the cd_builtin to do the work,
+ so if the result is EXECUTION_FAILURE then an error message has already
+ been printed. */
+static int
+cd_to_string (name)
+ char *name;
+{
+ WORD_LIST *tlist;
+ WORD_LIST *dir;
+ int result;
+
+ dir = make_word_list (make_word (name), NULL);
+ tlist = make_word_list (make_word ("--"), dir);
+ result = cd_builtin (tlist);
+ dispose_words (tlist);
+ return (result);
+}
+
+static int
+change_to_temp (temp)
+ char *temp;
+{
+ int tt;
+
+ tt = temp ? cd_to_string (temp) : EXECUTION_FAILURE;
+
+ if (tt == EXECUTION_SUCCESS)
+ dirs_builtin ((WORD_LIST *)NULL);
+
+ return (tt);
+}
+
+static void
+add_dirstack_element (dir)
+ char *dir;
+{
+ if (directory_list_offset == directory_list_size)
+ pushd_directory_list = strvec_resize (pushd_directory_list, directory_list_size += 10);
+ pushd_directory_list[directory_list_offset++] = dir;
+}
+
+static int
+get_dirstack_index (ind, sign, indexp)
+ intmax_t ind;
+ int sign, *indexp;
+{
+ if (indexp)
+ *indexp = sign > 0 ? 1 : 2;
+
+ /* dirs +0 prints the current working directory. */
+ /* dirs -0 prints last element in directory stack */
+ if (ind == 0 && sign > 0)
+ return 0;
+ else if (ind == directory_list_offset)
+ {
+ if (indexp)
+ *indexp = sign > 0 ? 2 : 1;
+ return 0;
+ }
+ else if (ind >= 0 && ind <= directory_list_offset)
+ return (sign > 0 ? directory_list_offset - ind : ind);
+ else
+ return -1;
+}
+
+/* Used by the tilde expansion code. */
+char *
+get_dirstack_from_string (string)
+ char *string;
+{
+ int ind, sign, index_flag;
+ intmax_t i;
+
+ sign = 1;
+ if (*string == '-' || *string == '+')
+ {
+ sign = (*string == '-') ? -1 : 1;
+ string++;
+ }
+ if (legal_number (string, &i) == 0)
+ return ((char *)NULL);
+
+ index_flag = 0;
+ ind = get_dirstack_index (i, sign, &index_flag);
+ if (index_flag && (ind < 0 || ind > directory_list_offset))
+ return ((char *)NULL);
+ if (index_flag == 0 || (index_flag == 1 && ind == 0))
+ return (get_string_value ("PWD"));
+ else
+ return (pushd_directory_list[ind]);
+}
+
+#ifdef INCLUDE_UNUSED
+char *
+get_dirstack_element (ind, sign)
+ intmax_t ind;
+ int sign;
+{
+ int i;
+
+ i = get_dirstack_index (ind, sign, (int *)NULL);
+ return (i < 0 || i > directory_list_offset) ? (char *)NULL
+ : pushd_directory_list[i];
+}
+#endif
+
+void
+set_dirstack_element (ind, sign, value)
+ intmax_t ind;
+ int sign;
+ char *value;
+{
+ int i;
+
+ i = get_dirstack_index (ind, sign, (int *)NULL);
+ if (ind == 0 || i < 0 || i > directory_list_offset)
+ return;
+ free (pushd_directory_list[i]);
+ pushd_directory_list[i] = savestring (value);
+}
+
+WORD_LIST *
+get_directory_stack (flags)
+ int flags;
+{
+ register int i;
+ WORD_LIST *ret;
+ char *d, *t;
+
+ for (ret = (WORD_LIST *)NULL, i = 0; i < directory_list_offset; i++)
+ {
+ d = (flags&1) ? polite_directory_format (pushd_directory_list[i])
+ : pushd_directory_list[i];
+ ret = make_word_list (make_word (d), ret);
+ }
+ /* Now the current directory. */
+ d = get_working_directory ("dirstack");
+ i = 0; /* sentinel to decide whether or not to free d */
+ if (d == 0)
+ d = ".";
+ else
+ {
+ t = polite_directory_format (d);
+ /* polite_directory_format sometimes returns its argument unchanged.
+ If it does not, we can free d right away. If it does, we need to
+ mark d to be deleted later. */
+ if (t != d)
+ {
+ free (d);
+ d = t;
+ }
+ else /* t == d, so d is what we want */
+ i = 1;
+ }
+ ret = make_word_list (make_word (d), ret);
+ if (i)
+ free (d);
+ return ret; /* was (REVERSE_LIST (ret, (WORD_LIST *)); */
+}
+
+#ifdef LOADABLE_BUILTIN
+char * const dirs_doc[] = {
+N_("Display the list of currently remembered directories. Directories\n\
+ find their way onto the list with the `pushd' command; you can get\n\
+ back up through the list with the `popd' command.\n\
+ \n\
+ Options:\n\
+ -c clear the directory stack by deleting all of the elements\n\
+ -l do not print tilde-prefixed versions of directories relative\n\
+ to your home directory\n\
+ -p print the directory stack with one entry per line\n\
+ -v print the directory stack with one entry per line prefixed\n\
+ with its position in the stack\n\
+ \n\
+ Arguments:\n\
+ +N Displays the Nth entry counting from the left of the list shown by\n\
+ dirs when invoked without options, starting with zero.\n\
+ \n\
+ -N Displays the Nth entry counting from the right of the list shown by\n\
+ dirs when invoked without options, starting with zero."),
+ (char *)NULL
+};
+
+char * const pushd_doc[] = {
+N_("Adds a directory to the top of the directory stack, or rotates\n\
+ the stack, making the new top of the stack the current working\n\
+ directory. With no arguments, exchanges the top two directories.\n\
+ \n\
+ Options:\n\
+ -n Suppresses the normal change of directory when adding\n\
+ directories to the stack, so only the stack is manipulated.\n\
+ \n\
+ Arguments:\n\
+ +N Rotates the stack so that the Nth directory (counting\n\
+ from the left of the list shown by `dirs', starting with\n\
+ zero) is at the top.\n\
+ \n\
+ -N Rotates the stack so that the Nth directory (counting\n\
+ from the right of the list shown by `dirs', starting with\n\
+ zero) is at the top.\n\
+ \n\
+ dir Adds DIR to the directory stack at the top, making it the\n\
+ new current working directory.\n\
+ \n\
+ The `dirs' builtin displays the directory stack."),
+ (char *)NULL
+};
+
+char * const popd_doc[] = {
+N_("Removes entries from the directory stack. With no arguments, removes\n\
+ the top directory from the stack, and changes to the new top directory.\n\
+ \n\
+ Options:\n\
+ -n Suppresses the normal change of directory when removing\n\
+ directories from the stack, so only the stack is manipulated.\n\
+ \n\
+ Arguments:\n\
+ +N Removes the Nth entry counting from the left of the list\n\
+ shown by `dirs', starting with zero. For example: `popd +0'\n\
+ removes the first directory, `popd +1' the second.\n\
+ \n\
+ -N Removes the Nth entry counting from the right of the list\n\
+ shown by `dirs', starting with zero. For example: `popd -0'\n\
+ removes the last directory, `popd -1' the next to last.\n\
+ \n\
+ The `dirs' builtin displays the directory stack."),
+ (char *)NULL
+};
+
+struct builtin pushd_struct = {
+ "pushd",
+ pushd_builtin,
+ BUILTIN_ENABLED,
+ pushd_doc,
+ "pushd [+N | -N] [-n] [dir]",
+ 0
+};
+
+struct builtin popd_struct = {
+ "popd",
+ popd_builtin,
+ BUILTIN_ENABLED,
+ popd_doc,
+ "popd [+N | -N] [-n]",
+ 0
+};
+
+struct builtin dirs_struct = {
+ "dirs",
+ dirs_builtin,
+ BUILTIN_ENABLED,
+ dirs_doc,
+ "dirs [-clpv] [+N] [-N]",
+ 0
+};
+#endif /* LOADABLE_BUILTIN */
+
+#endif /* PUSHD_AND_POPD */
diff --git a/builtins/read.def b/builtins/read.def
new file mode 100644
index 0000000..20860be
--- /dev/null
+++ b/builtins/read.def
@@ -0,0 +1,985 @@
+This file is read.def, from which is created read.c.
+It implements the builtin "read" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES read.c
+
+$BUILTIN read
+$FUNCTION read_builtin
+$SHORT_DOC read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p prompt] [-t timeout] [-u fd] [name ...]
+Read a line from the standard input and split it into fields.
+
+Reads a single line from the standard input, or from file descriptor FD
+if the -u option is supplied. The line is split into fields as with word
+splitting, and the first word is assigned to the first NAME, the second
+word to the second NAME, and so on, with any leftover words assigned to
+the last NAME. Only the characters found in $IFS are recognized as word
+delimiters.
+
+If no NAMEs are supplied, the line read is stored in the REPLY variable.
+
+Options:
+ -a array assign the words read to sequential indices of the array
+ variable ARRAY, starting at zero
+ -d delim continue until the first character of DELIM is read, rather
+ than newline
+ -e use Readline to obtain the line in an interactive shell
+ -i text Use TEXT as the initial text for Readline
+ -n nchars return after reading NCHARS characters rather than waiting
+ for a newline, but honor a delimiter if fewer than NCHARS
+ characters are read before the delimiter
+ -N nchars return only after reading exactly NCHARS characters, unless
+ EOF is encountered or read times out, ignoring any delimiter
+ -p prompt output the string PROMPT without a trailing newline before
+ attempting to read
+ -r do not allow backslashes to escape any characters
+ -s do not echo input coming from a terminal
+ -t timeout time out and return failure if a complete line of input is
+ not read withint TIMEOUT seconds. The value of the TMOUT
+ variable is the default timeout. TIMEOUT may be a
+ fractional number. If TIMEOUT is 0, read returns success only
+ if input is available on the specified file descriptor. The
+ exit status is greater than 128 if the timeout is exceeded
+ -u fd read from file descriptor FD instead of the standard input
+
+Exit Status:
+The return code is zero, unless end-of-file is encountered, read times out,
+or an invalid file descriptor is supplied as the argument to -u.
+$END
+
+#include <config.h>
+
+#include "bashtypes.h"
+#include "posixstat.h"
+
+#include <stdio.h>
+
+#include "bashansi.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <signal.h>
+#include <errno.h>
+
+#ifdef __CYGWIN__
+# include <fcntl.h>
+# include <io.h>
+#endif
+
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+#include <shtty.h>
+
+#if defined (READLINE)
+#include "../bashline.h"
+#include <readline/readline.h>
+#endif
+
+#if defined (BUFFERED_INPUT)
+# include "input.h"
+#endif
+
+#if !defined(errno)
+extern int errno;
+#endif
+
+struct ttsave
+{
+ int fd;
+ TTYSTRUCT *attrs;
+};
+
+#if defined (READLINE)
+static void reset_attempted_completion_function __P((char *));
+static int set_itext __P((void));
+static char *edit_line __P((char *, char *));
+static void set_eol_delim __P((int));
+static void reset_eol_delim __P((char *));
+#endif
+static SHELL_VAR *bind_read_variable __P((char *, char *));
+#if defined (HANDLE_MULTIBYTE)
+static int read_mbchar __P((int, char *, int, int, int));
+#endif
+static void ttyrestore __P((struct ttsave *));
+
+static sighandler sigalrm __P((int));
+static void reset_alarm __P((void));
+
+static procenv_t alrmbuf;
+static SigHandler *old_alrm;
+static unsigned char delim;
+
+static sighandler
+sigalrm (s)
+ int s;
+{
+ longjmp (alrmbuf, 1);
+}
+
+static void
+reset_alarm ()
+{
+ set_signal_handler (SIGALRM, old_alrm);
+ falarm (0, 0);
+}
+
+/* Read the value of the shell variables whose names follow.
+ The reading is done from the current input stream, whatever
+ that may be. Successive words of the input line are assigned
+ to the variables mentioned in LIST. The last variable in LIST
+ gets the remainder of the words on the line. If no variables
+ are mentioned in LIST, then the default variable is $REPLY. */
+int
+read_builtin (list)
+ WORD_LIST *list;
+{
+ register char *varname;
+ int size, i, nr, pass_next, saw_escape, eof, opt, retval, code, print_ps2;
+ int input_is_tty, input_is_pipe, unbuffered_read, skip_ctlesc, skip_ctlnul;
+ int raw, edit, nchars, silent, have_timeout, ignore_delim, fd;
+ unsigned int tmsec, tmusec;
+ long ival, uval;
+ intmax_t intval;
+ char c;
+ char *input_string, *orig_input_string, *ifs_chars, *prompt, *arrayname;
+ char *e, *t, *t1, *ps2, *tofree;
+ struct stat tsb;
+ SHELL_VAR *var;
+ TTYSTRUCT ttattrs, ttset;
+ struct ttsave termsave;
+#if defined (ARRAY_VARS)
+ WORD_LIST *alist;
+#endif
+#if defined (READLINE)
+ char *rlbuf, *itext;
+ int rlind;
+#endif
+
+ USE_VAR(size);
+ USE_VAR(i);
+ USE_VAR(pass_next);
+ USE_VAR(print_ps2);
+ USE_VAR(saw_escape);
+ USE_VAR(input_is_pipe);
+/* USE_VAR(raw); */
+ USE_VAR(edit);
+ USE_VAR(tmsec);
+ USE_VAR(tmusec);
+ USE_VAR(nchars);
+ USE_VAR(silent);
+ USE_VAR(ifs_chars);
+ USE_VAR(prompt);
+ USE_VAR(arrayname);
+#if defined (READLINE)
+ USE_VAR(rlbuf);
+ USE_VAR(rlind);
+ USE_VAR(itext);
+#endif
+ USE_VAR(list);
+ USE_VAR(ps2);
+
+ i = 0; /* Index into the string that we are reading. */
+ raw = edit = 0; /* Not reading raw input by default. */
+ silent = 0;
+ arrayname = prompt = (char *)NULL;
+ fd = 0; /* file descriptor to read from */
+
+#if defined (READLINE)
+ rlbuf = itext = (char *)0;
+ rlind = 0;
+#endif
+
+ tmsec = tmusec = 0; /* no timeout */
+ nr = nchars = input_is_tty = input_is_pipe = unbuffered_read = have_timeout = 0;
+ delim = '\n'; /* read until newline */
+ ignore_delim = 0;
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "ersa:d:i:n:p:t:u:N:")) != -1)
+ {
+ switch (opt)
+ {
+ case 'r':
+ raw = 1;
+ break;
+ case 'p':
+ prompt = list_optarg;
+ break;
+ case 's':
+ silent = 1;
+ break;
+ case 'e':
+#if defined (READLINE)
+ edit = 1;
+#endif
+ break;
+ case 'i':
+#if defined (READLINE)
+ itext = list_optarg;
+#endif
+ break;
+#if defined (ARRAY_VARS)
+ case 'a':
+ arrayname = list_optarg;
+ break;
+#endif
+ case 't':
+ code = uconvert (list_optarg, &ival, &uval);
+ if (code == 0 || ival < 0 || uval < 0)
+ {
+ builtin_error (_("%s: invalid timeout specification"), list_optarg);
+ return (EXECUTION_FAILURE);
+ }
+ else
+ {
+ have_timeout = 1;
+ tmsec = ival;
+ tmusec = uval;
+ }
+ break;
+ case 'N':
+ ignore_delim = 1;
+ delim = -1;
+ case 'n':
+ code = legal_number (list_optarg, &intval);
+ if (code == 0 || intval < 0 || intval != (int)intval)
+ {
+ sh_invalidnum (list_optarg);
+ return (EXECUTION_FAILURE);
+ }
+ else
+ nchars = intval;
+ break;
+ case 'u':
+ code = legal_number (list_optarg, &intval);
+ if (code == 0 || intval < 0 || intval != (int)intval)
+ {
+ builtin_error (_("%s: invalid file descriptor specification"), list_optarg);
+ return (EXECUTION_FAILURE);
+ }
+ else
+ fd = intval;
+ if (sh_validfd (fd) == 0)
+ {
+ builtin_error (_("%d: invalid file descriptor: %s"), fd, strerror (errno));
+ return (EXECUTION_FAILURE);
+ }
+ break;
+ case 'd':
+ delim = *list_optarg;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ /* `read -t 0 var' tests whether input is available with select/FIONREAD,
+ and fails if those are unavailable */
+ if (have_timeout && tmsec == 0 && tmusec == 0)
+#if 0
+ return (EXECUTION_FAILURE);
+#else
+ return (input_avail (fd) ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
+#endif
+
+ /* If we're asked to ignore the delimiter, make sure we do. */
+ if (ignore_delim)
+ delim = -1;
+
+ /* IF IFS is unset, we use the default of " \t\n". */
+ ifs_chars = getifs ();
+ if (ifs_chars == 0) /* XXX - shouldn't happen */
+ ifs_chars = "";
+ /* If we want to read exactly NCHARS chars, don't split on IFS */
+ if (ignore_delim)
+ ifs_chars = "";
+ for (skip_ctlesc = skip_ctlnul = 0, e = ifs_chars; *e; e++)
+ skip_ctlesc |= *e == CTLESC, skip_ctlnul |= *e == CTLNUL;
+
+ input_string = (char *)xmalloc (size = 112); /* XXX was 128 */
+ input_string[0] = '\0';
+
+ /* $TMOUT, if set, is the default timeout for read. */
+ if (have_timeout == 0 && (e = get_string_value ("TMOUT")))
+ {
+ code = uconvert (e, &ival, &uval);
+ if (code == 0 || ival < 0 || uval < 0)
+ tmsec = tmusec = 0;
+ else
+ {
+ tmsec = ival;
+ tmusec = uval;
+ }
+ }
+
+ begin_unwind_frame ("read_builtin");
+
+#if defined (BUFFERED_INPUT)
+ if (interactive == 0 && default_buffered_input >= 0 && fd_is_bash_input (fd))
+ sync_buffered_stream (default_buffered_input);
+#endif
+
+ input_is_tty = isatty (fd);
+ if (input_is_tty == 0)
+#ifndef __CYGWIN__
+ input_is_pipe = (lseek (fd, 0L, SEEK_CUR) < 0) && (errno == ESPIPE);
+#else
+ input_is_pipe = 1;
+#endif
+
+ /* If the -p, -e or -s flags were given, but input is not coming from the
+ terminal, turn them off. */
+ if ((prompt || edit || silent) && input_is_tty == 0)
+ {
+ prompt = (char *)NULL;
+#if defined (READLINE)
+ itext = (char *)NULL;
+#endif
+ edit = silent = 0;
+ }
+
+#if defined (READLINE)
+ if (edit)
+ add_unwind_protect (xfree, rlbuf);
+#endif
+
+ pass_next = 0; /* Non-zero signifies last char was backslash. */
+ saw_escape = 0; /* Non-zero signifies that we saw an escape char */
+
+ if (tmsec > 0 || tmusec > 0)
+ {
+ /* Turn off the timeout if stdin is a regular file (e.g. from
+ input redirection). */
+ if ((fstat (fd, &tsb) < 0) || S_ISREG (tsb.st_mode))
+ tmsec = tmusec = 0;
+ }
+
+ if (tmsec > 0 || tmusec > 0)
+ {
+ code = setjmp (alrmbuf);
+ if (code)
+ {
+ /* Tricky. The top of the unwind-protect stack is the free of
+ input_string. We want to run all the rest and use input_string,
+ so we have to remove it from the stack. */
+ remove_unwind_protect ();
+ run_unwind_frame ("read_builtin");
+ input_string[i] = '\0'; /* make sure it's terminated */
+ retval = 128+SIGALRM;
+ goto assign_vars;
+ }
+ old_alrm = set_signal_handler (SIGALRM, sigalrm);
+ add_unwind_protect (reset_alarm, (char *)NULL);
+#if defined (READLINE)
+ if (edit)
+ add_unwind_protect (reset_attempted_completion_function, (char *)NULL);
+#endif
+ falarm (tmsec, tmusec);
+ }
+
+ /* If we've been asked to read only NCHARS chars, or we're using some
+ character other than newline to terminate the line, do the right
+ thing to readline or the tty. */
+ if (nchars > 0 || delim != '\n')
+ {
+#if defined (READLINE)
+ if (edit)
+ {
+ if (nchars > 0)
+ {
+ unwind_protect_int (rl_num_chars_to_read);
+ rl_num_chars_to_read = nchars;
+ }
+ if (delim != '\n')
+ {
+ set_eol_delim (delim);
+ add_unwind_protect (reset_eol_delim, (char *)NULL);
+ }
+ }
+ else
+#endif
+ if (input_is_tty)
+ {
+ /* ttsave() */
+ termsave.fd = fd;
+ ttgetattr (fd, &ttattrs);
+ termsave.attrs = &ttattrs;
+
+ ttset = ttattrs;
+ i = silent ? ttfd_cbreak (fd, &ttset) : ttfd_onechar (fd, &ttset);
+ if (i < 0)
+ sh_ttyerror (1);
+ add_unwind_protect ((Function *)ttyrestore, (char *)&termsave);
+ }
+ }
+ else if (silent) /* turn off echo but leave term in canonical mode */
+ {
+ /* ttsave (); */
+ termsave.fd = fd;
+ ttgetattr (fd, &ttattrs);
+ termsave.attrs = &ttattrs;
+
+ ttset = ttattrs;
+ i = ttfd_noecho (fd, &ttset); /* ttnoecho (); */
+ if (i < 0)
+ sh_ttyerror (1);
+
+ add_unwind_protect ((Function *)ttyrestore, (char *)&termsave);
+ }
+
+ /* This *must* be the top unwind-protect on the stack, so the manipulation
+ of the unwind-protect stack after the realloc() works right. */
+ add_unwind_protect (xfree, input_string);
+ interrupt_immediately++;
+ terminate_immediately++;
+
+ unbuffered_read = (nchars > 0) || (delim != '\n') || input_is_pipe;
+
+ if (prompt && edit == 0)
+ {
+ fprintf (stderr, "%s", prompt);
+ fflush (stderr);
+ }
+
+#if defined (__CYGWIN__) && defined (O_TEXT)
+ setmode (0, O_TEXT);
+#endif
+
+ ps2 = 0;
+ for (print_ps2 = eof = retval = 0;;)
+ {
+#if defined (READLINE)
+ if (edit)
+ {
+ if (rlbuf && rlbuf[rlind] == '\0')
+ {
+ xfree (rlbuf);
+ rlbuf = (char *)0;
+ }
+ if (rlbuf == 0)
+ {
+ rlbuf = edit_line (prompt ? prompt : "", itext);
+ rlind = 0;
+ }
+ if (rlbuf == 0)
+ {
+ eof = 1;
+ break;
+ }
+ c = rlbuf[rlind++];
+ }
+ else
+ {
+#endif
+
+ if (print_ps2)
+ {
+ if (ps2 == 0)
+ ps2 = get_string_value ("PS2");
+ fprintf (stderr, "%s", ps2 ? ps2 : "");
+ fflush (stderr);
+ print_ps2 = 0;
+ }
+
+ if (unbuffered_read)
+ retval = zread (fd, &c, 1);
+ else
+ retval = zreadc (fd, &c);
+
+ if (retval <= 0)
+ {
+ eof = 1;
+ break;
+ }
+
+#if defined (READLINE)
+ }
+#endif
+
+ if (i + 4 >= size) /* XXX was i + 2; use i + 4 for multibyte/read_mbchar */
+ {
+ input_string = (char *)xrealloc (input_string, size += 128);
+ remove_unwind_protect ();
+ add_unwind_protect (xfree, input_string);
+ }
+
+ /* If the next character is to be accepted verbatim, a backslash
+ newline pair still disappears from the input. */
+ if (pass_next)
+ {
+ pass_next = 0;
+ if (c == '\n')
+ {
+ i--; /* back up over the CTLESC */
+ if (interactive && input_is_tty && raw == 0)
+ print_ps2 = 1;
+ }
+ else
+ goto add_char;
+ continue;
+ }
+
+ /* This may cause problems if IFS contains CTLESC */
+ if (c == '\\' && raw == 0)
+ {
+ pass_next++;
+ if (skip_ctlesc == 0)
+ {
+ saw_escape++;
+ input_string[i++] = CTLESC;
+ }
+ continue;
+ }
+
+ if ((unsigned char)c == delim)
+ break;
+
+ if ((skip_ctlesc == 0 && c == CTLESC) || (skip_ctlnul == 0 && c == CTLNUL))
+ {
+ saw_escape++;
+ input_string[i++] = CTLESC;
+ }
+
+add_char:
+ input_string[i++] = c;
+
+#if defined (HANDLE_MULTIBYTE)
+ if (nchars > 0 && MB_CUR_MAX > 1)
+ {
+ input_string[i] = '\0'; /* for simplicity and debugging */
+ i += read_mbchar (fd, input_string, i, c, unbuffered_read);
+ }
+#endif
+
+ nr++;
+
+ if (nchars > 0 && nr >= nchars)
+ break;
+ }
+ input_string[i] = '\0';
+
+#if 1
+ if (retval < 0)
+ {
+ builtin_error (_("read error: %d: %s"), fd, strerror (errno));
+ run_unwind_frame ("read_builtin");
+ return (EXECUTION_FAILURE);
+ }
+#endif
+
+ if (tmsec > 0 || tmusec > 0)
+ reset_alarm ();
+
+ if (nchars > 0 || delim != '\n')
+ {
+#if defined (READLINE)
+ if (edit)
+ {
+ if (nchars > 0)
+ rl_num_chars_to_read = 0;
+ if (delim != '\n')
+ reset_eol_delim ((char *)NULL);
+ }
+ else
+#endif
+ if (input_is_tty)
+ ttyrestore (&termsave);
+ }
+ else if (silent)
+ ttyrestore (&termsave);
+
+ if (unbuffered_read == 0)
+ zsyncfd (fd);
+
+ discard_unwind_frame ("read_builtin");
+
+ retval = eof ? EXECUTION_FAILURE : EXECUTION_SUCCESS;
+
+assign_vars:
+
+ interrupt_immediately--;
+ terminate_immediately--;
+
+#if defined (ARRAY_VARS)
+ /* If -a was given, take the string read, break it into a list of words,
+ an assign them to `arrayname' in turn. */
+ if (arrayname)
+ {
+ if (legal_identifier (arrayname) == 0)
+ {
+ sh_invalidid (arrayname);
+ xfree (input_string);
+ return (EXECUTION_FAILURE);
+ }
+
+ var = find_or_make_array_variable (arrayname, 1);
+ if (var == 0)
+ {
+ xfree (input_string);
+ return EXECUTION_FAILURE; /* readonly or noassign */
+ }
+ array_flush (array_cell (var));
+
+ alist = list_string (input_string, ifs_chars, 0);
+ if (alist)
+ {
+ if (saw_escape)
+ dequote_list (alist);
+ else
+ word_list_remove_quoted_nulls (alist);
+ assign_array_var_from_word_list (var, alist, 0);
+ dispose_words (alist);
+ }
+ xfree (input_string);
+ return (retval);
+ }
+#endif /* ARRAY_VARS */
+
+ /* If there are no variables, save the text of the line read to the
+ variable $REPLY. ksh93 strips leading and trailing IFS whitespace,
+ so that `read x ; echo "$x"' and `read ; echo "$REPLY"' behave the
+ same way, but I believe that the difference in behaviors is useful
+ enough to not do it. Without the bash behavior, there is no way
+ to read a line completely without interpretation or modification
+ unless you mess with $IFS (e.g., setting it to the empty string).
+ If you disagree, change the occurrences of `#if 0' to `#if 1' below. */
+ if (list == 0)
+ {
+#if 0
+ orig_input_string = input_string;
+ for (t = input_string; ifs_chars && *ifs_chars && spctabnl(*t) && isifs(*t); t++)
+ ;
+ input_string = t;
+ input_string = strip_trailing_ifs_whitespace (input_string, ifs_chars, saw_escape);
+#endif
+
+ if (saw_escape)
+ {
+ t = dequote_string (input_string);
+ var = bind_variable ("REPLY", t, 0);
+ free (t);
+ }
+ else
+ var = bind_variable ("REPLY", input_string, 0);
+ VUNSETATTR (var, att_invisible);
+
+ free (input_string);
+ return (retval);
+ }
+
+ /* This code implements the Posix.2 spec for splitting the words
+ read and assigning them to variables. */
+ orig_input_string = input_string;
+
+ /* Remove IFS white space at the beginning of the input string. If
+ $IFS is null, no field splitting is performed. */
+ for (t = input_string; ifs_chars && *ifs_chars && spctabnl(*t) && isifs(*t); t++)
+ ;
+ input_string = t;
+ for (; list->next; list = list->next)
+ {
+ varname = list->word->word;
+#if defined (ARRAY_VARS)
+ if (legal_identifier (varname) == 0 && valid_array_reference (varname) == 0)
+#else
+ if (legal_identifier (varname) == 0)
+#endif
+ {
+ sh_invalidid (varname);
+ xfree (orig_input_string);
+ return (EXECUTION_FAILURE);
+ }
+
+ /* If there are more variables than words read from the input,
+ the remaining variables are set to the empty string. */
+ if (*input_string)
+ {
+ /* This call updates INPUT_STRING. */
+ t = get_word_from_string (&input_string, ifs_chars, &e);
+ if (t)
+ *e = '\0';
+ /* Don't bother to remove the CTLESC unless we added one
+ somewhere while reading the string. */
+ if (t && saw_escape)
+ {
+ t1 = dequote_string (t);
+ var = bind_read_variable (varname, t1);
+ xfree (t1);
+ }
+ else
+ var = bind_read_variable (varname, t);
+ }
+ else
+ {
+ t = (char *)0;
+ var = bind_read_variable (varname, "");
+ }
+
+ FREE (t);
+ if (var == 0)
+ {
+ xfree (orig_input_string);
+ return (EXECUTION_FAILURE);
+ }
+
+ stupidly_hack_special_variables (varname);
+ VUNSETATTR (var, att_invisible);
+ }
+
+ /* Now assign the rest of the line to the last variable argument. */
+#if defined (ARRAY_VARS)
+ if (legal_identifier (list->word->word) == 0 && valid_array_reference (list->word->word) == 0)
+#else
+ if (legal_identifier (list->word->word) == 0)
+#endif
+ {
+ sh_invalidid (list->word->word);
+ xfree (orig_input_string);
+ return (EXECUTION_FAILURE);
+ }
+
+#if 0
+ /* This has to be done this way rather than using string_list
+ and list_string because Posix.2 says that the last variable gets the
+ remaining words and their intervening separators. */
+ input_string = strip_trailing_ifs_whitespace (input_string, ifs_chars, saw_escape);
+#else
+ /* Check whether or not the number of fields is exactly the same as the
+ number of variables. */
+ tofree = NULL;
+ if (*input_string)
+ {
+ t1 = input_string;
+ t = get_word_from_string (&input_string, ifs_chars, &e);
+ if (*input_string == 0)
+ tofree = input_string = t;
+ else
+ {
+ input_string = strip_trailing_ifs_whitespace (t1, ifs_chars, saw_escape);
+ tofree = t;
+ }
+ }
+#endif
+
+ if (saw_escape)
+ {
+ t = dequote_string (input_string);
+ var = bind_read_variable (list->word->word, t);
+ xfree (t);
+ }
+ else
+ var = bind_read_variable (list->word->word, input_string);
+ stupidly_hack_special_variables (list->word->word);
+ FREE (tofree);
+
+ if (var)
+ VUNSETATTR (var, att_invisible);
+ xfree (orig_input_string);
+
+ return (retval);
+}
+
+static SHELL_VAR *
+bind_read_variable (name, value)
+ char *name, *value;
+{
+#if defined (ARRAY_VARS)
+ if (valid_array_reference (name) == 0)
+ return (bind_variable (name, value, 0));
+ else
+ return (assign_array_element (name, value, 0));
+#else /* !ARRAY_VARS */
+ return bind_variable (name, value, 0);
+#endif /* !ARRAY_VARS */
+}
+
+#if defined (HANDLE_MULTIBYTE)
+static int
+read_mbchar (fd, string, ind, ch, unbuffered)
+ int fd;
+ char *string;
+ int ind, ch, unbuffered;
+{
+ char mbchar[MB_LEN_MAX + 1];
+ int i, n, r;
+ char c;
+ size_t ret;
+ mbstate_t ps, ps_back;
+ wchar_t wc;
+
+ memset (&ps, '\0', sizeof (mbstate_t));
+ memset (&ps_back, '\0', sizeof (mbstate_t));
+
+ mbchar[0] = ch;
+ i = 1;
+ for (n = 0; n <= MB_LEN_MAX; n++)
+ {
+ ps_back = ps;
+ ret = mbrtowc (&wc, mbchar, i, &ps);
+ if (ret == (size_t)-2)
+ {
+ ps = ps_back;
+ if (unbuffered)
+ r = zread (fd, &c, 1);
+ else
+ r = zreadc (fd, &c);
+ if (r < 0)
+ goto mbchar_return;
+ mbchar[i++] = c;
+ continue;
+ }
+ else if (ret == (size_t)-1 || ret == (size_t)0 || ret > (size_t)0)
+ break;
+ }
+
+mbchar_return:
+ if (i > 1) /* read a multibyte char */
+ /* mbchar[0] is already string[ind-1] */
+ for (r = 1; r < i; r++)
+ string[ind+r-1] = mbchar[r];
+ return i - 1;
+}
+#endif
+
+
+static void
+ttyrestore (ttp)
+ struct ttsave *ttp;
+{
+ ttsetattr (ttp->fd, ttp->attrs);
+}
+
+#if defined (READLINE)
+static rl_completion_func_t *old_attempted_completion_function = 0;
+static rl_hook_func_t *old_startup_hook;
+static char *deftext;
+
+static void
+reset_attempted_completion_function (cp)
+ char *cp;
+{
+ if (rl_attempted_completion_function == 0 && old_attempted_completion_function)
+ rl_attempted_completion_function = old_attempted_completion_function;
+}
+
+static int
+set_itext ()
+{
+ int r1, r2;
+
+ r1 = r2 = 0;
+ if (old_startup_hook)
+ r1 = (*old_startup_hook) ();
+ if (deftext)
+ {
+ r2 = rl_insert_text (deftext);
+ deftext = (char *)NULL;
+ rl_startup_hook = old_startup_hook;
+ old_startup_hook = (rl_hook_func_t *)NULL;
+ }
+ return (r1 || r2);
+}
+
+static char *
+edit_line (p, itext)
+ char *p;
+ char *itext;
+{
+ char *ret;
+ int len;
+
+ if (bash_readline_initialized == 0)
+ initialize_readline ();
+
+ old_attempted_completion_function = rl_attempted_completion_function;
+ rl_attempted_completion_function = (rl_completion_func_t *)NULL;
+ if (itext)
+ {
+ old_startup_hook = rl_startup_hook;
+ rl_startup_hook = set_itext;
+ deftext = itext;
+ }
+ ret = readline (p);
+ rl_attempted_completion_function = old_attempted_completion_function;
+ old_attempted_completion_function = (rl_completion_func_t *)NULL;
+
+ if (ret == 0)
+ return ret;
+ len = strlen (ret);
+ ret = (char *)xrealloc (ret, len + 2);
+ ret[len++] = delim;
+ ret[len] = '\0';
+ return ret;
+}
+
+static int old_delim_ctype;
+static rl_command_func_t *old_delim_func;
+static int old_newline_ctype;
+static rl_command_func_t *old_newline_func;
+
+static unsigned char delim_char;
+
+static void
+set_eol_delim (c)
+ int c;
+{
+ Keymap cmap;
+
+ if (bash_readline_initialized == 0)
+ initialize_readline ();
+ cmap = rl_get_keymap ();
+
+ /* Change newline to self-insert */
+ old_newline_ctype = cmap[RETURN].type;
+ old_newline_func = cmap[RETURN].function;
+ cmap[RETURN].type = ISFUNC;
+ cmap[RETURN].function = rl_insert;
+
+ /* Bind the delimiter character to accept-line. */
+ old_delim_ctype = cmap[c].type;
+ old_delim_func = cmap[c].function;
+ cmap[c].type = ISFUNC;
+ cmap[c].function = rl_newline;
+
+ delim_char = c;
+}
+
+static void
+reset_eol_delim (cp)
+ char *cp;
+{
+ Keymap cmap;
+
+ cmap = rl_get_keymap ();
+
+ cmap[RETURN].type = old_newline_ctype;
+ cmap[RETURN].function = old_newline_func;
+
+ cmap[delim_char].type = old_delim_ctype;
+ cmap[delim_char].function = old_delim_func;
+}
+#endif
diff --git a/builtins/reserved.def b/builtins/reserved.def
new file mode 100644
index 0000000..2478f16
--- /dev/null
+++ b/builtins/reserved.def
@@ -0,0 +1,288 @@
+This file is reserved.def, in which the shell reserved words are defined.
+It has no direct C file production, but defines builtins for the Bash
+builtin help command.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$BUILTIN for
+$SHORT_DOC for NAME [in WORDS ... ] ; do COMMANDS; done
+Execute commands for each member in a list.
+
+The `for' loop executes a sequence of commands for each member in a
+list of items. If `in WORDS ...;' is not present, then `in "$@"' is
+assumed. For each element in WORDS, NAME is set to that element, and
+the COMMANDS are executed.
+
+Exit Status:
+Returns the status of the last command executed.
+$END
+
+$BUILTIN for ((
+$DOCNAME arith_for
+$SHORT_DOC for (( exp1; exp2; exp3 )); do COMMANDS; done
+Arithmetic for loop.
+
+Equivalent to
+ (( EXP1 ))
+ while (( EXP2 )); do
+ COMMANDS
+ (( EXP3 ))
+ done
+EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is
+omitted, it behaves as if it evaluates to 1.
+
+Exit Status:
+Returns the status of the last command executed.
+$END
+
+$BUILTIN select
+$SHORT_DOC select NAME [in WORDS ... ;] do COMMANDS; done
+Select words from a list and execute commands.
+
+The WORDS are expanded, generating a list of words. The
+set of expanded words is printed on the standard error, each
+preceded by a number. If `in WORDS' is not present, `in "$@"'
+is assumed. The PS3 prompt is then displayed and a line read
+from the standard input. If the line consists of the number
+corresponding to one of the displayed words, then NAME is set
+to that word. If the line is empty, WORDS and the prompt are
+redisplayed. If EOF is read, the command completes. Any other
+value read causes NAME to be set to null. The line read is saved
+in the variable REPLY. COMMANDS are executed after each selection
+until a break command is executed.
+
+Exit Status:
+Returns the status of the last command executed.
+$END
+
+$BUILTIN time
+$SHORT_DOC time [-p] pipeline
+Report time consumed by pipeline's execution.
+
+Execute PIPELINE and print a summary of the real time, user CPU time,
+and system CPU time spent executing PIPELINE when it terminates.
+
+Options:
+ -p print the timing summary in the portable Posix format
+
+The value of the TIMEFORMAT variable is used as the output format.
+
+Exit Status:
+The return status is the return status of PIPELINE.
+$END
+
+$BUILTIN case
+$SHORT_DOC case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac
+Execute commands based on pattern matching.
+
+Selectively execute COMMANDS based upon WORD matching PATTERN. The
+`|' is used to separate multiple patterns.
+
+Exit Status:
+Returns the status of the last command executed.
+$END
+
+$BUILTIN if
+$SHORT_DOC if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else COMMANDS; ] fi
+Execute commands based on conditional.
+
+The `if COMMANDS' list is executed. If its exit status is zero, then the
+`then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list is
+executed in turn, and if its exit status is zero, the corresponding
+`then COMMANDS' list is executed and the if command completes. Otherwise,
+the `else COMMANDS' list is executed, if present. The exit status of the
+entire construct is the exit status of the last command executed, or zero
+if no condition tested true.
+
+Exit Status:
+Returns the status of the last command executed.
+$END
+
+$BUILTIN while
+$SHORT_DOC while COMMANDS; do COMMANDS; done
+Execute commands as long as a test succeeds.
+
+Expand and execute COMMANDS as long as the final command in the
+`while' COMMANDS has an exit status of zero.
+
+Exit Status:
+Returns the status of the last command executed.
+$END
+
+$BUILTIN until
+$SHORT_DOC until COMMANDS; do COMMANDS; done
+Execute commands as long as a test does not succeed.
+
+Expand and execute COMMANDS as long as the final command in the
+`until' COMMANDS has an exit status which is not zero.
+
+Exit Status:
+Returns the status of the last command executed.
+$END
+
+$BUILTIN coproc
+$SHORT_DOC coproc [NAME] command [redirections]
+Create a coprocess named NAME.
+
+Execute COMMAND asynchronously, with the standard output and standard
+input of the command connected via a pipe to file descriptors assigned
+to indices 0 and 1 of an array variable NAME in the executing shell.
+The default NAME is "COPROC".
+
+Exit Status:
+Returns the exit status of COMMAND.
+$END
+
+$BUILTIN function
+$SHORT_DOC function name { COMMANDS ; } or name () { COMMANDS ; }
+Define shell function.
+
+Create a shell function named NAME. When invoked as a simple command,
+NAME runs COMMANDs in the calling shell's context. When NAME is invoked,
+the arguments are passed to the function as $1...$n, and the function's
+name is in $FUNCNAME.
+
+Exit Status:
+Returns success unless NAME is readonly.
+$END
+
+$BUILTIN { ... }
+$DOCNAME grouping_braces
+$SHORT_DOC { COMMANDS ; }
+Group commands as a unit.
+
+Run a set of commands in a group. This is one way to redirect an
+entire set of commands.
+
+Exit Status:
+Returns the status of the last command executed.
+$END
+
+$BUILTIN %
+$DOCNAME fg_percent
+$SHORT_DOC job_spec [&]
+Resume job in foreground.
+
+Equivalent to the JOB_SPEC argument to the `fg' command. Resume a
+stopped or background job. JOB_SPEC can specify either a job name
+or a job number. Following JOB_SPEC with a `&' places the job in
+the background, as if the job specification had been supplied as an
+argument to `bg'.
+
+Exit Status:
+Returns the status of the resumed job.
+$END
+
+$BUILTIN (( ... ))
+$DOCNAME arith
+$SHORT_DOC (( expression ))
+Evaluate arithmetic expression.
+
+The EXPRESSION is evaluated according to the rules for arithmetic
+evaluation. Equivalent to "let EXPRESSION".
+
+Exit Status:
+Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise.
+$END
+
+$BUILTIN [[ ... ]]
+$DOCNAME conditional
+$SHORT_DOC [[ expression ]]
+Execute conditional command.
+
+Returns a status of 0 or 1 depending on the evaluation of the conditional
+expression EXPRESSION. Expressions are composed of the same primaries used
+by the `test' builtin, and may be combined using the following operators:
+
+ ( EXPRESSION ) Returns the value of EXPRESSION
+ ! EXPRESSION True if EXPRESSION is false; else false
+ EXPR1 && EXPR2 True if both EXPR1 and EXPR2 are true; else false
+ EXPR1 || EXPR2 True if either EXPR1 or EXPR2 is true; else false
+
+When the `==' and `!=' operators are used, the string to the right of
+the operator is used as a pattern and pattern matching is performed.
+When the `=~' operator is used, the string to the right of the operator
+is matched as a regular expression.
+
+The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to
+determine the expression's value.
+
+Exit Status:
+0 or 1 depending on value of EXPRESSION.
+$END
+
+$BUILTIN variables
+$DOCNAME variable_help
+$SHORT_DOC variables - Names and meanings of some shell variables
+Common shell variable names and usage.
+
+BASH_VERSION Version information for this Bash.
+CDPATH A colon-separated list of directories to search
+ for directories given as arguments to `cd'.
+GLOBIGNORE A colon-separated list of patterns describing filenames to
+ be ignored by pathname expansion.
+#if defined (HISTORY)
+HISTFILE The name of the file where your command history is stored.
+HISTFILESIZE The maximum number of lines this file can contain.
+HISTSIZE The maximum number of history lines that a running
+ shell can access.
+#endif /* HISTORY */
+HOME The complete pathname to your login directory.
+HOSTNAME The name of the current host.
+HOSTTYPE The type of CPU this version of Bash is running under.
+IGNOREEOF Controls the action of the shell on receipt of an EOF
+ character as the sole input. If set, then the value
+ of it is the number of EOF characters that can be seen
+ in a row on an empty line before the shell will exit
+ (default 10). When unset, EOF signifies the end of input.
+MACHTYPE A string describing the current system Bash is running on.
+MAILCHECK How often, in seconds, Bash checks for new mail.
+MAILPATH A colon-separated list of filenames which Bash checks
+ for new mail.
+OSTYPE The version of Unix this version of Bash is running on.
+PATH A colon-separated list of directories to search when
+ looking for commands.
+PROMPT_COMMAND A command to be executed before the printing of each
+ primary prompt.
+PS1 The primary prompt string.
+PS2 The secondary prompt string.
+PWD The full pathname of the current directory.
+SHELLOPTS A colon-separated list of enabled shell options.
+TERM The name of the current terminal type.
+TIMEFORMAT The output format for timing statistics displayed by the
+ `time' reserved word.
+auto_resume Non-null means a command word appearing on a line by
+ itself is first looked for in the list of currently
+ stopped jobs. If found there, that job is foregrounded.
+ A value of `exact' means that the command word must
+ exactly match a command in the list of stopped jobs. A
+ value of `substring' means that the command word must
+ match a substring of the job. Any other value means that
+ the command must be a prefix of a stopped job.
+#if defined (HISTORY)
+# if defined (BANG_HISTORY)
+histchars Characters controlling history expansion and quick
+ substitution. The first character is the history
+ substitution character, usually `!'. The second is
+ the `quick substitution' character, usually `^'. The
+ third is the `history comment' character, usually `#'.
+# endif /* BANG_HISTORY */
+HISTIGNORE A colon-separated list of patterns used to decide which
+ commands should be saved on the history list.
+#endif /* HISTORY */
+$END
diff --git a/builtins/return.def b/builtins/return.def
new file mode 100644
index 0000000..641ee16
--- /dev/null
+++ b/builtins/return.def
@@ -0,0 +1,76 @@
+This file is return.def, from which is created return.c.
+It implements the builtin "return" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES return.c
+
+$BUILTIN return
+
+$FUNCTION return_builtin
+$SHORT_DOC return [n]
+Return from a shell function.
+
+Causes a function or sourced script to exit with the return value
+specified by N. If N is omitted, the return status is that of the
+last command executed within the function or script.
+
+Exit Status:
+Returns N, or failure if the shell is not executing a function or script.
+$END
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+extern int last_command_exit_value;
+extern int subshell_environment;
+extern int return_catch_flag, return_catch_value;
+
+/* If we are executing a user-defined function then exit with the value
+ specified as an argument. if no argument is given, then the last
+ exit status is used. */
+int
+return_builtin (list)
+ WORD_LIST *list;
+{
+ if (no_options (list))
+ return (EX_USAGE);
+ list = loptend; /* skip over possible `--' */
+
+ return_catch_value = get_exitstat (list);
+
+ if (return_catch_flag)
+ longjmp (return_catch, 1);
+ else
+ {
+ builtin_error (_("can only `return' from a function or sourced script"));
+ return (EXECUTION_FAILURE);
+ }
+}
diff --git a/builtins/set.def b/builtins/set.def
new file mode 100644
index 0000000..5e550cb
--- /dev/null
+++ b/builtins/set.def
@@ -0,0 +1,854 @@
+This file is set.def, from which is created set.c.
+It implements the "set" and "unset" builtins in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES set.c
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../flags.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+#if defined (READLINE)
+# include "../input.h"
+# include "../bashline.h"
+# include <readline/readline.h>
+#endif
+
+#if defined (HISTORY)
+# include "../bashhist.h"
+#endif
+
+extern int posixly_correct, ignoreeof, eof_encountered_limit;
+#if defined (HISTORY)
+extern int dont_save_function_defs;
+#endif
+#if defined (READLINE)
+extern int no_line_editing;
+#endif /* READLINE */
+
+$BUILTIN set
+$FUNCTION set_builtin
+$SHORT_DOC set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]
+Set or unset values of shell options and positional parameters.
+
+Change the value of shell attributes and positional parameters, or
+display the names and values of shell variables.
+
+Options:
+ -a Mark variables which are modified or created for export.
+ -b Notify of job termination immediately.
+ -e Exit immediately if a command exits with a non-zero status.
+ -f Disable file name generation (globbing).
+ -h Remember the location of commands as they are looked up.
+ -k All assignment arguments are placed in the environment for a
+ command, not just those that precede the command name.
+ -m Job control is enabled.
+ -n Read commands but do not execute them.
+ -o option-name
+ Set the variable corresponding to option-name:
+ allexport same as -a
+ braceexpand same as -B
+#if defined (READLINE)
+ emacs use an emacs-style line editing interface
+#endif /* READLINE */
+ errexit same as -e
+ errtrace same as -E
+ functrace same as -T
+ hashall same as -h
+#if defined (BANG_HISTORY)
+ histexpand same as -H
+#endif /* BANG_HISTORY */
+#if defined (HISTORY)
+ history enable command history
+#endif
+ ignoreeof the shell will not exit upon reading EOF
+ interactive-comments
+ allow comments to appear in interactive commands
+ keyword same as -k
+ monitor same as -m
+ noclobber same as -C
+ noexec same as -n
+ noglob same as -f
+ nolog currently accepted but ignored
+ notify same as -b
+ nounset same as -u
+ onecmd same as -t
+ physical same as -P
+ pipefail the return value of a pipeline is the status of
+ the last command to exit with a non-zero status,
+ or zero if no command exited with a non-zero status
+ posix change the behavior of bash where the default
+ operation differs from the Posix standard to
+ match the standard
+ privileged same as -p
+ verbose same as -v
+#if defined (READLINE)
+ vi use a vi-style line editing interface
+#endif /* READLINE */
+ xtrace same as -x
+ -p Turned on whenever the real and effective user ids do not match.
+ Disables processing of the $ENV file and importing of shell
+ functions. Turning this option off causes the effective uid and
+ gid to be set to the real uid and gid.
+ -t Exit after reading and executing one command.
+ -u Treat unset variables as an error when substituting.
+ -v Print shell input lines as they are read.
+ -x Print commands and their arguments as they are executed.
+#if defined (BRACE_EXPANSION)
+ -B the shell will perform brace expansion
+#endif /* BRACE_EXPANSION */
+ -C If set, disallow existing regular files to be overwritten
+ by redirection of output.
+ -E If set, the ERR trap is inherited by shell functions.
+#if defined (BANG_HISTORY)
+ -H Enable ! style history substitution. This flag is on
+ by default when the shell is interactive.
+#endif /* BANG_HISTORY */
+ -P If set, do not follow symbolic links when executing commands
+ such as cd which change the current directory.
+ -T If set, the DEBUG trap is inherited by shell functions.
+ - Assign any remaining arguments to the positional parameters.
+ The -x and -v options are turned off.
+
+Using + rather than - causes these flags to be turned off. The
+flags can also be used upon invocation of the shell. The current
+set of flags may be found in $-. The remaining n ARGs are positional
+parameters and are assigned, in order, to $1, $2, .. $n. If no
+ARGs are given, all shell variables are printed.
+
+Exit Status:
+Returns success unless an invalid option is given.
+$END
+
+typedef int setopt_set_func_t __P((int, char *));
+typedef int setopt_get_func_t __P((char *));
+
+static void print_minus_o_option __P((char *, int, int));
+static void print_all_shell_variables __P((void));
+
+static int set_ignoreeof __P((int, char *));
+static int set_posix_mode __P((int, char *));
+
+#if defined (READLINE)
+static int set_edit_mode __P((int, char *));
+static int get_edit_mode __P((char *));
+#endif
+
+#if defined (HISTORY)
+static int bash_set_history __P((int, char *));
+#endif
+
+static const char * const on = "on";
+static const char * const off = "off";
+
+/* A struct used to match long options for set -o to the corresponding
+ option letter or internal variable. The functions can be called to
+ dynamically generate values. */
+const struct {
+ char *name;
+ int letter;
+ int *variable;
+ setopt_set_func_t *set_func;
+ setopt_get_func_t *get_func;
+} o_options[] = {
+ { "allexport", 'a', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+#if defined (BRACE_EXPANSION)
+ { "braceexpand",'B', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+#endif
+#if defined (READLINE)
+ { "emacs", '\0', (int *)NULL, set_edit_mode, get_edit_mode },
+#endif
+ { "errexit", 'e', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "errtrace", 'E', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "functrace", 'T', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "hashall", 'h', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+#if defined (BANG_HISTORY)
+ { "histexpand", 'H', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+#endif /* BANG_HISTORY */
+#if defined (HISTORY)
+ { "history", '\0', &enable_history_list, bash_set_history, (setopt_get_func_t *)NULL },
+#endif
+ { "ignoreeof", '\0', &ignoreeof, set_ignoreeof, (setopt_get_func_t *)NULL },
+ { "interactive-comments", '\0', &interactive_comments, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "keyword", 'k', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "monitor", 'm', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "noclobber", 'C', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "noexec", 'n', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "noglob", 'f', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+#if defined (HISTORY)
+ { "nolog", '\0', &dont_save_function_defs, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+#endif
+#if defined (JOB_CONTROL)
+ { "notify", 'b', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+#endif /* JOB_CONTROL */
+ { "nounset", 'u', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "onecmd", 't', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "physical", 'P', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "pipefail", '\0', &pipefail_opt, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "posix", '\0', &posixly_correct, set_posix_mode, (setopt_get_func_t *)NULL },
+ { "privileged", 'p', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ { "verbose", 'v', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+#if defined (READLINE)
+ { "vi", '\0', (int *)NULL, set_edit_mode, get_edit_mode },
+#endif
+ { "xtrace", 'x', (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+ {(char *)NULL, 0 , (int *)NULL, (setopt_set_func_t *)NULL, (setopt_get_func_t *)NULL },
+};
+
+#define N_O_OPTIONS (sizeof (o_options) / sizeof (o_options[0]))
+
+#define GET_BINARY_O_OPTION_VALUE(i, name) \
+ ((o_options[i].get_func) ? (*o_options[i].get_func) (name) \
+ : (*o_options[i].variable))
+
+#define SET_BINARY_O_OPTION_VALUE(i, onoff, name) \
+ ((o_options[i].set_func) ? (*o_options[i].set_func) (onoff, name) \
+ : (*o_options[i].variable = (onoff == FLAG_ON)))
+
+int
+minus_o_option_value (name)
+ char *name;
+{
+ register int i;
+ int *on_or_off;
+
+ for (i = 0; o_options[i].name; i++)
+ {
+ if (STREQ (name, o_options[i].name))
+ {
+ if (o_options[i].letter)
+ {
+ on_or_off = find_flag (o_options[i].letter);
+ return ((on_or_off == FLAG_UNKNOWN) ? -1 : *on_or_off);
+ }
+ else
+ return (GET_BINARY_O_OPTION_VALUE (i, name));
+ }
+ }
+
+ return (-1);
+}
+
+#define MINUS_O_FORMAT "%-15s\t%s\n"
+
+static void
+print_minus_o_option (name, value, pflag)
+ char *name;
+ int value, pflag;
+{
+ if (pflag == 0)
+ printf (MINUS_O_FORMAT, name, value ? on : off);
+ else
+ printf ("set %co %s\n", value ? '-' : '+', name);
+}
+
+void
+list_minus_o_opts (mode, reusable)
+ int mode, reusable;
+{
+ register int i;
+ int *on_or_off, value;
+
+ for (i = 0; o_options[i].name; i++)
+ {
+ if (o_options[i].letter)
+ {
+ value = 0;
+ on_or_off = find_flag (o_options[i].letter);
+ if (on_or_off == FLAG_UNKNOWN)
+ on_or_off = &value;
+ if (mode == -1 || mode == *on_or_off)
+ print_minus_o_option (o_options[i].name, *on_or_off, reusable);
+ }
+ else
+ {
+ value = GET_BINARY_O_OPTION_VALUE (i, o_options[i].name);
+ if (mode == -1 || mode == value)
+ print_minus_o_option (o_options[i].name, value, reusable);
+ }
+ }
+}
+
+char **
+get_minus_o_opts ()
+{
+ char **ret;
+ int i;
+
+ ret = strvec_create (N_O_OPTIONS + 1);
+ for (i = 0; o_options[i].name; i++)
+ ret[i] = o_options[i].name;
+ ret[i] = (char *)NULL;
+ return ret;
+}
+
+static int
+set_ignoreeof (on_or_off, option_name)
+ int on_or_off;
+ char *option_name;
+{
+ ignoreeof = on_or_off == FLAG_ON;
+ unbind_variable ("ignoreeof");
+ if (ignoreeof)
+ bind_variable ("IGNOREEOF", "10", 0);
+ else
+ unbind_variable ("IGNOREEOF");
+ sv_ignoreeof ("IGNOREEOF");
+ return 0;
+}
+
+static int
+set_posix_mode (on_or_off, option_name)
+ int on_or_off;
+ char *option_name;
+{
+ posixly_correct = on_or_off == FLAG_ON;
+ if (posixly_correct == 0)
+ unbind_variable ("POSIXLY_CORRECT");
+ else
+ bind_variable ("POSIXLY_CORRECT", "y", 0);
+ sv_strict_posix ("POSIXLY_CORRECT");
+ return (0);
+}
+
+#if defined (READLINE)
+/* Magic. This code `knows' how readline handles rl_editing_mode. */
+static int
+set_edit_mode (on_or_off, option_name)
+ int on_or_off;
+ char *option_name;
+{
+ int isemacs;
+
+ if (on_or_off == FLAG_ON)
+ {
+ rl_variable_bind ("editing-mode", option_name);
+
+ if (interactive)
+ with_input_from_stdin ();
+ no_line_editing = 0;
+ }
+ else
+ {
+ isemacs = rl_editing_mode == 1;
+ if ((isemacs && *option_name == 'e') || (!isemacs && *option_name == 'v'))
+ {
+ if (interactive)
+ with_input_from_stream (stdin, "stdin");
+ no_line_editing = 1;
+ }
+ }
+ return 1-no_line_editing;
+}
+
+static int
+get_edit_mode (name)
+ char *name;
+{
+ return (*name == 'e' ? no_line_editing == 0 && rl_editing_mode == 1
+ : no_line_editing == 0 && rl_editing_mode == 0);
+}
+#endif /* READLINE */
+
+#if defined (HISTORY)
+static int
+bash_set_history (on_or_off, option_name)
+ int on_or_off;
+ char *option_name;
+{
+ if (on_or_off == FLAG_ON)
+ {
+ enable_history_list = 1;
+ bash_history_enable ();
+ if (history_lines_this_session == 0)
+ load_history ();
+ }
+ else
+ {
+ enable_history_list = 0;
+ bash_history_disable ();
+ }
+ return (1 - enable_history_list);
+}
+#endif
+
+int
+set_minus_o_option (on_or_off, option_name)
+ int on_or_off;
+ char *option_name;
+{
+ register int i;
+
+ for (i = 0; o_options[i].name; i++)
+ {
+ if (STREQ (option_name, o_options[i].name))
+ {
+ if (o_options[i].letter == 0)
+ {
+ SET_BINARY_O_OPTION_VALUE (i, on_or_off, option_name);
+ return (EXECUTION_SUCCESS);
+ }
+ else
+ {
+ if (change_flag (o_options[i].letter, on_or_off) == FLAG_ERROR)
+ {
+ sh_invalidoptname (option_name);
+ return (EXECUTION_FAILURE);
+ }
+ else
+ return (EXECUTION_SUCCESS);
+ }
+
+ }
+ }
+
+ sh_invalidoptname (option_name);
+ return (EX_USAGE);
+}
+
+static void
+print_all_shell_variables ()
+{
+ SHELL_VAR **vars;
+
+ vars = all_shell_variables ();
+ if (vars)
+ {
+ print_var_list (vars);
+ free (vars);
+ }
+
+ /* POSIX.2 does not allow function names and definitions to be output when
+ `set' is invoked without options (PASC Interp #202). */
+ if (posixly_correct == 0)
+ {
+ vars = all_shell_functions ();
+ if (vars)
+ {
+ print_func_list (vars);
+ free (vars);
+ }
+ }
+}
+
+void
+set_shellopts ()
+{
+ char *value;
+ char tflag[N_O_OPTIONS];
+ int vsize, i, vptr, *ip, exported;
+ SHELL_VAR *v;
+
+ for (vsize = i = 0; o_options[i].name; i++)
+ {
+ tflag[i] = 0;
+ if (o_options[i].letter)
+ {
+ ip = find_flag (o_options[i].letter);
+ if (ip && *ip)
+ {
+ vsize += strlen (o_options[i].name) + 1;
+ tflag[i] = 1;
+ }
+ }
+ else if (GET_BINARY_O_OPTION_VALUE (i, o_options[i].name))
+ {
+ vsize += strlen (o_options[i].name) + 1;
+ tflag[i] = 1;
+ }
+ }
+
+ value = (char *)xmalloc (vsize + 1);
+
+ for (i = vptr = 0; o_options[i].name; i++)
+ {
+ if (tflag[i])
+ {
+ strcpy (value + vptr, o_options[i].name);
+ vptr += strlen (o_options[i].name);
+ value[vptr++] = ':';
+ }
+ }
+
+ if (vptr)
+ vptr--; /* cut off trailing colon */
+ value[vptr] = '\0';
+
+ v = find_variable ("SHELLOPTS");
+
+ /* Turn off the read-only attribute so we can bind the new value, and
+ note whether or not the variable was exported. */
+ if (v)
+ {
+ VUNSETATTR (v, att_readonly);
+ exported = exported_p (v);
+ }
+ else
+ exported = 0;
+
+ v = bind_variable ("SHELLOPTS", value, 0);
+
+ /* Turn the read-only attribute back on, and turn off the export attribute
+ if it was set implicitly by mark_modified_vars and SHELLOPTS was not
+ exported before we bound the new value. */
+ VSETATTR (v, att_readonly);
+ if (mark_modified_vars && exported == 0 && exported_p (v))
+ VUNSETATTR (v, att_exported);
+
+ free (value);
+}
+
+void
+parse_shellopts (value)
+ char *value;
+{
+ char *vname;
+ int vptr;
+
+ vptr = 0;
+ while (vname = extract_colon_unit (value, &vptr))
+ {
+ set_minus_o_option (FLAG_ON, vname);
+ free (vname);
+ }
+}
+
+void
+initialize_shell_options (no_shellopts)
+ int no_shellopts;
+{
+ char *temp;
+ SHELL_VAR *var;
+
+ if (no_shellopts == 0)
+ {
+ var = find_variable ("SHELLOPTS");
+ /* set up any shell options we may have inherited. */
+ if (var && imported_p (var))
+ {
+ temp = (array_p (var) || assoc_p (var)) ? (char *)NULL : savestring (value_cell (var));
+ if (temp)
+ {
+ parse_shellopts (temp);
+ free (temp);
+ }
+ }
+ }
+
+ /* Set up the $SHELLOPTS variable. */
+ set_shellopts ();
+}
+
+/* Reset the values of the -o options that are not also shell flags. This is
+ called from execute_cmd.c:initialize_subshell() when setting up a subshell
+ to run an executable shell script without a leading `#!'. */
+void
+reset_shell_options ()
+{
+#if defined (HISTORY)
+ remember_on_history = enable_history_list = 1;
+#endif
+ ignoreeof = 0;
+}
+
+/* Set some flags from the word values in the input list. If LIST is empty,
+ then print out the values of the variables instead. If LIST contains
+ non-flags, then set $1 - $9 to the successive words of LIST. */
+int
+set_builtin (list)
+ WORD_LIST *list;
+{
+ int on_or_off, flag_name, force_assignment, opts_changed, rv, r;
+ register char *arg;
+ char s[3];
+
+ if (list == 0)
+ {
+ print_all_shell_variables ();
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+ }
+
+ /* Check validity of flag arguments. */
+ rv = EXECUTION_SUCCESS;
+ reset_internal_getopt ();
+ while ((flag_name = internal_getopt (list, optflags)) != -1)
+ {
+ switch (flag_name)
+ {
+ case '?':
+ builtin_usage ();
+ return (list_optopt == '?' ? EXECUTION_SUCCESS : EX_USAGE);
+ default:
+ break;
+ }
+ }
+
+ /* Do the set command. While the list consists of words starting with
+ '-' or '+' treat them as flags, otherwise, start assigning them to
+ $1 ... $n. */
+ for (force_assignment = opts_changed = 0; list; )
+ {
+ arg = list->word->word;
+
+ /* If the argument is `--' or `-' then signal the end of the list
+ and remember the remaining arguments. */
+ if (arg[0] == '-' && (!arg[1] || (arg[1] == '-' && !arg[2])))
+ {
+ list = list->next;
+
+ /* `set --' unsets the positional parameters. */
+ if (arg[1] == '-')
+ force_assignment = 1;
+
+ /* Until told differently, the old shell behaviour of
+ `set - [arg ...]' being equivalent to `set +xv [arg ...]'
+ stands. Posix.2 says the behaviour is marked as obsolescent. */
+ else
+ {
+ change_flag ('x', '+');
+ change_flag ('v', '+');
+ opts_changed = 1;
+ }
+
+ break;
+ }
+
+ if ((on_or_off = *arg) && (on_or_off == '-' || on_or_off == '+'))
+ {
+ while (flag_name = *++arg)
+ {
+ if (flag_name == '?')
+ {
+ builtin_usage ();
+ return (EXECUTION_SUCCESS);
+ }
+ else if (flag_name == 'o') /* -+o option-name */
+ {
+ char *option_name;
+ WORD_LIST *opt;
+
+ opt = list->next;
+
+ if (opt == 0)
+ {
+ list_minus_o_opts (-1, (on_or_off == '+'));
+ rv = sh_chkwrite (rv);
+ continue;
+ }
+
+ option_name = opt->word->word;
+
+ if (option_name == 0 || *option_name == '\0' ||
+ *option_name == '-' || *option_name == '+')
+ {
+ list_minus_o_opts (-1, (on_or_off == '+'));
+ continue;
+ }
+ list = list->next; /* Skip over option name. */
+
+ opts_changed = 1;
+ if ((r = set_minus_o_option (on_or_off, option_name)) != EXECUTION_SUCCESS)
+ {
+ set_shellopts ();
+ return (r);
+ }
+ }
+ else if (change_flag (flag_name, on_or_off) == FLAG_ERROR)
+ {
+ s[0] = on_or_off;
+ s[1] = flag_name;
+ s[2] = '\0';
+ sh_invalidopt (s);
+ builtin_usage ();
+ set_shellopts ();
+ return (EXECUTION_FAILURE);
+ }
+ opts_changed = 1;
+ }
+ }
+ else
+ {
+ break;
+ }
+ list = list->next;
+ }
+
+ /* Assigning $1 ... $n */
+ if (list || force_assignment)
+ remember_args (list, 1);
+ /* Set up new value of $SHELLOPTS */
+ if (opts_changed)
+ set_shellopts ();
+ return (rv);
+}
+
+$BUILTIN unset
+$FUNCTION unset_builtin
+$SHORT_DOC unset [-f] [-v] [name ...]
+Unset values and attributes of shell variables and functions.
+
+For each NAME, remove the corresponding variable or function.
+
+Options:
+ -f treat each NAME as a shell function
+ -v treat each NAME as a shell variable
+
+Without options, unset first tries to unset a variable, and if that fails,
+tries to unset a function.
+
+Some variables cannot be unset; also see `readonly'.
+
+Exit Status:
+Returns success unless an invalid option is given or a NAME is read-only.
+$END
+
+#define NEXT_VARIABLE() any_failed++; list = list->next; continue;
+
+int
+unset_builtin (list)
+ WORD_LIST *list;
+{
+ int unset_function, unset_variable, unset_array, opt, any_failed;
+ char *name;
+
+ unset_function = unset_variable = unset_array = any_failed = 0;
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "fv")) != -1)
+ {
+ switch (opt)
+ {
+ case 'f':
+ unset_function = 1;
+ break;
+ case 'v':
+ unset_variable = 1;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+
+ list = loptend;
+
+ if (unset_function && unset_variable)
+ {
+ builtin_error (_("cannot simultaneously unset a function and a variable"));
+ return (EXECUTION_FAILURE);
+ }
+
+ while (list)
+ {
+ SHELL_VAR *var;
+ int tem;
+#if defined (ARRAY_VARS)
+ char *t;
+#endif
+
+ name = list->word->word;
+
+#if defined (ARRAY_VARS)
+ unset_array = 0;
+ if (!unset_function && valid_array_reference (name))
+ {
+ t = strchr (name, '[');
+ *t++ = '\0';
+ unset_array++;
+ }
+#endif
+
+ /* Bash allows functions with names which are not valid identifiers
+ to be created when not in posix mode, so check only when in posix
+ mode when unsetting a function. */
+ if (((unset_function && posixly_correct) || !unset_function) && legal_identifier (name) == 0)
+ {
+ sh_invalidid (name);
+ NEXT_VARIABLE ();
+ }
+
+ var = unset_function ? find_function (name) : find_variable (name);
+
+ if (var && !unset_function && non_unsettable_p (var))
+ {
+ builtin_error (_("%s: cannot unset"), name);
+ NEXT_VARIABLE ();
+ }
+
+ /* Posix.2 says that unsetting readonly variables is an error. */
+ if (var && readonly_p (var))
+ {
+ builtin_error (_("%s: cannot unset: readonly %s"),
+ name, unset_function ? "function" : "variable");
+ NEXT_VARIABLE ();
+ }
+
+ /* Unless the -f option is supplied, the name refers to a variable. */
+#if defined (ARRAY_VARS)
+ if (var && unset_array)
+ {
+ if (array_p (var) == 0 && assoc_p (var) == 0)
+ {
+ builtin_error (_("%s: not an array variable"), name);
+ NEXT_VARIABLE ();
+ }
+ else
+ {
+ tem = unbind_array_element (var, t);
+ if (tem == -1)
+ any_failed++;
+ }
+ }
+ else
+#endif /* ARRAY_VARS */
+ tem = unset_function ? unbind_func (name) : unbind_variable (name);
+
+ /* This is what Posix.2 draft 11+ says. ``If neither -f nor -v
+ is specified, the name refers to a variable; if a variable by
+ that name does not exist, a function by that name, if any,
+ shall be unset.'' */
+ if (tem == -1 && !unset_function && !unset_variable)
+ tem = unbind_func (name);
+
+ /* SUSv3, POSIX.1-2001 say: ``Unsetting a variable or function that
+ was not previously set shall not be considered an error.'' */
+
+ if (unset_function == 0)
+ stupidly_hack_special_variables (name);
+
+ list = list->next;
+ }
+
+ return (any_failed ? EXECUTION_FAILURE : EXECUTION_SUCCESS);
+}
diff --git a/builtins/setattr.def b/builtins/setattr.def
new file mode 100644
index 0000000..8b4cdf7
--- /dev/null
+++ b/builtins/setattr.def
@@ -0,0 +1,514 @@
+This file is setattr.def, from which is created setattr.c.
+It implements the builtins "export" and "readonly", in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES setattr.c
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+extern int posixly_correct;
+extern int array_needs_making;
+extern char *this_command_name;
+extern sh_builtin_func_t *this_shell_builtin;
+
+#ifdef ARRAY_VARS
+extern int declare_builtin __P((WORD_LIST *));
+#endif
+
+#define READONLY_OR_EXPORT \
+ (this_shell_builtin == readonly_builtin || this_shell_builtin == export_builtin)
+
+$BUILTIN export
+$FUNCTION export_builtin
+$SHORT_DOC export [-fn] [name[=value] ...] or export -p
+Set export attribute for shell variables.
+
+Marks each NAME for automatic export to the environment of subsequently
+executed commands. If VALUE is supplied, assign VALUE before exporting.
+
+Options:
+ -f refer to shell functions
+ -n remove the export property from each NAME
+ -p display a list of all exported variables and functions
+
+An argument of `--' disables further option processing.
+
+Exit Status:
+Returns success unless an invalid option is given or NAME is invalid.
+$END
+
+/* For each variable name in LIST, make that variable appear in the
+ environment passed to simple commands. If there is no LIST, then
+ print all such variables. An argument of `-n' says to remove the
+ exported attribute from variables named in LIST. An argument of
+ -f indicates that the names present in LIST refer to functions. */
+int
+export_builtin (list)
+ register WORD_LIST *list;
+{
+ return (set_or_show_attributes (list, att_exported, 0));
+}
+
+$BUILTIN readonly
+$FUNCTION readonly_builtin
+$SHORT_DOC readonly [-af] [name[=value] ...] or readonly -p
+Mark shell variables as unchangeable.
+
+Mark each NAME as read-only; the values of these NAMEs may not be
+changed by subsequent assignment. If VALUE is supplied, assign VALUE
+before marking as read-only.
+
+Options:
+ -a refer to indexed array variables
+ -A refer to associative array variables
+ -f refer to shell functions
+ -p display a list of all readonly variables and functions
+
+An argument of `--' disables further option processing.
+
+Exit Status:
+Returns success unless an invalid option is given or NAME is invalid.
+$END
+
+/* For each variable name in LIST, make that variable readonly. Given an
+ empty LIST, print out all existing readonly variables. */
+int
+readonly_builtin (list)
+ register WORD_LIST *list;
+{
+ return (set_or_show_attributes (list, att_readonly, 0));
+}
+
+#if defined (ARRAY_VARS)
+# define ATTROPTS "aAfnp"
+#else
+# define ATTROPTS "fnp"
+#endif
+
+/* For each variable name in LIST, make that variable have the specified
+ ATTRIBUTE. An arg of `-n' says to remove the attribute from the the
+ remaining names in LIST (doesn't work for readonly). */
+int
+set_or_show_attributes (list, attribute, nodefs)
+ register WORD_LIST *list;
+ int attribute, nodefs;
+{
+ register SHELL_VAR *var;
+ int assign, undo, any_failed, assign_error, opt;
+ int functions_only, arrays_only, assoc_only;
+ int aflags;
+ char *name;
+#if defined (ARRAY_VARS)
+ WORD_LIST *nlist, *tlist;
+ WORD_DESC *w;
+#endif
+
+ functions_only = arrays_only = assoc_only = 0;
+ undo = any_failed = assign_error = 0;
+ /* Read arguments from the front of the list. */
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, ATTROPTS)) != -1)
+ {
+ switch (opt)
+ {
+ case 'n':
+ undo = 1;
+ break;
+ case 'f':
+ functions_only = 1;
+ break;
+#if defined (ARRAY_VARS)
+ case 'a':
+ arrays_only = 1;
+ break;
+ case 'A':
+ assoc_only = 1;
+ break;
+#endif
+ case 'p':
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ if (list)
+ {
+ if (attribute & att_exported)
+ array_needs_making = 1;
+
+ /* Cannot undo readonly status, silently disallowed. */
+ if (undo && (attribute & att_readonly))
+ attribute &= ~att_readonly;
+
+ while (list)
+ {
+ name = list->word->word;
+
+ if (functions_only) /* xxx -f name */
+ {
+ var = find_function (name);
+ if (var == 0)
+ {
+ builtin_error (_("%s: not a function"), name);
+ any_failed++;
+ }
+ else
+ SETVARATTR (var, attribute, undo);
+
+ list = list->next;
+ continue;
+ }
+
+ /* xxx [-np] name[=value] */
+ assign = assignment (name, 0);
+
+ aflags = 0;
+ if (assign)
+ {
+ name[assign] = '\0';
+ if (name[assign - 1] == '+')
+ {
+ aflags |= ASS_APPEND;
+ name[assign - 1] = '\0';
+ }
+ }
+
+ if (legal_identifier (name) == 0)
+ {
+ sh_invalidid (name);
+ if (assign)
+ assign_error++;
+ else
+ any_failed++;
+ list = list->next;
+ continue;
+ }
+
+ if (assign) /* xxx [-np] name=value */
+ {
+ name[assign] = '=';
+ if (aflags & ASS_APPEND)
+ name[assign - 1] = '+';
+#if defined (ARRAY_VARS)
+ /* Let's try something here. Turn readonly -a xxx=yyy into
+ declare -ra xxx=yyy and see what that gets us. */
+ if (arrays_only || assoc_only)
+ {
+ tlist = list->next;
+ list->next = (WORD_LIST *)NULL;
+ w = arrays_only ? make_word ("-ra") : make_word ("-rA");
+ nlist = make_word_list (w, list);
+ opt = declare_builtin (nlist);
+ if (opt != EXECUTION_SUCCESS)
+ assign_error++;
+ list->next = tlist;
+ dispose_word (w);
+ free (nlist);
+ }
+ else
+#endif
+ /* This word has already been expanded once with command
+ and parameter expansion. Call do_assignment_no_expand (),
+ which does not do command or parameter substitution. If
+ the assignment is not performed correctly, flag an error. */
+ if (do_assignment_no_expand (name) == 0)
+ assign_error++;
+ name[assign] = '\0';
+ if (aflags & ASS_APPEND)
+ name[assign - 1] = '\0';
+ }
+
+ set_var_attribute (name, attribute, undo);
+ list = list->next;
+ }
+ }
+ else
+ {
+ SHELL_VAR **variable_list;
+ register int i;
+
+ if ((attribute & att_function) || functions_only)
+ {
+ variable_list = all_shell_functions ();
+ if (attribute != att_function)
+ attribute &= ~att_function; /* so declare -xf works, for example */
+ }
+ else
+ variable_list = all_shell_variables ();
+
+#if defined (ARRAY_VARS)
+ if (attribute & att_array)
+ {
+ arrays_only++;
+ if (attribute != att_array)
+ attribute &= ~att_array;
+ }
+ else if (attribute & att_assoc)
+ {
+ assoc_only++;
+ if (attribute != att_assoc)
+ attribute &= ~att_assoc;
+ }
+#endif
+
+ if (variable_list)
+ {
+ for (i = 0; var = variable_list[i]; i++)
+ {
+#if defined (ARRAY_VARS)
+ if (arrays_only && array_p (var) == 0)
+ continue;
+ else if (assoc_only && assoc_p (var) == 0)
+ continue;
+#endif
+ if ((var->attributes & attribute))
+ {
+ show_var_attributes (var, READONLY_OR_EXPORT, nodefs);
+ if (any_failed = sh_chkwrite (any_failed))
+ break;
+ }
+ }
+ free (variable_list);
+ }
+ }
+
+ return (assign_error ? EX_BADASSIGN
+ : ((any_failed == 0) ? EXECUTION_SUCCESS
+ : EXECUTION_FAILURE));
+}
+
+/* Show all variable variables (v == 1) or functions (v == 0) with
+ attributes. */
+int
+show_all_var_attributes (v, nodefs)
+ int v, nodefs;
+{
+ SHELL_VAR **variable_list, *var;
+ int any_failed;
+ register int i;
+
+ variable_list = v ? all_shell_variables () : all_shell_functions ();
+ if (variable_list == 0)
+ return (EXECUTION_SUCCESS);
+
+ for (i = any_failed = 0; var = variable_list[i]; i++)
+ {
+ show_var_attributes (var, READONLY_OR_EXPORT, nodefs);
+ if (any_failed = sh_chkwrite (any_failed))
+ break;
+ }
+ free (variable_list);
+ return (any_failed == 0 ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
+}
+
+/* Show the attributes for shell variable VAR. If NODEFS is non-zero,
+ don't show function definitions along with the name. If PATTR is
+ non-zero, it indicates we're being called from `export' or `readonly'.
+ In POSIX mode, this prints the name of the calling builtin (`export'
+ or `readonly') instead of `declare', and doesn't print function defs
+ when called by `export' or `readonly'. */
+int
+show_var_attributes (var, pattr, nodefs)
+ SHELL_VAR *var;
+ int pattr, nodefs;
+{
+ char flags[16], *x;
+ int i;
+
+ i = 0;
+
+ /* pattr == 0 means we are called from `declare'. */
+ if (pattr == 0 || posixly_correct == 0)
+ {
+#if defined (ARRAY_VARS)
+ if (array_p (var))
+ flags[i++] = 'a';
+
+ if (assoc_p (var))
+ flags[i++] = 'A';
+#endif
+
+ if (function_p (var))
+ flags[i++] = 'f';
+
+ if (integer_p (var))
+ flags[i++] = 'i';
+
+ if (readonly_p (var))
+ flags[i++] = 'r';
+
+ if (trace_p (var))
+ flags[i++] = 't';
+
+ if (exported_p (var))
+ flags[i++] = 'x';
+
+ if (capcase_p (var))
+ flags[i++] = 'c';
+
+ if (lowercase_p (var))
+ flags[i++] = 'l';
+
+ if (uppercase_p (var))
+ flags[i++] = 'u';
+ }
+ else
+ {
+#if defined (ARRAY_VARS)
+ if (array_p (var))
+ flags[i++] = 'a';
+
+ if (assoc_p (var))
+ flags[i++] = 'A';
+#endif
+
+ if (function_p (var))
+ flags[i++] = 'f';
+ }
+
+ flags[i] = '\0';
+
+ /* If we're printing functions with definitions, print the function def
+ first, then the attributes, instead of printing output that can't be
+ reused as input to recreate the current state. */
+ if (function_p (var) && nodefs == 0 && (pattr == 0 || posixly_correct == 0))
+ {
+ printf ("%s\n", named_function_string (var->name, function_cell (var), FUNC_MULTILINE|FUNC_EXTERNAL));
+ nodefs++;
+ if (pattr == 0 && i == 1 && flags[0] == 'f')
+ return 0; /* don't print `declare -f name' */
+ }
+
+ if (pattr == 0 || posixly_correct == 0)
+ printf ("declare -%s ", i ? flags : "-");
+ else if (i)
+ printf ("%s -%s ", this_command_name, flags);
+ else
+ printf ("%s ", this_command_name);
+
+#if defined (ARRAY_VARS)
+ if (array_p (var))
+ print_array_assignment (var, 1);
+ else if (assoc_p (var))
+ print_assoc_assignment (var, 1);
+ else
+#endif
+ /* force `readonly' and `export' to not print out function definitions
+ when in POSIX mode. */
+ if (nodefs || (function_p (var) && pattr != 0 && posixly_correct))
+ printf ("%s\n", var->name);
+ else if (function_p (var))
+ printf ("%s\n", named_function_string (var->name, function_cell (var), FUNC_MULTILINE|FUNC_EXTERNAL));
+ else if (invisible_p (var))
+ printf ("%s\n", var->name);
+ else
+ {
+ x = sh_double_quote (var_isset (var) ? value_cell (var) : "");
+ printf ("%s=%s\n", var->name, x);
+ free (x);
+ }
+ return (0);
+}
+
+int
+show_name_attributes (name, nodefs)
+ char *name;
+ int nodefs;
+{
+ SHELL_VAR *var;
+
+ var = find_variable_internal (name, 1);
+
+ if (var && invisible_p (var) == 0)
+ {
+ show_var_attributes (var, READONLY_OR_EXPORT, nodefs);
+ return (0);
+ }
+ else
+ return (1);
+}
+
+void
+set_var_attribute (name, attribute, undo)
+ char *name;
+ int attribute, undo;
+{
+ SHELL_VAR *var, *tv;
+ char *tvalue;
+
+ if (undo)
+ var = find_variable (name);
+ else
+ {
+ tv = find_tempenv_variable (name);
+ /* XXX -- need to handle case where tv is a temp variable in a
+ function-scope context, since function_env has been merged into
+ the local variables table. */
+ if (tv && tempvar_p (tv))
+ {
+ tvalue = var_isset (tv) ? savestring (value_cell (tv)) : savestring ("");
+
+ var = bind_variable (tv->name, tvalue, 0);
+ var->attributes |= tv->attributes & ~att_tempvar;
+ VSETATTR (tv, att_propagate);
+ if (var->context != 0)
+ VSETATTR (var, att_propagate);
+ SETVARATTR (tv, attribute, undo); /* XXX */
+
+ stupidly_hack_special_variables (tv->name);
+
+ free (tvalue);
+ }
+ else
+ {
+ var = find_variable_internal (name, 0);
+ if (var == 0)
+ {
+ var = bind_variable (name, (char *)NULL, 0);
+ VSETATTR (var, att_invisible);
+ }
+ else if (var->context != 0)
+ VSETATTR (var, att_propagate);
+ }
+ }
+
+ if (var)
+ SETVARATTR (var, attribute, undo);
+
+ if (var && (exported_p (var) || (attribute & att_exported)))
+ array_needs_making++; /* XXX */
+}
diff --git a/builtins/shift.def b/builtins/shift.def
new file mode 100644
index 0000000..3213086
--- /dev/null
+++ b/builtins/shift.def
@@ -0,0 +1,101 @@
+This file is shift.def, from which is created shift.c.
+It implements the builtin "shift" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES shift.c
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "common.h"
+
+$BUILTIN shift
+$FUNCTION shift_builtin
+$SHORT_DOC shift [n]
+Shift positional parameters.
+
+Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is
+not given, it is assumed to be 1.
+
+Exit Status:
+Returns success unless N is negative or greater than $#.
+$END
+
+int print_shift_error;
+
+/* Shift the arguments ``left''. Shift DOLLAR_VARS down then take one
+ off of REST_OF_ARGS and place it into DOLLAR_VARS[9]. If LIST has
+ anything in it, it is a number which says where to start the
+ shifting. Return > 0 if `times' > $#, otherwise 0. */
+int
+shift_builtin (list)
+ WORD_LIST *list;
+{
+ intmax_t times;
+ register int count;
+ WORD_LIST *temp;
+
+ if (get_numeric_arg (list, 0, &times) == 0)
+ return (EXECUTION_FAILURE);
+
+ if (times == 0)
+ return (EXECUTION_SUCCESS);
+ else if (times < 0)
+ {
+ sh_erange (list ? list->word->word : NULL, _("shift count"));
+ return (EXECUTION_FAILURE);
+ }
+ else if (times > number_of_args ())
+ {
+ if (print_shift_error)
+ sh_erange (list ? list->word->word : NULL, _("shift count"));
+ return (EXECUTION_FAILURE);
+ }
+
+ while (times-- > 0)
+ {
+ if (dollar_vars[1])
+ free (dollar_vars[1]);
+
+ for (count = 1; count < 9; count++)
+ dollar_vars[count] = dollar_vars[count + 1];
+
+ if (rest_of_args)
+ {
+ temp = rest_of_args;
+ dollar_vars[9] = savestring (temp->word->word);
+ rest_of_args = rest_of_args->next;
+ temp->next = (WORD_LIST *)NULL;
+ dispose_words (temp);
+ }
+ else
+ dollar_vars[9] = (char *)NULL;
+ }
+ return (EXECUTION_SUCCESS);
+}
diff --git a/builtins/shopt.def b/builtins/shopt.def
new file mode 100644
index 0000000..68c7245
--- /dev/null
+++ b/builtins/shopt.def
@@ -0,0 +1,715 @@
+This file is shopt.def, from which is created shopt.c.
+It implements the Bash `shopt' builtin.
+
+Copyright (C) 1994-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES shopt.c
+
+$BUILTIN shopt
+$FUNCTION shopt_builtin
+$SHORT_DOC shopt [-pqsu] [-o] [optname ...]
+Set and unset shell options.
+
+Change the setting of each shell option OPTNAME. Without any option
+arguments, list all shell options with an indication of whether or not each
+is set.
+
+Options:
+ -o restrict OPTNAMEs to those defined for use with `set -o'
+ -p print each shell option with an indication of its status
+ -q suppress output
+ -s enable (set) each OPTNAME
+ -u disable (unset) each OPTNAME
+
+Exit Status:
+Returns success if OPTNAME is enabled; fails if an invalid option is
+given or OPTNAME is disabled.
+$END
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+
+#include "version.h"
+
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../flags.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+#if defined (HISTORY)
+# include "../bashhist.h"
+#endif
+
+#define UNSETOPT 0
+#define SETOPT 1
+
+#define OPTFMT "%-15s\t%s\n"
+
+extern int allow_null_glob_expansion, fail_glob_expansion, glob_dot_filenames;
+extern int cdable_vars, mail_warning, source_uses_path;
+extern int no_exit_on_failed_exec, print_shift_error;
+extern int check_hashed_filenames, promptvars;
+extern int cdspelling, expand_aliases;
+extern int extended_quote;
+extern int check_window_size;
+extern int glob_ignore_case, match_ignore_case;
+extern int hup_on_exit;
+extern int xpg_echo;
+extern int gnu_error_format;
+extern int check_jobs_at_exit;
+extern int autocd;
+extern int glob_star;
+
+#if defined (EXTENDED_GLOB)
+extern int extended_glob;
+#endif
+
+#if defined (READLINE)
+extern int hist_verify, history_reediting, perform_hostname_completion;
+extern int no_empty_command_completion;
+extern int force_fignore;
+extern int dircomplete_spelling;
+
+extern int enable_hostname_completion __P((int));
+#endif
+
+#if defined (PROGRAMMABLE_COMPLETION)
+extern int prog_completion_enabled;
+#endif
+
+#if defined (RESTRICTED_SHELL)
+extern char *shell_name;
+#endif
+
+#if defined (DEBUGGER)
+extern int debugging_mode;
+#endif
+
+static void shopt_error __P((char *));
+
+static int set_shellopts_after_change __P((char *, int));
+static int shopt_enable_hostname_completion __P((char *, int));
+static int set_compatibility_level __P((char *, int));
+
+#if defined (RESTRICTED_SHELL)
+static int set_restricted_shell __P((char *, int));
+#endif
+
+static int shopt_login_shell;
+static int shopt_compat31;
+static int shopt_compat32;
+static int shopt_compat40;
+
+typedef int shopt_set_func_t __P((char *, int));
+
+static struct {
+ char *name;
+ int *value;
+ shopt_set_func_t *set_func;
+} shopt_vars[] = {
+ { "autocd", &autocd, (shopt_set_func_t *)NULL },
+ { "cdable_vars", &cdable_vars, (shopt_set_func_t *)NULL },
+ { "cdspell", &cdspelling, (shopt_set_func_t *)NULL },
+ { "checkhash", &check_hashed_filenames, (shopt_set_func_t *)NULL },
+#if defined (JOB_CONTROL)
+ { "checkjobs", &check_jobs_at_exit, (shopt_set_func_t *)NULL },
+#endif
+ { "checkwinsize", &check_window_size, (shopt_set_func_t *)NULL },
+#if defined (HISTORY)
+ { "cmdhist", &command_oriented_history, (shopt_set_func_t *)NULL },
+#endif
+ { "compat31", &shopt_compat31, set_compatibility_level },
+ { "compat32", &shopt_compat32, set_compatibility_level },
+ { "compat40", &shopt_compat40, set_compatibility_level },
+#if defined (READLINE)
+ { "dirspell", &dircomplete_spelling, (shopt_set_func_t *)NULL },
+#endif
+ { "dotglob", &glob_dot_filenames, (shopt_set_func_t *)NULL },
+ { "execfail", &no_exit_on_failed_exec, (shopt_set_func_t *)NULL },
+ { "expand_aliases", &expand_aliases, (shopt_set_func_t *)NULL },
+#if defined (DEBUGGER)
+ { "extdebug", &debugging_mode, (shopt_set_func_t *)NULL },
+#endif
+#if defined (EXTENDED_GLOB)
+ { "extglob", &extended_glob, (shopt_set_func_t *)NULL },
+#endif
+ { "extquote", &extended_quote, (shopt_set_func_t *)NULL },
+ { "failglob", &fail_glob_expansion, (shopt_set_func_t *)NULL },
+#if defined (READLINE)
+ { "force_fignore", &force_fignore, (shopt_set_func_t *)NULL },
+#endif
+ { "globstar", &glob_star, (shopt_set_func_t *)NULL },
+ { "gnu_errfmt", &gnu_error_format, (shopt_set_func_t *)NULL },
+#if defined (HISTORY)
+ { "histappend", &force_append_history, (shopt_set_func_t *)NULL },
+#endif
+#if defined (READLINE)
+ { "histreedit", &history_reediting, (shopt_set_func_t *)NULL },
+ { "histverify", &hist_verify, (shopt_set_func_t *)NULL },
+ { "hostcomplete", &perform_hostname_completion, shopt_enable_hostname_completion },
+#endif
+ { "huponexit", &hup_on_exit, (shopt_set_func_t *)NULL },
+ { "interactive_comments", &interactive_comments, set_shellopts_after_change },
+#if defined (HISTORY)
+ { "lithist", &literal_history, (shopt_set_func_t *)NULL },
+#endif
+ { "login_shell", &shopt_login_shell, set_login_shell },
+ { "mailwarn", &mail_warning, (shopt_set_func_t *)NULL },
+#if defined (READLINE)
+ { "no_empty_cmd_completion", &no_empty_command_completion, (shopt_set_func_t *)NULL },
+#endif
+ { "nocaseglob", &glob_ignore_case, (shopt_set_func_t *)NULL },
+ { "nocasematch", &match_ignore_case, (shopt_set_func_t *)NULL },
+ { "nullglob", &allow_null_glob_expansion, (shopt_set_func_t *)NULL },
+#if defined (PROGRAMMABLE_COMPLETION)
+ { "progcomp", &prog_completion_enabled, (shopt_set_func_t *)NULL },
+#endif
+ { "promptvars", &promptvars, (shopt_set_func_t *)NULL },
+#if defined (RESTRICTED_SHELL)
+ { "restricted_shell", &restricted_shell, set_restricted_shell },
+#endif
+ { "shift_verbose", &print_shift_error, (shopt_set_func_t *)NULL },
+ { "sourcepath", &source_uses_path, (shopt_set_func_t *)NULL },
+ { "xpg_echo", &xpg_echo, (shopt_set_func_t *)NULL },
+ { (char *)0, (int *)0, (shopt_set_func_t *)NULL }
+};
+
+#define N_SHOPT_OPTIONS (sizeof (shopt_vars) / sizeof (shopt_vars[0]))
+
+#define GET_SHOPT_OPTION_VALUE(i) (*shopt_vars[i].value)
+
+static const char * const on = "on";
+static const char * const off = "off";
+
+static int find_shopt __P((char *));
+static int toggle_shopts __P((int, WORD_LIST *, int));
+static void print_shopt __P((char *, int, int));
+static int list_shopts __P((WORD_LIST *, int));
+static int list_some_shopts __P((int, int));
+static int list_shopt_o_options __P((WORD_LIST *, int));
+static int list_some_o_options __P((int, int));
+static int set_shopt_o_options __P((int, WORD_LIST *, int));
+
+#define SFLAG 0x01
+#define UFLAG 0x02
+#define QFLAG 0x04
+#define OFLAG 0x08
+#define PFLAG 0x10
+
+int
+shopt_builtin (list)
+ WORD_LIST *list;
+{
+ int opt, flags, rval;
+
+ flags = 0;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "psuoq")) != -1)
+ {
+ switch (opt)
+ {
+ case 's':
+ flags |= SFLAG;
+ break;
+ case 'u':
+ flags |= UFLAG;
+ break;
+ case 'q':
+ flags |= QFLAG;
+ break;
+ case 'o':
+ flags |= OFLAG;
+ break;
+ case 'p':
+ flags |= PFLAG;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ if ((flags & (SFLAG|UFLAG)) == (SFLAG|UFLAG))
+ {
+ builtin_error (_("cannot set and unset shell options simultaneously"));
+ return (EXECUTION_FAILURE);
+ }
+
+ rval = EXECUTION_SUCCESS;
+ if ((flags & OFLAG) && ((flags & (SFLAG|UFLAG)) == 0)) /* shopt -o */
+ rval = list_shopt_o_options (list, flags);
+ else if (list && (flags & OFLAG)) /* shopt -so args */
+ rval = set_shopt_o_options ((flags & SFLAG) ? FLAG_ON : FLAG_OFF, list, flags & QFLAG);
+ else if (flags & OFLAG) /* shopt -so */
+ rval = list_some_o_options ((flags & SFLAG) ? 1 : 0, flags);
+ else if (list && (flags & (SFLAG|UFLAG))) /* shopt -su args */
+ rval = toggle_shopts ((flags & SFLAG) ? SETOPT : UNSETOPT, list, flags & QFLAG);
+ else if ((flags & (SFLAG|UFLAG)) == 0) /* shopt [args] */
+ rval = list_shopts (list, flags);
+ else /* shopt -su */
+ rval = list_some_shopts ((flags & SFLAG) ? SETOPT : UNSETOPT, flags);
+ return (rval);
+}
+
+/* Reset the options managed by `shopt' to the values they would have at
+ shell startup. */
+void
+reset_shopt_options ()
+{
+ allow_null_glob_expansion = glob_dot_filenames = 0;
+ cdable_vars = mail_warning = 0;
+ no_exit_on_failed_exec = print_shift_error = 0;
+ check_hashed_filenames = cdspelling = expand_aliases = check_window_size = 0;
+
+ source_uses_path = promptvars = 1;
+
+#if defined (EXTENDED_GLOB)
+ extended_glob = 0;
+#endif
+
+#if defined (HISTORY)
+ literal_history = force_append_history = 0;
+ command_oriented_history = 1;
+#endif
+
+#if defined (READLINE)
+ hist_verify = history_reediting = 0;
+ perform_hostname_completion = 1;
+#endif
+
+ shopt_login_shell = login_shell;
+}
+
+static int
+find_shopt (name)
+ char *name;
+{
+ int i;
+
+ for (i = 0; shopt_vars[i].name; i++)
+ if (STREQ (name, shopt_vars[i].name))
+ return i;
+ return -1;
+}
+
+static void
+shopt_error (s)
+ char *s;
+{
+ builtin_error (_("%s: invalid shell option name"), s);
+}
+
+static int
+toggle_shopts (mode, list, quiet)
+ int mode;
+ WORD_LIST *list;
+ int quiet;
+{
+ WORD_LIST *l;
+ int ind, rval;
+
+ for (l = list, rval = EXECUTION_SUCCESS; l; l = l->next)
+ {
+ ind = find_shopt (l->word->word);
+ if (ind < 0)
+ {
+ shopt_error (l->word->word);
+ rval = EXECUTION_FAILURE;
+ }
+ else
+ {
+ *shopt_vars[ind].value = mode; /* 1 for set, 0 for unset */
+ if (shopt_vars[ind].set_func)
+ (*shopt_vars[ind].set_func) (shopt_vars[ind].name, mode);
+ }
+ }
+
+ set_bashopts ();
+ return (rval);
+}
+
+static void
+print_shopt (name, val, flags)
+ char *name;
+ int val, flags;
+{
+ if (flags & PFLAG)
+ printf ("shopt %s %s\n", val ? "-s" : "-u", name);
+ else
+ printf (OPTFMT, name, val ? on : off);
+}
+
+/* List the values of all or any of the `shopt' options. Returns 0 if
+ all were listed or all variables queried were on; 1 otherwise. */
+static int
+list_shopts (list, flags)
+ WORD_LIST *list;
+ int flags;
+{
+ WORD_LIST *l;
+ int i, val, rval;
+
+ if (list == 0)
+ {
+ for (i = 0; shopt_vars[i].name; i++)
+ {
+ val = *shopt_vars[i].value;
+ if ((flags & QFLAG) == 0)
+ print_shopt (shopt_vars[i].name, val, flags);
+ }
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+ }
+
+ for (l = list, rval = EXECUTION_SUCCESS; l; l = l->next)
+ {
+ i = find_shopt (l->word->word);
+ if (i < 0)
+ {
+ shopt_error (l->word->word);
+ rval = EXECUTION_FAILURE;
+ continue;
+ }
+ val = *shopt_vars[i].value;
+ if (val == 0)
+ rval = EXECUTION_FAILURE;
+ if ((flags & QFLAG) == 0)
+ print_shopt (l->word->word, val, flags);
+ }
+
+ return (sh_chkwrite (rval));
+}
+
+static int
+list_some_shopts (mode, flags)
+ int mode, flags;
+{
+ int val, i;
+
+ for (i = 0; shopt_vars[i].name; i++)
+ {
+ val = *shopt_vars[i].value;
+ if (((flags & QFLAG) == 0) && mode == val)
+ print_shopt (shopt_vars[i].name, val, flags);
+ }
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+}
+
+static int
+list_shopt_o_options (list, flags)
+ WORD_LIST *list;
+ int flags;
+{
+ WORD_LIST *l;
+ int val, rval;
+
+ if (list == 0)
+ {
+ if ((flags & QFLAG) == 0)
+ list_minus_o_opts (-1, (flags & PFLAG));
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+ }
+
+ for (l = list, rval = EXECUTION_SUCCESS; l; l = l->next)
+ {
+ val = minus_o_option_value (l->word->word);
+ if (val == -1)
+ {
+ sh_invalidoptname (l->word->word);
+ rval = EXECUTION_FAILURE;
+ continue;
+ }
+ if (val == 0)
+ rval = EXECUTION_FAILURE;
+ if ((flags & QFLAG) == 0)
+ {
+ if (flags & PFLAG)
+ printf ("set %co %s\n", val ? '-' : '+', l->word->word);
+ else
+ printf (OPTFMT, l->word->word, val ? on : off);
+ }
+ }
+ return (sh_chkwrite (rval));
+}
+
+static int
+list_some_o_options (mode, flags)
+ int mode, flags;
+{
+ if ((flags & QFLAG) == 0)
+ list_minus_o_opts (mode, (flags & PFLAG));
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+}
+
+static int
+set_shopt_o_options (mode, list, quiet)
+ int mode;
+ WORD_LIST *list;
+ int quiet;
+{
+ WORD_LIST *l;
+ int rval;
+
+ for (l = list, rval = EXECUTION_SUCCESS; l; l = l->next)
+ {
+ if (set_minus_o_option (mode, l->word->word) == EXECUTION_FAILURE)
+ rval = EXECUTION_FAILURE;
+ }
+ set_shellopts ();
+ return rval;
+}
+
+/* If we set or unset interactive_comments with shopt, make sure the
+ change is reflected in $SHELLOPTS. */
+static int
+set_shellopts_after_change (option_name, mode)
+ char *option_name;
+ int mode;
+{
+ set_shellopts ();
+ return (0);
+}
+
+static int
+shopt_enable_hostname_completion (option_name, mode)
+ char *option_name;
+ int mode;
+{
+ return (enable_hostname_completion (mode));
+}
+
+static int
+set_compatibility_level (option_name, mode)
+ char *option_name;
+ int mode;
+{
+ /* Need to change logic here as we add more compatibility levels */
+
+ /* First, check option_name so we can turn off other compat options when
+ one is set. */
+ if (mode && option_name[6] == '3' && option_name[7] == '1')
+ shopt_compat32 = shopt_compat40 = 0;
+ else if (mode && option_name[6] == '3' && option_name[7] == '2')
+ shopt_compat31 = shopt_compat40 = 0;
+ else if (mode && option_name[6] == '4' && option_name[7] == '0')
+ shopt_compat31 = shopt_compat32 = 0;
+
+ /* Then set shell_compatibility_level based on what remains */
+ if (shopt_compat31)
+ shell_compatibility_level = 31;
+ else if (shopt_compat32)
+ shell_compatibility_level = 32;
+ else if (shopt_compat40)
+ shell_compatibility_level = 40;
+ else
+ shell_compatibility_level = DEFAULT_COMPAT_LEVEL;
+ return 0;
+}
+
+#if defined (RESTRICTED_SHELL)
+/* Don't allow the value of restricted_shell to be modified. */
+
+static int
+set_restricted_shell (option_name, mode)
+ char *option_name;
+ int mode;
+{
+ static int save_restricted = -1;
+
+ if (save_restricted == -1)
+ save_restricted = shell_is_restricted (shell_name);
+
+ restricted_shell = save_restricted;
+ return (0);
+}
+#endif /* RESTRICTED_SHELL */
+
+/* Not static so shell.c can call it to initialize shopt_login_shell */
+int
+set_login_shell (option_name, mode)
+ char *option_name;
+ int mode;
+{
+ shopt_login_shell = login_shell != 0;
+ return (0);
+}
+
+char **
+get_shopt_options ()
+{
+ char **ret;
+ int n, i;
+
+ n = sizeof (shopt_vars) / sizeof (shopt_vars[0]);
+ ret = strvec_create (n + 1);
+ for (i = 0; shopt_vars[i].name; i++)
+ ret[i] = savestring (shopt_vars[i].name);
+ ret[i] = (char *)NULL;
+ return ret;
+}
+
+/*
+ * External interface for other parts of the shell. NAME is a string option;
+ * MODE is 0 if we want to unset an option; 1 if we want to set an option.
+ * REUSABLE is 1 if we want to print output in a form that may be reused.
+ */
+int
+shopt_setopt (name, mode)
+ char *name;
+ int mode;
+{
+ WORD_LIST *wl;
+ int r;
+
+ wl = add_string_to_list (name, (WORD_LIST *)NULL);
+ r = toggle_shopts (mode, wl, 0);
+ dispose_words (wl);
+ return r;
+}
+
+int
+shopt_listopt (name, reusable)
+ char *name;
+ int reusable;
+{
+ int i;
+
+ if (name == 0)
+ return (list_shopts ((WORD_LIST *)NULL, reusable ? PFLAG : 0));
+
+ i = find_shopt (name);
+ if (i < 0)
+ {
+ shopt_error (name);
+ return (EXECUTION_FAILURE);
+ }
+
+ print_shopt (name, *shopt_vars[i].value, reusable ? PFLAG : 0);
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+}
+
+void
+set_bashopts ()
+{
+ char *value;
+ char tflag[N_SHOPT_OPTIONS];
+ int vsize, i, vptr, *ip, exported;
+ SHELL_VAR *v;
+
+ for (vsize = i = 0; shopt_vars[i].name; i++)
+ {
+ tflag[i] = 0;
+ if (GET_SHOPT_OPTION_VALUE (i))
+ {
+ vsize += strlen (shopt_vars[i].name) + 1;
+ tflag[i] = 1;
+ }
+ }
+
+ value = (char *)xmalloc (vsize + 1);
+
+ for (i = vptr = 0; shopt_vars[i].name; i++)
+ {
+ if (tflag[i])
+ {
+ strcpy (value + vptr, shopt_vars[i].name);
+ vptr += strlen (shopt_vars[i].name);
+ value[vptr++] = ':';
+ }
+ }
+
+ if (vptr)
+ vptr--; /* cut off trailing colon */
+ value[vptr] = '\0';
+
+ v = find_variable ("BASHOPTS");
+
+ /* Turn off the read-only attribute so we can bind the new value, and
+ note whether or not the variable was exported. */
+ if (v)
+ {
+ VUNSETATTR (v, att_readonly);
+ exported = exported_p (v);
+ }
+ else
+ exported = 0;
+
+ v = bind_variable ("BASHOPTS", value, 0);
+
+ /* Turn the read-only attribute back on, and turn off the export attribute
+ if it was set implicitly by mark_modified_vars and SHELLOPTS was not
+ exported before we bound the new value. */
+ VSETATTR (v, att_readonly);
+ if (mark_modified_vars && exported == 0 && exported_p (v))
+ VUNSETATTR (v, att_exported);
+
+ free (value);
+}
+
+void
+parse_bashopts (value)
+ char *value;
+{
+ char *vname;
+ int vptr, ind;
+
+ vptr = 0;
+ while (vname = extract_colon_unit (value, &vptr))
+ {
+ ind = find_shopt (vname);
+ if (ind >= 0)
+ *shopt_vars[ind].value = 1;
+ free (vname);
+ }
+}
+
+void
+initialize_bashopts (no_bashopts)
+ int no_bashopts;
+{
+ char *temp;
+ SHELL_VAR *var;
+
+ if (no_bashopts == 0)
+ {
+ var = find_variable ("BASHOPTS");
+ /* set up any shell options we may have inherited. */
+ if (var && imported_p (var))
+ {
+ temp = (array_p (var) || assoc_p (var)) ? (char *)NULL : savestring (value_cell (var));
+ if (temp)
+ {
+ parse_bashopts (temp);
+ free (temp);
+ }
+ }
+ }
+
+ /* Set up the $BASHOPTS variable. */
+ set_bashopts ();
+}
diff --git a/builtins/source.def b/builtins/source.def
new file mode 100644
index 0000000..72627db
--- /dev/null
+++ b/builtins/source.def
@@ -0,0 +1,190 @@
+This file is source.def, from which is created source.c.
+It implements the builtins "." and "source" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES source.c
+
+$BUILTIN source
+$FUNCTION source_builtin
+$SHORT_DOC source filename [arguments]
+Execute commands from a file in the current shell.
+
+Read and execute commands from FILENAME in the current shell. The
+entries in $PATH are used to find the directory containing FILENAME.
+If any ARGUMENTS are supplied, they become the positional parameters
+when FILENAME is executed.
+
+Exit Status:
+Returns the status of the last command executed in FILENAME; fails if
+FILENAME cannot be read.
+$END
+
+$BUILTIN .
+$DOCNAME dot
+$FUNCTION source_builtin
+$SHORT_DOC . filename [arguments]
+Execute commands from a file in the current shell.
+
+Read and execute commands from FILENAME in the current shell. The
+entries in $PATH are used to find the directory containing FILENAME.
+If any ARGUMENTS are supplied, they become the positional parameters
+when FILENAME is executed.
+
+Exit Status:
+Returns the status of the last command executed in FILENAME; fails if
+FILENAME cannot be read.
+$END
+
+#include <config.h>
+
+#include "../bashtypes.h"
+#include "posixstat.h"
+#include "filecntl.h"
+#if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+#include <errno.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../flags.h"
+#include "../findcmd.h"
+#include "common.h"
+#include "bashgetopt.h"
+#include "../trap.h"
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+extern int posixly_correct;
+
+static void maybe_pop_dollar_vars __P((void));
+
+/* If non-zero, `.' uses $PATH to look up the script to be sourced. */
+int source_uses_path = 1;
+
+/* If non-zero, `.' looks in the current directory if the filename argument
+ is not found in the $PATH. */
+int source_searches_cwd = 1;
+
+/* If this . script is supplied arguments, we save the dollar vars and
+ replace them with the script arguments for the duration of the script's
+ execution. If the script does not change the dollar vars, we restore
+ what we saved. If the dollar vars are changed in the script, and we are
+ not executing a shell function, we leave the new values alone and free
+ the saved values. */
+static void
+maybe_pop_dollar_vars ()
+{
+ if (variable_context == 0 && (dollar_vars_changed () & ARGS_SETBLTIN))
+ dispose_saved_dollar_vars ();
+ else
+ pop_dollar_vars ();
+ if (debugging_mode)
+ pop_args (); /* restore BASH_ARGC and BASH_ARGV */
+ set_dollar_vars_unchanged ();
+}
+
+/* Read and execute commands from the file passed as argument. Guess what.
+ This cannot be done in a subshell, since things like variable assignments
+ take place in there. So, I open the file, place it into a large string,
+ close the file, and then execute the string. */
+int
+source_builtin (list)
+ WORD_LIST *list;
+{
+ int result;
+ char *filename, *debug_trap;
+
+ if (no_options (list))
+ return (EX_USAGE);
+ list = loptend;
+
+ if (list == 0)
+ {
+ builtin_error (_("filename argument required"));
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+#if defined (RESTRICTED_SHELL)
+ if (restricted && strchr (list->word->word, '/'))
+ {
+ sh_restricted (list->word->word);
+ return (EXECUTION_FAILURE);
+ }
+#endif
+
+ filename = (char *)NULL;
+ /* XXX -- should this be absolute_pathname? */
+ if (posixly_correct && strchr (list->word->word, '/'))
+ filename = savestring (list->word->word);
+ else if (absolute_pathname (list->word->word))
+ filename = savestring (list->word->word);
+ else if (source_uses_path)
+ filename = find_path_file (list->word->word);
+ if (filename == 0)
+ {
+ if (source_searches_cwd == 0)
+ {
+ builtin_error (_("%s: file not found"), list->word->word);
+ return (EXECUTION_FAILURE);
+ }
+ else
+ filename = savestring (list->word->word);
+ }
+
+ begin_unwind_frame ("source");
+ add_unwind_protect ((Function *)xfree, filename);
+
+ if (list->next)
+ {
+ push_dollar_vars ();
+ add_unwind_protect ((Function *)maybe_pop_dollar_vars, (char *)NULL);
+ remember_args (list->next, 1);
+ if (debugging_mode)
+ push_args (list->next); /* Update BASH_ARGV and BASH_ARGC */
+ }
+ set_dollar_vars_unchanged ();
+
+ /* Don't inherit the DEBUG trap unless function_trace_mode (overloaded)
+ is set. XXX - should sourced files inherit the RETURN trap? Functions
+ don't. */
+ debug_trap = TRAP_STRING (DEBUG_TRAP);
+ if (debug_trap && function_trace_mode == 0)
+ {
+ debug_trap = savestring (debug_trap);
+ add_unwind_protect (xfree, debug_trap);
+ add_unwind_protect (set_debug_trap, debug_trap);
+ restore_default_signal (DEBUG_TRAP);
+ }
+
+ result = source_file (filename, (list && list->next));
+
+ run_unwind_frame ("source");
+
+ return (result);
+}
diff --git a/builtins/suspend.def b/builtins/suspend.def
new file mode 100644
index 0000000..8711e68
--- /dev/null
+++ b/builtins/suspend.def
@@ -0,0 +1,127 @@
+This file is suspend.def, from which is created suspend.c.
+It implements the builtin "suspend" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES suspend.c
+
+$BUILTIN suspend
+$DEPENDS_ON JOB_CONTROL
+$FUNCTION suspend_builtin
+$SHORT_DOC suspend [-f]
+Suspend shell execution.
+
+Suspend the execution of this shell until it receives a SIGCONT signal.
+Unless forced, login shells cannot be suspended.
+
+Options:
+ -f force the suspend, even if the shell is a login shell
+
+Exit Status:
+Returns success unless job control is not enabled or an error occurs.
+$END
+
+#include <config.h>
+
+#if defined (JOB_CONTROL)
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "../bashtypes.h"
+#include <signal.h>
+#include "../bashintl.h"
+#include "../shell.h"
+#include "../jobs.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+static sighandler suspend_continue __P((int));
+
+static SigHandler *old_cont;
+#if 0
+static SigHandler *old_stop;
+#endif
+
+/* Continue handler. */
+static sighandler
+suspend_continue (sig)
+ int sig;
+{
+ set_signal_handler (SIGCONT, old_cont);
+#if 0
+ set_signal_handler (SIGSTOP, old_stop);
+#endif
+ SIGRETURN (0);
+}
+
+/* Suspending the shell. If -f is the arg, then do the suspend
+ no matter what. Otherwise, complain if a login shell. */
+int
+suspend_builtin (list)
+ WORD_LIST *list;
+{
+ int opt, force;
+
+ reset_internal_getopt ();
+ force = 0;
+ while ((opt = internal_getopt (list, "f")) != -1)
+ switch (opt)
+ {
+ case 'f':
+ force++;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ list = loptend;
+
+ if (job_control == 0)
+ {
+ sh_nojobs (_("cannot suspend"));
+ return (EXECUTION_FAILURE);
+ }
+
+ if (force == 0)
+ {
+ no_args (list);
+
+ if (login_shell)
+ {
+ builtin_error (_("cannot suspend a login shell"));
+ return (EXECUTION_FAILURE);
+ }
+ }
+
+ /* XXX - should we put ourselves back into the original pgrp now? If so,
+ call end_job_control() here and do the right thing in suspend_continue
+ (that is, call restart_job_control()). */
+ old_cont = (SigHandler *)set_signal_handler (SIGCONT, suspend_continue);
+#if 0
+ old_stop = (SigHandler *)set_signal_handler (SIGSTOP, SIG_DFL);
+#endif
+ killpg (shell_pgrp, SIGSTOP);
+ return (EXECUTION_SUCCESS);
+}
+
+#endif /* JOB_CONTROL */
diff --git a/builtins/test.def b/builtins/test.def
new file mode 100644
index 0000000..4adff93
--- /dev/null
+++ b/builtins/test.def
@@ -0,0 +1,154 @@
+This file is test.def, from which is created test.c.
+It implements the builtin "test" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES test.c
+
+$BUILTIN test
+$FUNCTION test_builtin
+$SHORT_DOC test [expr]
+Evaluate conditional expression.
+
+Exits with a status of 0 (true) or 1 (false) depending on
+the evaluation of EXPR. Expressions may be unary or binary. Unary
+expressions are often used to examine the status of a file. There
+are string operators as well, and numeric comparison operators.
+
+File operators:
+
+ -a FILE True if file exists.
+ -b FILE True if file is block special.
+ -c FILE True if file is character special.
+ -d FILE True if file is a directory.
+ -e FILE True if file exists.
+ -f FILE True if file exists and is a regular file.
+ -g FILE True if file is set-group-id.
+ -h FILE True if file is a symbolic link.
+ -L FILE True if file is a symbolic link.
+ -k FILE True if file has its `sticky' bit set.
+ -p FILE True if file is a named pipe.
+ -r FILE True if file is readable by you.
+ -s FILE True if file exists and is not empty.
+ -S FILE True if file is a socket.
+ -t FD True if FD is opened on a terminal.
+ -u FILE True if the file is set-user-id.
+ -w FILE True if the file is writable by you.
+ -x FILE True if the file is executable by you.
+ -O FILE True if the file is effectively owned by you.
+ -G FILE True if the file is effectively owned by your group.
+ -N FILE True if the file has been modified since it was last read.
+
+ FILE1 -nt FILE2 True if file1 is newer than file2 (according to
+ modification date).
+
+ FILE1 -ot FILE2 True if file1 is older than file2.
+
+ FILE1 -ef FILE2 True if file1 is a hard link to file2.
+
+String operators:
+
+ -z STRING True if string is empty.
+
+ -n STRING
+ STRING True if string is not empty.
+
+ STRING1 = STRING2
+ True if the strings are equal.
+ STRING1 != STRING2
+ True if the strings are not equal.
+ STRING1 < STRING2
+ True if STRING1 sorts before STRING2 lexicographically.
+ STRING1 > STRING2
+ True if STRING1 sorts after STRING2 lexicographically.
+
+Other operators:
+
+ -o OPTION True if the shell option OPTION is enabled.
+ ! EXPR True if expr is false.
+ EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.
+ EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.
+
+ arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,
+ -lt, -le, -gt, or -ge.
+
+Arithmetic binary operators return true if ARG1 is equal, not-equal,
+less-than, less-than-or-equal, greater-than, or greater-than-or-equal
+than ARG2.
+
+Exit Status:
+Returns success if EXPR evaluates to true; fails if EXPR evaluates to
+false or an invalid argument is given.
+$END
+
+$BUILTIN [
+$DOCNAME test_bracket
+$FUNCTION test_builtin
+$SHORT_DOC [ arg... ]
+Evaluate conditional expression.
+
+This is a synonym for the "test" builtin, but the last argument must
+be a literal `]', to match the opening `['.
+$END
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../test.h"
+#include "common.h"
+
+extern char *this_command_name;
+
+/* TEST/[ builtin. */
+int
+test_builtin (list)
+ WORD_LIST *list;
+{
+ char **argv;
+ int argc, result;
+
+ /* We let Matthew Bradburn and Kevin Braunsdorf's code do the
+ actual test command. So turn the list of args into an array
+ of strings, since that is what their code wants. */
+ if (list == 0)
+ {
+ if (this_command_name[0] == '[' && !this_command_name[1])
+ {
+ builtin_error (_("missing `]'"));
+ return (EX_BADUSAGE);
+ }
+
+ return (EXECUTION_FAILURE);
+ }
+
+ argv = make_builtin_argv (list, &argc);
+ result = test_command (argc, argv);
+ free ((char *)argv);
+
+ return (result);
+}
diff --git a/builtins/times.def b/builtins/times.def
new file mode 100644
index 0000000..f31f433
--- /dev/null
+++ b/builtins/times.def
@@ -0,0 +1,119 @@
+This file is times.def, from which is created times.c.
+It implements the builtin "times" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES times.c
+
+$BUILTIN times
+$FUNCTION times_builtin
+$SHORT_DOC times
+Display process times.
+
+Prints the accumulated user and system times for the shell and all of its
+child processes.
+
+Exit Status:
+Always succeeds.
+$END
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include "../bashtypes.h"
+#include "../shell.h"
+
+#include <posixtime.h>
+
+#if defined (HAVE_SYS_TIMES_H)
+# include <sys/times.h>
+#endif /* HAVE_SYS_TIMES_H */
+
+#if defined (HAVE_SYS_RESOURCE_H) && !defined (RLIMTYPE)
+# include <sys/resource.h>
+#endif
+
+#include "common.h"
+
+/* Print the totals for system and user time used. */
+int
+times_builtin (list)
+ WORD_LIST *list;
+{
+#if defined (HAVE_GETRUSAGE) && defined (HAVE_TIMEVAL) && defined (RUSAGE_SELF)
+ struct rusage self, kids;
+
+ USE_VAR(list);
+
+ if (no_options (list))
+ return (EX_USAGE);
+
+ getrusage (RUSAGE_SELF, &self);
+ getrusage (RUSAGE_CHILDREN, &kids); /* terminated child processes */
+
+ print_timeval (stdout, &self.ru_utime);
+ putchar (' ');
+ print_timeval (stdout, &self.ru_stime);
+ putchar ('\n');
+ print_timeval (stdout, &kids.ru_utime);
+ putchar (' ');
+ print_timeval (stdout, &kids.ru_stime);
+ putchar ('\n');
+
+#else
+# if defined (HAVE_TIMES)
+ /* This uses the POSIX.1/XPG5 times(2) interface, which fills in a
+ `struct tms' with values of type clock_t. */
+ struct tms t;
+
+ USE_VAR(list);
+
+ if (no_options (list))
+ return (EX_USAGE);
+
+ times (&t);
+
+ print_clock_t (stdout, t.tms_utime);
+ putchar (' ');
+ print_clock_t (stdout, t.tms_stime);
+ putchar ('\n');
+ print_clock_t (stdout, t.tms_cutime);
+ putchar (' ');
+ print_clock_t (stdout, t.tms_cstime);
+ putchar ('\n');
+
+# else /* !HAVE_TIMES */
+
+ USE_VAR(list);
+
+ if (no_options (list))
+ return (EX_USAGE);
+ printf ("0.00 0.00\n0.00 0.00\n");
+
+# endif /* HAVE_TIMES */
+#endif /* !HAVE_TIMES */
+
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+}
diff --git a/builtins/trap.def b/builtins/trap.def
new file mode 100644
index 0000000..a8da71d
--- /dev/null
+++ b/builtins/trap.def
@@ -0,0 +1,280 @@
+This file is trap.def, from which is created trap.c.
+It implements the builtin "trap" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES trap.c
+
+$BUILTIN trap
+$FUNCTION trap_builtin
+$SHORT_DOC trap [-lp] [[arg] signal_spec ...]
+Trap signals and other events.
+
+Defines and activates handlers to be run when the shell receives signals
+or other conditions.
+
+ARG is a command to be read and executed when the shell receives the
+signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC
+is supplied) or `-', each specified signal is reset to its original
+value. If ARG is the null string each SIGNAL_SPEC is ignored by the
+shell and by the commands it invokes.
+
+If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. If
+a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.
+
+If no arguments are supplied, trap prints the list of commands associated
+with each signal.
+
+Options:
+ -l print a list of signal names and their corresponding numbers
+ -p display the trap commands associated with each SIGNAL_SPEC
+
+Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal number.
+Signal names are case insensitive and the SIG prefix is optional. A
+signal may be sent to the shell with "kill -signal $$".
+
+Exit Status:
+Returns success unless a SIGSPEC is invalid or an invalid option is given.
+$END
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "../bashtypes.h"
+#include <signal.h>
+#include <stdio.h>
+#include "../bashansi.h"
+
+#include "../shell.h"
+#include "../trap.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+static void showtrap __P((int));
+static int display_traps __P((WORD_LIST *));
+
+/* The trap command:
+
+ trap <arg> <signal ...>
+ trap <signal ...>
+ trap -l
+ trap -p [sigspec ...]
+ trap [--]
+
+ Set things up so that ARG is executed when SIGNAL(s) N is recieved.
+ If ARG is the empty string, then ignore the SIGNAL(s). If there is
+ no ARG, then set the trap for SIGNAL(s) to its original value. Just
+ plain "trap" means to print out the list of commands associated with
+ each signal number. Single arg of "-l" means list the signal names. */
+
+/* Possible operations to perform on the list of signals.*/
+#define SET 0 /* Set this signal to first_arg. */
+#define REVERT 1 /* Revert to this signals original value. */
+#define IGNORE 2 /* Ignore this signal. */
+
+extern int posixly_correct;
+
+int
+trap_builtin (list)
+ WORD_LIST *list;
+{
+ int list_signal_names, display, result, opt;
+
+ list_signal_names = display = 0;
+ result = EXECUTION_SUCCESS;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "lp")) != -1)
+ {
+ switch (opt)
+ {
+ case 'l':
+ list_signal_names++;
+ break;
+ case 'p':
+ display++;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ opt = DSIG_NOCASE|DSIG_SIGPREFIX; /* flags for decode_signal */
+
+ if (list_signal_names)
+ return (sh_chkwrite (display_signal_list ((WORD_LIST *)NULL, 1)));
+ else if (display || list == 0)
+ return (sh_chkwrite (display_traps (list)));
+ else
+ {
+ char *first_arg;
+ int operation, sig, first_signal;
+
+ operation = SET;
+ first_arg = list->word->word;
+ first_signal = first_arg && *first_arg && all_digits (first_arg) && signal_object_p (first_arg, opt);
+
+ /* Backwards compatibility. XXX - question about whether or not we
+ should throw an error if an all-digit argument doesn't correspond
+ to a valid signal number (e.g., if it's `50' on a system with only
+ 32 signals). */
+ if (first_signal)
+ operation = REVERT;
+ /* When in posix mode, the historical behavior of looking for a
+ missing first argument is disabled. To revert to the original
+ signal handling disposition, use `-' as the first argument. */
+ else if (posixly_correct == 0 && first_arg && *first_arg &&
+ (*first_arg != '-' || first_arg[1]) &&
+ signal_object_p (first_arg, opt) && list->next == 0)
+ operation = REVERT;
+ else
+ {
+ list = list->next;
+ if (list == 0)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ else if (*first_arg == '\0')
+ operation = IGNORE;
+ else if (first_arg[0] == '-' && !first_arg[1])
+ operation = REVERT;
+ }
+
+ while (list)
+ {
+ sig = decode_signal (list->word->word, opt);
+
+ if (sig == NO_SIG)
+ {
+ sh_invalidsig (list->word->word);
+ result = EXECUTION_FAILURE;
+ }
+ else
+ {
+ switch (operation)
+ {
+ case SET:
+ set_signal (sig, first_arg);
+ break;
+
+ case REVERT:
+ restore_default_signal (sig);
+
+ /* Signals that the shell treats specially need special
+ handling. */
+ switch (sig)
+ {
+ case SIGINT:
+ if (interactive)
+ set_signal_handler (SIGINT, sigint_sighandler);
+ else
+ set_signal_handler (SIGINT, termsig_sighandler);
+ break;
+
+ case SIGQUIT:
+ /* Always ignore SIGQUIT. */
+ set_signal_handler (SIGQUIT, SIG_IGN);
+ break;
+ case SIGTERM:
+#if defined (JOB_CONTROL)
+ case SIGTTIN:
+ case SIGTTOU:
+ case SIGTSTP:
+#endif /* JOB_CONTROL */
+ if (interactive)
+ set_signal_handler (sig, SIG_IGN);
+ break;
+ }
+ break;
+
+ case IGNORE:
+ ignore_signal (sig);
+ break;
+ }
+ }
+ list = list->next;
+ }
+ }
+
+ return (result);
+}
+
+static void
+showtrap (i)
+ int i;
+{
+ char *t, *p, *sn;
+
+ p = trap_list[i];
+ if (p == (char *)DEFAULT_SIG)
+ return;
+
+ t = (p == (char *)IGNORE_SIG) ? (char *)NULL : sh_single_quote (p);
+ sn = signal_name (i);
+ /* Make sure that signals whose names are unknown (for whatever reason)
+ are printed as signal numbers. */
+ if (STREQN (sn, "SIGJUNK", 7) || STREQN (sn, "unknown", 7))
+ printf ("trap -- %s %d\n", t ? t : "''", i);
+ else if (posixly_correct)
+ {
+ if (STREQN (sn, "SIG", 3))
+ printf ("trap -- %s %s\n", t ? t : "''", sn+3);
+ else
+ printf ("trap -- %s %s\n", t ? t : "''", sn);
+ }
+ else
+ printf ("trap -- %s %s\n", t ? t : "''", sn);
+
+ FREE (t);
+}
+
+static int
+display_traps (list)
+ WORD_LIST *list;
+{
+ int result, i;
+
+ if (list == 0)
+ {
+ for (i = 0; i < BASH_NSIG; i++)
+ showtrap (i);
+ return (EXECUTION_SUCCESS);
+ }
+
+ for (result = EXECUTION_SUCCESS; list; list = list->next)
+ {
+ i = decode_signal (list->word->word, DSIG_NOCASE|DSIG_SIGPREFIX);
+ if (i == NO_SIG)
+ {
+ sh_invalidsig (list->word->word);
+ result = EXECUTION_FAILURE;
+ }
+ else
+ showtrap (i);
+ }
+
+ return (result);
+}
diff --git a/builtins/type.def b/builtins/type.def
new file mode 100644
index 0000000..ee341bb
--- /dev/null
+++ b/builtins/type.def
@@ -0,0 +1,403 @@
+This file is type.def, from which is created type.c.
+It implements the builtin "type" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES type.c
+
+$BUILTIN type
+$FUNCTION type_builtin
+$SHORT_DOC type [-afptP] name [name ...]
+Display information about command type.
+
+For each NAME, indicate how it would be interpreted if used as a
+command name.
+
+Options:
+ -a display all locations containing an executable named NAME;
+ includes aliases, builtins, and functions, if and only if
+ the `-p' option is not also used
+ -f suppress shell function lookup
+ -P force a PATH search for each NAME, even if it is an alias,
+ builtin, or function, and returns the name of the disk file
+ that would be executed
+ -p returns either the name of the disk file that would be executed,
+ or nothing if `type -t NAME' would not return `file'.
+ -t output a single word which is one of `alias', `keyword',
+ `function', `builtin', `file' or `', if NAME is an alias, shell
+ reserved word, shell function, shell builtin, disk file, or not
+ found, respectively
+
+Arguments:
+ NAME Command name to be interpreted.
+
+Exit Status:
+Returns success if all of the NAMEs are found; fails if any are not found.
+$END
+
+#include <config.h>
+
+#include "../bashtypes.h"
+#include "posixstat.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include "../bashansi.h"
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "../findcmd.h"
+#include "../hashcmd.h"
+
+#if defined (ALIAS)
+#include "../alias.h"
+#endif /* ALIAS */
+
+#include "common.h"
+#include "bashgetopt.h"
+
+extern int find_reserved_word __P((char *));
+
+extern char *this_command_name;
+extern int expand_aliases, posixly_correct;
+
+/* For each word in LIST, find out what the shell is going to do with
+ it as a simple command. i.e., which file would this shell use to
+ execve, or if it is a builtin command, or an alias. Possible flag
+ arguments:
+ -t Returns the "type" of the object, one of
+ `alias', `keyword', `function', `builtin',
+ or `file'.
+
+ -p Returns the pathname of the file if -type is
+ a file.
+
+ -a Returns all occurrences of words, whether they
+ be a filename in the path, alias, function,
+ or builtin.
+
+ -f Suppress shell function lookup, like `command'.
+
+ -P Force a path search even in the presence of other
+ definitions.
+
+ Order of evaluation:
+ alias
+ keyword
+ function
+ builtin
+ file
+ */
+
+int
+type_builtin (list)
+ WORD_LIST *list;
+{
+ int dflags, any_failed, opt;
+ WORD_LIST *this;
+
+ if (list == 0)
+ return (EXECUTION_SUCCESS);
+
+ dflags = CDESC_SHORTDESC; /* default */
+ any_failed = 0;
+
+ /* Handle the obsolescent `-type', `-path', and `-all' by prescanning
+ the arguments and converting those options to the form that
+ internal_getopt recognizes. Converts `--type', `--path', and `--all'
+ also. THIS SHOULD REALLY GO AWAY. */
+ for (this = list; this && this->word->word[0] == '-'; this = this->next)
+ {
+ char *flag = &(this->word->word[1]);
+
+ if (STREQ (flag, "type") || STREQ (flag, "-type"))
+ {
+ this->word->word[1] = 't';
+ this->word->word[2] = '\0';
+ }
+ else if (STREQ (flag, "path") || STREQ (flag, "-path"))
+ {
+ this->word->word[1] = 'p';
+ this->word->word[2] = '\0';
+ }
+ else if (STREQ (flag, "all") || STREQ (flag, "-all"))
+ {
+ this->word->word[1] = 'a';
+ this->word->word[2] = '\0';
+ }
+ }
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "afptP")) != -1)
+ {
+ switch (opt)
+ {
+ case 'a':
+ dflags |= CDESC_ALL;
+ break;
+ case 'f':
+ dflags |= CDESC_NOFUNCS;
+ break;
+ case 'p':
+ dflags |= CDESC_PATH_ONLY;
+ dflags &= ~(CDESC_TYPE|CDESC_SHORTDESC);
+ break;
+ case 't':
+ dflags |= CDESC_TYPE;
+ dflags &= ~(CDESC_PATH_ONLY|CDESC_SHORTDESC);
+ break;
+ case 'P': /* shorthand for type -ap */
+ dflags |= (CDESC_PATH_ONLY|CDESC_FORCE_PATH);
+ dflags &= ~(CDESC_TYPE|CDESC_SHORTDESC);
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ while (list)
+ {
+ int found;
+
+ found = describe_command (list->word->word, dflags);
+
+ if (!found && (dflags & (CDESC_PATH_ONLY|CDESC_TYPE)) == 0)
+ sh_notfound (list->word->word);
+
+ any_failed += found == 0;
+ list = list->next;
+ }
+
+ opt = (any_failed == 0) ? EXECUTION_SUCCESS : EXECUTION_FAILURE;
+ return (sh_chkwrite (opt));
+}
+
+/*
+ * Describe COMMAND as required by the type and command builtins.
+ *
+ * Behavior is controlled by DFLAGS. Flag values are
+ * CDESC_ALL print all descriptions of a command
+ * CDESC_SHORTDESC print the description for type and command -V
+ * CDESC_REUSABLE print in a format that may be reused as input
+ * CDESC_TYPE print the type for type -t
+ * CDESC_PATH_ONLY print the path for type -p
+ * CDESC_FORCE_PATH force a path search for type -P
+ * CDESC_NOFUNCS skip function lookup for type -f
+ * CDESC_ABSPATH convert to absolute path, no ./ prefix
+ *
+ * CDESC_ALL says whether or not to look for all occurrences of COMMAND, or
+ * return after finding it once.
+ */
+int
+describe_command (command, dflags)
+ char *command;
+ int dflags;
+{
+ int found, i, found_file, f, all;
+ char *full_path, *x;
+ SHELL_VAR *func;
+#if defined (ALIAS)
+ alias_t *alias;
+#endif
+
+ all = (dflags & CDESC_ALL) != 0;
+ found = found_file = 0;
+ full_path = (char *)NULL;
+
+#if defined (ALIAS)
+ /* Command is an alias? */
+ if (((dflags & CDESC_FORCE_PATH) == 0) && expand_aliases && (alias = find_alias (command)))
+ {
+ if (dflags & CDESC_TYPE)
+ puts ("alias");
+ else if (dflags & CDESC_SHORTDESC)
+ printf (_("%s is aliased to `%s'\n"), command, alias->value);
+ else if (dflags & CDESC_REUSABLE)
+ {
+ x = sh_single_quote (alias->value);
+ printf ("alias %s=%s\n", command, x);
+ free (x);
+ }
+
+ found = 1;
+
+ if (all == 0)
+ return (1);
+ }
+#endif /* ALIAS */
+
+ /* Command is a shell reserved word? */
+ if (((dflags & CDESC_FORCE_PATH) == 0) && (i = find_reserved_word (command)) >= 0)
+ {
+ if (dflags & CDESC_TYPE)
+ puts ("keyword");
+ else if (dflags & CDESC_SHORTDESC)
+ printf (_("%s is a shell keyword\n"), command);
+ else if (dflags & CDESC_REUSABLE)
+ printf ("%s\n", command);
+
+ found = 1;
+
+ if (all == 0)
+ return (1);
+ }
+
+ /* Command is a function? */
+ if (((dflags & (CDESC_FORCE_PATH|CDESC_NOFUNCS)) == 0) && (func = find_function (command)))
+ {
+ if (dflags & CDESC_TYPE)
+ puts ("function");
+ else if (dflags & CDESC_SHORTDESC)
+ {
+ char *result;
+
+ printf (_("%s is a function\n"), command);
+
+ /* We're blowing away THE_PRINTED_COMMAND here... */
+
+ result = named_function_string (command, function_cell (func), FUNC_MULTILINE|FUNC_EXTERNAL);
+ printf ("%s\n", result);
+ }
+ else if (dflags & CDESC_REUSABLE)
+ printf ("%s\n", command);
+
+ found = 1;
+
+ if (all == 0)
+ return (1);
+ }
+
+ /* Command is a builtin? */
+ if (((dflags & CDESC_FORCE_PATH) == 0) && find_shell_builtin (command))
+ {
+ if (dflags & CDESC_TYPE)
+ puts ("builtin");
+ else if (dflags & CDESC_SHORTDESC)
+ printf (_("%s is a shell builtin\n"), command);
+ else if (dflags & CDESC_REUSABLE)
+ printf ("%s\n", command);
+
+ found = 1;
+
+ if (all == 0)
+ return (1);
+ }
+
+ /* Command is a disk file? */
+ /* If the command name given is already an absolute command, just
+ check to see if it is executable. */
+ if (absolute_program (command))
+ {
+ f = file_status (command);
+ if (f & FS_EXECABLE)
+ {
+ if (dflags & CDESC_TYPE)
+ puts ("file");
+ else if (dflags & CDESC_SHORTDESC)
+ printf (_("%s is %s\n"), command, command);
+ else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY))
+ printf ("%s\n", command);
+
+ /* There's no use looking in the hash table or in $PATH,
+ because they're not consulted when an absolute program
+ name is supplied. */
+ return (1);
+ }
+ }
+
+ /* If the user isn't doing "-a", then we might care about
+ whether the file is present in our hash table. */
+ if (all == 0 || (dflags & CDESC_FORCE_PATH))
+ {
+ if (full_path = phash_search (command))
+ {
+ if (dflags & CDESC_TYPE)
+ puts ("file");
+ else if (dflags & CDESC_SHORTDESC)
+ printf (_("%s is hashed (%s)\n"), command, full_path);
+ else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY))
+ printf ("%s\n", full_path);
+
+ free (full_path);
+ return (1);
+ }
+ }
+
+ /* Now search through $PATH. */
+ while (1)
+ {
+ if (all == 0)
+ full_path = find_user_command (command);
+ else
+ full_path =
+ user_command_matches (command, FS_EXEC_ONLY, found_file);
+ /* XXX - should that be FS_EXEC_PREFERRED? */
+
+ if (!full_path)
+ break;
+
+ /* If we found the command as itself by looking through $PATH, it
+ probably doesn't exist. Check whether or not the command is an
+ executable file. If it's not, don't report a match. This is
+ the default posix mode behavior */
+ if (STREQ (full_path, command) || posixly_correct)
+ {
+ f = file_status (full_path);
+ if ((f & FS_EXECABLE) == 0)
+ {
+ free (full_path);
+ full_path = (char *)NULL;
+ if (all == 0)
+ break;
+ }
+ else if (ABSPATH (full_path))
+ ; /* placeholder; don't need to do anything yet */
+ else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY|CDESC_SHORTDESC))
+ {
+ f = MP_DOCWD | ((dflags & CDESC_ABSPATH) ? MP_RMDOT : 0);
+ full_path = sh_makepath ((char *)NULL, full_path, f);
+ }
+ }
+ /* If we require a full path and don't have one, make one */
+ else if ((dflags & CDESC_ABSPATH) && ABSPATH (full_path) == 0)
+ full_path = sh_makepath ((char *)NULL, full_path, MP_DOCWD|MP_RMDOT);
+
+ found_file++;
+ found = 1;
+
+ if (dflags & CDESC_TYPE)
+ puts ("file");
+ else if (dflags & CDESC_SHORTDESC)
+ printf (_("%s is %s\n"), command, full_path);
+ else if (dflags & (CDESC_REUSABLE|CDESC_PATH_ONLY))
+ printf ("%s\n", full_path);
+
+ free (full_path);
+ full_path = (char *)NULL;
+
+ if (all == 0)
+ break;
+ }
+
+ return (found);
+}
diff --git a/builtins/ulimit.def b/builtins/ulimit.def
new file mode 100644
index 0000000..7c1e256
--- /dev/null
+++ b/builtins/ulimit.def
@@ -0,0 +1,772 @@
+This file is ulimit.def, from which is created ulimit.c.
+It implements the builtin "ulimit" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES ulimit.c
+
+$BUILTIN ulimit
+$FUNCTION ulimit_builtin
+$DEPENDS_ON !_MINIX
+$SHORT_DOC ulimit [-SHacdefilmnpqrstuvx] [limit]
+Modify shell resource limits.
+
+Provides control over the resources available to the shell and processes
+it creates, on systems that allow such control.
+
+Options:
+ -S use the `soft' resource limit
+ -H use the `hard' resource limit
+ -a all current limits are reported
+ -b the socket buffer size
+ -c the maximum size of core files created
+ -d the maximum size of a process's data segment
+ -e the maximum scheduling priority (`nice')
+ -f the maximum size of files written by the shell and its children
+ -i the maximum number of pending signals
+ -l the maximum size a process may lock into memory
+ -m the maximum resident set size
+ -n the maximum number of open file descriptors
+ -p the pipe buffer size
+ -q the maximum number of bytes in POSIX message queues
+ -r the maximum real-time scheduling priority
+ -s the maximum stack size
+ -t the maximum amount of cpu time in seconds
+ -u the maximum number of user processes
+ -v the size of virtual memory
+ -x the maximum number of file locks
+
+If LIMIT is given, it is the new value of the specified resource; the
+special LIMIT values `soft', `hard', and `unlimited' stand for the
+current soft limit, the current hard limit, and no limit, respectively.
+Otherwise, the current value of the specified resource is printed. If
+no option is given, then -f is assumed.
+
+Values are in 1024-byte increments, except for -t, which is in seconds,
+-p, which is in increments of 512 bytes, and -u, which is an unscaled
+number of processes.
+
+Exit Status:
+Returns success unless an invalid option is supplied or an error occurs.
+$END
+
+#if !defined (_MINIX)
+
+#include <config.h>
+
+#include "../bashtypes.h"
+#ifndef _MINIX
+# include <sys/param.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "common.h"
+#include "bashgetopt.h"
+#include "pipesize.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+/* For some reason, HPUX chose to make these definitions visible only if
+ _KERNEL is defined, so we define _KERNEL before including <sys/resource.h>
+ and #undef it afterward. */
+#if defined (HAVE_RESOURCE)
+# include <sys/time.h>
+# if defined (HPUX) && defined (RLIMIT_NEEDS_KERNEL)
+# define _KERNEL
+# endif
+# include <sys/resource.h>
+# if defined (HPUX) && defined (RLIMIT_NEEDS_KERNEL)
+# undef _KERNEL
+# endif
+#elif defined (HAVE_SYS_TIMES_H)
+# include <sys/times.h>
+#endif
+
+#if defined (HAVE_LIMITS_H)
+# include <limits.h>
+#endif
+
+/* Check for the most basic symbols. If they aren't present, this
+ system's <sys/resource.h> isn't very useful to us. */
+#if !defined (RLIMIT_FSIZE) || !defined (HAVE_GETRLIMIT)
+# undef HAVE_RESOURCE
+#endif
+
+#if !defined (RLIMTYPE)
+# define RLIMTYPE long
+# define string_to_rlimtype(s) strtol(s, (char **)NULL, 10)
+# define print_rlimtype(num, nl) printf ("%ld%s", num, nl ? "\n" : "")
+#endif
+
+/* Some systems use RLIMIT_NOFILE, others use RLIMIT_OFILE */
+#if defined (HAVE_RESOURCE) && defined (RLIMIT_OFILE) && !defined (RLIMIT_NOFILE)
+# define RLIMIT_NOFILE RLIMIT_OFILE
+#endif /* HAVE_RESOURCE && RLIMIT_OFILE && !RLIMIT_NOFILE */
+
+/* Some systems have these, some do not. */
+#ifdef RLIMIT_FSIZE
+# define RLIMIT_FILESIZE RLIMIT_FSIZE
+#else
+# define RLIMIT_FILESIZE 256
+#endif
+
+#define RLIMIT_PIPESIZE 257
+
+#ifdef RLIMIT_NOFILE
+# define RLIMIT_OPENFILES RLIMIT_NOFILE
+#else
+# define RLIMIT_OPENFILES 258
+#endif
+
+#ifdef RLIMIT_VMEM
+# define RLIMIT_VIRTMEM RLIMIT_VMEM
+# define RLIMIT_VMBLKSZ 1024
+#else
+# ifdef RLIMIT_AS
+# define RLIMIT_VIRTMEM RLIMIT_AS
+# define RLIMIT_VMBLKSZ 1024
+# else
+# define RLIMIT_VIRTMEM 259
+# define RLIMIT_VMBLKSZ 1
+# endif
+#endif
+
+#ifdef RLIMIT_NPROC
+# define RLIMIT_MAXUPROC RLIMIT_NPROC
+#else
+# define RLIMIT_MAXUPROC 260
+#endif
+
+#if !defined (RLIM_INFINITY)
+# define RLIM_INFINITY 0x7fffffff
+#endif
+
+#if !defined (RLIM_SAVED_CUR)
+# define RLIM_SAVED_CUR RLIM_INFINITY
+#endif
+
+#if !defined (RLIM_SAVED_MAX)
+# define RLIM_SAVED_MAX RLIM_INFINITY
+#endif
+
+#define LIMIT_HARD 0x01
+#define LIMIT_SOFT 0x02
+
+/* "Blocks" are defined as 512 bytes when in Posix mode and 1024 bytes
+ otherwise. */
+#define POSIXBLK -2
+
+#define BLOCKSIZE(x) (((x) == POSIXBLK) ? (posixly_correct ? 512 : 1024) : (x))
+
+extern int posixly_correct;
+
+static int _findlim __P((int));
+
+static int ulimit_internal __P((int, char *, int, int));
+
+static int get_limit __P((int, RLIMTYPE *, RLIMTYPE *));
+static int set_limit __P((int, RLIMTYPE, int));
+
+static void printone __P((int, RLIMTYPE, int));
+static void print_all_limits __P((int));
+
+static int set_all_limits __P((int, RLIMTYPE));
+
+static int filesize __P((RLIMTYPE *));
+static int pipesize __P((RLIMTYPE *));
+static int getmaxuprc __P((RLIMTYPE *));
+static int getmaxvm __P((RLIMTYPE *, RLIMTYPE *));
+
+typedef struct {
+ int option; /* The ulimit option for this limit. */
+ int parameter; /* Parameter to pass to get_limit (). */
+ int block_factor; /* Blocking factor for specific limit. */
+ const char * const description; /* Descriptive string to output. */
+ const char * const units; /* scale */
+} RESOURCE_LIMITS;
+
+static RESOURCE_LIMITS limits[] = {
+#ifdef RLIMIT_PTHREAD
+ { 'T', RLIMIT_PTHREAD, 1, "number of threads", (char *)NULL },
+#endif
+#ifdef RLIMIT_SBSIZE
+ { 'b', RLIMIT_SBSIZE, 1, "socket buffer size", "bytes" },
+#endif
+#ifdef RLIMIT_CORE
+ { 'c', RLIMIT_CORE, POSIXBLK, "core file size", "blocks" },
+#endif
+#ifdef RLIMIT_DATA
+ { 'd', RLIMIT_DATA, 1024, "data seg size", "kbytes" },
+#endif
+#ifdef RLIMIT_NICE
+ { 'e', RLIMIT_NICE, 1, "scheduling priority", (char *)NULL },
+#endif
+ { 'f', RLIMIT_FILESIZE, POSIXBLK, "file size", "blocks" },
+#ifdef RLIMIT_SIGPENDING
+ { 'i', RLIMIT_SIGPENDING, 1, "pending signals", (char *)NULL },
+#endif
+#ifdef RLIMIT_MEMLOCK
+ { 'l', RLIMIT_MEMLOCK, 1024, "max locked memory", "kbytes" },
+#endif
+#ifdef RLIMIT_RSS
+ { 'm', RLIMIT_RSS, 1024, "max memory size", "kbytes" },
+#endif /* RLIMIT_RSS */
+ { 'n', RLIMIT_OPENFILES, 1, "open files", (char *)NULL},
+ { 'p', RLIMIT_PIPESIZE, 512, "pipe size", "512 bytes" },
+#ifdef RLIMIT_MSGQUEUE
+ { 'q', RLIMIT_MSGQUEUE, 1, "POSIX message queues", "bytes" },
+#endif
+#ifdef RLIMIT_RTPRIO
+ { 'r', RLIMIT_RTPRIO, 1, "real-time priority", (char *)NULL },
+#endif
+#ifdef RLIMIT_STACK
+ { 's', RLIMIT_STACK, 1024, "stack size", "kbytes" },
+#endif
+#ifdef RLIMIT_CPU
+ { 't', RLIMIT_CPU, 1, "cpu time", "seconds" },
+#endif /* RLIMIT_CPU */
+ { 'u', RLIMIT_MAXUPROC, 1, "max user processes", (char *)NULL },
+#if defined (HAVE_RESOURCE)
+ { 'v', RLIMIT_VIRTMEM, RLIMIT_VMBLKSZ, "virtual memory", "kbytes" },
+#endif
+#ifdef RLIMIT_SWAP
+ { 'w', RLIMIT_SWAP, 1024, "swap size", "kbytes" },
+#endif
+#ifdef RLIMIT_LOCKS
+ { 'x', RLIMIT_LOCKS, 1, "file locks", (char *)NULL },
+#endif
+ { -1, -1, -1, (char *)NULL, (char *)NULL }
+};
+#define NCMDS (sizeof(limits) / sizeof(limits[0]))
+
+typedef struct _cmd {
+ int cmd;
+ char *arg;
+} ULCMD;
+
+static ULCMD *cmdlist;
+static int ncmd;
+static int cmdlistsz;
+
+#if !defined (HAVE_RESOURCE) && !defined (HAVE_ULIMIT)
+long
+ulimit (cmd, newlim)
+ int cmd;
+ long newlim;
+{
+ errno = EINVAL;
+ return -1;
+}
+#endif /* !HAVE_RESOURCE && !HAVE_ULIMIT */
+
+static int
+_findlim (opt)
+ int opt;
+{
+ register int i;
+
+ for (i = 0; limits[i].option > 0; i++)
+ if (limits[i].option == opt)
+ return i;
+ return -1;
+}
+
+static char optstring[4 + 2 * NCMDS];
+
+/* Report or set limits associated with certain per-process resources.
+ See the help documentation in builtins.c for a full description. */
+int
+ulimit_builtin (list)
+ register WORD_LIST *list;
+{
+ register char *s;
+ int c, limind, mode, opt, all_limits;
+
+ mode = 0;
+
+ all_limits = 0;
+
+ /* Idea stolen from pdksh -- build option string the first time called. */
+ if (optstring[0] == 0)
+ {
+ s = optstring;
+ *s++ = 'a'; *s++ = 'S'; *s++ = 'H';
+ for (c = 0; limits[c].option > 0; c++)
+ {
+ *s++ = limits[c].option;
+ *s++ = ';';
+ }
+ *s = '\0';
+ }
+
+ /* Initialize the command list. */
+ if (cmdlistsz == 0)
+ cmdlist = (ULCMD *)xmalloc ((cmdlistsz = 16) * sizeof (ULCMD));
+ ncmd = 0;
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, optstring)) != -1)
+ {
+ switch (opt)
+ {
+ case 'a':
+ all_limits++;
+ break;
+
+ /* -S and -H are modifiers, not real options. */
+ case 'S':
+ mode |= LIMIT_SOFT;
+ break;
+
+ case 'H':
+ mode |= LIMIT_HARD;
+ break;
+
+ case '?':
+ builtin_usage ();
+ return (EX_USAGE);
+
+ default:
+ if (ncmd >= cmdlistsz)
+ cmdlist = (ULCMD *)xrealloc (cmdlist, (cmdlistsz *= 2) * sizeof (ULCMD));
+ cmdlist[ncmd].cmd = opt;
+ cmdlist[ncmd++].arg = list_optarg;
+ break;
+ }
+ }
+ list = loptend;
+
+ if (all_limits)
+ {
+#ifdef NOTYET
+ if (list) /* setting */
+ {
+ if (STREQ (list->word->word, "unlimited") == 0)
+ {
+ builtin_error (_("%s: invalid limit argument"), list->word->word);
+ return (EXECUTION_FAILURE);
+ }
+ return (set_all_limits (mode == 0 ? LIMIT_SOFT|LIMIT_HARD : mode, RLIM_INFINITY));
+ }
+#endif
+ print_all_limits (mode == 0 ? LIMIT_SOFT : mode);
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+ }
+
+ /* default is `ulimit -f' */
+ if (ncmd == 0)
+ {
+ cmdlist[ncmd].cmd = 'f';
+ /* `ulimit something' is same as `ulimit -f something' */
+ cmdlist[ncmd++].arg = list ? list->word->word : (char *)NULL;
+ if (list)
+ list = list->next;
+ }
+
+ /* verify each command in the list. */
+ for (c = 0; c < ncmd; c++)
+ {
+ limind = _findlim (cmdlist[c].cmd);
+ if (limind == -1)
+ {
+ builtin_error (_("`%c': bad command"), cmdlist[c].cmd);
+ return (EX_USAGE);
+ }
+ }
+
+ for (c = 0; c < ncmd; c++)
+ if (ulimit_internal (cmdlist[c].cmd, cmdlist[c].arg, mode, ncmd > 1) == EXECUTION_FAILURE)
+ return (EXECUTION_FAILURE);
+
+ return (EXECUTION_SUCCESS);
+}
+
+static int
+ulimit_internal (cmd, cmdarg, mode, multiple)
+ int cmd;
+ char *cmdarg;
+ int mode, multiple;
+{
+ int opt, limind, setting;
+ int block_factor;
+ RLIMTYPE soft_limit, hard_limit, real_limit, limit;
+
+ setting = cmdarg != 0;
+ limind = _findlim (cmd);
+ if (mode == 0)
+ mode = setting ? (LIMIT_HARD|LIMIT_SOFT) : LIMIT_SOFT;
+ opt = get_limit (limind, &soft_limit, &hard_limit);
+ if (opt < 0)
+ {
+ builtin_error (_("%s: cannot get limit: %s"), limits[limind].description,
+ strerror (errno));
+ return (EXECUTION_FAILURE);
+ }
+
+ if (setting == 0) /* print the value of the specified limit */
+ {
+ printone (limind, (mode & LIMIT_SOFT) ? soft_limit : hard_limit, multiple);
+ return (EXECUTION_SUCCESS);
+ }
+
+ /* Setting the limit. */
+ if (STREQ (cmdarg, "hard"))
+ real_limit = hard_limit;
+ else if (STREQ (cmdarg, "soft"))
+ real_limit = soft_limit;
+ else if (STREQ (cmdarg, "unlimited"))
+ real_limit = RLIM_INFINITY;
+ else if (all_digits (cmdarg))
+ {
+ limit = string_to_rlimtype (cmdarg);
+ block_factor = BLOCKSIZE(limits[limind].block_factor);
+ real_limit = limit * block_factor;
+
+ if ((real_limit / block_factor) != limit)
+ {
+ sh_erange (cmdarg, _("limit"));
+ return (EXECUTION_FAILURE);
+ }
+ }
+ else
+ {
+ sh_invalidnum (cmdarg);
+ return (EXECUTION_FAILURE);
+ }
+
+ if (set_limit (limind, real_limit, mode) < 0)
+ {
+ builtin_error (_("%s: cannot modify limit: %s"), limits[limind].description,
+ strerror (errno));
+ return (EXECUTION_FAILURE);
+ }
+
+ return (EXECUTION_SUCCESS);
+}
+
+static int
+get_limit (ind, softlim, hardlim)
+ int ind;
+ RLIMTYPE *softlim, *hardlim;
+{
+ RLIMTYPE value;
+#if defined (HAVE_RESOURCE)
+ struct rlimit limit;
+#endif
+
+ if (limits[ind].parameter >= 256)
+ {
+ switch (limits[ind].parameter)
+ {
+ case RLIMIT_FILESIZE:
+ if (filesize (&value) < 0)
+ return -1;
+ break;
+ case RLIMIT_PIPESIZE:
+ if (pipesize (&value) < 0)
+ return -1;
+ break;
+ case RLIMIT_OPENFILES:
+ value = (RLIMTYPE)getdtablesize ();
+ break;
+ case RLIMIT_VIRTMEM:
+ return (getmaxvm (softlim, hardlim));
+ case RLIMIT_MAXUPROC:
+ if (getmaxuprc (&value) < 0)
+ return -1;
+ break;
+ default:
+ errno = EINVAL;
+ return -1;
+ }
+ *softlim = *hardlim = value;
+ return (0);
+ }
+ else
+ {
+#if defined (HAVE_RESOURCE)
+ if (getrlimit (limits[ind].parameter, &limit) < 0)
+ return -1;
+ *softlim = limit.rlim_cur;
+ *hardlim = limit.rlim_max;
+# if defined (HPUX9)
+ if (limits[ind].parameter == RLIMIT_FILESIZE)
+ {
+ *softlim *= 512;
+ *hardlim *= 512; /* Ugh. */
+ }
+ else
+# endif /* HPUX9 */
+ return 0;
+#else
+ errno = EINVAL;
+ return -1;
+#endif
+ }
+}
+
+static int
+set_limit (ind, newlim, mode)
+ int ind;
+ RLIMTYPE newlim;
+ int mode;
+{
+#if defined (HAVE_RESOURCE)
+ struct rlimit limit;
+ RLIMTYPE val;
+#endif
+
+ if (limits[ind].parameter >= 256)
+ switch (limits[ind].parameter)
+ {
+ case RLIMIT_FILESIZE:
+#if !defined (HAVE_RESOURCE)
+ return (ulimit (2, newlim / 512L));
+#else
+ errno = EINVAL;
+ return -1;
+#endif
+
+ case RLIMIT_OPENFILES:
+#if defined (HAVE_SETDTABLESIZE)
+# if defined (__CYGWIN__)
+ /* Grrr... Cygwin declares setdtablesize as void. */
+ setdtablesize (newlim);
+ return 0;
+# else
+ return (setdtablesize (newlim));
+# endif
+#endif
+ case RLIMIT_PIPESIZE:
+ case RLIMIT_VIRTMEM:
+ case RLIMIT_MAXUPROC:
+ default:
+ errno = EINVAL;
+ return -1;
+ }
+ else
+ {
+#if defined (HAVE_RESOURCE)
+ if (getrlimit (limits[ind].parameter, &limit) < 0)
+ return -1;
+# if defined (HPUX9)
+ if (limits[ind].parameter == RLIMIT_FILESIZE)
+ newlim /= 512; /* Ugh. */
+# endif /* HPUX9 */
+ val = (current_user.euid != 0 && newlim == RLIM_INFINITY &&
+ (mode & LIMIT_HARD) == 0 && /* XXX -- test */
+ (limit.rlim_cur <= limit.rlim_max))
+ ? limit.rlim_max : newlim;
+ if (mode & LIMIT_SOFT)
+ limit.rlim_cur = val;
+ if (mode & LIMIT_HARD)
+ limit.rlim_max = val;
+
+ return (setrlimit (limits[ind].parameter, &limit));
+#else
+ errno = EINVAL;
+ return -1;
+#endif
+ }
+}
+
+static int
+getmaxvm (softlim, hardlim)
+ RLIMTYPE *softlim, *hardlim;
+{
+#if defined (HAVE_RESOURCE)
+ struct rlimit datalim, stacklim;
+
+ if (getrlimit (RLIMIT_DATA, &datalim) < 0)
+ return -1;
+
+ if (getrlimit (RLIMIT_STACK, &stacklim) < 0)
+ return -1;
+
+ /* Protect against overflow. */
+ *softlim = (datalim.rlim_cur / 1024L) + (stacklim.rlim_cur / 1024L);
+ *hardlim = (datalim.rlim_max / 1024L) + (stacklim.rlim_max / 1024L);
+ return 0;
+#else
+ errno = EINVAL;
+ return -1;
+#endif /* HAVE_RESOURCE */
+}
+
+static int
+filesize(valuep)
+ RLIMTYPE *valuep;
+{
+#if !defined (HAVE_RESOURCE)
+ long result;
+ if ((result = ulimit (1, 0L)) < 0)
+ return -1;
+ else
+ *valuep = (RLIMTYPE) result * 512;
+ return 0;
+#else
+ errno = EINVAL;
+ return -1;
+#endif
+}
+
+static int
+pipesize (valuep)
+ RLIMTYPE *valuep;
+{
+#if defined (PIPE_BUF)
+ /* This is defined on Posix systems. */
+ *valuep = (RLIMTYPE) PIPE_BUF;
+ return 0;
+#else
+# if defined (_POSIX_PIPE_BUF)
+ *valuep = (RLIMTYPE) _POSIX_PIPE_BUF;
+ return 0;
+# else
+# if defined (PIPESIZE)
+ /* This is defined by running a program from the Makefile. */
+ *valuep = (RLIMTYPE) PIPESIZE;
+ return 0;
+# else
+ errno = EINVAL;
+ return -1;
+# endif /* PIPESIZE */
+# endif /* _POSIX_PIPE_BUF */
+#endif /* PIPE_BUF */
+}
+
+static int
+getmaxuprc (valuep)
+ RLIMTYPE *valuep;
+{
+ long maxchild;
+
+ maxchild = getmaxchild ();
+ if (maxchild < 0)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ else
+ {
+ *valuep = (RLIMTYPE) maxchild;
+ return 0;
+ }
+}
+
+static void
+print_all_limits (mode)
+ int mode;
+{
+ register int i;
+ RLIMTYPE softlim, hardlim;
+
+ if (mode == 0)
+ mode |= LIMIT_SOFT;
+
+ for (i = 0; limits[i].option > 0; i++)
+ {
+ if (get_limit (i, &softlim, &hardlim) == 0)
+ printone (i, (mode & LIMIT_SOFT) ? softlim : hardlim, 1);
+ else if (errno != EINVAL)
+ builtin_error ("%s: cannot get limit: %s", limits[i].description,
+ strerror (errno));
+ }
+}
+
+static void
+printone (limind, curlim, pdesc)
+ int limind;
+ RLIMTYPE curlim;
+ int pdesc;
+{
+ char unitstr[64];
+ int factor;
+
+ factor = BLOCKSIZE(limits[limind].block_factor);
+ if (pdesc)
+ {
+ if (limits[limind].units)
+ sprintf (unitstr, "(%s, -%c) ", limits[limind].units, limits[limind].option);
+ else
+ sprintf (unitstr, "(-%c) ", limits[limind].option);
+
+ printf ("%-20s %16s", limits[limind].description, unitstr);
+ }
+ if (curlim == RLIM_INFINITY)
+ puts ("unlimited");
+ else if (curlim == RLIM_SAVED_MAX)
+ puts ("hard");
+ else if (curlim == RLIM_SAVED_CUR)
+ puts ("soft");
+ else
+ print_rlimtype ((curlim / factor), 1);
+}
+
+/* Set all limits to NEWLIM. NEWLIM currently must be RLIM_INFINITY, which
+ causes all limits to be set as high as possible depending on mode (like
+ csh `unlimit'). Returns -1 if NEWLIM is invalid, 0 if all limits
+ were set successfully, and 1 if at least one limit could not be set.
+
+ To raise all soft limits to their corresponding hard limits, use
+ ulimit -S -a unlimited
+ To attempt to raise all hard limits to infinity (superuser-only), use
+ ulimit -H -a unlimited
+ To attempt to raise all soft and hard limits to infinity, use
+ ulimit -a unlimited
+*/
+
+static int
+set_all_limits (mode, newlim)
+ int mode;
+ RLIMTYPE newlim;
+{
+ register int i;
+ int retval = 0;
+
+ if (newlim != RLIM_INFINITY)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ if (mode == 0)
+ mode = LIMIT_SOFT|LIMIT_HARD;
+
+ for (retval = i = 0; limits[i].option > 0; i++)
+ if (set_limit (i, newlim, mode) < 0)
+ {
+ builtin_error (_("%s: cannot modify limit: %s"), limits[i].description,
+ strerror (errno));
+ retval = 1;
+ }
+ return retval;
+}
+
+#endif /* !_MINIX */
diff --git a/builtins/umask.def b/builtins/umask.def
new file mode 100644
index 0000000..289a0f5
--- /dev/null
+++ b/builtins/umask.def
@@ -0,0 +1,316 @@
+This file is umask.def, from which is created umask.c.
+It implements the builtin "umask" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$PRODUCES umask.c
+
+$BUILTIN umask
+$FUNCTION umask_builtin
+$SHORT_DOC umask [-p] [-S] [mode]
+Display or set file mode mask.
+
+Sets the user file-creation mask to MODE. If MODE is omitted, prints
+the current value of the mask.
+
+If MODE begins with a digit, it is interpreted as an octal number;
+otherwise it is a symbolic mode string like that accepted by chmod(1).
+
+Options:
+ -p if MODE is omitted, output in a form that may be reused as input
+ -S makes the output symbolic; otherwise an octal number is output
+
+Exit Status:
+Returns success unless MODE is invalid or an invalid option is given.
+$END
+
+#include <config.h>
+
+#include "../bashtypes.h"
+#include "filecntl.h"
+#if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <chartypes.h>
+
+#include "../bashintl.h"
+
+#include "../shell.h"
+#include "posixstat.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+#ifdef __LCC__
+#define mode_t int
+#endif
+
+/* **************************************************************** */
+/* */
+/* UMASK Builtin and Helpers */
+/* */
+/* **************************************************************** */
+
+static void print_symbolic_umask __P((mode_t));
+static int symbolic_umask __P((WORD_LIST *));
+
+/* Set or display the mask used by the system when creating files. Flag
+ of -S means display the umask in a symbolic mode. */
+int
+umask_builtin (list)
+ WORD_LIST *list;
+{
+ int print_symbolically, opt, umask_value, pflag;
+ mode_t umask_arg;
+
+ print_symbolically = pflag = 0;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "Sp")) != -1)
+ {
+ switch (opt)
+ {
+ case 'S':
+ print_symbolically++;
+ break;
+ case 'p':
+ pflag++;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+
+ list = loptend;
+
+ if (list)
+ {
+ if (DIGIT (*list->word->word))
+ {
+ umask_value = read_octal (list->word->word);
+
+ /* Note that other shells just let you set the umask to zero
+ by specifying a number out of range. This is a problem
+ with those shells. We don't change the umask if the input
+ is lousy. */
+ if (umask_value == -1)
+ {
+ sh_erange (list->word->word, _("octal number"));
+ return (EXECUTION_FAILURE);
+ }
+ }
+ else
+ {
+ umask_value = symbolic_umask (list);
+ if (umask_value == -1)
+ return (EXECUTION_FAILURE);
+ }
+ umask_arg = (mode_t)umask_value;
+ umask (umask_arg);
+ if (print_symbolically)
+ print_symbolic_umask (umask_arg);
+ }
+ else /* Display the UMASK for this user. */
+ {
+ umask_arg = umask (022);
+ umask (umask_arg);
+
+ if (pflag)
+ printf ("umask%s ", (print_symbolically ? " -S" : ""));
+ if (print_symbolically)
+ print_symbolic_umask (umask_arg);
+ else
+ printf ("%04lo\n", (unsigned long)umask_arg);
+ }
+
+ return (sh_chkwrite (EXECUTION_SUCCESS));
+}
+
+/* Print the umask in a symbolic form. In the output, a letter is
+ printed if the corresponding bit is clear in the umask. */
+static void
+print_symbolic_umask (um)
+ mode_t um;
+{
+ char ubits[4], gbits[4], obits[4]; /* u=rwx,g=rwx,o=rwx */
+ int i;
+
+ i = 0;
+ if ((um & S_IRUSR) == 0)
+ ubits[i++] = 'r';
+ if ((um & S_IWUSR) == 0)
+ ubits[i++] = 'w';
+ if ((um & S_IXUSR) == 0)
+ ubits[i++] = 'x';
+ ubits[i] = '\0';
+
+ i = 0;
+ if ((um & S_IRGRP) == 0)
+ gbits[i++] = 'r';
+ if ((um & S_IWGRP) == 0)
+ gbits[i++] = 'w';
+ if ((um & S_IXGRP) == 0)
+ gbits[i++] = 'x';
+ gbits[i] = '\0';
+
+ i = 0;
+ if ((um & S_IROTH) == 0)
+ obits[i++] = 'r';
+ if ((um & S_IWOTH) == 0)
+ obits[i++] = 'w';
+ if ((um & S_IXOTH) == 0)
+ obits[i++] = 'x';
+ obits[i] = '\0';
+
+ printf ("u=%s,g=%s,o=%s\n", ubits, gbits, obits);
+}
+
+int
+parse_symbolic_mode (mode, initial_bits)
+ char *mode;
+ int initial_bits;
+{
+ int who, op, perm, bits, c;
+ char *s;
+
+ for (s = mode, bits = initial_bits;;)
+ {
+ who = op = perm = 0;
+
+ /* Parse the `who' portion of the symbolic mode clause. */
+ while (member (*s, "agou"))
+ {
+ switch (c = *s++)
+ {
+ case 'u':
+ who |= S_IRWXU;
+ continue;
+ case 'g':
+ who |= S_IRWXG;
+ continue;
+ case 'o':
+ who |= S_IRWXO;
+ continue;
+ case 'a':
+ who |= S_IRWXU | S_IRWXG | S_IRWXO;
+ continue;
+ default:
+ break;
+ }
+ }
+
+ /* The operation is now sitting in *s. */
+ op = *s++;
+ switch (op)
+ {
+ case '+':
+ case '-':
+ case '=':
+ break;
+ default:
+ builtin_error (_("`%c': invalid symbolic mode operator"), op);
+ return (-1);
+ }
+
+ /* Parse out the `perm' section of the symbolic mode clause. */
+ while (member (*s, "rwx"))
+ {
+ c = *s++;
+
+ switch (c)
+ {
+ case 'r':
+ perm |= S_IRUGO;
+ break;
+ case 'w':
+ perm |= S_IWUGO;
+ break;
+ case 'x':
+ perm |= S_IXUGO;
+ break;
+ }
+ }
+
+ /* Now perform the operation or return an error for a
+ bad permission string. */
+ if (!*s || *s == ',')
+ {
+ if (who)
+ perm &= who;
+
+ switch (op)
+ {
+ case '+':
+ bits |= perm;
+ break;
+ case '-':
+ bits &= ~perm;
+ break;
+ case '=':
+ if (who == 0)
+ who = S_IRWXU | S_IRWXG | S_IRWXO;
+ bits &= ~who;
+ bits |= perm;
+ break;
+
+ /* No other values are possible. */
+ }
+
+ if (*s == '\0')
+ break;
+ else
+ s++; /* skip past ',' */
+ }
+ else
+ {
+ builtin_error (_("`%c': invalid symbolic mode character"), *s);
+ return (-1);
+ }
+ }
+
+ return (bits);
+}
+
+/* Set the umask from a symbolic mode string similar to that accepted
+ by chmod. If the -S argument is given, then print the umask in a
+ symbolic form. */
+static int
+symbolic_umask (list)
+ WORD_LIST *list;
+{
+ int um, bits;
+
+ /* Get the initial umask. Don't change it yet. */
+ um = umask (022);
+ umask (um);
+
+ /* All work is done with the complement of the umask -- it's
+ more intuitive and easier to deal with. It is complemented
+ again before being returned. */
+ bits = parse_symbolic_mode (list->word->word, ~um & 0777);
+ if (bits == -1)
+ return (-1);
+
+ um = ~bits & 0777;
+ return (um);
+}
diff --git a/builtins/wait.def b/builtins/wait.def
new file mode 100644
index 0000000..0206926
--- /dev/null
+++ b/builtins/wait.def
@@ -0,0 +1,186 @@
+This file is wait.def, from which is created wait.c.
+It implements the builtin "wait" in Bash.
+
+Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+This file is part of GNU Bash, the Bourne Again SHell.
+
+Bash is free software: you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+Bash is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+$BUILTIN wait
+$FUNCTION wait_builtin
+$DEPENDS_ON JOB_CONTROL
+$PRODUCES wait.c
+$SHORT_DOC wait [id]
+Wait for job completion and return exit status.
+
+Waits for the process identified by ID, which may be a process ID or a
+job specification, and reports its termination status. If ID is not
+given, waits for all currently active child processes, and the return
+status is zero. If ID is a a job specification, waits for all processes
+in the job's pipeline.
+
+Exit Status:
+Returns the status of ID; fails if ID is invalid or an invalid option is
+given.
+$END
+
+$BUILTIN wait
+$FUNCTION wait_builtin
+$DEPENDS_ON !JOB_CONTROL
+$SHORT_DOC wait [pid]
+Wait for process completion and return exit status.
+
+Waits for the specified process and reports its termination status. If
+PID is not given, all currently active child processes are waited for,
+and the return code is zero. PID must be a process ID.
+
+Exit Status:
+Returns the status of ID; fails if ID is invalid or an invalid option is
+given.
+$END
+
+#include <config.h>
+
+#include "../bashtypes.h"
+#include <signal.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <chartypes.h>
+
+#include "../bashansi.h"
+
+#include "../shell.h"
+#include "../jobs.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+extern int wait_signal_received;
+
+procenv_t wait_intr_buf;
+
+/* Wait for the pid in LIST to stop or die. If no arguments are given, then
+ wait for all of the active background processes of the shell and return
+ 0. If a list of pids or job specs are given, return the exit status of
+ the last one waited for. */
+
+#define WAIT_RETURN(s) \
+ do \
+ { \
+ interrupt_immediately = old_interrupt_immediately;\
+ return (s);\
+ } \
+ while (0)
+
+int
+wait_builtin (list)
+ WORD_LIST *list;
+{
+ int status, code;
+ volatile int old_interrupt_immediately;
+
+ USE_VAR(list);
+
+ if (no_options (list))
+ return (EX_USAGE);
+ list = loptend;
+
+ old_interrupt_immediately = interrupt_immediately;
+ interrupt_immediately++;
+
+ /* POSIX.2 says: When the shell is waiting (by means of the wait utility)
+ for asynchronous commands to complete, the reception of a signal for
+ which a trap has been set shall cause the wait utility to return
+ immediately with an exit status greater than 128, after which the trap
+ associated with the signal shall be taken.
+
+ We handle SIGINT here; it's the only one that needs to be treated
+ specially (I think), since it's handled specially in {no,}jobs.c. */
+ code = setjmp (wait_intr_buf);
+ if (code)
+ {
+ status = 128 + wait_signal_received;
+ WAIT_RETURN (status);
+ }
+
+ /* We support jobs or pids.
+ wait <pid-or-job> [pid-or-job ...] */
+
+ /* But wait without any arguments means to wait for all of the shell's
+ currently active background processes. */
+ if (list == 0)
+ {
+ wait_for_background_pids ();
+ WAIT_RETURN (EXECUTION_SUCCESS);
+ }
+
+ status = EXECUTION_SUCCESS;
+ while (list)
+ {
+ pid_t pid;
+ char *w;
+ intmax_t pid_value;
+
+ w = list->word->word;
+ if (DIGIT (*w))
+ {
+ if (legal_number (w, &pid_value) && pid_value == (pid_t)pid_value)
+ {
+ pid = (pid_t)pid_value;
+ status = wait_for_single_pid (pid);
+ }
+ else
+ {
+ sh_badpid (w);
+ WAIT_RETURN (EXECUTION_FAILURE);
+ }
+ }
+#if defined (JOB_CONTROL)
+ else if (*w && *w == '%')
+ /* Must be a job spec. Check it out. */
+ {
+ int job;
+ sigset_t set, oset;
+
+ BLOCK_CHILD (set, oset);
+ job = get_job_spec (list);
+
+ if (INVALID_JOB (job))
+ {
+ if (job != DUP_JOB)
+ sh_badjob (list->word->word);
+ UNBLOCK_CHILD (oset);
+ status = 127; /* As per Posix.2, section 4.70.2 */
+ list = list->next;
+ continue;
+ }
+
+ /* Job spec used. Wait for the last pid in the pipeline. */
+ UNBLOCK_CHILD (oset);
+ status = wait_for_job (job);
+ }
+#endif /* JOB_CONTROL */
+ else
+ {
+ sh_badpid (w);
+ status = EXECUTION_FAILURE;
+ }
+ list = list->next;
+ }
+
+ WAIT_RETURN (status);
+}
diff --git a/command.h b/command.h
new file mode 100644
index 0000000..4707812
--- /dev/null
+++ b/command.h
@@ -0,0 +1,384 @@
+/* command.h -- The structures used internally to represent commands, and
+ the extern declarations of the functions used to create them. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_COMMAND_H_)
+#define _COMMAND_H_
+
+#include "stdc.h"
+
+/* Instructions describing what kind of thing to do for a redirection. */
+enum r_instruction {
+ r_output_direction, r_input_direction, r_inputa_direction,
+ r_appending_to, r_reading_until, r_reading_string,
+ r_duplicating_input, r_duplicating_output, r_deblank_reading_until,
+ r_close_this, r_err_and_out, r_input_output, r_output_force,
+ r_duplicating_input_word, r_duplicating_output_word,
+ r_move_input, r_move_output, r_move_input_word, r_move_output_word,
+ r_append_err_and_out
+};
+
+/* Redirection flags; values for rflags */
+#define REDIR_VARASSIGN 0x01
+
+/* Redirection errors. */
+#define AMBIGUOUS_REDIRECT -1
+#define NOCLOBBER_REDIRECT -2
+#define RESTRICTED_REDIRECT -3 /* can only happen in restricted shells. */
+#define HEREDOC_REDIRECT -4 /* here-doc temp file can't be created */
+#define BADVAR_REDIRECT -5 /* something wrong with {varname}redir */
+
+#define CLOBBERING_REDIRECT(ri) \
+ (ri == r_output_direction || ri == r_err_and_out)
+
+#define OUTPUT_REDIRECT(ri) \
+ (ri == r_output_direction || ri == r_input_output || ri == r_err_and_out || ri == r_append_err_and_out)
+
+#define INPUT_REDIRECT(ri) \
+ (ri == r_input_direction || ri == r_inputa_direction || ri == r_input_output)
+
+#define WRITE_REDIRECT(ri) \
+ (ri == r_output_direction || \
+ ri == r_input_output || \
+ ri == r_err_and_out || \
+ ri == r_appending_to || \
+ ri == r_append_err_and_out || \
+ ri == r_output_force)
+
+/* redirection needs translation */
+#define TRANSLATE_REDIRECT(ri) \
+ (ri == r_duplicating_input_word || ri == r_duplicating_output_word || \
+ ri == r_move_input_word || ri == r_move_output_word)
+
+/* Command Types: */
+enum command_type { cm_for, cm_case, cm_while, cm_if, cm_simple, cm_select,
+ cm_connection, cm_function_def, cm_until, cm_group,
+ cm_arith, cm_cond, cm_arith_for, cm_subshell, cm_coproc };
+
+/* Possible values for the `flags' field of a WORD_DESC. */
+#define W_HASDOLLAR 0x000001 /* Dollar sign present. */
+#define W_QUOTED 0x000002 /* Some form of quote character is present. */
+#define W_ASSIGNMENT 0x000004 /* This word is a variable assignment. */
+#define W_GLOBEXP 0x000008 /* This word is the result of a glob expansion. */
+#define W_NOSPLIT 0x000010 /* Do not perform word splitting on this word because ifs is empty string. */
+#define W_NOGLOB 0x000020 /* Do not perform globbing on this word. */
+#define W_NOSPLIT2 0x000040 /* Don't split word except for $@ expansion (using spaces) because context does not allow it. */
+#define W_TILDEEXP 0x000080 /* Tilde expand this assignment word */
+#define W_DOLLARAT 0x000100 /* $@ and its special handling */
+#define W_DOLLARSTAR 0x000200 /* $* and its special handling */
+#define W_NOCOMSUB 0x000400 /* Don't perform command substitution on this word */
+#define W_ASSIGNRHS 0x000800 /* Word is rhs of an assignment statement */
+#define W_NOTILDE 0x001000 /* Don't perform tilde expansion on this word */
+#define W_ITILDE 0x002000 /* Internal flag for word expansion */
+#define W_NOEXPAND 0x004000 /* Don't expand at all -- do quote removal */
+#define W_COMPASSIGN 0x008000 /* Compound assignment */
+#define W_ASSNBLTIN 0x010000 /* word is a builtin command that takes assignments */
+#define W_ASSIGNARG 0x020000 /* word is assignment argument to command */
+#define W_HASQUOTEDNULL 0x040000 /* word contains a quoted null character */
+#define W_DQUOTE 0x080000 /* word should be treated as if double-quoted */
+#define W_NOPROCSUB 0x100000 /* don't perform process substitution */
+#define W_HASCTLESC 0x200000 /* word contains literal CTLESC characters */
+#define W_ASSIGNASSOC 0x400000 /* word looks like associative array assignment */
+
+/* Possible values for subshell_environment */
+#define SUBSHELL_ASYNC 0x01 /* subshell caused by `command &' */
+#define SUBSHELL_PAREN 0x02 /* subshell caused by ( ... ) */
+#define SUBSHELL_COMSUB 0x04 /* subshell caused by `command` or $(command) */
+#define SUBSHELL_FORK 0x08 /* subshell caused by executing a disk command */
+#define SUBSHELL_PIPE 0x10 /* subshell from a pipeline element */
+#define SUBSHELL_PROCSUB 0x20 /* subshell caused by <(command) or >(command) */
+#define SUBSHELL_COPROC 0x40 /* subshell from a coproc pipeline */
+
+/* A structure which represents a word. */
+typedef struct word_desc {
+ char *word; /* Zero terminated string. */
+ int flags; /* Flags associated with this word. */
+} WORD_DESC;
+
+/* A linked list of words. */
+typedef struct word_list {
+ struct word_list *next;
+ WORD_DESC *word;
+} WORD_LIST;
+
+
+/* **************************************************************** */
+/* */
+/* Shell Command Structs */
+/* */
+/* **************************************************************** */
+
+/* What a redirection descriptor looks like. If the redirection instruction
+ is ri_duplicating_input or ri_duplicating_output, use DEST, otherwise
+ use the file in FILENAME. Out-of-range descriptors are identified by a
+ negative DEST. */
+
+typedef union {
+ int dest; /* Place to redirect REDIRECTOR to, or ... */
+ WORD_DESC *filename; /* filename to redirect to. */
+} REDIRECTEE;
+
+/* Structure describing a redirection. If REDIRECTOR is negative, the parser
+ (or translator in redir.c) encountered an out-of-range file descriptor. */
+typedef struct redirect {
+ struct redirect *next; /* Next element, or NULL. */
+ REDIRECTEE redirector; /* Descriptor or varname to be redirected. */
+ int rflags; /* Private flags for this redirection */
+ int flags; /* Flag value for `open'. */
+ enum r_instruction instruction; /* What to do with the information. */
+ REDIRECTEE redirectee; /* File descriptor or filename */
+ char *here_doc_eof; /* The word that appeared in <<foo. */
+} REDIRECT;
+
+/* An element used in parsing. A single word or a single redirection.
+ This is an ephemeral construct. */
+typedef struct element {
+ WORD_DESC *word;
+ REDIRECT *redirect;
+} ELEMENT;
+
+/* Possible values for command->flags. */
+#define CMD_WANT_SUBSHELL 0x01 /* User wants a subshell: ( command ) */
+#define CMD_FORCE_SUBSHELL 0x02 /* Shell needs to force a subshell. */
+#define CMD_INVERT_RETURN 0x04 /* Invert the exit value. */
+#define CMD_IGNORE_RETURN 0x08 /* Ignore the exit value. For set -e. */
+#define CMD_NO_FUNCTIONS 0x10 /* Ignore functions during command lookup. */
+#define CMD_INHIBIT_EXPANSION 0x20 /* Do not expand the command words. */
+#define CMD_NO_FORK 0x40 /* Don't fork; just call execve */
+#define CMD_TIME_PIPELINE 0x80 /* Time a pipeline */
+#define CMD_TIME_POSIX 0x100 /* time -p; use POSIX.2 time output spec. */
+#define CMD_AMPERSAND 0x200 /* command & */
+#define CMD_STDIN_REDIR 0x400 /* async command needs implicit </dev/null */
+#define CMD_COMMAND_BUILTIN 0x0800 /* command executed by `command' builtin */
+#define CMD_COPROC_SUBSHELL 0x1000
+
+/* What a command looks like. */
+typedef struct command {
+ enum command_type type; /* FOR CASE WHILE IF CONNECTION or SIMPLE. */
+ int flags; /* Flags controlling execution environment. */
+ int line; /* line number the command starts on */
+ REDIRECT *redirects; /* Special redirects for FOR CASE, etc. */
+ union {
+ struct for_com *For;
+ struct case_com *Case;
+ struct while_com *While;
+ struct if_com *If;
+ struct connection *Connection;
+ struct simple_com *Simple;
+ struct function_def *Function_def;
+ struct group_com *Group;
+#if defined (SELECT_COMMAND)
+ struct select_com *Select;
+#endif
+#if defined (DPAREN_ARITHMETIC)
+ struct arith_com *Arith;
+#endif
+#if defined (COND_COMMAND)
+ struct cond_com *Cond;
+#endif
+#if defined (ARITH_FOR_COMMAND)
+ struct arith_for_com *ArithFor;
+#endif
+ struct subshell_com *Subshell;
+ struct coproc_com *Coproc;
+ } value;
+} COMMAND;
+
+/* Structure used to represent the CONNECTION type. */
+typedef struct connection {
+ int ignore; /* Unused; simplifies make_command (). */
+ COMMAND *first; /* Pointer to the first command. */
+ COMMAND *second; /* Pointer to the second command. */
+ int connector; /* What separates this command from others. */
+} CONNECTION;
+
+/* Structures used to represent the CASE command. */
+
+/* Values for FLAGS word in a PATTERN_LIST */
+#define CASEPAT_FALLTHROUGH 0x01
+#define CASEPAT_TESTNEXT 0x02
+
+/* Pattern/action structure for CASE_COM. */
+typedef struct pattern_list {
+ struct pattern_list *next; /* Clause to try in case this one failed. */
+ WORD_LIST *patterns; /* Linked list of patterns to test. */
+ COMMAND *action; /* Thing to execute if a pattern matches. */
+ int flags;
+} PATTERN_LIST;
+
+/* The CASE command. */
+typedef struct case_com {
+ int flags; /* See description of CMD flags. */
+ int line; /* line number the `case' keyword appears on */
+ WORD_DESC *word; /* The thing to test. */
+ PATTERN_LIST *clauses; /* The clauses to test against, or NULL. */
+} CASE_COM;
+
+/* FOR command. */
+typedef struct for_com {
+ int flags; /* See description of CMD flags. */
+ int line; /* line number the `for' keyword appears on */
+ WORD_DESC *name; /* The variable name to get mapped over. */
+ WORD_LIST *map_list; /* The things to map over. This is never NULL. */
+ COMMAND *action; /* The action to execute.
+ During execution, NAME is bound to successive
+ members of MAP_LIST. */
+} FOR_COM;
+
+#if defined (ARITH_FOR_COMMAND)
+typedef struct arith_for_com {
+ int flags;
+ int line; /* generally used for error messages */
+ WORD_LIST *init;
+ WORD_LIST *test;
+ WORD_LIST *step;
+ COMMAND *action;
+} ARITH_FOR_COM;
+#endif
+
+#if defined (SELECT_COMMAND)
+/* KSH SELECT command. */
+typedef struct select_com {
+ int flags; /* See description of CMD flags. */
+ int line; /* line number the `select' keyword appears on */
+ WORD_DESC *name; /* The variable name to get mapped over. */
+ WORD_LIST *map_list; /* The things to map over. This is never NULL. */
+ COMMAND *action; /* The action to execute.
+ During execution, NAME is bound to the member of
+ MAP_LIST chosen by the user. */
+} SELECT_COM;
+#endif /* SELECT_COMMAND */
+
+/* IF command. */
+typedef struct if_com {
+ int flags; /* See description of CMD flags. */
+ COMMAND *test; /* Thing to test. */
+ COMMAND *true_case; /* What to do if the test returned non-zero. */
+ COMMAND *false_case; /* What to do if the test returned zero. */
+} IF_COM;
+
+/* WHILE command. */
+typedef struct while_com {
+ int flags; /* See description of CMD flags. */
+ COMMAND *test; /* Thing to test. */
+ COMMAND *action; /* Thing to do while test is non-zero. */
+} WHILE_COM;
+
+#if defined (DPAREN_ARITHMETIC)
+/* The arithmetic evaluation command, ((...)). Just a set of flags and
+ a WORD_LIST, of which the first element is the only one used, for the
+ time being. */
+typedef struct arith_com {
+ int flags;
+ int line;
+ WORD_LIST *exp;
+} ARITH_COM;
+#endif /* DPAREN_ARITHMETIC */
+
+/* The conditional command, [[...]]. This is a binary tree -- we slippped
+ a recursive-descent parser into the YACC grammar to parse it. */
+#define COND_AND 1
+#define COND_OR 2
+#define COND_UNARY 3
+#define COND_BINARY 4
+#define COND_TERM 5
+#define COND_EXPR 6
+
+typedef struct cond_com {
+ int flags;
+ int line;
+ int type;
+ WORD_DESC *op;
+ struct cond_com *left, *right;
+} COND_COM;
+
+/* The "simple" command. Just a collection of words and redirects. */
+typedef struct simple_com {
+ int flags; /* See description of CMD flags. */
+ int line; /* line number the command starts on */
+ WORD_LIST *words; /* The program name, the arguments,
+ variable assignments, etc. */
+ REDIRECT *redirects; /* Redirections to perform. */
+} SIMPLE_COM;
+
+/* The "function definition" command. */
+typedef struct function_def {
+ int flags; /* See description of CMD flags. */
+ int line; /* Line number the function def starts on. */
+ WORD_DESC *name; /* The name of the function. */
+ COMMAND *command; /* The parsed execution tree. */
+ char *source_file; /* file in which function was defined, if any */
+} FUNCTION_DEF;
+
+/* A command that is `grouped' allows pipes and redirections to affect all
+ commands in the group. */
+typedef struct group_com {
+ int ignore; /* See description of CMD flags. */
+ COMMAND *command;
+} GROUP_COM;
+
+typedef struct subshell_com {
+ int flags;
+ COMMAND *command;
+} SUBSHELL_COM;
+
+#define COPROC_RUNNING 0x01
+#define COPROC_DEAD 0x02
+
+typedef struct coproc {
+ char *c_name;
+ pid_t c_pid;
+ int c_rfd;
+ int c_wfd;
+ int c_rsave;
+ int c_wsave;
+ int c_flags;
+ int c_status;
+} Coproc;
+
+typedef struct coproc_com {
+ int flags;
+ char *name;
+ COMMAND *command;
+} COPROC_COM;
+
+extern COMMAND *global_command;
+extern Coproc sh_coproc;
+
+/* Possible command errors */
+#define CMDERR_DEFAULT 0
+#define CMDERR_BADTYPE 1
+#define CMDERR_BADCONN 2
+#define CMDERR_BADJUMP 3
+
+#define CMDERR_LAST 3
+
+/* Forward declarations of functions declared in copy_cmd.c. */
+
+extern FUNCTION_DEF *copy_function_def_contents __P((FUNCTION_DEF *, FUNCTION_DEF *));
+extern FUNCTION_DEF *copy_function_def __P((FUNCTION_DEF *));
+
+extern WORD_DESC *copy_word __P((WORD_DESC *));
+extern WORD_LIST *copy_word_list __P((WORD_LIST *));
+extern REDIRECT *copy_redirect __P((REDIRECT *));
+extern REDIRECT *copy_redirects __P((REDIRECT *));
+extern COMMAND *copy_command __P((COMMAND *));
+
+#endif /* _COMMAND_H_ */
diff --git a/config-bot.h b/config-bot.h
new file mode 100644
index 0000000..334581a
--- /dev/null
+++ b/config-bot.h
@@ -0,0 +1,199 @@
+/* config-bot.h */
+/* modify settings or make new ones based on what autoconf tells us. */
+
+/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*********************************************************/
+/* Modify or set defines based on the configure results. */
+/*********************************************************/
+
+#if !defined (HAVE_VPRINTF) && defined (HAVE_DOPRNT)
+# define USE_VFPRINTF_EMULATION
+# define HAVE_VPRINTF
+#endif
+
+#if defined (HAVE_SYS_RESOURCE_H) && defined (HAVE_GETRLIMIT)
+# define HAVE_RESOURCE
+#endif
+
+#if !defined (GETPGRP_VOID)
+# define HAVE_BSD_PGRP
+#endif
+
+/* Try this without testing __STDC__ for the time being. */
+#if defined (HAVE_STDARG_H)
+# define PREFER_STDARG
+# define USE_VARARGS
+#else
+# if defined (HAVE_VARARGS_H)
+# define PREFER_VARARGS
+# define USE_VARARGS
+# endif
+#endif
+
+#if defined (HAVE_SYS_SOCKET_H) && defined (HAVE_GETPEERNAME) && defined (HAVE_NETINET_IN_H)
+# define HAVE_NETWORK
+#endif
+
+#if defined (HAVE_REGEX_H) && defined (HAVE_REGCOMP) && defined (HAVE_REGEXEC)
+# define HAVE_POSIX_REGEXP
+#endif
+
+/* backwards compatibility between different autoconf versions */
+#if HAVE_DECL_SYS_SIGLIST && !defined (SYS_SIGLIST_DECLARED)
+# define SYS_SIGLIST_DECLARED
+#endif
+
+/***********************************************************************/
+/* Unset defines based on what configure reports as missing or broken. */
+/***********************************************************************/
+
+/* Ultrix botches type-ahead when switching from canonical to
+ non-canonical mode, at least through version 4.3 */
+#if !defined (HAVE_TERMIOS_H) || !defined (HAVE_TCGETATTR) || defined (ultrix)
+# define TERMIOS_MISSING
+#endif
+
+/* If we have a getcwd(3), but one that does not dynamically allocate memory,
+ #undef HAVE_GETCWD so the replacement in getcwd.c will be built. We do
+ not do this on Solaris, because their implementation of loopback mounts
+ breaks the traditional file system assumptions that getcwd uses. */
+#if defined (HAVE_GETCWD) && defined (GETCWD_BROKEN) && !defined (SOLARIS)
+# undef HAVE_GETCWD
+#endif
+
+#if !defined (HAVE_DEV_FD) && defined (NAMED_PIPES_MISSING)
+# undef PROCESS_SUBSTITUTION
+#endif
+
+#if defined (JOB_CONTROL_MISSING)
+# undef JOB_CONTROL
+#endif
+
+#if defined (STRCOLL_BROKEN)
+# undef HAVE_STRCOLL
+#endif
+
+#if !defined (HAVE_POSIX_REGEXP)
+# undef COND_REGEXP
+#endif
+
+/* If the shell is called by this name, it will become restricted. */
+#if defined (RESTRICTED_SHELL)
+# define RESTRICTED_SHELL_NAME "rbash"
+#endif
+
+/***********************************************************/
+/* Make sure feature defines have necessary prerequisites. */
+/***********************************************************/
+
+/* BANG_HISTORY requires HISTORY. */
+#if defined (BANG_HISTORY) && !defined (HISTORY)
+# define HISTORY
+#endif /* BANG_HISTORY && !HISTORY */
+
+#if defined (READLINE) && !defined (HISTORY)
+# define HISTORY
+#endif
+
+#if defined (PROGRAMMABLE_COMPLETION) && !defined (READLINE)
+# undef PROGRAMMABLE_COMPLETION
+#endif
+
+#if !defined (V9_ECHO)
+# undef DEFAULT_ECHO_TO_XPG
+#endif
+
+#if !defined (PROMPT_STRING_DECODE)
+# undef PPROMPT
+# define PPROMPT "$ "
+#endif
+
+#if !defined (HAVE_SYSLOG) || !defined (HAVE_SYSLOG_H)
+# undef SYSLOG_HISTORY
+#endif
+
+/************************************************/
+/* check multibyte capability for I18N code */
+/************************************************/
+
+/* For platforms which support the ISO C amendement 1 functionality we
+ support user defined character classes. */
+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
+#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_LOCALE_H)
+# include <wchar.h>
+# include <wctype.h>
+# if defined (HAVE_ISWCTYPE) && \
+ defined (HAVE_ISWLOWER) && \
+ defined (HAVE_ISWUPPER) && \
+ defined (HAVE_MBSRTOWCS) && \
+ defined (HAVE_MBRTOWC) && \
+ defined (HAVE_MBRLEN) && \
+ defined (HAVE_TOWLOWER) && \
+ defined (HAVE_TOWUPPER) && \
+ defined (HAVE_WCHAR_T) && \
+ defined (HAVE_WCTYPE_T) && \
+ defined (HAVE_WINT_T) && \
+ defined (HAVE_WCWIDTH) && \
+ defined (HAVE_WCTYPE)
+ /* system is supposed to support XPG5 */
+# define HANDLE_MULTIBYTE 1
+# endif
+#endif
+
+/* If we don't want multibyte chars even on a system that supports them, let
+ the configuring user turn multibyte support off. */
+#if defined (NO_MULTIBYTE_SUPPORT)
+# undef HANDLE_MULTIBYTE
+#endif
+
+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
+#if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T)
+# define wcsrtombs(dest, src, len, ps) (wcsrtombs) (dest, src, len, 0)
+# define mbsrtowcs(dest, src, len, ps) (mbsrtowcs) (dest, src, len, 0)
+# define wcrtomb(s, wc, ps) (wcrtomb) (s, wc, 0)
+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
+# define mbrlen(s, n, ps) (mbrlen) (s, n, 0)
+# define mbstate_t int
+#endif
+
+/* Make sure MB_LEN_MAX is at least 16 (some systems define
+ MB_LEN_MAX as 1) */
+#ifdef HANDLE_MULTIBYTE
+# include <limits.h>
+# if defined(MB_LEN_MAX) && (MB_LEN_MAX < 16)
+# undef MB_LEN_MAX
+# endif
+# if !defined (MB_LEN_MAX)
+# define MB_LEN_MAX 16
+# endif
+#endif
+
+/************************************************/
+/* end of multibyte capability checks for I18N */
+/************************************************/
+
+/******************************************************************/
+/* Placeholder for builders to #undef any unwanted features from */
+/* config-top.h or created by configure (such as the default mail */
+/* file for mail checking). */
+/******************************************************************/
+
+/* If you don't want bash to provide a default mail file to check. */
+/* #undef DEFAULT_MAIL_DIRECTORY */
diff --git a/config-top.h b/config-top.h
new file mode 100644
index 0000000..147d4f4
--- /dev/null
+++ b/config-top.h
@@ -0,0 +1,111 @@
+/* config-top.h - various user-settable options not under the control of autoconf. */
+
+/* Copyright (C) 2002-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Define CONTINUE_AFTER_KILL_ERROR if you want the kill command to
+ continue processing arguments after one of them fails. This is
+ what POSIX.2 specifies. */
+#define CONTINUE_AFTER_KILL_ERROR
+
+/* Define BREAK_COMPLAINS if you want the non-standard, but useful
+ error messages about `break' and `continue' out of context. */
+#define BREAK_COMPLAINS
+
+/* Define BUFFERED_INPUT if you want the shell to do its own input
+ buffering, rather than using stdio. Do not undefine this; it's
+ required to preserve semantics required by POSIX. */
+#define BUFFERED_INPUT
+
+/* Define ONESHOT if you want sh -c 'command' to avoid forking to execute
+ `command' whenever possible. This is a big efficiency improvement. */
+#define ONESHOT
+
+/* Define V9_ECHO if you want to give the echo builtin backslash-escape
+ interpretation using the -e option, in the style of the Bell Labs 9th
+ Edition version of echo. You cannot emulate the System V echo behavior
+ without this option. */
+#define V9_ECHO
+
+/* Define DONT_REPORT_SIGPIPE if you don't want to see `Broken pipe' messages
+ when a job like `cat jobs.c | exit 1' terminates due to a SIGPIPE. */
+#define DONT_REPORT_SIGPIPE
+
+/* Define DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS if you don't want builtins
+ like `echo' and `printf' to report errors when output does not succeed
+ due to EPIPE. */
+/* #define DONT_REPORT_BROKEN_PIPE_WRITE_ERRORS */
+
+/* The default value of the PATH variable. */
+#ifndef DEFAULT_PATH_VALUE
+#define DEFAULT_PATH_VALUE \
+ "/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:."
+#endif
+
+/* The value for PATH when invoking `command -p'. This is only used when
+ the Posix.2 confstr () function, or CS_PATH define are not present. */
+#ifndef STANDARD_UTILS_PATH
+#define STANDARD_UTILS_PATH \
+ "/bin:/usr/bin:/sbin:/usr/sbin:/etc:/usr/etc"
+#endif
+
+/* Default primary and secondary prompt strings. */
+#define PPROMPT "\\s-\\v\\$ "
+#define SPROMPT "> "
+
+/* Undefine this if you don't want the ksh-compatible behavior of reprinting
+ the select menu after a valid choice is made only if REPLY is set to NULL
+ in the body of the select command. The menu is always reprinted if the
+ reply to the select query is an empty line. */
+#define KSH_COMPATIBLE_SELECT
+
+/* System-wide .bashrc file for interactive shells. */
+/* #define SYS_BASHRC "/etc/bash.bashrc" */
+
+/* System-wide .bash_logout for login shells. */
+/* #define SYS_BASH_LOGOUT "/etc/bash.bash_logout" */
+
+/* Define this to make non-interactive shells begun with argv[0][0] == '-'
+ run the startup files when not in posix mode. */
+/* #define NON_INTERACTIVE_LOGIN_SHELLS */
+
+/* Define this if you want bash to try to check whether it's being run by
+ sshd and source the .bashrc if so (like the rshd behavior). This checks
+ for the presence of SSH_CLIENT or SSH2_CLIENT in the initial environment,
+ which can be fooled under certain not-uncommon circumstances. */
+/* #define SSH_SOURCE_BASHRC */
+
+/* Define if you want the case-capitalizing operators (~[~]) and the
+ `capcase' variable attribute (declare -c). */
+#define CASEMOD_CAPCASE
+
+/* This is used as the name of a shell function to call when a command
+ name is not found. If you want to name it something other than the
+ default ("command_not_found_handle"), change it here. */
+/* #define NOTFOUND_HOOK "command_not_found_handle" */
+
+/* Define if you want each line saved to the history list in bashhist.c:
+ bash_add_history() to be sent to syslog(). */
+/* #define SYSLOG_HISTORY */
+#if defined (SYSLOG_HISTORY)
+# define SYSLOG_FACILITY LOG_USER
+# define SYSLOG_LEVEL LOG_INFO
+#endif
+
+/* Define if you want to include code in shell.c to support wordexp(3) */
+/* #define WORDEXP_OPTION */
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..07352dd
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,1110 @@
+/* config.h -- Configuration file for bash. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _CONFIG_H_
+#define _CONFIG_H_
+
+/* Configuration feature settings controllable by autoconf. */
+
+/* Define JOB_CONTROL if your operating system supports
+ BSD-like job control. */
+#undef JOB_CONTROL
+
+/* Define ALIAS if you want the alias features. */
+#undef ALIAS
+
+/* Define PUSHD_AND_POPD if you want those commands to be compiled in.
+ (Also the `dirs' commands.) */
+#undef PUSHD_AND_POPD
+
+/* Define BRACE_EXPANSION if you want curly brace expansion a la Csh:
+ foo{a,b} -> fooa foob. Even if this is compiled in (the default) you
+ can turn it off at shell startup with `-nobraceexpansion', or during
+ shell execution with `set +o braceexpand'. */
+#undef BRACE_EXPANSION
+
+/* Define READLINE to get the nifty/glitzy editing features.
+ This is on by default. You can turn it off interactively
+ with the -nolineediting flag. */
+#undef READLINE
+
+/* Define BANG_HISTORY if you want to have Csh style "!" history expansion.
+ This is unrelated to READLINE. */
+#undef BANG_HISTORY
+
+/* Define HISTORY if you want to have access to previously typed commands.
+
+ If both HISTORY and READLINE are defined, you can get at the commands
+ with line editing commands, and you can directly manipulate the history
+ from the command line.
+
+ If only HISTORY is defined, the `fc' and `history' builtins are
+ available. */
+#undef HISTORY
+
+/* Define this if you want completion that puts all alternatives into
+ a brace expansion shell expression. */
+#if defined (BRACE_EXPANSION) && defined (READLINE)
+# define BRACE_COMPLETION
+#endif /* BRACE_EXPANSION */
+
+/* Define DEFAULT_ECHO_TO_XPG if you want the echo builtin to interpret
+ the backslash-escape characters by default, like the XPG Single Unix
+ Specification V2 for echo.
+ This requires that V9_ECHO be defined. */
+#undef DEFAULT_ECHO_TO_XPG
+
+/* Define HELP_BUILTIN if you want the `help' shell builtin and the long
+ documentation strings compiled into the shell. */
+#undef HELP_BUILTIN
+
+/* Define RESTRICTED_SHELL if you want the generated shell to have the
+ ability to be a restricted one. The shell thus generated can become
+ restricted by being run with the name "rbash", or by setting the -r
+ flag. */
+#undef RESTRICTED_SHELL
+
+/* Define DISABLED_BUILTINS if you want "builtin foo" to always run the
+ shell builtin "foo", even if it has been disabled with "enable -n foo". */
+#undef DISABLED_BUILTINS
+
+/* Define PROCESS_SUBSTITUTION if you want the K*rn shell-like process
+ substitution features "<(file)". */
+/* Right now, you cannot do this on machines without fully operational
+ FIFO support. This currently include NeXT and Alliant. */
+#undef PROCESS_SUBSTITUTION
+
+/* Define PROMPT_STRING_DECODE if you want the backslash-escaped special
+ characters in PS1 and PS2 expanded. Variable expansion will still be
+ performed. */
+#undef PROMPT_STRING_DECODE
+
+/* Define SELECT_COMMAND if you want the Korn-shell style `select' command:
+ select word in word_list; do command_list; done */
+#undef SELECT_COMMAND
+
+/* Define COMMAND_TIMING of you want the ksh-style `time' reserved word and
+ the ability to time pipelines, functions, and builtins. */
+#undef COMMAND_TIMING
+
+/* Define ARRAY_VARS if you want ksh-style one-dimensional array variables. */
+#undef ARRAY_VARS
+
+/* Define DPAREN_ARITHMETIC if you want the ksh-style ((...)) arithmetic
+ evaluation command. */
+#undef DPAREN_ARITHMETIC
+
+/* Define EXTENDED_GLOB if you want the ksh-style [*+@?!](patlist) extended
+ pattern matching. */
+#undef EXTENDED_GLOB
+
+/* Define EXTGLOB_DEFAULT to the value you'd like the extglob shell option
+ to have by default */
+#undef EXTGLOB_DEFAULT
+
+/* Define COND_COMMAND if you want the ksh-style [[...]] conditional
+ command. */
+#undef COND_COMMAND
+
+/* Define COND_REGEXP if you want extended regular expression matching and the
+ =~ binary operator in the [[...]] conditional command. */
+#define COND_REGEXP
+
+/* Define COPROCESS_SUPPORT if you want support for ksh-like coprocesses and
+ the `coproc' reserved word */
+#define COPROCESS_SUPPORT
+
+/* Define ARITH_FOR_COMMAND if you want the ksh93-style
+ for (( init; test; step )) do list; done
+ arithmetic for command. */
+#undef ARITH_FOR_COMMAND
+
+/* Define NETWORK_REDIRECTIONS if you want /dev/(tcp|udp)/host/port to open
+ socket connections when used in redirections */
+#undef NETWORK_REDIRECTIONS
+
+/* Define PROGRAMMABLE_COMPLETION for the programmable completion features
+ and the complete builtin. */
+#undef PROGRAMMABLE_COMPLETION
+
+/* Define NO_MULTIBYTE_SUPPORT to not compile in support for multibyte
+ characters, even if the OS supports them. */
+#undef NO_MULTIBYTE_SUPPORT
+
+/* Define DEBUGGER if you want to compile in some features used only by the
+ bash debugger. */
+#undef DEBUGGER
+
+/* Define STRICT_POSIX if you want bash to be strictly posix.2 conformant by
+ default (except for echo; that is controlled separately). */
+#undef STRICT_POSIX
+
+/* Define MEMSCRAMBLE if you want the bash malloc and free to scramble
+ memory contents on malloc() and free(). */
+#undef MEMSCRAMBLE
+
+/* Define AFS if you are using Transarc's AFS. */
+#undef AFS
+
+/* Define for case-modifying variable attributes; variables modified on
+ assignment */
+#undef CASEMOD_ATTRS
+
+/* Define for case-modifying word expansions */
+#undef CASEMOD_EXPANSIONS
+
+#undef ENABLE_NLS
+
+/* End of configuration settings controllable by autoconf. */
+/* Other settable options appear in config-top.h. */
+
+#include "config-top.h"
+
+/* Beginning of autoconf additions. */
+
+/* Characteristics of the C compiler */
+#undef const
+
+#undef inline
+
+#undef restrict
+
+#undef volatile
+
+/* Define if cpp supports the ANSI-C stringizing `#' operator */
+#undef HAVE_STRINGIZE
+
+/* Define if the compiler supports `long double' variables. */
+#undef HAVE_LONG_DOUBLE
+
+#undef PROTOTYPES
+
+#undef __CHAR_UNSIGNED__
+
+/* Define if the compiler supports `long long' variables. */
+#undef HAVE_LONG_LONG
+
+#undef HAVE_UNSIGNED_LONG_LONG
+
+/* The number of bytes in a int. */
+#undef SIZEOF_INT
+
+/* The number of bytes in a long. */
+#undef SIZEOF_LONG
+
+/* The number of bytes in a pointer to char. */
+#undef SIZEOF_CHAR_P
+
+/* The number of bytes in a double (hopefully 8). */
+#undef SIZEOF_DOUBLE
+
+/* The number of bytes in a `long long', if we have one. */
+#undef SIZEOF_LONG_LONG
+
+/* System paths */
+
+#define DEFAULT_MAIL_DIRECTORY "/usr/spool/mail"
+
+/* Characteristics of the system's header files and libraries that affect
+ the compilation environment. */
+
+/* Define if the system does not provide POSIX.1 features except
+ with this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define if you need to in order for stat and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Define to use GNU libc extensions */
+#undef _GNU_SOURCE
+
+/* Define if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Memory management functions. */
+
+/* Define if using the bash version of malloc in lib/malloc/malloc.c */
+#undef USING_BASH_MALLOC
+
+#undef DISABLE_MALLOC_WRAPPERS
+
+/* Define if using alloca.c. */
+#undef C_ALLOCA
+
+/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
+ This function is required for alloca.c support on those systems. */
+#undef CRAY_STACKSEG_END
+
+/* Define if you have alloca, as a function or macro. */
+#undef HAVE_ALLOCA
+
+/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
+#undef HAVE_ALLOCA_H
+
+
+/* SYSTEM TYPES */
+
+/* Define to `long' if <sys/types.h> doesn't define. */
+#undef off_t
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef mode_t
+
+/* Define to `int' if <signal.h> doesn't define. */
+#undef sigset_t
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef pid_t
+
+/* Define to `short' if <sys/types.h> doesn't define. */
+#undef bits16_t
+
+/* Define to `unsigned short' if <sys/types.h> doesn't define. */
+#undef u_bits16_t
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef bits32_t
+
+/* Define to `unsigned int' if <sys/types.h> doesn't define. */
+#undef u_bits32_t
+
+/* Define to `double' if <sys/types.h> doesn't define. */
+#undef bits64_t
+
+/* Define to `unsigned int' if <sys/types.h> doesn't define. */
+#undef u_int
+
+/* Define to `unsigned long' if <sys/types.h> doesn't define. */
+#undef u_long
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef ptrdiff_t
+
+/* Define to `unsigned' if <sys/types.h> doesn't define. */
+#undef size_t
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef ssize_t
+
+/* Define to `long' if <stdint.h> doesn't define. */
+#undef intmax_t
+
+/* Define to `unsigned long' if <stdint.h> doesn't define. */
+#undef uintmax_t
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef uid_t
+
+/* Define to `long' if <sys/types.h> doesn't define. */
+#undef clock_t
+
+/* Define to `long' if <sys/types.h> doesn't define. */
+#undef time_t
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef gid_t
+
+/* Define to `unsigned int' if <sys/socket.h> doesn't define. */
+#undef socklen_t
+
+/* Define to `int' if <signal.h> doesn't define. */
+#undef sig_atomic_t
+
+#undef HAVE_MBSTATE_T
+
+/* Define if you have quad_t in <sys/types.h>. */
+#undef HAVE_QUAD_T
+
+/* Define if you have wchar_t in <wctype.h>. */
+#undef HAVE_WCHAR_T
+
+/* Define if you have wctype_t in <wctype.h>. */
+#undef HAVE_WCTYPE_T
+
+/* Define if you have wint_t in <wctype.h>. */
+#undef HAVE_WINT_T
+
+#undef RLIMTYPE
+
+/* Define to the type of elements in the array set by `getgroups'.
+ Usually this is either `int' or `gid_t'. */
+#undef GETGROUPS_T
+
+/* Characteristics of the machine archictecture. */
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at run-time.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown
+ */
+#undef STACK_DIRECTION
+
+/* Define if the machine architecture is big-endian. */
+#undef WORDS_BIGENDIAN
+
+/* Check for the presence of certain non-function symbols in the system
+ libraries. */
+
+/* Define if `sys_siglist' is declared by <signal.h> or <unistd.h>. */
+#undef HAVE_DECL_SYS_SIGLIST
+#undef SYS_SIGLIST_DECLARED
+
+/* Define if `_sys_siglist' is declared by <signal.h> or <unistd.h>. */
+#undef UNDER_SYS_SIGLIST_DECLARED
+
+#undef HAVE_SYS_SIGLIST
+
+#undef HAVE_UNDER_SYS_SIGLIST
+
+#undef HAVE_SYS_ERRLIST
+
+#undef HAVE_TZNAME
+#undef HAVE_DECL_TZNAME
+
+/* Characteristics of some of the system structures. */
+
+#undef HAVE_STRUCT_DIRENT_D_INO
+
+#undef HAVE_STRUCT_DIRENT_D_FILENO
+
+#undef HAVE_STRUCT_DIRENT_D_NAMLEN
+
+#undef TIOCSTAT_IN_SYS_IOCTL
+
+#undef FIONREAD_IN_SYS_IOCTL
+
+#undef GWINSZ_IN_SYS_IOCTL
+
+#undef STRUCT_WINSIZE_IN_SYS_IOCTL
+
+#undef TM_IN_SYS_TIME
+
+#undef STRUCT_WINSIZE_IN_TERMIOS
+
+#undef SPEED_T_IN_SYS_TYPES
+
+#undef TERMIOS_LDISC
+
+#undef TERMIO_LDISC
+
+#undef HAVE_STRUCT_STAT_ST_BLOCKS
+
+#undef HAVE_STRUCT_TM_TM_ZONE
+#undef HAVE_TM_ZONE
+
+#undef HAVE_TIMEVAL
+
+#undef HAVE_STRUCT_TIMEZONE
+
+/* Characteristics of definitions in the system header files. */
+
+#undef HAVE_GETPW_DECLS
+
+#undef HAVE_RESOURCE
+
+#undef HAVE_LIBC_FNM_EXTMATCH
+
+#undef HAVE_DECL_CONFSTR
+
+#undef HAVE_DECL_PRINTF
+
+#undef HAVE_DECL_SBRK
+
+#undef HAVE_DECL_STRCPY
+
+#undef HAVE_DECL_STRSIGNAL
+
+#undef HAVE_DECL_STRTOLD
+
+#undef PRI_MACROS_BROKEN
+
+#undef STRTOLD_BROKEN
+
+/* Define if WCONTINUED is defined in system headers, but rejected by waitpid */
+#undef WCONTINUED_BROKEN
+
+/* These are checked with BASH_CHECK_DECL */
+
+#undef HAVE_DECL_STRTOIMAX
+#undef HAVE_DECL_STRTOL
+#undef HAVE_DECL_STRTOLL
+#undef HAVE_DECL_STRTOUL
+#undef HAVE_DECL_STRTOULL
+#undef HAVE_DECL_STRTOUMAX
+
+/* Characteristics of system calls and C library functions. */
+
+/* Define if the `getpgrp' function takes no argument. */
+#undef GETPGRP_VOID
+
+#undef NAMED_PIPES_MISSING
+
+#undef OPENDIR_NOT_ROBUST
+
+#undef PGRP_PIPE
+
+/* Define if the setvbuf function takes the buffering type as its second
+ argument and the buffer pointer as the third, as on System V
+ before release 3. */
+#undef SETVBUF_REVERSED
+
+#undef STAT_MACROS_BROKEN
+
+#undef ULIMIT_MAXFDS
+
+#undef CAN_REDEFINE_GETENV
+
+#undef HAVE_STD_PUTENV
+
+#undef HAVE_STD_UNSETENV
+
+#undef HAVE_PRINTF_A_FORMAT
+
+#undef CTYPE_NON_ASCII
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
+/* Characteristics of properties exported by the kernel. */
+
+/* Define if the kernel can exec files beginning with #! */
+#undef HAVE_HASH_BANG_EXEC
+
+/* Define if you have the /dev/fd devices to map open files into the file system. */
+#undef HAVE_DEV_FD
+
+/* Defined to /dev/fd or /proc/self/fd (linux). */
+#undef DEV_FD_PREFIX
+
+/* Define if you have the /dev/stdin device. */
+#undef HAVE_DEV_STDIN
+
+/* The type of iconv's `inbuf' argument */
+#undef ICONV_CONST
+
+/* Type and behavior of signal handling functions. */
+
+/* Define as the return type of signal handlers (int or void). */
+#undef RETSIGTYPE
+
+/* Define if return type of signal handlers is void */
+#undef VOID_SIGHANDLER
+
+#undef MUST_REINSTALL_SIGHANDLERS
+
+#undef HAVE_BSD_SIGNALS
+
+#undef HAVE_POSIX_SIGNALS
+
+#undef HAVE_USG_SIGHOLD
+
+#undef UNUSABLE_RT_SIGNALS
+
+
+/* Presence of system and C library functions. */
+
+/* Define if you have the asprintf function. */
+#undef HAVE_ASPRINTF
+
+/* Define if you have the bcopy function. */
+#undef HAVE_BCOPY
+
+/* Define if you have the bzero function. */
+#undef HAVE_BZERO
+
+/* Define if you have the confstr function. */
+#undef HAVE_CONFSTR
+
+/* Define if you have the dlclose function. */
+#undef HAVE_DLCLOSE
+
+/* Define if you have the dlopen function. */
+#undef HAVE_DLOPEN
+
+/* Define if you have the dlsym function. */
+#undef HAVE_DLSYM
+
+/* Define if you don't have vprintf but do have _doprnt. */
+#undef HAVE_DOPRNT
+
+/* Define if you have the dup2 function. */
+#undef HAVE_DUP2
+
+/* Define if you have the eaccess function. */
+#undef HAVE_EACCESS
+
+/* Define if you have the fcntl function. */
+#undef HAVE_FCNTL
+
+/* Define if you have the fdprintf function. */
+#undef HAVE_FDPRINTF
+
+/* Define if you have the fpurge/__fpurge function. */
+#undef HAVE_FPURGE
+#undef HAVE___FPURGE
+#undef HAVE_DECL_FPURGE
+
+/* Define if you have the getaddrinfo function. */
+#undef HAVE_GETADDRINFO
+
+/* Define if you have the getcwd function. */
+#undef HAVE_GETCWD
+
+/* Define if you have the getdtablesize function. */
+#undef HAVE_GETDTABLESIZE
+
+/* Define if you have the getgroups function. */
+#undef HAVE_GETGROUPS
+
+/* Define if you have the gethostbyname function. */
+#undef HAVE_GETHOSTBYNAME
+
+/* Define if you have the gethostname function. */
+#undef HAVE_GETHOSTNAME
+
+/* Define if you have the getpagesize function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define if you have the getpeername function. */
+#undef HAVE_GETPEERNAME
+
+/* Define if you have the getpwent function. */
+#undef HAVE_GETPWENT
+
+/* Define if you have the getpwnam function. */
+#undef HAVE_GETPWNAM
+
+/* Define if you have the getpwuid function. */
+#undef HAVE_GETPWUID
+
+/* Define if you have the getrlimit function. */
+#undef HAVE_GETRLIMIT
+
+/* Define if you have the getrusage function. */
+#undef HAVE_GETRUSAGE
+
+/* Define if you have the getservbyname function. */
+#undef HAVE_GETSERVBYNAME
+
+/* Define if you have the getservent function. */
+#undef HAVE_GETSERVENT
+
+/* Define if you have the gettimeofday function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define if you have the getwd function. */
+#undef HAVE_GETWD
+
+/* Define if you have the iconv function. */
+#undef HAVE_ICONV
+
+/* Define if you have the inet_aton function. */
+#undef HAVE_INET_ATON
+
+/* Define if you have the isascii function. */
+#undef HAVE_ISASCII
+
+/* Define if you have the isblank function. */
+#undef HAVE_ISBLANK
+
+/* Define if you have the isgraph function. */
+#undef HAVE_ISGRAPH
+
+/* Define if you have the isinf function in libc */
+#undef HAVE_ISINF_IN_LIBC
+
+/* Define if you have the isnan function in libc */
+#undef HAVE_ISNAN_IN_LIBC
+
+/* Define if you have the isprint function. */
+#undef HAVE_ISPRINT
+
+/* Define if you have the isspace function. */
+#undef HAVE_ISSPACE
+
+/* Define if you have the iswctype function. */
+#undef HAVE_ISWCTYPE
+
+/* Define if you have the iswlower function. */
+#undef HAVE_ISWLOWER
+
+/* Define if you have the iswupper function. */
+#undef HAVE_ISWUPPER
+
+/* Define if you have the isxdigit function. */
+#undef HAVE_ISXDIGIT
+
+/* Define if you have the kill function. */
+#undef HAVE_KILL
+
+/* Define if you have the killpg function. */
+#undef HAVE_KILLPG
+
+/* Define if you have the lstat function. */
+#undef HAVE_LSTAT
+
+/* Define if you have the locale_charset function. */
+#undef HAVE_LOCALE_CHARSET
+
+/* Define if you have the mbrlen function. */
+#undef HAVE_MBRLEN
+
+/* Define if you have the mbrtowc function. */
+#undef HAVE_MBRTOWC
+
+/* Define if you have the mbscasecmp function. */
+#undef HAVE_MBSCASECMP
+
+/* Define if you have the mbschr function. */
+#undef HAVE_MBSCHR
+
+/* Define if you have the mbscmp function. */
+#undef HAVE_MBSCMP
+
+/* Define if you have the mbsrtowcs function. */
+#undef HAVE_MBSRTOWCS
+
+/* Define if you have the memmove function. */
+#undef HAVE_MEMMOVE
+
+/* Define if you have the memset function. */
+#undef HAVE_MEMSET
+
+/* Define if you have the mkfifo function. */
+#undef HAVE_MKFIFO
+
+/* Define if you have the pathconf function. */
+#undef HAVE_PATHCONF
+
+/* Define if you have the putenv function. */
+#undef HAVE_PUTENV
+
+/* Define if you have the raise function. */
+#undef HAVE_RAISE
+
+/* Define if you have the readlink function. */
+#undef HAVE_READLINK
+
+/* Define if you have the regcomp function. */
+#undef HAVE_REGCOMP
+
+/* Define if you have the regexec function. */
+#undef HAVE_REGEXEC
+
+/* Define if you have the rename function. */
+#undef HAVE_RENAME
+
+/* Define if you have the sbrk function. */
+#undef HAVE_SBRK
+
+/* Define if you have the select function. */
+#undef HAVE_SELECT
+
+/* Define if you have the setdtablesize function. */
+#undef HAVE_SETDTABLESIZE
+
+/* Define if you have the setenv function. */
+#undef HAVE_SETENV
+
+/* Define if you have the setitimer function. */
+#undef HAVE_SETITIMER
+
+/* Define if you have the setlinebuf function. */
+#undef HAVE_SETLINEBUF
+
+/* Define if you have the setlocale function. */
+#undef HAVE_SETLOCALE
+
+/* Define if you have the setostype function. */
+#undef HAVE_SETOSTYPE
+
+/* Define if you have the setregid function. */
+#undef HAVE_SETREGID
+#undef HAVE_DECL_SETREGID
+
+/* Define if you have the setvbuf function. */
+#undef HAVE_SETVBUF
+
+/* Define if you have the siginterrupt function. */
+#undef HAVE_SIGINTERRUPT
+
+/* Define if you have the POSIX.1-style sigsetjmp function. */
+#undef HAVE_POSIX_SIGSETJMP
+
+/* Define if you have the snprintf function. */
+#undef HAVE_SNPRINTF
+
+/* Define if you have the strcasecmp function. */
+#undef HAVE_STRCASECMP
+
+/* Define if you have the strcasestr function. */
+#undef HAVE_STRCASESTR
+
+/* Define if you have the strchr function. */
+#undef HAVE_STRCHR
+
+/* Define if you have the strcoll function. */
+#undef HAVE_STRCOLL
+
+/* Define if you have the strerror function. */
+#undef HAVE_STRERROR
+
+/* Define if you have the strftime function. */
+#undef HAVE_STRFTIME
+
+/* Define if you have the strnlen function. */
+#undef HAVE_STRNLEN
+
+/* Define if you have the strpbrk function. */
+#undef HAVE_STRPBRK
+
+/* Define if you have the strstr function. */
+#undef HAVE_STRSTR
+
+/* Define if you have the strtod function. */
+#undef HAVE_STRTOD
+
+/* Define if you have the strtoimax function. */
+#undef HAVE_STRTOIMAX
+
+/* Define if you have the strtol function. */
+#undef HAVE_STRTOL
+
+/* Define if you have the strtoll function. */
+#undef HAVE_STRTOLL
+
+/* Define if you have the strtoul function. */
+#undef HAVE_STRTOUL
+
+/* Define if you have the strtoull function. */
+#undef HAVE_STRTOULL
+
+/* Define if you have the strtoumax function. */
+#undef HAVE_STRTOUMAX
+
+/* Define if you have the strsignal function or macro. */
+#undef HAVE_STRSIGNAL
+
+/* Define if you have the sysconf function. */
+#undef HAVE_SYSCONF
+
+/* Define if you have the syslog function. */
+#undef HAVE_SYSLOG
+
+/* Define if you have the tcgetattr function. */
+#undef HAVE_TCGETATTR
+
+/* Define if you have the tcgetpgrp function. */
+#undef HAVE_TCGETPGRP
+
+/* Define if you have the times function. */
+#undef HAVE_TIMES
+
+/* Define if you have the towlower function. */
+#undef HAVE_TOWLOWER
+
+/* Define if you have the towupper function. */
+#undef HAVE_TOWUPPER
+
+/* Define if you have the ttyname function. */
+#undef HAVE_TTYNAME
+
+/* Define if you have the tzset function. */
+#undef HAVE_TZSET
+
+/* Define if you have the ulimit function. */
+#undef HAVE_ULIMIT
+
+/* Define if you have the uname function. */
+#undef HAVE_UNAME
+
+/* Define if you have the unsetenv function. */
+#undef HAVE_UNSETENV
+
+/* Define if you have the vasprintf function. */
+#undef HAVE_VASPRINTF
+
+/* Define if you have the vprintf function. */
+#undef HAVE_VPRINTF
+
+/* Define if you have the vsnprintf function. */
+#undef HAVE_VSNPRINTF
+
+/* Define if you have the waitpid function. */
+#undef HAVE_WAITPID
+
+/* Define if you have the wait3 function. */
+#undef HAVE_WAIT3
+
+/* Define if you have the wcrtomb function. */
+#undef HAVE_WCRTOMB
+
+/* Define if you have the wcscoll function. */
+#undef HAVE_WCSCOLL
+
+/* Define if you have the wcsdup function. */
+#undef HAVE_WCSDUP
+
+/* Define if you have the wctype function. */
+#undef HAVE_WCTYPE
+
+/* Define if you have the wcwidth function. */
+#undef HAVE_WCWIDTH
+
+/* Presence of certain system include files. */
+
+/* Define if you have the <arpa/inet.h> header file. */
+#undef HAVE_ARPA_INET_H
+
+/* Define if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
+/* Define if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define if you have the <grp.h> header file. */
+#undef HAVE_GRP_H
+
+/* Define if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define if you have the <langinfo.h> header file. */
+#undef HAVE_LANGINFO_H
+
+/* Define if you have the <libintl.h> header file. */
+#undef HAVE_LIBINTL_H
+
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define if you have the <ndir.h> header file. */
+#undef HAVE_NDIR_H
+
+/* Define if you have the <netdh.h> header file. */
+#undef HAVE_NETDB_H
+
+/* Define if you have the <netinet/in.h> header file. */
+#undef HAVE_NETINET_IN_H
+
+/* Define if you have the <pwd.h> header file. */
+#undef HAVE_PWD_H
+
+/* Define if you have the <regex.h> header file. */
+#undef HAVE_REGEX_H
+
+/* Define if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
+
+/* Define if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
+/* Define if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define if you have the <syslog.h> header file. */
+#undef HAVE_SYSLOG_H
+
+/* Define if you have the <sys/dir.h> header file. */
+#undef HAVE_SYS_DIR_H
+
+/* Define if you have the <sys/file.h> header file. */
+#undef HAVE_SYS_FILE_H
+
+/* Define if you have the <sys/ndir.h> header file. */
+#undef HAVE_SYS_NDIR_H
+
+/* Define if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define if you have the <sys/pte.h> header file. */
+#undef HAVE_SYS_PTE_H
+
+/* Define if you have the <sys/ptem.h> header file. */
+#undef HAVE_SYS_PTEM_H
+
+/* Define if you have the <sys/resource.h> header file. */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
+/* Define if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define if you have the <sys/stream.h> header file. */
+#undef HAVE_SYS_STREAM_H
+
+/* Define if you have <sys/time.h> */
+#undef HAVE_SYS_TIME_H
+
+#undef TIME_WITH_SYS_TIME
+
+/* Define if you have <sys/times.h> */
+#undef HAVE_SYS_TIMES_H
+
+/* Define if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define if you have the <termcap.h> header file. */
+#undef HAVE_TERMCAP_H
+
+/* Define if you have the <termio.h> header file. */
+#undef HAVE_TERMIO_H
+
+/* Define if you have the <termios.h> header file. */
+#undef HAVE_TERMIOS_H
+
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define if you have the <varargs.h> header file. */
+#undef HAVE_VARARGS_H
+
+/* Define if you have the <wchar.h> header file. */
+#undef HAVE_WCHAR_H
+
+/* Define if you have the <varargs.h> header file. */
+#undef HAVE_WCTYPE_H
+
+/* Presence of certain system libraries. */
+
+#undef HAVE_LIBDL
+
+#undef HAVE_LIBSUN
+
+#undef HAVE_LIBSOCKET
+
+
+/* Define if on MINIX. */
+#undef _MINIX
+
+/* Are we running SVR5 (UnixWare 7)? */
+#undef SVR5
+
+/* Are we running SVR4.2? */
+#undef SVR4_2
+
+/* Are we running some version of SVR4? */
+#undef SVR4
+
+/* Define if job control is unusable or unsupported. */
+#undef JOB_CONTROL_MISSING
+
+/* Do we need to define _KERNEL to get the RLIMIT_* defines from
+ <sys/resource.h>? */
+#undef RLIMIT_NEEDS_KERNEL
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define for large files on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Do strcoll(3) and strcmp(3) give different results in the default locale? */
+#undef STRCOLL_BROKEN
+
+#undef DUP2_BROKEN
+
+#undef GETCWD_BROKEN
+
+/* Additional defines for configuring lib/intl, maintained by autoscan/autoheader */
+
+/* Define if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
+
+/* Define if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define if you have the <malloc.h> header file. */
+#undef HAVE_MALLOC_H
+
+/* Define if you have the <stdio_ext.h> header file. */
+#undef HAVE_STDIO_EXT_H
+
+/* Define if you have the `dcgettext' function. */
+#undef HAVE_DCGETTEXT
+
+/* Define if you have the `localeconv' function. */
+#undef HAVE_LOCALECONV
+
+/* Define if your system has a working `malloc' function. */
+/* #undef HAVE_MALLOC */
+
+/* Define if you have the `mempcpy' function. */
+#undef HAVE_MEMPCPY
+
+/* Define if you have a working `mmap' system call. */
+#undef HAVE_MMAP
+
+/* Define if you have the `munmap' function. */
+#undef HAVE_MUNMAP
+
+/* Define if you have the `nl_langinfo' function. */
+#undef HAVE_NL_LANGINFO
+
+/* Define if you have the `stpcpy' function. */
+#undef HAVE_STPCPY
+
+/* Define if you have the `strcspn' function. */
+#undef HAVE_STRCSPN
+
+/* Define if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define if you have the `__argz_count' function. */
+#undef HAVE___ARGZ_COUNT
+
+/* Define if you have the `__argz_next' function. */
+#undef HAVE___ARGZ_NEXT
+
+/* Define if you have the `__argz_stringify' function. */
+#undef HAVE___ARGZ_STRINGIFY
+
+/* End additions for lib/intl */
+
+#include "config-bot.h"
+
+#endif /* _CONFIG_H_ */
diff --git a/configure b/configure
new file mode 100755
index 0000000..875bbbf
--- /dev/null
+++ b/configure
@@ -0,0 +1,32139 @@
+#! /bin/sh
+# From configure.in for Bash 4.1, version 4.019.
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.63 for bash 4.1-release.
+#
+# Report bugs to <bug-bash@gnu.org>.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ case $as_dir in
+ /*)
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell bug-autoconf@gnu.org about your system,
+ echo including any error possibly output before this message.
+ echo This can help us improve future autoconf versions.
+ echo Configuration will now proceed without shell functions.
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME='bash'
+PACKAGE_TARNAME='bash'
+PACKAGE_VERSION='4.1-release'
+PACKAGE_STRING='bash 4.1-release'
+PACKAGE_BUGREPORT='bug-bash@gnu.org'
+
+ac_unique_file="shell.h"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_header_list=
+ac_func_list=
+ac_subst_vars='LTLIBOBJS
+LOCAL_DEFS
+LOCAL_LDFLAGS
+LOCAL_CFLAGS
+LOCAL_LIBS
+MALLOC_DEBUG
+DEBUG
+RELSTATUS
+BASHVERS
+ARFLAGS
+BUILD_DIR
+incdir
+PROFILE_FLAGS
+SHOBJ_STATUS
+SHOBJ_LIBS
+SHOBJ_XLDFLAGS
+SHOBJ_LDFLAGS
+SHOBJ_LD
+SHOBJ_CFLAGS
+SHOBJ_CC
+JOBS_O
+TERMCAP_DEP
+TERMCAP_LIB
+SIGLIST_O
+LIBINTL_H
+INTL_INC
+INTL_DEP
+LIBOBJS
+POSUB
+LTLIBINTL
+LIBINTL
+INTLLIBS
+INTL_LIBTOOL_SUFFIX_PREFIX
+INTLOBJS
+GENCAT
+INSTOBJEXT
+DATADIRNAME
+CATOBJEXT
+USE_INCLUDED_LIBINTL
+BUILD_INCLUDED_LIBINTL
+INTLBISON
+LTLIBICONV
+LIBICONV
+GLIBC21
+ALLOCA
+MSGMERGE
+XGETTEXT
+GMSGFMT
+MSGFMT
+USE_NLS
+MKINSTALLDIRS
+SIZE
+MAKE_SHELL
+SET_MAKE
+YFLAGS
+YACC
+RANLIB
+AR
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+TILDE_LIB
+HIST_LIBDIR
+HISTORY_DEP
+HISTORY_LIB
+RL_INCLUDE
+RL_INCLUDEDIR
+RL_LIBDIR
+READLINE_DEP
+READLINE_LIB
+RL_MINOR
+RL_MAJOR
+RL_VERSION
+LDFLAGS_FOR_BUILD
+CPPFLAGS_FOR_BUILD
+CFLAGS_FOR_BUILD
+STATIC_LD
+CC_FOR_BUILD
+SIGNAMES_O
+SIGNAMES_H
+CROSS_COMPILE
+EGREP
+GREP
+CPP
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+HELPSTRINGS
+HELPINSTALL
+HELPDIRDEFINE
+HELPDIR
+MALLOC_DEP
+MALLOC_LDFLAGS
+MALLOC_LIBRARY
+MALLOC_LIB
+MALLOC_SRC
+MALLOC_TARGET
+PURIFY
+TESTSCRIPT
+DEBUGGER_START_FILE
+lispdir
+EMACS
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+with_lispdir
+with_afs
+with_bash_malloc
+with_curses
+with_gnu_malloc
+with_installed_readline
+with_purecov
+with_purify
+enable_minimal_config
+enable_alias
+enable_arith_for_command
+enable_array_variables
+enable_bang_history
+enable_brace_expansion
+enable_casemod_attributes
+enable_casemod_expansions
+enable_command_timing
+enable_cond_command
+enable_cond_regexp
+enable_coprocesses
+enable_debugger
+enable_directory_stack
+enable_disabled_builtins
+enable_dparen_arithmetic
+enable_extended_glob
+enable_extended_glob_default
+enable_help_builtin
+enable_history
+enable_job_control
+enable_multibyte
+enable_net_redirections
+enable_process_substitution
+enable_progcomp
+enable_prompt_string_decoding
+enable_readline
+enable_restricted
+enable_select
+enable_separate_helpfiles
+enable_single_help_strings
+enable_strict_posix_default
+enable_usg_echo_default
+enable_xpg_echo_default
+enable_mem_scramble
+enable_profiling
+enable_static_link
+enable_largefile
+enable_nls
+with_gnu_ld
+enable_rpath
+with_libiconv_prefix
+with_included_gettext
+with_libintl_prefix
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+DEBUGGER_START_FILE
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP
+YACC
+YFLAGS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { $as_echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
+ { (exit 1); exit 1; }; } ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { $as_echo "$as_me: error: working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
+ { (exit 1); exit 1; }; }
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures bash 4.1-release to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/bash]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of bash 4.1-release:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-minimal-config a minimal sh-like configuration
+ --enable-alias enable shell aliases
+ --enable-arith-for-command
+ enable arithmetic for command
+ --enable-array-variables
+ include shell array variables
+ --enable-bang-history turn on csh-style history substitution
+ --enable-brace-expansion
+ include brace expansion
+ --enable-casemod-attributes
+ include case-modifying variable attributes
+ --enable-casemod-expansions
+ include case-modifying word expansions
+ --enable-command-timing enable the time reserved word and command timing
+ --enable-cond-command enable the conditional command
+ --enable-cond-regexp enable extended regular expression matching in
+ conditional commands
+ --enable-coprocesses enable coprocess support and the coproc reserved
+ word
+ --enable-debugger enable support for bash debugger
+ --enable-directory-stack
+ enable builtins pushd/popd/dirs
+ --enable-disabled-builtins
+ allow disabled builtins to still be invoked
+ --enable-dparen-arithmetic
+ include ((...)) command
+ --enable-extended-glob include ksh-style extended pattern matching
+ --enable-extended-glob-default
+ force extended pattern matching to be enabled by
+ default
+ --enable-help-builtin include the help builtin
+ --enable-history turn on command history
+ --enable-job-control enable job control features
+ --enable-multibyte enable multibyte characters if OS supports them
+ --enable-net-redirections
+ enable /dev/tcp/host/port redirection
+ --enable-process-substitution
+ enable process substitution
+ --enable-progcomp enable programmable completion and the complete
+ builtin
+ --enable-prompt-string-decoding
+ turn on escape character decoding in prompts
+ --enable-readline turn on command line editing
+ --enable-restricted enable a restricted shell
+ --enable-select include select command
+ --enable-separate-helpfiles
+ use external files for help builtin documentation
+ --enable-single-help-strings
+ store help documentation as a single string to ease
+ translation
+ --enable-strict-posix-default
+ configure bash to be posix-conformant by default
+ --enable-usg-echo-default
+ a synonym for --enable-xpg-echo-default
+ --enable-xpg-echo-default
+ make the echo builtin expand escape sequences by
+ default
+ --enable-mem-scramble scramble memory on calls to malloc and free
+ --enable-profiling allow profiling with gprof
+ --enable-static-link link bash statically, for use as a root shell
+ --disable-largefile omit support for large files
+ --disable-nls do not use Native Language Support
+ --disable-rpath do not hardcode runtime library paths
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-lispdir override the default lisp directory
+ --with-afs if you are running AFS
+ --with-bash-malloc use the Bash version of malloc
+ --with-curses use the curses library instead of the termcap
+ library
+ --with-gnu-malloc synonym for --with-bash-malloc
+ --with-installed-readline
+ use a version of the readline library that is
+ already installed
+ --with-purecov configure to postprocess with pure coverage
+ --with-purify configure to postprocess with purify
+ --with-gnu-ld assume the C compiler uses GNU ld default=no
+ --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
+ --without-libiconv-prefix don't search for libiconv in includedir and libdir
+ --with-included-gettext use the GNU gettext library included here
+ --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
+ --without-libintl-prefix don't search for libintl in includedir and libdir
+
+Some influential environment variables:
+ DEBUGGER_START_FILE
+ location of bash debugger initialization file
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+ YACC The `Yet Another C Compiler' implementation to use. Defaults to
+ the first program found out of: `bison -y', `byacc', `yacc'.
+ YFLAGS The list of arguments that will be passed by default to $YACC.
+ This script will default YFLAGS to the empty string to avoid a
+ default value of `-d' given by some make applications.
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <bug-bash@gnu.org>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+bash configure 4.1-release
+generated by GNU Autoconf 2.63
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by bash $as_me 4.1-release, which was
+generated by GNU Autoconf 2.63. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ ac_site_file1=$CONFIG_SITE
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test -r "$ac_site_file"; then
+ { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+ac_header_list="$ac_header_list sys/time.h"
+ac_header_list="$ac_header_list unistd.h"
+ac_func_list="$ac_func_list alarm"
+ac_func_list="$ac_func_list fpurge"
+ac_func_list="$ac_func_list __fpurge"
+ac_func_list="$ac_func_list snprintf"
+ac_func_list="$ac_func_list vsnprintf"
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+ac_aux_dir=
+for ac_dir in ./support "$srcdir"/./support; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in ./support \"$srcdir\"/./support" >&5
+$as_echo "$as_me: error: cannot find install-sh or install.sh in ./support \"$srcdir\"/./support" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+BASHVERS=4.1
+RELSTATUS=release
+
+case "$RELSTATUS" in
+alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
+*) DEBUG= MALLOC_DEBUG= ;;
+esac
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+{ $as_echo "$as_me:$LINENO: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+$as_echo "$as_me: error: invalid value of canonical build" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:$LINENO: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+$as_echo "$as_me: error: invalid value of canonical host" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+opt_bash_malloc=yes
+opt_purify=no
+opt_purecov=no
+opt_afs=no
+opt_curses=no
+opt_with_installed_readline=no
+
+#htmldir=
+
+case "${host_cpu}-${host_os}" in
+alpha*-*) opt_bash_malloc=no ;; # alpha running osf/1 or linux
+*[Cc]ray*-*) opt_bash_malloc=no ;; # Crays
+*-osf1*) opt_bash_malloc=no ;; # other osf/1 machines
+sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2
+sparc-netbsd*) opt_bash_malloc=no ;; # needs 8-byte alignment
+mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment
+m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir
+sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
+#*-freebsd*-gnu) opt_bash_malloc=no ;; # there's some undetermined problem here
+#*-freebsd*) opt_bash_malloc=no ;; # they claim it's better; I disagree
+*-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment
+*-aix*) opt_bash_malloc=no ;; # AIX machines
+*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep
+*-macos*) opt_bash_malloc=no ;; # Apple MacOS X
+*-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody (MacOS X)
+*-darwin*) opt_bash_malloc=no ;; # Apple Darwin (MacOS X)
+*-dgux*) opt_bash_malloc=no ;; # DG/UX machines
+*-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX 6.x
+*-machten4) opt_bash_malloc=no ;; # MachTen 4.x
+*-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins
+*-beos*) opt_bash_malloc=no ;; # they say it's suitable
+*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment
+*-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft
+esac
+
+# memory scrambling on free()
+case "${host_os}" in
+sco3.2v5*|sco3.2v4*) opt_memscramble=no ;;
+*) opt_memscramble=yes ;;
+esac
+
+
+# Check whether --with-lispdir was given.
+if test "${with_lispdir+set}" = set; then
+ withval=$with_lispdir; lispdir="$withval"
+ { $as_echo "$as_me:$LINENO: checking where .elc files should go" >&5
+$as_echo_n "checking where .elc files should go... " >&6; }
+ { $as_echo "$as_me:$LINENO: result: $lispdir" >&5
+$as_echo "$lispdir" >&6; }
+else
+
+ # If set to t, that means we are running in a shell under Emacs.
+ # If you have an Emacs named "t", then use the full path.
+ test x"$EMACS" = xt && EMACS=
+ for ac_prog in emacs xemacs
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_EMACS+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$EMACS"; then
+ ac_cv_prog_EMACS="$EMACS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_EMACS="$ac_prog"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+EMACS=$ac_cv_prog_EMACS
+if test -n "$EMACS"; then
+ { $as_echo "$as_me:$LINENO: result: $EMACS" >&5
+$as_echo "$EMACS" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$EMACS" && break
+done
+test -n "$EMACS" || EMACS="no"
+
+ if test $EMACS != "no"; then
+ if test x${lispdir+set} != xset; then
+ { $as_echo "$as_me:$LINENO: checking where .elc files should go" >&5
+$as_echo_n "checking where .elc files should go... " >&6; }
+if test "${am_cv_lispdir+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ am_cv_lispdir=`$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' | sed -n -e 's,/$,,' -e '/.*\/lib\/\(x\?emacs\/site-lisp\)$/{s,,${libdir}/\1,;p;q;}' -e '/.*\/share\/\(x\?emacs\/site-lisp\)$/{s,,${datadir}/\1,;p;q;}'`
+ if test -z "$am_cv_lispdir"; then
+ am_cv_lispdir='${datadir}/emacs/site-lisp'
+ fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_lispdir" >&5
+$as_echo "$am_cv_lispdir" >&6; }
+ lispdir="$am_cv_lispdir"
+ fi
+ fi
+
+fi
+
+
+
+
+
+
+# Check whether --with-afs was given.
+if test "${with_afs+set}" = set; then
+ withval=$with_afs; opt_afs=$withval
+fi
+
+
+# Check whether --with-bash-malloc was given.
+if test "${with_bash_malloc+set}" = set; then
+ withval=$with_bash_malloc; opt_bash_malloc=$withval
+fi
+
+
+# Check whether --with-curses was given.
+if test "${with_curses+set}" = set; then
+ withval=$with_curses; opt_curses=$withval
+fi
+
+
+# Check whether --with-gnu-malloc was given.
+if test "${with_gnu_malloc+set}" = set; then
+ withval=$with_gnu_malloc; opt_bash_malloc=$withval
+fi
+
+
+# Check whether --with-installed-readline was given.
+if test "${with_installed_readline+set}" = set; then
+ withval=$with_installed_readline; opt_with_installed_readline=$withval
+fi
+
+
+# Check whether --with-purecov was given.
+if test "${with_purecov+set}" = set; then
+ withval=$with_purecov; opt_purecov=$withval
+fi
+
+
+# Check whether --with-purify was given.
+if test "${with_purify+set}" = set; then
+ withval=$with_purify; opt_purify=$withval
+fi
+
+
+if test "$opt_bash_malloc" = yes; then
+ MALLOC_TARGET=malloc
+ MALLOC_SRC=malloc.c
+
+ MALLOC_LIB='-lmalloc'
+ MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a'
+ MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
+ MALLOC_DEP='$(MALLOC_LIBRARY)'
+
+ cat >>confdefs.h <<\_ACEOF
+#define USING_BASH_MALLOC 1
+_ACEOF
+
+else
+ MALLOC_LIB=
+ MALLOC_LIBRARY=
+ MALLOC_LDFLAGS=
+ MALLOC_DEP=
+fi
+
+if test "$opt_purify" = yes; then
+ PURIFY="purify "
+ cat >>confdefs.h <<\_ACEOF
+#define DISABLE_MALLOC_WRAPPERS 1
+_ACEOF
+
+else
+ PURIFY=
+fi
+
+if test "$opt_purecov" = yes; then
+ PURIFY="${PURIFY}purecov"
+fi
+
+if test "$opt_afs" = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define AFS 1
+_ACEOF
+
+fi
+
+if test "$opt_curses" = yes; then
+ prefer_curses=yes
+fi
+
+if test -z "${DEBUGGER_START_FILE}"; then
+ DEBUGGER_START_FILE='${datadir}/bashdb/bashdb-main.inc'
+fi
+
+opt_minimal_config=no
+
+opt_job_control=yes
+opt_alias=yes
+opt_readline=yes
+opt_history=yes
+opt_bang_history=yes
+opt_dirstack=yes
+opt_restricted=yes
+opt_process_subst=yes
+opt_prompt_decoding=yes
+opt_select=yes
+opt_help=yes
+opt_array_variables=yes
+opt_dparen_arith=yes
+opt_extended_glob=yes
+opt_brace_expansion=yes
+opt_disabled_builtins=no
+opt_command_timing=yes
+opt_xpg_echo=no
+opt_strict_posix=no
+opt_cond_command=yes
+opt_cond_regexp=yes
+opt_coproc=yes
+opt_arith_for_command=yes
+opt_net_redirs=yes
+opt_progcomp=yes
+opt_separate_help=no
+opt_multibyte=yes
+opt_debugger=yes
+opt_single_longdoc_strings=yes
+opt_casemod_attrs=yes
+opt_casemod_expansions=yes
+opt_extglob_default=no
+
+opt_static_link=no
+opt_profiling=no
+
+# Check whether --enable-minimal-config was given.
+if test "${enable_minimal_config+set}" = set; then
+ enableval=$enable_minimal_config; opt_minimal_config=$enableval
+fi
+
+
+if test $opt_minimal_config = yes; then
+ opt_job_control=no opt_alias=no opt_readline=no
+ opt_history=no opt_bang_history=no opt_dirstack=no
+ opt_restricted=no opt_process_subst=no opt_prompt_decoding=no
+ opt_select=no opt_help=no opt_array_variables=no opt_dparen_arith=no
+ opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no
+ opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no
+ opt_net_redirs=no opt_progcomp=no opt_separate_help=no
+ opt_multibyte=yes opt_cond_regexp=no opt_coproc=no
+ opt_casemod_attrs=no opt_casemod_expansions=no opt_extglob_default=no
+fi
+
+# Check whether --enable-alias was given.
+if test "${enable_alias+set}" = set; then
+ enableval=$enable_alias; opt_alias=$enableval
+fi
+
+# Check whether --enable-arith-for-command was given.
+if test "${enable_arith_for_command+set}" = set; then
+ enableval=$enable_arith_for_command; opt_arith_for_command=$enableval
+fi
+
+# Check whether --enable-array-variables was given.
+if test "${enable_array_variables+set}" = set; then
+ enableval=$enable_array_variables; opt_array_variables=$enableval
+fi
+
+# Check whether --enable-bang-history was given.
+if test "${enable_bang_history+set}" = set; then
+ enableval=$enable_bang_history; opt_bang_history=$enableval
+fi
+
+# Check whether --enable-brace-expansion was given.
+if test "${enable_brace_expansion+set}" = set; then
+ enableval=$enable_brace_expansion; opt_brace_expansion=$enableval
+fi
+
+# Check whether --enable-casemod-attributes was given.
+if test "${enable_casemod_attributes+set}" = set; then
+ enableval=$enable_casemod_attributes; opt_casemod_attrs=$enableval
+fi
+
+# Check whether --enable-casemod-expansions was given.
+if test "${enable_casemod_expansions+set}" = set; then
+ enableval=$enable_casemod_expansions; opt_casemod_expansions=$enableval
+fi
+
+# Check whether --enable-command-timing was given.
+if test "${enable_command_timing+set}" = set; then
+ enableval=$enable_command_timing; opt_command_timing=$enableval
+fi
+
+# Check whether --enable-cond-command was given.
+if test "${enable_cond_command+set}" = set; then
+ enableval=$enable_cond_command; opt_cond_command=$enableval
+fi
+
+# Check whether --enable-cond-regexp was given.
+if test "${enable_cond_regexp+set}" = set; then
+ enableval=$enable_cond_regexp; opt_cond_regexp=$enableval
+fi
+
+# Check whether --enable-coprocesses was given.
+if test "${enable_coprocesses+set}" = set; then
+ enableval=$enable_coprocesses; opt_coproc=$enableval
+fi
+
+# Check whether --enable-debugger was given.
+if test "${enable_debugger+set}" = set; then
+ enableval=$enable_debugger; opt_debugger=$enableval
+fi
+
+# Check whether --enable-directory-stack was given.
+if test "${enable_directory_stack+set}" = set; then
+ enableval=$enable_directory_stack; opt_dirstack=$enableval
+fi
+
+# Check whether --enable-disabled-builtins was given.
+if test "${enable_disabled_builtins+set}" = set; then
+ enableval=$enable_disabled_builtins; opt_disabled_builtins=$enableval
+fi
+
+# Check whether --enable-dparen-arithmetic was given.
+if test "${enable_dparen_arithmetic+set}" = set; then
+ enableval=$enable_dparen_arithmetic; opt_dparen_arith=$enableval
+fi
+
+# Check whether --enable-extended-glob was given.
+if test "${enable_extended_glob+set}" = set; then
+ enableval=$enable_extended_glob; opt_extended_glob=$enableval
+fi
+
+# Check whether --enable-extended-glob-default was given.
+if test "${enable_extended_glob_default+set}" = set; then
+ enableval=$enable_extended_glob_default; opt_extglob_default=$enableval
+fi
+
+# Check whether --enable-help-builtin was given.
+if test "${enable_help_builtin+set}" = set; then
+ enableval=$enable_help_builtin; opt_help=$enableval
+fi
+
+# Check whether --enable-history was given.
+if test "${enable_history+set}" = set; then
+ enableval=$enable_history; opt_history=$enableval
+fi
+
+# Check whether --enable-job-control was given.
+if test "${enable_job_control+set}" = set; then
+ enableval=$enable_job_control; opt_job_control=$enableval
+fi
+
+# Check whether --enable-multibyte was given.
+if test "${enable_multibyte+set}" = set; then
+ enableval=$enable_multibyte; opt_multibyte=$enableval
+fi
+
+# Check whether --enable-net-redirections was given.
+if test "${enable_net_redirections+set}" = set; then
+ enableval=$enable_net_redirections; opt_net_redirs=$enableval
+fi
+
+# Check whether --enable-process-substitution was given.
+if test "${enable_process_substitution+set}" = set; then
+ enableval=$enable_process_substitution; opt_process_subst=$enableval
+fi
+
+# Check whether --enable-progcomp was given.
+if test "${enable_progcomp+set}" = set; then
+ enableval=$enable_progcomp; opt_progcomp=$enableval
+fi
+
+# Check whether --enable-prompt-string-decoding was given.
+if test "${enable_prompt_string_decoding+set}" = set; then
+ enableval=$enable_prompt_string_decoding; opt_prompt_decoding=$enableval
+fi
+
+# Check whether --enable-readline was given.
+if test "${enable_readline+set}" = set; then
+ enableval=$enable_readline; opt_readline=$enableval
+fi
+
+# Check whether --enable-restricted was given.
+if test "${enable_restricted+set}" = set; then
+ enableval=$enable_restricted; opt_restricted=$enableval
+fi
+
+# Check whether --enable-select was given.
+if test "${enable_select+set}" = set; then
+ enableval=$enable_select; opt_select=$enableval
+fi
+
+# Check whether --enable-separate-helpfiles was given.
+if test "${enable_separate_helpfiles+set}" = set; then
+ enableval=$enable_separate_helpfiles; opt_separate_help=$enableval
+fi
+
+# Check whether --enable-single-help-strings was given.
+if test "${enable_single_help_strings+set}" = set; then
+ enableval=$enable_single_help_strings; opt_single_longdoc_strings=$enableval
+fi
+
+# Check whether --enable-strict-posix-default was given.
+if test "${enable_strict_posix_default+set}" = set; then
+ enableval=$enable_strict_posix_default; opt_strict_posix=$enableval
+fi
+
+# Check whether --enable-usg-echo-default was given.
+if test "${enable_usg_echo_default+set}" = set; then
+ enableval=$enable_usg_echo_default; opt_xpg_echo=$enableval
+fi
+
+# Check whether --enable-xpg-echo-default was given.
+if test "${enable_xpg_echo_default+set}" = set; then
+ enableval=$enable_xpg_echo_default; opt_xpg_echo=$enableval
+fi
+
+
+# Check whether --enable-mem-scramble was given.
+if test "${enable_mem_scramble+set}" = set; then
+ enableval=$enable_mem_scramble; opt_memscramble=$enableval
+fi
+
+# Check whether --enable-profiling was given.
+if test "${enable_profiling+set}" = set; then
+ enableval=$enable_profiling; opt_profiling=$enableval
+fi
+
+# Check whether --enable-static-link was given.
+if test "${enable_static_link+set}" = set; then
+ enableval=$enable_static_link; opt_static_link=$enableval
+fi
+
+
+
+
+if test $opt_alias = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define ALIAS 1
+_ACEOF
+
+fi
+if test $opt_dirstack = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define PUSHD_AND_POPD 1
+_ACEOF
+
+fi
+if test $opt_restricted = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define RESTRICTED_SHELL 1
+_ACEOF
+
+fi
+if test $opt_process_subst = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define PROCESS_SUBSTITUTION 1
+_ACEOF
+
+fi
+if test $opt_prompt_decoding = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define PROMPT_STRING_DECODE 1
+_ACEOF
+
+fi
+if test $opt_select = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define SELECT_COMMAND 1
+_ACEOF
+
+fi
+if test $opt_help = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HELP_BUILTIN 1
+_ACEOF
+
+fi
+if test $opt_array_variables = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define ARRAY_VARS 1
+_ACEOF
+
+fi
+if test $opt_dparen_arith = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define DPAREN_ARITHMETIC 1
+_ACEOF
+
+fi
+if test $opt_brace_expansion = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define BRACE_EXPANSION 1
+_ACEOF
+
+fi
+if test $opt_disabled_builtins = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define DISABLED_BUILTINS 1
+_ACEOF
+
+fi
+if test $opt_command_timing = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define COMMAND_TIMING 1
+_ACEOF
+
+fi
+if test $opt_xpg_echo = yes ; then
+cat >>confdefs.h <<\_ACEOF
+#define DEFAULT_ECHO_TO_XPG 1
+_ACEOF
+
+fi
+if test $opt_strict_posix = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define STRICT_POSIX 1
+_ACEOF
+
+fi
+if test $opt_extended_glob = yes ; then
+cat >>confdefs.h <<\_ACEOF
+#define EXTENDED_GLOB 1
+_ACEOF
+
+fi
+if test $opt_extglob_default = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define EXTGLOB_DEFAULT 1
+_ACEOF
+
+else
+cat >>confdefs.h <<\_ACEOF
+#define EXTGLOB_DEFAULT 0
+_ACEOF
+
+fi
+if test $opt_cond_command = yes ; then
+cat >>confdefs.h <<\_ACEOF
+#define COND_COMMAND 1
+_ACEOF
+
+fi
+if test $opt_cond_regexp = yes ; then
+cat >>confdefs.h <<\_ACEOF
+#define COND_REGEXP 1
+_ACEOF
+
+fi
+if test $opt_coproc = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define COPROCESS_SUPPORT 1
+_ACEOF
+
+fi
+if test $opt_arith_for_command = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define ARITH_FOR_COMMAND 1
+_ACEOF
+
+fi
+if test $opt_net_redirs = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define NETWORK_REDIRECTIONS 1
+_ACEOF
+
+fi
+if test $opt_progcomp = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define PROGRAMMABLE_COMPLETION 1
+_ACEOF
+
+fi
+if test $opt_multibyte = no; then
+cat >>confdefs.h <<\_ACEOF
+#define NO_MULTIBYTE_SUPPORT 1
+_ACEOF
+
+fi
+if test $opt_debugger = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define DEBUGGER 1
+_ACEOF
+
+fi
+if test $opt_casemod_attrs = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define CASEMOD_ATTRS 1
+_ACEOF
+
+fi
+if test $opt_casemod_expansions = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define CASEMOD_EXPANSIONS 1
+_ACEOF
+
+fi
+
+if test $opt_memscramble = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define MEMSCRAMBLE 1
+_ACEOF
+
+fi
+
+if test "$opt_minimal_config" = yes; then
+ TESTSCRIPT=run-minimal
+else
+ TESTSCRIPT=run-all
+fi
+
+HELPDIR= HELPDIRDEFINE= HELPINSTALL=
+if test "$opt_separate_help" != no; then
+ if test "$opt_separate_help" = "yes" ; then
+ HELPDIR='${datadir}/bash'
+ else
+ HELPDIR=$opt_separate_help
+ fi
+ HELPDIRDEFINE='-H ${HELPDIR}'
+ HELPINSTALL='install-help'
+fi
+HELPSTRINGS=
+if test "$opt_single_longdoc_strings" != "yes"; then
+ HELPSTRINGS='-S'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+echo ""
+echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}"
+echo ""
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+if test -z "$ac_file"; then
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_compiler_gnu=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CFLAGS=""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c89=$ac_arg
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ { $as_echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5
+$as_echo_n "checking for strerror in -lcposix... " >&6; }
+if test "${ac_cv_lib_cposix_strerror+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcposix $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strerror ();
+int
+main ()
+{
+return strerror ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_cposix_strerror=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_cposix_strerror=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cposix_strerror" >&5
+$as_echo "$ac_cv_lib_cposix_strerror" >&6; }
+if test "x$ac_cv_lib_cposix_strerror" = x""yes; then
+ LIBS="$LIBS -lcposix"
+fi
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_stdc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+ if test "${ac_cv_header_minix_config_h+set}" = set; then
+ { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
+$as_echo_n "checking for minix/config.h... " >&6; }
+if test "${ac_cv_header_minix_config_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+$as_echo "$ac_cv_header_minix_config_h" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5
+$as_echo_n "checking minix/config.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <minix/config.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5
+$as_echo_n "checking minix/config.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <minix/config.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to bug-bash@gnu.org ##
+## ------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
+$as_echo_n "checking for minix/config.h... " >&6; }
+if test "${ac_cv_header_minix_config_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_header_minix_config_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
+$as_echo "$ac_cv_header_minix_config_h" >&6; }
+
+fi
+if test "x$ac_cv_header_minix_config_h" = x""yes; then
+ MINIX=yes
+else
+ MINIX=
+fi
+
+
+ if test "$MINIX" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define _POSIX_SOURCE 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _POSIX_1_SOURCE 2
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _MINIX 1
+_ACEOF
+
+ fi
+
+
+
+ { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_safe_to_define___extensions__=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_safe_to_define___extensions__=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ cat >>confdefs.h <<\_ACEOF
+#define __EXTENSIONS__ 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define _ALL_SOURCE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define _GNU_SOURCE 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define _POSIX_PTHREAD_SEMANTICS 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define _TANDEM_SOURCE 1
+_ACEOF
+
+
+
+# Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then
+ enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+ { $as_echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5
+$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
+if test "${ac_cv_sys_largefile_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ CC="$CC -n32"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_largefile_CC=' -n32'; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5
+$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ { $as_echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_file_offset_bits=no; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_file_offset_bits=64; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5
+$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { $as_echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5
+$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
+if test "${ac_cv_sys_large_files+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_large_files=no; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_sys_large_files=1; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5
+$as_echo "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ fi
+fi
+
+
+
+SIGNAMES_O=
+SIGNAMES_H=lsignames.h
+
+
+
+CROSS_COMPILE=
+if test "x$cross_compiling" = "xyes"; then
+ case "${host}" in
+ *-cygwin*)
+ cross_cache=${srcdir}/cross-build/cygwin32.cache
+ ;;
+ *-mingw*)
+ cross_cache=${srcdir}/cross-build/cygwin32.cache
+ ;;
+ i[3456]86-*-beos*)
+ cross_cache=${srcdir}/cross-build/x86-beos.cache
+ ;;
+ *) echo "configure: cross-compiling for $host is not supported" >&2
+ ;;
+ esac
+ if test -n "${cross_cache}" && test -r "${cross_cache}"; then
+ echo "loading cross-build cache file ${cross_cache}"
+ . ${cross_cache}
+ fi
+ unset cross_cache
+ SIGNAMES_O='signames.o'
+ CROSS_COMPILE='-DCROSS_COMPILING'
+
+fi
+
+
+
+if test -z "$CC_FOR_BUILD"; then
+ if test "x$cross_compiling" = "xno"; then
+ CC_FOR_BUILD='$(CC)'
+ else
+ CC_FOR_BUILD=gcc
+ fi
+fi
+
+
+
+test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
+
+test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
+
+if test "$opt_profiling" = "yes"; then
+ PROFILE_FLAGS=-pg
+ case "$host_os" in
+ solaris2*) ;;
+ *) opt_static_link=yes ;;
+ esac
+ DEBUG= MALLOC_DEBUG=
+fi
+
+if test "$opt_static_link" = yes; then
+ # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2
+ if test -n "$GCC" || test "$ac_cv_c_compiler_gnu" = "yes"; then
+ STATIC_LD="-static"
+ case "$host_os" in
+ solaris2*) ;;
+ *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental
+ esac
+ fi
+fi
+
+if test "X$cross_compiling" = "Xno"; then
+ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"}
+ LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'}
+else
+ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""}
+ LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""}
+fi
+
+test -z "$CFLAGS_FOR_BUILD" && CFLAGS_FOR_BUILD="-g"
+
+
+
+
+
+
+
+
+
+
+if test $ac_cv_c_compiler_gnu = yes; then
+ { $as_echo "$as_me:$LINENO: checking whether $CC needs -traditional" >&5
+$as_echo_n "checking whether $CC needs -traditional... " >&6; }
+if test "${ac_cv_prog_gcc_traditional+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_pattern="Autoconf.*'x'"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sgtty.h>
+Autoconf TIOCGETP
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "$ac_pattern" >/dev/null 2>&1; then
+ ac_cv_prog_gcc_traditional=yes
+else
+ ac_cv_prog_gcc_traditional=no
+fi
+rm -f conftest*
+
+
+ if test $ac_cv_prog_gcc_traditional = no; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <termio.h>
+Autoconf TCGETA
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "$ac_pattern" >/dev/null 2>&1; then
+ ac_cv_prog_gcc_traditional=yes
+fi
+rm -f conftest*
+
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_gcc_traditional" >&5
+$as_echo "$ac_cv_prog_gcc_traditional" >&6; }
+ if test $ac_cv_prog_gcc_traditional = yes; then
+ CC="$CC -traditional"
+ fi
+fi
+
+
+
+if test "$opt_readline" = yes && test "$opt_with_installed_readline" != "no"
+then
+ # If the user specified --with-installed-readline=PREFIX and PREFIX
+ # is not `yes', set ac_cv_rl_prefix to PREFIX
+ test $opt_with_installed_readline != "yes" && ac_cv_rl_prefix=$opt_with_installed_readline
+
+
+if test "X$bash_cv_termcap_lib" = "X"; then
+_bash_needmsg=yes
+else
+{ $as_echo "$as_me:$LINENO: checking which library has the termcap functions" >&5
+$as_echo_n "checking which library has the termcap functions... " >&6; }
+_bash_needmsg=
+fi
+if test "${bash_cv_termcap_lib+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ { $as_echo "$as_me:$LINENO: checking for tgetent" >&5
+$as_echo_n "checking for tgetent... " >&6; }
+if test "${ac_cv_func_tgetent+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define tgetent to an innocuous variant, in case <limits.h> declares tgetent.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define tgetent innocuous_tgetent
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char tgetent (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef tgetent
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tgetent ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_tgetent || defined __stub___tgetent
+choke me
+#endif
+
+int
+main ()
+{
+return tgetent ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_tgetent=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_tgetent=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_tgetent" >&5
+$as_echo "$ac_cv_func_tgetent" >&6; }
+if test "x$ac_cv_func_tgetent" = x""yes; then
+ bash_cv_termcap_lib=libc
+else
+ { $as_echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5
+$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
+if test "${ac_cv_lib_termcap_tgetent+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltermcap $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tgetent ();
+int
+main ()
+{
+return tgetent ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_termcap_tgetent=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_termcap_tgetent=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5
+$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
+if test "x$ac_cv_lib_termcap_tgetent" = x""yes; then
+ bash_cv_termcap_lib=libtermcap
+else
+ { $as_echo "$as_me:$LINENO: checking for tgetent in -ltinfo" >&5
+$as_echo_n "checking for tgetent in -ltinfo... " >&6; }
+if test "${ac_cv_lib_tinfo_tgetent+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltinfo $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tgetent ();
+int
+main ()
+{
+return tgetent ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_tinfo_tgetent=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_tinfo_tgetent=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_tinfo_tgetent" >&5
+$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; }
+if test "x$ac_cv_lib_tinfo_tgetent" = x""yes; then
+ bash_cv_termcap_lib=libtinfo
+else
+ { $as_echo "$as_me:$LINENO: checking for tgetent in -lcurses" >&5
+$as_echo_n "checking for tgetent in -lcurses... " >&6; }
+if test "${ac_cv_lib_curses_tgetent+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcurses $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tgetent ();
+int
+main ()
+{
+return tgetent ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_curses_tgetent=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_curses_tgetent=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_curses_tgetent" >&5
+$as_echo "$ac_cv_lib_curses_tgetent" >&6; }
+if test "x$ac_cv_lib_curses_tgetent" = x""yes; then
+ bash_cv_termcap_lib=libcurses
+else
+ { $as_echo "$as_me:$LINENO: checking for tgetent in -lncurses" >&5
+$as_echo_n "checking for tgetent in -lncurses... " >&6; }
+if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lncurses $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tgetent ();
+int
+main ()
+{
+return tgetent ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_ncurses_tgetent=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_ncurses_tgetent=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tgetent" >&5
+$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
+if test "x$ac_cv_lib_ncurses_tgetent" = x""yes; then
+ bash_cv_termcap_lib=libncurses
+else
+ bash_cv_termcap_lib=gnutermcap
+fi
+
+fi
+
+fi
+
+fi
+
+fi
+
+fi
+
+if test "X$_bash_needmsg" = "Xyes"; then
+{ $as_echo "$as_me:$LINENO: checking which library has the termcap functions" >&5
+$as_echo_n "checking which library has the termcap functions... " >&6; }
+fi
+{ $as_echo "$as_me:$LINENO: result: using $bash_cv_termcap_lib" >&5
+$as_echo "using $bash_cv_termcap_lib" >&6; }
+if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
+LDFLAGS="$LDFLAGS -L./lib/termcap"
+TERMCAP_LIB="./lib/termcap/libtermcap.a"
+TERMCAP_DEP="./lib/termcap/libtermcap.a"
+elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
+TERMCAP_LIB=-ltermcap
+TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libtinfo; then
+TERMCAP_LIB=-ltinfo
+TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libncurses; then
+TERMCAP_LIB=-lncurses
+TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libc; then
+TERMCAP_LIB=
+TERMCAP_DEP=
+else
+TERMCAP_LIB=-lcurses
+TERMCAP_DEP=
+fi
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking version of installed readline library" >&5
+$as_echo_n "checking version of installed readline library... " >&6; }
+
+# What a pain in the ass this is.
+
+# save cpp and ld options
+_save_CFLAGS="$CFLAGS"
+_save_LDFLAGS="$LDFLAGS"
+_save_LIBS="$LIBS"
+
+# Don't set ac_cv_rl_prefix if the caller has already assigned a value. This
+# allows the caller to do something like $_rl_prefix=$withval if the user
+# specifies --with-installed-readline=PREFIX as an argument to configure
+
+if test -z "$ac_cv_rl_prefix"; then
+test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix}
+fi
+
+eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include
+eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib
+
+LIBS="$LIBS -lreadline ${TERMCAP_LIB}"
+CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}"
+LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}"
+
+if test "${ac_cv_rl_version+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_rl_version='4.2'
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <readline/readline.h>
+
+extern int rl_gnu_readline_p;
+
+main()
+{
+ FILE *fp;
+ fp = fopen("conftest.rlv", "w");
+ if (fp == 0)
+ exit(1);
+ if (rl_gnu_readline_p != 1)
+ fprintf(fp, "0.0\n");
+ else
+ fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0");
+ fclose(fp);
+ exit(0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_rl_version=`cat conftest.rlv`
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_rl_version='0.0'
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+
+CFLAGS="$_save_CFLAGS"
+LDFLAGS="$_save_LDFLAGS"
+LIBS="$_save_LIBS"
+
+RL_MAJOR=0
+RL_MINOR=0
+
+# (
+case "$ac_cv_rl_version" in
+2*|3*|4*|5*|6*|7*|8*|9*)
+ RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'`
+ RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[a-zA-Z]*$::'`
+ ;;
+esac
+
+# (((
+case $RL_MAJOR in
+[0-9][0-9]) _RL_MAJOR=$RL_MAJOR ;;
+[0-9]) _RL_MAJOR=0$RL_MAJOR ;;
+*) _RL_MAJOR=00 ;;
+esac
+
+# (((
+case $RL_MINOR in
+[0-9][0-9]) _RL_MINOR=$RL_MINOR ;;
+[0-9]) _RL_MINOR=0$RL_MINOR ;;
+*) _RL_MINOR=00 ;;
+esac
+
+RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}"
+
+# Readline versions greater than 4.2 have these defines in readline.h
+
+if test $ac_cv_rl_version = '0.0' ; then
+ { $as_echo "$as_me:$LINENO: WARNING: Could not test version of installed readline library." >&5
+$as_echo "$as_me: WARNING: Could not test version of installed readline library." >&2;}
+elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then
+ # set these for use by the caller
+ RL_PREFIX=$ac_cv_rl_prefix
+ RL_LIBDIR=$ac_cv_rl_libdir
+ RL_INCLUDEDIR=$ac_cv_rl_includedir
+ { $as_echo "$as_me:$LINENO: result: $ac_cv_rl_version" >&5
+$as_echo "$ac_cv_rl_version" >&6; }
+else
+
+
+cat >>confdefs.h <<_ACEOF
+#define RL_READLINE_VERSION $RL_VERSION
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define RL_VERSION_MAJOR $RL_MAJOR
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define RL_VERSION_MINOR $RL_MINOR
+_ACEOF
+
+
+
+
+
+
+# set these for use by the caller
+RL_PREFIX=$ac_cv_rl_prefix
+RL_LIBDIR=$ac_cv_rl_libdir
+RL_INCLUDEDIR=$ac_cv_rl_includedir
+
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_rl_version" >&5
+$as_echo "$ac_cv_rl_version" >&6; }
+
+fi
+
+
+ case "$ac_cv_rl_version" in
+ 5*|6*|7*|8*|9*) ;;
+ *) opt_with_installed_readline=no
+ { $as_echo "$as_me:$LINENO: WARNING: installed readline library is too old to be linked with bash" >&5
+$as_echo "$as_me: WARNING: installed readline library is too old to be linked with bash" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: using private bash version" >&5
+$as_echo "$as_me: WARNING: using private bash version" >&2;}
+ ;;
+ esac
+fi
+
+TILDE_LIB=-ltilde
+if test $opt_readline = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define READLINE 1
+_ACEOF
+
+ if test "$opt_with_installed_readline" != "no" ; then
+ case "$opt_with_installed_readline" in
+ yes) RL_INCLUDE= ;;
+ *) case "$RL_INCLUDEDIR" in
+ /usr/include) ;;
+ *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
+ esac
+ ;;
+ esac
+ READLINE_DEP=
+ READLINE_LIB=-lreadline
+ # section for OS versions that don't allow unresolved symbols
+ # to be compiled into dynamic libraries.
+ case "$host_os" in
+ cygwin*) TILDE_LIB= ;;
+ esac
+ else
+ RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
+ READLINE_DEP='$(READLINE_LIBRARY)'
+ # section for OS versions that ship an older/broken version of
+ # readline as a standard dynamic library and don't allow a
+ # static version specified as -llibname to override the
+ # dynamic version
+ case "${host_os}" in
+ darwin[89]*|darwin10*) READLINE_LIB='${READLINE_LIBRARY}' ;;
+ *) READLINE_LIB=-lreadline ;;
+ esac
+ fi
+else
+ RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
+ READLINE_LIB= READLINE_DEP=
+fi
+if test $opt_history = yes || test $opt_bang_history = yes; then
+ if test $opt_history = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HISTORY 1
+_ACEOF
+
+ fi
+ if test $opt_bang_history = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define BANG_HISTORY 1
+_ACEOF
+
+ fi
+ if test "$opt_with_installed_readline" != "no"; then
+ HIST_LIBDIR=$RL_LIBDIR
+ HISTORY_DEP=
+ HISTORY_LIB=-lhistory
+ case "$opt_with_installed_readline" in
+ yes) RL_INCLUDE= ;;
+ *) case "$RL_INCLUDEDIR" in
+ /usr/include) ;;
+ *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
+ esac
+ ;;
+ esac
+ else
+ HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
+ HISTORY_DEP='$(HISTORY_LIBRARY)'
+ # section for OS versions that ship an older version of
+ # readline as a standard dynamic library and don't allow a
+ # static version specified as -llibname to override the
+ # dynamic version
+ case "${host_os}" in
+ darwin[89]*|darwin10*) HISTORY_LIB='${HISTORY_LIBRARY}' ;;
+ *) HISTORY_LIB=-lhistory ;;
+ esac
+ fi
+else
+ HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
+ HISTORY_LIB= HISTORY_DEP=
+fi
+
+
+
+
+
+
+
+
+
+
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+# Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR=""
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:$LINENO: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+test -n "$ARFLAGS" || ARFLAGS="cr"
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+for ac_prog in 'bison -y' byacc
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_YACC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$YACC"; then
+ ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_YACC="$ac_prog"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+ { $as_echo "$as_me:$LINENO: result: $YACC" >&5
+$as_echo "$YACC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+case "$host_os" in
+opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
+*) MAKE_SHELL=/bin/sh ;;
+esac
+
+
+if test x$SIZE = x; then
+ if test x$ac_tool_prefix = x; then
+ SIZE=size
+ else
+ SIZE=${ac_tool_prefix}size
+ save_IFS=$IFS ; IFS=:
+ size_found=0
+ for dir in $PATH; do
+ if test -x $dir/$SIZE ; then
+ size_found=1
+ break
+ fi
+ done
+ if test $size_found -eq 0; then
+ SIZE=:
+ fi
+ IFS=$save_IFS
+ fi
+fi
+
+
+cat >>confdefs.h <<\_ACEOF
+#define _GNU_SOURCE 1
+_ACEOF
+
+
+{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if test "${ac_cv_c_const+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset cs;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ if (s) return 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ if (!foo) return 0;
+ }
+ return !cs[0] && !zero.x;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_const=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_c_const=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define const /**/
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if test "${ac_cv_c_inline+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_inline=$ac_kw
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
+
+
+ { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if test "${ac_cv_c_bigendian+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are some -arch flags. Note that *ppc* also matches
+ # ppc64. This check is also rather less than ideal.
+ case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #(
+ *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
+ esac
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_bigendian=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_c_bigendian=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_bigendian=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_c_bigendian=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then
+ # Try to guess by grepping values from an object file.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_bigendian=no
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+ yes)
+ cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+;; #(
+ no)
+ ;; #(
+ universal)
+
+cat >>confdefs.h <<\_ACEOF
+#define AC_APPLE_UNIVERSAL_BUILD 1
+_ACEOF
+
+ ;; #(
+ *)
+ { { $as_echo "$as_me:$LINENO: error: unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+$as_echo "$as_me: error: unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+
+{ $as_echo "$as_me:$LINENO: checking for preprocessor stringizing operator" >&5
+$as_echo_n "checking for preprocessor stringizing operator... " >&6; }
+if test "${ac_cv_c_stringize+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#define x(y) #y
+
+char *s = x(teststring);
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "#teststring" >/dev/null 2>&1; then
+ ac_cv_c_stringize=no
+else
+ ac_cv_c_stringize=yes
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stringize" >&5
+$as_echo "$ac_cv_c_stringize" >&6; }
+if test $ac_cv_c_stringize = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRINGIZE 1
+_ACEOF
+
+fi
+
+
+
+ { $as_echo "$as_me:$LINENO: checking for long double with more range or precision than double" >&5
+$as_echo_n "checking for long double with more range or precision than double... " >&6; }
+if test "${ac_cv_type_long_double_wider+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <float.h>
+ long double const a[] =
+ {
+ 0.0L, DBL_MIN, DBL_MAX, DBL_EPSILON,
+ LDBL_MIN, LDBL_MAX, LDBL_EPSILON
+ };
+ long double
+ f (long double x)
+ {
+ return ((x + (unsigned long int) 10) * (-1 / x) + a[0]
+ + (x ? f (x) : 'c'));
+ }
+
+int
+main ()
+{
+static int test_array [1 - 2 * !((0 < ((DBL_MAX_EXP < LDBL_MAX_EXP)
+ + (DBL_MANT_DIG < LDBL_MANT_DIG)
+ - (LDBL_MAX_EXP < DBL_MAX_EXP)
+ - (LDBL_MANT_DIG < DBL_MANT_DIG)))
+ && (int) LDBL_EPSILON == 0
+ )];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_long_double_wider=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_long_double_wider=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_double_wider" >&5
+$as_echo "$ac_cv_type_long_double_wider" >&6; }
+ if test $ac_cv_type_long_double_wider = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_DOUBLE_WIDER 1
+_ACEOF
+
+ fi
+
+ ac_cv_c_long_double=$ac_cv_type_long_double_wider
+ if test $ac_cv_c_long_double = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_DOUBLE 1
+_ACEOF
+
+ fi
+
+{ $as_echo "$as_me:$LINENO: checking for function prototypes" >&5
+$as_echo_n "checking for function prototypes... " >&6; }
+if test "$ac_cv_prog_cc_c89" != no; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+cat >>confdefs.h <<\_ACEOF
+#define PROTOTYPES 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define __PROTOTYPES 1
+_ACEOF
+
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5
+$as_echo_n "checking whether char is unsigned... " >&6; }
+if test "${ac_cv_c_char_unsigned+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((char) -1) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_char_unsigned=no
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_c_char_unsigned=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
+$as_echo "$ac_cv_c_char_unsigned" >&6; }
+if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define __CHAR_UNSIGNED__ 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5
+$as_echo_n "checking for working volatile... " >&6; }
+if test "${ac_cv_c_volatile+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+volatile int x;
+int * volatile y = (int *) 0;
+return !x && !y;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_volatile=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_c_volatile=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_volatile" >&5
+$as_echo "$ac_cv_c_volatile" >&6; }
+if test $ac_cv_c_volatile = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define volatile /**/
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for C/C++ restrict keyword" >&5
+$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
+if test "${ac_cv_c_restrict+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_restrict=no
+ # The order here caters to the fact that C++ does not require restrict.
+ for ac_kw in __restrict __restrict__ _Restrict restrict; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+typedef int * int_ptr;
+ int foo (int_ptr $ac_kw ip) {
+ return ip[0];
+ }
+int
+main ()
+{
+int s[1];
+ int * $ac_kw t = s;
+ t[0] = 0;
+ return foo(t)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_restrict=$ac_kw
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_restrict" != no && break
+ done
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_restrict" >&5
+$as_echo "$ac_cv_c_restrict" >&6; }
+
+
+ case $ac_cv_c_restrict in
+ restrict) ;;
+ no) cat >>confdefs.h <<\_ACEOF
+#define restrict /**/
+_ACEOF
+ ;;
+ *) cat >>confdefs.h <<_ACEOF
+#define restrict $ac_cv_c_restrict
+_ACEOF
+ ;;
+ esac
+
+
+
+ MKINSTALLDIRS=
+ if test -n "$ac_aux_dir"; then
+ case "$ac_aux_dir" in
+ /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
+ *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
+ esac
+ fi
+ if test -z "$MKINSTALLDIRS"; then
+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+ fi
+
+
+
+ { $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+ # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then
+ enableval=$enable_nls; USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+
+
+
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case "$MSGFMT" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
+ { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+ { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case "$XGETTEXT" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+ { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ rm -f messages.po
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case "$MSGMERGE" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ if $ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1; then
+ ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+ ;;
+esac
+fi
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+ { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+$as_echo "$MSGMERGE" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "$GMSGFMT" != ":"; then
+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
+ { $as_echo "$as_me:$LINENO: result: found $GMSGFMT program is not GNU msgfmt; ignore it" >&5
+$as_echo "found $GMSGFMT program is not GNU msgfmt; ignore it" >&6; }
+ GMSGFMT=":"
+ fi
+ fi
+
+ if test "$XGETTEXT" != ":"; then
+ if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
+ (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ : ;
+ else
+ { $as_echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5
+$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
+ XGETTEXT=":"
+ fi
+ rm -f messages.po
+ fi
+
+ ac_config_commands="$ac_config_commands default-1"
+
+
+{ $as_echo "$as_me:$LINENO: checking for off_t" >&5
+$as_echo_n "checking for off_t... " >&6; }
+if test "${ac_cv_type_off_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_off_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (off_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((off_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_off_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
+$as_echo "$ac_cv_type_off_t" >&6; }
+if test "x$ac_cv_type_off_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define off_t long int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
+$as_echo_n "checking for size_t... " >&6; }
+if test "${ac_cv_type_size_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_size_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (size_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((size_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_size_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+$as_echo "$ac_cv_type_size_t" >&6; }
+if test "x$ac_cv_type_size_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+{ $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if test "${ac_cv_working_alloca_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_working_alloca_h=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_working_alloca_h=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA_H 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if test "${ac_cv_func_alloca_works+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_alloca_works=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_alloca_works=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
+
+else
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+cat >>confdefs.h <<\_ACEOF
+#define C_ALLOCA 1
+_ACEOF
+
+
+{ $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if test "${ac_cv_os_cray+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "webecray" >/dev/null 2>&1; then
+ ac_cv_os_cray=yes
+else
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+ break
+fi
+
+ done
+fi
+
+{ $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if test "${ac_cv_c_stack_direction+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+
+int
+main ()
+{
+ return find_stack_direction () < 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_stack_direction=1
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_stack_direction=-1
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+
+
+for ac_header in stdlib.h unistd.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to bug-bash@gnu.org ##
+## ------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_func in getpagesize
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:$LINENO: checking for working mmap" >&5
+$as_echo_n "checking for working mmap... " >&6; }
+if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+/* malloc might have been renamed as rpl_malloc. */
+#undef malloc
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the file system buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propagated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
+
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
+char *malloc ();
+#endif
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+/* Assume that all systems that can run configure have sys/param.h. */
+# ifndef HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+int
+main ()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize ();
+
+ /* First, make a file with some known garbage in it. */
+ data = (char *) malloc (pagesize);
+ if (!data)
+ return 1;
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand ();
+ umask (0);
+ fd = creat ("conftest.mmap", 0600);
+ if (fd < 0)
+ return 1;
+ if (write (fd, data, pagesize) != pagesize)
+ return 1;
+ close (fd);
+
+ /* Next, try to mmap the file at a fixed address which already has
+ something else allocated at it. If we can, also make sure that
+ we see the same garbage. */
+ fd = open ("conftest.mmap", O_RDWR);
+ if (fd < 0)
+ return 1;
+ data2 = (char *) malloc (2 * pagesize);
+ if (!data2)
+ return 1;
+ data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ return 1;
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ return 1;
+
+ /* Finally, make sure that changes to the mapped area do not
+ percolate back to the file as seen by read(). (This is a bug on
+ some variants of i386 svr4.0.) */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = (char *) malloc (pagesize);
+ if (!data3)
+ return 1;
+ if (read (fd, data3, pagesize) != pagesize)
+ return 1;
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ return 1;
+ close (fd);
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_mmap_fixed_mapped=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
+$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MMAP 1
+_ACEOF
+
+fi
+rm -f conftest.mmap
+
+
+ { $as_echo "$as_me:$LINENO: checking whether we are using the GNU C Library 2.1 or newer" >&5
+$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; }
+if test "${ac_cv_gnu_library_2_1+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Lucky GNU user" >/dev/null 2>&1; then
+ ac_cv_gnu_library_2_1=yes
+else
+ ac_cv_gnu_library_2_1=no
+fi
+rm -f conftest*
+
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_gnu_library_2_1" >&5
+$as_echo "$ac_cv_gnu_library_2_1" >&6; }
+
+ GLIBC21="$ac_cv_gnu_library_2_1"
+
+
+
+
+ { $as_echo "$as_me:$LINENO: checking whether integer division by zero raises SIGFPE" >&5
+$as_echo_n "checking whether integer division by zero raises SIGFPE... " >&6; }
+if test "${gt_cv_int_divbyzero_sigfpe+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then
+
+ # Guess based on the CPU.
+ case "$host_cpu" in
+ alpha* | i3456786 | m68k | s390*)
+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
+ *)
+ gt_cv_int_divbyzero_sigfpe="guessing no";;
+ esac
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+#ifdef __cplusplus
+sigfpe_handler (int sig)
+#else
+sigfpe_handler (sig) int sig;
+#endif
+{
+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
+ exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+ signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+ signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL. */
+#if defined (__sparc__) && defined (__linux__)
+ signal (SIGILL, sigfpe_handler);
+#endif
+
+ z = x / y;
+ nan = y / y;
+ exit (1);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ gt_cv_int_divbyzero_sigfpe=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+gt_cv_int_divbyzero_sigfpe=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_int_divbyzero_sigfpe" >&5
+$as_echo "$gt_cv_int_divbyzero_sigfpe" >&6; }
+ case "$gt_cv_int_divbyzero_sigfpe" in
+ *yes) value=1;;
+ *) value=0;;
+ esac
+
+cat >>confdefs.h <<_ACEOF
+#define INTDIV0_RAISES_SIGFPE $value
+_ACEOF
+
+
+
+ { $as_echo "$as_me:$LINENO: checking for inttypes.h" >&5
+$as_echo_n "checking for inttypes.h... " >&6; }
+if test "${jm_ac_cv_header_inttypes_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <inttypes.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ jm_ac_cv_header_inttypes_h=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ jm_ac_cv_header_inttypes_h=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $jm_ac_cv_header_inttypes_h" >&5
+$as_echo "$jm_ac_cv_header_inttypes_h" >&6; }
+ if test $jm_ac_cv_header_inttypes_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INTTYPES_H_WITH_UINTMAX 1
+_ACEOF
+
+ fi
+
+
+ { $as_echo "$as_me:$LINENO: checking for stdint.h" >&5
+$as_echo_n "checking for stdint.h... " >&6; }
+if test "${jm_ac_cv_header_stdint_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <stdint.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ jm_ac_cv_header_stdint_h=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ jm_ac_cv_header_stdint_h=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $jm_ac_cv_header_stdint_h" >&5
+$as_echo "$jm_ac_cv_header_stdint_h" >&6; }
+ if test $jm_ac_cv_header_stdint_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STDINT_H_WITH_UINTMAX 1
+_ACEOF
+
+ fi
+
+
+ { $as_echo "$as_me:$LINENO: checking for unsigned long long" >&5
+$as_echo_n "checking for unsigned long long... " >&6; }
+if test "${ac_cv_type_unsigned_long_long+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+unsigned long long ull = 1; int i = 63;
+int
+main ()
+{
+unsigned long long ullmax = (unsigned long long) -1;
+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_type_unsigned_long_long=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_unsigned_long_long=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5
+$as_echo "$ac_cv_type_unsigned_long_long" >&6; }
+ if test $ac_cv_type_unsigned_long_long = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UNSIGNED_LONG_LONG 1
+_ACEOF
+
+ fi
+
+
+
+
+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
+
+ test $ac_cv_type_unsigned_long_long = yes \
+ && ac_type='unsigned long long' \
+ || ac_type='unsigned long'
+
+cat >>confdefs.h <<_ACEOF
+#define uintmax_t $ac_type
+_ACEOF
+
+ else
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UINTMAX_T 1
+_ACEOF
+
+ fi
+
+
+ { $as_echo "$as_me:$LINENO: checking for inttypes.h" >&5
+$as_echo_n "checking for inttypes.h... " >&6; }
+if test "${gt_cv_header_inttypes_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <inttypes.h>
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ gt_cv_header_inttypes_h=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gt_cv_header_inttypes_h=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_header_inttypes_h" >&5
+$as_echo "$gt_cv_header_inttypes_h" >&6; }
+ if test $gt_cv_header_inttypes_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INTTYPES_H 1
+_ACEOF
+
+ fi
+
+
+
+ if test $gt_cv_header_inttypes_h = yes; then
+ { $as_echo "$as_me:$LINENO: checking whether the inttypes.h PRIxNN macros are broken" >&5
+$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
+if test "${gt_cv_inttypes_pri_broken+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ gt_cv_inttypes_pri_broken=no
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gt_cv_inttypes_pri_broken=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_inttypes_pri_broken" >&5
+$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
+ fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define PRI_MACROS_BROKEN 1
+_ACEOF
+
+ fi
+
+
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5
+$as_echo_n "checking for ld used by GCC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${acl_cv_path_LD+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+ test "$with_gnu_ld" != no && break
+ else
+ test "$with_gnu_ld" != yes && break
+ fi
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:$LINENO: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${acl_cv_prog_gnu_ld+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
+ acl_cv_prog_gnu_ld=yes
+else
+ acl_cv_prog_gnu_ld=no
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
+$as_echo "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+ { $as_echo "$as_me:$LINENO: checking for shared library run path origin" >&5
+$as_echo_n "checking for shared library run path origin... " >&6; }
+if test "${acl_cv_rpath+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
+$as_echo "$acl_cv_rpath" >&6; }
+ wl="$acl_cv_wl"
+ libext="$acl_cv_libext"
+ shlibext="$acl_cv_shlibext"
+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ hardcode_direct="$acl_cv_hardcode_direct"
+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then
+ enableval=$enable_rpath; :
+else
+ enable_rpath=yes
+fi
+
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+ withval=$with_libiconv_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+
+fi
+
+ LIBICONV=
+ LTLIBICONV=
+ INCICONV=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='iconv '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$hardcode_direct" = yes; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */lib | */lib/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+stdlib.h string.h unistd.h sys/param.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to bug-bash@gnu.org ##
+## ------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in feof_unlocked fgets_unlocked getc_unlocked getcwd getegid \
+geteuid getgid getuid mempcpy munmap putenv setenv setlocale localeconv stpcpy \
+strcasecmp strdup strtoul tsearch __argz_count __argz_stringify __argz_next \
+__fsetlocking
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+
+ am_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCICONV; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ { $as_echo "$as_me:$LINENO: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
+if test "${am_cv_func_iconv+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ am_cv_func_iconv=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$am_save_LIBS"
+ fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
+$as_echo "$am_cv_func_iconv" >&6; }
+ if test "$am_cv_func_iconv" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ICONV 1
+_ACEOF
+
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ { $as_echo "$as_me:$LINENO: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+ { $as_echo "$as_me:$LINENO: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
+ else
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+
+
+
+ if test "$am_cv_func_iconv" = yes; then
+ { $as_echo "$as_me:$LINENO: checking for iconv declaration" >&5
+$as_echo_n "checking for iconv declaration... " >&6; }
+ if test "${am_cv_proto_iconv+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ am_cv_proto_iconv_arg1=""
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ am_cv_proto_iconv_arg1="const"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
+fi
+
+ am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ { $as_echo "$as_me:$LINENO: result: ${ac_t:-
+ }$am_cv_proto_iconv" >&5
+$as_echo "${ac_t:-
+ }$am_cv_proto_iconv" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define ICONV_CONST $am_cv_proto_iconv_arg1
+_ACEOF
+
+ fi
+
+
+ { $as_echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
+$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
+if test "${am_cv_langinfo_codeset+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <langinfo.h>
+int
+main ()
+{
+char* cs = nl_langinfo(CODESET);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ am_cv_langinfo_codeset=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ am_cv_langinfo_codeset=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_langinfo_codeset" >&5
+$as_echo "$am_cv_langinfo_codeset" >&6; }
+ if test $am_cv_langinfo_codeset = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LANGINFO_CODESET 1
+_ACEOF
+
+ fi
+
+ if test $ac_cv_header_locale_h = yes; then
+
+ { $as_echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5
+$as_echo_n "checking for LC_MESSAGES... " >&6; }
+if test "${am_cv_val_LC_MESSAGES+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <locale.h>
+int
+main ()
+{
+return LC_MESSAGES
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ am_cv_val_LC_MESSAGES=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ am_cv_val_LC_MESSAGES=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5
+$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
+ if test $am_cv_val_LC_MESSAGES = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LC_MESSAGES 1
+_ACEOF
+
+ fi
+
+ fi
+
+ for ac_prog in bison
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_INTLBISON+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$INTLBISON"; then
+ ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_INTLBISON="$ac_prog"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+INTLBISON=$ac_cv_prog_INTLBISON
+if test -n "$INTLBISON"; then
+ { $as_echo "$as_me:$LINENO: result: $INTLBISON" >&5
+$as_echo "$INTLBISON" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$INTLBISON" && break
+done
+
+ if test -z "$INTLBISON"; then
+ ac_verc_fail=yes
+ else
+ { $as_echo "$as_me:$LINENO: checking version of bison" >&5
+$as_echo_n "checking version of bison... " >&6; }
+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ esac
+ { $as_echo "$as_me:$LINENO: result: $ac_prog_version" >&5
+$as_echo "$ac_prog_version" >&6; }
+ fi
+ if test $ac_verc_fail = yes; then
+ INTLBISON=:
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+ # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then
+ enableval=$enable_nls; USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+
+
+
+
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+
+ { $as_echo "$as_me:$LINENO: checking whether included gettext is requested" >&5
+$as_echo_n "checking whether included gettext is requested... " >&6; }
+
+# Check whether --with-included-gettext was given.
+if test "${with_included_gettext+set}" = set; then
+ withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval
+else
+ nls_cv_force_use_gnu_gettext=no
+fi
+
+ { $as_echo "$as_me:$LINENO: result: $nls_cv_force_use_gnu_gettext" >&5
+$as_echo "$nls_cv_force_use_gnu_gettext" >&6; }
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+
+
+
+
+
+
+ { $as_echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5
+$as_echo_n "checking for GNU gettext in libc... " >&6; }
+if test "${gt_cv_func_gnugettext2_libc+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <libintl.h>
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+int
+main ()
+{
+bindtextdomain ("", "");
+return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_domain_bindings
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ gt_cv_func_gnugettext2_libc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gt_cv_func_gnugettext2_libc=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext2_libc" >&5
+$as_echo "$gt_cv_func_gnugettext2_libc" >&6; }
+
+ if test "$gt_cv_func_gnugettext2_libc" != "yes"; then
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-libintl-prefix was given.
+if test "${with_libintl_prefix+set}" = set; then
+ withval=$with_libintl_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/lib"
+ fi
+ fi
+
+fi
+
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='intl '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_dir="$additional_libdir"
+ found_so="$additional_libdir/lib$name.$shlibext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
+ found_dir="$dir"
+ found_so="$dir/lib$name.$shlibext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$hardcode_direct" = yes; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */lib | */lib/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/lib"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/lib"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
+ done
+ fi
+
+ { $as_echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5
+$as_echo_n "checking for GNU gettext in libintl... " >&6; }
+if test "${gt_cv_func_gnugettext2_libintl+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <libintl.h>
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();
+int
+main ()
+{
+bindtextdomain ("", "");
+return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias (0)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ gt_cv_func_gnugettext2_libintl=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gt_cv_func_gnugettext2_libintl=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$gt_cv_func_gnugettext2_libintl" != yes && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <libintl.h>
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias ();
+int
+main ()
+{
+bindtextdomain ("", "");
+return (int) gettext ("") + (int) ngettext ("", "", 0) + _nl_msg_cat_cntr + *_nl_expand_alias (0)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ gt_cv_func_gnugettext2_libintl=yes
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_gnugettext2_libintl" >&5
+$as_echo "$gt_cv_func_gnugettext2_libintl" >&6; }
+ fi
+
+ if test "$gt_cv_func_gnugettext2_libc" = "yes" \
+ || { test "$gt_cv_func_gnugettext2_libintl" = "yes" \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+
+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ LIBINTL="lib/intl/libintl.a $LIBICONV"
+ LTLIBINTL="lib/intl/libintl.a $LTLIBICONV"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ CATOBJEXT=.gmo
+ fi
+
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_NLS 1
+_ACEOF
+
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ { $as_echo "$as_me:$LINENO: checking whether to use NLS" >&5
+$as_echo_n "checking whether to use NLS... " >&6; }
+ { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+ if test "$USE_NLS" = "yes"; then
+ { $as_echo "$as_me:$LINENO: checking where the gettext function comes from" >&5
+$as_echo_n "checking where the gettext function comes from... " >&6; }
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ { $as_echo "$as_me:$LINENO: result: $gt_source" >&5
+$as_echo "$gt_source" >&6; }
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if test "$gt_cv_func_gnugettext2_libintl" = "yes"; then
+ { $as_echo "$as_me:$LINENO: checking how to link with libintl" >&5
+$as_echo_n "checking how to link with libintl... " >&6; }
+ { $as_echo "$as_me:$LINENO: result: $LIBINTL" >&5
+$as_echo "$LIBINTL" >&6; }
+
+ for element in $INCINTL; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+ fi
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETTEXT 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DCGETTEXT 1
+_ACEOF
+
+ fi
+
+ POSUB=po
+ fi
+
+
+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+ BUILD_INCLUDED_LIBINTL=yes
+ fi
+
+
+
+
+
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+
+ DATADIRNAME=share
+
+
+ INSTOBJEXT=.mo
+
+
+ GENCAT=gencat
+
+
+ if test "$USE_INCLUDED_LIBINTL" = yes; then
+ INTLOBJS="\$(GETTOBJS)"
+ fi
+
+
+ INTL_LIBTOOL_SUFFIX_PREFIX=
+
+
+
+ INTLLIBS="$LIBINTL"
+
+
+
+
+
+
+
+
+
+
+
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+ { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if test "${ac_cv_search_opendir+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dir; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_search_opendir=$ac_res
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ if test "${ac_cv_search_opendir+set}" = set; then
+ break
+fi
+done
+if test "${ac_cv_search_opendir+set}" = set; then
+ :
+else
+ ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+else
+ { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if test "${ac_cv_search_opendir+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' x; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_search_opendir=$ac_res
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ if test "${ac_cv_search_opendir+set}" = set; then
+ break
+fi
+done
+if test "${ac_cv_search_opendir+set}" = set; then
+ :
+else
+ ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if test "${ac_cv_header_time+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_time=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_time=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TIME_WITH_SYS_TIME 1
+_ACEOF
+
+fi
+
+
+
+
+for ac_header in inttypes.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to bug-bash@gnu.org ##
+## ------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \
+ memory.h locale.h termcap.h termio.h termios.h dlfcn.h \
+ stddef.h stdint.h netdb.h pwd.h grp.h strings.h regex.h \
+ syslog.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to bug-bash@gnu.org ##
+## ------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in sys/pte.h sys/stream.h sys/select.h sys/file.h \
+ sys/resource.h sys/param.h sys/socket.h sys/stat.h \
+ sys/time.h sys/times.h sys/types.h sys/wait.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to bug-bash@gnu.org ##
+## ------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in netinet/in.h arpa/inet.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to bug-bash@gnu.org ##
+## ------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+{ $as_echo "$as_me:$LINENO: checking for sys/ptem.h" >&5
+$as_echo_n "checking for sys/ptem.h... " >&6; }
+if test "${ac_cv_header_sys_ptem_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if HAVE_SYS_STREAM_H
+# include <sys/stream.h>
+#endif
+
+
+#include <sys/ptem.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_sys_ptem_h=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_sys_ptem_h=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_ptem_h" >&5
+$as_echo "$ac_cv_header_sys_ptem_h" >&6; }
+
+
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+{ $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if test "${ac_cv_working_alloca_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_working_alloca_h=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_working_alloca_h=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA_H 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if test "${ac_cv_func_alloca_works+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_alloca_works=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_alloca_works=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
+
+else
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+cat >>confdefs.h <<\_ACEOF
+#define C_ALLOCA 1
+_ACEOF
+
+
+{ $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if test "${ac_cv_os_cray+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "webecray" >/dev/null 2>&1; then
+ ac_cv_os_cray=yes
+else
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+ break
+fi
+
+ done
+fi
+
+{ $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if test "${ac_cv_c_stack_direction+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+
+int
+main ()
+{
+ return find_stack_direction () < 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_stack_direction=1
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_stack_direction=-1
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5
+$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
+if test "${ac_cv_func_getpgrp_void+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ # Use it with a single arg.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+getpgrp (0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_func_getpgrp_void=no
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_getpgrp_void=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5
+$as_echo "$ac_cv_func_getpgrp_void" >&6; }
+if test $ac_cv_func_getpgrp_void = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define GETPGRP_VOID 1
+_ACEOF
+
+fi
+
+if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_func_setvbuf_reversed=no
+fi
+
+
+
+for ac_func in vprintf
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+{ $as_echo "$as_me:$LINENO: checking for _doprnt" >&5
+$as_echo_n "checking for _doprnt... " >&6; }
+if test "${ac_cv_func__doprnt+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define _doprnt to an innocuous variant, in case <limits.h> declares _doprnt.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define _doprnt innocuous__doprnt
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char _doprnt (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef _doprnt
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char _doprnt ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub__doprnt || defined __stub____doprnt
+choke me
+#endif
+
+int
+main ()
+{
+return _doprnt ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func__doprnt=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func__doprnt=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5
+$as_echo "$ac_cv_func__doprnt" >&6; }
+if test "x$ac_cv_func__doprnt" = x""yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DOPRNT 1
+_ACEOF
+
+fi
+
+fi
+done
+
+
+{ $as_echo "$as_me:$LINENO: checking for working strcoll" >&5
+$as_echo_n "checking for working strcoll... " >&6; }
+if test "${ac_cv_func_strcoll_works+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_strcoll_works=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+return (strcoll ("abc", "def") >= 0 ||
+ strcoll ("ABC", "DEF") >= 0 ||
+ strcoll ("123", "456") >= 0)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_strcoll_works=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_strcoll_works=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_strcoll_works" >&5
+$as_echo "$ac_cv_func_strcoll_works" >&6; }
+if test $ac_cv_func_strcoll_works = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRCOLL 1
+_ACEOF
+
+fi
+
+
+
+if test "$ac_cv_func_alloca_works" = "no" && test "$opt_bash_malloc" = "no"; then
+ MALLOC_TARGET=alloca
+ MALLOC_SRC=alloca.c
+
+ MALLOC_LIB='-lmalloc'
+ MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a'
+ MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
+ MALLOC_DEP='$(MALLOC_LIBRARY)'
+fi
+
+if test "$ac_cv_func_vprintf" = no; then
+ { $as_echo "$as_me:$LINENO: checking for declaration of vprintf in stdio.h" >&5
+$as_echo_n "checking for declaration of vprintf in stdio.h... " >&6; }
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1; then
+ ac_cv_func_vprintf=yes
+fi
+rm -f conftest*
+
+ { $as_echo "$as_me:$LINENO: result: $ac_cv_func_vprintf" >&5
+$as_echo "$ac_cv_func_vprintf" >&6; }
+ if test $ac_cv_func_vprintf = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_VPRINTF 1
+_ACEOF
+
+ fi
+fi
+
+if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then
+ case " $LIBOBJS " in
+ *" vprint.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS vprint.$ac_objext"
+ ;;
+esac
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+$as_echo_n "checking return type of signal handlers... " >&6; }
+if test "${ac_cv_type_signal+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <signal.h>
+
+int
+main ()
+{
+return *(signal (0, 0)) (0) == 1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_signal=int
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_signal=void
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+$as_echo "$ac_cv_type_signal" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define RETSIGTYPE $ac_cv_type_signal
+_ACEOF
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for __setostype" >&5
+$as_echo_n "checking for __setostype... " >&6; }
+if test "${ac_cv_func___setostype+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define __setostype to an innocuous variant, in case <limits.h> declares __setostype.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define __setostype innocuous___setostype
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char __setostype (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef __setostype
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char __setostype ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub___setostype || defined __stub_____setostype
+choke me
+#endif
+
+int
+main ()
+{
+return __setostype ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func___setostype=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func___setostype=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func___setostype" >&5
+$as_echo "$ac_cv_func___setostype" >&6; }
+if test "x$ac_cv_func___setostype" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SETOSTYPE 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for wait3" >&5
+$as_echo_n "checking for wait3... " >&6; }
+if test "${ac_cv_func_wait3+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define wait3 to an innocuous variant, in case <limits.h> declares wait3.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define wait3 innocuous_wait3
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char wait3 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef wait3
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char wait3 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_wait3 || defined __stub___wait3
+choke me
+#endif
+
+int
+main ()
+{
+return wait3 ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_wait3=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_wait3=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_wait3" >&5
+$as_echo "$ac_cv_func_wait3" >&6; }
+if test "x$ac_cv_func_wait3" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WAIT3 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for isinf" >&5
+$as_echo_n "checking for isinf... " >&6; }
+if test "${ac_cv_func_isinf+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define isinf to an innocuous variant, in case <limits.h> declares isinf.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define isinf innocuous_isinf
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char isinf (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef isinf
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char isinf ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_isinf || defined __stub___isinf
+choke me
+#endif
+
+int
+main ()
+{
+return isinf ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_isinf=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_isinf=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_isinf" >&5
+$as_echo "$ac_cv_func_isinf" >&6; }
+if test "x$ac_cv_func_isinf" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISINF_IN_LIBC 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for isnan" >&5
+$as_echo_n "checking for isnan... " >&6; }
+if test "${ac_cv_func_isnan+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define isnan to an innocuous variant, in case <limits.h> declares isnan.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define isnan innocuous_isnan
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char isnan (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef isnan
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char isnan ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_isnan || defined __stub___isnan
+choke me
+#endif
+
+int
+main ()
+{
+return isnan ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_isnan=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_isnan=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_isnan" >&5
+$as_echo "$ac_cv_func_isnan" >&6; }
+if test "x$ac_cv_func_isnan" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_ISNAN_IN_LIBC 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for mkfifo" >&5
+$as_echo_n "checking for mkfifo... " >&6; }
+if test "${ac_cv_func_mkfifo+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define mkfifo to an innocuous variant, in case <limits.h> declares mkfifo.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define mkfifo innocuous_mkfifo
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char mkfifo (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef mkfifo
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char mkfifo ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_mkfifo || defined __stub___mkfifo
+choke me
+#endif
+
+int
+main ()
+{
+return mkfifo ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_mkfifo=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_mkfifo=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mkfifo" >&5
+$as_echo "$ac_cv_func_mkfifo" >&6; }
+if test "x$ac_cv_func_mkfifo" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MKFIFO 1
+_ACEOF
+
+else
+ cat >>confdefs.h <<\_ACEOF
+#define MKFIFO_MISSING 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in dup2 eaccess fcntl getdtablesize getgroups gethostname \
+ getpagesize getpeername getrlimit getrusage gettimeofday \
+ kill killpg lstat readlink sbrk select setdtablesize \
+ setitimer tcgetpgrp uname ulimit waitpid
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in rename
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ case " $LIBOBJS " in
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ ;;
+esac
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in bcopy bzero confstr fnmatch \
+ getaddrinfo gethostbyname getservbyname getservent inet_aton \
+ memmove pathconf putenv raise regcomp regexec \
+ setenv setlinebuf setlocale setvbuf siginterrupt strchr \
+ sysconf syslog tcgetattr times ttyname tzset unsetenv
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+for ac_func in vasprintf asprintf
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+
+for ac_func in isascii isblank isgraph isprint isspace isxdigit
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+for ac_func in getpwent getpwnam getpwuid
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+for ac_func in getcwd memset
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ case " $LIBOBJS " in
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ ;;
+esac
+
+fi
+done
+
+
+
+
+
+
+
+
+
+for ac_func in strcasecmp strcasestr strerror strftime strnlen strpbrk strstr
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ case " $LIBOBJS " in
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ ;;
+esac
+
+fi
+done
+
+
+
+
+
+
+
+
+
+for ac_func in strtod strtol strtoul strtoll strtoull strtoimax strtoumax
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ case " $LIBOBJS " in
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ ;;
+esac
+
+fi
+done
+
+
+
+for ac_func in fdprintf
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ case " $LIBOBJS " in
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ ;;
+esac
+
+fi
+done
+
+
+
+{ $as_echo "$as_me:$LINENO: checking whether confstr is declared" >&5
+$as_echo_n "checking whether confstr is declared... " >&6; }
+if test "${ac_cv_have_decl_confstr+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef confstr
+ (void) confstr;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_confstr=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_confstr=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_confstr" >&5
+$as_echo "$ac_cv_have_decl_confstr" >&6; }
+if test "x$ac_cv_have_decl_confstr" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_CONFSTR 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_CONFSTR 0
+_ACEOF
+
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking whether printf is declared" >&5
+$as_echo_n "checking whether printf is declared... " >&6; }
+if test "${ac_cv_have_decl_printf+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef printf
+ (void) printf;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_printf=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_printf=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_printf" >&5
+$as_echo "$ac_cv_have_decl_printf" >&6; }
+if test "x$ac_cv_have_decl_printf" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PRINTF 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PRINTF 0
+_ACEOF
+
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking whether sbrk is declared" >&5
+$as_echo_n "checking whether sbrk is declared... " >&6; }
+if test "${ac_cv_have_decl_sbrk+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef sbrk
+ (void) sbrk;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_sbrk=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_sbrk=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_sbrk" >&5
+$as_echo "$ac_cv_have_decl_sbrk" >&6; }
+if test "x$ac_cv_have_decl_sbrk" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SBRK 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SBRK 0
+_ACEOF
+
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking whether setregid is declared" >&5
+$as_echo_n "checking whether setregid is declared... " >&6; }
+if test "${ac_cv_have_decl_setregid+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef setregid
+ (void) setregid;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_setregid=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_setregid=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_setregid" >&5
+$as_echo "$ac_cv_have_decl_setregid" >&6; }
+if test "x$ac_cv_have_decl_setregid" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SETREGID 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SETREGID 0
+_ACEOF
+
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking whether strcpy is declared" >&5
+$as_echo_n "checking whether strcpy is declared... " >&6; }
+if test "${ac_cv_have_decl_strcpy+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef strcpy
+ (void) strcpy;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_strcpy=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_strcpy=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strcpy" >&5
+$as_echo "$ac_cv_have_decl_strcpy" >&6; }
+if test "x$ac_cv_have_decl_strcpy" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRCPY 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRCPY 0
+_ACEOF
+
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking whether strsignal is declared" >&5
+$as_echo_n "checking whether strsignal is declared... " >&6; }
+if test "${ac_cv_have_decl_strsignal+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef strsignal
+ (void) strsignal;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_strsignal=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_strsignal=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsignal" >&5
+$as_echo "$ac_cv_have_decl_strsignal" >&6; }
+if test "x$ac_cv_have_decl_strsignal" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRSIGNAL 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRSIGNAL 0
+_ACEOF
+
+
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking whether strtold is declared" >&5
+$as_echo_n "checking whether strtold is declared... " >&6; }
+if test "${ac_cv_have_decl_strtold+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+#ifndef strtold
+ (void) strtold;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_strtold=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_strtold=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_strtold" >&5
+$as_echo "$ac_cv_have_decl_strtold" >&6; }
+if test "x$ac_cv_have_decl_strtold" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRTOLD 1
+_ACEOF
+
+
+ { $as_echo "$as_me:$LINENO: checking for broken strtold" >&5
+$as_echo_n "checking for broken strtold... " >&6; }
+ if test "${bash_cv_strtold_broken+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+int
+main ()
+{
+int main() { long double r; char *foo, bar; r = strtold(foo, &bar);}
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_strtold_broken=no
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_strtold_broken=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+fi
+
+ { $as_echo "$as_me:$LINENO: result: $bash_cv_strtold_broken" >&5
+$as_echo "$bash_cv_strtold_broken" >&6; }
+ if test "$bash_cv_strtold_broken" = "yes" ; then
+ cat >>confdefs.h <<\_ACEOF
+#define STRTOLD_BROKEN 1
+_ACEOF
+
+ fi
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRTOLD 0
+_ACEOF
+
+
+fi
+
+
+
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for declaration of strtoimax" >&5
+$as_echo_n "checking for declaration of strtoimax... " >&6; }
+if test "${bash_cv_decl_strtoimax+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if STDC_HEADERS
+# include <stdlib.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+int
+main ()
+{
+return !strtoimax;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_decl_strtoimax=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_decl_strtoimax=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_decl_strtoimax" >&5
+$as_echo "$bash_cv_decl_strtoimax" >&6; }
+bash_tr_func=HAVE_DECL_`echo strtoimax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+if test $bash_cv_decl_strtoimax = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define $bash_tr_func 1
+_ACEOF
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define $bash_tr_func 0
+_ACEOF
+
+fi
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for declaration of strtol" >&5
+$as_echo_n "checking for declaration of strtol... " >&6; }
+if test "${bash_cv_decl_strtol+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if STDC_HEADERS
+# include <stdlib.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+int
+main ()
+{
+return !strtol;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_decl_strtol=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_decl_strtol=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_decl_strtol" >&5
+$as_echo "$bash_cv_decl_strtol" >&6; }
+bash_tr_func=HAVE_DECL_`echo strtol | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+if test $bash_cv_decl_strtol = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define $bash_tr_func 1
+_ACEOF
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define $bash_tr_func 0
+_ACEOF
+
+fi
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for declaration of strtoll" >&5
+$as_echo_n "checking for declaration of strtoll... " >&6; }
+if test "${bash_cv_decl_strtoll+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if STDC_HEADERS
+# include <stdlib.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+int
+main ()
+{
+return !strtoll;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_decl_strtoll=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_decl_strtoll=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_decl_strtoll" >&5
+$as_echo "$bash_cv_decl_strtoll" >&6; }
+bash_tr_func=HAVE_DECL_`echo strtoll | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+if test $bash_cv_decl_strtoll = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define $bash_tr_func 1
+_ACEOF
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define $bash_tr_func 0
+_ACEOF
+
+fi
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for declaration of strtoul" >&5
+$as_echo_n "checking for declaration of strtoul... " >&6; }
+if test "${bash_cv_decl_strtoul+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if STDC_HEADERS
+# include <stdlib.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+int
+main ()
+{
+return !strtoul;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_decl_strtoul=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_decl_strtoul=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_decl_strtoul" >&5
+$as_echo "$bash_cv_decl_strtoul" >&6; }
+bash_tr_func=HAVE_DECL_`echo strtoul | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+if test $bash_cv_decl_strtoul = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define $bash_tr_func 1
+_ACEOF
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define $bash_tr_func 0
+_ACEOF
+
+fi
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for declaration of strtoull" >&5
+$as_echo_n "checking for declaration of strtoull... " >&6; }
+if test "${bash_cv_decl_strtoull+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if STDC_HEADERS
+# include <stdlib.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+int
+main ()
+{
+return !strtoull;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_decl_strtoull=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_decl_strtoull=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_decl_strtoull" >&5
+$as_echo "$bash_cv_decl_strtoull" >&6; }
+bash_tr_func=HAVE_DECL_`echo strtoull | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+if test $bash_cv_decl_strtoull = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define $bash_tr_func 1
+_ACEOF
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define $bash_tr_func 0
+_ACEOF
+
+fi
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for declaration of strtoumax" >&5
+$as_echo_n "checking for declaration of strtoumax... " >&6; }
+if test "${bash_cv_decl_strtoumax+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if STDC_HEADERS
+# include <stdlib.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+int
+main ()
+{
+return !strtoumax;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_decl_strtoumax=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_decl_strtoumax=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_decl_strtoumax" >&5
+$as_echo "$bash_cv_decl_strtoumax" >&6; }
+bash_tr_func=HAVE_DECL_`echo strtoumax | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+if test $bash_cv_decl_strtoumax = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define $bash_tr_func 1
+_ACEOF
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define $bash_tr_func 0
+_ACEOF
+
+fi
+
+
+
+
+
+
+for ac_header in $ac_header_list
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to bug-bash@gnu.org ##
+## ------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+
+for ac_func in $ac_func_list
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for working mktime" >&5
+$as_echo_n "checking for working mktime... " >&6; }
+if test "${ac_cv_func_working_mktime+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_working_mktime=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Test program from Paul Eggert and Tony Leneis. */
+#ifdef TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
+#else
+# ifdef HAVE_SYS_TIME_H
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
+#include <limits.h>
+#include <stdlib.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#ifndef HAVE_ALARM
+# define alarm(X) /* empty */
+#endif
+
+/* Work around redefinition to rpl_putenv by other config tests. */
+#undef putenv
+
+static time_t time_t_max;
+static time_t time_t_min;
+
+/* Values we'll use to set the TZ environment variable. */
+static char *tz_strings[] = {
+ (char *) 0, "TZ=GMT0", "TZ=JST-9",
+ "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
+};
+#define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
+
+/* Return 0 if mktime fails to convert a date in the spring-forward gap.
+ Based on a problem report from Andreas Jaeger. */
+static int
+spring_forward_gap ()
+{
+ /* glibc (up to about 1998-10-07) failed this test. */
+ struct tm tm;
+
+ /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
+ instead of "TZ=America/Vancouver" in order to detect the bug even
+ on systems that don't support the Olson extension, or don't have the
+ full zoneinfo tables installed. */
+ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+
+ tm.tm_year = 98;
+ tm.tm_mon = 3;
+ tm.tm_mday = 5;
+ tm.tm_hour = 2;
+ tm.tm_min = 0;
+ tm.tm_sec = 0;
+ tm.tm_isdst = -1;
+ return mktime (&tm) != (time_t) -1;
+}
+
+static int
+mktime_test1 (now)
+ time_t now;
+{
+ struct tm *lt;
+ return ! (lt = localtime (&now)) || mktime (lt) == now;
+}
+
+static int
+mktime_test (now)
+ time_t now;
+{
+ return (mktime_test1 (now)
+ && mktime_test1 ((time_t) (time_t_max - now))
+ && mktime_test1 ((time_t) (time_t_min + now)));
+}
+
+static int
+irix_6_4_bug ()
+{
+ /* Based on code from Ariel Faigon. */
+ struct tm tm;
+ tm.tm_year = 96;
+ tm.tm_mon = 3;
+ tm.tm_mday = 0;
+ tm.tm_hour = 0;
+ tm.tm_min = 0;
+ tm.tm_sec = 0;
+ tm.tm_isdst = -1;
+ mktime (&tm);
+ return tm.tm_mon == 2 && tm.tm_mday == 31;
+}
+
+static int
+bigtime_test (j)
+ int j;
+{
+ struct tm tm;
+ time_t now;
+ tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
+ now = mktime (&tm);
+ if (now != (time_t) -1)
+ {
+ struct tm *lt = localtime (&now);
+ if (! (lt
+ && lt->tm_year == tm.tm_year
+ && lt->tm_mon == tm.tm_mon
+ && lt->tm_mday == tm.tm_mday
+ && lt->tm_hour == tm.tm_hour
+ && lt->tm_min == tm.tm_min
+ && lt->tm_sec == tm.tm_sec
+ && lt->tm_yday == tm.tm_yday
+ && lt->tm_wday == tm.tm_wday
+ && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
+ == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
+ return 0;
+ }
+ return 1;
+}
+
+static int
+year_2050_test ()
+{
+ /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
+ ignoring leap seconds. */
+ unsigned long int answer = 2527315200UL;
+
+ struct tm tm;
+ time_t t;
+ tm.tm_year = 2050 - 1900;
+ tm.tm_mon = 2 - 1;
+ tm.tm_mday = 1;
+ tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
+ tm.tm_isdst = -1;
+
+ /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
+ instead of "TZ=America/Vancouver" in order to detect the bug even
+ on systems that don't support the Olson extension, or don't have the
+ full zoneinfo tables installed. */
+ putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
+
+ t = mktime (&tm);
+
+ /* Check that the result is either a failure, or close enough
+ to the correct answer that we can assume the discrepancy is
+ due to leap seconds. */
+ return (t == (time_t) -1
+ || (0 < t && answer - 120 <= t && t <= answer + 120));
+}
+
+int
+main ()
+{
+ time_t t, delta;
+ int i, j;
+
+ /* This test makes some buggy mktime implementations loop.
+ Give up after 60 seconds; a mktime slower than that
+ isn't worth using anyway. */
+ alarm (60);
+
+ for (;;)
+ {
+ t = (time_t_max << 1) + 1;
+ if (t <= time_t_max)
+ break;
+ time_t_max = t;
+ }
+ time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max;
+
+ delta = time_t_max / 997; /* a suitable prime number */
+ for (i = 0; i < N_STRINGS; i++)
+ {
+ if (tz_strings[i])
+ putenv (tz_strings[i]);
+
+ for (t = 0; t <= time_t_max - delta; t += delta)
+ if (! mktime_test (t))
+ return 1;
+ if (! (mktime_test ((time_t) 1)
+ && mktime_test ((time_t) (60 * 60))
+ && mktime_test ((time_t) (60 * 60 * 24))))
+ return 1;
+
+ for (j = 1; ; j <<= 1)
+ if (! bigtime_test (j))
+ return 1;
+ else if (INT_MAX / 2 < j)
+ break;
+ if (! bigtime_test (INT_MAX))
+ return 1;
+ }
+ return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ());
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_working_mktime=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_working_mktime=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_working_mktime" >&5
+$as_echo "$ac_cv_func_working_mktime" >&6; }
+if test $ac_cv_func_working_mktime = no; then
+ case " $LIBOBJS " in
+ *" mktime.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS mktime.$ac_objext"
+ ;;
+esac
+
+fi
+
+
+
+
+
+
+
+
+for ac_header in argz.h errno.h fcntl.h malloc.h stdio_ext.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to bug-bash@gnu.org ##
+## ------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+for ac_header in stdlib.h unistd.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to bug-bash@gnu.org ##
+## ------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_func in getpagesize
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:$LINENO: checking for working mmap" >&5
+$as_echo_n "checking for working mmap... " >&6; }
+if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_func_mmap_fixed_mapped=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+/* malloc might have been renamed as rpl_malloc. */
+#undef malloc
+
+/* Thanks to Mike Haertel and Jim Avera for this test.
+ Here is a matrix of mmap possibilities:
+ mmap private not fixed
+ mmap private fixed at somewhere currently unmapped
+ mmap private fixed at somewhere already mapped
+ mmap shared not fixed
+ mmap shared fixed at somewhere currently unmapped
+ mmap shared fixed at somewhere already mapped
+ For private mappings, we should verify that changes cannot be read()
+ back from the file, nor mmap's back from the file at a different
+ address. (There have been systems where private was not correctly
+ implemented like the infamous i386 svr4.0, and systems where the
+ VM page cache was not coherent with the file system buffer cache
+ like early versions of FreeBSD and possibly contemporary NetBSD.)
+ For shared mappings, we should conversely verify that changes get
+ propagated back to all the places they're supposed to be.
+
+ Grep wants private fixed already mapped.
+ The main things grep needs to know about mmap are:
+ * does it exist and is it safe to write into the mmap'd area
+ * how to use it (BSD variants) */
+
+#include <fcntl.h>
+#include <sys/mman.h>
+
+#if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
+char *malloc ();
+#endif
+
+/* This mess was copied from the GNU getpagesize.h. */
+#ifndef HAVE_GETPAGESIZE
+/* Assume that all systems that can run configure have sys/param.h. */
+# ifndef HAVE_SYS_PARAM_H
+# define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+# ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else /* no EXEC_PAGESIZE */
+# ifdef NBPG
+# define getpagesize() NBPG * CLSIZE
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif /* no CLSIZE */
+# else /* no NBPG */
+# ifdef NBPC
+# define getpagesize() NBPC
+# else /* no NBPC */
+# ifdef PAGESIZE
+# define getpagesize() PAGESIZE
+# endif /* PAGESIZE */
+# endif /* no NBPC */
+# endif /* no NBPG */
+# endif /* no EXEC_PAGESIZE */
+# else /* no HAVE_SYS_PARAM_H */
+# define getpagesize() 8192 /* punt totally */
+# endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+int
+main ()
+{
+ char *data, *data2, *data3;
+ int i, pagesize;
+ int fd;
+
+ pagesize = getpagesize ();
+
+ /* First, make a file with some known garbage in it. */
+ data = (char *) malloc (pagesize);
+ if (!data)
+ return 1;
+ for (i = 0; i < pagesize; ++i)
+ *(data + i) = rand ();
+ umask (0);
+ fd = creat ("conftest.mmap", 0600);
+ if (fd < 0)
+ return 1;
+ if (write (fd, data, pagesize) != pagesize)
+ return 1;
+ close (fd);
+
+ /* Next, try to mmap the file at a fixed address which already has
+ something else allocated at it. If we can, also make sure that
+ we see the same garbage. */
+ fd = open ("conftest.mmap", O_RDWR);
+ if (fd < 0)
+ return 1;
+ data2 = (char *) malloc (2 * pagesize);
+ if (!data2)
+ return 1;
+ data2 += (pagesize - ((long int) data2 & (pagesize - 1))) & (pagesize - 1);
+ if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_FIXED, fd, 0L))
+ return 1;
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data2 + i))
+ return 1;
+
+ /* Finally, make sure that changes to the mapped area do not
+ percolate back to the file as seen by read(). (This is a bug on
+ some variants of i386 svr4.0.) */
+ for (i = 0; i < pagesize; ++i)
+ *(data2 + i) = *(data2 + i) + 1;
+ data3 = (char *) malloc (pagesize);
+ if (!data3)
+ return 1;
+ if (read (fd, data3, pagesize) != pagesize)
+ return 1;
+ for (i = 0; i < pagesize; ++i)
+ if (*(data + i) != *(data3 + i))
+ return 1;
+ close (fd);
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_mmap_fixed_mapped=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mmap_fixed_mapped" >&5
+$as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MMAP 1
+_ACEOF
+
+fi
+rm -f conftest.mmap
+
+
+
+
+
+
+
+
+
+
+for ac_func in __argz_count __argz_next __argz_stringify dcgettext mempcpy \
+ munmap stpcpy strcspn strdup
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+INTL_DEP= INTL_INC= LIBINTL_H=
+if test "x$USE_INCLUDED_LIBINTL" = "xyes"; then
+ INTL_DEP='${INTL_LIBDIR}/libintl.a'
+ INTL_INC='-I${INTL_LIBSRC} -I${INTL_BUILDDIR}'
+ LIBINTL_H='${INTL_BUILDDIR}/libintl.h'
+fi
+
+
+
+
+
+
+
+for ac_header in wctype.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to bug-bash@gnu.org ##
+## ------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in wchar.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to bug-bash@gnu.org ##
+## ------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_header in langinfo.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ------------------------------- ##
+## Report this to bug-bash@gnu.org ##
+## ------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+{ $as_echo "$as_me:$LINENO: checking for mbrlen" >&5
+$as_echo_n "checking for mbrlen... " >&6; }
+if test "${ac_cv_func_mbrlen+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define mbrlen to an innocuous variant, in case <limits.h> declares mbrlen.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define mbrlen innocuous_mbrlen
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char mbrlen (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef mbrlen
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char mbrlen ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_mbrlen || defined __stub___mbrlen
+choke me
+#endif
+
+int
+main ()
+{
+return mbrlen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_mbrlen=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_mbrlen=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mbrlen" >&5
+$as_echo "$ac_cv_func_mbrlen" >&6; }
+if test "x$ac_cv_func_mbrlen" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBRLEN 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for mbscasecmp" >&5
+$as_echo_n "checking for mbscasecmp... " >&6; }
+if test "${ac_cv_func_mbscasecmp+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define mbscasecmp to an innocuous variant, in case <limits.h> declares mbscasecmp.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define mbscasecmp innocuous_mbscasecmp
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char mbscasecmp (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef mbscasecmp
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char mbscasecmp ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_mbscasecmp || defined __stub___mbscasecmp
+choke me
+#endif
+
+int
+main ()
+{
+return mbscasecmp ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_mbscasecmp=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_mbscasecmp=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mbscasecmp" >&5
+$as_echo "$ac_cv_func_mbscasecmp" >&6; }
+if test "x$ac_cv_func_mbscasecmp" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSCMP 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for mbscmp" >&5
+$as_echo_n "checking for mbscmp... " >&6; }
+if test "${ac_cv_func_mbscmp+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define mbscmp to an innocuous variant, in case <limits.h> declares mbscmp.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define mbscmp innocuous_mbscmp
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char mbscmp (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef mbscmp
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char mbscmp ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_mbscmp || defined __stub___mbscmp
+choke me
+#endif
+
+int
+main ()
+{
+return mbscmp ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_mbscmp=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_mbscmp=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mbscmp" >&5
+$as_echo "$ac_cv_func_mbscmp" >&6; }
+if test "x$ac_cv_func_mbscmp" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSCMP 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for mbsrtowcs" >&5
+$as_echo_n "checking for mbsrtowcs... " >&6; }
+if test "${ac_cv_func_mbsrtowcs+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define mbsrtowcs to an innocuous variant, in case <limits.h> declares mbsrtowcs.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define mbsrtowcs innocuous_mbsrtowcs
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char mbsrtowcs (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef mbsrtowcs
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char mbsrtowcs ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_mbsrtowcs || defined __stub___mbsrtowcs
+choke me
+#endif
+
+int
+main ()
+{
+return mbsrtowcs ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_mbsrtowcs=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_mbsrtowcs=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mbsrtowcs" >&5
+$as_echo "$ac_cv_func_mbsrtowcs" >&6; }
+if test "x$ac_cv_func_mbsrtowcs" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSRTOWCS 1
+_ACEOF
+
+fi
+
+
+
+for ac_func in mbschr
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ case " $LIBOBJS " in
+ *" $ac_func.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
+ ;;
+esac
+
+fi
+done
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for wcrtomb" >&5
+$as_echo_n "checking for wcrtomb... " >&6; }
+if test "${ac_cv_func_wcrtomb+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define wcrtomb to an innocuous variant, in case <limits.h> declares wcrtomb.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define wcrtomb innocuous_wcrtomb
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char wcrtomb (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef wcrtomb
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char wcrtomb ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_wcrtomb || defined __stub___wcrtomb
+choke me
+#endif
+
+int
+main ()
+{
+return wcrtomb ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_wcrtomb=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_wcrtomb=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_wcrtomb" >&5
+$as_echo "$ac_cv_func_wcrtomb" >&6; }
+if test "x$ac_cv_func_wcrtomb" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCRTOMB 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for wcscoll" >&5
+$as_echo_n "checking for wcscoll... " >&6; }
+if test "${ac_cv_func_wcscoll+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define wcscoll to an innocuous variant, in case <limits.h> declares wcscoll.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define wcscoll innocuous_wcscoll
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char wcscoll (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef wcscoll
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char wcscoll ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_wcscoll || defined __stub___wcscoll
+choke me
+#endif
+
+int
+main ()
+{
+return wcscoll ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_wcscoll=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_wcscoll=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_wcscoll" >&5
+$as_echo "$ac_cv_func_wcscoll" >&6; }
+if test "x$ac_cv_func_wcscoll" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSCOLL 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for wcsdup" >&5
+$as_echo_n "checking for wcsdup... " >&6; }
+if test "${ac_cv_func_wcsdup+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define wcsdup to an innocuous variant, in case <limits.h> declares wcsdup.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define wcsdup innocuous_wcsdup
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char wcsdup (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef wcsdup
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char wcsdup ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_wcsdup || defined __stub___wcsdup
+choke me
+#endif
+
+int
+main ()
+{
+return wcsdup ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_wcsdup=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_wcsdup=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_wcsdup" >&5
+$as_echo "$ac_cv_func_wcsdup" >&6; }
+if test "x$ac_cv_func_wcsdup" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCSDUP 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for wcwidth" >&5
+$as_echo_n "checking for wcwidth... " >&6; }
+if test "${ac_cv_func_wcwidth+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define wcwidth to an innocuous variant, in case <limits.h> declares wcwidth.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define wcwidth innocuous_wcwidth
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char wcwidth (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef wcwidth
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char wcwidth ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_wcwidth || defined __stub___wcwidth
+choke me
+#endif
+
+int
+main ()
+{
+return wcwidth ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_wcwidth=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_wcwidth=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_wcwidth" >&5
+$as_echo "$ac_cv_func_wcwidth" >&6; }
+if test "x$ac_cv_func_wcwidth" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCWIDTH 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for wctype" >&5
+$as_echo_n "checking for wctype... " >&6; }
+if test "${ac_cv_func_wctype+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define wctype to an innocuous variant, in case <limits.h> declares wctype.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define wctype innocuous_wctype
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char wctype (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef wctype
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char wctype ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_wctype || defined __stub___wctype
+choke me
+#endif
+
+int
+main ()
+{
+return wctype ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_wctype=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_wctype=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_wctype" >&5
+$as_echo "$ac_cv_func_wctype" >&6; }
+if test "x$ac_cv_func_wctype" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCTYPE 1
+_ACEOF
+
+fi
+
+
+
+ { $as_echo "$as_me:$LINENO: checking whether mbrtowc and mbstate_t are properly declared" >&5
+$as_echo_n "checking whether mbrtowc and mbstate_t are properly declared... " >&6; }
+if test "${ac_cv_func_mbrtowc+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+wchar_t wc;
+ char const s[] = "";
+ size_t n = 1;
+ mbstate_t state;
+ return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_mbrtowc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_mbrtowc=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_mbrtowc" >&5
+$as_echo "$ac_cv_func_mbrtowc" >&6; }
+ if test $ac_cv_func_mbrtowc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBRTOWC 1
+_ACEOF
+
+ fi
+
+if test $ac_cv_func_mbrtowc = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MBSTATE_T 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+for ac_func in iswlower iswupper towlower towupper iswctype
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+{ $as_echo "$as_me:$LINENO: checking for nl_langinfo and CODESET" >&5
+$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
+if test "${bash_cv_langinfo_codeset+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <langinfo.h>
+int
+main ()
+{
+char* cs = nl_langinfo(CODESET);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_langinfo_codeset=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_langinfo_codeset=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_langinfo_codeset" >&5
+$as_echo "$bash_cv_langinfo_codeset" >&6; }
+if test $bash_cv_langinfo_codeset = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LANGINFO_CODESET 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for wchar_t in wchar.h" >&5
+$as_echo_n "checking for wchar_t in wchar.h... " >&6; }
+if test "${bash_cv_type_wchar_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wchar.h>
+
+int
+main ()
+{
+
+ wchar_t foo;
+ foo = 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_type_wchar_t=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_type_wchar_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_type_wchar_t" >&5
+$as_echo "$bash_cv_type_wchar_t" >&6; }
+if test $bash_cv_type_wchar_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCHAR_T 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for wctype_t in wctype.h" >&5
+$as_echo_n "checking for wctype_t in wctype.h... " >&6; }
+if test "${bash_cv_type_wctype_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wctype.h>
+int
+main ()
+{
+
+ wctype_t foo;
+ foo = 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_type_wctype_t=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_type_wctype_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_type_wctype_t" >&5
+$as_echo "$bash_cv_type_wctype_t" >&6; }
+if test $bash_cv_type_wctype_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WCTYPE_T 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for wint_t in wctype.h" >&5
+$as_echo_n "checking for wint_t in wctype.h... " >&6; }
+if test "${bash_cv_type_wint_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <wctype.h>
+int
+main ()
+{
+
+ wint_t foo;
+ foo = 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_type_wint_t=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_type_wint_t=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_type_wint_t" >&5
+$as_echo "$bash_cv_type_wint_t" >&6; }
+if test $bash_cv_type_wint_t = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_WINT_T 1
+_ACEOF
+
+fi
+
+if test "$am_cv_func_iconv" = yes; then
+ OLDLIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+
+for ac_func in locale_charset
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$OLDLIBS"
+fi
+
+
+
+if test "$opt_static_link" != yes; then
+
+{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_dl_dlopen=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_dl_dlopen=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDL 1
+_ACEOF
+
+ LIBS="-ldl $LIBS"
+
+fi
+
+
+
+
+for ac_func in dlopen dlclose dlsym
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
+$as_echo_n "checking whether sys_siglist is declared... " >&6; }
+if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <signal.h>
+/* NetBSD declares sys_siglist in unistd.h. */
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+
+int
+main ()
+{
+#ifndef sys_siglist
+ (void) sys_siglist;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_sys_siglist=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_sys_siglist=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
+$as_echo "$ac_cv_have_decl_sys_siglist" >&6; }
+if test "x$ac_cv_have_decl_sys_siglist" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SYS_SIGLIST 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SYS_SIGLIST 0
+_ACEOF
+
+
+fi
+
+
+
+
+if test "$ac_cv_func_inet_aton" != 'yes'; then
+
+{ $as_echo "$as_me:$LINENO: checking for inet_aton" >&5
+$as_echo_n "checking for inet_aton... " >&6; }
+if test "${bash_cv_func_inet_aton+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+struct in_addr ap;
+int
+main ()
+{
+ inet_aton("127.0.0.1", &ap);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_func_inet_aton=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_func_inet_aton=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_func_inet_aton" >&5
+$as_echo "$bash_cv_func_inet_aton" >&6; }
+if test $bash_cv_func_inet_aton = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_INET_ATON 1
+_ACEOF
+
+else
+ case " $LIBOBJS " in
+ *" inet_aton.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext"
+ ;;
+esac
+
+fi
+
+fi
+
+case "$host_os" in
+irix4*)
+{ $as_echo "$as_me:$LINENO: checking for getpwent in -lsun" >&5
+$as_echo_n "checking for getpwent in -lsun... " >&6; }
+if test "${ac_cv_lib_sun_getpwent+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsun $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getpwent ();
+int
+main ()
+{
+return getpwent ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_sun_getpwent=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_sun_getpwent=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_sun_getpwent" >&5
+$as_echo "$ac_cv_lib_sun_getpwent" >&6; }
+if test "x$ac_cv_lib_sun_getpwent" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSUN 1
+_ACEOF
+
+ LIBS="-lsun $LIBS"
+
+fi
+ ;;
+esac
+
+if test "$ac_cv_func_getpeername" = no; then
+
+if test "X$bash_cv_have_socklib" = "X"; then
+_bash_needmsg=
+else
+{ $as_echo "$as_me:$LINENO: checking for socket library" >&5
+$as_echo_n "checking for socket library... " >&6; }
+_bash_needmsg=yes
+fi
+if test "${bash_cv_have_socklib+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ { $as_echo "$as_me:$LINENO: checking for getpeername in -lsocket" >&5
+$as_echo_n "checking for getpeername in -lsocket... " >&6; }
+if test "${ac_cv_lib_socket_getpeername+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket -lnsl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char getpeername ();
+int
+main ()
+{
+return getpeername ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_socket_getpeername=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_socket_getpeername=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_getpeername" >&5
+$as_echo "$ac_cv_lib_socket_getpeername" >&6; }
+if test "x$ac_cv_lib_socket_getpeername" = x""yes; then
+ bash_cv_have_socklib=yes
+else
+ bash_cv_have_socklib=no
+fi
+
+fi
+
+if test "X$_bash_needmsg" = Xyes; then
+ { $as_echo "$as_me:$LINENO: result: $bash_cv_have_socklib" >&5
+$as_echo "$bash_cv_have_socklib" >&6; }
+ _bash_needmsg=
+fi
+if test $bash_cv_have_socklib = yes; then
+ # check for libnsl, add it to LIBS if present
+ if test "X$bash_cv_have_libnsl" = "X"; then
+ _bash_needmsg=
+ else
+ { $as_echo "$as_me:$LINENO: checking for libnsl" >&5
+$as_echo_n "checking for libnsl... " >&6; }
+ _bash_needmsg=yes
+ fi
+ if test "${bash_cv_have_libnsl+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ { $as_echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
+$as_echo_n "checking for t_open in -lnsl... " >&6; }
+if test "${ac_cv_lib_nsl_t_open+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char t_open ();
+int
+main ()
+{
+return t_open ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_nsl_t_open=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_nsl_t_open=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
+$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
+if test "x$ac_cv_lib_nsl_t_open" = x""yes; then
+ bash_cv_have_libnsl=yes
+else
+ bash_cv_have_libnsl=no
+fi
+
+fi
+
+ if test "X$_bash_needmsg" = Xyes; then
+ { $as_echo "$as_me:$LINENO: result: $bash_cv_have_libnsl" >&5
+$as_echo "$bash_cv_have_libnsl" >&6; }
+ _bash_needmsg=
+ fi
+ if test $bash_cv_have_libnsl = yes; then
+ LIBS="-lsocket -lnsl $LIBS"
+ else
+ LIBS="-lsocket $LIBS"
+ fi
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LIBSOCKET 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETPEERNAME 1
+_ACEOF
+
+fi
+
+fi
+if test "$ac_cv_func_gethostbyname" = no; then
+ if test "X$bash_cv_have_gethostbyname" = "X"; then
+_bash_needmsg=yes
+else
+{ $as_echo "$as_me:$LINENO: checking for gethostbyname in socket library" >&5
+$as_echo_n "checking for gethostbyname in socket library... " >&6; }
+_bash_needmsg=
+fi
+if test "${bash_cv_have_gethostbyname+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <netdb.h>
+int
+main ()
+{
+ struct hostent *hp;
+ hp = gethostbyname("localhost");
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_have_gethostbyname=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_have_gethostbyname=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+if test "X$_bash_needmsg" = Xyes; then
+ { $as_echo "$as_me:$LINENO: checking for gethostbyname in socket library" >&5
+$as_echo_n "checking for gethostbyname in socket library... " >&6; }
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_have_gethostbyname" >&5
+$as_echo "$bash_cv_have_gethostbyname" >&6; }
+if test "$bash_cv_have_gethostbyname" = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETHOSTBYNAME 1
+_ACEOF
+
+fi
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if test "${ac_cv_type_uid_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "uid_t" >/dev/null 2>&1; then
+ ac_cv_type_uid_t=yes
+else
+ ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define uid_t int
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define gid_t int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking type of array argument to getgroups" >&5
+$as_echo_n "checking type of array argument to getgroups... " >&6; }
+if test "${ac_cv_type_getgroups+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_type_getgroups=cross
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Thanks to Mike Rendell for this test. */
+$ac_includes_default
+#define NGID 256
+#undef MAX
+#define MAX(x, y) ((x) > (y) ? (x) : (y))
+
+int
+main ()
+{
+ gid_t gidset[NGID];
+ int i, n;
+ union { gid_t gval; long int lval; } val;
+
+ val.lval = -1;
+ for (i = 0; i < NGID; i++)
+ gidset[i] = val.gval;
+ n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
+ gidset);
+ /* Exit non-zero if getgroups seems to require an array of ints. This
+ happens when gid_t is short int but getgroups modifies an array
+ of ints. */
+ return n > 0 && gidset[n] != val.gval;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_type_getgroups=gid_t
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_type_getgroups=int
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+if test $ac_cv_type_getgroups = cross; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <unistd.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
+ ac_cv_type_getgroups=gid_t
+else
+ ac_cv_type_getgroups=int
+fi
+rm -f conftest*
+
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_getgroups" >&5
+$as_echo "$ac_cv_type_getgroups" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define GETGROUPS_T $ac_cv_type_getgroups
+_ACEOF
+
+
+{ $as_echo "$as_me:$LINENO: checking for off_t" >&5
+$as_echo_n "checking for off_t... " >&6; }
+if test "${ac_cv_type_off_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_off_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (off_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((off_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_off_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
+$as_echo "$ac_cv_type_off_t" >&6; }
+if test "x$ac_cv_type_off_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define off_t long int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5
+$as_echo_n "checking for mode_t... " >&6; }
+if test "${ac_cv_type_mode_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_mode_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (mode_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((mode_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_mode_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
+$as_echo "$ac_cv_type_mode_t" >&6; }
+if test "x$ac_cv_type_mode_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define mode_t int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if test "${ac_cv_type_uid_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "uid_t" >/dev/null 2>&1; then
+ ac_cv_type_uid_t=yes
+else
+ ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define uid_t int
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define gid_t int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
+$as_echo_n "checking for pid_t... " >&6; }
+if test "${ac_cv_type_pid_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_pid_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (pid_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((pid_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_pid_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
+$as_echo "$ac_cv_type_pid_t" >&6; }
+if test "x$ac_cv_type_pid_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
+$as_echo_n "checking for size_t... " >&6; }
+if test "${ac_cv_type_size_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_size_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (size_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((size_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_size_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+$as_echo "$ac_cv_type_size_t" >&6; }
+if test "x$ac_cv_type_size_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
+$as_echo_n "checking for ssize_t... " >&6; }
+if test "${ac_cv_type_ssize_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_ssize_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (ssize_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((ssize_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_ssize_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
+$as_echo "$ac_cv_type_ssize_t" >&6; }
+if test "x$ac_cv_type_ssize_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define ssize_t int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for time_t" >&5
+$as_echo_n "checking for time_t... " >&6; }
+if test "${ac_cv_type_time_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_time_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (time_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((time_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_time_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
+$as_echo "$ac_cv_type_time_t" >&6; }
+if test "x$ac_cv_type_time_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define time_t long
+_ACEOF
+
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for long long" >&5
+$as_echo_n "checking for long long... " >&6; }
+if test "${bash_cv_type_long_long+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+long long ll = 1; int i = 63;
+int
+main ()
+{
+
+long long llm = (long long) -1;
+return ll << i | ll >> i | llm / ll | llm % ll;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_type_long_long='long long'
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_type_long_long='long'
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_type_long_long" >&5
+$as_echo "$bash_cv_type_long_long" >&6; }
+if test "$bash_cv_type_long_long" = 'long long'; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_LONG 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for unsigned long long" >&5
+$as_echo_n "checking for unsigned long long... " >&6; }
+if test "${bash_cv_type_unsigned_long_long+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+unsigned long long ull = 1; int i = 63;
+int
+main ()
+{
+
+unsigned long long ullmax = (unsigned long long) -1;
+return ull << i | ull >> i | ullmax / ull | ullmax % ull;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_type_unsigned_long_long='unsigned long long'
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_type_unsigned_long_long='unsigned long'
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_type_unsigned_long_long" >&5
+$as_echo "$bash_cv_type_unsigned_long_long" >&6; }
+if test "$bash_cv_type_unsigned_long_long" = 'unsigned long long'; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_UNSIGNED_LONG_LONG 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
+$as_echo_n "checking return type of signal handlers... " >&6; }
+if test "${ac_cv_type_signal+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <signal.h>
+
+int
+main ()
+{
+return *(signal (0, 0)) (0) == 1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_signal=int
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_signal=void
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
+$as_echo "$ac_cv_type_signal" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define RETSIGTYPE $ac_cv_type_signal
+_ACEOF
+
+
+{ $as_echo "$as_me:$LINENO: checking for sig_atomic_t in signal.h" >&5
+$as_echo_n "checking for sig_atomic_t in signal.h... " >&6; }
+if test "${ac_cv_have_sig_atomic_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <signal.h>
+
+int
+main ()
+{
+ sig_atomic_t x;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_have_sig_atomic_t=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_sig_atomic_t=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_sig_atomic_t" >&5
+$as_echo "$ac_cv_have_sig_atomic_t" >&6; }
+if test "$ac_cv_have_sig_atomic_t" = "no"
+then
+ { $as_echo "$as_me:$LINENO: checking for sig_atomic_t" >&5
+$as_echo_n "checking for sig_atomic_t... " >&6; }
+if test "${ac_cv_type_sig_atomic_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_sig_atomic_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (sig_atomic_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((sig_atomic_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_sig_atomic_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
+$as_echo "$ac_cv_type_sig_atomic_t" >&6; }
+if test "x$ac_cv_type_sig_atomic_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define sig_atomic_t int
+_ACEOF
+
+fi
+
+fi
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:$LINENO: checking size of char" >&5
+$as_echo_n "checking size of char... " >&6; }
+if test "${ac_cv_sizeof_char+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (char))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (char))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (char))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (char))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (char))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_char=$ac_lo;;
+'') if test "$ac_cv_type_char" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (char)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (char)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_char=0
+ fi ;;
+esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+static long int longval () { return (long int) (sizeof (char)); }
+static unsigned long int ulongval () { return (long int) (sizeof (char)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (char))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (char))))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (char))))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_char=`cat conftest.val`
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_char" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (char)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (char)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_char=0
+ fi
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5
+$as_echo "$ac_cv_sizeof_char" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_CHAR $ac_cv_sizeof_char
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:$LINENO: checking size of short" >&5
+$as_echo_n "checking size of short... " >&6; }
+if test "${ac_cv_sizeof_short+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_short=$ac_lo;;
+'') if test "$ac_cv_type_short" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (short)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_short=0
+ fi ;;
+esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+static long int longval () { return (long int) (sizeof (short)); }
+static unsigned long int ulongval () { return (long int) (sizeof (short)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (short))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (short))))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (short))))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_short=`cat conftest.val`
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_short" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (short)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_short=0
+ fi
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
+$as_echo "$ac_cv_sizeof_short" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:$LINENO: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if test "${ac_cv_sizeof_int+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_int=$ac_lo;;
+'') if test "$ac_cv_type_int" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (int)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_int=0
+ fi ;;
+esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+static long int longval () { return (long int) (sizeof (int)); }
+static unsigned long int ulongval () { return (long int) (sizeof (int)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (int))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (int))))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (int))))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_int=`cat conftest.val`
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_int" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (int)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_int=0
+ fi
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:$LINENO: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if test "${ac_cv_sizeof_long+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long=$ac_lo;;
+'') if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (long)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_long=0
+ fi ;;
+esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+static long int longval () { return (long int) (sizeof (long)); }
+static unsigned long int ulongval () { return (long int) (sizeof (long)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (long))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (long))))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (long))))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long=`cat conftest.val`
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (long)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_long=0
+ fi
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:$LINENO: checking size of char *" >&5
+$as_echo_n "checking size of char *... " >&6; }
+if test "${ac_cv_sizeof_char_p+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (char *))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (char *))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (char *))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (char *))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (char *))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_char_p=$ac_lo;;
+'') if test "$ac_cv_type_char_p" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (char *)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (char *)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_char_p=0
+ fi ;;
+esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+static long int longval () { return (long int) (sizeof (char *)); }
+static unsigned long int ulongval () { return (long int) (sizeof (char *)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (char *))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (char *))))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (char *))))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_char_p=`cat conftest.val`
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_char_p" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (char *)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (char *)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_char_p=0
+ fi
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_char_p" >&5
+$as_echo "$ac_cv_sizeof_char_p" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:$LINENO: checking size of double" >&5
+$as_echo_n "checking size of double... " >&6; }
+if test "${ac_cv_sizeof_double+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (double))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_double=$ac_lo;;
+'') if test "$ac_cv_type_double" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (double)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_double=0
+ fi ;;
+esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+static long int longval () { return (long int) (sizeof (double)); }
+static unsigned long int ulongval () { return (long int) (sizeof (double)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (double))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (double))))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (double))))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_double=`cat conftest.val`
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_double" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (double)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_double=0
+ fi
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
+$as_echo "$ac_cv_sizeof_double" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_DOUBLE $ac_cv_sizeof_double
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:$LINENO: checking size of long long" >&5
+$as_echo_n "checking size of long long... " >&6; }
+if test "${ac_cv_sizeof_long_long+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long_long=$ac_lo;;
+'') if test "$ac_cv_type_long_long" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (long long)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_long_long=0
+ fi ;;
+esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+static long int longval () { return (long int) (sizeof (long long)); }
+static unsigned long int ulongval () { return (long int) (sizeof (long long)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (long long))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (long long))))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (long long))))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long_long=`cat conftest.val`
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_long_long" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (long long)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_long_long=0
+ fi
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
+$as_echo "$ac_cv_sizeof_long_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
+_ACEOF
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for u_int" >&5
+$as_echo_n "checking for u_int... " >&6; }
+if test "${ac_cv_type_u_int+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_u_int=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (u_int))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((u_int)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_u_int=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_u_int" >&5
+$as_echo "$ac_cv_type_u_int" >&6; }
+if test "x$ac_cv_type_u_int" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define u_int unsigned int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for u_long" >&5
+$as_echo_n "checking for u_long... " >&6; }
+if test "${ac_cv_type_u_long+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_u_long=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (u_long))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((u_long)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_u_long=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_u_long" >&5
+$as_echo "$ac_cv_type_u_long" >&6; }
+if test "x$ac_cv_type_u_long" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define u_long unsigned long
+_ACEOF
+
+fi
+
+
+
+if test "$ac_cv_sizeof_short" = 2; then
+ { $as_echo "$as_me:$LINENO: checking for bits16_t" >&5
+$as_echo_n "checking for bits16_t... " >&6; }
+if test "${ac_cv_type_bits16_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_bits16_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (bits16_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((bits16_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_bits16_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_bits16_t" >&5
+$as_echo "$ac_cv_type_bits16_t" >&6; }
+if test "x$ac_cv_type_bits16_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define bits16_t short
+_ACEOF
+
+fi
+
+elif test "$ac_cv_sizeof_char" = 2; then
+ { $as_echo "$as_me:$LINENO: checking for bits16_t" >&5
+$as_echo_n "checking for bits16_t... " >&6; }
+if test "${ac_cv_type_bits16_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_bits16_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (bits16_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((bits16_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_bits16_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_bits16_t" >&5
+$as_echo "$ac_cv_type_bits16_t" >&6; }
+if test "x$ac_cv_type_bits16_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define bits16_t char
+_ACEOF
+
+fi
+
+else
+ { $as_echo "$as_me:$LINENO: checking for bits16_t" >&5
+$as_echo_n "checking for bits16_t... " >&6; }
+if test "${ac_cv_type_bits16_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_bits16_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (bits16_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((bits16_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_bits16_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_bits16_t" >&5
+$as_echo "$ac_cv_type_bits16_t" >&6; }
+if test "x$ac_cv_type_bits16_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define bits16_t short
+_ACEOF
+
+fi
+
+fi
+
+
+if test "$ac_cv_sizeof_short" = 2; then
+ { $as_echo "$as_me:$LINENO: checking for u_bits16_t" >&5
+$as_echo_n "checking for u_bits16_t... " >&6; }
+if test "${ac_cv_type_u_bits16_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_u_bits16_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (u_bits16_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((u_bits16_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_u_bits16_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_u_bits16_t" >&5
+$as_echo "$ac_cv_type_u_bits16_t" >&6; }
+if test "x$ac_cv_type_u_bits16_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define u_bits16_t unsigned short
+_ACEOF
+
+fi
+
+elif test "$ac_cv_sizeof_char" = 2; then
+ { $as_echo "$as_me:$LINENO: checking for u_bits16_t" >&5
+$as_echo_n "checking for u_bits16_t... " >&6; }
+if test "${ac_cv_type_u_bits16_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_u_bits16_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (u_bits16_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((u_bits16_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_u_bits16_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_u_bits16_t" >&5
+$as_echo "$ac_cv_type_u_bits16_t" >&6; }
+if test "x$ac_cv_type_u_bits16_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define u_bits16_t unsigned char
+_ACEOF
+
+fi
+
+else
+ { $as_echo "$as_me:$LINENO: checking for u_bits16_t" >&5
+$as_echo_n "checking for u_bits16_t... " >&6; }
+if test "${ac_cv_type_u_bits16_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_u_bits16_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (u_bits16_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((u_bits16_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_u_bits16_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_u_bits16_t" >&5
+$as_echo "$ac_cv_type_u_bits16_t" >&6; }
+if test "x$ac_cv_type_u_bits16_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define u_bits16_t unsigned short
+_ACEOF
+
+fi
+
+fi
+
+
+if test "$ac_cv_sizeof_int" = 4; then
+ { $as_echo "$as_me:$LINENO: checking for bits32_t" >&5
+$as_echo_n "checking for bits32_t... " >&6; }
+if test "${ac_cv_type_bits32_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_bits32_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (bits32_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((bits32_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_bits32_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_bits32_t" >&5
+$as_echo "$ac_cv_type_bits32_t" >&6; }
+if test "x$ac_cv_type_bits32_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define bits32_t int
+_ACEOF
+
+fi
+
+elif test "$ac_cv_sizeof_long" = 4; then
+ { $as_echo "$as_me:$LINENO: checking for bits32_t" >&5
+$as_echo_n "checking for bits32_t... " >&6; }
+if test "${ac_cv_type_bits32_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_bits32_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (bits32_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((bits32_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_bits32_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_bits32_t" >&5
+$as_echo "$ac_cv_type_bits32_t" >&6; }
+if test "x$ac_cv_type_bits32_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define bits32_t long
+_ACEOF
+
+fi
+
+else
+ { $as_echo "$as_me:$LINENO: checking for bits32_t" >&5
+$as_echo_n "checking for bits32_t... " >&6; }
+if test "${ac_cv_type_bits32_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_bits32_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (bits32_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((bits32_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_bits32_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_bits32_t" >&5
+$as_echo "$ac_cv_type_bits32_t" >&6; }
+if test "x$ac_cv_type_bits32_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define bits32_t int
+_ACEOF
+
+fi
+
+fi
+
+
+if test "$ac_cv_sizeof_int" = 4; then
+ { $as_echo "$as_me:$LINENO: checking for u_bits32_t" >&5
+$as_echo_n "checking for u_bits32_t... " >&6; }
+if test "${ac_cv_type_u_bits32_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_u_bits32_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (u_bits32_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((u_bits32_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_u_bits32_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_u_bits32_t" >&5
+$as_echo "$ac_cv_type_u_bits32_t" >&6; }
+if test "x$ac_cv_type_u_bits32_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define u_bits32_t unsigned int
+_ACEOF
+
+fi
+
+elif test "$ac_cv_sizeof_long" = 4; then
+ { $as_echo "$as_me:$LINENO: checking for u_bits32_t" >&5
+$as_echo_n "checking for u_bits32_t... " >&6; }
+if test "${ac_cv_type_u_bits32_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_u_bits32_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (u_bits32_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((u_bits32_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_u_bits32_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_u_bits32_t" >&5
+$as_echo "$ac_cv_type_u_bits32_t" >&6; }
+if test "x$ac_cv_type_u_bits32_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define u_bits32_t unsigned long
+_ACEOF
+
+fi
+
+else
+ { $as_echo "$as_me:$LINENO: checking for u_bits32_t" >&5
+$as_echo_n "checking for u_bits32_t... " >&6; }
+if test "${ac_cv_type_u_bits32_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_u_bits32_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (u_bits32_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((u_bits32_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_u_bits32_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_u_bits32_t" >&5
+$as_echo "$ac_cv_type_u_bits32_t" >&6; }
+if test "x$ac_cv_type_u_bits32_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define u_bits32_t unsigned int
+_ACEOF
+
+fi
+
+fi
+
+
+if test "$ac_cv_sizeof_char_p" = 8; then
+ { $as_echo "$as_me:$LINENO: checking for bits64_t" >&5
+$as_echo_n "checking for bits64_t... " >&6; }
+if test "${ac_cv_type_bits64_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_bits64_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (bits64_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((bits64_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_bits64_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_bits64_t" >&5
+$as_echo "$ac_cv_type_bits64_t" >&6; }
+if test "x$ac_cv_type_bits64_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define bits64_t char *
+_ACEOF
+
+fi
+
+elif test "$ac_cv_sizeof_double" = 8; then
+ { $as_echo "$as_me:$LINENO: checking for bits64_t" >&5
+$as_echo_n "checking for bits64_t... " >&6; }
+if test "${ac_cv_type_bits64_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_bits64_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (bits64_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((bits64_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_bits64_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_bits64_t" >&5
+$as_echo "$ac_cv_type_bits64_t" >&6; }
+if test "x$ac_cv_type_bits64_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define bits64_t double
+_ACEOF
+
+fi
+
+elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then
+ { $as_echo "$as_me:$LINENO: checking for bits64_t" >&5
+$as_echo_n "checking for bits64_t... " >&6; }
+if test "${ac_cv_type_bits64_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_bits64_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (bits64_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((bits64_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_bits64_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_bits64_t" >&5
+$as_echo "$ac_cv_type_bits64_t" >&6; }
+if test "x$ac_cv_type_bits64_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define bits64_t long long
+_ACEOF
+
+fi
+
+elif test "$ac_cv_sizeof_long" = 8; then
+ { $as_echo "$as_me:$LINENO: checking for bits64_t" >&5
+$as_echo_n "checking for bits64_t... " >&6; }
+if test "${ac_cv_type_bits64_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_bits64_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (bits64_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((bits64_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_bits64_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_bits64_t" >&5
+$as_echo "$ac_cv_type_bits64_t" >&6; }
+if test "x$ac_cv_type_bits64_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define bits64_t long
+_ACEOF
+
+fi
+
+else
+ { $as_echo "$as_me:$LINENO: checking for bits64_t" >&5
+$as_echo_n "checking for bits64_t... " >&6; }
+if test "${ac_cv_type_bits64_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_bits64_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (bits64_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((bits64_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_bits64_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_bits64_t" >&5
+$as_echo "$ac_cv_type_bits64_t" >&6; }
+if test "x$ac_cv_type_bits64_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define bits64_t double
+_ACEOF
+
+fi
+
+fi
+
+
+
+if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then
+ { $as_echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
+$as_echo_n "checking for ptrdiff_t... " >&6; }
+if test "${ac_cv_type_ptrdiff_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_ptrdiff_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (ptrdiff_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((ptrdiff_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_ptrdiff_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
+$as_echo "$ac_cv_type_ptrdiff_t" >&6; }
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define ptrdiff_t int
+_ACEOF
+
+fi
+
+elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then
+ { $as_echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
+$as_echo_n "checking for ptrdiff_t... " >&6; }
+if test "${ac_cv_type_ptrdiff_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_ptrdiff_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (ptrdiff_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((ptrdiff_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_ptrdiff_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
+$as_echo "$ac_cv_type_ptrdiff_t" >&6; }
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define ptrdiff_t long
+_ACEOF
+
+fi
+
+elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then
+ { $as_echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
+$as_echo_n "checking for ptrdiff_t... " >&6; }
+if test "${ac_cv_type_ptrdiff_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_ptrdiff_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (ptrdiff_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((ptrdiff_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_ptrdiff_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
+$as_echo "$ac_cv_type_ptrdiff_t" >&6; }
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define ptrdiff_t long long
+_ACEOF
+
+fi
+
+else
+ { $as_echo "$as_me:$LINENO: checking for ptrdiff_t" >&5
+$as_echo_n "checking for ptrdiff_t... " >&6; }
+if test "${ac_cv_type_ptrdiff_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_ptrdiff_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (ptrdiff_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((ptrdiff_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_ptrdiff_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ptrdiff_t" >&5
+$as_echo "$ac_cv_type_ptrdiff_t" >&6; }
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define ptrdiff_t int
+_ACEOF
+
+fi
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking whether stat file-mode macros are broken" >&5
+$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
+if test "${ac_cv_header_stat_broken+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined S_ISBLK && defined S_IFDIR
+extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
+#endif
+
+#if defined S_ISBLK && defined S_IFCHR
+extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
+#endif
+
+#if defined S_ISLNK && defined S_IFREG
+extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
+#endif
+
+#if defined S_ISSOCK && defined S_IFREG
+extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_stat_broken=no
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_stat_broken=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stat_broken" >&5
+$as_echo "$ac_cv_header_stat_broken" >&6; }
+if test $ac_cv_header_stat_broken = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STAT_MACROS_BROKEN 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking whether #! works in shell scripts" >&5
+$as_echo_n "checking whether #! works in shell scripts... " >&6; }
+if test "${ac_cv_sys_interpreter+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ echo '#! /bin/cat
+exit 69
+' >conftest
+chmod u+x conftest
+(SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1)
+if test $? -ne 69; then
+ ac_cv_sys_interpreter=yes
+else
+ ac_cv_sys_interpreter=no
+fi
+rm -f conftest
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_interpreter" >&5
+$as_echo "$ac_cv_sys_interpreter" >&6; }
+interpval=$ac_cv_sys_interpreter
+
+if test $ac_cv_sys_interpreter = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_HASH_BANG_EXEC 1
+_ACEOF
+
+fi
+
+if test "$ac_cv_func_lstat" = "no"; then
+{ $as_echo "$as_me:$LINENO: checking for lstat" >&5
+$as_echo_n "checking for lstat... " >&6; }
+if test "${bash_cv_func_lstat+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+int
+main ()
+{
+ lstat(".",(struct stat *)0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_func_lstat=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_func_lstat=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_func_lstat" >&5
+$as_echo "$bash_cv_func_lstat" >&6; }
+if test $bash_cv_func_lstat = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_LSTAT 1
+_ACEOF
+
+fi
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking whether the ctype macros accept non-ascii characters" >&5
+$as_echo_n "checking whether the ctype macros accept non-ascii characters... " >&6; }
+if test "${bash_cv_func_ctype_nonascii+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&5
+$as_echo "$as_me: WARNING: cannot check ctype macros if cross compiling -- defaulting to no" >&2;}
+ bash_cv_func_ctype_nonascii=no
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+#include <stdio.h>
+#include <ctype.h>
+
+main(c, v)
+int c;
+char *v[];
+{
+ char *deflocale;
+ unsigned char x;
+ int r1, r2;
+
+#ifdef HAVE_SETLOCALE
+ /* We take a shot here. If that locale is not known, try the
+ system default. We try this one because '\342' (226) is
+ known to be a printable character in that locale. */
+ deflocale = setlocale(LC_ALL, "en_US.ISO8859-1");
+ if (deflocale == 0)
+ deflocale = setlocale(LC_ALL, "");
+#endif
+
+ x = '\342';
+ r1 = isprint(x);
+ x -= 128;
+ r2 = isprint(x);
+ exit (r1 == 0 || r2 == 0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_func_ctype_nonascii=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_func_ctype_nonascii=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_func_ctype_nonascii" >&5
+$as_echo "$bash_cv_func_ctype_nonascii" >&6; }
+if test $bash_cv_func_ctype_nonascii = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define CTYPE_NON_ASCII 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking if dup2 fails to clear the close-on-exec flag" >&5
+$as_echo_n "checking if dup2 fails to clear the close-on-exec flag... " >&6; }
+if test "${bash_cv_dup2_broken+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&5
+$as_echo "$as_me: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&2;}
+ bash_cv_dup2_broken=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <fcntl.h>
+main()
+{
+ int fd1, fd2, fl;
+ fd1 = open("/dev/null", 2);
+ if (fcntl(fd1, 2, 1) < 0)
+ exit(1);
+ fd2 = dup2(fd1, 1);
+ if (fd2 < 0)
+ exit(2);
+ fl = fcntl(fd2, 1, 0);
+ /* fl will be 1 if dup2 did not reset the close-on-exec flag. */
+ exit(fl != 1);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_dup2_broken=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_dup2_broken=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_dup2_broken" >&5
+$as_echo "$bash_cv_dup2_broken" >&6; }
+if test $bash_cv_dup2_broken = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define DUP2_BROKEN 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking whether pgrps need synchronization" >&5
+$as_echo_n "checking whether pgrps need synchronization... " >&6; }
+if test "${bash_cv_pgrp_pipe+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&5
+$as_echo "$as_me: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&2;}
+ bash_cv_pgrp_pipe=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+main()
+{
+# ifdef GETPGRP_VOID
+# define getpgID() getpgrp()
+# else
+# define getpgID() getpgrp(0)
+# define setpgid(x,y) setpgrp(x,y)
+# endif
+ int pid1, pid2, fds[2];
+ int status;
+ char ok;
+
+ switch (pid1 = fork()) {
+ case -1:
+ exit(1);
+ case 0:
+ setpgid(0, getpid());
+ exit(0);
+ }
+ setpgid(pid1, pid1);
+
+ sleep(2); /* let first child die */
+
+ if (pipe(fds) < 0)
+ exit(2);
+
+ switch (pid2 = fork()) {
+ case -1:
+ exit(3);
+ case 0:
+ setpgid(0, pid1);
+ ok = getpgID() == pid1;
+ write(fds[1], &ok, 1);
+ exit(0);
+ }
+ setpgid(pid2, pid1);
+
+ close(fds[1]);
+ if (read(fds[0], &ok, 1) != 1)
+ exit(4);
+ wait(&status);
+ wait(&status);
+ exit(ok ? 0 : 5);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_pgrp_pipe=no
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_pgrp_pipe=yes
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_pgrp_pipe" >&5
+$as_echo "$bash_cv_pgrp_pipe" >&6; }
+if test $bash_cv_pgrp_pipe = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define PGRP_PIPE 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for type of signal functions" >&5
+$as_echo_n "checking for type of signal functions... " >&6; }
+if test "${bash_cv_signal_vintage+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <signal.h>
+int
+main ()
+{
+
+ sigset_t ss;
+ struct sigaction sa;
+ sigemptyset(&ss); sigsuspend(&ss);
+ sigaction(SIGINT, &sa, (struct sigaction *) 0);
+ sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_signal_vintage=posix
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <signal.h>
+int
+main ()
+{
+
+ int mask = sigmask(SIGINT);
+ sigsetmask(mask); sigblock(mask); sigpause(mask);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_signal_vintage=4.2bsd
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <signal.h>
+ RETSIGTYPE foo() { }
+int
+main ()
+{
+
+ int mask = sigmask(SIGINT);
+ sigset(SIGINT, foo); sigrelse(SIGINT);
+ sighold(SIGINT); sigpause(SIGINT);
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_signal_vintage=svr3
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_signal_vintage=v7
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_signal_vintage" >&5
+$as_echo "$bash_cv_signal_vintage" >&6; }
+if test "$bash_cv_signal_vintage" = posix; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSIX_SIGNALS 1
+_ACEOF
+
+elif test "$bash_cv_signal_vintage" = "4.2bsd"; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_BSD_SIGNALS 1
+_ACEOF
+
+elif test "$bash_cv_signal_vintage" = svr3; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_USG_SIGHOLD 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for sys_errlist and sys_nerr" >&5
+$as_echo_n "checking for sys_errlist and sys_nerr... " >&6; }
+if test "${bash_cv_sys_errlist+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <errno.h>
+int
+main ()
+{
+extern char *sys_errlist[];
+ extern int sys_nerr;
+ char *msg = sys_errlist[sys_nerr - 1];
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_sys_errlist=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_sys_errlist=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_sys_errlist" >&5
+$as_echo "$bash_cv_sys_errlist" >&6; }
+if test $bash_cv_sys_errlist = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_ERRLIST 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for sys_siglist in system C library" >&5
+$as_echo_n "checking for sys_siglist in system C library... " >&6; }
+if test "${bash_cv_sys_siglist+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&5
+$as_echo "$as_me: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&2;}
+ bash_cv_sys_siglist=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <signal.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#if !HAVE_DECL_SYS_SIGLIST
+extern char *sys_siglist[];
+#endif
+main()
+{
+char *msg = sys_siglist[2];
+exit(msg == 0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_sys_siglist=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_sys_siglist=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_sys_siglist" >&5
+$as_echo "$bash_cv_sys_siglist" >&6; }
+if test $bash_cv_sys_siglist = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_SIGLIST 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for _sys_siglist in signal.h or unistd.h" >&5
+$as_echo_n "checking for _sys_siglist in signal.h or unistd.h... " >&6; }
+if test "${bash_cv_decl_under_sys_siglist+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <signal.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+int
+main ()
+{
+ char *msg = _sys_siglist[2];
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_decl_under_sys_siglist=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_decl_under_sys_siglist=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_decl_under_sys_siglist" >&5
+$as_echo "$bash_cv_decl_under_sys_siglist" >&6; }
+if test $bash_cv_decl_under_sys_siglist = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define UNDER_SYS_SIGLIST_DECLARED 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for _sys_siglist in system C library" >&5
+$as_echo_n "checking for _sys_siglist in system C library... " >&6; }
+if test "${bash_cv_under_sys_siglist+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&5
+$as_echo "$as_me: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&2;}
+ bash_cv_under_sys_siglist=no
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <signal.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifndef UNDER_SYS_SIGLIST_DECLARED
+extern char *_sys_siglist[];
+#endif
+main()
+{
+char *msg = (char *)_sys_siglist[2];
+exit(msg == 0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_under_sys_siglist=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_under_sys_siglist=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_under_sys_siglist" >&5
+$as_echo "$bash_cv_under_sys_siglist" >&6; }
+if test $bash_cv_under_sys_siglist = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_UNDER_SYS_SIGLIST 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking whether signal handlers are of type void" >&5
+$as_echo_n "checking whether signal handlers are of type void... " >&6; }
+if test "${bash_cv_void_sighandler+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <signal.h>
+#ifdef signal
+#undef signal
+#endif
+#ifdef __cplusplus
+extern "C"
+#endif
+void (*signal ()) ();
+int
+main ()
+{
+int i;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_void_sighandler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_void_sighandler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_void_sighandler" >&5
+$as_echo "$bash_cv_void_sighandler" >&6; }
+if test $bash_cv_void_sighandler = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define VOID_SIGHANDLER 1
+_ACEOF
+
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for clock_t" >&5
+$as_echo_n "checking for clock_t... " >&6; }
+if test "${bash_cv_type_clock_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#if HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <sys/times.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "clock_t" >/dev/null 2>&1; then
+ bash_cv_type_clock_t=yes
+else
+ bash_cv_type_clock_t=no
+fi
+rm -f conftest*
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_type_clock_t" >&5
+$as_echo "$bash_cv_type_clock_t" >&6; }
+
+if test $bash_cv_type_clock_t = no; then
+ cat >>confdefs.h <<_ACEOF
+#define clock_t long
+_ACEOF
+
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for sigset_t" >&5
+$as_echo_n "checking for sigset_t... " >&6; }
+if test "${bash_cv_type_sigset_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#if HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <signal.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "sigset_t" >/dev/null 2>&1; then
+ bash_cv_type_sigset_t=yes
+else
+ bash_cv_type_sigset_t=no
+fi
+rm -f conftest*
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_type_sigset_t" >&5
+$as_echo "$bash_cv_type_sigset_t" >&6; }
+
+if test $bash_cv_type_sigset_t = no; then
+ cat >>confdefs.h <<_ACEOF
+#define sigset_t int
+_ACEOF
+
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for quad_t" >&5
+$as_echo_n "checking for quad_t... " >&6; }
+if test "${bash_cv_type_quad_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#if HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "quad_t" >/dev/null 2>&1; then
+ bash_cv_type_quad_t=yes
+else
+ bash_cv_type_quad_t=no
+fi
+rm -f conftest*
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_type_quad_t" >&5
+$as_echo "$bash_cv_type_quad_t" >&6; }
+if test $bash_cv_type_quad_t = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_QUAD_T 1
+_ACEOF
+
+ fi
+if test $bash_cv_type_quad_t = no; then
+ cat >>confdefs.h <<_ACEOF
+#define quad_t long
+_ACEOF
+
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for intmax_t" >&5
+$as_echo_n "checking for intmax_t... " >&6; }
+if test "${bash_cv_type_intmax_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#if HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "intmax_t" >/dev/null 2>&1; then
+ bash_cv_type_intmax_t=yes
+else
+ bash_cv_type_intmax_t=no
+fi
+rm -f conftest*
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_type_intmax_t" >&5
+$as_echo "$bash_cv_type_intmax_t" >&6; }
+
+if test $bash_cv_type_intmax_t = no; then
+ cat >>confdefs.h <<_ACEOF
+#define intmax_t $bash_cv_type_long_long
+_ACEOF
+
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for uintmax_t" >&5
+$as_echo_n "checking for uintmax_t... " >&6; }
+if test "${bash_cv_type_uintmax_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#if HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "uintmax_t" >/dev/null 2>&1; then
+ bash_cv_type_uintmax_t=yes
+else
+ bash_cv_type_uintmax_t=no
+fi
+rm -f conftest*
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_type_uintmax_t" >&5
+$as_echo "$bash_cv_type_uintmax_t" >&6; }
+
+if test $bash_cv_type_uintmax_t = no; then
+ cat >>confdefs.h <<_ACEOF
+#define uintmax_t $bash_cv_type_unsigned_long_long
+_ACEOF
+
+fi
+
+if test "$ac_cv_header_sys_socket_h" = "yes"; then
+
+
+{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5
+$as_echo_n "checking for socklen_t... " >&6; }
+if test "${bash_cv_type_socklen_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#if HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#include <sys/socket.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "socklen_t" >/dev/null 2>&1; then
+ bash_cv_type_socklen_t=yes
+else
+ bash_cv_type_socklen_t=no
+fi
+rm -f conftest*
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_type_socklen_t" >&5
+$as_echo "$bash_cv_type_socklen_t" >&6; }
+if test $bash_cv_type_socklen_t = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SOCKLEN_T 1
+_ACEOF
+
+ fi
+if test $bash_cv_type_socklen_t = no; then
+ cat >>confdefs.h <<_ACEOF
+#define socklen_t int
+_ACEOF
+
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: checking for size and type of struct rlimit fields" >&5
+$as_echo_n "checking for size and type of struct rlimit fields... " >&6; }
+if test "${bash_cv_type_rlimit+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/resource.h>
+int
+main ()
+{
+rlim_t xxx;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_type_rlimit=rlim_t
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&5
+$as_echo "$as_me: WARNING: cannot check quad_t if cross compiling -- defaulting to long" >&2;}
+ bash_cv_type_rlimit=long
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+main()
+{
+#ifdef HAVE_QUAD_T
+ struct rlimit rl;
+ if (sizeof(rl.rlim_cur) == sizeof(quad_t))
+ exit(0);
+#endif
+ exit(1);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_type_rlimit=quad_t
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_type_rlimit=long
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_type_rlimit" >&5
+$as_echo "$bash_cv_type_rlimit" >&6; }
+if test $bash_cv_type_rlimit = quad_t; then
+cat >>confdefs.h <<\_ACEOF
+#define RLIMTYPE quad_t
+_ACEOF
+
+elif test $bash_cv_type_rlimit = rlim_t; then
+cat >>confdefs.h <<\_ACEOF
+#define RLIMTYPE rlim_t
+_ACEOF
+
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for struct termios.c_line" >&5
+$as_echo_n "checking for struct termios.c_line... " >&6; }
+if test "${ac_cv_member_struct_termios_c_line+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <termios.h>
+
+
+int
+main ()
+{
+static struct termios ac_aggr;
+if (ac_aggr.c_line)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_termios_c_line=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <termios.h>
+
+
+int
+main ()
+{
+static struct termios ac_aggr;
+if (sizeof ac_aggr.c_line)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_termios_c_line=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_member_struct_termios_c_line=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_termios_c_line" >&5
+$as_echo "$ac_cv_member_struct_termios_c_line" >&6; }
+if test "x$ac_cv_member_struct_termios_c_line" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define TERMIOS_LDISC 1
+_ACEOF
+
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for struct termio.c_line" >&5
+$as_echo_n "checking for struct termio.c_line... " >&6; }
+if test "${ac_cv_member_struct_termio_c_line+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <termio.h>
+
+
+int
+main ()
+{
+static struct termio ac_aggr;
+if (ac_aggr.c_line)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_termio_c_line=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <termio.h>
+
+
+int
+main ()
+{
+static struct termio ac_aggr;
+if (sizeof ac_aggr.c_line)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_termio_c_line=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_member_struct_termio_c_line=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_termio_c_line" >&5
+$as_echo "$ac_cv_member_struct_termio_c_line" >&6; }
+if test "x$ac_cv_member_struct_termio_c_line" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define TERMIO_LDISC 1
+_ACEOF
+
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for struct dirent.d_ino" >&5
+$as_echo_n "checking for struct dirent.d_ino... " >&6; }
+if test "${bash_cv_dirent_has_dino+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif /* SYSNDIR */
+# ifdef HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif /* SYSDIR */
+# ifdef HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif /* HAVE_DIRENT_H */
+
+int
+main ()
+{
+
+struct dirent d; int z; z = d.d_ino;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_dirent_has_dino=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_dirent_has_dino=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_dirent_has_dino" >&5
+$as_echo "$bash_cv_dirent_has_dino" >&6; }
+if test $bash_cv_dirent_has_dino = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_DIRENT_D_INO 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for struct dirent.d_fileno" >&5
+$as_echo_n "checking for struct dirent.d_fileno... " >&6; }
+if test "${bash_cv_dirent_has_d_fileno+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif /* SYSNDIR */
+# ifdef HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif /* SYSDIR */
+# ifdef HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif /* HAVE_DIRENT_H */
+
+int
+main ()
+{
+
+struct dirent d; int z; z = d.d_fileno;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_dirent_has_d_fileno=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_dirent_has_d_fileno=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_dirent_has_d_fileno" >&5
+$as_echo "$bash_cv_dirent_has_d_fileno" >&6; }
+if test $bash_cv_dirent_has_d_fileno = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_DIRENT_D_FILENO 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for struct dirent.d_namlen" >&5
+$as_echo_n "checking for struct dirent.d_namlen... " >&6; }
+if test "${bash_cv_dirent_has_d_namlen+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif /* SYSNDIR */
+# ifdef HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif /* SYSDIR */
+# ifdef HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif /* HAVE_DIRENT_H */
+
+int
+main ()
+{
+
+struct dirent d; int z; z = d.d_namlen;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_dirent_has_d_namlen=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_dirent_has_d_namlen=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_dirent_has_d_namlen" >&5
+$as_echo "$bash_cv_dirent_has_d_namlen" >&6; }
+if test $bash_cv_dirent_has_d_namlen = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_DIRENT_D_NAMLEN 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for struct winsize in sys/ioctl.h and termios.h" >&5
+$as_echo_n "checking for struct winsize in sys/ioctl.h and termios.h... " >&6; }
+if test "${bash_cv_struct_winsize_header+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/ioctl.h>
+int
+main ()
+{
+struct winsize x;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_struct_winsize_header=ioctl_h
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <termios.h>
+int
+main ()
+{
+struct winsize x;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_struct_winsize_header=termios_h
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_struct_winsize_header=other
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+if test $bash_cv_struct_winsize_header = ioctl_h; then
+ { $as_echo "$as_me:$LINENO: result: sys/ioctl.h" >&5
+$as_echo "sys/ioctl.h" >&6; }
+ cat >>confdefs.h <<\_ACEOF
+#define STRUCT_WINSIZE_IN_SYS_IOCTL 1
+_ACEOF
+
+elif test $bash_cv_struct_winsize_header = termios_h; then
+ { $as_echo "$as_me:$LINENO: result: termios.h" >&5
+$as_echo "termios.h" >&6; }
+ cat >>confdefs.h <<\_ACEOF
+#define STRUCT_WINSIZE_IN_TERMIOS 1
+_ACEOF
+
+else
+ { $as_echo "$as_me:$LINENO: result: not found" >&5
+$as_echo "not found" >&6; }
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for struct timeval in sys/time.h and time.h" >&5
+$as_echo_n "checking for struct timeval in sys/time.h and time.h... " >&6; }
+if test "${bash_cv_struct_timeval+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/time.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "struct timeval" >/dev/null 2>&1; then
+ bash_cv_struct_timeval=yes
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <time.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "struct timeval" >/dev/null 2>&1; then
+ bash_cv_struct_timeval=yes
+else
+ bash_cv_struct_timeval=no
+fi
+rm -f conftest*
+
+fi
+rm -f conftest*
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_struct_timeval" >&5
+$as_echo "$bash_cv_struct_timeval" >&6; }
+if test $bash_cv_struct_timeval = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_TIMEVAL 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
+$as_echo_n "checking for struct stat.st_blocks... " >&6; }
+if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static struct stat ac_aggr;
+if (ac_aggr.st_blocks)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_blocks=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static struct stat ac_aggr;
+if (sizeof ac_aggr.st_blocks)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_stat_st_blocks=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_member_struct_stat_st_blocks=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
+$as_echo "$ac_cv_member_struct_stat_st_blocks" >&6; }
+if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_STAT_ST_BLOCKS 1
+_ACEOF
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if test "${ac_cv_struct_tm+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm tm;
+ int *p = &tm.tm_sec;
+ return !p;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_struct_tm=time.h
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_struct_tm=sys/time.h
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+$as_echo "$ac_cv_struct_tm" >&6; }
+if test $ac_cv_struct_tm = sys/time.h; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TM_IN_SYS_TIME 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
+$as_echo_n "checking for struct tm.tm_zone... " >&6; }
+if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (ac_aggr.tm_zone)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_tm_tm_zone=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_cv_struct_tm>
+
+
+int
+main ()
+{
+static struct tm ac_aggr;
+if (sizeof ac_aggr.tm_zone)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_member_struct_tm_tm_zone=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_member_struct_tm_tm_zone=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
+$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
+if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_TM_TM_ZONE 1
+_ACEOF
+
+
+fi
+
+if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TM_ZONE 1
+_ACEOF
+
+else
+ { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
+$as_echo_n "checking whether tzname is declared... " >&6; }
+if test "${ac_cv_have_decl_tzname+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <time.h>
+
+int
+main ()
+{
+#ifndef tzname
+ (void) tzname;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_tzname=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_tzname=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
+$as_echo "$ac_cv_have_decl_tzname" >&6; }
+if test "x$ac_cv_have_decl_tzname" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_TZNAME 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_TZNAME 0
+_ACEOF
+
+
+fi
+
+
+ { $as_echo "$as_me:$LINENO: checking for tzname" >&5
+$as_echo_n "checking for tzname... " >&6; }
+if test "${ac_cv_var_tzname+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <time.h>
+#if !HAVE_DECL_TZNAME
+extern char *tzname[];
+#endif
+
+int
+main ()
+{
+return tzname[0][0];
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_var_tzname=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_var_tzname=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
+$as_echo "$ac_cv_var_tzname" >&6; }
+ if test $ac_cv_var_tzname = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_TZNAME 1
+_ACEOF
+
+ fi
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for struct timezone in sys/time.h and time.h" >&5
+$as_echo_n "checking for struct timezone in sys/time.h and time.h... " >&6; }
+if test "${bash_cv_struct_timezone+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/time.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "struct timezone" >/dev/null 2>&1; then
+ bash_cv_struct_timezone=yes
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <time.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "struct timezone" >/dev/null 2>&1; then
+ bash_cv_struct_timezone=yes
+else
+ bash_cv_struct_timezone=no
+fi
+rm -f conftest*
+
+fi
+rm -f conftest*
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_struct_timezone" >&5
+$as_echo "$bash_cv_struct_timezone" >&6; }
+if test $bash_cv_struct_timezone = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRUCT_TIMEZONE 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for the existence of strsignal" >&5
+$as_echo_n "checking for the existence of strsignal... " >&6; }
+if test "${bash_cv_have_strsignal+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <signal.h>
+int
+main ()
+{
+char *s = (char *)strsignal(2);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_have_strsignal=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_have_strsignal=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_have_strsignal" >&5
+$as_echo "$bash_cv_have_strsignal" >&6; }
+if test $bash_cv_have_strsignal = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STRSIGNAL 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking if opendir() opens non-directories" >&5
+$as_echo_n "checking if opendir() opens non-directories... " >&6; }
+if test "${bash_cv_opendir_not_robust+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&5
+$as_echo "$as_me: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&2;}
+ bash_cv_opendir_not_robust=no
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+#if defined(HAVE_DIRENT_H)
+# include <dirent.h>
+#else
+# define dirent direct
+# ifdef HAVE_SYS_NDIR_H
+# include <sys/ndir.h>
+# endif /* SYSNDIR */
+# ifdef HAVE_SYS_DIR_H
+# include <sys/dir.h>
+# endif /* SYSDIR */
+# ifdef HAVE_NDIR_H
+# include <ndir.h>
+# endif
+#endif /* HAVE_DIRENT_H */
+main()
+{
+DIR *dir;
+int fd, err;
+err = mkdir("bash-aclocal", 0700);
+if (err < 0) {
+ perror("mkdir");
+ exit(1);
+}
+unlink("bash-aclocal/not_a_directory");
+fd = open("bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666);
+write(fd, "\n", 1);
+close(fd);
+dir = opendir("bash-aclocal/not_a_directory");
+unlink("bash-aclocal/not_a_directory");
+rmdir("bash-aclocal");
+exit (dir == 0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_opendir_not_robust=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_opendir_not_robust=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_opendir_not_robust" >&5
+$as_echo "$bash_cv_opendir_not_robust" >&6; }
+if test $bash_cv_opendir_not_robust = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define OPENDIR_NOT_ROBUST 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether ulimit can substitute for getdtablesize" >&5
+$as_echo_n "checking whether ulimit can substitute for getdtablesize... " >&6; }
+if test "${bash_cv_ulimit_maxfds+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&5
+$as_echo "$as_me: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&2;}
+ bash_cv_ulimit_maxfds=no
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+main()
+{
+long maxfds = ulimit(4, 0L);
+exit (maxfds == -1L);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_ulimit_maxfds=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_ulimit_maxfds=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_ulimit_maxfds" >&5
+$as_echo "$bash_cv_ulimit_maxfds" >&6; }
+if test $bash_cv_ulimit_maxfds = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define ULIMIT_MAXFDS 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:$LINENO: checking whether fpurge is declared" >&5
+$as_echo_n "checking whether fpurge is declared... " >&6; }
+if test "${ac_cv_have_decl_fpurge+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+
+int
+main ()
+{
+#ifndef fpurge
+ (void) fpurge;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_have_decl_fpurge=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_have_decl_fpurge=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_fpurge" >&5
+$as_echo "$ac_cv_have_decl_fpurge" >&6; }
+if test "x$ac_cv_have_decl_fpurge" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPURGE 1
+_ACEOF
+
+
+else
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPURGE 0
+_ACEOF
+
+
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking to see if getenv can be redefined" >&5
+$as_echo_n "checking to see if getenv can be redefined... " >&6; }
+if test "${bash_cv_getenv_redef+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&5
+$as_echo "$as_me: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&2;}
+ bash_cv_getenv_redef=yes
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#ifndef __STDC__
+# ifndef const
+# define const
+# endif
+#endif
+char *
+getenv (name)
+#if defined (__linux__) || defined (__bsdi__) || defined (convex)
+ const char *name;
+#else
+ char const *name;
+#endif /* !__linux__ && !__bsdi__ && !convex */
+{
+return "42";
+}
+main()
+{
+char *s;
+/* The next allows this program to run, but does not allow bash to link
+ when it redefines getenv. I'm not really interested in figuring out
+ why not. */
+#if defined (NeXT)
+exit(1);
+#endif
+s = getenv("ABCDE");
+exit(s == 0); /* force optimizer to leave getenv in */
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_getenv_redef=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_getenv_redef=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_getenv_redef" >&5
+$as_echo "$bash_cv_getenv_redef" >&6; }
+if test $bash_cv_getenv_redef = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define CAN_REDEFINE_GETENV 1
+_ACEOF
+
+fi
+
+if test "$ac_cv_func_getcwd" = "yes"; then
+{ $as_echo "$as_me:$LINENO: checking if getcwd() will dynamically allocate memory with 0 size" >&5
+$as_echo_n "checking if getcwd() will dynamically allocate memory with 0 size... " >&6; }
+if test "${bash_cv_getcwd_malloc+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&5
+$as_echo "$as_me: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&2;}
+ bash_cv_getcwd_malloc=no
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+main()
+{
+ char *xpwd;
+ xpwd = getcwd(0, 0);
+ exit (xpwd == 0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_getcwd_malloc=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_getcwd_malloc=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_getcwd_malloc" >&5
+$as_echo "$bash_cv_getcwd_malloc" >&6; }
+if test $bash_cv_getcwd_malloc = no; then
+cat >>confdefs.h <<\_ACEOF
+#define GETCWD_BROKEN 1
+_ACEOF
+
+case " $LIBOBJS " in
+ *" getcwd.$ac_objext "* ) ;;
+ *) LIBOBJS="$LIBOBJS getcwd.$ac_objext"
+ ;;
+esac
+
+fi
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5
+$as_echo_n "checking for presence of POSIX-style sigsetjmp/siglongjmp... " >&6; }
+if test "${bash_cv_func_sigsetjmp+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&5
+$as_echo "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to missing" >&2;}
+ bash_cv_func_sigsetjmp=missing
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <sys/types.h>
+#include <signal.h>
+#include <setjmp.h>
+
+main()
+{
+#if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS)
+exit (1);
+#else
+
+int code;
+sigset_t set, oset;
+sigjmp_buf xx;
+
+/* get the mask */
+sigemptyset(&set);
+sigemptyset(&oset);
+sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &set);
+sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset);
+
+/* save it */
+code = sigsetjmp(xx, 1);
+if (code)
+ exit(0); /* could get sigmask and compare to oset here. */
+
+/* change it */
+sigaddset(&set, SIGINT);
+sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL);
+
+/* and siglongjmp */
+siglongjmp(xx, 10);
+exit(1);
+#endif
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_func_sigsetjmp=present
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_func_sigsetjmp=missing
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_func_sigsetjmp" >&5
+$as_echo "$bash_cv_func_sigsetjmp" >&6; }
+if test $bash_cv_func_sigsetjmp = present; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_POSIX_SIGSETJMP 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking whether or not strcoll and strcmp differ" >&5
+$as_echo_n "checking whether or not strcoll and strcmp differ... " >&6; }
+if test "${bash_cv_func_strcoll_broken+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5
+$as_echo "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;}
+ bash_cv_func_strcoll_broken=no
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdio.h>
+#if defined (HAVE_LOCALE_H)
+#include <locale.h>
+#endif
+
+main(c, v)
+int c;
+char *v[];
+{
+ int r1, r2;
+ char *deflocale, *defcoll;
+
+#ifdef HAVE_SETLOCALE
+ deflocale = setlocale(LC_ALL, "");
+ defcoll = setlocale(LC_COLLATE, "");
+#endif
+
+#ifdef HAVE_STRCOLL
+ /* These two values are taken from tests/glob-test. */
+ r1 = strcoll("abd", "aXd");
+#else
+ r1 = 0;
+#endif
+ r2 = strcmp("abd", "aXd");
+
+ /* These two should both be greater than 0. It is permissible for
+ a system to return different values, as long as the sign is the
+ same. */
+
+ /* Exit with 1 (failure) if these two values are both > 0, since
+ this tests whether strcoll(3) is broken with respect to strcmp(3)
+ in the default locale. */
+ exit (r1 > 0 && r2 > 0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_func_strcoll_broken=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_func_strcoll_broken=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_func_strcoll_broken" >&5
+$as_echo "$bash_cv_func_strcoll_broken" >&6; }
+if test $bash_cv_func_strcoll_broken = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define STRCOLL_BROKEN 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+
+
+
+
+ if test X$ac_cv_func_snprintf = Xyes; then
+ { $as_echo "$as_me:$LINENO: checking for standard-conformant snprintf" >&5
+$as_echo_n "checking for standard-conformant snprintf... " >&6; }
+if test "${bash_cv_func_snprintf+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check standard snprintf if cross-compiling" >&5
+$as_echo "$as_me: WARNING: cannot check standard snprintf if cross-compiling" >&2;}
+ bash_cv_func_snprintf=yes
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdio.h>
+
+main()
+{
+ int n;
+ n = snprintf (0, 0, "%s", "0123456");
+ exit(n != 7);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_func_snprintf=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_func_snprintf=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_func_snprintf" >&5
+$as_echo "$bash_cv_func_snprintf" >&6; }
+ if test $bash_cv_func_snprintf = no; then
+ ac_cv_func_snprintf=no
+ fi
+ fi
+ if test $ac_cv_func_snprintf = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SNPRINTF 0
+_ACEOF
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ if test X$ac_cv_func_vsnprintf = Xyes; then
+ { $as_echo "$as_me:$LINENO: checking for standard-conformant vsnprintf" >&5
+$as_echo_n "checking for standard-conformant vsnprintf... " >&6; }
+if test "${bash_cv_func_vsnprintf+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check standard vsnprintf if cross-compiling" >&5
+$as_echo "$as_me: WARNING: cannot check standard vsnprintf if cross-compiling" >&2;}
+ bash_cv_func_vsnprintf=yes
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if HAVE_STDARG_H
+#include <stdarg.h>
+#else
+#include <varargs.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+
+static int
+#if HAVE_STDARG_H
+foo(const char *fmt, ...)
+#else
+foo(format, va_alist)
+ const char *format;
+ va_dcl
+#endif
+{
+ va_list args;
+ int n;
+
+#if HAVE_STDARG_H
+ va_start(args, fmt);
+#else
+ va_start(args);
+#endif
+ n = vsnprintf(0, 0, fmt, args);
+ va_end (args);
+ return n;
+}
+
+main()
+{
+ int n;
+ n = foo("%s", "0123456");
+ exit(n != 7);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_func_vsnprintf=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_func_vsnprintf=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_func_vsnprintf" >&5
+$as_echo "$bash_cv_func_vsnprintf" >&6; }
+ if test $bash_cv_func_vsnprintf = no; then
+ ac_cv_func_vsnprintf=no
+ fi
+ fi
+ if test $ac_cv_func_vsnprintf = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_VSNPRINTF 0
+_ACEOF
+
+ fi
+
+
+
+if test "$ac_cv_func_putenv" = "yes"; then
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for standard-conformant putenv declaration" >&5
+$as_echo_n "checking for standard-conformant putenv declaration... " >&6; }
+if test "${bash_cv_std_putenv+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#ifndef __STDC__
+# ifndef const
+# define const
+# endif
+#endif
+#ifdef PROTOTYPES
+extern int putenv (char *);
+#else
+extern int putenv ();
+#endif
+
+int
+main ()
+{
+return (putenv == 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_std_putenv=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_std_putenv=no
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_std_putenv" >&5
+$as_echo "$bash_cv_std_putenv" >&6; }
+if test $bash_cv_std_putenv = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STD_PUTENV 1
+_ACEOF
+
+fi
+
+else
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STD_PUTENV 1
+_ACEOF
+
+fi
+if test "$ac_cv_func_unsetenv" = "yes"; then
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for standard-conformant unsetenv declaration" >&5
+$as_echo_n "checking for standard-conformant unsetenv declaration... " >&6; }
+if test "${bash_cv_std_unsetenv+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#ifndef __STDC__
+# ifndef const
+# define const
+# endif
+#endif
+#ifdef PROTOTYPES
+extern int unsetenv (const char *);
+#else
+extern int unsetenv ();
+#endif
+
+int
+main ()
+{
+return (unsetenv == 0);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ bash_cv_std_unsetenv=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_std_unsetenv=no
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_std_unsetenv" >&5
+$as_echo "$bash_cv_std_unsetenv" >&6; }
+if test $bash_cv_std_unsetenv = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STD_UNSETENV 1
+_ACEOF
+
+fi
+
+else
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_STD_UNSETENV 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for printf floating point output in hex notation" >&5
+$as_echo_n "checking for printf floating point output in hex notation... " >&6; }
+if test "${bash_cv_printf_a_format+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check printf if cross compiling -- defaulting to no" >&5
+$as_echo "$as_me: WARNING: cannot check printf if cross compiling -- defaulting to no" >&2;}
+ bash_cv_printf_a_format=no
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+
+int
+main()
+{
+ double y = 0.0;
+ char abuf[1024];
+
+ sprintf(abuf, "%A", y);
+ exit(strchr(abuf, 'P') == (char *)0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_printf_a_format=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_printf_a_format=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_printf_a_format" >&5
+$as_echo "$bash_cv_printf_a_format" >&6; }
+if test $bash_cv_printf_a_format = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_PRINTF_A_FORMAT 1
+_ACEOF
+
+fi
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking if signal handlers must be reinstalled when invoked" >&5
+$as_echo_n "checking if signal handlers must be reinstalled when invoked... " >&6; }
+if test "${bash_cv_must_reinstall_sighandlers+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5
+$as_echo "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;}
+ bash_cv_must_reinstall_sighandlers=no
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <signal.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+typedef RETSIGTYPE sigfunc();
+
+int nsigint;
+
+#ifdef HAVE_POSIX_SIGNALS
+sigfunc *
+set_signal_handler(sig, handler)
+ int sig;
+ sigfunc *handler;
+{
+ struct sigaction act, oact;
+ act.sa_handler = handler;
+ act.sa_flags = 0;
+ sigemptyset (&act.sa_mask);
+ sigemptyset (&oact.sa_mask);
+ sigaction (sig, &act, &oact);
+ return (oact.sa_handler);
+}
+#else
+#define set_signal_handler(s, h) signal(s, h)
+#endif
+
+RETSIGTYPE
+sigint(s)
+int s;
+{
+ nsigint++;
+}
+
+main()
+{
+ nsigint = 0;
+ set_signal_handler(SIGINT, sigint);
+ kill((int)getpid(), SIGINT);
+ kill((int)getpid(), SIGINT);
+ exit(nsigint != 2);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_must_reinstall_sighandlers=no
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_must_reinstall_sighandlers=yes
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_must_reinstall_sighandlers" >&5
+$as_echo "$bash_cv_must_reinstall_sighandlers" >&6; }
+if test $bash_cv_must_reinstall_sighandlers = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define MUST_REINSTALL_SIGHANDLERS 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for presence of necessary job control definitions" >&5
+$as_echo_n "checking for presence of necessary job control definitions... " >&6; }
+if test "${bash_cv_job_control_missing+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check job control if cross-compiling -- defaulting to missing" >&5
+$as_echo "$as_me: WARNING: cannot check job control if cross-compiling -- defaulting to missing" >&2;}
+ bash_cv_job_control_missing=missing
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <signal.h>
+
+/* Add more tests in here as appropriate. */
+main()
+{
+/* signal type */
+#if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS)
+exit(1);
+#endif
+
+/* signals and tty control. */
+#if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT)
+exit (1);
+#endif
+
+/* process control */
+#if !defined (WNOHANG) || !defined (WUNTRACED)
+exit(1);
+#endif
+
+/* Posix systems have tcgetpgrp and waitpid. */
+#if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP)
+exit(1);
+#endif
+
+#if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID)
+exit(1);
+#endif
+
+/* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */
+#if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3)
+exit(1);
+#endif
+
+exit(0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_job_control_missing=present
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_job_control_missing=missing
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_job_control_missing" >&5
+$as_echo "$bash_cv_job_control_missing" >&6; }
+if test $bash_cv_job_control_missing = missing; then
+cat >>confdefs.h <<\_ACEOF
+#define JOB_CONTROL_MISSING 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for presence of named pipes" >&5
+$as_echo_n "checking for presence of named pipes... " >&6; }
+if test "${bash_cv_sys_named_pipes+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&5
+$as_echo "$as_me: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&2;}
+ bash_cv_sys_named_pipes=missing
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+/* Add more tests in here as appropriate. */
+main()
+{
+int fd, err;
+
+#if defined (HAVE_MKFIFO)
+exit (0);
+#endif
+
+#if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO))
+exit (1);
+#endif
+
+#if defined (NeXT)
+exit (1);
+#endif
+err = mkdir("bash-aclocal", 0700);
+if (err < 0) {
+ perror ("mkdir");
+ exit(1);
+}
+fd = mknod ("bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0);
+if (fd == -1) {
+ rmdir ("bash-aclocal");
+ exit (1);
+}
+close(fd);
+unlink ("bash-aclocal/sh-np-autoconf");
+rmdir ("bash-aclocal");
+exit(0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_sys_named_pipes=present
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_sys_named_pipes=missing
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_sys_named_pipes" >&5
+$as_echo "$bash_cv_sys_named_pipes" >&6; }
+if test $bash_cv_sys_named_pipes = missing; then
+cat >>confdefs.h <<\_ACEOF
+#define NAMED_PIPES_MISSING 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking whether termios.h defines TIOCGWINSZ" >&5
+$as_echo_n "checking whether termios.h defines TIOCGWINSZ... " >&6; }
+if test "${ac_cv_sys_tiocgwinsz_in_termios_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <termios.h>
+#ifdef TIOCGWINSZ
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ ac_cv_sys_tiocgwinsz_in_termios_h=yes
+else
+ ac_cv_sys_tiocgwinsz_in_termios_h=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5
+$as_echo "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; }
+
+if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then
+ { $as_echo "$as_me:$LINENO: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5
+$as_echo_n "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; }
+if test "${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/ioctl.h>
+#ifdef TIOCGWINSZ
+ yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then
+ ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes
+else
+ ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5
+$as_echo "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; }
+
+ if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define GWINSZ_IN_SYS_IOCTL 1
+_ACEOF
+
+ fi
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for TIOCSTAT in sys/ioctl.h" >&5
+$as_echo_n "checking for TIOCSTAT in sys/ioctl.h... " >&6; }
+if test "${bash_cv_tiocstat_in_ioctl+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/ioctl.h>
+int
+main ()
+{
+int x = TIOCSTAT;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_tiocstat_in_ioctl=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_tiocstat_in_ioctl=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_tiocstat_in_ioctl" >&5
+$as_echo "$bash_cv_tiocstat_in_ioctl" >&6; }
+if test $bash_cv_tiocstat_in_ioctl = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define TIOCSTAT_IN_SYS_IOCTL 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for FIONREAD in sys/ioctl.h" >&5
+$as_echo_n "checking for FIONREAD in sys/ioctl.h... " >&6; }
+if test "${bash_cv_fionread_in_ioctl+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/ioctl.h>
+int
+main ()
+{
+int x = FIONREAD;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_fionread_in_ioctl=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_fionread_in_ioctl=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_fionread_in_ioctl" >&5
+$as_echo "$bash_cv_fionread_in_ioctl" >&6; }
+if test $bash_cv_fionread_in_ioctl = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define FIONREAD_IN_SYS_IOCTL 1
+_ACEOF
+
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking whether WCONTINUED flag to waitpid is unavailable or available but broken" >&5
+$as_echo_n "checking whether WCONTINUED flag to waitpid is unavailable or available but broken... " >&6; }
+if test "${bash_cv_wcontinued_broken+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&5
+$as_echo "$as_me: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&2;}
+ bash_cv_wcontinued_broken=no
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+#include <errno.h>
+
+#ifndef errno
+extern int errno;
+#endif
+main()
+{
+ int x;
+
+ x = waitpid(-1, (int *)0, WNOHANG|WCONTINUED);
+ if (x == -1 && errno == EINVAL)
+ exit (1);
+ else
+ exit (0);
+}
+
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_wcontinued_broken=no
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_wcontinued_broken=yes
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_wcontinued_broken" >&5
+$as_echo "$bash_cv_wcontinued_broken" >&6; }
+if test $bash_cv_wcontinued_broken = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define WCONTINUED_BROKEN 1
+_ACEOF
+
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for speed_t in sys/types.h" >&5
+$as_echo_n "checking for speed_t in sys/types.h... " >&6; }
+if test "${bash_cv_speed_t_in_sys_types+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+int
+main ()
+{
+speed_t x;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_speed_t_in_sys_types=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_speed_t_in_sys_types=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_speed_t_in_sys_types" >&5
+$as_echo "$bash_cv_speed_t_in_sys_types" >&6; }
+if test $bash_cv_speed_t_in_sys_types = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define SPEED_T_IN_SYS_TYPES 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether getpw functions are declared in pwd.h" >&5
+$as_echo_n "checking whether getpw functions are declared in pwd.h... " >&6; }
+if test "${bash_cv_getpw_declared+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <pwd.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "getpwuid" >/dev/null 2>&1; then
+ bash_cv_getpw_declared=yes
+else
+ bash_cv_getpw_declared=no
+fi
+rm -f conftest*
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_getpw_declared" >&5
+$as_echo "$bash_cv_getpw_declared" >&6; }
+if test $bash_cv_getpw_declared = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETPW_DECLS 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for unusable real-time signals due to large values" >&5
+$as_echo_n "checking for unusable real-time signals due to large values... " >&6; }
+if test "${bash_cv_unusable_rtsigs+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ { $as_echo "$as_me:$LINENO: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&5
+$as_echo "$as_me: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&2;}
+ bash_cv_unusable_rtsigs=yes
+
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <signal.h>
+
+#ifndef NSIG
+# define NSIG 64
+#endif
+
+main ()
+{
+ int n_sigs = 2 * NSIG;
+#ifdef SIGRTMIN
+ int rtmin = SIGRTMIN;
+#else
+ int rtmin = 0;
+#endif
+
+ exit(rtmin < n_sigs);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ bash_cv_unusable_rtsigs=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+bash_cv_unusable_rtsigs=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_unusable_rtsigs" >&5
+$as_echo "$bash_cv_unusable_rtsigs" >&6; }
+if test $bash_cv_unusable_rtsigs = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define UNUSABLE_RT_SIGNALS 1
+_ACEOF
+
+fi
+
+
+
+
+
+if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then
+ SIGLIST_O=siglist.o
+else
+ SIGLIST_O=
+fi
+
+
+
+case "$host_os" in
+hpux*) { $as_echo "$as_me:$LINENO: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5
+$as_echo_n "checking whether $host_os needs _KERNEL for RLIMIT defines... " >&6; }
+if test "${bash_cv_kernel_rlimit+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#include <sys/resource.h>
+
+int
+main ()
+{
+
+ int f;
+ f = RLIMIT_DATA;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_kernel_rlimit=no
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <sys/types.h>
+#define _KERNEL
+#include <sys/resource.h>
+#undef _KERNEL
+
+int
+main ()
+{
+
+ int f;
+ f = RLIMIT_DATA;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ bash_cv_kernel_rlimit=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ bash_cv_kernel_rlimit=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_kernel_rlimit" >&5
+$as_echo "$bash_cv_kernel_rlimit" >&6; }
+if test $bash_cv_kernel_rlimit = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define RLIMIT_NEEDS_KERNEL 1
+_ACEOF
+
+fi
+ ;;
+esac
+
+if test "$opt_readline" = yes; then
+case "$host_os" in
+aix*) prefer_curses=yes ;;
+esac
+
+if test "X$bash_cv_termcap_lib" = "X"; then
+_bash_needmsg=yes
+else
+{ $as_echo "$as_me:$LINENO: checking which library has the termcap functions" >&5
+$as_echo_n "checking which library has the termcap functions... " >&6; }
+_bash_needmsg=
+fi
+if test "${bash_cv_termcap_lib+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ { $as_echo "$as_me:$LINENO: checking for tgetent" >&5
+$as_echo_n "checking for tgetent... " >&6; }
+if test "${ac_cv_func_tgetent+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define tgetent to an innocuous variant, in case <limits.h> declares tgetent.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define tgetent innocuous_tgetent
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char tgetent (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef tgetent
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tgetent ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_tgetent || defined __stub___tgetent
+choke me
+#endif
+
+int
+main ()
+{
+return tgetent ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_tgetent=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_tgetent=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_tgetent" >&5
+$as_echo "$ac_cv_func_tgetent" >&6; }
+if test "x$ac_cv_func_tgetent" = x""yes; then
+ bash_cv_termcap_lib=libc
+else
+ { $as_echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5
+$as_echo_n "checking for tgetent in -ltermcap... " >&6; }
+if test "${ac_cv_lib_termcap_tgetent+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltermcap $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tgetent ();
+int
+main ()
+{
+return tgetent ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_termcap_tgetent=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_termcap_tgetent=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5
+$as_echo "$ac_cv_lib_termcap_tgetent" >&6; }
+if test "x$ac_cv_lib_termcap_tgetent" = x""yes; then
+ bash_cv_termcap_lib=libtermcap
+else
+ { $as_echo "$as_me:$LINENO: checking for tgetent in -ltinfo" >&5
+$as_echo_n "checking for tgetent in -ltinfo... " >&6; }
+if test "${ac_cv_lib_tinfo_tgetent+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ltinfo $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tgetent ();
+int
+main ()
+{
+return tgetent ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_tinfo_tgetent=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_tinfo_tgetent=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_tinfo_tgetent" >&5
+$as_echo "$ac_cv_lib_tinfo_tgetent" >&6; }
+if test "x$ac_cv_lib_tinfo_tgetent" = x""yes; then
+ bash_cv_termcap_lib=libtinfo
+else
+ { $as_echo "$as_me:$LINENO: checking for tgetent in -lcurses" >&5
+$as_echo_n "checking for tgetent in -lcurses... " >&6; }
+if test "${ac_cv_lib_curses_tgetent+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lcurses $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tgetent ();
+int
+main ()
+{
+return tgetent ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_curses_tgetent=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_curses_tgetent=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_curses_tgetent" >&5
+$as_echo "$ac_cv_lib_curses_tgetent" >&6; }
+if test "x$ac_cv_lib_curses_tgetent" = x""yes; then
+ bash_cv_termcap_lib=libcurses
+else
+ { $as_echo "$as_me:$LINENO: checking for tgetent in -lncurses" >&5
+$as_echo_n "checking for tgetent in -lncurses... " >&6; }
+if test "${ac_cv_lib_ncurses_tgetent+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lncurses $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char tgetent ();
+int
+main ()
+{
+return tgetent ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_ncurses_tgetent=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_ncurses_tgetent=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ncurses_tgetent" >&5
+$as_echo "$ac_cv_lib_ncurses_tgetent" >&6; }
+if test "x$ac_cv_lib_ncurses_tgetent" = x""yes; then
+ bash_cv_termcap_lib=libncurses
+else
+ bash_cv_termcap_lib=gnutermcap
+fi
+
+fi
+
+fi
+
+fi
+
+fi
+
+fi
+
+if test "X$_bash_needmsg" = "Xyes"; then
+{ $as_echo "$as_me:$LINENO: checking which library has the termcap functions" >&5
+$as_echo_n "checking which library has the termcap functions... " >&6; }
+fi
+{ $as_echo "$as_me:$LINENO: result: using $bash_cv_termcap_lib" >&5
+$as_echo "using $bash_cv_termcap_lib" >&6; }
+if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then
+LDFLAGS="$LDFLAGS -L./lib/termcap"
+TERMCAP_LIB="./lib/termcap/libtermcap.a"
+TERMCAP_DEP="./lib/termcap/libtermcap.a"
+elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then
+TERMCAP_LIB=-ltermcap
+TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libtinfo; then
+TERMCAP_LIB=-ltinfo
+TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libncurses; then
+TERMCAP_LIB=-lncurses
+TERMCAP_DEP=
+elif test $bash_cv_termcap_lib = libc; then
+TERMCAP_LIB=
+TERMCAP_DEP=
+else
+TERMCAP_LIB=-lcurses
+TERMCAP_DEP=
+fi
+
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking whether /dev/fd is available" >&5
+$as_echo_n "checking whether /dev/fd is available... " >&6; }
+if test "${bash_cv_dev_fd+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ bash_cv_dev_fd=""
+if test -d /dev/fd && (exec test -r /dev/fd/0 < /dev/null) ; then
+# check for systems like FreeBSD 5 that only provide /dev/fd/[012]
+ if (exec test -r /dev/fd/3 3</dev/null) ; then
+ bash_cv_dev_fd=standard
+ else
+ bash_cv_dev_fd=absent
+ fi
+fi
+if test -z "$bash_cv_dev_fd" ; then
+ if test -d /proc/self/fd && (exec test -r /proc/self/fd/0 < /dev/null) ; then
+ bash_cv_dev_fd=whacky
+ else
+ bash_cv_dev_fd=absent
+ fi
+fi
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_dev_fd" >&5
+$as_echo "$bash_cv_dev_fd" >&6; }
+if test $bash_cv_dev_fd = "standard"; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_DEV_FD 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define DEV_FD_PREFIX "/dev/fd/"
+_ACEOF
+
+elif test $bash_cv_dev_fd = "whacky"; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_DEV_FD 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define DEV_FD_PREFIX "/proc/self/fd/"
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether /dev/stdin stdout stderr are available" >&5
+$as_echo_n "checking whether /dev/stdin stdout stderr are available... " >&6; }
+if test "${bash_cv_dev_stdin+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -d /dev/fd && (exec test -r /dev/stdin < /dev/null) ; then
+ bash_cv_dev_stdin=present
+ elif test -d /proc/self/fd && (exec test -r /dev/stdin < /dev/null) ; then
+ bash_cv_dev_stdin=present
+ else
+ bash_cv_dev_stdin=absent
+ fi
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_dev_stdin" >&5
+$as_echo "$bash_cv_dev_stdin" >&6; }
+if test $bash_cv_dev_stdin = "present"; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_DEV_STDIN 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for default mail directory" >&5
+$as_echo_n "checking for default mail directory... " >&6; }
+if test "${bash_cv_mail_dir+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -d /var/mail; then
+ bash_cv_mail_dir=/var/mail
+ elif test -d /var/spool/mail; then
+ bash_cv_mail_dir=/var/spool/mail
+ elif test -d /usr/mail; then
+ bash_cv_mail_dir=/usr/mail
+ elif test -d /usr/spool/mail; then
+ bash_cv_mail_dir=/usr/spool/mail
+ else
+ bash_cv_mail_dir=unknown
+ fi
+
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $bash_cv_mail_dir" >&5
+$as_echo "$bash_cv_mail_dir" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define DEFAULT_MAIL_DIRECTORY "$bash_cv_mail_dir"
+_ACEOF
+
+
+
+if test "$bash_cv_job_control_missing" = missing; then
+ opt_job_control=no
+fi
+
+if test "$opt_job_control" = yes; then
+cat >>confdefs.h <<\_ACEOF
+#define JOB_CONTROL 1
+_ACEOF
+
+JOBS_O=jobs.o
+else
+JOBS_O=nojobs.o
+fi
+
+
+
+
+LOCAL_DEFS=-DSHELL
+
+
+case "${host_os}" in
+sysv4.2*) cat >>confdefs.h <<\_ACEOF
+#define SVR4_2 1
+_ACEOF
+
+ cat >>confdefs.h <<\_ACEOF
+#define SVR4 1
+_ACEOF
+ ;;
+sysv4*) cat >>confdefs.h <<\_ACEOF
+#define SVR4 1
+_ACEOF
+ ;;
+sysv5*) cat >>confdefs.h <<\_ACEOF
+#define SVR5 1
+_ACEOF
+ ;;
+hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX" ;;
+hpux*) LOCAL_CFLAGS=-DHPUX ;;
+dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;;
+isc*) LOCAL_CFLAGS=-Disc386 ;;
+rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;;
+darwin*) LOCAL_CFLAGS=-DMACOSX ;;
+sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;;
+sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;;
+sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
+sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
+solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;;
+solaris2.8*) LOCAL_CFLAGS=-DSOLARIS ;;
+solaris2.9*) LOCAL_CFLAGS=-DSOLARIS ;;
+solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;;
+solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
+lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
+linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
+ case "`uname -r`" in
+ 2.[456789]*|3*) cat >>confdefs.h <<\_ACEOF
+#define PGRP_PIPE 1
+_ACEOF
+ ;;
+ esac ;;
+*qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;;
+*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
+powerux*) LOCAL_LIBS="-lgen" ;;
+cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
+opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO -D_POSIX_SOURCE -D_ALL_SOURCE" ;;
+esac
+
+case "${host_os}-${CC}" in
+aix4.2*-*gcc*) LOCAL_LDFLAGS="-Xlinker -bexpall -Xlinker -brtl" ;;
+aix4.2*) LOCAL_LDFLAGS="-bexpall -brtl" ;;
+bsdi4*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux
+esac
+
+case "${host_os}" in
+freebsd[3-9]*)
+ if test -x /usr/bin/objformat && test "`/usr/bin/objformat`" = "elf" ; then
+ LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
+ fi ;;
+freebsdelf*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
+dragonfly*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
+esac
+
+case "$host_cpu" in
+*cray*) LOCAL_CFLAGS="-DCRAY" ;; # shell var so config.h can use it
+esac
+
+case "$host_cpu-$host_os" in
+ibmrt-*bsd4*) LOCAL_CFLAGS="-ma -U__STDC__" ;;
+esac
+
+case "$host_cpu-$host_vendor-$host_os" in
+m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;;
+mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;;
+esac
+
+#
+# Shared object configuration section. These values are generated by
+# ${srcdir}/support/shobj-conf
+#
+if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf
+then
+ { $as_echo "$as_me:$LINENO: checking shared object configuration for loadable builtins" >&5
+$as_echo_n "checking shared object configuration for loadable builtins... " >&6; }
+ eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`
+
+
+
+
+
+
+
+ { $as_echo "$as_me:$LINENO: result: $SHOBJ_STATUS" >&5
+$as_echo "$SHOBJ_STATUS" >&6; }
+fi
+
+# try to create a directory tree if the source is elsewhere
+# this should be packaged into a script accessible via ${srcdir}/support
+case "$srcdir" in
+.) ;;
+*) for d in doc tests support lib examples; do # dirs
+ test -d $d || mkdir $d
+ done
+ for ld in readline glob tilde malloc sh termcap; do # libdirs
+ test -d lib/$ld || mkdir lib/$ld
+ done
+ test -d examples/loadables || mkdir examples/loadables # loadable builtins
+ test -d examples/loadables/perl || mkdir examples/loadables/perl
+ ;;
+esac
+
+BUILD_DIR=`pwd`
+case "$BUILD_DIR" in
+*\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;;
+*) ;;
+esac
+
+if test -z "$localedir"; then
+ localedir='${datarootdir}/locale'
+fi
+if test -z "$datarootdir"; then
+ datarootdir='${prefix}/share'
+fi
+
+
+
+
+
+
+# Some versions of autoconf don't substitute these automatically
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#AC_SUBST(ALLOCA_SOURCE)
+#AC_SUBST(ALLOCA_OBJECT)
+
+ac_config_files="$ac_config_files Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile lib/intl/Makefile lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in examples/loadables/Makefile examples/loadables/perl/Makefile"
+
+ac_config_commands="$ac_config_commands default"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by bash $as_me 4.1-release, which was
+generated by GNU Autoconf 2.63. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTION]... [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_version="\\
+bash config.status 4.1-release
+configured by $0, generated by GNU Autoconf 2.63,
+ with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ { $as_echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { $as_echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES, CATALOGS. But hide it
+ # from automake.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+ "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "builtins/Makefile") CONFIG_FILES="$CONFIG_FILES builtins/Makefile" ;;
+ "lib/readline/Makefile") CONFIG_FILES="$CONFIG_FILES lib/readline/Makefile" ;;
+ "lib/glob/Makefile") CONFIG_FILES="$CONFIG_FILES lib/glob/Makefile" ;;
+ "lib/intl/Makefile") CONFIG_FILES="$CONFIG_FILES lib/intl/Makefile" ;;
+ "lib/malloc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/malloc/Makefile" ;;
+ "lib/sh/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sh/Makefile" ;;
+ "lib/termcap/Makefile") CONFIG_FILES="$CONFIG_FILES lib/termcap/Makefile" ;;
+ "lib/tilde/Makefile") CONFIG_FILES="$CONFIG_FILES lib/tilde/Makefile" ;;
+ "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+ "support/Makefile") CONFIG_FILES="$CONFIG_FILES support/Makefile" ;;
+ "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+ "examples/loadables/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile" ;;
+ "examples/loadables/perl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;;
+ "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
+
+ *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} ||
+{
+ $as_echo "$as_me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=' '
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\).*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\).*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
+$as_echo "$as_me: error: could not setup config files machinery" >&2;}
+ { (exit 1); exit 1; }; }
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_t"; then
+ break
+ elif $ac_last_try; then
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
+$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
+ { (exit 1); exit 1; }; }
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
+$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
+ { (exit 1); exit 1; }; };;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ ac_file_inputs="$ac_file_inputs '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir="$ac_dir"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$tmp/config.h" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$tmp/config.h" "$ac_file" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
+$as_echo "$as_me: error: could not create -" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ ;;
+
+ :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "default-1":C)
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, GMOFILES, UPDATEPOFILES, DUMMYPOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ GMOFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done ;;
+ "default":C)
+# Makefile uses this timestamp file to record whether config.h is up to date.
+echo timestamp > stamp-h
+ ;;
+
+ esac
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..843bd70
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,1156 @@
+dnl
+dnl Configure script for bash-4.1
+dnl
+dnl report bugs to chet@po.cwru.edu
+dnl
+dnl Process this file with autoconf to produce a configure script.
+
+# Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+AC_REVISION([for Bash 4.1, version 4.019])dnl
+
+define(bashvers, 4.1)
+define(relstatus, release)
+
+AC_INIT([bash], bashvers-relstatus, [bug-bash@gnu.org])
+
+dnl make sure we are using a recent autoconf version
+AC_PREREQ(2.50)
+
+AC_CONFIG_SRCDIR(shell.h)
+dnl where to find install.sh, config.sub, and config.guess
+AC_CONFIG_AUX_DIR(./support)
+AC_CONFIG_HEADERS(config.h)
+
+dnl checks for version info
+BASHVERS=bashvers
+RELSTATUS=relstatus
+
+dnl defaults for debug settings
+case "$RELSTATUS" in
+alp*|bet*|dev*|rc*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;;
+*) DEBUG= MALLOC_DEBUG= ;;
+esac
+
+dnl canonicalize the host and os so we can do some tricky things before
+dnl parsing options
+AC_CANONICAL_HOST
+
+dnl configure defaults
+opt_bash_malloc=yes
+opt_purify=no
+opt_purecov=no
+opt_afs=no
+opt_curses=no
+opt_with_installed_readline=no
+
+#htmldir=
+
+dnl some systems should be configured without the bash malloc by default
+dnl and some need a special compiler or loader
+dnl look in the NOTES file for more
+case "${host_cpu}-${host_os}" in
+alpha*-*) opt_bash_malloc=no ;; # alpha running osf/1 or linux
+*[[Cc]]ray*-*) opt_bash_malloc=no ;; # Crays
+*-osf1*) opt_bash_malloc=no ;; # other osf/1 machines
+sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2
+sparc-netbsd*) opt_bash_malloc=no ;; # needs 8-byte alignment
+mips-irix6*) opt_bash_malloc=no ;; # needs 8-byte alignment
+m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir
+sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF
+#*-freebsd*-gnu) opt_bash_malloc=no ;; # there's some undetermined problem here
+#*-freebsd*) opt_bash_malloc=no ;; # they claim it's better; I disagree
+*-openbsd*) opt_bash_malloc=no ;; # they claim it needs eight-bit alignment
+*-aix*) opt_bash_malloc=no ;; # AIX machines
+*-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep
+*-macos*) opt_bash_malloc=no ;; # Apple MacOS X
+*-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody (MacOS X)
+*-darwin*) opt_bash_malloc=no ;; # Apple Darwin (MacOS X)
+*-dgux*) opt_bash_malloc=no ;; # DG/UX machines
+*-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX 6.x
+*-machten4) opt_bash_malloc=no ;; # MachTen 4.x
+*-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins
+*-beos*) opt_bash_malloc=no ;; # they say it's suitable
+*-cygwin*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment
+*-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft
+esac
+
+# memory scrambling on free()
+case "${host_os}" in
+sco3.2v5*|sco3.2v4*) opt_memscramble=no ;;
+*) opt_memscramble=yes ;;
+esac
+
+dnl
+dnl macros for the bash debugger
+dnl
+AM_PATH_LISPDIR
+AC_ARG_VAR(DEBUGGER_START_FILE, [location of bash debugger initialization file])
+
+dnl arguments to configure
+dnl packages
+AC_ARG_WITH(afs, AC_HELP_STRING([--with-afs], [if you are running AFS]), opt_afs=$withval)
+AC_ARG_WITH(bash-malloc, AC_HELP_STRING([--with-bash-malloc], [use the Bash version of malloc]), opt_bash_malloc=$withval)
+AC_ARG_WITH(curses, AC_HELP_STRING([--with-curses], [use the curses library instead of the termcap library]), opt_curses=$withval)
+AC_ARG_WITH(gnu-malloc, AC_HELP_STRING([--with-gnu-malloc], [synonym for --with-bash-malloc]), opt_bash_malloc=$withval)
+AC_ARG_WITH(installed-readline, AC_HELP_STRING([--with-installed-readline], [use a version of the readline library that is already installed]), opt_with_installed_readline=$withval)
+AC_ARG_WITH(purecov, AC_HELP_STRING([--with-purecov], [configure to postprocess with pure coverage]), opt_purecov=$withval)
+AC_ARG_WITH(purify, AC_HELP_STRING([--with-purify], [configure to postprocess with purify]), opt_purify=$withval)
+
+if test "$opt_bash_malloc" = yes; then
+ MALLOC_TARGET=malloc
+ MALLOC_SRC=malloc.c
+
+ MALLOC_LIB='-lmalloc'
+ MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a'
+ MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
+ MALLOC_DEP='$(MALLOC_LIBRARY)'
+
+ AC_DEFINE(USING_BASH_MALLOC)
+else
+ MALLOC_LIB=
+ MALLOC_LIBRARY=
+ MALLOC_LDFLAGS=
+ MALLOC_DEP=
+fi
+
+if test "$opt_purify" = yes; then
+ PURIFY="purify "
+ AC_DEFINE(DISABLE_MALLOC_WRAPPERS)
+else
+ PURIFY=
+fi
+
+if test "$opt_purecov" = yes; then
+ PURIFY="${PURIFY}purecov"
+fi
+
+if test "$opt_afs" = yes; then
+ AC_DEFINE(AFS)
+fi
+
+if test "$opt_curses" = yes; then
+ prefer_curses=yes
+fi
+
+if test -z "${DEBUGGER_START_FILE}"; then
+ DEBUGGER_START_FILE='${datadir}/bashdb/bashdb-main.inc'
+fi
+
+dnl optional shell features in config.h.in
+opt_minimal_config=no
+
+opt_job_control=yes
+opt_alias=yes
+opt_readline=yes
+opt_history=yes
+opt_bang_history=yes
+opt_dirstack=yes
+opt_restricted=yes
+opt_process_subst=yes
+opt_prompt_decoding=yes
+opt_select=yes
+opt_help=yes
+opt_array_variables=yes
+opt_dparen_arith=yes
+opt_extended_glob=yes
+opt_brace_expansion=yes
+opt_disabled_builtins=no
+opt_command_timing=yes
+opt_xpg_echo=no
+opt_strict_posix=no
+opt_cond_command=yes
+opt_cond_regexp=yes
+opt_coproc=yes
+opt_arith_for_command=yes
+opt_net_redirs=yes
+opt_progcomp=yes
+opt_separate_help=no
+opt_multibyte=yes
+opt_debugger=yes
+opt_single_longdoc_strings=yes
+opt_casemod_attrs=yes
+opt_casemod_expansions=yes
+opt_extglob_default=no
+
+dnl options that affect how bash is compiled and linked
+opt_static_link=no
+opt_profiling=no
+
+dnl argument parsing for optional features
+AC_ARG_ENABLE(minimal-config, AC_HELP_STRING([--enable-minimal-config], [a minimal sh-like configuration]), opt_minimal_config=$enableval)
+
+dnl a minimal configuration turns everything off, but features can be
+dnl added individually
+if test $opt_minimal_config = yes; then
+ opt_job_control=no opt_alias=no opt_readline=no
+ opt_history=no opt_bang_history=no opt_dirstack=no
+ opt_restricted=no opt_process_subst=no opt_prompt_decoding=no
+ opt_select=no opt_help=no opt_array_variables=no opt_dparen_arith=no
+ opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no
+ opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no
+ opt_net_redirs=no opt_progcomp=no opt_separate_help=no
+ opt_multibyte=yes opt_cond_regexp=no opt_coproc=no
+ opt_casemod_attrs=no opt_casemod_expansions=no opt_extglob_default=no
+fi
+
+AC_ARG_ENABLE(alias, AC_HELP_STRING([--enable-alias], [enable shell aliases]), opt_alias=$enableval)
+AC_ARG_ENABLE(arith-for-command, AC_HELP_STRING([--enable-arith-for-command], [enable arithmetic for command]), opt_arith_for_command=$enableval)
+AC_ARG_ENABLE(array-variables, AC_HELP_STRING([--enable-array-variables], [include shell array variables]), opt_array_variables=$enableval)
+AC_ARG_ENABLE(bang-history, AC_HELP_STRING([--enable-bang-history], [turn on csh-style history substitution]), opt_bang_history=$enableval)
+AC_ARG_ENABLE(brace-expansion, AC_HELP_STRING([--enable-brace-expansion], [include brace expansion]), opt_brace_expansion=$enableval)
+AC_ARG_ENABLE(casemod-attributes, AC_HELP_STRING([--enable-casemod-attributes], [include case-modifying variable attributes]), opt_casemod_attrs=$enableval)
+AC_ARG_ENABLE(casemod-expansions, AC_HELP_STRING([--enable-casemod-expansions], [include case-modifying word expansions]), opt_casemod_expansions=$enableval)
+AC_ARG_ENABLE(command-timing, AC_HELP_STRING([--enable-command-timing], [enable the time reserved word and command timing]), opt_command_timing=$enableval)
+AC_ARG_ENABLE(cond-command, AC_HELP_STRING([--enable-cond-command], [enable the conditional command]), opt_cond_command=$enableval)
+AC_ARG_ENABLE(cond-regexp, AC_HELP_STRING([--enable-cond-regexp], [enable extended regular expression matching in conditional commands]), opt_cond_regexp=$enableval)
+AC_ARG_ENABLE(coprocesses, AC_HELP_STRING([--enable-coprocesses], [enable coprocess support and the coproc reserved word]), opt_coproc=$enableval)
+AC_ARG_ENABLE(debugger, AC_HELP_STRING([--enable-debugger], [enable support for bash debugger]), opt_debugger=$enableval)
+AC_ARG_ENABLE(directory-stack, AC_HELP_STRING([--enable-directory-stack], [enable builtins pushd/popd/dirs]), opt_dirstack=$enableval)
+AC_ARG_ENABLE(disabled-builtins, AC_HELP_STRING([--enable-disabled-builtins], [allow disabled builtins to still be invoked]), opt_disabled_builtins=$enableval)
+AC_ARG_ENABLE(dparen-arithmetic, AC_HELP_STRING([--enable-dparen-arithmetic], [include ((...)) command]), opt_dparen_arith=$enableval)
+AC_ARG_ENABLE(extended-glob, AC_HELP_STRING([--enable-extended-glob], [include ksh-style extended pattern matching]), opt_extended_glob=$enableval)
+AC_ARG_ENABLE(extended-glob-default, AC_HELP_STRING([--enable-extended-glob-default], [force extended pattern matching to be enabled by default]), opt_extglob_default=$enableval)
+AC_ARG_ENABLE(help-builtin, AC_HELP_STRING([--enable-help-builtin], [include the help builtin]), opt_help=$enableval)
+AC_ARG_ENABLE(history, AC_HELP_STRING([--enable-history], [turn on command history]), opt_history=$enableval)
+AC_ARG_ENABLE(job-control, AC_HELP_STRING([--enable-job-control], [enable job control features]), opt_job_control=$enableval)
+AC_ARG_ENABLE(multibyte, AC_HELP_STRING([--enable-multibyte], [enable multibyte characters if OS supports them]), opt_multibyte=$enableval)
+AC_ARG_ENABLE(net-redirections, AC_HELP_STRING([--enable-net-redirections], [enable /dev/tcp/host/port redirection]), opt_net_redirs=$enableval)
+AC_ARG_ENABLE(process-substitution, AC_HELP_STRING([--enable-process-substitution], [enable process substitution]), opt_process_subst=$enableval)
+AC_ARG_ENABLE(progcomp, AC_HELP_STRING([--enable-progcomp], [enable programmable completion and the complete builtin]), opt_progcomp=$enableval)
+AC_ARG_ENABLE(prompt-string-decoding, AC_HELP_STRING([--enable-prompt-string-decoding], [turn on escape character decoding in prompts]), opt_prompt_decoding=$enableval)
+AC_ARG_ENABLE(readline, AC_HELP_STRING([--enable-readline], [turn on command line editing]), opt_readline=$enableval)
+AC_ARG_ENABLE(restricted, AC_HELP_STRING([--enable-restricted], [enable a restricted shell]), opt_restricted=$enableval)
+AC_ARG_ENABLE(select, AC_HELP_STRING([--enable-select], [include select command]), opt_select=$enableval)
+AC_ARG_ENABLE(separate-helpfiles, AC_HELP_STRING([--enable-separate-helpfiles], [use external files for help builtin documentation]), opt_separate_help=$enableval)
+AC_ARG_ENABLE(single-help-strings, AC_HELP_STRING([--enable-single-help-strings], [store help documentation as a single string to ease translation]), opt_single_longdoc_strings=$enableval)
+AC_ARG_ENABLE(strict-posix-default, AC_HELP_STRING([--enable-strict-posix-default], [configure bash to be posix-conformant by default]), opt_strict_posix=$enableval)
+AC_ARG_ENABLE(usg-echo-default, AC_HELP_STRING([--enable-usg-echo-default], [a synonym for --enable-xpg-echo-default]), opt_xpg_echo=$enableval)
+AC_ARG_ENABLE(xpg-echo-default, AC_HELP_STRING([--enable-xpg-echo-default], [make the echo builtin expand escape sequences by default]), opt_xpg_echo=$enableval)
+
+dnl options that alter how bash is compiled and linked
+AC_ARG_ENABLE(mem-scramble, AC_HELP_STRING([--enable-mem-scramble], [scramble memory on calls to malloc and free]), opt_memscramble=$enableval)
+AC_ARG_ENABLE(profiling, AC_HELP_STRING([--enable-profiling], [allow profiling with gprof]), opt_profiling=$enableval)
+AC_ARG_ENABLE(static-link, AC_HELP_STRING([--enable-static-link], [link bash statically, for use as a root shell]), opt_static_link=$enableval)
+
+dnl opt_job_control is handled later, after BASH_JOB_CONTROL_MISSING runs
+
+dnl opt_readline and opt_history are handled later, because AC_PROG_CC needs
+dnl to be run before we can check the version of an already-installed readline
+dnl library
+
+if test $opt_alias = yes; then
+AC_DEFINE(ALIAS)
+fi
+if test $opt_dirstack = yes; then
+AC_DEFINE(PUSHD_AND_POPD)
+fi
+if test $opt_restricted = yes; then
+AC_DEFINE(RESTRICTED_SHELL)
+fi
+if test $opt_process_subst = yes; then
+AC_DEFINE(PROCESS_SUBSTITUTION)
+fi
+if test $opt_prompt_decoding = yes; then
+AC_DEFINE(PROMPT_STRING_DECODE)
+fi
+if test $opt_select = yes; then
+AC_DEFINE(SELECT_COMMAND)
+fi
+if test $opt_help = yes; then
+AC_DEFINE(HELP_BUILTIN)
+fi
+if test $opt_array_variables = yes; then
+AC_DEFINE(ARRAY_VARS)
+fi
+if test $opt_dparen_arith = yes; then
+AC_DEFINE(DPAREN_ARITHMETIC)
+fi
+if test $opt_brace_expansion = yes; then
+AC_DEFINE(BRACE_EXPANSION)
+fi
+if test $opt_disabled_builtins = yes; then
+AC_DEFINE(DISABLED_BUILTINS)
+fi
+if test $opt_command_timing = yes; then
+AC_DEFINE(COMMAND_TIMING)
+fi
+if test $opt_xpg_echo = yes ; then
+AC_DEFINE(DEFAULT_ECHO_TO_XPG)
+fi
+if test $opt_strict_posix = yes; then
+AC_DEFINE(STRICT_POSIX)
+fi
+if test $opt_extended_glob = yes ; then
+AC_DEFINE(EXTENDED_GLOB)
+fi
+if test $opt_extglob_default = yes; then
+AC_DEFINE(EXTGLOB_DEFAULT, 1)
+else
+AC_DEFINE(EXTGLOB_DEFAULT, 0)
+fi
+if test $opt_cond_command = yes ; then
+AC_DEFINE(COND_COMMAND)
+fi
+if test $opt_cond_regexp = yes ; then
+AC_DEFINE(COND_REGEXP)
+fi
+if test $opt_coproc = yes; then
+AC_DEFINE(COPROCESS_SUPPORT)
+fi
+if test $opt_arith_for_command = yes; then
+AC_DEFINE(ARITH_FOR_COMMAND)
+fi
+if test $opt_net_redirs = yes; then
+AC_DEFINE(NETWORK_REDIRECTIONS)
+fi
+if test $opt_progcomp = yes; then
+AC_DEFINE(PROGRAMMABLE_COMPLETION)
+fi
+if test $opt_multibyte = no; then
+AC_DEFINE(NO_MULTIBYTE_SUPPORT)
+fi
+if test $opt_debugger = yes; then
+AC_DEFINE(DEBUGGER)
+fi
+if test $opt_casemod_attrs = yes; then
+AC_DEFINE(CASEMOD_ATTRS)
+fi
+if test $opt_casemod_expansions = yes; then
+AC_DEFINE(CASEMOD_EXPANSIONS)
+fi
+
+if test $opt_memscramble = yes; then
+AC_DEFINE(MEMSCRAMBLE)
+fi
+
+if test "$opt_minimal_config" = yes; then
+ TESTSCRIPT=run-minimal
+else
+ TESTSCRIPT=run-all
+fi
+
+HELPDIR= HELPDIRDEFINE= HELPINSTALL=
+if test "$opt_separate_help" != no; then
+ if test "$opt_separate_help" = "yes" ; then
+ HELPDIR='${datadir}/bash'
+ else
+ HELPDIR=$opt_separate_help
+ fi
+ HELPDIRDEFINE='-H ${HELPDIR}'
+ HELPINSTALL='install-help'
+fi
+HELPSTRINGS=
+if test "$opt_single_longdoc_strings" != "yes"; then
+ HELPSTRINGS='-S'
+fi
+
+dnl now substitute in the values generated by arguments
+AC_SUBST(TESTSCRIPT)
+AC_SUBST(PURIFY)
+AC_SUBST(MALLOC_TARGET)
+AC_SUBST(MALLOC_SRC)
+
+AC_SUBST(MALLOC_LIB)
+AC_SUBST(MALLOC_LIBRARY)
+AC_SUBST(MALLOC_LDFLAGS)
+AC_SUBST(MALLOC_DEP)
+
+AC_SUBST(htmldir)
+
+AC_SUBST(HELPDIR)
+AC_SUBST(HELPDIRDEFINE)
+AC_SUBST(HELPINSTALL)
+AC_SUBST(HELPSTRINGS)
+
+echo ""
+echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}"
+echo ""
+
+dnl compilation checks
+dnl AC_PROG_CC sets $cross_compiling to `yes' if cross-compiling for a
+dnl different environment
+AC_PROG_CC
+
+dnl test for Unix variants
+AC_ISC_POSIX
+AC_MINIX
+
+AC_SYS_LARGEFILE
+
+dnl BEGIN changes for cross-building (currently cygwin, minGW, and
+dnl (obsolete) BeOS)
+
+SIGNAMES_O=
+SIGNAMES_H=lsignames.h
+
+dnl load up the cross-building cache file -- add more cases and cache
+dnl files as necessary
+
+dnl Note that host and target machine are the same, and different than the
+dnl build machine.
+dnl Set SIGNAMES_H based on whether or not we're cross-compiling.
+
+CROSS_COMPILE=
+if test "x$cross_compiling" = "xyes"; then
+ case "${host}" in
+ *-cygwin*)
+ cross_cache=${srcdir}/cross-build/cygwin32.cache
+ ;;
+ *-mingw*)
+ cross_cache=${srcdir}/cross-build/cygwin32.cache
+ ;;
+ i[[3456]]86-*-beos*)
+ cross_cache=${srcdir}/cross-build/x86-beos.cache
+ ;;
+ *) echo "configure: cross-compiling for $host is not supported" >&2
+ ;;
+ esac
+ if test -n "${cross_cache}" && test -r "${cross_cache}"; then
+ echo "loading cross-build cache file ${cross_cache}"
+ . ${cross_cache}
+ fi
+ unset cross_cache
+ SIGNAMES_O='signames.o'
+ CROSS_COMPILE='-DCROSS_COMPILING'
+ AC_SUBST(CROSS_COMPILE)
+fi
+AC_SUBST(SIGNAMES_H)
+AC_SUBST(SIGNAMES_O)
+
+if test -z "$CC_FOR_BUILD"; then
+ if test "x$cross_compiling" = "xno"; then
+ CC_FOR_BUILD='$(CC)'
+ else
+ CC_FOR_BUILD=gcc
+ fi
+fi
+AC_SUBST(CC_FOR_BUILD)
+
+dnl END changes for cross-building
+
+dnl We want these before the checks, so the checks can modify their values.
+test -z "$CFLAGS" && CFLAGS=-g auto_cflags=1
+
+dnl If we're using gcc and the user hasn't specified CFLAGS, add -O2 to CFLAGS.
+test -n "$GCC" && test -n "$auto_cflags" && CFLAGS="$CFLAGS -O2"
+
+dnl handle options that alter how bash is compiled and linked
+dnl these must come after the test for cc/gcc
+if test "$opt_profiling" = "yes"; then
+ PROFILE_FLAGS=-pg
+ case "$host_os" in
+ solaris2*) ;;
+ *) opt_static_link=yes ;;
+ esac
+ DEBUG= MALLOC_DEBUG=
+fi
+
+if test "$opt_static_link" = yes; then
+ # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2
+ if test -n "$GCC" || test "$ac_cv_prog_gcc" = "yes"; then
+ STATIC_LD="-static"
+ case "$host_os" in
+ solaris2*) ;;
+ *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental
+ esac
+ fi
+fi
+
+if test "X$cross_compiling" = "Xno"; then
+ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"}
+ LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'}
+else
+ CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""}
+ LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""}
+fi
+
+test -z "$CFLAGS_FOR_BUILD" && CFLAGS_FOR_BUILD="-g"
+
+AC_SUBST(CFLAGS)
+AC_SUBST(CPPFLAGS)
+AC_SUBST(LDFLAGS)
+AC_SUBST(STATIC_LD)
+
+AC_SUBST(CFLAGS_FOR_BUILD)
+AC_SUBST(CPPFLAGS_FOR_BUILD)
+AC_SUBST(LDFLAGS_FOR_BUILD)
+
+AC_PROG_GCC_TRADITIONAL
+
+dnl BEGIN READLINE and HISTORY LIBRARY SECTION
+dnl prepare to allow bash to be linked against an already-installed readline
+
+dnl first test that the readline version is new enough to link bash against
+if test "$opt_readline" = yes && test "$opt_with_installed_readline" != "no"
+then
+ # If the user specified --with-installed-readline=PREFIX and PREFIX
+ # is not `yes', set ac_cv_rl_prefix to PREFIX
+ test $opt_with_installed_readline != "yes" && ac_cv_rl_prefix=$opt_with_installed_readline
+
+ RL_LIB_READLINE_VERSION
+
+ case "$ac_cv_rl_version" in
+ 5*|6*|7*|8*|9*) ;;
+ *) opt_with_installed_readline=no
+ AC_MSG_WARN([installed readline library is too old to be linked with bash])
+ AC_MSG_WARN([using private bash version])
+ ;;
+ esac
+fi
+
+TILDE_LIB=-ltilde
+if test $opt_readline = yes; then
+ AC_DEFINE(READLINE)
+ if test "$opt_with_installed_readline" != "no" ; then
+ case "$opt_with_installed_readline" in
+ yes) RL_INCLUDE= ;;
+ *) case "$RL_INCLUDEDIR" in
+ /usr/include) ;;
+ *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
+ esac
+ ;;
+ esac
+ READLINE_DEP=
+ READLINE_LIB=-lreadline
+ # section for OS versions that don't allow unresolved symbols
+ # to be compiled into dynamic libraries.
+ case "$host_os" in
+ cygwin*) TILDE_LIB= ;;
+ esac
+ else
+ RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
+ READLINE_DEP='$(READLINE_LIBRARY)'
+ # section for OS versions that ship an older/broken version of
+ # readline as a standard dynamic library and don't allow a
+ # static version specified as -llibname to override the
+ # dynamic version
+ case "${host_os}" in
+ darwin[[89]]*|darwin10*) READLINE_LIB='${READLINE_LIBRARY}' ;;
+ *) READLINE_LIB=-lreadline ;;
+ esac
+ fi
+else
+ RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
+ READLINE_LIB= READLINE_DEP=
+fi
+if test $opt_history = yes || test $opt_bang_history = yes; then
+ if test $opt_history = yes; then
+ AC_DEFINE(HISTORY)
+ fi
+ if test $opt_bang_history = yes; then
+ AC_DEFINE(BANG_HISTORY)
+ fi
+ if test "$opt_with_installed_readline" != "no"; then
+ HIST_LIBDIR=$RL_LIBDIR
+ HISTORY_DEP=
+ HISTORY_LIB=-lhistory
+ case "$opt_with_installed_readline" in
+ yes) RL_INCLUDE= ;;
+ *) case "$RL_INCLUDEDIR" in
+ /usr/include) ;;
+ *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;;
+ esac
+ ;;
+ esac
+ else
+ HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
+ HISTORY_DEP='$(HISTORY_LIBRARY)'
+ # section for OS versions that ship an older version of
+ # readline as a standard dynamic library and don't allow a
+ # static version specified as -llibname to override the
+ # dynamic version
+ case "${host_os}" in
+ darwin[[89]]*|darwin10*) HISTORY_LIB='${HISTORY_LIBRARY}' ;;
+ *) HISTORY_LIB=-lhistory ;;
+ esac
+ fi
+else
+ HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline'
+ HISTORY_LIB= HISTORY_DEP=
+fi
+AC_SUBST(READLINE_LIB)
+AC_SUBST(READLINE_DEP)
+AC_SUBST(RL_LIBDIR)
+AC_SUBST(RL_INCLUDEDIR)
+AC_SUBST(RL_INCLUDE)
+AC_SUBST(HISTORY_LIB)
+AC_SUBST(HISTORY_DEP)
+AC_SUBST(HIST_LIBDIR)
+AC_SUBST(TILDE_LIB)
+
+dnl END READLINE and HISTORY LIBRARY SECTION
+
+dnl programs needed by the build and install process
+AC_PROG_INSTALL
+AC_CHECK_PROG(AR, ar, , ar)
+dnl Set default for ARFLAGS, since autoconf does not have a macro for it.
+dnl This allows people to set it when running configure or make
+test -n "$ARFLAGS" || ARFLAGS="cr"
+AC_PROG_RANLIB
+AC_PROG_YACC
+AC_PROG_MAKE_SET
+
+case "$host_os" in
+opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;;
+*) MAKE_SHELL=/bin/sh ;;
+esac
+AC_SUBST(MAKE_SHELL)
+
+dnl this is similar to the expanded AC_PROG_RANLIB
+if test x$SIZE = x; then
+ if test x$ac_tool_prefix = x; then
+ SIZE=size
+ else
+ SIZE=${ac_tool_prefix}size
+ save_IFS=$IFS ; IFS=:
+ size_found=0
+ for dir in $PATH; do
+ if test -x $dir/$SIZE ; then
+ size_found=1
+ break
+ fi
+ done
+ if test $size_found -eq 0; then
+ SIZE=:
+ fi
+ IFS=$save_IFS
+ fi
+fi
+AC_SUBST(SIZE)
+
+dnl Turn on any extensions available in the GNU C library.
+AC_DEFINE(_GNU_SOURCE, 1)
+
+dnl C compiler characteristics
+AC_C_CONST
+AC_C_INLINE
+AC_C_BIGENDIAN
+AC_C_STRINGIZE
+AC_C_LONG_DOUBLE
+AC_C_PROTOTYPES
+AC_C_CHAR_UNSIGNED
+AC_C_VOLATILE
+AC_C_RESTRICT
+
+dnl initialize GNU gettext
+AM_GNU_GETTEXT([no-libtool], [need-ngettext], [lib/intl])
+
+dnl header files
+AC_HEADER_DIRENT
+AC_HEADER_TIME
+
+BASH_HEADER_INTTYPES
+
+AC_CHECK_HEADERS(unistd.h stdlib.h stdarg.h varargs.h limits.h string.h \
+ memory.h locale.h termcap.h termio.h termios.h dlfcn.h \
+ stddef.h stdint.h netdb.h pwd.h grp.h strings.h regex.h \
+ syslog.h)
+AC_CHECK_HEADERS(sys/pte.h sys/stream.h sys/select.h sys/file.h \
+ sys/resource.h sys/param.h sys/socket.h sys/stat.h \
+ sys/time.h sys/times.h sys/types.h sys/wait.h)
+AC_CHECK_HEADERS(netinet/in.h arpa/inet.h)
+
+dnl sys/ptem.h requires definitions from sys/stream.h on systems where it
+dnl exists
+AC_CHECK_HEADER(sys/ptem.h, , ,[[
+#if HAVE_SYS_STREAM_H
+# include <sys/stream.h>
+#endif
+]])
+
+dnl special checks for libc functions
+AC_FUNC_ALLOCA
+AC_FUNC_GETPGRP
+AC_FUNC_SETVBUF_REVERSED
+AC_FUNC_VPRINTF
+AC_FUNC_STRCOLL
+
+dnl if we're not using the bash malloc but require the C alloca, set things
+dnl up to build a libmalloc.a containing only alloca.o
+
+if test "$ac_cv_func_alloca_works" = "no" && test "$opt_bash_malloc" = "no"; then
+ MALLOC_TARGET=alloca
+ MALLOC_SRC=alloca.c
+
+ MALLOC_LIB='-lmalloc'
+ MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a'
+ MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)'
+ MALLOC_DEP='$(MALLOC_LIBRARY)'
+fi
+
+dnl if vprintf is not in libc, see if it's defined in stdio.h
+if test "$ac_cv_func_vprintf" = no; then
+ AC_MSG_CHECKING(for declaration of vprintf in stdio.h)
+ AC_EGREP_HEADER([[int[ ]*vprintf[^a-zA-Z0-9]]],stdio.h,ac_cv_func_vprintf=yes)
+ AC_MSG_RESULT($ac_cv_func_vprintf)
+ if test $ac_cv_func_vprintf = yes; then
+ AC_DEFINE(HAVE_VPRINTF)
+ fi
+fi
+
+if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then
+ AC_LIBOBJ(vprint)
+fi
+
+dnl signal stuff
+AC_TYPE_SIGNAL
+
+dnl checks for certain version-specific system calls and libc functions
+AC_CHECK_FUNC(__setostype, AC_DEFINE(HAVE_SETOSTYPE))
+AC_CHECK_FUNC(wait3, AC_DEFINE(HAVE_WAIT3))
+AC_CHECK_FUNC(isinf, AC_DEFINE(HAVE_ISINF_IN_LIBC))
+AC_CHECK_FUNC(isnan, AC_DEFINE(HAVE_ISNAN_IN_LIBC))
+
+dnl checks for missing libc functions
+AC_CHECK_FUNC(mkfifo,AC_DEFINE(HAVE_MKFIFO),AC_DEFINE(MKFIFO_MISSING))
+
+dnl checks for system calls
+AC_CHECK_FUNCS(dup2 eaccess fcntl getdtablesize getgroups gethostname \
+ getpagesize getpeername getrlimit getrusage gettimeofday \
+ kill killpg lstat readlink sbrk select setdtablesize \
+ setitimer tcgetpgrp uname ulimit waitpid)
+AC_REPLACE_FUNCS(rename)
+
+dnl checks for c library functions
+AC_CHECK_FUNCS(bcopy bzero confstr fnmatch \
+ getaddrinfo gethostbyname getservbyname getservent inet_aton \
+ memmove pathconf putenv raise regcomp regexec \
+ setenv setlinebuf setlocale setvbuf siginterrupt strchr \
+ sysconf syslog tcgetattr times ttyname tzset unsetenv)
+
+AC_CHECK_FUNCS(vasprintf asprintf)
+AC_CHECK_FUNCS(isascii isblank isgraph isprint isspace isxdigit)
+AC_CHECK_FUNCS(getpwent getpwnam getpwuid)
+AC_REPLACE_FUNCS(getcwd memset)
+AC_REPLACE_FUNCS(strcasecmp strcasestr strerror strftime strnlen strpbrk strstr)
+AC_REPLACE_FUNCS(strtod strtol strtoul strtoll strtoull strtoimax strtoumax)
+AC_REPLACE_FUNCS(fdprintf)
+
+AC_CHECK_DECLS([confstr])
+AC_CHECK_DECLS([printf])
+AC_CHECK_DECLS([sbrk])
+AC_CHECK_DECLS([setregid])
+AC_CHECK_DECLS([strcpy])
+AC_CHECK_DECLS([strsignal])
+
+dnl Extra test to detect the horribly broken HP/UX 11.00 strtold(3)
+AC_CHECK_DECLS([strtold], [
+ AC_MSG_CHECKING([for broken strtold])
+ AC_CACHE_VAL(bash_cv_strtold_broken,
+ [AC_TRY_COMPILE(
+ [#include <stdlib.h>],
+ [int main() { long double r; char *foo, bar; r = strtold(foo, &bar);}],
+ bash_cv_strtold_broken=no, bash_cv_strtold_broken=yes,
+ [AC_MSG_WARN(cannot check for broken strtold if cross-compiling, defaulting to no)])
+ ]
+ )
+ AC_MSG_RESULT($bash_cv_strtold_broken)
+ if test "$bash_cv_strtold_broken" = "yes" ; then
+ AC_DEFINE(STRTOLD_BROKEN)
+ fi
+])
+
+
+BASH_CHECK_DECL(strtoimax)
+BASH_CHECK_DECL(strtol)
+BASH_CHECK_DECL(strtoll)
+BASH_CHECK_DECL(strtoul)
+BASH_CHECK_DECL(strtoull)
+BASH_CHECK_DECL(strtoumax)
+
+AC_FUNC_MKTIME
+
+dnl
+dnl Checks for lib/intl and related code (uses some of the output from
+dnl AM_GNU_GETTEXT)
+dnl
+
+AC_CHECK_HEADERS([argz.h errno.h fcntl.h malloc.h stdio_ext.h])
+
+dnl AC_FUNC_MALLOC
+AC_FUNC_MMAP
+AC_CHECK_FUNCS([__argz_count __argz_next __argz_stringify dcgettext mempcpy \
+ munmap stpcpy strcspn strdup])
+
+INTL_DEP= INTL_INC= LIBINTL_H=
+if test "x$USE_INCLUDED_LIBINTL" = "xyes"; then
+ INTL_DEP='${INTL_LIBDIR}/libintl.a'
+ INTL_INC='-I${INTL_LIBSRC} -I${INTL_BUILDDIR}'
+ LIBINTL_H='${INTL_BUILDDIR}/libintl.h'
+fi
+AC_SUBST(INTL_DEP)
+AC_SUBST(INTL_INC)
+AC_SUBST(LIBINTL_H)
+
+dnl
+dnl End of checks needed by files in lib/intl
+dnl
+
+BASH_CHECK_MULTIBYTE
+
+dnl checks for the dynamic loading library functions in libc and libdl
+if test "$opt_static_link" != yes; then
+AC_CHECK_LIB(dl, dlopen)
+AC_CHECK_FUNCS(dlopen dlclose dlsym)
+fi
+
+dnl this defines HAVE_DECL_SYS_SIGLIST
+AC_DECL_SYS_SIGLIST
+
+dnl network functions -- check for inet_aton again
+if test "$ac_cv_func_inet_aton" != 'yes'; then
+BASH_FUNC_INET_ATON
+fi
+
+dnl libraries
+dnl this is reportedly no longer necessary for irix[56].?
+case "$host_os" in
+irix4*) AC_CHECK_LIB(sun, getpwent) ;;
+esac
+
+dnl check for getpeername in the socket library only if it's not in libc
+if test "$ac_cv_func_getpeername" = no; then
+ BASH_CHECK_LIB_SOCKET
+fi
+dnl check for gethostbyname in socket libraries if it's not in libc
+if test "$ac_cv_func_gethostbyname" = no; then
+ BASH_FUNC_GETHOSTBYNAME
+fi
+
+dnl system types
+AC_TYPE_GETGROUPS
+AC_TYPE_OFF_T
+AC_TYPE_MODE_T
+AC_TYPE_UID_T
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_CHECK_TYPE(ssize_t, int)
+AC_CHECK_TYPE(time_t, long)
+
+BASH_TYPE_LONG_LONG
+BASH_TYPE_UNSIGNED_LONG_LONG
+
+AC_TYPE_SIGNAL
+BASH_TYPE_SIG_ATOMIC_T
+
+AC_CHECK_SIZEOF(char, 1)
+AC_CHECK_SIZEOF(short, 2)
+AC_CHECK_SIZEOF(int, 4)
+AC_CHECK_SIZEOF(long, 4)
+AC_CHECK_SIZEOF(char *, 4)
+AC_CHECK_SIZEOF(double, 8)
+AC_CHECK_SIZEOF([long long], 8)
+
+AC_CHECK_TYPE(u_int, [unsigned int])
+AC_CHECK_TYPE(u_long, [unsigned long])
+
+BASH_TYPE_BITS16_T
+BASH_TYPE_U_BITS16_T
+BASH_TYPE_BITS32_T
+BASH_TYPE_U_BITS32_T
+BASH_TYPE_BITS64_T
+
+BASH_TYPE_PTRDIFF_T
+
+dnl structures
+AC_HEADER_STAT
+
+dnl system services
+AC_SYS_INTERPRETER
+if test $ac_cv_sys_interpreter = yes; then
+AC_DEFINE(HAVE_HASH_BANG_EXEC)
+fi
+
+dnl Miscellaneous Bash tests
+if test "$ac_cv_func_lstat" = "no"; then
+BASH_FUNC_LSTAT
+fi
+
+dnl behavior of system calls and library functions
+BASH_FUNC_CTYPE_NONASCII
+BASH_FUNC_DUP2_CLOEXEC_CHECK
+BASH_SYS_PGRP_SYNC
+BASH_SYS_SIGNAL_VINTAGE
+
+dnl checking for the presence of certain library symbols
+BASH_SYS_ERRLIST
+BASH_SYS_SIGLIST
+BASH_UNDER_SYS_SIGLIST
+
+dnl various system types
+BASH_TYPE_SIGHANDLER
+BASH_CHECK_TYPE(clock_t, [#include <sys/times.h>], long)
+BASH_CHECK_TYPE(sigset_t, [#include <signal.h>], int)
+BASH_CHECK_TYPE(quad_t, , long, HAVE_QUAD_T)
+BASH_CHECK_TYPE(intmax_t, , $bash_cv_type_long_long)
+BASH_CHECK_TYPE(uintmax_t, , $bash_cv_type_unsigned_long_long)
+if test "$ac_cv_header_sys_socket_h" = "yes"; then
+BASH_CHECK_TYPE(socklen_t, [#include <sys/socket.h>], int, HAVE_SOCKLEN_T)
+fi
+BASH_TYPE_RLIMIT
+
+dnl presence and contents of structures used by system calls
+BASH_STRUCT_TERMIOS_LDISC
+BASH_STRUCT_TERMIO_LDISC
+BASH_STRUCT_DIRENT_D_INO
+BASH_STRUCT_DIRENT_D_FILENO
+BASH_STRUCT_DIRENT_D_NAMLEN
+BASH_STRUCT_WINSIZE
+BASH_STRUCT_TIMEVAL
+AC_CHECK_MEMBERS([struct stat.st_blocks])
+AC_STRUCT_TM
+AC_STRUCT_TIMEZONE
+BASH_STRUCT_TIMEZONE
+
+dnl presence and behavior of C library functions
+BASH_FUNC_STRSIGNAL
+BASH_FUNC_OPENDIR_CHECK
+BASH_FUNC_ULIMIT_MAXFDS
+BASH_FUNC_FPURGE
+BASH_FUNC_GETENV
+if test "$ac_cv_func_getcwd" = "yes"; then
+BASH_FUNC_GETCWD
+fi
+BASH_FUNC_POSIX_SETJMP
+BASH_FUNC_STRCOLL
+BASH_FUNC_SNPRINTF
+BASH_FUNC_VSNPRINTF
+
+dnl If putenv or unsetenv is not present, set the right define so the
+dnl prototype and declaration in lib/sh/getenv.c will be standard-conformant
+
+if test "$ac_cv_func_putenv" = "yes"; then
+BASH_FUNC_STD_PUTENV
+else
+AC_DEFINE(HAVE_STD_PUTENV)
+fi
+if test "$ac_cv_func_unsetenv" = "yes"; then
+BASH_FUNC_STD_UNSETENV
+else
+AC_DEFINE(HAVE_STD_UNSETENV)
+fi
+
+BASH_FUNC_PRINTF_A_FORMAT
+
+dnl presence and behavior of OS functions
+BASH_SYS_REINSTALL_SIGHANDLERS
+BASH_SYS_JOB_CONTROL_MISSING
+BASH_SYS_NAMED_PIPES
+
+dnl presence of certain CPP defines
+AC_HEADER_TIOCGWINSZ
+BASH_HAVE_TIOCSTAT
+BASH_HAVE_FIONREAD
+
+BASH_CHECK_WCONTINUED
+
+dnl miscellaneous
+BASH_CHECK_SPEED_T
+BASH_CHECK_GETPW_FUNCS
+BASH_CHECK_RTSIGS
+BASH_CHECK_SYS_SIGLIST
+
+dnl special checks
+case "$host_os" in
+hpux*) BASH_CHECK_KERNEL_RLIMIT ;;
+esac
+
+if test "$opt_readline" = yes; then
+dnl yuck
+case "$host_os" in
+aix*) prefer_curses=yes ;;
+esac
+BASH_CHECK_LIB_TERMCAP
+fi
+AC_SUBST(TERMCAP_LIB)
+AC_SUBST(TERMCAP_DEP)
+
+BASH_CHECK_DEV_FD
+BASH_CHECK_DEV_STDIN
+BASH_SYS_DEFAULT_MAIL_DIR
+
+if test "$bash_cv_job_control_missing" = missing; then
+ opt_job_control=no
+fi
+
+if test "$opt_job_control" = yes; then
+AC_DEFINE(JOB_CONTROL)
+JOBS_O=jobs.o
+else
+JOBS_O=nojobs.o
+fi
+
+AC_SUBST(JOBS_O)
+
+dnl Defines that we want to propagate to the Makefiles in subdirectories,
+dnl like glob and readline
+
+LOCAL_DEFS=-DSHELL
+
+dnl use this section to possibly define more cpp variables, specify local
+dnl libraries, and specify any additional local cc or ld flags
+dnl
+dnl this should really go away someday
+
+case "${host_os}" in
+sysv4.2*) AC_DEFINE(SVR4_2)
+ AC_DEFINE(SVR4) ;;
+sysv4*) AC_DEFINE(SVR4) ;;
+sysv5*) AC_DEFINE(SVR5) ;;
+hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX" ;;
+hpux*) LOCAL_CFLAGS=-DHPUX ;;
+dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;;
+isc*) LOCAL_CFLAGS=-Disc386 ;;
+rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;;
+darwin*) LOCAL_CFLAGS=-DMACOSX ;;
+sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;;
+sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;;
+sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;;
+sunos4*) LOCAL_CFLAGS=-DSunOS4 ;;
+solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;;
+solaris2.8*) LOCAL_CFLAGS=-DSOLARIS ;;
+solaris2.9*) LOCAL_CFLAGS=-DSOLARIS ;;
+solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;;
+solaris2*) LOCAL_CFLAGS=-DSOLARIS ;;
+lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
+linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
+ case "`uname -r`" in
+ 2.[[456789]]*|3*) AC_DEFINE(PGRP_PIPE) ;;
+ esac ;;
+*qnx6*) LOCAL_CFLAGS="-Dqnx -Dqnx6" LOCAL_LIBS="-lncurses" ;;
+*qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;;
+powerux*) LOCAL_LIBS="-lgen" ;;
+cygwin*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;;
+opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO -D_POSIX_SOURCE -D_ALL_SOURCE" ;;
+esac
+
+dnl Stanza for OS/compiler pair-specific flags
+case "${host_os}-${CC}" in
+aix4.2*-*gcc*) LOCAL_LDFLAGS="-Xlinker -bexpall -Xlinker -brtl" ;;
+aix4.2*) LOCAL_LDFLAGS="-bexpall -brtl" ;;
+bsdi4*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux
+esac
+
+dnl FreeBSD-3.x can have either a.out or ELF
+case "${host_os}" in
+freebsd[[3-9]]*)
+ if test -x /usr/bin/objformat && test "`/usr/bin/objformat`" = "elf" ; then
+ LOCAL_LDFLAGS=-rdynamic # allow dynamic loading
+ fi ;;
+freebsdelf*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
+dragonfly*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading
+esac
+
+case "$host_cpu" in
+*cray*) LOCAL_CFLAGS="-DCRAY" ;; # shell var so config.h can use it
+esac
+
+case "$host_cpu-$host_os" in
+ibmrt-*bsd4*) LOCAL_CFLAGS="-ma -U__STDC__" ;;
+esac
+
+case "$host_cpu-$host_vendor-$host_os" in
+m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;;
+mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;;
+esac
+
+#
+# Shared object configuration section. These values are generated by
+# ${srcdir}/support/shobj-conf
+#
+if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf
+then
+ AC_MSG_CHECKING(shared object configuration for loadable builtins)
+ eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"`
+ AC_SUBST(SHOBJ_CC)
+ AC_SUBST(SHOBJ_CFLAGS)
+ AC_SUBST(SHOBJ_LD)
+ AC_SUBST(SHOBJ_LDFLAGS)
+ AC_SUBST(SHOBJ_XLDFLAGS)
+ AC_SUBST(SHOBJ_LIBS)
+ AC_SUBST(SHOBJ_STATUS)
+ AC_MSG_RESULT($SHOBJ_STATUS)
+fi
+
+# try to create a directory tree if the source is elsewhere
+# this should be packaged into a script accessible via ${srcdir}/support
+case "$srcdir" in
+.) ;;
+*) for d in doc tests support lib examples; do # dirs
+ test -d $d || mkdir $d
+ done
+ for ld in readline glob tilde malloc sh termcap; do # libdirs
+ test -d lib/$ld || mkdir lib/$ld
+ done
+ test -d examples/loadables || mkdir examples/loadables # loadable builtins
+ test -d examples/loadables/perl || mkdir examples/loadables/perl
+ ;;
+esac
+
+BUILD_DIR=`pwd`
+case "$BUILD_DIR" in
+*\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;;
+*) ;;
+esac
+
+if test -z "$localedir"; then
+ localedir='${datarootdir}/locale'
+fi
+if test -z "$datarootdir"; then
+ datarootdir='${prefix}/share'
+fi
+
+AC_SUBST(PROFILE_FLAGS)
+
+AC_SUBST(incdir)
+AC_SUBST(BUILD_DIR)
+
+# Some versions of autoconf don't substitute these automatically
+AC_SUBST(datarootdir)
+AC_SUBST(localedir)
+
+AC_SUBST(YACC)
+AC_SUBST(AR)
+AC_SUBST(ARFLAGS)
+
+AC_SUBST(BASHVERS)
+AC_SUBST(RELSTATUS)
+AC_SUBST(DEBUG)
+AC_SUBST(MALLOC_DEBUG)
+
+AC_SUBST(host_cpu)
+AC_SUBST(host_vendor)
+AC_SUBST(host_os)
+
+AC_SUBST(LOCAL_LIBS)
+AC_SUBST(LOCAL_CFLAGS)
+AC_SUBST(LOCAL_LDFLAGS)
+AC_SUBST(LOCAL_DEFS)
+
+#AC_SUBST(ALLOCA_SOURCE)
+#AC_SUBST(ALLOCA_OBJECT)
+
+AC_OUTPUT([Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile \
+ lib/intl/Makefile \
+ lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile \
+ lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in \
+ examples/loadables/Makefile examples/loadables/perl/Makefile],
+[
+# Makefile uses this timestamp file to record whether config.h is up to date.
+echo timestamp > stamp-h
+])
diff --git a/conftypes.h b/conftypes.h
new file mode 100644
index 0000000..1c8c548
--- /dev/null
+++ b/conftypes.h
@@ -0,0 +1,58 @@
+/* conftypes.h -- defines for build and host system. */
+
+/* Copyright (C) 2001, 2005, 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_CONFTYPES_H_)
+#define _CONFTYPES_H_
+
+/* Placeholder for future modifications if cross-compiling or building a
+ `fat' binary, e.g. on Apple Rhapsody. These values are used in multiple
+ files, so they appear here. */
+#if !defined (RHAPSODY) && !defined (MACOSX)
+# define HOSTTYPE CONF_HOSTTYPE
+# define OSTYPE CONF_OSTYPE
+# define MACHTYPE CONF_MACHTYPE
+#else /* RHAPSODY */
+# if defined(__powerpc__) || defined(__ppc__)
+# define HOSTTYPE "powerpc"
+# elif defined(__i386__)
+# define HOSTTYPE "i386"
+# else
+# define HOSTTYPE CONF_HOSTTYPE
+# endif
+
+# define OSTYPE CONF_OSTYPE
+# define VENDOR CONF_VENDOR
+
+# define MACHTYPE HOSTTYPE "-" VENDOR "-" OSTYPE
+#endif /* RHAPSODY */
+
+#ifndef HOSTTYPE
+# define HOSTTYPE "unknown"
+#endif
+
+#ifndef OSTYPE
+# define OSTYPE "unknown"
+#endif
+
+#ifndef MACHTYPE
+# define MACHTYPE "unknown"
+#endif
+
+#endif /* _CONFTYPES_H_ */
diff --git a/copy_cmd.c b/copy_cmd.c
new file mode 100644
index 0000000..911d34f
--- /dev/null
+++ b/copy_cmd.c
@@ -0,0 +1,450 @@
+/* copy_command.c -- copy a COMMAND structure. This is needed
+ primarily for making function definitions, but I'm not sure
+ that anyone else will need it. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+
+#include "shell.h"
+
+static PATTERN_LIST *copy_case_clause __P((PATTERN_LIST *));
+static PATTERN_LIST *copy_case_clauses __P((PATTERN_LIST *));
+static FOR_COM *copy_for_command __P((FOR_COM *));
+#if defined (ARITH_FOR_COMMAND)
+static ARITH_FOR_COM *copy_arith_for_command __P((ARITH_FOR_COM *));
+#endif
+static GROUP_COM *copy_group_command __P((GROUP_COM *));
+static SUBSHELL_COM *copy_subshell_command __P((SUBSHELL_COM *));
+static COPROC_COM *copy_coproc_command __P((COPROC_COM *));
+static CASE_COM *copy_case_command __P((CASE_COM *));
+static WHILE_COM *copy_while_command __P((WHILE_COM *));
+static IF_COM *copy_if_command __P((IF_COM *));
+#if defined (DPAREN_ARITHMETIC)
+static ARITH_COM *copy_arith_command __P((ARITH_COM *));
+#endif
+#if defined (COND_COMMAND)
+static COND_COM *copy_cond_command __P((COND_COM *));
+#endif
+static SIMPLE_COM *copy_simple_command __P((SIMPLE_COM *));
+
+WORD_DESC *
+copy_word (w)
+ WORD_DESC *w;
+{
+ WORD_DESC *new_word;
+
+ new_word = make_bare_word (w->word);
+ new_word->flags = w->flags;
+ return (new_word);
+}
+
+/* Copy the chain of words in LIST. Return a pointer to
+ the new chain. */
+WORD_LIST *
+copy_word_list (list)
+ WORD_LIST *list;
+{
+ WORD_LIST *new_list;
+
+ for (new_list = (WORD_LIST *)NULL; list; list = list->next)
+ new_list = make_word_list (copy_word (list->word), new_list);
+
+ return (REVERSE_LIST (new_list, WORD_LIST *));
+}
+
+static PATTERN_LIST *
+copy_case_clause (clause)
+ PATTERN_LIST *clause;
+{
+ PATTERN_LIST *new_clause;
+
+ new_clause = (PATTERN_LIST *)xmalloc (sizeof (PATTERN_LIST));
+ new_clause->patterns = copy_word_list (clause->patterns);
+ new_clause->action = copy_command (clause->action);
+ new_clause->flags = clause->flags;
+ return (new_clause);
+}
+
+static PATTERN_LIST *
+copy_case_clauses (clauses)
+ PATTERN_LIST *clauses;
+{
+ PATTERN_LIST *new_list, *new_clause;
+
+ for (new_list = (PATTERN_LIST *)NULL; clauses; clauses = clauses->next)
+ {
+ new_clause = copy_case_clause (clauses);
+ new_clause->next = new_list;
+ new_list = new_clause;
+ }
+ return (REVERSE_LIST (new_list, PATTERN_LIST *));
+}
+
+/* Copy a single redirect. */
+REDIRECT *
+copy_redirect (redirect)
+ REDIRECT *redirect;
+{
+ REDIRECT *new_redirect;
+
+ new_redirect = (REDIRECT *)xmalloc (sizeof (REDIRECT));
+#if 0
+ FASTCOPY ((char *)redirect, (char *)new_redirect, (sizeof (REDIRECT)));
+#else
+ *new_redirect = *redirect; /* let the compiler do the fast structure copy */
+#endif
+
+ if (redirect->rflags & REDIR_VARASSIGN)
+ new_redirect->redirector.filename = copy_word (redirect->redirector.filename);
+
+ switch (redirect->instruction)
+ {
+ case r_reading_until:
+ case r_deblank_reading_until:
+ new_redirect->here_doc_eof = savestring (redirect->here_doc_eof);
+ /*FALLTHROUGH*/
+ case r_reading_string:
+ case r_appending_to:
+ case r_output_direction:
+ case r_input_direction:
+ case r_inputa_direction:
+ case r_err_and_out:
+ case r_append_err_and_out:
+ case r_input_output:
+ case r_output_force:
+ case r_duplicating_input_word:
+ case r_duplicating_output_word:
+ case r_move_input_word:
+ case r_move_output_word:
+ new_redirect->redirectee.filename = copy_word (redirect->redirectee.filename);
+ break;
+ case r_duplicating_input:
+ case r_duplicating_output:
+ case r_move_input:
+ case r_move_output:
+ case r_close_this:
+ break;
+ }
+ return (new_redirect);
+}
+
+REDIRECT *
+copy_redirects (list)
+ REDIRECT *list;
+{
+ REDIRECT *new_list, *temp;
+
+ for (new_list = (REDIRECT *)NULL; list; list = list->next)
+ {
+ temp = copy_redirect (list);
+ temp->next = new_list;
+ new_list = temp;
+ }
+ return (REVERSE_LIST (new_list, REDIRECT *));
+}
+
+static FOR_COM *
+copy_for_command (com)
+ FOR_COM *com;
+{
+ FOR_COM *new_for;
+
+ new_for = (FOR_COM *)xmalloc (sizeof (FOR_COM));
+ new_for->flags = com->flags;
+ new_for->line = com->line;
+ new_for->name = copy_word (com->name);
+ new_for->map_list = copy_word_list (com->map_list);
+ new_for->action = copy_command (com->action);
+ return (new_for);
+}
+
+#if defined (ARITH_FOR_COMMAND)
+static ARITH_FOR_COM *
+copy_arith_for_command (com)
+ ARITH_FOR_COM *com;
+{
+ ARITH_FOR_COM *new_arith_for;
+
+ new_arith_for = (ARITH_FOR_COM *)xmalloc (sizeof (ARITH_FOR_COM));
+ new_arith_for->flags = com->flags;
+ new_arith_for->line = com->line;
+ new_arith_for->init = copy_word_list (com->init);
+ new_arith_for->test = copy_word_list (com->test);
+ new_arith_for->step = copy_word_list (com->step);
+ new_arith_for->action = copy_command (com->action);
+ return (new_arith_for);
+}
+#endif /* ARITH_FOR_COMMAND */
+
+static GROUP_COM *
+copy_group_command (com)
+ GROUP_COM *com;
+{
+ GROUP_COM *new_group;
+
+ new_group = (GROUP_COM *)xmalloc (sizeof (GROUP_COM));
+ new_group->command = copy_command (com->command);
+ return (new_group);
+}
+
+static SUBSHELL_COM *
+copy_subshell_command (com)
+ SUBSHELL_COM *com;
+{
+ SUBSHELL_COM *new_subshell;
+
+ new_subshell = (SUBSHELL_COM *)xmalloc (sizeof (SUBSHELL_COM));
+ new_subshell->command = copy_command (com->command);
+ new_subshell->flags = com->flags;
+ return (new_subshell);
+}
+
+static COPROC_COM *
+copy_coproc_command (com)
+ COPROC_COM *com;
+{
+ COPROC_COM *new_coproc;
+
+ new_coproc = (COPROC_COM *)xmalloc (sizeof (COPROC_COM));
+ new_coproc->name = savestring (com->name);
+ new_coproc->command = copy_command (com->command);
+ new_coproc->flags = com->flags;
+ return (new_coproc);
+}
+
+static CASE_COM *
+copy_case_command (com)
+ CASE_COM *com;
+{
+ CASE_COM *new_case;
+
+ new_case = (CASE_COM *)xmalloc (sizeof (CASE_COM));
+ new_case->flags = com->flags;
+ new_case->line = com->line;
+ new_case->word = copy_word (com->word);
+ new_case->clauses = copy_case_clauses (com->clauses);
+ return (new_case);
+}
+
+static WHILE_COM *
+copy_while_command (com)
+ WHILE_COM *com;
+{
+ WHILE_COM *new_while;
+
+ new_while = (WHILE_COM *)xmalloc (sizeof (WHILE_COM));
+ new_while->flags = com->flags;
+ new_while->test = copy_command (com->test);
+ new_while->action = copy_command (com->action);
+ return (new_while);
+}
+
+static IF_COM *
+copy_if_command (com)
+ IF_COM *com;
+{
+ IF_COM *new_if;
+
+ new_if = (IF_COM *)xmalloc (sizeof (IF_COM));
+ new_if->flags = com->flags;
+ new_if->test = copy_command (com->test);
+ new_if->true_case = copy_command (com->true_case);
+ new_if->false_case = com->false_case ? copy_command (com->false_case) : com->false_case;
+ return (new_if);
+}
+
+#if defined (DPAREN_ARITHMETIC)
+static ARITH_COM *
+copy_arith_command (com)
+ ARITH_COM *com;
+{
+ ARITH_COM *new_arith;
+
+ new_arith = (ARITH_COM *)xmalloc (sizeof (ARITH_COM));
+ new_arith->flags = com->flags;
+ new_arith->exp = copy_word_list (com->exp);
+ new_arith->line = com->line;
+
+ return (new_arith);
+}
+#endif
+
+#if defined (COND_COMMAND)
+static COND_COM *
+copy_cond_command (com)
+ COND_COM *com;
+{
+ COND_COM *new_cond;
+
+ new_cond = (COND_COM *)xmalloc (sizeof (COND_COM));
+ new_cond->flags = com->flags;
+ new_cond->line = com->line;
+ new_cond->type = com->type;
+ new_cond->op = com->op ? copy_word (com->op) : com->op;
+ new_cond->left = com->left ? copy_cond_command (com->left) : (COND_COM *)NULL;
+ new_cond->right = com->right ? copy_cond_command (com->right) : (COND_COM *)NULL;
+
+ return (new_cond);
+}
+#endif
+
+static SIMPLE_COM *
+copy_simple_command (com)
+ SIMPLE_COM *com;
+{
+ SIMPLE_COM *new_simple;
+
+ new_simple = (SIMPLE_COM *)xmalloc (sizeof (SIMPLE_COM));
+ new_simple->flags = com->flags;
+ new_simple->words = copy_word_list (com->words);
+ new_simple->redirects = com->redirects ? copy_redirects (com->redirects) : (REDIRECT *)NULL;
+ new_simple->line = com->line;
+ return (new_simple);
+}
+
+FUNCTION_DEF *
+copy_function_def_contents (old, new_def)
+ FUNCTION_DEF *old, *new_def;
+{
+ new_def->name = copy_word (old->name);
+ new_def->command = old->command ? copy_command (old->command) : old->command;
+ new_def->flags = old->flags;
+ new_def->line = old->line;
+ new_def->source_file = old->source_file ? savestring (old->source_file) : old->source_file;
+ return (new_def);
+}
+
+FUNCTION_DEF *
+copy_function_def (com)
+ FUNCTION_DEF *com;
+{
+ FUNCTION_DEF *new_def;
+
+ new_def = (FUNCTION_DEF *)xmalloc (sizeof (FUNCTION_DEF));
+ new_def = copy_function_def_contents (com, new_def);
+ return (new_def);
+}
+
+/* Copy the command structure in COMMAND. Return a pointer to the
+ copy. Don't you forget to dispose_command () on this pointer
+ later! */
+COMMAND *
+copy_command (command)
+ COMMAND *command;
+{
+ COMMAND *new_command;
+
+ if (command == NULL)
+ return (command);
+
+ new_command = (COMMAND *)xmalloc (sizeof (COMMAND));
+ FASTCOPY ((char *)command, (char *)new_command, sizeof (COMMAND));
+ new_command->flags = command->flags;
+ new_command->line = command->line;
+
+ if (command->redirects)
+ new_command->redirects = copy_redirects (command->redirects);
+
+ switch (command->type)
+ {
+ case cm_for:
+ new_command->value.For = copy_for_command (command->value.For);
+ break;
+
+#if defined (ARITH_FOR_COMMAND)
+ case cm_arith_for:
+ new_command->value.ArithFor = copy_arith_for_command (command->value.ArithFor);
+ break;
+#endif
+
+#if defined (SELECT_COMMAND)
+ case cm_select:
+ new_command->value.Select =
+ (SELECT_COM *)copy_for_command ((FOR_COM *)command->value.Select);
+ break;
+#endif
+
+ case cm_group:
+ new_command->value.Group = copy_group_command (command->value.Group);
+ break;
+
+ case cm_subshell:
+ new_command->value.Subshell = copy_subshell_command (command->value.Subshell);
+ break;
+
+ case cm_coproc:
+ new_command->value.Coproc = copy_coproc_command (command->value.Coproc);
+ break;
+
+ case cm_case:
+ new_command->value.Case = copy_case_command (command->value.Case);
+ break;
+
+ case cm_until:
+ case cm_while:
+ new_command->value.While = copy_while_command (command->value.While);
+ break;
+
+ case cm_if:
+ new_command->value.If = copy_if_command (command->value.If);
+ break;
+
+#if defined (DPAREN_ARITHMETIC)
+ case cm_arith:
+ new_command->value.Arith = copy_arith_command (command->value.Arith);
+ break;
+#endif
+
+#if defined (COND_COMMAND)
+ case cm_cond:
+ new_command->value.Cond = copy_cond_command (command->value.Cond);
+ break;
+#endif
+
+ case cm_simple:
+ new_command->value.Simple = copy_simple_command (command->value.Simple);
+ break;
+
+ case cm_connection:
+ {
+ CONNECTION *new_connection;
+
+ new_connection = (CONNECTION *)xmalloc (sizeof (CONNECTION));
+ new_connection->connector = command->value.Connection->connector;
+ new_connection->first = copy_command (command->value.Connection->first);
+ new_connection->second = copy_command (command->value.Connection->second);
+ new_command->value.Connection = new_connection;
+ break;
+ }
+
+ case cm_function_def:
+ new_command->value.Function_def = copy_function_def (command->value.Function_def);
+ break;
+ }
+ return (new_command);
+}
diff --git a/cross-build/cygwin32.cache b/cross-build/cygwin32.cache
new file mode 100644
index 0000000..36948da
--- /dev/null
+++ b/cross-build/cygwin32.cache
@@ -0,0 +1,251 @@
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overriden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+ac_cv_build=${ac_cv_build='i686-pc-cygwin'}
+ac_cv_build_alias=${ac_cv_build_alias='i686-pc-cygwin'}
+ac_cv_c_bigendian=${ac_cv_c_bigendian='no'}
+ac_cv_c_char_unsigned=${ac_cv_c_char_unsigned='no'}
+ac_cv_c_compiler_gnu=${ac_cv_c_compiler_gnu='yes'}
+ac_cv_c_const=${ac_cv_c_const='yes'}
+ac_cv_c_inline=${ac_cv_c_inline='inline'}
+ac_cv_c_long_double=${ac_cv_c_long_double='yes'}
+ac_cv_c_stringize=${ac_cv_c_stringize='yes'}
+ac_cv_decl_sys_siglist=${ac_cv_decl_sys_siglist='no'}
+ac_cv_exeext=${ac_cv_exeext='.exe'}
+ac_cv_func___setostype=${ac_cv_func___setostype='no'}
+ac_cv_func__doprnt=${ac_cv_func__doprnt='no'}
+ac_cv_func_alloca_works=${ac_cv_func_alloca_works='yes'}
+ac_cv_func_asprintf=${ac_cv_func_asprintf='no'}
+ac_cv_func_bcopy=${ac_cv_func_bcopy='yes'}
+ac_cv_func_bindtextdomain=${ac_cv_func_bindtextdomain='no'}
+ac_cv_func_bzero=${ac_cv_func_bzero='yes'}
+ac_cv_func_confstr=${ac_cv_func_confstr='no'}
+ac_cv_func_dlclose=${ac_cv_func_dlclose='yes'}
+ac_cv_func_dlopen=${ac_cv_func_dlopen='yes'}
+ac_cv_func_dlsym=${ac_cv_func_dlsym='yes'}
+ac_cv_func_dup2=${ac_cv_func_dup2='yes'}
+ac_cv_func_fnmatch=${ac_cv_func_fnmatch='no'}
+ac_cv_func_getaddrinfo=${ac_cv_func_getaddrinfo='no'}
+ac_cv_func_getcwd=${ac_cv_func_getcwd='yes'}
+ac_cv_func_getdtablesize=${ac_cv_func_getdtablesize='yes'}
+ac_cv_func_getgroups=${ac_cv_func_getgroups='yes'}
+ac_cv_func_gethostbyname=${ac_cv_func_gethostbyname='yes'}
+ac_cv_func_gethostname=${ac_cv_func_gethostname='yes'}
+ac_cv_func_getpagesize=${ac_cv_func_getpagesize='yes'}
+ac_cv_func_getpeername=${ac_cv_func_getpeername='yes'}
+ac_cv_func_getpgrp_void=${ac_cv_func_getpgrp_void='yes'}
+ac_cv_func_getrlimit=${ac_cv_func_getrlimit='yes'}
+ac_cv_func_getrusage=${ac_cv_func_getrusage='yes'}
+ac_cv_func_getservbyname=${ac_cv_func_getservbyname='yes'}
+ac_cv_func_gettext=${ac_cv_func_gettext='no'}
+ac_cv_func_gettimeofday=${ac_cv_func_gettimeofday='yes'}
+ac_cv_func_inet_aton=${ac_cv_func_inet_aton='yes'}
+ac_cv_func_isascii=${ac_cv_func_isascii='yes'}
+ac_cv_func_isblank=${ac_cv_func_isblank='no'}
+ac_cv_func_isgraph=${ac_cv_func_isgraph='yes'}
+ac_cv_func_isprint=${ac_cv_func_isprint='yes'}
+ac_cv_func_isspace=${ac_cv_func_isspace='yes'}
+ac_cv_func_isxdigit=${ac_cv_func_isxdigit='yes'}
+ac_cv_func_killpg=${ac_cv_func_killpg='yes'}
+ac_cv_func_lstat=${ac_cv_func_lstat='yes'}
+ac_cv_func_memmove=${ac_cv_func_memmove='yes'}
+ac_cv_func_mkfifo=${ac_cv_func_mkfifo='yes'}
+ac_cv_func_pathconf=${ac_cv_func_pathconf='yes'}
+ac_cv_func_putenv=${ac_cv_func_putenv='yes'}
+ac_cv_func_readlink=${ac_cv_func_readlink='yes'}
+ac_cv_func_rename=${ac_cv_func_rename='yes'}
+ac_cv_func_sbrk=${ac_cv_func_sbrk='yes'}
+ac_cv_func_select=${ac_cv_func_select='yes'}
+ac_cv_func_setdtablesize=${ac_cv_func_setdtablesize='yes'}
+ac_cv_func_setenv=${ac_cv_func_setenv='yes'}
+ac_cv_func_setlinebuf=${ac_cv_func_setlinebuf='no'}
+ac_cv_func_setlocale=${ac_cv_func_setlocale='yes'}
+ac_cv_func_setvbuf=${ac_cv_func_setvbuf='yes'}
+ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed='no'}
+ac_cv_func_siginterrupt=${ac_cv_func_siginterrupt='no'}
+ac_cv_func_snprintf=${ac_cv_func_snprintf='yes'}
+ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp='yes'}
+ac_cv_func_strchr=${ac_cv_func_strchr='yes'}
+ac_cv_func_strcoll_works=${ac_cv_func_strcoll_works='yes'}
+ac_cv_func_strerror=${ac_cv_func_strerror='yes'}
+ac_cv_func_strpbrk=${ac_cv_func_strpbrk='yes'}
+ac_cv_func_strtod=${ac_cv_func_strtod='yes'}
+ac_cv_func_strtoimax=${ac_cv_func_strtoimax='no'}
+ac_cv_func_strtol=${ac_cv_func_strtol='yes'}
+ac_cv_func_strtoll=${ac_cv_func_strtoll='no'}
+ac_cv_func_strtoul=${ac_cv_func_strtoul='yes'}
+ac_cv_func_strtoull=${ac_cv_func_strtoull='no'}
+ac_cv_func_strtoumax=${ac_cv_func_strtoumax='no'}
+ac_cv_func_sysconf=${ac_cv_func_sysconf='yes'}
+ac_cv_func_tcgetattr=${ac_cv_func_tcgetattr='yes'}
+ac_cv_func_tcgetpgrp=${ac_cv_func_tcgetpgrp='yes'}
+ac_cv_func_textdomain=${ac_cv_func_textdomain='no'}
+ac_cv_func_times=${ac_cv_func_times='yes'}
+ac_cv_func_ttyname=${ac_cv_func_ttyname='yes'}
+ac_cv_func_tzset=${ac_cv_func_tzset='yes'}
+ac_cv_func_ulimit=${ac_cv_func_ulimit='no'}
+ac_cv_func_uname=${ac_cv_func_uname='yes'}
+ac_cv_func_vasprintf=${ac_cv_func_vasprintf='no'}
+ac_cv_func_vprintf=${ac_cv_func_vprintf='yes'}
+ac_cv_func_vsnprintf=${ac_cv_func_vsnprintf='yes'}
+ac_cv_func_wait3=${ac_cv_func_wait3='yes'}
+ac_cv_func_waitpid=${ac_cv_func_waitpid='yes'}
+ac_cv_have_decl_confstr=${ac_cv_have_decl_confstr='no'}
+ac_cv_have_decl_printf=${ac_cv_have_decl_printf='yes'}
+ac_cv_have_decl_sbrk=${ac_cv_have_decl_sbrk='yes'}
+ac_cv_have_decl_strsignal=${ac_cv_have_decl_strsignal='yes'}
+ac_cv_have_decl_strtold=${ac_cv_have_decl_strtold='no'}
+ac_cv_header_arpa_inet_h=${ac_cv_header_arpa_inet_h='yes'}
+ac_cv_header_dirent_dirent_h=${ac_cv_header_dirent_dirent_h='yes'}
+ac_cv_header_dlfcn_h=${ac_cv_header_dlfcn_h='yes'}
+ac_cv_header_grp_h=${ac_cv_header_grp_h='yes'}
+ac_cv_header_inttypes_h=${ac_cv_header_inttypes_h='no'}
+ac_cv_header_libintl_h=${ac_cv_header_libintl_h='yes'}
+ac_cv_header_limits_h=${ac_cv_header_limits_h='yes'}
+ac_cv_header_locale_h=${ac_cv_header_locale_h='yes'}
+ac_cv_header_memory_h=${ac_cv_header_memory_h='yes'}
+ac_cv_header_minix_config_h=${ac_cv_header_minix_config_h='no'}
+ac_cv_header_netdb_h=${ac_cv_header_netdb_h='yes'}
+ac_cv_header_netinet_in_h=${ac_cv_header_netinet_in_h='yes'}
+ac_cv_header_stat_broken=${ac_cv_header_stat_broken='no'}
+ac_cv_header_stdarg_h=${ac_cv_header_stdarg_h='yes'}
+ac_cv_header_stdc=${ac_cv_header_stdc='yes'}
+ac_cv_header_stddef_h=${ac_cv_header_stddef_h='yes'}
+ac_cv_header_stdint_h=${ac_cv_header_stdint_h='no'}
+ac_cv_header_stdlib_h=${ac_cv_header_stdlib_h='yes'}
+ac_cv_header_string_h=${ac_cv_header_string_h='yes'}
+ac_cv_header_strings_h=${ac_cv_header_strings_h='yes'}
+ac_cv_header_sys_file_h=${ac_cv_header_sys_file_h='yes'}
+ac_cv_header_sys_param_h=${ac_cv_header_sys_param_h='yes'}
+ac_cv_header_sys_pte_h=${ac_cv_header_sys_pte_h='no'}
+ac_cv_header_sys_ptem_h=${ac_cv_header_sys_ptem_h='no'}
+ac_cv_header_sys_resource_h=${ac_cv_header_sys_resource_h='yes'}
+ac_cv_header_sys_select_h=${ac_cv_header_sys_select_h='yes'}
+ac_cv_header_sys_socket_h=${ac_cv_header_sys_socket_h='yes'}
+ac_cv_header_sys_stat_h=${ac_cv_header_sys_stat_h='yes'}
+ac_cv_header_sys_stream_h=${ac_cv_header_sys_stream_h='no'}
+ac_cv_header_sys_time_h=${ac_cv_header_sys_time_h='yes'}
+ac_cv_header_sys_times_h=${ac_cv_header_sys_times_h='yes'}
+ac_cv_header_sys_types_h=${ac_cv_header_sys_types_h='yes'}
+ac_cv_header_sys_wait_h=${ac_cv_header_sys_wait_h='yes'}
+ac_cv_header_termcap_h=${ac_cv_header_termcap_h='yes'}
+ac_cv_header_termio_h=${ac_cv_header_termio_h='yes'}
+ac_cv_header_termios_h=${ac_cv_header_termios_h='yes'}
+ac_cv_header_time=${ac_cv_header_time='yes'}
+ac_cv_header_unistd_h=${ac_cv_header_unistd_h='yes'}
+ac_cv_header_varargs_h=${ac_cv_header_varargs_h='yes'}
+ac_cv_host=${ac_cv_host='i686-pc-cygwin'}
+ac_cv_host_alias=${ac_cv_host_alias='i686-pc-cygwin'}
+ac_cv_lib_dir_opendir=${ac_cv_lib_dir_opendir='no'}
+ac_cv_lib_dl_dlopen=${ac_cv_lib_dl_dlopen='no'}
+ac_cv_lib_intl_bindtextdomain=${ac_cv_lib_intl_bindtextdomain='yes'}
+ac_cv_lib_termcap_tgetent=${ac_cv_lib_termcap_tgetent='yes'}
+ac_cv_member_struct_stat_st_blocks=${ac_cv_member_struct_stat_st_blocks='yes'}
+ac_cv_member_struct_termio_c_line=${ac_cv_member_struct_termio_c_line='yes'}
+ac_cv_member_struct_termios_c_line=${ac_cv_member_struct_termios_c_line='yes'}
+ac_cv_objext=${ac_cv_objext='o'}
+ac_cv_path_install=${ac_cv_path_install='/usr/bin/install -c'}
+ac_cv_prog_AR=${ac_cv_prog_AR='ar'}
+ac_cv_prog_CPP=${ac_cv_prog_CPP='gcc -E'}
+ac_cv_prog_YACC=${ac_cv_prog_YACC='bison -y'}
+ac_cv_prog_ac_ct_CC=${ac_cv_prog_ac_ct_CC='gcc'}
+ac_cv_prog_ac_ct_RANLIB=${ac_cv_prog_ac_ct_RANLIB='ranlib'}
+ac_cv_prog_cc_g=${ac_cv_prog_cc_g='yes'}
+ac_cv_prog_cc_stdc=${ac_cv_prog_cc_stdc=''}
+ac_cv_prog_gcc_traditional=${ac_cv_prog_gcc_traditional='no'}
+ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set='yes'}
+ac_cv_sizeof_char=${ac_cv_sizeof_char='1'}
+ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p='4'}
+ac_cv_sizeof_double=${ac_cv_sizeof_double='8'}
+ac_cv_sizeof_int=${ac_cv_sizeof_int='4'}
+ac_cv_sizeof_long=${ac_cv_sizeof_long='4'}
+ac_cv_sizeof_long_long=${ac_cv_sizeof_long_long='8'}
+ac_cv_sizeof_short=${ac_cv_sizeof_short='2'}
+ac_cv_sys_file_offset_bits=${ac_cv_sys_file_offset_bits='no'}
+ac_cv_sys_interpreter=${ac_cv_sys_interpreter='yes'}
+ac_cv_sys_large_files=${ac_cv_sys_large_files='no'}
+ac_cv_sys_largefile_CC=${ac_cv_sys_largefile_CC='no'}
+ac_cv_sys_posix_termios=${ac_cv_sys_posix_termios='yes'}
+ac_cv_sys_tiocgwinsz_in_termios_h=${ac_cv_sys_tiocgwinsz_in_termios_h='yes'}
+ac_cv_type_bits16_t=${ac_cv_type_bits16_t='no'}
+ac_cv_type_bits32_t=${ac_cv_type_bits32_t='no'}
+ac_cv_type_bits64_t=${ac_cv_type_bits64_t='no'}
+ac_cv_type_char=${ac_cv_type_char='yes'}
+ac_cv_type_char_p=${ac_cv_type_char_p='yes'}
+ac_cv_type_double=${ac_cv_type_double='yes'}
+ac_cv_type_getgroups=${ac_cv_type_getgroups='gid_t'}
+ac_cv_type_int=${ac_cv_type_int='yes'}
+ac_cv_type_long=${ac_cv_type_long='yes'}
+ac_cv_type_long_long=${ac_cv_type_long_long='yes'}
+ac_cv_type_mode_t=${ac_cv_type_mode_t='yes'}
+ac_cv_type_off_t=${ac_cv_type_off_t='yes'}
+ac_cv_type_pid_t=${ac_cv_type_pid_t='yes'}
+ac_cv_type_ptrdiff_t=${ac_cv_type_ptrdiff_t='yes'}
+ac_cv_type_short=${ac_cv_type_short='yes'}
+ac_cv_type_signal=${ac_cv_type_signal='void'}
+ac_cv_type_size_t=${ac_cv_type_size_t='yes'}
+ac_cv_type_ssize_t=${ac_cv_type_ssize_t='yes'}
+ac_cv_type_time_t=${ac_cv_type_time_t='yes'}
+ac_cv_type_u_bits16_t=${ac_cv_type_u_bits16_t='no'}
+ac_cv_type_u_bits32_t=${ac_cv_type_u_bits32_t='no'}
+ac_cv_type_u_int=${ac_cv_type_u_int='yes'}
+ac_cv_type_u_long=${ac_cv_type_u_long='yes'}
+ac_cv_type_uid_t=${ac_cv_type_uid_t='yes'}
+ac_cv_working_alloca_h=${ac_cv_working_alloca_h='no'}
+
+bash_cv_decl_strtoimax=${bash_cv_decl_strtoimax='no'}
+bash_cv_decl_strtol=${bash_cv_decl_strtol='yes'}
+bash_cv_decl_strtoll=${bash_cv_decl_strtoll='no'}
+bash_cv_decl_strtoul=${bash_cv_decl_strtoul='yes'}
+bash_cv_decl_strtoull=${bash_cv_decl_strtoull='no'}
+bash_cv_decl_strtoumax=${bash_cv_decl_strtoumax='no'}
+bash_cv_decl_under_sys_siglist=${bash_cv_decl_under_sys_siglist='no'}
+bash_cv_dev_fd=${bash_cv_dev_fd='absent'}
+bash_cv_dev_stdin=${bash_cv_dev_stdin='absent'}
+bash_cv_dirent_has_d_fileno=${bash_cv_dirent_has_d_fileno='no'}
+bash_cv_dirent_has_dino=${bash_cv_dirent_has_dino='yes'}
+bash_cv_dup2_broken=${bash_cv_dup2_broken='no'}
+bash_cv_fionread_in_ioctl=${bash_cv_fionread_in_ioctl='no'}
+bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp='present'}
+bash_cv_func_strcoll_broken=${bash_cv_func_strcoll_broken='no'}
+bash_cv_getenv_redef=${bash_cv_getenv_redef='yes'}
+bash_cv_getpw_declared=${bash_cv_getpw_declared='yes'}
+bash_cv_have_strsignal=${bash_cv_have_strsignal='yes'}
+bash_cv_job_control_missing=${bash_cv_job_control_missing='present'}
+bash_cv_mail_dir=${bash_cv_mail_dir='unknown'}
+bash_cv_must_reinstall_sighandlers=${bash_cv_must_reinstall_sighandlers='no'}
+bash_cv_opendir_not_robust=${bash_cv_opendir_not_robust='no'}
+bash_cv_pgrp_pipe=${bash_cv_pgrp_pipe='no'}
+bash_cv_printf_a_format=${bash_cv_printf_a_format='no'}
+bash_cv_signal_vintage=${bash_cv_signal_vintage='posix'}
+bash_cv_speed_t_in_sys_types=${bash_cv_speed_t_in_sys_types='no'}
+bash_cv_struct_timeval=${bash_cv_struct_timeval='yes'}
+bash_cv_struct_winsize_header=${bash_cv_struct_winsize_header='termios_h'}
+bash_cv_sys_errlist=${bash_cv_sys_errlist='no'}
+bash_cv_sys_named_pipes=${bash_cv_sys_named_pipes='present'}
+bash_cv_sys_siglist=${bash_cv_sys_siglist='no'}
+bash_cv_termcap_lib=${bash_cv_termcap_lib='libtermcap'}
+bash_cv_tiocstat_in_ioctl=${bash_cv_tiocstat_in_ioctl='no'}
+bash_cv_type_clock_t=${bash_cv_type_clock_t='yes'}
+bash_cv_type_intmax_t=${bash_cv_type_intmax_t='no'}
+bash_cv_type_long_long=${bash_cv_type_long_long='long long'}
+bash_cv_type_quad_t=${bash_cv_type_quad_t='no'}
+bash_cv_type_rlimit=${bash_cv_type_rlimit='rlim_t'}
+bash_cv_type_sigset_t=${bash_cv_type_sigset_t='yes'}
+bash_cv_type_socklen_t=${bash_cv_type_socklen_t='no'}
+bash_cv_type_uintmax_t=${bash_cv_type_uintmax_t='no'}
+bash_cv_type_unsigned_long_long=${bash_cv_type_unsigned_long_long='unsigned long long'}
+bash_cv_ulimit_maxfds=${bash_cv_ulimit_maxfds='no'}
+bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist='no'}
+bash_cv_unusable_rtsigs=${bash_cv_unusable_rtsigs='no'}
+bash_cv_void_sighandler=${bash_cv_void_sighandler='yes'}
diff --git a/cross-build/opennt.cache b/cross-build/opennt.cache
new file mode 100644
index 0000000..ca5e7cd
--- /dev/null
+++ b/cross-build/opennt.cache
@@ -0,0 +1,169 @@
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs. It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already. You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+ac_cv_c_bigendian=${ac_cv_c_bigendian=no}
+ac_cv_decl_sys_siglist=${ac_cv_decl_sys_siglist=no}
+ac_cv_func___setostype=${ac_cv_func___setostype=no}
+ac_cv_func_alloca_works=${ac_cv_func_alloca_works=yes}
+ac_cv_func_bcopy=${ac_cv_func_bcopy=yes}
+ac_cv_func_bindtextdomain=${ac_cv_func_bindtextdomain=no}
+ac_cv_func_bzero=${ac_cv_func_bzero=yes}
+ac_cv_func_confstr=${ac_cv_func_confstr=yes}
+ac_cv_func_dlclose=${ac_cv_func_dlclose=no}
+ac_cv_func_dlopen=${ac_cv_func_dlopen=no}
+ac_cv_func_dlsym=${ac_cv_func_dlsym=no}
+ac_cv_func_dup2=${ac_cv_func_dup2=yes}
+ac_cv_func_getcwd=${ac_cv_func_getcwd=yes}
+ac_cv_func_getdtablesize=${ac_cv_func_getdtablesize=no}
+ac_cv_func_getgroups=${ac_cv_func_getgroups=yes}
+ac_cv_func_gethostname=${ac_cv_func_gethostname=yes}
+ac_cv_func_getpagesize=${ac_cv_func_getpagesize=yes}
+ac_cv_func_getpeername=${ac_cv_func_getpeername=yes}
+ac_cv_func_getpgrp_void=${ac_cv_func_getpgrp_void=yes}
+ac_cv_func_getrlimit=${ac_cv_func_getrlimit=no}
+ac_cv_func_getrusage=${ac_cv_func_getrusage=no}
+ac_cv_func_gettext=${ac_cv_func_gettext=no}
+ac_cv_func_gettimeofday=${ac_cv_func_gettimeofday=yes}
+ac_cv_func_killpg=${ac_cv_func_killpg=yes}
+ac_cv_func_lstat=${ac_cv_func_lstat=no}
+ac_cv_func_memmove=${ac_cv_func_memmove=yes}
+ac_cv_func_mkfifo=${ac_cv_func_mkfifo=yes}
+ac_cv_func_putenv=${ac_cv_func_putenv=yes}
+ac_cv_func_rename=${ac_cv_func_rename=yes}
+ac_cv_func_sbrk=${ac_cv_func_sbrk=no}
+ac_cv_func_select=${ac_cv_func_select=yes}
+ac_cv_func_setdtablesize=${ac_cv_func_setdtablesize=no}
+ac_cv_func_setenv=${ac_cv_func_setenv=yes}
+ac_cv_func_setlinebuf=${ac_cv_func_setlinebuf=yes}
+ac_cv_func_setlocale=${ac_cv_func_setlocale=yes}
+ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed=no}
+ac_cv_func_siginterrupt=${ac_cv_func_siginterrupt=no}
+ac_cv_func_strcasecmp=${ac_cv_func_strcasecmp=yes}
+ac_cv_func_strchr=${ac_cv_func_strchr=yes}
+ac_cv_func_strcoll_works=${ac_cv_func_strcoll_works=yes}
+ac_cv_func_strerror=${ac_cv_func_strerror=yes}
+ac_cv_func_strtod=${ac_cv_func_strtod=yes}
+ac_cv_func_strtol=${ac_cv_func_strtol=yes}
+ac_cv_func_strtoul=${ac_cv_func_strtoul=yes}
+ac_cv_func_sysconf=${ac_cv_func_sysconf=yes}
+ac_cv_func_tcgetattr=${ac_cv_func_tcgetattr=yes}
+ac_cv_func_tcgetpgrp=${ac_cv_func_tcgetpgrp=yes}
+ac_cv_func_textdomain=${ac_cv_func_textdomain=no}
+ac_cv_func_times=${ac_cv_func_times=yes}
+ac_cv_func_tzset=${ac_cv_func_tzset=yes}
+ac_cv_func_ulimit=${ac_cv_func_ulimit=no}
+ac_cv_func_uname=${ac_cv_func_uname=yes}
+ac_cv_func_vprintf=${ac_cv_func_vprintf=yes}
+ac_cv_func_wait3=${ac_cv_func_wait3=no}
+ac_cv_func_wait3_rusage=${ac_cv_func_wait3_rusage=no}
+ac_cv_func_waitpid=${ac_cv_func_waitpid=yes}
+ac_cv_header_alloca_h=${ac_cv_header_alloca_h=no}
+ac_cv_header_dirent_dirent_h=${ac_cv_header_dirent_dirent_h=yes}
+ac_cv_header_dlfcn_h=${ac_cv_header_dlfcn_h=no}
+ac_cv_header_libintl_h=${ac_cv_header_libintl_h=no}
+ac_cv_header_limits_h=${ac_cv_header_limits_h=yes}
+ac_cv_header_locale_h=${ac_cv_header_locale_h=yes}
+ac_cv_header_memory_h=${ac_cv_header_memory_h=yes}
+ac_cv_header_minix_config_h=${ac_cv_header_minix_config_h=no}
+ac_cv_header_stat_broken=${ac_cv_header_stat_broken=no}
+ac_cv_header_stdarg_h=${ac_cv_header_stdarg_h=yes}
+ac_cv_header_stdc=${ac_cv_header_stdc=yes}
+ac_cv_header_stdlib_h=${ac_cv_header_stdlib_h=yes}
+ac_cv_header_string_h=${ac_cv_header_string_h=yes}
+ac_cv_header_sys_file_h=${ac_cv_header_sys_file_h=yes}
+ac_cv_header_sys_param_h=${ac_cv_header_sys_param_h=yes}
+ac_cv_header_sys_pte_h=${ac_cv_header_sys_pte_h=no}
+ac_cv_header_sys_ptem_h=${ac_cv_header_sys_ptem_h=no}
+ac_cv_header_sys_resource_h=${ac_cv_header_sys_resource_h=no}
+ac_cv_header_sys_select_h=${ac_cv_header_sys_select_h=no}
+ac_cv_header_sys_socket_h=${ac_cv_header_sys_socket_h=yes}
+ac_cv_header_sys_stream_h=${ac_cv_header_sys_stream_h=no}
+ac_cv_header_sys_time_h=${ac_cv_header_sys_time_h=yes}
+ac_cv_header_sys_times_h=${ac_cv_header_sys_times_h=yes}
+ac_cv_header_sys_wait_h=${ac_cv_header_sys_wait_h=yes}
+ac_cv_header_termcap_h=${ac_cv_header_termcap_h=no}
+ac_cv_header_termio_h=${ac_cv_header_termio_h=no}
+ac_cv_header_termios_h=${ac_cv_header_termios_h=yes}
+ac_cv_header_time=${ac_cv_header_time=yes}
+ac_cv_header_unistd_h=${ac_cv_header_unistd_h=yes}
+ac_cv_header_varargs_h=${ac_cv_header_varargs_h=no}
+ac_cv_lib_dir_opendir=${ac_cv_lib_dir_opendir=no}
+ac_cv_lib_dl_dlopen=${ac_cv_lib_dl_dlopen=no}
+ac_cv_lib_intl_bindtextdomain=${ac_cv_lib_intl_bindtextdomain=no}
+ac_cv_lib_termcap_tgetent=${ac_cv_lib_termcap_tgetent=yes}
+ac_cv_path_install=${ac_cv_path_install='$INTERIX_ROOT/bin/install -c'}
+ac_cv_prog_AR=${ac_cv_prog_AR=ar}
+ac_cv_prog_CC=${ac_cv_prog_CC=gcc}
+ac_cv_prog_CPP=${ac_cv_prog_CPP='cc -E'}
+ac_cv_prog_RANLIB=${ac_cv_prog_RANLIB=:}
+ac_cv_prog_cc_cross=${ac_cv_prog_cc_cross=no}
+ac_cv_prog_cc_g=${ac_cv_prog_cc_g=yes}
+ac_cv_prog_cc_works=${ac_cv_prog_cc_works=yes}
+ac_cv_prog_gcc=${ac_cv_prog_gcc=yes}
+ac_cv_prog_gcc_traditional=${ac_cv_prog_gcc_traditional=no}
+ac_cv_prog_make_make_set=${ac_cv_prog_make_make_set=yes}
+ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p=4}
+ac_cv_sizeof_double=${ac_cv_sizeof_double=8}
+ac_cv_sizeof_int=${ac_cv_sizeof_int=4}
+ac_cv_sizeof_long=${ac_cv_sizeof_long=4}
+ac_cv_sys_interpreter=${ac_cv_sys_interpreter=yes}
+ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls=no}
+ac_cv_type_getgroups=${ac_cv_type_getgroups=gid_t}
+ac_cv_type_mode_t=${ac_cv_type_mode_t=yes}
+ac_cv_type_off_t=${ac_cv_type_off_t=yes}
+ac_cv_type_pid_t=${ac_cv_type_pid_t=yes}
+ac_cv_type_signal=${ac_cv_type_signal=void}
+ac_cv_type_size_t=${ac_cv_type_size_t=yes}
+ac_cv_type_time_t=${ac_cv_type_time_t=yes}
+ac_cv_type_uid_t=${ac_cv_type_uid_t=yes}
+bash_cv_can_redecl_getpw=${bash_cv_can_redecl_getpw=yes}
+bash_cv_decl_under_sys_siglist=${bash_cv_decl_under_sys_siglist=no}
+bash_cv_dev_fd=${bash_cv_dev_fd=absent}
+bash_cv_dirent_has_d_fileno=${bash_cv_dirent_has_d_fileno=no}
+bash_cv_dirent_has_dino=${bash_cv_dirent_has_dino=yes}
+bash_cv_dup2_broken=${bash_cv_dup2_broken=no}
+bash_cv_fionread_in_ioctl=${bash_cv_fionread_in_ioctl=yes}
+bash_cv_func_lstat=${bash_cv_func_lstat=no}
+bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp=present}
+bash_cv_func_strcoll_broken=${bash_cv_func_strcoll_broken=no}
+bash_cv_getcwd_calls_popen=${bash_cv_getcwd_calls_popen=no}
+bash_cv_getenv_redef=${bash_cv_getenv_redef=yes}
+bash_cv_have_strsignal=${bash_cv_have_strsignal=yes}
+bash_cv_job_control_missing=${bash_cv_job_control_missing=present}
+bash_cv_mail_dir=${bash_cv_mail_dir=/usr/spool/mail}
+bash_cv_must_reinstall_sighandlers=${bash_cv_must_reinstall_sighandlers=no}
+bash_cv_opendir_not_robust=${bash_cv_opendir_not_robust=no}
+bash_cv_pgrp_pipe=${bash_cv_pgrp_pipe=no}
+bash_cv_printf_declared=${bash_cv_printf_declared=yes}
+bash_cv_sbrk_declared=${bash_cv_sbrk_declared=no}
+bash_cv_signal_vintage=${bash_cv_signal_vintage=posix}
+bash_cv_speed_t_in_sys_types=${bash_cv_speed_t_in_sys_types=no}
+bash_cv_struct_timeval=${bash_cv_struct_timeval=yes}
+bash_cv_struct_winsize_header=${bash_cv_struct_winsize_header=ioctl_h}
+bash_cv_struct_winsize_in_ioctl=${bash_cv_struct_winsize_in_ioctl=yes}
+bash_cv_sys_errlist=${bash_cv_sys_errlist=yes}
+bash_cv_sys_named_pipes=${bash_cv_sys_named_pipes=present}
+bash_cv_sys_siglist=${bash_cv_sys_siglist=yes}
+bash_cv_termcap_lib=${bash_cv_termcap_lib=libtermcap}
+bash_cv_termio_ldisc=${bash_cv_termio_ldisc=no}
+bash_cv_termios_ldisc=${bash_cv_termios_ldisc=no}
+bash_cv_tiocgwinsz_in_ioctl=${bash_cv_tiocgwinsz_in_ioctl=yes}
+bash_cv_tiocstat_in_ioctl=${bash_cv_tiocstat_in_ioctl=no}
+bash_cv_type_clock_t=${bash_cv_type_clock_t=yes}
+bash_cv_type_quad_t=${bash_cv_type_quad_t=yes}
+bash_cv_type_rlimit=${bash_cv_type_rlimit=long}
+bash_cv_type_sigset_t=${bash_cv_type_sigset_t=yes}
+bash_cv_ulimit_maxfds=${bash_cv_ulimit_maxfds=no}
+bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist=no}
+bash_cv_void_sighandler=${bash_cv_void_sighandler=yes}
diff --git a/cross-build/x86-beos.cache b/cross-build/x86-beos.cache
new file mode 100644
index 0000000..351aa21
--- /dev/null
+++ b/cross-build/x86-beos.cache
@@ -0,0 +1,45 @@
+# This file is a shell script that caches the results of configure
+# tests for x86 BeOS so they don't need to be done when cross-compiling.
+
+# AC_FUNC_GETPGRP should also define GETPGRP_VOID
+ac_cv_func_getpgrp_void=${ac_cv_func_getpgrp_void='yes'}
+# AC_FUNC_SETVBUF_REVERSED should not define anything else
+ac_cv_func_setvbuf_reversed=${ac_cv_func_setvbuf_reversed='no'}
+# on BeOS, system calls do not restart
+ac_cv_sys_restartable_syscalls=${ac_cv_sys_restartable_syscalls='no'}
+bash_cv_sys_restartable_syscalls=${bash_cv_sys_restartable_syscalls='no'}
+
+ac_cv_func_tcgetattr=${ac_cv_func_tcgetattr='yes'}
+
+# x86 BeOS is little endian
+ac_cv_c_bigendian=${ac_cv_c_bigendian='no'}
+ac_cv_sizeof_char_p=${ac_cv_sizeof_char_p='4'}
+ac_cv_sizeof_int=${ac_cv_sizeof_int='4'}
+ac_cv_sizeof_long=${ac_cv_sizeof_long='4'}
+ac_cv_sizeof_double=${ac_cv_sizeof_double='8'}
+
+bash_cv_dev_fd=${bash_cv_dev_fd='absent'}
+bash_cv_dup2_broken=${bash_cv_dup2_broken='no'}
+bash_cv_pgrp_pipe=${bash_cv_pgrp_pipe='no'}
+bash_cv_type_rlimit=${bash_cv_type_rlimit='long'}
+bash_cv_decl_under_sys_siglist=${bash_cv_decl_under_sys_siglist='no'}
+bash_cv_under_sys_siglist=${bash_cv_under_sys_siglist='no'}
+bash_cv_sys_siglist=${bash_cv_sys_siglist='yes'}
+bash_cv_opendir_not_robust=${bash_cv_opendir_not_robust='no'}
+bash_cv_getenv_redef=${bash_cv_getenv_redef='yes'}
+bash_cv_printf_declared=${bash_cv_printf_declared='yes'}
+bash_cv_ulimit_maxfds=${bash_cv_ulimit_maxfds='no'}
+bash_cv_getcwd_calls_popen=${bash_cv_getcwd_calls_popen='no'}
+bash_cv_must_reinstall_sighandlers=${bash_cv_must_reinstall_sighandlers='no'}
+bash_cv_job_control_missing=${bash_cv_job_control_missing='present'}
+bash_cv_sys_named_pipes=${bash_cv_sys_named_pipes='present'}
+bash_cv_func_sigsetjmp=${bash_cv_func_sigsetjmp='missing'}
+bash_cv_mail_dir=${bash_cv_mail_dir='unknown'}
+bash_cv_func_strcoll_broken=${bash_cv_func_strcoll_broken='no'}
+
+bash_cv_type_int32_t=${bash_cv_type_int32_t='int'}
+bash_cv_type_u_int32_t=${bash_cv_type_u_int32_t='int'}
+
+ac_cv_type_bits64_t=${ac_cv_type_bits64_t='no'}
+
+# end of cross-build/x86-beos.cache
diff --git a/dispose_cmd.c b/dispose_cmd.c
new file mode 100644
index 0000000..c624605
--- /dev/null
+++ b/dispose_cmd.c
@@ -0,0 +1,342 @@
+/* dispose_command.c -- dispose of a COMMAND structure. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+#include "shell.h"
+
+extern sh_obj_cache_t wdcache, wlcache;
+
+/* Dispose of the command structure passed. */
+void
+dispose_command (command)
+ COMMAND *command;
+{
+ if (command == 0)
+ return;
+
+ if (command->redirects)
+ dispose_redirects (command->redirects);
+
+ switch (command->type)
+ {
+ case cm_for:
+#if defined (SELECT_COMMAND)
+ case cm_select:
+#endif
+ {
+ register FOR_COM *c;
+#if defined (SELECT_COMMAND)
+ if (command->type == cm_select)
+ c = (FOR_COM *)command->value.Select;
+ else
+#endif
+ c = command->value.For;
+ dispose_word (c->name);
+ dispose_words (c->map_list);
+ dispose_command (c->action);
+ free (c);
+ break;
+ }
+
+#if defined (ARITH_FOR_COMMAND)
+ case cm_arith_for:
+ {
+ register ARITH_FOR_COM *c;
+
+ c = command->value.ArithFor;
+ dispose_words (c->init);
+ dispose_words (c->test);
+ dispose_words (c->step);
+ dispose_command (c->action);
+ free (c);
+ break;
+ }
+#endif /* ARITH_FOR_COMMAND */
+
+ case cm_group:
+ {
+ dispose_command (command->value.Group->command);
+ free (command->value.Group);
+ break;
+ }
+
+ case cm_subshell:
+ {
+ dispose_command (command->value.Subshell->command);
+ free (command->value.Subshell);
+ break;
+ }
+
+ case cm_coproc:
+ {
+ free (command->value.Coproc->name);
+ dispose_command (command->value.Coproc->command);
+ free (command->value.Coproc);
+ break;
+ }
+
+ case cm_case:
+ {
+ register CASE_COM *c;
+ PATTERN_LIST *t, *p;
+
+ c = command->value.Case;
+ dispose_word (c->word);
+
+ for (p = c->clauses; p; )
+ {
+ dispose_words (p->patterns);
+ dispose_command (p->action);
+ t = p;
+ p = p->next;
+ free (t);
+ }
+ free (c);
+ break;
+ }
+
+ case cm_until:
+ case cm_while:
+ {
+ register WHILE_COM *c;
+
+ c = command->value.While;
+ dispose_command (c->test);
+ dispose_command (c->action);
+ free (c);
+ break;
+ }
+
+ case cm_if:
+ {
+ register IF_COM *c;
+
+ c = command->value.If;
+ dispose_command (c->test);
+ dispose_command (c->true_case);
+ dispose_command (c->false_case);
+ free (c);
+ break;
+ }
+
+ case cm_simple:
+ {
+ register SIMPLE_COM *c;
+
+ c = command->value.Simple;
+ dispose_words (c->words);
+ dispose_redirects (c->redirects);
+ free (c);
+ break;
+ }
+
+ case cm_connection:
+ {
+ register CONNECTION *c;
+
+ c = command->value.Connection;
+ dispose_command (c->first);
+ dispose_command (c->second);
+ free (c);
+ break;
+ }
+
+#if defined (DPAREN_ARITHMETIC)
+ case cm_arith:
+ {
+ register ARITH_COM *c;
+
+ c = command->value.Arith;
+ dispose_words (c->exp);
+ free (c);
+ break;
+ }
+#endif /* DPAREN_ARITHMETIC */
+
+#if defined (COND_COMMAND)
+ case cm_cond:
+ {
+ register COND_COM *c;
+
+ c = command->value.Cond;
+ dispose_cond_node (c);
+ break;
+ }
+#endif /* COND_COMMAND */
+
+ case cm_function_def:
+ {
+ register FUNCTION_DEF *c;
+
+ c = command->value.Function_def;
+ dispose_function_def (c);
+ break;
+ }
+
+ default:
+ command_error ("dispose_command", CMDERR_BADTYPE, command->type, 0);
+ break;
+ }
+ free (command);
+}
+
+#if defined (COND_COMMAND)
+/* How to free a node in a conditional command. */
+void
+dispose_cond_node (cond)
+ COND_COM *cond;
+{
+ if (cond)
+ {
+ if (cond->left)
+ dispose_cond_node (cond->left);
+ if (cond->right)
+ dispose_cond_node (cond->right);
+ if (cond->op)
+ dispose_word (cond->op);
+ free (cond);
+ }
+}
+#endif /* COND_COMMAND */
+
+void
+dispose_function_def_contents (c)
+ FUNCTION_DEF *c;
+{
+ dispose_word (c->name);
+ dispose_command (c->command);
+ FREE (c->source_file);
+}
+
+void
+dispose_function_def (c)
+ FUNCTION_DEF *c;
+{
+ dispose_function_def_contents (c);
+ free (c);
+}
+
+/* How to free a WORD_DESC. */
+void
+dispose_word (w)
+ WORD_DESC *w;
+{
+ FREE (w->word);
+ ocache_free (wdcache, WORD_DESC, w);
+}
+
+/* Free a WORD_DESC, but not the word contained within. */
+void
+dispose_word_desc (w)
+ WORD_DESC *w;
+{
+ w->word = 0;
+ ocache_free (wdcache, WORD_DESC, w);
+}
+
+/* How to get rid of a linked list of words. A WORD_LIST. */
+void
+dispose_words (list)
+ WORD_LIST *list;
+{
+ WORD_LIST *t;
+
+ while (list)
+ {
+ t = list;
+ list = list->next;
+ dispose_word (t->word);
+#if 0
+ free (t);
+#else
+ ocache_free (wlcache, WORD_LIST, t);
+#endif
+ }
+}
+
+#ifdef INCLUDE_UNUSED
+/* How to dispose of an array of pointers to char. This is identical to
+ free_array in stringlib.c. */
+void
+dispose_word_array (array)
+ char **array;
+{
+ register int count;
+
+ if (array == 0)
+ return;
+
+ for (count = 0; array[count]; count++)
+ free (array[count]);
+
+ free (array);
+}
+#endif
+
+/* How to dispose of an list of redirections. A REDIRECT. */
+void
+dispose_redirects (list)
+ REDIRECT *list;
+{
+ register REDIRECT *t;
+
+ while (list)
+ {
+ t = list;
+ list = list->next;
+
+ if (t->rflags & REDIR_VARASSIGN)
+ dispose_word (t->redirector.filename);
+
+ switch (t->instruction)
+ {
+ case r_reading_until:
+ case r_deblank_reading_until:
+ free (t->here_doc_eof);
+ /*FALLTHROUGH*/
+ case r_reading_string:
+ case r_output_direction:
+ case r_input_direction:
+ case r_inputa_direction:
+ case r_appending_to:
+ case r_err_and_out:
+ case r_append_err_and_out:
+ case r_input_output:
+ case r_output_force:
+ case r_duplicating_input_word:
+ case r_duplicating_output_word:
+ case r_move_input_word:
+ case r_move_output_word:
+ dispose_word (t->redirectee.filename);
+ /* FALLTHROUGH */
+ default:
+ break;
+ }
+ free (t);
+ }
+}
diff --git a/dispose_cmd.h b/dispose_cmd.h
new file mode 100644
index 0000000..0a3889c
--- /dev/null
+++ b/dispose_cmd.h
@@ -0,0 +1,40 @@
+/* dispose_cmd.h -- Functions appearing in dispose_cmd.c. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_DISPOSE_CMD_H_)
+#define _DISPOSE_CMD_H_
+
+#include "stdc.h"
+
+extern void dispose_command __P((COMMAND *));
+extern void dispose_word_desc __P((WORD_DESC *));
+extern void dispose_word __P((WORD_DESC *));
+extern void dispose_words __P((WORD_LIST *));
+extern void dispose_word_array __P((char **));
+extern void dispose_redirects __P((REDIRECT *));
+
+#if defined (COND_COMMAND)
+extern void dispose_cond_node __P((COND_COM *));
+#endif
+
+extern void dispose_function_def_contents __P((FUNCTION_DEF *));
+extern void dispose_function_def __P((FUNCTION_DEF *));
+
+#endif /* !_DISPOSE_CMD_H_ */
diff --git a/doc/._fdl.texi b/doc/._fdl.texi
new file mode 100644
index 0000000..3d0bb98
--- /dev/null
+++ b/doc/._fdl.texi
Binary files differ
diff --git a/doc/._fdl.txt b/doc/._fdl.txt
new file mode 100644
index 0000000..cf58b16
--- /dev/null
+++ b/doc/._fdl.txt
Binary files differ
diff --git a/doc/FAQ b/doc/FAQ
new file mode 100644
index 0000000..bef8106
--- /dev/null
+++ b/doc/FAQ
@@ -0,0 +1,2199 @@
+This is the Bash FAQ, version 4.11, for Bash version 4.1.
+
+This document contains a set of frequently-asked questions concerning
+Bash, the GNU Bourne-Again Shell. Bash is a freely-available command
+interpreter with advanced features for both interactive use and shell
+programming.
+
+Another good source of basic information about shells is the collection
+of FAQ articles periodically posted to comp.unix.shell.
+
+Questions and comments concerning this document should be sent to
+chet.ramey@case.edu.
+
+This document is available for anonymous FTP with the URL
+
+ftp://ftp.cwru.edu/pub/bash/FAQ
+
+The Bash home page is http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html
+
+----------
+Contents:
+
+Section A: The Basics
+
+A1) What is it?
+A2) What's the latest version?
+A3) Where can I get it?
+A4) On what machines will bash run?
+A5) Will bash run on operating systems other than Unix?
+A6) How can I build bash with gcc?
+A7) How can I make bash my login shell?
+A8) I just changed my login shell to bash, and now I can't FTP into my
+ machine. Why not?
+A9) What's the `POSIX Shell and Utilities standard'?
+A10) What is the bash `posix mode'?
+
+Section B: The latest version
+
+B1) What's new in version 4.1?
+B2) Are there any user-visible incompatibilities between bash-4.1 and
+ previous bash versions?
+
+Section C: Differences from other Unix shells
+
+C1) How does bash differ from sh, the Bourne shell?
+C2) How does bash differ from the Korn shell, version ksh88?
+C3) Which new features in ksh-93 are not in bash, and which are?
+
+Section D: Why does bash do some things differently than other Unix shells?
+
+D1) Why does bash run a different version of `command' than
+ `which command' says it will?
+D2) Why doesn't bash treat brace expansions exactly like csh?
+D3) Why doesn't bash have csh variable modifiers?
+D4) How can I make my csh aliases work when I convert to bash?
+D5) How can I pipe standard output and standard error from one command to
+ another, like csh does with `|&'?
+D6) Now that I've converted from ksh to bash, are there equivalents to
+ ksh features like autoloaded functions and the `whence' command?
+
+Section E: Why does bash do certain things the way it does?
+
+E1) Why is the bash builtin `test' slightly different from /bin/test?
+E2) Why does bash sometimes say `Broken pipe'?
+E3) When I have terminal escape sequences in my prompt, why does bash
+ wrap lines at the wrong column?
+E4) If I pipe the output of a command into `read variable', why doesn't
+ the output show up in $variable when the read command finishes?
+E5) I have a bunch of shell scripts that use backslash-escaped characters
+ in arguments to `echo'. Bash doesn't interpret these characters. Why
+ not, and how can I make it understand them?
+E6) Why doesn't a while or for loop get suspended when I type ^Z?
+E7) What about empty for loops in Makefiles?
+E8) Why does the arithmetic evaluation code complain about `08'?
+E9) Why does the pattern matching expression [A-Z]* match files beginning
+ with every letter except `z'?
+E10) Why does `cd //' leave $PWD as `//'?
+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?
+E15) Tell me more about the shell compatibility level.
+
+Section F: Things to watch out for on certain Unix versions
+
+F1) Why can't I use command line editing in my `cmdtool'?
+F2) I built bash on Solaris 2. Why do globbing expansions and filename
+ completion chop off the first few characters of each filename?
+F3) Why does bash dump core after I interrupt username completion or
+ `~user' tilde expansion on a machine running NIS?
+F4) I'm running SVR4.2. Why is the line erased every time I type `@'?
+F5) Why does bash report syntax errors when my C News scripts use a
+ redirection before a subshell command?
+F6) Why can't I use vi-mode editing on Red Hat Linux 6.1?
+F7) Why do bash-2.05a and bash-2.05b fail to compile `printf.def' on
+ HP/UX 11.x?
+
+Section G: How can I get bash to do certain common things?
+
+G1) How can I get bash to read and display eight-bit characters?
+G2) How do I write a function `x' to replace builtin command `x', but
+ still invoke the command from within the function?
+G3) How can I find the value of a shell variable whose name is the value
+ of another shell variable?
+G4) How can I make the bash `time' reserved word print timing output that
+ looks like the output from my system's /usr/bin/time?
+G5) How do I get the current directory into my prompt?
+G6) How can I rename "*.foo" to "*.bar"?
+G7) How can I translate a filename from uppercase to lowercase?
+G8) How can I write a filename expansion (globbing) pattern that will match
+ all files in the current directory except "." and ".."?
+
+Section H: Where do I go from here?
+
+H1) How do I report bugs in bash, and where should I look for fixes and
+ advice?
+H2) What kind of bash documentation is there?
+H3) What's coming in future versions?
+H4) What's on the bash `wish list'?
+H5) When will the next release appear?
+
+----------
+Section A: The Basics
+
+A1) What is it?
+
+Bash is a Unix command interpreter (shell). It is an implementation of
+the Posix 1003.2 shell standard, and resembles the Korn and System V
+shells.
+
+Bash contains a number of enhancements over those shells, both
+for interactive use and shell programming. Features geared
+toward interactive use include command line editing, command
+history, job control, aliases, and prompt expansion. Programming
+features include additional variable expansions, shell
+arithmetic, and a number of variables and options to control
+shell behavior.
+
+Bash was originally written by Brian Fox of the Free Software
+Foundation. The current developer and maintainer is Chet Ramey
+of Case Western Reserve University.
+
+A2) What's the latest version?
+
+The latest version is 4.1, first made available on 31 December, 2009.
+
+A3) Where can I get it?
+
+Bash is the GNU project's shell, and so is available from the
+master GNU archive site, ftp.gnu.org, and its mirrors. The
+latest version is also available for FTP from ftp.cwru.edu.
+The following URLs tell how to get version 4.1:
+
+ftp://ftp.gnu.org/pub/gnu/bash/bash-4.1.tar.gz
+ftp://ftp.cwru.edu/pub/bash/bash-4.1.tar.gz
+
+Formatted versions of the documentation are available with the URLs:
+
+ftp://ftp.gnu.org/pub/gnu/bash/bash-doc-4.1.tar.gz
+ftp://ftp.cwru.edu/pub/bash/bash-doc-4.1.tar.gz
+
+Any patches for the current version are available with the URL:
+
+ftp://ftp.cwru.edu/pub/bash/bash-4.1-patches/
+
+A4) On what machines will bash run?
+
+Bash has been ported to nearly every version of Unix. All you
+should have to do to build it on a machine for which a port
+exists is to type `configure' and then `make'. The build process
+will attempt to discover the version of Unix you have and tailor
+itself accordingly, using a script created by GNU autoconf.
+
+More information appears in the file `INSTALL' in the distribution.
+
+The Bash web page (http://cnswww.cns.cwru.edu/~chet/bash/bashtop.html)
+explains how to obtain binary versions of bash for most of the major
+commercial Unix systems.
+
+A5) Will bash run on operating systems other than Unix?
+
+Configuration specifics for Unix-like systems such as QNX and
+LynxOS are included in the distribution. Bash-2.05 and later
+versions should compile and run on Minix 2.0 (patches were
+contributed), but I don't believe anyone has built bash-2.x on
+earlier Minix versions yet.
+
+Bash has been ported to versions of Windows implementing the Win32
+programming interface. This includes Windows 95 and Windows NT.
+The port was done by Cygnus Solutions (now part of Red Hat) as part
+of their CYGWIN project. For more information about the project, see
+http://www.cygwin.com/.
+
+Cygnus originally ported bash-1.14.7, and that port was part of their
+early GNU-Win32 (the original name) releases. Cygnus has also done
+ports of bash-3.2 and bash-4.0 to the CYGWIN environment, and both
+are available as part of their current release.
+
+Bash-2.05b and later versions should require no local Cygnus changes to
+build and run under CYGWIN.
+
+DJ Delorie has a port of bash-2.x which runs under MS-DOS, as part
+of the DJGPP project. For more information on the project, see
+
+http://www.delorie.com/djgpp/
+
+I have been told that the original DJGPP port was done by Daisuke Aoyama.
+
+Mark Elbrecht <snowball3@bigfoot.com> has sent me notice that bash-2.04
+is available for DJGPP V2. The files are available as:
+
+ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh204b.zip binary
+ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh204d.zip documentation
+ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/bsh204s.zip source
+
+Mark began to work with bash-2.05, but I don't know the current status.
+
+Bash-3.0 compiles and runs with no modifications under Microsoft's Services
+for Unix (SFU), once known as Interix. I do not anticipate any problems
+with building bash-4.1, but will gladly accept any patches that are needed.
+
+A6) How can I build bash with gcc?
+
+Bash configures to use gcc by default if it is available. Read the
+file INSTALL in the distribution for more information.
+
+A7) How can I make bash my login shell?
+
+Some machines let you use `chsh' to change your login shell. Other
+systems use `passwd -s' or `passwd -e'. If one of these works for
+you, that's all you need. Note that many systems require the full
+pathname to a shell to appear in /etc/shells before you can make it
+your login shell. For this, you may need the assistance of your
+friendly local system administrator.
+
+If you cannot do this, you can still use bash as your login shell, but
+you need to perform some tricks. The basic idea is to add a command
+to your login shell's startup file to replace your login shell with
+bash.
+
+For example, if your login shell is csh or tcsh, and you have installed
+bash in /usr/gnu/bin/bash, add the following line to ~/.login:
+
+ if ( -f /usr/gnu/bin/bash ) exec /usr/gnu/bin/bash --login
+
+(the `--login' tells bash that it is a login shell).
+
+It's not a good idea to put this command into ~/.cshrc, because every
+csh you run without the `-f' option, even ones started to run csh scripts,
+reads that file. If you must put the command in ~/.cshrc, use something
+like
+
+ if ( $?prompt ) exec /usr/gnu/bin/bash --login
+
+to ensure that bash is exec'd only when the csh is interactive.
+
+If your login shell is sh or ksh, you have to do two things.
+
+First, create an empty file in your home directory named `.bash_profile'.
+The existence of this file will prevent the exec'd bash from trying to
+read ~/.profile, and re-execing itself over and over again. ~/.bash_profile
+is the first file bash tries to read initialization commands from when
+it is invoked as a login shell.
+
+Next, add a line similar to the above to ~/.profile:
+
+ [ -f /usr/gnu/bin/bash ] && [ -x /usr/gnu/bin/bash ] && \
+ exec /usr/gnu/bin/bash --login
+
+This will cause login shells to replace themselves with bash running as
+a login shell. Once you have this working, you can copy your initialization
+code from ~/.profile to ~/.bash_profile.
+
+I have received word that the recipe supplied above is insufficient for
+machines running CDE. CDE has a maze of twisty little startup files, all
+slightly different.
+
+If you cannot change your login shell in the password file to bash, you
+will have to (apparently) live with CDE using the shell in the password
+file to run its startup scripts. If you have changed your shell to bash,
+there is code in the CDE startup files (on Solaris, at least) that attempts
+to do the right thing. It is, however, often broken, and may require that
+you use the $BASH_ENV trick described below.
+
+`dtterm' claims to use $SHELL as the default program to start, so if you
+can change $SHELL in the CDE startup files, you should be able to use bash
+in your terminal windows.
+
+Setting DTSOURCEPROFILE in ~/.dtprofile will cause the `Xsession' program
+to read your login shell's startup files. You may be able to use bash for
+the rest of the CDE programs by setting SHELL to bash in ~/.dtprofile as
+well, but I have not tried this.
+
+You can use the above `exec' recipe to start bash when not logging in with
+CDE by testing the value of the DT variable:
+
+ if [ -n "$DT" ]; then
+ [ -f /usr/gnu/bin/bash ] && exec /usr/gnu/bin/bash --login
+ fi
+
+If CDE starts its shells non-interactively during login, the login shell
+startup files (~/.profile, ~/.bash_profile) will not be sourced at login.
+To get around this problem, append a line similar to the following to your
+~/.dtprofile:
+
+ BASH_ENV=${HOME}/.bash_profile ; export BASH_ENV
+
+and add the following line to the beginning of ~/.bash_profile:
+
+ unset BASH_ENV
+
+A8) I just changed my login shell to bash, and now I can't FTP into my
+ machine. Why not?
+
+You must add the full pathname to bash to the file /etc/shells. As
+noted in the answer to the previous question, many systems require
+this before you can make bash your login shell.
+
+Most versions of ftpd use this file to prohibit `special' users
+such as `uucp' and `news' from using FTP.
+
+A9) What's the `POSIX Shell and Utilities standard'?
+
+POSIX is a name originally coined by Richard Stallman for a
+family of open system standards based on UNIX. There are a
+number of aspects of UNIX under consideration for
+standardization, from the basic system services at the system
+call and C library level to applications and tools to system
+administration and management. Each area of standardization is
+assigned to a working group in the 1003 series.
+
+The POSIX Shell and Utilities standard was originally developed by
+IEEE Working Group 1003.2 (POSIX.2). Today it has been merged with
+the original 1003.1 Working Group and is maintained by the Austin
+Group (a joint working group of the IEEE, The Open Group and
+ISO/IEC SC22/WG15). Today the Shell and Utilities are a volume
+within the set of documents that make up IEEE Std 1003.1-2001, and
+thus now the former POSIX.2 (from 1992) is now part of the current
+POSIX.1 standard (POSIX 1003.1-2001).
+
+The Shell and Utilities volume concentrates on the command
+interpreter interface and utility programs commonly executed from
+the command line or by other programs. The standard is freely
+available on the web at http://www.UNIX-systems.org/version3/ .
+Work continues at the Austin Group on maintenance issues; see
+http://www.opengroup.org/austin/ to join the discussions.
+
+Bash is concerned with the aspects of the shell's behavior defined
+by the POSIX Shell and Utilities volume. The shell command
+language has of course been standardized, including the basic flow
+control and program execution constructs, I/O redirection and
+pipelining, argument handling, variable expansion, and quoting.
+
+The `special' builtins, which must be implemented as part of the
+shell to provide the desired functionality, are specified as
+being part of the shell; examples of these are `eval' and
+`export'. Other utilities appear in the sections of POSIX not
+devoted to the shell which are commonly (and in some cases must
+be) implemented as builtin commands, such as `read' and `test'.
+POSIX also specifies aspects of the shell's interactive
+behavior as part of the UPE, including job control and command
+line editing. Only vi-style line editing commands have been
+standardized; emacs editing commands were left out due to
+objections.
+
+The latest version of the POSIX Shell and Utilities standard is
+available (now updated to the 2004 Edition) as part of the Single
+UNIX Specification Version 3 at
+
+http://www.UNIX-systems.org/version3/
+
+A10) What is the bash `posix mode'?
+
+Although bash is an implementation of the POSIX shell
+specification, there are areas where the bash default behavior
+differs from that spec. The bash `posix mode' changes the bash
+behavior in these areas so that it obeys the spec more closely.
+
+Posix mode is entered by starting bash with the --posix or
+'-o posix' option or executing `set -o posix' after bash is running.
+
+The specific aspects of bash which change when posix mode is
+active are listed in the file POSIX in the bash distribution.
+They are also listed in a section in the Bash Reference Manual
+(from which that file is generated).
+
+Section B: The latest version
+
+B1) What's new in version 4.1?
+
+Bash-4.1 is the first revision to the fourth major release of bash.
+
+Bash-4.1 contains the following new features (see the manual page for
+complete descriptions and the CHANGES and NEWS files in the bash-4.1
+distribution):
+
+o Here-documents within $(...) command substitutions may once more be
+ delimited by the closing right paren, instead of requiring a newline.
+
+o Bash's file status checks (executable, readable, etc.) now take file
+ system ACLs into account on file systems that support them.
+
+o Bash now passes environment variables with names that are not valid
+ shell variable names through into the environment passed to child
+ processes.
+
+o The `execute-unix-command' readline function now attempts to clear and
+ reuse the current line rather than move to a new one after the command
+ executes.
+
+o `printf -v' can now assign values to array indices.
+
+o New `complete -E' and `compopt -E' options that work on the "empty"
+ completion: completion attempted on an empty command line.
+
+o New complete/compgen/compopt -D option to define a `default' completion:
+ a completion to be invoked on command for which no completion has been
+ defined. If this function returns 124, programmable completion is
+ attempted again, allowing a user to dynamically build a set of completions
+ as completion is attempted by having the default completion function
+ install individual completion functions each time it is invoked.
+
+o When displaying associative arrays, subscripts are now quoted.
+
+o Changes to dabbrev-expand to make it more `emacs-like': no space appended
+ after matches, completions are not sorted, and most recent history entries
+ are presented first.
+
+o The [[ and (( commands are now subject to the setting of `set -e' and the
+ ERR trap.
+
+o The source/. builtin now removes NUL bytes from the file before attempting
+ to parse commands.
+
+o There is a new configuration option (in config-top.h) that forces bash to
+ forward all history entries to syslog.
+
+o A new variable $BASHOPTS to export shell options settable using `shopt' to
+ child processes.
+
+o There is a new confgure option that forces the extglob option to be
+ enabled by default.
+
+o New variable $BASH_XTRACEFD; when set to an integer bash will write xtrace
+ output to that file descriptor.
+
+o If the optional left-hand-side of a redirection is of the form {var}, the
+ shell assigns the file descriptor used to $var or uses $var as the file
+ descriptor to move or close, depending on the redirection operator.
+
+o The < and > operators to the [[ conditional command now do string
+ comparison according to the current locale.
+
+o Programmable completion now uses the completion for `b' instead of `a'
+ when completion is attempted on a line like: a $(b c.
+
+o Force extglob on temporarily when parsing the pattern argument to
+ the == and != operators to the [[ command, for compatibility.
+
+o Changed the behavior of interrupting the wait builtin when a SIGCHLD is
+ received and a trap on SIGCHLD is set to be Posix-mode only.
+
+o The read builtin has a new `-N nchars' option, which reads exactly NCHARS
+ characters, ignoring delimiters like newline.
+
+o The mapfile/readarray builtin no longer stores the commands it invokes via
+ callbacks in the history list.
+
+o There is a new `compat40' shopt option.
+
+o The < and > operators to [[ do string comparisons using the current locale
+ only if the compatibility level is greater than 40 (set to 41 by default).
+
+o New bindable readline function: menu-complete-backward.
+
+o In the readline vi-mode insertion keymap, C-n is now bound to menu-complete
+ by default, and C-p to menu-complete-backward.
+
+o When in readline vi command mode, repeatedly hitting ESC now does nothing,
+ even when ESC introduces a bound key sequence. This is closer to how
+ historical vi behaves.
+
+o New bindable readline function: skip-csi-sequence. Can be used as a
+ default to consume key sequences generated by keys like Home and End
+ without having to bind all keys.
+
+o New bindable readline variable: skip-completed-text, active when
+ completing in the middle of a word. If enabled, it means that characters
+ in the completion that match characters in the remainder of the word are
+ "skipped" rather than inserted into the line.
+
+o The pre-readline-6.0 version of menu completion is available as
+ "old-menu-complete" for users who do not like the readline-6.0 version.
+
+o New bindable readline variable: echo-control-characters. If enabled, and
+ the tty ECHOCTL bit is set, controls the echoing of characters
+ corresponding to keyboard-generated signals.
+
+o New bindable readline variable: enable-meta-key. Controls whether or not
+ readline sends the smm/rmm sequences if the terminal indicates it has a
+ meta key that enables eight-bit characters.
+
+A short feature history dating from Bash-2.0:
+
+Bash-4.0 contained the following new features:
+
+o When using substring expansion on the positional parameters, a starting
+ index of 0 now causes $0 to be prefixed to the list.
+
+o There is a new variable, $BASHPID, which always returns the process id of
+ the current shell.
+
+o There is a new `autocd' option that, when enabled, causes bash to attempt
+ to `cd' to a directory name that is supplied as the first word of a
+ simple command.
+
+o There is a new `checkjobs' option that causes the shell to check for and
+ report any running or stopped jobs at exit.
+
+o The programmable completion code exports a new COMP_TYPE variable, set to
+ a character describing the type of completion being attempted.
+
+o The programmable completion code exports a new COMP_KEY variable, set to
+ the character that caused the completion to be invoked (e.g., TAB).
+
+o The programmable completion code now uses the same set of characters as
+ readline when breaking the command line into a list of words.
+
+o The block multiplier for the ulimit -c and -f options is now 512 when in
+ Posix mode, as Posix specifies.
+
+o Changed the behavior of the read builtin to save any partial input received
+ in the specified variable when the read builtin times out. This also
+ results in variables specified as arguments to read to be set to the empty
+ string when there is no input available. When the read builtin times out,
+ it returns an exit status greater than 128.
+
+o The shell now has the notion of a `compatibility level', controlled by
+ new variables settable by `shopt'. Setting this variable currently
+ restores the bash-3.1 behavior when processing quoted strings on the rhs
+ of the `=~' operator to the `[[' command.
+
+o The `ulimit' builtin now has new -b (socket buffer size) and -T (number
+ of threads) options.
+
+o There is a new `compopt' builtin that allows completion functions to modify
+ completion options for existing completions or the completion currently
+ being executed.
+
+o The `read' builtin has a new -i option which inserts text into the reply
+ buffer when using readline.
+
+o A new `-E' option to the complete builtin allows control of the default
+ behavior for completion on an empty line.
+
+o There is now limited support for completing command name words containing
+ globbing characters.
+
+o The `help' builtin now has a new -d option, to display a short description,
+ and a -m option, to print help information in a man page-like format.
+
+o There is a new `mapfile' builtin to populate an array with lines from a
+ given file.
+
+o If a command is not found, the shell attempts to execute a shell function
+ named `command_not_found_handle', supplying the command words as the
+ function arguments.
+
+o There is a new shell option: `globstar'. When enabled, the globbing code
+ treats `**' specially -- it matches all directories (and files within
+ them, when appropriate) recursively.
+
+o There is a new shell option: `dirspell'. When enabled, the filename
+ completion code performs spelling correction on directory names during
+ completion.
+
+o The `-t' option to the `read' builtin now supports fractional timeout
+ values.
+
+o Brace expansion now allows zero-padding of expanded numeric values and
+ will add the proper number of zeroes to make sure all values contain the
+ same number of digits.
+
+o There is a new bash-specific bindable readline function: `dabbrev-expand'.
+ It uses menu completion on a set of words taken from the history list.
+
+o The command assigned to a key sequence with `bind -x' now sets two new
+ variables in the environment of the executed command: READLINE_LINE_BUFFER
+ and READLINE_POINT. The command can change the current readline line
+ and cursor position by modifying READLINE_LINE_BUFFER and READLINE_POINT,
+ respectively.
+
+o There is a new >>& redirection operator, which appends the standard output
+ and standard error to the named file.
+
+o The parser now understands `|&' as a synonym for `2>&1 |', which redirects
+ the standard error for a command through a pipe.
+
+o The new `;&' case statement action list terminator causes execution to
+ continue with the action associated with the next pattern in the
+ statement rather than terminating the command.
+
+o The new `;;&' case statement action list terminator causes the shell to
+ test the next set of patterns after completing execution of the current
+ action, rather than terminating the command.
+
+o The shell understands a new variable: PROMPT_DIRTRIM. When set to an
+ integer value greater than zero, prompt expansion of \w and \W will
+ retain only that number of trailing pathname components and replace
+ the intervening characters with `...'.
+
+o There are new case-modifying word expansions: uppercase (^[^]) and
+ lowercase (,[,]). They can work on either the first character or
+ array element, or globally. They accept an optional shell pattern
+ that determines which characters to modify. There is an optionally-
+ configured feature to include capitalization operators.
+
+o The shell provides associative array variables, with the appropriate
+ support to create, delete, assign values to, and expand them.
+
+o The `declare' builtin now has new -l (convert value to lowercase upon
+ assignment) and -u (convert value to uppercase upon assignment) options.
+ There is an optionally-configurable -c option to capitalize a value at
+ assignment.
+
+o There is a new `coproc' reserved word that specifies a coprocess: an
+ asynchronous command run with two pipes connected to the creating shell.
+ Coprocs can be named. The input and output file descriptors and the
+ PID of the coprocess are available to the calling shell in variables
+ with coproc-specific names.
+
+o A value of 0 for the -t option to `read' now returns success if there is
+ input available to be read from the specified file descriptor.
+
+o CDPATH and GLOBIGNORE are ignored when the shell is running in privileged
+ mode.
+
+o New bindable readline functions shell-forward-word and shell-backward-word,
+ which move forward and backward words delimited by shell metacharacters
+ and honor shell quoting.
+
+o New bindable readline functions shell-backward-kill-word and shell-kill-word
+ which kill words backward and forward, but use the same word boundaries
+ as shell-forward-word and shell-backward-word.
+
+Bash-3.2 contained the following new features:
+
+o Bash-3.2 now checks shell scripts for NUL characters rather than non-printing
+ characters when deciding whether or not a script is a binary file.
+
+o Quoting the string argument to the [[ command's =~ (regexp) operator now
+ forces string matching, as with the other pattern-matching operators.
+
+Bash-3.1 contained the following new features:
+
+o Bash-3.1 may now be configured and built in a mode that enforces strict
+ POSIX compliance.
+
+o The `+=' assignment operator, which appends to the value of a string or
+ array variable, has been implemented.
+
+o It is now possible to ignore case when matching in contexts other than
+ filename generation using the new `nocasematch' shell option.
+
+Bash-3.0 contained the following new features:
+
+o Features to support the bash debugger have been implemented, and there
+ is a new `extdebug' option to turn the non-default options on
+
+o HISTCONTROL is now a colon-separated list of options and has been
+ extended with a new `erasedups' option that will result in only one
+ copy of a command being kept in the history list
+
+o Brace expansion has been extended with a new {x..y} form, producing
+ sequences of digits or characters
+
+o Timestamps are now kept with history entries, with an option to save
+ and restore them from the history file; there is a new HISTTIMEFORMAT
+ variable describing how to display the timestamps when listing history
+ entries
+
+o The `[[' command can now perform extended regular expression (egrep-like)
+ matching, with matched subexpressions placed in the BASH_REMATCH array
+ variable
+
+o A new `pipefail' option causes a pipeline to return a failure status if
+ any command in it fails
+
+o The `jobs', `kill', and `wait' builtins now accept job control notation
+ in their arguments even if job control is not enabled
+
+o The `gettext' package and libintl have been integrated, and the shell
+ messages may be translated into other languages
+
+Bash-2.05b introduced the following new features:
+
+o support for multibyte characters has been added to both bash and readline
+
+o the DEBUG trap is now run *before* simple commands, ((...)) commands,
+ [[...]] conditional commands, and for ((...)) loops
+
+o the shell now performs arithmetic in the largest integer size the machine
+ supports (intmax_t)
+
+o there is a new \D{...} prompt expansion; passes the `...' to strftime(3)
+ and inserts the result into the expanded prompt
+
+o there is a new `here-string' redirection operator: <<< word
+
+o when displaying variables, function attributes and definitions are shown
+ separately, allowing them to be re-used as input (attempting to re-use
+ the old output would result in syntax errors).
+
+o `read' has a new `-u fd' option to read from a specified file descriptor
+
+o the bash debugger in examples/bashdb has been modified to work with the
+ new DEBUG trap semantics, the command set has been made more gdb-like,
+ and the changes to $LINENO make debugging functions work better
+
+o the expansion of $LINENO inside a shell function is only relative to the
+ function start if the shell is interactive -- if the shell is running a
+ script, $LINENO expands to the line number in the script. This is as
+ POSIX-2001 requires
+
+Bash-2.05a introduced the following new features:
+
+o The `printf' builtin has undergone major work
+
+o There is a new read-only `shopt' option: login_shell, which is set by
+ login shells and unset otherwise
+
+o New `\A' prompt string escape sequence; expanding to time in 24-hour
+ HH:MM format
+
+o New `-A group/-g' option to complete and compgen; goes group name
+ completion
+
+o New [+-]O invocation option to set and unset `shopt' options at startup
+
+o ksh-like `ERR' trap
+
+o `for' loops now allow empty word lists after the `in' reserved word
+
+o new `hard' and `soft' arguments for the `ulimit' builtin
+
+o Readline can be configured to place the user at the same point on the line
+ when retrieving commands from the history list
+
+o Readline can be configured to skip `hidden' files (filenames with a leading
+ `.' on Unix) when performing completion
+
+Bash-2.05 introduced the following new features:
+
+o This version has once again reverted to using locales and strcoll(3) when
+ processing pattern matching bracket expressions, as POSIX requires.
+o Added a new `--init-file' invocation argument as a synonym for `--rcfile',
+ per the new GNU coding standards.
+o The /dev/tcp and /dev/udp redirections now accept service names as well as
+ port numbers.
+o `complete' and `compgen' now take a `-o value' option, which controls some
+ of the aspects of that compspec. Valid values are:
+
+ default - perform bash default completion if programmable
+ completion produces no matches
+ dirnames - perform directory name completion if programmable
+ completion produces no matches
+ filenames - tell readline that the compspec produces filenames,
+ so it can do things like append slashes to
+ directory names and suppress trailing spaces
+o A new loadable builtin, realpath, which canonicalizes and expands symlinks
+ in pathname arguments.
+o When `set' is called without options, it prints function defintions in a
+ way that allows them to be reused as input. This affects `declare' and
+ `declare -p' as well. This only happens when the shell is not in POSIX
+ mode, since POSIX.2 forbids this behavior.
+
+Bash-2.04 introduced the following new features:
+
+o Programmable word completion with the new `complete' and `compgen' builtins;
+ examples are provided in examples/complete/complete-examples
+o `history' has a new `-d' option to delete a history entry
+o `bind' has a new `-x' option to bind key sequences to shell commands
+o The prompt expansion code has new `\j' and `\l' escape sequences
+o The `no_empty_cmd_completion' shell option, if enabled, inhibits
+ command completion when TAB is typed on an empty line
+o `help' has a new `-s' option to print a usage synopsis
+o New arithmetic operators: var++, var--, ++var, --var, expr1,expr2 (comma)
+o New ksh93-style arithmetic for command:
+ for ((expr1 ; expr2; expr3 )); do list; done
+o `read' has new options: `-t', `-n', `-d', `-s'
+o The redirection code handles several filenames specially: /dev/fd/N,
+ /dev/stdin, /dev/stdout, /dev/stderr
+o The redirection code now recognizes /dev/tcp/HOST/PORT and
+ /dev/udp/HOST/PORT and tries to open a TCP or UDP socket, respectively,
+ to the specified port on the specified host
+o The ${!prefix*} expansion has been implemented
+o A new FUNCNAME variable, which expands to the name of a currently-executing
+ function
+o The GROUPS variable is no longer readonly
+o A new shopt `xpg_echo' variable, to control the behavior of echo with
+ respect to backslash-escape sequences at runtime
+o The NON_INTERACTIVE_LOGIN_SHELLS #define has returned
+
+The version of Readline released with Bash-2.04, Readline-4.1, had several
+new features as well:
+
+o Parentheses matching is always compiled into readline, and controllable
+ with the new `blink-matching-paren' variable
+o The history-search-forward and history-search-backward functions now leave
+ point at the end of the line when the search string is empty, like
+ reverse-search-history, and forward-search-history
+o A new function for applications: rl_on_new_line_with_prompt()
+o New variables for applications: rl_already_prompted, and rl_gnu_readline_p
+
+
+Bash-2.03 had very few new features, in keeping with the convention
+that odd-numbered releases provide mainly bug fixes. A number of new
+features were added to Readline, mostly at the request of the Cygnus
+folks.
+
+A new shopt option, `restricted_shell', so that startup files can test
+ whether or not the shell was started in restricted mode
+Filename generation is now performed on the words between ( and ) in
+ compound array assignments (this is really a bug fix)
+OLDPWD is now auto-exported, as POSIX.2 requires
+ENV and BASH_ENV are read-only variables in a restricted shell
+Bash may now be linked against an already-installed Readline library,
+ as long as the Readline library is version 4 or newer
+All shells begun with the `--login' option will source the login shell
+ startup files, even if the shell is not interactive
+
+There were lots of changes to the version of the Readline library released
+along with Bash-2.03. For a complete list of the changes, read the file
+CHANGES in the Bash-2.03 distribution.
+
+Bash-2.02 contained the following new features:
+
+a new version of malloc (based on the old GNU malloc code in previous
+ bash versions) that is more page-oriented, more conservative
+ with memory usage, does not `orphan' large blocks when they
+ are freed, is usable on 64-bit machines, and has allocation
+ checking turned on unconditionally
+POSIX.2-style globbing character classes ([:alpha:], [:alnum:], etc.)
+POSIX.2-style globbing equivalence classes
+POSIX.2-style globbing collating symbols
+the ksh [[...]] extended conditional command
+the ksh egrep-style extended pattern matching operators
+a new `printf' builtin
+the ksh-like $(<filename) command substitution, which is equivalent to
+ $(cat filename)
+new tilde prefixes that expand to directories from the directory stack
+new `**' arithmetic operator to do exponentiation
+case-insensitive globbing (filename expansion)
+menu completion a la tcsh
+`magic-space' history expansion function like tcsh
+the readline inputrc `language' has a new file inclusion directive ($include)
+
+Bash-2.01 contained only a few new features:
+
+new `GROUPS' builtin array variable containing the user's group list
+new bindable readline commands: history-and-alias-expand-line and
+ alias-expand-line
+
+Bash-2.0 contained extensive changes and new features from bash-1.14.7.
+Here's a short list:
+
+new `time' reserved word to time pipelines, shell builtins, and
+ shell functions
+one-dimensional arrays with a new compound assignment statement,
+ appropriate expansion constructs and modifications to some
+ of the builtins (read, declare, etc.) to use them
+new quoting syntaxes for ANSI-C string expansion and locale-specific
+ string translation
+new expansions to do substring extraction, pattern replacement, and
+ indirect variable expansion
+new builtins: `disown' and `shopt'
+new variables: HISTIGNORE, SHELLOPTS, PIPESTATUS, DIRSTACK, GLOBIGNORE,
+ MACHTYPE, BASH_VERSINFO
+special handling of many unused or redundant variables removed
+ (e.g., $notify, $glob_dot_filenames, $no_exit_on_failed_exec)
+dynamic loading of new builtin commands; many loadable examples provided
+new prompt expansions: \a, \e, \n, \H, \T, \@, \v, \V
+history and aliases available in shell scripts
+new readline variables: enable-keypad, mark-directories, input-meta,
+ visible-stats, disable-completion, comment-begin
+new readline commands to manipulate the mark and operate on the region
+new readline emacs mode commands and bindings for ksh-88 compatibility
+updated and extended builtins
+new DEBUG trap
+expanded (and now documented) restricted shell mode
+
+implementation stuff:
+autoconf-based configuration
+nearly all of the bugs reported since version 1.14 have been fixed
+most builtins converted to use builtin `getopt' for consistency
+most builtins use -p option to display output in a reusable form
+ (for consistency)
+grammar tighter and smaller (66 reduce-reduce conflicts gone)
+lots of code now smaller and faster
+test suite greatly expanded
+
+B2) Are there any user-visible incompatibilities between bash-4.1 and
+ previous bash versions?
+
+There are a few incompatibilities between version 4.1 and previous
+versions. They are detailed in the file COMPAT in the bash distribution.
+That file is not meant to be all-encompassing; send mail to
+bash-maintainers@gnu.org (or bug-bash@gnu.org if you would like
+community discussion) if if you find something that's not mentioned there.
+
+Section C: Differences from other Unix shells
+
+C1) How does bash differ from sh, the Bourne shell?
+
+This is a non-comprehensive list of features that differentiate bash
+from the SVR4.2 shell. The bash manual page explains these more
+completely.
+
+Things bash has that sh does not:
+ long invocation options
+ [+-]O invocation option
+ -l invocation option
+ `!' reserved word to invert pipeline return value
+ `time' reserved word to time pipelines and shell builtins
+ the `function' reserved word
+ the `select' compound command and reserved word
+ arithmetic for command: for ((expr1 ; expr2; expr3 )); do list; done
+ new $'...' and $"..." quoting
+ the $(...) form of command substitution
+ the $(<filename) form of command substitution, equivalent to
+ $(cat filename)
+ the ${#param} parameter value length operator
+ the ${!param} indirect parameter expansion operator
+ the ${!param*} prefix expansion operator
+ the ${param:offset[:length]} parameter substring operator
+ the ${param/pat[/string]} parameter pattern substitution operator
+ expansions to perform substring removal (${p%[%]w}, ${p#[#]w})
+ expansion of positional parameters beyond $9 with ${num}
+ variables: BASH, BASHPID, BASH_VERSION, BASH_VERSINFO, UID, EUID, REPLY,
+ TIMEFORMAT, PPID, PWD, OLDPWD, SHLVL, RANDOM, SECONDS,
+ LINENO, HISTCMD, HOSTTYPE, OSTYPE, MACHTYPE, HOSTNAME,
+ ENV, PS3, PS4, DIRSTACK, PIPESTATUS, HISTSIZE, HISTFILE,
+ HISTFILESIZE, HISTCONTROL, HISTIGNORE, GLOBIGNORE, GROUPS,
+ PROMPT_COMMAND, FCEDIT, FIGNORE, IGNOREEOF, INPUTRC,
+ SHELLOPTS, OPTERR, HOSTFILE, TMOUT, FUNCNAME, histchars,
+ auto_resume, PROMPT_DIRTRIM, BASHOPTS, BASH_XTRACEFD
+ DEBUG trap
+ ERR trap
+ variable arrays with new compound assignment syntax
+ redirections: <>, &>, >|, <<<, [n]<&word-, [n]>&word-, >>&
+ prompt string special char translation and variable expansion
+ auto-export of variables in initial environment
+ command search finds functions before builtins
+ bash return builtin will exit a file sourced with `.'
+ builtins: cd -/-L/-P, exec -l/-c/-a, echo -e/-E, hash -d/-l/-p/-t.
+ export -n/-f/-p/name=value, pwd -L/-P,
+ read -e/-p/-a/-t/-n/-d/-s/-u/-i/-N,
+ readonly -a/-f/name=value, trap -l, set +o,
+ set -b/-m/-o option/-h/-p/-B/-C/-H/-P,
+ unset -f/-v, ulimit -i/-m/-p/-q/-u/-x,
+ type -a/-p/-t/-f/-P, suspend -f, kill -n,
+ test -o optname/s1 == s2/s1 < s2/s1 > s2/-nt/-ot/-ef/-O/-G/-S
+ bash reads ~/.bashrc for interactive shells, $ENV for non-interactive
+ bash restricted shell mode is more extensive
+ bash allows functions and variables with the same name
+ brace expansion
+ tilde expansion
+ arithmetic expansion with $((...)) and `let' builtin
+ the `[[...]]' extended conditional command
+ process substitution
+ aliases and alias/unalias builtins
+ local variables in functions and `local' builtin
+ readline and command-line editing with programmable completion
+ command history and history/fc builtins
+ csh-like history expansion
+ other new bash builtins: bind, command, compgen, complete, builtin,
+ declare/typeset, dirs, enable, fc, help,
+ history, logout, popd, pushd, disown, shopt,
+ printf, compopt, mapfile
+ exported functions
+ filename generation when using output redirection (command >a*)
+ POSIX.2-style globbing character classes
+ POSIX.2-style globbing equivalence classes
+ POSIX.2-style globbing collating symbols
+ egrep-like extended pattern matching operators
+ case-insensitive pattern matching and globbing
+ variable assignments preceding commands affect only that command,
+ even for builtins and functions
+ posix mode and strict posix conformance
+ redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr,
+ /dev/tcp/host/port, /dev/udp/host/port
+ debugger support, including `caller' builtin and new variables
+ RETURN trap
+ the `+=' assignment operator
+ autocd shell option and behavior
+ command-not-found hook with command_not_found_handle shell function
+ globstar shell option and `**' globbing behavior
+ |& synonym for `2>&1 |'
+ ;& and ;;& case action list terminators
+ case-modifying word expansions and variable attributes
+ associative arrays
+ coprocesses using the `coproc' reserved word and variables
+ shell assignment of a file descriptor used in a redirection to a variable
+
+Things sh has that bash does not:
+ uses variable SHACCT to do shell accounting
+ includes `stop' builtin (bash can use alias stop='kill -s STOP')
+ `newgrp' builtin
+ turns on job control if called as `jsh'
+ $TIMEOUT (like bash $TMOUT)
+ `^' is a synonym for `|'
+ new SVR4.2 sh builtins: mldmode, priv
+
+Implementation differences:
+ redirection to/from compound commands causes sh to create a subshell
+ bash does not allow unbalanced quotes; sh silently inserts them at EOF
+ bash does not mess with signal 11
+ sh sets (euid, egid) to (uid, gid) if -p not supplied and uid < 100
+ bash splits only the results of expansions on IFS, using POSIX.2
+ field splitting rules; sh splits all words on IFS
+ sh does not allow MAILCHECK to be unset (?)
+ sh does not allow traps on SIGALRM or SIGCHLD
+ bash allows multiple option arguments when invoked (e.g. -x -v);
+ sh allows only a single option argument (`sh -x -v' attempts
+ to open a file named `-v', and, on SunOS 4.1.4, dumps core.
+ On Solaris 2.4 and earlier versions, sh goes into an infinite
+ loop.)
+ sh exits a script if any builtin fails; bash exits only if one of
+ the POSIX.2 `special' builtins fails
+
+C2) How does bash differ from the Korn shell, version ksh88?
+
+Things bash has or uses that ksh88 does not:
+ long invocation options
+ [-+]O invocation option
+ -l invocation option
+ `!' reserved word
+ arithmetic for command: for ((expr1 ; expr2; expr3 )); do list; done
+ arithmetic in largest machine-supported size (intmax_t)
+ posix mode and posix conformance
+ command hashing
+ tilde expansion for assignment statements that look like $PATH
+ process substitution with named pipes if /dev/fd is not available
+ the ${!param} indirect parameter expansion operator
+ the ${!param*} prefix expansion operator
+ the ${param:offset[:length]} parameter substring operator
+ the ${param/pat[/string]} parameter pattern substitution operator
+ variables: BASH, BASH_VERSION, BASH_VERSINFO, BASHPID, UID, EUID, SHLVL,
+ TIMEFORMAT, HISTCMD, HOSTTYPE, OSTYPE, MACHTYPE,
+ HISTFILESIZE, HISTIGNORE, HISTCONTROL, PROMPT_COMMAND,
+ IGNOREEOF, FIGNORE, INPUTRC, HOSTFILE, DIRSTACK,
+ PIPESTATUS, HOSTNAME, OPTERR, SHELLOPTS, GLOBIGNORE,
+ GROUPS, FUNCNAME, histchars, auto_resume, PROMPT_DIRTRIM
+ prompt expansion with backslash escapes and command substitution
+ redirection: &> (stdout and stderr), <<<, [n]<&word-, [n]>&word-, >>&
+ more extensive and extensible editing and programmable completion
+ builtins: bind, builtin, command, declare, dirs, echo -e/-E, enable,
+ exec -l/-c/-a, fc -s, export -n/-f/-p, hash, help, history,
+ jobs -x/-r/-s, kill -s/-n/-l, local, logout, popd, pushd,
+ read -e/-p/-a/-t/-n/-d/-s/-N, readonly -a/-n/-f/-p,
+ set -o braceexpand/-o histexpand/-o interactive-comments/
+ -o notify/-o physical/-o posix/-o hashall/-o onecmd/
+ -h/-B/-C/-b/-H/-P, set +o, suspend, trap -l, type,
+ typeset -a/-F/-p, ulimit -i/-q/-u/-x, umask -S, alias -p,
+ shopt, disown, printf, complete, compgen, compopt, mapfile
+ `!' csh-style history expansion
+ POSIX.2-style globbing character classes
+ POSIX.2-style globbing equivalence classes
+ POSIX.2-style globbing collating symbols
+ egrep-like extended pattern matching operators
+ case-insensitive pattern matching and globbing
+ `**' arithmetic operator to do exponentiation
+ redirection to /dev/fd/N, /dev/stdin, /dev/stdout, /dev/stderr
+ arrays of unlimited size
+ TMOUT is default timeout for `read' and `select'
+ debugger support, including the `caller' builtin
+ RETURN trap
+ Timestamps in history entries
+ {x..y} brace expansion
+ The `+=' assignment operator
+ autocd shell option and behavior
+ command-not-found hook with command_not_found_handle shell function
+ globstar shell option and `**' globbing behavior
+ |& synonym for `2>&1 |'
+ ;& and ;;& case action list terminators
+ case-modifying word expansions and variable attributes
+ associative arrays
+ coprocesses using the `coproc' reserved word and variables
+ shell assignment of a file descriptor used in a redirection to a variable
+
+Things ksh88 has or uses that bash does not:
+ tracked aliases (alias -t)
+ variables: ERRNO, FPATH, EDITOR, VISUAL
+ co-processes (bash uses different syntax)
+ weirdly-scoped functions
+ typeset +f to list all function names without definitions
+ text of command history kept in a file, not memory
+ builtins: alias -x, cd old new, newgrp, print,
+ read -p/-s/var?prompt, set -A/-o gmacs/
+ -o bgnice/-o markdirs/-o trackall/-o viraw/-s,
+ typeset -H/-L/-R/-Z/-A/-ft/-fu/-fx/-t, whence
+ using environment to pass attributes of exported variables
+ arithmetic evaluation done on arguments to some builtins
+ reads .profile from $PWD when invoked as login shell
+
+Implementation differences:
+ ksh runs last command of a pipeline in parent shell context
+ bash has brace expansion by default (ksh88 compile-time option)
+ bash has fixed startup file for all interactive shells; ksh reads $ENV
+ bash has exported functions
+ bash command search finds functions before builtins
+ bash waits for all commands in pipeline to exit before returning status
+ emacs-mode editing has some slightly different key bindings
+
+C3) Which new features in ksh-93 are not in bash, and which are?
+
+This list is current through ksh93t+ (05/05/2009)
+
+New things in ksh-93 not in bash-4.1:
+ floating point arithmetic and variables
+ math library functions
+ ${!name[sub]} name of subscript for associative array
+ `.' is allowed in variable names to create a hierarchical namespace
+ more extensive compound assignment syntax
+ discipline functions
+ KEYBD trap
+ variables: .sh.edchar, .sh.edmode, .sh.edcol, .sh.edtext, .sh.version,
+ .sh.name, .sh.subscript, .sh.value, .sh.match, HISTEDIT
+ backreferences in pattern matching (\N)
+ `&' operator in pattern lists for matching (match all instead of any)
+ exit statuses between 0 and 255
+ FPATH and PATH mixing
+ lexical scoping for local variables in `ksh' functions
+ no scoping for local variables in `POSIX' functions
+ $'' \C[.collating-element.] escape sequence
+ -C/-I invocation options
+ print -f (bash uses printf)
+ `fc' has been renamed to `hist'
+ `.' can execute shell functions
+ getopts -a
+ printf %B, %H, %P, %R, %T, %Z modifiers, output base for %d, `=' flag
+ read -n/-N differ/-v
+ set -o showme/-o multiline (bash default)
+ `sleep' and `getconf' builtins (bash has loadable versions)
+ typeset -n and `nameref' variables
+ [[ -R name ]] (checks whether or not name is a nameref)
+ typeset -C/-S/-T/-X/-h/-s
+ experimental `type' definitions (a la typedef) using typeset
+ negative subscripts for indexed array variables
+ array expansions ${array[sub1..sub2]} and ${!array[sub1..sub2]}
+ associative array assignments using `;' as element separator
+ command substitution $(n<#) expands to current byte offset for fd N
+ new '${ ' form of command substitution, executed in current shell
+ new >;/<>;/<#pat/<##pat/<#/># redirections
+ brace expansion printf-like formats
+ [[ -v var ]] operators (checks whether or not var is set)
+
+New things in ksh-93 present in bash-4.1:
+ associative arrays
+ [n]<&word- and [n]>&word- redirections (combination dup and close)
+ for (( expr1; expr2; expr3 )) ; do list; done - arithmetic for command
+ ?:, ++, --, `expr1 , expr2' arithmetic operators
+ expansions: ${!param}, ${param:offset[:len]}, ${param/pat[/str]},
+ ${!param*}
+ compound array assignment
+ the `!' reserved word
+ loadable builtins -- but ksh uses `builtin' while bash uses `enable'
+ new $'...' and $"..." quoting
+ FIGNORE (but bash uses GLOBIGNORE), HISTCMD
+ brace expansion and set -B
+ changes to kill builtin
+ `command', `builtin', `disown' builtins
+ echo -e
+ exec -c/-a
+ read -A (bash uses read -a)
+ read -t/-d
+ trap -p
+ `.' restores the positional parameters when it completes
+ set -o notify/-C
+ set -o pipefail
+ set -G (-o globstar) and **
+ POSIX.2 `test'
+ umask -S
+ unalias -a
+ command and arithmetic substitution performed on PS1, PS4, and ENV
+ command name completion, TAB displaying possible completions
+ ENV processed only for interactive shells
+ The `+=' assignment operator
+ the `;&' case statement "fallthrough" pattern list terminator
+ csh-style history expansion and set -H
+ negative offsets in ${param:offset:length}
+ redirection operators preceded with {varname} to store fd number in varname
+ DEBUG can force skipping following command
+
+Section D: Why does bash do some things differently than other Unix shells?
+
+D1) Why does bash run a different version of `command' than
+ `which command' says it will?
+
+On many systems, `which' is actually a csh script that assumes
+you're running csh. In tcsh, `which' and its cousin `where'
+are builtins. On other Unix systems, `which' is a perl script
+that uses the PATH environment variable. Many Linux distributions
+use GNU `which', which is a C program that can understand shell
+aliases.
+
+The csh script version reads the csh startup files from your
+home directory and uses those to determine which `command' will
+be invoked. Since bash doesn't use any of those startup files,
+there's a good chance that your bash environment differs from
+your csh environment. The bash `type' builtin does everything
+`which' does, and will report correct results for the running
+shell. If you're really wedded to the name `which', try adding
+the following function definition to your .bashrc:
+
+ which()
+ {
+ builtin type "$@"
+ }
+
+If you're moving from tcsh and would like to bring `where' along
+as well, use this function:
+
+ where()
+ {
+ builtin type -a "$@"
+ }
+
+D2) Why doesn't bash treat brace expansions exactly like csh?
+
+The only difference between bash and csh brace expansion is that
+bash requires a brace expression to contain at least one unquoted
+comma if it is to be expanded. Any brace-surrounded word not
+containing an unquoted comma is left unchanged by the brace
+expansion code. This affords the greatest degree of sh
+compatibility.
+
+Bash, ksh, zsh, and pd-ksh all implement brace expansion this way.
+
+D3) Why doesn't bash have csh variable modifiers?
+
+Posix has specified a more powerful, albeit somewhat more cryptic,
+mechanism cribbed from ksh, and bash implements it.
+
+${parameter%word}
+ Remove smallest suffix pattern. The WORD is expanded to produce
+ a pattern. It then expands to the value of PARAMETER, with the
+ smallest portion of the suffix matched by the pattern deleted.
+
+ x=file.c
+ echo ${x%.c}.o
+ -->file.o
+
+${parameter%%word}
+
+ Remove largest suffix pattern. The WORD is expanded to produce
+ a pattern. It then expands to the value of PARAMETER, with the
+ largest portion of the suffix matched by the pattern deleted.
+
+ x=posix/src/std
+ echo ${x%%/*}
+ -->posix
+
+${parameter#word}
+ Remove smallest prefix pattern. The WORD is expanded to produce
+ a pattern. It then expands to the value of PARAMETER, with the
+ smallest portion of the prefix matched by the pattern deleted.
+
+ x=$HOME/src/cmd
+ echo ${x#$HOME}
+ -->/src/cmd
+
+${parameter##word}
+ Remove largest prefix pattern. The WORD is expanded to produce
+ a pattern. It then expands to the value of PARAMETER, with the
+ largest portion of the prefix matched by the pattern deleted.
+
+ x=/one/two/three
+ echo ${x##*/}
+ -->three
+
+
+Given
+ a=/a/b/c/d
+ b=b.xxx
+
+ csh bash result
+ --- ---- ------
+ $a:h ${a%/*} /a/b/c
+ $a:t ${a##*/} d
+ $b:r ${b%.*} b
+ $b:e ${b##*.} xxx
+
+
+D4) How can I make my csh aliases work when I convert to bash?
+
+Bash uses a different syntax to support aliases than csh does.
+The details can be found in the documentation. We have provided
+a shell script which does most of the work of conversion for you;
+this script can be found in ./examples/misc/aliasconv.sh. Here is
+how you use it:
+
+Start csh in the normal way for you. (e.g., `csh')
+
+Pipe the output of `alias' through `aliasconv.sh', saving the
+results into `bash_aliases':
+
+ alias | bash aliasconv.sh >bash_aliases
+
+Edit `bash_aliases', carefully reading through any created
+functions. You will need to change the names of some csh specific
+variables to the bash equivalents. The script converts $cwd to
+$PWD, $term to $TERM, $home to $HOME, $user to $USER, and $prompt
+to $PS1. You may also have to add quotes to avoid unwanted
+expansion.
+
+For example, the csh alias:
+
+ alias cd 'cd \!*; echo $cwd'
+
+is converted to the bash function:
+
+ cd () { command cd "$@"; echo $PWD ; }
+
+The only thing that needs to be done is to quote $PWD:
+
+ cd () { command cd "$@"; echo "$PWD" ; }
+
+Merge the edited file into your ~/.bashrc.
+
+There is an additional, more ambitious, script in
+examples/misc/cshtobash that attempts to convert your entire csh
+environment to its bash equivalent. This script can be run as
+simply `cshtobash' to convert your normal interactive
+environment, or as `cshtobash ~/.login' to convert your login
+environment.
+
+D5) How can I pipe standard output and standard error from one command to
+ another, like csh does with `|&'?
+
+Use
+ command 2>&1 | command2
+
+The key is to remember that piping is performed before redirection, so
+file descriptor 1 points to the pipe when it is duplicated onto file
+descriptor 2.
+
+D6) Now that I've converted from ksh to bash, are there equivalents to
+ ksh features like autoloaded functions and the `whence' command?
+
+There are features in ksh-88 and ksh-93 that do not have direct bash
+equivalents. Most, however, can be emulated with very little trouble.
+
+ksh-88 feature Bash equivalent
+-------------- ---------------
+compiled-in aliases set up aliases in .bashrc; some ksh aliases are
+ bash builtins (hash, history, type)
+coprocesses named pipe pairs (one for read, one for write)
+typeset +f declare -F
+cd, print, whence function substitutes in examples/functions/kshenv
+autoloaded functions examples/functions/autoload is the same as typeset -fu
+read var?prompt read -p prompt var
+
+ksh-93 feature Bash equivalent
+-------------- ---------------
+sleep, getconf Bash has loadable versions in examples/loadables
+${.sh.version} $BASH_VERSION
+print -f printf
+hist alias hist=fc
+$HISTEDIT $FCEDIT
+
+Section E: How can I get bash to do certain things, and why does bash do
+ things the way it does?
+
+E1) Why is the bash builtin `test' slightly different from /bin/test?
+
+The specific example used here is [ ! x -o x ], which is false.
+
+Bash's builtin `test' implements the Posix.2 spec, which can be
+summarized as follows (the wording is due to David Korn):
+
+Here is the set of rules for processing test arguments.
+
+ 0 Args: False
+ 1 Arg: True iff argument is not null.
+ 2 Args: If first arg is !, True iff second argument is null.
+ If first argument is unary, then true if unary test is true
+ Otherwise error.
+ 3 Args: If second argument is a binary operator, do binary test of $1 $3
+ If first argument is !, negate two argument test of $2 $3
+ If first argument is `(' and third argument is `)', do the
+ one-argument test of the second argument.
+ Otherwise error.
+ 4 Args: If first argument is !, negate three argument test of $2 $3 $4.
+ Otherwise unspecified
+ 5 or more Args: unspecified. (Historical shells would use their
+ current algorithm).
+
+The operators -a and -o are considered binary operators for the purpose
+of the 3 Arg case.
+
+As you can see, the test becomes (not (x or x)), which is false.
+
+E2) Why does bash sometimes say `Broken pipe'?
+
+If a sequence of commands appears in a pipeline, and one of the
+reading commands finishes before the writer has finished, the
+writer receives a SIGPIPE signal. Many other shells special-case
+SIGPIPE as an exit status in the pipeline and do not report it.
+For example, in:
+
+ ps -aux | head
+
+`head' can finish before `ps' writes all of its output, and ps
+will try to write on a pipe without a reader. In that case, bash
+will print `Broken pipe' to stderr when ps is killed by a
+SIGPIPE.
+
+As of bash-3.1, bash does not report SIGPIPE errors by default. You
+can build a version of bash that will report such errors.
+
+E3) When I have terminal escape sequences in my prompt, why does bash
+ wrap lines at the wrong column?
+
+Readline, the line editing library that bash uses, does not know
+that the terminal escape sequences do not take up space on the
+screen. The redisplay code assumes, unless told otherwise, that
+each character in the prompt is a `printable' character that
+takes up one character position on the screen.
+
+You can use the bash prompt expansion facility (see the PROMPTING
+section in the manual page) to tell readline that sequences of
+characters in the prompt strings take up no screen space.
+
+Use the \[ escape to begin a sequence of non-printing characters,
+and the \] escape to signal the end of such a sequence.
+
+E4) If I pipe the output of a command into `read variable', why doesn't
+ the output show up in $variable when the read command finishes?
+
+This has to do with the parent-child relationship between Unix
+processes. It affects all commands run in pipelines, not just
+simple calls to `read'. For example, piping a command's output
+into a `while' loop that repeatedly calls `read' will result in
+the same behavior.
+
+Each element of a pipeline, even a builtin or shell function,
+runs in a separate process, a child of the shell running the
+pipeline. A subprocess cannot affect its parent's environment.
+When the `read' command sets the variable to the input, that
+variable is set only in the subshell, not the parent shell. When
+the subshell exits, the value of the variable is lost.
+
+Many pipelines that end with `read variable' can be converted
+into command substitutions, which will capture the output of
+a specified command. The output can then be assigned to a
+variable:
+
+ grep ^gnu /usr/lib/news/active | wc -l | read ngroup
+
+can be converted into
+
+ ngroup=$(grep ^gnu /usr/lib/news/active | wc -l)
+
+This does not, unfortunately, work to split the text among
+multiple variables, as read does when given multiple variable
+arguments. If you need to do this, you can either use the
+command substitution above to read the output into a variable
+and chop up the variable using the bash pattern removal
+expansion operators or use some variant of the following
+approach.
+
+Say /usr/local/bin/ipaddr is the following shell script:
+
+#! /bin/sh
+host `hostname` | awk '/address/ {print $NF}'
+
+Instead of using
+
+ /usr/local/bin/ipaddr | read A B C D
+
+to break the local machine's IP address into separate octets, use
+
+ OIFS="$IFS"
+ IFS=.
+ set -- $(/usr/local/bin/ipaddr)
+ IFS="$OIFS"
+ A="$1" B="$2" C="$3" D="$4"
+
+Beware, however, that this will change the shell's positional
+parameters. If you need them, you should save them before doing
+this.
+
+This is the general approach -- in most cases you will not need to
+set $IFS to a different value.
+
+Some other user-supplied alternatives include:
+
+read A B C D << HERE
+ $(IFS=.; echo $(/usr/local/bin/ipaddr))
+HERE
+
+and, where process substitution is available,
+
+read A B C D < <(IFS=.; echo $(/usr/local/bin/ipaddr))
+
+E5) I have a bunch of shell scripts that use backslash-escaped characters
+ in arguments to `echo'. Bash doesn't interpret these characters. Why
+ not, and how can I make it understand them?
+
+This is the behavior of echo on most Unix System V machines.
+
+The bash builtin `echo' is modeled after the 9th Edition
+Research Unix version of `echo'. It does not interpret
+backslash-escaped characters in its argument strings by default;
+it requires the use of the -e option to enable the
+interpretation. The System V echo provides no way to disable the
+special characters; the bash echo has a -E option to disable
+them.
+
+There is a configuration option that will make bash behave like
+the System V echo and interpret things like `\t' by default. Run
+configure with the --enable-xpg-echo-default option to turn this
+on. Be aware that this will cause some of the tests run when you
+type `make tests' to fail.
+
+There is a shell option, `xpg_echo', settable with `shopt', that will
+change the behavior of echo at runtime. Enabling this option turns
+on expansion of backslash-escape sequences.
+
+E6) Why doesn't a while or for loop get suspended when I type ^Z?
+
+This is a consequence of how job control works on Unix. The only
+thing that can be suspended is the process group. This is a single
+command or pipeline of commands that the shell forks and executes.
+
+When you run a while or for loop, the only thing that the shell forks
+and executes are any commands in the while loop test and commands in
+the loop bodies. These, therefore, are the only things that can be
+suspended when you type ^Z.
+
+If you want to be able to stop the entire loop, you need to put it
+within parentheses, which will force the loop into a subshell that
+may be stopped (and subsequently restarted) as a single unit.
+
+E7) What about empty for loops in Makefiles?
+
+It's fairly common to see constructs like this in automatically-generated
+Makefiles:
+
+SUBDIRS = @SUBDIRS@
+
+ ...
+
+subdirs-clean:
+ for d in ${SUBDIRS}; do \
+ ( cd $$d && ${MAKE} ${MFLAGS} clean ) \
+ done
+
+When SUBDIRS is empty, this results in a command like this being passed to
+bash:
+
+ for d in ; do
+ ( cd $d && ${MAKE} ${MFLAGS} clean )
+ done
+
+In versions of bash before bash-2.05a, this was a syntax error. If the
+reserved word `in' was present, a word must follow it before the semicolon
+or newline. The language in the manual page referring to the list of words
+being empty referred to the list after it is expanded. These versions of
+bash required that there be at least one word following the `in' when the
+construct was parsed.
+
+The idiomatic Makefile solution is something like:
+
+SUBDIRS = @SUBDIRS@
+
+subdirs-clean:
+ subdirs=$SUBDIRS ; for d in $$subdirs; do \
+ ( cd $$d && ${MAKE} ${MFLAGS} clean ) \
+ done
+
+The latest updated POSIX standard has changed this: the word list
+is no longer required. Bash versions 2.05a and later accept the
+new syntax.
+
+E8) Why does the arithmetic evaluation code complain about `08'?
+
+The bash arithmetic evaluation code (used for `let', $(()), (()), and in
+other places), interprets a leading `0' in numeric constants as denoting
+an octal number, and a leading `0x' as denoting hexadecimal. This is
+in accordance with the POSIX.2 spec, section 2.9.2.1, which states that
+arithmetic constants should be handled as signed long integers as defined
+by the ANSI/ISO C standard.
+
+The POSIX.2 interpretation committee has confirmed this:
+
+http://www.pasc.org/interps/unofficial/db/p1003.2/pasc-1003.2-173.html
+
+E9) Why does the pattern matching expression [A-Z]* match files beginning
+ with every letter except `z'?
+
+Bash-2.03, Bash-2.05 and later versions honor the current locale setting
+when processing ranges within pattern matching bracket expressions ([A-Z]).
+This is what POSIX.2 and SUSv3/XPG6 specify.
+
+The behavior of the matcher in bash-2.05 and later versions depends on the
+current LC_COLLATE setting. Setting this variable to `C' or `POSIX' will
+result in the traditional behavior ([A-Z] matches all uppercase ASCII
+characters). Many other locales, including the en_US locale (the default
+on many US versions of Linux) collate the upper and lower case letters like
+this:
+
+ AaBb...Zz
+
+which means that [A-Z] matches every letter except `z'. Others collate like
+
+ aAbBcC...zZ
+
+which means that [A-Z] matches every letter except `a'.
+
+The portable way to specify upper case letters is [:upper:] instead of
+A-Z; lower case may be specified as [:lower:] instead of a-z.
+
+Look at the manual pages for setlocale(3), strcoll(3), and, if it is
+present, locale(1). If you have locale(1), you can use it to find
+your current locale information even if you do not have any of the
+LC_ variables set.
+
+My advice is to put
+
+ export LC_COLLATE=C
+
+into /etc/profile and inspect any shell scripts run from cron for
+constructs like [A-Z]. This will prevent things like
+
+ rm [A-Z]*
+
+from removing every file in the current directory except those beginning
+with `z' and still allow individual users to change the collation order.
+Users may put the above command into their own profiles as well, of course.
+
+E10) Why does `cd //' leave $PWD as `//'?
+
+POSIX.2, in its description of `cd', says that *three* or more leading
+slashes may be replaced with a single slash when canonicalizing the
+current working directory.
+
+This is, I presume, for historical compatibility. Certain versions of
+Unix, and early network file systems, used paths of the form
+//hostname/path to access `path' on server `hostname'.
+
+E11) If I resize my xterm while another program is running, why doesn't bash
+ notice the change?
+
+This is another issue that deals with job control.
+
+The kernel maintains a notion of a current terminal process group. Members
+of this process group (processes whose process group ID is equal to the
+current terminal process group ID) receive terminal-generated signals like
+SIGWINCH. (For more details, see the JOB CONTROL section of the bash
+man page.)
+
+If a terminal is resized, the kernel sends SIGWINCH to each member of
+the terminal's current process group (the `foreground' process group).
+
+When bash is running with job control enabled, each pipeline (which may be
+a single command) is run in its own process group, different from bash's
+process group. This foreground process group receives the SIGWINCH; bash
+does not. Bash has no way of knowing that the terminal has been resized.
+
+There is a `checkwinsize' option, settable with the `shopt' builtin, that
+will cause bash to check the window size and adjust its idea of the
+terminal's dimensions each time a process stops or exits and returns control
+of the terminal to bash. Enable it with `shopt -s checkwinsize'.
+
+E12) Why don't negative offsets in substring expansion work like I expect?
+
+When substring expansion of the form ${param:offset[:length} is used,
+an `offset' that evaluates to a number less than zero counts back from
+the end of the expanded value of $param.
+
+When a negative `offset' begins with a minus sign, however, unexpected things
+can happen. Consider
+
+ a=12345678
+ echo ${a:-4}
+
+intending to print the last four characters of $a. The problem is that
+${param:-word} already has a well-defined meaning: expand to word if the
+expanded value of param is unset or null, and $param otherwise.
+
+To use negative offsets that begin with a minus sign, separate the
+minus sign and the colon with a space.
+
+E13) Why does filename completion misbehave if a colon appears in the filename?
+
+Filename completion (and word completion in general) may appear to behave
+improperly if there is a colon in the word to be completed.
+
+The colon is special to readline's word completion code: it is one of the
+characters that breaks words for the completer. Readline uses these characters
+in sort of the same way that bash uses $IFS: they break or separate the words
+the completion code hands to the application-specific or default word
+completion functions. The original intent was to make it easy to edit
+colon-separated lists (such as $PATH in bash) in various applications using
+readline for input.
+
+This is complicated by the fact that some versions of the popular
+`bash-completion' programmable completion package have problems with the
+default completion behavior in the presence of colons.
+
+The current set of completion word break characters is available in bash as
+the value of the COMP_WORDBREAKS variable. Removing `:' from that value is
+enough to make the colon not special to completion:
+
+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.
+
+Bash-4.0 introduces the concept of a `compatibility level', controlled by
+several options to the `shopt' builtin. If the `compat31' option is enabled,
+bash reverts to the bash-3.1 behavior with respect to quoting the rhs of
+the =~ operator.
+
+E15) Tell me more about the shell compatibility level.
+
+Bash-4.0 introduced the concept of a `shell compatibility level', specified
+as a set of options to the shopt builtin (compat31, compat32, compat40 at
+this writing). There is only one current compatibility level -- each
+option is mutually exclusive. This list does not mention behavior that is
+standard for a particular version (e.g., setting compat32 means that quoting
+the rhs of the regexp matching operator quotes special regexp characters in
+the word, which is default behavior in bash-3.2 and above).
+
+compat31 set
+ - the < and > operators to the [[ command do not consider the current
+ locale when comparing strings
+ - quoting the rhs of the regexp matching operator (=~) has no
+ special effect
+
+compat32 set
+ - the < and > operators to the [[ command do not consider the current
+ locale when comparing strings
+
+compat40 set
+ - the < and > operators to the [[ command do not consider the current
+ locale when comparing strings
+ - interrupting a command list such as "a ; b ; c" causes the execution
+ of the entire list to be aborted
+
+Section F: Things to watch out for on certain Unix versions
+
+F1) Why can't I use command line editing in my `cmdtool'?
+
+The problem is `cmdtool' and bash fighting over the input. When
+scrolling is enabled in a cmdtool window, cmdtool puts the tty in
+`raw mode' to permit command-line editing using the mouse for
+applications that cannot do it themselves. As a result, bash and
+cmdtool each try to read keyboard input immediately, with neither
+getting enough of it to be useful.
+
+This mode also causes cmdtool to not implement many of the
+terminal functions and control sequences appearing in the
+`sun-cmd' termcap entry. For a more complete explanation, see
+that file examples/suncmd.termcap in the bash distribution.
+
+`xterm' is a better choice, and gets along with bash much more
+smoothly.
+
+If you must use cmdtool, you can use the termcap description in
+examples/suncmd.termcap. Set the TERMCAP variable to the terminal
+description contained in that file, i.e.
+
+TERMCAP='Mu|sun-cmd:am:bs:km:pt:li#34:co#80:cl=^L:ce=\E[K:cd=\E[J:rs=\E[s:'
+
+Then export TERMCAP and start a new cmdtool window from that shell.
+The bash command-line editing should behave better in the new
+cmdtool. If this works, you can put the assignment to TERMCAP
+in your bashrc file.
+
+F2) I built bash on Solaris 2. Why do globbing expansions and filename
+ completion chop off the first few characters of each filename?
+
+This is the consequence of building bash on SunOS 5 and linking
+with the libraries in /usr/ucblib, but using the definitions
+and structures from files in /usr/include.
+
+The actual conflict is between the dirent structure in
+/usr/include/dirent.h and the struct returned by the version of
+`readdir' in libucb.a (a 4.3-BSD style `struct direct').
+
+Make sure you've got /usr/ccs/bin ahead of /usr/ucb in your $PATH
+when configuring and building bash. This will ensure that you
+use /usr/ccs/bin/cc or acc instead of /usr/ucb/cc and that you
+link with libc before libucb.
+
+If you have installed the Sun C compiler, you may also need to
+put /usr/ccs/bin and /opt/SUNWspro/bin into your $PATH before
+/usr/ucb.
+
+F3) Why does bash dump core after I interrupt username completion or
+ `~user' tilde expansion on a machine running NIS?
+
+This is a famous and long-standing bug in the SunOS YP (sorry, NIS)
+client library, which is part of libc.
+
+The YP library code keeps static state -- a pointer into the data
+returned from the server. When YP initializes itself (setpwent),
+it looks at this pointer and calls free on it if it's non-null.
+So far, so good.
+
+If one of the YP functions is interrupted during getpwent (the
+exact function is interpretwithsave()), and returns NULL, the
+pointer is freed without being reset to NULL, and the function
+returns. The next time getpwent is called, it sees that this
+pointer is non-null, calls free, and the bash free() blows up
+because it's being asked to free freed memory.
+
+The traditional Unix mallocs allow memory to be freed multiple
+times; that's probably why this has never been fixed. You can
+run configure with the `--without-gnu-malloc' option to use
+the C library malloc and avoid the problem.
+
+F4) I'm running SVR4.2. Why is the line erased every time I type `@'?
+
+The `@' character is the default `line kill' character in most
+versions of System V, including SVR4.2. You can change this
+character to whatever you want using `stty'. For example, to
+change the line kill character to control-u, type
+
+ stty kill ^U
+
+where the `^' and `U' can be two separate characters.
+
+F5) Why does bash report syntax errors when my C News scripts use a
+ redirection before a subshell command?
+
+The actual command in question is something like
+
+ < file ( command )
+
+According to the grammar given in the POSIX.2 standard, this construct
+is, in fact, a syntax error. Redirections may only precede `simple
+commands'. A subshell construct such as the above is one of the shell's
+`compound commands'. A redirection may only follow a compound command.
+
+This affects the mechanical transformation of commands that use `cat'
+to pipe a file into a command (a favorite Useless-Use-Of-Cat topic on
+comp.unix.shell). While most commands of the form
+
+ cat file | command
+
+can be converted to `< file command', shell control structures such as
+loops and subshells require `command < file'.
+
+The file CWRU/sh-redir-hack in the bash distribution is an
+(unofficial) patch to parse.y that will modify the grammar to
+support this construct. It will not apply with `patch'; you must
+modify parse.y by hand. Note that if you apply this, you must
+recompile with -DREDIRECTION_HACK. This introduces a large
+number of reduce/reduce conflicts into the shell grammar.
+
+F6) Why can't I use vi-mode editing on Red Hat Linux 6.1?
+
+The short answer is that Red Hat screwed up.
+
+The long answer is that they shipped an /etc/inputrc that only works
+for emacs mode editing, and then screwed all the vi users by setting
+INPUTRC to /etc/inputrc in /etc/profile.
+
+The short fix is to do one of the following: remove or rename
+/etc/inputrc, set INPUTRC=~/.inputrc in ~/.bashrc (or .bash_profile,
+but make sure you export it if you do), remove the assignment to
+INPUTRC from /etc/profile, add
+
+ set keymap emacs
+
+to the beginning of /etc/inputrc, or bracket the key bindings in
+/etc/inputrc with these lines
+
+ $if mode=emacs
+ [...]
+ $endif
+
+F7) Why do bash-2.05a and bash-2.05b fail to compile `printf.def' on
+ HP/UX 11.x?
+
+HP/UX's support for long double is imperfect at best.
+
+GCC will support it without problems, but the HP C library functions
+like strtold(3) and printf(3) don't actually work with long doubles.
+HP implemented a `long_double' type as a 4-element array of 32-bit
+ints, and that is what the library functions use. The ANSI C
+`long double' type is a 128-bit floating point scalar.
+
+The easiest fix, until HP fixes things up, is to edit the generated
+config.h and #undef the HAVE_LONG_DOUBLE line. After doing that,
+the compilation should complete successfully.
+
+Section G: How can I get bash to do certain common things?
+
+G1) How can I get bash to read and display eight-bit characters?
+
+This is a process requiring several steps.
+
+First, you must ensure that the `physical' data path is a full eight
+bits. For xterms, for example, the `vt100' resources `eightBitInput'
+and `eightBitOutput' should be set to `true'.
+
+Once you have set up an eight-bit path, you must tell the kernel and
+tty driver to leave the eighth bit of characters alone when processing
+keyboard input. Use `stty' to do this:
+
+ stty cs8 -istrip -parenb
+
+For old BSD-style systems, you can use
+
+ stty pass8
+
+You may also need
+
+ stty even odd
+
+Finally, you need to tell readline that you will be inputting and
+displaying eight-bit characters. You use readline variables to do
+this. These variables can be set in your .inputrc or using the bash
+`bind' builtin. Here's an example using `bind':
+
+ bash$ bind 'set convert-meta off'
+ bash$ bind 'set meta-flag on'
+ bash$ bind 'set output-meta on'
+
+The `set' commands between the single quotes may also be placed
+in ~/.inputrc.
+
+The script examples/scripts.noah/meta.bash encapsulates the bind
+commands in a shell function.
+
+G2) How do I write a function `x' to replace builtin command `x', but
+ still invoke the command from within the function?
+
+This is why the `command' and `builtin' builtins exist. The
+`command' builtin executes the command supplied as its first
+argument, skipping over any function defined with that name. The
+`builtin' builtin executes the builtin command given as its first
+argument directly.
+
+For example, to write a function to replace `cd' that writes the
+hostname and current directory to an xterm title bar, use
+something like the following:
+
+ cd()
+ {
+ builtin cd "$@" && xtitle "$HOST: $PWD"
+ }
+
+This could also be written using `command' instead of `builtin';
+the version above is marginally more efficient.
+
+G3) How can I find the value of a shell variable whose name is the value
+ of another shell variable?
+
+Versions of Bash newer than Bash-2.0 support this directly. You can use
+
+ ${!var}
+
+For example, the following sequence of commands will echo `z':
+
+ var1=var2
+ var2=z
+ echo ${!var1}
+
+For sh compatibility, use the `eval' builtin. The important
+thing to remember is that `eval' expands the arguments you give
+it again, so you need to quote the parts of the arguments that
+you want `eval' to act on.
+
+For example, this expression prints the value of the last positional
+parameter:
+
+ eval echo \"\$\{$#\}\"
+
+The expansion of the quoted portions of this expression will be
+deferred until `eval' runs, while the `$#' will be expanded
+before `eval' is executed. In versions of bash later than bash-2.0,
+
+ echo ${!#}
+
+does the same thing.
+
+This is not the same thing as ksh93 `nameref' variables, though the syntax
+is similar. I may add namerefs in a future bash version.
+
+G4) How can I make the bash `time' reserved word print timing output that
+ looks like the output from my system's /usr/bin/time?
+
+The bash command timing code looks for a variable `TIMEFORMAT' and
+uses its value as a format string to decide how to display the
+timing statistics.
+
+The value of TIMEFORMAT is a string with `%' escapes expanded in a
+fashion similar in spirit to printf(3). The manual page explains
+the meanings of the escape sequences in the format string.
+
+If TIMEFORMAT is not set, bash acts as if the following assignment had
+been performed:
+
+ TIMEFORMAT=$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'
+
+The POSIX.2 default time format (used by `time -p command') is
+
+ TIMEFORMAT=$'real %2R\nuser %2U\nsys %2S'
+
+The BSD /usr/bin/time format can be emulated with:
+
+ TIMEFORMAT=$'\t%1R real\t%1U user\t%1S sys'
+
+The System V /usr/bin/time format can be emulated with:
+
+ TIMEFORMAT=$'\nreal\t%1R\nuser\t%1U\nsys\t%1S'
+
+The ksh format can be emulated with:
+
+ TIMEFORMAT=$'\nreal\t%2lR\nuser\t%2lU\nsys\t%2lS'
+
+G5) How do I get the current directory into my prompt?
+
+Bash provides a number of backslash-escape sequences which are expanded
+when the prompt string (PS1 or PS2) is displayed. The full list is in
+the manual page.
+
+The \w expansion gives the full pathname of the current directory, with
+a tilde (`~') substituted for the current value of $HOME. The \W
+expansion gives the basename of the current directory. To put the full
+pathname of the current directory into the path without any tilde
+subsitution, use $PWD. Here are some examples:
+
+ PS1='\w$ ' # current directory with tilde
+ PS1='\W$ ' # basename of current directory
+ PS1='$PWD$ ' # full pathname of current directory
+
+The single quotes are important in the final example to prevent $PWD from
+being expanded when the assignment to PS1 is performed.
+
+G6) How can I rename "*.foo" to "*.bar"?
+
+Use the pattern removal functionality described in D3. The following `for'
+loop will do the trick:
+
+ for f in *.foo; do
+ mv $f ${f%foo}bar
+ done
+
+G7) How can I translate a filename from uppercase to lowercase?
+
+The script examples/functions/lowercase, originally written by John DuBois,
+will do the trick. The converse is left as an exercise.
+
+G8) How can I write a filename expansion (globbing) pattern that will match
+ all files in the current directory except "." and ".."?
+
+You must have set the `extglob' shell option using `shopt -s extglob' to use
+this:
+
+ echo .!(.|) *
+
+A solution that works without extended globbing is given in the 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?
+
+H1) How do I report bugs in bash, and where should I look for fixes and
+ advice?
+
+Use the `bashbug' script to report bugs. It is built and
+installed at the same time as bash. It provides a standard
+template for reporting a problem and automatically includes
+information about your configuration and build environment.
+
+`bashbug' sends its reports to bug-bash@gnu.org, which
+is a large mailing list gatewayed to the usenet newsgroup gnu.bash.bug.
+
+Bug fixes, answers to questions, and announcements of new releases
+are all posted to gnu.bash.bug. Discussions concerning bash features
+and problems also take place there.
+
+To reach the bash maintainers directly, send mail to
+bash-maintainers@gnu.org.
+
+H2) What kind of bash documentation is there?
+
+First, look in the doc directory in the bash distribution. It should
+contain at least the following files:
+
+bash.1 an extensive, thorough Unix-style manual page
+builtins.1 a manual page covering just bash builtin commands
+bashref.texi a reference manual in GNU tex`info format
+bashref.info an info version of the reference manual
+FAQ this file
+article.ms text of an article written for The Linux Journal
+readline.3 a man page describing readline
+
+Postscript, HTML, and ASCII files created from the above source are
+available in the documentation distribution.
+
+There is additional documentation available for anonymous FTP from host
+ftp.cwru.edu in the `pub/bash' directory.
+
+Cameron Newham and Bill Rosenblatt have written a book on bash, published
+by O'Reilly and Associates. The book is based on Bill Rosenblatt's Korn
+Shell book. The title is ``Learning the Bash Shell'', and the ISBN number
+of the third edition, published in March, 2005, is 0-596-00965-8. Look for
+it in fine bookstores near you. This edition of the book has been updated
+to cover bash-3.0.
+
+The GNU Bash Reference Manual has been published as a printed book by
+Network Theory Ltd (Paperback, ISBN: 0-9541617-7-7, Nov. 2006). It covers
+bash-3.2 and is available from most online bookstores (see
+http://www.network-theory.co.uk/bash/manual/ for details). The publisher
+will donate $1 to the Free Software Foundation for each copy sold.
+
+Arnold Robbins and Nelson Beebe have written ``Classic Shell Scripting'',
+published by O'Reilly. The first edition, with ISBN number 0-596-00595-4,
+was published in May, 2005.
+
+Chris F. A. Johnson, a frequent contributor to comp.unix.shell and
+gnu.bash.bug, has written ``Shell Scripting Recipes: A Problem-Solution
+Approach,'' a new book on shell scripting, concentrating on features of
+the POSIX standard helpful to shell script writers. The first edition from
+Apress, with ISBN number 1-59059-471-1, was published in May, 2005.
+
+H3) What's coming in future versions?
+
+These are features I hope to include in a future version of bash.
+
+Rocky Bernstein's bash debugger (support is included with bash-4.0)
+
+H4) What's on the bash `wish list' for future versions?
+
+These are features that may or may not appear in a future version of bash.
+
+breaking some of the shell functionality into embeddable libraries
+a module system like zsh's, using dynamic loading like builtins
+a bash programmer's guide with a chapter on creating loadable builtins
+a better loadable interface to perl with access to the shell builtins and
+ variables (contributions gratefully accepted)
+ksh93-like `nameref' variables
+ksh93-like `xx.yy' variables (including some of the .sh.* variables) and
+ associated disipline functions
+Some of the new ksh93 pattern matching operators, like backreferencing
+
+H5) When will the next release appear?
+
+The next version will appear sometime in 2010. Never make predictions.
+
+This document is Copyright 1995-2010 by Chester Ramey.
+
+Permission is hereby granted, without written agreement and
+without license or royalty fees, to use, copy, and distribute
+this document for any purpose, provided that the above copyright
+notice appears in all copies of this document and that the
+contents of this document remain unaltered.
diff --git a/doc/INTRO b/doc/INTRO
new file mode 100644
index 0000000..29f208a
--- /dev/null
+++ b/doc/INTRO
@@ -0,0 +1,187 @@
+ BASH - The Bourne-Again Shell
+
+Bash is the shell, or command language interpreter, that will appear
+in the GNU operating system. Bash is an sh-compatible shell that
+incorporates useful features from the Korn shell (ksh) and C shell
+(csh). It is intended to conform to the IEEE POSIX P1003.2/ISO 9945.2
+Shell and Tools standard. It offers functional improvements over sh
+for both programming and interactive use. In addition, most sh scripts
+can be run by Bash without modification.
+
+Bash is quite portable. It uses a configuration system that discovers
+characteristics of the compilation platform at build time, and may
+therefore be built on nearly every version of UNIX. Ports to
+UNIX-like systems such as QNX and Minix and to non-UNIX systems such
+as OS/2, Windows 95, and Windows NT are available.
+
+Bash includes the following features:
+
+Editing and Completion
+
+Bash offers a command-line editing facility which permits users to
+edit command lines using familiar emacs or vi-style editing commands.
+Editing allows corrections to be made without having to erase back
+to the point of error or start the command line anew. The editing
+facilities include a feature that allows users to complete command and
+file names.
+
+The Bash line editing library is fully customizable. Users may define
+their own key bindings -- the action taken when a key is pressed. A
+number of variables to fine-tune editing behavior are also available.
+
+History and Command Re-entry
+
+The Bash history feature remembers commands entered to the shell and
+allows them to be recalled and re-executed. The history list may be
+of unlimited size. Bash allows users to search for previous commands
+and reuse portions of those commands when composing new ones. The
+history list may be saved across shell sessions.
+
+Bash allows users to control which commands are saved on the history
+list.
+
+Job Control
+
+On systems that support it, Bash provides an interface to the
+operating system's job control facilities, which allow processes
+to be suspended and restarted, and moved between the foreground
+and background. Bash allows users to selectively `forget' about
+background jobs.
+
+Shell Functions and Aliases
+
+These mechanisms are available to bind a user-selected identifier to a
+list of commands that will be executed when the identifier is used as
+a command name. Functions allow local variables and recursion, and
+have access to the environment of the calling shell. Aliases may be
+used to create a mnemonic for a command name, expand a single word to
+a complex command, or ensure that a command is called with a basic set
+of options.
+
+Arrays
+
+Bash-2.0 supports indexed arrays of unlimited size. The subscript for
+an array is an arithmetic expression. Arrays may be assigned to with
+a new compound assignment syntax, and several builtins have options to
+operate on array variables. Bash includes a number of built-in array
+variables.
+
+Arithmetic
+
+Bash allows users to perform integer arithmetic in any base from two
+to sixty-four. Nearly all of the C language arithmetic operators are
+available with the same syntax and precedence as in C. Arithmetic
+expansion allows an arithmetic expression to be evaluated and the
+result substituted into the command line. Shell variables can be used
+as operands, and the value of an expression may be assigned to a
+variable.
+
+An arithmetic expression may be used as a command; the exit status of
+the command is the value of the expression.
+
+ANSI-C Quoting
+
+There is a new quoting syntax that allows backslash-escaped characters
+in strings to be expanded according to the ANSI C standard.
+
+Tilde Expansion
+
+Users' home directories may be expanded using this feature. Words
+beginning with a tilde may also be expanded to the current or previous
+working directory.
+
+Brace Expansion
+
+Brace expansion is a convenient way to generate a list of strings that
+share a common prefix or suffix.
+
+Substring Capabilities
+
+Bash allows new strings to be created by removing leading or trailing
+substrings from existing variable values, or by specifying a starting
+offset and length. Portions of variable values may be matched against
+shell patterns and the matching portion removed or a new value
+substituted.
+
+Indirect Variable Expansion
+
+Bash makes it easy to find the value of a shell variable whose name is
+the value of another variable.
+
+Expanded I/O Capabilities
+
+Bash provides several input and output features not available in sh,
+including the ability to:
+
+ o specify a file or file descriptor for both input and output
+ o read from or write to asynchronous processes using named pipes
+ o read lines ending in backslash
+ o display a prompt on the terminal before a read
+ o format menus and interpret responses to them
+ o echo lines exactly as input without escape processing
+
+Control of Builtin Commands
+
+Bash implements several builtin commands to give users more control
+over which commands are executed. The enable builtin allows other
+builtin commands to be selectively enabled or disabled. The command
+and builtin builtins change the order in which the shell searches for
+commands.
+
+On systems that provide dynamic loading, new builtins may be loaded
+into a running shell from a shared object file. These new builtins
+have access to all of the shell facilities.
+
+Help
+
+Bash includes a built-in help facility.
+
+Shell Optional Behavior
+
+There is a great deal of customizable shell behavior. The shopt
+builtin command provides a unified interface that allows users to
+alter shell defaults.
+
+Prompt Customization
+
+Bash allows the primary and secondary prompts to be customized by
+interpreting a number of backslash-escaped special characters.
+Parameter and variable expansion is also performed on the values of
+the primary and secondary prompt strings before they are displayed.
+
+Security
+
+Bash provides a restricted shell environment. It is also possible to
+control the execution of setuid/setgid scripts.
+
+Directory Stack
+
+Bash provides a `directory stack', to which directories may be added
+and removed. The current directory may be changed to any directory in
+the stack. It is easy to toggle between two directories in the stack.
+The directory stack may be saved and restored across different shell
+invocations.
+
+POSIX Mode
+
+Bash is nearly completely conformant to POSIX.2. POSIX mode changes
+those few areas where the Bash default behavior differs from the
+standard to match the standard. In POSIX mode, Bash is POSIX.2
+compliant.
+
+Internationalization
+
+Bash provides a new quoting syntax that allows strings to be
+translated according to the current locale. The locale in which the
+shell itself runs may also be changed, so that the shell messages
+themselves may be language-specific.
+
+The command-line editing facilities allow the input of eight-bit
+characters, so most of the ISO-8859 family of character sets are
+supported.
+
+Command Timing
+
+Bash allows external commands, shell builtin commands and shell functions
+to be timed. The format used to display the timing information may be
+changed by the user.
diff --git a/doc/Makefile.in b/doc/Makefile.in
new file mode 100644
index 0000000..3e0e68b
--- /dev/null
+++ b/doc/Makefile.in
@@ -0,0 +1,304 @@
+# This Makefile is for the Bash/documentation directory -*- text -*-.
+#
+# Copyright (C) 2003-2009 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+PACKAGE = @PACKAGE_NAME@
+VERSION = @PACKAGE_VERSION@
+
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+
+#
+SHELL = @MAKE_SHELL@
+RM = rm -f
+
+topdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = .:@srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+datarootdir = @datarootdir@
+
+infodir = @infodir@
+
+# set this to a directory name to have the HTML files installed
+htmldir = @htmldir@
+
+# Support an alternate destination root directory for package building
+DESTDIR =
+
+mandir = @mandir@
+manpfx = man
+
+man1ext = .1
+man1dir = $(mandir)/$(manpfx)1
+man3ext = .3
+man3dir = $(mandir)/$(manpfx)3
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+BUILD_DIR = @BUILD_DIR@
+
+SUPPORT_SRCDIR = $(topdir)/support
+
+# bad style
+RL_LIBDIR = $(topdir)/lib/readline
+
+# unused
+TEXINDEX = texindex
+TEX = tex
+
+MAKEINFO = makeinfo
+TEXI2DVI = ${SUPPORT_SRCDIR}/texi2dvi
+TEXI2HTML = ${SUPPORT_SRCDIR}/texi2html
+MAN2HTML = ${BUILD_DIR}/support/man2html
+HTMLPOST = ${srcdir}/htmlpost.sh
+INFOPOST = ${srcdir}/infopost.sh
+QUIETPS = #set this to -q to shut up dvips
+PAPERSIZE = letter # change to a4 for A4-size paper
+PSDPI = 600 # could be 300 if you like
+DVIPS = dvips -D ${PSDPI} $(QUIETPS) -t ${PAPERSIZE} -o $@ # tricky
+
+TEXINPUTDIR = $(RL_LIBDIR)/doc
+SET_TEXINPUTS = TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS
+
+# These tools might not be available; they're not required
+DVIPDF = dvipdfm -o $@ -p ${PAPERSIZE}
+PSPDF = gs -sPAPERSIZE=${PAPERSIZE} -sDEVICE=pdfwrite -dNOPAUSE -dBATCH -sOutputFile=$@
+
+MKDIRS = ${SUPPORT_SRCDIR}/mkdirs
+
+# This should be a program that converts troff to an ascii-readable format
+NROFF = groff -Tascii
+
+# This should be a program that converts troff to postscript
+GROFF = groff
+
+HSUSER = $(RL_LIBDIR)/doc/hsuser.texi
+RLUSER = $(RL_LIBDIR)/doc/rluser.texi
+
+BASHREF_FILES = $(srcdir)/bashref.texi $(srcdir)/fdl.texi $(srcdir)/version.texi
+
+.SUFFIXES: .0 .1 .3 .ms .ps .txt .dvi .html .pdf
+
+.1.ps:
+ $(RM) $@
+ -${GROFF} -man $< > $@
+
+.1.0:
+ $(RM) $@
+ -${NROFF} -man $< > $@
+
+.1.html:
+ $(RM) $@
+ -${MAN2HTML} $< | ${HTMLPOST} > $@
+
+.ms.ps:
+ $(RM) $@
+ -${GROFF} -ms $< > $@
+
+.ms.txt:
+ $(RM) $@
+ -${NROFF} -ms $< > $@
+
+.3.ps:
+ $(RM) $@
+ -${GROFF} -man $< > $@
+
+.3.0:
+ $(RM) $@
+ -${NROFF} -man $< > $@
+
+.3.html:
+ $(RM) $@
+ -${MAN2HTML} $< > $@
+
+.ps.pdf:
+ $(RM) $@
+ -${PSPDF} $<
+
+.dvi.pdf:
+ $(RM) $@
+ -${DVIPDF} $<
+
+.dvi.ps:
+ ${RM} $@
+ -${DVIPS} $<
+
+all: ps info dvi text html
+nodvi: ps info text html
+everything: all pdf
+
+PSFILES = bash.ps bashbug.ps article.ps builtins.ps rbash.ps
+DVIFILES = bashref.dvi bashref.ps
+INFOFILES = bashref.info
+MAN0FILES = bash.0 bashbug.0 builtins.0 rbash.0
+HTMLFILES = bashref.html bash.html
+PDFFILES = bash.pdf bashref.pdf article.pdf rose94.pdf
+
+ps: ${PSFILES}
+dvi: ${DVIFILES}
+info: ${INFOFILES}
+text: ${MAN0FILES}
+html: ${HTMLFILES}
+pdf: ${PDFFILES}
+
+bashref.dvi: $(BASHREF_FILES) $(HSUSER) $(RLUSER)
+ ${SET_TEXINPUTS} $(TEXI2DVI) $(srcdir)/bashref.texi
+
+bashref.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
+bash.html: bash.1 $(MAN2HTML)
+bashbug.ps: bashbug.1
+builtins.ps: builtins.1 bash.1
+rbash.ps: rbash.1 bash.1
+bash.0: bash.1
+bashbug.0: bashbug.1
+builtins.0: builtins.1 bash.1
+rbash.0: rbash.1 bash.1
+article.ps: article.ms
+
+bashref.ps: bashref.dvi
+
+article.pdf: article.ps
+bashref.pdf: bashref.dvi
+bash.pdf: bash.ps
+rose94.pdf: rose94.ps
+
+$(MAN2HTML): ${topdir}/support/man2html.c
+ -( cd ${BUILD_DIR}/support ; ${MAKE} ${MFLAGS} man2html)
+
+clean:
+ $(RM) *.aux *.bak *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps \
+ *.pgs *.bt *.bts *.rw *.rws *.fns *.kys *.tps *.vrs *.o
+ ${RM} core *.core
+
+mostlyclean: clean
+ $(RM) Makefile
+
+distclean: clean maybe-clean
+ $(RM) Makefile
+
+maintainer-clean: clean
+ ${RM} ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}
+ ${RM} ${CREATED_FAQ}
+ $(RM) Makefile
+
+maybe-clean:
+ -if test "X$(topdir)" != "X$(BUILD_DIR)"; then \
+ $(RM) ${PSFILES} ${DVIFILES} ${INFOFILES} ${MAN0FILES} ${HTMLFILES}; \
+ fi
+
+installdirs:
+ -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(man1dir)
+ -$(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(infodir)
+ -if test -n "$(htmldir)" ; then \
+ $(SHELL) $(SUPPORT_SRCDIR)/mkinstalldirs $(DESTDIR)$(htmldir) ; \
+ fi
+
+install: info installdirs bash.info
+ -$(INSTALL_DATA) $(srcdir)/bash.1 $(DESTDIR)$(man1dir)/bash${man1ext}
+ -$(INSTALL_DATA) $(srcdir)/bashbug.1 $(DESTDIR)$(man1dir)/bashbug${man1ext}
+# uncomment the next lines to install the builtins man page
+# sed 's:bash\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1
+# -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
+# -$(RM) $${TMPDIR:-/var/tmp}/builtins.1
+ -if test -f bash.info; then d=.; else d=$(srcdir); fi; \
+ $(INSTALL_DATA) $$d/bash.info $(DESTDIR)$(infodir)/bash.info
+# run install-info if it is present to update the info directory
+ if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \
+ install-info --dir-file=$(DESTDIR)$(infodir)/dir $(DESTDIR)$(infodir)/bash.info; \
+ else true; fi
+# if htmldir is set, install the html files into that directory
+ -if test -n "${htmldir}" ; then \
+ $(INSTALL_DATA) $(srcdir)/bash.html $(DESTDIR)$(htmldir) ; \
+ $(INSTALL_DATA) $(srcdir)/bashref.html $(DESTDIR)$(htmldir) ; \
+ fi
+
+install_builtins: installdirs
+ sed 's:bash\.1:man1/&:' $(srcdir)/builtins.1 > $${TMPDIR:-/var/tmp}/builtins.1
+ -$(INSTALL_DATA) $${TMPDIR:-/var/tmp}/builtins.1 $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
+ -$(RM) $${TMPDIR:-/var/tmp}/builtins.1
+
+install_everything: install install_builtins
+
+uninstall:
+ -$(RM) $(DESTDIR)$(man1dir)/bash${man1ext} $(DESTDIR)$(man1dir)/bashbug${man1ext}
+ -$(RM) $(DESTDIR)$(man1dir)/bash_builtins${man1ext}
+ $(RM) $(DESTDIR)$(infodir)/bash.info
+ -if test -n "$(htmldir)" ; then \
+ $(RM) $(DESTDIR)$(htmldir)/bash.html ; \
+ $(RM) $(DESTDIR)$(htmldir)/bashref.html ; \
+ fi
+
+# for use by chet
+CREATED_FAQ = faq.news faq.news2 faq.mail faq.version
+
+faq: ${CREATED_FAQ}
+
+faq.version: FAQ.version FAQ
+ sh mkfaqvers FAQ.version > $@
+
+faq.headers.mail: FAQ.headers.mail FAQ
+ sh mkfaqvers FAQ.headers.mail > $@
+
+faq.headers.news: FAQ.headers.news FAQ
+ sh mkfaqvers FAQ.headers.news > $@
+
+faq.headers.news2: FAQ.headers.news2 FAQ
+ sh mkfaqvers FAQ.headers.news2 > $@
+
+faq.news: FAQ faq.headers.news faq.version
+ $(RM) $@
+ cat faq.headers.news faq.version FAQ > $@
+
+faq.news2: FAQ faq.headers.news2 faq.version
+ $(RM) $@
+ cat faq.headers.news2 faq.version FAQ > $@
+
+faq.mail: FAQ faq.headers.mail faq.version
+ $(RM) $@
+ cat faq.headers.mail faq.version FAQ > $@
+
+inst: bashref.texi
+ $(SHELL) ./mkinstall
+ cmp -s INSTALL ../INSTALL || mv INSTALL ../INSTALL
+ $(RM) INSTALL
+
+posix: bashref.texi
+ $(SHELL) ./mkposix
+ cmp -s POSIX ../POSIX || mv POSIX ../POSIX
+ $(RM) POSIX
+
+rbash: bashref.texi
+ $(SH) ./mkrbash
+ cmp -s RBASH ../RBASH || mv RBASH ../RBASH
+ $(RM) RBASH
+
+xdist: pdf inst posix rbash
diff --git a/doc/README b/doc/README
new file mode 100644
index 0000000..e3a1d24
--- /dev/null
+++ b/doc/README
@@ -0,0 +1,36 @@
+This directory contains the bash documentation.
+
+FAQ - a set of frequently-asked questions about Bash with answers
+INTRO - a short introduction to bash
+article.ms - an article I wrote about bash for The Linux Journal
+bash.1 - the bash man page
+builtins.1 - a man page that documents the builtins, extracted from bash.1
+bashref.texi - the `bash reference manual'
+bashref.info - the `bash reference manual' processed by `makeinfo'
+readline.3 - the readline man page
+
+The `.ps' files are postscript versions of the above. The `.html'
+files are HTML versions of the man page and reference manual. The
+`.0' files are formatted manual pages. The `.txt' versions are
+ascii -- the output of `groff -Tascii'.
+
+The rest of this file explains how to use the `builtins.1' man page.
+
+For each command in the list of builtins create a file in man/man1 called:
+
+${command}.1
+
+eg.
+for.1
+type.1
+alias.1
+etc.
+
+All these files are identical as follows:
+
+jaws@jaws(264)$ cat alias.1
+.so man1/builtins.1
+jaws@jaws(265)$
+
+Make sure you adjust the .so line in builtins.1 to reflect where you
+put it.
diff --git a/doc/article.ms b/doc/article.ms
new file mode 100644
index 0000000..517155a
--- /dev/null
+++ b/doc/article.ms
@@ -0,0 +1,1114 @@
+.de SE \" start example
+.sp .5
+.RS
+.ft CR
+.nf
+..
+.de EE \" end example
+.fi
+.sp .5
+.RE
+.ft R
+..
+.TL
+Bash \- The GNU shell*
+.AU
+Chet Ramey
+Case Western Reserve University
+chet@po.cwru.edu
+.FS
+*An earlier version of this article appeared in The Linux Journal.
+.FE
+.NH 1
+Introduction
+.PP
+.B Bash
+is the shell, or command language interpreter,
+that will appear in the GNU operating system.
+The name is an acronym for
+the \*QBourne-Again SHell\*U, a pun on Steve Bourne, the author
+of the direct ancestor of the current
+.UX
+shell \fI/bin/sh\fP,
+which appeared in the Seventh Edition Bell Labs Research version
+of \s-1UNIX\s+1.
+.PP
+Bash is an \fBsh\fP\-compatible shell that incorporates useful
+features from the Korn shell (\fBksh\fP) and the C shell (\fBcsh\fP),
+described later in this article. It is ultimately intended to be a
+conformant implementation of the IEEE POSIX Shell and Utilities
+specification (IEEE Working Group 1003.2). It offers functional
+improvements over sh for both interactive and programming use.
+.PP
+While the GNU operating system will most likely include a version
+of the Berkeley shell csh, Bash will be the default shell.
+Like other GNU software, Bash is quite portable. It currently runs
+on nearly every version of
+.UX
+and a few other operating systems \- an independently-supported
+port exists for OS/2, and there are rumors of ports to DOS and
+Windows NT. Ports to \s-1UNIX\s+1-like systems such as QNX and Minix
+are part of the distribution.
+.PP
+The original author of Bash
+was Brian Fox, an employee of the Free Software Foundation. The
+current developer and maintainer is Chet Ramey, a volunteer who
+works at Case Western Reserve University.
+.NH 1
+What's POSIX, anyway?
+.PP
+.I POSIX
+is a name originally coined by Richard Stallman for a family of open
+system standards based on \s-1UNIX\s+1. There are a number of aspects of \s-1UNIX\s+1
+under consideration for standardization, from the basic system services
+at the system call and C library level to applications and tools to system
+administration and management. Each area of standardization is
+assigned to a working group in the 1003 series.
+.PP
+The POSIX Shell and Utilities standard has been developed by IEEE Working
+Group 1003.2 (POSIX.2).\(dd
+.FS
+\(ddIEEE, \fIIEEE Standard for Information Technology -- Portable
+Operating System Interface (POSIX) Part 2: Shell and Utilities\fP,
+1992.
+.FE
+It concentrates on the command interpreter
+interface and utility programs
+commonly executed from the command line or by other programs.
+An initial version of the standard has been
+approved and published by the IEEE, and work is currently underway to
+update it.
+There are four primary areas of work in the 1003.2 standard:
+.IP \(bu
+Aspects of the shell's syntax and command language.
+A number of special builtins such as
+.B cd
+and
+.B exec
+are being specified as part of the shell, since their
+functionality usually cannot be implemented by a separate executable;
+.IP \(bu
+A set of utilities to be called by shell scripts and applications.
+Examples are programs like
+.I sed,
+.I tr,
+and
+.I awk.
+Utilities commonly implemented as shell builtins
+are described in this section, such as
+.B test
+and
+.B kill .
+An expansion of this section's scope, termed the User Portability
+Extension, or UPE, has standardized interactive programs such as
+.I vi
+and
+.I mailx;
+.IP \(bu
+A group of functional interfaces to services provided by the
+shell, such as the traditional \f(CRsystem()\fP
+C library function. There are functions to perform shell word
+expansions, perform filename expansion (\fIglobbing\fP), obtain values
+of POSIX.2 system configuration variables, retrieve values of
+environment variables (\f(CRgetenv()\fP\^), and other services;
+.IP \(bu
+A suite of \*Qdevelopment\*U utilities such as
+.I c89
+(the POSIX.2 version of \fIcc\fP),
+and
+.I yacc.
+.PP
+Bash is concerned with the aspects of the shell's behavior
+defined by POSIX.2. The shell command language has of
+course been standardized, including the basic flow control
+and program execution constructs, I/O redirection and
+pipelining, argument handling, variable expansion, and quoting.
+The
+.I special
+builtins, which must be implemented as part of the shell to
+provide the desired functionality, are specified as being
+part of the shell; examples of these are
+.B eval
+and
+.B export .
+Other utilities appear in the sections of POSIX.2 not
+devoted to the shell which are commonly (and in some
+cases must be) implemented as builtin commands, such as
+.B read
+and
+.B test .
+POSIX.2 also specifies aspects of the shell's
+interactive behavior as part of
+the UPE, including job control and command line editing.
+Interestingly enough, only \fIvi\fP-style line editing commands
+have been standardized; \fIemacs\fP editing commands were left
+out due to objections.
+.PP
+While POSIX.2 includes much of what the shell has traditionally
+provided, some important things have been omitted as being
+\*Qbeyond its scope.\*U There is, for instance, no mention of
+a difference between a
+.I login
+shell and any other interactive shell (since POSIX.2 does not
+specify a login program). No fixed startup files are defined,
+either \- the standard does not mention
+.I .profile .
+.NH 1
+Basic Bash features
+.PP
+Since the Bourne shell
+provides Bash with most of its philosophical underpinnings,
+Bash inherits most of its features and functionality from sh.
+Bash implements all of the traditional sh flow
+control constructs (\fIfor\fP, \fIif\fP, \fIwhile\fP, etc.).
+All of the Bourne shell builtins, including those not specified in
+the POSIX.2 standard, appear in Bash. Shell \fIfunctions\fP,
+introduced in the SVR2 version of the Bourne shell,
+are similar to shell scripts, but are defined using a special
+syntax and are executed in the same process as the calling shell.
+Bash has shell functions
+which behave in a fashion upward-compatible with sh functions.
+There are certain shell
+variables that Bash interprets in the same way as sh, such as
+.B PS1 ,
+.B IFS ,
+and
+.B PATH .
+Bash implements essentially the same grammar, parameter and
+variable expansion semantics, redirection, and quoting as the
+Bourne shell. Where differences appear between the POSIX.2
+standard and traditional sh behavior, Bash follows POSIX.
+.PP
+The Korn Shell (\fBksh\fP) is a descendent of the Bourne shell written
+at AT&T Bell Laboratories by David Korn\(dg. It provides a number of
+useful features that POSIX and Bash have adopted. Many of the
+interactive facilities in POSIX.2 have their roots in the ksh:
+for example, the POSIX and ksh job control facilities are nearly
+identical. Bash includes features from the Korn Shell for both
+interactive use and shell programming. For programming, Bash provides
+variables such as
+.B RANDOM
+and
+.B REPLY ,
+the
+.B typeset
+builtin,
+the ability to remove substrings from variables based on patterns,
+and shell arithmetic.
+.FS
+\(dgMorris Bolsky and David Korn, \fIThe KornShell Command and
+Programming Language\fP, Prentice Hall, 1989.
+.FE
+.B RANDOM
+expands to a random number each time it is referenced; assigning a
+value to
+.B RANDOM
+seeds the random number generator.
+.B REPLY
+is the default variable used by the
+.B read
+builtin when no variable names are supplied as arguments.
+The
+.B typeset
+builtin is used to define variables and give them attributes
+such as \fBreadonly\fP.
+Bash arithmetic allows the evaluation of an expression and the
+substitution of the result. Shell variables may be used as operands,
+and the result of an expression may be assigned to a variable.
+Nearly all of the operators from the C language are available,
+with the same precedence rules:
+.SE
+$ echo $((3 + 5 * 32))
+163
+.EE
+.LP
+For interactive use, Bash implements ksh-style aliases and builtins
+such as
+.B fc
+(discussed below) and
+.B jobs .
+Bash aliases allow a string to be substituted for a command name.
+They can be used to create a mnemonic for a \s-1UNIX\s+1 command
+name (\f(CRalias del=rm\fP), to expand a single word to a complex command
+(\f(CRalias news='xterm -g 80x45 -title trn -e trn -e -S1 -N &'\fP), or to
+ensure that a command is invoked with a basic set of options
+(\f(CRalias ls="/bin/ls -F"\fP).
+.PP
+The C shell (\fBcsh\fP)\(dg, originally written by Bill Joy while at
+Berkeley, is widely used and quite popular for its interactive
+facilities. Bash includes a csh-compatible history expansion
+mechanism (\*Q! history\*U), brace expansion, access to a stack
+of directories via the
+.B pushd ,
+.B popd ,
+and
+.B dirs
+builtins, and tilde expansion, to generate users' home directories.
+Tilde expansion has also been adopted by both the Korn Shell and
+POSIX.2.
+.FS
+\(dgBill Joy, An Introduction to the C Shell, \fIUNIX User's Supplementary
+Documents\fP, University of California at Berkeley, 1986.
+.FE
+.PP
+There were certain areas in which POSIX.2 felt standardization
+was necessary, but no existing implementation provided the proper
+behavior. The working group invented and standardized functionality
+in these areas, which Bash implements. The
+.B command
+builtin was invented so that shell functions could be written to
+replace builtins; it makes the capabilities of the builtin
+available to the function. The reserved word \*Q!\*U was added
+to negate the return value of a command or pipeline; it was nearly
+impossible to express \*Qif not x\*U cleanly using the sh language.
+There exist multiple incompatible implementations of the
+.B test
+builtin, which tests files for type and other attributes and performs
+arithmetic and string comparisons.
+POSIX considered none of these correct, so the standard
+behavior was specified in terms of the number of arguments to the
+command. POSIX.2 dictates exactly what will happen when four or
+fewer arguments are given to
+.B test ,
+and leaves the behavior undefined when more arguments are supplied.
+Bash uses the POSIX.2 algorithm, which was conceived by David Korn.
+.NH 2
+Features not in the Bourne Shell
+.PP
+There are a number of minor differences between Bash and the
+version of sh present on most other versions of \s-1UNIX\s+1. The majority
+of these are due to the POSIX standard, but some are the result of
+Bash adopting features from other shells. For instance, Bash
+includes the new \*Q!\*U reserved word, the
+.B command
+builtin, the ability of the
+.B read
+builtin to correctly return a line ending with a backslash, symbolic
+arguments to the
+.B umask
+builtin, variable substring removal, a way to get the length of a variable,
+and the new algorithm for the
+.B test
+builtin from the POSIX.2 standard, none of which appear in sh.
+.PP
+Bash also implements the \*Q$(...)\*U command substitution syntax,
+which supersedes the sh `...` construct.
+The \*Q$(...)\*U construct expands to the output of the command
+contained within the
+parentheses, with trailing newlines removed. The sh syntax is
+accepted for backwards compatibility, but the \*Q$(...)\*U form
+is preferred because its quoting rules are much simpler and it
+is easier to nest.
+.PP
+The Bourne shell does not provide such features as brace expansion,
+the ability
+to define a variable and a function with the same name, local variables
+in shell functions, the ability to enable and disable individual
+builtins or write a function to replace a builtin, or a means to
+export a shell function to a child process.
+.PP
+Bash has closed
+a long-standing shell security hole by not using the
+.B $IFS
+variable to split each word read by the shell, but splitting only
+the results of expansion (ksh and the 4.4 BSD sh have fixed this
+as well). Useful behavior such as a means to abort
+execution of a script read with the \*Q.\*U command using the
+\fBreturn\fP builtin or automatically
+exporting variables in the shell's environment to children is also
+not present in the Bourne shell. Bash provides a much more powerful
+environment for both interactive use and programming.
+.NH 1
+Bash-specific Features
+.PP
+This section details a few of the features which make Bash unique.
+Most of them provide improved interactive use, but a few programming
+improvements are present as well. Full descriptions of these
+features can be found in the Bash documentation.
+.NH 2
+Startup Files
+.PP
+Bash executes startup files differently than other shells. The Bash
+behavior is a compromise between the csh principle of startup files
+with fixed names executed for each shell and the sh
+\*Qminimalist\*U behavior. An interactive instance of Bash started
+as a login shell reads and executes
+.I ~/.bash_profile
+(the file .bash_profile in the user's home directory), if it exists.
+An interactive non-login shell reads and executes
+.I ~/.bashrc .
+A non-interactive shell (one begun to execute a shell script, for
+example) reads no fixed startup file, but uses the value of the variable
+.B $ENV ,
+if set, as the name of a startup file. The ksh practice of reading
+.B $ENV
+for every shell, with the accompanying difficulty of defining the
+proper variables and functions for interactive and non-interactive
+shells or having the file read only for interactive shells, was
+considered too complex. Ease of use won out here. Interestingly,
+the next release of ksh will change to reading
+.B $ENV
+only for interactive shells.
+.NH 2
+New Builtin Commands
+.PP
+There are a few builtins which are new or have been extended in Bash.
+The
+.B enable
+builtin allows builtin commands to be turned on and off arbitrarily.
+To use the version of
+.I echo
+found in a user's search path rather than the Bash builtin,
+\f(CRenable -n echo\fP suffices. The
+.B help
+builtin provides
+quick synopses of the shell facilities without requiring
+access to a manual page.
+.B Builtin
+is similar to
+.B command
+in that it bypasses shell functions and directly executes builtin
+commands. Access to a csh-style stack of directories is provided
+via the
+.B pushd ,
+.B popd ,
+and
+.B dirs
+builtins.
+.B Pushd
+and
+.B popd
+insert and remove directories from the stack, respectively, and
+.B dirs
+lists the stack contents. On systems that allow fine-grained control
+of resources, the
+.B ulimit
+builtin can be used to tune these settings.
+.B Ulimit
+allows a user to control,
+among other things, whether core dumps are to be generated,
+how much memory the shell or a child process is allowed to allocate,
+and how large a file created by a child process can grow. The
+.B suspend
+command will stop the shell process when job control is active; most
+other shells do not allow themselves to be stopped like that.
+.B Type,
+the Bash answer to
+.B which
+and
+.B whence,
+shows what will happen when a word is typed as a command:
+.SE
+$ type export
+export is a shell builtin
+$ type -t export
+builtin
+$ type bash
+bash is /bin/bash
+$ type cd
+cd is a function
+cd ()
+{
+ builtin cd ${1+"$@"} && xtitle $HOST: $PWD
+}
+.EE
+.LP
+Various
+modes tell what a command word is (reserved word, alias, function, builtin,
+or file) or which version of a command will be executed based on
+a user's search path. Some of this functionality has been adopted
+by POSIX.2 and folded into the
+.B command
+utility.
+.NH 2
+Editing and Completion
+.PP
+One area in which Bash shines is command line editing. Bash uses the
+.I readline
+library to read and edit lines when interactive. Readline is a
+powerful and flexible input facility that a user can configure to
+individual tastes. It allows lines to be edited using either emacs
+or vi commands, where those commands are appropriate. The full
+capability of emacs is not present \- there is no way to execute
+a named command with M-x, for instance \- but the existing commands
+are more than adequate. The vi mode is compliant with
+the command line editing standardized by POSIX.2.
+.PP
+Readline is fully customizable. In addition to the basic commands
+and key bindings, the library allows users to define additional
+key bindings using a startup file. The
+.I inputrc
+file, which defaults to the file
+.I ~/.inputrc ,
+is read each time readline initializes, permitting users to
+maintain a consistent interface across a set of programs. Readline
+includes an extensible interface, so each program using the
+library can add its own bindable commands and program-specific
+key bindings. Bash uses this facility to add bindings
+that perform history expansion or shell word expansions on the current
+input line.
+.PP
+Readline interprets a number of
+variables which further tune its behavior. Variables
+exist to control whether or not eight-bit characters are directly
+read as input or converted to meta-prefixed key sequences (a
+meta-prefixed key sequence consists of the character with the
+eighth bit zeroed, preceded by the
+.I meta-prefix
+character, usually escape, which selects an alternate keymap), to
+decide whether to output characters with the eighth bit set
+directly or as a meta-prefixed key sequence, whether or not to
+wrap to a new screen line when a line being edited is longer than
+the screen width, the keymap to which subsequent key bindings should
+apply, or even what happens when readline wants to
+ring the terminal's bell. All of these variables can be set in
+the inputrc file.
+.PP
+The startup file understands a set of C
+preprocessor-like conditional constructs which allow variables or
+key bindings to be assigned based on the application using readline,
+the terminal currently being used, or the editing mode. Users can
+add program-specific bindings to make their lives easier: I have
+bindings that let me edit the value of
+.B $PATH
+and double-quote the current or previous word:
+.SE
+# Macros that are convenient for shell interaction
+$if Bash
+# edit the path
+"\eC-xp": "PATH=${PATH}\ee\eC-e\eC-a\eef\eC-f"
+# prepare to type a quoted word -- insert open and close double
+# quotes and move to just after the open quote
+"\eC-x\e"": "\e"\e"\eC-b"
+# Quote the current or previous word
+"\eC-xq": "\eeb\e"\eef\e""
+$endif
+.EE
+.LP
+There is a readline
+command to re-read the file, so users can edit the file, change
+some bindings, and begin to use them almost immediately.
+.PP
+Bash implements the
+.B bind
+builtin for more dyamic control of readline than the startup file
+permits.
+.B Bind
+is used in several ways. In
+.I list
+mode, it can display the current key bindings, list all the
+readline editing directives available for binding, list which keys
+invoke a given directive, or output the current set of key
+bindings in a format that can be incorporated directly into an inputrc
+file. In
+.I batch
+mode, it reads a series of key bindings directly from a file and
+passes them to readline. In its most common usage,
+.B bind
+takes a single string and passes it directly to readline, which
+interprets the line as if it had just been read from the inputrc file.
+Both key bindings and variable assignments may appear in the
+string given to
+.B bind .
+.PP
+The readline library also provides an interface for \fIword completion\fP.
+When the
+.I completion
+character (usually TAB) is typed, readline looks at the word currently
+being entered and computes the set of filenames of which the current
+word is a valid prefix.
+If there is only one possible completion, the
+rest of the characters are inserted directly, otherwise the
+common prefix of the set of filenames is added to the current word.
+A second TAB character entered immediately after a non-unique
+completion causes readline to list the possible completions; there is
+an option to have the list displayed immediately.
+Readline provides hooks so that applications can provide specific types
+of completion before the default filename completion is attempted.
+This is quite flexible, though it is not completely user-programmable.
+Bash, for example, can complete filenames, command names (including aliases,
+builtins, shell reserved words, shell functions, and executables found
+in the file system), shell variables, usernames, and hostnames. It
+uses a set of heuristics that, while not perfect, is generally quite
+good at determining what type of completion to attempt.
+.NH 2
+History
+.PP
+Access to the list of commands previously entered (the \fIcommand history\fP)
+is provided jointly by Bash and the readline library. Bash provides
+variables (\fB$HISTFILE\fP, \fB$HISTSIZE\fP, and \fB$HISTCONTROL\fP)
+and the
+.B history
+and
+.B fc
+builtins to manipulate the history list.
+The value of
+.B $HISTFILE
+specifes the file where Bash writes the command history on exit and
+reads it on startup.
+.B $HISTSIZE
+is used to limit the number of commands saved in the history.
+.B $HISTCONTROL
+provides a crude form of control over which commands are saved on
+the history list: a value of
+.I ignorespace
+means to not save commands which begin with a space; a value of
+.I ignoredups
+means to not save commands identical to the last command saved.
+\fB$HISTCONTROL\fP was named \fB$history_control\fP in earlier
+versions of Bash; the old name is still accepted for backwards
+compatibility. The
+.B history
+command can read or write files containing the history list
+and display the current list contents. The
+.B fc
+builtin, adopted from POSIX.2 and the Korn Shell, allows display
+and re-execution, with optional editing,
+of commands from the history list. The readline
+library offers a set of commands to search the history list for
+a portion of the current input line or a string typed by the user.
+Finally, the
+.I history
+library, generally incorporated directly into the readline library,
+implements a facility for history recall, expansion, and re-execution
+of previous commands very similar to csh
+(\*Qbang history\*U, so called because the exclamation point
+introduces a history substitution):
+.SE
+$ echo a b c d e
+a b c d e
+$ !! f g h i
+echo a b c d e f g h i
+a b c d e f g h i
+$ !-2
+echo a b c d e
+a b c d e
+$ echo !-2:1-4
+echo a b c d
+a b c d
+.EE
+.LP
+The command history is only
+saved when the shell is interactive, so it is not available for use
+by shell scripts.
+.NH 2
+New Shell Variables
+.PP
+There are a number of convenience variables that Bash interprets
+to make life easier. These include
+.B FIGNORE ,
+which is a set of filename suffixes identifying files to exclude when
+completing filenames;
+.B HOSTTYPE ,
+which is automatically set to a string describing the type of
+hardware on which Bash is currently executing;
+.B command_oriented_history ,
+which directs Bash to save all lines of a multiple-line
+command such as a \fIwhile\fP or \fIfor\fP loop in a single
+history entry, allowing easy re-editing; and
+.B IGNOREEOF ,
+whose value indicates the number of consecutive EOF characters that
+an interactive shell will read before exiting \- an easy way to keep
+yourself from being logged out accidentally. The
+.B auto_resume
+variable alters the way the shell treats simple command names:
+if job control is active, and this variable is set, single-word
+simple commands without redirections cause the shell to first
+look for and restart a suspended job with that name before
+starting a new process.
+.NH 2
+Brace Expansion
+.PP
+Since sh offers no convenient way to generate arbitrary strings that
+share a common prefix or suffix (filename expansion requires that
+the filenames exist), Bash implements \fIbrace expansion\fP, a
+capability picked up from csh.
+Brace expansion is similar to filename expansion, but the strings
+generated need not correspond to existing files. A brace expression
+consists of an optional
+.I preamble ,
+followed by a pair of braces enclosing a series of comma-separated
+strings, and an optional
+.I postamble .
+The preamble is prepended to each string within the braces, and the
+postamble is then appended to each resulting string:
+.SE
+$ echo a{d,c,b}e
+ade ace abe
+.EE
+.LP
+As this example demonstrates, the results of brace expansion are not
+sorted, as they are by filename expansion.
+.NH 2
+Process Substitution
+.PP
+On systems that can support it, Bash provides a facility known as
+\fIprocess substitution\fP. Process substitution is similar to command
+substitution in that its specification includes a command to execute,
+but the shell does not collect the command's output and insert it into
+the command line. Rather, Bash opens a pipe to the command, which
+is run in the background. The shell uses named pipes (FIFOs) or the
+.I /dev/fd
+method of naming open files to expand the process
+substitution to a filename which connects to the pipe when opened.
+This filename becomes the result of the expansion. Process substitution
+can be used to compare the outputs of two different versions of an
+application as part of a regression test:
+.SE
+$ cmp <(old_prog) <(new_prog)
+.EE
+.NH 2
+Prompt Customization
+.PP
+One of the more popular interactive features that Bash provides is
+the ability to customize the prompt. Both
+.B $PS1
+and
+.B $PS2,
+the primary and secondary prompts, are expanded before being
+displayed. Parameter and variable expansion is performed when
+the prompt string is expanded, so any shell variable can be
+put into the prompt (e.g.,
+.B $SHLVL ,
+which indicates how deeply the current shell is nested).
+Bash specially interprets characters in the prompt string
+preceded by a backslash. Some of these backslash escapes are
+replaced with
+the current time, the date, the current working directory,
+the username, and the command number or history number of the command
+being entered. There is even a backslash escape to cause the shell
+to change its prompt when running as root after an \fIsu\fP.
+Before printing each primary prompt, Bash expands the variable
+.B $PROMPT_COMMAND
+and, if it has a value, executes the expanded value as a command,
+allowing additional prompt customization. For example, this assignment
+causes the current user, the current host, the time, the last
+component of the current working directory, the level of shell
+nesting, and the history number of the current command to be embedded
+into the primary prompt:
+.SE
+$ PS1='\eu@\eh [\et] \eW($SHLVL:\e!)\e$ '
+chet@odin [21:03:44] documentation(2:636)$ cd ..
+chet@odin [21:03:54] src(2:637)$
+.EE
+.LP
+The string being assigned is surrounded by single quotes so that if
+it is exported, the value of
+.B $SHLVL
+will be updated by a child shell:
+.SE
+chet@odin [21:17:35] src(2:638)$ export PS1
+chet@odin [21:17:40] src(2:639)$ bash
+chet@odin [21:17:46] src(3:696)$
+.EE
+.LP
+The \fP\e$\fP escape is displayed
+as \*Q\fB$\fP\*U when running as a normal user, but as \*Q\fB#\fP\*U when
+running as root.
+.NH 2
+File System Views
+.PP
+Since Berkeley introduced symbolic links in 4.2 BSD, one of their most
+annoying properties has been the \*Qwarping\*U to a completely
+different area of the file system when using
+.B cd ,
+and the resultant non-intuitive behavior of \*Q\fBcd ..\fP\*U.
+The \s-1UNIX\s+1 kernel treats symbolic links
+.I physically .
+When the kernel is translating a pathname
+in which one component is a symbolic link, it replaces all or part
+of the pathname while processing the link. If the contents of the symbolic
+link begin with a slash, the kernel replaces the
+pathname entirely; if not, the link contents replace
+the current component. In either case, the symbolic link
+is visible. If the link value is an absolute pathname,
+the user finds himself in a completely different part of the file
+system.
+.PP
+Bash provides a
+.I logical
+view of the file system. In this default mode, command and filename
+completion and builtin commands such as
+.B cd
+and
+.B pushd
+which change the current working directory transparently follow
+symbolic links as if they were directories.
+The
+.B $PWD
+variable, which holds the shell's idea of the current working directory,
+depends on the path used to reach the directory rather than its
+physical location in the local file system hierarchy. For example:
+.SE
+$ cd /usr/local/bin
+$ echo $PWD
+/usr/local/bin
+$ pwd
+/usr/local/bin
+$ /bin/pwd
+/net/share/sun4/local/bin
+$ cd ..
+$ pwd
+/usr/local
+$ /bin/pwd
+/net/share/sun4/local
+$ cd ..
+$ pwd
+/usr
+$ /bin/pwd
+/usr
+.EE
+.LP
+One problem with this, of
+course, arises when programs that do not understand the shell's logical
+notion of the file system interpret \*Q..\*U differently. This generally
+happens when Bash completes filenames containing \*Q..\*U according to a
+logical hierarchy which does not correspond to their physical location.
+For users who find this troublesome, a corresponding
+.I physical
+view of the file system is available:
+.SE
+$ cd /usr/local/bin
+$ pwd
+/usr/local/bin
+$ set -o physical
+$ pwd
+/net/share/sun4/local/bin
+.EE
+.NH 2
+Internationalization
+.PP
+One of the most significant improvements in version 1.13 of Bash was the
+change to \*Qeight-bit cleanliness\*U. Previous versions used the
+eighth bit of characters to mark whether or not they were
+quoted when performing word expansions. While this did not affect
+the majority of users, most of whom used only seven-bit ASCII characters,
+some found it confining. Beginning with version 1.13, Bash
+implemented a different quoting mechanism that did not alter the
+eighth bit of characters. This allowed Bash
+to manipulate files with \*Qodd\*U characters in their names, but
+did nothing to help users enter those names, so
+version 1.13 introduced changes to readline that
+made it eight-bit clean as well. Options exist that force readline to
+attach no special significance to characters with the eighth bit set
+(the default behavior is to convert these characters to meta-prefixed
+key sequences) and to output these characters without conversion to
+meta-prefixed sequences. These changes, along with the expansion of
+keymaps to a full eight bits, enable readline to work with most of the
+ISO-8859 family of character sets, used by many European countries.
+.NH 2
+POSIX Mode
+.PP
+Although Bash is intended to be POSIX.2 conformant, there are areas in
+which the default behavior is not compatible with the standard. For
+users who wish to operate in a strict POSIX.2 environment, Bash
+implements a \fIPOSIX mode\fP. When this mode is active, Bash modifies
+its default operation where it differs from POSIX.2 to match the
+standard. POSIX mode is entered when Bash is started with the
+.B -posix
+option. This feature is also available as an option to the
+\fBset\fP builtin, \fBset -o posix\fP.
+For compatibility with other GNU software that attempts to be POSIX.2
+compliant, Bash also enters POSIX mode if the variable
+.B $POSIXLY_CORRECT
+is set when Bash is started or assigned a value during execution.
+.B $POSIX_PEDANTIC
+is accepted as well, to be compatible with some older GNU utilities.
+When Bash is started in POSIX mode, for example, it sources the
+file named by the value of
+.B $ENV
+rather than the \*Qnormal\*U startup files, and does not allow
+reserved words to be aliased.
+.NH 1
+New Features and Future Plans
+.PP
+There are several features introduced in the current
+version of Bash, version 1.14, and a number under consideration
+for future releases. This section will briefly detail the new
+features in version 1.14 and describe several features
+that may appear in later versions.
+.NH 2
+New Features in Bash-1.14
+.PP
+The new features available in Bash-1.14 answer several of
+the most common requests for enhancements. Most notably, there
+is a mechanism
+for including non-visible character sequences in prompts, such as
+those which cause a terminal to print characters in different
+colors or in standout mode. There was nothing preventing the use
+of these sequences in earlier
+versions, but the readline redisplay algorithm assumed each
+character occupied physical screen space and would wrap lines
+prematurely.
+.PP
+Readline has a few new
+variables, several new bindable commands, and some additional
+emacs mode default key bindings. A new history search
+mode has been implemented: in this mode, readline searches the
+history for lines beginning with the characters between the
+beginning of the current line and the cursor. The existing readline
+incremental search commands no longer match identical lines more
+than once.
+Filename completion now expands variables in directory names.
+The history expansion facilities are now nearly
+completely csh-compatible: missing modifiers have been added and
+history substitution has been extended.
+.PP
+Several of the features described earlier, such as
+.B "set -o posix"
+and
+.B $POSIX_PEDANTIC ,
+are new in version 1.14.
+There is a new shell variable,
+.B OSTYPE ,
+to which Bash assigns a value that identifies the
+version of \s-1UNIX\s+1 it's
+running on (great for putting architecture-specific binary directories
+into the \fB$PATH\fP).
+Two variables have been renamed:
+.B $HISTCONTROL
+replaces
+.B $history_control ,
+and
+.B $HOSTFILE
+replaces
+.B $hostname_completion_file .
+In both cases, the old names are accepted for backwards
+compatibility. The ksh
+.I select
+construct, which allows the generation of simple menus,
+has been implemented. New capabilities have been added
+to existing variables:
+.B $auto_resume
+can now take values of
+.I exact
+or
+.I substring ,
+and
+.B $HISTCONTROL
+understands the value
+.I ignoreboth ,
+which combines the two previously acceptable values. The
+.B dirs
+builtin has acquired options to print out specific members of the
+directory stack. The
+.B $nolinks
+variable, which forces a physical view of the file system,
+has been superseded by the
+.B \-P
+option to the
+.B set
+builtin (equivalent to \fBset -o physical\fP); the variable is retained
+for backwards compatibility. The version string contained in
+.B $BASH_VERSION
+now includes an indication of the patch level as well as the
+\*Qbuild version\*U.
+Some little-used features have
+been removed: the
+.B bye
+synonym for
+.B exit
+and the
+.B $NO_PROMPT_VARS
+variable are gone. There is now an organized test suite that can be
+run as a regression test when building a new version of Bash.
+.PP
+The documentation has been thoroughly overhauled:
+there is a new manual page on the readline library and the \fIinfo\fP
+file has been updated to reflect the current version.
+As always, as many bugs as possible have been fixed, although some
+surely remain.
+.NH 2
+Other Features
+.PP
+There are a few features that I hope to include in later Bash releases.
+Some are based on work already done in other shells.
+.PP
+In addition to simple variables, a future release of Bash will include
+one-dimensional arrays, using the ksh
+implementation of arrays as a model. Additions to the ksh syntax,
+such as \fIvarname\fP=( ... ) to assign a list of words directly to
+an array and a mechanism to allow
+the
+.B read
+builtin to read a list of values directly into an array, would be
+desirable. Given those extensions, the ksh
+.B "set \-A"
+syntax may not be worth supporting (the
+.B \-A
+option assigns a list of values to an array, but is a rather
+peculiar special case).
+.PP
+Some shells include a means of \fIprogrammable\fP word
+completion, where the user specifies on a per-command basis how the
+arguments of the command are to be treated when completion is attempted:
+as filenames, hostnames, executable files, and so on. The other
+aspects of the current Bash implementation could remain as-is; the
+existing heuristics would still be valid. Only when completing the
+arguments to a simple command would the programmable completion be
+in effect.
+.PP
+It would also be nice to give the user finer-grained
+control over which commands are saved onto the history list. One
+proposal is for a variable, tentatively named
+.B HISTIGNORE ,
+which would contain a colon-separated list of commands. Lines beginning
+with these commands, after the restrictions of
+.B $HISTCONTROL
+have been applied, would not be placed onto the history list. The
+shell pattern-matching capabilities could also be available when
+specifying the contents of
+.B $HISTIGNORE .
+.PP
+One thing that newer shells such as
+.B wksh
+(also known as
+.B dtksh )
+provide is a command to dynamically load code
+implementing additional builtin commands into a running shell.
+This new builtin would take an object file or shared library
+implementing the \*Qbody\*U of the
+builtin (\fIxxx_builtin()\fP for those familiar with Bash internals)
+and a structure containing the name of the new command, the function
+to call when the new builtin is invoked (presumably defined in the
+shared object specified as an argument), and the documentation to be
+printed by the
+.B help
+command (possibly present in the shared object as well). It would
+manage the details of extending the internal table of builtins.
+.PP
+A few other builtins would also be desirable: two are the POSIX.2
+.B getconf
+command, which prints the values of system configuration variables
+defined by POSIX.2, and a
+.B disown
+builtin, which causes a shell running
+with job control active to \*Qforget about\*U one or more
+background jobs in its internal jobs table. Using
+.B getconf ,
+for example, a user could retrieve a value for
+.B $PATH
+guaranteed to find all of the POSIX standard utilities, or
+find out how long filenames may be in the file system containing
+a specified directory.
+.PP
+There are no implementation timetables for any of these features, nor
+are there concrete plans to include them. If anyone has comments on
+these proposals, feel free to send me electronic mail.
+.NH 1
+Reflections and Lessons Learned
+.PP
+The lesson that has been repeated most often during Bash
+development is that there are dark corners in the Bourne shell,
+and people use all of them. In the original description of the
+Bourne shell, quoting and the shell grammar are both poorly
+specified and incomplete; subsequent descriptions have not helped
+much. The grammar presented in Bourne's paper describing
+the shell distributed with the Seventh Edition of \s-1UNIX\s+1\(dg
+is so far off that it does not allow the command \f(CWwho|wc\fP.
+In fact, as Tom Duff states:
+.QP
+Nobody really knows what the
+Bourne shell's grammar is. Even examination of the source code is
+little help.\(dd
+.FS
+\(dgS. R. Bourne, \*QUNIX Time-Sharing System: The UNIX Shell\*U,
+\fIBell System Technical Journal\fP, 57(6), July-August, 1978, pp. 1971-1990.
+.FE
+.FS
+\(ddTom Duff, \*QRc \- A Shell for Plan 9 and \s-1UNIX\s+1 systems\*U,
+\fIProc. of the Summer 1990 EUUG Conference\fP, London, July, 1990,
+pp. 21-33.
+.FE
+.LP
+The POSIX.2 standard includes a \fIyacc\fP grammar that comes close
+to capturing the Bourne shell's behavior, but it disallows some
+constructs which sh accepts without complaint \- and there are
+scripts out there that use them. It took a few versions and
+several bug reports before Bash implemented sh-compatible quoting,
+and there are still some \*Qlegal\*U sh constructs which Bash flags as
+syntax errors. Complete sh compatibility is a tough nut.
+.PP
+The shell is bigger and slower than I would like, though the current
+version is substantially faster than previously. The readline library
+could stand a substantial rewrite. A hand-written parser to replace
+the current \fIyacc\fP-generated one would probably result in a speedup,
+and would solve one glaring problem: the shell could parse
+commands in \*Q$(...)\*U constructs
+as they are entered, rather than reporting errors when the construct
+is expanded.
+.PP
+As always, there is some chaff to go with the wheat.
+Areas of duplicated functionality need to be cleaned
+up. There are several cases where Bash treats a variable specially to
+enable functionality available another way (\fB$notify\fP vs.
+\fBset -o notify\fP and \fB$nolinks\fP vs. \fBset -o physical\fP, for
+instance); the special treatment of the variable name should probably
+be removed. A few more things could stand removal; the
+.B $allow_null_glob_expansion
+and
+.B $glob_dot_filenames
+variables are of particularly questionable value.
+The \fB$[...]\fP arithmetic evaluation syntax is redundant now that
+the POSIX-mandated \fB$((...))\fP construct has been implemented,
+and could be deleted.
+It would be nice if the text output by the
+.B help
+builtin were external to the shell rather than compiled into it.
+The behavior enabled by
+.B $command_oriented_history ,
+which causes the shell to attempt to save all lines of a multi-line
+command in a single history entry, should be made the default and
+the variable removed.
+.NH 1
+Availability
+.PP
+As with all other
+GNU software, Bash is available for anonymous FTP from
+.I prep.ai.mit.edu:/pub/gnu
+and from other GNU software mirror sites. The current version is in
+.I bash-1.14.1.tar.gz
+in that directory. Use
+.I archie
+to find the nearest archive site. The
+latest version is always available for FTP from
+.I bash.CWRU.Edu:/pub/dist.
+Bash documentation is available for FTP from
+.I bash.CWRU.Edu:/pub/bash.
+.PP
+The Free Software Foundation sells tapes and CD-ROMs
+containing Bash; send electronic mail to
+\f(CRgnu@prep.ai.mit.edu\fP or call \f(CR+1-617-876-3296\fP
+for more information.
+.PP
+Bash is also distributed with several versions of \s-1UNIX\s+1-compatible
+systems. It is included as /bin/sh and /bin/bash on several Linux
+distributions (more about the difference in a moment), and as contributed
+software in BSDI's BSD/386* and FreeBSD.
+.FS
+*BSD/386 is a trademark of Berkeley Software Design, Inc.
+.FE
+.PP
+The Linux distribution deserves special mention. There are two
+configurations included in the standard Bash distribution: a
+\*Qnormal\*U configuration, in which all of the standard features
+are included, and a \*Qminimal\*U configuration, which omits job
+control, aliases, history and command line editing, the directory
+stack and
+.B pushd/popd/dirs,
+process substitution, prompt string special character decoding, and the
+.I select
+construct. This minimal version is designed to be a drop-in replacement
+for the traditional \s-1UNIX\s+1 /bin/sh, and is included as the Linux
+/bin/sh in several packagings.
+.NH 1
+Conclusion
+.PP
+Bash is a worthy successor to sh.
+It is sufficiently portable
+to run on nearly every version of \s-1UNIX\s+1 from
+4.3 BSD to SVR4.2, and several \s-1UNIX\s+1 workalikes.
+It is robust enough to replace sh on most of those systems,
+and provides more functionality. It has several thousand regular users,
+and their feedback has helped to make it as good as it is today \- a
+testament to the benefits of free software.
diff --git a/doc/article.pdf b/doc/article.pdf
new file mode 100644
index 0000000..d2aaf9e
--- /dev/null
+++ b/doc/article.pdf
Binary files differ
diff --git a/doc/article.ps b/doc/article.ps
new file mode 100644
index 0000000..3aadf2f
--- /dev/null
+++ b/doc/article.ps
@@ -0,0 +1,1418 @@
+%!PS-Adobe-3.0
+%%Creator: groff version 1.16.1
+%%CreationDate: Mon Nov 19 13:06:55 2001
+%%DocumentNeededResources: font Times-Bold
+%%+ font Times-Italic
+%%+ font Times-Roman
+%%+ font Courier
+%%DocumentSuppliedResources: procset grops 1.16 1
+%%Pages: 11
+%%PageOrder: Ascend
+%%Orientation: Portrait
+%%EndComments
+%%BeginProlog
+%%BeginResource: procset grops 1.16 1
+/setpacking where{
+pop
+currentpacking
+true setpacking
+}if
+/grops 120 dict dup begin
+/SC 32 def
+/A/show load def
+/B{0 SC 3 -1 roll widthshow}bind def
+/C{0 exch ashow}bind def
+/D{0 exch 0 SC 5 2 roll awidthshow}bind def
+/E{0 rmoveto show}bind def
+/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
+/G{0 rmoveto 0 exch ashow}bind def
+/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/I{0 exch rmoveto show}bind def
+/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
+/K{0 exch rmoveto 0 exch ashow}bind def
+/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/M{rmoveto show}bind def
+/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
+/O{rmoveto 0 exch ashow}bind def
+/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/Q{moveto show}bind def
+/R{moveto 0 SC 3 -1 roll widthshow}bind def
+/S{moveto 0 exch ashow}bind def
+/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/SF{
+findfont exch
+[exch dup 0 exch 0 exch neg 0 0]makefont
+dup setfont
+[exch/setfont cvx]cvx bind def
+}bind def
+/MF{
+findfont
+[5 2 roll
+0 3 1 roll
+neg 0 0]makefont
+dup setfont
+[exch/setfont cvx]cvx bind def
+}bind def
+/level0 0 def
+/RES 0 def
+/PL 0 def
+/LS 0 def
+/MANUAL{
+statusdict begin/manualfeed true store end
+}bind def
+/PLG{
+gsave newpath clippath pathbbox grestore
+exch pop add exch pop
+}bind def
+/BP{
+/level0 save def
+1 setlinecap
+1 setlinejoin
+72 RES div dup scale
+LS{
+90 rotate
+}{
+0 PL translate
+}ifelse
+1 -1 scale
+}bind def
+/EP{
+level0 restore
+showpage
+}bind def
+/DA{
+newpath arcn stroke
+}bind def
+/SN{
+transform
+.25 sub exch .25 sub exch
+round .25 add exch round .25 add exch
+itransform
+}bind def
+/DL{
+SN
+moveto
+SN
+lineto stroke
+}bind def
+/DC{
+newpath 0 360 arc closepath
+}bind def
+/TM matrix def
+/DE{
+TM currentmatrix pop
+translate scale newpath 0 0 .5 0 360 arc closepath
+TM setmatrix
+}bind def
+/RC/rcurveto load def
+/RL/rlineto load def
+/ST/stroke load def
+/MT/moveto load def
+/CL/closepath load def
+/FL{
+currentgray exch setgray fill setgray
+}bind def
+/BL/fill load def
+/LW/setlinewidth load def
+/RE{
+findfont
+dup maxlength 1 index/FontName known not{1 add}if dict begin
+{
+1 index/FID ne{def}{pop pop}ifelse
+}forall
+/Encoding exch def
+dup/FontName exch def
+currentdict end definefont pop
+}bind def
+/DEFS 0 def
+/EBEGIN{
+moveto
+DEFS begin
+}bind def
+/EEND/end load def
+/CNT 0 def
+/level1 0 def
+/PBEGIN{
+/level1 save def
+translate
+div 3 1 roll div exch scale
+neg exch neg exch translate
+0 setgray
+0 setlinecap
+1 setlinewidth
+0 setlinejoin
+10 setmiterlimit
+[]0 setdash
+/setstrokeadjust where{
+pop
+false setstrokeadjust
+}if
+/setoverprint where{
+pop
+false setoverprint
+}if
+newpath
+/CNT countdictstack def
+userdict begin
+/showpage{}def
+}bind def
+/PEND{
+clear
+countdictstack CNT sub{end}repeat
+level1 restore
+}bind def
+end def
+/setpacking where{
+pop
+setpacking
+}if
+%%EndResource
+%%IncludeResource: font Times-Bold
+%%IncludeResource: font Times-Italic
+%%IncludeResource: font Times-Roman
+%%IncludeResource: font Courier
+grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
+def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron
+/scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef
+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
+/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
+/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
+/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
+/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
+/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
+/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
+/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
+/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
+/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
+/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
+/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
+/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
+/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
+/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
+/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
+/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
+/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
+/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
+/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
+/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
+/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
+/Courier@0 ENC0/Courier RE/Times-Roman@0 ENC0/Times-Roman RE
+/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE
+%%EndProlog
+%%Page: 1 1
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 12/Times-Bold@0 SF(Bash \255 The GNU shell*)227.904 123 Q/F1 10
+/Times-Italic@0 SF(Chet Rame)263.85 147 Q(y)-.3 E(Case W)221.72 159 Q
+(estern Reserve Univer)-.92 E(sity)-.1 E -.15(ch)250.425 171 S
+(et@po.cwru.edu).15 E/F2 10/Times-Bold@0 SF 2.5(1. Intr)72 207 R
+(oduction)-.18 E(Bash)97 222.6 Q/F3 10/Times-Roman@0 SF .904
+(is the shell, or command language interpreter)3.404 F 3.404(,t)-.4 G
+.904(hat will appear in the GNU operating system.)-3.404 F 1.075
+(The name is an acron)72 234.6 R 1.075(ym for the \231Bourne-Ag)-.15 F
+1.075(ain SHell\232, a pun on Ste)-.05 F 1.375 -.15(ve B)-.25 H 1.075
+(ourne, the author of the direct).15 F .206(ancestor of the current)72
+246.6 R/F4 8/Times-Roman@0 SF(UNIX)2.706 E F3 2.706<ae73>C(hell)-2.706 E
+F1(/bin/sh)2.706 E F3 2.706(,w)C .205(hich appeared in the Se)-2.706 F
+-.15(ve)-.25 G .205(nth Edition Bell Labs Research v).15 F(er)-.15 E(-)
+-.2 E(sion of)72 258.6 Q/F5 9/Times-Roman@0 SF(UNIX)2.5 E F3(.)A .387
+(Bash is an)97 274.2 R F2(sh)2.887 E F3 .387
+(\255compatible shell that incorporates useful features from the K)B
+.388(orn shell \()-.35 F F2(ksh)A F3 2.888(\)a)C .388(nd the C)-2.888 F
+.023(shell \()72 286.2 R F2(csh)A F3 .023
+(\), described later in this article.)B .022
+(It is ultimately intended to be a conformant implementation of the)
+5.022 F 3.568(IEEE POSIX Shell and Utilities speci\214cation \(IEEE W)72
+298.2 R 3.568(orking Group 1003.2\).)-.8 F 3.569(It of)8.569 F 3.569
+(fers functional)-.25 F(impro)72 310.2 Q -.15(ve)-.15 G(ments o).15 E
+-.15(ve)-.15 G 2.5(rs).15 G 2.5(hf)-2.5 G(or both interacti)-2.5 E .3
+-.15(ve a)-.25 H(nd programming use.).15 E .697
+(While the GNU operating system will most lik)97 325.8 R .697
+(ely include a v)-.1 F .697(ersion of the Berk)-.15 F(ele)-.1 E 3.197
+(ys)-.15 G .696(hell csh, Bash)-3.197 F .015(will be the def)72 337.8 R
+.015(ault shell.)-.1 F(Lik)5.015 E 2.515(eo)-.1 G .015(ther GNU softw)
+-2.515 F .016(are, Bash is quite portable.)-.1 F .016
+(It currently runs on nearly e)5.016 F -.15(ve)-.25 G(ry).15 E -.15(ve)
+72 349.8 S .523(rsion of).15 F F4(UNIX)3.023 E F3 .523(and a fe)3.023 F
+3.023(wo)-.25 G .523
+(ther operating systems \255 an independently-supported port e)-3.023 F
+.523(xists for OS/2, and)-.15 F .706
+(there are rumors of ports to DOS and W)72 361.8 R(indo)-.4 E .706
+(ws NT)-.25 F 5.706(.P)-.74 G .706(orts to)-5.706 F F5(UNIX)3.206 E F3
+(-lik)A 3.206(es)-.1 G .706(ystems such as QNX and Minix)-3.206 F
+(are part of the distrib)72 373.8 Q(ution.)-.2 E .405
+(The original author of Bash w)97 389.4 R .405(as Brian F)-.1 F .405
+(ox, an emplo)-.15 F .405(yee of the Free Softw)-.1 F .405(are F)-.1 F
+2.905(oundation. The)-.15 F(cur)2.905 E(-)-.2 E(rent de)72 401.4 Q -.15
+(ve)-.25 G(loper and maintainer is Chet Rame).15 E 1.3 -.65(y, a v)-.15
+H(olunteer who w).45 E(orks at Case W)-.1 E(estern Reserv)-.8 E 2.5(eU)
+-.15 G(ni)-2.5 E -.15(ve)-.25 G(rsity).15 E(.)-.65 E F2 2.5(2. What')72
+425.4 R 2.5(sP)-.37 G(OSIX, anyway?)-2.5 E F1(POSIX)97 441 Q F3 .343
+(is a name originally coined by Richard Stallman for a f)2.843 F .343
+(amily of open system standards based)-.1 F(on)72 453 Q F5(UNIX)3.24 E
+F3 5.74(.T)C .74(here are a number of aspects of)-5.74 F F5(UNIX)3.24 E
+F3 .74(under consideration for standardization, from the basic)3.24 F
+.192(system services at the system call and C library le)72 465 R -.15
+(ve)-.25 G 2.692(lt).15 G 2.692(oa)-2.692 G .192
+(pplications and tools to system administration and)-2.692 F 2.5
+(management. Each)72 477 R(area of standardization is assigned to a w)
+2.5 E(orking group in the 1003 series.)-.1 E 2.814
+(The POSIX Shell and Utilities standard has been de)97 492.6 R -.15(ve)
+-.25 G 2.814(loped by IEEE W).15 F 2.813(orking Group 1003.2)-.8 F .254
+(\(POSIX.2\).\210 It concentrates on the command interpreter interf)72
+504.6 R .253(ace and utility programs commonly e)-.1 F -.15(xe)-.15 G
+(cuted).15 E 1.112(from the command line or by other programs.)72 516.6
+R 1.112(An initial v)6.112 F 1.113
+(ersion of the standard has been appro)-.15 F -.15(ve)-.15 G 3.613(da)
+.15 G(nd)-3.613 E .365(published by the IEEE, and w)72 528.6 R .365
+(ork is currently underw)-.1 F .365(ay to update it.)-.1 F .365
+(There are four primary areas of w)5.365 F(ork)-.1 E
+(in the 1003.2 standard:)72 540.6 Q 21.5<8341>72 556.2 S .835
+(spects of the shell')-21.5 F 3.335(ss)-.55 G .835
+(yntax and command language.)-3.335 F 3.335(An)5.835 G .835
+(umber of special b)-3.335 F .835(uiltins such as)-.2 F F2(cd)3.335 E F3
+(and)3.335 E F2(exec)97 568.2 Q F3 .545(are being speci\214ed as part o\
+f the shell, since their functionality usually cannot be implemented)
+3.046 F(by a separate e)97 580.2 Q -.15(xe)-.15 G(cutable;).15 E 21.5
+<8341>72 595.8 S .926
+(set of utilities to be called by shell scripts and applications.)
+-18.074 F .927(Examples are programs lik)5.927 F(e)-.1 E F1 .927
+(sed, tr)3.427 F(,)-1.11 E F3(and)97 607.8 Q F1(awk.)2.797 E F3 .297
+(Utilities commonly implemented as shell b)5.297 F .296
+(uiltins are described in this section, such as)-.2 F F2(test)2.796 E F3
+(and)97 619.8 Q F2(kill)3.422 E F3 5.922(.A)C 3.422(ne)-5.922 G .922
+(xpansion of this section')-3.572 F 3.423(ss)-.55 G .923
+(cope, termed the User Portability Extension, or UPE, has)-3.423 F
+(standardized interacti)97 631.8 Q .3 -.15(ve p)-.25 H(rograms such as)
+.15 E F1(vi)2.5 E F3(and)2.5 E F1(mailx;)2.5 E F3 21.5<8341>72 647.4 S
+.288(group of functional interf)-18.712 F .287(aces to services pro)-.1
+F .287(vided by the shell, such as the traditional)-.15 F/F6 10
+/Courier@0 SF(system\(\))2.787 E F3 3.289(Cl)97 659.4 S .789
+(ibrary function.)-3.289 F .789(There are functions to perform shell w)
+5.789 F .789(ord e)-.1 F .79(xpansions, perform \214lename e)-.15 F
+(xpan-)-.15 E .324(sion \()97 671.4 R F1(globbing)A F3 .324
+(\), obtain v)B .323(alues of POSIX.2 system con\214guration v)-.25 F
+.323(ariables, retrie)-.25 F .623 -.15(ve v)-.25 H .323(alues of en)-.1
+F(viron-)-.4 E(ment v)97 683.4 Q(ariables \()-.25 E F6(getenv\(\))A F3
+(\), and other services;).833 E .32 LW 144 691.4 72 691.4 DL F4
+(*An earlier v)72 703.2 Q
+(ersion of this article appeared in The Linux Journal.)-.12 E(\210IEEE,)
+72 715 Q/F7 8/Times-Italic@0 SF 1.231(IEEE Standar)3.231 F 3.231(df)
+-.296 G 1.231(or Information T)-3.231 F(ec)-.736 E(hnolo)-.12 E 1.231
+(gy -- P)-.08 F 1.231(ortable Oper)-.64 F 1.232
+(ating System Interface \(POSIX\) P)-.12 F 1.232(art 2:)-.64 F
+(Shell and Utilities)72 725 Q F4 2(,1)C(992.)-2 E EP
+%%Page: 2 2
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF(-2-)282.17 48 Q 21.5<8341>72 84 S
+(suite of \231de)-19 E -.15(ve)-.25 G(lopment\232 utilities such as).15
+E/F1 10/Times-Italic@0 SF(c89)2.5 E F0(\(the POSIX.2 v)2.5 E(ersion of)
+-.15 E F1(cc)2.5 E F0(\), and)A F1(yacc.)2.5 E F0 .483
+(Bash is concerned with the aspects of the shell')97 99.6 R 2.983(sb)
+-.55 G(eha)-2.983 E .484(vior de\214ned by POSIX.2.)-.2 F .484
+(The shell command)5.484 F 1.439
+(language has of course been standardized, including the basic \215o)72
+111.6 R 3.938(wc)-.25 G 1.438(ontrol and program e)-3.938 F -.15(xe)-.15
+G 1.438(cution con-).15 F 1.284
+(structs, I/O redirection and pipelining, ar)72 123.6 R 1.284
+(gument handling, v)-.18 F 1.284(ariable e)-.25 F 1.284
+(xpansion, and quoting.)-.15 F(The)6.285 E F1(special)3.785 E F0 -.2(bu)
+72 135.6 S .676
+(iltins, which must be implemented as part of the shell to pro).2 F .676
+(vide the desired functionality)-.15 F 3.176(,a)-.65 G .676
+(re speci\214ed)-3.176 F .7(as being part of the shell; e)72 147.6 R .7
+(xamples of these are)-.15 F/F2 10/Times-Bold@0 SF -2.3 -.15(ev a)3.201
+H(l).15 E F0(and)3.201 E F2(export)3.201 E F0 5.701(.O)C .701
+(ther utilities appear in the sections of)-5.701 F .256(POSIX.2 not de)
+72 159.6 R -.2(vo)-.25 G .256(ted to the shell which are commonly \(and\
+ in some cases must be\) implemented as b).2 F(uiltin)-.2 E .213
+(commands, such as)72 171.6 R F2 -.18(re)2.713 G(ad).18 E F0(and)2.713 E
+F2(test)2.713 E F0 5.213(.P)C .213
+(OSIX.2 also speci\214es aspects of the shell')-5.213 F 2.713(si)-.55 G
+(nteracti)-2.713 E .513 -.15(ve b)-.25 H(eha).15 E .214(vior as part)-.2
+F .598(of the UPE, including job control and command line editing.)72
+183.6 R .598(Interestingly enough, only)5.598 F F1(vi)3.098 E F0 .598
+(-style line edit-)B(ing commands ha)72 195.6 Q .3 -.15(ve b)-.2 H
+(een standardized;).15 E F1(emacs)2.5 E F0
+(editing commands were left out due to objections.)2.5 E 1.128
+(While POSIX.2 includes much of what the shell has traditionally pro)97
+211.2 R 1.129(vided, some important things)-.15 F(ha)72 223.2 Q .344
+-.15(ve b)-.2 H .044(een omitted as being \231be).15 F .044
+(yond its scope.)-.15 F 5.043<9a54>-.7 G .043
+(here is, for instance, no mention of a dif)-5.043 F .043
+(ference between a)-.25 F F1(lo)72 235.2 Q(gin)-.1 E F0 1.445
+(shell and an)3.945 F 3.945(yo)-.15 G 1.445(ther interacti)-3.945 F
+1.745 -.15(ve s)-.25 H 1.446
+(hell \(since POSIX.2 does not specify a login program\).).15 F 1.446
+(No \214x)6.446 F(ed)-.15 E(startup \214les are de\214ned, either \255 \
+the standard does not mention)72 247.2 Q F1(.pr)2.5 E(o\214le)-.45 E F0
+(.)A F2 2.5(3. Basic)72 271.2 R(Bash featur)2.5 E(es)-.18 E F0 1.448
+(Since the Bourne shell pro)97 286.8 R 1.448
+(vides Bash with most of its philosophical underpinnings, Bash inherits)
+-.15 F .64(most of its features and functionality from sh.)72 298.8 R
+.641(Bash implements all of the traditional sh \215o)5.641 F 3.141(wc)
+-.25 G .641(ontrol con-)-3.141 F .8(structs \()72 310.8 R F1(for)A F0(,)
+A F1(if)3.3 E F0(,)A F1(while)3.3 E F0 3.3(,e)C 3.3(tc.\). All)-3.3 F
+.799(of the Bourne shell b)3.3 F .799
+(uiltins, including those not speci\214ed in the POSIX.2)-.2 F .536
+(standard, appear in Bash.)72 322.8 R(Shell)5.536 E F1(functions)3.036 E
+F0 3.036(,i)C .536(ntroduced in the SVR2 v)-3.036 F .537
+(ersion of the Bourne shell, are similar)-.15 F .779
+(to shell scripts, b)72 334.8 R .779
+(ut are de\214ned using a special syntax and are e)-.2 F -.15(xe)-.15 G
+.779(cuted in the same process as the calling).15 F 2.841(shell. Bash)72
+346.8 R .341(has shell functions which beha)2.841 F .641 -.15(ve i)-.2 H
+2.841(naf).15 G .341(ashion upw)-2.941 F .342
+(ard-compatible with sh functions.)-.1 F .342(There are)5.342 F 1.447
+(certain shell v)72 358.8 R 1.446
+(ariables that Bash interprets in the same w)-.25 F 1.446
+(ay as sh, such as)-.1 F F2(PS1)3.946 E F0(,)A F2(IFS)3.946 E F0 3.946
+(,a)C(nd)-3.946 E F2 -.74(PA)3.946 G(TH)-.21 E F0 6.446(.B)C(ash)-6.446
+E 1.423(implements essentially the same grammar)72 370.8 R 3.924(,p)-.4
+G 1.424(arameter and v)-3.924 F 1.424(ariable e)-.25 F 1.424
+(xpansion semantics, redirection, and)-.15 F 1.06
+(quoting as the Bourne shell.)72 382.8 R 1.06(Where dif)6.06 F 1.06
+(ferences appear between the POSIX.2 standard and traditional sh)-.25 F
+(beha)72 394.8 Q(vior)-.2 E 2.5(,B)-.4 G(ash follo)-2.5 E(ws POSIX.)-.25
+E 1.608(The K)97 410.4 R 1.608(orn Shell \()-.35 F F2(ksh)A F0 4.108
+(\)i)C 4.108(sad)-4.108 G 1.608
+(escendent of the Bourne shell written at A)-4.108 F 1.609
+(T&T Bell Laboratories by)-1.11 F(Da)72 422.4 Q 1.059(vid K)-.2 F 3.559
+(orn\207. It)-.35 F(pro)3.559 E 1.059
+(vides a number of useful features that POSIX and Bash ha)-.15 F 1.359
+-.15(ve a)-.2 H 3.558(dopted. Man).15 F 3.558(yo)-.15 G 3.558(ft)-3.558
+G(he)-3.558 E(interacti)72 434.4 Q 1.312 -.15(ve f)-.25 H 1.012
+(acilities in POSIX.2 ha).05 F 1.312 -.15(ve t)-.2 H 1.012
+(heir roots in the ksh: for e).15 F 1.013
+(xample, the POSIX and ksh job control)-.15 F -.1(fa)72 446.4 S .513
+(cilities are nearly identical. Bash includes features from the K).1 F
+.513(orn Shell for both interacti)-.35 F .813 -.15(ve u)-.25 H .513
+(se and shell).15 F 3.905(programming. F)72 458.4 R 1.405
+(or programming, Bash pro)-.15 F 1.405(vides v)-.15 F 1.405
+(ariables such as)-.25 F F2(RANDOM)3.905 E F0(and)3.905 E F2(REPL)3.905
+E(Y)-.92 E F0 3.905(,t)C(he)-3.905 E F2(typeset)3.905 E F0 -.2(bu)72
+470.4 S .398(iltin, the ability to remo).2 F .698 -.15(ve s)-.15 H .398
+(ubstrings from v).15 F .398
+(ariables based on patterns, and shell arithmetic.)-.25 F F2(RANDOM)
+5.397 E F0 -.15(ex)72 482.4 S .489
+(pands to a random number each time it is referenced; assigning a v).15
+F .49(alue to)-.25 F F2(RANDOM)2.99 E F0 .49(seeds the random)2.99 F
+.055(number generator)72 494.4 R(.)-.55 E F2(REPL)5.055 E(Y)-.92 E F0
+.054(is the def)2.554 F .054(ault v)-.1 F .054(ariable used by the)-.25
+F F2 -.18(re)2.554 G(ad).18 E F0 -.2(bu)2.554 G .054(iltin when no v).2
+F .054(ariable names are sup-)-.25 F .742(plied as ar)72 506.4 R 3.243
+(guments. The)-.18 F F2(typeset)3.243 E F0 -.2(bu)3.243 G .743
+(iltin is used to de\214ne v).2 F .743(ariables and gi)-.25 F 1.043 -.15
+(ve t)-.25 H .743(hem attrib).15 F .743(utes such as)-.2 F F2 -.18(re)
+3.243 G(ad-).18 E(only)72 518.4 Q F0 5.512(.B)C .512
+(ash arithmetic allo)-5.512 F .512(ws the e)-.25 F -.25(va)-.25 G .511
+(luation of an e).25 F .511
+(xpression and the substitution of the result.)-.15 F .511(Shell v)5.511
+F(ari-)-.25 E .222
+(ables may be used as operands, and the result of an e)72 530.4 R .222
+(xpression may be assigned to a v)-.15 F 2.722(ariable. Nearly)-.25 F
+.222(all of)2.722 F(the operators from the C language are a)72 542.4 Q
+-.25(va)-.2 G(ilable, with the same precedence rules:).25 E/F3 10
+/Courier@0 SF 6($e)97 560.4 S(cho $\(\(3 + 5 * 32\)\))-6 E(163)97 572.4
+Q F0 -.15(Fo)72 594 S 3.24(ri).15 G(nteracti)-3.24 E 1.04 -.15(ve u)-.25
+H .74(se, Bash implements ksh-style aliases and b).15 F .74
+(uiltins such as)-.2 F F2(fc)3.24 E F0 .74(\(discussed belo)3.24 F .74
+(w\) and)-.25 F F2(jobs)3.24 E F0(.)A .291(Bash aliases allo)72 606 R
+2.791(was)-.25 G .291(tring to be substituted for a command name.)-2.791
+F(The)5.291 E 2.791(yc)-.15 G .291(an be used to create a mnemonic)
+-2.791 F .568(for a)72 618 R/F4 9/Times-Roman@0 SF(UNIX)3.068 E F0 .568
+(command name \()3.068 F F3 .568(alias del=rm)B F0 .568(\), to e)B .567
+(xpand a single w)-.15 F .567(ord to a comple)-.1 F 3.067(xc)-.15 G .567
+(ommand \()-3.067 F F3(alias)A .255
+(news='xterm -g 80x45 -title trn -e trn -e -S1 -N &')72 630 R F0 .255
+(\), or to ensure that a command)B(is in)72 642 Q -.2(vo)-.4 G -.1(ke).2
+G 2.5(dw).1 G(ith a basic set of options \()-2.5 E F3
+(alias ls="/bin/ls -F")A F0(\).)A .293(The C shell \()97 657.6 R F2(csh)
+A F0 .293(\)\207, originally written by Bill Jo)B 2.792(yw)-.1 G .292
+(hile at Berk)-2.792 F(ele)-.1 E 1.592 -.65(y, i)-.15 H 2.792(sw).65 G
+.292(idely used and quite popular)-2.792 F 1.499(for its interacti)72
+669.6 R 1.799 -.15(ve f)-.25 H 3.999(acilities. Bash).05 F 1.499
+(includes a csh-compatible history e)3.999 F 1.5
+(xpansion mechanism \(\231! history\232\),)-.15 F .019(brace e)72 681.6
+R .018(xpansion, access to a stack of directories via the)-.15 F F2
+(pushd)2.518 E F0(,)A F2(popd)2.518 E F0 2.518(,a)C(nd)-2.518 E F2(dirs)
+2.518 E F0 -.2(bu)2.518 G .018(iltins, and tilde e).2 F(xpansion,)-.15 E
+1.293(to generate users' home directories.)72 693.6 R -.35(Ti)6.294 G
+1.294(lde e).35 F 1.294(xpansion has also been adopted by both the K)
+-.15 F 1.294(orn Shell and)-.35 F .32 LW 144 708.2 72 708.2 DL/F5 8
+/Times-Roman@0 SF(\207Morris Bolsk)72 720 Q 2(ya)-.12 G(nd Da)-2 E
+(vid K)-.16 E(orn,)-.28 E/F6 8/Times-Italic@0 SF(The K)2 E
+(ornShell Command and Pr)-.32 E -.08(og)-.36 G -.12(ra).08 G
+(mming Langua).12 E -.08(ge)-.08 G F5 2(,P).08 G(rentice Hall, 1989.)-2
+E EP
+%%Page: 3 3
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF(-3-)282.17 48 Q(POSIX.2.)72 84 Q .148
+(There were certain areas in which POSIX.2 felt standardization w)97
+99.6 R .149(as necessary)-.1 F 2.649(,b)-.65 G .149(ut no e)-2.849 F
+.149(xisting imple-)-.15 F 1.598(mentation pro)72 111.6 R 1.598
+(vided the proper beha)-.15 F(vior)-.2 E 6.598(.T)-.55 G 1.598(he w)
+-6.598 F 1.597(orking group in)-.1 F -.15(ve)-.4 G 1.597
+(nted and standardized functionality in).15 F .674
+(these areas, which Bash implements.)72 123.6 R(The)5.674 E/F1 10
+/Times-Bold@0 SF(command)3.174 E F0 -.2(bu)3.174 G .674(iltin w).2 F
+.674(as in)-.1 F -.15(ve)-.4 G .674
+(nted so that shell functions could be).15 F .996(written to replace b)
+72 135.6 R .996(uiltins; it mak)-.2 F .996(es the capabilities of the b)
+-.1 F .995(uiltin a)-.2 F -.25(va)-.2 G .995(ilable to the function.).25
+F .995(The reserv)5.995 F(ed)-.15 E -.1(wo)72 147.6 S 1.731
+(rd \231!\232 w).1 F 1.731(as added to ne)-.1 F -.05(ga)-.15 G 1.731
+(te the return v).05 F 1.731(alue of a command or pipeline; it w)-.25 F
+1.732(as nearly impossible to)-.1 F -.15(ex)72 159.6 S .286
+(press \231if not x\232 cleanly using the sh language.).15 F .286
+(There e)5.286 F .286(xist multiple incompatible implementations of the)
+-.15 F F1(test)72 171.6 Q F0 -.2(bu)3.163 G .663
+(iltin, which tests \214les for type and other attrib).2 F .664
+(utes and performs arithmetic and string comparisons.)-.2 F .5
+(POSIX considered none of these correct, so the standard beha)72 183.6 R
+.5(vior w)-.2 F .5(as speci\214ed in terms of the number of)-.1 F(ar)72
+195.6 Q .412(guments to the command.)-.18 F .412(POSIX.2 dictates e)
+5.412 F .412(xactly what will happen when four or fe)-.15 F .412(wer ar)
+-.25 F .412(guments are)-.18 F(gi)72 207.6 Q -.15(ve)-.25 G 5.01(nt).15
+G(o)-5.01 E F1(test)5.01 E F0 5.01(,a)C 2.51(nd lea)-5.01 F -.15(ve)-.2
+G 5.01(st).15 G 2.51(he beha)-5.01 F 2.51(vior unde\214ned when more ar)
+-.2 F 2.51(guments are supplied.)-.18 F 2.51(Bash uses the)7.51 F
+(POSIX.2 algorithm, which w)72 219.6 Q(as concei)-.1 E -.15(ve)-.25 G
+2.5(db).15 G 2.5(yD)-2.5 G -.2(av)-2.5 G(id K).2 E(orn.)-.35 E F1 2.5
+(3.1. F)72 243.6 R(eatur)-.25 E(es not in the Bour)-.18 E(ne Shell)-.15
+E F0 .718(There are a number of minor dif)97 259.2 R .719
+(ferences between Bash and the v)-.25 F .719
+(ersion of sh present on most other)-.15 F -.15(ve)72 271.2 S .874
+(rsions of).15 F/F2 9/Times-Roman@0 SF(UNIX)3.374 E F0 5.873(.T)C .873
+(he majority of these are due to the POSIX standard, b)-5.873 F .873
+(ut some are the result of Bash)-.2 F .386
+(adopting features from other shells.)72 283.2 R -.15(Fo)5.386 G 2.886
+(ri).15 G .386(nstance, Bash includes the ne)-2.886 F 2.886<7799>-.25 G
+.386(!\232 reserv)-2.886 F .386(ed w)-.15 F .386(ord, the)-.1 F F1
+(command)2.886 E F0 -.2(bu)72 295.2 S .116(iltin, the ability of the).2
+F F1 -.18(re)2.616 G(ad).18 E F0 -.2(bu)2.615 G .115
+(iltin to correctly return a line ending with a backslash, symbolic ar)
+.2 F(guments)-.18 E .798(to the)72 307.2 R F1(umask)3.298 E F0 -.2(bu)
+3.298 G .798(iltin, v).2 F .798(ariable substring remo)-.25 F -.25(va)
+-.15 G .798(l, a w).25 F .799(ay to get the length of a v)-.1 F .799
+(ariable, and the ne)-.25 F 3.299(wa)-.25 G(lgo-)-3.299 E(rithm for the)
+72 319.2 Q F1(test)2.5 E F0 -.2(bu)2.5 G
+(iltin from the POSIX.2 standard, none of which appear in sh.).2 E 1.225
+(Bash also implements the \231$\(...\)\232 command substitution syntax,\
+ which supersedes the sh `...` con-)97 334.8 R 2.851(struct. The)72
+346.8 R .351(\231$\(...\)\232 construct e)2.851 F .351(xpands to the ou\
+tput of the command contained within the parentheses, with)-.15 F .664
+(trailing ne)72 358.8 R .664(wlines remo)-.25 F -.15(ve)-.15 G 3.164
+(d. The).15 F .664(sh syntax is accepted for backw)3.164 F .664
+(ards compatibility)-.1 F 3.164(,b)-.65 G .664
+(ut the \231$\(...\)\232 form is)-3.364 F(preferred because its quoting\
+ rules are much simpler and it is easier to nest.)72 370.8 Q .772
+(The Bourne shell does not pro)97 386.4 R .772
+(vide such features as brace e)-.15 F .772
+(xpansion, the ability to de\214ne a v)-.15 F(ariable)-.25 E .283
+(and a function with the same name, local v)72 398.4 R .282
+(ariables in shell functions, the ability to enable and disable indi-)
+-.25 F .547(vidual b)72 410.4 R .547
+(uiltins or write a function to replace a b)-.2 F .547
+(uiltin, or a means to e)-.2 F .547
+(xport a shell function to a child pro-)-.15 F(cess.)72 422.4 Q .32
+(Bash has closed a long-standing shell security hole by not using the)97
+438 R F1($IFS)2.82 E F0 -.25(va)2.82 G .32(riable to split each w).25 F
+(ord)-.1 E 1.254(read by the shell, b)72 450 R 1.254
+(ut splitting only the results of e)-.2 F 1.255
+(xpansion \(ksh and the 4.4 BSD sh ha)-.15 F 1.555 -.15(ve \214)-.2 H
+-.15(xe).15 G 3.755(dt).15 G 1.255(his as)-3.755 F 2.907(well\). Useful)
+72 462 R(beha)2.907 E .407(vior such as a means to abort e)-.2 F -.15
+(xe)-.15 G .407(cution of a script read with the \231.).15 F 2.906<9a63>
+-.7 G .406(ommand using the)-2.906 F F1 -.18(re)72 474 S(tur).18 E(n)
+-.15 E F0 -.2(bu)2.742 G .242(iltin or automatically e).2 F .242
+(xporting v)-.15 F .243(ariables in the shell')-.25 F 2.743(se)-.55 G
+-.4(nv)-2.743 G .243(ironment to children is also not present).4 F .969
+(in the Bourne shell.)72 486 R .968(Bash pro)5.968 F .968
+(vides a much more po)-.15 F .968(werful en)-.25 F .968
+(vironment for both interacti)-.4 F 1.268 -.15(ve u)-.25 H .968
+(se and pro-).15 F(gramming.)72 498 Q F1 2.5(4. Bash-speci\214c)72 522 R
+-.25(Fe)2.5 G(atur).25 E(es)-.18 E F0 .491(This section details a fe)97
+537.6 R 2.991(wo)-.25 G 2.991(ft)-2.991 G .491(he features which mak)
+-2.991 F 2.991(eB)-.1 G .491(ash unique.)-2.991 F .492(Most of them pro)
+5.491 F .492(vide impro)-.15 F -.15(ve)-.15 G(d).15 E(interacti)72 549.6
+Q 1.182 -.15(ve u)-.25 H .882(se, b).15 F .882(ut a fe)-.2 F 3.382(wp)
+-.25 G .882(rogramming impro)-3.382 F -.15(ve)-.15 G .882
+(ments are present as well.).15 F .882(Full descriptions of these fea-)
+5.882 F(tures can be found in the Bash documentation.)72 561.6 Q F1 2.5
+(4.1. Startup)72 585.6 R(Files)2.5 E F0 .161(Bash e)97 601.2 R -.15(xe)
+-.15 G .161(cutes startup \214les dif).15 F .161
+(ferently than other shells.)-.25 F .162(The Bash beha)5.161 F .162
+(vior is a compromise between)-.2 F .29
+(the csh principle of startup \214les with \214x)72 613.2 R .29
+(ed names e)-.15 F -.15(xe)-.15 G .29
+(cuted for each shell and the sh \231minimalist\232 beha).15 F(vior)-.2
+E(.)-.55 E 2.955(An interacti)72 625.2 R 3.255 -.15(ve i)-.25 H 2.955
+(nstance of Bash started as a login shell reads and e).15 F -.15(xe)-.15
+G(cutes).15 E/F3 10/Times-Italic@0 SF(~/.bash_pr)5.456 E(o\214le)-.45 E
+F0 2.956(\(the \214le)5.456 F .954(.bash_pro\214le in the user')72 637.2
+R 3.454(sh)-.55 G .953(ome directory\), if it e)-3.454 F 3.453
+(xists. An)-.15 F(interacti)3.453 E 1.253 -.15(ve n)-.25 H .953
+(on-login shell reads and e).15 F -.15(xe)-.15 G(cutes).15 E F3
+(~/.bashr)72 649.2 Q(c)-.37 E F0 5.641(.A)C(non-interacti)-2.5 E .942
+-.15(ve s)-.25 H .642(hell \(one be).15 F .642(gun to e)-.15 F -.15(xe)
+-.15 G .642(cute a shell script, for e).15 F .642
+(xample\) reads no \214x)-.15 F .642(ed startup)-.15 F .342(\214le, b)72
+661.2 R .342(ut uses the v)-.2 F .342(alue of the v)-.25 F(ariable)-.25
+E F1($ENV)2.842 E F0 2.841(,i)C 2.841(fs)-2.841 G .341
+(et, as the name of a startup \214le.)-2.841 F .341
+(The ksh practice of read-)5.341 F(ing)72 673.2 Q F1($ENV)3.114 E F0
+.614(for e)3.114 F -.15(ve)-.25 G .614(ry shell, with the accompan).15 F
+.615(ying dif)-.15 F .615(\214culty of de\214ning the proper v)-.25 F
+.615(ariables and functions)-.25 F .721(for interacti)72 685.2 R 1.021
+-.15(ve a)-.25 H .721(nd non-interacti).15 F 1.021 -.15(ve s)-.25 H .721
+(hells or ha).15 F .721(ving the \214le read only for interacti)-.2 F
+1.02 -.15(ve s)-.25 H .72(hells, w).15 F .72(as considered)-.1 F .158
+(too comple)72 697.2 R 2.658(x. Ease)-.15 F .158(of use w)2.658 F .158
+(on out here.)-.1 F(Interestingly)5.158 E 2.658(,t)-.65 G .158(he ne)
+-2.658 F .159(xt release of ksh will change to reading)-.15 F F1($ENV)
+2.659 E .32 LW 144 705.2 72 705.2 DL/F4 8/Times-Roman@0 SF .559
+(\207Bill Jo)72 717 R 1.599 -.52(y, A)-.08 H 2.559(nI).52 G .559
+(ntroduction to the C Shell,)-2.559 F/F5 8/Times-Italic@0 SF .558
+(UNIX User')2.558 F 2.558(sS)-.32 G .558(upplementary Documents)-2.558 F
+F4 2.558(,U)C(ni)-2.558 E -.12(ve)-.2 G .558(rsity of California at).12
+F(Berk)72 727 Q(ele)-.08 E 1.04 -.52(y, 1)-.12 H(986.).52 E EP
+%%Page: 4 4
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF(-4-)282.17 48 Q(only for interacti)72 84 Q .3
+-.15(ve s)-.25 H(hells.).15 E/F1 10/Times-Bold@0 SF 2.5(4.2. New)72 108
+R(Builtin Commands)2.5 E F0 1.02(There are a fe)97 123.6 R 3.52(wb)-.25
+G 1.02(uiltins which are ne)-3.72 F 3.52(wo)-.25 G 3.52(rh)-3.52 G -2.25
+-.2(av e)-3.52 H 1.02(been e)3.72 F 1.02(xtended in Bash.)-.15 F(The)
+6.02 E F1(enable)3.52 E F0 -.2(bu)3.52 G 1.02(iltin allo).2 F(ws)-.25 E
+-.2(bu)72 135.6 S .824(iltin commands to be turned on and of).2 F 3.324
+(fa)-.25 G(rbitrarily)-3.324 E 5.824(.T)-.65 G 3.324(ou)-6.624 G .824
+(se the v)-3.324 F .824(ersion of)-.15 F/F2 10/Times-Italic@0 SF(ec)
+3.324 E(ho)-.15 E F0 .825(found in a user')3.324 F 3.325(ss)-.55 G
+(earch)-3.325 E .625(path rather than the Bash b)72 147.6 R(uiltin,)-.2
+E/F3 10/Courier@0 SF .625(enable -n echo)3.125 F F0(suf)3.125 E 3.125
+(\214ces. The)-.25 F F1(help)3.124 E F0 -.2(bu)3.124 G .624(iltin pro).2
+F .624(vides quick synopses)-.15 F .703(of the shell f)72 159.6 R .704
+(acilities without requiring access to a manual page.)-.1 F F1(Builtin)
+5.704 E F0 .704(is similar to)3.204 F F1(command)3.204 E F0 .704
+(in that it)3.204 F .342(bypasses shell functions and directly e)72
+171.6 R -.15(xe)-.15 G .342(cutes b).15 F .342(uiltin commands.)-.2 F
+.342(Access to a csh-style stack of directories)5.342 F .072(is pro)72
+183.6 R .073(vided via the)-.15 F F1(pushd)2.573 E F0(,)A F1(popd)2.573
+E F0 2.573(,a)C(nd)-2.573 E F1(dirs)2.573 E F0 -.2(bu)2.573 G(iltins.).2
+E F1(Pushd)5.073 E F0(and)2.573 E F1(popd)2.573 E F0 .073
+(insert and remo)2.573 F .373 -.15(ve d)-.15 H .073(irectories from the)
+.15 F 2.858(stack, respecti)72 195.6 R -.15(ve)-.25 G(ly).15 E 5.358(,a)
+-.65 G(nd)-5.358 E F1(dirs)5.358 E F0 2.858(lists the stack contents.)
+5.358 F 2.858(On systems that allo)7.858 F 5.358<778c>-.25 G 2.857
+(ne-grained control of)-5.358 F 1.339(resources, the)72 207.6 R F1
+(ulimit)3.839 E F0 -.2(bu)3.839 G 1.339
+(iltin can be used to tune these settings.).2 F F1(Ulimit)6.34 E F0
+(allo)3.84 E 1.34(ws a user to control, among)-.25 F 1.086
+(other things, whether core dumps are to be generated, ho)72 219.6 R
+3.586(wm)-.25 G 1.086(uch memory the shell or a child process is)-3.586
+F(allo)72 231.6 Q .496(wed to allocate, and ho)-.25 F 2.996(wl)-.25 G
+(ar)-2.996 E .496(ge a \214le created by a child process can gro)-.18 F
+4.296 -.65(w. T)-.25 H(he).65 E F1(suspend)2.996 E F0 .497(command will)
+2.997 F .744(stop the shell process when job control is acti)72 243.6 R
+-.15(ve)-.25 G 3.243(;m).15 G .743(ost other shells do not allo)-3.243 F
+3.243(wt)-.25 G(hemselv)-3.243 E .743(es to be stopped)-.15 F(lik)72
+255.6 Q 2.717(et)-.1 G(hat.)-2.717 E F1 -.74(Ty)5.217 G(pe,).74 E F0
+.217(the Bash answer to)2.717 F F1(which)2.717 E F0(and)2.717 E F1
+(whence,)2.717 E F0(sho)2.717 E .218(ws what will happen when a w)-.25 F
+.218(ord is typed as a)-.1 F(command:)72 267.6 Q F3 6($t)97 285.6 S
+(ype export)-6 E(export is a shell builtin)97 297.6 Q 6($t)97 309.6 S
+(ype -t export)-6 E(builtin)97 321.6 Q 6($t)97 333.6 S(ype bash)-6 E
+(bash is /bin/bash)97 345.6 Q 6($t)97 357.6 S(ype cd)-6 E
+(cd is a function)97 369.6 Q(cd \(\))97 381.6 Q({)97 393.6 Q
+(builtin cd ${1+"$@"} && xtitle $HOST: $PWD)121 405.6 Q(})97 417.6 Q F0
+-1.11(Va)72 439.2 S .682(rious modes tell what a command w)1.11 F .681
+(ord is \(reserv)-.1 F .681(ed w)-.15 F .681(ord, alias, function, b)-.1
+F .681(uiltin, or \214le\) or which v)-.2 F(er)-.15 E(-)-.2 E 1.15
+(sion of a command will be e)72 451.2 R -.15(xe)-.15 G 1.15
+(cuted based on a user').15 F 3.65(ss)-.55 G 1.15(earch path.)-3.65 F
+1.15(Some of this functionality has been)6.15 F
+(adopted by POSIX.2 and folded into the)72 463.2 Q F1(command)2.5 E F0
+(utility)2.5 E(.)-.65 E F1 2.5(4.3. Editing)72 487.2 R(and Completion)
+2.5 E F0 .682(One area in which Bash shines is command line editing.)97
+502.8 R .682(Bash uses the)5.682 F F2 -.37(re)3.182 G(adline).37 E F0
+.681(library to read and)3.181 F .942(edit lines when interacti)72 514.8
+R -.15(ve)-.25 G 5.942(.R).15 G .942(eadline is a po)-5.942 F .942
+(werful and \215e)-.25 F .942(xible input f)-.15 F .943
+(acility that a user can con\214gure to)-.1 F(indi)72 526.8 Q .732
+(vidual tastes.)-.25 F .732(It allo)5.732 F .732(ws lines to be edited \
+using either emacs or vi commands, where those commands)-.25 F .2
+(are appropriate.)72 538.8 R .2
+(The full capability of emacs is not present \255 there is no w)5.2 F .2
+(ay to e)-.1 F -.15(xe)-.15 G .2(cute a named command).15 F 1.15
+(with M-x, for instance \255 b)72 550.8 R 1.15(ut the e)-.2 F 1.149
+(xisting commands are more than adequate.)-.15 F 1.149
+(The vi mode is compliant)6.149 F
+(with the command line editing standardized by POSIX.2.)72 562.8 Q 1.69
+(Readline is fully customizable.)97 578.4 R 1.691
+(In addition to the basic commands and k)6.69 F 1.991 -.15(ey b)-.1 H
+1.691(indings, the library).15 F(allo)72 590.4 Q .028
+(ws users to de\214ne additional k)-.25 F .327 -.15(ey b)-.1 H .027
+(indings using a startup \214le.).15 F(The)5.027 E F2(inputr)2.527 E(c)
+-.37 E F0 .027(\214le, which def)2.527 F .027(aults to the \214le)-.1 F
+F2(~/.inputr)72 602.4 Q(c)-.37 E F0 3.002(,i)C 3.002(sr)-3.002 G .503(e\
+ad each time readline initializes, permitting users to maintain a consi\
+stent interf)-3.002 F .503(ace across a)-.1 F .893(set of programs.)72
+614.4 R .893(Readline includes an e)5.893 F .893(xtensible interf)-.15 F
+.892(ace, so each program using the library can add its)-.1 F -.25(ow)72
+626.4 S 3.56(nb).25 G 1.06(indable commands and program-speci\214c k)
+-3.56 F 1.361 -.15(ey b)-.1 H 3.561(indings. Bash).15 F 1.061
+(uses this f)3.561 F 1.061(acility to add bindings that)-.1 F
+(perform history e)72 638.4 Q(xpansion or shell w)-.15 E(ord e)-.1 E
+(xpansions on the current input line.)-.15 E .707
+(Readline interprets a number of v)97 654 R .706
+(ariables which further tune its beha)-.25 F(vior)-.2 E 5.706(.V)-.55 G
+.706(ariables e)-6.816 F .706(xist to control)-.15 F .157
+(whether or not eight-bit characters are directly read as input or con)
+72 666 R -.15(ve)-.4 G .158(rted to meta-pre\214x).15 F .158(ed k)-.15 F
+.458 -.15(ey s)-.1 H .158(equences \(a).15 F(meta-pre\214x)72 678 Q .082
+(ed k)-.15 F .382 -.15(ey s)-.1 H .081(equence consists of the characte\
+r with the eighth bit zeroed, preceded by the).15 F F2(meta-pr)2.581 E
+(e\214x)-.37 E F0(character)72 690 Q 3.233(,u)-.4 G .733
+(sually escape, which selects an alternate k)-3.233 F -.15(ey)-.1 G .734
+(map\), to decide whether to output characters with).15 F .624
+(the eighth bit set directly or as a meta-pre\214x)72 702 R .624(ed k)
+-.15 F .924 -.15(ey s)-.1 H .623
+(equence, whether or not to wrap to a ne).15 F 3.123(ws)-.25 G .623
+(creen line)-3.123 F 1.196
+(when a line being edited is longer than the screen width, the k)72 714
+R -.15(ey)-.1 G 1.196(map to which subsequent k).15 F 1.496 -.15(ey b)
+-.1 H(indings).15 E .531(should apply)72 726 R 3.031(,o)-.65 G 3.031(re)
+-3.031 G -.15(ve)-3.281 G 3.031(nw).15 G .531
+(hat happens when readline w)-3.031 F .531(ants to ring the terminal')
+-.1 F 3.03(sb)-.55 G 3.03(ell. All)-3.03 F .53(of these v)3.03 F
+(ariables)-.25 E EP
+%%Page: 5 5
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF(-5-)282.17 48 Q
+(can be set in the inputrc \214le.)72 84 Q .284
+(The startup \214le understands a set of C preprocessor)97 99.6 R(-lik)
+-.2 E 2.785(ec)-.1 G .285(onditional constructs which allo)-2.785 F
+2.785(wv)-.25 G(ariables)-3.035 E .12(or k)72 111.6 R .42 -.15(ey b)-.1
+H .119(indings to be assigned based on the application using readline, \
+the terminal currently being used, or).15 F .338(the editing mode.)72
+123.6 R .338(Users can add program-speci\214c bindings to mak)5.338 F
+2.838(et)-.1 G .338(heir li)-2.838 F -.15(ve)-.25 G 2.838(se).15 G 2.838
+(asier: I)-2.838 F(ha)2.838 E .639 -.15(ve b)-.2 H .339(indings that).15
+F(let me edit the v)72 135.6 Q(alue of)-.25 E/F1 10/Times-Bold@0 SF($P)
+2.5 E -.95(AT)-.74 G(H).95 E F0(and double-quote the current or pre)2.5
+E(vious w)-.25 E(ord:)-.1 E/F2 10/Courier@0 SF 6(#M)97 153.6 S
+(acros that are convenient for shell interaction)-6 E($if Bash)97 165.6
+Q 6(#e)97 177.6 S(dit the path)-6 E
+("\\C-xp": "PATH=${PATH}\\e\\C-e\\C-a\\ef\\C-f")97 189.6 Q 6(#p)97 201.6
+S(repare to type a quoted word -- insert open and close double)-6 E 6
+(#q)97 213.6 S(uotes and move to just after the open quote)-6 E
+("\\C-x\\"": "\\"\\"\\C-b")97 225.6 Q 6(#Q)97 237.6 S
+(uote the current or previous word)-6 E("\\C-xq": "\\eb\\"\\ef\\"")97
+249.6 Q($endif)97 261.6 Q F0 .322(There is a readline command to re-rea\
+d the \214le, so users can edit the \214le, change some bindings, and b\
+e)72 283.2 R(gin)-.15 E(to use them almost immediately)72 295.2 Q(.)-.65
+E .851(Bash implements the)97 310.8 R F1(bind)3.351 E F0 -.2(bu)3.351 G
+.851(iltin for more dyamic control of readline than the startup \214le \
+permits.).2 F F1(Bind)72 322.8 Q F0 .25(is used in se)2.75 F -.15(ve)
+-.25 G .25(ral w).15 F 2.75(ays. In)-.1 F/F3 10/Times-Italic@0 SF(list)
+2.75 E F0 .25(mode, it can display the current k)2.75 F .55 -.15(ey b)
+-.1 H .25(indings, list all the readline edit-).15 F .149(ing directi)72
+334.8 R -.15(ve)-.25 G 2.649(sa).15 G -.25(va)-2.849 G .149
+(ilable for binding, list which k).25 F -.15(ey)-.1 G 2.649(si).15 G
+-1.9 -.4(nv o)-2.649 H .349 -.1(ke a g).4 H -2.15 -.25(iv e).1 H 2.65
+(nd).25 G(irecti)-2.65 E -.15(ve)-.25 G 2.65(,o).15 G 2.65(ro)-2.65 G
+.15(utput the current set of k)-2.65 F -.15(ey)-.1 G .042(bindings in a\
+ format that can be incorporated directly into an inputrc \214le.)72
+346.8 R(In)5.041 E F3(batc)2.541 E(h)-.15 E F0 .041
+(mode, it reads a series of)2.541 F -.1(ke)72 358.8 S 2.858(yb)-.05 G
+.359(indings directly from a \214le and passes them to readline.)-2.858
+F .359(In its most common usage,)5.359 F F1(bind)2.859 E F0(tak)2.859 E
+.359(es a sin-)-.1 F 1.117(gle string and passes it directly to readlin\
+e, which interprets the line as if it had just been read from the)72
+370.8 R(inputrc \214le.)72 382.8 Q(Both k)5 E .3 -.15(ey b)-.1 H
+(indings and v).15 E(ariable assignments may appear in the string gi)
+-.25 E -.15(ve)-.25 G 2.5(nt).15 G(o)-2.5 E F1(bind)2.5 E F0(.)A .53
+(The readline library also pro)97 398.4 R .53(vides an interf)-.15 F .53
+(ace for)-.1 F F3(wor)3.03 E 3.03(dc)-.37 G(ompletion)-3.03 E F0 5.53
+(.W)C .53(hen the)-5.53 F F3(completion)3.03 E F0(character)3.03 E 1.261
+(\(usually T)72 410.4 R 1.261(AB\) is typed, readline looks at the w)
+-.93 F 1.26(ord currently being entered and computes the set of \214le-)
+-.1 F .523(names of which the current w)72 422.4 R .523(ord is a v)-.1 F
+.523(alid pre\214x.)-.25 F .524
+(If there is only one possible completion, the rest of the)5.523 F .358
+(characters are inserted directly)72 434.4 R 2.858(,o)-.65 G .358(therw\
+ise the common pre\214x of the set of \214lenames is added to the curre\
+nt)-2.858 F -.1(wo)72 446.4 S 3.199(rd. A).1 F .699(second T)3.199 F
+.699(AB character entered immediately after a non-unique completion cau\
+ses readline to list)-.93 F 1.814
+(the possible completions; there is an option to ha)72 458.4 R 2.113
+-.15(ve t)-.2 H 1.813(he list displayed immediately).15 F 6.813(.R)-.65
+G 1.813(eadline pro)-6.813 F(vides)-.15 E .482
+(hooks so that applications can pro)72 470.4 R .482
+(vide speci\214c types of completion before the def)-.15 F .483
+(ault \214lename completion)-.1 F .132(is attempted.)72 482.4 R .132
+(This is quite \215e)5.132 F .132
+(xible, though it is not completely user)-.15 F 2.632
+(-programmable. Bash,)-.2 F .132(for e)2.632 F .132(xample, can)-.15 F
+.37(complete \214lenames, command names \(including aliases, b)72 494.4
+R .37(uiltins, shell reserv)-.2 F .37(ed w)-.15 F .37
+(ords, shell functions, and)-.1 F -.15(exe)72 506.4 S .424
+(cutables found in the \214le system\), shell v).15 F .424
+(ariables, usernames, and hostnames.)-.25 F .423
+(It uses a set of heuristics)5.424 F(that, while not perfect, is genera\
+lly quite good at determining what type of completion to attempt.)72
+518.4 Q F1 2.5(4.4. History)72 542.4 R F0 .144
+(Access to the list of commands pre)97 558 R .144(viously entered \(the)
+-.25 F F3 .144(command history)2.644 F F0 2.644(\)i)C 2.644(sp)-2.644 G
+(ro)-2.644 E .144(vided jointly by Bash)-.15 F .078
+(and the readline library)72 570 R 5.077(.B)-.65 G .077(ash pro)-5.077 F
+.077(vides v)-.15 F .077(ariables \()-.25 F F1($HISTFILE)A F0(,)A F1
+($HISTSIZE)2.577 E F0 2.577(,a)C(nd)-2.577 E F1($HISTCONTR)2.577 E(OL)
+-.3 E F0 2.577(\)a)C(nd)-2.577 E(the)72 582 Q F1(history)2.89 E F0(and)
+2.89 E F1(fc)2.89 E F0 -.2(bu)2.89 G .39
+(iltins to manipulate the history list.).2 F .391(The v)5.391 F .391
+(alue of)-.25 F F1($HISTFILE)2.891 E F0 .391(specifes the \214le where)
+2.891 F .49(Bash writes the command history on e)72 594 R .489
+(xit and reads it on startup.)-.15 F F1($HISTSIZE)5.489 E F0 .489
+(is used to limit the number)2.989 F .642(of commands sa)72 606 R -.15
+(ve)-.2 G 3.142(di).15 G 3.142(nt)-3.142 G .642(he history)-3.142 F(.)
+-.65 E F1($HISTCONTR)5.642 E(OL)-.3 E F0(pro)3.142 E .642
+(vides a crude form of control o)-.15 F -.15(ve)-.15 G 3.142(rw).15 G
+.642(hich com-)-3.142 F .025(mands are sa)72 618 R -.15(ve)-.2 G 2.525
+(do).15 G 2.525(nt)-2.525 G .025(he history list: a v)-2.525 F .025
+(alue of)-.25 F F3(ignor)2.525 E(espace)-.37 E F0 .025(means to not sa)
+2.525 F .324 -.15(ve c)-.2 H .024(ommands which be).15 F .024
+(gin with a)-.15 F .927(space; a v)72 630 R .927(alue of)-.25 F F3
+(ignor)3.427 E(edups)-.37 E F0 .927(means to not sa)3.427 F 1.228 -.15
+(ve c)-.2 H .928(ommands identical to the last command sa).15 F -.15(ve)
+-.2 G(d.).15 E F1($HIST)5.928 E(-)-.92 E(CONTR)72 642 Q(OL)-.3 E F0 -.1
+(wa)3.778 G 3.778(sn).1 G(amed)-3.778 E F1($history_contr)3.778 E(ol)
+-.18 E F0 1.278(in earlier v)3.778 F 1.278
+(ersions of Bash; the old name is still accepted for)-.15 F(backw)72 654
+Q .575(ards compatibility)-.1 F 5.575(.T)-.65 G(he)-5.575 E F1(history)
+3.075 E F0 .575
+(command can read or write \214les containing the history list and dis-)
+3.075 F .167(play the current list contents.)72 666 R(The)5.167 E F1(fc)
+2.667 E F0 -.2(bu)2.667 G .167(iltin, adopted from POSIX.2 and the K).2
+F .167(orn Shell, allo)-.35 F .167(ws display and)-.25 F(re-e)72 678 Q
+-.15(xe)-.15 G .58
+(cution, with optional editing, of commands from the history list.).15 F
+.58(The readline library of)5.58 F .58(fers a set of)-.25 F 1.255(comma\
+nds to search the history list for a portion of the current input line \
+or a string typed by the user)72 690 R(.)-.55 E(Finally)72 702 Q 2.535
+(,t)-.65 G(he)-2.535 E F3(history)2.535 E F0(library)2.535 E 2.535(,g)
+-.65 G .036(enerally incorporated directly into the readline library)
+-2.535 F 2.536(,i)-.65 G .036(mplements a f)-2.536 F .036(acility for)
+-.1 F 1.023(history recall, e)72 714 R 1.022(xpansion, and re-e)-.15 F
+-.15(xe)-.15 G 1.022(cution of pre).15 F 1.022(vious commands v)-.25 F
+1.022(ery similar to csh \(\231bang history\232, so)-.15 F
+(called because the e)72 726 Q
+(xclamation point introduces a history substitution\):)-.15 E EP
+%%Page: 6 6
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF(-6-)282.17 48 Q/F1 10/Courier@0 SF 6($e)97 84 S
+(cho a b c d e)-6 E 6(abcde)97 96 S 6($!)97 108 S 6(!fghi)-6 G
+(echo a b c d e f g h i)97 120 Q 6(abcdefghi)97 132 S 6($!)97 144 S(-2)
+-6 E(echo a b c d e)97 156 Q 6(abcde)97 168 S 6($e)97 180 S(cho !-2:1-4)
+-6 E(echo a b c d)97 192 Q 6(abcd)97 204 S F0 1.456
+(The command history is only sa)72 225.6 R -.15(ve)-.2 G 3.957(dw).15 G
+1.457(hen the shell is interacti)-3.957 F -.15(ve)-.25 G 3.957(,s).15 G
+3.957(oi)-3.957 G 3.957(ti)-3.957 G 3.957(sn)-3.957 G 1.457(ot a)-3.957
+F -.25(va)-.2 G 1.457(ilable for use by shell).25 F(scripts.)72 237.6 Q
+/F2 10/Times-Bold@0 SF 2.5(4.5. New)72 261.6 R(Shell V)2.5 E(ariables)
+-.92 E F0 .59(There are a number of con)97 277.2 R -.15(ve)-.4 G .589
+(nience v).15 F .589(ariables that Bash interprets to mak)-.25 F 3.089
+(el)-.1 G .589(ife easier)-3.089 F 5.589(.T)-.55 G .589(hese include)
+-5.589 F F2(FIGNORE)72 289.2 Q F0 3.973(,w)C 1.473
+(hich is a set of \214lename suf)-3.973 F<8c78>-.25 E 1.474
+(es identifying \214les to e)-.15 F 1.474
+(xclude when completing \214lenames;)-.15 F F2(HOSTTYPE)72 301.2 Q F0
+2.932(,w)C .432
+(hich is automatically set to a string describing the type of hardw)
+-2.932 F .431(are on which Bash is cur)-.1 F(-)-.2 E .335(rently e)72
+313.2 R -.15(xe)-.15 G(cuting;).15 E F2(command_oriented_history)2.835 E
+F0 2.835(,w)C .335(hich directs Bash to sa)-2.835 F .635 -.15(ve a)-.2 H
+.336(ll lines of a multiple-line com-).15 F 1.071(mand such as a)72
+325.2 R/F3 10/Times-Italic@0 SF(while)3.571 E F0(or)3.571 E F3(for)3.571
+E F0 1.071(loop in a single history entry)3.571 F 3.57(,a)-.65 G(llo)
+-3.57 E 1.07(wing easy re-editing; and)-.25 F F2(IGNOREEOF)3.57 E F0(,)A
+.747(whose v)72 337.2 R .747(alue indicates the number of consecuti)-.25
+F 1.047 -.15(ve E)-.25 H .747(OF characters that an interacti).15 F
+1.048 -.15(ve s)-.25 H .748(hell will read before).15 F -.15(ex)72 349.2
+S 1.432(iting \255 an easy w).15 F 1.432(ay to k)-.1 F 1.432
+(eep yourself from being logged out accidentally)-.1 F 6.432(.T)-.65 G
+(he)-6.432 E F2(auto_r)3.932 E(esume)-.18 E F0 -.25(va)3.932 G(riable)
+.25 E .571(alters the w)72 361.2 R .571
+(ay the shell treats simple command names: if job control is acti)-.1 F
+-.15(ve)-.25 G 3.071(,a).15 G .571(nd this v)-3.071 F .571
+(ariable is set, sin-)-.25 F(gle-w)72 373.2 Q .239(ord simple commands \
+without redirections cause the shell to \214rst look for and restart a \
+suspended job)-.1 F(with that name before starting a ne)72 385.2 Q 2.5
+(wp)-.25 G(rocess.)-2.5 E F2 2.5(4.6. Brace)72 409.2 R(Expansion)2.5 E
+F0 .653(Since sh of)97 424.8 R .653(fers no con)-.25 F -.15(ve)-.4 G
+.653(nient w).15 F .653
+(ay to generate arbitrary strings that share a common pre\214x or suf)
+-.1 F<8c78>-.25 E 2.124(\(\214lename e)72 436.8 R 2.124
+(xpansion requires that the \214lenames e)-.15 F 2.123
+(xist\), Bash implements)-.15 F F3(br)4.623 E 2.123(ace e)-.15 F
+(xpansion)-.2 E F0 4.623(,ac)C(apability)-4.623 E(pick)72 448.8 Q .773
+(ed up from csh.)-.1 F .774(Brace e)5.773 F .774
+(xpansion is similar to \214lename e)-.15 F .774(xpansion, b)-.15 F .774
+(ut the strings generated need not)-.2 F 1.211(correspond to e)72 460.8
+R 1.211(xisting \214les.)-.15 F 3.711(Ab)6.211 G 1.211(race e)-3.711 F
+1.211(xpression consists of an optional)-.15 F F3(pr)3.71 E(eamble)-.37
+E F0 3.71(,f)C(ollo)-3.71 E 1.21(wed by a pair of)-.25 F 2.938
+(braces enclosing a series of comma-separated strings, and an optional)
+72 472.8 R F3(postamble)5.438 E F0 7.938(.T)C 2.938(he preamble is)
+-7.938 F(prepended to each string within the braces, and the postamble \
+is then appended to each resulting string:)72 484.8 Q F1 6($e)97 502.8 S
+(cho a{d,c,b}e)-6 E(ade ace abe)97 514.8 Q F0 .306(As this e)72 536.4 R
+.306(xample demonstrates, the results of brace e)-.15 F .305
+(xpansion are not sorted, as the)-.15 F 2.805(ya)-.15 G .305
+(re by \214lename e)-2.805 F(xpan-)-.15 E(sion.)72 548.4 Q F2 2.5
+(4.7. Pr)72 572.4 R(ocess Substitution)-.18 E F0 .457
+(On systems that can support it, Bash pro)97 588 R .457(vides a f)-.15 F
+.457(acility kno)-.1 F .458(wn as)-.25 F F3(pr)2.958 E .458
+(ocess substitution)-.45 F F0 5.458(.P)C .458(rocess sub-)-5.458 F .347
+(stitution is similar to command substitution in that its speci\214cati\
+on includes a command to e)72 600 R -.15(xe)-.15 G .346(cute, b).15 F
+.346(ut the)-.2 F .181(shell does not collect the command')72 612 R
+2.681(so)-.55 G .181(utput and insert it into the command line.)-2.681 F
+(Rather)5.181 E 2.681(,B)-.4 G .182(ash opens a pipe)-2.681 F 1.861
+(to the command, which is run in the background.)72 624 R 1.861
+(The shell uses named pipes \(FIFOs\) or the)6.861 F F3(/de)4.361 E
+(v/fd)-.15 E F0 .961(method of naming open \214les to e)72 636 R .962(x\
+pand the process substitution to a \214lename which connects to the pip\
+e)-.15 F .104(when opened.)72 648 R .103
+(This \214lename becomes the result of the e)5.104 F 2.603
+(xpansion. Process)-.15 F .103(substitution can be used to com-)2.603 F
+(pare the outputs of tw)72 660 Q 2.5(od)-.1 G(if)-2.5 E(ferent v)-.25 E
+(ersions of an application as part of a re)-.15 E(gression test:)-.15 E
+F1 6($c)97 678 S(mp <\(old_prog\) <\(new_prog\))-6 E EP
+%%Page: 7 7
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF(-7-)282.17 48 Q/F1 10/Times-Bold@0 SF 2.5
+(4.8. Pr)72 84 R(ompt Customization)-.18 E F0 2.229
+(One of the more popular interacti)97 99.6 R 2.529 -.15(ve f)-.25 H
+2.229(eatures that Bash pro).15 F 2.23
+(vides is the ability to customize the)-.15 F 3.234(prompt. Both)72
+111.6 R F1($PS1)3.234 E F0(and)3.234 E F1($PS2,)3.234 E F0 .734
+(the primary and secondary prompts, are e)3.234 F .733
+(xpanded before being displayed.)-.15 F -.15(Pa)72 123.6 S .804
+(rameter and v).15 F .804(ariable e)-.25 F .805
+(xpansion is performed when the prompt string is e)-.15 F .805
+(xpanded, so an)-.15 F 3.305(ys)-.15 G .805(hell v)-3.305 F(ariable)-.25
+E .729(can be put into the prompt \(e.g.,)72 135.6 R F1($SHL)3.228 E(VL)
+-.92 E F0 3.228(,w)C .728(hich indicates ho)-3.228 F 3.228(wd)-.25 G
+.728(eeply the current shell is nested\).)-3.228 F(Bash)5.728 E 1.895(s\
+pecially interprets characters in the prompt string preceded by a backs\
+lash.)72 147.6 R 1.895(Some of these backslash)6.895 F .874
+(escapes are replaced with the current time, the date, the current w)72
+159.6 R .874(orking directory)-.1 F 3.373(,t)-.65 G .873
+(he username, and the)-3.373 F .78
+(command number or history number of the command being entered.)72 171.6
+R .781(There is e)5.781 F -.15(ve)-.25 G 3.281(nab).15 G .781
+(ackslash escape to)-3.281 F .007
+(cause the shell to change its prompt when running as root after an)72
+183.6 R/F2 10/Times-Italic@0 SF(su)2.507 E F0 5.007(.B)C .007
+(efore printing each primary prompt,)-5.007 F .305(Bash e)72 195.6 R
+.305(xpands the v)-.15 F(ariable)-.25 E F1($PR)2.805 E(OMPT_COMMAND)-.3
+E F0 .305(and, if it has a v)2.805 F .306(alue, e)-.25 F -.15(xe)-.15 G
+.306(cutes the e).15 F .306(xpanded v)-.15 F .306(alue as)-.25 F 3.735
+(ac)72 207.6 S 1.235(ommand, allo)-3.735 F 1.234
+(wing additional prompt customization.)-.25 F -.15(Fo)6.234 G 3.734(re)
+.15 G 1.234(xample, this assignment causes the current)-3.884 F(user)72
+219.6 Q 2.917(,t)-.4 G .417
+(he current host, the time, the last component of the current w)-2.917 F
+.417(orking directory)-.1 F 2.917(,t)-.65 G .418(he le)-2.917 F -.15(ve)
+-.25 G 2.918(lo).15 G 2.918(fs)-2.918 G .418(hell nest-)-2.918 F(ing, a\
+nd the history number of the current command to be embedded into the pr\
+imary prompt:)72 231.6 Q/F3 10/Courier@0 SF 6($P)97 249.6 S
+(S1='\\u@\\h [\\t] \\W\($SHLVL:\\!\)\\$ ')-6 E
+(chet@odin [21:03:44] documentation\(2:636\)$ cd ..)97 261.6 Q
+(chet@odin [21:03:54] src\(2:637\)$)97 273.6 Q F0 .146(The string being\
+ assigned is surrounded by single quotes so that if it is e)72 295.2 R
+.146(xported, the v)-.15 F .146(alue of)-.25 F F1($SHL)2.646 E(VL)-.92 E
+F0(will)2.646 E(be updated by a child shell:)72 307.2 Q F3
+(chet@odin [21:17:35] src\(2:638\)$ export PS1)97 325.2 Q
+(chet@odin [21:17:40] src\(2:639\)$ bash)97 337.2 Q
+(chet@odin [21:17:46] src\(3:696\)$)97 349.2 Q F0
+(The \\$ escape is displayed as \231)72 370.8 Q F1($)A F0 2.5<9a77>C
+(hen running as a normal user)-2.5 E 2.5(,b)-.4 G(ut as \231)-2.7 E F1
+(#)A F0 2.5<9a77>C(hen running as root.)-2.5 E F1 2.5(4.9. File)72 394.8
+R(System V)2.5 E(iews)-.37 E F0 .029(Since Berk)97 410.4 R(ele)-.1 E
+2.529(yi)-.15 G .029
+(ntroduced symbolic links in 4.2 BSD, one of their most anno)-2.529 F
+.03(ying properties has been)-.1 F .764(the \231w)72 422.4 R .764
+(arping\232 to a completely dif)-.1 F .764
+(ferent area of the \214le system when using)-.25 F F1(cd)3.263 E F0
+3.263(,a)C .763(nd the resultant non-intu-)-3.263 F(iti)72 434.4 Q .704
+-.15(ve b)-.25 H(eha).15 E .405(vior of \231)-.2 F F1 .405(cd ..)B F0
+2.905(\232. The)B/F4 9/Times-Roman@0 SF(UNIX)2.905 E F0 -.1(ke)2.905 G
+.405(rnel treats symbolic links).1 F F2(physically)2.905 E F0 5.405(.W)C
+.405(hen the k)-5.405 F .405(ernel is translating)-.1 F 3.223(ap)72
+446.4 S .723(athname in which one component is a symbolic link, it repl\
+aces all or part of the pathname while pro-)-3.223 F .668
+(cessing the link.)72 458.4 R .668
+(If the contents of the symbolic link be)5.668 F .669
+(gin with a slash, the k)-.15 F .669(ernel replaces the pathname)-.1 F
+.219(entirely; if not, the link contents replace the current component.)
+72 470.4 R .219(In either case, the symbolic link is visible.)5.219 F
+.058(If the link v)72 482.4 R .058(alue is an absolute pathname, the us\
+er \214nds himself in a completely dif)-.25 F .059
+(ferent part of the \214le sys-)-.25 F(tem.)72 494.4 Q .704(Bash pro)97
+510 R .704(vides a)-.15 F F2(lo)3.203 E(gical)-.1 E F0(vie)3.203 E 3.203
+(wo)-.25 G 3.203(ft)-3.203 G .703(he \214le system.)-3.203 F .703
+(In this def)5.703 F .703(ault mode, command and \214lename com-)-.1 F
+.522(pletion and b)72 522 R .522(uiltin commands such as)-.2 F F1(cd)
+3.022 E F0(and)3.022 E F1(pushd)3.022 E F0 .522
+(which change the current w)3.022 F .522(orking directory transpar)-.1 F
+(-)-.2 E .127(ently follo)72 534 R 2.627(ws)-.25 G .127
+(ymbolic links as if the)-2.627 F 2.627(yw)-.15 G .127(ere directories.)
+-2.627 F(The)5.126 E F1($PWD)2.626 E F0 -.25(va)2.626 G .126
+(riable, which holds the shell').25 F 2.626(si)-.55 G .126(dea of)-2.626
+F .366(the current w)72 546 R .366(orking directory)-.1 F 2.866(,d)-.65
+G .367
+(epends on the path used to reach the directory rather than its ph)
+-2.866 F .367(ysical loca-)-.05 F
+(tion in the local \214le system hierarch)72 558 Q 3.8 -.65(y. F)-.05 H
+(or e).5 E(xample:)-.15 E F3 6($c)97 576 S 6(d/)-6 G(usr/local/bin)-6 E
+6($e)97 588 S(cho $PWD)-6 E(/usr/local/bin)97 600 Q 6($p)97 612 S(wd)-6
+E(/usr/local/bin)97 624 Q 6($/)97 636 S(bin/pwd)-6 E
+(/net/share/sun4/local/bin)97 648 Q 6($c)97 660 S 6(d.)-6 G(.)-6 E 6($p)
+97 672 S(wd)-6 E(/usr/local)97 684 Q 6($/)97 696 S(bin/pwd)-6 E
+(/net/share/sun4/local)97 708 Q 6($c)97 720 S 6(d.)-6 G(.)-6 E EP
+%%Page: 8 8
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF(-8-)282.17 48 Q/F1 10/Courier@0 SF 6($p)97 84 S
+(wd)-6 E(/usr)97 96 Q 6($/)97 108 S(bin/pwd)-6 E(/usr)97 120 Q F0 .3(On\
+e problem with this, of course, arises when programs that do not unders\
+tand the shell')72 141.6 R 2.8(sl)-.55 G .3(ogical notion of)-2.8 F .217
+(the \214le system interpret \231..)72 153.6 R 2.718<9a64>-.7 G(if)
+-2.718 E(ferently)-.25 E 5.218(.T)-.65 G .218
+(his generally happens when Bash completes \214lenames containing)-5.218
+F(\231..)72 165.6 Q 3.384<9a61>-.7 G .884
+(ccording to a logical hierarch)-3.384 F 3.384(yw)-.05 G .884
+(hich does not correspond to their ph)-3.384 F .883(ysical location.)
+-.05 F -.15(Fo)5.883 G 3.383(ru).15 G .883(sers who)-3.383 F
+(\214nd this troublesome, a corresponding)72 177.6 Q/F2 10
+/Times-Italic@0 SF(physical)2.5 E F0(vie)2.5 E 2.5(wo)-.25 G 2.5(ft)-2.5
+G(he \214le system is a)-2.5 E -.25(va)-.2 G(ilable:).25 E F1 6($c)97
+195.6 S 6(d/)-6 G(usr/local/bin)-6 E 6($p)97 207.6 S(wd)-6 E
+(/usr/local/bin)97 219.6 Q 6($s)97 231.6 S(et -o physical)-6 E 6($p)97
+243.6 S(wd)-6 E(/net/share/sun4/local/bin)97 255.6 Q/F3 10/Times-Bold@0
+SF 2.5(4.10. Inter)72 285.6 R(nationalization)-.15 E F0 .145
+(One of the most signi\214cant impro)97 301.2 R -.15(ve)-.15 G .145
+(ments in v).15 F .145(ersion 1.13 of Bash w)-.15 F .145
+(as the change to \231eight-bit clean-)-.1 F 2.933(liness\232. Pre)72
+313.2 R .433(vious v)-.25 F .432
+(ersions used the eighth bit of characters to mark whether or not the)
+-.15 F 2.932(yw)-.15 G .432(ere quoted when)-2.932 F 1.495(performing w)
+72 325.2 R 1.495(ord e)-.1 F 3.995(xpansions. While)-.15 F 1.495
+(this did not af)3.995 F 1.496
+(fect the majority of users, most of whom used only)-.25 F(se)72 337.2 Q
+-.15(ve)-.25 G 1.236(n-bit ASCII characters, some found it con\214ning.)
+.15 F(Be)6.236 E 1.236(ginning with v)-.15 F 1.236
+(ersion 1.13, Bash implemented a)-.15 F(dif)72 349.2 Q .02(ferent quoti\
+ng mechanism that did not alter the eighth bit of characters.)-.25 F
+.021(This allo)5.021 F .021(wed Bash to manipulate)-.25 F .427
+(\214les with \231odd\232 characters in their names, b)72 361.2 R .427
+(ut did nothing to help users enter those names, so v)-.2 F .426
+(ersion 1.13)-.15 F 1.458
+(introduced changes to readline that made it eight-bit clean as well.)72
+373.2 R 1.458(Options e)6.458 F 1.458(xist that force readline to)-.15 F
+.744(attach no special signi\214cance to characters with the eighth bit\
+ set \(the def)72 385.2 R .744(ault beha)-.1 F .744(vior is to con)-.2 F
+-.15(ve)-.4 G .744(rt these).15 F .641(characters to meta-pre\214x)72
+397.2 R .641(ed k)-.15 F .941 -.15(ey s)-.1 H .642
+(equences\) and to output these characters without con).15 F -.15(ve)-.4
+G .642(rsion to meta-pre-).15 F<8c78>72 409.2 Q .008(ed sequences.)-.15
+F .007(These changes, along with the e)5.007 F .007(xpansion of k)-.15 F
+-.15(ey)-.1 G .007(maps to a full eight bits, enable readline to).15 F
+-.1(wo)72 421.2 S(rk with most of the ISO-8859 f).1 E
+(amily of character sets, used by man)-.1 E 2.5(yE)-.15 G
+(uropean countries.)-2.5 E F3 2.5(4.11. POSIX)72 445.2 R(Mode)2.5 E F0
+.584(Although Bash is intended to be POSIX.2 conformant, there are area\
+s in which the def)97 460.8 R .584(ault beha)-.1 F(vior)-.2 E .463
+(is not compatible with the standard.)72 472.8 R -.15(Fo)5.463 G 2.962
+(ru).15 G .462(sers who wish to operate in a strict POSIX.2 en)-2.962 F
+.462(vironment, Bash)-.4 F .505(implements a)72 484.8 R F2 .505
+(POSIX mode)3.005 F F0 5.505(.W)C .505(hen this mode is acti)-5.505 F
+-.15(ve)-.25 G 3.005(,B).15 G .505(ash modi\214es its def)-3.005 F .505
+(ault operation where it dif)-.1 F(fers)-.25 E .267
+(from POSIX.2 to match the standard.)72 496.8 R .266
+(POSIX mode is entered when Bash is started with the)5.267 F F3(-posix)
+2.766 E F0(option.)2.766 E .149(This feature is also a)72 508.8 R -.25
+(va)-.2 G .149(ilable as an option to the).25 F F3(set)2.649 E F0 -.2
+(bu)2.649 G(iltin,).2 E F3 .149(set -o posix)2.649 F F0 5.149(.F)C .149
+(or compatibility with other GNU)-5.299 F(softw)72 520.8 Q 4.02(are tha\
+t attempts to be POSIX.2 compliant, Bash also enters POSIX mode if the \
+v)-.1 F(ariable)-.25 E F3($POSIXL)72 532.8 Q(Y_CORRECT)-.92 E F0 5.824
+(is set when Bash is started or assigned a v)8.324 F 5.825
+(alue during e)-.25 F -.15(xe)-.15 G(cution.).15 E F3($POSIX_PED)72
+544.8 Q(ANTIC)-.35 E F0 .27
+(is accepted as well, to be compatible with some older GNU utilities.)
+2.77 F .27(When Bash is)5.27 F .506(started in POSIX mode, for e)72
+556.8 R .506(xample, it sources the \214le named by the v)-.15 F .507
+(alue of)-.25 F F3($ENV)3.007 E F0 .507(rather than the \231nor)3.007 F
+(-)-.2 E(mal\232 startup \214les, and does not allo)72 568.8 Q 2.5(wr)
+-.25 G(eserv)-2.5 E(ed w)-.15 E(ords to be aliased.)-.1 E F3 2.5(5. New)
+72 592.8 R -.25(Fe)2.5 G(atur).25 E(es and Futur)-.18 E 2.5(eP)-.18 G
+(lans)-2.5 E F0 1.632(There are se)97 608.4 R -.15(ve)-.25 G 1.632
+(ral features introduced in the current v).15 F 1.631(ersion of Bash, v)
+-.15 F 1.631(ersion 1.14, and a number)-.15 F .241
+(under consideration for future releases.)72 620.4 R .242
+(This section will brie\215y detail the ne)5.242 F 2.742(wf)-.25 G .242
+(eatures in v)-2.742 F .242(ersion 1.14 and)-.15 F(describe se)72 632.4
+Q -.15(ve)-.25 G(ral features that may appear in later v).15 E(ersions.)
+-.15 E F3 2.5(5.1. New)72 656.4 R -.25(Fe)2.5 G(atur).25 E
+(es in Bash-1.14)-.18 E F0 .884(The ne)97 672 R 3.384(wf)-.25 G .884
+(eatures a)-3.384 F -.25(va)-.2 G .884(ilable in Bash-1.14 answer se).25
+F -.15(ve)-.25 G .883(ral of the most common requests for enhance-).15 F
+2.931(ments. Most)72 684 R(notably)2.931 E 2.931(,t)-.65 G .432(here is\
+ a mechanism for including non-visible character sequences in prompts, \
+such)-2.931 F .136
+(as those which cause a terminal to print characters in dif)72 696 R
+.135(ferent colors or in standout mode.)-.25 F .135(There w)5.135 F .135
+(as noth-)-.1 F .558(ing pre)72 708 R -.15(ve)-.25 G .558
+(nting the use of these sequences in earlier v).15 F .559(ersions, b)
+-.15 F .559(ut the readline redisplay algorithm assumed)-.2 F
+(each character occupied ph)72 720 Q(ysical screen space and w)-.05 E
+(ould wrap lines prematurely)-.1 E(.)-.65 E EP
+%%Page: 9 9
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF(-9-)282.17 48 Q .13(Readline has a fe)97 84 R
+2.63(wn)-.25 G .63 -.25(ew va)-2.63 H .13(riables, se).25 F -.15(ve)-.25
+G .13(ral ne).15 F 2.63(wb)-.25 G .13
+(indable commands, and some additional emacs mode)-2.63 F(def)72 96 Q
+.918(ault k)-.1 F 1.218 -.15(ey b)-.1 H 3.418(indings. A).15 F(ne)3.418
+E 3.418(wh)-.25 G .919(istory search mode has been implemented: in this\
+ mode, readline searches)-3.418 F .336(the history for lines be)72 108 R
+.336(ginning with the characters between the be)-.15 F .336
+(ginning of the current line and the cursor)-.15 F(.)-.55 E .555(The e)
+72 120 R .556(xisting readline incremental search commands no longer ma\
+tch identical lines more than once.)-.15 F(File-)5.556 E 1.979
+(name completion no)72 132 R 4.479(we)-.25 G 1.979(xpands v)-4.629 F
+1.979(ariables in directory names.)-.25 F 1.978(The history e)6.978 F
+1.978(xpansion f)-.15 F 1.978(acilities are no)-.1 F(w)-.25 E 1.449
+(nearly completely csh-compatible: missing modi\214ers ha)72 144 R 1.749
+-.15(ve b)-.2 H 1.449(een added and history substitution has been).15 F
+-.15(ex)72 156 S(tended.).15 E(Se)97 171.6 Q -.15(ve)-.25 G .474
+(ral of the features described earlier).15 F 2.973(,s)-.4 G .473(uch as)
+-2.973 F/F1 10/Times-Bold@0 SF .473(set -o posix)2.973 F F0(and)2.973 E
+F1($POSIX_PED)2.973 E(ANTIC)-.35 E F0 2.973(,a)C .473(re ne)-2.973 F
+2.973(wi)-.25 G(n)-2.973 E -.15(ve)72 183.6 S .106(rsion 1.14.).15 F
+.106(There is a ne)5.106 F 2.606(ws)-.25 G .106(hell v)-2.606 F
+(ariable,)-.25 E F1(OSTYPE)2.606 E F0 2.606(,t)C 2.606(ow)-2.606 G .106
+(hich Bash assigns a v)-2.606 F .106(alue that identi\214es the v)-.25 F
+(er)-.15 E(-)-.2 E 1.38(sion of)72 195.6 R/F2 9/Times-Roman@0 SF(UNIX)
+3.88 E F0(it')3.88 E 3.879(sr)-.55 G 1.379(unning on \(great for puttin\
+g architecture-speci\214c binary directories into the)-3.879 F F1($P)
+3.879 E -.95(AT)-.74 G(H).95 E F0(\).)A -1 -.8(Tw o)72 207.6 T -.25(va)
+6.215 G 2.915(riables ha).25 F 3.215 -.15(ve b)-.2 H 2.915(een renamed:)
+.15 F F1($HISTCONTR)5.416 E(OL)-.3 E F0(replaces)5.416 E F1
+($history_contr)5.416 E(ol)-.18 E F0 5.416(,a)C(nd)-5.416 E F1
+($HOSTFILE)5.416 E F0(replaces)72 219.6 Q F1
+($hostname_completion_\214le)2.521 E F0 5.021(.I)C 2.521(nb)-5.021 G
+.021(oth cases, the old names are accepted for backw)-2.521 F .02
+(ards compatibil-)-.1 F(ity)72 231.6 Q 5.788(.T)-.65 G .788(he ksh)
+-5.788 F/F3 10/Times-Italic@0 SF(select)3.288 E F0 .788
+(construct, which allo)3.288 F .788
+(ws the generation of simple menus, has been implemented.)-.25 F(Ne)
+5.788 E(w)-.25 E 1.496(capabilities ha)72 243.6 R 1.796 -.15(ve b)-.2 H
+1.496(een added to e).15 F 1.495(xisting v)-.15 F(ariables:)-.25 E F1
+($auto_r)3.995 E(esume)-.18 E F0 1.495(can no)3.995 F 3.995(wt)-.25 G
+(ak)-3.995 E 3.995(ev)-.1 G 1.495(alues of)-4.245 F F3 -.2(ex)3.995 G
+(act).2 E F0(or)3.995 E F3(sub-)3.995 E(string)72 255.6 Q F0 4.843(,a)C
+(nd)-4.843 E F1($HISTCONTR)4.843 E(OL)-.3 E F0 2.343(understands the v)
+4.843 F(alue)-.25 E F3(ignor)4.844 E(eboth)-.37 E F0 4.844(,w)C 2.344
+(hich combines the tw)-4.844 F 4.844(op)-.1 G(re)-4.844 E(viously)-.25 E
+1.556(acceptable v)72 267.6 R 4.056(alues. The)-.25 F F1(dirs)4.056 E F0
+-.2(bu)4.056 G 1.556(iltin has acquired options to print out speci\214c\
+ members of the directory).2 F 3.062(stack. The)72 279.6 R F1($nolinks)
+3.062 E F0 -.25(va)3.062 G .562(riable, which forces a ph).25 F .562
+(ysical vie)-.05 F 3.062(wo)-.25 G 3.062(ft)-3.062 G .563
+(he \214le system, has been superseded by the)-3.062 F F1<ad50>72 291.6
+Q F0 .494(option to the)2.994 F F1(set)2.994 E F0 -.2(bu)2.994 G .494
+(iltin \(equi).2 F -.25(va)-.25 G .494(lent to).25 F F1 .494(set -o ph)
+2.994 F(ysical)-.15 E F0 .493(\); the v)B .493
+(ariable is retained for backw)-.25 F .493(ards compati-)-.1 F(bility)72
+303.6 Q 5.196(.T)-.65 G .196(he v)-5.196 F .196
+(ersion string contained in)-.15 F F1($B)2.696 E(ASH_VERSION)-.3 E F0
+(no)2.696 E 2.696(wi)-.25 G .196(ncludes an indication of the patch le)
+-2.696 F -.15(ve)-.25 G 2.696(la).15 G(s)-2.696 E .85(well as the \231b)
+72 315.6 R .85(uild v)-.2 F 3.35(ersion\232. Some)-.15 F .85
+(little-used features ha)3.35 F 1.15 -.15(ve b)-.2 H .85(een remo).15 F
+-.15(ve)-.15 G 3.35(d: the).15 F F1(by)3.35 E(e)-.1 E F0(synon)3.35 E
+.85(ym for)-.15 F F1(exit)3.35 E F0(and)3.35 E(the)72 327.6 Q F1($NO_PR)
+3.498 E(OMPT_V)-.3 E(ARS)-1.35 E F0 -.25(va)3.498 G .998
+(riable are gone.).25 F .998(There is no)5.998 F 3.498(wa)-.25 G 3.498
+(no)-3.498 G -2.19 -.18(rg a)-3.498 H .998
+(nized test suite that can be run as a).18 F(re)72 339.6 Q
+(gression test when b)-.15 E(uilding a ne)-.2 E 2.5(wv)-.25 G
+(ersion of Bash.)-2.65 E 1.696(The documentation has been thoroughly o)
+97 355.2 R -.15(ve)-.15 G 1.696(rhauled: there is a ne).15 F 4.196(wm)
+-.25 G 1.695(anual page on the readline)-4.196 F .467(library and the)72
+367.2 R F3(info)2.967 E F0 .467
+(\214le has been updated to re\215ect the current v)2.967 F 2.968
+(ersion. As)-.15 F(al)2.968 E -.1(wa)-.1 G .468(ys, as man).1 F 2.968
+(yb)-.15 G .468(ugs as possi-)-3.168 F(ble ha)72 379.2 Q .3 -.15(ve b)
+-.2 H(een \214x).15 E(ed, although some surely remain.)-.15 E F1 2.5
+(5.2. Other)72 403.2 R -.25(Fe)2.5 G(atur).25 E(es)-.18 E F0 1.68
+(There are a fe)97 418.8 R 4.18(wf)-.25 G 1.68
+(eatures that I hope to include in later Bash releases.)-4.18 F 1.68
+(Some are based on w)6.68 F(ork)-.1 E(already done in other shells.)72
+430.8 Q .958(In addition to simple v)97 446.4 R .959(ariables, a future\
+ release of Bash will include one-dimensional arrays, using)-.25 F .206
+(the ksh implementation of arrays as a model.)72 458.4 R .205
+(Additions to the ksh syntax, such as)5.205 F F3(varname)2.705 E F0 .205
+(=\( ... \) to assign)B 2.587(al)72 470.4 S .087(ist of w)-2.587 F .088
+(ords directly to an array and a mechanism to allo)-.1 F 2.588(wt)-.25 G
+(he)-2.588 E F1 -.18(re)2.588 G(ad).18 E F0 -.2(bu)2.588 G .088
+(iltin to read a list of v).2 F .088(alues directly)-.25 F .092
+(into an array)72 482.4 R 2.592(,w)-.65 G .092(ould be desirable.)-2.692
+F(Gi)5.092 E -.15(ve)-.25 G 2.592(nt).15 G .092(hose e)-2.592 F .092
+(xtensions, the ksh)-.15 F F1 .092(set \255A)2.592 F F0 .091
+(syntax may not be w)2.591 F .091(orth support-)-.1 F(ing \(the)72 494.4
+Q F1<ad41>2.5 E F0(option assigns a list of v)2.5 E(alues to an array)
+-.25 E 2.5(,b)-.65 G(ut is a rather peculiar special case\).)-2.7 E .76
+(Some shells include a means of)97 510 R F3(pr)3.26 E -.1(og)-.45 G -.15
+(ra).1 G(mmable).15 E F0 -.1(wo)3.26 G .76
+(rd completion, where the user speci\214es on a per).1 F(-)-.2 E .163
+(command basis ho)72 522 R 2.663(wt)-.25 G .163(he ar)-2.663 F .163(gum\
+ents of the command are to be treated when completion is attempted: as \
+\214le-)-.18 F .194(names, hostnames, e)72 534 R -.15(xe)-.15 G .194
+(cutable \214les, and so on.).15 F .195
+(The other aspects of the current Bash implementation could)5.195 F .482
+(remain as-is; the e)72 546 R .482(xisting heuristics w)-.15 F .481
+(ould still be v)-.1 F 2.981(alid. Only)-.25 F .481
+(when completing the ar)2.981 F .481(guments to a simple)-.18 F
+(command w)72 558 Q(ould the programmable completion be in ef)-.1 E
+(fect.)-.25 E .479(It w)97 573.6 R .479(ould also be nice to gi)-.1 F
+.779 -.15(ve t)-.25 H .479(he user \214ner).15 F .479
+(-grained control o)-.2 F -.15(ve)-.15 G 2.98(rw).15 G .48
+(hich commands are sa)-2.98 F -.15(ve)-.2 G 2.98(do).15 G .48(nto the)
+-2.98 F 1.786(history list.)72 585.6 R 1.786(One proposal is for a v)
+6.786 F 1.786(ariable, tentati)-.25 F -.15(ve)-.25 G 1.786(ly named).15
+F F1(HISTIGNORE)4.286 E F0 4.285(,w)C 1.785(hich w)-4.285 F 1.785
+(ould contain a)-.1 F .496(colon-separated list of commands.)72 597.6 R
+.496(Lines be)5.496 F .496
+(ginning with these commands, after the restrictions of)-.15 F F1($HIST)
+2.997 E(-)-.92 E(CONTR)72 609.6 Q(OL)-.3 E F0(ha)2.65 E .45 -.15(ve b)
+-.2 H .15(een applied, w).15 F .15
+(ould not be placed onto the history list.)-.1 F .15
+(The shell pattern-matching capa-)5.15 F(bilities could also be a)72
+621.6 Q -.25(va)-.2 G(ilable when specifying the contents of).25 E F1
+($HISTIGNORE)2.5 E F0(.)A .729(One thing that ne)97 637.2 R .729
+(wer shells such as)-.25 F F1(wksh)3.229 E F0 .729(\(also kno)3.229 F
+.729(wn as)-.25 F F1(dtksh)3.23 E F0 3.23(\)p)C(ro)-3.23 E .73
+(vide is a command to dynami-)-.15 F 1.189
+(cally load code implementing additional b)72 649.2 R 1.189
+(uiltin commands into a running shell.)-.2 F 1.188(This ne)6.188 F 3.688
+(wb)-.25 G 1.188(uiltin w)-3.888 F(ould)-.1 E(tak)72 661.2 Q 2.875(ea)
+-.1 G 2.875(no)-2.875 G .375
+(bject \214le or shared library implementing the \231body\232 of the b)
+-2.875 F .375(uiltin \()-.2 F F3(xxx_b)A(uiltin\(\))-.2 E F0 .375
+(for those f)2.875 F(amiliar)-.1 E .052
+(with Bash internals\) and a structure containing the name of the ne)72
+673.2 R 2.552(wc)-.25 G .051(ommand, the function to call when the)
+-2.552 F(ne)72 685.2 Q 3.458(wb)-.25 G .958(uiltin is in)-3.658 F -.2
+(vo)-.4 G -.1(ke).2 G 3.458(d\().1 G .959
+(presumably de\214ned in the shared object speci\214ed as an ar)-3.458 F
+.959(gument\), and the docu-)-.18 F 1.352
+(mentation to be printed by the)72 697.2 R F1(help)3.851 E F0 1.351
+(command \(possibly present in the shared object as well\).)3.851 F
+1.351(It w)6.351 F(ould)-.1 E(manage the details of e)72 709.2 Q
+(xtending the internal table of b)-.15 E(uiltins.)-.2 E EP
+%%Page: 10 10
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF(-10-)279.67 48 Q 3.291(Af)97 84 S 1.291 -.25
+(ew o)-3.291 H .791(ther b).25 F .791(uiltins w)-.2 F .791
+(ould also be desirable: tw)-.1 F 3.291(oa)-.1 G .791(re the POSIX.2)
+-3.291 F/F1 10/Times-Bold@0 SF(getconf)3.292 E F0 .792
+(command, which prints)3.292 F 1.412(the v)72 96 R 1.412
+(alues of system con\214guration v)-.25 F 1.411
+(ariables de\214ned by POSIX.2, and a)-.25 F F1(diso)3.911 E(wn)-.1 E F0
+-.2(bu)3.911 G 1.411(iltin, which causes a).2 F 1.347
+(shell running with job control acti)72 108 R 1.647 -.15(ve t)-.25 H
+3.847<6f99>.15 G(for)-3.847 E 1.347
+(get about\232 one or more background jobs in its internal jobs)-.18 F
+3.465(table. Using)72 120 R F1(getconf)3.465 E F0 3.465(,f)C .965(or e)
+-3.465 F .965(xample, a user could retrie)-.15 F 1.264 -.15(ve a v)-.25
+H .964(alue for)-.1 F F1($P)3.464 E -.95(AT)-.74 G(H).95 E F0 .964
+(guaranteed to \214nd all of the)3.464 F .884
+(POSIX standard utilities, or \214nd out ho)72 132 R 3.385(wl)-.25 G
+.885
+(ong \214lenames may be in the \214le system containing a speci\214ed)
+-3.385 F(directory)72 144 Q(.)-.65 E 1.521
+(There are no implementation timetables for an)97 159.6 R 4.021(yo)-.15
+G 4.021(ft)-4.021 G 1.52(hese features, nor are there concrete plans to)
+-4.021 F(include them.)72 171.6 Q(If an)5 E(yone has comments on these \
+proposals, feel free to send me electronic mail.)-.15 E F1 2.5
+(6. Re\215ections)72 195.6 R(and Lessons Lear)2.5 E(ned)-.15 E F0 .433
+(The lesson that has been repeated most often during Bash de)97 211.2 R
+-.15(ve)-.25 G .433(lopment is that there are dark corners).15 F .181
+(in the Bourne shell, and people use all of them.)72 223.2 R .18
+(In the original description of the Bourne shell, quoting and)5.181 F
+.073(the shell grammar are both poorly speci\214ed and incomplete; subs\
+equent descriptions ha)72 235.2 R .373 -.15(ve n)-.2 H .073
+(ot helped much.).15 F 1.856(The grammar presented in Bourne')72 247.2 R
+4.356(sp)-.55 G 1.856(aper describing the shell distrib)-4.356 F 1.855
+(uted with the Se)-.2 F -.15(ve)-.25 G 1.855(nth Edition of).15 F/F2 9
+/Times-Roman@0 SF(UNIX)72 259.2 Q F0 2.5<8769>C 2.5(ss)-2.5 G 2.5(of)
+-2.5 G(ar of)-2.6 E 2.5(ft)-.25 G(hat it does not allo)-2.5 E 2.5(wt)
+-.25 G(he command)-2.5 E/F3 10/Courier@0 SF(who|wc)2.5 E F0 5(.I)C 2.5
+(nf)-5 G(act, as T)-2.6 E(om Duf)-.8 E 2.5(fs)-.25 G(tates:)-2.5 E 1.375
+(Nobody really kno)97 274.8 R 1.375(ws what the Bourne shell')-.25 F
+3.875(sg)-.55 G 1.375(rammar is.)-3.875 F(Ev)6.376 E 1.376(en e)-.15 F
+1.376(xamination of the source)-.15 F(code is little help.\210)97 286.8
+Q .382(The POSIX.2 standard includes a)72 302.4 R/F4 10/Times-Italic@0
+SF(yacc)2.882 E F0 .382
+(grammar that comes close to capturing the Bourne shell')2.882 F 2.882
+(sb)-.55 G(eha)-2.882 E(vior)-.2 E(,)-.4 E -.2(bu)72 314.4 S 3.246(ti).2
+G 3.246(td)-3.246 G(isallo)-3.246 E .747(ws some constructs which sh ac\
+cepts without complaint \255 and there are scripts out there that)-.25 F
+.501(use them.)72 326.4 R .501(It took a fe)5.501 F 3.001(wv)-.25 G .501
+(ersions and se)-3.151 F -.15(ve)-.25 G .501(ral b).15 F .5
+(ug reports before Bash implemented sh-compatible quoting,)-.2 F .279
+(and there are still some \231le)72 338.4 R -.05(ga)-.15 G .279
+(l\232 sh constructs which Bash \215ags as syntax errors.).05 F .28
+(Complete sh compatibility)5.28 F(is a tough nut.)72 350.4 Q 1.231
+(The shell is bigger and slo)97 366 R 1.231(wer than I w)-.25 F 1.231
+(ould lik)-.1 F 1.23(e, though the current v)-.1 F 1.23
+(ersion is substantially f)-.15 F(aster)-.1 E .086(than pre)72 378 R
+(viously)-.25 E 5.086(.T)-.65 G .087
+(he readline library could stand a substantial re)-5.086 F 2.587
+(write. A)-.25 F .087(hand-written parser to replace the)2.587 F
+(current)72 390 Q F4(yacc)2.978 E F0 .478(-generated one w)B .477
+(ould probably result in a speedup, and w)-.1 F .477(ould solv)-.1 F
+2.977(eo)-.15 G .477(ne glaring problem:)-2.977 F(the)5.477 E .384
+(shell could parse commands in \231$\(...\)\232 constructs as the)72 402
+R 2.884(ya)-.15 G .385
+(re entered, rather than reporting errors when the)-2.884 F
+(construct is e)72 414 Q(xpanded.)-.15 E 1.064(As al)97 429.6 R -.1(wa)
+-.1 G 1.064(ys, there is some chaf).1 F 3.564(ft)-.25 G 3.564(og)-3.564
+G 3.564(ow)-3.564 G 1.064(ith the wheat.)-3.564 F 1.063
+(Areas of duplicated functionality need to be)6.063 F .382(cleaned up.)
+72 441.6 R .382(There are se)5.382 F -.15(ve)-.25 G .382
+(ral cases where Bash treats a v).15 F .382
+(ariable specially to enable functionality a)-.25 F -.25(va)-.2 G
+(ilable).25 E .185(another w)72 453.6 R .185(ay \()-.1 F F1($notify)A F0
+(vs.)2.684 E F1 .184(set -o notify)5.184 F F0(and)2.684 E F1($nolinks)
+2.684 E F0(vs.)2.684 E F1 .184(set -o ph)2.684 F(ysical)-.15 E F0 2.684
+(,f)C .184(or instance\); the special treatment)-2.684 F 3.421(of the v)
+72 465.6 R 3.421(ariable name should probably be remo)-.25 F -.15(ve)
+-.15 G 5.921(d. A).15 F(fe)5.921 E 5.921(wm)-.25 G 3.422
+(ore things could stand remo)-5.921 F -.25(va)-.15 G 3.422(l; the).25 F
+F1($allo)72 477.6 Q(w_null_glob_expansion)-.1 E F0(and)4.112 E F1
+($glob_dot_\214lenames)4.112 E F0 -.25(va)4.111 G 1.611
+(riables are of particularly questionable v).25 F(alue.)-.25 E(The)72
+489.6 Q F1($[...])3.977 E F0 1.477(arithmetic e)3.977 F -.25(va)-.25 G
+1.478(luation syntax is redundant no).25 F 3.978(wt)-.25 G 1.478
+(hat the POSIX-mandated)-3.978 F F1($\(\(...\)\))3.978 E F0 1.478
+(construct has)3.978 F .326(been implemented, and could be deleted.)72
+501.6 R .326(It w)5.326 F .326(ould be nice if the te)-.1 F .326
+(xt output by the)-.15 F F1(help)2.825 E F0 -.2(bu)2.825 G .325
+(iltin were e).2 F(xter)-.15 E(-)-.2 E .061
+(nal to the shell rather than compiled into it.)72 513.6 R .062
+(The beha)5.062 F .062(vior enabled by)-.2 F F1
+($command_oriented_history)2.562 E F0 2.562(,w)C(hich)-2.562 E 1.125
+(causes the shell to attempt to sa)72 525.6 R 1.424 -.15(ve a)-.2 H
+1.124(ll lines of a multi-line command in a single history entry).15 F
+3.624(,s)-.65 G 1.124(hould be)-3.624 F(made the def)72 537.6 Q
+(ault and the v)-.1 E(ariable remo)-.25 E -.15(ve)-.15 G(d.).15 E F1 2.5
+(7. A)72 561.6 R -.1(va)-1 G(ilability).1 E F0 .047
+(As with all other GNU softw)97 577.2 R .047(are, Bash is a)-.1 F -.25
+(va)-.2 G .047(ilable for anon).25 F .047(ymous FTP from)-.15 F F4(pr)
+2.547 E(ep.ai.mit.edu:/pub/gnu)-.37 E F0 1.05(and from other GNU softw)
+72 589.2 R 1.05(are mirror sites.)-.1 F 1.049(The current v)6.049 F
+1.049(ersion is in)-.15 F F4(bash-1.14.1.tar)3.549 E(.gz)-1.11 E F0
+1.049(in that directory)3.549 F(.)-.65 E(Use)72 601.2 Q F4(ar)5.965 E
+-.15(ch)-.37 G(ie).15 E F0 3.465(to \214nd the nearest archi)5.965 F
+3.766 -.15(ve s)-.25 H 5.966(ite. The).15 F 3.466(latest v)5.966 F 3.466
+(ersion is al)-.15 F -.1(wa)-.1 G 3.466(ys a).1 F -.25(va)-.2 G 3.466
+(ilable for FTP from).25 F F4(bash.CWR)72 613.2 Q -.25(U.)-.4 G
+(Edu:/pub/dist.).25 E F0(Bash documentation is a)5 E -.25(va)-.2 G
+(ilable for FTP from).25 E F4(bash.CWR)2.5 E -.25(U.)-.4 G
+(Edu:/pub/bash.).25 E F0 1.169(The Free Softw)97 628.8 R 1.169(are F)-.1
+F 1.169(oundation sells tapes and CD-R)-.15 F 1.168
+(OMs containing Bash; send electronic mail to)-.4 F F3
+(gnu@prep.ai.mit.edu)72 640.8 Q F0(or call)2.5 E F3(+1-617-876-3296)2.5
+E F0(for more information.)2.5 E .694(Bash is also distrib)97 656.4 R
+.694(uted with se)-.2 F -.15(ve)-.25 G .694(ral v).15 F .694(ersions of)
+-.15 F F2(UNIX)3.194 E F0 .694(-compatible systems.)B .695
+(It is included as /bin/sh)5.694 F .948(and /bin/bash on se)72 668.4 R
+-.15(ve)-.25 G .948(ral Linux distrib).15 F .948
+(utions \(more about the dif)-.2 F .948
+(ference in a moment\), and as contrib)-.25 F(uted)-.2 E .32 LW 144
+676.4 72 676.4 DL/F5 8/Times-Roman@0 SF .781
+(\207S. R. Bourne, \231UNIX T)72 688.2 R .781(ime-Sharing System:)-.28 F
+.781(The UNIX Shell\232,)4.781 F/F6 8/Times-Italic@0 SF .78
+(Bell System T)2.78 F(ec)-.736 E .78(hnical J)-.12 F(ournal)-.2 E F5
+2.78(,5)C .78(7\(6\), July-)-2.78 F(August, 1978, pp. 1971-1990.)72
+698.2 Q<8854>72 710 Q .431(om Duf)-.64 F .431
+(f, \231Rc \255 A Shell for Plan 9 and)-.2 F/F7 7/Times-Roman@0 SF(UNIX)
+2.432 E F5(systems\232,)2.432 E F6(Pr)2.432 E .432
+(oc. of the Summer 1990 EUUG Confer)-.36 F(ence)-.296 E F5 2.432(,L)C
+(on-)-2.432 E(don, July)72 720 Q 2(,1)-.52 G(990, pp. 21-33.)-2 E EP
+%%Page: 11 11
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF(-11-)279.67 48 Q(softw)72 84 Q(are in BSDI')-.1
+E 2.5(sB)-.55 G(SD/386* and FreeBSD.)-2.5 E .598(The Linux distrib)97
+99.6 R .598(ution deserv)-.2 F .598(es special mention.)-.15 F .598
+(There are tw)5.598 F 3.099(oc)-.1 G .599
+(on\214gurations included in the stan-)-3.099 F .733(dard Bash distrib)
+72 111.6 R .732(ution: a \231normal\232 con\214guration, in which all o\
+f the standard features are included, and a)-.2 F .519(\231minimal\232 \
+con\214guration, which omits job control, aliases, history and command \
+line editing, the directory)72 123.6 R .886(stack and)72 135.6 R/F1 10
+/Times-Bold@0 SF(pushd/popd/dirs,)3.386 E F0 .886(process substitution,\
+ prompt string special character decoding, and the)3.386 F/F2 10
+/Times-Italic@0 SF(select)3.385 E F0 3.368(construct. This)72 147.6 R
+.868(minimal v)3.368 F .869
+(ersion is designed to be a drop-in replacement for the traditional)-.15
+F/F3 9/Times-Roman@0 SF(UNIX)3.369 E F0(/bin/sh,)3.369 E
+(and is included as the Linux /bin/sh in se)72 159.6 Q -.15(ve)-.25 G
+(ral packagings.).15 E F1 2.5(8. Conclusion)72 183.6 R F0 .8
+(Bash is a w)97 199.2 R(orth)-.1 E 3.3(ys)-.05 G .8(uccessor to sh.)-3.3
+F .8(It is suf)5.8 F .8(\214ciently portable to run on nearly e)-.25 F
+-.15(ve)-.25 G .8(ry v).15 F .8(ersion of)-.15 F F3(UNIX)3.299 E F0 .31
+(from 4.3 BSD to SVR4.2, and se)72 211.2 R -.15(ve)-.25 G(ral).15 E F3
+(UNIX)2.81 E F0 -.1(wo)2.81 G(rkalik).1 E 2.81(es. It)-.1 F .311(is rob)
+2.81 F .311(ust enough to replace sh on most of those)-.2 F 1.515
+(systems, and pro)72 223.2 R 1.515(vides more functionality)-.15 F 6.515
+(.I)-.65 G 4.015(th)-6.515 G 1.515(as se)-4.015 F -.15(ve)-.25 G 1.515
+(ral thousand re).15 F 1.515(gular users, and their feedback has)-.15 F
+(helped to mak)72 235.2 Q 2.5(ei)-.1 G 2.5(ta)-2.5 G 2.5(sg)-2.5 G
+(ood as it is today \255 a testament to the bene\214ts of free softw)
+-2.5 E(are.)-.1 E .32 LW 144 708.2 72 708.2 DL/F4 8/Times-Roman@0 SF
+(*BSD/386 is a trademark of Berk)72 720 Q(ele)-.08 E 2(yS)-.12 G(oftw)-2
+E(are Design, Inc.)-.08 E EP
+%%Trailer
+end
+%%EOF
diff --git a/doc/article.txt b/doc/article.txt
new file mode 100644
index 0000000..c19ff92
--- /dev/null
+++ b/doc/article.txt
@@ -0,0 +1,1111 @@
+
+
+
+
+
+
+
+
+
+ Bash - The GNU shell*
+
+
+ Chet Ramey
+ Case Western Reserve University
+ chet@po.cwru.edu
+
+
+
+
+
+
+_1. _I_n_t_r_o_d_u_c_t_i_o_n
+
+ _B_a_s_h is the shell, or command language interpreter,
+that will appear in the GNU operating system. The name is
+an acronym for the "Bourne-Again SHell", a pun on Steve
+Bourne, the author of the direct ancestor of the current
+UNIX|- shell /_b_i_n/_s_h, which appeared in the Seventh Edition
+Bell Labs Research version of UNIX.
+
+ Bash is an sh-compatible shell that incorporates useful
+features from the Korn shell (ksh) and the C shell (csh),
+described later in this article. It is ultimately intended
+to be a conformant implementation of the IEEE POSIX Shell
+and Utilities specification (IEEE Working Group 1003.2). It
+offers functional improvements over sh for both interactive
+and programming use.
+
+ While the GNU operating system will most likely include
+a version of the Berkeley shell csh, Bash will be the
+default shell. Like other GNU software, Bash is quite port-
+able. It currently runs on nearly every version of UNIX and
+a few other operating systems - an independently-supported
+port exists for OS/2, and there are rumors of ports to DOS
+and Windows NT. Ports to UNIX-like systems such as QNX and
+Minix are part of the distribution.
+
+ The original author of Bash was Brian Fox, an employee
+of the Free Software Foundation. The current developer and
+maintainer is Chet Ramey, a volunteer who works at Case
+Western Reserve University.
+
+_2. _W_h_a_t'_s _P_O_S_I_X, _a_n_y_w_a_y?
+
+ _P_O_S_I_X is a name originally coined by Richard Stallman
+_________________________
+*An earlier version of this article appeared in The
+Linux Journal.
+|- UNIX is a trademark of Bell Laboratories.
+
+
+
+
+ October 28, 1994
+
+
+
+
+
+ - 2 -
+
+
+for a family of open system standards based on UNIX. There
+are a number of aspects of UNIX under consideration for
+standardization, from the basic system services at the sys-
+tem call and C library level to applications and tools to
+system administration and management. Each area of stan-
+dardization is assigned to a working group in the 1003
+series.
+
+ The POSIX Shell and Utilities standard has been
+developed by IEEE Working Group 1003.2 (POSIX.2).|= It con-
+centrates on the command interpreter interface and utility
+programs commonly executed from the command line or by other
+programs. An initial version of the standard has been
+approved and published by the IEEE, and work is currently
+underway to update it. There are four primary areas of work
+in the 1003.2 standard:
+
+o+ Aspects of the shell's syntax and command language. A
+ number of special builtins such as _c_d and _e_x_e_c are
+ being specified as part of the shell, since their func-
+ tionality usually cannot be implemented by a separate
+ executable;
+
+o+ A set of utilities to be called by shell scripts and
+ applications. Examples are programs like _s_e_d, _t_r, and
+ _a_w_k. Utilities commonly implemented as shell builtins
+ are described in this section, such as _t_e_s_t and _k_i_l_l.
+ An expansion of this section's scope, termed the User
+ Portability Extension, or UPE, has standardized
+ interactive programs such as _v_i and _m_a_i_l_x;
+
+o+ A group of functional interfaces to services provided
+ by the shell, such as the traditional system() C
+ library function. There are functions to perform shell
+ word expansions, perform filename expansion (_g_l_o_b_b_i_n_g),
+ obtain values of POSIX.2 system configuration vari-
+ ables, retrieve values of environment variables
+ (getenv()), _a_n_d _o_t_h_e_r _s_e_r_v_i_c_e_s;
+
+o+ A suite of "development" utilities such as _c_8_9 (the
+ POSIX.2 version of _c_c), and _y_a_c_c.
+
+ Bash is concerned with the aspects of the shell's
+behavior defined by POSIX.2. The shell command language has
+of course been standardized, including the basic flow con-
+trol and program execution constructs, I/O redirection and
+pipelining, argument handling, variable expansion, and quot-
+ing. The _s_p_e_c_i_a_l builtins, which must be implemented as
+part of the shell to provide the desired functionality, are
+_________________________
+|=IEEE, _I_E_E_E _S_t_a_n_d_a_r_d _f_o_r _I_n_f_o_r_m_a_t_i_o_n _T_e_c_h_n_o_l_o_g_y --
+_P_o_r_t_a_b_l_e _O_p_e_r_a_t_i_n_g _S_y_s_t_e_m _I_n_t_e_r_f_a_c_e (_P_O_S_I_X) _P_a_r_t _2:
+_S_h_e_l_l _a_n_d _U_t_i_l_i_t_i_e_s, 1992.
+
+
+
+
+ October 28, 1994
+
+
+
+
+
+ - 3 -
+
+
+specified as being part of the shell; examples of these are
+_e_v_a_l and _e_x_p_o_r_t. Other utilities appear in the sections of
+POSIX.2 not devoted to the shell which are commonly (and in
+some cases must be) implemented as builtin commands, such as
+_r_e_a_d and _t_e_s_t. POSIX.2 also specifies aspects of the
+shell's interactive behavior as part of the UPE, including
+job control and command line editing. Interestingly enough,
+only _v_i-style line editing commands have been standardized;
+_e_m_a_c_s editing commands were left out due to objections.
+
+ While POSIX.2 includes much of what the shell has trad-
+itionally provided, some important things have been omitted
+as being "beyond its scope." There is, for instance, no
+mention of a difference between a _l_o_g_i_n shell and any other
+interactive shell (since POSIX.2 does not specify a login
+program). No fixed startup files are defined, either - the
+standard does not mention ._p_r_o_f_i_l_e.
+
+_3. _B_a_s_i_c _B_a_s_h _f_e_a_t_u_r_e_s
+
+ Since the Bourne shell provides Bash with most of its
+philosophical underpinnings, Bash inherits most of its
+features and functionality from sh. Bash implements all of
+the traditional sh flow control constructs (_f_o_r, _i_f, _w_h_i_l_e,
+etc.). All of the Bourne shell builtins, including those
+not specified in the POSIX.2 standard, appear in Bash.
+Shell _f_u_n_c_t_i_o_n_s, introduced in the SVR2 version of the
+Bourne shell, are similar to shell scripts, but are defined
+using a special syntax and are executed in the same process
+as the calling shell. Bash has shell functions which behave
+in a fashion upward-compatible with sh functions. There are
+certain shell variables that Bash interprets in the same way
+as sh, such as _P_S_1, _I_F_S, and _P_A_T_H. Bash implements essen-
+tially the same grammar, parameter and variable expansion
+semantics, redirection, and quoting as the Bourne shell.
+Where differences appear between the POSIX.2 standard and
+traditional sh behavior, Bash follows POSIX.
+
+ The Korn Shell (ksh) is a descendent of the Bourne
+shell written at AT&T Bell Laboratories by David Korn|-. It
+provides a number of useful features that POSIX and Bash
+have adopted. Many of the interactive facilities in POSIX.2
+have their roots in the ksh: for example, the POSIX and ksh
+job control facilities are nearly identical. Bash includes
+features from the Korn Shell for both interactive use and
+shell programming. For programming, Bash provides variables
+such as _R_A_N_D_O_M and _R_E_P_L_Y, the _t_y_p_e_s_e_t builtin, the ability
+to remove substrings from variables based on patterns, and
+shell arithmetic. _R_A_N_D_O_M expands to a random number each
+time it is referenced; assigning a value to _R_A_N_D_O_M seeds the
+_________________________
+|-Morris Bolsky and David Korn, _T_h_e _K_o_r_n_S_h_e_l_l _C_o_m_m_a_n_d
+_a_n_d _P_r_o_g_r_a_m_m_i_n_g _L_a_n_g_u_a_g_e, Prentice Hall, 1989.
+
+
+
+
+ October 28, 1994
+
+
+
+
+
+ - 4 -
+
+
+random number generator. _R_E_P_L_Y is the default variable used
+by the _r_e_a_d builtin when no variable names are supplied as
+arguments. The _t_y_p_e_s_e_t builtin is used to define variables
+and give them attributes such as readonly. Bash arithmetic
+allows the evaluation of an expression and the substitution
+of the result. Shell variables may be used as operands, and
+the result of an expression may be assigned to a variable.
+Nearly all of the operators from the C language are avail-
+able, with the same precedence rules:
+9 $ echo $((3 + 5 * 32))
+ 163
+9
+For interactive use, Bash implements ksh-style aliases and
+builtins such as _f_c (discussed below) and _j_o_b_s. Bash
+aliases allow a string to be substituted for a command name.
+They can be used to create a mnemonic for a UNIX command
+name (alias del=rm), to expand a single word to a complex
+command (alias news='xterm -g 80x45 -title trn -e trn -e -S1
+-N &'), or to ensure that a command is invoked with a basic
+set of options (alias ls="/bin/ls -F").
+
+ The C shell (csh)|-, originally written by Bill Joy
+while at Berkeley, is widely used and quite popular for its
+interactive facilities. Bash includes a csh-compatible his-
+tory expansion mechanism ("! history"), brace expansion,
+access to a stack of directories via the _p_u_s_h_d, _p_o_p_d, and
+_d_i_r_s builtins, and tilde expansion, to generate users' home
+directories. Tilde expansion has also been adopted by both
+the Korn Shell and POSIX.2.
+
+ There were certain areas in which POSIX.2 felt stan-
+dardization was necessary, but no existing implementation
+provided the proper behavior. The working group invented
+and standardized functionality in these areas, which Bash
+implements. The _c_o_m_m_a_n_d builtin was invented so that shell
+functions could be written to replace builtins; it makes the
+capabilities of the builtin available to the function. The
+reserved word "!" was added to negate the return value of a
+command or pipeline; it was nearly impossible to express "if
+not x" cleanly using the sh language. There exist multiple
+incompatible implementations of the _t_e_s_t builtin, which
+tests files for type and other attributes and performs
+arithmetic and string comparisons. POSIX considered none of
+these correct, so the standard behavior was specified in
+terms of the number of arguments to the command. POSIX.2
+dictates exactly what will happen when four or fewer argu-
+ments are given to _t_e_s_t, and leaves the behavior undefined
+when more arguments are supplied. Bash uses the POSIX.2
+_________________________
+|-Bill Joy, An Introduction to the C Shell, _U_N_I_X _U_s_e_r'_s
+_S_u_p_p_l_e_m_e_n_t_a_r_y _D_o_c_u_m_e_n_t_s, University of California at
+Berkeley, 1986.
+
+
+
+
+ October 28, 1994
+
+
+
+
+
+ - 5 -
+
+
+algorithm, which was conceived by David Korn.
+
+_3._1. _F_e_a_t_u_r_e_s _n_o_t _i_n _t_h_e _B_o_u_r_n_e _S_h_e_l_l
+
+ There are a number of minor differences between Bash
+and the version of sh present on most other versions of
+UNIX. The majority of these are due to the POSIX standard,
+but some are the result of Bash adopting features from other
+shells. For instance, Bash includes the new "!" reserved
+word, the _c_o_m_m_a_n_d builtin, the ability of the _r_e_a_d builtin
+to correctly return a line ending with a backslash, symbolic
+arguments to the _u_m_a_s_k builtin, variable substring removal,
+a way to get the length of a variable, and the new algorithm
+for the _t_e_s_t builtin from the POSIX.2 standard, none of
+which appear in sh.
+
+ Bash also implements the "$(...)" command substitution
+syntax, which supersedes the sh `...` construct. The
+"$(...)" construct expands to the output of the command con-
+tained within the parentheses, with trailing newlines
+removed. The sh syntax is accepted for backwards compati-
+bility, but the "$(...)" form is preferred because its quot-
+ing rules are much simpler and it is easier to nest.
+
+ The Bourne shell does not provide such features as
+brace expansion, the ability to define a variable and a
+function with the same name, local variables in shell func-
+tions, the ability to enable and disable individual builtins
+or write a function to replace a builtin, or a means to
+export a shell function to a child process.
+
+ Bash has closed a long-standing shell security hole by
+not using the $_I_F_S variable to split each word read by the
+shell, but splitting only the results of expansion (ksh and
+the 4.4 BSD sh have fixed this as well). Useful behavior
+such as a means to abort execution of a script read with the
+"." command using the return builtin or automatically
+exporting variables in the shell's environment to children
+is also not present in the Bourne shell. Bash provides a
+much more powerful environment for both interactive use and
+programming.
+
+_4. _B_a_s_h-_s_p_e_c_i_f_i_c _F_e_a_t_u_r_e_s
+
+ This section details a few of the features which make
+Bash unique. Most of them provide improved interactive use,
+but a few programming improvements are present as well.
+Full descriptions of these features can be found in the Bash
+documentation.
+
+_4._1. _S_t_a_r_t_u_p _F_i_l_e_s
+
+ Bash executes startup files differently than other
+shells. The Bash behavior is a compromise between the csh
+
+
+
+ October 28, 1994
+
+
+
+
+
+ - 6 -
+
+
+principle of startup files with fixed names executed for
+each shell and the sh "minimalist" behavior. An interactive
+instance of Bash started as a login shell reads and executes
+~/._b_a_s_h__p_r_o_f_i_l_e (the file .bash_profile in the user's home
+directory), if it exists. An interactive non-login shell
+reads and executes ~/._b_a_s_h_r_c. A non-interactive shell (one
+begun to execute a shell script, for example) reads no fixed
+startup file, but uses the value of the variable $_E_N_V, if
+set, as the name of a startup file. The ksh practice of
+reading $_E_N_V for every shell, with the accompanying diffi-
+culty of defining the proper variables and functions for
+interactive and non-interactive shells or having the file
+read only for interactive shells, was considered too com-
+plex. Ease of use won out here. Interestingly, the next
+release of ksh will change to reading $_E_N_V only for interac-
+tive shells.
+
+_4._2. _N_e_w _B_u_i_l_t_i_n _C_o_m_m_a_n_d_s
+
+ There are a few builtins which are new or have been
+extended in Bash. The _e_n_a_b_l_e builtin allows builtin com-
+mands to be turned on and off arbitrarily. To use the ver-
+sion of _e_c_h_o found in a user's search path rather than the
+Bash builtin, enable -n echo suffices. The _h_e_l_p builtin
+provides quick synopses of the shell facilities without
+requiring access to a manual page. _B_u_i_l_t_i_n is similar to
+_c_o_m_m_a_n_d in that it bypasses shell functions and directly
+executes builtin commands. Access to a csh-style stack of
+directories is provided via the _p_u_s_h_d, _p_o_p_d, and _d_i_r_s buil-
+tins. _P_u_s_h_d and _p_o_p_d insert and remove directories from the
+stack, respectively, and _d_i_r_s lists the stack contents. On
+systems that allow fine-grained control of resources, the
+_u_l_i_m_i_t builtin can be used to tune these settings. _U_l_i_m_i_t
+allows a user to control, among other things, whether core
+dumps are to be generated, how much memory the shell or a
+child process is allowed to allocate, and how large a file
+created by a child process can grow. The _s_u_s_p_e_n_d command
+will stop the shell process when job control is active; most
+other shells do not allow themselves to be stopped like
+that. _T_y_p_e, the Bash answer to _w_h_i_c_h and _w_h_e_n_c_e, shows what
+will happen when a word is typed as a command:
+9 $ type export
+ export is a shell builtin
+ $ type -t export
+ builtin
+ $ type bash
+ bash is /bin/bash
+ $ type cd
+ cd is a function
+ cd ()
+ {
+ builtin cd ${1+"$@"} && xtitle $HOST: $PWD
+ }
+9
+
+
+ October 28, 1994
+
+
+
+
+
+ - 7 -
+
+
+Various modes tell what a command word is (reserved word,
+alias, function, builtin, or file) or which version of a
+command will be executed based on a user's search path.
+Some of this functionality has been adopted by POSIX.2 and
+folded into the _c_o_m_m_a_n_d utility.
+
+_4._3. _E_d_i_t_i_n_g _a_n_d _C_o_m_p_l_e_t_i_o_n
+
+ One area in which Bash shines is command line editing.
+Bash uses the _r_e_a_d_l_i_n_e library to read and edit lines when
+interactive. Readline is a powerful and flexible input
+facility that a user can configure to individual tastes. It
+allows lines to be edited using either emacs or vi commands,
+where those commands are appropriate. The full capability
+of emacs is not present - there is no way to execute a named
+command with M-x, for instance - but the existing commands
+are more than adequate. The vi mode is compliant with the
+command line editing standardized by POSIX.2.
+
+ Readline is fully customizable. In addition to the
+basic commands and key bindings, the library allows users to
+define additional key bindings using a startup file. The
+_i_n_p_u_t_r_c file, which defaults to the file ~/._i_n_p_u_t_r_c, is read
+each time readline initializes, permitting users to maintain
+a consistent interface across a set of programs. Readline
+includes an extensible interface, so each program using the
+library can add its own bindable commands and program-
+specific key bindings. Bash uses this facility to add bind-
+ings that perform history expansion or shell word expansions
+on the current input line.
+
+ Readline interprets a number of variables which further
+tune its behavior. Variables exist to control whether or
+not eight-bit characters are directly read as input or con-
+verted to meta-prefixed key sequences (a meta-prefixed key
+sequence consists of the character with the eighth bit
+zeroed, preceded by the _m_e_t_a-_p_r_e_f_i_x character, usually
+escape, which selects an alternate keymap), to decide
+whether to output characters with the eighth bit set
+directly or as a meta-prefixed key sequence, whether or not
+to wrap to a new screen line when a line being edited is
+longer than the screen width, the keymap to which subsequent
+key bindings should apply, or even what happens when read-
+line wants to ring the terminal's bell. All of these vari-
+ables can be set in the inputrc file.
+
+ The startup file understands a set of C preprocessor-
+like conditional constructs which allow variables or key
+bindings to be assigned based on the application using read-
+line, the terminal currently being used, or the editing
+mode. Users can add program-specific bindings to make their
+lives easier: I have bindings that let me edit the value of
+$_P_A_T_H and double-quote the current or previous word:
+9 # Macros that are convenient for shell interaction
+
+
+9 October 28, 1994
+
+
+
+
+
+ - 8 -
+
+
+ $if Bash
+ # edit the path
+ "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"
+ # prepare to type a quoted word -- insert open and close double
+ # quotes and move to just after the open quote
+ "\C-x\"": "\"\"\C-b"
+ # Quote the current or previous word
+ "\C-xq": "\eb\"\ef\""
+ $endif
+9
+There is a readline command to re-read the file, so users
+can edit the file, change some bindings, and begin to use
+them almost immediately.
+
+ Bash implements the _b_i_n_d builtin for more dyamic con-
+trol of readline than the startup file permits. _B_i_n_d is
+used in several ways. In _l_i_s_t mode, it can display the
+current key bindings, list all the readline editing direc-
+tives available for binding, list which keys invoke a given
+directive, or output the current set of key bindings in a
+format that can be incorporated directly into an inputrc
+file. In _b_a_t_c_h mode, it reads a series of key bindings
+directly from a file and passes them to readline. In its
+most common usage, _b_i_n_d takes a single string and passes it
+directly to readline, which interprets the line as if it had
+just been read from the inputrc file. Both key bindings and
+variable assignments may appear in the string given to _b_i_n_d.
+
+ The readline library also provides an interface for
+_w_o_r_d _c_o_m_p_l_e_t_i_o_n. When the _c_o_m_p_l_e_t_i_o_n character (usually
+TAB) is typed, readline looks at the word currently being
+entered and computes the set of filenames of which the
+current word is a valid prefix. If there is only one possi-
+ble completion, the rest of the characters are inserted
+directly, otherwise the common prefix of the set of
+filenames is added to the current word. A second TAB char-
+acter entered immediately after a non-unique completion
+causes readline to list the possible completions; there is
+an option to have the list displayed immediately. Readline
+provides hooks so that applications can provide specific
+types of completion before the default filename completion
+is attempted. This is quite flexible, though it is not com-
+pletely user-programmable. Bash, for example, can complete
+filenames, command names (including aliases, builtins, shell
+reserved words, shell functions, and executables found in
+the file system), shell variables, usernames, and hostnames.
+It uses a set of heuristics that, while not perfect, is gen-
+erally quite good at determining what type of completion to
+attempt.
+
+_4._4. _H_i_s_t_o_r_y
+
+ Access to the list of commands previously entered (the
+_c_o_m_m_a_n_d _h_i_s_t_o_r_y) is provided jointly by Bash and the
+
+
+9 October 28, 1994
+
+
+
+
+
+ - 9 -
+
+
+readline library. Bash provides variables ($HISTFILE,
+$HISTSIZE, and $HISTCONTROL) and the _h_i_s_t_o_r_y and _f_c builtins
+to manipulate the history list. The value of $_H_I_S_T_F_I_L_E
+specifes the file where Bash writes the command history on
+exit and reads it on startup. $_H_I_S_T_S_I_Z_E is used to limit
+the number of commands saved in the history. $_H_I_S_T_C_O_N_T_R_O_L
+provides a crude form of control over which commands are
+saved on the history list: a value of _i_g_n_o_r_e_s_p_a_c_e means to
+not save commands which begin with a space; a value of
+_i_g_n_o_r_e_d_u_p_s means to not save commands identical to the last
+command saved. $HISTCONTROL was named $history_control in
+earlier versions of Bash; the old name is still accepted for
+backwards compatibility. The _h_i_s_t_o_r_y command can read or
+write files containing the history list and display the
+current list contents. The _f_c builtin, adopted from POSIX.2
+and the Korn Shell, allows display and re-execution, with
+optional editing, of commands from the history list. The
+readline library offers a set of commands to search the his-
+tory list for a portion of the current input line or a
+string typed by the user. Finally, the _h_i_s_t_o_r_y library,
+generally incorporated directly into the readline library,
+implements a facility for history recall, expansion, and
+re-execution of previous commands very similar to csh ("bang
+history", so called because the exclamation point introduces
+a history substitution):
+9 $ echo a b c d e
+ a b c d e
+ $ !! f g h i
+ echo a b c d e f g h i
+ a b c d e f g h i
+ $ !-2
+ echo a b c d e
+ a b c d e
+ $ echo !-2:1-4
+ echo a b c d
+ a b c d
+9
+The command history is only saved when the shell is interac-
+tive, so it is not available for use by shell scripts.
+
+_4._5. _N_e_w _S_h_e_l_l _V_a_r_i_a_b_l_e_s
+
+ There are a number of convenience variables that Bash
+interprets to make life easier. These include _F_I_G_N_O_R_E,
+which is a set of filename suffixes identifying files to
+exclude when completing filenames; _H_O_S_T_T_Y_P_E, which is
+automatically set to a string describing the type of
+hardware on which Bash is currently executing;
+_c_o_m_m_a_n_d__o_r_i_e_n_t_e_d__h_i_s_t_o_r_y, which directs Bash to save all
+lines of a multiple-line command such as a _w_h_i_l_e or _f_o_r loop
+in a single history entry, allowing easy re-editing; and
+_I_G_N_O_R_E_E_O_F, whose value indicates the number of consecutive
+EOF characters that an interactive shell will read before
+
+
+
+ October 28, 1994
+
+
+
+
+
+ - 10 -
+
+
+exiting - an easy way to keep yourself from being logged out
+accidentally. The _a_u_t_o__r_e_s_u_m_e variable alters the way the
+shell treats simple command names: if job control is active,
+and this variable is set, single-word simple commands
+without redirections cause the shell to first look for and
+restart a suspended job with that name before starting a new
+process.
+
+_4._6. _B_r_a_c_e _E_x_p_a_n_s_i_o_n
+
+ Since sh offers no convenient way to generate arbitrary
+strings that share a common prefix or suffix (filename
+expansion requires that the filenames exist), Bash imple-
+ments _b_r_a_c_e _e_x_p_a_n_s_i_o_n, a capability picked up from csh.
+Brace expansion is similar to filename expansion, but the
+strings generated need not correspond to existing files. A
+brace expression consists of an optional _p_r_e_a_m_b_l_e, followed
+by a pair of braces enclosing a series of comma-separated
+strings, and an optional _p_o_s_t_a_m_b_l_e. The preamble is
+prepended to each string within the braces, and the postam-
+ble is then appended to each resulting string:
+9 $ echo a{d,c,b}e
+ ade ace abe
+9
+As this example demonstrates, the results of brace expansion
+are not sorted, as they are by filename expansion.
+
+_4._7. _P_r_o_c_e_s_s _S_u_b_s_t_i_t_u_t_i_o_n
+
+ On systems that can support it, Bash provides a facil-
+ity known as _p_r_o_c_e_s_s _s_u_b_s_t_i_t_u_t_i_o_n. Process substitution is
+similar to command substitution in that its specification
+includes a command to execute, but the shell does not col-
+lect the command's output and insert it into the command
+line. Rather, Bash opens a pipe to the command, which is
+run in the background. The shell uses named pipes (FIFOs)
+or the /_d_e_v/_f_d method of naming open files to expand the
+process substitution to a filename which connects to the
+pipe when opened. This filename becomes the result of the
+expansion. Process substitution can be used to compare the
+outputs of two different versions of an application as part
+of a regression test:
+9 $ cmp <(old_prog) <(new_prog)
+9
+_4._8. _P_r_o_m_p_t _C_u_s_t_o_m_i_z_a_t_i_o_n
+
+ One of the more popular interactive features that Bash
+provides is the ability to customize the prompt. Both $_P_S_1
+and $_P_S_2, the primary and secondary prompts, are expanded
+before being displayed. Parameter and variable expansion is
+performed when the prompt string is expanded, so any shell
+variable can be put into the prompt (e.g., $_S_H_L_V_L, which
+
+
+
+ October 28, 1994
+
+
+
+
+
+ - 11 -
+
+
+indicates how deeply the current shell is nested). Bash
+specially interprets characters in the prompt string pre-
+ceded by a backslash. Some of these backslash escapes are
+replaced with the current time, the date, the current work-
+ing directory, the username, and the command number or his-
+tory number of the command being entered. There is even a
+backslash escape to cause the shell to change its prompt
+when running as root after an _s_u. Before printing each pri-
+mary prompt, Bash expands the variable $_P_R_O_M_P_T__C_O_M_M_A_N_D and,
+if it has a value, executes the expanded value as a command,
+allowing additional prompt customization. For example, this
+assignment causes the current user, the current host, the
+time, the last component of the current working directory,
+the level of shell nesting, and the history number of the
+current command to be embedded into the primary prompt:
+9 $ PS1='\u@\h [\t] \W($SHLVL:\!)\$ '
+ chet@odin [21:03:44] documentation(2:636)$ cd ..
+ chet@odin [21:03:54] src(2:637)$
+9
+The string being assigned is surrounded by single quotes so
+that if it is exported, the value of $_S_H_L_V_L will be updated
+by a child shell:
+9 chet@odin [21:17:35] src(2:638)$ export PS1
+ chet@odin [21:17:40] src(2:639)$ bash
+ chet@odin [21:17:46] src(3:696)$
+9
+The \$ escape is displayed as "$" when running as a normal
+user, but as "#" when running as root.
+
+_4._9. _F_i_l_e _S_y_s_t_e_m _V_i_e_w_s
+
+ Since Berkeley introduced symbolic links in 4.2 BSD,
+one of their most annoying properties has been the "warping"
+to a completely different area of the file system when using
+_c_d, and the resultant non-intuitive behavior of "cd ..".
+The UNIX kernel treats symbolic links _p_h_y_s_i_c_a_l_l_y. When the
+kernel is translating a pathname in which one component is a
+symbolic link, it replaces all or part of the pathname while
+processing the link. If the contents of the symbolic link
+begin with a slash, the kernel replaces the pathname
+entirely; if not, the link contents replace the current com-
+ponent. In either case, the symbolic link is visible. If
+the link value is an absolute pathname, the user finds him-
+self in a completely different part of the file system.
+
+ Bash provides a _l_o_g_i_c_a_l view of the file system. In
+this default mode, command and filename completion and buil-
+tin commands such as _c_d and _p_u_s_h_d which change the current
+working directory transparently follow symbolic links as if
+they were directories. The $_P_W_D variable, which holds the
+shell's idea of the current working directory, depends on
+the path used to reach the directory rather than its
+
+
+
+ October 28, 1994
+
+
+
+
+
+ - 12 -
+
+
+physical location in the local file system hierarchy. For
+example:
+9 $ cd /usr/local/bin
+ $ echo $PWD
+ /usr/local/bin
+ $ pwd
+ /usr/local/bin
+ $ /bin/pwd
+ /net/share/sun4/local/bin
+ $ cd ..
+ $ pwd
+ /usr/local
+ $ /bin/pwd
+ /net/share/sun4/local
+ $ cd ..
+ $ pwd
+ /usr
+ $ /bin/pwd
+ /usr
+9
+One problem with this, of course, arises when programs that
+do not understand the shell's logical notion of the file
+system interpret ".." differently. This generally happens
+when Bash completes filenames containing ".." according to a
+logical hierarchy which does not correspond to their physi-
+cal location. For users who find this troublesome, a
+corresponding _p_h_y_s_i_c_a_l view of the file system is available:
+9 $ cd /usr/local/bin
+ $ pwd
+ /usr/local/bin
+ $ set -o physical
+ $ pwd
+ /net/share/sun4/local/bin
+9
+_4._1_0. _I_n_t_e_r_n_a_t_i_o_n_a_l_i_z_a_t_i_o_n
+
+ One of the most significant improvements in version
+1.13 of Bash was the change to "eight-bit cleanliness".
+Previous versions used the eighth bit of characters to mark
+whether or not they were quoted when performing word expan-
+sions. While this did not affect the majority of users,
+most of whom used only seven-bit ASCII characters, some
+found it confining. Beginning with version 1.13, Bash
+implemented a different quoting mechanism that did not alter
+the eighth bit of characters. This allowed Bash to manipu-
+late files with "odd" characters in their names, but did
+nothing to help users enter those names, so version 1.13
+introduced changes to readline that made it eight-bit clean
+as well. Options exist that force readline to attach no
+special significance to characters with the eighth bit set
+(the default behavior is to convert these characters to
+meta-prefixed key sequences) and to output these characters
+
+
+
+ October 28, 1994
+
+
+
+
+
+ - 13 -
+
+
+without conversion to meta-prefixed sequences. These
+changes, along with the expansion of keymaps to a full eight
+bits, enable readline to work with most of the ISO-8859 fam-
+ily of character sets, used by many European countries.
+
+_4._1_1. _P_O_S_I_X _M_o_d_e
+
+ Although Bash is intended to be POSIX.2 conformant,
+there are areas in which the default behavior is not compa-
+tible with the standard. For users who wish to operate in a
+strict POSIX.2 environment, Bash implements a _P_O_S_I_X _m_o_d_e.
+When this mode is active, Bash modifies its default opera-
+tion where it differs from POSIX.2 to match the standard.
+POSIX mode is entered when Bash is started with the -_p_o_s_i_x
+option. This feature is also available as an option to the
+set builtin, set -o posix. For compatibility with other GNU
+software that attempts to be POSIX.2 compliant, Bash also
+enters POSIX mode if the variable $_P_O_S_I_X_L_Y__C_O_R_R_E_C_T is set
+when Bash is started or assigned a value during execution.
+$_P_O_S_I_X__P_E_D_A_N_T_I_C is accepted as well, to be compatible with
+some older GNU utilities. When Bash is started in POSIX
+mode, for example, it sources the file named by the value of
+$_E_N_V rather than the "normal" startup files, and does not
+allow reserved words to be aliased.
+
+_5. _N_e_w _F_e_a_t_u_r_e_s _a_n_d _F_u_t_u_r_e _P_l_a_n_s
+
+ There are several features introduced in the current
+version of Bash, version 1.14, and a number under considera-
+tion for future releases. This section will briefly detail
+the new features in version 1.14 and describe several
+features that may appear in later versions.
+
+_5._1. _N_e_w _F_e_a_t_u_r_e_s _i_n _B_a_s_h-_1._1_4
+
+ The new features available in Bash-1.14 answer several
+of the most common requests for enhancements. Most notably,
+there is a mechanism for including non-visible character
+sequences in prompts, such as those which cause a terminal
+to print characters in different colors or in standout mode.
+There was nothing preventing the use of these sequences in
+earlier versions, but the readline redisplay algorithm
+assumed each character occupied physical screen space and
+would wrap lines prematurely.
+
+ Readline has a few new variables, several new bindable
+commands, and some additional emacs mode default key bind-
+ings. A new history search mode has been implemented: in
+this mode, readline searches the history for lines beginning
+with the characters between the beginning of the current
+line and the cursor. The existing readline incremental
+search commands no longer match identical lines more than
+once. Filename completion now expands variables in direc-
+tory names. The history expansion facilities are now nearly
+
+
+
+ October 28, 1994
+
+
+
+
+
+ - 14 -
+
+
+completely csh-compatible: missing modifiers have been added
+and history substitution has been extended.
+
+ Several of the features described earlier, such as _s_e_t
+-_o _p_o_s_i_x and $_P_O_S_I_X__P_E_D_A_N_T_I_C, are new in version 1.14.
+There is a new shell variable, _O_S_T_Y_P_E, to which Bash assigns
+a value that identifies the version of UNIX it's running on
+(great for putting architecture-specific binary directories
+into the $PATH). Two variables have been renamed: $_H_I_S_T_C_O_N_-
+_T_R_O_L replaces $_h_i_s_t_o_r_y__c_o_n_t_r_o_l, and $_H_O_S_T_F_I_L_E replaces
+$_h_o_s_t_n_a_m_e__c_o_m_p_l_e_t_i_o_n__f_i_l_e. In both cases, the old names are
+accepted for backwards compatibility. The ksh _s_e_l_e_c_t con-
+struct, which allows the generation of simple menus, has
+been implemented. New capabilities have been added to
+existing variables: $_a_u_t_o__r_e_s_u_m_e can now take values of
+_e_x_a_c_t or _s_u_b_s_t_r_i_n_g, and $_H_I_S_T_C_O_N_T_R_O_L understands the value
+_i_g_n_o_r_e_b_o_t_h, which combines the two previously acceptable
+values. The _d_i_r_s builtin has acquired options to print out
+specific members of the directory stack. The $_n_o_l_i_n_k_s vari-
+able, which forces a physical view of the file system, has
+been superseded by the -_P option to the _s_e_t builtin
+(equivalent to set -o physical); the variable is retained
+for backwards compatibility. The version string contained
+in $_B_A_S_H__V_E_R_S_I_O_N now includes an indication of the patch
+level as well as the "build version". Some little-used
+features have been removed: the _b_y_e synonym for _e_x_i_t and
+the $_N_O__P_R_O_M_P_T__V_A_R_S variable are gone. There is now an
+organized test suite that can be run as a regression test
+when building a new version of Bash.
+
+ The documentation has been thoroughly overhauled: there
+is a new manual page on the readline library and the _i_n_f_o
+file has been updated to reflect the current version. As
+always, as many bugs as possible have been fixed, although
+some surely remain.
+
+_5._2. _O_t_h_e_r _F_e_a_t_u_r_e_s
+
+ There are a few features that I hope to include in
+later Bash releases. Some are based on work already done in
+other shells.
+
+ In addition to simple variables, a future release of
+Bash will include one-dimensional arrays, using the ksh
+implementation of arrays as a model. Additions to the ksh
+syntax, such as _v_a_r_n_a_m_e=( ... ) to assign a list of words
+directly to an array and a mechanism to allow the _r_e_a_d buil-
+tin to read a list of values directly into an array, would
+be desirable. Given those extensions, the ksh _s_e_t -_A syntax
+may not be worth supporting (the -_A option assigns a list of
+values to an array, but is a rather peculiar special case).
+
+ Some shells include a means of _p_r_o_g_r_a_m_m_a_b_l_e word com-
+pletion, where the user specifies on a per-command basis how
+
+
+
+ October 28, 1994
+
+
+
+
+
+ - 15 -
+
+
+the arguments of the command are to be treated when comple-
+tion is attempted: as filenames, hostnames, executable
+files, and so on. The other aspects of the current Bash
+implementation could remain as-is; the existing heuristics
+would still be valid. Only when completing the arguments to
+a simple command would the programmable completion be in
+effect.
+
+ It would also be nice to give the user finer-grained
+control over which commands are saved onto the history list.
+One proposal is for a variable, tentatively named _H_I_S_T_I_G_-
+_N_O_R_E, which would contain a colon-separated list of com-
+mands. Lines beginning with these commands, after the res-
+trictions of $_H_I_S_T_C_O_N_T_R_O_L have been applied, would not be
+placed onto the history list. The shell pattern-matching
+capabilities could also be available when specifying the
+contents of $_H_I_S_T_I_G_N_O_R_E.
+
+ One thing that newer shells such as _w_k_s_h (also known as
+_d_t_k_s_h) provide is a command to dynamically load code imple-
+menting additional builtin commands into a running shell.
+This new builtin would take an object file or shared library
+implementing the "body" of the builtin (_x_x_x__b_u_i_l_t_i_n() for
+those familiar with Bash internals) and a structure contain-
+ing the name of the new command, the function to call when
+the new builtin is invoked (presumably defined in the shared
+object specified as an argument), and the documentation to
+be printed by the _h_e_l_p command (possibly present in the
+shared object as well). It would manage the details of
+extending the internal table of builtins.
+
+ A few other builtins would also be desirable: two are
+the POSIX.2 _g_e_t_c_o_n_f command, which prints the values of sys-
+tem configuration variables defined by POSIX.2, and a _d_i_s_o_w_n
+builtin, which causes a shell running with job control
+active to "forget about" one or more background jobs in its
+internal jobs table. Using _g_e_t_c_o_n_f, for example, a user
+could retrieve a value for $_P_A_T_H guaranteed to find all of
+the POSIX standard utilities, or find out how long filenames
+may be in the file system containing a specified directory.
+
+ There are no implementation timetables for any of these
+features, nor are there concrete plans to include them. If
+anyone has comments on these proposals, feel free to send me
+electronic mail.
+
+_6. _R_e_f_l_e_c_t_i_o_n_s _a_n_d _L_e_s_s_o_n_s _L_e_a_r_n_e_d
+
+ The lesson that has been repeated most often during
+Bash development is that there are dark corners in the
+Bourne shell, and people use all of them. In the original
+description of the Bourne shell, quoting and the shell gram-
+mar are both poorly specified and incomplete; subsequent
+descriptions have not helped much. The grammar presented in
+
+
+
+ October 28, 1994
+
+
+
+
+
+ - 16 -
+
+
+Bourne's paper describing the shell distributed with the
+Seventh Edition of UNIX|- is so far off that it does not
+allow the command who|wc. In fact, as Tom Duff states:
+
+ Nobody really knows what the Bourne shell's gram-
+ mar is. Even examination of the source code is
+ little help.|=
+
+The POSIX.2 standard includes a _y_a_c_c grammar that comes
+close to capturing the Bourne shell's behavior, but it
+disallows some constructs which sh accepts without complaint
+- and there are scripts out there that use them. It took a
+few versions and several bug reports before Bash implemented
+sh-compatible quoting, and there are still some "legal" sh
+constructs which Bash flags as syntax errors. Complete sh
+compatibility is a tough nut.
+
+ The shell is bigger and slower than I would like,
+though the current version is substantially faster than pre-
+viously. The readline library could stand a substantial
+rewrite. A hand-written parser to replace the current
+_y_a_c_c-generated one would probably result in a speedup, and
+would solve one glaring problem: the shell could parse com-
+mands in "$(...)" constructs as they are entered, rather
+than reporting errors when the construct is expanded.
+
+ As always, there is some chaff to go with the wheat.
+Areas of duplicated functionality need to be cleaned up.
+There are several cases where Bash treats a variable spe-
+cially to enable functionality available another way
+($notify vs. set -o notify and $nolinks vs. set -o physi-
+cal, for instance); the special treatment of the variable
+name should probably be removed. A few more things could
+stand removal; the $_a_l_l_o_w__n_u_l_l__g_l_o_b__e_x_p_a_n_s_i_o_n and
+$_g_l_o_b__d_o_t__f_i_l_e_n_a_m_e_s variables are of particularly question-
+able value. The $[...] arithmetic evaluation syntax is
+redundant now that the POSIX-mandated $((...)) construct has
+been implemented, and could be deleted. It would be nice if
+the text output by the _h_e_l_p builtin were external to the
+shell rather than compiled into it. The behavior enabled by
+$_c_o_m_m_a_n_d__o_r_i_e_n_t_e_d__h_i_s_t_o_r_y, which causes the shell to attempt
+to save all lines of a multi-line command in a single his-
+tory entry, should be made the default and the variable
+removed.
+
+
+_________________________
+|-S. R. Bourne, "UNIX Time-Sharing System: The UNIX
+Shell", _B_e_l_l _S_y_s_t_e_m _T_e_c_h_n_i_c_a_l _J_o_u_r_n_a_l, 57(6), July-
+August, 1978, pp. 1971-1990.
+|=Tom Duff, "Rc - A Shell for Plan 9 and UNIX systems",
+_P_r_o_c. _o_f _t_h_e _S_u_m_m_e_r _1_9_9_0 _E_U_U_G _C_o_n_f_e_r_e_n_c_e, London, July,
+1990, pp. 21-33.
+
+
+
+
+ October 28, 1994
+
+
+
+
+
+ - 17 -
+
+
+_7. _A_v_a_i_l_a_b_i_l_i_t_y
+
+ As with all other GNU software, Bash is available for
+anonymous FTP from _p_r_e_p._a_i._m_i_t._e_d_u:/_p_u_b/_g_n_u and from other
+GNU software mirror sites. The current version is in _b_a_s_h-
+_1._1_4._1._t_a_r._g_z in that directory. Use _a_r_c_h_i_e to find the
+nearest archive site. The latest version is always avail-
+able for FTP from _b_a_s_h._C_W_R_U._E_d_u:/_p_u_b/_d_i_s_t. Bash documenta-
+tion is available for FTP from _b_a_s_h._C_W_R_U._E_d_u:/_p_u_b/_b_a_s_h.
+
+ The Free Software Foundation sells tapes and CD-ROMs
+containing Bash; send electronic mail to gnu@prep.ai.mit.edu
+or call +1-617-876-3296 for more information.
+
+ Bash is also distributed with several versions of
+UNIX-compatible systems. It is included as /bin/sh and
+/bin/bash on several Linux distributions (more about the
+difference in a moment), and as contributed software in
+BSDI's BSD/386* and FreeBSD.
+
+ The Linux distribution deserves special mention. There
+are two configurations included in the standard Bash distri-
+bution: a "normal" configuration, in which all of the stan-
+dard features are included, and a "minimal" configuration,
+which omits job control, aliases, history and command line
+editing, the directory stack and _p_u_s_h_d/_p_o_p_d/_d_i_r_s, process
+substitution, prompt string special character decoding, and
+the _s_e_l_e_c_t construct. This minimal version is designed to
+be a drop-in replacement for the traditional UNIX /bin/sh,
+and is included as the Linux /bin/sh in several packagings.
+
+_8. _C_o_n_c_l_u_s_i_o_n
+
+ Bash is a worthy successor to sh. It is sufficiently
+portable to run on nearly every version of UNIX from 4.3 BSD
+to SVR4.2, and several UNIX workalikes. It is robust enough
+to replace sh on most of those systems, and provides more
+functionality. It has several thousand regular users, and
+their feedback has helped to make it as good as it is today
+- a testament to the benefits of free software.
+
+
+
+
+
+
+
+
+
+
+_________________________
+*BSD/386 is a trademark of Berkeley Software Design,
+Inc.
+
+
+
+
+ October 28, 1994
+
+
diff --git a/doc/bash.0 b/doc/bash.0
new file mode 100644
index 0000000..675cd2f
--- /dev/null
+++ b/doc/bash.0
@@ -0,0 +1,5358 @@
+BASH(1) BASH(1)
+
+
+
+NNAAMMEE
+ bash - GNU Bourne-Again SHell
+
+SSYYNNOOPPSSIISS
+ bbaasshh [options] [file]
+
+CCOOPPYYRRIIGGHHTT
+ Bash is Copyright (C) 1989-2009 by the Free Software Foundation, Inc.
+
+DDEESSCCRRIIPPTTIIOONN
+ BBaasshh is an sshh-compatible command language interpreter that executes
+ commands read from the standard input or from a file. BBaasshh also incor-
+ porates useful features from the _K_o_r_n and _C shells (kksshh and ccsshh).
+
+ BBaasshh is intended to be a conformant implementation of the Shell and
+ Utilities portion of the IEEE POSIX specification (IEEE Standard
+ 1003.1). BBaasshh can be configured to be POSIX-conformant by default.
+
+OOPPTTIIOONNSS
+ In addition to the single-character shell options documented in the
+ description of the sseett builtin command, bbaasshh interprets the following
+ options when it is invoked:
+
+ --cc _s_t_r_i_n_g If the --cc option is present, then commands are read from
+ _s_t_r_i_n_g. If there are arguments after the _s_t_r_i_n_g, they are
+ assigned to the positional parameters, starting with $$00.
+ --ii If the --ii option is present, the shell is _i_n_t_e_r_a_c_t_i_v_e.
+ --ll Make bbaasshh act as if it had been invoked as a login shell (see
+ IINNVVOOCCAATTIIOONN below).
+ --rr If the --rr option is present, the shell becomes _r_e_s_t_r_i_c_t_e_d
+ (see RREESSTTRRIICCTTEEDD SSHHEELLLL below).
+ --ss If the --ss option is present, or if no arguments remain after
+ option processing, then commands are read from the standard
+ input. This option allows the positional parameters to be
+ set when invoking an interactive shell.
+ --DD A list of all double-quoted strings preceded by $$ is printed
+ on the standard output. These are the strings that are sub-
+ ject to language translation when the current locale is not CC
+ or PPOOSSIIXX. This implies the --nn option; no commands will be
+ executed.
+ [[--++]]OO [[_s_h_o_p_t___o_p_t_i_o_n]]
+ _s_h_o_p_t___o_p_t_i_o_n is one of the shell options accepted by the
+ sshhoopptt builtin (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). If
+ _s_h_o_p_t___o_p_t_i_o_n is present, --OO sets the value of that option; ++OO
+ unsets it. If _s_h_o_p_t___o_p_t_i_o_n is not supplied, the names and
+ values of the shell options accepted by sshhoopptt are printed on
+ the standard output. If the invocation option is ++OO, the
+ output is displayed in a format that may be reused as input.
+ ---- A ---- signals the end of options and disables further option
+ processing. Any arguments after the ---- are treated as file-
+ names and arguments. An argument of -- is equivalent to ----.
+
+ BBaasshh also interprets a number of multi-character options. These
+ options must appear on the command line before the single-character
+ options to be recognized.
+
+ ----ddeebbuuggggeerr
+ Arrange for the debugger profile to be executed before the shell
+ starts. Turns on extended debugging mode (see the description
+ of the eexxttddeebbuugg option to the sshhoopptt builtin below) and shell
+ function tracing (see the description of the --oo ffuunnccttrraaccee option
+ to the sseett builtin below).
+ ----dduummpp--ppoo--ssttrriinnggss
+ Equivalent to --DD, but the output is in the GNU _g_e_t_t_e_x_t ppoo (por-
+ table object) file format.
+ ----dduummpp--ssttrriinnggss
+ Equivalent to --DD.
+ ----hheellpp Display a usage message on standard output and exit success-
+ fully.
+ ----iinniitt--ffiillee _f_i_l_e
+ ----rrccffiillee _f_i_l_e
+ Execute commands from _f_i_l_e instead of the standard personal ini-
+ tialization file _~_/_._b_a_s_h_r_c if the shell is interactive (see
+ IINNVVOOCCAATTIIOONN below).
+
+ ----llooggiinn
+ Equivalent to --ll.
+
+ ----nnooeeddiittiinngg
+ Do not use the GNU rreeaaddlliinnee library to read command lines when
+ the shell is interactive.
+
+ ----nnoopprrooffiillee
+ Do not read either the system-wide startup file _/_e_t_c_/_p_r_o_f_i_l_e or
+ any of the personal initialization files _~_/_._b_a_s_h___p_r_o_f_i_l_e,
+ _~_/_._b_a_s_h___l_o_g_i_n, or _~_/_._p_r_o_f_i_l_e. By default, bbaasshh reads these
+ files when it is invoked as a login shell (see IINNVVOOCCAATTIIOONN
+ below).
+
+ ----nnoorrcc Do not read and execute the personal initialization file
+ _~_/_._b_a_s_h_r_c if the shell is interactive. This option is on by
+ default if the shell is invoked as sshh.
+
+ ----ppoossiixx
+ Change the behavior of bbaasshh where the default operation differs
+ from the POSIX standard to match the standard (_p_o_s_i_x _m_o_d_e).
+
+ ----rreessttrriicctteedd
+ The shell becomes restricted (see RREESSTTRRIICCTTEEDD SSHHEELLLL below).
+
+ ----vveerrbboossee
+ Equivalent to --vv.
+
+ ----vveerrssiioonn
+ Show version information for this instance of bbaasshh on the stan-
+ dard output and exit successfully.
+
+AARRGGUUMMEENNTTSS
+ If arguments remain after option processing, and neither the --cc nor the
+ --ss option has been supplied, the first argument is assumed to be the
+ name of a file containing shell commands. If bbaasshh is invoked in this
+ fashion, $$00 is set to the name of the file, and the positional parame-
+ ters are set to the remaining arguments. BBaasshh reads and executes com-
+ mands from this file, then exits. BBaasshh's exit status is the exit sta-
+ tus of the last command executed in the script. If no commands are
+ executed, the exit status is 0. An attempt is first made to open the
+ file in the current directory, and, if no file is found, then the shell
+ searches the directories in PPAATTHH for the script.
+
+IINNVVOOCCAATTIIOONN
+ A _l_o_g_i_n _s_h_e_l_l is one whose first character of argument zero is a --, or
+ one started with the ----llooggiinn option.
+
+ An _i_n_t_e_r_a_c_t_i_v_e shell is one started without non-option arguments and
+ without the --cc option whose standard input and error are both connected
+ to terminals (as determined by _i_s_a_t_t_y(3)), or one started with the --ii
+ option. PPSS11 is set and $$-- includes ii if bbaasshh is interactive, allowing
+ a shell script or a startup file to test this state.
+
+ The following paragraphs describe how bbaasshh executes its startup files.
+ If any of the files exist but cannot be read, bbaasshh reports an error.
+ Tildes are expanded in file names as described below under TTiillddee EExxppaann--
+ ssiioonn in the EEXXPPAANNSSIIOONN section.
+
+ When bbaasshh is invoked as an interactive login shell, or as a non-inter-
+ active shell with the ----llooggiinn option, it first reads and executes com-
+ mands from the file _/_e_t_c_/_p_r_o_f_i_l_e, if that file exists. After reading
+ that file, it looks for _~_/_._b_a_s_h___p_r_o_f_i_l_e, _~_/_._b_a_s_h___l_o_g_i_n, and _~_/_._p_r_o_f_i_l_e,
+ in that order, and reads and executes commands from the first one that
+ exists and is readable. The ----nnoopprrooffiillee option may be used when the
+ shell is started to inhibit this behavior.
+
+ When a login shell exits, bbaasshh reads and executes commands from the
+ file _~_/_._b_a_s_h___l_o_g_o_u_t, if it exists.
+
+ When an interactive shell that is not a login shell is started, bbaasshh
+ reads and executes commands from _~_/_._b_a_s_h_r_c, if that file exists. This
+ may be inhibited by using the ----nnoorrcc option. The ----rrccffiillee _f_i_l_e option
+ will force bbaasshh to read and execute commands from _f_i_l_e instead of
+ _~_/_._b_a_s_h_r_c.
+
+ When bbaasshh is started non-interactively, to run a shell script, for
+ example, it looks for the variable BBAASSHH__EENNVV in the environment, expands
+ its value if it appears there, and uses the expanded value as the name
+ of a file to read and execute. BBaasshh behaves as if the following com-
+ mand were executed:
+ if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
+ but the value of the PPAATTHH variable is not used to search for the file
+ name.
+
+ If bbaasshh is invoked with the name sshh, it tries to mimic the startup
+ behavior of historical versions of sshh as closely as possible, while
+ conforming to the POSIX standard as well. When invoked as an interac-
+ tive login shell, or a non-interactive shell with the ----llooggiinn option,
+ it first attempts to read and execute commands from _/_e_t_c_/_p_r_o_f_i_l_e and
+ _~_/_._p_r_o_f_i_l_e, in that order. The ----nnoopprrooffiillee option may be used to
+ inhibit this behavior. When invoked as an interactive shell with the
+ name sshh, bbaasshh looks for the variable EENNVV, expands its value if it is
+ defined, and uses the expanded value as the name of a file to read and
+ execute. Since a shell invoked as sshh does not attempt to read and exe-
+ cute commands from any other startup files, the ----rrccffiillee option has no
+ effect. A non-interactive shell invoked with the name sshh does not
+ attempt to read any other startup files. When invoked as sshh, bbaasshh
+ enters _p_o_s_i_x mode after the startup files are read.
+
+ When bbaasshh is started in _p_o_s_i_x mode, as with the ----ppoossiixx command line
+ option, it follows the POSIX standard for startup files. In this mode,
+ interactive shells expand the EENNVV variable and commands are read and
+ executed from the file whose name is the expanded value. No other
+ startup files are read.
+
+ BBaasshh attempts to determine when it is being run with its standard input
+ connected to a a network connection, as if by the remote shell daemon,
+ usually _r_s_h_d, or the secure shell daemon _s_s_h_d. If bbaasshh determines it
+ is being run in this fashion, it reads and executes commands from
+ _~_/_._b_a_s_h_r_c, if that file exists and is readable. It will not do this if
+ invoked as sshh. The ----nnoorrcc option may be used to inhibit this behavior,
+ and the ----rrccffiillee option may be used to force another file to be read,
+ but _r_s_h_d does not generally invoke the shell with those options or
+ allow them to be specified.
+
+ If the shell is started with the effective user (group) id not equal to
+ the real user (group) id, and the --pp option is not supplied, no startup
+ files are read, shell functions are not inherited from the environment,
+ the SSHHEELLLLOOPPTTSS, BBAASSHHOOPPTTSS, CCDDPPAATTHH, and GGLLOOBBIIGGNNOORREE variables, if they
+ appear in the environment, are ignored, and the effective user id is
+ set to the real user id. If the --pp option is supplied at invocation,
+ the startup behavior is the same, but the effective user id is not
+ reset.
+
+DDEEFFIINNIITTIIOONNSS
+ The following definitions are used throughout the rest of this docu-
+ ment.
+ bbllaannkk A space or tab.
+ wwoorrdd A sequence of characters considered as a single unit by the
+ shell. Also known as a ttookkeenn.
+ nnaammee A _w_o_r_d consisting only of alphanumeric characters and under-
+ scores, and beginning with an alphabetic character or an under-
+ score. Also referred to as an iiddeennttiiffiieerr.
+ mmeettaacchhaarraacctteerr
+ A character that, when unquoted, separates words. One of the
+ following:
+ || && ;; (( )) << >> ssppaaccee ttaabb
+ ccoonnttrrooll ooppeerraattoorr
+ A _t_o_k_e_n that performs a control function. It is one of the fol-
+ lowing symbols:
+ |||| && &&&& ;; ;;;; (( )) || ||&& <<nneewwlliinnee>>
+
+RREESSEERRVVEEDD WWOORRDDSS
+ _R_e_s_e_r_v_e_d _w_o_r_d_s are words that have a special meaning to the shell. The
+ following words are recognized as reserved when unquoted and either the
+ first word of a simple command (see SSHHEELLLL GGRRAAMMMMAARR below) or the third
+ word of a ccaassee or ffoorr command:
+
+ !! ccaassee ddoo ddoonnee eelliiff eellssee eessaacc ffii ffoorr ffuunnccttiioonn iiff iinn sseelleecctt tthheenn uunnttiill
+ wwhhiillee {{ }} ttiimmee [[[[ ]]]]
+
+SSHHEELLLL GGRRAAMMMMAARR
+ SSiimmppllee CCoommmmaannddss
+ A _s_i_m_p_l_e _c_o_m_m_a_n_d is a sequence of optional variable assignments fol-
+ lowed by bbllaannkk-separated words and redirections, and terminated by a
+ _c_o_n_t_r_o_l _o_p_e_r_a_t_o_r. The first word specifies the command to be executed,
+ and is passed as argument zero. The remaining words are passed as
+ arguments to the invoked command.
+
+ The return value of a _s_i_m_p_l_e _c_o_m_m_a_n_d is its exit status, or 128+_n if
+ the command is terminated by signal _n.
+
+ PPiippeelliinneess
+ A _p_i_p_e_l_i_n_e is a sequence of one or more commands separated by one of
+ the control operators || or ||&&. The format for a pipeline is:
+
+ [ttiimmee [--pp]] [ ! ] _c_o_m_m_a_n_d [ [|||||&&] _c_o_m_m_a_n_d_2 ... ]
+
+ The standard output of _c_o_m_m_a_n_d is connected via a pipe to the standard
+ input of _c_o_m_m_a_n_d_2. This connection is performed before any redirec-
+ tions specified by the command (see RREEDDIIRREECCTTIIOONN below). If ||&& is used,
+ the standard error of _c_o_m_m_a_n_d is connected to _c_o_m_m_a_n_d_2's standard input
+ through the pipe; it is shorthand for 22>>&&11 ||. This implicit redirect-
+ ion of the standard error is performed after any redirections specified
+ by the command.
+
+ The return status of a pipeline is the exit status of the last command,
+ unless the ppiippeeffaaiill option is enabled. If ppiippeeffaaiill is enabled, the
+ pipeline's return status is the value of the last (rightmost) command
+ to exit with a non-zero status, or zero if all commands exit success-
+ fully. If the reserved word !! precedes a pipeline, the exit status of
+ that pipeline is the logical negation of the exit status as described
+ above. The shell waits for all commands in the pipeline to terminate
+ before returning a value.
+
+ If the ttiimmee reserved word precedes a pipeline, the elapsed as well as
+ user and system time consumed by its execution are reported when the
+ pipeline terminates. The --pp option changes the output format to that
+ specified by POSIX. The TTIIMMEEFFOORRMMAATT variable may be set to a format
+ string that specifies how the timing information should be displayed;
+ see the description of TTIIMMEEFFOORRMMAATT under SShheellll VVaarriiaabblleess below.
+
+ Each command in a pipeline is executed as a separate process (i.e., in
+ a subshell).
+
+ LLiissttss
+ A _l_i_s_t is a sequence of one or more pipelines separated by one of the
+ operators ;;, &&, &&&&, or ||||, and optionally terminated by one of ;;, &&, or
+ <<nneewwlliinnee>>.
+
+ Of these list operators, &&&& and |||| have equal precedence, followed by ;;
+ and &&, which have equal precedence.
+
+ A sequence of one or more newlines may appear in a _l_i_s_t instead of a
+ semicolon to delimit commands.
+
+ If a command is terminated by the control operator &&, the shell exe-
+ cutes the command in the _b_a_c_k_g_r_o_u_n_d in a subshell. The shell does not
+ wait for the command to finish, and the return status is 0. Commands
+ separated by a ;; are executed sequentially; the shell waits for each
+ command to terminate in turn. The return status is the exit status of
+ the last command executed.
+
+ AND and OR lists are sequences of one of more pipelines separated by
+ the &&&& and |||| control operators, respectively. AND and OR lists are
+ executed with left associativity. An AND list has the form
+
+ _c_o_m_m_a_n_d_1 &&&& _c_o_m_m_a_n_d_2
+
+ _c_o_m_m_a_n_d_2 is executed if, and only if, _c_o_m_m_a_n_d_1 returns an exit status
+ of zero.
+
+ An OR list has the form
+
+ _c_o_m_m_a_n_d_1 |||| _c_o_m_m_a_n_d_2
+
+
+ _c_o_m_m_a_n_d_2 is executed if and only if _c_o_m_m_a_n_d_1 returns a non-zero exit
+ status. The return status of AND and OR lists is the exit status of
+ the last command executed in the list.
+
+ CCoommppoouunndd CCoommmmaannddss
+ A _c_o_m_p_o_u_n_d _c_o_m_m_a_n_d is one of the following:
+
+ (_l_i_s_t) _l_i_s_t is executed in a subshell environment (see CCOOMMMMAANNDD EEXXEECCUU--
+ TTIIOONN EENNVVIIRROONNMMEENNTT below). Variable assignments and builtin com-
+ mands that affect the shell's environment do not remain in
+ effect after the command completes. The return status is the
+ exit status of _l_i_s_t.
+
+ { _l_i_s_t; }
+ _l_i_s_t is simply executed in the current shell environment. _l_i_s_t
+ must be terminated with a newline or semicolon. This is known
+ as a _g_r_o_u_p _c_o_m_m_a_n_d. The return status is the exit status of
+ _l_i_s_t. Note that unlike the metacharacters (( and )), {{ and }} are
+ _r_e_s_e_r_v_e_d _w_o_r_d_s and must occur where a reserved word is permitted
+ to be recognized. Since they do not cause a word break, they
+ must be separated from _l_i_s_t by whitespace or another shell
+ metacharacter.
+
+ ((_e_x_p_r_e_s_s_i_o_n))
+ The _e_x_p_r_e_s_s_i_o_n is evaluated according to the rules described
+ below under AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN. If the value of the expres-
+ sion is non-zero, the return status is 0; otherwise the return
+ status is 1. This is exactly equivalent to lleett ""_e_x_p_r_e_s_s_i_o_n"".
+
+ [[[[ _e_x_p_r_e_s_s_i_o_n ]]]]
+ Return a status of 0 or 1 depending on the evaluation of the
+ conditional expression _e_x_p_r_e_s_s_i_o_n. Expressions are composed of
+ the primaries described below under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS.
+ Word splitting and pathname expansion are not performed on the
+ words between the [[[[ and ]]]]; tilde expansion, parameter and
+ variable expansion, arithmetic expansion, command substitution,
+ process substitution, and quote removal are performed. Condi-
+ tional operators such as --ff must be unquoted to be recognized as
+ primaries.
+
+ When used with [[[[, The << and >> operators sort lexicographically
+ using the current locale.
+
+ When the ==== and !!== operators are used, the string to the right
+ of the operator is considered a pattern and matched according to
+ the rules described below under PPaatttteerrnn MMaattcchhiinngg. If the shell
+ option nnooccaasseemmaattcchh is enabled, the match is performed without
+ regard to the case of alphabetic characters. The return value
+ is 0 if the string matches (====) or does not match (!!==) the pat-
+ tern, and 1 otherwise. Any part of the pattern may be quoted to
+ force it to be matched as a string.
+
+ An additional binary operator, ==~~, is available, with the same
+ precedence as ==== and !!==. When it is used, the string to the
+ right of the operator is considered an extended regular expres-
+ sion and matched accordingly (as in _r_e_g_e_x(3)). The return value
+ is 0 if the string matches the pattern, and 1 otherwise. If the
+ regular expression is syntactically incorrect, the conditional
+ expression's return value is 2. If the shell option nnooccaasseemmaattcchh
+ is enabled, the match is performed without regard to the case of
+ alphabetic characters. Any part of the pattern may be quoted to
+ force it to be matched as a string. Substrings matched by
+ parenthesized subexpressions within the regular expression are
+ saved in the array variable BBAASSHH__RREEMMAATTCCHH. The element of
+ BBAASSHH__RREEMMAATTCCHH with index 0 is the portion of the string matching
+ the entire regular expression. The element of BBAASSHH__RREEMMAATTCCHH with
+ index _n is the portion of the string matching the _nth parenthe-
+ sized subexpression.
+
+ Expressions may be combined using the following operators,
+ listed in decreasing order of precedence:
+
+ (( _e_x_p_r_e_s_s_i_o_n ))
+ Returns the value of _e_x_p_r_e_s_s_i_o_n. This may be used to
+ override the normal precedence of operators.
+ !! _e_x_p_r_e_s_s_i_o_n
+ True if _e_x_p_r_e_s_s_i_o_n is false.
+ _e_x_p_r_e_s_s_i_o_n_1 &&&& _e_x_p_r_e_s_s_i_o_n_2
+ True if both _e_x_p_r_e_s_s_i_o_n_1 and _e_x_p_r_e_s_s_i_o_n_2 are true.
+ _e_x_p_r_e_s_s_i_o_n_1 |||| _e_x_p_r_e_s_s_i_o_n_2
+ True if either _e_x_p_r_e_s_s_i_o_n_1 or _e_x_p_r_e_s_s_i_o_n_2 is true.
+
+ The &&&& and |||| operators do not evaluate _e_x_p_r_e_s_s_i_o_n_2 if the value
+ of _e_x_p_r_e_s_s_i_o_n_1 is sufficient to determine the return value of
+ the entire conditional expression.
+
+ ffoorr _n_a_m_e [ [ iinn [ _w_o_r_d _._._. ] ] ; ] ddoo _l_i_s_t ; ddoonnee
+ The list of words following iinn is expanded, generating a list of
+ items. The variable _n_a_m_e is set to each element of this list in
+ turn, and _l_i_s_t is executed each time. If the iinn _w_o_r_d is omit-
+ ted, the ffoorr command executes _l_i_s_t once for each positional
+ parameter that is set (see PPAARRAAMMEETTEERRSS below). The return status
+ is the exit status of the last command that executes. If the
+ expansion of the items following iinn results in an empty list, no
+ commands are executed, and the return status is 0.
+
+ ffoorr (( _e_x_p_r_1 ; _e_x_p_r_2 ; _e_x_p_r_3 )) ; ddoo _l_i_s_t ; ddoonnee
+ First, the arithmetic expression _e_x_p_r_1 is evaluated according to
+ the rules described below under AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN. The
+ arithmetic expression _e_x_p_r_2 is then evaluated repeatedly until
+ it evaluates to zero. Each time _e_x_p_r_2 evaluates to a non-zero
+ value, _l_i_s_t is executed and the arithmetic expression _e_x_p_r_3 is
+ evaluated. If any expression is omitted, it behaves as if it
+ evaluates to 1. The return value is the exit status of the last
+ command in _l_i_s_t that is executed, or false if any of the expres-
+ sions is invalid.
+
+ sseelleecctt _n_a_m_e [ iinn _w_o_r_d ] ; ddoo _l_i_s_t ; ddoonnee
+ The list of words following iinn is expanded, generating a list of
+ items. The set of expanded words is printed on the standard
+ error, each preceded by a number. If the iinn _w_o_r_d is omitted,
+ the positional parameters are printed (see PPAARRAAMMEETTEERRSS below).
+ The PPSS33 prompt is then displayed and a line read from the stan-
+ dard input. If the line consists of a number corresponding to
+ one of the displayed words, then the value of _n_a_m_e is set to
+ that word. If the line is empty, the words and prompt are dis-
+ played again. If EOF is read, the command completes. Any other
+ value read causes _n_a_m_e to be set to null. The line read is
+ saved in the variable RREEPPLLYY. The _l_i_s_t is executed after each
+ selection until a bbrreeaakk command is executed. The exit status of
+ sseelleecctt is the exit status of the last command executed in _l_i_s_t,
+ or zero if no commands were executed.
+
+ ccaassee _w_o_r_d iinn [ [(] _p_a_t_t_e_r_n [ || _p_a_t_t_e_r_n ] ... ) _l_i_s_t ;; ] ... eessaacc
+ A ccaassee command first expands _w_o_r_d, and tries to match it against
+ each _p_a_t_t_e_r_n in turn, using the same matching rules as for path-
+ name expansion (see PPaatthhnnaammee EExxppaannssiioonn below). The _w_o_r_d is
+ expanded using tilde expansion, parameter and variable expan-
+ sion, arithmetic substitution, command substitution, process
+ substitution and quote removal. Each _p_a_t_t_e_r_n examined is
+ expanded using tilde expansion, parameter and variable expan-
+ sion, arithmetic substitution, command substitution, and process
+ substitution. If the shell option nnooccaasseemmaattcchh is enabled, the
+ match is performed without regard to the case of alphabetic
+ characters. When a match is found, the corresponding _l_i_s_t is
+ executed. If the ;;;; operator is used, no subsequent matches are
+ attempted after the first pattern match. Using ;;&& in place of
+ ;;;; causes execution to continue with the _l_i_s_t associated with
+ the next set of patterns. Using ;;;;&& in place of ;;;; causes the
+ shell to test the next pattern list in the statement, if any,
+ and execute any associated _l_i_s_t on a successful match. The exit
+ status is zero if no pattern matches. Otherwise, it is the exit
+ status of the last command executed in _l_i_s_t.
+
+ iiff _l_i_s_t; tthheenn _l_i_s_t_; [ eelliiff _l_i_s_t; tthheenn _l_i_s_t; ] ... [ eellssee _l_i_s_t; ] ffii
+ The iiff _l_i_s_t is executed. If its exit status is zero, the tthheenn
+ _l_i_s_t is executed. Otherwise, each eelliiff _l_i_s_t is executed in
+ turn, and if its exit status is zero, the corresponding tthheenn
+ _l_i_s_t is executed and the command completes. Otherwise, the eellssee
+ _l_i_s_t is executed, if present. The exit status is the exit sta-
+ tus of the last command executed, or zero if no condition tested
+ true.
+
+ wwhhiillee _l_i_s_t; ddoo _l_i_s_t; ddoonnee
+ uunnttiill _l_i_s_t; ddoo _l_i_s_t; ddoonnee
+ The wwhhiillee command continuously executes the ddoo _l_i_s_t as long as
+ the last command in _l_i_s_t returns an exit status of zero. The
+ uunnttiill command is identical to the wwhhiillee command, except that the
+ test is negated; the ddoo _l_i_s_t is executed as long as the last
+ command in _l_i_s_t returns a non-zero exit status. The exit status
+ of the wwhhiillee and uunnttiill commands is the exit status of the last
+ ddoo _l_i_s_t command executed, or zero if none was executed.
+
+ CCoopprroocceesssseess
+ A _c_o_p_r_o_c_e_s_s is a shell command preceded by the ccoopprroocc reserved word. A
+ coprocess is executed asynchronously in a subshell, as if the command
+ had been terminated with the && control operator, with a two-way pipe
+ established between the executing shell and the coprocess.
+
+ The format for a coprocess is:
+
+ ccoopprroocc [_N_A_M_E] _c_o_m_m_a_n_d [_r_e_d_i_r_e_c_t_i_o_n_s]
+
+ This creates a coprocess named _N_A_M_E. If _N_A_M_E is not supplied, the
+ default name is _C_O_P_R_O_C. _N_A_M_E must not be supplied if _c_o_m_m_a_n_d is a _s_i_m_-
+ _p_l_e _c_o_m_m_a_n_d (see above); otherwise, it is interpreted as the first word
+ of the simple command. When the coproc is executed, the shell creates
+ an array variable (see AArrrraayyss below) named _N_A_M_E in the context of the
+ executing shell. The standard output of _c_o_m_m_a_n_d is connected via a
+ pipe to a file descriptor in the executing shell, and that file
+ descriptor is assigned to _N_A_M_E[0]. The standard input of _c_o_m_m_a_n_d is
+ connected via a pipe to a file descriptor in the executing shell, and
+ that file descriptor is assigned to _N_A_M_E[1]. This pipe is established
+ before any redirections specified by the command (see RREEDDIIRREECCTTIIOONN
+ below). The file descriptors can be utilized as arguments to shell
+ commands and redirections using standard word expansions. The process
+ id of the shell spawned to execute the coprocess is available as the
+ value of the variable _N_A_M_E_PID. The wwaaiitt builtin command may be used
+ to wait for the coprocess to terminate.
+
+ The return status of a coprocess is the exit status of _c_o_m_m_a_n_d.
+
+ SShheellll FFuunnccttiioonn DDeeffiinniittiioonnss
+ A shell function is an object that is called like a simple command and
+ executes a compound command with a new set of positional parameters.
+ Shell functions are declared as follows:
+
+ [ ffuunnccttiioonn ] _n_a_m_e () _c_o_m_p_o_u_n_d_-_c_o_m_m_a_n_d [_r_e_d_i_r_e_c_t_i_o_n]
+ This defines a function named _n_a_m_e. The reserved word ffuunnccttiioonn
+ is optional. If the ffuunnccttiioonn reserved word is supplied, the
+ parentheses are optional. The _b_o_d_y of the function is the com-
+ pound command _c_o_m_p_o_u_n_d_-_c_o_m_m_a_n_d (see CCoommppoouunndd CCoommmmaannddss above).
+ That command is usually a _l_i_s_t of commands between { and }, but
+ may be any command listed under CCoommppoouunndd CCoommmmaannddss above. _c_o_m_-
+ _p_o_u_n_d_-_c_o_m_m_a_n_d is executed whenever _n_a_m_e is specified as the name
+ of a simple command. Any redirections (see RREEDDIIRREECCTTIIOONN below)
+ specified when a function is defined are performed when the
+ function is executed. The exit status of a function definition
+ is zero unless a syntax error occurs or a readonly function with
+ the same name already exists. When executed, the exit status of
+ a function is the exit status of the last command executed in
+ the body. (See FFUUNNCCTTIIOONNSS below.)
+
+CCOOMMMMEENNTTSS
+ In a non-interactive shell, or an interactive shell in which the iinntteerr--
+ aaccttiivvee__ccoommmmeennttss option to the sshhoopptt builtin is enabled (see SSHHEELLLL
+ BBUUIILLTTIINN CCOOMMMMAANNDDSS below), a word beginning with ## causes that word and
+ all remaining characters on that line to be ignored. An interactive
+ shell without the iinntteerraaccttiivvee__ccoommmmeennttss option enabled does not allow
+ comments. The iinntteerraaccttiivvee__ccoommmmeennttss option is on by default in interac-
+ tive shells.
+
+QQUUOOTTIINNGG
+ _Q_u_o_t_i_n_g is used to remove the special meaning of certain characters or
+ words to the shell. Quoting can be used to disable special treatment
+ for special characters, to prevent reserved words from being recognized
+ as such, and to prevent parameter expansion.
+
+ Each of the _m_e_t_a_c_h_a_r_a_c_t_e_r_s listed above under DDEEFFIINNIITTIIOONNSS has special
+ meaning to the shell and must be quoted if it is to represent itself.
+
+ When the command history expansion facilities are being used (see HHIISS--
+ TTOORRYY EEXXPPAANNSSIIOONN below), the _h_i_s_t_o_r_y _e_x_p_a_n_s_i_o_n character, usually !!, must
+ be quoted to prevent history expansion.
+
+ There are three quoting mechanisms: the _e_s_c_a_p_e _c_h_a_r_a_c_t_e_r, single
+ quotes, and double quotes.
+
+ A non-quoted backslash (\\) is the _e_s_c_a_p_e _c_h_a_r_a_c_t_e_r. It preserves the
+ literal value of the next character that follows, with the exception of
+ <newline>. If a \\<newline> pair appears, and the backslash is not
+ itself quoted, the \\<newline> is treated as a line continuation (that
+ is, it is removed from the input stream and effectively ignored).
+
+ Enclosing characters in single quotes preserves the literal value of
+ each character within the quotes. A single quote may not occur between
+ single quotes, even when preceded by a backslash.
+
+ Enclosing characters in double quotes preserves the literal value of
+ all characters within the quotes, with the exception of $$, ``, \\, and,
+ when history expansion is enabled, !!. The characters $$ and `` retain
+ their special meaning within double quotes. The backslash retains its
+ special meaning only when followed by one of the following characters:
+ $$, ``, "", \\, or <<nneewwlliinnee>>. A double quote may be quoted within double
+ quotes by preceding it with a backslash. If enabled, history expansion
+ will be performed unless an !! appearing in double quotes is escaped
+ using a backslash. The backslash preceding the !! is not removed.
+
+ The special parameters ** and @@ have special meaning when in double
+ quotes (see PPAARRAAMMEETTEERRSS below).
+
+ Words of the form $$'_s_t_r_i_n_g' are treated specially. The word expands to
+ _s_t_r_i_n_g, with backslash-escaped characters replaced as specified by the
+ ANSI C standard. Backslash escape sequences, if present, are decoded
+ as follows:
+ \\aa alert (bell)
+ \\bb backspace
+ \\ee
+ \\EE an escape character
+ \\ff form feed
+ \\nn new line
+ \\rr carriage return
+ \\tt horizontal tab
+ \\vv vertical tab
+ \\\\ backslash
+ \\'' single quote
+ \\"" double quote
+ \\_n_n_n the eight-bit character whose value is the octal value
+ _n_n_n (one to three digits)
+ \\xx_H_H the eight-bit character whose value is the hexadecimal
+ value _H_H (one or two hex digits)
+ \\cc_x a control-_x character
+
+ The expanded result is single-quoted, as if the dollar sign had not
+ been present.
+
+ A double-quoted string preceded by a dollar sign ($$"_s_t_r_i_n_g") will cause
+ the string to be translated according to the current locale. If the
+ current locale is CC or PPOOSSIIXX, the dollar sign is ignored. If the
+ string is translated and replaced, the replacement is double-quoted.
+
+PPAARRAAMMEETTEERRSS
+ A _p_a_r_a_m_e_t_e_r is an entity that stores values. It can be a _n_a_m_e, a num-
+ ber, or one of the special characters listed below under SSppeecciiaall PPaarraamm--
+ eetteerrss. A _v_a_r_i_a_b_l_e is a parameter denoted by a _n_a_m_e. A variable has a
+ _v_a_l_u_e and zero or more _a_t_t_r_i_b_u_t_e_s. Attributes are assigned using the
+ ddeeccllaarree builtin command (see ddeeccllaarree below in SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS).
+
+ A parameter is set if it has been assigned a value. The null string is
+ a valid value. Once a variable is set, it may be unset only by using
+ the uunnsseett builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below).
+
+ A _v_a_r_i_a_b_l_e may be assigned to by a statement of the form
+
+ _n_a_m_e=[_v_a_l_u_e]
+
+ If _v_a_l_u_e is not given, the variable is assigned the null string. All
+ _v_a_l_u_e_s undergo tilde expansion, parameter and variable expansion, com-
+ mand substitution, arithmetic expansion, and quote removal (see EEXXPPAANN--
+ SSIIOONN below). If the variable has its iinntteeggeerr attribute set, then _v_a_l_u_e
+ is evaluated as an arithmetic expression even if the $((...)) expansion
+ is not used (see AArriitthhmmeettiicc EExxppaannssiioonn below). Word splitting is not
+ performed, with the exception of ""$$@@"" as explained below under SSppeecciiaall
+ PPaarraammeetteerrss. Pathname expansion is not performed. Assignment state-
+ ments may also appear as arguments to the aalliiaass, ddeeccllaarree, ttyyppeesseett,
+ eexxppoorrtt, rreeaaddoonnllyy, and llooccaall builtin commands.
+
+ In the context where an assignment statement is assigning a value to a
+ shell variable or array index, the += operator can be used to append to
+ or add to the variable's previous value. When += is applied to a vari-
+ able for which the integer attribute has been set, _v_a_l_u_e is evaluated
+ as an arithmetic expression and added to the variable's current value,
+ which is also evaluated. When += is applied to an array variable using
+ compound assignment (see AArrrraayyss below), the variable's value is not
+ unset (as it is when using =), and new values are appended to the array
+ beginning at one greater than the array's maximum index (for indexed
+ arrays) or added as additional key-value pairs in an associative array.
+ When applied to a string-valued variable, _v_a_l_u_e is expanded and
+ appended to the variable's value.
+
+ PPoossiittiioonnaall PPaarraammeetteerrss
+ A _p_o_s_i_t_i_o_n_a_l _p_a_r_a_m_e_t_e_r is a parameter denoted by one or more digits,
+ other than the single digit 0. Positional parameters are assigned from
+ the shell's arguments when it is invoked, and may be reassigned using
+ the sseett builtin command. Positional parameters may not be assigned to
+ with assignment statements. The positional parameters are temporarily
+ replaced when a shell function is executed (see FFUUNNCCTTIIOONNSS below).
+
+ When a positional parameter consisting of more than a single digit is
+ expanded, it must be enclosed in braces (see EEXXPPAANNSSIIOONN below).
+
+ SSppeecciiaall PPaarraammeetteerrss
+ The shell treats several parameters specially. These parameters may
+ only be referenced; assignment to them is not allowed.
+ ** Expands to the positional parameters, starting from one. When
+ the expansion occurs within double quotes, it expands to a sin-
+ gle word with the value of each parameter separated by the first
+ character of the IIFFSS special variable. That is, "$$**" is equiva-
+ lent to "$$11_c$$22_c......", where _c is the first character of the value
+ of the IIFFSS variable. If IIFFSS is unset, the parameters are sepa-
+ rated by spaces. If IIFFSS is null, the parameters are joined
+ without intervening separators.
+ @@ Expands to the positional parameters, starting from one. When
+ the expansion occurs within double quotes, each parameter
+ expands to a separate word. That is, "$$@@" is equivalent to "$$11"
+ "$$22" ... If the double-quoted expansion occurs within a word,
+ the expansion of the first parameter is joined with the begin-
+ ning part of the original word, and the expansion of the last
+ parameter is joined with the last part of the original word.
+ When there are no positional parameters, "$$@@" and $$@@ expand to
+ nothing (i.e., they are removed).
+ ## Expands to the number of positional parameters in decimal.
+ ?? Expands to the exit status of the most recently executed fore-
+ ground pipeline.
+ -- Expands to the current option flags as specified upon invoca-
+ tion, by the sseett builtin command, or those set by the shell
+ itself (such as the --ii option).
+ $$ Expands to the process ID of the shell. In a () subshell, it
+ expands to the process ID of the current shell, not the sub-
+ shell.
+ !! Expands to the process ID of the most recently executed back-
+ ground (asynchronous) command.
+ 00 Expands to the name of the shell or shell script. This is set
+ at shell initialization. If bbaasshh is invoked with a file of com-
+ mands, $$00 is set to the name of that file. If bbaasshh is started
+ with the --cc option, then $$00 is set to the first argument after
+ the string to be executed, if one is present. Otherwise, it is
+ set to the file name used to invoke bbaasshh, as given by argument
+ zero.
+ __ At shell startup, set to the absolute pathname used to invoke
+ the shell or shell script being executed as passed in the envi-
+ ronment or argument list. Subsequently, expands to the last
+ argument to the previous command, after expansion. Also set to
+ the full pathname used to invoke each command executed and
+ placed in the environment exported to that command. When check-
+ ing mail, this parameter holds the name of the mail file cur-
+ rently being checked.
+
+ SShheellll VVaarriiaabblleess
+ The following variables are set by the shell:
+
+ BBAASSHH Expands to the full file name used to invoke this instance of
+ bbaasshh.
+ BBAASSHHOOPPTTSS
+ A colon-separated list of enabled shell options. Each word in
+ the list is a valid argument for the --ss option to the sshhoopptt
+ builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). The options
+ appearing in BBAASSHHOOPPTTSS are those reported as _o_n by sshhoopptt. If
+ this variable is in the environment when bbaasshh starts up, each
+ shell option in the list will be enabled before reading any
+ startup files. This variable is read-only.
+ BBAASSHHPPIIDD
+ Expands to the process id of the current bbaasshh process. This
+ differs from $$$$ under certain circumstances, such as subshells
+ that do not require bbaasshh to be re-initialized.
+ BBAASSHH__AALLIIAASSEESS
+ An associative array variable whose members correspond to the
+ internal list of aliases as maintained by the aalliiaass builtin Ele-
+ ments added to this array appear in the alias list; unsetting
+ array elements cause aliases to be removed from the alias list.
+ BBAASSHH__AARRGGCC
+ An array variable whose values are the number of parameters in
+ each frame of the current bbaasshh execution call stack. The number
+ of parameters to the current subroutine (shell function or
+ script executed with .. or ssoouurrccee) is at the top of the stack.
+ When a subroutine is executed, the number of parameters passed
+ is pushed onto BBAASSHH__AARRGGCC. The shell sets BBAASSHH__AARRGGCC only when in
+ extended debugging mode (see the description of the eexxttddeebbuugg
+ option to the sshhoopptt builtin below)
+ BBAASSHH__AARRGGVV
+ An array variable containing all of the parameters in the cur-
+ rent bbaasshh execution call stack. The final parameter of the last
+ subroutine call is at the top of the stack; the first parameter
+ of the initial call is at the bottom. When a subroutine is exe-
+ cuted, the parameters supplied are pushed onto BBAASSHH__AARRGGVV. The
+ shell sets BBAASSHH__AARRGGVV only when in extended debugging mode (see
+ the description of the eexxttddeebbuugg option to the sshhoopptt builtin
+ below)
+ BBAASSHH__CCMMDDSS
+ An associative array variable whose members correspond to the
+ internal hash table of commands as maintained by the hhaasshh
+ builtin. Elements added to this array appear in the hash table;
+ unsetting array elements cause commands to be removed from the
+ hash table.
+ BBAASSHH__CCOOMMMMAANNDD
+ The command currently being executed or about to be executed,
+ unless the shell is executing a command as the result of a trap,
+ in which case it is the command executing at the time of the
+ trap.
+ BBAASSHH__EEXXEECCUUTTIIOONN__SSTTRRIINNGG
+ The command argument to the --cc invocation option.
+ BBAASSHH__LLIINNEENNOO
+ An array variable whose members are the line numbers in source
+ files corresponding to each member of FFUUNNCCNNAAMMEE.
+ $${{BBAASSHH__LLIINNEENNOO[[_$_i]]}} is the line number in the source file where
+ $${{FFUUNNCCNNAAMMEE[[_$_i]]}} was called (or $${{BBAASSHH__LLIINNEENNOO[[_$_i_-_1]]}} if refer-
+ enced within another shell function). The corresponding source
+ file name is $${{BBAASSHH__SSOOUURRCCEE[[_$_i]]}}. Use LLIINNEENNOO to obtain the cur-
+ rent line number.
+ BBAASSHH__RREEMMAATTCCHH
+ An array variable whose members are assigned by the ==~~ binary
+ operator to the [[[[ conditional command. The element with index
+ 0 is the portion of the string matching the entire regular
+ expression. The element with index _n is the portion of the
+ string matching the _nth parenthesized subexpression. This vari-
+ able is read-only.
+ BBAASSHH__SSOOUURRCCEE
+ An array variable whose members are the source filenames corre-
+ sponding to the elements in the FFUUNNCCNNAAMMEE array variable.
+ BBAASSHH__SSUUBBSSHHEELLLL
+ Incremented by one each time a subshell or subshell environment
+ is spawned. The initial value is 0.
+ BBAASSHH__VVEERRSSIINNFFOO
+ A readonly array variable whose members hold version information
+ for this instance of bbaasshh. The values assigned to the array
+ members are as follows:
+ BBAASSHH__VVEERRSSIINNFFOO[[0]] The major version number (the _r_e_l_e_a_s_e).
+ BBAASSHH__VVEERRSSIINNFFOO[[1]] The minor version number (the _v_e_r_s_i_o_n).
+ BBAASSHH__VVEERRSSIINNFFOO[[2]] The patch level.
+ BBAASSHH__VVEERRSSIINNFFOO[[3]] The build version.
+ BBAASSHH__VVEERRSSIINNFFOO[[4]] The release status (e.g., _b_e_t_a_1).
+ BBAASSHH__VVEERRSSIINNFFOO[[5]] The value of MMAACCHHTTYYPPEE.
+
+ BBAASSHH__VVEERRSSIIOONN
+ Expands to a string describing the version of this instance of
+ bbaasshh.
+
+ CCOOMMPP__CCWWOORRDD
+ An index into $${{CCOOMMPP__WWOORRDDSS}} of the word containing the current
+ cursor position. This variable is available only in shell func-
+ tions invoked by the programmable completion facilities (see
+ PPrrooggrraammmmaabbllee CCoommpplleettiioonn below).
+
+ CCOOMMPP__KKEEYY
+ The key (or final key of a key sequence) used to invoke the cur-
+ rent completion function.
+
+ CCOOMMPP__LLIINNEE
+ The current command line. This variable is available only in
+ shell functions and external commands invoked by the pro-
+ grammable completion facilities (see PPrrooggrraammmmaabbllee CCoommpplleettiioonn
+ below).
+
+ CCOOMMPP__PPOOIINNTT
+ The index of the current cursor position relative to the begin-
+ ning of the current command. If the current cursor position is
+ at the end of the current command, the value of this variable is
+ equal to $${{##CCOOMMPP__LLIINNEE}}. This variable is available only in
+ shell functions and external commands invoked by the pro-
+ grammable completion facilities (see PPrrooggrraammmmaabbllee CCoommpplleettiioonn
+ below).
+
+ CCOOMMPP__TTYYPPEE
+ Set to an integer value corresponding to the type of completion
+ attempted that caused a completion function to be called: _T_A_B,
+ for normal completion, _?, for listing completions after succes-
+ sive tabs, _!, for listing alternatives on partial word comple-
+ tion, _@, to list completions if the word is not unmodified, or
+ _%, for menu completion. This variable is available only in
+ shell functions and external commands invoked by the pro-
+ grammable completion facilities (see PPrrooggrraammmmaabbllee CCoommpplleettiioonn
+ below).
+
+ CCOOMMPP__WWOORRDDBBRREEAAKKSS
+ The set of characters that the rreeaaddlliinnee library treats as word
+ separators when performing word completion. If CCOOMMPP__WWOORRDDBBRREEAAKKSS
+ is unset, it loses its special properties, even if it is subse-
+ quently reset.
+
+ CCOOMMPP__WWOORRDDSS
+ An array variable (see AArrrraayyss below) consisting of the individ-
+ ual words in the current command line. The line is split into
+ words as rreeaaddlliinnee would split it, using CCOOMMPP__WWOORRDDBBRREEAAKKSS as
+ described above. This variable is available only in shell func-
+ tions invoked by the programmable completion facilities (see
+ PPrrooggrraammmmaabbllee CCoommpplleettiioonn below).
+
+ DDIIRRSSTTAACCKK
+ An array variable (see AArrrraayyss below) containing the current con-
+ tents of the directory stack. Directories appear in the stack
+ in the order they are displayed by the ddiirrss builtin. Assigning
+ to members of this array variable may be used to modify directo-
+ ries already in the stack, but the ppuusshhdd and ppooppdd builtins must
+ be used to add and remove directories. Assignment to this vari-
+ able will not change the current directory. If DDIIRRSSTTAACCKK is
+ unset, it loses its special properties, even if it is subse-
+ quently reset.
+
+ EEUUIIDD Expands to the effective user ID of the current user, initial-
+ ized at shell startup. This variable is readonly.
+
+ FFUUNNCCNNAAMMEE
+ An array variable containing the names of all shell functions
+ currently in the execution call stack. The element with index 0
+ is the name of any currently-executing shell function. The bot-
+ tom-most element is "main". This variable exists only when a
+ shell function is executing. Assignments to FFUUNNCCNNAAMMEE have no
+ effect and return an error status. If FFUUNNCCNNAAMMEE is unset, it
+ loses its special properties, even if it is subsequently reset.
+
+ GGRROOUUPPSS An array variable containing the list of groups of which the
+ current user is a member. Assignments to GGRROOUUPPSS have no effect
+ and return an error status. If GGRROOUUPPSS is unset, it loses its
+ special properties, even if it is subsequently reset.
+
+ HHIISSTTCCMMDD
+ The history number, or index in the history list, of the current
+ command. If HHIISSTTCCMMDD is unset, it loses its special properties,
+ even if it is subsequently reset.
+
+ HHOOSSTTNNAAMMEE
+ Automatically set to the name of the current host.
+
+ HHOOSSTTTTYYPPEE
+ Automatically set to a string that uniquely describes the type
+ of machine on which bbaasshh is executing. The default is system-
+ dependent.
+
+ LLIINNEENNOO Each time this parameter is referenced, the shell substitutes a
+ decimal number representing the current sequential line number
+ (starting with 1) within a script or function. When not in a
+ script or function, the value substituted is not guaranteed to
+ be meaningful. If LLIINNEENNOO is unset, it loses its special proper-
+ ties, even if it is subsequently reset.
+
+ MMAACCHHTTYYPPEE
+ Automatically set to a string that fully describes the system
+ type on which bbaasshh is executing, in the standard GNU _c_p_u_-_c_o_m_-
+ _p_a_n_y_-_s_y_s_t_e_m format. The default is system-dependent.
+
+ OOLLDDPPWWDD The previous working directory as set by the ccdd command.
+
+ OOPPTTAARRGG The value of the last option argument processed by the ggeettooppttss
+ builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below).
+
+ OOPPTTIINNDD The index of the next argument to be processed by the ggeettooppttss
+ builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below).
+
+ OOSSTTYYPPEE Automatically set to a string that describes the operating sys-
+ tem on which bbaasshh is executing. The default is system-depen-
+ dent.
+
+ PPIIPPEESSTTAATTUUSS
+ An array variable (see AArrrraayyss below) containing a list of exit
+ status values from the processes in the most-recently-executed
+ foreground pipeline (which may contain only a single command).
+
+ PPPPIIDD The process ID of the shell's parent. This variable is read-
+ only.
+
+ PPWWDD The current working directory as set by the ccdd command.
+
+ RRAANNDDOOMM Each time this parameter is referenced, a random integer between
+ 0 and 32767 is generated. The sequence of random numbers may be
+ initialized by assigning a value to RRAANNDDOOMM. If RRAANNDDOOMM is unset,
+ it loses its special properties, even if it is subsequently
+ reset.
+
+ RREEPPLLYY Set to the line of input read by the rreeaadd builtin command when
+ no arguments are supplied.
+
+ SSEECCOONNDDSS
+ Each time this parameter is referenced, the number of seconds
+ since shell invocation is returned. If a value is assigned to
+ SSEECCOONNDDSS, the value returned upon subsequent references is the
+ number of seconds since the assignment plus the value assigned.
+ If SSEECCOONNDDSS is unset, it loses its special properties, even if it
+ is subsequently reset.
+
+ SSHHEELLLLOOPPTTSS
+ A colon-separated list of enabled shell options. Each word in
+ the list is a valid argument for the --oo option to the sseett
+ builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). The options
+ appearing in SSHHEELLLLOOPPTTSS are those reported as _o_n by sseett --oo. If
+ this variable is in the environment when bbaasshh starts up, each
+ shell option in the list will be enabled before reading any
+ startup files. This variable is read-only.
+
+ SSHHLLVVLL Incremented by one each time an instance of bbaasshh is started.
+
+ UUIIDD Expands to the user ID of the current user, initialized at shell
+ startup. This variable is readonly.
+
+ The following variables are used by the shell. In some cases, bbaasshh
+ assigns a default value to a variable; these cases are noted below.
+
+ BBAASSHH__EENNVV
+ If this parameter is set when bbaasshh is executing a shell script,
+ its value is interpreted as a filename containing commands to
+ initialize the shell, as in _~_/_._b_a_s_h_r_c. The value of BBAASSHH__EENNVV is
+ subjected to parameter expansion, command substitution, and
+ arithmetic expansion before being interpreted as a file name.
+ PPAATTHH is not used to search for the resultant file name.
+ CCDDPPAATTHH The search path for the ccdd command. This is a colon-separated
+ list of directories in which the shell looks for destination
+ directories specified by the ccdd command. A sample value is
+ ".:~:/usr".
+ BBAASSHH__XXTTRRAACCEEFFDD
+ If set to an integer corresponding to a valid file descriptor,
+ bbaasshh will write the trace output generated when _s_e_t _-_x is
+ enabled to that file descriptor. The file descriptor is closed
+ when BBAASSHH__XXTTRRAACCEEFFDD is unset or assigned a new value. Unsetting
+ BBAASSHH__XXTTRRAACCEEFFDD or assigning it the empty string causes the trace
+ output to be sent to the standard error. Note that setting
+ BBAASSHH__XXTTRRAACCEEFFDD to 2 (the standard error file descriptor) and then
+ unsetting it will result in the standard error being closed.
+ CCOOLLUUMMNNSS
+ Used by the sseelleecctt builtin command to determine the terminal
+ width when printing selection lists. Automatically set upon
+ receipt of a SIGWINCH.
+ CCOOMMPPRREEPPLLYY
+ An array variable from which bbaasshh reads the possible completions
+ generated by a shell function invoked by the programmable com-
+ pletion facility (see PPrrooggrraammmmaabbllee CCoommpplleettiioonn below).
+ EEMMAACCSS If bbaasshh finds this variable in the environment when the shell
+ starts with value "t", it assumes that the shell is running in
+ an emacs shell buffer and disables line editing.
+ FFCCEEDDIITT The default editor for the ffcc builtin command.
+ FFIIGGNNOORREE
+ A colon-separated list of suffixes to ignore when performing
+ filename completion (see RREEAADDLLIINNEE below). A filename whose suf-
+ fix matches one of the entries in FFIIGGNNOORREE is excluded from the
+ list of matched filenames. A sample value is ".o:~".
+ GGLLOOBBIIGGNNOORREE
+ A colon-separated list of patterns defining the set of filenames
+ to be ignored by pathname expansion. If a filename matched by a
+ pathname expansion pattern also matches one of the patterns in
+ GGLLOOBBIIGGNNOORREE, it is removed from the list of matches.
+ HHIISSTTCCOONNTTRROOLL
+ A colon-separated list of values controlling how commands are
+ saved on the history list. If the list of values includes
+ _i_g_n_o_r_e_s_p_a_c_e, lines which begin with a ssppaaccee character are not
+ saved in the history list. A value of _i_g_n_o_r_e_d_u_p_s causes lines
+ matching the previous history entry to not be saved. A value of
+ _i_g_n_o_r_e_b_o_t_h is shorthand for _i_g_n_o_r_e_s_p_a_c_e and _i_g_n_o_r_e_d_u_p_s. A value
+ of _e_r_a_s_e_d_u_p_s causes all previous lines matching the current line
+ to be removed from the history list before that line is saved.
+ Any value not in the above list is ignored. If HHIISSTTCCOONNTTRROOLL is
+ unset, or does not include a valid value, all lines read by the
+ shell parser are saved on the history list, subject to the value
+ of HHIISSTTIIGGNNOORREE. The second and subsequent lines of a multi-line
+ compound command are not tested, and are added to the history
+ regardless of the value of HHIISSTTCCOONNTTRROOLL.
+ HHIISSTTFFIILLEE
+ The name of the file in which command history is saved (see HHIISS--
+ TTOORRYY below). The default value is _~_/_._b_a_s_h___h_i_s_t_o_r_y. If unset,
+ the command history is not saved when an interactive shell
+ exits.
+ HHIISSTTFFIILLEESSIIZZEE
+ The maximum number of lines contained in the history file. When
+ this variable is assigned a value, the history file is trun-
+ cated, 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 writing it
+ when an interactive shell exits.
+ HHIISSTTIIGGNNOORREE
+ A colon-separated list of patterns used to decide which command
+ lines should be saved on the history list. Each pattern is
+ anchored at the beginning of the line and must match the com-
+ plete line (no implicit `**' is appended). Each pattern is
+ tested against the line after the checks specified by HHIISSTTCCOONN--
+ TTRROOLL are applied. In addition to the normal shell pattern
+ matching characters, `&&' matches the previous history line. `&&'
+ may be escaped using a backslash; the backslash is removed
+ before attempting a match. The second and subsequent lines of a
+ multi-line compound command are not tested, and are added to the
+ history regardless of the value of HHIISSTTIIGGNNOORREE.
+ HHIISSTTSSIIZZEE
+ The number of commands to remember in the command history (see
+ HHIISSTTOORRYY below). The default value is 500.
+ HHIISSTTTTIIMMEEFFOORRMMAATT
+ If this variable is set and not null, its value is used as a
+ format string for _s_t_r_f_t_i_m_e(3) to print the time stamp associated
+ with each history entry displayed by the hhiissttoorryy builtin. If
+ this variable is set, time stamps are written to the history
+ file so they may be preserved across shell sessions. This uses
+ the history comment character to distinguish timestamps from
+ other history lines.
+ HHOOMMEE The home directory of the current user; the default argument for
+ the ccdd builtin command. The value of this variable is also used
+ when performing tilde expansion.
+ HHOOSSTTFFIILLEE
+ Contains the name of a file in the same format as _/_e_t_c_/_h_o_s_t_s
+ that should be read when the shell needs to complete a hostname.
+ The list of possible hostname completions may be changed while
+ the shell is running; the next time hostname completion is
+ attempted after the value is changed, bbaasshh adds the contents of
+ the new file to the existing list. If HHOOSSTTFFIILLEE is set, but has
+ no value, or does not name a readable file, bbaasshh attempts to
+ read _/_e_t_c_/_h_o_s_t_s to obtain the list of possible hostname comple-
+ tions. When HHOOSSTTFFIILLEE is unset, the hostname list is cleared.
+ IIFFSS The _I_n_t_e_r_n_a_l _F_i_e_l_d _S_e_p_a_r_a_t_o_r that is used for word splitting
+ after expansion and to split lines into words with the rreeaadd
+ builtin command. The default value is ``<space><tab><new-
+ line>''.
+ IIGGNNOORREEEEOOFF
+ Controls the action of an interactive shell on receipt of an EEOOFF
+ character as the sole input. If set, the value is the number of
+ consecutive EEOOFF characters which must be typed as the first
+ characters on an input line before bbaasshh exits. If the variable
+ exists but does not have a numeric value, or has no value, the
+ default value is 10. If it does not exist, EEOOFF signifies the
+ end of input to the shell.
+ IINNPPUUTTRRCC
+ The filename for the rreeaaddlliinnee startup file, overriding the
+ default of _~_/_._i_n_p_u_t_r_c (see RREEAADDLLIINNEE below).
+ LLAANNGG Used to determine the locale category for any category not
+ specifically selected with a variable starting with LLCC__.
+ LLCC__AALLLL This variable overrides the value of LLAANNGG and any other LLCC__
+ variable specifying a locale category.
+ LLCC__CCOOLLLLAATTEE
+ This variable determines the collation order used when sorting
+ the results of pathname expansion, and determines the behavior
+ of range expressions, equivalence classes, and collating
+ sequences within pathname expansion and pattern matching.
+ LLCC__CCTTYYPPEE
+ This variable determines the interpretation of characters and
+ the behavior of character classes within pathname expansion and
+ pattern matching.
+ LLCC__MMEESSSSAAGGEESS
+ This variable determines the locale used to translate double-
+ quoted strings preceded by a $$.
+ LLCC__NNUUMMEERRIICC
+ This variable determines the locale category used for number
+ formatting.
+ LLIINNEESS Used by the sseelleecctt builtin command to determine the column
+ length for printing selection lists. Automatically set upon
+ receipt of a SSIIGGWWIINNCCHH.
+ MMAAIILL If this parameter is set to a file name and the MMAAIILLPPAATTHH vari-
+ able is not set, bbaasshh informs the user of the arrival of mail in
+ the specified file.
+ MMAAIILLCCHHEECCKK
+ Specifies how often (in seconds) bbaasshh checks for mail. The
+ default is 60 seconds. When it is time to check for mail, the
+ shell does so before displaying the primary prompt. If this
+ variable is unset, or set to a value that is not a number
+ greater than or equal to zero, the shell disables mail checking.
+ MMAAIILLPPAATTHH
+ A colon-separated list of file names to be checked for mail.
+ The message to be printed when mail arrives in a particular file
+ may be specified by separating the file name from the message
+ with a `?'. When used in the text of the message, $$__ expands to
+ the name of the current mailfile. Example:
+ MMAAIILLPPAATTHH='/var/mail/bfox?"You have mail":~/shell-mail?"$_ has
+ mail!"'
+ BBaasshh supplies a default value for this variable, but the loca-
+ tion of the user mail files that it uses is system dependent
+ (e.g., /var/mail/$$UUSSEERR).
+ OOPPTTEERRRR If set to the value 1, bbaasshh displays error messages generated by
+ the ggeettooppttss builtin command (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below).
+ OOPPTTEERRRR is initialized to 1 each time the shell is invoked or a
+ shell script is executed.
+ PPAATTHH The search path for commands. It is a colon-separated list of
+ directories in which the shell looks for commands (see CCOOMMMMAANNDD
+ EEXXEECCUUTTIIOONN below). A zero-length (null) directory name in the
+ value of PPAATTHH indicates the current directory. A null directory
+ name may appear as two adjacent colons, or as an initial or
+ trailing colon. The default path is system-dependent, and is
+ set by the administrator who installs bbaasshh. A common value is
+ ``/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin''.
+ PPOOSSIIXXLLYY__CCOORRRREECCTT
+ If this variable is in the environment when bbaasshh starts, the
+ shell enters _p_o_s_i_x _m_o_d_e before reading the startup files, as if
+ the ----ppoossiixx invocation option had been supplied. If it is set
+ while the shell is running, bbaasshh enables _p_o_s_i_x _m_o_d_e, as if the
+ command _s_e_t _-_o _p_o_s_i_x had been executed.
+ PPRROOMMPPTT__CCOOMMMMAANNDD
+ If set, the value is executed as a command prior to issuing each
+ primary prompt.
+ PPRROOMMPPTT__DDIIRRTTRRIIMM
+ If set to a number greater than zero, the value is used as the
+ number of trailing directory components to retain when expanding
+ the \\ww and \\WW prompt string escapes (see PPRROOMMPPTTIINNGG below).
+ Characters removed are replaced with an ellipsis.
+ PPSS11 The value of this parameter is expanded (see PPRROOMMPPTTIINNGG below)
+ and used as the primary prompt string. The default value is
+ ``\\ss--\\vv\\$$ ''.
+ PPSS22 The value of this parameter is expanded as with PPSS11 and used as
+ the secondary prompt string. The default is ``>> ''.
+ PPSS33 The value of this parameter is used as the prompt for the sseelleecctt
+ command (see SSHHEELLLL GGRRAAMMMMAARR above).
+ PPSS44 The value of this parameter is expanded as with PPSS11 and the
+ value is printed before each command bbaasshh displays during an
+ execution trace. The first character of PPSS44 is replicated mul-
+ tiple times, as necessary, to indicate multiple levels of indi-
+ rection. The default is ``++ ''.
+ SSHHEELLLL The full pathname to the shell is kept in this environment vari-
+ able. If it is not set when the shell starts, bbaasshh assigns to
+ it the full pathname of the current user's login shell.
+ TTIIMMEEFFOORRMMAATT
+ The value of this parameter is used as a format string specify-
+ ing how the timing information for pipelines prefixed with the
+ ttiimmee reserved word should be displayed. The %% character intro-
+ duces an escape sequence that is expanded to a time value or
+ other information. The escape sequences and their meanings are
+ as follows; the braces denote optional portions.
+ %%%% A literal %%.
+ %%[[_p]][[ll]]RR The elapsed time in seconds.
+ %%[[_p]][[ll]]UU The number of CPU seconds spent in user mode.
+ %%[[_p]][[ll]]SS The number of CPU seconds spent in system mode.
+ %%PP The CPU percentage, computed as (%U + %S) / %R.
+
+ The optional _p is a digit specifying the _p_r_e_c_i_s_i_o_n, the number
+ of fractional digits after a decimal point. A value of 0 causes
+ no decimal point or fraction to be output. At most three places
+ after the decimal point may be specified; values of _p greater
+ than 3 are changed to 3. If _p is not specified, the value 3 is
+ used.
+
+ The optional ll specifies a longer format, including minutes, of
+ the form _M_Mm_S_S._F_Fs. The value of _p determines whether or not
+ the fraction is included.
+
+ If this variable is not set, bbaasshh acts as if it had the value
+ $$''\\nnrreeaall\\tt%%33llRR\\nnuusseerr\\tt%%33llUU\\nnssyyss%%33llSS''. If the value is null, no
+ timing information is displayed. A trailing newline is added
+ when the format string is displayed.
+
+ TTMMOOUUTT If set to a value greater than zero, TTMMOOUUTT is treated as the
+ default timeout for the rreeaadd builtin. The sseelleecctt command termi-
+ nates if input does not arrive after TTMMOOUUTT seconds when input is
+ coming from a terminal. In an interactive shell, the value is
+ interpreted as the number of seconds to wait for input after
+ issuing the primary prompt. BBaasshh terminates after waiting for
+ that number of seconds if input does not arrive.
+
+ TTMMPPDDIIRR If set, BBaasshh uses its value as the name of a directory in which
+ BBaasshh creates temporary files for the shell's use.
+
+ aauuttoo__rreessuummee
+ This variable controls how the shell interacts with the user and
+ job control. If this variable is set, single word simple com-
+ mands without redirections are treated as candidates for resump-
+ tion of an existing stopped job. There is no ambiguity allowed;
+ if there is more than one job beginning with the string typed,
+ the job most recently accessed is selected. The _n_a_m_e of a
+ stopped job, in this context, is the command line used to start
+ it. If set to the value _e_x_a_c_t, the string supplied must match
+ the name of a stopped job exactly; if set to _s_u_b_s_t_r_i_n_g, the
+ string supplied needs to match a substring of the name of a
+ stopped job. The _s_u_b_s_t_r_i_n_g value provides functionality analo-
+ gous to the %%?? job identifier (see JJOOBB CCOONNTTRROOLL below). If set
+ to any other value, the supplied string must be a prefix of a
+ stopped job's name; this provides functionality analogous to the
+ %%_s_t_r_i_n_g job identifier.
+
+ hhiissttcchhaarrss
+ The two or three characters which control history expansion and
+ tokenization (see HHIISSTTOORRYY EEXXPPAANNSSIIOONN below). The first character
+ is the _h_i_s_t_o_r_y _e_x_p_a_n_s_i_o_n character, the character which signals
+ the start of a history expansion, normally `!!'. The second
+ character is the _q_u_i_c_k _s_u_b_s_t_i_t_u_t_i_o_n character, which is used as
+ shorthand for re-running the previous command entered, substi-
+ tuting one string for another in the command. The default is
+ `^^'. The optional third character is the character which indi-
+ cates that the remainder of the line is a comment when found as
+ the first character of a word, normally `##'. The history com-
+ ment character causes history substitution to be skipped for the
+ remaining words on the line. It does not necessarily cause the
+ shell parser to treat the rest of the line as a comment.
+
+ AArrrraayyss
+ BBaasshh provides one-dimensional indexed and associative array variables.
+ Any variable may be used as an indexed array; the ddeeccllaarree builtin will
+ explicitly declare an array. There is no maximum limit on the size of
+ an array, nor any requirement that members be indexed or assigned con-
+ tiguously. Indexed arrays are referenced using integers (including
+ arithmetic expressions) and are zero-based; associative arrays are
+ referenced using arbitrary strings.
+
+ An indexed array is created automatically if any variable is assigned
+ to using the syntax _n_a_m_e[_s_u_b_s_c_r_i_p_t]=_v_a_l_u_e. The _s_u_b_s_c_r_i_p_t is treated as
+ an arithmetic expression that must evaluate to a number greater than or
+ equal to zero. To explicitly declare an indexed array, use ddeeccllaarree --aa
+ _n_a_m_e (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). ddeeccllaarree --aa _n_a_m_e[[_s_u_b_s_c_r_i_p_t]] is
+ also accepted; the _s_u_b_s_c_r_i_p_t is ignored.
+
+ Associative arrays are created using ddeeccllaarree --AA _n_a_m_e.
+
+ Attributes may be specified for an array variable using the ddeeccllaarree and
+ rreeaaddoonnllyy builtins. Each attribute applies to all members of an array.
+
+ Arrays are assigned to using compound assignments of the form
+ _n_a_m_e=((value_1 ... value_n)), where each _v_a_l_u_e is of the form [_s_u_b_-
+ _s_c_r_i_p_t]=_s_t_r_i_n_g. Indexed array assignments do not require the bracket
+ and subscript. When assigning to indexed arrays, if the optional
+ brackets and subscript are supplied, that index is assigned to; other-
+ wise the index of the element assigned is the last index assigned to by
+ the statement plus one. Indexing starts at zero.
+
+ When assigning to an associative array, the subscript is required.
+
+ This syntax is also accepted by the ddeeccllaarree builtin. Individual array
+ elements may be assigned to using the _n_a_m_e[_s_u_b_s_c_r_i_p_t]=_v_a_l_u_e syntax
+ introduced above.
+
+ Any element of an array may be referenced using ${_n_a_m_e[_s_u_b_s_c_r_i_p_t]}.
+ The braces are required to avoid conflicts with pathname expansion. If
+ _s_u_b_s_c_r_i_p_t is @@ or **, the word expands to all members of _n_a_m_e. These
+ subscripts differ only when the word appears within double quotes. If
+ the word is double-quoted, ${_n_a_m_e[*]} expands to a single word with the
+ value of each array member separated by the first character of the IIFFSS
+ special variable, and ${_n_a_m_e[@]} expands each element of _n_a_m_e to a sep-
+ arate word. When there are no array members, ${_n_a_m_e[@]} expands to
+ nothing. If the double-quoted expansion occurs within a word, the
+ expansion of the first parameter is joined with the beginning part of
+ the original word, and the expansion of the last parameter is joined
+ with the last part of the original word. This is analogous to the
+ expansion of the special parameters ** and @@ (see SSppeecciiaall PPaarraammeetteerrss
+ above). ${#_n_a_m_e[_s_u_b_s_c_r_i_p_t]} expands to the length of ${_n_a_m_e[_s_u_b_-
+ _s_c_r_i_p_t]}. If _s_u_b_s_c_r_i_p_t is ** or @@, the expansion is the number of ele-
+ ments in the array. Referencing an array variable without a subscript
+ is equivalent to referencing the array with a subscript of 0.
+
+ An array variable is considered set if a subscript has been assigned a
+ value. The null string is a valid value.
+
+ The uunnsseett builtin is used to destroy arrays. uunnsseett _n_a_m_e[_s_u_b_s_c_r_i_p_t]
+ destroys the array element at index _s_u_b_s_c_r_i_p_t. Care must be taken to
+ avoid unwanted side effects caused by pathname expansion. uunnsseett _n_a_m_e,
+ where _n_a_m_e is an array, or uunnsseett _n_a_m_e[_s_u_b_s_c_r_i_p_t], where _s_u_b_s_c_r_i_p_t is **
+ or @@, removes the entire array.
+
+ The ddeeccllaarree, llooccaall, and rreeaaddoonnllyy builtins each accept a --aa option to
+ specify an indexed array and a --AA option to specify an associative
+ array. The rreeaadd builtin accepts a --aa option to assign a list of words
+ read from the standard input to an array. The sseett and ddeeccllaarree builtins
+ display array values in a way that allows them to be reused as assign-
+ ments.
+
+EEXXPPAANNSSIIOONN
+ Expansion is performed on the command line after it has been split into
+ words. There are seven kinds of expansion performed: _b_r_a_c_e _e_x_p_a_n_s_i_o_n,
+ _t_i_l_d_e _e_x_p_a_n_s_i_o_n, _p_a_r_a_m_e_t_e_r _a_n_d _v_a_r_i_a_b_l_e _e_x_p_a_n_s_i_o_n, _c_o_m_m_a_n_d _s_u_b_s_t_i_t_u_-
+ _t_i_o_n, _a_r_i_t_h_m_e_t_i_c _e_x_p_a_n_s_i_o_n, _w_o_r_d _s_p_l_i_t_t_i_n_g, and _p_a_t_h_n_a_m_e _e_x_p_a_n_s_i_o_n.
+
+ The order of expansions is: brace expansion, tilde expansion, parame-
+ ter, variable and arithmetic expansion and command substitution (done
+ in a left-to-right fashion), word splitting, and pathname expansion.
+
+ On systems that can support it, there is an additional expansion avail-
+ able: _p_r_o_c_e_s_s _s_u_b_s_t_i_t_u_t_i_o_n.
+
+ Only brace expansion, word splitting, and pathname expansion can change
+ the number of words of the expansion; other expansions expand a single
+ word to a single word. The only exceptions to this are the expansions
+ of "$$@@" and "$${{_n_a_m_e[[@@]]}}" as explained above (see PPAARRAAMMEETTEERRSS).
+
+ BBrraaccee EExxppaannssiioonn
+ _B_r_a_c_e _e_x_p_a_n_s_i_o_n is a mechanism by which arbitrary strings may be gener-
+ ated. This mechanism is similar to _p_a_t_h_n_a_m_e _e_x_p_a_n_s_i_o_n, but the file-
+ names generated need not exist. Patterns to be brace expanded take the
+ form of an optional _p_r_e_a_m_b_l_e, followed by either a series of comma-sep-
+ arated strings or a sequence expression between a pair of braces, fol-
+ lowed by an optional _p_o_s_t_s_c_r_i_p_t. The preamble is prefixed to each
+ string contained within the braces, and the postscript is then appended
+ to each resulting string, expanding left to right.
+
+ Brace expansions may be nested. The results of each expanded string
+ are not sorted; left to right order is preserved. For example,
+ a{{d,c,b}}e expands into `ade ace abe'.
+
+ A sequence expression takes the form {{_x...._y[[...._i_n_c_r]]}}, where _x and _y are
+ either integers or single characters, and _i_n_c_r, an optional increment,
+ is an integer. When integers are supplied, the expression expands to
+ each number between _x and _y, inclusive. Supplied integers may be pre-
+ fixed with _0 to force each term to have the same width. When either _x
+ or _y begins with a zero, the shell attempts to force all generated
+ terms to contain the same number of digits, zero-padding where neces-
+ sary. When characters are supplied, the expression expands to each
+ character lexicographically between _x and _y, inclusive. Note that both
+ _x and _y must be of the same type. When the increment is supplied, it
+ is used as the difference between each term. The default increment is
+ 1 or -1 as appropriate.
+
+ Brace expansion is performed before any other expansions, and any char-
+ acters special to other expansions are preserved in the result. It is
+ strictly textual. BBaasshh does not apply any syntactic interpretation to
+ the context of the expansion or the text between the braces.
+
+ A correctly-formed brace expansion must contain unquoted opening and
+ closing braces, and at least one unquoted comma or a valid sequence
+ expression. Any incorrectly formed brace expansion is left unchanged.
+ A {{ or ,, may be quoted with a backslash to prevent its being considered
+ part of a brace expression. To avoid conflicts with parameter expan-
+ sion, the string $${{ is not considered eligible for brace expansion.
+
+ This construct is typically used as shorthand when the common prefix of
+ the strings to be generated is longer than in the above example:
+
+ mkdir /usr/local/src/bash/{old,new,dist,bugs}
+ or
+ chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}
+
+ Brace expansion introduces a slight incompatibility with historical
+ versions of sshh. sshh does not treat opening or closing braces specially
+ when they appear as part of a word, and preserves them in the output.
+ BBaasshh removes braces from words as a consequence of brace expansion.
+ For example, a word entered to sshh as _f_i_l_e_{_1_,_2_} appears identically in
+ the output. The same word is output as _f_i_l_e_1 _f_i_l_e_2 after expansion by
+ bbaasshh. If strict compatibility with sshh is desired, start bbaasshh with the
+ ++BB option or disable brace expansion with the ++BB option to the sseett com-
+ mand (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below).
+
+ TTiillddee EExxppaannssiioonn
+ If a word begins with an unquoted tilde character (`~~'), all of the
+ characters preceding the first unquoted slash (or all characters, if
+ there is no unquoted slash) are considered a _t_i_l_d_e_-_p_r_e_f_i_x. If none of
+ the characters in the tilde-prefix are quoted, the characters in the
+ tilde-prefix following the tilde are treated as a possible _l_o_g_i_n _n_a_m_e.
+ If this login name is the null string, the tilde is replaced with the
+ value of the shell parameter HHOOMMEE. If HHOOMMEE is unset, the home direc-
+ tory of the user executing the shell is substituted instead. Other-
+ wise, the tilde-prefix is replaced with the home directory associated
+ with the specified login name.
+
+ If the tilde-prefix is a `~+', the value of the shell variable PPWWDD
+ replaces the tilde-prefix. If the tilde-prefix is a `~-', the value of
+ the shell variable OOLLDDPPWWDD, if it is set, is substituted. If the char-
+ acters following the tilde in the tilde-prefix consist of a number _N,
+ optionally prefixed by a `+' or a `-', the tilde-prefix is replaced
+ with the corresponding element from the directory stack, as it would be
+ displayed by the ddiirrss builtin invoked with the tilde-prefix as an argu-
+ ment. If the characters following the tilde in the tilde-prefix con-
+ sist of a number without a leading `+' or `-', `+' is assumed.
+
+ If the login name is invalid, or the tilde expansion fails, the word is
+ unchanged.
+
+ Each variable assignment is checked for unquoted tilde-prefixes immedi-
+ ately following a :: or the first ==. In these cases, tilde expansion is
+ also performed. Consequently, one may use file names with tildes in
+ assignments to PPAATTHH, MMAAIILLPPAATTHH, and CCDDPPAATTHH, and the shell assigns the
+ expanded value.
+
+ PPaarraammeetteerr EExxppaannssiioonn
+ The `$$' character introduces parameter expansion, command substitution,
+ or arithmetic expansion. The parameter name or symbol to be expanded
+ may be enclosed in braces, which are optional but serve to protect the
+ variable to be expanded from characters immediately following it which
+ could be interpreted as part of the name.
+
+ When braces are used, the matching ending brace is the first `}}' not
+ escaped by a backslash or within a quoted string, and not within an
+ embedded arithmetic expansion, command substitution, or parameter
+ expansion.
+
+ ${_p_a_r_a_m_e_t_e_r}
+ The value of _p_a_r_a_m_e_t_e_r is substituted. The braces are required
+ when _p_a_r_a_m_e_t_e_r is a positional parameter with more than one
+ digit, or when _p_a_r_a_m_e_t_e_r is followed by a character which is not
+ to be interpreted as part of its name.
+
+ If the first character of _p_a_r_a_m_e_t_e_r is an exclamation point (!!), a
+ level of variable indirection is introduced. BBaasshh uses the value of
+ the variable formed from the rest of _p_a_r_a_m_e_t_e_r as the name of the vari-
+ able; this variable is then expanded and that value is used in the rest
+ of the substitution, rather than the value of _p_a_r_a_m_e_t_e_r itself. This
+ is known as _i_n_d_i_r_e_c_t _e_x_p_a_n_s_i_o_n. The exceptions to this are the expan-
+ sions of ${!_p_r_e_f_i_x*} and ${!!_n_a_m_e[_@]} described below. The exclamation
+ point must immediately follow the left brace in order to introduce
+ indirection.
+
+ In each of the cases below, _w_o_r_d is subject to tilde expansion, parame-
+ ter expansion, command substitution, and arithmetic expansion.
+
+ When not performing substring expansion, using the forms documented
+ below, bbaasshh tests for a parameter that is unset or null. Omitting the
+ colon results in a test only for a parameter that is unset.
+
+ ${_p_a_r_a_m_e_t_e_r::--_w_o_r_d}
+ UUssee DDeeffaauulltt VVaalluueess. If _p_a_r_a_m_e_t_e_r is unset or null, the expan-
+ sion of _w_o_r_d is substituted. Otherwise, the value of _p_a_r_a_m_e_t_e_r
+ is substituted.
+ ${_p_a_r_a_m_e_t_e_r::==_w_o_r_d}
+ AAssssiiggnn DDeeffaauulltt VVaalluueess. If _p_a_r_a_m_e_t_e_r is unset or null, the
+ expansion of _w_o_r_d is assigned to _p_a_r_a_m_e_t_e_r. The value of _p_a_r_a_m_-
+ _e_t_e_r is then substituted. Positional parameters and special
+ parameters may not be assigned to in this way.
+ ${_p_a_r_a_m_e_t_e_r::??_w_o_r_d}
+ DDiissppllaayy EErrrroorr iiff NNuullll oorr UUnnsseett. If _p_a_r_a_m_e_t_e_r is null or unset,
+ the expansion of _w_o_r_d (or a message to that effect if _w_o_r_d is
+ not present) is written to the standard error and the shell, if
+ it is not interactive, exits. Otherwise, the value of _p_a_r_a_m_e_t_e_r
+ is substituted.
+ ${_p_a_r_a_m_e_t_e_r::++_w_o_r_d}
+ UUssee AAlltteerrnnaattee VVaalluuee. If _p_a_r_a_m_e_t_e_r is null or unset, nothing is
+ substituted, otherwise the expansion of _w_o_r_d is substituted.
+ ${_p_a_r_a_m_e_t_e_r::_o_f_f_s_e_t}
+ ${_p_a_r_a_m_e_t_e_r::_o_f_f_s_e_t::_l_e_n_g_t_h}
+ SSuubbssttrriinngg EExxppaannssiioonn.. Expands to up to _l_e_n_g_t_h characters of
+ _p_a_r_a_m_e_t_e_r starting at the character specified by _o_f_f_s_e_t. If
+ _l_e_n_g_t_h is omitted, expands to the substring of _p_a_r_a_m_e_t_e_r start-
+ ing at the character specified by _o_f_f_s_e_t. _l_e_n_g_t_h and _o_f_f_s_e_t are
+ arithmetic expressions (see AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN below).
+ _l_e_n_g_t_h must evaluate to a number greater than or equal to zero.
+ If _o_f_f_s_e_t evaluates to a number less than zero, the value is
+ used as an offset from the end of the value of _p_a_r_a_m_e_t_e_r. If
+ _p_a_r_a_m_e_t_e_r is @@, the result is _l_e_n_g_t_h positional parameters
+ beginning at _o_f_f_s_e_t. If _p_a_r_a_m_e_t_e_r is an indexed array name sub-
+ scripted by @ or *, the result is the _l_e_n_g_t_h members of the
+ array beginning with ${_p_a_r_a_m_e_t_e_r[_o_f_f_s_e_t]}. A negative _o_f_f_s_e_t is
+ taken relative to one greater than the maximum index of the
+ specified array. Substring expansion applied to an associative
+ array produces undefined results. Note that a negative offset
+ must be separated from the colon by at least one space to avoid
+ being confused with the :- expansion. Substring indexing is
+ zero-based unless the positional parameters are used, in which
+ case the indexing starts at 1 by default. If _o_f_f_s_e_t is 0, and
+ the positional parameters are used, $$00 is prefixed to the list.
+
+ ${!!_p_r_e_f_i_x**}
+ ${!!_p_r_e_f_i_x@@}
+ NNaammeess mmaattcchhiinngg pprreeffiixx.. Expands to the names of variables whose
+ names begin with _p_r_e_f_i_x, separated by the first character of the
+ IIFFSS special variable. When _@ is used and the expansion appears
+ within double quotes, each variable name expands to a separate
+ word.
+
+ ${!!_n_a_m_e[_@]}
+ ${!!_n_a_m_e[_*]}
+ LLiisstt ooff aarrrraayy kkeeyyss.. If _n_a_m_e is an array variable, expands to
+ the list of array indices (keys) assigned in _n_a_m_e. If _n_a_m_e is
+ not an array, expands to 0 if _n_a_m_e is set and null otherwise.
+ When _@ is used and the expansion appears within double quotes,
+ each key expands to a separate word.
+
+ ${##_p_a_r_a_m_e_t_e_r}
+ PPaarraammeetteerr lleennggtthh.. The length in characters of the value of
+ _p_a_r_a_m_e_t_e_r is substituted. If _p_a_r_a_m_e_t_e_r is ** or @@, the value
+ substituted is the number of positional parameters. If _p_a_r_a_m_e_-
+ _t_e_r is an array name subscripted by ** or @@, the value substi-
+ tuted is the number of elements in the array.
+
+ ${_p_a_r_a_m_e_t_e_r##_w_o_r_d}
+ ${_p_a_r_a_m_e_t_e_r####_w_o_r_d}
+ RReemmoovvee mmaattcchhiinngg pprreeffiixx ppaatttteerrnn.. The _w_o_r_d is expanded to produce
+ a pattern just as in pathname expansion. If the pattern matches
+ the beginning of the value of _p_a_r_a_m_e_t_e_r, then the result of the
+ expansion is the expanded value of _p_a_r_a_m_e_t_e_r with the shortest
+ matching pattern (the ``##'' case) or the longest matching pat-
+ tern (the ``####'' case) deleted. If _p_a_r_a_m_e_t_e_r is @@ or **, the
+ pattern removal operation is applied to each positional parame-
+ ter in turn, and the expansion is the resultant list. If _p_a_r_a_m_-
+ _e_t_e_r is an array variable subscripted with @@ or **, the pattern
+ removal operation is applied to each member of the array in
+ turn, and the expansion is the resultant list.
+
+ ${_p_a_r_a_m_e_t_e_r%%_w_o_r_d}
+ ${_p_a_r_a_m_e_t_e_r%%%%_w_o_r_d}
+ RReemmoovvee mmaattcchhiinngg ssuuffffiixx ppaatttteerrnn.. The _w_o_r_d is expanded to produce
+ a pattern just as in pathname expansion. If the pattern matches
+ a trailing portion of the expanded value of _p_a_r_a_m_e_t_e_r, then the
+ result of the expansion is the expanded value of _p_a_r_a_m_e_t_e_r with
+ the shortest matching pattern (the ``%%'' case) or the longest
+ matching pattern (the ``%%%%'' case) deleted. If _p_a_r_a_m_e_t_e_r is @@
+ or **, the pattern removal operation is applied to each posi-
+ tional parameter in turn, and the expansion is the resultant
+ list. If _p_a_r_a_m_e_t_e_r is an array variable subscripted with @@ or
+ **, the pattern removal operation is applied to each member of
+ the array in turn, and the expansion is the resultant list.
+
+ ${_p_a_r_a_m_e_t_e_r//_p_a_t_t_e_r_n//_s_t_r_i_n_g}
+ PPaatttteerrnn ssuubbssttiittuuttiioonn.. The _p_a_t_t_e_r_n is expanded to produce a pat-
+ tern just as in pathname expansion. _P_a_r_a_m_e_t_e_r is expanded and
+ the longest match of _p_a_t_t_e_r_n against its value is replaced with
+ _s_t_r_i_n_g. If _p_a_t_t_e_r_n begins with //, all matches of _p_a_t_t_e_r_n are
+ replaced with _s_t_r_i_n_g. Normally only the first match is
+ replaced. If _p_a_t_t_e_r_n begins with ##, it must match at the begin-
+ ning of the expanded value of _p_a_r_a_m_e_t_e_r. If _p_a_t_t_e_r_n begins with
+ %%, it must match at the end of the expanded value of _p_a_r_a_m_e_t_e_r.
+ If _s_t_r_i_n_g is null, matches of _p_a_t_t_e_r_n are deleted and the // fol-
+ lowing _p_a_t_t_e_r_n may be omitted. If _p_a_r_a_m_e_t_e_r is @@ or **, the sub-
+ stitution operation is applied to each positional parameter in
+ turn, and the expansion is the resultant list. If _p_a_r_a_m_e_t_e_r is
+ an array variable subscripted with @@ or **, the substitution
+ operation is applied to each member of the array in turn, and
+ the expansion is the resultant list.
+
+ ${_p_a_r_a_m_e_t_e_r^^_p_a_t_t_e_r_n}
+ ${_p_a_r_a_m_e_t_e_r^^^^_p_a_t_t_e_r_n}
+ ${_p_a_r_a_m_e_t_e_r,,_p_a_t_t_e_r_n}
+ ${_p_a_r_a_m_e_t_e_r,,,,_p_a_t_t_e_r_n}
+ CCaassee mmooddiiffiiccaattiioonn.. This expansion modifies the case of alpha-
+ betic characters in _p_a_r_a_m_e_t_e_r. The _p_a_t_t_e_r_n is expanded to pro-
+ duce a pattern just as in pathname expansion. The ^^ operator
+ converts lowercase letters matching _p_a_t_t_e_r_n to uppercase; the ,,
+ operator converts matching uppercase letters to lowercase. The
+ ^^^^ and ,,,, expansions convert each matched character in the
+ expanded value; the ^^ and ,, expansions match and convert only
+ the first character in the expanded value.. If _p_a_t_t_e_r_n is omit-
+ ted, it is treated like a ??, which matches every character. If
+ _p_a_r_a_m_e_t_e_r is @@ or **, the case modification operation is applied
+ to each positional parameter in turn, and the expansion is the
+ resultant list. If _p_a_r_a_m_e_t_e_r is an array variable subscripted
+ with @@ or **, the case modification operation is applied to each
+ member of the array in turn, and the expansion is the resultant
+ list.
+
+ CCoommmmaanndd SSuubbssttiittuuttiioonn
+ _C_o_m_m_a_n_d _s_u_b_s_t_i_t_u_t_i_o_n allows the output of a command to replace the com-
+ mand name. There are two forms:
+
+
+ $$((_c_o_m_m_a_n_d))
+ or
+ ``_c_o_m_m_a_n_d``
+
+ BBaasshh performs the expansion by executing _c_o_m_m_a_n_d and replacing the com-
+ mand substitution with the standard output of the command, with any
+ trailing newlines deleted. Embedded newlines are not deleted, but they
+ may be removed during word splitting. The command substitution $$((ccaatt
+ _f_i_l_e)) can be replaced by the equivalent but faster $$((<< _f_i_l_e)).
+
+ When the old-style backquote form of substitution is used, backslash
+ retains its literal meaning except when followed by $$, ``, or \\. The
+ first backquote not preceded by a backslash terminates the command sub-
+ stitution. When using the $(_c_o_m_m_a_n_d) form, all characters between the
+ parentheses make up the command; none are treated specially.
+
+ Command substitutions may be nested. To nest when using the backquoted
+ form, escape the inner backquotes with backslashes.
+
+ If the substitution appears within double quotes, word splitting and
+ pathname expansion are not performed on the results.
+
+ AArriitthhmmeettiicc EExxppaannssiioonn
+ Arithmetic expansion allows the evaluation of an arithmetic expression
+ and the substitution of the result. The format for arithmetic expan-
+ sion is:
+
+ $$((((_e_x_p_r_e_s_s_i_o_n))))
+
+ The _e_x_p_r_e_s_s_i_o_n is treated as if it were within double quotes, but a
+ double quote inside the parentheses is not treated specially. All
+ tokens in the expression undergo parameter expansion, string expansion,
+ command substitution, and quote removal. Arithmetic expansions may be
+ nested.
+
+ The evaluation is performed according to the rules listed below under
+ AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN. If _e_x_p_r_e_s_s_i_o_n is invalid, bbaasshh prints a message
+ indicating failure and no substitution occurs.
+
+ PPrroocceessss SSuubbssttiittuuttiioonn
+ _P_r_o_c_e_s_s _s_u_b_s_t_i_t_u_t_i_o_n is supported on systems that support named pipes
+ (_F_I_F_O_s) or the //ddeevv//ffdd method of naming open files. It takes the form
+ of <<((_l_i_s_t)) or >>((_l_i_s_t)). The process _l_i_s_t is run with its input or out-
+ put connected to a _F_I_F_O or some file in //ddeevv//ffdd. The name of this file
+ is passed as an argument to the current command as the result of the
+ expansion. If the >>((_l_i_s_t)) form is used, writing to the file will pro-
+ vide input for _l_i_s_t. If the <<((_l_i_s_t)) form is used, the file passed as
+ an argument should be read to obtain the output of _l_i_s_t.
+
+ When available, process substitution is performed simultaneously with
+ parameter and variable expansion, command substitution, and arithmetic
+ expansion.
+
+ WWoorrdd SSpplliittttiinngg
+ The shell scans the results of parameter expansion, command substitu-
+ tion, and arithmetic expansion that did not occur within double quotes
+ for _w_o_r_d _s_p_l_i_t_t_i_n_g.
+
+ The shell treats each character of IIFFSS as a delimiter, and splits the
+ results of the other expansions into words on these characters. If IIFFSS
+ is unset, or its value is exactly <<ssppaaccee>><<ttaabb>><<nneewwlliinnee>>, the default,
+ then sequences of <<ssppaaccee>>, <<ttaabb>>, and <<nneewwlliinnee>> at the beginning and
+ end of the results of the previous expansions are ignored, and any
+ sequence of IIFFSS characters not at the beginning or end serves to
+ delimit words. If IIFFSS has a value other than the default, then
+ sequences of the whitespace characters ssppaaccee and ttaabb are ignored at the
+ beginning and end of the word, as long as the whitespace character is
+ in the value of IIFFSS (an IIFFSS whitespace character). Any character in
+ IIFFSS that is not IIFFSS whitespace, along with any adjacent IIFFSS whitespace
+ characters, delimits a field. A sequence of IIFFSS whitespace characters
+ is also treated as a delimiter. If the value of IIFFSS is null, no word
+ splitting occurs.
+
+ Explicit null arguments ("""" or '''') are retained. Unquoted implicit
+ null arguments, resulting from the expansion of parameters that have no
+ values, are removed. If a parameter with no value is expanded within
+ double quotes, a null argument results and is retained.
+
+ Note that if no expansion occurs, no splitting is performed.
+
+ PPaatthhnnaammee EExxppaannssiioonn
+ After word splitting, unless the --ff option has been set, bbaasshh scans
+ each word for the characters **, ??, and [[. If one of these characters
+ appears, then the word is regarded as a _p_a_t_t_e_r_n, and replaced with an
+ alphabetically sorted list of file names matching the pattern. If no
+ matching file names are found, and the shell option nnuullllgglloobb is not
+ enabled, the word is left unchanged. If the nnuullllgglloobb option is set,
+ and no matches are found, the word is removed. If the ffaaiillgglloobb shell
+ option is set, and no matches are found, an error message is printed
+ and the command is not executed. If the shell option nnooccaasseegglloobb is
+ enabled, the match is performed without regard to the case of alpha-
+ betic characters. When a pattern is used for pathname expansion, the
+ character ````..'''' at the start of a name or immediately following a
+ slash must be matched explicitly, unless the shell option ddoottgglloobb is
+ set. When matching a pathname, the slash character must always be
+ matched explicitly. In other cases, the ````..'''' character is not
+ treated specially. See the description of sshhoopptt below under SSHHEELLLL
+ BBUUIILLTTIINN CCOOMMMMAANNDDSS for a description of the nnooccaasseegglloobb, nnuullllgglloobb, ffaaiill--
+ gglloobb, and ddoottgglloobb shell options.
+
+ The GGLLOOBBIIGGNNOORREE shell variable may be used to restrict the set of file
+ names matching a _p_a_t_t_e_r_n. If GGLLOOBBIIGGNNOORREE is set, each matching file
+ name that also matches one of the patterns in GGLLOOBBIIGGNNOORREE is removed
+ from the list of matches. The file names ````..'''' and ````....'''' are always
+ ignored when GGLLOOBBIIGGNNOORREE is set and not null. However, setting GGLLOOBBIIGG--
+ NNOORREE to a non-null value has the effect of enabling the ddoottgglloobb shell
+ option, so all other file names beginning with a ````..'''' will match. To
+ get the old behavior of ignoring file names beginning with a ````..'''',
+ make ````..**'''' one of the patterns in GGLLOOBBIIGGNNOORREE. The ddoottgglloobb option is
+ disabled when GGLLOOBBIIGGNNOORREE is unset.
+
+ PPaatttteerrnn MMaattcchhiinngg
+
+ Any character that appears in a pattern, other than the special pattern
+ characters described below, matches itself. The NUL character may not
+ occur in a pattern. A backslash escapes the following character; the
+ escaping backslash is discarded when matching. The special pattern
+ characters must be quoted if they are to be matched literally.
+
+ The special pattern characters have the following meanings:
+
+ ** Matches any string, including the null string. When the gglloobb--
+ ssttaarr shell option is enabled, and ** is used in a pathname expan-
+ sion context, two adjacent **s used as a single pattern will
+ match all files and zero or more directories and subdirectories.
+ If followed by a //, two adjacent **s will match only directories
+ and subdirectories.
+ ?? Matches any single character.
+ [[......]] Matches any one of the enclosed characters. A pair of charac-
+ ters separated by a hyphen denotes a _r_a_n_g_e _e_x_p_r_e_s_s_i_o_n; any char-
+ acter that sorts between those two characters, inclusive, using
+ the current locale's collating sequence and character set, is
+ matched. If the first character following the [[ is a !! or a ^^
+ then any character not enclosed is matched. The sorting order
+ of characters in range expressions is determined by the current
+ locale and the value of the LLCC__CCOOLLLLAATTEE shell variable, if set.
+ A -- may be matched by including it as the first or last charac-
+ ter in the set. A ]] may be matched by including it as the first
+ character in the set.
+
+ Within [[ and ]], _c_h_a_r_a_c_t_e_r _c_l_a_s_s_e_s can be specified using the
+ syntax [[::_c_l_a_s_s::]], where _c_l_a_s_s is one of the following classes
+ defined in the POSIX standard:
+ aallnnuumm aallpphhaa aasscciiii bbllaannkk ccnnttrrll ddiiggiitt ggrraapphh lloowweerr pprriinntt ppuunncctt
+ ssppaaccee uuppppeerr wwoorrdd xxddiiggiitt
+ A character class matches any character belonging to that class.
+ The wwoorrdd character class matches letters, digits, and the char-
+ acter _.
+
+ Within [[ and ]], an _e_q_u_i_v_a_l_e_n_c_e _c_l_a_s_s can be specified using the
+ syntax [[==_c==]], which matches all characters with the same colla-
+ tion weight (as defined by the current locale) as the character
+ _c.
+
+ Within [[ and ]], the syntax [[.._s_y_m_b_o_l..]] matches the collating sym-
+ bol _s_y_m_b_o_l.
+
+ If the eexxttgglloobb shell option is enabled using the sshhoopptt builtin, several
+ extended pattern matching operators are recognized. In the following
+ description, a _p_a_t_t_e_r_n_-_l_i_s_t is a list of one or more patterns separated
+ by a ||. Composite patterns may be formed using one or more of the fol-
+ lowing sub-patterns:
+
+ ??((_p_a_t_t_e_r_n_-_l_i_s_t))
+ Matches zero or one occurrence of the given patterns
+ **((_p_a_t_t_e_r_n_-_l_i_s_t))
+ Matches zero or more occurrences of the given patterns
+ ++((_p_a_t_t_e_r_n_-_l_i_s_t))
+ Matches one or more occurrences of the given patterns
+ @@((_p_a_t_t_e_r_n_-_l_i_s_t))
+ Matches one of the given patterns
+ !!((_p_a_t_t_e_r_n_-_l_i_s_t))
+ Matches anything except one of the given patterns
+
+ QQuuoottee RReemmoovvaall
+ After the preceding expansions, all unquoted occurrences of the charac-
+ ters \\, '', and "" that did not result from one of the above expansions
+ are removed.
+
+RREEDDIIRREECCTTIIOONN
+ Before a command is executed, its input and output may be _r_e_d_i_r_e_c_t_e_d
+ using a special notation interpreted by the shell. Redirection may
+ also be used to open and close files for the current shell execution
+ environment. The following redirection operators may precede or appear
+ anywhere within a _s_i_m_p_l_e _c_o_m_m_a_n_d or may follow a _c_o_m_m_a_n_d. Redirections
+ are processed in the order they appear, from left to right.
+
+ Each redirection that may be preceded by a file descriptor number may
+ instead be preceded by a word of the form {_v_a_r_n_a_m_e}. In this case, for
+ each redirection operator except >&- and <&-, the shell will allocate a
+ file descriptor greater than 10 and assign it to _v_a_r_n_a_m_e. If >&- or
+ <&- is preceded by {_v_a_r_n_a_m_e}, the value of _v_a_r_n_a_m_e defines the file
+ descriptor to close.
+
+ In the following descriptions, if the file descriptor number is omit-
+ ted, and the first character of the redirection operator is <<, the re-
+ direction refers to the standard input (file descriptor 0). If the
+ first character of the redirection operator is >>, the redirection
+ refers to the standard output (file descriptor 1).
+
+ The word following the redirection operator in the following descrip-
+ tions, unless otherwise noted, is subjected to brace expansion, tilde
+ expansion, parameter expansion, command substitution, arithmetic expan-
+ sion, quote removal, pathname expansion, and word splitting. If it
+ expands to more than one word, bbaasshh reports an error.
+
+ Note that the order of redirections is significant. For example, the
+ command
+
+ ls >> dirlist 2>>&&1
+
+ directs both standard output and standard error to the file _d_i_r_l_i_s_t,
+ while the command
+
+ ls 2>>&&1 >> dirlist
+
+ directs only the standard output to file _d_i_r_l_i_s_t, because the standard
+ error was duplicated from the standard output before the standard out-
+ put was redirected to _d_i_r_l_i_s_t.
+
+ BBaasshh handles several filenames specially when they are used in redirec-
+ tions, as described in the following table:
+
+ //ddeevv//ffdd//_f_d
+ If _f_d is a valid integer, file descriptor _f_d is dupli-
+ cated.
+ //ddeevv//ssttddiinn
+ File descriptor 0 is duplicated.
+ //ddeevv//ssttddoouutt
+ File descriptor 1 is duplicated.
+ //ddeevv//ssttddeerrrr
+ File descriptor 2 is duplicated.
+ //ddeevv//ttccpp//_h_o_s_t//_p_o_r_t
+ If _h_o_s_t is a valid hostname or Internet address, and _p_o_r_t
+ is an integer port number or service name, bbaasshh attempts
+ to open a TCP connection to the corresponding socket.
+ //ddeevv//uuddpp//_h_o_s_t//_p_o_r_t
+ If _h_o_s_t is a valid hostname or Internet address, and _p_o_r_t
+ is an integer port number or service name, bbaasshh attempts
+ to open a UDP connection to the corresponding socket.
+
+ A failure to open or create a file causes the redirection to fail.
+
+ Redirections using file descriptors greater than 9 should be used with
+ care, as they may conflict with file descriptors the shell uses inter-
+ nally.
+
+ RReeddiirreeccttiinngg IInnppuutt
+ Redirection of input causes the file whose name results from the expan-
+ sion of _w_o_r_d to be opened for reading on file descriptor _n, or the
+ standard input (file descriptor 0) if _n is not specified.
+
+ The general format for redirecting input is:
+
+ [_n]<<_w_o_r_d
+
+ RReeddiirreeccttiinngg OOuuttppuutt
+ Redirection of output causes the file whose name results from the
+ expansion of _w_o_r_d to be opened for writing on file descriptor _n, or the
+ standard output (file descriptor 1) if _n is not specified. If the file
+ does not exist it is created; if it does exist it is truncated to zero
+ size.
+
+ The general format for redirecting output is:
+
+ [_n]>>_w_o_r_d
+
+ If the redirection operator is >>, and the nnoocclloobbbbeerr option to the sseett
+ builtin has been enabled, the redirection will fail if the file whose
+ name results from the expansion of _w_o_r_d exists and is a regular file.
+ If the redirection operator is >>||, or the redirection operator is >> and
+ the nnoocclloobbbbeerr option to the sseett builtin command is not enabled, the re-
+ direction is attempted even if the file named by _w_o_r_d exists.
+
+ AAppppeennddiinngg RReeddiirreecctteedd OOuuttppuutt
+ Redirection of output in this fashion causes the file whose name
+ results from the expansion of _w_o_r_d to be opened for appending on file
+ descriptor _n, or the standard output (file descriptor 1) if _n is not
+ specified. If the file does not exist it is created.
+
+ The general format for appending output is:
+
+ [_n]>>>>_w_o_r_d
+
+
+ RReeddiirreeccttiinngg SSttaannddaarrdd OOuuttppuutt aanndd SSttaannddaarrdd EErrrroorr
+ This construct allows both the standard output (file descriptor 1) and
+ the standard error output (file descriptor 2) to be redirected to the
+ file whose name is the expansion of _w_o_r_d.
+
+ There are two formats for redirecting standard output and standard
+ error:
+
+ &&>>_w_o_r_d
+ and
+ >>&&_w_o_r_d
+
+ Of the two forms, the first is preferred. This is semantically equiva-
+ lent to
+
+ >>_w_o_r_d 2>>&&1
+
+
+ AAppppeennddiinngg SSttaannddaarrdd OOuuttppuutt aanndd SSttaannddaarrdd EErrrroorr
+ This construct allows both the standard output (file descriptor 1) and
+ the standard error output (file descriptor 2) to be appended to the
+ file whose name is the expansion of _w_o_r_d.
+
+ The format for appending standard output and standard error is:
+
+ &&>>>>_w_o_r_d
+
+ This is semantically equivalent to
+
+ >>>>_w_o_r_d 2>>&&1
+
+ HHeerree DDooccuummeennttss
+ This type of redirection instructs the shell to read input from the
+ current source until a line containing only _d_e_l_i_m_i_t_e_r (with no trailing
+ blanks) is seen. All of the lines read up to that point are then used
+ as the standard input for a command.
+
+ The format of here-documents is:
+
+ <<<<[--]_w_o_r_d
+ _h_e_r_e_-_d_o_c_u_m_e_n_t
+ _d_e_l_i_m_i_t_e_r
+
+ No parameter expansion, command substitution, arithmetic expansion, or
+ pathname expansion is performed on _w_o_r_d. If any characters in _w_o_r_d are
+ quoted, the _d_e_l_i_m_i_t_e_r is the result of quote removal on _w_o_r_d, and the
+ lines in the here-document are not expanded. If _w_o_r_d is unquoted, all
+ lines of the here-document are subjected to parameter expansion, com-
+ mand substitution, and arithmetic expansion. In the latter case, the
+ character sequence \\<<nneewwlliinnee>> is ignored, and \\ must be used to quote
+ the characters \\, $$, and ``.
+
+ If the redirection operator is <<<<--, then all leading tab characters are
+ stripped from input lines and the line containing _d_e_l_i_m_i_t_e_r. This
+ allows here-documents within shell scripts to be indented in a natural
+ fashion.
+
+ HHeerree SSttrriinnggss
+ A variant of here documents, the format is:
+
+ <<<<<<_w_o_r_d
+
+ The _w_o_r_d is expanded and supplied to the command on its standard input.
+
+ DDuupplliiccaattiinngg FFiillee DDeessccrriippttoorrss
+ The redirection operator
+
+ [_n]<<&&_w_o_r_d
+
+ is used to duplicate input file descriptors. If _w_o_r_d expands to one or
+ more digits, the file descriptor denoted by _n is made to be a copy of
+ that file descriptor. If the digits in _w_o_r_d do not specify a file
+ descriptor open for input, a redirection error occurs. If _w_o_r_d evalu-
+ ates to --, file descriptor _n is closed. If _n is not specified, the
+ standard input (file descriptor 0) is used.
+
+ The operator
+
+ [_n]>>&&_w_o_r_d
+
+ is used similarly to duplicate output file descriptors. If _n is not
+ specified, the standard output (file descriptor 1) is used. If the
+ digits in _w_o_r_d do not specify a file descriptor open for output, a re-
+ direction error occurs. As a special case, if _n is omitted, and _w_o_r_d
+ does not expand to one or more digits, the standard output and standard
+ error are redirected as described previously.
+
+ MMoovviinngg FFiillee DDeessccrriippttoorrss
+ The redirection operator
+
+ [_n]<<&&_d_i_g_i_t--
+
+ moves the file descriptor _d_i_g_i_t to file descriptor _n, or the standard
+ input (file descriptor 0) if _n is not specified. _d_i_g_i_t is closed after
+ being duplicated to _n.
+
+ Similarly, the redirection operator
+
+ [_n]>>&&_d_i_g_i_t--
+
+ moves the file descriptor _d_i_g_i_t to file descriptor _n, or the standard
+ output (file descriptor 1) if _n is not specified.
+
+ OOppeenniinngg FFiillee DDeessccrriippttoorrss ffoorr RReeaaddiinngg aanndd WWrriittiinngg
+ The redirection operator
+
+ [_n]<<>>_w_o_r_d
+
+ causes the file whose name is the expansion of _w_o_r_d to be opened for
+ both reading and writing on file descriptor _n, or on file descriptor 0
+ if _n is not specified. If the file does not exist, it is created.
+
+AALLIIAASSEESS
+ _A_l_i_a_s_e_s allow a string to be substituted for a word when it is used as
+ the first word of a simple command. The shell maintains a list of
+ aliases that may be set and unset with the aalliiaass and uunnaalliiaass builtin
+ commands (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). The first word of each
+ simple command, if unquoted, is checked to see if it has an alias. If
+ so, that word is replaced by the text of the alias. The characters //,
+ $$, ``, and == and any of the shell _m_e_t_a_c_h_a_r_a_c_t_e_r_s or quoting characters
+ listed above may not appear in an alias name. The replacement text may
+ contain any valid shell input, including shell metacharacters. The
+ first word of the replacement text is tested for aliases, but a word
+ that is identical to an alias being expanded is not expanded a second
+ time. This means that one may alias llss to llss --FF, for instance, and
+ bbaasshh does not try to recursively expand the replacement text. If the
+ last character of the alias value is a _b_l_a_n_k, then the next command
+ word following the alias is also checked for alias expansion.
+
+ Aliases are created and listed with the aalliiaass command, and removed with
+ the uunnaalliiaass command.
+
+ There is no mechanism for using arguments in the replacement text. If
+ arguments are needed, a shell function should be used (see FFUUNNCCTTIIOONNSS
+ below).
+
+ Aliases are not expanded when the shell is not interactive, unless the
+ eexxppaanndd__aalliiaasseess shell option is set using sshhoopptt (see the description of
+ sshhoopptt under SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below).
+
+ The rules concerning the definition and use of aliases are somewhat
+ confusing. BBaasshh always reads at least one complete line of input
+ before executing any of the commands on that line. Aliases are
+ expanded when a command is read, not when it is executed. Therefore,
+ an alias definition appearing on the same line as another command does
+ not take effect until the next line of input is read. The commands
+ following the alias definition on that line are not affected by the new
+ alias. This behavior is also an issue when functions are executed.
+ Aliases are expanded when a function definition is read, not when the
+ function is executed, because a function definition is itself a com-
+ pound command. As a consequence, aliases defined in a function are not
+ available until after that function is executed. To be safe, always
+ put alias definitions on a separate line, and do not use aalliiaass in com-
+ pound commands.
+
+ For almost every purpose, aliases are superseded by shell functions.
+
+FFUUNNCCTTIIOONNSS
+ A shell function, defined as described above under SSHHEELLLL GGRRAAMMMMAARR,
+ stores a series of commands for later execution. When the name of a
+ shell function is used as a simple command name, the list of commands
+ associated with that function name is executed. Functions are executed
+ in the context of the current shell; no new process is created to
+ interpret them (contrast this with the execution of a shell script).
+ When a function is executed, the arguments to the function become the
+ positional parameters during its execution. The special parameter ## is
+ updated to reflect the change. Special parameter 0 is unchanged. The
+ first element of the FFUUNNCCNNAAMMEE variable is set to the name of the func-
+ tion while the function is executing.
+
+ All other aspects of the shell execution environment are identical
+ between a function and its caller with these exceptions: the DDEEBBUUGG and
+ RREETTUURRNN traps (see the description of the ttrraapp builtin under SSHHEELLLL
+ BBUUIILLTTIINN CCOOMMMMAANNDDSS below) are not inherited unless the function has been
+ given the ttrraaccee attribute (see the description of the ddeeccllaarree builtin
+ below) or the --oo ffuunnccttrraaccee shell option has been enabled with the sseett
+ builtin (in which case all functions inherit the DDEEBBUUGG and RREETTUURRNN
+ traps), and the EERRRR trap is not inherited unless the --oo eerrrrttrraaccee shell
+ option has been enabled.
+
+ Variables local to the function may be declared with the llooccaall builtin
+ command. Ordinarily, variables and their values are shared between the
+ function and its caller.
+
+ If the builtin command rreettuurrnn is executed in a function, the function
+ completes and execution resumes with the next command after the func-
+ tion call. Any command associated with the RREETTUURRNN trap is executed
+ before execution resumes. When a function completes, the values of the
+ positional parameters and the special parameter ## are restored to the
+ values they had prior to the function's execution.
+
+ Function names and definitions may be listed with the --ff option to the
+ ddeeccllaarree or ttyyppeesseett builtin commands. The --FF option to ddeeccllaarree or ttyyppee--
+ sseett will list the function names only (and optionally the source file
+ and line number, if the eexxttddeebbuugg shell option is enabled). Functions
+ may be exported so that subshells automatically have them defined with
+ the --ff option to the eexxppoorrtt builtin. A function definition may be
+ deleted using the --ff option to the uunnsseett builtin. Note that shell
+ functions and variables with the same name may result in multiple iden-
+ tically-named entries in the environment passed to the shell's chil-
+ dren. Care should be taken in cases where this may cause a problem.
+
+ Functions may be recursive. No limit is imposed on the number of
+ recursive calls.
+
+AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN
+ The shell allows arithmetic expressions to be evaluated, under certain
+ circumstances (see the lleett and ddeeccllaarree builtin commands and AArriitthhmmeettiicc
+ EExxppaannssiioonn). Evaluation is done in fixed-width integers with no check
+ for overflow, though division by 0 is trapped and flagged as an error.
+ The operators and their precedence, associativity, and values are the
+ same as in the C language. The following list of operators is grouped
+ into levels of equal-precedence operators. The levels are listed in
+ order of decreasing precedence.
+
+ _i_d++++ _i_d----
+ variable post-increment and post-decrement
+ ++++_i_d ----_i_d
+ variable pre-increment and pre-decrement
+ -- ++ unary minus and plus
+ !! ~~ logical and bitwise negation
+ **** exponentiation
+ ** // %% multiplication, division, remainder
+ ++ -- addition, subtraction
+ <<<< >>>> left and right bitwise shifts
+ <<== >>== << >>
+ comparison
+ ==== !!== equality and inequality
+ && bitwise AND
+ ^^ bitwise exclusive OR
+ || bitwise OR
+ &&&& logical AND
+ |||| logical OR
+ _e_x_p_r??_e_x_p_r::_e_x_p_r
+ conditional operator
+ == **== //== %%== ++== --== <<<<== >>>>== &&== ^^== ||==
+ assignment
+ _e_x_p_r_1 ,, _e_x_p_r_2
+ comma
+
+ Shell variables are allowed as operands; parameter expansion is per-
+ formed before the expression is evaluated. Within an expression, shell
+ variables may also be referenced by name without using the parameter
+ expansion syntax. A shell variable that is null or unset evaluates to
+ 0 when referenced by name without using the parameter expansion syntax.
+ The value of a variable is evaluated as an arithmetic expression when
+ it is referenced, or when a variable which has been given the _i_n_t_e_g_e_r
+ attribute using ddeeccllaarree --ii is assigned a value. A null value evaluates
+ to 0. A shell variable need not have its integer attribute turned on
+ to be used in an expression.
+
+ Constants with a leading 0 are interpreted as octal numbers. A leading
+ 0x or 0X denotes hexadecimal. Otherwise, numbers take the form
+ [_b_a_s_e_#]n, where _b_a_s_e is a decimal number between 2 and 64 representing
+ the arithmetic base, and _n is a number in that base. If _b_a_s_e_# is omit-
+ ted, then base 10 is used. The digits greater than 9 are represented
+ by the lowercase letters, the uppercase letters, @, and _, in that
+ order. If _b_a_s_e is less than or equal to 36, lowercase and uppercase
+ letters may be used interchangeably to represent numbers between 10 and
+ 35.
+
+ Operators are evaluated in order of precedence. Sub-expressions in
+ parentheses are evaluated first and may override the precedence rules
+ above.
+
+CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS
+ Conditional expressions are used by the [[[[ compound command and the
+ tteesstt and [[ builtin commands to test file attributes and perform string
+ and arithmetic comparisons. Expressions are formed from the following
+ unary or binary primaries. If any _f_i_l_e argument to one of the pri-
+ maries is of the form _/_d_e_v_/_f_d_/_n, then file descriptor _n is checked. If
+ the _f_i_l_e argument to one of the primaries is one of _/_d_e_v_/_s_t_d_i_n,
+ _/_d_e_v_/_s_t_d_o_u_t, or _/_d_e_v_/_s_t_d_e_r_r, file descriptor 0, 1, or 2, respectively,
+ is checked.
+
+ Unless otherwise specified, primaries that operate on files follow sym-
+ bolic links and operate on the target of the link, rather than the link
+ itself.
+
+ When used with [[[[, The << and >> operators sort lexicographically using
+ the current locale.
+
+ --aa _f_i_l_e
+ True if _f_i_l_e exists.
+ --bb _f_i_l_e
+ True if _f_i_l_e exists and is a block special file.
+ --cc _f_i_l_e
+ True if _f_i_l_e exists and is a character special file.
+ --dd _f_i_l_e
+ True if _f_i_l_e exists and is a directory.
+ --ee _f_i_l_e
+ True if _f_i_l_e exists.
+ --ff _f_i_l_e
+ True if _f_i_l_e exists and is a regular file.
+ --gg _f_i_l_e
+ True if _f_i_l_e exists and is set-group-id.
+ --hh _f_i_l_e
+ True if _f_i_l_e exists and is a symbolic link.
+ --kk _f_i_l_e
+ True if _f_i_l_e exists and its ``sticky'' bit is set.
+ --pp _f_i_l_e
+ True if _f_i_l_e exists and is a named pipe (FIFO).
+ --rr _f_i_l_e
+ True if _f_i_l_e exists and is readable.
+ --ss _f_i_l_e
+ True if _f_i_l_e exists and has a size greater than zero.
+ --tt _f_d True if file descriptor _f_d is open and refers to a terminal.
+ --uu _f_i_l_e
+ True if _f_i_l_e exists and its set-user-id bit is set.
+ --ww _f_i_l_e
+ True if _f_i_l_e exists and is writable.
+ --xx _f_i_l_e
+ True if _f_i_l_e exists and is executable.
+ --OO _f_i_l_e
+ True if _f_i_l_e exists and is owned by the effective user id.
+ --GG _f_i_l_e
+ True if _f_i_l_e exists and is owned by the effective group id.
+ --LL _f_i_l_e
+ True if _f_i_l_e exists and is a symbolic link.
+ --SS _f_i_l_e
+ True if _f_i_l_e exists and is a socket.
+ --NN _f_i_l_e
+ True if _f_i_l_e exists and has been modified since it was last
+ read.
+ _f_i_l_e_1 -nntt _f_i_l_e_2
+ True if _f_i_l_e_1 is newer (according to modification date) than
+ _f_i_l_e_2, or if _f_i_l_e_1 exists and _f_i_l_e_2 does not.
+ _f_i_l_e_1 -oott _f_i_l_e_2
+ True if _f_i_l_e_1 is older than _f_i_l_e_2, or if _f_i_l_e_2 exists and _f_i_l_e_1
+ does not.
+ _f_i_l_e_1 --eeff _f_i_l_e_2
+ True if _f_i_l_e_1 and _f_i_l_e_2 refer to the same device and inode num-
+ bers.
+ --oo _o_p_t_n_a_m_e
+ True if shell option _o_p_t_n_a_m_e is enabled. See the list of
+ options under the description of the --oo option to the sseett
+ builtin below.
+ --zz _s_t_r_i_n_g
+ True if the length of _s_t_r_i_n_g is zero.
+ _s_t_r_i_n_g
+ --nn _s_t_r_i_n_g
+ True if the length of _s_t_r_i_n_g is non-zero.
+
+ _s_t_r_i_n_g_1 ==== _s_t_r_i_n_g_2
+ _s_t_r_i_n_g_1 == _s_t_r_i_n_g_2
+ True if the strings are equal. == should be used with the tteesstt
+ command for POSIX conformance.
+
+ _s_t_r_i_n_g_1 !!== _s_t_r_i_n_g_2
+ True if the strings are not equal.
+
+ _s_t_r_i_n_g_1 << _s_t_r_i_n_g_2
+ True if _s_t_r_i_n_g_1 sorts before _s_t_r_i_n_g_2 lexicographically.
+
+ _s_t_r_i_n_g_1 >> _s_t_r_i_n_g_2
+ True if _s_t_r_i_n_g_1 sorts after _s_t_r_i_n_g_2 lexicographically.
+
+ _a_r_g_1 OOPP _a_r_g_2
+ OOPP is one of --eeqq, --nnee, --lltt, --llee, --ggtt, or --ggee. These arithmetic
+ binary operators return true if _a_r_g_1 is equal to, not equal to,
+ less than, less than or equal to, greater than, or greater than
+ or equal to _a_r_g_2, respectively. _A_r_g_1 and _a_r_g_2 may be positive
+ or negative integers.
+
+SSIIMMPPLLEE CCOOMMMMAANNDD EEXXPPAANNSSIIOONN
+ When a simple command is executed, the shell performs the following
+ expansions, assignments, and redirections, from left to right.
+
+ 1. The words that the parser has marked as variable assignments
+ (those preceding the command name) and redirections are saved
+ for later processing.
+
+ 2. The words that are not variable assignments or redirections are
+ expanded. If any words remain after expansion, the first word
+ is taken to be the name of the command and the remaining words
+ are the arguments.
+
+ 3. Redirections are performed as described above under RREEDDIIRREECCTTIIOONN.
+
+ 4. The text after the == in each variable assignment undergoes tilde
+ expansion, parameter expansion, command substitution, arithmetic
+ expansion, and quote removal before being assigned to the vari-
+ able.
+
+ If no command name results, the variable assignments affect the current
+ shell environment. Otherwise, the variables are added to the environ-
+ ment of the executed command and do not affect the current shell envi-
+ ronment. If any of the assignments attempts to assign a value to a
+ readonly variable, an error occurs, and the command exits with a non-
+ zero status.
+
+ If no command name results, redirections are performed, but do not
+ affect the current shell environment. A redirection error causes the
+ command to exit with a non-zero status.
+
+ If there is a command name left after expansion, execution proceeds as
+ described below. Otherwise, the command exits. If one of the expan-
+ sions contained a command substitution, the exit status of the command
+ is the exit status of the last command substitution performed. If
+ there were no command substitutions, the command exits with a status of
+ zero.
+
+CCOOMMMMAANNDD EEXXEECCUUTTIIOONN
+ After a command has been split into words, if it results in a simple
+ command and an optional list of arguments, the following actions are
+ taken.
+
+ If the command name contains no slashes, the shell attempts to locate
+ it. If there exists a shell function by that name, that function is
+ invoked as described above in FFUUNNCCTTIIOONNSS. If the name does not match a
+ function, the shell searches for it in the list of shell builtins. If
+ a match is found, that builtin is invoked.
+
+ If the name is neither a shell function nor a builtin, and contains no
+ slashes, bbaasshh searches each element of the PPAATTHH for a directory con-
+ taining an executable file by that name. BBaasshh uses a hash table to
+ remember the full pathnames of executable files (see hhaasshh under SSHHEELLLL
+ BBUUIILLTTIINN CCOOMMMMAANNDDSS below). A full search of the directories in PPAATTHH is
+ performed only if the command is not found in the hash table. If the
+ search is unsuccessful, the shell searches for a defined shell function
+ named ccoommmmaanndd__nnoott__ffoouunndd__hhaannddllee. If that function exists, it is invoked
+ with the original command and the original command's arguments as its
+ arguments, and the function's exit status becomes the exit status of
+ the shell. If that function is not defined, the shell prints an error
+ message and returns an exit status of 127.
+
+ If the search is successful, or if the command name contains one or
+ more slashes, the shell executes the named program in a separate execu-
+ tion environment. Argument 0 is set to the name given, and the remain-
+ ing arguments to the command are set to the arguments given, if any.
+
+ If this execution fails because the file is not in executable format,
+ and the file is not a directory, it is assumed to be a _s_h_e_l_l _s_c_r_i_p_t, a
+ file containing shell commands. A subshell is spawned to execute it.
+ This subshell reinitializes itself, so that the effect is as if a new
+ shell had been invoked to handle the script, with the exception that
+ the locations of commands remembered by the parent (see hhaasshh below
+ under SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS) are retained by the child.
+
+ If the program is a file beginning with ##!!, the remainder of the first
+ line specifies an interpreter for the program. The shell executes the
+ specified interpreter on operating systems that do not handle this exe-
+ cutable format themselves. The arguments to the interpreter consist of
+ a single optional argument following the interpreter name on the first
+ line of the program, followed by the name of the program, followed by
+ the command arguments, if any.
+
+CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENNTT
+ The shell has an _e_x_e_c_u_t_i_o_n _e_n_v_i_r_o_n_m_e_n_t, which consists of the follow-
+ ing:
+
+
+ +o open files inherited by the shell at invocation, as modified by
+ redirections supplied to the eexxeecc builtin
+
+ +o the current working directory as set by ccdd, ppuusshhdd, or ppooppdd, or
+ inherited by the shell at invocation
+
+ +o the file creation mode mask as set by uummaasskk or inherited from
+ the shell's parent
+
+ +o current traps set by ttrraapp
+
+ +o shell parameters that are set by variable assignment or with sseett
+ or inherited from the shell's parent in the environment
+
+ +o shell functions defined during execution or inherited from the
+ shell's parent in the environment
+
+ +o options enabled at invocation (either by default or with com-
+ mand-line arguments) or by sseett
+
+ +o options enabled by sshhoopptt
+
+ +o shell aliases defined with aalliiaass
+
+ +o various process IDs, including those of background jobs, the
+ value of $$$$, and the value of PPPPIIDD
+
+ When a simple command other than a builtin or shell function is to be
+ executed, it is invoked in a separate execution environment that con-
+ sists of the following. Unless otherwise noted, the values are inher-
+ ited from the shell.
+
+
+ +o the shell's open files, plus any modifications and additions
+ specified by redirections to the command
+
+ +o the current working directory
+
+ +o the file creation mode mask
+
+ +o shell variables and functions marked for export, along with
+ variables exported for the command, passed in the environment
+
+ +o traps caught by the shell are reset to the values inherited from
+ the shell's parent, and traps ignored by the shell are ignored
+
+ A command invoked in this separate environment cannot affect the
+ shell's execution environment.
+
+ Command substitution, commands grouped with parentheses, and asynchro-
+ nous commands are invoked in a subshell environment that is a duplicate
+ of the shell environment, except that traps caught by the shell are
+ reset to the values that the shell inherited from its parent at invoca-
+ tion. Builtin commands that are invoked as part of a pipeline are also
+ executed in a subshell environment. Changes made to the subshell envi-
+ ronment cannot affect the shell's execution environment.
+
+ Subshells spawned to execute command substitutions inherit the value of
+ the --ee option from the parent shell. When not in posix mode, Bash
+ clears the --ee option in such subshells.
+
+ If a command is followed by a && and job control is not active, the
+ default standard input for the command is the empty file _/_d_e_v_/_n_u_l_l.
+ Otherwise, the invoked command inherits the file descriptors of the
+ calling shell as modified by redirections.
+
+EENNVVIIRROONNMMEENNTT
+ When a program is invoked it is given an array of strings called the
+ _e_n_v_i_r_o_n_m_e_n_t. This is a list of _n_a_m_e-_v_a_l_u_e pairs, of the form
+ _n_a_m_e=_v_a_l_u_e.
+
+ The shell provides several ways to manipulate the environment. On
+ invocation, the shell scans its own environment and creates a parameter
+ for each name found, automatically marking it for _e_x_p_o_r_t to child pro-
+ cesses. Executed commands inherit the environment. The eexxppoorrtt and
+ ddeeccllaarree --xx commands allow parameters and functions to be added to and
+ deleted from the environment. If the value of a parameter in the envi-
+ ronment is modified, the new value becomes part of the environment,
+ replacing the old. The environment inherited by any executed command
+ consists of the shell's initial environment, whose values may be modi-
+ fied in the shell, less any pairs removed by the uunnsseett command, plus
+ any additions via the eexxppoorrtt and ddeeccllaarree --xx commands.
+
+ The environment for any _s_i_m_p_l_e _c_o_m_m_a_n_d or function may be augmented
+ temporarily by prefixing it with parameter assignments, as described
+ above in PPAARRAAMMEETTEERRSS. These assignment statements affect only the envi-
+ ronment seen by that command.
+
+ If the --kk option is set (see the sseett builtin command below), then _a_l_l
+ parameter assignments are placed in the environment for a command, not
+ just those that precede the command name.
+
+ When bbaasshh invokes an external command, the variable __ is set to the
+ full file name of the command and passed to that command in its envi-
+ ronment.
+
+EEXXIITT SSTTAATTUUSS
+ The exit status of an executed command is the value returned by the
+ _w_a_i_t_p_i_d system call or equivalent function. Exit statuses fall between
+ 0 and 255, though, as explained below, the shell may use values above
+ 125 specially. Exit statuses from shell builtins and compound commands
+ are also limited to this range. Under certain circumstances, the shell
+ will use special values to indicate specific failure modes.
+
+ For the shell's purposes, a command which exits with a zero exit status
+ has succeeded. An exit status of zero indicates success. A non-zero
+ exit status indicates failure. When a command terminates on a fatal
+ signal _N, bbaasshh uses the value of 128+_N as the exit status.
+
+ If a command is not found, the child process created to execute it
+ returns a status of 127. If a command is found but is not executable,
+ the return status is 126.
+
+ If a command fails because of an error during expansion or redirection,
+ the exit status is greater than zero.
+
+ Shell builtin commands return a status of 0 (_t_r_u_e) if successful, and
+ non-zero (_f_a_l_s_e) if an error occurs while they execute. All builtins
+ return an exit status of 2 to indicate incorrect usage.
+
+ BBaasshh itself returns the exit status of the last command executed,
+ unless a syntax error occurs, in which case it exits with a non-zero
+ value. See also the eexxiitt builtin command below.
+
+SSIIGGNNAALLSS
+ When bbaasshh is interactive, in the absence of any traps, it ignores
+ SSIIGGTTEERRMM (so that kkiillll 00 does not kill an interactive shell), and SSIIGGIINNTT
+ is caught and handled (so that the wwaaiitt builtin is interruptible). In
+ all cases, bbaasshh ignores SSIIGGQQUUIITT. If job control is in effect, bbaasshh
+ ignores SSIIGGTTTTIINN, SSIIGGTTTTOOUU, and SSIIGGTTSSTTPP.
+
+ Non-builtin commands run by bbaasshh have signal handlers set to the values
+ inherited by the shell from its parent. When job control is not in
+ effect, asynchronous commands ignore SSIIGGIINNTT and SSIIGGQQUUIITT in addition to
+ these inherited handlers. Commands run as a result of command substi-
+ tution ignore the keyboard-generated job control signals SSIIGGTTTTIINN, SSIIGGTT--
+ TTOOUU, and SSIIGGTTSSTTPP.
+
+ The shell exits by default upon receipt of a SSIIGGHHUUPP. Before exiting,
+ an interactive shell resends the SSIIGGHHUUPP to all jobs, running or
+ stopped. Stopped jobs are sent SSIIGGCCOONNTT to ensure that they receive the
+ SSIIGGHHUUPP. To prevent the shell from sending the signal to a particular
+ job, it should be removed from the jobs table with the ddiissoowwnn builtin
+ (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below) or marked to not receive SSIIGGHHUUPP
+ using ddiissoowwnn --hh.
+
+ If the hhuuppoonneexxiitt shell option has been set with sshhoopptt, bbaasshh sends a
+ SSIIGGHHUUPP to all jobs when an interactive login shell exits.
+
+ If bbaasshh is waiting for a command to complete and receives a signal for
+ which a trap has been set, the trap will not be executed until the com-
+ mand completes. When bbaasshh is waiting for an asynchronous command via
+ the wwaaiitt builtin, the reception of a signal for which a trap has been
+ set will cause the wwaaiitt builtin to return immediately with an exit sta-
+ tus greater than 128, immediately after which the trap is executed.
+
+JJOOBB CCOONNTTRROOLL
+ _J_o_b _c_o_n_t_r_o_l refers to the ability to selectively stop (_s_u_s_p_e_n_d) the
+ execution of processes and continue (_r_e_s_u_m_e) their execution at a later
+ point. A user typically employs this facility via an interactive
+ interface supplied jointly by the operating system kernel's terminal
+ driver and bbaasshh.
+
+ The shell associates a _j_o_b with each pipeline. It keeps a table of
+ currently executing jobs, which may be listed with the jjoobbss command.
+ When bbaasshh starts a job asynchronously (in the _b_a_c_k_g_r_o_u_n_d), it prints a
+ line that looks like:
+
+ [1] 25647
+
+ indicating that this job is job number 1 and that the process ID of the
+ last process in the pipeline associated with this job is 25647. All of
+ the processes in a single pipeline are members of the same job. BBaasshh
+ uses the _j_o_b abstraction as the basis for job control.
+
+ To facilitate the implementation of the user interface to job control,
+ the operating system maintains the notion of a _c_u_r_r_e_n_t _t_e_r_m_i_n_a_l _p_r_o_c_e_s_s
+ _g_r_o_u_p _I_D. Members of this process group (processes whose process group
+ ID is equal to the current terminal process group ID) receive keyboard-
+ generated signals such as SSIIGGIINNTT. These processes are said to be in
+ the _f_o_r_e_g_r_o_u_n_d. _B_a_c_k_g_r_o_u_n_d processes are those whose process group ID
+ differs from the terminal's; such processes are immune to keyboard-gen-
+ erated signals. Only foreground processes are allowed to read from or,
+ if the user so specifies with stty tostop, write to the terminal.
+ Background processes which attempt to read from (write to when stty
+ tostop is in effect) the terminal are sent a SSIIGGTTTTIINN ((SSIIGGTTTTOOUU)) signal
+ by the kernel's terminal driver, which, unless caught, suspends the
+ process.
+
+ If the operating system on which bbaasshh is running supports job control,
+ bbaasshh contains facilities to use it. Typing the _s_u_s_p_e_n_d character (typ-
+ ically ^^ZZ, Control-Z) while a process is running causes that process to
+ be stopped and returns control to bbaasshh. Typing the _d_e_l_a_y_e_d _s_u_s_p_e_n_d
+ character (typically ^^YY, Control-Y) causes the process to be stopped
+ when it attempts to read input from the terminal, and control to be
+ returned to bbaasshh. The user may then manipulate the state of this job,
+ using the bbgg command to continue it in the background, the ffgg command
+ to continue it in the foreground, or the kkiillll command to kill it. A ^^ZZ
+ takes effect immediately, and has the additional side effect of causing
+ pending output and typeahead to be discarded.
+
+ There are a number of ways to refer to a job in the shell. The charac-
+ ter %% introduces a job specification (_j_o_b_s_p_e_c). Job number _n may be
+ referred to as %%nn. A job may also be referred to using a prefix of the
+ name used to start it, or using a substring that appears in its command
+ line. For example, %%ccee refers to a stopped ccee job. If a prefix
+ matches more than one job, bbaasshh reports an error. Using %%??ccee, on the
+ other hand, refers to any job containing the string ccee in its command
+ line. If the substring matches more than one job, bbaasshh reports an
+ error. The symbols %%%% and %%++ refer to the shell's notion of the _c_u_r_-
+ _r_e_n_t _j_o_b, which is the last job stopped while it was in the foreground
+ or started in the background. The _p_r_e_v_i_o_u_s _j_o_b may be referenced using
+ %%--. If there is only a single job, %%++ and %%-- can both be used to refer
+ to that job. In output pertaining to jobs (e.g., the output of the
+ jjoobbss command), the current job is always flagged with a ++, and the pre-
+ vious job with a --. A single % (with no accompanying job specifica-
+ tion) also refers to the current job.
+
+ Simply naming a job can be used to bring it into the foreground: %%11 is
+ a synonym for ````ffgg %%11'''', bringing job 1 from the background into the
+ foreground. Similarly, ````%%11 &&'''' resumes job 1 in the background,
+ equivalent to ````bbgg %%11''''.
+
+ The shell learns immediately whenever a job changes state. Normally,
+ bbaasshh waits until it is about to print a prompt before reporting changes
+ in a job's status so as to not interrupt any other output. If the --bb
+ option to the sseett builtin command is enabled, bbaasshh reports such changes
+ immediately. Any trap on SSIIGGCCHHLLDD is executed for each child that
+ exits.
+
+ If an attempt to exit bbaasshh is made while jobs are stopped (or, if the
+ cchheecckkjjoobbss shell option has been enabled using the sshhoopptt builtin, run-
+ ning), the shell prints a warning message, and, if the cchheecckkjjoobbss option
+ is enabled, lists the jobs and their statuses. The jjoobbss command may
+ then be used to inspect their status. If a second attempt to exit is
+ made without an intervening command, the shell does not print another
+ warning, and any stopped jobs are terminated.
+
+PPRROOMMPPTTIINNGG
+ When executing interactively, bbaasshh displays the primary prompt PPSS11 when
+ it is ready to read a command, and the secondary prompt PPSS22 when it
+ needs more input to complete a command. BBaasshh allows these prompt
+ strings to be customized by inserting a number of backslash-escaped
+ special characters that are decoded as follows:
+ \\aa an ASCII bell character (07)
+ \\dd the date in "Weekday Month Date" format (e.g., "Tue May
+ 26")
+ \\DD{{_f_o_r_m_a_t}}
+ the _f_o_r_m_a_t is passed to _s_t_r_f_t_i_m_e(3) and the result is
+ inserted into the prompt string; an empty _f_o_r_m_a_t results
+ in a locale-specific time representation. The braces are
+ required
+ \\ee an ASCII escape character (033)
+ \\hh the hostname up to the first `.'
+ \\HH the hostname
+ \\jj the number of jobs currently managed by the shell
+ \\ll the basename of the shell's terminal device name
+ \\nn newline
+ \\rr carriage return
+ \\ss the name of the shell, the basename of $$00 (the portion
+ following the final slash)
+ \\tt the current time in 24-hour HH:MM:SS format
+ \\TT the current time in 12-hour HH:MM:SS format
+ \\@@ the current time in 12-hour am/pm format
+ \\AA the current time in 24-hour HH:MM format
+ \\uu the username of the current user
+ \\vv the version of bbaasshh (e.g., 2.00)
+ \\VV the release of bbaasshh, version + patch level (e.g., 2.00.0)
+ \\ww the current working directory, with $$HHOOMMEE abbreviated
+ with a tilde (uses the value of the PPRROOMMPPTT__DDIIRRTTRRIIMM vari-
+ able)
+ \\WW the basename of the current working directory, with $$HHOOMMEE
+ abbreviated with a tilde
+ \\!! the history number of this command
+ \\## the command number of this command
+ \\$$ if the effective UID is 0, a ##, otherwise a $$
+ \\_n_n_n the character corresponding to the octal number _n_n_n
+ \\\\ a backslash
+ \\[[ begin a sequence of non-printing characters, which could
+ be used to embed a terminal control sequence into the
+ prompt
+ \\]] end a sequence of non-printing characters
+
+ The command number and the history number are usually different: the
+ history number of a command is its position in the history list, which
+ may include commands restored from the history file (see HHIISSTTOORRYY
+ below), while the command number is the position in the sequence of
+ commands executed during the current shell session. After the string
+ is decoded, it is expanded via parameter expansion, command substitu-
+ tion, arithmetic expansion, and quote removal, subject to the value of
+ the pprroommppttvvaarrss shell option (see the description of the sshhoopptt command
+ under SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below).
+
+RREEAADDLLIINNEE
+ This is the library that handles reading input when using an interac-
+ tive shell, unless the ----nnooeeddiittiinngg option is given at shell invocation.
+ Line editing is also used when using the --ee option to the rreeaadd builtin.
+ By default, the line editing commands are similar to those of emacs. A
+ vi-style line editing interface is also available. Line editing can be
+ enabled at any time using the --oo eemmaaccss or --oo vvii options to the sseett
+ builtin (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). To turn off line editing
+ after the shell is running, use the ++oo eemmaaccss or ++oo vvii options to the
+ sseett builtin.
+
+ RReeaaddlliinnee NNoottaattiioonn
+ In this section, the emacs-style notation is used to denote keystrokes.
+ Control keys are denoted by C-_k_e_y, e.g., C-n means Control-N. Simi-
+ larly, _m_e_t_a keys are denoted by M-_k_e_y, so M-x means Meta-X. (On key-
+ boards without a _m_e_t_a key, M-_x means ESC _x, i.e., press the Escape key
+ then the _x key. This makes ESC the _m_e_t_a _p_r_e_f_i_x. The combination M-C-_x
+ means ESC-Control-_x, or press the Escape key then hold the Control key
+ while pressing the _x key.)
+
+ Readline commands may be given numeric _a_r_g_u_m_e_n_t_s, which normally act as
+ a repeat count. Sometimes, however, it is the sign of the argument
+ that is significant. Passing a negative argument to a command that
+ acts in the forward direction (e.g., kkiillll--lliinnee) causes that command to
+ act in a backward direction. Commands whose behavior with arguments
+ deviates from this are noted below.
+
+ When a command is described as _k_i_l_l_i_n_g text, the text deleted is saved
+ for possible future retrieval (_y_a_n_k_i_n_g). The killed text is saved in a
+ _k_i_l_l _r_i_n_g. Consecutive kills cause the text to be accumulated into one
+ unit, which can be yanked all at once. Commands which do not kill text
+ separate the chunks of text on the kill ring.
+
+ RReeaaddlliinnee IInniittiiaalliizzaattiioonn
+ Readline is customized by putting commands in an initialization file
+ (the _i_n_p_u_t_r_c file). The name of this file is taken from the value of
+ the IINNPPUUTTRRCC variable. If that variable is unset, the default is
+ _~_/_._i_n_p_u_t_r_c. When a program which uses the readline library starts up,
+ the initialization file is read, and the key bindings and variables are
+ set. There are only a few basic constructs allowed in the readline
+ initialization file. Blank lines are ignored. Lines beginning with a
+ ## are comments. Lines beginning with a $$ indicate conditional con-
+ structs. Other lines denote key bindings and variable settings.
+
+ The default key-bindings may be changed with an _i_n_p_u_t_r_c file. Other
+ programs that use this library may add their own commands and bindings.
+
+ For example, placing
+
+ M-Control-u: universal-argument
+ or
+ C-Meta-u: universal-argument
+ into the _i_n_p_u_t_r_c would make M-C-u execute the readline command _u_n_i_v_e_r_-
+ _s_a_l_-_a_r_g_u_m_e_n_t.
+
+ The following symbolic character names are recognized: _R_U_B_O_U_T, _D_E_L,
+ _E_S_C, _L_F_D, _N_E_W_L_I_N_E, _R_E_T, _R_E_T_U_R_N, _S_P_C, _S_P_A_C_E, and _T_A_B.
+
+ In addition to command names, readline allows keys to be bound to a
+ string that is inserted when the key is pressed (a _m_a_c_r_o).
+
+ RReeaaddlliinnee KKeeyy BBiinnddiinnggss
+ The syntax for controlling key bindings in the _i_n_p_u_t_r_c file is simple.
+ All that is required is the name of the command or the text of a macro
+ and a key sequence to which it should be bound. The name may be speci-
+ fied in one of two ways: as a symbolic key name, possibly with _M_e_t_a_- or
+ _C_o_n_t_r_o_l_- prefixes, or as a key sequence.
+
+ When using the form kkeeyynnaammee:_f_u_n_c_t_i_o_n_-_n_a_m_e or _m_a_c_r_o, _k_e_y_n_a_m_e is the name
+ of a key spelled out in English. For example:
+
+ Control-u: universal-argument
+ Meta-Rubout: backward-kill-word
+ Control-o: "> output"
+
+ In the above example, _C_-_u is bound to the function uunniivveerrssaall--aarrgguummeenntt,
+ _M_-_D_E_L is bound to the function bbaacckkwwaarrdd--kkiillll--wwoorrdd, and _C_-_o is bound to
+ run the macro expressed on the right hand side (that is, to insert the
+ text ``> output'' into the line).
+
+ In the second form, ""kkeeyysseeqq"":_f_u_n_c_t_i_o_n_-_n_a_m_e or _m_a_c_r_o, kkeeyysseeqq differs
+ from kkeeyynnaammee above in that strings denoting an entire key sequence may
+ be specified by placing the sequence within double quotes. Some GNU
+ Emacs style key escapes can be used, as in the following example, but
+ the symbolic character names are not recognized.
+
+ "\C-u": universal-argument
+ "\C-x\C-r": re-read-init-file
+ "\e[11~": "Function Key 1"
+
+ In this example, _C_-_u is again bound to the function uunniivveerrssaall--aarrgguummeenntt.
+ _C_-_x _C_-_r is bound to the function rree--rreeaadd--iinniitt--ffiillee, and _E_S_C _[ _1 _1 _~ is
+ bound to insert the text ``Function Key 1''.
+
+ The full set of GNU Emacs style escape sequences is
+ \\CC-- control prefix
+ \\MM-- meta prefix
+ \\ee an escape character
+ \\\\ backslash
+ \\"" literal "
+ \\'' literal '
+
+ In addition to the GNU Emacs style escape sequences, a second set of
+ backslash escapes is available:
+ \\aa alert (bell)
+ \\bb backspace
+ \\dd delete
+ \\ff form feed
+ \\nn newline
+ \\rr carriage return
+ \\tt horizontal tab
+ \\vv vertical tab
+ \\_n_n_n the eight-bit character whose value is the octal value
+ _n_n_n (one to three digits)
+ \\xx_H_H the eight-bit character whose value is the hexadecimal
+ value _H_H (one or two hex digits)
+
+ When entering the text of a macro, single or double quotes must be used
+ to indicate a macro definition. Unquoted text is assumed to be a func-
+ tion name. In the macro body, the backslash escapes described above
+ are expanded. Backslash will quote any other character in the macro
+ text, including " and '.
+
+ BBaasshh allows the current readline key bindings to be displayed or modi-
+ fied with the bbiinndd builtin command. The editing mode may be switched
+ during interactive use by using the --oo option to the sseett builtin com-
+ mand (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below).
+
+ RReeaaddlliinnee VVaarriiaabblleess
+ Readline has variables that can be used to further customize its behav-
+ ior. A variable may be set in the _i_n_p_u_t_r_c file with a statement of the
+ form
+
+ sseett _v_a_r_i_a_b_l_e_-_n_a_m_e _v_a_l_u_e
+
+ Except where noted, readline variables can take the values OOnn or OOffff
+ (without regard to case). Unrecognized variable names are ignored.
+ When a variable value is read, empty or null values, "on" (case-insen-
+ sitive), and "1" are equivalent to OOnn. All other values are equivalent
+ to OOffff. The variables and their default values are:
+
+ bbeellll--ssttyyllee ((aauuddiibbllee))
+ Controls what happens when readline wants to ring the terminal
+ bell. If set to nnoonnee, readline never rings the bell. If set to
+ vviissiibbllee, readline uses a visible bell if one is available. If
+ set to aauuddiibbllee, readline attempts to ring the terminal's bell.
+ bbiinndd--ttttyy--ssppeecciiaall--cchhaarrss ((OOnn))
+ If set to OOnn, readline attempts to bind the control characters
+ treated specially by the kernel's terminal driver to their read-
+ line equivalents.
+ ccoommmmeenntt--bbeeggiinn ((````##''''))
+ The string that is inserted when the readline iinnsseerrtt--ccoommmmeenntt
+ command is executed. This command is bound to MM--## in emacs mode
+ and to ## in vi command mode.
+ ccoommpplleettiioonn--iiggnnoorree--ccaassee ((OOffff))
+ If set to OOnn, readline performs filename matching and completion
+ in a case-insensitive fashion.
+ ccoommpplleettiioonn--pprreeffiixx--ddiissppllaayy--lleennggtthh ((00))
+ The length in characters of the common prefix of a list of pos-
+ sible completions that is displayed without modification. When
+ set to a value greater than zero, common prefixes longer than
+ this value are replaced with an ellipsis when displaying possi-
+ ble completions.
+ ccoommpplleettiioonn--qquueerryy--iitteemmss ((110000))
+ This determines when the user is queried about viewing the num-
+ ber of possible completions generated by the ppoossssiibbllee--ccoommppllee--
+ ttiioonnss command. It may be set to any integer value greater than
+ or equal to zero. If the number of possible completions is
+ greater than or equal to the value of this variable, the user is
+ asked whether or not he wishes to view them; otherwise they are
+ simply listed on the terminal.
+ ccoonnvveerrtt--mmeettaa ((OOnn))
+ If set to OOnn, readline will convert characters with the eighth
+ bit set to an ASCII key sequence by stripping the eighth bit and
+ prefixing an escape character (in effect, using escape as the
+ _m_e_t_a _p_r_e_f_i_x).
+ ddiissaabbllee--ccoommpplleettiioonn ((OOffff))
+ If set to OOnn, readline will inhibit word completion. Completion
+ characters will be inserted into the line as if they had been
+ mapped to sseellff--iinnsseerrtt.
+ eeddiittiinngg--mmooddee ((eemmaaccss))
+ Controls whether readline begins with a set of key bindings sim-
+ ilar to _e_m_a_c_s or _v_i. eeddiittiinngg--mmooddee can be set to either eemmaaccss or
+ vvii.
+ eecchhoo--ccoonnttrrooll--cchhaarraacctteerrss ((OOnn))
+ When set to OOnn, on operating systems that indicate they support
+ it, readline echoes a character corresponding to a signal gener-
+ ated from the keyboard.
+ eennaabbllee--kkeeyyppaadd ((OOffff))
+ When set to OOnn, readline will try to enable the application key-
+ pad when it is called. Some systems need this to enable the
+ arrow keys.
+ eennaabbllee--mmeettaa--kkeeyy ((OOnn))
+ When set to OOnn, readline will try to enable any meta modifier
+ key the terminal claims to support when it is called. On many
+ terminals, the meta key is used to send eight-bit characters.
+ eexxppaanndd--ttiillddee ((OOffff))
+ If set to oonn, tilde expansion is performed when readline
+ attempts word completion.
+ hhiissttoorryy--pprreesseerrvvee--ppooiinntt ((OOffff))
+ If set to oonn, the history code attempts to place point at the
+ same location on each history line retrieved with pprreevviioouuss--hhiiss--
+ ttoorryy or nneexxtt--hhiissttoorryy.
+ hhiissttoorryy--ssiizzee ((00))
+ Set the maximum number of history entries saved in the history
+ list. If set to zero, the number of entries in the history list
+ is not limited.
+ hhoorriizzoonnttaall--ssccrroollll--mmooddee ((OOffff))
+ When set to OOnn, makes readline use a single line for display,
+ scrolling the input horizontally on a single screen line when it
+ becomes longer than the screen width rather than wrapping to a
+ new line.
+ iinnppuutt--mmeettaa ((OOffff))
+ If set to OOnn, readline will enable eight-bit input (that is, it
+ will not strip the high bit from the characters it reads),
+ regardless of what the terminal claims it can support. The name
+ mmeettaa--ffllaagg is a synonym for this variable.
+ iisseeaarrcchh--tteerrmmiinnaattoorrss ((````CC--[[CC--JJ''''))
+ The string of characters that should terminate an incremental
+ search without subsequently executing the character as a com-
+ mand. If this variable has not been given a value, the charac-
+ ters _E_S_C and _C_-_J will terminate an incremental search.
+ kkeeyymmaapp ((eemmaaccss))
+ Set the current readline keymap. The set of valid keymap names
+ is _e_m_a_c_s_, _e_m_a_c_s_-_s_t_a_n_d_a_r_d_, _e_m_a_c_s_-_m_e_t_a_, _e_m_a_c_s_-_c_t_l_x_, _v_i_, _v_i_-_c_o_m_-
+ _m_a_n_d, and _v_i_-_i_n_s_e_r_t. _v_i is equivalent to _v_i_-_c_o_m_m_a_n_d; _e_m_a_c_s is
+ equivalent to _e_m_a_c_s_-_s_t_a_n_d_a_r_d. The default value is _e_m_a_c_s; the
+ value of eeddiittiinngg--mmooddee also affects the default keymap.
+ mmaarrkk--ddiirreeccttoorriieess ((OOnn))
+ If set to OOnn, completed directory names have a slash appended.
+ mmaarrkk--mmooddiiffiieedd--lliinneess ((OOffff))
+ If set to OOnn, history lines that have been modified are dis-
+ played with a preceding asterisk (**).
+ mmaarrkk--ssyymmlliinnkkeedd--ddiirreeccttoorriieess ((OOffff))
+ If set to OOnn, completed names which are symbolic links to direc-
+ tories have a slash appended (subject to the value of
+ mmaarrkk--ddiirreeccttoorriieess).
+ mmaattcchh--hhiiddddeenn--ffiilleess ((OOnn))
+ This variable, when set to OOnn, causes readline to match files
+ whose names begin with a `.' (hidden files) when performing
+ filename completion, unless the leading `.' is supplied by the
+ user in the filename to be completed.
+ oouuttppuutt--mmeettaa ((OOffff))
+ If set to OOnn, readline will display characters with the eighth
+ bit set directly rather than as a meta-prefixed escape sequence.
+ ppaaggee--ccoommpplleettiioonnss ((OOnn))
+ If set to OOnn, readline uses an internal _m_o_r_e-like pager to dis-
+ play a screenful of possible completions at a time.
+ pprriinntt--ccoommpplleettiioonnss--hhoorriizzoonnttaallllyy ((OOffff))
+ If set to OOnn, readline will display completions with matches
+ sorted horizontally in alphabetical order, rather than down the
+ screen.
+ rreevveerrtt--aallll--aatt--nneewwlliinnee ((OOffff))
+ If set to oonn, readline will undo all changes to history lines
+ before returning when aacccceepptt--lliinnee is executed. By default, his-
+ tory lines may be modified and retain individual undo lists
+ across calls to rreeaaddlliinnee.
+ sshhooww--aallll--iiff--aammbbiigguuoouuss ((OOffff))
+ This alters the default behavior of the completion functions.
+ If set to oonn, words which have more than one possible completion
+ cause the matches to be listed immediately instead of ringing
+ the bell.
+ sshhooww--aallll--iiff--uunnmmooddiiffiieedd ((OOffff))
+ This alters the default behavior of the completion functions in
+ a fashion similar to sshhooww--aallll--iiff--aammbbiigguuoouuss. If set to oonn, words
+ which have more than one possible completion without any possi-
+ ble partial completion (the possible completions don't share a
+ common prefix) cause the matches to be listed immediately
+ instead of ringing the bell.
+ sskkiipp--ccoommpplleetteedd--tteexxtt ((OOffff))
+ If set to OOnn, this alters the default completion behavior when
+ inserting a single match into the line. It's only active when
+ performing completion in the middle of a word. If enabled,
+ readline does not insert characters from the completion that
+ match characters after point in the word being completed, so
+ portions of the word following the cursor are not duplicated.
+ vviissiibbllee--ssttaattss ((OOffff))
+ If set to OOnn, a character denoting a file's type as reported by
+ _s_t_a_t(2) is appended to the filename when listing possible com-
+ pletions.
+
+ RReeaaddlliinnee CCoonnddiittiioonnaall CCoonnssttrruuccttss
+ Readline implements a facility similar in spirit to the conditional
+ compilation features of the C preprocessor which allows key bindings
+ and variable settings to be performed as the result of tests. There
+ are four parser directives used.
+
+ $$iiff The $$iiff construct allows bindings to be made based on the edit-
+ ing mode, the terminal being used, or the application using
+ readline. The text of the test extends to the end of the line;
+ no characters are required to isolate it.
+
+ mmooddee The mmooddee== form of the $$iiff directive is used to test
+ whether readline is in emacs or vi mode. This may be
+ used in conjunction with the sseett kkeeyymmaapp command, for
+ instance, to set bindings in the _e_m_a_c_s_-_s_t_a_n_d_a_r_d and
+ _e_m_a_c_s_-_c_t_l_x keymaps only if readline is starting out in
+ emacs mode.
+
+ tteerrmm The tteerrmm== form may be used to include terminal-specific
+ key bindings, perhaps to bind the key sequences output by
+ the terminal's function keys. The word on the right side
+ of the == is tested against the both full name of the ter-
+ minal and the portion of the terminal name before the
+ first --. This allows _s_u_n to match both _s_u_n and _s_u_n_-_c_m_d,
+ for instance.
+
+ aapppplliiccaattiioonn
+ The aapppplliiccaattiioonn construct is used to include application-
+ specific settings. Each program using the readline
+ library sets the _a_p_p_l_i_c_a_t_i_o_n _n_a_m_e, and an initialization
+ file can test for a particular value. This could be used
+ to bind key sequences to functions useful for a specific
+ program. For instance, the following command adds a key
+ sequence that quotes the current or previous word in
+ Bash:
+
+ $$iiff Bash
+ # Quote the current or previous word
+ "\C-xq": "\eb\"\ef\""
+ $$eennddiiff
+
+ $$eennddiiff This command, as seen in the previous example, terminates an $$iiff
+ command.
+
+ $$eellssee Commands in this branch of the $$iiff directive are executed if the
+ test fails.
+
+ $$iinncclluuddee
+ This directive takes a single filename as an argument and reads
+ commands and bindings from that file. For example, the follow-
+ ing directive would read _/_e_t_c_/_i_n_p_u_t_r_c:
+
+ $$iinncclluuddee _/_e_t_c_/_i_n_p_u_t_r_c
+
+ SSeeaarrcchhiinngg
+ Readline provides commands for searching through the command history
+ (see HHIISSTTOORRYY below) for lines containing a specified string. There are
+ two search modes: _i_n_c_r_e_m_e_n_t_a_l and _n_o_n_-_i_n_c_r_e_m_e_n_t_a_l.
+
+ Incremental searches begin before the user has finished typing the
+ search string. As each character of the search string is typed, read-
+ line displays the next entry from the history matching the string typed
+ so far. An incremental search requires only as many characters as
+ needed to find the desired history entry. The characters present in
+ the value of the iisseeaarrcchh--tteerrmmiinnaattoorrss variable are used to terminate an
+ incremental search. If that variable has not been assigned a value the
+ Escape and Control-J characters will terminate an incremental search.
+ Control-G will abort an incremental search and restore the original
+ line. When the search is terminated, the history entry containing the
+ search string becomes the current line.
+
+ To find other matching entries in the history list, type Control-S or
+ Control-R as appropriate. This will search backward or forward in the
+ history for the next entry matching the search string typed so far.
+ Any other key sequence bound to a readline command will terminate the
+ search and execute that command. For instance, a _n_e_w_l_i_n_e will termi-
+ nate the search and accept the line, thereby executing the command from
+ the history list.
+
+ Readline remembers the last incremental search string. If two Control-
+ Rs are typed without any intervening characters defining a new search
+ string, any remembered search string is used.
+
+ Non-incremental searches read the entire search string before starting
+ to search for matching history lines. The search string may be typed
+ by the user or be part of the contents of the current line.
+
+ RReeaaddlliinnee CCoommmmaanndd NNaammeess
+ The following is a list of the names of the commands and the default
+ key sequences to which they are bound. Command names without an accom-
+ panying key sequence are unbound by default. In the following descrip-
+ tions, _p_o_i_n_t refers to the current cursor position, and _m_a_r_k refers to
+ a cursor position saved by the sseett--mmaarrkk command. The text between the
+ point and mark is referred to as the _r_e_g_i_o_n.
+
+ CCoommmmaannddss ffoorr MMoovviinngg
+ bbeeggiinnnniinngg--ooff--lliinnee ((CC--aa))
+ Move to the start of the current line.
+ eenndd--ooff--lliinnee ((CC--ee))
+ Move to the end of the line.
+ ffoorrwwaarrdd--cchhaarr ((CC--ff))
+ Move forward a character.
+ bbaacckkwwaarrdd--cchhaarr ((CC--bb))
+ Move back a character.
+ ffoorrwwaarrdd--wwoorrdd ((MM--ff))
+ Move forward to the end of the next word. Words are composed of
+ alphanumeric characters (letters and digits).
+ bbaacckkwwaarrdd--wwoorrdd ((MM--bb))
+ Move back to the start of the current or previous word. Words
+ are composed of alphanumeric characters (letters and digits).
+ sshheellll--ffoorrwwaarrdd--wwoorrdd
+ Move forward to the end of the next word. Words are delimited
+ by non-quoted shell metacharacters.
+ sshheellll--bbaacckkwwaarrdd--wwoorrdd
+ Move back to the start of the current or previous word. Words
+ are delimited by non-quoted shell metacharacters.
+ cclleeaarr--ssccrreeeenn ((CC--ll))
+ Clear the screen leaving the current line at the top of the
+ screen. With an argument, refresh the current line without
+ clearing the screen.
+ rreeddrraaww--ccuurrrreenntt--lliinnee
+ Refresh the current line.
+
+ CCoommmmaannddss ffoorr MMaanniippuullaattiinngg tthhee HHiissttoorryy
+ aacccceepptt--lliinnee ((NNeewwlliinnee,, RReettuurrnn))
+ Accept the line regardless of where the cursor is. If this line
+ is non-empty, add it to the history list according to the state
+ of the HHIISSTTCCOONNTTRROOLL variable. If the line is a modified history
+ line, then restore the history line to its original state.
+ pprreevviioouuss--hhiissttoorryy ((CC--pp))
+ Fetch the previous command from the history list, moving back in
+ the list.
+ nneexxtt--hhiissttoorryy ((CC--nn))
+ Fetch the next command from the history list, moving forward in
+ the list.
+ bbeeggiinnnniinngg--ooff--hhiissttoorryy ((MM--<<))
+ Move to the first line in the history.
+ eenndd--ooff--hhiissttoorryy ((MM-->>))
+ Move to the end of the input history, i.e., the line currently
+ being entered.
+ rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((CC--rr))
+ Search backward starting at the current line and moving `up'
+ through the history as necessary. This is an incremental
+ search.
+ ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((CC--ss))
+ Search forward starting at the current line and moving `down'
+ through the history as necessary. This is an incremental
+ search.
+ nnoonn--iinnccrreemmeennttaall--rreevveerrssee--sseeaarrcchh--hhiissttoorryy ((MM--pp))
+ Search backward through the history starting at the current line
+ using a non-incremental search for a string supplied by the
+ user.
+ nnoonn--iinnccrreemmeennttaall--ffoorrwwaarrdd--sseeaarrcchh--hhiissttoorryy ((MM--nn))
+ Search forward through the history using a non-incremental
+ search for a string supplied by the user.
+ hhiissttoorryy--sseeaarrcchh--ffoorrwwaarrdd
+ Search forward through the history for the string of characters
+ between the start of the current line and the point. This is a
+ non-incremental search.
+ hhiissttoorryy--sseeaarrcchh--bbaacckkwwaarrdd
+ Search backward through the history for the string of characters
+ between the start of the current line and the point. This is a
+ non-incremental search.
+ yyaannkk--nntthh--aarrgg ((MM--CC--yy))
+ Insert the first argument to the previous command (usually the
+ second word on the previous line) at point. With an argument _n,
+ insert the _nth word from the previous command (the words in the
+ previous command begin with word 0). A negative argument
+ inserts the _nth word from the end of the previous command. Once
+ the argument _n is computed, the argument is extracted as if the
+ "!_n" history expansion had been specified.
+ yyaannkk--llaasstt--aarrgg ((MM--..,, MM--__))
+ Insert the last argument to the previous command (the last word
+ of the previous history entry). With an argument, behave
+ exactly like yyaannkk--nntthh--aarrgg. Successive calls to yyaannkk--llaasstt--aarrgg
+ move back through the history list, inserting the last argument
+ of each line in turn. The history expansion facilities are used
+ to extract the last argument, as if the "!$" history expansion
+ had been specified.
+ sshheellll--eexxppaanndd--lliinnee ((MM--CC--ee))
+ Expand the line as the shell does. This performs alias and his-
+ tory expansion as well as all of the shell word expansions. See
+ HHIISSTTOORRYY EEXXPPAANNSSIIOONN below for a description of history expansion.
+ hhiissttoorryy--eexxppaanndd--lliinnee ((MM--^^))
+ Perform history expansion on the current line. See HHIISSTTOORRYY
+ EEXXPPAANNSSIIOONN below for a description of history expansion.
+ mmaaggiicc--ssppaaccee
+ Perform history expansion on the current line and insert a
+ space. See HHIISSTTOORRYY EEXXPPAANNSSIIOONN below for a description of history
+ expansion.
+ aalliiaass--eexxppaanndd--lliinnee
+ Perform alias expansion on the current line. See AALLIIAASSEESS above
+ for a description of alias expansion.
+ hhiissttoorryy--aanndd--aalliiaass--eexxppaanndd--lliinnee
+ Perform history and alias expansion on the current line.
+ iinnsseerrtt--llaasstt--aarrgguummeenntt ((MM--..,, MM--__))
+ A synonym for yyaannkk--llaasstt--aarrgg.
+ ooppeerraattee--aanndd--ggeett--nneexxtt ((CC--oo))
+ Accept the current line for execution and fetch the next line
+ relative to the current line from the history for editing. Any
+ argument is ignored.
+ eeddiitt--aanndd--eexxeeccuuttee--ccoommmmaanndd ((CC--xxCC--ee))
+ Invoke an editor on the current command line, and execute the
+ result as shell commands. BBaasshh attempts to invoke $$VVIISSUUAALL,
+ $$EEDDIITTOORR, and _e_m_a_c_s as the editor, in that order.
+
+ CCoommmmaannddss ffoorr CChhaannggiinngg TTeexxtt
+ ddeelleettee--cchhaarr ((CC--dd))
+ Delete the character at point. If point is at the beginning of
+ the line, there are no characters in the line, and the last
+ character typed was not bound to ddeelleettee--cchhaarr, then return EEOOFF.
+ bbaacckkwwaarrdd--ddeelleettee--cchhaarr ((RRuubboouutt))
+ Delete the character behind the cursor. When given a numeric
+ argument, save the deleted text on the kill ring.
+ ffoorrwwaarrdd--bbaacckkwwaarrdd--ddeelleettee--cchhaarr
+ Delete the character under the cursor, unless the cursor is at
+ the end of the line, in which case the character behind the cur-
+ sor is deleted.
+ qquuootteedd--iinnsseerrtt ((CC--qq,, CC--vv))
+ Add the next character typed to the line verbatim. This is how
+ to insert characters like CC--qq, for example.
+ ttaabb--iinnsseerrtt ((CC--vv TTAABB))
+ Insert a tab character.
+ sseellff--iinnsseerrtt ((aa,, bb,, AA,, 11,, !!,, ......))
+ Insert the character typed.
+ ttrraannssppoossee--cchhaarrss ((CC--tt))
+ Drag the character before point forward over the character at
+ point, moving point forward as well. If point is at the end of
+ the line, then this transposes the two characters before point.
+ Negative arguments have no effect.
+ ttrraannssppoossee--wwoorrddss ((MM--tt))
+ Drag the word before point past the word after point, moving
+ point over that word as well. If point is at the end of the
+ line, this transposes the last two words on the line.
+ uuppccaassee--wwoorrdd ((MM--uu))
+ Uppercase the current (or following) word. With a negative
+ argument, uppercase the previous word, but do not move point.
+ ddoowwnnccaassee--wwoorrdd ((MM--ll))
+ Lowercase the current (or following) word. With a negative
+ argument, lowercase the previous word, but do not move point.
+ ccaappiittaalliizzee--wwoorrdd ((MM--cc))
+ Capitalize the current (or following) word. With a negative
+ argument, capitalize the previous word, but do not move point.
+ oovveerrwwrriittee--mmooddee
+ Toggle overwrite mode. With an explicit positive numeric argu-
+ ment, switches to overwrite mode. With an explicit non-positive
+ numeric argument, switches to insert mode. This command affects
+ only eemmaaccss mode; vvii mode does overwrite differently. Each call
+ to _r_e_a_d_l_i_n_e_(_) starts in insert mode. In overwrite mode, charac-
+ ters bound to sseellff--iinnsseerrtt replace the text at point rather than
+ pushing the text to the right. Characters bound to bbaacckk--
+ wwaarrdd--ddeelleettee--cchhaarr replace the character before point with a
+ space. By default, this command is unbound.
+
+ KKiilllliinngg aanndd YYaannkkiinngg
+ kkiillll--lliinnee ((CC--kk))
+ Kill the text from point to the end of the line.
+ bbaacckkwwaarrdd--kkiillll--lliinnee ((CC--xx RRuubboouutt))
+ Kill backward to the beginning of the line.
+ uunniixx--lliinnee--ddiissccaarrdd ((CC--uu))
+ Kill backward from point to the beginning of the line. The
+ killed text is saved on the kill-ring.
+ kkiillll--wwhhoollee--lliinnee
+ Kill all characters on the current line, no matter where point
+ is.
+ kkiillll--wwoorrdd ((MM--dd))
+ Kill from point to the end of the current word, or if between
+ words, to the end of the next word. Word boundaries are the
+ same as those used by ffoorrwwaarrdd--wwoorrdd.
+ bbaacckkwwaarrdd--kkiillll--wwoorrdd ((MM--RRuubboouutt))
+ Kill the word behind point. Word boundaries are the same as
+ those used by bbaacckkwwaarrdd--wwoorrdd.
+ sshheellll--kkiillll--wwoorrdd ((MM--dd))
+ Kill from point to the end of the current word, or if between
+ words, to the end of the next word. Word boundaries are the
+ same as those used by sshheellll--ffoorrwwaarrdd--wwoorrdd.
+ sshheellll--bbaacckkwwaarrdd--kkiillll--wwoorrdd ((MM--RRuubboouutt))
+ Kill the word behind point. Word boundaries are the same as
+ those used by sshheellll--bbaacckkwwaarrdd--wwoorrdd.
+ uunniixx--wwoorrdd--rruubboouutt ((CC--ww))
+ Kill the word behind point, using white space as a word bound-
+ ary. The killed text is saved on the kill-ring.
+ uunniixx--ffiilleennaammee--rruubboouutt
+ Kill the word behind point, using white space and the slash
+ character as the word boundaries. The killed text is saved on
+ the kill-ring.
+ ddeelleettee--hhoorriizzoonnttaall--ssppaaccee ((MM--\\))
+ Delete all spaces and tabs around point.
+ kkiillll--rreeggiioonn
+ Kill the text in the current region.
+ ccooppyy--rreeggiioonn--aass--kkiillll
+ Copy the text in the region to the kill buffer.
+ ccooppyy--bbaacckkwwaarrdd--wwoorrdd
+ Copy the word before point to the kill buffer. The word bound-
+ aries are the same as bbaacckkwwaarrdd--wwoorrdd.
+ ccooppyy--ffoorrwwaarrdd--wwoorrdd
+ Copy the word following point to the kill buffer. The word
+ boundaries are the same as ffoorrwwaarrdd--wwoorrdd.
+ yyaannkk ((CC--yy))
+ Yank the top of the kill ring into the buffer at point.
+ yyaannkk--ppoopp ((MM--yy))
+ Rotate the kill ring, and yank the new top. Only works follow-
+ ing yyaannkk or yyaannkk--ppoopp.
+
+ NNuummeerriicc AArrgguummeennttss
+ ddiiggiitt--aarrgguummeenntt ((MM--00,, MM--11,, ......,, MM----))
+ Add this digit to the argument already accumulating, or start a
+ new argument. M-- starts a negative argument.
+ uunniivveerrssaall--aarrgguummeenntt
+ This is another way to specify an argument. If this command is
+ followed by one or more digits, optionally with a leading minus
+ sign, those digits define the argument. If the command is fol-
+ lowed by digits, executing uunniivveerrssaall--aarrgguummeenntt again ends the
+ numeric argument, but is otherwise ignored. As a special case,
+ if this command is immediately followed by a character that is
+ neither a digit or minus sign, the argument count for the next
+ command is multiplied by four. The argument count is initially
+ one, so executing this function the first time makes the argu-
+ ment count four, a second time makes the argument count sixteen,
+ and so on.
+
+ CCoommpplleettiinngg
+ ccoommpplleettee ((TTAABB))
+ Attempt to perform completion on the text before point. BBaasshh
+ attempts completion treating the text as a variable (if the text
+ begins with $$), username (if the text begins with ~~), hostname
+ (if the text begins with @@), or command (including aliases and
+ functions) in turn. If none of these produces a match, filename
+ completion is attempted.
+ ppoossssiibbllee--ccoommpplleettiioonnss ((MM--??))
+ List the possible completions of the text before point.
+ iinnsseerrtt--ccoommpplleettiioonnss ((MM--**))
+ Insert all completions of the text before point that would have
+ been generated by ppoossssiibbllee--ccoommpplleettiioonnss.
+ mmeennuu--ccoommpplleettee
+ Similar to ccoommpplleettee, but replaces the word to be completed with
+ a single match from the list of possible completions. Repeated
+ execution of mmeennuu--ccoommpplleettee steps through the list of possible
+ completions, inserting each match in turn. At the end of the
+ list of completions, the bell is rung (subject to the setting of
+ bbeellll--ssttyyllee) and the original text is restored. An argument of _n
+ moves _n positions forward in the list of matches; a negative
+ argument may be used to move backward through the list. This
+ command is intended to be bound to TTAABB, but is unbound by
+ default.cc
+ mmeennuu--ccoommpplleettee--kkrrdd
+ Identicwwal to mmeennuu--ccoommpplleettee, but moves backward through the list
+ of possible completions, as if mmeennuu--ccoommpplleettee had been given a
+ negative argument. This command is unbound by default.
+ ddeelleettee--cchhaarr--oorr--lliisstt
+ Deletes the character under the cursor if not at the beginning
+ or end of the line (like ddeelleettee--cchhaarr). If at the end of the
+ line, behaves identically to ppoossssiibbllee--ccoommpplleettiioonnss. This command
+ is unbound by default.
+ ccoommpplleettee--ffiilleennaammee ((MM--//))
+ Attempt filename completion on the text before point.
+ ppoossssiibbllee--ffiilleennaammee--ccoommpplleettiioonnss ((CC--xx //))
+ List the possible completions of the text before point, treating
+ it as a filename.
+ ccoommpplleettee--uusseerrnnaammee ((MM--~~))
+ Attempt completion on the text before point, treating it as a
+ username.
+ ppoossssiibbllee--uusseerrnnaammee--ccoommpplleettiioonnss ((CC--xx ~~))
+ List the possible completions of the text before point, treating
+ it as a username.
+ ccoommpplleettee--vvaarriiaabbllee ((MM--$$))
+ Attempt completion on the text before point, treating it as a
+ shell variable.
+ ppoossssiibbllee--vvaarriiaabbllee--ccoommpplleettiioonnss ((CC--xx $$))
+ List the possible completions of the text before point, treating
+ it as a shell variable.
+ ccoommpplleettee--hhoossttnnaammee ((MM--@@))
+ Attempt completion on the text before point, treating it as a
+ hostname.
+ ppoossssiibbllee--hhoossttnnaammee--ccoommpplleettiioonnss ((CC--xx @@))
+ List the possible completions of the text before point, treating
+ it as a hostname.
+ ccoommpplleettee--ccoommmmaanndd ((MM--!!))
+ Attempt completion on the text before point, treating it as a
+ command name. Command completion attempts to match the text
+ against aliases, reserved words, shell functions, shell
+ builtins, and finally executable filenames, in that order.
+ ppoossssiibbllee--ccoommmmaanndd--ccoommpplleettiioonnss ((CC--xx !!))
+ List the possible completions of the text before point, treating
+ it as a command name.
+ ddyynnaammiicc--ccoommpplleettee--hhiissttoorryy ((MM--TTAABB))
+ Attempt completion on the text before point, comparing the text
+ against lines from the history list for possible completion
+ matches.
+ ddaabbbbrreevv--eexxppaanndd
+ Attempt menu completion on the text before point, comparing the
+ text against lines from the history list for possible completion
+ matches.
+ ccoommpplleettee--iinnttoo--bbrraacceess ((MM--{{))
+ Perform filename completion and insert the list of possible com-
+ pletions enclosed within braces so the list is available to the
+ shell (see BBrraaccee EExxppaannssiioonn above).
+
+ KKeeyybbooaarrdd MMaaccrrooss
+ ssttaarrtt--kkbbdd--mmaaccrroo ((CC--xx (())
+ Begin saving the characters typed into the current keyboard
+ macro.
+ eenndd--kkbbdd--mmaaccrroo ((CC--xx ))))
+ Stop saving the characters typed into the current keyboard macro
+ and store the definition.
+ ccaallll--llaasstt--kkbbdd--mmaaccrroo ((CC--xx ee))
+ Re-execute the last keyboard macro defined, by making the char-
+ acters in the macro appear as if typed at the keyboard.
+
+ MMiisscceellllaanneeoouuss
+ rree--rreeaadd--iinniitt--ffiillee ((CC--xx CC--rr))
+ Read in the contents of the _i_n_p_u_t_r_c file, and incorporate any
+ bindings or variable assignments found there.
+ aabboorrtt ((CC--gg))
+ Abort the current editing command and ring the terminal's bell
+ (subject to the setting of bbeellll--ssttyyllee).
+ ddoo--uuppppeerrccaassee--vveerrssiioonn ((MM--aa,, MM--bb,, MM--_x,, ......))
+ If the metafied character _x is lowercase, run the command that
+ is bound to the corresponding uppercase character.
+ pprreeffiixx--mmeettaa ((EESSCC))
+ Metafy the next character typed. EESSCC ff is equivalent to MMeettaa--ff.
+ uunnddoo ((CC--__,, CC--xx CC--uu))
+ Incremental undo, separately remembered for each line.
+ rreevveerrtt--lliinnee ((MM--rr))
+ Undo all changes made to this line. This is like executing the
+ uunnddoo command enough times to return the line to its initial
+ state.
+ ttiillddee--eexxppaanndd ((MM--&&))
+ Perform tilde expansion on the current word.
+ sseett--mmaarrkk ((CC--@@,, MM--<<ssppaaccee>>))
+ Set the mark to the point. If a numeric argument is supplied,
+ the mark is set to that position.
+ eexxcchhaannggee--ppooiinntt--aanndd--mmaarrkk ((CC--xx CC--xx))
+ Swap the point with the mark. The current cursor position is
+ set to the saved position, and the old cursor position is saved
+ as the mark.
+ cchhaarraacctteerr--sseeaarrcchh ((CC--]]))
+ A character is read and point is moved to the next occurrence of
+ that character. A negative count searches for previous occur-
+ rences.
+ cchhaarraacctteerr--sseeaarrcchh--bbaacckkwwaarrdd ((MM--CC--]]))
+ A character is read and point is moved to the previous occur-
+ rence of that character. A negative count searches for subse-
+ quent occurrences.
+ sskkiipp--ccssii--sseeqquueennccee (())
+ Read enough characters to consume a multi-key sequence such as
+ those defined for keys like Home and End. Such sequences begin
+ with a Control Sequence Indicator (CSI), usually ESC-[. If this
+ sequence is bound to "\[", keys producing such sequences will
+ have no effect unless explicitly bound to a readline command,
+ instead of inserting stray characters into the editing buffer.
+ This is unbound by default, but usually bound to ESC-[.
+ iinnsseerrtt--ccoommmmeenntt ((MM--##))
+ Without a numeric argument, the value of the readline ccoomm--
+ mmeenntt--bbeeggiinn variable is inserted at the beginning of the current
+ line. If a numeric argument is supplied, this command acts as a
+ toggle: if the characters at the beginning of the line do not
+ match the value of ccoommmmeenntt--bbeeggiinn, the value is inserted, other-
+ wise the characters in ccoommmmeenntt--bbeeggiinn are deleted from the begin-
+ ning of the line. In either case, the line is accepted as if a
+ newline had been typed. The default value of ccoommmmeenntt--bbeeggiinn
+ causes this command to make the current line a shell comment.
+ If a numeric argument causes the comment character to be
+ removed, the line will be executed by the shell.
+ gglloobb--ccoommpplleettee--wwoorrdd ((MM--gg))
+ The word before point is treated as a pattern for pathname
+ expansion, with an asterisk implicitly appended. This pattern
+ is used to generate a list of matching file names for possible
+ completions.
+ gglloobb--eexxppaanndd--wwoorrdd ((CC--xx **))
+ The word before point is treated as a pattern for pathname
+ expansion, and the list of matching file names is inserted,
+ replacing the word. If a numeric argument is supplied, an
+ asterisk is appended before pathname expansion.
+ gglloobb--lliisstt--eexxppaannssiioonnss ((CC--xx gg))
+ The list of expansions that would have been generated by
+ gglloobb--eexxppaanndd--wwoorrdd is displayed, and the line is redrawn. If a
+ numeric argument is supplied, an asterisk is appended before
+ pathname expansion.
+ dduummpp--ffuunnccttiioonnss
+ Print all of the functions and their key bindings to the read-
+ line output stream. If a numeric argument is supplied, the out-
+ put is formatted in such a way that it can be made part of an
+ _i_n_p_u_t_r_c file.
+ dduummpp--vvaarriiaabblleess
+ Print all of the settable readline variables and their values to
+ the readline output stream. If a numeric argument is supplied,
+ the output is formatted in such a way that it can be made part
+ of an _i_n_p_u_t_r_c file.
+ dduummpp--mmaaccrrooss
+ Print all of the readline key sequences bound to macros and the
+ strings they output. If a numeric argument is supplied, the
+ output is formatted in such a way that it can be made part of an
+ _i_n_p_u_t_r_c file.
+ ddiissppllaayy--sshheellll--vveerrssiioonn ((CC--xx CC--vv))
+ Display version information about the current instance of bbaasshh.
+
+ PPrrooggrraammmmaabbllee CCoommpplleettiioonn
+ When word completion is attempted for an argument to a command for
+ which a completion specification (a _c_o_m_p_s_p_e_c) has been defined using
+ the ccoommpplleettee builtin (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below), the pro-
+ grammable completion facilities are invoked.
+
+ First, the command name is identified. If the command word is the
+ empty string (completion attempted at the beginning of an empty line),
+ any compspec defined with the --EE option to ccoommpplleettee is used. If a
+ compspec has been defined for that command, the compspec is used to
+ generate the list of possible completions for the word. If the command
+ word is a full pathname, a compspec for the full pathname is searched
+ for first. If no compspec is found for the full pathname, an attempt
+ is made to find a compspec for the portion following the final slash.
+ If those searches to not result in a compspec, any compspec defined
+ with the --DD option to ccoommpplleettee is used as the default.
+
+ Once a compspec has been found, it is used to generate the list of
+ matching words. If a compspec is not found, the default bbaasshh comple-
+ tion as described above under CCoommpplleettiinngg is performed.
+
+ First, the actions specified by the compspec are used. Only matches
+ which are prefixed by the word being completed are returned. When the
+ --ff or --dd option is used for filename or directory name completion, the
+ shell variable FFIIGGNNOORREE is used to filter the matches.
+
+ Any completions specified by a pathname expansion pattern to the --GG
+ option are generated next. The words generated by the pattern need not
+ match the word being completed. The GGLLOOBBIIGGNNOORREE shell variable is not
+ used to filter the matches, but the FFIIGGNNOORREE variable is used.
+
+ Next, the string specified as the argument to the --WW option is consid-
+ ered. The string is first split using the characters in the IIFFSS spe-
+ cial variable as delimiters. Shell quoting is honored. Each word is
+ then expanded using brace expansion, tilde expansion, parameter and
+ variable expansion, command substitution, and arithmetic expansion, as
+ described above under EEXXPPAANNSSIIOONN. The results are split using the rules
+ described above under WWoorrdd SSpplliittttiinngg. The results of the expansion are
+ prefix-matched against the word being completed, and the matching words
+ become the possible completions.
+
+ After these matches have been generated, any shell function or command
+ specified with the --FF and --CC options is invoked. When the command or
+ function is invoked, the CCOOMMPP__LLIINNEE, CCOOMMPP__PPOOIINNTT, CCOOMMPP__KKEEYY, and CCOOMMPP__TTYYPPEE
+ variables are assigned values as described above under SShheellll VVaarriiaabblleess.
+ If a shell function is being invoked, the CCOOMMPP__WWOORRDDSS and CCOOMMPP__CCWWOORRDD
+ variables are also set. When the function or command is invoked, the
+ first argument is the name of the command whose arguments are being
+ completed, the second argument is the word being completed, and the
+ third argument is the word preceding the word being completed on the
+ current command line. No filtering of the generated completions
+ against the word being completed is performed; the function or command
+ has complete freedom in generating the matches.
+
+ Any function specified with --FF is invoked first. The function may use
+ any of the shell facilities, including the ccoommppggeenn builtin described
+ below, to generate the matches. It must put the possible completions
+ in the CCOOMMPPRREEPPLLYY array variable.
+
+ Next, any command specified with the --CC option is invoked in an envi-
+ ronment equivalent to command substitution. It should print a list of
+ completions, one per line, to the standard output. Backslash may be
+ used to escape a newline, if necessary.
+
+ After all of the possible completions are generated, any filter speci-
+ fied with the --XX option is applied to the list. The filter is a pat-
+ tern as used for pathname expansion; a && in the pattern is replaced
+ with the text of the word being completed. A literal && may be escaped
+ with a backslash; the backslash is removed before attempting a match.
+ Any completion that matches the pattern will be removed from the list.
+ A leading !! negates the pattern; in this case any completion not match-
+ ing the pattern will be removed.
+
+ Finally, any prefix and suffix specified with the --PP and --SS options are
+ added to each member of the completion list, and the result is returned
+ to the readline completion code as the list of possible completions.
+
+ If the previously-applied actions do not generate any matches, and the
+ --oo ddiirrnnaammeess option was supplied to ccoommpplleettee when the compspec was
+ defined, directory name completion is attempted.
+
+ If the --oo pplluussddiirrss option was supplied to ccoommpplleettee when the compspec
+ was defined, directory name completion is attempted and any matches are
+ added to the results of the other actions.
+
+ By default, if a compspec is found, whatever it generates is returned
+ to the completion code as the full set of possible completions. The
+ default bbaasshh completions are not attempted, and the readline default of
+ filename completion is disabled. If the --oo bbaasshhddeeffaauulltt option was sup-
+ plied to ccoommpplleettee when the compspec was defined, the bbaasshh default com-
+ pletions are attempted if the compspec generates no matches. If the --oo
+ ddeeffaauulltt option was supplied to ccoommpplleettee when the compspec was defined,
+ readline's default completion will be performed if the compspec (and,
+ if attempted, the default bbaasshh completions) generate no matches.
+
+ When a compspec indicates that directory name completion is desired,
+ the programmable completion functions force readline to append a slash
+ to completed names which are symbolic links to directories, subject to
+ the value of the mmaarrkk--ddiirreeccttoorriieess readline variable, regardless of the
+ setting of the mmaarrkk--ssyymmlliinnkkeedd--ddiirreeccttoorriieess readline variable.
+
+ There is some support for dynamically modifying completions. This is
+ most useful when used in combination with a default completion speci-
+ fied with ccoommpplleettee --DD. It's possible for shell functions executed as
+ completion handlers to indicate that completion should be retried by
+ returning an exit status of 124. If a shell function returns 124, and
+ changes the compspec associated with the command on which completion is
+ being attempted (supplied as the first argument when the function is
+ executed), programmable completion restarts from the beginning, with an
+ attempt to find a compspec for that command. This allows a set of com-
+ pletions to be built dynamically as completion is attempted, rather
+ than being loaded all at once.
+
+ For instance, assuming that there is a library of compspecs, each kept
+ in a file corresponding to the name of the command, the following
+ default completion function would load completions dynamically:
+
+ _completion_loader()
+ {
+ . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124
+ }
+ complete -D -F _completion_loader
+
+
+HHIISSTTOORRYY
+ When the --oo hhiissttoorryy option to the sseett builtin is enabled, the shell
+ provides access to the _c_o_m_m_a_n_d _h_i_s_t_o_r_y, the list of commands previously
+ typed. The value of the HHIISSTTSSIIZZEE variable is used as the number of
+ commands to save in a history list. The text of the last HHIISSTTSSIIZZEE com-
+ mands (default 500) is saved. The shell stores each command in the
+ history list prior to parameter and variable expansion (see EEXXPPAANNSSIIOONN
+ above) but after history expansion is performed, subject to the values
+ of the shell variables HHIISSTTIIGGNNOORREE and HHIISSTTCCOONNTTRROOLL.
+
+ On startup, the history is initialized from the file named by the vari-
+ able HHIISSTTFFIILLEE (default _~_/_._b_a_s_h___h_i_s_t_o_r_y). The file named by the value
+ of HHIISSTTFFIILLEE is truncated, if necessary, to contain no more than the
+ number of lines specified by the value of HHIISSTTFFIILLEESSIIZZEE. When the his-
+ tory file is read, lines beginning with the history comment character
+ followed immediately by a digit are interpreted as timestamps for the
+ preceding history line. These timestamps are optionally displayed
+ depending on the value of the HHIISSTTTTIIMMEEFFOORRMMAATT variable. When an inter-
+ active shell exits, the last $$HHIISSTTSSIIZZEE lines are copied from the his-
+ tory list to $$HHIISSTTFFIILLEE. If the hhiissttaappppeenndd shell option is enabled (see
+ the description of sshhoopptt under SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below), the lines
+ are appended to the history file, otherwise the history file is over-
+ written. If HHIISSTTFFIILLEE is unset, or if the history file is unwritable,
+ the history is not saved. If the HHIISSTTTTIIMMEEFFOORRMMAATT variable is set, time
+ stamps are written to the history file, marked with the history comment
+ character, so they may be preserved across shell sessions. This uses
+ the history comment character to distinguish timestamps from other his-
+ tory lines. After saving the history, the history file is truncated to
+ contain no more than HHIISSTTFFIILLEESSIIZZEE lines. If HHIISSTTFFIILLEESSIIZZEE is not set,
+ no truncation is performed.
+
+ The builtin command ffcc (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below) may be used
+ to list or edit and re-execute a portion of the history list. The hhiiss--
+ ttoorryy 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.
+
+ The shell allows control over which commands are saved on the history
+ list. The HHIISSTTCCOONNTTRROOLL and HHIISSTTIIGGNNOORREE variables may be set to cause the
+ shell to save only a subset of the commands entered. The ccmmddhhiisstt 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 lliitthhiisstt shell option
+ causes the shell to save the command with embedded newlines instead of
+ semicolons. See the description of the sshhoopptt builtin below under SSHHEELLLL
+ BBUUIILLTTIINN CCOOMMMMAANNDDSS for information on setting and unsetting shell
+ options.
+
+HHIISSTTOORRYY EEXXPPAANNSSIIOONN
+ The shell supports a history expansion feature that is similar to the
+ history expansion in ccsshh.. This section describes what syntax features
+ are available. This feature is enabled by default for interactive
+ shells, and can be disabled using the ++HH option to the sseett builtin com-
+ mand (see SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS below). Non-interactive shells do not
+ perform history expansion by default.
+
+ 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 is performed immediately after a complete line is
+ read, before the shell breaks it into words. It takes place in two
+ parts. The first is to determine which line from the history list to
+ use during substitution. The second is to select portions of that line
+ for inclusion into the current one. The line selected from the history
+ is the _e_v_e_n_t, and the portions of that line that are acted upon are
+ _w_o_r_d_s. Various _m_o_d_i_f_i_e_r_s are available to manipulate the selected
+ words. The line is broken into words in the same fashion as when read-
+ ing input, so that several _m_e_t_a_c_h_a_r_a_c_t_e_r-separated words surrounded by
+ quotes are considered one word. History expansions are introduced by
+ the appearance of the history expansion character, which is !! by
+ default. Only backslash (\\) and single quotes can quote the history
+ expansion character.
+
+ Several characters inhibit history expansion if found immediately fol-
+ lowing the history expansion character, even if it is unquoted: space,
+ tab, newline, carriage return, and ==. If the eexxttgglloobb shell option is
+ enabled, (( will also inhibit expansion.
+
+ Several shell options settable with the sshhoopptt builtin may be used to
+ tailor the behavior of history expansion. If the hhiissttvveerriiffyy shell
+ option is enabled (see the description of the sshhoopptt builtin below), and
+ rreeaaddlliinnee is being used, history substitutions are not immediately
+ passed to the shell parser. Instead, the expanded line is reloaded
+ into the rreeaaddlliinnee editing buffer for further modification. If rreeaaddlliinnee
+ is being used, and the hhiissttrreeeeddiitt shell option is enabled, a failed
+ history substitution will be reloaded into the rreeaaddlliinnee editing buffer
+ for correction. The --pp option to the hhiissttoorryy builtin command may be
+ used to see what a history expansion will do before using it. The --ss
+ option to the hhiissttoorryy 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.
+
+ The shell allows control of the various characters used by the history
+ expansion mechanism (see the description of hhiissttcchhaarrss above under SShheellll
+ VVaarriiaabblleess). The shell uses the history comment character to mark his-
+ tory timestamps when writing the history file.
+
+ EEvveenntt DDeessiiggnnaattoorrss
+ An event designator is a reference to a command line entry in the his-
+ tory list.
+
+ !! Start a history substitution, except when followed by a bbllaannkk,
+ newline, carriage return, = or ( (when the eexxttgglloobb shell option
+ is enabled using the sshhoopptt builtin).
+ !!_n Refer to command line _n.
+ !!--_n Refer to the current command line minus _n.
+ !!!! Refer to the previous command. This is a synonym for `!-1'.
+ !!_s_t_r_i_n_g
+ Refer to the most recent command starting with _s_t_r_i_n_g.
+ !!??_s_t_r_i_n_g[[??]]
+ Refer to the most recent command containing _s_t_r_i_n_g. The trail-
+ ing ?? may be omitted if _s_t_r_i_n_g is followed immediately by a new-
+ line.
+ ^^_s_t_r_i_n_g_1^^_s_t_r_i_n_g_2^^
+ Quick substitution. Repeat the last command, replacing _s_t_r_i_n_g_1
+ with _s_t_r_i_n_g_2. Equivalent to ``!!:s/_s_t_r_i_n_g_1/_s_t_r_i_n_g_2/'' (see MMoodd--
+ iiffiieerrss below).
+ !!## The entire command line typed so far.
+
+ WWoorrdd DDeessiiggnnaattoorrss
+ Word designators are used to select desired words from the event. A ::
+ separates the event specification from the word designator. It may be
+ omitted if the word designator begins with a ^^, $$, **, --, or %%. 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 sepa-
+ rated by single spaces.
+
+ 00 ((zzeerroo))
+ The zeroth word. For the shell, this is the command word.
+ _n The _nth word.
+ ^^ The first argument. That is, word 1.
+ $$ The last argument.
+ %% The word matched by the most recent `?_s_t_r_i_n_g?' search.
+ _x--_y A range of words; `-_y' abbreviates `0-_y'.
+ ** All of the words but the zeroth. This is a synonym for `_1_-_$'.
+ It is not an error to use ** if there is just one word in the
+ event; the empty string is returned in that case.
+ xx** Abbreviates _x_-_$.
+ xx-- Abbreviates _x_-_$ like xx**, but omits the last word.
+
+ If a word designator is supplied without an event specification, the
+ previous command is used as the event.
+
+ MMooddiiffiieerrss
+ After the optional word designator, there may appear a sequence of one
+ or more of the following modifiers, each preceded by a `:'.
+
+ hh Remove a trailing file name component, leaving only the head.
+ tt Remove all leading file name components, leaving the tail.
+ rr Remove a trailing suffix of the form _._x_x_x, leaving the basename.
+ ee Remove all but the trailing suffix.
+ pp Print the new command but do not execute it.
+ qq Quote the substituted words, escaping further substitutions.
+ xx Quote the substituted words as with qq, but break into words at
+ bbllaannkkss and newlines.
+ ss//_o_l_d//_n_e_w//
+ Substitute _n_e_w for the first occurrence of _o_l_d in the event
+ line. Any delimiter can be used in place of /. The final
+ delimiter is optional if it is the last character of the event
+ line. The delimiter may be quoted in _o_l_d and _n_e_w with a single
+ backslash. If & appears in _n_e_w, it is replaced by _o_l_d. A sin-
+ gle backslash will quote the &. If _o_l_d is null, it is set to
+ the last _o_l_d substituted, or, if no previous history substitu-
+ tions took place, the last _s_t_r_i_n_g in a !!??_s_t_r_i_n_g[[??]] search.
+ && Repeat the previous substitution.
+ gg Cause changes to be applied over the entire event line. This is
+ used in conjunction with `::ss' (e.g., `::ggss//_o_l_d//_n_e_w//') or `::&&'.
+ If used with `::ss', any delimiter can be used in place of /, and
+ the final delimiter is optional if it is the last character of
+ the event line. An aa may be used as a synonym for gg.
+ GG Apply the following `ss' modifier once to each word in the event
+ line.
+
+SSHHEELLLL BBUUIILLTTIINN CCOOMMMMAANNDDSS
+ Unless otherwise noted, each builtin command documented in this section
+ as accepting options preceded by -- accepts ---- to signify the end of the
+ options. The ::, ttrruuee, ffaallssee, and tteesstt builtins do not accept options
+ and do not treat ---- specially. The eexxiitt, llooggoouutt, bbrreeaakk, ccoonnttiinnuuee, lleett,
+ and sshhiifftt builtins accept and process arguments beginning with -- with-
+ out requiring ----. Other builtins that accept arguments but are not
+ specified as accepting options interpret arguments beginning with -- as
+ invalid options and require ---- to prevent this interpretation.
+ :: [_a_r_g_u_m_e_n_t_s]
+ No effect; the command does nothing beyond expanding _a_r_g_u_m_e_n_t_s
+ and performing any specified redirections. A zero exit code is
+ returned.
+
+ .. _f_i_l_e_n_a_m_e [_a_r_g_u_m_e_n_t_s]
+ ssoouurrccee _f_i_l_e_n_a_m_e [_a_r_g_u_m_e_n_t_s]
+ Read and execute commands from _f_i_l_e_n_a_m_e in the current shell
+ environment and return the exit status of the last command exe-
+ cuted from _f_i_l_e_n_a_m_e. If _f_i_l_e_n_a_m_e does not contain a slash, file
+ names in PPAATTHH are used to find the directory containing _f_i_l_e_-
+ _n_a_m_e. The file searched for in PPAATTHH need not be executable.
+ When bbaasshh is not in _p_o_s_i_x _m_o_d_e, the current directory is
+ searched if no file is found in PPAATTHH. If the ssoouurrcceeppaatthh option
+ to the sshhoopptt builtin command is turned off, the PPAATTHH is not
+ searched. If any _a_r_g_u_m_e_n_t_s are supplied, they become the posi-
+ tional parameters when _f_i_l_e_n_a_m_e is executed. Otherwise the
+ positional parameters are unchanged. The return status is the
+ status of the last command exited within the script (0 if no
+ commands are executed), and false if _f_i_l_e_n_a_m_e is not found or
+ cannot be read.
+
+ aalliiaass [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
+ AAlliiaass with no arguments or with the --pp option prints the list of
+ aliases in the form aalliiaass _n_a_m_e=_v_a_l_u_e on standard output. When
+ arguments are supplied, an alias is defined for each _n_a_m_e whose
+ _v_a_l_u_e is given. A trailing space in _v_a_l_u_e causes the next word
+ to be checked for alias substitution when the alias is expanded.
+ For each _n_a_m_e in the argument list for which no _v_a_l_u_e is sup-
+ plied, the name and value of the alias is printed. AAlliiaass
+ returns true unless a _n_a_m_e is given for which no alias has been
+ defined.
+
+ bbgg [_j_o_b_s_p_e_c ...]
+ Resume each suspended job _j_o_b_s_p_e_c in the background, as if it
+ had been started with &&. If _j_o_b_s_p_e_c is not present, the shell's
+ notion of the _c_u_r_r_e_n_t _j_o_b is used. bbgg _j_o_b_s_p_e_c returns 0 unless
+ run when job control is disabled or, when run with job control
+ enabled, any specified _j_o_b_s_p_e_c was not found or was started
+ without job control.
+
+ bbiinndd [--mm _k_e_y_m_a_p] [--llppssvvPPSSVV]
+ bbiinndd [--mm _k_e_y_m_a_p] [--qq _f_u_n_c_t_i_o_n] [--uu _f_u_n_c_t_i_o_n] [--rr _k_e_y_s_e_q]
+ bbiinndd [--mm _k_e_y_m_a_p] --ff _f_i_l_e_n_a_m_e
+ bbiinndd [--mm _k_e_y_m_a_p] --xx _k_e_y_s_e_q:_s_h_e_l_l_-_c_o_m_m_a_n_d
+ bbiinndd [--mm _k_e_y_m_a_p] _k_e_y_s_e_q:_f_u_n_c_t_i_o_n_-_n_a_m_e
+ bbiinndd _r_e_a_d_l_i_n_e_-_c_o_m_m_a_n_d
+ Display current rreeaaddlliinnee key and function bindings, bind a key
+ sequence to a rreeaaddlliinnee function or macro, or set a rreeaaddlliinnee
+ variable. Each non-option argument is a command as it would
+ appear in _._i_n_p_u_t_r_c, but each binding or command must be passed
+ as a separate argument; e.g., '"\C-x\C-r": re-read-init-file'.
+ Options, if supplied, have the following meanings:
+ --mm _k_e_y_m_a_p
+ Use _k_e_y_m_a_p as the keymap to be affected by the subsequent
+ bindings. Acceptable _k_e_y_m_a_p names are _e_m_a_c_s_, _e_m_a_c_s_-_s_t_a_n_-
+ _d_a_r_d_, _e_m_a_c_s_-_m_e_t_a_, _e_m_a_c_s_-_c_t_l_x_, _v_i_, _v_i_-_m_o_v_e_, _v_i_-_c_o_m_m_a_n_d,
+ and _v_i_-_i_n_s_e_r_t. _v_i is equivalent to _v_i_-_c_o_m_m_a_n_d; _e_m_a_c_s is
+ equivalent to _e_m_a_c_s_-_s_t_a_n_d_a_r_d.
+ --ll List the names of all rreeaaddlliinnee functions.
+ --pp Display rreeaaddlliinnee function names and bindings in such a
+ way that they can be re-read.
+ --PP List current rreeaaddlliinnee function names and bindings.
+ --ss Display rreeaaddlliinnee key sequences bound to macros and the
+ strings they output in such a way that they can be re-
+ read.
+ --SS Display rreeaaddlliinnee key sequences bound to macros and the
+ strings they output.
+ --vv Display rreeaaddlliinnee variable names and values in such a way
+ that they can be re-read.
+ --VV List current rreeaaddlliinnee variable names and values.
+ --ff _f_i_l_e_n_a_m_e
+ Read key bindings from _f_i_l_e_n_a_m_e.
+ --qq _f_u_n_c_t_i_o_n
+ Query about which keys invoke the named _f_u_n_c_t_i_o_n.
+ --uu _f_u_n_c_t_i_o_n
+ Unbind all keys bound to the named _f_u_n_c_t_i_o_n.
+ --rr _k_e_y_s_e_q
+ Remove any current binding for _k_e_y_s_e_q.
+ --xx _k_e_y_s_e_q::_s_h_e_l_l_-_c_o_m_m_a_n_d
+ Cause _s_h_e_l_l_-_c_o_m_m_a_n_d to be executed whenever _k_e_y_s_e_q is
+ entered. When _s_h_e_l_l_-_c_o_m_m_a_n_d is executed, the shell sets
+ the RREEAADDLLIINNEE__LLIINNEE variable to the contents of the rreeaadd--
+ lliinnee line buffer and the RREEAADDLLIINNEE__PPOOIINNTT variable to the
+ current location of the insertion point. If the executed
+ command changes the value of RREEAADDLLIINNEE__LLIINNEE or RREEAADD--
+ LLIINNEE__PPOOIINNTT, those new values will be reflected in the
+ editing state.
+
+ The return value is 0 unless an unrecognized option is given or
+ an error occurred.
+
+ bbrreeaakk [_n]
+ Exit from within a ffoorr, wwhhiillee, uunnttiill, or sseelleecctt loop. If _n is
+ specified, break _n levels. _n must be >= 1. If _n is greater
+ than the number of enclosing loops, all enclosing loops are
+ exited. The return value is 0 unless _n is not greater than or
+ equal to 1.
+
+ bbuuiillttiinn _s_h_e_l_l_-_b_u_i_l_t_i_n [_a_r_g_u_m_e_n_t_s]
+ Execute the specified shell builtin, passing it _a_r_g_u_m_e_n_t_s, and
+ return its exit status. This is useful when defining a function
+ whose name is the same as a shell builtin, retaining the func-
+ tionality of the builtin within the function. The ccdd builtin is
+ commonly redefined this way. The return status is false if
+ _s_h_e_l_l_-_b_u_i_l_t_i_n is not a shell builtin command.
+
+ ccaalllleerr [_e_x_p_r]
+ Returns the context of any active subroutine call (a shell func-
+ tion or a script executed with the .. or ssoouurrccee builtins. With-
+ out _e_x_p_r, ccaalllleerr displays the line number and source filename of
+ the current subroutine call. If a non-negative integer is sup-
+ plied as _e_x_p_r, ccaalllleerr displays the line number, subroutine name,
+ and source file corresponding to that position in the current
+ execution call stack. This extra information may be used, for
+ example, to print a stack trace. The current frame is frame 0.
+ The return value is 0 unless the shell is not executing a sub-
+ routine call or _e_x_p_r does not correspond to a valid position in
+ the call stack.
+
+ ccdd [--LL||--PP] [_d_i_r]
+ Change the current directory to _d_i_r. The variable HHOOMMEE is the
+ default _d_i_r. The variable CCDDPPAATTHH defines the search path for
+ the directory containing _d_i_r. Alternative directory names in
+ CCDDPPAATTHH are separated by a colon (:). A null directory name in
+ CCDDPPAATTHH is the same as the current directory, i.e., ``..''. If
+ _d_i_r begins with a slash (/), then CCDDPPAATTHH is not used. The --PP
+ option says to use the physical directory structure instead of
+ following symbolic links (see also the --PP option to the sseett
+ builtin command); the --LL option forces symbolic links to be fol-
+ lowed. An argument of -- is equivalent to $$OOLLDDPPWWDD. If a non-
+ empty directory name from CCDDPPAATTHH is used, or if -- is the first
+ argument, and the directory change is successful, the absolute
+ pathname of the new working directory is written to the standard
+ output. The return value is true if the directory was success-
+ fully changed; false otherwise.
+
+ ccoommmmaanndd [--ppVVvv] _c_o_m_m_a_n_d [_a_r_g ...]
+ Run _c_o_m_m_a_n_d with _a_r_g_s suppressing the normal shell function
+ lookup. Only builtin commands or commands found in the PPAATTHH are
+ executed. If the --pp option is given, the search for _c_o_m_m_a_n_d is
+ performed using a default value for PPAATTHH that is guaranteed to
+ find all of the standard utilities. If either the --VV or --vv
+ option is supplied, a description of _c_o_m_m_a_n_d is printed. The --vv
+ option causes a single word indicating the command or file name
+ used to invoke _c_o_m_m_a_n_d to be displayed; the --VV option produces a
+ more verbose description. If the --VV or --vv option is supplied,
+ the exit status is 0 if _c_o_m_m_a_n_d was found, and 1 if not. If
+ neither option is supplied and an error occurred or _c_o_m_m_a_n_d can-
+ not be found, the exit status is 127. Otherwise, the exit sta-
+ tus of the ccoommmmaanndd builtin is the exit status of _c_o_m_m_a_n_d.
+
+ ccoommppggeenn [_o_p_t_i_o_n] [_w_o_r_d]
+ Generate possible completion matches for _w_o_r_d according to the
+ _o_p_t_i_o_ns, which may be any option accepted by the ccoommpplleettee
+ builtin with the exception of --pp and --rr, and write the matches
+ to the standard output. When using the --FF or --CC options, the
+ various shell variables set by the programmable completion
+ facilities, while available, will not have useful values.
+
+ The matches will be generated in the same way as if the pro-
+ grammable completion code had generated them directly from a
+ completion specification with the same flags. If _w_o_r_d is speci-
+ fied, only those completions matching _w_o_r_d will be displayed.
+
+ The return value is true unless an invalid option is supplied,
+ or no matches were generated.
+
+ ccoommpplleettee [--aabbccddeeffggjjkkssuuvv] [--oo _c_o_m_p_-_o_p_t_i_o_n] [--DDEE] [--AA _a_c_t_i_o_n] [--GG _g_l_o_b_-
+ _p_a_t] [--WW _w_o_r_d_l_i_s_t] [--FF _f_u_n_c_t_i_o_n] [--CC _c_o_m_m_a_n_d]
+ [--XX _f_i_l_t_e_r_p_a_t] [--PP _p_r_e_f_i_x] [--SS _s_u_f_f_i_x] _n_a_m_e [_n_a_m_e _._._.]
+ ccoommpplleettee --pprr [--DDEE] [_n_a_m_e ...]
+ Specify how arguments to each _n_a_m_e should be completed. If the
+ --pp option is supplied, or if no options are supplied, existing
+ completion specifications are printed in a way that allows them
+ to be reused as input. The --rr option removes a completion spec-
+ ification for each _n_a_m_e, or, if no _n_a_m_es are supplied, all com-
+ pletion specifications. The --DD option indicates that the
+ remaining options and actions should apply to the ``default''
+ command completion; that is, completion attempted on a command
+ for which no completion has previously been defined. The --EE
+ option indicates that the remaining options and actions should
+ apply to ``empty'' command completion; that is, completion
+ attempted on a blank line.
+
+ The process of applying these completion specifications when
+ word completion is attempted is described above under PPrroo--
+ ggrraammmmaabbllee CCoommpplleettiioonn.
+
+ Other options, if specified, have the following meanings. The
+ arguments to the --GG, --WW, and --XX options (and, if necessary, the
+ --PP and --SS options) should be quoted to protect them from expan-
+ sion before the ccoommpplleettee builtin is invoked.
+ --oo _c_o_m_p_-_o_p_t_i_o_n
+ The _c_o_m_p_-_o_p_t_i_o_n controls several aspects of the comp-
+ spec's behavior beyond the simple generation of comple-
+ tions. _c_o_m_p_-_o_p_t_i_o_n may be one of:
+ bbaasshhddeeffaauulltt
+ Perform the rest of the default bbaasshh completions
+ if the compspec generates no matches.
+ ddeeffaauulltt Use readline's default filename completion if
+ the compspec generates no matches.
+ ddiirrnnaammeess
+ Perform directory name completion if the comp-
+ spec generates no matches.
+ ffiilleennaammeess
+ Tell readline that the compspec generates file-
+ names, so it can perform any filename-specific
+ processing (like adding a slash to directory
+ names, quoting special characters, or suppress-
+ ing trailing spaces). Intended to be used with
+ shell functions.
+ nnoossppaaccee Tell readline not to append a space (the
+ default) to words completed at the end of the
+ line.
+ pplluussddiirrss
+ After any matches defined by the compspec are
+ generated, directory name completion is
+ attempted and any matches are added to the
+ results of the other actions.
+ --AA _a_c_t_i_o_n
+ The _a_c_t_i_o_n may be one of the following to generate a
+ list of possible completions:
+ aalliiaass Alias names. May also be specified as --aa.
+ aarrrraayyvvaarr
+ Array variable names.
+ bbiinnddiinngg RReeaaddlliinnee key binding names.
+ bbuuiillttiinn Names of shell builtin commands. May also be
+ specified as --bb.
+ ccoommmmaanndd Command names. May also be specified as --cc.
+ ddiirreeccttoorryy
+ Directory names. May also be specified as --dd.
+ ddiissaabblleedd
+ Names of disabled shell builtins.
+ eennaabblleedd Names of enabled shell builtins.
+ eexxppoorrtt Names of exported shell variables. May also be
+ specified as --ee.
+ ffiillee File names. May also be specified as --ff.
+ ffuunnccttiioonn
+ Names of shell functions.
+ ggrroouupp Group names. May also be specified as --gg.
+ hheellppttooppiicc
+ Help topics as accepted by the hheellpp builtin.
+ hhoossttnnaammee
+ Hostnames, as taken from the file specified by
+ the HHOOSSTTFFIILLEE shell variable.
+ jjoobb Job names, if job control is active. May also
+ be specified as --jj.
+ kkeeyywwoorrdd Shell reserved words. May also be specified as
+ --kk.
+ rruunnnniinngg Names of running jobs, if job control is active.
+ sseerrvviiccee Service names. May also be specified as --ss.
+ sseettoopptt Valid arguments for the --oo option to the sseett
+ builtin.
+ sshhoopptt Shell option names as accepted by the sshhoopptt
+ builtin.
+ ssiiggnnaall Signal names.
+ ssttooppppeedd Names of stopped jobs, if job control is active.
+ uusseerr User names. May also be specified as --uu.
+ vvaarriiaabbllee
+ Names of all shell variables. May also be spec-
+ ified as --vv.
+ --GG _g_l_o_b_p_a_t
+ The pathname expansion pattern _g_l_o_b_p_a_t is expanded to
+ generate the possible completions.
+ --WW _w_o_r_d_l_i_s_t
+ The _w_o_r_d_l_i_s_t is split using the characters in the IIFFSS
+ special variable as delimiters, and each resultant word
+ is expanded. The possible completions are the members
+ of the resultant list which match the word being com-
+ pleted.
+ --CC _c_o_m_m_a_n_d
+ _c_o_m_m_a_n_d is executed in a subshell environment, and its
+ output is used as the possible completions.
+ --FF _f_u_n_c_t_i_o_n
+ The shell function _f_u_n_c_t_i_o_n is executed in the current
+ shell environment. When it finishes, the possible com-
+ pletions are retrieved from the value of the CCOOMMPPRREEPPLLYY
+ array variable.
+ --XX _f_i_l_t_e_r_p_a_t
+ _f_i_l_t_e_r_p_a_t is a pattern as used for pathname expansion.
+ It is applied to the list of possible completions gener-
+ ated by the preceding options and arguments, and each
+ completion matching _f_i_l_t_e_r_p_a_t is removed from the list.
+ A leading !! in _f_i_l_t_e_r_p_a_t negates the pattern; in this
+ case, any completion not matching _f_i_l_t_e_r_p_a_t is removed.
+ --PP _p_r_e_f_i_x
+ _p_r_e_f_i_x is added at the beginning of each possible com-
+ pletion after all other options have been applied.
+ --SS _s_u_f_f_i_x
+ _s_u_f_f_i_x is appended to each possible completion after all
+ other options have been applied.
+
+ The return value is true unless an invalid option is supplied,
+ an option other than --pp or --rr is supplied without a _n_a_m_e argu-
+ ment, an attempt is made to remove a completion specification
+ for a _n_a_m_e for which no specification exists, or an error occurs
+ adding a completion specification.
+
+ ccoommppoopptt [--oo _o_p_t_i_o_n] [--DDEE] [++oo _o_p_t_i_o_n] [_n_a_m_e]
+ Modify completion options for each _n_a_m_e according to the
+ _o_p_t_i_o_ns, or for the currently-execution completion if no _n_a_m_es
+ are supplied. If no _o_p_t_i_o_ns are given, display the completion
+ options for each _n_a_m_e or the current completion. The possible
+ values of _o_p_t_i_o_n are those valid for the ccoommpplleettee builtin
+ described above. The --DD option indicates that the remaining
+ options should apply to the ``default'' command completion; that
+ is, completion attempted on a command for which no completion
+ has previously been defined. The --EE option indicates that the
+ remaining options should apply to ``empty'' command completion;
+ that is, completion attempted on a blank line.
+
+ The return value is true unless an invalid option is supplied, an
+ attempt is made to modify the options for a _n_a_m_e for which no comple-
+ tion specification exists, or an output error occurs.
+
+ ccoonnttiinnuuee [_n]
+ Resume the next iteration of the enclosing ffoorr, wwhhiillee, uunnttiill, or
+ sseelleecctt loop. If _n is specified, resume at the _nth enclosing
+ loop. _n must be >= 1. If _n is greater than the number of
+ enclosing loops, the last enclosing loop (the ``top-level''
+ loop) is resumed. The return value is 0 unless _n is not greater
+ than or equal to 1.
+
+ ddeeccllaarree [--aaAAffFFiillrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
+ ttyyppeesseett [--aaAAffFFiillrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
+ Declare variables and/or give them attributes. If no _n_a_m_es are
+ given then display the values of variables. The --pp option will
+ display the attributes and values of each _n_a_m_e. When --pp is used
+ with _n_a_m_e arguments, additional options are ignored. When --pp is
+ supplied without _n_a_m_e arguments, it will display the attributes
+ and values of all variables having the attributes specified by
+ the additional options. If no other options are supplied with
+ --pp, ddeeccllaarree will display the attributes and values of all shell
+ variables. The --ff option will restrict the display to shell
+ functions. The --FF option inhibits the display of function defi-
+ nitions; only the function name and attributes are printed. If
+ the eexxttddeebbuugg shell option is enabled using sshhoopptt, the source
+ file name and line number where the function is defined are dis-
+ played as well. The --FF option implies --ff. The following
+ options can be used to restrict output to variables with the
+ specified attribute or to give variables attributes:
+ --aa Each _n_a_m_e is an indexed array variable (see AArrrraayyss
+ above).
+ --AA Each _n_a_m_e is an associative array variable (see AArrrraayyss
+ above).
+ --ff Use function names only.
+ --ii The variable is treated as an integer; arithmetic evalua-
+ tion (see AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN above) is performed when
+ the variable is assigned a value.
+ --ll When the variable is assigned a value, all upper-case
+ characters are converted to lower-case. The upper-case
+ attribute is disabled.
+ --rr Make _n_a_m_es readonly. These names cannot then be assigned
+ values by subsequent assignment statements or unset.
+ --tt Give each _n_a_m_e the _t_r_a_c_e attribute. Traced functions
+ inherit the DDEEBBUUGG and RREETTUURRNN traps from the calling
+ shell. The trace attribute has no special meaning for
+ variables.
+ --uu When the variable is assigned a value, all lower-case
+ characters are converted to upper-case. The lower-case
+ attribute is disabled.
+ --xx Mark _n_a_m_es for export to subsequent commands via the
+ environment.
+
+ Using `+' instead of `-' turns off the attribute instead, with
+ the exceptions that ++aa may not be used to destroy an array vari-
+ able and ++rr will not remove the readonly attribute. When used
+ in a function, makes each _n_a_m_e local, as with the llooccaall command.
+ If a variable name is followed by =_v_a_l_u_e, the value of the vari-
+ able is set to _v_a_l_u_e. The return value is 0 unless an invalid
+ option is encountered, an attempt is made to define a function
+ using ``-f foo=bar'', an attempt is made to assign a value to a
+ readonly variable, an attempt is made to assign a value to an
+ array variable without using the compound assignment syntax (see
+ AArrrraayyss above), one of the _n_a_m_e_s is not a valid shell variable
+ name, an attempt is made to turn off readonly status for a read-
+ only variable, an attempt is made to turn off array status for
+ an array variable, or an attempt is made to display a non-exis-
+ tent function with --ff.
+
+ ddiirrss [[++_n]] [[--_n]] [[--ccppllvv]]
+ Without options, displays the list of currently remembered
+ directories. The default display is on a single line with
+ directory names separated by spaces. Directories are added to
+ the list with the ppuusshhdd command; the ppooppdd command removes
+ entries from the list.
+ ++_n Displays the _nth entry counting from the left of the list
+ shown by ddiirrss when invoked without options, starting with
+ zero.
+ --_n Displays the _nth entry counting from the right of the
+ list shown by ddiirrss when invoked without options, starting
+ with zero.
+ --cc Clears the directory stack by deleting all of the
+ entries.
+ --ll Produces a longer listing; the default listing format
+ uses a tilde to denote the home directory.
+ --pp Print the directory stack with one entry per line.
+ --vv Print the directory stack with one entry per line, pre-
+ fixing each entry with its index in the stack.
+
+ The return value is 0 unless an invalid option is supplied or _n
+ indexes beyond the end of the directory stack.
+
+ ddiissoowwnn [--aarr] [--hh] [_j_o_b_s_p_e_c ...]
+ Without options, each _j_o_b_s_p_e_c is removed from the table of
+ active jobs. If _j_o_b_s_p_e_c is not present, and neither --aa nor --rr
+ is supplied, the shell's notion of the _c_u_r_r_e_n_t _j_o_b is used. If
+ the --hh option is given, each _j_o_b_s_p_e_c is not removed from the ta-
+ ble, but is marked so that SSIIGGHHUUPP is not sent to the job if the
+ shell receives a SSIIGGHHUUPP. If no _j_o_b_s_p_e_c is present, and neither
+ the --aa nor the --rr option is supplied, the _c_u_r_r_e_n_t _j_o_b is used.
+ If no _j_o_b_s_p_e_c is supplied, the --aa option means to remove or mark
+ all jobs; the --rr option without a _j_o_b_s_p_e_c argument restricts
+ operation to running jobs. The return value is 0 unless a _j_o_b_-
+ _s_p_e_c does not specify a valid job.
+
+ eecchhoo [--nneeEE] [_a_r_g ...]
+ Output the _a_r_gs, separated by spaces, followed by a newline.
+ The return status is always 0. If --nn is specified, the trailing
+ newline is suppressed. If the --ee option is given, interpreta-
+ tion of the following backslash-escaped characters is enabled.
+ The --EE option disables the interpretation of these escape char-
+ acters, even on systems where they are interpreted by default.
+ The xxppgg__eecchhoo shell option may be used to dynamically determine
+ whether or not eecchhoo expands these escape characters by default.
+ eecchhoo does not interpret ---- to mean the end of options. eecchhoo
+ interprets the following escape sequences:
+ \\aa alert (bell)
+ \\bb backspace
+ \\cc suppress further output
+ \\ee an escape character
+ \\ff form feed
+ \\nn new line
+ \\rr carriage return
+ \\tt horizontal tab
+ \\vv vertical tab
+ \\\\ backslash
+ \\00_n_n_n the eight-bit character whose value is the octal value
+ _n_n_n (zero to three octal digits)
+ \\xx_H_H the eight-bit character whose value is the hexadecimal
+ value _H_H (one or two hex digits)
+
+ eennaabbllee [--aa] [--ddnnppss] [--ff _f_i_l_e_n_a_m_e] [_n_a_m_e ...]
+ Enable and disable builtin shell commands. Disabling a builtin
+ allows a disk command which has the same name as a shell builtin
+ to be executed without specifying a full pathname, even though
+ the shell normally searches for builtins before disk commands.
+ If --nn is used, each _n_a_m_e is disabled; otherwise, _n_a_m_e_s are
+ enabled. For example, to use the tteesstt binary found via the PPAATTHH
+ instead of the shell builtin version, run ``enable -n test''.
+ The --ff option means to load the new builtin command _n_a_m_e from
+ shared object _f_i_l_e_n_a_m_e, on systems that support dynamic loading.
+ The --dd option will delete a builtin previously loaded with --ff.
+ If no _n_a_m_e arguments are given, or if the --pp option is supplied,
+ a list of shell builtins is printed. With no other option argu-
+ ments, the list consists of all enabled shell builtins. If --nn
+ is supplied, only disabled builtins are printed. If --aa is sup-
+ plied, the list printed includes all builtins, with an indica-
+ tion of whether or not each is enabled. If --ss is supplied, the
+ output is restricted to the POSIX _s_p_e_c_i_a_l builtins. The return
+ value is 0 unless a _n_a_m_e is not a shell builtin or there is an
+ error loading a new builtin from a shared object.
+
+ eevvaall [_a_r_g ...]
+ The _a_r_gs are read and concatenated together into a single com-
+ mand. This command is then read and executed by the shell, and
+ its exit status is returned as the value of eevvaall. If there are
+ no _a_r_g_s, or only null arguments, eevvaall returns 0.
+
+ eexxeecc [--ccll] [--aa _n_a_m_e] [_c_o_m_m_a_n_d [_a_r_g_u_m_e_n_t_s]]
+ If _c_o_m_m_a_n_d is specified, it replaces the shell. No new process
+ is created. The _a_r_g_u_m_e_n_t_s become the arguments to _c_o_m_m_a_n_d. If
+ the --ll option is supplied, the shell places a dash at the begin-
+ ning of the zeroth argument passed to _c_o_m_m_a_n_d. This is what
+ _l_o_g_i_n(1) does. The --cc option causes _c_o_m_m_a_n_d to be executed with
+ an empty environment. If --aa is supplied, the shell passes _n_a_m_e
+ as the zeroth argument to the executed command. If _c_o_m_m_a_n_d can-
+ not be executed for some reason, a non-interactive shell exits,
+ unless the shell option eexxeeccffaaiill is enabled, in which case it
+ returns failure. An interactive shell returns failure if the
+ file cannot be executed. If _c_o_m_m_a_n_d is not specified, any redi-
+ rections take effect in the current shell, and the return status
+ is 0. If there is a redirection error, the return status is 1.
+
+ eexxiitt [_n]
+ Cause the shell to exit with a status of _n. If _n is omitted,
+ the exit status is that of the last command executed. A trap on
+ EEXXIITT is executed before the shell terminates.
+
+ eexxppoorrtt [--ffnn] [_n_a_m_e[=_w_o_r_d]] ...
+ eexxppoorrtt --pp
+ The supplied _n_a_m_e_s are marked for automatic export to the envi-
+ ronment of subsequently executed commands. If the --ff option is
+ given, the _n_a_m_e_s refer to functions. If no _n_a_m_e_s are given, or
+ if the --pp option is supplied, a list of all names that are
+ exported in this shell is printed. The --nn option causes the
+ export property to be removed from each _n_a_m_e. If a variable
+ name is followed by =_w_o_r_d, the value of the variable is set to
+ _w_o_r_d. eexxppoorrtt returns an exit status of 0 unless an invalid
+ option is encountered, one of the _n_a_m_e_s is not a valid shell
+ variable name, or --ff is supplied with a _n_a_m_e that is not a func-
+ tion.
+
+ ffcc [--ee _e_n_a_m_e] [--llnnrr] [_f_i_r_s_t] [_l_a_s_t]
+ ffcc --ss [_p_a_t=_r_e_p] [_c_m_d]
+ Fix Command. In the first form, a range of commands from _f_i_r_s_t
+ to _l_a_s_t is selected from the history list. _F_i_r_s_t and _l_a_s_t may
+ be specified as a string (to locate the last 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 cur-
+ rent command number). If _l_a_s_t is not specified it is set to the
+ current command for listing (so that ``fc -l -10'' prints the
+ last 10 commands) and to _f_i_r_s_t otherwise. If _f_i_r_s_t is not spec-
+ ified it is set to the previous command for editing and -16 for
+ listing.
+
+ The --nn option suppresses the command numbers when listing. The
+ --rr option reverses the order of the commands. If the --ll option
+ is given, the commands are listed on standard output. Other-
+ wise, the editor given by _e_n_a_m_e is invoked on a file containing
+ those commands. If _e_n_a_m_e is not given, the value of the FFCCEEDDIITT
+ variable is used, and the value of EEDDIITTOORR if FFCCEEDDIITT is not set.
+ If neither variable is set, _v_i is used. When editing is com-
+ plete, the edited commands are echoed and executed.
+
+ In the second form, _c_o_m_m_a_n_d is re-executed after each instance
+ of _p_a_t is replaced by _r_e_p. A useful alias to use with this is
+ ``r="fc -s"'', so that typing ``r cc'' runs the last command
+ beginning with ``cc'' and typing ``r'' re-executes the last com-
+ mand.
+
+ If the first form is used, the return value is 0 unless an
+ invalid option is encountered or _f_i_r_s_t or _l_a_s_t specify history
+ lines out of range. If the --ee option is supplied, the return
+ value is the value of the last command executed or failure if an
+ error occurs with the temporary file of commands. If the second
+ form is used, the return status is that of the command re-exe-
+ cuted, unless _c_m_d does not specify a valid history line, in
+ which case ffcc returns failure.
+
+ ffgg [_j_o_b_s_p_e_c]
+ Resume _j_o_b_s_p_e_c in the foreground, and make it the current job.
+ If _j_o_b_s_p_e_c is not present, the shell's notion of the _c_u_r_r_e_n_t _j_o_b
+ is used. The return value is that of the command placed into
+ the foreground, or failure if run when job control is disabled
+ or, when run with job control enabled, if _j_o_b_s_p_e_c does not spec-
+ ify a valid job or _j_o_b_s_p_e_c specifies a job that was started
+ without job control.
+
+ ggeettooppttss _o_p_t_s_t_r_i_n_g _n_a_m_e [_a_r_g_s]
+ ggeettooppttss is used by shell procedures to parse positional parame-
+ ters. _o_p_t_s_t_r_i_n_g contains the option characters to be recog-
+ nized; if a character is followed by a colon, the option is
+ expected to have an argument, which should be separated from it
+ by white space. The colon and question mark characters may not
+ be used as option characters. Each time it is invoked, ggeettooppttss
+ places the next option in the shell variable _n_a_m_e, initializing
+ _n_a_m_e if it does not exist, and the index of the next argument to
+ be processed into the variable OOPPTTIINNDD. OOPPTTIINNDD is initialized to
+ 1 each time the shell or a shell script is invoked. When an
+ option requires an argument, ggeettooppttss places that argument into
+ the variable OOPPTTAARRGG. The shell does not reset OOPPTTIINNDD automati-
+ cally; it must be manually reset between multiple calls to
+ ggeettooppttss within the same shell invocation if a new set of parame-
+ ters is to be used.
+
+ When the end of options is encountered, ggeettooppttss exits with a
+ return value greater than zero. OOPPTTIINNDD is set to the index of
+ the first non-option argument, and nnaammee is set to ?.
+
+ ggeettooppttss normally parses the positional parameters, but if more
+ arguments are given in _a_r_g_s, ggeettooppttss parses those instead.
+
+ ggeettooppttss can report errors in two ways. If the first character
+ of _o_p_t_s_t_r_i_n_g is a colon, _s_i_l_e_n_t error reporting is used. In
+ normal operation diagnostic messages are printed when invalid
+ options or missing option arguments are encountered. If the
+ variable OOPPTTEERRRR is set to 0, no error messages will be dis-
+ played, even if the first character of _o_p_t_s_t_r_i_n_g is not a colon.
+
+ If an invalid option is seen, ggeettooppttss places ? into _n_a_m_e and, if
+ not silent, prints an error message and unsets OOPPTTAARRGG. If
+ ggeettooppttss is silent, the option character found is placed in
+ OOPPTTAARRGG and no diagnostic message is printed.
+
+ If a required argument is not found, and ggeettooppttss is not silent,
+ a question mark (??) is placed in _n_a_m_e, OOPPTTAARRGG is unset, and a
+ diagnostic message is printed. If ggeettooppttss is silent, then a
+ colon (::) is placed in _n_a_m_e and OOPPTTAARRGG is set to the option
+ character found.
+
+ ggeettooppttss returns true if an option, specified or unspecified, is
+ found. It returns false if the end of options is encountered or
+ an error occurs.
+
+ hhaasshh [--llrr] [--pp _f_i_l_e_n_a_m_e] [--ddtt] [_n_a_m_e]
+ For each _n_a_m_e, the full file name of the command is determined
+ by searching the directories in $$PPAATTHH and remembered. If the --pp
+ option is supplied, no path search is performed, and _f_i_l_e_n_a_m_e is
+ used as the full file name of the command. The --rr option causes
+ the shell to forget all remembered locations. The --dd option
+ causes the shell to forget the remembered location of each _n_a_m_e.
+ If the --tt option is supplied, the full pathname to which each
+ _n_a_m_e corresponds is printed. If multiple _n_a_m_e arguments are
+ supplied with --tt, the _n_a_m_e is printed before the hashed full
+ pathname. The --ll option causes output to be displayed in a for-
+ mat that may be reused as input. If no arguments are given, or
+ if only --ll is supplied, information about remembered commands is
+ printed. The return status is true unless a _n_a_m_e is not found
+ or an invalid option is supplied.
+
+ hheellpp [--ddmmss] [_p_a_t_t_e_r_n]
+ Display helpful information about builtin commands. If _p_a_t_t_e_r_n
+ is specified, hheellpp gives detailed help on all commands matching
+ _p_a_t_t_e_r_n; otherwise help for all the builtins and shell control
+ structures is printed.
+ --dd Display a short description of each _p_a_t_t_e_r_n
+ --mm Display the description of each _p_a_t_t_e_r_n in a manpage-like
+ format
+ --ss Display only a short usage synopsis for each _p_a_t_t_e_r_n
+ The return status is 0 unless no command matches _p_a_t_t_e_r_n.
+
+ hhiissttoorryy [[_n]]
+ hhiissttoorryy --cc
+ hhiissttoorryy --dd _o_f_f_s_e_t
+ hhiissttoorryy --aannrrww [_f_i_l_e_n_a_m_e]
+ hhiissttoorryy --pp _a_r_g [_a_r_g _._._.]
+ hhiissttoorryy --ss _a_r_g [_a_r_g _._._.]
+ With no options, display the command history list with line num-
+ bers. Lines listed with a ** have been modified. An argument of
+ _n lists only the last _n lines. If the shell variable HHIISSTTTTIIMMEE--
+ FFOORRMMAATT is set and not null, it is used as a format string for
+ _s_t_r_f_t_i_m_e(3) to display the time stamp associated with each dis-
+ played history entry. No intervening blank is printed between
+ the formatted time stamp and the history line. If _f_i_l_e_n_a_m_e is
+ supplied, it is used as the name of the history file; if not,
+ the value of HHIISSTTFFIILLEE is used. Options, if supplied, have the
+ following meanings:
+ --cc Clear the history list by deleting all the entries.
+ --dd _o_f_f_s_e_t
+ Delete the history entry at position _o_f_f_s_e_t.
+ --aa Append the ``new'' history lines (history lines entered
+ since the beginning of the current bbaasshh session) to the
+ history file.
+ --nn Read the history lines not already read from the history
+ file into the current history list. These are lines
+ appended to the history file since the beginning of the
+ current bbaasshh session.
+ --rr Read the contents of the history file and use them as the
+ current history.
+ --ww Write the current history to the history file, overwrit-
+ ing the history file's contents.
+ --pp Perform history substitution on the following _a_r_g_s and
+ display the result on the standard output. Does not
+ store the results in the history list. Each _a_r_g must be
+ quoted to disable normal history expansion.
+ --ss Store the _a_r_g_s in the history list as a single entry.
+ The last command in the history list is removed before
+ the _a_r_g_s are added.
+
+ If the HHIISSTTTTIIMMEEFFOORRMMAATT variable is set, the time stamp informa-
+ tion associated with each history entry is written to the his-
+ tory 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 return value is 0
+ unless an invalid option is encountered, an error occurs while
+ reading or writing the history file, an invalid _o_f_f_s_e_t is sup-
+ plied as an argument to --dd, or the history expansion supplied as
+ an argument to --pp fails.
+
+ jjoobbss [--llnnpprrss] [ _j_o_b_s_p_e_c ... ]
+ jjoobbss --xx _c_o_m_m_a_n_d [ _a_r_g_s ... ]
+ The first form lists the active jobs. The options have the fol-
+ lowing meanings:
+ --ll List process IDs in addition to the normal information.
+ --pp List only the process ID of the job's process group
+ leader.
+ --nn Display information only about jobs that have changed
+ status since the user was last notified of their status.
+ --rr Restrict output to running jobs.
+ --ss Restrict output to stopped jobs.
+
+ If _j_o_b_s_p_e_c is given, output is restricted to information about
+ that job. The return status is 0 unless an invalid option is
+ encountered or an invalid _j_o_b_s_p_e_c is supplied.
+
+ If the --xx option is supplied, jjoobbss replaces any _j_o_b_s_p_e_c found in
+ _c_o_m_m_a_n_d or _a_r_g_s with the corresponding process group ID, and
+ executes _c_o_m_m_a_n_d passing it _a_r_g_s, returning its exit status.
+
+ kkiillll [--ss _s_i_g_s_p_e_c | --nn _s_i_g_n_u_m | --_s_i_g_s_p_e_c] [_p_i_d | _j_o_b_s_p_e_c] ...
+ kkiillll --ll [_s_i_g_s_p_e_c | _e_x_i_t___s_t_a_t_u_s]
+ Send the signal named by _s_i_g_s_p_e_c or _s_i_g_n_u_m to the processes
+ named by _p_i_d or _j_o_b_s_p_e_c. _s_i_g_s_p_e_c is either a case-insensitive
+ signal name such as SSIIGGKKIILLLL (with or without the SSIIGG prefix) or
+ a signal number; _s_i_g_n_u_m is a signal number. If _s_i_g_s_p_e_c is not
+ present, then SSIIGGTTEERRMM is assumed. An argument of --ll lists the
+ signal names. If any arguments are supplied when --ll is given,
+ the names of the signals corresponding to the arguments are
+ listed, and the return status is 0. The _e_x_i_t___s_t_a_t_u_s argument to
+ --ll is a number specifying either a signal number or the exit
+ status of a process terminated by a signal. kkiillll returns true
+ if at least one signal was successfully sent, or false if an
+ error occurs or an invalid option is encountered.
+
+ lleett _a_r_g [_a_r_g ...]
+ Each _a_r_g is an arithmetic expression to be evaluated (see AARRIITTHH--
+ MMEETTIICC EEVVAALLUUAATTIIOONN above). If the last _a_r_g evaluates to 0, lleett
+ returns 1; 0 is returned otherwise.
+
+ llooccaall [_o_p_t_i_o_n] [_n_a_m_e[=_v_a_l_u_e] ...]
+ For each argument, a local variable named _n_a_m_e is created, and
+ assigned _v_a_l_u_e. The _o_p_t_i_o_n can be any of the options accepted
+ by ddeeccllaarree. When llooccaall is used within a function, it causes the
+ variable _n_a_m_e to have a visible scope restricted to that func-
+ tion and its children. With no operands, llooccaall writes a list of
+ local variables to the standard output. It is an error to use
+ llooccaall when not within a function. The return status is 0 unless
+ llooccaall is used outside a function, an invalid _n_a_m_e is supplied,
+ or _n_a_m_e is a readonly variable.
+
+ llooggoouutt Exit a login shell.
+
+ mmaappffiillee [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u_n_t] [--tt] [--uu _f_d] [--CC _c_a_l_l_b_a_c_k]
+ [--cc _q_u_a_n_t_u_m] [_a_r_r_a_y]
+ rreeaaddaarrrraayy [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u_n_t] [--tt] [--uu _f_d] [--CC _c_a_l_l_b_a_c_k]
+ [--cc _q_u_a_n_t_u_m] [_a_r_r_a_y]
+ Read lines from the standard input into the indexed array vari-
+ able _a_r_r_a_y, or from file descriptor _f_d if the --uu option is sup-
+ plied. The variable MMAAPPFFIILLEE is the default _a_r_r_a_y. Options, if
+ supplied, have the following meanings:
+ --nn Copy at most _c_o_u_n_t lines. If _c_o_u_n_t is 0, all lines are
+ copied.
+ --OO Begin assigning to _a_r_r_a_y at index _o_r_i_g_i_n. The default
+ index is 0.
+ --ss Discard the first _c_o_u_n_t lines read.
+ --tt Remove a trailing newline from each line read.
+ --uu Read lines from file descriptor _f_d instead of the stan-
+ dard input.
+ --CC Evaluate _c_a_l_l_b_a_c_k each time _q_u_a_n_t_u_m lines are read. The
+ --cc option specifies _q_u_a_n_t_u_m.
+ --cc Specify the number of lines read between each call to
+ _c_a_l_l_b_a_c_k.
+
+ If --CC is specified without --cc, the default quantum is 5000.
+ When _c_a_l_l_b_a_c_k is evaluated, it is supplied the index of the next
+ array element to be assigned as an additional argument. _c_a_l_l_-
+ _b_a_c_k is evaluated after the line is read but before the array
+ element is assigned.
+
+ If not supplied with an explicit origin, mmaappffiillee will clear
+ _a_r_r_a_y before assigning to it.
+
+ mmaappffiillee returns successfully unless an invalid option or option
+ argument is supplied, _a_r_r_a_y is invalid or unassignable, or if
+ _a_r_r_a_y is not an indexed array.
+
+ ppooppdd [-nn] [+_n] [-_n]
+ Removes entries from the directory stack. With no arguments,
+ removes the top directory from the stack, and performs a ccdd to
+ the new top directory. Arguments, if supplied, have the follow-
+ ing meanings:
+ --nn Suppresses the normal change of directory when removing
+ directories from the stack, so that only the stack is
+ manipulated.
+ ++_n Removes the _nth entry counting from the left of the list
+ shown by ddiirrss, starting with zero. For example: ``popd
+ +0'' removes the first directory, ``popd +1'' the second.
+ --_n Removes the _nth entry counting from the right of the list
+ shown by ddiirrss, starting with zero. For example: ``popd
+ -0'' removes the last directory, ``popd -1'' the next to
+ last.
+
+ If the ppooppdd command is successful, a ddiirrss is performed as well,
+ and the return status is 0. ppooppdd returns false if an invalid
+ option is encountered, the directory stack is empty, a non-exis-
+ tent directory stack entry is specified, or the directory change
+ fails.
+
+ pprriinnttff [--vv _v_a_r] _f_o_r_m_a_t [_a_r_g_u_m_e_n_t_s]
+ Write the formatted _a_r_g_u_m_e_n_t_s to the standard output under the
+ control of the _f_o_r_m_a_t. The _f_o_r_m_a_t is a character string which
+ contains three types of objects: plain characters, which are
+ simply copied to standard output, character escape sequences,
+ which are converted and copied to the standard output, and for-
+ mat specifications, each of which causes printing of the next
+ successive _a_r_g_u_m_e_n_t. In addition to the standard _p_r_i_n_t_f(1) for-
+ mats, %%bb causes pprriinnttff to expand backslash escape sequences in
+ the corresponding _a_r_g_u_m_e_n_t (except that \\cc terminates output,
+ backslashes in \\'', \\"", and \\?? are not removed, and octal escapes
+ beginning with \\00 may contain up to four digits), and %%qq causes
+ pprriinnttff to output the corresponding _a_r_g_u_m_e_n_t in a format that can
+ be reused as shell input.
+
+ The --vv option causes the output to be assigned to the variable
+ _v_a_r rather than being printed to the standard output.
+
+ The _f_o_r_m_a_t is reused as necessary to consume all of the _a_r_g_u_-
+ _m_e_n_t_s. If the _f_o_r_m_a_t requires more _a_r_g_u_m_e_n_t_s than are supplied,
+ the extra format specifications behave as if a zero value or
+ null string, as appropriate, had been supplied. The return
+ value is zero on success, non-zero on failure.
+
+ ppuusshhdd [--nn] [+_n] [-_n]
+ ppuusshhdd [--nn] [_d_i_r]
+ Adds a directory to the top of the directory stack, or rotates
+ the stack, making the new top of the stack the current working
+ directory. With no arguments, exchanges the top two directories
+ and returns 0, unless the directory stack is empty. Arguments,
+ if supplied, have the following meanings:
+ --nn Suppresses the normal change of directory when adding
+ directories to the stack, so that only the stack is
+ manipulated.
+ ++_n Rotates the stack so that the _nth directory (counting
+ from the left of the list shown by ddiirrss, starting with
+ zero) is at the top.
+ --_n Rotates the stack so that the _nth directory (counting
+ from the right of the list shown by ddiirrss, starting with
+ zero) is at the top.
+ _d_i_r Adds _d_i_r to the directory stack at the top, making it the
+ new current working directory.
+
+ If the ppuusshhdd command is successful, a ddiirrss is performed as well.
+ If the first form is used, ppuusshhdd returns 0 unless the cd to _d_i_r
+ fails. With the second form, ppuusshhdd returns 0 unless the direc-
+ tory stack is empty, a non-existent directory stack element is
+ specified, or the directory change to the specified new current
+ directory fails.
+
+ ppwwdd [--LLPP]
+ Print the absolute pathname of the current working directory.
+ The pathname printed contains no symbolic links if the --PP option
+ is supplied or the --oo pphhyyssiiccaall option to the sseett builtin command
+ is enabled. If the --LL option is used, the pathname printed may
+ contain symbolic links. The return status is 0 unless an error
+ occurs while reading the name of the current directory or an
+ invalid option is supplied.
+
+ rreeaadd [--eerrss] [--aa _a_n_a_m_e] [--dd _d_e_l_i_m] [--ii _t_e_x_t] [--nn _n_c_h_a_r_s] [--NN _n_c_h_a_r_s] [--pp
+ _p_r_o_m_p_t] [--tt _t_i_m_e_o_u_t] [--uu _f_d] [_n_a_m_e ...]
+ One line is read from the standard input, or from the file
+ descriptor _f_d supplied as an argument to the --uu option, and the
+ first word is assigned to the first _n_a_m_e, the second word to the
+ second _n_a_m_e, and so on, with leftover words and their interven-
+ ing separators assigned to the last _n_a_m_e. If there are fewer
+ words read from the input stream than names, the remaining names
+ are assigned empty values. The characters in IIFFSS are used to
+ split the line into words. The backslash character (\\) may be
+ used to remove any special meaning for the next character read
+ and for line continuation. Options, if supplied, have the fol-
+ lowing meanings:
+ --aa _a_n_a_m_e
+ The words are assigned to sequential indices of the array
+ variable _a_n_a_m_e, starting at 0. _a_n_a_m_e is unset before any
+ new values are assigned. Other _n_a_m_e arguments are
+ ignored.
+ --dd _d_e_l_i_m
+ The first character of _d_e_l_i_m is used to terminate the
+ input line, rather than newline.
+ --ee If the standard input is coming from a terminal, rreeaaddlliinnee
+ (see RREEAADDLLIINNEE above) is used to obtain the line. Read-
+ line uses the current (or default, if line editing was
+ not previously active) editing settings.
+ --ii _t_e_x_t
+ If rreeaaddlliinnee is being used to read the line, _t_e_x_t is
+ placed into the editing buffer before editing begins.
+ --nn _n_c_h_a_r_s
+ rreeaadd returns after reading _n_c_h_a_r_s characters rather than
+ waiting for a complete line of input, but honor a delim-
+ iter if fewer than _n_c_h_a_r_s characters are read before the
+ delimiter.
+ --NN _n_c_h_a_r_s
+ rreeaadd returns after reading exactly _n_c_h_a_r_s characters
+ rather than waiting for a complete line of input, unless
+ EOF is encountered or rreeaadd times out. Delimiter charac-
+ ters encountered in the input are not treated specially
+ and do not cause rreeaadd to return until _n_c_h_a_r_s characters
+ are read.
+ --pp _p_r_o_m_p_t
+ Display _p_r_o_m_p_t on standard error, without a trailing new-
+ line, before attempting to read any input. The prompt is
+ displayed only if input is coming from a terminal.
+ --rr Backslash does not act as an escape character. The back-
+ slash is considered to be part of the line. In particu-
+ lar, a backslash-newline pair may not be used as a line
+ continuation.
+ --ss Silent mode. If input is coming from a terminal, charac-
+ ters are not echoed.
+ --tt _t_i_m_e_o_u_t
+ Cause rreeaadd to time out and return failure if a complete
+ line of input is not read within _t_i_m_e_o_u_t seconds. _t_i_m_e_-
+ _o_u_t may be a decimal number with a fractional portion
+ following the decimal point. This option is only effec-
+ tive if rreeaadd is reading input from a terminal, pipe, or
+ other special file; it has no effect when reading from
+ regular files. If _t_i_m_e_o_u_t is 0, rreeaadd returns success if
+ input is available on the specified file descriptor,
+ failure otherwise. The exit status is greater than 128
+ if the timeout is exceeded.
+ --uu _f_d Read input from file descriptor _f_d.
+
+ If no _n_a_m_e_s are supplied, the line read is assigned to the vari-
+ able RREEPPLLYY. The return code is zero, unless end-of-file is
+ encountered, rreeaadd times out (in which case the return code is
+ greater than 128), or an invalid file descriptor is supplied as
+ the argument to --uu.
+
+ rreeaaddoonnllyy [--aaAAppff] [_n_a_m_e[=_w_o_r_d] ...]
+ The given _n_a_m_e_s are marked readonly; the values of these _n_a_m_e_s
+ may not be changed by subsequent assignment. If the --ff option
+ is supplied, the functions corresponding to the _n_a_m_e_s are so
+ marked. The --aa option restricts the variables to indexed
+ arrays; the --AA option restricts the variables to associative
+ arrays. If no _n_a_m_e arguments are given, or if the --pp option is
+ supplied, a list of all readonly names is printed. The --pp
+ option causes output to be displayed in a format that may be
+ reused as input. If a variable name is followed by =_w_o_r_d, the
+ value of the variable is set to _w_o_r_d. The return status is 0
+ unless an invalid option is encountered, one of the _n_a_m_e_s is not
+ a valid shell variable name, or --ff is supplied with a _n_a_m_e that
+ is not a function.
+
+ rreettuurrnn [_n]
+ Causes a function to exit with the return value specified by _n.
+ If _n is omitted, the return status is that of the last command
+ executed in the function body. If used outside a function, but
+ during execution of a script by the .. (ssoouurrccee) command, it
+ causes the shell to stop executing that script and return either
+ _n or the exit status of the last command executed within the
+ script as the exit status of the script. If used outside a
+ function and not during execution of a script by .., the return
+ status is false. Any command associated with the RREETTUURRNN trap is
+ executed before execution resumes after the function or script.
+
+ sseett [----aabbeeffhhkkmmnnppttuuvvxxBBCCEEHHPPTT] [--oo _o_p_t_i_o_n] [_a_r_g ...]
+ sseett [++aabbeeffhhkkmmnnppttuuvvxxBBCCEEHHPPTT] [++oo _o_p_t_i_o_n] [_a_r_g ...]
+ Without options, the name and value of each shell variable are
+ displayed in a format that can be reused as input for setting or
+ resetting the currently-set variables. Read-only variables can-
+ not be reset. In _p_o_s_i_x _m_o_d_e, only shell variables are listed.
+ The output is sorted according to the current locale. When
+ options are specified, they set or unset shell attributes. Any
+ arguments remaining after option processing are treated as val-
+ ues for the positional parameters and are assigned, in order, to
+ $$11, $$22, ...... $$_n. Options, if specified, have the following
+ meanings:
+ --aa Automatically mark variables and functions which are
+ modified or created for export to the environment of
+ subsequent commands.
+ --bb Report the status of terminated background jobs immedi-
+ ately, rather than before the next primary prompt. This
+ is effective only when job control is enabled.
+ --ee Exit immediately if a _p_i_p_e_l_i_n_e (which may consist of a
+ single _s_i_m_p_l_e _c_o_m_m_a_n_d), a _s_u_b_s_h_e_l_l command enclosed in
+ parentheses, or one of the commands executed as part of
+ a command list enclosed by braces (see SSHHEELLLL GGRRAAMMMMAARR
+ above) exits with a non-zero status. The shell does not
+ exit if the command that fails is part of the command
+ list immediately following a wwhhiillee or uunnttiill keyword,
+ part of the test following the iiff or eelliiff reserved
+ words, part of any command executed in a &&&& or |||| list
+ except the command following the final &&&& or ||||, any
+ command in a pipeline but the last, or if the command's
+ return value is being inverted with !!. A trap on EERRRR,
+ if set, is executed before the shell exits. This option
+ applies to the shell environment and each subshell envi-
+ ronment separately (see CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENNTT
+ above), and may cause subshells to exit before executing
+ all the commands in the subshell.
+ --ff Disable pathname expansion.
+ --hh Remember the location of commands as they are looked up
+ for execution. This is enabled by default.
+ --kk All arguments in the form of assignment statements are
+ placed in the environment for a command, not just those
+ that precede the command name.
+ --mm Monitor mode. Job control is enabled. This option is
+ on by default for interactive shells on systems that
+ support it (see JJOOBB CCOONNTTRROOLL above). Background pro-
+ cesses run in a separate process group and a line con-
+ taining their exit status is printed upon their comple-
+ tion.
+ --nn Read commands but do not execute them. This may be used
+ to check a shell script for syntax errors. This is
+ ignored by interactive shells.
+ --oo _o_p_t_i_o_n_-_n_a_m_e
+ The _o_p_t_i_o_n_-_n_a_m_e can be one of the following:
+ aalllleexxppoorrtt
+ Same as --aa.
+ bbrraacceeeexxppaanndd
+ Same as --BB.
+ eemmaaccss Use an emacs-style command line editing inter-
+ face. This is enabled by default when the shell
+ is interactive, unless the shell is started with
+ the ----nnooeeddiittiinngg option. This also affects the
+ editing interface used for rreeaadd --ee.
+ eerrrreexxiitt Same as --ee.
+ eerrrrttrraaccee
+ Same as --EE.
+ ffuunnccttrraaccee
+ Same as --TT.
+ hhaasshhaallll Same as --hh.
+ hhiisstteexxppaanndd
+ Same as --HH.
+ hhiissttoorryy Enable command history, as described above under
+ HHIISSTTOORRYY. This option is on by default in inter-
+ active shells.
+ iiggnnoorreeeeooff
+ The effect is as if the shell command
+ ``IGNOREEOF=10'' had been executed (see SShheellll
+ VVaarriiaabblleess above).
+ kkeeyywwoorrdd Same as --kk.
+ mmoonniittoorr Same as --mm.
+ nnoocclloobbbbeerr
+ Same as --CC.
+ nnooeexxeecc Same as --nn.
+ nnoogglloobb Same as --ff.
+ nnoolloogg Currently ignored.
+ nnoottiiffyy Same as --bb.
+ nnoouunnsseett Same as --uu.
+ oonneeccmmdd Same as --tt.
+ pphhyyssiiccaall
+ Same as --PP.
+ ppiippeeffaaiill
+ If set, the return value of a pipeline is the
+ value of the last (rightmost) command to exit
+ with a non-zero status, or zero if all commands
+ in the pipeline exit successfully. This option
+ is disabled by default.
+ ppoossiixx Change the behavior of bbaasshh where the default
+ operation differs from the POSIX standard to
+ match the standard (_p_o_s_i_x _m_o_d_e).
+ pprriivviilleeggeedd
+ Same as --pp.
+ vveerrbboossee Same as --vv.
+ vvii Use a vi-style command line editing interface.
+ This also affects the editing interface used for
+ rreeaadd --ee.
+ xxttrraaccee Same as --xx.
+ If --oo is supplied with no _o_p_t_i_o_n_-_n_a_m_e, the values of the
+ current options are printed. If ++oo is supplied with no
+ _o_p_t_i_o_n_-_n_a_m_e, a series of sseett commands to recreate the
+ current option settings is displayed on the standard
+ output.
+ --pp Turn on _p_r_i_v_i_l_e_g_e_d mode. In this mode, the $$EENNVV and
+ $$BBAASSHH__EENNVV files are not processed, shell functions are
+ not inherited from the environment, and the SSHHEELLLLOOPPTTSS,
+ BBAASSHHOOPPTTSS, CCDDPPAATTHH, and GGLLOOBBIIGGNNOORREE variables, if they
+ appear in the environment, are ignored. If the shell is
+ started with the effective user (group) id not equal to
+ the real user (group) id, and the --pp option is not sup-
+ plied, these actions are taken and the effective user id
+ is set to the real user id. If the --pp option is sup-
+ plied at startup, the effective user id is not reset.
+ Turning this option off causes the effective user and
+ group ids to be set to the real user and group ids.
+ --tt Exit after reading and executing one command.
+ --uu Treat unset variables and parameters other than the spe-
+ cial parameters "@" and "*" as an error when performing
+ parameter expansion. If expansion is attempted on an
+ unset variable or parameter, the shell prints an error
+ message, and, if not interactive, exits with a non-zero
+ status.
+ --vv Print shell input lines as they are read.
+ --xx After expanding each _s_i_m_p_l_e _c_o_m_m_a_n_d, ffoorr command, ccaassee
+ command, sseelleecctt command, or arithmetic ffoorr command, dis-
+ play the expanded value of PPSS44, followed by the command
+ and its expanded arguments or associated word list.
+ --BB The shell performs brace expansion (see BBrraaccee EExxppaannssiioonn
+ above). This is on by default.
+ --CC If set, bbaasshh does not overwrite an existing file with
+ the >>, >>&&, and <<>> redirection operators. This may be
+ overridden when creating output files by using the redi-
+ rection operator >>|| instead of >>.
+ --EE If set, any trap on EERRRR is inherited by shell functions,
+ command substitutions, and commands executed in a sub-
+ shell environment. The EERRRR trap is normally not inher-
+ ited in such cases.
+ --HH Enable !! style history substitution. This option is on
+ by default when the shell is interactive.
+ --PP If set, the shell does not follow symbolic links when
+ executing commands such as ccdd that change the current
+ working directory. It uses the physical directory
+ structure instead. By default, bbaasshh follows the logical
+ chain of directories when performing commands which
+ change the current directory.
+ --TT If set, any traps on DDEEBBUUGG and RREETTUURRNN are inherited by
+ shell functions, command substitutions, and commands
+ executed in a subshell environment. The DDEEBBUUGG and
+ RREETTUURRNN traps are normally not inherited in such cases.
+ ---- If no arguments follow this option, then the positional
+ parameters are unset. Otherwise, the positional parame-
+ ters are set to the _a_r_gs, even if some of them begin
+ with a --.
+ -- Signal the end of options, cause all remaining _a_r_gs to
+ be assigned to the positional parameters. The --xx and --vv
+ options are turned off. If there are no _a_r_gs, the posi-
+ tional parameters remain unchanged.
+
+ The options are off by default unless otherwise noted. Using +
+ rather than - causes these options to be turned off. The
+ options can also be specified as arguments to an invocation of
+ the shell. The current set of options may be found in $$--. The
+ return status is always true unless an invalid option is encoun-
+ tered.
+
+ sshhiifftt [_n]
+ The positional parameters from _n+1 ... are renamed to $$11 ........
+ Parameters represented by the numbers $$## down to $$##-_n+1 are
+ unset. _n must be a non-negative number less than or equal to
+ $$##. If _n is 0, no parameters are changed. If _n is not given,
+ it is assumed to be 1. If _n is greater than $$##, the positional
+ parameters are not changed. The return status is greater than
+ zero if _n is greater than $$## or less than zero; otherwise 0.
+
+ sshhoopptt [--ppqqssuu] [--oo] [_o_p_t_n_a_m_e ...]
+ Toggle the values of variables controlling optional shell behav-
+ ior. With no options, or with the --pp option, a list of all set-
+ table options is displayed, with an indication of whether or not
+ each is set. The --pp option causes output to be displayed in a
+ form that may be reused as input. Other options have the fol-
+ lowing meanings:
+ --ss Enable (set) each _o_p_t_n_a_m_e.
+ --uu Disable (unset) each _o_p_t_n_a_m_e.
+ --qq Suppresses normal output (quiet mode); the return status
+ indicates whether the _o_p_t_n_a_m_e is set or unset. If multi-
+ ple _o_p_t_n_a_m_e arguments are given with --qq, the return sta-
+ tus is zero if all _o_p_t_n_a_m_e_s are enabled; non-zero other-
+ wise.
+ --oo Restricts the values of _o_p_t_n_a_m_e to be those defined for
+ the --oo option to the sseett builtin.
+
+ If either --ss or --uu is used with no _o_p_t_n_a_m_e arguments, the dis-
+ play is limited to those options which are set or unset, respec-
+ tively. Unless otherwise noted, the sshhoopptt options are disabled
+ (unset) by default.
+
+ The return status when listing options is zero if all _o_p_t_n_a_m_e_s
+ are enabled, non-zero otherwise. When setting or unsetting
+ options, the return status is zero unless an _o_p_t_n_a_m_e is not a
+ valid shell option.
+
+ The list of sshhoopptt options is:
+
+ aauuttooccdd If set, a command name that is the name of a directory
+ is executed as if it were the argument to the ccdd com-
+ mand. This option is only used by interactive shells.
+ ccddaabbllee__vvaarrss
+ If set, an argument to the ccdd builtin command that is
+ not a directory is assumed to be the name of a variable
+ whose value is the directory to change to.
+ ccddssppeellll If set, minor errors in the spelling of a directory com-
+ ponent in a ccdd command will be corrected. The errors
+ checked for are transposed characters, a missing charac-
+ ter, and one character too many. If a correction is
+ found, the corrected file name is printed, and the com-
+ mand proceeds. This option is only used by interactive
+ shells.
+ cchheecckkhhaasshh
+ If set, bbaasshh checks that a command found in the hash ta-
+ ble exists before trying to execute it. If a hashed
+ command no longer exists, a normal path search is per-
+ formed.
+ cchheecckkjjoobbss
+ If set, bbaasshh lists the status of any stopped and running
+ jobs before exiting an interactive shell. If any jobs
+ are running, this causes the exit to be deferred until a
+ second exit is attempted without an intervening command
+ (see JJOOBB CCOONNTTRROOLL above). The shell always postpones
+ exiting if any jobs are stopped.
+ cchheecckkwwiinnssiizzee
+ If set, bbaasshh checks the window size after each command
+ and, if necessary, updates the values of LLIINNEESS and CCOOLL--
+ UUMMNNSS.
+ ccmmddhhiisstt If set, bbaasshh attempts to save all lines of a multiple-
+ line command in the same history entry. This allows
+ easy re-editing of multi-line commands.
+ ccoommppaatt3311
+ If set, bbaasshh changes its behavior to that of version 3.1
+ with respect to quoted arguments to the conditional com-
+ mand's =~ operator.
+ ccoommppaatt3322
+ If set, bbaasshh changes its behavior to that of version 3.2
+ with respect to locale-specific string comparison when
+ using the conditional command's < and > operators.
+ ccoommppaatt4400
+ If set, bbaasshh changes its behavior to that of version 4.0
+ with respect to locale-specific string comparison when
+ using the conditional command's < and > operators and
+ the effect of interrupting a command list.
+ ddiirrssppeellll
+ If set, bbaasshh attempts spelling correction on directory
+ names during word completion if the directory name ini-
+ tially supplied does not exist.
+ ddoottgglloobb If set, bbaasshh includes filenames beginning with a `.' in
+ the results of pathname expansion.
+ eexxeeccffaaiill
+ If set, a non-interactive shell will not exit if it can-
+ not execute the file specified as an argument to the
+ eexxeecc builtin command. An interactive shell does not
+ exit if eexxeecc fails.
+ eexxppaanndd__aalliiaasseess
+ If set, aliases are expanded as described above under
+ AALLIIAASSEESS. This option is enabled by default for interac-
+ tive shells.
+ eexxttddeebbuugg
+ If set, behavior intended for use by debuggers is
+ enabled:
+ 11.. The --FF option to the ddeeccllaarree builtin displays the
+ source file name and line number corresponding to
+ each function name supplied as an argument.
+ 22.. If the command run by the DDEEBBUUGG trap returns a
+ non-zero value, the next command is skipped and
+ not executed.
+ 33.. If the command run by the DDEEBBUUGG trap returns a
+ value of 2, and the shell is executing in a sub-
+ routine (a shell function or a shell script exe-
+ cuted by the .. or ssoouurrccee builtins), a call to
+ rreettuurrnn is simulated.
+ 44.. BBAASSHH__AARRGGCC and BBAASSHH__AARRGGVV are updated as described
+ in their descriptions above.
+ 55.. Function tracing is enabled: command substitu-
+ tion, shell functions, and subshells invoked with
+ (( _c_o_m_m_a_n_d )) inherit the DDEEBBUUGG and RREETTUURRNN traps.
+ 66.. Error tracing is enabled: command substitution,
+ shell functions, and subshells invoked with ((
+ _c_o_m_m_a_n_d )) inherit the EERRRROORR trap.
+ eexxttgglloobb If set, the extended pattern matching features described
+ above under PPaatthhnnaammee EExxppaannssiioonn are enabled.
+ eexxttqquuoottee
+ If set, $$'_s_t_r_i_n_g' and $$"_s_t_r_i_n_g" quoting is performed
+ within $${{_p_a_r_a_m_e_t_e_r}} expansions enclosed in double
+ quotes. This option is enabled by default.
+ ffaaiillgglloobb
+ If set, patterns which fail to match filenames during
+ pathname expansion result in an expansion error.
+ ffoorrccee__ffiiggnnoorree
+ If set, the suffixes specified by the FFIIGGNNOORREE shell
+ variable cause words to be ignored when performing word
+ completion even if the ignored words are the only possi-
+ ble completions. See SSHHEELLLL VVAARRIIAABBLLEESS above for a
+ description of FFIIGGNNOORREE. This option is enabled by
+ default.
+ gglloobbssttaarr
+ If set, the pattern **** used in a pathname expansion con-
+ text will match a files and zero or more directories and
+ subdirectories. If the pattern is followed by a //, only
+ directories and subdirectories match.
+ ggnnuu__eerrrrffmmtt
+ If set, shell error messages are written in the standard
+ GNU error message format.
+ hhiissttaappppeenndd
+ If set, the history list is appended to the file named
+ by the value of the HHIISSTTFFIILLEE variable when the shell
+ exits, rather than overwriting the file.
+ hhiissttrreeeeddiitt
+ If set, and rreeaaddlliinnee is being used, a user is given the
+ opportunity to re-edit a failed history substitution.
+ hhiissttvveerriiffyy
+ If set, and rreeaaddlliinnee is being used, the results of his-
+ tory substitution are not immediately passed to the
+ shell parser. Instead, the resulting line is loaded
+ into the rreeaaddlliinnee editing buffer, allowing further modi-
+ fication.
+ hhoossttccoommpplleettee
+ If set, and rreeaaddlliinnee is being used, bbaasshh will attempt to
+ perform hostname completion when a word containing a @@
+ is being completed (see CCoommpplleettiinngg under RREEAADDLLIINNEE
+ above). This is enabled by default.
+ hhuuppoonneexxiitt
+ If set, bbaasshh will send SSIIGGHHUUPP to all jobs when an inter-
+ active login shell exits.
+ iinntteerraaccttiivvee__ccoommmmeennttss
+ If set, allow a word beginning with ## to cause that word
+ and all remaining characters on that line to be ignored
+ in an interactive shell (see CCOOMMMMEENNTTSS above). This
+ option is enabled by default.
+ lliitthhiisstt If set, and the ccmmddhhiisstt option is enabled, multi-line
+ commands are saved to the history with embedded newlines
+ rather than using semicolon separators where possible.
+ llooggiinn__sshheellll
+ The shell sets this option if it is started as a login
+ shell (see IINNVVOOCCAATTIIOONN above). The value may not be
+ changed.
+ mmaaiillwwaarrnn
+ If set, and a file that bbaasshh is checking for mail has
+ been accessed since the last time it was checked, the
+ message ``The mail in _m_a_i_l_f_i_l_e has been read'' is dis-
+ played.
+ nnoo__eemmppttyy__ccmmdd__ccoommpplleettiioonn
+ If set, and rreeaaddlliinnee is being used, bbaasshh will not
+ attempt to search the PPAATTHH for possible completions when
+ completion is attempted on an empty line.
+ nnooccaasseegglloobb
+ If set, bbaasshh matches filenames in a case-insensitive
+ fashion when performing pathname expansion (see PPaatthhnnaammee
+ EExxppaannssiioonn above).
+ nnooccaasseemmaattcchh
+ If set, bbaasshh matches patterns in a case-insensitive
+ fashion when performing matching while executing ccaassee or
+ [[[[ conditional commands.
+ nnuullllgglloobb
+ If set, bbaasshh allows patterns which match no files (see
+ PPaatthhnnaammee EExxppaannssiioonn above) to expand to a null string,
+ rather than themselves.
+ pprrooggccoommpp
+ If set, the programmable completion facilities (see PPrroo--
+ ggrraammmmaabbllee CCoommpplleettiioonn above) are enabled. This option is
+ enabled by default.
+ pprroommppttvvaarrss
+ If set, prompt strings undergo parameter expansion, com-
+ mand substitution, arithmetic expansion, and quote
+ removal after being expanded as described in PPRROOMMPPTTIINNGG
+ above. This option is enabled by default.
+ rreessttrriicctteedd__sshheellll
+ The shell sets this option if it is started in
+ restricted mode (see RREESSTTRRIICCTTEEDD SSHHEELLLL below). The value
+ may not be changed. This is not reset when the startup
+ files are executed, allowing the startup files to dis-
+ cover whether or not a shell is restricted.
+ sshhiifftt__vveerrbboossee
+ If set, the sshhiifftt builtin prints an error message when
+ the shift count exceeds the number of positional parame-
+ ters.
+ ssoouurrcceeppaatthh
+ If set, the ssoouurrccee (..) builtin uses the value of PPAATTHH to
+ find the directory containing the file supplied as an
+ argument. This option is enabled by default.
+ xxppgg__eecchhoo
+ If set, the eecchhoo builtin expands backslash-escape
+ sequences by default.
+ ssuussppeenndd [--ff]
+ Suspend the execution of this shell until it receives a SSIIGGCCOONNTT
+ signal. A login shell cannot be suspended; the --ff option can be
+ used to override this and force the suspension. The return sta-
+ tus is 0 unless the shell is a login shell and --ff is not sup-
+ plied, or if job control is not enabled.
+ tteesstt _e_x_p_r
+ [[ _e_x_p_r ]]
+ Return a status of 0 or 1 depending on the evaluation of the
+ conditional expression _e_x_p_r. Each operator and operand must be
+ a separate argument. Expressions are composed of the primaries
+ described above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS. tteesstt does not
+ accept any options, nor does it accept and ignore an argument of
+ ---- as signifying the end of options.
+
+ Expressions may be combined using the following operators,
+ listed in decreasing order of precedence. The evaluation
+ depends on the number of arguments; see below.
+ !! _e_x_p_r True if _e_x_p_r is false.
+ (( _e_x_p_r ))
+ Returns the value of _e_x_p_r. This may be used to override
+ the normal precedence of operators.
+ _e_x_p_r_1 -aa _e_x_p_r_2
+ True if both _e_x_p_r_1 and _e_x_p_r_2 are true.
+ _e_x_p_r_1 -oo _e_x_p_r_2
+ True if either _e_x_p_r_1 or _e_x_p_r_2 is true.
+
+ tteesstt and [[ evaluate conditional expressions using a set of rules
+ based on the number of arguments.
+
+ 0 arguments
+ The expression is false.
+ 1 argument
+ The expression is true if and only if the argument is not
+ null.
+ 2 arguments
+ If the first argument is !!, the expression is true if and
+ only if the second argument is null. If the first argu-
+ ment is one of the unary conditional operators listed
+ above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the expression is
+ true if the unary test is true. If the first argument is
+ not a valid unary conditional operator, the expression is
+ false.
+ 3 arguments
+ If the second argument is one of the binary conditional
+ operators listed above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the
+ result of the expression is the result of the binary test
+ using the first and third arguments as operands. The --aa
+ and --oo operators are considered binary operators when
+ there are three arguments. If the first argument is !!,
+ the value is the negation of the two-argument test using
+ the second and third arguments. If the first argument is
+ exactly (( and the third argument is exactly )), the result
+ is the one-argument test of the second argument. Other-
+ wise, the expression is false.
+ 4 arguments
+ If the first argument is !!, the result is the negation of
+ the three-argument expression composed of the remaining
+ arguments. Otherwise, the expression is parsed and eval-
+ uated according to precedence using the rules listed
+ above.
+ 5 or more arguments
+ The expression is parsed and evaluated according to
+ precedence using the rules listed above.
+
+ ttiimmeess Print the accumulated user and system times for the shell and
+ for processes run from the shell. The return status is 0.
+
+ ttrraapp [--llpp] [[_a_r_g] _s_i_g_s_p_e_c ...]
+ The command _a_r_g is to be read and executed when the shell
+ receives signal(s) _s_i_g_s_p_e_c. If _a_r_g is absent (and there is a
+ single _s_i_g_s_p_e_c) or --, each specified signal is reset to its
+ original disposition (the value it had upon entrance to the
+ shell). If _a_r_g is the null string the signal specified by each
+ _s_i_g_s_p_e_c is ignored by the shell and by the commands it invokes.
+ If _a_r_g is not present and --pp has been supplied, then the trap
+ commands associated with each _s_i_g_s_p_e_c are displayed. If no
+ arguments are supplied or if only --pp is given, ttrraapp prints the
+ list of commands associated with each signal. The --ll option
+ causes the shell to print a list of signal names and their cor-
+ responding numbers. Each _s_i_g_s_p_e_c is either a signal name
+ defined in <_s_i_g_n_a_l_._h>, or a signal number. Signal names are
+ case insensitive and the SIG prefix is optional.
+
+ If a _s_i_g_s_p_e_c is EEXXIITT (0) the command _a_r_g is executed on exit
+ from the shell. If a _s_i_g_s_p_e_c is DDEEBBUUGG, the command _a_r_g is exe-
+ cuted before every _s_i_m_p_l_e _c_o_m_m_a_n_d, _f_o_r command, _c_a_s_e command,
+ _s_e_l_e_c_t command, every arithmetic _f_o_r command, and before the
+ first command executes in a shell function (see SSHHEELLLL GGRRAAMMMMAARR
+ above). Refer to the description of the eexxttddeebbuugg option to the
+ sshhoopptt builtin for details of its effect on the DDEEBBUUGG trap. If a
+ _s_i_g_s_p_e_c is RREETTUURRNN, the command _a_r_g is executed each time a shell
+ function or a script executed with the .. or ssoouurrccee builtins fin-
+ ishes executing.
+
+ If a _s_i_g_s_p_e_c is EERRRR, the command _a_r_g is executed whenever a sim-
+ ple command has a non-zero exit status, subject to the following
+ conditions. The EERRRR trap is not executed if the failed command
+ is part of the command list immediately following a wwhhiillee or
+ uunnttiill keyword, part of the test in an _i_f statement, part of a
+ command executed in a &&&& or |||| list, or if the command's return
+ value is being inverted via !!. These are the same conditions
+ obeyed by the eerrrreexxiitt option.
+
+ Signals ignored upon entry to the shell cannot be trapped or
+ reset. Trapped signals that are not being ignored are reset to
+ their original values in a subshell or subshell environment when
+ one is created. The return status is false if any _s_i_g_s_p_e_c is
+ invalid; otherwise ttrraapp returns true.
+
+ ttyyppee [--aaffttppPP] _n_a_m_e [_n_a_m_e ...]
+ With no options, indicate how each _n_a_m_e would be interpreted if
+ used as a command name. If the --tt option is used, ttyyppee prints a
+ string which is one of _a_l_i_a_s, _k_e_y_w_o_r_d, _f_u_n_c_t_i_o_n, _b_u_i_l_t_i_n, or
+ _f_i_l_e if _n_a_m_e is an alias, shell reserved word, function,
+ builtin, or disk file, respectively. If the _n_a_m_e is not found,
+ then nothing is printed, and an exit status of false is
+ returned. If the --pp option is used, ttyyppee either returns the
+ name of the disk file that would be executed if _n_a_m_e were speci-
+ fied as a command name, or nothing if ``type -t name'' would not
+ return _f_i_l_e. The --PP option forces a PPAATTHH search for each _n_a_m_e,
+ even if ``type -t name'' would not return _f_i_l_e. If a command is
+ hashed, --pp and --PP print the hashed value, not necessarily the
+ file that appears first in PPAATTHH. If the --aa option is used, ttyyppee
+ prints all of the places that contain an executable named _n_a_m_e.
+ This includes aliases and functions, if and only if the --pp
+ option is not also used. The table of hashed commands is not
+ consulted when using --aa. The --ff option suppresses shell func-
+ tion lookup, as with the ccoommmmaanndd builtin. ttyyppee returns true if
+ all of the arguments are found, false if any are not found.
+
+ uulliimmiitt [--HHSSTTaabbccddeeffiillmmnnppqqrrssttuuvvxx [_l_i_m_i_t]]
+ Provides control over the resources available to the shell and
+ to processes started by it, on systems that allow such control.
+ The --HH and --SS options specify that the hard or soft limit is set
+ for the given resource. A hard limit cannot be increased by a
+ non-root user once it is set; a soft limit may be increased up
+ to the value of the hard limit. If neither --HH nor --SS is speci-
+ fied, both the soft and hard limits are set. The value of _l_i_m_i_t
+ can be a number in the unit specified for the resource or one of
+ the special values hhaarrdd, ssoofftt, or uunnlliimmiitteedd, which stand for the
+ current hard limit, the current soft limit, and no limit,
+ respectively. If _l_i_m_i_t is omitted, the current value of the
+ soft limit of the resource is printed, unless the --HH option is
+ given. When more than one resource is specified, the limit name
+ and unit are printed before the value. Other options are inter-
+ preted as follows:
+ --aa All current limits are reported
+ --bb The maximum socket buffer size
+ --cc The maximum size of core files created
+ --dd The maximum size of a process's data segment
+ --ee The maximum scheduling priority ("nice")
+ --ff The maximum size of files written by the shell and its
+ children
+ --ii The maximum number of pending signals
+ --ll The maximum size that may be locked into memory
+ --mm The maximum resident set size (many systems do not honor
+ this limit)
+ --nn The maximum number of open file descriptors (most systems
+ do not allow this value to be set)
+ --pp The pipe size in 512-byte blocks (this may not be set)
+ --qq The maximum number of bytes in POSIX message queues
+ --rr The maximum real-time scheduling priority
+ --ss The maximum stack size
+ --tt The maximum amount of cpu time in seconds
+ --uu The maximum number of processes available to a single
+ user
+ --vv The maximum amount of virtual memory available to the
+ shell
+ --xx The maximum number of file locks
+ --TT The maximum number of threads
+
+ If _l_i_m_i_t is given, it is the new value of the specified resource
+ (the --aa option is display only). If no option is given, then --ff
+ is assumed. Values are in 1024-byte increments, except for --tt,
+ which is in seconds, --pp, which is in units of 512-byte blocks,
+ and --TT, --bb, --nn, and --uu, which are unscaled values. The return
+ status is 0 unless an invalid option or argument is supplied, or
+ an error occurs while setting a new limit.
+
+ uummaasskk [--pp] [--SS] [_m_o_d_e]
+ The user file-creation mask is set to _m_o_d_e. If _m_o_d_e begins with
+ a digit, it is interpreted as an octal number; otherwise it is
+ interpreted as a symbolic mode mask similar to that accepted by
+ _c_h_m_o_d(1). If _m_o_d_e is omitted, the current value of the mask is
+ printed. The --SS option causes the mask to be printed in sym-
+ bolic form; the default output is an octal number. If the --pp
+ option is supplied, and _m_o_d_e is omitted, the output is in a form
+ that may be reused as input. The return status is 0 if the mode
+ was successfully changed or if no _m_o_d_e argument was supplied,
+ and false otherwise.
+
+ uunnaalliiaass [-aa] [_n_a_m_e ...]
+ Remove each _n_a_m_e from the list of defined aliases. If --aa is
+ supplied, all alias definitions are removed. The return value
+ is true unless a supplied _n_a_m_e is not a defined alias.
+
+ uunnsseett [-ffvv] [_n_a_m_e ...]
+ For each _n_a_m_e, remove the corresponding variable or function.
+ If no options are supplied, or the --vv option is given, each _n_a_m_e
+ refers to a shell variable. Read-only variables may not be
+ unset. If --ff is specified, each _n_a_m_e refers to a shell func-
+ tion, and the function definition is removed. Each unset vari-
+ able or function is removed from the environment passed to sub-
+ sequent commands. If any of CCOOMMPP__WWOORRDDBBRREEAAKKSS, RRAANNDDOOMM, SSEECCOONNDDSS,
+ LLIINNEENNOO, HHIISSTTCCMMDD, FFUUNNCCNNAAMMEE, GGRROOUUPPSS, or DDIIRRSSTTAACCKK are unset, they
+ lose their special properties, even if they are subsequently
+ reset. The exit status is true unless a _n_a_m_e is readonly.
+
+ wwaaiitt [_n _._._.]
+ Wait for each specified process and return its termination sta-
+ tus. Each _n may be a process ID or a job specification; if a
+ job spec is given, all processes in that job's pipeline are
+ waited for. If _n is not given, all currently active child pro-
+ cesses are waited for, and the return status is zero. If _n
+ specifies a non-existent process or job, the return status is
+ 127. Otherwise, the return status is the exit status of the
+ last process or job waited for.
+
+RREESSTTRRIICCTTEEDD SSHHEELLLL
+ If bbaasshh is started with the name rrbbaasshh, or the --rr option is supplied at
+ invocation, the shell becomes restricted. A restricted shell is used
+ to set up an environment more controlled than the standard shell. It
+ behaves identically to bbaasshh with the exception that the following are
+ disallowed or not performed:
+
+ +o changing directories with ccdd
+
+ +o setting or unsetting the values of SSHHEELLLL, PPAATTHH, EENNVV, or BBAASSHH__EENNVV
+
+ +o specifying command names containing //
+
+ +o specifying a file name containing a // as an argument to the ..
+ builtin command
+
+ +o Specifying a filename containing a slash as an argument to the
+ --pp option to the hhaasshh builtin command
+
+ +o importing function definitions from the shell environment at
+ startup
+
+ +o parsing the value of SSHHEELLLLOOPPTTSS from the shell environment at
+ startup
+
+ +o redirecting output using the >, >|, <>, >&, &>, and >> redirect-
+ ion operators
+
+ +o using the eexxeecc builtin command to replace the shell with another
+ command
+
+ +o adding or deleting builtin commands with the --ff and --dd options
+ to the eennaabbllee builtin command
+
+ +o Using the eennaabbllee builtin command to enable disabled shell
+ builtins
+
+ +o specifying the --pp option to the ccoommmmaanndd builtin command
+
+ +o turning off restricted mode with sseett ++rr or sseett ++oo rreessttrriicctteedd.
+
+ These restrictions are enforced after any startup files are read.
+
+ When a command that is found to be a shell script is executed (see CCOOMM--
+ MMAANNDD EEXXEECCUUTTIIOONN above), rrbbaasshh turns off any restrictions in the shell
+ spawned to execute the script.
+
+SSEEEE AALLSSOO
+ _B_a_s_h _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, Brian Fox and Chet Ramey
+ _T_h_e _G_n_u _R_e_a_d_l_i_n_e _L_i_b_r_a_r_y, Brian Fox and Chet Ramey
+ _T_h_e _G_n_u _H_i_s_t_o_r_y _L_i_b_r_a_r_y, Brian Fox and Chet Ramey
+ _P_o_r_t_a_b_l_e _O_p_e_r_a_t_i_n_g _S_y_s_t_e_m _I_n_t_e_r_f_a_c_e _(_P_O_S_I_X_) _P_a_r_t _2_: _S_h_e_l_l _a_n_d _U_t_i_l_i_-
+ _t_i_e_s, IEEE
+ _s_h(1), _k_s_h(1), _c_s_h(1)
+ _e_m_a_c_s(1), _v_i(1)
+ _r_e_a_d_l_i_n_e(3)
+
+FFIILLEESS
+ _/_b_i_n_/_b_a_s_h
+ The bbaasshh executable
+ _/_e_t_c_/_p_r_o_f_i_l_e
+ The systemwide initialization file, executed for login shells
+ _~_/_._b_a_s_h___p_r_o_f_i_l_e
+ The personal initialization file, executed for login shells
+ _~_/_._b_a_s_h_r_c
+ The individual per-interactive-shell startup file
+ _~_/_._b_a_s_h___l_o_g_o_u_t
+ The individual login shell cleanup file, executed when a login
+ shell exits
+ _~_/_._i_n_p_u_t_r_c
+ Individual _r_e_a_d_l_i_n_e initialization file
+
+AAUUTTHHOORRSS
+ Brian Fox, Free Software Foundation
+ bfox@gnu.org
+
+ Chet Ramey, Case Western Reserve University
+ chet.ramey@case.edu
+
+BBUUGG RREEPPOORRTTSS
+ If you find a bug in bbaasshh,, you should report it. But first, you should
+ make sure that it really is a bug, and that it appears in the latest
+ version of bbaasshh. The latest version is always available from
+ _f_t_p_:_/_/_f_t_p_._g_n_u_._o_r_g_/_p_u_b_/_b_a_s_h_/.
+
+ Once you have determined that a bug actually exists, use the _b_a_s_h_b_u_g
+ command to submit a bug report. If you have a fix, you are encouraged
+ to mail that as well! Suggestions and `philosophical' bug reports may
+ be mailed to _b_u_g_-_b_a_s_h_@_g_n_u_._o_r_g or posted to the Usenet newsgroup
+ ggnnuu..bbaasshh..bbuugg.
+
+ ALL bug reports should include:
+
+ The version number of bbaasshh
+ The hardware and operating system
+ The compiler used to compile
+ A description of the bug behaviour
+ A short script or `recipe' which exercises the bug
+
+ _b_a_s_h_b_u_g inserts the first three items automatically into the template
+ it provides for filing a bug report.
+
+ Comments and bug reports concerning this manual page should be directed
+ to _c_h_e_t_@_p_o_._c_w_r_u_._e_d_u.
+
+BBUUGGSS
+ It's too big and too slow.
+
+ There are some subtle differences between bbaasshh and traditional versions
+ of sshh, mostly because of the PPOOSSIIXX specification.
+
+ Aliases are confusing in some uses.
+
+ Shell builtin commands and functions are not stoppable/restartable.
+
+ Compound commands and command sequences of the form `a ; b ; c' are not
+ handled gracefully when process suspension is attempted. When a
+ process is stopped, the shell immediately executes the next command in
+ the sequence. It suffices to place the sequence of commands between
+ parentheses to force it into a subshell, which may be stopped as a
+ unit.
+
+ Array variables may not (yet) be exported.
+
+ There may be only one active coprocess at a time.
+
+
+
+GNU Bash-4.1 2009 December 29 BASH(1)
diff --git a/doc/bash.1 b/doc/bash.1
new file mode 100644
index 0000000..1890b3c
--- /dev/null
+++ b/doc/bash.1
@@ -0,0 +1,9720 @@
+.\"
+.\" MAN PAGE COMMENTS to
+.\"
+.\" Chet Ramey
+.\" Case Western Reserve University
+.\" chet@po.cwru.edu
+.\"
+.\" Last Change: Tue Dec 29 15:36:16 EST 2009
+.\"
+.\" bash_builtins, strip all but Built-Ins section
+.if \n(zZ=1 .ig zZ
+.if \n(zY=1 .ig zY
+.TH BASH 1 "2009 December 29" "GNU Bash-4.1"
+.\"
+.\" There's some problem with having a `@'
+.\" in a tagged paragraph with the BSD man macros.
+.\" It has to do with `@' appearing in the }1 macro.
+.\" This is a problem on 4.3 BSD and Ultrix, but Sun
+.\" appears to have fixed it.
+.\" If you're seeing the characters
+.\" `@u-3p' appearing before the lines reading
+.\" `possible-hostname-completions
+.\" and `complete-hostname' down in READLINE,
+.\" then uncomment this redefinition.
+.\"
+.de }1
+.ds ]X \&\\*(]B\\
+.nr )E 0
+.if !"\\$1"" .nr )I \\$1n
+.}f
+.ll \\n(LLu
+.in \\n()Ru+\\n(INu+\\n()Iu
+.ti \\n(INu
+.ie !\\n()Iu+\\n()Ru-\w\\*(]Xu-3p \{\\*(]X
+.br\}
+.el \\*(]X\h|\\n()Iu+\\n()Ru\c
+.}f
+..
+.\"
+.\" File Name macro. This used to be `.PN', for Path Name,
+.\" but Sun doesn't seem to like that very much.
+.\"
+.de FN
+\fI\|\\$1\|\fP
+..
+.SH NAME
+bash \- GNU Bourne-Again SHell
+.SH SYNOPSIS
+.B bash
+[options]
+[file]
+.SH COPYRIGHT
+.if n Bash is Copyright (C) 1989-2009 by the Free Software Foundation, Inc.
+.if t Bash is Copyright \(co 1989-2009 by the Free Software Foundation, Inc.
+.SH DESCRIPTION
+.B Bash
+is an \fBsh\fR-compatible command language interpreter that
+executes commands read from the standard input or from a file.
+.B Bash
+also incorporates useful features from the \fIKorn\fP and \fIC\fP
+shells (\fBksh\fP and \fBcsh\fP).
+.PP
+.B Bash
+is intended to be a conformant implementation of the
+Shell and Utilities portion of the IEEE POSIX specification
+(IEEE Standard 1003.1).
+.B Bash
+can be configured to be POSIX-conformant by default.
+.SH OPTIONS
+In addition to the single-character shell options documented in the
+description of the \fBset\fR builtin command, \fBbash\fR
+interprets the following options when it is invoked:
+.PP
+.PD 0
+.TP 10
+.BI \-c "\| string\^"
+If the
+.B \-c
+option is present, then commands are read from
+.IR string .
+If there are arguments after the
+.IR string ,
+they are assigned to the positional parameters, starting with
+.BR $0 .
+.TP
+.B \-i
+If the
+.B \-i
+option is present, the shell is
+.IR interactive .
+.TP
+.B \-l
+Make
+.B bash
+act as if it had been invoked as a login shell (see
+.SM
+.B INVOCATION
+below).
+.TP
+.B \-r
+If the
+.B \-r
+option is present, the shell becomes
+.I restricted
+(see
+.SM
+.B "RESTRICTED SHELL"
+below).
+.TP
+.B \-s
+If the
+.B \-s
+option is present, or if no arguments remain after option
+processing, then commands are read from the standard input.
+This option allows the positional parameters to be set
+when invoking an interactive shell.
+.TP
+.B \-D
+A list of all double-quoted strings preceded by \fB$\fP
+is printed on the standard output.
+These are the strings that
+are subject to language translation when the current locale
+is not \fBC\fP or \fBPOSIX\fP.
+This implies the \fB\-n\fP option; no commands will be executed.
+.TP
+.B [\-+]O [\fIshopt_option\fP]
+\fIshopt_option\fP is one of the shell options accepted by the
+\fBshopt\fP builtin (see
+.SM
+.B SHELL BUILTIN COMMANDS
+below).
+If \fIshopt_option\fP is present, \fB\-O\fP sets the value of that option;
+\fB+O\fP unsets it.
+If \fIshopt_option\fP is not supplied, the names and values of the shell
+options accepted by \fBshopt\fP are printed on the standard output.
+If the invocation option is \fB+O\fP, the output is displayed in a format
+that may be reused as input.
+.TP
+.B \-\-
+A
+.B \-\-
+signals the end of options and disables further option processing.
+Any arguments after the
+.B \-\-
+are treated as filenames and arguments. An argument of
+.B \-
+is equivalent to \fB\-\-\fP.
+.PD
+.PP
+.B Bash
+also interprets a number of multi-character options.
+These options must appear on the command line before the
+single-character options to be recognized.
+.PP
+.PD 0
+.TP
+.B \-\-debugger
+Arrange for the debugger profile to be executed before the shell
+starts.
+Turns on extended debugging mode (see the description of the
+.B extdebug
+option to the
+.B shopt
+builtin below)
+and shell function tracing (see the description of the
+\fB\-o functrace\fP option to the
+.B set
+builtin below).
+.TP
+.B \-\-dump\-po\-strings
+Equivalent to \fB\-D\fP, but the output is in the GNU \fIgettext\fP
+\fBpo\fP (portable object) file format.
+.TP
+.B \-\-dump\-strings
+Equivalent to \fB\-D\fP.
+.TP
+.B \-\-help
+Display a usage message on standard output and exit successfully.
+.TP
+\fB\-\-init\-file\fP \fIfile\fP
+.PD 0
+.TP
+\fB\-\-rcfile\fP \fIfile\fP
+.PD
+Execute commands from
+.I file
+instead of the standard personal initialization file
+.I ~/.bashrc
+if the shell is interactive (see
+.SM
+.B INVOCATION
+below).
+.TP
+.B \-\-login
+Equivalent to \fB\-l\fP.
+.TP
+.B \-\-noediting
+Do not use the GNU
+.B readline
+library to read command lines when the shell is interactive.
+.TP
+.B \-\-noprofile
+Do not read either the system-wide startup file
+.FN /etc/profile
+or any of the personal initialization files
+.IR ~/.bash_profile ,
+.IR ~/.bash_login ,
+or
+.IR ~/.profile .
+By default,
+.B bash
+reads these files when it is invoked as a login shell (see
+.SM
+.B INVOCATION
+below).
+.TP
+.B \-\-norc
+Do not read and execute the personal initialization file
+.I ~/.bashrc
+if the shell is interactive.
+This option is on by default if the shell is invoked as
+.BR sh .
+.TP
+.B \-\-posix
+Change the behavior of \fBbash\fP where the default operation differs
+from the POSIX standard to match the standard (\fIposix mode\fP).
+.TP
+.B \-\-restricted
+The shell becomes restricted (see
+.SM
+.B "RESTRICTED SHELL"
+below).
+.TP
+.B \-\-verbose
+Equivalent to \fB\-v\fP.
+.TP
+.B \-\-version
+Show version information for this instance of
+.B bash
+on the standard output and exit successfully.
+.PD
+.SH ARGUMENTS
+If arguments remain after option processing, and neither the
+.B \-c
+nor the
+.B \-s
+option has been supplied, the first argument is assumed to
+be the name of a file containing shell commands.
+If
+.B bash
+is invoked in this fashion,
+.B $0
+is set to the name of the file, and the positional parameters
+are set to the remaining arguments.
+.B Bash
+reads and executes commands from this file, then exits.
+\fBBash\fP's exit status is the exit status of the last command
+executed in the script.
+If no commands are executed, the exit status is 0.
+An attempt is first made to open the file in the current directory, and,
+if no file is found, then the shell searches the directories in
+.SM
+.B PATH
+for the script.
+.SH INVOCATION
+A \fIlogin shell\fP is one whose first character of argument zero is a
+.BR \- ,
+or one started with the
+.B \-\-login
+option.
+.PP
+An \fIinteractive\fP shell is one started without non-option arguments
+and without the
+.B \-c
+option
+whose standard input and error are
+both connected to terminals (as determined by
+.IR isatty (3)),
+or one started with the
+.B \-i
+option.
+.SM
+.B PS1
+is set and
+.B $\-
+includes
+.B i
+if
+.B bash
+is interactive,
+allowing a shell script or a startup file to test this state.
+.PP
+The following paragraphs describe how
+.B bash
+executes its startup files.
+If any of the files exist but cannot be read,
+.B bash
+reports an error.
+Tildes are expanded in file names as described below under
+.B "Tilde Expansion"
+in the
+.SM
+.B EXPANSION
+section.
+.PP
+When
+.B bash
+is invoked as an interactive login shell, or as a non-interactive shell
+with the \fB\-\-login\fP option, it first reads and
+executes commands from the file \fI/etc/profile\fP, if that
+file exists.
+After reading that file, it looks for \fI~/.bash_profile\fP,
+\fI~/.bash_login\fP, and \fI~/.profile\fP, in that order, and reads
+and executes commands from the first one that exists and is readable.
+The
+.B \-\-noprofile
+option may be used when the shell is started to inhibit this behavior.
+.PP
+When a login shell exits,
+.B bash
+reads and executes commands from the file \fI~/.bash_logout\fP, if it
+exists.
+.PP
+When an interactive shell that is not a login shell is started,
+.B bash
+reads and executes commands from \fI~/.bashrc\fP, if that file exists.
+This may be inhibited by using the
+.B \-\-norc
+option.
+The \fB\-\-rcfile\fP \fIfile\fP option will force
+.B bash
+to read and execute commands from \fIfile\fP instead of \fI~/.bashrc\fP.
+.PP
+When
+.B bash
+is started non-interactively, to run a shell script, for example, it
+looks for the variable
+.SM
+.B BASH_ENV
+in the environment, expands its value if it appears there, and uses the
+expanded value as the name of a file to read and execute.
+.B Bash
+behaves as if the following command were executed:
+.sp .5
+.RS
+.if t \f(CWif [ \-n "$BASH_ENV" ]; then . "$BASH_ENV"; fi\fP
+.if n if [ \-n "$BASH_ENV" ]; then . "$BASH_ENV"; fi
+.RE
+.sp .5
+but the value of the
+.SM
+.B PATH
+variable is not used to search for the file name.
+.PP
+If
+.B bash
+is invoked with the name
+.BR sh ,
+it tries to mimic the startup behavior of historical versions of
+.B sh
+as closely as possible,
+while conforming to the POSIX standard as well.
+When invoked as an interactive login shell, or a non-interactive
+shell with the \fB\-\-login\fP option, it first attempts to
+read and execute commands from
+.I /etc/profile
+and
+.IR ~/.profile ,
+in that order.
+The
+.B \-\-noprofile
+option may be used to inhibit this behavior.
+When invoked as an interactive shell with the name
+.BR sh ,
+.B bash
+looks for the variable
+.SM
+.BR ENV ,
+expands its value if it is defined, and uses the
+expanded value as the name of a file to read and execute.
+Since a shell invoked as
+.B sh
+does not attempt to read and execute commands from any other startup
+files, the
+.B \-\-rcfile
+option has no effect.
+A non-interactive shell invoked with the name
+.B sh
+does not attempt to read any other startup files.
+When invoked as
+.BR sh ,
+.B bash
+enters
+.I posix
+mode after the startup files are read.
+.PP
+When
+.B bash
+is started in
+.I posix
+mode, as with the
+.B \-\-posix
+command line option, it follows the POSIX standard for startup files.
+In this mode, interactive shells expand the
+.SM
+.B ENV
+variable and commands are read and executed from the file
+whose name is the expanded value.
+No other startup files are read.
+.PP
+.B Bash
+attempts to determine when it is being run with its standard input
+connected to a a network connection, as if by the remote shell
+daemon, usually \fIrshd\fP, or the secure shell daemon \fIsshd\fP.
+If
+.B bash
+determines it is being run in this fashion, it reads and executes
+commands from \fI~/.bashrc\fP, if that file exists and is readable.
+It will not do this if invoked as \fBsh\fP.
+The
+.B \-\-norc
+option may be used to inhibit this behavior, and the
+.B \-\-rcfile
+option may be used to force another file to be read, but
+\fIrshd\fP does not generally invoke the shell with those options
+or allow them to be specified.
+.PP
+If the shell is started with the effective user (group) id not equal to the
+real user (group) id, and the \fB\-p\fP option is not supplied, no startup
+files are read, shell functions are not inherited from the environment, the
+.SM
+.BR SHELLOPTS ,
+.SM
+.BR BASHOPTS ,
+.SM
+.BR CDPATH ,
+and
+.SM
+.B GLOBIGNORE
+variables, if they appear in the environment, are ignored,
+and the effective user id is set to the real user id.
+If the \fB\-p\fP option is supplied at invocation, the startup behavior is
+the same, but the effective user id is not reset.
+.SH DEFINITIONS
+.PP
+The following definitions are used throughout the rest of this
+document.
+.PD 0
+.TP
+.B blank
+A space or tab.
+.TP
+.B word
+A sequence of characters considered as a single unit by the shell.
+Also known as a
+.BR token .
+.TP
+.B name
+A
+.I word
+consisting only of alphanumeric characters and underscores, and
+beginning with an alphabetic character or an underscore. Also
+referred to as an
+.BR identifier .
+.TP
+.B metacharacter
+A character that, when unquoted, separates words. One of the following:
+.br
+.RS
+.PP
+.if t \fB| & ; ( ) < > space tab\fP
+.if n \fB| & ; ( ) < > space tab\fP
+.RE
+.PP
+.TP
+.B control operator
+A \fItoken\fP that performs a control function. It is one of the following
+symbols:
+.RS
+.PP
+.if t \fB\(bv\(bv & && ; ;; ( ) | |& <newline>\fP
+.if n \fB|| & && ; ;; ( ) | |& <newline>\fP
+.RE
+.PD
+.SH "RESERVED WORDS"
+\fIReserved words\fP are words that have a special meaning to the shell.
+The following words are recognized as reserved when unquoted and either
+the first word of a simple command (see
+.SM
+.B SHELL GRAMMAR
+below) or the third word of a
+.B case
+or
+.B for
+command:
+.if t .RS
+.PP
+.B
+.if n ! case do done elif else esac fi for function if in select then until while { } time [[ ]]
+.if t ! case do done elif else esac fi for function if in select then until while { } time [[ ]]
+.if t .RE
+.SH "SHELL GRAMMAR"
+.SS Simple Commands
+.PP
+A \fIsimple command\fP is a sequence of optional variable assignments
+followed by \fBblank\fP-separated words and redirections, and
+terminated by a \fIcontrol operator\fP. The first word
+specifies the command to be executed, and is passed as argument zero.
+The remaining words are passed as arguments to the invoked command.
+.PP
+The return value of a \fIsimple command\fP is its exit status, or
+128+\fIn\^\fP if the command is terminated by signal
+.IR n .
+.SS Pipelines
+.PP
+A \fIpipeline\fP is a sequence of one or more commands separated by
+one of the control operators
+.B |
+or \fB|&\fP.
+The format for a pipeline is:
+.RS
+.PP
+[\fBtime\fP [\fB\-p\fP]] [ ! ] \fIcommand\fP [ [\fB|\fP\(bv\fB|&\fP] \fIcommand2\fP ... ]
+.RE
+.PP
+The standard output of
+.I command
+is connected via a pipe to the standard input of
+.IR command2 .
+This connection is performed before any redirections specified by the
+command (see
+.SM
+.B REDIRECTION
+below).
+If \fB|&\fP is used, the standard error of \fIcommand\fP is connected to
+\fIcommand2\fP's standard input through the pipe; it is shorthand for
+\fB2>&1 |\fP.
+This implicit redirection of the standard error is performed after any
+redirections specified by the command.
+.PP
+The return status of a pipeline is the exit status of the last
+command, unless the \fBpipefail\fP option is enabled.
+If \fBpipefail\fP is enabled, the pipeline's return status is the
+value of the last (rightmost) command to exit with a non-zero status,
+or zero if all commands exit successfully.
+If the reserved word
+.B !
+precedes a pipeline, the exit status of that pipeline is the logical
+negation of the exit status as described above.
+The shell waits for all commands in the pipeline to
+terminate before returning a value.
+.PP
+If the
+.B time
+reserved word precedes a pipeline, the elapsed as well as user and
+system time consumed by its execution are reported when the pipeline
+terminates.
+The \fB\-p\fP option changes the output format to that specified by POSIX.
+The
+.SM
+.B TIMEFORMAT
+variable may be set to a format string that specifies how the timing
+information should be displayed; see the description of
+.SM
+.B TIMEFORMAT
+under
+.B "Shell Variables"
+below.
+.PP
+Each command in a pipeline is executed as a separate process (i.e., in a
+subshell).
+.SS Lists
+.PP
+A \fIlist\fP is a sequence of one or more pipelines separated by one
+of the operators
+.BR ; ,
+.BR & ,
+.BR && ,
+or
+.BR \(bv\(bv ,
+and optionally terminated by one of
+.BR ; ,
+.BR & ,
+or
+.BR <newline> .
+.PP
+Of these list operators,
+.B &&
+and
+.B \(bv\(bv
+have equal precedence, followed by
+.B ;
+and
+.BR & ,
+which have equal precedence.
+.PP
+A sequence of one or more newlines may appear in a \fIlist\fP instead
+of a semicolon to delimit commands.
+.PP
+If a command is terminated by the control operator
+.BR & ,
+the shell executes the command in the \fIbackground\fP
+in a subshell. The shell does not wait for the command to
+finish, and the return status is 0. Commands separated by a
+.B ;
+are executed sequentially; the shell waits for each
+command to terminate in turn. The return status is the
+exit status of the last command executed.
+.PP
+AND and OR lists are sequences of one of more pipelines separated by the
+\fB&&\fP and \fB\(bv\(bv\fP control operators, respectively.
+AND and OR lists are executed with left associativity.
+An AND list has the form
+.RS
+.PP
+\fIcommand1\fP \fB&&\fP \fIcommand2\fP
+.RE
+.PP
+.I command2
+is executed if, and only if,
+.I command1
+returns an exit status of zero.
+.PP
+An OR list has the form
+.RS
+.PP
+\fIcommand1\fP \fB\(bv\(bv\fP \fIcommand2\fP
+.PP
+.RE
+.PP
+.I command2
+is executed if and only if
+.I command1
+returns a non-zero exit status.
+The return status of
+AND and OR lists is the exit status of the last command
+executed in the list.
+.SS Compound Commands
+.PP
+A \fIcompound command\fP is one of the following:
+.TP
+(\fIlist\fP)
+\fIlist\fP is executed in a subshell environment (see
+.SM
+\fBCOMMAND EXECUTION ENVIRONMENT\fP
+below).
+Variable assignments and builtin
+commands that affect the shell's environment do not remain in effect
+after the command completes. The return status is the exit status of
+\fIlist\fP.
+.TP
+{ \fIlist\fP; }
+\fIlist\fP is simply executed in the current shell environment.
+\fIlist\fP must be terminated with a newline or semicolon.
+This is known as a \fIgroup command\fP.
+The return status is the exit status of
+\fIlist\fP.
+Note that unlike the metacharacters \fB(\fP and \fB)\fP, \fB{\fP and
+\fB}\fP are \fIreserved words\fP and must occur where a reserved
+word is permitted to be recognized. Since they do not cause a word
+break, they must be separated from \fIlist\fP by whitespace or another
+shell metacharacter.
+.TP
+((\fIexpression\fP))
+The \fIexpression\fP is evaluated according to the rules described
+below under
+.SM
+.BR "ARITHMETIC EVALUATION" .
+If the value of the expression is non-zero, the return status is 0;
+otherwise the return status is 1. This is exactly equivalent to
+\fBlet "\fIexpression\fP"\fR.
+.TP
+\fB[[\fP \fIexpression\fP \fB]]\fP
+Return a status of 0 or 1 depending on the evaluation of
+the conditional expression \fIexpression\fP.
+Expressions are composed of the primaries described below under
+.SM
+.BR "CONDITIONAL EXPRESSIONS" .
+Word splitting and pathname expansion are not performed on the words
+between the \fB[[\fP and \fB]]\fP; tilde expansion, parameter and
+variable expansion, arithmetic expansion, command substitution, process
+substitution, and quote removal are performed.
+Conditional operators such as \fB\-f\fP must be unquoted to be recognized
+as primaries.
+.if t .sp 0.5
+.if n .sp 1
+When used with \fB[[\fP, The \fB<\fP and \fB>\fP operators sort
+lexicographically using the current locale.
+.if t .sp 0.5
+.if n .sp 1
+When the \fB==\fP and \fB!=\fP operators are used, the string to the
+right of the operator is considered a pattern and matched according
+to the rules described below under \fBPattern Matching\fP.
+If the shell option
+.B nocasematch
+is enabled, the match is performed without regard to the case
+of alphabetic characters.
+The return value is 0 if the string matches (\fB==\fP) or does not match
+(\fB!=\fP) the pattern, and 1 otherwise.
+Any part of the pattern may be quoted to force it to be matched as a
+string.
+.if t .sp 0.5
+.if n .sp 1
+An additional binary operator, \fB=~\fP, is available, with the same
+precedence as \fB==\fP and \fB!=\fP.
+When it is used, the string to the right of the operator is considered
+an extended regular expression and matched accordingly (as in \fIregex\fP(3)).
+The return value is 0 if the string matches
+the pattern, and 1 otherwise.
+If the regular expression is syntactically incorrect, the conditional
+expression's return value is 2.
+If the shell option
+.B nocasematch
+is enabled, the match is performed without regard to the case
+of alphabetic characters.
+Any part of the pattern may be quoted to force it to be matched as a
+string.
+Substrings matched by parenthesized subexpressions within the regular
+expression are saved in the array variable
+.SM
+.BR BASH_REMATCH .
+The element of
+.SM
+.B BASH_REMATCH
+with index 0 is the portion of the string
+matching the entire regular expression.
+The element of
+.SM
+.B BASH_REMATCH
+with index \fIn\fP is the portion of the
+string matching the \fIn\fPth parenthesized subexpression.
+.if t .sp 0.5
+.if n .sp 1
+Expressions may be combined using the following operators, listed
+in decreasing order of precedence:
+.if t .sp 0.5
+.if n .sp 1
+.RS
+.PD 0
+.TP
+.B ( \fIexpression\fP )
+Returns the value of \fIexpression\fP.
+This may be used to override the normal precedence of operators.
+.TP
+.B ! \fIexpression\fP
+True if
+.I expression
+is false.
+.TP
+\fIexpression1\fP \fB&&\fP \fIexpression2\fP
+True if both
+.I expression1
+and
+.I expression2
+are true.
+.TP
+.if t \fIexpression1\fP \fB\(bv\(bv\fP \fIexpression2\fP
+.if n \fIexpression1\fP \fB||\fP \fIexpression2\fP
+True if either
+.I expression1
+or
+.I expression2
+is true.
+.PD
+.LP
+The \fB&&\fP and
+.if t \fB\(bv\(bv\fP
+.if n \fB||\fP
+operators do not evaluate \fIexpression2\fP if the value of
+\fIexpression1\fP is sufficient to determine the return value of
+the entire conditional expression.
+.RE
+.TP
+\fBfor\fP \fIname\fP [ [ \fBin\fP [ \fIword ...\fP ] ] ; ] \fBdo\fP \fIlist\fP ; \fBdone\fP
+The list of words following \fBin\fP is expanded, generating a list
+of items.
+The variable \fIname\fP is set to each element of this list
+in turn, and \fIlist\fP is executed each time.
+If the \fBin\fP \fIword\fP is omitted, the \fBfor\fP command executes
+\fIlist\fP once for each positional parameter that is set (see
+.SM
+.B PARAMETERS
+below).
+The return status is the exit status of the last command that executes.
+If the expansion of the items following \fBin\fP results in an empty
+list, no commands are executed, and the return status is 0.
+.TP
+\fBfor\fP (( \fIexpr1\fP ; \fIexpr2\fP ; \fIexpr3\fP )) ; \fBdo\fP \fIlist\fP ; \fBdone\fP
+First, the arithmetic expression \fIexpr1\fP is evaluated according
+to the rules described below under
+.SM
+.BR "ARITHMETIC EVALUATION" .
+The arithmetic expression \fIexpr2\fP is then evaluated repeatedly
+until it evaluates to zero.
+Each time \fIexpr2\fP evaluates to a non-zero value, \fIlist\fP is
+executed and the arithmetic expression \fIexpr3\fP is evaluated.
+If any expression is omitted, it behaves as if it evaluates to 1.
+The return value is the exit status of the last command in \fIlist\fP
+that is executed, or false if any of the expressions is invalid.
+.TP
+\fBselect\fP \fIname\fP [ \fBin\fP \fIword\fP ] ; \fBdo\fP \fIlist\fP ; \fBdone\fP
+The list of words following \fBin\fP is expanded, generating a list
+of items. The set of expanded words is printed on the standard
+error, each preceded by a number. If the \fBin\fP
+\fIword\fP is omitted, the positional parameters are printed (see
+.SM
+.B PARAMETERS
+below). The
+.SM
+.B PS3
+prompt is then displayed and a line read from the standard input.
+If the line consists of a number corresponding to one of
+the displayed words, then the value of
+.I name
+is set to that word. If the line is empty, the words and prompt
+are displayed again. If EOF is read, the command completes. Any
+other value read causes
+.I name
+to be set to null. The line read is saved in the variable
+.SM
+.BR REPLY .
+The
+.I list
+is executed after each selection until a
+.B break
+command is executed.
+The exit status of
+.B select
+is the exit status of the last command executed in
+.IR list ,
+or zero if no commands were executed.
+.TP
+\fBcase\fP \fIword\fP \fBin\fP [ [(] \fIpattern\fP [ \fB|\fP \fIpattern\fP ] \
+... ) \fIlist\fP ;; ] ... \fBesac\fP
+A \fBcase\fP command first expands \fIword\fP, and tries to match
+it against each \fIpattern\fP in turn, using the same matching rules
+as for pathname expansion (see
+.B Pathname Expansion
+below).
+The \fIword\fP is expanded using tilde
+expansion, parameter and variable expansion, arithmetic substitution,
+command substitution, process substitution and quote removal.
+Each \fIpattern\fP examined is expanded using tilde
+expansion, parameter and variable expansion, arithmetic substitution,
+command substitution, and process substitution.
+If the shell option
+.B nocasematch
+is enabled, the match is performed without regard to the case
+of alphabetic characters.
+When a match is found, the corresponding \fIlist\fP is executed.
+If the \fB;;\fP operator is used, no subsequent matches are attempted after
+the first pattern match.
+Using \fB;&\fP in place of \fB;;\fP causes execution to continue with
+the \fIlist\fP associated with the next set of patterns.
+Using \fB;;&\fP in place of \fB;;\fP causes the shell to test the next
+pattern list in the statement, if any, and execute any associated \fIlist\fP
+on a successful match.
+The exit status is zero if no
+pattern matches. Otherwise, it is the exit status of the
+last command executed in \fIlist\fP.
+.TP
+\fBif\fP \fIlist\fP; \fBthen\fP \fIlist;\fP \
+[ \fBelif\fP \fIlist\fP; \fBthen\fP \fIlist\fP; ] ... \
+[ \fBelse\fP \fIlist\fP; ] \fBfi\fP
+The
+.B if
+.I list
+is executed. If its exit status is zero, the
+\fBthen\fP \fIlist\fP is executed. Otherwise, each \fBelif\fP
+\fIlist\fP is executed in turn, and if its exit status is zero,
+the corresponding \fBthen\fP \fIlist\fP is executed and the
+command completes. Otherwise, the \fBelse\fP \fIlist\fP is
+executed, if present. The exit status is the exit status of the
+last command executed, or zero if no condition tested true.
+.TP
+\fBwhile\fP \fIlist\fP; \fBdo\fP \fIlist\fP; \fBdone\fP
+.PD 0
+.TP
+\fBuntil\fP \fIlist\fP; \fBdo\fP \fIlist\fP; \fBdone\fP
+.PD
+The \fBwhile\fP command continuously executes the \fBdo\fP
+\fIlist\fP as long as the last command in \fIlist\fP returns
+an exit status of zero. The \fBuntil\fP command is identical
+to the \fBwhile\fP command, except that the test is negated;
+the
+.B do
+.I list
+is executed as long as the last command in
+.I list
+returns a non-zero exit status.
+The exit status of the \fBwhile\fP and \fBuntil\fP commands
+is the exit status
+of the last \fBdo\fP \fIlist\fP command executed, or zero if
+none was executed.
+.SS Coprocesses
+.PP
+A \fIcoprocess\fP is a shell command preceded by the \fBcoproc\fP reserved
+word.
+A coprocess is executed asynchronously in a subshell, as if the command
+had been terminated with the \fB&\fP control operator, with a two-way pipe
+established between the executing shell and the coprocess.
+.PP
+The format for a coprocess is:
+.RS
+.PP
+\fBcoproc\fP [\fINAME\fP] \fIcommand\fP [\fIredirections\fP]
+.RE
+.PP
+This creates a coprocess named \fINAME\fP.
+If \fINAME\fP is not supplied, the default name is \fICOPROC\fP.
+\fINAME\fP must not be supplied if \fIcommand\fP is a \fIsimple
+command\fP (see above); otherwise, it is interpreted as the first word
+of the simple command.
+When the coproc is executed, the shell creates an array variable (see
+.B Arrays
+below) named \fINAME\fP in the context of the executing shell.
+The standard output of
+.I command
+is connected via a pipe to a file descriptor in the executing shell,
+and that file descriptor is assigned to \fINAME\fP[0].
+The standard input of
+.I command
+is connected via a pipe to a file descriptor in the executing shell,
+and that file descriptor is assigned to \fINAME\fP[1].
+This pipe is established before any redirections specified by the
+command (see
+.SM
+.B REDIRECTION
+below).
+The file descriptors can be utilized as arguments to shell commands
+and redirections using standard word expansions.
+The process id of the shell spawned to execute the coprocess is
+available as the value of the variable \fINAME\fP_PID.
+The \fBwait\fP
+builtin command may be used to wait for the coprocess to terminate.
+.PP
+The return status of a coprocess is the exit status of \fIcommand\fP.
+.SS Shell Function Definitions
+.PP
+A shell function is an object that is called like a simple command and
+executes a compound command with a new set of positional parameters.
+Shell functions are declared as follows:
+.TP
+[ \fBfunction\fP ] \fIname\fP () \fIcompound\-command\fP [\fIredirection\fP]
+This defines a function named \fIname\fP.
+The reserved word \fBfunction\fP is optional.
+If the \fBfunction\fP reserved word is supplied, the parentheses are optional.
+The \fIbody\fP of the function is the compound command
+.I compound\-command
+(see \fBCompound Commands\fP above).
+That command is usually a \fIlist\fP of commands between { and }, but
+may be any command listed under \fBCompound Commands\fP above.
+\fIcompound\-command\fP is executed whenever \fIname\fP is specified as the
+name of a simple command.
+Any redirections (see
+.SM
+.B REDIRECTION
+below) specified when a function is defined are performed
+when the function is executed.
+The exit status of a function definition is zero unless a syntax error
+occurs or a readonly function with the same name already exists.
+When executed, the exit status of a function is the exit status of the
+last command executed in the body. (See
+.SM
+.B FUNCTIONS
+below.)
+.SH COMMENTS
+In a non-interactive shell, or an interactive shell in which the
+.B interactive_comments
+option to the
+.B shopt
+builtin is enabled (see
+.SM
+.B "SHELL BUILTIN COMMANDS"
+below), a word beginning with
+.B #
+causes that word and all remaining characters on that line to
+be ignored. An interactive shell without the
+.B interactive_comments
+option enabled does not allow comments. The
+.B interactive_comments
+option is on by default in interactive shells.
+.SH QUOTING
+\fIQuoting\fP is used to remove the special meaning of certain
+characters or words to the shell. Quoting can be used to
+disable special treatment for special characters, to prevent
+reserved words from being recognized as such, and to prevent
+parameter expansion.
+.PP
+Each of the \fImetacharacters\fP listed above under
+.SM
+.B DEFINITIONS
+has special meaning to the shell and must be quoted if it is to
+represent itself.
+.PP
+When the command history expansion facilities are being used
+(see
+.SM
+.B HISTORY EXPANSION
+below), the
+\fIhistory expansion\fP character, usually \fB!\fP, must be quoted
+to prevent history expansion.
+.PP
+There are three quoting mechanisms: the
+.IR "escape character" ,
+single quotes, and double quotes.
+.PP
+A non-quoted backslash (\fB\e\fP) is the
+.IR "escape character" .
+It preserves the literal value of the next character that follows,
+with the exception of <newline>. If a \fB\e\fP<newline> pair
+appears, and the backslash is not itself quoted, the \fB\e\fP<newline>
+is treated as a line continuation (that is, it is removed from the
+input stream and effectively ignored).
+.PP
+Enclosing characters in single quotes preserves the literal value
+of each character within the quotes. A single quote may not occur
+between single quotes, even when preceded by a backslash.
+.PP
+Enclosing characters in double quotes preserves the literal value
+of all characters within the quotes, with the exception of
+.BR $ ,
+.BR \` ,
+.BR \e ,
+and, when history expansion is enabled,
+.BR ! .
+The characters
+.B $
+and
+.B \`
+retain their special meaning within double quotes. The backslash
+retains its special meaning only when followed by one of the following
+characters:
+.BR $ ,
+.BR \` ,
+\^\fB"\fP\^,
+.BR \e ,
+or
+.BR <newline> .
+A double quote may be quoted within double quotes by preceding it with
+a backslash.
+If enabled, history expansion will be performed unless an
+.B !
+appearing in double quotes is escaped using a backslash.
+The backslash preceding the
+.B !
+is not removed.
+.PP
+The special parameters
+.B *
+and
+.B @
+have special meaning when in double
+quotes (see
+.SM
+.B PARAMETERS
+below).
+.PP
+Words of the form \fB$\fP\(aq\fIstring\fP\(aq are treated specially. The
+word expands to \fIstring\fP, with backslash-escaped characters replaced
+as specified by the ANSI C standard. Backslash escape sequences, if
+present, are decoded as follows:
+.RS
+.PD 0
+.TP
+.B \ea
+alert (bell)
+.TP
+.B \eb
+backspace
+.TP
+.B \ee
+.TP
+.B \eE
+an escape character
+.TP
+.B \ef
+form feed
+.TP
+.B \en
+new line
+.TP
+.B \er
+carriage return
+.TP
+.B \et
+horizontal tab
+.TP
+.B \ev
+vertical tab
+.TP
+.B \e\e
+backslash
+.TP
+.B \e\(aq
+single quote
+.TP
+.B \e\(dq
+double quote
+.TP
+.B \e\fInnn\fP
+the eight-bit character whose value is the octal value \fInnn\fP
+(one to three digits)
+.TP
+.B \ex\fIHH\fP
+the eight-bit character whose value is the hexadecimal value \fIHH\fP
+(one or two hex digits)
+.TP
+.B \ec\fIx\fP
+a control-\fIx\fP character
+.PD
+.RE
+.LP
+The expanded result is single-quoted, as if the dollar sign had
+not been present.
+.PP
+A double-quoted string preceded by a dollar sign (\fB$\fP\(dq\fIstring\fP\(dq)
+will cause the string to be translated according to the current locale.
+If the current locale is \fBC\fP or \fBPOSIX\fP, the dollar sign
+is ignored.
+If the string is translated and replaced, the replacement is
+double-quoted.
+.SH PARAMETERS
+A
+.I parameter
+is an entity that stores values.
+It can be a
+.IR name ,
+a number, or one of the special characters listed below under
+.BR "Special Parameters" .
+A
+.I variable
+is a parameter denoted by a
+.IR name .
+A variable has a \fIvalue\fP and zero or more \fIattributes\fP.
+Attributes are assigned using the
+.B declare
+builtin command (see
+.B declare
+below in
+.SM
+.BR "SHELL BUILTIN COMMANDS" ).
+.PP
+A parameter is set if it has been assigned a value. The null string is
+a valid value. Once a variable is set, it may be unset only by using
+the
+.B unset
+builtin command (see
+.SM
+.B SHELL BUILTIN COMMANDS
+below).
+.PP
+A
+.I variable
+may be assigned to by a statement of the form
+.RS
+.PP
+\fIname\fP=[\fIvalue\fP]
+.RE
+.PP
+If
+.I value
+is not given, the variable is assigned the null string. All
+.I values
+undergo tilde expansion, parameter and variable expansion,
+command substitution, arithmetic expansion, and quote
+removal (see
+.SM
+.B EXPANSION
+below). If the variable has its
+.B integer
+attribute set, then
+.I value
+is evaluated as an arithmetic expression even if the $((...)) expansion is
+not used (see
+.B "Arithmetic Expansion"
+below).
+Word splitting is not performed, with the exception
+of \fB"$@"\fP as explained below under
+.BR "Special Parameters" .
+Pathname expansion is not performed.
+Assignment statements may also appear as arguments to the
+.BR alias ,
+.BR declare ,
+.BR typeset ,
+.BR export ,
+.BR readonly ,
+and
+.B local
+builtin commands.
+.PP
+In the context where an assignment statement is assigning a value
+to a shell variable or array index, the += operator can be used to
+append to or add to the variable's previous value.
+When += is applied to a variable for which the integer attribute has been
+set, \fIvalue\fP is evaluated as an arithmetic expression and added to the
+variable's current value, which is also evaluated.
+When += is applied to an array variable using compound assignment (see
+.B Arrays
+below), the
+variable's value is not unset (as it is when using =), and new values are
+appended to the array beginning at one greater than the array's maximum index
+(for indexed arrays) or added as additional key\-value pairs in an
+associative array.
+When applied to a string-valued variable, \fIvalue\fP is expanded and
+appended to the variable's value.
+.SS Positional Parameters
+.PP
+A
+.I positional parameter
+is a parameter denoted by one or more
+digits, other than the single digit 0. Positional parameters are
+assigned from the shell's arguments when it is invoked,
+and may be reassigned using the
+.B set
+builtin command. Positional parameters may not be assigned to
+with assignment statements. The positional parameters are
+temporarily replaced when a shell function is executed (see
+.SM
+.B FUNCTIONS
+below).
+.PP
+When a positional parameter consisting of more than a single
+digit is expanded, it must be enclosed in braces (see
+.SM
+.B EXPANSION
+below).
+.SS Special Parameters
+.PP
+The shell treats several parameters specially. These parameters may
+only be referenced; assignment to them is not allowed.
+.PD 0
+.TP
+.B *
+Expands to the positional parameters, starting from one. When the
+expansion occurs within double quotes, it expands to a single word
+with the value of each parameter separated by the first character
+of the
+.SM
+.B IFS
+special variable. That is, "\fB$*\fP" is equivalent
+to "\fB$1\fP\fIc\fP\fB$2\fP\fIc\fP\fB...\fP", where
+.I c
+is the first character of the value of the
+.SM
+.B IFS
+variable. If
+.SM
+.B IFS
+is unset, the parameters are separated by spaces.
+If
+.SM
+.B IFS
+is null, the parameters are joined without intervening separators.
+.TP
+.B @
+Expands to the positional parameters, starting from one. When the
+expansion occurs within double quotes, each parameter expands to a
+separate word. That is, "\fB$@\fP" is equivalent to
+"\fB$1\fP" "\fB$2\fP" ...
+If the double-quoted expansion occurs within a word, the expansion of
+the first parameter is joined with the beginning part of the original
+word, and the expansion of the last parameter is joined with the last
+part of the original word.
+When there are no positional parameters, "\fB$@\fP" and
+.B $@
+expand to nothing (i.e., they are removed).
+.TP
+.B #
+Expands to the number of positional parameters in decimal.
+.TP
+.B ?
+Expands to the exit status of the most recently executed foreground
+pipeline.
+.TP
+.B \-
+Expands to the current option flags as specified upon invocation,
+by the
+.B set
+builtin command, or those set by the shell itself
+(such as the
+.B \-i
+option).
+.TP
+.B $
+Expands to the process ID of the shell. In a () subshell, it
+expands to the process ID of the current shell, not the
+subshell.
+.TP
+.B !
+Expands to the process ID of the most recently executed background
+(asynchronous) command.
+.TP
+.B 0
+Expands to the name of the shell or shell script. This is set at
+shell initialization. If
+.B bash
+is invoked with a file of commands,
+.B $0
+is set to the name of that file. If
+.B bash
+is started with the
+.B \-c
+option, then
+.B $0
+is set to the first argument after the string to be
+executed, if one is present. Otherwise, it is set
+to the file name used to invoke
+.BR bash ,
+as given by argument zero.
+.TP
+.B _
+At shell startup, set to the absolute pathname used to invoke the
+shell or shell script being executed as passed in the environment
+or argument list.
+Subsequently, expands to the last argument to the previous command,
+after expansion.
+Also set to the full pathname used to invoke each command executed
+and placed in the environment exported to that command.
+When checking mail, this parameter holds the name of the mail file
+currently being checked.
+.PD
+.SS Shell Variables
+.PP
+The following variables are set by the shell:
+.PP
+.PD 0
+.TP
+.B BASH
+Expands to the full file name used to invoke this instance of
+.BR bash .
+.TP
+.B BASHOPTS
+A colon-separated list of enabled shell options. Each word in
+the list is a valid argument for the
+.B \-s
+option to the
+.B shopt
+builtin command (see
+.SM
+.B "SHELL BUILTIN COMMANDS"
+below). The options appearing in
+.SM
+.B BASHOPTS
+are those reported as
+.I on
+by \fBshopt\fP.
+If this variable is in the environment when
+.B bash
+starts up, each shell option in the list will be enabled before
+reading any startup files.
+This variable is read-only.
+.TP
+.B BASHPID
+Expands to the process id of the current \fBbash\fP process.
+This differs from \fB$$\fP under certain circumstances, such as subshells
+that do not require \fBbash\fP to be re-initialized.
+.TP
+.B BASH_ALIASES
+An associative array variable whose members correspond to the internal
+list of aliases as maintained by the \fBalias\fP builtin
+Elements added to this array appear in the alias list; unsetting array
+elements cause aliases to be removed from the alias list.
+.TP
+.B BASH_ARGC
+An array variable whose values are the number of parameters in each
+frame of the current \fBbash\fP execution call stack.
+The number of
+parameters to the current subroutine (shell function or script executed
+with \fB.\fP or \fBsource\fP) is at the top of the stack.
+When a subroutine is executed, the number of parameters passed is pushed onto
+.SM
+.BR BASH_ARGC .
+The shell sets
+.SM
+.B BASH_ARGC
+only when in extended debugging mode (see the description of the
+.B extdebug
+option to the
+.B shopt
+builtin below)
+.TP
+.B BASH_ARGV
+An array variable containing all of the parameters in the current \fBbash\fP
+execution call stack. The final parameter of the last subroutine call
+is at the top of the stack; the first parameter of the initial call is
+at the bottom. When a subroutine is executed, the parameters supplied
+are pushed onto
+.SM
+.BR BASH_ARGV .
+The shell sets
+.SM
+.B BASH_ARGV
+only when in extended debugging mode
+(see the description of the
+.B extdebug
+option to the
+.B shopt
+builtin below)
+.TP
+.B BASH_CMDS
+An associative array variable whose members correspond to the internal
+hash table of commands as maintained by the \fBhash\fP builtin.
+Elements added to this array appear in the hash table; unsetting array
+elements cause commands to be removed from the hash table.
+.TP
+.B BASH_COMMAND
+The command currently being executed or about to be executed, unless the
+shell is executing a command as the result of a trap,
+in which case it is the command executing at the time of the trap.
+.TP
+.B BASH_EXECUTION_STRING
+The command argument to the \fB\-c\fP invocation option.
+.TP
+.B BASH_LINENO
+An array variable whose members are the line numbers in source files
+corresponding to each member of
+.SM
+.BR FUNCNAME .
+\fB${BASH_LINENO[\fP\fI$i\fP\fB]}\fP is the line number in the source
+file where \fB${FUNCNAME[\fP\fI$i\fP\fB]}\fP was called
+(or \fB${BASH_LINENO[\fP\fI$i-1\fP\fB]}\fP if referenced within another
+shell function).
+The corresponding source file name is \fB${BASH_SOURCE[\fP\fI$i\fP\fB]}\fP.
+Use
+.SM
+.B LINENO
+to obtain the current line number.
+.TP
+.B BASH_REMATCH
+An array variable whose members are assigned by the \fB=~\fP binary
+operator to the \fB[[\fP conditional command.
+The element with index 0 is the portion of the string
+matching the entire regular expression.
+The element with index \fIn\fP is the portion of the
+string matching the \fIn\fPth parenthesized subexpression.
+This variable is read-only.
+.TP
+.B BASH_SOURCE
+An array variable whose members are the source filenames corresponding
+to the elements in the
+.SM
+.B FUNCNAME
+array variable.
+.TP
+.B BASH_SUBSHELL
+Incremented by one each time a subshell or subshell environment is spawned.
+The initial value is 0.
+.TP
+.B BASH_VERSINFO
+A readonly array variable whose members hold version information for
+this instance of
+.BR bash .
+The values assigned to the array members are as follows:
+.sp .5
+.RS
+.PD 0
+.TP 24
+.B BASH_VERSINFO[\fR0\fP]
+The major version number (the \fIrelease\fP).
+.TP
+.B BASH_VERSINFO[\fR1\fP]
+The minor version number (the \fIversion\fP).
+.TP
+.B BASH_VERSINFO[\fR2\fP]
+The patch level.
+.TP
+.B BASH_VERSINFO[\fR3\fP]
+The build version.
+.TP
+.B BASH_VERSINFO[\fR4\fP]
+The release status (e.g., \fIbeta1\fP).
+.TP
+.B BASH_VERSINFO[\fR5\fP]
+The value of
+.SM
+.BR MACHTYPE .
+.PD
+.RE
+.TP
+.B BASH_VERSION
+Expands to a string describing the version of this instance of
+.BR bash .
+.TP
+.B COMP_CWORD
+An index into \fB${COMP_WORDS}\fP of the word containing the current
+cursor position.
+This variable is available only in shell functions invoked by the
+programmable completion facilities (see \fBProgrammable Completion\fP
+below).
+.TP
+.B COMP_KEY
+The key (or final key of a key sequence) used to invoke the current
+completion function.
+.TP
+.B COMP_LINE
+The current command line.
+This variable is available only in shell functions and external
+commands invoked by the
+programmable completion facilities (see \fBProgrammable Completion\fP
+below).
+.TP
+.B COMP_POINT
+The index of the current cursor position relative to the beginning of
+the current command.
+If the current cursor position is at the end of the current command,
+the value of this variable is equal to \fB${#COMP_LINE}\fP.
+This variable is available only in shell functions and external
+commands invoked by the
+programmable completion facilities (see \fBProgrammable Completion\fP
+below).
+.TP
+.B COMP_TYPE
+Set to an integer value corresponding to the type of completion attempted
+that caused a completion function to be called:
+\fITAB\fP, for normal completion,
+\fI?\fP, for listing completions after successive tabs,
+\fI!\fP, for listing alternatives on partial word completion,
+\fI@\fP, to list completions if the word is not unmodified,
+or
+\fI%\fP, for menu completion.
+This variable is available only in shell functions and external
+commands invoked by the
+programmable completion facilities (see \fBProgrammable Completion\fP
+below).
+.TP
+.B COMP_WORDBREAKS
+The set of characters that the \fBreadline\fP library treats as word
+separators when performing word completion.
+If
+.SM
+.B COMP_WORDBREAKS
+is unset, it loses its special properties, even if it is
+subsequently reset.
+.TP
+.B COMP_WORDS
+An array variable (see \fBArrays\fP below) consisting of the individual
+words in the current command line.
+The line is split into words as \fBreadline\fP would split it, using
+.SM
+.B COMP_WORDBREAKS
+as described above.
+This variable is available only in shell functions invoked by the
+programmable completion facilities (see \fBProgrammable Completion\fP
+below).
+.TP
+.B DIRSTACK
+An array variable (see
+.B Arrays
+below) containing the current contents of the directory stack.
+Directories appear in the stack in the order they are displayed by the
+.B dirs
+builtin.
+Assigning to members of this array variable may be used to modify
+directories already in the stack, but the
+.B pushd
+and
+.B popd
+builtins must be used to add and remove directories.
+Assignment to this variable will not change the current directory.
+If
+.SM
+.B DIRSTACK
+is unset, it loses its special properties, even if it is
+subsequently reset.
+.TP
+.B EUID
+Expands to the effective user ID of the current user, initialized at
+shell startup. This variable is readonly.
+.TP
+.B FUNCNAME
+An array variable containing the names of all shell functions
+currently in the execution call stack.
+The element with index 0 is the name of any currently-executing
+shell function.
+The bottom-most element is
+.if t \f(CW"main"\fP.
+.if n "main".
+This variable exists only when a shell function is executing.
+Assignments to
+.SM
+.B FUNCNAME
+have no effect and return an error status.
+If
+.SM
+.B FUNCNAME
+is unset, it loses its special properties, even if it is
+subsequently reset.
+.TP
+.B GROUPS
+An array variable containing the list of groups of which the current
+user is a member.
+Assignments to
+.SM
+.B GROUPS
+have no effect and return an error status.
+If
+.SM
+.B GROUPS
+is unset, it loses its special properties, even if it is
+subsequently reset.
+.TP
+.B HISTCMD
+The history number, or index in the history list, of the current
+command.
+If
+.SM
+.B HISTCMD
+is unset, it loses its special properties, even if it is
+subsequently reset.
+.TP
+.B HOSTNAME
+Automatically set to the name of the current host.
+.TP
+.B HOSTTYPE
+Automatically set to a string that uniquely
+describes the type of machine on which
+.B bash
+is executing.
+The default is system-dependent.
+.TP
+.B LINENO
+Each time this parameter is referenced, the shell substitutes
+a decimal number representing the current sequential line number
+(starting with 1) within a script or function. When not in a
+script or function, the value substituted is not guaranteed to
+be meaningful.
+If
+.SM
+.B LINENO
+is unset, it loses its special properties, even if it is
+subsequently reset.
+.TP
+.B MACHTYPE
+Automatically set to a string that fully describes the system
+type on which
+.B bash
+is executing, in the standard GNU \fIcpu-company-system\fP format.
+The default is system-dependent.
+.TP
+.B OLDPWD
+The previous working directory as set by the
+.B cd
+command.
+.TP
+.B OPTARG
+The value of the last option argument processed by the
+.B getopts
+builtin command (see
+.SM
+.B SHELL BUILTIN COMMANDS
+below).
+.TP
+.B OPTIND
+The index of the next argument to be processed by the
+.B getopts
+builtin command (see
+.SM
+.B SHELL BUILTIN COMMANDS
+below).
+.TP
+.B OSTYPE
+Automatically set to a string that
+describes the operating system on which
+.B bash
+is executing.
+The default is system-dependent.
+.TP
+.B PIPESTATUS
+An array variable (see
+.B Arrays
+below) containing a list of exit status values from the processes
+in the most-recently-executed foreground pipeline (which may
+contain only a single command).
+.TP
+.B PPID
+The process ID of the shell's parent. This variable is readonly.
+.TP
+.B PWD
+The current working directory as set by the
+.B cd
+command.
+.TP
+.B RANDOM
+Each time this parameter is referenced, a random integer between
+0 and 32767 is
+generated. The sequence of random numbers may be initialized by assigning
+a value to
+.SM
+.BR RANDOM .
+If
+.SM
+.B RANDOM
+is unset, it loses its special properties, even if it is
+subsequently reset.
+.TP
+.B REPLY
+Set to the line of input read by the
+.B read
+builtin command when no arguments are supplied.
+.TP
+.B SECONDS
+Each time this parameter is
+referenced, the number of seconds since shell invocation is returned. If a
+value is assigned to
+.SM
+.BR SECONDS ,
+the value returned upon subsequent
+references is
+the number of seconds since the assignment plus the value assigned.
+If
+.SM
+.B SECONDS
+is unset, it loses its special properties, even if it is
+subsequently reset.
+.TP
+.B SHELLOPTS
+A colon-separated list of enabled shell options. Each word in
+the list is a valid argument for the
+.B \-o
+option to the
+.B set
+builtin command (see
+.SM
+.B "SHELL BUILTIN COMMANDS"
+below). The options appearing in
+.SM
+.B SHELLOPTS
+are those reported as
+.I on
+by \fBset \-o\fP.
+If this variable is in the environment when
+.B bash
+starts up, each shell option in the list will be enabled before
+reading any startup files.
+This variable is read-only.
+.TP
+.B SHLVL
+Incremented by one each time an instance of
+.B bash
+is started.
+.TP
+.B UID
+Expands to the user ID of the current user, initialized at shell startup.
+This variable is readonly.
+.PD
+.PP
+The following variables are used by the shell. In some cases,
+.B bash
+assigns a default value to a variable; these cases are noted
+below.
+.PP
+.PD 0
+.TP
+.B BASH_ENV
+If this parameter is set when \fBbash\fP is executing a shell script,
+its value is interpreted as a filename containing commands to
+initialize the shell, as in
+.IR ~/.bashrc .
+The value of
+.SM
+.B BASH_ENV
+is subjected to parameter expansion, command substitution, and arithmetic
+expansion before being interpreted as a file name.
+.SM
+.B PATH
+is not used to search for the resultant file name.
+.TP
+.B CDPATH
+The search path for the
+.B cd
+command.
+This is a colon-separated list of directories in which the shell looks
+for destination directories specified by the
+.B cd
+command.
+A sample value is
+.if t \f(CW".:~:/usr"\fP.
+.if n ".:~:/usr".
+.TP
+.B BASH_XTRACEFD
+If set to an integer corresponding to a valid file descriptor, \fBbash\fP
+will write the trace output generated when
+.if t \f(CWset -x\fP
+.if n \fIset -x\fP
+is enabled to that file descriptor.
+The file descriptor is closed when
+.SM
+.B BASH_XTRACEFD
+is unset or assigned a new value.
+Unsetting
+.SM
+.B BASH_XTRACEFD
+or assigning it the empty string causes the
+trace output to be sent to the standard error.
+Note that setting
+.SM
+.B BASH_XTRACEFD
+to 2 (the standard error file
+descriptor) and then unsetting it will result in the standard error
+being closed.
+.TP
+.B COLUMNS
+Used by the \fBselect\fP builtin command to determine the terminal width
+when printing selection lists. Automatically set upon receipt of a SIGWINCH.
+.TP
+.B COMPREPLY
+An array variable from which \fBbash\fP reads the possible completions
+generated by a shell function invoked by the programmable completion
+facility (see \fBProgrammable Completion\fP below).
+.TP
+.B EMACS
+If \fBbash\fP finds this variable in the environment when the shell starts
+with value
+.if t \f(CWt\fP,
+.if n "t",
+it assumes that the shell is running in an emacs shell buffer and disables
+line editing.
+.TP
+.B FCEDIT
+The default editor for the
+.B fc
+builtin command.
+.TP
+.B FIGNORE
+A colon-separated list of suffixes to ignore when performing
+filename completion (see
+.SM
+.B READLINE
+below).
+A filename whose suffix matches one of the entries in
+.SM
+.B FIGNORE
+is excluded from the list of matched filenames.
+A sample value is
+.if t \f(CW".o:~"\fP.
+.if n ".o:~".
+.TP
+.B GLOBIGNORE
+A colon-separated list of patterns defining the set of filenames to
+be ignored by pathname expansion.
+If a filename matched by a pathname expansion pattern also matches one
+of the patterns in
+.SM
+.BR GLOBIGNORE ,
+it is removed from the list of matches.
+.TP
+.B HISTCONTROL
+A colon-separated list of values controlling how commands are saved on
+the history list.
+If the list of values includes
+.IR ignorespace ,
+lines which begin with a
+.B space
+character are not saved in the history list.
+A value of
+.I ignoredups
+causes lines matching the previous history entry to not be saved.
+A value of
+.I ignoreboth
+is shorthand for \fIignorespace\fP and \fIignoredups\fP.
+A value of
+.IR erasedups
+causes all previous lines matching the current line to be removed from
+the history list before that line is saved.
+Any value not in the above list is ignored.
+If
+.SM
+.B HISTCONTROL
+is unset, or does not include a valid value,
+all lines read by the shell parser are saved on the history list,
+subject to the value of
+.SM
+.BR HISTIGNORE .
+The second and subsequent lines of a multi-line compound command are
+not tested, and are added to the history regardless of the value of
+.SM
+.BR HISTCONTROL .
+.TP
+.B HISTFILE
+The name of the file in which command history is saved (see
+.SM
+.B HISTORY
+below). The default value is \fI~/.bash_history\fP. If unset, the
+command history is not saved when an interactive shell exits.
+.TP
+.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
+writing it when an interactive shell exits.
+.TP
+.B HISTIGNORE
+A colon-separated list of patterns used to decide which command lines
+should be saved on the history list. Each pattern is anchored at the
+beginning of the line and must match the complete line (no implicit
+`\fB*\fP' is appended). Each pattern is tested against the line
+after the checks specified by
+.SM
+.B HISTCONTROL
+are applied.
+In addition to the normal shell pattern matching characters, `\fB&\fP'
+matches the previous history line. `\fB&\fP' may be escaped using a
+backslash; the backslash is removed before attempting a match.
+The second and subsequent lines of a multi-line compound command are
+not tested, and are added to the history regardless of the value of
+.SM
+.BR HISTIGNORE .
+.TP
+.B HISTSIZE
+The number of commands to remember in the command history (see
+.SM
+.B HISTORY
+below). The default value is 500.
+.TP
+.B HISTTIMEFORMAT
+If this variable is set and not null, its value is used as a format string
+for \fIstrftime\fP(3) to print the time stamp associated with each history
+entry displayed by the \fBhistory\fP builtin.
+If this variable is set, time stamps are written to the history file so
+they may be preserved across shell sessions.
+This uses the history comment character to distinguish timestamps from
+other history lines.
+.TP
+.B HOME
+The home directory of the current user; the default argument for the
+\fBcd\fP builtin command.
+The value of this variable is also used when performing tilde expansion.
+.TP
+.B HOSTFILE
+Contains the name of a file in the same format as
+.FN /etc/hosts
+that should be read when the shell needs to complete a
+hostname.
+The list of possible hostname completions may be changed while the
+shell is running;
+the next time hostname completion is attempted after the
+value is changed,
+.B bash
+adds the contents of the new file to the existing list.
+If
+.SM
+.B HOSTFILE
+is set, but has no value, or does not name a readable file,
+\fBbash\fP attempts to read
+.FN /etc/hosts
+to obtain the list of possible hostname completions.
+When
+.SM
+.B HOSTFILE
+is unset, the hostname list is cleared.
+.TP
+.B IFS
+The
+.I Internal Field Separator
+that is used
+for word splitting after expansion and to
+split lines into words with the
+.B read
+builtin command. The default value is
+``<space><tab><newline>''.
+.TP
+.B IGNOREEOF
+Controls the
+action of an interactive shell on receipt of an
+.SM
+.B EOF
+character as the sole input. If set, the value is the number of
+consecutive
+.SM
+.B EOF
+characters which must be
+typed as the first characters on an input line before
+.B bash
+exits. If the variable exists but does not have a numeric value, or
+has no value, the default value is 10. If it does not exist,
+.SM
+.B EOF
+signifies the end of input to the shell.
+.TP
+.B INPUTRC
+The filename for the
+.B readline
+startup file, overriding the default of
+.FN ~/.inputrc
+(see
+.SM
+.B READLINE
+below).
+.TP
+.B LANG
+Used to determine the locale category for any category not specifically
+selected with a variable starting with \fBLC_\fP.
+.TP
+.B LC_ALL
+This variable overrides the value of
+.SM
+.B LANG
+and any other
+\fBLC_\fP variable specifying a locale category.
+.TP
+.B LC_COLLATE
+This variable determines the collation order used when sorting the
+results of pathname expansion, and determines the behavior of range
+expressions, equivalence classes, and collating sequences within
+pathname expansion and pattern matching.
+.TP
+.B LC_CTYPE
+This variable determines the interpretation of characters and the
+behavior of character classes within pathname expansion and pattern
+matching.
+.TP
+.B LC_MESSAGES
+This variable determines the locale used to translate double-quoted
+strings preceded by a \fB$\fP.
+.TP
+.B LC_NUMERIC
+This variable determines the locale category used for number formatting.
+.TP
+.B LINES
+Used by the \fBselect\fP builtin command to determine the column length
+for printing selection lists. Automatically set upon receipt of a
+.SM
+.BR SIGWINCH .
+.TP
+.B MAIL
+If this parameter is set to a file name and the
+.SM
+.B MAILPATH
+variable is not set,
+.B bash
+informs the user of the arrival of mail in the specified file.
+.TP
+.B MAILCHECK
+Specifies how
+often (in seconds)
+.B bash
+checks for mail. The default is 60 seconds. When it is time to check
+for mail, the shell does so before displaying the primary prompt.
+If this variable is unset, or set to a value that is not a number
+greater than or equal to zero, the shell disables mail checking.
+.TP
+.B MAILPATH
+A colon-separated list of file names to be checked for mail.
+The message to be printed when mail arrives in a particular file
+may be specified by separating the file name from the message with a `?'.
+When used in the text of the message, \fB$_\fP expands to the name of
+the current mailfile.
+Example:
+.RS
+.PP
+\fBMAILPATH\fP=\(aq/var/mail/bfox?"You have mail":~/shell\-mail?"$_ has mail!"\(aq
+.PP
+.B Bash
+supplies a default value for this variable, but the location of the user
+mail files that it uses is system dependent (e.g., /var/mail/\fB$USER\fP).
+.RE
+.TP
+.B OPTERR
+If set to the value 1,
+.B bash
+displays error messages generated by the
+.B getopts
+builtin command (see
+.SM
+.B SHELL BUILTIN COMMANDS
+below).
+.SM
+.B OPTERR
+is initialized to 1 each time the shell is invoked or a shell
+script is executed.
+.TP
+.B PATH
+The search path for commands. It
+is a colon-separated list of directories in which
+the shell looks for commands (see
+.SM
+.B COMMAND EXECUTION
+below).
+A zero-length (null) directory name in the value of
+.SM
+.B PATH
+indicates the current directory.
+A null directory name may appear as two adjacent colons, or as an initial
+or trailing colon.
+The default path is system-dependent,
+and is set by the administrator who installs
+.BR bash .
+A common value is
+.if t \f(CW/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin\fP.
+.if n ``/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin''.
+.TP
+.B POSIXLY_CORRECT
+If this variable is in the environment when \fBbash\fP starts, the shell
+enters \fIposix mode\fP before reading the startup files, as if the
+.B \-\-posix
+invocation option had been supplied. If it is set while the shell is
+running, \fBbash\fP enables \fIposix mode\fP, as if the command
+.if t \f(CWset -o posix\fP
+.if n \fIset -o posix\fP
+had been executed.
+.TP
+.B PROMPT_COMMAND
+If set, the value is executed as a command prior to issuing each primary
+prompt.
+.TP
+.B PROMPT_DIRTRIM
+If set to a number greater than zero, the value is used as the number of
+trailing directory components to retain when expanding the \fB\ew\fP and
+\fB\eW\fP prompt string escapes (see
+.SM
+.B PROMPTING
+below). Characters removed are replaced with an ellipsis.
+.TP
+.B PS1
+The value of this parameter is expanded (see
+.SM
+.B PROMPTING
+below) and used as the primary prompt string. The default value is
+``\fB\es\-\ev\e$ \fP''.
+.TP
+.B PS2
+The value of this parameter is expanded as with
+.SM
+.B PS1
+and used as the secondary prompt string. The default is
+``\fB> \fP''.
+.TP
+.B PS3
+The value of this parameter is used as the prompt for the
+.B select
+command (see
+.SM
+.B SHELL GRAMMAR
+above).
+.TP
+.B PS4
+The value of this parameter is expanded as with
+.SM
+.B PS1
+and the value is printed before each command
+.B bash
+displays during an execution trace. The first character of
+.SM
+.B PS4
+is replicated multiple times, as necessary, to indicate multiple
+levels of indirection. The default is ``\fB+ \fP''.
+.TP
+.B SHELL
+The full pathname to the shell is kept in this environment variable.
+If it is not set when the shell starts,
+.B bash
+assigns to it the full pathname of the current user's login shell.
+.TP
+.B TIMEFORMAT
+The value of this parameter is used as a format string specifying
+how the timing information for pipelines prefixed with the
+.B time
+reserved word should be displayed.
+The \fB%\fP character introduces an escape sequence that is
+expanded to a time value or other information.
+The escape sequences and their meanings are as follows; the
+braces denote optional portions.
+.sp .5
+.RS
+.PD 0
+.TP 10
+.B %%
+A literal \fB%\fP.
+.TP
+.B %[\fIp\fP][l]R
+The elapsed time in seconds.
+.TP
+.B %[\fIp\fP][l]U
+The number of CPU seconds spent in user mode.
+.TP
+.B %[\fIp\fP][l]S
+The number of CPU seconds spent in system mode.
+.TP
+.B %P
+The CPU percentage, computed as (%U + %S) / %R.
+.PD
+.RE
+.IP
+The optional \fIp\fP is a digit specifying the \fIprecision\fP,
+the number of fractional digits after a decimal point.
+A value of 0 causes no decimal point or fraction to be output.
+At most three places after the decimal point may be specified;
+values of \fIp\fP greater than 3 are changed to 3.
+If \fIp\fP is not specified, the value 3 is used.
+.IP
+The optional \fBl\fP specifies a longer format, including
+minutes, of the form \fIMM\fPm\fISS\fP.\fIFF\fPs.
+The value of \fIp\fP determines whether or not the fraction is
+included.
+.IP
+If this variable is not set, \fBbash\fP acts as if it had the
+value \fB$\(aq\enreal\et%3lR\enuser\et%3lU\ensys\t%3lS\(aq\fP.
+If the value is null, no timing information is displayed.
+A trailing newline is added when the format string is displayed.
+.TP
+.B TMOUT
+If set to a value greater than zero,
+.SM
+.B TMOUT
+is treated as the
+default timeout for the \fBread\fP builtin.
+The \fBselect\fP command terminates if input does not arrive
+after
+.SM
+.B TMOUT
+seconds when input is coming from a terminal.
+In an interactive shell, the value is interpreted as the
+number of seconds to wait for input after issuing the primary prompt.
+.B Bash
+terminates after waiting for that number of seconds if input does
+not arrive.
+.TP
+.B TMPDIR
+If set, \fBBash\fP uses its value as the name of a directory in which
+\fBBash\fP creates temporary files for the shell's use.
+.TP
+.B auto_resume
+This variable controls how the shell interacts with the user and
+job control. If this variable is set, single word simple
+commands without redirections are treated as candidates for resumption
+of an existing stopped job. There is no ambiguity allowed; if there is
+more than one job beginning with the string typed, the job most recently
+accessed is selected. The
+.I name
+of a stopped job, in this context, is the command line used to
+start it.
+If set to the value
+.IR exact ,
+the string supplied must match the name of a stopped job exactly;
+if set to
+.IR substring ,
+the string supplied needs to match a substring of the name of a
+stopped job. The
+.I substring
+value provides functionality analogous to the
+.B %?
+job identifier (see
+.SM
+.B JOB CONTROL
+below). If set to any other value, the supplied string must
+be a prefix of a stopped job's name; this provides functionality
+analogous to the \fB%\fP\fIstring\fP job identifier.
+.TP
+.B histchars
+The two or three characters which control history expansion
+and tokenization (see
+.SM
+.B HISTORY EXPANSION
+below). The first character is the \fIhistory expansion\fP character,
+the character which signals the start of a history
+expansion, normally `\fB!\fP'.
+The second character is the \fIquick substitution\fP
+character, which is used as shorthand for re-running the previous
+command entered, substituting one string for another in the command.
+The default is `\fB^\fP'.
+The optional third character is the character
+which indicates that the remainder of the line is a comment when found
+as the first character of a word, normally `\fB#\fP'. The history
+comment character causes history substitution to be skipped for the
+remaining words on the line. It does not necessarily cause the shell
+parser to treat the rest of the line as a comment.
+.PD
+.SS Arrays
+.B Bash
+provides one-dimensional indexed and associative array variables.
+Any variable may be used as an indexed array; the
+.B declare
+builtin will explicitly declare an array.
+There is no maximum
+limit on the size of an array, nor any requirement that members
+be indexed or assigned contiguously.
+Indexed arrays are referenced using integers (including arithmetic
+expressions) and are zero-based; associative arrays are referenced
+using arbitrary strings.
+.PP
+An indexed array is created automatically if any variable is assigned to
+using the syntax \fIname\fP[\fIsubscript\fP]=\fIvalue\fP. The
+.I subscript
+is treated as an arithmetic expression that must evaluate to a number
+greater than or equal to zero. To explicitly declare an indexed array,
+use
+.B declare \-a \fIname\fP
+(see
+.SM
+.B SHELL BUILTIN COMMANDS
+below).
+.B declare \-a \fIname\fP[\fIsubscript\fP]
+is also accepted; the \fIsubscript\fP is ignored.
+.PP
+Associative arrays are created using
+.BR "declare \-A \fIname\fP" .
+.PP
+Attributes may be
+specified for an array variable using the
+.B declare
+and
+.B readonly
+builtins. Each attribute applies to all members of an array.
+.PP
+Arrays are assigned to using compound assignments of the form
+\fIname\fP=\fB(\fPvalue\fI1\fP ... value\fIn\fP\fB)\fP, where each
+\fIvalue\fP is of the form [\fIsubscript\fP]=\fIstring\fP.
+Indexed array assignments do not require the bracket and subscript.
+When assigning to indexed arrays, if the optional brackets and subscript
+are supplied, that index is assigned to;
+otherwise the index of the element assigned is the last index assigned
+to by the statement plus one. Indexing starts at zero.
+.PP
+When assigning to an associative array, the subscript is required.
+.PP
+This syntax is also accepted by the
+.B declare
+builtin. Individual array elements may be assigned to using the
+\fIname\fP[\fIsubscript\fP]=\fIvalue\fP syntax introduced above.
+.PP
+Any element of an array may be referenced using
+${\fIname\fP[\fIsubscript\fP]}. The braces are required to avoid
+conflicts with pathname expansion. If
+\fIsubscript\fP is \fB@\fP or \fB*\fP, the word expands to
+all members of \fIname\fP. These subscripts differ only when the
+word appears within double quotes. If the word is double-quoted,
+${\fIname\fP[*]} expands to a single
+word with the value of each array member separated by the first
+character of the
+.SM
+.B IFS
+special variable, and ${\fIname\fP[@]} expands each element of
+\fIname\fP to a separate word. When there are no array members,
+${\fIname\fP[@]} expands to nothing.
+If the double-quoted expansion occurs within a word, the expansion of
+the first parameter is joined with the beginning part of the original
+word, and the expansion of the last parameter is joined with the last
+part of the original word.
+This is analogous to the expansion
+of the special parameters \fB*\fP and \fB@\fP (see
+.B Special Parameters
+above). ${#\fIname\fP[\fIsubscript\fP]} expands to the length of
+${\fIname\fP[\fIsubscript\fP]}. If \fIsubscript\fP is \fB*\fP or
+\fB@\fP, the expansion is the number of elements in the array.
+Referencing an array variable without a subscript is equivalent to
+referencing the array with a subscript of 0.
+.PP
+An array variable is considered set if a subscript has been assigned a
+value. The null string is a valid value.
+.PP
+The
+.B unset
+builtin is used to destroy arrays. \fBunset\fP \fIname\fP[\fIsubscript\fP]
+destroys the array element at index \fIsubscript\fP.
+Care must be taken to avoid unwanted side effects caused by pathname
+expansion.
+\fBunset\fP \fIname\fP, where \fIname\fP is an array, or
+\fBunset\fP \fIname\fP[\fIsubscript\fP], where
+\fIsubscript\fP is \fB*\fP or \fB@\fP, removes the entire array.
+.PP
+The
+.BR declare ,
+.BR local ,
+and
+.B readonly
+builtins each accept a
+.B \-a
+option to specify an indexed array and a
+.B \-A
+option to specify an associative array.
+The
+.B read
+builtin accepts a
+.B \-a
+option to assign a list of words read from the standard input
+to an array. The
+.B set
+and
+.B declare
+builtins display array values in a way that allows them to be
+reused as assignments.
+.SH EXPANSION
+Expansion is performed on the command line after it has been split into
+words. There are seven kinds of expansion performed:
+.IR "brace expansion" ,
+.IR "tilde expansion" ,
+.IR "parameter and variable expansion" ,
+.IR "command substitution" ,
+.IR "arithmetic expansion" ,
+.IR "word splitting" ,
+and
+.IR "pathname expansion" .
+.PP
+The order of expansions is: brace expansion, tilde expansion,
+parameter, variable and arithmetic expansion and
+command substitution
+(done in a left-to-right fashion), word splitting, and pathname
+expansion.
+.PP
+On systems that can support it, there is an additional expansion
+available: \fIprocess substitution\fP.
+.PP
+Only brace expansion, word splitting, and pathname expansion
+can change the number of words of the expansion; other expansions
+expand a single word to a single word.
+The only exceptions to this are the expansions of
+"\fB$@\fP" and "\fB${\fP\fIname\fP\fB[@]}\fP"
+as explained above (see
+.SM
+.BR PARAMETERS ).
+.SS Brace Expansion
+.PP
+.I "Brace expansion"
+is a mechanism by which arbitrary strings
+may be generated. This mechanism is similar to
+\fIpathname expansion\fP, but the filenames generated
+need not exist. Patterns to be brace expanded take
+the form of an optional
+.IR preamble ,
+followed by either a series of comma-separated strings or
+a sequence expression between a pair of braces, followed by
+an optional
+.IR postscript .
+The preamble is prefixed to each string contained
+within the braces, and the postscript is then appended
+to each resulting string, expanding left to right.
+.PP
+Brace expansions may be nested. The results of each expanded
+string are not sorted; left to right order is preserved.
+For example, a\fB{\fPd,c,b\fB}\fPe expands into `ade ace abe'.
+.PP
+A sequence expression takes the form
+\fB{\fP\fIx\fP\fB..\fP\fIy\fP\fB[..\fP\fIincr\fP\fB]}\fP,
+where \fIx\fP and \fIy\fP are either integers or single characters,
+and \fIincr\fP, an optional increment, is an integer.
+When integers are supplied, the expression expands to each number between
+\fIx\fP and \fIy\fP, inclusive.
+Supplied integers may be prefixed with \fI0\fP to force each term to have the
+same width. When either \fIx\fP or \fPy\fP begins with a zero, the shell
+attempts to force all generated terms to contain the same number of digits,
+zero-padding where necessary.
+When characters are supplied, the expression expands to each character
+lexicographically between \fIx\fP and \fIy\fP, inclusive. Note that
+both \fIx\fP and \fIy\fP must be of the same type.
+When the increment is supplied, it is used as the difference between
+each term. The default increment is 1 or -1 as appropriate.
+.PP
+Brace expansion is performed before any other expansions,
+and any characters special to other expansions are preserved
+in the result. It is strictly textual.
+.B Bash
+does not apply any syntactic interpretation to the context of the
+expansion or the text between the braces.
+.PP
+A correctly-formed brace expansion must contain unquoted opening
+and closing braces, and at least one unquoted comma or a valid
+sequence expression.
+Any incorrectly formed brace expansion is left unchanged.
+A \fB{\fP or \fB,\fP may be quoted with a backslash to prevent its
+being considered part of a brace expression.
+To avoid conflicts with parameter expansion, the string \fB${\fP
+is not considered eligible for brace expansion.
+.PP
+This construct is typically used as shorthand when the common
+prefix of the strings to be generated is longer than in the
+above example:
+.RS
+.PP
+mkdir /usr/local/src/bash/{old,new,dist,bugs}
+.RE
+or
+.RS
+chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}
+.RE
+.PP
+Brace expansion introduces a slight incompatibility with
+historical versions of
+.BR sh .
+.B sh
+does not treat opening or closing braces specially when they
+appear as part of a word, and preserves them in the output.
+.B Bash
+removes braces from words as a consequence of brace
+expansion. For example, a word entered to
+.B sh
+as \fIfile{1,2}\fP
+appears identically in the output. The same word is
+output as
+.I file1 file2
+after expansion by
+.BR bash .
+If strict compatibility with
+.B sh
+is desired, start
+.B bash
+with the
+.B +B
+option or disable brace expansion with the
+.B +B
+option to the
+.B set
+command (see
+.SM
+.B SHELL BUILTIN COMMANDS
+below).
+.SS Tilde Expansion
+.PP
+If a word begins with an unquoted tilde character (`\fB~\fP'), all of
+the characters preceding the first unquoted slash (or all characters,
+if there is no unquoted slash) are considered a \fItilde-prefix\fP.
+If none of the characters in the tilde-prefix are quoted, the
+characters in the tilde-prefix following the tilde are treated as a
+possible \fIlogin name\fP.
+If this login name is the null string, the tilde is replaced with the
+value of the shell parameter
+.SM
+.BR HOME .
+If
+.SM
+.B HOME
+is unset, the home directory of the user executing the shell is
+substituted instead.
+Otherwise, the tilde-prefix is replaced with the home directory
+associated with the specified login name.
+.PP
+If the tilde-prefix is a `~+', the value of the shell variable
+.SM
+.B PWD
+replaces the tilde-prefix.
+If the tilde-prefix is a `~\-', the value of the shell variable
+.SM
+.BR OLDPWD ,
+if it is set, is substituted.
+If the characters following the tilde in the tilde-prefix consist
+of a number \fIN\fP, optionally prefixed
+by a `+' or a `\-', the tilde-prefix is replaced with the corresponding
+element from the directory stack, as it would be displayed by the
+.B dirs
+builtin invoked with the tilde-prefix as an argument.
+If the characters following the tilde in the tilde-prefix consist of a
+number without a leading `+' or `\-', `+' is assumed.
+.PP
+If the login name is invalid, or the tilde expansion fails, the word
+is unchanged.
+.PP
+Each variable assignment is checked for unquoted tilde-prefixes immediately
+following a
+.B :
+or the first
+.BR = .
+In these cases, tilde expansion is also performed.
+Consequently, one may use file names with tildes in assignments to
+.SM
+.BR PATH ,
+.SM
+.BR MAILPATH ,
+and
+.SM
+.BR CDPATH ,
+and the shell assigns the expanded value.
+.SS Parameter Expansion
+.PP
+The `\fB$\fP' character introduces parameter expansion,
+command substitution, or arithmetic expansion. The parameter name
+or symbol to be expanded may be enclosed in braces, which
+are optional but serve to protect the variable to be expanded from
+characters immediately following it which could be
+interpreted as part of the name.
+.PP
+When braces are used, the matching ending brace is the first `\fB}\fP'
+not escaped by a backslash or within a quoted string, and not within an
+embedded arithmetic expansion, command substitution, or parameter
+expansion.
+.PP
+.PD 0
+.TP
+${\fIparameter\fP}
+The value of \fIparameter\fP is substituted. The braces are required
+when
+.I parameter
+is a positional parameter with more than one digit,
+or when
+.I parameter
+is followed by a character which is not to be
+interpreted as part of its name.
+.PD
+.PP
+If the first character of \fIparameter\fP is an exclamation point (\fB!\fP),
+a level of variable indirection is introduced.
+\fBBash\fP uses the value of the variable formed from the rest of
+\fIparameter\fP as the name of the variable; this variable is then
+expanded and that value is used in the rest of the substitution, rather
+than the value of \fIparameter\fP itself.
+This is known as \fIindirect expansion\fP.
+The exceptions to this are the expansions of ${!\fIprefix\fP*} and
+${\fB!\fP\fIname\fP[\fI@\fP]} described below.
+The exclamation point must immediately follow the left brace in order to
+introduce indirection.
+.PP
+In each of the cases below, \fIword\fP is subject to tilde expansion,
+parameter expansion, command substitution, and arithmetic expansion.
+.PP
+When not performing substring expansion, using the forms documented below,
+\fBbash\fP tests for a parameter that is unset or null. Omitting the colon
+results in a test only for a parameter that is unset.
+.PP
+.PD 0
+.TP
+${\fIparameter\fP\fB:\-\fP\fIword\fP}
+\fBUse Default Values\fP. If
+.I parameter
+is unset or null, the expansion of
+.I word
+is substituted. Otherwise, the value of
+.I parameter
+is substituted.
+.TP
+${\fIparameter\fP\fB:=\fP\fIword\fP}
+\fBAssign Default Values\fP.
+If
+.I parameter
+is unset or null, the expansion of
+.I word
+is assigned to
+.IR parameter .
+The value of
+.I parameter
+is then substituted. Positional parameters and special parameters may
+not be assigned to in this way.
+.TP
+${\fIparameter\fP\fB:?\fP\fIword\fP}
+\fBDisplay Error if Null or Unset\fP.
+If
+.I parameter
+is null or unset, the expansion of \fIword\fP (or a message to that effect
+if
+.I word
+is not present) is written to the standard error and the shell, if it
+is not interactive, exits. Otherwise, the value of \fIparameter\fP is
+substituted.
+.TP
+${\fIparameter\fP\fB:+\fP\fIword\fP}
+\fBUse Alternate Value\fP.
+If
+.I parameter
+is null or unset, nothing is substituted, otherwise the expansion of
+.I word
+is substituted.
+.TP
+${\fIparameter\fP\fB:\fP\fIoffset\fP}
+.PD 0
+.TP
+${\fIparameter\fP\fB:\fP\fIoffset\fP\fB:\fP\fIlength\fP}
+.PD
+\fBSubstring Expansion.\fP
+Expands to up to \fIlength\fP characters of \fIparameter\fP
+starting at the character specified by \fIoffset\fP.
+If \fIlength\fP is omitted, expands to the substring of
+\fIparameter\fP starting at the character specified by \fIoffset\fP.
+\fIlength\fP and \fIoffset\fP are arithmetic expressions (see
+.SM
+.B
+ARITHMETIC EVALUATION
+below).
+\fIlength\fP must evaluate to a number greater than or equal to zero.
+If \fIoffset\fP evaluates to a number less than zero, the value
+is used as an offset from the end of the value of \fIparameter\fP.
+If \fIparameter\fP is \fB@\fP, the result is \fIlength\fP positional
+parameters beginning at \fIoffset\fP.
+If \fIparameter\fP is an indexed array name subscripted by @ or *,
+the result is the \fIlength\fP
+members of the array beginning with ${\fIparameter\fP[\fIoffset\fP]}.
+A negative \fIoffset\fP is taken relative to one greater than the maximum
+index of the specified array.
+Substring expansion applied to an associative array produces undefined
+results.
+Note that a negative offset must be separated from the colon by at least
+one space to avoid being confused with the :- expansion.
+Substring indexing is zero-based unless the positional parameters
+are used, in which case the indexing starts at 1 by default.
+If \fIoffset\fP is 0, and the positional parameters are used, \fB$0\fP is
+prefixed to the list.
+.TP
+${\fB!\fP\fIprefix\fP\fB*\fP}
+.PD 0
+.TP
+${\fB!\fP\fIprefix\fP\fB@\fP}
+.PD
+\fBNames matching prefix.\fP
+Expands to the names of variables whose names begin with \fIprefix\fP,
+separated by the first character of the
+.SM
+.B IFS
+special variable.
+When \fI@\fP is used and the expansion appears within double quotes, each
+variable name expands to a separate word.
+.TP
+${\fB!\fP\fIname\fP[\fI@\fP]}
+.PD 0
+.TP
+${\fB!\fP\fIname\fP[\fI*\fP]}
+.PD
+\fBList of array keys.\fP
+If \fIname\fP is an array variable, expands to the list of array indices
+(keys) assigned in \fIname\fP.
+If \fIname\fP is not an array, expands to 0 if \fIname\fP is set and null
+otherwise.
+When \fI@\fP is used and the expansion appears within double quotes, each
+key expands to a separate word.
+.TP
+${\fB#\fP\fIparameter\fP}
+\fBParameter length.\fP
+The length in characters of the value of \fIparameter\fP is substituted.
+If
+.I parameter
+is
+.B *
+or
+.BR @ ,
+the value substituted is the number of positional parameters.
+If
+.I parameter
+is an array name subscripted by
+.B *
+or
+.BR @ ,
+the value substituted is the number of elements in the array.
+.TP
+${\fIparameter\fP\fB#\fP\fIword\fP}
+.PD 0
+.TP
+${\fIparameter\fP\fB##\fP\fIword\fP}
+.PD
+\fBRemove matching prefix pattern.\fP
+The
+.I word
+is expanded to produce a pattern just as in pathname
+expansion. If the pattern matches the beginning of
+the value of
+.IR parameter ,
+then the result of the expansion is the expanded value of
+.I parameter
+with the shortest matching pattern (the ``\fB#\fP'' case) or the
+longest matching pattern (the ``\fB##\fP'' case) deleted.
+If
+.I parameter
+is
+.B @
+or
+.BR * ,
+the pattern removal operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If
+.I parameter
+is an array variable subscripted with
+.B @
+or
+.BR * ,
+the pattern removal operation is applied to each member of the
+array in turn, and the expansion is the resultant list.
+.TP
+${\fIparameter\fP\fB%\fP\fIword\fP}
+.PD 0
+.TP
+${\fIparameter\fP\fB%%\fP\fIword\fP}
+.PD
+\fBRemove matching suffix pattern.\fP
+The \fIword\fP is expanded to produce a pattern just as in
+pathname expansion.
+If the pattern matches a trailing portion of the expanded value of
+.IR parameter ,
+then the result of the expansion is the expanded value of
+.I parameter
+with the shortest matching pattern (the ``\fB%\fP'' case) or the
+longest matching pattern (the ``\fB%%\fP'' case) deleted.
+If
+.I parameter
+is
+.B @
+or
+.BR * ,
+the pattern removal operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If
+.I parameter
+is an array variable subscripted with
+.B @
+or
+.BR * ,
+the pattern removal operation is applied to each member of the
+array in turn, and the expansion is the resultant list.
+.TP
+${\fIparameter\fP\fB/\fP\fIpattern\fP\fB/\fP\fIstring\fP}
+\fBPattern substitution.\fP
+The \fIpattern\fP is expanded to produce a pattern just as in
+pathname expansion.
+\fIParameter\fP is expanded and the longest match of \fIpattern\fP
+against its value is replaced with \fIstring\fP.
+If \fIpattern\fP begins with \fB/\fP, all matches of \fIpattern\fP are
+replaced with \fIstring\fP. Normally only the first match is replaced.
+If \fIpattern\fP begins with \fB#\fP, it must match at the beginning
+of the expanded value of \fIparameter\fP.
+If \fIpattern\fP begins with \fB%\fP, it must match at the end
+of the expanded value of \fIparameter\fP.
+If \fIstring\fP is null, matches of \fIpattern\fP are deleted
+and the \fB/\fP following \fIpattern\fP may be omitted.
+If
+.I parameter
+is
+.B @
+or
+.BR * ,
+the substitution operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If
+.I parameter
+is an array variable subscripted with
+.B @
+or
+.BR * ,
+the substitution operation is applied to each member of the
+array in turn, and the expansion is the resultant list.
+.TP
+${\fIparameter\fP\fB^\fP\fIpattern\fP}
+.PD 0
+.TP
+${\fIparameter\fP\fB^^\fP\fIpattern\fP}
+.TP
+${\fIparameter\fP\fB,\fP\fIpattern\fP}
+.TP
+${\fIparameter\fP\fB,,\fP\fIpattern\fP}
+.PD
+\fBCase modification.\fP
+This expansion modifies the case of alphabetic characters in \fIparameter\fP.
+The \fIpattern\fP is expanded to produce a pattern just as in
+pathname expansion.
+The \fB^\fP operator converts lowercase letters matching \fIpattern\fP
+to uppercase; the \fB,\fP operator converts matching uppercase letters
+to lowercase.
+The \fB^^\fP and \fB,,\fP expansions convert each matched character in the
+expanded value; the \fB^\fP and \fB,\fP expansions match and convert only
+the first character in the expanded value..
+If \fIpattern\fP is omitted, it is treated like a \fB?\fP, which matches
+every character.
+If
+.I parameter
+is
+.B @
+or
+.BR * ,
+the case modification operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If
+.I parameter
+is an array variable subscripted with
+.B @
+or
+.BR * ,
+the case modification operation is applied to each member of the
+array in turn, and the expansion is the resultant list.
+.SS Command Substitution
+.PP
+\fICommand substitution\fP allows the output of a command to replace
+the command name. There are two forms:
+.PP
+.RS
+.PP
+\fB$(\fP\fIcommand\fP\|\fB)\fP
+.RE
+or
+.RS
+\fB\`\fP\fIcommand\fP\fB\`\fP
+.RE
+.PP
+.B Bash
+performs the expansion by executing \fIcommand\fP and
+replacing the command substitution with the standard output of the
+command, with any trailing newlines deleted.
+Embedded newlines are not deleted, but they may be removed during
+word splitting.
+The command substitution \fB$(cat \fIfile\fP)\fR can be replaced by
+the equivalent but faster \fB$(< \fIfile\fP)\fR.
+.PP
+When the old-style backquote form of substitution is used,
+backslash retains its literal meaning except when followed by
+.BR $ ,
+.BR \` ,
+or
+.BR \e .
+The first backquote not preceded by a backslash terminates the
+command substitution.
+When using the $(\^\fIcommand\fP\|) form, all characters between the
+parentheses make up the command; none are treated specially.
+.PP
+Command substitutions may be nested. To nest when using the backquoted form,
+escape the inner backquotes with backslashes.
+.PP
+If the substitution appears within double quotes, word splitting and
+pathname expansion are not performed on the results.
+.SS Arithmetic Expansion
+.PP
+Arithmetic expansion allows the evaluation of an arithmetic expression
+and the substitution of the result. The format for arithmetic expansion is:
+.RS
+.PP
+\fB$((\fP\fIexpression\fP\fB))\fP
+.RE
+.PP
+The
+.I expression
+is treated as if it were within double quotes, but a double quote
+inside the parentheses is not treated specially.
+All tokens in the expression undergo parameter expansion, string
+expansion, command substitution, and quote removal.
+Arithmetic expansions may be nested.
+.PP
+The evaluation is performed according to the rules listed below under
+.SM
+.BR "ARITHMETIC EVALUATION" .
+If
+.I expression
+is invalid,
+.B bash
+prints a message indicating failure and no substitution occurs.
+.SS Process Substitution
+.PP
+\fIProcess substitution\fP is supported on systems that support named
+pipes (\fIFIFOs\fP) or the \fB/dev/fd\fP method of naming open files.
+It takes the form of
+\fB<(\fP\fIlist\^\fP\fB)\fP
+or
+\fB>(\fP\fIlist\^\fP\fB)\fP.
+The process \fIlist\fP is run with its input or output connected to a
+\fIFIFO\fP or some file in \fB/dev/fd\fP. The name of this file is
+passed as an argument to the current command as the result of the
+expansion. If the \fB>(\fP\fIlist\^\fP\fB)\fP form is used, writing to
+the file will provide input for \fIlist\fP. If the
+\fB<(\fP\fIlist\^\fP\fB)\fP form is used, the file passed as an
+argument should be read to obtain the output of \fIlist\fP.
+.PP
+When available, process substitution is performed
+simultaneously with parameter and variable expansion,
+command substitution,
+and arithmetic expansion.
+.SS Word Splitting
+.PP
+The shell scans the results of
+parameter expansion,
+command substitution,
+and
+arithmetic expansion
+that did not occur within double quotes for
+.IR "word splitting" .
+.PP
+The shell treats each character of
+.SM
+.B IFS
+as a delimiter, and splits the results of the other
+expansions into words on these characters. If
+.SM
+.B IFS
+is unset, or its
+value is exactly
+.BR <space><tab><newline> ,
+the default, then
+sequences of
+.BR <space> ,
+.BR <tab> ,
+and
+.B <newline>
+at the beginning and end of the results of the previous
+expansions are ignored, and
+any sequence of
+.SM
+.B IFS
+characters not at the beginning or end serves to delimit words.
+If
+.SM
+.B IFS
+has a value other than the default, then sequences of
+the whitespace characters
+.B space
+and
+.B tab
+are ignored at the beginning and end of the
+word, as long as the whitespace character is in the
+value of
+.SM
+.BR IFS
+(an
+.SM
+.B IFS
+whitespace character).
+Any character in
+.SM
+.B IFS
+that is not
+.SM
+.B IFS
+whitespace, along with any adjacent
+.SM
+.B IFS
+whitespace characters, delimits a field.
+A sequence of
+.SM
+.B IFS
+whitespace characters is also treated as a delimiter.
+If the value of
+.SM
+.B IFS
+is null, no word splitting occurs.
+.PP
+Explicit null arguments (\^\f3"\^"\fP or \^\f3\(aq\^\(aq\fP\^) are retained.
+Unquoted implicit null arguments, resulting from the expansion of
+parameters that have no values, are removed.
+If a parameter with no value is expanded within double quotes, a
+null argument results and is retained.
+.PP
+Note that if no expansion occurs, no splitting
+is performed.
+.SS Pathname Expansion
+.PP
+After word splitting,
+unless the
+.B \-f
+option has been set,
+.B bash
+scans each word for the characters
+.BR * ,
+.BR ? ,
+and
+.BR [ .
+If one of these characters appears, then the word is
+regarded as a
+.IR pattern ,
+and replaced with an alphabetically sorted list of
+file names matching the pattern.
+If no matching file names are found,
+and the shell option
+.B nullglob
+is not enabled, the word is left unchanged.
+If the
+.B nullglob
+option is set, and no matches are found,
+the word is removed.
+If the
+.B failglob
+shell option is set, and no matches are found, an error message
+is printed and the command is not executed.
+If the shell option
+.B nocaseglob
+is enabled, the match is performed without regard to the case
+of alphabetic characters.
+When a pattern is used for pathname expansion,
+the character
+.B ``.''
+at the start of a name or immediately following a slash
+must be matched explicitly, unless the shell option
+.B dotglob
+is set.
+When matching a pathname, the slash character must always be
+matched explicitly.
+In other cases, the
+.B ``.''
+character is not treated specially.
+See the description of
+.B shopt
+below under
+.SM
+.B SHELL BUILTIN COMMANDS
+for a description of the
+.BR nocaseglob ,
+.BR nullglob ,
+.BR failglob ,
+and
+.B dotglob
+shell options.
+.PP
+The
+.SM
+.B GLOBIGNORE
+shell variable may be used to restrict the set of file names matching a
+.IR pattern .
+If
+.SM
+.B GLOBIGNORE
+is set, each matching file name that also matches one of the patterns in
+.SM
+.B GLOBIGNORE
+is removed from the list of matches.
+The file names
+.B ``.''
+and
+.B ``..''
+are always ignored when
+.SM
+.B GLOBIGNORE
+is set and not null. However, setting
+.SM
+.B GLOBIGNORE
+to a non-null value has the effect of enabling the
+.B dotglob
+shell option, so all other file names beginning with a
+.B ``.''
+will match.
+To get the old behavior of ignoring file names beginning with a
+.BR ``.'' ,
+make
+.B ``.*''
+one of the patterns in
+.SM
+.BR GLOBIGNORE .
+The
+.B dotglob
+option is disabled when
+.SM
+.B GLOBIGNORE
+is unset.
+.PP
+\fBPattern Matching\fP
+.PP
+Any character that appears in a pattern, other than the special pattern
+characters described below, matches itself. The NUL character may not
+occur in a pattern. A backslash escapes the following character; the
+escaping backslash is discarded when matching.
+The special pattern characters must be quoted if
+they are to be matched literally.
+.PP
+The special pattern characters have the following meanings:
+.PP
+.PD 0
+.TP
+.B *
+Matches any string, including the null string.
+When the \fBglobstar\fP shell option is enabled, and \fB*\fP is used in
+a pathname expansion context, two adjacent \fB*\fPs used as a single
+pattern will match all files and zero or more directories and
+subdirectories.
+If followed by a \fB/\fP, two adjacent \fB*\fPs will match only directories
+and subdirectories.
+.TP
+.B ?
+Matches any single character.
+.TP
+.B [...]
+Matches any one of the enclosed characters. A pair of characters
+separated by a hyphen denotes a
+\fIrange expression\fP;
+any character that sorts between those two characters, inclusive,
+using the current locale's collating sequence and character set,
+is matched. If the first character following the
+.B [
+is a
+.B !
+or a
+.B ^
+then any character not enclosed is matched.
+The sorting order of characters in range expressions is determined by
+the current locale and the value of the
+.SM
+.B LC_COLLATE
+shell variable,
+if set.
+A
+.B \-
+may be matched by including it as the first or last character
+in the set.
+A
+.B ]
+may be matched by including it as the first character
+in the set.
+.br
+.if t .sp 0.5
+.if n .sp 1
+Within
+.B [
+and
+.BR ] ,
+\fIcharacter classes\fP can be specified using the syntax
+\fB[:\fP\fIclass\fP\fB:]\fP, where \fIclass\fP is one of the
+following classes defined in the POSIX standard:
+.PP
+.RS
+.B
+.if n alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit
+.if t alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit
+.br
+A character class matches any character belonging to that class.
+The \fBword\fP character class matches letters, digits, and the character _.
+.br
+.if t .sp 0.5
+.if n .sp 1
+Within
+.B [
+and
+.BR ] ,
+an \fIequivalence class\fP can be specified using the syntax
+\fB[=\fP\fIc\fP\fB=]\fP, which matches all characters with the
+same collation weight (as defined by the current locale) as
+the character \fIc\fP.
+.br
+.if t .sp 0.5
+.if n .sp 1
+Within
+.B [
+and
+.BR ] ,
+the syntax \fB[.\fP\fIsymbol\fP\fB.]\fP matches the collating symbol
+\fIsymbol\fP.
+.RE
+.PD
+.PP
+If the \fBextglob\fP shell option is enabled using the \fBshopt\fP
+builtin, several extended pattern matching operators are recognized.
+In the following description, a \fIpattern-list\fP is a list of one
+or more patterns separated by a \fB|\fP.
+Composite patterns may be formed using one or more of the following
+sub-patterns:
+.sp 1
+.PD 0
+.RS
+.TP
+\fB?(\fP\^\fIpattern-list\^\fP\fB)\fP
+Matches zero or one occurrence of the given patterns
+.TP
+\fB*(\fP\^\fIpattern-list\^\fP\fB)\fP
+Matches zero or more occurrences of the given patterns
+.TP
+\fB+(\fP\^\fIpattern-list\^\fP\fB)\fP
+Matches one or more occurrences of the given patterns
+.TP
+\fB@(\fP\^\fIpattern-list\^\fP\fB)\fP
+Matches one of the given patterns
+.TP
+\fB!(\fP\^\fIpattern-list\^\fP\fB)\fP
+Matches anything except one of the given patterns
+.RE
+.PD
+.SS Quote Removal
+.PP
+After the preceding expansions, all unquoted occurrences of the
+characters
+.BR \e ,
+.BR \(aq ,
+and \^\f3"\fP\^ that did not result from one of the above
+expansions are removed.
+.SH REDIRECTION
+Before a command is executed, its input and output
+may be
+.I redirected
+using a special notation interpreted by the shell.
+Redirection may also be used to open and close files for the
+current shell execution environment. The following redirection
+operators may precede or appear anywhere within a
+.I simple command
+or may follow a
+.IR command .
+Redirections are processed in the order they appear, from
+left to right.
+.PP
+Each redirection that may be preceded by a file descriptor number
+may instead be preceded by a word of the form {\fIvarname\fP}.
+In this case, for each redirection operator except
+>&- and <&-, the shell will allocate a file descriptor greater
+than 10 and assign it to \fIvarname\fP. If >&- or <&- is preceded
+by {\fIvarname\fP}, the value of \fIvarname\fP defines the file
+descriptor to close.
+.PP
+In the following descriptions, if the file descriptor number is
+omitted, and the first character of the redirection operator is
+.BR < ,
+the redirection refers to the standard input (file descriptor
+0). If the first character of the redirection operator is
+.BR > ,
+the redirection refers to the standard output (file descriptor
+1).
+.PP
+The word following the redirection operator in the following
+descriptions, unless otherwise noted, is subjected to brace expansion,
+tilde expansion, parameter expansion, command substitution, arithmetic
+expansion, quote removal, pathname expansion, and word splitting.
+If it expands to more than one word,
+.B bash
+reports an error.
+.PP
+Note that the order of redirections is significant. For example,
+the command
+.RS
+.PP
+ls \fB>\fP dirlist 2\fB>&\fP1
+.RE
+.PP
+directs both standard output and standard error to the file
+.IR dirlist ,
+while the command
+.RS
+.PP
+ls 2\fB>&\fP1 \fB>\fP dirlist
+.RE
+.PP
+directs only the standard output to file
+.IR dirlist ,
+because the standard error was duplicated from the standard output
+before the standard output was redirected to
+.IR dirlist .
+.PP
+\fBBash\fP handles several filenames specially when they are used in
+redirections, as described in the following table:
+.RS
+.PP
+.PD 0
+.TP
+.B /dev/fd/\fIfd\fP
+If \fIfd\fP is a valid integer, file descriptor \fIfd\fP is duplicated.
+.TP
+.B /dev/stdin
+File descriptor 0 is duplicated.
+.TP
+.B /dev/stdout
+File descriptor 1 is duplicated.
+.TP
+.B /dev/stderr
+File descriptor 2 is duplicated.
+.TP
+.B /dev/tcp/\fIhost\fP/\fIport\fP
+If \fIhost\fP is a valid hostname or Internet address, and \fIport\fP
+is an integer port number or service name, \fBbash\fP attempts to open
+a TCP connection to the corresponding socket.
+.TP
+.B /dev/udp/\fIhost\fP/\fIport\fP
+If \fIhost\fP is a valid hostname or Internet address, and \fIport\fP
+is an integer port number or service name, \fBbash\fP attempts to open
+a UDP connection to the corresponding socket.
+.PD
+.RE
+.PP
+A failure to open or create a file causes the redirection to fail.
+.PP
+Redirections using file descriptors greater than 9 should be used with
+care, as they may conflict with file descriptors the shell uses
+internally.
+.SS Redirecting Input
+.PP
+Redirection of input causes the file whose name results from
+the expansion of
+.I word
+to be opened for reading on file descriptor
+.IR n ,
+or the standard input (file descriptor 0) if
+.I n
+is not specified.
+.PP
+The general format for redirecting input is:
+.RS
+.PP
+[\fIn\fP]\fB<\fP\fIword\fP
+.RE
+.SS Redirecting Output
+.PP
+Redirection of output causes the file whose name results from
+the expansion of
+.I word
+to be opened for writing on file descriptor
+.IR n ,
+or the standard output (file descriptor 1) if
+.I n
+is not specified. If the file does not exist it is created;
+if it does exist it is truncated to zero size.
+.PP
+The general format for redirecting output is:
+.RS
+.PP
+[\fIn\fP]\fB>\fP\fIword\fP
+.RE
+.PP
+If the redirection operator is
+.BR > ,
+and the
+.B noclobber
+option to the
+.B set
+builtin has been enabled, the redirection will fail if the file
+whose name results from the expansion of \fIword\fP exists and is
+a regular file.
+If the redirection operator is
+.BR >| ,
+or the redirection operator is
+.B >
+and the
+.B noclobber
+option to the
+.B set
+builtin command is not enabled, the redirection is attempted even
+if the file named by \fIword\fP exists.
+.SS Appending Redirected Output
+.PP
+Redirection of output in this fashion
+causes the file whose name results from
+the expansion of
+.I word
+to be opened for appending on file descriptor
+.IR n ,
+or the standard output (file descriptor 1) if
+.I n
+is not specified. If the file does not exist it is created.
+.PP
+The general format for appending output is:
+.RS
+.PP
+[\fIn\fP]\fB>>\fP\fIword\fP
+.RE
+.PP
+.SS Redirecting Standard Output and Standard Error
+.PP
+This construct allows both the
+standard output (file descriptor 1) and
+the standard error output (file descriptor 2)
+to be redirected to the file whose name is the
+expansion of
+.IR word .
+.PP
+There are two formats for redirecting standard output and
+standard error:
+.RS
+.PP
+\fB&>\fP\fIword\fP
+.RE
+and
+.RS
+\fB>&\fP\fIword\fP
+.RE
+.PP
+Of the two forms, the first is preferred.
+This is semantically equivalent to
+.RS
+.PP
+\fB>\fP\fIword\fP 2\fB>&\fP1
+.RE
+.PP
+.SS Appending Standard Output and Standard Error
+.PP
+This construct allows both the
+standard output (file descriptor 1) and
+the standard error output (file descriptor 2)
+to be appended to the file whose name is the
+expansion of
+.IR word .
+.PP
+The format for appending standard output and standard error is:
+.RS
+.PP
+\fB&>>\fP\fIword\fP
+.RE
+.PP
+This is semantically equivalent to
+.RS
+.PP
+\fB>>\fP\fIword\fP 2\fB>&\fP1
+.RE
+.SS Here Documents
+.PP
+This type of redirection instructs the shell to read input from the
+current source until a line containing only
+.I delimiter
+(with no trailing blanks)
+is seen. All of
+the lines read up to that point are then used as the standard
+input for a command.
+.PP
+The format of here-documents is:
+.RS
+.PP
+.nf
+\fB<<\fP[\fB\-\fP]\fIword\fP
+ \fIhere-document\fP
+\fIdelimiter\fP
+.fi
+.RE
+.PP
+No parameter expansion, command substitution, arithmetic expansion,
+or pathname expansion is performed on
+.IR word .
+If any characters in
+.I word
+are quoted, the
+.I delimiter
+is the result of quote removal on
+.IR word ,
+and the lines in the here-document are not expanded.
+If \fIword\fP is unquoted,
+all lines of the here-document are subjected to parameter expansion,
+command substitution, and arithmetic expansion. In the latter
+case, the character sequence
+.B \e<newline>
+is ignored, and
+.B \e
+must be used to quote the characters
+.BR \e ,
+.BR $ ,
+and
+.BR \` .
+.PP
+If the redirection operator is
+.BR <<\- ,
+then all leading tab characters are stripped from input lines and the
+line containing
+.IR delimiter .
+This allows
+here-documents within shell scripts to be indented in a
+natural fashion.
+.SS "Here Strings"
+A variant of here documents, the format is:
+.RS
+.PP
+.nf
+\fB<<<\fP\fIword\fP
+.fi
+.RE
+.PP
+The \fIword\fP is expanded and supplied to the command on its standard
+input.
+.SS "Duplicating File Descriptors"
+.PP
+The redirection operator
+.RS
+.PP
+[\fIn\fP]\fB<&\fP\fIword\fP
+.RE
+.PP
+is used to duplicate input file descriptors.
+If
+.I word
+expands to one or more digits, the file descriptor denoted by
+.I n
+is made to be a copy of that file descriptor.
+If the digits in
+.I word
+do not specify a file descriptor open for input, a redirection error occurs.
+If
+.I word
+evaluates to
+.BR \- ,
+file descriptor
+.I n
+is closed. If
+.I n
+is not specified, the standard input (file descriptor 0) is used.
+.PP
+The operator
+.RS
+.PP
+[\fIn\fP]\fB>&\fP\fIword\fP
+.RE
+.PP
+is used similarly to duplicate output file descriptors. If
+.I n
+is not specified, the standard output (file descriptor 1) is used.
+If the digits in
+.I word
+do not specify a file descriptor open for output, a redirection error occurs.
+As a special case, if \fIn\fP is omitted, and \fIword\fP does not
+expand to one or more digits, the standard output and standard
+error are redirected as described previously.
+.SS "Moving File Descriptors"
+.PP
+The redirection operator
+.RS
+.PP
+[\fIn\fP]\fB<&\fP\fIdigit\fP\fB\-\fP
+.RE
+.PP
+moves the file descriptor \fIdigit\fP to file descriptor
+.IR n ,
+or the standard input (file descriptor 0) if \fIn\fP is not specified.
+\fIdigit\fP is closed after being duplicated to \fIn\fP.
+.PP
+Similarly, the redirection operator
+.RS
+.PP
+[\fIn\fP]\fB>&\fP\fIdigit\fP\fB\-\fP
+.RE
+.PP
+moves the file descriptor \fIdigit\fP to file descriptor
+.IR n ,
+or the standard output (file descriptor 1) if \fIn\fP is not specified.
+.SS "Opening File Descriptors for Reading and Writing"
+.PP
+The redirection operator
+.RS
+.PP
+[\fIn\fP]\fB<>\fP\fIword\fP
+.RE
+.PP
+causes the file whose name is the expansion of
+.I word
+to be opened for both reading and writing on file descriptor
+.IR n ,
+or on file descriptor 0 if
+.I n
+is not specified. If the file does not exist, it is created.
+.SH ALIASES
+\fIAliases\fP allow a string to be substituted for a word when it is used
+as the first word of a simple command.
+The shell maintains a list of aliases that may be set and unset with the
+.B alias
+and
+.B unalias
+builtin commands (see
+.SM
+.B SHELL BUILTIN COMMANDS
+below).
+The first word of each simple command, if unquoted,
+is checked to see if it has an
+alias. If so, that word is replaced by the text of the alias.
+The characters \fB/\fP, \fB$\fP, \fB\`\fP, and \fB=\fP and
+any of the shell \fImetacharacters\fP or quoting characters
+listed above may not appear in an alias name.
+The replacement text may contain any valid shell input,
+including shell metacharacters.
+The first word of the replacement text is tested
+for aliases, but a word that is identical to an alias being expanded
+is not expanded a second time.
+This means that one may alias
+.B ls
+to
+.BR "ls \-F" ,
+for instance, and
+.B bash
+does not try to recursively expand the replacement text.
+If the last character of the alias value is a
+.IR blank ,
+then the next command
+word following the alias is also checked for alias expansion.
+.PP
+Aliases are created and listed with the
+.B alias
+command, and removed with the
+.B unalias
+command.
+.PP
+There is no mechanism for using arguments in the replacement text.
+If arguments are needed, a shell function should be used (see
+.SM
+.B FUNCTIONS
+below).
+.PP
+Aliases are not expanded when the shell is not interactive, unless
+the
+.B expand_aliases
+shell option is set using
+.B shopt
+(see the description of
+.B shopt
+under
+.SM
+\fBSHELL BUILTIN COMMANDS\fP
+below).
+.PP
+The rules concerning the definition and use of aliases are
+somewhat confusing.
+.B Bash
+always reads at least one complete line
+of input before executing any
+of the commands on that line. Aliases are expanded when a
+command is read, not when it is executed. Therefore, an
+alias definition appearing on the same line as another
+command does not take effect until the next line of input is read.
+The commands following the alias definition
+on that line are not affected by the new alias.
+This behavior is also an issue when functions are executed.
+Aliases are expanded when a function definition is read,
+not when the function is executed, because a function definition
+is itself a compound command. As a consequence, aliases
+defined in a function are not available until after that
+function is executed. To be safe, always put
+alias definitions on a separate line, and do not use
+.B alias
+in compound commands.
+.PP
+For almost every purpose, aliases are superseded by
+shell functions.
+.SH FUNCTIONS
+A shell function, defined as described above under
+.SM
+.BR "SHELL GRAMMAR" ,
+stores a series of commands for later execution.
+When the name of a shell function is used as a simple command name,
+the list of commands associated with that function name is executed.
+Functions are executed in the context of the
+current shell; no new process is created to interpret
+them (contrast this with the execution of a shell script).
+When a function is executed, the arguments to the
+function become the positional parameters
+during its execution.
+The special parameter
+.B #
+is updated to reflect the change. Special parameter 0
+is unchanged.
+The first element of the
+.SM
+.B FUNCNAME
+variable is set to the name of the function while the function
+is executing.
+.PP
+All other aspects of the shell execution
+environment are identical between a function and its caller
+with these exceptions: the
+.SM
+.B DEBUG
+and
+.B RETURN
+traps (see the description of the
+.B trap
+builtin under
+.SM
+.B SHELL BUILTIN COMMANDS
+below) are not inherited unless the function has been given the
+\fBtrace\fP attribute (see the description of the
+.SM
+.B declare
+builtin below) or the
+\fB\-o functrace\fP shell option has been enabled with
+the \fBset\fP builtin
+(in which case all functions inherit the \fBDEBUG\fP and \fBRETURN\fP traps),
+and the
+.SM
+.B ERR
+trap is not inherited unless the \fB\-o errtrace\fP shell option has
+been enabled.
+.PP
+Variables local to the function may be declared with the
+.B local
+builtin command. Ordinarily, variables and their values
+are shared between the function and its caller.
+.PP
+If the builtin command
+.B return
+is executed in a function, the function completes and
+execution resumes with the next command after the function
+call.
+Any command associated with the \fBRETURN\fP trap is executed
+before execution resumes.
+When a function completes, the values of the
+positional parameters and the special parameter
+.B #
+are restored to the values they had prior to the function's
+execution.
+.PP
+Function names and definitions may be listed with the
+.B \-f
+option to the
+.B declare
+or
+.B typeset
+builtin commands. The
+.B \-F
+option to
+.B declare
+or
+.B typeset
+will list the function names only
+(and optionally the source file and line number, if the \fBextdebug\fP
+shell option is enabled).
+Functions may be exported so that subshells
+automatically have them defined with the
+.B \-f
+option to the
+.B export
+builtin.
+A function definition may be deleted using the \fB\-f\fP option to
+the
+.B unset
+builtin.
+Note that shell functions and variables with the same name may result
+in multiple identically-named entries in the environment passed to the
+shell's children.
+Care should be taken in cases where this may cause a problem.
+.PP
+Functions may be recursive. No limit is imposed on the number
+of recursive calls.
+.SH "ARITHMETIC EVALUATION"
+The shell allows arithmetic expressions to be evaluated, under
+certain circumstances (see the \fBlet\fP and \fBdeclare\fP builtin
+commands and \fBArithmetic Expansion\fP).
+Evaluation is done in fixed-width integers with no check for overflow,
+though division by 0 is trapped and flagged as an error.
+The operators and their precedence, associativity, and values
+are the same as in the C language.
+The following list of operators is grouped into levels of
+equal-precedence operators.
+The levels are listed in order of decreasing precedence.
+.PP
+.PD 0
+.TP
+.B \fIid\fP++ \fIid\fP\-\-
+variable post-increment and post-decrement
+.TP
+.B ++\fIid\fP \-\-\fIid\fP
+variable pre-increment and pre-decrement
+.TP
+.B \- +
+unary minus and plus
+.TP
+.B ! ~
+logical and bitwise negation
+.TP
+.B **
+exponentiation
+.TP
+.B * / %
+multiplication, division, remainder
+.TP
+.B + \-
+addition, subtraction
+.TP
+.B << >>
+left and right bitwise shifts
+.TP
+.B <= >= < >
+comparison
+.TP
+.B == !=
+equality and inequality
+.TP
+.B &
+bitwise AND
+.TP
+.B ^
+bitwise exclusive OR
+.TP
+.B |
+bitwise OR
+.TP
+.B &&
+logical AND
+.TP
+.B ||
+logical OR
+.TP
+.B \fIexpr\fP?\fIexpr\fP:\fIexpr\fP
+conditional operator
+.TP
+.B = *= /= %= += \-= <<= >>= &= ^= |=
+assignment
+.TP
+.B \fIexpr1\fP , \fIexpr2\fP
+comma
+.PD
+.PP
+Shell variables are allowed as operands; parameter expansion is
+performed before the expression is evaluated.
+Within an expression, shell variables may also be referenced by name
+without using the parameter expansion syntax.
+A shell variable that is null or unset evaluates to 0 when referenced
+by name without using the parameter expansion syntax.
+The value of a variable is evaluated as an arithmetic expression
+when it is referenced, or when a variable which has been given the
+\fIinteger\fP attribute using \fBdeclare -i\fP is assigned a value.
+A null value evaluates to 0.
+A shell variable need not have its integer attribute
+turned on to be used in an expression.
+.PP
+Constants with a leading 0 are interpreted as octal numbers.
+A leading 0x or 0X denotes hexadecimal.
+Otherwise, numbers take the form [\fIbase#\fP]n, where \fIbase\fP
+is a decimal number between 2 and 64 representing the arithmetic
+base, and \fIn\fP is a number in that base.
+If \fIbase#\fP is omitted, then base 10 is used.
+The digits greater than 9 are represented by the lowercase letters,
+the uppercase letters, @, and _, in that order.
+If \fIbase\fP is less than or equal to 36, lowercase and uppercase
+letters may be used interchangeably to represent numbers between 10
+and 35.
+.PP
+Operators are evaluated in order of precedence. Sub-expressions in
+parentheses are evaluated first and may override the precedence
+rules above.
+.SH "CONDITIONAL EXPRESSIONS"
+Conditional expressions are used by the \fB[[\fP compound command and
+the \fBtest\fP and \fB[\fP builtin commands to test file attributes
+and perform string and arithmetic comparisons.
+Expressions are formed from the following unary or binary primaries.
+If any \fIfile\fP argument to one of the primaries is of the form
+\fI/dev/fd/n\fP, then file descriptor \fIn\fP is checked.
+If the \fIfile\fP argument to one of the primaries is one of
+\fI/dev/stdin\fP, \fI/dev/stdout\fP, or \fI/dev/stderr\fP, file
+descriptor 0, 1, or 2, respectively, is checked.
+.PP
+Unless otherwise specified, primaries that operate on files follow symbolic
+links and operate on the target of the link, rather than the link itself.
+.if t .sp 0.5
+.if n .sp 1
+When used with \fB[[\fP, The \fB<\fP and \fB>\fP operators sort
+lexicographically using the current locale.
+.sp 1
+.PD 0
+.TP
+.B \-a \fIfile\fP
+True if \fIfile\fP exists.
+.TP
+.B \-b \fIfile\fP
+True if \fIfile\fP exists and is a block special file.
+.TP
+.B \-c \fIfile\fP
+True if \fIfile\fP exists and is a character special file.
+.TP
+.B \-d \fIfile\fP
+True if \fIfile\fP exists and is a directory.
+.TP
+.B \-e \fIfile\fP
+True if \fIfile\fP exists.
+.TP
+.B \-f \fIfile\fP
+True if \fIfile\fP exists and is a regular file.
+.TP
+.B \-g \fIfile\fP
+True if \fIfile\fP exists and is set-group-id.
+.TP
+.B \-h \fIfile\fP
+True if \fIfile\fP exists and is a symbolic link.
+.TP
+.B \-k \fIfile\fP
+True if \fIfile\fP exists and its ``sticky'' bit is set.
+.TP
+.B \-p \fIfile\fP
+True if \fIfile\fP exists and is a named pipe (FIFO).
+.TP
+.B \-r \fIfile\fP
+True if \fIfile\fP exists and is readable.
+.TP
+.B \-s \fIfile\fP
+True if \fIfile\fP exists and has a size greater than zero.
+.TP
+.B \-t \fIfd\fP
+True if file descriptor
+.I fd
+is open and refers to a terminal.
+.TP
+.B \-u \fIfile\fP
+True if \fIfile\fP exists and its set-user-id bit is set.
+.TP
+.B \-w \fIfile\fP
+True if \fIfile\fP exists and is writable.
+.TP
+.B \-x \fIfile\fP
+True if \fIfile\fP exists and is executable.
+.TP
+.B \-O \fIfile\fP
+True if \fIfile\fP exists and is owned by the effective user id.
+.TP
+.B \-G \fIfile\fP
+True if \fIfile\fP exists and is owned by the effective group id.
+.TP
+.B \-L \fIfile\fP
+True if \fIfile\fP exists and is a symbolic link.
+.TP
+.B \-S \fIfile\fP
+True if \fIfile\fP exists and is a socket.
+.TP
+.B \-N \fIfile\fP
+True if \fIfile\fP exists and has been modified since it was last read.
+.TP
+\fIfile1\fP \-\fBnt\fP \fIfile2\fP
+True if \fIfile1\fP is newer (according to modification date) than \fIfile2\fP,
+or if \fIfile1\fP exists and \fPfile2\fP does not.
+.TP
+\fIfile1\fP \-\fBot\fP \fIfile2\fP
+True if \fIfile1\fP is older than \fIfile2\fP, or if \fIfile2\fP exists
+and \fIfile1\fP does not.
+.TP
+\fIfile1\fP \fB\-ef\fP \fIfile2\fP
+True if \fIfile1\fP and \fIfile2\fP refer to the same device and
+inode numbers.
+.TP
+.B \-o \fIoptname\fP
+True if shell option
+.I optname
+is enabled.
+See the list of options under the description of the
+.B \-o
+option to the
+.B set
+builtin below.
+.TP
+.B \-z \fIstring\fP
+True if the length of \fIstring\fP is zero.
+.TP
+\fIstring\fP
+.PD 0
+.TP
+.B \-n \fIstring\fP
+.PD
+True if the length of
+.I string
+is non-zero.
+.TP
+\fIstring1\fP \fB==\fP \fIstring2\fP
+.PD 0
+.TP
+\fIstring1\fP \fB=\fP \fIstring2\fP
+.PD
+True if the strings are equal. \fB=\fP should be used
+with the \fBtest\fP command for POSIX conformance.
+.TP
+\fIstring1\fP \fB!=\fP \fIstring2\fP
+True if the strings are not equal.
+.TP
+\fIstring1\fP \fB<\fP \fIstring2\fP
+True if \fIstring1\fP sorts before \fIstring2\fP lexicographically.
+.TP
+\fIstring1\fP \fB>\fP \fIstring2\fP
+True if \fIstring1\fP sorts after \fIstring2\fP lexicographically.
+.TP
+.I \fIarg1\fP \fBOP\fP \fIarg2\fP
+.SM
+.B OP
+is one of
+.BR \-eq ,
+.BR \-ne ,
+.BR \-lt ,
+.BR \-le ,
+.BR \-gt ,
+or
+.BR \-ge .
+These arithmetic binary operators return true if \fIarg1\fP
+is equal to, not equal to, less than, less than or equal to,
+greater than, or greater than or equal to \fIarg2\fP, respectively.
+.I Arg1
+and
+.I arg2
+may be positive or negative integers.
+.PD
+.SH "SIMPLE COMMAND EXPANSION"
+When a simple command is executed, the shell performs the following
+expansions, assignments, and redirections, from left to right.
+.IP 1.
+The words that the parser has marked as variable assignments (those
+preceding the command name) and redirections are saved for later
+processing.
+.IP 2.
+The words that are not variable assignments or redirections are
+expanded. If any words remain after expansion, the first word
+is taken to be the name of the command and the remaining words are
+the arguments.
+.IP 3.
+Redirections are performed as described above under
+.SM
+.BR REDIRECTION .
+.IP 4.
+The text after the \fB=\fP in each variable assignment undergoes tilde
+expansion, parameter expansion, command substitution, arithmetic expansion,
+and quote removal before being assigned to the variable.
+.PP
+If no command name results, the variable assignments affect the current
+shell environment. Otherwise, the variables are added to the environment
+of the executed command and do not affect the current shell environment.
+If any of the assignments attempts to assign a value to a readonly variable,
+an error occurs, and the command exits with a non-zero status.
+.PP
+If no command name results, redirections are performed, but do not
+affect the current shell environment. A redirection error causes the
+command to exit with a non-zero status.
+.PP
+If there is a command name left after expansion, execution proceeds as
+described below. Otherwise, the command exits. If one of the expansions
+contained a command substitution, the exit status of the command is
+the exit status of the last command substitution performed. If there
+were no command substitutions, the command exits with a status of zero.
+.SH "COMMAND EXECUTION"
+After a command has been split into words, if it results in a
+simple command and an optional list of arguments, the following
+actions are taken.
+.PP
+If the command name contains no slashes, the shell attempts to
+locate it. If there exists a shell function by that name, that
+function is invoked as described above in
+.SM
+.BR FUNCTIONS .
+If the name does not match a function, the shell searches for
+it in the list of shell builtins. If a match is found, that
+builtin is invoked.
+.PP
+If the name is neither a shell function nor a builtin,
+and contains no slashes,
+.B bash
+searches each element of the
+.SM
+.B PATH
+for a directory containing an executable file by that name.
+.B Bash
+uses a hash table to remember the full pathnames of executable
+files (see
+.B hash
+under
+.SM
+.B "SHELL BUILTIN COMMANDS"
+below).
+A full search of the directories in
+.SM
+.B PATH
+is performed only if the command is not found in the hash table.
+If the search is unsuccessful, the shell searches for a defined shell
+function named \fBcommand_not_found_handle\fP.
+If that function exists, it is invoked with the original command and
+the original command's arguments as its arguments, and the function's
+exit status becomes the exit status of the shell.
+If that function is not defined, the shell prints an error
+message and returns an exit status of 127.
+.PP
+If the search is successful, or if the command name contains
+one or more slashes, the shell executes the named program in a
+separate execution environment.
+Argument 0 is set to the name given, and the remaining arguments
+to the command are set to the arguments given, if any.
+.PP
+If this execution fails because the file is not in executable
+format, and the file is not a directory, it is assumed to be
+a \fIshell script\fP, a file
+containing shell commands. A subshell is spawned to execute
+it. This subshell reinitializes itself, so
+that the effect is as if a new shell had been invoked
+to handle the script, with the exception that the locations of
+commands remembered by the parent (see
+.B hash
+below under
+.SM
+\fBSHELL BUILTIN COMMANDS\fP)
+are retained by the child.
+.PP
+If the program is a file beginning with
+.BR #! ,
+the remainder of the first line specifies an interpreter
+for the program. The shell executes the
+specified interpreter on operating systems that do not
+handle this executable format themselves. The arguments to the
+interpreter consist of a single optional argument following the
+interpreter name on the first line of the program, followed
+by the name of the program, followed by the command
+arguments, if any.
+.SH COMMAND EXECUTION ENVIRONMENT
+The shell has an \fIexecution environment\fP, which consists of the
+following:
+.if n .sp 1
+.IP \(bu
+open files inherited by the shell at invocation, as modified by
+redirections supplied to the \fBexec\fP builtin
+.IP \(bu
+the current working directory as set by \fBcd\fP, \fBpushd\fP, or
+\fBpopd\fP, or inherited by the shell at invocation
+.IP \(bu
+the file creation mode mask as set by \fBumask\fP or inherited from
+the shell's parent
+.IP \(bu
+current traps set by \fBtrap\fP
+.IP \(bu
+shell parameters that are set by variable assignment or with \fBset\fP
+or inherited from the shell's parent in the environment
+.IP \(bu
+shell functions defined during execution or inherited from the shell's
+parent in the environment
+.IP \(bu
+options enabled at invocation (either by default or with command-line
+arguments) or by \fBset\fP
+.IP \(bu
+options enabled by \fBshopt\fP
+.IP \(bu
+shell aliases defined with \fBalias\fP
+.IP \(bu
+various process IDs, including those of background jobs, the value
+of \fB$$\fP, and the value of
+.SM
+.B PPID
+.PP
+When a simple command other than a builtin or shell function
+is to be executed, it
+is invoked in a separate execution environment that consists of
+the following. Unless otherwise noted, the values are inherited
+from the shell.
+.if n .sp 1
+.IP \(bu
+the shell's open files, plus any modifications and additions specified
+by redirections to the command
+.IP \(bu
+the current working directory
+.IP \(bu
+the file creation mode mask
+.IP \(bu
+shell variables and functions marked for export, along with variables
+exported for the command, passed in the environment
+.IP \(bu
+traps caught by the shell are reset to the values inherited from the
+shell's parent, and traps ignored by the shell are ignored
+.PP
+A command invoked in this separate environment cannot affect the
+shell's execution environment.
+.PP
+Command substitution, commands grouped with parentheses,
+and asynchronous commands are invoked in a
+subshell environment that is a duplicate of the shell environment,
+except that traps caught by the shell are reset to the values
+that the shell inherited from its parent at invocation. Builtin
+commands that are invoked as part of a pipeline are also executed in a
+subshell environment. Changes made to the subshell environment
+cannot affect the shell's execution environment.
+.PP
+Subshells spawned to execute command substitutions inherit the value of
+the \fB\-e\fP option from the parent shell. When not in posix mode,
+Bash clears the \fB\-e\fP option in such subshells.
+.PP
+If a command is followed by a \fB&\fP and job control is not active, the
+default standard input for the command is the empty file \fI/dev/null\fP.
+Otherwise, the invoked command inherits the file descriptors of the calling
+shell as modified by redirections.
+.SH ENVIRONMENT
+When a program is invoked it is given an array of strings
+called the
+.IR environment .
+This is a list of
+\fIname\fP\-\fIvalue\fP pairs, of the form
+.IR "name\fR=\fPvalue" .
+.PP
+The shell provides several ways to manipulate the environment.
+On invocation, the shell scans its own environment and
+creates a parameter for each name found, automatically marking
+it for
+.I export
+to child processes. Executed commands inherit the environment.
+The
+.B export
+and
+.B declare \-x
+commands allow parameters and functions to be added to and
+deleted from the environment. If the value of a parameter
+in the environment is modified, the new value becomes part
+of the environment, replacing the old. The environment
+inherited by any executed command consists of the shell's
+initial environment, whose values may be modified in the shell,
+less any pairs removed by the
+.B unset
+command, plus any additions via the
+.B export
+and
+.B declare \-x
+commands.
+.PP
+The environment for any
+.I simple command
+or function may be augmented temporarily by prefixing it with
+parameter assignments, as described above in
+.SM
+.BR PARAMETERS .
+These assignment statements affect only the environment seen
+by that command.
+.PP
+If the
+.B \-k
+option is set (see the
+.B set
+builtin command below), then
+.I all
+parameter assignments are placed in the environment for a command,
+not just those that precede the command name.
+.PP
+When
+.B bash
+invokes an external command, the variable
+.B _
+is set to the full file name of the command and passed to that
+command in its environment.
+.SH "EXIT STATUS"
+.PP
+The exit status of an executed command is the value returned by the
+\fIwaitpid\fP system call or equivalent function. Exit statuses
+fall between 0 and 255, though, as explained below, the shell may
+use values above 125 specially. Exit statuses from shell builtins and
+compound commands are also limited to this range. Under certain
+circumstances, the shell will use special values to indicate specific
+failure modes.
+.PP
+For the shell's purposes, a command which exits with a
+zero exit status has succeeded. An exit status of zero
+indicates success. A non-zero exit status indicates failure.
+When a command terminates on a fatal signal \fIN\fP, \fBbash\fP uses
+the value of 128+\fIN\fP as the exit status.
+.PP
+If a command is not found, the child process created to
+execute it returns a status of 127. If a command is found
+but is not executable, the return status is 126.
+.PP
+If a command fails because of an error during expansion or redirection,
+the exit status is greater than zero.
+.PP
+Shell builtin commands return a status of 0 (\fItrue\fP) if
+successful, and non-zero (\fIfalse\fP) if an error occurs
+while they execute.
+All builtins return an exit status of 2 to indicate incorrect usage.
+.PP
+\fBBash\fP itself returns the exit status of the last command
+executed, unless a syntax error occurs, in which case it exits
+with a non-zero value. See also the \fBexit\fP builtin
+command below.
+.SH SIGNALS
+When \fBbash\fP is interactive, in the absence of any traps, it ignores
+.SM
+.B SIGTERM
+(so that \fBkill 0\fP does not kill an interactive shell),
+and
+.SM
+.B SIGINT
+is caught and handled (so that the \fBwait\fP builtin is interruptible).
+In all cases, \fBbash\fP ignores
+.SM
+.BR SIGQUIT .
+If job control is in effect,
+.B bash
+ignores
+.SM
+.BR SIGTTIN ,
+.SM
+.BR SIGTTOU ,
+and
+.SM
+.BR SIGTSTP .
+.PP
+Non-builtin commands run by \fBbash\fP have signal handlers
+set to the values inherited by the shell from its parent.
+When job control is not in effect, asynchronous commands
+ignore
+.SM
+.B SIGINT
+and
+.SM
+.B SIGQUIT
+in addition to these inherited handlers.
+Commands run as a result of command substitution ignore the
+keyboard-generated job control signals
+.SM
+.BR SIGTTIN ,
+.SM
+.BR SIGTTOU ,
+and
+.SM
+.BR SIGTSTP .
+.PP
+The shell exits by default upon receipt of a
+.SM
+.BR SIGHUP .
+Before exiting, an interactive shell resends the
+.SM
+.B SIGHUP
+to all jobs, running or stopped.
+Stopped jobs are sent
+.SM
+.B SIGCONT
+to ensure that they receive the
+.SM
+.BR SIGHUP .
+To prevent the shell from
+sending the signal to a particular job, it should be removed from the
+jobs table with the
+.B disown
+builtin (see
+.SM
+.B "SHELL BUILTIN COMMANDS"
+below) or marked
+to not receive
+.SM
+.B SIGHUP
+using
+.BR "disown \-h" .
+.PP
+If the
+.B huponexit
+shell option has been set with
+.BR shopt ,
+.B bash
+sends a
+.SM
+.B SIGHUP
+to all jobs when an interactive login shell exits.
+.PP
+If \fBbash\fP is waiting for a command to complete and receives a signal
+for which a trap has been set, the trap will not be executed until
+the command completes.
+When \fBbash\fP is waiting for an asynchronous command via the \fBwait\fP
+builtin, the reception of a signal for which a trap has been set will
+cause the \fBwait\fP builtin to return immediately with an exit status
+greater than 128, immediately after which the trap is executed.
+.SH "JOB CONTROL"
+.I Job control
+refers to the ability to selectively stop (\fIsuspend\fP)
+the execution of processes and continue (\fIresume\fP)
+their execution at a later point. A user typically employs
+this facility via an interactive interface supplied jointly
+by the operating system kernel's terminal driver and
+.BR bash .
+.PP
+The shell associates a
+.I job
+with each pipeline. It keeps a table of currently executing
+jobs, which may be listed with the
+.B jobs
+command. When
+.B bash
+starts a job asynchronously (in the
+.IR background ),
+it prints a line that looks like:
+.RS
+.PP
+[1] 25647
+.RE
+.PP
+indicating that this job is job number 1 and that the process ID
+of the last process in the pipeline associated with this job is 25647.
+All of the processes in a single pipeline are members of the same job.
+.B Bash
+uses the
+.I job
+abstraction as the basis for job control.
+.PP
+To facilitate the implementation of the user interface to job
+control, the operating system maintains the notion of a \fIcurrent terminal
+process group ID\fP. Members of this process group (processes whose
+process group ID is equal to the current terminal process group ID)
+receive keyboard-generated signals such as
+.SM
+.BR SIGINT .
+These processes are said to be in the
+.IR foreground .
+.I Background
+processes are those whose process group ID differs from the terminal's;
+such processes are immune to keyboard-generated signals.
+Only foreground processes are allowed to read from or, if the
+user so specifies with \f(CWstty tostop\fP, write to the
+terminal.
+Background processes which attempt to read from (write to when
+\f(CWstty tostop\fP is in effect) the
+terminal are sent a
+.SM
+.B SIGTTIN (SIGTTOU)
+signal by the kernel's terminal driver,
+which, unless caught, suspends the process.
+.PP
+If the operating system on which
+.B bash
+is running supports
+job control,
+.B bash
+contains facilities to use it.
+Typing the
+.I suspend
+character (typically
+.BR ^Z ,
+Control-Z) while a process is running
+causes that process to be stopped and returns control to
+.BR bash .
+Typing the
+.I "delayed suspend"
+character (typically
+.BR ^Y ,
+Control-Y) causes the process to be stopped when it
+attempts to read input from the terminal, and control to
+be returned to
+.BR bash .
+The user may then manipulate the state of this job, using the
+.B bg
+command to continue it in the background, the
+.B fg
+command to continue it in the foreground, or
+the
+.B kill
+command to kill it. A \fB^Z\fP takes effect immediately,
+and has the additional side effect of causing pending output
+and typeahead to be discarded.
+.PP
+There are a number of ways to refer to a job in the shell.
+The character
+.B %
+introduces a job specification (\fIjobspec\fP). Job number
+.I n
+may be referred to as
+.BR %n .
+A job may also be referred to using a prefix of the name used to
+start it, or using a substring that appears in its command line.
+For example,
+.B %ce
+refers to a stopped
+.B ce
+job. If a prefix matches more than one job,
+.B bash
+reports an error. Using
+.BR %?ce ,
+on the other hand, refers to any job containing the string
+.B ce
+in its command line. If the substring matches more than one job,
+.B bash
+reports an error. The symbols
+.B %%
+and
+.B %+
+refer to the shell's notion of the
+.IR "current job" ,
+which is the last job stopped while it was in
+the foreground or started in the background.
+The
+.I "previous job"
+may be referenced using
+.BR %\- .
+If there is only a single job, \fB%+\fP and \fB%\-\fP can both be used
+to refer to that job.
+In output pertaining to jobs (e.g., the output of the
+.B jobs
+command), the current job is always flagged with a
+.BR + ,
+and the previous job with a
+.BR \- .
+A single % (with no accompanying job specification) also refers to the
+current job.
+.PP
+Simply naming a job can be used to bring it into the
+foreground:
+.B %1
+is a synonym for
+\fB``fg %1''\fP,
+bringing job 1 from the background into the foreground.
+Similarly,
+.B ``%1 &''
+resumes job 1 in the background, equivalent to
+\fB``bg %1''\fP.
+.PP
+The shell learns immediately whenever a job changes state.
+Normally,
+.B bash
+waits until it is about to print a prompt before reporting
+changes in a job's status so as to not interrupt
+any other output. If the
+.B \-b
+option to the
+.B set
+builtin command
+is enabled,
+.B bash
+reports such changes immediately.
+Any trap on
+.SM
+.B SIGCHLD
+is executed for each child that exits.
+.PP
+If an attempt to exit
+.B bash
+is made while jobs are stopped (or, if the \fBcheckjobs\fP shell option has
+been enabled using the \fBshopt\fP builtin, running), the shell prints a
+warning message, and, if the \fBcheckjobs\fP option is enabled, lists the
+jobs and their statuses.
+The
+.B jobs
+command may then be used to inspect their status.
+If a second attempt to exit is made without an intervening command,
+the shell does not print another warning, and any stopped
+jobs are terminated.
+.SH PROMPTING
+When executing interactively,
+.B bash
+displays the primary prompt
+.SM
+.B PS1
+when it is ready to read a command, and the secondary prompt
+.SM
+.B PS2
+when it needs more input to complete a command.
+.B Bash
+allows these prompt strings to be customized by inserting a number of
+backslash-escaped special characters that are decoded as follows:
+.RS
+.PD 0
+.TP
+.B \ea
+an ASCII bell character (07)
+.TP
+.B \ed
+the date in "Weekday Month Date" format (e.g., "Tue May 26")
+.TP
+.B \eD{\fIformat\fP}
+the \fIformat\fP is passed to \fIstrftime\fP(3) and the result is inserted
+into the prompt string; an empty \fIformat\fP results in a locale-specific
+time representation. The braces are required
+.TP
+.B \ee
+an ASCII escape character (033)
+.TP
+.B \eh
+the hostname up to the first `.'
+.TP
+.B \eH
+the hostname
+.TP
+.B \ej
+the number of jobs currently managed by the shell
+.TP
+.B \el
+the basename of the shell's terminal device name
+.TP
+.B \en
+newline
+.TP
+.B \er
+carriage return
+.TP
+.B \es
+the name of the shell, the basename of
+.B $0
+(the portion following the final slash)
+.TP
+.B \et
+the current time in 24-hour HH:MM:SS format
+.TP
+.B \eT
+the current time in 12-hour HH:MM:SS format
+.TP
+.B \e@
+the current time in 12-hour am/pm format
+.TP
+.B \eA
+the current time in 24-hour HH:MM format
+.TP
+.B \eu
+the username of the current user
+.TP
+.B \ev
+the version of \fBbash\fP (e.g., 2.00)
+.TP
+.B \eV
+the release of \fBbash\fP, version + patch level (e.g., 2.00.0)
+.TP
+.B \ew
+the current working directory, with
+.SM
+.B $HOME
+abbreviated with a tilde
+(uses the value of the
+.SM
+.B PROMPT_DIRTRIM
+variable)
+.TP
+.B \eW
+the basename of the current working directory, with
+.SM
+.B $HOME
+abbreviated with a tilde
+.TP
+.B \e!
+the history number of this command
+.TP
+.B \e#
+the command number of this command
+.TP
+.B \e$
+if the effective UID is 0, a
+.BR # ,
+otherwise a
+.B $
+.TP
+.B \e\fInnn\fP
+the character corresponding to the octal number \fInnn\fP
+.TP
+.B \e\e
+a backslash
+.TP
+.B \e[
+begin a sequence of non-printing characters, which could be used to
+embed a terminal control sequence into the prompt
+.TP
+.B \e]
+end a sequence of non-printing characters
+.PD
+.RE
+.PP
+The command number and the history number are usually different:
+the history number of a command is its position in the history
+list, which may include commands restored from the history file
+(see
+.SM
+.B HISTORY
+below), while the command number is the position in the sequence
+of commands executed during the current shell session.
+After the string is decoded, it is expanded via
+parameter expansion, command substitution, arithmetic
+expansion, and quote removal, subject to the value of the
+.B promptvars
+shell option (see the description of the
+.B shopt
+command under
+.SM
+.B "SHELL BUILTIN COMMANDS"
+below).
+.SH READLINE
+This is the library that handles reading input when using an interactive
+shell, unless the
+.B \-\-noediting
+option is given at shell invocation.
+Line editing is also used when using the \fB\-e\fP option to the
+\fBread\fP builtin.
+By default, the line editing commands are similar to those of emacs.
+A vi-style line editing interface is also available.
+Line editing can be enabled at any time using the
+.B \-o emacs
+or
+.B \-o vi
+options to the
+.B set
+builtin (see
+.SM
+.B SHELL BUILTIN COMMANDS
+below).
+To turn off line editing after the shell is running, use the
+.B +o emacs
+or
+.B +o vi
+options to the
+.B set
+builtin.
+.SS "Readline Notation"
+.PP
+In this section, the emacs-style notation is used to denote
+keystrokes. Control keys are denoted by C\-\fIkey\fR, e.g., C\-n
+means Control\-N. Similarly,
+.I meta
+keys are denoted by M\-\fIkey\fR, so M\-x means Meta\-X. (On keyboards
+without a
+.I meta
+key, M\-\fIx\fP means ESC \fIx\fP, i.e., press the Escape key
+then the
+.I x
+key. This makes ESC the \fImeta prefix\fP.
+The combination M\-C\-\fIx\fP means ESC\-Control\-\fIx\fP,
+or press the Escape key
+then hold the Control key while pressing the
+.I x
+key.)
+.PP
+Readline commands may be given numeric
+.IR arguments ,
+which normally act as a repeat count.
+Sometimes, however, it is the sign of the argument that is significant.
+Passing a negative argument to a command that acts in the forward
+direction (e.g., \fBkill\-line\fP) causes that command to act in a
+backward direction.
+Commands whose behavior with arguments deviates from this are noted
+below.
+.PP
+When a command is described as \fIkilling\fP text, the text
+deleted is saved for possible future retrieval
+(\fIyanking\fP). The killed text is saved in a
+\fIkill ring\fP. Consecutive kills cause the text to be
+accumulated into one unit, which can be yanked all at once.
+Commands which do not kill text separate the chunks of text
+on the kill ring.
+.SS "Readline Initialization"
+.PP
+Readline is customized by putting commands in an initialization
+file (the \fIinputrc\fP file).
+The name of this file is taken from the value of the
+.SM
+.B INPUTRC
+variable. If that variable is unset, the default is
+.IR ~/.inputrc .
+When a program which uses the readline library starts up, the
+initialization file is read, and the key bindings and variables
+are set.
+There are only a few basic constructs allowed in the
+readline initialization file.
+Blank lines are ignored.
+Lines beginning with a \fB#\fP are comments.
+Lines beginning with a \fB$\fP indicate conditional constructs.
+Other lines denote key bindings and variable settings.
+.PP
+The default key-bindings may be changed with an
+.I inputrc
+file.
+Other programs that use this library may add their own commands
+and bindings.
+.PP
+For example, placing
+.RS
+.PP
+M\-Control\-u: universal\-argument
+.RE
+or
+.RS
+C\-Meta\-u: universal\-argument
+.RE
+into the
+.I inputrc
+would make M\-C\-u execute the readline command
+.IR universal\-argument .
+.PP
+The following symbolic character names are recognized:
+.IR RUBOUT ,
+.IR DEL ,
+.IR ESC ,
+.IR LFD ,
+.IR NEWLINE ,
+.IR RET ,
+.IR RETURN ,
+.IR SPC ,
+.IR SPACE ,
+and
+.IR TAB .
+.PP
+In addition to command names, readline allows keys to be bound
+to a string that is inserted when the key is pressed (a \fImacro\fP).
+.SS "Readline Key Bindings"
+.PP
+The syntax for controlling key bindings in the
+.I inputrc
+file is simple. All that is required is the name of the
+command or the text of a macro and a key sequence to which
+it should be bound. The name may be specified in one of two ways:
+as a symbolic key name, possibly with \fIMeta\-\fP or \fIControl\-\fP
+prefixes, or as a key sequence.
+.PP
+When using the form \fBkeyname\fP:\^\fIfunction\-name\fP or \fImacro\fP,
+.I keyname
+is the name of a key spelled out in English. For example:
+.sp
+.RS
+Control-u: universal\-argument
+.br
+Meta-Rubout: backward-kill-word
+.br
+Control-o: "> output"
+.RE
+.LP
+In the above example,
+.I C\-u
+is bound to the function
+.BR universal\-argument ,
+.I M\-DEL
+is bound to the function
+.BR backward\-kill\-word ,
+and
+.I C\-o
+is bound to run the macro
+expressed on the right hand side (that is, to insert the text
+.if t \f(CW> output\fP
+.if n ``> output''
+into the line).
+.PP
+In the second form, \fB"keyseq"\fP:\^\fIfunction\-name\fP or \fImacro\fP,
+.B keyseq
+differs from
+.B keyname
+above in that strings denoting
+an entire key sequence may be specified by placing the sequence
+within double quotes. Some GNU Emacs style key escapes can be
+used, as in the following example, but the symbolic character names
+are not recognized.
+.sp
+.RS
+"\eC\-u": universal\-argument
+.br
+"\eC\-x\eC\-r": re\-read\-init\-file
+.br
+"\ee[11~": "Function Key 1"
+.RE
+.PP
+In this example,
+.I C\-u
+is again bound to the function
+.BR universal\-argument .
+.I "C\-x C\-r"
+is bound to the function
+.BR re\-read\-init\-file ,
+and
+.I "ESC [ 1 1 ~"
+is bound to insert the text
+.if t \f(CWFunction Key 1\fP.
+.if n ``Function Key 1''.
+.PP
+The full set of GNU Emacs style escape sequences is
+.RS
+.PD 0
+.TP
+.B \eC\-
+control prefix
+.TP
+.B \eM\-
+meta prefix
+.TP
+.B \ee
+an escape character
+.TP
+.B \e\e
+backslash
+.TP
+.B \e"
+literal "
+.TP
+.B \e\(aq
+literal \(aq
+.RE
+.PD
+.PP
+In addition to the GNU Emacs style escape sequences, a second
+set of backslash escapes is available:
+.RS
+.PD 0
+.TP
+.B \ea
+alert (bell)
+.TP
+.B \eb
+backspace
+.TP
+.B \ed
+delete
+.TP
+.B \ef
+form feed
+.TP
+.B \en
+newline
+.TP
+.B \er
+carriage return
+.TP
+.B \et
+horizontal tab
+.TP
+.B \ev
+vertical tab
+.TP
+.B \e\fInnn\fP
+the eight-bit character whose value is the octal value \fInnn\fP
+(one to three digits)
+.TP
+.B \ex\fIHH\fP
+the eight-bit character whose value is the hexadecimal value \fIHH\fP
+(one or two hex digits)
+.RE
+.PD
+.PP
+When entering the text of a macro, single or double quotes must
+be used to indicate a macro definition.
+Unquoted text is assumed to be a function name.
+In the macro body, the backslash escapes described above are expanded.
+Backslash will quote any other character in the macro text,
+including " and \(aq.
+.PP
+.B Bash
+allows the current readline key bindings to be displayed or modified
+with the
+.B bind
+builtin command. The editing mode may be switched during interactive
+use by using the
+.B \-o
+option to the
+.B set
+builtin command (see
+.SM
+.B SHELL BUILTIN COMMANDS
+below).
+.SS "Readline Variables"
+.PP
+Readline has variables that can be used to further customize its
+behavior. A variable may be set in the
+.I inputrc
+file with a statement of the form
+.RS
+.PP
+\fBset\fP \fIvariable\-name\fP \fIvalue\fP
+.RE
+.PP
+Except where noted, readline variables can take the values
+.B On
+or
+.B Off
+(without regard to case).
+Unrecognized variable names are ignored.
+When a variable value is read, empty or null values, "on" (case-insensitive),
+and "1" are equivalent to \fBOn\fP. All other values are equivalent to
+\fBOff\fP.
+The variables and their default values are:
+.PP
+.PD 0
+.TP
+.B bell\-style (audible)
+Controls what happens when readline wants to ring the terminal bell.
+If set to \fBnone\fP, readline never rings the bell. If set to
+\fBvisible\fP, readline uses a visible bell if one is available.
+If set to \fBaudible\fP, readline attempts to ring the terminal's bell.
+.TP
+.B bind\-tty\-special\-chars (On)
+If set to \fBOn\fP, readline attempts to bind the control characters
+treated specially by the kernel's terminal driver to their readline
+equivalents.
+.TP
+.B comment\-begin (``#'')
+The string that is inserted when the readline
+.B insert\-comment
+command is executed.
+This command is bound to
+.B M\-#
+in emacs mode and to
+.B #
+in vi command mode.
+.TP
+.B completion\-ignore\-case (Off)
+If set to \fBOn\fP, readline performs filename matching and completion
+in a case\-insensitive fashion.
+.TP
+.B completion\-prefix\-display\-length (0)
+The length in characters of the common prefix of a list of possible
+completions that is displayed without modification. When set to a
+value greater than zero, common prefixes longer than this value are
+replaced with an ellipsis when displaying possible completions.
+.TP
+.B completion\-query\-items (100)
+This determines when the user is queried about viewing
+the number of possible completions
+generated by the \fBpossible\-completions\fP command.
+It may be set to any integer value greater than or equal to
+zero. If the number of possible completions is greater than
+or equal to the value of this variable, the user is asked whether
+or not he wishes to view them; otherwise they are simply listed
+on the terminal.
+.TP
+.B convert\-meta (On)
+If set to \fBOn\fP, readline will convert characters with the
+eighth bit set to an ASCII key sequence
+by stripping the eighth bit and prefixing an
+escape character (in effect, using escape as the \fImeta prefix\fP).
+.TP
+.B disable\-completion (Off)
+If set to \fBOn\fP, readline will inhibit word completion. Completion
+characters will be inserted into the line as if they had been
+mapped to \fBself-insert\fP.
+.TP
+.B editing\-mode (emacs)
+Controls whether readline begins with a set of key bindings similar
+to \fIemacs\fP or \fIvi\fP.
+.B editing\-mode
+can be set to either
+.B emacs
+or
+.BR vi .
+.TP
+.B echo\-control\-characters (On)
+When set to \fBOn\fP, on operating systems that indicate they support it,
+readline echoes a character corresponding to a signal generated from the
+keyboard.
+.TP
+.B enable\-keypad (Off)
+When set to \fBOn\fP, readline will try to enable the application
+keypad when it is called. Some systems need this to enable the
+arrow keys.
+.TP
+.B enable\-meta\-key (On)
+When set to \fBOn\fP, readline will try to enable any meta modifier
+key the terminal claims to support when it is called. On many terminals,
+the meta key is used to send eight-bit characters.
+.TP
+.B expand\-tilde (Off)
+If set to \fBon\fP, tilde expansion is performed when readline
+attempts word completion.
+.TP
+.B history\-preserve\-point (Off)
+If set to \fBon\fP, the history code attempts to place point at the
+same location on each history line retrieved with \fBprevious-history\fP
+or \fBnext-history\fP.
+.TP
+.B history\-size (0)
+Set the maximum number of history entries saved in the history list. If
+set to zero, the number of entries in the history list is not limited.
+.TP
+.B horizontal\-scroll\-mode (Off)
+When set to \fBOn\fP, makes readline use a single line for display,
+scrolling the input horizontally on a single screen line when it
+becomes longer than the screen width rather than wrapping to a new line.
+.TP
+.B input\-meta (Off)
+If set to \fBOn\fP, readline will enable eight-bit input (that is,
+it will not strip the high bit from the characters it reads),
+regardless of what the terminal claims it can support. The name
+.B meta\-flag
+is a synonym for this variable.
+.TP
+.B isearch\-terminators (``C\-[C\-J'')
+The string of characters that should terminate an incremental
+search without subsequently executing the character as a command.
+If this variable has not been given a value, the characters
+\fIESC\fP and \fIC\-J\fP will terminate an incremental search.
+.TP
+.B keymap (emacs)
+Set the current readline keymap. The set of valid keymap names is
+\fIemacs, emacs\-standard, emacs\-meta, emacs\-ctlx, vi,
+vi\-command\fP, and
+.IR vi\-insert .
+\fIvi\fP is equivalent to \fIvi\-command\fP; \fIemacs\fP is
+equivalent to \fIemacs\-standard\fP. The default value is
+.IR emacs ;
+the value of
+.B editing\-mode
+also affects the default keymap.
+.TP
+.B mark\-directories (On)
+If set to \fBOn\fP, completed directory names have a slash
+appended.
+.TP
+.B mark\-modified\-lines (Off)
+If set to \fBOn\fP, history lines that have been modified are displayed
+with a preceding asterisk (\fB*\fP).
+.TP
+.B mark\-symlinked\-directories (Off)
+If set to \fBOn\fP, completed names which are symbolic links to directories
+have a slash appended (subject to the value of
+\fBmark\-directories\fP).
+.TP
+.B match\-hidden\-files (On)
+This variable, when set to \fBOn\fP, causes readline to match files whose
+names begin with a `.' (hidden files) when performing filename
+completion, unless the leading `.' is
+supplied by the user in the filename to be completed.
+.TP
+.B output\-meta (Off)
+If set to \fBOn\fP, readline will display characters with the
+eighth bit set directly rather than as a meta-prefixed escape
+sequence.
+.TP
+.B page\-completions (On)
+If set to \fBOn\fP, readline uses an internal \fImore\fP-like pager
+to display a screenful of possible completions at a time.
+.TP
+.B print\-completions\-horizontally (Off)
+If set to \fBOn\fP, readline will display completions with matches
+sorted horizontally in alphabetical order, rather than down the screen.
+.TP
+.B revert\-all\-at\-newline (Off)
+If set to \fBon\fP, readline will undo all changes to history lines
+before returning when \fBaccept\-line\fP is executed. By default,
+history lines may be modified and retain individual undo lists across
+calls to \fBreadline\fP.
+.TP
+.B show\-all\-if\-ambiguous (Off)
+This alters the default behavior of the completion functions. If
+set to
+.BR on ,
+words which have more than one possible completion cause the
+matches to be listed immediately instead of ringing the bell.
+.TP
+.B show\-all\-if\-unmodified (Off)
+This alters the default behavior of the completion functions in
+a fashion similar to \fBshow\-all\-if\-ambiguous\fP.
+If set to
+.BR on ,
+words which have more than one possible completion without any
+possible partial completion (the possible completions don't share
+a common prefix) cause the matches to be listed immediately instead
+of ringing the bell.
+.TP
+.B skip\-completed\-text (Off)
+If set to \fBOn\fP, this alters the default completion behavior when
+inserting a single match into the line. It's only active when
+performing completion in the middle of a word. If enabled, readline
+does not insert characters from the completion that match characters
+after point in the word being completed, so portions of the word
+following the cursor are not duplicated.
+.TP
+.B visible\-stats (Off)
+If set to \fBOn\fP, a character denoting a file's type as reported
+by \fIstat\fP(2) is appended to the filename when listing possible
+completions.
+.PD
+.SS "Readline Conditional Constructs"
+.PP
+Readline implements a facility similar in spirit to the conditional
+compilation features of the C preprocessor which allows key
+bindings and variable settings to be performed as the result
+of tests. There are four parser directives used.
+.IP \fB$if\fP
+The
+.B $if
+construct allows bindings to be made based on the
+editing mode, the terminal being used, or the application using
+readline. The text of the test extends to the end of the line;
+no characters are required to isolate it.
+.RS
+.IP \fBmode\fP
+The \fBmode=\fP form of the \fB$if\fP directive is used to test
+whether readline is in emacs or vi mode.
+This may be used in conjunction
+with the \fBset keymap\fP command, for instance, to set bindings in
+the \fIemacs\-standard\fP and \fIemacs\-ctlx\fP keymaps only if
+readline is starting out in emacs mode.
+.IP \fBterm\fP
+The \fBterm=\fP form may be used to include terminal-specific
+key bindings, perhaps to bind the key sequences output by the
+terminal's function keys. The word on the right side of the
+.B =
+is tested against the both full name of the terminal and the portion
+of the terminal name before the first \fB\-\fP. This allows
+.I sun
+to match both
+.I sun
+and
+.IR sun\-cmd ,
+for instance.
+.IP \fBapplication\fP
+The \fBapplication\fP construct is used to include
+application-specific settings. Each program using the readline
+library sets the \fIapplication name\fP, and an initialization
+file can test for a particular value.
+This could be used to bind key sequences to functions useful for
+a specific program. For instance, the following command adds a
+key sequence that quotes the current or previous word in Bash:
+.sp 1
+.RS
+.nf
+\fB$if\fP Bash
+# Quote the current or previous word
+"\eC\-xq": "\eeb\e"\eef\e""
+\fB$endif\fP
+.fi
+.RE
+.RE
+.IP \fB$endif\fP
+This command, as seen in the previous example, terminates an
+\fB$if\fP command.
+.IP \fB$else\fP
+Commands in this branch of the \fB$if\fP directive are executed if
+the test fails.
+.IP \fB$include\fP
+This directive takes a single filename as an argument and reads commands
+and bindings from that file. For example, the following directive
+would read \fI/etc/inputrc\fP:
+.sp 1
+.RS
+.nf
+\fB$include\fP \^ \fI/etc/inputrc\fP
+.fi
+.RE
+.SS Searching
+.PP
+Readline provides commands for searching through the command history
+(see
+.SM
+.B HISTORY
+below) for lines containing a specified string.
+There are two search modes:
+.I incremental
+and
+.IR non-incremental .
+.PP
+Incremental searches begin before the user has finished typing the
+search string.
+As each character of the search string is typed, readline displays
+the next entry from the history matching the string typed so far.
+An incremental search requires only as many characters as needed to
+find the desired history entry.
+The characters present in the value of the \fBisearch-terminators\fP
+variable are used to terminate an incremental search.
+If that variable has not been assigned a value the Escape and
+Control-J characters will terminate an incremental search.
+Control-G will abort an incremental search and restore the original
+line.
+When the search is terminated, the history entry containing the
+search string becomes the current line.
+.PP
+To find other matching entries in the history list, type Control-S or
+Control-R as appropriate.
+This will search backward or forward in the history for the next
+entry matching the search string typed so far.
+Any other key sequence bound to a readline command will terminate
+the search and execute that command.
+For instance, a \fInewline\fP will terminate the search and accept
+the line, thereby executing the command from the history list.
+.PP
+Readline remembers the last incremental search string. If two
+Control-Rs are typed without any intervening characters defining a
+new search string, any remembered search string is used.
+.PP
+Non-incremental searches read the entire search string before starting
+to search for matching history lines. The search string may be
+typed by the user or be part of the contents of the current line.
+.SS "Readline Command Names"
+.PP
+The following is a list of the names of the commands and the default
+key sequences to which they are bound.
+Command names without an accompanying key sequence are unbound by default.
+In the following descriptions, \fIpoint\fP refers to the current cursor
+position, and \fImark\fP refers to a cursor position saved by the
+\fBset\-mark\fP command.
+The text between the point and mark is referred to as the \fIregion\fP.
+.SS Commands for Moving
+.PP
+.PD 0
+.TP
+.B beginning\-of\-line (C\-a)
+Move to the start of the current line.
+.TP
+.B end\-of\-line (C\-e)
+Move to the end of the line.
+.TP
+.B forward\-char (C\-f)
+Move forward a character.
+.TP
+.B backward\-char (C\-b)
+Move back a character.
+.TP
+.B forward\-word (M\-f)
+Move forward to the end of the next word. Words are composed of
+alphanumeric characters (letters and digits).
+.TP
+.B backward\-word (M\-b)
+Move back to the start of the current or previous word.
+Words are composed of alphanumeric characters (letters and digits).
+.TP
+.B shell\-forward\-word
+Move forward to the end of the next word.
+Words are delimited by non-quoted shell metacharacters.
+.TP
+.B shell\-backward\-word
+Move back to the start of the current or previous word.
+Words are delimited by non-quoted shell metacharacters.
+.TP
+.B clear\-screen (C\-l)
+Clear the screen leaving the current line at the top of the screen.
+With an argument, refresh the current line without clearing the
+screen.
+.TP
+.B redraw\-current\-line
+Refresh the current line.
+.PD
+.SS Commands for Manipulating the History
+.PP
+.PD 0
+.TP
+.B accept\-line (Newline, Return)
+Accept the line regardless of where the cursor is. If this line is
+non-empty, add it to the history list according to the state of the
+.SM
+.B HISTCONTROL
+variable. If the line is a modified history
+line, then restore the history line to its original state.
+.TP
+.B previous\-history (C\-p)
+Fetch the previous command from the history list, moving back in
+the list.
+.TP
+.B next\-history (C\-n)
+Fetch the next command from the history list, moving forward in the
+list.
+.TP
+.B beginning\-of\-history (M\-<)
+Move to the first line in the history.
+.TP
+.B end\-of\-history (M\->)
+Move to the end of the input history, i.e., the line currently being
+entered.
+.TP
+.B reverse\-search\-history (C\-r)
+Search backward starting at the current line and moving `up' through
+the history as necessary. This is an incremental search.
+.TP
+.B forward\-search\-history (C\-s)
+Search forward starting at the current line and moving `down' through
+the history as necessary. This is an incremental search.
+.TP
+.B non\-incremental\-reverse\-search\-history (M\-p)
+Search backward through the history starting at the current line
+using a non-incremental search for a string supplied by the user.
+.TP
+.B non\-incremental\-forward\-search\-history (M\-n)
+Search forward through the history using a non-incremental search for
+a string supplied by the user.
+.TP
+.B history\-search\-forward
+Search forward through the history for the string of characters
+between the start of the current line and the point.
+This is a non-incremental search.
+.TP
+.B history\-search\-backward
+Search backward through the history for the string of characters
+between the start of the current line and the point.
+This is a non-incremental search.
+.TP
+.B yank\-nth\-arg (M\-C\-y)
+Insert the first argument to the previous command (usually
+the second word on the previous line) at point.
+With an argument
+.IR n ,
+insert the \fIn\fPth word from the previous command (the words
+in the previous command begin with word 0). A negative argument
+inserts the \fIn\fPth word from the end of the previous command.
+Once the argument \fIn\fP is computed, the argument is extracted
+as if the "!\fIn\fP" history expansion had been specified.
+.TP
+.B
+yank\-last\-arg (M\-.\^, M\-_\^)
+Insert the last argument to the previous command (the last word of
+the previous history entry). With an argument,
+behave exactly like \fByank\-nth\-arg\fP.
+Successive calls to \fByank\-last\-arg\fP move back through the history
+list, inserting the last argument of each line in turn.
+The history expansion facilities are used to extract the last argument,
+as if the "!$" history expansion had been specified.
+.TP
+.B shell\-expand\-line (M\-C\-e)
+Expand the line as the shell does. This
+performs alias and history expansion as well as all of the shell
+word expansions. See
+.SM
+.B HISTORY EXPANSION
+below for a description of history expansion.
+.TP
+.B history\-expand\-line (M\-^)
+Perform history expansion on the current line.
+See
+.SM
+.B HISTORY EXPANSION
+below for a description of history expansion.
+.TP
+.B magic\-space
+Perform history expansion on the current line and insert a space.
+See
+.SM
+.B HISTORY EXPANSION
+below for a description of history expansion.
+.TP
+.B alias\-expand\-line
+Perform alias expansion on the current line.
+See
+.SM
+.B ALIASES
+above for a description of alias expansion.
+.TP
+.B history\-and\-alias\-expand\-line
+Perform history and alias expansion on the current line.
+.TP
+.B insert\-last\-argument (M\-.\^, M\-_\^)
+A synonym for \fByank\-last\-arg\fP.
+.TP
+.B operate\-and\-get\-next (C\-o)
+Accept the current line for execution and fetch the next line
+relative to the current line from the history for editing. Any
+argument is ignored.
+.TP
+.B edit\-and\-execute\-command (C\-xC\-e)
+Invoke an editor on the current command line, and execute the result as shell
+commands.
+\fBBash\fP attempts to invoke
+.SM
+.BR $VISUAL ,
+.SM
+.BR $EDITOR ,
+and \fIemacs\fP as the editor, in that order.
+.PD
+.SS Commands for Changing Text
+.PP
+.PD 0
+.TP
+.B delete\-char (C\-d)
+Delete the character at point. If point is at the
+beginning of the line, there are no characters in the line, and
+the last character typed was not bound to \fBdelete\-char\fP,
+then return
+.SM
+.BR EOF .
+.TP
+.B backward\-delete\-char (Rubout)
+Delete the character behind the cursor. When given a numeric argument,
+save the deleted text on the kill ring.
+.TP
+.B forward\-backward\-delete\-char
+Delete the character under the cursor, unless the cursor is at the
+end of the line, in which case the character behind the cursor is
+deleted.
+.TP
+.B quoted\-insert (C\-q, C\-v)
+Add the next character typed to the line verbatim. This is
+how to insert characters like \fBC\-q\fP, for example.
+.TP
+.B tab\-insert (C\-v TAB)
+Insert a tab character.
+.TP
+.B self\-insert (a,\ b,\ A,\ 1,\ !,\ ...)
+Insert the character typed.
+.TP
+.B transpose\-chars (C\-t)
+Drag the character before point forward over the character at point,
+moving point forward as well.
+If point is at the end of the line, then this transposes
+the two characters before point.
+Negative arguments have no effect.
+.TP
+.B transpose\-words (M\-t)
+Drag the word before point past the word after point,
+moving point over that word as well.
+If point is at the end of the line, this transposes
+the last two words on the line.
+.TP
+.B upcase\-word (M\-u)
+Uppercase the current (or following) word. With a negative argument,
+uppercase the previous word, but do not move point.
+.TP
+.B downcase\-word (M\-l)
+Lowercase the current (or following) word. With a negative argument,
+lowercase the previous word, but do not move point.
+.TP
+.B capitalize\-word (M\-c)
+Capitalize the current (or following) word. With a negative argument,
+capitalize the previous word, but do not move point.
+.TP
+.B overwrite\-mode
+Toggle overwrite mode. With an explicit positive numeric argument,
+switches to overwrite mode. With an explicit non-positive numeric
+argument, switches to insert mode. This command affects only
+\fBemacs\fP mode; \fBvi\fP mode does overwrite differently.
+Each call to \fIreadline()\fP starts in insert mode.
+In overwrite mode, characters bound to \fBself\-insert\fP replace
+the text at point rather than pushing the text to the right.
+Characters bound to \fBbackward\-delete\-char\fP replace the character
+before point with a space. By default, this command is unbound.
+.PD
+.SS Killing and Yanking
+.PP
+.PD 0
+.TP
+.B kill\-line (C\-k)
+Kill the text from point to the end of the line.
+.TP
+.B backward\-kill\-line (C\-x Rubout)
+Kill backward to the beginning of the line.
+.TP
+.B unix\-line\-discard (C\-u)
+Kill backward from point to the beginning of the line.
+The killed text is saved on the kill-ring.
+.\" There is no real difference between this and backward-kill-line
+.TP
+.B kill\-whole\-line
+Kill all characters on the current line, no matter where point is.
+.TP
+.B kill\-word (M\-d)
+Kill from point to the end of the current word, or if between
+words, to the end of the next word.
+Word boundaries are the same as those used by \fBforward\-word\fP.
+.TP
+.B backward\-kill\-word (M\-Rubout)
+Kill the word behind point.
+Word boundaries are the same as those used by \fBbackward\-word\fP.
+.TP
+.B shell\-kill\-word (M\-d)
+Kill from point to the end of the current word, or if between
+words, to the end of the next word.
+Word boundaries are the same as those used by \fBshell\-forward\-word\fP.
+.TP
+.B shell\-backward\-kill\-word (M\-Rubout)
+Kill the word behind point.
+Word boundaries are the same as those used by \fBshell\-backward\-word\fP.
+.TP
+.B unix\-word\-rubout (C\-w)
+Kill the word behind point, using white space as a word boundary.
+The killed text is saved on the kill-ring.
+.TP
+.B unix\-filename\-rubout
+Kill the word behind point, using white space and the slash character
+as the word boundaries.
+The killed text is saved on the kill-ring.
+.TP
+.B delete\-horizontal\-space (M\-\e)
+Delete all spaces and tabs around point.
+.TP
+.B kill\-region
+Kill the text in the current region.
+.TP
+.B copy\-region\-as\-kill
+Copy the text in the region to the kill buffer.
+.TP
+.B copy\-backward\-word
+Copy the word before point to the kill buffer.
+The word boundaries are the same as \fBbackward\-word\fP.
+.TP
+.B copy\-forward\-word
+Copy the word following point to the kill buffer.
+The word boundaries are the same as \fBforward\-word\fP.
+.TP
+.B yank (C\-y)
+Yank the top of the kill ring into the buffer at point.
+.TP
+.B yank\-pop (M\-y)
+Rotate the kill ring, and yank the new top. Only works following
+.B yank
+or
+.BR yank\-pop .
+.PD
+.SS Numeric Arguments
+.PP
+.PD 0
+.TP
+.B digit\-argument (M\-0, M\-1, ..., M\-\-)
+Add this digit to the argument already accumulating, or start a new
+argument. M\-\- starts a negative argument.
+.TP
+.B universal\-argument
+This is another way to specify an argument.
+If this command is followed by one or more digits, optionally with a
+leading minus sign, those digits define the argument.
+If the command is followed by digits, executing
+.B universal\-argument
+again ends the numeric argument, but is otherwise ignored.
+As a special case, if this command is immediately followed by a
+character that is neither a digit or minus sign, the argument count
+for the next command is multiplied by four.
+The argument count is initially one, so executing this function the
+first time makes the argument count four, a second time makes the
+argument count sixteen, and so on.
+.PD
+.SS Completing
+.PP
+.PD 0
+.TP
+.B complete (TAB)
+Attempt to perform completion on the text before point.
+.B Bash
+attempts completion treating the text as a variable (if the
+text begins with \fB$\fP), username (if the text begins with
+\fB~\fP), hostname (if the text begins with \fB@\fP), or
+command (including aliases and functions) in turn. If none
+of these produces a match, filename completion is attempted.
+.TP
+.B possible\-completions (M\-?)
+List the possible completions of the text before point.
+.TP
+.B insert\-completions (M\-*)
+Insert all completions of the text before point
+that would have been generated by
+\fBpossible\-completions\fP.
+.TP
+.B menu\-complete
+Similar to \fBcomplete\fP, but replaces the word to be completed
+with a single match from the list of possible completions.
+Repeated execution of \fBmenu\-complete\fP steps through the list
+of possible completions, inserting each match in turn.
+At the end of the list of completions, the bell is rung
+(subject to the setting of \fBbell\-style\fP)
+and the original text is restored.
+An argument of \fIn\fP moves \fIn\fP positions forward in the list
+of matches; a negative argument may be used to move backward
+through the list.
+This command is intended to be bound to \fBTAB\fP, but is unbound
+by default.
+.TP
+.B menu\-complete-\backward
+Identical to \fBmenu\-complete\fP, but moves backward through the list
+of possible completions, as if \fBmenu\-complete\fP had been given a
+negative argument. This command is unbound by default.
+.TP
+.B delete\-char\-or\-list
+Deletes the character under the cursor if not at the beginning or
+end of the line (like \fBdelete\-char\fP).
+If at the end of the line, behaves identically to
+\fBpossible\-completions\fP.
+This command is unbound by default.
+.TP
+.B complete\-filename (M\-/)
+Attempt filename completion on the text before point.
+.TP
+.B possible\-filename\-completions (C\-x /)
+List the possible completions of the text before point,
+treating it as a filename.
+.TP
+.B complete\-username (M\-~)
+Attempt completion on the text before point, treating
+it as a username.
+.TP
+.B possible\-username\-completions (C\-x ~)
+List the possible completions of the text before point,
+treating it as a username.
+.TP
+.B complete\-variable (M\-$)
+Attempt completion on the text before point, treating
+it as a shell variable.
+.TP
+.B possible\-variable\-completions (C\-x $)
+List the possible completions of the text before point,
+treating it as a shell variable.
+.TP
+.B complete\-hostname (M\-@)
+Attempt completion on the text before point, treating
+it as a hostname.
+.TP
+.B possible\-hostname\-completions (C\-x @)
+List the possible completions of the text before point,
+treating it as a hostname.
+.TP
+.B complete\-command (M\-!)
+Attempt completion on the text before point, treating
+it as a command name. Command completion attempts to
+match the text against aliases, reserved words, shell
+functions, shell builtins, and finally executable filenames,
+in that order.
+.TP
+.B possible\-command\-completions (C\-x !)
+List the possible completions of the text before point,
+treating it as a command name.
+.TP
+.B dynamic\-complete\-history (M\-TAB)
+Attempt completion on the text before point, comparing
+the text against lines from the history list for possible
+completion matches.
+.TP
+.B dabbrev\-expand
+Attempt menu completion on the text before point, comparing
+the text against lines from the history list for possible
+completion matches.
+.TP
+.B complete\-into\-braces (M\-{)
+Perform filename completion and insert the list of possible completions
+enclosed within braces so the list is available to the shell (see
+.B Brace Expansion
+above).
+.PD
+.SS Keyboard Macros
+.PP
+.PD 0
+.TP
+.B start\-kbd\-macro (C\-x (\^)
+Begin saving the characters typed into the current keyboard macro.
+.TP
+.B end\-kbd\-macro (C\-x )\^)
+Stop saving the characters typed into the current keyboard macro
+and store the definition.
+.TP
+.B call\-last\-kbd\-macro (C\-x e)
+Re-execute the last keyboard macro defined, by making the characters
+in the macro appear as if typed at the keyboard.
+.PD
+.SS Miscellaneous
+.PP
+.PD 0
+.TP
+.B re\-read\-init\-file (C\-x C\-r)
+Read in the contents of the \fIinputrc\fP file, and incorporate
+any bindings or variable assignments found there.
+.TP
+.B abort (C\-g)
+Abort the current editing command and
+ring the terminal's bell (subject to the setting of
+.BR bell\-style ).
+.TP
+.B do\-uppercase\-version (M\-a, M\-b, M\-\fIx\fP, ...)
+If the metafied character \fIx\fP is lowercase, run the command
+that is bound to the corresponding uppercase character.
+.TP
+.B prefix\-meta (ESC)
+Metafy the next character typed.
+.SM
+.B ESC
+.B f
+is equivalent to
+.BR Meta\-f .
+.TP
+.B undo (C\-_, C\-x C\-u)
+Incremental undo, separately remembered for each line.
+.TP
+.B revert\-line (M\-r)
+Undo all changes made to this line. This is like executing the
+.B undo
+command enough times to return the line to its initial state.
+.TP
+.B tilde\-expand (M\-&)
+Perform tilde expansion on the current word.
+.TP
+.B set\-mark (C\-@, M\-<space>)
+Set the mark to the point. If a
+numeric argument is supplied, the mark is set to that position.
+.TP
+.B exchange\-point\-and\-mark (C\-x C\-x)
+Swap the point with the mark. The current cursor position is set to
+the saved position, and the old cursor position is saved as the mark.
+.TP
+.B character\-search (C\-])
+A character is read and point is moved to the next occurrence of that
+character. A negative count searches for previous occurrences.
+.TP
+.B character\-search\-backward (M\-C\-])
+A character is read and point is moved to the previous occurrence of that
+character. A negative count searches for subsequent occurrences.
+.TP
+.B skip\-csi\-sequence ()
+Read enough characters to consume a multi-key sequence such as those
+defined for keys like Home and End. Such sequences begin with a
+Control Sequence Indicator (CSI), usually ESC\-[. If this sequence is
+bound to "\e[", keys producing such sequences will have no effect
+unless explicitly bound to a readline command, instead of inserting
+stray characters into the editing buffer. This is unbound by default,
+but usually bound to ESC\-[.
+.TP
+.B insert\-comment (M\-#)
+Without a numeric argument, the value of the readline
+.B comment\-begin
+variable is inserted at the beginning of the current line.
+If a numeric argument is supplied, this command acts as a toggle: if
+the characters at the beginning of the line do not match the value
+of \fBcomment\-begin\fP, the value is inserted, otherwise
+the characters in \fBcomment\-begin\fP are deleted from the beginning of
+the line.
+In either case, the line is accepted as if a newline had been typed.
+The default value of
+\fBcomment\-begin\fP causes this command to make the current line
+a shell comment.
+If a numeric argument causes the comment character to be removed, the line
+will be executed by the shell.
+.TP
+.B glob\-complete\-word (M\-g)
+The word before point is treated as a pattern for pathname expansion,
+with an asterisk implicitly appended. This pattern is used to
+generate a list of matching file names for possible completions.
+.TP
+.B glob\-expand\-word (C\-x *)
+The word before point is treated as a pattern for pathname expansion,
+and the list of matching file names is inserted, replacing the word.
+If a numeric argument is supplied, an asterisk is appended before
+pathname expansion.
+.TP
+.B glob\-list\-expansions (C\-x g)
+The list of expansions that would have been generated by
+.B glob\-expand\-word
+is displayed, and the line is redrawn.
+If a numeric argument is supplied, an asterisk is appended before
+pathname expansion.
+.TP
+.B dump\-functions
+Print all of the functions and their key bindings to the
+readline output stream. If a numeric argument is supplied,
+the output is formatted in such a way that it can be made part
+of an \fIinputrc\fP file.
+.TP
+.B dump\-variables
+Print all of the settable readline variables and their values to the
+readline output stream. If a numeric argument is supplied,
+the output is formatted in such a way that it can be made part
+of an \fIinputrc\fP file.
+.TP
+.B dump\-macros
+Print all of the readline key sequences bound to macros and the
+strings they output. If a numeric argument is supplied,
+the output is formatted in such a way that it can be made part
+of an \fIinputrc\fP file.
+.TP
+.B display\-shell\-version (C\-x C\-v)
+Display version information about the current instance of
+.BR bash .
+.PD
+.SS Programmable Completion
+.PP
+When word completion is attempted for an argument to a command for
+which a completion specification (a \fIcompspec\fP) has been defined
+using the \fBcomplete\fP builtin (see
+.SM
+.B "SHELL BUILTIN COMMANDS"
+below), the programmable completion facilities are invoked.
+.PP
+First, the command name is identified.
+If the command word is the empty string (completion attempted at the
+beginning of an empty line), any compspec defined with
+the \fB\-E\fP option to \fBcomplete\fP is used.
+If a compspec has been defined for that command, the
+compspec is used to generate the list of possible completions for the word.
+If the command word is a full pathname, a compspec for the full
+pathname is searched for first.
+If no compspec is found for the full pathname, an attempt is made to
+find a compspec for the portion following the final slash.
+If those searches to not result in a compspec, any compspec defined with
+the \fB\-D\fP option to \fBcomplete\fP is used as the default.
+.PP
+Once a compspec has been found, it is used to generate the list of
+matching words.
+If a compspec is not found, the default \fBbash\fP completion as
+described above under \fBCompleting\fP is performed.
+.PP
+First, the actions specified by the compspec are used.
+Only matches which are prefixed by the word being completed are
+returned.
+When the
+.B \-f
+or
+.B \-d
+option is used for filename or directory name completion, the shell
+variable
+.SM
+.B FIGNORE
+is used to filter the matches.
+.PP
+Any completions specified by a pathname expansion pattern to the
+\fB\-G\fP option are generated next.
+The words generated by the pattern need not match the word
+being completed.
+The
+.SM
+.B GLOBIGNORE
+shell variable is not used to filter the matches, but the
+.SM
+.B FIGNORE
+variable is used.
+.PP
+Next, the string specified as the argument to the \fB\-W\fP option
+is considered.
+The string is first split using the characters in the
+.SM
+.B IFS
+special variable as delimiters.
+Shell quoting is honored.
+Each word is then expanded using
+brace expansion, tilde expansion, parameter and variable expansion,
+command substitution, and arithmetic expansion,
+as described above under
+.SM
+.BR EXPANSION .
+The results are split using the rules described above under
+\fBWord Splitting\fP.
+The results of the expansion are prefix-matched against the word being
+completed, and the matching words become the possible completions.
+.PP
+After these matches have been generated, any shell function or command
+specified with the \fB\-F\fP and \fB\-C\fP options is invoked.
+When the command or function is invoked, the
+.SM
+.BR COMP_LINE ,
+.SM
+.BR COMP_POINT ,
+.SM
+.BR COMP_KEY ,
+and
+.SM
+.B COMP_TYPE
+variables are assigned values as described above under
+\fBShell Variables\fP.
+If a shell function is being invoked, the
+.SM
+.B COMP_WORDS
+and
+.SM
+.B COMP_CWORD
+variables are also set.
+When the function or command is invoked, the first argument is the
+name of the command whose arguments are being completed, the
+second argument is the word being completed, and the third argument
+is the word preceding the word being completed on the current command line.
+No filtering of the generated completions against the word being completed
+is performed; the function or command has complete freedom in generating
+the matches.
+.PP
+Any function specified with \fB\-F\fP is invoked first.
+The function may use any of the shell facilities, including the
+\fBcompgen\fP builtin described below, to generate the matches.
+It must put the possible completions in the
+.SM
+.B COMPREPLY
+array variable.
+.PP
+Next, any command specified with the \fB\-C\fP option is invoked
+in an environment equivalent to command substitution.
+It should print a list of completions, one per line, to the
+standard output.
+Backslash may be used to escape a newline, if necessary.
+.PP
+After all of the possible completions are generated, any filter
+specified with the \fB\-X\fP option is applied to the list.
+The filter is a pattern as used for pathname expansion; a \fB&\fP
+in the pattern is replaced with the text of the word being completed.
+A literal \fB&\fP may be escaped with a backslash; the backslash
+is removed before attempting a match.
+Any completion that matches the pattern will be removed from the list.
+A leading \fB!\fP negates the pattern; in this case any completion
+not matching the pattern will be removed.
+.PP
+Finally, any prefix and suffix specified with the \fB\-P\fP and \fB\-S\fP
+options are added to each member of the completion list, and the result is
+returned to the readline completion code as the list of possible
+completions.
+.PP
+If the previously-applied actions do not generate any matches, and the
+\fB\-o dirnames\fP option was supplied to \fBcomplete\fP when the
+compspec was defined, directory name completion is attempted.
+.PP
+If the \fB\-o plusdirs\fP option was supplied to \fBcomplete\fP when the
+compspec was defined, directory name completion is attempted and any
+matches are added to the results of the other actions.
+.PP
+By default, if a compspec is found, whatever it generates is returned
+to the completion code as the full set of possible completions.
+The default \fBbash\fP completions are not attempted, and the readline
+default of filename completion is disabled.
+If the \fB\-o bashdefault\fP option was supplied to \fBcomplete\fP when
+the compspec was defined, the \fBbash\fP default completions are attempted
+if the compspec generates no matches.
+If the \fB\-o default\fP option was supplied to \fBcomplete\fP when the
+compspec was defined, readline's default completion will be performed
+if the compspec (and, if attempted, the default \fBbash\fP completions)
+generate no matches.
+.PP
+When a compspec indicates that directory name completion is desired,
+the programmable completion functions force readline to append a slash
+to completed names which are symbolic links to directories, subject to
+the value of the \fBmark\-directories\fP readline variable, regardless
+of the setting of the \fBmark-symlinked\-directories\fP readline variable.
+.PP
+There is some support for dynamically modifying completions. This is
+most useful when used in combination with a default completion specified
+with \fBcomplete -D\fP.
+It's possible for shell functions executed as completion
+handlers to indicate that completion should be retried by returning an
+exit status of 124. If a shell function returns 124, and changes
+the compspec associated with the command on which completion is being
+attempted (supplied as the first argument when the function is executed),
+programmable completion restarts from the beginning, with an
+attempt to find a compspec for that command. This allows a set of
+completions to be built dynamically as completion is attempted, rather than
+being loaded all at once.
+.PP
+For instance, assuming that there is a library of compspecs, each kept in a
+file corresponding to the name of the command, the following default
+completion function would load completions dynamically:
+.PP
+\f(CW_completion_loader()
+.br
+{
+.br
+ . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124
+.br
+}
+.br
+complete -D -F _completion_loader
+.br
+\fP
+.SH HISTORY
+When the
+.B \-o history
+option to the
+.B set
+builtin is enabled, the shell provides access to the
+\fIcommand history\fP,
+the list of commands previously typed.
+The value of the
+.SM
+.B HISTSIZE
+variable is used as the
+number of commands to save in a history list.
+The text of the last
+.SM
+.B HISTSIZE
+commands (default 500) is saved. The shell
+stores each command in the history list prior to parameter and
+variable expansion (see
+.SM
+.B EXPANSION
+above) but after history expansion is performed, subject to the
+values of the shell variables
+.SM
+.B HISTIGNORE
+and
+.SM
+.BR HISTCONTROL .
+.PP
+On startup, the history is initialized from the file named by
+the variable
+.SM
+.B HISTFILE
+(default \fI~/.bash_history\fP).
+The file named by the value of
+.SM
+.B HISTFILE
+is truncated, if necessary, to contain no more than
+the number of lines specified by the value of
+.SM
+.BR HISTFILESIZE .
+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.
+These timestamps are optionally displayed depending on the value of the
+.SM
+.B HISTTIMEFORMAT
+variable.
+When an interactive shell exits, the last
+.SM
+.B $HISTSIZE
+lines are copied from the history list to
+.SM
+.BR $HISTFILE .
+If the
+.B histappend
+shell option is enabled
+(see the description of
+.B shopt
+under
+.SM
+.B "SHELL BUILTIN COMMANDS"
+below), the lines are appended to the history file,
+otherwise the history file is overwritten.
+If
+.SM
+.B HISTFILE
+is unset, or if the history file is unwritable, the history is
+not saved.
+If the
+.SM
+.B HISTTIMEFORMAT
+variable is set, time stamps are written to the history file, marked
+with the history comment character, so
+they may be preserved across shell sessions.
+This uses the history comment character to distinguish timestamps from
+other history lines.
+After saving the history, the history file is truncated
+to contain no more than
+.SM
+.B HISTFILESIZE
+lines. If
+.SM
+.B HISTFILESIZE
+is not set, no truncation is performed.
+.PP
+The builtin command
+.B fc
+(see
+.SM
+.B SHELL BUILTIN COMMANDS
+below) may be used to list or edit and re-execute a portion of
+the history list.
+The
+.B 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.
+.PP
+The shell allows control over which commands are saved on the history
+list. The
+.SM
+.B HISTCONTROL
+and
+.SM
+.B HISTIGNORE
+variables may be set to cause the shell to save only a subset of the
+commands entered.
+The
+.B 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
+.B lithist
+shell option causes the shell to save the command with embedded newlines
+instead of semicolons. See the description of the
+.B shopt
+builtin below under
+.SM
+.B "SHELL BUILTIN COMMANDS"
+for information on setting and unsetting shell options.
+.SH "HISTORY EXPANSION"
+.PP
+The shell supports a history expansion feature that
+is similar to the history expansion in
+.BR csh.
+This section describes what syntax features are available. This
+feature is enabled by default for interactive shells, and can be
+disabled using the
+.B \+H
+option to the
+.B set
+builtin command (see
+.SM
+.B SHELL BUILTIN COMMANDS
+below). Non-interactive shells do not perform history expansion
+by default.
+.PP
+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.
+.PP
+History expansion is performed immediately after a complete line
+is read, before the shell breaks it into words.
+It takes place in two parts.
+The first is to determine which line from the history list
+to use during substitution.
+The second is to select portions of that line for inclusion into
+the current one.
+The line selected from the history is the \fIevent\fP,
+and the portions of that line that are acted upon are \fIwords\fP.
+Various \fImodifiers\fP are available to manipulate the selected words.
+The line is broken into words in the same fashion as when reading input,
+so that several \fImetacharacter\fP-separated words surrounded by
+quotes are considered one word.
+History expansions are introduced by the appearance of the
+history expansion character, which is \^\fB!\fP\^ by default.
+Only backslash (\^\fB\e\fP\^) and single quotes can quote
+the history expansion character.
+.PP
+Several characters inhibit history expansion if found immediately
+following the history expansion character, even if it is unquoted:
+space, tab, newline, carriage return, and \fB=\fP.
+If the \fBextglob\fP shell option is enabled, \fB(\fP will also
+inhibit expansion.
+.PP
+Several shell options settable with the
+.B shopt
+builtin may be used to tailor the behavior of history expansion.
+If the
+.B histverify
+shell option is enabled (see the description of the
+.B shopt
+builtin below), and
+.B readline
+is being used, history substitutions are not immediately passed to
+the shell parser.
+Instead, the expanded line is reloaded into the
+.B readline
+editing buffer for further modification.
+If
+.B readline
+is being used, and the
+.B histreedit
+shell option is enabled, a failed history substitution will be reloaded
+into the
+.B readline
+editing buffer for correction.
+The
+.B \-p
+option to the
+.B history
+builtin command may be used to see what a history expansion will
+do before using it.
+The
+.B \-s
+option to the
+.B 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.
+.PP
+The shell allows control of the various characters used by the
+history expansion mechanism (see the description of
+.B histchars
+above under
+.BR "Shell Variables" ).
+The shell uses
+the history comment character to mark history timestamps when
+writing the history file.
+.SS Event Designators
+.PP
+An event designator is a reference to a command line entry in the
+history list.
+.PP
+.PD 0
+.TP
+.B !
+Start a history substitution, except when followed by a
+.BR blank ,
+newline, carriage return, =
+or ( (when the \fBextglob\fP shell option is enabled using
+the \fBshopt\fP builtin).
+.TP
+.B !\fIn\fR
+Refer to command line
+.IR n .
+.TP
+.B !\-\fIn\fR
+Refer to the current command line minus
+.IR n .
+.TP
+.B !!
+Refer to the previous command. This is a synonym for `!\-1'.
+.TP
+.B !\fIstring\fR
+Refer to the most recent command starting with
+.IR string .
+.TP
+.B !?\fIstring\fR\fB[?]\fR
+Refer to the most recent command containing
+.IR string .
+The trailing \fB?\fP may be omitted if
+.I string
+is followed immediately by a newline.
+.TP
+.B \d\s+2^\s-2\u\fIstring1\fP\d\s+2^\s-2\u\fIstring2\fP\d\s+2^\s-2\u
+Quick substitution. Repeat the last command, replacing
+.I string1
+with
+.IR string2 .
+Equivalent to
+``!!:s/\fIstring1\fP/\fIstring2\fP/''
+(see \fBModifiers\fP below).
+.TP
+.B !#
+The entire command line typed so far.
+.PD
+.SS Word Designators
+.PP
+Word designators are used to select desired words from the event.
+A
+.B :
+separates the event specification from the word designator.
+It may be omitted if the word designator begins with a
+.BR ^ ,
+.BR $ ,
+.BR * ,
+.BR \- ,
+or
+.BR % .
+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.
+.PP
+.PD 0
+.TP
+.B 0 (zero)
+The zeroth word. For the shell, this is the command
+word.
+.TP
+.I n
+The \fIn\fRth word.
+.TP
+.B ^
+The first argument. That is, word 1.
+.TP
+.B $
+The last argument.
+.TP
+.B %
+The word matched by the most recent `?\fIstring\fR?' search.
+.TP
+.I x\fB\-\fPy
+A range of words; `\-\fIy\fR' abbreviates `0\-\fIy\fR'.
+.TP
+.B *
+All of the words but the zeroth. This is a synonym
+for `\fI1\-$\fP'. It is not an error to use
+.B *
+if there is just one
+word in the event; the empty string is returned in that case.
+.TP
+.B x*
+Abbreviates \fIx\-$\fP.
+.TP
+.B x\-
+Abbreviates \fIx\-$\fP like \fBx*\fP, but omits the last word.
+.PD
+.PP
+If a word designator is supplied without an event specification, the
+previous command is used as the event.
+.SS Modifiers
+.PP
+After the optional word designator, there may appear a sequence of
+one or more of the following modifiers, each preceded by a `:'.
+.PP
+.PD 0
+.PP
+.TP
+.B h
+Remove a trailing file name component, leaving only the head.
+.TP
+.B t
+Remove all leading file name components, leaving the tail.
+.TP
+.B r
+Remove a trailing suffix of the form \fI.xxx\fP, leaving the
+basename.
+.TP
+.B e
+Remove all but the trailing suffix.
+.TP
+.B p
+Print the new command but do not execute it.
+.TP
+.B q
+Quote the substituted words, escaping further substitutions.
+.TP
+.B x
+Quote the substituted words as with
+.BR q ,
+but break into words at
+.B blanks
+and newlines.
+.TP
+.B s/\fIold\fP/\fInew\fP/
+Substitute
+.I new
+for the first occurrence of
+.I old
+in the event line. Any delimiter can be used in place of /. The
+final delimiter is optional if it is the last character of the
+event line. The delimiter may be quoted in
+.I old
+and
+.I new
+with a single backslash. If & appears in
+.IR new ,
+it is replaced by
+.IR old .
+A single backslash will quote the &. If
+.I old
+is null, it is set to the last
+.I old
+substituted, or, if no previous history substitutions took place,
+the last
+.I string
+in a
+.B !?\fIstring\fR\fB[?]\fR
+search.
+.TP
+.B &
+Repeat the previous substitution.
+.TP
+.B g
+Cause changes to be applied over the entire event line. This is
+used in conjunction with `\fB:s\fP' (e.g., `\fB:gs/\fIold\fP/\fInew\fP/\fR')
+or `\fB:&\fP'. If used with
+`\fB:s\fP', any delimiter can be used
+in place of /, and the final delimiter is optional
+if it is the last character of the event line.
+An \fBa\fP may be used as a synonym for \fBg\fP.
+.TP
+.B G
+Apply the following `\fBs\fP' modifier once to each word in the event line.
+.PD
+.SH "SHELL BUILTIN COMMANDS"
+.\" start of bash_builtins
+.zZ
+.PP
+Unless otherwise noted, each builtin command documented in this
+section as accepting options preceded by
+.B \-
+accepts
+.B \-\-
+to signify the end of the options.
+The \fB:\fP, \fBtrue\fP, \fBfalse\fP, and \fBtest\fP builtins
+do not accept options and do not treat \fB\-\-\fP specially.
+The \fBexit\fP, \fBlogout\fP, \fBbreak\fP, \fBcontinue\fP, \fBlet\fP,
+and \fBshift\fP builtins accept and process arguments beginning with
+\fB\-\fP without requiring \fB\-\-\fP.
+Other builtins that accept arguments but are not specified as accepting
+options interpret arguments beginning with \fB\-\fP as invalid options and
+require \fB\-\-\fP to prevent this interpretation.
+.sp .5
+.PD 0
+.TP
+\fB:\fP [\fIarguments\fP]
+.PD
+No effect; the command does nothing beyond expanding
+.I arguments
+and performing any specified
+redirections. A zero exit code is returned.
+.TP
+\fB .\| \fP \fIfilename\fP [\fIarguments\fP]
+.PD 0
+.TP
+\fBsource\fP \fIfilename\fP [\fIarguments\fP]
+.PD
+Read and execute commands from
+.I filename
+in the current
+shell environment and return the exit status of the last command
+executed from
+.IR filename .
+If
+.I filename
+does not contain a slash, file names in
+.SM
+.B PATH
+are used to find the directory containing
+.IR filename .
+The file searched for in
+.SM
+.B PATH
+need not be executable.
+When \fBbash\fP is not in \fIposix mode\fP, the current directory is
+searched if no file is found in
+.SM
+.BR PATH .
+If the
+.B sourcepath
+option to the
+.B shopt
+builtin command is turned off, the
+.SM
+.B PATH
+is not searched.
+If any \fIarguments\fP are supplied, they become the positional
+parameters when \fIfilename\fP is executed. Otherwise the positional
+parameters are unchanged.
+The return status is the status of the last command exited within
+the script (0 if no commands are executed), and false if
+.I filename
+is not found or cannot be read.
+.TP
+\fBalias\fP [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...]
+\fBAlias\fP with no arguments or with the
+.B \-p
+option prints the list of aliases in the form
+\fBalias\fP \fIname\fP=\fIvalue\fP on standard output.
+When arguments are supplied, an alias is defined for
+each \fIname\fP whose \fIvalue\fP is given.
+A trailing space in \fIvalue\fP causes the next word to be
+checked for alias substitution when the alias is expanded.
+For each \fIname\fP in the argument list for which no \fIvalue\fP
+is supplied, the name and value of the alias is printed.
+\fBAlias\fP returns true unless a \fIname\fP is given for which
+no alias has been defined.
+.TP
+\fBbg\fP [\fIjobspec\fP ...]
+Resume each suspended job \fIjobspec\fP in the background, as if it
+had been started with
+.BR & .
+If
+.I jobspec
+is not present, the shell's notion of the \fIcurrent job\fP is used.
+.B bg
+.I jobspec
+returns 0 unless run when job control is disabled or, when run with
+job control enabled, any specified \fIjobspec\fP was not found
+or was started without job control.
+.TP
+\fBbind\fP [\fB\-m\fP \fIkeymap\fP] [\fB\-lpsvPSV\fP]
+.PD 0
+.TP
+\fBbind\fP [\fB\-m\fP \fIkeymap\fP] [\fB\-q\fP \fIfunction\fP] [\fB\-u\fP \fIfunction\fP] [\fB\-r\fP \fIkeyseq\fP]
+.TP
+\fBbind\fP [\fB\-m\fP \fIkeymap\fP] \fB\-f\fP \fIfilename\fP
+.TP
+\fBbind\fP [\fB\-m\fP \fIkeymap\fP] \fB\-x\fP \fIkeyseq\fP:\fIshell\-command\fP
+.TP
+\fBbind\fP [\fB\-m\fP \fIkeymap\fP] \fIkeyseq\fP:\fIfunction\-name\fP
+.TP
+\fBbind\fP \fIreadline\-command\fP
+.PD
+Display current
+.B readline
+key and function bindings, bind a key sequence to a
+.B readline
+function or macro, or set a
+.B readline
+variable.
+Each non-option argument is a command as it would appear in
+.IR .inputrc ,
+but each binding or command must be passed as a separate argument;
+e.g., '"\eC\-x\eC\-r": re\-read\-init\-file'.
+Options, if supplied, have the following meanings:
+.RS
+.PD 0
+.TP
+.B \-m \fIkeymap\fP
+Use
+.I keymap
+as the keymap to be affected by the subsequent bindings.
+Acceptable
+.I keymap
+names are
+\fIemacs, emacs\-standard, emacs\-meta, emacs\-ctlx, vi,
+vi\-move, vi\-command\fP, and
+.IR vi\-insert .
+\fIvi\fP is equivalent to \fIvi\-command\fP; \fIemacs\fP is
+equivalent to \fIemacs\-standard\fP.
+.TP
+.B \-l
+List the names of all \fBreadline\fP functions.
+.TP
+.B \-p
+Display \fBreadline\fP function names and bindings in such a way
+that they can be re-read.
+.TP
+.B \-P
+List current \fBreadline\fP function names and bindings.
+.TP
+.B \-s
+Display \fBreadline\fP key sequences bound to macros and the strings
+they output in such a way that they can be re-read.
+.TP
+.B \-S
+Display \fBreadline\fP key sequences bound to macros and the strings
+they output.
+.TP
+.B \-v
+Display \fBreadline\fP variable names and values in such a way that they
+can be re-read.
+.TP
+.B \-V
+List current \fBreadline\fP variable names and values.
+.TP
+.B \-f \fIfilename\fP
+Read key bindings from \fIfilename\fP.
+.TP
+.B \-q \fIfunction\fP
+Query about which keys invoke the named \fIfunction\fP.
+.TP
+.B \-u \fIfunction\fP
+Unbind all keys bound to the named \fIfunction\fP.
+.TP
+.B \-r \fIkeyseq\fP
+Remove any current binding for \fIkeyseq\fP.
+.TP
+.B \-x \fIkeyseq\fP:\fIshell\-command\fP
+Cause \fIshell\-command\fP to be executed whenever \fIkeyseq\fP is
+entered.
+When \fIshell\-command\fP is executed, the shell sets the
+.SM
+.B READLINE_LINE
+variable to the contents of the \fBreadline\fP line buffer and the
+.SM
+.B READLINE_POINT
+variable to the current location of the insertion point.
+If the executed command changes the value of
+.SM
+.B READLINE_LINE
+or
+.SM
+.BR READLINE_POINT ,
+those new values will be reflected in the editing state.
+.PD
+.PP
+The return value is 0 unless an unrecognized option is given or an
+error occurred.
+.RE
+.TP
+\fBbreak\fP [\fIn\fP]
+Exit from within a
+.BR for ,
+.BR while ,
+.BR until ,
+or
+.B select
+loop. If \fIn\fP is specified, break \fIn\fP levels.
+.I n
+must be \(>= 1. If
+.I n
+is greater than the number of enclosing loops, all enclosing loops
+are exited.
+The return value is 0 unless \fIn\fP is not greater than or equal to 1.
+.TP
+\fBbuiltin\fP \fIshell\-builtin\fP [\fIarguments\fP]
+Execute the specified shell builtin, passing it
+.IR arguments ,
+and return its exit status.
+This is useful when defining a
+function whose name is the same as a shell builtin,
+retaining the functionality of the builtin within the function.
+The \fBcd\fP builtin is commonly redefined this way.
+The return status is false if
+.I shell\-builtin
+is not a shell builtin command.
+.TP
+\fBcaller\fP [\fIexpr\fP]
+Returns the context of any active subroutine call (a shell function or
+a script executed with the \fB.\fP or \fBsource\fP builtins.
+Without \fIexpr\fP, \fBcaller\fP displays the line number and source
+filename of the current subroutine call.
+If a non-negative integer is supplied as \fIexpr\fP, \fBcaller\fP
+displays the line number, subroutine name, and source file corresponding
+to that position in the current execution call stack. This extra
+information may be used, for example, to print a stack trace. The
+current frame is frame 0.
+The return value is 0 unless the shell is not executing a subroutine
+call or \fIexpr\fP does not correspond to a valid position in the
+call stack.
+.TP
+\fBcd\fP [\fB\-L|-P\fP] [\fIdir\fP]
+Change the current directory to \fIdir\fP. The variable
+.SM
+.B HOME
+is the
+default
+.IR dir .
+The variable
+.SM
+.B CDPATH
+defines the search path for the directory containing
+.IR dir .
+Alternative directory names in
+.SM
+.B CDPATH
+are separated by a colon (:). A null directory name in
+.SM
+.B CDPATH
+is the same as the current directory, i.e., ``\fB.\fP''. If
+.I dir
+begins with a slash (/),
+then
+.SM
+.B CDPATH
+is not used. The
+.B \-P
+option says to use the physical directory structure instead of
+following symbolic links (see also the
+.B \-P
+option to the
+.B set
+builtin command); the
+.B \-L
+option forces symbolic links to be followed. An argument of
+.B \-
+is equivalent to
+.SM
+.BR $OLDPWD .
+If a non-empty directory name from
+.SM
+.B CDPATH
+is used, or if
+\fB\-\fP is the first argument, and the directory change is
+successful, the absolute pathname of the new working directory is
+written to the standard output.
+The return value is true if the directory was successfully changed;
+false otherwise.
+.TP
+\fBcommand\fP [\fB\-pVv\fP] \fIcommand\fP [\fIarg\fP ...]
+Run
+.I command
+with
+.I args
+suppressing the normal shell function lookup. Only builtin
+commands or commands found in the
+.SM
+.B PATH
+are executed. If the
+.B \-p
+option is given, the search for
+.I command
+is performed using a default value for
+.SM
+.B PATH
+that is guaranteed to find all of the standard utilities.
+If either the
+.B \-V
+or
+.B \-v
+option is supplied, a description of
+.I command
+is printed. The
+.B \-v
+option causes a single word indicating the command or file name
+used to invoke
+.I command
+to be displayed; the
+.B \-V
+option produces a more verbose description.
+If the
+.B \-V
+or
+.B \-v
+option is supplied, the exit status is 0 if
+.I command
+was found, and 1 if not. If neither option is supplied and
+an error occurred or
+.I command
+cannot be found, the exit status is 127. Otherwise, the exit status of the
+.B command
+builtin is the exit status of
+.IR command .
+.TP
+\fBcompgen\fP [\fIoption\fP] [\fIword\fP]
+Generate possible completion matches for \fIword\fP according to
+the \fIoption\fPs, which may be any option accepted by the
+.B complete
+builtin with the exception of \fB\-p\fP and \fB\-r\fP, and write
+the matches to the standard output.
+When using the \fB\-F\fP or \fB\-C\fP options, the various shell variables
+set by the programmable completion facilities, while available, will not
+have useful values.
+.sp 1
+The matches will be generated in the same way as if the programmable
+completion code had generated them directly from a completion specification
+with the same flags.
+If \fIword\fP is specified, only those completions matching \fIword\fP
+will be displayed.
+.sp 1
+The return value is true unless an invalid option is supplied, or no
+matches were generated.
+.TP
+\fBcomplete\fP [\fB\-abcdefgjksuv\fP] [\fB\-o\fP \fIcomp-option\fP] [\fB\-DE\fP] [\fB\-A\fP \fIaction\fP] [\fB\-G\fP \fIglobpat\fP] [\fB\-W\fP \fIwordlist\fP] [\fB\-F\fP \fIfunction\fP] [\fB\-C\fP \fIcommand\fP]
+.br
+[\fB\-X\fP \fIfilterpat\fP] [\fB\-P\fP \fIprefix\fP] [\fB\-S\fP \fIsuffix\fP] \fIname\fP [\fIname ...\fP]
+.PD 0
+.TP
+\fBcomplete\fP \fB\-pr\fP [\fB\-DE\fP] [\fIname\fP ...]
+.PD
+Specify how arguments to each \fIname\fP should be completed.
+If the \fB\-p\fP option is supplied, or if no options are supplied,
+existing completion specifications are printed in a way that allows
+them to be reused as input.
+The \fB\-r\fP option removes a completion specification for
+each \fIname\fP, or, if no \fIname\fPs are supplied, all
+completion specifications.
+The \fB\-D\fP option indicates that the remaining options and actions should
+apply to the ``default'' command completion; that is, completion attempted
+on a command for which no completion has previously been defined.
+The \fB\-E\fP option indicates that the remaining options and actions should
+apply to ``empty'' command completion; that is, completion attempted on a
+blank line.
+.sp 1
+The process of applying these completion specifications when word completion
+is attempted is described above under \fBProgrammable Completion\fP.
+.sp 1
+Other options, if specified, have the following meanings.
+The arguments to the \fB\-G\fP, \fB\-W\fP, and \fB\-X\fP options
+(and, if necessary, the \fB\-P\fP and \fB\-S\fP options)
+should be quoted to protect them from expansion before the
+.B complete
+builtin is invoked.
+.RS
+.PD 0
+.TP 8
+\fB\-o\fP \fIcomp-option\fP
+The \fIcomp-option\fP controls several aspects of the compspec's behavior
+beyond the simple generation of completions.
+\fIcomp-option\fP may be one of:
+.RS
+.TP 8
+.B bashdefault
+Perform the rest of the default \fBbash\fP completions if the compspec
+generates no matches.
+.TP 8
+.B default
+Use readline's default filename completion if the compspec generates
+no matches.
+.TP 8
+.B dirnames
+Perform directory name completion if the compspec generates no matches.
+.TP 8
+.B filenames
+Tell readline that the compspec generates filenames, so it can perform any
+filename\-specific processing (like adding a slash to directory names,
+quoting special characters, or suppressing trailing spaces).
+Intended to be used with shell functions.
+.TP 8
+.B nospace
+Tell readline not to append a space (the default) to words completed at
+the end of the line.
+.TP 8
+.B plusdirs
+After any matches defined by the compspec are generated,
+directory name completion is attempted and any
+matches are added to the results of the other actions.
+.RE
+.TP 8
+\fB\-A\fP \fIaction\fP
+The \fIaction\fP may be one of the following to generate a list of possible
+completions:
+.RS
+.TP 8
+.B alias
+Alias names. May also be specified as \fB\-a\fP.
+.TP 8
+.B arrayvar
+Array variable names.
+.TP 8
+.B binding
+\fBReadline\fP key binding names.
+.TP 8
+.B builtin
+Names of shell builtin commands. May also be specified as \fB\-b\fP.
+.TP 8
+.B command
+Command names. May also be specified as \fB\-c\fP.
+.TP 8
+.B directory
+Directory names. May also be specified as \fB\-d\fP.
+.TP 8
+.B disabled
+Names of disabled shell builtins.
+.TP 8
+.B enabled
+Names of enabled shell builtins.
+.TP 8
+.B export
+Names of exported shell variables. May also be specified as \fB\-e\fP.
+.TP 8
+.B file
+File names. May also be specified as \fB\-f\fP.
+.TP 8
+.B function
+Names of shell functions.
+.TP 8
+.B group
+Group names. May also be specified as \fB\-g\fP.
+.TP 8
+.B helptopic
+Help topics as accepted by the \fBhelp\fP builtin.
+.TP 8
+.B hostname
+Hostnames, as taken from the file specified by the
+.SM
+.B HOSTFILE
+shell variable.
+.TP 8
+.B job
+Job names, if job control is active. May also be specified as \fB\-j\fP.
+.TP 8
+.B keyword
+Shell reserved words. May also be specified as \fB\-k\fP.
+.TP 8
+.B running
+Names of running jobs, if job control is active.
+.TP 8
+.B service
+Service names. May also be specified as \fB\-s\fP.
+.TP 8
+.B setopt
+Valid arguments for the \fB\-o\fP option to the \fBset\fP builtin.
+.TP 8
+.B shopt
+Shell option names as accepted by the \fBshopt\fP builtin.
+.TP 8
+.B signal
+Signal names.
+.TP 8
+.B stopped
+Names of stopped jobs, if job control is active.
+.TP 8
+.B user
+User names. May also be specified as \fB\-u\fP.
+.TP 8
+.B variable
+Names of all shell variables. May also be specified as \fB\-v\fP.
+.RE
+.TP 8
+\fB\-G\fP \fIglobpat\fP
+The pathname expansion pattern \fIglobpat\fP is expanded to generate
+the possible completions.
+.TP 8
+\fB\-W\fP \fIwordlist\fP
+The \fIwordlist\fP is split using the characters in the
+.SM
+.B IFS
+special variable as delimiters, and each resultant word is expanded.
+The possible completions are the members of the resultant list which
+match the word being completed.
+.TP 8
+\fB\-C\fP \fIcommand\fP
+\fIcommand\fP is executed in a subshell environment, and its output is
+used as the possible completions.
+.TP 8
+\fB\-F\fP \fIfunction\fP
+The shell function \fIfunction\fP is executed in the current shell
+environment.
+When it finishes, the possible completions are retrieved from the value
+of the
+.SM
+.B COMPREPLY
+array variable.
+.TP 8
+\fB\-X\fP \fIfilterpat\fP
+\fIfilterpat\fP is a pattern as used for pathname expansion.
+It is applied to the list of possible completions generated by the
+preceding options and arguments, and each completion matching
+\fIfilterpat\fP is removed from the list.
+A leading \fB!\fP in \fIfilterpat\fP negates the pattern; in this
+case, any completion not matching \fIfilterpat\fP is removed.
+.TP 8
+\fB\-P\fP \fIprefix\fP
+\fIprefix\fP is added at the beginning of each possible completion
+after all other options have been applied.
+.TP 8
+\fB\-S\fP \fIsuffix\fP
+\fIsuffix\fP is appended to each possible completion
+after all other options have been applied.
+.PD
+.PP
+The return value is true unless an invalid option is supplied, an option
+other than \fB\-p\fP or \fB\-r\fP is supplied without a \fIname\fP
+argument, an attempt is made to remove a completion specification for
+a \fIname\fP for which no specification exists, or
+an error occurs adding a completion specification.
+.RE
+.TP
+\fBcompopt\fP [\fB\-o\fP \fIoption\fP] [\fB\-DE\fP] [\fB+o\fP \fIoption\fP] [\fIname\fP]
+Modify completion options for each \fIname\fP according to the
+\fIoption\fPs, or for the
+currently-execution completion if no \fIname\fPs are supplied.
+If no \fIoption\fPs are given, display the completion options for each
+\fIname\fP or the current completion.
+The possible values of \fIoption\fP are those valid for the \fBcomplete\fP
+builtin described above.
+The \fB\-D\fP option indicates that the remaining options should
+apply to the ``default'' command completion; that is, completion attempted
+on a command for which no completion has previously been defined.
+The \fB\-E\fP option indicates that the remaining options should
+apply to ``empty'' command completion; that is, completion attempted on a
+blank line.
+.PP
+The return value is true unless an invalid option is supplied, an attempt
+is made to modify the options for a \fIname\fP for which no completion
+specification exists, or an output error occurs.
+.TP
+\fBcontinue\fP [\fIn\fP]
+Resume the next iteration of the enclosing
+.BR for ,
+.BR while ,
+.BR until ,
+or
+.B select
+loop.
+If
+.I n
+is specified, resume at the \fIn\fPth enclosing loop.
+.I n
+must be \(>= 1. If
+.I n
+is greater than the number of enclosing loops, the last enclosing loop
+(the ``top-level'' loop) is resumed.
+The return value is 0 unless \fIn\fP is not greater than or equal to 1.
+.TP
+\fBdeclare\fP [\fB\-aAfFilrtux\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...]
+.PD 0
+.TP
+\fBtypeset\fP [\fB\-aAfFilrtux\fP] [\fB\-p\fP] [\fIname\fP[=\fIvalue\fP] ...]
+.PD
+Declare variables and/or give them attributes.
+If no \fIname\fPs are given then display the values of variables.
+The
+.B \-p
+option will display the attributes and values of each
+.IR name .
+When
+.B \-p
+is used with \fIname\fP arguments, additional options are ignored.
+When
+.B \-p
+is supplied without \fIname\fP arguments, it will display the attributes
+and values of all variables having the attributes specified by the
+additional options.
+If no other options are supplied with \fB\-p\fP, \fBdeclare\fP will display
+the attributes and values of all shell variables. The \fB\-f\fP option
+will restrict the display to shell functions.
+The
+.B \-F
+option inhibits the display of function definitions; only the
+function name and attributes are printed.
+If the \fBextdebug\fP shell option is enabled using \fBshopt\fP,
+the source file name and line number where the function is defined
+are displayed as well. The
+.B \-F
+option implies
+.BR \-f .
+The following options can
+be used to restrict output to variables with the specified attribute or
+to give variables attributes:
+.RS
+.PD 0
+.TP
+.B \-a
+Each \fIname\fP is an indexed array variable (see
+.B Arrays
+above).
+.TP
+.B \-A
+Each \fIname\fP is an associative array variable (see
+.B Arrays
+above).
+.TP
+.B \-f
+Use function names only.
+.TP
+.B \-i
+The variable is treated as an integer; arithmetic evaluation (see
+.SM
+.B "ARITHMETIC EVALUATION"
+above) is performed when the variable is assigned a value.
+.TP
+.B \-l
+When the variable is assigned a value, all upper-case characters are
+converted to lower-case.
+The upper-case attribute is disabled.
+.TP
+.B \-r
+Make \fIname\fPs readonly. These names cannot then be assigned values
+by subsequent assignment statements or unset.
+.TP
+.B \-t
+Give each \fIname\fP the \fItrace\fP attribute.
+Traced functions inherit the \fBDEBUG\fP and \fBRETURN\fP traps from
+the calling shell.
+The trace attribute has no special meaning for variables.
+.TP
+.B \-u
+When the variable is assigned a value, all lower-case characters are
+converted to upper-case.
+The lower-case attribute is disabled.
+.TP
+.B \-x
+Mark \fIname\fPs for export to subsequent commands via the environment.
+.PD
+.PP
+Using `+' instead of `\-'
+turns off the attribute instead,
+with the exceptions that \fB+a\fP
+may not be used to destroy an array variable and \fB+r\fP will not
+remove the readonly attribute.
+When used in a function,
+makes each
+\fIname\fP local, as with the
+.B local
+command.
+If a variable name is followed by =\fIvalue\fP, the value of
+the variable is set to \fIvalue\fP.
+The return value is 0 unless an invalid option is encountered,
+an attempt is made to define a function using
+.if n ``\-f foo=bar'',
+.if t \f(CW\-f foo=bar\fP,
+an attempt is made to assign a value to a readonly variable,
+an attempt is made to assign a value to an array variable without
+using the compound assignment syntax (see
+.B Arrays
+above), one of the \fInames\fP is not a valid shell variable name,
+an attempt is made to turn off readonly status for a readonly variable,
+an attempt is made to turn off array status for an array variable,
+or an attempt is made to display a non-existent function with \fB\-f\fP.
+.RE
+.TP
+.B dirs [+\fIn\fP] [\-\fIn\fP] [\fB\-cplv\fP]
+Without options, displays the list of currently remembered directories.
+The default display is on a single line with directory names separated
+by spaces.
+Directories are added to the list with the
+.B pushd
+command; the
+.B popd
+command removes entries from the list.
+.RS
+.PD 0
+.TP
+\fB+\fP\fIn\fP
+Displays the \fIn\fPth entry counting from the left of the list
+shown by
+.B dirs
+when invoked without options, starting with zero.
+.TP
+\fB\-\fP\fIn\fP
+Displays the \fIn\fPth entry counting from the right of the list
+shown by
+.B dirs
+when invoked without options, starting with zero.
+.TP
+.B \-c
+Clears the directory stack by deleting all of the entries.
+.TP
+.B \-l
+Produces a longer listing; the default listing format uses a
+tilde to denote the home directory.
+.TP
+.B \-p
+Print the directory stack with one entry per line.
+.TP
+.B \-v
+Print the directory stack with one entry per line,
+prefixing each entry with its index in the stack.
+.PD
+.PP
+The return value is 0 unless an
+invalid option is supplied or \fIn\fP indexes beyond the end
+of the directory stack.
+.RE
+.TP
+\fBdisown\fP [\fB\-ar\fP] [\fB\-h\fP] [\fIjobspec\fP ...]
+Without options, each
+.I jobspec
+is removed from the table of active jobs.
+If
+.I jobspec
+is not present, and neither \fB\-a\fP nor \fB\-r\fP is supplied,
+the shell's notion of the \fIcurrent job\fP is used.
+If the \fB\-h\fP option is given, each
+.I jobspec
+is not removed from the table, but is marked so that
+.SM
+.B SIGHUP
+is not sent to the job if the shell receives a
+.SM
+.BR SIGHUP .
+If no
+.I jobspec
+is present, and neither the
+.B \-a
+nor the
+.B \-r
+option is supplied, the \fIcurrent job\fP is used.
+If no
+.I jobspec
+is supplied, the
+.B \-a
+option means to remove or mark all jobs; the
+.B \-r
+option without a
+.I jobspec
+argument restricts operation to running jobs.
+The return value is 0 unless a
+.I jobspec
+does not specify a valid job.
+.TP
+\fBecho\fP [\fB\-neE\fP] [\fIarg\fP ...]
+Output the \fIarg\fPs, separated by spaces, followed by a newline.
+The return status is always 0.
+If \fB\-n\fP is specified, the trailing newline is
+suppressed. If the \fB\-e\fP option is given, interpretation of
+the following backslash-escaped characters is enabled. The
+.B \-E
+option disables the interpretation of these escape characters,
+even on systems where they are interpreted by default.
+The \fBxpg_echo\fP shell option may be used to
+dynamically determine whether or not \fBecho\fP expands these
+escape characters by default.
+.B echo
+does not interpret \fB\-\-\fP to mean the end of options.
+.B echo
+interprets the following escape sequences:
+.RS
+.PD 0
+.TP
+.B \ea
+alert (bell)
+.TP
+.B \eb
+backspace
+.TP
+.B \ec
+suppress further output
+.TP
+.B \ee
+an escape character
+.TP
+.B \ef
+form feed
+.TP
+.B \en
+new line
+.TP
+.B \er
+carriage return
+.TP
+.B \et
+horizontal tab
+.TP
+.B \ev
+vertical tab
+.TP
+.B \e\e
+backslash
+.TP
+.B \e0\fInnn\fP
+the eight-bit character whose value is the octal value \fInnn\fP
+(zero to three octal digits)
+.TP
+.B \ex\fIHH\fP
+the eight-bit character whose value is the hexadecimal value \fIHH\fP
+(one or two hex digits)
+.PD
+.RE
+.TP
+\fBenable\fP [\fB\-a\fP] [\fB\-dnps\fP] [\fB\-f\fP \fIfilename\fP] [\fIname\fP ...]
+Enable and disable builtin shell commands.
+Disabling a builtin allows a disk command which has the same name
+as a shell builtin to be executed without specifying a full pathname,
+even though the shell normally searches for builtins before disk commands.
+If \fB\-n\fP is used, each \fIname\fP
+is disabled; otherwise,
+\fInames\fP are enabled. For example, to use the
+.B test
+binary found via the
+.SM
+.B PATH
+instead of the shell builtin version, run
+.if t \f(CWenable -n test\fP.
+.if n ``enable -n test''.
+The
+.B \-f
+option means to load the new builtin command
+.I name
+from shared object
+.IR filename ,
+on systems that support dynamic loading. The
+.B \-d
+option will delete a builtin previously loaded with
+.BR \-f .
+If no \fIname\fP arguments are given, or if the
+.B \-p
+option is supplied, a list of shell builtins is printed.
+With no other option arguments, the list consists of all enabled
+shell builtins.
+If \fB\-n\fP is supplied, only disabled builtins are printed.
+If \fB\-a\fP is supplied, the list printed includes all builtins, with an
+indication of whether or not each is enabled.
+If \fB\-s\fP is supplied, the output is restricted to the POSIX
+\fIspecial\fP builtins.
+The return value is 0 unless a
+.I name
+is not a shell builtin or there is an error loading a new builtin
+from a shared object.
+.TP
+\fBeval\fP [\fIarg\fP ...]
+The \fIarg\fPs are read and concatenated together into a single
+command. This command is then read and executed by the shell, and
+its exit status is returned as the value of
+.BR eval .
+If there are no
+.IR args ,
+or only null arguments,
+.B eval
+returns 0.
+.TP
+\fBexec\fP [\fB\-cl\fP] [\fB\-a\fP \fIname\fP] [\fIcommand\fP [\fIarguments\fP]]
+If
+.I command
+is specified, it replaces the shell.
+No new process is created. The
+.I arguments
+become the arguments to \fIcommand\fP.
+If the
+.B \-l
+option is supplied,
+the shell places a dash at the beginning of the zeroth argument passed to
+.IR command .
+This is what
+.IR login (1)
+does. The
+.B \-c
+option causes
+.I command
+to be executed with an empty environment. If
+.B \-a
+is supplied, the shell passes
+.I name
+as the zeroth argument to the executed command. If
+.I command
+cannot be executed for some reason, a non-interactive shell exits,
+unless the shell option
+.B execfail
+is enabled, in which case it returns failure.
+An interactive shell returns failure if the file cannot be executed.
+If
+.I command
+is not specified, any redirections take effect in the current shell,
+and the return status is 0. If there is a redirection error, the
+return status is 1.
+.TP
+\fBexit\fP [\fIn\fP]
+Cause the shell to exit
+with a status of \fIn\fP. If
+.I n
+is omitted, the exit status
+is that of the last command executed.
+A trap on
+.SM
+.B EXIT
+is executed before the shell terminates.
+.TP
+\fBexport\fP [\fB\-fn\fP\^] [\fIname\fP[=\fIword\fP]] ...
+.PD 0
+.TP
+.B export \-p
+.PD
+The supplied
+.I names
+are marked for automatic export to the environment of
+subsequently executed commands. If the
+.B \-f
+option is given,
+the
+.I names
+refer to functions.
+If no
+.I names
+are given, or if the
+.B \-p
+option is supplied, a list
+of all names that are exported in this shell is printed.
+The
+.B \-n
+option causes the export property to be removed from each
+\fIname\fP.
+If a variable name is followed by =\fIword\fP, the value of
+the variable is set to \fIword\fP.
+.B export
+returns an exit status of 0 unless an invalid option is
+encountered,
+one of the \fInames\fP is not a valid shell variable name, or
+.B \-f
+is supplied with a
+.I name
+that is not a function.
+.TP
+\fBfc\fP [\fB\-e\fP \fIename\fP] [\fB\-lnr\fP] [\fIfirst\fP] [\fIlast\fP]
+.PD 0
+.TP
+\fBfc\fP \fB\-s\fP [\fIpat\fP=\fIrep\fP] [\fIcmd\fP]
+.PD
+Fix Command. In the first form, a range of commands from
+.I first
+to
+.I last
+is selected from the history list.
+.I First
+and
+.I last
+may be specified as a string (to locate the last 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
+.I last
+is not specified it is set to
+the current command for listing (so that
+.if n ``fc \-l \-10''
+.if t \f(CWfc \-l \-10\fP
+prints the last 10 commands) and to
+.I first
+otherwise.
+If
+.I first
+is not specified it is set to the previous
+command for editing and \-16 for listing.
+.sp 1
+The
+.B \-n
+option suppresses
+the command numbers when listing. The
+.B \-r
+option reverses the order of
+the commands. If the
+.B \-l
+option is given,
+the commands are listed on
+standard output. Otherwise, the editor given by
+.I ename
+is invoked
+on a file containing those commands. If
+.I ename
+is not given, the
+value of the
+.SM
+.B FCEDIT
+variable is used, and
+the value of
+.SM
+.B EDITOR
+if
+.SM
+.B FCEDIT
+is not set. If neither variable is set,
+.FN vi
+is used. When editing is complete, the edited commands are
+echoed and executed.
+.sp 1
+In the second form, \fIcommand\fP is re-executed after each instance
+of \fIpat\fP is replaced by \fIrep\fP.
+A useful alias to use with this is
+.if n ``r="fc -s"'',
+.if t \f(CWr='fc \-s'\fP,
+so that typing
+.if n ``r cc''
+.if t \f(CWr cc\fP
+runs the last command beginning with
+.if n ``cc''
+.if t \f(CWcc\fP
+and typing
+.if n ``r''
+.if t \f(CWr\fP
+re-executes the last command.
+.sp 1
+If the first form is used, the return value is 0 unless an invalid
+option is encountered or
+.I first
+or
+.I last
+specify history lines out of range.
+If the
+.B \-e
+option is supplied, the return value is the value of the last
+command executed or failure if an error occurs with the temporary
+file of commands. If the second form is used, the return status
+is that of the command re-executed, unless
+.I cmd
+does not specify a valid history line, in which case
+.B fc
+returns failure.
+.TP
+\fBfg\fP [\fIjobspec\fP]
+Resume
+.I jobspec
+in the foreground, and make it the current job.
+If
+.I jobspec
+is not present, the shell's notion of the \fIcurrent job\fP is used.
+The return value is that of the command placed into the foreground,
+or failure if run when job control is disabled or, when run with
+job control enabled, if
+.I jobspec
+does not specify a valid job or
+.I jobspec
+specifies a job that was started without job control.
+.TP
+\fBgetopts\fP \fIoptstring\fP \fIname\fP [\fIargs\fP]
+.B getopts
+is used by shell procedures to parse positional parameters.
+.I optstring
+contains the option characters to be recognized; if a character
+is followed by a colon, the option is expected to have an
+argument, which should be separated from it by white space.
+The colon and question mark characters may not be used as
+option characters.
+Each time it is invoked,
+.B getopts
+places the next option in the shell variable
+.IR name ,
+initializing
+.I name
+if it does not exist,
+and the index of the next argument to be processed into the
+variable
+.SM
+.BR OPTIND .
+.SM
+.B OPTIND
+is initialized to 1 each time the shell or a shell script
+is invoked. When an option requires an argument,
+.B getopts
+places that argument into the variable
+.SM
+.BR OPTARG .
+The shell does not reset
+.SM
+.B OPTIND
+automatically; it must be manually reset between multiple
+calls to
+.B getopts
+within the same shell invocation if a new set of parameters
+is to be used.
+.sp 1
+When the end of options is encountered, \fBgetopts\fP exits with a
+return value greater than zero.
+.SM
+.B OPTIND
+is set to the index of the first non-option argument,
+and \fBname\fP is set to ?.
+.sp 1
+.B getopts
+normally parses the positional parameters, but if more arguments are
+given in
+.IR args ,
+.B getopts
+parses those instead.
+.sp 1
+.B getopts
+can report errors in two ways. If the first character of
+.I optstring
+is a colon,
+.I silent
+error reporting is used. In normal operation diagnostic messages
+are printed when invalid options or missing option arguments are
+encountered.
+If the variable
+.SM
+.B OPTERR
+is set to 0, no error messages will be displayed, even if the first
+character of
+.I optstring
+is not a colon.
+.sp 1
+If an invalid option is seen,
+.B getopts
+places ? into
+.I name
+and, if not silent,
+prints an error message and unsets
+.SM
+.BR OPTARG .
+If
+.B getopts
+is silent,
+the option character found is placed in
+.SM
+.B OPTARG
+and no diagnostic message is printed.
+.sp 1
+If a required argument is not found, and
+.B getopts
+is not silent,
+a question mark (\^\fB?\fP\^) is placed in
+.IR name ,
+.SM
+.B OPTARG
+is unset, and a diagnostic message is printed.
+If
+.B getopts
+is silent, then a colon (\^\fB:\fP\^) is placed in
+.I name
+and
+.SM
+.B OPTARG
+is set to the option character found.
+.sp 1
+.B getopts
+returns true if an option, specified or unspecified, is found.
+It returns false if the end of options is encountered or an
+error occurs.
+.TP
+\fBhash\fP [\fB\-lr\fP] [\fB\-p\fP \fIfilename\fP] [\fB\-dt\fP] [\fIname\fP]
+For each
+.IR name ,
+the full file name of the command is determined by searching
+the directories in
+.B $PATH
+and remembered.
+If the
+.B \-p
+option is supplied, no path search is performed, and
+.I filename
+is used as the full file name of the command.
+The
+.B \-r
+option causes the shell to forget all
+remembered locations.
+The
+.B \-d
+option causes the shell to forget the remembered location of each \fIname\fP.
+If the
+.B \-t
+option is supplied, the full pathname to which each \fIname\fP corresponds
+is printed. If multiple \fIname\fP arguments are supplied with \fB\-t\fP,
+the \fIname\fP is printed before the hashed full pathname.
+The
+.B \-l
+option causes output to be displayed in a format that may be reused as input.
+If no arguments are given, or if only \fB\-l\fP is supplied,
+information about remembered commands is printed.
+The return status is true unless a
+.I name
+is not found or an invalid option is supplied.
+.TP
+\fBhelp\fP [\fB\-dms\fP] [\fIpattern\fP]
+Display helpful information about builtin commands. If
+.I pattern
+is specified,
+.B help
+gives detailed help on all commands matching
+.IR pattern ;
+otherwise help for all the builtins and shell control structures
+is printed.
+.RS
+.PD 0
+.TP
+.B \-d
+Display a short description of each \fIpattern\fP
+.TP
+.B \-m
+Display the description of each \fIpattern\fP in a manpage-like format
+.TP
+.B \-s
+Display only a short usage synopsis for each \fIpattern\fP
+.PD
+.RE
+The return status is 0 unless no command matches
+.IR pattern .
+.TP
+\fBhistory [\fIn\fP]
+.PD 0
+.TP
+\fBhistory\fP \fB\-c\fP
+.TP
+\fBhistory \-d\fP \fIoffset\fP
+.TP
+\fBhistory\fP \fB\-anrw\fP [\fIfilename\fP]
+.TP
+\fBhistory\fP \fB\-p\fP \fIarg\fP [\fIarg ...\fP]
+.TP
+\fBhistory\fP \fB\-s\fP \fIarg\fP [\fIarg ...\fP]
+.PD
+With no options, display the command
+history list with line numbers. Lines listed
+with a
+.B *
+have been modified. An argument of
+.I n
+lists only the last
+.I n
+lines.
+If the shell variable
+.SM
+.B HISTTIMEFORMAT
+is set and not null,
+it is used as a format string for \fIstrftime\fP(3) 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.
+If \fIfilename\fP is supplied, it is used as the
+name of the history file; if not, the value of
+.SM
+.B HISTFILE
+is used. Options, if supplied, have the following meanings:
+.RS
+.PD 0
+.TP
+.B \-c
+Clear the history list by deleting all the entries.
+.TP
+\fB\-d\fP \fIoffset\fP
+Delete the history entry at position \fIoffset\fP.
+.TP
+.B \-a
+Append the ``new'' history lines (history lines entered since the
+beginning of the current \fBbash\fP session) to the history file.
+.TP
+.B \-n
+Read the history lines not already read from the history
+file into the current history list. These are lines
+appended to the history file since the beginning of the
+current \fBbash\fP session.
+.TP
+.B \-r
+Read the contents of the history file
+and use them as the current history.
+.TP
+.B \-w
+Write the current history to the history file, overwriting the
+history file's contents.
+.TP
+.B \-p
+Perform history substitution on the following \fIargs\fP and display
+the result on the standard output.
+Does not store the results in the history list.
+Each \fIarg\fP must be quoted to disable normal history expansion.
+.TP
+.B \-s
+Store the
+.I args
+in the history list as a single entry. The last command in the
+history list is removed before the
+.I args
+are added.
+.PD
+.PP
+If the
+.SM
+.B HISTTIMEFORMAT
+variable 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 return value is 0 unless an invalid option is encountered, an
+error occurs while reading or writing the history file, an invalid
+\fIoffset\fP is supplied as an argument to \fB\-d\fP, or the
+history expansion supplied as an argument to \fB\-p\fP fails.
+.RE
+.TP
+\fBjobs\fP [\fB\-lnprs\fP] [ \fIjobspec\fP ... ]
+.PD 0
+.TP
+\fBjobs\fP \fB\-x\fP \fIcommand\fP [ \fIargs\fP ... ]
+.PD
+The first form lists the active jobs. The options have the following
+meanings:
+.RS
+.PD 0
+.TP
+.B \-l
+List process IDs
+in addition to the normal information.
+.TP
+.B \-p
+List only the process ID of the job's process group
+leader.
+.TP
+.B \-n
+Display information only about jobs that have changed status since
+the user was last notified of their status.
+.TP
+.B \-r
+Restrict output to running jobs.
+.TP
+.B \-s
+Restrict output to stopped jobs.
+.PD
+.PP
+If
+.I jobspec
+is given, output is restricted to information about that job.
+The return status is 0 unless an invalid option is encountered
+or an invalid
+.I jobspec
+is supplied.
+.PP
+If the
+.B \-x
+option is supplied,
+.B jobs
+replaces any
+.I jobspec
+found in
+.I command
+or
+.I args
+with the corresponding process group ID, and executes
+.I command
+passing it
+.IR args ,
+returning its exit status.
+.RE
+.TP
+\fBkill\fP [\fB\-s\fP \fIsigspec\fP | \fB\-n\fP \fIsignum\fP | \fB\-\fP\fIsigspec\fP] [\fIpid\fP | \fIjobspec\fP] ...
+.PD 0
+.TP
+\fBkill\fP \fB\-l\fP [\fIsigspec\fP | \fIexit_status\fP]
+.PD
+Send the signal named by
+.I sigspec
+or
+.I signum
+to the processes named by
+.I pid
+or
+.IR jobspec .
+.I sigspec
+is either a case-insensitive signal name such as
+.SM
+.B SIGKILL
+(with or without the
+.SM
+.B SIG
+prefix) or a signal number;
+.I signum
+is a signal number.
+If
+.I sigspec
+is not present, then
+.SM
+.B SIGTERM
+is assumed.
+An argument of
+.B \-l
+lists the signal names.
+If any arguments are supplied when
+.B \-l
+is given, the names of the signals corresponding to the arguments are
+listed, and the return status is 0.
+The \fIexit_status\fP argument to
+.B \-l
+is a number specifying either a signal number or the exit status of
+a process terminated by a signal.
+.B kill
+returns true if at least one signal was successfully sent, or false
+if an error occurs or an invalid option is encountered.
+.TP
+\fBlet\fP \fIarg\fP [\fIarg\fP ...]
+Each
+.I arg
+is an arithmetic expression to be evaluated (see
+.SM
+.B "ARITHMETIC EVALUATION"
+above).
+If the last
+.I arg
+evaluates to 0,
+.B let
+returns 1; 0 is returned otherwise.
+.TP
+\fBlocal\fP [\fIoption\fP] [\fIname\fP[=\fIvalue\fP] ...]
+For each argument, a local variable named
+.I name
+is created, and assigned
+.IR value .
+The \fIoption\fP can be any of the options accepted by \fBdeclare\fP.
+When
+.B local
+is used within a function, it causes the variable
+.I name
+to have a visible scope restricted to that function and its children.
+With no operands,
+.B local
+writes a list of local variables to the standard output. It is
+an error to use
+.B local
+when not within a function. The return status is 0 unless
+.B local
+is used outside a function, an invalid
+.I name
+is supplied, or
+\fIname\fP is a readonly variable.
+.TP
+.B logout
+Exit a login shell.
+.TP
+\fBmapfile\fP [\fB\-n\fP \fIcount\fP] [\fB\-O\fP \fIorigin\fP] [\fB\-s\fP \fIcount\fP] [\fB\-t\fP] [\fB\-u\fP \fIfd\fP] [\fB\-C\fP \fIcallback\fP] [\fB\-c\fP \fIquantum\fP] [\fIarray\fP]
+.PD 0
+.TP
+\fBreadarray\fP [\fB\-n\fP \fIcount\fP] [\fB\-O\fP \fIorigin\fP] [\fB\-s\fP \fIcount\fP] [\fB\-t\fP] [\fB\-u\fP \fIfd\fP] [\fB\-C\fP \fIcallback\fP] [\fB\-c\fP \fIquantum\fP] [\fIarray\fP]
+.PD
+Read lines from the standard input into the indexed array variable
+.IR array ,
+or from file descriptor
+.IR fd
+if the
+.B \-u
+option is supplied.
+The variable
+.SM
+.B MAPFILE
+is the default \fIarray\fP.
+Options, if supplied, have the following meanings:
+.RS
+.PD 0
+.TP
+.B \-n
+Copy at most
+.I count
+lines. If \fIcount\fP is 0, all lines are copied.
+.TP
+.B \-O
+Begin assigning to
+.I array
+at index
+.IR origin .
+The default index is 0.
+.TP
+.B \-s
+Discard the first \fIcount\fP lines read.
+.TP
+.B \-t
+Remove a trailing newline from each line read.
+.TP
+.B \-u
+Read lines from file descriptor \fIfd\fP instead of the standard input.
+.TP
+.B \-C
+Evaluate
+.I callback
+each time \fIquantum\fP lines are read. The \fB\-c\fP option specifies
+.IR quantum .
+.TP
+.B \-c
+Specify the number of lines read between each call to
+.IR callback .
+.PD
+.PP
+If
+.B \-C
+is specified without
+.BR \-c ,
+the default quantum is 5000.
+When \fIcallback\fP is evaluated, it is supplied the index of the next
+array element to be assigned as an additional argument.
+\fIcallback\fP is evaluated after the line is read but before the
+array element is assigned.
+.PP
+If not supplied with an explicit origin, \fBmapfile\fP will clear \fIarray\fP
+before assigning to it.
+.PP
+\fBmapfile\fP returns successfully unless an invalid option or option
+argument is supplied, \fIarray\fP is invalid or unassignable, or if
+\fIarray\fP is not an indexed array.
+.RE
+.TP
+\fBpopd\fP [\-\fBn\fP] [+\fIn\fP] [\-\fIn\fP]
+Removes entries from the directory stack. With no arguments,
+removes the top directory from the stack, and performs a
+.B cd
+to the new top directory.
+Arguments, if supplied, have the following meanings:
+.RS
+.PD 0
+.TP
+.B \-n
+Suppresses the normal change of directory when removing directories
+from the stack, so that only the stack is manipulated.
+.TP
+\fB+\fP\fIn\fP
+Removes the \fIn\fPth entry counting from the left of the list
+shown by
+.BR dirs ,
+starting with zero. For example:
+.if n ``popd +0''
+.if t \f(CWpopd +0\fP
+removes the first directory,
+.if n ``popd +1''
+.if t \f(CWpopd +1\fP
+the second.
+.TP
+\fB\-\fP\fIn\fP
+Removes the \fIn\fPth entry counting from the right of the list
+shown by
+.BR dirs ,
+starting with zero. For example:
+.if n ``popd -0''
+.if t \f(CWpopd -0\fP
+removes the last directory,
+.if n ``popd -1''
+.if t \f(CWpopd -1\fP
+the next to last.
+.PD
+.PP
+If the
+.B popd
+command is successful, a
+.B dirs
+is performed as well, and the return status is 0.
+.B popd
+returns false if an invalid option is encountered, the directory stack
+is empty, a non-existent directory stack entry is specified, or the
+directory change fails.
+.RE
+.TP
+\fBprintf\fP [\fB\-v\fP \fIvar\fP] \fIformat\fP [\fIarguments\fP]
+Write the formatted \fIarguments\fP to the standard output under the
+control of the \fIformat\fP.
+The \fIformat\fP is a character string which contains three types of objects:
+plain characters, which are simply copied to standard output, character
+escape sequences, which are converted and copied to the standard output, and
+format specifications, each of which causes printing of the next successive
+\fIargument\fP.
+In addition to the standard \fIprintf\fP(1) formats, \fB%b\fP causes
+\fBprintf\fP to expand backslash escape sequences in the corresponding
+\fIargument\fP (except that \fB\ec\fP terminates output, backslashes in
+\fB\e\(aq\fP, \fB\e"\fP, and \fB\e?\fP are not removed, and octal escapes
+beginning with \fB\e0\fP may contain up to four digits),
+and \fB%q\fP causes \fBprintf\fP to output the corresponding
+\fIargument\fP in a format that can be reused as shell input.
+.sp 1
+The \fB\-v\fP option causes the output to be assigned to the variable
+\fIvar\fP rather than being printed to the standard output.
+.sp 1
+The \fIformat\fP is reused as necessary to consume all of the \fIarguments\fP.
+If the \fIformat\fP requires more \fIarguments\fP than are supplied, the
+extra format specifications behave as if a zero value or null string, as
+appropriate, had been supplied. The return value is zero on success,
+non-zero on failure.
+.TP
+\fBpushd\fP [\fB\-n\fP] [+\fIn\fP] [\-\fIn\fP]
+.PD 0
+.TP
+\fBpushd\fP [\fB\-n\fP] [\fIdir\fP]
+.PD
+Adds a directory to the top of the directory stack, or rotates
+the stack, making the new top of the stack the current working
+directory. With no arguments, exchanges the top two directories
+and returns 0, unless the directory stack is empty.
+Arguments, if supplied, have the following meanings:
+.RS
+.PD 0
+.TP
+.B \-n
+Suppresses the normal change of directory when adding directories
+to the stack, so that only the stack is manipulated.
+.TP
+\fB+\fP\fIn\fP
+Rotates the stack so that the \fIn\fPth directory
+(counting from the left of the list shown by
+.BR dirs ,
+starting with zero)
+is at the top.
+.TP
+\fB\-\fP\fIn\fP
+Rotates the stack so that the \fIn\fPth directory
+(counting from the right of the list shown by
+.BR dirs ,
+starting with zero) is at the top.
+.TP
+.I dir
+Adds
+.I dir
+to the directory stack at the top, making it the
+new current working directory.
+.PD
+.PP
+If the
+.B pushd
+command is successful, a
+.B dirs
+is performed as well.
+If the first form is used,
+.B pushd
+returns 0 unless the cd to
+.I dir
+fails. With the second form,
+.B pushd
+returns 0 unless the directory stack is empty,
+a non-existent directory stack element is specified,
+or the directory change to the specified new current directory
+fails.
+.RE
+.TP
+\fBpwd\fP [\fB\-LP\fP]
+Print the absolute pathname of the current working directory.
+The pathname printed contains no symbolic links if the
+.B \-P
+option is supplied or the
+.B \-o physical
+option to the
+.B set
+builtin command is enabled.
+If the
+.B \-L
+option is used, the pathname printed may contain symbolic links.
+The return status is 0 unless an error occurs while
+reading the name of the current directory or an
+invalid option is supplied.
+.TP
+\fBread\fP [\fB\-ers\fP] [\fB\-a\fP \fIaname\fP] [\fB\-d\fP \fIdelim\fP] [\fB\-i\fP \fItext\fP] [\fB\-n\fP \fInchars\fP] [\fB\-N\fP \fInchars\fP] [\fB\-p\fP \fIprompt\fP] [\fB\-t\fP \fItimeout\fP] [\fB\-u\fP \fIfd\fP] [\fIname\fP ...]
+One line is read from the standard input, or from the file descriptor
+\fIfd\fP supplied as an argument to the \fB\-u\fP option, and the first word
+is assigned to the first
+.IR name ,
+the second word to the second
+.IR name ,
+and so on, with leftover words and their intervening separators assigned
+to the last
+.IR name .
+If there are fewer words read from the input stream than names,
+the remaining names are assigned empty values.
+The characters in
+.SM
+.B IFS
+are used to split the line into words.
+The backslash character (\fB\e\fP) may be used to remove any special
+meaning for the next character read and for line continuation.
+Options, if supplied, have the following meanings:
+.RS
+.PD 0
+.TP
+.B \-a \fIaname\fP
+The words are assigned to sequential indices
+of the array variable
+.IR aname ,
+starting at 0.
+.I aname
+is unset before any new values are assigned.
+Other \fIname\fP arguments are ignored.
+.TP
+.B \-d \fIdelim\fP
+The first character of \fIdelim\fP is used to terminate the input line,
+rather than newline.
+.TP
+.B \-e
+If the standard input
+is coming from a terminal,
+.B readline
+(see
+.SM
+.B READLINE
+above) is used to obtain the line.
+Readline uses the current (or default, if line editing was not previously
+active) editing settings.
+.TP
+.B \-i \fItext\fP
+If
+.B readline
+is being used to read the line, \fItext\fP is placed into the editing
+buffer before editing begins.
+.TP
+.B \-n \fInchars\fP
+\fBread\fP returns after reading \fInchars\fP characters rather than
+waiting for a complete line of input, but honor a delimiter if fewer
+than \fInchars\fP characters are read before the delimiter.
+.TP
+.B \-N \fInchars\fP
+\fBread\fP returns after reading exactly \fInchars\fP characters rather
+than waiting for a complete line of input, unless EOF is encountered or
+\fBread\fP times out.
+Delimiter characters encountered in the input are
+not treated specially and do not cause \fBread\fP to return until
+\fInchars\fP characters are read.
+.TP
+.B \-p \fIprompt\fP
+Display \fIprompt\fP on standard error, without a
+trailing newline, before attempting to read any input. The prompt
+is displayed only if input is coming from a terminal.
+.TP
+.B \-r
+Backslash does not act as an escape character.
+The backslash is considered to be part of the line.
+In particular, a backslash-newline pair may not be used as a line
+continuation.
+.TP
+.B \-s
+Silent mode. If input is coming from a terminal, characters are
+not echoed.
+.TP
+.B \-t \fItimeout\fP
+Cause \fBread\fP to time out and return failure if a complete line of
+input is not read within \fItimeout\fP seconds.
+\fItimeout\fP may be a decimal number with a fractional portion following
+the decimal point.
+This option is only effective if \fBread\fP is reading input from a
+terminal, pipe, or other special file; it has no effect when reading
+from regular files.
+If \fItimeout\fP is 0, \fBread\fP returns success if input is available on
+the specified file descriptor, failure otherwise.
+The exit status is greater than 128 if the timeout is exceeded.
+.TP
+.B \-u \fIfd\fP
+Read input from file descriptor \fIfd\fP.
+.PD
+.PP
+If no
+.I names
+are supplied, the line read is assigned to the variable
+.SM
+.BR REPLY .
+The return code is zero, unless end-of-file is encountered, \fBread\fP
+times out (in which case the return code is greater than 128), or an
+invalid file descriptor is supplied as the argument to \fB\-u\fP.
+.RE
+.TP
+\fBreadonly\fP [\fB\-aApf\fP] [\fIname\fP[=\fIword\fP] ...]
+.PD
+The given
+\fInames\fP are marked readonly; the values of these
+.I names
+may not be changed by subsequent assignment.
+If the
+.B \-f
+option is supplied, the functions corresponding to the
+\fInames\fP are so
+marked.
+The
+.B \-a
+option restricts the variables to indexed arrays; the
+.B \-A
+option restricts the variables to associative arrays.
+If no
+.I name
+arguments are given, or if the
+.B \-p
+option is supplied, a list of all readonly names is printed.
+The
+.B \-p
+option causes output to be displayed in a format that
+may be reused as input.
+If a variable name is followed by =\fIword\fP, the value of
+the variable is set to \fIword\fP.
+The return status is 0 unless an invalid option is encountered,
+one of the
+.I names
+is not a valid shell variable name, or
+.B \-f
+is supplied with a
+.I name
+that is not a function.
+.TP
+\fBreturn\fP [\fIn\fP]
+Causes a function to exit with the return value specified by
+.IR n .
+If
+.I n
+is omitted, the return status is that of the last command
+executed in the function body. If used outside a function,
+but during execution of a script by the
+.B .
+(\fBsource\fP) command, it causes the shell to stop executing
+that script and return either
+.I n
+or the exit status of the last command executed within the
+script as the exit status of the script. If used outside a
+function and not during execution of a script by \fB.\fP\^,
+the return status is false.
+Any command associated with the \fBRETURN\fP trap is executed
+before execution resumes after the function or script.
+.TP
+\fBset\fP [\fB\-\-abefhkmnptuvxBCEHPT\fP] [\fB\-o\fP \fIoption\fP] [\fIarg\fP ...]
+.PD 0
+.TP
+\fBset\fP [\fB+abefhkmnptuvxBCEHPT\fP] [\fB+o\fP \fIoption\fP] [\fIarg\fP ...]
+.PD
+Without options, the name and value of each shell variable are displayed
+in a format that can be reused as input
+for setting or resetting the currently-set variables.
+Read-only variables cannot be reset.
+In \fIposix mode\fP, only shell variables are listed.
+The output is sorted according to the current locale.
+When options are specified, they set or unset shell attributes.
+Any arguments remaining after option processing are treated
+as values for the positional parameters and are assigned, in order, to
+.BR $1 ,
+.BR $2 ,
+.B ...
+.BR $\fIn\fP .
+Options, if specified, have the following meanings:
+.RS
+.PD 0
+.TP 8
+.B \-a
+Automatically mark variables and functions which are modified or
+created for export to the environment of subsequent commands.
+.TP 8
+.B \-b
+Report the status of terminated background jobs
+immediately, rather than before the next primary prompt. This is
+effective only when job control is enabled.
+.TP 8
+.B \-e
+Exit immediately if a \fIpipeline\fP (which may consist of a single
+\fIsimple command\fP), a \fIsubshell\fP command enclosed in parentheses,
+or one of the commands executed as part of a command list enclosed
+by braces (see
+.SM
+.B SHELL GRAMMAR
+above) exits with a non-zero status.
+The shell does not exit if the
+command that fails is part of the command list immediately following a
+.B while
+or
+.B until
+keyword,
+part of the test following the
+.B if
+or
+.B elif
+reserved words, part of any command executed in a
+.B &&
+or
+.B \(bv\(bv
+list except the command following the final \fB&&\fP or \fB\(bv\(bv\fP,
+any command in a pipeline but the last,
+or if the command's return value is
+being inverted with
+.BR ! .
+A trap on \fBERR\fP, if set, is executed before the shell exits.
+This option applies to the shell environment and each subshell environment
+separately (see
+.SM
+.B "COMMAND EXECUTION ENVIRONMENT"
+above), and may cause
+subshells to exit before executing all the commands in the subshell.
+.TP 8
+.B \-f
+Disable pathname expansion.
+.TP 8
+.B \-h
+Remember the location of commands as they are looked up for execution.
+This is enabled by default.
+.TP 8
+.B \-k
+All arguments in the form of assignment statements
+are placed in the environment for a command, not just
+those that precede the command name.
+.TP 8
+.B \-m
+Monitor mode. Job control is enabled. This option is on
+by default for interactive shells on systems that support
+it (see
+.SM
+.B JOB CONTROL
+above). Background processes run in a separate process
+group and a line containing their exit status is printed
+upon their completion.
+.TP 8
+.B \-n
+Read commands but do not execute them. This may be used to
+check a shell script for syntax errors. This is ignored by
+interactive shells.
+.TP 8
+.B \-o \fIoption\-name\fP
+The \fIoption\-name\fP can be one of the following:
+.RS
+.TP 8
+.B allexport
+Same as
+.BR \-a .
+.TP 8
+.B braceexpand
+Same as
+.BR \-B .
+.TP 8
+.B emacs
+Use an emacs-style command line editing interface. This is enabled
+by default when the shell is interactive, unless the shell is started
+with the
+.B \-\-noediting
+option.
+This also affects the editing interface used for \fBread \-e\fP.
+.TP 8
+.B errexit
+Same as
+.BR \-e .
+.TP 8
+.B errtrace
+Same as
+.BR \-E .
+.TP 8
+.B functrace
+Same as
+.BR \-T .
+.TP 8
+.B hashall
+Same as
+.BR \-h .
+.TP 8
+.B histexpand
+Same as
+.BR \-H .
+.TP 8
+.B history
+Enable command history, as described above under
+.SM
+.BR HISTORY .
+This option is on by default in interactive shells.
+.TP 8
+.B ignoreeof
+The effect is as if the shell command
+.if t \f(CWIGNOREEOF=10\fP
+.if n ``IGNOREEOF=10''
+had been executed
+(see
+.B Shell Variables
+above).
+.TP 8
+.B keyword
+Same as
+.BR \-k .
+.TP 8
+.B monitor
+Same as
+.BR \-m .
+.TP 8
+.B noclobber
+Same as
+.BR \-C .
+.TP 8
+.B noexec
+Same as
+.BR \-n .
+.TP 8
+.B noglob
+Same as
+.BR \-f .
+.TP 8
+.B nolog
+Currently ignored.
+.TP 8
+.B notify
+Same as
+.BR \-b .
+.TP 8
+.B nounset
+Same as
+.BR \-u .
+.TP 8
+.B onecmd
+Same as
+.BR \-t .
+.TP 8
+.B physical
+Same as
+.BR \-P .
+.TP 8
+.B pipefail
+If set, the return value of a pipeline is the value of the last
+(rightmost) command to exit with a non-zero status, or zero if all
+commands in the pipeline exit successfully.
+This option is disabled by default.
+.TP 8
+.B posix
+Change the behavior of
+.B bash
+where the default operation differs
+from the POSIX standard to match the standard (\fIposix mode\fP).
+.TP 8
+.B privileged
+Same as
+.BR \-p .
+.TP 8
+.B verbose
+Same as
+.BR \-v .
+.TP 8
+.B vi
+Use a vi-style command line editing interface.
+This also affects the editing interface used for \fBread \-e\fP.
+.TP 8
+.B xtrace
+Same as
+.BR \-x .
+.sp .5
+.PP
+If
+.B \-o
+is supplied with no \fIoption\-name\fP, the values of the current options are
+printed.
+If
+.B +o
+is supplied with no \fIoption\-name\fP, a series of
+.B set
+commands to recreate the current option settings is displayed on
+the standard output.
+.RE
+.TP 8
+.B \-p
+Turn on
+.I privileged
+mode. In this mode, the
+.SM
+.B $ENV
+and
+.SM
+.B $BASH_ENV
+files are not processed, shell functions are not inherited from the
+environment, and the
+.SM
+.BR SHELLOPTS ,
+.SM
+.BR BASHOPTS ,
+.SM
+.BR CDPATH ,
+and
+.SM
+.B GLOBIGNORE
+variables, if they appear in the environment, are ignored.
+If the shell is started with the effective user (group) id not equal to the
+real user (group) id, and the \fB\-p\fP option is not supplied, these actions
+are taken and the effective user id is set to the real user id.
+If the \fB\-p\fP option is supplied at startup, the effective user id is
+not reset.
+Turning this option off causes the effective user
+and group ids to be set to the real user and group ids.
+.TP 8
+.B \-t
+Exit after reading and executing one command.
+.TP 8
+.B \-u
+Treat unset variables and parameters other than the special
+parameters "@" and "*" as an error when performing
+parameter expansion. If expansion is attempted on an
+unset variable or parameter, the shell prints an error message, and,
+if not interactive, exits with a non-zero status.
+.TP 8
+.B \-v
+Print shell input lines as they are read.
+.TP 8
+.B \-x
+After expanding each \fIsimple command\fP,
+\fBfor\fP command, \fBcase\fP command, \fBselect\fP command, or
+arithmetic \fBfor\fP command, display the expanded value of
+.SM
+.BR PS4 ,
+followed by the command and its expanded arguments
+or associated word list.
+.TP 8
+.B \-B
+The shell performs brace expansion (see
+.B Brace Expansion
+above). This is on by default.
+.TP 8
+.B \-C
+If set,
+.B bash
+does not overwrite an existing file with the
+.BR > ,
+.BR >& ,
+and
+.B <>
+redirection operators. This may be overridden when
+creating output files by using the redirection operator
+.B >|
+instead of
+.BR > .
+.TP 8
+.B \-E
+If set, any trap on \fBERR\fP is inherited by shell functions, command
+substitutions, and commands executed in a subshell environment.
+The \fBERR\fP trap is normally not inherited in such cases.
+.TP 8
+.B \-H
+Enable
+.B !
+style history substitution. This option is on by
+default when the shell is interactive.
+.TP 8
+.B \-P
+If set, the shell does not follow symbolic links when executing
+commands such as
+.B cd
+that change the current working directory. It uses the
+physical directory structure instead. By default,
+.B bash
+follows the logical chain of directories when performing commands
+which change the current directory.
+.TP 8
+.B \-T
+If set, any traps on \fBDEBUG\fP and \fBRETURN\fP are inherited by shell
+functions, command substitutions, and commands executed in a
+subshell environment.
+The \fBDEBUG\fP and \fBRETURN\fP traps are normally not inherited
+in such cases.
+.TP 8
+.B \-\-
+If no arguments follow this option, then the positional parameters are
+unset. Otherwise, the positional parameters are set to the
+\fIarg\fPs, even if some of them begin with a
+.BR \- .
+.TP 8
+.B \-
+Signal the end of options, cause all remaining \fIarg\fPs to be
+assigned to the positional parameters. The
+.B \-x
+and
+.B \-v
+options are turned off.
+If there are no \fIarg\fPs,
+the positional parameters remain unchanged.
+.PD
+.PP
+The options are off by default unless otherwise noted.
+Using + rather than \- causes these options to be turned off.
+The options can also be specified as arguments to an invocation of
+the shell.
+The current set of options may be found in
+.BR $\- .
+The return status is always true unless an invalid option is encountered.
+.RE
+.TP
+\fBshift\fP [\fIn\fP]
+The positional parameters from \fIn\fP+1 ... are renamed to
+.B $1
+.B ....
+Parameters represented by the numbers \fB$#\fP
+down to \fB$#\fP\-\fIn\fP+1 are unset.
+.I n
+must be a non-negative number less than or equal to \fB$#\fP.
+If
+.I n
+is 0, no parameters are changed.
+If
+.I n
+is not given, it is assumed to be 1.
+If
+.I n
+is greater than \fB$#\fP, the positional parameters are not changed.
+The return status is greater than zero if
+.I n
+is greater than
+.B $#
+or less than zero; otherwise 0.
+.TP
+\fBshopt\fP [\fB\-pqsu\fP] [\fB\-o\fP] [\fIoptname\fP ...]
+Toggle the values of variables controlling optional shell behavior.
+With no options, or with the
+.B \-p
+option, a list of all settable options is displayed, with
+an indication of whether or not each is set.
+The \fB\-p\fP option causes output to be displayed in a form that
+may be reused as input.
+Other options have the following meanings:
+.RS
+.PD 0
+.TP
+.B \-s
+Enable (set) each \fIoptname\fP.
+.TP
+.B \-u
+Disable (unset) each \fIoptname\fP.
+.TP
+.B \-q
+Suppresses normal output (quiet mode); the return status indicates
+whether the \fIoptname\fP is set or unset.
+If multiple \fIoptname\fP arguments are given with
+.BR \-q ,
+the return status is zero if all \fIoptnames\fP are enabled; non-zero
+otherwise.
+.TP
+.B \-o
+Restricts the values of \fIoptname\fP to be those defined for the
+.B \-o
+option to the
+.B set
+builtin.
+.PD
+.PP
+If either
+.B \-s
+or
+.B \-u
+is used with no \fIoptname\fP arguments, the display is limited to
+those options which are set or unset, respectively.
+Unless otherwise noted, the \fBshopt\fP options are disabled (unset)
+by default.
+.PP
+The return status when listing options is zero if all \fIoptnames\fP
+are enabled, non-zero otherwise. When setting or unsetting options,
+the return status is zero unless an \fIoptname\fP is not a valid shell
+option.
+.PP
+The list of \fBshopt\fP options is:
+.if t .sp .5v
+.if n .sp 1v
+.PD 0
+.TP 8
+.B autocd
+If set, a command name that is the name of a directory is executed as if
+it were the argument to the \fBcd\fP command.
+This option is only used by interactive shells.
+.TP 8
+.B cdable_vars
+If set, an argument to the
+.B cd
+builtin command that
+is not a directory is assumed to be the name of a variable whose
+value is the directory to change to.
+.TP 8
+.B cdspell
+If set, minor errors in the spelling of a directory component in a
+.B cd
+command will be corrected.
+The errors checked for are transposed characters,
+a missing character, and one character too many.
+If a correction is found, the corrected file name is printed,
+and the command proceeds.
+This option is only used by interactive shells.
+.TP 8
+.B checkhash
+If set, \fBbash\fP checks that a command found in the hash
+table exists before trying to execute it. If a hashed command no
+longer exists, a normal path search is performed.
+.TP 8
+.B checkjobs
+If set, \fBbash\fP lists the status of any stopped and running jobs before
+exiting an interactive shell. If any jobs are running, this causes
+the exit to be deferred until a second exit is attempted without an
+intervening command (see
+.SM
+.B "JOB CONTROL"
+above). The shell always
+postpones exiting if any jobs are stopped.
+.TP 8
+.B checkwinsize
+If set, \fBbash\fP checks the window size after each command
+and, if necessary, updates the values of
+.SM
+.B LINES
+and
+.SM
+.BR COLUMNS .
+.TP 8
+.B cmdhist
+If set,
+.B bash
+attempts to save all lines of a multiple-line
+command in the same history entry. This allows
+easy re-editing of multi-line commands.
+.TP 8
+.B compat31
+If set,
+.B bash
+changes its behavior to that of version 3.1 with respect to quoted
+arguments to the conditional command's =~ operator.
+.TP 8
+.B compat32
+If set,
+.B bash
+changes its behavior to that of version 3.2 with respect to locale-specific
+string comparison when using the conditional command's < and > operators.
+.TP 8
+.B compat40
+If set,
+.B bash
+changes its behavior to that of version 4.0 with respect to locale-specific
+string comparison when using the conditional command's < and > operators
+and the effect of interrupting a command list.
+.TP 8
+.B dirspell
+If set,
+.B bash
+attempts spelling correction on directory names during word completion
+if the directory name initially supplied does not exist.
+.TP 8
+.B dotglob
+If set,
+.B bash
+includes filenames beginning with a `.' in the results of pathname
+expansion.
+.TP 8
+.B execfail
+If set, a non-interactive shell will not exit if
+it cannot execute the file specified as an argument to the
+.B exec
+builtin command. An interactive shell does not exit if
+.B exec
+fails.
+.TP 8
+.B expand_aliases
+If set, aliases are expanded as described above under
+.SM
+.BR ALIASES .
+This option is enabled by default for interactive shells.
+.TP 8
+.B extdebug
+If set, behavior intended for use by debuggers is enabled:
+.RS
+.TP
+.B 1.
+The \fB\-F\fP option to the \fBdeclare\fP builtin displays the source
+file name and line number corresponding to each function name supplied
+as an argument.
+.TP
+.B 2.
+If the command run by the \fBDEBUG\fP trap returns a non-zero value, the
+next command is skipped and not executed.
+.TP
+.B 3.
+If the command run by the \fBDEBUG\fP trap returns a value of 2, and the
+shell is executing in a subroutine (a shell function or a shell script
+executed by the \fB.\fP or \fBsource\fP builtins), a call to
+\fBreturn\fP is simulated.
+.TP
+.B 4.
+.SM
+.B BASH_ARGC
+and
+.SM
+.B BASH_ARGV
+are updated as described in their descriptions above.
+.TP
+.B 5.
+Function tracing is enabled: command substitution, shell functions, and
+subshells invoked with \fB(\fP \fIcommand\fP \fB)\fP inherit the
+\fBDEBUG\fP and \fBRETURN\fP traps.
+.TP
+.B 6.
+Error tracing is enabled: command substitution, shell functions, and
+subshells invoked with \fB(\fP \fIcommand\fP \fB)\fP inherit the
+\fBERROR\fP trap.
+.RE
+.TP 8
+.B extglob
+If set, the extended pattern matching features described above under
+\fBPathname Expansion\fP are enabled.
+.TP 8
+.B extquote
+If set, \fB$\fP\(aq\fIstring\fP\(aq and \fB$\fP"\fIstring\fP" quoting is
+performed within \fB${\fP\fIparameter\fP\fB}\fP expansions
+enclosed in double quotes. This option is enabled by default.
+.TP 8
+.B failglob
+If set, patterns which fail to match filenames during pathname expansion
+result in an expansion error.
+.TP 8
+.B force_fignore
+If set, the suffixes specified by the
+.SM
+.B FIGNORE
+shell variable
+cause words to be ignored when performing word completion even if
+the ignored words are the only possible completions.
+See
+.SM
+\fBSHELL VARIABLES\fP
+above for a description of
+.SM
+.BR FIGNORE .
+This option is enabled by default.
+.TP 8
+.B globstar
+If set, the pattern \fB**\fP used in a pathname expansion context will
+match a files and zero or more directories and subdirectories.
+If the pattern is followed by a \fB/\fP, only directories and
+subdirectories match.
+.TP 8
+.B gnu_errfmt
+If set, shell error messages are written in the standard GNU error
+message format.
+.TP 8
+.B histappend
+If set, the history list is appended to the file named by the value
+of the
+.SM
+.B HISTFILE
+variable when the shell exits, rather than overwriting the file.
+.TP 8
+.B histreedit
+If set, and
+.B readline
+is being used, a user is given the opportunity to re-edit a
+failed history substitution.
+.TP 8
+.B histverify
+If set, and
+.B readline
+is being used, the results of history substitution are not immediately
+passed to the shell parser. Instead, the resulting line is loaded into
+the \fBreadline\fP editing buffer, allowing further modification.
+.TP 8
+.B hostcomplete
+If set, and
+.B readline
+is being used, \fBbash\fP will attempt to perform hostname completion when a
+word containing a \fB@\fP is being completed (see
+.B Completing
+under
+.SM
+.B READLINE
+above).
+This is enabled by default.
+.TP 8
+.B huponexit
+If set, \fBbash\fP will send
+.SM
+.B SIGHUP
+to all jobs when an interactive login shell exits.
+.TP 8
+.B interactive_comments
+If set, allow a word beginning with
+.B #
+to cause that word and all remaining characters on that
+line to be ignored in an interactive shell (see
+.SM
+.B COMMENTS
+above). This option is enabled by default.
+.TP 8
+.B lithist
+If set, and the
+.B cmdhist
+option is enabled, multi-line commands are saved to the history with
+embedded newlines rather than using semicolon separators where possible.
+.TP 8
+.B login_shell
+The shell sets this option if it is started as a login shell (see
+.SM
+.B "INVOCATION"
+above).
+The value may not be changed.
+.TP 8
+.B mailwarn
+If set, and a file that \fBbash\fP is checking for mail has been
+accessed since the last time it was checked, the message ``The mail in
+\fImailfile\fP has been read'' is displayed.
+.TP 8
+.B no_empty_cmd_completion
+If set, and
+.B readline
+is being used,
+.B bash
+will not attempt to search the
+.SM
+.B PATH
+for possible completions when
+completion is attempted on an empty line.
+.TP 8
+.B nocaseglob
+If set,
+.B bash
+matches filenames in a case\-insensitive fashion when performing pathname
+expansion (see
+.B Pathname Expansion
+above).
+.TP 8
+.B nocasematch
+If set,
+.B bash
+matches patterns in a case\-insensitive fashion when performing matching
+while executing \fBcase\fP or \fB[[\fP conditional commands.
+.TP 8
+.B nullglob
+If set,
+.B bash
+allows patterns which match no
+files (see
+.B Pathname Expansion
+above)
+to expand to a null string, rather than themselves.
+.TP 8
+.B progcomp
+If set, the programmable completion facilities (see
+\fBProgrammable Completion\fP above) are enabled.
+This option is enabled by default.
+.TP 8
+.B promptvars
+If set, prompt strings undergo
+parameter expansion, command substitution, arithmetic
+expansion, and quote removal after being expanded as described in
+.SM
+.B PROMPTING
+above. This option is enabled by default.
+.TP 8
+.B restricted_shell
+The shell sets this option if it is started in restricted mode (see
+.SM
+.B "RESTRICTED SHELL"
+below).
+The value may not be changed.
+This is not reset when the startup files are executed, allowing
+the startup files to discover whether or not a shell is restricted.
+.TP 8
+.B shift_verbose
+If set, the
+.B shift
+builtin prints an error message when the shift count exceeds the
+number of positional parameters.
+.TP 8
+.B sourcepath
+If set, the
+\fBsource\fP (\fB.\fP) builtin uses the value of
+.SM
+.B PATH
+to find the directory containing the file supplied as an argument.
+This option is enabled by default.
+.TP 8
+.B xpg_echo
+If set, the \fBecho\fP builtin expands backslash-escape sequences
+by default.
+.RE
+.TP
+\fBsuspend\fP [\fB\-f\fP]
+Suspend the execution of this shell until it receives a
+.SM
+.B SIGCONT
+signal. A login shell cannot be suspended; the
+.B \-f
+option can be used to override this and force the suspension.
+The return status is 0 unless the shell is a login shell and
+.B \-f
+is not supplied, or if job control is not enabled.
+.TP
+\fBtest\fP \fIexpr\fP
+.PD 0
+.TP
+\fB[\fP \fIexpr\fP \fB]\fP
+Return a status of 0 or 1 depending on
+the evaluation of the conditional expression
+.IR expr .
+Each operator and operand must be a separate argument.
+Expressions are composed of the primaries described above under
+.SM
+.BR "CONDITIONAL EXPRESSIONS" .
+\fBtest\fP does not accept any options, nor does it accept and ignore
+an argument of \fB\-\-\fP as signifying the end of options.
+.if t .sp 0.5
+.if n .sp 1
+Expressions may be combined using the following operators, listed
+in decreasing order of precedence.
+The evaluation depends on the number of arguments; see below.
+.RS
+.PD 0
+.TP
+.B ! \fIexpr\fP
+True if
+.I expr
+is false.
+.TP
+.B ( \fIexpr\fP )
+Returns the value of \fIexpr\fP.
+This may be used to override the normal precedence of operators.
+.TP
+\fIexpr1\fP \-\fBa\fP \fIexpr2\fP
+True if both
+.I expr1
+and
+.I expr2
+are true.
+.TP
+\fIexpr1\fP \-\fBo\fP \fIexpr2\fP
+True if either
+.I expr1
+or
+.I expr2
+is true.
+.PD
+.PP
+\fBtest\fP and \fB[\fP evaluate conditional
+expressions using a set of rules based on the number of arguments.
+.if t .sp 0.5
+.if n .sp 1
+.PD 0
+.TP
+0 arguments
+The expression is false.
+.TP
+1 argument
+The expression is true if and only if the argument is not null.
+.TP
+2 arguments
+If the first argument is \fB!\fP, the expression is true if and
+only if the second argument is null.
+If the first argument is one of the unary conditional operators listed above
+under
+.SM
+.BR "CONDITIONAL EXPRESSIONS" ,
+the expression is true if the unary test is true.
+If the first argument is not a valid unary conditional operator, the expression
+is false.
+.TP
+3 arguments
+If the second argument is one of the binary conditional operators listed above
+under
+.SM
+.BR "CONDITIONAL EXPRESSIONS" ,
+the result of the expression is the result of the binary test using
+the first and third arguments as operands.
+The \fB\-a\fP and \fB\-o\fP operators are considered binary operators
+when there are three arguments.
+If the first argument is \fB!\fP, the value is the negation of
+the two-argument test using the second and third arguments.
+If the first argument is exactly \fB(\fP and the third argument is
+exactly \fB)\fP, the result is the one-argument test of the second
+argument.
+Otherwise, the expression is false.
+.TP
+4 arguments
+If the first argument is \fB!\fP, the result is the negation of
+the three-argument expression composed of the remaining arguments.
+Otherwise, the expression is parsed and evaluated according to
+precedence using the rules listed above.
+.TP
+5 or more arguments
+The expression is parsed and evaluated according to precedence
+using the rules listed above.
+.RE
+.PD
+.TP
+.B times
+Print the accumulated user and system times for the shell and
+for processes run from the shell. The return status is 0.
+.TP
+\fBtrap\fP [\fB\-lp\fP] [[\fIarg\fP] \fIsigspec\fP ...]
+The command
+.I arg
+is to be read and executed when the shell receives
+signal(s)
+.IR sigspec .
+If
+.I arg
+is absent (and there is a single \fIsigspec\fP) or
+.BR \- ,
+each specified signal is
+reset to its original disposition (the value it had
+upon entrance to the shell).
+If
+.I arg
+is the null string the signal specified by each
+.I sigspec
+is ignored by the shell and by the commands it invokes.
+If
+.I arg
+is not present and
+.B \-p
+has been supplied, then the trap commands associated with each
+.I sigspec
+are displayed.
+If no arguments are supplied or if only
+.B \-p
+is given,
+.B trap
+prints the list of commands associated with each signal.
+The
+.B \-l
+option causes the shell to print a list of signal names and
+their corresponding numbers.
+Each
+.I sigspec
+is either
+a signal name defined in <\fIsignal.h\fP>, or a signal number.
+Signal names are case insensitive and the SIG prefix is optional.
+.if t .sp 0.5
+.if n .sp 1
+If a
+.I sigspec
+is
+.SM
+.B EXIT
+(0) the command
+.I arg
+is executed on exit from the shell.
+If a
+.I sigspec
+is
+.SM
+.BR DEBUG ,
+the command
+.I arg
+is executed before every \fIsimple command\fP, \fIfor\fP command,
+\fIcase\fP command, \fIselect\fP command, every arithmetic \fIfor\fP
+command, and before the first command executes in a shell function (see
+.SM
+.B SHELL GRAMMAR
+above).
+Refer to the description of the \fBextdebug\fP option to the
+\fBshopt\fP builtin for details of its effect on the \fBDEBUG\fP trap.
+If a
+.I sigspec
+is
+.SM
+.BR RETURN ,
+the command
+.I arg
+is executed each time a shell function or a script executed with the
+\fB.\fP or \fBsource\fP builtins finishes executing.
+.if t .sp 0.5
+.if n .sp 1
+If a
+.I sigspec
+is
+.SM
+.BR ERR ,
+the command
+.I arg
+is executed whenever a simple command has a non\-zero exit status,
+subject to the following conditions.
+The
+.SM
+.B ERR
+trap is not executed if the failed
+command is part of the command list immediately following a
+.B while
+or
+.B until
+keyword,
+part of the test in an
+.I if
+statement, part of a command executed in a
+.B &&
+or
+.B \(bv\(bv
+list, or if the command's return value is
+being inverted via
+.BR ! .
+These are the same conditions obeyed by the \fBerrexit\fP option.
+.if t .sp 0.5
+.if n .sp 1
+Signals ignored upon entry to the shell cannot be trapped or reset.
+Trapped signals that are not being ignored are reset to their original
+values in a subshell or subshell environment when one is created.
+The return status is false if any
+.I sigspec
+is invalid; otherwise
+.B trap
+returns true.
+.TP
+\fBtype\fP [\fB\-aftpP\fP] \fIname\fP [\fIname\fP ...]
+With no options,
+indicate how each
+.I name
+would be interpreted if used as a command name.
+If the
+.B \-t
+option is used,
+.B type
+prints a string which is one of
+.IR alias ,
+.IR keyword ,
+.IR function ,
+.IR builtin ,
+or
+.I file
+if
+.I name
+is an alias, shell reserved word, function, builtin, or disk file,
+respectively.
+If the
+.I name
+is not found, then nothing is printed, and an exit status of false
+is returned.
+If the
+.B \-p
+option is used,
+.B type
+either returns the name of the disk file
+that would be executed if
+.I name
+were specified as a command name,
+or nothing if
+.if t \f(CWtype -t name\fP
+.if n ``type -t name''
+would not return
+.IR file .
+The
+.B \-P
+option forces a
+.SM
+.B PATH
+search for each \fIname\fP, even if
+.if t \f(CWtype -t name\fP
+.if n ``type -t name''
+would not return
+.IR file .
+If a command is hashed,
+.B \-p
+and
+.B \-P
+print the hashed value, not necessarily the file that appears
+first in
+.SM
+.BR PATH .
+If the
+.B \-a
+option is used,
+.B type
+prints all of the places that contain
+an executable named
+.IR name .
+This includes aliases and functions,
+if and only if the
+.B \-p
+option is not also used.
+The table of hashed commands is not consulted
+when using
+.BR \-a .
+The
+.B \-f
+option suppresses shell function lookup, as with the \fBcommand\fP builtin.
+.B type
+returns true if all of the arguments are found, false if
+any are not found.
+.TP
+\fBulimit\fP [\fB\-HSTabcdefilmnpqrstuvx\fP [\fIlimit\fP]]
+Provides control over the resources available to the shell and to
+processes started by it, on systems that allow such control.
+The \fB\-H\fP and \fB\-S\fP options specify that the hard or soft limit is
+set for the given resource.
+A hard limit cannot be increased by a non-root user once it is set;
+a soft limit may be increased up to the value of the hard limit.
+If neither \fB\-H\fP nor \fB\-S\fP is specified, both the soft and hard
+limits are set.
+The value of
+.I limit
+can be a number in the unit specified for the resource
+or one of the special values
+.BR hard ,
+.BR soft ,
+or
+.BR unlimited ,
+which stand for the current hard limit, the current soft limit, and
+no limit, respectively.
+If
+.I limit
+is omitted, the current value of the soft limit of the resource is
+printed, unless the \fB\-H\fP option is given. When more than one
+resource is specified, the limit name and unit are printed before the value.
+Other options are interpreted as follows:
+.RS
+.PD 0
+.TP
+.B \-a
+All current limits are reported
+.TP
+.B \-b
+The maximum socket buffer size
+.TP
+.B \-c
+The maximum size of core files created
+.TP
+.B \-d
+The maximum size of a process's data segment
+.TP
+.B \-e
+The maximum scheduling priority ("nice")
+.TP
+.B \-f
+The maximum size of files written by the shell and its children
+.TP
+.B \-i
+The maximum number of pending signals
+.TP
+.B \-l
+The maximum size that may be locked into memory
+.TP
+.B \-m
+The maximum resident set size (many systems do not honor this limit)
+.TP
+.B \-n
+The maximum number of open file descriptors (most systems do not
+allow this value to be set)
+.TP
+.B \-p
+The pipe size in 512-byte blocks (this may not be set)
+.TP
+.B \-q
+The maximum number of bytes in POSIX message queues
+.TP
+.B \-r
+The maximum real-time scheduling priority
+.TP
+.B \-s
+The maximum stack size
+.TP
+.B \-t
+The maximum amount of cpu time in seconds
+.TP
+.B \-u
+The maximum number of processes available to a single user
+.TP
+.B \-v
+The maximum amount of virtual memory available to the shell
+.TP
+.B \-x
+The maximum number of file locks
+.TP
+.B \-T
+The maximum number of threads
+.PD
+.PP
+If
+.I limit
+is given, it is the new value of the specified resource (the
+.B \-a
+option is display only).
+If no option is given, then
+.B \-f
+is assumed. Values are in 1024-byte increments, except for
+.BR \-t ,
+which is in seconds,
+.BR \-p ,
+which is in units of 512-byte blocks,
+and
+.BR \-T ,
+.BR \-b ,
+.BR \-n ,
+and
+.BR \-u ,
+which are unscaled values.
+The return status is 0 unless an invalid option or argument is supplied,
+or an error occurs while setting a new limit.
+.RE
+.TP
+\fBumask\fP [\fB\-p\fP] [\fB\-S\fP] [\fImode\fP]
+The user file-creation mask is set to
+.IR mode .
+If
+.I mode
+begins with a digit, it
+is interpreted as an octal number; otherwise
+it is interpreted as a symbolic mode mask similar
+to that accepted by
+.IR chmod (1).
+If
+.I mode
+is omitted, the current value of the mask is printed.
+The
+.B \-S
+option causes the mask to be printed in symbolic form; the
+default output is an octal number.
+If the
+.B \-p
+option is supplied, and
+.I mode
+is omitted, the output is in a form that may be reused as input.
+The return status is 0 if the mode was successfully changed or if
+no \fImode\fP argument was supplied, and false otherwise.
+.TP
+\fBunalias\fP [\-\fBa\fP] [\fIname\fP ...]
+Remove each \fIname\fP from the list of defined aliases. If
+.B \-a
+is supplied, all alias definitions are removed. The return
+value is true unless a supplied
+.I name
+is not a defined alias.
+.TP
+\fBunset\fP [\-\fBfv\fP] [\fIname\fP ...]
+For each
+.IR name ,
+remove the corresponding variable or function.
+If no options are supplied, or the
+.B \-v
+option is given, each
+.I name
+refers to a shell variable.
+Read-only variables may not be unset.
+If
+.B \-f
+is specified, each
+.I name
+refers to a shell function, and the function definition
+is removed.
+Each unset variable or function is removed from the environment
+passed to subsequent commands.
+If any of
+.SM
+.BR COMP_WORDBREAKS ,
+.SM
+.BR RANDOM ,
+.SM
+.BR SECONDS ,
+.SM
+.BR LINENO ,
+.SM
+.BR HISTCMD ,
+.SM
+.BR FUNCNAME ,
+.SM
+.BR GROUPS ,
+or
+.SM
+.B DIRSTACK
+are unset, they lose their special properties, even if they are
+subsequently reset. The exit status is true unless a
+.I name
+is readonly.
+.TP
+\fBwait\fP [\fIn ...\fP]
+Wait for each specified process and return its termination status.
+Each
+.I n
+may be a process
+ID or a job specification; if a job spec is given, all processes
+in that job's pipeline are waited for. If
+.I n
+is not given, all currently active child processes
+are waited for, and the return status is zero. If
+.I n
+specifies a non-existent process or job, the return status is
+127. Otherwise, the return status is the exit status of the last
+process or job waited for.
+.\" bash_builtins
+.if \n(zZ=1 .ig zZ
+.SH "RESTRICTED SHELL"
+.\" rbash.1
+.zY
+.PP
+If
+.B bash
+is started with the name
+.BR rbash ,
+or the
+.B \-r
+option is supplied at invocation,
+the shell becomes restricted.
+A restricted shell is used to
+set up an environment more controlled than the standard shell.
+It behaves identically to
+.B bash
+with the exception that the following are disallowed or not performed:
+.IP \(bu
+changing directories with \fBcd\fP
+.IP \(bu
+setting or unsetting the values of
+.SM
+.BR SHELL ,
+.SM
+.BR PATH ,
+.SM
+.BR ENV ,
+or
+.SM
+.B BASH_ENV
+.IP \(bu
+specifying command names containing
+.B /
+.IP \(bu
+specifying a file name containing a
+.B /
+as an argument to the
+.B .
+builtin command
+.IP \(bu
+Specifying a filename containing a slash as an argument to the
+.B \-p
+option to the
+.B hash
+builtin command
+.IP \(bu
+importing function definitions from the shell environment at startup
+.IP \(bu
+parsing the value of
+.SM
+.B SHELLOPTS
+from the shell environment at startup
+.IP \(bu
+redirecting output using the >, >|, <>, >&, &>, and >> redirection operators
+.IP \(bu
+using the
+.B exec
+builtin command to replace the shell with another command
+.IP \(bu
+adding or deleting builtin commands with the
+.B \-f
+and
+.B \-d
+options to the
+.B enable
+builtin command
+.IP \(bu
+Using the \fBenable\fP builtin command to enable disabled shell builtins
+.IP \(bu
+specifying the
+.B \-p
+option to the
+.B command
+builtin command
+.IP \(bu
+turning off restricted mode with
+\fBset +r\fP or \fBset +o restricted\fP.
+.PP
+These restrictions are enforced after any startup files are read.
+.PP
+.ie \n(zY=1 When a command that is found to be a shell script is executed,
+.el \{ When a command that is found to be a shell script is executed
+(see
+.SM
+.B "COMMAND EXECUTION"
+above),
+\}
+.B rbash
+turns off any restrictions in the shell spawned to execute the
+script.
+.\" end of rbash.1
+.if \n(zY=1 .ig zY
+.SH "SEE ALSO"
+.PD 0
+.TP
+\fIBash Reference Manual\fP, Brian Fox and Chet Ramey
+.TP
+\fIThe Gnu Readline Library\fP, Brian Fox and Chet Ramey
+.TP
+\fIThe Gnu History Library\fP, Brian Fox and Chet Ramey
+.TP
+\fIPortable Operating System Interface (POSIX) Part 2: Shell and Utilities\fP, IEEE
+.TP
+\fIsh\fP(1), \fIksh\fP(1), \fIcsh\fP(1)
+.TP
+\fIemacs\fP(1), \fIvi\fP(1)
+.TP
+\fIreadline\fP(3)
+.PD
+.SH FILES
+.PD 0
+.TP
+.FN /bin/bash
+The \fBbash\fP executable
+.TP
+.FN /etc/profile
+The systemwide initialization file, executed for login shells
+.TP
+.FN ~/.bash_profile
+The personal initialization file, executed for login shells
+.TP
+.FN ~/.bashrc
+The individual per-interactive-shell startup file
+.TP
+.FN ~/.bash_logout
+The individual login shell cleanup file, executed when a login shell exits
+.TP
+.FN ~/.inputrc
+Individual \fIreadline\fP initialization file
+.PD
+.SH AUTHORS
+Brian Fox, Free Software Foundation
+.br
+bfox@gnu.org
+.PP
+Chet Ramey, Case Western Reserve University
+.br
+chet.ramey@case.edu
+.SH BUG REPORTS
+If you find a bug in
+.B bash,
+you should report it. But first, you should
+make sure that it really is a bug, and that it appears in the latest
+version of
+.BR bash .
+The latest version is always available from
+\fIftp://ftp.gnu.org/pub/bash/\fP.
+.PP
+Once you have determined that a bug actually exists, use the
+.I bashbug
+command to submit a bug report.
+If you have a fix, you are encouraged to mail that as well!
+Suggestions and `philosophical' bug reports may be mailed
+to \fIbug-bash@gnu.org\fP or posted to the Usenet
+newsgroup
+.BR gnu.bash.bug .
+.PP
+ALL bug reports should include:
+.PP
+.PD 0
+.TP 20
+The version number of \fBbash\fR
+.TP
+The hardware and operating system
+.TP
+The compiler used to compile
+.TP
+A description of the bug behaviour
+.TP
+A short script or `recipe' which exercises the bug
+.PD
+.PP
+.I bashbug
+inserts the first three items automatically into the template
+it provides for filing a bug report.
+.PP
+Comments and bug reports concerning
+this manual page should be directed to
+.IR chet@po.cwru.edu .
+.SH BUGS
+.PP
+It's too big and too slow.
+.PP
+There are some subtle differences between
+.B bash
+and traditional versions of
+.BR sh ,
+mostly because of the
+.SM
+.B POSIX
+specification.
+.PP
+Aliases are confusing in some uses.
+.PP
+Shell builtin commands and functions are not stoppable/restartable.
+.PP
+Compound commands and command sequences of the form `a ; b ; c'
+are not handled gracefully when process suspension is attempted.
+When a process is stopped, the shell immediately executes the next
+command in the sequence.
+It suffices to place the sequence of commands between
+parentheses to force it into a subshell, which may be stopped as
+a unit.
+.PP
+Array variables may not (yet) be exported.
+.PP
+There may be only one active coprocess at a time.
+.zZ
+.zY
diff --git a/doc/bash.html b/doc/bash.html
new file mode 100644
index 0000000..2aa2825
--- /dev/null
+++ b/doc/bash.html
@@ -0,0 +1,12571 @@
+<HTML><HEAD>
+<TITLE>BASH(1) Manual Page</TITLE>
+</HEAD>
+<BODY><TABLE WIDTH=100%>
+<TR>
+<TH ALIGN=LEFT width=33%>BASH(1)<TH ALIGN=CENTER width=33%>2009 December 29<TH ALIGN=RIGHT width=33%>BASH(1)
+</TR>
+</TABLE>
+<BR><A HREF="#index">Index</A>
+<HR>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+<A NAME="lbAB">&nbsp;</A>
+<H3>NAME</H3>
+
+bash - GNU Bourne-Again SHell
+<A NAME="lbAC">&nbsp;</A>
+<H3>SYNOPSIS</H3>
+
+<B>bash</B>
+
+[options]
+[file]
+<A NAME="lbAD">&nbsp;</A>
+<H3>COPYRIGHT</H3>
+
+
+Bash is Copyright &#169; 1989-2009 by the Free Software Foundation, Inc.
+<A NAME="lbAE">&nbsp;</A>
+<H3>DESCRIPTION</H3>
+
+<B>Bash</B>
+
+is an <B>sh</B>-compatible command language interpreter that
+executes commands read from the standard input or from a file.
+<B>Bash</B>
+
+also incorporates useful features from the <I>Korn</I> and <I>C</I>
+shells (<B>ksh</B> and <B>csh</B>).
+<P>
+
+<B>Bash</B>
+
+is intended to be a conformant implementation of the
+Shell and Utilities portion of the IEEE POSIX specification
+(IEEE Standard 1003.1).
+<B>Bash</B>
+
+can be configured to be POSIX-conformant by default.
+<A NAME="lbAF">&nbsp;</A>
+<H3>OPTIONS</H3>
+
+In addition to the single-character shell options documented in the
+description of the <B>set</B> builtin command, <B>bash</B>
+interprets the following options when it is invoked:
+<P>
+
+
+<DL COMPACT>
+<DT><B>-c</B><I> string</I>
+
+<DD>
+If the
+<B>-c</B>
+
+option is present, then commands are read from
+<I>string</I>.
+
+If there are arguments after the
+<I>string</I>,
+
+they are assigned to the positional parameters, starting with
+<B>$0</B>.
+
+<DT><B>-i</B>
+
+<DD>
+If the
+<B>-i</B>
+
+option is present, the shell is
+<I>interactive</I>.
+
+<DT><B>-l</B>
+
+<DD>
+Make
+<B>bash</B>
+
+act as if it had been invoked as a login shell (see
+<FONT SIZE=-1><B>INVOCATION</B>
+
+</FONT>
+below).
+<DT><B>-r</B>
+
+<DD>
+If the
+<B>-r</B>
+
+option is present, the shell becomes
+<I>restricted</I>
+
+(see
+<FONT SIZE=-1><B>RESTRICTED SHELL</B>
+
+</FONT>
+below).
+<DT><B>-s</B>
+
+<DD>
+If the
+<B>-s</B>
+
+option is present, or if no arguments remain after option
+processing, then commands are read from the standard input.
+This option allows the positional parameters to be set
+when invoking an interactive shell.
+<DT><B>-D</B>
+
+<DD>
+A list of all double-quoted strings preceded by <B>$</B>
+is printed on the standard output.
+These are the strings that
+are subject to language translation when the current locale
+is not <B>C</B> or <B>POSIX</B>.
+This implies the <B>-n</B> option; no commands will be executed.
+<DT><B>[-+]O [</B><I>shopt_option</I>]
+
+<DD>
+<I>shopt_option</I> is one of the shell options accepted by the
+<B>shopt</B> builtin (see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below).
+If <I>shopt_option</I> is present, <B>-O</B> sets the value of that option;
+<B>+O</B> unsets it.
+If <I>shopt_option</I> is not supplied, the names and values of the shell
+options accepted by <B>shopt</B> are printed on the standard output.
+If the invocation option is <B>+O</B>, the output is displayed in a format
+that may be reused as input.
+<DT><B>--</B>
+
+<DD>
+A
+<B>--</B>
+
+signals the end of options and disables further option processing.
+Any arguments after the
+<B>--</B>
+
+are treated as filenames and arguments. An argument of
+<B>-</B>
+
+is equivalent to <B>--</B>.
+
+</DL>
+<P>
+
+<B>Bash</B>
+
+also interprets a number of multi-character options.
+These options must appear on the command line before the
+single-character options to be recognized.
+<P>
+
+
+<DL COMPACT>
+<DT><B>--debugger</B>
+
+<DD>
+Arrange for the debugger profile to be executed before the shell
+starts.
+Turns on extended debugging mode (see the description of the
+<B>extdebug</B>
+
+option to the
+<B>shopt</B>
+
+builtin below)
+and shell function tracing (see the description of the
+<B>-o functrace</B> option to the
+<B>set</B>
+
+builtin below).
+<DT><B>--dump-po-strings</B>
+
+<DD>
+Equivalent to <B>-D</B>, but the output is in the GNU <I>gettext</I>
+<B>po</B> (portable object) file format.
+<DT><B>--dump-strings</B>
+
+<DD>
+Equivalent to <B>-D</B>.
+<DT><B>--help</B>
+
+<DD>
+Display a usage message on standard output and exit successfully.
+<DT><B>--init-file</B> <I>file</I><DD>
+
+<DT><B>--rcfile</B> <I>file</I><DD>
+
+Execute commands from
+<I>file</I>
+
+instead of the standard personal initialization file
+<A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>
+
+if the shell is interactive (see
+<FONT SIZE=-1><B>INVOCATION</B>
+
+</FONT>
+below).
+<DT><B>--login</B>
+
+<DD>
+Equivalent to <B>-l</B>.
+<DT><B>--noediting</B>
+
+<DD>
+Do not use the GNU
+<B>readline</B>
+
+library to read command lines when the shell is interactive.
+<DT><B>--noprofile</B>
+
+<DD>
+Do not read either the system-wide startup file
+
+<A HREF="file:/etc/profile"><I>/etc/profile</I></A>
+
+or any of the personal initialization files
+<A HREF="file:~/.bash_profile"><I>~/.bash_profile</I></A>,
+
+<A HREF="file:~/.bash_login"><I>~/.bash_login</I></A>,
+
+or
+<A HREF="file:~/.profile"><I>~/.profile</I></A>.
+
+By default,
+<B>bash</B>
+
+reads these files when it is invoked as a login shell (see
+<FONT SIZE=-1><B>INVOCATION</B>
+
+</FONT>
+below).
+<DT><B>--norc</B>
+
+<DD>
+Do not read and execute the personal initialization file
+<A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>
+
+if the shell is interactive.
+This option is on by default if the shell is invoked as
+<B>sh</B>.
+
+<DT><B>--posix</B>
+
+<DD>
+Change the behavior of <B>bash</B> where the default operation differs
+from the POSIX standard to match the standard (<I>posix mode</I>).
+<DT><B>--restricted</B>
+
+<DD>
+The shell becomes restricted (see
+<FONT SIZE=-1><B>RESTRICTED SHELL</B>
+
+</FONT>
+below).
+<DT><B>--verbose</B>
+
+<DD>
+Equivalent to <B>-v</B>.
+<DT><B>--version</B>
+
+<DD>
+Show version information for this instance of
+<B>bash</B>
+
+on the standard output and exit successfully.
+
+</DL>
+<A NAME="lbAG">&nbsp;</A>
+<H3>ARGUMENTS</H3>
+
+If arguments remain after option processing, and neither the
+<B>-c</B>
+
+nor the
+<B>-s</B>
+
+option has been supplied, the first argument is assumed to
+be the name of a file containing shell commands.
+If
+<B>bash</B>
+
+is invoked in this fashion,
+<B>$0</B>
+
+is set to the name of the file, and the positional parameters
+are set to the remaining arguments.
+<B>Bash</B>
+
+reads and executes commands from this file, then exits.
+<B>Bash</B>'s exit status is the exit status of the last command
+executed in the script.
+If no commands are executed, the exit status is 0.
+An attempt is first made to open the file in the current directory, and,
+if no file is found, then the shell searches the directories in
+<FONT SIZE=-1><B>PATH</B>
+
+</FONT>
+for the script.
+<A NAME="lbAH">&nbsp;</A>
+<H3>INVOCATION</H3>
+
+A <I>login shell</I> is one whose first character of argument zero is a
+<B>-</B>,
+
+or one started with the
+<B>--login</B>
+
+option.
+<P>
+
+An <I>interactive</I> shell is one started without non-option arguments
+and without the
+<B>-c</B>
+
+option
+whose standard input and error are
+both connected to terminals (as determined by
+<I>isatty</I>(3)),
+
+or one started with the
+<B>-i</B>
+
+option.
+<FONT SIZE=-1><B>PS1</B>
+
+</FONT>
+is set and
+<B>$-</B>
+
+includes
+<B>i</B>
+
+if
+<B>bash</B>
+
+is interactive,
+allowing a shell script or a startup file to test this state.
+<P>
+
+The following paragraphs describe how
+<B>bash</B>
+
+executes its startup files.
+If any of the files exist but cannot be read,
+<B>bash</B>
+
+reports an error.
+Tildes are expanded in file names as described below under
+<B>Tilde Expansion</B>
+
+in the
+<FONT SIZE=-1><B>EXPANSION</B>
+
+</FONT>
+section.
+<P>
+
+When
+<B>bash</B>
+
+is invoked as an interactive login shell, or as a non-interactive shell
+with the <B>--login</B> option, it first reads and
+executes commands from the file <A HREF="file:/etc/profile"><I>/etc/profile</I></A>, if that
+file exists.
+After reading that file, it looks for <A HREF="file:~/.bash_profile"><I>~/.bash_profile</I></A>,
+<A HREF="file:~/.bash_login"><I>~/.bash_login</I></A>, and <A HREF="file:~/.profile"><I>~/.profile</I></A>, in that order, and reads
+and executes commands from the first one that exists and is readable.
+The
+<B>--noprofile</B>
+
+option may be used when the shell is started to inhibit this behavior.
+<P>
+
+When a login shell exits,
+<B>bash</B>
+
+reads and executes commands from the file <A HREF="file:~/.bash_logout"><I>~/.bash_logout</I></A>, if it
+exists.
+<P>
+
+When an interactive shell that is not a login shell is started,
+<B>bash</B>
+
+reads and executes commands from <A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>, if that file exists.
+This may be inhibited by using the
+<B>--norc</B>
+
+option.
+The <B>--rcfile</B> <I>file</I> option will force
+<B>bash</B>
+
+to read and execute commands from <I>file</I> instead of <A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>.
+<P>
+
+When
+<B>bash</B>
+
+is started non-interactively, to run a shell script, for example, it
+looks for the variable
+<FONT SIZE=-1><B>BASH_ENV</B>
+
+</FONT>
+in the environment, expands its value if it appears there, and uses the
+expanded value as the name of a file to read and execute.
+<B>Bash</B>
+
+behaves as if the following command were executed:
+<P>
+<DL COMPACT><DT><DD>
+<TT>if [ -n &quot;$BASH_ENV&quot; ]; then . &quot;$BASH_ENV&quot;; fi</TT>
+
+</DL>
+
+<P>
+but the value of the
+<FONT SIZE=-1><B>PATH</B>
+
+</FONT>
+variable is not used to search for the file name.
+<P>
+
+If
+<B>bash</B>
+
+is invoked with the name
+<B>sh</B>,
+
+it tries to mimic the startup behavior of historical versions of
+<B>sh</B>
+
+as closely as possible,
+while conforming to the POSIX standard as well.
+When invoked as an interactive login shell, or a non-interactive
+shell with the <B>--login</B> option, it first attempts to
+read and execute commands from
+<A HREF="file:/etc/profile"><I>/etc/profile</I></A>
+
+and
+<A HREF="file:~/.profile"><I>~/.profile</I></A>,
+
+in that order.
+The
+<B>--noprofile</B>
+
+option may be used to inhibit this behavior.
+When invoked as an interactive shell with the name
+<B>sh</B>,
+
+<B>bash</B>
+
+looks for the variable
+<FONT SIZE=-1><B>ENV</B>,
+
+</FONT>
+expands its value if it is defined, and uses the
+expanded value as the name of a file to read and execute.
+Since a shell invoked as
+<B>sh</B>
+
+does not attempt to read and execute commands from any other startup
+files, the
+<B>--rcfile</B>
+
+option has no effect.
+A non-interactive shell invoked with the name
+<B>sh</B>
+
+does not attempt to read any other startup files.
+When invoked as
+<B>sh</B>,
+
+<B>bash</B>
+
+enters
+<I>posix</I>
+
+mode after the startup files are read.
+<P>
+
+When
+<B>bash</B>
+
+is started in
+<I>posix</I>
+
+mode, as with the
+<B>--posix</B>
+
+command line option, it follows the POSIX standard for startup files.
+In this mode, interactive shells expand the
+<FONT SIZE=-1><B>ENV</B>
+
+</FONT>
+variable and commands are read and executed from the file
+whose name is the expanded value.
+No other startup files are read.
+<P>
+
+<B>Bash</B>
+
+attempts to determine when it is being run with its standard input
+connected to a a network connection, as if by the remote shell
+daemon, usually <I>rshd</I>, or the secure shell daemon <I>sshd</I>.
+If
+<B>bash</B>
+
+determines it is being run in this fashion, it reads and executes
+commands from <A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>, if that file exists and is readable.
+It will not do this if invoked as <B>sh</B>.
+The
+<B>--norc</B>
+
+option may be used to inhibit this behavior, and the
+<B>--rcfile</B>
+
+option may be used to force another file to be read, but
+<I>rshd</I> does not generally invoke the shell with those options
+or allow them to be specified.
+<P>
+
+If the shell is started with the effective user (group) id not equal to the
+real user (group) id, and the <B>-p</B> option is not supplied, no startup
+files are read, shell functions are not inherited from the environment, the
+<FONT SIZE=-1><B>SHELLOPTS</B>,
+
+</FONT>
+<FONT SIZE=-1><B>BASHOPTS</B>,
+
+</FONT>
+<FONT SIZE=-1><B>CDPATH</B>,
+
+</FONT>
+and
+<FONT SIZE=-1><B>GLOBIGNORE</B>
+
+</FONT>
+variables, if they appear in the environment, are ignored,
+and the effective user id is set to the real user id.
+If the <B>-p</B> option is supplied at invocation, the startup behavior is
+the same, but the effective user id is not reset.
+<A NAME="lbAI">&nbsp;</A>
+<H3>DEFINITIONS</H3>
+
+<P>
+
+The following definitions are used throughout the rest of this
+document.
+
+<DL COMPACT>
+<DT><B>blank </B>
+
+<DD>
+A space or tab.
+<DT><B>word</B>
+
+<DD>
+A sequence of characters considered as a single unit by the shell.
+Also known as a
+<B>token</B>.
+
+<DT><B>name</B>
+
+<DD>
+A
+<I>word</I>
+
+consisting only of alphanumeric characters and underscores, and
+beginning with an alphabetic character or an underscore. Also
+referred to as an
+<B>identifier</B>.
+
+<DT><B>metacharacter</B>
+
+<DD>
+A character that, when unquoted, separates words. One of the following:
+<BR>
+
+<DL COMPACT><DT><DD>
+<P>
+
+<B>| &amp; ; ( ) &lt; &gt; space tab</B>
+
+</DL>
+
+</DL>
+<P>
+
+<DL COMPACT>
+<DT><B>control operator</B>
+
+<DD>
+A <I>token</I> that performs a control function. It is one of the following
+symbols:
+<DL COMPACT><DT><DD>
+<P>
+
+<B>|| &amp; &amp;&amp; ; ;; ( ) | |&amp; &lt;newline&gt;</B>
+
+</DL>
+
+
+</DL>
+<A NAME="lbAJ">&nbsp;</A>
+<H3>RESERVED WORDS</H3>
+
+<I>Reserved words</I> are words that have a special meaning to the shell.
+The following words are recognized as reserved when unquoted and either
+the first word of a simple command (see
+<FONT SIZE=-1><B>SHELL GRAMMAR</B>
+
+</FONT>
+below) or the third word of a
+<B>case </B>
+
+or
+<B>for</B>
+
+command:
+<DL COMPACT><DT><DD>
+
+<P>
+
+<B>
+</B>
+
+! case do done elif else esac fi for function if in select then until while { } time [[ ]]
+</DL>
+
+
+<A NAME="lbAK">&nbsp;</A>
+<H3>SHELL GRAMMAR</H3>
+
+<A NAME="lbAL">&nbsp;</A>
+<H4>Simple Commands</H4>
+
+<P>
+
+A <I>simple command</I> is a sequence of optional variable assignments
+followed by <B>blank</B>-separated words and redirections, and
+terminated by a <I>control operator</I>. The first word
+specifies the command to be executed, and is passed as argument zero.
+The remaining words are passed as arguments to the invoked command.
+<P>
+
+The return value of a <I>simple command</I> is its exit status, or
+128+<I>n</I> if the command is terminated by signal
+<I>n</I>.
+
+<A NAME="lbAM">&nbsp;</A>
+<H4>Pipelines</H4>
+
+<P>
+
+A <I>pipeline</I> is a sequence of one or more commands separated by
+one of the control operators
+<B>|</B>
+
+or <B>|&amp;</B>.
+The format for a pipeline is:
+<DL COMPACT><DT><DD>
+<P>
+
+[<B>time</B> [<B>-p</B>]] [ ! ] <I>command</I> [ [<B>|</B>|<B>|&amp;</B>] <I>command2</I> ... ]
+</DL>
+
+<P>
+
+The standard output of
+<I>command</I>
+
+is connected via a pipe to the standard input of
+<I>command2</I>.
+
+This connection is performed before any redirections specified by the
+command (see
+<FONT SIZE=-1><B>REDIRECTION</B>
+
+</FONT>
+below).
+If <B>|&amp;</B> is used, the standard error of <I>command</I> is connected to
+<I>command2</I>'s standard input through the pipe; it is shorthand for
+<B>2&gt;&amp;1 |</B>.
+This implicit redirection of the standard error is performed after any
+redirections specified by the command.
+<P>
+
+The return status of a pipeline is the exit status of the last
+command, unless the <B>pipefail</B> option is enabled.
+If <B>pipefail</B> is enabled, the pipeline's return status is the
+value of the last (rightmost) command to exit with a non-zero status,
+or zero if all commands exit successfully.
+If the reserved word
+<B>!</B>
+
+precedes a pipeline, the exit status of that pipeline is the logical
+negation of the exit status as described above.
+The shell waits for all commands in the pipeline to
+terminate before returning a value.
+<P>
+
+If the
+<B>time</B>
+
+reserved word precedes a pipeline, the elapsed as well as user and
+system time consumed by its execution are reported when the pipeline
+terminates.
+The <B>-p</B> option changes the output format to that specified by POSIX.
+The
+<FONT SIZE=-1><B>TIMEFORMAT</B>
+
+</FONT>
+variable may be set to a format string that specifies how the timing
+information should be displayed; see the description of
+<FONT SIZE=-1><B>TIMEFORMAT</B>
+
+</FONT>
+under
+<B>Shell Variables</B>
+
+below.
+<P>
+
+Each command in a pipeline is executed as a separate process (i.e., in a
+subshell).
+<A NAME="lbAN">&nbsp;</A>
+<H4>Lists</H4>
+
+<P>
+
+A <I>list</I> is a sequence of one or more pipelines separated by one
+of the operators
+<B>;</B>,
+
+<B>&amp;</B>,
+
+<B>&amp;&amp;</B>,
+
+or
+<B>||</B>,
+
+and optionally terminated by one of
+<B>;</B>,
+
+<B>&amp;</B>,
+
+or
+<B>&lt;newline&gt;</B>.
+
+<P>
+
+Of these list operators,
+<B>&amp;&amp;</B>
+
+and
+<B>||</B>
+
+have equal precedence, followed by
+<B>;</B>
+
+and
+<B>&amp;</B>,
+
+which have equal precedence.
+<P>
+
+A sequence of one or more newlines may appear in a <I>list</I> instead
+of a semicolon to delimit commands.
+<P>
+
+If a command is terminated by the control operator
+<B>&amp;</B>,
+
+the shell executes the command in the <I>background</I>
+in a subshell. The shell does not wait for the command to
+finish, and the return status is 0. Commands separated by a
+<B>;</B>
+
+are executed sequentially; the shell waits for each
+command to terminate in turn. The return status is the
+exit status of the last command executed.
+<P>
+
+AND and OR lists are sequences of one of more pipelines separated by the
+<B>&amp;&amp;</B> and <B>||</B> control operators, respectively.
+AND and OR lists are executed with left associativity.
+An AND list has the form
+<DL COMPACT><DT><DD>
+<P>
+
+<I>command1</I> <B>&amp;&amp;</B> <I>command2</I>
+</DL>
+
+<P>
+
+<I>command2</I>
+
+is executed if, and only if,
+<I>command1</I>
+
+returns an exit status of zero.
+<P>
+
+An OR list has the form
+<DL COMPACT><DT><DD>
+<P>
+
+<I>command1</I> <B>||</B> <I>command2</I>
+<P>
+
+</DL>
+
+<P>
+
+<I>command2</I>
+
+is executed if and only if
+<I>command1</I>
+
+returns a non-zero exit status.
+The return status of
+AND and OR lists is the exit status of the last command
+executed in the list.
+<A NAME="lbAO">&nbsp;</A>
+<H4>Compound Commands</H4>
+
+<P>
+
+A <I>compound command</I> is one of the following:
+<DL COMPACT>
+<DT>(<I>list</I>)<DD>
+<I>list</I> is executed in a subshell environment (see
+<FONT SIZE=-1><B>COMMAND EXECUTION ENVIRONMENT</B></FONT>
+below).
+Variable assignments and builtin
+commands that affect the shell's environment do not remain in effect
+after the command completes. The return status is the exit status of
+<I>list</I>.
+<DT>{ <I>list</I>; }<DD>
+<I>list</I> is simply executed in the current shell environment.
+<I>list</I> must be terminated with a newline or semicolon.
+This is known as a <I>group command</I>.
+The return status is the exit status of
+<I>list</I>.
+Note that unlike the metacharacters <B>(</B> and <B>)</B>, <B>{</B> and
+<B>}</B> are <I>reserved words</I> and must occur where a reserved
+word is permitted to be recognized. Since they do not cause a word
+break, they must be separated from <I>list</I> by whitespace or another
+shell metacharacter.
+<DT>((<I>expression</I>))<DD>
+The <I>expression</I> is evaluated according to the rules described
+below under
+<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>.
+
+</FONT>
+If the value of the expression is non-zero, the return status is 0;
+otherwise the return status is 1. This is exactly equivalent to
+<B>let &quot;</B><I>expression</I>&quot;.
+<DT><B>[[</B> <I>expression</I> <B>]]</B><DD>
+Return a status of 0 or 1 depending on the evaluation of
+the conditional expression <I>expression</I>.
+Expressions are composed of the primaries described below under
+<FONT SIZE=-1><B>CONDITIONAL EXPRESSIONS</B>.
+
+</FONT>
+Word splitting and pathname expansion are not performed on the words
+between the <B>[[</B> and <B>]]</B>; tilde expansion, parameter and
+variable expansion, arithmetic expansion, command substitution, process
+substitution, and quote removal are performed.
+Conditional operators such as <B>-f</B> must be unquoted to be recognized
+as primaries.
+<P>
+
+
+When used with <B>[[</B>, The <B>&lt;</B> and <B>&gt;</B> operators sort
+lexicographically using the current locale.
+<P>
+
+
+When the <B>==</B> and <B>!=</B> operators are used, the string to the
+right of the operator is considered a pattern and matched according
+to the rules described below under <B>Pattern Matching</B>.
+If the shell option
+<B>nocasematch</B>
+
+is enabled, the match is performed without regard to the case
+of alphabetic characters.
+The return value is 0 if the string matches (<B>==</B>) or does not match
+(<B>!=</B>) the pattern, and 1 otherwise.
+Any part of the pattern may be quoted to force it to be matched as a
+string.
+<P>
+
+
+An additional binary operator, <B>=~</B>, is available, with the same
+precedence as <B>==</B> and <B>!=</B>.
+When it is used, the string to the right of the operator is considered
+an extended regular expression and matched accordingly (as in <I>regex</I>(3)).
+The return value is 0 if the string matches
+the pattern, and 1 otherwise.
+If the regular expression is syntactically incorrect, the conditional
+expression's return value is 2.
+If the shell option
+<B>nocasematch</B>
+
+is enabled, the match is performed without regard to the case
+of alphabetic characters.
+Any part of the pattern may be quoted to force it to be matched as a
+string.
+Substrings matched by parenthesized subexpressions within the regular
+expression are saved in the array variable
+<FONT SIZE=-1><B>BASH_REMATCH</B>.
+
+</FONT>
+The element of
+<FONT SIZE=-1><B>BASH_REMATCH</B>
+
+</FONT>
+with index 0 is the portion of the string
+matching the entire regular expression.
+The element of
+<FONT SIZE=-1><B>BASH_REMATCH</B>
+
+</FONT>
+with index <I>n</I> is the portion of the
+string matching the <I>n</I>th parenthesized subexpression.
+<P>
+
+
+Expressions may be combined using the following operators, listed
+in decreasing order of precedence:
+<P>
+
+
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>( </B><I>expression</I> )
+
+<DD>
+Returns the value of <I>expression</I>.
+This may be used to override the normal precedence of operators.
+<DT><B>! </B><I>expression</I>
+
+<DD>
+True if
+<I>expression</I>
+
+is false.
+<DT><I>expression1</I> <B>&amp;&amp;</B> <I>expression2</I><DD>
+True if both
+<I>expression1</I>
+
+and
+<I>expression2</I>
+
+are true.
+<DT><I>expression1</I> <B>||</B> <I>expression2</I>
+<DD>
+
+True if either
+<I>expression1</I>
+
+or
+<I>expression2</I>
+
+is true.
+
+</DL>
+<P>
+
+The <B>&amp;&amp;</B> and
+<B>||</B>
+
+operators do not evaluate <I>expression2</I> if the value of
+<I>expression1</I> is sufficient to determine the return value of
+the entire conditional expression.
+</DL>
+
+<DT><B>for</B> <I>name</I> [ [ <B>in</B> [ <I>word ...</I> ] ] ; ] <B>do</B> <I>list</I> ; <B>done</B><DD>
+The list of words following <B>in</B> is expanded, generating a list
+of items.
+The variable <I>name</I> is set to each element of this list
+in turn, and <I>list</I> is executed each time.
+If the <B>in</B> <I>word</I> is omitted, the <B>for</B> command executes
+<I>list</I> once for each positional parameter that is set (see
+<FONT SIZE=-1><B>PARAMETERS</B>
+
+</FONT>
+below).
+The return status is the exit status of the last command that executes.
+If the expansion of the items following <B>in</B> results in an empty
+list, no commands are executed, and the return status is 0.
+<DT><B>for</B> (( <I>expr1</I> ; <I>expr2</I> ; <I>expr3</I> )) ; <B>do</B> <I>list</I> ; <B>done</B><DD>
+First, the arithmetic expression <I>expr1</I> is evaluated according
+to the rules described below under
+<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>.
+
+</FONT>
+The arithmetic expression <I>expr2</I> is then evaluated repeatedly
+until it evaluates to zero.
+Each time <I>expr2</I> evaluates to a non-zero value, <I>list</I> is
+executed and the arithmetic expression <I>expr3</I> is evaluated.
+If any expression is omitted, it behaves as if it evaluates to 1.
+The return value is the exit status of the last command in <I>list</I>
+that is executed, or false if any of the expressions is invalid.
+<DT><B>select</B> <I>name</I> [ <B>in</B> <I>word</I> ] ; <B>do</B> <I>list</I> ; <B>done</B><DD>
+The list of words following <B>in</B> is expanded, generating a list
+of items. The set of expanded words is printed on the standard
+error, each preceded by a number. If the <B>in</B>
+<I>word</I> is omitted, the positional parameters are printed (see
+<FONT SIZE=-1><B>PARAMETERS</B>
+
+</FONT>
+below). The
+<FONT SIZE=-1><B>PS3</B>
+
+</FONT>
+prompt is then displayed and a line read from the standard input.
+If the line consists of a number corresponding to one of
+the displayed words, then the value of
+<I>name</I>
+
+is set to that word. If the line is empty, the words and prompt
+are displayed again. If EOF is read, the command completes. Any
+other value read causes
+<I>name</I>
+
+to be set to null. The line read is saved in the variable
+<FONT SIZE=-1><B>REPLY</B>.
+
+</FONT>
+The
+<I>list</I>
+
+is executed after each selection until a
+<B>break</B>
+
+command is executed.
+The exit status of
+<B>select</B>
+
+is the exit status of the last command executed in
+<I>list</I>,
+
+or zero if no commands were executed.
+<DT><B>case</B> <I>word</I> <B>in</B> [ [(] <I>pattern</I> [ <B>|</B> <I>pattern</I> ]
+<DD>
+A <B>case</B> command first expands <I>word</I>, and tries to match
+it against each <I>pattern</I> in turn, using the same matching rules
+as for pathname expansion (see
+<B>Pathname Expansion</B>
+
+below).
+The <I>word</I> is expanded using tilde
+expansion, parameter and variable expansion, arithmetic substitution,
+command substitution, process substitution and quote removal.
+Each <I>pattern</I> examined is expanded using tilde
+expansion, parameter and variable expansion, arithmetic substitution,
+command substitution, and process substitution.
+If the shell option
+<B>nocasematch</B>
+
+is enabled, the match is performed without regard to the case
+of alphabetic characters.
+When a match is found, the corresponding <I>list</I> is executed.
+If the <B>;;</B> operator is used, no subsequent matches are attempted after
+the first pattern match.
+Using <B>;&amp;</B> in place of <B>;;</B> causes execution to continue with
+the <I>list</I> associated with the next set of patterns.
+Using <B>;;&amp;</B> in place of <B>;;</B> causes the shell to test the next
+pattern list in the statement, if any, and execute any associated <I>list</I>
+on a successful match.
+The exit status is zero if no
+pattern matches. Otherwise, it is the exit status of the
+last command executed in <I>list</I>.
+<DT><B>if</B> <I>list</I>; <B>then</B> <I>list;</I> [ <B>elif</B> <I>list</I>; <B>then</B> <I>list</I>; ] ... [ <B>else</B> <I>list</I>; ] <B>fi</B><DD>
+The
+<B>if </B>
+
+<I>list</I>
+
+is executed. If its exit status is zero, the
+<B>then</B> <I>list</I> is executed. Otherwise, each <B>elif</B>
+<I>list</I> is executed in turn, and if its exit status is zero,
+the corresponding <B>then</B> <I>list</I> is executed and the
+command completes. Otherwise, the <B>else</B> <I>list</I> is
+executed, if present. The exit status is the exit status of the
+last command executed, or zero if no condition tested true.
+<DT><B>while</B> <I>list</I>; <B>do</B> <I>list</I>; <B>done</B><DD>
+
+<DT><B>until</B> <I>list</I>; <B>do</B> <I>list</I>; <B>done</B><DD>
+
+The <B>while</B> command continuously executes the <B>do</B>
+<I>list</I> as long as the last command in <I>list</I> returns
+an exit status of zero. The <B>until</B> command is identical
+to the <B>while</B> command, except that the test is negated;
+the
+<B>do</B>
+
+<I>list</I>
+
+is executed as long as the last command in
+<I>list</I>
+
+returns a non-zero exit status.
+The exit status of the <B>while</B> and <B>until</B> commands
+is the exit status
+of the last <B>do</B> <I>list</I> command executed, or zero if
+none was executed.
+</DL>
+<A NAME="lbAP">&nbsp;</A>
+<H4>Coprocesses</H4>
+
+<P>
+
+A <I>coprocess</I> is a shell command preceded by the <B>coproc</B> reserved
+word.
+A coprocess is executed asynchronously in a subshell, as if the command
+had been terminated with the <B>&amp;</B> control operator, with a two-way pipe
+established between the executing shell and the coprocess.
+<P>
+
+The format for a coprocess is:
+<DL COMPACT><DT><DD>
+<P>
+
+<B>coproc</B> [<I>NAME</I>] <I>command</I> [<I>redirections</I>]
+</DL>
+
+<P>
+
+This creates a coprocess named <I>NAME</I>.
+If <I>NAME</I> is not supplied, the default name is <I>COPROC</I>.
+<I>NAME</I> must not be supplied if <I>command</I> is a <I>simple
+command</I> (see above); otherwise, it is interpreted as the first word
+of the simple command.
+When the coproc is executed, the shell creates an array variable (see
+<B>Arrays</B>
+
+below) named <I>NAME</I> in the context of the executing shell.
+The standard output of
+<I>command</I>
+
+is connected via a pipe to a file descriptor in the executing shell,
+and that file descriptor is assigned to <I>NAME</I>[0].
+The standard input of
+<I>command</I>
+
+is connected via a pipe to a file descriptor in the executing shell,
+and that file descriptor is assigned to <I>NAME</I>[1].
+This pipe is established before any redirections specified by the
+command (see
+<FONT SIZE=-1><B>REDIRECTION</B>
+
+</FONT>
+below).
+The file descriptors can be utilized as arguments to shell commands
+and redirections using standard word expansions.
+The process id of the shell spawned to execute the coprocess is
+available as the value of the variable <I>NAME</I>_PID.
+The <B>wait</B>
+builtin command may be used to wait for the coprocess to terminate.
+<P>
+
+The return status of a coprocess is the exit status of <I>command</I>.
+<A NAME="lbAQ">&nbsp;</A>
+<H4>Shell Function Definitions</H4>
+
+<P>
+
+A shell function is an object that is called like a simple command and
+executes a compound command with a new set of positional parameters.
+Shell functions are declared as follows:
+<DL COMPACT>
+<DT>[ <B>function</B> ] <I>name</I> () <I>compound-command</I> [<I>redirection</I>]<DD>
+This defines a function named <I>name</I>.
+The reserved word <B>function</B> is optional.
+If the <B>function</B> reserved word is supplied, the parentheses are optional.
+The <I>body</I> of the function is the compound command
+<I>compound-command </I>
+
+(see <B>Compound Commands</B> above).
+That command is usually a <I>list</I> of commands between { and }, but
+may be any command listed under <B>Compound Commands</B> above.
+<I>compound-command</I> is executed whenever <I>name</I> is specified as the
+name of a simple command.
+Any redirections (see
+<FONT SIZE=-1><B>REDIRECTION</B>
+
+</FONT>
+below) specified when a function is defined are performed
+when the function is executed.
+The exit status of a function definition is zero unless a syntax error
+occurs or a readonly function with the same name already exists.
+When executed, the exit status of a function is the exit status of the
+last command executed in the body. (See
+<FONT SIZE=-1><B>FUNCTIONS</B>
+
+</FONT>
+below.)
+</DL>
+<A NAME="lbAR">&nbsp;</A>
+<H3>COMMENTS</H3>
+
+In a non-interactive shell, or an interactive shell in which the
+<B>interactive_comments</B>
+
+option to the
+<B>shopt</B>
+
+builtin is enabled (see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below), a word beginning with
+<B>#</B>
+
+causes that word and all remaining characters on that line to
+be ignored. An interactive shell without the
+<B>interactive_comments</B>
+
+option enabled does not allow comments. The
+<B>interactive_comments</B>
+
+option is on by default in interactive shells.
+<A NAME="lbAS">&nbsp;</A>
+<H3>QUOTING</H3>
+
+<I>Quoting</I> is used to remove the special meaning of certain
+characters or words to the shell. Quoting can be used to
+disable special treatment for special characters, to prevent
+reserved words from being recognized as such, and to prevent
+parameter expansion.
+<P>
+
+Each of the <I>metacharacters</I> listed above under
+<FONT SIZE=-1><B>DEFINITIONS</B>
+
+</FONT>
+has special meaning to the shell and must be quoted if it is to
+represent itself.
+<P>
+
+When the command history expansion facilities are being used
+(see
+<FONT SIZE=-1><B>HISTORY EXPANSION</B>
+
+</FONT>
+below), the
+<I>history expansion</I> character, usually <B>!</B>, must be quoted
+to prevent history expansion.
+<P>
+
+There are three quoting mechanisms: the
+<I>escape character</I>,
+
+single quotes, and double quotes.
+<P>
+
+A non-quoted backslash (<B>\</B>) is the
+<I>escape character</I>.
+
+It preserves the literal value of the next character that follows,
+with the exception of &lt;newline&gt;. If a <B>\</B>&lt;newline&gt; pair
+appears, and the backslash is not itself quoted, the <B>\</B>&lt;newline&gt;
+is treated as a line continuation (that is, it is removed from the
+input stream and effectively ignored).
+<P>
+
+Enclosing characters in single quotes preserves the literal value
+of each character within the quotes. A single quote may not occur
+between single quotes, even when preceded by a backslash.
+<P>
+
+Enclosing characters in double quotes preserves the literal value
+of all characters within the quotes, with the exception of
+<B>$</B>,
+
+<B>`</B>,
+
+<B>\</B>,
+
+and, when history expansion is enabled,
+<B>!</B>.
+
+The characters
+<B>$</B>
+
+and
+<B>`</B>
+
+retain their special meaning within double quotes. The backslash
+retains its special meaning only when followed by one of the following
+characters:
+<B>$</B>,
+
+<B>`</B>,
+
+<B>&quot;</B>,
+<B>\</B>,
+
+or
+<B>&lt;newline&gt;</B>.
+
+A double quote may be quoted within double quotes by preceding it with
+a backslash.
+If enabled, history expansion will be performed unless an
+<B>!</B>
+
+appearing in double quotes is escaped using a backslash.
+The backslash preceding the
+<B>!</B>
+
+is not removed.
+<P>
+
+The special parameters
+<B>*</B>
+
+and
+<B>@</B>
+
+have special meaning when in double
+quotes (see
+<FONT SIZE=-1><B>PARAMETERS</B>
+
+</FONT>
+below).
+<P>
+
+Words of the form <B>$</B>aq<I>string</I>aq are treated specially. The
+word expands to <I>string</I>, with backslash-escaped characters replaced
+as specified by the ANSI C standard. Backslash escape sequences, if
+present, are decoded as follows:
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>\a</B>
+
+<DD>
+alert (bell)
+<DT><B>\b</B>
+
+<DD>
+backspace
+<DT><B>\e</B>
+
+<DD>
+<DT><B>\E</B>
+
+<DD>
+an escape character
+<DT><B>\f</B>
+
+<DD>
+form feed
+<DT><B>\n</B>
+
+<DD>
+new line
+<DT><B>\r</B>
+
+<DD>
+carriage return
+<DT><B>\t</B>
+
+<DD>
+horizontal tab
+<DT><B>\v</B>
+
+<DD>
+vertical tab
+<DT><B>\\</B>
+
+<DD>
+backslash
+<DT><B>\aq</B>
+
+<DD>
+single quote
+<DT><B>\dq</B>
+
+<DD>
+double quote
+<DT><B>\</B><I>nnn</I>
+
+<DD>
+the eight-bit character whose value is the octal value <I>nnn</I>
+(one to three digits)
+<DT><B>\x</B><I>HH</I>
+
+<DD>
+the eight-bit character whose value is the hexadecimal value <I>HH</I>
+(one or two hex digits)
+<DT><B>\c</B><I>x</I>
+
+<DD>
+a control-<I>x</I> character
+
+</DL></DL>
+
+<P>
+
+The expanded result is single-quoted, as if the dollar sign had
+not been present.
+<P>
+
+A double-quoted string preceded by a dollar sign (<B>$</B>dq<I>string</I>dq)
+will cause the string to be translated according to the current locale.
+If the current locale is <B>C</B> or <B>POSIX</B>, the dollar sign
+is ignored.
+If the string is translated and replaced, the replacement is
+double-quoted.
+<A NAME="lbAT">&nbsp;</A>
+<H3>PARAMETERS</H3>
+
+A
+<I>parameter</I>
+
+is an entity that stores values.
+It can be a
+<I>name</I>,
+
+a number, or one of the special characters listed below under
+<B>Special Parameters</B>.
+
+A
+<I>variable</I>
+
+is a parameter denoted by a
+<I>name</I>.
+
+A variable has a <I>value</I> and zero or more <I>attributes</I>.
+Attributes are assigned using the
+<B>declare</B>
+
+builtin command (see
+<B>declare</B>
+
+below in
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>).
+
+</FONT>
+<P>
+
+A parameter is set if it has been assigned a value. The null string is
+a valid value. Once a variable is set, it may be unset only by using
+the
+<B>unset</B>
+
+builtin command (see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below).
+<P>
+
+A
+<I>variable</I>
+
+may be assigned to by a statement of the form
+<DL COMPACT><DT><DD>
+<P>
+
+<I>name</I>=[<I>value</I>]
+</DL>
+
+<P>
+
+If
+<I>value</I>
+
+is not given, the variable is assigned the null string. All
+<I>values</I>
+
+undergo tilde expansion, parameter and variable expansion,
+command substitution, arithmetic expansion, and quote
+removal (see
+<FONT SIZE=-1><B>EXPANSION</B>
+
+</FONT>
+below). If the variable has its
+<B>integer</B>
+
+attribute set, then
+<I>value</I>
+
+is evaluated as an arithmetic expression even if the $((...)) expansion is
+not used (see
+<B>Arithmetic Expansion</B>
+
+below).
+Word splitting is not performed, with the exception
+of <B>&quot;$@&quot;</B> as explained below under
+<B>Special Parameters</B>.
+
+Pathname expansion is not performed.
+Assignment statements may also appear as arguments to the
+<B>alias</B>,
+
+<B>declare</B>,
+
+<B>typeset</B>,
+
+<B>export</B>,
+
+<B>readonly</B>,
+
+and
+<B>local</B>
+
+builtin commands.
+<P>
+
+In the context where an assignment statement is assigning a value
+to a shell variable or array index, the += operator can be used to
+append to or add to the variable's previous value.
+When += is applied to a variable for which the integer attribute has been
+set, <I>value</I> is evaluated as an arithmetic expression and added to the
+variable's current value, which is also evaluated.
+When += is applied to an array variable using compound assignment (see
+<B>Arrays</B>
+
+below), the
+variable's value is not unset (as it is when using =), and new values are
+appended to the array beginning at one greater than the array's maximum index
+(for indexed arrays) or added as additional key-value pairs in an
+associative array.
+When applied to a string-valued variable, <I>value</I> is expanded and
+appended to the variable's value.
+<A NAME="lbAU">&nbsp;</A>
+<H4>Positional Parameters</H4>
+
+<P>
+
+A
+<I>positional parameter</I>
+
+is a parameter denoted by one or more
+digits, other than the single digit 0. Positional parameters are
+assigned from the shell's arguments when it is invoked,
+and may be reassigned using the
+<B>set</B>
+
+builtin command. Positional parameters may not be assigned to
+with assignment statements. The positional parameters are
+temporarily replaced when a shell function is executed (see
+<FONT SIZE=-1><B>FUNCTIONS</B>
+
+</FONT>
+below).
+<P>
+
+When a positional parameter consisting of more than a single
+digit is expanded, it must be enclosed in braces (see
+<FONT SIZE=-1><B>EXPANSION</B>
+
+</FONT>
+below).
+<A NAME="lbAV">&nbsp;</A>
+<H4>Special Parameters</H4>
+
+<P>
+
+The shell treats several parameters specially. These parameters may
+only be referenced; assignment to them is not allowed.
+
+<DL COMPACT>
+<DT><B>*</B>
+
+<DD>
+Expands to the positional parameters, starting from one. When the
+expansion occurs within double quotes, it expands to a single word
+with the value of each parameter separated by the first character
+of the
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+special variable. That is, &quot;<B>$*</B>&quot; is equivalent
+to &quot;<B>$1</B><I>c</I><B>$2</B><I>c</I><B>...</B>&quot;, where
+<I>c</I>
+
+is the first character of the value of the
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+variable. If
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+is unset, the parameters are separated by spaces.
+If
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+is null, the parameters are joined without intervening separators.
+<DT><B>@</B>
+
+<DD>
+Expands to the positional parameters, starting from one. When the
+expansion occurs within double quotes, each parameter expands to a
+separate word. That is, &quot;<B>$@</B>&quot; is equivalent to
+&quot;<B>$1</B>&quot; &quot;<B>$2</B>&quot; ...
+If the double-quoted expansion occurs within a word, the expansion of
+the first parameter is joined with the beginning part of the original
+word, and the expansion of the last parameter is joined with the last
+part of the original word.
+When there are no positional parameters, &quot;<B>$@</B>&quot; and
+<B>$@</B>
+
+expand to nothing (i.e., they are removed).
+<DT><B>#</B>
+
+<DD>
+Expands to the number of positional parameters in decimal.
+<DT><B>?</B>
+
+<DD>
+Expands to the exit status of the most recently executed foreground
+pipeline.
+<DT><B>-</B>
+
+<DD>
+Expands to the current option flags as specified upon invocation,
+by the
+<B>set</B>
+
+builtin command, or those set by the shell itself
+(such as the
+<B>-i</B>
+
+option).
+<DT><B>$</B>
+
+<DD>
+Expands to the process ID of the shell. In a () subshell, it
+expands to the process ID of the current shell, not the
+subshell.
+<DT><B>!</B>
+
+<DD>
+Expands to the process ID of the most recently executed background
+(asynchronous) command.
+<DT><B>0</B>
+
+<DD>
+Expands to the name of the shell or shell script. This is set at
+shell initialization. If
+<B>bash</B>
+
+is invoked with a file of commands,
+<B>$0</B>
+
+is set to the name of that file. If
+<B>bash</B>
+
+is started with the
+<B>-c</B>
+
+option, then
+<B>$0</B>
+
+is set to the first argument after the string to be
+executed, if one is present. Otherwise, it is set
+to the file name used to invoke
+<B>bash</B>,
+
+as given by argument zero.
+<DT><B>_</B>
+
+<DD>
+At shell startup, set to the absolute pathname used to invoke the
+shell or shell script being executed as passed in the environment
+or argument list.
+Subsequently, expands to the last argument to the previous command,
+after expansion.
+Also set to the full pathname used to invoke each command executed
+and placed in the environment exported to that command.
+When checking mail, this parameter holds the name of the mail file
+currently being checked.
+
+</DL>
+<A NAME="lbAW">&nbsp;</A>
+<H4>Shell Variables</H4>
+
+<P>
+
+The following variables are set by the shell:
+<P>
+
+
+<DL COMPACT>
+<DT><B>BASH</B>
+
+<DD>
+Expands to the full file name used to invoke this instance of
+<B>bash</B>.
+
+<DT><B>BASHOPTS</B>
+
+<DD>
+A colon-separated list of enabled shell options. Each word in
+the list is a valid argument for the
+<B>-s</B>
+
+option to the
+<B>shopt</B>
+
+builtin command (see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below). The options appearing in
+<FONT SIZE=-1><B>BASHOPTS</B>
+
+</FONT>
+are those reported as
+<I>on</I>
+
+by <B>shopt</B>.
+If this variable is in the environment when
+<B>bash</B>
+
+starts up, each shell option in the list will be enabled before
+reading any startup files.
+This variable is read-only.
+<DT><B>BASHPID</B>
+
+<DD>
+Expands to the process id of the current <B>bash</B> process.
+This differs from <B>$$</B> under certain circumstances, such as subshells
+that do not require <B>bash</B> to be re-initialized.
+<DT><B>BASH_ALIASES</B>
+
+<DD>
+An associative array variable whose members correspond to the internal
+list of aliases as maintained by the <B>alias</B> builtin
+Elements added to this array appear in the alias list; unsetting array
+elements cause aliases to be removed from the alias list.
+<DT><B>BASH_ARGC</B>
+
+<DD>
+An array variable whose values are the number of parameters in each
+frame of the current <B>bash</B> execution call stack.
+The number of
+parameters to the current subroutine (shell function or script executed
+with <B>.</B> or <B>source</B>) is at the top of the stack.
+When a subroutine is executed, the number of parameters passed is pushed onto
+<FONT SIZE=-1><B>BASH_ARGC</B>.
+
+</FONT>
+The shell sets
+<FONT SIZE=-1><B>BASH_ARGC</B>
+
+</FONT>
+only when in extended debugging mode (see the description of the
+<B>extdebug</B>
+
+option to the
+<B>shopt</B>
+
+builtin below)
+<DT><B>BASH_ARGV</B>
+
+<DD>
+An array variable containing all of the parameters in the current <B>bash</B>
+execution call stack. The final parameter of the last subroutine call
+is at the top of the stack; the first parameter of the initial call is
+at the bottom. When a subroutine is executed, the parameters supplied
+are pushed onto
+<FONT SIZE=-1><B>BASH_ARGV</B>.
+
+</FONT>
+The shell sets
+<FONT SIZE=-1><B>BASH_ARGV</B>
+
+</FONT>
+only when in extended debugging mode
+(see the description of the
+<B>extdebug</B>
+
+option to the
+<B>shopt</B>
+
+builtin below)
+<DT><B>BASH_CMDS</B>
+
+<DD>
+An associative array variable whose members correspond to the internal
+hash table of commands as maintained by the <B>hash</B> builtin.
+Elements added to this array appear in the hash table; unsetting array
+elements cause commands to be removed from the hash table.
+<DT><B>BASH_COMMAND</B>
+
+<DD>
+The command currently being executed or about to be executed, unless the
+shell is executing a command as the result of a trap,
+in which case it is the command executing at the time of the trap.
+<DT><B>BASH_EXECUTION_STRING</B>
+
+<DD>
+The command argument to the <B>-c</B> invocation option.
+<DT><B>BASH_LINENO</B>
+
+<DD>
+An array variable whose members are the line numbers in source files
+corresponding to each member of
+<FONT SIZE=-1><B>FUNCNAME</B>.
+
+</FONT>
+<B>${BASH_LINENO[</B><I>$i</I><B>]}</B> is the line number in the source
+file where <B>${FUNCNAME[</B><I>$i</I><B>]}</B> was called
+(or <B>${BASH_LINENO[</B><I>$i-1</I><B>]}</B> if referenced within another
+shell function).
+The corresponding source file name is <B>${BASH_SOURCE[</B><I>$i</I><B>]}</B>.
+Use
+<FONT SIZE=-1><B>LINENO</B>
+
+</FONT>
+to obtain the current line number.
+<DT><B>BASH_REMATCH</B>
+
+<DD>
+An array variable whose members are assigned by the <B>=~</B> binary
+operator to the <B>[[</B> conditional command.
+The element with index 0 is the portion of the string
+matching the entire regular expression.
+The element with index <I>n</I> is the portion of the
+string matching the <I>n</I>th parenthesized subexpression.
+This variable is read-only.
+<DT><B>BASH_SOURCE</B>
+
+<DD>
+An array variable whose members are the source filenames corresponding
+to the elements in the
+<FONT SIZE=-1><B>FUNCNAME</B>
+
+</FONT>
+array variable.
+<DT><B>BASH_SUBSHELL</B>
+
+<DD>
+Incremented by one each time a subshell or subshell environment is spawned.
+The initial value is 0.
+<DT><B>BASH_VERSINFO</B>
+
+<DD>
+A readonly array variable whose members hold version information for
+this instance of
+<B>bash</B>.
+
+The values assigned to the array members are as follows:
+<P>
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>BASH_VERSINFO[</B>0]
+
+<DD>
+The major version number (the <I>release</I>).
+<DT><B>BASH_VERSINFO[</B>1]
+
+<DD>
+The minor version number (the <I>version</I>).
+<DT><B>BASH_VERSINFO[</B>2]
+
+<DD>
+The patch level.
+<DT><B>BASH_VERSINFO[</B>3]
+
+<DD>
+The build version.
+<DT><B>BASH_VERSINFO[</B>4]
+
+<DD>
+The release status (e.g., <I>beta1</I>).
+<DT><B>BASH_VERSINFO[</B>5]
+
+<DD>
+The value of
+<FONT SIZE=-1><B>MACHTYPE</B>.
+
+</FONT>
+
+</DL></DL>
+
+<DT><B>BASH_VERSION</B>
+
+<DD>
+Expands to a string describing the version of this instance of
+<B>bash</B>.
+
+<DT><B>COMP_CWORD</B>
+
+<DD>
+An index into <B>${COMP_WORDS}</B> of the word containing the current
+cursor position.
+This variable is available only in shell functions invoked by the
+programmable completion facilities (see <B>Programmable Completion</B>
+below).
+<DT><B>COMP_KEY</B>
+
+<DD>
+The key (or final key of a key sequence) used to invoke the current
+completion function.
+<DT><B>COMP_LINE</B>
+
+<DD>
+The current command line.
+This variable is available only in shell functions and external
+commands invoked by the
+programmable completion facilities (see <B>Programmable Completion</B>
+below).
+<DT><B>COMP_POINT</B>
+
+<DD>
+The index of the current cursor position relative to the beginning of
+the current command.
+If the current cursor position is at the end of the current command,
+the value of this variable is equal to <B>${#COMP_LINE}</B>.
+This variable is available only in shell functions and external
+commands invoked by the
+programmable completion facilities (see <B>Programmable Completion</B>
+below).
+<DT><B>COMP_TYPE</B>
+
+<DD>
+Set to an integer value corresponding to the type of completion attempted
+that caused a completion function to be called:
+<I>TAB</I>, for normal completion,
+<I>?</I>, for listing completions after successive tabs,
+<I>!</I>, for listing alternatives on partial word completion,
+<I>@</I>, to list completions if the word is not unmodified,
+or
+<I>%</I>, for menu completion.
+This variable is available only in shell functions and external
+commands invoked by the
+programmable completion facilities (see <B>Programmable Completion</B>
+below).
+<DT><B>COMP_WORDBREAKS</B>
+
+<DD>
+The set of characters that the <B>readline</B> library treats as word
+separators when performing word completion.
+If
+<FONT SIZE=-1><B>COMP_WORDBREAKS</B>
+
+</FONT>
+is unset, it loses its special properties, even if it is
+subsequently reset.
+<DT><B>COMP_WORDS</B>
+
+<DD>
+An array variable (see <B>Arrays</B> below) consisting of the individual
+words in the current command line.
+The line is split into words as <B>readline</B> would split it, using
+<FONT SIZE=-1><B>COMP_WORDBREAKS</B>
+
+</FONT>
+as described above.
+This variable is available only in shell functions invoked by the
+programmable completion facilities (see <B>Programmable Completion</B>
+below).
+<DT><B>DIRSTACK</B>
+
+<DD>
+An array variable (see
+<B>Arrays</B>
+
+below) containing the current contents of the directory stack.
+Directories appear in the stack in the order they are displayed by the
+<B>dirs</B>
+
+builtin.
+Assigning to members of this array variable may be used to modify
+directories already in the stack, but the
+<B>pushd</B>
+
+and
+<B>popd</B>
+
+builtins must be used to add and remove directories.
+Assignment to this variable will not change the current directory.
+If
+<FONT SIZE=-1><B>DIRSTACK</B>
+
+</FONT>
+is unset, it loses its special properties, even if it is
+subsequently reset.
+<DT><B>EUID</B>
+
+<DD>
+Expands to the effective user ID of the current user, initialized at
+shell startup. This variable is readonly.
+<DT><B>FUNCNAME</B>
+
+<DD>
+An array variable containing the names of all shell functions
+currently in the execution call stack.
+The element with index 0 is the name of any currently-executing
+shell function.
+The bottom-most element is
+<TT>&quot;main&quot;</TT>.
+
+This variable exists only when a shell function is executing.
+Assignments to
+<FONT SIZE=-1><B>FUNCNAME</B>
+
+</FONT>
+have no effect and return an error status.
+If
+<FONT SIZE=-1><B>FUNCNAME</B>
+
+</FONT>
+is unset, it loses its special properties, even if it is
+subsequently reset.
+<DT><B>GROUPS</B>
+
+<DD>
+An array variable containing the list of groups of which the current
+user is a member.
+Assignments to
+<FONT SIZE=-1><B>GROUPS</B>
+
+</FONT>
+have no effect and return an error status.
+If
+<FONT SIZE=-1><B>GROUPS</B>
+
+</FONT>
+is unset, it loses its special properties, even if it is
+subsequently reset.
+<DT><B>HISTCMD</B>
+
+<DD>
+The history number, or index in the history list, of the current
+command.
+If
+<FONT SIZE=-1><B>HISTCMD</B>
+
+</FONT>
+is unset, it loses its special properties, even if it is
+subsequently reset.
+<DT><B>HOSTNAME</B>
+
+<DD>
+Automatically set to the name of the current host.
+<DT><B>HOSTTYPE</B>
+
+<DD>
+Automatically set to a string that uniquely
+describes the type of machine on which
+<B>bash</B>
+
+is executing.
+The default is system-dependent.
+<DT><B>LINENO</B>
+
+<DD>
+Each time this parameter is referenced, the shell substitutes
+a decimal number representing the current sequential line number
+(starting with 1) within a script or function. When not in a
+script or function, the value substituted is not guaranteed to
+be meaningful.
+If
+<FONT SIZE=-1><B>LINENO</B>
+
+</FONT>
+is unset, it loses its special properties, even if it is
+subsequently reset.
+<DT><B>MACHTYPE</B>
+
+<DD>
+Automatically set to a string that fully describes the system
+type on which
+<B>bash</B>
+
+is executing, in the standard GNU <I>cpu-company-system</I> format.
+The default is system-dependent.
+<DT><B>OLDPWD</B>
+
+<DD>
+The previous working directory as set by the
+<B>cd</B>
+
+command.
+<DT><B>OPTARG</B>
+
+<DD>
+The value of the last option argument processed by the
+<B>getopts</B>
+
+builtin command (see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below).
+<DT><B>OPTIND</B>
+
+<DD>
+The index of the next argument to be processed by the
+<B>getopts</B>
+
+builtin command (see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below).
+<DT><B>OSTYPE</B>
+
+<DD>
+Automatically set to a string that
+describes the operating system on which
+<B>bash</B>
+
+is executing.
+The default is system-dependent.
+<DT><B>PIPESTATUS</B>
+
+<DD>
+An array variable (see
+<B>Arrays</B>
+
+below) containing a list of exit status values from the processes
+in the most-recently-executed foreground pipeline (which may
+contain only a single command).
+<DT><B>PPID</B>
+
+<DD>
+The process ID of the shell's parent. This variable is readonly.
+<DT><B>PWD</B>
+
+<DD>
+The current working directory as set by the
+<B>cd</B>
+
+command.
+<DT><B>RANDOM</B>
+
+<DD>
+Each time this parameter is referenced, a random integer between
+0 and 32767 is
+generated. The sequence of random numbers may be initialized by assigning
+a value to
+<FONT SIZE=-1><B>RANDOM</B>.
+
+</FONT>
+If
+<FONT SIZE=-1><B>RANDOM</B>
+
+</FONT>
+is unset, it loses its special properties, even if it is
+subsequently reset.
+<DT><B>REPLY</B>
+
+<DD>
+Set to the line of input read by the
+<B>read</B>
+
+builtin command when no arguments are supplied.
+<DT><B>SECONDS</B>
+
+<DD>
+Each time this parameter is
+referenced, the number of seconds since shell invocation is returned. If a
+value is assigned to
+<FONT SIZE=-1><B>SECONDS</B>,
+
+</FONT>
+the value returned upon subsequent
+references is
+the number of seconds since the assignment plus the value assigned.
+If
+<FONT SIZE=-1><B>SECONDS</B>
+
+</FONT>
+is unset, it loses its special properties, even if it is
+subsequently reset.
+<DT><B>SHELLOPTS</B>
+
+<DD>
+A colon-separated list of enabled shell options. Each word in
+the list is a valid argument for the
+<B>-o</B>
+
+option to the
+<B>set</B>
+
+builtin command (see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below). The options appearing in
+<FONT SIZE=-1><B>SHELLOPTS</B>
+
+</FONT>
+are those reported as
+<I>on</I>
+
+by <B>set -o</B>.
+If this variable is in the environment when
+<B>bash</B>
+
+starts up, each shell option in the list will be enabled before
+reading any startup files.
+This variable is read-only.
+<DT><B>SHLVL</B>
+
+<DD>
+Incremented by one each time an instance of
+<B>bash</B>
+
+is started.
+<DT><B>UID</B>
+
+<DD>
+Expands to the user ID of the current user, initialized at shell startup.
+This variable is readonly.
+
+</DL>
+<P>
+
+The following variables are used by the shell. In some cases,
+<B>bash</B>
+
+assigns a default value to a variable; these cases are noted
+below.
+<P>
+
+
+<DL COMPACT>
+<DT><B>BASH_ENV</B>
+
+<DD>
+If this parameter is set when <B>bash</B> is executing a shell script,
+its value is interpreted as a filename containing commands to
+initialize the shell, as in
+<A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>.
+
+The value of
+<FONT SIZE=-1><B>BASH_ENV</B>
+
+</FONT>
+is subjected to parameter expansion, command substitution, and arithmetic
+expansion before being interpreted as a file name.
+<FONT SIZE=-1><B>PATH</B>
+
+</FONT>
+is not used to search for the resultant file name.
+<DT><B>CDPATH</B>
+
+<DD>
+The search path for the
+<B>cd</B>
+
+command.
+This is a colon-separated list of directories in which the shell looks
+for destination directories specified by the
+<B>cd</B>
+
+command.
+A sample value is
+<TT>&quot;.:~:/usr&quot;</TT>.
+
+<DT><B>BASH_XTRACEFD</B>
+
+<DD>
+If set to an integer corresponding to a valid file descriptor, <B>bash</B>
+will write the trace output generated when
+<TT>set -x</TT>
+
+is enabled to that file descriptor.
+The file descriptor is closed when
+<FONT SIZE=-1><B>BASH_XTRACEFD</B>
+
+</FONT>
+is unset or assigned a new value.
+Unsetting
+<FONT SIZE=-1><B>BASH_XTRACEFD</B>
+
+</FONT>
+or assigning it the empty string causes the
+trace output to be sent to the standard error.
+Note that setting
+<FONT SIZE=-1><B>BASH_XTRACEFD</B>
+
+</FONT>
+to 2 (the standard error file
+descriptor) and then unsetting it will result in the standard error
+being closed.
+<DT><B>COLUMNS</B>
+
+<DD>
+Used by the <B>select</B> builtin command to determine the terminal width
+when printing selection lists. Automatically set upon receipt of a SIGWINCH.
+<DT><B>COMPREPLY</B>
+
+<DD>
+An array variable from which <B>bash</B> reads the possible completions
+generated by a shell function invoked by the programmable completion
+facility (see <B>Programmable Completion</B> below).
+<DT><B>EMACS</B>
+
+<DD>
+If <B>bash</B> finds this variable in the environment when the shell starts
+with value
+<TT>t</TT>,
+
+it assumes that the shell is running in an emacs shell buffer and disables
+line editing.
+<DT><B>FCEDIT</B>
+
+<DD>
+The default editor for the
+<B>fc</B>
+
+builtin command.
+<DT><B>FIGNORE</B>
+
+<DD>
+A colon-separated list of suffixes to ignore when performing
+filename completion (see
+<FONT SIZE=-1><B>READLINE</B>
+
+</FONT>
+below).
+A filename whose suffix matches one of the entries in
+<FONT SIZE=-1><B>FIGNORE</B>
+
+</FONT>
+is excluded from the list of matched filenames.
+A sample value is
+<TT>&quot;.o:~&quot;</TT>.
+
+<DT><B>GLOBIGNORE</B>
+
+<DD>
+A colon-separated list of patterns defining the set of filenames to
+be ignored by pathname expansion.
+If a filename matched by a pathname expansion pattern also matches one
+of the patterns in
+<FONT SIZE=-1><B>GLOBIGNORE</B>,
+
+</FONT>
+it is removed from the list of matches.
+<DT><B>HISTCONTROL</B>
+
+<DD>
+A colon-separated list of values controlling how commands are saved on
+the history list.
+If the list of values includes
+<I>ignorespace</I>,
+
+lines which begin with a
+<B>space</B>
+
+character are not saved in the history list.
+A value of
+<I>ignoredups</I>
+
+causes lines matching the previous history entry to not be saved.
+A value of
+<I>ignoreboth</I>
+
+is shorthand for <I>ignorespace</I> and <I>ignoredups</I>.
+A value of
+<I>erasedups</I>
+
+causes all previous lines matching the current line to be removed from
+the history list before that line is saved.
+Any value not in the above list is ignored.
+If
+<FONT SIZE=-1><B>HISTCONTROL</B>
+
+</FONT>
+is unset, or does not include a valid value,
+all lines read by the shell parser are saved on the history list,
+subject to the value of
+<FONT SIZE=-1><B>HISTIGNORE</B>.
+
+</FONT>
+The second and subsequent lines of a multi-line compound command are
+not tested, and are added to the history regardless of the value of
+<FONT SIZE=-1><B>HISTCONTROL</B>.
+
+</FONT>
+<DT><B>HISTFILE</B>
+
+<DD>
+The name of the file in which command history is saved (see
+<FONT SIZE=-1><B>HISTORY</B>
+
+</FONT>
+below). The default value is <A HREF="file:~/.bash_history"><I>~/.bash_history</I></A>. If unset, the
+command history is not saved when an interactive shell exits.
+<DT><B>HISTFILESIZE</B>
+
+<DD>
+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
+writing it when an interactive shell exits.
+<DT><B>HISTIGNORE</B>
+
+<DD>
+A colon-separated list of patterns used to decide which command lines
+should be saved on the history list. Each pattern is anchored at the
+beginning of the line and must match the complete line (no implicit
+`<B>*</B>' is appended). Each pattern is tested against the line
+after the checks specified by
+<FONT SIZE=-1><B>HISTCONTROL</B>
+
+</FONT>
+are applied.
+In addition to the normal shell pattern matching characters, `<B>&amp;</B>'
+matches the previous history line. `<B>&amp;</B>' may be escaped using a
+backslash; the backslash is removed before attempting a match.
+The second and subsequent lines of a multi-line compound command are
+not tested, and are added to the history regardless of the value of
+<FONT SIZE=-1><B>HISTIGNORE</B>.
+
+</FONT>
+<DT><B>HISTSIZE</B>
+
+<DD>
+The number of commands to remember in the command history (see
+<FONT SIZE=-1><B>HISTORY</B>
+
+</FONT>
+below). The default value is 500.
+<DT><B>HISTTIMEFORMAT</B>
+
+<DD>
+If this variable is set and not null, its value is used as a format string
+for <I>strftime</I>(3) to print the time stamp associated with each history
+entry displayed by the <B>history</B> builtin.
+If this variable is set, time stamps are written to the history file so
+they may be preserved across shell sessions.
+This uses the history comment character to distinguish timestamps from
+other history lines.
+<DT><B>HOME</B>
+
+<DD>
+The home directory of the current user; the default argument for the
+<B>cd</B> builtin command.
+The value of this variable is also used when performing tilde expansion.
+<DT><B>HOSTFILE</B>
+
+<DD>
+Contains the name of a file in the same format as
+
+<I>/etc/hosts</I>
+
+that should be read when the shell needs to complete a
+hostname.
+The list of possible hostname completions may be changed while the
+shell is running;
+the next time hostname completion is attempted after the
+value is changed,
+<B>bash</B>
+
+adds the contents of the new file to the existing list.
+If
+<FONT SIZE=-1><B>HOSTFILE</B>
+
+</FONT>
+is set, but has no value, or does not name a readable file,
+<B>bash</B> attempts to read
+
+<I>/etc/hosts</I>
+
+to obtain the list of possible hostname completions.
+When
+<FONT SIZE=-1><B>HOSTFILE</B>
+
+</FONT>
+is unset, the hostname list is cleared.
+<DT><B>IFS</B>
+
+<DD>
+The
+<I>Internal Field Separator</I>
+
+that is used
+for word splitting after expansion and to
+split lines into words with the
+<B>read</B>
+
+builtin command. The default value is
+``&lt;space&gt;&lt;tab&gt;&lt;newline&gt;''.
+<DT><B>IGNOREEOF</B>
+
+<DD>
+Controls the
+action of an interactive shell on receipt of an
+<FONT SIZE=-1><B>EOF</B>
+
+</FONT>
+character as the sole input. If set, the value is the number of
+consecutive
+<FONT SIZE=-1><B>EOF</B>
+
+</FONT>
+characters which must be
+typed as the first characters on an input line before
+<B>bash</B>
+
+exits. If the variable exists but does not have a numeric value, or
+has no value, the default value is 10. If it does not exist,
+<FONT SIZE=-1><B>EOF</B>
+
+</FONT>
+signifies the end of input to the shell.
+<DT><B>INPUTRC</B>
+
+<DD>
+The filename for the
+<B>readline</B>
+
+startup file, overriding the default of
+
+<A HREF="file:~/.inputrc"><I>~/.inputrc</I></A>
+
+(see
+<FONT SIZE=-1><B>READLINE</B>
+
+</FONT>
+below).
+<DT><B>LANG</B>
+
+<DD>
+Used to determine the locale category for any category not specifically
+selected with a variable starting with <B>LC_</B>.
+<DT><B>LC_ALL</B>
+
+<DD>
+This variable overrides the value of
+<FONT SIZE=-1><B>LANG</B>
+
+</FONT>
+and any other
+<B>LC_</B> variable specifying a locale category.
+<DT><B>LC_COLLATE</B>
+
+<DD>
+This variable determines the collation order used when sorting the
+results of pathname expansion, and determines the behavior of range
+expressions, equivalence classes, and collating sequences within
+pathname expansion and pattern matching.
+<DT><B>LC_CTYPE</B>
+
+<DD>
+This variable determines the interpretation of characters and the
+behavior of character classes within pathname expansion and pattern
+matching.
+<DT><B>LC_MESSAGES</B>
+
+<DD>
+This variable determines the locale used to translate double-quoted
+strings preceded by a <B>$</B>.
+<DT><B>LC_NUMERIC</B>
+
+<DD>
+This variable determines the locale category used for number formatting.
+<DT><B>LINES</B>
+
+<DD>
+Used by the <B>select</B> builtin command to determine the column length
+for printing selection lists. Automatically set upon receipt of a
+<FONT SIZE=-1><B>SIGWINCH</B>.
+
+</FONT>
+<DT><B>MAIL</B>
+
+<DD>
+If this parameter is set to a file name and the
+<FONT SIZE=-1><B>MAILPATH</B>
+
+</FONT>
+variable is not set,
+<B>bash</B>
+
+informs the user of the arrival of mail in the specified file.
+<DT><B>MAILCHECK</B>
+
+<DD>
+Specifies how
+often (in seconds)
+<B>bash</B>
+
+checks for mail. The default is 60 seconds. When it is time to check
+for mail, the shell does so before displaying the primary prompt.
+If this variable is unset, or set to a value that is not a number
+greater than or equal to zero, the shell disables mail checking.
+<DT><B>MAILPATH</B>
+
+<DD>
+A colon-separated list of file names to be checked for mail.
+The message to be printed when mail arrives in a particular file
+may be specified by separating the file name from the message with a `?'.
+When used in the text of the message, <B>$_</B> expands to the name of
+the current mailfile.
+Example:
+<DL COMPACT><DT><DD>
+<P>
+
+<B>MAILPATH</B>=aq/var/mail/bfox?&quot;You have mail&quot;:~/shell-mail?&quot;$_ has mail!&quot;aq
+<P>
+
+<B>Bash</B>
+
+supplies a default value for this variable, but the location of the user
+mail files that it uses is system dependent (e.g., /var/mail/<B>$USER</B>).
+</DL>
+
+<DT><B>OPTERR</B>
+
+<DD>
+If set to the value 1,
+<B>bash</B>
+
+displays error messages generated by the
+<B>getopts</B>
+
+builtin command (see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below).
+<FONT SIZE=-1><B>OPTERR</B>
+
+</FONT>
+is initialized to 1 each time the shell is invoked or a shell
+script is executed.
+<DT><B>PATH</B>
+
+<DD>
+The search path for commands. It
+is a colon-separated list of directories in which
+the shell looks for commands (see
+<FONT SIZE=-1><B>COMMAND EXECUTION</B>
+
+</FONT>
+below).
+A zero-length (null) directory name in the value of
+<FONT SIZE=-1><B>PATH</B>
+
+</FONT>
+indicates the current directory.
+A null directory name may appear as two adjacent colons, or as an initial
+or trailing colon.
+The default path is system-dependent,
+and is set by the administrator who installs
+<B>bash</B>.
+
+A common value is
+<TT>/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin</TT>.
+
+<DT><B>POSIXLY_CORRECT</B>
+
+<DD>
+If this variable is in the environment when <B>bash</B> starts, the shell
+enters <I>posix mode</I> before reading the startup files, as if the
+<B>--posix</B>
+
+invocation option had been supplied. If it is set while the shell is
+running, <B>bash</B> enables <I>posix mode</I>, as if the command
+<TT>set -o posix</TT>
+
+had been executed.
+<DT><B>PROMPT_COMMAND</B>
+
+<DD>
+If set, the value is executed as a command prior to issuing each primary
+prompt.
+<DT><B>PROMPT_DIRTRIM</B>
+
+<DD>
+If set to a number greater than zero, the value is used as the number of
+trailing directory components to retain when expanding the <B>\w</B> and
+<B>\W</B> prompt string escapes (see
+<FONT SIZE=-1><B>PROMPTING</B>
+
+</FONT>
+below). Characters removed are replaced with an ellipsis.
+<DT><B>PS1</B>
+
+<DD>
+The value of this parameter is expanded (see
+<FONT SIZE=-1><B>PROMPTING</B>
+
+</FONT>
+below) and used as the primary prompt string. The default value is
+``<B>\s-\v\$ </B>''.
+<DT><B>PS2</B>
+
+<DD>
+The value of this parameter is expanded as with
+<FONT SIZE=-1><B>PS1</B>
+
+</FONT>
+and used as the secondary prompt string. The default is
+``<B>&gt; </B>''.
+<DT><B>PS3</B>
+
+<DD>
+The value of this parameter is used as the prompt for the
+<B>select</B>
+
+command (see
+<FONT SIZE=-1><B>SHELL GRAMMAR</B>
+
+</FONT>
+above).
+<DT><B>PS4</B>
+
+<DD>
+The value of this parameter is expanded as with
+<FONT SIZE=-1><B>PS1</B>
+
+</FONT>
+and the value is printed before each command
+<B>bash</B>
+
+displays during an execution trace. The first character of
+<FONT SIZE=-1><B>PS4</B>
+
+</FONT>
+is replicated multiple times, as necessary, to indicate multiple
+levels of indirection. The default is ``<B>+ </B>''.
+<DT><B>SHELL</B>
+
+<DD>
+The full pathname to the shell is kept in this environment variable.
+If it is not set when the shell starts,
+<B>bash</B>
+
+assigns to it the full pathname of the current user's login shell.
+<DT><B>TIMEFORMAT</B>
+
+<DD>
+The value of this parameter is used as a format string specifying
+how the timing information for pipelines prefixed with the
+<B>time</B>
+
+reserved word should be displayed.
+The <B>%</B> character introduces an escape sequence that is
+expanded to a time value or other information.
+The escape sequences and their meanings are as follows; the
+braces denote optional portions.
+<P>
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>%%</B>
+
+<DD>
+A literal <B>%</B>.
+<DT><B>%[</B><I>p</I>][l]R
+
+<DD>
+The elapsed time in seconds.
+<DT><B>%[</B><I>p</I>][l]U
+
+<DD>
+The number of CPU seconds spent in user mode.
+<DT><B>%[</B><I>p</I>][l]S
+
+<DD>
+The number of CPU seconds spent in system mode.
+<DT><B>%P</B>
+
+<DD>
+The CPU percentage, computed as (%U + %S) / %R.
+
+</DL></DL>
+
+<DT><DD>
+The optional <I>p</I> is a digit specifying the <I>precision</I>,
+the number of fractional digits after a decimal point.
+A value of 0 causes no decimal point or fraction to be output.
+At most three places after the decimal point may be specified;
+values of <I>p</I> greater than 3 are changed to 3.
+If <I>p</I> is not specified, the value 3 is used.
+<DT><DD>
+The optional <B>l</B> specifies a longer format, including
+minutes, of the form <I>MM</I>m<I>SS</I>.<I>FF</I>s.
+The value of <I>p</I> determines whether or not the fraction is
+included.
+<DT><DD>
+If this variable is not set, <B>bash</B> acts as if it had the
+value <B>$aq\nreal\t%3lR\nuser\t%3lU\nsys %3lSaq</B>.
+If the value is null, no timing information is displayed.
+A trailing newline is added when the format string is displayed.
+<DT><B>TMOUT</B>
+
+<DD>
+If set to a value greater than zero,
+<FONT SIZE=-1><B>TMOUT</B>
+
+</FONT>
+is treated as the
+default timeout for the <B>read</B> builtin.
+The <B>select</B> command terminates if input does not arrive
+after
+<FONT SIZE=-1><B>TMOUT</B>
+
+</FONT>
+seconds when input is coming from a terminal.
+In an interactive shell, the value is interpreted as the
+number of seconds to wait for input after issuing the primary prompt.
+<B>Bash</B>
+
+terminates after waiting for that number of seconds if input does
+not arrive.
+<DT><B>TMPDIR</B>
+
+<DD>
+If set, <B>Bash</B> uses its value as the name of a directory in which
+<B>Bash</B> creates temporary files for the shell's use.
+<DT><B>auto_resume</B>
+
+<DD>
+This variable controls how the shell interacts with the user and
+job control. If this variable is set, single word simple
+commands without redirections are treated as candidates for resumption
+of an existing stopped job. There is no ambiguity allowed; if there is
+more than one job beginning with the string typed, the job most recently
+accessed is selected. The
+<I>name</I>
+
+of a stopped job, in this context, is the command line used to
+start it.
+If set to the value
+<I>exact</I>,
+
+the string supplied must match the name of a stopped job exactly;
+if set to
+<I>substring</I>,
+
+the string supplied needs to match a substring of the name of a
+stopped job. The
+<I>substring</I>
+
+value provides functionality analogous to the
+<B>%?</B>
+
+job identifier (see
+<FONT SIZE=-1><B>JOB CONTROL</B>
+
+</FONT>
+below). If set to any other value, the supplied string must
+be a prefix of a stopped job's name; this provides functionality
+analogous to the <B>%</B><I>string</I> job identifier.
+<DT><B>histchars</B>
+
+<DD>
+The two or three characters which control history expansion
+and tokenization (see
+<FONT SIZE=-1><B>HISTORY EXPANSION</B>
+
+</FONT>
+below). The first character is the <I>history expansion</I> character,
+the character which signals the start of a history
+expansion, normally `<B>!</B>'.
+The second character is the <I>quick substitution</I>
+character, which is used as shorthand for re-running the previous
+command entered, substituting one string for another in the command.
+The default is `<B>^</B>'.
+The optional third character is the character
+which indicates that the remainder of the line is a comment when found
+as the first character of a word, normally `<B>#</B>'. The history
+comment character causes history substitution to be skipped for the
+remaining words on the line. It does not necessarily cause the shell
+parser to treat the rest of the line as a comment.
+
+</DL>
+<A NAME="lbAX">&nbsp;</A>
+<H4>Arrays</H4>
+
+<B>Bash</B>
+
+provides one-dimensional indexed and associative array variables.
+Any variable may be used as an indexed array; the
+<B>declare</B>
+
+builtin will explicitly declare an array.
+There is no maximum
+limit on the size of an array, nor any requirement that members
+be indexed or assigned contiguously.
+Indexed arrays are referenced using integers (including arithmetic
+expressions) and are zero-based; associative arrays are referenced
+using arbitrary strings.
+<P>
+
+An indexed array is created automatically if any variable is assigned to
+using the syntax <I>name</I>[<I>subscript</I>]=<I>value</I>. The
+<I>subscript</I>
+
+is treated as an arithmetic expression that must evaluate to a number
+greater than or equal to zero. To explicitly declare an indexed array,
+use
+<B>declare -a </B><I>name</I>
+
+(see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below).
+<B>declare -a </B><I>name</I>[<I>subscript</I>]
+
+is also accepted; the <I>subscript</I> is ignored.
+<P>
+
+Associative arrays are created using
+<B>declare -A </B><I>name</I>.
+
+<P>
+
+Attributes may be
+specified for an array variable using the
+<B>declare</B>
+
+and
+<B>readonly</B>
+
+builtins. Each attribute applies to all members of an array.
+<P>
+
+Arrays are assigned to using compound assignments of the form
+<I>name</I>=<B>(</B>value<I>1</I> ... value<I>n</I><B>)</B>, where each
+<I>value</I> is of the form [<I>subscript</I>]=<I>string</I>.
+Indexed array assignments do not require the bracket and subscript.
+When assigning to indexed arrays, if the optional brackets and subscript
+are supplied, that index is assigned to;
+otherwise the index of the element assigned is the last index assigned
+to by the statement plus one. Indexing starts at zero.
+<P>
+
+When assigning to an associative array, the subscript is required.
+<P>
+
+This syntax is also accepted by the
+<B>declare</B>
+
+builtin. Individual array elements may be assigned to using the
+<I>name</I>[<I>subscript</I>]=<I>value</I> syntax introduced above.
+<P>
+
+Any element of an array may be referenced using
+${<I>name</I>[<I>subscript</I>]}. The braces are required to avoid
+conflicts with pathname expansion. If
+<I>subscript</I> is <B>@</B> or <B>*</B>, the word expands to
+all members of <I>name</I>. These subscripts differ only when the
+word appears within double quotes. If the word is double-quoted,
+${<I>name</I>[*]} expands to a single
+word with the value of each array member separated by the first
+character of the
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+special variable, and ${<I>name</I>[@]} expands each element of
+<I>name</I> to a separate word. When there are no array members,
+${<I>name</I>[@]} expands to nothing.
+If the double-quoted expansion occurs within a word, the expansion of
+the first parameter is joined with the beginning part of the original
+word, and the expansion of the last parameter is joined with the last
+part of the original word.
+This is analogous to the expansion
+of the special parameters <B>*</B> and <B>@</B> (see
+<B>Special Parameters</B>
+
+above). ${#<I>name</I>[<I>subscript</I>]} expands to the length of
+${<I>name</I>[<I>subscript</I>]}. If <I>subscript</I> is <B>*</B> or
+<B>@</B>, the expansion is the number of elements in the array.
+Referencing an array variable without a subscript is equivalent to
+referencing the array with a subscript of 0.
+<P>
+
+An array variable is considered set if a subscript has been assigned a
+value. The null string is a valid value.
+<P>
+
+The
+<B>unset</B>
+
+builtin is used to destroy arrays. <B>unset</B> <I>name</I>[<I>subscript</I>]
+destroys the array element at index <I>subscript</I>.
+Care must be taken to avoid unwanted side effects caused by pathname
+expansion.
+<B>unset</B> <I>name</I>, where <I>name</I> is an array, or
+<B>unset</B> <I>name</I>[<I>subscript</I>], where
+<I>subscript</I> is <B>*</B> or <B>@</B>, removes the entire array.
+<P>
+
+The
+<B>declare</B>,
+
+<B>local</B>,
+
+and
+<B>readonly</B>
+
+builtins each accept a
+<B>-a</B>
+
+option to specify an indexed array and a
+<B>-A</B>
+
+option to specify an associative array.
+The
+<B>read</B>
+
+builtin accepts a
+<B>-a</B>
+
+option to assign a list of words read from the standard input
+to an array. The
+<B>set</B>
+
+and
+<B>declare</B>
+
+builtins display array values in a way that allows them to be
+reused as assignments.
+<A NAME="lbAY">&nbsp;</A>
+<H3>EXPANSION</H3>
+
+Expansion is performed on the command line after it has been split into
+words. There are seven kinds of expansion performed:
+<I>brace expansion</I>,
+
+<I>tilde expansion</I>,
+
+<I>parameter and variable expansion</I>,
+
+<I>command substitution</I>,
+
+<I>arithmetic expansion</I>,
+
+<I>word splitting</I>,
+
+and
+<I>pathname expansion</I>.
+
+<P>
+
+The order of expansions is: brace expansion, tilde expansion,
+parameter, variable and arithmetic expansion and
+command substitution
+(done in a left-to-right fashion), word splitting, and pathname
+expansion.
+<P>
+
+On systems that can support it, there is an additional expansion
+available: <I>process substitution</I>.
+<P>
+
+Only brace expansion, word splitting, and pathname expansion
+can change the number of words of the expansion; other expansions
+expand a single word to a single word.
+The only exceptions to this are the expansions of
+&quot;<B>$@</B>&quot; and &quot;<B>${</B><I>name</I><B>[@]}</B>&quot;
+as explained above (see
+<FONT SIZE=-1><B>PARAMETERS</B>).
+
+</FONT>
+<A NAME="lbAZ">&nbsp;</A>
+<H4>Brace Expansion</H4>
+
+<P>
+
+<I>Brace expansion</I>
+
+is a mechanism by which arbitrary strings
+may be generated. This mechanism is similar to
+<I>pathname expansion</I>, but the filenames generated
+need not exist. Patterns to be brace expanded take
+the form of an optional
+<I>preamble</I>,
+
+followed by either a series of comma-separated strings or
+a sequence expression between a pair of braces, followed by
+an optional
+<I>postscript</I>.
+
+The preamble is prefixed to each string contained
+within the braces, and the postscript is then appended
+to each resulting string, expanding left to right.
+<P>
+
+Brace expansions may be nested. The results of each expanded
+string are not sorted; left to right order is preserved.
+For example, a<B>{</B>d,c,b<B>}</B>e expands into `ade ace abe'.
+<P>
+
+A sequence expression takes the form
+<B>{</B><I>x</I><B>..</B><I>y</I><B>[..</B><I>incr</I><B>]}</B>,
+where <I>x</I> and <I>y</I> are either integers or single characters,
+and <I>incr</I>, an optional increment, is an integer.
+When integers are supplied, the expression expands to each number between
+<I>x</I> and <I>y</I>, inclusive.
+Supplied integers may be prefixed with <I>0</I> to force each term to have the
+same width. When either <I>x</I> or y begins with a zero, the shell
+attempts to force all generated terms to contain the same number of digits,
+zero-padding where necessary.
+When characters are supplied, the expression expands to each character
+lexicographically between <I>x</I> and <I>y</I>, inclusive. Note that
+both <I>x</I> and <I>y</I> must be of the same type.
+When the increment is supplied, it is used as the difference between
+each term. The default increment is 1 or -1 as appropriate.
+<P>
+
+Brace expansion is performed before any other expansions,
+and any characters special to other expansions are preserved
+in the result. It is strictly textual.
+<B>Bash</B>
+
+does not apply any syntactic interpretation to the context of the
+expansion or the text between the braces.
+<P>
+
+A correctly-formed brace expansion must contain unquoted opening
+and closing braces, and at least one unquoted comma or a valid
+sequence expression.
+Any incorrectly formed brace expansion is left unchanged.
+A <B>{</B> or <B>,</B> may be quoted with a backslash to prevent its
+being considered part of a brace expression.
+To avoid conflicts with parameter expansion, the string <B>${</B>
+is not considered eligible for brace expansion.
+<P>
+
+This construct is typically used as shorthand when the common
+prefix of the strings to be generated is longer than in the
+above example:
+<DL COMPACT><DT><DD>
+<P>
+
+mkdir /usr/local/src/bash/{old,new,dist,bugs}
+</DL>
+
+or
+<DL COMPACT><DT><DD>
+chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}
+</DL>
+
+<P>
+
+Brace expansion introduces a slight incompatibility with
+historical versions of
+<B>sh</B>.
+
+<B>sh</B>
+
+does not treat opening or closing braces specially when they
+appear as part of a word, and preserves them in the output.
+<B>Bash</B>
+
+removes braces from words as a consequence of brace
+expansion. For example, a word entered to
+<B>sh</B>
+
+as <I>file{1,2}</I>
+appears identically in the output. The same word is
+output as
+<I>file1 file2</I>
+
+after expansion by
+<B>bash</B>.
+
+If strict compatibility with
+<B>sh</B>
+
+is desired, start
+<B>bash</B>
+
+with the
+<B>+B </B>
+
+option or disable brace expansion with the
+<B>+B</B>
+
+option to the
+<B>set</B>
+
+command (see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below).
+<A NAME="lbBA">&nbsp;</A>
+<H4>Tilde Expansion</H4>
+
+<P>
+
+If a word begins with an unquoted tilde character (`<B>~</B>'), all of
+the characters preceding the first unquoted slash (or all characters,
+if there is no unquoted slash) are considered a <I>tilde-prefix</I>.
+If none of the characters in the tilde-prefix are quoted, the
+characters in the tilde-prefix following the tilde are treated as a
+possible <I>login name</I>.
+If this login name is the null string, the tilde is replaced with the
+value of the shell parameter
+<FONT SIZE=-1><B>HOME</B>.
+
+</FONT>
+If
+<FONT SIZE=-1><B>HOME</B>
+
+</FONT>
+is unset, the home directory of the user executing the shell is
+substituted instead.
+Otherwise, the tilde-prefix is replaced with the home directory
+associated with the specified login name.
+<P>
+
+If the tilde-prefix is a `~+', the value of the shell variable
+<FONT SIZE=-1><B>PWD</B>
+
+</FONT>
+replaces the tilde-prefix.
+If the tilde-prefix is a `~-', the value of the shell variable
+<FONT SIZE=-1><B>OLDPWD</B>,
+
+</FONT>
+if it is set, is substituted.
+If the characters following the tilde in the tilde-prefix consist
+of a number <I>N</I>, optionally prefixed
+by a `+' or a `-', the tilde-prefix is replaced with the corresponding
+element from the directory stack, as it would be displayed by the
+<B>dirs</B>
+
+builtin invoked with the tilde-prefix as an argument.
+If the characters following the tilde in the tilde-prefix consist of a
+number without a leading `+' or `-', `+' is assumed.
+<P>
+
+If the login name is invalid, or the tilde expansion fails, the word
+is unchanged.
+<P>
+
+Each variable assignment is checked for unquoted tilde-prefixes immediately
+following a
+<B>:</B>
+
+or the first
+<B>=</B>.
+
+In these cases, tilde expansion is also performed.
+Consequently, one may use file names with tildes in assignments to
+<FONT SIZE=-1><B>PATH</B>,
+
+</FONT>
+<FONT SIZE=-1><B>MAILPATH</B>,
+
+</FONT>
+and
+<FONT SIZE=-1><B>CDPATH</B>,
+
+</FONT>
+and the shell assigns the expanded value.
+<A NAME="lbBB">&nbsp;</A>
+<H4>Parameter Expansion</H4>
+
+<P>
+
+The `<B>$</B>' character introduces parameter expansion,
+command substitution, or arithmetic expansion. The parameter name
+or symbol to be expanded may be enclosed in braces, which
+are optional but serve to protect the variable to be expanded from
+characters immediately following it which could be
+interpreted as part of the name.
+<P>
+
+When braces are used, the matching ending brace is the first `<B>}</B>'
+not escaped by a backslash or within a quoted string, and not within an
+embedded arithmetic expansion, command substitution, or parameter
+expansion.
+<P>
+
+
+<DL COMPACT>
+<DT>${<I>parameter</I>}<DD>
+The value of <I>parameter</I> is substituted. The braces are required
+when
+<I>parameter</I>
+
+is a positional parameter with more than one digit,
+or when
+<I>parameter</I>
+
+is followed by a character which is not to be
+interpreted as part of its name.
+
+</DL>
+<P>
+
+If the first character of <I>parameter</I> is an exclamation point (<B>!</B>),
+a level of variable indirection is introduced.
+<B>Bash</B> uses the value of the variable formed from the rest of
+<I>parameter</I> as the name of the variable; this variable is then
+expanded and that value is used in the rest of the substitution, rather
+than the value of <I>parameter</I> itself.
+This is known as <I>indirect expansion</I>.
+The exceptions to this are the expansions of ${!<I>prefix</I>*} and
+${<B>!</B><I>name</I>[<I>@</I>]} described below.
+The exclamation point must immediately follow the left brace in order to
+introduce indirection.
+<P>
+
+In each of the cases below, <I>word</I> is subject to tilde expansion,
+parameter expansion, command substitution, and arithmetic expansion.
+<P>
+
+When not performing substring expansion, using the forms documented below,
+<B>bash</B> tests for a parameter that is unset or null. Omitting the colon
+results in a test only for a parameter that is unset.
+<P>
+
+
+<DL COMPACT>
+<DT>${<I>parameter</I><B>:-</B><I>word</I>}<DD>
+<B>Use Default Values</B>. If
+<I>parameter</I>
+
+is unset or null, the expansion of
+<I>word</I>
+
+is substituted. Otherwise, the value of
+<I>parameter</I>
+
+is substituted.
+<DT>${<I>parameter</I><B>:=</B><I>word</I>}<DD>
+<B>Assign Default Values</B>.
+If
+<I>parameter</I>
+
+is unset or null, the expansion of
+<I>word</I>
+
+is assigned to
+<I>parameter</I>.
+
+The value of
+<I>parameter</I>
+
+is then substituted. Positional parameters and special parameters may
+not be assigned to in this way.
+<DT>${<I>parameter</I><B>:?</B><I>word</I>}<DD>
+<B>Display Error if Null or Unset</B>.
+If
+<I>parameter</I>
+
+is null or unset, the expansion of <I>word</I> (or a message to that effect
+if
+<I>word</I>
+
+is not present) is written to the standard error and the shell, if it
+is not interactive, exits. Otherwise, the value of <I>parameter</I> is
+substituted.
+<DT>${<I>parameter</I><B>:+</B><I>word</I>}<DD>
+<B>Use Alternate Value</B>.
+If
+<I>parameter</I>
+
+is null or unset, nothing is substituted, otherwise the expansion of
+<I>word</I>
+
+is substituted.
+<DT>${<I>parameter</I><B>:</B><I>offset</I>}<DD>
+
+<DT>${<I>parameter</I><B>:</B><I>offset</I><B>:</B><I>length</I>}<DD>
+
+<B>Substring Expansion.</B>
+Expands to up to <I>length</I> characters of <I>parameter</I>
+starting at the character specified by <I>offset</I>.
+If <I>length</I> is omitted, expands to the substring of
+<I>parameter</I> starting at the character specified by <I>offset</I>.
+<I>length</I> and <I>offset</I> are arithmetic expressions (see
+<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>
+
+</FONT>
+below).
+<I>length</I> must evaluate to a number greater than or equal to zero.
+If <I>offset</I> evaluates to a number less than zero, the value
+is used as an offset from the end of the value of <I>parameter</I>.
+If <I>parameter</I> is <B>@</B>, the result is <I>length</I> positional
+parameters beginning at <I>offset</I>.
+If <I>parameter</I> is an indexed array name subscripted by @ or *,
+the result is the <I>length</I>
+members of the array beginning with ${<I>parameter</I>[<I>offset</I>]}.
+A negative <I>offset</I> is taken relative to one greater than the maximum
+index of the specified array.
+Substring expansion applied to an associative array produces undefined
+results.
+Note that a negative offset must be separated from the colon by at least
+one space to avoid being confused with the :- expansion.
+Substring indexing is zero-based unless the positional parameters
+are used, in which case the indexing starts at 1 by default.
+If <I>offset</I> is 0, and the positional parameters are used, <B>$0</B> is
+prefixed to the list.
+<DT>${<B>!</B><I>prefix</I><B>*</B>}<DD>
+
+<DT>${<B>!</B><I>prefix</I><B>@</B>}<DD>
+
+<B>Names matching prefix.</B>
+Expands to the names of variables whose names begin with <I>prefix</I>,
+separated by the first character of the
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+special variable.
+When <I>@</I> is used and the expansion appears within double quotes, each
+variable name expands to a separate word.
+<DT>${<B>!</B><I>name</I>[<I>@</I>]}<DD>
+
+<DT>${<B>!</B><I>name</I>[<I>*</I>]}<DD>
+
+<B>List of array keys.</B>
+If <I>name</I> is an array variable, expands to the list of array indices
+(keys) assigned in <I>name</I>.
+If <I>name</I> is not an array, expands to 0 if <I>name</I> is set and null
+otherwise.
+When <I>@</I> is used and the expansion appears within double quotes, each
+key expands to a separate word.
+<DT>${<B>#</B><I>parameter</I>}<DD>
+<B>Parameter length.</B>
+The length in characters of the value of <I>parameter</I> is substituted.
+If
+<I>parameter</I>
+
+is
+<B>*</B>
+
+or
+<B>@</B>,
+
+the value substituted is the number of positional parameters.
+If
+<I>parameter</I>
+
+is an array name subscripted by
+<B>*</B>
+
+or
+<B>@</B>,
+
+the value substituted is the number of elements in the array.
+<DT>${<I>parameter</I><B>#</B><I>word</I>}<DD>
+
+<DT>${<I>parameter</I><B>##</B><I>word</I>}<DD>
+
+<B>Remove matching prefix pattern.</B>
+The
+<I>word</I>
+
+is expanded to produce a pattern just as in pathname
+expansion. If the pattern matches the beginning of
+the value of
+<I>parameter</I>,
+
+then the result of the expansion is the expanded value of
+<I>parameter</I>
+
+with the shortest matching pattern (the ``<B>#</B>'' case) or the
+longest matching pattern (the ``<B>##</B>'' case) deleted.
+If
+<I>parameter</I>
+
+is
+<B>@</B>
+
+or
+<B>*</B>,
+
+the pattern removal operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If
+<I>parameter</I>
+
+is an array variable subscripted with
+<B>@</B>
+
+or
+<B>*</B>,
+
+the pattern removal operation is applied to each member of the
+array in turn, and the expansion is the resultant list.
+<DT>${<I>parameter</I><B>%</B><I>word</I>}<DD>
+
+<DT>${<I>parameter</I><B>%%</B><I>word</I>}<DD>
+
+<B>Remove matching suffix pattern.</B>
+The <I>word</I> is expanded to produce a pattern just as in
+pathname expansion.
+If the pattern matches a trailing portion of the expanded value of
+<I>parameter</I>,
+
+then the result of the expansion is the expanded value of
+<I>parameter</I>
+
+with the shortest matching pattern (the ``<B>%</B>'' case) or the
+longest matching pattern (the ``<B>%%</B>'' case) deleted.
+If
+<I>parameter</I>
+
+is
+<B>@</B>
+
+or
+<B>*</B>,
+
+the pattern removal operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If
+<I>parameter</I>
+
+is an array variable subscripted with
+<B>@</B>
+
+or
+<B>*</B>,
+
+the pattern removal operation is applied to each member of the
+array in turn, and the expansion is the resultant list.
+<DT>${<I>parameter</I><B>/</B><I>pattern</I><B>/</B><I>string</I>}<DD>
+<B>Pattern substitution.</B>
+The <I>pattern</I> is expanded to produce a pattern just as in
+pathname expansion.
+<I>Parameter</I> is expanded and the longest match of <I>pattern</I>
+against its value is replaced with <I>string</I>.
+If <I>pattern</I> begins with <B>/</B>, all matches of <I>pattern</I> are
+replaced with <I>string</I>. Normally only the first match is replaced.
+If <I>pattern</I> begins with <B>#</B>, it must match at the beginning
+of the expanded value of <I>parameter</I>.
+If <I>pattern</I> begins with <B>%</B>, it must match at the end
+of the expanded value of <I>parameter</I>.
+If <I>string</I> is null, matches of <I>pattern</I> are deleted
+and the <B>/</B> following <I>pattern</I> may be omitted.
+If
+<I>parameter</I>
+
+is
+<B>@</B>
+
+or
+<B>*</B>,
+
+the substitution operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If
+<I>parameter</I>
+
+is an array variable subscripted with
+<B>@</B>
+
+or
+<B>*</B>,
+
+the substitution operation is applied to each member of the
+array in turn, and the expansion is the resultant list.
+<DT>${<I>parameter</I><B>^</B><I>pattern</I>}<DD>
+
+<DT>${<I>parameter</I><B>^^</B><I>pattern</I>}<DD>
+<DT>${<I>parameter</I><B>,</B><I>pattern</I>}<DD>
+<DT>${<I>parameter</I><B>,,</B><I>pattern</I>}<DD>
+
+<B>Case modification.</B>
+This expansion modifies the case of alphabetic characters in <I>parameter</I>.
+The <I>pattern</I> is expanded to produce a pattern just as in
+pathname expansion.
+The <B>^</B> operator converts lowercase letters matching <I>pattern</I>
+to uppercase; the <B>,</B> operator converts matching uppercase letters
+to lowercase.
+The <B>^^</B> and <B>,,</B> expansions convert each matched character in the
+expanded value; the <B>^</B> and <B>,</B> expansions match and convert only
+the first character in the expanded value..
+If <I>pattern</I> is omitted, it is treated like a <B>?</B>, which matches
+every character.
+If
+<I>parameter</I>
+
+is
+<B>@</B>
+
+or
+<B>*</B>,
+
+the case modification operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If
+<I>parameter</I>
+
+is an array variable subscripted with
+<B>@</B>
+
+or
+<B>*</B>,
+
+the case modification operation is applied to each member of the
+array in turn, and the expansion is the resultant list.
+</DL>
+<A NAME="lbBC">&nbsp;</A>
+<H4>Command Substitution</H4>
+
+<P>
+
+<I>Command substitution</I> allows the output of a command to replace
+the command name. There are two forms:
+<P>
+
+<DL COMPACT><DT><DD>
+<P>
+
+<B>$(</B><I>command</I><B>)</B>
+</DL>
+
+or
+<DL COMPACT><DT><DD>
+<B>`</B><I>command</I><B>`</B>
+</DL>
+
+<P>
+
+<B>Bash</B>
+
+performs the expansion by executing <I>command</I> and
+replacing the command substitution with the standard output of the
+command, with any trailing newlines deleted.
+Embedded newlines are not deleted, but they may be removed during
+word splitting.
+The command substitution <B>$(cat </B><I>file</I>) can be replaced by
+the equivalent but faster <B>$(&lt; </B><I>file</I>).
+<P>
+
+When the old-style backquote form of substitution is used,
+backslash retains its literal meaning except when followed by
+<B>$</B>,
+
+<B>`</B>,
+
+or
+<B>\</B>.
+
+The first backquote not preceded by a backslash terminates the
+command substitution.
+When using the $(<I>command</I>) form, all characters between the
+parentheses make up the command; none are treated specially.
+<P>
+
+Command substitutions may be nested. To nest when using the backquoted form,
+escape the inner backquotes with backslashes.
+<P>
+
+If the substitution appears within double quotes, word splitting and
+pathname expansion are not performed on the results.
+<A NAME="lbBD">&nbsp;</A>
+<H4>Arithmetic Expansion</H4>
+
+<P>
+
+Arithmetic expansion allows the evaluation of an arithmetic expression
+and the substitution of the result. The format for arithmetic expansion is:
+<DL COMPACT><DT><DD>
+<P>
+
+<B>$((</B><I>expression</I><B>))</B>
+</DL>
+
+<P>
+
+The
+<I>expression</I>
+
+is treated as if it were within double quotes, but a double quote
+inside the parentheses is not treated specially.
+All tokens in the expression undergo parameter expansion, string
+expansion, command substitution, and quote removal.
+Arithmetic expansions may be nested.
+<P>
+
+The evaluation is performed according to the rules listed below under
+<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>.
+
+</FONT>
+If
+<I>expression</I>
+
+is invalid,
+<B>bash</B>
+
+prints a message indicating failure and no substitution occurs.
+<A NAME="lbBE">&nbsp;</A>
+<H4>Process Substitution</H4>
+
+<P>
+
+<I>Process substitution</I> is supported on systems that support named
+pipes (<I>FIFOs</I>) or the <B>/dev/fd</B> method of naming open files.
+It takes the form of
+<B>&lt;(</B><I>list</I><B>)</B>
+or
+<B>&gt;(</B><I>list</I><B>)</B>.
+The process <I>list</I> is run with its input or output connected to a
+<I>FIFO</I> or some file in <B>/dev/fd</B>. The name of this file is
+passed as an argument to the current command as the result of the
+expansion. If the <B>&gt;(</B><I>list</I><B>)</B> form is used, writing to
+the file will provide input for <I>list</I>. If the
+<B>&lt;(</B><I>list</I><B>)</B> form is used, the file passed as an
+argument should be read to obtain the output of <I>list</I>.
+<P>
+
+When available, process substitution is performed
+simultaneously with parameter and variable expansion,
+command substitution,
+and arithmetic expansion.
+<A NAME="lbBF">&nbsp;</A>
+<H4>Word Splitting</H4>
+
+<P>
+
+The shell scans the results of
+parameter expansion,
+command substitution,
+and
+arithmetic expansion
+that did not occur within double quotes for
+<I>word splitting</I>.
+
+<P>
+
+The shell treats each character of
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+as a delimiter, and splits the results of the other
+expansions into words on these characters. If
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+is unset, or its
+value is exactly
+<B>&lt;space&gt;&lt;tab&gt;&lt;newline&gt;</B>,
+
+the default, then
+sequences of
+<B>&lt;space&gt;</B>,
+
+<B>&lt;tab&gt;</B>,
+
+and
+<B>&lt;newline&gt;</B>
+
+at the beginning and end of the results of the previous
+expansions are ignored, and
+any sequence of
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+characters not at the beginning or end serves to delimit words.
+If
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+has a value other than the default, then sequences of
+the whitespace characters
+<B>space</B>
+
+and
+<B>tab</B>
+
+are ignored at the beginning and end of the
+word, as long as the whitespace character is in the
+value of
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+(an
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+whitespace character).
+Any character in
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+that is not
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+whitespace, along with any adjacent
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+whitespace characters, delimits a field.
+A sequence of
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+whitespace characters is also treated as a delimiter.
+If the value of
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+is null, no word splitting occurs.
+<P>
+
+Explicit null arguments (<B>&quot;&quot;</B> or <B>aqaq</B>) are retained.
+Unquoted implicit null arguments, resulting from the expansion of
+parameters that have no values, are removed.
+If a parameter with no value is expanded within double quotes, a
+null argument results and is retained.
+<P>
+
+Note that if no expansion occurs, no splitting
+is performed.
+<A NAME="lbBG">&nbsp;</A>
+<H4>Pathname Expansion</H4>
+
+<P>
+
+After word splitting,
+unless the
+<B>-f</B>
+
+option has been set,
+<B>bash</B>
+
+scans each word for the characters
+<B>*</B>,
+
+<B>?</B>,
+
+and
+<B>[</B>.
+
+If one of these characters appears, then the word is
+regarded as a
+<I>pattern</I>,
+
+and replaced with an alphabetically sorted list of
+file names matching the pattern.
+If no matching file names are found,
+and the shell option
+<B>nullglob</B>
+
+is not enabled, the word is left unchanged.
+If the
+<B>nullglob</B>
+
+option is set, and no matches are found,
+the word is removed.
+If the
+<B>failglob</B>
+
+shell option is set, and no matches are found, an error message
+is printed and the command is not executed.
+If the shell option
+<B>nocaseglob</B>
+
+is enabled, the match is performed without regard to the case
+of alphabetic characters.
+When a pattern is used for pathname expansion,
+the character
+<B>``.''</B>
+
+at the start of a name or immediately following a slash
+must be matched explicitly, unless the shell option
+<B>dotglob</B>
+
+is set.
+When matching a pathname, the slash character must always be
+matched explicitly.
+In other cases, the
+<B>``.''</B>
+
+character is not treated specially.
+See the description of
+<B>shopt</B>
+
+below under
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+for a description of the
+<B>nocaseglob</B>,
+
+<B>nullglob</B>,
+
+<B>failglob</B>,
+
+and
+<B>dotglob</B>
+
+shell options.
+<P>
+
+The
+<FONT SIZE=-1><B>GLOBIGNORE</B>
+
+</FONT>
+shell variable may be used to restrict the set of file names matching a
+<I>pattern</I>.
+
+If
+<FONT SIZE=-1><B>GLOBIGNORE</B>
+
+</FONT>
+is set, each matching file name that also matches one of the patterns in
+<FONT SIZE=-1><B>GLOBIGNORE</B>
+
+</FONT>
+is removed from the list of matches.
+The file names
+<B>``.''</B>
+
+and
+<B>``..''</B>
+
+are always ignored when
+<FONT SIZE=-1><B>GLOBIGNORE</B>
+
+</FONT>
+is set and not null. However, setting
+<FONT SIZE=-1><B>GLOBIGNORE</B>
+
+</FONT>
+to a non-null value has the effect of enabling the
+<B>dotglob</B>
+
+shell option, so all other file names beginning with a
+<B>``.''</B>
+
+will match.
+To get the old behavior of ignoring file names beginning with a
+<B>``.''</B>,
+
+make
+<B>``.*''</B>
+
+one of the patterns in
+<FONT SIZE=-1><B>GLOBIGNORE</B>.
+
+</FONT>
+The
+<B>dotglob</B>
+
+option is disabled when
+<FONT SIZE=-1><B>GLOBIGNORE</B>
+
+</FONT>
+is unset.
+<P>
+
+<B>Pattern Matching</B>
+<P>
+
+Any character that appears in a pattern, other than the special pattern
+characters described below, matches itself. The NUL character may not
+occur in a pattern. A backslash escapes the following character; the
+escaping backslash is discarded when matching.
+The special pattern characters must be quoted if
+they are to be matched literally.
+<P>
+
+The special pattern characters have the following meanings:
+<P>
+
+
+<DL COMPACT>
+<DT><B>*</B>
+
+<DD>
+Matches any string, including the null string.
+When the <B>globstar</B> shell option is enabled, and <B>*</B> is used in
+a pathname expansion context, two adjacent <B>*</B>s used as a single
+pattern will match all files and zero or more directories and
+subdirectories.
+If followed by a <B>/</B>, two adjacent <B>*</B>s will match only directories
+and subdirectories.
+<DT><B>?</B>
+
+<DD>
+Matches any single character.
+<DT><B>[...]</B>
+
+<DD>
+Matches any one of the enclosed characters. A pair of characters
+separated by a hyphen denotes a
+<I>range expression</I>;
+any character that sorts between those two characters, inclusive,
+using the current locale's collating sequence and character set,
+is matched. If the first character following the
+<B>[</B>
+
+is a
+<B>!</B>
+
+or a
+<B>^</B>
+
+then any character not enclosed is matched.
+The sorting order of characters in range expressions is determined by
+the current locale and the value of the
+<FONT SIZE=-1><B>LC_COLLATE</B>
+
+</FONT>
+shell variable,
+if set.
+A
+<B>-</B>
+
+may be matched by including it as the first or last character
+in the set.
+A
+<B>]</B>
+
+may be matched by including it as the first character
+in the set.
+<BR>
+
+<P>
+
+
+Within
+<B>[</B>
+
+and
+<B>]</B>,
+
+<I>character classes</I> can be specified using the syntax
+<B>[:</B><I>class</I><B>:]</B>, where <I>class</I> is one of the
+following classes defined in the POSIX standard:
+</DL>
+<P>
+
+<DL COMPACT><DT><DD>
+<B>
+</B>
+
+alnum alpha ascii blank cntrl digit graph lower print punct space upper word xdigit
+<BR>
+
+A character class matches any character belonging to that class.
+The <B>word</B> character class matches letters, digits, and the character _.
+<BR>
+
+<P>
+
+
+Within
+<B>[</B>
+
+and
+<B>]</B>,
+
+an <I>equivalence class</I> can be specified using the syntax
+<B>[=</B><I>c</I><B>=]</B>, which matches all characters with the
+same collation weight (as defined by the current locale) as
+the character <I>c</I>.
+<BR>
+
+<P>
+
+
+Within
+<B>[</B>
+
+and
+<B>]</B>,
+
+the syntax <B>[.</B><I>symbol</I><B>.]</B> matches the collating symbol
+<I>symbol</I>.
+</DL>
+
+
+<P>
+
+If the <B>extglob</B> shell option is enabled using the <B>shopt</B>
+builtin, several extended pattern matching operators are recognized.
+In the following description, a <I>pattern-list</I> is a list of one
+or more patterns separated by a <B>|</B>.
+Composite patterns may be formed using one or more of the following
+sub-patterns:
+<P>
+
+<DL COMPACT><DT><DD>
+<DL COMPACT>
+<DT><B>?(</B><I>pattern-list</I><B>)</B><DD>
+Matches zero or one occurrence of the given patterns
+<DT><B>*(</B><I>pattern-list</I><B>)</B><DD>
+Matches zero or more occurrences of the given patterns
+<DT><B>+(</B><I>pattern-list</I><B>)</B><DD>
+Matches one or more occurrences of the given patterns
+<DT><B>@(</B><I>pattern-list</I><B>)</B><DD>
+Matches one of the given patterns
+<DT><B>!(</B><I>pattern-list</I><B>)</B><DD>
+Matches anything except one of the given patterns
+</DL></DL>
+
+
+<A NAME="lbBH">&nbsp;</A>
+<H4>Quote Removal</H4>
+
+<P>
+
+After the preceding expansions, all unquoted occurrences of the
+characters
+<B>\</B>,
+
+<B>aq</B>,
+
+and <B>&quot;</B> that did not result from one of the above
+expansions are removed.
+<A NAME="lbBI">&nbsp;</A>
+<H3>REDIRECTION</H3>
+
+Before a command is executed, its input and output
+may be
+<I>redirected</I>
+
+using a special notation interpreted by the shell.
+Redirection may also be used to open and close files for the
+current shell execution environment. The following redirection
+operators may precede or appear anywhere within a
+<I>simple command</I>
+
+or may follow a
+<I>command</I>.
+
+Redirections are processed in the order they appear, from
+left to right.
+<P>
+
+Each redirection that may be preceded by a file descriptor number
+may instead be preceded by a word of the form {<I>varname</I>}.
+In this case, for each redirection operator except
+&gt;&amp;- and &lt;&amp;-, the shell will allocate a file descriptor greater
+than 10 and assign it to <I>varname</I>. If &gt;&amp;- or &lt;&amp;- is preceded
+by {<I>varname</I>}, the value of <I>varname</I> defines the file
+descriptor to close.
+<P>
+
+In the following descriptions, if the file descriptor number is
+omitted, and the first character of the redirection operator is
+<B>&lt;</B>,
+
+the redirection refers to the standard input (file descriptor
+0). If the first character of the redirection operator is
+<B>&gt;</B>,
+
+the redirection refers to the standard output (file descriptor
+1).
+<P>
+
+The word following the redirection operator in the following
+descriptions, unless otherwise noted, is subjected to brace expansion,
+tilde expansion, parameter expansion, command substitution, arithmetic
+expansion, quote removal, pathname expansion, and word splitting.
+If it expands to more than one word,
+<B>bash</B>
+
+reports an error.
+<P>
+
+Note that the order of redirections is significant. For example,
+the command
+<DL COMPACT><DT><DD>
+<P>
+
+ls <B>&gt;</B> dirlist 2<B>&gt;&amp;</B>1
+</DL>
+
+<P>
+
+directs both standard output and standard error to the file
+<I>dirlist</I>,
+
+while the command
+<DL COMPACT><DT><DD>
+<P>
+
+ls 2<B>&gt;&amp;</B>1 <B>&gt;</B> dirlist
+</DL>
+
+<P>
+
+directs only the standard output to file
+<I>dirlist</I>,
+
+because the standard error was duplicated from the standard output
+before the standard output was redirected to
+<I>dirlist</I>.
+
+<P>
+
+<B>Bash</B> handles several filenames specially when they are used in
+redirections, as described in the following table:
+<DL COMPACT><DT><DD>
+<P>
+
+
+<DL COMPACT>
+<DT><B>/dev/fd/</B><I>fd</I>
+
+<DD>
+If <I>fd</I> is a valid integer, file descriptor <I>fd</I> is duplicated.
+<DT><B>/dev/stdin</B>
+
+<DD>
+File descriptor 0 is duplicated.
+<DT><B>/dev/stdout</B>
+
+<DD>
+File descriptor 1 is duplicated.
+<DT><B>/dev/stderr</B>
+
+<DD>
+File descriptor 2 is duplicated.
+<DT><B>/dev/tcp/</B><I>host</I>/<I>port</I>
+
+<DD>
+If <I>host</I> is a valid hostname or Internet address, and <I>port</I>
+is an integer port number or service name, <B>bash</B> attempts to open
+a TCP connection to the corresponding socket.
+<DT><B>/dev/udp/</B><I>host</I>/<I>port</I>
+
+<DD>
+If <I>host</I> is a valid hostname or Internet address, and <I>port</I>
+is an integer port number or service name, <B>bash</B> attempts to open
+a UDP connection to the corresponding socket.
+
+</DL></DL>
+
+<P>
+
+A failure to open or create a file causes the redirection to fail.
+<P>
+
+Redirections using file descriptors greater than 9 should be used with
+care, as they may conflict with file descriptors the shell uses
+internally.
+<A NAME="lbBJ">&nbsp;</A>
+<H4>Redirecting Input</H4>
+
+<P>
+
+Redirection of input causes the file whose name results from
+the expansion of
+<I>word</I>
+
+to be opened for reading on file descriptor
+<I>n</I>,
+
+or the standard input (file descriptor 0) if
+<I>n</I>
+
+is not specified.
+<P>
+
+The general format for redirecting input is:
+<DL COMPACT><DT><DD>
+<P>
+
+[<I>n</I>]<B>&lt;</B><I>word</I>
+</DL>
+
+<A NAME="lbBK">&nbsp;</A>
+<H4>Redirecting Output</H4>
+
+<P>
+
+Redirection of output causes the file whose name results from
+the expansion of
+<I>word</I>
+
+to be opened for writing on file descriptor
+<I>n</I>,
+
+or the standard output (file descriptor 1) if
+<I>n</I>
+
+is not specified. If the file does not exist it is created;
+if it does exist it is truncated to zero size.
+<P>
+
+The general format for redirecting output is:
+<DL COMPACT><DT><DD>
+<P>
+
+[<I>n</I>]<B>&gt;</B><I>word</I>
+</DL>
+
+<P>
+
+If the redirection operator is
+<B>&gt;</B>,
+
+and the
+<B>noclobber</B>
+
+option to the
+<B>set</B>
+
+builtin has been enabled, the redirection will fail if the file
+whose name results from the expansion of <I>word</I> exists and is
+a regular file.
+If the redirection operator is
+<B>&gt;|</B>,
+
+or the redirection operator is
+<B>&gt;</B>
+
+and the
+<B>noclobber</B>
+
+option to the
+<B>set</B>
+
+builtin command is not enabled, the redirection is attempted even
+if the file named by <I>word</I> exists.
+<A NAME="lbBL">&nbsp;</A>
+<H4>Appending Redirected Output</H4>
+
+<P>
+
+Redirection of output in this fashion
+causes the file whose name results from
+the expansion of
+<I>word</I>
+
+to be opened for appending on file descriptor
+<I>n</I>,
+
+or the standard output (file descriptor 1) if
+<I>n</I>
+
+is not specified. If the file does not exist it is created.
+<P>
+
+The general format for appending output is:
+<DL COMPACT><DT><DD>
+<P>
+
+[<I>n</I>]<B>&gt;&gt;</B><I>word</I>
+</DL>
+
+<P>
+
+<A NAME="lbBM">&nbsp;</A>
+<H4>Redirecting Standard Output and Standard Error</H4>
+
+<P>
+
+This construct allows both the
+standard output (file descriptor 1) and
+the standard error output (file descriptor 2)
+to be redirected to the file whose name is the
+expansion of
+<I>word</I>.
+
+<P>
+
+There are two formats for redirecting standard output and
+standard error:
+<DL COMPACT><DT><DD>
+<P>
+
+<B>&amp;&gt;</B><I>word</I>
+</DL>
+
+and
+<DL COMPACT><DT><DD>
+<B>&gt;&amp;</B><I>word</I>
+</DL>
+
+<P>
+
+Of the two forms, the first is preferred.
+This is semantically equivalent to
+<DL COMPACT><DT><DD>
+<P>
+
+<B>&gt;</B><I>word</I> 2<B>&gt;&amp;</B>1
+</DL>
+
+<P>
+
+<A NAME="lbBN">&nbsp;</A>
+<H4>Appending Standard Output and Standard Error</H4>
+
+<P>
+
+This construct allows both the
+standard output (file descriptor 1) and
+the standard error output (file descriptor 2)
+to be appended to the file whose name is the
+expansion of
+<I>word</I>.
+
+<P>
+
+The format for appending standard output and standard error is:
+<DL COMPACT><DT><DD>
+<P>
+
+<B>&amp;&gt;&gt;</B><I>word</I>
+</DL>
+
+<P>
+
+This is semantically equivalent to
+<DL COMPACT><DT><DD>
+<P>
+
+<B>&gt;&gt;</B><I>word</I> 2<B>&gt;&amp;</B>1
+</DL>
+
+<A NAME="lbBO">&nbsp;</A>
+<H4>Here Documents</H4>
+
+<P>
+
+This type of redirection instructs the shell to read input from the
+current source until a line containing only
+<I>delimiter</I>
+
+(with no trailing blanks)
+is seen. All of
+the lines read up to that point are then used as the standard
+input for a command.
+<P>
+
+The format of here-documents is:
+<DL COMPACT><DT><DD>
+<P>
+
+<PRE>
+<B>&lt;&lt;</B>[<B>-</B>]<I>word</I>
+ <I>here-document</I>
+<I>delimiter</I>
+</PRE>
+
+</DL>
+
+<P>
+
+No parameter expansion, command substitution, arithmetic expansion,
+or pathname expansion is performed on
+<I>word</I>.
+
+If any characters in
+<I>word</I>
+
+are quoted, the
+<I>delimiter</I>
+
+is the result of quote removal on
+<I>word</I>,
+
+and the lines in the here-document are not expanded.
+If <I>word</I> is unquoted,
+all lines of the here-document are subjected to parameter expansion,
+command substitution, and arithmetic expansion. In the latter
+case, the character sequence
+<B>\&lt;newline&gt;</B>
+
+is ignored, and
+<B>\</B>
+
+must be used to quote the characters
+<B>\</B>,
+
+<B>$</B>,
+
+and
+<B>`</B>.
+
+<P>
+
+If the redirection operator is
+<B>&lt;&lt;-</B>,
+
+then all leading tab characters are stripped from input lines and the
+line containing
+<I>delimiter</I>.
+
+This allows
+here-documents within shell scripts to be indented in a
+natural fashion.
+<A NAME="lbBP">&nbsp;</A>
+<H4>Here Strings</H4>
+
+A variant of here documents, the format is:
+<DL COMPACT><DT><DD>
+<P>
+
+<PRE>
+<B>&lt;&lt;&lt;</B><I>word</I>
+</PRE>
+
+</DL>
+
+<P>
+
+The <I>word</I> is expanded and supplied to the command on its standard
+input.
+<A NAME="lbBQ">&nbsp;</A>
+<H4>Duplicating File Descriptors</H4>
+
+<P>
+
+The redirection operator
+<DL COMPACT><DT><DD>
+<P>
+
+[<I>n</I>]<B>&lt;&amp;</B><I>word</I>
+</DL>
+
+<P>
+
+is used to duplicate input file descriptors.
+If
+<I>word</I>
+
+expands to one or more digits, the file descriptor denoted by
+<I>n</I>
+
+is made to be a copy of that file descriptor.
+If the digits in
+<I>word</I>
+
+do not specify a file descriptor open for input, a redirection error occurs.
+If
+<I>word</I>
+
+evaluates to
+<B>-</B>,
+
+file descriptor
+<I>n</I>
+
+is closed. If
+<I>n</I>
+
+is not specified, the standard input (file descriptor 0) is used.
+<P>
+
+The operator
+<DL COMPACT><DT><DD>
+<P>
+
+[<I>n</I>]<B>&gt;&amp;</B><I>word</I>
+</DL>
+
+<P>
+
+is used similarly to duplicate output file descriptors. If
+<I>n</I>
+
+is not specified, the standard output (file descriptor 1) is used.
+If the digits in
+<I>word</I>
+
+do not specify a file descriptor open for output, a redirection error occurs.
+As a special case, if <I>n</I> is omitted, and <I>word</I> does not
+expand to one or more digits, the standard output and standard
+error are redirected as described previously.
+<A NAME="lbBR">&nbsp;</A>
+<H4>Moving File Descriptors</H4>
+
+<P>
+
+The redirection operator
+<DL COMPACT><DT><DD>
+<P>
+
+[<I>n</I>]<B>&lt;&amp;</B><I>digit</I><B>-</B>
+</DL>
+
+<P>
+
+moves the file descriptor <I>digit</I> to file descriptor
+<I>n</I>,
+
+or the standard input (file descriptor 0) if <I>n</I> is not specified.
+<I>digit</I> is closed after being duplicated to <I>n</I>.
+<P>
+
+Similarly, the redirection operator
+<DL COMPACT><DT><DD>
+<P>
+
+[<I>n</I>]<B>&gt;&amp;</B><I>digit</I><B>-</B>
+</DL>
+
+<P>
+
+moves the file descriptor <I>digit</I> to file descriptor
+<I>n</I>,
+
+or the standard output (file descriptor 1) if <I>n</I> is not specified.
+<A NAME="lbBS">&nbsp;</A>
+<H4>Opening File Descriptors for Reading and Writing</H4>
+
+<P>
+
+The redirection operator
+<DL COMPACT><DT><DD>
+<P>
+
+[<I>n</I>]<B>&lt;&gt;</B><I>word</I>
+</DL>
+
+<P>
+
+causes the file whose name is the expansion of
+<I>word</I>
+
+to be opened for both reading and writing on file descriptor
+<I>n</I>,
+
+or on file descriptor 0 if
+<I>n</I>
+
+is not specified. If the file does not exist, it is created.
+<A NAME="lbBT">&nbsp;</A>
+<H3>ALIASES</H3>
+
+<I>Aliases</I> allow a string to be substituted for a word when it is used
+as the first word of a simple command.
+The shell maintains a list of aliases that may be set and unset with the
+<B>alias</B>
+
+and
+<B>unalias</B>
+
+builtin commands (see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below).
+The first word of each simple command, if unquoted,
+is checked to see if it has an
+alias. If so, that word is replaced by the text of the alias.
+The characters <B>/</B>, <B>$</B>, <B>`</B>, and <B>=</B> and
+any of the shell <I>metacharacters</I> or quoting characters
+listed above may not appear in an alias name.
+The replacement text may contain any valid shell input,
+including shell metacharacters.
+The first word of the replacement text is tested
+for aliases, but a word that is identical to an alias being expanded
+is not expanded a second time.
+This means that one may alias
+<B>ls</B>
+
+to
+<B>ls -F</B>,
+
+for instance, and
+<B>bash</B>
+
+does not try to recursively expand the replacement text.
+If the last character of the alias value is a
+<I>blank</I>,
+
+then the next command
+word following the alias is also checked for alias expansion.
+<P>
+
+Aliases are created and listed with the
+<B>alias</B>
+
+command, and removed with the
+<B>unalias</B>
+
+command.
+<P>
+
+There is no mechanism for using arguments in the replacement text.
+If arguments are needed, a shell function should be used (see
+<FONT SIZE=-1><B>FUNCTIONS</B>
+
+</FONT>
+below).
+<P>
+
+Aliases are not expanded when the shell is not interactive, unless
+the
+<B>expand_aliases</B>
+
+shell option is set using
+<B>shopt</B>
+
+(see the description of
+<B>shopt</B>
+
+under
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B></FONT>
+below).
+<P>
+
+The rules concerning the definition and use of aliases are
+somewhat confusing.
+<B>Bash</B>
+
+always reads at least one complete line
+of input before executing any
+of the commands on that line. Aliases are expanded when a
+command is read, not when it is executed. Therefore, an
+alias definition appearing on the same line as another
+command does not take effect until the next line of input is read.
+The commands following the alias definition
+on that line are not affected by the new alias.
+This behavior is also an issue when functions are executed.
+Aliases are expanded when a function definition is read,
+not when the function is executed, because a function definition
+is itself a compound command. As a consequence, aliases
+defined in a function are not available until after that
+function is executed. To be safe, always put
+alias definitions on a separate line, and do not use
+<B>alias</B>
+
+in compound commands.
+<P>
+
+For almost every purpose, aliases are superseded by
+shell functions.
+<A NAME="lbBU">&nbsp;</A>
+<H3>FUNCTIONS</H3>
+
+A shell function, defined as described above under
+<FONT SIZE=-1><B>SHELL GRAMMAR</B>,
+
+</FONT>
+stores a series of commands for later execution.
+When the name of a shell function is used as a simple command name,
+the list of commands associated with that function name is executed.
+Functions are executed in the context of the
+current shell; no new process is created to interpret
+them (contrast this with the execution of a shell script).
+When a function is executed, the arguments to the
+function become the positional parameters
+during its execution.
+The special parameter
+<B>#</B>
+
+is updated to reflect the change. Special parameter 0
+is unchanged.
+The first element of the
+<FONT SIZE=-1><B>FUNCNAME</B>
+
+</FONT>
+variable is set to the name of the function while the function
+is executing.
+<P>
+
+All other aspects of the shell execution
+environment are identical between a function and its caller
+with these exceptions: the
+<FONT SIZE=-1><B>DEBUG</B>
+
+</FONT>
+and
+<B>RETURN</B>
+
+traps (see the description of the
+<B>trap</B>
+
+builtin under
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below) are not inherited unless the function has been given the
+<B>trace</B> attribute (see the description of the
+<FONT SIZE=-1><B>declare</B>
+
+</FONT>
+builtin below) or the
+<B>-o functrace</B> shell option has been enabled with
+the <B>set</B> builtin
+(in which case all functions inherit the <B>DEBUG</B> and <B>RETURN</B> traps),
+and the
+<FONT SIZE=-1><B>ERR</B>
+
+</FONT>
+trap is not inherited unless the <B>-o errtrace</B> shell option has
+been enabled.
+<P>
+
+Variables local to the function may be declared with the
+<B>local</B>
+
+builtin command. Ordinarily, variables and their values
+are shared between the function and its caller.
+<P>
+
+If the builtin command
+<B>return</B>
+
+is executed in a function, the function completes and
+execution resumes with the next command after the function
+call.
+Any command associated with the <B>RETURN</B> trap is executed
+before execution resumes.
+When a function completes, the values of the
+positional parameters and the special parameter
+<B>#</B>
+
+are restored to the values they had prior to the function's
+execution.
+<P>
+
+Function names and definitions may be listed with the
+<B>-f</B>
+
+option to the
+<B>declare</B>
+
+or
+<B>typeset</B>
+
+builtin commands. The
+<B>-F</B>
+
+option to
+<B>declare</B>
+
+or
+<B>typeset</B>
+
+will list the function names only
+(and optionally the source file and line number, if the <B>extdebug</B>
+shell option is enabled).
+Functions may be exported so that subshells
+automatically have them defined with the
+<B>-f</B>
+
+option to the
+<B>export</B>
+
+builtin.
+A function definition may be deleted using the <B>-f</B> option to
+the
+<B>unset</B>
+
+builtin.
+Note that shell functions and variables with the same name may result
+in multiple identically-named entries in the environment passed to the
+shell's children.
+Care should be taken in cases where this may cause a problem.
+<P>
+
+Functions may be recursive. No limit is imposed on the number
+of recursive calls.
+<A NAME="lbBV">&nbsp;</A>
+<H3>ARITHMETIC EVALUATION</H3>
+
+The shell allows arithmetic expressions to be evaluated, under
+certain circumstances (see the <B>let</B> and <B>declare</B> builtin
+commands and <B>Arithmetic Expansion</B>).
+Evaluation is done in fixed-width integers with no check for overflow,
+though division by 0 is trapped and flagged as an error.
+The operators and their precedence, associativity, and values
+are the same as in the C language.
+The following list of operators is grouped into levels of
+equal-precedence operators.
+The levels are listed in order of decreasing precedence.
+<P>
+
+
+<DL COMPACT>
+<DT><B></B><I>id</I>++ <I>id</I>--
+
+<DD>
+variable post-increment and post-decrement
+<DT><B>++</B><I>id</I> --<I>id</I>
+
+<DD>
+variable pre-increment and pre-decrement
+<DT><B>- +</B>
+
+<DD>
+unary minus and plus
+<DT><B>! ~</B>
+
+<DD>
+logical and bitwise negation
+<DT><B>**</B>
+
+<DD>
+exponentiation
+<DT><B>* / %</B>
+
+<DD>
+multiplication, division, remainder
+<DT><B>+ -</B>
+
+<DD>
+addition, subtraction
+<DT><B>&lt;&lt; &gt;&gt;</B>
+
+<DD>
+left and right bitwise shifts
+<DT><B>&lt;= &gt;= &lt; &gt;</B>
+
+<DD>
+comparison
+<DT><B>== !=</B>
+
+<DD>
+equality and inequality
+<DT><B>&amp;</B>
+
+<DD>
+bitwise AND
+<DT><B>^</B>
+
+<DD>
+bitwise exclusive OR
+<DT><B>|</B>
+
+<DD>
+bitwise OR
+<DT><B>&amp;&amp;</B>
+
+<DD>
+logical AND
+<DT><B>||</B>
+
+<DD>
+logical OR
+<DT><B></B><I>expr</I>?<I>expr</I>:<I>expr</I>
+
+<DD>
+conditional operator
+<DT><B>= *= /= %= += -= &lt;&lt;= &gt;&gt;= &amp;= ^= |=</B>
+
+<DD>
+assignment
+<DT><B></B><I>expr1</I> , <I>expr2</I>
+
+<DD>
+comma
+
+</DL>
+<P>
+
+Shell variables are allowed as operands; parameter expansion is
+performed before the expression is evaluated.
+Within an expression, shell variables may also be referenced by name
+without using the parameter expansion syntax.
+A shell variable that is null or unset evaluates to 0 when referenced
+by name without using the parameter expansion syntax.
+The value of a variable is evaluated as an arithmetic expression
+when it is referenced, or when a variable which has been given the
+<I>integer</I> attribute using <B>declare -i</B> is assigned a value.
+A null value evaluates to 0.
+A shell variable need not have its integer attribute
+turned on to be used in an expression.
+<P>
+
+Constants with a leading 0 are interpreted as octal numbers.
+A leading 0x or 0X denotes hexadecimal.
+Otherwise, numbers take the form [<I>base#</I>]n, where <I>base</I>
+is a decimal number between 2 and 64 representing the arithmetic
+base, and <I>n</I> is a number in that base.
+If <I>base#</I> is omitted, then base 10 is used.
+The digits greater than 9 are represented by the lowercase letters,
+the uppercase letters, @, and _, in that order.
+If <I>base</I> is less than or equal to 36, lowercase and uppercase
+letters may be used interchangeably to represent numbers between 10
+and 35.
+<P>
+
+Operators are evaluated in order of precedence. Sub-expressions in
+parentheses are evaluated first and may override the precedence
+rules above.
+<A NAME="lbBW">&nbsp;</A>
+<H3>CONDITIONAL EXPRESSIONS</H3>
+
+Conditional expressions are used by the <B>[[</B> compound command and
+the <B>test</B> and <B>[</B> builtin commands to test file attributes
+and perform string and arithmetic comparisons.
+Expressions are formed from the following unary or binary primaries.
+If any <I>file</I> argument to one of the primaries is of the form
+<I>/dev/fd/n</I>, then file descriptor <I>n</I> is checked.
+If the <I>file</I> argument to one of the primaries is one of
+<I>/dev/stdin</I>, <I>/dev/stdout</I>, or <I>/dev/stderr</I>, file
+descriptor 0, 1, or 2, respectively, is checked.
+<P>
+
+Unless otherwise specified, primaries that operate on files follow symbolic
+links and operate on the target of the link, rather than the link itself.
+<P>
+
+
+When used with <B>[[</B>, The <B>&lt;</B> and <B>&gt;</B> operators sort
+lexicographically using the current locale.
+<P>
+
+<DL COMPACT>
+<DT><B>-a </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists.
+<DT><B>-b </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and is a block special file.
+<DT><B>-c </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and is a character special file.
+<DT><B>-d </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and is a directory.
+<DT><B>-e </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists.
+<DT><B>-f </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and is a regular file.
+<DT><B>-g </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and is set-group-id.
+<DT><B>-h </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and is a symbolic link.
+<DT><B>-k </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and its ``sticky'' bit is set.
+<DT><B>-p </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and is a named pipe (FIFO).
+<DT><B>-r </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and is readable.
+<DT><B>-s </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and has a size greater than zero.
+<DT><B>-t </B><I>fd</I>
+
+<DD>
+True if file descriptor
+<I>fd</I>
+
+is open and refers to a terminal.
+<DT><B>-u </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and its set-user-id bit is set.
+<DT><B>-w </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and is writable.
+<DT><B>-x </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and is executable.
+<DT><B>-O </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and is owned by the effective user id.
+<DT><B>-G </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and is owned by the effective group id.
+<DT><B>-L </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and is a symbolic link.
+<DT><B>-S </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and is a socket.
+<DT><B>-N </B><I>file</I>
+
+<DD>
+True if <I>file</I> exists and has been modified since it was last read.
+<DT><I>file1</I> -<B>nt</B> <I>file2</I><DD>
+True if <I>file1</I> is newer (according to modification date) than <I>file2</I>,
+or if <I>file1</I> exists and file2 does not.
+<DT><I>file1</I> -<B>ot</B> <I>file2</I><DD>
+True if <I>file1</I> is older than <I>file2</I>, or if <I>file2</I> exists
+and <I>file1</I> does not.
+<DT><I>file1</I> <B>-ef</B> <I>file2</I><DD>
+True if <I>file1</I> and <I>file2</I> refer to the same device and
+inode numbers.
+<DT><B>-o </B><I>optname</I>
+
+<DD>
+True if shell option
+<I>optname</I>
+
+is enabled.
+See the list of options under the description of the
+<B>-o</B>
+
+option to the
+<B>set</B>
+
+builtin below.
+<DT><B>-z </B><I>string</I>
+
+<DD>
+True if the length of <I>string</I> is zero.
+<DT><I>string</I><DD>
+
+<DT><B>-n </B><I>string</I>
+
+<DD>
+
+True if the length of
+<I>string</I>
+
+is non-zero.
+<DT><I>string1</I> <B>==</B> <I>string2</I><DD>
+
+<DT><I>string1</I> <B>=</B> <I>string2</I><DD>
+
+True if the strings are equal. <B>=</B> should be used
+with the <B>test</B> command for POSIX conformance.
+<DT><I>string1</I> <B>!=</B> <I>string2</I><DD>
+True if the strings are not equal.
+<DT><I>string1</I> <B>&lt;</B> <I>string2</I><DD>
+True if <I>string1</I> sorts before <I>string2</I> lexicographically.
+<DT><I>string1</I> <B>&gt;</B> <I>string2</I><DD>
+True if <I>string1</I> sorts after <I>string2</I> lexicographically.
+<DT><I>arg1</I> <B>OP</B> <I>arg2</I>
+
+<DD>
+<FONT SIZE=-1><B>OP</B>
+
+</FONT>
+is one of
+<B>-eq</B>,
+
+<B>-ne</B>,
+
+<B>-lt</B>,
+
+<B>-le</B>,
+
+<B>-gt</B>,
+
+or
+<B>-ge</B>.
+
+These arithmetic binary operators return true if <I>arg1</I>
+is equal to, not equal to, less than, less than or equal to,
+greater than, or greater than or equal to <I>arg2</I>, respectively.
+<I>Arg1</I>
+
+and
+<I>arg2</I>
+
+may be positive or negative integers.
+
+</DL>
+<A NAME="lbBX">&nbsp;</A>
+<H3>SIMPLE COMMAND EXPANSION</H3>
+
+When a simple command is executed, the shell performs the following
+expansions, assignments, and redirections, from left to right.
+<DL COMPACT>
+<DT>1.<DD>
+The words that the parser has marked as variable assignments (those
+preceding the command name) and redirections are saved for later
+processing.
+<DT>2.<DD>
+The words that are not variable assignments or redirections are
+expanded. If any words remain after expansion, the first word
+is taken to be the name of the command and the remaining words are
+the arguments.
+<DT>3.<DD>
+Redirections are performed as described above under
+<FONT SIZE=-1><B>REDIRECTION</B>.
+
+</FONT>
+<DT>4.<DD>
+The text after the <B>=</B> in each variable assignment undergoes tilde
+expansion, parameter expansion, command substitution, arithmetic expansion,
+and quote removal before being assigned to the variable.
+</DL>
+<P>
+
+If no command name results, the variable assignments affect the current
+shell environment. Otherwise, the variables are added to the environment
+of the executed command and do not affect the current shell environment.
+If any of the assignments attempts to assign a value to a readonly variable,
+an error occurs, and the command exits with a non-zero status.
+<P>
+
+If no command name results, redirections are performed, but do not
+affect the current shell environment. A redirection error causes the
+command to exit with a non-zero status.
+<P>
+
+If there is a command name left after expansion, execution proceeds as
+described below. Otherwise, the command exits. If one of the expansions
+contained a command substitution, the exit status of the command is
+the exit status of the last command substitution performed. If there
+were no command substitutions, the command exits with a status of zero.
+<A NAME="lbBY">&nbsp;</A>
+<H3>COMMAND EXECUTION</H3>
+
+After a command has been split into words, if it results in a
+simple command and an optional list of arguments, the following
+actions are taken.
+<P>
+
+If the command name contains no slashes, the shell attempts to
+locate it. If there exists a shell function by that name, that
+function is invoked as described above in
+<FONT SIZE=-1><B>FUNCTIONS</B>.
+
+</FONT>
+If the name does not match a function, the shell searches for
+it in the list of shell builtins. If a match is found, that
+builtin is invoked.
+<P>
+
+If the name is neither a shell function nor a builtin,
+and contains no slashes,
+<B>bash</B>
+
+searches each element of the
+<FONT SIZE=-1><B>PATH</B>
+
+</FONT>
+for a directory containing an executable file by that name.
+<B>Bash</B>
+
+uses a hash table to remember the full pathnames of executable
+files (see
+<B>hash</B>
+
+under
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below).
+A full search of the directories in
+<FONT SIZE=-1><B>PATH</B>
+
+</FONT>
+is performed only if the command is not found in the hash table.
+If the search is unsuccessful, the shell searches for a defined shell
+function named <B>command_not_found_handle</B>.
+If that function exists, it is invoked with the original command and
+the original command's arguments as its arguments, and the function's
+exit status becomes the exit status of the shell.
+If that function is not defined, the shell prints an error
+message and returns an exit status of 127.
+<P>
+
+If the search is successful, or if the command name contains
+one or more slashes, the shell executes the named program in a
+separate execution environment.
+Argument 0 is set to the name given, and the remaining arguments
+to the command are set to the arguments given, if any.
+<P>
+
+If this execution fails because the file is not in executable
+format, and the file is not a directory, it is assumed to be
+a <I>shell script</I>, a file
+containing shell commands. A subshell is spawned to execute
+it. This subshell reinitializes itself, so
+that the effect is as if a new shell had been invoked
+to handle the script, with the exception that the locations of
+commands remembered by the parent (see
+<B>hash</B>
+
+below under
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>)</FONT>
+are retained by the child.
+<P>
+
+If the program is a file beginning with
+<B>#!</B>,
+
+the remainder of the first line specifies an interpreter
+for the program. The shell executes the
+specified interpreter on operating systems that do not
+handle this executable format themselves. The arguments to the
+interpreter consist of a single optional argument following the
+interpreter name on the first line of the program, followed
+by the name of the program, followed by the command
+arguments, if any.
+<A NAME="lbBZ">&nbsp;</A>
+<H3>COMMAND EXECUTION ENVIRONMENT</H3>
+
+The shell has an <I>execution environment</I>, which consists of the
+following:
+
+<DL COMPACT>
+<DT>*<DD>
+open files inherited by the shell at invocation, as modified by
+redirections supplied to the <B>exec</B> builtin
+<DT>*<DD>
+the current working directory as set by <B>cd</B>, <B>pushd</B>, or
+<B>popd</B>, or inherited by the shell at invocation
+<DT>*<DD>
+the file creation mode mask as set by <B>umask</B> or inherited from
+the shell's parent
+<DT>*<DD>
+current traps set by <B>trap</B>
+<DT>*<DD>
+shell parameters that are set by variable assignment or with <B>set</B>
+or inherited from the shell's parent in the environment
+<DT>*<DD>
+shell functions defined during execution or inherited from the shell's
+parent in the environment
+<DT>*<DD>
+options enabled at invocation (either by default or with command-line
+arguments) or by <B>set</B>
+<DT>*<DD>
+options enabled by <B>shopt</B>
+<DT>*<DD>
+shell aliases defined with <B>alias</B>
+<DT>*<DD>
+various process IDs, including those of background jobs, the value
+of <B>$$</B>, and the value of
+<FONT SIZE=-1><B>PPID</B>
+
+</FONT>
+</DL>
+<P>
+
+When a simple command other than a builtin or shell function
+is to be executed, it
+is invoked in a separate execution environment that consists of
+the following. Unless otherwise noted, the values are inherited
+from the shell.
+
+<DL COMPACT>
+<DT>*<DD>
+the shell's open files, plus any modifications and additions specified
+by redirections to the command
+<DT>*<DD>
+the current working directory
+<DT>*<DD>
+the file creation mode mask
+<DT>*<DD>
+shell variables and functions marked for export, along with variables
+exported for the command, passed in the environment
+<DT>*<DD>
+traps caught by the shell are reset to the values inherited from the
+shell's parent, and traps ignored by the shell are ignored
+</DL>
+<P>
+
+A command invoked in this separate environment cannot affect the
+shell's execution environment.
+<P>
+
+Command substitution, commands grouped with parentheses,
+and asynchronous commands are invoked in a
+subshell environment that is a duplicate of the shell environment,
+except that traps caught by the shell are reset to the values
+that the shell inherited from its parent at invocation. Builtin
+commands that are invoked as part of a pipeline are also executed in a
+subshell environment. Changes made to the subshell environment
+cannot affect the shell's execution environment.
+<P>
+
+Subshells spawned to execute command substitutions inherit the value of
+the <B>-e</B> option from the parent shell. When not in posix mode,
+Bash clears the <B>-e</B> option in such subshells.
+<P>
+
+If a command is followed by a <B>&amp;</B> and job control is not active, the
+default standard input for the command is the empty file <I>/dev/null</I>.
+Otherwise, the invoked command inherits the file descriptors of the calling
+shell as modified by redirections.
+<A NAME="lbCA">&nbsp;</A>
+<H3>ENVIRONMENT</H3>
+
+When a program is invoked it is given an array of strings
+called the
+<I>environment</I>.
+
+This is a list of
+<I>name</I>-<I>value</I> pairs, of the form
+<I>name</I>=value.
+
+<P>
+
+The shell provides several ways to manipulate the environment.
+On invocation, the shell scans its own environment and
+creates a parameter for each name found, automatically marking
+it for
+<I>export</I>
+
+to child processes. Executed commands inherit the environment.
+The
+<B>export</B>
+
+and
+<B>declare -x</B>
+
+commands allow parameters and functions to be added to and
+deleted from the environment. If the value of a parameter
+in the environment is modified, the new value becomes part
+of the environment, replacing the old. The environment
+inherited by any executed command consists of the shell's
+initial environment, whose values may be modified in the shell,
+less any pairs removed by the
+<B>unset</B>
+
+command, plus any additions via the
+<B>export</B>
+
+and
+<B>declare -x</B>
+
+commands.
+<P>
+
+The environment for any
+<I>simple command</I>
+
+or function may be augmented temporarily by prefixing it with
+parameter assignments, as described above in
+<FONT SIZE=-1><B>PARAMETERS</B>.
+
+</FONT>
+These assignment statements affect only the environment seen
+by that command.
+<P>
+
+If the
+<B>-k</B>
+
+option is set (see the
+<B>set</B>
+
+builtin command below), then
+<I>all</I>
+
+parameter assignments are placed in the environment for a command,
+not just those that precede the command name.
+<P>
+
+When
+<B>bash</B>
+
+invokes an external command, the variable
+<B>_</B>
+
+is set to the full file name of the command and passed to that
+command in its environment.
+<A NAME="lbCB">&nbsp;</A>
+<H3>EXIT STATUS</H3>
+
+<P>
+
+The exit status of an executed command is the value returned by the
+<I>waitpid</I> system call or equivalent function. Exit statuses
+fall between 0 and 255, though, as explained below, the shell may
+use values above 125 specially. Exit statuses from shell builtins and
+compound commands are also limited to this range. Under certain
+circumstances, the shell will use special values to indicate specific
+failure modes.
+<P>
+
+For the shell's purposes, a command which exits with a
+zero exit status has succeeded. An exit status of zero
+indicates success. A non-zero exit status indicates failure.
+When a command terminates on a fatal signal <I>N</I>, <B>bash</B> uses
+the value of 128+<I>N</I> as the exit status.
+<P>
+
+If a command is not found, the child process created to
+execute it returns a status of 127. If a command is found
+but is not executable, the return status is 126.
+<P>
+
+If a command fails because of an error during expansion or redirection,
+the exit status is greater than zero.
+<P>
+
+Shell builtin commands return a status of 0 (<I>true</I>) if
+successful, and non-zero (<I>false</I>) if an error occurs
+while they execute.
+All builtins return an exit status of 2 to indicate incorrect usage.
+<P>
+
+<B>Bash</B> itself returns the exit status of the last command
+executed, unless a syntax error occurs, in which case it exits
+with a non-zero value. See also the <B>exit</B> builtin
+command below.
+<A NAME="lbCC">&nbsp;</A>
+<H3>SIGNALS</H3>
+
+When <B>bash</B> is interactive, in the absence of any traps, it ignores
+<FONT SIZE=-1><B>SIGTERM</B>
+
+</FONT>
+(so that <B>kill 0</B> does not kill an interactive shell),
+and
+<FONT SIZE=-1><B>SIGINT</B>
+
+</FONT>
+is caught and handled (so that the <B>wait</B> builtin is interruptible).
+In all cases, <B>bash</B> ignores
+<FONT SIZE=-1><B>SIGQUIT</B>.
+
+</FONT>
+If job control is in effect,
+<B>bash</B>
+
+ignores
+<FONT SIZE=-1><B>SIGTTIN</B>,
+
+</FONT>
+<FONT SIZE=-1><B>SIGTTOU</B>,
+
+</FONT>
+and
+<FONT SIZE=-1><B>SIGTSTP</B>.
+
+</FONT>
+<P>
+
+Non-builtin commands run by <B>bash</B> have signal handlers
+set to the values inherited by the shell from its parent.
+When job control is not in effect, asynchronous commands
+ignore
+<FONT SIZE=-1><B>SIGINT</B>
+
+</FONT>
+and
+<FONT SIZE=-1><B>SIGQUIT</B>
+
+</FONT>
+in addition to these inherited handlers.
+Commands run as a result of command substitution ignore the
+keyboard-generated job control signals
+<FONT SIZE=-1><B>SIGTTIN</B>,
+
+</FONT>
+<FONT SIZE=-1><B>SIGTTOU</B>,
+
+</FONT>
+and
+<FONT SIZE=-1><B>SIGTSTP</B>.
+
+</FONT>
+<P>
+
+The shell exits by default upon receipt of a
+<FONT SIZE=-1><B>SIGHUP</B>.
+
+</FONT>
+Before exiting, an interactive shell resends the
+<FONT SIZE=-1><B>SIGHUP</B>
+
+</FONT>
+to all jobs, running or stopped.
+Stopped jobs are sent
+<FONT SIZE=-1><B>SIGCONT</B>
+
+</FONT>
+to ensure that they receive the
+<FONT SIZE=-1><B>SIGHUP</B>.
+
+</FONT>
+To prevent the shell from
+sending the signal to a particular job, it should be removed from the
+jobs table with the
+<B>disown</B>
+
+builtin (see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below) or marked
+to not receive
+<FONT SIZE=-1><B>SIGHUP</B>
+
+</FONT>
+using
+<B>disown -h</B>.
+
+<P>
+
+If the
+<B>huponexit</B>
+
+shell option has been set with
+<B>shopt</B>,
+
+<B>bash</B>
+
+sends a
+<FONT SIZE=-1><B>SIGHUP</B>
+
+</FONT>
+to all jobs when an interactive login shell exits.
+<P>
+
+If <B>bash</B> is waiting for a command to complete and receives a signal
+for which a trap has been set, the trap will not be executed until
+the command completes.
+When <B>bash</B> is waiting for an asynchronous command via the <B>wait</B>
+builtin, the reception of a signal for which a trap has been set will
+cause the <B>wait</B> builtin to return immediately with an exit status
+greater than 128, immediately after which the trap is executed.
+<A NAME="lbCD">&nbsp;</A>
+<H3>JOB CONTROL</H3>
+
+<I>Job control</I>
+
+refers to the ability to selectively stop (<I>suspend</I>)
+the execution of processes and continue (<I>resume</I>)
+their execution at a later point. A user typically employs
+this facility via an interactive interface supplied jointly
+by the operating system kernel's terminal driver and
+<B>bash</B>.
+
+<P>
+
+The shell associates a
+<I>job</I>
+
+with each pipeline. It keeps a table of currently executing
+jobs, which may be listed with the
+<B>jobs</B>
+
+command. When
+<B>bash</B>
+
+starts a job asynchronously (in the
+<I>background</I>),
+
+it prints a line that looks like:
+<DL COMPACT><DT><DD>
+<P>
+
+[1] 25647
+</DL>
+
+<P>
+
+indicating that this job is job number 1 and that the process ID
+of the last process in the pipeline associated with this job is 25647.
+All of the processes in a single pipeline are members of the same job.
+<B>Bash</B>
+
+uses the
+<I>job</I>
+
+abstraction as the basis for job control.
+<P>
+
+To facilitate the implementation of the user interface to job
+control, the operating system maintains the notion of a <I>current terminal
+process group ID</I>. Members of this process group (processes whose
+process group ID is equal to the current terminal process group ID)
+receive keyboard-generated signals such as
+<FONT SIZE=-1><B>SIGINT</B>.
+
+</FONT>
+These processes are said to be in the
+<I>foreground</I>.
+
+<I>Background</I>
+
+processes are those whose process group ID differs from the terminal's;
+such processes are immune to keyboard-generated signals.
+Only foreground processes are allowed to read from or, if the
+user so specifies with <TT>stty tostop</TT>, write to the
+terminal.
+Background processes which attempt to read from (write to when
+<TT>stty tostop</TT> is in effect) the
+terminal are sent a
+<FONT SIZE=-1><B>SIGTTIN (SIGTTOU)</B>
+
+</FONT>
+signal by the kernel's terminal driver,
+which, unless caught, suspends the process.
+<P>
+
+If the operating system on which
+<B>bash</B>
+
+is running supports
+job control,
+<B>bash</B>
+
+contains facilities to use it.
+Typing the
+<I>suspend</I>
+
+character (typically
+<B>^Z</B>,
+
+Control-Z) while a process is running
+causes that process to be stopped and returns control to
+<B>bash</B>.
+
+Typing the
+<I>delayed suspend</I>
+
+character (typically
+<B>^Y</B>,
+
+Control-Y) causes the process to be stopped when it
+attempts to read input from the terminal, and control to
+be returned to
+<B>bash</B>.
+
+The user may then manipulate the state of this job, using the
+<B>bg</B>
+
+command to continue it in the background, the
+<B>fg</B>
+
+command to continue it in the foreground, or
+the
+<B>kill</B>
+
+command to kill it. A <B>^Z</B> takes effect immediately,
+and has the additional side effect of causing pending output
+and typeahead to be discarded.
+<P>
+
+There are a number of ways to refer to a job in the shell.
+The character
+<B>%</B>
+
+introduces a job specification (<I>jobspec</I>). Job number
+<I>n</I>
+
+may be referred to as
+<B>%n</B>.
+
+A job may also be referred to using a prefix of the name used to
+start it, or using a substring that appears in its command line.
+For example,
+<B>%ce</B>
+
+refers to a stopped
+<B>ce</B>
+
+job. If a prefix matches more than one job,
+<B>bash</B>
+
+reports an error. Using
+<B>%?ce</B>,
+
+on the other hand, refers to any job containing the string
+<B>ce</B>
+
+in its command line. If the substring matches more than one job,
+<B>bash</B>
+
+reports an error. The symbols
+<B>%%</B>
+
+and
+<B>%+</B>
+
+refer to the shell's notion of the
+<I>current job</I>,
+
+which is the last job stopped while it was in
+the foreground or started in the background.
+The
+<I>previous job</I>
+
+may be referenced using
+<B>%-</B>.
+
+If there is only a single job, <B>%+</B> and <B>%-</B> can both be used
+to refer to that job.
+In output pertaining to jobs (e.g., the output of the
+<B>jobs</B>
+
+command), the current job is always flagged with a
+<B>+</B>,
+
+and the previous job with a
+<B>-</B>.
+
+A single % (with no accompanying job specification) also refers to the
+current job.
+<P>
+
+Simply naming a job can be used to bring it into the
+foreground:
+<B>%1</B>
+
+is a synonym for
+<B>``fg %1''</B>,
+bringing job 1 from the background into the foreground.
+Similarly,
+<B>``%1 &amp;''</B>
+
+resumes job 1 in the background, equivalent to
+<B>``bg %1''</B>.
+<P>
+
+The shell learns immediately whenever a job changes state.
+Normally,
+<B>bash</B>
+
+waits until it is about to print a prompt before reporting
+changes in a job's status so as to not interrupt
+any other output. If the
+<B>-b</B>
+
+option to the
+<B>set</B>
+
+builtin command
+is enabled,
+<B>bash</B>
+
+reports such changes immediately.
+Any trap on
+<FONT SIZE=-1><B>SIGCHLD</B>
+
+</FONT>
+is executed for each child that exits.
+<P>
+
+If an attempt to exit
+<B>bash</B>
+
+is made while jobs are stopped (or, if the <B>checkjobs</B> shell option has
+been enabled using the <B>shopt</B> builtin, running), the shell prints a
+warning message, and, if the <B>checkjobs</B> option is enabled, lists the
+jobs and their statuses.
+The
+<B>jobs</B>
+
+command may then be used to inspect their status.
+If a second attempt to exit is made without an intervening command,
+the shell does not print another warning, and any stopped
+jobs are terminated.
+<A NAME="lbCE">&nbsp;</A>
+<H3>PROMPTING</H3>
+
+When executing interactively,
+<B>bash</B>
+
+displays the primary prompt
+<FONT SIZE=-1><B>PS1</B>
+
+</FONT>
+when it is ready to read a command, and the secondary prompt
+<FONT SIZE=-1><B>PS2</B>
+
+</FONT>
+when it needs more input to complete a command.
+<B>Bash</B>
+
+allows these prompt strings to be customized by inserting a number of
+backslash-escaped special characters that are decoded as follows:
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>\a</B>
+
+<DD>
+an ASCII bell character (07)
+<DT><B>\d</B>
+
+<DD>
+the date in &quot;Weekday Month Date&quot; format (e.g., &quot;Tue May 26&quot;)
+<DT><B>\D{</B><I>format</I>}
+
+<DD>
+the <I>format</I> is passed to <I>strftime</I>(3) and the result is inserted
+into the prompt string; an empty <I>format</I> results in a locale-specific
+time representation. The braces are required
+<DT><B>\e</B>
+
+<DD>
+an ASCII escape character (033)
+<DT><B>\h</B>
+
+<DD>
+the hostname up to the first `.'
+<DT><B>\H</B>
+
+<DD>
+the hostname
+<DT><B>\j</B>
+
+<DD>
+the number of jobs currently managed by the shell
+<DT><B>\l</B>
+
+<DD>
+the basename of the shell's terminal device name
+<DT><B>\n</B>
+
+<DD>
+newline
+<DT><B>\r</B>
+
+<DD>
+carriage return
+<DT><B>\s</B>
+
+<DD>
+the name of the shell, the basename of
+<B>$0</B>
+
+(the portion following the final slash)
+<DT><B>\t</B>
+
+<DD>
+the current time in 24-hour HH:MM:SS format
+<DT><B>\T</B>
+
+<DD>
+the current time in 12-hour HH:MM:SS format
+<DT><B>\@</B>
+
+<DD>
+the current time in 12-hour am/pm format
+<DT><B>\A</B>
+
+<DD>
+the current time in 24-hour HH:MM format
+<DT><B>\u</B>
+
+<DD>
+the username of the current user
+<DT><B>\v</B>
+
+<DD>
+the version of <B>bash</B> (e.g., 2.00)
+<DT><B>\V</B>
+
+<DD>
+the release of <B>bash</B>, version + patch level (e.g., 2.00.0)
+<DT><B>\w</B>
+
+<DD>
+the current working directory, with
+<FONT SIZE=-1><B>$HOME</B>
+
+</FONT>
+abbreviated with a tilde
+(uses the value of the
+<FONT SIZE=-1><B>PROMPT_DIRTRIM</B>
+
+</FONT>
+variable)
+<DT><B>\W</B>
+
+<DD>
+the basename of the current working directory, with
+<FONT SIZE=-1><B>$HOME</B>
+
+</FONT>
+abbreviated with a tilde
+<DT><B>\!</B>
+
+<DD>
+the history number of this command
+<DT><B>\#</B>
+
+<DD>
+the command number of this command
+<DT><B>\$</B>
+
+<DD>
+if the effective UID is 0, a
+<B>#</B>,
+
+otherwise a
+<B>$</B>
+
+<DT><B>\</B><I>nnn</I>
+
+<DD>
+the character corresponding to the octal number <I>nnn</I>
+<DT><B>\\</B>
+
+<DD>
+a backslash
+<DT><B>\[</B>
+
+<DD>
+begin a sequence of non-printing characters, which could be used to
+embed a terminal control sequence into the prompt
+<DT><B>\]</B>
+
+<DD>
+end a sequence of non-printing characters
+
+</DL></DL>
+
+<P>
+
+The command number and the history number are usually different:
+the history number of a command is its position in the history
+list, which may include commands restored from the history file
+(see
+<FONT SIZE=-1><B>HISTORY</B>
+
+</FONT>
+below), while the command number is the position in the sequence
+of commands executed during the current shell session.
+After the string is decoded, it is expanded via
+parameter expansion, command substitution, arithmetic
+expansion, and quote removal, subject to the value of the
+<B>promptvars</B>
+
+shell option (see the description of the
+<B>shopt</B>
+
+command under
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below).
+<A NAME="lbCF">&nbsp;</A>
+<H3>READLINE</H3>
+
+This is the library that handles reading input when using an interactive
+shell, unless the
+<B>--noediting</B>
+
+option is given at shell invocation.
+Line editing is also used when using the <B>-e</B> option to the
+<B>read</B> builtin.
+By default, the line editing commands are similar to those of emacs.
+A vi-style line editing interface is also available.
+Line editing can be enabled at any time using the
+<B>-o emacs</B>
+
+or
+<B>-o vi</B>
+
+options to the
+<B>set</B>
+
+builtin (see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below).
+To turn off line editing after the shell is running, use the
+<B>+o emacs</B>
+
+or
+<B>+o vi</B>
+
+options to the
+<B>set</B>
+
+builtin.
+<A NAME="lbCG">&nbsp;</A>
+<H4>Readline Notation</H4>
+
+<P>
+
+In this section, the emacs-style notation is used to denote
+keystrokes. Control keys are denoted by C-<I>key</I>, e.g., C-n
+means Control-N. Similarly,
+<I>meta</I>
+
+keys are denoted by M-<I>key</I>, so M-x means Meta-X. (On keyboards
+without a
+<I>meta</I>
+
+key, M-<I>x</I> means ESC <I>x</I>, i.e., press the Escape key
+then the
+<I>x</I>
+
+key. This makes ESC the <I>meta prefix</I>.
+The combination M-C-<I>x</I> means ESC-Control-<I>x</I>,
+or press the Escape key
+then hold the Control key while pressing the
+<I>x</I>
+
+key.)
+<P>
+
+Readline commands may be given numeric
+<I>arguments</I>,
+
+which normally act as a repeat count.
+Sometimes, however, it is the sign of the argument that is significant.
+Passing a negative argument to a command that acts in the forward
+direction (e.g., <B>kill-line</B>) causes that command to act in a
+backward direction.
+Commands whose behavior with arguments deviates from this are noted
+below.
+<P>
+
+When a command is described as <I>killing</I> text, the text
+deleted is saved for possible future retrieval
+(<I>yanking</I>). The killed text is saved in a
+<I>kill ring</I>. Consecutive kills cause the text to be
+accumulated into one unit, which can be yanked all at once.
+Commands which do not kill text separate the chunks of text
+on the kill ring.
+<A NAME="lbCH">&nbsp;</A>
+<H4>Readline Initialization</H4>
+
+<P>
+
+Readline is customized by putting commands in an initialization
+file (the <I>inputrc</I> file).
+The name of this file is taken from the value of the
+<FONT SIZE=-1><B>INPUTRC</B>
+
+</FONT>
+variable. If that variable is unset, the default is
+<A HREF="file:~/.inputrc"><I>~/.inputrc</I></A>.
+
+When a program which uses the readline library starts up, the
+initialization file is read, and the key bindings and variables
+are set.
+There are only a few basic constructs allowed in the
+readline initialization file.
+Blank lines are ignored.
+Lines beginning with a <B>#</B> are comments.
+Lines beginning with a <B>$</B> indicate conditional constructs.
+Other lines denote key bindings and variable settings.
+<P>
+
+The default key-bindings may be changed with an
+<I>inputrc </I>
+
+file.
+Other programs that use this library may add their own commands
+and bindings.
+<P>
+
+For example, placing
+<DL COMPACT><DT><DD>
+<P>
+
+M-Control-u: universal-argument
+</DL>
+
+or
+<DL COMPACT><DT><DD>
+C-Meta-u: universal-argument
+</DL>
+
+into the
+<I>inputrc</I>
+
+would make M-C-u execute the readline command
+<I>universal-argument</I>.
+
+<P>
+
+The following symbolic character names are recognized:
+<I>RUBOUT</I>,
+
+<I>DEL</I>,
+
+<I>ESC</I>,
+
+<I>LFD</I>,
+
+<I>NEWLINE</I>,
+
+<I>RET</I>,
+
+<I>RETURN</I>,
+
+<I>SPC</I>,
+
+<I>SPACE</I>,
+
+and
+<I>TAB</I>.
+
+<P>
+
+In addition to command names, readline allows keys to be bound
+to a string that is inserted when the key is pressed (a <I>macro</I>).
+<A NAME="lbCI">&nbsp;</A>
+<H4>Readline Key Bindings</H4>
+
+<P>
+
+The syntax for controlling key bindings in the
+<I>inputrc</I>
+
+file is simple. All that is required is the name of the
+command or the text of a macro and a key sequence to which
+it should be bound. The name may be specified in one of two ways:
+as a symbolic key name, possibly with <I>Meta-</I> or <I>Control-</I>
+prefixes, or as a key sequence.
+<P>
+
+When using the form <B>keyname</B>:<I>function-name</I> or <I>macro</I>,
+<I>keyname</I>
+
+is the name of a key spelled out in English. For example:
+<P>
+<DL COMPACT><DT><DD>
+Control-u: universal-argument
+<BR>
+
+Meta-Rubout: backward-kill-word
+<BR>
+
+Control-o: &quot;&gt; output&quot;
+</DL>
+
+<P>
+
+In the above example,
+<I>C-u</I>
+
+is bound to the function
+<B>universal-argument</B>,
+
+<I>M-DEL</I>
+
+is bound to the function
+<B>backward-kill-word</B>,
+
+and
+<I>C-o</I>
+
+is bound to run the macro
+expressed on the right hand side (that is, to insert the text
+<TT>&gt; output</TT>
+
+into the line).
+<P>
+
+In the second form, <B>&quot;keyseq&quot;</B>:<I>function-name</I> or <I>macro</I>,
+<B>keyseq</B>
+
+differs from
+<B>keyname</B>
+
+above in that strings denoting
+an entire key sequence may be specified by placing the sequence
+within double quotes. Some GNU Emacs style key escapes can be
+used, as in the following example, but the symbolic character names
+are not recognized.
+<P>
+<DL COMPACT><DT><DD>
+&quot;\C-u&quot;: universal-argument
+<BR>
+
+&quot;\C-x\C-r&quot;: re-read-init-file
+<BR>
+
+&quot;\e[11~&quot;: &quot;Function Key 1&quot;
+</DL>
+
+<P>
+
+In this example,
+<I>C-u</I>
+
+is again bound to the function
+<B>universal-argument</B>.
+
+<I>C-x C-r</I>
+
+is bound to the function
+<B>re-read-init-file</B>,
+
+and
+<I>ESC [ 1 1 ~</I>
+
+is bound to insert the text
+<TT>Function Key 1</TT>.
+
+<P>
+
+The full set of GNU Emacs style escape sequences is
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>\C-</B>
+
+<DD>
+control prefix
+<DT><B>\M-</B>
+
+<DD>
+meta prefix
+<DT><B>\e</B>
+
+<DD>
+an escape character
+<DT><B>\\</B>
+
+<DD>
+backslash
+<DT><B>\</B>
+
+<DD>
+literal &quot;
+<DT><B>\aq</B>
+
+<DD>
+literal aq
+</DL></DL>
+
+
+<P>
+
+In addition to the GNU Emacs style escape sequences, a second
+set of backslash escapes is available:
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>\a</B>
+
+<DD>
+alert (bell)
+<DT><B>\b</B>
+
+<DD>
+backspace
+<DT><B>\d</B>
+
+<DD>
+delete
+<DT><B>\f</B>
+
+<DD>
+form feed
+<DT><B>\n</B>
+
+<DD>
+newline
+<DT><B>\r</B>
+
+<DD>
+carriage return
+<DT><B>\t</B>
+
+<DD>
+horizontal tab
+<DT><B>\v</B>
+
+<DD>
+vertical tab
+<DT><B>\</B><I>nnn</I>
+
+<DD>
+the eight-bit character whose value is the octal value <I>nnn</I>
+(one to three digits)
+<DT><B>\x</B><I>HH</I>
+
+<DD>
+the eight-bit character whose value is the hexadecimal value <I>HH</I>
+(one or two hex digits)
+</DL></DL>
+
+
+<P>
+
+When entering the text of a macro, single or double quotes must
+be used to indicate a macro definition.
+Unquoted text is assumed to be a function name.
+In the macro body, the backslash escapes described above are expanded.
+Backslash will quote any other character in the macro text,
+including &quot; and aq.
+<P>
+
+<B>Bash</B>
+
+allows the current readline key bindings to be displayed or modified
+with the
+<B>bind</B>
+
+builtin command. The editing mode may be switched during interactive
+use by using the
+<B>-o</B>
+
+option to the
+<B>set</B>
+
+builtin command (see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below).
+<A NAME="lbCJ">&nbsp;</A>
+<H4>Readline Variables</H4>
+
+<P>
+
+Readline has variables that can be used to further customize its
+behavior. A variable may be set in the
+<I>inputrc</I>
+
+file with a statement of the form
+<DL COMPACT><DT><DD>
+<P>
+
+<B>set</B> <I>variable-name</I> <I>value</I>
+</DL>
+
+<P>
+
+Except where noted, readline variables can take the values
+<B>On</B>
+
+or
+<B>Off</B>
+
+(without regard to case).
+Unrecognized variable names are ignored.
+When a variable value is read, empty or null values, &quot;on&quot; (case-insensitive),
+and &quot;1&quot; are equivalent to <B>On</B>. All other values are equivalent to
+<B>Off</B>.
+The variables and their default values are:
+<P>
+
+
+<DL COMPACT>
+<DT><B>bell-style (audible)</B>
+
+<DD>
+Controls what happens when readline wants to ring the terminal bell.
+If set to <B>none</B>, readline never rings the bell. If set to
+<B>visible</B>, readline uses a visible bell if one is available.
+If set to <B>audible</B>, readline attempts to ring the terminal's bell.
+<DT><B>bind-tty-special-chars (On)</B>
+
+<DD>
+If set to <B>On</B>, readline attempts to bind the control characters
+treated specially by the kernel's terminal driver to their readline
+equivalents.
+<DT><B>comment-begin (``#'')</B>
+
+<DD>
+The string that is inserted when the readline
+<B>insert-comment</B>
+
+command is executed.
+This command is bound to
+<B>M-#</B>
+
+in emacs mode and to
+<B>#</B>
+
+in vi command mode.
+<DT><B>completion-ignore-case (Off)</B>
+
+<DD>
+If set to <B>On</B>, readline performs filename matching and completion
+in a case-insensitive fashion.
+<DT><B>completion-prefix-display-length (0)</B>
+
+<DD>
+The length in characters of the common prefix of a list of possible
+completions that is displayed without modification. When set to a
+value greater than zero, common prefixes longer than this value are
+replaced with an ellipsis when displaying possible completions.
+<DT><B>completion-query-items (100)</B>
+
+<DD>
+This determines when the user is queried about viewing
+the number of possible completions
+generated by the <B>possible-completions</B> command.
+It may be set to any integer value greater than or equal to
+zero. If the number of possible completions is greater than
+or equal to the value of this variable, the user is asked whether
+or not he wishes to view them; otherwise they are simply listed
+on the terminal.
+<DT><B>convert-meta (On)</B>
+
+<DD>
+If set to <B>On</B>, readline will convert characters with the
+eighth bit set to an ASCII key sequence
+by stripping the eighth bit and prefixing an
+escape character (in effect, using escape as the <I>meta prefix</I>).
+<DT><B>disable-completion (Off)</B>
+
+<DD>
+If set to <B>On</B>, readline will inhibit word completion. Completion
+characters will be inserted into the line as if they had been
+mapped to <B>self-insert</B>.
+<DT><B>editing-mode (emacs)</B>
+
+<DD>
+Controls whether readline begins with a set of key bindings similar
+to <I>emacs</I> or <I>vi</I>.
+<B>editing-mode</B>
+
+can be set to either
+<B>emacs</B>
+
+or
+<B>vi</B>.
+
+<DT><B>echo-control-characters (On)</B>
+
+<DD>
+When set to <B>On</B>, on operating systems that indicate they support it,
+readline echoes a character corresponding to a signal generated from the
+keyboard.
+<DT><B>enable-keypad (Off)</B>
+
+<DD>
+When set to <B>On</B>, readline will try to enable the application
+keypad when it is called. Some systems need this to enable the
+arrow keys.
+<DT><B>enable-meta-key (On)</B>
+
+<DD>
+When set to <B>On</B>, readline will try to enable any meta modifier
+key the terminal claims to support when it is called. On many terminals,
+the meta key is used to send eight-bit characters.
+<DT><B>expand-tilde (Off)</B>
+
+<DD>
+If set to <B>on</B>, tilde expansion is performed when readline
+attempts word completion.
+<DT><B>history-preserve-point (Off)</B>
+
+<DD>
+If set to <B>on</B>, the history code attempts to place point at the
+same location on each history line retrieved with <B>previous-history</B>
+or <B>next-history</B>.
+<DT><B>history-size (0)</B>
+
+<DD>
+Set the maximum number of history entries saved in the history list. If
+set to zero, the number of entries in the history list is not limited.
+<DT><B>horizontal-scroll-mode (Off)</B>
+
+<DD>
+When set to <B>On</B>, makes readline use a single line for display,
+scrolling the input horizontally on a single screen line when it
+becomes longer than the screen width rather than wrapping to a new line.
+<DT><B>input-meta (Off)</B>
+
+<DD>
+If set to <B>On</B>, readline will enable eight-bit input (that is,
+it will not strip the high bit from the characters it reads),
+regardless of what the terminal claims it can support. The name
+<B>meta-flag</B>
+
+is a synonym for this variable.
+<DT><B>isearch-terminators (``C-[C-J'')</B>
+
+<DD>
+The string of characters that should terminate an incremental
+search without subsequently executing the character as a command.
+If this variable has not been given a value, the characters
+<I>ESC</I> and <I>C-J</I> will terminate an incremental search.
+<DT><B>keymap (emacs)</B>
+
+<DD>
+Set the current readline keymap. The set of valid keymap names is
+<I>emacs, emacs-standard, emacs-meta, emacs-ctlx, vi,
+vi-command</I>, and
+<I>vi-insert</I>.
+
+<I>vi</I> is equivalent to <I>vi-command</I>; <I>emacs</I> is
+equivalent to <I>emacs-standard</I>. The default value is
+<I>emacs</I>;
+
+the value of
+<B>editing-mode</B>
+
+also affects the default keymap.
+<DT><B>mark-directories (On)</B>
+
+<DD>
+If set to <B>On</B>, completed directory names have a slash
+appended.
+<DT><B>mark-modified-lines (Off)</B>
+
+<DD>
+If set to <B>On</B>, history lines that have been modified are displayed
+with a preceding asterisk (<B>*</B>).
+<DT><B>mark-symlinked-directories (Off)</B>
+
+<DD>
+If set to <B>On</B>, completed names which are symbolic links to directories
+have a slash appended (subject to the value of
+<B>mark-directories</B>).
+<DT><B>match-hidden-files (On)</B>
+
+<DD>
+This variable, when set to <B>On</B>, causes readline to match files whose
+names begin with a `.' (hidden files) when performing filename
+completion, unless the leading `.' is
+supplied by the user in the filename to be completed.
+<DT><B>output-meta (Off)</B>
+
+<DD>
+If set to <B>On</B>, readline will display characters with the
+eighth bit set directly rather than as a meta-prefixed escape
+sequence.
+<DT><B>page-completions (On)</B>
+
+<DD>
+If set to <B>On</B>, readline uses an internal <I>more</I>-like pager
+to display a screenful of possible completions at a time.
+<DT><B>print-completions-horizontally (Off)</B>
+
+<DD>
+If set to <B>On</B>, readline will display completions with matches
+sorted horizontally in alphabetical order, rather than down the screen.
+<DT><B>revert-all-at-newline (Off)</B>
+
+<DD>
+If set to <B>on</B>, readline will undo all changes to history lines
+before returning when <B>accept-line</B> is executed. By default,
+history lines may be modified and retain individual undo lists across
+calls to <B>readline</B>.
+<DT><B>show-all-if-ambiguous (Off)</B>
+
+<DD>
+This alters the default behavior of the completion functions. If
+set to
+<B>on</B>,
+
+words which have more than one possible completion cause the
+matches to be listed immediately instead of ringing the bell.
+<DT><B>show-all-if-unmodified (Off)</B>
+
+<DD>
+This alters the default behavior of the completion functions in
+a fashion similar to <B>show-all-if-ambiguous</B>.
+If set to
+<B>on</B>,
+
+words which have more than one possible completion without any
+possible partial completion (the possible completions don't share
+a common prefix) cause the matches to be listed immediately instead
+of ringing the bell.
+<DT><B>skip-completed-text (Off)</B>
+
+<DD>
+If set to <B>On</B>, this alters the default completion behavior when
+inserting a single match into the line. It's only active when
+performing completion in the middle of a word. If enabled, readline
+does not insert characters from the completion that match characters
+after point in the word being completed, so portions of the word
+following the cursor are not duplicated.
+<DT><B>visible-stats (Off)</B>
+
+<DD>
+If set to <B>On</B>, a character denoting a file's type as reported
+by <I>stat</I>(2) is appended to the filename when listing possible
+completions.
+
+</DL>
+<A NAME="lbCK">&nbsp;</A>
+<H4>Readline Conditional Constructs</H4>
+
+<P>
+
+Readline implements a facility similar in spirit to the conditional
+compilation features of the C preprocessor which allows key
+bindings and variable settings to be performed as the result
+of tests. There are four parser directives used.
+<DL COMPACT>
+<DT><B>$if</B><DD>
+The
+<B>$if</B>
+
+construct allows bindings to be made based on the
+editing mode, the terminal being used, or the application using
+readline. The text of the test extends to the end of the line;
+no characters are required to isolate it.
+<DL COMPACT><DT><DD>
+<DL COMPACT>
+<DT><B>mode</B><DD>
+The <B>mode=</B> form of the <B>$if</B> directive is used to test
+whether readline is in emacs or vi mode.
+This may be used in conjunction
+with the <B>set keymap</B> command, for instance, to set bindings in
+the <I>emacs-standard</I> and <I>emacs-ctlx</I> keymaps only if
+readline is starting out in emacs mode.
+<DT><B>term</B><DD>
+The <B>term=</B> form may be used to include terminal-specific
+key bindings, perhaps to bind the key sequences output by the
+terminal's function keys. The word on the right side of the
+<B>=</B>
+
+is tested against the both full name of the terminal and the portion
+of the terminal name before the first <B>-</B>. This allows
+<I>sun</I>
+
+to match both
+<I>sun</I>
+
+and
+<I>sun-cmd</I>,
+
+for instance.
+<DT><B>application</B><DD>
+The <B>application</B> construct is used to include
+application-specific settings. Each program using the readline
+library sets the <I>application name</I>, and an initialization
+file can test for a particular value.
+This could be used to bind key sequences to functions useful for
+a specific program. For instance, the following command adds a
+key sequence that quotes the current or previous word in Bash:
+<P>
+<DL COMPACT><DT><DD>
+<PRE>
+<B>$if</B> Bash
+# Quote the current or previous word
+&quot;\C-xq&quot;: &quot;\eb\&quot;\ef\&quot;&quot;
+<B>$endif</B>
+</PRE>
+
+</DL>
+
+</DL></DL>
+
+<DT><B>$endif</B><DD>
+This command, as seen in the previous example, terminates an
+<B>$if</B> command.
+<DT><B>$else</B><DD>
+Commands in this branch of the <B>$if</B> directive are executed if
+the test fails.
+<DT><B>$include</B><DD>
+This directive takes a single filename as an argument and reads commands
+and bindings from that file. For example, the following directive
+would read <A HREF="file:/etc/inputrc"><I>/etc/inputrc</I></A>:
+<P>
+<DL COMPACT><DT><DD>
+<PRE>
+<B>$include</B> <A HREF="file:/etc/inputrc"><I>/etc/inputrc</I></A>
+</PRE>
+
+</DL>
+
+</DL>
+<A NAME="lbCL">&nbsp;</A>
+<H4>Searching</H4>
+
+<P>
+
+Readline provides commands for searching through the command history
+(see
+<FONT SIZE=-1><B>HISTORY</B>
+
+</FONT>
+below) for lines containing a specified string.
+There are two search modes:
+<I>incremental</I>
+
+and
+<I>non-incremental</I>.
+
+<P>
+
+Incremental searches begin before the user has finished typing the
+search string.
+As each character of the search string is typed, readline displays
+the next entry from the history matching the string typed so far.
+An incremental search requires only as many characters as needed to
+find the desired history entry.
+The characters present in the value of the <B>isearch-terminators</B>
+variable are used to terminate an incremental search.
+If that variable has not been assigned a value the Escape and
+Control-J characters will terminate an incremental search.
+Control-G will abort an incremental search and restore the original
+line.
+When the search is terminated, the history entry containing the
+search string becomes the current line.
+<P>
+
+To find other matching entries in the history list, type Control-S or
+Control-R as appropriate.
+This will search backward or forward in the history for the next
+entry matching the search string typed so far.
+Any other key sequence bound to a readline command will terminate
+the search and execute that command.
+For instance, a <I>newline</I> will terminate the search and accept
+the line, thereby executing the command from the history list.
+<P>
+
+Readline remembers the last incremental search string. If two
+Control-Rs are typed without any intervening characters defining a
+new search string, any remembered search string is used.
+<P>
+
+Non-incremental searches read the entire search string before starting
+to search for matching history lines. The search string may be
+typed by the user or be part of the contents of the current line.
+<A NAME="lbCM">&nbsp;</A>
+<H4>Readline Command Names</H4>
+
+<P>
+
+The following is a list of the names of the commands and the default
+key sequences to which they are bound.
+Command names without an accompanying key sequence are unbound by default.
+In the following descriptions, <I>point</I> refers to the current cursor
+position, and <I>mark</I> refers to a cursor position saved by the
+<B>set-mark</B> command.
+The text between the point and mark is referred to as the <I>region</I>.
+<A NAME="lbCN">&nbsp;</A>
+<H4>Commands for Moving</H4>
+
+<P>
+
+
+<DL COMPACT>
+<DT><B>beginning-of-line (C-a)</B>
+
+<DD>
+Move to the start of the current line.
+<DT><B>end-of-line (C-e)</B>
+
+<DD>
+Move to the end of the line.
+<DT><B>forward-char (C-f)</B>
+
+<DD>
+Move forward a character.
+<DT><B>backward-char (C-b)</B>
+
+<DD>
+Move back a character.
+<DT><B>forward-word (M-f)</B>
+
+<DD>
+Move forward to the end of the next word. Words are composed of
+alphanumeric characters (letters and digits).
+<DT><B>backward-word (M-b)</B>
+
+<DD>
+Move back to the start of the current or previous word.
+Words are composed of alphanumeric characters (letters and digits).
+<DT><B>shell-forward-word</B>
+
+<DD>
+Move forward to the end of the next word.
+Words are delimited by non-quoted shell metacharacters.
+<DT><B>shell-backward-word</B>
+
+<DD>
+Move back to the start of the current or previous word.
+Words are delimited by non-quoted shell metacharacters.
+<DT><B>clear-screen (C-l)</B>
+
+<DD>
+Clear the screen leaving the current line at the top of the screen.
+With an argument, refresh the current line without clearing the
+screen.
+<DT><B>redraw-current-line</B>
+
+<DD>
+Refresh the current line.
+
+</DL>
+<A NAME="lbCO">&nbsp;</A>
+<H4>Commands for Manipulating the History</H4>
+
+<P>
+
+
+<DL COMPACT>
+<DT><B>accept-line (Newline, Return)</B>
+
+<DD>
+Accept the line regardless of where the cursor is. If this line is
+non-empty, add it to the history list according to the state of the
+<FONT SIZE=-1><B>HISTCONTROL</B>
+
+</FONT>
+variable. If the line is a modified history
+line, then restore the history line to its original state.
+<DT><B>previous-history (C-p)</B>
+
+<DD>
+Fetch the previous command from the history list, moving back in
+the list.
+<DT><B>next-history (C-n)</B>
+
+<DD>
+Fetch the next command from the history list, moving forward in the
+list.
+<DT><B>beginning-of-history (M-&lt;)</B>
+
+<DD>
+Move to the first line in the history.
+<DT><B>end-of-history (M-&gt;)</B>
+
+<DD>
+Move to the end of the input history, i.e., the line currently being
+entered.
+<DT><B>reverse-search-history (C-r)</B>
+
+<DD>
+Search backward starting at the current line and moving `up' through
+the history as necessary. This is an incremental search.
+<DT><B>forward-search-history (C-s)</B>
+
+<DD>
+Search forward starting at the current line and moving `down' through
+the history as necessary. This is an incremental search.
+<DT><B>non-incremental-reverse-search-history (M-p)</B>
+
+<DD>
+Search backward through the history starting at the current line
+using a non-incremental search for a string supplied by the user.
+<DT><B>non-incremental-forward-search-history (M-n)</B>
+
+<DD>
+Search forward through the history using a non-incremental search for
+a string supplied by the user.
+<DT><B>history-search-forward</B>
+
+<DD>
+Search forward through the history for the string of characters
+between the start of the current line and the point.
+This is a non-incremental search.
+<DT><B>history-search-backward</B>
+
+<DD>
+Search backward through the history for the string of characters
+between the start of the current line and the point.
+This is a non-incremental search.
+<DT><B>yank-nth-arg (M-C-y)</B>
+
+<DD>
+Insert the first argument to the previous command (usually
+the second word on the previous line) at point.
+With an argument
+<I>n</I>,
+
+insert the <I>n</I>th word from the previous command (the words
+in the previous command begin with word 0). A negative argument
+inserts the <I>n</I>th word from the end of the previous command.
+Once the argument <I>n</I> is computed, the argument is extracted
+as if the &quot;!<I>n</I>&quot; history expansion had been specified.
+<DT><B>yank-last-arg (M-., M-_)</B>
+
+<DD>
+Insert the last argument to the previous command (the last word of
+the previous history entry). With an argument,
+behave exactly like <B>yank-nth-arg</B>.
+Successive calls to <B>yank-last-arg</B> move back through the history
+list, inserting the last argument of each line in turn.
+The history expansion facilities are used to extract the last argument,
+as if the &quot;!$&quot; history expansion had been specified.
+<DT><B>shell-expand-line (M-C-e)</B>
+
+<DD>
+Expand the line as the shell does. This
+performs alias and history expansion as well as all of the shell
+word expansions. See
+<FONT SIZE=-1><B>HISTORY EXPANSION</B>
+
+</FONT>
+below for a description of history expansion.
+<DT><B>history-expand-line (M-^)</B>
+
+<DD>
+Perform history expansion on the current line.
+See
+<FONT SIZE=-1><B>HISTORY EXPANSION</B>
+
+</FONT>
+below for a description of history expansion.
+<DT><B>magic-space</B>
+
+<DD>
+Perform history expansion on the current line and insert a space.
+See
+<FONT SIZE=-1><B>HISTORY EXPANSION</B>
+
+</FONT>
+below for a description of history expansion.
+<DT><B>alias-expand-line</B>
+
+<DD>
+Perform alias expansion on the current line.
+See
+<FONT SIZE=-1><B>ALIASES</B>
+
+</FONT>
+above for a description of alias expansion.
+<DT><B>history-and-alias-expand-line</B>
+
+<DD>
+Perform history and alias expansion on the current line.
+<DT><B>insert-last-argument (M-., M-_)</B>
+
+<DD>
+A synonym for <B>yank-last-arg</B>.
+<DT><B>operate-and-get-next (C-o)</B>
+
+<DD>
+Accept the current line for execution and fetch the next line
+relative to the current line from the history for editing. Any
+argument is ignored.
+<DT><B>edit-and-execute-command (C-xC-e)</B>
+
+<DD>
+Invoke an editor on the current command line, and execute the result as shell
+commands.
+<B>Bash</B> attempts to invoke
+<FONT SIZE=-1><B>$VISUAL</B>,
+
+</FONT>
+<FONT SIZE=-1><B>$EDITOR</B>,
+
+</FONT>
+and <I>emacs</I> as the editor, in that order.
+
+</DL>
+<A NAME="lbCP">&nbsp;</A>
+<H4>Commands for Changing Text</H4>
+
+<P>
+
+
+<DL COMPACT>
+<DT><B>delete-char (C-d)</B>
+
+<DD>
+Delete the character at point. If point is at the
+beginning of the line, there are no characters in the line, and
+the last character typed was not bound to <B>delete-char</B>,
+then return
+<FONT SIZE=-1><B>EOF</B>.
+
+</FONT>
+<DT><B>backward-delete-char (Rubout)</B>
+
+<DD>
+Delete the character behind the cursor. When given a numeric argument,
+save the deleted text on the kill ring.
+<DT><B>forward-backward-delete-char</B>
+
+<DD>
+Delete the character under the cursor, unless the cursor is at the
+end of the line, in which case the character behind the cursor is
+deleted.
+<DT><B>quoted-insert (C-q, C-v)</B>
+
+<DD>
+Add the next character typed to the line verbatim. This is
+how to insert characters like <B>C-q</B>, for example.
+<DT><B>tab-insert (C-v TAB)</B>
+
+<DD>
+Insert a tab character.
+<DT><B>self-insert (a,&nbsp;b,&nbsp;A,&nbsp;1,&nbsp;!,&nbsp;...)</B>
+
+<DD>
+Insert the character typed.
+<DT><B>transpose-chars (C-t)</B>
+
+<DD>
+Drag the character before point forward over the character at point,
+moving point forward as well.
+If point is at the end of the line, then this transposes
+the two characters before point.
+Negative arguments have no effect.
+<DT><B>transpose-words (M-t)</B>
+
+<DD>
+Drag the word before point past the word after point,
+moving point over that word as well.
+If point is at the end of the line, this transposes
+the last two words on the line.
+<DT><B>upcase-word (M-u)</B>
+
+<DD>
+Uppercase the current (or following) word. With a negative argument,
+uppercase the previous word, but do not move point.
+<DT><B>downcase-word (M-l)</B>
+
+<DD>
+Lowercase the current (or following) word. With a negative argument,
+lowercase the previous word, but do not move point.
+<DT><B>capitalize-word (M-c)</B>
+
+<DD>
+Capitalize the current (or following) word. With a negative argument,
+capitalize the previous word, but do not move point.
+<DT><B>overwrite-mode</B>
+
+<DD>
+Toggle overwrite mode. With an explicit positive numeric argument,
+switches to overwrite mode. With an explicit non-positive numeric
+argument, switches to insert mode. This command affects only
+<B>emacs</B> mode; <B>vi</B> mode does overwrite differently.
+Each call to <I>readline()</I> starts in insert mode.
+In overwrite mode, characters bound to <B>self-insert</B> replace
+the text at point rather than pushing the text to the right.
+Characters bound to <B>backward-delete-char</B> replace the character
+before point with a space. By default, this command is unbound.
+
+</DL>
+<A NAME="lbCQ">&nbsp;</A>
+<H4>Killing and Yanking</H4>
+
+<P>
+
+
+<DL COMPACT>
+<DT><B>kill-line (C-k)</B>
+
+<DD>
+Kill the text from point to the end of the line.
+<DT><B>backward-kill-line (C-x Rubout)</B>
+
+<DD>
+Kill backward to the beginning of the line.
+<DT><B>unix-line-discard (C-u)</B>
+
+<DD>
+Kill backward from point to the beginning of the line.
+The killed text is saved on the kill-ring.
+
+<DT><B>kill-whole-line</B>
+
+<DD>
+Kill all characters on the current line, no matter where point is.
+<DT><B>kill-word (M-d)</B>
+
+<DD>
+Kill from point to the end of the current word, or if between
+words, to the end of the next word.
+Word boundaries are the same as those used by <B>forward-word</B>.
+<DT><B>backward-kill-word (M-Rubout)</B>
+
+<DD>
+Kill the word behind point.
+Word boundaries are the same as those used by <B>backward-word</B>.
+<DT><B>shell-kill-word (M-d)</B>
+
+<DD>
+Kill from point to the end of the current word, or if between
+words, to the end of the next word.
+Word boundaries are the same as those used by <B>shell-forward-word</B>.
+<DT><B>shell-backward-kill-word (M-Rubout)</B>
+
+<DD>
+Kill the word behind point.
+Word boundaries are the same as those used by <B>shell-backward-word</B>.
+<DT><B>unix-word-rubout (C-w)</B>
+
+<DD>
+Kill the word behind point, using white space as a word boundary.
+The killed text is saved on the kill-ring.
+<DT><B>unix-filename-rubout</B>
+
+<DD>
+Kill the word behind point, using white space and the slash character
+as the word boundaries.
+The killed text is saved on the kill-ring.
+<DT><B>delete-horizontal-space (M-\)</B>
+
+<DD>
+Delete all spaces and tabs around point.
+<DT><B>kill-region</B>
+
+<DD>
+Kill the text in the current region.
+<DT><B>copy-region-as-kill</B>
+
+<DD>
+Copy the text in the region to the kill buffer.
+<DT><B>copy-backward-word</B>
+
+<DD>
+Copy the word before point to the kill buffer.
+The word boundaries are the same as <B>backward-word</B>.
+<DT><B>copy-forward-word</B>
+
+<DD>
+Copy the word following point to the kill buffer.
+The word boundaries are the same as <B>forward-word</B>.
+<DT><B>yank (C-y)</B>
+
+<DD>
+Yank the top of the kill ring into the buffer at point.
+<DT><B>yank-pop (M-y)</B>
+
+<DD>
+Rotate the kill ring, and yank the new top. Only works following
+<B>yank</B>
+
+or
+<B>yank-pop</B>.
+
+
+</DL>
+<A NAME="lbCR">&nbsp;</A>
+<H4>Numeric Arguments</H4>
+
+<P>
+
+
+<DL COMPACT>
+<DT><B>digit-argument (M-0, M-1, ..., M--)</B>
+
+<DD>
+Add this digit to the argument already accumulating, or start a new
+argument. M-- starts a negative argument.
+<DT><B>universal-argument</B>
+
+<DD>
+This is another way to specify an argument.
+If this command is followed by one or more digits, optionally with a
+leading minus sign, those digits define the argument.
+If the command is followed by digits, executing
+<B>universal-argument</B>
+
+again ends the numeric argument, but is otherwise ignored.
+As a special case, if this command is immediately followed by a
+character that is neither a digit or minus sign, the argument count
+for the next command is multiplied by four.
+The argument count is initially one, so executing this function the
+first time makes the argument count four, a second time makes the
+argument count sixteen, and so on.
+
+</DL>
+<A NAME="lbCS">&nbsp;</A>
+<H4>Completing</H4>
+
+<P>
+
+
+<DL COMPACT>
+<DT><B>complete (TAB)</B>
+
+<DD>
+Attempt to perform completion on the text before point.
+<B>Bash</B>
+
+attempts completion treating the text as a variable (if the
+text begins with <B>$</B>), username (if the text begins with
+<B>~</B>), hostname (if the text begins with <B>@</B>), or
+command (including aliases and functions) in turn. If none
+of these produces a match, filename completion is attempted.
+<DT><B>possible-completions (M-?)</B>
+
+<DD>
+List the possible completions of the text before point.
+<DT><B>insert-completions (M-*)</B>
+
+<DD>
+Insert all completions of the text before point
+that would have been generated by
+<B>possible-completions</B>.
+<DT><B>menu-complete</B>
+
+<DD>
+Similar to <B>complete</B>, but replaces the word to be completed
+with a single match from the list of possible completions.
+Repeated execution of <B>menu-complete</B> steps through the list
+of possible completions, inserting each match in turn.
+At the end of the list of completions, the bell is rung
+(subject to the setting of <B>bell-style</B>)
+and the original text is restored.
+An argument of <I>n</I> moves <I>n</I> positions forward in the list
+of matches; a negative argument may be used to move backward
+through the list.
+This command is intended to be bound to <B>TAB</B>, but is unbound
+by default.
+<DT><B>menu-complete-rd</B>
+
+<DD>
+Identical to <B>menu-complete</B>, but moves backward through the list
+of possible completions, as if <B>menu-complete</B> had been given a
+negative argument. This command is unbound by default.
+<DT><B>delete-char-or-list</B>
+
+<DD>
+Deletes the character under the cursor if not at the beginning or
+end of the line (like <B>delete-char</B>).
+If at the end of the line, behaves identically to
+<B>possible-completions</B>.
+This command is unbound by default.
+<DT><B>complete-filename (M-/)</B>
+
+<DD>
+Attempt filename completion on the text before point.
+<DT><B>possible-filename-completions (C-x /)</B>
+
+<DD>
+List the possible completions of the text before point,
+treating it as a filename.
+<DT><B>complete-username (M-~)</B>
+
+<DD>
+Attempt completion on the text before point, treating
+it as a username.
+<DT><B>possible-username-completions (C-x ~)</B>
+
+<DD>
+List the possible completions of the text before point,
+treating it as a username.
+<DT><B>complete-variable (M-$)</B>
+
+<DD>
+Attempt completion on the text before point, treating
+it as a shell variable.
+<DT><B>possible-variable-completions (C-x $)</B>
+
+<DD>
+List the possible completions of the text before point,
+treating it as a shell variable.
+<DT><B>complete-hostname (M-@)</B>
+
+<DD>
+Attempt completion on the text before point, treating
+it as a hostname.
+<DT><B>possible-hostname-completions (C-x @)</B>
+
+<DD>
+List the possible completions of the text before point,
+treating it as a hostname.
+<DT><B>complete-command (M-!)</B>
+
+<DD>
+Attempt completion on the text before point, treating
+it as a command name. Command completion attempts to
+match the text against aliases, reserved words, shell
+functions, shell builtins, and finally executable filenames,
+in that order.
+<DT><B>possible-command-completions (C-x !)</B>
+
+<DD>
+List the possible completions of the text before point,
+treating it as a command name.
+<DT><B>dynamic-complete-history (M-TAB)</B>
+
+<DD>
+Attempt completion on the text before point, comparing
+the text against lines from the history list for possible
+completion matches.
+<DT><B>dabbrev-expand</B>
+
+<DD>
+Attempt menu completion on the text before point, comparing
+the text against lines from the history list for possible
+completion matches.
+<DT><B>complete-into-braces (M-{)</B>
+
+<DD>
+Perform filename completion and insert the list of possible completions
+enclosed within braces so the list is available to the shell (see
+<B>Brace Expansion</B>
+
+above).
+
+</DL>
+<A NAME="lbCT">&nbsp;</A>
+<H4>Keyboard Macros</H4>
+
+<P>
+
+
+<DL COMPACT>
+<DT><B>start-kbd-macro (C-x ()</B>
+
+<DD>
+Begin saving the characters typed into the current keyboard macro.
+<DT><B>end-kbd-macro (C-x ))</B>
+
+<DD>
+Stop saving the characters typed into the current keyboard macro
+and store the definition.
+<DT><B>call-last-kbd-macro (C-x e)</B>
+
+<DD>
+Re-execute the last keyboard macro defined, by making the characters
+in the macro appear as if typed at the keyboard.
+
+</DL>
+<A NAME="lbCU">&nbsp;</A>
+<H4>Miscellaneous</H4>
+
+<P>
+
+
+<DL COMPACT>
+<DT><B>re-read-init-file (C-x C-r)</B>
+
+<DD>
+Read in the contents of the <I>inputrc</I> file, and incorporate
+any bindings or variable assignments found there.
+<DT><B>abort (C-g)</B>
+
+<DD>
+Abort the current editing command and
+ring the terminal's bell (subject to the setting of
+<B>bell-style</B>).
+
+<DT><B>do-uppercase-version (M-a, M-b, M-</B><I>x</I>, ...)
+
+<DD>
+If the metafied character <I>x</I> is lowercase, run the command
+that is bound to the corresponding uppercase character.
+<DT><B>prefix-meta (ESC)</B>
+
+<DD>
+Metafy the next character typed.
+<FONT SIZE=-1><B>ESC</B>
+
+</FONT>
+<B>f</B>
+
+is equivalent to
+<B>Meta-f</B>.
+
+<DT><B>undo (C-_, C-x C-u)</B>
+
+<DD>
+Incremental undo, separately remembered for each line.
+<DT><B>revert-line (M-r)</B>
+
+<DD>
+Undo all changes made to this line. This is like executing the
+<B>undo</B>
+
+command enough times to return the line to its initial state.
+<DT><B>tilde-expand (M-&amp;)</B>
+
+<DD>
+Perform tilde expansion on the current word.
+<DT><B>set-mark (C-@, M-&lt;space&gt;)</B>
+
+<DD>
+Set the mark to the point. If a
+numeric argument is supplied, the mark is set to that position.
+<DT><B>exchange-point-and-mark (C-x C-x)</B>
+
+<DD>
+Swap the point with the mark. The current cursor position is set to
+the saved position, and the old cursor position is saved as the mark.
+<DT><B>character-search (C-])</B>
+
+<DD>
+A character is read and point is moved to the next occurrence of that
+character. A negative count searches for previous occurrences.
+<DT><B>character-search-backward (M-C-])</B>
+
+<DD>
+A character is read and point is moved to the previous occurrence of that
+character. A negative count searches for subsequent occurrences.
+<DT><B>skip-csi-sequence ()</B>
+
+<DD>
+Read enough characters to consume a multi-key sequence such as those
+defined for keys like Home and End. Such sequences begin with a
+Control Sequence Indicator (CSI), usually ESC-[. If this sequence is
+bound to &quot;\[&quot;, keys producing such sequences will have no effect
+unless explicitly bound to a readline command, instead of inserting
+stray characters into the editing buffer. This is unbound by default,
+but usually bound to ESC-[.
+<DT><B>insert-comment (M-#)</B>
+
+<DD>
+Without a numeric argument, the value of the readline
+<B>comment-begin</B>
+
+variable is inserted at the beginning of the current line.
+If a numeric argument is supplied, this command acts as a toggle: if
+the characters at the beginning of the line do not match the value
+of <B>comment-begin</B>, the value is inserted, otherwise
+the characters in <B>comment-begin</B> are deleted from the beginning of
+the line.
+In either case, the line is accepted as if a newline had been typed.
+The default value of
+<B>comment-begin</B> causes this command to make the current line
+a shell comment.
+If a numeric argument causes the comment character to be removed, the line
+will be executed by the shell.
+<DT><B>glob-complete-word (M-g)</B>
+
+<DD>
+The word before point is treated as a pattern for pathname expansion,
+with an asterisk implicitly appended. This pattern is used to
+generate a list of matching file names for possible completions.
+<DT><B>glob-expand-word (C-x *)</B>
+
+<DD>
+The word before point is treated as a pattern for pathname expansion,
+and the list of matching file names is inserted, replacing the word.
+If a numeric argument is supplied, an asterisk is appended before
+pathname expansion.
+<DT><B>glob-list-expansions (C-x g)</B>
+
+<DD>
+The list of expansions that would have been generated by
+<B>glob-expand-word</B>
+
+is displayed, and the line is redrawn.
+If a numeric argument is supplied, an asterisk is appended before
+pathname expansion.
+<DT><B>dump-functions</B>
+
+<DD>
+Print all of the functions and their key bindings to the
+readline output stream. If a numeric argument is supplied,
+the output is formatted in such a way that it can be made part
+of an <I>inputrc</I> file.
+<DT><B>dump-variables</B>
+
+<DD>
+Print all of the settable readline variables and their values to the
+readline output stream. If a numeric argument is supplied,
+the output is formatted in such a way that it can be made part
+of an <I>inputrc</I> file.
+<DT><B>dump-macros</B>
+
+<DD>
+Print all of the readline key sequences bound to macros and the
+strings they output. If a numeric argument is supplied,
+the output is formatted in such a way that it can be made part
+of an <I>inputrc</I> file.
+<DT><B>display-shell-version (C-x C-v)</B>
+
+<DD>
+Display version information about the current instance of
+<B>bash</B>.
+
+
+</DL>
+<A NAME="lbCV">&nbsp;</A>
+<H4>Programmable Completion</H4>
+
+<P>
+
+When word completion is attempted for an argument to a command for
+which a completion specification (a <I>compspec</I>) has been defined
+using the <B>complete</B> builtin (see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below), the programmable completion facilities are invoked.
+<P>
+
+First, the command name is identified.
+If the command word is the empty string (completion attempted at the
+beginning of an empty line), any compspec defined with
+the <B>-E</B> option to <B>complete</B> is used.
+If a compspec has been defined for that command, the
+compspec is used to generate the list of possible completions for the word.
+If the command word is a full pathname, a compspec for the full
+pathname is searched for first.
+If no compspec is found for the full pathname, an attempt is made to
+find a compspec for the portion following the final slash.
+If those searches to not result in a compspec, any compspec defined with
+the <B>-D</B> option to <B>complete</B> is used as the default.
+<P>
+
+Once a compspec has been found, it is used to generate the list of
+matching words.
+If a compspec is not found, the default <B>bash</B> completion as
+described above under <B>Completing</B> is performed.
+<P>
+
+First, the actions specified by the compspec are used.
+Only matches which are prefixed by the word being completed are
+returned.
+When the
+<B>-f</B>
+
+or
+<B>-d</B>
+
+option is used for filename or directory name completion, the shell
+variable
+<FONT SIZE=-1><B>FIGNORE</B>
+
+</FONT>
+is used to filter the matches.
+<P>
+
+Any completions specified by a pathname expansion pattern to the
+<B>-G</B> option are generated next.
+The words generated by the pattern need not match the word
+being completed.
+The
+<FONT SIZE=-1><B>GLOBIGNORE</B>
+
+</FONT>
+shell variable is not used to filter the matches, but the
+<FONT SIZE=-1><B>FIGNORE</B>
+
+</FONT>
+variable is used.
+<P>
+
+Next, the string specified as the argument to the <B>-W</B> option
+is considered.
+The string is first split using the characters in the
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+special variable as delimiters.
+Shell quoting is honored.
+Each word is then expanded using
+brace expansion, tilde expansion, parameter and variable expansion,
+command substitution, and arithmetic expansion,
+as described above under
+<FONT SIZE=-1><B>EXPANSION</B>.
+
+</FONT>
+The results are split using the rules described above under
+<B>Word Splitting</B>.
+The results of the expansion are prefix-matched against the word being
+completed, and the matching words become the possible completions.
+<P>
+
+After these matches have been generated, any shell function or command
+specified with the <B>-F</B> and <B>-C</B> options is invoked.
+When the command or function is invoked, the
+<FONT SIZE=-1><B>COMP_LINE</B>,
+
+</FONT>
+<FONT SIZE=-1><B>COMP_POINT</B>,
+
+</FONT>
+<FONT SIZE=-1><B>COMP_KEY</B>,
+
+</FONT>
+and
+<FONT SIZE=-1><B>COMP_TYPE</B>
+
+</FONT>
+variables are assigned values as described above under
+<B>Shell Variables</B>.
+If a shell function is being invoked, the
+<FONT SIZE=-1><B>COMP_WORDS</B>
+
+</FONT>
+and
+<FONT SIZE=-1><B>COMP_CWORD</B>
+
+</FONT>
+variables are also set.
+When the function or command is invoked, the first argument is the
+name of the command whose arguments are being completed, the
+second argument is the word being completed, and the third argument
+is the word preceding the word being completed on the current command line.
+No filtering of the generated completions against the word being completed
+is performed; the function or command has complete freedom in generating
+the matches.
+<P>
+
+Any function specified with <B>-F</B> is invoked first.
+The function may use any of the shell facilities, including the
+<B>compgen</B> builtin described below, to generate the matches.
+It must put the possible completions in the
+<FONT SIZE=-1><B>COMPREPLY</B>
+
+</FONT>
+array variable.
+<P>
+
+Next, any command specified with the <B>-C</B> option is invoked
+in an environment equivalent to command substitution.
+It should print a list of completions, one per line, to the
+standard output.
+Backslash may be used to escape a newline, if necessary.
+<P>
+
+After all of the possible completions are generated, any filter
+specified with the <B>-X</B> option is applied to the list.
+The filter is a pattern as used for pathname expansion; a <B>&amp;</B>
+in the pattern is replaced with the text of the word being completed.
+A literal <B>&amp;</B> may be escaped with a backslash; the backslash
+is removed before attempting a match.
+Any completion that matches the pattern will be removed from the list.
+A leading <B>!</B> negates the pattern; in this case any completion
+not matching the pattern will be removed.
+<P>
+
+Finally, any prefix and suffix specified with the <B>-P</B> and <B>-S</B>
+options are added to each member of the completion list, and the result is
+returned to the readline completion code as the list of possible
+completions.
+<P>
+
+If the previously-applied actions do not generate any matches, and the
+<B>-o dirnames</B> option was supplied to <B>complete</B> when the
+compspec was defined, directory name completion is attempted.
+<P>
+
+If the <B>-o plusdirs</B> option was supplied to <B>complete</B> when the
+compspec was defined, directory name completion is attempted and any
+matches are added to the results of the other actions.
+<P>
+
+By default, if a compspec is found, whatever it generates is returned
+to the completion code as the full set of possible completions.
+The default <B>bash</B> completions are not attempted, and the readline
+default of filename completion is disabled.
+If the <B>-o bashdefault</B> option was supplied to <B>complete</B> when
+the compspec was defined, the <B>bash</B> default completions are attempted
+if the compspec generates no matches.
+If the <B>-o default</B> option was supplied to <B>complete</B> when the
+compspec was defined, readline's default completion will be performed
+if the compspec (and, if attempted, the default <B>bash</B> completions)
+generate no matches.
+<P>
+
+When a compspec indicates that directory name completion is desired,
+the programmable completion functions force readline to append a slash
+to completed names which are symbolic links to directories, subject to
+the value of the <B>mark-directories</B> readline variable, regardless
+of the setting of the <B>mark-symlinked-directories</B> readline variable.
+<P>
+
+There is some support for dynamically modifying completions. This is
+most useful when used in combination with a default completion specified
+with <B>complete -D</B>.
+It's possible for shell functions executed as completion
+handlers to indicate that completion should be retried by returning an
+exit status of 124. If a shell function returns 124, and changes
+the compspec associated with the command on which completion is being
+attempted (supplied as the first argument when the function is executed),
+programmable completion restarts from the beginning, with an
+attempt to find a compspec for that command. This allows a set of
+completions to be built dynamically as completion is attempted, rather than
+being loaded all at once.
+<P>
+
+For instance, assuming that there is a library of compspecs, each kept in a
+file corresponding to the name of the command, the following default
+completion function would load completions dynamically:
+<P>
+
+<TT>_completion_loader()
+<BR>
+
+{
+<BR>
+
+<TT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TT>. &quot;/etc/bash_completion.d/$1.sh&quot; &gt;/dev/null 2&gt;&amp;1 &amp;&amp; return 124<BR>
+<BR>
+
+}
+<BR>
+
+complete -D -F _completion_loader
+<BR>
+
+</TT>
+<A NAME="lbCW">&nbsp;</A>
+<H3>HISTORY</H3>
+
+When the
+<B>-o history</B>
+
+option to the
+<B>set</B>
+
+builtin is enabled, the shell provides access to the
+<I>command history</I>,
+the list of commands previously typed.
+The value of the
+<FONT SIZE=-1><B>HISTSIZE</B>
+
+</FONT>
+variable is used as the
+number of commands to save in a history list.
+The text of the last
+<FONT SIZE=-1><B>HISTSIZE</B>
+
+</FONT>
+commands (default 500) is saved. The shell
+stores each command in the history list prior to parameter and
+variable expansion (see
+<FONT SIZE=-1><B>EXPANSION</B>
+
+</FONT>
+above) but after history expansion is performed, subject to the
+values of the shell variables
+<FONT SIZE=-1><B>HISTIGNORE</B>
+
+</FONT>
+and
+<FONT SIZE=-1><B>HISTCONTROL</B>.
+
+</FONT>
+<P>
+
+On startup, the history is initialized from the file named by
+the variable
+<FONT SIZE=-1><B>HISTFILE</B>
+
+</FONT>
+(default <A HREF="file:~/.bash_history"><I>~/.bash_history</I></A>).
+The file named by the value of
+<FONT SIZE=-1><B>HISTFILE</B>
+
+</FONT>
+is truncated, if necessary, to contain no more than
+the number of lines specified by the value of
+<FONT SIZE=-1><B>HISTFILESIZE</B>.
+
+</FONT>
+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.
+These timestamps are optionally displayed depending on the value of the
+<FONT SIZE=-1><B>HISTTIMEFORMAT</B>
+
+</FONT>
+variable.
+When an interactive shell exits, the last
+<FONT SIZE=-1><B>$HISTSIZE</B>
+
+</FONT>
+lines are copied from the history list to
+<FONT SIZE=-1><B>$HISTFILE</B>.
+
+</FONT>
+If the
+<B>histappend</B>
+
+shell option is enabled
+(see the description of
+<B>shopt</B>
+
+under
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below), the lines are appended to the history file,
+otherwise the history file is overwritten.
+If
+<FONT SIZE=-1><B>HISTFILE</B>
+
+</FONT>
+is unset, or if the history file is unwritable, the history is
+not saved.
+If the
+<FONT SIZE=-1><B>HISTTIMEFORMAT</B>
+
+</FONT>
+variable is set, time stamps are written to the history file, marked
+with the history comment character, so
+they may be preserved across shell sessions.
+This uses the history comment character to distinguish timestamps from
+other history lines.
+After saving the history, the history file is truncated
+to contain no more than
+<FONT SIZE=-1><B>HISTFILESIZE</B>
+
+</FONT>
+lines. If
+<FONT SIZE=-1><B>HISTFILESIZE</B>
+
+</FONT>
+is not set, no truncation is performed.
+<P>
+
+The builtin command
+<B>fc</B>
+
+(see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below) may be used to list or edit and re-execute a portion of
+the history list.
+The
+<B>history</B>
+
+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.
+<P>
+
+The shell allows control over which commands are saved on the history
+list. The
+<FONT SIZE=-1><B>HISTCONTROL</B>
+
+</FONT>
+and
+<FONT SIZE=-1><B>HISTIGNORE</B>
+
+</FONT>
+variables may be set to cause the shell to save only a subset of the
+commands entered.
+The
+<B>cmdhist</B>
+
+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
+<B>lithist</B>
+
+shell option causes the shell to save the command with embedded newlines
+instead of semicolons. See the description of the
+<B>shopt</B>
+
+builtin below under
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+for information on setting and unsetting shell options.
+<A NAME="lbCX">&nbsp;</A>
+<H3>HISTORY EXPANSION</H3>
+
+<P>
+
+The shell supports a history expansion feature that
+is similar to the history expansion in
+<B>csh.</B>
+
+This section describes what syntax features are available. This
+feature is enabled by default for interactive shells, and can be
+disabled using the
+<B>+H</B>
+
+option to the
+<B>set</B>
+
+builtin command (see
+<FONT SIZE=-1><B>SHELL BUILTIN COMMANDS</B>
+
+</FONT>
+below). Non-interactive shells do not perform history expansion
+by default.
+<P>
+
+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.
+<P>
+
+History expansion is performed immediately after a complete line
+is read, before the shell breaks it into words.
+It takes place in two parts.
+The first is to determine which line from the history list
+to use during substitution.
+The second is to select portions of that line for inclusion into
+the current one.
+The line selected from the history is the <I>event</I>,
+and the portions of that line that are acted upon are <I>words</I>.
+Various <I>modifiers</I> are available to manipulate the selected words.
+The line is broken into words in the same fashion as when reading input,
+so that several <I>metacharacter</I>-separated words surrounded by
+quotes are considered one word.
+History expansions are introduced by the appearance of the
+history expansion character, which is <B>!</B> by default.
+Only backslash (<B>\</B>) and single quotes can quote
+the history expansion character.
+<P>
+
+Several characters inhibit history expansion if found immediately
+following the history expansion character, even if it is unquoted:
+space, tab, newline, carriage return, and <B>=</B>.
+If the <B>extglob</B> shell option is enabled, <B>(</B> will also
+inhibit expansion.
+<P>
+
+Several shell options settable with the
+<B>shopt</B>
+
+builtin may be used to tailor the behavior of history expansion.
+If the
+<B>histverify</B>
+
+shell option is enabled (see the description of the
+<B>shopt</B>
+
+builtin below), and
+<B>readline</B>
+
+is being used, history substitutions are not immediately passed to
+the shell parser.
+Instead, the expanded line is reloaded into the
+<B>readline</B>
+
+editing buffer for further modification.
+If
+<B>readline</B>
+
+is being used, and the
+<B>histreedit</B>
+
+shell option is enabled, a failed history substitution will be reloaded
+into the
+<B>readline</B>
+
+editing buffer for correction.
+The
+<B>-p</B>
+
+option to the
+<B>history</B>
+
+builtin command may be used to see what a history expansion will
+do before using it.
+The
+<B>-s</B>
+
+option to the
+<B>history</B>
+
+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.
+<P>
+
+The shell allows control of the various characters used by the
+history expansion mechanism (see the description of
+<B>histchars</B>
+
+above under
+<B>Shell Variables</B>).
+
+The shell uses
+the history comment character to mark history timestamps when
+writing the history file.
+<A NAME="lbCY">&nbsp;</A>
+<H4>Event Designators</H4>
+
+<P>
+
+An event designator is a reference to a command line entry in the
+history list.
+<P>
+
+
+<DL COMPACT>
+<DT><B>!</B>
+
+<DD>
+Start a history substitution, except when followed by a
+<B>blank</B>,
+
+newline, carriage return, =
+or ( (when the <B>extglob</B> shell option is enabled using
+the <B>shopt</B> builtin).
+<DT><B>!</B><I>n</I>
+
+<DD>
+Refer to command line
+<I>n</I>.
+
+<DT><B>!-</B><I>n</I>
+
+<DD>
+Refer to the current command line minus
+<I>n</I>.
+
+<DT><B>!!</B>
+
+<DD>
+Refer to the previous command. This is a synonym for `!-1'.
+<DT><B>!</B><I>string</I>
+
+<DD>
+Refer to the most recent command starting with
+<I>string</I>.
+
+<DT><B>!?</B><I>string</I><B>[?]</B>
+
+<DD>
+Refer to the most recent command containing
+<I>string</I>.
+
+The trailing <B>?</B> may be omitted if
+<I>string</I>
+
+is followed immediately by a newline.
+<DT><B></B><FONT SIZE=+2><B>^</B></FONT><B></B><I>string1</I><FONT SIZE=+2>^</FONT><I>string2</I><FONT SIZE=+2>^</FONT>
+
+<DD>
+Quick substitution. Repeat the last command, replacing
+<I>string1</I>
+
+with
+<I>string2</I>.
+
+Equivalent to
+``!!:s/<I>string1</I>/<I>string2</I>/''
+(see <B>Modifiers</B> below).
+<DT><B>!#</B>
+
+<DD>
+The entire command line typed so far.
+
+</DL>
+<A NAME="lbCZ">&nbsp;</A>
+<H4>Word Designators</H4>
+
+<P>
+
+Word designators are used to select desired words from the event.
+A
+<B>:</B>
+
+separates the event specification from the word designator.
+It may be omitted if the word designator begins with a
+<B>^</B>,
+
+<B>$</B>,
+
+<B>*</B>,
+
+<B>-</B>,
+
+or
+<B>%</B>.
+
+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.
+<P>
+
+
+<DL COMPACT>
+<DT><B>0 (zero)</B>
+
+<DD>
+The zeroth word. For the shell, this is the command
+word.
+<DT><I>n</I>
+
+<DD>
+The <I>n</I>th word.
+<DT><B>^</B>
+
+<DD>
+The first argument. That is, word 1.
+<DT><B>$</B>
+
+<DD>
+The last argument.
+<DT><B>%</B>
+
+<DD>
+The word matched by the most recent `?<I>string</I>?' search.
+<DT><I>x</I><B>-</B>y
+
+<DD>
+A range of words; `-<I>y</I>' abbreviates `0-<I>y</I>'.
+<DT><B>*</B>
+
+<DD>
+All of the words but the zeroth. This is a synonym
+for `<I>1-$</I>'. It is not an error to use
+<B>*</B>
+
+if there is just one
+word in the event; the empty string is returned in that case.
+<DT><B>x*</B>
+
+<DD>
+Abbreviates <I>x-$</I>.
+<DT><B>x-</B>
+
+<DD>
+Abbreviates <I>x-$</I> like <B>x*</B>, but omits the last word.
+
+</DL>
+<P>
+
+If a word designator is supplied without an event specification, the
+previous command is used as the event.
+<A NAME="lbDA">&nbsp;</A>
+<H4>Modifiers</H4>
+
+<P>
+
+After the optional word designator, there may appear a sequence of
+one or more of the following modifiers, each preceded by a `:'.
+<P>
+
+
+<P>
+
+<DL COMPACT>
+<DT><B>h</B>
+
+<DD>
+Remove a trailing file name component, leaving only the head.
+<DT><B>t</B>
+
+<DD>
+Remove all leading file name components, leaving the tail.
+<DT><B>r</B>
+
+<DD>
+Remove a trailing suffix of the form <I>.xxx</I>, leaving the
+basename.
+<DT><B>e</B>
+
+<DD>
+Remove all but the trailing suffix.
+<DT><B>p</B>
+
+<DD>
+Print the new command but do not execute it.
+<DT><B>q</B>
+
+<DD>
+Quote the substituted words, escaping further substitutions.
+<DT><B>x</B>
+
+<DD>
+Quote the substituted words as with
+<B>q</B>,
+
+but break into words at
+<B>blanks</B>
+
+and newlines.
+<DT><B>s/</B><I>old</I>/<I>new</I>/
+
+<DD>
+Substitute
+<I>new</I>
+
+for the first occurrence of
+<I>old</I>
+
+in the event line. Any delimiter can be used in place of /. The
+final delimiter is optional if it is the last character of the
+event line. The delimiter may be quoted in
+<I>old</I>
+
+and
+<I>new</I>
+
+with a single backslash. If &amp; appears in
+<I>new</I>,
+
+it is replaced by
+<I>old</I>.
+
+A single backslash will quote the &amp;. If
+<I>old</I>
+
+is null, it is set to the last
+<I>old</I>
+
+substituted, or, if no previous history substitutions took place,
+the last
+<I>string</I>
+
+in a
+<B>!?</B><I>string</I><B>[?]</B>
+
+search.
+<DT><B>&amp;</B>
+
+<DD>
+Repeat the previous substitution.
+<DT><B>g</B>
+
+<DD>
+Cause changes to be applied over the entire event line. This is
+used in conjunction with `<B>:s</B>' (e.g., `<B>:gs/</B><I>old</I>/<I>new</I>/')
+or `<B>:&amp;</B>'. If used with
+`<B>:s</B>', any delimiter can be used
+in place of /, and the final delimiter is optional
+if it is the last character of the event line.
+An <B>a</B> may be used as a synonym for <B>g</B>.
+<DT><B>G</B>
+
+<DD>
+Apply the following `<B>s</B>' modifier once to each word in the event line.
+
+</DL>
+<A NAME="lbDB">&nbsp;</A>
+<H3>SHELL BUILTIN COMMANDS</H3>
+
+
+
+<P>
+
+Unless otherwise noted, each builtin command documented in this
+section as accepting options preceded by
+<B>-</B>
+
+accepts
+<B>--</B>
+
+to signify the end of the options.
+The <B>:</B>, <B>true</B>, <B>false</B>, and <B>test</B> builtins
+do not accept options and do not treat <B>--</B> specially.
+The <B>exit</B>, <B>logout</B>, <B>break</B>, <B>continue</B>, <B>let</B>,
+and <B>shift</B> builtins accept and process arguments beginning with
+<B>-</B> without requiring <B>--</B>.
+Other builtins that accept arguments but are not specified as accepting
+options interpret arguments beginning with <B>-</B> as invalid options and
+require <B>--</B> to prevent this interpretation.
+<P>
+
+<DL COMPACT>
+<DT><B>:</B> [<I>arguments</I>]<DD>
+
+No effect; the command does nothing beyond expanding
+<I>arguments</I>
+
+and performing any specified
+redirections. A zero exit code is returned.
+<DT><B> . </B> <I>filename</I> [<I>arguments</I>]<DD>
+
+<DT><B>source</B> <I>filename</I> [<I>arguments</I>]<DD>
+
+Read and execute commands from
+<I>filename</I>
+
+in the current
+shell environment and return the exit status of the last command
+executed from
+<I>filename</I>.
+
+If
+<I>filename</I>
+
+does not contain a slash, file names in
+<FONT SIZE=-1><B>PATH</B>
+
+</FONT>
+are used to find the directory containing
+<I>filename</I>.
+
+The file searched for in
+<FONT SIZE=-1><B>PATH</B>
+
+</FONT>
+need not be executable.
+When <B>bash</B> is not in <I>posix mode</I>, the current directory is
+searched if no file is found in
+<FONT SIZE=-1><B>PATH</B>.
+
+</FONT>
+If the
+<B>sourcepath</B>
+
+option to the
+<B>shopt</B>
+
+builtin command is turned off, the
+<FONT SIZE=-1><B>PATH</B>
+
+</FONT>
+is not searched.
+If any <I>arguments</I> are supplied, they become the positional
+parameters when <I>filename</I> is executed. Otherwise the positional
+parameters are unchanged.
+The return status is the status of the last command exited within
+the script (0 if no commands are executed), and false if
+<I>filename</I>
+
+is not found or cannot be read.
+<DT><B>alias</B> [<B>-p</B>] [<I>name</I>[=<I>value</I>] ...]<DD>
+<B>Alias</B> with no arguments or with the
+<B>-p</B>
+
+option prints the list of aliases in the form
+<B>alias</B> <I>name</I>=<I>value</I> on standard output.
+When arguments are supplied, an alias is defined for
+each <I>name</I> whose <I>value</I> is given.
+A trailing space in <I>value</I> causes the next word to be
+checked for alias substitution when the alias is expanded.
+For each <I>name</I> in the argument list for which no <I>value</I>
+is supplied, the name and value of the alias is printed.
+<B>Alias</B> returns true unless a <I>name</I> is given for which
+no alias has been defined.
+<DT><B>bg</B> [<I>jobspec</I> ...]<DD>
+Resume each suspended job <I>jobspec</I> in the background, as if it
+had been started with
+<B>&amp;</B>.
+
+If
+<I>jobspec</I>
+
+is not present, the shell's notion of the <I>current job</I> is used.
+<B>bg</B>
+
+<I>jobspec</I>
+
+returns 0 unless run when job control is disabled or, when run with
+job control enabled, any specified <I>jobspec</I> was not found
+or was started without job control.
+<DT><B>bind</B> [<B>-m</B> <I>keymap</I>] [<B>-lpsvPSV</B>]<DD>
+
+<DT><B>bind</B> [<B>-m</B> <I>keymap</I>] [<B>-q</B> <I>function</I>] [<B>-u</B> <I>function</I>] [<B>-r</B> <I>keyseq</I>]<DD>
+<DT><B>bind</B> [<B>-m</B> <I>keymap</I>] <B>-f</B> <I>filename</I><DD>
+<DT><B>bind</B> [<B>-m</B> <I>keymap</I>] <B>-x</B> <I>keyseq</I>:<I>shell-command</I><DD>
+<DT><B>bind</B> [<B>-m</B> <I>keymap</I>] <I>keyseq</I>:<I>function-name</I><DD>
+<DT><B>bind</B> <I>readline-command</I><DD>
+
+Display current
+<B>readline</B>
+
+key and function bindings, bind a key sequence to a
+<B>readline</B>
+
+function or macro, or set a
+<B>readline</B>
+
+variable.
+Each non-option argument is a command as it would appear in
+<I>.inputrc</I>,
+
+but each binding or command must be passed as a separate argument;
+e.g., '&quot;\C-x\C-r&quot;: re-read-init-file'.
+Options, if supplied, have the following meanings:
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>-m </B><I>keymap</I>
+
+<DD>
+Use
+<I>keymap</I>
+
+as the keymap to be affected by the subsequent bindings.
+Acceptable
+<I>keymap</I>
+
+names are
+<I>emacs, emacs-standard, emacs-meta, emacs-ctlx, vi,
+vi-move, vi-command</I>, and
+<I>vi-insert</I>.
+
+<I>vi</I> is equivalent to <I>vi-command</I>; <I>emacs</I> is
+equivalent to <I>emacs-standard</I>.
+<DT><B>-l</B>
+
+<DD>
+List the names of all <B>readline</B> functions.
+<DT><B>-p</B>
+
+<DD>
+Display <B>readline</B> function names and bindings in such a way
+that they can be re-read.
+<DT><B>-P</B>
+
+<DD>
+List current <B>readline</B> function names and bindings.
+<DT><B>-s</B>
+
+<DD>
+Display <B>readline</B> key sequences bound to macros and the strings
+they output in such a way that they can be re-read.
+<DT><B>-S</B>
+
+<DD>
+Display <B>readline</B> key sequences bound to macros and the strings
+they output.
+<DT><B>-v</B>
+
+<DD>
+Display <B>readline</B> variable names and values in such a way that they
+can be re-read.
+<DT><B>-V</B>
+
+<DD>
+List current <B>readline</B> variable names and values.
+<DT><B>-f </B><I>filename</I>
+
+<DD>
+Read key bindings from <I>filename</I>.
+<DT><B>-q </B><I>function</I>
+
+<DD>
+Query about which keys invoke the named <I>function</I>.
+<DT><B>-u </B><I>function</I>
+
+<DD>
+Unbind all keys bound to the named <I>function</I>.
+<DT><B>-r </B><I>keyseq</I>
+
+<DD>
+Remove any current binding for <I>keyseq</I>.
+<DT><B>-x </B><I>keyseq</I>:<I>shell-command</I>
+
+<DD>
+Cause <I>shell-command</I> to be executed whenever <I>keyseq</I> is
+entered.
+When <I>shell-command</I> is executed, the shell sets the
+<FONT SIZE=-1><B>READLINE_LINE</B>
+
+</FONT>
+variable to the contents of the <B>readline</B> line buffer and the
+<FONT SIZE=-1><B>READLINE_POINT</B>
+
+</FONT>
+variable to the current location of the insertion point.
+If the executed command changes the value of
+<FONT SIZE=-1><B>READLINE_LINE</B>
+
+</FONT>
+or
+<FONT SIZE=-1><B>READLINE_POINT</B>,
+
+</FONT>
+those new values will be reflected in the editing state.
+
+</DL>
+<P>
+
+The return value is 0 unless an unrecognized option is given or an
+error occurred.
+</DL>
+
+<DT><B>break</B> [<I>n</I>]<DD>
+Exit from within a
+<B>for</B>,
+
+<B>while</B>,
+
+<B>until</B>,
+
+or
+<B>select</B>
+
+loop. If <I>n</I> is specified, break <I>n</I> levels.
+<I>n</I>
+
+must be >= 1. If
+<I>n</I>
+
+is greater than the number of enclosing loops, all enclosing loops
+are exited.
+The return value is 0 unless <I>n</I> is not greater than or equal to 1.
+<DT><B>builtin</B> <I>shell-builtin</I> [<I>arguments</I>]<DD>
+Execute the specified shell builtin, passing it
+<I>arguments</I>,
+
+and return its exit status.
+This is useful when defining a
+function whose name is the same as a shell builtin,
+retaining the functionality of the builtin within the function.
+The <B>cd</B> builtin is commonly redefined this way.
+The return status is false if
+<I>shell-builtin</I>
+
+is not a shell builtin command.
+<DT><B>caller</B> [<I>expr</I>]<DD>
+Returns the context of any active subroutine call (a shell function or
+a script executed with the <B>.</B> or <B>source</B> builtins.
+Without <I>expr</I>, <B>caller</B> displays the line number and source
+filename of the current subroutine call.
+If a non-negative integer is supplied as <I>expr</I>, <B>caller</B>
+displays the line number, subroutine name, and source file corresponding
+to that position in the current execution call stack. This extra
+information may be used, for example, to print a stack trace. The
+current frame is frame 0.
+The return value is 0 unless the shell is not executing a subroutine
+call or <I>expr</I> does not correspond to a valid position in the
+call stack.
+<DT><B>cd</B> [<B>-L|-P</B>] [<I>dir</I>]<DD>
+Change the current directory to <I>dir</I>. The variable
+<FONT SIZE=-1><B>HOME</B>
+
+</FONT>
+is the
+default
+<I>dir</I>.
+
+The variable
+<FONT SIZE=-1><B>CDPATH</B>
+
+</FONT>
+defines the search path for the directory containing
+<I>dir</I>.
+
+Alternative directory names in
+<FONT SIZE=-1><B>CDPATH</B>
+
+</FONT>
+are separated by a colon (:). A null directory name in
+<FONT SIZE=-1><B>CDPATH</B>
+
+</FONT>
+is the same as the current directory, i.e., ``<B>.</B>''. If
+<I>dir</I>
+
+begins with a slash (/),
+then
+<FONT SIZE=-1><B>CDPATH</B>
+
+</FONT>
+is not used. The
+<B>-P</B>
+
+option says to use the physical directory structure instead of
+following symbolic links (see also the
+<B>-P</B>
+
+option to the
+<B>set</B>
+
+builtin command); the
+<B>-L</B>
+
+option forces symbolic links to be followed. An argument of
+<B>-</B>
+
+is equivalent to
+<FONT SIZE=-1><B>$OLDPWD</B>.
+
+</FONT>
+If a non-empty directory name from
+<FONT SIZE=-1><B>CDPATH</B>
+
+</FONT>
+is used, or if
+<B>-</B> is the first argument, and the directory change is
+successful, the absolute pathname of the new working directory is
+written to the standard output.
+The return value is true if the directory was successfully changed;
+false otherwise.
+<DT><B>command</B> [<B>-pVv</B>] <I>command</I> [<I>arg</I> ...]<DD>
+Run
+<I>command</I>
+
+with
+<I>args</I>
+
+suppressing the normal shell function lookup. Only builtin
+commands or commands found in the
+<FONT SIZE=-1><B>PATH</B>
+
+</FONT>
+are executed. If the
+<B>-p</B>
+
+option is given, the search for
+<I>command</I>
+
+is performed using a default value for
+<FONT SIZE=-1><B>PATH</B>
+
+</FONT>
+that is guaranteed to find all of the standard utilities.
+If either the
+<B>-V</B>
+
+or
+<B>-v</B>
+
+option is supplied, a description of
+<I>command</I>
+
+is printed. The
+<B>-v</B>
+
+option causes a single word indicating the command or file name
+used to invoke
+<I>command</I>
+
+to be displayed; the
+<B>-V</B>
+
+option produces a more verbose description.
+If the
+<B>-V</B>
+
+or
+<B>-v</B>
+
+option is supplied, the exit status is 0 if
+<I>command</I>
+
+was found, and 1 if not. If neither option is supplied and
+an error occurred or
+<I>command</I>
+
+cannot be found, the exit status is 127. Otherwise, the exit status of the
+<B>command</B>
+
+builtin is the exit status of
+<I>command</I>.
+
+<DT><B>compgen</B> [<I>option</I>] [<I>word</I>]<DD>
+Generate possible completion matches for <I>word</I> according to
+the <I>option</I>s, which may be any option accepted by the
+<B>complete</B>
+
+builtin with the exception of <B>-p</B> and <B>-r</B>, and write
+the matches to the standard output.
+When using the <B>-F</B> or <B>-C</B> options, the various shell variables
+set by the programmable completion facilities, while available, will not
+have useful values.
+<P>
+The matches will be generated in the same way as if the programmable
+completion code had generated them directly from a completion specification
+with the same flags.
+If <I>word</I> is specified, only those completions matching <I>word</I>
+will be displayed.
+<P>
+The return value is true unless an invalid option is supplied, or no
+matches were generated.
+<DT><B>complete</B> [<B>-abcdefgjksuv</B>] [<B>-o</B> <I>comp-option</I>] [<B>-DE</B>] [<B>-A</B> <I>action</I>] [<B>-G</B> <I>globpat</I>] [<B>-W</B> <I>wordlist</I>] [<B>-F</B> <I>function</I>] [<B>-C</B> <I>command</I>]<DD>
+<BR>
+
+[<B>-X</B> <I>filterpat</I>] [<B>-P</B> <I>prefix</I>] [<B>-S</B> <I>suffix</I>] <I>name</I> [<I>name ...</I>]
+
+<DT><B>complete</B> <B>-pr</B> [<B>-DE</B>] [<I>name</I> ...]<DD>
+
+Specify how arguments to each <I>name</I> should be completed.
+If the <B>-p</B> option is supplied, or if no options are supplied,
+existing completion specifications are printed in a way that allows
+them to be reused as input.
+The <B>-r</B> option removes a completion specification for
+each <I>name</I>, or, if no <I>name</I>s are supplied, all
+completion specifications.
+The <B>-D</B> option indicates that the remaining options and actions should
+apply to the ``default'' command completion; that is, completion attempted
+on a command for which no completion has previously been defined.
+The <B>-E</B> option indicates that the remaining options and actions should
+apply to ``empty'' command completion; that is, completion attempted on a
+blank line.
+<P>
+The process of applying these completion specifications when word completion
+is attempted is described above under <B>Programmable Completion</B>.
+<P>
+Other options, if specified, have the following meanings.
+The arguments to the <B>-G</B>, <B>-W</B>, and <B>-X</B> options
+(and, if necessary, the <B>-P</B> and <B>-S</B> options)
+should be quoted to protect them from expansion before the
+<B>complete</B>
+
+builtin is invoked.
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>-o</B> <I>comp-option</I><DD>
+The <I>comp-option</I> controls several aspects of the compspec's behavior
+beyond the simple generation of completions.
+<I>comp-option</I> may be one of:
+<DL COMPACT><DT><DD>
+<DL COMPACT>
+<DT><B>bashdefault</B>
+
+<DD>
+Perform the rest of the default <B>bash</B> completions if the compspec
+generates no matches.
+<DT><B>default</B>
+
+<DD>
+Use readline's default filename completion if the compspec generates
+no matches.
+<DT><B>dirnames</B>
+
+<DD>
+Perform directory name completion if the compspec generates no matches.
+<DT><B>filenames</B>
+
+<DD>
+Tell readline that the compspec generates filenames, so it can perform any
+filename-specific processing (like adding a slash to directory names,
+quoting special characters, or suppressing trailing spaces).
+Intended to be used with shell functions.
+<DT><B>nospace</B>
+
+<DD>
+Tell readline not to append a space (the default) to words completed at
+the end of the line.
+<DT><B>plusdirs</B>
+
+<DD>
+After any matches defined by the compspec are generated,
+directory name completion is attempted and any
+matches are added to the results of the other actions.
+</DL></DL>
+
+<DT><B>-A</B> <I>action</I><DD>
+The <I>action</I> may be one of the following to generate a list of possible
+completions:
+<DL COMPACT><DT><DD>
+<DL COMPACT>
+<DT><B>alias</B>
+
+<DD>
+Alias names. May also be specified as <B>-a</B>.
+<DT><B>arrayvar</B>
+
+<DD>
+Array variable names.
+<DT><B>binding</B>
+
+<DD>
+<B>Readline</B> key binding names.
+<DT><B>builtin</B>
+
+<DD>
+Names of shell builtin commands. May also be specified as <B>-b</B>.
+<DT><B>command</B>
+
+<DD>
+Command names. May also be specified as <B>-c</B>.
+<DT><B>directory</B>
+
+<DD>
+Directory names. May also be specified as <B>-d</B>.
+<DT><B>disabled</B>
+
+<DD>
+Names of disabled shell builtins.
+<DT><B>enabled</B>
+
+<DD>
+Names of enabled shell builtins.
+<DT><B>export</B>
+
+<DD>
+Names of exported shell variables. May also be specified as <B>-e</B>.
+<DT><B>file</B>
+
+<DD>
+File names. May also be specified as <B>-f</B>.
+<DT><B>function</B>
+
+<DD>
+Names of shell functions.
+<DT><B>group</B>
+
+<DD>
+Group names. May also be specified as <B>-g</B>.
+<DT><B>helptopic</B>
+
+<DD>
+Help topics as accepted by the <B>help</B> builtin.
+<DT><B>hostname</B>
+
+<DD>
+Hostnames, as taken from the file specified by the
+<FONT SIZE=-1><B>HOSTFILE</B>
+
+</FONT>
+shell variable.
+<DT><B>job</B>
+
+<DD>
+Job names, if job control is active. May also be specified as <B>-j</B>.
+<DT><B>keyword</B>
+
+<DD>
+Shell reserved words. May also be specified as <B>-k</B>.
+<DT><B>running</B>
+
+<DD>
+Names of running jobs, if job control is active.
+<DT><B>service</B>
+
+<DD>
+Service names. May also be specified as <B>-s</B>.
+<DT><B>setopt</B>
+
+<DD>
+Valid arguments for the <B>-o</B> option to the <B>set</B> builtin.
+<DT><B>shopt</B>
+
+<DD>
+Shell option names as accepted by the <B>shopt</B> builtin.
+<DT><B>signal</B>
+
+<DD>
+Signal names.
+<DT><B>stopped</B>
+
+<DD>
+Names of stopped jobs, if job control is active.
+<DT><B>user</B>
+
+<DD>
+User names. May also be specified as <B>-u</B>.
+<DT><B>variable</B>
+
+<DD>
+Names of all shell variables. May also be specified as <B>-v</B>.
+</DL></DL>
+
+<DT><B>-G</B> <I>globpat</I><DD>
+The pathname expansion pattern <I>globpat</I> is expanded to generate
+the possible completions.
+<DT><B>-W</B> <I>wordlist</I><DD>
+The <I>wordlist</I> is split using the characters in the
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+special variable as delimiters, and each resultant word is expanded.
+The possible completions are the members of the resultant list which
+match the word being completed.
+<DT><B>-C</B> <I>command</I><DD>
+<I>command</I> is executed in a subshell environment, and its output is
+used as the possible completions.
+<DT><B>-F</B> <I>function</I><DD>
+The shell function <I>function</I> is executed in the current shell
+environment.
+When it finishes, the possible completions are retrieved from the value
+of the
+<FONT SIZE=-1><B>COMPREPLY</B>
+
+</FONT>
+array variable.
+<DT><B>-X</B> <I>filterpat</I><DD>
+<I>filterpat</I> is a pattern as used for pathname expansion.
+It is applied to the list of possible completions generated by the
+preceding options and arguments, and each completion matching
+<I>filterpat</I> is removed from the list.
+A leading <B>!</B> in <I>filterpat</I> negates the pattern; in this
+case, any completion not matching <I>filterpat</I> is removed.
+<DT><B>-P</B> <I>prefix</I><DD>
+<I>prefix</I> is added at the beginning of each possible completion
+after all other options have been applied.
+<DT><B>-S</B> <I>suffix</I><DD>
+<I>suffix</I> is appended to each possible completion
+after all other options have been applied.
+
+</DL>
+<P>
+
+The return value is true unless an invalid option is supplied, an option
+other than <B>-p</B> or <B>-r</B> is supplied without a <I>name</I>
+argument, an attempt is made to remove a completion specification for
+a <I>name</I> for which no specification exists, or
+an error occurs adding a completion specification.
+</DL>
+
+<DT><B>compopt</B> [<B>-o</B> <I>option</I>] [<B>-DE</B>] [<B>+o</B> <I>option</I>] [<I>name</I>]<DD>
+Modify completion options for each <I>name</I> according to the
+<I>option</I>s, or for the
+currently-execution completion if no <I>name</I>s are supplied.
+If no <I>option</I>s are given, display the completion options for each
+<I>name</I> or the current completion.
+The possible values of <I>option</I> are those valid for the <B>complete</B>
+builtin described above.
+The <B>-D</B> option indicates that the remaining options should
+apply to the ``default'' command completion; that is, completion attempted
+on a command for which no completion has previously been defined.
+The <B>-E</B> option indicates that the remaining options should
+apply to ``empty'' command completion; that is, completion attempted on a
+blank line.
+</DL>
+<P>
+
+The return value is true unless an invalid option is supplied, an attempt
+is made to modify the options for a <I>name</I> for which no completion
+specification exists, or an output error occurs.
+<DL COMPACT>
+<DT><B>continue</B> [<I>n</I>]<DD>
+Resume the next iteration of the enclosing
+<B>for</B>,
+
+<B>while</B>,
+
+<B>until</B>,
+
+or
+<B>select</B>
+
+loop.
+If
+<I>n</I>
+
+is specified, resume at the <I>n</I>th enclosing loop.
+<I>n</I>
+
+must be >= 1. If
+<I>n</I>
+
+is greater than the number of enclosing loops, the last enclosing loop
+(the ``top-level'' loop) is resumed.
+The return value is 0 unless <I>n</I> is not greater than or equal to 1.
+<DT><B>declare</B> [<B>-aAfFilrtux</B>] [<B>-p</B>] [<I>name</I>[=<I>value</I>] ...]<DD>
+
+<DT><B>typeset</B> [<B>-aAfFilrtux</B>] [<B>-p</B>] [<I>name</I>[=<I>value</I>] ...]<DD>
+
+Declare variables and/or give them attributes.
+If no <I>name</I>s are given then display the values of variables.
+The
+<B>-p</B>
+
+option will display the attributes and values of each
+<I>name</I>.
+
+When
+<B>-p</B>
+
+is used with <I>name</I> arguments, additional options are ignored.
+When
+<B>-p</B>
+
+is supplied without <I>name</I> arguments, it will display the attributes
+and values of all variables having the attributes specified by the
+additional options.
+If no other options are supplied with <B>-p</B>, <B>declare</B> will display
+the attributes and values of all shell variables. The <B>-f</B> option
+will restrict the display to shell functions.
+The
+<B>-F</B>
+
+option inhibits the display of function definitions; only the
+function name and attributes are printed.
+If the <B>extdebug</B> shell option is enabled using <B>shopt</B>,
+the source file name and line number where the function is defined
+are displayed as well. The
+<B>-F</B>
+
+option implies
+<B>-f</B>.
+
+The following options can
+be used to restrict output to variables with the specified attribute or
+to give variables attributes:
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>-a</B>
+
+<DD>
+Each <I>name</I> is an indexed array variable (see
+<B>Arrays</B>
+
+above).
+<DT><B>-A</B>
+
+<DD>
+Each <I>name</I> is an associative array variable (see
+<B>Arrays</B>
+
+above).
+<DT><B>-f</B>
+
+<DD>
+Use function names only.
+<DT><B>-i</B>
+
+<DD>
+The variable is treated as an integer; arithmetic evaluation (see
+<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>
+
+</FONT>
+above) is performed when the variable is assigned a value.
+<DT><B>-l</B>
+
+<DD>
+When the variable is assigned a value, all upper-case characters are
+converted to lower-case.
+The upper-case attribute is disabled.
+<DT><B>-r</B>
+
+<DD>
+Make <I>name</I>s readonly. These names cannot then be assigned values
+by subsequent assignment statements or unset.
+<DT><B>-t</B>
+
+<DD>
+Give each <I>name</I> the <I>trace</I> attribute.
+Traced functions inherit the <B>DEBUG</B> and <B>RETURN</B> traps from
+the calling shell.
+The trace attribute has no special meaning for variables.
+<DT><B>-u</B>
+
+<DD>
+When the variable is assigned a value, all lower-case characters are
+converted to upper-case.
+The lower-case attribute is disabled.
+<DT><B>-x</B>
+
+<DD>
+Mark <I>name</I>s for export to subsequent commands via the environment.
+
+</DL>
+<P>
+
+Using `+' instead of `-'
+turns off the attribute instead,
+with the exceptions that <B>+a</B>
+may not be used to destroy an array variable and <B>+r</B> will not
+remove the readonly attribute.
+When used in a function,
+makes each
+<I>name</I> local, as with the
+<B>local</B>
+
+command.
+If a variable name is followed by =<I>value</I>, the value of
+the variable is set to <I>value</I>.
+The return value is 0 unless an invalid option is encountered,
+an attempt is made to define a function using
+
+<TT>-f foo=bar</TT>,
+an attempt is made to assign a value to a readonly variable,
+an attempt is made to assign a value to an array variable without
+using the compound assignment syntax (see
+<B>Arrays</B>
+
+above), one of the <I>names</I> is not a valid shell variable name,
+an attempt is made to turn off readonly status for a readonly variable,
+an attempt is made to turn off array status for an array variable,
+or an attempt is made to display a non-existent function with <B>-f</B>.
+</DL>
+
+<DT><B>dirs [+</B><I>n</I>] [-<I>n</I>] [<B>-cplv</B>]
+
+<DD>
+Without options, displays the list of currently remembered directories.
+The default display is on a single line with directory names separated
+by spaces.
+Directories are added to the list with the
+<B>pushd</B>
+
+command; the
+<B>popd</B>
+
+command removes entries from the list.
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>+</B><I>n</I><DD>
+Displays the <I>n</I>th entry counting from the left of the list
+shown by
+<B>dirs</B>
+
+when invoked without options, starting with zero.
+<DT><B>-</B><I>n</I><DD>
+Displays the <I>n</I>th entry counting from the right of the list
+shown by
+<B>dirs</B>
+
+when invoked without options, starting with zero.
+<DT><B>-c</B>
+
+<DD>
+Clears the directory stack by deleting all of the entries.
+<DT><B>-l</B>
+
+<DD>
+Produces a longer listing; the default listing format uses a
+tilde to denote the home directory.
+<DT><B>-p</B>
+
+<DD>
+Print the directory stack with one entry per line.
+<DT><B>-v</B>
+
+<DD>
+Print the directory stack with one entry per line,
+prefixing each entry with its index in the stack.
+
+</DL>
+<P>
+
+The return value is 0 unless an
+invalid option is supplied or <I>n</I> indexes beyond the end
+of the directory stack.
+</DL>
+
+<DT><B>disown</B> [<B>-ar</B>] [<B>-h</B>] [<I>jobspec</I> ...]<DD>
+Without options, each
+<I>jobspec</I>
+
+is removed from the table of active jobs.
+If
+<I>jobspec</I>
+
+is not present, and neither <B>-a</B> nor <B>-r</B> is supplied,
+the shell's notion of the <I>current job</I> is used.
+If the <B>-h</B> option is given, each
+<I>jobspec</I>
+
+is not removed from the table, but is marked so that
+<FONT SIZE=-1><B>SIGHUP</B>
+
+</FONT>
+is not sent to the job if the shell receives a
+<FONT SIZE=-1><B>SIGHUP</B>.
+
+</FONT>
+If no
+<I>jobspec</I>
+
+is present, and neither the
+<B>-a</B>
+
+nor the
+<B>-r</B>
+
+option is supplied, the <I>current job</I> is used.
+If no
+<I>jobspec</I>
+
+is supplied, the
+<B>-a</B>
+
+option means to remove or mark all jobs; the
+<B>-r</B>
+
+option without a
+<I>jobspec</I>
+
+argument restricts operation to running jobs.
+The return value is 0 unless a
+<I>jobspec</I>
+
+does not specify a valid job.
+<DT><B>echo</B> [<B>-neE</B>] [<I>arg</I> ...]<DD>
+Output the <I>arg</I>s, separated by spaces, followed by a newline.
+The return status is always 0.
+If <B>-n</B> is specified, the trailing newline is
+suppressed. If the <B>-e</B> option is given, interpretation of
+the following backslash-escaped characters is enabled. The
+<B>-E</B>
+
+option disables the interpretation of these escape characters,
+even on systems where they are interpreted by default.
+The <B>xpg_echo</B> shell option may be used to
+dynamically determine whether or not <B>echo</B> expands these
+escape characters by default.
+<B>echo</B>
+
+does not interpret <B>--</B> to mean the end of options.
+<B>echo</B>
+
+interprets the following escape sequences:
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>\a</B>
+
+<DD>
+alert (bell)
+<DT><B>\b</B>
+
+<DD>
+backspace
+<DT><B>\c</B>
+
+<DD>
+suppress further output
+<DT><B>\e</B>
+
+<DD>
+an escape character
+<DT><B>\f</B>
+
+<DD>
+form feed
+<DT><B>\n</B>
+
+<DD>
+new line
+<DT><B>\r</B>
+
+<DD>
+carriage return
+<DT><B>\t</B>
+
+<DD>
+horizontal tab
+<DT><B>\v</B>
+
+<DD>
+vertical tab
+<DT><B>\\</B>
+
+<DD>
+backslash
+<DT><B>\0</B><I>nnn</I>
+
+<DD>
+the eight-bit character whose value is the octal value <I>nnn</I>
+(zero to three octal digits)
+<DT><B>\x</B><I>HH</I>
+
+<DD>
+the eight-bit character whose value is the hexadecimal value <I>HH</I>
+(one or two hex digits)
+
+</DL></DL>
+
+<DT><B>enable</B> [<B>-a</B>] [<B>-dnps</B>] [<B>-f</B> <I>filename</I>] [<I>name</I> ...]<DD>
+Enable and disable builtin shell commands.
+Disabling a builtin allows a disk command which has the same name
+as a shell builtin to be executed without specifying a full pathname,
+even though the shell normally searches for builtins before disk commands.
+If <B>-n</B> is used, each <I>name</I>
+is disabled; otherwise,
+<I>names</I> are enabled. For example, to use the
+<B>test</B>
+
+binary found via the
+<FONT SIZE=-1><B>PATH</B>
+
+</FONT>
+instead of the shell builtin version, run
+<TT>enable -n test</TT>.
+
+The
+<B>-f</B>
+
+option means to load the new builtin command
+<I>name</I>
+
+from shared object
+<I>filename</I>,
+
+on systems that support dynamic loading. The
+<B>-d</B>
+
+option will delete a builtin previously loaded with
+<B>-f</B>.
+
+If no <I>name</I> arguments are given, or if the
+<B>-p</B>
+
+option is supplied, a list of shell builtins is printed.
+With no other option arguments, the list consists of all enabled
+shell builtins.
+If <B>-n</B> is supplied, only disabled builtins are printed.
+If <B>-a</B> is supplied, the list printed includes all builtins, with an
+indication of whether or not each is enabled.
+If <B>-s</B> is supplied, the output is restricted to the POSIX
+<I>special</I> builtins.
+The return value is 0 unless a
+<I>name</I>
+
+is not a shell builtin or there is an error loading a new builtin
+from a shared object.
+<DT><B>eval</B> [<I>arg</I> ...]<DD>
+The <I>arg</I>s are read and concatenated together into a single
+command. This command is then read and executed by the shell, and
+its exit status is returned as the value of
+<B>eval</B>.
+
+If there are no
+<I>args</I>,
+
+or only null arguments,
+<B>eval</B>
+
+returns 0.
+<DT><B>exec</B> [<B>-cl</B>] [<B>-a</B> <I>name</I>] [<I>command</I> [<I>arguments</I>]]<DD>
+If
+<I>command</I>
+
+is specified, it replaces the shell.
+No new process is created. The
+<I>arguments</I>
+
+become the arguments to <I>command</I>.
+If the
+<B>-l</B>
+
+option is supplied,
+the shell places a dash at the beginning of the zeroth argument passed to
+<I>command</I>.
+
+This is what
+<I>login</I>(1)
+
+does. The
+<B>-c</B>
+
+option causes
+<I>command</I>
+
+to be executed with an empty environment. If
+<B>-a</B>
+
+is supplied, the shell passes
+<I>name</I>
+
+as the zeroth argument to the executed command. If
+<I>command</I>
+
+cannot be executed for some reason, a non-interactive shell exits,
+unless the shell option
+<B>execfail</B>
+
+is enabled, in which case it returns failure.
+An interactive shell returns failure if the file cannot be executed.
+If
+<I>command</I>
+
+is not specified, any redirections take effect in the current shell,
+and the return status is 0. If there is a redirection error, the
+return status is 1.
+<DT><B>exit</B> [<I>n</I>]<DD>
+Cause the shell to exit
+with a status of <I>n</I>. If
+<I>n</I>
+
+is omitted, the exit status
+is that of the last command executed.
+A trap on
+<FONT SIZE=-1><B>EXIT</B>
+
+</FONT>
+is executed before the shell terminates.
+<DT><B>export</B> [<B>-fn</B>] [<I>name</I>[=<I>word</I>]] ...<DD>
+
+<DT><B>export -p</B>
+
+<DD>
+
+The supplied
+<I>names</I>
+
+are marked for automatic export to the environment of
+subsequently executed commands. If the
+<B>-f</B>
+
+option is given,
+the
+<I>names</I>
+
+refer to functions.
+If no
+<I>names</I>
+
+are given, or if the
+<B>-p</B>
+
+option is supplied, a list
+of all names that are exported in this shell is printed.
+The
+<B>-n</B>
+
+option causes the export property to be removed from each
+<I>name</I>.
+If a variable name is followed by =<I>word</I>, the value of
+the variable is set to <I>word</I>.
+<B>export</B>
+
+returns an exit status of 0 unless an invalid option is
+encountered,
+one of the <I>names</I> is not a valid shell variable name, or
+<B>-f</B>
+
+is supplied with a
+<I>name</I>
+
+that is not a function.
+<DT><B>fc</B> [<B>-e</B> <I>ename</I>] [<B>-lnr</B>] [<I>first</I>] [<I>last</I>]<DD>
+
+<DT><B>fc</B> <B>-s</B> [<I>pat</I>=<I>rep</I>] [<I>cmd</I>]<DD>
+
+Fix Command. In the first form, a range of commands from
+<I>first</I>
+
+to
+<I>last</I>
+
+is selected from the history list.
+<I>First</I>
+
+and
+<I>last</I>
+
+may be specified as a string (to locate the last 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
+<I>last</I>
+
+is not specified it is set to
+the current command for listing (so that
+
+<TT>fc -l -10</TT>
+prints the last 10 commands) and to
+<I>first</I>
+
+otherwise.
+If
+<I>first</I>
+
+is not specified it is set to the previous
+command for editing and -16 for listing.
+<P>
+The
+<B>-n</B>
+
+option suppresses
+the command numbers when listing. The
+<B>-r</B>
+
+option reverses the order of
+the commands. If the
+<B>-l</B>
+
+option is given,
+the commands are listed on
+standard output. Otherwise, the editor given by
+<I>ename</I>
+
+is invoked
+on a file containing those commands. If
+<I>ename</I>
+
+is not given, the
+value of the
+<FONT SIZE=-1><B>FCEDIT</B>
+
+</FONT>
+variable is used, and
+the value of
+<FONT SIZE=-1><B>EDITOR</B>
+
+</FONT>
+if
+<FONT SIZE=-1><B>FCEDIT</B>
+
+</FONT>
+is not set. If neither variable is set,
+
+<I>vi</I>
+
+is used. When editing is complete, the edited commands are
+echoed and executed.
+<P>
+In the second form, <I>command</I> is re-executed after each instance
+of <I>pat</I> is replaced by <I>rep</I>.
+A useful alias to use with this is
+
+<TT>r='fc -s'</TT>,
+so that typing
+
+<TT>r cc</TT>
+runs the last command beginning with
+
+<TT>cc</TT>
+and typing
+
+<TT>r</TT>
+re-executes the last command.
+<P>
+If the first form is used, the return value is 0 unless an invalid
+option is encountered or
+<I>first</I>
+
+or
+<I>last</I>
+
+specify history lines out of range.
+If the
+<B>-e</B>
+
+option is supplied, the return value is the value of the last
+command executed or failure if an error occurs with the temporary
+file of commands. If the second form is used, the return status
+is that of the command re-executed, unless
+<I>cmd</I>
+
+does not specify a valid history line, in which case
+<B>fc</B>
+
+returns failure.
+<DT><B>fg</B> [<I>jobspec</I>]<DD>
+Resume
+<I>jobspec</I>
+
+in the foreground, and make it the current job.
+If
+<I>jobspec</I>
+
+is not present, the shell's notion of the <I>current job</I> is used.
+The return value is that of the command placed into the foreground,
+or failure if run when job control is disabled or, when run with
+job control enabled, if
+<I>jobspec</I>
+
+does not specify a valid job or
+<I>jobspec</I>
+
+specifies a job that was started without job control.
+<DT><B>getopts</B> <I>optstring</I> <I>name</I> [<I>args</I>]<DD>
+<B>getopts</B>
+
+is used by shell procedures to parse positional parameters.
+<I>optstring</I>
+
+contains the option characters to be recognized; if a character
+is followed by a colon, the option is expected to have an
+argument, which should be separated from it by white space.
+The colon and question mark characters may not be used as
+option characters.
+Each time it is invoked,
+<B>getopts</B>
+
+places the next option in the shell variable
+<I>name</I>,
+
+initializing
+<I>name</I>
+
+if it does not exist,
+and the index of the next argument to be processed into the
+variable
+<FONT SIZE=-1><B>OPTIND</B>.
+
+</FONT>
+<FONT SIZE=-1><B>OPTIND</B>
+
+</FONT>
+is initialized to 1 each time the shell or a shell script
+is invoked. When an option requires an argument,
+<B>getopts</B>
+
+places that argument into the variable
+<FONT SIZE=-1><B>OPTARG</B>.
+
+</FONT>
+The shell does not reset
+<FONT SIZE=-1><B>OPTIND</B>
+
+</FONT>
+automatically; it must be manually reset between multiple
+calls to
+<B>getopts</B>
+
+within the same shell invocation if a new set of parameters
+is to be used.
+<P>
+When the end of options is encountered, <B>getopts</B> exits with a
+return value greater than zero.
+<FONT SIZE=-1><B>OPTIND</B>
+
+</FONT>
+is set to the index of the first non-option argument,
+and <B>name</B> is set to ?.
+<P>
+<B>getopts</B>
+
+normally parses the positional parameters, but if more arguments are
+given in
+<I>args</I>,
+
+<B>getopts</B>
+
+parses those instead.
+<P>
+<B>getopts</B>
+
+can report errors in two ways. If the first character of
+<I>optstring</I>
+
+is a colon,
+<I>silent</I>
+
+error reporting is used. In normal operation diagnostic messages
+are printed when invalid options or missing option arguments are
+encountered.
+If the variable
+<FONT SIZE=-1><B>OPTERR</B>
+
+</FONT>
+is set to 0, no error messages will be displayed, even if the first
+character of
+<I>optstring</I>
+
+is not a colon.
+<P>
+If an invalid option is seen,
+<B>getopts</B>
+
+places ? into
+<I>name</I>
+
+and, if not silent,
+prints an error message and unsets
+<FONT SIZE=-1><B>OPTARG</B>.
+
+</FONT>
+If
+<B>getopts</B>
+
+is silent,
+the option character found is placed in
+<FONT SIZE=-1><B>OPTARG</B>
+
+</FONT>
+and no diagnostic message is printed.
+<P>
+If a required argument is not found, and
+<B>getopts</B>
+
+is not silent,
+a question mark (<B>?</B>) is placed in
+<I>name</I>,
+
+<FONT SIZE=-1><B>OPTARG</B>
+
+</FONT>
+is unset, and a diagnostic message is printed.
+If
+<B>getopts</B>
+
+is silent, then a colon (<B>:</B>) is placed in
+<I>name</I>
+
+and
+<FONT SIZE=-1><B>OPTARG</B>
+
+</FONT>
+is set to the option character found.
+<P>
+<B>getopts</B>
+
+returns true if an option, specified or unspecified, is found.
+It returns false if the end of options is encountered or an
+error occurs.
+<DT><B>hash</B> [<B>-lr</B>] [<B>-p</B> <I>filename</I>] [<B>-dt</B>] [<I>name</I>]<DD>
+For each
+<I>name</I>,
+
+the full file name of the command is determined by searching
+the directories in
+<B>$PATH</B>
+
+and remembered.
+If the
+<B>-p</B>
+
+option is supplied, no path search is performed, and
+<I>filename</I>
+
+is used as the full file name of the command.
+The
+<B>-r</B>
+
+option causes the shell to forget all
+remembered locations.
+The
+<B>-d</B>
+
+option causes the shell to forget the remembered location of each <I>name</I>.
+If the
+<B>-t</B>
+
+option is supplied, the full pathname to which each <I>name</I> corresponds
+is printed. If multiple <I>name</I> arguments are supplied with <B>-t</B>,
+the <I>name</I> is printed before the hashed full pathname.
+The
+<B>-l</B>
+
+option causes output to be displayed in a format that may be reused as input.
+If no arguments are given, or if only <B>-l</B> is supplied,
+information about remembered commands is printed.
+The return status is true unless a
+<I>name</I>
+
+is not found or an invalid option is supplied.
+<DT><B>help</B> [<B>-dms</B>] [<I>pattern</I>]<DD>
+Display helpful information about builtin commands. If
+<I>pattern</I>
+
+is specified,
+<B>help</B>
+
+gives detailed help on all commands matching
+<I>pattern</I>;
+
+otherwise help for all the builtins and shell control structures
+is printed.
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>-d</B>
+
+<DD>
+Display a short description of each <I>pattern</I>
+<DT><B>-m</B>
+
+<DD>
+Display the description of each <I>pattern</I> in a manpage-like format
+<DT><B>-s</B>
+
+<DD>
+Display only a short usage synopsis for each <I>pattern</I>
+
+</DL></DL>
+
+The return status is 0 unless no command matches
+<I>pattern</I>.
+
+<DT><B>history [</B><I>n</I>]<DD>
+
+<DT><B>history</B> <B>-c</B><DD>
+<DT><B>history -d</B> <I>offset</I><DD>
+<DT><B>history</B> <B>-anrw</B> [<I>filename</I>]<DD>
+<DT><B>history</B> <B>-p</B> <I>arg</I> [<I>arg ...</I>]<DD>
+<DT><B>history</B> <B>-s</B> <I>arg</I> [<I>arg ...</I>]<DD>
+
+With no options, display the command
+history list with line numbers. Lines listed
+with a
+<B>*</B>
+
+have been modified. An argument of
+<I>n</I>
+
+lists only the last
+<I>n</I>
+
+lines.
+If the shell variable
+<FONT SIZE=-1><B>HISTTIMEFORMAT</B>
+
+</FONT>
+is set and not null,
+it is used as a format string for <I>strftime</I>(3) 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.
+If <I>filename</I> is supplied, it is used as the
+name of the history file; if not, the value of
+<FONT SIZE=-1><B>HISTFILE</B>
+
+</FONT>
+is used. Options, if supplied, have the following meanings:
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>-c</B>
+
+<DD>
+Clear the history list by deleting all the entries.
+<DT><B>-d</B> <I>offset</I><DD>
+Delete the history entry at position <I>offset</I>.
+<DT><B>-a</B>
+
+<DD>
+Append the ``new'' history lines (history lines entered since the
+beginning of the current <B>bash</B> session) to the history file.
+<DT><B>-n</B>
+
+<DD>
+Read the history lines not already read from the history
+file into the current history list. These are lines
+appended to the history file since the beginning of the
+current <B>bash</B> session.
+<DT><B>-r</B>
+
+<DD>
+Read the contents of the history file
+and use them as the current history.
+<DT><B>-w</B>
+
+<DD>
+Write the current history to the history file, overwriting the
+history file's contents.
+<DT><B>-p</B>
+
+<DD>
+Perform history substitution on the following <I>args</I> and display
+the result on the standard output.
+Does not store the results in the history list.
+Each <I>arg</I> must be quoted to disable normal history expansion.
+<DT><B>-s</B>
+
+<DD>
+Store the
+<I>args</I>
+
+in the history list as a single entry. The last command in the
+history list is removed before the
+<I>args</I>
+
+are added.
+
+</DL>
+<P>
+
+If the
+<FONT SIZE=-1><B>HISTTIMEFORMAT</B>
+
+</FONT>
+variable 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 return value is 0 unless an invalid option is encountered, an
+error occurs while reading or writing the history file, an invalid
+<I>offset</I> is supplied as an argument to <B>-d</B>, or the
+history expansion supplied as an argument to <B>-p</B> fails.
+</DL>
+
+<DT><B>jobs</B> [<B>-lnprs</B>] [ <I>jobspec</I> ... ]<DD>
+
+<DT><B>jobs</B> <B>-x</B> <I>command</I> [ <I>args</I> ... ]<DD>
+
+The first form lists the active jobs. The options have the following
+meanings:
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>-l</B>
+
+<DD>
+List process IDs
+in addition to the normal information.
+<DT><B>-p</B>
+
+<DD>
+List only the process ID of the job's process group
+leader.
+<DT><B>-n</B>
+
+<DD>
+Display information only about jobs that have changed status since
+the user was last notified of their status.
+<DT><B>-r</B>
+
+<DD>
+Restrict output to running jobs.
+<DT><B>-s</B>
+
+<DD>
+Restrict output to stopped jobs.
+
+</DL>
+<P>
+
+If
+<I>jobspec</I>
+
+is given, output is restricted to information about that job.
+The return status is 0 unless an invalid option is encountered
+or an invalid
+<I>jobspec</I>
+
+is supplied.
+<P>
+
+If the
+<B>-x</B>
+
+option is supplied,
+<B>jobs</B>
+
+replaces any
+<I>jobspec</I>
+
+found in
+<I>command</I>
+
+or
+<I>args</I>
+
+with the corresponding process group ID, and executes
+<I>command</I>
+
+passing it
+<I>args</I>,
+
+returning its exit status.
+</DL>
+
+<DT><B>kill</B> [<B>-s</B> <I>sigspec</I> | <B>-n</B> <I>signum</I> | <B>-</B><I>sigspec</I>] [<I>pid</I> | <I>jobspec</I>] ...<DD>
+
+<DT><B>kill</B> <B>-l</B> [<I>sigspec</I> | <I>exit_status</I>]<DD>
+
+Send the signal named by
+<I>sigspec</I>
+
+or
+<I>signum</I>
+
+to the processes named by
+<I>pid</I>
+
+or
+<I>jobspec</I>.
+
+<I>sigspec</I>
+
+is either a case-insensitive signal name such as
+<FONT SIZE=-1><B>SIGKILL</B>
+
+</FONT>
+(with or without the
+<FONT SIZE=-1><B>SIG</B>
+
+</FONT>
+prefix) or a signal number;
+<I>signum</I>
+
+is a signal number.
+If
+<I>sigspec</I>
+
+is not present, then
+<FONT SIZE=-1><B>SIGTERM</B>
+
+</FONT>
+is assumed.
+An argument of
+<B>-l</B>
+
+lists the signal names.
+If any arguments are supplied when
+<B>-l</B>
+
+is given, the names of the signals corresponding to the arguments are
+listed, and the return status is 0.
+The <I>exit_status</I> argument to
+<B>-l</B>
+
+is a number specifying either a signal number or the exit status of
+a process terminated by a signal.
+<B>kill</B>
+
+returns true if at least one signal was successfully sent, or false
+if an error occurs or an invalid option is encountered.
+<DT><B>let</B> <I>arg</I> [<I>arg</I> ...]<DD>
+Each
+<I>arg</I>
+
+is an arithmetic expression to be evaluated (see
+<FONT SIZE=-1><B>ARITHMETIC EVALUATION</B>
+
+</FONT>
+above).
+If the last
+<I>arg</I>
+
+evaluates to 0,
+<B>let</B>
+
+returns 1; 0 is returned otherwise.
+<DT><B>local</B> [<I>option</I>] [<I>name</I>[=<I>value</I>] ...]<DD>
+For each argument, a local variable named
+<I>name </I>
+
+is created, and assigned
+<I>value</I>.
+
+The <I>option</I> can be any of the options accepted by <B>declare</B>.
+When
+<B>local</B>
+
+is used within a function, it causes the variable
+<I>name</I>
+
+to have a visible scope restricted to that function and its children.
+With no operands,
+<B>local</B>
+
+writes a list of local variables to the standard output. It is
+an error to use
+<B>local</B>
+
+when not within a function. The return status is 0 unless
+<B>local</B>
+
+is used outside a function, an invalid
+<I>name</I>
+
+is supplied, or
+<I>name</I> is a readonly variable.
+<DT><B>logout</B>
+
+<DD>
+Exit a login shell.
+<DT><B>mapfile</B> [<B>-n</B> <I>count</I>] [<B>-O</B> <I>origin</I>] [<B>-s</B> <I>count</I>] [<B>-t</B>] [<B>-u</B> <I>fd</I>] [<B>-C</B> <I>callback</I>] [<B>-c</B> <I>quantum</I>] [<I>array</I>]<DD>
+
+<DT><B>readarray</B> [<B>-n</B> <I>count</I>] [<B>-O</B> <I>origin</I>] [<B>-s</B> <I>count</I>] [<B>-t</B>] [<B>-u</B> <I>fd</I>] [<B>-C</B> <I>callback</I>] [<B>-c</B> <I>quantum</I>] [<I>array</I>]<DD>
+
+Read lines from the standard input into the indexed array variable
+<I>array</I>,
+
+or from file descriptor
+<I>fd</I>
+
+if the
+<B>-u</B>
+
+option is supplied.
+The variable
+<FONT SIZE=-1><B>MAPFILE</B>
+
+</FONT>
+is the default <I>array</I>.
+Options, if supplied, have the following meanings:
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>-n</B>
+
+<DD>
+Copy at most
+<I>count</I>
+
+lines. If <I>count</I> is 0, all lines are copied.
+<DT><B>-O</B>
+
+<DD>
+Begin assigning to
+<I>array</I>
+
+at index
+<I>origin</I>.
+
+The default index is 0.
+<DT><B>-s</B>
+
+<DD>
+Discard the first <I>count</I> lines read.
+<DT><B>-t</B>
+
+<DD>
+Remove a trailing newline from each line read.
+<DT><B>-u</B>
+
+<DD>
+Read lines from file descriptor <I>fd</I> instead of the standard input.
+<DT><B>-C</B>
+
+<DD>
+Evaluate
+<I>callback</I>
+
+each time <I>quantum</I> lines are read. The <B>-c</B> option specifies
+<I>quantum</I>.
+
+<DT><B>-c</B>
+
+<DD>
+Specify the number of lines read between each call to
+<I>callback</I>.
+
+
+</DL>
+<P>
+
+If
+<B>-C</B>
+
+is specified without
+<B>-c</B>,
+
+the default quantum is 5000.
+When <I>callback</I> is evaluated, it is supplied the index of the next
+array element to be assigned as an additional argument.
+<I>callback</I> is evaluated after the line is read but before the
+array element is assigned.
+<P>
+
+If not supplied with an explicit origin, <B>mapfile</B> will clear <I>array</I>
+before assigning to it.
+<P>
+
+<B>mapfile</B> returns successfully unless an invalid option or option
+argument is supplied, <I>array</I> is invalid or unassignable, or if
+<I>array</I> is not an indexed array.
+</DL>
+
+<DT><B>popd</B> [-<B>n</B>] [+<I>n</I>] [-<I>n</I>]<DD>
+Removes entries from the directory stack. With no arguments,
+removes the top directory from the stack, and performs a
+<B>cd</B>
+
+to the new top directory.
+Arguments, if supplied, have the following meanings:
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>-n</B>
+
+<DD>
+Suppresses the normal change of directory when removing directories
+from the stack, so that only the stack is manipulated.
+<DT><B>+</B><I>n</I><DD>
+Removes the <I>n</I>th entry counting from the left of the list
+shown by
+<B>dirs</B>,
+
+starting with zero. For example:
+
+<TT>popd +0</TT>
+removes the first directory,
+
+<TT>popd +1</TT>
+the second.
+<DT><B>-</B><I>n</I><DD>
+Removes the <I>n</I>th entry counting from the right of the list
+shown by
+<B>dirs</B>,
+
+starting with zero. For example:
+
+<TT>popd -0</TT>
+removes the last directory,
+
+<TT>popd -1</TT>
+the next to last.
+
+</DL>
+<P>
+
+If the
+<B>popd</B>
+
+command is successful, a
+<B>dirs</B>
+
+is performed as well, and the return status is 0.
+<B>popd</B>
+
+returns false if an invalid option is encountered, the directory stack
+is empty, a non-existent directory stack entry is specified, or the
+directory change fails.
+</DL>
+
+<DT><B>printf</B> [<B>-v</B> <I>var</I>] <I>format</I> [<I>arguments</I>]<DD>
+Write the formatted <I>arguments</I> to the standard output under the
+control of the <I>format</I>.
+The <I>format</I> is a character string which contains three types of objects:
+plain characters, which are simply copied to standard output, character
+escape sequences, which are converted and copied to the standard output, and
+format specifications, each of which causes printing of the next successive
+<I>argument</I>.
+In addition to the standard <I>printf</I>(1) formats, <B>%b</B> causes
+<B>printf</B> to expand backslash escape sequences in the corresponding
+<I>argument</I> (except that <B>\c</B> terminates output, backslashes in
+<B>\aq</B>, <B>\&quot;</B>, and <B>\?</B> are not removed, and octal escapes
+beginning with <B>\0</B> may contain up to four digits),
+and <B>%q</B> causes <B>printf</B> to output the corresponding
+<I>argument</I> in a format that can be reused as shell input.
+<P>
+The <B>-v</B> option causes the output to be assigned to the variable
+<I>var</I> rather than being printed to the standard output.
+<P>
+The <I>format</I> is reused as necessary to consume all of the <I>arguments</I>.
+If the <I>format</I> requires more <I>arguments</I> than are supplied, the
+extra format specifications behave as if a zero value or null string, as
+appropriate, had been supplied. The return value is zero on success,
+non-zero on failure.
+<DT><B>pushd</B> [<B>-n</B>] [+<I>n</I>] [-<I>n</I>]<DD>
+
+<DT><B>pushd</B> [<B>-n</B>] [<I>dir</I>]<DD>
+
+Adds a directory to the top of the directory stack, or rotates
+the stack, making the new top of the stack the current working
+directory. With no arguments, exchanges the top two directories
+and returns 0, unless the directory stack is empty.
+Arguments, if supplied, have the following meanings:
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>-n</B>
+
+<DD>
+Suppresses the normal change of directory when adding directories
+to the stack, so that only the stack is manipulated.
+<DT><B>+</B><I>n</I><DD>
+Rotates the stack so that the <I>n</I>th directory
+(counting from the left of the list shown by
+<B>dirs</B>,
+
+starting with zero)
+is at the top.
+<DT><B>-</B><I>n</I><DD>
+Rotates the stack so that the <I>n</I>th directory
+(counting from the right of the list shown by
+<B>dirs</B>,
+
+starting with zero) is at the top.
+<DT><I>dir</I>
+
+<DD>
+Adds
+<I>dir</I>
+
+to the directory stack at the top, making it the
+new current working directory.
+
+</DL>
+<P>
+
+If the
+<B>pushd</B>
+
+command is successful, a
+<B>dirs</B>
+
+is performed as well.
+If the first form is used,
+<B>pushd</B>
+
+returns 0 unless the cd to
+<I>dir</I>
+
+fails. With the second form,
+<B>pushd</B>
+
+returns 0 unless the directory stack is empty,
+a non-existent directory stack element is specified,
+or the directory change to the specified new current directory
+fails.
+</DL>
+
+<DT><B>pwd</B> [<B>-LP</B>]<DD>
+Print the absolute pathname of the current working directory.
+The pathname printed contains no symbolic links if the
+<B>-P</B>
+
+option is supplied or the
+<B>-o physical</B>
+
+option to the
+<B>set</B>
+
+builtin command is enabled.
+If the
+<B>-L</B>
+
+option is used, the pathname printed may contain symbolic links.
+The return status is 0 unless an error occurs while
+reading the name of the current directory or an
+invalid option is supplied.
+<DT><B>read</B> [<B>-ers</B>] [<B>-a</B> <I>aname</I>] [<B>-d</B> <I>delim</I>] [<B>-i</B> <I>text</I>] [<B>-n</B> <I>nchars</I>] [<B>-N</B> <I>nchars</I>] [<B>-p</B> <I>prompt</I>] [<B>-t</B> <I>timeout</I>] [<B>-u</B> <I>fd</I>] [<I>name</I> ...]<DD>
+One line is read from the standard input, or from the file descriptor
+<I>fd</I> supplied as an argument to the <B>-u</B> option, and the first word
+is assigned to the first
+<I>name</I>,
+
+the second word to the second
+<I>name</I>,
+
+and so on, with leftover words and their intervening separators assigned
+to the last
+<I>name</I>.
+
+If there are fewer words read from the input stream than names,
+the remaining names are assigned empty values.
+The characters in
+<FONT SIZE=-1><B>IFS</B>
+
+</FONT>
+are used to split the line into words.
+The backslash character (<B>\</B>) may be used to remove any special
+meaning for the next character read and for line continuation.
+Options, if supplied, have the following meanings:
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>-a </B><I>aname</I>
+
+<DD>
+The words are assigned to sequential indices
+of the array variable
+<I>aname</I>,
+
+starting at 0.
+<I>aname</I>
+
+is unset before any new values are assigned.
+Other <I>name</I> arguments are ignored.
+<DT><B>-d </B><I>delim</I>
+
+<DD>
+The first character of <I>delim</I> is used to terminate the input line,
+rather than newline.
+<DT><B>-e</B>
+
+<DD>
+If the standard input
+is coming from a terminal,
+<B>readline</B>
+
+(see
+<FONT SIZE=-1><B>READLINE</B>
+
+</FONT>
+above) is used to obtain the line.
+Readline uses the current (or default, if line editing was not previously
+active) editing settings.
+<DT><B>-i </B><I>text</I>
+
+<DD>
+If
+<B>readline</B>
+
+is being used to read the line, <I>text</I> is placed into the editing
+buffer before editing begins.
+<DT><B>-n </B><I>nchars</I>
+
+<DD>
+<B>read</B> returns after reading <I>nchars</I> characters rather than
+waiting for a complete line of input, but honor a delimiter if fewer
+than <I>nchars</I> characters are read before the delimiter.
+<DT><B>-N </B><I>nchars</I>
+
+<DD>
+<B>read</B> returns after reading exactly <I>nchars</I> characters rather
+than waiting for a complete line of input, unless EOF is encountered or
+<B>read</B> times out.
+Delimiter characters encountered in the input are
+not treated specially and do not cause <B>read</B> to return until
+<I>nchars</I> characters are read.
+<DT><B>-p </B><I>prompt</I>
+
+<DD>
+Display <I>prompt</I> on standard error, without a
+trailing newline, before attempting to read any input. The prompt
+is displayed only if input is coming from a terminal.
+<DT><B>-r</B>
+
+<DD>
+Backslash does not act as an escape character.
+The backslash is considered to be part of the line.
+In particular, a backslash-newline pair may not be used as a line
+continuation.
+<DT><B>-s</B>
+
+<DD>
+Silent mode. If input is coming from a terminal, characters are
+not echoed.
+<DT><B>-t </B><I>timeout</I>
+
+<DD>
+Cause <B>read</B> to time out and return failure if a complete line of
+input is not read within <I>timeout</I> seconds.
+<I>timeout</I> may be a decimal number with a fractional portion following
+the decimal point.
+This option is only effective if <B>read</B> is reading input from a
+terminal, pipe, or other special file; it has no effect when reading
+from regular files.
+If <I>timeout</I> is 0, <B>read</B> returns success if input is available on
+the specified file descriptor, failure otherwise.
+The exit status is greater than 128 if the timeout is exceeded.
+<DT><B>-u </B><I>fd</I>
+
+<DD>
+Read input from file descriptor <I>fd</I>.
+
+</DL>
+<P>
+
+If no
+<I>names</I>
+
+are supplied, the line read is assigned to the variable
+<FONT SIZE=-1><B>REPLY</B>.
+
+</FONT>
+The return code is zero, unless end-of-file is encountered, <B>read</B>
+times out (in which case the return code is greater than 128), or an
+invalid file descriptor is supplied as the argument to <B>-u</B>.
+</DL>
+
+<DT><B>readonly</B> [<B>-aApf</B>] [<I>name</I>[=<I>word</I>] ...]<DD>
+
+The given
+<I>names</I> are marked readonly; the values of these
+<I>names</I>
+
+may not be changed by subsequent assignment.
+If the
+<B>-f</B>
+
+option is supplied, the functions corresponding to the
+<I>names</I> are so
+marked.
+The
+<B>-a</B>
+
+option restricts the variables to indexed arrays; the
+<B>-A</B>
+
+option restricts the variables to associative arrays.
+If no
+<I>name</I>
+
+arguments are given, or if the
+<B>-p</B>
+
+option is supplied, a list of all readonly names is printed.
+The
+<B>-p</B>
+
+option causes output to be displayed in a format that
+may be reused as input.
+If a variable name is followed by =<I>word</I>, the value of
+the variable is set to <I>word</I>.
+The return status is 0 unless an invalid option is encountered,
+one of the
+<I>names</I>
+
+is not a valid shell variable name, or
+<B>-f</B>
+
+is supplied with a
+<I>name</I>
+
+that is not a function.
+<DT><B>return</B> [<I>n</I>]<DD>
+Causes a function to exit with the return value specified by
+<I>n</I>.
+
+If
+<I>n</I>
+
+is omitted, the return status is that of the last command
+executed in the function body. If used outside a function,
+but during execution of a script by the
+<B>.</B>
+
+(<B>source</B>) command, it causes the shell to stop executing
+that script and return either
+<I>n</I>
+
+or the exit status of the last command executed within the
+script as the exit status of the script. If used outside a
+function and not during execution of a script by <B>.</B>,
+the return status is false.
+Any command associated with the <B>RETURN</B> trap is executed
+before execution resumes after the function or script.
+<DT><B>set</B> [<B>--abefhkmnptuvxBCEHPT</B>] [<B>-o</B> <I>option</I>] [<I>arg</I> ...]<DD>
+
+<DT><B>set</B> [<B>+abefhkmnptuvxBCEHPT</B>] [<B>+o</B> <I>option</I>] [<I>arg</I> ...]<DD>
+
+Without options, the name and value of each shell variable are displayed
+in a format that can be reused as input
+for setting or resetting the currently-set variables.
+Read-only variables cannot be reset.
+In <I>posix mode</I>, only shell variables are listed.
+The output is sorted according to the current locale.
+When options are specified, they set or unset shell attributes.
+Any arguments remaining after option processing are treated
+as values for the positional parameters and are assigned, in order, to
+<B>$1</B>,
+
+<B>$2</B>,
+
+<B>...</B>
+
+<B>$</B><I>n</I>.
+
+Options, if specified, have the following meanings:
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>-a</B>
+
+<DD>
+Automatically mark variables and functions which are modified or
+created for export to the environment of subsequent commands.
+<DT><B>-b</B>
+
+<DD>
+Report the status of terminated background jobs
+immediately, rather than before the next primary prompt. This is
+effective only when job control is enabled.
+<DT><B>-e</B>
+
+<DD>
+Exit immediately if a <I>pipeline</I> (which may consist of a single
+<I>simple command</I>), a <I>subshell</I> command enclosed in parentheses,
+or one of the commands executed as part of a command list enclosed
+by braces (see
+<FONT SIZE=-1><B>SHELL GRAMMAR</B>
+
+</FONT>
+above) exits with a non-zero status.
+The shell does not exit if the
+command that fails is part of the command list immediately following a
+<B>while</B>
+
+or
+<B>until</B>
+
+keyword,
+part of the test following the
+<B>if</B>
+
+or
+<B>elif</B>
+
+reserved words, part of any command executed in a
+<B>&amp;&amp;</B>
+
+or
+<B>||</B>
+
+list except the command following the final <B>&amp;&amp;</B> or <B>||</B>,
+any command in a pipeline but the last,
+or if the command's return value is
+being inverted with
+<B>!</B>.
+
+A trap on <B>ERR</B>, if set, is executed before the shell exits.
+This option applies to the shell environment and each subshell environment
+separately (see
+<FONT SIZE=-1><B>COMMAND EXECUTION ENVIRONMENT</B>
+
+</FONT>
+above), and may cause
+subshells to exit before executing all the commands in the subshell.
+<DT><B>-f</B>
+
+<DD>
+Disable pathname expansion.
+<DT><B>-h</B>
+
+<DD>
+Remember the location of commands as they are looked up for execution.
+This is enabled by default.
+<DT><B>-k</B>
+
+<DD>
+All arguments in the form of assignment statements
+are placed in the environment for a command, not just
+those that precede the command name.
+<DT><B>-m</B>
+
+<DD>
+Monitor mode. Job control is enabled. This option is on
+by default for interactive shells on systems that support
+it (see
+<FONT SIZE=-1><B>JOB CONTROL</B>
+
+</FONT>
+above). Background processes run in a separate process
+group and a line containing their exit status is printed
+upon their completion.
+<DT><B>-n</B>
+
+<DD>
+Read commands but do not execute them. This may be used to
+check a shell script for syntax errors. This is ignored by
+interactive shells.
+<DT><B>-o </B><I>option-name</I>
+
+<DD>
+The <I>option-name</I> can be one of the following:
+<DL COMPACT><DT><DD>
+<DL COMPACT>
+<DT><B>allexport</B>
+
+<DD>
+Same as
+<B>-a</B>.
+
+<DT><B>braceexpand</B>
+
+<DD>
+Same as
+<B>-B</B>.
+
+<DT><B>emacs</B>
+
+<DD>
+Use an emacs-style command line editing interface. This is enabled
+by default when the shell is interactive, unless the shell is started
+with the
+<B>--noediting</B>
+
+option.
+This also affects the editing interface used for <B>read -e</B>.
+<DT><B>errexit</B>
+
+<DD>
+Same as
+<B>-e</B>.
+
+<DT><B>errtrace</B>
+
+<DD>
+Same as
+<B>-E</B>.
+
+<DT><B>functrace</B>
+
+<DD>
+Same as
+<B>-T</B>.
+
+<DT><B>hashall</B>
+
+<DD>
+Same as
+<B>-h</B>.
+
+<DT><B>histexpand</B>
+
+<DD>
+Same as
+<B>-H</B>.
+
+<DT><B>history</B>
+
+<DD>
+Enable command history, as described above under
+<FONT SIZE=-1><B>HISTORY</B>.
+
+</FONT>
+This option is on by default in interactive shells.
+<DT><B>ignoreeof</B>
+
+<DD>
+The effect is as if the shell command
+<TT>IGNOREEOF=10</TT>
+
+had been executed
+(see
+<B>Shell Variables</B>
+
+above).
+<DT><B>keyword</B>
+
+<DD>
+Same as
+<B>-k</B>.
+
+<DT><B>monitor</B>
+
+<DD>
+Same as
+<B>-m</B>.
+
+<DT><B>noclobber</B>
+
+<DD>
+Same as
+<B>-C</B>.
+
+<DT><B>noexec</B>
+
+<DD>
+Same as
+<B>-n</B>.
+
+<DT><B>noglob</B>
+
+<DD>
+Same as
+<B>-f</B>.
+
+<DT><B>nolog</B>
+
+<DD>
+Currently ignored.
+<DT><B>notify</B>
+
+<DD>
+Same as
+<B>-b</B>.
+
+<DT><B>nounset</B>
+
+<DD>
+Same as
+<B>-u</B>.
+
+<DT><B>onecmd</B>
+
+<DD>
+Same as
+<B>-t</B>.
+
+<DT><B>physical</B>
+
+<DD>
+Same as
+<B>-P</B>.
+
+<DT><B>pipefail</B>
+
+<DD>
+If set, the return value of a pipeline is the value of the last
+(rightmost) command to exit with a non-zero status, or zero if all
+commands in the pipeline exit successfully.
+This option is disabled by default.
+<DT><B>posix</B>
+
+<DD>
+Change the behavior of
+<B>bash</B>
+
+where the default operation differs
+from the POSIX standard to match the standard (<I>posix mode</I>).
+<DT><B>privileged</B>
+
+<DD>
+Same as
+<B>-p</B>.
+
+<DT><B>verbose</B>
+
+<DD>
+Same as
+<B>-v</B>.
+
+<DT><B>vi</B>
+
+<DD>
+Use a vi-style command line editing interface.
+This also affects the editing interface used for <B>read -e</B>.
+<DT><B>xtrace</B>
+
+<DD>
+Same as
+<B>-x</B>.
+
+<P>
+</DL>
+<P>
+
+If
+<B>-o</B>
+
+is supplied with no <I>option-name</I>, the values of the current options are
+printed.
+If
+<B>+o</B>
+
+is supplied with no <I>option-name</I>, a series of
+<B>set</B>
+
+commands to recreate the current option settings is displayed on
+the standard output.
+</DL>
+
+<DT><B>-p</B>
+
+<DD>
+Turn on
+<I>privileged</I>
+
+mode. In this mode, the
+<FONT SIZE=-1><B>$ENV</B>
+
+</FONT>
+and
+<FONT SIZE=-1><B>$BASH_ENV</B>
+
+</FONT>
+files are not processed, shell functions are not inherited from the
+environment, and the
+<FONT SIZE=-1><B>SHELLOPTS</B>,
+
+</FONT>
+<FONT SIZE=-1><B>BASHOPTS</B>,
+
+</FONT>
+<FONT SIZE=-1><B>CDPATH</B>,
+
+</FONT>
+and
+<FONT SIZE=-1><B>GLOBIGNORE</B>
+
+</FONT>
+variables, if they appear in the environment, are ignored.
+If the shell is started with the effective user (group) id not equal to the
+real user (group) id, and the <B>-p</B> option is not supplied, these actions
+are taken and the effective user id is set to the real user id.
+If the <B>-p</B> option is supplied at startup, the effective user id is
+not reset.
+Turning this option off causes the effective user
+and group ids to be set to the real user and group ids.
+<DT><B>-t</B>
+
+<DD>
+Exit after reading and executing one command.
+<DT><B>-u</B>
+
+<DD>
+Treat unset variables and parameters other than the special
+parameters &quot;@&quot; and &quot;*&quot; as an error when performing
+parameter expansion. If expansion is attempted on an
+unset variable or parameter, the shell prints an error message, and,
+if not interactive, exits with a non-zero status.
+<DT><B>-v</B>
+
+<DD>
+Print shell input lines as they are read.
+<DT><B>-x</B>
+
+<DD>
+After expanding each <I>simple command</I>,
+<B>for</B> command, <B>case</B> command, <B>select</B> command, or
+arithmetic <B>for</B> command, display the expanded value of
+<FONT SIZE=-1><B>PS4</B>,
+
+</FONT>
+followed by the command and its expanded arguments
+or associated word list.
+<DT><B>-B</B>
+
+<DD>
+The shell performs brace expansion (see
+<B>Brace Expansion</B>
+
+above). This is on by default.
+<DT><B>-C</B>
+
+<DD>
+If set,
+<B>bash</B>
+
+does not overwrite an existing file with the
+<B>&gt;</B>,
+
+<B>&gt;&amp;</B>,
+
+and
+<B>&lt;&gt;</B>
+
+redirection operators. This may be overridden when
+creating output files by using the redirection operator
+<B>&gt;|</B>
+
+instead of
+<B>&gt;</B>.
+
+<DT><B>-E</B>
+
+<DD>
+If set, any trap on <B>ERR</B> is inherited by shell functions, command
+substitutions, and commands executed in a subshell environment.
+The <B>ERR</B> trap is normally not inherited in such cases.
+<DT><B>-H</B>
+
+<DD>
+Enable
+<B>!</B>
+
+style history substitution. This option is on by
+default when the shell is interactive.
+<DT><B>-P</B>
+
+<DD>
+If set, the shell does not follow symbolic links when executing
+commands such as
+<B>cd</B>
+
+that change the current working directory. It uses the
+physical directory structure instead. By default,
+<B>bash</B>
+
+follows the logical chain of directories when performing commands
+which change the current directory.
+<DT><B>-T</B>
+
+<DD>
+If set, any traps on <B>DEBUG</B> and <B>RETURN</B> are inherited by shell
+functions, command substitutions, and commands executed in a
+subshell environment.
+The <B>DEBUG</B> and <B>RETURN</B> traps are normally not inherited
+in such cases.
+<DT><B>--</B>
+
+<DD>
+If no arguments follow this option, then the positional parameters are
+unset. Otherwise, the positional parameters are set to the
+<I>arg</I>s, even if some of them begin with a
+<B>-</B>.
+
+<DT><B>-</B>
+
+<DD>
+Signal the end of options, cause all remaining <I>arg</I>s to be
+assigned to the positional parameters. The
+<B>-x</B>
+
+and
+<B>-v</B>
+
+options are turned off.
+If there are no <I>arg</I>s,
+the positional parameters remain unchanged.
+
+</DL>
+<P>
+
+The options are off by default unless otherwise noted.
+Using + rather than - causes these options to be turned off.
+The options can also be specified as arguments to an invocation of
+the shell.
+The current set of options may be found in
+<B>$-</B>.
+
+The return status is always true unless an invalid option is encountered.
+</DL>
+
+<DT><B>shift</B> [<I>n</I>]<DD>
+The positional parameters from <I>n</I>+1 ... are renamed to
+<B>$1</B>
+
+<B>....</B>
+
+Parameters represented by the numbers <B>$#</B>
+down to <B>$#</B>-<I>n</I>+1 are unset.
+<I>n</I>
+
+must be a non-negative number less than or equal to <B>$#</B>.
+If
+<I>n</I>
+
+is 0, no parameters are changed.
+If
+<I>n </I>
+
+is not given, it is assumed to be 1.
+If
+<I>n</I>
+
+is greater than <B>$#</B>, the positional parameters are not changed.
+The return status is greater than zero if
+<I>n</I>
+
+is greater than
+<B>$#</B>
+
+or less than zero; otherwise 0.
+<DT><B>shopt</B> [<B>-pqsu</B>] [<B>-o</B>] [<I>optname</I> ...]<DD>
+Toggle the values of variables controlling optional shell behavior.
+With no options, or with the
+<B>-p</B>
+
+option, a list of all settable options is displayed, with
+an indication of whether or not each is set.
+The <B>-p</B> option causes output to be displayed in a form that
+may be reused as input.
+Other options have the following meanings:
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>-s</B>
+
+<DD>
+Enable (set) each <I>optname</I>.
+<DT><B>-u</B>
+
+<DD>
+Disable (unset) each <I>optname</I>.
+<DT><B>-q</B>
+
+<DD>
+Suppresses normal output (quiet mode); the return status indicates
+whether the <I>optname</I> is set or unset.
+If multiple <I>optname</I> arguments are given with
+<B>-q</B>,
+
+the return status is zero if all <I>optnames</I> are enabled; non-zero
+otherwise.
+<DT><B>-o</B>
+
+<DD>
+Restricts the values of <I>optname</I> to be those defined for the
+<B>-o</B>
+
+option to the
+<B>set</B>
+
+builtin.
+
+</DL>
+<P>
+
+If either
+<B>-s</B>
+
+or
+<B>-u</B>
+
+is used with no <I>optname</I> arguments, the display is limited to
+those options which are set or unset, respectively.
+Unless otherwise noted, the <B>shopt</B> options are disabled (unset)
+by default.
+<P>
+
+The return status when listing options is zero if all <I>optnames</I>
+are enabled, non-zero otherwise. When setting or unsetting options,
+the return status is zero unless an <I>optname</I> is not a valid shell
+option.
+<P>
+
+The list of <B>shopt</B> options is:
+<P>
+
+
+
+<DL COMPACT>
+<DT><B>autocd</B>
+
+<DD>
+If set, a command name that is the name of a directory is executed as if
+it were the argument to the <B>cd</B> command.
+This option is only used by interactive shells.
+<DT><B>cdable_vars</B>
+
+<DD>
+If set, an argument to the
+<B>cd</B>
+
+builtin command that
+is not a directory is assumed to be the name of a variable whose
+value is the directory to change to.
+<DT><B>cdspell</B>
+
+<DD>
+If set, minor errors in the spelling of a directory component in a
+<B>cd</B>
+
+command will be corrected.
+The errors checked for are transposed characters,
+a missing character, and one character too many.
+If a correction is found, the corrected file name is printed,
+and the command proceeds.
+This option is only used by interactive shells.
+<DT><B>checkhash</B>
+
+<DD>
+If set, <B>bash</B> checks that a command found in the hash
+table exists before trying to execute it. If a hashed command no
+longer exists, a normal path search is performed.
+<DT><B>checkjobs</B>
+
+<DD>
+If set, <B>bash</B> lists the status of any stopped and running jobs before
+exiting an interactive shell. If any jobs are running, this causes
+the exit to be deferred until a second exit is attempted without an
+intervening command (see
+<FONT SIZE=-1><B>JOB CONTROL</B>
+
+</FONT>
+above). The shell always
+postpones exiting if any jobs are stopped.
+<DT><B>checkwinsize</B>
+
+<DD>
+If set, <B>bash</B> checks the window size after each command
+and, if necessary, updates the values of
+<FONT SIZE=-1><B>LINES</B>
+
+</FONT>
+and
+<FONT SIZE=-1><B>COLUMNS</B>.
+
+</FONT>
+<DT><B>cmdhist</B>
+
+<DD>
+If set,
+<B>bash</B>
+
+attempts to save all lines of a multiple-line
+command in the same history entry. This allows
+easy re-editing of multi-line commands.
+<DT><B>compat31</B>
+
+<DD>
+If set,
+<B>bash</B>
+
+changes its behavior to that of version 3.1 with respect to quoted
+arguments to the conditional command's =~ operator.
+<DT><B>compat32</B>
+
+<DD>
+If set,
+<B>bash</B>
+
+changes its behavior to that of version 3.2 with respect to locale-specific
+string comparison when using the conditional command's &lt; and &gt; operators.
+<DT><B>compat40</B>
+
+<DD>
+If set,
+<B>bash</B>
+
+changes its behavior to that of version 4.0 with respect to locale-specific
+string comparison when using the conditional command's &lt; and &gt; operators
+and the effect of interrupting a command list.
+<DT><B>dirspell</B>
+
+<DD>
+If set,
+<B>bash</B>
+
+attempts spelling correction on directory names during word completion
+if the directory name initially supplied does not exist.
+<DT><B>dotglob</B>
+
+<DD>
+If set,
+<B>bash</B>
+
+includes filenames beginning with a `.' in the results of pathname
+expansion.
+<DT><B>execfail</B>
+
+<DD>
+If set, a non-interactive shell will not exit if
+it cannot execute the file specified as an argument to the
+<B>exec</B>
+
+builtin command. An interactive shell does not exit if
+<B>exec</B>
+
+fails.
+<DT><B>expand_aliases</B>
+
+<DD>
+If set, aliases are expanded as described above under
+<FONT SIZE=-1><B>ALIASES</B>.
+
+</FONT>
+This option is enabled by default for interactive shells.
+<DT><B>extdebug</B>
+
+<DD>
+If set, behavior intended for use by debuggers is enabled:
+<DL COMPACT><DT><DD>
+<DL COMPACT>
+<DT><B>1.</B>
+
+<DD>
+The <B>-F</B> option to the <B>declare</B> builtin displays the source
+file name and line number corresponding to each function name supplied
+as an argument.
+<DT><B>2.</B>
+
+<DD>
+If the command run by the <B>DEBUG</B> trap returns a non-zero value, the
+next command is skipped and not executed.
+<DT><B>3.</B>
+
+<DD>
+If the command run by the <B>DEBUG</B> trap returns a value of 2, and the
+shell is executing in a subroutine (a shell function or a shell script
+executed by the <B>.</B> or <B>source</B> builtins), a call to
+<B>return</B> is simulated.
+<DT><B>4.</B>
+
+<DD>
+<FONT SIZE=-1><B>BASH_ARGC</B>
+
+</FONT>
+and
+<FONT SIZE=-1><B>BASH_ARGV</B>
+
+</FONT>
+are updated as described in their descriptions above.
+<DT><B>5.</B>
+
+<DD>
+Function tracing is enabled: command substitution, shell functions, and
+subshells invoked with <B>(</B> <I>command</I> <B>)</B> inherit the
+<B>DEBUG</B> and <B>RETURN</B> traps.
+<DT><B>6.</B>
+
+<DD>
+Error tracing is enabled: command substitution, shell functions, and
+subshells invoked with <B>(</B> <I>command</I> <B>)</B> inherit the
+<B>ERROR</B> trap.
+</DL></DL>
+
+<DT><B>extglob</B>
+
+<DD>
+If set, the extended pattern matching features described above under
+<B>Pathname Expansion</B> are enabled.
+<DT><B>extquote</B>
+
+<DD>
+If set, <B>$</B>aq<I>string</I>aq and <B>$</B>&quot;<I>string</I>&quot; quoting is
+performed within <B>${</B><I>parameter</I><B>}</B> expansions
+enclosed in double quotes. This option is enabled by default.
+<DT><B>failglob</B>
+
+<DD>
+If set, patterns which fail to match filenames during pathname expansion
+result in an expansion error.
+<DT><B>force_fignore</B>
+
+<DD>
+If set, the suffixes specified by the
+<FONT SIZE=-1><B>FIGNORE</B>
+
+</FONT>
+shell variable
+cause words to be ignored when performing word completion even if
+the ignored words are the only possible completions.
+See
+<FONT SIZE=-1><B>SHELL VARIABLES</B></FONT>
+above for a description of
+<FONT SIZE=-1><B>FIGNORE</B>.
+
+</FONT>
+This option is enabled by default.
+<DT><B>globstar</B>
+
+<DD>
+If set, the pattern <B>**</B> used in a pathname expansion context will
+match a files and zero or more directories and subdirectories.
+If the pattern is followed by a <B>/</B>, only directories and
+subdirectories match.
+<DT><B>gnu_errfmt</B>
+
+<DD>
+If set, shell error messages are written in the standard GNU error
+message format.
+<DT><B>histappend</B>
+
+<DD>
+If set, the history list is appended to the file named by the value
+of the
+<FONT SIZE=-1><B>HISTFILE</B>
+
+</FONT>
+variable when the shell exits, rather than overwriting the file.
+<DT><B>histreedit</B>
+
+<DD>
+If set, and
+<B>readline</B>
+
+is being used, a user is given the opportunity to re-edit a
+failed history substitution.
+<DT><B>histverify</B>
+
+<DD>
+If set, and
+<B>readline</B>
+
+is being used, the results of history substitution are not immediately
+passed to the shell parser. Instead, the resulting line is loaded into
+the <B>readline</B> editing buffer, allowing further modification.
+<DT><B>hostcomplete</B>
+
+<DD>
+If set, and
+<B>readline</B>
+
+is being used, <B>bash</B> will attempt to perform hostname completion when a
+word containing a <B>@</B> is being completed (see
+<B>Completing</B>
+
+under
+<FONT SIZE=-1><B>READLINE</B>
+
+</FONT>
+above).
+This is enabled by default.
+<DT><B>huponexit</B>
+
+<DD>
+If set, <B>bash</B> will send
+<FONT SIZE=-1><B>SIGHUP</B>
+
+</FONT>
+to all jobs when an interactive login shell exits.
+<DT><B>interactive_comments</B>
+
+<DD>
+If set, allow a word beginning with
+<B>#</B>
+
+to cause that word and all remaining characters on that
+line to be ignored in an interactive shell (see
+<FONT SIZE=-1><B>COMMENTS</B>
+
+</FONT>
+above). This option is enabled by default.
+<DT><B>lithist</B>
+
+<DD>
+If set, and the
+<B>cmdhist</B>
+
+option is enabled, multi-line commands are saved to the history with
+embedded newlines rather than using semicolon separators where possible.
+<DT><B>login_shell</B>
+
+<DD>
+The shell sets this option if it is started as a login shell (see
+<FONT SIZE=-1><B>INVOCATION</B>
+
+</FONT>
+above).
+The value may not be changed.
+<DT><B>mailwarn</B>
+
+<DD>
+If set, and a file that <B>bash</B> is checking for mail has been
+accessed since the last time it was checked, the message ``The mail in
+<I>mailfile</I> has been read'' is displayed.
+<DT><B>no_empty_cmd_completion</B>
+
+<DD>
+If set, and
+<B>readline</B>
+
+is being used,
+<B>bash</B>
+
+will not attempt to search the
+<FONT SIZE=-1><B>PATH</B>
+
+</FONT>
+for possible completions when
+completion is attempted on an empty line.
+<DT><B>nocaseglob</B>
+
+<DD>
+If set,
+<B>bash</B>
+
+matches filenames in a case-insensitive fashion when performing pathname
+expansion (see
+<B>Pathname Expansion</B>
+
+above).
+<DT><B>nocasematch</B>
+
+<DD>
+If set,
+<B>bash</B>
+
+matches patterns in a case-insensitive fashion when performing matching
+while executing <B>case</B> or <B>[[</B> conditional commands.
+<DT><B>nullglob</B>
+
+<DD>
+If set,
+<B>bash</B>
+
+allows patterns which match no
+files (see
+<B>Pathname Expansion</B>
+
+above)
+to expand to a null string, rather than themselves.
+<DT><B>progcomp</B>
+
+<DD>
+If set, the programmable completion facilities (see
+<B>Programmable Completion</B> above) are enabled.
+This option is enabled by default.
+<DT><B>promptvars</B>
+
+<DD>
+If set, prompt strings undergo
+parameter expansion, command substitution, arithmetic
+expansion, and quote removal after being expanded as described in
+<FONT SIZE=-1><B>PROMPTING</B>
+
+</FONT>
+above. This option is enabled by default.
+<DT><B>restricted_shell</B>
+
+<DD>
+The shell sets this option if it is started in restricted mode (see
+<FONT SIZE=-1><B>RESTRICTED SHELL</B>
+
+</FONT>
+below).
+The value may not be changed.
+This is not reset when the startup files are executed, allowing
+the startup files to discover whether or not a shell is restricted.
+<DT><B>shift_verbose</B>
+
+<DD>
+If set, the
+<B>shift</B>
+
+builtin prints an error message when the shift count exceeds the
+number of positional parameters.
+<DT><B>sourcepath</B>
+
+<DD>
+If set, the
+<B>source</B> (<B>.</B>) builtin uses the value of
+<FONT SIZE=-1><B>PATH</B>
+
+</FONT>
+to find the directory containing the file supplied as an argument.
+This option is enabled by default.
+<DT><B>xpg_echo</B>
+
+<DD>
+If set, the <B>echo</B> builtin expands backslash-escape sequences
+by default.
+</DL></DL>
+
+<DT><B>suspend</B> [<B>-f</B>]<DD>
+Suspend the execution of this shell until it receives a
+<FONT SIZE=-1><B>SIGCONT</B>
+
+</FONT>
+signal. A login shell cannot be suspended; the
+<B>-f</B>
+
+option can be used to override this and force the suspension.
+The return status is 0 unless the shell is a login shell and
+<B>-f</B>
+
+is not supplied, or if job control is not enabled.
+<DT><B>test</B> <I>expr</I><DD>
+
+<DT><B>[</B> <I>expr</I> <B>]</B><DD>
+Return a status of 0 or 1 depending on
+the evaluation of the conditional expression
+<I>expr</I>.
+
+Each operator and operand must be a separate argument.
+Expressions are composed of the primaries described above under
+<FONT SIZE=-1><B>CONDITIONAL EXPRESSIONS</B>.
+
+</FONT>
+<B>test</B> does not accept any options, nor does it accept and ignore
+an argument of <B>--</B> as signifying the end of options.
+<P>
+
+
+Expressions may be combined using the following operators, listed
+in decreasing order of precedence.
+The evaluation depends on the number of arguments; see below.
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>! </B><I>expr</I>
+
+<DD>
+True if
+<I>expr</I>
+
+is false.
+<DT><B>( </B><I>expr</I> )
+
+<DD>
+Returns the value of <I>expr</I>.
+This may be used to override the normal precedence of operators.
+<DT><I>expr1</I> -<B>a</B> <I>expr2</I><DD>
+True if both
+<I>expr1</I>
+
+and
+<I>expr2</I>
+
+are true.
+<DT><I>expr1</I> -<B>o</B> <I>expr2</I><DD>
+True if either
+<I>expr1</I>
+
+or
+<I>expr2</I>
+
+is true.
+
+</DL>
+<P>
+
+<B>test</B> and <B>[</B> evaluate conditional
+expressions using a set of rules based on the number of arguments.
+<P>
+
+
+
+<DL COMPACT>
+<DT>0 arguments<DD>
+The expression is false.
+<DT>1 argument<DD>
+The expression is true if and only if the argument is not null.
+<DT>2 arguments<DD>
+If the first argument is <B>!</B>, the expression is true if and
+only if the second argument is null.
+If the first argument is one of the unary conditional operators listed above
+under
+<FONT SIZE=-1><B>CONDITIONAL EXPRESSIONS</B>,
+
+</FONT>
+the expression is true if the unary test is true.
+If the first argument is not a valid unary conditional operator, the expression
+is false.
+<DT>3 arguments<DD>
+If the second argument is one of the binary conditional operators listed above
+under
+<FONT SIZE=-1><B>CONDITIONAL EXPRESSIONS</B>,
+
+</FONT>
+the result of the expression is the result of the binary test using
+the first and third arguments as operands.
+The <B>-a</B> and <B>-o</B> operators are considered binary operators
+when there are three arguments.
+If the first argument is <B>!</B>, the value is the negation of
+the two-argument test using the second and third arguments.
+If the first argument is exactly <B>(</B> and the third argument is
+exactly <B>)</B>, the result is the one-argument test of the second
+argument.
+Otherwise, the expression is false.
+<DT>4 arguments<DD>
+If the first argument is <B>!</B>, the result is the negation of
+the three-argument expression composed of the remaining arguments.
+Otherwise, the expression is parsed and evaluated according to
+precedence using the rules listed above.
+<DT>5 or more arguments<DD>
+The expression is parsed and evaluated according to precedence
+using the rules listed above.
+</DL></DL>
+
+
+<DT><B>times</B>
+
+<DD>
+Print the accumulated user and system times for the shell and
+for processes run from the shell. The return status is 0.
+<DT><B>trap</B> [<B>-lp</B>] [[<I>arg</I>] <I>sigspec</I> ...]<DD>
+The command
+<I>arg</I>
+
+is to be read and executed when the shell receives
+signal(s)
+<I>sigspec</I>.
+
+If
+<I>arg</I>
+
+is absent (and there is a single <I>sigspec</I>) or
+<B>-</B>,
+
+each specified signal is
+reset to its original disposition (the value it had
+upon entrance to the shell).
+If
+<I>arg</I>
+
+is the null string the signal specified by each
+<I>sigspec</I>
+
+is ignored by the shell and by the commands it invokes.
+If
+<I>arg</I>
+
+is not present and
+<B>-p</B>
+
+has been supplied, then the trap commands associated with each
+<I>sigspec</I>
+
+are displayed.
+If no arguments are supplied or if only
+<B>-p</B>
+
+is given,
+<B>trap</B>
+
+prints the list of commands associated with each signal.
+The
+<B>-l</B>
+
+option causes the shell to print a list of signal names and
+their corresponding numbers.
+Each
+<I>sigspec</I>
+
+is either
+a signal name defined in &lt;<I>signal.h</I>&gt;, or a signal number.
+Signal names are case insensitive and the SIG prefix is optional.
+<P>
+
+
+If a
+<I>sigspec</I>
+
+is
+<FONT SIZE=-1><B>EXIT</B>
+
+</FONT>
+(0) the command
+<I>arg</I>
+
+is executed on exit from the shell.
+If a
+<I>sigspec</I>
+
+is
+<FONT SIZE=-1><B>DEBUG</B>,
+
+</FONT>
+the command
+<I>arg</I>
+
+is executed before every <I>simple command</I>, <I>for</I> command,
+<I>case</I> command, <I>select</I> command, every arithmetic <I>for</I>
+command, and before the first command executes in a shell function (see
+<FONT SIZE=-1><B>SHELL GRAMMAR</B>
+
+</FONT>
+above).
+Refer to the description of the <B>extdebug</B> option to the
+<B>shopt</B> builtin for details of its effect on the <B>DEBUG</B> trap.
+If a
+<I>sigspec</I>
+
+is
+<FONT SIZE=-1><B>RETURN</B>,
+
+</FONT>
+the command
+<I>arg</I>
+
+is executed each time a shell function or a script executed with the
+<B>.</B> or <B>source</B> builtins finishes executing.
+<P>
+
+
+If a
+<I>sigspec</I>
+
+is
+<FONT SIZE=-1><B>ERR</B>,
+
+</FONT>
+the command
+<I>arg</I>
+
+is executed whenever a simple command has a non-zero exit status,
+subject to the following conditions.
+The
+<FONT SIZE=-1><B>ERR</B>
+
+</FONT>
+trap is not executed if the failed
+command is part of the command list immediately following a
+<B>while</B>
+
+or
+<B>until</B>
+
+keyword,
+part of the test in an
+<I>if</I>
+
+statement, part of a command executed in a
+<B>&amp;&amp;</B>
+
+or
+<B>||</B>
+
+list, or if the command's return value is
+being inverted via
+<B>!</B>.
+
+These are the same conditions obeyed by the <B>errexit</B> option.
+<P>
+
+
+Signals ignored upon entry to the shell cannot be trapped or reset.
+Trapped signals that are not being ignored are reset to their original
+values in a subshell or subshell environment when one is created.
+The return status is false if any
+<I>sigspec</I>
+
+is invalid; otherwise
+<B>trap</B>
+
+returns true.
+<DT><B>type</B> [<B>-aftpP</B>] <I>name</I> [<I>name</I> ...]<DD>
+With no options,
+indicate how each
+<I>name</I>
+
+would be interpreted if used as a command name.
+If the
+<B>-t</B>
+
+option is used,
+<B>type</B>
+
+prints a string which is one of
+<I>alias</I>,
+
+<I>keyword</I>,
+
+<I>function</I>,
+
+<I>builtin</I>,
+
+or
+<I>file </I>
+
+if
+<I>name</I>
+
+is an alias, shell reserved word, function, builtin, or disk file,
+respectively.
+If the
+<I>name</I>
+
+is not found, then nothing is printed, and an exit status of false
+is returned.
+If the
+<B>-p</B>
+
+option is used,
+<B>type</B>
+
+either returns the name of the disk file
+that would be executed if
+<I>name</I>
+
+were specified as a command name,
+or nothing if
+<TT>type -t name</TT>
+
+would not return
+<I>file</I>.
+
+The
+<B>-P</B>
+
+option forces a
+<FONT SIZE=-1><B>PATH</B>
+
+</FONT>
+search for each <I>name</I>, even if
+<TT>type -t name</TT>
+
+would not return
+<I>file</I>.
+
+If a command is hashed,
+<B>-p</B>
+
+and
+<B>-P</B>
+
+print the hashed value, not necessarily the file that appears
+first in
+<FONT SIZE=-1><B>PATH</B>.
+
+</FONT>
+If the
+<B>-a</B>
+
+option is used,
+<B>type</B>
+
+prints all of the places that contain
+an executable named
+<I>name</I>.
+
+This includes aliases and functions,
+if and only if the
+<B>-p</B>
+
+option is not also used.
+The table of hashed commands is not consulted
+when using
+<B>-a</B>.
+
+The
+<B>-f</B>
+
+option suppresses shell function lookup, as with the <B>command</B> builtin.
+<B>type</B>
+
+returns true if all of the arguments are found, false if
+any are not found.
+<DT><B>ulimit</B> [<B>-HSTabcdefilmnpqrstuvx</B> [<I>limit</I>]]<DD>
+Provides control over the resources available to the shell and to
+processes started by it, on systems that allow such control.
+The <B>-H</B> and <B>-S</B> options specify that the hard or soft limit is
+set for the given resource.
+A hard limit cannot be increased by a non-root user once it is set;
+a soft limit may be increased up to the value of the hard limit.
+If neither <B>-H</B> nor <B>-S</B> is specified, both the soft and hard
+limits are set.
+The value of
+<I>limit</I>
+
+can be a number in the unit specified for the resource
+or one of the special values
+<B>hard</B>,
+
+<B>soft</B>,
+
+or
+<B>unlimited</B>,
+
+which stand for the current hard limit, the current soft limit, and
+no limit, respectively.
+If
+<I>limit</I>
+
+is omitted, the current value of the soft limit of the resource is
+printed, unless the <B>-H</B> option is given. When more than one
+resource is specified, the limit name and unit are printed before the value.
+Other options are interpreted as follows:
+<DL COMPACT><DT><DD>
+
+<DL COMPACT>
+<DT><B>-a</B>
+
+<DD>
+All current limits are reported
+<DT><B>-b</B>
+
+<DD>
+The maximum socket buffer size
+<DT><B>-c</B>
+
+<DD>
+The maximum size of core files created
+<DT><B>-d</B>
+
+<DD>
+The maximum size of a process's data segment
+<DT><B>-e</B>
+
+<DD>
+The maximum scheduling priority (&quot;nice&quot;)
+<DT><B>-f</B>
+
+<DD>
+The maximum size of files written by the shell and its children
+<DT><B>-i</B>
+
+<DD>
+The maximum number of pending signals
+<DT><B>-l</B>
+
+<DD>
+The maximum size that may be locked into memory
+<DT><B>-m</B>
+
+<DD>
+The maximum resident set size (many systems do not honor this limit)
+<DT><B>-n</B>
+
+<DD>
+The maximum number of open file descriptors (most systems do not
+allow this value to be set)
+<DT><B>-p</B>
+
+<DD>
+The pipe size in 512-byte blocks (this may not be set)
+<DT><B>-q</B>
+
+<DD>
+The maximum number of bytes in POSIX message queues
+<DT><B>-r</B>
+
+<DD>
+The maximum real-time scheduling priority
+<DT><B>-s</B>
+
+<DD>
+The maximum stack size
+<DT><B>-t</B>
+
+<DD>
+The maximum amount of cpu time in seconds
+<DT><B>-u</B>
+
+<DD>
+The maximum number of processes available to a single user
+<DT><B>-v</B>
+
+<DD>
+The maximum amount of virtual memory available to the shell
+<DT><B>-x</B>
+
+<DD>
+The maximum number of file locks
+<DT><B>-T</B>
+
+<DD>
+The maximum number of threads
+
+</DL>
+<P>
+
+If
+<I>limit</I>
+
+is given, it is the new value of the specified resource (the
+<B>-a</B>
+
+option is display only).
+If no option is given, then
+<B>-f</B>
+
+is assumed. Values are in 1024-byte increments, except for
+<B>-t</B>,
+
+which is in seconds,
+<B>-p</B>,
+
+which is in units of 512-byte blocks,
+and
+<B>-T</B>,
+
+<B>-b</B>,
+
+<B>-n</B>,
+
+and
+<B>-u</B>,
+
+which are unscaled values.
+The return status is 0 unless an invalid option or argument is supplied,
+or an error occurs while setting a new limit.
+</DL>
+
+<DT><B>umask</B> [<B>-p</B>] [<B>-S</B>] [<I>mode</I>]<DD>
+The user file-creation mask is set to
+<I>mode</I>.
+
+If
+<I>mode</I>
+
+begins with a digit, it
+is interpreted as an octal number; otherwise
+it is interpreted as a symbolic mode mask similar
+to that accepted by
+<I>chmod</I>(1).
+
+If
+<I>mode</I>
+
+is omitted, the current value of the mask is printed.
+The
+<B>-S</B>
+
+option causes the mask to be printed in symbolic form; the
+default output is an octal number.
+If the
+<B>-p</B>
+
+option is supplied, and
+<I>mode</I>
+
+is omitted, the output is in a form that may be reused as input.
+The return status is 0 if the mode was successfully changed or if
+no <I>mode</I> argument was supplied, and false otherwise.
+<DT><B>unalias</B> [-<B>a</B>] [<I>name</I> ...]<DD>
+Remove each <I>name</I> from the list of defined aliases. If
+<B>-a</B>
+
+is supplied, all alias definitions are removed. The return
+value is true unless a supplied
+<I>name</I>
+
+is not a defined alias.
+<DT><B>unset</B> [-<B>fv</B>] [<I>name</I> ...]<DD>
+For each
+<I>name</I>,
+
+remove the corresponding variable or function.
+If no options are supplied, or the
+<B>-v</B>
+
+option is given, each
+<I>name</I>
+
+refers to a shell variable.
+Read-only variables may not be unset.
+If
+<B>-f</B>
+
+is specified, each
+<I>name</I>
+
+refers to a shell function, and the function definition
+is removed.
+Each unset variable or function is removed from the environment
+passed to subsequent commands.
+If any of
+<FONT SIZE=-1><B>COMP_WORDBREAKS</B>,
+
+</FONT>
+<FONT SIZE=-1><B>RANDOM</B>,
+
+</FONT>
+<FONT SIZE=-1><B>SECONDS</B>,
+
+</FONT>
+<FONT SIZE=-1><B>LINENO</B>,
+
+</FONT>
+<FONT SIZE=-1><B>HISTCMD</B>,
+
+</FONT>
+<FONT SIZE=-1><B>FUNCNAME</B>,
+
+</FONT>
+<FONT SIZE=-1><B>GROUPS</B>,
+
+</FONT>
+or
+<FONT SIZE=-1><B>DIRSTACK</B>
+
+</FONT>
+are unset, they lose their special properties, even if they are
+subsequently reset. The exit status is true unless a
+<I>name</I>
+
+is readonly.
+<DT><B>wait</B> [<I>n ...</I>]<DD>
+Wait for each specified process and return its termination status.
+Each
+<I>n</I>
+
+may be a process
+ID or a job specification; if a job spec is given, all processes
+in that job's pipeline are waited for. If
+<I>n</I>
+
+is not given, all currently active child processes
+are waited for, and the return status is zero. If
+<I>n</I>
+
+specifies a non-existent process or job, the return status is
+127. Otherwise, the return status is the exit status of the last
+process or job waited for.
+
+
+</DL>
+<A NAME="lbDC">&nbsp;</A>
+<H3>RESTRICTED SHELL</H3>
+
+
+
+<P>
+
+If
+<B>bash</B>
+
+is started with the name
+<B>rbash</B>,
+
+or the
+<B>-r</B>
+
+option is supplied at invocation,
+the shell becomes restricted.
+A restricted shell is used to
+set up an environment more controlled than the standard shell.
+It behaves identically to
+<B>bash</B>
+
+with the exception that the following are disallowed or not performed:
+<DL COMPACT>
+<DT>*<DD>
+changing directories with <B>cd</B>
+<DT>*<DD>
+setting or unsetting the values of
+<FONT SIZE=-1><B>SHELL</B>,
+
+</FONT>
+<FONT SIZE=-1><B>PATH</B>,
+
+</FONT>
+<FONT SIZE=-1><B>ENV</B>,
+
+</FONT>
+or
+<FONT SIZE=-1><B>BASH_ENV</B>
+
+</FONT>
+<DT>*<DD>
+specifying command names containing
+<B>/</B>
+
+<DT>*<DD>
+specifying a file name containing a
+<B>/</B>
+
+as an argument to the
+<B>.</B>
+
+builtin command
+<DT>*<DD>
+Specifying a filename containing a slash as an argument to the
+<B>-p</B>
+
+option to the
+<B>hash</B>
+
+builtin command
+<DT>*<DD>
+importing function definitions from the shell environment at startup
+<DT>*<DD>
+parsing the value of
+<FONT SIZE=-1><B>SHELLOPTS</B>
+
+</FONT>
+from the shell environment at startup
+<DT>*<DD>
+redirecting output using the &gt;, &gt;|, &lt;&gt;, &gt;&amp;, &amp;&gt;, and &gt;&gt; redirection operators
+<DT>*<DD>
+using the
+<B>exec</B>
+
+builtin command to replace the shell with another command
+<DT>*<DD>
+adding or deleting builtin commands with the
+<B>-f</B>
+
+and
+<B>-d</B>
+
+options to the
+<B>enable</B>
+
+builtin command
+<DT>*<DD>
+Using the <B>enable</B> builtin command to enable disabled shell builtins
+<DT>*<DD>
+specifying the
+<B>-p</B>
+
+option to the
+<B>command</B>
+
+builtin command
+<DT>*<DD>
+turning off restricted mode with
+<B>set +r</B> or <B>set +o restricted</B>.
+</DL>
+<P>
+
+These restrictions are enforced after any startup files are read.
+<P>
+
+
+ When a command that is found to be a shell script is executed
+(see
+<FONT SIZE=-1><B>COMMAND EXECUTION</B>
+
+</FONT>
+
+above),
+
+<B>rbash</B>
+
+turns off any restrictions in the shell spawned to execute the
+script.
+
+
+<A NAME="lbDD">&nbsp;</A>
+<H3>SEE ALSO</H3>
+
+
+<DL COMPACT>
+<DT><I>Bash Reference Manual</I>, Brian Fox and Chet Ramey<DD>
+<DT><I>The Gnu Readline Library</I>, Brian Fox and Chet Ramey<DD>
+<DT><I>The Gnu History Library</I>, Brian Fox and Chet Ramey<DD>
+<DT><I>Portable Operating System Interface (POSIX) Part 2: Shell and Utilities</I>, IEEE<DD>
+<DT><I>sh</I>(1), <I>ksh</I>(1), <I>csh</I>(1)<DD>
+<DT><I>emacs</I>(1), <I>vi</I>(1)<DD>
+<DT><I>readline</I>(3)<DD>
+
+</DL>
+<A NAME="lbDE">&nbsp;</A>
+<H3>FILES</H3>
+
+
+<DL COMPACT>
+<DT>
+<A HREF="file:/bin/bash"><I>/bin/bash</I></A>
+
+<DD>
+The <B>bash</B> executable
+<DT>
+<A HREF="file:/etc/profile"><I>/etc/profile</I></A>
+
+<DD>
+The systemwide initialization file, executed for login shells
+<DT>
+<A HREF="file:~/.bash_profile"><I>~/.bash_profile</I></A>
+
+<DD>
+The personal initialization file, executed for login shells
+<DT>
+<A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>
+
+<DD>
+The individual per-interactive-shell startup file
+<DT>
+<A HREF="file:~/.bash_logout"><I>~/.bash_logout</I></A>
+
+<DD>
+The individual login shell cleanup file, executed when a login shell exits
+<DT>
+<A HREF="file:~/.inputrc"><I>~/.inputrc</I></A>
+
+<DD>
+Individual <I>readline</I> initialization file
+
+</DL>
+<A NAME="lbDF">&nbsp;</A>
+<H3>AUTHORS</H3>
+
+Brian Fox, Free Software Foundation
+<BR>
+
+<A HREF="mailto:bfox@gnu.org">bfox@gnu.org</A>
+<P>
+
+Chet Ramey, Case Western Reserve University
+<BR>
+
+<A HREF="mailto:chet.ramey@case.edu">chet.ramey@case.edu</A>
+<A NAME="lbDG">&nbsp;</A>
+<H3>BUG REPORTS</H3>
+
+If you find a bug in
+<B>bash,</B>
+
+you should report it. But first, you should
+make sure that it really is a bug, and that it appears in the latest
+version of
+<B>bash</B>.
+
+The latest version is always available from
+<I><A HREF="ftp://ftp.gnu.org/pub/bash/">ftp://ftp.gnu.org/pub/bash/</A></I>.
+<P>
+
+Once you have determined that a bug actually exists, use the
+<I>bashbug</I>
+
+command to submit a bug report.
+If you have a fix, you are encouraged to mail that as well!
+Suggestions and `philosophical' bug reports may be mailed
+to <I><A HREF="mailto:bug-bash@gnu.org">bug-bash@gnu.org</A></I> or posted to the Usenet
+newsgroup
+<A HREF="news:gnu.bash.bug">gnu.bash.bug</A>.
+
+<P>
+
+ALL bug reports should include:
+<P>
+
+
+<DL COMPACT>
+<DT>The version number of <B>bash</B><DD>
+<DT>The hardware and operating system<DD>
+<DT>The compiler used to compile<DD>
+<DT>A description of the bug behaviour<DD>
+<DT>A short script or `recipe' which exercises the bug<DD>
+
+</DL>
+<P>
+
+<I>bashbug</I>
+
+inserts the first three items automatically into the template
+it provides for filing a bug report.
+<P>
+
+Comments and bug reports concerning
+this manual page should be directed to
+<I><A HREF="mailto:chet@po.cwru.edu">chet@po.cwru.edu</A></I>.
+
+<A NAME="lbDH">&nbsp;</A>
+<H3>BUGS</H3>
+
+<P>
+
+It's too big and too slow.
+<P>
+
+There are some subtle differences between
+<B>bash</B>
+
+and traditional versions of
+<B>sh</B>,
+
+mostly because of the
+<FONT SIZE=-1><B>POSIX</B>
+
+</FONT>
+specification.
+<P>
+
+Aliases are confusing in some uses.
+<P>
+
+Shell builtin commands and functions are not stoppable/restartable.
+<P>
+
+Compound commands and command sequences of the form `a ; b ; c'
+are not handled gracefully when process suspension is attempted.
+When a process is stopped, the shell immediately executes the next
+command in the sequence.
+It suffices to place the sequence of commands between
+parentheses to force it into a subshell, which may be stopped as
+a unit.
+<P>
+
+Array variables may not (yet) be exported.
+<P>
+
+There may be only one active coprocess at a time.
+
+
+
+<HR>
+<TABLE WIDTH=100%>
+<TR>
+<TH ALIGN=LEFT width=33%>GNU Bash-4.1<TH ALIGN=CENTER width=33%>2009 December 29<TH ALIGN=RIGHT width=33%>BASH(1)
+</TR>
+</TABLE>
+<HR>
+<A NAME="index">&nbsp;</A><H2>Index</H2>
+<DL>
+<DT><A HREF="#lbAB">NAME</A><DD>
+<DT><A HREF="#lbAC">SYNOPSIS</A><DD>
+<DT><A HREF="#lbAD">COPYRIGHT</A><DD>
+<DT><A HREF="#lbAE">DESCRIPTION</A><DD>
+<DT><A HREF="#lbAF">OPTIONS</A><DD>
+<DT><A HREF="#lbAG">ARGUMENTS</A><DD>
+<DT><A HREF="#lbAH">INVOCATION</A><DD>
+<DT><A HREF="#lbAI">DEFINITIONS</A><DD>
+<DT><A HREF="#lbAJ">RESERVED WORDS</A><DD>
+<DT><A HREF="#lbAK">SHELL GRAMMAR</A><DD>
+<DL>
+<DT><A HREF="#lbAL">Simple Commands</A><DD>
+<DT><A HREF="#lbAM">Pipelines</A><DD>
+<DT><A HREF="#lbAN">Lists</A><DD>
+<DT><A HREF="#lbAO">Compound Commands</A><DD>
+<DT><A HREF="#lbAP">Coprocesses</A><DD>
+<DT><A HREF="#lbAQ">Shell Function Definitions</A><DD>
+</DL>
+<DT><A HREF="#lbAR">COMMENTS</A><DD>
+<DT><A HREF="#lbAS">QUOTING</A><DD>
+<DT><A HREF="#lbAT">PARAMETERS</A><DD>
+<DL>
+<DT><A HREF="#lbAU">Positional Parameters</A><DD>
+<DT><A HREF="#lbAV">Special Parameters</A><DD>
+<DT><A HREF="#lbAW">Shell Variables</A><DD>
+<DT><A HREF="#lbAX">Arrays</A><DD>
+</DL>
+<DT><A HREF="#lbAY">EXPANSION</A><DD>
+<DL>
+<DT><A HREF="#lbAZ">Brace Expansion</A><DD>
+<DT><A HREF="#lbBA">Tilde Expansion</A><DD>
+<DT><A HREF="#lbBB">Parameter Expansion</A><DD>
+<DT><A HREF="#lbBC">Command Substitution</A><DD>
+<DT><A HREF="#lbBD">Arithmetic Expansion</A><DD>
+<DT><A HREF="#lbBE">Process Substitution</A><DD>
+<DT><A HREF="#lbBF">Word Splitting</A><DD>
+<DT><A HREF="#lbBG">Pathname Expansion</A><DD>
+<DT><A HREF="#lbBH">Quote Removal</A><DD>
+</DL>
+<DT><A HREF="#lbBI">REDIRECTION</A><DD>
+<DL>
+<DT><A HREF="#lbBJ">Redirecting Input</A><DD>
+<DT><A HREF="#lbBK">Redirecting Output</A><DD>
+<DT><A HREF="#lbBL">Appending Redirected Output</A><DD>
+<DT><A HREF="#lbBM">Redirecting Standard Output and Standard Error</A><DD>
+<DT><A HREF="#lbBN">Appending Standard Output and Standard Error</A><DD>
+<DT><A HREF="#lbBO">Here Documents</A><DD>
+<DT><A HREF="#lbBP">Here Strings</A><DD>
+<DT><A HREF="#lbBQ">Duplicating File Descriptors</A><DD>
+<DT><A HREF="#lbBR">Moving File Descriptors</A><DD>
+<DT><A HREF="#lbBS">Opening File Descriptors for Reading and Writing</A><DD>
+</DL>
+<DT><A HREF="#lbBT">ALIASES</A><DD>
+<DT><A HREF="#lbBU">FUNCTIONS</A><DD>
+<DT><A HREF="#lbBV">ARITHMETIC EVALUATION</A><DD>
+<DT><A HREF="#lbBW">CONDITIONAL EXPRESSIONS</A><DD>
+<DT><A HREF="#lbBX">SIMPLE COMMAND EXPANSION</A><DD>
+<DT><A HREF="#lbBY">COMMAND EXECUTION</A><DD>
+<DT><A HREF="#lbBZ">COMMAND EXECUTION ENVIRONMENT</A><DD>
+<DT><A HREF="#lbCA">ENVIRONMENT</A><DD>
+<DT><A HREF="#lbCB">EXIT STATUS</A><DD>
+<DT><A HREF="#lbCC">SIGNALS</A><DD>
+<DT><A HREF="#lbCD">JOB CONTROL</A><DD>
+<DT><A HREF="#lbCE">PROMPTING</A><DD>
+<DT><A HREF="#lbCF">READLINE</A><DD>
+<DL>
+<DT><A HREF="#lbCG">Readline Notation</A><DD>
+<DT><A HREF="#lbCH">Readline Initialization</A><DD>
+<DT><A HREF="#lbCI">Readline Key Bindings</A><DD>
+<DT><A HREF="#lbCJ">Readline Variables</A><DD>
+<DT><A HREF="#lbCK">Readline Conditional Constructs</A><DD>
+<DT><A HREF="#lbCL">Searching</A><DD>
+<DT><A HREF="#lbCM">Readline Command Names</A><DD>
+<DT><A HREF="#lbCN">Commands for Moving</A><DD>
+<DT><A HREF="#lbCO">Commands for Manipulating the History</A><DD>
+<DT><A HREF="#lbCP">Commands for Changing Text</A><DD>
+<DT><A HREF="#lbCQ">Killing and Yanking</A><DD>
+<DT><A HREF="#lbCR">Numeric Arguments</A><DD>
+<DT><A HREF="#lbCS">Completing</A><DD>
+<DT><A HREF="#lbCT">Keyboard Macros</A><DD>
+<DT><A HREF="#lbCU">Miscellaneous</A><DD>
+<DT><A HREF="#lbCV">Programmable Completion</A><DD>
+</DL>
+<DT><A HREF="#lbCW">HISTORY</A><DD>
+<DT><A HREF="#lbCX">HISTORY EXPANSION</A><DD>
+<DL>
+<DT><A HREF="#lbCY">Event Designators</A><DD>
+<DT><A HREF="#lbCZ">Word Designators</A><DD>
+<DT><A HREF="#lbDA">Modifiers</A><DD>
+</DL>
+<DT><A HREF="#lbDB">SHELL BUILTIN COMMANDS</A><DD>
+<DT><A HREF="#lbDC">RESTRICTED SHELL</A><DD>
+<DT><A HREF="#lbDD">SEE ALSO</A><DD>
+<DT><A HREF="#lbDE">FILES</A><DD>
+<DT><A HREF="#lbDF">AUTHORS</A><DD>
+<DT><A HREF="#lbDG">BUG REPORTS</A><DD>
+<DT><A HREF="#lbDH">BUGS</A><DD>
+</DL>
+<HR>
+This document was created by man2html from bash.1.<BR>
+Time: 30 December 2009 13:07:38 EST
+</BODY>
+</HTML>
diff --git a/doc/bash.pdf b/doc/bash.pdf
new file mode 100644
index 0000000..cb36c5e
--- /dev/null
+++ b/doc/bash.pdf
Binary files differ
diff --git a/doc/bash.ps b/doc/bash.ps
new file mode 100644
index 0000000..8b4d573
--- /dev/null
+++ b/doc/bash.ps
@@ -0,0 +1,8202 @@
+%!PS-Adobe-3.0
+%%Creator: groff version 1.19.2
+%%CreationDate: Wed Dec 30 13:07:37 2009
+%%DocumentNeededResources: font Times-Roman
+%%+ font Times-Bold
+%%+ font Times-Italic
+%%+ font Courier
+%%+ font Symbol
+%%DocumentSuppliedResources: procset grops 1.19 2
+%%Pages: 70
+%%PageOrder: Ascend
+%%DocumentMedia: Default 595 842 0 () ()
+%%Orientation: Portrait
+%%EndComments
+%%BeginDefaults
+%%PageMedia: Default
+%%EndDefaults
+%%BeginProlog
+%%BeginResource: procset grops 1.19 2
+%!PS-Adobe-3.0 Resource-ProcSet
+/setpacking where{
+pop
+currentpacking
+true setpacking
+}if
+/grops 120 dict dup begin
+/SC 32 def
+/A/show load def
+/B{0 SC 3 -1 roll widthshow}bind def
+/C{0 exch ashow}bind def
+/D{0 exch 0 SC 5 2 roll awidthshow}bind def
+/E{0 rmoveto show}bind def
+/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
+/G{0 rmoveto 0 exch ashow}bind def
+/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/I{0 exch rmoveto show}bind def
+/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
+/K{0 exch rmoveto 0 exch ashow}bind def
+/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/M{rmoveto show}bind def
+/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
+/O{rmoveto 0 exch ashow}bind def
+/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/Q{moveto show}bind def
+/R{moveto 0 SC 3 -1 roll widthshow}bind def
+/S{moveto 0 exch ashow}bind def
+/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/SF{
+findfont exch
+[exch dup 0 exch 0 exch neg 0 0]makefont
+dup setfont
+[exch/setfont cvx]cvx bind def
+}bind def
+/MF{
+findfont
+[5 2 roll
+0 3 1 roll
+neg 0 0]makefont
+dup setfont
+[exch/setfont cvx]cvx bind def
+}bind def
+/level0 0 def
+/RES 0 def
+/PL 0 def
+/LS 0 def
+/MANUAL{
+statusdict begin/manualfeed true store end
+}bind def
+/PLG{
+gsave newpath clippath pathbbox grestore
+exch pop add exch pop
+}bind def
+/BP{
+/level0 save def
+1 setlinecap
+1 setlinejoin
+72 RES div dup scale
+LS{
+90 rotate
+}{
+0 PL translate
+}ifelse
+1 -1 scale
+}bind def
+/EP{
+level0 restore
+showpage
+}def
+/DA{
+newpath arcn stroke
+}bind def
+/SN{
+transform
+.25 sub exch .25 sub exch
+round .25 add exch round .25 add exch
+itransform
+}bind def
+/DL{
+SN
+moveto
+SN
+lineto stroke
+}bind def
+/DC{
+newpath 0 360 arc closepath
+}bind def
+/TM matrix def
+/DE{
+TM currentmatrix pop
+translate scale newpath 0 0 .5 0 360 arc closepath
+TM setmatrix
+}bind def
+/RC/rcurveto load def
+/RL/rlineto load def
+/ST/stroke load def
+/MT/moveto load def
+/CL/closepath load def
+/Fr{
+setrgbcolor fill
+}bind def
+/setcmykcolor where{
+pop
+/Fk{
+setcmykcolor fill
+}bind def
+}if
+/Fg{
+setgray fill
+}bind def
+/FL/fill load def
+/LW/setlinewidth load def
+/Cr/setrgbcolor load def
+/setcmykcolor where{
+pop
+/Ck/setcmykcolor load def
+}if
+/Cg/setgray load def
+/RE{
+findfont
+dup maxlength 1 index/FontName known not{1 add}if dict begin
+{
+1 index/FID ne{def}{pop pop}ifelse
+}forall
+/Encoding exch def
+dup/FontName exch def
+currentdict end definefont pop
+}bind def
+/DEFS 0 def
+/EBEGIN{
+moveto
+DEFS begin
+}bind def
+/EEND/end load def
+/CNT 0 def
+/level1 0 def
+/PBEGIN{
+/level1 save def
+translate
+div 3 1 roll div exch scale
+neg exch neg exch translate
+0 setgray
+0 setlinecap
+1 setlinewidth
+0 setlinejoin
+10 setmiterlimit
+[]0 setdash
+/setstrokeadjust where{
+pop
+false setstrokeadjust
+}if
+/setoverprint where{
+pop
+false setoverprint
+}if
+newpath
+/CNT countdictstack def
+userdict begin
+/showpage{}def
+/setpagedevice{}def
+}bind def
+/PEND{
+countdictstack CNT sub{end}repeat
+level1 restore
+}bind def
+end def
+/setpacking where{
+pop
+setpacking
+}if
+%%EndResource
+%%EndProlog
+%%BeginSetup
+%%BeginFeature: *PageSize Default
+<< /PageSize [ 595 842 ] /ImagingBBox null >> setpagedevice
+%%EndFeature
+%%IncludeResource: font Times-Roman
+%%IncludeResource: font Times-Bold
+%%IncludeResource: font Times-Italic
+%%IncludeResource: font Courier
+%%IncludeResource: font Symbol
+grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
+def/PL 841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron
+/Zcaron/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef
+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
+/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
+/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
+/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
+/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
+/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
+/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
+/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
+/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
+/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
+/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
+/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
+/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
+/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
+/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
+/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
+/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
+/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
+/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
+/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
+/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
+/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
+/Courier@0 ENC0/Courier RE/Times-Italic@0 ENC0/Times-Italic RE
+/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE
+%%EndSetup
+%%Page: 1 1
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10.95/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0
+(bash \255 GNU Bourne-Ag)108 96 Q(ain SHell)-.05 E F1(SYNOPSIS)72 112.8
+Q/F2 10/Times-Bold@0 SF(bash)108 124.8 Q F0([options] [\214le])2.5 E F1
+(COPYRIGHT)72 141.6 Q F0(Bash is Cop)108 153.6 Q
+(yright \251 1989-2009 by the Free Softw)-.1 E(are F)-.1 E
+(oundation, Inc.)-.15 E F1(DESCRIPTION)72 170.4 Q F2(Bash)108 182.4 Q F0
+.973(is an)3.474 F F2(sh)3.473 E F0 .973
+(-compatible command language interpreter that e)B -.15(xe)-.15 G .973
+(cutes commands read from the standard).15 F(input or from a \214le.)108
+194.4 Q F2(Bash)5 E F0(also incorporates useful features from the)2.5 E
+/F3 10/Times-Italic@0 SF -.4(Ko)2.5 G(rn).4 E F0(and)2.5 E F3(C)2.5 E F0
+(shells \()2.5 E F2(ksh)A F0(and)2.5 E F2(csh)2.5 E F0(\).)A F2(Bash)108
+211.2 Q F0 .527(is intended to be a conformant implementation of the Sh\
+ell and Utilities portion of the IEEE POSIX)3.027 F
+(speci\214cation \(IEEE Standard 1003.1\).)108 223.2 Q F2(Bash)5 E F0
+(can be con\214gured to be POSIX-conformant by def)2.5 E(ault.)-.1 E F1
+(OPTIONS)72 240 Q F0 .52(In addition to the single-character shell opti\
+ons documented in the description of the)108 252 R F2(set)3.02 E F0 -.2
+(bu)3.02 G .52(iltin command,).2 F F2(bash)108 264 Q F0
+(interprets the follo)2.5 E(wing options when it is in)-.25 E -.2(vo)-.4
+G -.1(ke).2 G(d:).1 E F2<ad63>108 280.8 Q F3(string)4.166 E F0 .796
+(If the)12.354 F F2<ad63>3.296 E F0 .796
+(option is present, then commands are read from)3.296 F F3(string)3.296
+E F0 5.796(.I).22 G 3.297(ft)-5.796 G .797(here are ar)-3.297 F .797
+(guments after)-.18 F(the)158 292.8 Q F3(string)2.5 E F0 2.5(,t).22 G
+(he)-2.5 E 2.5(ya)-.15 G
+(re assigned to the positional parameters, starting with)-2.5 E F2($0)
+2.5 E F0(.)A F2<ad69>108 304.8 Q F0(If the)41.52 E F2<ad69>2.5 E F0
+(option is present, the shell is)2.5 E F3(inter)2.5 E(active)-.15 E F0
+(.).18 E F2<ad6c>108 316.8 Q F0(Mak)41.52 E(e)-.1 E F2(bash)2.5 E F0
+(act as if it had been in)2.5 E -.2(vo)-.4 G -.1(ke).2 G 2.5(da).1 G 2.5
+(sal)-2.5 G(ogin shell \(see)-2.5 E/F4 9/Times-Bold@0 SF(INV)2.5 E(OCA)
+-.405 E(TION)-.855 E F0(belo)2.25 E(w\).)-.25 E F2<ad72>108 328.8 Q F0
+(If the)39.86 E F2<ad72>2.5 E F0(option is present, the shell becomes)
+2.5 E F3 -.37(re)2.5 G(stricted).37 E F0(\(see)3.27 E F4
+(RESTRICTED SHELL)2.5 E F0(belo)2.25 E(w\).)-.25 E F2<ad73>108 340.8 Q
+F0 .602(If the)40.41 F F2<ad73>3.102 E F0 .602
+(option is present, or if no ar)3.102 F .602
+(guments remain after option processing, then commands)-.18 F .616
+(are read from the standard input.)158 352.8 R .617(This option allo)
+5.617 F .617(ws the positional parameters to be set when)-.25 F(in)158
+364.8 Q -.2(vo)-.4 G(king an interacti).2 E .3 -.15(ve s)-.25 H(hell.)
+.15 E F2<ad44>108 376.8 Q F0 3.184(Al)37.08 G .684
+(ist of all double-quoted strings preceded by)-3.184 F F2($)3.184 E F0
+.684(is printed on the standard output.)3.184 F .683(These are)5.683 F
+.458(the strings that are subject to language translation when the curr\
+ent locale is not)158 388.8 R F2(C)2.958 E F0(or)2.959 E F2(POSIX)2.959
+E F0(.)A(This implies the)158 400.8 Q F2<ad6e>2.5 E F0
+(option; no commands will be e)2.5 E -.15(xe)-.15 G(cuted.).15 E F2
+([\255+]O [)108 412.8 Q F3(shopt_option)A F2(])A F3(shopt_option)158
+424.8 Q F0 1.097(is one of the shell options accepted by the)3.597 F F2
+(shopt)3.597 E F0 -.2(bu)3.597 G 1.097(iltin \(see).2 F F4 1.096
+(SHELL B)3.596 F(UIL)-.09 E(TIN)-.828 E(COMMANDS)158 436.8 Q F0(belo)
+3.002 E 3.252(w\). If)-.25 F F3(shopt_option)3.253 E F0 .753
+(is present,)3.253 F F2<ad4f>3.253 E F0 .753(sets the v)3.253 F .753
+(alue of that option;)-.25 F F2(+O)3.253 E F0(unsets)3.253 E 2.625
+(it. If)158 448.8 R F3(shopt_option)2.625 E F0 .125
+(is not supplied, the names and v)2.625 F .124
+(alues of the shell options accepted by)-.25 F F2(shopt)2.624 E F0 .505
+(are printed on the standard output.)158 460.8 R .505(If the in)5.505 F
+-.2(vo)-.4 G .505(cation option is).2 F F2(+O)3.005 E F0 3.005(,t)C .506
+(he output is displayed in a)-3.005 F
+(format that may be reused as input.)158 472.8 Q F2<adad>108 484.8 Q F0
+(A)38.6 E F2<adad>3.364 E F0 .864
+(signals the end of options and disables further option processing.)
+3.364 F(An)5.863 E 3.363(ya)-.15 G -.18(rg)-3.363 G .863(uments after)
+.18 F(the)158 496.8 Q F2<adad>2.5 E F0
+(are treated as \214lenames and ar)2.5 E 2.5(guments. An)-.18 F(ar)2.5 E
+(gument of)-.18 E F2<ad>2.5 E F0(is equi)2.5 E -.25(va)-.25 G(lent to)
+.25 E F2<adad>2.5 E F0(.)A F2(Bash)108 513.6 Q F0 .303
+(also interprets a number of multi-character options.)2.803 F .304
+(These options must appear on the command line)5.303 F
+(before the single-character options to be recognized.)108 525.6 Q F2
+<adad646562>108 542.4 Q(ugger)-.2 E F0 .475(Arrange for the deb)144
+554.4 R .475(ugger pro\214le to be e)-.2 F -.15(xe)-.15 G .475
+(cuted before the shell starts.).15 F -.45(Tu)5.474 G .474(rns on e).45
+F .474(xtended deb)-.15 F(ug-)-.2 E .452
+(ging mode \(see the description of the)144 566.4 R F2(extdeb)2.952 E
+(ug)-.2 E F0 .452(option to the)2.952 F F2(shopt)2.952 E F0 -.2(bu)2.952
+G .452(iltin belo).2 F .452(w\) and shell func-)-.25 F
+(tion tracing \(see the description of the)144 578.4 Q F2
+(\255o functrace)2.5 E F0(option to the)2.5 E F2(set)2.5 E F0 -.2(bu)2.5
+G(iltin belo).2 E(w\).)-.25 E F2(\255\255dump\255po\255strings)108 590.4
+Q F0(Equi)144 602.4 Q -.25(va)-.25 G(lent to).25 E F2<ad44>2.5 E F0 2.5
+(,b)C(ut the output is in the GNU)-2.7 E F3 -.1(ge)2.5 G(tte).1 E(xt)-.2
+E F2(po)2.5 E F0(\(portable object\) \214le format.)2.5 E F2
+(\255\255dump\255strings)108 614.4 Q F0(Equi)144 626.4 Q -.25(va)-.25 G
+(lent to).25 E F2<ad44>2.5 E F0(.)A F2(\255\255help)108 638.4 Q F0
+(Display a usage message on standard output and e)6.26 E
+(xit successfully)-.15 E(.)-.65 E F2<adad696e6974ad8c6c65>108 650.4 Q F3
+(\214le)2.5 E F2<adad72>108 662.4 Q(c\214le)-.18 E F3(\214le)2.5 E F0
+(Ex)144 674.4 Q 1.599(ecute commands from)-.15 F F3(\214le)6.009 E F0
+1.598(instead of the standard personal initialization \214le)4.279 F F3
+(~/.bashr)3.598 E(c)-.37 E F0 1.598(if the)4.408 F(shell is interacti)
+144 686.4 Q .3 -.15(ve \()-.25 H(see).15 E F4(INV)2.5 E(OCA)-.405 E
+(TION)-.855 E F0(belo)2.25 E(w\).)-.25 E F2(\255\255login)108 703.2 Q F0
+(Equi)144 715.2 Q -.25(va)-.25 G(lent to).25 E F2<ad6c>2.5 E F0(.)A
+(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(1)190.955 E 0 Cg EP
+%%Page: 2 2
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(\255\255noediting)108 84 Q F0
+(Do not use the GNU)144 96 Q F1 -.18(re)2.5 G(adline).18 E F0
+(library to read command lines when the shell is interacti)2.5 E -.15
+(ve)-.25 G(.).15 E F1(\255\255nopr)108 112.8 Q(o\214le)-.18 E F0 .017
+(Do not read either the system-wide startup \214le)144 124.8 R/F2 10
+/Times-Italic@0 SF(/etc/pr)4.183 E(o\214le)-.45 E F0 .017(or an)4.183 F
+2.517(yo)-.15 G 2.517(ft)-2.517 G .018
+(he personal initialization \214les)-2.517 F F2(~/.bash_pr)144 136.8 Q
+(o\214le)-.45 E F0(,).18 E F2(~/.bash_lo)2.698 E(gin)-.1 E F0 2.698(,o)
+.24 G(r)-2.698 E F2(~/.pr)2.698 E(o\214le)-.45 E F0 5.198(.B).18 G 2.698
+(yd)-5.198 G(ef)-2.698 E(ault,)-.1 E F1(bash)2.698 E F0 .198
+(reads these \214les when it is in)2.698 F -.2(vo)-.4 G -.1(ke).2 G
+2.697(da).1 G(s)-2.697 E 2.5(al)144 148.8 S(ogin shell \(see)-2.5 E/F3 9
+/Times-Bold@0 SF(INV)2.5 E(OCA)-.405 E(TION)-.855 E F0(belo)2.25 E(w\).)
+-.25 E F1<adad6e6f72>108 165.6 Q(c)-.18 E F0 1.228(Do not read and e)
+5.34 F -.15(xe)-.15 G 1.228(cute the personal initialization \214le).15
+F F2(~/.bashr)3.228 E(c)-.37 E F0 1.228(if the shell is interacti)4.038
+F -.15(ve)-.25 G 6.228(.T).15 G(his)-6.228 E(option is on by def)144
+177.6 Q(ault if the shell is in)-.1 E -.2(vo)-.4 G -.1(ke).2 G 2.5(da).1
+G(s)-2.5 E F1(sh)2.5 E F0(.)A F1(\255\255posix)108 194.4 Q F0 1.783
+(Change the beha)144 206.4 R 1.782(vior of)-.2 F F1(bash)4.282 E F0
+1.782(where the def)4.282 F 1.782(ault operation dif)-.1 F 1.782
+(fers from the POSIX standard to)-.25 F(match the standard \()144 218.4
+Q F2(posix mode)A F0(\).)A F1<adad72>108 235.2 Q(estricted)-.18 E F0
+(The shell becomes restricted \(see)144 247.2 Q F3(RESTRICTED SHELL)2.5
+E F0(belo)2.25 E(w\).)-.25 E F1<adad76>108 264 Q(erbose)-.1 E F0(Equi)
+144 276 Q -.25(va)-.25 G(lent to).25 E F1<ad76>5 E F0(.)A F1<adad76>108
+292.8 Q(ersion)-.1 E F0(Sho)144 304.8 Q 2.5(wv)-.25 G
+(ersion information for this instance of)-2.65 E F1(bash)2.5 E F0
+(on the standard output and e)2.5 E(xit successfully)-.15 E(.)-.65 E/F4
+10.95/Times-Bold@0 SF(ARGUMENTS)72 321.6 Q F0 .016(If ar)108 333.6 R
+.016(guments remain after option processing, and neither the)-.18 F F1
+<ad63>2.516 E F0 .016(nor the)2.516 F F1<ad73>2.516 E F0 .016
+(option has been supplied, the \214rst)2.516 F(ar)108 345.6 Q .041(gume\
+nt is assumed to be the name of a \214le containing shell commands.)-.18
+F(If)5.041 E F1(bash)2.541 E F0 .041(is in)2.541 F -.2(vo)-.4 G -.1(ke)
+.2 G 2.541(di).1 G 2.541(nt)-2.541 G .041(his f)-2.541 F(ashion,)-.1 E
+F1($0)108 357.6 Q F0 .936(is set to the name of the \214le, and the pos\
+itional parameters are set to the remaining ar)3.435 F(guments.)-.18 E
+F1(Bash)5.936 E F0 .234(reads and e)108 369.6 R -.15(xe)-.15 G .234
+(cutes commands from this \214le, then e).15 F(xits.)-.15 E F1(Bash)
+5.234 E F0 1.334 -.55('s e)D .234(xit status is the e).4 F .233
+(xit status of the last com-)-.15 F .348(mand e)108 381.6 R -.15(xe)-.15
+G .348(cuted in the script.).15 F .348(If no commands are e)5.348 F -.15
+(xe)-.15 G .348(cuted, the e).15 F .349(xit status is 0.)-.15 F .349
+(An attempt is \214rst made to)5.349 F .254
+(open the \214le in the current directory)108 393.6 R 2.754(,a)-.65 G
+.253
+(nd, if no \214le is found, then the shell searches the directories in)
+-2.754 F F3 -.666(PA)2.753 G(TH)-.189 E F0(for the script.)108 405.6 Q
+F4(INV)72 422.4 Q(OCA)-.493 E(TION)-1.04 E F0(A)108 434.4 Q F2(lo)2.5 E
+(gin shell)-.1 E F0(is one whose \214rst character of ar)2.5 E
+(gument zero is a)-.18 E F1<ad>2.5 E F0 2.5(,o)C 2.5(ro)-2.5 G
+(ne started with the)-2.5 E F1(\255\255login)2.5 E F0(option.)2.5 E(An)
+108 451.2 Q F2(inter)2.814 E(active)-.15 E F0 .314
+(shell is one started without non-option ar)2.814 F .315
+(guments and without the)-.18 F F1<ad63>2.815 E F0 .315
+(option whose standard)2.815 F 1.5
+(input and error are both connected to terminals \(as determined by)108
+463.2 R F2(isatty)4 E F0 1.5(\(3\)\), or one started with the).32 F F1
+<ad69>4 E F0(option.)108 475.2 Q F3(PS1)5.289 E F0 .289(is set and)2.539
+F F1<24ad>2.789 E F0(includes)2.789 E F1(i)2.789 E F0(if)2.789 E F1
+(bash)2.789 E F0 .289(is interacti)2.789 F -.15(ve)-.25 G 2.789(,a).15 G
+(llo)-2.789 E .29(wing a shell script or a startup \214le to test this)
+-.25 F(state.)108 487.2 Q .033(The follo)108 504 R .033
+(wing paragraphs describe ho)-.25 F(w)-.25 E F1(bash)2.532 E F0 -.15
+(exe)2.532 G .032(cutes its startup \214les.).15 F .032(If an)5.032 F
+2.532(yo)-.15 G 2.532(ft)-2.532 G .032(he \214les e)-2.532 F .032
+(xist b)-.15 F .032(ut cannot be)-.2 F(read,)108 516 Q F1(bash)3.085 E
+F0 .585(reports an error)3.085 F 5.585(.T)-.55 G .585(ildes are e)-5.935
+F .586(xpanded in \214le names as described belo)-.15 F 3.086(wu)-.25 G
+(nder)-3.086 E F1 -.18(Ti)3.086 G .586(lde Expansion).18 F F0(in the)108
+528 Q F3(EXP)2.5 E(ANSION)-.666 E F0(section.)2.25 E(When)108 544.8 Q F1
+(bash)2.896 E F0 .396(is in)2.896 F -.2(vo)-.4 G -.1(ke).2 G 2.896(da).1
+G 2.896(sa)-2.896 G 2.896(ni)-2.896 G(nteracti)-2.896 E .696 -.15(ve l)
+-.25 H .396(ogin shell, or as a non-interacti).15 F .695 -.15(ve s)-.25
+H .395(hell with the).15 F F1(\255\255login)2.895 E F0 .395(option, it)
+2.895 F 1.333(\214rst reads and e)108 556.8 R -.15(xe)-.15 G 1.333
+(cutes commands from the \214le).15 F F2(/etc/pr)3.833 E(o\214le)-.45 E
+F0 3.834(,i)C 3.834(ft)-3.834 G 1.334(hat \214le e)-3.834 F 3.834
+(xists. After)-.15 F 1.334(reading that \214le, it)3.834 F .249
+(looks for)108 568.8 R F2(~/.bash_pr)2.749 E(o\214le)-.45 E F0(,)A F2
+(~/.bash_lo)2.749 E(gin)-.1 E F0 2.749(,a)C(nd)-2.749 E F2(~/.pr)2.749 E
+(o\214le)-.45 E F0 2.749(,i)C 2.749(nt)-2.749 G .249(hat order)-2.749 F
+2.748(,a)-.4 G .248(nd reads and e)-2.748 F -.15(xe)-.15 G .248
+(cutes commands from).15 F .796(the \214rst one that e)108 580.8 R .796
+(xists and is readable.)-.15 F(The)5.796 E F1(\255\255nopr)3.296 E
+(o\214le)-.18 E F0 .797(option may be used when the shell is started to)
+3.296 F(inhibit this beha)108 592.8 Q(vior)-.2 E(.)-.55 E
+(When a login shell e)108 609.6 Q(xits,)-.15 E F1(bash)2.5 E F0
+(reads and e)2.5 E -.15(xe)-.15 G(cutes commands from the \214le).15 E
+F2(~/.bash_lo)2.5 E(gout)-.1 E F0 2.5(,i)C 2.5(fi)-2.5 G 2.5(te)-2.5 G
+(xists.)-2.65 E 1.698(When an interacti)108 626.4 R 1.998 -.15(ve s)-.25
+H 1.698(hell that is not a login shell is started,).15 F F1(bash)4.197 E
+F0 1.697(reads and e)4.197 F -.15(xe)-.15 G 1.697(cutes commands from)
+.15 F F2(~/.bashr)108 638.4 Q(c)-.37 E F0 2.535(,i)C 2.535(ft)-2.535 G
+.035(hat \214le e)-2.535 F 2.535(xists. This)-.15 F .036
+(may be inhibited by using the)2.535 F F1<adad6e6f72>2.536 E(c)-.18 E F0
+2.536(option. The)2.536 F F1<adad72>2.536 E(c\214le)-.18 E F2(\214le)
+2.536 E F0 .036(option will)2.536 F(force)108 650.4 Q F1(bash)2.5 E F0
+(to read and e)2.5 E -.15(xe)-.15 G(cute commands from).15 E F2(\214le)
+2.5 E F0(instead of)2.5 E F2(~/.bashr)2.5 E(c)-.37 E F0(.)A(When)108
+667.2 Q F1(bash)5.306 E F0 2.806(is started non-interacti)5.306 F -.15
+(ve)-.25 G(ly).15 E 5.306(,t)-.65 G 5.306(or)-5.306 G 2.806
+(un a shell script, for e)-5.306 F 2.805(xample, it looks for the v)-.15
+F(ariable)-.25 E F3 -.27(BA)108 679.2 S(SH_ENV).27 E F0 1.01(in the en)
+3.26 F 1.01(vironment, e)-.4 F 1.01(xpands its v)-.15 F 1.01
+(alue if it appears there, and uses the e)-.25 F 1.011(xpanded v)-.15 F
+1.011(alue as the)-.25 F(name of a \214le to read and e)108 691.2 Q -.15
+(xe)-.15 G(cute.).15 E F1(Bash)5 E F0(beha)2.5 E -.15(ve)-.2 G 2.5(sa)
+.15 G 2.5(si)-2.5 G 2.5(ft)-2.5 G(he follo)-2.5 E(wing command were e)
+-.25 E -.15(xe)-.15 G(cuted:).15 E/F5 10/Courier@0 SF
+(if [ \255n "$BASH_ENV" ]; then . "$BASH_ENV"; fi)144 709.2 Q F0 -.2(bu)
+108 727.2 S 2.5(tt).2 G(he v)-2.5 E(alue of the)-.25 E F3 -.666(PA)2.5 G
+(TH)-.189 E F0 -.25(va)2.25 G
+(riable is not used to search for the \214le name.).25 E(GNU Bash-4.1)72
+768 Q(2009 December 29)135.965 E(2)190.955 E 0 Cg EP
+%%Page: 3 3
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E(If)108 84 Q/F1 10/Times-Bold@0 SF(bash)3.417 E F0 .917(is in)
+3.417 F -.2(vo)-.4 G -.1(ke).2 G 3.417(dw).1 G .917(ith the name)-3.417
+F F1(sh)3.417 E F0 3.417(,i)C 3.417(tt)-3.417 G .917
+(ries to mimic the startup beha)-3.417 F .917(vior of historical v)-.2 F
+.917(ersions of)-.15 F F1(sh)3.417 E F0(as)3.417 E .145
+(closely as possible, while conforming to the POSIX standard as well.)
+108 96 R .145(When in)5.145 F -.2(vo)-.4 G -.1(ke).2 G 2.645(da).1 G
+2.645(sa)-2.645 G 2.645(ni)-2.645 G(nteracti)-2.645 E .445 -.15(ve l)
+-.25 H(ogin).15 E 1.264(shell, or a non-interacti)108 108 R 1.564 -.15
+(ve s)-.25 H 1.264(hell with the).15 F F1(\255\255login)3.764 E F0 1.264
+(option, it \214rst attempts to read and e)3.764 F -.15(xe)-.15 G 1.263
+(cute commands).15 F(from)108 120 Q/F2 10/Times-Italic@0 SF(/etc/pr)
+4.142 E(o\214le)-.45 E F0(and)3.172 E F2(~/.pr)2.992 E(o\214le)-.45 E F0
+2.992(,i).18 G 2.992(nt)-2.992 G .492(hat order)-2.992 F 5.492(.T)-.55 G
+(he)-5.492 E F1(\255\255nopr)2.992 E(o\214le)-.18 E F0 .493
+(option may be used to inhibit this beha)2.993 F(vior)-.2 E(.)-.55 E
+.418(When in)108 132 R -.2(vo)-.4 G -.1(ke).2 G 2.918(da).1 G 2.918(sa)
+-2.918 G 2.918(ni)-2.918 G(nteracti)-2.918 E .718 -.15(ve s)-.25 H .418
+(hell with the name).15 F F1(sh)2.918 E F0(,)A F1(bash)2.918 E F0 .418
+(looks for the v)2.918 F(ariable)-.25 E/F3 9/Times-Bold@0 SF(ENV)2.918 E
+/F4 9/Times-Roman@0 SF(,)A F0 -.15(ex)2.667 G .417(pands its v).15 F
+(alue)-.25 E .171(if it is de\214ned, and uses the e)108 144 R .171
+(xpanded v)-.15 F .171(alue as the name of a \214le to read and e)-.25 F
+-.15(xe)-.15 G 2.671(cute. Since).15 F 2.671(as)2.671 G .171(hell in)
+-2.671 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E(as)108 156 Q F1(sh)3.081 E F0
+.581(does not attempt to read and e)3.081 F -.15(xe)-.15 G .581
+(cute commands from an).15 F 3.08(yo)-.15 G .58
+(ther startup \214les, the)-3.08 F F1<adad72>3.08 E(c\214le)-.18 E F0
+.58(option has)3.08 F .182(no ef)108 168 R 2.682(fect. A)-.25 F
+(non-interacti)2.682 E .482 -.15(ve s)-.25 H .182(hell in).15 F -.2(vo)
+-.4 G -.1(ke).2 G 2.682(dw).1 G .182(ith the name)-2.682 F F1(sh)2.682 E
+F0 .182(does not attempt to read an)2.682 F 2.683(yo)-.15 G .183
+(ther startup \214les.)-2.683 F(When in)108 180 Q -.2(vo)-.4 G -.1(ke).2
+G 2.5(da).1 G(s)-2.5 E F1(sh)2.5 E F0(,)A F1(bash)2.5 E F0(enters)2.5 E
+F2(posix)3.75 E F0(mode after the startup \214les are read.)3.03 E(When)
+108 196.8 Q F1(bash)2.727 E F0 .226(is started in)2.727 F F2(posix)3.976
+E F0 .226(mode, as with the)3.256 F F1(\255\255posix)2.726 E F0 .226
+(command line option, it follo)2.726 F .226(ws the POSIX stan-)-.25 F
+.341(dard for startup \214les.)108 208.8 R .341(In this mode, interacti)
+5.341 F .641 -.15(ve s)-.25 H .341(hells e).15 F .341(xpand the)-.15 F
+F3(ENV)2.841 E F0 -.25(va)2.591 G .342(riable and commands are read and)
+.25 F -.15(exe)108 220.8 S(cuted from the \214le whose name is the e).15
+E(xpanded v)-.15 E 2.5(alue. No)-.25 F(other startup \214les are read.)
+2.5 E F1(Bash)108 237.6 Q F0 .644(attempts to determine when it is bein\
+g run with its standard input connected to a a netw)3.144 F .643
+(ork connec-)-.1 F .229(tion, as if by the remote shell daemon, usually)
+108 249.6 R F2 -.1(rs)2.729 G(hd).1 E F0 2.729(,o)C 2.73(rt)-2.729 G .23
+(he secure shell daemon)-2.73 F F2(sshd)2.73 E F0 5.23(.I)C(f)-5.23 E F1
+(bash)2.73 E F0 .23(determines it)2.73 F .741(is being run in this f)108
+261.6 R .741(ashion, it reads and e)-.1 F -.15(xe)-.15 G .741
+(cutes commands from).15 F F2(~/.bashr)3.241 E(c)-.37 E F0 3.241(,i)C
+3.241(ft)-3.241 G .741(hat \214le e)-3.241 F .741(xists and is read-)
+-.15 F 2.97(able. It)108 273.6 R .47(will not do this if in)2.97 F -.2
+(vo)-.4 G -.1(ke).2 G 2.97(da).1 G(s)-2.97 E F1(sh)2.97 E F0 5.47(.T)C
+(he)-5.47 E F1<adad6e6f72>2.97 E(c)-.18 E F0 .47
+(option may be used to inhibit this beha)2.97 F(vior)-.2 E 2.97(,a)-.4 G
+.47(nd the)-2.97 F F1<adad72>108 285.6 Q(c\214le)-.18 E F0 .886
+(option may be used to force another \214le to be read, b)3.387 F(ut)-.2
+E F2 -.1(rs)3.386 G(hd).1 E F0 .886(does not generally in)3.386 F -.2
+(vo)-.4 G 1.086 -.1(ke t).2 H .886(he shell).1 F
+(with those options or allo)108 297.6 Q 2.5(wt)-.25 G
+(hem to be speci\214ed.)-2.5 E 1.207
+(If the shell is started with the ef)108 314.4 R(fecti)-.25 E 1.507 -.15
+(ve u)-.25 H 1.208
+(ser \(group\) id not equal to the real user \(group\) id, and the).15 F
+F1<ad70>3.708 E F0 .536(option is not supplied, no startup \214les are \
+read, shell functions are not inherited from the en)108 326.4 R .535
+(vironment, the)-.4 F F3(SHELLOPTS)108 338.4 Q F4(,)A F3 -.27(BA)2.959 G
+(SHOPTS).27 E F4(,)A F3(CDP)2.959 E -.855(AT)-.666 G(H).855 E F4(,)A F0
+(and)2.959 E F3(GLOBIGNORE)3.209 E F0 -.25(va)2.959 G .709
+(riables, if the).25 F 3.209(ya)-.15 G .71(ppear in the en)-3.209 F .71
+(vironment, are)-.4 F .905(ignored, and the ef)108 350.4 R(fecti)-.25 E
+1.205 -.15(ve u)-.25 H .904(ser id is set to the real user id.).15 F
+.904(If the)5.904 F F1<ad70>3.404 E F0 .904(option is supplied at in)
+3.404 F -.2(vo)-.4 G .904(cation, the).2 F(startup beha)108 362.4 Q
+(vior is the same, b)-.2 E(ut the ef)-.2 E(fecti)-.25 E .3 -.15(ve u)
+-.25 H(ser id is not reset.).15 E/F5 10.95/Times-Bold@0 SF(DEFINITIONS)
+72 379.2 Q F0(The follo)108 391.2 Q
+(wing de\214nitions are used throughout the rest of this document.)-.25
+E F1(blank)108 403.2 Q F0 2.5(As)11.54 G(pace or tab)-2.5 E(.)-.4 E F1
+-.1(wo)108 415.2 S(rd).1 E F0 2.5(As)13.88 G
+(equence of characters considered as a single unit by the shell.)-2.5 E
+(Also kno)5 E(wn as a)-.25 E F1(tok)2.5 E(en)-.1 E F0(.)A F1(name)108
+427.2 Q F0(A)12.67 E F2(wor)3.005 E(d)-.37 E F0 .165
+(consisting only of alphanumeric characters and underscores, and be)
+3.435 F .166(ginning with an alpha-)-.15 F
+(betic character or an underscore.)144 439.2 Q(Also referred to as an)5
+E F1(identi\214er)2.5 E F0(.)A F1(metacharacter)108 451.2 Q F0 2.5(Ac)
+144 463.2 S(haracter that, when unquoted, separates w)-2.5 E 2.5
+(ords. One)-.1 F(of the follo)2.5 E(wing:)-.25 E F1 5(|&;\(\)<>s)144
+475.2 S 2.5(pace tab)-5 F(contr)108 487.2 Q(ol operator)-.18 E F0(A)144
+499.2 Q F2(tok)2.5 E(en)-.1 E F0(that performs a control function.)2.5 E
+(It is one of the follo)5 E(wing symbols:)-.25 E/F6 10/Symbol SF<efef>
+144 511.2 Q F1 5(&&)5 G 5(&;;)-5 G 5(;\(\)||)-5 G 10(&<)-5 G(newline>)
+-10 E F5(RESER)72 528 Q(VED W)-.602 E(ORDS)-.11 E F2 .307(Reserved wor)
+108 540 R(ds)-.37 E F0 .307(are w)2.807 F .307(ords that ha)-.1 F .607
+-.15(ve a s)-.2 H .306(pecial meaning to the shell.).15 F .306
+(The follo)5.306 F .306(wing w)-.25 F .306(ords are recognized as)-.1 F
+(reserv)108 552 Q .227(ed when unquoted and either the \214rst w)-.15 F
+.227(ord of a simple command \(see)-.1 F F3 .227(SHELL GRAMMAR)2.727 F
+F0(belo)2.477 E .227(w\) or)-.25 F(the third w)108 564 Q(ord of a)-.1 E
+F1(case)2.5 E F0(or)2.5 E F1 -.25(fo)2.5 G(r).25 E F0(command:)2.5 E F1
+11.916(!c)144 580.8 S 9.416(ase do done elif else esac \214 f)-11.916 F
+9.415(or function if in select then until)-.25 F 7.5
+(while { } time [[ ]])144 592.8 R F5(SHELL GRAMMAR)72 609.6 Q F1
+(Simple Commands)87 621.6 Q F0(A)108 633.6 Q F2 .388(simple command)
+2.888 F F0 .388(is a sequence of optional v)2.888 F .389
+(ariable assignments follo)-.25 F .389(wed by)-.25 F F1(blank)2.889 E F0
+.389(-separated w)B .389(ords and)-.1 F .816
+(redirections, and terminated by a)108 645.6 R F2(contr)3.316 E .815
+(ol oper)-.45 F(ator)-.15 E F0 5.815(.T)C .815(he \214rst w)-5.815 F
+.815(ord speci\214es the command to be e)-.1 F -.15(xe)-.15 G(cuted,).15
+E(and is passed as ar)108 657.6 Q(gument zero.)-.18 E(The remaining w)5
+E(ords are passed as ar)-.1 E(guments to the in)-.18 E -.2(vo)-.4 G -.1
+(ke).2 G 2.5(dc).1 G(ommand.)-2.5 E .175(The return v)108 674.4 R .175
+(alue of a)-.25 F F2 .175(simple command)2.675 F F0 .175(is its e)2.675
+F .175(xit status, or 128+)-.15 F F2(n)A F0 .176
+(if the command is terminated by signal)3.508 F F2(n)2.676 E F0(.).24 E
+F1(Pipelines)87 691.2 Q F0(A)108 703.2 Q F2(pipeline)2.996 E F0 .496(is\
+ a sequence of one or more commands separated by one of the control ope\
+rators)2.996 F F1(|)2.996 E F0(or)2.996 E F1(|&)2.996 E F0 5.496(.T)C
+(he)-5.496 E(format for a pipeline is:)108 715.2 Q(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(3)190.955 E 0 Cg EP
+%%Page: 4 4
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E([)144 84 Q/F1 10/Times-Bold@0 SF(time)A F0([)2.5 E F1<ad70>A F0
+(]] [ ! ])A/F2 10/Times-Italic@0 SF(command)2.5 E F0 2.5([[)2.5 G F1(|)
+-2.5 E/F3 10/Symbol SF<ef>A F1(|&)A F0(])A F2(command2)2.5 E F0(... ])
+2.5 E .243(The standard output of)108 100.8 R F2(command)2.943 E F0 .244
+(is connected via a pipe to the standard input of)3.513 F F2(command2)
+2.744 E F0 5.244(.T).02 G .244(his connec-)-5.244 F .643
+(tion is performed before an)108 112.8 R 3.143(yr)-.15 G .642
+(edirections speci\214ed by the command \(see)-3.143 F/F4 9/Times-Bold@0
+SF(REDIRECTION)3.142 E F0(belo)2.892 E 3.142(w\). If)-.25 F F1(|&)3.142
+E F0(is)3.142 E 1.43(used, the standard error of)108 124.8 R F2(command)
+3.93 E F0 1.431(is connected to)3.93 F F2(command2)3.931 E F0 2.531 -.55
+('s s)D 1.431(tandard input through the pipe; it is).55 F 1.197
+(shorthand for)108 136.8 R F1 1.197(2>&1 |)3.697 F F0 6.197(.T)C 1.197
+(his implicit redirection of the standard error is performed after an)
+-6.197 F 3.696(yr)-.15 G(edirections)-3.696 E
+(speci\214ed by the command.)108 148.8 Q .48
+(The return status of a pipeline is the e)108 165.6 R .48
+(xit status of the last command, unless the)-.15 F F1(pipefail)2.98 E F0
+.48(option is enabled.)2.98 F(If)108 177.6 Q F1(pipefail)2.687 E F0 .187
+(is enabled, the pipeline')2.687 F 2.687(sr)-.55 G .186
+(eturn status is the v)-2.687 F .186
+(alue of the last \(rightmost\) command to e)-.25 F .186(xit with a)-.15
+F .61(non-zero status, or zero if all commands e)108 189.6 R .611
+(xit successfully)-.15 F 5.611(.I)-.65 G 3.111(ft)-5.611 G .611
+(he reserv)-3.111 F .611(ed w)-.15 F(ord)-.1 E F1(!)3.111 E F0 .611
+(precedes a pipeline, the)5.611 F -.15(ex)108 201.6 S .55
+(it status of that pipeline is the logical ne).15 F -.05(ga)-.15 G .55
+(tion of the e).05 F .55(xit status as described abo)-.15 F -.15(ve)-.15
+G 5.55(.T).15 G .55(he shell w)-5.55 F .55(aits for)-.1 F
+(all commands in the pipeline to terminate before returning a v)108
+213.6 Q(alue.)-.25 E .298(If the)108 230.4 R F1(time)2.799 E F0(reserv)
+2.799 E .299(ed w)-.15 F .299(ord precedes a pipeline, the elapsed as w\
+ell as user and system time consumed by its)-.1 F -.15(exe)108 242.4 S
+.14(cution are reported when the pipeline terminates.).15 F(The)5.139 E
+F1<ad70>2.639 E F0 .139(option changes the output format to that spec-)
+2.639 F .779(i\214ed by POSIX.)108 254.4 R(The)5.779 E F4(TIMEFORMA)
+3.279 E(T)-.855 E F0 -.25(va)3.029 G .779
+(riable may be set to a format string that speci\214es ho).25 F 3.28(wt)
+-.25 G .78(he timing)-3.28 F
+(information should be displayed; see the description of)108 266.4 Q F4
+(TIMEFORMA)2.5 E(T)-.855 E F0(under)2.25 E F1(Shell V)2.5 E(ariables)
+-.92 E F0(belo)2.5 E -.65(w.)-.25 G(Each command in a pipeline is e)108
+283.2 Q -.15(xe)-.15 G
+(cuted as a separate process \(i.e., in a subshell\).).15 E F1(Lists)87
+300 Q F0(A)108 312 Q F2(list)2.601 E F0 .101(is a sequence of one or mo\
+re pipelines separated by one of the operators)2.601 F F1(;)2.6 E F0(,)A
+F1(&)2.6 E F0(,)A F1(&&)2.6 E F0 2.6(,o)C(r)-2.6 E F3<efef>2.6 E F0 2.6
+(,a)C .1(nd option-)-2.6 F(ally terminated by one of)108 324 Q F1(;)2.5
+E F0(,)A F1(&)2.5 E F0 2.5(,o)C(r)-2.5 E F1(<newline>)2.5 E F0(.)A .656
+(Of these list operators,)108 340.8 R F1(&&)3.156 E F0(and)3.156 E F3
+<efef>3.156 E F0(ha)3.156 E .956 -.15(ve e)-.2 H .656
+(qual precedence, follo).15 F .656(wed by)-.25 F F1(;)3.156 E F0(and)
+3.156 E F1(&)3.156 E F0 3.156(,w)C .656(hich ha)-3.156 F .957 -.15(ve e)
+-.2 H .657(qual prece-).15 F(dence.)108 352.8 Q 2.5(As)108 369.6 S
+(equence of one or more ne)-2.5 E(wlines may appear in a)-.25 E F2(list)
+2.5 E F0(instead of a semicolon to delimit commands.)2.5 E .029
+(If a command is terminated by the control operator)108 386.4 R F1(&)
+2.529 E F0 2.529(,t)C .029(he shell e)-2.529 F -.15(xe)-.15 G .029
+(cutes the command in the).15 F F2(bac)2.528 E(kgr)-.2 E(ound)-.45 E F0
+(in)2.528 E 2.875(as)108 398.4 S 2.875(ubshell. The)-2.875 F .375
+(shell does not w)2.875 F .375
+(ait for the command to \214nish, and the return status is 0.)-.1 F .376
+(Commands sepa-)5.376 F .849(rated by a)108 410.4 R F1(;)3.349 E F0 .849
+(are e)3.349 F -.15(xe)-.15 G .848(cuted sequentially; the shell w).15 F
+.848(aits for each command to terminate in turn.)-.1 F .848(The return)
+5.848 F(status is the e)108 422.4 Q(xit status of the last command e)
+-.15 E -.15(xe)-.15 G(cuted.).15 E .632(AND and OR lists are sequences \
+of one of more pipelines separated by the)108 439.2 R F1(&&)3.132 E F0
+(and)3.133 E F3<efef>3.133 E F0 .633(control operators,)3.133 F
+(respecti)108 451.2 Q -.15(ve)-.25 G(ly).15 E 5(.A)-.65 G
+(ND and OR lists are e)-5 E -.15(xe)-.15 G(cuted with left associati).15
+E(vity)-.25 E 5(.A)-.65 G 2.5(nA)-5 G(ND list has the form)-2.5 E F2
+(command1)144 468 Q F1(&&)2.5 E F2(command2)2.5 E(command2)108.2 484.8 Q
+F0(is e)2.52 E -.15(xe)-.15 G(cuted if, and only if,).15 E F2(command1)
+2.7 E F0(returns an e)2.5 E(xit status of zero.)-.15 E
+(An OR list has the form)108 501.6 Q F2(command1)144 518.4 Q F3<efef>2.5
+E F2(command2)2.5 E(command2)108.2 540 Q F0 .729(is e)3.249 F -.15(xe)
+-.15 G .729(cuted if and only if).15 F F2(command1)3.429 E F0 .729
+(returns a non-zero e)3.229 F .729(xit status.)-.15 F .728
+(The return status of AND)5.729 F(and OR lists is the e)108 552 Q
+(xit status of the last command e)-.15 E -.15(xe)-.15 G
+(cuted in the list.).15 E F1(Compound Commands)87 568.8 Q F0(A)108 580.8
+Q F2(compound command)2.5 E F0(is one of the follo)2.5 E(wing:)-.25 E
+(\()108 597.6 Q F2(list)A F0(\))A F2(list)17.11 E F0 .011(is e)2.511 F
+-.15(xe)-.15 G .011(cuted in a subshell en).15 F .011(vironment \(see)
+-.4 F F4 .011(COMMAND EXECUTION ENVIR)2.511 F(ONMENT)-.27 E F0(belo)
+2.262 E(w\).)-.25 E -1.11(Va)144 609.6 S 1.064(riable assignments and b)
+1.11 F 1.064(uiltin commands that af)-.2 F 1.064(fect the shell')-.25 F
+3.564(se)-.55 G -.4(nv)-3.564 G 1.064(ironment do not remain in).4 F(ef)
+144 621.6 Q(fect after the command completes.)-.25 E
+(The return status is the e)5 E(xit status of)-.15 E F2(list)2.5 E F0(.)
+A({)108 638.4 Q F2(list)2.5 E F0 2.5(;})C F2(list)3.89 E F0 .401
+(is simply e)2.901 F -.15(xe)-.15 G .401(cuted in the current shell en)
+.15 F(vironment.)-.4 E F2(list)5.401 E F0 .402
+(must be terminated with a ne)2.901 F .402(wline or)-.25 F 3.215
+(semicolon. This)144 650.4 R .715(is kno)3.215 F .715(wn as a)-.25 F F2
+(gr)3.215 E .715(oup command)-.45 F F0 5.715(.T)C .715
+(he return status is the e)-5.715 F .714(xit status of)-.15 F F2(list)
+3.214 E F0 5.714(.N)C(ote)-5.714 E .219(that unlik)144 662.4 R 2.719(et)
+-.1 G .219(he metacharacters)-2.719 F F1(\()2.719 E F0(and)2.719 E F1
+(\))2.719 E F0(,)A F1({)2.719 E F0(and)2.719 E F1(})2.719 E F0(are)2.719
+E F2 -.37(re)2.72 G .22(served wor).37 F(ds)-.37 E F0 .22
+(and must occur where a reserv)2.72 F(ed)-.15 E -.1(wo)144 674.4 S .257
+(rd is permitted to be recognized.).1 F .257(Since the)5.257 F 2.757(yd)
+-.15 G 2.756(on)-2.757 G .256(ot cause a w)-2.756 F .256(ord break, the)
+-.1 F 2.756(ym)-.15 G .256(ust be separated)-2.756 F(from)144 686.4 Q F2
+(list)2.5 E F0(by whitespace or another shell metacharacter)2.5 E(.)-.55
+E(\(\()108 703.2 Q F2 -.2(ex)C(pr).2 E(ession)-.37 E F0(\)\))A(The)144
+715.2 Q F2 -.2(ex)2.551 G(pr).2 E(ession)-.37 E F0 .051(is e)2.551 F
+-.25(va)-.25 G .051(luated according to the rules described belo).25 F
+2.552(wu)-.25 G(nder)-2.552 E F4 .052(ARITHMETIC EV)2.552 F(ALU)-1.215 E
+(A-)-.54 E(TION)144 727.2 Q/F5 9/Times-Roman@0 SF(.)A F0 .411(If the v)
+4.911 F .411(alue of the e)-.25 F .411(xpression is non-zero, the retur\
+n status is 0; otherwise the return status)-.15 F(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(4)190.955 E 0 Cg EP
+%%Page: 5 5
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E(is 1.)144 84 Q(This is e)5 E(xactly equi)-.15 E -.25(va)-.25 G
+(lent to).25 E/F1 10/Times-Bold@0 SF(let ")2.5 E/F2 10/Times-Italic@0 SF
+-.2(ex)C(pr).2 E(ession)-.37 E F1(")A F0(.)A F1([[)108 100.8 Q F2 -.2
+(ex)2.5 G(pr).2 E(ession)-.37 E F1(]])2.5 E F0 1.299
+(Return a status of 0 or 1 depending on the e)144 112.8 R -.25(va)-.25 G
+1.3(luation of the conditional e).25 F(xpression)-.15 E F2 -.2(ex)3.8 G
+(pr).2 E(ession)-.37 E F0(.)A 2.274
+(Expressions are composed of the primaries described belo)144 124.8 R
+4.773(wu)-.25 G(nder)-4.773 E/F3 9/Times-Bold@0 SF(CONDITION)4.773 E
+2.273(AL EXPRES-)-.18 F(SIONS)144 136.8 Q/F4 9/Times-Roman@0 SF(.)A F0
+-.8(Wo)5.632 G 1.133(rd splitting and pathname e).8 F 1.133
+(xpansion are not performed on the w)-.15 F 1.133(ords between the)-.1 F
+F1([[)3.633 E F0(and)144 148.8 Q F1(]])2.964 E F0 2.964(;t)C .464
+(ilde e)-2.964 F .464(xpansion, parameter and v)-.15 F .464(ariable e)
+-.25 F .463(xpansion, arithmetic e)-.15 F .463
+(xpansion, command substi-)-.15 F 1.081
+(tution, process substitution, and quote remo)144 160.8 R -.25(va)-.15 G
+3.581(la).25 G 1.081(re performed.)-3.581 F 1.081
+(Conditional operators such as)6.081 F F1<ad66>3.581 E F0
+(must be unquoted to be recognized as primaries.)144 172.8 Q
+(When used with)144 190.8 Q F1([[)2.5 E F0 2.5(,T)C(he)-2.5 E F1(<)2.5 E
+F0(and)2.5 E F1(>)2.5 E F0(operators sort le)2.5 E
+(xicographically using the current locale.)-.15 E .503(When the)144
+208.8 R F1(==)3.003 E F0(and)3.002 E F1(!=)3.002 E F0 .502(operators ar\
+e used, the string to the right of the operator is considered a pat-)
+3.002 F 1.224(tern and matched according to the rules described belo)144
+220.8 R 3.724(wu)-.25 G(nder)-3.724 E F1 -.1(Pa)3.724 G(tter).1 E 3.725
+(nM)-.15 G(atching)-3.725 E F0 6.225(.I)C 3.725(ft)-6.225 G 1.225
+(he shell)-3.725 F(option)144 232.8 Q F1(nocasematch)3.405 E F0 .904
+(is enabled, the match is performed without re)3.405 F -.05(ga)-.15 G
+.904(rd to the case of alphabetic).05 F 2.751(characters. The)144 244.8
+R .251(return v)2.751 F .251(alue is 0 if the string matches \()-.25 F
+F1(==)A F0 2.751(\)o)C 2.751(rd)-2.751 G .251(oes not match \()-2.751 F
+F1(!=)A F0 2.751(\)t)C .252(he pattern, and)-2.751 F 2.5(1o)144 256.8 S
+2.5(therwise. An)-2.5 F 2.5(yp)-.15 G(art of the pattern may be quoted \
+to force it to be matched as a string.)-2.5 E .243
+(An additional binary operator)144 274.8 R(,)-.4 E F1(=~)2.743 E F0
+2.743(,i)C 2.743(sa)-2.743 G -.25(va)-2.943 G .243
+(ilable, with the same precedence as).25 F F1(==)2.743 E F0(and)2.743 E
+F1(!=)2.743 E F0 5.243(.W)C .243(hen it is)-5.243 F 1.953
+(used, the string to the right of the operator is considered an e)144
+286.8 R 1.954(xtended re)-.15 F 1.954(gular e)-.15 F 1.954
+(xpression and)-.15 F .207(matched accordingly \(as in)144 298.8 R F2
+-.37(re)2.707 G -.1(ge)-.03 G(x)-.1 E F0 2.707(\(3\)\). The)B .207
+(return v)2.707 F .207
+(alue is 0 if the string matches the pattern, and 1)-.25 F 3.345
+(otherwise. If)144 310.8 R .845(the re)3.345 F .845(gular e)-.15 F .846
+(xpression is syntactically incorrect, the conditional e)-.15 F
+(xpression')-.15 E 3.346(sr)-.55 G(eturn)-3.346 E -.25(va)144 322.8 S
+.667(lue is 2.).25 F .667(If the shell option)5.667 F F1(nocasematch)
+3.167 E F0 .667(is enabled, the match is performed without re)3.167 F
+-.05(ga)-.15 G .666(rd to).05 F .378(the case of alphabetic characters.)
+144 334.8 R(An)5.378 E 2.878(yp)-.15 G .378
+(art of the pattern may be quoted to force it to be matched)-2.878 F
+.265(as a string.)144 346.8 R .265
+(Substrings matched by parenthesized sube)5.265 F .265
+(xpressions within the re)-.15 F .265(gular e)-.15 F .265(xpression are)
+-.15 F(sa)144 358.8 Q -.15(ve)-.2 G 3.096(di).15 G 3.097(nt)-3.096 G
+.597(he array v)-3.097 F(ariable)-.25 E F3 -.27(BA)3.097 G(SH_REMA).27 E
+(TCH)-.855 E F4(.)A F0 .597(The element of)5.097 F F3 -.27(BA)3.097 G
+(SH_REMA).27 E(TCH)-.855 E F0 .597(with inde)2.847 F 3.097(x0i)-.15 G(s)
+-3.097 E .049(the portion of the string matching the entire re)144 370.8
+R .049(gular e)-.15 F 2.549(xpression. The)-.15 F .049(element of)2.549
+F F3 -.27(BA)2.549 G(SH_REMA).27 E(TCH)-.855 E F0(with inde)144 382.8 Q
+(x)-.15 E F2(n)2.5 E F0(is the portion of the string matching the)2.5 E
+F2(n)2.5 E F0(th parenthesized sube)A(xpression.)-.15 E .785
+(Expressions may be combined using the follo)144 400.8 R .786
+(wing operators, listed in decreasing order of prece-)-.25 F(dence:)144
+412.8 Q F1(\()144 430.8 Q F2 -.2(ex)2.5 G(pr).2 E(ession)-.37 E F1(\))
+2.5 E F0 .523(Returns the v)180 442.8 R .522(alue of)-.25 F F2 -.2(ex)
+3.022 G(pr).2 E(ession)-.37 E F0 5.522(.T)C .522(his may be used to o)
+-5.522 F -.15(ve)-.15 G .522(rride the normal precedence of).15 F
+(operators.)180 454.8 Q F1(!)144 466.8 Q F2 -.2(ex)2.5 G(pr).2 E(ession)
+-.37 E F0 -.35(Tr)180 478.8 S(ue if).35 E F2 -.2(ex)2.5 G(pr).2 E
+(ession)-.37 E F0(is f)2.74 E(alse.)-.1 E F2 -.2(ex)144 490.8 S(pr).2 E
+(ession1)-.37 E F1(&&)2.5 E F2 -.2(ex)2.5 G(pr).2 E(ession2)-.37 E F0
+-.35(Tr)180 502.8 S(ue if both).35 E F2 -.2(ex)2.5 G(pr).2 E(ession1)
+-.37 E F0(and)2.5 E F2 -.2(ex)2.5 G(pr).2 E(ession2)-.37 E F0(are true.)
+2.52 E F2 -.2(ex)144 514.8 S(pr).2 E(ession1)-.37 E/F5 10/Symbol SF
+<efef>2.5 E F2 -.2(ex)2.5 G(pr).2 E(ession2)-.37 E F0 -.35(Tr)180 526.8
+S(ue if either).35 E F2 -.2(ex)2.5 G(pr).2 E(ession1)-.37 E F0(or)2.5 E
+F2 -.2(ex)2.5 G(pr).2 E(ession2)-.37 E F0(is true.)2.52 E(The)144 543.6
+Q F1(&&)3.298 E F0(and)3.298 E F5<efef>3.298 E F0 .798
+(operators do not e)3.298 F -.25(va)-.25 G(luate).25 E F2 -.2(ex)3.298 G
+(pr).2 E(ession2)-.37 E F0 .798(if the v)3.298 F .798(alue of)-.25 F F2
+-.2(ex)3.298 G(pr).2 E(ession1)-.37 E F0 .799(is suf)3.298 F .799
+(\214cient to)-.25 F(determine the return v)144 555.6 Q
+(alue of the entire conditional e)-.25 E(xpression.)-.15 E F1 -.25(fo)
+108 572.4 S(r).25 E F2(name)2.5 E F0 2.5([[)2.5 G F1(in)A F0([)2.5 E F2
+(wor)2.5 E 2.5(d.)-.37 G(..)-2.5 E F0 2.5(]];])2.5 G F1(do)A F2(list)2.5
+E F0(;)2.5 E F1(done)2.5 E F0 .424(The list of w)144 584.4 R .424
+(ords follo)-.1 F(wing)-.25 E F1(in)2.924 E F0 .423(is e)2.924 F .423
+(xpanded, generating a list of items.)-.15 F .423(The v)5.423 F(ariable)
+-.25 E F2(name)2.923 E F0 .423(is set to)2.923 F .653
+(each element of this list in turn, and)144 596.4 R F2(list)3.153 E F0
+.653(is e)3.153 F -.15(xe)-.15 G .653(cuted each time.).15 F .653
+(If the)5.653 F F1(in)3.153 E F2(wor)3.153 E(d)-.37 E F0 .653
+(is omitted, the)3.153 F F1 -.25(fo)3.153 G(r).25 E F0 .649(command e)
+144 608.4 R -.15(xe)-.15 G(cutes).15 E F2(list)3.149 E F0 .648
+(once for each positional parameter that is set \(see)3.148 F F3 -.666
+(PA)3.148 G(RAMETERS).666 E F0(belo)2.898 E(w\).)-.25 E .153
+(The return status is the e)144 620.4 R .153
+(xit status of the last command that e)-.15 F -.15(xe)-.15 G 2.654
+(cutes. If).15 F .154(the e)2.654 F .154(xpansion of the items)-.15 F
+(follo)144 632.4 Q(wing)-.25 E F1(in)2.5 E F0
+(results in an empty list, no commands are e)2.5 E -.15(xe)-.15 G
+(cuted, and the return status is 0.).15 E F1 -.25(fo)108 649.2 S(r).25 E
+F0(\(\()2.5 E F2 -.2(ex)2.5 G(pr1).2 E F0(;)2.5 E F2 -.2(ex)2.5 G(pr2).2
+E F0(;)2.5 E F2 -.2(ex)2.5 G(pr3).2 E F0(\)\) ;)2.5 E F1(do)2.5 E F2
+(list)2.5 E F0(;)2.5 E F1(done)2.5 E F0 1.236(First, the arithmetic e)
+144 661.2 R(xpression)-.15 E F2 -.2(ex)3.736 G(pr1).2 E F0 1.235(is e)
+3.736 F -.25(va)-.25 G 1.235
+(luated according to the rules described belo).25 F 3.735(wu)-.25 G
+(nder)-3.735 E F3 .561(ARITHMETIC EV)144 673.2 R(ALU)-1.215 E -.855(AT)
+-.54 G(ION).855 E F4(.)A F0 .561(The arithmetic e)5.061 F(xpression)-.15
+E F2 -.2(ex)3.061 G(pr2).2 E F0 .562(is then e)3.062 F -.25(va)-.25 G
+.562(luated repeatedly until).25 F .592(it e)144 685.2 R -.25(va)-.25 G
+.592(luates to zero.).25 F .592(Each time)5.592 F F2 -.2(ex)3.092 G(pr2)
+.2 E F0 -.25(eva)3.092 G .592(luates to a non-zero v).25 F(alue,)-.25 E
+F2(list)3.092 E F0 .591(is e)3.092 F -.15(xe)-.15 G .591
+(cuted and the arith-).15 F .228(metic e)144 697.2 R(xpression)-.15 E F2
+-.2(ex)2.728 G(pr3).2 E F0 .229(is e)2.728 F -.25(va)-.25 G 2.729
+(luated. If).25 F(an)2.729 E 2.729(ye)-.15 G .229
+(xpression is omitted, it beha)-2.879 F -.15(ve)-.2 G 2.729(sa).15 G
+2.729(si)-2.729 G 2.729(fi)-2.729 G 2.729(te)-2.729 G -.25(va)-2.979 G
+.229(luates to 1.).25 F .228(The return v)144 709.2 R .228
+(alue is the e)-.25 F .228(xit status of the last command in)-.15 F F2
+(list)2.728 E F0 .227(that is e)2.728 F -.15(xe)-.15 G .227(cuted, or f)
+.15 F .227(alse if an)-.1 F 2.727(yo)-.15 G 2.727(ft)-2.727 G(he)-2.727
+E -.15(ex)144 721.2 S(pressions is in).15 E -.25(va)-.4 G(lid.).25 E
+(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(5)190.955 E 0 Cg EP
+%%Page: 6 6
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(select)108 84 Q/F2 10/Times-Italic@0 SF
+(name)2.5 E F0([)2.5 E F1(in)2.5 E F2(wor)2.5 E(d)-.37 E F0 2.5(];)2.5 G
+F1(do)A F2(list)2.5 E F0(;)2.5 E F1(done)2.5 E F0 .432(The list of w)144
+96 R .432(ords follo)-.1 F(wing)-.25 E F1(in)2.932 E F0 .432(is e)2.932
+F .432(xpanded, generating a list of items.)-.15 F .433(The set of e)
+5.433 F .433(xpanded w)-.15 F(ords)-.1 E .843
+(is printed on the standard error)144 108 R 3.342(,e)-.4 G .842
+(ach preceded by a number)-3.342 F 5.842(.I)-.55 G 3.342(ft)-5.842 G(he)
+-3.342 E F1(in)3.342 E F2(wor)3.342 E(d)-.37 E F0 .842
+(is omitted, the posi-)3.342 F .201(tional parameters are printed \(see)
+144 120 R/F3 9/Times-Bold@0 SF -.666(PA)2.701 G(RAMETERS).666 E F0(belo)
+2.451 E 2.701(w\). The)-.25 F F3(PS3)2.701 E F0 .201
+(prompt is then displayed and a)2.451 F .214
+(line read from the standard input.)144 132 R .213
+(If the line consists of a number corresponding to one of the dis-)5.214
+F 1.537(played w)144 144 R 1.537(ords, then the v)-.1 F 1.537(alue of)
+-.25 F F2(name)4.397 E F0 1.537(is set to that w)4.217 F 4.037(ord. If)
+-.1 F 1.538(the line is empty)4.038 F 4.038(,t)-.65 G 1.538(he w)-4.038
+F 1.538(ords and)-.1 F .066(prompt are displayed ag)144 156 R 2.566
+(ain. If)-.05 F .065(EOF is read, the command completes.)2.566 F(An)
+5.065 E 2.565(yo)-.15 G .065(ther v)-2.565 F .065(alue read causes)-.25
+F F2(name)144 168 Q F0 .972(to be set to null.)3.652 F .972
+(The line read is sa)5.972 F -.15(ve)-.2 G 3.473(di).15 G 3.473(nt)
+-3.473 G .973(he v)-3.473 F(ariable)-.25 E F3(REPL)3.473 E(Y)-.828 E/F4
+9/Times-Roman@0 SF(.)A F0(The)5.473 E F2(list)3.563 E F0 .973(is e)4.153
+F -.15(xe)-.15 G .973(cuted after).15 F .072(each selection until a)144
+180 R F1(br)2.571 E(eak)-.18 E F0 .071(command is e)2.571 F -.15(xe)-.15
+G 2.571(cuted. The).15 F -.15(ex)2.571 G .071(it status of).15 F F1
+(select)2.571 E F0 .071(is the e)2.571 F .071(xit status of the)-.15 F
+(last command e)144 192 Q -.15(xe)-.15 G(cuted in).15 E F2(list)2.5 E F0
+2.5(,o).68 G 2.5(rz)-2.5 G(ero if no commands were e)-2.5 E -.15(xe)-.15
+G(cuted.).15 E F1(case)108 208.8 Q F2(wor)2.5 E(d)-.37 E F1(in)2.5 E F0
+2.5([[)2.5 G(\(])-2.5 E F2(pattern)2.5 E F0([)2.5 E F1(|)2.5 E F2
+(pattern)2.5 E F0 2.5(].)2.5 G(.. \))-2.5 E F2(list)2.5 E F0(;; ] ...)
+2.5 E F1(esac)2.5 E F0(A)144 220.8 Q F1(case)3.264 E F0 .764
+(command \214rst e)3.264 F(xpands)-.15 E F2(wor)3.264 E(d)-.37 E F0
+3.264(,a)C .764(nd tries to match it ag)-3.264 F .764(ainst each)-.05 F
+F2(pattern)3.264 E F0 .765(in turn, using the)3.264 F .596
+(same matching rules as for pathname e)144 232.8 R .595(xpansion \(see)
+-.15 F F1 -.1(Pa)3.095 G .595(thname Expansion).1 F F0(belo)3.095 E
+3.095(w\). The)-.25 F F2(wor)3.095 E(d)-.37 E F0(is)3.095 E -.15(ex)144
+244.8 S 1.092(panded using tilde e).15 F 1.092
+(xpansion, parameter and v)-.15 F 1.092(ariable e)-.25 F 1.092
+(xpansion, arithmetic substitution, com-)-.15 F 1.268
+(mand substitution, process substitution and quote remo)144 256.8 R -.25
+(va)-.15 G 3.768(l. Each).25 F F2(pattern)3.768 E F0 -.15(ex)3.768 G
+1.268(amined is e).15 F(xpanded)-.15 E .353(using tilde e)144 268.8 R
+.353(xpansion, parameter and v)-.15 F .353(ariable e)-.25 F .353
+(xpansion, arithmetic substitution, command substi-)-.15 F 1.517
+(tution, and process substitution.)144 280.8 R 1.517
+(If the shell option)6.517 F F1(nocasematch)4.016 E F0 1.516
+(is enabled, the match is per)4.016 F(-)-.2 E 1.346(formed without re)
+144 292.8 R -.05(ga)-.15 G 1.346
+(rd to the case of alphabetic characters.).05 F 1.347
+(When a match is found, the corre-)6.347 F(sponding)144 304.8 Q F2(list)
+2.777 E F0 .277(is e)2.777 F -.15(xe)-.15 G 2.777(cuted. If).15 F(the)
+2.777 E F1(;;)2.777 E F0 .277
+(operator is used, no subsequent matches are attempted after the)2.777 F
+.848(\214rst pattern match.)144 316.8 R(Using)5.848 E F1(;&)3.348 E F0
+.849(in place of)3.349 F F1(;;)3.349 E F0 .849(causes e)3.349 F -.15(xe)
+-.15 G .849(cution to continue with the).15 F F2(list)3.349 E F0
+(associated)3.349 E .078(with the ne)144 328.8 R .078
+(xt set of patterns.)-.15 F(Using)5.078 E F1(;;&)2.578 E F0 .078
+(in place of)2.578 F F1(;;)2.578 E F0 .077
+(causes the shell to test the ne)2.578 F .077(xt pattern list in)-.15 F
+.227(the statement, if an)144 340.8 R 1.527 -.65(y, a)-.15 H .227(nd e)
+.65 F -.15(xe)-.15 G .227(cute an).15 F 2.727(ya)-.15 G(ssociated)-2.727
+E F2(list)2.727 E F0 .227(on a successful match.)2.727 F .227(The e)
+5.227 F .227(xit status is zero)-.15 F(if no pattern matches.)144 352.8
+Q(Otherwise, it is the e)5 E(xit status of the last command e)-.15 E
+-.15(xe)-.15 G(cuted in).15 E F2(list)2.5 E F0(.)A F1(if)108 369.6 Q F2
+(list)2.5 E F0(;)A F1(then)2.5 E F2(list;)2.5 E F0([)2.5 E F1(elif)2.5 E
+F2(list)2.5 E F0(;)A F1(then)2.5 E F2(list)2.5 E F0 2.5(;].)C(.. [)-2.5
+E F1(else)2.5 E F2(list)2.5 E F0 2.5(;])C F1<8c>A F0(The)144 381.6 Q F1
+(if)2.978 E F2(list)3.068 E F0 .478(is e)3.658 F -.15(xe)-.15 G 2.978
+(cuted. If).15 F .478(its e)2.978 F .478(xit status is zero, the)-.15 F
+F1(then)2.978 E F2(list)2.978 E F0 .478(is e)2.978 F -.15(xe)-.15 G
+2.978(cuted. Otherwise,).15 F(each)2.978 E F1(elif)2.977 E F2(list)2.977
+E F0 1.087(is e)144 393.6 R -.15(xe)-.15 G 1.087
+(cuted in turn, and if its e).15 F 1.087
+(xit status is zero, the corresponding)-.15 F F1(then)3.587 E F2(list)
+3.587 E F0 1.088(is e)3.588 F -.15(xe)-.15 G 1.088(cuted and the).15 F
+.104(command completes.)144 405.6 R .103(Otherwise, the)5.104 F F1(else)
+2.603 E F2(list)2.603 E F0 .103(is e)2.603 F -.15(xe)-.15 G .103
+(cuted, if present.).15 F .103(The e)5.103 F .103(xit status is the e)
+-.15 F .103(xit sta-)-.15 F(tus of the last command e)144 417.6 Q -.15
+(xe)-.15 G(cuted, or zero if no condition tested true.).15 E F1(while)
+108 434.4 Q F2(list)2.5 E F0(;)A F1(do)2.5 E F2(list)2.5 E F0(;)A F1
+(done)2.5 E(until)108 446.4 Q F2(list)2.5 E F0(;)A F1(do)2.5 E F2(list)
+2.5 E F0(;)A F1(done)2.5 E F0(The)144 458.4 Q F1(while)3.103 E F0 .603
+(command continuously e)3.103 F -.15(xe)-.15 G .603(cutes the).15 F F1
+(do)3.103 E F2(list)3.103 E F0 .603(as long as the last command in)3.103
+F F2(list)3.104 E F0(returns)3.104 E .471(an e)144 470.4 R .471
+(xit status of zero.)-.15 F(The)5.471 E F1(until)2.971 E F0 .471
+(command is identical to the)2.971 F F1(while)2.97 E F0 .47(command, e)
+2.97 F .47(xcept that the test)-.15 F .095(is ne)144 482.4 R -.05(ga)
+-.15 G .095(ted; the).05 F F1(do)2.595 E F2(list)2.685 E F0 .095(is e)
+3.275 F -.15(xe)-.15 G .095(cuted as long as the last command in).15 F
+F2(list)2.685 E F0 .096(returns a non-zero e)3.276 F .096(xit status.)
+-.15 F 1.307(The e)144 494.4 R 1.307(xit status of the)-.15 F F1(while)
+3.807 E F0(and)3.807 E F1(until)3.807 E F0 1.307(commands is the e)3.807
+F 1.306(xit status of the last)-.15 F F1(do)3.806 E F2(list)3.806 E F0
+(command)3.806 E -.15(exe)144 506.4 S(cuted, or zero if none w).15 E
+(as e)-.1 E -.15(xe)-.15 G(cuted.).15 E F1(Copr)87 523.2 Q(ocesses)-.18
+E F0(A)108 535.2 Q F2(copr)3.712 E(ocess)-.45 E F0 1.212
+(is a shell command preceded by the)3.712 F F1(copr)3.713 E(oc)-.18 E F0
+(reserv)3.713 E 1.213(ed w)-.15 F 3.713(ord. A)-.1 F 1.213
+(coprocess is e)3.713 F -.15(xe)-.15 G 1.213(cuted asyn-).15 F .575(chr\
+onously in a subshell, as if the command had been terminated with the)
+108 547.2 R F1(&)3.074 E F0 .574(control operator)3.074 F 3.074(,w)-.4 G
+.574(ith a tw)-3.074 F(o-)-.1 E -.1(wa)108 559.2 S 2.5(yp).1 G
+(ipe established between the e)-2.5 E -.15(xe)-.15 G
+(cuting shell and the coprocess.).15 E(The format for a coprocess is:)
+108 576 Q F1(copr)144 592.8 Q(oc)-.18 E F0([)2.5 E F2 -.27(NA)C(ME).27 E
+F0(])A F2(command)2.5 E F0([)2.5 E F2 -.37(re)C(dir).37 E(ections)-.37 E
+F0(])A .922(This creates a coprocess named)108 609.6 R F2 -.27(NA)3.422
+G(ME).27 E F0 5.922(.I)C(f)-5.922 E F2 -.27(NA)3.422 G(ME).27 E F0 .923
+(is not supplied, the def)3.422 F .923(ault name is)-.1 F F2(COPR)3.423
+E(OC)-.4 E F0(.)A F2 -.27(NA)5.923 G(ME).27 E F0 .64
+(must not be supplied if)108 621.6 R F2(command)3.14 E F0 .64(is a)3.14
+F F2 .64(simple command)3.14 F F0 .64(\(see abo)3.14 F -.15(ve)-.15 G
+.64(\); otherwise, it is interpreted as the \214rst).15 F -.1(wo)108
+633.6 S .163(rd of the simple command.).1 F .163(When the coproc is e)
+5.163 F -.15(xe)-.15 G .163(cuted, the shell creates an array v).15 F
+.163(ariable \(see)-.25 F F1(Arrays)2.663 E F0(belo)108 645.6 Q .512
+(w\) named)-.25 F F2 -.27(NA)3.012 G(ME).27 E F0 .512(in the conte)3.012
+F .511(xt of the e)-.15 F -.15(xe)-.15 G .511(cuting shell.).15 F .511
+(The standard output of)5.511 F F2(command)3.211 E F0 .511(is connected)
+3.781 F .81(via a pipe to a \214le descriptor in the e)108 657.6 R -.15
+(xe)-.15 G .811(cuting shell, and that \214le descriptor is assigned to)
+.15 F F2 -.27(NA)3.311 G(ME).27 E F0 3.311([0]. The)B .717
+(standard input of)108 669.6 R F2(command)3.417 E F0 .716
+(is connected via a pipe to a \214le descriptor in the e)3.987 F -.15
+(xe)-.15 G .716(cuting shell, and that \214le).15 F .702
+(descriptor is assigned to)108 681.6 R F2 -.27(NA)3.202 G(ME).27 E F0
+3.202([1]. This)B .703(pipe is established before an)3.203 F 3.203(yr)
+-.15 G .703(edirections speci\214ed by the com-)-3.203 F 1.184
+(mand \(see)108 693.6 R F3(REDIRECTION)3.684 E F0(belo)3.434 E 3.684
+(w\). The)-.25 F 1.183(\214le descriptors can be utilized as ar)3.684 F
+1.183(guments to shell commands)-.18 F .07
+(and redirections using standard w)108 705.6 R .07(ord e)-.1 F 2.57
+(xpansions. The)-.15 F .07(process id of the shell spa)2.57 F .07
+(wned to e)-.15 F -.15(xe)-.15 G .07(cute the copro-).15 F .632
+(cess is a)108 717.6 R -.25(va)-.2 G .631(ilable as the v).25 F .631
+(alue of the v)-.25 F(ariable)-.25 E F2 -.27(NA)3.131 G(ME).27 E F0
+3.131(_PID. The)B F1(wait)3.131 E F0 -.2(bu)3.131 G .631
+(iltin command may be used to w).2 F(ait)-.1 E
+(for the coprocess to terminate.)108 729.6 Q(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(6)190.955 E 0 Cg EP
+%%Page: 7 7
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E(The return status of a coprocess is the e)108 84 Q(xit status of)
+-.15 E/F1 10/Times-Italic@0 SF(command)2.5 E F0(.)A/F2 10/Times-Bold@0
+SF(Shell Function De\214nitions)87 100.8 Q F0 2.697(As)108 112.8 S .198
+(hell function is an object that is called lik)-2.697 F 2.698(eas)-.1 G
+.198(imple command and e)-2.698 F -.15(xe)-.15 G .198
+(cutes a compound command with).15 F 2.5(an)108 124.8 S .5 -.25(ew s)
+-2.5 H(et of positional parameters.).25 E
+(Shell functions are declared as follo)5 E(ws:)-.25 E([)108 141.6 Q F2
+(function)2.5 E F0(])2.5 E F1(name)2.5 E F0(\(\))2.5 E F1
+(compound\255command)2.5 E F0([)2.5 E F1 -.37(re)C(dir).37 E(ection)-.37
+E F0(])A 1.403(This de\214nes a function named)144 153.6 R F1(name)3.902
+E F0 6.402(.T)C 1.402(he reserv)-6.402 F 1.402(ed w)-.15 F(ord)-.1 E F2
+(function)3.902 E F0 1.402(is optional.)3.902 F 1.402(If the)6.402 F F2
+(function)3.902 E F0(reserv)144 165.6 Q .162(ed w)-.15 F .162
+(ord is supplied, the parentheses are optional.)-.1 F(The)5.162 E F1
+(body)2.662 E F0 .162(of the function is the compound)2.662 F(command)
+144 177.6 Q F1(compound\255command)2.784 E F0(\(see)3.354 E F2 .084
+(Compound Commands)2.584 F F0(abo)2.584 E -.15(ve)-.15 G 2.584(\). That)
+.15 F .084(command is usually a)2.584 F F1(list)144 189.6 Q F0 .044
+(of commands between { and }, b)2.544 F .044(ut may be an)-.2 F 2.544
+(yc)-.15 G .044(ommand listed under)-2.544 F F2 .044(Compound Commands)
+2.544 F F0(abo)144 201.6 Q -.15(ve)-.15 G(.).15 E F1
+(compound\255command)6.671 E F0 1.671(is e)4.171 F -.15(xe)-.15 G 1.671
+(cuted whene).15 F -.15(ve)-.25 G(r).15 E F1(name)4.171 E F0 1.671
+(is speci\214ed as the name of a simple)4.171 F 3.008(command. An)144
+213.6 R 3.009(yr)-.15 G .509(edirections \(see)-3.009 F/F3 9
+/Times-Bold@0 SF(REDIRECTION)3.009 E F0(belo)2.759 E .509
+(w\) speci\214ed when a function is de\214ned are)-.25 F .581
+(performed when the function is e)144 225.6 R -.15(xe)-.15 G 3.081
+(cuted. The).15 F -.15(ex)3.081 G .58
+(it status of a function de\214nition is zero unless a).15 F .177(synta\
+x error occurs or a readonly function with the same name already e)144
+237.6 R 2.678(xists. When)-.15 F -.15(exe)2.678 G .178(cuted, the).15 F
+-.15(ex)144 249.6 S .64(it status of a function is the e).15 F .64
+(xit status of the last command e)-.15 F -.15(xe)-.15 G .64
+(cuted in the body).15 F 5.64(.\()-.65 G(See)-5.64 E F3(FUNC-)3.14 E
+(TIONS)144 261.6 Q F0(belo)2.25 E -.65(w.)-.25 G(\)).65 E/F4 10.95
+/Times-Bold@0 SF(COMMENTS)72 278.4 Q F0 .982(In a non-interacti)108
+290.4 R 1.282 -.15(ve s)-.25 H .982(hell, or an interacti).15 F 1.282
+-.15(ve s)-.25 H .982(hell in which the).15 F F2(interacti)3.482 E -.1
+(ve)-.1 G(_comments).1 E F0 .982(option to the)3.482 F F2(shopt)3.482 E
+F0 -.2(bu)108 302.4 S .952(iltin is enabled \(see).2 F F3 .952(SHELL B)
+3.452 F(UIL)-.09 E .952(TIN COMMANDS)-.828 F F0(belo)3.202 E .952
+(w\), a w)-.25 F .952(ord be)-.1 F .952(ginning with)-.15 F F2(#)3.451 E
+F0 .951(causes that w)3.451 F(ord)-.1 E .604
+(and all remaining characters on that line to be ignored.)108 314.4 R
+.605(An interacti)5.605 F .905 -.15(ve s)-.25 H .605(hell without the)
+.15 F F2(interacti)3.105 E -.1(ve)-.1 G(_com-).1 E(ments)108 326.4 Q F0
+1.337(option enabled does not allo)3.837 F 3.837(wc)-.25 G 3.836
+(omments. The)-3.837 F F2(interacti)3.836 E -.1(ve)-.1 G(_comments).1 E
+F0 1.336(option is on by def)3.836 F 1.336(ault in)-.1 F(interacti)108
+338.4 Q .3 -.15(ve s)-.25 H(hells.).15 E F4 -.11(QU)72 355.2 S -.438(OT)
+.11 G(ING).438 E F1(Quoting)108 367.2 Q F0 .477(is used to remo)2.977 F
+.777 -.15(ve t)-.15 H .477
+(he special meaning of certain characters or w).15 F .477
+(ords to the shell.)-.1 F .478(Quoting can be)5.478 F .185
+(used to disable special treatment for special characters, to pre)108
+379.2 R -.15(ve)-.25 G .185(nt reserv).15 F .184(ed w)-.15 F .184
+(ords from being recognized as)-.1 F(such, and to pre)108 391.2 Q -.15
+(ve)-.25 G(nt parameter e).15 E(xpansion.)-.15 E .288(Each of the)108
+408 R F1(metac)2.788 E(har)-.15 E(acter)-.15 E(s)-.1 E F0 .288
+(listed abo)2.788 F .588 -.15(ve u)-.15 H(nder).15 E F3(DEFINITIONS)
+2.788 E F0 .288(has special meaning to the shell and must be)2.538 F
+(quoted if it is to represent itself.)108 420 Q 1.345
+(When the command history e)108 436.8 R 1.344(xpansion f)-.15 F 1.344
+(acilities are being used \(see)-.1 F F3(HIST)3.844 E(OR)-.162 E 3.594
+(YE)-.315 G(XP)-3.594 E(ANSION)-.666 E F0(belo)3.594 E 1.344(w\), the)
+-.25 F F1(history e)108 448.8 Q(xpansion)-.2 E F0(character)2.5 E 2.5
+(,u)-.4 G(sually)-2.5 E F2(!)2.5 E F0 2.5(,m)C(ust be quoted to pre)-2.5
+E -.15(ve)-.25 G(nt history e).15 E(xpansion.)-.15 E
+(There are three quoting mechanisms: the)108 465.6 Q F1(escape c)2.5 E
+(har)-.15 E(acter)-.15 E F0 2.5(,s).73 G
+(ingle quotes, and double quotes.)-2.5 E 2.974(An)108 482.4 S .474
+(on-quoted backslash \()-2.974 F F2(\\)A F0 2.974(\)i)C 2.974(st)-2.974
+G(he)-2.974 E F1 .474(escape c)2.974 F(har)-.15 E(acter)-.15 E F0 5.474
+(.I).73 G 2.974(tp)-5.474 G(reserv)-2.974 E .474(es the literal v)-.15 F
+.474(alue of the ne)-.25 F .475(xt character that)-.15 F(follo)108 494.4
+Q 1.554(ws, with the e)-.25 F 1.553(xception of <ne)-.15 F 4.053
+(wline>. If)-.25 F(a)4.053 E F2(\\)4.053 E F0(<ne)A 1.553
+(wline> pair appears, and the backslash is not itself)-.25 F 1.122
+(quoted, the)108 506.4 R F2(\\)3.622 E F0(<ne)A 1.122
+(wline> is treated as a line continuation \(that is, it is remo)-.25 F
+-.15(ve)-.15 G 3.622(df).15 G 1.123(rom the input stream and)-3.622 F
+(ef)108 518.4 Q(fecti)-.25 E -.15(ve)-.25 G(ly ignored\).).15 E .295
+(Enclosing characters in single quotes preserv)108 535.2 R .295
+(es the literal v)-.15 F .295(alue of each character within the quotes.)
+-.25 F 2.795(As)5.295 G(in-)-2.795 E
+(gle quote may not occur between single quotes, e)108 547.2 Q -.15(ve)
+-.25 G 2.5(nw).15 G(hen preceded by a backslash.)-2.5 E .033
+(Enclosing characters in double quotes preserv)108 564 R .034
+(es the literal v)-.15 F .034
+(alue of all characters within the quotes, with the)-.25 F -.15(ex)108
+576 S .828(ception of).15 F F2($)3.328 E F0(,)A F2<92>3.328 E F0(,)A F2
+(\\)3.328 E F0 3.328(,a)C .828(nd, when history e)-3.328 F .828
+(xpansion is enabled,)-.15 F F2(!)3.328 E F0 5.828(.T)C .828
+(he characters)-5.828 F F2($)3.328 E F0(and)3.328 E F2<92>3.328 E F0
+.827(retain their special)3.328 F .074(meaning within double quotes.)108
+588 R .074(The backslash retains its special meaning only when follo)
+5.074 F .075(wed by one of the)-.25 F(follo)108 600 Q .205
+(wing characters:)-.25 F F2($)2.705 E F0(,)A F2<92>2.705 E F0(,)A F2(")
+3.538 E F0(,).833 E F2(\\)2.705 E F0 2.705(,o)C(r)-2.705 E F2(<newline>)
+2.705 E F0 5.205(.A)C .204
+(double quote may be quoted within double quotes by pre-)-2.5 F .081
+(ceding it with a backslash.)108 612 R .082(If enabled, history e)5.082
+F .082(xpansion will be performed unless an)-.15 F F2(!)2.582 E F0 .082
+(appearing in double)5.082 F(quotes is escaped using a backslash.)108
+624 Q(The backslash preceding the)5 E F2(!)2.5 E F0(is not remo)5 E -.15
+(ve)-.15 G(d.).15 E(The special parameters)108 640.8 Q F2(*)2.5 E F0
+(and)2.5 E F2(@)2.5 E F0(ha)2.5 E .3 -.15(ve s)-.2 H
+(pecial meaning when in double quotes \(see).15 E F3 -.666(PA)2.5 G
+(RAMETERS).666 E F0(belo)2.25 E(w\).)-.25 E -.8(Wo)108 657.6 S .212
+(rds of the form).8 F F2($)2.712 E F0<08>A F1(string)A F0 2.712<0861>C
+.211(re treated specially)-2.712 F 5.211(.T)-.65 G .211(he w)-5.211 F
+.211(ord e)-.1 F .211(xpands to)-.15 F F1(string)2.711 E F0 2.711(,w)C
+.211(ith backslash-escaped char)-2.711 F(-)-.2 E .604
+(acters replaced as speci\214ed by the ANSI C standard.)108 669.6 R .605
+(Backslash escape sequences, if present, are decoded)5.605 F(as follo)
+108 681.6 Q(ws:)-.25 E F2(\\a)144 693.6 Q F0(alert \(bell\))28.22 E F2
+(\\b)144 705.6 Q F0(backspace)27.66 E F2(\\e)144 717.6 Q F0
+(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(7)190.955 E 0 Cg EP
+%%Page: 8 8
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(\\E)144 84 Q F0(an escape character)26.55 E
+F1(\\f)144 96 Q F0(form feed)29.89 E F1(\\n)144 108 Q F0(ne)27.66 E 2.5
+(wl)-.25 G(ine)-2.5 E F1(\\r)144 120 Q F0(carriage return)28.78 E F1
+(\\t)144 132 Q F0(horizontal tab)29.89 E F1(\\v)144 144 Q F0 -.15(ve)
+28.22 G(rtical tab).15 E F1(\\\\)144 156 Q F0(backslash)30.44 E F1<5c08>
+144 168 Q F0(single quote)30.44 E F1(\\")144 180 Q F0(double quote)27.67
+E F1(\\)144 192 Q/F2 10/Times-Italic@0 SF(nnn)A F0
+(the eight-bit character whose v)18.22 E(alue is the octal v)-.25 E
+(alue)-.25 E F2(nnn)2.5 E F0(\(one to three digits\))2.5 E F1(\\x)144
+204 Q F2(HH)A F0(the eight-bit character whose v)13.78 E(alue is the he)
+-.25 E(xadecimal v)-.15 E(alue)-.25 E F2(HH)2.5 E F0(\(one or tw)2.5 E
+2.5(oh)-.1 G .3 -.15(ex d)-2.5 H(igits\)).15 E F1(\\c)144 216 Q F2(x)A
+F0 2.5(ac)24.34 G(ontrol-)-2.5 E F2(x)A F0(character)2.5 E(The e)108
+232.8 Q(xpanded result is single-quoted, as if the dollar sign had not \
+been present.)-.15 E 2.64(Ad)108 249.6 S .14
+(ouble-quoted string preceded by a dollar sign \()-2.64 F F1($)A F0(")A
+F2(string)A F0 .14("\) will cause the string to be translated according)
+B .495(to the current locale.)108 261.6 R .495(If the current locale is)
+5.495 F F1(C)2.995 E F0(or)2.995 E F1(POSIX)2.995 E F0 2.995(,t)C .495
+(he dollar sign is ignored.)-2.995 F .496(If the string is trans-)5.496
+F(lated and replaced, the replacement is double-quoted.)108 273.6 Q/F3
+10.95/Times-Bold@0 SF -.81(PA)72 290.4 S(RAMETERS).81 E F0(A)108 302.4 Q
+F2(par)4.593 E(ameter)-.15 E F0 .843(is an entity that stores v)4.073 F
+3.343(alues. It)-.25 F .843(can be a)3.343 F F2(name)3.342 E F0 3.342
+(,an).18 G(umber)-3.342 E 3.342(,o)-.4 G 3.342(ro)-3.342 G .842
+(ne of the special characters)-3.342 F .822(listed belo)108 314.4 R
+3.323(wu)-.25 G(nder)-3.323 E F1 .823(Special P)3.323 F(arameters)-.1 E
+F0 5.823(.A)C F2(variable)-2.21 E F0 .823(is a parameter denoted by a)
+3.503 F F2(name)3.323 E F0 5.823(.A).18 G -.25(va)-2.5 G .823
+(riable has a).25 F F2(value)108 326.4 Q F0 .369(and zero or more)2.869
+F F2(attrib)2.869 E(utes)-.2 E F0 5.369(.A)C(ttrib)-5.369 E .369
+(utes are assigned using the)-.2 F F1(declar)2.868 E(e)-.18 E F0 -.2(bu)
+2.868 G .368(iltin command \(see).2 F F1(declar)2.868 E(e)-.18 E F0
+(belo)108 338.4 Q 2.5(wi)-.25 G(n)-2.5 E/F4 9/Times-Bold@0 SF(SHELL B)
+2.5 E(UIL)-.09 E(TIN COMMANDS)-.828 E/F5 9/Times-Roman@0 SF(\).)A F0
+2.754(Ap)108 355.2 S .254(arameter is set if it has been assigned a v)
+-2.754 F 2.754(alue. The)-.25 F .254(null string is a v)2.754 F .255
+(alid v)-.25 F 2.755(alue. Once)-.25 F 2.755(av)2.755 G .255
+(ariable is set, it)-3.005 F(may be unset only by using the)108 367.2 Q
+F1(unset)2.5 E F0 -.2(bu)2.5 G(iltin command \(see).2 E F4(SHELL B)2.5 E
+(UIL)-.09 E(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)-.25 E(A)108 384 Q
+F2(variable)2.79 E F0(may be assigned to by a statement of the form)2.68
+E F2(name)144 400.8 Q F0(=[)A F2(value)A F0(])A(If)108 417.6 Q F2(value)
+3.023 E F0 .233(is not gi)2.913 F -.15(ve)-.25 G .233(n, the v).15 F
+.232(ariable is assigned the null string.)-.25 F(All)5.232 E F2(values)
+3.022 E F0(under)3.002 E .232(go tilde e)-.18 F .232
+(xpansion, parameter)-.15 F .515(and v)108 429.6 R .515(ariable e)-.25 F
+.515(xpansion, command substitution, arithmetic e)-.15 F .515
+(xpansion, and quote remo)-.15 F -.25(va)-.15 G 3.015(l\().25 G(see)
+-3.015 E F4(EXP)3.015 E(ANSION)-.666 E F0(belo)108 441.6 Q 2.699
+(w\). If)-.25 F .199(the v)2.699 F .199(ariable has its)-.25 F F1
+(integer)2.698 E F0(attrib)2.698 E .198(ute set, then)-.2 F F2(value)
+2.988 E F0 .198(is e)2.878 F -.25(va)-.25 G .198
+(luated as an arithmetic e).25 F .198(xpression e)-.15 F -.15(ve)-.25 G
+(n).15 E .901(if the $\(\(...\)\) e)108 453.6 R .901
+(xpansion is not used \(see)-.15 F F1 .901(Arithmetic Expansion)3.401 F
+F0(belo)3.401 E 3.402(w\). W)-.25 F .902
+(ord splitting is not performed,)-.8 F 1.179(with the e)108 465.6 R
+1.179(xception of)-.15 F F1("$@")3.679 E F0 1.179(as e)3.679 F 1.179
+(xplained belo)-.15 F 3.679(wu)-.25 G(nder)-3.679 E F1 1.178(Special P)
+3.678 F(arameters)-.1 E F0 6.178(.P)C 1.178(athname e)-6.328 F 1.178
+(xpansion is not)-.15 F 3.648(performed. Assignment)108 477.6 R 1.148
+(statements may also appear as ar)3.648 F 1.149(guments to the)-.18 F F1
+(alias)3.649 E F0(,)A F1(declar)3.649 E(e)-.18 E F0(,)A F1(typeset)3.649
+E F0(,)A F1(export)3.649 E F0(,)A F1 -.18(re)108 489.6 S(adonly).18 E F0
+2.5(,a)C(nd)-2.5 E F1(local)2.5 E F0 -.2(bu)2.5 G(iltin commands.).2 E
+.377(In the conte)108 506.4 R .377
+(xt where an assignment statement is assigning a v)-.15 F .376
+(alue to a shell v)-.25 F .376(ariable or array inde)-.25 F .376
+(x, the +=)-.15 F .257
+(operator can be used to append to or add to the v)108 518.4 R(ariable')
+-.25 E 2.757(sp)-.55 G(re)-2.757 E .257(vious v)-.25 F 2.757(alue. When)
+-.25 F .257(+= is applied to a v)2.757 F(ariable)-.25 E .373
+(for which the inte)108 530.4 R .373(ger attrib)-.15 F .372
+(ute has been set,)-.2 F F2(value)2.872 E F0 .372(is e)2.872 F -.25(va)
+-.25 G .372(luated as an arithmetic e).25 F .372
+(xpression and added to the)-.15 F -.25(va)108 542.4 S(riable').25 E
+2.888(sc)-.55 G .388(urrent v)-2.888 F .388(alue, which is also e)-.25 F
+-.25(va)-.25 G 2.889(luated. When).25 F .389
+(+= is applied to an array v)2.889 F .389(ariable using compound)-.25 F
+.186(assignment \(see)108 554.4 R F1(Arrays)2.686 E F0(belo)2.686 E .186
+(w\), the v)-.25 F(ariable')-.25 E 2.685(sv)-.55 G .185
+(alue is not unset \(as it is when using =\), and ne)-2.935 F 2.685(wv)
+-.25 G .185(alues are)-2.935 F 1.384(appended to the array be)108 566.4
+R 1.384(ginning at one greater than the array')-.15 F 3.885(sm)-.55 G
+1.385(aximum inde)-3.885 F 3.885(x\()-.15 G 1.385(for inde)-3.885 F -.15
+(xe)-.15 G 3.885(da).15 G 1.385(rrays\) or)-3.885 F .123
+(added as additional k)108 578.4 R -.15(ey)-.1 G<ad76>.15 E .123
+(alue pairs in an associati)-.25 F .423 -.15(ve a)-.25 H(rray).15 E
+5.123(.W)-.65 G .122(hen applied to a string-v)-5.123 F .122(alued v)
+-.25 F(ariable,)-.25 E F2(value)2.622 E F0(is e)108 590.4 Q
+(xpanded and appended to the v)-.15 E(ariable')-.25 E 2.5(sv)-.55 G
+(alue.)-2.75 E F1 -.2(Po)87 607.2 S(sitional P).2 E(arameters)-.1 E F0
+(A)108 619.2 Q F2 .705(positional par)4.455 F(ameter)-.15 E F0 .706(is \
+a parameter denoted by one or more digits, other than the single digit \
+0.)3.935 F(Posi-)5.706 E .445
+(tional parameters are assigned from the shell')108 631.2 R 2.944(sa)
+-.55 G -.18(rg)-2.944 G .444(uments when it is in).18 F -.2(vo)-.4 G -.1
+(ke).2 G .444(d, and may be reassigned using).1 F(the)108 643.2 Q F1
+(set)3.333 E F0 -.2(bu)3.333 G .833(iltin command.).2 F .834(Positional\
+ parameters may not be assigned to with assignment statements.)5.833 F
+(The)5.834 E .334(positional parameters are temporarily replaced when a\
+ shell function is e)108 655.2 R -.15(xe)-.15 G .333(cuted \(see).15 F
+F4(FUNCTIONS)2.833 E F0(belo)2.583 E(w\).)-.25 E 1.403(When a positiona\
+l parameter consisting of more than a single digit is e)108 672 R 1.404
+(xpanded, it must be enclosed in)-.15 F(braces \(see)108 684 Q F4(EXP)
+2.5 E(ANSION)-.666 E F0(belo)2.25 E(w\).)-.25 E F1(Special P)87 700.8 Q
+(arameters)-.1 E F0 1.675(The shell treats se)108 712.8 R -.15(ve)-.25 G
+1.675(ral parameters specially).15 F 6.675(.T)-.65 G 1.674
+(hese parameters may only be referenced; assignment to)-6.675 F
+(them is not allo)108 724.8 Q(wed.)-.25 E(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(8)190.955 E 0 Cg EP
+%%Page: 9 9
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(*)108 84 Q F0 .605
+(Expands to the positional parameters, starting from one.)31 F .606
+(When the e)5.605 F .606(xpansion occurs within dou-)-.15 F .084
+(ble quotes, it e)144 96 R .084(xpands to a single w)-.15 F .084
+(ord with the v)-.1 F .084
+(alue of each parameter separated by the \214rst char)-.25 F(-)-.2 E
+.003(acter of the)144 108 R/F2 9/Times-Bold@0 SF(IFS)2.503 E F0 .003
+(special v)2.253 F 2.503(ariable. That)-.25 F .003(is, ")2.503 F F1($*)A
+F0 2.503("i)C 2.503(se)-2.503 G(qui)-2.503 E -.25(va)-.25 G .003
+(lent to ").25 F F1($1)A/F3 10/Times-Italic@0 SF(c)A F1($2)A F3(c)A F1
+(...)A F0 .003(", where)B F3(c)2.703 E F0 .004(is the \214rst char)2.813
+F(-)-.2 E .769(acter of the v)144 120 R .769(alue of the)-.25 F F2(IFS)
+3.269 E F0 -.25(va)3.019 G 3.269(riable. If).25 F F2(IFS)3.268 E F0 .768
+(is unset, the parameters are separated by spaces.)3.018 F(If)5.768 E F2
+(IFS)144 132 Q F0(is null, the parameters are joined without interv)2.25
+E(ening separators.)-.15 E F1(@)108 144 Q F0 .605
+(Expands to the positional parameters, starting from one.)26.7 F .606
+(When the e)5.605 F .606(xpansion occurs within dou-)-.15 F .114
+(ble quotes, each parameter e)144 156 R .114(xpands to a separate w)-.15
+F 2.614(ord. That)-.1 F .113(is, ")2.613 F F1($@)A F0 2.613("i)C 2.613
+(se)-2.613 G(qui)-2.613 E -.25(va)-.25 G .113(lent to ").25 F F1($1)A F0
+2.613("")C F1($2)-2.613 E F0 2.613(".)C(..)-2.613 E .134
+(If the double-quoted e)144 168 R .134(xpansion occurs within a w)-.15 F
+.135(ord, the e)-.1 F .135(xpansion of the \214rst parameter is joined)
+-.15 F .151(with the be)144 180 R .151(ginning part of the original w)
+-.15 F .151(ord, and the e)-.1 F .15
+(xpansion of the last parameter is joined with)-.15 F .337
+(the last part of the original w)144 192 R 2.837(ord. When)-.1 F .338
+(there are no positional parameters, ")2.837 F F1($@)A F0 2.838("a)C(nd)
+-2.838 E F1($@)2.838 E F0 -.15(ex)2.838 G(pand).15 E
+(to nothing \(i.e., the)144 204 Q 2.5(ya)-.15 G(re remo)-2.5 E -.15(ve)
+-.15 G(d\).).15 E F1(#)108 216 Q F0
+(Expands to the number of positional parameters in decimal.)31 E F1(?)
+108 228 Q F0(Expands to the e)31 E(xit status of the most recently e)
+-.15 E -.15(xe)-.15 G(cuted fore).15 E(ground pipeline.)-.15 E F1<ad>108
+240 Q F0 .882
+(Expands to the current option \215ags as speci\214ed upon in)30.3 F -.2
+(vo)-.4 G .881(cation, by the).2 F F1(set)3.381 E F0 -.2(bu)3.381 G .881
+(iltin command, or).2 F(those set by the shell itself \(such as the)144
+252 Q F1<ad69>2.5 E F0(option\).)2.5 E F1($)108 264 Q F0 .214
+(Expands to the process ID of the shell.)31 F .214
+(In a \(\) subshell, it e)5.214 F .214
+(xpands to the process ID of the current)-.15 F
+(shell, not the subshell.)144 276 Q F1(!)108 288 Q F0
+(Expands to the process ID of the most recently e)32.67 E -.15(xe)-.15 G
+(cuted background \(asynchronous\) command.).15 E F1(0)108 300 Q F0
+1.692(Expands to the name of the shell or shell script.)31 F 1.691
+(This is set at shell initialization.)6.692 F(If)6.691 E F1(bash)4.191 E
+F0(is)4.191 E(in)144 312 Q -.2(vo)-.4 G -.1(ke).2 G 3.077(dw).1 G .577
+(ith a \214le of commands,)-3.077 F F1($0)3.077 E F0 .578
+(is set to the name of that \214le.)3.077 F(If)5.578 E F1(bash)3.078 E
+F0 .578(is started with the)3.078 F F1<ad63>3.078 E F0 .369
+(option, then)144 324 R F1($0)2.869 E F0 .369(is set to the \214rst ar)
+2.869 F .369(gument after the string to be e)-.18 F -.15(xe)-.15 G .369
+(cuted, if one is present.).15 F(Other)5.368 E(-)-.2 E
+(wise, it is set to the \214le name used to in)144 336 Q -.2(vo)-.4 G
+-.1(ke).2 G F1(bash)2.6 E F0 2.5(,a)C 2.5(sg)-2.5 G -2.15 -.25(iv e)-2.5
+H 2.5(nb).25 G 2.5(ya)-2.5 G -.18(rg)-2.5 G(ument zero.).18 E F1(_)108
+348 Q F0 .054(At shell startup, set to the absolute pathname used to in)
+31 F -.2(vo)-.4 G .255 -.1(ke t).2 H .055
+(he shell or shell script being e).1 F -.15(xe)-.15 G(cuted).15 E .692
+(as passed in the en)144 360 R .692(vironment or ar)-.4 F .691
+(gument list.)-.18 F(Subsequently)5.691 E 3.191(,e)-.65 G .691
+(xpands to the last ar)-3.341 F .691(gument to the)-.18 F(pre)144 372 Q
+.57(vious command, after e)-.25 F 3.07(xpansion. Also)-.15 F .571
+(set to the full pathname used to in)3.071 F -.2(vo)-.4 G .771 -.1(ke e)
+.2 H .571(ach command).1 F -.15(exe)144 384 S 1.6
+(cuted and placed in the en).15 F 1.6(vironment e)-.4 F 1.6
+(xported to that command.)-.15 F 1.6(When checking mail, this)6.6 F
+(parameter holds the name of the mail \214le currently being check)144
+396 Q(ed.)-.1 E F1(Shell V)87 412.8 Q(ariables)-.92 E F0(The follo)108
+424.8 Q(wing v)-.25 E(ariables are set by the shell:)-.25 E F1 -.3(BA)
+108 441.6 S(SH).3 E F0(Expands to the full \214le name used to in)9.07 E
+-.2(vo)-.4 G .2 -.1(ke t).2 H(his instance of).1 E F1(bash)2.5 E F0(.)A
+F1 -.3(BA)108 453.6 S(SHOPTS).3 E F0 2.548(Ac)144 465.6 S .049
+(olon-separated list of enabled shell options.)-2.548 F .049(Each w)
+5.049 F .049(ord in the list is a v)-.1 F .049(alid ar)-.25 F .049
+(gument for the)-.18 F F1<ad73>2.549 E F0 1.398(option to the)144 477.6
+R F1(shopt)3.898 E F0 -.2(bu)3.898 G 1.398(iltin command \(see).2 F F2
+1.398(SHELL B)3.898 F(UIL)-.09 E 1.398(TIN COMMANDS)-.828 F F0(belo)
+3.648 E 3.898(w\). The)-.25 F(options)3.898 E .476(appearing in)144
+489.6 R F2 -.27(BA)2.976 G(SHOPTS).27 E F0 .476(are those reported as)
+2.726 F F3(on)3.206 E F0(by)3.217 E F1(shopt)2.977 E F0 5.477(.I)C 2.977
+(ft)-5.477 G .477(his v)-2.977 F .477(ariable is in the en)-.25 F
+(vironment)-.4 E(when)144 501.6 Q F1(bash)3.142 E F0 .642(starts up, ea\
+ch shell option in the list will be enabled before reading an)3.142 F
+3.141(ys)-.15 G .641(tartup \214les.)-3.141 F(This v)144 513.6 Q
+(ariable is read-only)-.25 E(.)-.65 E F1 -.3(BA)108 525.6 S(SHPID).3 E
+F0 .36(Expands to the process id of the current)144 537.6 R F1(bash)
+2.861 E F0 2.861(process. This)2.861 F(dif)2.861 E .361(fers from)-.25 F
+F1($$)2.861 E F0 .361(under certain circum-)2.861 F
+(stances, such as subshells that do not require)144 549.6 Q F1(bash)2.5
+E F0(to be re-initialized.)2.5 E F1 -.3(BA)108 561.6 S(SH_ALIASES).3 E
+F0 1.195(An associati)144 573.6 R 1.495 -.15(ve a)-.25 H 1.195(rray v)
+.15 F 1.195(ariable whose members correspond to the internal list of al\
+iases as main-)-.25 F .318(tained by the)144 585.6 R F1(alias)2.818 E F0
+-.2(bu)2.818 G .318(iltin Elements added to this array appear in the al\
+ias list; unsetting array ele-).2 F(ments cause aliases to be remo)144
+597.6 Q -.15(ve)-.15 G 2.5(df).15 G(rom the alias list.)-2.5 E F1 -.3
+(BA)108 609.6 S(SH_ARGC).3 E F0 .935(An array v)144 621.6 R .935
+(ariable whose v)-.25 F .934
+(alues are the number of parameters in each frame of the current)-.25 F
+F1(bash)3.434 E F0 -.15(exe)144 633.6 S .535(cution call stack.).15 F
+.535(The number of parameters to the current subroutine \(shell functio\
+n or script)5.535 F -.15(exe)144 645.6 S .142(cuted with).15 F F1(.)
+2.642 E F0(or)2.642 E F1(sour)2.642 E(ce)-.18 E F0 2.642(\)i)C 2.642(sa)
+-2.642 G 2.642(tt)-2.642 G .142(he top of the stack.)-2.642 F .141
+(When a subroutine is e)5.141 F -.15(xe)-.15 G .141
+(cuted, the number of).15 F 2.63(parameters passed is pushed onto)144
+657.6 R F2 -.27(BA)5.13 G(SH_ARGC).27 E/F4 9/Times-Roman@0 SF(.)A F0
+2.63(The shell sets)7.13 F F2 -.27(BA)5.131 G(SH_ARGC).27 E F0 2.631
+(only when in)4.881 F -.15(ex)144 669.6 S(tended deb).15 E
+(ugging mode \(see the description of the)-.2 E F1(extdeb)2.5 E(ug)-.2 E
+F0(option to the)2.5 E F1(shopt)2.5 E F0 -.2(bu)2.5 G(iltin belo).2 E
+(w\))-.25 E F1 -.3(BA)108 681.6 S(SH_ARGV).3 E F0 .98(An array v)144
+693.6 R .979(ariable containing all of the parameters in the current)
+-.25 F F1(bash)3.479 E F0 -.15(exe)3.479 G .979(cution call stack.).15 F
+(The)5.979 E .275(\214nal parameter of the last subroutine call is at t\
+he top of the stack; the \214rst parameter of the initial)144 705.6 R
+1.424(call is at the bottom.)144 717.6 R 1.424(When a subroutine is e)
+6.424 F -.15(xe)-.15 G 1.424
+(cuted, the parameters supplied are pushed onto).15 F F2 -.27(BA)144
+729.6 S(SH_ARGV).27 E F4(.)A F0 2.197(The shell sets)6.697 F F2 -.27(BA)
+4.697 G(SH_ARGV).27 E F0 2.197(only when in e)4.447 F 2.197(xtended deb)
+-.15 F 2.197(ugging mode \(see the)-.2 F(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(9)190.955 E 0 Cg EP
+%%Page: 10 10
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E(description of the)144 84 Q/F1 10/Times-Bold@0 SF(extdeb)2.5 E
+(ug)-.2 E F0(option to the)2.5 E F1(shopt)2.5 E F0 -.2(bu)2.5 G
+(iltin belo).2 E(w\))-.25 E F1 -.3(BA)108 96 S(SH_CMDS).3 E F0 .668
+(An associati)144 108 R .968 -.15(ve a)-.25 H .668(rray v).15 F .668(ar\
+iable whose members correspond to the internal hash table of commands)
+-.25 F .146(as maintained by the)144 120 R F1(hash)2.646 E F0 -.2(bu)
+2.646 G 2.646(iltin. Elements).2 F .146
+(added to this array appear in the hash table; unsetting)2.646 F
+(array elements cause commands to be remo)144 132 Q -.15(ve)-.15 G 2.5
+(df).15 G(rom the hash table.)-2.5 E F1 -.3(BA)108 144 S(SH_COMMAND).3 E
+F0 1.243(The command currently being e)144 156 R -.15(xe)-.15 G 1.243
+(cuted or about to be e).15 F -.15(xe)-.15 G 1.242
+(cuted, unless the shell is e).15 F -.15(xe)-.15 G 1.242(cuting a).15 F
+(command as the result of a trap, in which case it is the command e)144
+168 Q -.15(xe)-.15 G(cuting at the time of the trap.).15 E F1 -.3(BA)108
+180 S(SH_EXECUTION_STRING).3 E F0(The command ar)144 192 Q
+(gument to the)-.18 E F1<ad63>2.5 E F0(in)2.5 E -.2(vo)-.4 G
+(cation option.).2 E F1 -.3(BA)108 204 S(SH_LINENO).3 E F0 .034
+(An array v)144 216 R .034(ariable whose members are the line numbers i\
+n source \214les corresponding to each mem-)-.25 F 3.491(ber of)144 228
+R/F2 9/Times-Bold@0 SF(FUNCN)5.991 E(AME)-.18 E/F3 9/Times-Roman@0 SF(.)
+A F1(${B)7.991 E(ASH_LINENO[)-.3 E/F4 10/Times-Italic@0 SF($i)A F1(]})A
+F0 3.491(is the line number in the source \214le where)5.991 F F1
+(${FUNCN)144 240 Q(AME[)-.2 E F4($i)A F1(]})A F0 -.1(wa)3.311 G 3.311
+(sc).1 G .811(alled \(or)-3.311 F F1(${B)3.311 E(ASH_LINENO[)-.3 E F4
+($i-1)A F1(]})A F0 .811(if referenced within another shell)3.311 F 4.987
+(function\). The)144 252 R 2.487(corresponding source \214le name is)
+4.987 F F1(${B)4.986 E(ASH_SOURCE[)-.3 E F4($i)A F1(]})A F0 7.486(.U)C
+(se)-7.486 E F2(LINENO)4.986 E F0(to)4.736 E
+(obtain the current line number)144 264 Q(.)-.55 E F1 -.3(BA)108 276 S
+(SH_REMA).3 E(TCH)-.95 E F0 .005(An array v)144 288 R .005
+(ariable whose members are assigned by the)-.25 F F1(=~)2.506 E F0 .006
+(binary operator to the)2.506 F F1([[)2.506 E F0 .006(conditional com-)
+2.506 F 2.507(mand. The)144 300 R .007(element with inde)2.507 F 2.507
+(x0i)-.15 G 2.507(st)-2.507 G .007
+(he portion of the string matching the entire re)-2.507 F .006(gular e)
+-.15 F(xpression.)-.15 E .997(The element with inde)144 312 R(x)-.15 E
+F4(n)3.497 E F0 .997(is the portion of the string matching the)3.497 F
+F4(n)3.498 E F0 .998(th parenthesized sube)B(xpres-)-.15 E 2.5
+(sion. This)144 324 R -.25(va)2.5 G(riable is read-only).25 E(.)-.65 E
+F1 -.3(BA)108 336 S(SH_SOURCE).3 E F0 .89(An array v)144 348 R .889(ari\
+able whose members are the source \214lenames corresponding to the elem\
+ents in the)-.25 F F2(FUNCN)144 360 Q(AME)-.18 E F0(array v)2.25 E
+(ariable.)-.25 E F1 -.3(BA)108 372 S(SH_SUBSHELL).3 E F0 .401
+(Incremented by one each time a subshell or subshell en)144 384 R .401
+(vironment is spa)-.4 F 2.902(wned. The)-.15 F .402(initial v)2.902 F
+.402(alue is)-.25 F(0.)144 396 Q F1 -.3(BA)108 408 S(SH_VERSINFO).3 E F0
+2.645(Ar)144 420 S .145(eadonly array v)-2.645 F .144
+(ariable whose members hold v)-.25 F .144
+(ersion information for this instance of)-.15 F F1(bash)2.644 E F0 5.144
+(.T)C(he)-5.144 E -.25(va)144 432 S
+(lues assigned to the array members are as follo).25 E(ws:)-.25 E F1 -.3
+(BA)144 450 S(SH_VERSINFO[).3 E F0(0)A F1(])A F0(The major v)24.74 E
+(ersion number \(the)-.15 E F4 -.37(re)2.5 G(lease).37 E F0(\).)A F1 -.3
+(BA)144 462 S(SH_VERSINFO[).3 E F0(1)A F1(])A F0(The minor v)24.74 E
+(ersion number \(the)-.15 E F4(ver)2.5 E(sion)-.1 E F0(\).)A F1 -.3(BA)
+144 474 S(SH_VERSINFO[).3 E F0(2)A F1(])A F0(The patch le)24.74 E -.15
+(ve)-.25 G(l.).15 E F1 -.3(BA)144 486 S(SH_VERSINFO[).3 E F0(3)A F1(])A
+F0(The b)24.74 E(uild v)-.2 E(ersion.)-.15 E F1 -.3(BA)144 498 S
+(SH_VERSINFO[).3 E F0(4)A F1(])A F0(The release status \(e.g.,)24.74 E
+F4(beta1)2.5 E F0(\).)A F1 -.3(BA)144 510 S(SH_VERSINFO[).3 E F0(5)A F1
+(])A F0(The v)24.74 E(alue of)-.25 E F2(MA)2.5 E(CHTYPE)-.495 E F3(.)A
+F1 -.3(BA)108 526.8 S(SH_VERSION).3 E F0
+(Expands to a string describing the v)144 538.8 Q
+(ersion of this instance of)-.15 E F1(bash)2.5 E F0(.)A F1(COMP_CW)108
+555.6 Q(ORD)-.1 E F0 .396(An inde)144 567.6 R 2.896(xi)-.15 G(nto)-2.896
+E F1(${COMP_W)2.896 E(ORDS})-.1 E F0 .396(of the w)2.896 F .396
+(ord containing the current cursor position.)-.1 F .397(This v)5.397 F
+(ari-)-.25 E 1.181(able is a)144 579.6 R -.25(va)-.2 G 1.181
+(ilable only in shell functions in).25 F -.2(vo)-.4 G -.1(ke).2 G 3.681
+(db).1 G 3.681(yt)-3.681 G 1.18(he programmable completion f)-3.681 F
+1.18(acilities \(see)-.1 F F1(Pr)144 591.6 Q(ogrammable Completion)-.18
+E F0(belo)2.5 E(w\).)-.25 E F1(COMP_KEY)108 608.4 Q F0(The k)144 620.4 Q
+.3 -.15(ey \()-.1 H(or \214nal k).15 E .3 -.15(ey o)-.1 H 2.5(fak).15 G
+.3 -.15(ey s)-2.6 H(equence\) used to in).15 E -.2(vo)-.4 G .2 -.1(ke t)
+.2 H(he current completion function.).1 E F1(COMP_LINE)108 637.2 Q F0
+1.207(The current command line.)144 649.2 R 1.208(This v)6.208 F 1.208
+(ariable is a)-.25 F -.25(va)-.2 G 1.208
+(ilable only in shell functions and e).25 F 1.208(xternal com-)-.15 F
+2.849(mands in)144 661.2 R -.2(vo)-.4 G -.1(ke).2 G 5.349(db).1 G 5.349
+(yt)-5.349 G 2.849(he programmable completion f)-5.349 F 2.849
+(acilities \(see)-.1 F F1(Pr)5.349 E 2.848(ogrammable Completion)-.18 F
+F0(belo)144 673.2 Q(w\).)-.25 E F1(COMP_POINT)108 690 Q F0 .666
+(The inde)144 702 R 3.166(xo)-.15 G 3.166(ft)-3.166 G .666
+(he current cursor position relati)-3.166 F .966 -.15(ve t)-.25 H 3.166
+(ot).15 G .666(he be)-3.166 F .666(ginning of the current command.)-.15
+F .667(If the)5.667 F .535
+(current cursor position is at the end of the current command, the v)144
+714 R .534(alue of this v)-.25 F .534(ariable is equal to)-.25 F F1
+(${#COMP_LINE})144 726 Q F0 7.005(.T)C 2.005(his v)-7.005 F 2.005
+(ariable is a)-.25 F -.25(va)-.2 G 2.006
+(ilable only in shell functions and e).25 F 2.006(xternal commands)-.15
+F(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(10)185.955 E 0 Cg EP
+%%Page: 11 11
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E(in)144 84 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(db).1 G 2.5(yt)-2.5 G
+(he programmable completion f)-2.5 E(acilities \(see)-.1 E/F1 10
+/Times-Bold@0 SF(Pr)2.5 E(ogrammable Completion)-.18 E F0(belo)2.5 E
+(w\).)-.25 E F1(COMP_TYPE)108 100.8 Q F0 .042(Set to an inte)144 112.8 R
+.042(ger v)-.15 F .041(alue corresponding to the type of completion att\
+empted that caused a completion)-.25 F .337(function to be called:)144
+124.8 R/F2 10/Times-Italic@0 SF -.5(TA)2.837 G(B).5 E F0 2.837(,f)C .337
+(or normal completion,)-2.837 F F2(?)2.837 E F0 2.837(,f)C .337
+(or listing completions after successi)-2.837 F .638 -.15(ve t)-.25 H
+(abs,).15 E F2(!)144 136.8 Q F0 4.092(,f)C 1.592(or listing alternati)
+-4.092 F -.15(ve)-.25 G 4.092(so).15 G 4.092(np)-4.092 G 1.592(artial w)
+-4.092 F 1.592(ord completion,)-.1 F F2(@)4.092 E F0 4.092(,t)C 4.092
+(ol)-4.092 G 1.592(ist completions if the w)-4.092 F 1.591(ord is not)
+-.1 F 1.552(unmodi\214ed, or)144 148.8 R F2(%)4.052 E F0 4.052(,f)C
+1.552(or menu completion.)-4.052 F 1.552(This v)6.552 F 1.552
+(ariable is a)-.25 F -.25(va)-.2 G 1.552
+(ilable only in shell functions and).25 F -.15(ex)144 160.8 S 2.929
+(ternal commands in).15 F -.2(vo)-.4 G -.1(ke).2 G 5.429(db).1 G 5.429
+(yt)-5.429 G 2.929(he programmable completion f)-5.429 F 2.929
+(acilities \(see)-.1 F F1(Pr)5.428 E(ogrammable)-.18 E(Completion)144
+172.8 Q F0(belo)2.5 E(w\).)-.25 E F1(COMP_W)108 189.6 Q(ORDBREAKS)-.1 E
+F0 1.335(The set of characters that the)144 201.6 R F1 -.18(re)3.836 G
+(adline).18 E F0 1.336(library treats as w)3.836 F 1.336
+(ord separators when performing w)-.1 F(ord)-.1 E 3.126(completion. If)
+144 213.6 R/F3 9/Times-Bold@0 SF(COMP_W)3.126 E(ORDBREAKS)-.09 E F0 .626
+(is unset, it loses its special properties, e)2.876 F -.15(ve)-.25 G
+3.125(ni).15 G 3.125(fi)-3.125 G 3.125(ti)-3.125 G 3.125(ss)-3.125 G
+(ubse-)-3.125 E(quently reset.)144 225.6 Q F1(COMP_W)108 242.4 Q(ORDS)
+-.1 E F0 .653(An array v)144 254.4 R .653(ariable \(see)-.25 F F1
+(Arrays)3.153 E F0(belo)3.153 E .654(w\) consisting of the indi)-.25 F
+.654(vidual w)-.25 F .654(ords in the current command)-.1 F 4.333
+(line. The)144 266.4 R 1.832(line is split into w)4.332 F 1.832(ords as)
+-.1 F F1 -.18(re)4.332 G(adline).18 E F0 -.1(wo)4.332 G 1.832
+(uld split it, using).1 F F3(COMP_W)4.332 E(ORDBREAKS)-.09 E F0(as)4.082
+E .831(described abo)144 278.4 R -.15(ve)-.15 G 5.831(.T).15 G .831
+(his v)-5.831 F .831(ariable is a)-.25 F -.25(va)-.2 G .832
+(ilable only in shell functions in).25 F -.2(vo)-.4 G -.1(ke).2 G 3.332
+(db).1 G 3.332(yt)-3.332 G .832(he programmable)-3.332 F(completion f)
+144 290.4 Q(acilities \(see)-.1 E F1(Pr)2.5 E(ogrammable Completion)-.18
+E F0(belo)2.5 E(w\).)-.25 E F1(DIRST)108 307.2 Q -.55(AC)-.9 G(K).55 E
+F0 2.26(An array v)144 319.2 R 2.26(ariable \(see)-.25 F F1(Arrays)4.76
+E F0(belo)4.76 E 2.26
+(w\) containing the current contents of the directory stack.)-.25 F
+1.094(Directories appear in the stack in the order the)144 331.2 R 3.594
+(ya)-.15 G 1.095(re displayed by the)-3.594 F F1(dirs)3.595 E F0 -.2(bu)
+3.595 G 3.595(iltin. Assigning).2 F(to)3.595 E 1.432
+(members of this array v)144 343.2 R 1.432
+(ariable may be used to modify directories already in the stack, b)-.25
+F 1.431(ut the)-.2 F F1(pushd)144 355.2 Q F0(and)2.746 E F1(popd)2.746 E
+F0 -.2(bu)2.746 G .246(iltins must be used to add and remo).2 F .546
+-.15(ve d)-.15 H 2.746(irectories. Assignment).15 F .246(to this v)2.746
+F(ariable)-.25 E .351(will not change the current directory)144 367.2 R
+5.35(.I)-.65 G(f)-5.35 E F3(DIRST)2.85 E -.495(AC)-.81 G(K).495 E F0 .35
+(is unset, it loses its special properties, e)2.6 F -.15(ve)-.25 G 2.85
+(ni).15 G(f)-2.85 E(it is subsequently reset.)144 379.2 Q F1(EUID)108
+396 Q F0 1.103(Expands to the ef)11 F(fecti)-.25 E 1.403 -.15(ve u)-.25
+H 1.103(ser ID of the current user).15 F 3.603(,i)-.4 G 1.103
+(nitialized at shell startup.)-3.603 F 1.104(This v)6.103 F 1.104
+(ariable is)-.25 F(readonly)144 408 Q(.)-.65 E F1(FUNCN)108 424.8 Q(AME)
+-.2 E F0 .479(An array v)144 436.8 R .479
+(ariable containing the names of all shell functions currently in the e)
+-.25 F -.15(xe)-.15 G .478(cution call stack.).15 F .276
+(The element with inde)144 448.8 R 2.776(x0i)-.15 G 2.776(st)-2.776 G
+.276(he name of an)-2.776 F 2.777(yc)-.15 G(urrently-e)-2.777 E -.15(xe)
+-.15 G .277(cuting shell function.).15 F .277(The bottom-most)5.277 F
+.25(element is)144 460.8 R/F4 10/Courier@0 SF("main")2.75 E F0 5.25(.T)C
+.25(his v)-5.25 F .25(ariable e)-.25 F .25
+(xists only when a shell function is e)-.15 F -.15(xe)-.15 G 2.75
+(cuting. Assignments).15 F(to)2.75 E F3(FUNCN)144 472.8 Q(AME)-.18 E F0
+(ha)2.634 E .684 -.15(ve n)-.2 H 2.884(oe).15 G -.25(ff)-2.884 G .384
+(ect and return an error status.).25 F(If)5.385 E F3(FUNCN)2.885 E(AME)
+-.18 E F0 .385(is unset, it loses its special)2.635 F(properties, e)144
+484.8 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)
+-2.5 G(ubsequently reset.)-2.5 E F1(GR)108 501.6 Q(OUPS)-.3 E F0 1.229
+(An array v)144 513.6 R 1.228(ariable containing the list of groups of \
+which the current user is a member)-.25 F 6.228(.A)-.55 G(ssign-)-6.228
+E .596(ments to)144 525.6 R F3(GR)3.096 E(OUPS)-.27 E F0(ha)2.847 E .897
+-.15(ve n)-.2 H 3.097(oe).15 G -.25(ff)-3.097 G .597
+(ect and return an error status.).25 F(If)5.597 E F3(GR)3.097 E(OUPS)
+-.27 E F0 .597(is unset, it loses its spe-)2.847 F(cial properties, e)
+144 537.6 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5
+(ss)-2.5 G(ubsequently reset.)-2.5 E F1(HISTCMD)108 554.4 Q F0 .356
+(The history number)144 566.4 R 2.856(,o)-.4 G 2.856(ri)-2.856 G(nde)
+-2.856 E 2.856(xi)-.15 G 2.856(nt)-2.856 G .356
+(he history list, of the current command.)-2.856 F(If)5.356 E F3
+(HISTCMD)2.855 E F0 .355(is unset, it)2.605 F
+(loses its special properties, e)144 578.4 Q -.15(ve)-.25 G 2.5(ni).15 G
+2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.)-2.5 E F1
+(HOSTN)108 595.2 Q(AME)-.2 E F0
+(Automatically set to the name of the current host.)144 607.2 Q F1
+(HOSTTYPE)108 624 Q F0 .222(Automatically set to a string that uniquely\
+ describes the type of machine on which)144 636 R F1(bash)2.723 E F0
+.223(is e)2.723 F -.15(xe)-.15 G(cut-).15 E 2.5(ing. The)144 648 R(def)
+2.5 E(ault is system-dependent.)-.1 E F1(LINENO)108 664.8 Q F0 1.408(Ea\
+ch time this parameter is referenced, the shell substitutes a decimal n\
+umber representing the)144 676.8 R .078(current sequential line number \
+\(starting with 1\) within a script or function.)144 688.8 R .079
+(When not in a script or)5.078 F .307(function, the v)144 700.8 R .307
+(alue substituted is not guaranteed to be meaningful.)-.25 F(If)5.306 E
+F3(LINENO)2.806 E F0 .306(is unset, it loses its)2.556 F
+(special properties, e)144 712.8 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(fi)
+-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G(ubsequently reset.)-2.5 E
+(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(11)185.955 E 0 Cg EP
+%%Page: 12 12
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(MA)108 84 Q(CHTYPE)-.55 E F0 .898(Automati\
+cally set to a string that fully describes the system type on which)144
+96 R F1(bash)3.398 E F0 .899(is e)3.398 F -.15(xe)-.15 G .899
+(cuting, in).15 F(the standard GNU)144 108 Q/F2 10/Times-Italic@0 SF
+(cpu-company-system)2.5 E F0 2.5(format. The)2.5 F(def)2.5 E
+(ault is system-dependent.)-.1 E F1(OLDPWD)108 124.8 Q F0(The pre)144
+136.8 Q(vious w)-.25 E(orking directory as set by the)-.1 E F1(cd)2.5 E
+F0(command.)2.5 E F1(OPT)108 153.6 Q(ARG)-.9 E F0 1.627(The v)144 165.6
+R 1.627(alue of the last option ar)-.25 F 1.627(gument processed by the)
+-.18 F F1(getopts)4.127 E F0 -.2(bu)4.127 G 1.626(iltin command \(see).2
+F/F3 9/Times-Bold@0 SF(SHELL)4.126 E -.09(BU)144 177.6 S(IL).09 E
+(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)-.25 E F1(OPTIND)108 194.4 Q
+F0 1.651(The inde)144 206.4 R 4.151(xo)-.15 G 4.151(ft)-4.151 G 1.651
+(he ne)-4.151 F 1.651(xt ar)-.15 F 1.652(gument to be processed by the)
+-.18 F F1(getopts)4.152 E F0 -.2(bu)4.152 G 1.652(iltin command \(see).2
+F F3(SHELL)4.152 E -.09(BU)144 218.4 S(IL).09 E(TIN COMMANDS)-.828 E F0
+(belo)2.25 E(w\).)-.25 E F1(OSTYPE)108 235.2 Q F0 .329(Automatically se\
+t to a string that describes the operating system on which)144 247.2 R
+F1(bash)2.829 E F0 .329(is e)2.829 F -.15(xe)-.15 G 2.829(cuting. The)
+.15 F(def)144 259.2 Q(ault is system-dependent.)-.1 E F1(PIPEST)108 276
+Q -.95(AT)-.9 G(US).95 E F0 .61(An array v)144 288 R .61(ariable \(see)
+-.25 F F1(Arrays)3.11 E F0(belo)3.11 E .61(w\) containing a list of e)
+-.25 F .61(xit status v)-.15 F .61(alues from the processes in)-.25 F
+(the most-recently-e)144 300 Q -.15(xe)-.15 G(cuted fore).15 E
+(ground pipeline \(which may contain only a single command\).)-.15 E F1
+(PPID)108 316.8 Q F0(The process ID of the shell')12.67 E 2.5(sp)-.55 G
+2.5(arent. This)-2.5 F -.25(va)2.5 G(riable is readonly).25 E(.)-.65 E
+F1(PWD)108 333.6 Q F0(The current w)12.67 E
+(orking directory as set by the)-.1 E F1(cd)2.5 E F0(command.)2.5 E F1
+(RANDOM)108 350.4 Q F0 .566
+(Each time this parameter is referenced, a random inte)144 362.4 R .565
+(ger between 0 and 32767 is generated.)-.15 F(The)5.565 E .01
+(sequence of random numbers may be initialized by assigning a v)144
+374.4 R .01(alue to)-.25 F F3(RANDOM)2.51 E/F4 9/Times-Roman@0 SF(.)A F0
+(If)4.51 E F3(RANDOM)2.51 E F0(is)2.26 E
+(unset, it loses its special properties, e)144 386.4 Q -.15(ve)-.25 G
+2.5(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G
+(ubsequently reset.)-2.5 E F1(REPL)108 403.2 Q(Y)-.92 E F0
+(Set to the line of input read by the)144 415.2 Q F1 -.18(re)2.5 G(ad)
+.18 E F0 -.2(bu)2.5 G(iltin command when no ar).2 E
+(guments are supplied.)-.18 E F1(SECONDS)108 432 Q F0 .795(Each time th\
+is parameter is referenced, the number of seconds since shell in)144 444
+R -.2(vo)-.4 G .795(cation is returned.).2 F .712(If a v)144 456 R .712
+(alue is assigned to)-.25 F F3(SECONDS)3.212 E F4(,)A F0 .712(the v)
+2.962 F .712(alue returned upon subsequent references is the number)-.25
+F .408(of seconds since the assignment plus the v)144 468 R .408
+(alue assigned.)-.25 F(If)5.408 E F3(SECONDS)2.908 E F0 .407
+(is unset, it loses its special)2.658 F(properties, e)144 480 Q -.15(ve)
+-.25 G 2.5(ni).15 G 2.5(fi)-2.5 G 2.5(ti)-2.5 G 2.5(ss)-2.5 G
+(ubsequently reset.)-2.5 E F1(SHELLOPTS)108 496.8 Q F0 3.262(Ac)144
+508.8 S .763(olon-separated list of enabled shell options.)-3.262 F .763
+(Each w)5.763 F .763(ord in the list is a v)-.1 F .763(alid ar)-.25 F
+.763(gument for the)-.18 F F1<ad6f>144 520.8 Q F0 1.174(option to the)
+3.674 F F1(set)3.674 E F0 -.2(bu)3.674 G 1.174(iltin command \(see).2 F
+F3 1.173(SHELL B)3.673 F(UIL)-.09 E 1.173(TIN COMMANDS)-.828 F F0(belo)
+3.423 E 3.673(w\). The)-.25 F(options)3.673 E .019(appearing in)144
+532.8 R F3(SHELLOPTS)2.519 E F0 .019(are those reported as)2.269 F F2
+(on)2.749 E F0(by)2.759 E F1 .019(set \255o)2.519 F F0 5.019(.I)C 2.519
+(ft)-5.019 G .019(his v)-2.519 F .02(ariable is in the en)-.25 F
+(vironment)-.4 E(when)144 544.8 Q F1(bash)3.142 E F0 .642(starts up, ea\
+ch shell option in the list will be enabled before reading an)3.142 F
+3.141(ys)-.15 G .641(tartup \214les.)-3.141 F(This v)144 556.8 Q
+(ariable is read-only)-.25 E(.)-.65 E F1(SHL)108 573.6 Q(VL)-.92 E F0
+(Incremented by one each time an instance of)144 585.6 Q F1(bash)2.5 E
+F0(is started.)2.5 E F1(UID)108 602.4 Q F0
+(Expands to the user ID of the current user)17.67 E 2.5(,i)-.4 G
+(nitialized at shell startup.)-2.5 E(This v)5 E(ariable is readonly)-.25
+E(.)-.65 E .993(The follo)108 619.2 R .993(wing v)-.25 F .994
+(ariables are used by the shell.)-.25 F .994(In some cases,)5.994 F F1
+(bash)3.494 E F0 .994(assigns a def)3.494 F .994(ault v)-.1 F .994
+(alue to a v)-.25 F(ariable;)-.25 E(these cases are noted belo)108 631.2
+Q -.65(w.)-.25 G F1 -.3(BA)108 648 S(SH_ENV).3 E F0 .506
+(If this parameter is set when)144 660 R F1(bash)3.006 E F0 .506(is e)
+3.006 F -.15(xe)-.15 G .505(cuting a shell script, its v).15 F .505
+(alue is interpreted as a \214lename)-.25 F .354
+(containing commands to initialize the shell, as in)144 672 R F2
+(~/.bashr)2.855 E(c)-.37 E F0 5.355(.T).31 G .355(he v)-5.355 F .355
+(alue of)-.25 F F3 -.27(BA)2.855 G(SH_ENV).27 E F0 .355(is subjected)
+2.605 F .525(to parameter e)144 684 R .525
+(xpansion, command substitution, and arithmetic e)-.15 F .525
+(xpansion before being interpreted)-.15 F(as a \214le name.)144 696 Q F3
+-.666(PA)5 G(TH)-.189 E F0
+(is not used to search for the resultant \214le name.)2.25 E
+(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(12)185.955 E 0 Cg EP
+%%Page: 13 13
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(CDP)108 84 Q -.95(AT)-.74 G(H).95 E F0
+1.247(The search path for the)144 96 R F1(cd)3.747 E F0 3.747
+(command. This)3.747 F 1.248
+(is a colon-separated list of directories in which the)3.747 F 3.796
+(shell looks for destination directories speci\214ed by the)144 108 R F1
+(cd)6.295 E F0 6.295(command. A)6.295 F 3.795(sample v)6.295 F 3.795
+(alue is)-.25 F/F2 10/Courier@0 SF(".:~:/usr")144 120 Q F0(.)A F1 -.3
+(BA)108 132 S(SH_XTRA).3 E(CEFD)-.55 E F0 .48(If set to an inte)144 144
+R .48(ger corresponding to a v)-.15 F .481(alid \214le descriptor)-.25 F
+(,)-.4 E F1(bash)2.981 E F0 .481(will write the trace output gener)2.981
+F(-)-.2 E 3.114(ated when)144 156 R F2 3.114(set -x)5.614 F F0 3.114
+(is enabled to that \214le descriptor)5.614 F 8.114(.T)-.55 G 3.114
+(he \214le descriptor is closed when)-8.114 F/F3 9/Times-Bold@0 SF -.27
+(BA)144 168 S(SH_XTRA).27 E(CEFD)-.495 E F0 .138
+(is unset or assigned a ne)2.388 F 2.638(wv)-.25 G 2.638
+(alue. Unsetting)-2.888 F F3 -.27(BA)2.638 G(SH_XTRA).27 E(CEFD)-.495 E
+F0 .138(or assigning it)2.388 F 2.531(the empty string causes the trace\
+ output to be sent to the standard error)144 180 R 7.53(.N)-.55 G 2.53
+(ote that setting)-7.53 F F3 -.27(BA)144 192 S(SH_XTRA).27 E(CEFD)-.495
+E F0 .74(to 2 \(the standard error \214le descriptor\) and then unsetti\
+ng it will result in the)2.99 F(standard error being closed.)144 204 Q
+F1(COLUMNS)108 216 Q F0 .425(Used by the)144 228 R F1(select)2.925 E F0
+-.2(bu)2.925 G .425(iltin command to determine the terminal width when \
+printing selection lists.).2 F
+(Automatically set upon receipt of a SIGWINCH.)144 240 Q F1(COMPREPL)108
+252 Q(Y)-.92 E F0 .847(An array v)144 264 R .848(ariable from which)-.25
+F F1(bash)3.348 E F0 .848
+(reads the possible completions generated by a shell function)3.348 F
+(in)144 276 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(db).1 G 2.5(yt)-2.5 G
+(he programmable completion f)-2.5 E(acility \(see)-.1 E F1(Pr)2.5 E
+(ogrammable Completion)-.18 E F0(belo)2.5 E(w\).)-.25 E F1(EMA)108 288 Q
+(CS)-.55 E F0(If)144 300 Q F1(bash)2.536 E F0 .036(\214nds this v)2.536
+F .036(ariable in the en)-.25 F .036
+(vironment when the shell starts with v)-.4 F(alue)-.25 E F2(t)2.535 E
+F0 2.535(,i)C 2.535(ta)-2.535 G .035(ssumes that the)-2.535 F
+(shell is running in an emacs shell b)144 312 Q(uf)-.2 E
+(fer and disables line editing.)-.25 E F1(FCEDIT)108 324 Q F0(The def)
+144 336 Q(ault editor for the)-.1 E F1(fc)2.5 E F0 -.2(bu)2.5 G
+(iltin command.).2 E F1(FIGNORE)108 348 Q F0 2.598(Ac)144 360 S .098
+(olon-separated list of suf)-2.598 F<8c78>-.25 E .098
+(es to ignore when performing \214lename completion \(see)-.15 F F3
+(READLINE)2.599 E F0(belo)144 372 Q 2.705(w\). A)-.25 F .205
+(\214lename whose suf)2.705 F .205(\214x matches one of the entries in)
+-.25 F F3(FIGNORE)2.705 E F0 .205(is e)2.455 F .204
+(xcluded from the list)-.15 F(of matched \214lenames.)144 384 Q 2.5(As)5
+G(ample v)-2.5 E(alue is)-.25 E F2(".o:~")2.5 E F0(.)A F1(GLOBIGNORE)108
+396 Q F0 3.118(Ac)144 408 S .618(olon-separated list of patterns de\214\
+ning the set of \214lenames to be ignored by pathname e)-3.118 F(xpan-)
+-.15 E 3.132(sion. If)144 420 R 3.132<618c>3.132 G .632
+(lename matched by a pathname e)-3.132 F .632
+(xpansion pattern also matches one of the patterns in)-.15 F F3
+(GLOBIGNORE)144 432 Q/F4 9/Times-Roman@0 SF(,)A F0(it is remo)2.25 E
+-.15(ve)-.15 G 2.5(df).15 G(rom the list of matches.)-2.5 E F1
+(HISTCONTR)108 444 Q(OL)-.3 E F0 2.653(Ac)144 456 S .153
+(olon-separated list of v)-2.653 F .153(alues controlling ho)-.25 F
+2.653(wc)-.25 G .153(ommands are sa)-2.653 F -.15(ve)-.2 G 2.653(do).15
+G 2.653(nt)-2.653 G .153(he history list.)-2.653 F .154(If the list)
+5.153 F .491(of v)144 468 R .491(alues includes)-.25 F/F5 10
+/Times-Italic@0 SF(ignor)2.991 E(espace)-.37 E F0 2.991(,l).18 G .491
+(ines which be)-2.991 F .491(gin with a)-.15 F F1(space)2.991 E F0 .49
+(character are not sa)2.991 F -.15(ve)-.2 G 2.99(di).15 G 2.99(nt)-2.99
+G .49(he his-)-2.99 F .557(tory list.)144 480 R 3.057(Av)5.557 G .557
+(alue of)-3.307 F F5(ignor)3.067 E(edups)-.37 E F0 .557
+(causes lines matching the pre)3.327 F .558
+(vious history entry to not be sa)-.25 F -.15(ve)-.2 G(d.).15 E 2.959
+(Av)144 492 S .459(alue of)-3.209 F F5(ignor)2.969 E(eboth)-.37 E F0
+.459(is shorthand for)3.239 F F5(ignor)2.959 E(espace)-.37 E F0(and)
+2.959 E F5(ignor)2.958 E(edups)-.37 E F0 5.458(.A)C -.25(va)-2.5 G .458
+(lue of).25 F F5(er)2.958 E(asedups)-.15 E F0(causes)2.958 E .698
+(all pre)144 504 R .698
+(vious lines matching the current line to be remo)-.25 F -.15(ve)-.15 G
+3.198(df).15 G .699(rom the history list before that line is)-3.198 F
+(sa)144 516 Q -.15(ve)-.2 G 2.764(d. An).15 F 2.764(yv)-.15 G .264
+(alue not in the abo)-3.014 F .563 -.15(ve l)-.15 H .263
+(ist is ignored.).15 F(If)5.263 E F3(HISTCONTR)2.763 E(OL)-.27 E F0 .263
+(is unset, or does not include)2.513 F 2.941(av)144 528 S .441(alid v)
+-3.191 F .441(alue, all lines read by the shell parser are sa)-.25 F
+-.15(ve)-.2 G 2.942(do).15 G 2.942(nt)-2.942 G .442
+(he history list, subject to the v)-2.942 F .442(alue of)-.25 F F3
+(HISTIGNORE)144 540 Q F4(.)A F0 1.981(The second and subsequent lines o\
+f a multi-line compound command are not)6.482 F
+(tested, and are added to the history re)144 552 Q -.05(ga)-.15 G
+(rdless of the v).05 E(alue of)-.25 E F3(HISTCONTR)2.5 E(OL)-.27 E F4(.)
+A F1(HISTFILE)108 564 Q F0 .181
+(The name of the \214le in which command history is sa)144 576 R -.15
+(ve)-.2 G 2.681(d\().15 G(see)-2.681 E F3(HIST)2.681 E(OR)-.162 E(Y)
+-.315 E F0(belo)2.431 E 2.682(w\). The)-.25 F(def)2.682 E .182(ault v)
+-.1 F(alue)-.25 E(is)144 588 Q F5(~/.bash_history)2.5 E F0 5(.I)C 2.5
+(fu)-5 G(nset, the command history is not sa)-2.5 E -.15(ve)-.2 G 2.5
+(dw).15 G(hen an interacti)-2.5 E .3 -.15(ve s)-.25 H(hell e).15 E
+(xits.)-.15 E F1(HISTFILESIZE)108 600 Q F0 1.623
+(The maximum number of lines contained in the history \214le.)144 612 R
+1.622(When this v)6.623 F 1.622(ariable is assigned a)-.25 F -.25(va)144
+624 S .305(lue, the history \214le is truncated, if necessary).25 F
+2.805(,b)-.65 G 2.805(yr)-2.805 G(emo)-2.805 E .305
+(ving the oldest entries, to contain no more)-.15 F .602
+(than that number of lines.)144 636 R .602(The def)5.602 F .602(ault v)
+-.1 F .602(alue is 500.)-.25 F .601
+(The history \214le is also truncated to this size)5.602 F
+(after writing it when an interacti)144 648 Q .3 -.15(ve s)-.25 H
+(hell e).15 E(xits.)-.15 E F1(HISTIGNORE)108 660 Q F0 2.657(Ac)144 672 S
+.157(olon-separated list of patterns used to decide which command lines\
+ should be sa)-2.657 F -.15(ve)-.2 G 2.658(do).15 G 2.658(nt)-2.658 G
+.158(he his-)-2.658 F .708(tory list.)144 684 R .708
+(Each pattern is anchored at the be)5.708 F .707
+(ginning of the line and must match the complete line)-.15 F .625
+(\(no implicit `)144 696 R F1(*)A F0 3.125('i)C 3.125(sa)-3.125 G 3.125
+(ppended\). Each)-3.125 F .626(pattern is tested ag)3.125 F .626
+(ainst the line after the checks speci\214ed by)-.05 F F3(HISTCONTR)144
+708 Q(OL)-.27 E F0 1.793(are applied.)4.043 F 1.793
+(In addition to the normal shell pattern matching characters, `)6.793 F
+F1(&)A F0(')A 2.514(matches the pre)144 720 R 2.514(vious history line.)
+-.25 F(`)7.514 E F1(&)A F0 5.014('m)C 2.514
+(ay be escaped using a backslash; the backslash is)-5.014 F
+(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(13)185.955 E 0 Cg EP
+%%Page: 14 14
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E(remo)144 84 Q -.15(ve)-.15 G 3.353(db).15 G .853
+(efore attempting a match.)-3.353 F .852
+(The second and subsequent lines of a multi-line compound)5.852 F
+(command are not tested, and are added to the history re)144 96 Q -.05
+(ga)-.15 G(rdless of the v).05 E(alue of)-.25 E/F1 9/Times-Bold@0 SF
+(HISTIGNORE)2.5 E/F2 9/Times-Roman@0 SF(.)A/F3 10/Times-Bold@0 SF
+(HISTSIZE)108 108 Q F0 1.942
+(The number of commands to remember in the command history \(see)144 120
+R F1(HIST)4.443 E(OR)-.162 E(Y)-.315 E F0(belo)4.193 E 4.443(w\). The)
+-.25 F(def)144 132 Q(ault v)-.1 E(alue is 500.)-.25 E F3(HISTTIMEFORMA)
+108 144 Q(T)-.95 E F0 .952(If this v)144 156 R .952
+(ariable is set and not null, its v)-.25 F .951
+(alue is used as a format string for)-.25 F/F4 10/Times-Italic@0 SF
+(strftime)3.451 E F0 .951(\(3\) to print the)B .672
+(time stamp associated with each history entry displayed by the)144 168
+R F3(history)3.173 E F0 -.2(bu)3.173 G 3.173(iltin. If).2 F .673(this v)
+3.173 F .673(ariable is)-.25 F .144
+(set, time stamps are written to the history \214le so the)144 180 R
+2.644(ym)-.15 G .144(ay be preserv)-2.644 F .144
+(ed across shell sessions.)-.15 F(This)5.144 E(uses the history comment\
+ character to distinguish timestamps from other history lines.)144 192 Q
+F3(HOME)108 204 Q F0 1.27
+(The home directory of the current user; the def)144 216 R 1.27(ault ar)
+-.1 F 1.27(gument for the)-.18 F F3(cd)3.77 E F0 -.2(bu)3.77 G 1.27
+(iltin command.).2 F(The)6.27 E -.25(va)144 228 S(lue of this v).25 E
+(ariable is also used when performing tilde e)-.25 E(xpansion.)-.15 E F3
+(HOSTFILE)108 240 Q F0 1.015
+(Contains the name of a \214le in the same format as)144 252 R F4
+(/etc/hosts)5.181 E F0 1.015(that should be read when the shell)5.181 F
+.55(needs to complete a hostname.)144 264 R .551
+(The list of possible hostname completions may be changed while)5.551 F
+1.059(the shell is running; the ne)144 276 R 1.059
+(xt time hostname completion is attempted after the v)-.15 F 1.058
+(alue is changed,)-.25 F F3(bash)144 288 Q F0 .138
+(adds the contents of the ne)2.638 F 2.638<778c>-.25 G .138(le to the e)
+-2.638 F .138(xisting list.)-.15 F(If)5.138 E F1(HOSTFILE)2.638 E F0
+.138(is set, b)2.388 F .139(ut has no v)-.2 F .139(alue, or)-.25 F .518
+(does not name a readable \214le,)144 300 R F3(bash)3.018 E F0 .518
+(attempts to read)3.018 F F4(/etc/hosts)4.683 E F0 .517
+(to obtain the list of possible host-)4.683 F(name completions.)144 312
+Q(When)5 E F1(HOSTFILE)2.5 E F0(is unset, the hostname list is cleared.)
+2.25 E F3(IFS)108 324 Q F0(The)20.44 E F4 .555(Internal F)3.635 F .555
+(ield Separ)-.45 F(ator)-.15 E F0 .555(that is used for w)3.785 F .556
+(ord splitting after e)-.1 F .556(xpansion and to split lines into)-.15
+F -.1(wo)144 336 S(rds with the).1 E F3 -.18(re)2.5 G(ad).18 E F0 -.2
+(bu)2.5 G(iltin command.).2 E(The def)5 E(ault v)-.1 E(alue is `)-.25 E
+(`<space><tab><ne)-.74 E(wline>')-.25 E('.)-.74 E F3(IGNOREEOF)108 348 Q
+F0 .503(Controls the action of an interacti)144 360 R .803 -.15(ve s)
+-.25 H .503(hell on receipt of an).15 F F1(EOF)3.003 E F0 .503
+(character as the sole input.)2.753 F .503(If set,)5.503 F .426(the v)
+144 372 R .426(alue is the number of consecuti)-.25 F -.15(ve)-.25 G F1
+(EOF)3.076 E F0 .426
+(characters which must be typed as the \214rst characters)2.676 F .303
+(on an input line before)144 384 R F3(bash)2.802 E F0 -.15(ex)2.802 G
+2.802(its. If).15 F .302(the v)2.802 F .302(ariable e)-.25 F .302
+(xists b)-.15 F .302(ut does not ha)-.2 F .602 -.15(ve a n)-.2 H .302
+(umeric v).15 F .302(alue, or has)-.25 F(no v)144 396 Q(alue, the def)
+-.25 E(ault v)-.1 E(alue is 10.)-.25 E(If it does not e)5 E(xist,)-.15 E
+F1(EOF)2.5 E F0(signi\214es the end of input to the shell.)2.25 E F3
+(INPUTRC)108 408 Q F0 1.435(The \214lename for the)144 420 R F3 -.18(re)
+3.936 G(adline).18 E F0 1.436(startup \214le, o)3.936 F -.15(ve)-.15 G
+1.436(rriding the def).15 F 1.436(ault of)-.1 F F4(~/.inputr)5.602 E(c)
+-.37 E F0(\(see)5.602 E F1(READLINE)3.936 E F0(belo)144 432 Q(w\).)-.25
+E F3(LANG)108 444 Q F0 1.24(Used to determine the locale cate)7.11 F
+1.239(gory for an)-.15 F 3.739(yc)-.15 G(ate)-3.739 E 1.239
+(gory not speci\214cally selected with a v)-.15 F(ariable)-.25 E
+(starting with)144 456 Q F3(LC_)2.5 E F0(.)A F3(LC_ALL)108 468 Q F0 .973
+(This v)144 480 R .973(ariable o)-.25 F -.15(ve)-.15 G .973
+(rrides the v).15 F .973(alue of)-.25 F F1(LANG)3.473 E F0 .973(and an)
+3.223 F 3.473(yo)-.15 G(ther)-3.473 E F3(LC_)3.473 E F0 -.25(va)3.473 G
+.974(riable specifying a locale cate-).25 F(gory)144 492 Q(.)-.65 E F3
+(LC_COLLA)108 504 Q(TE)-.95 E F0 .412(This v)144 516 R .412(ariable det\
+ermines the collation order used when sorting the results of pathname e)
+-.25 F(xpansion,)-.15 E 1.464(and determines the beha)144 528 R 1.464
+(vior of range e)-.2 F 1.465(xpressions, equi)-.15 F -.25(va)-.25 G
+1.465(lence classes, and collating sequences).25 F(within pathname e)144
+540 Q(xpansion and pattern matching.)-.15 E F3(LC_CTYPE)108 552 Q F0
+1.936(This v)144 564 R 1.936
+(ariable determines the interpretation of characters and the beha)-.25 F
+1.935(vior of character classes)-.2 F(within pathname e)144 576 Q
+(xpansion and pattern matching.)-.15 E F3(LC_MESSA)108 588 Q(GES)-.55 E
+F0(This v)144 600 Q(ariable determines the locale used to translate dou\
+ble-quoted strings preceded by a)-.25 E F3($)2.5 E F0(.)A F3(LC_NUMERIC)
+108 612 Q F0(This v)144 624 Q(ariable determines the locale cate)-.25 E
+(gory used for number formatting.)-.15 E F3(LINES)108 636 Q F0 1.218
+(Used by the)5.99 F F3(select)3.718 E F0 -.2(bu)3.718 G 1.219(iltin com\
+mand to determine the column length for printing selection lists.).2 F
+(Automatically set upon receipt of a)144 648 Q F1(SIGWINCH)2.5 E F2(.)A
+F3(MAIL)108 660 Q F0 .188
+(If this parameter is set to a \214le name and the)8.78 F F1(MAILP)2.687
+E -.855(AT)-.666 G(H).855 E F0 -.25(va)2.437 G .187(riable is not set,)
+.25 F F3(bash)2.687 E F0 .187(informs the user)2.687 F(of the arri)144
+672 Q -.25(va)-.25 G 2.5(lo).25 G 2.5(fm)-2.5 G
+(ail in the speci\214ed \214le.)-2.5 E F3(MAILCHECK)108 684 Q F0 .098
+(Speci\214es ho)144 696 R 2.598(wo)-.25 G .098(ften \(in seconds\))
+-2.598 F F3(bash)2.598 E F0 .098(checks for mail.)2.598 F .098(The def)
+5.098 F .098(ault is 60 seconds.)-.1 F .099(When it is time)5.099 F .224
+(to check for mail, the shell does so before displaying the primary pro\
+mpt.)144 708 R .223(If this v)5.223 F .223(ariable is unset,)-.25 F .066
+(or set to a v)144 720 R .066(alue that is not a number greater than or\
+ equal to zero, the shell disables mail checking.)-.25 F(GNU Bash-4.1)72
+768 Q(2009 December 29)135.965 E(14)185.955 E 0 Cg EP
+%%Page: 15 15
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(MAILP)108 84 Q -.95(AT)-.74 G(H).95 E F0
+2.815(Ac)144 96 S .314(olon-separated list of \214le names to be check)
+-2.815 F .314(ed for mail.)-.1 F .314
+(The message to be printed when mail)5.314 F(arri)144 108 Q -.15(ve)-.25
+G 3.42(si).15 G 3.42(nap)-3.42 G .92(articular \214le may be speci\214e\
+d by separating the \214le name from the message with a)-3.42 F 2.808
+(`?'. When)144 120 R .308(used in the te)2.808 F .308
+(xt of the message,)-.15 F F1($_)2.808 E F0 -.15(ex)2.808 G .308
+(pands to the name of the current mail\214le.).15 F(Exam-)5.307 E(ple:)
+144 132 Q F1(MAILP)144 144 Q -.95(AT)-.74 G(H).95 E F0(=\010/v)A
+(ar/mail/bfox?"Y)-.25 E(ou ha)-1.1 E .3 -.15(ve m)-.2 H
+(ail":~/shell\255mail?"$_ has mail!"\010).15 E F1(Bash)144 156 Q F0 .388
+(supplies a def)2.888 F .388(ault v)-.1 F .388(alue for this v)-.25 F
+.388(ariable, b)-.25 F .389
+(ut the location of the user mail \214les that it uses is)-.2 F
+(system dependent \(e.g., /v)144 168 Q(ar/mail/)-.25 E F1($USER)A F0
+(\).)A F1(OPTERR)108 180 Q F0 .39(If set to the v)144 192 R .39(alue 1,)
+-.25 F F1(bash)2.89 E F0 .389(displays error messages generated by the)
+2.889 F F1(getopts)2.889 E F0 -.2(bu)2.889 G .389(iltin command \(see).2
+F/F2 9/Times-Bold@0 SF .359(SHELL B)144 204 R(UIL)-.09 E .359
+(TIN COMMANDS)-.828 F F0(belo)2.609 E(w\).)-.25 E F2(OPTERR)5.359 E F0
+.36(is initialized to 1 each time the shell is in)2.609 F -.2(vo)-.4 G
+-.1(ke).2 G(d).1 E(or a shell script is e)144 216 Q -.15(xe)-.15 G
+(cuted.).15 E F1 -.74(PA)108 228 S(TH)-.21 E F0 .588
+(The search path for commands.)9.91 F .587
+(It is a colon-separated list of directories in which the shell looks)
+5.588 F .471(for commands \(see)144 240 R F2 .471(COMMAND EXECUTION)
+2.971 F F0(belo)2.722 E 2.972(w\). A)-.25 F .472
+(zero-length \(null\) directory name in the)2.972 F -.25(va)144 252 S
+.536(lue of).25 F F2 -.666(PA)3.036 G(TH)-.189 E F0 .535
+(indicates the current directory)2.786 F 5.535(.A)-.65 G .535
+(null directory name may appear as tw)-2.5 F 3.035(oa)-.1 G(djacent)
+-3.035 E .867(colons, or as an initial or trailing colon.)144 264 R .868
+(The def)5.868 F .868(ault path is system-dependent, and is set by the)
+-.1 F 26.329(administrator who installs)144 276 R F1(bash)28.829 E F0
+31.329(.A)C 26.328(common v)-2.501 F 26.328(alue is)-.25 F/F3 10
+/Courier@0 SF(/usr/gnu/bin:/usr/local/bin:/usr/ucb:/bin:/usr/bin)144 288
+Q F0(.)A F1(POSIXL)108 300 Q(Y_CORRECT)-.92 E F0 .471(If this v)144 312
+R .471(ariable is in the en)-.25 F .471(vironment when)-.4 F F1(bash)
+2.971 E F0 .471(starts, the shell enters)2.971 F/F4 10/Times-Italic@0 SF
+.472(posix mode)2.972 F F0 .472(before reading)2.972 F .011
+(the startup \214les, as if the)144 324 R F1(\255\255posix)2.511 E F0
+(in)2.511 E -.2(vo)-.4 G .011(cation option had been supplied.).2 F .011
+(If it is set while the shell is)5.011 F(running,)144 336 Q F1(bash)2.5
+E F0(enables)2.5 E F4(posix mode)2.5 E F0 2.5(,a)C 2.5(si)-2.5 G 2.5(ft)
+-2.5 G(he command)-2.5 E F3(set -o posix)2.5 E F0(had been e)2.5 E -.15
+(xe)-.15 G(cuted.).15 E F1(PR)108 348 Q(OMPT_COMMAND)-.3 E F0
+(If set, the v)144 360 Q(alue is e)-.25 E -.15(xe)-.15 G
+(cuted as a command prior to issuing each primary prompt.).15 E F1(PR)
+108 372 Q(OMPT_DIR)-.3 E(TRIM)-.4 E F0 .676
+(If set to a number greater than zero, the v)144 384 R .676
+(alue is used as the number of trailing directory compo-)-.25 F .923
+(nents to retain when e)144 396 R .923(xpanding the)-.15 F F1(\\w)3.423
+E F0(and)3.423 E F1(\\W)3.423 E F0 .923(prompt string escapes \(see)
+3.423 F F2(PR)3.423 E(OMPTING)-.27 E F0(belo)3.173 E(w\).)-.25 E
+(Characters remo)144 408 Q -.15(ve)-.15 G 2.5(da).15 G
+(re replaced with an ellipsis.)-2.5 E F1(PS1)108 420 Q F0 .064(The v)
+19.33 F .065(alue of this parameter is e)-.25 F .065(xpanded \(see)-.15
+F F2(PR)2.565 E(OMPTING)-.27 E F0(belo)2.315 E .065
+(w\) and used as the primary prompt)-.25 F 2.5(string. The)144 432 R
+(def)2.5 E(ault v)-.1 E(alue is `)-.25 E(`)-.74 E F1(\\s\255\\v\\$)A F0
+-.74('')2.5 G(.).74 E F1(PS2)108 444 Q F0 .118(The v)19.33 F .118
+(alue of this parameter is e)-.25 F .118(xpanded as with)-.15 F F2(PS1)
+2.617 E F0 .117(and used as the secondary prompt string.)2.367 F(The)
+5.117 E(def)144 456 Q(ault is `)-.1 E(`)-.74 E F1(>)A F0 -.74('')2.5 G
+(.).74 E F1(PS3)108 468 Q F0 1.115(The v)19.33 F 1.115
+(alue of this parameter is used as the prompt for the)-.25 F F1(select)
+3.615 E F0 1.116(command \(see)3.616 F F2 1.116(SHELL GRAM-)3.616 F(MAR)
+144 480 Q F0(abo)2.25 E -.15(ve)-.15 G(\).).15 E F1(PS4)108 492 Q F0
+.101(The v)19.33 F .101(alue of this parameter is e)-.25 F .101
+(xpanded as with)-.15 F F2(PS1)2.6 E F0 .1(and the v)2.35 F .1
+(alue is printed before each command)-.25 F F1(bash)144 504 Q F0 .291
+(displays during an e)2.791 F -.15(xe)-.15 G .292(cution trace.).15 F
+.292(The \214rst character of)5.292 F F2(PS4)2.792 E F0 .292
+(is replicated multiple times, as)2.542 F(necessary)144 516 Q 2.5(,t)
+-.65 G 2.5(oi)-2.5 G(ndicate multiple le)-2.5 E -.15(ve)-.25 G
+(ls of indirection.).15 E(The def)5 E(ault is `)-.1 E(`)-.74 E F1(+)A F0
+-.74('')2.5 G(.).74 E F1(SHELL)108 528 Q F0 .664
+(The full pathname to the shell is k)144 540 R .664(ept in this en)-.1 F
+.664(vironment v)-.4 F 3.164(ariable. If)-.25 F .663
+(it is not set when the shell)3.164 F(starts,)144 552 Q F1(bash)2.5 E F0
+(assigns to it the full pathname of the current user')2.5 E 2.5(sl)-.55
+G(ogin shell.)-2.5 E F1(TIMEFORMA)108 564 Q(T)-.95 E F0 .826(The v)144
+576 R .826
+(alue of this parameter is used as a format string specifying ho)-.25 F
+3.327(wt)-.25 G .827(he timing information for)-3.327 F .649
+(pipelines pre\214x)144 588 R .649(ed with the)-.15 F F1(time)3.149 E F0
+(reserv)3.149 E .649(ed w)-.15 F .648(ord should be displayed.)-.1 F
+(The)5.648 E F1(%)3.148 E F0 .648(character introduces)3.148 F .711
+(an escape sequence that is e)144 600 R .711(xpanded to a time v)-.15 F
+.712(alue or other information.)-.25 F .712(The escape sequences)5.712 F
+(and their meanings are as follo)144 612 Q
+(ws; the braces denote optional portions.)-.25 E F1(%%)144 630 Q F0 2.5
+(Al)30 G(iteral)-2.5 E F1(%)2.5 E F0(.)A F1(%[)144 642 Q F4(p)A F1
+(][l]R)A F0(The elapsed time in seconds.)11.68 E F1(%[)144 654 Q F4(p)A
+F1(][l]U)A F0(The number of CPU seconds spent in user mode.)11.68 E F1
+(%[)144 666 Q F4(p)A F1(][l]S)A F0
+(The number of CPU seconds spent in system mode.)13.34 E F1(%P)144 678 Q
+F0(The CPU percentage, computed as \(%U + %S\) / %R.)33.89 E .87
+(The optional)144 694.8 R F4(p)3.37 E F0 .87(is a digit specifying the)
+3.37 F F4(pr)3.37 E(ecision)-.37 E F0 3.37(,t)C .87
+(he number of fractional digits after a decimal)-3.37 F 2.525(point. A)
+144 706.8 R -.25(va)2.525 G .025
+(lue of 0 causes no decimal point or fraction to be output.).25 F .026
+(At most three places after the)5.025 F .538
+(decimal point may be speci\214ed; v)144 718.8 R .538(alues of)-.25 F F4
+(p)3.038 E F0 .537(greater than 3 are changed to 3.)3.037 F(If)5.537 E
+F4(p)3.037 E F0 .537(is not speci\214ed,)3.037 F(the v)144 730.8 Q
+(alue 3 is used.)-.25 E(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E
+(15)185.955 E 0 Cg EP
+%%Page: 16 16
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E .667(The optional)144 84 R/F1 10/Times-Bold@0 SF(l)3.167 E F0
+.668(speci\214es a longer format, including minutes, of the form)3.168 F
+/F2 10/Times-Italic@0 SF(MM)3.168 E F0(m)A F2(SS)A F0(.)A F2(FF)A F0
+3.168(s. The)B -.25(va)3.168 G(lue).25 E(of)144 96 Q F2(p)2.5 E F0
+(determines whether or not the fraction is included.)2.5 E .001
+(If this v)144 112.8 R .001(ariable is not set,)-.25 F F1(bash)2.501 E
+F0 .001(acts as if it had the v)2.501 F(alue)-.25 E F1($\010\\nr)2.5 E
+(eal\\t%3lR\\nuser\\t%3lU\\nsys%3lS\010)-.18 E F0(.)A .494(If the v)144
+124.8 R .494(alue is null, no timing information is displayed.)-.25 F
+2.994(At)5.494 G .494(railing ne)-2.994 F .494
+(wline is added when the for)-.25 F(-)-.2 E(mat string is displayed.)144
+136.8 Q F1(TMOUT)108 153.6 Q F0 .941(If set to a v)144 165.6 R .941
+(alue greater than zero,)-.25 F/F3 9/Times-Bold@0 SF(TMOUT)3.441 E F0
+.941(is treated as the def)3.191 F .941(ault timeout for the)-.1 F F1
+-.18(re)3.441 G(ad).18 E F0 -.2(bu)3.441 G(iltin.).2 E(The)144 177.6 Q
+F1(select)2.81 E F0 .31(command terminates if input does not arri)2.81 F
+.611 -.15(ve a)-.25 H(fter).15 E F3(TMOUT)2.811 E F0 .311
+(seconds when input is com-)2.561 F .886(ing from a terminal.)144 189.6
+R .886(In an interacti)5.886 F 1.185 -.15(ve s)-.25 H .885(hell, the v)
+.15 F .885(alue is interpreted as the number of seconds to)-.25 F -.1
+(wa)144 201.6 S .546(it for input after issuing the primary prompt.).1 F
+F1(Bash)5.546 E F0 .546(terminates after w)3.046 F .546
+(aiting for that number of)-.1 F(seconds if input does not arri)144
+213.6 Q -.15(ve)-.25 G(.).15 E F1(TMPDIR)108 230.4 Q F0 .274(If set,)144
+242.4 R F1(Bash)2.774 E F0 .274(uses its v)2.774 F .274
+(alue as the name of a directory in which)-.25 F F1(Bash)2.773 E F0 .273
+(creates temporary \214les for the)2.773 F(shell')144 254.4 Q 2.5(su)
+-.55 G(se.)-2.5 E F1(auto_r)108 271.2 Q(esume)-.18 E F0 .53(This v)144
+283.2 R .53(ariable controls ho)-.25 F 3.03(wt)-.25 G .531
+(he shell interacts with the user and job control.)-3.03 F .531
+(If this v)5.531 F .531(ariable is set,)-.25 F .539(single w)144 295.2 R
+.538(ord simple commands without redirections are treated as candidates\
+ for resumption of an)-.1 F -.15(ex)144 307.2 S .366(isting stopped job)
+.15 F 5.366(.T)-.4 G .366(here is no ambiguity allo)-5.366 F .366
+(wed; if there is more than one job be)-.25 F .367(ginning with)-.15 F
+1.125(the string typed, the job most recently accessed is selected.)144
+319.2 R(The)6.125 E F2(name)3.985 E F0 1.124(of a stopped job, in this)
+3.805 F(conte)144 331.2 Q 1.132
+(xt, is the command line used to start it.)-.15 F 1.133(If set to the v)
+6.133 F(alue)-.25 E F2 -.2(ex)3.633 G(act).2 E F0 3.633(,t).68 G 1.133
+(he string supplied must)-3.633 F .625
+(match the name of a stopped job e)144 343.2 R .624(xactly; if set to)
+-.15 F F2(substring)3.124 E F0 3.124(,t).22 G .624
+(he string supplied needs to match a)-3.124 F .884
+(substring of the name of a stopped job)144 355.2 R 5.884(.T)-.4 G(he)
+-5.884 E F2(substring)3.724 E F0 -.25(va)3.604 G .885(lue pro).25 F .885
+(vides functionality analogous to)-.15 F(the)144 367.2 Q F1(%?)3.334 E
+F0 .834(job identi\214er \(see)5.834 F F3 .834(JOB CONTR)3.334 F(OL)-.27
+E F0(belo)3.084 E 3.334(w\). If)-.25 F .834(set to an)3.334 F 3.334(yo)
+-.15 G .834(ther v)-3.334 F .833(alue, the supplied string)-.25 F .315
+(must be a pre\214x of a stopped job')144 379.2 R 2.816(sn)-.55 G .316
+(ame; this pro)-2.816 F .316(vides functionality analogous to the)-.15 F
+F1(%)2.816 E F2(string)A F0(job)2.816 E(identi\214er)144 391.2 Q(.)-.55
+E F1(histchars)108 408 Q F0 2.07(The tw)144 420 R 4.57(oo)-.1 G 4.57(rt)
+-4.57 G 2.07(hree characters which control history e)-4.57 F 2.07
+(xpansion and tok)-.15 F 2.07(enization \(see)-.1 F F3(HIST)4.569 E(OR)
+-.162 E(Y)-.315 E(EXP)144 432 Q(ANSION)-.666 E F0(belo)3.465 E 3.715
+(w\). The)-.25 F 1.215(\214rst character is the)3.715 F F2 1.216
+(history e)3.715 F(xpansion)-.2 E F0(character)3.716 E 3.716(,t)-.4 G
+1.216(he character which)-3.716 F .798(signals the start of a history e)
+144 444 R .798(xpansion, normally `)-.15 F F1(!)A F0 3.298('. The)B .798
+(second character is the)3.298 F F2(quic)3.298 E 3.298(ks)-.2 G
+(ubstitu-)-3.298 E(tion)144 456 Q F0(character)2.739 E 2.739(,w)-.4 G
+.239(hich is used as shorthand for re-running the pre)-2.739 F .24
+(vious command entered, substitut-)-.25 F .576
+(ing one string for another in the command.)144 468 R .575(The def)5.575
+F .575(ault is `)-.1 F F1(^)A F0 3.075('. The)B .575
+(optional third character is the)3.075 F .223(character which indicates\
+ that the remainder of the line is a comment when found as the \214rst \
+char)144 480 R(-)-.2 E 1.294(acter of a w)144 492 R 1.294
+(ord, normally `)-.1 F F1(#)A F0 3.794('. The)B 1.293
+(history comment character causes history substitution to be)3.794 F
+.379(skipped for the remaining w)144 504 R .379(ords on the line.)-.1 F
+.38(It does not necessarily cause the shell parser to treat)5.379 F
+(the rest of the line as a comment.)144 516 Q F1(Arrays)87 532.8 Q(Bash)
+108 544.8 Q F0(pro)3.391 E .891(vides one-dimensional inde)-.15 F -.15
+(xe)-.15 G 3.391(da).15 G .891(nd associati)-3.391 F 1.191 -.15(ve a)
+-.25 H .891(rray v).15 F 3.391(ariables. An)-.25 F 3.391(yv)-.15 G .89
+(ariable may be used as an)-3.641 F(inde)108 556.8 Q -.15(xe)-.15 G
+2.573(da).15 G .073(rray; the)-2.573 F F1(declar)2.573 E(e)-.18 E F0 -.2
+(bu)2.573 G .073(iltin will e).2 F .073(xplicitly declare an array)-.15
+F 5.073(.T)-.65 G .074(here is no maximum limit on the size of)-5.073 F
+.329(an array)108 568.8 R 2.829(,n)-.65 G .329(or an)-2.829 F 2.829(yr)
+-.15 G .329(equirement that members be inde)-2.829 F -.15(xe)-.15 G
+2.829(do).15 G 2.829(ra)-2.829 G .328(ssigned contiguously)-2.829 F
+5.328(.I)-.65 G(nde)-5.328 E -.15(xe)-.15 G 2.828(da).15 G .328
+(rrays are refer)-2.828 F(-)-.2 E 1.386(enced using inte)108 580.8 R
+1.386(gers \(including arithmetic e)-.15 F 3.887(xpressions\) and)-.15 F
+1.387(are zero-based; associati)3.887 F 1.687 -.15(ve a)-.25 H 1.387
+(rrays are refer).15 F(-)-.2 E(enced using arbitrary strings.)108 592.8
+Q 2.463(An inde)108 609.6 R -.15(xe)-.15 G 4.963(da).15 G 2.463
+(rray is created automatically if an)-4.963 F 4.963(yv)-.15 G 2.462
+(ariable is assigned to using the syntax)-5.213 F F2(name)4.962 E F0([)A
+F2(sub-)A(script)108 621.6 Q F0(]=)A F2(value)A F0 5.682(.T)C(he)-5.682
+E F2(subscript)3.522 E F0 .682(is treated as an arithmetic e)3.862 F
+.682(xpression that must e)-.15 F -.25(va)-.25 G .682
+(luate to a number greater).25 F .75(than or equal to zero.)108 633.6 R
+2.349 -.8(To e)5.749 H .749(xplicitly declare an inde).65 F -.15(xe)-.15
+G 3.249(da).15 G(rray)-3.249 E 3.249(,u)-.65 G(se)-3.249 E F1(declar)
+3.249 E 3.249<65ad>-.18 G(a)-3.249 E F2(name)3.249 E F0(\(see)3.249 E F3
+.749(SHELL B)3.249 F(UIL)-.09 E(TIN)-.828 E(COMMANDS)108 645.6 Q F0
+(belo)2.25 E(w\).)-.25 E F1(declar)5 E 2.5<65ad>-.18 G(a)-2.5 E F2(name)
+2.5 E F1([)A F2(subscript)A F1(])A F0(is also accepted; the)2.5 E F2
+(subscript)2.5 E F0(is ignored.)2.5 E(Associati)108 662.4 Q .3 -.15
+(ve a)-.25 H(rrays are created using).15 E F1(declar)2.5 E 2.5<65ad>-.18
+G(A)-2.5 E F2(name)2.5 E F0(.)A(Attrib)108 679.2 Q .94
+(utes may be speci\214ed for an array v)-.2 F .941(ariable using the)
+-.25 F F1(declar)3.441 E(e)-.18 E F0(and)3.441 E F1 -.18(re)3.441 G
+(adonly).18 E F0 -.2(bu)3.441 G 3.441(iltins. Each).2 F(attrib)3.441 E
+(ute)-.2 E(applies to all members of an array)108 691.2 Q(.)-.65 E 1.647
+(Arrays are assigned to using compound assignments of the form)108 708 R
+F2(name)4.147 E F0(=)A F1(\()A F0 -.25(va)C(lue).25 E F2(1)A F0 1.647
+(... v)4.147 F(alue)-.25 E F2(n)A F1(\))A F0 4.147(,w)C 1.647(here each)
+-4.147 F F2(value)108 720 Q F0 .122(is of the form [)2.622 F F2
+(subscript)A F0(]=)A F2(string)A F0 5.122(.I)C(nde)-5.122 E -.15(xe)-.15
+G 2.622(da).15 G .122(rray assignments do not require the brack)-2.622 F
+.122(et and subscript.)-.1 F(GNU Bash-4.1)72 768 Q(2009 December 29)
+135.965 E(16)185.955 E 0 Cg EP
+%%Page: 17 17
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E .164(When assigning to inde)108 84 R -.15(xe)-.15 G 2.663(da).15
+G .163(rrays, if the optional brack)-2.663 F .163
+(ets and subscript are supplied, that inde)-.1 F 2.663(xi)-.15 G 2.663
+(sa)-2.663 G(ssigned)-2.663 E 1.41(to; otherwise the inde)108 96 R 3.91
+(xo)-.15 G 3.91(ft)-3.91 G 1.41(he element assigned is the last inde)
+-3.91 F 3.911(xa)-.15 G 1.411(ssigned to by the statement plus one.)
+-3.911 F(Inde)108 108 Q(xing starts at zero.)-.15 E
+(When assigning to an associati)108 124.8 Q .3 -.15(ve a)-.25 H(rray).15
+E 2.5(,t)-.65 G(he subscript is required.)-2.5 E .24
+(This syntax is also accepted by the)108 141.6 R/F1 10/Times-Bold@0 SF
+(declar)2.74 E(e)-.18 E F0 -.2(bu)2.739 G 2.739(iltin. Indi).2 F .239
+(vidual array elements may be assigned to using the)-.25 F/F2 10
+/Times-Italic@0 SF(name)108 153.6 Q F0([)A F2(subscript)A F0(]=)A F2
+(value)A F0(syntax introduced abo)2.5 E -.15(ve)-.15 G(.).15 E(An)108
+170.4 Q 3.575(ye)-.15 G 1.075
+(lement of an array may be referenced using ${)-3.575 F F2(name)A F0([)A
+F2(subscript)A F0 3.575(]}. The)B 1.076(braces are required to a)3.576 F
+-.2(vo)-.2 G(id).2 E 1.542(con\215icts with pathname e)108 182.4 R 4.041
+(xpansion. If)-.15 F F2(subscript)4.041 E F0(is)4.041 E F1(@)4.041 E F0
+(or)4.041 E F1(*)4.041 E F0 4.041(,t)C 1.541(he w)-4.041 F 1.541(ord e)
+-.1 F 1.541(xpands to all members of)-.15 F F2(name)4.041 E F0(.)A 1.056
+(These subscripts dif)108 194.4 R 1.056(fer only when the w)-.25 F 1.057
+(ord appears within double quotes.)-.1 F 1.057(If the w)6.057 F 1.057
+(ord is double-quoted,)-.1 F(${)108 206.4 Q F2(name)A F0 .521([*]} e)B
+.521(xpands to a single w)-.15 F .521(ord with the v)-.1 F .52
+(alue of each array member separated by the \214rst character)-.25 F
+1.374(of the)108 218.4 R/F3 9/Times-Bold@0 SF(IFS)3.874 E F0 1.374
+(special v)3.624 F 1.375(ariable, and ${)-.25 F F2(name)A F0 1.375
+([@]} e)B 1.375(xpands each element of)-.15 F F2(name)3.875 E F0 1.375
+(to a separate w)3.875 F 3.875(ord. When)-.1 F 2.028
+(there are no array members, ${)108 230.4 R F2(name)A F0 2.028([@]} e)B
+2.028(xpands to nothing.)-.15 F 2.027(If the double-quoted e)7.028 F
+2.027(xpansion occurs)-.15 F .758(within a w)108 242.4 R .759
+(ord, the e)-.1 F .759
+(xpansion of the \214rst parameter is joined with the be)-.15 F .759
+(ginning part of the original w)-.15 F(ord,)-.1 E .516(and the e)108
+254.4 R .516(xpansion of the last parameter is joined with the last par\
+t of the original w)-.15 F 3.015(ord. This)-.1 F .515(is analogous)3.015
+F .227(to the e)108 266.4 R .228(xpansion of the special parameters)-.15
+F F1(*)2.728 E F0(and)2.728 E F1(@)2.728 E F0(\(see)2.728 E F1 .228
+(Special P)2.728 F(arameters)-.1 E F0(abo)2.728 E -.15(ve)-.15 G 2.728
+(\). ${#).15 F F2(name)A F0([)A F2(subscript)A F0(]})A -.15(ex)108 278.4
+S .886(pands to the length of ${).15 F F2(name)A F0([)A F2(subscript)A
+F0 3.386(]}. If)B F2(subscript)3.386 E F0(is)3.386 E F1(*)3.386 E F0(or)
+3.386 E F1(@)3.386 E F0 3.386(,t)C .886(he e)-3.386 F .886
+(xpansion is the number of ele-)-.15 F .462(ments in the array)108 290.4
+R 5.462(.R)-.65 G .462(eferencing an array v)-5.462 F .463
+(ariable without a subscript is equi)-.25 F -.25(va)-.25 G .463
+(lent to referencing the array).25 F(with a subscript of 0.)108 302.4 Q
+.168(An array v)108 319.2 R .168
+(ariable is considered set if a subscript has been assigned a v)-.25 F
+2.668(alue. The)-.25 F .168(null string is a v)2.668 F .168(alid v)-.25
+F(alue.)-.25 E(The)108 336 Q F1(unset)2.766 E F0 -.2(bu)2.766 G .267
+(iltin is used to destro).2 F 2.767(ya)-.1 G(rrays.)-2.767 E F1(unset)
+5.267 E F2(name)2.767 E F0([)A F2(subscript)A F0 2.767(]d)C(estro)-2.767
+E .267(ys the array element at inde)-.1 F(x)-.15 E F2(sub-)2.767 E
+(script)108 348 Q F0 6.205(.C)C 1.205(are must be tak)-6.205 F 1.205
+(en to a)-.1 F -.2(vo)-.2 G 1.205(id unw).2 F 1.205(anted side ef)-.1 F
+1.204(fects caused by pathname e)-.25 F(xpansion.)-.15 E F1(unset)6.204
+E F2(name)3.704 E F0(,)A(where)108 360 Q F2(name)2.5 E F0(is an array)
+2.5 E 2.5(,o)-.65 G(r)-2.5 E F1(unset)2.5 E F2(name)2.5 E F0([)A F2
+(subscript)A F0(], where)A F2(subscript)2.5 E F0(is)2.5 E F1(*)2.5 E F0
+(or)2.5 E F1(@)2.5 E F0 2.5(,r)C(emo)-2.5 E -.15(ve)-.15 G 2.5(st).15 G
+(he entire array)-2.5 E(.)-.65 E(The)108 376.8 Q F1(declar)3.573 E(e)
+-.18 E F0(,)A F1(local)3.573 E F0 3.573(,a)C(nd)-3.573 E F1 -.18(re)
+3.573 G(adonly).18 E F0 -.2(bu)3.573 G 1.073(iltins each accept a).2 F
+F1<ad61>3.573 E F0 1.073(option to specify an inde)3.573 F -.15(xe)-.15
+G 3.574(da).15 G 1.074(rray and a)-3.574 F F1<ad41>3.574 E F0 .752
+(option to specify an associati)108 388.8 R 1.052 -.15(ve a)-.25 H(rray)
+.15 E 5.752(.T)-.65 G(he)-5.752 E F1 -.18(re)3.252 G(ad).18 E F0 -.2(bu)
+3.252 G .752(iltin accepts a).2 F F1<ad61>3.252 E F0 .751
+(option to assign a list of w)3.251 F .751(ords read)-.1 F .502
+(from the standard input to an array)108 400.8 R 5.502(.T)-.65 G(he)
+-5.502 E F1(set)3.002 E F0(and)3.002 E F1(declar)3.002 E(e)-.18 E F0 -.2
+(bu)3.002 G .502(iltins display array v).2 F .502(alues in a w)-.25 F
+.503(ay that allo)-.1 F(ws)-.25 E(them to be reused as assignments.)108
+412.8 Q/F4 10.95/Times-Bold@0 SF(EXP)72 429.6 Q(ANSION)-.81 E F0 .76(Ex\
+pansion is performed on the command line after it has been split into w)
+108 441.6 R 3.26(ords. There)-.1 F .76(are se)3.26 F -.15(ve)-.25 G 3.26
+(nk).15 G .76(inds of)-3.26 F -.15(ex)108 453.6 S .369
+(pansion performed:).15 F F2(br)2.869 E .369(ace e)-.15 F(xpansion)-.2 E
+F0(,).24 E F2 .369(tilde e)2.869 F(xpansion)-.2 E F0(,).24 E F2(par)
+2.869 E .369(ameter and variable e)-.15 F(xpansion)-.2 E F0(,).24 E F2
+.37(command sub-)2.869 F(stitution)108 465.6 Q F0(,).24 E F2
+(arithmetic e)2.5 E(xpansion)-.2 E F0(,).24 E F2(wor)2.5 E 2.5(ds)-.37 G
+(plitting)-2.5 E F0 2.5(,a).22 G(nd)-2.5 E F2(pathname e)2.5 E(xpansion)
+-.2 E F0(.).24 E .471(The order of e)108 482.4 R .471
+(xpansions is: brace e)-.15 F .471(xpansion, tilde e)-.15 F .471
+(xpansion, parameter)-.15 F 2.971(,v)-.4 G .47(ariable and arithmetic e)
+-3.221 F(xpansion)-.15 E
+(and command substitution \(done in a left-to-right f)108 494.4 Q
+(ashion\), w)-.1 E(ord splitting, and pathname e)-.1 E(xpansion.)-.15 E
+(On systems that can support it, there is an additional e)108 511.2 Q
+(xpansion a)-.15 E -.25(va)-.2 G(ilable:).25 E F2(pr)2.5 E
+(ocess substitution)-.45 E F0(.)A 1.486(Only brace e)108 528 R 1.486
+(xpansion, w)-.15 F 1.486(ord splitting, and pathname e)-.1 F 1.487
+(xpansion can change the number of w)-.15 F 1.487(ords of the)-.1 F -.15
+(ex)108 540 S 1.165(pansion; other e).15 F 1.165(xpansions e)-.15 F
+1.165(xpand a single w)-.15 F 1.165(ord to a single w)-.1 F 3.665
+(ord. The)-.1 F 1.164(only e)3.665 F 1.164(xceptions to this are the)
+-.15 F -.15(ex)108 552 S(pansions of ").15 E F1($@)A F0 2.5("a)C(nd ")
+-2.5 E F1(${)A F2(name)A F1([@]})A F0 2.5("a)C 2.5(se)-2.5 G
+(xplained abo)-2.65 E .3 -.15(ve \()-.15 H(see).15 E F3 -.666(PA)2.5 G
+(RAMETERS).666 E/F5 9/Times-Roman@0 SF(\).)A F1(Brace Expansion)87 568.8
+Q F2(Br)108.58 580.8 Q .606(ace e)-.15 F(xpansion)-.2 E F0 .606
+(is a mechanism by which arbitrary strings may be generated.)3.346 F
+.606(This mechanism is similar)5.606 F(to)108 592.8 Q F2 .415
+(pathname e)2.915 F(xpansion)-.2 E F0 2.915(,b)C .415
+(ut the \214lenames generated need not e)-3.115 F 2.915(xist. P)-.15 F
+.415(atterns to be brace e)-.15 F .415(xpanded tak)-.15 F 2.915(et)-.1 G
+(he)-2.915 E .151(form of an optional)108 604.8 R F2(pr)2.651 E(eamble)
+-.37 E F0 2.651(,f).18 G(ollo)-2.651 E .151
+(wed by either a series of comma-separated strings or a sequence e)-.25
+F(xpres-)-.15 E .563(sion between a pair of braces, follo)108 616.8 R
+.563(wed by an optional)-.25 F F2(postscript)3.063 E F0 5.563(.T).68 G
+.563(he preamble is pre\214x)-5.563 F .563(ed to each string)-.15 F .659
+(contained within the braces, and the postscript is then appended to ea\
+ch resulting string, e)108 628.8 R .659(xpanding left to)-.15 F(right.)
+108 640.8 Q .719(Brace e)108 657.6 R .719(xpansions may be nested.)-.15
+F .719(The results of each e)5.719 F .719
+(xpanded string are not sorted; left to right order is)-.15 F(preserv)
+108 669.6 Q 2.5(ed. F)-.15 F(or e)-.15 E(xample, a)-.15 E F1({)A F0
+(d,c,b)A F1(})A F0 2.5(ee)C(xpands into `ade ace abe'.)-2.65 E 3.242(As)
+108 686.4 S .742(equence e)-3.242 F .742(xpression tak)-.15 F .742
+(es the form)-.1 F F1({)3.242 E F2(x)A F1(..)A F2(y)A F1([..)A F2(incr)A
+F1(]})A F0 3.242(,w)C(here)-3.242 E F2(x)3.242 E F0(and)3.243 E F2(y)
+3.243 E F0 .743(are either inte)3.243 F .743(gers or single characters,)
+-.15 F(and)108 698.4 Q F2(incr)3.032 E F0 3.032(,a)C 3.032(no)-3.032 G
+.532(ptional increment, is an inte)-3.032 F(ger)-.15 E 5.532(.W)-.55 G
+.532(hen inte)-5.532 F .532(gers are supplied, the e)-.15 F .532
+(xpression e)-.15 F .531(xpands to each)-.15 F .077(number between)108
+710.4 R F2(x)2.577 E F0(and)2.577 E F2(y)2.577 E F0 2.577(,i)C(nclusi)
+-2.577 E -.15(ve)-.25 G 5.077(.S).15 G .077(upplied inte)-5.077 F .077
+(gers may be pre\214x)-.15 F .077(ed with)-.15 F F2(0)2.577 E F0 .078
+(to force each term to ha)2.578 F .378 -.15(ve t)-.2 H(he).15 E .015
+(same width.)108 722.4 R .015(When either)5.015 F F2(x)2.515 E F0(or)
+2.515 E F2(y)2.515 E F0(be)2.515 E .014(gins with a zero, the shell att\
+empts to force all generated terms to contain)-.15 F(GNU Bash-4.1)72 768
+Q(2009 December 29)135.965 E(17)185.955 E 0 Cg EP
+%%Page: 18 18
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E 1.143(the same number of digits, zero-padding where necessary)108
+84 R 6.143(.W)-.65 G 1.143(hen characters are supplied, the e)-6.143 F
+(xpression)-.15 E -.15(ex)108 96 S .542(pands to each character le).15 F
+.542(xicographically between)-.15 F/F1 10/Times-Italic@0 SF(x)3.042 E F0
+(and)3.042 E F1(y)3.042 E F0 3.042(,i)C(nclusi)-3.042 E -.15(ve)-.25 G
+5.542(.N).15 G .542(ote that both)-5.542 F F1(x)3.041 E F0(and)3.041 E
+F1(y)3.041 E F0 .541(must be of)3.041 F .182(the same type.)108 108 R
+.182(When the increment is supplied, it is used as the dif)5.182 F .183
+(ference between each term.)-.25 F .183(The def)5.183 F(ault)-.1 E
+(increment is 1 or -1 as appropriate.)108 120 Q .582(Brace e)108 136.8 R
+.582(xpansion is performed before an)-.15 F 3.082(yo)-.15 G .581(ther e)
+-3.082 F .581(xpansions, and an)-.15 F 3.081(yc)-.15 G .581
+(haracters special to other e)-3.081 F(xpansions)-.15 E .015
+(are preserv)108 148.8 R .015(ed in the result.)-.15 F .015
+(It is strictly te)5.015 F(xtual.)-.15 E/F2 10/Times-Bold@0 SF(Bash)
+5.016 E F0 .016(does not apply an)2.516 F 2.516(ys)-.15 G .016
+(yntactic interpretation to the con-)-2.516 F(te)108 160.8 Q
+(xt of the e)-.15 E(xpansion or the te)-.15 E(xt between the braces.)
+-.15 E 3.633(Ac)108 177.6 S 1.133(orrectly-formed brace e)-3.633 F 1.132
+(xpansion must contain unquoted opening and closing braces, and at leas\
+t one)-.15 F 3.44(unquoted comma or a v)108 189.6 R 3.441
+(alid sequence e)-.25 F 5.941(xpression. An)-.15 F 5.941(yi)-.15 G 3.441
+(ncorrectly formed brace e)-5.941 F 3.441(xpansion is left)-.15 F 2.755
+(unchanged. A)108 201.6 R F2({)2.755 E F0(or)2.755 E F2(,)2.755 E F0
+.255(may be quoted with a backslash to pre)2.755 F -.15(ve)-.25 G .255
+(nt its being considered part of a brace e).15 F(xpres-)-.15 E 2.91
+(sion. T)108 213.6 R 2.91(oa)-.8 G -.2(vo)-3.11 G .41
+(id con\215icts with parameter e).2 F .411(xpansion, the string)-.15 F
+F2(${)2.911 E F0 .411(is not considered eligible for brace e)2.911 F
+(xpan-)-.15 E(sion.)108 225.6 Q 1.476(This construct is typically used \
+as shorthand when the common pre\214x of the strings to be generated is)
+108 242.4 R(longer than in the abo)108 254.4 Q .3 -.15(ve ex)-.15 H
+(ample:).15 E(mkdir /usr/local/src/bash/{old,ne)144 271.2 Q -.65(w,)-.25
+G(dist,b).65 E(ugs})-.2 E(or)108 283.2 Q(cho)144 295.2 Q
+(wn root /usr/{ucb/{e)-.25 E(x,edit},lib/{e)-.15 E(x?.?*,ho)-.15 E(w_e)
+-.25 E(x}})-.15 E .618(Brace e)108 312 R .618
+(xpansion introduces a slight incompatibility with historical v)-.15 F
+.618(ersions of)-.15 F F2(sh)3.118 E F0(.)A F2(sh)5.618 E F0 .618
+(does not treat open-)3.118 F .248
+(ing or closing braces specially when the)108 324 R 2.748(ya)-.15 G .247
+(ppear as part of a w)-2.748 F .247(ord, and preserv)-.1 F .247
+(es them in the output.)-.15 F F2(Bash)5.247 E F0(remo)108 336 Q -.15
+(ve)-.15 G 3.53(sb).15 G 1.03(races from w)-3.53 F 1.03
+(ords as a consequence of brace e)-.1 F 3.53(xpansion. F)-.15 F 1.03
+(or e)-.15 F 1.03(xample, a w)-.15 F 1.03(ord entered to)-.1 F F2(sh)
+3.53 E F0(as)3.53 E F1(\214le{1,2})108 348 Q F0 .515
+(appears identically in the output.)3.015 F .515(The same w)5.515 F .515
+(ord is output as)-.1 F F1 .514(\214le1 \214le2)4.925 F F0 .514(after e)
+3.034 F .514(xpansion by)-.15 F F2(bash)3.014 E F0(.)A .436
+(If strict compatibility with)108 360 R F2(sh)2.936 E F0 .436
+(is desired, start)2.936 F F2(bash)2.936 E F0 .436(with the)2.936 F F2
+(+B)2.936 E F0 .436(option or disable brace e)2.936 F .437
+(xpansion with the)-.15 F F2(+B)108 372 Q F0(option to the)2.5 E F2(set)
+2.5 E F0(command \(see)2.5 E/F3 9/Times-Bold@0 SF(SHELL B)2.5 E(UIL)-.09
+E(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)-.25 E F2 -.18(Ti)87 388.8 S
+(lde Expansion).18 E F0 1.087(If a w)108 400.8 R 1.087(ord be)-.1 F
+1.087(gins with an unquoted tilde character \(`)-.15 F F2(~)A F0 1.086
+('\), all of the characters preceding the \214rst unquoted)B .185(slash\
+ \(or all characters, if there is no unquoted slash\) are considered a)
+108 412.8 R F1(tilde-pr)2.685 E(e\214x)-.37 E F0 5.185(.I)C 2.685(fn)
+-5.185 G .185(one of the characters)-2.685 F .726(in the tilde-pre\214x\
+ are quoted, the characters in the tilde-pre\214x follo)108 424.8 R .725
+(wing the tilde are treated as a possible)-.25 F F1(lo)108 436.8 Q .522
+(gin name)-.1 F F0 5.522(.I)C 3.022(ft)-5.522 G .522
+(his login name is the null string, the tilde is replaced with the v)
+-3.022 F .523(alue of the shell parameter)-.25 F F3(HOME)108 448.8 Q/F4
+9/Times-Roman@0 SF(.)A F0(If)4.787 E F3(HOME)2.787 E F0 .287
+(is unset, the home directory of the user e)2.537 F -.15(xe)-.15 G .286
+(cuting the shell is substituted instead.).15 F(Other)5.286 E(-)-.2 E(w\
+ise, the tilde-pre\214x is replaced with the home directory associated \
+with the speci\214ed login name.)108 460.8 Q .092
+(If the tilde-pre\214x is a `~+', the v)108 477.6 R .092
+(alue of the shell v)-.25 F(ariable)-.25 E F3(PWD)2.592 E F0 .092
+(replaces the tilde-pre\214x.)2.342 F .093(If the tilde-pre\214x is)
+5.093 F 3.404(a`)108 489.6 S .904(~\255', the v)-3.404 F .904
+(alue of the shell v)-.25 F(ariable)-.25 E F3(OLDPWD)3.404 E F4(,)A F0
+.904(if it is set, is substituted.)3.154 F .903(If the characters follo)
+5.903 F .903(wing the)-.25 F 1.641
+(tilde in the tilde-pre\214x consist of a number)108 501.6 R F1(N)4.141
+E F0 4.142(,o)C 1.642(ptionally pre\214x)-4.142 F 1.642
+(ed by a `+' or a `\255', the tilde-pre\214x is)-.15 F 1.438(replaced w\
+ith the corresponding element from the directory stack, as it w)108
+513.6 R 1.437(ould be displayed by the)-.1 F F2(dirs)3.937 E F0 -.2(bu)
+108 525.6 S .454(iltin in).2 F -.2(vo)-.4 G -.1(ke).2 G 2.954(dw).1 G
+.454(ith the tilde-pre\214x as an ar)-2.954 F 2.954(gument. If)-.18 F
+.454(the characters follo)2.954 F .455
+(wing the tilde in the tilde-pre\214x)-.25 F
+(consist of a number without a leading `+' or `\255', `+' is assumed.)
+108 537.6 Q(If the login name is in)108 554.4 Q -.25(va)-.4 G
+(lid, or the tilde e).25 E(xpansion f)-.15 E(ails, the w)-.1 E
+(ord is unchanged.)-.1 E .167(Each v)108 571.2 R .167
+(ariable assignment is check)-.25 F .167(ed for unquoted tilde-pre\214x)
+-.1 F .167(es immediately follo)-.15 F .167(wing a)-.25 F F2(:)2.667 E
+F0 .167(or the \214rst)2.667 F F2(=)2.666 E F0 5.166(.I)C(n)-5.166 E
+.281(these cases, tilde e)108 583.2 R .282(xpansion is also performed.)
+-.15 F(Consequently)5.282 E 2.782(,o)-.65 G .282
+(ne may use \214le names with tildes in assign-)-2.782 F(ments to)108
+595.2 Q F3 -.666(PA)2.5 G(TH)-.189 E F4(,)A F3(MAILP)2.25 E -.855(AT)
+-.666 G(H).855 E F4(,)A F0(and)2.25 E F3(CDP)2.5 E -.855(AT)-.666 G(H)
+.855 E F4(,)A F0(and the shell assigns the e)2.25 E(xpanded v)-.15 E
+(alue.)-.25 E F2 -.1(Pa)87 612 S(rameter Expansion).1 E F0 1.606(The `)
+108 624 R F2($)A F0 4.106('c)C 1.606(haracter introduces parameter e)
+-4.106 F 1.605(xpansion, command substitution, or arithmetic e)-.15 F
+4.105(xpansion. The)-.15 F .406(parameter name or symbol to be e)108 636
+R .407(xpanded may be enclosed in braces, which are optional b)-.15 F
+.407(ut serv)-.2 F 2.907(et)-.15 G 2.907(op)-2.907 G(ro-)-2.907 E .033
+(tect the v)108 648 R .033(ariable to be e)-.25 F .033
+(xpanded from characters immediately follo)-.15 F .032
+(wing it which could be interpreted as part)-.25 F(of the name.)108 660
+Q 1.189
+(When braces are used, the matching ending brace is the \214rst `)108
+676.8 R F2(})A F0 3.69('n)C 1.19(ot escaped by a backslash or within a)
+-3.69 F 2.15(quoted string, and not within an embedded arithmetic e)108
+688.8 R 2.15(xpansion, command substitution, or parameter)-.15 F -.15
+(ex)108 700.8 S(pansion.).15 E(GNU Bash-4.1)72 768 Q(2009 December 29)
+135.965 E(18)185.955 E 0 Cg EP
+%%Page: 19 19
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E(${)108 84 Q/F1 10/Times-Italic@0 SF(par)A(ameter)-.15 E F0(})A
+1.204(The v)144 96 R 1.204(alue of)-.25 F F1(par)3.704 E(ameter)-.15 E
+F0 1.204(is substituted.)3.704 F 1.204(The braces are required when)
+6.204 F F1(par)4.955 E(ameter)-.15 E F0 1.205(is a positional)4.435 F
+.264(parameter with more than one digit, or when)144 108 R F1(par)4.014
+E(ameter)-.15 E F0 .264(is follo)3.494 F .264
+(wed by a character which is not to)-.25 F
+(be interpreted as part of its name.)144 120 Q .685
+(If the \214rst character of)108 136.8 R F1(par)3.185 E(ameter)-.15 E F0
+.685(is an e)3.185 F .685(xclamation point \()-.15 F/F2 10/Times-Bold@0
+SF(!)A F0 .685(\), a le)B -.15(ve)-.25 G 3.186(lo).15 G 3.186(fv)-3.186
+G .686(ariable indirection is introduced.)-3.436 F F2(Bash)108 148.8 Q
+F0 .106(uses the v)2.606 F .106(alue of the v)-.25 F .106
+(ariable formed from the rest of)-.25 F F1(par)2.606 E(ameter)-.15 E F0
+.106(as the name of the v)2.606 F .106(ariable; this v)-.25 F(ari-)-.25
+E .351(able is then e)108 160.8 R .351(xpanded and that v)-.15 F .352
+(alue is used in the rest of the substitution, rather than the v)-.25 F
+.352(alue of)-.25 F F1(par)2.852 E(ame-)-.15 E(ter)108 172.8 Q F0 2.52
+(itself. This)2.52 F .02(is kno)2.52 F .02(wn as)-.25 F F1(indir)2.52 E
+.02(ect e)-.37 F(xpansion)-.2 E F0 5.019(.T)C .019(he e)-5.019 F .019
+(xceptions to this are the e)-.15 F .019(xpansions of ${!)-.15 F F1(pr)A
+(e\214x)-.37 E F0 .019(*} and)B(${)108 184.8 Q F2(!)A F1(name)A F0([)A
+F1(@)A F0 .762(]} described belo)B 4.563 -.65(w. T)-.25 H .763(he e).65
+F .763(xclamation point must immediately follo)-.15 F 3.263(wt)-.25 G
+.763(he left brace in order to)-3.263 F(introduce indirection.)108 196.8
+Q .334(In each of the cases belo)108 213.6 R -.65(w,)-.25 G F1(wor)3.484
+E(d)-.37 E F0 .334(is subject to tilde e)2.834 F .334
+(xpansion, parameter e)-.15 F .334(xpansion, command substitution,)-.15
+F(and arithmetic e)108 225.6 Q(xpansion.)-.15 E .697
+(When not performing substring e)108 242.4 R .698
+(xpansion, using the forms documented belo)-.15 F -.65(w,)-.25 G F2
+(bash)3.848 E F0 .698(tests for a parameter)3.198 F
+(that is unset or null.)108 254.4 Q(Omitting the colon results in a tes\
+t only for a parameter that is unset.)5 E(${)108 271.2 Q F1(par)A
+(ameter)-.15 E F2<3aad>A F1(wor)A(d)-.37 E F0(})A F2 .723(Use Default V)
+144 283.2 R(alues)-.92 E F0 5.723(.I)C(f)-5.723 E F1(par)4.473 E(ameter)
+-.15 E F0 .723(is unset or null, the e)3.953 F .722(xpansion of)-.15 F
+F1(wor)3.562 E(d)-.37 E F0 .722(is substituted.)3.992 F(Other)5.722 E(-)
+-.2 E(wise, the v)144 295.2 Q(alue of)-.25 E F1(par)3.75 E(ameter)-.15 E
+F0(is substituted.)3.23 E(${)108 307.2 Q F1(par)A(ameter)-.15 E F2(:=)A
+F1(wor)A(d)-.37 E F0(})A F2 2.004(Assign Default V)144 319.2 R(alues)
+-.92 E F0 7.004(.I)C(f)-7.004 E F1(par)5.754 E(ameter)-.15 E F0 2.005
+(is unset or null, the e)5.234 F 2.005(xpansion of)-.15 F F1(wor)4.845 E
+(d)-.37 E F0 2.005(is assigned to)5.275 F F1(par)144 331.2 Q(ameter)-.15
+E F0 5.279(.T).73 G .279(he v)-5.279 F .279(alue of)-.25 F F1(par)4.029
+E(ameter)-.15 E F0 .278(is then substituted.)3.508 F .278
+(Positional parameters and special param-)5.278 F
+(eters may not be assigned to in this w)144 343.2 Q(ay)-.1 E(.)-.65 E
+(${)108 355.2 Q F1(par)A(ameter)-.15 E F2(:?)A F1(wor)A(d)-.37 E F0(})A
+F2 .535(Display Err)144 367.2 R .535(or if Null or Unset)-.18 F F0 5.535
+(.I)C(f)-5.535 E F1(par)4.285 E(ameter)-.15 E F0 .535
+(is null or unset, the e)3.765 F .535(xpansion of)-.15 F F1(wor)3.035 E
+(d)-.37 E F0 .535(\(or a mes-)3.035 F .662(sage to that ef)144 379.2 R
+.662(fect if)-.25 F F1(wor)3.502 E(d)-.37 E F0 .661(is not present\) is\
+ written to the standard error and the shell, if it is not)3.932 F
+(interacti)144 391.2 Q -.15(ve)-.25 G 2.5(,e).15 G 2.5(xits. Otherwise,)
+-2.65 F(the v)2.5 E(alue of)-.25 E F1(par)2.5 E(ameter)-.15 E F0
+(is substituted.)2.5 E(${)108 403.2 Q F1(par)A(ameter)-.15 E F2(:+)A F1
+(wor)A(d)-.37 E F0(})A F2 .745(Use Alter)144 415.2 R .745(nate V)-.15 F
+(alue)-.92 E F0 5.745(.I)C(f)-5.745 E F1(par)4.495 E(ameter)-.15 E F0
+.745(is null or unset, nothing is substituted, otherwise the e)3.975 F
+(xpan-)-.15 E(sion of)144 427.2 Q F1(wor)2.84 E(d)-.37 E F0
+(is substituted.)3.27 E(${)108 439.2 Q F1(par)A(ameter)-.15 E F2(:)A F1
+(of)A(fset)-.18 E F0(})A(${)108 451.2 Q F1(par)A(ameter)-.15 E F2(:)A F1
+(of)A(fset)-.18 E F2(:)A F1(length)A F0(})A F2 .797
+(Substring Expansion.)144 463.2 R F0 .796(Expands to up to)5.797 F F1
+(length)3.296 E F0 .796(characters of)3.296 F F1(par)3.296 E(ameter)-.15
+E F0 .796(starting at the character)3.296 F .228(speci\214ed by)144
+475.2 R F1(of)2.728 E(fset)-.18 E F0 5.228(.I)C(f)-5.228 E F1(length)
+2.728 E F0 .229(is omitted, e)2.729 F .229(xpands to the substring of)
+-.15 F F1(par)2.729 E(ameter)-.15 E F0 .229(starting at the char)2.729 F
+(-)-.2 E .433(acter speci\214ed by)144 487.2 R F1(of)2.933 E(fset)-.18 E
+F0(.)A F1(length)5.433 E F0(and)2.933 E F1(of)2.933 E(fset)-.18 E F0
+.433(are arithmetic e)2.933 F .433(xpressions \(see)-.15 F/F3 9
+/Times-Bold@0 SF .432(ARITHMETIC EV)2.933 F(ALU-)-1.215 E -.855(AT)144
+499.2 S(ION).855 E F0(belo)2.576 E(w\).)-.25 E F1(length)5.326 E F0 .326
+(must e)2.826 F -.25(va)-.25 G .326
+(luate to a number greater than or equal to zero.).25 F(If)5.327 E F1
+(of)2.827 E(fset)-.18 E F0 -.25(eva)2.827 G(luates).25 E .016
+(to a number less than zero, the v)144 511.2 R .015
+(alue is used as an of)-.25 F .015(fset from the end of the v)-.25 F
+.015(alue of)-.25 F F1(par)2.515 E(ameter)-.15 E F0 5.015(.I)C(f)-5.015
+E F1(par)144 523.2 Q(ameter)-.15 E F0(is)3.25 E F2(@)3.25 E F0 3.25(,t)C
+.75(he result is)-3.25 F F1(length)3.25 E F0 .75
+(positional parameters be)3.25 F .75(ginning at)-.15 F F1(of)3.25 E
+(fset)-.18 E F0 5.75(.I)C(f)-5.75 E F1(par)3.25 E(ameter)-.15 E F0 .75
+(is an)3.25 F(inde)144 535.2 Q -.15(xe)-.15 G 2.702(da).15 G .201
+(rray name subscripted by @ or *, the result is the)-2.702 F F1(length)
+2.701 E F0 .201(members of the array be)2.701 F(ginning)-.15 E 1.282
+(with ${)144 547.2 R F1(par)A(ameter)-.15 E F0([)A F1(of)A(fset)-.18 E
+F0 3.782(]}. A)B(ne)3.782 E -.05(ga)-.15 G(ti).05 E -.15(ve)-.25 G F1
+(of)3.932 E(fset)-.18 E F0 1.282(is tak)3.782 F 1.282(en relati)-.1 F
+1.582 -.15(ve t)-.25 H 3.782(oo).15 G 1.283(ne greater than the maximum)
+-3.782 F(inde)144 559.2 Q 3.435(xo)-.15 G 3.435(ft)-3.435 G .935
+(he speci\214ed array)-3.435 F 5.935(.S)-.65 G .935(ubstring e)-5.935 F
+.935(xpansion applied to an associati)-.15 F 1.234 -.15(ve a)-.25 H .934
+(rray produces unde-).15 F .261(\214ned results.)144 571.2 R .261
+(Note that a ne)5.261 F -.05(ga)-.15 G(ti).05 E .561 -.15(ve o)-.25 H
+-.25(ff).15 G .261
+(set must be separated from the colon by at least one space to).25 F -.2
+(avo)144 583.2 S .155(id being confused with the :- e).2 F 2.655
+(xpansion. Substring)-.15 F(inde)2.655 E .154
+(xing is zero-based unless the positional)-.15 F .532
+(parameters are used, in which case the inde)144 595.2 R .532
+(xing starts at 1 by def)-.15 F 3.032(ault. If)-.1 F F1(of)3.032 E(fset)
+-.18 E F0 .532(is 0, and the posi-)3.032 F(tional parameters are used,)
+144 607.2 Q F2($0)2.5 E F0(is pre\214x)2.5 E(ed to the list.)-.15 E(${)
+108 624 Q F2(!)A F1(pr)A(e\214x)-.37 E F2(*)A F0(})A(${)108 636 Q F2(!)A
+F1(pr)A(e\214x)-.37 E F2(@)A F0(})A F2 .085(Names matching pr)144 648 R
+(e\214x.)-.18 E F0 .084(Expands to the names of v)5.085 F .084
+(ariables whose names be)-.25 F .084(gin with)-.15 F F1(pr)2.584 E
+(e\214x)-.37 E F0 2.584(,s)C(epa-)-2.584 E .257
+(rated by the \214rst character of the)144 660 R F3(IFS)2.757 E F0 .257
+(special v)2.507 F 2.757(ariable. When)-.25 F F1(@)2.758 E F0 .258
+(is used and the e)2.758 F .258(xpansion appears)-.15 F
+(within double quotes, each v)144 672 Q(ariable name e)-.25 E
+(xpands to a separate w)-.15 E(ord.)-.1 E(${)108 688.8 Q F2(!)A F1(name)
+A F0([)A F1(@)A F0(]})A(${)108 700.8 Q F2(!)A F1(name)A F0([)A F1(*)A F0
+(]})A F2 2.036(List of array k)144 712.8 R(eys.)-.1 E F0(If)7.036 E F1
+(name)4.536 E F0 2.036(is an array v)4.536 F 2.036(ariable, e)-.25 F
+2.036(xpands to the list of array indices \(k)-.15 F -.15(ey)-.1 G(s\))
+.15 E .595(assigned in)144 724.8 R F1(name)3.095 E F0 5.595(.I)C(f)
+-5.595 E F1(name)3.095 E F0 .595(is not an array)3.095 F 3.095(,e)-.65 G
+.595(xpands to 0 if)-3.245 F F1(name)3.095 E F0 .596
+(is set and null otherwise.)3.095 F(When)5.596 E(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(19)185.955 E 0 Cg EP
+%%Page: 20 20
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Italic@0 SF(@)144 84 Q F0(is used and the e)2.5 E
+(xpansion appears within double quotes, each k)-.15 E .3 -.15(ey ex)-.1
+H(pands to a separate w).15 E(ord.)-.1 E(${)108 100.8 Q/F2 10
+/Times-Bold@0 SF(#)A F1(par)A(ameter)-.15 E F0(})A F2 -.1(Pa)144 112.8 S
+.471(rameter length.).1 F F0 .471(The length in characters of the v)
+5.471 F .471(alue of)-.25 F F1(par)2.971 E(ameter)-.15 E F0 .47
+(is substituted.)2.97 F(If)5.47 E F1(par)4.22 E(ame-)-.15 E(ter)144
+124.8 Q F0(is)4.438 E F2(*)3.708 E F0(or)3.708 E F2(@)3.708 E F0 3.708
+(,t)C 1.208(he v)-3.708 F 1.208
+(alue substituted is the number of positional parameters.)-.25 F(If)
+6.209 E F1(par)4.959 E(ameter)-.15 E F0 1.209(is an)4.439 F
+(array name subscripted by)144 136.8 Q F2(*)2.5 E F0(or)2.5 E F2(@)2.5 E
+F0 2.5(,t)C(he v)-2.5 E
+(alue substituted is the number of elements in the array)-.25 E(.)-.65 E
+(${)108 153.6 Q F1(par)A(ameter)-.15 E F2(#)A F1(wor)A(d)-.37 E F0(})A
+(${)108 165.6 Q F1(par)A(ameter)-.15 E F2(##)A F1(wor)A(d)-.37 E F0(})A
+F2(Remo)144 177.6 Q 1.396 -.1(ve m)-.1 H 1.196(atching pr).1 F 1.196
+(e\214x patter)-.18 F(n.)-.15 E F0(The)6.196 E F1(wor)4.036 E(d)-.37 E
+F0 1.196(is e)4.466 F 1.196
+(xpanded to produce a pattern just as in path-)-.15 F .151(name e)144
+189.6 R 2.651(xpansion. If)-.15 F .152(the pattern matches the be)2.652
+F .152(ginning of the v)-.15 F .152(alue of)-.25 F F1(par)2.652 E
+(ameter)-.15 E F0 2.652(,t).73 G .152(hen the result of)-2.652 F 1.4
+(the e)144 201.6 R 1.4(xpansion is the e)-.15 F 1.4(xpanded v)-.15 F 1.4
+(alue of)-.25 F F1(par)5.15 E(ameter)-.15 E F0 1.4
+(with the shortest matching pattern \(the `)4.63 F(`)-.74 E F2(#)A F0
+-.74('')C .281(case\) or the longest matching pattern \(the `)144 213.6
+R(`)-.74 E F2(##)A F0 1.761 -.74('' c)D .281(ase\) deleted.).74 F(If)
+5.281 E F1(par)4.031 E(ameter)-.15 E F0(is)3.511 E F2(@)2.781 E F0(or)
+2.781 E F2(*)2.782 E F0 2.782(,t)C .282(he pattern)-2.782 F(remo)144
+225.6 Q -.25(va)-.15 G 3.274(lo).25 G .774
+(peration is applied to each positional parameter in turn, and the e)
+-3.274 F .774(xpansion is the resul-)-.15 F .401(tant list.)144 237.6 R
+(If)5.401 E F1(par)4.151 E(ameter)-.15 E F0 .401(is an array v)3.631 F
+.401(ariable subscripted with)-.25 F F2(@)2.901 E F0(or)2.901 E F2(*)
+2.901 E F0 2.902(,t)C .402(he pattern remo)-2.902 F -.25(va)-.15 G 2.902
+(lo).25 G(peration)-2.902 E
+(is applied to each member of the array in turn, and the e)144 249.6 Q
+(xpansion is the resultant list.)-.15 E(${)108 266.4 Q F1(par)A(ameter)
+-.15 E F2(%)A F1(wor)A(d)-.37 E F0(})A(${)108 278.4 Q F1(par)A(ameter)
+-.15 E F2(%%)A F1(wor)A(d)-.37 E F0(})A F2(Remo)144 290.4 Q .347 -.1
+(ve m)-.1 H .147(atching suf\214x patter).1 F(n.)-.15 E F0(The)5.147 E
+F1(wor)2.647 E(d)-.37 E F0 .147(is e)2.647 F .146
+(xpanded to produce a pattern just as in pathname)-.15 F -.15(ex)144
+302.4 S 3.088(pansion. If).15 F .588
+(the pattern matches a trailing portion of the e)3.088 F .588(xpanded v)
+-.15 F .588(alue of)-.25 F F1(par)3.088 E(ameter)-.15 E F0 3.088(,t).73
+G .588(hen the)-3.088 F .226(result of the e)144 314.4 R .226
+(xpansion is the e)-.15 F .226(xpanded v)-.15 F .226(alue of)-.25 F F1
+(par)3.976 E(ameter)-.15 E F0 .226
+(with the shortest matching pattern \(the)3.456 F -.74(``)144 326.4 S F2
+(%).74 E F0 1.521 -.74('' c)D .042
+(ase\) or the longest matching pattern \(the `).74 F(`)-.74 E F2(%%)A F0
+1.522 -.74('' c)D .042(ase\) deleted.).74 F(If)5.042 E F1(par)3.792 E
+(ameter)-.15 E F0(is)3.272 E F2(@)2.542 E F0(or)2.542 E F2(*)2.542 E F0
+2.542(,t)C(he)-2.542 E .441(pattern remo)144 338.4 R -.25(va)-.15 G
+2.941(lo).25 G .441
+(peration is applied to each positional parameter in turn, and the e)
+-2.941 F .44(xpansion is the)-.15 F .24(resultant list.)144 350.4 R(If)
+5.24 E F1(par)3.99 E(ameter)-.15 E F0 .24(is an array v)3.47 F .241
+(ariable subscripted with)-.25 F F2(@)2.741 E F0(or)2.741 E F2(*)2.741 E
+F0 2.741(,t)C .241(he pattern remo)-2.741 F -.25(va)-.15 G 2.741(lo).25
+G(per)-2.741 E(-)-.2 E
+(ation is applied to each member of the array in turn, and the e)144
+362.4 Q(xpansion is the resultant list.)-.15 E(${)108 379.2 Q F1(par)A
+(ameter)-.15 E F2(/)A F1(pattern)A F2(/)A F1(string)A F0(})A F2 -.1(Pa)
+144 391.2 S(tter).1 E 3.607(ns)-.15 G(ubstitution.)-3.607 E F0(The)6.107
+E F1(pattern)3.607 E F0 1.107(is e)3.607 F 1.106
+(xpanded to produce a pattern just as in pathname e)-.15 F(xpan-)-.15 E
+(sion.)144 403.2 Q F1 -.8(Pa)6.033 G -.15(ra).8 G(meter).15 E F0 1.033
+(is e)3.533 F 1.033(xpanded and the longest match of)-.15 F F1(pattern)
+3.533 E F0(ag)3.533 E 1.034(ainst its v)-.05 F 1.034
+(alue is replaced with)-.25 F F1(string)144 415.2 Q F0 5.161(.I)C(f)
+-5.161 E F1(pattern)2.661 E F0(be)2.661 E .161(gins with)-.15 F F2(/)
+2.661 E F0 2.661(,a)C .161(ll matches of)-2.661 F F1(pattern)2.661 E F0
+.16(are replaced with)2.661 F F1(string)2.66 E F0 5.16(.N)C .16
+(ormally only the)-5.16 F .806(\214rst match is replaced.)144 427.2 R
+(If)5.806 E F1(pattern)3.306 E F0(be)3.306 E .806(gins with)-.15 F F2(#)
+3.306 E F0 3.306(,i)C 3.307(tm)-3.306 G .807(ust match at the be)-3.307
+F .807(ginning of the e)-.15 F(xpanded)-.15 E -.25(va)144 439.2 S .621
+(lue of).25 F F1(par)3.121 E(ameter)-.15 E F0 5.621(.I)C(f)-5.621 E F1
+(pattern)3.121 E F0(be)3.121 E .621(gins with)-.15 F F2(%)3.121 E F0
+3.121(,i)C 3.121(tm)-3.121 G .62(ust match at the end of the e)-3.121 F
+.62(xpanded v)-.15 F .62(alue of)-.25 F F1(par)144 451.2 Q(ameter)-.15 E
+F0 6.253(.I)C(f)-6.253 E F1(string)3.753 E F0 1.253(is null, matches of)
+3.753 F F1(pattern)3.753 E F0 1.253(are deleted and the)3.753 F F2(/)
+3.753 E F0(follo)3.753 E(wing)-.25 E F1(pattern)3.753 E F0 1.254(may be)
+3.754 F 2.679(omitted. If)144 463.2 R F1(par)3.929 E(ameter)-.15 E F0
+(is)3.409 E F2(@)2.679 E F0(or)2.679 E F2(*)2.679 E F0 2.679(,t)C .178
+(he substitution operation is applied to each positional parameter)
+-2.679 F .618(in turn, and the e)144 475.2 R .619
+(xpansion is the resultant list.)-.15 F(If)5.619 E F1(par)4.369 E
+(ameter)-.15 E F0 .619(is an array v)3.849 F .619
+(ariable subscripted with)-.25 F F2(@)144 487.2 Q F0(or)3.224 E F2(*)
+3.224 E F0 3.224(,t)C .723(he substitution operation is applied to each\
+ member of the array in turn, and the e)-3.224 F(xpan-)-.15 E
+(sion is the resultant list.)144 499.2 Q(${)108 516 Q F1(par)A(ameter)
+-.15 E F2(^)A F1(pattern)A F0(})A(${)108 528 Q F1(par)A(ameter)-.15 E F2
+(^^)A F1(pattern)A F0(})A(${)108 540 Q F1(par)A(ameter)-.15 E F2(,)A F1
+(pattern)A F0(})A(${)108 552 Q F1(par)A(ameter)-.15 E F2(,,)A F1
+(pattern)A F0(})A F2 .437(Case modi\214cation.)144 564 R F0 .437(This e)
+5.437 F .438(xpansion modi\214es the case of alphabetic characters in)
+-.15 F F1(par)2.938 E(ameter)-.15 E F0 5.438(.T)C(he)-5.438 E F1
+(pattern)144 576 Q F0 .814(is e)3.314 F .813
+(xpanded to produce a pattern just as in pathname e)-.15 F 3.313
+(xpansion. The)-.15 F F2(^)3.313 E F0 .813(operator con)3.313 F -.15(ve)
+-.4 G(rts).15 E(lo)144 588 Q .18(wercase letters matching)-.25 F F1
+(pattern)2.681 E F0 .181(to uppercase; the)2.681 F F2(,)2.681 E F0 .181
+(operator con)2.681 F -.15(ve)-.4 G .181(rts matching uppercase letters)
+.15 F .085(to lo)144 600 R 2.585(wercase. The)-.25 F F2(^^)2.585 E F0
+(and)2.585 E F2(,,)2.585 E F0 -.15(ex)2.585 G .085(pansions con).15 F
+-.15(ve)-.4 G .085(rt each matched character in the e).15 F .085
+(xpanded v)-.15 F .085(alue; the)-.25 F F2(^)2.585 E F0(and)144 612 Q F2
+(,)3.434 E F0 -.15(ex)3.434 G .934(pansions match and con).15 F -.15(ve)
+-.4 G .934(rt only the \214rst character in the e).15 F .935(xpanded v)
+-.15 F 3.435(alue.. If)-.25 F F1(pattern)3.435 E F0(is)3.435 E 1.121
+(omitted, it is treated lik)144 624 R 3.621(ea)-.1 G F2(?)A F0 3.621(,w)
+C 1.121(hich matches e)-3.621 F -.15(ve)-.25 G 1.121(ry character).15 F
+6.12(.I)-.55 G(f)-6.12 E F1(par)4.87 E(ameter)-.15 E F0(is)4.35 E F2(@)
+3.62 E F0(or)3.62 E F2(*)3.62 E F0 3.62(,t)C 1.12(he case)-3.62 F 1.335
+(modi\214cation operation is applied to each positional parameter in tu\
+rn, and the e)144 636 R 1.335(xpansion is the)-.15 F 1.308
+(resultant list.)144 648 R(If)6.308 E F1(par)5.058 E(ameter)-.15 E F0
+1.308(is an array v)4.538 F 1.308(ariable subscripted with)-.25 F F2(@)
+3.808 E F0(or)3.808 E F2(*)3.808 E F0 3.808(,t)C 1.308
+(he case modi\214cation)-3.808 F
+(operation is applied to each member of the array in turn, and the e)144
+660 Q(xpansion is the resultant list.)-.15 E F2(Command Substitution)87
+676.8 Q F1 1.697(Command substitution)108 688.8 R F0(allo)4.197 E 1.697
+(ws the output of a command to replace the command name.)-.25 F 1.698
+(There are tw)6.698 F(o)-.1 E(forms:)108 700.8 Q F2($\()144 722.4 Q F1
+(command)A F2(\))1.666 E F0(GNU Bash-4.1)72 768 Q(2009 December 29)
+135.965 E(20)185.955 E 0 Cg EP
+%%Page: 21 21
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E(or)108 84 Q/F1 10/Times-Bold@0 SF<92>144 96 Q/F2 10
+/Times-Italic@0 SF(command)A F1<92>A(Bash)108 112.8 Q F0 .02
+(performs the e)2.52 F .02(xpansion by e)-.15 F -.15(xe)-.15 G(cuting)
+.15 E F2(command)2.519 E F0 .019
+(and replacing the command substitution with the stan-)2.519 F .768
+(dard output of the command, with an)108 124.8 R 3.268(yt)-.15 G .768
+(railing ne)-3.268 F .768(wlines deleted.)-.25 F .768(Embedded ne)5.768
+F .768(wlines are not deleted, b)-.25 F(ut)-.2 E(the)108 136.8 Q 3.219
+(ym)-.15 G .719(ay be remo)-3.219 F -.15(ve)-.15 G 3.219(dd).15 G .719
+(uring w)-3.219 F .719(ord splitting.)-.1 F .719
+(The command substitution)5.719 F F1($\(cat)3.219 E F2(\214le)3.219 E F1
+(\))A F0 .718(can be replaced by the)3.219 F(equi)108 148.8 Q -.25(va)
+-.25 G(lent b).25 E(ut f)-.2 E(aster)-.1 E F1($\(<)2.5 E F2(\214le)2.5 E
+F1(\))A F0(.)A 1.724(When the old-style backquote form of substitution \
+is used, backslash retains its literal meaning e)108 165.6 R(xcept)-.15
+E .315(when follo)108 177.6 R .315(wed by)-.25 F F1($)2.815 E F0(,)A F1
+<92>2.815 E F0 2.815(,o)C(r)-2.815 E F1(\\)2.815 E F0 5.315(.T)C .314(h\
+e \214rst backquote not preceded by a backslash terminates the command \
+sub-)-5.315 F 3.886(stitution. When)108 189.6 R 1.386(using the $\()
+3.886 F F2(command).833 E F0 3.886(\)f)1.666 G 1.387
+(orm, all characters between the parentheses mak)-3.886 F 3.887(eu)-.1 G
+3.887(pt)-3.887 G 1.387(he com-)-3.887 F
+(mand; none are treated specially)108 201.6 Q(.)-.65 E .894
+(Command substitutions may be nested.)108 218.4 R 2.494 -.8(To n)5.894 H
+.894(est when using the backquoted form, escape the inner back-).8 F
+(quotes with backslashes.)108 230.4 Q .422
+(If the substitution appears within double quotes, w)108 247.2 R .422
+(ord splitting and pathname e)-.1 F .423(xpansion are not performed)-.15
+F(on the results.)108 259.2 Q F1(Arithmetic Expansion)87 276 Q F0 1.035
+(Arithmetic e)108 288 R 1.035(xpansion allo)-.15 F 1.035(ws the e)-.25 F
+-.25(va)-.25 G 1.034(luation of an arithmetic e).25 F 1.034
+(xpression and the substitution of the result.)-.15 F
+(The format for arithmetic e)108 300 Q(xpansion is:)-.15 E F1($\(\()144
+316.8 Q F2 -.2(ex)C(pr).2 E(ession)-.37 E F1(\)\))A F0(The)108 333.6 Q
+F2 -.2(ex)2.665 G(pr).2 E(ession)-.37 E F0 .165
+(is treated as if it were within double quotes, b)2.905 F .166
+(ut a double quote inside the parentheses is not)-.2 F 1.075
+(treated specially)108 345.6 R 6.075(.A)-.65 G 1.074(ll tok)-6.075 F
+1.074(ens in the e)-.1 F 1.074(xpression under)-.15 F 1.074
+(go parameter e)-.18 F 1.074(xpansion, string e)-.15 F 1.074
+(xpansion, command)-.15 F(substitution, and quote remo)108 357.6 Q -.25
+(va)-.15 G 2.5(l. Arithmetic).25 F -.15(ex)2.5 G
+(pansions may be nested.).15 E 1.378(The e)108 374.4 R -.25(va)-.25 G
+1.378(luation is performed according to the rules listed belo).25 F
+3.878(wu)-.25 G(nder)-3.878 E/F3 9/Times-Bold@0 SF 1.378(ARITHMETIC EV)
+3.878 F(ALU)-1.215 E -.855(AT)-.54 G(ION).855 E/F4 9/Times-Roman@0 SF(.)
+A F0(If)5.879 E F2 -.2(ex)108 386.4 S(pr).2 E(ession)-.37 E F0(is in)
+2.74 E -.25(va)-.4 G(lid,).25 E F1(bash)2.5 E F0
+(prints a message indicating f)2.5 E(ailure and no substitution occurs.)
+-.1 E F1(Pr)87 403.2 Q(ocess Substitution)-.18 E F2(Pr)108 415.2 Q .971
+(ocess substitution)-.45 F F0 .971
+(is supported on systems that support named pipes \()3.471 F F2(FIFOs)A
+F0 3.47(\)o)C 3.47(rt)-3.47 G(he)-3.47 E F1(/de)3.47 E(v/fd)-.15 E F0
+.97(method of)3.47 F .021(naming open \214les.)108 427.2 R .021(It tak)
+5.021 F .021(es the form of)-.1 F F1(<\()2.521 E F2(list)A F1(\)).833 E
+F0(or)2.521 E F1(>\()2.521 E F2(list)A F1(\)).833 E F0 5.021(.T)C .021
+(he process)-5.021 F F2(list)2.521 E F0 .021
+(is run with its input or output con-)2.521 F .059(nected to a)108 439.2
+R F2(FIFO)2.559 E F0 .058(or some \214le in)2.559 F F1(/de)2.558 E(v/fd)
+-.15 E F0 5.058(.T)C .058(he name of this \214le is passed as an ar)
+-5.058 F .058(gument to the current com-)-.18 F .13
+(mand as the result of the e)108 451.2 R 2.63(xpansion. If)-.15 F(the)
+2.63 E F1(>\()2.63 E F2(list)A F1(\)).833 E F0 .13
+(form is used, writing to the \214le will pro)2.63 F .131
+(vide input for)-.15 F F2(list)2.631 E F0(.)A(If the)108 463.2 Q F1(<\()
+2.5 E F2(list)A F1(\)).833 E F0
+(form is used, the \214le passed as an ar)2.5 E
+(gument should be read to obtain the output of)-.18 E F2(list)2.5 E F0
+(.)A .897(When a)108 480 R -.25(va)-.2 G .896(ilable, process substitut\
+ion is performed simultaneously with parameter and v).25 F .896
+(ariable e)-.25 F(xpansion,)-.15 E
+(command substitution, and arithmetic e)108 492 Q(xpansion.)-.15 E F1
+-.75(Wo)87 508.8 S(rd Splitting).75 E F0 1.142
+(The shell scans the results of parameter e)108 520.8 R 1.143
+(xpansion, command substitution, and arithmetic e)-.15 F 1.143
+(xpansion that)-.15 F(did not occur within double quotes for)108 532.8 Q
+F2(wor)2.5 E 2.5(ds)-.37 G(plitting)-2.5 E F0(.).22 E .063
+(The shell treats each character of)108 549.6 R F3(IFS)2.563 E F0 .063
+(as a delimiter)2.313 F 2.563(,a)-.4 G .063
+(nd splits the results of the other e)-2.563 F .063(xpansions into w)
+-.15 F(ords)-.1 E 1.788(on these characters.)108 561.6 R(If)6.788 E F3
+(IFS)4.288 E F0 1.788(is unset, or its v)4.038 F 1.789(alue is e)-.25 F
+(xactly)-.15 E F1(<space><tab><newline>)4.289 E F0 4.289(,t)C 1.789
+(he def)-4.289 F 1.789(ault, then)-.1 F .022(sequences of)108 573.6 R F1
+(<space>)2.522 E F0(,)A F1(<tab>)2.522 E F0 2.521(,a)C(nd)-2.521 E F1
+(<newline>)2.521 E F0 .021(at the be)2.521 F .021
+(ginning and end of the results of the pre)-.15 F .021(vious e)-.25 F
+(xpan-)-.15 E .585(sions are ignored, and an)108 585.6 R 3.086(ys)-.15 G
+.586(equence of)-3.086 F F3(IFS)3.086 E F0 .586
+(characters not at the be)2.836 F .586(ginning or end serv)-.15 F .586
+(es to delimit w)-.15 F(ords.)-.1 E(If)108 597.6 Q F3(IFS)3.617 E F0
+1.117(has a v)3.367 F 1.117(alue other than the def)-.25 F 1.117
+(ault, then sequences of the whitespace characters)-.1 F F1(space)3.617
+E F0(and)3.617 E F1(tab)3.617 E F0(are)3.617 E .315(ignored at the be)
+108 609.6 R .315(ginning and end of the w)-.15 F .315
+(ord, as long as the whitespace character is in the v)-.1 F .315
+(alue of)-.25 F F3(IFS)2.815 E F0(\(an)2.566 E F3(IFS)108 621.6 Q F0
+1.054(whitespace character\).)3.304 F(An)6.054 E 3.554(yc)-.15 G 1.054
+(haracter in)-3.554 F F3(IFS)3.554 E F0 1.053(that is not)3.303 F F3
+(IFS)3.553 E F0 1.053(whitespace, along with an)3.303 F 3.553(ya)-.15 G
+(djacent)-3.553 E F3(IFS)3.553 E F0 .331
+(whitespace characters, delimits a \214eld.)108 633.6 R 2.831(As)5.331 G
+.332(equence of)-2.831 F F3(IFS)2.832 E F0 .332
+(whitespace characters is also treated as a delim-)2.582 F(iter)108
+645.6 Q 5(.I)-.55 G 2.5(ft)-5 G(he v)-2.5 E(alue of)-.25 E F3(IFS)2.5 E
+F0(is null, no w)2.25 E(ord splitting occurs.)-.1 E 1.879
+(Explicit null ar)108 662.4 R 1.879(guments \()-.18 F F1 .833("").833 G
+F0(or)3.545 E F1 .833<0808>5.211 G F0 4.378(\)a)C 1.878(re retained.)
+-4.378 F 1.878(Unquoted implicit null ar)6.878 F 1.878
+(guments, resulting from the)-.18 F -.15(ex)108 674.4 S .176
+(pansion of parameters that ha).15 F .476 -.15(ve n)-.2 H 2.676(ov).15 G
+.176(alues, are remo)-2.926 F -.15(ve)-.15 G 2.676(d. If).15 F 2.677(ap)
+2.677 G .177(arameter with no v)-2.677 F .177(alue is e)-.25 F .177
+(xpanded within)-.15 F(double quotes, a null ar)108 686.4 Q
+(gument results and is retained.)-.18 E(Note that if no e)108 703.2 Q
+(xpansion occurs, no splitting is performed.)-.15 E(GNU Bash-4.1)72 768
+Q(2009 December 29)135.965 E(21)185.955 E 0 Cg EP
+%%Page: 22 22
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF -.1(Pa)87 84 S(thname Expansion).1 E F0
+.371(After w)108 96 R .371(ord splitting, unless the)-.1 F F1<ad66>2.871
+E F0 .371(option has been set,)2.871 F F1(bash)2.871 E F0 .37
+(scans each w)2.87 F .37(ord for the characters)-.1 F F1(*)2.87 E F0(,)A
+F1(?)2.87 E F0 2.87(,a)C(nd)-2.87 E F1([)2.87 E F0(.)A .677
+(If one of these characters appears, then the w)108 108 R .677
+(ord is re)-.1 F -.05(ga)-.15 G .677(rded as a).05 F/F2 10
+/Times-Italic@0 SF(pattern)3.177 E F0 3.177(,a).24 G .678
+(nd replaced with an alphabeti-)-3.177 F 1.457
+(cally sorted list of \214le names matching the pattern.)108 120 R 1.456
+(If no matching \214le names are found, and the shell)6.457 F(option)108
+132 Q F1(nullglob)2.537 E F0 .038(is not enabled, the w)2.537 F .038
+(ord is left unchanged.)-.1 F .038(If the)5.038 F F1(nullglob)2.538 E F0
+.038(option is set, and no matches are)2.538 F .306(found, the w)108 144
+R .306(ord is remo)-.1 F -.15(ve)-.15 G 2.806(d. If).15 F(the)2.805 E F1
+(failglob)2.805 E F0 .305
+(shell option is set, and no matches are found, an error message)2.805 F
+.928(is printed and the command is not e)108 156 R -.15(xe)-.15 G 3.428
+(cuted. If).15 F .928(the shell option)3.428 F F1(nocaseglob)3.428 E F0
+.929(is enabled, the match is per)3.429 F(-)-.2 E .033
+(formed without re)108 168 R -.05(ga)-.15 G .033
+(rd to the case of alphabetic characters.).05 F .032
+(When a pattern is used for pathname e)5.032 F(xpansion,)-.15 E .104
+(the character)108 180 R F1 -.63(``)2.604 G -.55(.').63 G(')-.08 E F0
+.104(at the start of a name or immediately follo)5.104 F .105
+(wing a slash must be matched e)-.25 F(xplicitly)-.15 E 2.605(,u)-.65 G
+(nless)-2.605 E .888(the shell option)108 192 R F1(dotglob)3.388 E F0
+.888(is set.)3.388 F .887
+(When matching a pathname, the slash character must al)5.888 F -.1(wa)
+-.1 G .887(ys be matched).1 F -.15(ex)108 204 S(plicitly).15 E 6.165(.I)
+-.65 G 3.665(no)-6.165 G 1.165(ther cases, the)-3.665 F F1 -.63(``)3.665
+G -.55(.').63 G(')-.08 E F0 1.166(character is not treated specially)
+6.165 F 6.166(.S)-.65 G 1.166(ee the description of)-6.166 F F1(shopt)
+3.666 E F0(belo)3.666 E(w)-.25 E(under)108 216 Q/F3 9/Times-Bold@0 SF
+.478(SHELL B)2.978 F(UIL)-.09 E .478(TIN COMMANDS)-.828 F F0 .477
+(for a description of the)2.728 F F1(nocaseglob)2.977 E F0(,)A F1
+(nullglob)2.977 E F0(,)A F1(failglob)2.977 E F0 2.977(,a)C(nd)-2.977 E
+F1(dotglob)2.977 E F0(shell options.)108 228 Q(The)108 244.8 Q F3
+(GLOBIGNORE)2.63 E F0 .13(shell v)2.38 F .131
+(ariable may be used to restrict the set of \214le names matching a)-.25
+F F2(pattern)2.631 E F0 5.131(.I).24 G(f)-5.131 E F3(GLO-)2.631 E
+(BIGNORE)108 256.8 Q F0 2.015(is set, each matching \214le name that al\
+so matches one of the patterns in)4.265 F F3(GLOBIGNORE)4.515 E F0(is)
+4.264 E(remo)108 268.8 Q -.15(ve)-.15 G 2.503(df).15 G .003
+(rom the list of matches.)-2.503 F .003(The \214le names)5.003 F F1 -.63
+(``)2.503 G -.55(.').63 G(')-.08 E F0(and)5.003 E F1 -.63(``)2.503 G(..)
+.63 E -.63('')-.55 G F0 .004(are al)5.633 F -.1(wa)-.1 G .004
+(ys ignored when).1 F F3(GLOBIGNORE)2.504 E F0(is)2.254 E .046
+(set and not null.)108 280.8 R(Ho)5.046 E(we)-.25 E -.15(ve)-.25 G .846
+-.4(r, s).15 H(etting).4 E F3(GLOBIGNORE)2.546 E F0 .046
+(to a non-null v)2.296 F .045(alue has the ef)-.25 F .045
+(fect of enabling the)-.25 F F1(dotglob)2.545 E F0 .613
+(shell option, so all other \214le names be)108 292.8 R .614
+(ginning with a)-.15 F F1 -.63(``)3.114 G -.55(.').63 G(')-.08 E F0 .614
+(will match.)5.614 F 2.214 -.8(To g)5.614 H .614(et the old beha).8 F
+.614(vior of ignoring)-.2 F .457(\214le names be)108 304.8 R .457
+(ginning with a)-.15 F F1 -.63(``)2.957 G -.55(.').63 G(')-.08 E F0
+2.957(,m)C(ak)-2.957 E(e)-.1 E F1 -.63(``)2.957 G(.*').63 E(')-.63 E F0
+.457(one of the patterns in)5.457 F F3(GLOBIGNORE)2.957 E/F4 9
+/Times-Roman@0 SF(.)A F0(The)4.957 E F1(dotglob)2.956 E F0 .456
+(option is)2.956 F(disabled when)108 316.8 Q F3(GLOBIGNORE)2.5 E F0
+(is unset.)2.25 E F1 -.1(Pa)108 333.6 S(tter).1 E 2.5(nM)-.15 G(atching)
+-2.5 E F0(An)108 350.4 Q 3.138(yc)-.15 G .638(haracter that appears in \
+a pattern, other than the special pattern characters described belo)
+-3.138 F 1.938 -.65(w, m)-.25 H(atches).65 E 3.62(itself. The)108 362.4
+R 1.12(NUL character may not occur in a pattern.)3.62 F 3.62(Ab)6.12 G
+1.12(ackslash escapes the follo)-3.62 F 1.12(wing character; the)-.25 F
+.576(escaping backslash is discarded when matching.)108 374.4 R .576
+(The special pattern characters must be quoted if the)5.576 F 3.076(ya)
+-.15 G(re)-3.076 E(to be matched literally)108 386.4 Q(.)-.65 E
+(The special pattern characters ha)108 403.2 Q .3 -.15(ve t)-.2 H
+(he follo).15 E(wing meanings:)-.25 E F1(*)108 420 Q F0 .455(Matches an)
+31 F 2.955(ys)-.15 G .455(tring, including the null string.)-2.955 F
+.455(When the)5.455 F F1(globstar)2.955 E F0 .455
+(shell option is enabled, and)2.955 F F1(*)2.955 E F0(is)2.955 E .314
+(used in a pathname e)144 432 R .314(xpansion conte)-.15 F .314(xt, tw)
+-.15 F 2.814(oa)-.1 G(djacent)-2.814 E F1(*)2.814 E F0 2.814(su)C .314
+(sed as a single pattern will match all \214les)-2.814 F 1.183
+(and zero or more directories and subdirectories.)144 444 R 1.183
+(If follo)6.183 F 1.183(wed by a)-.25 F F1(/)3.683 E F0 3.683(,t)C 1.383
+-.1(wo a)-3.683 H(djacent).1 E F1(*)3.683 E F0 3.683(sw)C 1.183
+(ill match)-3.683 F(only directories and subdirectories.)144 456 Q F1(?)
+108 468 Q F0(Matches an)31 E 2.5(ys)-.15 G(ingle character)-2.5 E(.)-.55
+E F1([...])108 480 Q F0 .256(Matches an)21.84 F 2.756(yo)-.15 G .257
+(ne of the enclosed characters.)-2.756 F 2.757(Ap)5.257 G .257
+(air of characters separated by a h)-2.757 F .257(yphen denotes a)-.05 F
+F2 -.15(ra)144 492 S(ng).15 E 3.29(ee)-.1 G(xpr)-3.49 E(ession)-.37 E F0
+3.29(;a)C 1.09 -.15(ny c)-3.29 H .789
+(haracter that sorts between those tw).15 F 3.289(oc)-.1 G .789
+(haracters, inclusi)-3.289 F -.15(ve)-.25 G 3.289(,u).15 G .789
+(sing the cur)-3.289 F(-)-.2 E .349(rent locale')144 504 R 2.849(sc)-.55
+G .349(ollating sequence and character set, is matched.)-2.849 F .35
+(If the \214rst character follo)5.349 F .35(wing the)-.25 F F1([)2.85 E
+F0 .564(is a)144 516 R F1(!)3.064 E F0 .564(or a)5.564 F F1(^)3.064 E F0
+.564(then an)3.064 F 3.064(yc)-.15 G .564
+(haracter not enclosed is matched.)-3.064 F .563
+(The sorting order of characters in range)5.564 F -.15(ex)144 528 S .467
+(pressions is determined by the current locale and the v).15 F .467
+(alue of the)-.25 F F3(LC_COLLA)2.967 E(TE)-.855 E F0 .467(shell v)2.717
+F(ariable,)-.25 E 1.077(if set.)144 540 R(A)6.077 E F1<ad>3.577 E F0
+1.077(may be matched by including it as the \214rst or last character i\
+n the set.)3.577 F(A)6.076 E F1(])3.576 E F0 1.076(may be)3.576 F
+(matched by including it as the \214rst character in the set.)144 552 Q
+-.4(Wi)144 570 S(thin).4 E F1([)2.914 E F0(and)2.914 E F1(])2.914 E F0
+(,)A F2 -.15(ch)2.914 G(ar).15 E .414(acter classes)-.15 F F0 .415
+(can be speci\214ed using the syntax)2.915 F F1([:)2.915 E F2(class)A F1
+(:])A F0 2.915(,w)C(here)-2.915 E F2(class)2.915 E F0 .415(is one of)
+2.915 F(the follo)144 582 Q
+(wing classes de\214ned in the POSIX standard:)-.25 E F1 5.421
+(alnum alpha ascii blank cntrl digit graph lo)144 594 R 5.421
+(wer print punct space upper w)-.1 F(ord)-.1 E(xdigit)144 606 Q F0 2.518
+(Ac)144 618 S .018(haracter class matches an)-2.518 F 2.518(yc)-.15 G
+.019(haracter belonging to that class.)-2.518 F(The)5.019 E F1 -.1(wo)
+2.519 G(rd).1 E F0 .019(character class matches)2.519 F
+(letters, digits, and the character _.)144 630 Q -.4(Wi)144 648 S(thin)
+.4 E F1([)3.547 E F0(and)3.547 E F1(])3.547 E F0 3.547(,a)C(n)-3.547 E
+F2 1.046(equivalence class)3.546 F F0 1.046
+(can be speci\214ed using the syntax)3.546 F F1([=)3.546 E F2(c)A F1(=])
+A F0 3.546(,w)C 1.046(hich matches all)-3.546 F(characters with the sam\
+e collation weight \(as de\214ned by the current locale\) as the charac\
+ter)144 660 Q F2(c)2.5 E F0(.)A -.4(Wi)144 678 S(thin).4 E F1([)2.5 E F0
+(and)2.5 E F1(])2.5 E F0 2.5(,t)C(he syntax)-2.5 E F1([.)2.5 E F2
+(symbol)A F1(.])A F0(matches the collating symbol)2.5 E F2(symbol)2.5 E
+F0(.)A .704(If the)108 694.8 R F1(extglob)3.204 E F0 .705
+(shell option is enabled using the)3.204 F F1(shopt)3.205 E F0 -.2(bu)
+3.205 G .705(iltin, se).2 F -.15(ve)-.25 G .705(ral e).15 F .705
+(xtended pattern matching operators)-.15 F .256(are recognized.)108
+706.8 R .256(In the follo)5.256 F .256(wing description, a)-.25 F F2
+(pattern-list)2.755 E F0 .255
+(is a list of one or more patterns separated by a)2.755 F F1(|)2.755 E
+F0(.)A(Composite patterns may be formed using one or more of the follo)
+108 718.8 Q(wing sub-patterns:)-.25 E(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(22)185.955 E 0 Cg EP
+%%Page: 23 23
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(?\()144 84 Q/F2 10/Times-Italic@0 SF
+(pattern-list).833 E F1(\)).833 E F0
+(Matches zero or one occurrence of the gi)180 96 Q -.15(ve)-.25 G 2.5
+(np).15 G(atterns)-2.5 E F1(*\()144 108 Q F2(pattern-list).833 E F1(\))
+.833 E F0(Matches zero or more occurrences of the gi)180 120 Q -.15(ve)
+-.25 G 2.5(np).15 G(atterns)-2.5 E F1(+\()144 132 Q F2(pattern-list).833
+E F1(\)).833 E F0(Matches one or more occurrences of the gi)180 144 Q
+-.15(ve)-.25 G 2.5(np).15 G(atterns)-2.5 E F1(@\()144 156 Q F2
+(pattern-list).833 E F1(\)).833 E F0(Matches one of the gi)180 168 Q
+-.15(ve)-.25 G 2.5(np).15 G(atterns)-2.5 E F1(!\()144 180 Q F2
+(pattern-list).833 E F1(\)).833 E F0(Matches an)180 192 Q(ything e)-.15
+E(xcept one of the gi)-.15 E -.15(ve)-.25 G 2.5(np).15 G(atterns)-2.5 E
+F1(Quote Remo)87 208.8 Q -.1(va)-.1 G(l).1 E F0 1.112
+(After the preceding e)108 220.8 R 1.112
+(xpansions, all unquoted occurrences of the characters)-.15 F F1(\\)
+3.613 E F0(,)A F1<08>3.613 E F0 3.613(,a)C(nd)-3.613 E F1(")4.446 E F0
+1.113(that did not result)4.446 F(from one of the abo)108 232.8 Q .3
+-.15(ve ex)-.15 H(pansions are remo).15 E -.15(ve)-.15 G(d.).15 E/F3
+10.95/Times-Bold@0 SF(REDIRECTION)72 249.6 Q F0 .545
+(Before a command is e)108 261.6 R -.15(xe)-.15 G .545
+(cuted, its input and output may be).15 F F2 -.37(re)3.045 G(dir).37 E
+(ected)-.37 E F0 .545(using a special notation interpreted)3.815 F .616
+(by the shell.)108 273.6 R .617(Redirection may also be used to open an\
+d close \214les for the current shell e)5.616 F -.15(xe)-.15 G .617
+(cution en).15 F(viron-)-.4 E 3.275(ment. The)108 285.6 R(follo)3.275 E
+.774(wing redirection operators may precede or appear an)-.25 F .774
+(ywhere within a)-.15 F F2 .774(simple command)3.614 F F0(or)4.044 E
+(may follo)108 297.6 Q 2.5(wa)-.25 G F2(command)A F0 5(.R).77 G
+(edirections are processed in the order the)-5 E 2.5(ya)-.15 G(ppear)
+-2.5 E 2.5(,f)-.4 G(rom left to right.)-2.5 E .771(Each redirection tha\
+t may be preceded by a \214le descriptor number may instead be preceded\
+ by a w)108 314.4 R .772(ord of)-.1 F .293(the form {)108 326.4 R F2
+(varname)A F0 2.793(}. In)B .293
+(this case, for each redirection operator e)2.793 F .293
+(xcept >&- and <&-, the shell will allocate)-.15 F 3.498<618c>108 338.4
+S .999(le descriptor greater than 10 and assign it to)-3.498 F F2
+(varname)3.499 E F0 5.999(.I)C 3.499(f>)-5.999 G .999
+(&- or <&- is preceded by {)-3.499 F F2(varname)A F0 .999(}, the)B -.25
+(va)108 350.4 S(lue of).25 E F2(varname)2.5 E F0
+(de\214nes the \214le descriptor to close.)2.5 E .284(In the follo)108
+367.2 R .283(wing descriptions, if the \214le descriptor number is omit\
+ted, and the \214rst character of the redirect-)-.25 F .512
+(ion operator is)108 379.2 R F1(<)3.012 E F0 3.012(,t)C .512
+(he redirection refers to the standard input \(\214le descriptor 0\).)
+-3.012 F .512(If the \214rst character of the)5.512 F
+(redirection operator is)108 391.2 Q F1(>)2.5 E F0 2.5(,t)C
+(he redirection refers to the standard output \(\214le descriptor 1\).)
+-2.5 E .825(The w)108 408 R .825(ord follo)-.1 F .824
+(wing the redirection operator in the follo)-.25 F .824
+(wing descriptions, unless otherwise noted, is sub-)-.25 F .772
+(jected to brace e)108 420 R .773(xpansion, tilde e)-.15 F .773
+(xpansion, parameter e)-.15 F .773
+(xpansion, command substitution, arithmetic e)-.15 F(xpan-)-.15 E .844
+(sion, quote remo)108 432 R -.25(va)-.15 G .843(l, pathname e).25 F .843
+(xpansion, and w)-.15 F .843(ord splitting.)-.1 F .843(If it e)5.843 F
+.843(xpands to more than one w)-.15 F(ord,)-.1 E F1(bash)3.343 E F0
+(reports an error)108 444 Q(.)-.55 E
+(Note that the order of redirections is signi\214cant.)108 460.8 Q -.15
+(Fo)5 G 2.5(re).15 G(xample, the command)-2.65 E(ls)144 477.6 Q F1(>)2.5
+E F0(dirlist 2)2.5 E F1(>&)A F0(1)A
+(directs both standard output and standard error to the \214le)108 494.4
+Q F2(dirlist)2.5 E F0 2.5(,w).68 G(hile the command)-2.5 E(ls 2)144
+511.2 Q F1(>&)A F0(1)A F1(>)2.5 E F0(dirlist)2.5 E .527
+(directs only the standard output to \214le)108 528 R F2(dirlist)3.027 E
+F0 3.027(,b).68 G .527(ecause the standard error w)-3.027 F .527
+(as duplicated from the standard)-.1 F
+(output before the standard output w)108 540 Q(as redirected to)-.1 E F2
+(dirlist)2.5 E F0(.).68 E F1(Bash)108 556.8 Q F0 .599(handles se)3.099 F
+-.15(ve)-.25 G .599(ral \214lenames specially when the).15 F 3.099(ya)
+-.15 G .598(re used in redirections, as described in the follo)-3.099 F
+(wing)-.25 E(table:)108 568.8 Q F1(/de)144 585.6 Q(v/fd/)-.15 E F2(fd)A
+F0(If)180 597.6 Q F2(fd)2.5 E F0(is a v)2.5 E(alid inte)-.25 E(ger)-.15
+E 2.5<2c8c>-.4 G(le descriptor)-2.5 E F2(fd)2.5 E F0(is duplicated.)2.5
+E F1(/de)144 609.6 Q(v/stdin)-.15 E F0(File descriptor 0 is duplicated.)
+180 621.6 Q F1(/de)144 633.6 Q(v/stdout)-.15 E F0
+(File descriptor 1 is duplicated.)180 645.6 Q F1(/de)144 657.6 Q
+(v/stderr)-.15 E F0(File descriptor 2 is duplicated.)180 669.6 Q F1(/de)
+144 681.6 Q(v/tcp/)-.15 E F2(host)A F1(/)A F2(port)A F0(If)180 693.6 Q
+F2(host)2.996 E F0 .496(is a v)2.996 F .496
+(alid hostname or Internet address, and)-.25 F F2(port)2.997 E F0 .497
+(is an inte)2.997 F .497(ger port number or ser)-.15 F(-)-.2 E
+(vice name,)180 705.6 Q F1(bash)2.5 E F0
+(attempts to open a TCP connection to the corresponding sock)2.5 E(et.)
+-.1 E(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(23)185.955 E 0 Cg
+EP
+%%Page: 24 24
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(/de)144 84 Q(v/udp/)-.15 E/F2 10
+/Times-Italic@0 SF(host)A F1(/)A F2(port)A F0(If)180 96 Q F2(host)2.997
+E F0 .497(is a v)2.997 F .497(alid hostname or Internet address, and)
+-.25 F F2(port)2.996 E F0 .496(is an inte)2.996 F .496
+(ger port number or ser)-.15 F(-)-.2 E(vice name,)180 108 Q F1(bash)2.5
+E F0(attempts to open a UDP connection to the corresponding sock)2.5 E
+(et.)-.1 E 2.5(Af)108 124.8 S
+(ailure to open or create a \214le causes the redirection to f)-2.6 E
+(ail.)-.1 E .946(Redirections using \214le descriptors greater than 9 s\
+hould be used with care, as the)108 141.6 R 3.447(ym)-.15 G .947
+(ay con\215ict with \214le)-3.447 F
+(descriptors the shell uses internally)108 153.6 Q(.)-.65 E F1(Redir)87
+170.4 Q(ecting Input)-.18 E F0 .391
+(Redirection of input causes the \214le whose name results from the e)
+108 182.4 R .391(xpansion of)-.15 F F2(wor)3.231 E(d)-.37 E F0 .391
+(to be opened for read-)3.661 F(ing on \214le descriptor)108 194.4 Q F2
+(n)2.5 E F0 2.5(,o).24 G 2.5(rt)-2.5 G
+(he standard input \(\214le descriptor 0\) if)-2.5 E F2(n)2.86 E F0
+(is not speci\214ed.)2.74 E
+(The general format for redirecting input is:)108 211.2 Q([)144 228 Q F2
+(n)A F0(])A F1(<)A F2(wor)A(d)-.37 E F1(Redir)87 244.8 Q(ecting Output)
+-.18 E F0 .174
+(Redirection of output causes the \214le whose name results from the e)
+108 256.8 R .175(xpansion of)-.15 F F2(wor)3.015 E(d)-.37 E F0 .175
+(to be opened for writ-)3.445 F .825(ing on \214le descriptor)108 268.8
+R F2(n)3.325 E F0 3.325(,o).24 G 3.325(rt)-3.325 G .824
+(he standard output \(\214le descriptor 1\) if)-3.325 F F2(n)3.684 E F0
+.824(is not speci\214ed.)3.564 F .824(If the \214le does not)5.824 F
+-.15(ex)108 280.8 S(ist it is created; if it does e).15 E
+(xist it is truncated to zero size.)-.15 E
+(The general format for redirecting output is:)108 297.6 Q([)144 314.4 Q
+F2(n)A F0(])A F1(>)A F2(wor)A(d)-.37 E F0 .154
+(If the redirection operator is)108 331.2 R F1(>)2.654 E F0 2.654(,a)C
+.154(nd the)-2.654 F F1(noclob)2.654 E(ber)-.1 E F0 .154(option to the)
+2.654 F F1(set)2.655 E F0 -.2(bu)2.655 G .155
+(iltin has been enabled, the redirection).2 F .658(will f)108 343.2 R
+.658(ail if the \214le whose name results from the e)-.1 F .658
+(xpansion of)-.15 F F2(wor)3.158 E(d)-.37 E F0 -.15(ex)3.158 G .657
+(ists and is a re).15 F .657(gular \214le.)-.15 F .657(If the redi-)
+5.657 F .408(rection operator is)108 355.2 R F1(>|)2.909 E F0 2.909(,o)C
+2.909(rt)-2.909 G .409(he redirection operator is)-2.909 F F1(>)2.909 E
+F0 .409(and the)2.909 F F1(noclob)2.909 E(ber)-.1 E F0 .409
+(option to the)2.909 F F1(set)2.909 E F0 -.2(bu)2.909 G .409
+(iltin command).2 F(is not enabled, the redirection is attempted e)108
+367.2 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(ft)-2.5 G(he \214le named by)
+-2.5 E F2(wor)2.5 E(d)-.37 E F0 -.15(ex)2.5 G(ists.).15 E F1 -.25(Ap)87
+384 S(pending Redir).25 E(ected Output)-.18 E F0 .642
+(Redirection of output in this f)108 396 R .642
+(ashion causes the \214le whose name results from the e)-.1 F .641
+(xpansion of)-.15 F F2(wor)3.481 E(d)-.37 E F0 .641(to be)3.911 F .473
+(opened for appending on \214le descriptor)108 408 R F2(n)2.973 E F0
+2.974(,o).24 G 2.974(rt)-2.974 G .474
+(he standard output \(\214le descriptor 1\) if)-2.974 F F2(n)3.334 E F0
+.474(is not speci\214ed.)3.214 F(If)5.474 E(the \214le does not e)108
+420 Q(xist it is created.)-.15 E
+(The general format for appending output is:)108 436.8 Q([)144 453.6 Q
+F2(n)A F0(])A F1(>>)A F2(wor)A(d)-.37 E F1(Redir)87 475.2 Q
+(ecting Standard Output and Standard Err)-.18 E(or)-.18 E F0 .249
+(This construct allo)108 487.2 R .249(ws both the standard output \(\
+\214le descriptor 1\) and the standard error output \(\214le descrip-)
+-.25 F(tor 2\) to be redirected to the \214le whose name is the e)108
+499.2 Q(xpansion of)-.15 E F2(wor)2.5 E(d)-.37 E F0(.).77 E
+(There are tw)108 516 Q 2.5(of)-.1 G
+(ormats for redirecting standard output and standard error:)-2.5 E F1
+(&>)144 532.8 Q F2(wor)A(d)-.37 E F0(and)108 544.8 Q F1(>&)144 556.8 Q
+F2(wor)A(d)-.37 E F0(Of the tw)108 573.6 Q 2.5(of)-.1 G
+(orms, the \214rst is preferred.)-2.5 E(This is semantically equi)5 E
+-.25(va)-.25 G(lent to).25 E F1(>)144 590.4 Q F2(wor)A(d)-.37 E F0(2)2.5
+E F1(>&)A F0(1)A F1 -.25(Ap)87 612 S
+(pending Standard Output and Standard Err).25 E(or)-.18 E F0 .248
+(This construct allo)108 624 R .249(ws both the standard output \(\214l\
+e descriptor 1\) and the standard error output \(\214le descrip-)-.25 F
+(tor 2\) to be appended to the \214le whose name is the e)108 636 Q
+(xpansion of)-.15 E F2(wor)2.5 E(d)-.37 E F0(.).77 E
+(The format for appending standard output and standard error is:)108
+652.8 Q F1(&>>)144 669.6 Q F2(wor)A(d)-.37 E F0
+(This is semantically equi)108 686.4 Q -.25(va)-.25 G(lent to).25 E F1
+(>>)144 703.2 Q F2(wor)A(d)-.37 E F0(2)2.5 E F1(>&)A F0(1)A
+(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(24)185.955 E 0 Cg EP
+%%Page: 25 25
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(Her)87 84 Q 2.5(eD)-.18 G(ocuments)-2.5 E
+F0 .33(This type of redirection instructs the shell to read input from \
+the current source until a line containing only)108 96 R/F2 10
+/Times-Italic@0 SF(delimiter)108.35 108 Q F0 .614
+(\(with no trailing blanks\) is seen.)3.844 F .615
+(All of the lines read up to that point are then used as the stan-)5.615
+F(dard input for a command.)108 120 Q(The format of here-documents is:)
+108 136.8 Q F1(<<)144 153.6 Q F0([)A F1<ad>A F0(])A F2(wor)A(d)-.37 E
+(her)164 165.6 Q(e-document)-.37 E(delimiter)144 177.6 Q F0 .128
+(No parameter e)108 194.4 R .127
+(xpansion, command substitution, arithmetic e)-.15 F .127
+(xpansion, or pathname e)-.15 F .127(xpansion is performed)-.15 F(on)108
+206.4 Q F2(wor)3.274 E(d)-.37 E F0 5.774(.I).77 G 3.274(fa)-5.774 G
+1.074 -.15(ny c)-3.274 H .774(haracters in).15 F F2(wor)3.614 E(d)-.37 E
+F0 .774(are quoted, the)4.044 F F2(delimiter)3.624 E F0 .774
+(is the result of quote remo)4.004 F -.25(va)-.15 G 3.275(lo).25 G(n)
+-3.275 E F2(wor)3.275 E(d)-.37 E F0 3.275(,a).77 G(nd)-3.275 E .905
+(the lines in the here-document are not e)108 218.4 R 3.405(xpanded. If)
+-.15 F F2(wor)3.405 E(d)-.37 E F0 .904
+(is unquoted, all lines of the here-document are)3.405 F .694
+(subjected to parameter e)108 230.4 R .695
+(xpansion, command substitution, and arithmetic e)-.15 F 3.195
+(xpansion. In)-.15 F .695(the latter case, the)3.195 F
+(character sequence)108 242.4 Q F1(\\<newline>)2.5 E F0(is ignored, and)
+2.5 E F1(\\)2.5 E F0(must be used to quote the characters)2.5 E F1(\\)
+2.5 E F0(,)A F1($)2.5 E F0 2.5(,a)C(nd)-2.5 E F1<92>2.5 E F0(.)A .602
+(If the redirection operator is)108 259.2 R F1(<<\255)3.101 E F0 3.101
+(,t)C .601(hen all leading tab characters are stripped from input lines\
+ and the line)-3.101 F(containing)108 271.2 Q F2(delimiter)2.5 E F0 5
+(.T).73 G(his allo)-5 E
+(ws here-documents within shell scripts to be indented in a natural f)
+-.25 E(ashion.)-.1 E F1(Her)87 288 Q 2.5(eS)-.18 G(trings)-2.5 E F0 2.5
+(Av)108 300 S(ariant of here documents, the format is:)-2.75 E F1(<<<)
+144 316.8 Q F2(wor)A(d)-.37 E F0(The)108 333.6 Q F2(wor)2.5 E(d)-.37 E
+F0(is e)2.5 E
+(xpanded and supplied to the command on its standard input.)-.15 E F1
+(Duplicating File Descriptors)87 350.4 Q F0(The redirection operator)108
+362.4 Q([)144 379.2 Q F2(n)A F0(])A F1(<&)A F2(wor)A(d)-.37 E F0 .126
+(is used to duplicate input \214le descriptors.)108 396 R(If)5.127 E F2
+(wor)2.967 E(d)-.37 E F0 -.15(ex)3.397 G .127
+(pands to one or more digits, the \214le descriptor denoted).15 F(by)108
+408 Q F2(n)3.318 E F0 .458(is made to be a cop)3.198 F 2.958(yo)-.1 G
+2.958(ft)-2.958 G .457(hat \214le descriptor)-2.958 F 5.457(.I)-.55 G
+2.957(ft)-5.457 G .457(he digits in)-2.957 F F2(wor)3.297 E(d)-.37 E F0
+.457(do not specify a \214le descriptor open)3.727 F .149
+(for input, a redirection error occurs.)108 420 R(If)5.149 E F2(wor)
+2.989 E(d)-.37 E F0 -.25(eva)3.419 G .149(luates to).25 F F1<ad>2.649 E
+F0 2.65<2c8c>C .15(le descriptor)-2.65 F F2(n)3.01 E F0 .15(is closed.)
+2.89 F(If)5.15 E F2(n)3.01 E F0 .15(is not speci\214ed,)2.89 F
+(the standard input \(\214le descriptor 0\) is used.)108 432 Q
+(The operator)108 448.8 Q([)144 465.6 Q F2(n)A F0(])A F1(>&)A F2(wor)A
+(d)-.37 E F0 .444
+(is used similarly to duplicate output \214le descriptors.)108 482.4 R
+(If)5.444 E F2(n)3.304 E F0 .443
+(is not speci\214ed, the standard output \(\214le descrip-)3.183 F 1.357
+(tor 1\) is used.)108 494.4 R 1.357(If the digits in)6.357 F F2(wor)
+4.197 E(d)-.37 E F0 1.358(do not specify a \214le descriptor open for o\
+utput, a redirection error)4.627 F 2.597(occurs. As)108 506.4 R 2.597
+(as)2.597 G .097(pecial case, if)-2.597 F F2(n)2.596 E F0 .096
+(is omitted, and)2.596 F F2(wor)2.596 E(d)-.37 E F0 .096(does not e)
+2.596 F .096(xpand to one or more digits, the standard out-)-.15 F
+(put and standard error are redirected as described pre)108 518.4 Q
+(viously)-.25 E(.)-.65 E F1(Mo)87 535.2 Q(ving File Descriptors)-.1 E F0
+(The redirection operator)108 547.2 Q([)144 564 Q F2(n)A F0(])A F1(<&)A
+F2(digit)A F1<ad>A F0(mo)108 580.8 Q -.15(ve)-.15 G 3.035(st).15 G .535
+(he \214le descriptor)-3.035 F F2(digit)3.035 E F0 .535
+(to \214le descriptor)3.035 F F2(n)3.035 E F0 3.035(,o).24 G 3.035(rt)
+-3.035 G .536(he standard input \(\214le descriptor 0\) if)-3.035 F F2
+(n)3.036 E F0 .536(is not speci-)3.036 F(\214ed.)108 592.8 Q F2(digit)5
+E F0(is closed after being duplicated to)2.5 E F2(n)2.5 E F0(.)A
+(Similarly)108 609.6 Q 2.5(,t)-.65 G(he redirection operator)-2.5 E([)
+144 626.4 Q F2(n)A F0(])A F1(>&)A F2(digit)A F1<ad>A F0(mo)108 643.2 Q
+-.15(ve)-.15 G 2.786(st).15 G .286(he \214le descriptor)-2.786 F F2
+(digit)2.786 E F0 .286(to \214le descriptor)2.786 F F2(n)2.786 E F0
+2.786(,o).24 G 2.786(rt)-2.786 G .285
+(he standard output \(\214le descriptor 1\) if)-2.786 F F2(n)2.785 E F0
+.285(is not speci-)2.785 F(\214ed.)108 655.2 Q F1
+(Opening File Descriptors f)87 672 Q(or Reading and Writing)-.25 E F0
+(The redirection operator)108 684 Q([)144 700.8 Q F2(n)A F0(])A F1(<>)A
+F2(wor)A(d)-.37 E F0 1.349(causes the \214le whose name is the e)108
+717.6 R 1.349(xpansion of)-.15 F F2(wor)4.189 E(d)-.37 E F0 1.349
+(to be opened for both reading and writing on \214le)4.619 F(descriptor)
+108 729.6 Q F2(n)2.5 E F0 2.5(,o).24 G 2.5(ro)-2.5 G 2.5<6e8c>-2.5 G
+(le descriptor 0 if)-2.5 E F2(n)2.86 E F0(is not speci\214ed.)2.74 E
+(If the \214le does not e)5 E(xist, it is created.)-.15 E(GNU Bash-4.1)
+72 768 Q(2009 December 29)135.965 E(25)185.955 E 0 Cg EP
+%%Page: 26 26
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10.95/Times-Bold@0 SF(ALIASES)72 84 Q/F2 10/Times-Italic@0 SF
+(Aliases)108 96 Q F0(allo)3.174 E 3.174(was)-.25 G .674
+(tring to be substituted for a w)-3.174 F .674
+(ord when it is used as the \214rst w)-.1 F .673
+(ord of a simple command.)-.1 F .394(The shell maintains a list of alia\
+ses that may be set and unset with the)108 108 R/F3 10/Times-Bold@0 SF
+(alias)2.894 E F0(and)2.894 E F3(unalias)2.894 E F0 -.2(bu)2.894 G .394
+(iltin commands).2 F(\(see)108 120 Q/F4 9/Times-Bold@0 SF 1.98(SHELL B)
+4.48 F(UIL)-.09 E 1.98(TIN COMMANDS)-.828 F F0(belo)4.23 E 4.48
+(w\). The)-.25 F 1.98(\214rst w)4.48 F 1.979
+(ord of each simple command, if unquoted, is)-.1 F(check)108 132 Q .472
+(ed to see if it has an alias.)-.1 F .472(If so, that w)5.472 F .473
+(ord is replaced by the te)-.1 F .473(xt of the alias.)-.15 F .473
+(The characters)5.473 F F3(/)2.973 E F0(,)A F3($)2.973 E F0(,)A F3<92>
+2.973 E F0(,)A(and)108 144 Q F3(=)3.612 E F0 1.112(and an)3.612 F 3.612
+(yo)-.15 G 3.612(ft)-3.612 G 1.112(he shell)-3.612 F F2(metac)3.612 E
+(har)-.15 E(acter)-.15 E(s)-.1 E F0 1.112
+(or quoting characters listed abo)3.612 F 1.411 -.15(ve m)-.15 H 1.111
+(ay not appear in an alias).15 F 3.619(name. The)108 156 R 1.119
+(replacement te)3.619 F 1.119(xt may contain an)-.15 F 3.619(yv)-.15 G
+1.119(alid shell input, including shell metacharacters.)-3.869 F 1.12
+(The \214rst)6.12 F -.1(wo)108 168 S .514(rd of the replacement te).1 F
+.514(xt is tested for aliases, b)-.15 F .514(ut a w)-.2 F .513
+(ord that is identical to an alias being e)-.1 F .513(xpanded is)-.15 F
+.295(not e)108 180 R .295(xpanded a second time.)-.15 F .296
+(This means that one may alias)5.295 F F3(ls)2.796 E F0(to)2.796 E F3
+.296(ls \255F)2.796 F F0 2.796(,f)C .296(or instance, and)-2.796 F F3
+(bash)2.796 E F0 .296(does not try)2.796 F .543(to recursi)108 192 R
+-.15(ve)-.25 G .543(ly e).15 F .543(xpand the replacement te)-.15 F
+3.043(xt. If)-.15 F .543(the last character of the alias v)3.043 F .542
+(alue is a)-.25 F F2(blank)3.042 E F0 3.042(,t).67 G .542(hen the ne)
+-3.042 F(xt)-.15 E(command w)108 204 Q(ord follo)-.1 E
+(wing the alias is also check)-.25 E(ed for alias e)-.1 E(xpansion.)-.15
+E(Aliases are created and listed with the)108 220.8 Q F3(alias)2.5 E F0
+(command, and remo)2.5 E -.15(ve)-.15 G 2.5(dw).15 G(ith the)-2.5 E F3
+(unalias)2.5 E F0(command.)2.5 E .284
+(There is no mechanism for using ar)108 237.6 R .284
+(guments in the replacement te)-.18 F 2.784(xt. If)-.15 F(ar)2.784 E
+.284(guments are needed, a shell func-)-.18 F(tion should be used \(see)
+108 249.6 Q F4(FUNCTIONS)2.5 E F0(belo)2.25 E(w\).)-.25 E 1.22
+(Aliases are not e)108 266.4 R 1.22
+(xpanded when the shell is not interacti)-.15 F -.15(ve)-.25 G 3.72(,u)
+.15 G 1.22(nless the)-3.72 F F3(expand_aliases)3.72 E F0 1.22
+(shell option is set)3.72 F(using)108 278.4 Q F3(shopt)2.5 E F0
+(\(see the description of)2.5 E F3(shopt)2.5 E F0(under)2.5 E F4
+(SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)-.25
+E .435
+(The rules concerning the de\214nition and use of aliases are some)108
+295.2 R .436(what confusing.)-.25 F F3(Bash)5.436 E F0(al)2.936 E -.1
+(wa)-.1 G .436(ys reads at least).1 F .338
+(one complete line of input before e)108 307.2 R -.15(xe)-.15 G .338
+(cuting an).15 F 2.838(yo)-.15 G 2.838(ft)-2.838 G .338
+(he commands on that line.)-2.838 F .337(Aliases are e)5.337 F .337
+(xpanded when)-.15 F 3.403(ac)108 319.2 S .904
+(ommand is read, not when it is e)-3.403 F -.15(xe)-.15 G 3.404
+(cuted. Therefore,).15 F .904
+(an alias de\214nition appearing on the same line as)3.404 F 1.162
+(another command does not tak)108 331.2 R 3.662(ee)-.1 G -.25(ff)-3.662
+G 1.162(ect until the ne).25 F 1.162(xt line of input is read.)-.15 F
+1.161(The commands follo)6.161 F 1.161(wing the)-.25 F .277
+(alias de\214nition on that line are not af)108 343.2 R .277
+(fected by the ne)-.25 F 2.777(wa)-.25 G 2.777(lias. This)-2.777 F(beha)
+2.777 E .277(vior is also an issue when functions)-.2 F .699(are e)108
+355.2 R -.15(xe)-.15 G 3.199(cuted. Aliases).15 F .699(are e)3.199 F
+.699(xpanded when a function de\214nition is read, not when the functio\
+n is e)-.15 F -.15(xe)-.15 G(cuted,).15 E .494
+(because a function de\214nition is itself a compound command.)108 367.2
+R .495(As a consequence, aliases de\214ned in a func-)5.494 F .085
+(tion are not a)108 379.2 R -.25(va)-.2 G .084
+(ilable until after that function is e).25 F -.15(xe)-.15 G 2.584
+(cuted. T).15 F 2.584(ob)-.8 G 2.584(es)-2.584 G .084(afe, al)-2.584 F
+-.1(wa)-.1 G .084(ys put alias de\214nitions on a sepa-).1 F
+(rate line, and do not use)108 391.2 Q F3(alias)2.5 E F0
+(in compound commands.)2.5 E -.15(Fo)108 408 S 2.5(ra).15 G(lmost e)-2.5
+E -.15(ve)-.25 G(ry purpose, aliases are superseded by shell functions.)
+.15 E F1(FUNCTIONS)72 424.8 Q F0 3.467(As)108 436.8 S .967
+(hell function, de\214ned as described abo)-3.467 F 1.267 -.15(ve u)-.15
+H(nder).15 E F4 .967(SHELL GRAMMAR)3.467 F/F5 9/Times-Roman@0 SF(,)A F0
+.968(stores a series of commands for)3.217 F 1.002(later e)108 448.8 R
+-.15(xe)-.15 G 3.502(cution. When).15 F 1.002(the name of a shell funct\
+ion is used as a simple command name, the list of com-)3.502 F .315
+(mands associated with that function name is e)108 460.8 R -.15(xe)-.15
+G 2.816(cuted. Functions).15 F .316(are e)2.816 F -.15(xe)-.15 G .316
+(cuted in the conte).15 F .316(xt of the current)-.15 F .036
+(shell; no ne)108 472.8 R 2.536(wp)-.25 G .036
+(rocess is created to interpret them \(contrast this with the e)-2.536 F
+-.15(xe)-.15 G .036(cution of a shell script\).).15 F .035(When a)5.035
+F .639(function is e)108 484.8 R -.15(xe)-.15 G .639(cuted, the ar).15 F
+.639
+(guments to the function become the positional parameters during its e)
+-.18 F -.15(xe)-.15 G(cution.).15 E .533(The special parameter)108 496.8
+R F3(#)3.033 E F0 .532(is updated to re\215ect the change.)3.033 F .532
+(Special parameter 0 is unchanged.)5.532 F .532(The \214rst ele-)5.532 F
+(ment of the)108 508.8 Q F4(FUNCN)2.5 E(AME)-.18 E F0 -.25(va)2.25 G
+(riable is set to the name of the function while the function is e).25 E
+-.15(xe)-.15 G(cuting.).15 E 1.25(All other aspects of the shell e)108
+525.6 R -.15(xe)-.15 G 1.25(cution en).15 F 1.25
+(vironment are identical between a function and its caller with)-.4 F
+1.049(these e)108 537.6 R 3.548(xceptions: the)-.15 F F4(DEB)3.548 E(UG)
+-.09 E F0(and)3.298 E F3(RETURN)3.548 E F0 1.048
+(traps \(see the description of the)3.548 F F3(trap)3.548 E F0 -.2(bu)
+3.548 G 1.048(iltin under).2 F F4(SHELL)3.548 E -.09(BU)108 549.6 S(IL)
+.09 E .478(TIN COMMANDS)-.828 F F0(belo)2.728 E .479
+(w\) are not inherited unless the function has been gi)-.25 F -.15(ve)
+-.25 G 2.979(nt).15 G(he)-2.979 E F3(trace)2.979 E F0(attrib)2.979 E
+.479(ute \(see)-.2 F .421(the description of the)108 561.6 R F4(declar)
+2.92 E(e)-.162 E F0 -.2(bu)2.67 G .42(iltin belo).2 F .42(w\) or the)
+-.25 F F3 .42(\255o functrace)2.92 F F0 .42
+(shell option has been enabled with the)2.92 F F3(set)2.92 E F0 -.2(bu)
+108 573.6 S .071(iltin \(in which case all functions inherit the).2 F F3
+(DEB)2.572 E(UG)-.1 E F0(and)2.572 E F3(RETURN)2.572 E F0 .072
+(traps\), and the)2.572 F F4(ERR)2.572 E F0 .072(trap is not inher)2.322
+F(-)-.2 E(ited unless the)108 585.6 Q F3(\255o errtrace)2.5 E F0
+(shell option has been enabled.)2.5 E -1.11(Va)108 602.4 S .656
+(riables local to the function may be declared with the)1.11 F F3(local)
+3.155 E F0 -.2(bu)3.155 G .655(iltin command.).2 F(Ordinarily)5.655 E
+3.155(,v)-.65 G .655(ariables and)-3.405 F(their v)108 614.4 Q
+(alues are shared between the function and its caller)-.25 E(.)-.55 E
+.043(If the b)108 631.2 R .043(uiltin command)-.2 F F3 -.18(re)2.543 G
+(tur).18 E(n)-.15 E F0 .043(is e)2.543 F -.15(xe)-.15 G .043
+(cuted in a function, the function completes and e).15 F -.15(xe)-.15 G
+.044(cution resumes with).15 F 1.012(the ne)108 643.2 R 1.012
+(xt command after the function call.)-.15 F(An)6.011 E 3.511(yc)-.15 G
+1.011(ommand associated with the)-3.511 F F3(RETURN)3.511 E F0 1.011
+(trap is e)3.511 F -.15(xe)-.15 G(cuted).15 E .213(before e)108 655.2 R
+-.15(xe)-.15 G .213(cution resumes.).15 F .213
+(When a function completes, the v)5.213 F .214
+(alues of the positional parameters and the spe-)-.25 F(cial parameter)
+108 667.2 Q F3(#)2.5 E F0(are restored to the v)2.5 E(alues the)-.25 E
+2.5(yh)-.15 G(ad prior to the function')-2.5 E 2.5(se)-.55 G -.15(xe)
+-2.65 G(cution.).15 E 1.359
+(Function names and de\214nitions may be listed with the)108 684 R F3
+<ad66>3.858 E F0 1.358(option to the)3.858 F F3(declar)3.858 E(e)-.18 E
+F0(or)3.858 E F3(typeset)3.858 E F0 -.2(bu)3.858 G 1.358(iltin com-).2 F
+3.39(mands. The)108 696 R F3<ad46>3.39 E F0 .89(option to)3.39 F F3
+(declar)3.39 E(e)-.18 E F0(or)3.39 E F3(typeset)3.39 E F0 .89
+(will list the function names only \(and optionally the source)3.39 F
+.327(\214le and line number)108 708 R 2.827(,i)-.4 G 2.827(ft)-2.827 G
+(he)-2.827 E F3(extdeb)2.827 E(ug)-.2 E F0 .326
+(shell option is enabled\).)2.827 F .326(Functions may be e)5.326 F .326
+(xported so that subshells)-.15 F 1.297(automatically ha)108 720 R 1.597
+-.15(ve t)-.2 H 1.297(hem de\214ned with the).15 F F3<ad66>3.797 E F0
+1.297(option to the)3.797 F F3(export)3.798 E F0 -.2(bu)3.798 G 3.798
+(iltin. A).2 F 1.298(function de\214nition may be)3.798 F(GNU Bash-4.1)
+72 768 Q(2009 December 29)135.965 E(26)185.955 E 0 Cg EP
+%%Page: 27 27
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E .161(deleted using the)108 84 R/F1 10/Times-Bold@0 SF<ad66>2.661
+E F0 .161(option to the)2.661 F F1(unset)2.661 E F0 -.2(bu)2.661 G 2.661
+(iltin. Note).2 F .16(that shell functions and v)2.661 F .16
+(ariables with the same name)-.25 F 1.325
+(may result in multiple identically-named entries in the en)108 96 R
+1.325(vironment passed to the shell')-.4 F 3.825(sc)-.55 G 3.825
+(hildren. Care)-3.825 F(should be tak)108 108 Q
+(en in cases where this may cause a problem.)-.1 E
+(Functions may be recursi)108 124.8 Q -.15(ve)-.25 G 5(.N).15 G 2.5(ol)
+-5 G(imit is imposed on the number of recursi)-2.5 E .3 -.15(ve c)-.25 H
+(alls.).15 E/F2 10.95/Times-Bold@0 SF(ARITHMETIC EV)72 141.6 Q(ALU)
+-1.478 E -1.04(AT)-.657 G(ION)1.04 E F0 2.298(The shell allo)108 153.6 R
+2.297(ws arithmetic e)-.25 F 2.297(xpressions to be e)-.15 F -.25(va)
+-.25 G 2.297(luated, under certain circumstances \(see the).25 F F1(let)
+4.797 E F0(and)4.797 E F1(declar)108 165.6 Q(e)-.18 E F0 -.2(bu)2.705 G
+.205(iltin commands and).2 F F1 .205(Arithmetic Expansion)2.705 F F0
+2.705(\). Ev)B .205(aluation is done in \214x)-.25 F .206(ed-width inte)
+-.15 F .206(gers with no)-.15 F .429(check for o)108 177.6 R -.15(ve)
+-.15 G(r\215o).15 E 1.729 -.65(w, t)-.25 H .429(hough di).65 F .428
+(vision by 0 is trapped and \215agged as an error)-.25 F 5.428(.T)-.55 G
+.428(he operators and their prece-)-5.428 F 1.919(dence, associati)108
+189.6 R(vity)-.25 E 4.419(,a)-.65 G 1.919(nd v)-4.419 F 1.919
+(alues are the same as in the C language.)-.25 F 1.92(The follo)6.92 F
+1.92(wing list of operators is)-.25 F(grouped into le)108 201.6 Q -.15
+(ve)-.25 G(ls of equal-precedence operators.).15 E(The le)5 E -.15(ve)
+-.25 G(ls are listed in order of decreasing precedence.).15 E/F3 10
+/Times-Italic@0 SF(id)108 218.4 Q F1(++)A F3(id)2.5 E F1<adad>A F0 -.25
+(va)144 230.4 S(riable post-increment and post-decrement).25 E F1(++)108
+242.4 Q F3(id)A F1<adad>2.5 E F3(id)A F0 -.25(va)144 254.4 S
+(riable pre-increment and pre-decrement).25 E F1 2.5<ad2b>108 266.4 S F0
+(unary minus and plus)19.6 E F1 2.5(!~)108 278.4 S F0
+(logical and bitwise ne)24.34 E -.05(ga)-.15 G(tion).05 E F1(**)108
+290.4 Q F0 -.15(ex)26 G(ponentiation).15 E F1 2.5(*/%)108 302.4 S F0
+(multiplication, di)10.72 E(vision, remainder)-.25 E F1 2.5<2bad>108
+314.4 S F0(addition, subtraction)19.6 E F1(<< >>)108 326.4 Q F0
+(left and right bitwise shifts)10.7 E F1(<= >= < >)108 338.4 Q F0
+(comparison)144 350.4 Q F1(== !=)108 362.4 Q F0(equality and inequality)
+13.07 E F1(&)108 374.4 Q F0(bitwise AND)27.67 E F1(^)108 386.4 Q F0
+(bitwise e)32.67 E(xclusi)-.15 E .3 -.15(ve O)-.25 H(R).15 E F1(|)108
+398.4 Q F0(bitwise OR)33.8 E F1(&&)108 410.4 Q F0(logical AND)19.34 E F1
+(||)108 422.4 Q F0(logical OR)31.6 E F3 -.2(ex)108 434.4 S(pr).2 E F1(?)
+A F3 -.2(ex)C(pr).2 E F1(:)A F3 -.2(ex)C(pr).2 E F0
+(conditional operator)144 446.4 Q F1 2.5(=*)108 458.4 S 2.5(=/)-2.5 G
+2.5(=%)-2.5 G 2.5(=+)-2.5 G 2.5<3dad>-2.5 G 2.5(=<)-2.5 G
+(<= >>= &= ^= |=)-2.5 E F0(assignment)144 470.4 Q F3 -.2(ex)108 482.4 S
+(pr1).2 E F1(,)2.5 E F3 -.2(ex)2.5 G(pr2).2 E F0(comma)144 494.4 Q .68
+(Shell v)108 511.2 R .68(ariables are allo)-.25 F .68
+(wed as operands; parameter e)-.25 F .68
+(xpansion is performed before the e)-.15 F .68(xpression is e)-.15 F
+-.25(va)-.25 G(lu-).25 E 3.507(ated. W)108 523.2 R 1.007(ithin an e)-.4
+F 1.007(xpression, shell v)-.15 F 1.007
+(ariables may also be referenced by name without using the parameter)
+-.25 F -.15(ex)108 535.2 S 1.041(pansion syntax.).15 F 3.541(As)6.041 G
+1.041(hell v)-3.541 F 1.041(ariable that is null or unset e)-.25 F -.25
+(va)-.25 G 1.04(luates to 0 when referenced by name without).25 F 1.466
+(using the parameter e)108 547.2 R 1.466(xpansion syntax.)-.15 F 1.467
+(The v)6.466 F 1.467(alue of a v)-.25 F 1.467(ariable is e)-.25 F -.25
+(va)-.25 G 1.467(luated as an arithmetic e).25 F(xpression)-.15 E 1.39
+(when it is referenced, or when a v)108 559.2 R 1.389
+(ariable which has been gi)-.25 F -.15(ve)-.25 G 3.889(nt).15 G(he)
+-3.889 E F3(inte)3.889 E -.1(ge)-.4 G(r).1 E F0(attrib)3.889 E 1.389
+(ute using)-.2 F F1(declar)3.889 E 3.889(e-)-.18 G(i)-3.889 E F0(is)
+3.889 E .343(assigned a v)108 571.2 R 2.843(alue. A)-.25 F .343(null v)
+2.843 F .343(alue e)-.25 F -.25(va)-.25 G .343(luates to 0.).25 F 2.843
+(As)5.343 G .343(hell v)-2.843 F .343(ariable need not ha)-.25 F .643
+-.15(ve i)-.2 H .343(ts inte).15 F .344(ger attrib)-.15 F .344
+(ute turned on)-.2 F(to be used in an e)108 583.2 Q(xpression.)-.15 E
+1.406(Constants with a leading 0 are interpreted as octal numbers.)108
+600 R 3.906(Al)6.406 G 1.406(eading 0x or 0X denotes he)-3.906 F
+(xadecimal.)-.15 E .589(Otherwise, numbers tak)108 612 R 3.089(et)-.1 G
+.589(he form [)-3.089 F F3(base#)A F0 .589(]n, where)B F3(base)3.089 E
+F0 .59(is a decimal number between 2 and 64 represent-)3.089 F .093
+(ing the arithmetic base, and)108 624 R F3(n)2.593 E F0 .093
+(is a number in that base.)2.593 F(If)5.093 E F3(base#)2.593 E F0 .092
+(is omitted, then base 10 is used.)2.593 F .092(The digits)5.092 F .064
+(greater than 9 are represented by the lo)108 636 R .064
+(wercase letters, the uppercase letters, @, and _, in that order)-.25 F
+5.065(.I)-.55 G(f)-5.065 E F3(base)2.565 E F0 .433
+(is less than or equal to 36, lo)108 648 R .432(wercase and uppercase l\
+etters may be used interchangeably to represent num-)-.25 F
+(bers between 10 and 35.)108 660 Q .234(Operators are e)108 676.8 R -.25
+(va)-.25 G .234(luated in order of precedence.).25 F(Sub-e)5.234 E .234
+(xpressions in parentheses are e)-.15 F -.25(va)-.25 G .235
+(luated \214rst and may).25 F -.15(ove)108 688.8 S
+(rride the precedence rules abo).15 E -.15(ve)-.15 G(.).15 E F2
+(CONDITION)72 705.6 Q(AL EXPRESSIONS)-.219 E F0 .256(Conditional e)108
+717.6 R .256(xpressions are used by the)-.15 F F1([[)2.755 E F0 .255
+(compound command and the)2.755 F F1(test)2.755 E F0(and)2.755 E F1([)
+2.755 E F0 -.2(bu)2.755 G .255(iltin commands to test).2 F .77
+(\214le attrib)108 729.6 R .77
+(utes and perform string and arithmetic comparisons.)-.2 F .77
+(Expressions are formed from the follo)5.77 F(wing)-.25 E(GNU Bash-4.1)
+72 768 Q(2009 December 29)135.965 E(27)185.955 E 0 Cg EP
+%%Page: 28 28
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E 1.041(unary or binary primaries.)108 84 R 1.041(If an)6.041 F(y)
+-.15 E/F1 10/Times-Italic@0 SF(\214le)3.541 E F0(ar)3.541 E 1.04
+(gument to one of the primaries is of the form)-.18 F F1(/de)3.54 E
+(v/fd/n)-.15 E F0 3.54(,t)C 1.04(hen \214le)-3.54 F(descriptor)108 96 Q
+F1(n)3.788 E F0 1.289(is check)3.788 F 3.789(ed. If)-.1 F(the)3.789 E F1
+(\214le)3.789 E F0(ar)3.789 E 1.289
+(gument to one of the primaries is one of)-.18 F F1(/de)3.789 E(v/stdin)
+-.15 E F0(,)A F1(/de)3.789 E(v/stdout)-.15 E F0 3.789(,o)C(r)-3.789 E F1
+(/de)108 108 Q(v/stderr)-.15 E F0 2.5<2c8c>C
+(le descriptor 0, 1, or 2, respecti)-2.5 E -.15(ve)-.25 G(ly).15 E 2.5
+(,i)-.65 G 2.5(sc)-2.5 G(heck)-2.5 E(ed.)-.1 E .722
+(Unless otherwise speci\214ed, primaries that operate on \214les follo)
+108 124.8 R 3.221(ws)-.25 G .721(ymbolic links and operate on the tar)
+-3.221 F(get)-.18 E(of the link, rather than the link itself.)108 136.8
+Q(When used with)108 154.8 Q/F2 10/Times-Bold@0 SF([[)2.5 E F0 2.5(,T)C
+(he)-2.5 E F2(<)2.5 E F0(and)2.5 E F2(>)2.5 E F0(operators sort le)2.5 E
+(xicographically using the current locale.)-.15 E F2<ad61>108 178.8 Q F1
+(\214le)2.5 E F0 -.35(Tr)10.58 G(ue if).35 E F1(\214le)2.5 E F0 -.15(ex)
+2.5 G(ists.).15 E F2<ad62>108 190.8 Q F1(\214le)2.5 E F0 -.35(Tr)10.02 G
+(ue if).35 E F1(\214le)2.5 E F0 -.15(ex)2.5 G
+(ists and is a block special \214le.).15 E F2<ad63>108 202.8 Q F1
+(\214le)2.5 E F0 -.35(Tr)11.14 G(ue if).35 E F1(\214le)2.5 E F0 -.15(ex)
+2.5 G(ists and is a character special \214le.).15 E F2<ad64>108 214.8 Q
+F1(\214le)2.5 E F0 -.35(Tr)10.02 G(ue if).35 E F1(\214le)2.5 E F0 -.15
+(ex)2.5 G(ists and is a directory).15 E(.)-.65 E F2<ad65>108 226.8 Q F1
+(\214le)2.5 E F0 -.35(Tr)11.14 G(ue if).35 E F1(\214le)2.5 E F0 -.15(ex)
+2.5 G(ists.).15 E F2<ad66>108 238.8 Q F1(\214le)2.5 E F0 -.35(Tr)12.25 G
+(ue if).35 E F1(\214le)2.5 E F0 -.15(ex)2.5 G(ists and is a re).15 E
+(gular \214le.)-.15 E F2<ad67>108 250.8 Q F1(\214le)2.5 E F0 -.35(Tr)
+10.58 G(ue if).35 E F1(\214le)2.5 E F0 -.15(ex)2.5 G
+(ists and is set-group-id.).15 E F2<ad68>108 262.8 Q F1(\214le)2.5 E F0
+-.35(Tr)10.02 G(ue if).35 E F1(\214le)2.5 E F0 -.15(ex)2.5 G
+(ists and is a symbolic link.).15 E F2<ad6b>108 274.8 Q F1(\214le)2.5 E
+F0 -.35(Tr)10.02 G(ue if).35 E F1(\214le)2.5 E F0 -.15(ex)2.5 G
+(ists and its `).15 E(`stick)-.74 E(y')-.15 E 2.5('b)-.74 G(it is set.)
+-2.5 E F2<ad70>108 286.8 Q F1(\214le)2.5 E F0 -.35(Tr)10.02 G(ue if).35
+E F1(\214le)2.5 E F0 -.15(ex)2.5 G(ists and is a named pipe \(FIFO\).)
+.15 E F2<ad72>108 298.8 Q F1(\214le)2.5 E F0 -.35(Tr)11.14 G(ue if).35 E
+F1(\214le)2.5 E F0 -.15(ex)2.5 G(ists and is readable.).15 E F2<ad73>108
+310.8 Q F1(\214le)2.5 E F0 -.35(Tr)11.69 G(ue if).35 E F1(\214le)2.5 E
+F0 -.15(ex)2.5 G(ists and has a size greater than zero.).15 E F2<ad74>
+108 322.8 Q F1(fd)2.5 E F0 -.35(Tr)16.69 G(ue if \214le descriptor).35 E
+F1(fd)4.47 E F0(is open and refers to a terminal.)3.27 E F2<ad75>108
+334.8 Q F1(\214le)2.5 E F0 -.35(Tr)10.02 G(ue if).35 E F1(\214le)2.5 E
+F0 -.15(ex)2.5 G(ists and its set-user).15 E(-id bit is set.)-.2 E F2
+<ad77>108 346.8 Q F1(\214le)2.5 E F0 -.35(Tr)8.36 G(ue if).35 E F1
+(\214le)2.5 E F0 -.15(ex)2.5 G(ists and is writable.).15 E F2<ad78>108
+358.8 Q F1(\214le)2.5 E F0 -.35(Tr)10.58 G(ue if).35 E F1(\214le)2.5 E
+F0 -.15(ex)2.5 G(ists and is e).15 E -.15(xe)-.15 G(cutable.).15 E F2
+<ad4f>108 370.8 Q F1(\214le)2.5 E F0 -.35(Tr)7.8 G(ue if).35 E F1
+(\214le)2.5 E F0 -.15(ex)2.5 G(ists and is o).15 E(wned by the ef)-.25 E
+(fecti)-.25 E .3 -.15(ve u)-.25 H(ser id.).15 E F2<ad47>108 382.8 Q F1
+(\214le)2.5 E F0 -.35(Tr)7.8 G(ue if).35 E F1(\214le)2.5 E F0 -.15(ex)
+2.5 G(ists and is o).15 E(wned by the ef)-.25 E(fecti)-.25 E .3 -.15
+(ve g)-.25 H(roup id.).15 E F2<ad4c>108 394.8 Q F1(\214le)2.5 E F0 -.35
+(Tr)8.91 G(ue if).35 E F1(\214le)2.5 E F0 -.15(ex)2.5 G
+(ists and is a symbolic link.).15 E F2<ad53>108 406.8 Q F1(\214le)2.5 E
+F0 -.35(Tr)10.02 G(ue if).35 E F1(\214le)2.5 E F0 -.15(ex)2.5 G
+(ists and is a sock).15 E(et.)-.1 E F2<ad4e>108 418.8 Q F1(\214le)2.5 E
+F0 -.35(Tr)8.36 G(ue if).35 E F1(\214le)2.5 E F0 -.15(ex)2.5 G
+(ists and has been modi\214ed since it w).15 E(as last read.)-.1 E F1
+(\214le1)108 430.8 Q F0<ad>2.5 E F2(nt)A F1(\214le2)2.5 E F0 -.35(Tr)144
+442.8 S .038(ue if).35 F F1(\214le1)2.538 E F0 .039(is ne)2.539 F .039
+(wer \(according to modi\214cation date\) than)-.25 F F1(\214le2)2.539 E
+F0 2.539(,o)C 2.539(ri)-2.539 G(f)-2.539 E F1(\214le1)2.539 E F0 -.15
+(ex)2.539 G .039(ists and).15 F F1(\214le2)2.539 E F0 .039(does not.)
+2.539 F F1(\214le1)108 454.8 Q F0<ad>2.5 E F2(ot)A F1(\214le2)2.5 E F0
+-.35(Tr)144 466.8 S(ue if).35 E F1(\214le1)2.5 E F0(is older than)2.5 E
+F1(\214le2)2.5 E F0 2.5(,o)C 2.5(ri)-2.5 G(f)-2.5 E F1(\214le2)2.5 E F0
+-.15(ex)2.5 G(ists and).15 E F1(\214le1)2.5 E F0(does not.)2.5 E F1
+(\214le1)108 478.8 Q F2(\255ef)2.5 E F1(\214le2)2.5 E F0 -.35(Tr)144
+490.8 S(ue if).35 E F1(\214le1)2.5 E F0(and)2.5 E F1(\214le2)2.5 E F0
+(refer to the same de)2.5 E(vice and inode numbers.)-.25 E F2<ad6f>108
+502.8 Q F1(optname)2.5 E F0 -.35(Tr)144 514.8 S 1.144
+(ue if shell option).35 F F1(optname)3.874 E F0 1.144(is enabled.)3.824
+F 1.143(See the list of options under the description of the)6.144 F F2
+<ad6f>3.643 E F0(option to the)144 526.8 Q F2(set)2.5 E F0 -.2(bu)2.5 G
+(iltin belo).2 E -.65(w.)-.25 G F2<ad7a>108 538.8 Q F1(string)2.5 E F0
+-.35(Tr)144 550.8 S(ue if the length of).35 E F1(string)2.5 E F0
+(is zero.)2.5 E F1(string)108 562.8 Q F2<ad6e>108 574.8 Q F1(string)2.5
+E F0 -.35(Tr)144 586.8 S(ue if the length of).35 E F1(string)2.84 E F0
+(is non-zero.)2.72 E F1(string1)108 603.6 Q F2(==)2.5 E F1(string2)2.5 E
+(string1)108 615.6 Q F2(=)2.5 E F1(string2)2.5 E F0 -.35(Tr)144 627.6 S
+(ue if the strings are equal.).35 E F2(=)5 E F0(should be used with the)
+2.5 E F2(test)2.5 E F0(command for POSIX conformance.)2.5 E F1(string1)
+108 644.4 Q F2(!=)2.5 E F1(string2)2.5 E F0 -.35(Tr)144 656.4 S
+(ue if the strings are not equal.).35 E F1(string1)108 673.2 Q F2(<)2.5
+E F1(string2)2.5 E F0 -.35(Tr)144 685.2 S(ue if).35 E F1(string1)2.5 E
+F0(sorts before)2.5 E F1(string2)2.5 E F0(le)2.5 E(xicographically)-.15
+E(.)-.65 E F1(string1)108 702 Q F2(>)2.5 E F1(string2)2.5 E F0 -.35(Tr)
+144 714 S(ue if).35 E F1(string1)2.5 E F0(sorts after)2.5 E F1(string2)
+2.5 E F0(le)2.5 E(xicographically)-.15 E(.)-.65 E(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(28)185.955 E 0 Cg EP
+%%Page: 29 29
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Italic@0 SF(ar)108.33 84 Q(g1)-.37 E/F2 10
+/Times-Bold@0 SF(OP)2.5 E F1(ar)2.5 E(g2)-.37 E/F3 9/Times-Bold@0 SF(OP)
+144 96 Q F0 .385(is one of)2.634 F F2(\255eq)2.885 E F0(,)A F2(\255ne)
+2.885 E F0(,)A F2(\255lt)2.885 E F0(,)A F2(\255le)2.885 E F0(,)A F2
+(\255gt)2.885 E F0 2.885(,o)C(r)-2.885 E F2(\255ge)2.885 E F0 5.385(.T)C
+.385(hese arithmetic binary operators return true if)-5.385 F F1(ar)
+2.885 E(g1)-.37 E F0 .845(is equal to, not equal to, less than, less th\
+an or equal to, greater than, or greater than or equal to)144 108 R F1
+(ar)144 120 Q(g2)-.37 E F0 2.5(,r)C(especti)-2.5 E -.15(ve)-.25 G(ly).15
+E(.)-.65 E F1(Ar)6.01 E(g1)-.37 E F0(and)2.5 E F1(ar)2.83 E(g2)-.37 E F0
+(may be positi)2.52 E .3 -.15(ve o)-.25 H 2.5(rn).15 G -2.25 -.15(eg a)
+-2.5 H(ti).15 E .3 -.15(ve i)-.25 H(nte).15 E(gers.)-.15 E/F4 10.95
+/Times-Bold@0 SF(SIMPLE COMMAND EXP)72 136.8 Q(ANSION)-.81 E F0 .613
+(When a simple command is e)108 148.8 R -.15(xe)-.15 G .614
+(cuted, the shell performs the follo).15 F .614(wing e)-.25 F .614
+(xpansions, assignments, and redi-)-.15 F(rections, from left to right.)
+108 160.8 Q 26(1. The)108 177.6 R -.1(wo)4.349 G 1.849
+(rds that the parser has mark).1 F 1.848(ed as v)-.1 F 1.848
+(ariable assignments \(those preceding the command)-.25 F
+(name\) and redirections are sa)144 189.6 Q -.15(ve)-.2 G 2.5(df).15 G
+(or later processing.)-2.5 E 26(2. The)108 206.4 R -.1(wo)3.663 G 1.163
+(rds that are not v).1 F 1.164
+(ariable assignments or redirections are e)-.25 F 3.664(xpanded. If)-.15
+F(an)3.664 E 3.664(yw)-.15 G 1.164(ords remain)-3.764 F .776(after e)144
+218.4 R .776(xpansion, the \214rst w)-.15 F .776(ord is tak)-.1 F .775
+(en to be the name of the command and the remaining w)-.1 F(ords)-.1 E
+(are the ar)144 230.4 Q(guments.)-.18 E 26(3. Redirections)108 247.2 R
+(are performed as described abo)2.5 E .3 -.15(ve u)-.15 H(nder).15 E F3
+(REDIRECTION)2.5 E/F5 9/Times-Roman@0 SF(.)A F0 26(4. The)108 264 R(te)
+3.216 E .717(xt after the)-.15 F F2(=)3.217 E F0 .717(in each v)3.217 F
+.717(ariable assignment under)-.25 F .717(goes tilde e)-.18 F .717
+(xpansion, parameter e)-.15 F(xpansion,)-.15 E .34
+(command substitution, arithmetic e)144 276 R .339
+(xpansion, and quote remo)-.15 F -.25(va)-.15 G 2.839(lb).25 G .339
+(efore being assigned to the v)-2.839 F(ari-)-.25 E(able.)144 288 Q .332
+(If no command name results, the v)108 304.8 R .332
+(ariable assignments af)-.25 F .332(fect the current shell en)-.25 F
+2.833(vironment. Otherwise,)-.4 F(the)2.833 E -.25(va)108 316.8 S .757
+(riables are added to the en).25 F .757(vironment of the e)-.4 F -.15
+(xe)-.15 G .757(cuted command and do not af).15 F .757
+(fect the current shell en)-.25 F(vi-)-.4 E 3.176(ronment. If)108 328.8
+R(an)3.176 E 3.176(yo)-.15 G 3.176(ft)-3.176 G .677
+(he assignments attempts to assign a v)-3.176 F .677
+(alue to a readonly v)-.25 F .677(ariable, an error occurs, and)-.25 F
+(the command e)108 340.8 Q(xits with a non-zero status.)-.15 E .15
+(If no command name results, redirections are performed, b)108 357.6 R
+.149(ut do not af)-.2 F .149(fect the current shell en)-.25 F 2.649
+(vironment. A)-.4 F(redirection error causes the command to e)108 369.6
+Q(xit with a non-zero status.)-.15 E 1.064
+(If there is a command name left after e)108 386.4 R 1.064(xpansion, e)
+-.15 F -.15(xe)-.15 G 1.064(cution proceeds as described belo).15 F
+4.864 -.65(w. O)-.25 H 1.064(therwise, the).65 F .069(command e)108
+398.4 R 2.569(xits. If)-.15 F .069(one of the e)2.569 F .069
+(xpansions contained a command substitution, the e)-.15 F .068
+(xit status of the command)-.15 F .466(is the e)108 410.4 R .466
+(xit status of the last command substitution performed.)-.15 F .467
+(If there were no command substitutions, the)5.466 F(command e)108 422.4
+Q(xits with a status of zero.)-.15 E F4(COMMAND EXECUTION)72 439.2 Q F0
+.547(After a command has been split into w)108 451.2 R .546
+(ords, if it results in a simple command and an optional list of ar)-.1
+F(gu-)-.18 E(ments, the follo)108 463.2 Q(wing actions are tak)-.25 E
+(en.)-.1 E .379(If the command name contains no slashes, the shell atte\
+mpts to locate it.)108 480 R .379(If there e)5.379 F .379
+(xists a shell function by)-.15 F .246(that name, that function is in)
+108 492 R -.2(vo)-.4 G -.1(ke).2 G 2.746(da).1 G 2.746(sd)-2.746 G .246
+(escribed abo)-2.746 F .546 -.15(ve i)-.15 H(n).15 E F3(FUNCTIONS)2.746
+E F5(.)A F0 .246(If the name does not match a func-)4.746 F
+(tion, the shell searches for it in the list of shell b)108 504 Q 2.5
+(uiltins. If)-.2 F 2.5(am)2.5 G(atch is found, that b)-2.5 E
+(uiltin is in)-.2 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E .309
+(If the name is neither a shell function nor a b)108 520.8 R .31
+(uiltin, and contains no slashes,)-.2 F F2(bash)2.81 E F0 .31
+(searches each element of)2.81 F(the)108 532.8 Q F3 -.666(PA)3.163 G(TH)
+-.189 E F0 .662(for a directory containing an e)2.913 F -.15(xe)-.15 G
+.662(cutable \214le by that name.).15 F F2(Bash)5.662 E F0 .662
+(uses a hash table to remember)3.162 F 1.914(the full pathnames of e)108
+544.8 R -.15(xe)-.15 G 1.915(cutable \214les \(see).15 F F2(hash)4.415 E
+F0(under)4.415 E F3 1.915(SHELL B)4.415 F(UIL)-.09 E 1.915(TIN COMMANDS)
+-.828 F F0(belo)4.165 E 4.415(w\). A)-.25 F(full)4.415 E .72
+(search of the directories in)108 556.8 R F3 -.666(PA)3.22 G(TH)-.189 E
+F0 .719
+(is performed only if the command is not found in the hash table.)2.97 F
+.719(If the)5.719 F .956(search is unsuccessful, the shell searches for\
+ a de\214ned shell function named)108 568.8 R F2(command_not_f)3.456 E
+(ound_han-)-.25 E(dle)108 580.8 Q F0 5.278(.I)C 2.778(ft)-5.278 G .278
+(hat function e)-2.778 F .278(xists, it is in)-.15 F -.2(vo)-.4 G -.1
+(ke).2 G 2.778(dw).1 G .277
+(ith the original command and the original command')-2.778 F 2.777(sa)
+-.55 G -.18(rg)-2.777 G(uments).18 E .775(as its ar)108 592.8 R .775
+(guments, and the function')-.18 F 3.275(se)-.55 G .775
+(xit status becomes the e)-3.425 F .775(xit status of the shell.)-.15 F
+.776(If that function is not)5.776 F
+(de\214ned, the shell prints an error message and returns an e)108 604.8
+Q(xit status of 127.)-.15 E 1.089(If the search is successful, or if th\
+e command name contains one or more slashes, the shell e)108 621.6 R
+-.15(xe)-.15 G 1.089(cutes the).15 F .197(named program in a separate e)
+108 633.6 R -.15(xe)-.15 G .197(cution en).15 F 2.698(vironment. Ar)-.4
+F .198(gument 0 is set to the name gi)-.18 F -.15(ve)-.25 G .198
+(n, and the remain-).15 F(ing ar)108 645.6 Q
+(guments to the command are set to the ar)-.18 E(guments gi)-.18 E -.15
+(ve)-.25 G(n, if an).15 E -.65(y.)-.15 G 1.809(If this e)108 662.4 R
+-.15(xe)-.15 G 1.809(cution f).15 F 1.809
+(ails because the \214le is not in e)-.1 F -.15(xe)-.15 G 1.809
+(cutable format, and the \214le is not a directory).15 F 4.309(,i)-.65 G
+4.309(ti)-4.309 G(s)-4.309 E .677(assumed to be a)108 674.4 R F1 .678
+(shell script)3.177 F F0 3.178(,a\214)C .678
+(le containing shell commands.)-3.178 F 3.178(As)5.678 G .678
+(ubshell is spa)-3.178 F .678(wned to e)-.15 F -.15(xe)-.15 G .678
+(cute it.).15 F(This)5.678 E .33
+(subshell reinitializes itself, so that the ef)108 686.4 R .33
+(fect is as if a ne)-.25 F 2.829(ws)-.25 G .329(hell had been in)-2.829
+F -.2(vo)-.4 G -.1(ke).2 G 2.829(dt).1 G 2.829(oh)-2.829 G .329
+(andle the script, with)-2.829 F 1.219(the e)108 698.4 R 1.219
+(xception that the locations of commands remembered by the parent \(see)
+-.15 F F2(hash)3.719 E F0(belo)3.719 E 3.719(wu)-.25 G(nder)-3.719 E F3
+(SHELL)3.719 E -.09(BU)108 710.4 S(IL).09 E(TIN COMMANDS)-.828 E F5(\))A
+F0(are retained by the child.)2.25 E 1.375
+(If the program is a \214le be)108 727.2 R 1.374(ginning with)-.15 F F2
+(#!)3.874 E F0 3.874(,t)C 1.374
+(he remainder of the \214rst line speci\214es an interpreter for the)
+-3.874 F(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(29)185.955 E 0
+Cg EP
+%%Page: 30 30
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E 5.485(program. The)108 84 R 2.985(shell e)5.485 F -.15(xe)-.15 G
+2.986(cutes the speci\214ed interpreter on operating systems that do no\
+t handle this).15 F -.15(exe)108 96 S .762(cutable format themselv).15 F
+3.262(es. The)-.15 F(ar)3.262 E .761
+(guments to the interpreter consist of a single optional ar)-.18 F .761
+(gument fol-)-.18 F(lo)108 108 Q .156
+(wing the interpreter name on the \214rst line of the program, follo)
+-.25 F .157(wed by the name of the program, follo)-.25 F(wed)-.25 E
+(by the command ar)108 120 Q(guments, if an)-.18 E -.65(y.)-.15 G/F1
+10.95/Times-Bold@0 SF(COMMAND EXECUTION ENVIR)72 136.8 Q(ONMENT)-.329 E
+F0(The shell has an)108 148.8 Q/F2 10/Times-Italic@0 SF -.2(ex)2.5 G
+(ecution en).2 E(vir)-.4 E(onment)-.45 E F0 2.5(,w)C
+(hich consists of the follo)-2.5 E(wing:)-.25 E 32.5<836f>108 165.6 S
+1.406(pen \214les inherited by the shell at in)-32.5 F -.2(vo)-.4 G
+1.405(cation, as modi\214ed by redirections supplied to the).2 F/F3 10
+/Times-Bold@0 SF(exec)3.905 E F0 -.2(bu)144 177.6 S(iltin).2 E 32.5
+<8374>108 194.4 S(he current w)-32.5 E(orking directory as set by)-.1 E
+F3(cd)2.5 E F0(,)A F3(pushd)2.5 E F0 2.5(,o)C(r)-2.5 E F3(popd)2.5 E F0
+2.5(,o)C 2.5(ri)-2.5 G(nherited by the shell at in)-2.5 E -.2(vo)-.4 G
+(cation).2 E 32.5<8374>108 211.2 S
+(he \214le creation mode mask as set by)-32.5 E F3(umask)2.5 E F0
+(or inherited from the shell')2.5 E 2.5(sp)-.55 G(arent)-2.5 E 32.5
+<8363>108 228 S(urrent traps set by)-32.5 E F3(trap)2.5 E F0 32.5<8373>
+108 244.8 S .256(hell parameters that are set by v)-32.5 F .256
+(ariable assignment or with)-.25 F F3(set)2.756 E F0 .257
+(or inherited from the shell')2.756 F 2.757(sp)-.55 G(arent)-2.757 E
+(in the en)144 256.8 Q(vironment)-.4 E 32.5<8373>108 273.6 S
+(hell functions de\214ned during e)-32.5 E -.15(xe)-.15 G
+(cution or inherited from the shell').15 E 2.5(sp)-.55 G
+(arent in the en)-2.5 E(vironment)-.4 E 32.5<836f>108 290.4 S
+(ptions enabled at in)-32.5 E -.2(vo)-.4 G(cation \(either by def).2 E
+(ault or with command-line ar)-.1 E(guments\) or by)-.18 E F3(set)2.5 E
+F0 32.5<836f>108 307.2 S(ptions enabled by)-32.5 E F3(shopt)2.5 E F0
+32.5<8373>108 324 S(hell aliases de\214ned with)-32.5 E F3(alias)2.5 E
+F0 32.5<8376>108 340.8 S
+(arious process IDs, including those of background jobs, the v)-32.75 E
+(alue of)-.25 E F3($$)2.5 E F0 2.5(,a)C(nd the v)-2.5 E(alue of)-.25 E
+/F4 9/Times-Bold@0 SF(PPID)2.5 E F0 .427
+(When a simple command other than a b)108 357.6 R .426
+(uiltin or shell function is to be e)-.2 F -.15(xe)-.15 G .426
+(cuted, it is in).15 F -.2(vo)-.4 G -.1(ke).2 G 2.926(di).1 G 2.926(nas)
+-2.926 G(eparate)-2.926 E -.15(exe)108 369.6 S .133(cution en).15 F .133
+(vironment that consists of the follo)-.4 F 2.634(wing. Unless)-.25 F
+.134(otherwise noted, the v)2.634 F .134(alues are inherited from)-.25 F
+(the shell.)108 381.6 Q 32.5<8374>108 398.4 S 1.056(he shell')-32.5 F
+3.556(so)-.55 G 1.056(pen \214les, plus an)-3.556 F 3.556(ym)-.15 G
+1.056
+(odi\214cations and additions speci\214ed by redirections to the com-)
+-3.556 F(mand)144 410.4 Q 32.5<8374>108 427.2 S(he current w)-32.5 E
+(orking directory)-.1 E 32.5<8374>108 444 S
+(he \214le creation mode mask)-32.5 E 32.5<8373>108 460.8 S .856(hell v)
+-32.5 F .857(ariables and functions mark)-.25 F .857(ed for e)-.1 F .857
+(xport, along with v)-.15 F .857(ariables e)-.25 F .857
+(xported for the command,)-.15 F(passed in the en)144 472.8 Q(vironment)
+-.4 E 32.5<8374>108 489.6 S .307
+(raps caught by the shell are reset to the v)-32.5 F .306
+(alues inherited from the shell')-.25 F 2.806(sp)-.55 G .306
+(arent, and traps ignored)-2.806 F(by the shell are ignored)144 501.6 Q
+2.5(Ac)108 518.4 S(ommand in)-2.5 E -.2(vo)-.4 G -.1(ke).2 G 2.5(di).1 G
+2.5(nt)-2.5 G(his separate en)-2.5 E(vironment cannot af)-.4 E
+(fect the shell')-.25 E 2.5(se)-.55 G -.15(xe)-2.65 G(cution en).15 E
+(vironment.)-.4 E .577(Command substitution, commands grouped with pare\
+ntheses, and asynchronous commands are in)108 535.2 R -.2(vo)-.4 G -.1
+(ke).2 G 3.078(di).1 G(n)-3.078 E 2.745(as)108 547.2 S .245(ubshell en)
+-2.745 F .245(vironment that is a duplicate of the shell en)-.4 F .244
+(vironment, e)-.4 F .244(xcept that traps caught by the shell are)-.15 F
+.358(reset to the v)108 559.2 R .358
+(alues that the shell inherited from its parent at in)-.25 F -.2(vo)-.4
+G 2.858(cation. Builtin).2 F .359(commands that are in)2.859 F -.2(vo)
+-.4 G -.1(ke).2 G(d).1 E .857(as part of a pipeline are also e)108 571.2
+R -.15(xe)-.15 G .856(cuted in a subshell en).15 F 3.356
+(vironment. Changes)-.4 F .856(made to the subshell en)3.356 F(viron-)
+-.4 E(ment cannot af)108 583.2 Q(fect the shell')-.25 E 2.5(se)-.55 G
+-.15(xe)-2.65 G(cution en).15 E(vironment.)-.4 E 1.376(Subshells spa)108
+600 R 1.376(wned to e)-.15 F -.15(xe)-.15 G 1.377
+(cute command substitutions inherit the v).15 F 1.377(alue of the)-.25 F
+F3<ad65>3.877 E F0 1.377(option from the parent)3.877 F 2.5(shell. When)
+108 612 R(not in posix mode, Bash clears the)2.5 E F3<ad65>2.5 E F0
+(option in such subshells.)2.5 E .405(If a command is follo)108 628.8 R
+.405(wed by a)-.25 F F3(&)2.905 E F0 .404(and job control is not acti)
+2.905 F -.15(ve)-.25 G 2.904(,t).15 G .404(he def)-2.904 F .404
+(ault standard input for the command)-.1 F .197(is the empty \214le)108
+640.8 R F2(/de)2.697 E(v/null)-.15 E F0 5.197(.O)C .197
+(therwise, the in)-5.197 F -.2(vo)-.4 G -.1(ke).2 G 2.697(dc).1 G .198
+(ommand inherits the \214le descriptors of the calling shell)-2.697 F
+(as modi\214ed by redirections.)108 652.8 Q F1(ENVIR)72 669.6 Q(ONMENT)
+-.329 E F0 2.354(When a program is in)108 681.6 R -.2(vo)-.4 G -.1(ke).2
+G 4.853(di).1 G 4.853(ti)-4.853 G 4.853(sg)-4.853 G -2.15 -.25(iv e)
+-4.853 H 4.853(na).25 G 4.853(na)-4.853 G 2.353
+(rray of strings called the)-4.853 F F2(en)4.853 E(vir)-.4 E(onment)-.45
+E F0 7.353(.T).68 G 2.353(his is a list of)-7.353 F F2(name)108 693.6 Q
+F0<ad>A F2(value)A F0(pairs, of the form)2.5 E F2(name)2.5 E F0(=)A F2
+(value)A F0(.).18 E 1.485(The shell pro)108 710.4 R 1.485(vides se)-.15
+F -.15(ve)-.25 G 1.485(ral w).15 F 1.485(ays to manipulate the en)-.1 F
+3.985(vironment. On)-.4 F(in)3.985 E -.2(vo)-.4 G 1.486
+(cation, the shell scans its o).2 F(wn)-.25 E(en)108 722.4 Q 1.431(viro\
+nment and creates a parameter for each name found, automatically markin\
+g it for)-.4 F F2 -.2(ex)3.93 G(port).2 E F0 1.43(to child)4.61 F
+(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(30)185.955 E 0 Cg EP
+%%Page: 31 31
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E 4.177(processes. Ex)108 84 R 1.677
+(ecuted commands inherit the en)-.15 F 4.177(vironment. The)-.4 F/F1 10
+/Times-Bold@0 SF(export)4.178 E F0(and)4.178 E F1(declar)4.178 E 4.178
+<65ad>-.18 G(x)-4.178 E F0 1.678(commands allo)4.178 F(w)-.25 E .647
+(parameters and functions to be added to and deleted from the en)108 96
+R 3.147(vironment. If)-.4 F .646(the v)3.146 F .646
+(alue of a parameter in)-.25 F .513(the en)108 108 R .513
+(vironment is modi\214ed, the ne)-.4 F 3.013(wv)-.25 G .513
+(alue becomes part of the en)-3.263 F .513
+(vironment, replacing the old.)-.4 F .514(The en)5.514 F(vi-)-.4 E .523
+(ronment inherited by an)108 120 R 3.022(ye)-.15 G -.15(xe)-3.172 G .522
+(cuted command consists of the shell').15 F 3.022(si)-.55 G .522
+(nitial en)-3.022 F .522(vironment, whose v)-.4 F .522(alues may)-.25 F
+.578(be modi\214ed in the shell, less an)108 132 R 3.078(yp)-.15 G .578
+(airs remo)-3.078 F -.15(ve)-.15 G 3.078(db).15 G 3.078(yt)-3.078 G(he)
+-3.078 E F1(unset)3.078 E F0 .579(command, plus an)3.078 F 3.079(ya)-.15
+G .579(dditions via the)-3.079 F F1(export)3.079 E F0(and)108 144 Q F1
+(declar)2.5 E 2.5<65ad>-.18 G(x)-2.5 E F0(commands.)2.5 E .563(The en)
+108 160.8 R .563(vironment for an)-.4 F(y)-.15 E/F2 10/Times-Italic@0 SF
+.563(simple command)3.403 F F0 .562
+(or function may be augmented temporarily by pre\214xing it with)3.833 F
+.202(parameter assignments, as described abo)108 172.8 R .502 -.15(ve i)
+-.15 H(n).15 E/F3 9/Times-Bold@0 SF -.666(PA)2.702 G(RAMETERS).666 E/F4
+9/Times-Roman@0 SF(.)A F0 .202(These assignment statements af)4.702 F
+.203(fect only the)-.25 F(en)108 184.8 Q
+(vironment seen by that command.)-.4 E .81(If the)108 201.6 R F1<ad6b>
+3.31 E F0 .81(option is set \(see the)3.31 F F1(set)3.31 E F0 -.2(bu)
+3.31 G .81(iltin command belo).2 F .81(w\), then)-.25 F F2(all)3.64 E F0
+.81(parameter assignments are placed in)3.82 F(the en)108 213.6 Q
+(vironment for a command, not just those that precede the command name.)
+-.4 E(When)108 230.4 Q F1(bash)3.396 E F0(in)3.396 E -.2(vo)-.4 G -.1
+(ke).2 G 3.396(sa).1 G 3.397(ne)-3.396 G .897(xternal command, the v)
+-3.547 F(ariable)-.25 E F1(_)3.397 E F0 .897
+(is set to the full \214le name of the command and)3.397 F
+(passed to that command in its en)108 242.4 Q(vironment.)-.4 E/F5 10.95
+/Times-Bold@0 SF(EXIT ST)72 259.2 Q -1.04(AT)-.986 G(US)1.04 E F0 .151
+(The e)108 271.2 R .151(xit status of an e)-.15 F -.15(xe)-.15 G .151
+(cuted command is the v).15 F .15(alue returned by the)-.25 F F2
+(waitpid)2.65 E F0 .15(system call or equi)2.65 F -.25(va)-.25 G .15
+(lent func-).25 F 2.847(tion. Exit)108 283.2 R .347(statuses f)2.847 F
+.347(all between 0 and 255, though, as e)-.1 F .347(xplained belo)-.15 F
+1.647 -.65(w, t)-.25 H .347(he shell may use v).65 F .348(alues abo)-.25
+F .648 -.15(ve 1)-.15 H(25).15 E(specially)108 295.2 Q 5.674(.E)-.65 G
+.674(xit statuses from shell b)-5.674 F .673
+(uiltins and compound commands are also limited to this range. Under)-.2
+F(certain circumstances, the shell will use special v)108 307.2 Q
+(alues to indicate speci\214c f)-.25 E(ailure modes.)-.1 E -.15(Fo)108
+324 S 3.372(rt).15 G .872(he shell')-3.372 F 3.372(sp)-.55 G .873
+(urposes, a command which e)-3.372 F .873(xits with a zero e)-.15 F .873
+(xit status has succeeded.)-.15 F .873(An e)5.873 F .873(xit status of)
+-.15 F .049(zero indicates success.)108 336 R 2.549(An)5.049 G .049
+(on-zero e)-2.549 F .049(xit status indicates f)-.15 F 2.549
+(ailure. When)-.1 F 2.549(ac)2.549 G .048(ommand terminates on a f)
+-2.549 F .048(atal sig-)-.1 F(nal)108 348 Q F2(N)2.5 E F0(,)A F1(bash)
+2.5 E F0(uses the v)2.5 E(alue of 128+)-.25 E F2(N)A F0(as the e)2.5 E
+(xit status.)-.15 E .404
+(If a command is not found, the child process created to e)108 364.8 R
+-.15(xe)-.15 G .404(cute it returns a status of 127.).15 F .405
+(If a command is)5.405 F(found b)108 376.8 Q(ut is not e)-.2 E -.15(xe)
+-.15 G(cutable, the return status is 126.).15 E(If a command f)108 393.6
+Q(ails because of an error during e)-.1 E
+(xpansion or redirection, the e)-.15 E(xit status is greater than zero.)
+-.15 E .081(Shell b)108 410.4 R .081
+(uiltin commands return a status of 0 \()-.2 F F2(true)A F0 2.581(\)i)C
+2.581(fs)-2.581 G .08(uccessful, and non-zero \()-2.581 F F2(false)A F0
+2.58(\)i)C 2.58(fa)-2.58 G 2.58(ne)-2.58 G .08(rror occurs while)-2.58 F
+(the)108 422.4 Q 2.5(ye)-.15 G -.15(xe)-2.65 G 2.5(cute. All).15 F -.2
+(bu)2.5 G(iltins return an e).2 E
+(xit status of 2 to indicate incorrect usage.)-.15 E F1(Bash)108 439.2 Q
+F0 .201(itself returns the e)2.701 F .202
+(xit status of the last command e)-.15 F -.15(xe)-.15 G .202
+(cuted, unless a syntax error occurs, in which case).15 F(it e)108 451.2
+Q(xits with a non-zero v)-.15 E 2.5(alue. See)-.25 F(also the)2.5 E F1
+(exit)2.5 E F0 -.2(bu)2.5 G(iltin command belo).2 E -.65(w.)-.25 G F5
+(SIGN)72 468 Q(ALS)-.219 E F0(When)108 480 Q F1(bash)3.183 E F0 .683
+(is interacti)3.183 F -.15(ve)-.25 G 3.183(,i).15 G 3.183(nt)-3.183 G
+.683(he absence of an)-3.183 F 3.183(yt)-.15 G .683(raps, it ignores)
+-3.183 F F3(SIGTERM)3.183 E F0 .682(\(so that)2.933 F F1 .682(kill 0)
+3.182 F F0 .682(does not kill an)3.182 F(interacti)108 492 Q .757 -.15
+(ve s)-.25 H .457(hell\), and).15 F F3(SIGINT)2.957 E F0 .458
+(is caught and handled \(so that the)2.707 F F1(wait)2.958 E F0 -.2(bu)
+2.958 G .458(iltin is interruptible\).).2 F .458(In all cases,)5.458 F
+F1(bash)108 504 Q F0(ignores)2.5 E F3(SIGQ)2.5 E(UIT)-.09 E F4(.)A F0
+(If job control is in ef)4.5 E(fect,)-.25 E F1(bash)2.5 E F0(ignores)2.5
+E F3(SIGTTIN)2.5 E F4(,)A F3(SIGTT)2.25 E(OU)-.162 E F4(,)A F0(and)2.25
+E F3(SIGTSTP)2.5 E F4(.)A F0(Non-b)108 520.8 Q 1.065
+(uiltin commands run by)-.2 F F1(bash)3.565 E F0(ha)3.565 E 1.365 -.15
+(ve s)-.2 H 1.065(ignal handlers set to the v).15 F 1.064
+(alues inherited by the shell from its)-.25 F 3.247(parent. When)108
+532.8 R .747(job control is not in ef)3.247 F .747
+(fect, asynchronous commands ignore)-.25 F F3(SIGINT)3.248 E F0(and)
+2.998 E F3(SIGQ)3.248 E(UIT)-.09 E F0 .748(in addi-)2.998 F .653
+(tion to these inherited handlers.)108 544.8 R .653
+(Commands run as a result of command substitution ignore the k)5.653 F
+-.15(ey)-.1 G(board-).15 E(generated job control signals)108 556.8 Q F3
+(SIGTTIN)2.5 E F4(,)A F3(SIGTT)2.25 E(OU)-.162 E F4(,)A F0(and)2.25 E F3
+(SIGTSTP)2.5 E F4(.)A F0 2.045(The shell e)108 573.6 R 2.045
+(xits by def)-.15 F 2.045(ault upon receipt of a)-.1 F F3(SIGHUP)4.545 E
+F4(.)A F0 2.045(Before e)6.545 F 2.045(xiting, an interacti)-.15 F 2.346
+-.15(ve s)-.25 H 2.046(hell resends the).15 F F3(SIGHUP)108 585.6 Q F0
+1.005(to all jobs, running or stopped.)3.255 F 1.004
+(Stopped jobs are sent)6.005 F F3(SIGCONT)3.504 E F0 1.004
+(to ensure that the)3.254 F 3.504(yr)-.15 G(ecei)-3.504 E 1.304 -.15
+(ve t)-.25 H(he).15 E F3(SIGHUP)108 597.6 Q F4(.)A F0 2.529 -.8(To p)
+5.429 H(re).8 E -.15(ve)-.25 G .93(nt the shell from sending the signal\
+ to a particular job, it should be remo).15 F -.15(ve)-.15 G 3.43(df).15
+G .93(rom the)-3.43 F 1.357(jobs table with the)108 609.6 R F1(diso)
+3.857 E(wn)-.1 E F0 -.2(bu)3.857 G 1.357(iltin \(see).2 F F3 1.356
+(SHELL B)3.856 F(UIL)-.09 E 1.356(TIN COMMANDS)-.828 F F0(belo)3.606 E
+1.356(w\) or mark)-.25 F 1.356(ed to not recei)-.1 F -.15(ve)-.25 G F3
+(SIGHUP)108 621.6 Q F0(using)2.25 E F1(diso)2.5 E(wn \255h)-.1 E F0(.)A
+.166(If the)108 638.4 R F1(huponexit)2.666 E F0 .166
+(shell option has been set with)2.666 F F1(shopt)2.666 E F0(,)A F1(bash)
+2.666 E F0 .166(sends a)2.666 F F3(SIGHUP)2.666 E F0 .166
+(to all jobs when an interacti)2.416 F -.15(ve)-.25 G(login shell e)108
+650.4 Q(xits.)-.15 E(If)108 667.2 Q F1(bash)3.047 E F0 .547(is w)3.047 F
+.546(aiting for a command to complete and recei)-.1 F -.15(ve)-.25 G
+3.046(sas).15 G .546(ignal for which a trap has been set, the trap)
+-3.046 F .662(will not be e)108 679.2 R -.15(xe)-.15 G .662
+(cuted until the command completes.).15 F(When)5.663 E F1(bash)3.163 E
+F0 .663(is w)3.163 F .663(aiting for an asynchronous command)-.1 F .99
+(via the)108 691.2 R F1(wait)3.49 E F0 -.2(bu)3.49 G .99(iltin, the rec\
+eption of a signal for which a trap has been set will cause the).2 F F1
+(wait)3.49 E F0 -.2(bu)3.49 G .99(iltin to).2 F
+(return immediately with an e)108 703.2 Q
+(xit status greater than 128, immediately after which the trap is e)-.15
+E -.15(xe)-.15 G(cuted.).15 E(GNU Bash-4.1)72 768 Q(2009 December 29)
+135.965 E(31)185.955 E 0 Cg EP
+%%Page: 32 32
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10.95/Times-Bold@0 SF(JOB CONTR)72 84 Q(OL)-.329 E/F2 10
+/Times-Italic@0 SF -.25(Jo)108 96 S 4.567(bc).25 G(ontr)-4.567 E(ol)-.45
+E F0 2.067(refers to the ability to selecti)5.077 F -.15(ve)-.25 G 2.067
+(ly stop \().15 F F2(suspend)A F0 4.567(\)t)C 2.068(he e)-4.567 F -.15
+(xe)-.15 G 2.068(cution of processes and continue).15 F(\()108 108 Q F2
+-.37(re)C(sume).37 E F0 3.202(\)t)C .702(heir e)-3.202 F -.15(xe)-.15 G
+.702(cution at a later point.).15 F 3.202(Au)5.702 G .702
+(ser typically emplo)-3.202 F .702(ys this f)-.1 F .702
+(acility via an interacti)-.1 F 1.001 -.15(ve i)-.25 H(nterf).15 E(ace)
+-.1 E(supplied jointly by the operating system k)108 120 Q(ernel')-.1 E
+2.5(st)-.55 G(erminal dri)-2.5 E -.15(ve)-.25 G 2.5(ra).15 G(nd)-2.5 E
+/F3 10/Times-Bold@0 SF(bash)2.5 E F0(.)A .784(The shell associates a)108
+136.8 R F2(job)5.024 E F0 .784(with each pipeline.)3.514 F .784(It k)
+5.784 F .785(eeps a table of currently e)-.1 F -.15(xe)-.15 G .785
+(cuting jobs, which may be).15 F .341(listed with the)108 148.8 R F3
+(jobs)2.841 E F0 2.841(command. When)2.841 F F3(bash)2.841 E F0 .341
+(starts a job asynchronously \(in the)2.841 F F2(bac)2.84 E(kgr)-.2 E
+(ound)-.45 E F0 .34(\), it prints a line).77 F(that looks lik)108 160.8
+Q(e:)-.1 E([1] 25647)144 177.6 Q .241(indicating that this job is job n\
+umber 1 and that the process ID of the last process in the pipeline ass\
+ociated)108 194.4 R .733(with this job is 25647.)108 206.4 R .732
+(All of the processes in a single pipeline are members of the same job)
+5.733 F(.)-.4 E F3(Bash)5.732 E F0(uses)3.232 E(the)108 218.4 Q F2(job)
+4.24 E F0(abstraction as the basis for job control.)2.73 E 3.062 -.8
+(To f)108 235.2 T 1.462(acilitate the implementation of the user interf)
+.7 F 1.463(ace to job control, the operating system maintains the)-.1 F
+.871(notion of a)108 247.2 R F2(curr)3.371 E .871(ent terminal pr)-.37 F
+.871(ocess gr)-.45 F .871(oup ID)-.45 F F0 5.871(.M)C .87
+(embers of this process group \(processes whose process)-5.871 F .023
+(group ID is equal to the current terminal process group ID\) recei)108
+259.2 R .323 -.15(ve k)-.25 H -.15(ey).05 G .023
+(board-generated signals such as).15 F/F4 9/Times-Bold@0 SF(SIG-)2.523 E
+(INT)108 271.2 Q/F5 9/Times-Roman@0 SF(.)A F0 1.347
+(These processes are said to be in the)5.847 F F2(for)3.846 E -.4(eg)
+-.37 G -.45(ro).4 G(und).45 E F0(.).77 E F2(Bac)6.926 E(kgr)-.2 E(ound)
+-.45 E F0 1.346(processes are those whose process)4.616 F .145
+(group ID dif)108 283.2 R .145(fers from the terminal')-.25 F .146
+(s; such processes are immune to k)-.55 F -.15(ey)-.1 G .146
+(board-generated signals.).15 F .146(Only fore-)5.146 F .16
+(ground processes are allo)108 295.2 R .16(wed to read from or)-.25 F
+2.66(,i)-.4 G 2.66(ft)-2.66 G .16(he user so speci\214es with)-2.66 F/F6
+10/Courier@0 SF .16(stty tostop)2.66 F F0 2.66(,w)C .16(rite to the ter)
+-2.66 F(-)-.2 E 3.051(minal. Background)108 307.2 R .551
+(processes which attempt to read from \(write to when)3.051 F F6 .551
+(stty tostop)3.051 F F0 .552(is in ef)3.052 F .552(fect\) the)-.25 F
+.718(terminal are sent a)108 319.2 R F4 .718(SIGTTIN \(SIGTT)3.218 F
+(OU\))-.162 E F0 .718(signal by the k)2.968 F(ernel')-.1 E 3.217(st)-.55
+G .717(erminal dri)-3.217 F -.15(ve)-.25 G 1.517 -.4(r, w).15 H .717
+(hich, unless caught, sus-).4 F(pends the process.)108 331.2 Q 1.087
+(If the operating system on which)108 348 R F3(bash)3.587 E F0 1.088
+(is running supports job control,)3.588 F F3(bash)3.588 E F0 1.088
+(contains f)3.588 F 1.088(acilities to use it.)-.1 F -.8(Ty)108 360 S
+.302(ping the).8 F F2(suspend)3.142 E F0 .302(character \(typically)
+3.572 F F3(^Z)2.801 E F0 2.801(,C)C .301
+(ontrol-Z\) while a process is running causes that process to be)-2.801
+F 2.142(stopped and returns control to)108 372 R F3(bash)4.642 E F0
+7.142(.T)C 2.142(yping the)-7.942 F F2 2.142(delayed suspend)4.992 F F0
+2.143(character \(typically)5.413 F F3(^Y)4.643 E F0 4.643(,C)C
+(ontrol-Y\))-4.643 E .021(causes the process to be stopped when it atte\
+mpts to read input from the terminal, and control to be returned)108 384
+R(to)108 396 Q F3(bash)3.392 E F0 5.892(.T)C .892
+(he user may then manipulate the state of this job, using the)-5.892 F
+F3(bg)3.392 E F0 .892(command to continue it in the)3.392 F .895
+(background, the)108 408 R F3(fg)3.395 E F0 .895
+(command to continue it in the fore)3.395 F .895(ground, or the)-.15 F
+F3(kill)3.395 E F0 .894(command to kill it.)3.395 F(A)5.894 E F3(^Z)
+3.394 E F0(tak)3.394 E(es)-.1 E(ef)108 420 Q .948(fect immediately)-.25
+F 3.448(,a)-.65 G .948(nd has the additional side ef)-3.448 F .948
+(fect of causing pending output and typeahead to be dis-)-.25 F(carded.)
+108 432 Q .777(There are a number of w)108 448.8 R .777
+(ays to refer to a job in the shell.)-.1 F .777(The character)5.777 F F3
+(%)3.277 E F0 .777(introduces a job speci\214cation)3.277 F(\()108 460.8
+Q F2(jobspec)A F0 3.457(\). Job)B(number)3.457 E F2(n)3.817 E F0 .957
+(may be referred to as)3.697 F F3(%n)3.457 E F0 5.957(.A)C .957
+(job may also be referred to using a pre\214x of the)-2.5 F .59(name us\
+ed to start it, or using a substring that appears in its command line.)
+108 472.8 R -.15(Fo)5.59 G 3.09(re).15 G(xample,)-3.24 E F3(%ce)3.09 E
+F0 .59(refers to a)3.09 F(stopped)108 484.8 Q F3(ce)3.463 E F0(job)3.463
+E 5.963(.I)-.4 G 3.463(fap)-5.963 G .963
+(re\214x matches more than one job,)-3.463 F F3(bash)3.463 E F0 .963
+(reports an error)3.463 F 5.963(.U)-.55 G(sing)-5.963 E F3(%?ce)3.463 E
+F0 3.464(,o)C 3.464(nt)-3.464 G .964(he other)-3.464 F .087
+(hand, refers to an)108 496.8 R 2.587(yj)-.15 G .087
+(ob containing the string)-2.587 F F3(ce)2.587 E F0 .087
+(in its command line.)2.587 F .087
+(If the substring matches more than one)5.087 F(job,)108 508.8 Q F3
+(bash)2.518 E F0 .018(reports an error)2.518 F 5.018(.T)-.55 G .018
+(he symbols)-5.018 F F3(%%)2.518 E F0(and)2.518 E F3(%+)2.518 E F0 .018
+(refer to the shell')2.518 F 2.518(sn)-.55 G .018(otion of the)-2.518 F
+F2(curr)2.518 E .018(ent job)-.37 F F0 2.518(,w).23 G .018(hich is)
+-2.518 F .495(the last job stopped while it w)108 520.8 R .495
+(as in the fore)-.1 F .495(ground or started in the background.)-.15 F
+(The)5.494 E F2(pr)4.244 E -.15(ev)-.37 G .494(ious job).15 F F0 .494
+(may be)3.224 F .787(referenced using)108 532.8 R F3<25ad>3.287 E F0
+5.787(.I)C 3.287(ft)-5.787 G .787(here is only a single job,)-3.287 F F3
+(%+)3.287 E F0(and)3.287 E F3<25ad>3.287 E F0 .788
+(can both be used to refer to that job)3.287 F 5.788(.I)-.4 G(n)-5.788 E
+.257(output pertaining to jobs \(e.g., the output of the)108 544.8 R F3
+(jobs)2.756 E F0 .256(command\), the current job is al)2.756 F -.1(wa)
+-.1 G .256(ys \215agged with a).1 F F3(+)2.756 E F0(,)A .41(and the pre)
+108 556.8 R .41(vious job with a)-.25 F F3<ad>2.91 E F0 5.41(.A)C .411
+(single % \(with no accompan)-2.5 F .411
+(ying job speci\214cation\) also refers to the cur)-.15 F(-)-.2 E
+(rent job)108 568.8 Q(.)-.4 E .444
+(Simply naming a job can be used to bring it into the fore)108 585.6 R
+(ground:)-.15 E F3(%1)2.943 E F0 .443(is a synon)2.943 F .443(ym for)
+-.15 F F3 -.63(``)2.943 G .443(fg %1').63 F(')-.63 E F0 2.943(,b)C
+(ringing)-2.943 E 1.472(job 1 from the background into the fore)108
+597.6 R 3.972(ground. Similarly)-.15 F(,)-.65 E F3 -.63(``)3.973 G 1.473
+(%1 &').63 F(')-.63 E F0 1.473(resumes job 1 in the background,)3.973 F
+(equi)108 609.6 Q -.25(va)-.25 G(lent to).25 E F3 -.63(``)2.5 G(bg %1')
+.63 E(')-.63 E F0(.)A .131(The shell learns immediately whene)108 626.4
+R -.15(ve)-.25 G 2.631(raj).15 G .131(ob changes state.)-2.631 F
+(Normally)5.131 E(,)-.65 E F3(bash)2.631 E F0 -.1(wa)2.63 G .13
+(its until it is about to print a).1 F .157
+(prompt before reporting changes in a job')108 638.4 R 2.657(ss)-.55 G
+.157(tatus so as to not interrupt an)-2.657 F 2.658(yo)-.15 G .158
+(ther output.)-2.658 F .158(If the)5.158 F F3<ad62>2.658 E F0 .158
+(option to)2.658 F(the)108 650.4 Q F3(set)3.952 E F0 -.2(bu)3.952 G
+1.452(iltin command is enabled,).2 F F3(bash)3.952 E F0 1.451
+(reports such changes immediately)3.952 F 6.451(.A)-.65 G 1.751 -.15
+(ny t)-6.451 H 1.451(rap on).15 F F4(SIGCHLD)3.951 E F0(is)3.701 E -.15
+(exe)108 662.4 S(cuted for each child that e).15 E(xits.)-.15 E .032
+(If an attempt to e)108 679.2 R(xit)-.15 E F3(bash)2.532 E F0 .032
+(is made while jobs are stopped \(or)2.532 F 2.533(,i)-.4 G 2.533(ft)
+-2.533 G(he)-2.533 E F3(checkjobs)2.533 E F0 .033
+(shell option has been enabled)2.533 F 2.02(using the)108 691.2 R F3
+(shopt)4.52 E F0 -.2(bu)4.52 G 2.02
+(iltin, running\), the shell prints a w).2 F 2.019
+(arning message, and, if the)-.1 F F3(checkjobs)4.519 E F0 2.019
+(option is)4.519 F .458(enabled, lists the jobs and their statuses.)108
+703.2 R(The)5.458 E F3(jobs)2.958 E F0 .459
+(command may then be used to inspect their status.)2.958 F .459(If a)
+5.459 F .604(second attempt to e)108 715.2 R .604
+(xit is made without an interv)-.15 F .604
+(ening command, the shell does not print another w)-.15 F(arning,)-.1 E
+(and an)108 727.2 Q 2.5(ys)-.15 G(topped jobs are terminated.)-2.5 E
+(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(32)185.955 E 0 Cg EP
+%%Page: 33 33
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10.95/Times-Bold@0 SF(PR)72 84 Q(OMPTING)-.329 E F0 .644
+(When e)108 96 R -.15(xe)-.15 G .644(cuting interacti).15 F -.15(ve)-.25
+G(ly).15 E(,)-.65 E/F2 10/Times-Bold@0 SF(bash)3.144 E F0 .645
+(displays the primary prompt)3.145 F/F3 9/Times-Bold@0 SF(PS1)3.145 E F0
+.645(when it is ready to read a command,)2.895 F 1.826
+(and the secondary prompt)108 108 R F3(PS2)4.326 E F0 1.825
+(when it needs more input to complete a command.)4.076 F F2(Bash)6.825 E
+F0(allo)4.325 E 1.825(ws these)-.25 F 1.499(prompt strings to be custom\
+ized by inserting a number of backslash-escaped special characters that\
+ are)108 120 R(decoded as follo)108 132 Q(ws:)-.25 E F2(\\a)144 144 Q F0
+(an ASCII bell character \(07\))28.22 E F2(\\d)144 156 Q F0
+(the date in "W)27.66 E(eekday Month Date" format \(e.g., "T)-.8 E
+(ue May 26"\))-.45 E F2(\\D{)144 168 Q/F4 10/Times-Italic@0 SF(format)A
+F2(})A F0(the)180 180 Q F4(format)3.927 E F0 1.427(is passed to)3.927 F
+F4(strftime)3.927 E F0 1.427
+(\(3\) and the result is inserted into the prompt string; an)B(empty)180
+192 Q F4(format)2.5 E F0
+(results in a locale-speci\214c time representation.)2.5 E
+(The braces are required)5 E F2(\\e)144 204 Q F0
+(an ASCII escape character \(033\))28.78 E F2(\\h)144 216 Q F0
+(the hostname up to the \214rst `.)27.66 E(')-.7 E F2(\\H)144 228 Q F0
+(the hostname)25.44 E F2(\\j)144 240 Q F0
+(the number of jobs currently managed by the shell)29.89 E F2(\\l)144
+252 Q F0(the basename of the shell')30.44 E 2.5(st)-.55 G(erminal de)
+-2.5 E(vice name)-.25 E F2(\\n)144 264 Q F0(ne)27.66 E(wline)-.25 E F2
+(\\r)144 276 Q F0(carriage return)28.78 E F2(\\s)144 288 Q F0
+(the name of the shell, the basename of)29.33 E F2($0)2.5 E F0
+(\(the portion follo)2.5 E(wing the \214nal slash\))-.25 E F2(\\t)144
+300 Q F0(the current time in 24-hour HH:MM:SS format)29.89 E F2(\\T)144
+312 Q F0(the current time in 12-hour HH:MM:SS format)26.55 E F2(\\@)144
+324 Q F0(the current time in 12-hour am/pm format)23.92 E F2(\\A)144 336
+Q F0(the current time in 24-hour HH:MM format)26 E F2(\\u)144 348 Q F0
+(the username of the current user)27.66 E F2(\\v)144 360 Q F0(the v)
+28.22 E(ersion of)-.15 E F2(bash)2.5 E F0(\(e.g., 2.00\))2.5 E F2(\\V)
+144 372 Q F0(the release of)26 E F2(bash)2.5 E F0 2.5(,v)C
+(ersion + patch le)-2.65 E -.15(ve)-.25 G 2.5(l\().15 G(e.g., 2.00.0\))
+-2.5 E F2(\\w)144 384 Q F0 .115(the current w)26 F .115
+(orking directory)-.1 F 2.615(,w)-.65 G(ith)-2.615 E F3($HOME)2.615 E F0
+(abbre)2.365 E .116(viated with a tilde \(uses the v)-.25 F .116
+(alue of the)-.25 F F3(PR)180 396 Q(OMPT_DIR)-.27 E(TRIM)-.36 E F0 -.25
+(va)2.25 G(riable\)).25 E F2(\\W)144 408 Q F0
+(the basename of the current w)23.22 E(orking directory)-.1 E 2.5(,w)
+-.65 G(ith)-2.5 E F3($HOME)2.5 E F0(abbre)2.25 E(viated with a tilde)
+-.25 E F2(\\!)144 420 Q F0(the history number of this command)29.89 E F2
+(\\#)144 432 Q F0(the command number of this command)28.22 E F2(\\$)144
+444 Q F0(if the ef)28.22 E(fecti)-.25 E .3 -.15(ve U)-.25 H(ID is 0, a)
+.15 E F2(#)2.5 E F0 2.5(,o)C(therwise a)-2.5 E F2($)2.5 E(\\)144 456 Q
+F4(nnn)A F0(the character corresponding to the octal number)18.22 E F4
+(nnn)2.5 E F2(\\\\)144 468 Q F0 2.5(ab)30.44 G(ackslash)-2.5 E F2(\\[)
+144 480 Q F0(be)29.89 E 1.257(gin a sequence of non-printing characters\
+, which could be used to embed a terminal)-.15 F
+(control sequence into the prompt)180 492 Q F2(\\])144 504 Q F0
+(end a sequence of non-printing characters)29.89 E .119
+(The command number and the history number are usually dif)108 520.8 R
+.12(ferent: the history number of a command is its)-.25 F 1.585(positio\
+n in the history list, which may include commands restored from the his\
+tory \214le \(see)108 532.8 R F3(HIST)4.084 E(OR)-.162 E(Y)-.315 E F0
+(belo)108 544.8 Q .541(w\), while the command number is the position in\
+ the sequence of commands e)-.25 F -.15(xe)-.15 G .541
+(cuted during the cur).15 F(-)-.2 E .546(rent shell session.)108 556.8 R
+.546(After the string is decoded, it is e)5.546 F .546
+(xpanded via parameter e)-.15 F .546(xpansion, command substitu-)-.15 F
+.351(tion, arithmetic e)108 568.8 R .352(xpansion, and quote remo)-.15 F
+-.25(va)-.15 G .352(l, subject to the v).25 F .352(alue of the)-.25 F F2
+(pr)2.852 E(omptv)-.18 E(ars)-.1 E F0 .352(shell option \(see the)2.852
+F(description of the)108 580.8 Q F2(shopt)2.5 E F0(command under)2.5 E
+F3(SHELL B)2.5 E(UIL)-.09 E(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)
+-.25 E F1(READLINE)72 597.6 Q F0 .151
+(This is the library that handles reading input when using an interacti)
+108 609.6 R .45 -.15(ve s)-.25 H .15(hell, unless the).15 F F2
+(\255\255noediting)2.65 E F0(option)2.65 E 1.208(is gi)108 621.6 R -.15
+(ve)-.25 G 3.708(na).15 G 3.708(ts)-3.708 G 1.208(hell in)-3.708 F -.2
+(vo)-.4 G 3.708(cation. Line).2 F 1.208
+(editing is also used when using the)3.708 F F2<ad65>3.709 E F0 1.209
+(option to the)3.709 F F2 -.18(re)3.709 G(ad).18 E F0 -.2(bu)3.709 G
+3.709(iltin. By).2 F(def)108 633.6 Q .95
+(ault, the line editing commands are similar to those of emacs.)-.1 F
+3.449(Av)5.949 G .949(i-style line editing interf)-3.449 F .949
+(ace is also)-.1 F -.2(av)108 645.6 S 3.35(ailable. Line)-.05 F .85
+(editing can be enabled at an)3.35 F 3.35(yt)-.15 G .85(ime using the)
+-3.35 F F2 .85(\255o emacs)3.35 F F0(or)3.35 E F2 .85(\255o vi)3.35 F F0
+.85(options to the)3.35 F F2(set)3.35 E F0 -.2(bu)3.35 G(iltin).2 E
+(\(see)108 657.6 Q F3 .763(SHELL B)3.263 F(UIL)-.09 E .763(TIN COMMANDS)
+-.828 F F0(belo)3.013 E 3.263(w\). T)-.25 F 3.263(ot)-.8 G .763(urn of)
+-3.263 F 3.263(fl)-.25 G .763
+(ine editing after the shell is running, use the)-3.263 F F2(+o)3.262 E
+(emacs)108 669.6 Q F0(or)2.5 E F2(+o vi)2.5 E F0(options to the)2.5 E F2
+(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F2(Readline Notation)87 686.4 Q
+F0 .567(In this section, the emacs-style notation is used to denote k)
+108 698.4 R -.15(ey)-.1 G(strok).15 E 3.068(es. Control)-.1 F -.1(ke)
+3.068 G .568(ys are denoted by C\255)-.05 F F4 -.1(ke)C(y)-.2 E F0(,)A
+1.153(e.g., C\255n means Control\255N.)108 710.4 R(Similarly)6.153 E(,)
+-.65 E F4(meta)4.033 E F0 -.1(ke)3.913 G 1.153(ys are denoted by M\255)
+-.05 F F4 -.1(ke)C(y)-.2 E F0 3.652(,s)C 3.652(oM)-3.652 G 1.152
+(\255x means Meta\255X.)-3.652 F(\(On)6.152 E -.1(ke)108 722.4 S .83
+(yboards without a)-.05 F F4(meta)3.71 E F0 -.1(ke)3.59 G 2.13 -.65
+(y, M)-.05 H<ad>.65 E F4(x)A F0 .83(means ESC)3.33 F F4(x)3.33 E F0 3.33
+(,i)C .831(.e., press the Escape k)-3.33 F 1.131 -.15(ey t)-.1 H .831
+(hen the).15 F F4(x)4.101 E F0 -.1(ke)3.861 G 4.631 -.65(y. T)-.05 H
+.831(his mak).65 F(es)-.1 E(GNU Bash-4.1)72 768 Q(2009 December 29)
+135.965 E(33)185.955 E 0 Cg EP
+%%Page: 34 34
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E .6(ESC the)108 84 R/F1 10/Times-Italic@0 SF .6(meta pr)3.1 F
+(e\214x)-.37 E F0 5.6(.T)C .6(he combination M\255C\255)-5.6 F F1(x)A F0
+.599(means ESC\255Control\255)3.099 F F1(x)A F0 3.099(,o)C 3.099(rp)
+-3.099 G .599(ress the Escape k)-3.099 F .899 -.15(ey t)-.1 H .599
+(hen hold).15 F(the Control k)108 96 Q .3 -.15(ey w)-.1 H
+(hile pressing the).15 E F1(x)3.27 E F0 -.1(ke)3.03 G -.65(y.)-.05 G(\))
+.65 E .619(Readline commands may be gi)108 112.8 R -.15(ve)-.25 G 3.119
+(nn).15 G(umeric)-3.119 E F1(ar)3.119 E(guments)-.37 E F0 3.119(,w).27 G
+.619(hich normally act as a repeat count.)-3.119 F(Sometimes,)5.62 E(ho)
+108 124.8 Q(we)-.25 E -.15(ve)-.25 G 1.419 -.4(r, i).15 H 3.119(ti).4 G
+3.119(st)-3.119 G .619(he sign of the ar)-3.119 F .619
+(gument that is signi\214cant.)-.18 F -.15(Pa)5.619 G .619(ssing a ne)
+.15 F -.05(ga)-.15 G(ti).05 E .919 -.15(ve a)-.25 H -.18(rg).15 G .619
+(ument to a command that).18 F 1.018(acts in the forw)108 136.8 R 1.018
+(ard direction \(e.g.,)-.1 F/F2 10/Times-Bold@0 SF(kill\255line)3.518 E
+F0 3.518(\)c)C 1.018(auses that command to act in a backw)-3.518 F 1.019
+(ard direction.)-.1 F(Com-)6.019 E(mands whose beha)108 148.8 Q
+(vior with ar)-.2 E(guments de)-.18 E(viates from this are noted belo)
+-.25 E -.65(w.)-.25 G .812(When a command is described as)108 165.6 R F1
+(killing)3.311 E F0(te)3.311 E .811(xt, the te)-.15 F .811
+(xt deleted is sa)-.15 F -.15(ve)-.2 G 3.311(df).15 G .811
+(or possible future retrie)-3.311 F -.25(va)-.25 G 3.311(l\().25 G F1
+(yank-)-3.311 E(ing)108 177.6 Q F0 2.529(\). The)B .029(killed te)2.529
+F .029(xt is sa)-.15 F -.15(ve)-.2 G 2.529(di).15 G 2.529(na)-2.529 G F1
+.029(kill ring)B F0 5.029(.C)C(onsecuti)-5.029 E .329 -.15(ve k)-.25 H
+.029(ills cause the te).15 F .029(xt to be accumulated into one unit,)
+-.15 F .567(which can be yank)108 189.6 R .567(ed all at once.)-.1 F
+.567(Commands which do not kill te)5.567 F .567
+(xt separate the chunks of te)-.15 F .567(xt on the kill)-.15 F(ring.)
+108 201.6 Q F2(Readline Initialization)87 218.4 Q F0 .091(Readline is c\
+ustomized by putting commands in an initialization \214le \(the)108
+230.4 R F1(inputr)2.591 E(c)-.37 E F0 2.591(\214le\). The)2.591 F .092
+(name of this \214le)2.591 F .197(is tak)108 242.4 R .196(en from the v)
+-.1 F .196(alue of the)-.25 F/F3 9/Times-Bold@0 SF(INPUTRC)2.696 E F0
+-.25(va)2.446 G 2.696(riable. If).25 F .196(that v)2.696 F .196
+(ariable is unset, the def)-.25 F .196(ault is)-.1 F F1(~/.inputr)2.696
+E(c)-.37 E F0 5.196(.W).31 G .196(hen a)-5.196 F 1.034(program which us\
+es the readline library starts up, the initialization \214le is read, a\
+nd the k)108 254.4 R 1.335 -.15(ey b)-.1 H 1.035(indings and).15 F -.25
+(va)108 266.4 S 1.15(riables are set.).25 F 1.15(There are only a fe)
+6.15 F 3.649(wb)-.25 G 1.149(asic constructs allo)-3.649 F 1.149
+(wed in the readline initialization \214le.)-.25 F(Blank)6.149 E .736
+(lines are ignored.)108 278.4 R .737(Lines be)5.737 F .737
+(ginning with a)-.15 F F2(#)3.237 E F0 .737(are comments.)3.237 F .737
+(Lines be)5.737 F .737(ginning with a)-.15 F F2($)3.237 E F0 .737
+(indicate conditional)3.237 F 2.5(constructs. Other)108 290.4 R
+(lines denote k)2.5 E .3 -.15(ey b)-.1 H(indings and v).15 E
+(ariable settings.)-.25 E .987(The def)108 307.2 R .987(ault k)-.1 F
+-.15(ey)-.1 G .987(-bindings may be changed with an).15 F F1(inputr)
+3.497 E(c)-.37 E F0 3.487(\214le. Other)3.797 F .987
+(programs that use this library may)3.487 F(add their o)108 319.2 Q
+(wn commands and bindings.)-.25 E -.15(Fo)108 336 S 2.5(re).15 G
+(xample, placing)-2.65 E(M\255Control\255u: uni)144 352.8 Q -.15(ve)-.25
+G(rsal\255ar).15 E(gument)-.18 E(or)108 364.8 Q(C\255Meta\255u: uni)144
+376.8 Q -.15(ve)-.25 G(rsal\255ar).15 E(gument)-.18 E(into the)108 388.8
+Q F1(inputr)2.51 E(c)-.37 E F0 -.1(wo)2.81 G(uld mak).1 E 2.5(eM)-.1 G
+(\255C\255u e)-2.5 E -.15(xe)-.15 G(cute the readline command).15 E F1
+(univer)2.5 E(sal\255ar)-.1 E(gument)-.37 E F0(.).68 E 1.26(The follo)
+108 405.6 R 1.261(wing symbolic character names are recognized:)-.25 F
+F1 -.4(RU)3.761 G(BOUT).4 E F0(,)1.27 E F1(DEL)3.761 E F0(,).53 E F1
+(ESC)3.761 E F0(,).72 E F1(LFD)3.761 E F0(,).28 E F1(NEWLINE)3.761 E F0
+(,).73 E F1(RET)3.761 E F0(,)1.27 E F1(RETURN)108 417.6 Q F0(,)1.1 E F1
+(SPC)2.5 E F0(,).72 E F1(SP)2.5 E -.3(AC)-.9 G(E).3 E F0 2.5(,a).73 G
+(nd)-2.5 E F1 -.5(TA)2.5 G(B).5 E F0(.).27 E .209
+(In addition to command names, readline allo)108 434.4 R .209(ws k)-.25
+F -.15(ey)-.1 G 2.709(st).15 G 2.709(ob)-2.709 G 2.709(eb)-2.709 G .209
+(ound to a string that is inserted when the k)-2.709 F .509 -.15(ey i)
+-.1 H(s).15 E(pressed \(a)108 446.4 Q F1(macr)2.5 E(o)-.45 E F0(\).)A F2
+(Readline K)87 463.2 Q(ey Bindings)-.25 E F0 .366
+(The syntax for controlling k)108 475.2 R .666 -.15(ey b)-.1 H .366
+(indings in the).15 F F1(inputr)2.876 E(c)-.37 E F0 .366
+(\214le is simple.)3.176 F .366(All that is required is the name of the)
+5.366 F .383(command or the te)108 487.2 R .383(xt of a macro and a k)
+-.15 F .683 -.15(ey s)-.1 H .383
+(equence to which it should be bound. The name may be speci-).15 F .853
+(\214ed in one of tw)108 499.2 R 3.353(ow)-.1 G .853
+(ays: as a symbolic k)-3.453 F 1.153 -.15(ey n)-.1 H .853
+(ame, possibly with).15 F F1(Meta\255)3.353 E F0(or)3.353 E F1(Contr)
+3.353 E(ol\255)-.45 E F0(pre\214x)3.353 E .853(es, or as a k)-.15 F -.15
+(ey)-.1 G(sequence.)108 511.2 Q 1.542(When using the form)108 528 R F2
+-.1(ke)4.042 G(yname).1 E F0(:)A F1(function\255name).833 E F0(or)4.042
+E F1(macr)4.042 E(o)-.45 E F0(,)A F1 -.1(ke)4.042 G(yname)-.2 E F0 1.542
+(is the name of a k)4.222 F 1.841 -.15(ey s)-.1 H 1.541(pelled out in)
+.15 F 2.5(English. F)108 540 R(or e)-.15 E(xample:)-.15 E
+(Control-u: uni)144 564 Q -.15(ve)-.25 G(rsal\255ar).15 E(gument)-.18 E
+(Meta-Rubout: backw)144 576 Q(ard-kill-w)-.1 E(ord)-.1 E
+(Control-o: "> output")144 588 Q .698(In the abo)108 604.8 R .998 -.15
+(ve ex)-.15 H(ample,).15 E F1(C\255u)3.038 E F0 .698
+(is bound to the function)3.448 F F2(uni)3.198 E -.1(ve)-.1 G
+(rsal\255ar).1 E(gument)-.1 E F0(,)A F1(M\255DEL)3.878 E F0 .698
+(is bound to the func-)3.728 F(tion)108 616.8 Q F2
+(backward\255kill\255w)2.759 E(ord)-.1 E F0 2.759(,a)C(nd)-2.759 E F1
+(C\255o)2.599 E F0 .258(is bound to run the macro e)2.939 F .258
+(xpressed on the right hand side \(that is, to)-.15 F(insert the te)108
+628.8 Q(xt)-.15 E/F4 10/Courier@0 SF 6(>o)2.5 G(utput)-6 E F0
+(into the line\).)2.5 E .055(In the second form,)108 645.6 R F2("k)2.555
+E(eyseq")-.1 E F0(:)A F1(function\255name).833 E F0(or)2.555 E F1(macr)
+2.555 E(o)-.45 E F0(,)A F2 -.1(ke)2.555 G(yseq).1 E F0(dif)2.556 E .056
+(fers from)-.25 F F2 -.1(ke)2.556 G(yname).1 E F0(abo)2.556 E .356 -.15
+(ve i)-.15 H 2.556(nt).15 G .056(hat strings)-2.556 F 1.284
+(denoting an entire k)108 657.6 R 1.584 -.15(ey s)-.1 H 1.284(equence m\
+ay be speci\214ed by placing the sequence within double quotes.).15 F
+(Some)6.284 E .385(GNU Emacs style k)108 669.6 R .685 -.15(ey e)-.1 H
+.385(scapes can be used, as in the follo).15 F .385(wing e)-.25 F .386
+(xample, b)-.15 F .386(ut the symbolic character names)-.2 F
+(are not recognized.)108 681.6 Q("\\C\255u": uni)144 705.6 Q -.15(ve)
+-.25 G(rsal\255ar).15 E(gument)-.18 E
+("\\C\255x\\C\255r": re\255read\255init\255\214le)144 717.6 Q
+("\\e[11~": "Function K)144 729.6 Q .3 -.15(ey 1)-.25 H(").15 E
+(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(34)185.955 E 0 Cg EP
+%%Page: 35 35
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E .315(In this e)108 84 R(xample,)-.15 E/F1 10/Times-Italic@0 SF
+(C\255u)2.655 E F0 .315(is ag)3.065 F .315(ain bound to the function)
+-.05 F/F2 10/Times-Bold@0 SF(uni)2.815 E -.1(ve)-.1 G(rsal\255ar).1 E
+(gument)-.1 E F0(.)A F1 .315(C\255x C\255r)5.155 F F0 .314
+(is bound to the func-)3.544 F(tion)108 96 Q F2 -.18(re)2.5 G<ad72>.18 E
+(ead\255init\255\214le)-.18 E F0 2.5(,a)C(nd)-2.5 E F1(ESC [ 1 1 ~)3.01
+E F0(is bound to insert the te)3.94 E(xt)-.15 E/F3 10/Courier@0 SF
+(Function Key 1)2.5 E F0(.)A
+(The full set of GNU Emacs style escape sequences is)108 112.8 Q F2
+<5c43ad>144 124.8 Q F0(control pre\214x)20.3 E F2<5c4dad>144 136.8 Q F0
+(meta pre\214x)18.08 E F2(\\e)144 148.8 Q F0(an escape character)28.78 E
+F2(\\\\)144 160.8 Q F0(backslash)30.44 E F2(\\")144 172.8 Q F0
+(literal ")27.67 E F2<5c08>144 184.8 Q F0(literal \010)30.44 E(In addit\
+ion to the GNU Emacs style escape sequences, a second set of backslash \
+escapes is a)108 201.6 Q -.25(va)-.2 G(ilable:).25 E F2(\\a)144 213.6 Q
+F0(alert \(bell\))28.22 E F2(\\b)144 225.6 Q F0(backspace)27.66 E F2
+(\\d)144 237.6 Q F0(delete)27.66 E F2(\\f)144 249.6 Q F0(form feed)29.89
+E F2(\\n)144 261.6 Q F0(ne)27.66 E(wline)-.25 E F2(\\r)144 273.6 Q F0
+(carriage return)28.78 E F2(\\t)144 285.6 Q F0(horizontal tab)29.89 E F2
+(\\v)144 297.6 Q F0 -.15(ve)28.22 G(rtical tab).15 E F2(\\)144 309.6 Q
+F1(nnn)A F0(the eight-bit character whose v)18.22 E(alue is the octal v)
+-.25 E(alue)-.25 E F1(nnn)2.5 E F0(\(one to three digits\))2.5 E F2(\\x)
+144 321.6 Q F1(HH)A F0(the eight-bit character whose v)13.78 E
+(alue is the he)-.25 E(xadecimal v)-.15 E(alue)-.25 E F1(HH)2.5 E F0
+(\(one or tw)2.5 E 2.5(oh)-.1 G .3 -.15(ex d)-2.5 H(igits\)).15 E 1.141
+(When entering the te)108 338.4 R 1.141(xt of a macro, single or double\
+ quotes must be used to indicate a macro de\214nition.)-.15 F .09
+(Unquoted te)108 350.4 R .09(xt is assumed to be a function name.)-.15 F
+.089(In the macro body)5.089 F 2.589(,t)-.65 G .089
+(he backslash escapes described abo)-2.589 F -.15(ve)-.15 G(are e)108
+362.4 Q 2.5(xpanded. Backslash)-.15 F(will quote an)2.5 E 2.5(yo)-.15 G
+(ther character in the macro te)-2.5 E(xt, including " and \010.)-.15 E
+F2(Bash)108 379.2 Q F0(allo)2.929 E .429(ws the current readline k)-.25
+F .729 -.15(ey b)-.1 H .429
+(indings to be displayed or modi\214ed with the).15 F F2(bind)2.93 E F0
+-.2(bu)2.93 G .43(iltin command.).2 F .046
+(The editing mode may be switched during interacti)108 391.2 R .346 -.15
+(ve u)-.25 H .046(se by using the).15 F F2<ad6f>2.545 E F0 .045
+(option to the)2.545 F F2(set)2.545 E F0 -.2(bu)2.545 G .045
+(iltin command).2 F(\(see)108 403.2 Q/F4 9/Times-Bold@0 SF(SHELL B)2.5 E
+(UIL)-.09 E(TIN COMMANDS)-.828 E F0(belo)2.25 E(w\).)-.25 E F2
+(Readline V)87 420 Q(ariables)-.92 E F0 .043(Readline has v)108 432 R
+.043(ariables that can be used to further customize its beha)-.25 F
+(vior)-.2 E 5.043(.A)-.55 G -.25(va)-2.5 G .043
+(riable may be set in the).25 F F1(inpu-)2.554 E(tr)108 444 Q(c)-.37 E
+F0(\214le with a statement of the form)2.81 E F2(set)144 460.8 Q F1
+(variable\255name value)2.5 E F0 .79(Except where noted, readline v)108
+477.6 R .79(ariables can tak)-.25 F 3.29(et)-.1 G .79(he v)-3.29 F
+(alues)-.25 E F2(On)3.29 E F0(or)3.29 E F2(Off)3.29 E F0 .79
+(\(without re)3.29 F -.05(ga)-.15 G .79(rd to case\).).05 F(Unrecog-)
+5.79 E .448(nized v)108 489.6 R .448(ariable names are ignored.)-.25 F
+.448(When a v)5.448 F .448(ariable v)-.25 F .448
+(alue is read, empty or null v)-.25 F .449(alues, "on" \(case-insensi-)
+-.25 F(ti)108 501.6 Q -.15(ve)-.25 G .468(\), and "1" are equi).15 F
+-.25(va)-.25 G .468(lent to).25 F F2(On)2.968 E F0 5.468(.A)C .468
+(ll other v)-5.468 F .468(alues are equi)-.25 F -.25(va)-.25 G .468
+(lent to).25 F F2(Off)2.968 E F0 5.468(.T)C .467(he v)-5.468 F .467
+(ariables and their def)-.25 F(ault)-.1 E -.25(va)108 513.6 S(lues are:)
+.25 E F2(bell\255style \(audible\))108 530.4 Q F0 .01
+(Controls what happens when readline w)144 542.4 R .011
+(ants to ring the terminal bell.)-.1 F .011(If set to)5.011 F F2(none)
+2.511 E F0 2.511(,r)C .011(eadline ne)-2.511 F -.15(ve)-.25 G(r).15 E
+.94(rings the bell.)144 554.4 R .94(If set to)5.94 F F2(visible)3.44 E
+F0 3.44(,r)C .94(eadline uses a visible bell if one is a)-3.44 F -.25
+(va)-.2 G 3.44(ilable. If).25 F .94(set to)3.44 F F2(audible)3.44 E F0
+(,)A(readline attempts to ring the terminal')144 566.4 Q 2.5(sb)-.55 G
+(ell.)-2.5 E F2(bind\255tty\255special\255chars \(On\))108 578.4 Q F0
+.055(If set to)144 590.4 R F2(On)2.555 E F0 2.555(,r)C .056(eadline att\
+empts to bind the control characters treated specially by the k)-2.555 F
+(ernel')-.1 E 2.556(st)-.55 G(ermi-)-2.556 E(nal dri)144 602.4 Q -.15
+(ve)-.25 G 2.5(rt).15 G 2.5(ot)-2.5 G(heir readline equi)-2.5 E -.25(va)
+-.25 G(lents.).25 E F2(comment\255begin \(`)108 614.4 Q(`#')-.63 E('\))
+-.63 E F0 .885(The string that is inserted when the readline)144 626.4 R
+F2(insert\255comment)3.385 E F0 .884(command is e)3.384 F -.15(xe)-.15 G
+3.384(cuted. This).15 F(com-)3.384 E(mand is bound to)144 638.4 Q F2
+(M\255#)2.5 E F0(in emacs mode and to)2.5 E F2(#)2.5 E F0
+(in vi command mode.)2.5 E F2(completion\255ignor)108 650.4 Q
+(e\255case \(Off\))-.18 E F0(If set to)144 662.4 Q F2(On)2.5 E F0 2.5
+(,r)C(eadline performs \214lename matching and completion in a case\255\
+insensiti)-2.5 E .3 -.15(ve f)-.25 H(ashion.).05 E F2(completion\255pr)
+108 674.4 Q(e\214x\255display\255length \(0\))-.18 E F0 .829(The length\
+ in characters of the common pre\214x of a list of possible completions\
+ that is displayed)144 686.4 R 1.275(without modi\214cation.)144 698.4 R
+1.275(When set to a v)6.275 F 1.274
+(alue greater than zero, common pre\214x)-.25 F 1.274
+(es longer than this)-.15 F -.25(va)144 710.4 S(lue are replaced with a\
+n ellipsis when displaying possible completions.).25 E(GNU Bash-4.1)72
+768 Q(2009 December 29)135.965 E(35)185.955 E 0 Cg EP
+%%Page: 36 36
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(completion\255query\255items \(100\))108 84
+Q F0 .529(This determines when the user is queried about vie)144 96 R
+.53(wing the number of possible completions gen-)-.25 F .561
+(erated by the)144 108 R F1(possible\255completions)3.061 E F0 3.061
+(command. It)3.061 F .561(may be set to an)3.061 F 3.06(yi)-.15 G(nte)
+-3.06 E .56(ger v)-.15 F .56(alue greater than or)-.25 F .782
+(equal to zero.)144 120 R .783(If the number of possible completions is\
+ greater than or equal to the v)5.782 F .783(alue of this)-.25 F -.25
+(va)144 132 S .237(riable, the user is ask).25 F .237
+(ed whether or not he wishes to vie)-.1 F 2.737(wt)-.25 G .237
+(hem; otherwise the)-2.737 F 2.737(ya)-.15 G .237(re simply listed)
+-2.737 F(on the terminal.)144 144 Q F1(con)108 156 Q -.1(ve)-.4 G
+(rt\255meta \(On\)).1 E F0 .612(If set to)144 168 R F1(On)3.112 E F0
+3.112(,r)C .613(eadline will con)-3.112 F -.15(ve)-.4 G .613
+(rt characters with the eighth bit set to an ASCII k).15 F .913 -.15
+(ey s)-.1 H .613(equence by).15 F .541
+(stripping the eighth bit and pre\214xing an escape character \(in ef)
+144 180 R .541(fect, using escape as the)-.25 F/F2 10/Times-Italic@0 SF
+.541(meta pr)3.041 F(e-)-.37 E<8c78>144 192 Q F0(\).)A F1
+(disable\255completion \(Off\))108 204 Q F0 .038(If set to)144 216 R F1
+(On)2.538 E F0 2.538(,r)C .038(eadline will inhibit w)-2.538 F .038
+(ord completion.)-.1 F .038
+(Completion characters will be inserted into the)5.038 F(line as if the)
+144 228 Q 2.5(yh)-.15 G(ad been mapped to)-2.5 E F1(self-insert)2.5 E F0
+(.)A F1(editing\255mode \(emacs\))108 240 Q F0 .253
+(Controls whether readline be)144 252 R .253(gins with a set of k)-.15 F
+.553 -.15(ey b)-.1 H .253(indings similar to).15 F F2(emacs)2.752 E F0
+(or)2.752 E F2(vi)2.752 E F0(.)A F1(editing\255mode)5.252 E F0
+(can be set to either)144 264 Q F1(emacs)2.5 E F0(or)2.5 E F1(vi)2.5 E
+F0(.)A F1(echo\255contr)108 276 Q(ol\255characters \(On\))-.18 E F0 1.21
+(When set to)144 288 R F1(On)3.71 E F0 3.71(,o)C 3.71(no)-3.71 G 1.211
+(perating systems that indicate the)-3.71 F 3.711(ys)-.15 G 1.211
+(upport it, readline echoes a character)-3.711 F
+(corresponding to a signal generated from the k)144 300 Q -.15(ey)-.1 G
+(board.).15 E F1(enable\255k)108 312 Q(eypad \(Off\))-.1 E F0 .893
+(When set to)144 324 R F1(On)3.393 E F0 3.393(,r)C .893
+(eadline will try to enable the application k)-3.393 F -.15(ey)-.1 G
+.893(pad when it is called.).15 F .892(Some sys-)5.893 F
+(tems need this to enable the arro)144 336 Q 2.5(wk)-.25 G -.15(ey)-2.6
+G(s.).15 E F1(enable\255meta\255k)108 348 Q(ey \(On\))-.1 E F0 .64
+(When set to)144 360 R F1(On)3.14 E F0 3.14(,r)C .64
+(eadline will try to enable an)-3.14 F 3.14(ym)-.15 G .64
+(eta modi\214er k)-3.14 F .94 -.15(ey t)-.1 H .64
+(he terminal claims to support).15 F(when it is called.)144 372 Q
+(On man)5 E 2.5(yt)-.15 G(erminals, the meta k)-2.5 E .3 -.15(ey i)-.1 H
+2.5(su).15 G(sed to send eight-bit characters.)-2.5 E F1
+(expand\255tilde \(Off\))108 384 Q F0(If set to)144 396 Q F1(on)2.5 E F0
+2.5(,t)C(ilde e)-2.5 E(xpansion is performed when readline attempts w)
+-.15 E(ord completion.)-.1 E F1(history\255pr)108 408 Q(eser)-.18 E -.1
+(ve)-.1 G(\255point \(Off\)).1 E F0 1.493(If set to)144 420 R F1(on)
+3.993 E F0 3.993(,t)C 1.493(he history code attempts to place point at \
+the same location on each history line)-3.993 F(retrie)144 432 Q -.15
+(ve)-.25 G 2.5(dw).15 G(ith)-2.5 E F1(pr)2.5 E -.15(ev)-.18 G
+(ious-history).15 E F0(or)2.5 E F1(next-history)2.5 E F0(.)A F1
+(history\255size \(0\))108 444 Q F0 .462
+(Set the maximum number of history entries sa)144 456 R -.15(ve)-.2 G
+2.963(di).15 G 2.963(nt)-2.963 G .463(he history list.)-2.963 F .463
+(If set to zero, the number of)5.463 F
+(entries in the history list is not limited.)144 468 Q F1
+(horizontal\255scr)108 480 Q(oll\255mode \(Off\))-.18 E F0 .449
+(When set to)144 492 R F1(On)2.949 E F0 2.949(,m)C(ak)-2.949 E .448
+(es readline use a single line for display)-.1 F 2.948(,s)-.65 G .448
+(crolling the input horizontally on a)-2.948 F 1.194(single screen line\
+ when it becomes longer than the screen width rather than wrapping to a\
+ ne)144 504 R(w)-.25 E(line.)144 516 Q F1(input\255meta \(Off\))108 528
+Q F0 .228(If set to)144 540 R F1(On)2.728 E F0 2.728(,r)C .227(eadline \
+will enable eight-bit input \(that is, it will not strip the high bit f\
+rom the char)-2.728 F(-)-.2 E .956(acters it reads\), re)144 552 R -.05
+(ga)-.15 G .956(rdless of what the terminal claims it can support.).05 F
+.957(The name)5.956 F F1(meta\255\215ag)3.457 E F0 .957(is a)3.457 F
+(synon)144 564 Q(ym for this v)-.15 E(ariable.)-.25 E F1(isear)108 576 Q
+(ch\255terminators \(`)-.18 E(`C\255[C\255J')-.63 E('\))-.63 E F0 .439(\
+The string of characters that should terminate an incremental search wi\
+thout subsequently e)144 588 R -.15(xe)-.15 G(cut-).15 E .934
+(ing the character as a command.)144 600 R .935(If this v)5.935 F .935
+(ariable has not been gi)-.25 F -.15(ve)-.25 G 3.435(nav).15 G .935
+(alue, the characters)-3.685 F F2(ESC)3.435 E F0(and)144 612 Q F2
+(C\255J)2.5 E F0(will terminate an incremental search.)2.5 E F1 -.1(ke)
+108 624 S(ymap \(emacs\)).1 E F0 2.021(Set the current readline k)144
+636 R -.15(ey)-.1 G 4.521(map. The).15 F 2.021(set of v)4.521 F 2.021
+(alid k)-.25 F -.15(ey)-.1 G 2.021(map names is).15 F F2 2.02
+(emacs, emacs\255standar)4.52 F(d,)-.37 E .068
+(emacs\255meta, emacs\255ctlx, vi, vi\255command)144 648 R F0 2.568(,a)C
+(nd)-2.568 E F2(vi\255insert)2.568 E F0(.).68 E F2(vi)5.068 E F0 .068
+(is equi)2.568 F -.25(va)-.25 G .068(lent to).25 F F2(vi\255command)
+2.569 E F0(;)A F2(emacs)2.569 E F0 1.544(is equi)144 660 R -.25(va)-.25
+G 1.544(lent to).25 F F2(emacs\255standar)4.044 E(d)-.37 E F0 6.544(.T)C
+1.544(he def)-6.544 F 1.544(ault v)-.1 F 1.544(alue is)-.25 F F2(emacs)
+4.044 E F0 4.044(;t).27 G 1.544(he v)-4.044 F 1.544(alue of)-.25 F F1
+(editing\255mode)4.043 E F0(also)4.043 E(af)144 672 Q(fects the def)-.25
+E(ault k)-.1 E -.15(ey)-.1 G(map.).15 E F1(mark\255dir)108 684 Q
+(ectories \(On\))-.18 E F0(If set to)144 696 Q F1(On)2.5 E F0 2.5(,c)C
+(ompleted directory names ha)-2.5 E .3 -.15(ve a s)-.2 H(lash appended.)
+.15 E(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(36)185.955 E 0 Cg
+EP
+%%Page: 37 37
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(mark\255modi\214ed\255lines \(Off\))108 84
+Q F0(If set to)144 96 Q F1(On)2.5 E F0 2.5(,h)C(istory lines that ha)
+-2.5 E .3 -.15(ve b)-.2 H
+(een modi\214ed are displayed with a preceding asterisk \().15 E F1(*)A
+F0(\).)A F1(mark\255symlink)108 108 Q(ed\255dir)-.1 E(ectories \(Off\))
+-.18 E F0 .175(If set to)144 120 R F1(On)2.675 E F0 2.675(,c)C .175
+(ompleted names which are symbolic links to directories ha)-2.675 F .475
+-.15(ve a s)-.2 H .175(lash appended \(sub-).15 F(ject to the v)144 132
+Q(alue of)-.25 E F1(mark\255dir)2.5 E(ectories)-.18 E F0(\).)A F1
+(match\255hidden\255\214les \(On\))108 144 Q F0 .193(This v)144 156 R
+.193(ariable, when set to)-.25 F F1(On)2.693 E F0 2.693(,c)C .192
+(auses readline to match \214les whose names be)-2.693 F .192
+(gin with a `.)-.15 F 2.692('\()-.7 G(hidden)-2.692 E 1.023
+(\214les\) when performing \214lename completion, unless the leading `.)
+144 168 R 3.523('i)-.7 G 3.523(ss)-3.523 G 1.024
+(upplied by the user in the)-3.523 F(\214lename to be completed.)144 180
+Q F1(output\255meta \(Off\))108 192 Q F0 .507(If set to)144 204 R F1(On)
+3.007 E F0 3.007(,r)C .507(eadline will display characters with the eig\
+hth bit set directly rather than as a meta-)-3.007 F(pre\214x)144 216 Q
+(ed escape sequence.)-.15 E F1(page\255completions \(On\))108 228 Q F0
+.808(If set to)144 240 R F1(On)3.308 E F0 3.308(,r)C .808
+(eadline uses an internal)-3.308 F/F2 10/Times-Italic@0 SF(mor)3.308 E
+(e)-.37 E F0(-lik)A 3.308(ep)-.1 G .808
+(ager to display a screenful of possible comple-)-3.308 F
+(tions at a time.)144 252 Q F1
+(print\255completions\255horizontally \(Off\))108 264 Q F0 1.319
+(If set to)144 276 R F1(On)3.819 E F0 3.819(,r)C 1.318(eadline will dis\
+play completions with matches sorted horizontally in alphabetical)-3.819
+F(order)144 288 Q 2.5(,r)-.4 G(ather than do)-2.5 E(wn the screen.)-.25
+E F1 -2.29 -.18(re v)108 300 T(ert\255all\255at\255newline \(Off\)).08 E
+F0 .872(If set to)144 312 R F1(on)3.372 E F0 3.372(,r)C .873
+(eadline will undo all changes to history lines before returning when)
+-3.372 F F1(accept\255line)3.373 E F0(is)3.373 E -.15(exe)144 324 S
+2.686(cuted. By).15 F(def)2.686 E .186
+(ault, history lines may be modi\214ed and retain indi)-.1 F .186
+(vidual undo lists across calls to)-.25 F F1 -.18(re)144 336 S(adline)
+.18 E F0(.)A F1(sho)108 348 Q(w\255all\255if\255ambiguous \(Off\))-.1 E
+F0 .477(This alters the def)144 360 R .477(ault beha)-.1 F .477
+(vior of the completion functions.)-.2 F .478(If set to)5.478 F F1(on)
+2.978 E F0 2.978(,w)C .478(ords which ha)-3.078 F .778 -.15(ve m)-.2 H
+(ore).15 E 1.264(than one possible completion cause the matches to be l\
+isted immediately instead of ringing the)144 372 R(bell.)144 384 Q F1
+(sho)108 396 Q(w\255all\255if\255unmodi\214ed \(Off\))-.1 E F0 5.345
+(This alters the def)144 408 R 5.345(ault beha)-.1 F 5.345
+(vior of the completion functions in a f)-.2 F 5.346(ashion similar to)
+-.1 F F1(sho)144 420 Q(w\255all\255if\255ambiguous)-.1 E F0 6.923(.I)C
+4.423(fs)-6.923 G 1.923(et to)-4.423 F F1(on)4.423 E F0 4.423(,w)C 1.923
+(ords which ha)-4.523 F 2.222 -.15(ve m)-.2 H 1.922
+(ore than one possible completion).15 F 1.039(without an)144 432 R 3.539
+(yp)-.15 G 1.039
+(ossible partial completion \(the possible completions don')-3.539 F
+3.539(ts)-.18 G 1.04(hare a common pre\214x\))-3.539 F(cause the matche\
+s to be listed immediately instead of ringing the bell.)144 444 Q F1
+(skip\255completed\255text \(Off\))108 456 Q F0 .095(If set to)144 468 R
+F1(On)2.595 E F0 2.595(,t)C .095(his alters the def)-2.595 F .095
+(ault completion beha)-.1 F .094
+(vior when inserting a single match into the line.)-.2 F(It')144 480 Q
+2.545(so)-.55 G .045(nly acti)-2.545 F .345 -.15(ve w)-.25 H .046
+(hen performing completion in the middle of a w).15 F 2.546(ord. If)-.1
+F .046(enabled, readline does not)2.546 F 1.394(insert characters from \
+the completion that match characters after point in the w)144 492 R
+1.394(ord being com-)-.1 F(pleted, so portions of the w)144 504 Q
+(ord follo)-.1 E(wing the cursor are not duplicated.)-.25 E F1
+(visible\255stats \(Off\))108 516 Q F0 .846(If set to)144 528 R F1(On)
+3.346 E F0 3.346(,ac)C .846(haracter denoting a \214le')-3.346 F 3.346
+(st)-.55 G .846(ype as reported by)-3.346 F F2(stat)3.346 E F0 .846
+(\(2\) is appended to the \214lename)B
+(when listing possible completions.)144 540 Q F1
+(Readline Conditional Constructs)87 556.8 Q F0 .05
+(Readline implements a f)108 568.8 R .05(acility similar in spirit to t\
+he conditional compilation features of the C preprocessor)-.1 F .096
+(which allo)108 580.8 R .096(ws k)-.25 F .396 -.15(ey b)-.1 H .096
+(indings and v).15 F .096
+(ariable settings to be performed as the result of tests.)-.25 F .097
+(There are four parser)5.096 F(directi)108 592.8 Q -.15(ve)-.25 G 2.5
+(su).15 G(sed.)-2.5 E F1($if)108 609.6 Q F0(The)24.89 E F1($if)2.963 E
+F0 .463(construct allo)2.963 F .462(ws bindings to be made based on the\
+ editing mode, the terminal being used,)-.25 F .477
+(or the application using readline.)144 621.6 R .477(The te)5.477 F .477
+(xt of the test e)-.15 F .477
+(xtends to the end of the line; no characters)-.15 F
+(are required to isolate it.)144 633.6 Q F1(mode)144 650.4 Q F0(The)
+12.67 E F1(mode=)3.712 E F0 1.212(form of the)3.712 F F1($if)3.711 E F0
+(directi)3.711 E 1.511 -.15(ve i)-.25 H 3.711(su).15 G 1.211
+(sed to test whether readline is in emacs or vi)-3.711 F 3.065
+(mode. This)180 662.4 R .565(may be used in conjunction with the)3.065 F
+F1 .565(set k)3.065 F(eymap)-.1 E F0 .565(command, for instance, to)
+3.065 F .735(set bindings in the)180 674.4 R F2(emacs\255standar)3.235 E
+(d)-.37 E F0(and)3.235 E F2(emacs\255ctlx)3.235 E F0 -.1(ke)3.235 G .735
+(ymaps only if readline is starting)-.05 F(out in emacs mode.)180 686.4
+Q F1(term)144 703.2 Q F0(The)15.46 E F1(term=)3.196 E F0 .696
+(form may be used to include terminal-speci\214c k)3.196 F .996 -.15
+(ey b)-.1 H .697(indings, perhaps to bind).15 F .654(the k)180 715.2 R
+.954 -.15(ey s)-.1 H .654(equences output by the terminal').15 F 3.154
+(sf)-.55 G .654(unction k)-3.154 F -.15(ey)-.1 G 3.154(s. The).15 F -.1
+(wo)3.154 G .654(rd on the right side of).1 F(the)180 727.2 Q F1(=)3.231
+E F0 .731(is tested ag)3.231 F .732(ainst the both full name of the ter\
+minal and the portion of the terminal)-.05 F(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(37)185.955 E 0 Cg EP
+%%Page: 38 38
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E(name before the \214rst)180 84 Q/F1 10/Times-Bold@0 SF<ad>2.5 E
+F0 5(.T)C(his allo)-5 E(ws)-.25 E/F2 10/Times-Italic@0 SF(sun)2.84 E F0
+(to match both)2.74 E F2(sun)2.84 E F0(and)2.74 E F2(sun\255cmd)2.5 E F0
+2.5(,f).77 G(or instance.)-2.5 E F1(application)144 100.8 Q F0(The)180
+112.8 Q F1(application)3.003 E F0 .503
+(construct is used to include application-speci\214c settings.)3.003 F
+.503(Each program)5.503 F .114(using the readline library sets the)180
+124.8 R F2 .114(application name)2.614 F F0 2.614(,a)C .114
+(nd an initialization \214le can test for a)-2.614 F .501(particular v)
+180 136.8 R 3.001(alue. This)-.25 F .501(could be used to bind k)3.001 F
+.801 -.15(ey s)-.1 H .5(equences to functions useful for a spe-).15 F
+.396(ci\214c program.)180 148.8 R -.15(Fo)5.396 G 2.896(ri).15 G .396
+(nstance, the follo)-2.896 F .396(wing command adds a k)-.25 F .696 -.15
+(ey s)-.1 H .397(equence that quotes the).15 F(current or pre)180 160.8
+Q(vious w)-.25 E(ord in Bash:)-.1 E F1($if)180 184.8 Q F0(Bash)2.5 E 2.5
+(#Q)180 196.8 S(uote the current or pre)-2.5 E(vious w)-.25 E(ord)-.1 E
+("\\C\255xq": "\\eb\\"\\ef\\"")180 208.8 Q F1($endif)180 220.8 Q($endif)
+108 237.6 Q F0(This command, as seen in the pre)9.33 E(vious e)-.25 E
+(xample, terminates an)-.15 E F1($if)2.5 E F0(command.)2.5 E F1($else)
+108 254.4 Q F0(Commands in this branch of the)15.45 E F1($if)2.5 E F0
+(directi)2.5 E .3 -.15(ve a)-.25 H(re e).15 E -.15(xe)-.15 G
+(cuted if the test f).15 E(ails.)-.1 E F1($include)108 271.2 Q F0 .357
+(This directi)144 283.2 R .657 -.15(ve t)-.25 H(ak).15 E .357
+(es a single \214lename as an ar)-.1 F .356
+(gument and reads commands and bindings from that)-.18 F 2.5(\214le. F)
+144 295.2 R(or e)-.15 E(xample, the follo)-.15 E(wing directi)-.25 E .3
+-.15(ve w)-.25 H(ould read).05 E F2(/etc/inputr)2.5 E(c)-.37 E F0(:)A F1
+($include)144 319.2 Q F2(/etc/inputr)5.833 E(c)-.37 E F1(Sear)87 336 Q
+(ching)-.18 E F0 .834(Readline pro)108 348 R .834
+(vides commands for searching through the command history \(see)-.15 F
+/F3 9/Times-Bold@0 SF(HIST)3.335 E(OR)-.162 E(Y)-.315 E F0(belo)3.085 E
+.835(w\) for lines)-.25 F(containing a speci\214ed string.)108 360 Q
+(There are tw)5 E 2.5(os)-.1 G(earch modes:)-2.5 E F2(incr)2.51 E
+(emental)-.37 E F0(and)3.01 E F2(non-incr)2.5 E(emental)-.37 E F0(.).51
+E .698(Incremental searches be)108 376.8 R .698
+(gin before the user has \214nished typing the search string.)-.15 F
+.697(As each character of the)5.697 F .112
+(search string is typed, readline displays the ne)108 388.8 R .112
+(xt entry from the history matching the string typed so f)-.15 F(ar)-.1
+E 5.113(.A)-.55 G(n)-5.113 E .542
+(incremental search requires only as man)108 400.8 R 3.042(yc)-.15 G
+.542(haracters as needed to \214nd the desired history entry)-3.042 F
+5.541(.T)-.65 G .541(he char)-5.541 F(-)-.2 E .224
+(acters present in the v)108 412.8 R .224(alue of the)-.25 F F1(isear)
+2.724 E(ch-terminators)-.18 E F0 -.25(va)2.724 G .224
+(riable are used to terminate an incremental search.).25 F .66
+(If that v)108 424.8 R .66(ariable has not been assigned a v)-.25 F .66
+(alue the Escape and Control-J characters will terminate an incre-)-.25
+F .096(mental search.)108 436.8 R .096(Control-G will abort an incremen\
+tal search and restore the original line.)5.096 F .097
+(When the search is)5.097 F(terminated, the history entry containing th\
+e search string becomes the current line.)108 448.8 Q 2.939 -.8(To \214)
+108 465.6 T 1.339(nd other matching entries in the history list, type C\
+ontrol-S or Control-R as appropriate.).8 F 1.338(This will)6.338 F .674
+(search backw)108 477.6 R .674(ard or forw)-.1 F .674
+(ard in the history for the ne)-.1 F .675
+(xt entry matching the search string typed so f)-.15 F(ar)-.1 E 5.675
+(.A)-.55 G -.15(ny)-5.675 G .175(other k)108 489.6 R .475 -.15(ey s)-.1
+H .174
+(equence bound to a readline command will terminate the search and e).15
+F -.15(xe)-.15 G .174(cute that command.).15 F -.15(Fo)5.174 G(r).15 E
+.54(instance, a)108 501.6 R F2(ne)3.04 E(wline)-.15 E F0 .541
+(will terminate the search and accept the line, thereby e)3.04 F -.15
+(xe)-.15 G .541(cuting the command from the).15 F(history list.)108
+513.6 Q .653(Readline remembers the last incremental search string.)108
+530.4 R .653(If tw)5.653 F 3.153(oC)-.1 G .653
+(ontrol-Rs are typed without an)-3.153 F 3.152(yi)-.15 G(nterv)-3.152 E
+(en-)-.15 E(ing characters de\214ning a ne)108 542.4 Q 2.5(ws)-.25 G
+(earch string, an)-2.5 E 2.5(yr)-.15 G(emembered search string is used.)
+-2.5 E .567(Non-incremental searches read the entire search string befo\
+re starting to search for matching history lines.)108 559.2 R(The searc\
+h string may be typed by the user or be part of the contents of the cur\
+rent line.)108 571.2 Q F1(Readline Command Names)87 588 Q F0 1.392
+(The follo)108 600 R 1.391
+(wing is a list of the names of the commands and the def)-.25 F 1.391
+(ault k)-.1 F 1.691 -.15(ey s)-.1 H 1.391(equences to which the).15 F
+3.891(ya)-.15 G(re)-3.891 E 2.621(bound. Command)108 612 R .121
+(names without an accompan)2.621 F .121(ying k)-.15 F .421 -.15(ey s)-.1
+H .122(equence are unbound by def).15 F 2.622(ault. In)-.1 F .122
+(the follo)2.622 F(wing)-.25 E(descriptions,)108 624 Q F2(point)3.411 E
+F0 .911(refers to the current cursor position, and)3.411 F F2(mark)3.411
+E F0 .91(refers to a cursor position sa)3.411 F -.15(ve)-.2 G 3.41(db)
+.15 G 3.41(yt)-3.41 G(he)-3.41 E F1(set\255mark)108 636 Q F0 2.5
+(command. The)2.5 F(te)2.5 E
+(xt between the point and mark is referred to as the)-.15 E F2 -.37(re)
+2.5 G(gion)-.03 E F0(.)A F1(Commands f)87 652.8 Q(or Mo)-.25 E(ving)-.1
+E(beginning\255of\255line \(C\255a\))108 664.8 Q F0(Mo)144 676.8 Q .3
+-.15(ve t)-.15 H 2.5(ot).15 G(he start of the current line.)-2.5 E F1
+(end\255of\255line \(C\255e\))108 688.8 Q F0(Mo)144 700.8 Q .3 -.15
+(ve t)-.15 H 2.5(ot).15 G(he end of the line.)-2.5 E(GNU Bash-4.1)72 768
+Q(2009 December 29)135.965 E(38)185.955 E 0 Cg EP
+%%Page: 39 39
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF -.25(fo)108 84 S(rward\255char \(C\255f\))
+.25 E F0(Mo)144 96 Q .3 -.15(ve f)-.15 H(orw).15 E(ard a character)-.1 E
+(.)-.55 E F1(backward\255char \(C\255b\))108 108 Q F0(Mo)144 120 Q .3
+-.15(ve b)-.15 H(ack a character).15 E(.)-.55 E F1 -.25(fo)108 132 S
+(rward\255w).25 E(ord \(M\255f\))-.1 E F0(Mo)144 144 Q .822 -.15(ve f)
+-.15 H(orw).15 E .522(ard to the end of the ne)-.1 F .523(xt w)-.15 F
+3.023(ord. W)-.1 F .523
+(ords are composed of alphanumeric characters \(let-)-.8 F
+(ters and digits\).)144 156 Q F1(backward\255w)108 168 Q(ord \(M\255b\))
+-.1 E F0(Mo)144 180 Q 1.71 -.15(ve b)-.15 H 1.41
+(ack to the start of the current or pre).15 F 1.41(vious w)-.25 F 3.91
+(ord. W)-.1 F 1.41(ords are composed of alphanumeric)-.8 F
+(characters \(letters and digits\).)144 192 Q F1(shell\255f)108 204 Q
+(orward\255w)-.25 E(ord)-.1 E F0(Mo)144 216 Q .784 -.15(ve f)-.15 H(orw)
+.15 E .484(ard to the end of the ne)-.1 F .484(xt w)-.15 F 2.984(ord. W)
+-.1 F .484(ords are delimited by non-quoted shell metacharac-)-.8 F
+(ters.)144 228 Q F1(shell\255backward\255w)108 240 Q(ord)-.1 E F0(Mo)144
+252 Q .909 -.15(ve b)-.15 H .609(ack to the start of the current or pre)
+.15 F .609(vious w)-.25 F 3.109(ord. W)-.1 F .608
+(ords are delimited by non-quoted shell)-.8 F(metacharacters.)144 264 Q
+F1(clear\255scr)108 276 Q(een \(C\255l\))-.18 E F0 .993
+(Clear the screen lea)144 288 R .993
+(ving the current line at the top of the screen.)-.2 F -.4(Wi)5.993 G
+.993(th an ar).4 F .993(gument, refresh the)-.18 F
+(current line without clearing the screen.)144 300 Q F1 -.18(re)108 312
+S(draw\255curr).18 E(ent\255line)-.18 E F0(Refresh the current line.)144
+324 Q F1(Commands f)87 340.8 Q(or Manipulating the History)-.25 E
+(accept\255line \(Newline, Retur)108 352.8 Q(n\))-.15 E F0 .159
+(Accept the line re)144 364.8 R -.05(ga)-.15 G .159
+(rdless of where the cursor is.).05 F .158(If this line is non-empty)
+5.158 F 2.658(,a)-.65 G .158(dd it to the history list)-2.658 F .699
+(according to the state of the)144 376.8 R/F2 9/Times-Bold@0 SF
+(HISTCONTR)3.199 E(OL)-.27 E F0 -.25(va)2.949 G 3.199(riable. If).25 F
+.699(the line is a modi\214ed history line, then)3.199 F
+(restore the history line to its original state.)144 388.8 Q F1(pr)108
+400.8 Q -.15(ev)-.18 G(ious\255history \(C\255p\)).15 E F0
+(Fetch the pre)144 412.8 Q(vious command from the history list, mo)-.25
+E(ving back in the list.)-.15 E F1(next\255history \(C\255n\))108 424.8
+Q F0(Fetch the ne)144 436.8 Q(xt command from the history list, mo)-.15
+E(ving forw)-.15 E(ard in the list.)-.1 E F1
+(beginning\255of\255history \(M\255<\))108 448.8 Q F0(Mo)144 460.8 Q .3
+-.15(ve t)-.15 H 2.5(ot).15 G(he \214rst line in the history)-2.5 E(.)
+-.65 E F1(end\255of\255history \(M\255>\))108 472.8 Q F0(Mo)144 484.8 Q
+.3 -.15(ve t)-.15 H 2.5(ot).15 G(he end of the input history)-2.5 E 2.5
+(,i)-.65 G(.e., the line currently being entered.)-2.5 E F1 -2.29 -.18
+(re v)108 496.8 T(erse\255sear).08 E(ch\255history \(C\255r\))-.18 E F0
+1.471(Search backw)144 508.8 R 1.471
+(ard starting at the current line and mo)-.1 F 1.47
+(ving `up' through the history as necessary)-.15 F(.)-.65 E
+(This is an incremental search.)144 520.8 Q F1 -.25(fo)108 532.8 S
+(rward\255sear).25 E(ch\255history \(C\255s\))-.18 E F0 1.131
+(Search forw)144 544.8 R 1.131(ard starting at the current line and mo)
+-.1 F 1.132(ving `do)-.15 F 1.132(wn' through the history as necessary)
+-.25 F(.)-.65 E(This is an incremental search.)144 556.8 Q F1
+(non\255incr)108 568.8 Q(emental\255r)-.18 E -2.3 -.15(ev e)-.18 H
+(rse\255sear).15 E(ch\255history \(M\255p\))-.18 E F0 .165(Search backw)
+144 580.8 R .164(ard through the history starting at the current line u\
+sing a non-incremental search for)-.1 F 2.5(as)144 592.8 S
+(tring supplied by the user)-2.5 E(.)-.55 E F1(non\255incr)108 604.8 Q
+(emental\255f)-.18 E(orward\255sear)-.25 E(ch\255history \(M\255n\))-.18
+E F0 1.353(Search forw)144 616.8 R 1.354(ard through the history using \
+a non-incremental search for a string supplied by the)-.1 F(user)144
+628.8 Q(.)-.55 E F1(history\255sear)108 640.8 Q(ch\255f)-.18 E(orward)
+-.25 E F0 .249(Search forw)144 652.8 R .249(ard through the history for\
+ the string of characters between the start of the current line)-.1 F
+(and the point.)144 664.8 Q(This is a non-incremental search.)5 E F1
+(history\255sear)108 676.8 Q(ch\255backward)-.18 E F0 .95(Search backw)
+144 688.8 R .951(ard through the history for the string of characters b\
+etween the start of the current)-.1 F(line and the point.)144 700.8 Q
+(This is a non-incremental search.)5 E(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(39)185.955 E 0 Cg EP
+%%Page: 40 40
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(yank\255nth\255ar)108 84 Q 2.5(g\()-.1 G
+<4dad43ad7929>-2.5 E F0 .622(Insert the \214rst ar)144 96 R .622
+(gument to the pre)-.18 F .622(vious command \(usually the second w)-.25
+F .622(ord on the pre)-.1 F .622(vious line\))-.25 F .794(at point.)144
+108 R -.4(Wi)5.794 G .794(th an ar).4 F(gument)-.18 E/F2 10
+/Times-Italic@0 SF(n)3.294 E F0 3.294(,i).24 G .794(nsert the)-3.294 F
+F2(n)3.294 E F0 .794(th w)B .794(ord from the pre)-.1 F .794
+(vious command \(the w)-.25 F .795(ords in the)-.1 F(pre)144 120 Q .292
+(vious command be)-.25 F .292(gin with w)-.15 F .291(ord 0\).)-.1 F
+2.791(An)5.291 G -2.25 -.15(eg a)-2.791 H(ti).15 E .591 -.15(ve a)-.25 H
+-.18(rg).15 G .291(ument inserts the).18 F F2(n)2.791 E F0 .291(th w)B
+.291(ord from the end of)-.1 F .281(the pre)144 132 R .281
+(vious command.)-.25 F .281(Once the ar)5.281 F(gument)-.18 E F2(n)2.781
+E F0 .281(is computed, the ar)2.781 F .281(gument is e)-.18 F .282
+(xtracted as if the "!)-.15 F F2(n)A F0(")A(history e)144 144 Q
+(xpansion had been speci\214ed.)-.15 E F1(yank\255last\255ar)108 156 Q
+2.5(g\()-.1 G -1.667(M\255. ,)-2.5 F -1.667(M\255_ \))2.5 F F0 1.308
+(Insert the last ar)144 168 R 1.308(gument to the pre)-.18 F 1.307
+(vious command \(the last w)-.25 F 1.307(ord of the pre)-.1 F 1.307
+(vious history entry\).)-.25 F -.4(Wi)144 180 S .735(th an ar).4 F .735
+(gument, beha)-.18 F 1.035 -.15(ve ex)-.2 H .735(actly lik).15 F(e)-.1 E
+F1(yank\255nth\255ar)3.235 E(g)-.1 E F0 5.736(.S)C(uccessi)-5.736 E
+1.036 -.15(ve c)-.25 H .736(alls to).15 F F1(yank\255last\255ar)3.236 E
+(g)-.1 E F0(mo)3.236 E -.15(ve)-.15 G .728
+(back through the history list, inserting the last ar)144 192 R .728
+(gument of each line in turn.)-.18 F .728(The history e)5.728 F(xpan-)
+-.15 E .14(sion f)144 204 R .14(acilities are used to e)-.1 F .14
+(xtract the last ar)-.15 F .14(gument, as if the "!$" history e)-.18 F
+.14(xpansion had been speci-)-.15 F(\214ed.)144 216 Q F1
+(shell\255expand\255line \(M\255C\255e\))108 228 Q F0 .623
+(Expand the line as the shell does.)144 240 R .622
+(This performs alias and history e)5.622 F .622
+(xpansion as well as all of the)-.15 F(shell w)144 252 Q(ord e)-.1 E 2.5
+(xpansions. See)-.15 F/F3 9/Times-Bold@0 SF(HIST)2.5 E(OR)-.162 E 2.25
+(YE)-.315 G(XP)-2.25 E(ANSION)-.666 E F0(belo)2.25 E 2.5(wf)-.25 G
+(or a description of history e)-2.5 E(xpansion.)-.15 E F1
+(history\255expand\255line \(M\255^\))108 264 Q F0 .938
+(Perform history e)144 276 R .939(xpansion on the current line.)-.15 F
+(See)5.939 E F3(HIST)3.439 E(OR)-.162 E 3.189(YE)-.315 G(XP)-3.189 E
+(ANSION)-.666 E F0(belo)3.189 E 3.439(wf)-.25 G .939(or a descrip-)
+-3.439 F(tion of history e)144 288 Q(xpansion.)-.15 E F1(magic\255space)
+108 300 Q F0 1.627(Perform history e)144 312 R 1.627
+(xpansion on the current line and insert a space.)-.15 F(See)6.626 E F3
+(HIST)4.126 E(OR)-.162 E 3.876(YE)-.315 G(XP)-3.876 E(ANSION)-.666 E F0
+(belo)144 324 Q 2.5(wf)-.25 G(or a description of history e)-2.5 E
+(xpansion.)-.15 E F1(alias\255expand\255line)108 336 Q F0 .394
+(Perform alias e)144 348 R .394(xpansion on the current line.)-.15 F
+(See)5.395 E F3(ALIASES)2.895 E F0(abo)2.645 E .695 -.15(ve f)-.15 H
+.395(or a description of alias e).15 F(xpan-)-.15 E(sion.)144 360 Q F1
+(history\255and\255alias\255expand\255line)108 372 Q F0
+(Perform history and alias e)144 384 Q(xpansion on the current line.)
+-.15 E F1(insert\255last\255ar)108 396 Q(gument \(M\255.)-.1 E 2.5(,M)
+.833 G -1.667(\255_ \))-2.5 F F0 2.5(As)144 408 S(ynon)-2.5 E(ym for)
+-.15 E F1(yank\255last\255ar)2.5 E(g)-.1 E F0(.)A F1
+(operate\255and\255get\255next \(C\255o\))108 420 Q F0 .948
+(Accept the current line for e)144 432 R -.15(xe)-.15 G .948
+(cution and fetch the ne).15 F .948(xt line relati)-.15 F 1.247 -.15
+(ve t)-.25 H 3.447(ot).15 G .947(he current line from the)-3.447 F
+(history for editing.)144 444 Q(An)5 E 2.5(ya)-.15 G -.18(rg)-2.5 G
+(ument is ignored.).18 E F1
+(edit\255and\255execute\255command \(C\255xC\255e\))108 456 Q F0(In)144
+468 Q -.2(vo)-.4 G 1.226 -.1(ke a).2 H 3.526(ne).1 G 1.026
+(ditor on the current command line, and e)-3.526 F -.15(xe)-.15 G 1.026
+(cute the result as shell commands.).15 F F1(Bash)6.026 E F0
+(attempts to in)144 480 Q -.2(vo)-.4 G -.1(ke).2 G F3($VISU)2.6 E(AL)
+-.54 E/F4 9/Times-Roman@0 SF(,)A F3($EDIT)2.25 E(OR)-.162 E F4(,)A F0
+(and)2.25 E F2(emacs)2.5 E F0(as the editor)2.5 E 2.5(,i)-.4 G 2.5(nt)
+-2.5 G(hat order)-2.5 E(.)-.55 E F1(Commands f)87 496.8 Q(or Changing T)
+-.25 E(ext)-.92 E(delete\255char \(C\255d\))108 508.8 Q F0 .358
+(Delete the character at point.)144 520.8 R .358(If point is at the be)
+5.358 F .358(ginning of the line, there are no characters in the)-.15 F
+(line, and the last character typed w)144 532.8 Q(as not bound to)-.1 E
+F1(delete\255char)2.5 E F0 2.5(,t)C(hen return)-2.5 E F3(EOF)2.5 E F4(.)
+A F1(backward\255delete\255char \(Rubout\))108 544.8 Q F0 .552
+(Delete the character behind the cursor)144 556.8 R 5.553(.W)-.55 G .553
+(hen gi)-5.553 F -.15(ve)-.25 G 3.053(nan).15 G .553(umeric ar)-3.053 F
+.553(gument, sa)-.18 F .853 -.15(ve t)-.2 H .553(he deleted te).15 F
+.553(xt on)-.15 F(the kill ring.)144 568.8 Q F1 -.25(fo)108 580.8 S
+(rward\255backward\255delete\255char).25 E F0 .474
+(Delete the character under the cursor)144 592.8 R 2.974(,u)-.4 G .474
+(nless the cursor is at the end of the line, in which case the)-2.974 F
+(character behind the cursor is deleted.)144 604.8 Q F1
+(quoted\255insert \(C\255q, C\255v\))108 616.8 Q F0 .778(Add the ne)144
+628.8 R .779(xt character typed to the line v)-.15 F 3.279
+(erbatim. This)-.15 F .779(is ho)3.279 F 3.279(wt)-.25 G 3.279(oi)-3.279
+G .779(nsert characters lik)-3.279 F(e)-.1 E F1(C\255q)3.279 E F0 3.279
+(,f)C(or)-3.279 E -.15(ex)144 640.8 S(ample.).15 E F1
+(tab\255insert \(C\255v T)108 652.8 Q(AB\))-.9 E F0
+(Insert a tab character)144 664.8 Q(.)-.55 E F1
+(self\255insert \(a, b, A, 1, !, ...\))108 676.8 Q F0
+(Insert the character typed.)144 688.8 Q F1
+(transpose\255chars \(C\255t\))108 700.8 Q F0 .322
+(Drag the character before point forw)144 712.8 R .321(ard o)-.1 F -.15
+(ve)-.15 G 2.821(rt).15 G .321(he character at point, mo)-2.821 F .321
+(ving point forw)-.15 F .321(ard as well.)-.1 F 1.182
+(If point is at the end of the line, then this transposes the tw)144
+724.8 R 3.683(oc)-.1 G 1.183(haracters before point.)-3.683 F(Ne)6.183 E
+-.05(ga)-.15 G(ti).05 E -.15(ve)-.25 G(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(40)185.955 E 0 Cg EP
+%%Page: 41 41
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E(ar)144 84 Q(guments ha)-.18 E .3 -.15(ve n)-.2 H 2.5(oe).15 G
+-.25(ff)-2.5 G(ect.).25 E/F1 10/Times-Bold@0 SF(transpose\255w)108 96 Q
+(ords \(M\255t\))-.1 E F0 .024(Drag the w)144 108 R .024
+(ord before point past the w)-.1 F .023(ord after point, mo)-.1 F .023
+(ving point o)-.15 F -.15(ve)-.15 G 2.523(rt).15 G .023(hat w)-2.523 F
+.023(ord as well.)-.1 F .023(If point)5.023 F
+(is at the end of the line, this transposes the last tw)144 120 Q 2.5
+(ow)-.1 G(ords on the line.)-2.6 E F1(upcase\255w)108 132 Q
+(ord \(M\255u\))-.1 E F0 1.698(Uppercase the current \(or follo)144 144
+R 1.698(wing\) w)-.25 F 4.198(ord. W)-.1 F 1.698(ith a ne)-.4 F -.05(ga)
+-.15 G(ti).05 E 1.999 -.15(ve a)-.25 H -.18(rg).15 G 1.699
+(ument, uppercase the pre).18 F(vious)-.25 E -.1(wo)144 156 S(rd, b).1 E
+(ut do not mo)-.2 E .3 -.15(ve p)-.15 H(oint.).15 E F1(do)108 168 Q
+(wncase\255w)-.1 E(ord \(M\255l\))-.1 E F0(Lo)144 180 Q 1.648
+(wercase the current \(or follo)-.25 F 1.648(wing\) w)-.25 F 4.148
+(ord. W)-.1 F 1.647(ith a ne)-.4 F -.05(ga)-.15 G(ti).05 E 1.947 -.15
+(ve a)-.25 H -.18(rg).15 G 1.647(ument, lo).18 F 1.647(wercase the pre)
+-.25 F(vious)-.25 E -.1(wo)144 192 S(rd, b).1 E(ut do not mo)-.2 E .3
+-.15(ve p)-.15 H(oint.).15 E F1(capitalize\255w)108 204 Q
+(ord \(M\255c\))-.1 E F0 1.974(Capitalize the current \(or follo)144 216
+R 1.974(wing\) w)-.25 F 4.474(ord. W)-.1 F 1.974(ith a ne)-.4 F -.05(ga)
+-.15 G(ti).05 E 2.274 -.15(ve a)-.25 H -.18(rg).15 G 1.975
+(ument, capitalize the pre).18 F(vious)-.25 E -.1(wo)144 228 S(rd, b).1
+E(ut do not mo)-.2 E .3 -.15(ve p)-.15 H(oint.).15 E F1 -.1(ove)108 240
+S(rwrite\255mode).1 E F0 -.8(To)144 252 S .438(ggle o).8 F -.15(ve)-.15
+G .438(rwrite mode.).15 F -.4(Wi)5.438 G .438(th an e).4 F .438
+(xplicit positi)-.15 F .737 -.15(ve n)-.25 H .437(umeric ar).15 F .437
+(gument, switches to o)-.18 F -.15(ve)-.15 G .437(rwrite mode.).15 F -.4
+(Wi)144 264 S .78(th an e).4 F .781(xplicit non-positi)-.15 F 1.081 -.15
+(ve n)-.25 H .781(umeric ar).15 F .781(gument, switches to insert mode.)
+-.18 F .781(This command af)5.781 F(fects)-.25 E(only)144 276 Q F1
+(emacs)4.395 E F0(mode;)4.395 E F1(vi)4.395 E F0 1.894(mode does o)4.395
+F -.15(ve)-.15 G 1.894(rwrite dif).15 F(ferently)-.25 E 6.894(.E)-.65 G
+1.894(ach call to)-6.894 F/F2 10/Times-Italic@0 SF -.37(re)4.394 G
+(adline\(\)).37 E F0 1.894(starts in insert)4.394 F 3.968(mode. In)144
+288 R -.15(ove)3.968 G 1.468(rwrite mode, characters bound to).15 F F1
+(self\255insert)3.969 E F0 1.469(replace the te)3.969 F 1.469
+(xt at point rather than)-.15 F .958(pushing the te)144 300 R .958
+(xt to the right.)-.15 F .957(Characters bound to)5.958 F F1
+(backward\255delete\255char)3.457 E F0 .957(replace the character)3.457
+F(before point with a space.)144 312 Q(By def)5 E
+(ault, this command is unbound.)-.1 E F1(Killing and Y)87 328.8 Q
+(anking)-.85 E(kill\255line \(C\255k\))108 340.8 Q F0(Kill the te)144
+352.8 Q(xt from point to the end of the line.)-.15 E F1
+(backward\255kill\255line \(C\255x Rubout\))108 364.8 Q F0(Kill backw)
+144 376.8 Q(ard to the be)-.1 E(ginning of the line.)-.15 E F1
+(unix\255line\255discard \(C\255u\))108 388.8 Q F0(Kill backw)144 400.8
+Q(ard from point to the be)-.1 E(ginning of the line.)-.15 E
+(The killed te)5 E(xt is sa)-.15 E -.15(ve)-.2 G 2.5(do).15 G 2.5(nt)
+-2.5 G(he kill-ring.)-2.5 E F1(kill\255whole\255line)108 412.8 Q F0
+(Kill all characters on the current line, no matter where point is.)144
+424.8 Q F1(kill\255w)108 436.8 Q(ord \(M\255d\))-.1 E F0 .728
+(Kill from point to the end of the current w)144 448.8 R .729
+(ord, or if between w)-.1 F .729(ords, to the end of the ne)-.1 F .729
+(xt w)-.15 F(ord.)-.1 E -.8(Wo)144 460.8 S
+(rd boundaries are the same as those used by).8 E F1 -.25(fo)2.5 G
+(rward\255w).25 E(ord)-.1 E F0(.)A F1(backward\255kill\255w)108 472.8 Q
+(ord \(M\255Rubout\))-.1 E F0(Kill the w)144 484.8 Q(ord behind point.)
+-.1 E -.8(Wo)5 G(rd boundaries are the same as those used by).8 E F1
+(backward\255w)2.5 E(ord)-.1 E F0(.)A F1(shell\255kill\255w)108 496.8 Q
+(ord \(M\255d\))-.1 E F0 .729
+(Kill from point to the end of the current w)144 508.8 R .728
+(ord, or if between w)-.1 F .728(ords, to the end of the ne)-.1 F .728
+(xt w)-.15 F(ord.)-.1 E -.8(Wo)144 520.8 S
+(rd boundaries are the same as those used by).8 E F1(shell\255f)2.5 E
+(orward\255w)-.25 E(ord)-.1 E F0(.)A F1(shell\255backward\255kill\255w)
+108 532.8 Q(ord \(M\255Rubout\))-.1 E F0 3.025(Kill the w)144 544.8 R
+3.025(ord behind point.)-.1 F -.8(Wo)8.025 G 3.025
+(rd boundaries are the same as those used by).8 F F1(shell\255back-)
+5.525 E(ward\255w)144 556.8 Q(ord)-.1 E F0(.)A F1(unix\255w)108 568.8 Q
+(ord\255rubout \(C\255w\))-.1 E F0 .365(Kill the w)144 580.8 R .365
+(ord behind point, using white space as a w)-.1 F .364(ord boundary)-.1
+F 5.364(.T)-.65 G .364(he killed te)-5.364 F .364(xt is sa)-.15 F -.15
+(ve)-.2 G 2.864(do).15 G 2.864(nt)-2.864 G(he)-2.864 E(kill-ring.)144
+592.8 Q F1(unix\255\214lename\255rubout)108 604.8 Q F0 .166(Kill the w)
+144 616.8 R .166
+(ord behind point, using white space and the slash character as the w)
+-.1 F .167(ord boundaries.)-.1 F(The)5.167 E(killed te)144 628.8 Q
+(xt is sa)-.15 E -.15(ve)-.2 G 2.5(do).15 G 2.5(nt)-2.5 G(he kill-ring.)
+-2.5 E F1(delete\255horizontal\255space \(M\255\\\))108 640.8 Q F0
+(Delete all spaces and tabs around point.)144 652.8 Q F1(kill\255r)108
+664.8 Q(egion)-.18 E F0(Kill the te)144 676.8 Q(xt in the current re)
+-.15 E(gion.)-.15 E F1(copy\255r)108 688.8 Q(egion\255as\255kill)-.18 E
+F0(Cop)144 700.8 Q 2.5(yt)-.1 G(he te)-2.5 E(xt in the re)-.15 E
+(gion to the kill b)-.15 E(uf)-.2 E(fer)-.25 E(.)-.55 E(GNU Bash-4.1)72
+768 Q(2009 December 29)135.965 E(41)185.955 E 0 Cg EP
+%%Page: 42 42
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(copy\255backward\255w)108 84 Q(ord)-.1 E F0
+(Cop)144 96 Q 4.801(yt)-.1 G 2.301(he w)-4.801 F 2.301
+(ord before point to the kill b)-.1 F(uf)-.2 E(fer)-.25 E 7.301(.T)-.55
+G 2.301(he w)-7.301 F 2.3(ord boundaries are the same as)-.1 F F1(back-)
+4.8 E(ward\255w)144 108 Q(ord)-.1 E F0(.)A F1(copy\255f)108 120 Q
+(orward\255w)-.25 E(ord)-.1 E F0(Cop)144 132 Q 4.507(yt)-.1 G 2.007
+(he w)-4.507 F 2.007(ord follo)-.1 F 2.007(wing point to the kill b)-.25
+F(uf)-.2 E(fer)-.25 E 7.008(.T)-.55 G 2.008(he w)-7.008 F 2.008
+(ord boundaries are the same as)-.1 F F1 -.25(fo)4.508 G -.37(r-).25 G
+(ward\255w)144 144 Q(ord)-.1 E F0(.)A F1(yank \(C\255y\))108 156 Q F0 -1
+(Ya)144 168 S(nk the top of the kill ring into the b)1 E(uf)-.2 E
+(fer at point.)-.25 E F1(yank\255pop \(M\255y\))108 180 Q F0
+(Rotate the kill ring, and yank the ne)144 192 Q 2.5(wt)-.25 G 2.5
+(op. Only)-2.5 F -.1(wo)2.5 G(rks follo).1 E(wing)-.25 E F1(yank)2.5 E
+F0(or)2.5 E F1(yank\255pop)2.5 E F0(.)A F1(Numeric Ar)87 208.8 Q
+(guments)-.1 E(digit\255ar)108 220.8 Q
+(gument \(M\2550, M\2551, ..., M\255\255\))-.1 E F0 .642
+(Add this digit to the ar)144 232.8 R .641
+(gument already accumulating, or start a ne)-.18 F 3.141(wa)-.25 G -.18
+(rg)-3.141 G 3.141(ument. M\255\255).18 F .641(starts a ne)3.141 F(g-)
+-.15 E(ati)144 244.8 Q .3 -.15(ve a)-.25 H -.18(rg).15 G(ument.).18 E F1
+(uni)108 256.8 Q -.1(ve)-.1 G(rsal\255ar).1 E(gument)-.1 E F0 .778
+(This is another w)144 268.8 R .779(ay to specify an ar)-.1 F 3.279
+(gument. If)-.18 F .779(this command is follo)3.279 F .779
+(wed by one or more digits,)-.25 F 1.376
+(optionally with a leading minus sign, those digits de\214ne the ar)144
+280.8 R 3.876(gument. If)-.18 F 1.376(the command is fol-)3.876 F(lo)144
+292.8 Q 1.17(wed by digits, e)-.25 F -.15(xe)-.15 G(cuting).15 E F1(uni)
+3.67 E -.1(ve)-.1 G(rsal\255ar).1 E(gument)-.1 E F0(ag)3.67 E 1.17
+(ain ends the numeric ar)-.05 F 1.17(gument, b)-.18 F 1.17(ut is other)
+-.2 F(-)-.2 E .899(wise ignored.)144 304.8 R .898
+(As a special case, if this command is immediately follo)5.899 F .898
+(wed by a character that is)-.25 F .243
+(neither a digit or minus sign, the ar)144 316.8 R .243
+(gument count for the ne)-.18 F .243(xt command is multiplied by four)
+-.15 F 5.243(.T)-.55 G(he)-5.243 E(ar)144 328.8 Q .378
+(gument count is initially one, so e)-.18 F -.15(xe)-.15 G .378
+(cuting this function the \214rst time mak).15 F .378(es the ar)-.1 F
+.378(gument count)-.18 F(four)144 340.8 Q 2.5(,as)-.4 G(econd time mak)
+-2.5 E(es the ar)-.1 E(gument count sixteen, and so on.)-.18 E F1
+(Completing)87 357.6 Q(complete \(T)108 369.6 Q(AB\))-.9 E F0 1.137
+(Attempt to perform completion on the te)144 381.6 R 1.137
+(xt before point.)-.15 F F1(Bash)6.137 E F0 1.137
+(attempts completion treating the)3.637 F(te)144 393.6 Q .533(xt as a v)
+-.15 F .533(ariable \(if the te)-.25 F .533(xt be)-.15 F .533(gins with)
+-.15 F F1($)3.033 E F0 .533(\), username \(if the te)B .532(xt be)-.15 F
+.532(gins with)-.15 F F1(~)3.032 E F0 .532(\), hostname \(if the)B(te)
+144 405.6 Q .701(xt be)-.15 F .701(gins with)-.15 F F1(@)3.201 E F0 .701
+(\), or command \(including aliases and functions\) in turn.)B .702
+(If none of these pro-)5.701 F
+(duces a match, \214lename completion is attempted.)144 417.6 Q F1
+(possible\255completions \(M\255?\))108 429.6 Q F0
+(List the possible completions of the te)144 441.6 Q(xt before point.)
+-.15 E F1(insert\255completions \(M\255*\))108 453.6 Q F0 .783
+(Insert all completions of the te)144 465.6 R .783
+(xt before point that w)-.15 F .783(ould ha)-.1 F 1.083 -.15(ve b)-.2 H
+.783(een generated by).15 F F1(possible\255com-)3.282 E(pletions)144
+477.6 Q F0(.)A F1(menu\255complete)108 489.6 Q F0 .928(Similar to)144
+501.6 R F1(complete)3.428 E F0 3.428(,b)C .929(ut replaces the w)-3.628
+F .929(ord to be completed with a single match from the list of)-.1 F
+1.194(possible completions.)144 513.6 R 1.194(Repeated e)6.194 F -.15
+(xe)-.15 G 1.194(cution of).15 F F1(menu\255complete)3.694 E F0 1.193
+(steps through the list of possible)3.694 F .828
+(completions, inserting each match in turn.)144 525.6 R .828
+(At the end of the list of completions, the bell is rung)5.828 F .727
+(\(subject to the setting of)144 537.6 R F1(bell\255style)3.227 E F0
+3.227(\)a)C .727(nd the original te)-3.227 F .727(xt is restored.)-.15 F
+.727(An ar)5.727 F .727(gument of)-.18 F/F2 10/Times-Italic@0 SF(n)3.227
+E F0(mo)3.227 E -.15(ve)-.15 G(s).15 E F2(n)3.227 E F0 1.73
+(positions forw)144 549.6 R 1.73(ard in the list of matches; a ne)-.1 F
+-.05(ga)-.15 G(ti).05 E 2.03 -.15(ve a)-.25 H -.18(rg).15 G 1.73
+(ument may be used to mo).18 F 2.03 -.15(ve b)-.15 H(ackw).15 E(ard)-.1
+E(through the list.)144 561.6 Q(This command is intended to be bound to)
+5 E F1 -.9(TA)2.5 G(B).9 E F0 2.5(,b)C(ut is unbound by def)-2.7 E
+(ault.)-.1 E F1(menu\255complete-)108 573.6 Q(w)10 I(k)-7.22 -10 M(c)
+-5.56 -10 M(rd)2.78 10 M F0 .82(Identical to)144 585.6 R F1
+(menu\255complete)3.32 E F0 3.32(,b)C .82(ut mo)-3.52 F -.15(ve)-.15 G
+3.32(sb).15 G(ackw)-3.32 E .82
+(ard through the list of possible completions, as if)-.1 F F1
+(menu\255complete)144 597.6 Q F0(had been gi)2.5 E -.15(ve)-.25 G 2.5
+(nan).15 G -2.25 -.15(eg a)-2.5 H(ti).15 E .3 -.15(ve a)-.25 H -.18(rg)
+.15 G 2.5(ument. This).18 F(command is unbound by def)2.5 E(ault.)-.1 E
+F1(delete\255char\255or\255list)108 609.6 Q F0 .234
+(Deletes the character under the cursor if not at the be)144 621.6 R
+.234(ginning or end of the line \(lik)-.15 F(e)-.1 E F1(delete\255char)
+2.735 E F0(\).)A .425(If at the end of the line, beha)144 633.6 R -.15
+(ve)-.2 G 2.925(si).15 G .425(dentically to)-2.925 F F1
+(possible\255completions)2.925 E F0 5.425(.T)C .425
+(his command is unbound)-5.425 F(by def)144 645.6 Q(ault.)-.1 E F1
+(complete\255\214lename \(M\255/\))108 657.6 Q F0
+(Attempt \214lename completion on the te)144 669.6 Q(xt before point.)
+-.15 E F1(possible\255\214lename\255completions \(C\255x /\))108 681.6 Q
+F0(List the possible completions of the te)144 693.6 Q
+(xt before point, treating it as a \214lename.)-.15 E F1
+(complete\255user)108 705.6 Q(name \(M\255~\))-.15 E F0
+(Attempt completion on the te)144 717.6 Q
+(xt before point, treating it as a username.)-.15 E(GNU Bash-4.1)72 768
+Q(2009 December 29)135.965 E(42)185.955 E 0 Cg EP
+%%Page: 43 43
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(possible\255user)108 84 Q
+(name\255completions \(C\255x ~\))-.15 E F0
+(List the possible completions of the te)144 96 Q
+(xt before point, treating it as a username.)-.15 E F1(complete\255v)108
+108 Q(ariable \(M\255$\))-.1 E F0(Attempt completion on the te)144 120 Q
+(xt before point, treating it as a shell v)-.15 E(ariable.)-.25 E F1
+(possible\255v)108 132 Q(ariable\255completions \(C\255x $\))-.1 E F0
+(List the possible completions of the te)144 144 Q
+(xt before point, treating it as a shell v)-.15 E(ariable.)-.25 E F1
+(complete\255hostname \(M\255@\))108 156 Q F0
+(Attempt completion on the te)144 168 Q
+(xt before point, treating it as a hostname.)-.15 E F1
+(possible\255hostname\255completions \(C\255x @\))108 180 Q F0
+(List the possible completions of the te)144 192 Q
+(xt before point, treating it as a hostname.)-.15 E F1
+(complete\255command \(M\255!\))108 204 Q F0 .58
+(Attempt completion on the te)144 216 R .581
+(xt before point, treating it as a command name.)-.15 F .581
+(Command comple-)5.581 F .715(tion attempts to match the te)144 228 R
+.715(xt ag)-.15 F .715(ainst aliases, reserv)-.05 F .715(ed w)-.15 F
+.715(ords, shell functions, shell b)-.1 F .715(uiltins, and)-.2 F
+(\214nally e)144 240 Q -.15(xe)-.15 G
+(cutable \214lenames, in that order).15 E(.)-.55 E F1
+(possible\255command\255completions \(C\255x !\))108 252 Q F0
+(List the possible completions of the te)144 264 Q
+(xt before point, treating it as a command name.)-.15 E F1
+(dynamic\255complete\255history \(M\255T)108 276 Q(AB\))-.9 E F0 .424
+(Attempt completion on the te)144 288 R .425
+(xt before point, comparing the te)-.15 F .425(xt ag)-.15 F .425
+(ainst lines from the history list)-.05 F
+(for possible completion matches.)144 300 Q F1(dab)108 312 Q(br)-.1 E
+-.15(ev)-.18 G(\255expand).15 E F0 .611
+(Attempt menu completion on the te)144 324 R .611
+(xt before point, comparing the te)-.15 F .61(xt ag)-.15 F .61
+(ainst lines from the his-)-.05 F
+(tory list for possible completion matches.)144 336 Q F1
+(complete\255into\255braces \(M\255{\))108 348 Q F0 .4(Perform \214lena\
+me completion and insert the list of possible completions enclosed with\
+in braces so)144 360 R(the list is a)144 372 Q -.25(va)-.2 G
+(ilable to the shell \(see).25 E F1(Brace Expansion)2.5 E F0(abo)2.5 E
+-.15(ve)-.15 G(\).).15 E F1 -.25(Ke)87 388.8 S(yboard Macr).25 E(os)-.18
+E(start\255kbd\255macr)108 400.8 Q 2.5(o\()-.18 G(C\255x \()-2.5 E(\))
+.833 E F0(Be)144 412.8 Q(gin sa)-.15 E
+(ving the characters typed into the current k)-.2 E -.15(ey)-.1 G
+(board macro.).15 E F1(end\255kbd\255macr)108 424.8 Q 2.5(o\()-.18 G
+(C\255x \))-2.5 E(\)).833 E F0(Stop sa)144 436.8 Q
+(ving the characters typed into the current k)-.2 E -.15(ey)-.1 G
+(board macro and store the de\214nition.).15 E F1
+(call\255last\255kbd\255macr)108 448.8 Q 2.5(o\()-.18 G(C\255x e\))-2.5
+E F0(Re-e)144 460.8 Q -.15(xe)-.15 G 1(cute the last k).15 F -.15(ey)-.1
+G .999(board macro de\214ned, by making the characters in the macro app\
+ear as if).15 F(typed at the k)144 472.8 Q -.15(ey)-.1 G(board.).15 E F1
+(Miscellaneous)87 489.6 Q -.18(re)108 501.6 S<ad72>.18 E
+(ead\255init\255\214le \(C\255x C\255r\))-.18 E F0 1.776
+(Read in the contents of the)144 513.6 R/F2 10/Times-Italic@0 SF(inputr)
+4.276 E(c)-.37 E F0 1.777(\214le, and incorporate an)4.276 F 4.277(yb)
+-.15 G 1.777(indings or v)-4.277 F 1.777(ariable assignments)-.25 F
+(found there.)144 525.6 Q F1(abort \(C\255g\))108 537.6 Q F0 3.249
+(Abort the current editing command and ring the terminal')144 549.6 R
+5.748(sb)-.55 G 3.248(ell \(subject to the setting of)-5.748 F F1
+(bell\255style)144 561.6 Q F0(\).)A F1(do\255upper)108 573.6 Q
+(case\255v)-.18 E(ersion \(M\255a, M\255b, M\255)-.1 E F2(x)A F1 2.5(,.)
+C(..\))-2.5 E F0 1.755(If the meta\214ed character)144 585.6 R F2(x)
+4.255 E F0 1.755(is lo)4.255 F 1.756
+(wercase, run the command that is bound to the corresponding)-.25 F
+(uppercase character)144 597.6 Q(.)-.55 E F1(pr)108 609.6 Q
+(e\214x\255meta \(ESC\))-.18 E F0(Metafy the ne)144 621.6 Q
+(xt character typed.)-.15 E/F3 9/Times-Bold@0 SF(ESC)5 E F1(f)2.25 E F0
+(is equi)2.5 E -.25(va)-.25 G(lent to).25 E F1(Meta\255f)2.5 E F0(.)A F1
+(undo \(C\255_, C\255x C\255u\))108 633.6 Q F0
+(Incremental undo, separately remembered for each line.)144 645.6 Q F1
+-2.29 -.18(re v)108 657.6 T(ert\255line \(M\255r\)).08 E F0 1.095
+(Undo all changes made to this line.)144 669.6 R 1.095(This is lik)6.095
+F 3.595(ee)-.1 G -.15(xe)-3.745 G 1.095(cuting the).15 F F1(undo)3.595 E
+F0 1.095(command enough times to)3.595 F
+(return the line to its initial state.)144 681.6 Q F1
+(tilde\255expand \(M\255&\))108 693.6 Q F0(Perform tilde e)144 705.6 Q
+(xpansion on the current w)-.15 E(ord.)-.1 E(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(43)185.955 E 0 Cg EP
+%%Page: 44 44
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(set\255mark \(C\255@, M\255<space>\))108 84
+Q F0(Set the mark to the point.)144 96 Q(If a numeric ar)5 E
+(gument is supplied, the mark is set to that position.)-.18 E F1
+(exchange\255point\255and\255mark \(C\255x C\255x\))108 108 Q F0(Sw)144
+120 Q .282(ap the point with the mark.)-.1 F .283
+(The current cursor position is set to the sa)5.283 F -.15(ve)-.2 G
+2.783(dp).15 G .283(osition, and the old)-2.783 F(cursor position is sa)
+144 132 Q -.15(ve)-.2 G 2.5(da).15 G 2.5(st)-2.5 G(he mark.)-2.5 E F1
+(character\255sear)108 144 Q(ch \(C\255]\))-.18 E F0 3.036(Ac)144 156 S
+.536(haracter is read and point is mo)-3.036 F -.15(ve)-.15 G 3.035(dt)
+.15 G 3.035(ot)-3.035 G .535(he ne)-3.035 F .535
+(xt occurrence of that character)-.15 F 5.535(.A)-.55 G(ne)-2.5 E -.05
+(ga)-.15 G(ti).05 E .835 -.15(ve c)-.25 H(ount).15 E(searches for pre)
+144 168 Q(vious occurrences.)-.25 E F1(character\255sear)108 180 Q
+(ch\255backward \(M\255C\255]\))-.18 E F0 3.543(Ac)144 192 S 1.043
+(haracter is read and point is mo)-3.543 F -.15(ve)-.15 G 3.544(dt).15 G
+3.544(ot)-3.544 G 1.044(he pre)-3.544 F 1.044
+(vious occurrence of that character)-.25 F 6.044(.A)-.55 G(ne)-2.5 E
+-.05(ga)-.15 G(ti).05 E -.15(ve)-.25 G
+(count searches for subsequent occurrences.)144 204 Q F1
+(skip\255csi\255sequence \(\))108 216 Q F0 1.827
+(Read enough characters to consume a multi-k)144 228 R 2.126 -.15(ey s)
+-.1 H 1.826(equence such as those de\214ned for k).15 F -.15(ey)-.1 G
+4.326(sl).15 G(ik)-4.326 E(e)-.1 E .79(Home and End.)144 240 R .791
+(Such sequences be)5.79 F .791
+(gin with a Control Sequence Indicator \(CSI\), usually ESC\255[.)-.15 F
+.332(If this sequence is bound to "\\[", k)144 252 R -.15(ey)-.1 G 2.831
+(sp).15 G .331(roducing such sequences will ha)-2.831 F .631 -.15(ve n)
+-.2 H 2.831(oe).15 G -.25(ff)-2.831 G .331(ect unless e).25 F(xplic-)
+-.15 E .026(itly bound to a readline command, instead of inserting stra\
+y characters into the editing b)144 264 R(uf)-.2 E(fer)-.25 E 5.026(.T)
+-.55 G(his)-5.026 E(is unbound by def)144 276 Q(ault, b)-.1 E
+(ut usually bound to ESC\255[.)-.2 E F1(insert\255comment \(M\255#\))108
+288 Q F0 -.4(Wi)144 300 S .481(thout a numeric ar).4 F .481
+(gument, the v)-.18 F .481(alue of the readline)-.25 F F1
+(comment\255begin)2.981 E F0 -.25(va)2.981 G .48
+(riable is inserted at the).25 F(be)144 312 Q .097
+(ginning of the current line.)-.15 F .098(If a numeric ar)5.097 F .098
+(gument is supplied, this command acts as a toggle:)-.18 F(if)5.098 E
+.322(the characters at the be)144 324 R .321
+(ginning of the line do not match the v)-.15 F .321(alue of)-.25 F F1
+(comment\255begin)2.821 E F0 2.821(,t)C .321(he v)-2.821 F .321(alue is)
+-.25 F .831(inserted, otherwise the characters in)144 336 R F1
+(comment\255begin)3.331 E F0 .832(are deleted from the be)3.331 F .832
+(ginning of the line.)-.15 F 1.469
+(In either case, the line is accepted as if a ne)144 348 R 1.468
+(wline had been typed.)-.25 F 1.468(The def)6.468 F 1.468(ault v)-.1 F
+1.468(alue of)-.25 F F1(com-)3.968 E(ment\255begin)144 360 Q F0 .839
+(causes this command to mak)3.339 F 3.339(et)-.1 G .839
+(he current line a shell comment.)-3.339 F .84(If a numeric ar)5.84 F
+(gu-)-.18 E(ment causes the comment character to be remo)144 372 Q -.15
+(ve)-.15 G(d, the line will be e).15 E -.15(xe)-.15 G
+(cuted by the shell.).15 E F1(glob\255complete\255w)108 384 Q
+(ord \(M\255g\))-.1 E F0 .792(The w)144 396 R .791
+(ord before point is treated as a pattern for pathname e)-.1 F .791
+(xpansion, with an asterisk implicitly)-.15 F 2.5(appended. This)144 408
+R(pattern is used to generate a list of matching \214le names for possi\
+ble completions.)2.5 E F1(glob\255expand\255w)108 420 Q
+(ord \(C\255x *\))-.1 E F0 .371(The w)144 432 R .372
+(ord before point is treated as a pattern for pathname e)-.1 F .372
+(xpansion, and the list of matching \214le)-.15 F .516
+(names is inserted, replacing the w)144 444 R 3.016(ord. If)-.1 F 3.016
+(an)3.016 G .516(umeric ar)-3.016 F .516
+(gument is supplied, an asterisk is appended)-.18 F(before pathname e)
+144 456 Q(xpansion.)-.15 E F1(glob\255list\255expansions \(C\255x g\))
+108 468 Q F0 .923(The list of e)144 480 R .923(xpansions that w)-.15 F
+.923(ould ha)-.1 F 1.223 -.15(ve b)-.2 H .923(een generated by).15 F F1
+(glob\255expand\255w)3.423 E(ord)-.1 E F0 .923(is displayed, and)3.423 F
+.872(the line is redra)144 492 R 3.372(wn. If)-.15 F 3.372(an)3.372 G
+.872(umeric ar)-3.372 F .872
+(gument is supplied, an asterisk is appended before pathname)-.18 F -.15
+(ex)144 504 S(pansion.).15 E F1(dump\255functions)108 516 Q F0 .626
+(Print all of the functions and their k)144 528 R .926 -.15(ey b)-.1 H
+.627(indings to the readline output stream.).15 F .627(If a numeric ar)
+5.627 F(gu-)-.18 E
+(ment is supplied, the output is formatted in such a w)144 540 Q
+(ay that it can be made part of an)-.1 E/F2 10/Times-Italic@0 SF(inputr)
+2.5 E(c)-.37 E F0(\214le.)2.5 E F1(dump\255v)108 552 Q(ariables)-.1 E F0
+1.8(Print all of the settable readline v)144 564 R 1.799
+(ariables and their v)-.25 F 1.799(alues to the readline output stream.)
+-.25 F 1.799(If a)6.799 F .304(numeric ar)144 576 R .304
+(gument is supplied, the output is formatted in such a w)-.18 F .304
+(ay that it can be made part of an)-.1 F F2(inputr)144 588 Q(c)-.37 E F0
+(\214le.)2.5 E F1(dump\255macr)108 600 Q(os)-.18 E F0 .593
+(Print all of the readline k)144 612 R .893 -.15(ey s)-.1 H .592
+(equences bound to macros and the strings the).15 F 3.092(yo)-.15 G
+3.092(utput. If)-3.092 F 3.092(an)3.092 G(umeric)-3.092 E(ar)144 624 Q
+.528(gument is supplied, the output is formatted in such a w)-.18 F .528
+(ay that it can be made part of an)-.1 F F2(inputr)3.028 E(c)-.37 E F0
+(\214le.)144 636 Q F1(display\255shell\255v)108 648 Q
+(ersion \(C\255x C\255v\))-.1 E F0(Display v)144 660 Q
+(ersion information about the current instance of)-.15 E F1(bash)2.5 E
+F0(.)A F1(Pr)87 676.8 Q(ogrammable Completion)-.18 E F0 .147(When w)108
+688.8 R .147(ord completion is attempted for an ar)-.1 F .147
+(gument to a command for which a completion speci\214cation \(a)-.18 F
+F2(compspec)108 700.8 Q F0 3.828(\)h)C 1.329
+(as been de\214ned using the)-3.828 F F1(complete)3.829 E F0 -.2(bu)
+3.829 G 1.329(iltin \(see).2 F/F3 9/Times-Bold@0 SF 1.329(SHELL B)3.829
+F(UIL)-.09 E 1.329(TIN COMMANDS)-.828 F F0(belo)3.579 E 1.329(w\), the)
+-.25 F(programmable completion f)108 712.8 Q(acilities are in)-.1 E -.2
+(vo)-.4 G -.1(ke).2 G(d.).1 E .498
+(First, the command name is identi\214ed.)108 729.6 R .498
+(If the command w)5.498 F .497
+(ord is the empty string \(completion attempted at)-.1 F(GNU Bash-4.1)72
+768 Q(2009 December 29)135.965 E(44)185.955 E 0 Cg EP
+%%Page: 45 45
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E .233(the be)108 84 R .233(ginning of an empty line\), an)-.15 F
+2.733(yc)-.15 G .233(ompspec de\214ned with the)-2.733 F/F1 10
+/Times-Bold@0 SF<ad45>2.733 E F0 .233(option to)2.733 F F1(complete)
+2.733 E F0 .233(is used.)2.733 F .234(If a comp-)5.234 F .481(spec has \
+been de\214ned for that command, the compspec is used to generate the l\
+ist of possible completions)108 96 R .822(for the w)108 108 R 3.322
+(ord. If)-.1 F .822(the command w)3.322 F .823(ord is a full pathname, \
+a compspec for the full pathname is searched for)-.1 F 2.867
+(\214rst. If)108 120 R .366(no compspec is found for the full pathname,\
+ an attempt is made to \214nd a compspec for the portion)2.867 F(follo)
+108 132 Q .421(wing the \214nal slash.)-.25 F .422
+(If those searches to not result in a compspec, an)5.421 F 2.922(yc)-.15
+G .422(ompspec de\214ned with the)-2.922 F F1<ad44>2.922 E F0(option to)
+108 144 Q F1(complete)2.5 E F0(is used as the def)2.5 E(ault.)-.1 E .817
+(Once a compspec has been found, it is used to generate the list of mat\
+ching w)108 160.8 R 3.317(ords. If)-.1 F 3.317(ac)3.317 G .817
+(ompspec is not)-3.317 F(found, the def)108 172.8 Q(ault)-.1 E F1(bash)
+2.5 E F0(completion as described abo)2.5 E .3 -.15(ve u)-.15 H(nder).15
+E F1(Completing)2.5 E F0(is performed.)2.5 E .463
+(First, the actions speci\214ed by the compspec are used.)108 189.6 R
+.464(Only matches which are pre\214x)5.464 F .464(ed by the w)-.15 F
+.464(ord being)-.1 F .596(completed are returned.)108 201.6 R .596
+(When the)5.596 F F1<ad66>3.096 E F0(or)3.095 E F1<ad64>3.095 E F0 .595
+(option is used for \214lename or directory name completion, the)3.095 F
+(shell v)108 213.6 Q(ariable)-.25 E/F2 9/Times-Bold@0 SF(FIGNORE)2.5 E
+F0(is used to \214lter the matches.)2.25 E(An)108 230.4 Q 4.084(yc)-.15
+G 1.584(ompletions speci\214ed by a pathname e)-4.084 F 1.584
+(xpansion pattern to the)-.15 F F1<ad47>4.084 E F0 1.584
+(option are generated ne)4.084 F 4.084(xt. The)-.15 F -.1(wo)108 242.4 S
+.555(rds generated by the pattern need not match the w).1 F .554
+(ord being completed.)-.1 F(The)5.554 E F2(GLOBIGNORE)3.054 E F0 .554
+(shell v)2.804 F(ari-)-.25 E
+(able is not used to \214lter the matches, b)108 254.4 Q(ut the)-.2 E F2
+(FIGNORE)2.5 E F0 -.25(va)2.25 G(riable is used.).25 E(Ne)108 271.2 Q
+.32(xt, the string speci\214ed as the ar)-.15 F .32(gument to the)-.18 F
+F1<ad57>2.82 E F0 .321(option is considered.)2.821 F .321
+(The string is \214rst split using the)5.321 F .413(characters in the)
+108 283.2 R F2(IFS)2.913 E F0 .412(special v)2.663 F .412
+(ariable as delimiters.)-.25 F .412(Shell quoting is honored.)5.412 F
+.412(Each w)5.412 F .412(ord is then e)-.1 F(xpanded)-.15 E .091
+(using brace e)108 295.2 R .091(xpansion, tilde e)-.15 F .092
+(xpansion, parameter and v)-.15 F .092(ariable e)-.25 F .092
+(xpansion, command substitution, and arith-)-.15 F 1.397(metic e)108
+307.2 R 1.396(xpansion, as described abo)-.15 F 1.696 -.15(ve u)-.15 H
+(nder).15 E F2(EXP)3.896 E(ANSION)-.666 E/F3 9/Times-Roman@0 SF(.)A F0
+1.396(The results are split using the rules described)5.896 F(abo)108
+319.2 Q .509 -.15(ve u)-.15 H(nder).15 E F1 -.75(Wo)2.709 G .209
+(rd Splitting).75 F F0 5.209(.T)C .209(he results of the e)-5.209 F .209
+(xpansion are pre\214x-matched ag)-.15 F .21(ainst the w)-.05 F .21
+(ord being com-)-.1 F(pleted, and the matching w)108 331.2 Q
+(ords become the possible completions.)-.1 E 1.238
+(After these matches ha)108 348 R 1.538 -.15(ve b)-.2 H 1.238
+(een generated, an).15 F 3.738(ys)-.15 G 1.237
+(hell function or command speci\214ed with the)-3.738 F F1<ad46>3.737 E
+F0(and)3.737 E F1<ad43>3.737 E F0 3.375(options is in)108 360 R -.2(vo)
+-.4 G -.1(ke).2 G 5.875(d. When).1 F 3.375
+(the command or function is in)5.875 F -.2(vo)-.4 G -.1(ke).2 G 3.375
+(d, the).1 F F2(COMP_LINE)5.876 E F3(,)A F2(COMP_POINT)5.626 E F3(,)A F2
+(COMP_KEY)108 372 Q F3(,)A F0(and)2.408 E F2(COMP_TYPE)2.658 E F0 -.25
+(va)2.408 G .157(riables are assigned v).25 F .157
+(alues as described abo)-.25 F .457 -.15(ve u)-.15 H(nder).15 E F1 .157
+(Shell V)2.657 F(ariables)-.92 E F0 5.157(.I)C(f)-5.157 E 3.485(as)108
+384 S .986(hell function is being in)-3.485 F -.2(vo)-.4 G -.1(ke).2 G
+.986(d, the).1 F F2(COMP_W)3.486 E(ORDS)-.09 E F0(and)3.236 E F2
+(COMP_CW)3.486 E(ORD)-.09 E F0 -.25(va)3.236 G .986
+(riables are also set.).25 F(When)5.986 E .609
+(the function or command is in)108 396 R -.2(vo)-.4 G -.1(ke).2 G .608
+(d, the \214rst ar).1 F .608(gument is the name of the command whose ar)
+-.18 F .608(guments are)-.18 F .073(being completed, the second ar)108
+408 R .073(gument is the w)-.18 F .073
+(ord being completed, and the third ar)-.1 F .073(gument is the w)-.18 F
+.073(ord pre-)-.1 F .608(ceding the w)108 420 R .607
+(ord being completed on the current command line.)-.1 F .607
+(No \214ltering of the generated completions)5.607 F(ag)108 432 Q .093
+(ainst the w)-.05 F .093(ord being completed is performed; the function\
+ or command has complete freedom in generat-)-.1 F(ing the matches.)108
+444 Q(An)108 460.8 Q 2.938(yf)-.15 G .437(unction speci\214ed with)
+-2.938 F F1<ad46>2.937 E F0 .437(is in)2.937 F -.2(vo)-.4 G -.1(ke).2 G
+2.937<648c>.1 G 2.937(rst. The)-2.937 F .437(function may use an)2.937 F
+2.937(yo)-.15 G 2.937(ft)-2.937 G .437(he shell f)-2.937 F .437
+(acilities, including)-.1 F(the)108 472.8 Q F1(compgen)2.956 E F0 -.2
+(bu)2.956 G .456(iltin described belo).2 F 1.756 -.65(w, t)-.25 H 2.956
+(og).65 G .456(enerate the matches.)-2.956 F .457
+(It must put the possible completions in the)5.456 F F2(COMPREPL)108
+484.8 Q(Y)-.828 E F0(array v)2.25 E(ariable.)-.25 E(Ne)108 501.6 Q .081
+(xt, an)-.15 F 2.581(yc)-.15 G .081(ommand speci\214ed with the)-2.581 F
+F1<ad43>2.581 E F0 .081(option is in)2.581 F -.2(vo)-.4 G -.1(ke).2 G
+2.581(di).1 G 2.58(na)-2.581 G 2.58(ne)-2.58 G -.4(nv)-2.58 G .08
+(ironment equi).4 F -.25(va)-.25 G .08(lent to command sub-).25 F 2.858
+(stitution. It)108 513.6 R .359(should print a list of completions, one\
+ per line, to the standard output.)2.858 F .359(Backslash may be used)
+5.359 F(to escape a ne)108 525.6 Q(wline, if necessary)-.25 E(.)-.65 E
+.377(After all of the possible completions are generated, an)108 542.4 R
+2.877<798c>-.15 G .377(lter speci\214ed with the)-2.877 F F1<ad58>2.876
+E F0 .376(option is applied to the)2.876 F 3.181(list. The)108 554.4 R
+.681(\214lter is a pattern as used for pathname e)3.181 F .681
+(xpansion; a)-.15 F F1(&)3.181 E F0 .682
+(in the pattern is replaced with the te)3.182 F .682(xt of)-.15 F .523
+(the w)108 566.4 R .523(ord being completed.)-.1 F 3.023(Al)5.523 G
+(iteral)-3.023 E F1(&)3.023 E F0 .522
+(may be escaped with a backslash; the backslash is remo)3.022 F -.15(ve)
+-.15 G 3.022(db).15 G(efore)-3.022 E .849(attempting a match.)108 578.4
+R(An)5.849 E 3.349(yc)-.15 G .849
+(ompletion that matches the pattern will be remo)-3.349 F -.15(ve)-.15 G
+3.35(df).15 G .85(rom the list.)-3.35 F 3.35(Al)5.85 G(eading)-3.35 E F1
+(!)3.35 E F0(ne)108 590.4 Q -.05(ga)-.15 G
+(tes the pattern; in this case an).05 E 2.5(yc)-.15 G
+(ompletion not matching the pattern will be remo)-2.5 E -.15(ve)-.15 G
+(d.).15 E(Finally)108 607.2 Q 3.087(,a)-.65 G .887 -.15(ny p)-3.087 H
+.587(re\214x and suf).15 F .587(\214x speci\214ed with the)-.25 F F1
+<ad50>3.087 E F0(and)3.087 E F1<ad53>3.087 E F0 .587
+(options are added to each member of the com-)3.087 F(pletion list, and\
+ the result is returned to the readline completion code as the list of \
+possible completions.)108 619.2 Q .246(If the pre)108 636 R .247
+(viously-applied actions do not generate an)-.25 F 2.747(ym)-.15 G .247
+(atches, and the)-2.747 F F1 .247(\255o dir)2.747 F(names)-.15 E F0 .247
+(option w)2.747 F .247(as supplied to)-.1 F F1(complete)108 648 Q F0
+(when the compspec w)2.5 E
+(as de\214ned, directory name completion is attempted.)-.1 E .462
+(If the)108 664.8 R F1 .462(\255o plusdirs)2.962 F F0 .462(option w)
+2.962 F .462(as supplied to)-.1 F F1(complete)2.962 E F0 .462
+(when the compspec w)2.962 F .462(as de\214ned, directory name com-)-.1
+F(pletion is attempted and an)108 676.8 Q 2.5(ym)-.15 G
+(atches are added to the results of the other actions.)-2.5 E .559
+(By def)108 693.6 R .559(ault, if a compspec is found, whate)-.1 F -.15
+(ve)-.25 G 3.059(ri).15 G 3.059(tg)-3.059 G .56
+(enerates is returned to the completion code as the full set)-3.059 F
+.632(of possible completions.)108 705.6 R .632(The def)5.632 F(ault)-.1
+E F1(bash)3.132 E F0 .631
+(completions are not attempted, and the readline def)3.131 F .631
+(ault of \214le-)-.1 F .558(name completion is disabled.)108 717.6 R
+.558(If the)5.558 F F1 .559(\255o bashdefault)3.059 F F0 .559(option w)
+3.059 F .559(as supplied to)-.1 F F1(complete)3.059 E F0 .559
+(when the compspec)3.059 F -.1(wa)108 729.6 S 3.172(sd).1 G .672
+(e\214ned, the)-3.172 F F1(bash)3.172 E F0(def)3.172 E .671
+(ault completions are attempted if the compspec generates no matches.)
+-.1 F .671(If the)5.671 F F1<ad6f>3.171 E F0(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(45)185.955 E 0 Cg EP
+%%Page: 46 46
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(default)108 84 Q F0 1.207(option w)3.706 F
+1.207(as supplied to)-.1 F F1(complete)3.707 E F0 1.207
+(when the compspec w)3.707 F 1.207(as de\214ned, readline')-.1 F 3.707
+(sd)-.55 G(ef)-3.707 E 1.207(ault completion)-.1 F
+(will be performed if the compspec \(and, if attempted, the def)108 96 Q
+(ault)-.1 E F1(bash)2.5 E F0(completions\) generate no matches.)2.5 E
+.245(When a compspec indicates that directory name completion is desire\
+d, the programmable completion func-)108 112.8 R .632(tions force readl\
+ine to append a slash to completed names which are symbolic links to di\
+rectories, subject)108 124.8 R 2.762(to the v)108 136.8 R 2.762
+(alue of the)-.25 F F1(mark\255dir)5.262 E(ectories)-.18 E F0 2.761
+(readline v)5.262 F 2.761(ariable, re)-.25 F -.05(ga)-.15 G 2.761
+(rdless of the setting of the).05 F F1(mark-sym-)5.261 E(link)108 148.8
+Q(ed\255dir)-.1 E(ectories)-.18 E F0(readline v)2.5 E(ariable.)-.25 E
+.19(There is some support for dynamically modifying completions.)108
+165.6 R .191(This is most useful when used in combina-)5.191 F 1.33
+(tion with a def)108 177.6 R 1.33(ault completion speci\214ed with)-.1 F
+F1 1.33(complete -D)3.83 F F0 6.33(.I)C(t')-6.33 E 3.83(sp)-.55 G 1.33
+(ossible for shell functions e)-3.83 F -.15(xe)-.15 G 1.33(cuted as).15
+F .93(completion handlers to indicate that completion should be retried\
+ by returning an e)108 189.6 R .93(xit status of 124.)-.15 F .93(If a)
+5.93 F .1(shell function returns 124, and changes the compspec associat\
+ed with the command on which completion is)108 201.6 R .665
+(being attempted \(supplied as the \214rst ar)108 213.6 R .666
+(gument when the function is e)-.18 F -.15(xe)-.15 G .666
+(cuted\), programmable completion).15 F 1.139(restarts from the be)108
+225.6 R 1.139
+(ginning, with an attempt to \214nd a compspec for that command.)-.15 F
+1.139(This allo)6.139 F 1.138(ws a set of)-.25 F(completions to be b)108
+237.6 Q(uilt dynamically as completion is attempted, rather than being \
+loaded all at once.)-.2 E -.15(Fo)108 254.4 S 2.636(ri).15 G .137
+(nstance, assuming that there is a library of compspecs, each k)-2.636 F
+.137(ept in a \214le corresponding to the name of)-.1 F
+(the command, the follo)108 266.4 Q(wing def)-.25 E
+(ault completion function w)-.1 E(ould load completions dynamically:)-.1
+E/F2 10/Courier@0 SF(_completion_loader\(\))108 283.2 Q({)108 295.2 Q 6
+(.")144 307.2 S
+(/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124)-6 E(})108
+319.2 Q(complete -D -F _completion_loader)108 331.2 Q/F3 10.95
+/Times-Bold@0 SF(HIST)72 360 Q(OR)-.197 E(Y)-.383 E F0 .372(When the)108
+372 R F1 .372(\255o history)2.872 F F0 .372(option to the)2.872 F F1
+(set)2.872 E F0 -.2(bu)2.872 G .372(iltin is enabled, the shell pro).2 F
+.371(vides access to the)-.15 F/F4 10/Times-Italic@0 SF .371
+(command history)2.871 F F0(,)A .304(the list of commands pre)108 384 R
+.304(viously typed.)-.25 F .304(The v)5.304 F .304(alue of the)-.25 F/F5
+9/Times-Bold@0 SF(HISTSIZE)2.804 E F0 -.25(va)2.554 G .305
+(riable is used as the number of com-).25 F .43(mands to sa)108 396 R
+.73 -.15(ve i)-.2 H 2.93(nah).15 G .43(istory list.)-2.93 F .43(The te)
+5.43 F .429(xt of the last)-.15 F F5(HISTSIZE)2.929 E F0 .429
+(commands \(def)2.679 F .429(ault 500\) is sa)-.1 F -.15(ve)-.2 G 2.929
+(d. The).15 F(shell)2.929 E .287
+(stores each command in the history list prior to parameter and v)108
+408 R .287(ariable e)-.25 F .287(xpansion \(see)-.15 F F5(EXP)2.787 E
+(ANSION)-.666 E F0(abo)2.537 E -.15(ve)-.15 G(\)).15 E -.2(bu)108 420 S
+4.066(ta).2 G 1.565(fter history e)-4.066 F 1.565
+(xpansion is performed, subject to the v)-.15 F 1.565
+(alues of the shell v)-.25 F(ariables)-.25 E F5(HISTIGNORE)4.065 E F0
+(and)3.815 E F5(HISTCONTR)108 432 Q(OL)-.27 E/F6 9/Times-Roman@0 SF(.)A
+F0 .082
+(On startup, the history is initialized from the \214le named by the v)
+108 448.8 R(ariable)-.25 E F5(HISTFILE)2.583 E F0(\(def)2.333 E(ault)-.1
+E F4(~/.bash_history)2.583 E F0(\).)A .315(The \214le named by the v)108
+460.8 R .315(alue of)-.25 F F5(HISTFILE)2.815 E F0 .315
+(is truncated, if necessary)2.565 F 2.815(,t)-.65 G 2.815(oc)-2.815 G
+.315(ontain no more than the number of)-2.815 F .532
+(lines speci\214ed by the v)108 472.8 R .532(alue of)-.25 F F5
+(HISTFILESIZE)3.032 E F6(.)A F0 .532
+(When the history \214le is read, lines be)5.032 F .532
+(ginning with the his-)-.15 F 1.159(tory comment character follo)108
+484.8 R 1.158(wed immediately by a digit are interpreted as timestamps \
+for the preceding)-.25 F .052(history line.)108 496.8 R .053
+(These timestamps are optionally displayed depending on the v)5.052 F
+.053(alue of the)-.25 F F5(HISTTIMEFORMA)2.553 E(T)-.855 E F0 -.25(va)
+108 508.8 S 4.387(riable. When).25 F 1.887(an interacti)4.387 F 2.187
+-.15(ve s)-.25 H 1.887(hell e).15 F 1.887(xits, the last)-.15 F F5
+($HISTSIZE)4.387 E F0 1.887(lines are copied from the history list to)
+4.137 F F5($HISTFILE)108 520.8 Q F6(.)A F0 .056(If the)4.556 F F1
+(histappend)2.556 E F0 .056
+(shell option is enabled \(see the description of)2.556 F F1(shopt)2.556
+E F0(under)2.556 E F5 .056(SHELL B)2.556 F(UIL)-.09 E(TIN)-.828 E
+(COMMANDS)108 532.8 Q F0(belo)2.672 E .422(w\), the lines are appended \
+to the history \214le, otherwise the history \214le is o)-.25 F -.15(ve)
+-.15 G 2.921(rwritten. If).15 F F5(HISTFILE)108 544.8 Q F0 .435(is unse\
+t, or if the history \214le is unwritable, the history is not sa)2.684 F
+-.15(ve)-.2 G 2.935(d. If).15 F(the)2.935 E F5(HISTTIMEFORMA)2.935 E(T)
+-.855 E F0 -.25(va)108 556.8 S .917
+(riable is set, time stamps are written to the history \214le, mark).25
+F .916(ed with the history comment character)-.1 F 3.416(,s)-.4 G(o)
+-3.416 E(the)108 568.8 Q 3.082(ym)-.15 G .582(ay be preserv)-3.082 F
+.582(ed across shell sessions.)-.15 F .583
+(This uses the history comment character to distinguish time-)5.583 F
+.987(stamps from other history lines.)108 580.8 R .987(After sa)5.987 F
+.987(ving the history)-.2 F 3.486(,t)-.65 G .986
+(he history \214le is truncated to contain no more)-3.486 F(than)108
+592.8 Q F5(HISTFILESIZE)2.5 E F0 2.5(lines. If)2.25 F F5(HISTFILESIZE)
+2.5 E F0(is not set, no truncation is performed.)2.25 E 1.293(The b)108
+609.6 R 1.293(uiltin command)-.2 F F1(fc)3.793 E F0(\(see)3.793 E F5
+1.293(SHELL B)3.793 F(UIL)-.09 E 1.293(TIN COMMANDS)-.828 F F0(belo)
+3.543 E 1.294(w\) may be used to list or edit and re-)-.25 F -.15(exe)
+108 621.6 S .674(cute a portion of the history list.).15 F(The)5.673 E
+F1(history)3.173 E F0 -.2(bu)3.173 G .673
+(iltin may be used to display or modify the history list).2 F .279
+(and manipulate the history \214le.)108 633.6 R .279
+(When using command-line editing, search commands are a)5.279 F -.25(va)
+-.2 G .28(ilable in each).25 F(editing mode that pro)108 645.6 Q
+(vide access to the history list.)-.15 E 1.486(The shell allo)108 662.4
+R 1.486(ws control o)-.25 F -.15(ve)-.15 G 3.986(rw).15 G 1.486
+(hich commands are sa)-3.986 F -.15(ve)-.2 G 3.986(do).15 G 3.986(nt)
+-3.986 G 1.486(he history list.)-3.986 F(The)6.485 E F5(HISTCONTR)3.985
+E(OL)-.27 E F0(and)3.735 E F5(HISTIGNORE)108 674.4 Q F0 -.25(va)2.707 G
+.457(riables may be set to cause the shell to sa).25 F .758 -.15(ve o)
+-.2 H .458(nly a subset of the commands entered.).15 F(The)5.458 E F1
+(cmdhist)108 686.4 Q F0 .75
+(shell option, if enabled, causes the shell to attempt to sa)3.25 F 1.05
+-.15(ve e)-.2 H .75(ach line of a multi-line command in).15 F 1.077
+(the same history entry)108 698.4 R 3.577(,a)-.65 G 1.077
+(dding semicolons where necessary to preserv)-3.577 F 3.577(es)-.15 G
+1.077(yntactic correctness.)-3.577 F(The)6.077 E F1(lithist)3.577 E F0
+.374(shell option causes the shell to sa)108 710.4 R .674 -.15(ve t)-.2
+H .374(he command with embedded ne).15 F .373
+(wlines instead of semicolons.)-.25 F .373(See the)5.373 F .318
+(description of the)108 722.4 R F1(shopt)2.818 E F0 -.2(bu)2.818 G .318
+(iltin belo).2 F 2.818(wu)-.25 G(nder)-2.818 E F5 .318(SHELL B)2.818 F
+(UIL)-.09 E .318(TIN COMMANDS)-.828 F F0 .319
+(for information on setting and)2.568 F(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(46)185.955 E 0 Cg EP
+%%Page: 47 47
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E(unsetting shell options.)108 84 Q/F1 10.95/Times-Bold@0 SF(HIST)
+72 100.8 Q(OR)-.197 E 2.738(YE)-.383 G(XP)-2.738 E(ANSION)-.81 E F0 .611
+(The shell supports a history e)108 112.8 R .611
+(xpansion feature that is similar to the history e)-.15 F .61
+(xpansion in)-.15 F/F2 10/Times-Bold@0 SF(csh.)3.11 E F0 .61
+(This section)5.61 F .87(describes what syntax features are a)108 124.8
+R -.25(va)-.2 G 3.371(ilable. This).25 F .871(feature is enabled by def)
+3.371 F .871(ault for interacti)-.1 F 1.171 -.15(ve s)-.25 H .871
+(hells, and).15 F 2.014(can be disabled using the)108 136.8 R F2(+H)
+4.514 E F0 2.014(option to the)4.514 F F2(set)4.514 E F0 -.2(bu)4.514 G
+2.014(iltin command \(see).2 F/F3 9/Times-Bold@0 SF 2.013(SHELL B)4.513
+F(UIL)-.09 E 2.013(TIN COMMANDS)-.828 F F0(belo)108 148.8 Q 2.5
+(w\). Non-interacti)-.25 F .3 -.15(ve s)-.25 H
+(hells do not perform history e).15 E(xpansion by def)-.15 E(ault.)-.1 E
+1.305(History e)108 165.6 R 1.305(xpansions introduce w)-.15 F 1.306(or\
+ds from the history list into the input stream, making it easy to repea\
+t)-.1 F .21(commands, insert the ar)108 177.6 R .21(guments to a pre)
+-.18 F .209
+(vious command into the current input line, or \214x errors in pre)-.25
+F(vious)-.25 E(commands quickly)108 189.6 Q(.)-.65 E 1.163(History e)108
+206.4 R 1.163(xpansion is performed immediately after a complete line i\
+s read, before the shell breaks it into)-.15 F -.1(wo)108 218.4 S 3.2
+(rds. It).1 F(tak)3.2 E .7(es place in tw)-.1 F 3.2(op)-.1 G 3.2
+(arts. The)-3.2 F .7
+(\214rst is to determine which line from the history list to use during)
+3.2 F 4.367(substitution. The)108 230.4 R 1.868(second is to select por\
+tions of that line for inclusion into the current one.)4.367 F 1.868
+(The line)6.868 F .663(selected from the history is the)108 242.4 R/F4
+10/Times-Italic@0 SF -.15(ev)3.163 G(ent).15 E F0 3.163(,a)C .663
+(nd the portions of that line that are acted upon are)-3.163 F F4(wor)
+3.162 E(ds)-.37 E F0 5.662(.V)C(arious)-6.772 E F4(modi\214er)108 254.4
+Q(s)-.1 E F0 .226(are a)2.726 F -.25(va)-.2 G .226
+(ilable to manipulate the selected w).25 F 2.726(ords. The)-.1 F .227
+(line is brok)2.726 F .227(en into w)-.1 F .227(ords in the same f)-.1 F
+(ashion)-.1 E .352(as when reading input, so that se)108 266.4 R -.15
+(ve)-.25 G(ral).15 E F4(metac)2.852 E(har)-.15 E(acter)-.15 E F0 .351
+(-separated w)B .351(ords surrounded by quotes are considered)-.1 F .624
+(one w)108 278.4 R 3.124(ord. History)-.1 F -.15(ex)3.124 G .624
+(pansions are introduced by the appearance of the history e).15 F .625
+(xpansion character)-.15 F 3.125(,w)-.4 G(hich)-3.125 E(is)108 290.4 Q
+F2(!)3.333 E F0(by def)3.333 E 2.5(ault. Only)-.1 F(backslash \()2.5 E
+F2(\\).833 E F0 2.5(\)a).833 G(nd single quotes can quote the history e)
+-2.5 E(xpansion character)-.15 E(.)-.55 E(Se)108 307.2 Q -.15(ve)-.25 G
+.03(ral characters inhibit history e).15 F .03
+(xpansion if found immediately follo)-.15 F .03(wing the history e)-.25
+F .03(xpansion character)-.15 F(,)-.4 E -2.15 -.25(ev e)108 319.2 T
+3.162(ni).25 G 3.162(fi)-3.162 G 3.162(ti)-3.162 G 3.162(su)-3.162 G
+.662(nquoted: space, tab, ne)-3.162 F .662(wline, carriage return, and)
+-.25 F F2(=)3.162 E F0 5.662(.I)C 3.162(ft)-5.662 G(he)-3.162 E F2
+(extglob)3.162 E F0 .662(shell option is enabled,)3.162 F F2(\()3.163 E
+F0(will also inhibit e)108 331.2 Q(xpansion.)-.15 E(Se)108 348 Q -.15
+(ve)-.25 G .11(ral shell options settable with the).15 F F2(shopt)2.61 E
+F0 -.2(bu)2.61 G .109(iltin may be used to tailor the beha).2 F .109
+(vior of history e)-.2 F(xpansion.)-.15 E 1.142(If the)108 360 R F2
+(histv)3.643 E(erify)-.1 E F0 1.143
+(shell option is enabled \(see the description of the)3.643 F F2(shopt)
+3.643 E F0 -.2(bu)3.643 G 1.143(iltin belo).2 F 1.143(w\), and)-.25 F F2
+-.18(re)3.643 G(adline).18 E F0(is)3.643 E .461(being used, history sub\
+stitutions are not immediately passed to the shell parser)108 372 R 5.46
+(.I)-.55 G .46(nstead, the e)-5.46 F .46(xpanded line)-.15 F 1.515
+(is reloaded into the)108 384 R F2 -.18(re)4.015 G(adline).18 E F0 1.515
+(editing b)4.015 F(uf)-.2 E 1.516(fer for further modi\214cation.)-.25 F
+(If)6.516 E F2 -.18(re)4.016 G(adline).18 E F0 1.516
+(is being used, and the)4.016 F F2(histr)108 396 Q(eedit)-.18 E F0 1.202
+(shell option is enabled, a f)3.702 F 1.202
+(ailed history substitution will be reloaded into the)-.1 F F2 -.18(re)
+3.702 G(adline).18 E F0(editing)3.702 E -.2(bu)108 408 S -.25(ff).2 G
+1.16(er for correction.).25 F(The)6.16 E F2<ad70>3.66 E F0 1.16
+(option to the)3.66 F F2(history)3.66 E F0 -.2(bu)3.661 G 1.161
+(iltin command may be used to see what a history).2 F -.15(ex)108 420 S
+.056(pansion will do before using it.).15 F(The)5.056 E F2<ad73>2.556 E
+F0 .056(option to the)2.556 F F2(history)2.555 E F0 -.2(bu)2.555 G .055
+(iltin may be used to add commands to the).2 F
+(end of the history list without actually e)108 432 Q -.15(xe)-.15 G
+(cuting them, so that the).15 E 2.5(ya)-.15 G(re a)-2.5 E -.25(va)-.2 G
+(ilable for subsequent recall.).25 E 2.2(The shell allo)108 448.8 R 2.2
+(ws control of the v)-.25 F 2.2(arious characters used by the history e)
+-.25 F 2.2(xpansion mechanism \(see the)-.15 F 1.147(description of)108
+460.8 R F2(histchars)3.647 E F0(abo)3.647 E 1.447 -.15(ve u)-.15 H(nder)
+.15 E F2 1.147(Shell V)3.647 F(ariables)-.92 E F0 3.646(\). The)B 1.146
+(shell uses the history comment character to)3.646 F
+(mark history timestamps when writing the history \214le.)108 472.8 Q F2
+(Ev)87 489.6 Q(ent Designators)-.1 E F0(An e)108 501.6 Q -.15(ve)-.25 G
+(nt designator is a reference to a command line entry in the history li\
+st.).15 E F2(!)108 518.4 Q F0 1.607(Start a history substitution, e)
+32.67 F 1.607(xcept when follo)-.15 F 1.607(wed by a)-.25 F F2(blank)
+4.107 E F0 4.107(,n)C -.25(ew)-4.107 G 1.608
+(line, carriage return, = or \().25 F(\(when the)144 530.4 Q F2(extglob)
+2.5 E F0(shell option is enabled using the)2.5 E F2(shopt)2.5 E F0 -.2
+(bu)2.5 G(iltin\).).2 E F2(!)108 542.4 Q F4(n)A F0
+(Refer to command line)27.67 E F4(n)2.5 E F0(.).24 E F2<21ad>108 554.4 Q
+F4(n)A F0(Refer to the current command line minus)21.97 E F4(n)2.5 E F0
+(.).24 E F2(!!)108 566.4 Q F0(Refer to the pre)29.34 E(vious command.)
+-.25 E(This is a synon)5 E(ym for `!\2551'.)-.15 E F2(!)108 578.4 Q F4
+(string)A F0(Refer to the most recent command starting with)9.33 E F4
+(string)2.5 E F0(.).22 E F2(!?)108 590.4 Q F4(string)A F2([?])A F0 1.022
+(Refer to the most recent command containing)144 602.4 R F4(string)3.522
+E F0 6.022(.T).22 G 1.022(he trailing)-6.022 F F2(?)3.522 E F0 1.022
+(may be omitted if)3.522 F F4(string)3.861 E F0(is)3.741 E(follo)144
+614.4 Q(wed immediately by a ne)-.25 E(wline.)-.25 E/F5 12/Times-Bold@0
+SF(^)108 631.4 Q F4(string1)-5 I F5(^)5 I F4(string2)-5 I F5(^)5 I F0
+2.629(Quick substitution.)144 638.4 R 2.629
+(Repeat the last command, replacing)7.629 F F4(string1)5.469 E F0(with)
+5.129 E F4(string2)5.129 E F0 7.629(.E).02 G(qui)-7.629 E -.25(va)-.25 G
+2.63(lent to).25 F -.74(``)144 650.4 S(!!:s/).74 E F4(string1)A F0(/)A
+F4(string2)A F0(/')A 2.5('\()-.74 G(see)-2.5 E F2(Modi\214ers)2.5 E F0
+(belo)2.5 E(w\).)-.25 E F2(!#)108 662.4 Q F0
+(The entire command line typed so f)27.67 E(ar)-.1 E(.)-.55 E F2 -.75
+(Wo)87 679.2 S(rd Designators).75 E F0 -.8(Wo)108 691.2 S 1.314
+(rd designators are used to select desired w).8 F 1.314(ords from the e)
+-.1 F -.15(ve)-.25 G 3.814(nt. A).15 F F2(:)3.814 E F0 1.313
+(separates the e)3.813 F -.15(ve)-.25 G 1.313(nt speci\214cation).15 F
+.529(from the w)108 703.2 R .529(ord designator)-.1 F 5.529(.I)-.55 G
+3.029(tm)-5.529 G .529(ay be omitted if the w)-3.029 F .529
+(ord designator be)-.1 F .529(gins with a)-.15 F F2(^)3.029 E F0(,)A F2
+($)3.029 E F0(,)A F2(*)3.029 E F0(,)A F2<ad>3.029 E F0 3.029(,o)C(r)
+-3.029 E F2(%)3.029 E F0 5.53(.W)C(ords)-6.33 E 1.301
+(are numbered from the be)108 715.2 R 1.301
+(ginning of the line, with the \214rst w)-.15 F 1.3
+(ord being denoted by 0 \(zero\).)-.1 F -.8(Wo)6.3 G 1.3(rds are).8 F
+(inserted into the current line separated by single spaces.)108 727.2 Q
+(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(47)185.955 E 0 Cg EP
+%%Page: 48 48
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF 2.5(0\()108 84 S(zer)-2.5 E(o\))-.18 E F0
+(The zeroth w)144 96 Q 2.5(ord. F)-.1 F
+(or the shell, this is the command w)-.15 E(ord.)-.1 E/F2 10
+/Times-Italic@0 SF(n)108.36 108 Q F0(The)30.64 E F2(n)2.5 E F0(th w)A
+(ord.)-.1 E F1(^)108 120 Q F0(The \214rst ar)32.67 E 2.5(gument. That)
+-.18 F(is, w)2.5 E(ord 1.)-.1 E F1($)108 132 Q F0(The last ar)31 E
+(gument.)-.18 E F1(%)108 144 Q F0(The w)26 E
+(ord matched by the most recent `?)-.1 E F2(string)A F0(?' search.)A F2
+(x)108.77 156 Q F1<ad>A F2(y)A F0 2.5(Ar)20.65 G(ange of w)-2.5 E
+(ords; `\255)-.1 E F2(y)A F0 2.5('a)C(bbre)-2.5 E(viates `0\255)-.25 E
+F2(y)A F0('.)A F1(*)108 168 Q F0 .315(All of the w)31 F .315(ords b)-.1
+F .315(ut the zeroth.)-.2 F .315(This is a synon)5.315 F .315(ym for `)
+-.15 F F2(1\255$)A F0 2.815('. It)B .315(is not an error to use)2.815 F
+F1(*)2.816 E F0 .316(if there is)2.816 F(just one w)144 180 Q
+(ord in the e)-.1 E -.15(ve)-.25 G
+(nt; the empty string is returned in that case.).15 E F1(x*)108 192 Q F0
+(Abbre)26 E(viates)-.25 E F2(x\255$)2.5 E F0(.)A F1<78ad>108 204 Q F0
+(Abbre)25.3 E(viates)-.25 E F2(x\255$)2.5 E F0(lik)2.5 E(e)-.1 E F1(x*)
+2.5 E F0 2.5(,b)C(ut omits the last w)-2.7 E(ord.)-.1 E(If a w)108 220.8
+Q(ord designator is supplied without an e)-.1 E -.15(ve)-.25 G
+(nt speci\214cation, the pre).15 E(vious command is used as the e)-.25 E
+-.15(ve)-.25 G(nt.).15 E F1(Modi\214ers)87 237.6 Q F0 .184
+(After the optional w)108 249.6 R .184(ord designator)-.1 F 2.684(,t)-.4
+G .183(here may appear a sequence of one or more of the follo)-2.684 F
+.183(wing modi\214ers,)-.25 F(each preceded by a `:'.)108 261.6 Q F1(h)
+108 278.4 Q F0(Remo)30.44 E .3 -.15(ve a t)-.15 H
+(railing \214le name component, lea).15 E(ving only the head.)-.2 E F1
+(t)108 290.4 Q F0(Remo)32.67 E .3 -.15(ve a)-.15 H
+(ll leading \214le name components, lea).15 E(ving the tail.)-.2 E F1(r)
+108 302.4 Q F0(Remo)31.56 E .3 -.15(ve a t)-.15 H(railing suf).15 E
+(\214x of the form)-.25 E F2(.xxx)2.5 E F0 2.5(,l)C(ea)-2.5 E
+(ving the basename.)-.2 E F1(e)108 314.4 Q F0(Remo)31.56 E .3 -.15(ve a)
+-.15 H(ll b).15 E(ut the trailing suf)-.2 E(\214x.)-.25 E F1(p)108 326.4
+Q F0(Print the ne)30.44 E 2.5(wc)-.25 G(ommand b)-2.5 E(ut do not e)-.2
+E -.15(xe)-.15 G(cute it.).15 E F1(q)108 338.4 Q F0
+(Quote the substituted w)30.44 E(ords, escaping further substitutions.)
+-.1 E F1(x)108 350.4 Q F0(Quote the substituted w)31 E(ords as with)-.1
+E F1(q)2.5 E F0 2.5(,b)C(ut break into w)-2.7 E(ords at)-.1 E F1(blanks)
+2.5 E F0(and ne)2.5 E(wlines.)-.25 E F1(s/)108 362.4 Q F2(old)A F1(/)A
+F2(ne)A(w)-.15 E F1(/)A F0(Substitute)144 374.4 Q F2(ne)3.081 E(w)-.15 E
+F0 .221(for the \214rst occurrence of)3.031 F F2(old)2.951 E F0 .221
+(in the e)3.491 F -.15(ve)-.25 G .221(nt line.).15 F(An)5.221 E 2.721
+(yd)-.15 G .221(elimiter can be used in place)-2.721 F .617(of /.)144
+386.4 R .617
+(The \214nal delimiter is optional if it is the last character of the e)
+5.617 F -.15(ve)-.25 G .617(nt line.).15 F .616(The delimiter may)5.616
+F .666(be quoted in)144 398.4 R F2(old)3.396 E F0(and)3.936 E F2(ne)
+3.526 E(w)-.15 E F0 .666(with a single backslash.)3.476 F .666
+(If & appears in)5.666 F F2(ne)3.166 E(w)-.15 E F0 3.166(,i).31 G 3.166
+(ti)-3.166 G 3.166(sr)-3.166 G .666(eplaced by)-3.166 F F2(old)3.166 E
+F0 5.666(.A).77 G .275(single backslash will quote the &.)144 410.4 R
+(If)5.275 E F2(old)3.004 E F0 .274(is null, it is set to the last)3.544
+F F2(old)3.004 E F0 .274(substituted, or)3.544 F 2.774(,i)-.4 G 2.774
+(fn)-2.774 G 2.774(op)-2.774 G(re)-2.774 E(vi-)-.25 E
+(ous history substitutions took place, the last)144 422.4 Q F2(string)
+2.84 E F0(in a)2.72 E F1(!?)2.5 E F2(string)A F1([?])A F0(search.)5 E F1
+(&)108 434.4 Q F0(Repeat the pre)27.67 E(vious substitution.)-.25 E F1
+(g)108 446.4 Q F0 .397(Cause changes to be applied o)31 F -.15(ve)-.15 G
+2.897(rt).15 G .398(he entire e)-2.897 F -.15(ve)-.25 G .398(nt line.)
+.15 F .398(This is used in conjunction with `)5.398 F F1(:s)A F0 2.898
+('\()C(e.g.,)-2.898 E(`)144 458.4 Q F1(:gs/)A F2(old)A F1(/)A F2(ne)A(w)
+-.15 E F1(/)A F0 1.219('\) or `)B F1(:&)A F0 3.719('. If)B 1.219
+(used with `)3.719 F F1(:s)A F0 1.218(', an)B 3.718(yd)-.15 G 1.218
+(elimiter can be used in place of /, and the \214nal)-3.718 F .089
+(delimiter is optional if it is the last character of the e)144 470.4 R
+-.15(ve)-.25 G .09(nt line.).15 F(An)5.09 E F1(a)2.59 E F0 .09
+(may be used as a synon)2.59 F .09(ym for)-.15 F F1(g)144 482.4 Q F0(.)A
+F1(G)108 494.4 Q F0(Apply the follo)28.22 E(wing `)-.25 E F1(s)A F0 2.5
+('m)C(odi\214er once to each w)-2.5 E(ord in the e)-.1 E -.15(ve)-.25 G
+(nt line.).15 E/F3 10.95/Times-Bold@0 SF(SHELL B)72 511.2 Q(UIL)-.11 E
+(TIN COMMANDS)-1.007 E F0 .063(Unless otherwise noted, each b)108 523.2
+R .062(uiltin command documented in this section as accepting options p\
+receded by)-.2 F F1<ad>108 535.2 Q F0(accepts)2.533 E F1<adad>2.533 E F0
+.034(to signify the end of the options.)2.533 F(The)5.034 E F1(:)2.534 E
+F0(,)A F1(true)2.534 E F0(,)A F1(false)2.534 E F0 2.534(,a)C(nd)-2.534 E
+F1(test)2.534 E F0 -.2(bu)2.534 G .034(iltins do not accept options and)
+.2 F .078(do not treat)108 547.2 R F1<adad>2.577 E F0(specially)2.577 E
+5.077(.T)-.65 G(he)-5.077 E F1(exit)2.577 E F0(,)A F1(logout)2.577 E F0
+(,)A F1(br)2.577 E(eak)-.18 E F0(,)A F1(continue)2.577 E F0(,)A F1(let)
+2.577 E F0 2.577(,a)C(nd)-2.577 E F1(shift)2.577 E F0 -.2(bu)2.577 G
+.077(iltins accept and process ar).2 F(gu-)-.18 E .319(ments be)108
+559.2 R .319(ginning with)-.15 F F1<ad>2.819 E F0 .319
+(without requiring)2.819 F F1<adad>2.819 E F0 5.319(.O)C .319(ther b)
+-5.319 F .319(uiltins that accept ar)-.2 F .32(guments b)-.18 F .32
+(ut are not speci\214ed as)-.2 F 1.144(accepting options interpret ar)
+108 571.2 R 1.144(guments be)-.18 F 1.144(ginning with)-.15 F F1<ad>
+3.643 E F0 1.143(as in)3.643 F -.25(va)-.4 G 1.143
+(lid options and require).25 F F1<adad>3.643 E F0 1.143(to pre)3.643 F
+-.15(ve)-.25 G 1.143(nt this).15 F(interpretation.)108 583.2 Q F1(:)108
+601.2 Q F0([)2.5 E F2(ar)A(guments)-.37 E F0(])A .451(No ef)144 613.2 R
+.451(fect; the command does nothing be)-.25 F .452(yond e)-.15 F
+(xpanding)-.15 E F2(ar)3.282 E(guments)-.37 E F0 .452(and performing an)
+3.222 F 2.952(ys)-.15 G(peci\214ed)-2.952 E 2.5(redirections. A)144
+625.2 R(zero e)2.5 E(xit code is returned.)-.15 E F1(.)110.5 642 Q F2
+(\214lename)6.666 E F0([)2.5 E F2(ar)A(guments)-.37 E F0(])A F1(sour)108
+654 Q(ce)-.18 E F2(\214lename)2.5 E F0([)2.5 E F2(ar)A(guments)-.37 E F0
+(])A 1.02(Read and e)144 666 R -.15(xe)-.15 G 1.02(cute commands from)
+.15 F F2(\214lename)5.43 E F0 1.02(in the current shell en)3.7 F 1.02
+(vironment and return the e)-.4 F(xit)-.15 E 1.68
+(status of the last command e)144 678 R -.15(xe)-.15 G 1.68(cuted from)
+.15 F F2(\214lename)4.18 E F0 6.68(.I).18 G(f)-6.68 E F2(\214lename)6.09
+E F0 1.68(does not contain a slash, \214le)4.36 F .608(names in)144 690
+R/F4 9/Times-Bold@0 SF -.666(PA)3.108 G(TH)-.189 E F0 .608
+(are used to \214nd the directory containing)2.858 F F2(\214lename)3.108
+E F0 5.608(.T).18 G .608(he \214le searched for in)-5.608 F F4 -.666(PA)
+3.108 G(TH)-.189 E F0 .832(need not be e)144 702 R -.15(xe)-.15 G 3.332
+(cutable. When).15 F F1(bash)3.332 E F0 .832(is not in)3.332 F F2 .832
+(posix mode)3.332 F F0 3.332(,t)C .833
+(he current directory is searched if no)-3.332 F .982
+(\214le is found in)144 714 R F4 -.666(PA)3.481 G(TH)-.189 E/F5 9
+/Times-Roman@0 SF(.)A F0 .981(If the)5.481 F F1(sour)3.481 E(cepath)-.18
+E F0 .981(option to the)3.481 F F1(shopt)3.481 E F0 -.2(bu)3.481 G .981
+(iltin command is turned of).2 F .981(f, the)-.25 F F4 -.666(PA)144 726
+S(TH)-.189 E F0 .112(is not searched.)2.362 F .112(If an)5.112 F(y)-.15
+E F2(ar)2.612 E(guments)-.37 E F0 .112(are supplied, the)2.612 F 2.612
+(yb)-.15 G .112(ecome the positional parameters when)-2.612 F
+(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(48)185.955 E 0 Cg EP
+%%Page: 49 49
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Italic@0 SF(\214lename)144 84 Q F0 .342(is e)2.842 F
+-.15(xe)-.15 G 2.842(cuted. Otherwise).15 F .342
+(the positional parameters are unchanged.)2.842 F .341
+(The return status is the)5.341 F .716(status of the last command e)144
+96 R .716(xited within the script \(0 if no commands are e)-.15 F -.15
+(xe)-.15 G .716(cuted\), and f).15 F .716(alse if)-.1 F F1(\214lename)
+145.91 108 Q F0(is not found or cannot be read.)2.68 E/F2 10
+/Times-Bold@0 SF(alias)108 124.8 Q F0([)2.5 E F2<ad70>A F0 2.5(][)C F1
+(name)-2.5 E F0([=)A F1(value)A F0 2.5(].)C(..])-2.5 E F2(Alias)144
+136.8 Q F0 2.725(with no ar)5.225 F 2.724(guments or with the)-.18 F F2
+<ad70>5.224 E F0 2.724(option prints the list of aliases in the form)
+5.224 F F2(alias)5.224 E F1(name)144 148.8 Q F0(=)A F1(value)A F0 .58
+(on standard output.)3.08 F .58(When ar)5.58 F .58
+(guments are supplied, an alias is de\214ned for each)-.18 F F1(name)
+3.08 E F0(whose)144 160.8 Q F1(value)2.895 E F0 .395(is gi)2.895 F -.15
+(ve)-.25 G 2.895(n. A).15 F .395(trailing space in)2.895 F F1(value)
+5.395 E F0 .395(causes the ne)2.895 F .395(xt w)-.15 F .395
+(ord to be check)-.1 F .395(ed for alias sub-)-.1 F .054
+(stitution when the alias is e)144 172.8 R 2.554(xpanded. F)-.15 F .054
+(or each)-.15 F F1(name)2.554 E F0 .054(in the ar)2.554 F .054
+(gument list for which no)-.18 F F1(value)2.554 E F0 .054(is sup-)2.554
+F 1.314(plied, the name and v)144 184.8 R 1.314
+(alue of the alias is printed.)-.25 F F2(Alias)6.314 E F0 1.314
+(returns true unless a)3.814 F F1(name)3.814 E F0 1.313(is gi)3.814 F
+-.15(ve)-.25 G 3.813(nf).15 G(or)-3.813 E
+(which no alias has been de\214ned.)144 196.8 Q F2(bg)108 213.6 Q F0([)
+2.5 E F1(jobspec)A F0(...])2.5 E .744(Resume each suspended job)144
+225.6 R F1(jobspec)3.244 E F0 .745
+(in the background, as if it had been started with)3.244 F F2(&)3.245 E
+F0 5.745(.I)C(f)-5.745 E F1(job-)4.985 E(spec)144 237.6 Q F0 .672
+(is not present, the shell')3.482 F 3.172(sn)-.55 G .672(otion of the)
+-3.172 F F1(curr)3.172 E .672(ent job)-.37 F F0 .672(is used.)3.172 F F2
+(bg)5.671 E F1(jobspec)4.911 E F0 .671(returns 0 unless run)3.481 F .418
+(when job control is disabled or)144 249.6 R 2.919(,w)-.4 G .419
+(hen run with job control enabled, an)-2.919 F 2.919(ys)-.15 G
+(peci\214ed)-2.919 E F1(jobspec)2.919 E F0 -.1(wa)2.919 G 2.919(sn).1 G
+(ot)-2.919 E(found or w)144 261.6 Q(as started without job control.)-.1
+E F2(bind)108 278.4 Q F0([)2.5 E F2<ad6d>A F1 -.1(ke)2.5 G(ymap)-.2 E F0
+2.5(][)C F2(\255lpsvPSV)-2.5 E F0(])A F2(bind)108 290.4 Q F0([)2.5 E F2
+<ad6d>A F1 -.1(ke)2.5 G(ymap)-.2 E F0 2.5(][)C F2<ad71>-2.5 E F1
+(function)2.5 E F0 2.5(][)C F2<ad75>-2.5 E F1(function)2.5 E F0 2.5(][)C
+F2<ad72>-2.5 E F1 -.1(ke)2.5 G(yseq)-.2 E F0(])A F2(bind)108 302.4 Q F0
+([)2.5 E F2<ad6d>A F1 -.1(ke)2.5 G(ymap)-.2 E F0(])A F2<ad66>2.5 E F1
+(\214lename)2.5 E F2(bind)108 314.4 Q F0([)2.5 E F2<ad6d>A F1 -.1(ke)2.5
+G(ymap)-.2 E F0(])A F2<ad78>2.5 E F1 -.1(ke)2.5 G(yseq)-.2 E F0(:)A F1
+(shell\255command)A F2(bind)108 326.4 Q F0([)2.5 E F2<ad6d>A F1 -.1(ke)
+2.5 G(ymap)-.2 E F0(])A F1 -.1(ke)2.5 G(yseq)-.2 E F0(:)A F1
+(function\255name)A F2(bind)108 338.4 Q F1 -.37(re)2.5 G
+(adline\255command).37 E F0 .239(Display current)144 350.4 R F2 -.18(re)
+2.739 G(adline).18 E F0 -.1(ke)2.739 G 2.739(ya)-.05 G .239
+(nd function bindings, bind a k)-2.739 F .539 -.15(ey s)-.1 H .238
+(equence to a).15 F F2 -.18(re)2.738 G(adline).18 E F0 .238(function or)
+2.738 F .475(macro, or set a)144 362.4 R F2 -.18(re)2.975 G(adline).18 E
+F0 -.25(va)2.975 G 2.975(riable. Each).25 F .476(non-option ar)2.976 F
+.476(gument is a command as it w)-.18 F .476(ould appear in)-.1 F F1
+(.inputr)144 374.4 Q(c)-.37 E F0 2.984(,b).31 G .484
+(ut each binding or command must be passed as a separate ar)-3.184 F
+.483(gument; e.g., '"\\C\255x\\C\255r":)-.18 F 2.5
+(re\255read\255init\255\214le'. Options,)144 386.4 R(if supplied, ha)2.5
+E .3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F2<ad6d>144
+398.4 Q F1 -.1(ke)2.5 G(ymap)-.2 E F0(Use)180 410.4 Q F1 -.1(ke)5.158 G
+(ymap)-.2 E F0 2.658(as the k)5.348 F -.15(ey)-.1 G 2.658(map to be af)
+.15 F 2.659(fected by the subsequent bindings.)-.25 F(Acceptable)7.659 E
+F1 -.1(ke)180 422.4 S(ymap)-.2 E F0 3.193(names are)5.883 F F1 3.193
+(emacs, emacs\255standar)5.693 F 3.192
+(d, emacs\255meta, emacs\255ctlx, vi, vi\255mo)-.37 F(ve)-.1 E(,)-.1 E
+(vi\255command)180 434.4 Q F0 4.429(,a)C(nd)-4.429 E F1(vi\255insert)
+4.429 E F0(.).68 E F1(vi)6.929 E F0 1.929(is equi)4.429 F -.25(va)-.25 G
+1.929(lent to).25 F F1(vi\255command)4.429 E F0(;)A F1(emacs)4.429 E F0
+1.929(is equi)4.429 F -.25(va)-.25 G 1.93(lent to).25 F F1
+(emacs\255standar)180 446.4 Q(d)-.37 E F0(.)A F2<ad6c>144 458.4 Q F0
+(List the names of all)27.52 E F2 -.18(re)2.5 G(adline).18 E F0
+(functions.)2.5 E F2<ad70>144 470.4 Q F0(Display)24.74 E F2 -.18(re)2.5
+G(adline).18 E F0(function names and bindings in such a w)2.5 E
+(ay that the)-.1 E 2.5(yc)-.15 G(an be re-read.)-2.5 E F2<ad50>144 482.4
+Q F0(List current)24.19 E F2 -.18(re)2.5 G(adline).18 E F0
+(function names and bindings.)2.5 E F2<ad73>144 494.4 Q F0(Display)26.41
+E F2 -.18(re)3.655 G(adline).18 E F0 -.1(ke)3.655 G 3.655(ys)-.05 G
+1.155(equences bound to macros and the strings the)-3.655 F 3.655(yo)
+-.15 G 1.155(utput in such a)-3.655 F -.1(wa)180 506.4 S 2.5(yt).1 G
+(hat the)-2.5 E 2.5(yc)-.15 G(an be re-read.)-2.5 E F2<ad53>144 518.4 Q
+F0(Display)24.74 E F2 -.18(re)2.5 G(adline).18 E F0 -.1(ke)2.5 G 2.5(ys)
+-.05 G(equences bound to macros and the strings the)-2.5 E 2.5(yo)-.15 G
+(utput.)-2.5 E F2<ad76>144 530.4 Q F0(Display)25.3 E F2 -.18(re)2.5 G
+(adline).18 E F0 -.25(va)2.5 G(riable names and v).25 E
+(alues in such a w)-.25 E(ay that the)-.1 E 2.5(yc)-.15 G
+(an be re-read.)-2.5 E F2<ad56>144 542.4 Q F0(List current)23.08 E F2
+-.18(re)2.5 G(adline).18 E F0 -.25(va)2.5 G(riable names and v).25 E
+(alues.)-.25 E F2<ad66>144 554.4 Q F1(\214lename)2.5 E F0(Read k)180
+566.4 Q .3 -.15(ey b)-.1 H(indings from).15 E F1(\214lename)2.5 E F0(.)A
+F2<ad71>144 578.4 Q F1(function)2.5 E F0(Query about which k)180 590.4 Q
+-.15(ey)-.1 G 2.5(si).15 G -1.9 -.4(nv o)-2.5 H .2 -.1(ke t).4 H
+(he named).1 E F1(function)2.5 E F0(.)A F2<ad75>144 602.4 Q F1(function)
+2.5 E F0(Unbind all k)180 614.4 Q -.15(ey)-.1 G 2.5(sb).15 G
+(ound to the named)-2.5 E F1(function)2.5 E F0(.)A F2<ad72>144 626.4 Q
+F1 -.1(ke)2.5 G(yseq)-.2 E F0(Remo)180 638.4 Q .3 -.15(ve a)-.15 H .3
+-.15(ny c).15 H(urrent binding for).15 E F1 -.1(ke)2.5 G(yseq)-.2 E F0
+(.)A F2<ad78>144 650.4 Q F1 -.1(ke)2.5 G(yseq)-.2 E F2(:)A F1
+(shell\255command)A F0(Cause)180 662.4 Q F1(shell\255command)4.325 E F0
+1.825(to be e)4.325 F -.15(xe)-.15 G 1.825(cuted whene).15 F -.15(ve)
+-.25 G(r).15 E F1 -.1(ke)4.325 G(yseq)-.2 E F0 1.825(is entered.)4.325 F
+(When)6.825 E F1(shell\255com-)4.325 E(mand)180 674.4 Q F0 1.765(is e)
+4.265 F -.15(xe)-.15 G 1.765(cuted, the shell sets the).15 F/F3 9
+/Times-Bold@0 SF(READLINE_LINE)4.265 E F0 -.25(va)4.015 G 1.765
+(riable to the contents of the).25 F F2 -.18(re)180 686.4 S(adline).18 E
+F0 1.353(line b)3.852 F(uf)-.2 E 1.353(fer and the)-.25 F F3
+(READLINE_POINT)3.853 E F0 -.25(va)3.603 G 1.353
+(riable to the current location of the).25 F 2.012(insertion point.)180
+698.4 R 2.011(If the e)7.012 F -.15(xe)-.15 G 2.011
+(cuted command changes the v).15 F 2.011(alue of)-.25 F F3
+(READLINE_LINE)4.511 E F0(or)4.261 E F3(READLINE_POINT)180 710.4 Q/F4 9
+/Times-Roman@0 SF(,)A F0(those ne)2.25 E 2.5(wv)-.25 G
+(alues will be re\215ected in the editing state.)-2.75 E(The return v)
+144 727.2 Q(alue is 0 unless an unrecognized option is gi)-.25 E -.15
+(ve)-.25 G 2.5(no).15 G 2.5(ra)-2.5 G 2.5(ne)-2.5 G(rror occurred.)-2.5
+E(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(49)185.955 E 0 Cg EP
+%%Page: 50 50
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(br)108 84 Q(eak)-.18 E F0([)2.5 E/F2 10
+/Times-Italic@0 SF(n)A F0(])A .054(Exit from within a)144 96 R F1 -.25
+(fo)2.554 G(r).25 E F0(,)A F1(while)2.554 E F0(,)A F1(until)2.555 E F0
+2.555(,o)C(r)-2.555 E F1(select)2.555 E F0 2.555(loop. If)2.555 F F2(n)
+2.555 E F0 .055(is speci\214ed, break)2.555 F F2(n)2.555 E F0(le)2.555 E
+-.15(ve)-.25 G(ls.).15 E F2(n)5.415 E F0 .055(must be)2.795 F/F3 10
+/Symbol SF<b3>2.555 E F0(1.)2.555 E(If)144 108 Q F2(n)3.075 E F0 .215(i\
+s greater than the number of enclosing loops, all enclosing loops are e)
+2.955 F 2.714(xited. The)-.15 F .214(return v)2.714 F(alue)-.25 E
+(is 0 unless)144 120 Q F2(n)2.5 E F0(is not greater than or equal to 1.)
+2.5 E F1 -.2(bu)108 136.8 S(iltin).2 E F2(shell\255b)2.5 E(uiltin)-.2 E
+F0([)2.5 E F2(ar)A(guments)-.37 E F0(])A(Ex)144 148.8 Q .792
+(ecute the speci\214ed shell b)-.15 F .792(uiltin, passing it)-.2 F F2
+(ar)3.293 E(guments)-.37 E F0 3.293(,a).27 G .793(nd return its e)-3.293
+F .793(xit status.)-.15 F .793(This is useful)5.793 F .616
+(when de\214ning a function whose name is the same as a shell b)144
+160.8 R .615(uiltin, retaining the functionality of)-.2 F .57(the b)144
+172.8 R .57(uiltin within the function.)-.2 F(The)5.57 E F1(cd)3.07 E F0
+-.2(bu)3.07 G .57(iltin is commonly rede\214ned this w).2 F(ay)-.1 E
+5.57(.T)-.65 G .57(he return status)-5.57 F(is f)144 184.8 Q(alse if)-.1
+E F2(shell\255b)2.84 E(uiltin)-.2 E F0(is not a shell b)2.74 E
+(uiltin command.)-.2 E F1(caller)108 201.6 Q F0([)2.5 E F2 -.2(ex)C(pr)
+.2 E F0(])A .254(Returns the conte)144 213.6 R .254(xt of an)-.15 F
+2.754(ya)-.15 G(cti)-2.754 E .554 -.15(ve s)-.25 H .254
+(ubroutine call \(a shell function or a script e).15 F -.15(xe)-.15 G
+.254(cuted with the).15 F F1(.)2.753 E F0(or)2.753 E F1(sour)144 225.6 Q
+(ce)-.18 E F0 -.2(bu)3.062 G 3.062(iltins. W).2 F(ithout)-.4 E F2 -.2
+(ex)3.062 G(pr).2 E F0(,)A F1(caller)3.062 E F0 .562
+(displays the line number and source \214lename of the current)3.062 F
+.254(subroutine call.)144 237.6 R .254(If a non-ne)5.254 F -.05(ga)-.15
+G(ti).05 E .554 -.15(ve i)-.25 H(nte).15 E .253(ger is supplied as)-.15
+F F2 -.2(ex)2.753 G(pr).2 E F0(,)A F1(caller)2.753 E F0 .253
+(displays the line number)2.753 F 2.753(,s)-.4 G(ub-)-2.753 E 1.327(rou\
+tine name, and source \214le corresponding to that position in the curr\
+ent e)144 249.6 R -.15(xe)-.15 G 1.328(cution call stack.).15 F .001
+(This e)144 261.6 R .001(xtra information may be used, for e)-.15 F .001
+(xample, to print a stack trace.)-.15 F(The current frame is frame)5 E
+3.019(0. The)144 273.6 R .519(return v)3.019 F .519
+(alue is 0 unless the shell is not e)-.25 F -.15(xe)-.15 G .52
+(cuting a subroutine call or).15 F F2 -.2(ex)3.02 G(pr).2 E F0 .52
+(does not corre-)3.02 F(spond to a v)144 285.6 Q
+(alid position in the call stack.)-.25 E F1(cd)108 302.4 Q F0([)2.5 E F1
+(\255L|-P)A F0 2.5(][)C F2(dir)-2.5 E F0(])A .21
+(Change the current directory to)144 314.4 R F2(dir)2.71 E F0 5.21(.T)C
+.21(he v)-5.21 F(ariable)-.25 E/F4 9/Times-Bold@0 SF(HOME)2.71 E F0 .21
+(is the def)2.46 F(ault)-.1 E F2(dir)2.71 E F0 5.21(.T).73 G .21(he v)
+-5.21 F(ariable)-.25 E F4(CDP)2.71 E -.855(AT)-.666 G(H).855 E F0 .776
+(de\214nes the search path for the directory containing)144 326.4 R F2
+(dir)3.276 E F0 5.777(.A).73 G(lternati)-5.777 E 1.077 -.15(ve d)-.25 H
+.777(irectory names in).15 F F4(CDP)3.277 E -.855(AT)-.666 G(H).855 E F0
+.764(are separated by a colon \(:\).)144 338.4 R 3.264(An)5.764 G .764
+(ull directory name in)-3.264 F F4(CDP)3.264 E -.855(AT)-.666 G(H).855 E
+F0 .764(is the same as the current direc-)3.014 F(tory)144 350.4 Q 2.973
+(,i)-.65 G .473(.e., `)-2.973 F(`)-.74 E F1(.)A F0 -.74('')C 5.473(.I)
+.74 G(f)-5.473 E F2(dir)3.323 E F0(be)3.703 E .474
+(gins with a slash \(/\), then)-.15 F F4(CDP)2.974 E -.855(AT)-.666 G(H)
+.855 E F0 .474(is not used. The)2.724 F F1<ad50>2.974 E F0 .474
+(option says to use)2.974 F .58(the ph)144 362.4 R .58
+(ysical directory structure instead of follo)-.05 F .579
+(wing symbolic links \(see also the)-.25 F F1<ad50>3.079 E F0 .579
+(option to the)3.079 F F1(set)144 374.4 Q F0 -.2(bu)3.383 G .883
+(iltin command\); the).2 F F1<ad4c>3.383 E F0 .884
+(option forces symbolic links to be follo)3.384 F 3.384(wed. An)-.25 F
+(ar)3.384 E .884(gument of)-.18 F F1<ad>3.384 E F0(is)3.384 E(equi)144
+386.4 Q -.25(va)-.25 G .316(lent to).25 F F4($OLDPWD)2.816 E/F5 9
+/Times-Roman@0 SF(.)A F0 .316(If a non-empty directory name from)4.816 F
+F4(CDP)2.815 E -.855(AT)-.666 G(H).855 E F0 .315(is used, or if)2.565 F
+F1<ad>2.815 E F0 .315(is the \214rst)2.815 F(ar)144 398.4 Q .116(gument\
+, and the directory change is successful, the absolute pathname of the \
+ne)-.18 F 2.616(ww)-.25 G .116(orking direc-)-2.716 F 1.165
+(tory is written to the standard output.)144 410.4 R 1.164(The return v)
+6.164 F 1.164(alue is true if the directory w)-.25 F 1.164
+(as successfully)-.1 F(changed; f)144 422.4 Q(alse otherwise.)-.1 E F1
+(command)108 439.2 Q F0([)2.5 E F1(\255pVv)A F0(])A F2(command)2.5 E F0
+([)2.5 E F2(ar)A(g)-.37 E F0(...])2.5 E(Run)144 451.2 Q F2(command)2.956
+E F0(with)3.527 E F2(ar)3.087 E(gs)-.37 E F0 .257
+(suppressing the normal shell function lookup. Only b)3.027 F .257
+(uiltin commands or)-.2 F .502(commands found in the)144 463.2 R F4
+-.666(PA)3.002 G(TH)-.189 E F0 .502(are e)2.752 F -.15(xe)-.15 G 3.002
+(cuted. If).15 F(the)3.002 E F1<ad70>3.002 E F0 .502(option is gi)3.002
+F -.15(ve)-.25 G .501(n, the search for).15 F F2(command)3.201 E F0(is)
+3.771 E .399(performed using a def)144 475.2 R .399(ault v)-.1 F .399
+(alue for)-.25 F F4 -.666(PA)2.899 G(TH)-.189 E F0 .4
+(that is guaranteed to \214nd all of the standard utilities.)2.649 F(If)
+5.4 E .175(either the)144 487.2 R F1<ad56>2.675 E F0(or)2.675 E F1<ad76>
+2.675 E F0 .175(option is supplied, a description of)2.675 F F2(command)
+2.875 E F0 .174(is printed.)3.445 F(The)5.174 E F1<ad76>2.674 E F0 .174
+(option causes)2.674 F 3.11(as)144 499.2 S .61(ingle w)-3.11 F .61
+(ord indicating the command or \214le name used to in)-.1 F -.2(vo)-.4 G
+-.1(ke).2 G F2(command)3.41 E F0 .61(to be displayed; the)3.88 F F1
+<ad56>144 511.2 Q F0 .25(option produces a more v)2.75 F .25
+(erbose description.)-.15 F .249(If the)5.25 F F1<ad56>2.749 E F0(or)
+2.749 E F1<ad76>2.749 E F0 .249(option is supplied, the e)2.749 F .249
+(xit status)-.15 F 1.004(is 0 if)144 523.2 R F2(command)3.704 E F0 -.1
+(wa)4.274 G 3.504(sf).1 G 1.005(ound, and 1 if not.)-3.504 F 1.005
+(If neither option is supplied and an error occurred or)6.005 F F2
+(command)144.2 535.2 Q F0 1.599(cannot be found, the e)4.869 F 1.599
+(xit status is 127.)-.15 F 1.599(Otherwise, the e)6.599 F 1.598
+(xit status of the)-.15 F F1(command)4.098 E F0 -.2(bu)144 547.2 S
+(iltin is the e).2 E(xit status of)-.15 E F2(command)2.5 E F0(.).77 E F1
+(compgen)108 564 Q F0([)2.5 E F2(option)A F0 2.5(][)C F2(wor)-2.5 E(d)
+-.37 E F0(])A .012(Generate possible completion matches for)144 576 R F2
+(wor)2.513 E(d)-.37 E F0 .013(according to the)2.513 F F2(option)2.513 E
+F0 .013(s, which may be an)B 2.513(yo)-.15 G(ption)-2.513 E .982
+(accepted by the)144 588 R F1(complete)3.482 E F0 -.2(bu)3.481 G .981
+(iltin with the e).2 F .981(xception of)-.15 F F1<ad70>3.481 E F0(and)
+3.481 E F1<ad72>3.481 E F0 3.481(,a)C .981(nd write the matches to the)
+-3.481 F 1.415(standard output.)144 600 R 1.415(When using the)6.415 F
+F1<ad46>3.915 E F0(or)3.915 E F1<ad43>3.915 E F0 1.415(options, the v)
+3.915 F 1.415(arious shell v)-.25 F 1.415(ariables set by the pro-)-.25
+F(grammable completion f)144 612 Q(acilities, while a)-.1 E -.25(va)-.2
+G(ilable, will not ha).25 E .3 -.15(ve u)-.2 H(seful v).15 E(alues.)-.25
+E .352(The matches will be generated in the same w)144 636 R .352
+(ay as if the programmable completion code had gen-)-.1 F .02(erated th\
+em directly from a completion speci\214cation with the same \215ags.)144
+648 R(If)5.02 E F2(wor)2.52 E(d)-.37 E F0 .02(is speci\214ed, only)2.52
+F(those completions matching)144 660 Q F2(wor)2.5 E(d)-.37 E F0
+(will be displayed.)2.5 E(The return v)144 684 Q
+(alue is true unless an in)-.25 E -.25(va)-.4 G
+(lid option is supplied, or no matches were generated.).25 E F1
+(complete)108 700.8 Q F0([)3.729 E F1(\255abcdefgjksuv)A F0 3.729(][)C
+F1<ad6f>-3.729 E F2(comp-option)3.729 E F0 3.729(][)C F1(\255DE)-3.729 E
+F0 3.728(][)C F1<ad41>-3.728 E F2(action)3.728 E F0 3.728(][)C F1<ad47>
+-3.728 E F2(globpat)3.728 E F0 3.728(][)C F1<ad57>-3.728 E F2(wor)3.728
+E(dlist)-.37 E F0 3.728(][)C F1<ad46>-3.728 E F2(func-)3.728 E(tion)108
+712.8 Q F0 2.5(][)C F1<ad43>-2.5 E F2(command)2.5 E F0(])A([)144 724.8 Q
+F1<ad58>A F2(\214lterpat)2.5 E F0 2.5(][)C F1<ad50>-2.5 E F2(pr)2.5 E
+(e\214x)-.37 E F0 2.5(][)C F1<ad53>-2.5 E F2(suf)2.5 E<8c78>-.18 E F0(])
+A F2(name)2.5 E F0([)2.5 E F2(name ...)A F0(])A(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(50)185.955 E 0 Cg EP
+%%Page: 51 51
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(complete \255pr)108 84 Q F0([)2.5 E F1
+(\255DE)A F0 2.5(][)C/F2 10/Times-Italic@0 SF(name)-2.5 E F0(...])2.5 E
+.634(Specify ho)144 96 R 3.134(wa)-.25 G -.18(rg)-3.134 G .634
+(uments to each).18 F F2(name)3.134 E F0 .634(should be completed.)3.134
+F .633(If the)5.634 F F1<ad70>3.133 E F0 .633
+(option is supplied, or if no)3.133 F .139(options are supplied, e)144
+108 R .139(xisting completion speci\214cations are printed in a w)-.15 F
+.14(ay that allo)-.1 F .14(ws them to be)-.25 F .31(reused as input.)144
+120 R(The)5.31 E F1<ad72>2.81 E F0 .31(option remo)2.81 F -.15(ve)-.15 G
+2.81(sac).15 G .31(ompletion speci\214cation for each)-2.81 F F2(name)
+2.81 E F0 2.81(,o)C 1.11 -.4(r, i)-2.81 H 2.81(fn).4 G(o)-2.81 E F2
+(name)2.81 E F0(s)A 1.346
+(are supplied, all completion speci\214cations.)144 132 R(The)6.347 E F1
+<ad44>3.847 E F0 1.347(option indicates that the remaining options)3.847
+F .5(and actions should apply to the `)144 144 R(`def)-.74 E(ault')-.1 E
+3('c)-.74 G .5(ommand completion; that is, completion attempted on)-3 F
+3.455(ac)144 156 S .955(ommand for which no completion has pre)-3.455 F
+.955(viously been de\214ned.)-.25 F(The)5.955 E F1<ad45>3.455 E F0 .955
+(option indicates that)3.455 F .065
+(the remaining options and actions should apply to `)144 168 R(`empty')
+-.74 E 2.564('c)-.74 G .064(ommand completion; that is, comple-)-2.564 F
+(tion attempted on a blank line.)144 180 Q 1.437
+(The process of applying these completion speci\214cations when w)144
+204 R 1.438(ord completion is attempted is)-.1 F(described abo)144 216 Q
+.3 -.15(ve u)-.15 H(nder).15 E F1(Pr)2.5 E(ogrammable Completion)-.18 E
+F0(.)A .556(Other options, if speci\214ed, ha)144 240 R .856 -.15(ve t)
+-.2 H .555(he follo).15 F .555(wing meanings.)-.25 F .555(The ar)5.555 F
+.555(guments to the)-.18 F F1<ad47>3.055 E F0(,)A F1<ad57>3.055 E F0
+3.055(,a)C(nd)-3.055 E F1<ad58>3.055 E F0 .722
+(options \(and, if necessary)144 252 R 3.222(,t)-.65 G(he)-3.222 E F1
+<ad50>3.222 E F0(and)3.222 E F1<ad53>3.222 E F0 .723
+(options\) should be quoted to protect them from e)3.222 F(xpan-)-.15 E
+(sion before the)144 264 Q F1(complete)2.5 E F0 -.2(bu)2.5 G
+(iltin is in).2 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E F1<ad6f>144 276 Q F2
+(comp-option)2.5 E F0(The)184 288 Q F2(comp-option)2.791 E F0 .291
+(controls se)2.791 F -.15(ve)-.25 G .291(ral aspects of the compspec')
+.15 F 2.791(sb)-.55 G(eha)-2.791 E .291(vior be)-.2 F .291
+(yond the simple)-.15 F(generation of completions.)184 300 Q F2
+(comp-option)5 E F0(may be one of:)2.5 E F1(bashdefault)184 312 Q F0
+.281(Perform the rest of the def)224 324 R(ault)-.1 E F1(bash)2.781 E F0
+.281(completions if the compspec generates no)2.781 F(matches.)224 336 Q
+F1(default)184 348 Q F0 2.876(Use readline')10 F 5.376(sd)-.55 G(ef)
+-5.376 E 2.875(ault \214lename completion if the compspec generates no)
+-.1 F(matches.)224 360 Q F1(dir)184 372 Q(names)-.15 E F0(Perform direc\
+tory name completion if the compspec generates no matches.)224 384 Q F1
+(\214lenames)184 396 Q F0 -.7(Te)224 408 S .137(ll readline that the co\
+mpspec generates \214lenames, so it can perform an).7 F 2.637<798c>-.15
+G(le-)-2.637 E .134(name\255speci\214c processing \(lik)224 420 R 2.634
+(ea)-.1 G .134(dding a slash to directory names, quoting spe-)-2.634 F
+.45(cial characters, or suppressing trailing spaces\).)224 432 R .45
+(Intended to be used with shell)5.45 F(functions.)224 444 Q F1(nospace)
+184 456 Q F0 -.7(Te)6.11 G .22
+(ll readline not to append a space \(the def).7 F .22(ault\) to w)-.1 F
+.22(ords completed at the end)-.1 F(of the line.)224 468 Q F1(plusdirs)
+184 480 Q F0 1.985(After an)5.54 F 4.485(ym)-.15 G 1.985
+(atches de\214ned by the compspec are generated, directory name)-4.485 F
+.584(completion is attempted and an)224 492 R 3.084(ym)-.15 G .584
+(atches are added to the results of the other)-3.084 F(actions.)224 504
+Q F1<ad41>144 516 Q F2(action)2.5 E F0(The)184 528 Q F2(action)2.5 E F0
+(may be one of the follo)2.5 E
+(wing to generate a list of possible completions:)-.25 E F1(alias)184
+540 Q F0(Alias names.)20.55 E(May also be speci\214ed as)5 E F1<ad61>2.5
+E F0(.)A F1(arrayv)184 552 Q(ar)-.1 E F0(Array v)224 564 Q
+(ariable names.)-.25 E F1 4.7(binding Readline)184 576 R F0 -.1(ke)2.5 G
+2.5(yb)-.05 G(inding names.)-2.5 E F1 -.2(bu)184 588 S(iltin).2 E F0
+(Names of shell b)11.85 E(uiltin commands.)-.2 E
+(May also be speci\214ed as)5 E F1<ad62>2.5 E F0(.)A F1(command)184 600
+Q F0(Command names.)224 612 Q(May also be speci\214ed as)5 E F1<ad63>2.5
+E F0(.)A F1(dir)184 624 Q(ectory)-.18 E F0(Directory names.)224 636 Q
+(May also be speci\214ed as)5 E F1<ad64>2.5 E F0(.)A F1(disabled)184 648
+Q F0(Names of disabled shell b)224 660 Q(uiltins.)-.2 E F1(enabled)184
+672 Q F0(Names of enabled shell b)6.66 E(uiltins.)-.2 E F1(export)184
+684 Q F0(Names of e)12.23 E(xported shell v)-.15 E 2.5(ariables. May)
+-.25 F(also be speci\214ed as)2.5 E F1<ad65>2.5 E F0(.)A F1(\214le)184
+696 Q F0(File names.)27.22 E(May also be speci\214ed as)5 E F1<ad66>2.5
+E F0(.)A(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(51)185.955 E 0
+Cg EP
+%%Page: 52 52
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(function)184 84 Q F0
+(Names of shell functions.)224 96 Q F1(gr)184 108 Q(oup)-.18 E F0
+(Group names.)14.62 E(May also be speci\214ed as)5 E F1<ad67>2.5 E F0(.)
+A F1(helptopic)184 120 Q F0(Help topics as accepted by the)224 132 Q F1
+(help)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F1(hostname)184 144 Q F0
+(Hostnames, as tak)224 156 Q(en from the \214le speci\214ed by the)-.1 E
+/F2 9/Times-Bold@0 SF(HOSTFILE)2.5 E F0(shell v)2.25 E(ariable.)-.25 E
+F1(job)184 168 Q F0(Job names, if job control is acti)26.11 E -.15(ve)
+-.25 G 5(.M).15 G(ay also be speci\214ed as)-5 E F1<ad6a>2.5 E F0(.)A F1
+-.1(ke)184 180 S(yw).1 E(ord)-.1 E F0(Shell reserv)224 192 Q(ed w)-.15 E
+2.5(ords. May)-.1 F(also be speci\214ed as)2.5 E F1<ad6b>2.5 E F0(.)A F1
+(running)184 204 Q F0(Names of running jobs, if job control is acti)5.54
+E -.15(ve)-.25 G(.).15 E F1(ser)184 216 Q(vice)-.1 E F0(Service names.)
+10.67 E(May also be speci\214ed as)5 E F1<ad73>2.5 E F0(.)A F1(setopt)
+184 228 Q F0 -1.11(Va)14.45 G(lid ar)1.11 E(guments for the)-.18 E F1
+<ad6f>2.5 E F0(option to the)2.5 E F1(set)2.5 E F0 -.2(bu)2.5 G(iltin.)
+.2 E F1(shopt)184 240 Q F0(Shell option names as accepted by the)16.66 E
+F1(shopt)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F1(signal)184 252 Q F0
+(Signal names.)14.99 E F1(stopped)184 264 Q F0
+(Names of stopped jobs, if job control is acti)6.66 E -.15(ve)-.25 G(.)
+.15 E F1(user)184 276 Q F0(User names.)21.67 E
+(May also be speci\214ed as)5 E F1<ad75>2.5 E F0(.)A F1 -.1(va)184 288 S
+(riable).1 E F0(Names of all shell v)5.1 E 2.5(ariables. May)-.25 F
+(also be speci\214ed as)2.5 E F1<ad76>2.5 E F0(.)A F1<ad47>144 300 Q/F3
+10/Times-Italic@0 SF(globpat)2.5 E F0 1.007(The pathname e)184 312 R
+1.007(xpansion pattern)-.15 F F3(globpat)3.507 E F0 1.007(is e)3.507 F
+1.008(xpanded to generate the possible comple-)-.15 F(tions.)184 324 Q
+F1<ad57>144 336 Q F3(wor)2.5 E(dlist)-.37 E F0(The)184 348 Q F3(wor)3.64
+E(dlist)-.37 E F0 1.14(is split using the characters in the)3.64 F F2
+(IFS)3.64 E F0 1.139(special v)3.39 F 1.139(ariable as delimiters, and)
+-.25 F 2.007(each resultant w)184 360 R 2.007(ord is e)-.1 F 4.507
+(xpanded. The)-.15 F 2.008(possible completions are the members of the)
+4.507 F(resultant list which match the w)184 372 Q(ord being completed.)
+-.1 E F1<ad43>144 384 Q F3(command)2.5 E(command)184 396 Q F0 1.056
+(is e)3.556 F -.15(xe)-.15 G 1.056(cuted in a subshell en).15 F 1.056
+(vironment, and its output is used as the possible)-.4 F(completions.)
+184 408 Q F1<ad46>144 420 Q F3(function)2.5 E F0 1.18
+(The shell function)184 432 R F3(function)3.68 E F0 1.181(is e)3.681 F
+-.15(xe)-.15 G 1.181(cuted in the current shell en).15 F 3.681
+(vironment. When)-.4 F 1.181(it \214n-)3.681 F .932
+(ishes, the possible completions are retrie)184 444 R -.15(ve)-.25 G
+3.432(df).15 G .932(rom the v)-3.432 F .932(alue of the)-.25 F F2
+(COMPREPL)3.431 E(Y)-.828 E F0(array)3.181 E -.25(va)184 456 S(riable.)
+.25 E F1<ad58>144 468 Q F3(\214lterpat)2.5 E(\214lterpat)184 480 Q F0
+.455(is a pattern as used for pathname e)2.955 F 2.956(xpansion. It)-.15
+F .456(is applied to the list of possible)2.956 F 1.596
+(completions generated by the preceding options and ar)184 492 R 1.596
+(guments, and each completion)-.18 F(matching)184 504 Q F3(\214lterpat)
+3.204 E F0 .704(is remo)3.204 F -.15(ve)-.15 G 3.204(df).15 G .704
+(rom the list.)-3.204 F 3.204(Al)5.704 G(eading)-3.204 E F1(!)3.204 E F0
+(in)3.204 E F3(\214lterpat)3.205 E F0(ne)3.205 E -.05(ga)-.15 G .705
+(tes the pattern;).05 F(in this case, an)184 516 Q 2.5(yc)-.15 G
+(ompletion not matching)-2.5 E F3(\214lterpat)2.5 E F0(is remo)2.5 E
+-.15(ve)-.15 G(d.).15 E F1<ad50>144 528 Q F3(pr)2.5 E(e\214x)-.37 E(pr)
+184 540 Q(e\214x)-.37 E F0 .535(is added at the be)3.035 F .534
+(ginning of each possible completion after all other options ha)-.15 F
+-.15(ve)-.2 G(been applied.)184 552 Q F1<ad53>144 564 Q F3(suf)2.5 E
+2.81(\214x suf)-.18 F<8c78>-.18 E F0
+(is appended to each possible completion after all other options ha)2.5
+E .3 -.15(ve b)-.2 H(een applied.).15 E .466(The return v)144 580.8 R
+.466(alue is true unless an in)-.25 F -.25(va)-.4 G .466
+(lid option is supplied, an option other than).25 F F1<ad70>2.967 E F0
+(or)2.967 E F1<ad72>2.967 E F0 .467(is sup-)2.967 F 1.362
+(plied without a)144 592.8 R F3(name)3.862 E F0(ar)3.862 E 1.361
+(gument, an attempt is made to remo)-.18 F 1.661 -.15(ve a c)-.15 H
+1.361(ompletion speci\214cation for a).15 F F3(name)144 604.8 Q F0
+(for which no speci\214cation e)2.5 E
+(xists, or an error occurs adding a completion speci\214cation.)-.15 E
+F1(compopt)108 621.6 Q F0([)2.5 E F1<ad6f>A F3(option)2.5 E F0 2.5(][)C
+F1(\255DE)-2.5 E F0 2.5(][)C F1(+o)-2.5 E F3(option)2.5 E F0 2.5(][)C F3
+(name)-2.5 E F0(])A .447(Modify completion options for each)144 633.6 R
+F3(name)2.947 E F0 .447(according to the)2.947 F F3(option)2.947 E F0
+.447(s, or for the currently-e)B -.15(xe)-.15 G(cution).15 E .726
+(completion if no)144 645.6 R F3(name)3.226 E F0 3.226(sa)C .726
+(re supplied.)-3.226 F .725(If no)5.725 F F3(option)3.225 E F0 3.225(sa)
+C .725(re gi)-3.225 F -.15(ve)-.25 G .725
+(n, display the completion options for).15 F(each)144 657.6 Q F3(name)
+3.223 E F0 .723(or the current completion.)3.223 F .724(The possible v)
+5.724 F .724(alues of)-.25 F F3(option)3.224 E F0 .724(are those v)3.224
+F .724(alid for the)-.25 F F1(com-)3.224 E(plete)144 669.6 Q F0 -.2(bu)
+2.798 G .298(iltin described abo).2 F -.15(ve)-.15 G 5.297(.T).15 G(he)
+-5.297 E F1<ad44>2.797 E F0 .297
+(option indicates that the remaining options should apply to)2.797 F
+1.227(the `)144 681.6 R(`def)-.74 E(ault')-.1 E 3.727('c)-.74 G 1.228(o\
+mmand completion; that is, completion attempted on a command for which \
+no)-3.727 F 2.178(completion has pre)144 693.6 R 2.178
+(viously been de\214ned.)-.25 F(The)7.178 E F1<ad45>4.678 E F0 2.177
+(option indicates that the remaining options)4.677 F(should apply to `)
+144 705.6 Q(`empty')-.74 E 2.5('c)-.74 G
+(ommand completion; that is, completion attempted on a blank line.)-2.5
+E .327(The return v)108 722.4 R .327(alue is true unless an in)-.25 F
+-.25(va)-.4 G .327
+(lid option is supplied, an attempt is made to modify the options for a)
+.25 F(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(52)185.955 E 0 Cg
+EP
+%%Page: 53 53
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Italic@0 SF(name)108 84 Q F0
+(for which no completion speci\214cation e)2.5 E
+(xists, or an output error occurs.)-.15 E/F2 10/Times-Bold@0 SF
+(continue)108 100.8 Q F0([)2.5 E F1(n)A F0(])A 1.754(Resume the ne)144
+112.8 R 1.754(xt iteration of the enclosing)-.15 F F2 -.25(fo)4.254 G(r)
+.25 E F0(,)A F2(while)4.254 E F0(,)A F2(until)4.254 E F0 4.254(,o)C(r)
+-4.254 E F2(select)4.254 E F0 4.253(loop. If)4.254 F F1(n)4.613 E F0
+1.753(is speci\214ed,)4.493 F 1.208(resume at the)144 124.8 R F1(n)3.709
+E F0 1.209(th enclosing loop.)B F1(n)6.569 E F0 1.209(must be)3.949 F/F3
+10/Symbol SF<b3>3.709 E F0 3.709(1. If)3.709 F F1(n)4.069 E F0 1.209
+(is greater than the number of enclosing)3.949 F .514
+(loops, the last enclosing loop \(the `)144 136.8 R(`top-le)-.74 E -.15
+(ve)-.25 G(l').15 E 3.014('l)-.74 G .514(oop\) is resumed.)-3.014 F .513
+(The return v)5.513 F .513(alue is 0 unless)-.25 F F1(n)3.013 E F0(is)
+3.013 E(not greater than or equal to 1.)144 148.8 Q F2(declar)108 165.6
+Q(e)-.18 E F0([)2.5 E F2(\255aAfFilrtux)A F0 2.5(][)C F2<ad70>-2.5 E F0
+2.5(][)C F1(name)-2.5 E F0([=)A F1(value)A F0 2.5(].)C(..])-2.5 E F2
+(typeset)108 177.6 Q F0([)2.5 E F2(\255aAfFilrtux)A F0 2.5(][)C F2<ad70>
+-2.5 E F0 2.5(][)C F1(name)-2.5 E F0([=)A F1(value)A F0 2.5(].)C(..])
+-2.5 E 1.264(Declare v)144 189.6 R 1.264(ariables and/or gi)-.25 F 1.564
+-.15(ve t)-.25 H 1.264(hem attrib).15 F 3.765(utes. If)-.2 F(no)3.765 E
+F1(name)3.765 E F0 3.765(sa)C 1.265(re gi)-3.765 F -.15(ve)-.25 G 3.765
+(nt).15 G 1.265(hen display the v)-3.765 F 1.265(alues of)-.25 F -.25
+(va)144 201.6 S 3.483(riables. The).25 F F2<ad70>3.483 E F0 .983
+(option will display the attrib)3.483 F .983(utes and v)-.2 F .982
+(alues of each)-.25 F F1(name)3.482 E F0 5.982(.W).18 G(hen)-5.982 E F2
+<ad70>3.482 E F0 .982(is used)3.482 F(with)144 213.6 Q F1(name)3.579 E
+F0(ar)3.579 E 1.079(guments, additional options are ignored.)-.18 F
+(When)6.079 E F2<ad70>3.579 E F0 1.079(is supplied without)3.579 F F1
+(name)3.58 E F0(ar)3.58 E(gu-)-.18 E .151
+(ments, it will display the attrib)144 225.6 R .151(utes and v)-.2 F
+.151(alues of all v)-.25 F .15(ariables ha)-.25 F .15(ving the attrib)
+-.2 F .15(utes speci\214ed by the)-.2 F .046(additional options.)144
+237.6 R .046(If no other options are supplied with)5.046 F F2<ad70>2.547
+E F0(,)A F2(declar)2.547 E(e)-.18 E F0 .047(will display the attrib)
+2.547 F .047(utes and)-.2 F -.25(va)144 249.6 S 1.363
+(lues of all shell v).25 F 3.863(ariables. The)-.25 F F2<ad66>3.863 E F0
+1.362(option will restrict the display to shell functions.)3.863 F(The)
+6.362 E F2<ad46>3.862 E F0 2.422(option inhibits the display of functio\
+n de\214nitions; only the function name and attrib)144 261.6 R 2.423
+(utes are)-.2 F 2.664(printed. If)144 273.6 R(the)2.664 E F2(extdeb)
+2.664 E(ug)-.2 E F0 .164(shell option is enabled using)2.664 F F2(shopt)
+2.664 E F0 2.664(,t)C .163(he source \214le name and line number)-2.664
+F 1.382(where the function is de\214ned are displayed as well.)144 285.6
+R(The)6.382 E F2<ad46>3.882 E F0 1.382(option implies)3.882 F F2<ad66>
+3.882 E F0 6.382(.T)C 1.382(he follo)-6.382 F(wing)-.25 E .794
+(options can be used to restrict output to v)144 297.6 R .794
+(ariables with the speci\214ed attrib)-.25 F .793(ute or to gi)-.2 F
+1.093 -.15(ve v)-.25 H(ariables)-.1 E(attrib)144 309.6 Q(utes:)-.2 E F2
+<ad61>144 321.6 Q F0(Each)25.3 E F1(name)2.5 E F0(is an inde)2.5 E -.15
+(xe)-.15 G 2.5(da).15 G(rray v)-2.5 E(ariable \(see)-.25 E F2(Arrays)2.5
+E F0(abo)2.5 E -.15(ve)-.15 G(\).).15 E F2<ad41>144 333.6 Q F0(Each)
+23.08 E F1(name)2.5 E F0(is an associati)2.5 E .3 -.15(ve a)-.25 H
+(rray v).15 E(ariable \(see)-.25 E F2(Arrays)2.5 E F0(abo)2.5 E -.15(ve)
+-.15 G(\).).15 E F2<ad66>144 345.6 Q F0(Use function names only)26.97 E
+(.)-.65 E F2<ad69>144 357.6 Q F0 .557(The v)27.52 F .558
+(ariable is treated as an inte)-.25 F .558(ger; arithmetic e)-.15 F -.25
+(va)-.25 G .558(luation \(see).25 F/F4 9/Times-Bold@0 SF .558
+(ARITHMETIC EV)3.058 F(ALU)-1.215 E(A-)-.54 E(TION)180 369.6 Q F0(abo)
+2.25 E -.15(ve)-.15 G 2.5(\)i).15 G 2.5(sp)-2.5 G(erformed when the v)
+-2.5 E(ariable is assigned a v)-.25 E(alue.)-.25 E F2<ad6c>144 381.6 Q
+F0 .91(When the v)27.52 F .909(ariable is assigned a v)-.25 F .909
+(alue, all upper)-.25 F .909(-case characters are con)-.2 F -.15(ve)-.4
+G .909(rted to lo).15 F(wer)-.25 E(-)-.2 E 2.5(case. The)180 393.6 R
+(upper)2.5 E(-case attrib)-.2 E(ute is disabled.)-.2 E F2<ad72>144 405.6
+Q F0(Mak)25.86 E(e)-.1 E F1(name)5.046 E F0 5.046(sr)C(eadonly)-5.046 E
+7.546(.T)-.65 G 2.546(hese names cannot then be assigned v)-7.546 F
+2.547(alues by subsequent)-.25 F(assignment statements or unset.)180
+417.6 Q F2<ad74>144 429.6 Q F0(Gi)26.97 E .73 -.15(ve e)-.25 H(ach).15 E
+F1(name)2.93 E F0(the)2.929 E F1(tr)2.929 E(ace)-.15 E F0(attrib)2.929 E
+2.929(ute. T)-.2 F .429(raced functions inherit the)-.35 F F2(DEB)2.929
+E(UG)-.1 E F0(and)2.929 E F2(RETURN)2.929 E F0
+(traps from the calling shell.)180 441.6 Q(The trace attrib)5 E
+(ute has no special meaning for v)-.2 E(ariables.)-.25 E F2<ad75>144
+453.6 Q F0 .909(When the v)24.74 F .909(ariable is assigned a v)-.25 F
+.909(alue, all lo)-.25 F(wer)-.25 E .909(-case characters are con)-.2 F
+-.15(ve)-.4 G .91(rted to upper).15 F(-)-.2 E 2.5(case. The)180 465.6 R
+(lo)2.5 E(wer)-.25 E(-case attrib)-.2 E(ute is disabled.)-.2 E F2<ad78>
+144 477.6 Q F0(Mark)25.3 E F1(name)2.5 E F0 2.5(sf)C(or e)-2.5 E
+(xport to subsequent commands via the en)-.15 E(vironment.)-.4 E .121
+(Using `+' instead of `\255' turns of)144 494.4 R 2.621(ft)-.25 G .121
+(he attrib)-2.621 F .121(ute instead, with the e)-.2 F .12
+(xceptions that)-.15 F F2(+a)2.62 E F0 .12(may not be used)2.62 F .644
+(to destro)144 506.4 R 3.144(ya)-.1 G 3.144(na)-3.144 G .644(rray v)
+-3.144 F .644(ariable and)-.25 F F2(+r)3.145 E F0 .645(will not remo)
+3.145 F .945 -.15(ve t)-.15 H .645(he readonly attrib).15 F 3.145
+(ute. When)-.2 F .645(used in a func-)3.145 F 1.945(tion, mak)144 518.4
+R 1.945(es each)-.1 F F1(name)4.445 E F0 1.945(local, as with the)4.445
+F F2(local)4.444 E F0 4.444(command. If)4.444 F 4.444(av)4.444 G 1.944
+(ariable name is follo)-4.694 F 1.944(wed by)-.25 F(=)144 530.4 Q F1
+(value)A F0 3.238(,t)C .738(he v)-3.238 F .738(alue of the v)-.25 F .738
+(ariable is set to)-.25 F F1(value)3.238 E F0 5.738(.T)C .738
+(he return v)-5.738 F .739(alue is 0 unless an in)-.25 F -.25(va)-.4 G
+.739(lid option is).25 F .603
+(encountered, an attempt is made to de\214ne a function using)144 542.4
+R/F5 10/Courier@0 SF .603(\255f foo=bar)3.103 F F0 3.103(,a)C 3.103(na)
+-3.103 G .603(ttempt is made to)-3.103 F 1.242(assign a v)144 554.4 R
+1.242(alue to a readonly v)-.25 F 1.242
+(ariable, an attempt is made to assign a v)-.25 F 1.243
+(alue to an array v)-.25 F(ariable)-.25 E 1.386
+(without using the compound assignment syntax \(see)144 566.4 R F2
+(Arrays)3.886 E F0(abo)3.886 E -.15(ve)-.15 G 1.386(\), one of the).15 F
+F1(names)3.886 E F0 1.386(is not a)3.886 F -.25(va)144 578.4 S .171
+(lid shell v).25 F .171(ariable name, an attempt is made to turn of)-.25
+F 2.671(fr)-.25 G .171(eadonly status for a readonly v)-2.671 F .172
+(ariable, an)-.25 F .96(attempt is made to turn of)144 590.4 R 3.46(fa)
+-.25 G .96(rray status for an array v)-3.46 F .96
+(ariable, or an attempt is made to display a)-.25 F(non-e)144 602.4 Q
+(xistent function with)-.15 E F2<ad66>2.5 E F0(.)A F2(dirs [+)108 619.2
+Q F1(n)A F2 2.5(][)C<ad>-2.5 E F1(n)A F2 2.5(][)C(\255cplv])-2.5 E F0
+-.4(Wi)144 631.2 S .328
+(thout options, displays the list of currently remembered directories.)
+.4 F .329(The def)5.329 F .329(ault display is on a)-.1 F 1.238
+(single line with directory names separated by spaces.)144 643.2 R 1.238
+(Directories are added to the list with the)6.238 F F2(pushd)144 655.2 Q
+F0(command; the)2.5 E F2(popd)2.5 E F0(command remo)2.5 E -.15(ve)-.15 G
+2.5(se).15 G(ntries from the list.)-2.5 E F2(+)144 667.2 Q F1(n)A F0
+1.564(Displays the)25.3 F F1(n)4.064 E F0 1.565
+(th entry counting from the left of the list sho)B 1.565(wn by)-.25 F F2
+(dirs)4.065 E F0 1.565(when in)4.065 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E
+(without options, starting with zero.)180 679.2 Q F2<ad>144 691.2 Q F1
+(n)A F0 1.194(Displays the)25.3 F F1(n)3.694 E F0 1.194
+(th entry counting from the right of the list sho)B 1.194(wn by)-.25 F
+F2(dirs)3.694 E F0 1.194(when in)3.694 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E
+(without options, starting with zero.)180 703.2 Q F2<ad63>144 715.2 Q F0
+(Clears the directory stack by deleting all of the entries.)25.86 E
+(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(53)185.955 E 0 Cg EP
+%%Page: 54 54
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF<ad6c>144 84 Q F0 .324
+(Produces a longer listing; the def)27.52 F .324
+(ault listing format uses a tilde to denote the home direc-)-.1 F(tory)
+180 96 Q(.)-.65 E F1<ad70>144 108 Q F0
+(Print the directory stack with one entry per line.)24.74 E F1<ad76>144
+120 Q F0 .273(Print the directory stack with one entry per line, pre\
+\214xing each entry with its inde)25.3 F 2.772(xi)-.15 G 2.772(nt)-2.772
+G(he)-2.772 E(stack.)180 132 Q .257(The return v)144 148.8 R .258
+(alue is 0 unless an in)-.25 F -.25(va)-.4 G .258
+(lid option is supplied or).25 F/F2 10/Times-Italic@0 SF(n)2.758 E F0
+(inde)2.758 E -.15(xe)-.15 G 2.758(sb).15 G -.15(ey)-2.758 G .258
+(ond the end of the direc-).15 F(tory stack.)144 160.8 Q F1(diso)108
+177.6 Q(wn)-.1 E F0([)2.5 E F1(\255ar)A F0 2.5(][)C F1<ad68>-2.5 E F0
+2.5(][)C F2(jobspec)-2.5 E F0(...])2.5 E -.4(Wi)144 189.6 S .295
+(thout options, each).4 F F2(jobspec)4.535 E F0 .295(is remo)3.105 F
+-.15(ve)-.15 G 2.795(df).15 G .295(rom the table of acti)-2.795 F .595
+-.15(ve j)-.25 H 2.795(obs. If).15 F F2(jobspec)4.535 E F0 .295
+(is not present,)3.105 F .422(and neither)144 201.6 R F1<ad61>2.922 E F0
+(nor)2.922 E F1<ad72>2.922 E F0 .422(is supplied, the shell')2.922 F
+2.922(sn)-.55 G .422(otion of the)-2.922 F F2(curr)2.923 E .423(ent job)
+-.37 F F0 .423(is used.)2.923 F .423(If the)5.423 F F1<ad68>2.923 E F0
+.423(option is)2.923 F(gi)144 213.6 Q -.15(ve)-.25 G .141(n, each).15 F
+F2(jobspec)4.381 E F0 .141(is not remo)2.951 F -.15(ve)-.15 G 2.641(df)
+.15 G .141(rom the table, b)-2.641 F .141(ut is mark)-.2 F .141
+(ed so that)-.1 F/F3 9/Times-Bold@0 SF(SIGHUP)2.641 E F0 .14
+(is not sent to the)2.39 F .004(job if the shell recei)144 225.6 R -.15
+(ve)-.25 G 2.504(sa).15 G F3(SIGHUP)A/F4 9/Times-Roman@0 SF(.)A F0 .004
+(If no)4.504 F F2(jobspec)4.244 E F0 .004(is present, and neither the)
+2.814 F F1<ad61>2.504 E F0 .005(nor the)2.504 F F1<ad72>2.505 E F0 .005
+(option is)2.505 F 1.229(supplied, the)144 237.6 R F2(curr)3.729 E 1.229
+(ent job)-.37 F F0 1.229(is used.)3.729 F 1.229(If no)6.229 F F2
+(jobspec)5.469 E F0 1.229(is supplied, the)4.039 F F1<ad61>3.729 E F0
+1.228(option means to remo)3.729 F 1.528 -.15(ve o)-.15 H(r).15 E .656
+(mark all jobs; the)144 249.6 R F1<ad72>3.156 E F0 .657
+(option without a)3.156 F F2(jobspec)4.897 E F0(ar)3.467 E .657
+(gument restricts operation to running jobs.)-.18 F(The)5.657 E
+(return v)144 261.6 Q(alue is 0 unless a)-.25 E F2(jobspec)4.24 E F0
+(does not specify a v)2.81 E(alid job)-.25 E(.)-.4 E F1(echo)108 278.4 Q
+F0([)2.5 E F1(\255neE)A F0 2.5(][)C F2(ar)-2.5 E(g)-.37 E F0(...])2.5 E
+.395(Output the)144 290.4 R F2(ar)2.895 E(g)-.37 E F0 .395
+(s, separated by spaces, follo)B .395(wed by a ne)-.25 F 2.895
+(wline. The)-.25 F .394(return status is al)2.895 F -.1(wa)-.1 G .394
+(ys 0.).1 F(If)5.394 E F1<ad6e>2.894 E F0 .548
+(is speci\214ed, the trailing ne)144 302.4 R .548(wline is suppressed.)
+-.25 F .548(If the)5.548 F F1<ad65>3.048 E F0 .548(option is gi)3.048 F
+-.15(ve)-.25 G .548(n, interpretation of the fol-).15 F(lo)144 314.4 Q
+.053(wing backslash-escaped characters is enabled.)-.25 F(The)5.053 E F1
+<ad45>2.553 E F0 .052(option disables the interpretation of these)2.552
+F 1.502(escape characters, e)144 326.4 R -.15(ve)-.25 G 4.002(no).15 G
+4.002(ns)-4.002 G 1.502(ystems where the)-4.002 F 4.002(ya)-.15 G 1.502
+(re interpreted by def)-4.002 F 4.003(ault. The)-.1 F F1(xpg_echo)4.003
+E F0(shell)4.003 E .009
+(option may be used to dynamically determine whether or not)144 338.4 R
+F1(echo)2.509 E F0 -.15(ex)2.509 G .009(pands these escape characters)
+.15 F .659(by def)144 350.4 R(ault.)-.1 E F1(echo)5.659 E F0 .659
+(does not interpret)3.159 F F1<adad>3.159 E F0 .659
+(to mean the end of options.)3.159 F F1(echo)5.66 E F0 .66
+(interprets the follo)3.16 F(wing)-.25 E(escape sequences:)144 362.4 Q
+F1(\\a)144 374.4 Q F0(alert \(bell\))28.22 E F1(\\b)144 386.4 Q F0
+(backspace)27.66 E F1(\\c)144 398.4 Q F0(suppress further output)28.78 E
+F1(\\e)144 410.4 Q F0(an escape character)28.78 E F1(\\f)144 422.4 Q F0
+(form feed)29.89 E F1(\\n)144 434.4 Q F0(ne)27.66 E 2.5(wl)-.25 G(ine)
+-2.5 E F1(\\r)144 446.4 Q F0(carriage return)28.78 E F1(\\t)144 458.4 Q
+F0(horizontal tab)29.89 E F1(\\v)144 470.4 Q F0 -.15(ve)28.22 G
+(rtical tab).15 E F1(\\\\)144 482.4 Q F0(backslash)30.44 E F1(\\0)144
+494.4 Q F2(nnn)A F0(the eight-bit character whose v)13.22 E
+(alue is the octal v)-.25 E(alue)-.25 E F2(nnn)2.5 E F0
+(\(zero to three octal digits\))2.5 E F1(\\x)144 506.4 Q F2(HH)A F0
+(the eight-bit character whose v)13.78 E(alue is the he)-.25 E
+(xadecimal v)-.15 E(alue)-.25 E F2(HH)2.5 E F0(\(one or tw)2.5 E 2.5(oh)
+-.1 G .3 -.15(ex d)-2.5 H(igits\)).15 E F1(enable)108 523.2 Q F0([)2.5 E
+F1<ad61>A F0 2.5(][)C F1(\255dnps)-2.5 E F0 2.5(][)C F1<ad66>-2.5 E F2
+(\214lename)2.5 E F0 2.5(][)C F2(name)-2.5 E F0(...])2.5 E .278
+(Enable and disable b)144 535.2 R .278(uiltin shell commands.)-.2 F .278
+(Disabling a b)5.278 F .278(uiltin allo)-.2 F .278
+(ws a disk command which has)-.25 F .833(the same name as a shell b)144
+547.2 R .834(uiltin to be e)-.2 F -.15(xe)-.15 G .834
+(cuted without specifying a full pathname, e).15 F -.15(ve)-.25 G 3.334
+(nt).15 G(hough)-3.334 E .99(the shell normally searches for b)144 559.2
+R .989(uiltins before disk commands.)-.2 F(If)5.989 E F1<ad6e>3.489 E F0
+.989(is used, each)3.489 F F2(name)3.489 E F0 .989(is dis-)3.489 F 1.581
+(abled; otherwise,)144 571.2 R F2(names)4.082 E F0 1.582(are enabled.)
+4.082 F -.15(Fo)6.582 G 4.082(re).15 G 1.582(xample, to use the)-4.232 F
+F1(test)4.082 E F0 1.582(binary found via the)4.082 F F3 -.666(PA)4.082
+G(TH)-.189 E F0 .081(instead of the shell b)144 583.2 R .081(uiltin v)
+-.2 F .081(ersion, run)-.15 F/F5 10/Courier@0 SF .081(enable -n test)
+2.581 F F0 5.081(.T)C(he)-5.081 E F1<ad66>2.58 E F0 .08
+(option means to load the ne)2.58 F(w)-.25 E -.2(bu)144 595.2 S 1.524
+(iltin command).2 F F2(name)4.384 E F0 1.524(from shared object)4.204 F
+F2(\214lename)4.024 E F0 4.024(,o).18 G 4.024(ns)-4.024 G 1.524
+(ystems that support dynamic loading.)-4.024 F(The)144 607.2 Q F1<ad64>
+2.867 E F0 .367(option will delete a b)2.867 F .367(uiltin pre)-.2 F
+.367(viously loaded with)-.25 F F1<ad66>2.866 E F0 5.366(.I)C 2.866(fn)
+-5.366 G(o)-2.866 E F2(name)2.866 E F0(ar)2.866 E .366(guments are gi)
+-.18 F -.15(ve)-.25 G .366(n, or).15 F .398(if the)144 619.2 R F1<ad70>
+2.898 E F0 .399(option is supplied, a list of shell b)2.899 F .399
+(uiltins is printed.)-.2 F -.4(Wi)5.399 G .399(th no other option ar).4
+F .399(guments, the)-.18 F .099(list consists of all enabled shell b)144
+631.2 R 2.598(uiltins. If)-.2 F F1<ad6e>2.598 E F0 .098
+(is supplied, only disabled b)2.598 F .098(uiltins are printed.)-.2 F
+(If)5.098 E F1<ad61>2.598 E F0 1.916
+(is supplied, the list printed includes all b)144 643.2 R 1.916
+(uiltins, with an indication of whether or not each is)-.2 F 2.879
+(enabled. If)144 655.2 R F1<ad73>2.879 E F0 .379
+(is supplied, the output is restricted to the POSIX)2.879 F F2(special)
+2.879 E F0 -.2(bu)2.878 G 2.878(iltins. The).2 F .378(return v)2.878 F
+(alue)-.25 E .994(is 0 unless a)144 667.2 R F2(name)3.854 E F0 .994
+(is not a shell b)3.674 F .994(uiltin or there is an error loading a ne)
+-.2 F 3.495(wb)-.25 G .995(uiltin from a shared)-3.695 F(object.)144
+679.2 Q F1 -2.3 -.15(ev a)108 696 T(l).15 E F0([)2.5 E F2(ar)A(g)-.37 E
+F0(...])2.5 E(The)144 708 Q F2(ar)3.171 E(g)-.37 E F0 3.171(sa)C .671
+(re read and concatenated together into a single command.)-3.171 F .67
+(This command is then read)5.67 F .495(and e)144 720 R -.15(xe)-.15 G
+.495(cuted by the shell, and its e).15 F .495
+(xit status is returned as the v)-.15 F .495(alue of)-.25 F F1 -2.3 -.15
+(ev a)2.995 H(l).15 E F0 5.495(.I)C 2.995(ft)-5.495 G .495(here are no)
+-2.995 F F2(ar)2.995 E(gs)-.37 E F0(,).27 E(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(54)185.955 E 0 Cg EP
+%%Page: 55 55
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E(or only null ar)144 84 Q(guments,)-.18 E/F1 10/Times-Bold@0 SF
+-2.3 -.15(ev a)2.5 H(l).15 E F0(returns 0.)2.5 E F1(exec)108 100.8 Q F0
+([)2.5 E F1(\255cl)A F0 2.5(][)C F1<ad61>-2.5 E/F2 10/Times-Italic@0 SF
+(name)2.5 E F0 2.5(][)C F2(command)-2.5 E F0([)2.5 E F2(ar)A(guments)
+-.37 E F0(]])A(If)144 112.8 Q F2(command)3.006 E F0 .306
+(is speci\214ed, it replaces the shell.)3.576 F .305(No ne)5.305 F 2.805
+(wp)-.25 G .305(rocess is created.)-2.805 F(The)5.305 E F2(ar)3.135 E
+(guments)-.37 E F0(become)3.075 E .176(the ar)144 124.8 R .176
+(guments to)-.18 F F2(command)2.676 E F0 5.176(.I)C 2.676(ft)-5.176 G
+(he)-2.676 E F1<ad6c>2.676 E F0 .176
+(option is supplied, the shell places a dash at the be)2.676 F .177
+(ginning of)-.15 F .5(the zeroth ar)144 136.8 R .5(gument passed to)-.18
+F F2(command)3 E F0 5.499(.T).77 G .499(his is what)-5.499 F F2(lo)2.999
+E(gin)-.1 E F0 .499(\(1\) does.).24 F(The)5.499 E F1<ad63>2.999 E F0
+.499(option causes)2.999 F F2(com-)3.199 E(mand)144 148.8 Q F0 .638
+(to be e)3.908 F -.15(xe)-.15 G .638(cuted with an empty en).15 F 3.138
+(vironment. If)-.4 F F1<ad61>3.138 E F0 .638
+(is supplied, the shell passes)3.138 F F2(name)3.499 E F0 .639(as the)
+3.319 F 1.078(zeroth ar)144 160.8 R 1.077(gument to the e)-.18 F -.15
+(xe)-.15 G 1.077(cuted command.).15 F(If)6.077 E F2(command)3.777 E F0
+1.077(cannot be e)4.347 F -.15(xe)-.15 G 1.077(cuted for some reason, a)
+.15 F(non-interacti)144 172.8 Q .617 -.15(ve s)-.25 H .317(hell e).15 F
+.317(xits, unless the shell option)-.15 F F1(execfail)2.817 E F0 .318
+(is enabled, in which case it returns f)2.817 F(ail-)-.1 E 2.505
+(ure. An)144 184.8 R(interacti)2.505 E .305 -.15(ve s)-.25 H .005
+(hell returns f).15 F .005(ailure if the \214le cannot be e)-.1 F -.15
+(xe)-.15 G 2.505(cuted. If).15 F F2(command)2.705 E F0 .005
+(is not speci\214ed,)3.275 F(an)144 196.8 Q 3.036(yr)-.15 G .536
+(edirections tak)-3.036 F 3.036(ee)-.1 G -.25(ff)-3.036 G .536
+(ect in the current shell, and the return status is 0.).25 F .536
+(If there is a redirection)5.536 F(error)144 208.8 Q 2.5(,t)-.4 G
+(he return status is 1.)-2.5 E F1(exit)108 225.6 Q F0([)2.5 E F2(n)A F0
+6.29(]C)C .096(ause the shell to e)-6.29 F .096(xit with a status of)
+-.15 F F2(n)2.596 E F0 5.096(.I)C(f)-5.096 E F2(n)2.955 E F0 .095
+(is omitted, the e)2.835 F .095(xit status is that of the last command)
+-.15 F -.15(exe)144 237.6 S 2.5(cuted. A).15 F(trap on)2.5 E/F3 9
+/Times-Bold@0 SF(EXIT)2.5 E F0(is e)2.25 E -.15(xe)-.15 G
+(cuted before the shell terminates.).15 E F1(export)108 254.4 Q F0([)2.5
+E F1(\255fn)A F0 2.5(][).833 G F2(name)-2.5 E F0([=)A F2(wor)A(d)-.37 E
+F0(]] ...)A F1(export \255p)108 266.4 Q F0 .256(The supplied)144 278.4 R
+F2(names)3.117 E F0 .257(are mark)3.027 F .257(ed for automatic e)-.1 F
+.257(xport to the en)-.15 F .257(vironment of subsequently e)-.4 F -.15
+(xe)-.15 G(cuted).15 E 2.627(commands. If)144 290.4 R(the)2.627 E F1
+<ad66>2.627 E F0 .127(option is gi)2.627 F -.15(ve)-.25 G .127(n, the)
+.15 F F2(names)2.987 E F0 .127(refer to functions.)2.897 F .127(If no)
+5.127 F F2(names)2.987 E F0 .127(are gi)2.897 F -.15(ve)-.25 G .126
+(n, or if the).15 F F1<ad70>144 302.4 Q F0 .659
+(option is supplied, a list of all names that are e)3.159 F .66
+(xported in this shell is printed.)-.15 F(The)5.66 E F1<ad6e>3.16 E F0
+(option)3.16 E 1.587(causes the e)144 314.4 R 1.587
+(xport property to be remo)-.15 F -.15(ve)-.15 G 4.086(df).15 G 1.586
+(rom each)-4.086 F F2(name)4.086 E F0 6.586(.I)C 4.086(fav)-6.586 G
+1.586(ariable name is follo)-4.336 F 1.586(wed by)-.25 F(=)144 326.4 Q
+F2(wor)A(d)-.37 E F0 2.803(,t)C .303(he v)-2.803 F .303(alue of the v)
+-.25 F .304(ariable is set to)-.25 F F2(wor)2.804 E(d)-.37 E F0(.)A F1
+(export)5.304 E F0 .304(returns an e)2.804 F .304
+(xit status of 0 unless an in)-.15 F -.25(va)-.4 G(lid).25 E .294
+(option is encountered, one of the)144 338.4 R F2(names)2.793 E F0 .293
+(is not a v)2.793 F .293(alid shell v)-.25 F .293(ariable name, or)-.25
+F F1<ad66>2.793 E F0 .293(is supplied with a)2.793 F F2(name)144.36
+350.4 Q F0(that is not a function.)2.68 E F1(fc)108 367.2 Q F0([)2.5 E
+F1<ad65>A F2(ename)2.5 E F0 2.5(][)C F1(\255lnr)-2.5 E F0 2.5(][)C F2
+<8c72>-2.5 E(st)-.1 E F0 2.5(][)C F2(last)-2.5 E F0(])A F1(fc \255s)108
+379.2 Q F0([)2.5 E F2(pat)A F0(=)A F2 -.37(re)C(p).37 E F0 2.5(][)C F2
+(cmd)-2.5 E F0(])A .477(Fix Command.)144 391.2 R .478
+(In the \214rst form, a range of commands from)5.477 F F2<8c72>4.888 E
+(st)-.1 E F0(to)3.658 E F2(last)3.068 E F0 .478
+(is selected from the his-)3.658 F .882(tory list.)144 403.2 R F2 -.45
+(Fi)5.882 G -.1(rs).45 G(t).1 E F0(and)4.062 E F2(last)3.472 E F0 .882
+(may be speci\214ed as a string \(to locate the last command be)4.062 F
+.881(ginning with)-.15 F .797(that string\) or as a number \(an inde)144
+415.2 R 3.297(xi)-.15 G .797(nto the history list, where a ne)-3.297 F
+-.05(ga)-.15 G(ti).05 E 1.097 -.15(ve n)-.25 H .797(umber is used as an)
+.15 F(of)144 427.2 Q .277(fset from the current command number\).)-.25 F
+(If)5.277 E F2(last)2.867 E F0 .276
+(is not speci\214ed it is set to the current command)3.457 F .092
+(for listing \(so that)144 439.2 R/F4 10/Courier@0 SF .092
+(fc \255l \25510)2.592 F F0 .092(prints the last 10 commands\) and to)
+2.592 F F2<8c72>4.502 E(st)-.1 E F0 2.592(otherwise. If)3.272 F F2<8c72>
+4.502 E(st)-.1 E F0 .093(is not)3.273 F
+(speci\214ed it is set to the pre)144 451.2 Q
+(vious command for editing and \25516 for listing.)-.25 E(The)144 475.2
+Q F1<ad6e>2.522 E F0 .022
+(option suppresses the command numbers when listing.)2.522 F(The)5.022 E
+F1<ad72>2.522 E F0 .022(option re)2.522 F -.15(ve)-.25 G .022
+(rses the order of).15 F .438(the commands.)144 487.2 R .438(If the)
+5.438 F F1<ad6c>2.938 E F0 .438(option is gi)2.938 F -.15(ve)-.25 G .438
+(n, the commands are listed on standard output.).15 F(Otherwise,)5.438 E
+.335(the editor gi)144 499.2 R -.15(ve)-.25 G 2.835(nb).15 G(y)-2.835 E
+F2(ename)3.025 E F0 .335(is in)3.015 F -.2(vo)-.4 G -.1(ke).2 G 2.835
+(do).1 G 2.835(na\214)-2.835 G .335(le containing those commands.)-2.835
+F(If)5.334 E F2(ename)3.024 E F0 .334(is not gi)3.014 F -.15(ve)-.25 G
+(n,).15 E .63(the v)144 511.2 R .63(alue of the)-.25 F F3(FCEDIT)3.13 E
+F0 -.25(va)2.88 G .631(riable is used, and the v).25 F .631(alue of)-.25
+F F3(EDIT)3.131 E(OR)-.162 E F0(if)2.881 E F3(FCEDIT)3.131 E F0 .631
+(is not set.)2.881 F .631(If nei-)5.631 F .951(ther v)144 523.2 R .951
+(ariable is set,)-.25 F F2(vi)5.117 E F0 .951(is used.)5.117 F .95
+(When editing is complete, the edited commands are echoed and)5.951 F
+-.15(exe)144 535.2 S(cuted.).15 E .039(In the second form,)144 559.2 R
+F2(command)2.539 E F0 .039(is re-e)2.539 F -.15(xe)-.15 G .039
+(cuted after each instance of).15 F F2(pat)2.54 E F0 .04(is replaced by)
+2.54 F F2 -.37(re)2.54 G(p).37 E F0 5.04(.A)C(useful)-2.5 E .406
+(alias to use with this is)144 571.2 R F4 .406(r='fc \255s')2.906 F F0
+2.906(,s)C 2.906(ot)-2.906 G .406(hat typing)-2.906 F F4 6.406(rc)2.906
+G(c)-6.406 E F0 .406(runs the last command be)2.906 F .406(ginning with)
+-.15 F F4(cc)144 583.2 Q F0(and typing)2.5 E F4(r)2.5 E F0(re-e)2.5 E
+-.15(xe)-.15 G(cutes the last command.).15 E .142
+(If the \214rst form is used, the return v)144 607.2 R .142
+(alue is 0 unless an in)-.25 F -.25(va)-.4 G .142
+(lid option is encountered or).25 F F2<8c72>4.552 E(st)-.1 E F0(or)3.322
+E F2(last)2.732 E F0 .455(specify history lines out of range.)144 619.2
+R .454(If the)5.454 F F1<ad65>2.954 E F0 .454
+(option is supplied, the return v)2.954 F .454(alue is the v)-.25 F .454
+(alue of the)-.25 F .787(last command e)144 631.2 R -.15(xe)-.15 G .787
+(cuted or f).15 F .788
+(ailure if an error occurs with the temporary \214le of commands.)-.1 F
+.788(If the)5.788 F 1.136
+(second form is used, the return status is that of the command re-e)144
+643.2 R -.15(xe)-.15 G 1.135(cuted, unless).15 F F2(cmd)3.835 E F0 1.135
+(does not)4.405 F(specify a v)144 655.2 Q
+(alid history line, in which case)-.25 E F1(fc)2.5 E F0(returns f)2.5 E
+(ailure.)-.1 E F1(fg)108 672 Q F0([)2.5 E F2(jobspec)A F0(])A(Resume)144
+684 Q F2(jobspec)5.653 E F0 1.413(in the fore)4.223 F 1.413
+(ground, and mak)-.15 F 3.913(ei)-.1 G 3.913(tt)-3.913 G 1.413
+(he current job)-3.913 F 6.413(.I)-.4 G(f)-6.413 E F2(jobspec)5.653 E F0
+1.414(is not present, the)4.223 F(shell')144 696 Q 3.117(sn)-.55 G .617
+(otion of the)-3.117 F F2(curr)3.117 E .617(ent job)-.37 F F0 .617
+(is used.)3.117 F .617(The return v)5.617 F .616
+(alue is that of the command placed into the)-.25 F(fore)144 708 Q .362
+(ground, or f)-.15 F .362(ailure if run when job control is disabled or)
+-.1 F 2.862(,w)-.4 G .363(hen run with job control enabled, if)-2.862 F
+F2(jobspec)145.74 720 Q F0 .004(does not specify a v)2.815 F .004
+(alid job or)-.25 F F2(jobspec)4.244 E F0 .004(speci\214es a job that w)
+2.814 F .004(as started without job control.)-.1 F(GNU Bash-4.1)72 768 Q
+(2009 December 29)135.965 E(55)185.955 E 0 Cg EP
+%%Page: 56 56
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(getopts)108 84 Q/F2 10/Times-Italic@0 SF
+(optstring name)2.5 E F0([)2.5 E F2(ar)A(gs)-.37 E F0(])A F1(getopts)144
+96 Q F0 .793
+(is used by shell procedures to parse positional parameters.)3.293 F F2
+(optstring)6.023 E F0 .793(contains the option)3.513 F .15
+(characters to be recognized; if a character is follo)144 108 R .149
+(wed by a colon, the option is e)-.25 F .149(xpected to ha)-.15 F .449
+-.15(ve a)-.2 H(n).15 E(ar)144 120 Q .578
+(gument, which should be separated from it by white space.)-.18 F .579
+(The colon and question mark char)5.579 F(-)-.2 E 1.665
+(acters may not be used as option characters.)144 132 R 1.665
+(Each time it is in)6.665 F -.2(vo)-.4 G -.1(ke).2 G(d,).1 E F1(getopts)
+4.165 E F0 1.665(places the ne)4.165 F(xt)-.15 E .796
+(option in the shell v)144 144 R(ariable)-.25 E F2(name)3.296 E F0 3.296
+(,i).18 G(nitializing)-3.296 E F2(name)3.657 E F0 .797(if it does not e)
+3.477 F .797(xist, and the inde)-.15 F 3.297(xo)-.15 G 3.297(ft)-3.297 G
+.797(he ne)-3.297 F(xt)-.15 E(ar)144 156 Q .085
+(gument to be processed into the v)-.18 F(ariable)-.25 E/F3 9
+/Times-Bold@0 SF(OPTIND)2.585 E/F4 9/Times-Roman@0 SF(.)A F3(OPTIND)
+4.585 E F0 .085(is initialized to 1 each time the shell)2.335 F .845
+(or a shell script is in)144 168 R -.2(vo)-.4 G -.1(ke).2 G 3.345
+(d. When).1 F .845(an option requires an ar)3.345 F(gument,)-.18 E F1
+(getopts)3.346 E F0 .846(places that ar)3.346 F(gument)-.18 E .804
+(into the v)144 180 R(ariable)-.25 E F3(OPT)3.304 E(ARG)-.81 E F4(.)A F0
+.803(The shell does not reset)5.304 F F3(OPTIND)3.303 E F0 .803
+(automatically; it must be manually)3.053 F .293
+(reset between multiple calls to)144 192 R F1(getopts)2.793 E F0 .293
+(within the same shell in)2.793 F -.2(vo)-.4 G .293(cation if a ne).2 F
+2.793(ws)-.25 G .294(et of parameters)-2.793 F(is to be used.)144 204 Q
+2.044(When the end of options is encountered,)144 228 R F1(getopts)4.543
+E F0 -.15(ex)4.543 G 2.043(its with a return v).15 F 2.043
+(alue greater than zero.)-.25 F F3(OPTIND)144 240 Q F0
+(is set to the inde)2.25 E 2.5(xo)-.15 G 2.5(ft)-2.5 G
+(he \214rst non-option ar)-2.5 E(gument, and)-.18 E F1(name)2.5 E F0
+(is set to ?.)2.5 E F1(getopts)144 264 Q F0 2.392
+(normally parses the positional parameters, b)4.892 F 2.392
+(ut if more ar)-.2 F 2.393(guments are gi)-.18 F -.15(ve)-.25 G 4.893
+(ni).15 G(n)-4.893 E F2(ar)4.893 E(gs)-.37 E F0(,).27 E F1(getopts)144
+276 Q F0(parses those instead.)2.5 E F1(getopts)144 300 Q F0 1.166
+(can report errors in tw)3.666 F 3.665(ow)-.1 G 3.665(ays. If)-3.765 F
+1.165(the \214rst character of)3.665 F F2(optstring)3.895 E F0 1.165
+(is a colon,)3.885 F F2(silent)4.005 E F0(error)4.345 E 1.263
+(reporting is used.)144 312 R 1.263
+(In normal operation diagnostic messages are printed when in)6.263 F
+-.25(va)-.4 G 1.263(lid options or).25 F .394(missing option ar)144 324
+R .394(guments are encountered.)-.18 F .394(If the v)5.394 F(ariable)
+-.25 E F3(OPTERR)2.894 E F0 .394(is set to 0, no error messages)2.644 F
+(will be displayed, e)144 336 Q -.15(ve)-.25 G 2.5(ni).15 G 2.5(ft)-2.5
+G(he \214rst character of)-2.5 E F2(optstring)2.73 E F0(is not a colon.)
+2.72 E .666(If an in)144 360 R -.25(va)-.4 G .666(lid option is seen,)
+.25 F F1(getopts)3.166 E F0 .667(places ? into)3.167 F F2(name)3.527 E
+F0 .667(and, if not silent, prints an error message)3.347 F .4
+(and unsets)144 372 R F3(OPT)2.9 E(ARG)-.81 E F4(.)A F0(If)4.899 E F1
+(getopts)2.899 E F0 .399
+(is silent, the option character found is placed in)2.899 F F3(OPT)2.899
+E(ARG)-.81 E F0 .399(and no)2.649 F(diagnostic message is printed.)144
+384 Q 1.241(If a required ar)144 408 R 1.241(gument is not found, and)
+-.18 F F1(getopts)3.741 E F0 1.241(is not silent, a question mark \()
+3.741 F F1(?).833 E F0 3.742(\)i).833 G 3.742(sp)-3.742 G 1.242
+(laced in)-3.742 F F2(name)144 420 Q F0(,).18 E F3(OPT)2.735 E(ARG)-.81
+E F0 .234(is unset, and a diagnostic message is printed.)2.485 F(If)
+5.234 E F1(getopts)2.734 E F0 .234(is silent, then a colon \()2.734 F F1
+(:).833 E F0(\)).833 E(is placed in)144 432 Q F2(name)2.86 E F0(and)2.68
+E F3(OPT)2.5 E(ARG)-.81 E F0(is set to the option character found.)2.25
+E F1(getopts)144 456 Q F0 .902
+(returns true if an option, speci\214ed or unspeci\214ed, is found.)
+3.401 F .902(It returns f)5.902 F .902(alse if the end of)-.1 F
+(options is encountered or an error occurs.)144 468 Q F1(hash)108 484.8
+Q F0([)2.5 E F1(\255lr)A F0 2.5(][)C F1<ad70>-2.5 E F2(\214lename)2.5 E
+F0 2.5(][)C F1(\255dt)-2.5 E F0 2.5(][)C F2(name)-2.5 E F0(])A -.15(Fo)
+144 496.8 S 3.555(re).15 G(ach)-3.555 E F2(name)3.555 E F0 3.555(,t).18
+G 1.054(he full \214le name of the command is determined by searching t\
+he directories in)-3.555 F F1($P)144 508.8 Q -.95(AT)-.74 G(H).95 E F0
+.349(and remembered.)2.849 F .349(If the)5.349 F F1<ad70>2.849 E F0 .349
+(option is supplied, no path search is performed, and)2.849 F F2
+(\214lename)4.76 E F0 .452
+(is used as the full \214le name of the command.)144 520.8 R(The)5.452 E
+F1<ad72>2.952 E F0 .452(option causes the shell to for)2.952 F .452
+(get all remem-)-.18 F .592(bered locations.)144 532.8 R(The)5.592 E F1
+<ad64>3.092 E F0 .593(option causes the shell to for)3.092 F .593
+(get the remembered location of each)-.18 F F2(name)3.093 E F0(.)A .021
+(If the)144 544.8 R F1<ad74>2.521 E F0 .021
+(option is supplied, the full pathname to which each)2.521 F F2(name)
+2.52 E F0 .02(corresponds is printed.)2.52 F .02(If multi-)5.02 F(ple)
+144 556.8 Q F2(name)3.703 E F0(ar)3.703 E 1.203
+(guments are supplied with)-.18 F F1<ad74>3.703 E F0 3.703(,t)C(he)
+-3.703 E F2(name)3.703 E F0 1.204
+(is printed before the hashed full pathname.)3.703 F(The)144 568.8 Q F1
+<ad6c>3.216 E F0 .715(option causes output to be displayed in a format \
+that may be reused as input.)3.216 F .715(If no ar)5.715 F(gu-)-.18 E
+1.183(ments are gi)144 580.8 R -.15(ve)-.25 G 1.183(n, or if only).15 F
+F1<ad6c>3.683 E F0 1.184
+(is supplied, information about remembered commands is printed.)3.684 F
+(The return status is true unless a)144 592.8 Q F2(name)2.86 E F0
+(is not found or an in)2.68 E -.25(va)-.4 G(lid option is supplied.).25
+E F1(help)108 609.6 Q F0([)2.5 E F1(\255dms)A F0 2.5(][)C F2(pattern)
+-2.5 E F0(])A .867(Display helpful information about b)144 621.6 R .867
+(uiltin commands.)-.2 F(If)5.867 E F2(pattern)4.617 E F0 .866
+(is speci\214ed,)3.607 F F1(help)3.366 E F0(gi)3.366 E -.15(ve)-.25 G
+3.366(sd).15 G(etailed)-3.366 E .306(help on all commands matching)144
+633.6 R F2(pattern)2.806 E F0 2.807(;o).24 G .307
+(therwise help for all the b)-2.807 F .307
+(uiltins and shell control struc-)-.2 F(tures is printed.)144 645.6 Q F1
+<ad64>144 657.6 Q F0(Display a short description of each)24.74 E F2
+(pattern)2.5 E F1<ad6d>144 669.6 Q F0(Display the description of each)
+21.97 E F2(pattern)2.5 E F0(in a manpage-lik)2.5 E 2.5(ef)-.1 G(ormat)
+-2.5 E F1<ad73>144 681.6 Q F0
+(Display only a short usage synopsis for each)26.41 E F2(pattern)2.5 E
+F0(The return status is 0 unless no command matches)108 693.6 Q F2
+(pattern)2.5 E F0(.).24 E(GNU Bash-4.1)72 768 Q(2009 December 29)135.965
+E(56)185.955 E 0 Cg EP
+%%Page: 57 57
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(history [)108 84 Q/F2 10/Times-Italic@0 SF
+(n)A F1(])A(history \255c)108 96 Q(history \255d)108 108 Q F2(of)2.5 E
+(fset)-.18 E F1(history \255anrw)108 120 Q F0([)2.5 E F2(\214lename)A F0
+(])A F1(history \255p)108 132 Q F2(ar)2.5 E(g)-.37 E F0([)2.5 E F2(ar)A
+2.5(g.)-.37 G(..)-2.5 E F0(])A F1(history \255s)108 144 Q F2(ar)2.5 E(g)
+-.37 E F0([)2.5 E F2(ar)A 2.5(g.)-.37 G(..)-2.5 E F0(])A -.4(Wi)144 156
+S .752
+(th no options, display the command history list with line numbers.).4 F
+.752(Lines listed with a)5.752 F F1(*)3.251 E F0(ha)3.251 E -.15(ve)-.2
+G .38(been modi\214ed.)144 168 R .38(An ar)5.38 F .38(gument of)-.18 F
+F2(n)3.24 E F0 .38(lists only the last)3.12 F F2(n)3.24 E F0 2.88
+(lines. If)3.12 F .38(the shell v)2.88 F(ariable)-.25 E/F3 9
+/Times-Bold@0 SF(HISTTIMEFOR-)2.881 E(MA)144 180 Q(T)-.855 E F0 .265
+(is set and not null, it is used as a format string for)2.515 F F2
+(strftime)2.764 E F0 .264(\(3\) to display the time stamp asso-)B 1.019
+(ciated with each displayed history entry)144 192 R 6.019(.N)-.65 G
+3.519(oi)-6.019 G(nterv)-3.519 E 1.019
+(ening blank is printed between the formatted)-.15 F .176
+(time stamp and the history line.)144 204 R(If)5.176 E F2(\214lename)
+2.676 E F0 .176
+(is supplied, it is used as the name of the history \214le; if)2.676 F
+(not, the v)144 216 Q(alue of)-.25 E F3(HISTFILE)2.5 E F0(is used.)2.25
+E(Options, if supplied, ha)5 E .3 -.15(ve t)-.2 H(he follo).15 E
+(wing meanings:)-.25 E F1<ad63>144 228 Q F0
+(Clear the history list by deleting all the entries.)25.86 E F1<ad64>144
+240 Q F2(of)2.5 E(fset)-.18 E F0(Delete the history entry at position)
+180 252 Q F2(of)2.5 E(fset)-.18 E F0(.)A F1<ad61>144 264 Q F0 .598
+(Append the `)25.3 F(`ne)-.74 E(w')-.25 E 3.098('h)-.74 G .598
+(istory lines \(history lines entered since the be)-3.098 F .599
+(ginning of the current)-.15 F F1(bash)180 276 Q F0
+(session\) to the history \214le.)2.5 E F1<ad6e>144 288 Q F0 .854(Read \
+the history lines not already read from the history \214le into the cur\
+rent history list.)24.74 F .772
+(These are lines appended to the history \214le since the be)180 300 R
+.773(ginning of the current)-.15 F F1(bash)3.273 E F0(ses-)3.273 E
+(sion.)180 312 Q F1<ad72>144 324 Q F0(Read the contents of the history \
+\214le and use them as the current history)25.86 E(.)-.65 E F1<ad77>144
+336 Q F0(Write the current history to the history \214le, o)23.08 E -.15
+(ve)-.15 G(rwriting the history \214le').15 E 2.5(sc)-.55 G(ontents.)
+-2.5 E F1<ad70>144 348 Q F0 .626
+(Perform history substitution on the follo)24.74 F(wing)-.25 E F2(ar)
+3.125 E(gs)-.37 E F0 .625(and display the result on the standard)3.125 F
+2.975(output. Does)180 360 R .475
+(not store the results in the history list.)2.975 F(Each)5.475 E F2(ar)
+2.975 E(g)-.37 E F0 .475(must be quoted to disable)2.975 F
+(normal history e)180 372 Q(xpansion.)-.15 E F1<ad73>144 384 Q F0 .363
+(Store the)26.41 F F2(ar)3.193 E(gs)-.37 E F0 .363
+(in the history list as a single entry)3.133 F 5.363(.T)-.65 G .362
+(he last command in the history list is)-5.363 F(remo)180 396 Q -.15(ve)
+-.15 G 2.5(db).15 G(efore the)-2.5 E F2(ar)2.83 E(gs)-.37 E F0
+(are added.)2.77 E .145(If the)144 412.8 R F3(HISTTIMEFORMA)2.645 E(T)
+-.855 E F0 -.25(va)2.395 G .145
+(riable is set, the time stamp information associated with each history)
+.25 F .669(entry is written to the history \214le, mark)144 424.8 R .669
+(ed with the history comment character)-.1 F 5.668(.W)-.55 G .668
+(hen the history)-5.668 F .955(\214le is read, lines be)144 436.8 R .956
+(ginning with the history comment character follo)-.15 F .956
+(wed immediately by a digit)-.25 F .416
+(are interpreted as timestamps for the pre)144 448.8 R .416
+(vious history line.)-.25 F .416(The return v)5.416 F .415
+(alue is 0 unless an in)-.25 F -.25(va)-.4 G(lid).25 E .499(option is e\
+ncountered, an error occurs while reading or writing the history \214le\
+, an in)144 460.8 R -.25(va)-.4 G(lid).25 E F2(of)3 E(fset)-.18 E F0(is)
+3 E(supplied as an ar)144 472.8 Q(gument to)-.18 E F1<ad64>2.5 E F0 2.5
+(,o)C 2.5(rt)-2.5 G(he history e)-2.5 E(xpansion supplied as an ar)-.15
+E(gument to)-.18 E F1<ad70>2.5 E F0 -.1(fa)2.5 G(ils.).1 E F1(jobs)108
+489.6 Q F0([)2.5 E F1(\255lnprs)A F0 2.5(][)C F2(jobspec)A F0(... ])2.5
+E F1(jobs \255x)108 501.6 Q F2(command)2.5 E F0([)2.5 E F2(ar)2.5 E(gs)
+-.37 E F0(... ])2.5 E(The \214rst form lists the acti)144 513.6 Q .3
+-.15(ve j)-.25 H 2.5(obs. The).15 F(options ha)2.5 E .3 -.15(ve t)-.2 H
+(he follo).15 E(wing meanings:)-.25 E F1<ad6c>144 525.6 Q F0
+(List process IDs in addition to the normal information.)27.52 E F1
+<ad70>144 537.6 Q F0(List only the process ID of the job')24.74 E 2.5
+(sp)-.55 G(rocess group leader)-2.5 E(.)-.55 E F1<ad6e>144 549.6 Q F0
+.194(Display information only about jobs that ha)24.74 F .494 -.15(ve c)
+-.2 H .193(hanged status since the user w).15 F .193(as last noti-)-.1 F
+(\214ed of their status.)180 561.6 Q F1<ad72>144 573.6 Q F0
+(Restrict output to running jobs.)25.86 E F1<ad73>144 585.6 Q F0
+(Restrict output to stopped jobs.)26.41 E(If)144 602.4 Q F2(jobspec)
+4.553 E F0 .313(is gi)3.123 F -.15(ve)-.25 G .313
+(n, output is restricted to information about that job).15 F 5.314(.T)
+-.4 G .314(he return status is 0 unless)-5.314 F(an in)144 614.4 Q -.25
+(va)-.4 G(lid option is encountered or an in).25 E -.25(va)-.4 G(lid).25
+E F2(jobspec)4.24 E F0(is supplied.)2.81 E .395(If the)144 631.2 R F1
+<ad78>2.895 E F0 .394(option is supplied,)2.894 F F1(jobs)2.894 E F0
+.394(replaces an)2.894 F(y)-.15 E F2(jobspec)4.634 E F0 .394(found in)
+3.204 F F2(command)3.094 E F0(or)3.664 E F2(ar)3.224 E(gs)-.37 E F0 .394
+(with the corre-)3.164 F(sponding process group ID, and e)144 643.2 Q
+-.15(xe)-.15 G(cutes).15 E F2(command)2.7 E F0(passing it)3.27 E F2(ar)
+2.5 E(gs)-.37 E F0 2.5(,r).27 G(eturning its e)-2.5 E(xit status.)-.15 E
+F1(kill)108 660 Q F0([)2.5 E F1<ad73>A F2(sigspec)2.5 E F0(|)2.5 E F1
+<ad6e>2.5 E F2(signum)2.5 E F0(|)2.5 E F1<ad>2.5 E F2(sigspec)A F0 2.5
+(][)C F2(pid)-2.5 E F0(|)2.5 E F2(jobspec)2.5 E F0 2.5(].)C(..)-2.5 E F1
+(kill \255l)108 672 Q F0([)2.5 E F2(sigspec)A F0(|)2.5 E F2 -.2(ex)2.5 G
+(it_status).2 E F0(])A .119(Send the signal named by)144 684 R F2
+(sigspec)2.959 E F0(or)2.929 E F2(signum)2.959 E F0 .119
+(to the processes named by)2.939 F F2(pid)3.87 E F0(or)3.39 E F2
+(jobspec)2.62 E F0(.).31 E F2(sigspec)5.46 E F0(is)2.93 E .319
+(either a case-insensiti)144 696 R .619 -.15(ve s)-.25 H .319
+(ignal name such as).15 F F3(SIGKILL)2.819 E F0 .318
+(\(with or without the)2.569 F F3(SIG)2.818 E F0 .318
+(pre\214x\) or a signal)2.568 F(number;)144 708 Q F2(signum)4.188 E F0
+1.349(is a signal number)4.168 F 6.349(.I)-.55 G(f)-6.349 E F2(sigspec)
+4.189 E F0 1.349(is not present, then)4.159 F F3(SIGTERM)3.849 E F0
+1.349(is assumed.)3.599 F(An)6.349 E(ar)144 720 Q .523(gument of)-.18 F
+F1<ad6c>3.023 E F0 .523(lists the signal names.)3.023 F .523(If an)5.523
+F 3.023(ya)-.15 G -.18(rg)-3.023 G .523(uments are supplied when).18 F
+F1<ad6c>3.023 E F0 .523(is gi)3.023 F -.15(ve)-.25 G .523(n, the names)
+.15 F(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(57)185.955 E 0 Cg
+EP
+%%Page: 58 58
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E .28(of the signals corresponding to the ar)144 84 R .28
+(guments are listed, and the return status is 0.)-.18 F(The)5.28 E/F1 10
+/Times-Italic@0 SF -.2(ex)2.78 G(it_status).2 E F0(ar)144 96 Q .378
+(gument to)-.18 F/F2 10/Times-Bold@0 SF<ad6c>2.878 E F0 .378
+(is a number specifying either a signal number or the e)2.878 F .377
+(xit status of a process termi-)-.15 F .593(nated by a signal.)144 108 R
+F2(kill)5.593 E F0 .593(returns true if at least one signal w)3.093 F
+.593(as successfully sent, or f)-.1 F .594(alse if an error)-.1 F
+(occurs or an in)144 120 Q -.25(va)-.4 G(lid option is encountered.).25
+E F2(let)108 136.8 Q F1(ar)2.5 E(g)-.37 E F0([)2.5 E F1(ar)A(g)-.37 E F0
+(...])2.5 E(Each)144 148.8 Q F1(ar)3.027 E(g)-.37 E F0 .197
+(is an arithmetic e)2.917 F .197(xpression to be e)-.15 F -.25(va)-.25 G
+.196(luated \(see).25 F/F3 9/Times-Bold@0 SF .196(ARITHMETIC EV)2.696 F
+(ALU)-1.215 E -.855(AT)-.54 G(ION).855 E F0(abo)2.446 E -.15(ve)-.15 G
+2.696(\). If).15 F(the last)144 160.8 Q F1(ar)2.83 E(g)-.37 E F0 -.25
+(eva)2.72 G(luates to 0,).25 E F2(let)2.5 E F0
+(returns 1; 0 is returned otherwise.)2.5 E F2(local)108 177.6 Q F0([)2.5
+E F1(option)A F0 2.5(][)C F1(name)-2.5 E F0([=)A F1(value)A F0 2.5(].)C
+(..])-2.5 E -.15(Fo)144 189.6 S 2.56(re).15 G .06(ach ar)-2.56 F .06
+(gument, a local v)-.18 F .06(ariable named)-.25 F F1(name)2.92 E F0 .06
+(is created, and assigned)2.74 F F1(value)2.56 E F0 5.06(.T).18 G(he)
+-5.06 E F1(option)2.56 E F0 .06(can be)2.56 F(an)144 201.6 Q 3.153(yo)
+-.15 G 3.153(ft)-3.153 G .653(he options accepted by)-3.153 F F2(declar)
+3.153 E(e)-.18 E F0 5.652(.W)C(hen)-5.652 E F2(local)3.152 E F0 .652
+(is used within a function, it causes the v)3.152 F(ari-)-.25 E(able)144
+213.6 Q F1(name)3.72 E F0 .86(to ha)3.54 F 1.16 -.15(ve a v)-.2 H .861
+(isible scope restricted to that function and its children.).15 F -.4
+(Wi)5.861 G .861(th no operands,).4 F F2(local)144 225.6 Q F0 1.165
+(writes a list of local v)3.665 F 1.165
+(ariables to the standard output.)-.25 F 1.165(It is an error to use)
+6.165 F F2(local)3.664 E F0 1.164(when not)3.664 F .232
+(within a function.)144 237.6 R .233(The return status is 0 unless)5.232
+F F2(local)2.733 E F0 .233(is used outside a function, an in)2.733 F
+-.25(va)-.4 G(lid).25 E F1(name)3.093 E F0(is)2.913 E(supplied, or)144
+249.6 Q F1(name)2.5 E F0(is a readonly v)2.5 E(ariable.)-.25 E F2
+(logout)108 266.4 Q F0(Exit a login shell.)9.33 E F2(map\214le)108 283.2
+Q F0([)2.5 E F2<ad6e>A F1(count)2.5 E F0 2.5(][)C F2<ad4f>-2.5 E F1
+(origin)2.5 E F0 2.5(][)C F2<ad73>-2.5 E F1(count)2.5 E F0 2.5(][)C F2
+<ad74>-2.5 E F0 2.5(][)C F2<ad75>-2.5 E F1(fd)2.5 E F0 2.5(][)C F2<ad43>
+-2.5 E F1(callbac)2.5 E(k)-.2 E F0 2.5(][)C F2<ad63>-2.5 E F1(quantum)
+2.5 E F0 2.5(][)C F1(arr)-2.5 E(ay)-.15 E F0(])A F2 -.18(re)108 295.2 S
+(adarray).18 E F0([)2.5 E F2<ad6e>A F1(count)2.5 E F0 2.5(][)C F2<ad4f>
+-2.5 E F1(origin)2.5 E F0 2.5(][)C F2<ad73>-2.5 E F1(count)2.5 E F0 2.5
+(][)C F2<ad74>-2.5 E F0 2.5(][)C F2<ad75>-2.5 E F1(fd)2.5 E F0 2.5(][)C
+F2<ad43>-2.5 E F1(callbac)2.5 E(k)-.2 E F0 2.5(][)C F2<ad63>-2.5 E F1
+(quantum)2.5 E F0 2.5(][)C F1(arr)-2.5 E(ay)-.15 E F0(])A .351
+(Read lines from the standard input into the inde)144 307.2 R -.15(xe)
+-.15 G 2.851(da).15 G .351(rray v)-2.851 F(ariable)-.25 E F1(arr)2.85 E
+(ay)-.15 E F0 2.85(,o).32 G 2.85(rf)-2.85 G .35(rom \214le descriptor)
+-2.85 F F1(fd)2.85 E F0 1.248(if the)144 319.2 R F2<ad75>3.748 E F0
+1.248(option is supplied.)3.748 F 1.249(The v)6.249 F(ariable)-.25 E F3
+(MAPFILE)3.749 E F0 1.249(is the def)3.499 F(ault)-.1 E F1(arr)3.749 E
+(ay)-.15 E F0 6.249(.O)C 1.249(ptions, if supplied,)-6.249 F(ha)144
+331.2 Q .3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F2<ad6e>
+144 343.2 Q F0(Cop)24.74 E 2.5(ya)-.1 G 2.5(tm)-2.5 G(ost)-2.5 E F1
+(count)2.7 E F0 2.5(lines. If)3.18 F F1(count)2.5 E F0
+(is 0, all lines are copied.)2.5 E F2<ad4f>144 355.2 Q F0(Be)22.52 E
+(gin assigning to)-.15 E F1(arr)2.83 E(ay)-.15 E F0(at inde)2.82 E(x)
+-.15 E F1(origin)2.5 E F0 5(.T).24 G(he def)-5 E(ault inde)-.1 E 2.5(xi)
+-.15 G 2.5(s0)-2.5 G(.)-2.5 E F2<ad73>144 367.2 Q F0
+(Discard the \214rst)26.41 E F1(count)2.5 E F0(lines read.)2.5 E F2
+<ad74>144 379.2 Q F0(Remo)26.97 E .3 -.15(ve a t)-.15 H(railing ne).15 E
+(wline from each line read.)-.25 E F2<ad75>144 391.2 Q F0
+(Read lines from \214le descriptor)24.74 E F1(fd)2.5 E F0
+(instead of the standard input.)2.5 E F2<ad43>144 403.2 Q F0(Ev)23.08 E
+(aluate)-.25 E F1(callbac)2.7 E(k)-.2 E F0(each time)3.17 E F1(quantum)
+2.5 E F0(lines are read.)2.5 E(The)5 E F2<ad63>2.5 E F0
+(option speci\214es)2.5 E F1(quantum)2.5 E F0(.).32 E F2<ad63>144 415.2
+Q F0(Specify the number of lines read between each call to)25.86 E F1
+(callbac)2.5 E(k)-.2 E F0(.).67 E(If)144 432 Q F2<ad43>2.968 E F0 .467
+(is speci\214ed without)2.967 F F2<ad63>2.967 E F0 2.967(,t)C .467
+(he def)-2.967 F .467(ault quantum is 5000.)-.1 F(When)5.467 E F1
+(callbac)2.967 E(k)-.2 E F0 .467(is e)2.967 F -.25(va)-.25 G .467
+(luated, it is sup-).25 F 1.22(plied the inde)144 444 R 3.72(xo)-.15 G
+3.72(ft)-3.72 G 1.22(he ne)-3.72 F 1.22
+(xt array element to be assigned as an additional ar)-.15 F(gument.)-.18
+E F1(callbac)6.22 E(k)-.2 E F0(is)3.72 E -.25(eva)144 456 S
+(luated after the line is read b).25 E
+(ut before the array element is assigned.)-.2 E
+(If not supplied with an e)144 472.8 Q(xplicit origin,)-.15 E F2
+(map\214le)2.5 E F0(will clear)2.5 E F1(arr)2.5 E(ay)-.15 E F0
+(before assigning to it.)2.5 E F2(map\214le)144 489.6 Q F0 1.906
+(returns successfully unless an in)4.406 F -.25(va)-.4 G 1.905
+(lid option or option ar).25 F 1.905(gument is supplied,)-.18 F F1(arr)
+4.405 E(ay)-.15 E F0(is)4.405 E(in)144 501.6 Q -.25(va)-.4 G
+(lid or unassignable, or if).25 E F1(arr)2.5 E(ay)-.15 E F0
+(is not an inde)2.5 E -.15(xe)-.15 G 2.5(da).15 G(rray)-2.5 E(.)-.65 E
+F2(popd)108 518.4 Q F0<5bad>2.5 E F2(n)A F0 2.5(][)C(+)-2.5 E F1(n)A F0
+2.5(][)C<ad>-2.5 E F1(n)A F0(])A(Remo)144 530.4 Q -.15(ve)-.15 G 2.799
+(se).15 G .299(ntries from the directory stack.)-2.799 F -.4(Wi)5.299 G
+.299(th no ar).4 F .299(guments, remo)-.18 F -.15(ve)-.15 G 2.799(st).15
+G .3(he top directory from the)-2.799 F 1.479(stack, and performs a)144
+542.4 R F2(cd)3.979 E F0 1.479(to the ne)3.979 F 3.979(wt)-.25 G 1.479
+(op directory)-3.979 F 6.479(.A)-.65 G -.18(rg)-6.479 G 1.478
+(uments, if supplied, ha).18 F 1.778 -.15(ve t)-.2 H 1.478(he follo).15
+F(wing)-.25 E(meanings:)144 554.4 Q F2<ad6e>144 566.4 Q F0 .551
+(Suppresses the normal change of directory when remo)24.74 F .551
+(ving directories from the stack, so)-.15 F
+(that only the stack is manipulated.)180 578.4 Q F2(+)144 590.4 Q F1(n)A
+F0(Remo)25.3 E -.15(ve)-.15 G 2.64(st).15 G(he)-2.64 E F1(n)2.64 E F0
+.14(th entry counting from the left of the list sho)B .14(wn by)-.25 F
+F2(dirs)2.64 E F0 2.64(,s)C .14(tarting with zero.)-2.64 F -.15(Fo)180
+602.4 S 2.5(re).15 G(xample:)-2.65 E/F4 10/Courier@0 SF(popd +0)2.5 E F0
+(remo)2.5 E -.15(ve)-.15 G 2.5(st).15 G(he \214rst directory)-2.5 E(,)
+-.65 E F4(popd +1)2.5 E F0(the second.)2.5 E F2<ad>144 614.4 Q F1(n)A F0
+(Remo)25.3 E -.15(ve)-.15 G 3.759(st).15 G(he)-3.759 E F1(n)3.759 E F0
+1.259(th entry counting from the right of the list sho)B 1.26(wn by)-.25
+F F2(dirs)3.76 E F0 3.76(,s)C 1.26(tarting with)-3.76 F 2.5(zero. F)180
+626.4 R(or e)-.15 E(xample:)-.15 E F4(popd -0)2.5 E F0(remo)2.5 E -.15
+(ve)-.15 G 2.5(st).15 G(he last directory)-2.5 E(,)-.65 E F4(popd -1)2.5
+E F0(the ne)2.5 E(xt to last.)-.15 E .644(If the)144 643.2 R F2(popd)
+3.144 E F0 .644(command is successful, a)3.144 F F2(dirs)3.143 E F0 .643
+(is performed as well, and the return status is 0.)3.143 F F2(popd)5.643
+E F0 .415(returns f)144 655.2 R .415(alse if an in)-.1 F -.25(va)-.4 G
+.415(lid option is encountered, the directory stack is empty).25 F 2.916
+(,an)-.65 G(on-e)-2.916 E .416(xistent direc-)-.15 F
+(tory stack entry is speci\214ed, or the directory change f)144 667.2 Q
+(ails.)-.1 E F2(printf)108 684 Q F0([)2.5 E F2<ad76>A F1(var)2.5 E F0(])
+A F1(format)2.5 E F0([)2.5 E F1(ar)A(guments)-.37 E F0(])A .372
+(Write the formatted)144 696 R F1(ar)2.872 E(guments)-.37 E F0 .372
+(to the standard output under the control of the)2.872 F F1(format)2.872
+E F0 5.372(.T)C(he)-5.372 E F1(format)2.872 E F0 1.804(is a character s\
+tring which contains three types of objects: plain characters, which ar\
+e simply)144 708 R 1.859
+(copied to standard output, character escape sequences, which are con)
+144 720 R -.15(ve)-.4 G 1.858(rted and copied to the).15 F(GNU Bash-4.1)
+72 768 Q(2009 December 29)135.965 E(58)185.955 E 0 Cg EP
+%%Page: 59 59
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E 1.171(standard output, and format speci\214cations, each of whic\
+h causes printing of the ne)144 84 R 1.172(xt successi)-.15 F -.15(ve)
+-.25 G/F1 10/Times-Italic@0 SF(ar)144 96 Q(gument)-.37 E F0 6.274(.I)C
+3.774(na)-6.274 G 1.274(ddition to the standard)-3.774 F F1(printf)3.774
+E F0 1.274(\(1\) formats,)B/F2 10/Times-Bold@0 SF(%b)3.774 E F0(causes)
+3.774 E F2(printf)3.774 E F0 1.273(to e)3.774 F 1.273(xpand backslash)
+-.15 F .619(escape sequences in the corresponding)144 108 R F1(ar)3.119
+E(gument)-.37 E F0(\(e)3.119 E .619(xcept that)-.15 F F2(\\c)3.119 E F0
+.62(terminates output, backslashes in)3.119 F F2<5c08>144 120 Q F0(,)A
+F2(\\")2.985 E F0 2.985(,a)C(nd)-2.985 E F2(\\?)2.985 E F0 .485
+(are not remo)2.985 F -.15(ve)-.15 G .485(d, and octal escapes be).15 F
+.484(ginning with)-.15 F F2(\\0)2.984 E F0 .484
+(may contain up to four digits\),)2.984 F(and)144 132 Q F2(%q)2.567 E F0
+(causes)2.567 E F2(printf)2.567 E F0 .067(to output the corresponding)
+2.567 F F1(ar)2.568 E(gument)-.37 E F0 .068
+(in a format that can be reused as shell)2.568 F(input.)144 144 Q(The)
+144 168 Q F2<ad76>2.904 E F0 .404
+(option causes the output to be assigned to the v)2.904 F(ariable)-.25 E
+F1(var)2.904 E F0 .404(rather than being printed to the)2.904 F
+(standard output.)144 180 Q(The)144 204 Q F1(format)3.423 E F0 .923
+(is reused as necessary to consume all of the)3.423 F F1(ar)3.423 E
+(guments)-.37 E F0 5.923(.I)C 3.423(ft)-5.923 G(he)-3.423 E F1(format)
+3.423 E F0 .924(requires more)3.424 F F1(ar)144 216 Q(guments)-.37 E F0
+.033(than are supplied, the e)2.534 F .033
+(xtra format speci\214cations beha)-.15 F .333 -.15(ve a)-.2 H 2.533(si)
+.15 G 2.533(faz)-2.533 G .033(ero v)-2.533 F .033(alue or null string,)
+-.25 F(as appropriate, had been supplied.)144 228 Q(The return v)5 E
+(alue is zero on success, non-zero on f)-.25 E(ailure.)-.1 E F2(pushd)
+108 244.8 Q F0([)2.5 E F2<ad6e>A F0 2.5(][)C(+)-2.5 E F1(n)A F0 2.5(][)C
+<ad>-2.5 E F1(n)A F0(])A F2(pushd)108 256.8 Q F0([)2.5 E F2<ad6e>A F0
+2.5(][)C F1(dir)-2.5 E F0(])A .639(Adds a directory to the top of the d\
+irectory stack, or rotates the stack, making the ne)144 268.8 R 3.14(wt)
+-.25 G .64(op of the)-3.14 F 1.316(stack the current w)144 280.8 R 1.316
+(orking directory)-.1 F 6.316(.W)-.65 G 1.315(ith no ar)-6.716 F 1.315
+(guments, e)-.18 F 1.315(xchanges the top tw)-.15 F 3.815(od)-.1 G 1.315
+(irectories and)-3.815 F .871
+(returns 0, unless the directory stack is empty)144 292.8 R 5.871(.A)
+-.65 G -.18(rg)-5.871 G .872(uments, if supplied, ha).18 F 1.172 -.15
+(ve t)-.2 H .872(he follo).15 F .872(wing mean-)-.25 F(ings:)144 304.8 Q
+F2<ad6e>144 316.8 Q F0 .902(Suppresses the normal change of directory w\
+hen adding directories to the stack, so that)24.74 F
+(only the stack is manipulated.)180 328.8 Q F2(+)144 340.8 Q F1(n)A F0
+1.267(Rotates the stack so that the)25.3 F F1(n)3.767 E F0 1.268
+(th directory \(counting from the left of the list sho)B 1.268(wn by)
+-.25 F F2(dirs)180 352.8 Q F0 2.5(,s)C
+(tarting with zero\) is at the top.)-2.5 E F2<ad>144 364.8 Q F1(n)A F0
+.92(Rotates the stack so that the)25.3 F F1(n)3.42 E F0 .92
+(th directory \(counting from the right of the list sho)B .92(wn by)-.25
+F F2(dirs)180 376.8 Q F0 2.5(,s)C(tarting with zero\) is at the top.)
+-2.5 E F1(dir)144.35 388.8 Q F0(Adds)23.98 E F1(dir)2.85 E F0
+(to the directory stack at the top, making it the ne)3.23 E 2.5(wc)-.25
+G(urrent w)-2.5 E(orking directory)-.1 E(.)-.65 E .488(If the)144 405.6
+R F2(pushd)2.988 E F0 .488(command is successful, a)2.988 F F2(dirs)
+2.988 E F0 .488(is performed as well.)2.988 F .489
+(If the \214rst form is used,)5.488 F F2(pushd)2.989 E F0 1.04
+(returns 0 unless the cd to)144 417.6 R F1(dir)3.89 E F0 -.1(fa)4.27 G
+3.539(ils. W).1 F 1.039(ith the second form,)-.4 F F2(pushd)3.539 E F0
+1.039(returns 0 unless the directory)3.539 F .846(stack is empty)144
+429.6 R 3.346(,an)-.65 G(on-e)-3.346 E .847(xistent directory stack ele\
+ment is speci\214ed, or the directory change to the)-.15 F
+(speci\214ed ne)144 441.6 Q 2.5(wc)-.25 G(urrent directory f)-2.5 E
+(ails.)-.1 E F2(pwd)108 458.4 Q F0([)2.5 E F2(\255LP)A F0(])A .845
+(Print the absolute pathname of the current w)144 470.4 R .845
+(orking directory)-.1 F 5.844(.T)-.65 G .844
+(he pathname printed contains no)-5.844 F .181(symbolic links if the)144
+482.4 R F2<ad50>2.681 E F0 .181(option is supplied or the)2.681 F F2
+.181(\255o ph)2.681 F(ysical)-.15 E F0 .181(option to the)2.681 F F2
+(set)2.681 E F0 -.2(bu)2.681 G .182(iltin command is).2 F 3.264
+(enabled. If)144 494.4 R(the)3.264 E F2<ad4c>3.264 E F0 .763
+(option is used, the pathname printed may contain symbolic links.)3.264
+F .763(The return)5.763 F 1.36(status is 0 unless an error occurs while\
+ reading the name of the current directory or an in)144 506.4 R -.25(va)
+-.4 G(lid).25 E(option is supplied.)144 518.4 Q F2 -.18(re)108 535.2 S
+(ad).18 E F0([)3.817 E F2(\255ers)A F0 3.817(][)C F2<ad61>-3.817 E F1
+(aname)3.817 E F0 3.817(][)C F2<ad64>-3.817 E F1(delim)3.817 E F0 3.817
+(][)C F2<ad69>-3.817 E F1(te)3.817 E(xt)-.2 E F0 3.817(][)C F2<ad6e>
+-3.817 E F1(nc)3.816 E(har)-.15 E(s)-.1 E F0 3.816(][)C F2<ad4e>-3.816 E
+F1(nc)3.816 E(har)-.15 E(s)-.1 E F0 3.816(][)C F2<ad70>-3.816 E F1(pr)
+3.816 E(ompt)-.45 E F0 3.816(][)C F2<ad74>-3.816 E F1(timeout)3.816 E F0
+3.816(][)C F2<ad75>-3.816 E F1(fd)3.816 E F0(])A([)108 547.2 Q F1(name)A
+F0(...])2.5 E .516(One line is read from the standard input, or from th\
+e \214le descriptor)144 559.2 R F1(fd)3.016 E F0 .516(supplied as an ar)
+3.016 F .516(gument to)-.18 F(the)144 571.2 Q F2<ad75>2.538 E F0 .038
+(option, and the \214rst w)2.538 F .038(ord is assigned to the \214rst)
+-.1 F F1(name)2.539 E F0 2.539(,t).18 G .039(he second w)-2.539 F .039
+(ord to the second)-.1 F F1(name)2.539 E F0(,).18 E .42
+(and so on, with lefto)144 583.2 R -.15(ve)-.15 G 2.92(rw).15 G .42
+(ords and their interv)-3.02 F .42
+(ening separators assigned to the last)-.15 F F1(name)2.92 E F0 5.42(.I)
+.18 G 2.92(ft)-5.42 G(here)-2.92 E .54(are fe)144 595.2 R .54(wer w)-.25
+F .541(ords read from the input stream than names, the remaining names \
+are assigned empty)-.1 F -.25(va)144 607.2 S 2.511(lues. The).25 F .011
+(characters in)2.511 F/F3 9/Times-Bold@0 SF(IFS)2.511 E F0 .011
+(are used to split the line into w)2.261 F 2.511(ords. The)-.1 F .011
+(backslash character \()2.511 F F2(\\)A F0 2.51(\)m)C(ay)-2.51 E 1.89
+(be used to remo)144 619.2 R 2.19 -.15(ve a)-.15 H 2.19 -.15(ny s).15 H
+1.891(pecial meaning for the ne).15 F 1.891
+(xt character read and for line continuation.)-.15 F
+(Options, if supplied, ha)144 631.2 Q .3 -.15(ve t)-.2 H(he follo).15 E
+(wing meanings:)-.25 E F2<ad61>144 643.2 Q F1(aname)2.5 E F0 1.05(The w)
+180 655.2 R 1.049
+(ords are assigned to sequential indices of the array v)-.1 F(ariable)
+-.25 E F1(aname)3.549 E F0 3.549(,s).18 G 1.049(tarting at 0.)-3.549 F
+F1(aname)180.33 667.2 Q F0(is unset before an)2.68 E 2.5(yn)-.15 G .5
+-.25(ew va)-2.5 H(lues are assigned.).25 E(Other)5 E F1(name)2.5 E F0
+(ar)2.5 E(guments are ignored.)-.18 E F2<ad64>144 679.2 Q F1(delim)2.5 E
+F0(The \214rst character of)180 691.2 Q F1(delim)2.5 E F0
+(is used to terminate the input line, rather than ne)2.5 E(wline.)-.25 E
+F2<ad65>144 703.2 Q F0 .372
+(If the standard input is coming from a terminal,)25.86 F F2 -.18(re)
+2.873 G(adline).18 E F0(\(see)2.873 E F3(READLINE)2.873 E F0(abo)2.623 E
+-.15(ve)-.15 G 2.873(\)i).15 G 2.873(su)-2.873 G(sed)-2.873 E .218
+(to obtain the line.)180 715.2 R .218
+(Readline uses the current \(or def)5.218 F .218
+(ault, if line editing w)-.1 F .218(as not pre)-.1 F(viously)-.25 E
+(acti)180 727.2 Q -.15(ve)-.25 G 2.5(\)e).15 G(diting settings.)-2.5 E
+(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(59)185.955 E 0 Cg EP
+%%Page: 60 60
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF<ad69>144 84 Q/F2 10/Times-Italic@0 SF(te)
+2.5 E(xt)-.2 E F0(If)10.78 E F1 -.18(re)2.715 G(adline).18 E F0 .216
+(is being used to read the line,)2.715 F F2(te)2.716 E(xt)-.2 E F0 .216
+(is placed into the editing b)2.716 F(uf)-.2 E .216(fer before edit-)
+-.25 F(ing be)180 96 Q(gins.)-.15 E F1<ad6e>144 108 Q F2(nc)2.5 E(har)
+-.15 E(s)-.1 E F1 -.18(re)180 120 S(ad).18 E F0 1.395
+(returns after reading)3.895 F F2(nc)3.895 E(har)-.15 E(s)-.1 E F0 1.395
+(characters rather than w)3.895 F 1.394(aiting for a complete line of)
+-.1 F(input, b)180 132 Q(ut honor a delimiter if fe)-.2 E(wer than)-.25
+E F2(nc)2.5 E(har)-.15 E(s)-.1 E F0
+(characters are read before the delimiter)2.5 E(.)-.55 E F1<ad4e>144 144
+Q F2(nc)2.5 E(har)-.15 E(s)-.1 E F1 -.18(re)180 156 S(ad).18 E F0 1.269
+(returns after reading e)3.769 F(xactly)-.15 E F2(nc)3.769 E(har)-.15 E
+(s)-.1 E F0 1.269(characters rather than w)3.769 F 1.27
+(aiting for a complete)-.1 F .275
+(line of input, unless EOF is encountered or)180 168 R F1 -.18(re)2.775
+G(ad).18 E F0 .274(times out.)2.774 F .274(Delimiter characters encoun-)
+5.274 F 1.002
+(tered in the input are not treated specially and do not cause)180 180 R
+F1 -.18(re)3.503 G(ad).18 E F0 1.003(to return until)3.503 F F2(nc)3.503
+E(har)-.15 E(s)-.1 E F0(characters are read.)180 192 Q F1<ad70>144 204 Q
+F2(pr)2.5 E(ompt)-.45 E F0(Display)180 216 Q F2(pr)3.661 E(ompt)-.45 E
+F0 1.161(on standard error)3.661 F 3.661(,w)-.4 G 1.161
+(ithout a trailing ne)-3.661 F 1.161(wline, before attempting to read)
+-.25 F(an)180 228 Q 2.5(yi)-.15 G 2.5(nput. The)-2.5 F
+(prompt is displayed only if input is coming from a terminal.)2.5 E F1
+<ad72>144 240 Q F0 .543(Backslash does not act as an escape character)
+25.86 F 5.543(.T)-.55 G .544(he backslash is considered to be part of)
+-5.543 F(the line.)180 252 Q(In particular)5 E 2.5(,ab)-.4 G
+(ackslash-ne)-2.5 E(wline pair may not be used as a line continuation.)
+-.25 E F1<ad73>144 264 Q F0(Silent mode.)26.41 E
+(If input is coming from a terminal, characters are not echoed.)5 E F1
+<ad74>144 276 Q F2(timeout)2.5 E F0(Cause)180 288 Q F1 -.18(re)3.549 G
+(ad).18 E F0 1.048(to time out and return f)3.549 F 1.048
+(ailure if a complete line of input is not read within)-.1 F F2(timeout)
+180 300 Q F0(seconds.)3.496 E F2(timeout)5.996 E F0 .997
+(may be a decimal number with a fractional portion follo)3.496 F(wing)
+-.25 E .576(the decimal point.)180 312 R .576(This option is only ef)
+5.576 F(fecti)-.25 E .876 -.15(ve i)-.25 H(f).15 E F1 -.18(re)3.076 G
+(ad).18 E F0 .576(is reading input from a terminal,)3.076 F .141
+(pipe, or other special \214le; it has no ef)180 324 R .142
+(fect when reading from re)-.25 F .142(gular \214les.)-.15 F(If)5.142 E
+F2(timeout)2.642 E F0 .142(is 0,)2.642 F F1 -.18(re)180 336 S(ad).18 E
+F0 .113(returns success if input is a)2.614 F -.25(va)-.2 G .113
+(ilable on the speci\214ed \214le descriptor).25 F 2.613(,f)-.4 G .113
+(ailure otherwise.)-2.713 F(The e)180 348 Q
+(xit status is greater than 128 if the timeout is e)-.15 E(xceeded.)-.15
+E F1<ad75>144 360 Q F2(fd)2.5 E F0(Read input from \214le descriptor)
+14.46 E F2(fd)2.5 E F0(.)A .191(If no)144 376.8 R F2(names)3.051 E F0
+.191(are supplied, the line read is assigned to the v)2.961 F(ariable)
+-.25 E/F3 9/Times-Bold@0 SF(REPL)2.692 E(Y)-.828 E/F4 9/Times-Roman@0 SF
+(.)A F0 .192(The return code is zero,)4.692 F 1.344
+(unless end-of-\214le is encountered,)144 388.8 R F1 -.18(re)3.844 G(ad)
+.18 E F0 1.343
+(times out \(in which case the return code is greater than)3.844 F
+(128\), or an in)144 400.8 Q -.25(va)-.4 G
+(lid \214le descriptor is supplied as the ar).25 E(gument to)-.18 E F1
+<ad75>2.5 E F0(.)A F1 -.18(re)108 417.6 S(adonly).18 E F0([)2.5 E F1
+(\255aA)A(pf)-.25 E F0 2.5(][)C F2(name)-2.5 E F0([=)A F2(wor)A(d)-.37 E
+F0 2.5(].)C(..])-2.5 E .77(The gi)144 429.6 R -.15(ve)-.25 G(n).15 E F2
+(names)3.27 E F0 .77(are mark)3.27 F .77(ed readonly; the v)-.1 F .77
+(alues of these)-.25 F F2(names)3.63 E F0 .77
+(may not be changed by subse-)3.54 F 1.097(quent assignment.)144 441.6 R
+1.097(If the)6.097 F F1<ad66>3.597 E F0 1.097
+(option is supplied, the functions corresponding to the)3.597 F F2
+(names)3.596 E F0 1.096(are so)3.596 F(mark)144 453.6 Q 3.334(ed. The)
+-.1 F F1<ad61>3.334 E F0 .834(option restricts the v)3.334 F .834
+(ariables to inde)-.25 F -.15(xe)-.15 G 3.334(da).15 G .834(rrays; the)
+-3.334 F F1<ad41>3.334 E F0 .834(option restricts the v)3.334 F(ari-)
+-.25 E .538(ables to associati)144 465.6 R .838 -.15(ve a)-.25 H 3.038
+(rrays. If).15 F(no)3.038 E F2(name)3.398 E F0(ar)3.218 E .538
+(guments are gi)-.18 F -.15(ve)-.25 G .538(n, or if the).15 F F1<ad70>
+3.038 E F0 .537(option is supplied, a list)3.038 F .08
+(of all readonly names is printed.)144 477.6 R(The)5.08 E F1<ad70>2.58 E
+F0 .081(option causes output to be displayed in a format that may)2.58 F
+1.177(be reused as input.)144 489.6 R 1.177(If a v)6.177 F 1.176
+(ariable name is follo)-.25 F 1.176(wed by =)-.25 F F2(wor)A(d)-.37 E F0
+3.676(,t)C 1.176(he v)-3.676 F 1.176(alue of the v)-.25 F 1.176
+(ariable is set to)-.25 F F2(wor)144 501.6 Q(d)-.37 E F0 6.205(.T)C
+1.205(he return status is 0 unless an in)-6.205 F -.25(va)-.4 G 1.206
+(lid option is encountered, one of the).25 F F2(names)4.066 E F0 1.206
+(is not a)3.976 F -.25(va)144 513.6 S(lid shell v).25 E
+(ariable name, or)-.25 E F1<ad66>2.5 E F0(is supplied with a)2.5 E F2
+(name)2.86 E F0(that is not a function.)2.68 E F1 -.18(re)108 530.4 S
+(tur).18 E(n)-.15 E F0([)2.5 E F2(n)A F0(])A .587
+(Causes a function to e)144 542.4 R .587(xit with the return v)-.15 F
+.587(alue speci\214ed by)-.25 F F2(n)3.087 E F0 5.587(.I).24 G(f)-5.587
+E F2(n)3.447 E F0 .586(is omitted, the return status is)3.327 F 1.335
+(that of the last command e)144 554.4 R -.15(xe)-.15 G 1.335
+(cuted in the function body).15 F 6.335(.I)-.65 G 3.835(fu)-6.335 G
+1.335(sed outside a function, b)-3.835 F 1.335(ut during)-.2 F -.15(exe)
+144 566.4 S .794(cution of a script by the).15 F F1(.)3.294 E F0(\()
+5.794 E F1(sour)A(ce)-.18 E F0 3.294(\)c)C .794
+(ommand, it causes the shell to stop e)-3.294 F -.15(xe)-.15 G .794
+(cuting that script).15 F .245(and return either)144 578.4 R F2(n)3.105
+E F0 .246(or the e)2.985 F .246(xit status of the last command e)-.15 F
+-.15(xe)-.15 G .246(cuted within the script as the e).15 F .246
+(xit sta-)-.15 F .082(tus of the script.)144 590.4 R .082
+(If used outside a function and not during e)5.082 F -.15(xe)-.15 G .082
+(cution of a script by).15 F F1(.)2.582 E F0 2.581(,t).833 G .081
+(he return sta-)-2.581 F 2.305(tus is f)144 602.4 R 4.805(alse. An)-.1 F
+4.805(yc)-.15 G 2.305(ommand associated with the)-4.805 F F1(RETURN)
+4.805 E F0 2.306(trap is e)4.806 F -.15(xe)-.15 G 2.306(cuted before e)
+.15 F -.15(xe)-.15 G(cution).15 E(resumes after the function or script.)
+144 614.4 Q F1(set)108 631.2 Q F0([)2.5 E F1
+(\255\255abefhkmnptuvxBCEHPT)A F0 2.5(][)C F1<ad6f>-2.5 E F2(option)2.5
+E F0 2.5(][)C F2(ar)-2.5 E(g)-.37 E F0(...])2.5 E F1(set)108 643.2 Q F0
+([)2.5 E F1(+abefhkmnptuvxBCEHPT)A F0 2.5(][)C F1(+o)-2.5 E F2(option)
+2.5 E F0 2.5(][)C F2(ar)-2.5 E(g)-.37 E F0(...])2.5 E -.4(Wi)144 655.2 S
+.836(thout options, the name and v).4 F .835(alue of each shell v)-.25 F
+.835(ariable are displayed in a format that can be)-.25 F .784
+(reused as input for setting or resetting the currently-set v)144 667.2
+R 3.284(ariables. Read-only)-.25 F -.25(va)3.284 G .784
+(riables cannot be).25 F 2.947(reset. In)144 679.2 R F2 .447(posix mode)
+2.947 F F0 2.947(,o)C .447(nly shell v)-2.947 F .447
+(ariables are listed.)-.25 F .447
+(The output is sorted according to the current)5.447 F 3.53
+(locale. When)144 691.2 R 1.031(options are speci\214ed, the)3.53 F
+3.531(ys)-.15 G 1.031(et or unset shell attrib)-3.531 F 3.531(utes. An)
+-.2 F 3.531(ya)-.15 G -.18(rg)-3.531 G 1.031(uments remaining).18 F
+1.624(after option processing are treated as v)144 703.2 R 1.623
+(alues for the positional parameters and are assigned, in)-.25 F(order)
+144 715.2 Q 2.5(,t)-.4 G(o)-2.5 E F1($1)2.5 E F0(,)A F1($2)2.5 E F0(,)A
+F1 2.5(... $)2.5 F F2(n)A F0 5(.O)C(ptions, if speci\214ed, ha)-5 E .3
+-.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E(GNU Bash-4.1)72 768
+Q(2009 December 29)135.965 E(60)185.955 E 0 Cg EP
+%%Page: 61 61
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF<ad61>144 84 Q F0 .539(Automatically mark v)
+29.3 F .539
+(ariables and functions which are modi\214ed or created for e)-.25 F .54
+(xport to)-.15 F(the en)184 96 Q(vironment of subsequent commands.)-.4 E
+F1<ad62>144 108 Q F0 .132
+(Report the status of terminated background jobs immediately)28.74 F
+2.632(,r)-.65 G .131(ather than before the ne)-2.632 F(xt)-.15 E
+(primary prompt.)184 120 Q(This is ef)5 E(fecti)-.25 E .3 -.15(ve o)-.25
+H(nly when job control is enabled.).15 E F1<ad65>144 132 Q F0 .51
+(Exit immediately if a)29.86 F/F2 10/Times-Italic@0 SF(pipeline)3.01 E
+F0 .511(\(which may consist of a single)3.011 F F2 .511(simple command)
+3.011 F F0 3.011(\), a)B F2(sub-)3.011 E(shell)184 144 Q F0 .872
+(command enclosed in parentheses, or one of the commands e)3.373 F -.15
+(xe)-.15 G .872(cuted as part of a).15 F .399
+(command list enclosed by braces \(see)184 156 R/F3 9/Times-Bold@0 SF
+.399(SHELL GRAMMAR)2.899 F F0(abo)2.649 E -.15(ve)-.15 G 2.899(\)e).15 G
+.399(xits with a non-zero)-3.049 F 3.969(status. The)184 168 R 1.468
+(shell does not e)3.969 F 1.468(xit if the command that f)-.15 F 1.468
+(ails is part of the command list)-.1 F .569(immediately follo)184 180 R
+.569(wing a)-.25 F F1(while)3.069 E F0(or)3.069 E F1(until)3.069 E F0
+-.1(ke)3.069 G(yw)-.05 E .569(ord, part of the test follo)-.1 F .57
+(wing the)-.25 F F1(if)3.07 E F0(or)3.07 E F1(elif)3.07 E F0(reserv)184
+192 Q .544(ed w)-.15 F .544(ords, part of an)-.1 F 3.044(yc)-.15 G .544
+(ommand e)-3.044 F -.15(xe)-.15 G .544(cuted in a).15 F F1(&&)3.044 E F0
+(or)3.044 E/F4 10/Symbol SF<efef>3.044 E F0 .544(list e)3.044 F .544
+(xcept the command)-.15 F(follo)184 204 Q 1.23(wing the \214nal)-.25 F
+F1(&&)3.73 E F0(or)3.73 E F4<efef>3.73 E F0 3.73(,a)C 1.53 -.15(ny c)
+-3.73 H 1.231(ommand in a pipeline b).15 F 1.231
+(ut the last, or if the com-)-.2 F(mand')184 216 Q 3.191(sr)-.55 G .691
+(eturn v)-3.191 F .691(alue is being in)-.25 F -.15(ve)-.4 G .691
+(rted with).15 F F1(!)3.191 E F0 5.691(.A)C .691(trap on)-2.5 F F1(ERR)
+3.19 E F0 3.19(,i)C 3.19(fs)-3.19 G .69(et, is e)-3.19 F -.15(xe)-.15 G
+.69(cuted before).15 F .686(the shell e)184 228 R 3.186(xits. This)-.15
+F .686(option applies to the shell en)3.186 F .686
+(vironment and each subshell en)-.4 F(viron-)-.4 E .068
+(ment separately \(see)184 240 R F3 .068(COMMAND EXECUTION ENVIR)2.568 F
+(ONMENT)-.27 E F0(abo)2.318 E -.15(ve)-.15 G .068(\), and may cause).15
+F(subshells to e)184 252 Q(xit before e)-.15 E -.15(xe)-.15 G
+(cuting all the commands in the subshell.).15 E F1<ad66>144 264 Q F0
+(Disable pathname e)30.97 E(xpansion.)-.15 E F1<ad68>144 276 Q F0 2.238
+(Remember the location of commands as the)28.74 F 4.738(ya)-.15 G 2.239
+(re look)-4.738 F 2.239(ed up for e)-.1 F -.15(xe)-.15 G 4.739
+(cution. This).15 F(is)4.739 E(enabled by def)184 288 Q(ault.)-.1 E F1
+<ad6b>144 300 Q F0 .514(All ar)28.74 F .514
+(guments in the form of assignment statements are placed in the en)-.18
+F .513(vironment for a)-.4 F
+(command, not just those that precede the command name.)184 312 Q F1
+<ad6d>144 324 Q F0 .148(Monitor mode.)25.97 F .148
+(Job control is enabled.)5.148 F .149(This option is on by def)5.148 F
+.149(ault for interacti)-.1 F .449 -.15(ve s)-.25 H(hells).15 E .637
+(on systems that support it \(see)184 336 R F3 .636(JOB CONTR)3.136 F
+(OL)-.27 E F0(abo)2.886 E -.15(ve)-.15 G 3.136(\). Background).15 F .636
+(processes run in a)3.136 F .641
+(separate process group and a line containing their e)184 348 R .642
+(xit status is printed upon their com-)-.15 F(pletion.)184 360 Q F1
+<ad6e>144 372 Q F0 .653(Read commands b)28.74 F .653(ut do not e)-.2 F
+-.15(xe)-.15 G .653(cute them.).15 F .652
+(This may be used to check a shell script for)5.653 F(syntax errors.)184
+384 Q(This is ignored by interacti)5 E .3 -.15(ve s)-.25 H(hells.).15 E
+F1<ad6f>144 396 Q F2(option\255name)2.5 E F0(The)184 408 Q F2
+(option\255name)2.5 E F0(can be one of the follo)2.5 E(wing:)-.25 E F1
+(allexport)184 420 Q F0(Same as)224 432 Q F1<ad61>2.5 E F0(.)A F1
+(braceexpand)184 444 Q F0(Same as)224 456 Q F1<ad42>2.5 E F0(.)A F1
+(emacs)184 468 Q F0 .089(Use an emacs-style command line editing interf)
+13.9 F 2.589(ace. This)-.1 F .089(is enabled by def)2.589 F(ault)-.1 E
+.95(when the shell is interacti)224 480 R -.15(ve)-.25 G 3.45(,u).15 G
+.95(nless the shell is started with the)-3.45 F F1(\255\255noediting)
+3.45 E F0 2.5(option. This)224 492 R(also af)2.5 E
+(fects the editing interf)-.25 E(ace used for)-.1 E F1 -.18(re)2.5 G
+(ad \255e).18 E F0(.)A F1(err)184 504 Q(exit)-.18 E F0(Same as)11.31 E
+F1<ad65>2.5 E F0(.)A F1(errtrace)184 516 Q F0(Same as)5.03 E F1<ad45>2.5
+E F0(.)A F1(functrace)184 528 Q F0(Same as)224 540 Q F1<ad54>2.5 E F0(.)
+A F1(hashall)184 552 Q F0(Same as)9.43 E F1<ad68>2.5 E F0(.)A F1
+(histexpand)184 564 Q F0(Same as)224 576 Q F1<ad48>2.5 E F0(.)A F1
+(history)184 588 Q F0 .586(Enable command history)10 F 3.087(,a)-.65 G
+3.087(sd)-3.087 G .587(escribed abo)-3.087 F .887 -.15(ve u)-.15 H(nder)
+.15 E F3(HIST)3.087 E(OR)-.162 E(Y)-.315 E/F5 9/Times-Roman@0 SF(.)A F0
+.587(This option is)5.087 F(on by def)224 600 Q(ault in interacti)-.1 E
+.3 -.15(ve s)-.25 H(hells.).15 E F1(ignor)184 612 Q(eeof)-.18 E F0 1.657
+(The ef)224 624 R 1.657(fect is as if the shell command)-.25 F/F6 10
+/Courier@0 SF(IGNOREEOF=10)4.156 E F0 1.656(had been e)4.156 F -.15(xe)
+-.15 G(cuted).15 E(\(see)224 636 Q F1(Shell V)2.5 E(ariables)-.92 E F0
+(abo)2.5 E -.15(ve)-.15 G(\).).15 E F1 -.1(ke)184 648 S(yw).1 E(ord)-.1
+E F0(Same as)224 660 Q F1<ad6b>2.5 E F0(.)A F1(monitor)184 672 Q F0
+(Same as)5.56 E F1<ad6d>2.5 E F0(.)A F1(noclob)184 684 Q(ber)-.1 E F0
+(Same as)224 696 Q F1<ad43>2.5 E F0(.)A F1(noexec)184 708 Q F0(Same as)
+11.12 E F1<ad6e>2.5 E F0(.)A(GNU Bash-4.1)72 768 Q(2009 December 29)
+135.965 E(61)185.955 E 0 Cg EP
+%%Page: 62 62
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(noglob)184 84 Q F0(Same as)11.1 E F1<ad66>
+2.5 E F0(.)A F1(nolog)184 96 Q F0(Currently ignored.)16.66 E F1(notify)
+184 108 Q F0(Same as)15 E F1<ad62>2.5 E F0(.)A F1(nounset)184 120 Q F0
+(Same as)6.66 E F1<ad75>2.5 E F0(.)A F1(onecmd)184 132 Q F0(Same as)6.67
+E F1<ad74>2.5 E F0(.)A F1(ph)184 144 Q(ysical)-.15 E F0(Same as)5.14 E
+F1<ad50>2.5 E F0(.)A F1(pipefail)184 156 Q F0 1.029
+(If set, the return v)7.77 F 1.029(alue of a pipeline is the v)-.25 F
+1.03(alue of the last \(rightmost\) com-)-.25 F 1.137(mand to e)224 168
+R 1.136
+(xit with a non-zero status, or zero if all commands in the pipeline)
+-.15 F -.15(ex)224 180 S(it successfully).15 E 5(.T)-.65 G
+(his option is disabled by def)-5 E(ault.)-.1 E F1(posix)184 192 Q F0
+2.09(Change the beha)17.77 F 2.091(vior of)-.2 F F1(bash)4.591 E F0
+2.091(where the def)4.591 F 2.091(ault operation dif)-.1 F 2.091
+(fers from the)-.25 F(POSIX standard to match the standard \()224 204 Q
+/F2 10/Times-Italic@0 SF(posix mode)A F0(\).)A F1(pri)184 216 Q(vileged)
+-.1 E F0(Same as)224 228 Q F1<ad70>2.5 E F0(.)A F1 -.1(ve)184 240 S
+(rbose).1 E F0(Same as)7.33 E F1<ad76>2.5 E F0(.)A F1(vi)184 252 Q F0
+1.466(Use a vi-style command line editing interf)32.22 F 3.965
+(ace. This)-.1 F 1.465(also af)3.965 F 1.465(fects the editing)-.25 F
+(interf)224 264 Q(ace used for)-.1 E F1 -.18(re)2.5 G(ad \255e).18 E F0
+(.)A F1(xtrace)184 276 Q F0(Same as)13.35 E F1<ad78>2.5 E F0(.)A(If)184
+294 Q F1<ad6f>3.052 E F0 .552(is supplied with no)3.052 F F2
+(option\255name)3.053 E F0 3.053(,t)C .553(he v)-3.053 F .553
+(alues of the current options are printed.)-.25 F(If)5.553 E F1(+o)184
+306 Q F0 1.072(is supplied with no)3.572 F F2(option\255name)3.572 E F0
+3.572(,a)C 1.071(series of)-.001 F F1(set)3.571 E F0 1.071
+(commands to recreate the current)3.571 F
+(option settings is displayed on the standard output.)184 318 Q F1<ad70>
+144 330 Q F0 -.45(Tu)28.74 G 1.071(rn on).45 F F2(privile)4.821 E -.1
+(ge)-.4 G(d).1 E F0 3.572(mode. In)4.341 F 1.072(this mode, the)3.572 F
+/F3 9/Times-Bold@0 SF($ENV)3.572 E F0(and)3.322 E F3($B)3.572 E(ASH_ENV)
+-.27 E F0 1.072(\214les are not pro-)3.322 F 1.501
+(cessed, shell functions are not inherited from the en)184 342 R 1.5
+(vironment, and the)-.4 F F3(SHELLOPTS)4 E/F4 9/Times-Roman@0 SF(,)A F3
+-.27(BA)184 354 S(SHOPTS).27 E F4(,)A F3(CDP)2.774 E -.855(AT)-.666 G(H)
+.855 E F4(,)A F0(and)2.774 E F3(GLOBIGNORE)3.024 E F0 -.25(va)2.774 G
+.524(riables, if the).25 F 3.025(ya)-.15 G .525(ppear in the en)-3.025 F
+(vironment,)-.4 E .38(are ignored.)184 366 R .38
+(If the shell is started with the ef)5.38 F(fecti)-.25 E .679 -.15(ve u)
+-.25 H .379(ser \(group\) id not equal to the real).15 F .461
+(user \(group\) id, and the)184 378 R F1<ad70>2.961 E F0 .461
+(option is not supplied, these actions are tak)2.961 F .462
+(en and the ef)-.1 F(fec-)-.25 E(ti)184 390 Q .695 -.15(ve u)-.25 H .395
+(ser id is set to the real user id.).15 F .395(If the)5.395 F F1<ad70>
+2.895 E F0 .394(option is supplied at startup, the ef)2.895 F(fecti)-.25
+E -.15(ve)-.25 G .386(user id is not reset.)184 402 R -.45(Tu)5.386 G
+.386(rning this option of).45 F 2.886(fc)-.25 G .387(auses the ef)-2.886
+F(fecti)-.25 E .687 -.15(ve u)-.25 H .387(ser and group ids to be).15 F
+(set to the real user and group ids.)184 414 Q F1<ad74>144 426 Q F0
+(Exit after reading and e)30.97 E -.15(xe)-.15 G(cuting one command.).15
+E F1<ad75>144 438 Q F0 -.35(Tr)28.74 G .044(eat unset v).35 F .044(aria\
+bles and parameters other than the special parameters "@" and "*" as an)
+-.25 F .182(error when performing parameter e)184 450 R 2.682
+(xpansion. If)-.15 F -.15(ex)2.682 G .183
+(pansion is attempted on an unset v).15 F(ari-)-.25 E .746
+(able or parameter)184 462 R 3.246(,t)-.4 G .746
+(he shell prints an error message, and, if not interacti)-3.246 F -.15
+(ve)-.25 G 3.246(,e).15 G .746(xits with a)-3.396 F(non-zero status.)184
+474 Q F1<ad76>144 486 Q F0(Print shell input lines as the)29.3 E 2.5(ya)
+-.15 G(re read.)-2.5 E F1<ad78>144 498 Q F0 .315(After e)29.3 F .315
+(xpanding each)-.15 F F2 .315(simple command)2.815 F F0(,)A F1 -.25(fo)
+2.815 G(r).25 E F0(command,)2.815 E F1(case)2.815 E F0(command,)2.815 E
+F1(select)2.815 E F0(command,)2.815 E 1.236(or arithmetic)184 510 R F1
+-.25(fo)3.736 G(r).25 E F0 1.236(command, display the e)3.736 F 1.236
+(xpanded v)-.15 F 1.236(alue of)-.25 F F3(PS4)3.736 E F4(,)A F0(follo)
+3.486 E 1.236(wed by the com-)-.25 F(mand and its e)184 522 Q
+(xpanded ar)-.15 E(guments or associated w)-.18 E(ord list.)-.1 E F1
+<ad42>144 534 Q F0 2.578(The shell performs brace e)27.63 F 2.578
+(xpansion \(see)-.15 F F1 2.578(Brace Expansion)5.078 F F0(abo)5.078 E
+-.15(ve)-.15 G 5.079(\). This).15 F 2.579(is on by)5.079 F(def)184 546 Q
+(ault.)-.1 E F1<ad43>144 558 Q F0 .214(If set,)27.08 F F1(bash)2.714 E
+F0 .214(does not o)2.714 F -.15(ve)-.15 G .214(rwrite an e).15 F .214
+(xisting \214le with the)-.15 F F1(>)2.714 E F0(,)A F1(>&)2.714 E F0
+2.713(,a)C(nd)-2.713 E F1(<>)2.713 E F0 .213(redirection opera-)2.713 F
+3.053(tors. This)184 570 R .553(may be o)3.053 F -.15(ve)-.15 G .553
+(rridden when creating output \214les by using the redirection opera-)
+.15 F(tor)184 582 Q F1(>|)2.5 E F0(instead of)2.5 E F1(>)2.5 E F0(.)A F1
+<ad45>144 594 Q F0 .104(If set, an)27.63 F 2.604(yt)-.15 G .104(rap on)
+-2.604 F F1(ERR)2.604 E F0 .103
+(is inherited by shell functions, command substitutions, and com-)2.604
+F .838(mands e)184 606 R -.15(xe)-.15 G .838(cuted in a subshell en).15
+F 3.338(vironment. The)-.4 F F1(ERR)3.338 E F0 .839
+(trap is normally not inherited in)3.339 F(such cases.)184 618 Q F1
+<ad48>144 630 Q F0(Enable)26.52 E F1(!)3.032 E F0 .532
+(style history substitution.)5.532 F .531(This option is on by def)5.532
+F .531(ault when the shell is inter)-.1 F(-)-.2 E(acti)184 642 Q -.15
+(ve)-.25 G(.).15 E F1<ad50>144 654 Q F0 1.164
+(If set, the shell does not follo)28.19 F 3.664(ws)-.25 G 1.164
+(ymbolic links when e)-3.664 F -.15(xe)-.15 G 1.165
+(cuting commands such as).15 F F1(cd)3.665 E F0 2.822
+(that change the current w)184 666 R 2.822(orking directory)-.1 F 7.822
+(.I)-.65 G 5.322(tu)-7.822 G 2.822(ses the ph)-5.322 F 2.821
+(ysical directory structure)-.05 F 2.685(instead. By)184 678 R(def)2.685
+E(ault,)-.1 E F1(bash)2.686 E F0(follo)2.686 E .186
+(ws the logical chain of directories when performing com-)-.25 F
+(mands which change the current directory)184 690 Q(.)-.65 E F1<ad54>144
+702 Q F0 .89(If set, an)27.63 F 3.39(yt)-.15 G .89(raps on)-3.39 F F1
+(DEB)3.39 E(UG)-.1 E F0(and)3.39 E F1(RETURN)3.39 E F0 .89
+(are inherited by shell functions, command)3.39 F 1.932
+(substitutions, and commands e)184 714 R -.15(xe)-.15 G 1.932
+(cuted in a subshell en).15 F 4.432(vironment. The)-.4 F F1(DEB)4.432 E
+(UG)-.1 E F0(and)4.432 E F1(RETURN)184 726 Q F0
+(traps are normally not inherited in such cases.)2.5 E(GNU Bash-4.1)72
+768 Q(2009 December 29)135.965 E(62)185.955 E 0 Cg EP
+%%Page: 63 63
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF<adad>144 84 Q F0 .401(If no ar)28.6 F .401
+(guments follo)-.18 F 2.901(wt)-.25 G .401
+(his option, then the positional parameters are unset.)-2.901 F
+(Otherwise,)5.4 E(the positional parameters are set to the)184 96 Q/F2
+10/Times-Italic@0 SF(ar)2.5 E(g)-.37 E F0(s, e)A -.15(ve)-.25 G 2.5(ni)
+.15 G 2.5(fs)-2.5 G(ome of them be)-2.5 E(gin with a)-.15 E F1<ad>2.5 E
+F0(.)A F1<ad>144 108 Q F0 1.944
+(Signal the end of options, cause all remaining)34.3 F F2(ar)4.444 E(g)
+-.37 E F0 4.444(st)C 4.444(ob)-4.444 G 4.445(ea)-4.444 G 1.945
+(ssigned to the positional)-4.445 F 3.446(parameters. The)184 120 R F1
+<ad78>3.446 E F0(and)3.446 E F1<ad76>3.446 E F0 .945
+(options are turned of)3.446 F 3.445(f. If)-.25 F .945(there are no)
+3.445 F F2(ar)3.445 E(g)-.37 E F0 .945(s, the positional)B
+(parameters remain unchanged.)184 132 Q .425(The options are of)144
+148.8 R 2.925(fb)-.25 G 2.925(yd)-2.925 G(ef)-2.925 E .425
+(ault unless otherwise noted.)-.1 F .425
+(Using + rather than \255 causes these options)5.425 F .178
+(to be turned of)144 160.8 R 2.678(f. The)-.25 F .178
+(options can also be speci\214ed as ar)2.678 F .178(guments to an in)
+-.18 F -.2(vo)-.4 G .177(cation of the shell.).2 F(The)5.177 E .066
+(current set of options may be found in)144 172.8 R F1<24ad>2.566 E F0
+5.066(.T)C .066(he return status is al)-5.066 F -.1(wa)-.1 G .066
+(ys true unless an in).1 F -.25(va)-.4 G .067(lid option).25 F
+(is encountered.)144 184.8 Q F1(shift)108 201.6 Q F0([)2.5 E F2(n)A F0
+(])A .429(The positional parameters from)144 213.6 R F2(n)2.929 E F0
+.429(+1 ... are renamed to)B F1 .429($1 ....)2.929 F F0 -.15(Pa)5.428 G
+.428(rameters represented by the num-).15 F(bers)144 225.6 Q F1($#)2.582
+E F0(do)2.582 E .082(wn to)-.25 F F1($#)2.582 E F0<ad>A F2(n)A F0 .082
+(+1 are unset.)B F2(n)5.442 E F0 .082(must be a non-ne)2.822 F -.05(ga)
+-.15 G(ti).05 E .383 -.15(ve n)-.25 H .083(umber less than or equal to)
+.15 F F1($#)2.583 E F0 5.083(.I)C(f)-5.083 E F2(n)2.943 E F0 .06
+(is 0, no parameters are changed.)144 237.6 R(If)5.06 E F2(n)2.92 E F0
+.06(is not gi)2.8 F -.15(ve)-.25 G .06(n, it is assumed to be 1.).15 F
+(If)5.06 E F2(n)2.92 E F0 .06(is greater than)2.8 F F1($#)2.56 E F0 2.56
+(,t)C(he)-2.56 E .143(positional parameters are not changed.)144 249.6 R
+.144(The return status is greater than zero if)5.143 F F2(n)3.004 E F0
+.144(is greater than)2.884 F F1($#)2.644 E F0
+(or less than zero; otherwise 0.)144 261.6 Q F1(shopt)108 278.4 Q F0([)
+2.5 E F1(\255pqsu)A F0 2.5(][)C F1<ad6f>-2.5 E F0 2.5(][)C F2(optname)
+-2.5 E F0(...])2.5 E -.8(To)144 290.4 S .222(ggle the v).8 F .222
+(alues of v)-.25 F .222(ariables controlling optional shell beha)-.25 F
+(vior)-.2 E 5.222(.W)-.55 G .222(ith no options, or with the)-5.622 F F1
+<ad70>2.722 E F0 .721(option, a list of all settable options is display\
+ed, with an indication of whether or not each is set.)144 302.4 R(The)
+144 314.4 Q F1<ad70>2.828 E F0 .327(option causes output to be displaye\
+d in a form that may be reused as input.)2.828 F .327(Other options)
+5.327 F(ha)144 326.4 Q .3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:)
+-.25 E F1<ad73>144 338.4 Q F0(Enable \(set\) each)26.41 E F2(optname)2.5
+E F0(.)A F1<ad75>144 350.4 Q F0(Disable \(unset\) each)24.74 E F2
+(optname)2.5 E F0(.)A F1<ad71>144 362.4 Q F0 .003(Suppresses normal out\
+put \(quiet mode\); the return status indicates whether the)24.74 F F2
+(optname)2.504 E F0(is)2.504 E .256(set or unset.)180 374.4 R .256
+(If multiple)5.256 F F2(optname)2.756 E F0(ar)2.756 E .256
+(guments are gi)-.18 F -.15(ve)-.25 G 2.756(nw).15 G(ith)-2.756 E F1
+<ad71>2.756 E F0 2.755(,t)C .255(he return status is zero if)-2.755 F
+(all)180 386.4 Q F2(optnames)2.5 E F0(are enabled; non-zero otherwise.)
+2.5 E F1<ad6f>144 398.4 Q F0(Restricts the v)25.3 E(alues of)-.25 E F2
+(optname)2.5 E F0(to be those de\214ned for the)2.5 E F1<ad6f>2.5 E F0
+(option to the)2.5 E F1(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E .127
+(If either)144 415.2 R F1<ad73>2.627 E F0(or)2.627 E F1<ad75>2.627 E F0
+.127(is used with no)2.627 F F2(optname)2.627 E F0(ar)2.627 E .127
+(guments, the display is limited to those options which)-.18 F 1.024
+(are set or unset, respecti)144 427.2 R -.15(ve)-.25 G(ly).15 E 6.024
+(.U)-.65 G 1.024(nless otherwise noted, the)-6.024 F F1(shopt)3.523 E F0
+1.023(options are disabled \(unset\) by)3.523 F(def)144 439.2 Q(ault.)
+-.1 E 1.544(The return status when listing options is zero if all)144
+456 R F2(optnames)4.044 E F0 1.545(are enabled, non-zero otherwise.)
+4.045 F .696
+(When setting or unsetting options, the return status is zero unless an)
+144 468 R F2(optname)3.196 E F0 .696(is not a v)3.196 F .695(alid shell)
+-.25 F(option.)144 480 Q(The list of)144 496.8 Q F1(shopt)2.5 E F0
+(options is:)2.5 E F1(autocd)144 514.8 Q F0 .199
+(If set, a command name that is the name of a directory is e)11.11 F
+-.15(xe)-.15 G .2(cuted as if it were the ar).15 F(gu-)-.18 E
+(ment to the)184 526.8 Q F1(cd)2.5 E F0 2.5(command. This)2.5 F
+(option is only used by interacti)2.5 E .3 -.15(ve s)-.25 H(hells.).15 E
+F1(cdable_v)144 538.8 Q(ars)-.1 E F0 .156(If set, an ar)184 550.8 R .156
+(gument to the)-.18 F F1(cd)2.656 E F0 -.2(bu)2.656 G .155
+(iltin command that is not a directory is assumed to be the).2 F
+(name of a v)184 562.8 Q(ariable whose v)-.25 E
+(alue is the directory to change to.)-.25 E F1(cdspell)144 574.8 Q F0
+1.055
+(If set, minor errors in the spelling of a directory component in a)
+10.55 F F1(cd)3.555 E F0 1.055(command will be)3.555 F 3.988
+(corrected. The)184 586.8 R 1.488(errors check)3.988 F 1.487
+(ed for are transposed characters, a missing character)-.1 F 3.987(,a)
+-.4 G(nd)-3.987 E .552(one character too man)184 598.8 R 4.352 -.65
+(y. I)-.15 H 3.052(fac).65 G .552
+(orrection is found, the corrected \214le name is printed, and)-3.052 F
+(the command proceeds.)184 610.8 Q
+(This option is only used by interacti)5 E .3 -.15(ve s)-.25 H(hells.)
+.15 E F1(checkhash)144 622.8 Q F0 2.08(If set,)184 634.8 R F1(bash)4.58
+E F0 2.079(checks that a command found in the hash table e)4.58 F 2.079
+(xists before trying to)-.15 F -.15(exe)184 646.8 S(cute it.).15 E
+(If a hashed command no longer e)5 E
+(xists, a normal path search is performed.)-.15 E F1(checkjobs)144 658.8
+Q F0 .448(If set,)184 670.8 R F1(bash)2.948 E F0 .448
+(lists the status of an)2.948 F 2.949(ys)-.15 G .449
+(topped and running jobs before e)-2.949 F .449(xiting an interacti)-.15
+F -.15(ve)-.25 G 3.439(shell. If)184 682.8 R(an)3.439 E 3.439(yj)-.15 G
+.938(obs are running, this causes the e)-3.439 F .938
+(xit to be deferred until a second e)-.15 F .938(xit is)-.15 F 2.203
+(attempted without an interv)184 694.8 R 2.203(ening command \(see)-.15
+F/F3 9/Times-Bold@0 SF 2.203(JOB CONTR)4.703 F(OL)-.27 E F0(abo)4.453 E
+-.15(ve)-.15 G 4.703(\). The).15 F(shell)4.704 E(al)184 706.8 Q -.1(wa)
+-.1 G(ys postpones e).1 E(xiting if an)-.15 E 2.5(yj)-.15 G
+(obs are stopped.)-2.5 E(GNU Bash-4.1)72 768 Q(2009 December 29)135.965
+E(63)185.955 E 0 Cg EP
+%%Page: 64 64
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(checkwinsize)144 84 Q F0 .797(If set,)184
+96 R F1(bash)3.297 E F0 .797(checks the windo)3.297 F 3.297(ws)-.25 G
+.796(ize after each command and, if necessary)-3.297 F 3.296(,u)-.65 G
+.796(pdates the)-3.296 F -.25(va)184 108 S(lues of).25 E/F2 9
+/Times-Bold@0 SF(LINES)2.5 E F0(and)2.25 E F2(COLUMNS)2.5 E/F3 9
+/Times-Roman@0 SF(.)A F1(cmdhist)144 120 Q F0 1.202(If set,)6.11 F F1
+(bash)3.702 E F0 1.202(attempts to sa)3.702 F 1.502 -.15(ve a)-.2 H
+1.202(ll lines of a multiple-line command in the same history).15 F
+(entry)184 132 Q 5(.T)-.65 G(his allo)-5 E
+(ws easy re-editing of multi-line commands.)-.25 E F1(compat31)144 144 Q
+F0 .42(If set,)184 156 R F1(bash)2.92 E F0 .42(changes its beha)2.92 F
+.419(vior to that of v)-.2 F .419(ersion 3.1 with respect to quoted ar)
+-.15 F(guments)-.18 E(to the conditional command')184 168 Q 2.5(s=)-.55
+G 2.5(~o)-2.5 G(perator)-2.5 E(.)-.55 E F1(compat32)144 180 Q F0 1.409
+(If set,)184 192 R F1(bash)3.909 E F0 1.409(changes its beha)3.909 F
+1.409(vior to that of v)-.2 F 1.41
+(ersion 3.2 with respect to locale-speci\214c)-.15 F
+(string comparison when using the conditional command')184 204 Q 2.5
+(s<a)-.55 G(nd > operators.)-2.5 E F1(compat40)144 216 Q F0 1.41
+(If set,)184 228 R F1(bash)3.91 E F0 1.41(changes its beha)3.91 F 1.409
+(vior to that of v)-.2 F 1.409
+(ersion 4.0 with respect to locale-speci\214c)-.15 F 1.692
+(string comparison when using the conditional command')184 240 R 4.193
+(s<a)-.55 G 1.693(nd > operators and the)-4.193 F(ef)184 252 Q
+(fect of interrupting a command list.)-.25 E F1(dirspell)144 264 Q F0
+.859(If set,)7.77 F F1(bash)3.359 E F0 .858
+(attempts spelling correction on directory names during w)3.359 F .858
+(ord completion if)-.1 F
+(the directory name initially supplied does not e)184 276 Q(xist.)-.15 E
+F1(dotglob)144 288 Q F0 .165(If set,)7.77 F F1(bash)2.665 E F0 .165
+(includes \214lenames be)2.665 F .165(ginning with a `.)-.15 F 2.665('i)
+-.7 G 2.665(nt)-2.665 G .165(he results of pathname e)-2.665 F
+(xpansion.)-.15 E F1(execfail)144 300 Q F0 1.387
+(If set, a non-interacti)7.79 F 1.687 -.15(ve s)-.25 H 1.386
+(hell will not e).15 F 1.386(xit if it cannot e)-.15 F -.15(xe)-.15 G
+1.386(cute the \214le speci\214ed as an).15 F(ar)184 312 Q
+(gument to the)-.18 E F1(exec)2.5 E F0 -.2(bu)2.5 G(iltin command.).2 E
+(An interacti)5 E .3 -.15(ve s)-.25 H(hell does not e).15 E(xit if)-.15
+E F1(exec)2.5 E F0 -.1(fa)2.5 G(ils.).1 E F1(expand_aliases)144 324 Q F0
+.716(If set, aliases are e)184 336 R .717(xpanded as described abo)-.15
+F 1.017 -.15(ve u)-.15 H(nder).15 E F2(ALIASES)3.217 E F3(.)A F0 .717
+(This option is enabled)5.217 F(by def)184 348 Q(ault for interacti)-.1
+E .3 -.15(ve s)-.25 H(hells.).15 E F1(extdeb)144 360 Q(ug)-.2 E F0
+(If set, beha)184 372 Q(vior intended for use by deb)-.2 E
+(uggers is enabled:)-.2 E F1(1.)184 384 Q F0(The)28.5 E F1<ad46>4.251 E
+F0 1.751(option to the)4.251 F F1(declar)4.251 E(e)-.18 E F0 -.2(bu)
+4.251 G 1.751(iltin displays the source \214le name and line).2 F
+(number corresponding to each function name supplied as an ar)220 396 Q
+(gument.)-.18 E F1(2.)184 408 Q F0 1.667(If the command run by the)28.5
+F F1(DEB)4.167 E(UG)-.1 E F0 1.667(trap returns a non-zero v)4.167 F
+1.667(alue, the ne)-.25 F(xt)-.15 E(command is skipped and not e)220 420
+Q -.15(xe)-.15 G(cuted.).15 E F1(3.)184 432 Q F0 .841
+(If the command run by the)28.5 F F1(DEB)3.341 E(UG)-.1 E F0 .841
+(trap returns a v)3.341 F .84(alue of 2, and the shell is)-.25 F -.15
+(exe)220 444 S .488
+(cuting in a subroutine \(a shell function or a shell script e).15 F
+-.15(xe)-.15 G .488(cuted by the).15 F F1(.)2.988 E F0(or)2.988 E F1
+(sour)220 456 Q(ce)-.18 E F0 -.2(bu)2.5 G(iltins\), a call to).2 E F1
+-.18(re)2.5 G(tur).18 E(n)-.15 E F0(is simulated.)2.5 E F1(4.)184 468 Q
+F2 -.27(BA)28.5 G(SH_ARGC).27 E F0(and)3.154 E F2 -.27(BA)3.404 G
+(SH_ARGV).27 E F0 .904(are updated as described in their descriptions)
+3.154 F(abo)220 480 Q -.15(ve)-.15 G(.).15 E F1(5.)184 492 Q F0 1.359
+(Function tracing is enabled:)28.5 F 1.359
+(command substitution, shell functions, and sub-)6.359 F(shells in)220
+504 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith)-2.5 E F1(\()2.5 E/F4 10
+/Times-Italic@0 SF(command)2.5 E F1(\))2.5 E F0(inherit the)2.5 E F1
+(DEB)2.5 E(UG)-.1 E F0(and)2.5 E F1(RETURN)2.5 E F0(traps.)2.5 E F1(6.)
+184 516 Q F0 .805(Error tracing is enabled:)28.5 F .804
+(command substitution, shell functions, and subshells)5.805 F(in)220 528
+Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith)-2.5 E F1(\()2.5 E F4
+(command)2.5 E F1(\))2.5 E F0(inherit the)2.5 E F1(ERR)2.5 E(OR)-.3 E F0
+(trap.)2.5 E F1(extglob)144 540 Q F0 .4(If set, the e)8.89 F .4
+(xtended pattern matching features described abo)-.15 F .7 -.15(ve u)
+-.15 H(nder).15 E F1 -.1(Pa)2.9 G .4(thname Expan-).1 F(sion)184 552 Q
+F0(are enabled.)2.5 E F1(extquote)144 564 Q F0 2.473(If set,)184 576 R
+F1($)4.973 E F0<08>A F4(string)A F0 4.973<0861>C(nd)-4.973 E F1($)4.973
+E F0(")A F4(string)A F0 4.973("q)C 2.473(uoting is performed within)
+-4.973 F F1(${)4.973 E F4(par)A(ameter)-.15 E F1(})A F0 -.15(ex)4.973 G
+(pansions).15 E(enclosed in double quotes.)184 588 Q
+(This option is enabled by def)5 E(ault.)-.1 E F1(failglob)144 600 Q F0
+1.424(If set, patterns which f)7.77 F 1.425
+(ail to match \214lenames during pathname e)-.1 F 1.425
+(xpansion result in an)-.15 F -.15(ex)184 612 S(pansion error).15 E(.)
+-.55 E F1 -.25(fo)144 624 S -.18(rc).25 G(e_\214gnor).18 E(e)-.18 E F0
+.937(If set, the suf)184 636 R<8c78>-.25 E .936(es speci\214ed by the)
+-.15 F F2(FIGNORE)3.436 E F0 .936(shell v)3.186 F .936(ariable cause w)
+-.25 F .936(ords to be ignored)-.1 F .32(when performing w)184 648 R .32
+(ord completion e)-.1 F -.15(ve)-.25 G 2.82(ni).15 G 2.82(ft)-2.82 G .32
+(he ignored w)-2.82 F .32(ords are the only possible com-)-.1 F 2.948
+(pletions. See)184 660 R F2 .448(SHELL V)2.948 F(ARIABLES)-1.215 E F0
+(abo)2.698 E .748 -.15(ve f)-.15 H .448(or a description of).15 F F2
+(FIGNORE)2.947 E F3(.)A F0 .447(This option is)4.947 F(enabled by def)
+184 672 Q(ault.)-.1 E F1(globstar)144 684 Q F0 .178(If set, the pattern)
+5 F F1(**)2.678 E F0 .178(used in a pathname e)2.678 F .178
+(xpansion conte)-.15 F .179(xt will match a \214les and zero or)-.15 F
+1.298(more directories and subdirectories.)184 696 R 1.298
+(If the pattern is follo)6.298 F 1.298(wed by a)-.25 F F1(/)3.797 E F0
+3.797(,o)C 1.297(nly directories)-3.797 F(and subdirectories match.)184
+708 Q(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(64)185.955 E 0 Cg
+EP
+%%Page: 65 65
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(gnu_errfmt)144 84 Q F0(If set, shell error\
+ messages are written in the standard GNU error message format.)184 96 Q
+F1(histappend)144 108 Q F0 .676
+(If set, the history list is appended to the \214le named by the v)184
+120 R .676(alue of the)-.25 F/F2 9/Times-Bold@0 SF(HISTFILE)3.177 E F0
+-.25(va)2.927 G(ri-).25 E(able when the shell e)184 132 Q
+(xits, rather than o)-.15 E -.15(ve)-.15 G(rwriting the \214le.).15 E F1
+(histr)144 144 Q(eedit)-.18 E F0 .576(If set, and)184 156 R F1 -.18(re)
+3.076 G(adline).18 E F0 .575(is being used, a user is gi)3.076 F -.15
+(ve)-.25 G 3.075(nt).15 G .575(he opportunity to re-edit a f)-3.075 F
+.575(ailed his-)-.1 F(tory substitution.)184 168 Q F1(histv)144 180 Q
+(erify)-.1 E F0 .402(If set, and)184 192 R F1 -.18(re)2.903 G(adline).18
+E F0 .403
+(is being used, the results of history substitution are not immediately)
+2.903 F .662(passed to the shell parser)184 204 R 5.662(.I)-.55 G .661
+(nstead, the resulting line is loaded into the)-5.662 F F1 -.18(re)3.161
+G(adline).18 E F0(editing)3.161 E -.2(bu)184 216 S -.25(ff).2 G(er).25 E
+2.5(,a)-.4 G(llo)-2.5 E(wing further modi\214cation.)-.25 E F1
+(hostcomplete)144 228 Q F0 1.181(If set, and)184 240 R F1 -.18(re)3.681
+G(adline).18 E F0 1.181(is being used,)3.681 F F1(bash)3.682 E F0 1.182
+(will attempt to perform hostname completion)3.682 F 1.381(when a w)184
+252 R 1.381(ord containing a)-.1 F F1(@)3.881 E F0 1.381
+(is being completed \(see)3.881 F F1(Completing)3.88 E F0(under)3.88 E
+F2(READLINE)3.88 E F0(abo)184 264 Q -.15(ve)-.15 G 2.5(\). This).15 F
+(is enabled by def)2.5 E(ault.)-.1 E F1(huponexit)144 276 Q F0(If set,)
+184 288 Q F1(bash)2.5 E F0(will send)2.5 E F2(SIGHUP)2.5 E F0
+(to all jobs when an interacti)2.25 E .3 -.15(ve l)-.25 H(ogin shell e)
+.15 E(xits.)-.15 E F1(interacti)144 300 Q -.1(ve)-.1 G(_comments).1 E F0
+.33(If set, allo)184 312 R 2.83(waw)-.25 G .33(ord be)-2.93 F .33
+(ginning with)-.15 F F1(#)2.83 E F0 .33(to cause that w)2.83 F .33
+(ord and all remaining characters on)-.1 F .967
+(that line to be ignored in an interacti)184 324 R 1.267 -.15(ve s)-.25
+H .967(hell \(see).15 F F2(COMMENTS)3.467 E F0(abo)3.217 E -.15(ve)-.15
+G 3.467(\). This).15 F .967(option is)3.467 F(enabled by def)184 336 Q
+(ault.)-.1 E F1(lithist)144 348 Q F0 .654(If set, and the)15.55 F F1
+(cmdhist)3.154 E F0 .654(option is enabled, multi-line commands are sa)
+3.154 F -.15(ve)-.2 G 3.155(dt).15 G 3.155(ot)-3.155 G .655(he history)
+-3.155 F(with embedded ne)184 360 Q
+(wlines rather than using semicolon separators where possible.)-.25 E F1
+(login_shell)144 372 Q F0 .486
+(The shell sets this option if it is started as a login shell \(see)184
+384 R F2(INV)2.986 E(OCA)-.405 E(TION)-.855 E F0(abo)2.736 E -.15(ve)
+-.15 G 2.986(\). The).15 F -.25(va)184 396 S(lue may not be changed.).25
+E F1(mailwar)144 408 Q(n)-.15 E F0 .814(If set, and a \214le that)184
+420 R F1(bash)3.314 E F0 .815
+(is checking for mail has been accessed since the last time it)3.314 F
+-.1(wa)184 432 S 2.5(sc).1 G(heck)-2.5 E(ed, the message `)-.1 E
+(`The mail in)-.74 E/F3 10/Times-Italic@0 SF(mail\214le)2.5 E F0
+(has been read')2.5 E 2.5('i)-.74 G 2.5(sd)-2.5 G(isplayed.)-2.5 E F1
+(no_empty_cmd_completion)144 444 Q F0 .325(If set, and)184 456 R F1 -.18
+(re)2.825 G(adline).18 E F0 .325(is being used,)2.825 F F1(bash)2.824 E
+F0 .324(will not attempt to search the)2.824 F F2 -.666(PA)2.824 G(TH)
+-.189 E F0 .324(for possible)2.574 F
+(completions when completion is attempted on an empty line.)184 468 Q F1
+(nocaseglob)144 480 Q F0 .436(If set,)184 492 R F1(bash)2.936 E F0 .436
+(matches \214lenames in a case\255insensiti)2.936 F .737 -.15(ve f)-.25
+H .437(ashion when performing pathname).05 F -.15(ex)184 504 S
+(pansion \(see).15 E F1 -.1(Pa)2.5 G(thname Expansion).1 E F0(abo)2.5 E
+-.15(ve)-.15 G(\).).15 E F1(nocasematch)144 516 Q F0 1.194(If set,)184
+528 R F1(bash)3.694 E F0 1.194(matches patterns in a case\255insensiti)
+3.694 F 1.493 -.15(ve f)-.25 H 1.193(ashion when performing matching).05
+F(while e)184 540 Q -.15(xe)-.15 G(cuting).15 E F1(case)2.5 E F0(or)2.5
+E F1([[)2.5 E F0(conditional commands.)2.5 E F1(nullglob)144 552 Q F0
+.854(If set,)184 564 R F1(bash)3.354 E F0(allo)3.354 E .855
+(ws patterns which match no \214les \(see)-.25 F F1 -.1(Pa)3.355 G .855
+(thname Expansion).1 F F0(abo)3.355 E -.15(ve)-.15 G 3.355(\)t).15 G(o)
+-3.355 E -.15(ex)184 576 S(pand to a null string, rather than themselv)
+.15 E(es.)-.15 E F1(pr)144 588 Q(ogcomp)-.18 E F0 .677
+(If set, the programmable completion f)184 600 R .677(acilities \(see)
+-.1 F F1(Pr)3.176 E .676(ogrammable Completion)-.18 F F0(abo)3.176 E
+-.15(ve)-.15 G(\)).15 E(are enabled.)184 612 Q
+(This option is enabled by def)5 E(ault.)-.1 E F1(pr)144 624 Q(omptv)
+-.18 E(ars)-.1 E F0 1.447(If set, prompt strings under)184 636 R 1.448
+(go parameter e)-.18 F 1.448(xpansion, command substitution, arithmetic)
+-.15 F -.15(ex)184 648 S .171(pansion, and quote remo).15 F -.25(va)-.15
+G 2.67(la).25 G .17(fter being e)-2.67 F .17(xpanded as described in)
+-.15 F F2(PR)2.67 E(OMPTING)-.27 E F0(abo)2.42 E -.15(ve)-.15 G(.).15 E
+(This option is enabled by def)184 660 Q(ault.)-.1 E F1 -.18(re)144 672
+S(stricted_shell).18 E F0 1.069
+(The shell sets this option if it is started in restricted mode \(see)
+184 684 R F2 1.069(RESTRICTED SHELL)3.569 F F0(belo)184 696 Q 4.178
+(w\). The)-.25 F -.25(va)4.178 G 1.678(lue may not be changed.).25 F
+1.678(This is not reset when the startup \214les are)6.678 F -.15(exe)
+184 708 S(cuted, allo).15 E(wing the startup \214les to disco)-.25 E
+-.15(ve)-.15 G 2.5(rw).15 G(hether or not a shell is restricted.)-2.5 E
+(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(65)185.955 E 0 Cg EP
+%%Page: 66 66
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(shift_v)144 84 Q(erbose)-.1 E F0 .501
+(If set, the)184 96 R F1(shift)3.001 E F0 -.2(bu)3.001 G .501
+(iltin prints an error message when the shift count e).2 F .502
+(xceeds the number)-.15 F(of positional parameters.)184 108 Q F1(sour)
+144 120 Q(cepath)-.18 E F0 .771(If set, the)184 132 R F1(sour)3.271 E
+(ce)-.18 E F0(\()3.271 E F1(.)A F0 3.271(\)b)C .771(uiltin uses the v)
+-3.471 F .771(alue of)-.25 F/F2 9/Times-Bold@0 SF -.666(PA)3.27 G(TH)
+-.189 E F0 .77(to \214nd the directory containing the)3.02 F
+(\214le supplied as an ar)184 144 Q 2.5(gument. This)-.18 F
+(option is enabled by def)2.5 E(ault.)-.1 E F1(xpg_echo)144 156 Q F0
+(If set, the)184 168 Q F1(echo)2.5 E F0 -.2(bu)2.5 G(iltin e).2 E
+(xpands backslash-escape sequences by def)-.15 E(ault.)-.1 E F1(suspend)
+108 180 Q F0([)2.5 E F1<ad66>A F0(])A 1.001(Suspend the e)144 192 R -.15
+(xe)-.15 G 1.001(cution of this shell until it recei).15 F -.15(ve)-.25
+G 3.501(sa).15 G F2(SIGCONT)A F0 3.502(signal. A)3.252 F 1.002
+(login shell cannot be)3.502 F .023(suspended; the)144 204 R F1<ad66>
+2.523 E F0 .023(option can be used to o)2.523 F -.15(ve)-.15 G .022
+(rride this and force the suspension.).15 F .022(The return status is)
+5.022 F 2.5(0u)144 216 S(nless the shell is a login shell and)-2.5 E F1
+<ad66>2.5 E F0(is not supplied, or if job control is not enabled.)2.5 E
+F1(test)108 228 Q/F3 10/Times-Italic@0 SF -.2(ex)2.5 G(pr).2 E F1([)108
+240 Q F3 -.2(ex)2.5 G(pr).2 E F1(])2.5 E F0 1.15
+(Return a status of 0 or 1 depending on the e)6.77 F -.25(va)-.25 G 1.15
+(luation of the conditional e).25 F(xpression)-.15 E F3 -.2(ex)3.65 G
+(pr).2 E F0 6.15(.E).73 G(ach)-6.15 E 1.188
+(operator and operand must be a separate ar)144 252 R 3.688
+(gument. Expressions)-.18 F 1.187(are composed of the primaries)3.688 F
+1.889(described abo)144 264 R 2.189 -.15(ve u)-.15 H(nder).15 E F2
+(CONDITION)4.389 E 1.889(AL EXPRESSIONS)-.18 F/F4 9/Times-Roman@0 SF(.)A
+F1(test)6.389 E F0 1.89(does not accept an)4.389 F 4.39(yo)-.15 G 1.89
+(ptions, nor)-4.39 F(does it accept and ignore an ar)144 276 Q
+(gument of)-.18 E F1<adad>2.5 E F0(as signifying the end of options.)2.5
+E .786(Expressions may be combined using the follo)144 294 R .785
+(wing operators, listed in decreasing order of prece-)-.25 F 2.5
+(dence. The)144 306 R -.25(eva)2.5 G
+(luation depends on the number of ar).25 E(guments; see belo)-.18 E -.65
+(w.)-.25 G F1(!)144 318 Q F3 -.2(ex)2.5 G(pr).2 E F0 -.35(Tr)12.6 G
+(ue if).35 E F3 -.2(ex)2.5 G(pr).2 E F0(is f)3.23 E(alse.)-.1 E F1(\()
+144 330 Q F3 -.2(ex)2.5 G(pr).2 E F1(\))2.5 E F0 .26(Returns the v)6.77
+F .26(alue of)-.25 F F3 -.2(ex)2.76 G(pr).2 E F0 5.26(.T)C .26
+(his may be used to o)-5.26 F -.15(ve)-.15 G .26
+(rride the normal precedence of opera-).15 F(tors.)180 342 Q F3 -.2(ex)
+144 354 S(pr1).2 E F0<ad>2.5 E F1(a)A F3 -.2(ex)2.5 G(pr2).2 E F0 -.35
+(Tr)180 366 S(ue if both).35 E F3 -.2(ex)2.5 G(pr1).2 E F0(and)2.5 E F3
+-.2(ex)2.5 G(pr2).2 E F0(are true.)2.52 E F3 -.2(ex)144 378 S(pr1).2 E
+F0<ad>2.5 E F1(o)A F3 -.2(ex)2.5 G(pr2).2 E F0 -.35(Tr)180 390 S
+(ue if either).35 E F3 -.2(ex)2.5 G(pr1).2 E F0(or)2.5 E F3 -.2(ex)2.5 G
+(pr2).2 E F0(is true.)2.52 E F1(test)144 406.8 Q F0(and)2.5 E F1([)2.5 E
+F0 -.25(eva)2.5 G(luate conditional e).25 E
+(xpressions using a set of rules based on the number of ar)-.15 E
+(guments.)-.18 E 2.5(0a)144 424.8 S -.18(rg)-2.5 G(uments).18 E(The e)
+180 436.8 Q(xpression is f)-.15 E(alse.)-.1 E 2.5(1a)144 448.8 S -.18
+(rg)-2.5 G(ument).18 E(The e)180 460.8 Q
+(xpression is true if and only if the ar)-.15 E(gument is not null.)-.18
+E 2.5(2a)144 472.8 S -.18(rg)-2.5 G(uments).18 E .37(If the \214rst ar)
+180 484.8 R .37(gument is)-.18 F F1(!)2.87 E F0 2.87(,t)C .37(he e)-2.87
+F .37(xpression is true if and only if the second ar)-.15 F .37
+(gument is null.)-.18 F .379(If the \214rst ar)180 496.8 R .38
+(gument is one of the unary conditional operators listed abo)-.18 F .68
+-.15(ve u)-.15 H(nder).15 E F2(CONDI-)2.88 E(TION)180 508.8 Q .553
+(AL EXPRESSIONS)-.18 F F4(,)A F0 .552(the e)2.802 F .552
+(xpression is true if the unary test is true.)-.15 F .552
+(If the \214rst ar)5.552 F(gu-)-.18 E(ment is not a v)180 520.8 Q
+(alid unary conditional operator)-.25 E 2.5(,t)-.4 G(he e)-2.5 E
+(xpression is f)-.15 E(alse.)-.1 E 2.5(3a)144 532.8 S -.18(rg)-2.5 G
+(uments).18 E .023(If the second ar)180 544.8 R .023
+(gument is one of the binary conditional operators listed abo)-.18 F
+.324 -.15(ve u)-.15 H(nder).15 E F2(CON-)2.524 E(DITION)180 556.8 Q
+1.478(AL EXPRESSIONS)-.18 F F4(,)A F0 1.477(the result of the e)3.727 F
+1.477(xpression is the result of the binary test)-.15 F .513
+(using the \214rst and third ar)180 568.8 R .513(guments as operands.)
+-.18 F(The)5.513 E F1<ad61>3.013 E F0(and)3.013 E F1<ad6f>3.013 E F0
+.513(operators are considered)3.013 F .972
+(binary operators when there are three ar)180 580.8 R 3.472(guments. If)
+-.18 F .972(the \214rst ar)3.472 F .972(gument is)-.18 F F1(!)3.472 E F0
+3.472(,t)C .972(he v)-3.472 F .972(alue is)-.25 F .883(the ne)180 592.8
+R -.05(ga)-.15 G .883(tion of the tw).05 F(o-ar)-.1 E .884
+(gument test using the second and third ar)-.18 F 3.384(guments. If)-.18
+F .884(the \214rst)3.384 F(ar)180 604.8 Q .875(gument is e)-.18 F
+(xactly)-.15 E F1(\()3.375 E F0 .875(and the third ar)3.375 F .875
+(gument is e)-.18 F(xactly)-.15 E F1(\))3.375 E F0 3.374(,t)C .874
+(he result is the one-ar)-3.374 F(gument)-.18 E(test of the second ar)
+180 616.8 Q 2.5(gument. Otherwise,)-.18 F(the e)2.5 E(xpression is f)
+-.15 E(alse.)-.1 E 2.5(4a)144 628.8 S -.18(rg)-2.5 G(uments).18 E .384
+(If the \214rst ar)180 640.8 R .384(gument is)-.18 F F1(!)2.884 E F0
+2.885(,t)C .385(he result is the ne)-2.885 F -.05(ga)-.15 G .385
+(tion of the three-ar).05 F .385(gument e)-.18 F .385(xpression com-)
+-.15 F 1.648(posed of the remaining ar)180 652.8 R 4.147
+(guments. Otherwise,)-.18 F 1.647(the e)4.147 F 1.647
+(xpression is parsed and e)-.15 F -.25(va)-.25 G(luated).25 E
+(according to precedence using the rules listed abo)180 664.8 Q -.15(ve)
+-.15 G(.).15 E 2.5(5o)144 676.8 S 2.5(rm)-2.5 G(ore ar)-2.5 E(guments)
+-.18 E 1.635(The e)180 688.8 R 1.635(xpression is parsed and e)-.15 F
+-.25(va)-.25 G 1.635
+(luated according to precedence using the rules listed).25 F(abo)180
+700.8 Q -.15(ve)-.15 G(.).15 E F1(times)108 717.6 Q F0 1.229(Print the \
+accumulated user and system times for the shell and for processes run f\
+rom the shell.)13.23 F(The return status is 0.)144 729.6 Q(GNU Bash-4.1)
+72 768 Q(2009 December 29)135.965 E(66)185.955 E 0 Cg EP
+%%Page: 67 67
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF(trap)108 84 Q F0([)2.5 E F1(\255lp)A F0 2.5
+(][)C([)-2.5 E/F2 10/Times-Italic@0 SF(ar)A(g)-.37 E F0(])A F2(sigspec)
+2.5 E F0(...])2.5 E .702(The command)144 96 R F2(ar)3.532 E(g)-.37 E F0
+.702(is to be read and e)3.422 F -.15(xe)-.15 G .702
+(cuted when the shell recei).15 F -.15(ve)-.25 G 3.203(ss).15 G
+(ignal\(s\))-3.203 E F2(sigspec)3.203 E F0 5.703(.I).31 G(f)-5.703 E F2
+(ar)3.533 E(g)-.37 E F0(is)3.423 E .609(absent \(and there is a single)
+144 108 R F2(sigspec)3.108 E F0 3.108(\)o)C(r)-3.108 E F1<ad>3.108 E F0
+3.108(,e)C .608
+(ach speci\214ed signal is reset to its original disposition)-3.108 F
+.658(\(the v)144 120 R .658(alue it had upon entrance to the shell\).)
+-.25 F(If)5.658 E F2(ar)3.488 E(g)-.37 E F0 .659
+(is the null string the signal speci\214ed by each)3.378 F F2(sigspec)
+144.34 132 Q F0 .581(is ignored by the shell and by the commands it in)
+3.391 F -.2(vo)-.4 G -.1(ke).2 G 3.08(s. If).1 F F2(ar)3.41 E(g)-.37 E
+F0 .58(is not present and)3.3 F F1<ad70>3.08 E F0(has)3.08 E 1.214
+(been supplied, then the trap commands associated with each)144 144 R F2
+(sigspec)4.054 E F0 1.215(are displayed.)4.024 F 1.215(If no ar)6.215 F
+(gu-)-.18 E .86(ments are supplied or if only)144 156 R F1<ad70>3.36 E
+F0 .86(is gi)3.36 F -.15(ve)-.25 G(n,).15 E F1(trap)3.36 E F0 .86
+(prints the list of commands associated with each)3.36 F 2.83
+(signal. The)144 168 R F1<ad6c>2.83 E F0 .33(option causes the shell to\
+ print a list of signal names and their corresponding num-)2.83 F 4.311
+(bers. Each)144 180 R F2(sigspec)4.651 E F0 1.811
+(is either a signal name de\214ned in <)4.621 F F2(signal.h)A F0 1.81
+(>, or a signal number)B 6.81(.S)-.55 G(ignal)-6.81 E
+(names are case insensiti)144 192 Q .3 -.15(ve a)-.25 H
+(nd the SIG pre\214x is optional.).15 E 1.648(If a)144 210 R F2(sigspec)
+4.488 E F0(is)4.458 E/F3 9/Times-Bold@0 SF(EXIT)4.148 E F0 1.648
+(\(0\) the command)3.898 F F2(ar)4.479 E(g)-.37 E F0 1.649(is e)4.369 F
+-.15(xe)-.15 G 1.649(cuted on e).15 F 1.649(xit from the shell.)-.15 F
+1.649(If a)6.649 F F2(sigspec)4.489 E F0(is)4.459 E F3(DEB)144 222 Q(UG)
+-.09 E/F4 9/Times-Roman@0 SF(,)A F0 1.168(the command)3.418 F F2(ar)
+3.998 E(g)-.37 E F0 1.168(is e)3.888 F -.15(xe)-.15 G 1.167
+(cuted before e).15 F -.15(ve)-.25 G(ry).15 E F2 1.167(simple command)
+3.667 F F0(,)A F2(for)3.667 E F0(command,)3.667 E F2(case)3.667 E F0
+(com-)3.667 E(mand,)144 234 Q F2(select)2.646 E F0 .146(command, e)2.646
+F -.15(ve)-.25 G .146(ry arithmetic).15 F F2(for)2.646 E F0 .147
+(command, and before the \214rst command e)2.646 F -.15(xe)-.15 G .147
+(cutes in a).15 F .146(shell function \(see)144 246 R F3 .146
+(SHELL GRAMMAR)2.646 F F0(abo)2.396 E -.15(ve)-.15 G 2.646(\). Refer).15
+F .146(to the description of the)2.646 F F1(extdeb)2.645 E(ug)-.2 E F0
+.145(option to)2.645 F(the)144 258 Q F1(shopt)3.2 E F0 -.2(bu)3.2 G .7
+(iltin for details of its ef).2 F .7(fect on the)-.25 F F1(DEB)3.2 E(UG)
+-.1 E F0 3.2(trap. If)3.2 F(a)3.2 E F2(sigspec)3.54 E F0(is)3.51 E F3
+(RETURN)3.2 E F4(,)A F0 .701(the com-)2.951 F(mand)144 270 Q F2(ar)3.474
+E(g)-.37 E F0 .644(is e)3.364 F -.15(xe)-.15 G .643
+(cuted each time a shell function or a script e).15 F -.15(xe)-.15 G
+.643(cuted with the).15 F F1(.)3.143 E F0(or)3.143 E F1(sour)3.143 E(ce)
+-.18 E F0 -.2(bu)3.143 G(iltins).2 E(\214nishes e)144 282 Q -.15(xe)-.15
+G(cuting.).15 E .928(If a)144 300 R F2(sigspec)3.768 E F0(is)3.738 E F3
+(ERR)3.429 E F4(,)A F0 .929(the command)3.179 F F2(ar)3.759 E(g)-.37 E
+F0 .929(is e)3.649 F -.15(xe)-.15 G .929(cuted whene).15 F -.15(ve)-.25
+G 3.429(ras).15 G .929(imple command has a non\255zero)-3.429 F -.15(ex)
+144 312 S 1.009(it status, subject to the follo).15 F 1.009
+(wing conditions.)-.25 F(The)6.009 E F3(ERR)3.509 E F0 1.009
+(trap is not e)3.259 F -.15(xe)-.15 G 1.008(cuted if the f).15 F 1.008
+(ailed com-)-.1 F .324
+(mand is part of the command list immediately follo)144 324 R .324
+(wing a)-.25 F F1(while)2.824 E F0(or)2.824 E F1(until)2.824 E F0 -.1
+(ke)2.824 G(yw)-.05 E .324(ord, part of the test)-.1 F 1.129(in an)144
+336 R F2(if)3.639 E F0 1.129(statement, part of a command e)5.589 F -.15
+(xe)-.15 G 1.129(cuted in a).15 F F1(&&)3.629 E F0(or)3.629 E/F5 10
+/Symbol SF<efef>3.629 E F0 1.129(list, or if the command')3.629 F 3.628
+(sr)-.55 G(eturn)-3.628 E -.25(va)144 348 S(lue is being in).25 E -.15
+(ve)-.4 G(rted via).15 E F1(!)2.5 E F0 5(.T)C
+(hese are the same conditions obe)-5 E(yed by the)-.15 E F1(err)2.5 E
+(exit)-.18 E F0(option.)2.5 E 1.095
+(Signals ignored upon entry to the shell cannot be trapped or reset.)144
+366 R -.35(Tr)6.095 G 1.095(apped signals that are not).35 F .662
+(being ignored are reset to their original v)144 378 R .662
+(alues in a subshell or subshell en)-.25 F .661(vironment when one is)
+-.4 F 2.5(created. The)144 390 R(return status is f)2.5 E(alse if an)-.1
+E(y)-.15 E F2(sigspec)2.84 E F0(is in)2.81 E -.25(va)-.4 G
+(lid; otherwise).25 E F1(trap)2.5 E F0(returns true.)2.5 E F1(type)108
+406.8 Q F0([)2.5 E F1(\255aftpP)A F0(])A F2(name)2.5 E F0([)2.5 E F2
+(name)A F0(...])2.5 E -.4(Wi)144 418.8 S .173
+(th no options, indicate ho).4 F 2.673(we)-.25 G(ach)-2.673 E F2(name)
+3.033 E F0 -.1(wo)2.853 G .174
+(uld be interpreted if used as a command name.).1 F .174(If the)5.174 F
+F1<ad74>144 430.8 Q F0 .843(option is used,)3.343 F F1(type)3.343 E F0
+.843(prints a string which is one of)3.343 F F2(alias)3.343 E F0(,).27 E
+F2 -.1(ke)3.343 G(ywor)-.2 E(d)-.37 E F0(,).77 E F2(function)3.343 E F0
+(,).24 E F2 -.2(bu)3.342 G(iltin).2 E F0 3.342(,o).24 G(r)-3.342 E F2
+(\214le)5.252 E F0(if)3.522 E F2(name)144.36 442.8 Q F0 .086
+(is an alias, shell reserv)2.766 F .086(ed w)-.15 F .086
+(ord, function, b)-.1 F .087(uiltin, or disk \214le, respecti)-.2 F -.15
+(ve)-.25 G(ly).15 E 5.087(.I)-.65 G 2.587(ft)-5.087 G(he)-2.587 E F2
+(name)2.947 E F0 .087(is not)2.767 F .119
+(found, then nothing is printed, and an e)144 454.8 R .118
+(xit status of f)-.15 F .118(alse is returned.)-.1 F .118(If the)5.118 F
+F1<ad70>2.618 E F0 .118(option is used,)2.618 F F1(type)2.618 E F0 .855
+(either returns the name of the disk \214le that w)144 466.8 R .855
+(ould be e)-.1 F -.15(xe)-.15 G .855(cuted if).15 F F2(name)3.715 E F0
+.855(were speci\214ed as a com-)3.535 F .641(mand name, or nothing if)
+144 478.8 R/F6 10/Courier@0 SF .641(type -t name)3.141 F F0 -.1(wo)3.141
+G .641(uld not return).1 F F2(\214le)3.14 E F0 5.64(.T).18 G(he)-5.64 E
+F1<ad50>3.14 E F0 .64(option forces a)3.14 F F3 -.666(PA)3.14 G(TH)-.189
+E F0 .112(search for each)144 490.8 R F2(name)2.612 E F0 2.612(,e)C -.15
+(ve)-2.862 G 2.613(ni).15 G(f)-2.613 E F6 .113(type -t name)2.613 F F0
+-.1(wo)2.613 G .113(uld not return).1 F F2(\214le)2.613 E F0 5.113(.I)
+.18 G 2.613(fac)-5.113 G .113(ommand is hashed,)-2.613 F F1<ad70>2.613 E
+F0(and)144 502.8 Q F1<ad50>2.945 E F0 .445(print the hashed v)2.945 F
+.444(alue, not necessarily the \214le that appears \214rst in)-.25 F F3
+-.666(PA)2.944 G(TH)-.189 E F4(.)A F0 .444(If the)4.944 F F1<ad61>2.944
+E F0(option)2.944 E .265(is used,)144 514.8 R F1(type)2.765 E F0 .265
+(prints all of the places that contain an e)2.765 F -.15(xe)-.15 G .265
+(cutable named).15 F F2(name)2.765 E F0 5.265(.T).18 G .265
+(his includes aliases)-5.265 F .427(and functions, if and only if the)
+144 526.8 R F1<ad70>2.926 E F0 .426(option is not also used.)2.926 F
+.426(The table of hashed commands is not)5.426 F .548
+(consulted when using)144 538.8 R F1<ad61>3.048 E F0 5.548(.T)C(he)
+-5.548 E F1<ad66>3.048 E F0 .549
+(option suppresses shell function lookup, as with the)3.048 F F1
+(command)3.049 E F0 -.2(bu)144 550.8 S(iltin.).2 E F1(type)5 E F0
+(returns true if all of the ar)2.5 E(guments are found, f)-.18 E
+(alse if an)-.1 E 2.5(ya)-.15 G(re not found.)-2.5 E F1(ulimit)108 567.6
+Q F0([)2.5 E F1(\255HST)A(abcde\214lmnpqrstuvx)-.92 E F0([)2.5 E F2
+(limit)A F0(]])A(Pro)144 579.6 Q .244(vides control o)-.15 F -.15(ve)
+-.15 G 2.744(rt).15 G .244(he resources a)-2.744 F -.25(va)-.2 G .244
+(ilable to the shell and to processes started by it, on systems).25 F
+.943(that allo)144 591.6 R 3.443(ws)-.25 G .943(uch control.)-3.443 F
+(The)5.943 E F1<ad48>3.443 E F0(and)3.443 E F1<ad53>3.444 E F0 .944
+(options specify that the hard or soft limit is set for the)3.444 F(gi)
+144 603.6 Q -.15(ve)-.25 G 2.709(nr).15 G 2.709(esource. A)-2.709 F .208
+(hard limit cannot be increased by a non-root user once it is set; a so\
+ft limit may)2.709 F .425(be increased up to the v)144 615.6 R .425
+(alue of the hard limit.)-.25 F .426(If neither)5.425 F F1<ad48>2.926 E
+F0(nor)2.926 E F1<ad53>2.926 E F0 .426
+(is speci\214ed, both the soft and)2.926 F .139(hard limits are set.)144
+627.6 R .139(The v)5.139 F .139(alue of)-.25 F F2(limit)2.729 E F0 .139
+(can be a number in the unit speci\214ed for the resource or one)3.319 F
+.741(of the special v)144 639.6 R(alues)-.25 E F1(hard)3.241 E F0(,)A F1
+(soft)3.241 E F0 3.241(,o)C(r)-3.241 E F1(unlimited)3.241 E F0 3.241(,w)
+C .741(hich stand for the current hard limit, the current)-3.241 F .78
+(soft limit, and no limit, respecti)144 651.6 R -.15(ve)-.25 G(ly).15 E
+5.78(.I)-.65 G(f)-5.78 E F2(limit)3.37 E F0 .78
+(is omitted, the current v)3.96 F .78(alue of the soft limit of the)-.25
+F .498(resource is printed, unless the)144 663.6 R F1<ad48>2.999 E F0
+.499(option is gi)2.999 F -.15(ve)-.25 G 2.999(n. When).15 F .499
+(more than one resource is speci\214ed, the)2.999 F
+(limit name and unit are printed before the v)144 675.6 Q 2.5
+(alue. Other)-.25 F(options are interpreted as follo)2.5 E(ws:)-.25 E F1
+<ad61>144 687.6 Q F0(All current limits are reported)25.3 E F1<ad62>144
+699.6 Q F0(The maximum sock)24.74 E(et b)-.1 E(uf)-.2 E(fer size)-.25 E
+F1<ad63>144 711.6 Q F0(The maximum size of core \214les created)25.86 E
+(GNU Bash-4.1)72 768 Q(2009 December 29)135.965 E(67)185.955 E 0 Cg EP
+%%Page: 68 68
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E/F1 10/Times-Bold@0 SF<ad64>144 84 Q F0
+(The maximum size of a process')24.74 E 2.5(sd)-.55 G(ata se)-2.5 E
+(gment)-.15 E F1<ad65>144 96 Q F0
+(The maximum scheduling priority \("nice"\))25.86 E F1<ad66>144 108 Q F0
+(The maximum size of \214les written by the shell and its children)26.97
+E F1<ad69>144 120 Q F0(The maximum number of pending signals)27.52 E F1
+<ad6c>144 132 Q F0(The maximum size that may be lock)27.52 E
+(ed into memory)-.1 E F1<ad6d>144 144 Q F0
+(The maximum resident set size \(man)21.97 E 2.5(ys)-.15 G
+(ystems do not honor this limit\))-2.5 E F1<ad6e>144 156 Q F0 .791(The \
+maximum number of open \214le descriptors \(most systems do not allo)
+24.74 F 3.29(wt)-.25 G .79(his v)-3.29 F .79(alue to)-.25 F(be set\))180
+168 Q F1<ad70>144 180 Q F0
+(The pipe size in 512-byte blocks \(this may not be set\))24.74 E F1
+<ad71>144 192 Q F0(The maximum number of bytes in POSIX message queues)
+24.74 E F1<ad72>144 204 Q F0(The maximum real-time scheduling priority)
+25.86 E F1<ad73>144 216 Q F0(The maximum stack size)26.41 E F1<ad74>144
+228 Q F0(The maximum amount of cpu time in seconds)26.97 E F1<ad75>144
+240 Q F0(The maximum number of processes a)24.74 E -.25(va)-.2 G
+(ilable to a single user).25 E F1<ad76>144 252 Q F0
+(The maximum amount of virtual memory a)25.3 E -.25(va)-.2 G
+(ilable to the shell).25 E F1<ad78>144 264 Q F0
+(The maximum number of \214le locks)25.3 E F1<ad54>144 276 Q F0
+(The maximum number of threads)23.63 E(If)144 292.8 Q/F2 10
+/Times-Italic@0 SF(limit)2.933 E F0 .343(is gi)3.523 F -.15(ve)-.25 G
+.343(n, it is the ne).15 F 2.843(wv)-.25 G .343
+(alue of the speci\214ed resource \(the)-3.093 F F1<ad61>2.843 E F0 .343
+(option is display only\).)2.843 F .343(If no)5.343 F .176(option is gi)
+144 304.8 R -.15(ve)-.25 G .176(n, then).15 F F1<ad66>2.676 E F0 .175
+(is assumed.)2.676 F -1.11(Va)5.175 G .175
+(lues are in 1024-byte increments, e)1.11 F .175(xcept for)-.15 F F1
+<ad74>2.675 E F0 2.675(,w)C .175(hich is in)-2.675 F(seconds,)144 316.8
+Q F1<ad70>2.515 E F0 2.515(,w)C .015
+(hich is in units of 512-byte blocks, and)-2.515 F F1<ad54>2.516 E F0(,)
+A F1<ad62>2.516 E F0(,)A F1<ad6e>2.516 E F0 2.516(,a)C(nd)-2.516 E F1
+<ad75>2.516 E F0 2.516(,w)C .016(hich are unscaled v)-2.516 F(al-)-.25 E
+3.788(ues. The)144 328.8 R 1.287(return status is 0 unless an in)3.787 F
+-.25(va)-.4 G 1.287(lid option or ar).25 F 1.287
+(gument is supplied, or an error occurs)-.18 F(while setting a ne)144
+340.8 Q 2.5(wl)-.25 G(imit.)-2.5 E F1(umask)108 357.6 Q F0([)2.5 E F1
+<ad70>A F0 2.5(][)C F1<ad53>-2.5 E F0 2.5(][)C F2(mode)-2.5 E F0(])A .2
+(The user \214le-creation mask is set to)144 369.6 R F2(mode)2.7 E F0
+5.2(.I).18 G(f)-5.2 E F2(mode)3.08 E F0(be)2.88 E .2
+(gins with a digit, it is interpreted as an octal)-.15 F .066(number; o\
+therwise it is interpreted as a symbolic mode mask similar to that acce\
+pted by)144 381.6 R F2 -.15(ch)2.566 G(mod).15 E F0(\(1\).).77 E(If)144
+393.6 Q F2(mode)3.262 E F0 .382(is omitted, the current v)3.062 F .382
+(alue of the mask is printed.)-.25 F(The)5.382 E F1<ad53>2.882 E F0 .382
+(option causes the mask to be)2.882 F .547
+(printed in symbolic form; the def)144 405.6 R .547
+(ault output is an octal number)-.1 F 5.547(.I)-.55 G 3.047(ft)-5.547 G
+(he)-3.047 E F1<ad70>3.047 E F0 .547(option is supplied, and)3.047 F F2
+(mode)144.38 417.6 Q F0 .551
+(is omitted, the output is in a form that may be reused as input.)3.231
+F .552(The return status is 0 if the)5.552 F(mode w)144 429.6 Q
+(as successfully changed or if no)-.1 E F2(mode)2.5 E F0(ar)2.5 E
+(gument w)-.18 E(as supplied, and f)-.1 E(alse otherwise.)-.1 E F1
+(unalias)108 446.4 Q F0<5bad>2.5 E F1(a)A F0 2.5(][)C F2(name)-2.5 E F0
+(...])2.5 E(Remo)144 458.4 Q 1.955 -.15(ve e)-.15 H(ach).15 E F2(name)
+4.155 E F0 1.655(from the list of de\214ned aliases.)4.155 F(If)6.655 E
+F1<ad61>4.155 E F0 1.655(is supplied, all alias de\214nitions are)4.155
+F(remo)144 470.4 Q -.15(ve)-.15 G 2.5(d. The).15 F(return v)2.5 E
+(alue is true unless a supplied)-.25 E F2(name)2.86 E F0
+(is not a de\214ned alias.)2.68 E F1(unset)108 487.2 Q F0<5bad>2.5 E F1
+(fv)A F0 2.5(][)C F2(name)-2.5 E F0(...])2.5 E -.15(Fo)144 499.2 S 3.106
+(re).15 G(ach)-3.106 E F2(name)3.106 E F0 3.106(,r).18 G(emo)-3.106 E
+.906 -.15(ve t)-.15 H .606(he corresponding v).15 F .607
+(ariable or function.)-.25 F .607(If no options are supplied, or the)
+5.607 F F1<ad76>144 511.2 Q F0 .305(option is gi)2.805 F -.15(ve)-.25 G
+.305(n, each).15 F F2(name)3.165 E F0 .305(refers to a shell v)2.985 F
+2.805(ariable. Read-only)-.25 F -.25(va)2.805 G .304
+(riables may not be unset.).25 F(If)5.304 E F1<ad66>144 523.2 Q F0 .459
+(is speci\214ed, each)2.959 F F2(name)3.319 E F0 .459
+(refers to a shell function, and the function de\214nition is remo)3.139
+F -.15(ve)-.15 G 2.96(d. Each).15 F .903(unset v)144 535.2 R .903
+(ariable or function is remo)-.25 F -.15(ve)-.15 G 3.402(df).15 G .902
+(rom the en)-3.402 F .902(vironment passed to subsequent commands.)-.4 F
+(If)5.902 E(an)144 547.2 Q 6.915(yo)-.15 G(f)-6.915 E/F3 9/Times-Bold@0
+SF(COMP_W)6.915 E(ORDBREAKS)-.09 E/F4 9/Times-Roman@0 SF(,)A F3(RANDOM)
+6.665 E F4(,)A F3(SECONDS)6.665 E F4(,)A F3(LINENO)6.665 E F4(,)A F3
+(HISTCMD)6.666 E F4(,)A F3(FUNCN)6.666 E(AME)-.18 E F4(,)A F3(GR)144
+559.2 Q(OUPS)-.27 E F4(,)A F0(or)2.523 E F3(DIRST)2.773 E -.495(AC)-.81
+G(K).495 E F0 .272(are unset, the)2.522 F 2.772(yl)-.15 G .272
+(ose their special properties, e)-2.772 F -.15(ve)-.25 G 2.772(ni).15 G
+2.772(ft)-2.772 G(he)-2.772 E 2.772(ya)-.15 G .272(re subsequently)
+-2.772 F 2.5(reset. The)144 571.2 R -.15(ex)2.5 G
+(it status is true unless a).15 E F2(name)2.86 E F0(is readonly)2.68 E
+(.)-.65 E F1(wait)108 588 Q F0([)2.5 E F2 2.5(n.)C(..)-2.5 E F0(])A -.8
+(Wa)144 600 S .288
+(it for each speci\214ed process and return its termination status.).8 F
+(Each)5.288 E F2(n)3.148 E F0 .288(may be a process ID or a)3.028 F .722
+(job speci\214cation; if a job spec is gi)144 612 R -.15(ve)-.25 G .722
+(n, all processes in that job').15 F 3.222(sp)-.55 G .722(ipeline are w)
+-3.222 F .722(aited for)-.1 F 5.722(.I)-.55 G(f)-5.722 E F2(n)3.582 E F0
+(is)3.462 E 1.265(not gi)144 624 R -.15(ve)-.25 G 1.265
+(n, all currently acti).15 F 1.565 -.15(ve c)-.25 H 1.265
+(hild processes are w).15 F 1.265(aited for)-.1 F 3.765(,a)-.4 G 1.266
+(nd the return status is zero.)-3.765 F(If)6.266 E F2(n)4.126 E F0 .457
+(speci\214es a non-e)144 636 R .457
+(xistent process or job, the return status is 127.)-.15 F .457
+(Otherwise, the return status is the)5.457 F -.15(ex)144 648 S
+(it status of the last process or job w).15 E(aited for)-.1 E(.)-.55 E
+/F5 10.95/Times-Bold@0 SF(RESTRICTED SHELL)72 664.8 Q F0(If)108 676.8 Q
+F1(bash)4.396 E F0 1.896(is started with the name)4.396 F F1(rbash)4.397
+E F0 4.397(,o)C 4.397(rt)-4.397 G(he)-4.397 E F1<ad72>4.397 E F0 1.897
+(option is supplied at in)4.397 F -.2(vo)-.4 G 1.897
+(cation, the shell becomes).2 F 3.446(restricted. A)108 688.8 R .945
+(restricted shell is used to set up an en)3.446 F .945
+(vironment more controlled than the standard shell.)-.4 F(It)5.945 E
+(beha)108 700.8 Q -.15(ve)-.2 G 2.5(si).15 G(dentically to)-2.5 E F1
+(bash)2.5 E F0(with the e)2.5 E(xception that the follo)-.15 E
+(wing are disallo)-.25 E(wed or not performed:)-.25 E 32.5<8363>108
+717.6 S(hanging directories with)-32.5 E F1(cd)2.5 E F0(GNU Bash-4.1)72
+768 Q(2009 December 29)135.965 E(68)185.955 E 0 Cg EP
+%%Page: 69 69
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E 32.5<8373>108 84 S(etting or unsetting the v)-32.5 E(alues of)
+-.25 E/F1 9/Times-Bold@0 SF(SHELL)2.5 E/F2 9/Times-Roman@0 SF(,)A F1
+-.666(PA)2.25 G(TH)-.189 E F2(,)A F1(ENV)2.25 E F2(,)A F0(or)2.25 E F1
+-.27(BA)2.5 G(SH_ENV).27 E F0 32.5<8373>108 100.8 S
+(pecifying command names containing)-32.5 E/F3 10/Times-Bold@0 SF(/)2.5
+E F0 32.5<8373>108 117.6 S(pecifying a \214le name containing a)-32.5 E
+F3(/)2.5 E F0(as an ar)2.5 E(gument to the)-.18 E F3(.)2.5 E F0 -.2(bu)5
+G(iltin command).2 E 32.5<8353>108 134.4 S .351
+(pecifying a \214lename containing a slash as an ar)-32.5 F .351
+(gument to the)-.18 F F3<ad70>2.851 E F0 .351(option to the)2.851 F F3
+(hash)2.852 E F0 -.2(bu)2.852 G .352(iltin com-).2 F(mand)144 146.4 Q
+32.5<8369>108 163.2 S(mporting function de\214nitions from the shell en)
+-32.5 E(vironment at startup)-.4 E 32.5<8370>108 180 S(arsing the v)
+-32.5 E(alue of)-.25 E F1(SHELLOPTS)2.5 E F0(from the shell en)2.25 E
+(vironment at startup)-.4 E 32.5<8372>108 196.8 S(edirecting output usi\
+ng the >, >|, <>, >&, &>, and >> redirection operators)-32.5 E 32.5
+<8375>108 213.6 S(sing the)-32.5 E F3(exec)2.5 E F0 -.2(bu)2.5 G
+(iltin command to replace the shell with another command).2 E 32.5<8361>
+108 230.4 S(dding or deleting b)-32.5 E(uiltin commands with the)-.2 E
+F3<ad66>2.5 E F0(and)2.5 E F3<ad64>2.5 E F0(options to the)2.5 E F3
+(enable)2.5 E F0 -.2(bu)2.5 G(iltin command).2 E 32.5<8355>108 247.2 S
+(sing the)-32.5 E F3(enable)2.5 E F0 -.2(bu)2.5 G
+(iltin command to enable disabled shell b).2 E(uiltins)-.2 E 32.5<8373>
+108 264 S(pecifying the)-32.5 E F3<ad70>2.5 E F0(option to the)2.5 E F3
+(command)2.5 E F0 -.2(bu)2.5 G(iltin command).2 E 32.5<8374>108 280.8 S
+(urning of)-32.5 E 2.5(fr)-.25 G(estricted mode with)-2.5 E F3(set +r)
+2.5 E F0(or)2.5 E F3(set +o r)2.5 E(estricted)-.18 E F0(.)A
+(These restrictions are enforced after an)108 297.6 Q 2.5(ys)-.15 G
+(tartup \214les are read.)-2.5 E 1.566
+(When a command that is found to be a shell script is e)108 314.4 R -.15
+(xe)-.15 G 1.566(cuted \(see).15 F F1 1.566(COMMAND EXECUTION)4.066 F F0
+(abo)3.816 E -.15(ve)-.15 G(\),).15 E F3(rbash)108 326.4 Q F0(turns of)
+2.5 E 2.5(fa)-.25 G .3 -.15(ny r)-2.5 H(estrictions in the shell spa).15
+E(wned to e)-.15 E -.15(xe)-.15 G(cute the script.).15 E/F4 10.95
+/Times-Bold@0 SF(SEE ALSO)72 343.2 Q/F5 10/Times-Italic@0 SF(Bash Refer)
+108 355.2 Q(ence Manual)-.37 E F0 2.5(,B)C(rian F)-2.5 E
+(ox and Chet Rame)-.15 E(y)-.15 E F5(The Gnu Readline Libr)108 367.2 Q
+(ary)-.15 E F0 2.5(,B)C(rian F)-2.5 E(ox and Chet Rame)-.15 E(y)-.15 E
+F5(The Gnu History Libr)108 379.2 Q(ary)-.15 E F0 2.5(,B)C(rian F)-2.5 E
+(ox and Chet Rame)-.15 E(y)-.15 E F5 -.8(Po)108 391.2 S(rtable Oper).8 E
+(ating System Interface \(POSIX\) P)-.15 E(art 2: Shell and Utilities)
+-.8 E F0 2.5(,I)C(EEE)-2.5 E F5(sh)108 403.2 Q F0(\(1\),)A F5(ksh)2.5 E
+F0(\(1\),)A F5(csh)2.5 E F0(\(1\))A F5(emacs)108 415.2 Q F0(\(1\),)A F5
+(vi)2.5 E F0(\(1\))A F5 -.37(re)108 427.2 S(adline).37 E F0(\(3\))A F4
+(FILES)72 444 Q F5(/bin/bash)109.666 456 Q F0(The)144 468 Q F3(bash)2.5
+E F0 -.15(exe)2.5 G(cutable).15 E F5(/etc/pr)109.666 480 Q(o\214le)-.45
+E F0(The systemwide initialization \214le, e)144 492 Q -.15(xe)-.15 G
+(cuted for login shells).15 E F5(~/.bash_pr)109.666 504 Q(o\214le)-.45 E
+F0(The personal initialization \214le, e)144 516 Q -.15(xe)-.15 G
+(cuted for login shells).15 E F5(~/.bashr)109.666 528 Q(c)-.37 E F0
+(The indi)144 540 Q(vidual per)-.25 E(-interacti)-.2 E -.15(ve)-.25 G
+(-shell startup \214le).15 E F5(~/.bash_lo)109.666 552 Q(gout)-.1 E F0
+(The indi)144 564 Q(vidual login shell cleanup \214le, e)-.25 E -.15(xe)
+-.15 G(cuted when a login shell e).15 E(xits)-.15 E F5(~/.inputr)109.666
+576 Q(c)-.37 E F0(Indi)144 588 Q(vidual)-.25 E F5 -.37(re)2.5 G(adline)
+.37 E F0(initialization \214le)2.5 E F4 -.548(AU)72 604.8 S(THORS).548 E
+F0(Brian F)108 616.8 Q(ox, Free Softw)-.15 E(are F)-.1 E(oundation)-.15
+E(bfox@gnu.or)108 628.8 Q(g)-.18 E(Chet Rame)108 645.6 Q 1.3 -.65(y, C)
+-.15 H(ase W).65 E(estern Reserv)-.8 E 2.5(eU)-.15 G(ni)-2.5 E -.15(ve)
+-.25 G(rsity).15 E(chet.rame)108 657.6 Q(y@case.edu)-.15 E F4 -.11(BU)72
+674.4 S 2.738(GR).11 G(EPOR)-2.738 E(TS)-.438 E F0 .567
+(If you \214nd a b)108 686.4 R .568(ug in)-.2 F F3(bash,)3.068 E F0 .568
+(you should report it.)3.068 F .568(But \214rst, you should mak)5.568 F
+3.068(es)-.1 G .568(ure that it really is a b)-3.068 F .568(ug, and)-.2
+F 5.626(that it appears in the latest v)108 698.4 R 5.625(ersion of)-.15
+F F3(bash)8.125 E F0 10.625(.T)C 5.625(he latest v)-10.625 F 5.625
+(ersion is al)-.15 F -.1(wa)-.1 G 5.625(ys a).1 F -.25(va)-.2 G 5.625
+(ilable from).25 F F5(ftp://ftp.gnu.or)108 710.4 Q(g/pub/bash/)-.37 E F0
+(.)A .41(Once you ha)108 727.2 R .71 -.15(ve d)-.2 H .41
+(etermined that a b).15 F .41(ug actually e)-.2 F .411(xists, use the)
+-.15 F F5(bashb)3.181 E(ug)-.2 E F0 .411(command to submit a b)3.131 F
+.411(ug report.)-.2 F(If)5.411 E(GNU Bash-4.1)72 768 Q(2009 December 29)
+135.965 E(69)185.955 E 0 Cg EP
+%%Page: 70 70
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S 389.54(SH\(1\) B).35 F(ASH\(1\))
+-.35 E .595(you ha)108 84 R .895 -.15(ve a \214)-.2 H .595
+(x, you are encouraged to mail that as well!).15 F .594
+(Suggestions and `philosophical' b)5.595 F .594(ug reports may)-.2 F
+(be mailed to)108 96 Q/F1 10/Times-Italic@0 SF -.2(bu)2.5 G
+(g-bash@gnu.or).2 E(g)-.37 E F0(or posted to the Usenet ne)2.5 E
+(wsgroup)-.25 E/F2 10/Times-Bold@0 SF(gnu.bash.b)2.5 E(ug)-.2 E F0(.)A
+(ALL b)108 112.8 Q(ug reports should include:)-.2 E(The v)108 129.6 Q
+(ersion number of)-.15 E F2(bash)2.5 E F0(The hardw)108 141.6 Q
+(are and operating system)-.1 E(The compiler used to compile)108 153.6 Q
+2.5(Ad)108 165.6 S(escription of the b)-2.5 E(ug beha)-.2 E(viour)-.2 E
+2.5(As)108 177.6 S(hort script or `recipe' which e)-2.5 E -.15(xe)-.15 G
+(rcises the b).15 E(ug)-.2 E F1(bashb)108.27 194.4 Q(ug)-.2 E F0
+(inserts the \214rst three items automatically into the template it pro)
+2.72 E(vides for \214ling a b)-.15 E(ug report.)-.2 E(Comments and b)108
+211.2 Q(ug reports concerning this manual page should be directed to)-.2
+E F1 -.15(ch)2.5 G(et@po.cwru.edu).15 E F0(.).25 E/F3 10.95/Times-Bold@0
+SF -.11(BU)72 228 S(GS).11 E F0(It')108 240 Q 2.5(st)-.55 G
+(oo big and too slo)-2.5 E -.65(w.)-.25 G 1.868
+(There are some subtle dif)108 256.8 R 1.868(ferences between)-.25 F F2
+(bash)4.369 E F0 1.869(and traditional v)4.369 F 1.869(ersions of)-.15 F
+F2(sh)4.369 E F0 4.369(,m)C 1.869(ostly because of the)-4.369 F/F4 9
+/Times-Bold@0 SF(POSIX)108 268.8 Q F0(speci\214cation.)2.25 E
+(Aliases are confusing in some uses.)108 285.6 Q(Shell b)108 302.4 Q
+(uiltin commands and functions are not stoppable/restartable.)-.2 E
+1.315(Compound commands and command sequences of the form `a ; b ; c' a\
+re not handled gracefully when)108 319.2 R .389
+(process suspension is attempted.)108 331.2 R .389
+(When a process is stopped, the shell immediately e)5.389 F -.15(xe)-.15
+G .39(cutes the ne).15 F .39(xt com-)-.15 F .193(mand in the sequence.)
+108 343.2 R .192(It suf)5.193 F .192(\214ces to place the sequence of c\
+ommands between parentheses to force it into a)-.25 F
+(subshell, which may be stopped as a unit.)108 355.2 Q(Array v)108 372 Q
+(ariables may not \(yet\) be e)-.25 E(xported.)-.15 E
+(There may be only one acti)108 388.8 Q .3 -.15(ve c)-.25 H
+(oprocess at a time.).15 E(GNU Bash-4.1)72 768 Q(2009 December 29)
+135.965 E(70)185.955 E 0 Cg EP
+%%Trailer
+end
+%%EOF
diff --git a/doc/bashbug.0 b/doc/bashbug.0
new file mode 100644
index 0000000..41fc1ed
--- /dev/null
+++ b/doc/bashbug.0
@@ -0,0 +1,50 @@
+BASHBUG(1) BASHBUG(1)
+
+
+
+NNAAMMEE
+ bashbug - report a bug in bash
+
+SSYYNNOOPPSSIISS
+ bbaasshhbbuugg [_-_-_v_e_r_s_i_o_n] [_-_-_h_e_l_p] [_e_m_a_i_l_-_a_d_d_r_e_s_s]
+
+DDEESSCCRRIIPPTTIIOONN
+ bbaasshhbbuugg is a shell script to help the user compose and mail bug reports
+ concerning bash in a standard format. bbaasshhbbuugg invokes the editor spec-
+ ified by the environment variable EEDDIITTOORR on a temporary copy of the bug
+ report format outline. The user must fill in the appropriate fields and
+ exit the editor. bbaasshhbbuugg then mails the completed report to _b_u_g_-
+ _b_a_s_h_@_g_n_u_._o_r_g, or _e_m_a_i_l_-_a_d_d_r_e_s_s. If the report cannot be mailed, it is
+ saved in the file _d_e_a_d_._b_a_s_h_b_u_g in the invoking user's home directory.
+
+ The bug report format outline consists of several sections. The first
+ section provides information about the machine, operating system, the
+ bash version, and the compilation environment. The second section
+ should be filled in with a description of the bug. The third section
+ should be a description of how to reproduce the bug. The optional
+ fourth section is for a proposed fix. Fixes are encouraged.
+
+EENNVVIIRROONNMMEENNTT
+ bbaasshhbbuugg will utilize the following environment variables if they exist:
+
+ EEDDIITTOORR Specifies the preferred editor. If EEDDIITTOORR is not set, bbaasshhbbuugg
+ defaults to eemmaaccss.
+
+ HHOOMMEE Directory in which the failed bug report is saved if the mail
+ fails.
+
+ TTMMPPDDIIRR Directory in which to create temporary files and directories.
+
+SSEEEE AALLSSOO
+ _b_a_s_h(1)
+
+AAUUTTHHOORRSS
+ Brian Fox, Free Software Foundation
+ bfox@gnu.org
+
+ Chet Ramey, Case Western Reserve University
+ chet@po.cwru.edu
+
+
+
+GNU Bash-4.0 1998 July 30 BASHBUG(1)
diff --git a/doc/bashbug.1 b/doc/bashbug.1
new file mode 100644
index 0000000..962cb9c
--- /dev/null
+++ b/doc/bashbug.1
@@ -0,0 +1,64 @@
+.\"
+.\" MAN PAGE COMMENTS to
+.\"
+.\" Chet Ramey
+.\" Case Western Reserve University
+.\" chet@po.cwru.edu
+.\"
+.\" Last Change: Tue Apr 3 15:46:30 EDT 2007
+.\"
+.TH BASHBUG 1 "1998 July 30" "GNU Bash-4.0"
+.SH NAME
+bashbug \- report a bug in bash
+.SH SYNOPSIS
+\fBbashbug\fP [\fI--version\fP] [\fI--help\fP] [\fIemail-address\fP]
+.SH DESCRIPTION
+.B bashbug
+is a shell script to help the user compose and mail bug reports
+concerning bash in a standard format.
+.B bashbug
+invokes the editor specified by the environment variable
+.SM
+.B EDITOR
+on a temporary copy of the bug report format outline. The user must
+fill in the appropriate fields and exit the editor.
+.B bashbug
+then mails the completed report to \fIbug-bash@gnu.org\fP, or
+\fIemail-address\fP. If the report cannot be mailed, it is saved in the
+file \fIdead.bashbug\fP in the invoking user's home directory.
+.PP
+The bug report format outline consists of several sections. The first
+section provides information about the machine, operating system, the
+bash version, and the compilation environment. The second section
+should be filled in with a description of the bug. The third section
+should be a description of how to reproduce the bug. The optional
+fourth section is for a proposed fix. Fixes are encouraged.
+.SH ENVIRONMENT
+.B bashbug
+will utilize the following environment variables if they exist:
+.TP
+.B EDITOR
+Specifies the preferred editor. If
+.SM
+.B EDITOR
+is not set,
+.B bashbug
+defaults to
+.BR emacs .
+.TP
+.B HOME
+Directory in which the failed bug report is saved if the mail fails.
+.TP
+.B TMPDIR
+Directory in which to create temporary files and directories.
+.SH "SEE ALSO"
+.TP
+\fIbash\fP(1)
+.SH AUTHORS
+Brian Fox, Free Software Foundation
+.br
+bfox@gnu.org
+.PP
+Chet Ramey, Case Western Reserve University
+.br
+chet@po.cwru.edu
diff --git a/doc/bashbug.ps b/doc/bashbug.ps
new file mode 100644
index 0000000..efbcdda
--- /dev/null
+++ b/doc/bashbug.ps
@@ -0,0 +1,284 @@
+%!PS-Adobe-3.0
+%%Creator: groff version 1.19.2
+%%CreationDate: Mon Nov 17 17:38:06 2008
+%%DocumentNeededResources: font Times-Roman
+%%+ font Times-Bold
+%%+ font Times-Italic
+%%DocumentSuppliedResources: procset grops 1.19 2
+%%Pages: 1
+%%PageOrder: Ascend
+%%DocumentMedia: Default 595 842 0 () ()
+%%Orientation: Portrait
+%%EndComments
+%%BeginDefaults
+%%PageMedia: Default
+%%EndDefaults
+%%BeginProlog
+%%BeginResource: procset grops 1.19 2
+%!PS-Adobe-3.0 Resource-ProcSet
+/setpacking where{
+pop
+currentpacking
+true setpacking
+}if
+/grops 120 dict dup begin
+/SC 32 def
+/A/show load def
+/B{0 SC 3 -1 roll widthshow}bind def
+/C{0 exch ashow}bind def
+/D{0 exch 0 SC 5 2 roll awidthshow}bind def
+/E{0 rmoveto show}bind def
+/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
+/G{0 rmoveto 0 exch ashow}bind def
+/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/I{0 exch rmoveto show}bind def
+/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
+/K{0 exch rmoveto 0 exch ashow}bind def
+/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/M{rmoveto show}bind def
+/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
+/O{rmoveto 0 exch ashow}bind def
+/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/Q{moveto show}bind def
+/R{moveto 0 SC 3 -1 roll widthshow}bind def
+/S{moveto 0 exch ashow}bind def
+/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/SF{
+findfont exch
+[exch dup 0 exch 0 exch neg 0 0]makefont
+dup setfont
+[exch/setfont cvx]cvx bind def
+}bind def
+/MF{
+findfont
+[5 2 roll
+0 3 1 roll
+neg 0 0]makefont
+dup setfont
+[exch/setfont cvx]cvx bind def
+}bind def
+/level0 0 def
+/RES 0 def
+/PL 0 def
+/LS 0 def
+/MANUAL{
+statusdict begin/manualfeed true store end
+}bind def
+/PLG{
+gsave newpath clippath pathbbox grestore
+exch pop add exch pop
+}bind def
+/BP{
+/level0 save def
+1 setlinecap
+1 setlinejoin
+72 RES div dup scale
+LS{
+90 rotate
+}{
+0 PL translate
+}ifelse
+1 -1 scale
+}bind def
+/EP{
+level0 restore
+showpage
+}def
+/DA{
+newpath arcn stroke
+}bind def
+/SN{
+transform
+.25 sub exch .25 sub exch
+round .25 add exch round .25 add exch
+itransform
+}bind def
+/DL{
+SN
+moveto
+SN
+lineto stroke
+}bind def
+/DC{
+newpath 0 360 arc closepath
+}bind def
+/TM matrix def
+/DE{
+TM currentmatrix pop
+translate scale newpath 0 0 .5 0 360 arc closepath
+TM setmatrix
+}bind def
+/RC/rcurveto load def
+/RL/rlineto load def
+/ST/stroke load def
+/MT/moveto load def
+/CL/closepath load def
+/Fr{
+setrgbcolor fill
+}bind def
+/setcmykcolor where{
+pop
+/Fk{
+setcmykcolor fill
+}bind def
+}if
+/Fg{
+setgray fill
+}bind def
+/FL/fill load def
+/LW/setlinewidth load def
+/Cr/setrgbcolor load def
+/setcmykcolor where{
+pop
+/Ck/setcmykcolor load def
+}if
+/Cg/setgray load def
+/RE{
+findfont
+dup maxlength 1 index/FontName known not{1 add}if dict begin
+{
+1 index/FID ne{def}{pop pop}ifelse
+}forall
+/Encoding exch def
+dup/FontName exch def
+currentdict end definefont pop
+}bind def
+/DEFS 0 def
+/EBEGIN{
+moveto
+DEFS begin
+}bind def
+/EEND/end load def
+/CNT 0 def
+/level1 0 def
+/PBEGIN{
+/level1 save def
+translate
+div 3 1 roll div exch scale
+neg exch neg exch translate
+0 setgray
+0 setlinecap
+1 setlinewidth
+0 setlinejoin
+10 setmiterlimit
+[]0 setdash
+/setstrokeadjust where{
+pop
+false setstrokeadjust
+}if
+/setoverprint where{
+pop
+false setoverprint
+}if
+newpath
+/CNT countdictstack def
+userdict begin
+/showpage{}def
+/setpagedevice{}def
+}bind def
+/PEND{
+countdictstack CNT sub{end}repeat
+level1 restore
+}bind def
+end def
+/setpacking where{
+pop
+setpacking
+}if
+%%EndResource
+%%EndProlog
+%%BeginSetup
+%%BeginFeature: *PageSize Default
+<< /PageSize [ 595 842 ] /ImagingBBox null >> setpagedevice
+%%EndFeature
+%%IncludeResource: font Times-Roman
+%%IncludeResource: font Times-Bold
+%%IncludeResource: font Times-Italic
+grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
+def/PL 841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron
+/Zcaron/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef
+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
+/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
+/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
+/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
+/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
+/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
+/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
+/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
+/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
+/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
+/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
+/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
+/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
+/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
+/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
+/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
+/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
+/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
+/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
+/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
+/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
+/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
+/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0/Times-Bold RE
+/Times-Roman@0 ENC0/Times-Roman RE
+%%EndSetup
+%%Page: 1 1
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SHB).35 E 347.52(UG\(1\) B)-.1 F
+(ASHB)-.35 E(UG\(1\))-.1 E/F1 10.95/Times-Bold@0 SF -.219(NA)72 84 S(ME)
+.219 E F0(bashb)108 96 Q(ug \255 report a b)-.2 E(ug in bash)-.2 E F1
+(SYNOPSIS)72 112.8 Q/F2 10/Times-Bold@0 SF(bashb)108 124.8 Q(ug)-.2 E F0
+([)2.5 E/F3 10/Times-Italic@0 SF(--ver)A(sion)-.1 E F0 2.5(][)C F3
+(--help)-2.5 E F0 2.5(][)C F3(email-addr)-2.5 E(ess)-.37 E F0(])A F1
+(DESCRIPTION)72 141.6 Q F2(bashb)108 153.6 Q(ug)-.2 E F0 .446
+(is a shell script to help the user compose and mail b)2.947 F .446
+(ug reports concerning bash in a standard for)-.2 F(-)-.2 E(mat.)108
+165.6 Q F2(bashb)5.961 E(ug)-.2 E F0(in)3.461 E -.2(vo)-.4 G -.1(ke).2 G
+3.461(st).1 G .962(he editor speci\214ed by the en)-3.461 F .962
+(vironment v)-.4 F(ariable)-.25 E/F4 9/Times-Bold@0 SF(EDIT)3.462 E(OR)
+-.162 E F0 .962(on a temporary cop)3.212 F 3.462(yo)-.1 G(f)-3.462 E
+.374(the b)108 177.6 R .374(ug report format outline. The user must \
+\214ll in the appropriate \214elds and e)-.2 F .374(xit the editor)-.15
+F(.)-.55 E F2(bashb)5.373 E(ug)-.2 E F0(then)2.873 E 1.141
+(mails the completed report to)108 189.6 R F3 -.2(bu)3.641 G
+(g-bash@gnu.or).2 E(g)-.37 E F0 3.641(,o)C(r)-3.641 E F3(email-addr)
+3.641 E(ess)-.37 E F0 6.141(.I)C 3.641(ft)-6.141 G 1.142
+(he report cannot be mailed, it is)-3.641 F(sa)108 201.6 Q -.15(ve)-.2 G
+2.5(di).15 G 2.5(nt)-2.5 G(he \214le)-2.5 E F3(dead.bashb)2.5 E(ug)-.2 E
+F0(in the in)2.5 E -.2(vo)-.4 G(king user').2 E 2.5(sh)-.55 G
+(ome directory)-2.5 E(.)-.65 E .354(The b)108 218.4 R .354
+(ug report format outline consists of se)-.2 F -.15(ve)-.25 G .353
+(ral sections.).15 F .353(The \214rst section pro)5.353 F .353
+(vides information about the)-.15 F .37
+(machine, operating system, the bash v)108 230.4 R .371
+(ersion, and the compilation en)-.15 F 2.871(vironment. The)-.4 F .371
+(second section should)2.871 F .209
+(be \214lled in with a description of the b)108 242.4 R 2.709(ug. The)
+-.2 F .208(third section should be a description of ho)2.709 F 2.708(wt)
+-.25 G 2.708(or)-2.708 G .208(eproduce the)-2.708 F -.2(bu)108 254.4 S
+2.5(g. The).2 F(optional fourth section is for a proposed \214x.)2.5 E
+(Fix)5 E(es are encouraged.)-.15 E F1(ENVIR)72 271.2 Q(ONMENT)-.329 E F2
+(bashb)108 283.2 Q(ug)-.2 E F0(will utilize the follo)2.5 E(wing en)-.25
+E(vironment v)-.4 E(ariables if the)-.25 E 2.5(ye)-.15 G(xist:)-2.65 E
+F2(EDIT)108 300 Q(OR)-.18 E F0(Speci\214es the preferred editor)144 312
+Q 2.5(.I)-.55 G(f)-2.5 E F4(EDIT)2.5 E(OR)-.162 E F0(is not set,)2.25 E
+F2(bashb)2.5 E(ug)-.2 E F0(def)2.5 E(aults to)-.1 E F2(emacs)2.5 E F0(.)
+A F2(HOME)108 328.8 Q F0(Directory in which the f)144 340.8 Q(ailed b)
+-.1 E(ug report is sa)-.2 E -.15(ve)-.2 G 2.5(di).15 G 2.5(ft)-2.5 G
+(he mail f)-2.5 E(ails.)-.1 E F2(TMPDIR)108 357.6 Q F0
+(Directory in which to create temporary \214les and directories.)144
+369.6 Q F1(SEE ALSO)72 386.4 Q F3(bash)108 398.4 Q F0(\(1\))A F1 -.548
+(AU)72 415.2 S(THORS).548 E F0(Brian F)108 427.2 Q(ox, Free Softw)-.15 E
+(are F)-.1 E(oundation)-.15 E(bfox@gnu.or)108 439.2 Q(g)-.18 E
+(Chet Rame)108 456 Q 1.3 -.65(y, C)-.15 H(ase W).65 E(estern Reserv)-.8
+E 2.5(eU)-.15 G(ni)-2.5 E -.15(ve)-.25 G(rsity).15 E(chet@po.cwru.edu)
+108 468 Q(GNU Bash-4.0)72 768 Q(1998 July 30)148.175 E(1)203.165 E 0 Cg
+EP
+%%Trailer
+end
+%%EOF
diff --git a/doc/bashref.dvi b/doc/bashref.dvi
new file mode 100644
index 0000000..652145a
--- /dev/null
+++ b/doc/bashref.dvi
Binary files differ
diff --git a/doc/bashref.html b/doc/bashref.html
new file mode 100644
index 0000000..d36b72b
--- /dev/null
+++ b/doc/bashref.html
@@ -0,0 +1,16225 @@
+<HTML>
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<!-- Created on December, 29 2009 by texi2html 1.64 -->
+<!--
+Written by: Lionel Cons <Lionel.Cons@cern.ch> (original author)
+ Karl Berry <karl@freefriends.org>
+ Olaf Bachmann <obachman@mathematik.uni-kl.de>
+ and many others.
+Maintained by: Olaf Bachmann <obachman@mathematik.uni-kl.de>
+Send bugs and suggestions to <texi2html@mathematik.uni-kl.de>
+
+-->
+<HEAD>
+<TITLE>Bash Reference Manual: </TITLE>
+
+<META NAME="description" CONTENT="Bash Reference Manual: ">
+<META NAME="keywords" CONTENT="Bash Reference Manual: ">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META NAME="Generator" CONTENT="texi2html 1.64">
+
+</HEAD>
+
+<BODY LANG="" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000">
+
+<A NAME="SEC_Top"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1>Bash Reference Manual</H1></P><P>
+
+This text is a brief description of the features that are present in
+the Bash shell (version 4.1, 23 December 2009).
+</P><P>
+
+This is Edition 4.1, last updated 23 December 2009,
+of <CITE>The GNU Bash Reference Manual</CITE>,
+for <CODE>Bash</CODE>, Version 4.1.
+</P><P>
+
+Bash contains features that appear in other popular shells, and some
+features that only appear in Bash. Some of the shells that Bash has
+borrowed concepts from are the Bourne Shell (<TT>`sh'</TT>), the Korn Shell
+(<TT>`ksh'</TT>), and the C-shell (<TT>`csh'</TT> and its successor,
+<TT>`tcsh'</TT>). The following menu breaks the features up into
+categories based upon which one of these other shells inspired the
+feature.
+</P><P>
+
+This manual is meant as a brief introduction to features found in
+Bash. The Bash manual page should be used as the definitive
+reference on shell behavior.
+</P><P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC1">1. Introduction</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">An introduction to the shell.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC4">2. Definitions</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Some definitions used in the rest of this
+ manual.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC5">3. Basic Shell Features</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The shell "building blocks".</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC58">4. Shell Builtin Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Commands that are a part of the shell.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC65">5. Shell Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Variables used or set by Bash.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC68">6. Bash Features</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Features found only in Bash.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC91">7. Job Control</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">What job control is and how Bash allows you
+ to use it.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC95">8. Command Line Editing</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Chapter describing the command line
+ editing features.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC119">9. Using History Interactively</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Command History Expansion</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC126">10. Installing Bash</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to build and install Bash on your system.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC135">A. Reporting Bugs</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to report bugs in Bash.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC136">B. Major Differences From The Bourne Shell</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A terse list of the differences
+ between Bash and historical
+ versions of /bin/sh.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC138">C. GNU Free Documentation License</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Copying and sharing this documentation.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC140">D. Indexes</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Various indexes for this manual.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+<HR SIZE=1>
+<A NAME="SEC1"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC2"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC4"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<A NAME="Introduction"></A>
+<H1> 1. Introduction </H1>
+<!--docid::SEC1::-->
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC2">1.1 What is Bash?</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A short description of Bash.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC3">1.2 What is a shell?</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A brief introduction to shells.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+<A NAME="What is Bash?"></A>
+<HR SIZE="6">
+<A NAME="SEC2"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC1"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC3"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC1"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC4"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 1.1 What is Bash? </H2>
+<!--docid::SEC2::-->
+<P>
+
+Bash is the shell, or command language interpreter,
+for the GNU operating system.
+The name is an acronym for the <SAMP>`Bourne-Again SHell'</SAMP>,
+a pun on Stephen Bourne, the author of the direct ancestor of
+the current Unix shell <CODE>sh</CODE>,
+which appeared in the Seventh Edition Bell Labs Research version
+of Unix.
+</P><P>
+
+Bash is largely compatible with <CODE>sh</CODE> and incorporates useful
+features from the Korn shell <CODE>ksh</CODE> and the C shell <CODE>csh</CODE>.
+It is intended to be a conformant implementation of the IEEE
+POSIX Shell and Tools portion of the IEEE POSIX
+specification (IEEE Standard 1003.1).
+It offers functional improvements over <CODE>sh</CODE> for both interactive and
+programming use.
+</P><P>
+
+While the GNU operating system provides other shells, including
+a version of <CODE>csh</CODE>, Bash is the default shell.
+Like other GNU software, Bash is quite portable. It currently runs
+on nearly every version of Unix and a few other operating systems -
+independently-supported ports exist for MS-DOS, OS/2,
+and Windows platforms.
+</P><P>
+
+<A NAME="What is a shell?"></A>
+<HR SIZE="6">
+<A NAME="SEC3"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC2"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC4"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC1"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC4"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 1.2 What is a shell? </H2>
+<!--docid::SEC3::-->
+<P>
+
+At its base, a shell is simply a macro processor that executes
+commands. The term macro processor means functionality where text
+and symbols are expanded to create larger expressions.
+</P><P>
+
+A Unix shell is both a command interpreter and a programming
+language. As a command interpreter, the shell provides the user
+interface to the rich set of GNU utilities. The programming
+language features allow these utilities to be combined.
+Files containing commands can be created, and become
+commands themselves. These new commands have the same status as
+system commands in directories such as <TT>`/bin'</TT>, allowing users
+or groups to establish custom environments to automate their common
+tasks.
+</P><P>
+
+Shells may be used interactively or non-interactively. In
+interactive mode, they accept input typed from the keyboard.
+When executing non-interactively, shells execute commands read
+from a file.
+</P><P>
+
+A shell allows execution of GNU commands, both synchronously and
+asynchronously.
+The shell waits for synchronous commands to complete before accepting
+more input; asynchronous commands continue to execute in parallel
+with the shell while it reads and executes additional commands.
+The <EM>redirection</EM> constructs permit
+fine-grained control of the input and output of those commands.
+Moreover, the shell allows control over the contents of commands'
+environments.
+</P><P>
+
+Shells also provide a small set of built-in
+commands (<EM>builtins</EM>) implementing functionality impossible
+or inconvenient to obtain via separate utilities.
+For example, <CODE>cd</CODE>, <CODE>break</CODE>, <CODE>continue</CODE>, and
+<CODE>exec</CODE>) cannot be implemented outside of the shell because
+they directly manipulate the shell itself.
+The <CODE>history</CODE>, <CODE>getopts</CODE>, <CODE>kill</CODE>, or <CODE>pwd</CODE>
+builtins, among others, could be implemented in separate utilities,
+but they are more convenient to use as builtin commands.
+All of the shell builtins are described in
+subsequent sections.
+</P><P>
+
+While executing commands is essential, most of the power (and
+complexity) of shells is due to their embedded programming
+languages. Like any high-level language, the shell provides
+variables, flow control constructs, quoting, and functions.
+</P><P>
+
+Shells offer features geared specifically for
+interactive use rather than to augment the programming language.
+These interactive features include job control, command line
+editing, command history and aliases. Each of these features is
+described in this manual.
+</P><P>
+
+<A NAME="Definitions"></A>
+<HR SIZE="6">
+<A NAME="SEC4"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC3"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 2. Definitions </H1>
+<!--docid::SEC4::-->
+These definitions are used throughout the remainder of this manual.
+<P>
+
+<DL COMPACT>
+
+<DT><CODE>POSIX</CODE>
+<DD><A NAME="IDX1"></A>
+A family of open system standards based on Unix. Bash
+is primarily concerned with the Shell and Utilities portion of the
+POSIX 1003.1 standard.
+<P>
+
+<DT><CODE>blank</CODE>
+<DD>A space or tab character.
+<P>
+
+<DT><CODE>builtin</CODE>
+<DD><A NAME="IDX2"></A>
+A command that is implemented internally by the shell itself, rather
+than by an executable program somewhere in the file system.
+<P>
+
+<DT><CODE>control operator</CODE>
+<DD><A NAME="IDX3"></A>
+A <CODE>token</CODE> that performs a control function. It is a <CODE>newline</CODE>
+or one of the following:
+<SAMP>`||'</SAMP>, <SAMP>`&#38;&#38;'</SAMP>, <SAMP>`&#38;'</SAMP>, <SAMP>`;'</SAMP>, <SAMP>`;;'</SAMP>,
+<SAMP>`|'</SAMP>, <SAMP>`|&#38;'</SAMP>, <SAMP>`('</SAMP>, or <SAMP>`)'</SAMP>.
+<P>
+
+<DT><CODE>exit status</CODE>
+<DD><A NAME="IDX4"></A>
+The value returned by a command to its caller. The value is restricted
+to eight bits, so the maximum value is 255.
+<P>
+
+<DT><CODE>field</CODE>
+<DD><A NAME="IDX5"></A>
+A unit of text that is the result of one of the shell expansions. After
+expansion, when executing a command, the resulting fields are used as
+the command name and arguments.
+<P>
+
+<DT><CODE>filename</CODE>
+<DD><A NAME="IDX6"></A>
+A string of characters used to identify a file.
+<P>
+
+<DT><CODE>job</CODE>
+<DD><A NAME="IDX7"></A>
+A set of processes comprising a pipeline, and any processes descended
+from it, that are all in the same process group.
+<P>
+
+<DT><CODE>job control</CODE>
+<DD><A NAME="IDX8"></A>
+A mechanism by which users can selectively stop (suspend) and restart
+(resume) execution of processes.
+<P>
+
+<DT><CODE>metacharacter</CODE>
+<DD><A NAME="IDX9"></A>
+A character that, when unquoted, separates words. A metacharacter is
+a <CODE>blank</CODE> or one of the following characters:
+<SAMP>`|'</SAMP>, <SAMP>`&#38;'</SAMP>, <SAMP>`;'</SAMP>, <SAMP>`('</SAMP>, <SAMP>`)'</SAMP>, <SAMP>`&#60;'</SAMP>, or
+<SAMP>`&#62;'</SAMP>.
+<P>
+
+<DT><CODE>name</CODE>
+<DD><A NAME="IDX10"></A>
+<A NAME="IDX11"></A>
+A <CODE>word</CODE> consisting solely of letters, numbers, and underscores,
+and beginning with a letter or underscore. <CODE>Name</CODE>s are used as
+shell variable and function names.
+Also referred to as an <CODE>identifier</CODE>.
+<P>
+
+<DT><CODE>operator</CODE>
+<DD><A NAME="IDX12"></A>
+A <CODE>control operator</CODE> or a <CODE>redirection operator</CODE>.
+See section <A HREF="bashref.html#SEC39">3.6 Redirections</A>, for a list of redirection operators.
+Operators contain at least one unquoted <CODE>metacharacter</CODE>.
+<P>
+
+<DT><CODE>process group</CODE>
+<DD><A NAME="IDX13"></A>
+A collection of related processes each having the same process
+group ID.
+<P>
+
+<DT><CODE>process group ID</CODE>
+<DD><A NAME="IDX14"></A>
+A unique identifier that represents a <CODE>process group</CODE>
+during its lifetime.
+<P>
+
+<DT><CODE>reserved word</CODE>
+<DD><A NAME="IDX15"></A>
+A <CODE>word</CODE> that has a special meaning to the shell. Most reserved
+words introduce shell flow control constructs, such as <CODE>for</CODE> and
+<CODE>while</CODE>.
+<P>
+
+<DT><CODE>return status</CODE>
+<DD><A NAME="IDX16"></A>
+A synonym for <CODE>exit status</CODE>.
+<P>
+
+<DT><CODE>signal</CODE>
+<DD><A NAME="IDX17"></A>
+A mechanism by which a process may be notified by the kernel
+of an event occurring in the system.
+<P>
+
+<DT><CODE>special builtin</CODE>
+<DD><A NAME="IDX18"></A>
+A shell builtin command that has been classified as special by the
+POSIX standard.
+<P>
+
+<DT><CODE>token</CODE>
+<DD><A NAME="IDX19"></A>
+A sequence of characters considered a single unit by the shell.
+It is either a <CODE>word</CODE> or an <CODE>operator</CODE>.
+<P>
+
+<DT><CODE>word</CODE>
+<DD><A NAME="IDX20"></A>
+A sequence of characters treated as a unit by the shell.
+Words may not include unquoted <CODE>metacharacters</CODE>.
+</DL>
+<P>
+
+<A NAME="Basic Shell Features"></A>
+<HR SIZE="6">
+<A NAME="SEC5"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC4"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC6"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC58"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC58"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 3. Basic Shell Features </H1>
+<!--docid::SEC5::-->
+<P>
+
+Bash is an acronym for <SAMP>`Bourne-Again SHell'</SAMP>.
+The Bourne shell is
+the traditional Unix shell originally written by Stephen Bourne.
+All of the Bourne shell builtin commands are available in Bash,
+The rules for evaluation and quoting are taken from the POSIX
+specification for the `standard' Unix shell.
+</P><P>
+
+This chapter briefly summarizes the shell's `building blocks':
+commands, control structures, shell functions, shell <I>parameters</I>,
+shell expansions,
+<I>redirections</I>, which are a way to direct input and output from
+and to named files, and how the shell executes commands.
+</P><P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC6">3.1 Shell Syntax</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">What your input means to the shell.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC15">3.2 Shell Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The types of commands you can use.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC24">3.3 Shell Functions</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Grouping commands by name.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC25">3.4 Shell Parameters</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How the shell stores values.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC28">3.5 Shell Expansions</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How Bash expands parameters and the various
+ expansions available.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC39">3.6 Redirections</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A way to control where input and output go.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC50">3.7 Executing Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">What happens when you run a command.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC57">3.8 Shell Scripts</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Executing files of shell commands.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+<A NAME="Shell Syntax"></A>
+<HR SIZE="6">
+<A NAME="SEC6"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC7"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 3.1 Shell Syntax </H2>
+<!--docid::SEC6::-->
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC7">3.1.1 Shell Operation</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The basic operation of the shell.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC8">3.1.2 Quoting</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to remove the special meaning from characters.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC14">3.1.3 Comments</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to specify comments.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+When the shell reads input, it proceeds through a
+sequence of operations. If the input indicates the beginning of a
+comment, the shell ignores the comment symbol (<SAMP>`#'</SAMP>), and the rest
+of that line.
+
+Otherwise, roughly speaking, the shell reads its input and
+divides the input into words and operators, employing the quoting rules
+to select which meanings to assign various words and characters.
+</P><P>
+
+The shell then parses these tokens into commands and other constructs,
+removes the special meaning of certain words or characters, expands
+others, redirects input and output as needed, executes the specified
+command, waits for the command's exit status, and makes that exit status
+available for further inspection or processing.
+</P><P>
+
+<A NAME="Shell Operation"></A>
+<HR SIZE="6">
+<A NAME="SEC7"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC6"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC8"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC6"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.1.1 Shell Operation </H3>
+<!--docid::SEC7::-->
+<P>
+
+The following is a brief description of the shell's operation when it
+reads and executes a command. Basically, the shell does the
+following:
+</P><P>
+
+<OL>
+<LI>
+Reads its input from a file (see section <A HREF="bashref.html#SEC57">3.8 Shell Scripts</A>), from a string
+supplied as an argument to the <SAMP>`-c'</SAMP> invocation option
+(see section <A HREF="bashref.html#SEC69">6.1 Invoking Bash</A>), or from the user's terminal.
+<P>
+
+<LI>
+Breaks the input into words and operators, obeying the quoting rules
+described in <A HREF="bashref.html#SEC8">3.1.2 Quoting</A>. These tokens are separated by
+<CODE>metacharacters</CODE>. Alias expansion is performed by this step
+(see section <A HREF="bashref.html#SEC84">6.6 Aliases</A>).
+<P>
+
+<LI>
+Parses the tokens into simple and compound commands
+(see section <A HREF="bashref.html#SEC15">3.2 Shell Commands</A>).
+<P>
+
+<LI>
+Performs the various shell expansions (see section <A HREF="bashref.html#SEC28">3.5 Shell Expansions</A>), breaking
+the expanded tokens into lists of filenames (see section <A HREF="bashref.html#SEC36">3.5.8 Filename Expansion</A>)
+and commands and arguments.
+<P>
+
+<LI>
+Performs any necessary redirections (see section <A HREF="bashref.html#SEC39">3.6 Redirections</A>) and removes
+the redirection operators and their operands from the argument list.
+<P>
+
+<LI>
+Executes the command (see section <A HREF="bashref.html#SEC50">3.7 Executing Commands</A>).
+<P>
+
+<LI>
+Optionally waits for the command to complete and collects its exit
+status (see section <A HREF="bashref.html#SEC55">3.7.5 Exit Status</A>).
+<P>
+
+</OL>
+<P>
+
+<A NAME="Quoting"></A>
+<HR SIZE="6">
+<A NAME="SEC8"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC7"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC9"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC6"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.1.2 Quoting </H3>
+<!--docid::SEC8::-->
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC9">3.1.2.1 Escape Character</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to remove the special meaning from a single
+ character.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC10">3.1.2.2 Single Quotes</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to inhibit all interpretation of a sequence
+ of characters.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC11">3.1.2.3 Double Quotes</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to suppress most of the interpretation of a
+ sequence of characters.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC12">3.1.2.4 ANSI-C Quoting</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to expand ANSI-C sequences in quoted strings.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to translate strings into different languages.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+Quoting is used to remove the special meaning of certain
+characters or words to the shell. Quoting can be used to
+disable special treatment for special characters, to prevent
+reserved words from being recognized as such, and to prevent
+parameter expansion.
+</P><P>
+
+Each of the shell metacharacters (see section <A HREF="bashref.html#SEC4">2. Definitions</A>)
+has special meaning to the shell and must be quoted if it is to
+represent itself.
+When the command history expansion facilities are being used
+(see section <A HREF="bashref.html#SEC122">9.3 History Expansion</A>), the
+<VAR>history expansion</VAR> character, usually <SAMP>`!'</SAMP>, must be quoted
+to prevent history expansion. See section <A HREF="bashref.html#SEC120">9.1 Bash History Facilities</A>, for
+more details concerning history expansion.
+</P><P>
+
+There are three quoting mechanisms: the
+<VAR>escape character</VAR>, single quotes, and double quotes.
+</P><P>
+
+<A NAME="Escape Character"></A>
+<HR SIZE="6">
+<A NAME="SEC9"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC8"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC10"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC8"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H4> 3.1.2.1 Escape Character </H4>
+<!--docid::SEC9::-->
+A non-quoted backslash <SAMP>`\'</SAMP> is the Bash escape character.
+It preserves the literal value of the next character that follows,
+with the exception of <CODE>newline</CODE>. If a <CODE>\newline</CODE> pair
+appears, and the backslash itself is not quoted, the <CODE>\newline</CODE>
+is treated as a line continuation (that is, it is removed from
+the input stream and effectively ignored).
+<P>
+
+<A NAME="Single Quotes"></A>
+<HR SIZE="6">
+<A NAME="SEC10"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC9"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC11"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC11"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC8"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H4> 3.1.2.2 Single Quotes </H4>
+<!--docid::SEC10::-->
+<P>
+
+Enclosing characters in single quotes (<SAMP>`''</SAMP>) preserves the literal value
+of each character within the quotes. A single quote may not occur
+between single quotes, even when preceded by a backslash.
+</P><P>
+
+<A NAME="Double Quotes"></A>
+<HR SIZE="6">
+<A NAME="SEC11"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC10"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC12"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC12"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC8"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H4> 3.1.2.3 Double Quotes </H4>
+<!--docid::SEC11::-->
+<P>
+
+Enclosing characters in double quotes (<SAMP>`"'</SAMP>) preserves the literal value
+of all characters within the quotes, with the exception of
+<SAMP>`$'</SAMP>, <SAMP>``'</SAMP>, <SAMP>`\'</SAMP>,
+and, when history expansion is enabled, <SAMP>`!'</SAMP>.
+The characters <SAMP>`$'</SAMP> and <SAMP>``'</SAMP>
+retain their special meaning within double quotes (see section <A HREF="bashref.html#SEC28">3.5 Shell Expansions</A>).
+The backslash retains its special meaning only when followed by one of
+the following characters:
+<SAMP>`$'</SAMP>, <SAMP>``'</SAMP>, <SAMP>`"'</SAMP>, <SAMP>`\'</SAMP>, or <CODE>newline</CODE>.
+Within double quotes, backslashes that are followed by one of these
+characters are removed. Backslashes preceding characters without a
+special meaning are left unmodified.
+A double quote may be quoted within double quotes by preceding it with
+a backslash.
+If enabled, history expansion will be performed unless an <SAMP>`!'</SAMP>
+appearing in double quotes is escaped using a backslash.
+The backslash preceding the <SAMP>`!'</SAMP> is not removed.
+</P><P>
+
+The special parameters <SAMP>`*'</SAMP> and <SAMP>`@'</SAMP> have special meaning
+when in double quotes (see section <A HREF="bashref.html#SEC31">3.5.3 Shell Parameter Expansion</A>).
+</P><P>
+
+<A NAME="ANSI-C Quoting"></A>
+<HR SIZE="6">
+<A NAME="SEC12"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC11"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC13"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC13"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC8"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H4> 3.1.2.4 ANSI-C Quoting </H4>
+<!--docid::SEC12::-->
+<P>
+
+Words of the form <CODE>$'<VAR>string</VAR>'</CODE> are treated specially. The
+word expands to <VAR>string</VAR>, with backslash-escaped characters replaced
+as specified by the ANSI C standard. Backslash escape sequences, if
+present, are decoded as follows:
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>\a</CODE>
+<DD>alert (bell)
+<DT><CODE>\b</CODE>
+<DD>backspace
+<DT><CODE>\e</CODE>
+<DD><DT><CODE>\E</CODE>
+<DD>an escape character (not ANSI C)
+<DT><CODE>\f</CODE>
+<DD>form feed
+<DT><CODE>\n</CODE>
+<DD>newline
+<DT><CODE>\r</CODE>
+<DD>carriage return
+<DT><CODE>\t</CODE>
+<DD>horizontal tab
+<DT><CODE>\v</CODE>
+<DD>vertical tab
+<DT><CODE>\\</CODE>
+<DD>backslash
+<DT><CODE>\'</CODE>
+<DD>single quote
+<DT><CODE>\"</CODE>
+<DD>double quote
+<DT><CODE>\<VAR>nnn</VAR></CODE>
+<DD>the eight-bit character whose value is the octal value <VAR>nnn</VAR>
+(one to three digits)
+<DT><CODE>\x<VAR>HH</VAR></CODE>
+<DD>the eight-bit character whose value is the hexadecimal value <VAR>HH</VAR>
+(one or two hex digits)
+<DT><CODE>\c<VAR>x</VAR></CODE>
+<DD>a control-<VAR>x</VAR> character
+</DL>
+<P>
+
+The expanded result is single-quoted, as if the dollar sign had not
+been present.
+</P><P>
+
+<A NAME="Locale Translation"></A>
+<HR SIZE="6">
+<A NAME="SEC13"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC12"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC8"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H4> 3.1.2.5 Locale-Specific Translation </H4>
+<!--docid::SEC13::-->
+<P>
+
+A double-quoted string preceded by a dollar sign (<SAMP>`$'</SAMP>) will cause
+the string to be translated according to the current locale.
+If the current locale is <CODE>C</CODE> or <CODE>POSIX</CODE>, the dollar sign
+is ignored.
+If the string is translated and replaced, the replacement is
+double-quoted.
+</P><P>
+
+<A NAME="IDX21"></A>
+<A NAME="IDX22"></A>
+<A NAME="IDX23"></A>
+Some systems use the message catalog selected by the <CODE>LC_MESSAGES</CODE>
+shell variable. Others create the name of the message catalog from the
+value of the <CODE>TEXTDOMAIN</CODE> shell variable, possibly adding a
+suffix of <SAMP>`.mo'</SAMP>. If you use the <CODE>TEXTDOMAIN</CODE> variable, you
+may need to set the <CODE>TEXTDOMAINDIR</CODE> variable to the location of
+the message catalog files. Still others use both variables in this
+fashion:
+<CODE>TEXTDOMAINDIR</CODE>/<CODE>LC_MESSAGES</CODE>/LC_MESSAGES/<CODE>TEXTDOMAIN</CODE>.mo.
+</P><P>
+
+<A NAME="Comments"></A>
+<HR SIZE="6">
+<A NAME="SEC14"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC13"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC6"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.1.3 Comments </H3>
+<!--docid::SEC14::-->
+<P>
+
+In a non-interactive shell, or an interactive shell in which the
+<CODE>interactive_comments</CODE> option to the <CODE>shopt</CODE>
+builtin is enabled (see section <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>),
+a word beginning with <SAMP>`#'</SAMP>
+causes that word and all remaining characters on that line to
+be ignored. An interactive shell without the <CODE>interactive_comments</CODE>
+option enabled does not allow comments. The <CODE>interactive_comments</CODE>
+option is on by default in interactive shells.
+See section <A HREF="bashref.html#SEC78">6.3 Interactive Shells</A>, for a description of what makes
+a shell interactive.
+</P><P>
+
+<A NAME="Shell Commands"></A>
+<HR SIZE="6">
+<A NAME="SEC15"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC14"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC16"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC24"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC24"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 3.2 Shell Commands </H2>
+<!--docid::SEC15::-->
+<P>
+
+A simple shell command such as <CODE>echo a b c</CODE> consists of the command
+itself followed by arguments, separated by spaces.
+</P><P>
+
+More complex shell commands are composed of simple commands arranged together
+in a variety of ways: in a pipeline in which the output of one command
+becomes the input of a second, in a loop or conditional construct, or in
+some other grouping.
+</P><P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC16">3.2.1 Simple Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The most common type of command.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC17">3.2.2 Pipelines</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Connecting the input and output of several
+ commands.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC18">3.2.3 Lists of Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to execute commands sequentially.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC19">3.2.4 Compound Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Shell commands for control flow.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC23">3.2.5 Coprocesses</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Two-way communication between commands.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+<A NAME="Simple Commands"></A>
+<HR SIZE="6">
+<A NAME="SEC16"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC17"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC24"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC24"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.2.1 Simple Commands </H3>
+<!--docid::SEC16::-->
+<P>
+
+A simple command is the kind of command encountered most often.
+It's just a sequence of words separated by <CODE>blank</CODE>s, terminated
+by one of the shell's control operators (see section <A HREF="bashref.html#SEC4">2. Definitions</A>). The
+first word generally specifies a command to be executed, with the
+rest of the words being that command's arguments.
+</P><P>
+
+The return status (see section <A HREF="bashref.html#SEC55">3.7.5 Exit Status</A>) of a simple command is
+its exit status as provided
+by the POSIX 1003.1 <CODE>waitpid</CODE> function, or 128+<VAR>n</VAR> if
+the command was terminated by signal <VAR>n</VAR>.
+</P><P>
+
+<A NAME="Pipelines"></A>
+<HR SIZE="6">
+<A NAME="SEC17"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC16"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC18"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC18"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC24"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.2.2 Pipelines </H3>
+<!--docid::SEC17::-->
+<P>
+
+A <CODE>pipeline</CODE> is a sequence of simple commands separated by one of
+the control operators <SAMP>`|'</SAMP> or <SAMP>`|&#38;'</SAMP>.
+</P><P>
+
+<A NAME="IDX24"></A>
+<A NAME="IDX25"></A>
+<A NAME="IDX26"></A>
+The format for a pipeline is
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>[<CODE>time</CODE> [<CODE>-p</CODE>]] [<CODE>!</CODE>] <VAR>command1</VAR> [ [<CODE>|</CODE> or <CODE>|&#38;</CODE>] <VAR>command2</VAR> <small>...</small>]
+</pre></td></tr></table></P><P>
+
+The output of each command in the pipeline is connected via a pipe
+to the input of the next command.
+That is, each command reads the previous command's output. This
+connection is performed before any redirections specified by the
+command.
+</P><P>
+
+If <SAMP>`|&#38;'</SAMP> is used, the standard error of <VAR>command1</VAR> is connected to
+<VAR>command2</VAR>'s standard input through the pipe; it is shorthand for
+<CODE>2&#62;&#38;1 |</CODE>. This implicit redirection of the standard error is
+performed after any redirections specified by the command.
+</P><P>
+
+The reserved word <CODE>time</CODE> causes timing statistics
+to be printed for the pipeline once it finishes.
+The statistics currently consist of elapsed (wall-clock) time and
+user and system time consumed by the command's execution.
+The <SAMP>`-p'</SAMP> option changes the output format to that specified
+by POSIX.
+The <CODE>TIMEFORMAT</CODE> variable may be set to a format string that
+specifies how the timing information should be displayed.
+See section <A HREF="bashref.html#SEC67">5.2 Bash Variables</A>, for a description of the available formats.
+The use of <CODE>time</CODE> as a reserved word permits the timing of
+shell builtins, shell functions, and pipelines. An external
+<CODE>time</CODE> command cannot time these easily.
+</P><P>
+
+If the pipeline is not executed asynchronously (see section <A HREF="bashref.html#SEC18">3.2.3 Lists of Commands</A>), the
+shell waits for all commands in the pipeline to complete.
+</P><P>
+
+Each command in a pipeline is executed in its own subshell
+(see section <A HREF="bashref.html#SEC53">3.7.3 Command Execution Environment</A>). The exit
+status of a pipeline is the exit status of the last command in the
+pipeline, unless the <CODE>pipefail</CODE> option is enabled
+(see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>).
+If <CODE>pipefail</CODE> is enabled, the pipeline's return status is the
+value of the last (rightmost) command to exit with a non-zero status,
+or zero if all commands exit successfully.
+If the reserved word <SAMP>`!'</SAMP> precedes the pipeline, the
+exit status is the logical negation of the exit status as described
+above.
+The shell waits for all commands in the pipeline to terminate before
+returning a value.
+</P><P>
+
+<A NAME="Lists"></A>
+<HR SIZE="6">
+<A NAME="SEC18"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC17"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC19"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC19"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC24"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.2.3 Lists of Commands </H3>
+<!--docid::SEC18::-->
+<P>
+
+A <CODE>list</CODE> is a sequence of one or more pipelines separated by one
+of the operators <SAMP>`;'</SAMP>, <SAMP>`&#38;'</SAMP>, <SAMP>`&#38;&#38;'</SAMP>, or <SAMP>`||'</SAMP>,
+and optionally terminated by one of <SAMP>`;'</SAMP>, <SAMP>`&#38;'</SAMP>, or a
+<CODE>newline</CODE>.
+</P><P>
+
+Of these list operators, <SAMP>`&#38;&#38;'</SAMP> and <SAMP>`||'</SAMP>
+have equal precedence, followed by <SAMP>`;'</SAMP> and <SAMP>`&#38;'</SAMP>,
+which have equal precedence.
+</P><P>
+
+A sequence of one or more newlines may appear in a <CODE>list</CODE>
+to delimit commands, equivalent to a semicolon.
+</P><P>
+
+If a command is terminated by the control operator <SAMP>`&#38;'</SAMP>,
+the shell executes the command asynchronously in a subshell.
+This is known as executing the command in the <VAR>background</VAR>.
+The shell does not wait for the command to finish, and the return
+status is 0 (true).
+When job control is not active (see section <A HREF="bashref.html#SEC91">7. Job Control</A>),
+the standard input for asynchronous commands, in the absence of any
+explicit redirections, is redirected from <CODE>/dev/null</CODE>.
+</P><P>
+
+Commands separated by a <SAMP>`;'</SAMP> are executed sequentially; the shell
+waits for each command to terminate in turn. The return status is the
+exit status of the last command executed.
+</P><P>
+
+AND and OR lists are sequences of one or more pipelines
+separated by the control operators <SAMP>`&#38;&#38;'</SAMP> and <SAMP>`||'</SAMP>,
+respectively. AND and OR lists are executed with left
+associativity.
+</P><P>
+
+An AND list has the form
+<TABLE><tr><td>&nbsp;</td><td class=example><pre><VAR>command1</VAR> &#38;&#38; <VAR>command2</VAR>
+</pre></td></tr></table></P><P>
+
+<VAR>command2</VAR> is executed if, and only if, <VAR>command1</VAR>
+returns an exit status of zero.
+</P><P>
+
+An OR list has the form
+<TABLE><tr><td>&nbsp;</td><td class=example><pre><VAR>command1</VAR> || <VAR>command2</VAR>
+</pre></td></tr></table></P><P>
+
+<VAR>command2</VAR> is executed if, and only if, <VAR>command1</VAR>
+returns a non-zero exit status.
+</P><P>
+
+The return status of
+AND and OR lists is the exit status of the last command
+executed in the list.
+</P><P>
+
+<A NAME="Compound Commands"></A>
+<HR SIZE="6">
+<A NAME="SEC19"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC18"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC20"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.2.4 Compound Commands </H3>
+<!--docid::SEC19::-->
+<P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Shell commands for iterative action.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Shell commands for conditional execution.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC22">3.2.4.3 Grouping Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Ways to group commands.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+Compound commands are the shell programming constructs.
+Each construct begins with a reserved word or control operator and is
+terminated by a corresponding reserved word or operator.
+Any redirections (see section <A HREF="bashref.html#SEC39">3.6 Redirections</A>) associated with a compound command
+apply to all commands within that compound command unless explicitly overridden.
+</P><P>
+
+Bash provides looping constructs, conditional commands, and mechanisms
+to group commands and execute them as a unit.
+</P><P>
+
+<A NAME="Looping Constructs"></A>
+<HR SIZE="6">
+<A NAME="SEC20"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC19"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC21"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC19"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H4> 3.2.4.1 Looping Constructs </H4>
+<!--docid::SEC20::-->
+<P>
+
+Bash supports the following looping constructs.
+</P><P>
+
+Note that wherever a <SAMP>`;'</SAMP> appears in the description of a
+command's syntax, it may be replaced with one or more newlines.
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>until</CODE>
+<DD><A NAME="IDX27"></A>
+<A NAME="IDX28"></A>
+<A NAME="IDX29"></A>
+The syntax of the <CODE>until</CODE> command is:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>until <VAR>test-commands</VAR>; do <VAR>consequent-commands</VAR>; done
+</pre></td></tr></table>Execute <VAR>consequent-commands</VAR> as long as
+<VAR>test-commands</VAR> has an exit status which is not zero.
+The return status is the exit status of the last command executed
+in <VAR>consequent-commands</VAR>, or zero if none was executed.
+<P>
+
+<DT><CODE>while</CODE>
+<DD><A NAME="IDX30"></A>
+The syntax of the <CODE>while</CODE> command is:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>while <VAR>test-commands</VAR>; do <VAR>consequent-commands</VAR>; done
+</pre></td></tr></table><P>
+
+Execute <VAR>consequent-commands</VAR> as long as
+<VAR>test-commands</VAR> has an exit status of zero.
+The return status is the exit status of the last command executed
+in <VAR>consequent-commands</VAR>, or zero if none was executed.
+</P><P>
+
+<DT><CODE>for</CODE>
+<DD><A NAME="IDX31"></A>
+The syntax of the <CODE>for</CODE> command is:
+<P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>for <VAR>name</VAR> [ [in [<VAR>words</VAR> <small>...</small>] ] ; ] do <VAR>commands</VAR>; done
+</pre></td></tr></table>Expand <VAR>words</VAR>, and execute <VAR>commands</VAR> once for each member
+in the resultant list, with <VAR>name</VAR> bound to the current member.
+If <SAMP>`in <VAR>words</VAR>'</SAMP> is not present, the <CODE>for</CODE> command
+executes the <VAR>commands</VAR> once for each positional parameter that is
+set, as if <SAMP>`in "$@"'</SAMP> had been specified
+(see section <A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A>).
+The return status is the exit status of the last command that executes.
+If there are no items in the expansion of <VAR>words</VAR>, no commands are
+executed, and the return status is zero.
+</P><P>
+
+An alternate form of the <CODE>for</CODE> command is also supported:
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>for (( <VAR>expr1</VAR> ; <VAR>expr2</VAR> ; <VAR>expr3</VAR> )) ; do <VAR>commands</VAR> ; done
+</pre></td></tr></table>First, the arithmetic expression <VAR>expr1</VAR> is evaluated according
+to the rules described below (see section <A HREF="bashref.html#SEC83">6.5 Shell Arithmetic</A>).
+The arithmetic expression <VAR>expr2</VAR> is then evaluated repeatedly
+until it evaluates to zero.
+Each time <VAR>expr2</VAR> evaluates to a non-zero value, <VAR>commands</VAR> are
+executed and the arithmetic expression <VAR>expr3</VAR> is evaluated.
+If any expression is omitted, it behaves as if it evaluates to 1.
+The return value is the exit status of the last command in <VAR>list</VAR>
+that is executed, or false if any of the expressions is invalid.
+</P><P>
+
+</DL>
+<P>
+
+The <CODE>break</CODE> and <CODE>continue</CODE> builtins (see section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>)
+may be used to control loop execution.
+</P><P>
+
+<A NAME="Conditional Constructs"></A>
+<HR SIZE="6">
+<A NAME="SEC21"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC20"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC22"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC22"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC19"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H4> 3.2.4.2 Conditional Constructs </H4>
+<!--docid::SEC21::-->
+<P>
+
+<DL COMPACT>
+<DT><CODE>if</CODE>
+<DD><A NAME="IDX32"></A>
+<A NAME="IDX33"></A>
+<A NAME="IDX34"></A>
+<A NAME="IDX35"></A>
+<A NAME="IDX36"></A>
+The syntax of the <CODE>if</CODE> command is:
+<P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>if <VAR>test-commands</VAR>; then
+ <VAR>consequent-commands</VAR>;
+[elif <VAR>more-test-commands</VAR>; then
+ <VAR>more-consequents</VAR>;]
+[else <VAR>alternate-consequents</VAR>;]
+fi
+</pre></td></tr></table></P><P>
+
+The <VAR>test-commands</VAR> list is executed, and if its return status is zero,
+the <VAR>consequent-commands</VAR> list is executed.
+If <VAR>test-commands</VAR> returns a non-zero status, each <CODE>elif</CODE> list
+is executed in turn, and if its exit status is zero,
+the corresponding <VAR>more-consequents</VAR> is executed and the
+command completes.
+If <SAMP>`else <VAR>alternate-consequents</VAR>'</SAMP> is present, and
+the final command in the final <CODE>if</CODE> or <CODE>elif</CODE> clause
+has a non-zero exit status, then <VAR>alternate-consequents</VAR> is executed.
+The return status is the exit status of the last command executed, or
+zero if no condition tested true.
+</P><P>
+
+<DT><CODE>case</CODE>
+<DD><A NAME="IDX37"></A>
+<A NAME="IDX38"></A>
+<A NAME="IDX39"></A>
+The syntax of the <CODE>case</CODE> command is:
+<P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>case <VAR>word</VAR> in [ [(] <VAR>pattern</VAR> [| <VAR>pattern</VAR>]<small>...</small>) <VAR>command-list</VAR> ;;]<small>...</small> esac</CODE>
+</pre></td></tr></table></P><P>
+
+<CODE>case</CODE> will selectively execute the <VAR>command-list</VAR> corresponding to
+the first <VAR>pattern</VAR> that matches <VAR>word</VAR>.
+If the shell option <CODE>nocasematch</CODE>
+(see the description of <CODE>shopt</CODE> in <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>)
+is enabled, the match is performed without regard to the case
+of alphabetic characters.
+The <SAMP>`|'</SAMP> is used to separate multiple patterns, and the <SAMP>`)'</SAMP>
+operator terminates a pattern list.
+A list of patterns and an associated command-list is known
+as a <VAR>clause</VAR>.
+</P><P>
+
+Each clause must be terminated with <SAMP>`;;'</SAMP>, <SAMP>`;&#38;'</SAMP>, or <SAMP>`;;&#38;'</SAMP>.
+The <VAR>word</VAR> undergoes tilde expansion, parameter expansion, command
+substitution, arithmetic expansion, and quote removal before matching is
+attempted. Each <VAR>pattern</VAR> undergoes tilde expansion, parameter
+expansion, command substitution, and arithmetic expansion.
+</P><P>
+
+There may be an arbitrary number of <CODE>case</CODE> clauses, each terminated
+by a <SAMP>`;;'</SAMP>, <SAMP>`;&#38;'</SAMP>, or <SAMP>`;;&#38;'</SAMP>.
+The first pattern that matches determines the
+command-list that is executed.
+</P><P>
+
+Here is an example using <CODE>case</CODE> in a script that could be used to
+describe one interesting feature of an animal:
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>echo -n "Enter the name of an animal: "
+read ANIMAL
+echo -n "The $ANIMAL has "
+case $ANIMAL in
+ horse | dog | cat) echo -n "four";;
+ man | kangaroo ) echo -n "two";;
+ *) echo -n "an unknown number of";;
+esac
+echo " legs."
+</pre></td></tr></table></P><P>
+
+</P><P>
+
+If the <SAMP>`;;'</SAMP> operator is used, no subsequent matches are attempted after
+the first pattern match.
+Using <SAMP>`;&#38;'</SAMP> in place of <SAMP>`;;'</SAMP> causes execution to continue with
+the <VAR>command-list</VAR> associated with the next clause, if any.
+Using <SAMP>`;;&#38;'</SAMP> in place of <SAMP>`;;'</SAMP> causes the shell to test the patterns
+in the next clause, if any, and execute any associated <VAR>command-list</VAR>
+on a successful match.
+</P><P>
+
+The return status is zero if no <VAR>pattern</VAR> is matched. Otherwise, the
+return status is the exit status of the <VAR>command-list</VAR> executed.
+</P><P>
+
+<DT><CODE>select</CODE>
+<DD><A NAME="IDX40"></A>
+<P>
+
+The <CODE>select</CODE> construct allows the easy generation of menus.
+It has almost the same syntax as the <CODE>for</CODE> command:
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>select <VAR>name</VAR> [in <VAR>words</VAR> <small>...</small>]; do <VAR>commands</VAR>; done
+</pre></td></tr></table></P><P>
+
+The list of words following <CODE>in</CODE> is expanded, generating a list
+of items. The set of expanded words is printed on the standard
+error output stream, each preceded by a number. If the
+<SAMP>`in <VAR>words</VAR>'</SAMP> is omitted, the positional parameters are printed,
+as if <SAMP>`in "$@"'</SAMP> had been specified.
+The <CODE>PS3</CODE> prompt is then displayed and a line is read from the
+standard input.
+If the line consists of a number corresponding to one of the displayed
+words, then the value of <VAR>name</VAR> is set to that word.
+If the line is empty, the words and prompt are displayed again.
+If <CODE>EOF</CODE> is read, the <CODE>select</CODE> command completes.
+Any other value read causes <VAR>name</VAR> to be set to null.
+The line read is saved in the variable <CODE>REPLY</CODE>.
+</P><P>
+
+The <VAR>commands</VAR> are executed after each selection until a
+<CODE>break</CODE> command is executed, at which
+point the <CODE>select</CODE> command completes.
+</P><P>
+
+Here is an example that allows the user to pick a filename from the
+current directory, and displays the name and index of the file
+selected.
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>select fname in *;
+do
+ echo you picked $fname \($REPLY\)
+ break;
+done
+</pre></td></tr></table></P><P>
+
+<DT><CODE>((<small>...</small>))</CODE>
+<DD><TABLE><tr><td>&nbsp;</td><td class=example><pre>(( <VAR>expression</VAR> ))
+</pre></td></tr></table><P>
+
+The arithmetic <VAR>expression</VAR> is evaluated according to the rules
+described below (see section <A HREF="bashref.html#SEC83">6.5 Shell Arithmetic</A>).
+If the value of the expression is non-zero, the return status is 0;
+otherwise the return status is 1. This is exactly equivalent to
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>let "<VAR>expression</VAR>"
+</pre></td></tr></table>See section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>, for a full description of the <CODE>let</CODE> builtin.
+</P><P>
+
+<DT><CODE>[[<small>...</small>]]</CODE>
+<DD><A NAME="IDX41"></A>
+<A NAME="IDX42"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>[[ <VAR>expression</VAR> ]]
+</pre></td></tr></table><P>
+
+Return a status of 0 or 1 depending on the evaluation of
+the conditional expression <VAR>expression</VAR>.
+Expressions are composed of the primaries described below in
+<A HREF="bashref.html#SEC82">6.4 Bash Conditional Expressions</A>.
+Word splitting and filename expansion are not performed on the words
+between the <SAMP>`[['</SAMP> and <SAMP>`]]'</SAMP>; tilde expansion, parameter and
+variable expansion, arithmetic expansion, command substitution, process
+substitution, and quote removal are performed.
+Conditional operators such as <SAMP>`-f'</SAMP> must be unquoted to be recognized
+as primaries.
+</P><P>
+
+When used with <SAMP>`[['</SAMP>, The <SAMP>`&#60;'</SAMP> and <SAMP>`&#62;'</SAMP> operators sort
+lexicographically using the current locale.
+</P><P>
+
+When the <SAMP>`=='</SAMP> and <SAMP>`!='</SAMP> operators are used, the string to the
+right of the operator is considered a pattern and matched according
+to the rules described below in <A HREF="bashref.html#SEC37">3.5.8.1 Pattern Matching</A>.
+If the shell option <CODE>nocasematch</CODE>
+(see the description of <CODE>shopt</CODE> in <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>)
+is enabled, the match is performed without regard to the case
+of alphabetic characters.
+The return value is 0 if the string matches (<SAMP>`=='</SAMP>) or does not
+match (<SAMP>`!='</SAMP>)the pattern, and 1 otherwise.
+Any part of the pattern may be quoted to force it to be matched as a
+string.
+</P><P>
+
+An additional binary operator, <SAMP>`=~'</SAMP>, is available, with the same
+precedence as <SAMP>`=='</SAMP> and <SAMP>`!='</SAMP>.
+When it is used, the string to the right of the operator is considered
+an extended regular expression and matched accordingly (as in <I>regex</I>3)).
+The return value is 0 if the string matches
+the pattern, and 1 otherwise.
+If the regular expression is syntactically incorrect, the conditional
+expression's return value is 2.
+If the shell option <CODE>nocasematch</CODE>
+(see the description of <CODE>shopt</CODE> in <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>)
+is enabled, the match is performed without regard to the case
+of alphabetic characters.
+Any part of the pattern may be quoted to force it to be matched as a
+string.
+Substrings matched by parenthesized subexpressions within the regular
+expression are saved in the array variable <CODE>BASH_REMATCH</CODE>.
+The element of <CODE>BASH_REMATCH</CODE> with index 0 is the portion of the string
+matching the entire regular expression.
+The element of <CODE>BASH_REMATCH</CODE> with index <VAR>n</VAR> is the portion of the
+string matching the <VAR>n</VAR>th parenthesized subexpression.
+</P><P>
+
+Expressions may be combined using the following operators, listed
+in decreasing order of precedence:
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>( <VAR>expression</VAR> )</CODE>
+<DD>Returns the value of <VAR>expression</VAR>.
+This may be used to override the normal precedence of operators.
+<P>
+
+<DT><CODE>! <VAR>expression</VAR></CODE>
+<DD>True if <VAR>expression</VAR> is false.
+<P>
+
+<DT><CODE><VAR>expression1</VAR> &#38;&#38; <VAR>expression2</VAR></CODE>
+<DD>True if both <VAR>expression1</VAR> and <VAR>expression2</VAR> are true.
+<P>
+
+<DT><CODE><VAR>expression1</VAR> || <VAR>expression2</VAR></CODE>
+<DD>True if either <VAR>expression1</VAR> or <VAR>expression2</VAR> is true.
+</DL>
+The <CODE>&#38;&#38;</CODE> and <CODE>||</CODE> operators do not evaluate <VAR>expression2</VAR> if the
+value of <VAR>expression1</VAR> is sufficient to determine the return
+value of the entire conditional expression.
+<P>
+
+</DL>
+<P>
+
+<A NAME="Command Grouping"></A>
+<HR SIZE="6">
+<A NAME="SEC22"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC21"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC19"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H4> 3.2.4.3 Grouping Commands </H4>
+<!--docid::SEC22::-->
+<P>
+
+Bash provides two ways to group a list of commands to be executed
+as a unit. When commands are grouped, redirections may be applied
+to the entire command list. For example, the output of all the
+commands in the list may be redirected to a single stream.
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>()</CODE>
+<DD><TABLE><tr><td>&nbsp;</td><td class=example><pre>( <VAR>list</VAR> )
+</pre></td></tr></table><P>
+
+Placing a list of commands between parentheses causes a subshell
+environment to be created (see section <A HREF="bashref.html#SEC53">3.7.3 Command Execution Environment</A>), and each
+of the commands in <VAR>list</VAR> to be executed in that subshell. Since the
+<VAR>list</VAR> is executed in a subshell, variable assignments do not remain in
+effect after the subshell completes.
+</P><P>
+
+<DT><CODE>{}</CODE>
+<DD><A NAME="IDX43"></A>
+<A NAME="IDX44"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>{ <VAR>list</VAR>; }
+</pre></td></tr></table><P>
+
+Placing a list of commands between curly braces causes the list to
+be executed in the current shell context. No subshell is created.
+The semicolon (or newline) following <VAR>list</VAR> is required.
+</DL>
+<P>
+
+In addition to the creation of a subshell, there is a subtle difference
+between these two constructs due to historical reasons. The braces
+are <CODE>reserved words</CODE>, so they must be separated from the <VAR>list</VAR>
+by <CODE>blank</CODE>s or other shell metacharacters.
+The parentheses are <CODE>operators</CODE>, and are
+recognized as separate tokens by the shell even if they are not separated
+from the <VAR>list</VAR> by whitespace.
+</P><P>
+
+The exit status of both of these constructs is the exit status of
+<VAR>list</VAR>.
+</P><P>
+
+<A NAME="Coprocesses"></A>
+<HR SIZE="6">
+<A NAME="SEC23"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC22"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC24"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC24"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC15"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC24"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.2.5 Coprocesses </H3>
+<!--docid::SEC23::-->
+<P>
+
+A <CODE>coprocess</CODE> is a shell command preceded by the <CODE>coproc</CODE>
+reserved word.
+A coprocess is executed asynchronously in a subshell, as if the command
+had been terminated with the <SAMP>`&#38;'</SAMP> control operator, with a two-way pipe
+established between the executing shell and the coprocess.
+</P><P>
+
+The format for a coprocess is:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>coproc</CODE> [<VAR>NAME</VAR>] <VAR>command</VAR> [<VAR>redirections</VAR>]
+</pre></td></tr></table></P><P>
+
+This creates a coprocess named <VAR>NAME</VAR>.
+If <VAR>NAME</VAR> is not supplied, the default name is <VAR>COPROC</VAR>.
+<VAR>NAME</VAR> must not be supplied if <VAR>command</VAR> is a simple
+command (see section <A HREF="bashref.html#SEC16">3.2.1 Simple Commands</A>); otherwise, it is interpreted as
+the first word of the simple command.
+</P><P>
+
+When the coproc is executed, the shell creates an array variable
+(see section <A HREF="bashref.html#SEC85">6.7 Arrays</A>)
+named <VAR>NAME</VAR> in the context of the executing shell.
+The standard output of <VAR>command</VAR>
+is connected via a pipe to a file descriptor in the executing shell,
+and that file descriptor is assigned to <VAR>NAME</VAR>[0].
+The standard input of <VAR>command</VAR>
+is connected via a pipe to a file descriptor in the executing shell,
+and that file descriptor is assigned to <VAR>NAME</VAR>[1].
+This pipe is established before any redirections specified by the
+command (see section <A HREF="bashref.html#SEC39">3.6 Redirections</A>).
+The file descriptors can be utilized as arguments to shell commands
+and redirections using standard word expansions.
+</P><P>
+
+The process id of the shell spawned to execute the coprocess is
+available as the value of the variable <VAR>NAME</VAR>_PID.
+The <CODE>wait</CODE>
+builtin command may be used to wait for the coprocess to terminate.
+</P><P>
+
+The return status of a coprocess is the exit status of <VAR>command</VAR>.
+</P><P>
+
+<A NAME="Shell Functions"></A>
+<HR SIZE="6">
+<A NAME="SEC24"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC23"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC25"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC25"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC58"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 3.3 Shell Functions </H2>
+<!--docid::SEC24::-->
+<P>
+
+Shell functions are a way to group commands for later execution
+using a single name for the group. They are executed just like
+a "regular" command.
+When the name of a shell function is used as a simple command name,
+the list of commands associated with that function name is executed.
+Shell functions are executed in the current
+shell context; no new process is created to interpret them.
+</P><P>
+
+Functions are declared using this syntax:
+<A NAME="IDX45"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>[ <CODE>function</CODE> ] <VAR>name</VAR> () <VAR>compound-command</VAR> [ <VAR>redirections</VAR> ]
+</pre></td></tr></table></P><P>
+
+This defines a shell function named <VAR>name</VAR>. The reserved
+word <CODE>function</CODE> is optional.
+If the <CODE>function</CODE> reserved
+word is supplied, the parentheses are optional.
+The <VAR>body</VAR> of the function is the compound command
+<VAR>compound-command</VAR> (see section <A HREF="bashref.html#SEC19">3.2.4 Compound Commands</A>).
+That command is usually a <VAR>list</VAR> enclosed between { and }, but
+may be any compound command listed above.
+<VAR>compound-command</VAR> is executed whenever <VAR>name</VAR> is specified as the
+name of a command.
+Any redirections (see section <A HREF="bashref.html#SEC39">3.6 Redirections</A>) associated with the shell function
+are performed when the function is executed.
+</P><P>
+
+A function definition may be deleted using the <SAMP>`-f'</SAMP> option to the
+<CODE>unset</CODE> builtin (see section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>).
+</P><P>
+
+The exit status of a function definition is zero unless a syntax error
+occurs or a readonly function with the same name already exists.
+When executed, the exit status of a function is the exit status of the
+last command executed in the body.
+</P><P>
+
+Note that for historical reasons, in the most common usage the curly braces
+that surround the body of the function must be separated from the body by
+<CODE>blank</CODE>s or newlines.
+This is because the braces are reserved words and are only recognized
+as such when they are separated from the command list
+by whitespace or another shell metacharacter.
+Also, when using the braces, the <VAR>list</VAR> must be terminated by a semicolon,
+a <SAMP>`&#38;'</SAMP>, or a newline.
+</P><P>
+
+When a function is executed, the arguments to the
+function become the positional parameters
+during its execution (see section <A HREF="bashref.html#SEC26">3.4.1 Positional Parameters</A>).
+The special parameter <SAMP>`#'</SAMP> that expands to the number of
+positional parameters is updated to reflect the change.
+Special parameter <CODE>0</CODE> is unchanged.
+The first element of the <CODE>FUNCNAME</CODE> variable is set to the
+name of the function while the function is executing.
+</P><P>
+
+All other aspects of the shell execution
+environment are identical between a function and its caller
+with these exceptions:
+the <CODE>DEBUG</CODE> and <CODE>RETURN</CODE> traps
+are not inherited unless the function has been given the
+<CODE>trace</CODE> attribute using the <CODE>declare</CODE> builtin or
+the <CODE>-o functrace</CODE> option has been enabled with
+the <CODE>set</CODE> builtin,
+(in which case all functions inherit the <CODE>DEBUG</CODE> and <CODE>RETURN</CODE> traps),
+and the <CODE>ERR</CODE> trap is not inherited unless the <CODE>-o errtrace</CODE>
+shell option has been enabled.
+See section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>, for the description of the
+<CODE>trap</CODE> builtin.
+</P><P>
+
+If the builtin command <CODE>return</CODE>
+is executed in a function, the function completes and
+execution resumes with the next command after the function
+call.
+Any command associated with the <CODE>RETURN</CODE> trap is executed
+before execution resumes.
+When a function completes, the values of the
+positional parameters and the special parameter <SAMP>`#'</SAMP>
+are restored to the values they had prior to the function's
+execution. If a numeric argument is given to <CODE>return</CODE>,
+that is the function's return status; otherwise the function's
+return status is the exit status of the last command executed
+before the <CODE>return</CODE>.
+</P><P>
+
+Variables local to the function may be declared with the
+<CODE>local</CODE> builtin. These variables are visible only to
+the function and the commands it invokes.
+</P><P>
+
+Function names and definitions may be listed with the
+<SAMP>`-f'</SAMP> option to the <CODE>declare</CODE> or <CODE>typeset</CODE>
+builtin commands (see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>).
+The <SAMP>`-F'</SAMP> option to <CODE>declare</CODE> or <CODE>typeset</CODE>
+will list the function names only
+(and optionally the source file and line number, if the <CODE>extdebug</CODE>
+shell option is enabled).
+Functions may be exported so that subshells
+automatically have them defined with the
+<SAMP>`-f'</SAMP> option to the <CODE>export</CODE> builtin
+(see section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>).
+Note that shell functions and variables with the same name may result
+in multiple identically-named entries in the environment passed to the
+shell's children.
+Care should be taken in cases where this may cause a problem.
+</P><P>
+
+Functions may be recursive. No limit is placed on the number of
+recursive calls.
+</P><P>
+
+<A NAME="Shell Parameters"></A>
+<HR SIZE="6">
+<A NAME="SEC25"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC24"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC26"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 3.4 Shell Parameters </H2>
+<!--docid::SEC25::-->
+<P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC26">3.4.1 Positional Parameters</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The shell's command-line arguments.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Parameters denoted by special characters.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+A <VAR>parameter</VAR> is an entity that stores values.
+It can be a <CODE>name</CODE>, a number, or one of the special characters
+listed below.
+A <VAR>variable</VAR> is a parameter denoted by a <CODE>name</CODE>.
+A variable has a <VAR>value</VAR> and zero or more <VAR>attributes</VAR>.
+Attributes are assigned using the <CODE>declare</CODE> builtin command
+(see the description of the <CODE>declare</CODE> builtin in <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>).
+</P><P>
+
+A parameter is set if it has been assigned a value. The null string is
+a valid value. Once a variable is set, it may be unset only by using
+the <CODE>unset</CODE> builtin command.
+</P><P>
+
+A variable may be assigned to by a statement of the form
+<TABLE><tr><td>&nbsp;</td><td class=example><pre><VAR>name</VAR>=[<VAR>value</VAR>]
+</pre></td></tr></table>If <VAR>value</VAR>
+is not given, the variable is assigned the null string. All
+<VAR>value</VAR>s undergo tilde expansion, parameter and variable expansion,
+command substitution, arithmetic expansion, and quote
+removal (detailed below). If the variable has its <CODE>integer</CODE>
+attribute set, then <VAR>value</VAR>
+is evaluated as an arithmetic expression even if the <CODE>$((<small>...</small>))</CODE>
+expansion is not used (see section <A HREF="bashref.html#SEC33">3.5.5 Arithmetic Expansion</A>).
+Word splitting is not performed, with the exception
+of <CODE>"$@"</CODE> as explained below.
+Filename expansion is not performed.
+Assignment statements may also appear as arguments to the
+<CODE>alias</CODE>,
+<CODE>declare</CODE>, <CODE>typeset</CODE>, <CODE>export</CODE>, <CODE>readonly</CODE>,
+and <CODE>local</CODE> builtin commands.
+</P><P>
+
+In the context where an assignment statement is assigning a value
+to a shell variable or array index (see section <A HREF="bashref.html#SEC85">6.7 Arrays</A>), the <SAMP>`+='</SAMP>
+operator can be used to
+append to or add to the variable's previous value.
+When <SAMP>`+='</SAMP> is applied to a variable for which the integer attribute
+has been set, <VAR>value</VAR> is evaluated as an arithmetic expression and
+added to the variable's current value, which is also evaluated.
+When <SAMP>`+='</SAMP> is applied to an array variable using compound assignment
+(see section <A HREF="bashref.html#SEC85">6.7 Arrays</A>), the
+variable's value is not unset (as it is when using <SAMP>`='</SAMP>), and new
+values are appended to the array beginning at one greater than the array's
+maximum index (for indexed arrays), or added as additional key-value pairs
+in an associative array.
+When applied to a string-valued variable, <VAR>value</VAR> is expanded and
+appended to the variable's value.
+</P><P>
+
+<A NAME="Positional Parameters"></A>
+<HR SIZE="6">
+<A NAME="SEC26"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC25"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC25"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.4.1 Positional Parameters </H3>
+<!--docid::SEC26::-->
+<P>
+
+A <VAR>positional parameter</VAR> is a parameter denoted by one or more
+digits, other than the single digit <CODE>0</CODE>. Positional parameters are
+assigned from the shell's arguments when it is invoked,
+and may be reassigned using the <CODE>set</CODE> builtin command.
+Positional parameter <CODE>N</CODE> may be referenced as <CODE>${N}</CODE>, or
+as <CODE>$N</CODE> when <CODE>N</CODE> consists of a single digit.
+Positional parameters may not be assigned to with assignment statements.
+The <CODE>set</CODE> and <CODE>shift</CODE> builtins are used to set and
+unset them (see section <A HREF="bashref.html#SEC58">4. Shell Builtin Commands</A>).
+The positional parameters are
+temporarily replaced when a shell function is executed
+(see section <A HREF="bashref.html#SEC24">3.3 Shell Functions</A>).
+</P><P>
+
+When a positional parameter consisting of more than a single
+digit is expanded, it must be enclosed in braces.
+</P><P>
+
+<A NAME="Special Parameters"></A>
+<HR SIZE="6">
+<A NAME="SEC27"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC26"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC25"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.4.2 Special Parameters </H3>
+<!--docid::SEC27::-->
+<P>
+
+The shell treats several parameters specially. These parameters may
+only be referenced; assignment to them is not allowed.
+</P><P>
+
+<DL COMPACT>
+
+<A NAME="IDX46"></A>
+<DT><CODE>*</CODE>
+<DD><A NAME="IDX47"></A>
+Expands to the positional parameters, starting from one. When the
+expansion occurs within double quotes, it expands to a single word
+with the value of each parameter separated by the first character
+of the <CODE>IFS</CODE>
+special variable. That is, <CODE>"$*"</CODE> is equivalent
+to <CODE>"$1<VAR>c</VAR>$2<VAR>c</VAR><small>...</small>"</CODE>, where <VAR>c</VAR>
+is the first character of the value of the <CODE>IFS</CODE>
+variable.
+If <CODE>IFS</CODE> is unset, the parameters are separated by spaces.
+If <CODE>IFS</CODE> is null, the parameters are joined without intervening
+separators.
+<P>
+
+<A NAME="IDX48"></A>
+<DT><CODE>@</CODE>
+<DD><A NAME="IDX49"></A>
+Expands to the positional parameters, starting from one. When the
+expansion occurs within double quotes, each parameter expands to a
+separate word. That is, <CODE>"$@"</CODE> is equivalent to
+<CODE>"$1" "$2" <small>...</small></CODE>.
+If the double-quoted expansion occurs within a word, the expansion of
+the first parameter is joined with the beginning part of the original
+word, and the expansion of the last parameter is joined with the last
+part of the original word.
+When there are no positional parameters, <CODE>"$@"</CODE> and
+<CODE>$@</CODE>
+expand to nothing (i.e., they are removed).
+<P>
+
+<A NAME="IDX50"></A>
+<DT><CODE>#</CODE>
+<DD><A NAME="IDX51"></A>
+Expands to the number of positional parameters in decimal.
+<P>
+
+<A NAME="IDX52"></A>
+<DT><CODE>?</CODE>
+<DD><A NAME="IDX53"></A>
+Expands to the exit status of the most recently executed foreground
+pipeline.
+<P>
+
+<A NAME="IDX54"></A>
+<DT><CODE>-</CODE>
+<DD><A NAME="IDX55"></A>
+(A hyphen.) Expands to the current option flags as specified upon
+invocation, by the <CODE>set</CODE>
+builtin command, or those set by the shell itself
+(such as the <SAMP>`-i'</SAMP> option).
+<P>
+
+<A NAME="IDX56"></A>
+<DT><CODE>$</CODE>
+<DD><A NAME="IDX57"></A>
+Expands to the process ID of the shell. In a <CODE>()</CODE> subshell, it
+expands to the process ID of the invoking shell, not the subshell.
+<P>
+
+<A NAME="IDX58"></A>
+<DT><CODE>!</CODE>
+<DD><A NAME="IDX59"></A>
+Expands to the process ID of the most recently executed background
+(asynchronous) command.
+<P>
+
+<A NAME="IDX60"></A>
+<DT><CODE>0</CODE>
+<DD><A NAME="IDX61"></A>
+Expands to the name of the shell or shell script. This is set at
+shell initialization. If Bash is invoked with a file of commands
+(see section <A HREF="bashref.html#SEC57">3.8 Shell Scripts</A>), <CODE>$0</CODE> is set to the name of that file.
+If Bash is started with the <SAMP>`-c'</SAMP> option (see section <A HREF="bashref.html#SEC69">6.1 Invoking Bash</A>),
+then <CODE>$0</CODE> is set to the first argument after the string to be
+executed, if one is present. Otherwise, it is set
+to the filename used to invoke Bash, as given by argument zero.
+<P>
+
+<A NAME="IDX62"></A>
+<DT><CODE>_</CODE>
+<DD><A NAME="IDX63"></A>
+(An underscore.)
+At shell startup, set to the absolute pathname used to invoke the
+shell or shell script being executed as passed in the environment
+or argument list.
+Subsequently, expands to the last argument to the previous command,
+after expansion.
+Also set to the full pathname used to invoke each command executed
+and placed in the environment exported to that command.
+When checking mail, this parameter holds the name of the mail file.
+</DL>
+<P>
+
+<A NAME="Shell Expansions"></A>
+<HR SIZE="6">
+<A NAME="SEC28"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC27"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC29"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 3.5 Shell Expansions </H2>
+<!--docid::SEC28::-->
+<P>
+
+Expansion is performed on the command line after it has been split into
+<CODE>token</CODE>s. There are seven kinds of expansion performed:
+<UL>
+<LI>brace expansion
+<LI>tilde expansion
+<LI>parameter and variable expansion
+<LI>command substitution
+<LI>arithmetic expansion
+<LI>word splitting
+<LI>filename expansion
+</UL>
+<P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC29">3.5.1 Brace Expansion</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Expansion of expressions within braces.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC30">3.5.2 Tilde Expansion</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Expansion of the ~ character.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC31">3.5.3 Shell Parameter Expansion</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How Bash expands variables to their values.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC32">3.5.4 Command Substitution</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Using the output of a command as an argument.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC33">3.5.5 Arithmetic Expansion</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to use arithmetic in shell expansions.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC34">3.5.6 Process Substitution</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A way to write and read to and from a
+ command.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC35">3.5.7 Word Splitting</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How the results of expansion are split into separate
+ arguments.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC36">3.5.8 Filename Expansion</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A shorthand for specifying filenames matching patterns.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC38">3.5.9 Quote Removal</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How and when quote characters are removed from
+ words.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+The order of expansions is: brace expansion, tilde expansion,
+parameter, variable, and arithmetic expansion and
+command substitution
+(done in a left-to-right fashion), word splitting, and filename
+expansion.
+</P><P>
+
+On systems that can support it, there is an additional expansion
+available: <VAR>process substitution</VAR>. This is performed at the
+same time as parameter, variable, and arithmetic expansion and
+command substitution.
+</P><P>
+
+Only brace expansion, word splitting, and filename expansion
+can change the number of words of the expansion; other expansions
+expand a single word to a single word.
+The only exceptions to this are the expansions of
+<CODE>"$@"</CODE> (see section <A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A>) and <CODE>"${<VAR>name</VAR>[@]}"</CODE>
+(see section <A HREF="bashref.html#SEC85">6.7 Arrays</A>).
+</P><P>
+
+After all expansions, <CODE>quote removal</CODE> (see section <A HREF="bashref.html#SEC38">3.5.9 Quote Removal</A>)
+is performed.
+</P><P>
+
+<A NAME="Brace Expansion"></A>
+<HR SIZE="6">
+<A NAME="SEC29"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC30"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.5.1 Brace Expansion </H3>
+<!--docid::SEC29::-->
+<P>
+
+Brace expansion is a mechanism by which arbitrary strings may be generated.
+This mechanism is similar to
+<VAR>filename expansion</VAR> (see section <A HREF="bashref.html#SEC36">3.5.8 Filename Expansion</A>),
+but the file names generated need not exist.
+Patterns to be brace expanded take the form of an optional <VAR>preamble</VAR>,
+followed by either a series of comma-separated strings or a seqeunce expression
+between a pair of braces,
+followed by an optional <VAR>postscript</VAR>.
+The preamble is prefixed to each string contained within the braces, and
+the postscript is then appended to each resulting string, expanding left
+to right.
+</P><P>
+
+Brace expansions may be nested.
+The results of each expanded string are not sorted; left to right order
+is preserved.
+For example,
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>bash$ echo a{d,c,b}e
+ade ace abe
+</pre></td></tr></table></P><P>
+
+A sequence expression takes the form <CODE>{<VAR>x</VAR>..<VAR>y</VAR>[..<VAR>incr</VAR>]}</CODE>,
+where <VAR>x</VAR> and <VAR>y</VAR> are either integers or single characters,
+and <VAR>incr</VAR>, an optional increment, is an integer.
+When integers are supplied, the expression expands to each number between
+<VAR>x</VAR> and <VAR>y</VAR>, inclusive.
+Supplied integers may be prefixed with <SAMP>`0'</SAMP> to force each term to have the
+same width. When either <VAR>x</VAR> or <VAR>y</VAR> begins with a zero, the shell
+attempts to force all generated terms to contain the same number of digits,
+zero-padding where necessary.
+When characters are supplied, the expression expands to each character
+lexicographically between <VAR>x</VAR> and <VAR>y</VAR>, inclusive. Note that
+both <VAR>x</VAR> and <VAR>y</VAR> must be of the same type.
+When the increment is supplied, it is used as the difference between
+each term. The default increment is 1 or -1 as appropriate.
+</P><P>
+
+Brace expansion is performed before any other expansions,
+and any characters special to other expansions are preserved
+in the result. It is strictly textual. Bash
+does not apply any syntactic interpretation to the context of the
+expansion or the text between the braces.
+To avoid conflicts with parameter expansion, the string <SAMP>`${'</SAMP>
+is not considered eligible for brace expansion.
+</P><P>
+
+A correctly-formed brace expansion must contain unquoted opening
+and closing braces, and at least one unquoted comma or a valid
+sequence expression.
+Any incorrectly formed brace expansion is left unchanged.
+</P><P>
+
+A { or <SAMP>`,'</SAMP> may be quoted with a backslash to prevent its
+being considered part of a brace expression.
+To avoid conflicts with parameter expansion, the string <SAMP>`${'</SAMP>
+is not considered eligible for brace expansion.
+</P><P>
+
+This construct is typically used as shorthand when the common
+prefix of the strings to be generated is longer than in the
+above example:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>mkdir /usr/local/src/bash/{old,new,dist,bugs}
+</pre></td></tr></table>or
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}
+</pre></td></tr></table></P><P>
+
+<A NAME="Tilde Expansion"></A>
+<HR SIZE="6">
+<A NAME="SEC30"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC29"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC31"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC31"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.5.2 Tilde Expansion </H3>
+<!--docid::SEC30::-->
+<P>
+
+If a word begins with an unquoted tilde character (<SAMP>`~'</SAMP>), all of the
+characters up to the first unquoted slash (or all characters,
+if there is no unquoted slash) are considered a <VAR>tilde-prefix</VAR>.
+If none of the characters in the tilde-prefix are quoted, the
+characters in the tilde-prefix following the tilde are treated as a
+possible <VAR>login name</VAR>.
+If this login name is the null string, the tilde is replaced with the
+value of the <CODE>HOME</CODE> shell variable.
+If <CODE>HOME</CODE> is unset, the home directory of the user executing the
+shell is substituted instead.
+Otherwise, the tilde-prefix is replaced with the home directory
+associated with the specified login name.
+</P><P>
+
+If the tilde-prefix is <SAMP>`~+'</SAMP>, the value of
+the shell variable <CODE>PWD</CODE> replaces the tilde-prefix.
+If the tilde-prefix is <SAMP>`~-'</SAMP>, the value of the shell variable
+<CODE>OLDPWD</CODE>, if it is set, is substituted.
+</P><P>
+
+If the characters following the tilde in the tilde-prefix consist of a
+number <VAR>N</VAR>, optionally prefixed by a <SAMP>`+'</SAMP> or a <SAMP>`-'</SAMP>,
+the tilde-prefix is replaced with the
+corresponding element from the directory stack, as it would be displayed
+by the <CODE>dirs</CODE> builtin invoked with the characters following tilde
+in the tilde-prefix as an argument (see section <A HREF="bashref.html#SEC86">6.8 The Directory Stack</A>).
+If the tilde-prefix, sans the tilde, consists of a number without a
+leading <SAMP>`+'</SAMP> or <SAMP>`-'</SAMP>, <SAMP>`+'</SAMP> is assumed.
+</P><P>
+
+If the login name is invalid, or the tilde expansion fails, the word is
+left unchanged.
+</P><P>
+
+Each variable assignment is checked for unquoted tilde-prefixes immediately
+following a <SAMP>`:'</SAMP> or the first <SAMP>`='</SAMP>.
+In these cases, tilde expansion is also performed.
+Consequently, one may use file names with tildes in assignments to
+<CODE>PATH</CODE>, <CODE>MAILPATH</CODE>, and <CODE>CDPATH</CODE>,
+and the shell assigns the expanded value.
+</P><P>
+
+The following table shows how Bash treats unquoted tilde-prefixes:
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>~</CODE>
+<DD>The value of <CODE>$HOME</CODE>
+<DT><CODE>~/foo</CODE>
+<DD><TT>`$HOME/foo'</TT>
+<P>
+
+<DT><CODE>~fred/foo</CODE>
+<DD>The subdirectory <CODE>foo</CODE> of the home directory of the user
+<CODE>fred</CODE>
+<P>
+
+<DT><CODE>~+/foo</CODE>
+<DD><TT>`$PWD/foo'</TT>
+<P>
+
+<DT><CODE>~-/foo</CODE>
+<DD><TT>`${OLDPWD-'~-'}/foo'</TT>
+<P>
+
+<DT><CODE>~<VAR>N</VAR></CODE>
+<DD>The string that would be displayed by <SAMP>`dirs +<VAR>N</VAR>'</SAMP>
+<P>
+
+<DT><CODE>~+<VAR>N</VAR></CODE>
+<DD>The string that would be displayed by <SAMP>`dirs +<VAR>N</VAR>'</SAMP>
+<P>
+
+<DT><CODE>~-<VAR>N</VAR></CODE>
+<DD>The string that would be displayed by <SAMP>`dirs -<VAR>N</VAR>'</SAMP>
+<P>
+
+</DL>
+<P>
+
+<A NAME="Shell Parameter Expansion"></A>
+<HR SIZE="6">
+<A NAME="SEC31"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC30"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC32"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC32"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.5.3 Shell Parameter Expansion </H3>
+<!--docid::SEC31::-->
+<P>
+
+The <SAMP>`$'</SAMP> character introduces parameter expansion,
+command substitution, or arithmetic expansion. The parameter name
+or symbol to be expanded may be enclosed in braces, which
+are optional but serve to protect the variable to be expanded from
+characters immediately following it which could be
+interpreted as part of the name.
+</P><P>
+
+When braces are used, the matching ending brace is the first <SAMP>`}'</SAMP>
+not escaped by a backslash or within a quoted string, and not within an
+embedded arithmetic expansion, command substitution, or parameter
+expansion.
+</P><P>
+
+The basic form of parameter expansion is ${<VAR>parameter</VAR>}.
+The value of <VAR>parameter</VAR> is substituted. The braces are required
+when <VAR>parameter</VAR>
+is a positional parameter with more than one digit,
+or when <VAR>parameter</VAR>
+is followed by a character that is not to be
+interpreted as part of its name.
+</P><P>
+
+If the first character of <VAR>parameter</VAR> is an exclamation point (!),
+a level of variable indirection is introduced.
+Bash uses the value of the variable formed from the rest of
+<VAR>parameter</VAR> as the name of the variable; this variable is then
+expanded and that value is used in the rest of the substitution, rather
+than the value of <VAR>parameter</VAR> itself.
+This is known as <CODE>indirect expansion</CODE>.
+The exceptions to this are the expansions of ${!<VAR>prefix*</VAR>}
+and ${!<VAR>name</VAR>[@]}
+described below.
+The exclamation point must immediately follow the left brace in order to
+introduce indirection.
+</P><P>
+
+In each of the cases below, <VAR>word</VAR> is subject to tilde expansion,
+parameter expansion, command substitution, and arithmetic expansion.
+</P><P>
+
+When not performing substring expansion, using the form described
+below, Bash tests for a parameter that is unset or null.
+Omitting the colon results in a test only for a parameter that is unset.
+Put another way, if the colon is included,
+the operator tests for both <VAR>parameter</VAR>'s existence and that its value
+is not null; if the colon is omitted, the operator tests only for existence.
+</P><P>
+
+<DL COMPACT>
+
+<DT><CODE>${<VAR>parameter</VAR>:-<VAR>word</VAR>}</CODE>
+<DD>If <VAR>parameter</VAR> is unset or null, the expansion of
+<VAR>word</VAR> is substituted. Otherwise, the value of
+<VAR>parameter</VAR> is substituted.
+<P>
+
+<DT><CODE>${<VAR>parameter</VAR>:=<VAR>word</VAR>}</CODE>
+<DD>If <VAR>parameter</VAR>
+is unset or null, the expansion of <VAR>word</VAR>
+is assigned to <VAR>parameter</VAR>.
+The value of <VAR>parameter</VAR> is then substituted.
+Positional parameters and special parameters may not be assigned to
+in this way.
+<P>
+
+<DT><CODE>${<VAR>parameter</VAR>:?<VAR>word</VAR>}</CODE>
+<DD>If <VAR>parameter</VAR>
+is null or unset, the expansion of <VAR>word</VAR> (or a message
+to that effect if <VAR>word</VAR>
+is not present) is written to the standard error and the shell, if it
+is not interactive, exits. Otherwise, the value of <VAR>parameter</VAR> is
+substituted.
+<P>
+
+<DT><CODE>${<VAR>parameter</VAR>:+<VAR>word</VAR>}</CODE>
+<DD>If <VAR>parameter</VAR>
+is null or unset, nothing is substituted, otherwise the expansion of
+<VAR>word</VAR> is substituted.
+<P>
+
+<DT><CODE>${<VAR>parameter</VAR>:<VAR>offset</VAR>}</CODE>
+<DD><DT><CODE>${<VAR>parameter</VAR>:<VAR>offset</VAR>:<VAR>length</VAR>}</CODE>
+<DD>Expands to up to <VAR>length</VAR> characters of <VAR>parameter</VAR>
+starting at the character specified by <VAR>offset</VAR>.
+If <VAR>length</VAR> is omitted, expands to the substring of
+<VAR>parameter</VAR> starting at the character specified by <VAR>offset</VAR>.
+<VAR>length</VAR> and <VAR>offset</VAR> are arithmetic expressions
+(see section <A HREF="bashref.html#SEC83">6.5 Shell Arithmetic</A>).
+This is referred to as Substring Expansion.
+<P>
+
+<VAR>length</VAR> must evaluate to a number greater than or equal to zero.
+If <VAR>offset</VAR> evaluates to a number less than zero, the value
+is used as an offset from the end of the value of <VAR>parameter</VAR>.
+If <VAR>parameter</VAR> is <SAMP>`@'</SAMP>, the result is <VAR>length</VAR> positional
+parameters beginning at <VAR>offset</VAR>.
+If <VAR>parameter</VAR> is an indexed array name subscripted
+by <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>, the result is the <VAR>length</VAR>
+members of the array beginning with <CODE>${<VAR>parameter</VAR>[<VAR>offset</VAR>]}</CODE>.
+A negative <VAR>offset</VAR> is taken relative to one greater than the maximum
+index of the specified array.
+Substring expansion applied to an associative array produces undefined
+results.
+</P><P>
+
+Note that a negative offset must be separated from the colon by at least
+one space to avoid being confused with the <SAMP>`:-'</SAMP> expansion.
+Substring indexing is zero-based unless the positional parameters
+are used, in which case the indexing starts at 1 by default.
+If <VAR>offset</VAR> is 0, and the positional parameters are used, <CODE>$@</CODE> is
+prefixed to the list.
+</P><P>
+
+<DT><CODE>${!<VAR>prefix</VAR>*}</CODE>
+<DD><DT><CODE>${!<VAR>prefix</VAR>@}</CODE>
+<DD>Expands to the names of variables whose names begin with <VAR>prefix</VAR>,
+separated by the first character of the <CODE>IFS</CODE> special variable.
+When <SAMP>`@'</SAMP> is used and the expansion appears within double quotes, each
+variable name expands to a separate word.
+<P>
+
+<DT><CODE>${!<VAR>name</VAR>[@]}</CODE>
+<DD><DT><CODE>${!<VAR>name</VAR>[*]}</CODE>
+<DD>If <VAR>name</VAR> is an array variable, expands to the list of array indices
+(keys) assigned in <VAR>name</VAR>.
+If <VAR>name</VAR> is not an array, expands to 0 if <VAR>name</VAR> is set and null
+otherwise.
+When <SAMP>`@'</SAMP> is used and the expansion appears within double quotes, each
+key expands to a separate word.
+<P>
+
+<DT><CODE>${#<VAR>parameter</VAR>}</CODE>
+<DD>The length in characters of the expanded value of <VAR>parameter</VAR> is
+substituted.
+If <VAR>parameter</VAR> is <SAMP>`*'</SAMP> or <SAMP>`@'</SAMP>, the value substituted
+is the number of positional parameters.
+If <VAR>parameter</VAR> is an array name subscripted by <SAMP>`*'</SAMP> or <SAMP>`@'</SAMP>,
+the value substituted is the number of elements in the array.
+<P>
+
+<DT><CODE>${<VAR>parameter</VAR>#<VAR>word</VAR>}</CODE>
+<DD><DT><CODE>${<VAR>parameter</VAR>##<VAR>word</VAR>}</CODE>
+<DD>The <VAR>word</VAR>
+is expanded to produce a pattern just as in filename
+expansion (see section <A HREF="bashref.html#SEC36">3.5.8 Filename Expansion</A>). If the pattern matches
+the beginning of the expanded value of <VAR>parameter</VAR>,
+then the result of the expansion is the expanded value of <VAR>parameter</VAR>
+with the shortest matching pattern (the <SAMP>`#'</SAMP> case) or the
+longest matching pattern (the <SAMP>`##'</SAMP> case) deleted.
+If <VAR>parameter</VAR> is <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>,
+the pattern removal operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If <VAR>parameter</VAR> is an array variable subscripted with
+<SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>,
+the pattern removal operation is applied to each member of the
+array in turn, and the expansion is the resultant list.
+<P>
+
+<DT><CODE>${<VAR>parameter</VAR>%<VAR>word</VAR>}</CODE>
+<DD><DT><CODE>${<VAR>parameter</VAR>%%<VAR>word</VAR>}</CODE>
+<DD>The <VAR>word</VAR> is expanded to produce a pattern just as in
+filename expansion.
+If the pattern matches a trailing portion of the expanded value of
+<VAR>parameter</VAR>, then the result of the expansion is the value of
+<VAR>parameter</VAR> with the shortest matching pattern (the <SAMP>`%'</SAMP> case)
+or the longest matching pattern (the <SAMP>`%%'</SAMP> case) deleted.
+If <VAR>parameter</VAR> is <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>,
+the pattern removal operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If <VAR>parameter</VAR>
+is an array variable subscripted with <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>,
+the pattern removal operation is applied to each member of the
+array in turn, and the expansion is the resultant list.
+<P>
+
+<DT><CODE>${<VAR>parameter</VAR>/<VAR>pattern</VAR>/<VAR>string</VAR>}</CODE>
+<DD><P>
+
+The <VAR>pattern</VAR> is expanded to produce a pattern just as in
+filename expansion.
+<VAR>Parameter</VAR> is expanded and the longest match of <VAR>pattern</VAR>
+against its value is replaced with <VAR>string</VAR>.
+If <VAR>pattern</VAR> begins with <SAMP>`/'</SAMP>, all matches of <VAR>pattern</VAR> are
+replaced with <VAR>string</VAR>. Normally only the first match is replaced.
+If <VAR>pattern</VAR> begins with <SAMP>`#'</SAMP>, it must match at the beginning
+of the expanded value of <VAR>parameter</VAR>.
+If <VAR>pattern</VAR> begins with <SAMP>`%'</SAMP>, it must match at the end
+of the expanded value of <VAR>parameter</VAR>.
+If <VAR>string</VAR> is null, matches of <VAR>pattern</VAR> are deleted
+and the <CODE>/</CODE> following <VAR>pattern</VAR> may be omitted.
+If <VAR>parameter</VAR> is <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>,
+the substitution operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If <VAR>parameter</VAR>
+is an array variable subscripted with <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>,
+the substitution operation is applied to each member of the
+array in turn, and the expansion is the resultant list.
+</P><P>
+
+<DT><CODE>${<VAR>parameter</VAR>^<VAR>pattern</VAR>}</CODE>
+<DD><DT><CODE>${<VAR>parameter</VAR>^^<VAR>pattern</VAR>}</CODE>
+<DD><DT><CODE>${<VAR>parameter</VAR>,<VAR>pattern</VAR>}</CODE>
+<DD><DT><CODE>${<VAR>parameter</VAR>,,<VAR>pattern</VAR>}</CODE>
+<DD>This expansion modifies the case of alphabetic characters in <VAR>parameter</VAR>.
+The <VAR>pattern</VAR> is expanded to produce a pattern just as in
+filename expansion.
+The <SAMP>`^'</SAMP> operator converts lowercase letters matching <VAR>pattern</VAR>
+to uppercase; the <SAMP>`,'</SAMP> operator converts matching uppercase letters
+to lowercase.
+The <SAMP>`^^'</SAMP> and <SAMP>`,,'</SAMP> expansions convert each matched character in the
+expanded value; the <SAMP>`^'</SAMP> and <SAMP>`,'</SAMP> expansions match and convert only
+the first character in the expanded value.
+If <VAR>pattern</VAR> is omitted, it is treated like a <SAMP>`?'</SAMP>, which matches
+every character.
+If <VAR>parameter</VAR> is <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>,
+the case modification operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If <VAR>parameter</VAR>
+is an array variable subscripted with <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>,
+the case modification operation is applied to each member of the
+array in turn, and the expansion is the resultant list.
+<P>
+
+</DL>
+<P>
+
+<A NAME="Command Substitution"></A>
+<HR SIZE="6">
+<A NAME="SEC32"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC31"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC33"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC33"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.5.4 Command Substitution </H3>
+<!--docid::SEC32::-->
+<P>
+
+Command substitution allows the output of a command to replace
+the command itself.
+Command substitution occurs when a command is enclosed as follows:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>$(<VAR>command</VAR>)
+</pre></td></tr></table>or
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>`<VAR>command</VAR>`
+</pre></td></tr></table></P><P>
+
+Bash performs the expansion by executing <VAR>command</VAR> and
+replacing the command substitution with the standard output of the
+command, with any trailing newlines deleted.
+Embedded newlines are not deleted, but they may be removed during
+word splitting.
+The command substitution <CODE>$(cat <VAR>file</VAR>)</CODE> can be
+replaced by the equivalent but faster <CODE>$(&#60; <VAR>file</VAR>)</CODE>.
+</P><P>
+
+When the old-style backquote form of substitution is used,
+backslash retains its literal meaning except when followed by
+<SAMP>`$'</SAMP>, <SAMP>``'</SAMP>, or <SAMP>`\'</SAMP>.
+The first backquote not preceded by a backslash terminates the
+command substitution.
+When using the <CODE>$(<VAR>command</VAR>)</CODE> form, all characters between
+the parentheses make up the command; none are treated specially.
+</P><P>
+
+Command substitutions may be nested. To nest when using the backquoted
+form, escape the inner backquotes with backslashes.
+</P><P>
+
+If the substitution appears within double quotes, word splitting and
+filename expansion are not performed on the results.
+</P><P>
+
+<A NAME="Arithmetic Expansion"></A>
+<HR SIZE="6">
+<A NAME="SEC33"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC32"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC34"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC34"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.5.5 Arithmetic Expansion </H3>
+<!--docid::SEC33::-->
+<P>
+
+Arithmetic expansion allows the evaluation of an arithmetic expression
+and the substitution of the result. The format for arithmetic expansion is:
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>$(( <VAR>expression</VAR> ))
+</pre></td></tr></table></P><P>
+
+The expression is treated as if it were within double quotes, but
+a double quote inside the parentheses is not treated specially.
+All tokens in the expression undergo parameter expansion, command
+substitution, and quote removal.
+Arithmetic expansions may be nested.
+</P><P>
+
+The evaluation is performed according to the rules listed below
+(see section <A HREF="bashref.html#SEC83">6.5 Shell Arithmetic</A>).
+If the expression is invalid, Bash prints a message indicating
+failure to the standard error and no substitution occurs.
+</P><P>
+
+<A NAME="Process Substitution"></A>
+<HR SIZE="6">
+<A NAME="SEC34"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC33"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC35"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC35"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.5.6 Process Substitution </H3>
+<!--docid::SEC34::-->
+<P>
+
+Process substitution is supported on systems that support named
+pipes (FIFOs) or the <TT>`/dev/fd'</TT> method of naming open files.
+It takes the form of
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>&#60;(<VAR>list</VAR>)
+</pre></td></tr></table>or
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>&#62;(<VAR>list</VAR>)
+</pre></td></tr></table>The process <VAR>list</VAR> is run with its input or output connected to a
+FIFO or some file in <TT>`/dev/fd'</TT>. The name of this file is
+passed as an argument to the current command as the result of the
+expansion. If the <CODE>&#62;(<VAR>list</VAR>)</CODE> form is used, writing to
+the file will provide input for <VAR>list</VAR>. If the
+<CODE>&#60;(<VAR>list</VAR>)</CODE> form is used, the file passed as an
+argument should be read to obtain the output of <VAR>list</VAR>.
+Note that no space may appear between the <CODE>&#60;</CODE> or <CODE>&#62;</CODE>
+and the left parenthesis, otherwise the construct would be interpreted
+as a redirection.
+</P><P>
+
+When available, process substitution is performed simultaneously with
+parameter and variable expansion, command substitution, and arithmetic
+expansion.
+</P><P>
+
+<A NAME="Word Splitting"></A>
+<HR SIZE="6">
+<A NAME="SEC35"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC34"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC36"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC36"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.5.7 Word Splitting </H3>
+<!--docid::SEC35::-->
+<P>
+
+The shell scans the results of parameter expansion, command substitution,
+and arithmetic expansion that did not occur within double quotes for
+word splitting.
+</P><P>
+
+The shell treats each character of <CODE>$IFS</CODE> as a delimiter, and splits
+the results of the other expansions into words on these characters.
+If <CODE>IFS</CODE> is unset, or its value is exactly <CODE>&#60;space&#62;&#60;tab&#62;&#60;newline&#62;</CODE>,
+the default, then sequences of
+<CODE> &#60;space&#62;</CODE>, <CODE>&#60;tab&#62;</CODE>, and <CODE>&#60;newline&#62;</CODE>
+at the beginning and end of the results of the previous
+expansions are ignored, and any sequence of <CODE>IFS</CODE>
+characters not at the beginning or end serves to delimit words.
+If <CODE>IFS</CODE> has a value other than the default, then sequences of
+the whitespace characters <CODE>space</CODE> and <CODE>tab</CODE>
+are ignored at the beginning and end of the
+word, as long as the whitespace character is in the
+value of <CODE>IFS</CODE> (an <CODE>IFS</CODE> whitespace character).
+Any character in <CODE>IFS</CODE> that is not <CODE>IFS</CODE>
+whitespace, along with any adjacent <CODE>IFS</CODE>
+whitespace characters, delimits a field. A sequence of <CODE>IFS</CODE>
+whitespace characters is also treated as a delimiter.
+If the value of <CODE>IFS</CODE> is null, no word splitting occurs.
+</P><P>
+
+Explicit null arguments (<CODE>""</CODE> or <CODE>"</CODE>) are retained.
+Unquoted implicit null arguments, resulting from the expansion of
+parameters that have no values, are removed.
+If a parameter with no value is expanded within double quotes, a
+null argument results and is retained.
+</P><P>
+
+Note that if no expansion occurs, no splitting
+is performed.
+</P><P>
+
+<A NAME="Filename Expansion"></A>
+<HR SIZE="6">
+<A NAME="SEC36"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC35"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC37"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.5.8 Filename Expansion </H3>
+<!--docid::SEC36::-->
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC37">3.5.8.1 Pattern Matching</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How the shell matches patterns.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<A NAME="IDX64"></A>
+<A NAME="IDX65"></A>
+<A NAME="IDX66"></A>
+<A NAME="IDX67"></A>
+<P>
+
+After word splitting, unless the <SAMP>`-f'</SAMP> option has been set
+(see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>), Bash scans each word for the characters
+<SAMP>`*'</SAMP>, <SAMP>`?'</SAMP>, and <SAMP>`['</SAMP>.
+If one of these characters appears, then the word is
+regarded as a <VAR>pattern</VAR>,
+and replaced with an alphabetically sorted list of
+file names matching the pattern. If no matching file names are found,
+and the shell option <CODE>nullglob</CODE> is disabled, the word is left
+unchanged.
+If the <CODE>nullglob</CODE> option is set, and no matches are found, the word
+is removed.
+If the <CODE>failglob</CODE> shell option is set, and no matches are found,
+an error message is printed and the command is not executed.
+If the shell option <CODE>nocaseglob</CODE> is enabled, the match is performed
+without regard to the case of alphabetic characters.
+</P><P>
+
+When a pattern is used for filename expansion, the character <SAMP>`.'</SAMP>
+at the start of a filename or immediately following a slash
+must be matched explicitly, unless the shell option <CODE>dotglob</CODE> is set.
+When matching a file name, the slash character must always be
+matched explicitly.
+In other cases, the <SAMP>`.'</SAMP> character is not treated specially.
+</P><P>
+
+See the description of <CODE>shopt</CODE> in <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>,
+for a description of the <CODE>nocaseglob</CODE>, <CODE>nullglob</CODE>,
+<CODE>failglob</CODE>, and <CODE>dotglob</CODE> options.
+</P><P>
+
+The <CODE>GLOBIGNORE</CODE>
+shell variable may be used to restrict the set of filenames matching a
+pattern. If <CODE>GLOBIGNORE</CODE>
+is set, each matching filename that also matches one of the patterns in
+<CODE>GLOBIGNORE</CODE> is removed from the list of matches. The filenames
+<TT>`.'</TT> and <TT>`..'</TT>
+are always ignored when <CODE>GLOBIGNORE</CODE>
+is set and not null.
+However, setting <CODE>GLOBIGNORE</CODE> to a non-null value has the effect of
+enabling the <CODE>dotglob</CODE>
+shell option, so all other filenames beginning with a
+<SAMP>`.'</SAMP> will match.
+To get the old behavior of ignoring filenames beginning with a
+<SAMP>`.'</SAMP>, make <SAMP>`.*'</SAMP> one of the patterns in <CODE>GLOBIGNORE</CODE>.
+The <CODE>dotglob</CODE> option is disabled when <CODE>GLOBIGNORE</CODE>
+is unset.
+</P><P>
+
+<A NAME="Pattern Matching"></A>
+<HR SIZE="6">
+<A NAME="SEC37"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC36"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC36"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H4> 3.5.8.1 Pattern Matching </H4>
+<!--docid::SEC37::-->
+<P>
+
+Any character that appears in a pattern, other than the special pattern
+characters described below, matches itself.
+The NUL character may not occur in a pattern.
+A backslash escapes the following character; the
+escaping backslash is discarded when matching.
+The special pattern characters must be quoted if they are to be matched
+literally.
+</P><P>
+
+The special pattern characters have the following meanings:
+<DL COMPACT>
+<DT><CODE>*</CODE>
+<DD>Matches any string, including the null string.
+When the <CODE>globstar</CODE> shell option is enabled, and <SAMP>`*'</SAMP> is used in
+a filename expansion context, two adjacent <SAMP>`*'</SAMP>s used as a single
+pattern will match all files and zero or more directories and
+subdirectories.
+If followed by a <SAMP>`/'</SAMP>, two adjacent <SAMP>`*'</SAMP>s will match only
+directories and subdirectories.
+<DT><CODE>?</CODE>
+<DD>Matches any single character.
+<DT><CODE>[<small>...</small>]</CODE>
+<DD>Matches any one of the enclosed characters. A pair of characters
+separated by a hyphen denotes a <VAR>range expression</VAR>;
+any character that sorts between those two characters, inclusive,
+using the current locale's collating sequence and character set,
+is matched. If the first character following the
+<SAMP>`['</SAMP> is a <SAMP>`!'</SAMP> or a <SAMP>`^'</SAMP>
+then any character not enclosed is matched. A <SAMP>`-'</SAMP>
+may be matched by including it as the first or last character
+in the set. A <SAMP>`]'</SAMP> may be matched by including it as the first
+character in the set.
+The sorting order of characters in range expressions is determined by
+the current locale and the value of the <CODE>LC_COLLATE</CODE> shell variable,
+if set.
+<P>
+
+For example, in the default C locale, <SAMP>`[a-dx-z]'</SAMP> is equivalent to
+<SAMP>`[abcdxyz]'</SAMP>. Many locales sort characters in dictionary order, and in
+these locales <SAMP>`[a-dx-z]'</SAMP> is typically not equivalent to <SAMP>`[abcdxyz]'</SAMP>;
+it might be equivalent to <SAMP>`[aBbCcDdxXyYz]'</SAMP>, for example. To obtain
+the traditional interpretation of ranges in bracket expressions, you can
+force the use of the C locale by setting the <CODE>LC_COLLATE</CODE> or
+<CODE>LC_ALL</CODE> environment variable to the value <SAMP>`C'</SAMP>.
+</P><P>
+
+Within <SAMP>`['</SAMP> and <SAMP>`]'</SAMP>, <VAR>character classes</VAR> can be specified
+using the syntax
+<CODE>[:</CODE><VAR>class</VAR><CODE>:]</CODE>, where <VAR>class</VAR> is one of the
+following classes defined in the POSIX standard:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>alnum alpha ascii blank cntrl digit graph lower
+print punct space upper word xdigit
+</pre></td></tr></table>A character class matches any character belonging to that class.
+The <CODE>word</CODE> character class matches letters, digits, and the character
+<SAMP>`_'</SAMP>.
+</P><P>
+
+Within <SAMP>`['</SAMP> and <SAMP>`]'</SAMP>, an <VAR>equivalence class</VAR> can be
+specified using the syntax <CODE>[=</CODE><VAR>c</VAR><CODE>=]</CODE>, which
+matches all characters with the same collation weight (as defined
+by the current locale) as the character <VAR>c</VAR>.
+</P><P>
+
+Within <SAMP>`['</SAMP> and <SAMP>`]'</SAMP>, the syntax <CODE>[.</CODE><VAR>symbol</VAR><CODE>.]</CODE>
+matches the collating symbol <VAR>symbol</VAR>.
+</DL>
+<P>
+
+If the <CODE>extglob</CODE> shell option is enabled using the <CODE>shopt</CODE>
+builtin, several extended pattern matching operators are recognized.
+In the following description, a <VAR>pattern-list</VAR> is a list of one
+or more patterns separated by a <SAMP>`|'</SAMP>.
+Composite patterns may be formed using one or more of the following
+sub-patterns:
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>?(<VAR>pattern-list</VAR>)</CODE>
+<DD>Matches zero or one occurrence of the given patterns.
+<P>
+
+<DT><CODE>*(<VAR>pattern-list</VAR>)</CODE>
+<DD>Matches zero or more occurrences of the given patterns.
+<P>
+
+<DT><CODE>+(<VAR>pattern-list</VAR>)</CODE>
+<DD>Matches one or more occurrences of the given patterns.
+<P>
+
+<DT><CODE>@(<VAR>pattern-list</VAR>)</CODE>
+<DD>Matches one of the given patterns.
+<P>
+
+<DT><CODE>!(<VAR>pattern-list</VAR>)</CODE>
+<DD>Matches anything except one of the given patterns.
+</DL>
+<P>
+
+<A NAME="Quote Removal"></A>
+<HR SIZE="6">
+<A NAME="SEC38"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC37"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC28"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.5.9 Quote Removal </H3>
+<!--docid::SEC38::-->
+<P>
+
+After the preceding expansions, all unquoted occurrences of the
+characters <SAMP>`\'</SAMP>, <SAMP>`''</SAMP>, and <SAMP>`"'</SAMP> that did not
+result from one of the above expansions are removed.
+</P><P>
+
+<A NAME="Redirections"></A>
+<HR SIZE="6">
+<A NAME="SEC39"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC38"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC40"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 3.6 Redirections </H2>
+<!--docid::SEC39::-->
+<P>
+
+Before a command is executed, its input and output
+may be <VAR>redirected</VAR>
+using a special notation interpreted by the shell.
+Redirection may also be used to open and close files for the
+current shell execution environment. The following redirection
+operators may precede or appear anywhere within a
+simple command or may follow a command.
+Redirections are processed in the order they appear, from
+left to right.
+</P><P>
+
+Each redirection that may be preceded by a file descriptor number
+may instead be preceded by a word of the form {<VAR>varname</VAR>}.
+In this case, for each redirection operator except
+&#62;&#38;- and &#60;&#38;-, the shell will allocate a file descriptor greater
+than 10 and assign it to {<VAR>varname</VAR>}. If &#62;&#38;- or &#60;&#38;- is preceded
+by {<VAR>varname</VAR>}, the value of <VAR>varname</VAR> defines the file
+descriptor to close.
+</P><P>
+
+In the following descriptions, if the file descriptor number is
+omitted, and the first character of the redirection operator is
+<SAMP>`&#60;'</SAMP>, the redirection refers to the standard input (file
+descriptor 0). If the first character of the redirection operator
+is <SAMP>`&#62;'</SAMP>, the redirection refers to the standard output (file
+descriptor 1).
+</P><P>
+
+The word following the redirection operator in the following
+descriptions, unless otherwise noted, is subjected to brace expansion,
+tilde expansion, parameter expansion, command substitution, arithmetic
+expansion, quote removal, filename expansion, and word splitting.
+If it expands to more than one word, Bash reports an error.
+</P><P>
+
+Note that the order of redirections is significant. For example,
+the command
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>ls &#62; <VAR>dirlist</VAR> 2&#62;&#38;1
+</pre></td></tr></table>directs both standard output (file descriptor 1) and standard error
+(file descriptor 2) to the file <VAR>dirlist</VAR>, while the command
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>ls 2&#62;&#38;1 &#62; <VAR>dirlist</VAR>
+</pre></td></tr></table>directs only the standard output to file <VAR>dirlist</VAR>,
+because the standard error was made a copy of the standard output
+before the standard output was redirected to <VAR>dirlist</VAR>.
+</P><P>
+
+Bash handles several filenames specially when they are used in
+redirections, as described in the following table:
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>/dev/fd/<VAR>fd</VAR></CODE>
+<DD>If <VAR>fd</VAR> is a valid integer, file descriptor <VAR>fd</VAR> is duplicated.
+<P>
+
+<DT><CODE>/dev/stdin</CODE>
+<DD>File descriptor 0 is duplicated.
+<P>
+
+<DT><CODE>/dev/stdout</CODE>
+<DD>File descriptor 1 is duplicated.
+<P>
+
+<DT><CODE>/dev/stderr</CODE>
+<DD>File descriptor 2 is duplicated.
+<P>
+
+<DT><CODE>/dev/tcp/<VAR>host</VAR>/<VAR>port</VAR></CODE>
+<DD>If <VAR>host</VAR> is a valid hostname or Internet address, and <VAR>port</VAR>
+is an integer port number or service name, Bash attempts to open a TCP
+connection to the corresponding socket.
+<P>
+
+<DT><CODE>/dev/udp/<VAR>host</VAR>/<VAR>port</VAR></CODE>
+<DD>If <VAR>host</VAR> is a valid hostname or Internet address, and <VAR>port</VAR>
+is an integer port number or service name, Bash attempts to open a UDP
+connection to the corresponding socket.
+<P>
+
+</DL>
+<P>
+
+A failure to open or create a file causes the redirection to fail.
+</P><P>
+
+Redirections using file descriptors greater than 9 should be used with
+care, as they may conflict with file descriptors the shell uses
+internally.
+</P><P>
+
+<HR SIZE="6">
+<A NAME="SEC40"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC41"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.6.1 Redirecting Input </H3>
+<!--docid::SEC40::-->
+Redirection of input causes the file whose name results from
+the expansion of <VAR>word</VAR>
+to be opened for reading on file descriptor <CODE>n</CODE>,
+or the standard input (file descriptor 0) if <CODE>n</CODE>
+is not specified.
+<P>
+
+The general format for redirecting input is:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>[<VAR>n</VAR>]&#60;<VAR>word</VAR>
+</pre></td></tr></table></P><P>
+
+<HR SIZE="6">
+<A NAME="SEC41"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC40"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC42"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC42"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.6.2 Redirecting Output </H3>
+<!--docid::SEC41::-->
+Redirection of output causes the file whose name results from
+the expansion of <VAR>word</VAR>
+to be opened for writing on file descriptor <VAR>n</VAR>,
+or the standard output (file descriptor 1) if <VAR>n</VAR>
+is not specified. If the file does not exist it is created;
+if it does exist it is truncated to zero size.
+<P>
+
+The general format for redirecting output is:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>[<VAR>n</VAR>]&#62;[|]<VAR>word</VAR>
+</pre></td></tr></table></P><P>
+
+If the redirection operator is <SAMP>`&#62;'</SAMP>, and the <CODE>noclobber</CODE>
+option to the <CODE>set</CODE> builtin has been enabled, the redirection
+will fail if the file whose name results from the expansion of
+<VAR>word</VAR> exists and is a regular file.
+If the redirection operator is <SAMP>`&#62;|'</SAMP>, or the redirection operator is
+<SAMP>`&#62;'</SAMP> and the <CODE>noclobber</CODE> option is not enabled, the redirection
+is attempted even if the file named by <VAR>word</VAR> exists.
+</P><P>
+
+<HR SIZE="6">
+<A NAME="SEC42"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC41"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC43"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC43"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.6.3 Appending Redirected Output </H3>
+<!--docid::SEC42::-->
+Redirection of output in this fashion
+causes the file whose name results from
+the expansion of <VAR>word</VAR>
+to be opened for appending on file descriptor <VAR>n</VAR>,
+or the standard output (file descriptor 1) if <VAR>n</VAR>
+is not specified. If the file does not exist it is created.
+<P>
+
+The general format for appending output is:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>[<VAR>n</VAR>]&#62;&#62;<VAR>word</VAR>
+</pre></td></tr></table></P><P>
+
+<HR SIZE="6">
+<A NAME="SEC43"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC42"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC44"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC44"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.6.4 Redirecting Standard Output and Standard Error </H3>
+<!--docid::SEC43::-->
+This construct allows both the
+standard output (file descriptor 1) and
+the standard error output (file descriptor 2)
+to be redirected to the file whose name is the
+expansion of <VAR>word</VAR>.
+<P>
+
+There are two formats for redirecting standard output and
+standard error:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>&#38;&#62;<VAR>word</VAR>
+</pre></td></tr></table>and
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>&#62;&#38;<VAR>word</VAR>
+</pre></td></tr></table>Of the two forms, the first is preferred.
+This is semantically equivalent to
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>&#62;<VAR>word</VAR> 2&#62;&#38;1
+</pre></td></tr></table></P><P>
+
+<HR SIZE="6">
+<A NAME="SEC44"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC43"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC45"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC45"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.6.5 Appending Standard Output and Standard Error </H3>
+<!--docid::SEC44::-->
+This construct allows both the
+standard output (file descriptor 1) and
+the standard error output (file descriptor 2)
+to be appended to the file whose name is the
+expansion of <VAR>word</VAR>.
+<P>
+
+The format for appending standard output and standard error is:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>&#38;&#62;&#62;<VAR>word</VAR>
+</pre></td></tr></table>This is semantically equivalent to
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>&#62;&#62;<VAR>word</VAR> 2&#62;&#38;1
+</pre></td></tr></table></P><P>
+
+<HR SIZE="6">
+<A NAME="SEC45"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC44"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC46"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC46"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.6.6 Here Documents </H3>
+<!--docid::SEC45::-->
+This type of redirection instructs the shell to read input from the
+current source until a line containing only <VAR>word</VAR>
+(with no trailing blanks) is seen. All of
+the lines read up to that point are then used as the standard
+input for a command.
+<P>
+
+The format of here-documents is:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>&#60;&#60;[-]<VAR>word</VAR>
+ <VAR>here-document</VAR>
+<VAR>delimiter</VAR>
+</pre></td></tr></table></P><P>
+
+No parameter expansion, command substitution, arithmetic expansion,
+or filename expansion is performed on
+<VAR>word</VAR>. If any characters in <VAR>word</VAR> are quoted, the
+<VAR>delimiter</VAR> is the result of quote removal on <VAR>word</VAR>,
+and the lines in the here-document are not expanded.
+If <VAR>word</VAR> is unquoted,
+all lines of the here-document are subjected to parameter expansion,
+command substitution, and arithmetic expansion. In the latter
+case, the character sequence <CODE>\newline</CODE> is ignored, and <SAMP>`\'</SAMP>
+must be used to quote the characters
+<SAMP>`\'</SAMP>, <SAMP>`$'</SAMP>, and <SAMP>``'</SAMP>.
+</P><P>
+
+If the redirection operator is <SAMP>`&#60;&#60;-'</SAMP>,
+then all leading tab characters are stripped from input lines and the
+line containing <VAR>delimiter</VAR>.
+This allows here-documents within shell scripts to be indented in a
+natural fashion.
+</P><P>
+
+<HR SIZE="6">
+<A NAME="SEC46"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC45"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC47"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC47"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.6.7 Here Strings </H3>
+<!--docid::SEC46::-->
+A variant of here documents, the format is:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>&#60;&#60;&#60; <VAR>word</VAR>
+</pre></td></tr></table><P>
+
+The <VAR>word</VAR> is expanded and supplied to the command on its standard
+input.
+</P><P>
+
+<HR SIZE="6">
+<A NAME="SEC47"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC46"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.6.8 Duplicating File Descriptors </H3>
+<!--docid::SEC47::-->
+The redirection operator
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>[<VAR>n</VAR>]&#60;&#38;<VAR>word</VAR>
+</pre></td></tr></table>is used to duplicate input file descriptors.
+If <VAR>word</VAR>
+expands to one or more digits, the file descriptor denoted by <VAR>n</VAR>
+is made to be a copy of that file descriptor.
+If the digits in <VAR>word</VAR> do not specify a file descriptor open for
+input, a redirection error occurs.
+If <VAR>word</VAR>
+evaluates to <SAMP>`-'</SAMP>, file descriptor <VAR>n</VAR> is closed. If
+<VAR>n</VAR> is not specified, the standard input (file descriptor 0) is used.
+<P>
+
+The operator
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>[<VAR>n</VAR>]&#62;&#38;<VAR>word</VAR>
+</pre></td></tr></table>is used similarly to duplicate output file descriptors. If
+<VAR>n</VAR> is not specified, the standard output (file descriptor 1) is used.
+If the digits in <VAR>word</VAR> do not specify a file descriptor open for
+output, a redirection error occurs.
+As a special case, if <VAR>n</VAR> is omitted, and <VAR>word</VAR> does not
+expand to one or more digits, the standard output and standard
+error are redirected as described previously.
+</P><P>
+
+<HR SIZE="6">
+<A NAME="SEC48"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC47"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC49"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.6.9 Moving File Descriptors </H3>
+<!--docid::SEC48::-->
+The redirection operator
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>[<VAR>n</VAR>]&#60;&#38;<VAR>digit</VAR>-
+</pre></td></tr></table>moves the file descriptor <VAR>digit</VAR> to file descriptor <VAR>n</VAR>,
+or the standard input (file descriptor 0) if <VAR>n</VAR> is not specified.
+<VAR>digit</VAR> is closed after being duplicated to <VAR>n</VAR>.
+<P>
+
+Similarly, the redirection operator
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>[<VAR>n</VAR>]&#62;&#38;<VAR>digit</VAR>-
+</pre></td></tr></table>moves the file descriptor <VAR>digit</VAR> to file descriptor <VAR>n</VAR>,
+or the standard output (file descriptor 1) if <VAR>n</VAR> is not specified.
+</P><P>
+
+<HR SIZE="6">
+<A NAME="SEC49"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC48"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC41"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC39"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.6.10 Opening File Descriptors for Reading and Writing </H3>
+<!--docid::SEC49::-->
+The redirection operator
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>[<VAR>n</VAR>]&#60;&#62;<VAR>word</VAR>
+</pre></td></tr></table>causes the file whose name is the expansion of <VAR>word</VAR>
+to be opened for both reading and writing on file descriptor
+<VAR>n</VAR>, or on file descriptor 0 if <VAR>n</VAR>
+is not specified. If the file does not exist, it is created.
+<P>
+
+<A NAME="Executing Commands"></A>
+<HR SIZE="6">
+<A NAME="SEC50"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC49"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC51"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC57"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC57"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 3.7 Executing Commands </H2>
+<!--docid::SEC50::-->
+<P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC51">3.7.1 Simple Command Expansion</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How Bash expands simple commands before
+ executing them.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC52">3.7.2 Command Search and Execution</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How Bash finds commands and runs them.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC53">3.7.3 Command Execution Environment</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The environment in which Bash
+ executes commands that are not
+ shell builtins.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC54">3.7.4 Environment</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The environment given to a command.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC55">3.7.5 Exit Status</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The status returned by commands and how Bash
+ interprets it.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC56">3.7.6 Signals</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">What happens when Bash or a command it runs
+ receives a signal.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+<A NAME="Simple Command Expansion"></A>
+<HR SIZE="6">
+<A NAME="SEC51"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC52"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC57"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC57"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.7.1 Simple Command Expansion </H3>
+<!--docid::SEC51::-->
+<P>
+
+When a simple command is executed, the shell performs the following
+expansions, assignments, and redirections, from left to right.
+</P><P>
+
+<OL>
+<LI>
+The words that the parser has marked as variable assignments (those
+preceding the command name) and redirections are saved for later
+processing.
+<P>
+
+<LI>
+The words that are not variable assignments or redirections are
+expanded (see section <A HREF="bashref.html#SEC28">3.5 Shell Expansions</A>).
+If any words remain after expansion, the first word
+is taken to be the name of the command and the remaining words are
+the arguments.
+<P>
+
+<LI>
+Redirections are performed as described above (see section <A HREF="bashref.html#SEC39">3.6 Redirections</A>).
+<P>
+
+<LI>
+The text after the <SAMP>`='</SAMP> in each variable assignment undergoes tilde
+expansion, parameter expansion, command substitution, arithmetic expansion,
+and quote removal before being assigned to the variable.
+</OL>
+<P>
+
+If no command name results, the variable assignments affect the current
+shell environment. Otherwise, the variables are added to the environment
+of the executed command and do not affect the current shell environment.
+If any of the assignments attempts to assign a value to a readonly variable,
+an error occurs, and the command exits with a non-zero status.
+</P><P>
+
+If no command name results, redirections are performed, but do not
+affect the current shell environment. A redirection error causes the
+command to exit with a non-zero status.
+</P><P>
+
+If there is a command name left after expansion, execution proceeds as
+described below. Otherwise, the command exits. If one of the expansions
+contained a command substitution, the exit status of the command is
+the exit status of the last command substitution performed. If there
+were no command substitutions, the command exits with a status of zero.
+</P><P>
+
+<A NAME="Command Search and Execution"></A>
+<HR SIZE="6">
+<A NAME="SEC52"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC51"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC53"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC53"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC57"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.7.2 Command Search and Execution </H3>
+<!--docid::SEC52::-->
+<P>
+
+After a command has been split into words, if it results in a
+simple command and an optional list of arguments, the following
+actions are taken.
+</P><P>
+
+<OL>
+<LI>
+If the command name contains no slashes, the shell attempts to
+locate it. If there exists a shell function by that name, that
+function is invoked as described in <A HREF="bashref.html#SEC24">3.3 Shell Functions</A>.
+<P>
+
+<LI>
+If the name does not match a function, the shell searches for
+it in the list of shell builtins. If a match is found, that
+builtin is invoked.
+<P>
+
+<LI>
+If the name is neither a shell function nor a builtin,
+and contains no slashes, Bash searches each element of
+<CODE>$PATH</CODE> for a directory containing an executable file
+by that name. Bash uses a hash table to remember the full
+pathnames of executable files to avoid multiple <CODE>PATH</CODE> searches
+(see the description of <CODE>hash</CODE> in <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>).
+A full search of the directories in <CODE>$PATH</CODE>
+is performed only if the command is not found in the hash table.
+If the search is unsuccessful, the shell searches for a defined shell
+function named <CODE>command_not_found_handle</CODE>.
+If that function exists, it is invoked with the original command and
+the original command's arguments as its arguments, and the function's
+exit status becomes the exit status of the shell.
+If that function is not defined, the shell prints an error
+message and returns an exit status of 127.
+<P>
+
+<LI>
+If the search is successful, or if the command name contains
+one or more slashes, the shell executes the named program in
+a separate execution environment.
+Argument 0 is set to the name given, and the remaining arguments
+to the command are set to the arguments supplied, if any.
+<P>
+
+<LI>
+If this execution fails because the file is not in executable
+format, and the file is not a directory, it is assumed to be a
+<VAR>shell script</VAR> and the shell executes it as described in
+<A HREF="bashref.html#SEC57">3.8 Shell Scripts</A>.
+<P>
+
+<LI>
+If the command was not begun asynchronously, the shell waits for
+the command to complete and collects its exit status.
+<P>
+
+</OL>
+<P>
+
+<A NAME="Command Execution Environment"></A>
+<HR SIZE="6">
+<A NAME="SEC53"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC52"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC54"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC54"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC57"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.7.3 Command Execution Environment </H3>
+<!--docid::SEC53::-->
+<P>
+
+The shell has an <VAR>execution environment</VAR>, which consists of the
+following:
+</P><P>
+
+<UL>
+<LI>
+open files inherited by the shell at invocation, as modified by
+redirections supplied to the <CODE>exec</CODE> builtin
+<P>
+
+<LI>
+the current working directory as set by <CODE>cd</CODE>, <CODE>pushd</CODE>, or
+<CODE>popd</CODE>, or inherited by the shell at invocation
+<P>
+
+<LI>
+the file creation mode mask as set by <CODE>umask</CODE> or inherited from
+the shell's parent
+<P>
+
+<LI>
+current traps set by <CODE>trap</CODE>
+<P>
+
+<LI>
+shell parameters that are set by variable assignment or with <CODE>set</CODE>
+or inherited from the shell's parent in the environment
+<P>
+
+<LI>
+shell functions defined during execution or inherited from the shell's
+parent in the environment
+<P>
+
+<LI>
+options enabled at invocation (either by default or with command-line
+arguments) or by <CODE>set</CODE>
+<P>
+
+<LI>
+options enabled by <CODE>shopt</CODE> (see section <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>)
+<P>
+
+<LI>
+shell aliases defined with <CODE>alias</CODE> (see section <A HREF="bashref.html#SEC84">6.6 Aliases</A>)
+<P>
+
+<LI>
+various process IDs, including those of background jobs
+(see section <A HREF="bashref.html#SEC18">3.2.3 Lists of Commands</A>), the value of <CODE>$$</CODE>, and the value of
+<CODE>$PPID</CODE>
+<P>
+
+</UL>
+<P>
+
+When a simple command other than a builtin or shell function
+is to be executed, it
+is invoked in a separate execution environment that consists of
+the following. Unless otherwise noted, the values are inherited
+from the shell.
+</P><P>
+
+<UL>
+<LI>
+the shell's open files, plus any modifications and additions specified
+by redirections to the command
+<P>
+
+<LI>
+the current working directory
+<P>
+
+<LI>
+the file creation mode mask
+<P>
+
+<LI>
+shell variables and functions marked for export, along with variables
+exported for the command, passed in the environment (see section <A HREF="bashref.html#SEC54">3.7.4 Environment</A>)
+<P>
+
+<LI>
+traps caught by the shell are reset to the values inherited from the
+shell's parent, and traps ignored by the shell are ignored
+<P>
+
+</UL>
+<P>
+
+A command invoked in this separate environment cannot affect the
+shell's execution environment.
+</P><P>
+
+Command substitution, commands grouped with parentheses,
+and asynchronous commands are invoked in a
+subshell environment that is a duplicate of the shell environment,
+except that traps caught by the shell are reset to the values
+that the shell inherited from its parent at invocation. Builtin
+commands that are invoked as part of a pipeline are also executed
+in a subshell environment. Changes made to the subshell environment
+cannot affect the shell's execution environment.
+</P><P>
+
+Subshells spawned to execute command substitutions inherit the value of
+the <SAMP>`-e'</SAMP> option from the parent shell. When not in POSIX mode,
+Bash clears the <SAMP>`-e'</SAMP> option in such subshells.
+</P><P>
+
+If a command is followed by a <SAMP>`&#38;'</SAMP> and job control is not active, the
+default standard input for the command is the empty file <TT>`/dev/null'</TT>.
+Otherwise, the invoked command inherits the file descriptors of the calling
+shell as modified by redirections.
+</P><P>
+
+<A NAME="Environment"></A>
+<HR SIZE="6">
+<A NAME="SEC54"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC53"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC55"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC55"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC57"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.7.4 Environment </H3>
+<!--docid::SEC54::-->
+<P>
+
+When a program is invoked it is given an array of strings
+called the <VAR>environment</VAR>.
+This is a list of name-value pairs, of the form <CODE>name=value</CODE>.
+</P><P>
+
+Bash provides several ways to manipulate the environment.
+On invocation, the shell scans its own environment and
+creates a parameter for each name found, automatically marking
+it for <VAR>export</VAR>
+to child processes. Executed commands inherit the environment.
+The <CODE>export</CODE> and <SAMP>`declare -x'</SAMP>
+commands allow parameters and functions to be added to and
+deleted from the environment. If the value of a parameter
+in the environment is modified, the new value becomes part
+of the environment, replacing the old. The environment
+inherited by any executed command consists of the shell's
+initial environment, whose values may be modified in the shell,
+less any pairs removed by the <CODE>unset</CODE> and <SAMP>`export -n'</SAMP>
+commands, plus any additions via the <CODE>export</CODE> and
+<SAMP>`declare -x'</SAMP> commands.
+</P><P>
+
+The environment for any simple command
+or function may be augmented temporarily by prefixing it with
+parameter assignments, as described in <A HREF="bashref.html#SEC25">3.4 Shell Parameters</A>.
+These assignment statements affect only the environment seen
+by that command.
+</P><P>
+
+If the <SAMP>`-k'</SAMP> option is set (see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>), then all
+parameter assignments are placed in the environment for a command,
+not just those that precede the command name.
+</P><P>
+
+When Bash invokes an external command, the variable <SAMP>`$_'</SAMP>
+is set to the full path name of the command and passed to that
+command in its environment.
+</P><P>
+
+<A NAME="Exit Status"></A>
+<HR SIZE="6">
+<A NAME="SEC55"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC54"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC56"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC56"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC57"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.7.5 Exit Status </H3>
+<!--docid::SEC55::-->
+<P>
+
+The exit status of an executed command is the value returned by the
+<VAR>waitpid</VAR> system call or equivalent function. Exit statuses
+fall between 0 and 255, though, as explained below, the shell may
+use values above 125 specially. Exit statuses from shell builtins and
+compound commands are also limited to this range. Under certain
+circumstances, the shell will use special values to indicate specific
+failure modes.
+</P><P>
+
+For the shell's purposes, a command which exits with a
+zero exit status has succeeded.
+A non-zero exit status indicates failure.
+This seemingly counter-intuitive scheme is used so there
+is one well-defined way to indicate success and a variety of
+ways to indicate various failure modes.
+When a command terminates on a fatal signal whose number is <VAR>N</VAR>,
+Bash uses the value 128+<VAR>N</VAR> as the exit status.
+</P><P>
+
+If a command is not found, the child process created to
+execute it returns a status of 127. If a command is found
+but is not executable, the return status is 126.
+</P><P>
+
+If a command fails because of an error during expansion or redirection,
+the exit status is greater than zero.
+</P><P>
+
+The exit status is used by the Bash conditional commands
+(see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>) and some of the list
+constructs (see section <A HREF="bashref.html#SEC18">3.2.3 Lists of Commands</A>).
+</P><P>
+
+All of the Bash builtins return an exit status of zero if they succeed
+and a non-zero status on failure, so they may be used by the
+conditional and list constructs.
+All builtins return an exit status of 2 to indicate incorrect usage.
+</P><P>
+
+<A NAME="Signals"></A>
+<HR SIZE="6">
+<A NAME="SEC56"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC55"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC57"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC57"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC50"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC57"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 3.7.6 Signals </H3>
+<!--docid::SEC56::-->
+<P>
+
+When Bash is interactive, in the absence of any traps, it ignores
+<CODE>SIGTERM</CODE> (so that <SAMP>`kill 0'</SAMP> does not kill an interactive shell),
+and <CODE>SIGINT</CODE>
+is caught and handled (so that the <CODE>wait</CODE> builtin is interruptible).
+When Bash receives a <CODE>SIGINT</CODE>, it breaks out of any executing loops.
+In all cases, Bash ignores <CODE>SIGQUIT</CODE>.
+If job control is in effect (see section <A HREF="bashref.html#SEC91">7. Job Control</A>), Bash
+ignores <CODE>SIGTTIN</CODE>, <CODE>SIGTTOU</CODE>, and <CODE>SIGTSTP</CODE>.
+</P><P>
+
+Non-builtin commands started by Bash have signal handlers set to the
+values inherited by the shell from its parent.
+When job control is not in effect, asynchronous commands
+ignore <CODE>SIGINT</CODE> and <CODE>SIGQUIT</CODE> in addition to these inherited
+handlers.
+Commands run as a result of
+command substitution ignore the keyboard-generated job control signals
+<CODE>SIGTTIN</CODE>, <CODE>SIGTTOU</CODE>, and <CODE>SIGTSTP</CODE>.
+</P><P>
+
+The shell exits by default upon receipt of a <CODE>SIGHUP</CODE>.
+Before exiting, an interactive shell resends the <CODE>SIGHUP</CODE> to
+all jobs, running or stopped.
+Stopped jobs are sent <CODE>SIGCONT</CODE> to ensure that they receive
+the <CODE>SIGHUP</CODE>.
+To prevent the shell from sending the <CODE>SIGHUP</CODE> signal to a
+particular job, it should be removed
+from the jobs table with the <CODE>disown</CODE>
+builtin (see section <A HREF="bashref.html#SEC93">7.2 Job Control Builtins</A>) or marked
+to not receive <CODE>SIGHUP</CODE> using <CODE>disown -h</CODE>.
+</P><P>
+
+If the <CODE>huponexit</CODE> shell option has been set with <CODE>shopt</CODE>
+(see section <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>), Bash sends a <CODE>SIGHUP</CODE> to all jobs when
+an interactive login shell exits.
+</P><P>
+
+If Bash is waiting for a command to complete and receives a signal
+for which a trap has been set, the trap will not be executed until
+the command completes.
+When Bash is waiting for an asynchronous
+command via the <CODE>wait</CODE> builtin, the reception of a signal for
+which a trap has been set will cause the <CODE>wait</CODE> builtin to return
+immediately with an exit status greater than 128, immediately after
+which the trap is executed.
+</P><P>
+
+<A NAME="Shell Scripts"></A>
+<HR SIZE="6">
+<A NAME="SEC57"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC56"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC58"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC5"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC58"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 3.8 Shell Scripts </H2>
+<!--docid::SEC57::-->
+<P>
+
+A shell script is a text file containing shell commands. When such
+a file is used as the first non-option argument when invoking Bash,
+and neither the <SAMP>`-c'</SAMP> nor <SAMP>`-s'</SAMP> option is supplied
+(see section <A HREF="bashref.html#SEC69">6.1 Invoking Bash</A>),
+Bash reads and executes commands from the file, then exits. This
+mode of operation creates a non-interactive shell. The shell first
+searches for the file in the current directory, and looks in the
+directories in <CODE>$PATH</CODE> if not found there.
+</P><P>
+
+When Bash runs
+a shell script, it sets the special parameter <CODE>0</CODE> to the name
+of the file, rather than the name of the shell, and the positional
+parameters are set to the remaining arguments, if any are given.
+If no additional arguments are supplied, the positional parameters
+are unset.
+</P><P>
+
+A shell script may be made executable by using the <CODE>chmod</CODE> command
+to turn on the execute bit. When Bash finds such a file while
+searching the <CODE>$PATH</CODE> for a command, it spawns a subshell to
+execute it. In other words, executing
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>filename <VAR>arguments</VAR>
+</pre></td></tr></table>is equivalent to executing
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>bash filename <VAR>arguments</VAR>
+</pre></td></tr></table></P><P>
+
+if <CODE>filename</CODE> is an executable shell script.
+This subshell reinitializes itself, so that the effect is as if a
+new shell had been invoked to interpret the script, with the
+exception that the locations of commands remembered by the parent
+(see the description of <CODE>hash</CODE> in <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>)
+are retained by the child.
+</P><P>
+
+Most versions of Unix make this a part of the operating system's command
+execution mechanism. If the first line of a script begins with
+the two characters <SAMP>`#!'</SAMP>, the remainder of the line specifies
+an interpreter for the program.
+Thus, you can specify Bash, <CODE>awk</CODE>, Perl, or some other
+interpreter and write the rest of the script file in that language.
+</P><P>
+
+The arguments to the interpreter
+consist of a single optional argument following the interpreter
+name on the first line of the script file, followed by the name of
+the script file, followed by the rest of the arguments. Bash
+will perform this action on operating systems that do not handle it
+themselves. Note that some older versions of Unix limit the interpreter
+name and argument to a maximum of 32 characters.
+</P><P>
+
+Bash scripts often begin with <CODE>#! /bin/bash</CODE> (assuming that
+Bash has been installed in <TT>`/bin'</TT>), since this ensures that
+Bash will be used to interpret the script, even if it is executed
+under another shell.
+</P><P>
+
+<A NAME="Shell Builtin Commands"></A>
+<HR SIZE="6">
+<A NAME="SEC58"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC57"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC59"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC65"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC65"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 4. Shell Builtin Commands </H1>
+<!--docid::SEC58::-->
+<P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Builtin commands inherited from the Bourne
+ Shell.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Table of builtins specific to Bash.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC61">4.3 Modifying Shell Behavior</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Builtins to modify shell attributes and
+ optional behavior.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC64">4.4 Special Builtins</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Builtin commands classified specially by
+ POSIX.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+Builtin commands are contained within the shell itself.
+When the name of a builtin command is used as the first word of
+a simple command (see section <A HREF="bashref.html#SEC16">3.2.1 Simple Commands</A>), the shell executes
+the command directly, without invoking another program.
+Builtin commands are necessary to implement functionality impossible
+or inconvenient to obtain with separate utilities.
+</P><P>
+
+This section briefly describes the builtins which Bash inherits from
+the Bourne Shell, as well as the builtin commands which are unique
+to or have been extended in Bash.
+</P><P>
+
+Several builtin commands are described in other chapters: builtin
+commands which provide the Bash interface to the job control
+facilities (see section <A HREF="bashref.html#SEC93">7.2 Job Control Builtins</A>), the directory stack
+(see section <A HREF="bashref.html#SEC87">6.8.1 Directory Stack Builtins</A>), the command history
+(see section <A HREF="bashref.html#SEC121">9.2 Bash History Builtins</A>), and the programmable completion
+facilities (see section <A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A>).
+</P><P>
+
+Many of the builtins have been extended by POSIX or Bash.
+</P><P>
+
+Unless otherwise noted, each builtin command documented as accepting
+options preceded by <SAMP>`-'</SAMP> accepts <SAMP>`--'</SAMP>
+to signify the end of the options.
+The <CODE>:</CODE>, <CODE>true</CODE>, <CODE>false</CODE>, and <CODE>test</CODE>
+builtins do not accept options and do not treat <SAMP>`--'</SAMP> specially.
+The <CODE>exit</CODE>, <CODE>logout</CODE>, <CODE>break</CODE>, <CODE>continue</CODE>, <CODE>let</CODE>,
+and <CODE>shift</CODE> builtins accept and process arguments beginning
+with <SAMP>`-'</SAMP> without requiring <SAMP>`--'</SAMP>.
+Other builtins that accept arguments but are not specified as accepting
+options interpret arguments beginning with <SAMP>`-'</SAMP> as invalid options and
+require <SAMP>`--'</SAMP> to prevent this interpretation.
+</P><P>
+
+<A NAME="Bourne Shell Builtins"></A>
+<HR SIZE="6">
+<A NAME="SEC59"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC58"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC60"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC58"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC58"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC65"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 4.1 Bourne Shell Builtins </H2>
+<!--docid::SEC59::-->
+<P>
+
+The following shell builtin commands are inherited from the Bourne Shell.
+These commands are implemented as specified by the POSIX standard.
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>: (a colon)</CODE>
+<DD><A NAME="IDX68"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>: [<VAR>arguments</VAR>]
+</pre></td></tr></table>Do nothing beyond expanding <VAR>arguments</VAR> and performing redirections.
+The return status is zero.
+<P>
+
+<DT><CODE>. (a period)</CODE>
+<DD><A NAME="IDX69"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>. <VAR>filename</VAR> [<VAR>arguments</VAR>]
+</pre></td></tr></table>Read and execute commands from the <VAR>filename</VAR> argument in the
+current shell context. If <VAR>filename</VAR> does not contain a slash,
+the <CODE>PATH</CODE> variable is used to find <VAR>filename</VAR>.
+When Bash is not in POSIX mode, the current directory is searched
+if <VAR>filename</VAR> is not found in <CODE>$PATH</CODE>.
+If any <VAR>arguments</VAR> are supplied, they become the positional
+parameters when <VAR>filename</VAR> is executed. Otherwise the positional
+parameters are unchanged.
+The return status is the exit status of the last command executed, or
+zero if no commands are executed. If <VAR>filename</VAR> is not found, or
+cannot be read, the return status is non-zero.
+This builtin is equivalent to <CODE>source</CODE>.
+<P>
+
+<DT><CODE>break</CODE>
+<DD><A NAME="IDX70"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>break [<VAR>n</VAR>]
+</pre></td></tr></table>Exit from a <CODE>for</CODE>, <CODE>while</CODE>, <CODE>until</CODE>, or <CODE>select</CODE> loop.
+If <VAR>n</VAR> is supplied, the <VAR>n</VAR>th enclosing loop is exited.
+<VAR>n</VAR> must be greater than or equal to 1.
+The return status is zero unless <VAR>n</VAR> is not greater than or equal to 1.
+<P>
+
+<DT><CODE>cd</CODE>
+<DD><A NAME="IDX71"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>cd [-L|-P] [<VAR>directory</VAR>]
+</pre></td></tr></table>Change the current working directory to <VAR>directory</VAR>.
+If <VAR>directory</VAR> is not given, the value of the <CODE>HOME</CODE> shell
+variable is used.
+If the shell variable <CODE>CDPATH</CODE> exists, it is used as a search path.
+If <VAR>directory</VAR> begins with a slash, <CODE>CDPATH</CODE> is not used.
+<P>
+
+The <SAMP>`-P'</SAMP> option means to not follow symbolic links; symbolic
+links are followed by default or with the <SAMP>`-L'</SAMP> option.
+If <VAR>directory</VAR> is <SAMP>`-'</SAMP>, it is equivalent to <CODE>$OLDPWD</CODE>.
+</P><P>
+
+If a non-empty directory name from <CODE>CDPATH</CODE> is used, or if
+<SAMP>`-'</SAMP> is the first argument, and the directory change is
+successful, the absolute pathname of the new working directory is
+written to the standard output.
+</P><P>
+
+The return status is zero if the directory is successfully changed,
+non-zero otherwise.
+</P><P>
+
+<DT><CODE>continue</CODE>
+<DD><A NAME="IDX72"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>continue [<VAR>n</VAR>]
+</pre></td></tr></table>Resume the next iteration of an enclosing <CODE>for</CODE>, <CODE>while</CODE>,
+<CODE>until</CODE>, or <CODE>select</CODE> loop.
+If <VAR>n</VAR> is supplied, the execution of the <VAR>n</VAR>th enclosing loop
+is resumed.
+<VAR>n</VAR> must be greater than or equal to 1.
+The return status is zero unless <VAR>n</VAR> is not greater than or equal to 1.
+<P>
+
+<DT><CODE>eval</CODE>
+<DD><A NAME="IDX73"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>eval [<VAR>arguments</VAR>]
+</pre></td></tr></table>The arguments are concatenated together into a single command, which is
+then read and executed, and its exit status returned as the exit status
+of <CODE>eval</CODE>.
+If there are no arguments or only empty arguments, the return status is
+zero.
+<P>
+
+<DT><CODE>exec</CODE>
+<DD><A NAME="IDX74"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>exec [-cl] [-a <VAR>name</VAR>] [<VAR>command</VAR> [<VAR>arguments</VAR>]]
+</pre></td></tr></table>If <VAR>command</VAR>
+is supplied, it replaces the shell without creating a new process.
+If the <SAMP>`-l'</SAMP> option is supplied, the shell places a dash at the
+beginning of the zeroth argument passed to <VAR>command</VAR>.
+This is what the <CODE>login</CODE> program does.
+The <SAMP>`-c'</SAMP> option causes <VAR>command</VAR> to be executed with an empty
+environment.
+If <SAMP>`-a'</SAMP> is supplied, the shell passes <VAR>name</VAR> as the zeroth
+argument to <VAR>command</VAR>.
+If no <VAR>command</VAR> is specified, redirections may be used to affect
+the current shell environment. If there are no redirection errors, the
+return status is zero; otherwise the return status is non-zero.
+<P>
+
+<DT><CODE>exit</CODE>
+<DD><A NAME="IDX75"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>exit [<VAR>n</VAR>]
+</pre></td></tr></table>Exit the shell, returning a status of <VAR>n</VAR> to the shell's parent.
+If <VAR>n</VAR> is omitted, the exit status is that of the last command executed.
+Any trap on <CODE>EXIT</CODE> is executed before the shell terminates.
+<P>
+
+<DT><CODE>export</CODE>
+<DD><A NAME="IDX76"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>export [-fn] [-p] [<VAR>name</VAR>[=<VAR>value</VAR>]]
+</pre></td></tr></table>Mark each <VAR>name</VAR> to be passed to child processes
+in the environment. If the <SAMP>`-f'</SAMP> option is supplied, the <VAR>name</VAR>s
+refer to shell functions; otherwise the names refer to shell variables.
+The <SAMP>`-n'</SAMP> option means to no longer mark each <VAR>name</VAR> for export.
+If no <VAR>names</VAR> are supplied, or if the <SAMP>`-p'</SAMP> option is given, a
+list of exported names is displayed.
+The <SAMP>`-p'</SAMP> option displays output in a form that may be reused as input.
+If a variable name is followed by =<VAR>value</VAR>, the value of
+the variable is set to <VAR>value</VAR>.
+<P>
+
+The return status is zero unless an invalid option is supplied, one of
+the names is not a valid shell variable name, or <SAMP>`-f'</SAMP> is supplied
+with a name that is not a shell function.
+</P><P>
+
+<DT><CODE>getopts</CODE>
+<DD><A NAME="IDX77"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>getopts <VAR>optstring</VAR> <VAR>name</VAR> [<VAR>args</VAR>]
+</pre></td></tr></table><CODE>getopts</CODE> is used by shell scripts to parse positional parameters.
+<VAR>optstring</VAR> contains the option characters to be recognized; if a
+character is followed by a colon, the option is expected to have an
+argument, which should be separated from it by white space.
+The colon (<SAMP>`:'</SAMP>) and question mark (<SAMP>`?'</SAMP>) may not be
+used as option characters.
+Each time it is invoked, <CODE>getopts</CODE>
+places the next option in the shell variable <VAR>name</VAR>, initializing
+<VAR>name</VAR> if it does not exist,
+and the index of the next argument to be processed into the
+variable <CODE>OPTIND</CODE>.
+<CODE>OPTIND</CODE> is initialized to 1 each time the shell or a shell script
+is invoked.
+When an option requires an argument,
+<CODE>getopts</CODE> places that argument into the variable <CODE>OPTARG</CODE>.
+The shell does not reset <CODE>OPTIND</CODE> automatically; it must be manually
+reset between multiple calls to <CODE>getopts</CODE> within the same shell
+invocation if a new set of parameters is to be used.
+<P>
+
+When the end of options is encountered, <CODE>getopts</CODE> exits with a
+return value greater than zero.
+<CODE>OPTIND</CODE> is set to the index of the first non-option argument,
+and <CODE>name</CODE> is set to <SAMP>`?'</SAMP>.
+</P><P>
+
+<CODE>getopts</CODE>
+normally parses the positional parameters, but if more arguments are
+given in <VAR>args</VAR>, <CODE>getopts</CODE> parses those instead.
+</P><P>
+
+<CODE>getopts</CODE> can report errors in two ways. If the first character of
+<VAR>optstring</VAR> is a colon, <VAR>silent</VAR>
+error reporting is used. In normal operation diagnostic messages
+are printed when invalid options or missing option arguments are
+encountered.
+If the variable <CODE>OPTERR</CODE>
+is set to 0, no error messages will be displayed, even if the first
+character of <CODE>optstring</CODE> is not a colon.
+</P><P>
+
+If an invalid option is seen,
+<CODE>getopts</CODE> places <SAMP>`?'</SAMP> into <VAR>name</VAR> and, if not silent,
+prints an error message and unsets <CODE>OPTARG</CODE>.
+If <CODE>getopts</CODE> is silent, the option character found is placed in
+<CODE>OPTARG</CODE> and no diagnostic message is printed.
+</P><P>
+
+If a required argument is not found, and <CODE>getopts</CODE>
+is not silent, a question mark (<SAMP>`?'</SAMP>) is placed in <VAR>name</VAR>,
+<CODE>OPTARG</CODE> is unset, and a diagnostic message is printed.
+If <CODE>getopts</CODE> is silent, then a colon (<SAMP>`:'</SAMP>) is placed in
+<VAR>name</VAR> and <CODE>OPTARG</CODE> is set to the option character found.
+</P><P>
+
+<DT><CODE>hash</CODE>
+<DD><A NAME="IDX78"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>hash [-r] [-p <VAR>filename</VAR>] [-dt] [<VAR>name</VAR>]
+</pre></td></tr></table>Remember the full pathnames of commands specified as <VAR>name</VAR> arguments,
+so they need not be searched for on subsequent invocations.
+The commands are found by searching through the directories listed in
+<CODE>$PATH</CODE>.
+The <SAMP>`-p'</SAMP> option inhibits the path search, and <VAR>filename</VAR> is
+used as the location of <VAR>name</VAR>.
+The <SAMP>`-r'</SAMP> option causes the shell to forget all remembered locations.
+The <SAMP>`-d'</SAMP> option causes the shell to forget the remembered location
+of each <VAR>name</VAR>.
+If the <SAMP>`-t'</SAMP> option is supplied, the full pathname to which each
+<VAR>name</VAR> corresponds is printed. If multiple <VAR>name</VAR> arguments are
+supplied with <SAMP>`-t'</SAMP> the <VAR>name</VAR> is printed before the hashed
+full pathname.
+The <SAMP>`-l'</SAMP> option causes output to be displayed in a format
+that may be reused as input.
+If no arguments are given, or if only <SAMP>`-l'</SAMP> is supplied,
+information about remembered commands is printed.
+The return status is zero unless a <VAR>name</VAR> is not found or an invalid
+option is supplied.
+<P>
+
+<DT><CODE>pwd</CODE>
+<DD><A NAME="IDX79"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>pwd [-LP]
+</pre></td></tr></table>Print the absolute pathname of the current working directory.
+If the <SAMP>`-P'</SAMP> option is supplied, the pathname printed will not
+contain symbolic links.
+If the <SAMP>`-L'</SAMP> option is supplied, the pathname printed may contain
+symbolic links.
+The return status is zero unless an error is encountered while
+determining the name of the current directory or an invalid option
+is supplied.
+<P>
+
+<DT><CODE>readonly</CODE>
+<DD><A NAME="IDX80"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>readonly [-aApf] [<VAR>name</VAR>[=<VAR>value</VAR>]] <small>...</small>
+</pre></td></tr></table>Mark each <VAR>name</VAR> as readonly.
+The values of these names may not be changed by subsequent assignment.
+If the <SAMP>`-f'</SAMP> option is supplied, each <VAR>name</VAR> refers to a shell
+function.
+The <SAMP>`-a'</SAMP> option means each <VAR>name</VAR> refers to an indexed
+array variable; the <SAMP>`-A'</SAMP> option means each <VAR>name</VAR> refers
+to an associative array variable.
+If no <VAR>name</VAR> arguments are given, or if the <SAMP>`-p'</SAMP>
+option is supplied, a list of all readonly names is printed.
+The <SAMP>`-p'</SAMP> option causes output to be displayed in a format that
+may be reused as input.
+If a variable name is followed by =<VAR>value</VAR>, the value of
+the variable is set to <VAR>value</VAR>.
+The return status is zero unless an invalid option is supplied, one of
+the <VAR>name</VAR> arguments is not a valid shell variable or function name,
+or the <SAMP>`-f'</SAMP> option is supplied with a name that is not a shell function.
+<P>
+
+<DT><CODE>return</CODE>
+<DD><A NAME="IDX81"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>return [<VAR>n</VAR>]
+</pre></td></tr></table>Cause a shell function to exit with the return value <VAR>n</VAR>.
+If <VAR>n</VAR> is not supplied, the return value is the exit status of the
+last command executed in the function.
+This may also be used to terminate execution of a script being executed
+with the <CODE>.</CODE> (or <CODE>source</CODE>) builtin, returning either <VAR>n</VAR> or
+the exit status of the last command executed within the script as the exit
+status of the script.
+Any command associated with the <CODE>RETURN</CODE> trap is executed
+before execution resumes after the function or script.
+The return status is non-zero if <CODE>return</CODE> is used outside a function
+and not during the execution of a script by <CODE>.</CODE> or <CODE>source</CODE>.
+<P>
+
+<DT><CODE>shift</CODE>
+<DD><A NAME="IDX82"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>shift [<VAR>n</VAR>]
+</pre></td></tr></table>Shift the positional parameters to the left by <VAR>n</VAR>.
+The positional parameters from <VAR>n</VAR>+1 <small>...</small> <CODE>$#</CODE> are
+renamed to <CODE>$1</CODE> <small>...</small> <CODE>$#</CODE>-<VAR>n</VAR>.
+Parameters represented by the numbers <CODE>$#</CODE> to <CODE>$#</CODE>-<VAR>n</VAR>+1
+are unset.
+<VAR>n</VAR> must be a non-negative number less than or equal to <CODE>$#</CODE>.
+If <VAR>n</VAR> is zero or greater than <CODE>$#</CODE>, the positional parameters
+are not changed.
+If <VAR>n</VAR> is not supplied, it is assumed to be 1.
+The return status is zero unless <VAR>n</VAR> is greater than <CODE>$#</CODE> or
+less than zero, non-zero otherwise.
+<P>
+
+<DT><CODE>test</CODE>
+<DD><DT><CODE>[</CODE>
+<DD><A NAME="IDX83"></A>
+<A NAME="IDX84"></A>
+Evaluate a conditional expression <VAR>expr</VAR>.
+Each operator and operand must be a separate argument.
+Expressions are composed of the primaries described below in
+<A HREF="bashref.html#SEC82">6.4 Bash Conditional Expressions</A>.
+<CODE>test</CODE> does not accept any options, nor does it accept and ignore
+an argument of <SAMP>`--'</SAMP> as signifying the end of options.
+<P>
+
+When the <CODE>[</CODE> form is used, the last argument to the command must
+be a <CODE>]</CODE>.
+</P><P>
+
+Expressions may be combined using the following operators, listed in
+decreasing order of precedence.
+The evaluation depends on the number of arguments; see below.
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>! <VAR>expr</VAR></CODE>
+<DD>True if <VAR>expr</VAR> is false.
+<P>
+
+<DT><CODE>( <VAR>expr</VAR> )</CODE>
+<DD>Returns the value of <VAR>expr</VAR>.
+This may be used to override the normal precedence of operators.
+<P>
+
+<DT><CODE><VAR>expr1</VAR> -a <VAR>expr2</VAR></CODE>
+<DD>True if both <VAR>expr1</VAR> and <VAR>expr2</VAR> are true.
+<P>
+
+<DT><CODE><VAR>expr1</VAR> -o <VAR>expr2</VAR></CODE>
+<DD>True if either <VAR>expr1</VAR> or <VAR>expr2</VAR> is true.
+</DL>
+<P>
+
+The <CODE>test</CODE> and <CODE>[</CODE> builtins evaluate conditional
+expressions using a set of rules based on the number of arguments.
+</P><P>
+
+<DL COMPACT>
+<DT>0 arguments
+<DD>The expression is false.
+<P>
+
+<DT>1 argument
+<DD>The expression is true if and only if the argument is not null.
+<P>
+
+<DT>2 arguments
+<DD>If the first argument is <SAMP>`!'</SAMP>, the expression is true if and
+only if the second argument is null.
+If the first argument is one of the unary conditional operators
+(see section <A HREF="bashref.html#SEC82">6.4 Bash Conditional Expressions</A>), the expression
+is true if the unary test is true.
+If the first argument is not a valid unary operator, the expression is
+false.
+<P>
+
+<DT>3 arguments
+<DD>If the second argument is one of the binary conditional
+operators (see section <A HREF="bashref.html#SEC82">6.4 Bash Conditional Expressions</A>), the
+result of the expression is the result of the binary test using the
+first and third arguments as operands.
+The <SAMP>`-a'</SAMP> and <SAMP>`-o'</SAMP> operators are considered binary operators
+when there are three arguments.
+If the first argument is <SAMP>`!'</SAMP>, the value is the negation of
+the two-argument test using the second and third arguments.
+If the first argument is exactly <SAMP>`('</SAMP> and the third argument is
+exactly <SAMP>`)'</SAMP>, the result is the one-argument test of the second
+argument.
+Otherwise, the expression is false.
+<P>
+
+<DT>4 arguments
+<DD>If the first argument is <SAMP>`!'</SAMP>, the result is the negation of
+the three-argument expression composed of the remaining arguments.
+Otherwise, the expression is parsed and evaluated according to
+precedence using the rules listed above.
+<P>
+
+<DT>5 or more arguments
+<DD>The expression is parsed and evaluated according to precedence
+using the rules listed above.
+</DL>
+<P>
+
+<DT><CODE>times</CODE>
+<DD><A NAME="IDX85"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>times
+</pre></td></tr></table>Print out the user and system times used by the shell and its children.
+The return status is zero.
+<P>
+
+<DT><CODE>trap</CODE>
+<DD><A NAME="IDX86"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>trap [-lp] [<VAR>arg</VAR>] [<VAR>sigspec</VAR> <small>...</small>]
+</pre></td></tr></table>The commands in <VAR>arg</VAR> are to be read and executed when the
+shell receives signal <VAR>sigspec</VAR>. If <VAR>arg</VAR> is absent (and
+there is a single <VAR>sigspec</VAR>) or
+equal to <SAMP>`-'</SAMP>, each specified signal's disposition is reset
+to the value it had when the shell was started.
+If <VAR>arg</VAR> is the null string, then the signal specified by
+each <VAR>sigspec</VAR> is ignored by the shell and commands it invokes.
+If <VAR>arg</VAR> is not present and <SAMP>`-p'</SAMP> has been supplied,
+the shell displays the trap commands associated with each <VAR>sigspec</VAR>.
+If no arguments are supplied, or
+only <SAMP>`-p'</SAMP> is given, <CODE>trap</CODE> prints the list of commands
+associated with each signal number in a form that may be reused as
+shell input.
+The <SAMP>`-l'</SAMP> option causes the shell to print a list of signal names
+and their corresponding numbers.
+Each <VAR>sigspec</VAR> is either a signal name or a signal number.
+Signal names are case insensitive and the <CODE>SIG</CODE> prefix is optional.
+<P>
+
+If a <VAR>sigspec</VAR>
+is <CODE>0</CODE> or <CODE>EXIT</CODE>, <VAR>arg</VAR> is executed when the shell exits.
+If a <VAR>sigspec</VAR> is <CODE>DEBUG</CODE>, the command <VAR>arg</VAR> is executed
+before every simple command, <CODE>for</CODE> command, <CODE>case</CODE> command,
+<CODE>select</CODE> command, every arithmetic <CODE>for</CODE> command, and before
+the first command executes in a shell function.
+Refer to the description of the <CODE>extdebug</CODE> option to the
+<CODE>shopt</CODE> builtin (see section <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>) for details of its
+effect on the <CODE>DEBUG</CODE> trap.
+If a <VAR>sigspec</VAR> is <CODE>RETURN</CODE>, the command <VAR>arg</VAR> is executed
+each time a shell function or a script executed with the <CODE>.</CODE> or
+<CODE>source</CODE> builtins finishes executing.
+</P><P>
+
+If a <VAR>sigspec</VAR> is <CODE>ERR</CODE>, the command <VAR>arg</VAR>
+is executed whenever a simple command has a non-zero exit status,
+subject to the following conditions.
+The <CODE>ERR</CODE> trap is not executed if the failed command is part of the
+command list immediately following an <CODE>until</CODE> or <CODE>while</CODE> keyword,
+part of the test following the <CODE>if</CODE> or <CODE>elif</CODE> reserved words,
+part of a command executed in a <CODE>&#38;&#38;</CODE> or <CODE>||</CODE> list,
+or if the command's return
+status is being inverted using <CODE>!</CODE>.
+These are the same conditions obeyed by the <CODE>errexit</CODE> option.
+</P><P>
+
+Signals ignored upon entry to the shell cannot be trapped or reset.
+Trapped signals that are not being ignored are reset to their original
+values in a subshell or subshell environment when one is created.
+</P><P>
+
+The return status is zero unless a <VAR>sigspec</VAR> does not specify a
+valid signal.
+</P><P>
+
+<DT><CODE>umask</CODE>
+<DD><A NAME="IDX87"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>umask [-p] [-S] [<VAR>mode</VAR>]
+</pre></td></tr></table>Set the shell process's file creation mask to <VAR>mode</VAR>. If
+<VAR>mode</VAR> begins with a digit, it is interpreted as an octal number;
+if not, it is interpreted as a symbolic mode mask similar
+to that accepted by the <CODE>chmod</CODE> command. If <VAR>mode</VAR> is
+omitted, the current value of the mask is printed. If the <SAMP>`-S'</SAMP>
+option is supplied without a <VAR>mode</VAR> argument, the mask is printed
+in a symbolic format.
+If the <SAMP>`-p'</SAMP> option is supplied, and <VAR>mode</VAR>
+is omitted, the output is in a form that may be reused as input.
+The return status is zero if the mode is successfully changed or if
+no <VAR>mode</VAR> argument is supplied, and non-zero otherwise.
+<P>
+
+Note that when the mode is interpreted as an octal number, each number
+of the umask is subtracted from <CODE>7</CODE>. Thus, a umask of <CODE>022</CODE>
+results in permissions of <CODE>755</CODE>.
+</P><P>
+
+<DT><CODE>unset</CODE>
+<DD><A NAME="IDX88"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>unset [-fv] [<VAR>name</VAR>]
+</pre></td></tr></table>Each variable or function <VAR>name</VAR> is removed.
+If no options are supplied, or the <SAMP>`-v'</SAMP> option is given, each
+<VAR>name</VAR> refers to a shell variable.
+If the <SAMP>`-f'</SAMP> option is given, the <VAR>name</VAR>s refer to shell
+functions, and the function definition is removed.
+Readonly variables and functions may not be unset.
+The return status is zero unless a <VAR>name</VAR> is readonly.
+</DL>
+<P>
+
+<A NAME="Bash Builtins"></A>
+<HR SIZE="6">
+<A NAME="SEC60"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC59"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC58"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC65"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 4.2 Bash Builtin Commands </H2>
+<!--docid::SEC60::-->
+<P>
+
+This section describes builtin commands which are unique to
+or have been extended in Bash.
+Some of these commands are specified in the POSIX standard.
+</P><P>
+
+<DL COMPACT>
+
+<DT><CODE>alias</CODE>
+<DD><A NAME="IDX89"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>alias [<CODE>-p</CODE>] [<VAR>name</VAR>[=<VAR>value</VAR>] <small>...</small>]
+</pre></td></tr></table><P>
+
+Without arguments or with the <SAMP>`-p'</SAMP> option, <CODE>alias</CODE> prints
+the list of aliases on the standard output in a form that allows
+them to be reused as input.
+If arguments are supplied, an alias is defined for each <VAR>name</VAR>
+whose <VAR>value</VAR> is given. If no <VAR>value</VAR> is given, the name
+and value of the alias is printed.
+Aliases are described in <A HREF="bashref.html#SEC84">6.6 Aliases</A>.
+</P><P>
+
+<DT><CODE>bind</CODE>
+<DD><A NAME="IDX90"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>bind [-m <VAR>keymap</VAR>] [-lpsvPSV]
+bind [-m <VAR>keymap</VAR>] [-q <VAR>function</VAR>] [-u <VAR>function</VAR>] [-r <VAR>keyseq</VAR>]
+bind [-m <VAR>keymap</VAR>] -f <VAR>filename</VAR>
+bind [-m <VAR>keymap</VAR>] -x <VAR>keyseq:shell-command</VAR>
+bind [-m <VAR>keymap</VAR>] <VAR>keyseq:function-name</VAR>
+bind <VAR>readline-command</VAR>
+</pre></td></tr></table><P>
+
+Display current Readline (see section <A HREF="bashref.html#SEC95">8. Command Line Editing</A>)
+key and function bindings,
+bind a key sequence to a Readline function or macro,
+or set a Readline variable.
+Each non-option argument is a command as it would appear in a
+Readline initialization file (see section <A HREF="bashref.html#SEC103">8.3 Readline Init File</A>),
+but each binding or command must be passed as a separate argument; e.g.,
+<SAMP>`"\C-x\C-r":re-read-init-file'</SAMP>.
+</P><P>
+
+Options, if supplied, have the following meanings:
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>-m <VAR>keymap</VAR></CODE>
+<DD>Use <VAR>keymap</VAR> as the keymap to be affected by
+the subsequent bindings. Acceptable <VAR>keymap</VAR>
+names are
+<CODE>emacs</CODE>,
+<CODE>emacs-standard</CODE>,
+<CODE>emacs-meta</CODE>,
+<CODE>emacs-ctlx</CODE>,
+<CODE>vi</CODE>,
+<CODE>vi-move</CODE>,
+<CODE>vi-command</CODE>, and
+<CODE>vi-insert</CODE>.
+<CODE>vi</CODE> is equivalent to <CODE>vi-command</CODE>;
+<CODE>emacs</CODE> is equivalent to <CODE>emacs-standard</CODE>.
+<P>
+
+<DT><CODE>-l</CODE>
+<DD>List the names of all Readline functions.
+<P>
+
+<DT><CODE>-p</CODE>
+<DD>Display Readline function names and bindings in such a way that they
+can be used as input or in a Readline initialization file.
+<P>
+
+<DT><CODE>-P</CODE>
+<DD>List current Readline function names and bindings.
+<P>
+
+<DT><CODE>-v</CODE>
+<DD>Display Readline variable names and values in such a way that they
+can be used as input or in a Readline initialization file.
+<P>
+
+<DT><CODE>-V</CODE>
+<DD>List current Readline variable names and values.
+<P>
+
+<DT><CODE>-s</CODE>
+<DD>Display Readline key sequences bound to macros and the strings they output
+in such a way that they can be used as input or in a Readline
+initialization file.
+<P>
+
+<DT><CODE>-S</CODE>
+<DD>Display Readline key sequences bound to macros and the strings they output.
+<P>
+
+<DT><CODE>-f <VAR>filename</VAR></CODE>
+<DD>Read key bindings from <VAR>filename</VAR>.
+<P>
+
+<DT><CODE>-q <VAR>function</VAR></CODE>
+<DD>Query about which keys invoke the named <VAR>function</VAR>.
+<P>
+
+<DT><CODE>-u <VAR>function</VAR></CODE>
+<DD>Unbind all keys bound to the named <VAR>function</VAR>.
+<P>
+
+<DT><CODE>-r <VAR>keyseq</VAR></CODE>
+<DD>Remove any current binding for <VAR>keyseq</VAR>.
+<P>
+
+<DT><CODE>-x <VAR>keyseq:shell-command</VAR></CODE>
+<DD>Cause <VAR>shell-command</VAR> to be executed whenever <VAR>keyseq</VAR> is
+entered.
+When <VAR>shell-command</VAR> is executed, the shell sets the
+<CODE>READLINE_LINE</CODE> variable to the contents of the Readline line
+buffer and the <CODE>READLINE_POINT</CODE> variable to the current location
+of the insertion point.
+If the executed command changes the value of <CODE>READLINE_LINE</CODE> or
+<CODE>READLINE_POINT</CODE>, those new values will be reflected in the
+editing state.
+</DL>
+<P>
+
+The return status is zero unless an invalid option is supplied or an
+error occurs.
+</P><P>
+
+<DT><CODE>builtin</CODE>
+<DD><A NAME="IDX91"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>builtin [<VAR>shell-builtin</VAR> [<VAR>args</VAR>]]
+</pre></td></tr></table>Run a shell builtin, passing it <VAR>args</VAR>, and return its exit status.
+This is useful when defining a shell function with the same
+name as a shell builtin, retaining the functionality of the builtin within
+the function.
+The return status is non-zero if <VAR>shell-builtin</VAR> is not a shell
+builtin command.
+<P>
+
+<DT><CODE>caller</CODE>
+<DD><A NAME="IDX92"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>caller [<VAR>expr</VAR>]
+</pre></td></tr></table>Returns the context of any active subroutine call (a shell function or
+a script executed with the <CODE>.</CODE> or <CODE>source</CODE> builtins).
+<P>
+
+Without <VAR>expr</VAR>, <CODE>caller</CODE> displays the line number and source
+filename of the current subroutine call.
+If a non-negative integer is supplied as <VAR>expr</VAR>, <CODE>caller</CODE>
+displays the line number, subroutine name, and source file corresponding
+to that position in the current execution call stack. This extra
+information may be used, for example, to print a stack trace. The
+current frame is frame 0.
+</P><P>
+
+The return value is 0 unless the shell is not executing a subroutine
+call or <VAR>expr</VAR> does not correspond to a valid position in the
+call stack.
+</P><P>
+
+<DT><CODE>command</CODE>
+<DD><A NAME="IDX93"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>command [-pVv] <VAR>command</VAR> [<VAR>arguments</VAR> <small>...</small>]
+</pre></td></tr></table>Runs <VAR>command</VAR> with <VAR>arguments</VAR> ignoring any shell function
+named <VAR>command</VAR>.
+Only shell builtin commands or commands found by searching the
+<CODE>PATH</CODE> are executed.
+If there is a shell function named <CODE>ls</CODE>, running <SAMP>`command ls'</SAMP>
+within the function will execute the external command <CODE>ls</CODE>
+instead of calling the function recursively.
+The <SAMP>`-p'</SAMP> option means to use a default value for <CODE>PATH</CODE>
+that is guaranteed to find all of the standard utilities.
+The return status in this case is 127 if <VAR>command</VAR> cannot be
+found or an error occurred, and the exit status of <VAR>command</VAR>
+otherwise.
+<P>
+
+If either the <SAMP>`-V'</SAMP> or <SAMP>`-v'</SAMP> option is supplied, a
+description of <VAR>command</VAR> is printed. The <SAMP>`-v'</SAMP> option
+causes a single word indicating the command or file name used to
+invoke <VAR>command</VAR> to be displayed; the <SAMP>`-V'</SAMP> option produces
+a more verbose description. In this case, the return status is
+zero if <VAR>command</VAR> is found, and non-zero if not.
+</P><P>
+
+<DT><CODE>declare</CODE>
+<DD><A NAME="IDX94"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>declare [-aAfFilrtux] [-p] [<VAR>name</VAR>[=<VAR>value</VAR>] <small>...</small>]
+</pre></td></tr></table><P>
+
+Declare variables and give them attributes. If no <VAR>name</VAR>s
+are given, then display the values of variables instead.
+</P><P>
+
+The <SAMP>`-p'</SAMP> option will display the attributes and values of each
+<VAR>name</VAR>.
+When <SAMP>`-p'</SAMP> is used with <VAR>name</VAR> arguments, additional options
+are ignored.
+</P><P>
+
+When <SAMP>`-p'</SAMP> is supplied without <VAR>name</VAR> arguments, <CODE>declare</CODE>
+will display the attributes and values of all variables having the
+attributes specified by the additional options.
+If no other options are supplied with <SAMP>`-p'</SAMP>, <CODE>declare</CODE> will
+display the attributes and values of all shell variables. The <SAMP>`-f'</SAMP>
+option will restrict the display to shell functions.
+</P><P>
+
+The <SAMP>`-F'</SAMP> option inhibits the display of function definitions;
+only the function name and attributes are printed.
+If the <CODE>extdebug</CODE> shell option is enabled using <CODE>shopt</CODE>
+(see section <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>), the source file name and line number where
+the function is defined are displayed as well.
+<SAMP>`-F'</SAMP> implies <SAMP>`-f'</SAMP>.
+The following options can be used to restrict output to variables with
+the specified attributes or to give variables attributes:
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>-a</CODE>
+<DD>Each <VAR>name</VAR> is an indexed array variable (see section <A HREF="bashref.html#SEC85">6.7 Arrays</A>).
+<P>
+
+<DT><CODE>-A</CODE>
+<DD>Each <VAR>name</VAR> is an associative array variable (see section <A HREF="bashref.html#SEC85">6.7 Arrays</A>).
+<P>
+
+<DT><CODE>-f</CODE>
+<DD>Use function names only.
+<P>
+
+<DT><CODE>-i</CODE>
+<DD>The variable is to be treated as
+an integer; arithmetic evaluation (see section <A HREF="bashref.html#SEC83">6.5 Shell Arithmetic</A>) is
+performed when the variable is assigned a value.
+<P>
+
+<DT><CODE>-l</CODE>
+<DD>When the variable is assigned a value, all upper-case characters are
+converted to lower-case.
+The upper-case attribute is disabled.
+<P>
+
+<DT><CODE>-r</CODE>
+<DD>Make <VAR>name</VAR>s readonly. These names cannot then be assigned values
+by subsequent assignment statements or unset.
+<P>
+
+<DT><CODE>-t</CODE>
+<DD>Give each <VAR>name</VAR> the <CODE>trace</CODE> attribute.
+Traced functions inherit the <CODE>DEBUG</CODE> and <CODE>RETURN</CODE> traps from
+the calling shell.
+The trace attribute has no special meaning for variables.
+<P>
+
+<DT><CODE>-u</CODE>
+<DD>When the variable is assigned a value, all lower-case characters are
+converted to upper-case.
+The lower-case attribute is disabled.
+<P>
+
+<DT><CODE>-x</CODE>
+<DD>Mark each <VAR>name</VAR> for export to subsequent commands via
+the environment.
+</DL>
+<P>
+
+Using <SAMP>`+'</SAMP> instead of <SAMP>`-'</SAMP> turns off the attribute instead,
+with the exceptions that <SAMP>`+a'</SAMP>
+may not be used to destroy an array variable and <SAMP>`+r'</SAMP> will not
+remove the readonly attribute.
+When used in a function, <CODE>declare</CODE> makes each <VAR>name</VAR> local,
+as with the <CODE>local</CODE> command. If a variable name is followed by
+=<VAR>value</VAR>, the value of the variable is set to <VAR>value</VAR>.
+</P><P>
+
+The return status is zero unless an invalid option is encountered,
+an attempt is made to define a function using <SAMP>`-f foo=bar'</SAMP>,
+an attempt is made to assign a value to a readonly variable,
+an attempt is made to assign a value to an array variable without
+using the compound assignment syntax (see section <A HREF="bashref.html#SEC85">6.7 Arrays</A>),
+one of the <VAR>names</VAR> is not a valid shell variable name,
+an attempt is made to turn off readonly status for a readonly variable,
+an attempt is made to turn off array status for an array variable,
+or an attempt is made to display a non-existent function with <SAMP>`-f'</SAMP>.
+</P><P>
+
+<DT><CODE>echo</CODE>
+<DD><A NAME="IDX95"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>echo [-neE] [<VAR>arg</VAR> <small>...</small>]
+</pre></td></tr></table>Output the <VAR>arg</VAR>s, separated by spaces, terminated with a
+newline.
+The return status is always 0.
+If <SAMP>`-n'</SAMP> is specified, the trailing newline is suppressed.
+If the <SAMP>`-e'</SAMP> option is given, interpretation of the following
+backslash-escaped characters is enabled.
+The <SAMP>`-E'</SAMP> option disables the interpretation of these escape characters,
+even on systems where they are interpreted by default.
+The <CODE>xpg_echo</CODE> shell option may be used to
+dynamically determine whether or not <CODE>echo</CODE> expands these
+escape characters by default.
+<CODE>echo</CODE> does not interpret <SAMP>`--'</SAMP> to mean the end of options.
+<P>
+
+<CODE>echo</CODE> interprets the following escape sequences:
+<DL COMPACT>
+<DT><CODE>\a</CODE>
+<DD>alert (bell)
+<DT><CODE>\b</CODE>
+<DD>backspace
+<DT><CODE>\c</CODE>
+<DD>suppress further output
+<DT><CODE>\e</CODE>
+<DD>escape
+<DT><CODE>\f</CODE>
+<DD>form feed
+<DT><CODE>\n</CODE>
+<DD>new line
+<DT><CODE>\r</CODE>
+<DD>carriage return
+<DT><CODE>\t</CODE>
+<DD>horizontal tab
+<DT><CODE>\v</CODE>
+<DD>vertical tab
+<DT><CODE>\\</CODE>
+<DD>backslash
+<DT><CODE>\0<VAR>nnn</VAR></CODE>
+<DD>the eight-bit character whose value is the octal value <VAR>nnn</VAR>
+(zero to three octal digits)
+<DT><CODE>\x<VAR>HH</VAR></CODE>
+<DD>the eight-bit character whose value is the hexadecimal value <VAR>HH</VAR>
+(one or two hex digits)
+</DL>
+<P>
+
+<DT><CODE>enable</CODE>
+<DD><A NAME="IDX96"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>enable [-a] [-dnps] [-f <VAR>filename</VAR>] [<VAR>name</VAR> <small>...</small>]
+</pre></td></tr></table>Enable and disable builtin shell commands.
+Disabling a builtin allows a disk command which has the same name
+as a shell builtin to be executed without specifying a full pathname,
+even though the shell normally searches for builtins before disk commands.
+If <SAMP>`-n'</SAMP> is used, the <VAR>name</VAR>s become disabled. Otherwise
+<VAR>name</VAR>s are enabled. For example, to use the <CODE>test</CODE> binary
+found via <CODE>$PATH</CODE> instead of the shell builtin version, type
+<SAMP>`enable -n test'</SAMP>.
+<P>
+
+If the <SAMP>`-p'</SAMP> option is supplied, or no <VAR>name</VAR> arguments appear,
+a list of shell builtins is printed. With no other arguments, the list
+consists of all enabled shell builtins.
+The <SAMP>`-a'</SAMP> option means to list
+each builtin with an indication of whether or not it is enabled.
+</P><P>
+
+The <SAMP>`-f'</SAMP> option means to load the new builtin command <VAR>name</VAR>
+from shared object <VAR>filename</VAR>, on systems that support dynamic loading.
+The <SAMP>`-d'</SAMP> option will delete a builtin loaded with <SAMP>`-f'</SAMP>.
+</P><P>
+
+If there are no options, a list of the shell builtins is displayed.
+The <SAMP>`-s'</SAMP> option restricts <CODE>enable</CODE> to the POSIX special
+builtins. If <SAMP>`-s'</SAMP> is used with <SAMP>`-f'</SAMP>, the new builtin becomes
+a special builtin (see section <A HREF="bashref.html#SEC64">4.4 Special Builtins</A>).
+</P><P>
+
+The return status is zero unless a <VAR>name</VAR> is not a shell builtin
+or there is an error loading a new builtin from a shared object.
+</P><P>
+
+<DT><CODE>help</CODE>
+<DD><A NAME="IDX97"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>help [-dms] [<VAR>pattern</VAR>]
+</pre></td></tr></table>Display helpful information about builtin commands.
+If <VAR>pattern</VAR> is specified, <CODE>help</CODE> gives detailed help
+on all commands matching <VAR>pattern</VAR>, otherwise a list of
+the builtins is printed.
+<P>
+
+Options, if supplied, have the following meanings:
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>-d</CODE>
+<DD>Display a short description of each <VAR>pattern</VAR>
+<DT><CODE>-m</CODE>
+<DD>Display the description of each <VAR>pattern</VAR> in a manpage-like format
+<DT><CODE>-s</CODE>
+<DD>Display only a short usage synopsis for each <VAR>pattern</VAR>
+</DL>
+<P>
+
+The return status is zero unless no command matches <VAR>pattern</VAR>.
+</P><P>
+
+<DT><CODE>let</CODE>
+<DD><A NAME="IDX98"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>let <VAR>expression</VAR> [<VAR>expression</VAR>]
+</pre></td></tr></table>The <CODE>let</CODE> builtin allows arithmetic to be performed on shell
+variables. Each <VAR>expression</VAR> is evaluated according to the
+rules given below in <A HREF="bashref.html#SEC83">6.5 Shell Arithmetic</A>. If the
+last <VAR>expression</VAR> evaluates to 0, <CODE>let</CODE> returns 1;
+otherwise 0 is returned.
+<P>
+
+<DT><CODE>local</CODE>
+<DD><A NAME="IDX99"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>local [<VAR>option</VAR>] <VAR>name</VAR>[=<VAR>value</VAR>] <small>...</small>
+</pre></td></tr></table>For each argument, a local variable named <VAR>name</VAR> is created,
+and assigned <VAR>value</VAR>.
+The <VAR>option</VAR> can be any of the options accepted by <CODE>declare</CODE>.
+<CODE>local</CODE> can only be used within a function; it makes the variable
+<VAR>name</VAR> have a visible scope restricted to that function and its
+children. The return status is zero unless <CODE>local</CODE> is used outside
+a function, an invalid <VAR>name</VAR> is supplied, or <VAR>name</VAR> is a
+readonly variable.
+<P>
+
+<DT><CODE>logout</CODE>
+<DD><A NAME="IDX100"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>logout [<VAR>n</VAR>]
+</pre></td></tr></table>Exit a login shell, returning a status of <VAR>n</VAR> to the shell's
+parent.
+<P>
+
+<DT><CODE>mapfile</CODE>
+<DD><A NAME="IDX101"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>mapfile [-n <VAR>count</VAR>] [-O <VAR>origin</VAR>] [-s <VAR>count</VAR>] [-t] [-u <VAR>fd</VAR>] [
+-C <VAR>callback</VAR>] [-c <VAR>quantum</VAR>] [<VAR>array</VAR>]
+</pre></td></tr></table>Read lines from the standard input into the indexed array variable <VAR>array</VAR>,
+or from file descriptor <VAR>fd</VAR>
+if the <SAMP>`-u'</SAMP> option is supplied.
+The variable <CODE>MAPFILE</CODE> is the default <VAR>array</VAR>.
+Options, if supplied, have the following meanings:
+<DL COMPACT>
+
+<DT><CODE>-n</CODE>
+<DD>Copy at most <VAR>count</VAR> lines. If <VAR>count</VAR> is 0, all lines are copied.
+<DT><CODE>-O</CODE>
+<DD>Begin assigning to <VAR>array</VAR> at index <VAR>origin</VAR>.
+The default index is 0.
+<DT><CODE>-s</CODE>
+<DD>Discard the first <VAR>count</VAR> lines read.
+<DT><CODE>-t</CODE>
+<DD>Remove a trailing newline from each line read.
+<DT><CODE>-u</CODE>
+<DD>Read lines from file descriptor <VAR>fd</VAR> instead of the standard input.
+<DT><CODE>-C</CODE>
+<DD>Evaluate <VAR>callback</VAR> each time <VAR>quantum</VAR>P lines are read.
+The <SAMP>`-c'</SAMP> option specifies <VAR>quantum</VAR>.
+<DT><CODE>-c</CODE>
+<DD>Specify the number of lines read between each call to <VAR>callback</VAR>.
+</DL>
+<P>
+
+If <SAMP>`-C'</SAMP> is specified without <SAMP>`-c'</SAMP>,
+the default quantum is 5000.
+When <VAR>callback</VAR> is evaluated, it is supplied the index of the next
+array element to be assigned as an additional argument.
+<VAR>callback</VAR> is evaluated after the line is read but before the
+array element is assigned.
+</P><P>
+
+If not supplied with an explicit origin, <CODE>mapfile</CODE> will clear <VAR>array</VAR>
+before assigning to it.
+</P><P>
+
+<CODE>mapfile</CODE> returns successfully unless an invalid option or option
+argument is supplied, <VAR>array</VAR> is invalid or unassignable, or <VAR>array</VAR>
+is not an indexed array.
+</P><P>
+
+<DT><CODE>printf</CODE>
+<DD><A NAME="IDX102"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>printf [-v <VAR>var</VAR>] <VAR>format</VAR> [<VAR>arguments</VAR>]
+</pre></td></tr></table>Write the formatted <VAR>arguments</VAR> to the standard output under the
+control of the <VAR>format</VAR>.
+The <VAR>format</VAR> is a character string which contains three types of objects:
+plain characters, which are simply copied to standard output, character
+escape sequences, which are converted and copied to the standard output, and
+format specifications, each of which causes printing of the next successive
+<VAR>argument</VAR>.
+In addition to the standard <CODE>printf(1)</CODE> formats, <SAMP>`%b'</SAMP> causes
+<CODE>printf</CODE> to expand backslash escape sequences in the corresponding
+<VAR>argument</VAR>,
+(except that <SAMP>`\c'</SAMP> terminates output, backslashes in
+<SAMP>`\''</SAMP>, <SAMP>`\"'</SAMP>, and <SAMP>`\?'</SAMP> are not removed, and octal escapes
+beginning with <SAMP>`\0'</SAMP> may contain up to four digits),
+and <SAMP>`%q'</SAMP> causes <CODE>printf</CODE> to output the
+corresponding <VAR>argument</VAR> in a format that can be reused as shell input.
+<P>
+
+The <SAMP>`-v'</SAMP> option causes the output to be assigned to the variable
+<VAR>var</VAR> rather than being printed to the standard output.
+</P><P>
+
+The <VAR>format</VAR> is reused as necessary to consume all of the <VAR>arguments</VAR>.
+If the <VAR>format</VAR> requires more <VAR>arguments</VAR> than are supplied, the
+extra format specifications behave as if a zero value or null string, as
+appropriate, had been supplied. The return value is zero on success,
+non-zero on failure.
+</P><P>
+
+<DT><CODE>read</CODE>
+<DD><A NAME="IDX103"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>read [-ers] [-a <VAR>aname</VAR>] [-d <VAR>delim</VAR>] [-i <VAR>text</VAR>] [-n <VAR>nchars</VAR>] [-N <VAR>nchars</VAR>] [-p <VAR>prompt</VAR>] [-t <VAR>timeout</VAR>] [-u <VAR>fd</VAR>] [<VAR>name</VAR> <small>...</small>]
+</pre></td></tr></table>One line is read from the standard input, or from the file descriptor
+<VAR>fd</VAR> supplied as an argument to the <SAMP>`-u'</SAMP> option, and the first word
+is assigned to the first <VAR>name</VAR>, the second word to the second <VAR>name</VAR>,
+and so on, with leftover words and their intervening separators assigned
+to the last <VAR>name</VAR>.
+If there are fewer words read from the input stream than names,
+the remaining names are assigned empty values.
+The characters in the value of the <CODE>IFS</CODE> variable
+are used to split the line into words.
+The backslash character <SAMP>`\'</SAMP> may be used to remove any special
+meaning for the next character read and for line continuation.
+If no names are supplied, the line read is assigned to the
+variable <CODE>REPLY</CODE>.
+The return code is zero, unless end-of-file is encountered, <CODE>read</CODE>
+times out (in which case the return code is greater than 128), or an
+invalid file descriptor is supplied as the argument to <SAMP>`-u'</SAMP>.
+<P>
+
+Options, if supplied, have the following meanings:
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>-a <VAR>aname</VAR></CODE>
+<DD>The words are assigned to sequential indices of the array variable
+<VAR>aname</VAR>, starting at 0.
+All elements are removed from <VAR>aname</VAR> before the assignment.
+Other <VAR>name</VAR> arguments are ignored.
+<P>
+
+<DT><CODE>-d <VAR>delim</VAR></CODE>
+<DD>The first character of <VAR>delim</VAR> is used to terminate the input line,
+rather than newline.
+<P>
+
+<DT><CODE>-e</CODE>
+<DD>Readline (see section <A HREF="bashref.html#SEC95">8. Command Line Editing</A>) is used to obtain the line.
+Readline uses the current (or default, if line editing was not previously
+active) editing settings.
+<P>
+
+<DT><CODE>-i <VAR>text</VAR></CODE>
+<DD>If Readline is being used to read the line, <VAR>text</VAR> is placed into
+the editing buffer before editing begins.
+<P>
+
+<DT><CODE>-n <VAR>nchars</VAR></CODE>
+<DD><CODE>read</CODE> returns after reading <VAR>nchars</VAR> characters rather than
+waiting for a complete line of input, but honor a delimiter if fewer
+than <VAR>nchars</VAR> characters are read before the delimiter.
+<P>
+
+<DT><CODE>-N <VAR>nchars</VAR></CODE>
+<DD><CODE>read</CODE> returns after reading exactly <VAR>nchars</VAR> characters rather
+than waiting for a complete line of input, unless EOF is encountered or
+<CODE>read</CODE> times out.
+Delimiter characters encountered in the input are
+not treated specially and do not cause <CODE>read</CODE> to return until
+<VAR>nchars</VAR> characters are read.
+<P>
+
+<DT><CODE>-p <VAR>prompt</VAR></CODE>
+<DD>Display <VAR>prompt</VAR>, without a trailing newline, before attempting
+to read any input.
+The prompt is displayed only if input is coming from a terminal.
+<P>
+
+<DT><CODE>-r</CODE>
+<DD>If this option is given, backslash does not act as an escape character.
+The backslash is considered to be part of the line.
+In particular, a backslash-newline pair may not be used as a line
+continuation.
+<P>
+
+<DT><CODE>-s</CODE>
+<DD>Silent mode. If input is coming from a terminal, characters are
+not echoed.
+<P>
+
+<DT><CODE>-t <VAR>timeout</VAR></CODE>
+<DD>Cause <CODE>read</CODE> to time out and return failure if a complete line of
+input is not read within <VAR>timeout</VAR> seconds.
+<VAR>timeout</VAR> may be a decimal number with a fractional portion following
+the decimal point.
+This option is only effective if <CODE>read</CODE> is reading input from a
+terminal, pipe, or other special file; it has no effect when reading
+from regular files.
+If <VAR>timeout</VAR> is 0, <CODE>read</CODE> returns success if input is available on
+the specified file descriptor, failure otherwise.
+The exit status is greater than 128 if the timeout is exceeded.
+<P>
+
+<DT><CODE>-u <VAR>fd</VAR></CODE>
+<DD>Read input from file descriptor <VAR>fd</VAR>.
+<P>
+
+</DL>
+<P>
+
+<DT><CODE>readarray</CODE>
+<DD><A NAME="IDX104"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>readarray [-n <VAR>count</VAR>] [-O <VAR>origin</VAR>] [-s <VAR>count</VAR>] [-t] [-u <VAR>fd</VAR>] [
+-C <VAR>callback</VAR>] [-c <VAR>quantum</VAR>] [<VAR>array</VAR>]
+</pre></td></tr></table>Read lines from the standard input into the indexed array variable <VAR>array</VAR>,
+or from file descriptor <VAR>fd</VAR>
+if the <SAMP>`-u'</SAMP> option is supplied.
+<P>
+
+A synonym for <CODE>mapfile</CODE>.
+</P><P>
+
+<DT><CODE>source</CODE>
+<DD><A NAME="IDX105"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>source <VAR>filename</VAR>
+</pre></td></tr></table>A synonym for <CODE>.</CODE> (see section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>).
+<P>
+
+<DT><CODE>type</CODE>
+<DD><A NAME="IDX106"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>type [-afptP] [<VAR>name</VAR> <small>...</small>]
+</pre></td></tr></table>For each <VAR>name</VAR>, indicate how it would be interpreted if used as a
+command name.
+<P>
+
+If the <SAMP>`-t'</SAMP> option is used, <CODE>type</CODE> prints a single word
+which is one of <SAMP>`alias'</SAMP>, <SAMP>`function'</SAMP>, <SAMP>`builtin'</SAMP>,
+<SAMP>`file'</SAMP> or <SAMP>`keyword'</SAMP>,
+if <VAR>name</VAR> is an alias, shell function, shell builtin,
+disk file, or shell reserved word, respectively.
+If the <VAR>name</VAR> is not found, then nothing is printed, and
+<CODE>type</CODE> returns a failure status.
+</P><P>
+
+If the <SAMP>`-p'</SAMP> option is used, <CODE>type</CODE> either returns the name
+of the disk file that would be executed, or nothing if <SAMP>`-t'</SAMP>
+would not return <SAMP>`file'</SAMP>.
+</P><P>
+
+The <SAMP>`-P'</SAMP> option forces a path search for each <VAR>name</VAR>, even if
+<SAMP>`-t'</SAMP> would not return <SAMP>`file'</SAMP>.
+</P><P>
+
+If a command is hashed, <SAMP>`-p'</SAMP> and <SAMP>`-P'</SAMP> print the hashed value,
+not necessarily the file that appears first in <CODE>$PATH</CODE>.
+</P><P>
+
+If the <SAMP>`-a'</SAMP> option is used, <CODE>type</CODE> returns all of the places
+that contain an executable named <VAR>file</VAR>.
+This includes aliases and functions, if and only if the <SAMP>`-p'</SAMP> option
+is not also used.
+</P><P>
+
+If the <SAMP>`-f'</SAMP> option is used, <CODE>type</CODE> does not attempt to find
+shell functions, as with the <CODE>command</CODE> builtin.
+</P><P>
+
+The return status is zero if all of the <VAR>names</VAR> are found, non-zero
+if any are not found.
+</P><P>
+
+<DT><CODE>typeset</CODE>
+<DD><A NAME="IDX107"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>typeset [-afFrxi] [-p] [<VAR>name</VAR>[=<VAR>value</VAR>] <small>...</small>]
+</pre></td></tr></table>The <CODE>typeset</CODE> command is supplied for compatibility with the Korn
+shell; however, it has been deprecated in favor of the <CODE>declare</CODE>
+builtin command.
+<P>
+
+<DT><CODE>ulimit</CODE>
+<DD><A NAME="IDX108"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>ulimit [-abcdefilmnpqrstuvxHST] [<VAR>limit</VAR>]
+</pre></td></tr></table><CODE>ulimit</CODE> provides control over the resources available to processes
+started by the shell, on systems that allow such control. If an
+option is given, it is interpreted as follows:
+<DL COMPACT>
+<DT><CODE>-S</CODE>
+<DD>Change and report the soft limit associated with a resource.
+<P>
+
+<DT><CODE>-H</CODE>
+<DD>Change and report the hard limit associated with a resource.
+<P>
+
+<DT><CODE>-a</CODE>
+<DD>All current limits are reported.
+<P>
+
+<DT><CODE>-b</CODE>
+<DD>The maximum socket buffer size.
+<P>
+
+<DT><CODE>-c</CODE>
+<DD>The maximum size of core files created.
+<P>
+
+<DT><CODE>-d</CODE>
+<DD>The maximum size of a process's data segment.
+<P>
+
+<DT><CODE>-e</CODE>
+<DD>The maximum scheduling priority ("nice").
+<P>
+
+<DT><CODE>-f</CODE>
+<DD>The maximum size of files written by the shell and its children.
+<P>
+
+<DT><CODE>-i</CODE>
+<DD>The maximum number of pending signals.
+<P>
+
+<DT><CODE>-l</CODE>
+<DD>The maximum size that may be locked into memory.
+<P>
+
+<DT><CODE>-m</CODE>
+<DD>The maximum resident set size (many systems do not honor this limit).
+<P>
+
+<DT><CODE>-n</CODE>
+<DD>The maximum number of open file descriptors (most systems do not
+allow this value to be set).
+<P>
+
+<DT><CODE>-p</CODE>
+<DD>The pipe buffer size.
+<P>
+
+<DT><CODE>-q</CODE>
+<DD>The maximum number of bytes in POSIX message queues.
+<P>
+
+<DT><CODE>-r</CODE>
+<DD>The maximum real-time scheduling priority.
+<P>
+
+<DT><CODE>-s</CODE>
+<DD>The maximum stack size.
+<P>
+
+<DT><CODE>-t</CODE>
+<DD>The maximum amount of cpu time in seconds.
+<P>
+
+<DT><CODE>-u</CODE>
+<DD>The maximum number of processes available to a single user.
+<P>
+
+<DT><CODE>-v</CODE>
+<DD>The maximum amount of virtual memory available to the process.
+<P>
+
+<DT><CODE>-x</CODE>
+<DD>The maximum number of file locks.
+<P>
+
+<DT><CODE>-T</CODE>
+<DD>The maximum number of threads.
+<P>
+
+</DL>
+<P>
+
+If <VAR>limit</VAR> is given, it is the new value of the specified resource;
+the special <VAR>limit</VAR> values <CODE>hard</CODE>, <CODE>soft</CODE>, and
+<CODE>unlimited</CODE> stand for the current hard limit, the current soft limit,
+and no limit, respectively.
+A hard limit cannot be increased by a non-root user once it is set;
+a soft limit may be increased up to the value of the hard limit.
+Otherwise, the current value of the soft limit for the specified resource
+is printed, unless the <SAMP>`-H'</SAMP> option is supplied.
+When setting new limits, if neither <SAMP>`-H'</SAMP> nor <SAMP>`-S'</SAMP> is supplied,
+both the hard and soft limits are set.
+If no option is given, then <SAMP>`-f'</SAMP> is assumed. Values are in 1024-byte
+increments, except for <SAMP>`-t'</SAMP>, which is in seconds, <SAMP>`-p'</SAMP>,
+which is in units of 512-byte blocks, and <SAMP>`-n'</SAMP> and <SAMP>`-u'</SAMP>, which
+are unscaled values.
+</P><P>
+
+The return status is zero unless an invalid option or argument is supplied,
+or an error occurs while setting a new limit.
+</P><P>
+
+<DT><CODE>unalias</CODE>
+<DD><A NAME="IDX109"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>unalias [-a] [<VAR>name</VAR> <small>...</small> ]
+</pre></td></tr></table><P>
+
+Remove each <VAR>name</VAR> from the list of aliases. If <SAMP>`-a'</SAMP> is
+supplied, all aliases are removed.
+Aliases are described in <A HREF="bashref.html#SEC84">6.6 Aliases</A>.
+</P><P>
+
+</DL>
+<P>
+
+<A NAME="Modifying Shell Behavior"></A>
+<HR SIZE="6">
+<A NAME="SEC61"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC60"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC62"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC58"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 4.3 Modifying Shell Behavior </H2>
+<!--docid::SEC61::-->
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Change the values of shell attributes and
+ positional parameters.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Modify shell optional behavior.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+<A NAME="The Set Builtin"></A>
+<HR SIZE="6">
+<A NAME="SEC62"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC63"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 4.3.1 The Set Builtin </H3>
+<!--docid::SEC62::-->
+<P>
+
+This builtin is so complicated that it deserves its own section. <CODE>set</CODE>
+allows you to change the values of shell options and set the positional
+parameters, or to display the names and values of shell variables.
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>set</CODE>
+<DD><A NAME="IDX110"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>set [--abefhkmnptuvxBCEHPT] [-o <VAR>option</VAR>] [<VAR>argument</VAR> <small>...</small>]
+set [+abefhkmnptuvxBCEHPT] [+o <VAR>option</VAR>] [<VAR>argument</VAR> <small>...</small>]
+</pre></td></tr></table><P>
+
+If no options or arguments are supplied, <CODE>set</CODE> displays the names
+and values of all shell variables and functions, sorted according to the
+current locale, in a format that may be reused as input
+for setting or resetting the currently-set variables.
+Read-only variables cannot be reset.
+In POSIX mode, only shell variables are listed.
+</P><P>
+
+When options are supplied, they set or unset shell attributes.
+Options, if specified, have the following meanings:
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>-a</CODE>
+<DD>Mark variables and function which are modified or created for export
+to the environment of subsequent commands.
+<P>
+
+<DT><CODE>-b</CODE>
+<DD>Cause the status of terminated background jobs to be reported
+immediately, rather than before printing the next primary prompt.
+<P>
+
+<DT><CODE>-e</CODE>
+<DD>Exit immediately if a pipeline (see section <A HREF="bashref.html#SEC17">3.2.2 Pipelines</A>), which may consist
+of a single simple command (see section <A HREF="bashref.html#SEC16">3.2.1 Simple Commands</A>),
+a subshell command enclosed in parentheses (see section <A HREF="bashref.html#SEC22">3.2.4.3 Grouping Commands</A>),
+or one of the commands executed as part of a command list enclosed
+by braces (see section <A HREF="bashref.html#SEC22">3.2.4.3 Grouping Commands</A>)
+returns a non-zero status.
+The shell does not exit if the command that fails is part of the
+command list immediately following a <CODE>while</CODE> or <CODE>until</CODE> keyword,
+part of the test in an <CODE>if</CODE> statement,
+part of any command executed in a <CODE>&#38;&#38;</CODE> or <CODE>||</CODE> list except
+the command following the final <CODE>&#38;&#38;</CODE> or <CODE>||</CODE>,
+any command in a pipeline but the last,
+or if the command's return status is being inverted with <CODE>!</CODE>.
+A trap on <CODE>ERR</CODE>, if set, is executed before the shell exits.
+<P>
+
+This option applies to the shell environment and each subshell environment
+separately (see section <A HREF="bashref.html#SEC53">3.7.3 Command Execution Environment</A>), and may cause
+subshells to exit before executing all the commands in the subshell.
+</P><P>
+
+<DT><CODE>-f</CODE>
+<DD>Disable filename expansion (globbing).
+<P>
+
+<DT><CODE>-h</CODE>
+<DD>Locate and remember (hash) commands as they are looked up for execution.
+This option is enabled by default.
+<P>
+
+<DT><CODE>-k</CODE>
+<DD>All arguments in the form of assignment statements are placed
+in the environment for a command, not just those that precede
+the command name.
+<P>
+
+<DT><CODE>-m</CODE>
+<DD>Job control is enabled (see section <A HREF="bashref.html#SEC91">7. Job Control</A>).
+<P>
+
+<DT><CODE>-n</CODE>
+<DD>Read commands but do not execute them; this may be used to check a
+script for syntax errors.
+This option is ignored by interactive shells.
+<P>
+
+<DT><CODE>-o <VAR>option-name</VAR></CODE>
+<DD><P>
+
+Set the option corresponding to <VAR>option-name</VAR>:
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>allexport</CODE>
+<DD>Same as <CODE>-a</CODE>.
+<P>
+
+<DT><CODE>braceexpand</CODE>
+<DD>Same as <CODE>-B</CODE>.
+<P>
+
+<DT><CODE>emacs</CODE>
+<DD>Use an <CODE>emacs</CODE>-style line editing interface (see section <A HREF="bashref.html#SEC95">8. Command Line Editing</A>).
+This also affects the editing interface used for <CODE>read -e</CODE>.
+<P>
+
+<DT><CODE>errexit</CODE>
+<DD>Same as <CODE>-e</CODE>.
+<P>
+
+<DT><CODE>errtrace</CODE>
+<DD>Same as <CODE>-E</CODE>.
+<P>
+
+<DT><CODE>functrace</CODE>
+<DD>Same as <CODE>-T</CODE>.
+<P>
+
+<DT><CODE>hashall</CODE>
+<DD>Same as <CODE>-h</CODE>.
+<P>
+
+<DT><CODE>histexpand</CODE>
+<DD>Same as <CODE>-H</CODE>.
+<P>
+
+<DT><CODE>history</CODE>
+<DD>Enable command history, as described in <A HREF="bashref.html#SEC120">9.1 Bash History Facilities</A>.
+This option is on by default in interactive shells.
+<P>
+
+<DT><CODE>ignoreeof</CODE>
+<DD>An interactive shell will not exit upon reading EOF.
+<P>
+
+<DT><CODE>keyword</CODE>
+<DD>Same as <CODE>-k</CODE>.
+<P>
+
+<DT><CODE>monitor</CODE>
+<DD>Same as <CODE>-m</CODE>.
+<P>
+
+<DT><CODE>noclobber</CODE>
+<DD>Same as <CODE>-C</CODE>.
+<P>
+
+<DT><CODE>noexec</CODE>
+<DD>Same as <CODE>-n</CODE>.
+<P>
+
+<DT><CODE>noglob</CODE>
+<DD>Same as <CODE>-f</CODE>.
+<P>
+
+<DT><CODE>nolog</CODE>
+<DD>Currently ignored.
+<P>
+
+<DT><CODE>notify</CODE>
+<DD>Same as <CODE>-b</CODE>.
+<P>
+
+<DT><CODE>nounset</CODE>
+<DD>Same as <CODE>-u</CODE>.
+<P>
+
+<DT><CODE>onecmd</CODE>
+<DD>Same as <CODE>-t</CODE>.
+<P>
+
+<DT><CODE>physical</CODE>
+<DD>Same as <CODE>-P</CODE>.
+<P>
+
+<DT><CODE>pipefail</CODE>
+<DD>If set, the return value of a pipeline is the value of the last
+(rightmost) command to exit with a non-zero status, or zero if all
+commands in the pipeline exit successfully.
+This option is disabled by default.
+<P>
+
+<DT><CODE>posix</CODE>
+<DD>Change the behavior of Bash where the default operation differs
+from the POSIX standard to match the standard
+(see section <A HREF="bashref.html#SEC90">6.11 Bash POSIX Mode</A>).
+This is intended to make Bash behave as a strict superset of that
+standard.
+<P>
+
+<DT><CODE>privileged</CODE>
+<DD>Same as <CODE>-p</CODE>.
+<P>
+
+<DT><CODE>verbose</CODE>
+<DD>Same as <CODE>-v</CODE>.
+<P>
+
+<DT><CODE>vi</CODE>
+<DD>Use a <CODE>vi</CODE>-style line editing interface.
+This also affects the editing interface used for <CODE>read -e</CODE>.
+<P>
+
+<DT><CODE>xtrace</CODE>
+<DD>Same as <CODE>-x</CODE>.
+</DL>
+<P>
+
+<DT><CODE>-p</CODE>
+<DD>Turn on privileged mode.
+In this mode, the <CODE>$BASH_ENV</CODE> and <CODE>$ENV</CODE> files are not
+processed, shell functions are not inherited from the environment,
+and the <CODE>SHELLOPTS</CODE>, <CODE>BASHOPTS</CODE>, <CODE>CDPATH</CODE> and <CODE>GLOBIGNORE</CODE>
+variables, if they appear in the environment, are ignored.
+If the shell is started with the effective user (group) id not equal to the
+real user (group) id, and the <CODE>-p</CODE> option is not supplied, these actions
+are taken and the effective user id is set to the real user id.
+If the <CODE>-p</CODE> option is supplied at startup, the effective user id is
+not reset.
+Turning this option off causes the effective user
+and group ids to be set to the real user and group ids.
+<P>
+
+<DT><CODE>-t</CODE>
+<DD>Exit after reading and executing one command.
+<P>
+
+<DT><CODE>-u</CODE>
+<DD>Treat unset variables and parameters other than the special parameters
+<SAMP>`@'</SAMP> or <SAMP>`*'</SAMP> as an error when performing parameter expansion.
+An error message will be written to the standard error, and a non-interactive
+shell will exit.
+<P>
+
+<DT><CODE>-v</CODE>
+<DD>Print shell input lines as they are read.
+<P>
+
+<DT><CODE>-x</CODE>
+<DD>Print a trace of simple commands, <CODE>for</CODE> commands, <CODE>case</CODE>
+commands, <CODE>select</CODE> commands, and arithmetic <CODE>for</CODE> commands
+and their arguments or associated word lists after they are
+expanded and before they are executed. The value of the <CODE>PS4</CODE>
+variable is expanded and the resultant value is printed before
+the command and its expanded arguments.
+<P>
+
+<DT><CODE>-B</CODE>
+<DD>The shell will perform brace expansion (see section <A HREF="bashref.html#SEC29">3.5.1 Brace Expansion</A>).
+This option is on by default.
+<P>
+
+<DT><CODE>-C</CODE>
+<DD>Prevent output redirection using <SAMP>`&#62;'</SAMP>, <SAMP>`&#62;&#38;'</SAMP>, and <SAMP>`&#60;&#62;'</SAMP>
+from overwriting existing files.
+<P>
+
+<DT><CODE>-E</CODE>
+<DD>If set, any trap on <CODE>ERR</CODE> is inherited by shell functions, command
+substitutions, and commands executed in a subshell environment.
+The <CODE>ERR</CODE> trap is normally not inherited in such cases.
+<P>
+
+<DT><CODE>-H</CODE>
+<DD>Enable <SAMP>`!'</SAMP> style history substitution (see section <A HREF="bashref.html#SEC122">9.3 History Expansion</A>).
+This option is on by default for interactive shells.
+<P>
+
+<DT><CODE>-P</CODE>
+<DD>If set, do not follow symbolic links when performing commands such as
+<CODE>cd</CODE> which change the current directory. The physical directory
+is used instead. By default, Bash follows
+the logical chain of directories when performing commands
+which change the current directory.
+<P>
+
+For example, if <TT>`/usr/sys'</TT> is a symbolic link to <TT>`/usr/local/sys'</TT>
+then:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>$ cd /usr/sys; echo $PWD
+/usr/sys
+$ cd ..; pwd
+/usr
+</pre></td></tr></table></P><P>
+
+If <CODE>set -P</CODE> is on, then:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>$ cd /usr/sys; echo $PWD
+/usr/local/sys
+$ cd ..; pwd
+/usr/local
+</pre></td></tr></table></P><P>
+
+<DT><CODE>-T</CODE>
+<DD>If set, any trap on <CODE>DEBUG</CODE> and <CODE>RETURN</CODE> are inherited by
+shell functions, command substitutions, and commands executed
+in a subshell environment.
+The <CODE>DEBUG</CODE> and <CODE>RETURN</CODE> traps are normally not inherited
+in such cases.
+<P>
+
+<DT><CODE>--</CODE>
+<DD>If no arguments follow this option, then the positional parameters are
+unset. Otherwise, the positional parameters are set to the
+<VAR>arguments</VAR>, even if some of them begin with a <SAMP>`-'</SAMP>.
+<P>
+
+<DT><CODE>-</CODE>
+<DD>Signal the end of options, cause all remaining <VAR>arguments</VAR>
+to be assigned to the positional parameters. The <SAMP>`-x'</SAMP>
+and <SAMP>`-v'</SAMP> options are turned off.
+If there are no arguments, the positional parameters remain unchanged.
+</DL>
+<P>
+
+Using <SAMP>`+'</SAMP> rather than <SAMP>`-'</SAMP> causes these options to be
+turned off. The options can also be used upon invocation of the
+shell. The current set of options may be found in <CODE>$-</CODE>.
+</P><P>
+
+The remaining N <VAR>arguments</VAR> are positional parameters and are
+assigned, in order, to <CODE>$1</CODE>, <CODE>$2</CODE>, <small>...</small> <CODE>$N</CODE>.
+The special parameter <CODE>#</CODE> is set to N.
+</P><P>
+
+The return status is always zero unless an invalid option is supplied.
+</DL>
+<P>
+
+<A NAME="The Shopt Builtin"></A>
+<HR SIZE="6">
+<A NAME="SEC63"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC62"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC61"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 4.3.2 The Shopt Builtin </H3>
+<!--docid::SEC63::-->
+<P>
+
+This builtin allows you to change additional shell optional behavior.
+</P><P>
+
+<DL COMPACT>
+
+<DT><CODE>shopt</CODE>
+<DD><A NAME="IDX111"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>shopt [-pqsu] [-o] [<VAR>optname</VAR> <small>...</small>]
+</pre></td></tr></table>Toggle the values of variables controlling optional shell behavior.
+With no options, or with the <SAMP>`-p'</SAMP> option, a list of all settable
+options is displayed, with an indication of whether or not each is set.
+The <SAMP>`-p'</SAMP> option causes output to be displayed in a form that
+may be reused as input.
+Other options have the following meanings:
+<P>
+
+<DL COMPACT>
+<DT><CODE>-s</CODE>
+<DD>Enable (set) each <VAR>optname</VAR>.
+<P>
+
+<DT><CODE>-u</CODE>
+<DD>Disable (unset) each <VAR>optname</VAR>.
+<P>
+
+<DT><CODE>-q</CODE>
+<DD>Suppresses normal output; the return status
+indicates whether the <VAR>optname</VAR> is set or unset.
+If multiple <VAR>optname</VAR> arguments are given with <SAMP>`-q'</SAMP>,
+the return status is zero if all <VAR>optnames</VAR> are enabled;
+non-zero otherwise.
+<P>
+
+<DT><CODE>-o</CODE>
+<DD>Restricts the values of
+<VAR>optname</VAR> to be those defined for the <SAMP>`-o'</SAMP> option to the
+<CODE>set</CODE> builtin (see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>).
+</DL>
+<P>
+
+If either <SAMP>`-s'</SAMP> or <SAMP>`-u'</SAMP>
+is used with no <VAR>optname</VAR> arguments, the display is limited to
+those options which are set or unset, respectively.
+</P><P>
+
+Unless otherwise noted, the <CODE>shopt</CODE> options are disabled (off)
+by default.
+</P><P>
+
+The return status when listing options is zero if all <VAR>optnames</VAR>
+are enabled, non-zero otherwise. When setting or unsetting options,
+the return status is zero unless an <VAR>optname</VAR> is not a valid shell
+option.
+</P><P>
+
+The list of <CODE>shopt</CODE> options is:
+<DL COMPACT>
+
+<DT><CODE>autocd</CODE>
+<DD>If set, a command name that is the name of a directory is executed as if
+it were the argument to the <CODE>cd</CODE> command.
+This option is only used by interactive shells.
+<P>
+
+<DT><CODE>cdable_vars</CODE>
+<DD>If this is set, an argument to the <CODE>cd</CODE> builtin command that
+is not a directory is assumed to be the name of a variable whose
+value is the directory to change to.
+<P>
+
+<DT><CODE>cdspell</CODE>
+<DD>If set, minor errors in the spelling of a directory component in a
+<CODE>cd</CODE> command will be corrected.
+The errors checked for are transposed characters,
+a missing character, and a character too many.
+If a correction is found, the corrected path is printed,
+and the command proceeds.
+This option is only used by interactive shells.
+<P>
+
+<DT><CODE>checkhash</CODE>
+<DD>If this is set, Bash checks that a command found in the hash
+table exists before trying to execute it. If a hashed command no
+longer exists, a normal path search is performed.
+<P>
+
+<DT><CODE>checkjobs</CODE>
+<DD>If set, Bash lists the status of any stopped and running jobs before
+exiting an interactive shell. If any jobs are running, this causes
+the exit to be deferred until a second exit is attempted without an
+intervening command (see section <A HREF="bashref.html#SEC91">7. Job Control</A>).
+The shell always postpones exiting if any jobs are stopped.
+<P>
+
+<DT><CODE>checkwinsize</CODE>
+<DD>If set, Bash checks the window size after each command
+and, if necessary, updates the values of
+<CODE>LINES</CODE> and <CODE>COLUMNS</CODE>.
+<P>
+
+<DT><CODE>cmdhist</CODE>
+<DD>If set, Bash
+attempts to save all lines of a multiple-line
+command in the same history entry. This allows
+easy re-editing of multi-line commands.
+<P>
+
+<DT><CODE>compat31</CODE>
+<DD>If set, Bash
+changes its behavior to that of version 3.1 with respect to quoted
+arguments to the conditional command's =~ operator.
+<P>
+
+<DT><CODE>dirspell</CODE>
+<DD>If set, Bash
+attempts spelling correction on directory names during word completion
+if the directory name initially supplied does not exist.
+<P>
+
+<DT><CODE>dotglob</CODE>
+<DD>If set, Bash includes filenames beginning with a `.' in
+the results of filename expansion.
+<P>
+
+<DT><CODE>execfail</CODE>
+<DD>If this is set, a non-interactive shell will not exit if
+it cannot execute the file specified as an argument to the <CODE>exec</CODE>
+builtin command. An interactive shell does not exit if <CODE>exec</CODE>
+fails.
+<P>
+
+<DT><CODE>expand_aliases</CODE>
+<DD>If set, aliases are expanded as described below under Aliases,
+<A HREF="bashref.html#SEC84">6.6 Aliases</A>.
+This option is enabled by default for interactive shells.
+<P>
+
+<DT><CODE>extdebug</CODE>
+<DD>If set, behavior intended for use by debuggers is enabled:
+<P>
+
+<OL>
+<LI>
+The <SAMP>`-F'</SAMP> option to the <CODE>declare</CODE> builtin (see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>)
+displays the source file name and line number corresponding to each function
+name supplied as an argument.
+<P>
+
+<LI>
+If the command run by the <CODE>DEBUG</CODE> trap returns a non-zero value, the
+next command is skipped and not executed.
+<P>
+
+<LI>
+If the command run by the <CODE>DEBUG</CODE> trap returns a value of 2, and the
+shell is executing in a subroutine (a shell function or a shell script
+executed by the <CODE>.</CODE> or <CODE>source</CODE> builtins), a call to
+<CODE>return</CODE> is simulated.
+<P>
+
+<LI>
+<CODE>BASH_ARGC</CODE> and <CODE>BASH_ARGV</CODE> are updated as described in their
+descriptions (see section <A HREF="bashref.html#SEC67">5.2 Bash Variables</A>).
+<P>
+
+<LI>
+Function tracing is enabled: command substitution, shell functions, and
+subshells invoked with <CODE>( <VAR>command</VAR> )</CODE> inherit the
+<CODE>DEBUG</CODE> and <CODE>RETURN</CODE> traps.
+<P>
+
+<LI>
+Error tracing is enabled: command substitution, shell functions, and
+subshells invoked with <CODE>( <VAR>command</VAR> )</CODE> inherit the
+<CODE>ERROR</CODE> trap.
+</OL>
+<P>
+
+<DT><CODE>extglob</CODE>
+<DD>If set, the extended pattern matching features described above
+(see section <A HREF="bashref.html#SEC37">3.5.8.1 Pattern Matching</A>) are enabled.
+<P>
+
+<DT><CODE>extquote</CODE>
+<DD>If set, <CODE>$'<VAR>string</VAR>'</CODE> and <CODE>$"<VAR>string</VAR>"</CODE> quoting is
+performed within <CODE>${<VAR>parameter</VAR>}</CODE> expansions
+enclosed in double quotes. This option is enabled by default.
+<P>
+
+<DT><CODE>failglob</CODE>
+<DD>If set, patterns which fail to match filenames during filename expansion
+result in an expansion error.
+<P>
+
+<DT><CODE>force_fignore</CODE>
+<DD>If set, the suffixes specified by the <CODE>FIGNORE</CODE> shell variable
+cause words to be ignored when performing word completion even if
+the ignored words are the only possible completions.
+See section <A HREF="bashref.html#SEC67">5.2 Bash Variables</A>, for a description of <CODE>FIGNORE</CODE>.
+This option is enabled by default.
+<P>
+
+<DT><CODE>globstar</CODE>
+<DD>If set, the pattern <SAMP>`**'</SAMP> used in a filename expansion context will
+match a files and zero or more directories and subdirectories.
+If the pattern is followed by a <SAMP>`/'</SAMP>, only directories and
+subdirectories match.
+<P>
+
+<DT><CODE>gnu_errfmt</CODE>
+<DD>If set, shell error messages are written in the standard GNU error
+message format.
+<P>
+
+<DT><CODE>histappend</CODE>
+<DD>If set, the history list is appended to the file named by the value
+of the <CODE>HISTFILE</CODE>
+variable when the shell exits, rather than overwriting the file.
+<P>
+
+<DT><CODE>histreedit</CODE>
+<DD>If set, and Readline
+is being used, a user is given the opportunity to re-edit a
+failed history substitution.
+<P>
+
+<DT><CODE>histverify</CODE>
+<DD>If set, and Readline
+is being used, the results of history substitution are not immediately
+passed to the shell parser. Instead, the resulting line is loaded into
+the Readline editing buffer, allowing further modification.
+<P>
+
+<DT><CODE>hostcomplete</CODE>
+<DD>If set, and Readline is being used, Bash will attempt to perform
+hostname completion when a word containing a <SAMP>`@'</SAMP> is being
+completed (see section <A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A>). This option is enabled
+by default.
+<P>
+
+<DT><CODE>huponexit</CODE>
+<DD>If set, Bash will send <CODE>SIGHUP</CODE> to all jobs when an interactive
+login shell exits (see section <A HREF="bashref.html#SEC56">3.7.6 Signals</A>).
+<P>
+
+<DT><CODE>interactive_comments</CODE>
+<DD>Allow a word beginning with <SAMP>`#'</SAMP>
+to cause that word and all remaining characters on that
+line to be ignored in an interactive shell.
+This option is enabled by default.
+<P>
+
+<DT><CODE>lithist</CODE>
+<DD>If enabled, and the <CODE>cmdhist</CODE>
+option is enabled, multi-line commands are saved to the history with
+embedded newlines rather than using semicolon separators where possible.
+<P>
+
+<DT><CODE>login_shell</CODE>
+<DD>The shell sets this option if it is started as a login shell
+(see section <A HREF="bashref.html#SEC69">6.1 Invoking Bash</A>).
+The value may not be changed.
+<P>
+
+<DT><CODE>mailwarn</CODE>
+<DD>If set, and a file that Bash is checking for mail has been
+accessed since the last time it was checked, the message
+<CODE>"The mail in <VAR>mailfile</VAR> has been read"</CODE> is displayed.
+<P>
+
+<DT><CODE>no_empty_cmd_completion</CODE>
+<DD>If set, and Readline is being used, Bash will not attempt to search
+the <CODE>PATH</CODE> for possible completions when completion is attempted
+on an empty line.
+<P>
+
+<DT><CODE>nocaseglob</CODE>
+<DD>If set, Bash matches filenames in a case-insensitive fashion when
+performing filename expansion.
+<P>
+
+<DT><CODE>nocasematch</CODE>
+<DD>If set, Bash matches patterns in a case-insensitive fashion when
+performing matching while executing <CODE>case</CODE> or <CODE>[[</CODE>
+conditional commands.
+<P>
+
+<DT><CODE>nullglob</CODE>
+<DD>If set, Bash allows filename patterns which match no
+files to expand to a null string, rather than themselves.
+<P>
+
+<DT><CODE>progcomp</CODE>
+<DD>If set, the programmable completion facilities
+(see section <A HREF="bashref.html#SEC117">8.6 Programmable Completion</A>) are enabled.
+This option is enabled by default.
+<P>
+
+<DT><CODE>promptvars</CODE>
+<DD>If set, prompt strings undergo
+parameter expansion, command substitution, arithmetic
+expansion, and quote removal after being expanded
+as described below (see section <A HREF="bashref.html#SEC88">6.9 Controlling the Prompt</A>).
+This option is enabled by default.
+<P>
+
+<DT><CODE>restricted_shell</CODE>
+<DD>The shell sets this option if it is started in restricted mode
+(see section <A HREF="bashref.html#SEC89">6.10 The Restricted Shell</A>).
+The value may not be changed.
+This is not reset when the startup files are executed, allowing
+the startup files to discover whether or not a shell is restricted.
+<P>
+
+<DT><CODE>shift_verbose</CODE>
+<DD>If this is set, the <CODE>shift</CODE>
+builtin prints an error message when the shift count exceeds the
+number of positional parameters.
+<P>
+
+<DT><CODE>sourcepath</CODE>
+<DD>If set, the <CODE>source</CODE> builtin uses the value of <CODE>PATH</CODE>
+to find the directory containing the file supplied as an argument.
+This option is enabled by default.
+<P>
+
+<DT><CODE>xpg_echo</CODE>
+<DD>If set, the <CODE>echo</CODE> builtin expands backslash-escape sequences
+by default.
+<P>
+
+</DL>
+<P>
+
+The return status when listing options is zero if all <VAR>optnames</VAR>
+are enabled, non-zero otherwise.
+When setting or unsetting options, the return status is zero unless an
+<VAR>optname</VAR> is not a valid shell option.
+</P><P>
+
+</DL>
+<P>
+
+<A NAME="Special Builtins"></A>
+<HR SIZE="6">
+<A NAME="SEC64"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC63"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC65"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC58"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC58"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC65"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 4.4 Special Builtins </H2>
+<!--docid::SEC64::-->
+<P>
+
+For historical reasons, the POSIX standard has classified
+several builtin commands as <EM>special</EM>.
+When Bash is executing in POSIX mode, the special builtins
+differ from other builtin commands in three respects:
+</P><P>
+
+<OL>
+<LI>
+Special builtins are found before shell functions during command lookup.
+<P>
+
+<LI>
+If a special builtin returns an error status, a non-interactive shell exits.
+<P>
+
+<LI>
+Assignment statements preceding the command stay in effect in the shell
+environment after the command completes.
+</OL>
+<P>
+
+When Bash is not executing in POSIX mode, these builtins behave no
+differently than the rest of the Bash builtin commands.
+The Bash POSIX mode is described in <A HREF="bashref.html#SEC90">6.11 Bash POSIX Mode</A>.
+</P><P>
+
+These are the POSIX special builtins:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>break : . continue eval exec exit export readonly return set
+shift trap unset
+</pre></td></tr></table></P><P>
+
+<A NAME="Shell Variables"></A>
+<HR SIZE="6">
+<A NAME="SEC65"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC64"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC66"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 5. Shell Variables </H1>
+<!--docid::SEC65::-->
+<P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Variables which Bash uses in the same way
+ as the Bourne Shell.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">List of variables that exist in Bash.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+This chapter describes the shell variables that Bash uses.
+Bash automatically assigns default values to a number of variables.
+</P><P>
+
+<A NAME="Bourne Shell Variables"></A>
+<HR SIZE="6">
+<A NAME="SEC66"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC65"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC67"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC65"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC65"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 5.1 Bourne Shell Variables </H2>
+<!--docid::SEC66::-->
+<P>
+
+Bash uses certain shell variables in the same way as the Bourne shell.
+In some cases, Bash assigns a default value to the variable.
+</P><P>
+
+<DL COMPACT>
+
+<A NAME="IDX112"></A>
+<DT><CODE>CDPATH</CODE>
+<DD><A NAME="IDX113"></A>
+A colon-separated list of directories used as a search path for
+the <CODE>cd</CODE> builtin command.
+<P>
+
+<A NAME="IDX114"></A>
+<DT><CODE>HOME</CODE>
+<DD><A NAME="IDX115"></A>
+The current user's home directory; the default for the <CODE>cd</CODE> builtin
+command.
+The value of this variable is also used by tilde expansion
+(see section <A HREF="bashref.html#SEC30">3.5.2 Tilde Expansion</A>).
+<P>
+
+<A NAME="IDX116"></A>
+<DT><CODE>IFS</CODE>
+<DD><A NAME="IDX117"></A>
+A list of characters that separate fields; used when the shell splits
+words as part of expansion.
+<P>
+
+<A NAME="IDX118"></A>
+<DT><CODE>MAIL</CODE>
+<DD><A NAME="IDX119"></A>
+If this parameter is set to a filename and the <CODE>MAILPATH</CODE> variable
+is not set, Bash informs the user of the arrival of mail in
+the specified file.
+<P>
+
+<A NAME="IDX120"></A>
+<DT><CODE>MAILPATH</CODE>
+<DD><A NAME="IDX121"></A>
+A colon-separated list of filenames which the shell periodically checks
+for new mail.
+Each list entry can specify the message that is printed when new mail
+arrives in the mail file by separating the file name from the message with
+a <SAMP>`?'</SAMP>.
+When used in the text of the message, <CODE>$_</CODE> expands to the name of
+the current mail file.
+<P>
+
+<A NAME="IDX122"></A>
+<DT><CODE>OPTARG</CODE>
+<DD><A NAME="IDX123"></A>
+The value of the last option argument processed by the <CODE>getopts</CODE> builtin.
+<P>
+
+<A NAME="IDX124"></A>
+<DT><CODE>OPTIND</CODE>
+<DD><A NAME="IDX125"></A>
+The index of the last option argument processed by the <CODE>getopts</CODE> builtin.
+<P>
+
+<A NAME="IDX126"></A>
+<DT><CODE>PATH</CODE>
+<DD><A NAME="IDX127"></A>
+A colon-separated list of directories in which the shell looks for
+commands.
+A zero-length (null) directory name in the value of <CODE>PATH</CODE> indicates the
+current directory.
+A null directory name may appear as two adjacent colons, or as an initial
+or trailing colon.
+<P>
+
+<A NAME="IDX128"></A>
+<DT><CODE>PS1</CODE>
+<DD><A NAME="IDX129"></A>
+The primary prompt string. The default value is <SAMP>`\s-\v\$ '</SAMP>.
+See section <A HREF="bashref.html#SEC88">6.9 Controlling the Prompt</A>, for the complete list of escape
+sequences that are expanded before <CODE>PS1</CODE> is displayed.
+<P>
+
+<A NAME="IDX130"></A>
+<DT><CODE>PS2</CODE>
+<DD><A NAME="IDX131"></A>
+The secondary prompt string. The default value is <SAMP>`&#62; '</SAMP>.
+<P>
+
+</DL>
+<P>
+
+<A NAME="Bash Variables"></A>
+<HR SIZE="6">
+<A NAME="SEC67"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC66"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC65"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC65"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 5.2 Bash Variables </H2>
+<!--docid::SEC67::-->
+<P>
+
+These variables are set or used by Bash, but other shells
+do not normally treat them specially.
+</P><P>
+
+A few variables used by Bash are described in different chapters:
+variables for controlling the job control facilities
+(see section <A HREF="bashref.html#SEC94">7.3 Job Control Variables</A>).
+</P><P>
+
+<DL COMPACT>
+
+<A NAME="IDX132"></A>
+<DT><CODE>BASH</CODE>
+<DD><A NAME="IDX133"></A>
+The full pathname used to execute the current instance of Bash.
+<P>
+
+<A NAME="IDX134"></A>
+<DT><CODE>BASHOPTS</CODE>
+<DD><A NAME="IDX135"></A>
+A colon-separated list of enabled shell options. Each word in
+the list is a valid argument for the <SAMP>`-s'</SAMP> option to the
+<CODE>shopt</CODE> builtin command (see section <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>).
+The options appearing in <CODE>BASHOPTS</CODE> are those reported
+as <SAMP>`on'</SAMP> by <SAMP>`shopt'</SAMP>.
+If this variable is in the environment when Bash
+starts up, each shell option in the list will be enabled before
+reading any startup files. This variable is readonly.
+<P>
+
+<A NAME="IDX136"></A>
+<DT><CODE>BASHPID</CODE>
+<DD><A NAME="IDX137"></A>
+Expands to the process id of the current Bash process.
+This differs from <CODE>$$</CODE> under certain circumstances, such as subshells
+that do not require Bash to be re-initialized.
+<P>
+
+<A NAME="IDX138"></A>
+<DT><CODE>BASH_ALIASES</CODE>
+<DD><A NAME="IDX139"></A>
+An associative array variable whose members correspond to the internal
+list of aliases as maintained by the <CODE>alias</CODE> builtin
+(see section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>).
+Elements added to this array appear in the alias list; unsetting array
+elements cause aliases to be removed from the alias list.
+<P>
+
+<A NAME="IDX140"></A>
+<DT><CODE>BASH_ARGC</CODE>
+<DD><A NAME="IDX141"></A>
+An array variable whose values are the number of parameters in each
+frame of the current bash execution call stack. The number of
+parameters to the current subroutine (shell function or script executed
+with <CODE>.</CODE> or <CODE>source</CODE>) is at the top of the stack. When a
+subroutine is executed, the number of parameters passed is pushed onto
+<CODE>BASH_ARGC</CODE>.
+The shell sets <CODE>BASH_ARGC</CODE> only when in extended debugging mode
+(see <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>
+for a description of the <CODE>extdebug</CODE> option to the <CODE>shopt</CODE>
+builtin).
+<P>
+
+<A NAME="IDX142"></A>
+<DT><CODE>BASH_ARGV</CODE>
+<DD><A NAME="IDX143"></A>
+An array variable containing all of the parameters in the current bash
+execution call stack. The final parameter of the last subroutine call
+is at the top of the stack; the first parameter of the initial call is
+at the bottom. When a subroutine is executed, the parameters supplied
+are pushed onto <CODE>BASH_ARGV</CODE>.
+The shell sets <CODE>BASH_ARGV</CODE> only when in extended debugging mode
+(see <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>
+for a description of the <CODE>extdebug</CODE> option to the <CODE>shopt</CODE>
+builtin).
+<P>
+
+<A NAME="IDX144"></A>
+<DT><CODE>BASH_CMDS</CODE>
+<DD><A NAME="IDX145"></A>
+An associative array variable whose members correspond to the internal
+hash table of commands as maintained by the <CODE>hash</CODE> builtin
+(see section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>).
+Elements added to this array appear in the hash table; unsetting array
+elements cause commands to be removed from the hash table.
+<P>
+
+<A NAME="IDX146"></A>
+<DT><CODE>BASH_COMMAND</CODE>
+<DD><A NAME="IDX147"></A>
+The command currently being executed or about to be executed, unless the
+shell is executing a command as the result of a trap,
+in which case it is the command executing at the time of the trap.
+<P>
+
+<A NAME="IDX148"></A>
+<DT><CODE>BASH_ENV</CODE>
+<DD><A NAME="IDX149"></A>
+If this variable is set when Bash is invoked to execute a shell
+script, its value is expanded and used as the name of a startup file
+to read before executing the script. See section <A HREF="bashref.html#SEC70">6.2 Bash Startup Files</A>.
+<P>
+
+<A NAME="IDX150"></A>
+<DT><CODE>BASH_EXECUTION_STRING</CODE>
+<DD><A NAME="IDX151"></A>
+The command argument to the <SAMP>`-c'</SAMP> invocation option.
+<P>
+
+<A NAME="IDX152"></A>
+<DT><CODE>BASH_LINENO</CODE>
+<DD><A NAME="IDX153"></A>
+An array variable whose members are the line numbers in source files
+corresponding to each member of <VAR>FUNCNAME</VAR>.
+<CODE>${BASH_LINENO[$i]}</CODE> is the line number in the source file where
+<CODE>${FUNCNAME[$i]}</CODE> was called (or <CODE>${BASH_LINENO[$i-1]}</CODE> if
+referenced within another shell function).
+The corresponding source file name is <CODE>${BASH_SOURCE[$i]}</CODE>.
+Use <CODE>LINENO</CODE> to obtain the current line number.
+<P>
+
+<A NAME="IDX154"></A>
+<DT><CODE>BASH_REMATCH</CODE>
+<DD><A NAME="IDX155"></A>
+An array variable whose members are assigned by the <SAMP>`=~'</SAMP> binary
+operator to the <CODE>[[</CODE> conditional command
+(see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>).
+The element with index 0 is the portion of the string
+matching the entire regular expression.
+The element with index <VAR>n</VAR> is the portion of the
+string matching the <VAR>n</VAR>th parenthesized subexpression.
+This variable is read-only.
+<P>
+
+<A NAME="IDX156"></A>
+<DT><CODE>BASH_SOURCE</CODE>
+<DD><A NAME="IDX157"></A>
+An array variable whose members are the source filenames corresponding
+to the elements in the <CODE>FUNCNAME</CODE> array variable.
+<P>
+
+<A NAME="IDX158"></A>
+<DT><CODE>BASH_SUBSHELL</CODE>
+<DD><A NAME="IDX159"></A>
+Incremented by one each time a subshell or subshell environment is spawned.
+The initial value is 0.
+<P>
+
+<A NAME="IDX160"></A>
+<DT><CODE>BASH_VERSINFO</CODE>
+<DD><A NAME="IDX161"></A>
+A readonly array variable (see section <A HREF="bashref.html#SEC85">6.7 Arrays</A>)
+whose members hold version information for this instance of Bash.
+The values assigned to the array members are as follows:
+<P>
+
+<DL COMPACT>
+
+<DT><CODE>BASH_VERSINFO[0]</CODE>
+<DD>The major version number (the <VAR>release</VAR>).
+<P>
+
+<DT><CODE>BASH_VERSINFO[1]</CODE>
+<DD>The minor version number (the <VAR>version</VAR>).
+<P>
+
+<DT><CODE>BASH_VERSINFO[2]</CODE>
+<DD>The patch level.
+<P>
+
+<DT><CODE>BASH_VERSINFO[3]</CODE>
+<DD>The build version.
+<P>
+
+<DT><CODE>BASH_VERSINFO[4]</CODE>
+<DD>The release status (e.g., <VAR>beta1</VAR>).
+<P>
+
+<DT><CODE>BASH_VERSINFO[5]</CODE>
+<DD>The value of <CODE>MACHTYPE</CODE>.
+<P>
+
+</DL>
+<P>
+
+<A NAME="IDX162"></A>
+<DT><CODE>BASH_VERSION</CODE>
+<DD><A NAME="IDX163"></A>
+The version number of the current instance of Bash.
+<P>
+
+<A NAME="IDX164"></A>
+<DT><CODE>BASH_XTRACEFD</CODE>
+<DD><A NAME="IDX165"></A>
+If set to an integer corresponding to a valid file descriptor, Bash
+will write the trace output generated when <SAMP>`set -x'</SAMP>
+is enabled to that file descriptor.
+This allows tracing output to be separated from diagnostic and error
+messages.
+The file descriptor is closed when <CODE>BASH_XTRACEFD</CODE> is unset or assigned
+a new value.
+Unsetting <CODE>BASH_XTRACEFD</CODE> or assigning it the empty string causes the
+trace output to be sent to the standard error.
+Note that setting <CODE>BASH_XTRACEFD</CODE> to 2 (the standard error file
+descriptor) and then unsetting it will result in the standard error
+being closed.
+<P>
+
+<A NAME="IDX166"></A>
+<DT><CODE>COLUMNS</CODE>
+<DD><A NAME="IDX167"></A>
+Used by the <CODE>select</CODE> builtin command to determine the terminal width
+when printing selection lists. Automatically set upon receipt of a
+<CODE>SIGWINCH</CODE>.
+<P>
+
+<A NAME="IDX168"></A>
+<DT><CODE>COMP_CWORD</CODE>
+<DD><A NAME="IDX169"></A>
+An index into <CODE>${COMP_WORDS}</CODE> of the word containing the current
+cursor position.
+This variable is available only in shell functions invoked by the
+programmable completion facilities (see section <A HREF="bashref.html#SEC117">8.6 Programmable Completion</A>).
+<P>
+
+<A NAME="IDX170"></A>
+<DT><CODE>COMP_LINE</CODE>
+<DD><A NAME="IDX171"></A>
+The current command line.
+This variable is available only in shell functions and external
+commands invoked by the
+programmable completion facilities (see section <A HREF="bashref.html#SEC117">8.6 Programmable Completion</A>).
+<P>
+
+<A NAME="IDX172"></A>
+<DT><CODE>COMP_POINT</CODE>
+<DD><A NAME="IDX173"></A>
+The index of the current cursor position relative to the beginning of
+the current command.
+If the current cursor position is at the end of the current command,
+the value of this variable is equal to <CODE>${#COMP_LINE}</CODE>.
+This variable is available only in shell functions and external
+commands invoked by the
+programmable completion facilities (see section <A HREF="bashref.html#SEC117">8.6 Programmable Completion</A>).
+<P>
+
+<A NAME="IDX174"></A>
+<DT><CODE>COMP_TYPE</CODE>
+<DD><A NAME="IDX175"></A>
+Set to an integer value corresponding to the type of completion attempted
+that caused a completion function to be called:
+<VAR>TAB</VAR>, for normal completion,
+<SAMP>`?'</SAMP>, for listing completions after successive tabs,
+<SAMP>`!'</SAMP>, for listing alternatives on partial word completion,
+<SAMP>`@'</SAMP>, to list completions if the word is not unmodified,
+or
+<SAMP>`%'</SAMP>, for menu completion.
+This variable is available only in shell functions and external
+commands invoked by the
+programmable completion facilities (see section <A HREF="bashref.html#SEC117">8.6 Programmable Completion</A>).
+<P>
+
+<A NAME="IDX176"></A>
+<DT><CODE>COMP_KEY</CODE>
+<DD><A NAME="IDX177"></A>
+The key (or final key of a key sequence) used to invoke the current
+completion function.
+<P>
+
+<A NAME="IDX178"></A>
+<DT><CODE>COMP_WORDBREAKS</CODE>
+<DD><A NAME="IDX179"></A>
+The set of characters that the Readline library treats as word
+separators when performing word completion.
+If <CODE>COMP_WORDBREAKS</CODE> is unset, it loses its special properties,
+even if it is subsequently reset.
+<P>
+
+<A NAME="IDX180"></A>
+<DT><CODE>COMP_WORDS</CODE>
+<DD><A NAME="IDX181"></A>
+An array variable consisting of the individual
+words in the current command line.
+The line is split into words as Readline would split it, using
+<CODE>COMP_WORDBREAKS</CODE> as described above.
+This variable is available only in shell functions invoked by the
+programmable completion facilities (see section <A HREF="bashref.html#SEC117">8.6 Programmable Completion</A>).
+<P>
+
+<A NAME="IDX182"></A>
+<DT><CODE>COMPREPLY</CODE>
+<DD><A NAME="IDX183"></A>
+An array variable from which Bash reads the possible completions
+generated by a shell function invoked by the programmable completion
+facility (see section <A HREF="bashref.html#SEC117">8.6 Programmable Completion</A>).
+<P>
+
+<A NAME="IDX184"></A>
+<DT><CODE>DIRSTACK</CODE>
+<DD><A NAME="IDX185"></A>
+An array variable containing the current contents of the directory stack.
+Directories appear in the stack in the order they are displayed by the
+<CODE>dirs</CODE> builtin.
+Assigning to members of this array variable may be used to modify
+directories already in the stack, but the <CODE>pushd</CODE> and <CODE>popd</CODE>
+builtins must be used to add and remove directories.
+Assignment to this variable will not change the current directory.
+If <CODE>DIRSTACK</CODE> is unset, it loses its special properties, even if
+it is subsequently reset.
+<P>
+
+<A NAME="IDX186"></A>
+<DT><CODE>EMACS</CODE>
+<DD><A NAME="IDX187"></A>
+If Bash finds this variable in the environment when the shell
+starts with value <SAMP>`t'</SAMP>, it assumes that the shell is running in an
+emacs shell buffer and disables line editing.
+<P>
+
+<A NAME="IDX188"></A>
+<DT><CODE>EUID</CODE>
+<DD><A NAME="IDX189"></A>
+The numeric effective user id of the current user. This variable
+is readonly.
+<P>
+
+<A NAME="IDX190"></A>
+<DT><CODE>FCEDIT</CODE>
+<DD><A NAME="IDX191"></A>
+The editor used as a default by the <SAMP>`-e'</SAMP> option to the <CODE>fc</CODE>
+builtin command.
+<P>
+
+<A NAME="IDX192"></A>
+<DT><CODE>FIGNORE</CODE>
+<DD><A NAME="IDX193"></A>
+A colon-separated list of suffixes to ignore when performing
+filename completion.
+A file name whose suffix matches one of the entries in
+<CODE>FIGNORE</CODE>
+is excluded from the list of matched file names. A sample
+value is <SAMP>`.o:~'</SAMP>
+<P>
+
+<A NAME="IDX194"></A>
+<DT><CODE>FUNCNAME</CODE>
+<DD><A NAME="IDX195"></A>
+An array variable containing the names of all shell functions
+currently in the execution call stack.
+The element with index 0 is the name of any currently-executing
+shell function.
+The bottom-most element is <CODE>"main"</CODE>.
+This variable exists only when a shell function is executing.
+Assignments to <CODE>FUNCNAME</CODE> have no effect and return an error status.
+If <CODE>FUNCNAME</CODE> is unset, it loses its special properties, even if
+it is subsequently reset.
+<P>
+
+<A NAME="IDX196"></A>
+<DT><CODE>GLOBIGNORE</CODE>
+<DD><A NAME="IDX197"></A>
+A colon-separated list of patterns defining the set of filenames to
+be ignored by filename expansion.
+If a filename matched by a filename expansion pattern also matches one
+of the patterns in <CODE>GLOBIGNORE</CODE>, it is removed from the list
+of matches.
+<P>
+
+<A NAME="IDX198"></A>
+<DT><CODE>GROUPS</CODE>
+<DD><A NAME="IDX199"></A>
+An array variable containing the list of groups of which the current
+user is a member.
+Assignments to <CODE>GROUPS</CODE> have no effect and return an error status.
+If <CODE>GROUPS</CODE> is unset, it loses its special properties, even if it is
+subsequently reset.
+<P>
+
+<A NAME="IDX200"></A>
+<DT><CODE>histchars</CODE>
+<DD><A NAME="IDX201"></A>
+Up to three characters which control history expansion, quick
+substitution, and tokenization (see section <A HREF="bashref.html#SEC122">9.3 History Expansion</A>).
+The first character is the
+<VAR>history expansion</VAR> character, that is, the character which signifies the
+start of a history expansion, normally <SAMP>`!'</SAMP>. The second character is the
+character which signifies `quick substitution' when seen as the first
+character on a line, normally <SAMP>`^'</SAMP>. The optional third character is the
+character which indicates that the remainder of the line is a comment when
+found as the first character of a word, usually <SAMP>`#'</SAMP>. The history
+comment character causes history substitution to be skipped for the
+remaining words on the line. It does not necessarily cause the shell
+parser to treat the rest of the line as a comment.
+<P>
+
+<A NAME="IDX202"></A>
+<DT><CODE>HISTCMD</CODE>
+<DD><A NAME="IDX203"></A>
+The history number, or index in the history list, of the current
+command. If <CODE>HISTCMD</CODE> is unset, it loses its special properties,
+even if it is subsequently reset.
+<P>
+
+<A NAME="IDX204"></A>
+<DT><CODE>HISTCONTROL</CODE>
+<DD><A NAME="IDX205"></A>
+A colon-separated list of values controlling how commands are saved on
+the history list.
+If the list of values includes <SAMP>`ignorespace'</SAMP>, lines which begin
+with a space character are not saved in the history list.
+A value of <SAMP>`ignoredups'</SAMP> causes lines which match the previous
+history entry to not be saved.
+A value of <SAMP>`ignoreboth'</SAMP> is shorthand for
+<SAMP>`ignorespace'</SAMP> and <SAMP>`ignoredups'</SAMP>.
+A value of <SAMP>`erasedups'</SAMP> causes all previous lines matching the
+current line to be removed from the history list before that line
+is saved.
+Any value not in the above list is ignored.
+If <CODE>HISTCONTROL</CODE> is unset, or does not include a valid value,
+all lines read by the shell parser are saved on the history list,
+subject to the value of <CODE>HISTIGNORE</CODE>.
+The second and subsequent lines of a multi-line compound command are
+not tested, and are added to the history regardless of the value of
+<CODE>HISTCONTROL</CODE>.
+<P>
+
+<A NAME="IDX206"></A>
+<DT><CODE>HISTFILE</CODE>
+<DD><A NAME="IDX207"></A>
+The name of the file to which the command history is saved. The
+default value is <TT>`~/.bash_history'</TT>.
+<P>
+
+<A NAME="IDX208"></A>
+<DT><CODE>HISTFILESIZE</CODE>
+<DD><A NAME="IDX209"></A>
+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 history file is also truncated to this size after
+writing it when an interactive shell exits.
+The default value is 500.
+<P>
+
+<A NAME="IDX210"></A>
+<DT><CODE>HISTIGNORE</CODE>
+<DD><A NAME="IDX211"></A>
+A colon-separated list of patterns used to decide which command
+lines should be saved on the history list. Each pattern is
+anchored at the beginning of the line and must match the complete
+line (no implicit <SAMP>`*'</SAMP> is appended). Each pattern is tested
+against the line after the checks specified by <CODE>HISTCONTROL</CODE>
+are applied. In addition to the normal shell pattern matching
+characters, <SAMP>`&#38;'</SAMP> matches the previous history line. <SAMP>`&#38;'</SAMP>
+may be escaped using a backslash; the backslash is removed
+before attempting a match.
+The second and subsequent lines of a multi-line compound command are
+not tested, and are added to the history regardless of the value of
+<CODE>HISTIGNORE</CODE>.
+<P>
+
+<CODE>HISTIGNORE</CODE> subsumes the function of <CODE>HISTCONTROL</CODE>. A
+pattern of <SAMP>`&#38;'</SAMP> is identical to <CODE>ignoredups</CODE>, and a
+pattern of <SAMP>`[ ]*'</SAMP> is identical to <CODE>ignorespace</CODE>.
+Combining these two patterns, separating them with a colon,
+provides the functionality of <CODE>ignoreboth</CODE>.
+</P><P>
+
+<A NAME="IDX212"></A>
+<DT><CODE>HISTSIZE</CODE>
+<DD><A NAME="IDX213"></A>
+The maximum number of commands to remember on the history list.
+The default value is 500.
+<P>
+
+<A NAME="IDX214"></A>
+<DT><CODE>HISTTIMEFORMAT</CODE>
+<DD><A NAME="IDX215"></A>
+If this variable is set and not null, its value is used as a format string
+for <VAR>strftime</VAR> to print the time stamp associated with each history
+entry displayed by the <CODE>history</CODE> builtin.
+If this variable is set, time stamps are written to the history file so
+they may be preserved across shell sessions.
+This uses the history comment character to distinguish timestamps from
+other history lines.
+<P>
+
+<A NAME="IDX216"></A>
+<DT><CODE>HOSTFILE</CODE>
+<DD><A NAME="IDX217"></A>
+Contains the name of a file in the same format as <TT>`/etc/hosts'</TT> that
+should be read when the shell needs to complete a hostname.
+The list of possible hostname completions may be changed while the shell
+is running;
+the next time hostname completion is attempted after the
+value is changed, Bash adds the contents of the new file to the
+existing list.
+If <CODE>HOSTFILE</CODE> is set, but has no value, or does not name a readable file,
+Bash attempts to read
+<TT>`/etc/hosts'</TT> to obtain the list of possible hostname completions.
+When <CODE>HOSTFILE</CODE> is unset, the hostname list is cleared.
+<P>
+
+<A NAME="IDX218"></A>
+<DT><CODE>HOSTNAME</CODE>
+<DD><A NAME="IDX219"></A>
+The name of the current host.
+<P>
+
+<A NAME="IDX220"></A>
+<DT><CODE>HOSTTYPE</CODE>
+<DD><A NAME="IDX221"></A>
+A string describing the machine Bash is running on.
+<P>
+
+<A NAME="IDX222"></A>
+<DT><CODE>IGNOREEOF</CODE>
+<DD><A NAME="IDX223"></A>
+Controls the action of the shell on receipt of an <CODE>EOF</CODE> character
+as the sole input. If set, the value denotes the number
+of consecutive <CODE>EOF</CODE> characters that can be read as the
+first character on an input line
+before the shell will exit. If the variable exists but does not
+have a numeric value (or has no value) then the default is 10.
+If the variable does not exist, then <CODE>EOF</CODE> signifies the end of
+input to the shell. This is only in effect for interactive shells.
+<P>
+
+<A NAME="IDX224"></A>
+<DT><CODE>INPUTRC</CODE>
+<DD><A NAME="IDX225"></A>
+The name of the Readline initialization file, overriding the default
+of <TT>`~/.inputrc'</TT>.
+<P>
+
+<A NAME="IDX226"></A>
+<DT><CODE>LANG</CODE>
+<DD><A NAME="IDX227"></A>
+Used to determine the locale category for any category not specifically
+selected with a variable starting with <CODE>LC_</CODE>.
+<P>
+
+<A NAME="IDX228"></A>
+<DT><CODE>LC_ALL</CODE>
+<DD><A NAME="IDX229"></A>
+This variable overrides the value of <CODE>LANG</CODE> and any other
+<CODE>LC_</CODE> variable specifying a locale category.
+<P>
+
+<A NAME="IDX230"></A>
+<DT><CODE>LC_COLLATE</CODE>
+<DD><A NAME="IDX231"></A>
+This variable determines the collation order used when sorting the
+results of filename expansion, and
+determines the behavior of range expressions, equivalence classes,
+and collating sequences within filename expansion and pattern matching
+(see section <A HREF="bashref.html#SEC36">3.5.8 Filename Expansion</A>).
+<P>
+
+<A NAME="IDX232"></A>
+<DT><CODE>LC_CTYPE</CODE>
+<DD><A NAME="IDX233"></A>
+This variable determines the interpretation of characters and the
+behavior of character classes within filename expansion and pattern
+matching (see section <A HREF="bashref.html#SEC36">3.5.8 Filename Expansion</A>).
+<P>
+
+<A NAME="IDX234"></A>
+<DT><CODE>LC_MESSAGES</CODE>
+<DD><A NAME="IDX235"></A>
+This variable determines the locale used to translate double-quoted
+strings preceded by a <SAMP>`$'</SAMP> (see section <A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A>).
+<P>
+
+<A NAME="IDX236"></A>
+<DT><CODE>LC_NUMERIC</CODE>
+<DD><A NAME="IDX237"></A>
+This variable determines the locale category used for number formatting.
+<P>
+
+<A NAME="IDX238"></A>
+<DT><CODE>LINENO</CODE>
+<DD><A NAME="IDX239"></A>
+The line number in the script or shell function currently executing.
+<P>
+
+<A NAME="IDX240"></A>
+<DT><CODE>LINES</CODE>
+<DD><A NAME="IDX241"></A>
+Used by the <CODE>select</CODE> builtin command to determine the column length
+for printing selection lists. Automatically set upon receipt of a
+<CODE>SIGWINCH</CODE>.
+<P>
+
+<A NAME="IDX242"></A>
+<DT><CODE>MACHTYPE</CODE>
+<DD><A NAME="IDX243"></A>
+A string that fully describes the system type on which Bash
+is executing, in the standard GNU <VAR>cpu-company-system</VAR> format.
+<P>
+
+<A NAME="IDX244"></A>
+<DT><CODE>MAILCHECK</CODE>
+<DD><A NAME="IDX245"></A>
+How often (in seconds) that the shell should check for mail in the
+files specified in the <CODE>MAILPATH</CODE> or <CODE>MAIL</CODE> variables.
+The default is 60 seconds. When it is time to check
+for mail, the shell does so before displaying the primary prompt.
+If this variable is unset, or set to a value that is not a number
+greater than or equal to zero, the shell disables mail checking.
+<P>
+
+<A NAME="IDX246"></A>
+<DT><CODE>OLDPWD</CODE>
+<DD><A NAME="IDX247"></A>
+The previous working directory as set by the <CODE>cd</CODE> builtin.
+<P>
+
+<A NAME="IDX248"></A>
+<DT><CODE>OPTERR</CODE>
+<DD><A NAME="IDX249"></A>
+If set to the value 1, Bash displays error messages
+generated by the <CODE>getopts</CODE> builtin command.
+<P>
+
+<A NAME="IDX250"></A>
+<DT><CODE>OSTYPE</CODE>
+<DD><A NAME="IDX251"></A>
+A string describing the operating system Bash is running on.
+<P>
+
+<A NAME="IDX252"></A>
+<DT><CODE>PIPESTATUS</CODE>
+<DD><A NAME="IDX253"></A>
+An array variable (see section <A HREF="bashref.html#SEC85">6.7 Arrays</A>)
+containing a list of exit status values from the processes
+in the most-recently-executed foreground pipeline (which may
+contain only a single command).
+<P>
+
+<A NAME="IDX254"></A>
+<DT><CODE>POSIXLY_CORRECT</CODE>
+<DD><A NAME="IDX255"></A>
+If this variable is in the environment when <CODE>bash</CODE> starts, the shell
+enters POSIX mode (see section <A HREF="bashref.html#SEC90">6.11 Bash POSIX Mode</A>) before reading the
+startup files, as if the <SAMP>`--posix'</SAMP> invocation option had been supplied.
+If it is set while the shell is running, <CODE>bash</CODE> enables POSIX mode,
+as if the command
+<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>set -o posix</CODE>
+</pre></td></tr></table>had been executed.
+<P>
+
+<A NAME="IDX256"></A>
+<DT><CODE>PPID</CODE>
+<DD><A NAME="IDX257"></A>
+The process ID of the shell's parent process. This variable
+is readonly.
+<P>
+
+<A NAME="IDX258"></A>
+<DT><CODE>PROMPT_COMMAND</CODE>
+<DD><A NAME="IDX259"></A>
+If set, the value is interpreted as a command to execute
+before the printing of each primary prompt (<CODE>$PS1</CODE>).
+<P>
+
+<A NAME="IDX260"></A>
+<DT><CODE>PROMPT_DIRTRIM</CODE>
+<DD><A NAME="IDX261"></A>
+If set to a number greater than zero, the value is used as the number of
+trailing directory components to retain when expanding the <CODE>\w</CODE> and
+<CODE>\W</CODE> prompt string escapes (see section <A HREF="bashref.html#SEC88">6.9 Controlling the Prompt</A>).
+Characters removed are replaced with an ellipsis.
+<P>
+
+<A NAME="IDX262"></A>
+<DT><CODE>PS3</CODE>
+<DD><A NAME="IDX263"></A>
+The value of this variable is used as the prompt for the
+<CODE>select</CODE> command. If this variable is not set, the
+<CODE>select</CODE> command prompts with <SAMP>`#? '</SAMP>
+<P>
+
+<A NAME="IDX264"></A>
+<DT><CODE>PS4</CODE>
+<DD><A NAME="IDX265"></A>
+The value is the prompt printed before the command line is echoed
+when the <SAMP>`-x'</SAMP> option is set (see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>).
+The first character of <CODE>PS4</CODE> is replicated multiple times, as
+necessary, to indicate multiple levels of indirection.
+The default is <SAMP>`+ '</SAMP>.
+<P>
+
+<A NAME="IDX266"></A>
+<DT><CODE>PWD</CODE>
+<DD><A NAME="IDX267"></A>
+The current working directory as set by the <CODE>cd</CODE> builtin.
+<P>
+
+<A NAME="IDX268"></A>
+<DT><CODE>RANDOM</CODE>
+<DD><A NAME="IDX269"></A>
+Each time this parameter is referenced, a random integer
+between 0 and 32767 is generated. Assigning a value to this
+variable seeds the random number generator.
+<P>
+
+<A NAME="IDX270"></A>
+<DT><CODE>REPLY</CODE>
+<DD><A NAME="IDX271"></A>
+The default variable for the <CODE>read</CODE> builtin.
+<P>
+
+<A NAME="IDX272"></A>
+<DT><CODE>SECONDS</CODE>
+<DD><A NAME="IDX273"></A>
+This variable expands to the number of seconds since the
+shell was started. Assignment to this variable resets
+the count to the value assigned, and the expanded value
+becomes the value assigned plus the number of seconds
+since the assignment.
+<P>
+
+<A NAME="IDX274"></A>
+<DT><CODE>SHELL</CODE>
+<DD><A NAME="IDX275"></A>
+The full pathname to the shell is kept in this environment variable.
+If it is not set when the shell starts,
+Bash assigns to it the full pathname of the current user's login shell.
+<P>
+
+<A NAME="IDX276"></A>
+<DT><CODE>SHELLOPTS</CODE>
+<DD><A NAME="IDX277"></A>
+A colon-separated list of enabled shell options. Each word in
+the list is a valid argument for the <SAMP>`-o'</SAMP> option to the
+<CODE>set</CODE> builtin command (see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>).
+The options appearing in <CODE>SHELLOPTS</CODE> are those reported
+as <SAMP>`on'</SAMP> by <SAMP>`set -o'</SAMP>.
+If this variable is in the environment when Bash
+starts up, each shell option in the list will be enabled before
+reading any startup files. This variable is readonly.
+<P>
+
+<A NAME="IDX278"></A>
+<DT><CODE>SHLVL</CODE>
+<DD><A NAME="IDX279"></A>
+Incremented by one each time a new instance of Bash is started. This is
+intended to be a count of how deeply your Bash shells are nested.
+<P>
+
+<A NAME="IDX280"></A>
+<DT><CODE>TIMEFORMAT</CODE>
+<DD><A NAME="IDX281"></A>
+The value of this parameter is used as a format string specifying
+how the timing information for pipelines prefixed with the <CODE>time</CODE>
+reserved word should be displayed.
+The <SAMP>`%'</SAMP> character introduces an
+escape sequence that is expanded to a time value or other
+information.
+The escape sequences and their meanings are as
+follows; the braces denote optional portions.
+<P>
+
+<DL COMPACT>
+
+<DT><CODE>%%</CODE>
+<DD>A literal <SAMP>`%'</SAMP>.
+<P>
+
+<DT><CODE>%[<VAR>p</VAR>][l]R</CODE>
+<DD>The elapsed time in seconds.
+<P>
+
+<DT><CODE>%[<VAR>p</VAR>][l]U</CODE>
+<DD>The number of CPU seconds spent in user mode.
+<P>
+
+<DT><CODE>%[<VAR>p</VAR>][l]S</CODE>
+<DD>The number of CPU seconds spent in system mode.
+<P>
+
+<DT><CODE>%P</CODE>
+<DD>The CPU percentage, computed as (%U + %S) / %R.
+</DL>
+<P>
+
+The optional <VAR>p</VAR> is a digit specifying the precision, the number of
+fractional digits after a decimal point.
+A value of 0 causes no decimal point or fraction to be output.
+At most three places after the decimal point may be specified; values
+of <VAR>p</VAR> greater than 3 are changed to 3.
+If <VAR>p</VAR> is not specified, the value 3 is used.
+</P><P>
+
+The optional <CODE>l</CODE> specifies a longer format, including minutes, of
+the form <VAR>MM</VAR>m<VAR>SS</VAR>.<VAR>FF</VAR>s.
+The value of <VAR>p</VAR> determines whether or not the fraction is included.
+</P><P>
+
+If this variable is not set, Bash acts as if it had the value
+<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'</CODE>
+</pre></td></tr></table>If the value is null, no timing information is displayed.
+A trailing newline is added when the format string is displayed.
+</P><P>
+
+<A NAME="IDX282"></A>
+<DT><CODE>TMOUT</CODE>
+<DD><A NAME="IDX283"></A>
+If set to a value greater than zero, <CODE>TMOUT</CODE> is treated as the
+default timeout for the <CODE>read</CODE> builtin (see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>).
+The <CODE>select</CODE> command (see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>) terminates
+if input does not arrive after <CODE>TMOUT</CODE> seconds when input is coming
+from a terminal.
+<P>
+
+In an interactive shell, the value is interpreted as
+the number of seconds to wait for input after issuing the primary
+prompt when the shell is interactive.
+Bash terminates after that number of seconds if input does
+not arrive.
+</P><P>
+
+<A NAME="IDX284"></A>
+<DT><CODE>TMPDIR</CODE>
+<DD><A NAME="IDX285"></A>
+If set, Bash uses its value as the name of a directory in which
+Bash creates temporary files for the shell's use.
+<P>
+
+<A NAME="IDX286"></A>
+<DT><CODE>UID</CODE>
+<DD><A NAME="IDX287"></A>
+The numeric real user id of the current user. This variable is readonly.
+<P>
+
+</DL>
+<P>
+
+<A NAME="Bash Features"></A>
+<HR SIZE="6">
+<A NAME="SEC68"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC67"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC69"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 6. Bash Features </H1>
+<!--docid::SEC68::-->
+<P>
+
+This section describes features unique to Bash.
+</P><P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC69">6.1 Invoking Bash</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Command line options that you can give
+ to Bash.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC70">6.2 Bash Startup Files</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">When and how Bash executes scripts.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC78">6.3 Interactive Shells</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">What an interactive shell is.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC82">6.4 Bash Conditional Expressions</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Primitives used in composing expressions for
+ the <CODE>test</CODE> builtin.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC83">6.5 Shell Arithmetic</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Arithmetic on shell variables.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC84">6.6 Aliases</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Substituting one command for another.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC85">6.7 Arrays</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Array Variables.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC86">6.8 The Directory Stack</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">History of visited directories.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC88">6.9 Controlling the Prompt</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Controlling the PS1 string.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC89">6.10 The Restricted Shell</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A more controlled mode of shell execution.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC90">6.11 Bash POSIX Mode</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Making Bash behave more closely to what
+ the POSIX standard specifies.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+<A NAME="Invoking Bash"></A>
+<HR SIZE="6">
+<A NAME="SEC69"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC70"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 6.1 Invoking Bash </H2>
+<!--docid::SEC69::-->
+<P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o <VAR>option</VAR>] [-O <VAR>shopt_option</VAR>] [<VAR>argument</VAR> <small>...</small>]
+bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o <VAR>option</VAR>] [-O <VAR>shopt_option</VAR>] -c <VAR>string</VAR> [<VAR>argument</VAR> <small>...</small>]
+bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o <VAR>option</VAR>] [-O <VAR>shopt_option</VAR>] [<VAR>argument</VAR> <small>...</small>]
+</pre></td></tr></table></P><P>
+
+In addition to the single-character shell command-line options
+(see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>), there are several multi-character
+options that you can use. These options must appear on the command
+line before the single-character options to be recognized.
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>--debugger</CODE>
+<DD>Arrange for the debugger profile to be executed before the shell
+starts. Turns on extended debugging mode (see <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>
+for a description of the <CODE>extdebug</CODE> option to the <CODE>shopt</CODE>
+builtin) and shell function tracing
+(see <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A> for a description of the <CODE>-o functrace</CODE>
+option).
+<P>
+
+<DT><CODE>--dump-po-strings</CODE>
+<DD>A list of all double-quoted strings preceded by <SAMP>`$'</SAMP>
+is printed on the standard output
+in the GNU <CODE>gettext</CODE> PO (portable object) file format.
+Equivalent to <SAMP>`-D'</SAMP> except for the output format.
+<P>
+
+<DT><CODE>--dump-strings</CODE>
+<DD>Equivalent to <SAMP>`-D'</SAMP>.
+<P>
+
+<DT><CODE>--help</CODE>
+<DD>Display a usage message on standard output and exit successfully.
+<P>
+
+<DT><CODE>--init-file <VAR>filename</VAR></CODE>
+<DD><DT><CODE>--rcfile <VAR>filename</VAR></CODE>
+<DD>Execute commands from <VAR>filename</VAR> (instead of <TT>`~/.bashrc'</TT>)
+in an interactive shell.
+<P>
+
+<DT><CODE>--login</CODE>
+<DD>Equivalent to <SAMP>`-l'</SAMP>.
+<P>
+
+<DT><CODE>--noediting</CODE>
+<DD>Do not use the GNU Readline library (see section <A HREF="bashref.html#SEC95">8. Command Line Editing</A>)
+to read command lines when the shell is interactive.
+<P>
+
+<DT><CODE>--noprofile</CODE>
+<DD>Don't load the system-wide startup file <TT>`/etc/profile'</TT>
+or any of the personal initialization files
+<TT>`~/.bash_profile'</TT>, <TT>`~/.bash_login'</TT>, or <TT>`~/.profile'</TT>
+when Bash is invoked as a login shell.
+<P>
+
+<DT><CODE>--norc</CODE>
+<DD>Don't read the <TT>`~/.bashrc'</TT> initialization file in an
+interactive shell. This is on by default if the shell is
+invoked as <CODE>sh</CODE>.
+<P>
+
+<DT><CODE>--posix</CODE>
+<DD>Change the behavior of Bash where the default operation differs
+from the POSIX standard to match the standard. This
+is intended to make Bash behave as a strict superset of that
+standard. See section <A HREF="bashref.html#SEC90">6.11 Bash POSIX Mode</A>, for a description of the Bash
+POSIX mode.
+<P>
+
+<DT><CODE>--restricted</CODE>
+<DD>Make the shell a restricted shell (see section <A HREF="bashref.html#SEC89">6.10 The Restricted Shell</A>).
+<P>
+
+<DT><CODE>--verbose</CODE>
+<DD>Equivalent to <SAMP>`-v'</SAMP>. Print shell input lines as they're read.
+<P>
+
+<DT><CODE>--version</CODE>
+<DD>Show version information for this instance of
+Bash on the standard output and exit successfully.
+<P>
+
+</DL>
+<P>
+
+There are several single-character options that may be supplied at
+invocation which are not available with the <CODE>set</CODE> builtin.
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>-c <VAR>string</VAR></CODE>
+<DD>Read and execute commands from <VAR>string</VAR> after processing the
+options, then exit. Any remaining arguments are assigned to the
+positional parameters, starting with <CODE>$0</CODE>.
+<P>
+
+<DT><CODE>-i</CODE>
+<DD>Force the shell to run interactively. Interactive shells are
+described in <A HREF="bashref.html#SEC78">6.3 Interactive Shells</A>.
+<P>
+
+<DT><CODE>-l</CODE>
+<DD>Make this shell act as if it had been directly invoked by login.
+When the shell is interactive, this is equivalent to starting a
+login shell with <SAMP>`exec -l bash'</SAMP>.
+When the shell is not interactive, the login shell startup files will
+be executed.
+<SAMP>`exec bash -l'</SAMP> or <SAMP>`exec bash --login'</SAMP>
+will replace the current shell with a Bash login shell.
+See section <A HREF="bashref.html#SEC70">6.2 Bash Startup Files</A>, for a description of the special behavior
+of a login shell.
+<P>
+
+<DT><CODE>-r</CODE>
+<DD>Make the shell a restricted shell (see section <A HREF="bashref.html#SEC89">6.10 The Restricted Shell</A>).
+<P>
+
+<DT><CODE>-s</CODE>
+<DD>If this option is present, or if no arguments remain after option
+processing, then commands are read from the standard input.
+This option allows the positional parameters to be set
+when invoking an interactive shell.
+<P>
+
+<DT><CODE>-D</CODE>
+<DD>A list of all double-quoted strings preceded by <SAMP>`$'</SAMP>
+is printed on the standard output.
+These are the strings that
+are subject to language translation when the current locale
+is not <CODE>C</CODE> or <CODE>POSIX</CODE> (see section <A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A>).
+This implies the <SAMP>`-n'</SAMP> option; no commands will be executed.
+<P>
+
+<DT><CODE>[-+]O [<VAR>shopt_option</VAR>]</CODE>
+<DD><VAR>shopt_option</VAR> is one of the shell options accepted by the
+<CODE>shopt</CODE> builtin (see section <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>).
+If <VAR>shopt_option</VAR> is present, <SAMP>`-O'</SAMP> sets the value of that option;
+<SAMP>`+O'</SAMP> unsets it.
+If <VAR>shopt_option</VAR> is not supplied, the names and values of the shell
+options accepted by <CODE>shopt</CODE> are printed on the standard output.
+If the invocation option is <SAMP>`+O'</SAMP>, the output is displayed in a format
+that may be reused as input.
+<P>
+
+<DT><CODE>--</CODE>
+<DD>A <CODE>--</CODE> signals the end of options and disables further option
+processing.
+Any arguments after the <CODE>--</CODE> are treated as filenames and arguments.
+<P>
+
+</DL>
+<P>
+
+<A NAME="IDX288"></A>
+A <EM>login</EM> shell is one whose first character of argument zero is
+<SAMP>`-'</SAMP>, or one invoked with the <SAMP>`--login'</SAMP> option.
+</P><P>
+
+<A NAME="IDX289"></A>
+An <EM>interactive</EM> shell is one started without non-option arguments,
+unless <SAMP>`-s'</SAMP> is specified,
+without specifying the <SAMP>`-c'</SAMP> option, and whose input and output are both
+connected to terminals (as determined by <CODE>isatty(3)</CODE>), or one
+started with the <SAMP>`-i'</SAMP> option. See section <A HREF="bashref.html#SEC78">6.3 Interactive Shells</A>, for more
+information.
+</P><P>
+
+If arguments remain after option processing, and neither the
+<SAMP>`-c'</SAMP> nor the <SAMP>`-s'</SAMP>
+option has been supplied, the first argument is assumed to
+be the name of a file containing shell commands (see section <A HREF="bashref.html#SEC57">3.8 Shell Scripts</A>).
+When Bash is invoked in this fashion, <CODE>$0</CODE>
+is set to the name of the file, and the positional parameters
+are set to the remaining arguments.
+Bash reads and executes commands from this file, then exits.
+Bash's exit status is the exit status of the last command executed
+in the script. If no commands are executed, the exit status is 0.
+</P><P>
+
+<A NAME="Bash Startup Files"></A>
+<HR SIZE="6">
+<A NAME="SEC70"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC69"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC78"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC78"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 6.2 Bash Startup Files </H2>
+<!--docid::SEC70::-->
+<P>
+
+This section describes how Bash executes its startup files.
+If any of the files exist but cannot be read, Bash reports an error.
+Tildes are expanded in file names as described above under
+Tilde Expansion (see section <A HREF="bashref.html#SEC30">3.5.2 Tilde Expansion</A>).
+</P><P>
+
+Interactive shells are described in <A HREF="bashref.html#SEC78">6.3 Interactive Shells</A>.
+</P><P>
+
+<A NAME="SEC71"></A>
+<H4> Invoked as an interactive login shell, or with <SAMP>`--login'</SAMP> </H4>
+<!--docid::SEC71::-->
+<P>
+
+When Bash is invoked as an interactive login shell, or as a
+non-interactive shell with the <SAMP>`--login'</SAMP> option, it first reads and
+executes commands from the file <TT>`/etc/profile'</TT>, if that file exists.
+After reading that file, it looks for <TT>`~/.bash_profile'</TT>,
+<TT>`~/.bash_login'</TT>, and <TT>`~/.profile'</TT>, in that order, and reads
+and executes commands from the first one that exists and is readable.
+The <SAMP>`--noprofile'</SAMP> option may be used when the shell is started to
+inhibit this behavior.
+</P><P>
+
+When a login shell exits, Bash reads and executes commands from
+the file <TT>`~/.bash_logout'</TT>, if it exists.
+</P><P>
+
+<A NAME="SEC72"></A>
+<H4> Invoked as an interactive non-login shell </H4>
+<!--docid::SEC72::-->
+<P>
+
+When an interactive shell that is not a login shell is started, Bash
+reads and executes commands from <TT>`~/.bashrc'</TT>, if that file exists.
+This may be inhibited by using the <SAMP>`--norc'</SAMP> option.
+The <SAMP>`--rcfile <VAR>file</VAR>'</SAMP> option will force Bash to read and
+execute commands from <VAR>file</VAR> instead of <TT>`~/.bashrc'</TT>.
+</P><P>
+
+So, typically, your <TT>`~/.bash_profile'</TT> contains the line
+<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>if [ -f ~/.bashrc ]; then . ~/.bashrc; fi</CODE>
+</pre></td></tr></table>after (or before) any login-specific initializations.
+</P><P>
+
+<A NAME="SEC73"></A>
+<H4> Invoked non-interactively </H4>
+<!--docid::SEC73::-->
+<P>
+
+When Bash is started non-interactively, to run a shell script,
+for example, it looks for the variable <CODE>BASH_ENV</CODE> in the environment,
+expands its value if it appears there, and uses the expanded value as
+the name of a file to read and execute. Bash behaves as if the
+following command were executed:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi</CODE>
+</pre></td></tr></table>but the value of the <CODE>PATH</CODE> variable is not used to search for the
+file name.
+</P><P>
+
+As noted above, if a non-interactive shell is invoked with the
+<SAMP>`--login'</SAMP> option, Bash attempts to read and execute commands from the
+login shell startup files.
+</P><P>
+
+<A NAME="SEC74"></A>
+<H4> Invoked with name <CODE>sh</CODE> </H4>
+<!--docid::SEC74::-->
+<P>
+
+If Bash is invoked with the name <CODE>sh</CODE>, it tries to mimic the
+startup behavior of historical versions of <CODE>sh</CODE> as closely as
+possible, while conforming to the POSIX standard as well.
+</P><P>
+
+When invoked as an interactive login shell, or as a non-interactive
+shell with the <SAMP>`--login'</SAMP> option, it first attempts to read
+and execute commands from <TT>`/etc/profile'</TT> and <TT>`~/.profile'</TT>, in
+that order.
+The <SAMP>`--noprofile'</SAMP> option may be used to inhibit this behavior.
+When invoked as an interactive shell with the name <CODE>sh</CODE>, Bash
+looks for the variable <CODE>ENV</CODE>, expands its value if it is defined,
+and uses the expanded value as the name of a file to read and execute.
+Since a shell invoked as <CODE>sh</CODE> does not attempt to read and execute
+commands from any other startup files, the <SAMP>`--rcfile'</SAMP> option has
+no effect.
+A non-interactive shell invoked with the name <CODE>sh</CODE> does not attempt
+to read any other startup files.
+</P><P>
+
+When invoked as <CODE>sh</CODE>, Bash enters POSIX mode after
+the startup files are read.
+</P><P>
+
+<A NAME="SEC75"></A>
+<H4> Invoked in POSIX mode </H4>
+<!--docid::SEC75::-->
+<P>
+
+When Bash is started in POSIX mode, as with the
+<SAMP>`--posix'</SAMP> command line option, it follows the POSIX standard
+for startup files.
+In this mode, interactive shells expand the <CODE>ENV</CODE> variable
+and commands are read and executed from the file whose name is the
+expanded value.
+No other startup files are read.
+</P><P>
+
+<A NAME="SEC76"></A>
+<H4> Invoked by remote shell daemon </H4>
+<!--docid::SEC76::-->
+<P>
+
+Bash attempts to determine when it is being run with its standard input
+connected to a a network connection, as if by the remote shell
+daemon, usually <CODE>rshd</CODE>, or the secure shell daemon <CODE>sshd</CODE>.
+If Bash determines it is being run in
+this fashion, it reads and executes commands from <TT>`~/.bashrc'</TT>, if that
+file exists and is readable.
+It will not do this if invoked as <CODE>sh</CODE>.
+The <SAMP>`--norc'</SAMP> option may be used to inhibit this behavior, and the
+<SAMP>`--rcfile'</SAMP> option may be used to force another file to be read, but
+<CODE>rshd</CODE> does not generally invoke the shell with those options or
+allow them to be specified.
+</P><P>
+
+<A NAME="SEC77"></A>
+<H4> Invoked with unequal effective and real UID/GIDs </H4>
+<!--docid::SEC77::-->
+<P>
+
+If Bash is started with the effective user (group) id not equal to the
+real user (group) id, and the <CODE>-p</CODE> option is not supplied, no startup
+files are read, shell functions are not inherited from the environment,
+the <CODE>SHELLOPTS</CODE>, <CODE>BASHOPTS</CODE>, <CODE>CDPATH</CODE>, and <CODE>GLOBIGNORE</CODE>
+variables, if they appear in the environment, are ignored, and the effective
+user id is set to the real user id.
+If the <CODE>-p</CODE> option is supplied at invocation, the startup behavior is
+the same, but the effective user id is not reset.
+</P><P>
+
+<A NAME="Interactive Shells"></A>
+<HR SIZE="6">
+<A NAME="SEC78"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC70"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC79"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC82"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC82"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 6.3 Interactive Shells </H2>
+<!--docid::SEC78::-->
+<P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC79">6.3.1 What is an Interactive Shell?</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">What determines whether a shell is Interactive.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC80">6.3.2 Is this Shell Interactive?</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to tell if a shell is interactive.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC81">6.3.3 Interactive Shell Behavior</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">What changes in a interactive shell?</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+<A NAME="What is an Interactive Shell?"></A>
+<HR SIZE="6">
+<A NAME="SEC79"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC78"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC80"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC82"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC78"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC82"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 6.3.1 What is an Interactive Shell? </H3>
+<!--docid::SEC79::-->
+<P>
+
+An interactive shell
+is one started without non-option arguments, unless <SAMP>`-s'</SAMP> is
+specified, without specifying the <SAMP>`-c'</SAMP> option, and
+whose input and error output are both
+connected to terminals (as determined by <CODE>isatty(3)</CODE>),
+or one started with the <SAMP>`-i'</SAMP> option.
+</P><P>
+
+An interactive shell generally reads from and writes to a user's
+terminal.
+</P><P>
+
+The <SAMP>`-s'</SAMP> invocation option may be used to set the positional parameters
+when an interactive shell is started.
+</P><P>
+
+<A NAME="Is this Shell Interactive?"></A>
+<HR SIZE="6">
+<A NAME="SEC80"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC79"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC81"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC81"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC78"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC82"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 6.3.2 Is this Shell Interactive? </H3>
+<!--docid::SEC80::-->
+<P>
+
+To determine within a startup script whether or not Bash is
+running interactively,
+test the value of the <SAMP>`-'</SAMP> special parameter.
+It contains <CODE>i</CODE> when the shell is interactive. For example:
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>case "$-" in
+*i*) echo This shell is interactive ;;
+*) echo This shell is not interactive ;;
+esac
+</pre></td></tr></table></P><P>
+
+Alternatively, startup scripts may examine the variable
+<CODE>PS1</CODE>; it is unset in non-interactive shells, and set in
+interactive shells. Thus:
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>if [ -z "$PS1" ]; then
+ echo This shell is not interactive
+else
+ echo This shell is interactive
+fi
+</pre></td></tr></table></P><P>
+
+<A NAME="Interactive Shell Behavior"></A>
+<HR SIZE="6">
+<A NAME="SEC81"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC80"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC82"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC82"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC78"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC82"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 6.3.3 Interactive Shell Behavior </H3>
+<!--docid::SEC81::-->
+<P>
+
+When the shell is running interactively, it changes its behavior in
+several ways.
+</P><P>
+
+<OL>
+<LI>
+Startup files are read and executed as described in <A HREF="bashref.html#SEC70">6.2 Bash Startup Files</A>.
+<P>
+
+<LI>
+Job Control (see section <A HREF="bashref.html#SEC91">7. Job Control</A>) is enabled by default. When job
+control is in effect, Bash ignores the keyboard-generated job control
+signals <CODE>SIGTTIN</CODE>, <CODE>SIGTTOU</CODE>, and <CODE>SIGTSTP</CODE>.
+<P>
+
+<LI>
+Bash expands and displays <CODE>PS1</CODE> before reading the first line
+of a command, and expands and displays <CODE>PS2</CODE> before reading the
+second and subsequent lines of a multi-line command.
+<P>
+
+<LI>
+Bash executes the value of the <CODE>PROMPT_COMMAND</CODE> variable as a command
+before printing the primary prompt, <CODE>$PS1</CODE>
+(see section <A HREF="bashref.html#SEC67">5.2 Bash Variables</A>).
+<P>
+
+<LI>
+Readline (see section <A HREF="bashref.html#SEC95">8. Command Line Editing</A>) is used to read commands from
+the user's terminal.
+<P>
+
+<LI>
+Bash inspects the value of the <CODE>ignoreeof</CODE> option to <CODE>set -o</CODE>
+instead of exiting immediately when it receives an <CODE>EOF</CODE> on its
+standard input when reading a command (see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>).
+<P>
+
+<LI>
+Command history (see section <A HREF="bashref.html#SEC120">9.1 Bash History Facilities</A>)
+and history expansion (see section <A HREF="bashref.html#SEC122">9.3 History Expansion</A>)
+are enabled by default.
+Bash will save the command history to the file named by <CODE>$HISTFILE</CODE>
+when an interactive shell exits.
+<P>
+
+<LI>
+Alias expansion (see section <A HREF="bashref.html#SEC84">6.6 Aliases</A>) is performed by default.
+<P>
+
+<LI>
+In the absence of any traps, Bash ignores <CODE>SIGTERM</CODE>
+(see section <A HREF="bashref.html#SEC56">3.7.6 Signals</A>).
+<P>
+
+<LI>
+In the absence of any traps, <CODE>SIGINT</CODE> is caught and handled
+((see section <A HREF="bashref.html#SEC56">3.7.6 Signals</A>).
+<CODE>SIGINT</CODE> will interrupt some shell builtins.
+<P>
+
+<LI>
+An interactive login shell sends a <CODE>SIGHUP</CODE> to all jobs on exit
+if the <CODE>huponexit</CODE> shell option has been enabled (see section <A HREF="bashref.html#SEC56">3.7.6 Signals</A>).
+<P>
+
+<LI>
+The <SAMP>`-n'</SAMP> invocation option is ignored, and <SAMP>`set -n'</SAMP> has
+no effect (see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>).
+<P>
+
+<LI>
+Bash will check for mail periodically, depending on the values of the
+<CODE>MAIL</CODE>, <CODE>MAILPATH</CODE>, and <CODE>MAILCHECK</CODE> shell variables
+(see section <A HREF="bashref.html#SEC67">5.2 Bash Variables</A>).
+<P>
+
+<LI>
+Expansion errors due to references to unbound shell variables after
+<SAMP>`set -u'</SAMP> has been enabled will not cause the shell to exit
+(see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>).
+<P>
+
+<LI>
+The shell will not exit on expansion errors caused by <VAR>var</VAR> being unset
+or null in <CODE>${<VAR>var</VAR>:?<VAR>word</VAR>}</CODE> expansions
+(see section <A HREF="bashref.html#SEC31">3.5.3 Shell Parameter Expansion</A>).
+<P>
+
+<LI>
+Redirection errors encountered by shell builtins will not cause the
+shell to exit.
+<P>
+
+<LI>
+When running in POSIX mode, a special builtin returning an error
+status will not cause the shell to exit (see section <A HREF="bashref.html#SEC90">6.11 Bash POSIX Mode</A>).
+<P>
+
+<LI>
+A failed <CODE>exec</CODE> will not cause the shell to exit
+(see section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>).
+<P>
+
+<LI>
+Parser syntax errors will not cause the shell to exit.
+<P>
+
+<LI>
+Simple spelling correction for directory arguments to the <CODE>cd</CODE>
+builtin is enabled by default (see the description of the <CODE>cdspell</CODE>
+option to the <CODE>shopt</CODE> builtin in <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>).
+<P>
+
+<LI>
+The shell will check the value of the <CODE>TMOUT</CODE> variable and exit
+if a command is not read within the specified number of seconds after
+printing <CODE>$PS1</CODE> (see section <A HREF="bashref.html#SEC67">5.2 Bash Variables</A>).
+<P>
+
+</OL>
+<P>
+
+<A NAME="Bash Conditional Expressions"></A>
+<HR SIZE="6">
+<A NAME="SEC82"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC81"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC83"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC83"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 6.4 Bash Conditional Expressions </H2>
+<!--docid::SEC82::-->
+<P>
+
+Conditional expressions are used by the <CODE>[[</CODE> compound command
+and the <CODE>test</CODE> and <CODE>[</CODE> builtin commands.
+</P><P>
+
+Expressions may be unary or binary.
+Unary expressions are often used to examine the status of a file.
+There are string operators and numeric comparison operators as well.
+If the <VAR>file</VAR> argument to one of the primaries is of the form
+<TT>`/dev/fd/<VAR>N</VAR>'</TT>, then file descriptor <VAR>N</VAR> is checked.
+If the <VAR>file</VAR> argument to one of the primaries is one of
+<TT>`/dev/stdin'</TT>, <TT>`/dev/stdout'</TT>, or <TT>`/dev/stderr'</TT>, file
+descriptor 0, 1, or 2, respectively, is checked.
+</P><P>
+
+When used with <SAMP>`[['</SAMP>, The <SAMP>`&#60;'</SAMP> and <SAMP>`&#62;'</SAMP> operators sort
+lexicographically using the current locale.
+</P><P>
+
+Unless otherwise specified, primaries that operate on files follow symbolic
+links and operate on the target of the link, rather than the link itself.
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>-a <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists.
+<P>
+
+<DT><CODE>-b <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and is a block special file.
+<P>
+
+<DT><CODE>-c <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and is a character special file.
+<P>
+
+<DT><CODE>-d <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and is a directory.
+<P>
+
+<DT><CODE>-e <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists.
+<P>
+
+<DT><CODE>-f <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and is a regular file.
+<P>
+
+<DT><CODE>-g <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and its set-group-id bit is set.
+<P>
+
+<DT><CODE>-h <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and is a symbolic link.
+<P>
+
+<DT><CODE>-k <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and its "sticky" bit is set.
+<P>
+
+<DT><CODE>-p <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and is a named pipe (FIFO).
+<P>
+
+<DT><CODE>-r <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and is readable.
+<P>
+
+<DT><CODE>-s <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and has a size greater than zero.
+<P>
+
+<DT><CODE>-t <VAR>fd</VAR></CODE>
+<DD>True if file descriptor <VAR>fd</VAR> is open and refers to a terminal.
+<P>
+
+<DT><CODE>-u <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and its set-user-id bit is set.
+<P>
+
+<DT><CODE>-w <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and is writable.
+<P>
+
+<DT><CODE>-x <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and is executable.
+<P>
+
+<DT><CODE>-O <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and is owned by the effective user id.
+<P>
+
+<DT><CODE>-G <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and is owned by the effective group id.
+<P>
+
+<DT><CODE>-L <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and is a symbolic link.
+<P>
+
+<DT><CODE>-S <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and is a socket.
+<P>
+
+<DT><CODE>-N <VAR>file</VAR></CODE>
+<DD>True if <VAR>file</VAR> exists and has been modified since it was last read.
+<P>
+
+<DT><CODE><VAR>file1</VAR> -nt <VAR>file2</VAR></CODE>
+<DD>True if <VAR>file1</VAR> is newer (according to modification date)
+than <VAR>file2</VAR>, or if <VAR>file1</VAR> exists and <VAR>file2</VAR> does not.
+<P>
+
+<DT><CODE><VAR>file1</VAR> -ot <VAR>file2</VAR></CODE>
+<DD>True if <VAR>file1</VAR> is older than <VAR>file2</VAR>,
+or if <VAR>file2</VAR> exists and <VAR>file1</VAR> does not.
+<P>
+
+<DT><CODE><VAR>file1</VAR> -ef <VAR>file2</VAR></CODE>
+<DD>True if <VAR>file1</VAR> and <VAR>file2</VAR> refer to the same device and
+inode numbers.
+<P>
+
+<DT><CODE>-o <VAR>optname</VAR></CODE>
+<DD>True if shell option <VAR>optname</VAR> is enabled.
+The list of options appears in the description of the <SAMP>`-o'</SAMP>
+option to the <CODE>set</CODE> builtin (see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>).
+<P>
+
+<DT><CODE>-z <VAR>string</VAR></CODE>
+<DD>True if the length of <VAR>string</VAR> is zero.
+<P>
+
+<DT><CODE>-n <VAR>string</VAR></CODE>
+<DD><DT><CODE><VAR>string</VAR></CODE>
+<DD>True if the length of <VAR>string</VAR> is non-zero.
+<P>
+
+<DT><CODE><VAR>string1</VAR> == <VAR>string2</VAR></CODE>
+<DD><DT><CODE><VAR>string1</VAR> = <VAR>string2</VAR></CODE>
+<DD>True if the strings are equal.
+<SAMP>`='</SAMP> should be used with the <CODE>test</CODE> command for POSIX conformance.
+<P>
+
+<DT><CODE><VAR>string1</VAR> != <VAR>string2</VAR></CODE>
+<DD>True if the strings are not equal.
+<P>
+
+<DT><CODE><VAR>string1</VAR> &#60; <VAR>string2</VAR></CODE>
+<DD>True if <VAR>string1</VAR> sorts before <VAR>string2</VAR> lexicographically.
+<P>
+
+<DT><CODE><VAR>string1</VAR> &#62; <VAR>string2</VAR></CODE>
+<DD>True if <VAR>string1</VAR> sorts after <VAR>string2</VAR> lexicographically.
+<P>
+
+<DT><CODE><VAR>arg1</VAR> OP <VAR>arg2</VAR></CODE>
+<DD><CODE>OP</CODE> is one of
+<SAMP>`-eq'</SAMP>, <SAMP>`-ne'</SAMP>, <SAMP>`-lt'</SAMP>, <SAMP>`-le'</SAMP>, <SAMP>`-gt'</SAMP>, or <SAMP>`-ge'</SAMP>.
+These arithmetic binary operators return true if <VAR>arg1</VAR>
+is equal to, not equal to, less than, less than or equal to,
+greater than, or greater than or equal to <VAR>arg2</VAR>,
+respectively. <VAR>Arg1</VAR> and <VAR>arg2</VAR>
+may be positive or negative integers.
+<P>
+
+</DL>
+<P>
+
+<A NAME="Shell Arithmetic"></A>
+<HR SIZE="6">
+<A NAME="SEC83"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC82"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC84"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC84"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 6.5 Shell Arithmetic </H2>
+<!--docid::SEC83::-->
+<P>
+
+The shell allows arithmetic expressions to be evaluated, as one of
+the shell expansions or by the <CODE>let</CODE> and the <SAMP>`-i'</SAMP> option
+to the <CODE>declare</CODE> builtins.
+</P><P>
+
+Evaluation is done in fixed-width integers with no check for overflow,
+though division by 0 is trapped and flagged as an error.
+The operators and their precedence, associativity, and values
+are the same as in the C language.
+The following list of operators is grouped into levels of
+equal-precedence operators.
+The levels are listed in order of decreasing precedence.
+</P><P>
+
+<DL COMPACT>
+
+<DT><CODE><VAR>id</VAR>++ <VAR>id</VAR>--</CODE>
+<DD>variable post-increment and post-decrement
+<P>
+
+<DT><CODE>++<VAR>id</VAR> --<VAR>id</VAR></CODE>
+<DD>variable pre-increment and pre-decrement
+<P>
+
+<DT><CODE>- +</CODE>
+<DD>unary minus and plus
+<P>
+
+<DT><CODE>! ~</CODE>
+<DD>logical and bitwise negation
+<P>
+
+<DT><CODE>**</CODE>
+<DD>exponentiation
+<P>
+
+<DT><CODE>* / %</CODE>
+<DD>multiplication, division, remainder
+<P>
+
+<DT><CODE>+ -</CODE>
+<DD>addition, subtraction
+<P>
+
+<DT><CODE>&#60;&#60; &#62;&#62;</CODE>
+<DD>left and right bitwise shifts
+<P>
+
+<DT><CODE>&#60;= &#62;= &#60; &#62;</CODE>
+<DD>comparison
+<P>
+
+<DT><CODE>== !=</CODE>
+<DD>equality and inequality
+<P>
+
+<DT><CODE>&#38;</CODE>
+<DD>bitwise AND
+<P>
+
+<DT><CODE>^</CODE>
+<DD>bitwise exclusive OR
+<P>
+
+<DT><CODE>|</CODE>
+<DD>bitwise OR
+<P>
+
+<DT><CODE>&#38;&#38;</CODE>
+<DD>logical AND
+<P>
+
+<DT><CODE>||</CODE>
+<DD>logical OR
+<P>
+
+<DT><CODE>expr ? expr : expr</CODE>
+<DD>conditional operator
+<P>
+
+<DT><CODE>= *= /= %= += -= &#60;&#60;= &#62;&#62;= &#38;= ^= |=</CODE>
+<DD>assignment
+<P>
+
+<DT><CODE>expr1 , expr2</CODE>
+<DD>comma
+</DL>
+<P>
+
+Shell variables are allowed as operands; parameter expansion is
+performed before the expression is evaluated.
+Within an expression, shell variables may also be referenced by name
+without using the parameter expansion syntax.
+A shell variable that is null or unset evaluates to 0 when referenced
+by name without using the parameter expansion syntax.
+The value of a variable is evaluated as an arithmetic expression
+when it is referenced, or when a variable which has been given the
+<VAR>integer</VAR> attribute using <SAMP>`declare -i'</SAMP> is assigned a value.
+A null value evaluates to 0.
+A shell variable need not have its integer attribute turned on
+to be used in an expression.
+</P><P>
+
+Constants with a leading 0 are interpreted as octal numbers.
+A leading <SAMP>`0x'</SAMP> or <SAMP>`0X'</SAMP> denotes hexadecimal. Otherwise,
+numbers take the form [<VAR>base</VAR><CODE>#</CODE>]<VAR>n</VAR>, where <VAR>base</VAR>
+is a decimal number between 2 and 64 representing the arithmetic
+base, and <VAR>n</VAR> is a number in that base. If <VAR>base</VAR><CODE>#</CODE> is
+omitted, then base 10 is used.
+The digits greater than 9 are represented by the lowercase letters,
+the uppercase letters, <SAMP>`@'</SAMP>, and <SAMP>`_'</SAMP>, in that order.
+If <VAR>base</VAR> is less than or equal to 36, lowercase and uppercase
+letters may be used interchangeably to represent numbers between 10
+and 35.
+</P><P>
+
+Operators are evaluated in order of precedence. Sub-expressions in
+parentheses are evaluated first and may override the precedence
+rules above.
+</P><P>
+
+<A NAME="Aliases"></A>
+<HR SIZE="6">
+<A NAME="SEC84"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC83"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC85"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC85"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 6.6 Aliases </H2>
+<!--docid::SEC84::-->
+<P>
+
+<VAR>Aliases</VAR> allow a string to be substituted for a word when it is used
+as the first word of a simple command.
+The shell maintains a list of aliases that may be set and unset with
+the <CODE>alias</CODE> and <CODE>unalias</CODE> builtin commands.
+</P><P>
+
+The first word of each simple command, if unquoted, is checked to see
+if it has an alias.
+If so, that word is replaced by the text of the alias.
+The characters <SAMP>`/'</SAMP>, <SAMP>`$'</SAMP>, <SAMP>``'</SAMP>, <SAMP>`='</SAMP> and any of the
+shell metacharacters or quoting characters listed above may not appear
+in an alias name.
+The replacement text may contain any valid
+shell input, including shell metacharacters.
+The first word of the replacement text is tested for
+aliases, but a word that is identical to an alias being expanded
+is not expanded a second time.
+This means that one may alias <CODE>ls</CODE> to <CODE>"ls -F"</CODE>,
+for instance, and Bash does not try to recursively expand the
+replacement text. If the last character of the alias value is a
+space or tab character, then the next command word following the
+alias is also checked for alias expansion.
+</P><P>
+
+Aliases are created and listed with the <CODE>alias</CODE>
+command, and removed with the <CODE>unalias</CODE> command.
+</P><P>
+
+There is no mechanism for using arguments in the replacement text,
+as in <CODE>csh</CODE>.
+If arguments are needed, a shell function should be used
+(see section <A HREF="bashref.html#SEC24">3.3 Shell Functions</A>).
+</P><P>
+
+Aliases are not expanded when the shell is not interactive,
+unless the <CODE>expand_aliases</CODE> shell option is set using
+<CODE>shopt</CODE> (see section <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>).
+</P><P>
+
+The rules concerning the definition and use of aliases are
+somewhat confusing. Bash
+always reads at least one complete line
+of input before executing any
+of the commands on that line. Aliases are expanded when a
+command is read, not when it is executed. Therefore, an
+alias definition appearing on the same line as another
+command does not take effect until the next line of input is read.
+The commands following the alias definition
+on that line are not affected by the new alias.
+This behavior is also an issue when functions are executed.
+Aliases are expanded when a function definition is read,
+not when the function is executed, because a function definition
+is itself a compound command. As a consequence, aliases
+defined in a function are not available until after that
+function is executed. To be safe, always put
+alias definitions on a separate line, and do not use <CODE>alias</CODE>
+in compound commands.
+</P><P>
+
+For almost every purpose, shell functions are preferred over aliases.
+</P><P>
+
+<A NAME="Arrays"></A>
+<HR SIZE="6">
+<A NAME="SEC85"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC84"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC86"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC86"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 6.7 Arrays </H2>
+<!--docid::SEC85::-->
+<P>
+
+Bash provides one-dimensional indexed and associative array variables.
+Any variable may be used as an indexed array;
+the <CODE>declare</CODE> builtin will explicitly declare an array.
+There is no maximum
+limit on the size of an array, nor any requirement that members
+be indexed or assigned contiguously.
+Indexed arrays are referenced using integers (including arithmetic
+expressions (see section <A HREF="bashref.html#SEC83">6.5 Shell Arithmetic</A>) and are zero-based;
+associative arrays use arbitrary strings.
+</P><P>
+
+An indexed array is created automatically if any variable is assigned to
+using the syntax
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>name[<VAR>subscript</VAR>]=<VAR>value</VAR>
+</pre></td></tr></table></P><P>
+
+The <VAR>subscript</VAR>
+is treated as an arithmetic expression that must evaluate to a number
+greater than or equal to zero. To explicitly declare an array, use
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>declare -a <VAR>name</VAR>
+</pre></td></tr></table>The syntax
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>declare -a <VAR>name</VAR>[<VAR>subscript</VAR>]
+</pre></td></tr></table>is also accepted; the <VAR>subscript</VAR> is ignored.
+</P><P>
+
+Associative arrays are created using
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>declare -A <VAR>name</VAR>.
+</pre></td></tr></table></P><P>
+
+Attributes may be
+specified for an array variable using the <CODE>declare</CODE> and
+<CODE>readonly</CODE> builtins. Each attribute applies to all members of
+an array.
+</P><P>
+
+Arrays are assigned to using compound assignments of the form
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>name=(value<VAR>1</VAR> <small>...</small> value<VAR>n</VAR>)
+</pre></td></tr></table>where each
+<VAR>value</VAR> is of the form <CODE>[<VAR>subscript</VAR>]=</CODE><VAR>string</VAR>.
+Indexed array assignments do not require the bracket and subscript.
+When assigning to indexed arrays, if
+the optional subscript is supplied, that index is assigned to;
+otherwise the index of the element assigned is the last index assigned
+to by the statement plus one. Indexing starts at zero.
+</P><P>
+
+When assigning to an associative array, the subscript is required.
+</P><P>
+
+This syntax is also accepted by the <CODE>declare</CODE>
+builtin. Individual array elements may be assigned to using the
+<CODE>name[</CODE><VAR>subscript</VAR><CODE>]=</CODE><VAR>value</VAR> syntax introduced above.
+</P><P>
+
+Any element of an array may be referenced using
+<CODE>${name[</CODE><VAR>subscript</VAR><CODE>]}</CODE>.
+The braces are required to avoid
+conflicts with the shell's filename expansion operators. If the
+<VAR>subscript</VAR> is <SAMP>`@'</SAMP> or <SAMP>`*'</SAMP>, the word expands to all members
+of the array <VAR>name</VAR>. These subscripts differ only when the word
+appears within double quotes.
+If the word is double-quoted,
+<CODE>${name[*]}</CODE> expands to a single word with
+the value of each array member separated by the first character of the
+<CODE>IFS</CODE> variable, and <CODE>${name[@]}</CODE> expands each element of
+<VAR>name</VAR> to a separate word. When there are no array members,
+<CODE>${name[@]}</CODE> expands to nothing.
+If the double-quoted expansion occurs within a word, the expansion of
+the first parameter is joined with the beginning part of the original
+word, and the expansion of the last parameter is joined with the last
+part of the original word.
+This is analogous to the
+expansion of the special parameters <SAMP>`@'</SAMP> and <SAMP>`*'</SAMP>.
+<CODE>${#name[</CODE><VAR>subscript</VAR><CODE>]}</CODE> expands to the length of
+<CODE>${name[</CODE><VAR>subscript</VAR><CODE>]}</CODE>.
+If <VAR>subscript</VAR> is <SAMP>`@'</SAMP> or
+<SAMP>`*'</SAMP>, the expansion is the number of elements in the array.
+Referencing an array variable without a subscript is equivalent to
+referencing with a subscript of 0.
+</P><P>
+
+An array variable is considered set if a subscript has been assigned a
+value. The null string is a valid value.
+</P><P>
+
+The <CODE>unset</CODE> builtin is used to destroy arrays.
+<CODE>unset</CODE> <VAR>name</VAR>[<VAR>subscript</VAR>]
+destroys the array element at index <VAR>subscript</VAR>.
+Care must be taken to avoid unwanted side effects caused by filename
+expansion.
+<CODE>unset</CODE> <VAR>name</VAR>, where <VAR>name</VAR> is an array, removes the
+entire array. A subscript of <SAMP>`*'</SAMP> or <SAMP>`@'</SAMP> also removes the
+entire array.
+</P><P>
+
+The <CODE>declare</CODE>, <CODE>local</CODE>, and <CODE>readonly</CODE>
+builtins each accept a <SAMP>`-a'</SAMP> option to specify an indexed
+array and a <SAMP>`-A'</SAMP> option to specify an associative array.
+The <CODE>read</CODE> builtin accepts a <SAMP>`-a'</SAMP>
+option to assign a list of words read from the standard input
+to an array, and can read values from the standard input into
+individual array elements. The <CODE>set</CODE> and <CODE>declare</CODE>
+builtins display array values in a way that allows them to be
+reused as input.
+</P><P>
+
+<A NAME="The Directory Stack"></A>
+<HR SIZE="6">
+<A NAME="SEC86"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC85"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC88"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC88"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 6.8 The Directory Stack </H2>
+<!--docid::SEC86::-->
+<P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC87">6.8.1 Directory Stack Builtins</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Bash builtin commands to manipulate
+ the directory stack.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+The directory stack is a list of recently-visited directories. The
+<CODE>pushd</CODE> builtin adds directories to the stack as it changes
+the current directory, and the <CODE>popd</CODE> builtin removes specified
+directories from the stack and changes the current directory to
+the directory removed. The <CODE>dirs</CODE> builtin displays the contents
+of the directory stack.
+</P><P>
+
+The contents of the directory stack are also visible
+as the value of the <CODE>DIRSTACK</CODE> shell variable.
+</P><P>
+
+<A NAME="Directory Stack Builtins"></A>
+<HR SIZE="6">
+<A NAME="SEC87"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC86"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC88"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC88"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC86"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC88"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 6.8.1 Directory Stack Builtins </H3>
+<!--docid::SEC87::-->
+<P>
+
+<DL COMPACT>
+
+<DT><CODE>dirs</CODE>
+<DD><A NAME="IDX290"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>dirs [+<VAR>N</VAR> | -<VAR>N</VAR>] [-clpv]
+</pre></td></tr></table>Display the list of currently remembered directories. Directories
+are added to the list with the <CODE>pushd</CODE> command; the
+<CODE>popd</CODE> command removes directories from the list.
+<DL COMPACT>
+<DT><CODE>+<VAR>N</VAR></CODE>
+<DD>Displays the <VAR>N</VAR>th directory (counting from the left of the
+list printed by <CODE>dirs</CODE> when invoked without options), starting
+with zero.
+<DT><CODE>-<VAR>N</VAR></CODE>
+<DD>Displays the <VAR>N</VAR>th directory (counting from the right of the
+list printed by <CODE>dirs</CODE> when invoked without options), starting
+with zero.
+<DT><CODE>-c</CODE>
+<DD>Clears the directory stack by deleting all of the elements.
+<DT><CODE>-l</CODE>
+<DD>Produces a longer listing; the default listing format uses a
+tilde to denote the home directory.
+<DT><CODE>-p</CODE>
+<DD>Causes <CODE>dirs</CODE> to print the directory stack with one entry per
+line.
+<DT><CODE>-v</CODE>
+<DD>Causes <CODE>dirs</CODE> to print the directory stack with one entry per
+line, prefixing each entry with its index in the stack.
+</DL>
+<P>
+
+<DT><CODE>popd</CODE>
+<DD><A NAME="IDX291"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>popd [+<VAR>N</VAR> | -<VAR>N</VAR>] [-n]
+</pre></td></tr></table><P>
+
+Remove the top entry from the directory stack, and <CODE>cd</CODE>
+to the new top directory.
+When no arguments are given, <CODE>popd</CODE>
+removes the top directory from the stack and
+performs a <CODE>cd</CODE> to the new top directory. The
+elements are numbered from 0 starting at the first directory listed with
+<CODE>dirs</CODE>; i.e., <CODE>popd</CODE> is equivalent to <CODE>popd +0</CODE>.
+<DL COMPACT>
+<DT><CODE>+<VAR>N</VAR></CODE>
+<DD>Removes the <VAR>N</VAR>th directory (counting from the left of the
+list printed by <CODE>dirs</CODE>), starting with zero.
+<DT><CODE>-<VAR>N</VAR></CODE>
+<DD>Removes the <VAR>N</VAR>th directory (counting from the right of the
+list printed by <CODE>dirs</CODE>), starting with zero.
+<DT><CODE>-n</CODE>
+<DD>Suppresses the normal change of directory when removing directories
+from the stack, so that only the stack is manipulated.
+</DL>
+<P>
+
+<A NAME="IDX292"></A>
+<DT><CODE>pushd</CODE>
+<DD><TABLE><tr><td>&nbsp;</td><td class=example><pre>pushd [-n] [<VAR>+N</VAR> | <VAR>-N</VAR> | <VAR>dir</VAR> ]
+</pre></td></tr></table><P>
+
+Save the current directory on the top of the directory stack
+and then <CODE>cd</CODE> to <VAR>dir</VAR>.
+With no arguments, <CODE>pushd</CODE> exchanges the top two directories.
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>-n</CODE>
+<DD>Suppresses the normal change of directory when adding directories
+to the stack, so that only the stack is manipulated.
+<DT><CODE>+<VAR>N</VAR></CODE>
+<DD>Brings the <VAR>N</VAR>th directory (counting from the left of the
+list printed by <CODE>dirs</CODE>, starting with zero) to the top of
+the list by rotating the stack.
+<DT><CODE>-<VAR>N</VAR></CODE>
+<DD>Brings the <VAR>N</VAR>th directory (counting from the right of the
+list printed by <CODE>dirs</CODE>, starting with zero) to the top of
+the list by rotating the stack.
+<DT><CODE><VAR>dir</VAR></CODE>
+<DD>Makes the current working directory be the top of the stack, and then
+executes the equivalent of `<CODE>cd</CODE> <VAR>dir</VAR>'.
+<CODE>cd</CODE>s to <VAR>dir</VAR>.
+</DL>
+<P>
+
+</DL>
+<P>
+
+<A NAME="Printing a Prompt"></A>
+<HR SIZE="6">
+<A NAME="SEC88"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC87"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC89"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 6.9 Controlling the Prompt </H2>
+<!--docid::SEC88::-->
+<P>
+
+The value of the variable <CODE>PROMPT_COMMAND</CODE> is examined just before
+Bash prints each primary prompt. If <CODE>PROMPT_COMMAND</CODE> is set and
+has a non-null value, then the
+value is executed just as if it had been typed on the command line.
+</P><P>
+
+In addition, the following table describes the special characters which
+can appear in the prompt variables:
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>\a</CODE>
+<DD>A bell character.
+<DT><CODE>\d</CODE>
+<DD>The date, in "Weekday Month Date" format (e.g., "Tue May 26").
+<DT><CODE>\D{<VAR>format</VAR>}</CODE>
+<DD>The <VAR>format</VAR> is passed to <CODE>strftime</CODE>(3) and the result is inserted
+into the prompt string; an empty <VAR>format</VAR> results in a locale-specific
+time representation. The braces are required.
+<DT><CODE>\e</CODE>
+<DD>An escape character.
+<DT><CODE>\h</CODE>
+<DD>The hostname, up to the first `.'.
+<DT><CODE>\H</CODE>
+<DD>The hostname.
+<DT><CODE>\j</CODE>
+<DD>The number of jobs currently managed by the shell.
+<DT><CODE>\l</CODE>
+<DD>The basename of the shell's terminal device name.
+<DT><CODE>\n</CODE>
+<DD>A newline.
+<DT><CODE>\r</CODE>
+<DD>A carriage return.
+<DT><CODE>\s</CODE>
+<DD>The name of the shell, the basename of <CODE>$0</CODE> (the portion
+following the final slash).
+<DT><CODE>\t</CODE>
+<DD>The time, in 24-hour HH:MM:SS format.
+<DT><CODE>\T</CODE>
+<DD>The time, in 12-hour HH:MM:SS format.
+<DT><CODE>\@</CODE>
+<DD>The time, in 12-hour am/pm format.
+<DT><CODE>\A</CODE>
+<DD>The time, in 24-hour HH:MM format.
+<DT><CODE>\u</CODE>
+<DD>The username of the current user.
+<DT><CODE>\v</CODE>
+<DD>The version of Bash (e.g., 2.00)
+<DT><CODE>\V</CODE>
+<DD>The release of Bash, version + patchlevel (e.g., 2.00.0)
+<DT><CODE>\w</CODE>
+<DD>The current working directory, with <CODE>$HOME</CODE> abbreviated with a tilde
+(uses the <CODE>$PROMPT_DIRTRIM</CODE> variable).
+<DT><CODE>\W</CODE>
+<DD>The basename of <CODE>$PWD</CODE>, with <CODE>$HOME</CODE> abbreviated with a tilde.
+<DT><CODE>\!</CODE>
+<DD>The history number of this command.
+<DT><CODE>\#</CODE>
+<DD>The command number of this command.
+<DT><CODE>\$</CODE>
+<DD>If the effective uid is 0, <CODE>#</CODE>, otherwise <CODE>$</CODE>.
+<DT><CODE>\<VAR>nnn</VAR></CODE>
+<DD>The character whose ASCII code is the octal value <VAR>nnn</VAR>.
+<DT><CODE>\\</CODE>
+<DD>A backslash.
+<DT><CODE>\[</CODE>
+<DD>Begin a sequence of non-printing characters. This could be used to
+embed a terminal control sequence into the prompt.
+<DT><CODE>\]</CODE>
+<DD>End a sequence of non-printing characters.
+</DL>
+<P>
+
+The command number and the history number are usually different:
+the history number of a command is its position in the history
+list, which may include commands restored from the history file
+(see section <A HREF="bashref.html#SEC120">9.1 Bash History Facilities</A>), while the command number is
+the position in the sequence of commands executed during the current
+shell session.
+</P><P>
+
+After the string is decoded, it is expanded via
+parameter expansion, command substitution, arithmetic
+expansion, and quote removal, subject to the value of the
+<CODE>promptvars</CODE> shell option (see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>).
+</P><P>
+
+<A NAME="The Restricted Shell"></A>
+<HR SIZE="6">
+<A NAME="SEC89"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC88"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC90"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC70"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 6.10 The Restricted Shell </H2>
+<!--docid::SEC89::-->
+<P>
+
+If Bash is started with the name <CODE>rbash</CODE>, or the
+<SAMP>`--restricted'</SAMP>
+or
+<SAMP>`-r'</SAMP>
+option is supplied at invocation, the shell becomes restricted.
+A restricted shell is used to
+set up an environment more controlled than the standard shell.
+A restricted shell behaves identically to <CODE>bash</CODE>
+with the exception that the following are disallowed or not performed:
+</P><P>
+
+<UL>
+<LI>
+Changing directories with the <CODE>cd</CODE> builtin.
+<LI>
+Setting or unsetting the values of the <CODE>SHELL</CODE>, <CODE>PATH</CODE>,
+<CODE>ENV</CODE>, or <CODE>BASH_ENV</CODE> variables.
+<LI>
+Specifying command names containing slashes.
+<LI>
+Specifying a filename containing a slash as an argument to the <CODE>.</CODE>
+builtin command.
+<LI>
+Specifying a filename containing a slash as an argument to the <SAMP>`-p'</SAMP>
+option to the <CODE>hash</CODE> builtin command.
+<LI>
+Importing function definitions from the shell environment at startup.
+<LI>
+Parsing the value of <CODE>SHELLOPTS</CODE> from the shell environment at startup.
+<LI>
+Redirecting output using the <SAMP>`&#62;'</SAMP>, <SAMP>`&#62;|'</SAMP>, <SAMP>`&#60;&#62;'</SAMP>, <SAMP>`&#62;&#38;'</SAMP>,
+<SAMP>`&#38;&#62;'</SAMP>, and <SAMP>`&#62;&#62;'</SAMP> redirection operators.
+<LI>
+Using the <CODE>exec</CODE> builtin to replace the shell with another command.
+<LI>
+Adding or deleting builtin commands with the
+<SAMP>`-f'</SAMP> and <SAMP>`-d'</SAMP> options to the <CODE>enable</CODE> builtin.
+<LI>
+Using the <CODE>enable</CODE> builtin command to enable disabled shell builtins.
+<LI>
+Specifying the <SAMP>`-p'</SAMP> option to the <CODE>command</CODE> builtin.
+<LI>
+Turning off restricted mode with <SAMP>`set +r'</SAMP> or <SAMP>`set +o restricted'</SAMP>.
+</UL>
+<P>
+
+These restrictions are enforced after any startup files are read.
+</P><P>
+
+When a command that is found to be a shell script is executed
+(see section <A HREF="bashref.html#SEC57">3.8 Shell Scripts</A>), <CODE>rbash</CODE> turns off any restrictions in
+the shell spawned to execute the script.
+</P><P>
+
+<A NAME="Bash POSIX Mode"></A>
+<HR SIZE="6">
+<A NAME="SEC90"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC89"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC70"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC68"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 6.11 Bash POSIX Mode </H2>
+<!--docid::SEC90::-->
+<P>
+
+Starting Bash with the <SAMP>`--posix'</SAMP> command-line option or executing
+<SAMP>`set -o posix'</SAMP> while Bash is running will cause Bash to conform more
+closely to the POSIX standard by changing the behavior to
+match that specified by POSIX in areas where the Bash default differs.
+</P><P>
+
+When invoked as <CODE>sh</CODE>, Bash enters POSIX mode after reading the
+startup files.
+</P><P>
+
+The following list is what's changed when `POSIX mode' is in effect:
+</P><P>
+
+<OL>
+<LI>
+When a command in the hash table no longer exists, Bash will re-search
+<CODE>$PATH</CODE> to find the new location. This is also available with
+<SAMP>`shopt -s checkhash'</SAMP>.
+<P>
+
+<LI>
+The message printed by the job control code and builtins when a job
+exits with a non-zero status is `Done(status)'.
+<P>
+
+<LI>
+The message printed by the job control code and builtins when a job
+is stopped is `Stopped(<VAR>signame</VAR>)', where <VAR>signame</VAR> is, for
+example, <CODE>SIGTSTP</CODE>.
+<P>
+
+<LI>
+The <CODE>bg</CODE> builtin uses the required format to describe each job placed
+in the background, which does not include an indication of whether the job
+is the current or previous job.
+<P>
+
+<LI>
+Reserved words appearing in a context where reserved words are recognized
+do not undergo alias expansion.
+<P>
+
+<LI>
+The POSIX <CODE>PS1</CODE> and <CODE>PS2</CODE> expansions of <SAMP>`!'</SAMP> to
+the history number and <SAMP>`!!'</SAMP> to <SAMP>`!'</SAMP> are enabled,
+and parameter expansion is performed on the values of <CODE>PS1</CODE> and
+<CODE>PS2</CODE> regardless of the setting of the <CODE>promptvars</CODE> option.
+<P>
+
+<LI>
+The POSIX startup files are executed (<CODE>$ENV</CODE>) rather than
+the normal Bash files.
+<P>
+
+<LI>
+Tilde expansion is only performed on assignments preceding a command
+name, rather than on all assignment statements on the line.
+<P>
+
+<LI>
+The default history file is <TT>`~/.sh_history'</TT> (this is the
+default value of <CODE>$HISTFILE</CODE>).
+<P>
+
+<LI>
+The output of <SAMP>`kill -l'</SAMP> prints all the signal names on a single line,
+separated by spaces, without the <SAMP>`SIG'</SAMP> prefix.
+<P>
+
+<LI>
+The <CODE>kill</CODE> builtin does not accept signal names with a <SAMP>`SIG'</SAMP>
+prefix.
+<P>
+
+<LI>
+Non-interactive shells exit if <VAR>filename</VAR> in <CODE>.</CODE> <VAR>filename</VAR>
+is not found.
+<P>
+
+<LI>
+Non-interactive shells exit if a syntax error in an arithmetic expansion
+results in an invalid expression.
+<P>
+
+<LI>
+Redirection operators do not perform filename expansion on the word
+in the redirection unless the shell is interactive.
+<P>
+
+<LI>
+Redirection operators do not perform word splitting on the word in the
+redirection.
+<P>
+
+<LI>
+Function names must be valid shell <CODE>name</CODE>s. That is, they may not
+contain characters other than letters, digits, and underscores, and
+may not start with a digit. Declaring a function with an invalid name
+causes a fatal syntax error in non-interactive shells.
+<P>
+
+<LI>
+POSIX special builtins are found before shell functions
+during command lookup.
+<P>
+
+<LI>
+If a POSIX special builtin returns an error status, a
+non-interactive shell exits. The fatal errors are those listed in
+the POSIX standard, and include things like passing incorrect options,
+redirection errors, variable assignment errors for assignments preceding
+the command name, and so on.
+<P>
+
+<LI>
+If <CODE>CDPATH</CODE> is set, the <CODE>cd</CODE> builtin will not implicitly
+append the current directory to it. This means that <CODE>cd</CODE> will
+fail if no valid directory name can be constructed from
+any of the entries in <CODE>$CDPATH</CODE>, even if the a directory with
+the same name as the name given as an argument to <CODE>cd</CODE> exists
+in the current directory.
+<P>
+
+<LI>
+A non-interactive shell exits with an error status if a variable
+assignment error occurs when no command name follows the assignment
+statements.
+A variable assignment error occurs, for example, when trying to assign
+a value to a readonly variable.
+<P>
+
+<LI>
+A non-interactive shell exits with an error status if the iteration
+variable in a <CODE>for</CODE> statement or the selection variable in a
+<CODE>select</CODE> statement is a readonly variable.
+<P>
+
+<LI>
+Process substitution is not available.
+<P>
+
+<LI>
+Assignment statements preceding POSIX special builtins
+persist in the shell environment after the builtin completes.
+<P>
+
+<LI>
+Assignment statements preceding shell function calls persist in the
+shell environment after the function returns, as if a POSIX
+special builtin command had been executed.
+<P>
+
+<LI>
+The <CODE>export</CODE> and <CODE>readonly</CODE> builtin commands display their
+output in the format required by POSIX.
+<P>
+
+<LI>
+The <CODE>trap</CODE> builtin displays signal names without the leading
+<CODE>SIG</CODE>.
+<P>
+
+<LI>
+The <CODE>trap</CODE> builtin doesn't check the first argument for a possible
+signal specification and revert the signal handling to the original
+disposition if it is, unless that argument consists solely of digits and
+is a valid signal number. If users want to reset the handler for a given
+signal to the original disposition, they should use <SAMP>`-'</SAMP> as the
+first argument.
+<P>
+
+<LI>
+The <CODE>.</CODE> and <CODE>source</CODE> builtins do not search the current directory
+for the filename argument if it is not found by searching <CODE>PATH</CODE>.
+<P>
+
+<LI>
+Subshells spawned to execute command substitutions inherit the value of
+the <SAMP>`-e'</SAMP> option from the parent shell. When not in POSIX mode,
+Bash clears the <SAMP>`-e'</SAMP> option in such subshells.
+<P>
+
+<LI>
+Alias expansion is always enabled, even in non-interactive shells.
+<P>
+
+<LI>
+When the <CODE>alias</CODE> builtin displays alias definitions, it does not
+display them with a leading <SAMP>`alias '</SAMP> unless the <SAMP>`-p'</SAMP> option
+is supplied.
+<P>
+
+<LI>
+When the <CODE>set</CODE> builtin is invoked without options, it does not display
+shell function names and definitions.
+<P>
+
+<LI>
+When the <CODE>set</CODE> builtin is invoked without options, it displays
+variable values without quotes, unless they contain shell metacharacters,
+even if the result contains nonprinting characters.
+<P>
+
+<LI>
+When the <CODE>cd</CODE> builtin is invoked in <VAR>logical</VAR> mode, and the pathname
+constructed from <CODE>$PWD</CODE> and the directory name supplied as an argument
+does not refer to an existing directory, <CODE>cd</CODE> will fail instead of
+falling back to <VAR>physical</VAR> mode.
+<P>
+
+<LI>
+When the <CODE>pwd</CODE> builtin is supplied the <SAMP>`-P'</SAMP> option, it resets
+<CODE>$PWD</CODE> to a pathname containing no symlinks.
+<P>
+
+<LI>
+The <CODE>pwd</CODE> builtin verifies that the value it prints is the same as the
+current directory, even if it is not asked to check the file system with the
+<SAMP>`-P'</SAMP> option.
+<P>
+
+<LI>
+When listing the history, the <CODE>fc</CODE> builtin does not include an
+indication of whether or not a history entry has been modified.
+<P>
+
+<LI>
+The default editor used by <CODE>fc</CODE> is <CODE>ed</CODE>.
+<P>
+
+<LI>
+The <CODE>type</CODE> and <CODE>command</CODE> builtins will not report a non-executable
+file as having been found, though the shell will attempt to execute such a
+file if it is the only so-named file found in <CODE>$PATH</CODE>.
+<P>
+
+<LI>
+The <CODE>vi</CODE> editing mode will invoke the <CODE>vi</CODE> editor directly when
+the <SAMP>`v'</SAMP> command is run, instead of checking <CODE>$VISUAL</CODE> and
+<CODE>$EDITOR</CODE>.
+<P>
+
+<LI>
+When the <CODE>xpg_echo</CODE> option is enabled, Bash does not attempt to interpret
+any arguments to <CODE>echo</CODE> as options. Each argument is displayed, after
+escape characters are converted.
+<P>
+
+<LI>
+The <CODE>ulimit</CODE> builtin uses a block size of 512 bytes for the <SAMP>`-c'</SAMP>
+and <SAMP>`-f'</SAMP> options.
+<P>
+
+<LI>
+The arrival of <CODE>SIGCHLD</CODE> when a trap is set on <CODE>SIGCHLD</CODE> does
+not interrupt the <CODE>wait</CODE> builtin and cause it to return immediately.
+The trap command is run once for each child that exits.
+<P>
+
+</OL>
+<P>
+
+There is other POSIX behavior that Bash does not implement by
+default even when in POSIX mode.
+Specifically:
+</P><P>
+
+<OL>
+
+<LI>
+The <CODE>fc</CODE> builtin checks <CODE>$EDITOR</CODE> as a program to edit history
+entries if <CODE>FCEDIT</CODE> is unset, rather than defaulting directly to
+<CODE>ed</CODE>. <CODE>fc</CODE> uses <CODE>ed</CODE> if <CODE>EDITOR</CODE> is unset.
+<P>
+
+<LI>
+As noted above, Bash requires the <CODE>xpg_echo</CODE> option to be enabled for
+the <CODE>echo</CODE> builtin to be fully conformant.
+<P>
+
+</OL>
+<P>
+
+Bash can be configured to be POSIX-conformant by default, by specifying
+the <SAMP>`--enable-strict-posix-default'</SAMP> to <CODE>configure</CODE> when building
+(see section <A HREF="bashref.html#SEC134">10.8 Optional Features</A>).
+</P><P>
+
+<A NAME="Job Control"></A>
+<HR SIZE="6">
+<A NAME="SEC91"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC90"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC92"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 7. Job Control </H1>
+<!--docid::SEC91::-->
+<P>
+
+This chapter discusses what job control is, how it works, and how
+Bash allows you to access its facilities.
+</P><P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC92">7.1 Job Control Basics</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How job control works.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC93">7.2 Job Control Builtins</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Bash builtin commands used to interact
+ with job control.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC94">7.3 Job Control Variables</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Variables Bash uses to customize job
+ control.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+<A NAME="Job Control Basics"></A>
+<HR SIZE="6">
+<A NAME="SEC92"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC93"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 7.1 Job Control Basics </H2>
+<!--docid::SEC92::-->
+<P>
+
+Job control
+refers to the ability to selectively stop (suspend)
+the execution of processes and continue (resume)
+their execution at a later point. A user typically employs
+this facility via an interactive interface supplied jointly
+by the operating system kernel's terminal driver and Bash.
+</P><P>
+
+The shell associates a <VAR>job</VAR> with each pipeline. It keeps a
+table of currently executing jobs, which may be listed with the
+<CODE>jobs</CODE> command. When Bash starts a job
+asynchronously, it prints a line that looks
+like:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>[1] 25647
+</pre></td></tr></table>indicating that this job is job number 1 and that the process ID
+of the last process in the pipeline associated with this job is
+25647. All of the processes in a single pipeline are members of
+the same job. Bash uses the <VAR>job</VAR> abstraction as the
+basis for job control.
+</P><P>
+
+To facilitate the implementation of the user interface to job
+control, the operating system maintains the notion of a current terminal
+process group ID. Members of this process group (processes whose
+process group ID is equal to the current terminal process group
+ID) receive keyboard-generated signals such as <CODE>SIGINT</CODE>.
+These processes are said to be in the foreground. Background
+processes are those whose process group ID differs from the
+terminal's; such processes are immune to keyboard-generated
+signals. Only foreground processes are allowed to read from or, if
+the user so specifies with <CODE>stty tostop</CODE>, write to the terminal.
+Background processes which attempt to
+read from (write to when <CODE>stty tostop</CODE> is in effect) the
+terminal are sent a <CODE>SIGTTIN</CODE> (<CODE>SIGTTOU</CODE>)
+signal by the kernel's terminal driver,
+which, unless caught, suspends the process.
+</P><P>
+
+If the operating system on which Bash is running supports
+job control, Bash contains facilities to use it. Typing the
+<VAR>suspend</VAR> character (typically <SAMP>`^Z'</SAMP>, Control-Z) while a
+process is running causes that process to be stopped and returns
+control to Bash. Typing the <VAR>delayed suspend</VAR> character
+(typically <SAMP>`^Y'</SAMP>, Control-Y) causes the process to be stopped
+when it attempts to read input from the terminal, and control to
+be returned to Bash. The user then manipulates the state of
+this job, using the <CODE>bg</CODE> command to continue it in the
+background, the <CODE>fg</CODE> command to continue it in the
+foreground, or the <CODE>kill</CODE> command to kill it. A <SAMP>`^Z'</SAMP>
+takes effect immediately, and has the additional side effect of
+causing pending output and typeahead to be discarded.
+</P><P>
+
+There are a number of ways to refer to a job in the shell. The
+character <SAMP>`%'</SAMP> introduces a job specification (<VAR>jobspec</VAR>).
+</P><P>
+
+Job number <CODE>n</CODE> may be referred to as <SAMP>`%n'</SAMP>.
+The symbols <SAMP>`%%'</SAMP> and <SAMP>`%+'</SAMP> refer to the shell's notion of the
+current job, which is the last job stopped while it was in the foreground
+or started in the background.
+A single <SAMP>`%'</SAMP> (with no accompanying job specification) also refers
+to the current job.
+The previous job may be referenced using <SAMP>`%-'</SAMP>.
+If there is only a single job, <SAMP>`%+'</SAMP> and <SAMP>`%-'</SAMP> can both be used
+to refer to that job.
+In output pertaining to jobs (e.g., the output of the <CODE>jobs</CODE>
+command), the current job is always flagged with a <SAMP>`+'</SAMP>, and the
+previous job with a <SAMP>`-'</SAMP>.
+</P><P>
+
+A job may also be referred to
+using a prefix of the name used to start it, or using a substring
+that appears in its command line. For example, <SAMP>`%ce'</SAMP> refers
+to a stopped <CODE>ce</CODE> job. Using <SAMP>`%?ce'</SAMP>, on the
+other hand, refers to any job containing the string <SAMP>`ce'</SAMP> in
+its command line. If the prefix or substring matches more than one job,
+Bash reports an error.
+</P><P>
+
+Simply naming a job can be used to bring it into the foreground:
+<SAMP>`%1'</SAMP> is a synonym for <SAMP>`fg %1'</SAMP>, bringing job 1 from the
+background into the foreground. Similarly, <SAMP>`%1 &#38;'</SAMP> resumes
+job 1 in the background, equivalent to <SAMP>`bg %1'</SAMP>
+</P><P>
+
+The shell learns immediately whenever a job changes state.
+Normally, Bash waits until it is about to print a prompt
+before reporting changes in a job's status so as to not interrupt
+any other output.
+If the <SAMP>`-b'</SAMP> option to the <CODE>set</CODE> builtin is enabled,
+Bash reports such changes immediately (see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>).
+Any trap on <CODE>SIGCHLD</CODE> is executed for each child process
+that exits.
+</P><P>
+
+If an attempt to exit Bash is made while jobs are stopped, (or running, if
+the <CODE>checkjobs</CODE> option is enabled -- see <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>), the
+shell prints a warning message, and if the <CODE>checkjobs</CODE> option is
+enabled, lists the jobs and their statuses.
+The <CODE>jobs</CODE> command may then be used to inspect their status.
+If a second attempt to exit is made without an intervening command,
+Bash does not print another warning, and any stopped jobs are terminated.
+</P><P>
+
+<A NAME="Job Control Builtins"></A>
+<HR SIZE="6">
+<A NAME="SEC93"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC92"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC94"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC94"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 7.2 Job Control Builtins </H2>
+<!--docid::SEC93::-->
+<P>
+
+<DL COMPACT>
+
+<DT><CODE>bg</CODE>
+<DD><A NAME="IDX293"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>bg [<VAR>jobspec</VAR> <small>...</small>]
+</pre></td></tr></table>Resume each suspended job <VAR>jobspec</VAR> in the background, as if it
+had been started with <SAMP>`&#38;'</SAMP>.
+If <VAR>jobspec</VAR> is not supplied, the current job is used.
+The return status is zero unless it is run when job control is not
+enabled, or, when run with job control enabled, any
+<VAR>jobspec</VAR> was not found or specifies a job
+that was started without job control.
+<P>
+
+<DT><CODE>fg</CODE>
+<DD><A NAME="IDX294"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>fg [<VAR>jobspec</VAR>]
+</pre></td></tr></table>Resume the job <VAR>jobspec</VAR> in the foreground and make it the current job.
+If <VAR>jobspec</VAR> is not supplied, the current job is used.
+The return status is that of the command placed into the foreground,
+or non-zero if run when job control is disabled or, when run with
+job control enabled, <VAR>jobspec</VAR> does not specify a valid job or
+<VAR>jobspec</VAR> specifies a job that was started without job control.
+<P>
+
+<DT><CODE>jobs</CODE>
+<DD><A NAME="IDX295"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>jobs [-lnprs] [<VAR>jobspec</VAR>]
+jobs -x <VAR>command</VAR> [<VAR>arguments</VAR>]
+</pre></td></tr></table><P>
+
+The first form lists the active jobs. The options have the
+following meanings:
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>-l</CODE>
+<DD>List process IDs in addition to the normal information.
+<P>
+
+<DT><CODE>-n</CODE>
+<DD>Display information only about jobs that have changed status since
+the user was last notified of their status.
+<P>
+
+<DT><CODE>-p</CODE>
+<DD>List only the process ID of the job's process group leader.
+<P>
+
+<DT><CODE>-r</CODE>
+<DD>Restrict output to running jobs.
+<P>
+
+<DT><CODE>-s</CODE>
+<DD>Restrict output to stopped jobs.
+</DL>
+<P>
+
+If <VAR>jobspec</VAR> is given,
+output is restricted to information about that job.
+If <VAR>jobspec</VAR> is not supplied, the status of all jobs is
+listed.
+</P><P>
+
+If the <SAMP>`-x'</SAMP> option is supplied, <CODE>jobs</CODE> replaces any
+<VAR>jobspec</VAR> found in <VAR>command</VAR> or <VAR>arguments</VAR> with the
+corresponding process group ID, and executes <VAR>command</VAR>,
+passing it <VAR>argument</VAR>s, returning its exit status.
+</P><P>
+
+<DT><CODE>kill</CODE>
+<DD><A NAME="IDX296"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>kill [-s <VAR>sigspec</VAR>] [-n <VAR>signum</VAR>] [-<VAR>sigspec</VAR>] <VAR>jobspec</VAR> or <VAR>pid</VAR>
+kill -l [<VAR>exit_status</VAR>]
+</pre></td></tr></table>Send a signal specified by <VAR>sigspec</VAR> or <VAR>signum</VAR> to the process
+named by job specification <VAR>jobspec</VAR> or process ID <VAR>pid</VAR>.
+<VAR>sigspec</VAR> is either a case-insensitive signal name such as
+<CODE>SIGINT</CODE> (with or without the <CODE>SIG</CODE> prefix)
+or a signal number; <VAR>signum</VAR> is a signal number.
+If <VAR>sigspec</VAR> and <VAR>signum</VAR> are not present, <CODE>SIGTERM</CODE> is used.
+The <SAMP>`-l'</SAMP> option lists the signal names.
+If any arguments are supplied when <SAMP>`-l'</SAMP> is given, the names of the
+signals corresponding to the arguments are listed, and the return status
+is zero.
+<VAR>exit_status</VAR> is a number specifying a signal number or the exit
+status of a process terminated by a signal.
+The return status is zero if at least one signal was successfully sent,
+or non-zero if an error occurs or an invalid option is encountered.
+<P>
+
+<DT><CODE>wait</CODE>
+<DD><A NAME="IDX297"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>wait [<VAR>jobspec</VAR> or <VAR>pid</VAR> ...]
+</pre></td></tr></table>Wait until the child process specified by each process ID <VAR>pid</VAR>
+or job specification <VAR>jobspec</VAR> exits and return the exit status of the
+last command waited for.
+If a job spec is given, all processes in the job are waited for.
+If no arguments are given, all currently active child processes are
+waited for, and the return status is zero.
+If neither <VAR>jobspec</VAR> nor <VAR>pid</VAR> specifies an active child process
+of the shell, the return status is 127.
+<P>
+
+<DT><CODE>disown</CODE>
+<DD><A NAME="IDX298"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>disown [-ar] [-h] [<VAR>jobspec</VAR> <small>...</small>]
+</pre></td></tr></table>Without options, each <VAR>jobspec</VAR> is removed from the table of
+active jobs.
+If the <SAMP>`-h'</SAMP> option is given, the job is not removed from the table,
+but is marked so that <CODE>SIGHUP</CODE> is not sent to the job if the shell
+receives a <CODE>SIGHUP</CODE>.
+If <VAR>jobspec</VAR> is not present, and neither the <SAMP>`-a'</SAMP> nor <SAMP>`-r'</SAMP>
+option is supplied, the current job is used.
+If no <VAR>jobspec</VAR> is supplied, the <SAMP>`-a'</SAMP> option means to remove or
+mark all jobs; the <SAMP>`-r'</SAMP> option without a <VAR>jobspec</VAR>
+argument restricts operation to running jobs.
+<P>
+
+<DT><CODE>suspend</CODE>
+<DD><A NAME="IDX299"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>suspend [-f]
+</pre></td></tr></table>Suspend the execution of this shell until it receives a
+<CODE>SIGCONT</CODE> signal.
+A login shell cannot be suspended; the <SAMP>`-f'</SAMP>
+option can be used to override this and force the suspension.
+<P>
+
+</DL>
+<P>
+
+When job control is not active, the <CODE>kill</CODE> and <CODE>wait</CODE>
+builtins do not accept <VAR>jobspec</VAR> arguments. They must be
+supplied process IDs.
+</P><P>
+
+<A NAME="Job Control Variables"></A>
+<HR SIZE="6">
+<A NAME="SEC94"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC93"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC91"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 7.3 Job Control Variables </H2>
+<!--docid::SEC94::-->
+<P>
+
+<DL COMPACT>
+
+<A NAME="IDX300"></A>
+<DT><CODE>auto_resume</CODE>
+<DD><A NAME="IDX301"></A>
+This variable controls how the shell interacts with the user and
+job control. If this variable exists then single word simple
+commands without redirections are treated as candidates for resumption
+of an existing job. There is no ambiguity allowed; if there is
+more than one job beginning with the string typed, then
+the most recently accessed job will be selected.
+The name of a stopped job, in this context, is the command line
+used to start it. If this variable is set to the value <SAMP>`exact'</SAMP>,
+the string supplied must match the name of a stopped job exactly;
+if set to <SAMP>`substring'</SAMP>,
+the string supplied needs to match a substring of the name of a
+stopped job. The <SAMP>`substring'</SAMP> value provides functionality
+analogous to the <SAMP>`%?'</SAMP> job ID (see section <A HREF="bashref.html#SEC92">7.1 Job Control Basics</A>).
+If set to any other value, the supplied string must
+be a prefix of a stopped job's name; this provides functionality
+analogous to the <SAMP>`%'</SAMP> job ID.
+<P>
+
+</DL>
+<P>
+
+<A NAME="IDX302"></A>
+</P><P>
+
+<A NAME="Command Line Editing"></A>
+<HR SIZE="6">
+<A NAME="SEC95"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC94"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC96"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC119"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC119"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 8. Command Line Editing </H1>
+<!--docid::SEC95::-->
+<P>
+
+This chapter describes the basic features of the GNU
+command line editing interface.
+Command line editing is provided by the Readline library, which is
+used by several different programs, including Bash.
+Command line editing is enabled by default when using an interactive shell,
+unless the <SAMP>`--noediting'</SAMP> option is supplied at shell invocation.
+Line editing is also used when using the <SAMP>`-e'</SAMP> option to the
+<CODE>read</CODE> builtin command (see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>).
+By default, the line editing commands are similar to those of emacs.
+A vi-style line editing interface is also available.
+Line editing can be enabled at any time using the <SAMP>`-o emacs'</SAMP> or
+<SAMP>`-o vi'</SAMP> options to the <CODE>set</CODE> builtin command
+(see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>), or disabled using the <SAMP>`+o emacs'</SAMP> or
+<SAMP>`+o vi'</SAMP> options to <CODE>set</CODE>.
+</P><P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC96">8.1 Introduction to Line Editing</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Notation used in this text.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC97">8.2 Readline Interaction</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The minimum set of commands for editing a line.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC103">8.3 Readline Init File</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Customizing Readline from a user's view.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC107">8.4 Bindable Readline Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A description of most of the Readline commands
+ available for binding</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC116">8.5 Readline vi Mode</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">A short description of how to make Readline
+ behave like the vi editor.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC117">8.6 Programmable Completion</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to specify the possible completions for
+ a specific command.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Builtin commands to specify how to
+ complete arguments for a particular command.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+<A NAME="Introduction and Notation"></A>
+<HR SIZE="6">
+<A NAME="SEC96"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC97"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC119"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 8.1 Introduction to Line Editing </H2>
+<!--docid::SEC96::-->
+<P>
+
+The following paragraphs describe the notation used to represent
+keystrokes.
+</P><P>
+
+The text <KBD>C-k</KBD> is read as `Control-K' and describes the character
+produced when the <KBD>k</KBD> key is pressed while the Control key
+is depressed.
+</P><P>
+
+The text <KBD>M-k</KBD> is read as `Meta-K' and describes the character
+produced when the Meta key (if you have one) is depressed, and the <KBD>k</KBD>
+key is pressed.
+The Meta key is labeled <KBD>ALT</KBD> on many keyboards.
+On keyboards with two keys labeled <KBD>ALT</KBD> (usually to either side of
+the space bar), the <KBD>ALT</KBD> on the left side is generally set to
+work as a Meta key.
+The <KBD>ALT</KBD> key on the right may also be configured to work as a
+Meta key or may be configured as some other modifier, such as a
+Compose key for typing accented characters.
+</P><P>
+
+If you do not have a Meta or <KBD>ALT</KBD> key, or another key working as
+a Meta key, the identical keystroke can be generated by typing <KBD>ESC</KBD>
+<EM>first</EM>, and then typing <KBD>k</KBD>.
+Either process is known as <EM>metafying</EM> the <KBD>k</KBD> key.
+</P><P>
+
+The text <KBD>M-C-k</KBD> is read as `Meta-Control-k' and describes the
+character produced by <EM>metafying</EM> <KBD>C-k</KBD>.
+</P><P>
+
+In addition, several keys have their own names. Specifically,
+<KBD>DEL</KBD>, <KBD>ESC</KBD>, <KBD>LFD</KBD>, <KBD>SPC</KBD>, <KBD>RET</KBD>, and <KBD>TAB</KBD> all
+stand for themselves when seen in this text, or in an init file
+(see section <A HREF="bashref.html#SEC103">8.3 Readline Init File</A>).
+If your keyboard lacks a <KBD>LFD</KBD> key, typing <KBD>C-j</KBD> will
+produce the desired character.
+The <KBD>RET</KBD> key may be labeled <KBD>Return</KBD> or <KBD>Enter</KBD> on
+some keyboards.
+</P><P>
+
+<A NAME="Readline Interaction"></A>
+<HR SIZE="6">
+<A NAME="SEC97"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC96"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC98"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 8.2 Readline Interaction </H2>
+<!--docid::SEC97::-->
+<P>
+
+Often during an interactive session you type in a long line of text,
+only to notice that the first word on the line is misspelled. The
+Readline library gives you a set of commands for manipulating the text
+as you type it in, allowing you to just fix your typo, and not forcing
+you to retype the majority of the line. Using these editing commands,
+you move the cursor to the place that needs correction, and delete or
+insert the text of the corrections. Then, when you are satisfied with
+the line, you simply press <KBD>RET</KBD>. You do not have to be at the
+end of the line to press <KBD>RET</KBD>; the entire line is accepted
+regardless of the location of the cursor within the line.
+</P><P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC98">8.2.1 Readline Bare Essentials</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The least you need to know about Readline.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC99">8.2.2 Readline Movement Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Moving about the input line.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC100">8.2.3 Readline Killing Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to delete text, and how to get it back!</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC101">8.2.4 Readline Arguments</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Giving numeric arguments to commands.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC102">8.2.5 Searching for Commands in the History</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Searching through previous lines.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+<A NAME="Readline Bare Essentials"></A>
+<HR SIZE="6">
+<A NAME="SEC98"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC97"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC99"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC97"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 8.2.1 Readline Bare Essentials </H3>
+<!--docid::SEC98::-->
+<P>
+
+In order to enter characters into the line, simply type them. The typed
+character appears where the cursor was, and then the cursor moves one
+space to the right. If you mistype a character, you can use your
+erase character to back up and delete the mistyped character.
+</P><P>
+
+Sometimes you may mistype a character, and
+not notice the error until you have typed several other characters. In
+that case, you can type <KBD>C-b</KBD> to move the cursor to the left, and then
+correct your mistake. Afterwards, you can move the cursor to the right
+with <KBD>C-f</KBD>.
+</P><P>
+
+When you add text in the middle of a line, you will notice that characters
+to the right of the cursor are `pushed over' to make room for the text
+that you have inserted. Likewise, when you delete text behind the cursor,
+characters to the right of the cursor are `pulled back' to fill in the
+blank space created by the removal of the text. A list of the bare
+essentials for editing the text of an input line follows.
+</P><P>
+
+<DL COMPACT>
+<DT><KBD>C-b</KBD>
+<DD>Move back one character.
+<DT><KBD>C-f</KBD>
+<DD>Move forward one character.
+<DT><KBD>DEL</KBD> or <KBD>Backspace</KBD>
+<DD>Delete the character to the left of the cursor.
+<DT><KBD>C-d</KBD>
+<DD>Delete the character underneath the cursor.
+<DT>Printing characters
+<DD>Insert the character into the line at the cursor.
+<DT><KBD>C-_</KBD> or <KBD>C-x C-u</KBD>
+<DD>Undo the last editing command. You can undo all the way back to an
+empty line.
+</DL>
+<P>
+
+(Depending on your configuration, the <KBD>Backspace</KBD> key be set to
+delete the character to the left of the cursor and the <KBD>DEL</KBD> key set
+to delete the character underneath the cursor, like <KBD>C-d</KBD>, rather
+than the character to the left of the cursor.)
+</P><P>
+
+<A NAME="Readline Movement Commands"></A>
+<HR SIZE="6">
+<A NAME="SEC99"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC98"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC100"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC100"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC97"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 8.2.2 Readline Movement Commands </H3>
+<!--docid::SEC99::-->
+<P>
+
+The above table describes the most basic keystrokes that you need
+in order to do editing of the input line. For your convenience, many
+other commands have been added in addition to <KBD>C-b</KBD>, <KBD>C-f</KBD>,
+<KBD>C-d</KBD>, and <KBD>DEL</KBD>. Here are some commands for moving more rapidly
+about the line.
+</P><P>
+
+<DL COMPACT>
+<DT><KBD>C-a</KBD>
+<DD>Move to the start of the line.
+<DT><KBD>C-e</KBD>
+<DD>Move to the end of the line.
+<DT><KBD>M-f</KBD>
+<DD>Move forward a word, where a word is composed of letters and digits.
+<DT><KBD>M-b</KBD>
+<DD>Move backward a word.
+<DT><KBD>C-l</KBD>
+<DD>Clear the screen, reprinting the current line at the top.
+</DL>
+<P>
+
+Notice how <KBD>C-f</KBD> moves forward a character, while <KBD>M-f</KBD> moves
+forward a word. It is a loose convention that control keystrokes
+operate on characters while meta keystrokes operate on words.
+</P><P>
+
+<A NAME="Readline Killing Commands"></A>
+<HR SIZE="6">
+<A NAME="SEC100"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC99"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC101"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC101"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC97"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 8.2.3 Readline Killing Commands </H3>
+<!--docid::SEC100::-->
+<P>
+
+<A NAME="IDX303"></A>
+<A NAME="IDX304"></A>
+</P><P>
+
+<EM>Killing</EM> text means to delete the text from the line, but to save
+it away for later use, usually by <EM>yanking</EM> (re-inserting)
+it back into the line.
+(`Cut' and `paste' are more recent jargon for `kill' and `yank'.)
+</P><P>
+
+If the description for a command says that it `kills' text, then you can
+be sure that you can get the text back in a different (or the same)
+place later.
+</P><P>
+
+When you use a kill command, the text is saved in a <EM>kill-ring</EM>.
+Any number of consecutive kills save all of the killed text together, so
+that when you yank it back, you get it all. The kill
+ring is not line specific; the text that you killed on a previously
+typed line is available to be yanked back later, when you are typing
+another line.
+<A NAME="IDX305"></A>
+</P><P>
+
+Here is the list of commands for killing text.
+</P><P>
+
+<DL COMPACT>
+<DT><KBD>C-k</KBD>
+<DD>Kill the text from the current cursor position to the end of the line.
+<P>
+
+<DT><KBD>M-d</KBD>
+<DD>Kill from the cursor to the end of the current word, or, if between
+words, to the end of the next word.
+Word boundaries are the same as those used by <KBD>M-f</KBD>.
+<P>
+
+<DT><KBD>M-<KBD>DEL</KBD></KBD>
+<DD>Kill from the cursor the start of the current word, or, if between
+words, to the start of the previous word.
+Word boundaries are the same as those used by <KBD>M-b</KBD>.
+<P>
+
+<DT><KBD>C-w</KBD>
+<DD>Kill from the cursor to the previous whitespace. This is different than
+<KBD>M-<KBD>DEL</KBD></KBD> because the word boundaries differ.
+<P>
+
+</DL>
+<P>
+
+Here is how to <EM>yank</EM> the text back into the line. Yanking
+means to copy the most-recently-killed text from the kill buffer.
+</P><P>
+
+<DL COMPACT>
+<DT><KBD>C-y</KBD>
+<DD>Yank the most recently killed text back into the buffer at the cursor.
+<P>
+
+<DT><KBD>M-y</KBD>
+<DD>Rotate the kill-ring, and yank the new top. You can only do this if
+the prior command is <KBD>C-y</KBD> or <KBD>M-y</KBD>.
+</DL>
+<P>
+
+<A NAME="Readline Arguments"></A>
+<HR SIZE="6">
+<A NAME="SEC101"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC100"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC102"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC102"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC97"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 8.2.4 Readline Arguments </H3>
+<!--docid::SEC101::-->
+<P>
+
+You can pass numeric arguments to Readline commands. Sometimes the
+argument acts as a repeat count, other times it is the <I>sign</I> of the
+argument that is significant. If you pass a negative argument to a
+command which normally acts in a forward direction, that command will
+act in a backward direction. For example, to kill text back to the
+start of the line, you might type <SAMP>`M-- C-k'</SAMP>.
+</P><P>
+
+The general way to pass numeric arguments to a command is to type meta
+digits before the command. If the first `digit' typed is a minus
+sign (<SAMP>`-'</SAMP>), then the sign of the argument will be negative. Once
+you have typed one meta digit to get the argument started, you can type
+the remainder of the digits, and then the command. For example, to give
+the <KBD>C-d</KBD> command an argument of 10, you could type <SAMP>`M-1 0 C-d'</SAMP>,
+which will delete the next ten characters on the input line.
+</P><P>
+
+<A NAME="Searching"></A>
+<HR SIZE="6">
+<A NAME="SEC102"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC101"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC97"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 8.2.5 Searching for Commands in the History </H3>
+<!--docid::SEC102::-->
+<P>
+
+Readline provides commands for searching through the command history
+(see section <A HREF="bashref.html#SEC120">9.1 Bash History Facilities</A>)
+for lines containing a specified string.
+There are two search modes: <EM>incremental</EM> and <EM>non-incremental</EM>.
+</P><P>
+
+Incremental searches begin before the user has finished typing the
+search string.
+As each character of the search string is typed, Readline displays
+the next entry from the history matching the string typed so far.
+An incremental search requires only as many characters as needed to
+find the desired history entry.
+To search backward in the history for a particular string, type
+<KBD>C-r</KBD>. Typing <KBD>C-s</KBD> searches forward through the history.
+The characters present in the value of the <CODE>isearch-terminators</CODE> variable
+are used to terminate an incremental search.
+If that variable has not been assigned a value, the <KBD>ESC</KBD> and
+<KBD>C-J</KBD> characters will terminate an incremental search.
+<KBD>C-g</KBD> will abort an incremental search and restore the original line.
+When the search is terminated, the history entry containing the
+search string becomes the current line.
+</P><P>
+
+To find other matching entries in the history list, type <KBD>C-r</KBD> or
+<KBD>C-s</KBD> as appropriate.
+This will search backward or forward in the history for the next
+entry matching the search string typed so far.
+Any other key sequence bound to a Readline command will terminate
+the search and execute that command.
+For instance, a <KBD>RET</KBD> will terminate the search and accept
+the line, thereby executing the command from the history list.
+A movement command will terminate the search, make the last line found
+the current line, and begin editing.
+</P><P>
+
+Readline remembers the last incremental search string. If two
+<KBD>C-r</KBD>s are typed without any intervening characters defining a new
+search string, any remembered search string is used.
+</P><P>
+
+Non-incremental searches read the entire search string before starting
+to search for matching history lines. The search string may be
+typed by the user or be part of the contents of the current line.
+</P><P>
+
+<A NAME="Readline Init File"></A>
+<HR SIZE="6">
+<A NAME="SEC103"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC102"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC104"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 8.3 Readline Init File </H2>
+<!--docid::SEC103::-->
+<P>
+
+Although the Readline library comes with a set of Emacs-like
+keybindings installed by default, it is possible to use a different set
+of keybindings.
+Any user can customize programs that use Readline by putting
+commands in an <EM>inputrc</EM> file, conventionally in his home directory.
+The name of this
+file is taken from the value of the shell variable <CODE>INPUTRC</CODE>. If
+that variable is unset, the default is <TT>`~/.inputrc'</TT>. If that
+file does not exist or cannot be read, the ultimate default is
+<TT>`/etc/inputrc'</TT>.
+</P><P>
+
+When a program which uses the Readline library starts up, the
+init file is read, and the key bindings are set.
+</P><P>
+
+In addition, the <CODE>C-x C-r</CODE> command re-reads this init file, thus
+incorporating any changes that you might have made to it.
+</P><P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Syntax for the commands in the inputrc file.</TD></TR>
+</TABLE>
+
+<br>
+<TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC105">8.3.2 Conditional Init Constructs</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Conditional key bindings in the inputrc file.</TD></TR>
+</TABLE>
+
+<br>
+<TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC106">8.3.3 Sample Init File</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">An example inputrc file.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+<A NAME="Readline Init File Syntax"></A>
+<HR SIZE="6">
+<A NAME="SEC104"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC105"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 8.3.1 Readline Init File Syntax </H3>
+<!--docid::SEC104::-->
+<P>
+
+There are only a few basic constructs allowed in the
+Readline init file. Blank lines are ignored.
+Lines beginning with a <SAMP>`#'</SAMP> are comments.
+Lines beginning with a <SAMP>`$'</SAMP> indicate conditional
+constructs (see section <A HREF="bashref.html#SEC105">8.3.2 Conditional Init Constructs</A>). Other lines
+denote variable settings and key bindings.
+</P><P>
+
+<DL COMPACT>
+<DT>Variable Settings
+<DD>You can modify the run-time behavior of Readline by
+altering the values of variables in Readline
+using the <CODE>set</CODE> command within the init file.
+The syntax is simple:
+<P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>set <VAR>variable</VAR> <VAR>value</VAR>
+</pre></td></tr></table></P><P>
+
+Here, for example, is how to
+change from the default Emacs-like key binding to use
+<CODE>vi</CODE> line editing commands:
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>set editing-mode vi
+</pre></td></tr></table></P><P>
+
+Variable names and values, where appropriate, are recognized without regard
+to case. Unrecognized variable names are ignored.
+</P><P>
+
+Boolean variables (those that can be set to on or off) are set to on if
+the value is null or empty, <VAR>on</VAR> (case-insensitive), or 1. Any other
+value results in the variable being set to off.
+</P><P>
+
+The <CODE>bind -V</CODE> command lists the current Readline variable names
+and values. See section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>.
+</P><P>
+
+A great deal of run-time behavior is changeable with the following
+variables.
+</P><P>
+
+<A NAME="IDX306"></A>
+<DL COMPACT>
+
+<DT><CODE>bell-style</CODE>
+<DD><A NAME="IDX307"></A>
+Controls what happens when Readline wants to ring the terminal bell.
+If set to <SAMP>`none'</SAMP>, Readline never rings the bell. If set to
+<SAMP>`visible'</SAMP>, Readline uses a visible bell if one is available.
+If set to <SAMP>`audible'</SAMP> (the default), Readline attempts to ring
+the terminal's bell.
+<P>
+
+<DT><CODE>bind-tty-special-chars</CODE>
+<DD><A NAME="IDX308"></A>
+If set to <SAMP>`on'</SAMP>, Readline attempts to bind the control characters
+treated specially by the kernel's terminal driver to their Readline
+equivalents.
+<P>
+
+<DT><CODE>comment-begin</CODE>
+<DD><A NAME="IDX309"></A>
+The string to insert at the beginning of the line when the
+<CODE>insert-comment</CODE> command is executed. The default value
+is <CODE>"#"</CODE>.
+<P>
+
+<DT><CODE>completion-ignore-case</CODE>
+<DD>If set to <SAMP>`on'</SAMP>, Readline performs filename matching and completion
+in a case-insensitive fashion.
+The default value is <SAMP>`off'</SAMP>.
+<P>
+
+<DT><CODE>completion-prefix-display-length</CODE>
+<DD><A NAME="IDX310"></A>
+The length in characters of the common prefix of a list of possible
+completions that is displayed without modification. When set to a
+value greater than zero, common prefixes longer than this value are
+replaced with an ellipsis when displaying possible completions.
+<P>
+
+<DT><CODE>completion-query-items</CODE>
+<DD><A NAME="IDX311"></A>
+The number of possible completions that determines when the user is
+asked whether the list of possibilities should be displayed.
+If the number of possible completions is greater than this value,
+Readline will ask the user whether or not he wishes to view
+them; otherwise, they are simply listed.
+This variable must be set to an integer value greater than or equal to 0.
+A negative value means Readline should never ask.
+The default limit is <CODE>100</CODE>.
+<P>
+
+<DT><CODE>convert-meta</CODE>
+<DD><A NAME="IDX312"></A>
+If set to <SAMP>`on'</SAMP>, Readline will convert characters with the
+eighth bit set to an ASCII key sequence by stripping the eighth
+bit and prefixing an <KBD>ESC</KBD> character, converting them to a
+meta-prefixed key sequence. The default value is <SAMP>`on'</SAMP>.
+<P>
+
+<DT><CODE>disable-completion</CODE>
+<DD><A NAME="IDX313"></A>
+If set to <SAMP>`On'</SAMP>, Readline will inhibit word completion.
+Completion characters will be inserted into the line as if they had
+been mapped to <CODE>self-insert</CODE>. The default is <SAMP>`off'</SAMP>.
+<P>
+
+<DT><CODE>editing-mode</CODE>
+<DD><A NAME="IDX314"></A>
+The <CODE>editing-mode</CODE> variable controls which default set of
+key bindings is used. By default, Readline starts up in Emacs editing
+mode, where the keystrokes are most similar to Emacs. This variable can be
+set to either <SAMP>`emacs'</SAMP> or <SAMP>`vi'</SAMP>.
+<P>
+
+<DT><CODE>echo-control-characters</CODE>
+<DD>When set to <SAMP>`on'</SAMP>, on operating systems that indicate they support it,
+readline echoes a character corresponding to a signal generated from the
+keyboard. The default is <SAMP>`on'</SAMP>.
+<P>
+
+<DT><CODE>enable-keypad</CODE>
+<DD><A NAME="IDX315"></A>
+When set to <SAMP>`on'</SAMP>, Readline will try to enable the application
+keypad when it is called. Some systems need this to enable the
+arrow keys. The default is <SAMP>`off'</SAMP>.
+<P>
+
+<DT><CODE>enable-meta-key</CODE>
+<DD>When set to <SAMP>`on'</SAMP>, Readline will try to enable any meta modifier
+key the terminal claims to support when it is called. On many terminals,
+the meta key is used to send eight-bit characters.
+The default is <SAMP>`on'</SAMP>.
+<P>
+
+<DT><CODE>expand-tilde</CODE>
+<DD><A NAME="IDX316"></A>
+If set to <SAMP>`on'</SAMP>, tilde expansion is performed when Readline
+attempts word completion. The default is <SAMP>`off'</SAMP>.
+<P>
+
+<DT><CODE>history-preserve-point</CODE>
+<DD><A NAME="IDX317"></A>
+If set to <SAMP>`on'</SAMP>, the history code attempts to place the point (the
+current cursor position) at the
+same location on each history line retrieved with <CODE>previous-history</CODE>
+or <CODE>next-history</CODE>. The default is <SAMP>`off'</SAMP>.
+<P>
+
+<DT><CODE>history-size</CODE>
+<DD><A NAME="IDX318"></A>
+Set the maximum number of history entries saved in the history list. If
+set to zero, the number of entries in the history list is not limited.
+<P>
+
+<DT><CODE>horizontal-scroll-mode</CODE>
+<DD><A NAME="IDX319"></A>
+This variable can be set to either <SAMP>`on'</SAMP> or <SAMP>`off'</SAMP>. Setting it
+to <SAMP>`on'</SAMP> means that the text of the lines being edited will scroll
+horizontally on a single screen line when they are longer than the width
+of the screen, instead of wrapping onto a new screen line. By default,
+this variable is set to <SAMP>`off'</SAMP>.
+<P>
+
+<DT><CODE>input-meta</CODE>
+<DD><A NAME="IDX320"></A>
+<A NAME="IDX321"></A>
+If set to <SAMP>`on'</SAMP>, Readline will enable eight-bit input (it
+will not clear the eighth bit in the characters it reads),
+regardless of what the terminal claims it can support. The
+default value is <SAMP>`off'</SAMP>. The name <CODE>meta-flag</CODE> is a
+synonym for this variable.
+<P>
+
+<DT><CODE>isearch-terminators</CODE>
+<DD><A NAME="IDX322"></A>
+The string of characters that should terminate an incremental search without
+subsequently executing the character as a command (see section <A HREF="bashref.html#SEC102">8.2.5 Searching for Commands in the History</A>).
+If this variable has not been given a value, the characters <KBD>ESC</KBD> and
+<KBD>C-J</KBD> will terminate an incremental search.
+<P>
+
+<DT><CODE>keymap</CODE>
+<DD><A NAME="IDX323"></A>
+Sets Readline's idea of the current keymap for key binding commands.
+Acceptable <CODE>keymap</CODE> names are
+<CODE>emacs</CODE>,
+<CODE>emacs-standard</CODE>,
+<CODE>emacs-meta</CODE>,
+<CODE>emacs-ctlx</CODE>,
+<CODE>vi</CODE>,
+<CODE>vi-move</CODE>,
+<CODE>vi-command</CODE>, and
+<CODE>vi-insert</CODE>.
+<CODE>vi</CODE> is equivalent to <CODE>vi-command</CODE>; <CODE>emacs</CODE> is
+equivalent to <CODE>emacs-standard</CODE>. The default value is <CODE>emacs</CODE>.
+The value of the <CODE>editing-mode</CODE> variable also affects the
+default keymap.
+<P>
+
+<DT><CODE>mark-directories</CODE>
+<DD>If set to <SAMP>`on'</SAMP>, completed directory names have a slash
+appended. The default is <SAMP>`on'</SAMP>.
+<P>
+
+<DT><CODE>mark-modified-lines</CODE>
+<DD><A NAME="IDX324"></A>
+This variable, when set to <SAMP>`on'</SAMP>, causes Readline to display an
+asterisk (<SAMP>`*'</SAMP>) at the start of history lines which have been modified.
+This variable is <SAMP>`off'</SAMP> by default.
+<P>
+
+<DT><CODE>mark-symlinked-directories</CODE>
+<DD><A NAME="IDX325"></A>
+If set to <SAMP>`on'</SAMP>, completed names which are symbolic links
+to directories have a slash appended (subject to the value of
+<CODE>mark-directories</CODE>).
+The default is <SAMP>`off'</SAMP>.
+<P>
+
+<DT><CODE>match-hidden-files</CODE>
+<DD><A NAME="IDX326"></A>
+This variable, when set to <SAMP>`on'</SAMP>, causes Readline to match files whose
+names begin with a <SAMP>`.'</SAMP> (hidden files) when performing filename
+completion, unless the leading <SAMP>`.'</SAMP> is
+supplied by the user in the filename to be completed.
+This variable is <SAMP>`on'</SAMP> by default.
+<P>
+
+<DT><CODE>output-meta</CODE>
+<DD><A NAME="IDX327"></A>
+If set to <SAMP>`on'</SAMP>, Readline will display characters with the
+eighth bit set directly rather than as a meta-prefixed escape
+sequence. The default is <SAMP>`off'</SAMP>.
+<P>
+
+<DT><CODE>page-completions</CODE>
+<DD><A NAME="IDX328"></A>
+If set to <SAMP>`on'</SAMP>, Readline uses an internal <CODE>more</CODE>-like pager
+to display a screenful of possible completions at a time.
+This variable is <SAMP>`on'</SAMP> by default.
+<P>
+
+<DT><CODE>print-completions-horizontally</CODE>
+<DD>If set to <SAMP>`on'</SAMP>, Readline will display completions with matches
+sorted horizontally in alphabetical order, rather than down the screen.
+The default is <SAMP>`off'</SAMP>.
+<P>
+
+<DT><CODE>revert-all-at-newline</CODE>
+<DD><A NAME="IDX329"></A>
+If set to <SAMP>`on'</SAMP>, Readline will undo all changes to history lines
+before returning when <CODE>accept-line</CODE> is executed. By default,
+history lines may be modified and retain individual undo lists across
+calls to <CODE>readline</CODE>. The default is <SAMP>`off'</SAMP>.
+<P>
+
+<DT><CODE>show-all-if-ambiguous</CODE>
+<DD><A NAME="IDX330"></A>
+This alters the default behavior of the completion functions. If
+set to <SAMP>`on'</SAMP>,
+words which have more than one possible completion cause the
+matches to be listed immediately instead of ringing the bell.
+The default value is <SAMP>`off'</SAMP>.
+<P>
+
+<DT><CODE>show-all-if-unmodified</CODE>
+<DD><A NAME="IDX331"></A>
+This alters the default behavior of the completion functions in
+a fashion similar to <VAR>show-all-if-ambiguous</VAR>.
+If set to <SAMP>`on'</SAMP>,
+words which have more than one possible completion without any
+possible partial completion (the possible completions don't share
+a common prefix) cause the matches to be listed immediately instead
+of ringing the bell.
+The default value is <SAMP>`off'</SAMP>.
+<P>
+
+<DT><CODE>skip-completed-text</CODE>
+<DD><A NAME="IDX332"></A>
+If set to <SAMP>`on'</SAMP>, this alters the default completion behavior when
+inserting a single match into the line. It's only active when
+performing completion in the middle of a word. If enabled, readline
+does not insert characters from the completion that match characters
+after point in the word being completed, so portions of the word
+following the cursor are not duplicated.
+For instance, if this is enabled, attempting completion when the cursor
+is after the <SAMP>`e'</SAMP> in <SAMP>`Makefile'</SAMP> will result in <SAMP>`Makefile'</SAMP>
+rather than <SAMP>`Makefilefile'</SAMP>, assuming there is a single possible
+completion.
+The default value is <SAMP>`off'</SAMP>.
+<P>
+
+<DT><CODE>visible-stats</CODE>
+<DD><A NAME="IDX333"></A>
+If set to <SAMP>`on'</SAMP>, a character denoting a file's type
+is appended to the filename when listing possible
+completions. The default is <SAMP>`off'</SAMP>.
+<P>
+
+</DL>
+<P>
+
+<DT>Key Bindings
+<DD>The syntax for controlling key bindings in the init file is
+simple. First you need to find the name of the command that you
+want to change. The following sections contain tables of the command
+name, the default keybinding, if any, and a short description of what
+the command does.
+<P>
+
+Once you know the name of the command, simply place on a line
+in the init file the name of the key
+you wish to bind the command to, a colon, and then the name of the
+command.
+There can be no space between the key name and the colon -- that will be
+interpreted as part of the key name.
+The name of the key can be expressed in different ways, depending on
+what you find most comfortable.
+</P><P>
+
+In addition to command names, readline allows keys to be bound
+to a string that is inserted when the key is pressed (a <VAR>macro</VAR>).
+</P><P>
+
+The <CODE>bind -p</CODE> command displays Readline function names and
+bindings in a format that can put directly into an initialization file.
+See section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>.
+</P><P>
+
+<DL COMPACT>
+<DT><VAR>keyname</VAR>: <VAR>function-name</VAR> or <VAR>macro</VAR>
+<DD><VAR>keyname</VAR> is the name of a key spelled out in English. For example:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>Control-u: universal-argument
+Meta-Rubout: backward-kill-word
+Control-o: "&#62; output"
+</pre></td></tr></table><P>
+
+In the above example, <KBD>C-u</KBD> is bound to the function
+<CODE>universal-argument</CODE>,
+<KBD>M-DEL</KBD> is bound to the function <CODE>backward-kill-word</CODE>, and
+<KBD>C-o</KBD> is bound to run the macro
+expressed on the right hand side (that is, to insert the text
+<SAMP>`&#62; output'</SAMP> into the line).
+</P><P>
+
+A number of symbolic character names are recognized while
+processing this key binding syntax:
+<VAR>DEL</VAR>,
+<VAR>ESC</VAR>,
+<VAR>ESCAPE</VAR>,
+<VAR>LFD</VAR>,
+<VAR>NEWLINE</VAR>,
+<VAR>RET</VAR>,
+<VAR>RETURN</VAR>,
+<VAR>RUBOUT</VAR>,
+<VAR>SPACE</VAR>,
+<VAR>SPC</VAR>,
+and
+<VAR>TAB</VAR>.
+</P><P>
+
+<DT>"<VAR>keyseq</VAR>": <VAR>function-name</VAR> or <VAR>macro</VAR>
+<DD><VAR>keyseq</VAR> differs from <VAR>keyname</VAR> above in that strings
+denoting an entire key sequence can be specified, by placing
+the key sequence in double quotes. Some GNU Emacs style key
+escapes can be used, as in the following example, but the
+special character names are not recognized.
+<P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>"\C-u": universal-argument
+"\C-x\C-r": re-read-init-file
+"\e[11~": "Function Key 1"
+</pre></td></tr></table></P><P>
+
+In the above example, <KBD>C-u</KBD> is again bound to the function
+<CODE>universal-argument</CODE> (just as it was in the first example),
+<SAMP>`<KBD>C-x</KBD> <KBD>C-r</KBD>'</SAMP> is bound to the function <CODE>re-read-init-file</CODE>,
+and <SAMP>`<KBD>ESC</KBD> <KBD>[</KBD> <KBD>1</KBD> <KBD>1</KBD> <KBD>~</KBD>'</SAMP> is bound to insert
+the text <SAMP>`Function Key 1'</SAMP>.
+</P><P>
+
+</DL>
+<P>
+
+The following GNU Emacs style escape sequences are available when
+specifying key sequences:
+</P><P>
+
+<DL COMPACT>
+<DT><CODE><KBD>\C-</KBD></CODE>
+<DD>control prefix
+<DT><CODE><KBD>\M-</KBD></CODE>
+<DD>meta prefix
+<DT><CODE><KBD>\e</KBD></CODE>
+<DD>an escape character
+<DT><CODE><KBD>\\</KBD></CODE>
+<DD>backslash
+<DT><CODE><KBD>\"</KBD></CODE>
+<DD><KBD>"</KBD>, a double quotation mark
+<DT><CODE><KBD>\'</KBD></CODE>
+<DD><KBD>'</KBD>, a single quote or apostrophe
+</DL>
+<P>
+
+In addition to the GNU Emacs style escape sequences, a second
+set of backslash escapes is available:
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>\a</CODE>
+<DD>alert (bell)
+<DT><CODE>\b</CODE>
+<DD>backspace
+<DT><CODE>\d</CODE>
+<DD>delete
+<DT><CODE>\f</CODE>
+<DD>form feed
+<DT><CODE>\n</CODE>
+<DD>newline
+<DT><CODE>\r</CODE>
+<DD>carriage return
+<DT><CODE>\t</CODE>
+<DD>horizontal tab
+<DT><CODE>\v</CODE>
+<DD>vertical tab
+<DT><CODE>\<VAR>nnn</VAR></CODE>
+<DD>the eight-bit character whose value is the octal value <VAR>nnn</VAR>
+(one to three digits)
+<DT><CODE>\x<VAR>HH</VAR></CODE>
+<DD>the eight-bit character whose value is the hexadecimal value <VAR>HH</VAR>
+(one or two hex digits)
+</DL>
+<P>
+
+When entering the text of a macro, single or double quotes must
+be used to indicate a macro definition.
+Unquoted text is assumed to be a function name.
+In the macro body, the backslash escapes described above are expanded.
+Backslash will quote any other character in the macro text,
+including <SAMP>`"'</SAMP> and <SAMP>`''</SAMP>.
+For example, the following binding will make <SAMP>`<KBD>C-x</KBD> \'</SAMP>
+insert a single <SAMP>`\'</SAMP> into the line:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>"\C-x\\": "\\"
+</pre></td></tr></table></P><P>
+
+</DL>
+<P>
+
+<A NAME="Conditional Init Constructs"></A>
+<HR SIZE="6">
+<A NAME="SEC105"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC104"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC106"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC106"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 8.3.2 Conditional Init Constructs </H3>
+<!--docid::SEC105::-->
+<P>
+
+Readline implements a facility similar in spirit to the conditional
+compilation features of the C preprocessor which allows key
+bindings and variable settings to be performed as the result
+of tests. There are four parser directives used.
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>$if</CODE>
+<DD>The <CODE>$if</CODE> construct allows bindings to be made based on the
+editing mode, the terminal being used, or the application using
+Readline. The text of the test extends to the end of the line;
+no characters are required to isolate it.
+<P>
+
+<DL COMPACT>
+<DT><CODE>mode</CODE>
+<DD>The <CODE>mode=</CODE> form of the <CODE>$if</CODE> directive is used to test
+whether Readline is in <CODE>emacs</CODE> or <CODE>vi</CODE> mode.
+This may be used in conjunction
+with the <SAMP>`set keymap'</SAMP> command, for instance, to set bindings in
+the <CODE>emacs-standard</CODE> and <CODE>emacs-ctlx</CODE> keymaps only if
+Readline is starting out in <CODE>emacs</CODE> mode.
+<P>
+
+<DT><CODE>term</CODE>
+<DD>The <CODE>term=</CODE> form may be used to include terminal-specific
+key bindings, perhaps to bind the key sequences output by the
+terminal's function keys. The word on the right side of the
+<SAMP>`='</SAMP> is tested against both the full name of the terminal and
+the portion of the terminal name before the first <SAMP>`-'</SAMP>. This
+allows <CODE>sun</CODE> to match both <CODE>sun</CODE> and <CODE>sun-cmd</CODE>,
+for instance.
+<P>
+
+<DT><CODE>application</CODE>
+<DD>The <VAR>application</VAR> construct is used to include
+application-specific settings. Each program using the Readline
+library sets the <VAR>application name</VAR>, and you can test for
+a particular value.
+This could be used to bind key sequences to functions useful for
+a specific program. For instance, the following command adds a
+key sequence that quotes the current or previous word in Bash:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>$if Bash
+# Quote the current or previous word
+"\C-xq": "\eb\"\ef\""
+$endif
+</pre></td></tr></table></DL>
+<P>
+
+<DT><CODE>$endif</CODE>
+<DD>This command, as seen in the previous example, terminates an
+<CODE>$if</CODE> command.
+<P>
+
+<DT><CODE>$else</CODE>
+<DD>Commands in this branch of the <CODE>$if</CODE> directive are executed if
+the test fails.
+<P>
+
+<DT><CODE>$include</CODE>
+<DD>This directive takes a single filename as an argument and reads commands
+and bindings from that file.
+For example, the following directive reads from <TT>`/etc/inputrc'</TT>:
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>$include /etc/inputrc
+</pre></td></tr></table></DL>
+<P>
+
+<A NAME="Sample Init File"></A>
+<HR SIZE="6">
+<A NAME="SEC106"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC105"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC103"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 8.3.3 Sample Init File </H3>
+<!--docid::SEC106::-->
+<P>
+
+Here is an example of an <VAR>inputrc</VAR> file. This illustrates key
+binding, variable assignment, and conditional syntax.
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre># This file controls the behaviour of line input editing for
+# programs that use the GNU Readline library. Existing
+# programs include FTP, Bash, and GDB.
+#
+# You can re-read the inputrc file with C-x C-r.
+# Lines beginning with '#' are comments.
+#
+# First, include any systemwide bindings and variable
+# assignments from /etc/Inputrc
+$include /etc/Inputrc
+
+#
+# Set various bindings for emacs mode.
+
+set editing-mode emacs
+
+$if mode=emacs
+
+Meta-Control-h: backward-kill-word Text after the function name is ignored
+
+#
+# Arrow keys in keypad mode
+#
+#"\M-OD": backward-char
+#"\M-OC": forward-char
+#"\M-OA": previous-history
+#"\M-OB": next-history
+#
+# Arrow keys in ANSI mode
+#
+"\M-[D": backward-char
+"\M-[C": forward-char
+"\M-[A": previous-history
+"\M-[B": next-history
+#
+# Arrow keys in 8 bit keypad mode
+#
+#"\M-\C-OD": backward-char
+#"\M-\C-OC": forward-char
+#"\M-\C-OA": previous-history
+#"\M-\C-OB": next-history
+#
+# Arrow keys in 8 bit ANSI mode
+#
+#"\M-\C-[D": backward-char
+#"\M-\C-[C": forward-char
+#"\M-\C-[A": previous-history
+#"\M-\C-[B": next-history
+
+C-q: quoted-insert
+
+$endif
+
+# An old-style binding. This happens to be the default.
+TAB: complete
+
+# Macros that are convenient for shell interaction
+$if Bash
+# edit the path
+"\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"
+# prepare to type a quoted word --
+# insert open and close double quotes
+# and move to just after the open quote
+"\C-x\"": "\"\"\C-b"
+# insert a backslash (testing backslash escapes
+# in sequences and macros)
+"\C-x\\": "\\"
+# Quote the current or previous word
+"\C-xq": "\eb\"\ef\""
+# Add a binding to refresh the line, which is unbound
+"\C-xr": redraw-current-line
+# Edit variable on current line.
+"\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="
+$endif
+
+# use a visible bell if one is available
+set bell-style visible
+
+# don't strip characters to 7 bits when reading
+set input-meta on
+
+# allow iso-latin1 characters to be inserted rather
+# than converted to prefix-meta sequences
+set convert-meta off
+
+# display characters with the eighth bit set directly
+# rather than as meta-prefixed characters
+set output-meta on
+
+# if there are more than 150 possible completions for
+# a word, ask the user if he wants to see all of them
+set completion-query-items 150
+
+# For FTP
+$if Ftp
+"\C-xg": "get \M-?"
+"\C-xt": "put \M-?"
+"\M-.": yank-last-arg
+$endif
+</pre></td></tr></table></P><P>
+
+<A NAME="Bindable Readline Commands"></A>
+<HR SIZE="6">
+<A NAME="SEC107"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC106"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC108"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC116"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC116"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 8.4 Bindable Readline Commands </H2>
+<!--docid::SEC107::-->
+<P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Moving about the line.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Getting at previous lines.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Commands for changing text.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Commands for killing and yanking.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC112">8.4.5 Specifying Numeric Arguments</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Specifying numeric arguments, repeat counts.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Getting Readline to do the typing for you.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Saving and re-executing typed characters</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Other miscellaneous commands.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+This section describes Readline commands that may be bound to key
+sequences.
+You can list your key bindings by executing
+<CODE>bind -P</CODE> or, for a more terse format, suitable for an
+<VAR>inputrc</VAR> file, <CODE>bind -p</CODE>. (See section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>.)
+Command names without an accompanying key sequence are unbound by default.
+</P><P>
+
+In the following descriptions, <EM>point</EM> refers to the current cursor
+position, and <EM>mark</EM> refers to a cursor position saved by the
+<CODE>set-mark</CODE> command.
+The text between the point and mark is referred to as the <EM>region</EM>.
+</P><P>
+
+<A NAME="Commands For Moving"></A>
+<HR SIZE="6">
+<A NAME="SEC108"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC109"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC116"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC116"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 8.4.1 Commands For Moving </H3>
+<!--docid::SEC108::-->
+<DL COMPACT>
+<A NAME="IDX334"></A>
+<DT><CODE>beginning-of-line (C-a)</CODE>
+<DD><A NAME="IDX335"></A>
+Move to the start of the current line.
+<P>
+
+<A NAME="IDX336"></A>
+<DT><CODE>end-of-line (C-e)</CODE>
+<DD><A NAME="IDX337"></A>
+Move to the end of the line.
+<P>
+
+<A NAME="IDX338"></A>
+<DT><CODE>forward-char (C-f)</CODE>
+<DD><A NAME="IDX339"></A>
+Move forward a character.
+<P>
+
+<A NAME="IDX340"></A>
+<DT><CODE>backward-char (C-b)</CODE>
+<DD><A NAME="IDX341"></A>
+Move back a character.
+<P>
+
+<A NAME="IDX342"></A>
+<DT><CODE>forward-word (M-f)</CODE>
+<DD><A NAME="IDX343"></A>
+Move forward to the end of the next word.
+Words are composed of letters and digits.
+<P>
+
+<A NAME="IDX344"></A>
+<DT><CODE>backward-word (M-b)</CODE>
+<DD><A NAME="IDX345"></A>
+Move back to the start of the current or previous word.
+Words are composed of letters and digits.
+<P>
+
+<A NAME="IDX346"></A>
+<DT><CODE>shell-forward-word ()</CODE>
+<DD><A NAME="IDX347"></A>
+Move forward to the end of the next word.
+Words are delimited by non-quoted shell metacharacters.
+<P>
+
+<A NAME="IDX348"></A>
+<DT><CODE>shell-backward-word ()</CODE>
+<DD><A NAME="IDX349"></A>
+Move back to the start of the current or previous word.
+Words are delimited by non-quoted shell metacharacters.
+<P>
+
+<A NAME="IDX350"></A>
+<DT><CODE>clear-screen (C-l)</CODE>
+<DD><A NAME="IDX351"></A>
+Clear the screen and redraw the current line,
+leaving the current line at the top of the screen.
+<P>
+
+<A NAME="IDX352"></A>
+<DT><CODE>redraw-current-line ()</CODE>
+<DD><A NAME="IDX353"></A>
+Refresh the current line. By default, this is unbound.
+<P>
+
+</DL>
+<P>
+
+<A NAME="Commands For History"></A>
+<HR SIZE="6">
+<A NAME="SEC109"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC108"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC110"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC110"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC116"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 8.4.2 Commands For Manipulating The History </H3>
+<!--docid::SEC109::-->
+<P>
+
+<DL COMPACT>
+<A NAME="IDX354"></A>
+<DT><CODE>accept-line (Newline or Return)</CODE>
+<DD><A NAME="IDX355"></A>
+Accept the line regardless of where the cursor is.
+If this line is
+non-empty, add it to the history list according to the setting of
+the <CODE>HISTCONTROL</CODE> and <CODE>HISTIGNORE</CODE> variables.
+If this line is a modified history line, then restore the history line
+to its original state.
+<P>
+
+<A NAME="IDX356"></A>
+<DT><CODE>previous-history (C-p)</CODE>
+<DD><A NAME="IDX357"></A>
+Move `back' through the history list, fetching the previous command.
+<P>
+
+<A NAME="IDX358"></A>
+<DT><CODE>next-history (C-n)</CODE>
+<DD><A NAME="IDX359"></A>
+Move `forward' through the history list, fetching the next command.
+<P>
+
+<A NAME="IDX360"></A>
+<DT><CODE>beginning-of-history (M-&#60;)</CODE>
+<DD><A NAME="IDX361"></A>
+Move to the first line in the history.
+<P>
+
+<A NAME="IDX362"></A>
+<DT><CODE>end-of-history (M-&#62;)</CODE>
+<DD><A NAME="IDX363"></A>
+Move to the end of the input history, i.e., the line currently
+being entered.
+<P>
+
+<A NAME="IDX364"></A>
+<DT><CODE>reverse-search-history (C-r)</CODE>
+<DD><A NAME="IDX365"></A>
+Search backward starting at the current line and moving `up' through
+the history as necessary. This is an incremental search.
+<P>
+
+<A NAME="IDX366"></A>
+<DT><CODE>forward-search-history (C-s)</CODE>
+<DD><A NAME="IDX367"></A>
+Search forward starting at the current line and moving `down' through
+the the history as necessary. This is an incremental search.
+<P>
+
+<A NAME="IDX368"></A>
+<DT><CODE>non-incremental-reverse-search-history (M-p)</CODE>
+<DD><A NAME="IDX369"></A>
+Search backward starting at the current line and moving `up'
+through the history as necessary using a non-incremental search
+for a string supplied by the user.
+<P>
+
+<A NAME="IDX370"></A>
+<DT><CODE>non-incremental-forward-search-history (M-n)</CODE>
+<DD><A NAME="IDX371"></A>
+Search forward starting at the current line and moving `down'
+through the the history as necessary using a non-incremental search
+for a string supplied by the user.
+<P>
+
+<A NAME="IDX372"></A>
+<DT><CODE>history-search-forward ()</CODE>
+<DD><A NAME="IDX373"></A>
+Search forward through the history for the string of characters
+between the start of the current line and the point.
+This is a non-incremental search.
+By default, this command is unbound.
+<P>
+
+<A NAME="IDX374"></A>
+<DT><CODE>history-search-backward ()</CODE>
+<DD><A NAME="IDX375"></A>
+Search backward through the history for the string of characters
+between the start of the current line and the point. This
+is a non-incremental search. By default, this command is unbound.
+<P>
+
+<A NAME="IDX376"></A>
+<DT><CODE>yank-nth-arg (M-C-y)</CODE>
+<DD><A NAME="IDX377"></A>
+Insert the first argument to the previous command (usually
+the second word on the previous line) at point.
+With an argument <VAR>n</VAR>,
+insert the <VAR>n</VAR>th word from the previous command (the words
+in the previous command begin with word 0). A negative argument
+inserts the <VAR>n</VAR>th word from the end of the previous command.
+Once the argument <VAR>n</VAR> is computed, the argument is extracted
+as if the <SAMP>`!<VAR>n</VAR>'</SAMP> history expansion had been specified.
+<P>
+
+<A NAME="IDX378"></A>
+<DT><CODE>yank-last-arg (M-. or M-_)</CODE>
+<DD><A NAME="IDX379"></A>
+Insert last argument to the previous command (the last word of the
+previous history entry). With an
+argument, behave exactly like <CODE>yank-nth-arg</CODE>.
+Successive calls to <CODE>yank-last-arg</CODE> move back through the history
+list, inserting the last argument of each line in turn.
+The history expansion facilities are used to extract the last argument,
+as if the <SAMP>`!$'</SAMP> history expansion had been specified.
+<P>
+
+</DL>
+<P>
+
+<A NAME="Commands For Text"></A>
+<HR SIZE="6">
+<A NAME="SEC110"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC109"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC111"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC111"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC116"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 8.4.3 Commands For Changing Text </H3>
+<!--docid::SEC110::-->
+<P>
+
+<DL COMPACT>
+<A NAME="IDX380"></A>
+<DT><CODE>delete-char (C-d)</CODE>
+<DD><A NAME="IDX381"></A>
+Delete the character at point. If point is at the
+beginning of the line, there are no characters in the line, and
+the last character typed was not bound to <CODE>delete-char</CODE>, then
+return EOF.
+<P>
+
+<A NAME="IDX382"></A>
+<DT><CODE>backward-delete-char (Rubout)</CODE>
+<DD><A NAME="IDX383"></A>
+Delete the character behind the cursor. A numeric argument means
+to kill the characters instead of deleting them.
+<P>
+
+<A NAME="IDX384"></A>
+<DT><CODE>forward-backward-delete-char ()</CODE>
+<DD><A NAME="IDX385"></A>
+Delete the character under the cursor, unless the cursor is at the
+end of the line, in which case the character behind the cursor is
+deleted. By default, this is not bound to a key.
+<P>
+
+<A NAME="IDX386"></A>
+<DT><CODE>quoted-insert (C-q or C-v)</CODE>
+<DD><A NAME="IDX387"></A>
+Add the next character typed to the line verbatim. This is
+how to insert key sequences like <KBD>C-q</KBD>, for example.
+<P>
+
+<A NAME="IDX388"></A>
+<DT><CODE>self-insert (a, b, A, 1, !, <small>...</small>)</CODE>
+<DD><A NAME="IDX389"></A>
+Insert yourself.
+<P>
+
+<A NAME="IDX390"></A>
+<DT><CODE>transpose-chars (C-t)</CODE>
+<DD><A NAME="IDX391"></A>
+Drag the character before the cursor forward over
+the character at the cursor, moving the
+cursor forward as well. If the insertion point
+is at the end of the line, then this
+transposes the last two characters of the line.
+Negative arguments have no effect.
+<P>
+
+<A NAME="IDX392"></A>
+<DT><CODE>transpose-words (M-t)</CODE>
+<DD><A NAME="IDX393"></A>
+Drag the word before point past the word after point,
+moving point past that word as well.
+If the insertion point is at the end of the line, this transposes
+the last two words on the line.
+<P>
+
+<A NAME="IDX394"></A>
+<DT><CODE>upcase-word (M-u)</CODE>
+<DD><A NAME="IDX395"></A>
+Uppercase the current (or following) word. With a negative argument,
+uppercase the previous word, but do not move the cursor.
+<P>
+
+<A NAME="IDX396"></A>
+<DT><CODE>downcase-word (M-l)</CODE>
+<DD><A NAME="IDX397"></A>
+Lowercase the current (or following) word. With a negative argument,
+lowercase the previous word, but do not move the cursor.
+<P>
+
+<A NAME="IDX398"></A>
+<DT><CODE>capitalize-word (M-c)</CODE>
+<DD><A NAME="IDX399"></A>
+Capitalize the current (or following) word. With a negative argument,
+capitalize the previous word, but do not move the cursor.
+<P>
+
+<A NAME="IDX400"></A>
+<DT><CODE>overwrite-mode ()</CODE>
+<DD><A NAME="IDX401"></A>
+Toggle overwrite mode. With an explicit positive numeric argument,
+switches to overwrite mode. With an explicit non-positive numeric
+argument, switches to insert mode. This command affects only
+<CODE>emacs</CODE> mode; <CODE>vi</CODE> mode does overwrite differently.
+Each call to <CODE>readline()</CODE> starts in insert mode.
+<P>
+
+In overwrite mode, characters bound to <CODE>self-insert</CODE> replace
+the text at point rather than pushing the text to the right.
+Characters bound to <CODE>backward-delete-char</CODE> replace the character
+before point with a space.
+</P><P>
+
+By default, this command is unbound.
+</P><P>
+
+</DL>
+<P>
+
+<A NAME="Commands For Killing"></A>
+<HR SIZE="6">
+<A NAME="SEC111"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC110"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC116"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 8.4.4 Killing And Yanking </H3>
+<!--docid::SEC111::-->
+<P>
+
+<DL COMPACT>
+
+<A NAME="IDX402"></A>
+<DT><CODE>kill-line (C-k)</CODE>
+<DD><A NAME="IDX403"></A>
+Kill the text from point to the end of the line.
+<P>
+
+<A NAME="IDX404"></A>
+<DT><CODE>backward-kill-line (C-x Rubout)</CODE>
+<DD><A NAME="IDX405"></A>
+Kill backward to the beginning of the line.
+<P>
+
+<A NAME="IDX406"></A>
+<DT><CODE>unix-line-discard (C-u)</CODE>
+<DD><A NAME="IDX407"></A>
+Kill backward from the cursor to the beginning of the current line.
+<P>
+
+<A NAME="IDX408"></A>
+<DT><CODE>kill-whole-line ()</CODE>
+<DD><A NAME="IDX409"></A>
+Kill all characters on the current line, no matter where point is.
+By default, this is unbound.
+<P>
+
+<A NAME="IDX410"></A>
+<DT><CODE>kill-word (M-d)</CODE>
+<DD><A NAME="IDX411"></A>
+Kill from point to the end of the current word, or if between
+words, to the end of the next word.
+Word boundaries are the same as <CODE>forward-word</CODE>.
+<P>
+
+<A NAME="IDX412"></A>
+<DT><CODE>backward-kill-word (M-<KBD>DEL</KBD>)</CODE>
+<DD><A NAME="IDX413"></A>
+Kill the word behind point.
+Word boundaries are the same as <CODE>backward-word</CODE>.
+<P>
+
+<A NAME="IDX414"></A>
+<DT><CODE>shell-kill-word ()</CODE>
+<DD><A NAME="IDX415"></A>
+Kill from point to the end of the current word, or if between
+words, to the end of the next word.
+Word boundaries are the same as <CODE>shell-forward-word</CODE>.
+<P>
+
+<A NAME="IDX416"></A>
+<DT><CODE>backward-kill-word ()</CODE>
+<DD><A NAME="IDX417"></A>
+Kill the word behind point.
+Word boundaries are the same as <CODE>shell-backward-word</CODE>.
+<P>
+
+<A NAME="IDX418"></A>
+<DT><CODE>unix-word-rubout (C-w)</CODE>
+<DD><A NAME="IDX419"></A>
+Kill the word behind point, using white space as a word boundary.
+The killed text is saved on the kill-ring.
+<P>
+
+<A NAME="IDX420"></A>
+<DT><CODE>unix-filename-rubout ()</CODE>
+<DD><A NAME="IDX421"></A>
+Kill the word behind point, using white space and the slash character
+as the word boundaries.
+The killed text is saved on the kill-ring.
+<P>
+
+<A NAME="IDX422"></A>
+<DT><CODE>delete-horizontal-space ()</CODE>
+<DD><A NAME="IDX423"></A>
+Delete all spaces and tabs around point. By default, this is unbound.
+<P>
+
+<A NAME="IDX424"></A>
+<DT><CODE>kill-region ()</CODE>
+<DD><A NAME="IDX425"></A>
+Kill the text in the current region.
+By default, this command is unbound.
+<P>
+
+<A NAME="IDX426"></A>
+<DT><CODE>copy-region-as-kill ()</CODE>
+<DD><A NAME="IDX427"></A>
+Copy the text in the region to the kill buffer, so it can be yanked
+right away. By default, this command is unbound.
+<P>
+
+<A NAME="IDX428"></A>
+<DT><CODE>copy-backward-word ()</CODE>
+<DD><A NAME="IDX429"></A>
+Copy the word before point to the kill buffer.
+The word boundaries are the same as <CODE>backward-word</CODE>.
+By default, this command is unbound.
+<P>
+
+<A NAME="IDX430"></A>
+<DT><CODE>copy-forward-word ()</CODE>
+<DD><A NAME="IDX431"></A>
+Copy the word following point to the kill buffer.
+The word boundaries are the same as <CODE>forward-word</CODE>.
+By default, this command is unbound.
+<P>
+
+<A NAME="IDX432"></A>
+<DT><CODE>yank (C-y)</CODE>
+<DD><A NAME="IDX433"></A>
+Yank the top of the kill ring into the buffer at point.
+<P>
+
+<A NAME="IDX434"></A>
+<DT><CODE>yank-pop (M-y)</CODE>
+<DD><A NAME="IDX435"></A>
+Rotate the kill-ring, and yank the new top. You can only do this if
+the prior command is <CODE>yank</CODE> or <CODE>yank-pop</CODE>.
+</DL>
+<P>
+
+<A NAME="Numeric Arguments"></A>
+<HR SIZE="6">
+<A NAME="SEC112"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC111"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC113"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC113"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC116"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 8.4.5 Specifying Numeric Arguments </H3>
+<!--docid::SEC112::-->
+<DL COMPACT>
+
+<A NAME="IDX436"></A>
+<DT><CODE>digit-argument (<KBD>M-0</KBD>, <KBD>M-1</KBD>, <small>...</small> <KBD>M--</KBD>)</CODE>
+<DD><A NAME="IDX437"></A>
+Add this digit to the argument already accumulating, or start a new
+argument. <KBD>M--</KBD> starts a negative argument.
+<P>
+
+<A NAME="IDX438"></A>
+<DT><CODE>universal-argument ()</CODE>
+<DD><A NAME="IDX439"></A>
+This is another way to specify an argument.
+If this command is followed by one or more digits, optionally with a
+leading minus sign, those digits define the argument.
+If the command is followed by digits, executing <CODE>universal-argument</CODE>
+again ends the numeric argument, but is otherwise ignored.
+As a special case, if this command is immediately followed by a
+character that is neither a digit or minus sign, the argument count
+for the next command is multiplied by four.
+The argument count is initially one, so executing this function the
+first time makes the argument count four, a second time makes the
+argument count sixteen, and so on.
+By default, this is not bound to a key.
+</DL>
+<P>
+
+<A NAME="Commands For Completion"></A>
+<HR SIZE="6">
+<A NAME="SEC113"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC112"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC114"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC114"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC116"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 8.4.6 Letting Readline Type For You </H3>
+<!--docid::SEC113::-->
+<P>
+
+<DL COMPACT>
+<A NAME="IDX440"></A>
+<DT><CODE>complete (<KBD>TAB</KBD>)</CODE>
+<DD><A NAME="IDX441"></A>
+Attempt to perform completion on the text before point.
+The actual completion performed is application-specific.
+Bash attempts completion treating the text as a variable (if the
+text begins with <SAMP>`$'</SAMP>), username (if the text begins with
+<SAMP>`~'</SAMP>), hostname (if the text begins with <SAMP>`@'</SAMP>), or
+command (including aliases and functions) in turn. If none
+of these produces a match, filename completion is attempted.
+<P>
+
+<A NAME="IDX442"></A>
+<DT><CODE>possible-completions (M-?)</CODE>
+<DD><A NAME="IDX443"></A>
+List the possible completions of the text before point.
+<P>
+
+<A NAME="IDX444"></A>
+<DT><CODE>insert-completions (M-*)</CODE>
+<DD><A NAME="IDX445"></A>
+Insert all completions of the text before point that would have
+been generated by <CODE>possible-completions</CODE>.
+<P>
+
+<A NAME="IDX446"></A>
+<DT><CODE>menu-complete ()</CODE>
+<DD><A NAME="IDX447"></A>
+Similar to <CODE>complete</CODE>, but replaces the word to be completed
+with a single match from the list of possible completions.
+Repeated execution of <CODE>menu-complete</CODE> steps through the list
+of possible completions, inserting each match in turn.
+At the end of the list of completions, the bell is rung
+(subject to the setting of <CODE>bell-style</CODE>)
+and the original text is restored.
+An argument of <VAR>n</VAR> moves <VAR>n</VAR> positions forward in the list
+of matches; a negative argument may be used to move backward
+through the list.
+This command is intended to be bound to <KBD>TAB</KBD>, but is unbound
+by default.
+<P>
+
+<A NAME="IDX448"></A>
+<DT><CODE>menu-complete-backward ()</CODE>
+<DD><A NAME="IDX449"></A>
+Identical to <CODE>menu-complete</CODE>, but moves backward through the list
+of possible completions, as if <CODE>menu-complete</CODE> had been given a
+negative argument.
+<P>
+
+<A NAME="IDX450"></A>
+<DT><CODE>delete-char-or-list ()</CODE>
+<DD><A NAME="IDX451"></A>
+Deletes the character under the cursor if not at the beginning or
+end of the line (like <CODE>delete-char</CODE>).
+If at the end of the line, behaves identically to
+<CODE>possible-completions</CODE>.
+This command is unbound by default.
+<P>
+
+<A NAME="IDX452"></A>
+<DT><CODE>complete-filename (M-/)</CODE>
+<DD><A NAME="IDX453"></A>
+Attempt filename completion on the text before point.
+<P>
+
+<A NAME="IDX454"></A>
+<DT><CODE>possible-filename-completions (C-x /)</CODE>
+<DD><A NAME="IDX455"></A>
+List the possible completions of the text before point,
+treating it as a filename.
+<P>
+
+<A NAME="IDX456"></A>
+<DT><CODE>complete-username (M-~)</CODE>
+<DD><A NAME="IDX457"></A>
+Attempt completion on the text before point, treating
+it as a username.
+<P>
+
+<A NAME="IDX458"></A>
+<DT><CODE>possible-username-completions (C-x ~)</CODE>
+<DD><A NAME="IDX459"></A>
+List the possible completions of the text before point,
+treating it as a username.
+<P>
+
+<A NAME="IDX460"></A>
+<DT><CODE>complete-variable (M-$)</CODE>
+<DD><A NAME="IDX461"></A>
+Attempt completion on the text before point, treating
+it as a shell variable.
+<P>
+
+<A NAME="IDX462"></A>
+<DT><CODE>possible-variable-completions (C-x $)</CODE>
+<DD><A NAME="IDX463"></A>
+List the possible completions of the text before point,
+treating it as a shell variable.
+<P>
+
+<A NAME="IDX464"></A>
+<DT><CODE>complete-hostname (M-@)</CODE>
+<DD><A NAME="IDX465"></A>
+Attempt completion on the text before point, treating
+it as a hostname.
+<P>
+
+<A NAME="IDX466"></A>
+<DT><CODE>possible-hostname-completions (C-x @)</CODE>
+<DD><A NAME="IDX467"></A>
+List the possible completions of the text before point,
+treating it as a hostname.
+<P>
+
+<A NAME="IDX468"></A>
+<DT><CODE>complete-command (M-!)</CODE>
+<DD><A NAME="IDX469"></A>
+Attempt completion on the text before point, treating
+it as a command name. Command completion attempts to
+match the text against aliases, reserved words, shell
+functions, shell builtins, and finally executable filenames,
+in that order.
+<P>
+
+<A NAME="IDX470"></A>
+<DT><CODE>possible-command-completions (C-x !)</CODE>
+<DD><A NAME="IDX471"></A>
+List the possible completions of the text before point,
+treating it as a command name.
+<P>
+
+<A NAME="IDX472"></A>
+<DT><CODE>dynamic-complete-history (M-<KBD>TAB</KBD>)</CODE>
+<DD><A NAME="IDX473"></A>
+Attempt completion on the text before point, comparing
+the text against lines from the history list for possible
+completion matches.
+<P>
+
+<A NAME="IDX474"></A>
+<DT><CODE>dabbrev-expand ()</CODE>
+<DD><A NAME="IDX475"></A>
+Attempt menu completion on the text before point, comparing
+the text against lines from the history list for possible
+completion matches.
+<P>
+
+<A NAME="IDX476"></A>
+<DT><CODE>complete-into-braces (M-{)</CODE>
+<DD><A NAME="IDX477"></A>
+Perform filename completion and insert the list of possible completions
+enclosed within braces so the list is available to the shell
+(see section <A HREF="bashref.html#SEC29">3.5.1 Brace Expansion</A>).
+<P>
+
+</DL>
+<P>
+
+<A NAME="Keyboard Macros"></A>
+<HR SIZE="6">
+<A NAME="SEC114"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC113"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC115"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC115"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC116"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 8.4.7 Keyboard Macros </H3>
+<!--docid::SEC114::-->
+<DL COMPACT>
+
+<A NAME="IDX478"></A>
+<DT><CODE>start-kbd-macro (C-x ()</CODE>
+<DD><A NAME="IDX479"></A>
+Begin saving the characters typed into the current keyboard macro.
+<P>
+
+<A NAME="IDX480"></A>
+<DT><CODE>end-kbd-macro (C-x ))</CODE>
+<DD><A NAME="IDX481"></A>
+Stop saving the characters typed into the current keyboard macro
+and save the definition.
+<P>
+
+<A NAME="IDX482"></A>
+<DT><CODE>call-last-kbd-macro (C-x e)</CODE>
+<DD><A NAME="IDX483"></A>
+Re-execute the last keyboard macro defined, by making the characters
+in the macro appear as if typed at the keyboard.
+<P>
+
+</DL>
+<P>
+
+<A NAME="Miscellaneous Commands"></A>
+<HR SIZE="6">
+<A NAME="SEC115"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC114"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC116"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC116"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC107"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC116"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 8.4.8 Some Miscellaneous Commands </H3>
+<!--docid::SEC115::-->
+<DL COMPACT>
+
+<A NAME="IDX484"></A>
+<DT><CODE>re-read-init-file (C-x C-r)</CODE>
+<DD><A NAME="IDX485"></A>
+Read in the contents of the <VAR>inputrc</VAR> file, and incorporate
+any bindings or variable assignments found there.
+<P>
+
+<A NAME="IDX486"></A>
+<DT><CODE>abort (C-g)</CODE>
+<DD><A NAME="IDX487"></A>
+Abort the current editing command and
+ring the terminal's bell (subject to the setting of
+<CODE>bell-style</CODE>).
+<P>
+
+<A NAME="IDX488"></A>
+<DT><CODE>do-uppercase-version (M-a, M-b, M-<VAR>x</VAR>, <small>...</small>)</CODE>
+<DD><A NAME="IDX489"></A>
+If the metafied character <VAR>x</VAR> is lowercase, run the command
+that is bound to the corresponding uppercase character.
+<P>
+
+<A NAME="IDX490"></A>
+<DT><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE>
+<DD><A NAME="IDX491"></A>
+Metafy the next character typed. This is for keyboards
+without a meta key. Typing <SAMP>`<KBD>ESC</KBD> f'</SAMP> is equivalent to typing
+<KBD>M-f</KBD>.
+<P>
+
+<A NAME="IDX492"></A>
+<DT><CODE>undo (C-_ or C-x C-u)</CODE>
+<DD><A NAME="IDX493"></A>
+Incremental undo, separately remembered for each line.
+<P>
+
+<A NAME="IDX494"></A>
+<DT><CODE>revert-line (M-r)</CODE>
+<DD><A NAME="IDX495"></A>
+Undo all changes made to this line. This is like executing the <CODE>undo</CODE>
+command enough times to get back to the beginning.
+<P>
+
+<A NAME="IDX496"></A>
+<DT><CODE>tilde-expand (M-&#38;)</CODE>
+<DD><A NAME="IDX497"></A>
+Perform tilde expansion on the current word.
+<P>
+
+<A NAME="IDX498"></A>
+<DT><CODE>set-mark (C-@)</CODE>
+<DD><A NAME="IDX499"></A>
+Set the mark to the point. If a
+numeric argument is supplied, the mark is set to that position.
+<P>
+
+<A NAME="IDX500"></A>
+<DT><CODE>exchange-point-and-mark (C-x C-x)</CODE>
+<DD><A NAME="IDX501"></A>
+Swap the point with the mark. The current cursor position is set to
+the saved position, and the old cursor position is saved as the mark.
+<P>
+
+<A NAME="IDX502"></A>
+<DT><CODE>character-search (C-])</CODE>
+<DD><A NAME="IDX503"></A>
+A character is read and point is moved to the next occurrence of that
+character. A negative count searches for previous occurrences.
+<P>
+
+<A NAME="IDX504"></A>
+<DT><CODE>character-search-backward (M-C-])</CODE>
+<DD><A NAME="IDX505"></A>
+A character is read and point is moved to the previous occurrence
+of that character. A negative count searches for subsequent
+occurrences.
+<P>
+
+<A NAME="IDX506"></A>
+<DT><CODE>skip-csi-sequence ()</CODE>
+<DD><A NAME="IDX507"></A>
+Read enough characters to consume a multi-key sequence such as those
+defined for keys like Home and End. Such sequences begin with a
+Control Sequence Indicator (CSI), usually ESC-[. If this sequence is
+bound to "\e[", keys producing such sequences will have no effect
+unless explicitly bound to a readline command, instead of inserting
+stray characters into the editing buffer. This is unbound by default,
+but usually bound to ESC-[.
+<P>
+
+<A NAME="IDX508"></A>
+<DT><CODE>insert-comment (M-#)</CODE>
+<DD><A NAME="IDX509"></A>
+Without a numeric argument, the value of the <CODE>comment-begin</CODE>
+variable is inserted at the beginning of the current line.
+If a numeric argument is supplied, this command acts as a toggle: if
+the characters at the beginning of the line do not match the value
+of <CODE>comment-begin</CODE>, the value is inserted, otherwise
+the characters in <CODE>comment-begin</CODE> are deleted from the beginning of
+the line.
+In either case, the line is accepted as if a newline had been typed.
+The default value of <CODE>comment-begin</CODE> causes this command
+to make the current line a shell comment.
+If a numeric argument causes the comment character to be removed, the line
+will be executed by the shell.
+<P>
+
+<A NAME="IDX510"></A>
+<DT><CODE>dump-functions ()</CODE>
+<DD><A NAME="IDX511"></A>
+Print all of the functions and their key bindings to the
+Readline output stream. If a numeric argument is supplied,
+the output is formatted in such a way that it can be made part
+of an <VAR>inputrc</VAR> file. This command is unbound by default.
+<P>
+
+<A NAME="IDX512"></A>
+<DT><CODE>dump-variables ()</CODE>
+<DD><A NAME="IDX513"></A>
+Print all of the settable variables and their values to the
+Readline output stream. If a numeric argument is supplied,
+the output is formatted in such a way that it can be made part
+of an <VAR>inputrc</VAR> file. This command is unbound by default.
+<P>
+
+<A NAME="IDX514"></A>
+<DT><CODE>dump-macros ()</CODE>
+<DD><A NAME="IDX515"></A>
+Print all of the Readline key sequences bound to macros and the
+strings they output. If a numeric argument is supplied,
+the output is formatted in such a way that it can be made part
+of an <VAR>inputrc</VAR> file. This command is unbound by default.
+<P>
+
+<A NAME="IDX516"></A>
+<DT><CODE>glob-complete-word (M-g)</CODE>
+<DD><A NAME="IDX517"></A>
+The word before point is treated as a pattern for pathname expansion,
+with an asterisk implicitly appended. This pattern is used to
+generate a list of matching file names for possible completions.
+<P>
+
+<A NAME="IDX518"></A>
+<DT><CODE>glob-expand-word (C-x *)</CODE>
+<DD><A NAME="IDX519"></A>
+The word before point is treated as a pattern for pathname expansion,
+and the list of matching file names is inserted, replacing the word.
+If a numeric argument is supplied, a <SAMP>`*'</SAMP> is appended before
+pathname expansion.
+<P>
+
+<A NAME="IDX520"></A>
+<DT><CODE>glob-list-expansions (C-x g)</CODE>
+<DD><A NAME="IDX521"></A>
+The list of expansions that would have been generated by
+<CODE>glob-expand-word</CODE> is displayed, and the line is redrawn.
+If a numeric argument is supplied, a <SAMP>`*'</SAMP> is appended before
+pathname expansion.
+<P>
+
+<A NAME="IDX522"></A>
+<DT><CODE>display-shell-version (C-x C-v)</CODE>
+<DD><A NAME="IDX523"></A>
+Display version information about the current instance of Bash.
+<P>
+
+<A NAME="IDX524"></A>
+<DT><CODE>shell-expand-line (M-C-e)</CODE>
+<DD><A NAME="IDX525"></A>
+Expand the line as the shell does.
+This performs alias and history expansion as well as all of the shell
+word expansions (see section <A HREF="bashref.html#SEC28">3.5 Shell Expansions</A>).
+<P>
+
+<A NAME="IDX526"></A>
+<DT><CODE>history-expand-line (M-^)</CODE>
+<DD><A NAME="IDX527"></A>
+Perform history expansion on the current line.
+<P>
+
+<A NAME="IDX528"></A>
+<DT><CODE>magic-space ()</CODE>
+<DD><A NAME="IDX529"></A>
+Perform history expansion on the current line and insert a space
+(see section <A HREF="bashref.html#SEC122">9.3 History Expansion</A>).
+<P>
+
+<A NAME="IDX530"></A>
+<DT><CODE>alias-expand-line ()</CODE>
+<DD><A NAME="IDX531"></A>
+Perform alias expansion on the current line (see section <A HREF="bashref.html#SEC84">6.6 Aliases</A>).
+<P>
+
+<A NAME="IDX532"></A>
+<DT><CODE>history-and-alias-expand-line ()</CODE>
+<DD><A NAME="IDX533"></A>
+Perform history and alias expansion on the current line.
+<P>
+
+<A NAME="IDX534"></A>
+<DT><CODE>insert-last-argument (M-. or M-_)</CODE>
+<DD><A NAME="IDX535"></A>
+A synonym for <CODE>yank-last-arg</CODE>.
+<P>
+
+<A NAME="IDX536"></A>
+<DT><CODE>operate-and-get-next (C-o)</CODE>
+<DD><A NAME="IDX537"></A>
+Accept the current line for execution and fetch the next line
+relative to the current line from the history for editing. Any
+argument is ignored.
+<P>
+
+<A NAME="IDX538"></A>
+<DT><CODE>edit-and-execute-command (C-xC-e)</CODE>
+<DD><A NAME="IDX539"></A>
+Invoke an editor on the current command line, and execute the result as shell
+commands.
+Bash attempts to invoke
+<CODE>$VISUAL</CODE>, <CODE>$EDITOR</CODE>, and <CODE>emacs</CODE>
+as the editor, in that order.
+<P>
+
+</DL>
+<P>
+
+<A NAME="Readline vi Mode"></A>
+<HR SIZE="6">
+<A NAME="SEC116"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC115"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC117"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC117"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC119"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 8.5 Readline vi Mode </H2>
+<!--docid::SEC116::-->
+<P>
+
+While the Readline library does not have a full set of <CODE>vi</CODE>
+editing functions, it does contain enough to allow simple editing
+of the line. The Readline <CODE>vi</CODE> mode behaves as specified in
+the POSIX 1003.2 standard.
+</P><P>
+
+In order to switch interactively between <CODE>emacs</CODE> and <CODE>vi</CODE>
+editing modes, use the <SAMP>`set -o emacs'</SAMP> and <SAMP>`set -o vi'</SAMP>
+commands (see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>).
+The Readline default is <CODE>emacs</CODE> mode.
+</P><P>
+
+When you enter a line in <CODE>vi</CODE> mode, you are already placed in
+`insertion' mode, as if you had typed an <SAMP>`i'</SAMP>. Pressing <KBD>ESC</KBD>
+switches you into `command' mode, where you can edit the text of the
+line with the standard <CODE>vi</CODE> movement keys, move to previous
+history lines with <SAMP>`k'</SAMP> and subsequent lines with <SAMP>`j'</SAMP>, and
+so forth.
+</P><P>
+
+<A NAME="Programmable Completion"></A>
+<HR SIZE="6">
+<A NAME="SEC117"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC116"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC118"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC118"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC119"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 8.6 Programmable Completion </H2>
+<!--docid::SEC117::-->
+<P>
+
+When word completion is attempted for an argument to a command for
+which a completion specification (a <VAR>compspec</VAR>) has been defined
+using the <CODE>complete</CODE> builtin (see section <A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A>),
+the programmable completion facilities are invoked.
+</P><P>
+
+First, the command name is identified.
+If a compspec has been defined for that command, the
+compspec is used to generate the list of possible completions for the word.
+If the command word is the empty string (completion attempted at the
+beginning of an empty line), any compspec defined with
+the <SAMP>`-E'</SAMP> option to <CODE>complete</CODE> is used.
+If the command word is a full pathname, a compspec for the full
+pathname is searched for first.
+If no compspec is found for the full pathname, an attempt is made to
+find a compspec for the portion following the final slash.
+If those searches do not result in a compspec, any compspec defined with
+the <SAMP>`-D'</SAMP> option to <CODE>complete</CODE> is used as the default.
+</P><P>
+
+Once a compspec has been found, it is used to generate the list of
+matching words.
+If a compspec is not found, the default Bash completion
+described above (see section <A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A>) is performed.
+</P><P>
+
+First, the actions specified by the compspec are used.
+Only matches which are prefixed by the word being completed are
+returned.
+When the <SAMP>`-f'</SAMP> or <SAMP>`-d'</SAMP> option is used for filename or
+directory name completion, the shell variable <CODE>FIGNORE</CODE> is
+used to filter the matches.
+See section <A HREF="bashref.html#SEC67">5.2 Bash Variables</A>, for a description of <CODE>FIGNORE</CODE>.
+</P><P>
+
+Any completions specified by a filename expansion pattern to the
+<SAMP>`-G'</SAMP> option are generated next.
+The words generated by the pattern need not match the word being completed.
+The <CODE>GLOBIGNORE</CODE> shell variable is not used to filter the matches,
+but the <CODE>FIGNORE</CODE> shell variable is used.
+</P><P>
+
+Next, the string specified as the argument to the <SAMP>`-W'</SAMP> option
+is considered.
+The string is first split using the characters in the <CODE>IFS</CODE>
+special variable as delimiters.
+Shell quoting is honored.
+Each word is then expanded using
+brace expansion, tilde expansion, parameter and variable expansion,
+command substitution, and arithmetic expansion,
+as described above (see section <A HREF="bashref.html#SEC28">3.5 Shell Expansions</A>).
+The results are split using the rules described above
+(see section <A HREF="bashref.html#SEC35">3.5.7 Word Splitting</A>).
+The results of the expansion are prefix-matched against the word being
+completed, and the matching words become the possible completions.
+</P><P>
+
+After these matches have been generated, any shell function or command
+specified with the <SAMP>`-F'</SAMP> and <SAMP>`-C'</SAMP> options is invoked.
+When the command or function is invoked, the <CODE>COMP_LINE</CODE>,
+<CODE>COMP_POINT</CODE>, <CODE>COMP_KEY</CODE>, and <CODE>COMP_TYPE</CODE> variables are
+assigned values as described above (see section <A HREF="bashref.html#SEC67">5.2 Bash Variables</A>).
+If a shell function is being invoked, the <CODE>COMP_WORDS</CODE> and
+<CODE>COMP_CWORD</CODE> variables are also set.
+When the function or command is invoked, the first argument is the
+name of the command whose arguments are being completed, the
+second argument is the word being completed, and the third argument
+is the word preceding the word being completed on the current command line.
+No filtering of the generated completions against the word being completed
+is performed; the function or command has complete freedom in generating
+the matches.
+</P><P>
+
+Any function specified with <SAMP>`-F'</SAMP> is invoked first.
+The function may use any of the shell facilities, including the
+<CODE>compgen</CODE> and <CODE>compopt</CODE> builtins described below
+(see section <A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A>), to generate the matches.
+It must put the possible completions in the <CODE>COMPREPLY</CODE> array
+variable.
+</P><P>
+
+Next, any command specified with the <SAMP>`-C'</SAMP> option is invoked
+in an environment equivalent to command substitution.
+It should print a list of completions, one per line, to
+the standard output.
+Backslash may be used to escape a newline, if necessary.
+</P><P>
+
+After all of the possible completions are generated, any filter
+specified with the <SAMP>`-X'</SAMP> option is applied to the list.
+The filter is a pattern as used for pathname expansion; a <SAMP>`&#38;'</SAMP>
+in the pattern is replaced with the text of the word being completed.
+A literal <SAMP>`&#38;'</SAMP> may be escaped with a backslash; the backslash
+is removed before attempting a match.
+Any completion that matches the pattern will be removed from the list.
+A leading <SAMP>`!'</SAMP> negates the pattern; in this case any completion
+not matching the pattern will be removed.
+</P><P>
+
+Finally, any prefix and suffix specified with the <SAMP>`-P'</SAMP> and <SAMP>`-S'</SAMP>
+options are added to each member of the completion list, and the result is
+returned to the Readline completion code as the list of possible
+completions.
+</P><P>
+
+If the previously-applied actions do not generate any matches, and the
+<SAMP>`-o dirnames'</SAMP> option was supplied to <CODE>complete</CODE> when the
+compspec was defined, directory name completion is attempted.
+</P><P>
+
+If the <SAMP>`-o plusdirs'</SAMP> option was supplied to <CODE>complete</CODE> when
+the compspec was defined, directory name completion is attempted and any
+matches are added to the results of the other actions.
+</P><P>
+
+By default, if a compspec is found, whatever it generates is returned to
+the completion code as the full set of possible completions.
+The default Bash completions are not attempted, and the Readline default
+of filename completion is disabled.
+If the <SAMP>`-o bashdefault'</SAMP> option was supplied to <CODE>complete</CODE> when
+the compspec was defined, the default Bash completions are attempted
+if the compspec generates no matches.
+If the <SAMP>`-o default'</SAMP> option was supplied to <CODE>complete</CODE> when the
+compspec was defined, Readline's default completion will be performed
+if the compspec (and, if attempted, the default Bash completions)
+generate no matches.
+</P><P>
+
+When a compspec indicates that directory name completion is desired,
+the programmable completion functions force Readline to append a slash
+to completed names which are symbolic links to directories, subject to
+the value of the <VAR>mark-directories</VAR> Readline variable, regardless
+of the setting of the <VAR>mark-symlinked-directories</VAR> Readline variable.
+</P><P>
+
+There is some support for dynamically modifying completions. This is
+most useful when used in combination with a default completion specified
+with <SAMP>`-D'</SAMP>. It's possible for shell functions executed as completion
+handlers to indicate that completion should be retried by returning an
+exit status of 124. If a shell function returns 124, and changes
+the compspec associated with the command on which completion is being
+attempted (supplied as the first argument when the function is executed),
+programmable completion restarts from the beginning, with an
+attempt to find a compspec for that command. This allows a set of
+completions to be built dynamically as completion is attempted, rather than
+being loaded all at once.
+</P><P>
+
+For instance, assuming that there is a library of compspecs, each kept in a
+file corresponding to the name of the command, the following default
+completion function would load completions dynamically:
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>_completion_loader()
+{
+ . "/etc/bash_completion.d/$1.sh" &#62;/dev/null 2&#62;&#38;1 &#38;&#38; return 124
+}
+complete -D -F _completion_loader
+</pre></td></tr></table></P><P>
+
+<A NAME="Programmable Completion Builtins"></A>
+<HR SIZE="6">
+<A NAME="SEC118"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC117"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC119"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC95"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC119"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 8.7 Programmable Completion Builtins </H2>
+<!--docid::SEC118::-->
+<P>
+
+Two builtin commands are available to manipulate the programmable completion
+facilities.
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>compgen</CODE>
+<DD><A NAME="IDX540"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>compgen [<VAR>option</VAR>] [<VAR>word</VAR>]</CODE>
+</pre></td></tr></table><P>
+
+Generate possible completion matches for <VAR>word</VAR> according to
+the <VAR>option</VAR>s, which may be any option accepted by the
+<CODE>complete</CODE>
+builtin with the exception of <SAMP>`-p'</SAMP> and <SAMP>`-r'</SAMP>, and write
+the matches to the standard output.
+When using the <SAMP>`-F'</SAMP> or <SAMP>`-C'</SAMP> options, the various shell variables
+set by the programmable completion facilities, while available, will not
+have useful values.
+</P><P>
+
+The matches will be generated in the same way as if the programmable
+completion code had generated them directly from a completion specification
+with the same flags.
+If <VAR>word</VAR> is specified, only those completions matching <VAR>word</VAR>
+will be displayed.
+</P><P>
+
+The return value is true unless an invalid option is supplied, or no
+matches were generated.
+</P><P>
+
+<DT><CODE>complete</CODE>
+<DD><A NAME="IDX541"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>complete [-abcdefgjksuv] [-o <VAR>comp-option</VAR>] [-DE] [-A <VAR>action</VAR>] [-G <VAR>globpat</VAR>] [-W <VAR>wordlist</VAR>]
+[-F <VAR>function</VAR>] [-C <VAR>command</VAR>] [-X <VAR>filterpat</VAR>]
+[-P <VAR>prefix</VAR>] [-S <VAR>suffix</VAR>] <VAR>name</VAR> [<VAR>name</VAR> <small>...</small>]</CODE>
+<CODE>complete -pr [-DE] [<VAR>name</VAR> <small>...</small>]</CODE>
+</pre></td></tr></table><P>
+
+Specify how arguments to each <VAR>name</VAR> should be completed.
+If the <SAMP>`-p'</SAMP> option is supplied, or if no options are supplied, existing
+completion specifications are printed in a way that allows them to be
+reused as input.
+The <SAMP>`-r'</SAMP> option removes a completion specification for
+each <VAR>name</VAR>, or, if no <VAR>name</VAR>s are supplied, all
+completion specifications.
+The <SAMP>`-D'</SAMP> option indicates that the remaining options and actions should
+apply to the "default" command completion; that is, completion attempted
+on a command for which no completion has previously been defined.
+The <SAMP>`-E'</SAMP> option indicates that the remaining options and actions should
+apply to "empty" command completion; that is, completion attempted on a
+blank line.
+</P><P>
+
+The process of applying these completion specifications when word completion
+is attempted is described above (see section <A HREF="bashref.html#SEC117">8.6 Programmable Completion</A>). The
+<SAMP>`-D'</SAMP> option takes precedence over <SAMP>`-E'</SAMP>.
+</P><P>
+
+Other options, if specified, have the following meanings.
+The arguments to the <SAMP>`-G'</SAMP>, <SAMP>`-W'</SAMP>, and <SAMP>`-X'</SAMP> options
+(and, if necessary, the <SAMP>`-P'</SAMP> and <SAMP>`-S'</SAMP> options)
+should be quoted to protect them from expansion before the
+<CODE>complete</CODE> builtin is invoked.
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>-o <VAR>comp-option</VAR></CODE>
+<DD>The <VAR>comp-option</VAR> controls several aspects of the compspec's behavior
+beyond the simple generation of completions.
+<VAR>comp-option</VAR> may be one of:
+<P>
+
+<DL COMPACT>
+
+<DT><CODE>bashdefault</CODE>
+<DD>Perform the rest of the default Bash completions if the compspec
+generates no matches.
+<P>
+
+<DT><CODE>default</CODE>
+<DD>Use Readline's default filename completion if the compspec generates
+no matches.
+<P>
+
+<DT><CODE>dirnames</CODE>
+<DD>Perform directory name completion if the compspec generates no matches.
+<P>
+
+<DT><CODE>filenames</CODE>
+<DD>Tell Readline that the compspec generates filenames, so it can perform any
+filename-specific processing (like adding a slash to directory names
+quoting special characters, or suppressing trailing spaces).
+This option is intended to be used with shell functions specified
+with <SAMP>`-F'</SAMP>.
+<P>
+
+<DT><CODE>nospace</CODE>
+<DD>Tell Readline not to append a space (the default) to words completed at
+the end of the line.
+<P>
+
+<DT><CODE>plusdirs</CODE>
+<DD>After any matches defined by the compspec are generated,
+directory name completion is attempted and any
+matches are added to the results of the other actions.
+<P>
+
+</DL>
+<P>
+
+<DT><CODE>-A <VAR>action</VAR></CODE>
+<DD>The <VAR>action</VAR> may be one of the following to generate a list of possible
+completions:
+<P>
+
+<DL COMPACT>
+<DT><CODE>alias</CODE>
+<DD>Alias names. May also be specified as <SAMP>`-a'</SAMP>.
+<P>
+
+<DT><CODE>arrayvar</CODE>
+<DD>Array variable names.
+<P>
+
+<DT><CODE>binding</CODE>
+<DD>Readline key binding names (see section <A HREF="bashref.html#SEC107">8.4 Bindable Readline Commands</A>).
+<P>
+
+<DT><CODE>builtin</CODE>
+<DD>Names of shell builtin commands. May also be specified as <SAMP>`-b'</SAMP>.
+<P>
+
+<DT><CODE>command</CODE>
+<DD>Command names. May also be specified as <SAMP>`-c'</SAMP>.
+<P>
+
+<DT><CODE>directory</CODE>
+<DD>Directory names. May also be specified as <SAMP>`-d'</SAMP>.
+<P>
+
+<DT><CODE>disabled</CODE>
+<DD>Names of disabled shell builtins.
+<P>
+
+<DT><CODE>enabled</CODE>
+<DD>Names of enabled shell builtins.
+<P>
+
+<DT><CODE>export</CODE>
+<DD>Names of exported shell variables. May also be specified as <SAMP>`-e'</SAMP>.
+<P>
+
+<DT><CODE>file</CODE>
+<DD>File names. May also be specified as <SAMP>`-f'</SAMP>.
+<P>
+
+<DT><CODE>function</CODE>
+<DD>Names of shell functions.
+<P>
+
+<DT><CODE>group</CODE>
+<DD>Group names. May also be specified as <SAMP>`-g'</SAMP>.
+<P>
+
+<DT><CODE>helptopic</CODE>
+<DD>Help topics as accepted by the <CODE>help</CODE> builtin (see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>).
+<P>
+
+<DT><CODE>hostname</CODE>
+<DD>Hostnames, as taken from the file specified by the
+<CODE>HOSTFILE</CODE> shell variable (see section <A HREF="bashref.html#SEC67">5.2 Bash Variables</A>).
+<P>
+
+<DT><CODE>job</CODE>
+<DD>Job names, if job control is active. May also be specified as <SAMP>`-j'</SAMP>.
+<P>
+
+<DT><CODE>keyword</CODE>
+<DD>Shell reserved words. May also be specified as <SAMP>`-k'</SAMP>.
+<P>
+
+<DT><CODE>running</CODE>
+<DD>Names of running jobs, if job control is active.
+<P>
+
+<DT><CODE>service</CODE>
+<DD>Service names. May also be specified as <SAMP>`-s'</SAMP>.
+<P>
+
+<DT><CODE>setopt</CODE>
+<DD>Valid arguments for the <SAMP>`-o'</SAMP> option to the <CODE>set</CODE> builtin
+(see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>).
+<P>
+
+<DT><CODE>shopt</CODE>
+<DD>Shell option names as accepted by the <CODE>shopt</CODE> builtin
+(see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>).
+<P>
+
+<DT><CODE>signal</CODE>
+<DD>Signal names.
+<P>
+
+<DT><CODE>stopped</CODE>
+<DD>Names of stopped jobs, if job control is active.
+<P>
+
+<DT><CODE>user</CODE>
+<DD>User names. May also be specified as <SAMP>`-u'</SAMP>.
+<P>
+
+<DT><CODE>variable</CODE>
+<DD>Names of all shell variables. May also be specified as <SAMP>`-v'</SAMP>.
+</DL>
+<P>
+
+<DT><CODE>-G <VAR>globpat</VAR></CODE>
+<DD>The filename expansion pattern <VAR>globpat</VAR> is expanded to generate
+the possible completions.
+<P>
+
+<DT><CODE>-W <VAR>wordlist</VAR></CODE>
+<DD>The <VAR>wordlist</VAR> is split using the characters in the
+<CODE>IFS</CODE> special variable as delimiters, and each resultant word
+is expanded.
+The possible completions are the members of the resultant list which
+match the word being completed.
+<P>
+
+<DT><CODE>-C <VAR>command</VAR></CODE>
+<DD><VAR>command</VAR> is executed in a subshell environment, and its output is
+used as the possible completions.
+<P>
+
+<DT><CODE>-F <VAR>function</VAR></CODE>
+<DD>The shell function <VAR>function</VAR> is executed in the current shell
+environment.
+When it finishes, the possible completions are retrieved from the value
+of the <CODE>COMPREPLY</CODE> array variable.
+<P>
+
+<DT><CODE>-X <VAR>filterpat</VAR></CODE>
+<DD><VAR>filterpat</VAR> is a pattern as used for filename expansion.
+It is applied to the list of possible completions generated by the
+preceding options and arguments, and each completion matching
+<VAR>filterpat</VAR> is removed from the list.
+A leading <SAMP>`!'</SAMP> in <VAR>filterpat</VAR> negates the pattern; in this
+case, any completion not matching <VAR>filterpat</VAR> is removed.
+<P>
+
+<DT><CODE>-P <VAR>prefix</VAR></CODE>
+<DD><VAR>prefix</VAR> is added at the beginning of each possible completion
+after all other options have been applied.
+<P>
+
+<DT><CODE>-S <VAR>suffix</VAR></CODE>
+<DD><VAR>suffix</VAR> is appended to each possible completion
+after all other options have been applied.
+</DL>
+<P>
+
+The return value is true unless an invalid option is supplied, an option
+other than <SAMP>`-p'</SAMP> or <SAMP>`-r'</SAMP> is supplied without a <VAR>name</VAR>
+argument, an attempt is made to remove a completion specification for
+a <VAR>name</VAR> for which no specification exists, or
+an error occurs adding a completion specification.
+</P><P>
+
+<DT><CODE>compopt</CODE>
+<DD><A NAME="IDX542"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>compopt</CODE> [-o <VAR>option</VAR>] [-DE] [+o <VAR>option</VAR>] [<VAR>name</VAR>]
+</pre></td></tr></table>Modify completion options for each <VAR>name</VAR> according to the
+<VAR>option</VAR>s, or for the currently-execution completion if no <VAR>name</VAR>s
+are supplied.
+If no <VAR>option</VAR>s are given, display the completion options for each
+<VAR>name</VAR> or the current completion.
+The possible values of <VAR>option</VAR> are those valid for the <CODE>complete</CODE>
+builtin described above.
+The <SAMP>`-D'</SAMP> option indicates that the remaining options should
+apply to the "default" command completion; that is, completion attempted
+on a command for which no completion has previously been defined.
+The <SAMP>`-E'</SAMP> option indicates that the remaining options should
+apply to "empty" command completion; that is, completion attempted on a
+blank line.
+<P>
+
+The <SAMP>`-D'</SAMP> option takes precedence over <SAMP>`-E'</SAMP>.
+</P><P>
+
+The return value is true unless an invalid option is supplied, an attempt
+is made to modify the options for a <VAR>name</VAR> for which no completion
+specification exists, or an output error occurs.
+</P><P>
+
+</DL>
+<P>
+
+<A NAME="IDX543"></A>
+</P><P>
+
+<A NAME="Using History Interactively"></A>
+<HR SIZE="6">
+<A NAME="SEC119"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC118"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC120"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 9. Using History Interactively </H1>
+<!--docid::SEC119::-->
+<P>
+
+This chapter describes how to use the GNU History Library
+interactively, from a user's standpoint.
+It should be considered a user's guide.
+For information on using the GNU History Library in other programs,
+see the GNU Readline Library Manual.
+</P><P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC120">9.1 Bash History Facilities</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How Bash lets you manipulate your command
+ history.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC121">9.2 Bash History Builtins</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">The Bash builtin commands that manipulate
+ the command history.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC122">9.3 History Expansion</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">What it feels like using History as a user.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+<A NAME="Bash History Facilities"></A>
+<HR SIZE="6">
+<A NAME="SEC120"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC119"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC121"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC119"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 9.1 Bash History Facilities </H2>
+<!--docid::SEC120::-->
+<P>
+
+When the <SAMP>`-o history'</SAMP> option to the <CODE>set</CODE> builtin
+is enabled (see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>),
+the shell provides access to the <EM>command history</EM>,
+the list of commands previously typed.
+The value of the <CODE>HISTSIZE</CODE> shell variable is used as the
+number of commands to save in a history list.
+The text of the last <CODE>$HISTSIZE</CODE>
+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
+<CODE>HISTIGNORE</CODE> and <CODE>HISTCONTROL</CODE>.
+</P><P>
+
+When the shell starts up, the history is initialized from the
+file named by the <CODE>HISTFILE</CODE> variable (default <TT>`~/.bash_history'</TT>).
+The file named by the value of <CODE>HISTFILE</CODE> is truncated, if
+necessary, to contain no more than the number of lines specified by
+the value of the <CODE>HISTFILESIZE</CODE> variable.
+When an interactive shell exits, the last
+<CODE>$HISTSIZE</CODE> lines are copied from the history list to the file
+named by <CODE>$HISTFILE</CODE>.
+If the <CODE>histappend</CODE> shell option is set (see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>),
+the lines are appended to the history file,
+otherwise the history file is overwritten.
+If <CODE>HISTFILE</CODE>
+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 <CODE>$HISTFILESIZE</CODE>
+lines. If <CODE>HISTFILESIZE</CODE> is not set, no truncation is performed.
+</P><P>
+
+If the <CODE>HISTTIMEFORMAT</CODE> 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.
+</P><P>
+
+The builtin command <CODE>fc</CODE> may be used to list or edit and re-execute
+a portion of the history list.
+The <CODE>history</CODE> 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 (see section <A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A>).
+</P><P>
+
+The shell allows control over which commands are saved on the history
+list. The <CODE>HISTCONTROL</CODE> and <CODE>HISTIGNORE</CODE>
+variables may be set to cause the shell to save only a subset of the
+commands entered.
+The <CODE>cmdhist</CODE>
+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</CODE>
+shell option causes the shell to save the command with embedded newlines
+instead of semicolons.
+The <CODE>shopt</CODE> builtin is used to set these options.
+See section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>, for a description of <CODE>shopt</CODE>.
+</P><P>
+
+<A NAME="Bash History Builtins"></A>
+<HR SIZE="6">
+<A NAME="SEC121"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC120"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC119"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 9.2 Bash History Builtins </H2>
+<!--docid::SEC121::-->
+<P>
+
+Bash provides two builtin commands which manipulate the
+history list and history file.
+</P><P>
+
+<DL COMPACT>
+
+<DT><CODE>fc</CODE>
+<DD><A NAME="IDX544"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre><CODE>fc [-e <VAR>ename</VAR>] [-lnr] [<VAR>first</VAR>] [<VAR>last</VAR>]</CODE>
+<CODE>fc -s [<VAR>pat</VAR>=<VAR>rep</VAR>] [<VAR>command</VAR>]</CODE>
+</pre></td></tr></table><P>
+
+Fix Command. In the first form, a range of commands from <VAR>first</VAR> to
+<VAR>last</VAR> is selected from the history list. Both <VAR>first</VAR> and
+<VAR>last</VAR> 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</VAR> is not specified it is set to
+<VAR>first</VAR>. If <VAR>first</VAR> is not specified it is set to the previous
+command for editing and -16 for listing. If the <SAMP>`-l'</SAMP> flag is
+given, the commands are listed on standard output. The <SAMP>`-n'</SAMP> flag
+suppresses the command numbers when listing. The <SAMP>`-r'</SAMP> flag
+reverses the order of the listing. Otherwise, the editor given by
+<VAR>ename</VAR> is invoked on a file containing those commands. If
+<VAR>ename</VAR> is not given, the value of the following variable expansion
+is used: <CODE>${FCEDIT:-${EDITOR:-vi}}</CODE>. This says to use the
+value of the <CODE>FCEDIT</CODE> variable if set, or the value of the
+<CODE>EDITOR</CODE> variable if that is set, or <CODE>vi</CODE> if neither is set.
+When editing is complete, the edited commands are echoed and executed.
+</P><P>
+
+In the second form, <VAR>command</VAR> is re-executed after each instance
+of <VAR>pat</VAR> in the selected command is replaced by <VAR>rep</VAR>.
+</P><P>
+
+A useful alias to use with the <CODE>fc</CODE> command is <CODE>r='fc -s'</CODE>, so
+that typing <SAMP>`r cc'</SAMP> runs the last command beginning with <CODE>cc</CODE>
+and typing <SAMP>`r'</SAMP> re-executes the last command (see section <A HREF="bashref.html#SEC84">6.6 Aliases</A>).
+</P><P>
+
+<DT><CODE>history</CODE>
+<DD><A NAME="IDX545"></A>
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>history [<VAR>n</VAR>]
+history -c
+history -d <VAR>offset</VAR>
+history [-anrw] [<VAR>filename</VAR>]
+history -ps <VAR>arg</VAR>
+</pre></td></tr></table><P>
+
+With no options, display the history list with line numbers.
+Lines prefixed with a <SAMP>`*'</SAMP> have been modified.
+An argument of <VAR>n</VAR> lists only the last <VAR>n</VAR> lines.
+If the shell variable <CODE>HISTTIMEFORMAT</CODE> is set and not null,
+it is used as a format string for <VAR>strftime</VAR> 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.
+</P><P>
+
+Options, if supplied, have the following meanings:
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>-c</CODE>
+<DD>Clear the history list. This may be combined
+with the other options to replace the history list completely.
+<P>
+
+<DT><CODE>-d <VAR>offset</VAR></CODE>
+<DD>Delete the history entry at position <VAR>offset</VAR>.
+<VAR>offset</VAR> should be specified as it appears when the history is
+displayed.
+<P>
+
+<DT><CODE>-a</CODE>
+<DD>Append the new
+history lines (history lines entered since the beginning of the
+current Bash session) to the history file.
+<P>
+
+<DT><CODE>-n</CODE>
+<DD>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.
+<P>
+
+<DT><CODE>-r</CODE>
+<DD>Read the current history file and append its contents to
+the history list.
+<P>
+
+<DT><CODE>-w</CODE>
+<DD>Write out the current history to the history file.
+<P>
+
+<DT><CODE>-p</CODE>
+<DD>Perform history substitution on the <VAR>arg</VAR>s and display the result
+on the standard output, without storing the results in the history list.
+<P>
+
+<DT><CODE>-s</CODE>
+<DD>The <VAR>arg</VAR>s are added to the end of
+the history list as a single entry.
+<P>
+
+</DL>
+<P>
+
+When any of the <SAMP>`-w'</SAMP>, <SAMP>`-r'</SAMP>, <SAMP>`-a'</SAMP>, or <SAMP>`-n'</SAMP> options is
+used, if <VAR>filename</VAR>
+is given, then it is used as the history file. If not, then
+the value of the <CODE>HISTFILE</CODE> variable is used.
+</P><P>
+
+</DL>
+<P>
+
+<A NAME="History Interaction"></A>
+<HR SIZE="6">
+<A NAME="SEC122"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC121"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC123"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC119"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 9.3 History Expansion </H2>
+<!--docid::SEC122::-->
+<P>
+
+The History library provides a history expansion feature that is similar
+to the history expansion provided by <CODE>csh</CODE>. This section
+describes the syntax used to manipulate the history information.
+</P><P>
+
+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.
+</P><P>
+
+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
+<EM>event</EM>, and the portions of that line that are acted upon are
+called <EM>words</EM>. Various <EM>modifiers</EM> 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>`!'</SAMP> by default.
+Only <SAMP>`\'</SAMP> and <SAMP>`''</SAMP> may be used to escape the history expansion
+character.
+</P><P>
+
+Several shell options settable with the <CODE>shopt</CODE>
+builtin (see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>) may be used to tailor
+the behavior of history expansion. If the
+<CODE>histverify</CODE> 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</CODE>
+shell option is enabled, a failed history expansion will be
+reloaded into the Readline editing buffer for correction.
+The <SAMP>`-p'</SAMP> option to the <CODE>history</CODE> builtin command
+may be used to see what a history expansion will do before using it.
+The <SAMP>`-s'</SAMP> option to the <CODE>history</CODE> 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.
+</P><P>
+
+The shell allows control of the various characters used by the
+history expansion mechanism with the <CODE>histchars</CODE> variable,
+as explained above (see section <A HREF="bashref.html#SEC67">5.2 Bash Variables</A>). The shell uses
+the history comment character to mark history timestamps when
+writing the history file.
+</P><P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC123">9.3.1 Event Designators</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to specify which history line to use.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC124">9.3.2 Word Designators</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Specifying which words are of interest.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC125">9.3.3 Modifiers</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Modifying the results of substitution.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+<A NAME="Event Designators"></A>
+<HR SIZE="6">
+<A NAME="SEC123"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC124"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 9.3.1 Event Designators </H3>
+<!--docid::SEC123::-->
+<P>
+
+An event designator is a reference to a command line entry in the
+history list.
+<A NAME="IDX546"></A>
+</P><P>
+
+<DL COMPACT>
+
+<DT><CODE>!</CODE>
+<DD>Start a history substitution, except when followed by a space, tab,
+the end of the line, <SAMP>`='</SAMP> or <SAMP>`('</SAMP> (when the
+<CODE>extglob</CODE> shell option is enabled using the <CODE>shopt</CODE> builtin).
+<P>
+
+<DT><CODE>!<VAR>n</VAR></CODE>
+<DD>Refer to command line <VAR>n</VAR>.
+<P>
+
+<DT><CODE>!-<VAR>n</VAR></CODE>
+<DD>Refer to the command <VAR>n</VAR> lines back.
+<P>
+
+<DT><CODE>!!</CODE>
+<DD>Refer to the previous command. This is a synonym for <SAMP>`!-1'</SAMP>.
+<P>
+
+<DT><CODE>!<VAR>string</VAR></CODE>
+<DD>Refer to the most recent command starting with <VAR>string</VAR>.
+<P>
+
+<DT><CODE>!?<VAR>string</VAR>[?]</CODE>
+<DD>Refer to the most recent command containing <VAR>string</VAR>. The trailing
+<SAMP>`?'</SAMP> may be omitted if the <VAR>string</VAR> is followed immediately by
+a newline.
+<P>
+
+<DT><CODE>^<VAR>string1</VAR>^<VAR>string2</VAR>^</CODE>
+<DD>Quick Substitution. Repeat the last command, replacing <VAR>string1</VAR>
+with <VAR>string2</VAR>. Equivalent to
+<CODE>!!:s/<VAR>string1</VAR>/<VAR>string2</VAR>/</CODE>.
+<P>
+
+<DT><CODE>!#</CODE>
+<DD>The entire command line typed so far.
+<P>
+
+</DL>
+<P>
+
+<A NAME="Word Designators"></A>
+<HR SIZE="6">
+<A NAME="SEC124"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC123"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC125"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC125"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 9.3.2 Word Designators </H3>
+<!--docid::SEC124::-->
+<P>
+
+Word designators are used to select desired words from the event.
+A <SAMP>`:'</SAMP> separates the event specification from the word designator. It
+may be omitted if the word designator begins with a <SAMP>`^'</SAMP>, <SAMP>`$'</SAMP>,
+<SAMP>`*'</SAMP>, <SAMP>`-'</SAMP>, or <SAMP>`%'</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.
+</P><P>
+
+For example,
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>!!</CODE>
+<DD>designates the preceding command. When you type this, the preceding
+command is repeated in toto.
+<P>
+
+<DT><CODE>!!:$</CODE>
+<DD>designates the last argument of the preceding command. This may be
+shortened to <CODE>!$</CODE>.
+<P>
+
+<DT><CODE>!fi:2</CODE>
+<DD>designates the second argument of the most recent command starting with
+the letters <CODE>fi</CODE>.
+</DL>
+<P>
+
+Here are the word designators:
+
+<DL COMPACT>
+
+<DT><CODE>0 (zero)</CODE>
+<DD>The <CODE>0</CODE>th word. For many applications, this is the command word.
+<P>
+
+<DT><CODE><VAR>n</VAR></CODE>
+<DD>The <VAR>n</VAR>th word.
+<P>
+
+<DT><CODE>^</CODE>
+<DD>The first argument; that is, word 1.
+<P>
+
+<DT><CODE>$</CODE>
+<DD>The last argument.
+<P>
+
+<DT><CODE>%</CODE>
+<DD>The word matched by the most recent <SAMP>`?<VAR>string</VAR>?'</SAMP> search.
+<P>
+
+<DT><CODE><VAR>x</VAR>-<VAR>y</VAR></CODE>
+<DD>A range of words; <SAMP>`-<VAR>y</VAR>'</SAMP> abbreviates <SAMP>`0-<VAR>y</VAR>'</SAMP>.
+<P>
+
+<DT><CODE>*</CODE>
+<DD>All of the words, except the <CODE>0</CODE>th. This is a synonym for <SAMP>`1-$'</SAMP>.
+It is not an error to use <SAMP>`*'</SAMP> if there is just one word in the event;
+the empty string is returned in that case.
+<P>
+
+<DT><CODE><VAR>x</VAR>*</CODE>
+<DD>Abbreviates <SAMP>`<VAR>x</VAR>-$'</SAMP>
+<P>
+
+<DT><CODE><VAR>x</VAR>-</CODE>
+<DD>Abbreviates <SAMP>`<VAR>x</VAR>-$'</SAMP> like <SAMP>`<VAR>x</VAR>*'</SAMP>, but omits the last word.
+<P>
+
+</DL>
+<P>
+
+If a word designator is supplied without an event specification, the
+previous command is used as the event.
+</P><P>
+
+<A NAME="Modifiers"></A>
+<HR SIZE="6">
+<A NAME="SEC125"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC124"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC122"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H3> 9.3.3 Modifiers </H3>
+<!--docid::SEC125::-->
+<P>
+
+After the optional word designator, you can add a sequence of one or more
+of the following modifiers, each preceded by a <SAMP>`:'</SAMP>.
+</P><P>
+
+<DL COMPACT>
+
+<DT><CODE>h</CODE>
+<DD>Remove a trailing pathname component, leaving only the head.
+<P>
+
+<DT><CODE>t</CODE>
+<DD>Remove all leading pathname components, leaving the tail.
+<P>
+
+<DT><CODE>r</CODE>
+<DD>Remove a trailing suffix of the form <SAMP>`.<VAR>suffix</VAR>'</SAMP>, leaving
+the basename.
+<P>
+
+<DT><CODE>e</CODE>
+<DD>Remove all but the trailing suffix.
+<P>
+
+<DT><CODE>p</CODE>
+<DD>Print the new command but do not execute it.
+<P>
+
+<DT><CODE>q</CODE>
+<DD>Quote the substituted words, escaping further substitutions.
+<P>
+
+<DT><CODE>x</CODE>
+<DD>Quote the substituted words as with <SAMP>`q'</SAMP>,
+but break into words at spaces, tabs, and newlines.
+<P>
+
+<DT><CODE>s/<VAR>old</VAR>/<VAR>new</VAR>/</CODE>
+<DD>Substitute <VAR>new</VAR> for the first occurrence of <VAR>old</VAR> in the
+event line. Any delimiter may be used in place of <SAMP>`/'</SAMP>.
+The delimiter may be quoted in <VAR>old</VAR> and <VAR>new</VAR>
+with a single backslash. If <SAMP>`&#38;'</SAMP> appears in <VAR>new</VAR>,
+it is replaced by <VAR>old</VAR>. A single backslash will quote
+the <SAMP>`&#38;'</SAMP>. The final delimiter is optional if it is the last
+character on the input line.
+<P>
+
+<DT><CODE>&#38;</CODE>
+<DD>Repeat the previous substitution.
+<P>
+
+<DT><CODE>g</CODE>
+<DD><DT><CODE>a</CODE>
+<DD>Cause changes to be applied over the entire event line. Used in
+conjunction with <SAMP>`s'</SAMP>, as in <CODE>gs/<VAR>old</VAR>/<VAR>new</VAR>/</CODE>,
+or with <SAMP>`&#38;'</SAMP>.
+<P>
+
+<DT><CODE>G</CODE>
+<DD>Apply the following <SAMP>`s'</SAMP> modifier once to each word in the event.
+<P>
+
+</DL>
+<P>
+
+<A NAME="Installing Bash"></A>
+<HR SIZE="6">
+<A NAME="SEC126"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC125"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC127"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC4"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC135"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> 10. Installing Bash </H1>
+<!--docid::SEC126::-->
+<P>
+
+This chapter provides basic instructions for installing Bash on
+the various supported platforms. The distribution supports the
+GNU operating systems, nearly every version of Unix, and several
+non-Unix systems such as BeOS and Interix.
+Other independent ports exist for
+MS-DOS, OS/2, and Windows platforms.
+</P><P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC127">10.1 Basic Installation</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Installation instructions.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC128">10.2 Compilers and Options</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to set special options for various
+ systems.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC129">10.3 Compiling For Multiple Architectures</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to compile Bash for more
+ than one kind of system from
+ the same source tree.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC130">10.4 Installation Names</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to set the various paths used by the installation.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC131">10.5 Specifying the System Type</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to configure Bash for a particular system.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC132">10.6 Sharing Defaults</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to share default configuration values among GNU
+ programs.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC133">10.7 Operation Controls</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Options recognized by the configuration program.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC134">10.8 Optional Features</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">How to enable and disable optional features when
+ building Bash.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+<A NAME="Basic Installation"></A>
+<HR SIZE="6">
+<A NAME="SEC127"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC128"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC135"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 10.1 Basic Installation </H2>
+<!--docid::SEC127::-->
+<P>
+
+These are installation instructions for Bash.
+</P><P>
+
+The simplest way to compile Bash is:
+</P><P>
+
+<OL>
+<LI>
+<CODE>cd</CODE> to the directory containing the source code and type
+<SAMP>`./configure'</SAMP> to configure Bash for your system. If you're
+using <CODE>csh</CODE> on an old version of System V, you might need to
+type <SAMP>`sh ./configure'</SAMP> instead to prevent <CODE>csh</CODE> from trying
+to execute <CODE>configure</CODE> itself.
+<P>
+
+Running <CODE>configure</CODE> takes some time.
+While running, it prints messages telling which features it is
+checking for.
+</P><P>
+
+<LI>
+Type <SAMP>`make'</SAMP> to compile Bash and build the <CODE>bashbug</CODE> bug
+reporting script.
+<P>
+
+<LI>
+Optionally, type <SAMP>`make tests'</SAMP> to run the Bash test suite.
+<P>
+
+<LI>
+Type <SAMP>`make install'</SAMP> to install <CODE>bash</CODE> and <CODE>bashbug</CODE>.
+This will also install the manual pages and Info file.
+<P>
+
+</OL>
+<P>
+
+The <CODE>configure</CODE> shell script attempts to guess correct
+values for various system-dependent variables used during
+compilation. It uses those values to create a <TT>`Makefile'</TT> in
+each directory of the package (the top directory, the
+<TT>`builtins'</TT>, <TT>`doc'</TT>, and <TT>`support'</TT> directories,
+each directory under <TT>`lib'</TT>, and several others). It also creates a
+<TT>`config.h'</TT> file containing system-dependent definitions.
+Finally, it creates a shell script named <CODE>config.status</CODE> that you
+can run in the future to recreate the current configuration, a
+file <TT>`config.cache'</TT> that saves the results of its tests to
+speed up reconfiguring, and a file <TT>`config.log'</TT> containing
+compiler output (useful mainly for debugging <CODE>configure</CODE>).
+If at some point
+<TT>`config.cache'</TT> contains results you don't want to keep, you
+may remove or edit it.
+</P><P>
+
+To find out more about the options and arguments that the
+<CODE>configure</CODE> script understands, type
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>bash-2.04$ ./configure --help
+</pre></td></tr></table></P><P>
+
+at the Bash prompt in your Bash source directory.
+</P><P>
+
+If you need to do unusual things to compile Bash, please
+try to figure out how <CODE>configure</CODE> could check whether or not
+to do them, and mail diffs or instructions to
+<A HREF="mailto:bash-maintainers@gnu.org">bash-maintainers@gnu.org</A> so they can be
+considered for the next release.
+</P><P>
+
+The file <TT>`configure.in'</TT> is used to create <CODE>configure</CODE>
+by a program called Autoconf. You only need
+<TT>`configure.in'</TT> if you want to change it or regenerate
+<CODE>configure</CODE> using a newer version of Autoconf. If
+you do this, make sure you are using Autoconf version 2.50 or
+newer.
+</P><P>
+
+You can remove the program binaries and object files from the
+source code directory by typing <SAMP>`make clean'</SAMP>. To also remove the
+files that <CODE>configure</CODE> created (so you can compile Bash for
+a different kind of computer), type <SAMP>`make distclean'</SAMP>.
+</P><P>
+
+<A NAME="Compilers and Options"></A>
+<HR SIZE="6">
+<A NAME="SEC128"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC127"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC129"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC129"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC135"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 10.2 Compilers and Options </H2>
+<!--docid::SEC128::-->
+<P>
+
+Some systems require unusual options for compilation or linking
+that the <CODE>configure</CODE> script does not know about. You can
+give <CODE>configure</CODE> initial values for variables by setting
+them in the environment. Using a Bourne-compatible shell, you
+can do that on the command line like this:
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+</pre></td></tr></table></P><P>
+
+On systems that have the <CODE>env</CODE> program, you can do it like this:
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+</pre></td></tr></table></P><P>
+
+The configuration process uses GCC to build Bash if it
+is available.
+</P><P>
+
+<A NAME="Compiling For Multiple Architectures"></A>
+<HR SIZE="6">
+<A NAME="SEC129"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC128"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC130"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC130"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC135"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 10.3 Compiling For Multiple Architectures </H2>
+<!--docid::SEC129::-->
+<P>
+
+You can compile Bash for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of <CODE>make</CODE> that
+supports the <CODE>VPATH</CODE> variable, such as GNU <CODE>make</CODE>.
+<CODE>cd</CODE> to the
+directory where you want the object files and executables to go and run
+the <CODE>configure</CODE> script from the source directory. You may need to
+supply the <SAMP>`--srcdir=PATH'</SAMP> argument to tell <CODE>configure</CODE> where the
+source files are. <CODE>configure</CODE> automatically checks for the
+source code in the directory that <CODE>configure</CODE> is in and in `..'.
+</P><P>
+
+If you have to use a <CODE>make</CODE> that does not supports the <CODE>VPATH</CODE>
+variable, you can compile Bash for one architecture at a
+time in the source code directory. After you have installed
+Bash for one architecture, use <SAMP>`make distclean'</SAMP> before
+reconfiguring for another architecture.
+</P><P>
+
+Alternatively, if your system supports symbolic links, you can use the
+<TT>`support/mkclone'</TT> script to create a build tree which has
+symbolic links back to each file in the source directory. Here's an
+example that creates a build directory in the current directory from a
+source directory <TT>`/usr/gnu/src/bash-2.0'</TT>:
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=example><pre>bash /usr/gnu/src/bash-2.0/support/mkclone -s /usr/gnu/src/bash-2.0 .
+</pre></td></tr></table></P><P>
+
+The <CODE>mkclone</CODE> script requires Bash, so you must have already built
+Bash for at least one architecture before you can create build
+directories for other architectures.
+</P><P>
+
+<A NAME="Installation Names"></A>
+<HR SIZE="6">
+<A NAME="SEC130"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC129"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC131"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC131"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC135"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 10.4 Installation Names </H2>
+<!--docid::SEC130::-->
+<P>
+
+By default, <SAMP>`make install'</SAMP> will install into
+<TT>`/usr/local/bin'</TT>, <TT>`/usr/local/man'</TT>, etc. You can
+specify an installation prefix other than <TT>`/usr/local'</TT> by
+giving <CODE>configure</CODE> the option <SAMP>`--prefix=<VAR>PATH</VAR>'</SAMP>,
+or by specifying a value for the <CODE>DESTDIR</CODE> <SAMP>`make'</SAMP>
+variable when running <SAMP>`make install'</SAMP>.
+</P><P>
+
+You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.
+If you give <CODE>configure</CODE> the option
+<SAMP>`--exec-prefix=<VAR>PATH</VAR>'</SAMP>, <SAMP>`make install'</SAMP> will use
+<VAR>PATH</VAR> as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+</P><P>
+
+<A NAME="Specifying the System Type"></A>
+<HR SIZE="6">
+<A NAME="SEC131"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC130"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC132"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC132"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC135"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 10.5 Specifying the System Type </H2>
+<!--docid::SEC131::-->
+<P>
+
+There may be some features <CODE>configure</CODE> can not figure out
+automatically, but need to determine by the type of host Bash
+will run on. Usually <CODE>configure</CODE> can figure that
+out, but if it prints a message saying it can not guess the host
+type, give it the <SAMP>`--host=TYPE'</SAMP> option. <SAMP>`TYPE'</SAMP> can
+either be a short name for the system type, such as <SAMP>`sun4'</SAMP>,
+or a canonical name with three fields: <SAMP>`CPU-COMPANY-SYSTEM'</SAMP>
+(e.g., <SAMP>`i386-unknown-freebsd4.2'</SAMP>).
+</P><P>
+
+See the file <TT>`support/config.sub'</TT> for the possible
+values of each field.
+</P><P>
+
+<A NAME="Sharing Defaults"></A>
+<HR SIZE="6">
+<A NAME="SEC132"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC131"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC133"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC133"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC135"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 10.6 Sharing Defaults </H2>
+<!--docid::SEC132::-->
+<P>
+
+If you want to set default values for <CODE>configure</CODE> scripts to
+share, you can create a site shell script called
+<CODE>config.site</CODE> that gives default values for variables like
+<CODE>CC</CODE>, <CODE>cache_file</CODE>, and <CODE>prefix</CODE>. <CODE>configure</CODE>
+looks for <TT>`PREFIX/share/config.site'</TT> if it exists, then
+<TT>`PREFIX/etc/config.site'</TT> if it exists. Or, you can set the
+<CODE>CONFIG_SITE</CODE> environment variable to the location of the site
+script. A warning: the Bash <CODE>configure</CODE> looks for a site script,
+but not all <CODE>configure</CODE> scripts do.
+</P><P>
+
+<A NAME="Operation Controls"></A>
+<HR SIZE="6">
+<A NAME="SEC133"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC132"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC134"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC134"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC135"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 10.7 Operation Controls </H2>
+<!--docid::SEC133::-->
+<P>
+
+<CODE>configure</CODE> recognizes the following options to control how it
+operates.
+</P><P>
+
+<DL COMPACT>
+
+<DT><CODE>--cache-file=<VAR>file</VAR></CODE>
+<DD>Use and save the results of the tests in
+<VAR>file</VAR> instead of <TT>`./config.cache'</TT>. Set <VAR>file</VAR> to
+<TT>`/dev/null'</TT> to disable caching, for debugging
+<CODE>configure</CODE>.
+<P>
+
+<DT><CODE>--help</CODE>
+<DD>Print a summary of the options to <CODE>configure</CODE>, and exit.
+<P>
+
+<DT><CODE>--quiet</CODE>
+<DD><DT><CODE>--silent</CODE>
+<DD><DT><CODE>-q</CODE>
+<DD>Do not print messages saying which checks are being made.
+<P>
+
+<DT><CODE>--srcdir=<VAR>dir</VAR></CODE>
+<DD>Look for the Bash source code in directory <VAR>dir</VAR>. Usually
+<CODE>configure</CODE> can determine that directory automatically.
+<P>
+
+<DT><CODE>--version</CODE>
+<DD>Print the version of Autoconf used to generate the <CODE>configure</CODE>
+script, and exit.
+</DL>
+<P>
+
+<CODE>configure</CODE> also accepts some other, not widely used, boilerplate
+options. <SAMP>`configure --help'</SAMP> prints the complete list.
+</P><P>
+
+<A NAME="Optional Features"></A>
+<HR SIZE="6">
+<A NAME="SEC134"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC133"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC135"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC135"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> 10.8 Optional Features </H2>
+<!--docid::SEC134::-->
+<P>
+
+The Bash <CODE>configure</CODE> has a number of <SAMP>`--enable-<VAR>feature</VAR>'</SAMP>
+options, where <VAR>feature</VAR> indicates an optional part of Bash.
+There are also several <SAMP>`--with-<VAR>package</VAR>'</SAMP> options,
+where <VAR>package</VAR> is something like <SAMP>`bash-malloc'</SAMP> or <SAMP>`purify'</SAMP>.
+To turn off the default use of a package, use
+<SAMP>`--without-<VAR>package</VAR>'</SAMP>. To configure Bash without a feature
+that is enabled by default, use <SAMP>`--disable-<VAR>feature</VAR>'</SAMP>.
+</P><P>
+
+Here is a complete list of the <SAMP>`--enable-'</SAMP> and
+<SAMP>`--with-'</SAMP> options that the Bash <CODE>configure</CODE> recognizes.
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>--with-afs</CODE>
+<DD>Define if you are using the Andrew File System from Transarc.
+<P>
+
+<DT><CODE>--with-bash-malloc</CODE>
+<DD>Use the Bash version of
+<CODE>malloc</CODE> in the directory <TT>`lib/malloc'</TT>. This is not the same
+<CODE>malloc</CODE> that appears in GNU libc, but an older version
+originally derived from the 4.2 BSD <CODE>malloc</CODE>. This <CODE>malloc</CODE>
+is very fast, but wastes some space on each allocation.
+This option is enabled by default.
+The <TT>`NOTES'</TT> file contains a list of systems for
+which this should be turned off, and <CODE>configure</CODE> disables this
+option automatically for a number of systems.
+<P>
+
+<DT><CODE>--with-curses</CODE>
+<DD>Use the curses library instead of the termcap library. This should
+be supplied if your system has an inadequate or incomplete termcap
+database.
+<P>
+
+<DT><CODE>--with-gnu-malloc</CODE>
+<DD>A synonym for <CODE>--with-bash-malloc</CODE>.
+<P>
+
+<DT><CODE>--with-installed-readline[=<VAR>PREFIX</VAR>]</CODE>
+<DD>Define this to make Bash link with a locally-installed version of Readline
+rather than the version in <TT>`lib/readline'</TT>. This works only with
+Readline 5.0 and later versions. If <VAR>PREFIX</VAR> is <CODE>yes</CODE> or not
+supplied, <CODE>configure</CODE> uses the values of the make variables
+<CODE>includedir</CODE> and <CODE>libdir</CODE>, which are subdirectories of <CODE>prefix</CODE>
+by default, to find the installed version of Readline if it is not in
+the standard system include and library directories.
+If <VAR>PREFIX</VAR> is <CODE>no</CODE>, Bash links with the version in
+<TT>`lib/readline'</TT>.
+If <VAR>PREFIX</VAR> is set to any other value, <CODE>configure</CODE> treats it as
+a directory pathname and looks for
+the installed version of Readline in subdirectories of that directory
+(include files in <VAR>PREFIX</VAR>/<CODE>include</CODE> and the library in
+<VAR>PREFIX</VAR>/<CODE>lib</CODE>).
+<P>
+
+<DT><CODE>--with-purify</CODE>
+<DD>Define this to use the Purify memory allocation checker from Rational
+Software.
+<P>
+
+<DT><CODE>--enable-minimal-config</CODE>
+<DD>This produces a shell with minimal features, close to the historical
+Bourne shell.
+</DL>
+<P>
+
+There are several <SAMP>`--enable-'</SAMP> options that alter how Bash is
+compiled and linked, rather than changing run-time features.
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>--enable-largefile</CODE>
+<DD>Enable support for <A HREF="http://www.sas.com/standards/large_file/x_open.20Mar96.html">large files</A> if the operating system requires special compiler options
+to build programs which can access large files. This is enabled by
+default, if the operating system provides large file support.
+<P>
+
+<DT><CODE>--enable-profiling</CODE>
+<DD>This builds a Bash binary that produces profiling information to be
+processed by <CODE>gprof</CODE> each time it is executed.
+<P>
+
+<DT><CODE>--enable-static-link</CODE>
+<DD>This causes Bash to be linked statically, if <CODE>gcc</CODE> is being used.
+This could be used to build a version to use as root's shell.
+</DL>
+<P>
+
+The <SAMP>`minimal-config'</SAMP> option can be used to disable all of
+the following options, but it is processed first, so individual
+options may be enabled using <SAMP>`enable-<VAR>feature</VAR>'</SAMP>.
+</P><P>
+
+All of the following options except for <SAMP>`disabled-builtins'</SAMP> and
+<SAMP>`xpg-echo-default'</SAMP> are
+enabled by default, unless the operating system does not provide the
+necessary support.
+</P><P>
+
+<DL COMPACT>
+<DT><CODE>--enable-alias</CODE>
+<DD>Allow alias expansion and include the <CODE>alias</CODE> and <CODE>unalias</CODE>
+builtins (see section <A HREF="bashref.html#SEC84">6.6 Aliases</A>).
+<P>
+
+<DT><CODE>--enable-arith-for-command</CODE>
+<DD>Include support for the alternate form of the <CODE>for</CODE> command
+that behaves like the C language <CODE>for</CODE> statement
+(see section <A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A>).
+<P>
+
+<DT><CODE>--enable-array-variables</CODE>
+<DD>Include support for one-dimensional array shell variables
+(see section <A HREF="bashref.html#SEC85">6.7 Arrays</A>).
+<P>
+
+<DT><CODE>--enable-bang-history</CODE>
+<DD>Include support for <CODE>csh</CODE>-like history substitution
+(see section <A HREF="bashref.html#SEC122">9.3 History Expansion</A>).
+<P>
+
+<DT><CODE>--enable-brace-expansion</CODE>
+<DD>Include <CODE>csh</CODE>-like brace expansion
+( <CODE>b{a,b}c</CODE> ==> <CODE>bac bbc</CODE> ).
+See <A HREF="bashref.html#SEC29">3.5.1 Brace Expansion</A>, for a complete description.
+<P>
+
+<DT><CODE>--enable-casemod-attributes</CODE>
+<DD>Include support for case-modifying attributes in the <CODE>declare</CODE> builtin
+and assignment statements. Variables with the <VAR>uppercase</VAR> attribute,
+for example, will have their values converted to uppercase upon assignment.
+<P>
+
+<DT><CODE>--enable-casemod-expansion</CODE>
+<DD>Include support for case-modifying word expansions.
+<P>
+
+<DT><CODE>--enable-command-timing</CODE>
+<DD>Include support for recognizing <CODE>time</CODE> as a reserved word and for
+displaying timing statistics for the pipeline following <CODE>time</CODE>
+(see section <A HREF="bashref.html#SEC17">3.2.2 Pipelines</A>).
+This allows pipelines as well as shell builtins and functions to be timed.
+<P>
+
+<DT><CODE>--enable-cond-command</CODE>
+<DD>Include support for the <CODE>[[</CODE> conditional command.
+(see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>).
+<P>
+
+<DT><CODE>--enable-cond-regexp</CODE>
+<DD>Include support for matching POSIX regular expressions using the
+<SAMP>`=~'</SAMP> binary operator in the <CODE>[[</CODE> conditional command.
+(see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>).
+<P>
+
+<DT><CODE>--enable-coprocesses</CODE>
+<DD>Include support for coprocesses and the <CODE>coproc</CODE> reserved word
+(see section <A HREF="bashref.html#SEC17">3.2.2 Pipelines</A>).
+<P>
+
+<DT><CODE>--enable-debugger</CODE>
+<DD>Include support for the bash debugger (distributed separately).
+<P>
+
+<DT><CODE>--enable-directory-stack</CODE>
+<DD>Include support for a <CODE>csh</CODE>-like directory stack and the
+<CODE>pushd</CODE>, <CODE>popd</CODE>, and <CODE>dirs</CODE> builtins
+(see section <A HREF="bashref.html#SEC86">6.8 The Directory Stack</A>).
+<P>
+
+<DT><CODE>--enable-disabled-builtins</CODE>
+<DD>Allow builtin commands to be invoked via <SAMP>`builtin xxx'</SAMP>
+even after <CODE>xxx</CODE> has been disabled using <SAMP>`enable -n xxx'</SAMP>.
+See <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>, for details of the <CODE>builtin</CODE> and
+<CODE>enable</CODE> builtin commands.
+<P>
+
+<DT><CODE>--enable-dparen-arithmetic</CODE>
+<DD>Include support for the <CODE>((<small>...</small>))</CODE> command
+(see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>).
+<P>
+
+<DT><CODE>--enable-extended-glob</CODE>
+<DD>Include support for the extended pattern matching features described
+above under <A HREF="bashref.html#SEC37">3.5.8.1 Pattern Matching</A>.
+<P>
+
+<DT><CODE>--enable-extended-glob-default</CODE>
+<DD>Set the default value of the <VAR>extglob</VAR> shell option described
+above under <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A> to be enabled.
+<P>
+
+<DT><CODE>--enable-help-builtin</CODE>
+<DD>Include the <CODE>help</CODE> builtin, which displays help on shell builtins and
+variables (see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>).
+<P>
+
+<DT><CODE>--enable-history</CODE>
+<DD>Include command history and the <CODE>fc</CODE> and <CODE>history</CODE>
+builtin commands (see section <A HREF="bashref.html#SEC120">9.1 Bash History Facilities</A>).
+<P>
+
+<DT><CODE>--enable-job-control</CODE>
+<DD>This enables the job control features (see section <A HREF="bashref.html#SEC91">7. Job Control</A>),
+if the operating system supports them.
+<P>
+
+<DT><CODE>--enable-multibyte</CODE>
+<DD>This enables support for multibyte characters if the operating
+system provides the necessary support.
+<P>
+
+<DT><CODE>--enable-net-redirections</CODE>
+<DD>This enables the special handling of filenames of the form
+<CODE>/dev/tcp/<VAR>host</VAR>/<VAR>port</VAR></CODE> and
+<CODE>/dev/udp/<VAR>host</VAR>/<VAR>port</VAR></CODE>
+when used in redirections (see section <A HREF="bashref.html#SEC39">3.6 Redirections</A>).
+<P>
+
+<DT><CODE>--enable-process-substitution</CODE>
+<DD>This enables process substitution (see section <A HREF="bashref.html#SEC34">3.5.6 Process Substitution</A>) if
+the operating system provides the necessary support.
+<P>
+
+<DT><CODE>--enable-progcomp</CODE>
+<DD>Enable the programmable completion facilities
+(see section <A HREF="bashref.html#SEC117">8.6 Programmable Completion</A>).
+If Readline is not enabled, this option has no effect.
+<P>
+
+<DT><CODE>--enable-prompt-string-decoding</CODE>
+<DD>Turn on the interpretation of a number of backslash-escaped characters
+in the <CODE>$PS1</CODE>, <CODE>$PS2</CODE>, <CODE>$PS3</CODE>, and <CODE>$PS4</CODE> prompt
+strings. See <A HREF="bashref.html#SEC88">6.9 Controlling the Prompt</A>, for a complete list of prompt
+string escape sequences.
+<P>
+
+<DT><CODE>--enable-readline</CODE>
+<DD>Include support for command-line editing and history with the Bash
+version of the Readline library (see section <A HREF="bashref.html#SEC95">8. Command Line Editing</A>).
+<P>
+
+<DT><CODE>--enable-restricted</CODE>
+<DD>Include support for a <EM>restricted shell</EM>. If this is enabled, Bash,
+when called as <CODE>rbash</CODE>, enters a restricted mode. See
+<A HREF="bashref.html#SEC89">6.10 The Restricted Shell</A>, for a description of restricted mode.
+<P>
+
+<DT><CODE>--enable-select</CODE>
+<DD>Include the <CODE>select</CODE> builtin, which allows the generation of simple
+menus (see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>).
+<P>
+
+<DT><CODE>--enable-separate-helpfiles</CODE>
+<DD>Use external files for the documentation displayed by the <CODE>help</CODE> builtin
+instead of storing the text internally.
+<P>
+
+<DT><CODE>--enable-single-help-strings</CODE>
+<DD>Store the text displayed by the <CODE>help</CODE> builtin as a single string for
+each help topic. This aids in translating the text to different languages.
+You may need to disable this if your compiler cannot handle very long string
+literals.
+<P>
+
+<DT><CODE>--enable-strict-posix-default</CODE>
+<DD>Make Bash POSIX-conformant by default (see section <A HREF="bashref.html#SEC90">6.11 Bash POSIX Mode</A>).
+<P>
+
+<DT><CODE>--enable-usg-echo-default</CODE>
+<DD>A synonym for <CODE>--enable-xpg-echo-default</CODE>.
+<P>
+
+<DT><CODE>--enable-xpg-echo-default</CODE>
+<DD>Make the <CODE>echo</CODE> builtin expand backslash-escaped characters by default,
+without requiring the <SAMP>`-e'</SAMP> option.
+This sets the default value of the <CODE>xpg_echo</CODE> shell option to <CODE>on</CODE>,
+which makes the Bash <CODE>echo</CODE> behave more like the version specified in
+the Single Unix Specification, version 3.
+See section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>, for a description of the escape sequences that
+<CODE>echo</CODE> recognizes.
+<P>
+
+</DL>
+<P>
+
+The file <TT>`config-top.h'</TT> contains C Preprocessor
+<SAMP>`#define'</SAMP> statements for options which are not settable from
+<CODE>configure</CODE>.
+Some of these are not meant to be changed; beware of the consequences if
+you do.
+Read the comments associated with each definition for more
+information about its effect.
+</P><P>
+
+<A NAME="Reporting Bugs"></A>
+<HR SIZE="6">
+<A NAME="SEC135"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC134"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC136"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC126"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC136"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> A. Reporting Bugs </H1>
+<!--docid::SEC135::-->
+<P>
+
+Please report all bugs you find in Bash.
+But first, you should
+make sure that it really is a bug, and that it appears in the latest
+version of Bash.
+The latest version of Bash is always available for FTP from
+<A HREF="ftp://ftp.gnu.org/pub/gnu/bash/">ftp://ftp.gnu.org/pub/gnu/bash/</A>.
+</P><P>
+
+Once you have determined that a bug actually exists, use the
+<CODE>bashbug</CODE> command to submit a bug report.
+If you have a fix, you are encouraged to mail that as well!
+Suggestions and `philosophical' bug reports may be mailed
+to <A HREF="mailto:bug-bash@gnu.org">bug-bash@gnu.org</A> or posted to the Usenet
+newsgroup <CODE>gnu.bash.bug</CODE>.
+</P><P>
+
+All bug reports should include:
+<UL>
+<LI>
+The version number of Bash.
+<LI>
+The hardware and operating system.
+<LI>
+The compiler used to compile Bash.
+<LI>
+A description of the bug behaviour.
+<LI>
+A short script or `recipe' which exercises the bug and may be used
+to reproduce it.
+</UL>
+<P>
+
+<CODE>bashbug</CODE> inserts the first three items automatically into
+the template it provides for filing a bug report.
+</P><P>
+
+Please send all reports concerning this manual to
+<A HREF="mailto:chet.ramey@case.edu">chet.ramey@case.edu</A>.
+</P><P>
+
+<A NAME="Major Differences From The Bourne Shell"></A>
+<HR SIZE="6">
+<A NAME="SEC136"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC135"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC137"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC138"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC138"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> B. Major Differences From The Bourne Shell </H1>
+<!--docid::SEC136::-->
+<P>
+
+Bash implements essentially the same grammar, parameter and
+variable expansion, redirection, and quoting as the Bourne Shell.
+Bash uses the POSIX standard as the specification of
+how these features are to be implemented. There are some
+differences between the traditional Bourne shell and Bash; this
+section quickly details the differences of significance. A
+number of these differences are explained in greater depth in
+previous sections.
+This section uses the version of <CODE>sh</CODE> included in SVR4.2 (the
+last version of the historical Bourne shell) as the baseline reference.
+</P><P>
+
+<UL>
+
+<LI>
+Bash is POSIX-conformant, even where the POSIX specification
+differs from traditional <CODE>sh</CODE> behavior (see section <A HREF="bashref.html#SEC90">6.11 Bash POSIX Mode</A>).
+<P>
+
+<LI>
+Bash has multi-character invocation options (see section <A HREF="bashref.html#SEC69">6.1 Invoking Bash</A>).
+<P>
+
+<LI>
+Bash has command-line editing (see section <A HREF="bashref.html#SEC95">8. Command Line Editing</A>) and
+the <CODE>bind</CODE> builtin.
+<P>
+
+<LI>
+Bash provides a programmable word completion mechanism
+(see section <A HREF="bashref.html#SEC117">8.6 Programmable Completion</A>), and builtin commands
+<CODE>complete</CODE>, <CODE>compgen</CODE>, and <CODE>compopt</CODE>, to
+manipulate it.
+<P>
+
+<LI>
+Bash has command history (see section <A HREF="bashref.html#SEC120">9.1 Bash History Facilities</A>) and the
+<CODE>history</CODE> and <CODE>fc</CODE> builtins to manipulate it.
+The Bash history list maintains timestamp information and uses the
+value of the <CODE>HISTTIMEFORMAT</CODE> variable to display it.
+<P>
+
+<LI>
+Bash implements <CODE>csh</CODE>-like history expansion
+(see section <A HREF="bashref.html#SEC122">9.3 History Expansion</A>).
+<P>
+
+<LI>
+Bash has one-dimensional array variables (see section <A HREF="bashref.html#SEC85">6.7 Arrays</A>), and the
+appropriate variable expansions and assignment syntax to use them.
+Several of the Bash builtins take options to act on arrays.
+Bash provides a number of built-in array variables.
+<P>
+
+<LI>
+The <CODE>$'<small>...</small>'</CODE> quoting syntax, which expands ANSI-C
+backslash-escaped characters in the text between the single quotes,
+is supported (see section <A HREF="bashref.html#SEC12">3.1.2.4 ANSI-C Quoting</A>).
+<P>
+
+<LI>
+Bash supports the <CODE>$"<small>...</small>"</CODE> quoting syntax to do
+locale-specific translation of the characters between the double
+quotes. The <SAMP>`-D'</SAMP>, <SAMP>`--dump-strings'</SAMP>, and <SAMP>`--dump-po-strings'</SAMP>
+invocation options list the translatable strings found in a script
+(see section <A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A>).
+<P>
+
+<LI>
+Bash implements the <CODE>!</CODE> keyword to negate the return value of
+a pipeline (see section <A HREF="bashref.html#SEC17">3.2.2 Pipelines</A>).
+Very useful when an <CODE>if</CODE> statement needs to act only if a test fails.
+The Bash <SAMP>`-o pipefail'</SAMP> option to <CODE>set</CODE> will cause a pipeline to
+return a failure status if any command fails.
+<P>
+
+<LI>
+Bash has the <CODE>time</CODE> reserved word and command timing (see section <A HREF="bashref.html#SEC17">3.2.2 Pipelines</A>).
+The display of the timing statistics may be controlled with the
+<CODE>TIMEFORMAT</CODE> variable.
+<P>
+
+<LI>
+Bash implements the <CODE>for (( <VAR>expr1</VAR> ; <VAR>expr2</VAR> ; <VAR>expr3</VAR> ))</CODE>
+arithmetic for command, similar to the C language (see section <A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A>).
+<P>
+
+<LI>
+Bash includes the <CODE>select</CODE> compound command, which allows the
+generation of simple menus (see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>).
+<P>
+
+<LI>
+Bash includes the <CODE>[[</CODE> compound command, which makes conditional
+testing part of the shell grammar (see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>), including
+optional regular expression matching.
+<P>
+
+<LI>
+Bash provides optional case-insensitive matching for the <CODE>case</CODE> and
+<CODE>[[</CODE> constructs.
+<P>
+
+<LI>
+Bash includes brace expansion (see section <A HREF="bashref.html#SEC29">3.5.1 Brace Expansion</A>) and tilde
+expansion (see section <A HREF="bashref.html#SEC30">3.5.2 Tilde Expansion</A>).
+<P>
+
+<LI>
+Bash implements command aliases and the <CODE>alias</CODE> and <CODE>unalias</CODE>
+builtins (see section <A HREF="bashref.html#SEC84">6.6 Aliases</A>).
+<P>
+
+<LI>
+Bash provides shell arithmetic, the <CODE>((</CODE> compound command
+(see section <A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>),
+and arithmetic expansion (see section <A HREF="bashref.html#SEC83">6.5 Shell Arithmetic</A>).
+<P>
+
+<LI>
+Variables present in the shell's initial environment are automatically
+exported to child processes. The Bourne shell does not normally do
+this unless the variables are explicitly marked using the <CODE>export</CODE>
+command.
+<P>
+
+<LI>
+Bash supports the <SAMP>`+='</SAMP> assignment operator, which appends to the value
+of the variable named on the left hand side.
+<P>
+
+<LI>
+Bash includes the POSIX pattern removal <SAMP>`%'</SAMP>, <SAMP>`#'</SAMP>, <SAMP>`%%'</SAMP>
+and <SAMP>`##'</SAMP> expansions to remove leading or trailing substrings from
+variable values (see section <A HREF="bashref.html#SEC31">3.5.3 Shell Parameter Expansion</A>).
+<P>
+
+<LI>
+The expansion <CODE>${#xx}</CODE>, which returns the length of <CODE>${xx}</CODE>,
+is supported (see section <A HREF="bashref.html#SEC31">3.5.3 Shell Parameter Expansion</A>).
+<P>
+
+<LI>
+The expansion <CODE>${var:</CODE><VAR>offset</VAR><CODE>[:</CODE><VAR>length</VAR><CODE>]}</CODE>,
+which expands to the substring of <CODE>var</CODE>'s value of length
+<VAR>length</VAR>, beginning at <VAR>offset</VAR>, is present
+(see section <A HREF="bashref.html#SEC31">3.5.3 Shell Parameter Expansion</A>).
+<P>
+
+<LI>
+The expansion
+<CODE>${var/[/]</CODE><VAR>pattern</VAR><CODE>[/</CODE><VAR>replacement</VAR><CODE>]}</CODE>,
+which matches <VAR>pattern</VAR> and replaces it with <VAR>replacement</VAR> in
+the value of <CODE>var</CODE>, is available (see section <A HREF="bashref.html#SEC31">3.5.3 Shell Parameter Expansion</A>).
+<P>
+
+<LI>
+The expansion <CODE>${!<VAR>prefix}*</VAR></CODE> expansion, which expands to
+the names of all shell variables whose names begin with <VAR>prefix</VAR>,
+is available (see section <A HREF="bashref.html#SEC31">3.5.3 Shell Parameter Expansion</A>).
+<P>
+
+<LI>
+Bash has <VAR>indirect</VAR> variable expansion using <CODE>${!word}</CODE>
+(see section <A HREF="bashref.html#SEC31">3.5.3 Shell Parameter Expansion</A>).
+<P>
+
+<LI>
+Bash can expand positional parameters beyond <CODE>$9</CODE> using
+<CODE>${<VAR>num</VAR>}</CODE>.
+<P>
+
+<LI>
+The POSIX <CODE>$()</CODE> form of command substitution
+is implemented (see section <A HREF="bashref.html#SEC32">3.5.4 Command Substitution</A>),
+and preferred to the Bourne shell's <CODE>"</CODE> (which
+is also implemented for backwards compatibility).
+<P>
+
+<LI>
+Bash has process substitution (see section <A HREF="bashref.html#SEC34">3.5.6 Process Substitution</A>).
+<P>
+
+<LI>
+Bash automatically assigns variables that provide information about the
+current user (<CODE>UID</CODE>, <CODE>EUID</CODE>, and <CODE>GROUPS</CODE>), the current host
+(<CODE>HOSTTYPE</CODE>, <CODE>OSTYPE</CODE>, <CODE>MACHTYPE</CODE>, and <CODE>HOSTNAME</CODE>),
+and the instance of Bash that is running (<CODE>BASH</CODE>,
+<CODE>BASH_VERSION</CODE>, and <CODE>BASH_VERSINFO</CODE>). See section <A HREF="bashref.html#SEC67">5.2 Bash Variables</A>,
+for details.
+<P>
+
+<LI>
+The <CODE>IFS</CODE> variable is used to split only the results of expansion,
+not all words (see section <A HREF="bashref.html#SEC35">3.5.7 Word Splitting</A>).
+This closes a longstanding shell security hole.
+<P>
+
+<LI>
+Bash implements the full set of POSIX filename expansion operators,
+including <VAR>character classes</VAR>, <VAR>equivalence classes</VAR>, and
+<VAR>collating symbols</VAR> (see section <A HREF="bashref.html#SEC36">3.5.8 Filename Expansion</A>).
+<P>
+
+<LI>
+Bash implements extended pattern matching features when the <CODE>extglob</CODE>
+shell option is enabled (see section <A HREF="bashref.html#SEC37">3.5.8.1 Pattern Matching</A>).
+<P>
+
+<LI>
+It is possible to have a variable and a function with the same name;
+<CODE>sh</CODE> does not separate the two name spaces.
+<P>
+
+<LI>
+Bash functions are permitted to have local variables using the
+<CODE>local</CODE> builtin, and thus useful recursive functions may be written
+(see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>).
+<P>
+
+<LI>
+Variable assignments preceding commands affect only that command, even
+builtins and functions (see section <A HREF="bashref.html#SEC54">3.7.4 Environment</A>).
+In <CODE>sh</CODE>, all variable assignments
+preceding commands are global unless the command is executed from the
+file system.
+<P>
+
+<LI>
+Bash performs filename expansion on filenames specified as operands
+to input and output redirection operators (see section <A HREF="bashref.html#SEC39">3.6 Redirections</A>).
+<P>
+
+<LI>
+Bash contains the <SAMP>`&#60;&#62;'</SAMP> redirection operator, allowing a file to be
+opened for both reading and writing, and the <SAMP>`&#38;&#62;'</SAMP> redirection
+operator, for directing standard output and standard error to the same
+file (see section <A HREF="bashref.html#SEC39">3.6 Redirections</A>).
+<P>
+
+<LI>
+Bash includes the <SAMP>`&#60;&#60;&#60;'</SAMP> redirection operator, allowing a string to
+be used as the standard input to a command.
+<P>
+
+<LI>
+Bash implements the <SAMP>`[n]&#60;&#38;<VAR>word</VAR>'</SAMP> and <SAMP>`[n]&#62;&#38;<VAR>word</VAR>'</SAMP>
+redirection operators, which move one file descriptor to another.
+<P>
+
+<LI>
+Bash treats a number of filenames specially when they are
+used in redirection operators (see section <A HREF="bashref.html#SEC39">3.6 Redirections</A>).
+<P>
+
+<LI>
+Bash can open network connections to arbitrary machines and services
+with the redirection operators (see section <A HREF="bashref.html#SEC39">3.6 Redirections</A>).
+<P>
+
+<LI>
+The <CODE>noclobber</CODE> option is available to avoid overwriting existing
+files with output redirection (see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>).
+The <SAMP>`&#62;|'</SAMP> redirection operator may be used to override <CODE>noclobber</CODE>.
+<P>
+
+<LI>
+The Bash <CODE>cd</CODE> and <CODE>pwd</CODE> builtins (see section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>)
+each take <SAMP>`-L'</SAMP> and <SAMP>`-P'</SAMP> options to switch between logical and
+physical modes.
+<P>
+
+<LI>
+Bash allows a function to override a builtin with the same name, and provides
+access to that builtin's functionality within the function via the
+<CODE>builtin</CODE> and <CODE>command</CODE> builtins (see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>).
+<P>
+
+<LI>
+The <CODE>command</CODE> builtin allows selective disabling of functions
+when command lookup is performed (see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>).
+<P>
+
+<LI>
+Individual builtins may be enabled or disabled using the <CODE>enable</CODE>
+builtin (see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>).
+<P>
+
+<LI>
+The Bash <CODE>exec</CODE> builtin takes additional options that allow users
+to control the contents of the environment passed to the executed
+command, and what the zeroth argument to the command is to be
+(see section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>).
+<P>
+
+<LI>
+Shell functions may be exported to children via the environment
+using <CODE>export -f</CODE> (see section <A HREF="bashref.html#SEC24">3.3 Shell Functions</A>).
+<P>
+
+<LI>
+The Bash <CODE>export</CODE>, <CODE>readonly</CODE>, and <CODE>declare</CODE> builtins can
+take a <SAMP>`-f'</SAMP> option to act on shell functions, a <SAMP>`-p'</SAMP> option to
+display variables with various attributes set in a format that can be
+used as shell input, a <SAMP>`-n'</SAMP> option to remove various variable
+attributes, and <SAMP>`name=value'</SAMP> arguments to set variable attributes
+and values simultaneously.
+<P>
+
+<LI>
+The Bash <CODE>hash</CODE> builtin allows a name to be associated with
+an arbitrary filename, even when that filename cannot be found by
+searching the <CODE>$PATH</CODE>, using <SAMP>`hash -p'</SAMP>
+(see section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>).
+<P>
+
+<LI>
+Bash includes a <CODE>help</CODE> builtin for quick reference to shell
+facilities (see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>).
+<P>
+
+<LI>
+The <CODE>printf</CODE> builtin is available to display formatted output
+(see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>).
+<P>
+
+<LI>
+The Bash <CODE>read</CODE> builtin (see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>)
+will read a line ending in <SAMP>`\'</SAMP> with
+the <SAMP>`-r'</SAMP> option, and will use the <CODE>REPLY</CODE> variable as a
+default if no non-option arguments are supplied.
+The Bash <CODE>read</CODE> builtin
+also accepts a prompt string with the <SAMP>`-p'</SAMP> option and will use
+Readline to obtain the line when given the <SAMP>`-e'</SAMP> option.
+The <CODE>read</CODE> builtin also has additional options to control input:
+the <SAMP>`-s'</SAMP> option will turn off echoing of input characters as
+they are read, the <SAMP>`-t'</SAMP> option will allow <CODE>read</CODE> to time out
+if input does not arrive within a specified number of seconds, the
+<SAMP>`-n'</SAMP> option will allow reading only a specified number of
+characters rather than a full line, and the <SAMP>`-d'</SAMP> option will read
+until a particular character rather than newline.
+<P>
+
+<LI>
+The <CODE>return</CODE> builtin may be used to abort execution of scripts
+executed with the <CODE>.</CODE> or <CODE>source</CODE> builtins
+(see section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>).
+<P>
+
+<LI>
+Bash includes the <CODE>shopt</CODE> builtin, for finer control of shell
+optional capabilities (see section <A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>), and allows these options
+to be set and unset at shell invocation (see section <A HREF="bashref.html#SEC69">6.1 Invoking Bash</A>).
+<P>
+
+<LI>
+Bash has much more optional behavior controllable with the <CODE>set</CODE>
+builtin (see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>).
+<P>
+
+<LI>
+The <SAMP>`-x'</SAMP> (<CODE>xtrace</CODE>) option displays commands other than
+simple commands when performing an execution trace
+(see section <A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>).
+<P>
+
+<LI>
+The <CODE>test</CODE> builtin (see section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>)
+is slightly different, as it implements the POSIX algorithm,
+which specifies the behavior based on the number of arguments.
+<P>
+
+<LI>
+Bash includes the <CODE>caller</CODE> builtin, which displays the context of
+any active subroutine call (a shell function or a script executed with
+the <CODE>.</CODE> or <CODE>source</CODE> builtins). This supports the bash
+debugger.
+<P>
+
+<LI>
+The <CODE>trap</CODE> builtin (see section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>) allows a
+<CODE>DEBUG</CODE> pseudo-signal specification, similar to <CODE>EXIT</CODE>.
+Commands specified with a <CODE>DEBUG</CODE> trap are executed before every
+simple command, <CODE>for</CODE> command, <CODE>case</CODE> command,
+<CODE>select</CODE> command, every arithmetic <CODE>for</CODE> command, and before
+the first command executes in a shell function.
+The <CODE>DEBUG</CODE> trap is not inherited by shell functions unless the
+function has been given the <CODE>trace</CODE> attribute or the
+<CODE>functrace</CODE> option has been enabled using the <CODE>shopt</CODE> builtin.
+The <CODE>extdebug</CODE> shell option has additional effects on the
+<CODE>DEBUG</CODE> trap.
+<P>
+
+The <CODE>trap</CODE> builtin (see section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>) allows an
+<CODE>ERR</CODE> pseudo-signal specification, similar to <CODE>EXIT</CODE> and <CODE>DEBUG</CODE>.
+Commands specified with an <CODE>ERR</CODE> trap are executed after a simple
+command fails, with a few exceptions.
+The <CODE>ERR</CODE> trap is not inherited by shell functions unless the
+<CODE>-o errtrace</CODE> option to the <CODE>set</CODE> builtin is enabled.
+</P><P>
+
+The <CODE>trap</CODE> builtin (see section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>) allows a
+<CODE>RETURN</CODE> pseudo-signal specification, similar to
+<CODE>EXIT</CODE> and <CODE>DEBUG</CODE>.
+Commands specified with an <CODE>RETURN</CODE> trap are executed before
+execution resumes after a shell function or a shell script executed with
+<CODE>.</CODE> or <CODE>source</CODE> returns.
+The <CODE>RETURN</CODE> trap is not inherited by shell functions unless the
+function has been given the <CODE>trace</CODE> attribute or the
+<CODE>functrace</CODE> option has been enabled using the <CODE>shopt</CODE> builtin.
+</P><P>
+
+<LI>
+The Bash <CODE>type</CODE> builtin is more extensive and gives more information
+about the names it finds (see section <A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>).
+<P>
+
+<LI>
+The Bash <CODE>umask</CODE> builtin permits a <SAMP>`-p'</SAMP> option to cause
+the output to be displayed in the form of a <CODE>umask</CODE> command
+that may be reused as input (see section <A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>).
+<P>
+
+<LI>
+Bash implements a <CODE>csh</CODE>-like directory stack, and provides the
+<CODE>pushd</CODE>, <CODE>popd</CODE>, and <CODE>dirs</CODE> builtins to manipulate it
+(see section <A HREF="bashref.html#SEC86">6.8 The Directory Stack</A>).
+Bash also makes the directory stack visible as the value of the
+<CODE>DIRSTACK</CODE> shell variable.
+<P>
+
+<LI>
+Bash interprets special backslash-escaped characters in the prompt
+strings when interactive (see section <A HREF="bashref.html#SEC88">6.9 Controlling the Prompt</A>).
+<P>
+
+<LI>
+The Bash restricted mode is more useful (see section <A HREF="bashref.html#SEC89">6.10 The Restricted Shell</A>);
+the SVR4.2 shell restricted mode is too limited.
+<P>
+
+<LI>
+The <CODE>disown</CODE> builtin can remove a job from the internal shell
+job table (see section <A HREF="bashref.html#SEC93">7.2 Job Control Builtins</A>) or suppress the sending
+of <CODE>SIGHUP</CODE> to a job when the shell exits as the result of a
+<CODE>SIGHUP</CODE>.
+<P>
+
+<LI>
+Bash includes a number of features to support a separate debugger for
+shell scripts.
+<P>
+
+<LI>
+The SVR4.2 shell has two privilege-related builtins
+(<CODE>mldmode</CODE> and <CODE>priv</CODE>) not present in Bash.
+<P>
+
+<LI>
+Bash does not have the <CODE>stop</CODE> or <CODE>newgrp</CODE> builtins.
+<P>
+
+<LI>
+Bash does not use the <CODE>SHACCT</CODE> variable or perform shell accounting.
+<P>
+
+<LI>
+The SVR4.2 <CODE>sh</CODE> uses a <CODE>TIMEOUT</CODE> variable like Bash uses
+<CODE>TMOUT</CODE>.
+<P>
+
+</UL>
+<P>
+
+More features unique to Bash may be found in <A HREF="bashref.html#SEC68">6. Bash Features</A>.
+</P><P>
+
+<HR SIZE="6">
+<A NAME="SEC137"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC136"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC138"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC136"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC136"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC138"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> B.1 Implementation Differences From The SVR4.2 Shell </H2>
+<!--docid::SEC137::-->
+<P>
+
+Since Bash is a completely new implementation, it does not suffer from
+many of the limitations of the SVR4.2 shell. For instance:
+</P><P>
+
+<UL>
+
+<LI>
+Bash does not fork a subshell when redirecting into or out of
+a shell control structure such as an <CODE>if</CODE> or <CODE>while</CODE>
+statement.
+<P>
+
+<LI>
+Bash does not allow unbalanced quotes. The SVR4.2 shell will silently
+insert a needed closing quote at <CODE>EOF</CODE> under certain circumstances.
+This can be the cause of some hard-to-find errors.
+<P>
+
+<LI>
+The SVR4.2 shell uses a baroque memory management scheme based on
+trapping <CODE>SIGSEGV</CODE>. If the shell is started from a process with
+<CODE>SIGSEGV</CODE> blocked (e.g., by using the <CODE>system()</CODE> C library
+function call), it misbehaves badly.
+<P>
+
+<LI>
+In a questionable attempt at security, the SVR4.2 shell,
+when invoked without the <SAMP>`-p'</SAMP> option, will alter its real
+and effective UID and GID if they are less than some
+magic threshold value, commonly 100.
+This can lead to unexpected results.
+<P>
+
+<LI>
+The SVR4.2 shell does not allow users to trap <CODE>SIGSEGV</CODE>,
+<CODE>SIGALRM</CODE>, or <CODE>SIGCHLD</CODE>.
+<P>
+
+<LI>
+The SVR4.2 shell does not allow the <CODE>IFS</CODE>, <CODE>MAILCHECK</CODE>,
+<CODE>PATH</CODE>, <CODE>PS1</CODE>, or <CODE>PS2</CODE> variables to be unset.
+<P>
+
+<LI>
+The SVR4.2 shell treats <SAMP>`^'</SAMP> as the undocumented equivalent of
+<SAMP>`|'</SAMP>.
+<P>
+
+<LI>
+Bash allows multiple option arguments when it is invoked (<CODE>-x -v</CODE>);
+the SVR4.2 shell allows only one option argument (<CODE>-xv</CODE>). In
+fact, some versions of the shell dump core if the second argument begins
+with a <SAMP>`-'</SAMP>.
+<P>
+
+<LI>
+The SVR4.2 shell exits a script if any builtin fails; Bash exits
+a script only if one of the POSIX special builtins fails, and
+only for certain failures, as enumerated in the POSIX standard.
+<P>
+
+<LI>
+The SVR4.2 shell behaves differently when invoked as <CODE>jsh</CODE>
+(it turns on job control).
+</UL>
+<P>
+
+<A NAME="GNU Free Documentation License"></A>
+<HR SIZE="6">
+<A NAME="SEC138"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC137"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140"> &gt;&gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> C. GNU Free Documentation License </H1>
+<!--docid::SEC138::-->
+<P>
+
+<center>
+ Version 1.3, 3 November 2008
+</center>
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=display><pre style="font-family: serif">Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+<A HREF="http://fsf.org/">http://fsf.org/</A>
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+</pre></td></tr></table></P><P>
+
+<OL>
+<LI>
+PREAMBLE
+<P>
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document <EM>free</EM> in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+</P><P>
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+</P><P>
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+</P><P>
+
+<LI>
+APPLICABILITY AND DEFINITIONS
+<P>
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The "Document", below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as "you". You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+</P><P>
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+</P><P>
+
+A "Secondary Section" is a named appendix or a front-matter section
+of the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject. (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+</P><P>
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
+</P><P>
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+</P><P>
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not "Transparent" is called "Opaque".
+</P><P>
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input
+format, <FONT SIZE="-1">SGML</FONT> or <FONT SIZE="-1">XML</FONT> using a publicly available
+<FONT SIZE="-1">DTD</FONT>, and standard-conforming simple <FONT SIZE="-1">HTML</FONT>,
+PostScript or <FONT SIZE="-1">PDF</FONT> designed for human modification. Examples
+of transparent image formats include <FONT SIZE="-1">PNG</FONT>, <FONT SIZE="-1">XCF</FONT> and
+<FONT SIZE="-1">JPG</FONT>. Opaque formats include proprietary formats that can be
+read and edited only by proprietary word processors, <FONT SIZE="-1">SGML</FONT> or
+<FONT SIZE="-1">XML</FONT> for which the <FONT SIZE="-1">DTD</FONT> and/or processing tools are
+not generally available, and the machine-generated <FONT SIZE="-1">HTML</FONT>,
+PostScript or <FONT SIZE="-1">PDF</FONT> produced by some word processors for
+output purposes only.
+</P><P>
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+</P><P>
+
+The "publisher" means any person or entity that distributes copies
+of the Document to the public.
+</P><P>
+
+A section "Entitled XYZ" means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as "Acknowledgements",
+"Dedications", "Endorsements", or "History".) To "Preserve the Title"
+of such a section when you modify the Document means that it remains a
+section "Entitled XYZ" according to this definition.
+</P><P>
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+</P><P>
+
+<LI>
+VERBATIM COPYING
+<P>
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+</P><P>
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+</P><P>
+
+<LI>
+COPYING IN QUANTITY
+<P>
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+</P><P>
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+</P><P>
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+</P><P>
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+</P><P>
+
+<LI>
+MODIFICATIONS
+<P>
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+</P><P>
+
+<OL>
+<LI>
+Use in the Title Page (and on the covers, if any) a title distinct
+from that of the Document, and from those of previous versions
+(which should, if there were any, be listed in the History section
+of the Document). You may use the same title as a previous version
+if the original publisher of that version gives permission.
+<P>
+
+<LI>
+List on the Title Page, as authors, one or more persons or entities
+responsible for authorship of the modifications in the Modified
+Version, together with at least five of the principal authors of the
+Document (all of its principal authors, if it has fewer than five),
+unless they release you from this requirement.
+<P>
+
+<LI>
+State on the Title page the name of the publisher of the
+Modified Version, as the publisher.
+<P>
+
+<LI>
+Preserve all the copyright notices of the Document.
+<P>
+
+<LI>
+Add an appropriate copyright notice for your modifications
+adjacent to the other copyright notices.
+<P>
+
+<LI>
+Include, immediately after the copyright notices, a license notice
+giving the public permission to use the Modified Version under the
+terms of this License, in the form shown in the Addendum below.
+<P>
+
+<LI>
+Preserve in that license notice the full lists of Invariant Sections
+and required Cover Texts given in the Document's license notice.
+<P>
+
+<LI>
+Include an unaltered copy of this License.
+<P>
+
+<LI>
+Preserve the section Entitled "History", Preserve its Title, and add
+to it an item stating at least the title, year, new authors, and
+publisher of the Modified Version as given on the Title Page. If
+there is no section Entitled "History" in the Document, create one
+stating the title, year, authors, and publisher of the Document as
+given on its Title Page, then add an item describing the Modified
+Version as stated in the previous sentence.
+<P>
+
+<LI>
+Preserve the network location, if any, given in the Document for
+public access to a Transparent copy of the Document, and likewise
+the network locations given in the Document for previous versions
+it was based on. These may be placed in the "History" section.
+You may omit a network location for a work that was published at
+least four years before the Document itself, or if the original
+publisher of the version it refers to gives permission.
+<P>
+
+<LI>
+For any section Entitled "Acknowledgements" or "Dedications", Preserve
+the Title of the section, and preserve in the section all the
+substance and tone of each of the contributor acknowledgements and/or
+dedications given therein.
+<P>
+
+<LI>
+Preserve all the Invariant Sections of the Document,
+unaltered in their text and in their titles. Section numbers
+or the equivalent are not considered part of the section titles.
+<P>
+
+<LI>
+Delete any section Entitled "Endorsements". Such a section
+may not be included in the Modified Version.
+<P>
+
+<LI>
+Do not retitle any existing section to be Entitled "Endorsements" or
+to conflict in title with any Invariant Section.
+<P>
+
+<LI>
+Preserve any Warranty Disclaimers.
+</OL>
+<P>
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+</P><P>
+
+You may add a section Entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+</P><P>
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+</P><P>
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+</P><P>
+
+<LI>
+COMBINING DOCUMENTS
+<P>
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+</P><P>
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+</P><P>
+
+In the combination, you must combine any sections Entitled "History"
+in the various original documents, forming one section Entitled
+"History"; likewise combine any sections Entitled "Acknowledgements",
+and any sections Entitled "Dedications". You must delete all
+sections Entitled "Endorsements."
+</P><P>
+
+<LI>
+COLLECTIONS OF DOCUMENTS
+<P>
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+</P><P>
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+</P><P>
+
+<LI>
+AGGREGATION WITH INDEPENDENT WORKS
+<P>
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an "aggregate" if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+</P><P>
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+</P><P>
+
+<LI>
+TRANSLATION
+<P>
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+</P><P>
+
+If a section in the Document is Entitled "Acknowledgements",
+"Dedications", or "History", the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+</P><P>
+
+<LI>
+TERMINATION
+<P>
+
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+</P><P>
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+</P><P>
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+</P><P>
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
+</P><P>
+
+<LI>
+FUTURE REVISIONS OF THIS LICENSE
+<P>
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+<A HREF="http://www.gnu.org/copyleft/">http://www.gnu.org/copyleft/</A>.
+</P><P>
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation. If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+</P><P>
+
+<LI>
+RELICENSING
+<P>
+
+"Massive Multiauthor Collaboration Site" (or "MMC Site") means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works. A
+public wiki that anybody can edit is an example of such a server. A
+"Massive Multiauthor Collaboration" (or "MMC") contained in the
+site means any set of copyrightable works thus published on the MMC
+site.
+</P><P>
+
+"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+</P><P>
+
+"Incorporate" means to publish or republish a Document, in whole or
+in part, as part of another Document.
+</P><P>
+
+An MMC is "eligible for relicensing" if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole
+or in part into the MMC, (1) had no cover texts or invariant sections,
+and (2) were thus incorporated prior to November 1, 2008.
+</P><P>
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+</P><P>
+
+</OL>
+<P>
+
+<A NAME="SEC139"></A>
+<H2> ADDENDUM: How to use this License for your documents </H2>
+<!--docid::SEC139::-->
+<P>
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre> Copyright (C) <VAR>year</VAR> <VAR>your name</VAR>.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
+ Texts. A copy of the license is included in the section entitled ``GNU
+ Free Documentation License''.
+</FONT></pre></td></tr></table></P><P>
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the "with<small>...</small>Texts." line with this:
+</P><P>
+
+<TABLE><tr><td>&nbsp;</td><td class=smallexample><FONT SIZE=-1><pre> with the Invariant Sections being <VAR>list their titles</VAR>, with
+ the Front-Cover Texts being <VAR>list</VAR>, and with the Back-Cover Texts
+ being <VAR>list</VAR>.
+</FONT></pre></td></tr></table></P><P>
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+</P><P>
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+</P><P>
+
+<A NAME="Indexes"></A>
+<HR SIZE="6">
+<A NAME="SEC140"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC138"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC141"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1> D. Indexes </H1>
+<!--docid::SEC140::-->
+<P>
+
+<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC141">D.1 Index of Shell Builtin Commands</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Index of Bash builtin commands.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC142">D.2 Index of Shell Reserved Words</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Index of Bash reserved words.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC143">D.3 Parameter and Variable Index</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Quick reference helps you find the
+ variable you want.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC144">D.4 Function Index</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">Index of bindable Readline functions.</TD></TR>
+<TR><TD ALIGN="left" VALIGN="TOP"><A HREF="bashref.html#SEC145">D.5 Concept Index</A></TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">General index for concepts described in
+ this manual.</TD></TR>
+</TABLE></BLOCKQUOTE>
+<P>
+
+<A NAME="Builtin Index"></A>
+<HR SIZE="6">
+<A NAME="SEC141"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC142"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> D.1 Index of Shell Builtin Commands </H2>
+<!--docid::SEC141::-->
+<table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#bt_." style="text-decoration:none"><b>.</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_:" style="text-decoration:none"><b>:</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_[" style="text-decoration:none"><b>[</b></A>
+ &nbsp;
+<BR>
+<A HREF="bashref.html#bt_A" style="text-decoration:none"><b>A</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_B" style="text-decoration:none"><b>B</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_C" style="text-decoration:none"><b>C</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_D" style="text-decoration:none"><b>D</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_E" style="text-decoration:none"><b>E</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_F" style="text-decoration:none"><b>F</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_G" style="text-decoration:none"><b>G</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_H" style="text-decoration:none"><b>H</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_J" style="text-decoration:none"><b>J</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_K" style="text-decoration:none"><b>K</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_L" style="text-decoration:none"><b>L</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_M" style="text-decoration:none"><b>M</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_P" style="text-decoration:none"><b>P</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_R" style="text-decoration:none"><b>R</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_S" style="text-decoration:none"><b>S</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_T" style="text-decoration:none"><b>T</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_U" style="text-decoration:none"><b>U</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_W" style="text-decoration:none"><b>W</b></A>
+ &nbsp;
+</td></tr></table><br><P></P>
+<TABLE border=0>
+<TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_."></A>.</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX69"><CODE>.</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_:"></A>:</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX68"><CODE>:</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_["></A>[</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX84"><CODE>[</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_A"></A>A</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX89"><CODE>alias</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_B"></A>B</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX293"><CODE>bg</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC93">7.2 Job Control Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX90"><CODE>bind</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX70"><CODE>break</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX91"><CODE>builtin</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_C"></A>C</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX92"><CODE>caller</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX71"><CODE>cd</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX93"><CODE>command</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX540"><CODE>compgen</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX541"><CODE>complete</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX542"><CODE>compopt</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX72"><CODE>continue</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_D"></A>D</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX94"><CODE>declare</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX290"><CODE>dirs</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC87">6.8.1 Directory Stack Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX298"><CODE>disown</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC93">7.2 Job Control Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_E"></A>E</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX95"><CODE>echo</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX96"><CODE>enable</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX73"><CODE>eval</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX74"><CODE>exec</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX75"><CODE>exit</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX76"><CODE>export</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_F"></A>F</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX544"><CODE>fc</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC121">9.2 Bash History Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX294"><CODE>fg</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC93">7.2 Job Control Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_G"></A>G</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX77"><CODE>getopts</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_H"></A>H</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX78"><CODE>hash</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX97"><CODE>help</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX545"><CODE>history</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC121">9.2 Bash History Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_J"></A>J</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX295"><CODE>jobs</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC93">7.2 Job Control Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_K"></A>K</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX296"><CODE>kill</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC93">7.2 Job Control Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_L"></A>L</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX98"><CODE>let</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX99"><CODE>local</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX100"><CODE>logout</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_M"></A>M</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX101"><CODE>mapfile</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_P"></A>P</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX291"><CODE>popd</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC87">6.8.1 Directory Stack Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX102"><CODE>printf</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX292"><CODE>pushd</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC87">6.8.1 Directory Stack Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX79"><CODE>pwd</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_R"></A>R</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX103"><CODE>read</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX104"><CODE>readarray</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX80"><CODE>readonly</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX81"><CODE>return</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_S"></A>S</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX110"><CODE>set</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX82"><CODE>shift</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX111"><CODE>shopt</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX105"><CODE>source</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX299"><CODE>suspend</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC93">7.2 Job Control Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_T"></A>T</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX83"><CODE>test</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX85"><CODE>times</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX86"><CODE>trap</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX106"><CODE>type</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX107"><CODE>typeset</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_U"></A>U</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX108"><CODE>ulimit</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX87"><CODE>umask</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX109"><CODE>unalias</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX88"><CODE>unset</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="bt_W"></A>W</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX297"><CODE>wait</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC93">7.2 Job Control Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+</TABLE><P></P><table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#bt_." style="text-decoration:none"><b>.</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_:" style="text-decoration:none"><b>:</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_[" style="text-decoration:none"><b>[</b></A>
+ &nbsp;
+<BR>
+<A HREF="bashref.html#bt_A" style="text-decoration:none"><b>A</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_B" style="text-decoration:none"><b>B</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_C" style="text-decoration:none"><b>C</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_D" style="text-decoration:none"><b>D</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_E" style="text-decoration:none"><b>E</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_F" style="text-decoration:none"><b>F</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_G" style="text-decoration:none"><b>G</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_H" style="text-decoration:none"><b>H</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_J" style="text-decoration:none"><b>J</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_K" style="text-decoration:none"><b>K</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_L" style="text-decoration:none"><b>L</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_M" style="text-decoration:none"><b>M</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_P" style="text-decoration:none"><b>P</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_R" style="text-decoration:none"><b>R</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_S" style="text-decoration:none"><b>S</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_T" style="text-decoration:none"><b>T</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_U" style="text-decoration:none"><b>U</b></A>
+ &nbsp;
+<A HREF="bashref.html#bt_W" style="text-decoration:none"><b>W</b></A>
+ &nbsp;
+</td></tr></table><br><P>
+
+<A NAME="Reserved Word Index"></A>
+<HR SIZE="6">
+<A NAME="SEC142"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC141"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC143"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC143"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> D.2 Index of Shell Reserved Words </H2>
+<!--docid::SEC142::-->
+<table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#rw_!" style="text-decoration:none"><b>!</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_[" style="text-decoration:none"><b>[</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_]" style="text-decoration:none"><b>]</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_{" style="text-decoration:none"><b>{</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_}" style="text-decoration:none"><b>}</b></A>
+ &nbsp;
+<BR>
+<A HREF="bashref.html#rw_C" style="text-decoration:none"><b>C</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_D" style="text-decoration:none"><b>D</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_E" style="text-decoration:none"><b>E</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_F" style="text-decoration:none"><b>F</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_I" style="text-decoration:none"><b>I</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_S" style="text-decoration:none"><b>S</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_T" style="text-decoration:none"><b>T</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_U" style="text-decoration:none"><b>U</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_W" style="text-decoration:none"><b>W</b></A>
+ &nbsp;
+</td></tr></table><br><P></P>
+<TABLE border=0>
+<TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="rw_!"></A>!</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX25"><CODE>!</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC17">3.2.2 Pipelines</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="rw_["></A>[</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX41"><CODE>[[</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="rw_]"></A>]</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX42"><CODE>]]</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="rw_{"></A>{</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX43"><CODE>{</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC22">3.2.4.3 Grouping Commands</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="rw_}"></A>}</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX44"><CODE>}</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC22">3.2.4.3 Grouping Commands</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="rw_C"></A>C</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX37"><CODE>case</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="rw_D"></A>D</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX28"><CODE>do</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX29"><CODE>done</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="rw_E"></A>E</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX35"><CODE>elif</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX34"><CODE>else</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX39"><CODE>esac</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="rw_F"></A>F</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX36"><CODE>fi</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX31"><CODE>for</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX45"><CODE>function</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC24">3.3 Shell Functions</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="rw_I"></A>I</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX32"><CODE>if</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX38"><CODE>in</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="rw_S"></A>S</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX40"><CODE>select</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="rw_T"></A>T</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX33"><CODE>then</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX24"><CODE>time</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC17">3.2.2 Pipelines</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="rw_U"></A>U</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX27"><CODE>until</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="rw_W"></A>W</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX30"><CODE>while</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+</TABLE><P></P><table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#rw_!" style="text-decoration:none"><b>!</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_[" style="text-decoration:none"><b>[</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_]" style="text-decoration:none"><b>]</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_{" style="text-decoration:none"><b>{</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_}" style="text-decoration:none"><b>}</b></A>
+ &nbsp;
+<BR>
+<A HREF="bashref.html#rw_C" style="text-decoration:none"><b>C</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_D" style="text-decoration:none"><b>D</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_E" style="text-decoration:none"><b>E</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_F" style="text-decoration:none"><b>F</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_I" style="text-decoration:none"><b>I</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_S" style="text-decoration:none"><b>S</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_T" style="text-decoration:none"><b>T</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_U" style="text-decoration:none"><b>U</b></A>
+ &nbsp;
+<A HREF="bashref.html#rw_W" style="text-decoration:none"><b>W</b></A>
+ &nbsp;
+</td></tr></table><br><P>
+
+<A NAME="Variable Index"></A>
+<HR SIZE="6">
+<A NAME="SEC143"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC142"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC144"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC144"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> D.3 Parameter and Variable Index </H2>
+<!--docid::SEC143::-->
+<table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#vr_!" style="text-decoration:none"><b>!</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_#" style="text-decoration:none"><b>#</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_$" style="text-decoration:none"><b>$</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_*" style="text-decoration:none"><b>*</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_-" style="text-decoration:none"><b>-</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_0" style="text-decoration:none"><b>0</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_?" style="text-decoration:none"><b>?</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_@" style="text-decoration:none"><b>@</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr__" style="text-decoration:none"><b>_</b></A>
+ &nbsp;
+<BR>
+<A HREF="bashref.html#vr_A" style="text-decoration:none"><b>A</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_B" style="text-decoration:none"><b>B</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_C" style="text-decoration:none"><b>C</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_D" style="text-decoration:none"><b>D</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_E" style="text-decoration:none"><b>E</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_F" style="text-decoration:none"><b>F</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_G" style="text-decoration:none"><b>G</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_H" style="text-decoration:none"><b>H</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_I" style="text-decoration:none"><b>I</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_K" style="text-decoration:none"><b>K</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_L" style="text-decoration:none"><b>L</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_M" style="text-decoration:none"><b>M</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_O" style="text-decoration:none"><b>O</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_P" style="text-decoration:none"><b>P</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_R" style="text-decoration:none"><b>R</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_S" style="text-decoration:none"><b>S</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_T" style="text-decoration:none"><b>T</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_U" style="text-decoration:none"><b>U</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_V" style="text-decoration:none"><b>V</b></A>
+ &nbsp;
+</td></tr></table><br><P></P>
+<TABLE border=0>
+<TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_!"></A>!</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX58"><CODE>!</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX59"><CODE>!</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_#"></A>#</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX50"><CODE>#</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX51"><CODE>#</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_$"></A>$</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX56"><CODE>$</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX57"><CODE>$</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_*"></A>*</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX46"><CODE>*</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX47"><CODE>*</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_-"></A>-</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX54"><CODE>-</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX55"><CODE>-</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_0"></A>0</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX60"><CODE>0</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX61"><CODE>0</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_?"></A>?</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX52"><CODE>?</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX53"><CODE>?</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_@"></A>@</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX48"><CODE>@</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX49"><CODE>@</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr__"></A>_</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX62"><CODE>_</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX63"><CODE>_</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_A"></A>A</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX300"><CODE>auto_resume</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC94">7.3 Job Control Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX301"><CODE>auto_resume</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC94">7.3 Job Control Variables</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_B"></A>B</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX132"><CODE>BASH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX133"><CODE>BASH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX138"><CODE>BASH_ALIASES</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX139"><CODE>BASH_ALIASES</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX140"><CODE>BASH_ARGC</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX141"><CODE>BASH_ARGC</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX142"><CODE>BASH_ARGV</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX143"><CODE>BASH_ARGV</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX144"><CODE>BASH_CMDS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX145"><CODE>BASH_CMDS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX146"><CODE>BASH_COMMAND</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX147"><CODE>BASH_COMMAND</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX148"><CODE>BASH_ENV</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX149"><CODE>BASH_ENV</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX150"><CODE>BASH_EXECUTION_STRING</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX151"><CODE>BASH_EXECUTION_STRING</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX152"><CODE>BASH_LINENO</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX153"><CODE>BASH_LINENO</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX154"><CODE>BASH_REMATCH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX155"><CODE>BASH_REMATCH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX156"><CODE>BASH_SOURCE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX157"><CODE>BASH_SOURCE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX158"><CODE>BASH_SUBSHELL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX159"><CODE>BASH_SUBSHELL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX160"><CODE>BASH_VERSINFO</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX161"><CODE>BASH_VERSINFO</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX162"><CODE>BASH_VERSION</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX163"><CODE>BASH_VERSION</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX164"><CODE>BASH_XTRACEFD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX165"><CODE>BASH_XTRACEFD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX134"><CODE>BASHOPTS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX135"><CODE>BASHOPTS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX136"><CODE>BASHPID</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX137"><CODE>BASHPID</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX307"><CODE>bell-style</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX308"><CODE>bind-tty-special-chars</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_C"></A>C</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX112"><CODE>CDPATH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX113"><CODE>CDPATH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX166"><CODE>COLUMNS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX167"><CODE>COLUMNS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX309"><CODE>comment-begin</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX168"><CODE>COMP_CWORD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX169"><CODE>COMP_CWORD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX176"><CODE>COMP_KEY</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX177"><CODE>COMP_KEY</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX170"><CODE>COMP_LINE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX171"><CODE>COMP_LINE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX172"><CODE>COMP_POINT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX173"><CODE>COMP_POINT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX174"><CODE>COMP_TYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX175"><CODE>COMP_TYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX178"><CODE>COMP_WORDBREAKS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX179"><CODE>COMP_WORDBREAKS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX180"><CODE>COMP_WORDS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX181"><CODE>COMP_WORDS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX310"><CODE>completion-prefix-display-length</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX311"><CODE>completion-query-items</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX182"><CODE>COMPREPLY</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX183"><CODE>COMPREPLY</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX312"><CODE>convert-meta</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_D"></A>D</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX184"><CODE>DIRSTACK</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX185"><CODE>DIRSTACK</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX313"><CODE>disable-completion</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_E"></A>E</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX314"><CODE>editing-mode</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX186"><CODE>EMACS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX187"><CODE>EMACS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX315"><CODE>enable-keypad</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX188"><CODE>EUID</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX189"><CODE>EUID</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX316"><CODE>expand-tilde</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_F"></A>F</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX190"><CODE>FCEDIT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX191"><CODE>FCEDIT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX192"><CODE>FIGNORE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX193"><CODE>FIGNORE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX194"><CODE>FUNCNAME</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX195"><CODE>FUNCNAME</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_G"></A>G</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX196"><CODE>GLOBIGNORE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX197"><CODE>GLOBIGNORE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX198"><CODE>GROUPS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX199"><CODE>GROUPS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_H"></A>H</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX200"><CODE>histchars</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX201"><CODE>histchars</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX202"><CODE>HISTCMD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX203"><CODE>HISTCMD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX204"><CODE>HISTCONTROL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX205"><CODE>HISTCONTROL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX206"><CODE>HISTFILE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX207"><CODE>HISTFILE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX208"><CODE>HISTFILESIZE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX209"><CODE>HISTFILESIZE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX210"><CODE>HISTIGNORE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX211"><CODE>HISTIGNORE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX317"><CODE>history-preserve-point</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX318"><CODE>history-size</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX212"><CODE>HISTSIZE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX213"><CODE>HISTSIZE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX214"><CODE>HISTTIMEFORMAT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX215"><CODE>HISTTIMEFORMAT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX114"><CODE>HOME</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX115"><CODE>HOME</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX319"><CODE>horizontal-scroll-mode</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX216"><CODE>HOSTFILE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX217"><CODE>HOSTFILE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX218"><CODE>HOSTNAME</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX219"><CODE>HOSTNAME</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX220"><CODE>HOSTTYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX221"><CODE>HOSTTYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_I"></A>I</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX116"><CODE>IFS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX117"><CODE>IFS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX222"><CODE>IGNOREEOF</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX223"><CODE>IGNOREEOF</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX320"><CODE>input-meta</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX224"><CODE>INPUTRC</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX225"><CODE>INPUTRC</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX322"><CODE>isearch-terminators</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_K"></A>K</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX323"><CODE>keymap</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_L"></A>L</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX226"><CODE>LANG</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX227"><CODE>LANG</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX228"><CODE>LC_ALL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX229"><CODE>LC_ALL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX230"><CODE>LC_COLLATE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX231"><CODE>LC_COLLATE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX232"><CODE>LC_CTYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX233"><CODE>LC_CTYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX21"><CODE>LC_MESSAGES</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX234"><CODE>LC_MESSAGES</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX235"><CODE>LC_MESSAGES</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX236"><CODE>LC_NUMERIC</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX237"><CODE>LC_NUMERIC</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX238"><CODE>LINENO</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX239"><CODE>LINENO</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX240"><CODE>LINES</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX241"><CODE>LINES</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_M"></A>M</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX242"><CODE>MACHTYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX243"><CODE>MACHTYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX118"><CODE>MAIL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX119"><CODE>MAIL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX244"><CODE>MAILCHECK</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX245"><CODE>MAILCHECK</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX120"><CODE>MAILPATH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX121"><CODE>MAILPATH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX324"><CODE>mark-modified-lines</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX325"><CODE>mark-symlinked-directories</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX326"><CODE>match-hidden-files</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX321"><CODE>meta-flag</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_O"></A>O</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX246"><CODE>OLDPWD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX247"><CODE>OLDPWD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX122"><CODE>OPTARG</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX123"><CODE>OPTARG</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX248"><CODE>OPTERR</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX249"><CODE>OPTERR</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX124"><CODE>OPTIND</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX125"><CODE>OPTIND</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX250"><CODE>OSTYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX251"><CODE>OSTYPE</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX327"><CODE>output-meta</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_P"></A>P</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX328"><CODE>page-completions</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX126"><CODE>PATH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX127"><CODE>PATH</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX252"><CODE>PIPESTATUS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX253"><CODE>PIPESTATUS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX254"><CODE>POSIXLY_CORRECT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX255"><CODE>POSIXLY_CORRECT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX256"><CODE>PPID</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX257"><CODE>PPID</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX258"><CODE>PROMPT_COMMAND</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX259"><CODE>PROMPT_COMMAND</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX260"><CODE>PROMPT_DIRTRIM</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX261"><CODE>PROMPT_DIRTRIM</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX128"><CODE>PS1</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX129"><CODE>PS1</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX130"><CODE>PS2</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX131"><CODE>PS2</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX262"><CODE>PS3</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX263"><CODE>PS3</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX264"><CODE>PS4</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX265"><CODE>PS4</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX266"><CODE>PWD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX267"><CODE>PWD</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_R"></A>R</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX268"><CODE>RANDOM</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX269"><CODE>RANDOM</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX270"><CODE>REPLY</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX271"><CODE>REPLY</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX329"><CODE>revert-all-at-newline</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_S"></A>S</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX272"><CODE>SECONDS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX273"><CODE>SECONDS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX274"><CODE>SHELL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX275"><CODE>SHELL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX276"><CODE>SHELLOPTS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX277"><CODE>SHELLOPTS</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX278"><CODE>SHLVL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX279"><CODE>SHLVL</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX330"><CODE>show-all-if-ambiguous</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX331"><CODE>show-all-if-unmodified</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX332"><CODE>skip-completed-text</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_T"></A>T</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX22"><CODE>TEXTDOMAIN</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX23"><CODE>TEXTDOMAINDIR</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX280"><CODE>TIMEFORMAT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX281"><CODE>TIMEFORMAT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX282"><CODE>TMOUT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX283"><CODE>TMOUT</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX284"><CODE>TMPDIR</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX285"><CODE>TMPDIR</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_U"></A>U</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX286"><CODE>UID</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX287"><CODE>UID</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC67">5.2 Bash Variables</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="vr_V"></A>V</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX333"><CODE>visible-stats</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+</TABLE><P></P><table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#vr_!" style="text-decoration:none"><b>!</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_#" style="text-decoration:none"><b>#</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_$" style="text-decoration:none"><b>$</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_*" style="text-decoration:none"><b>*</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_-" style="text-decoration:none"><b>-</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_0" style="text-decoration:none"><b>0</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_?" style="text-decoration:none"><b>?</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_@" style="text-decoration:none"><b>@</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr__" style="text-decoration:none"><b>_</b></A>
+ &nbsp;
+<BR>
+<A HREF="bashref.html#vr_A" style="text-decoration:none"><b>A</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_B" style="text-decoration:none"><b>B</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_C" style="text-decoration:none"><b>C</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_D" style="text-decoration:none"><b>D</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_E" style="text-decoration:none"><b>E</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_F" style="text-decoration:none"><b>F</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_G" style="text-decoration:none"><b>G</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_H" style="text-decoration:none"><b>H</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_I" style="text-decoration:none"><b>I</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_K" style="text-decoration:none"><b>K</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_L" style="text-decoration:none"><b>L</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_M" style="text-decoration:none"><b>M</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_O" style="text-decoration:none"><b>O</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_P" style="text-decoration:none"><b>P</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_R" style="text-decoration:none"><b>R</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_S" style="text-decoration:none"><b>S</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_T" style="text-decoration:none"><b>T</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_U" style="text-decoration:none"><b>U</b></A>
+ &nbsp;
+<A HREF="bashref.html#vr_V" style="text-decoration:none"><b>V</b></A>
+ &nbsp;
+</td></tr></table><br><P>
+
+<A NAME="Function Index"></A>
+<HR SIZE="6">
+<A NAME="SEC144"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC143"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC145"> &gt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC145"> &lt;&lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> D.4 Function Index </H2>
+<!--docid::SEC144::-->
+<table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#fn_A" style="text-decoration:none"><b>A</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_B" style="text-decoration:none"><b>B</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_C" style="text-decoration:none"><b>C</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_D" style="text-decoration:none"><b>D</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_E" style="text-decoration:none"><b>E</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_F" style="text-decoration:none"><b>F</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_G" style="text-decoration:none"><b>G</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_H" style="text-decoration:none"><b>H</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_I" style="text-decoration:none"><b>I</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_K" style="text-decoration:none"><b>K</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_M" style="text-decoration:none"><b>M</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_N" style="text-decoration:none"><b>N</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_O" style="text-decoration:none"><b>O</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_P" style="text-decoration:none"><b>P</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_Q" style="text-decoration:none"><b>Q</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_R" style="text-decoration:none"><b>R</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_S" style="text-decoration:none"><b>S</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_T" style="text-decoration:none"><b>T</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_U" style="text-decoration:none"><b>U</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_Y" style="text-decoration:none"><b>Y</b></A>
+ &nbsp;
+</td></tr></table><br><P></P>
+<TABLE border=0>
+<TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_A"></A>A</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX486"><CODE>abort (C-g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX487"><CODE>abort (C-g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX354"><CODE>accept-line (Newline or Return)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX355"><CODE>accept-line (Newline or Return)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX530"><CODE>alias-expand-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX531"><CODE>alias-expand-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_B"></A>B</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX340"><CODE>backward-char (C-b)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX341"><CODE>backward-char (C-b)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX382"><CODE>backward-delete-char (Rubout)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX383"><CODE>backward-delete-char (Rubout)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX404"><CODE>backward-kill-line (C-x Rubout)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX405"><CODE>backward-kill-line (C-x Rubout)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX416"><CODE>backward-kill-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX417"><CODE>backward-kill-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX412"><CODE>backward-kill-word (M-<KBD>DEL</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX413"><CODE>backward-kill-word (M-<KBD>DEL</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX344"><CODE>backward-word (M-b)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX345"><CODE>backward-word (M-b)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX360"><CODE>beginning-of-history (M-&#38;#60;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX361"><CODE>beginning-of-history (M-&#38;#60;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX334"><CODE>beginning-of-line (C-a)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX335"><CODE>beginning-of-line (C-a)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_C"></A>C</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX482"><CODE>call-last-kbd-macro (C-x e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX483"><CODE>call-last-kbd-macro (C-x e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX398"><CODE>capitalize-word (M-c)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX399"><CODE>capitalize-word (M-c)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX502"><CODE>character-search (C-])</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX503"><CODE>character-search (C-])</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX504"><CODE>character-search-backward (M-C-])</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX505"><CODE>character-search-backward (M-C-])</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX350"><CODE>clear-screen (C-l)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX351"><CODE>clear-screen (C-l)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX440"><CODE>complete (<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX441"><CODE>complete (<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX468"><CODE>complete-command (M-!)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX469"><CODE>complete-command (M-!)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX452"><CODE>complete-filename (M-/)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX453"><CODE>complete-filename (M-/)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX464"><CODE>complete-hostname (M-@)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX465"><CODE>complete-hostname (M-@)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX476"><CODE>complete-into-braces (M-{)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX477"><CODE>complete-into-braces (M-{)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX456"><CODE>complete-username (M-~)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX457"><CODE>complete-username (M-~)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX460"><CODE>complete-variable (M-$)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX461"><CODE>complete-variable (M-$)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX428"><CODE>copy-backward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX429"><CODE>copy-backward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX430"><CODE>copy-forward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX431"><CODE>copy-forward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX426"><CODE>copy-region-as-kill ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX427"><CODE>copy-region-as-kill ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_D"></A>D</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX474"><CODE>dabbrev-expand ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX475"><CODE>dabbrev-expand ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX380"><CODE>delete-char (C-d)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX381"><CODE>delete-char (C-d)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX450"><CODE>delete-char-or-list ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX451"><CODE>delete-char-or-list ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX422"><CODE>delete-horizontal-space ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX423"><CODE>delete-horizontal-space ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX436"><CODE>digit-argument (<KBD>M-0</KBD>, <KBD>M-1</KBD>, &#60;small&#62;...&#60;/small&#62; <KBD>M--</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC112">8.4.5 Specifying Numeric Arguments</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX437"><CODE>digit-argument (<KBD>M-0</KBD>, <KBD>M-1</KBD>, &#60;small&#62;...&#60;/small&#62; <KBD>M--</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC112">8.4.5 Specifying Numeric Arguments</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX522"><CODE>display-shell-version (C-x C-v)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX523"><CODE>display-shell-version (C-x C-v)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX488"><CODE>do-uppercase-version (M-a, M-b, M-<VAR>x</VAR>, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX489"><CODE>do-uppercase-version (M-a, M-b, M-<VAR>x</VAR>, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX396"><CODE>downcase-word (M-l)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX397"><CODE>downcase-word (M-l)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX510"><CODE>dump-functions ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX511"><CODE>dump-functions ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX514"><CODE>dump-macros ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX515"><CODE>dump-macros ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX512"><CODE>dump-variables ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX513"><CODE>dump-variables ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX472"><CODE>dynamic-complete-history (M-<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX473"><CODE>dynamic-complete-history (M-<KBD>TAB</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_E"></A>E</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX538"><CODE>edit-and-execute-command (C-xC-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX539"><CODE>edit-and-execute-command (C-xC-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX480"><CODE>end-kbd-macro (C-x ))</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX481"><CODE>end-kbd-macro (C-x ))</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX362"><CODE>end-of-history (M-&#38;#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX363"><CODE>end-of-history (M-&#38;#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX336"><CODE>end-of-line (C-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX337"><CODE>end-of-line (C-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX500"><CODE>exchange-point-and-mark (C-x C-x)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX501"><CODE>exchange-point-and-mark (C-x C-x)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_F"></A>F</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX384"><CODE>forward-backward-delete-char ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX385"><CODE>forward-backward-delete-char ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX338"><CODE>forward-char (C-f)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX339"><CODE>forward-char (C-f)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX366"><CODE>forward-search-history (C-s)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX367"><CODE>forward-search-history (C-s)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX342"><CODE>forward-word (M-f)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX343"><CODE>forward-word (M-f)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_G"></A>G</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX516"><CODE>glob-complete-word (M-g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX517"><CODE>glob-complete-word (M-g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX518"><CODE>glob-expand-word (C-x *)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX519"><CODE>glob-expand-word (C-x *)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX520"><CODE>glob-list-expansions (C-x g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX521"><CODE>glob-list-expansions (C-x g)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_H"></A>H</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX532"><CODE>history-and-alias-expand-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX533"><CODE>history-and-alias-expand-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX526"><CODE>history-expand-line (M-^)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX527"><CODE>history-expand-line (M-^)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX374"><CODE>history-search-backward ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX375"><CODE>history-search-backward ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX372"><CODE>history-search-forward ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX373"><CODE>history-search-forward ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_I"></A>I</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX508"><CODE>insert-comment (M-#)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX509"><CODE>insert-comment (M-#)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX444"><CODE>insert-completions (M-*)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX445"><CODE>insert-completions (M-*)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX534"><CODE>insert-last-argument (M-. or M-_)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX535"><CODE>insert-last-argument (M-. or M-_)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_K"></A>K</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX402"><CODE>kill-line (C-k)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX403"><CODE>kill-line (C-k)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX424"><CODE>kill-region ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX425"><CODE>kill-region ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX408"><CODE>kill-whole-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX409"><CODE>kill-whole-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX410"><CODE>kill-word (M-d)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX411"><CODE>kill-word (M-d)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_M"></A>M</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX528"><CODE>magic-space ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX529"><CODE>magic-space ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX446"><CODE>menu-complete ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX447"><CODE>menu-complete ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX448"><CODE>menu-complete-backward ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX449"><CODE>menu-complete-backward ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_N"></A>N</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX358"><CODE>next-history (C-n)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX359"><CODE>next-history (C-n)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX370"><CODE>non-incremental-forward-search-history (M-n)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX371"><CODE>non-incremental-forward-search-history (M-n)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX368"><CODE>non-incremental-reverse-search-history (M-p)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX369"><CODE>non-incremental-reverse-search-history (M-p)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_O"></A>O</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX536"><CODE>operate-and-get-next (C-o)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX537"><CODE>operate-and-get-next (C-o)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX400"><CODE>overwrite-mode ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX401"><CODE>overwrite-mode ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_P"></A>P</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX470"><CODE>possible-command-completions (C-x !)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX471"><CODE>possible-command-completions (C-x !)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX442"><CODE>possible-completions (M-?)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX443"><CODE>possible-completions (M-?)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX454"><CODE>possible-filename-completions (C-x /)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX455"><CODE>possible-filename-completions (C-x /)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX466"><CODE>possible-hostname-completions (C-x @)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX467"><CODE>possible-hostname-completions (C-x @)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX458"><CODE>possible-username-completions (C-x ~)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX459"><CODE>possible-username-completions (C-x ~)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX462"><CODE>possible-variable-completions (C-x $)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX463"><CODE>possible-variable-completions (C-x $)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX490"><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX491"><CODE>prefix-meta (<KBD>ESC</KBD>)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX356"><CODE>previous-history (C-p)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX357"><CODE>previous-history (C-p)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_Q"></A>Q</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX386"><CODE>quoted-insert (C-q or C-v)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX387"><CODE>quoted-insert (C-q or C-v)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_R"></A>R</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX484"><CODE>re-read-init-file (C-x C-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX485"><CODE>re-read-init-file (C-x C-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX352"><CODE>redraw-current-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX353"><CODE>redraw-current-line ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX364"><CODE>reverse-search-history (C-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX365"><CODE>reverse-search-history (C-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX494"><CODE>revert-line (M-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX495"><CODE>revert-line (M-r)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_S"></A>S</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX388"><CODE>self-insert (a, b, A, 1, !, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX389"><CODE>self-insert (a, b, A, 1, !, &#60;small&#62;...&#60;/small&#62;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX498"><CODE>set-mark (C-@)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX499"><CODE>set-mark (C-@)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX348"><CODE>shell-backward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX349"><CODE>shell-backward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX524"><CODE>shell-expand-line (M-C-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX525"><CODE>shell-expand-line (M-C-e)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX346"><CODE>shell-forward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX347"><CODE>shell-forward-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX414"><CODE>shell-kill-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX415"><CODE>shell-kill-word ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX506"><CODE>skip-csi-sequence ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX507"><CODE>skip-csi-sequence ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX478"><CODE>start-kbd-macro (C-x ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX479"><CODE>start-kbd-macro (C-x ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_T"></A>T</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX496"><CODE>tilde-expand (M-&#38;#38;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX497"><CODE>tilde-expand (M-&#38;#38;)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX390"><CODE>transpose-chars (C-t)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX391"><CODE>transpose-chars (C-t)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX392"><CODE>transpose-words (M-t)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX393"><CODE>transpose-words (M-t)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_U"></A>U</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX492"><CODE>undo (C-_ or C-x C-u)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX493"><CODE>undo (C-_ or C-x C-u)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX438"><CODE>universal-argument ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC112">8.4.5 Specifying Numeric Arguments</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX439"><CODE>universal-argument ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC112">8.4.5 Specifying Numeric Arguments</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX420"><CODE>unix-filename-rubout ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX421"><CODE>unix-filename-rubout ()</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX406"><CODE>unix-line-discard (C-u)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX407"><CODE>unix-line-discard (C-u)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX418"><CODE>unix-word-rubout (C-w)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX419"><CODE>unix-word-rubout (C-w)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX394"><CODE>upcase-word (M-u)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX395"><CODE>upcase-word (M-u)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="fn_Y"></A>Y</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX432"><CODE>yank (C-y)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX433"><CODE>yank (C-y)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX378"><CODE>yank-last-arg (M-. or M-_)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX379"><CODE>yank-last-arg (M-. or M-_)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX376"><CODE>yank-nth-arg (M-C-y)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX377"><CODE>yank-nth-arg (M-C-y)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX434"><CODE>yank-pop (M-y)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX435"><CODE>yank-pop (M-y)</CODE></A></TD><TD valign=top><A HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+</TABLE><P></P><table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#fn_A" style="text-decoration:none"><b>A</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_B" style="text-decoration:none"><b>B</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_C" style="text-decoration:none"><b>C</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_D" style="text-decoration:none"><b>D</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_E" style="text-decoration:none"><b>E</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_F" style="text-decoration:none"><b>F</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_G" style="text-decoration:none"><b>G</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_H" style="text-decoration:none"><b>H</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_I" style="text-decoration:none"><b>I</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_K" style="text-decoration:none"><b>K</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_M" style="text-decoration:none"><b>M</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_N" style="text-decoration:none"><b>N</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_O" style="text-decoration:none"><b>O</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_P" style="text-decoration:none"><b>P</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_Q" style="text-decoration:none"><b>Q</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_R" style="text-decoration:none"><b>R</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_S" style="text-decoration:none"><b>S</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_T" style="text-decoration:none"><b>T</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_U" style="text-decoration:none"><b>U</b></A>
+ &nbsp;
+<A HREF="bashref.html#fn_Y" style="text-decoration:none"><b>Y</b></A>
+ &nbsp;
+</td></tr></table><br><P>
+
+<A NAME="Concept Index"></A>
+<HR SIZE="6">
+<A NAME="SEC145"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC144"> &lt; </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[ &lt;&lt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140"> Up </A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[ &gt;&gt; ]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT"> &nbsp; <TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H2> D.5 Concept Index </H2>
+<!--docid::SEC145::-->
+<table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#cp_A" style="text-decoration:none"><b>A</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_B" style="text-decoration:none"><b>B</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_C" style="text-decoration:none"><b>C</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_D" style="text-decoration:none"><b>D</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_E" style="text-decoration:none"><b>E</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_F" style="text-decoration:none"><b>F</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_H" style="text-decoration:none"><b>H</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_I" style="text-decoration:none"><b>I</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_J" style="text-decoration:none"><b>J</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_K" style="text-decoration:none"><b>K</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_L" style="text-decoration:none"><b>L</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_M" style="text-decoration:none"><b>M</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_N" style="text-decoration:none"><b>N</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_O" style="text-decoration:none"><b>O</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_P" style="text-decoration:none"><b>P</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_Q" style="text-decoration:none"><b>Q</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_R" style="text-decoration:none"><b>R</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_S" style="text-decoration:none"><b>S</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_T" style="text-decoration:none"><b>T</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_V" style="text-decoration:none"><b>V</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_W" style="text-decoration:none"><b>W</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_Y" style="text-decoration:none"><b>Y</b></A>
+ &nbsp;
+</td></tr></table><br><P></P>
+<TABLE border=0>
+<TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_A"></A>A</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC84">alias expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC84">6.6 Aliases</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC83">arithmetic evaluation</A></TD><TD valign=top><A HREF="bashref.html#SEC83">6.5 Shell Arithmetic</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC33">arithmetic expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC33">3.5.5 Arithmetic Expansion</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC83">arithmetic, shell</A></TD><TD valign=top><A HREF="bashref.html#SEC83">6.5 Shell Arithmetic</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC85">arrays</A></TD><TD valign=top><A HREF="bashref.html#SEC85">6.7 Arrays</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_B"></A>B</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC92">background</A></TD><TD valign=top><A HREF="bashref.html#SEC92">7.1 Job Control Basics</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC127">Bash configuration</A></TD><TD valign=top><A HREF="bashref.html#SEC127">10.1 Basic Installation</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC127">Bash installation</A></TD><TD valign=top><A HREF="bashref.html#SEC127">10.1 Basic Installation</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC5">Bourne shell</A></TD><TD valign=top><A HREF="bashref.html#SEC5">3. Basic Shell Features</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC29">brace expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC29">3.5.1 Brace Expansion</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX2">builtin</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_C"></A>C</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC98">command editing</A></TD><TD valign=top><A HREF="bashref.html#SEC98">8.2.1 Readline Bare Essentials</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC52">command execution</A></TD><TD valign=top><A HREF="bashref.html#SEC52">3.7.2 Command Search and Execution</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC51">command expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC51">3.7.1 Simple Command Expansion</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC120">command history</A></TD><TD valign=top><A HREF="bashref.html#SEC120">9.1 Bash History Facilities</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC52">command search</A></TD><TD valign=top><A HREF="bashref.html#SEC52">3.7.2 Command Search and Execution</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC32">command substitution</A></TD><TD valign=top><A HREF="bashref.html#SEC32">3.5.4 Command Substitution</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX26">command timing</A></TD><TD valign=top><A HREF="bashref.html#SEC17">3.2.2 Pipelines</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC19">commands, compound</A></TD><TD valign=top><A HREF="bashref.html#SEC19">3.2.4 Compound Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC21">commands, conditional</A></TD><TD valign=top><A HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC22">commands, grouping</A></TD><TD valign=top><A HREF="bashref.html#SEC22">3.2.4.3 Grouping Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC18">commands, lists</A></TD><TD valign=top><A HREF="bashref.html#SEC18">3.2.3 Lists of Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC20">commands, looping</A></TD><TD valign=top><A HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC17">commands, pipelines</A></TD><TD valign=top><A HREF="bashref.html#SEC17">3.2.2 Pipelines</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC15">commands, shell</A></TD><TD valign=top><A HREF="bashref.html#SEC15">3.2 Shell Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC16">commands, simple</A></TD><TD valign=top><A HREF="bashref.html#SEC16">3.2.1 Simple Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC14">comments, shell</A></TD><TD valign=top><A HREF="bashref.html#SEC14">3.1.3 Comments</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC118">completion builtins</A></TD><TD valign=top><A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC127">configuration</A></TD><TD valign=top><A HREF="bashref.html#SEC127">10.1 Basic Installation</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX3">control operator</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC23">coprocess</A></TD><TD valign=top><A HREF="bashref.html#SEC23">3.2.5 Coprocesses</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_D"></A>D</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC86">directory stack</A></TD><TD valign=top><A HREF="bashref.html#SEC86">6.8 The Directory Stack</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_E"></A>E</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC98">editing command lines</A></TD><TD valign=top><A HREF="bashref.html#SEC98">8.2.1 Readline Bare Essentials</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC54">environment</A></TD><TD valign=top><A HREF="bashref.html#SEC54">3.7.4 Environment</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC83">evaluation, arithmetic</A></TD><TD valign=top><A HREF="bashref.html#SEC83">6.5 Shell Arithmetic</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC123">event designators</A></TD><TD valign=top><A HREF="bashref.html#SEC123">9.3.1 Event Designators</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC53">execution environment</A></TD><TD valign=top><A HREF="bashref.html#SEC53">3.7.3 Command Execution Environment</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX4">exit status</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC55">exit status</A></TD><TD valign=top><A HREF="bashref.html#SEC55">3.7.5 Exit Status</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC28">expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC28">3.5 Shell Expansions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC33">expansion, arithmetic</A></TD><TD valign=top><A HREF="bashref.html#SEC33">3.5.5 Arithmetic Expansion</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC29">expansion, brace</A></TD><TD valign=top><A HREF="bashref.html#SEC29">3.5.1 Brace Expansion</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX64">expansion, filename</A></TD><TD valign=top><A HREF="bashref.html#SEC36">3.5.8 Filename Expansion</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC31">expansion, parameter</A></TD><TD valign=top><A HREF="bashref.html#SEC31">3.5.3 Shell Parameter Expansion</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX65">expansion, pathname</A></TD><TD valign=top><A HREF="bashref.html#SEC36">3.5.8 Filename Expansion</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC30">expansion, tilde</A></TD><TD valign=top><A HREF="bashref.html#SEC30">3.5.2 Tilde Expansion</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC83">expressions, arithmetic</A></TD><TD valign=top><A HREF="bashref.html#SEC83">6.5 Shell Arithmetic</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC82">expressions, conditional</A></TD><TD valign=top><A HREF="bashref.html#SEC82">6.4 Bash Conditional Expressions</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_F"></A>F</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX5">field</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX6">filename</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX66">filename expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC36">3.5.8 Filename Expansion</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC92">foreground</A></TD><TD valign=top><A HREF="bashref.html#SEC92">7.1 Job Control Basics</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC24">functions, shell</A></TD><TD valign=top><A HREF="bashref.html#SEC24">3.3 Shell Functions</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_H"></A>H</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC121">history builtins</A></TD><TD valign=top><A HREF="bashref.html#SEC121">9.2 Bash History Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX546">history events</A></TD><TD valign=top><A HREF="bashref.html#SEC123">9.3.1 Event Designators</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC122">history expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC122">9.3 History Expansion</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC120">history list</A></TD><TD valign=top><A HREF="bashref.html#SEC120">9.1 Bash History Facilities</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX543">History, how to use</A></TD><TD valign=top><A HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_I"></A>I</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX11">identifier</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC103">initialization file, readline</A></TD><TD valign=top><A HREF="bashref.html#SEC103">8.3 Readline Init File</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC127">installation</A></TD><TD valign=top><A HREF="bashref.html#SEC127">10.1 Basic Installation</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC97">interaction, readline</A></TD><TD valign=top><A HREF="bashref.html#SEC97">8.2 Readline Interaction</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX289">interactive shell</A></TD><TD valign=top><A HREF="bashref.html#SEC69">6.1 Invoking Bash</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC78">interactive shell</A></TD><TD valign=top><A HREF="bashref.html#SEC78">6.3 Interactive Shells</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC13">internationalization</A></TD><TD valign=top><A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_J"></A>J</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX7">job</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX8">job control</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC92">job control</A></TD><TD valign=top><A HREF="bashref.html#SEC92">7.1 Job Control Basics</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_K"></A>K</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX305">kill ring</A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.2.3 Readline Killing Commands</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX303">killing text</A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.2.3 Readline Killing Commands</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_L"></A>L</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC13">localization</A></TD><TD valign=top><A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX288">login shell</A></TD><TD valign=top><A HREF="bashref.html#SEC69">6.1 Invoking Bash</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_M"></A>M</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC37">matching, pattern</A></TD><TD valign=top><A HREF="bashref.html#SEC37">3.5.8.1 Pattern Matching</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX9">metacharacter</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_N"></A>N</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX10">name</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC13">native languages</A></TD><TD valign=top><A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC98">notation, readline</A></TD><TD valign=top><A HREF="bashref.html#SEC98">8.2.1 Readline Bare Essentials</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_O"></A>O</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX12">operator, shell</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_P"></A>P</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC31">parameter expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC31">3.5.3 Shell Parameter Expansion</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC25">parameters</A></TD><TD valign=top><A HREF="bashref.html#SEC25">3.4 Shell Parameters</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC26">parameters, positional</A></TD><TD valign=top><A HREF="bashref.html#SEC26">3.4.1 Positional Parameters</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC27">parameters, special</A></TD><TD valign=top><A HREF="bashref.html#SEC27">3.4.2 Special Parameters</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX67">pathname expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC36">3.5.8 Filename Expansion</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC37">pattern matching</A></TD><TD valign=top><A HREF="bashref.html#SEC37">3.5.8.1 Pattern Matching</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC17">pipeline</A></TD><TD valign=top><A HREF="bashref.html#SEC17">3.2.2 Pipelines</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX1">POSIX</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC90">POSIX Mode</A></TD><TD valign=top><A HREF="bashref.html#SEC90">6.11 Bash POSIX Mode</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX13">process group</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX14">process group ID</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC34">process substitution</A></TD><TD valign=top><A HREF="bashref.html#SEC34">3.5.6 Process Substitution</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC117">programmable completion</A></TD><TD valign=top><A HREF="bashref.html#SEC117">8.6 Programmable Completion</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC88">prompting</A></TD><TD valign=top><A HREF="bashref.html#SEC88">6.9 Controlling the Prompt</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_Q"></A>Q</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC8">quoting</A></TD><TD valign=top><A HREF="bashref.html#SEC8">3.1.2 Quoting</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC12">quoting, ANSI</A></TD><TD valign=top><A HREF="bashref.html#SEC12">3.1.2.4 ANSI-C Quoting</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_R"></A>R</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX302">Readline, how to use</A></TD><TD valign=top><A HREF="bashref.html#SEC94">7.3 Job Control Variables</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC39">redirection</A></TD><TD valign=top><A HREF="bashref.html#SEC39">3.6 Redirections</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX15">reserved word</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC89">restricted shell</A></TD><TD valign=top><A HREF="bashref.html#SEC89">6.10 The Restricted Shell</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX16">return status</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_S"></A>S</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC83">shell arithmetic</A></TD><TD valign=top><A HREF="bashref.html#SEC83">6.5 Shell Arithmetic</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC24">shell function</A></TD><TD valign=top><A HREF="bashref.html#SEC24">3.3 Shell Functions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC57">shell script</A></TD><TD valign=top><A HREF="bashref.html#SEC57">3.8 Shell Scripts</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC25">shell variable</A></TD><TD valign=top><A HREF="bashref.html#SEC25">3.4 Shell Parameters</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC78">shell, interactive</A></TD><TD valign=top><A HREF="bashref.html#SEC78">6.3 Interactive Shells</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX17">signal</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC56">signal handling</A></TD><TD valign=top><A HREF="bashref.html#SEC56">3.7.6 Signals</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX18">special builtin</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC64">special builtin</A></TD><TD valign=top><A HREF="bashref.html#SEC64">4.4 Special Builtins</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC70">startup files</A></TD><TD valign=top><A HREF="bashref.html#SEC70">6.2 Bash Startup Files</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC92">suspending jobs</A></TD><TD valign=top><A HREF="bashref.html#SEC92">7.1 Job Control Basics</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_T"></A>T</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC30">tilde expansion</A></TD><TD valign=top><A HREF="bashref.html#SEC30">3.5.2 Tilde Expansion</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX19">token</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC13">translation, native languages</A></TD><TD valign=top><A HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_V"></A>V</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC25">variable, shell</A></TD><TD valign=top><A HREF="bashref.html#SEC25">3.4 Shell Parameters</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX306">variables, readline</A></TD><TD valign=top><A HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_W"></A>W</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX20">word</A></TD><TD valign=top><A HREF="bashref.html#SEC4">2. Definitions</A></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#SEC35">word splitting</A></TD><TD valign=top><A HREF="bashref.html#SEC35">3.5.7 Word Splitting</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+<TR><TH><A NAME="cp_Y"></A>Y</TH><TD></TD><TD></TD></TR>
+<TR><TD></TD><TD valign=top><A HREF="bashref.html#IDX304">yanking text</A></TD><TD valign=top><A HREF="bashref.html#SEC100">8.2.3 Readline Killing Commands</A></TD></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+</TABLE><P></P><table><tr><th valign=top>Jump to: &nbsp; </th><td><A HREF="bashref.html#cp_A" style="text-decoration:none"><b>A</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_B" style="text-decoration:none"><b>B</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_C" style="text-decoration:none"><b>C</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_D" style="text-decoration:none"><b>D</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_E" style="text-decoration:none"><b>E</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_F" style="text-decoration:none"><b>F</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_H" style="text-decoration:none"><b>H</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_I" style="text-decoration:none"><b>I</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_J" style="text-decoration:none"><b>J</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_K" style="text-decoration:none"><b>K</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_L" style="text-decoration:none"><b>L</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_M" style="text-decoration:none"><b>M</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_N" style="text-decoration:none"><b>N</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_O" style="text-decoration:none"><b>O</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_P" style="text-decoration:none"><b>P</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_Q" style="text-decoration:none"><b>Q</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_R" style="text-decoration:none"><b>R</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_S" style="text-decoration:none"><b>S</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_T" style="text-decoration:none"><b>T</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_V" style="text-decoration:none"><b>V</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_W" style="text-decoration:none"><b>W</b></A>
+ &nbsp;
+<A HREF="bashref.html#cp_Y" style="text-decoration:none"><b>Y</b></A>
+ &nbsp;
+</td></tr></table><br><P>
+
+<HR SIZE="6">
+<A NAME="SEC_Contents"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1>Table of Contents</H1>
+<UL>
+<A NAME="TOC1" HREF="bashref.html#SEC1">1. Introduction</A>
+<BR>
+<UL>
+<A NAME="TOC2" HREF="bashref.html#SEC2">1.1 What is Bash?</A>
+<BR>
+<A NAME="TOC3" HREF="bashref.html#SEC3">1.2 What is a shell?</A>
+<BR>
+</UL>
+<A NAME="TOC4" HREF="bashref.html#SEC4">2. Definitions</A>
+<BR>
+<A NAME="TOC5" HREF="bashref.html#SEC5">3. Basic Shell Features</A>
+<BR>
+<UL>
+<A NAME="TOC6" HREF="bashref.html#SEC6">3.1 Shell Syntax</A>
+<BR>
+<UL>
+<A NAME="TOC7" HREF="bashref.html#SEC7">3.1.1 Shell Operation</A>
+<BR>
+<A NAME="TOC8" HREF="bashref.html#SEC8">3.1.2 Quoting</A>
+<BR>
+<UL>
+<A NAME="TOC9" HREF="bashref.html#SEC9">3.1.2.1 Escape Character</A>
+<BR>
+<A NAME="TOC10" HREF="bashref.html#SEC10">3.1.2.2 Single Quotes</A>
+<BR>
+<A NAME="TOC11" HREF="bashref.html#SEC11">3.1.2.3 Double Quotes</A>
+<BR>
+<A NAME="TOC12" HREF="bashref.html#SEC12">3.1.2.4 ANSI-C Quoting</A>
+<BR>
+<A NAME="TOC13" HREF="bashref.html#SEC13">3.1.2.5 Locale-Specific Translation</A>
+<BR>
+</UL>
+<A NAME="TOC14" HREF="bashref.html#SEC14">3.1.3 Comments</A>
+<BR>
+</UL>
+<A NAME="TOC15" HREF="bashref.html#SEC15">3.2 Shell Commands</A>
+<BR>
+<UL>
+<A NAME="TOC16" HREF="bashref.html#SEC16">3.2.1 Simple Commands</A>
+<BR>
+<A NAME="TOC17" HREF="bashref.html#SEC17">3.2.2 Pipelines</A>
+<BR>
+<A NAME="TOC18" HREF="bashref.html#SEC18">3.2.3 Lists of Commands</A>
+<BR>
+<A NAME="TOC19" HREF="bashref.html#SEC19">3.2.4 Compound Commands</A>
+<BR>
+<UL>
+<A NAME="TOC20" HREF="bashref.html#SEC20">3.2.4.1 Looping Constructs</A>
+<BR>
+<A NAME="TOC21" HREF="bashref.html#SEC21">3.2.4.2 Conditional Constructs</A>
+<BR>
+<A NAME="TOC22" HREF="bashref.html#SEC22">3.2.4.3 Grouping Commands</A>
+<BR>
+</UL>
+<A NAME="TOC23" HREF="bashref.html#SEC23">3.2.5 Coprocesses</A>
+<BR>
+</UL>
+<A NAME="TOC24" HREF="bashref.html#SEC24">3.3 Shell Functions</A>
+<BR>
+<A NAME="TOC25" HREF="bashref.html#SEC25">3.4 Shell Parameters</A>
+<BR>
+<UL>
+<A NAME="TOC26" HREF="bashref.html#SEC26">3.4.1 Positional Parameters</A>
+<BR>
+<A NAME="TOC27" HREF="bashref.html#SEC27">3.4.2 Special Parameters</A>
+<BR>
+</UL>
+<A NAME="TOC28" HREF="bashref.html#SEC28">3.5 Shell Expansions</A>
+<BR>
+<UL>
+<A NAME="TOC29" HREF="bashref.html#SEC29">3.5.1 Brace Expansion</A>
+<BR>
+<A NAME="TOC30" HREF="bashref.html#SEC30">3.5.2 Tilde Expansion</A>
+<BR>
+<A NAME="TOC31" HREF="bashref.html#SEC31">3.5.3 Shell Parameter Expansion</A>
+<BR>
+<A NAME="TOC32" HREF="bashref.html#SEC32">3.5.4 Command Substitution</A>
+<BR>
+<A NAME="TOC33" HREF="bashref.html#SEC33">3.5.5 Arithmetic Expansion</A>
+<BR>
+<A NAME="TOC34" HREF="bashref.html#SEC34">3.5.6 Process Substitution</A>
+<BR>
+<A NAME="TOC35" HREF="bashref.html#SEC35">3.5.7 Word Splitting</A>
+<BR>
+<A NAME="TOC36" HREF="bashref.html#SEC36">3.5.8 Filename Expansion</A>
+<BR>
+<UL>
+<A NAME="TOC37" HREF="bashref.html#SEC37">3.5.8.1 Pattern Matching</A>
+<BR>
+</UL>
+<A NAME="TOC38" HREF="bashref.html#SEC38">3.5.9 Quote Removal</A>
+<BR>
+</UL>
+<A NAME="TOC39" HREF="bashref.html#SEC39">3.6 Redirections</A>
+<BR>
+<UL>
+<A NAME="TOC40" HREF="bashref.html#SEC40">3.6.1 Redirecting Input</A>
+<BR>
+<A NAME="TOC41" HREF="bashref.html#SEC41">3.6.2 Redirecting Output</A>
+<BR>
+<A NAME="TOC42" HREF="bashref.html#SEC42">3.6.3 Appending Redirected Output</A>
+<BR>
+<A NAME="TOC43" HREF="bashref.html#SEC43">3.6.4 Redirecting Standard Output and Standard Error</A>
+<BR>
+<A NAME="TOC44" HREF="bashref.html#SEC44">3.6.5 Appending Standard Output and Standard Error</A>
+<BR>
+<A NAME="TOC45" HREF="bashref.html#SEC45">3.6.6 Here Documents</A>
+<BR>
+<A NAME="TOC46" HREF="bashref.html#SEC46">3.6.7 Here Strings</A>
+<BR>
+<A NAME="TOC47" HREF="bashref.html#SEC47">3.6.8 Duplicating File Descriptors</A>
+<BR>
+<A NAME="TOC48" HREF="bashref.html#SEC48">3.6.9 Moving File Descriptors</A>
+<BR>
+<A NAME="TOC49" HREF="bashref.html#SEC49">3.6.10 Opening File Descriptors for Reading and Writing</A>
+<BR>
+</UL>
+<A NAME="TOC50" HREF="bashref.html#SEC50">3.7 Executing Commands</A>
+<BR>
+<UL>
+<A NAME="TOC51" HREF="bashref.html#SEC51">3.7.1 Simple Command Expansion</A>
+<BR>
+<A NAME="TOC52" HREF="bashref.html#SEC52">3.7.2 Command Search and Execution</A>
+<BR>
+<A NAME="TOC53" HREF="bashref.html#SEC53">3.7.3 Command Execution Environment</A>
+<BR>
+<A NAME="TOC54" HREF="bashref.html#SEC54">3.7.4 Environment</A>
+<BR>
+<A NAME="TOC55" HREF="bashref.html#SEC55">3.7.5 Exit Status</A>
+<BR>
+<A NAME="TOC56" HREF="bashref.html#SEC56">3.7.6 Signals</A>
+<BR>
+</UL>
+<A NAME="TOC57" HREF="bashref.html#SEC57">3.8 Shell Scripts</A>
+<BR>
+</UL>
+<A NAME="TOC58" HREF="bashref.html#SEC58">4. Shell Builtin Commands</A>
+<BR>
+<UL>
+<A NAME="TOC59" HREF="bashref.html#SEC59">4.1 Bourne Shell Builtins</A>
+<BR>
+<A NAME="TOC60" HREF="bashref.html#SEC60">4.2 Bash Builtin Commands</A>
+<BR>
+<A NAME="TOC61" HREF="bashref.html#SEC61">4.3 Modifying Shell Behavior</A>
+<BR>
+<UL>
+<A NAME="TOC62" HREF="bashref.html#SEC62">4.3.1 The Set Builtin</A>
+<BR>
+<A NAME="TOC63" HREF="bashref.html#SEC63">4.3.2 The Shopt Builtin</A>
+<BR>
+</UL>
+<A NAME="TOC64" HREF="bashref.html#SEC64">4.4 Special Builtins</A>
+<BR>
+</UL>
+<A NAME="TOC65" HREF="bashref.html#SEC65">5. Shell Variables</A>
+<BR>
+<UL>
+<A NAME="TOC66" HREF="bashref.html#SEC66">5.1 Bourne Shell Variables</A>
+<BR>
+<A NAME="TOC67" HREF="bashref.html#SEC67">5.2 Bash Variables</A>
+<BR>
+</UL>
+<A NAME="TOC68" HREF="bashref.html#SEC68">6. Bash Features</A>
+<BR>
+<UL>
+<A NAME="TOC69" HREF="bashref.html#SEC69">6.1 Invoking Bash</A>
+<BR>
+<A NAME="TOC70" HREF="bashref.html#SEC70">6.2 Bash Startup Files</A>
+<BR>
+<A NAME="TOC78" HREF="bashref.html#SEC78">6.3 Interactive Shells</A>
+<BR>
+<UL>
+<A NAME="TOC79" HREF="bashref.html#SEC79">6.3.1 What is an Interactive Shell?</A>
+<BR>
+<A NAME="TOC80" HREF="bashref.html#SEC80">6.3.2 Is this Shell Interactive?</A>
+<BR>
+<A NAME="TOC81" HREF="bashref.html#SEC81">6.3.3 Interactive Shell Behavior</A>
+<BR>
+</UL>
+<A NAME="TOC82" HREF="bashref.html#SEC82">6.4 Bash Conditional Expressions</A>
+<BR>
+<A NAME="TOC83" HREF="bashref.html#SEC83">6.5 Shell Arithmetic</A>
+<BR>
+<A NAME="TOC84" HREF="bashref.html#SEC84">6.6 Aliases</A>
+<BR>
+<A NAME="TOC85" HREF="bashref.html#SEC85">6.7 Arrays</A>
+<BR>
+<A NAME="TOC86" HREF="bashref.html#SEC86">6.8 The Directory Stack</A>
+<BR>
+<UL>
+<A NAME="TOC87" HREF="bashref.html#SEC87">6.8.1 Directory Stack Builtins</A>
+<BR>
+</UL>
+<A NAME="TOC88" HREF="bashref.html#SEC88">6.9 Controlling the Prompt</A>
+<BR>
+<A NAME="TOC89" HREF="bashref.html#SEC89">6.10 The Restricted Shell</A>
+<BR>
+<A NAME="TOC90" HREF="bashref.html#SEC90">6.11 Bash POSIX Mode</A>
+<BR>
+</UL>
+<A NAME="TOC91" HREF="bashref.html#SEC91">7. Job Control</A>
+<BR>
+<UL>
+<A NAME="TOC92" HREF="bashref.html#SEC92">7.1 Job Control Basics</A>
+<BR>
+<A NAME="TOC93" HREF="bashref.html#SEC93">7.2 Job Control Builtins</A>
+<BR>
+<A NAME="TOC94" HREF="bashref.html#SEC94">7.3 Job Control Variables</A>
+<BR>
+</UL>
+<A NAME="TOC95" HREF="bashref.html#SEC95">8. Command Line Editing</A>
+<BR>
+<UL>
+<A NAME="TOC96" HREF="bashref.html#SEC96">8.1 Introduction to Line Editing</A>
+<BR>
+<A NAME="TOC97" HREF="bashref.html#SEC97">8.2 Readline Interaction</A>
+<BR>
+<UL>
+<A NAME="TOC98" HREF="bashref.html#SEC98">8.2.1 Readline Bare Essentials</A>
+<BR>
+<A NAME="TOC99" HREF="bashref.html#SEC99">8.2.2 Readline Movement Commands</A>
+<BR>
+<A NAME="TOC100" HREF="bashref.html#SEC100">8.2.3 Readline Killing Commands</A>
+<BR>
+<A NAME="TOC101" HREF="bashref.html#SEC101">8.2.4 Readline Arguments</A>
+<BR>
+<A NAME="TOC102" HREF="bashref.html#SEC102">8.2.5 Searching for Commands in the History</A>
+<BR>
+</UL>
+<A NAME="TOC103" HREF="bashref.html#SEC103">8.3 Readline Init File</A>
+<BR>
+<UL>
+<A NAME="TOC104" HREF="bashref.html#SEC104">8.3.1 Readline Init File Syntax</A>
+<BR>
+<A NAME="TOC105" HREF="bashref.html#SEC105">8.3.2 Conditional Init Constructs</A>
+<BR>
+<A NAME="TOC106" HREF="bashref.html#SEC106">8.3.3 Sample Init File</A>
+<BR>
+</UL>
+<A NAME="TOC107" HREF="bashref.html#SEC107">8.4 Bindable Readline Commands</A>
+<BR>
+<UL>
+<A NAME="TOC108" HREF="bashref.html#SEC108">8.4.1 Commands For Moving</A>
+<BR>
+<A NAME="TOC109" HREF="bashref.html#SEC109">8.4.2 Commands For Manipulating The History</A>
+<BR>
+<A NAME="TOC110" HREF="bashref.html#SEC110">8.4.3 Commands For Changing Text</A>
+<BR>
+<A NAME="TOC111" HREF="bashref.html#SEC111">8.4.4 Killing And Yanking</A>
+<BR>
+<A NAME="TOC112" HREF="bashref.html#SEC112">8.4.5 Specifying Numeric Arguments</A>
+<BR>
+<A NAME="TOC113" HREF="bashref.html#SEC113">8.4.6 Letting Readline Type For You</A>
+<BR>
+<A NAME="TOC114" HREF="bashref.html#SEC114">8.4.7 Keyboard Macros</A>
+<BR>
+<A NAME="TOC115" HREF="bashref.html#SEC115">8.4.8 Some Miscellaneous Commands</A>
+<BR>
+</UL>
+<A NAME="TOC116" HREF="bashref.html#SEC116">8.5 Readline vi Mode</A>
+<BR>
+<A NAME="TOC117" HREF="bashref.html#SEC117">8.6 Programmable Completion</A>
+<BR>
+<A NAME="TOC118" HREF="bashref.html#SEC118">8.7 Programmable Completion Builtins</A>
+<BR>
+</UL>
+<A NAME="TOC119" HREF="bashref.html#SEC119">9. Using History Interactively</A>
+<BR>
+<UL>
+<A NAME="TOC120" HREF="bashref.html#SEC120">9.1 Bash History Facilities</A>
+<BR>
+<A NAME="TOC121" HREF="bashref.html#SEC121">9.2 Bash History Builtins</A>
+<BR>
+<A NAME="TOC122" HREF="bashref.html#SEC122">9.3 History Expansion</A>
+<BR>
+<UL>
+<A NAME="TOC123" HREF="bashref.html#SEC123">9.3.1 Event Designators</A>
+<BR>
+<A NAME="TOC124" HREF="bashref.html#SEC124">9.3.2 Word Designators</A>
+<BR>
+<A NAME="TOC125" HREF="bashref.html#SEC125">9.3.3 Modifiers</A>
+<BR>
+</UL>
+</UL>
+<A NAME="TOC126" HREF="bashref.html#SEC126">10. Installing Bash</A>
+<BR>
+<UL>
+<A NAME="TOC127" HREF="bashref.html#SEC127">10.1 Basic Installation</A>
+<BR>
+<A NAME="TOC128" HREF="bashref.html#SEC128">10.2 Compilers and Options</A>
+<BR>
+<A NAME="TOC129" HREF="bashref.html#SEC129">10.3 Compiling For Multiple Architectures</A>
+<BR>
+<A NAME="TOC130" HREF="bashref.html#SEC130">10.4 Installation Names</A>
+<BR>
+<A NAME="TOC131" HREF="bashref.html#SEC131">10.5 Specifying the System Type</A>
+<BR>
+<A NAME="TOC132" HREF="bashref.html#SEC132">10.6 Sharing Defaults</A>
+<BR>
+<A NAME="TOC133" HREF="bashref.html#SEC133">10.7 Operation Controls</A>
+<BR>
+<A NAME="TOC134" HREF="bashref.html#SEC134">10.8 Optional Features</A>
+<BR>
+</UL>
+<A NAME="TOC135" HREF="bashref.html#SEC135">A. Reporting Bugs</A>
+<BR>
+<A NAME="TOC136" HREF="bashref.html#SEC136">B. Major Differences From The Bourne Shell</A>
+<BR>
+<UL>
+<A NAME="TOC137" HREF="bashref.html#SEC137">B.1 Implementation Differences From The SVR4.2 Shell</A>
+<BR>
+</UL>
+<A NAME="TOC138" HREF="bashref.html#SEC138">C. GNU Free Documentation License</A>
+<BR>
+<A NAME="TOC140" HREF="bashref.html#SEC140">D. Indexes</A>
+<BR>
+<UL>
+<A NAME="TOC141" HREF="bashref.html#SEC141">D.1 Index of Shell Builtin Commands</A>
+<BR>
+<A NAME="TOC142" HREF="bashref.html#SEC142">D.2 Index of Shell Reserved Words</A>
+<BR>
+<A NAME="TOC143" HREF="bashref.html#SEC143">D.3 Parameter and Variable Index</A>
+<BR>
+<A NAME="TOC144" HREF="bashref.html#SEC144">D.4 Function Index</A>
+<BR>
+<A NAME="TOC145" HREF="bashref.html#SEC145">D.5 Concept Index</A>
+<BR>
+</UL>
+</UL>
+<HR SIZE=1>
+<A NAME="SEC_OVERVIEW"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1>Short Table of Contents</H1>
+<BLOCKQUOTE>
+<A NAME="TOC1" HREF="bashref.html#SEC1">1. Introduction</A>
+<BR>
+<A NAME="TOC4" HREF="bashref.html#SEC4">2. Definitions</A>
+<BR>
+<A NAME="TOC5" HREF="bashref.html#SEC5">3. Basic Shell Features</A>
+<BR>
+<A NAME="TOC58" HREF="bashref.html#SEC58">4. Shell Builtin Commands</A>
+<BR>
+<A NAME="TOC65" HREF="bashref.html#SEC65">5. Shell Variables</A>
+<BR>
+<A NAME="TOC68" HREF="bashref.html#SEC68">6. Bash Features</A>
+<BR>
+<A NAME="TOC91" HREF="bashref.html#SEC91">7. Job Control</A>
+<BR>
+<A NAME="TOC95" HREF="bashref.html#SEC95">8. Command Line Editing</A>
+<BR>
+<A NAME="TOC119" HREF="bashref.html#SEC119">9. Using History Interactively</A>
+<BR>
+<A NAME="TOC126" HREF="bashref.html#SEC126">10. Installing Bash</A>
+<BR>
+<A NAME="TOC135" HREF="bashref.html#SEC135">A. Reporting Bugs</A>
+<BR>
+<A NAME="TOC136" HREF="bashref.html#SEC136">B. Major Differences From The Bourne Shell</A>
+<BR>
+<A NAME="TOC138" HREF="bashref.html#SEC138">C. GNU Free Documentation License</A>
+<BR>
+<A NAME="TOC140" HREF="bashref.html#SEC140">D. Indexes</A>
+<BR>
+
+</BLOCKQUOTE>
+<HR SIZE=1>
+<A NAME="SEC_About"></A>
+<TABLE CELLPADDING=1 CELLSPACING=1 BORDER=0>
+<TR><TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Top">Top</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_Contents">Contents</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC140">Index</A>]</TD>
+<TD VALIGN="MIDDLE" ALIGN="LEFT">[<A HREF="bashref.html#SEC_About"> ? </A>]</TD>
+</TR></TABLE>
+<H1>About this document</H1>
+This document was generated by <I>Chet Ramey</I> on <I>December, 29 2009</I>
+using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
+"><I>texi2html</I></A>
+<P></P>
+The buttons in the navigation panels have the following meaning:
+<P></P>
+<table border = "1">
+<TR>
+<TH> Button </TH>
+<TH> Name </TH>
+<TH> Go to </TH>
+<TH> From 1.2.3 go to</TH>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [ &lt; ] </TD>
+<TD ALIGN="CENTER">
+Back
+</TD>
+<TD>
+previous section in reading order
+</TD>
+<TD>
+1.2.2
+</TD>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [ &gt; ] </TD>
+<TD ALIGN="CENTER">
+Forward
+</TD>
+<TD>
+next section in reading order
+</TD>
+<TD>
+1.2.4
+</TD>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [ &lt;&lt; ] </TD>
+<TD ALIGN="CENTER">
+FastBack
+</TD>
+<TD>
+previous or up-and-previous section
+</TD>
+<TD>
+1.1
+</TD>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [ Up ] </TD>
+<TD ALIGN="CENTER">
+Up
+</TD>
+<TD>
+up section
+</TD>
+<TD>
+1.2
+</TD>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [ &gt;&gt; ] </TD>
+<TD ALIGN="CENTER">
+FastForward
+</TD>
+<TD>
+next or up-and-next section
+</TD>
+<TD>
+1.3
+</TD>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [Top] </TD>
+<TD ALIGN="CENTER">
+Top
+</TD>
+<TD>
+cover (top) of document
+</TD>
+<TD>
+ &nbsp;
+</TD>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [Contents] </TD>
+<TD ALIGN="CENTER">
+Contents
+</TD>
+<TD>
+table of contents
+</TD>
+<TD>
+ &nbsp;
+</TD>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [Index] </TD>
+<TD ALIGN="CENTER">
+Index
+</TD>
+<TD>
+concept index
+</TD>
+<TD>
+ &nbsp;
+</TD>
+</TR>
+<TR>
+<TD ALIGN="CENTER">
+ [ ? ] </TD>
+<TD ALIGN="CENTER">
+About
+</TD>
+<TD>
+this page
+</TD>
+<TD>
+ &nbsp;
+</TD>
+</TR>
+</TABLE>
+<P></P>
+where the <STRONG> Example </STRONG> assumes that the current position
+is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of
+the following structure:
+<UL>
+<LI> 1. Section One </LI>
+<UL>
+<LI>1.1 Subsection One-One</LI>
+<UL>
+<LI> ... </LI>
+</UL>
+<LI>1.2 Subsection One-Two</LI>
+<UL>
+<LI>1.2.1 Subsubsection One-Two-One
+</LI><LI>1.2.2 Subsubsection One-Two-Two
+</LI><LI>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp; <STRONG>
+&lt;== Current Position </STRONG>
+</LI><LI>1.2.4 Subsubsection One-Two-Four
+</LI></UL>
+<LI>1.3 Subsection One-Three</LI>
+<UL>
+<LI> ... </LI>
+</UL>
+<LI>1.4 Subsection One-Four</LI>
+</UL>
+</UL>
+
+<HR SIZE=1>
+<BR>
+<FONT SIZE="-1">
+This document was generated
+by <I>Chet Ramey</I> on <I>December, 29 2009</I>
+using <A HREF="http://www.mathematik.uni-kl.de/~obachman/Texi2html
+"><I>texi2html</I></A>
+
+</BODY>
+</HTML>
diff --git a/doc/bashref.info b/doc/bashref.info
new file mode 100644
index 0000000..189e58b
--- /dev/null
+++ b/doc/bashref.info
@@ -0,0 +1,10348 @@
+This is bashref.info, produced by makeinfo version 4.13 from
+/Users/chet/src/bash/src/doc/bashref.texi.
+
+This text is a brief description of the features that are present in
+the Bash shell (version 4.1, 23 December 2009).
+
+ This is Edition 4.1, last updated 23 December 2009, of `The GNU Bash
+Reference Manual', for `Bash', Version 4.1.
+
+ Copyright (C) 1988-2009 Free Software Foundation, Inc.
+
+ 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 copy, distribute and/or modify this
+ document under the terms of the GNU Free Documentation License,
+ Version 1.3 or any later version published by the Free Software
+ Foundation; with no Invariant Sections, with the Front-Cover texts
+ being "A GNU Manual", and with the Back-Cover Texts as in (a)
+ below. A copy of the license is included in the section entitled
+ "GNU Free Documentation License".
+
+ (a) The FSF's Back-Cover Text is: You are free to copy and modify
+ this GNU manual. Buying copies from GNU Press supports the FSF in
+ developing GNU and promoting software freedom."
+
+
+INFO-DIR-SECTION Basics
+START-INFO-DIR-ENTRY
+* Bash: (bash). The GNU Bourne-Again SHell.
+END-INFO-DIR-ENTRY
+
+
+File: bashref.info, Node: Top, Next: Introduction, Prev: (dir), Up: (dir)
+
+Bash Features
+*************
+
+This text is a brief description of the features that are present in
+the Bash shell (version 4.1, 23 December 2009).
+
+ This is Edition 4.1, last updated 23 December 2009, of `The GNU Bash
+Reference Manual', for `Bash', Version 4.1.
+
+ Bash contains features that appear in other popular shells, and some
+features that only appear in Bash. Some of the shells that Bash has
+borrowed concepts from are the Bourne Shell (`sh'), the Korn Shell
+(`ksh'), and the C-shell (`csh' and its successor, `tcsh'). The
+following menu breaks the features up into categories based upon which
+one of these other shells inspired the feature.
+
+ This manual is meant as a brief introduction to features found in
+Bash. The Bash manual page should be used as the definitive reference
+on shell behavior.
+
+* Menu:
+
+* Introduction:: An introduction to the shell.
+* Definitions:: Some definitions used in the rest of this
+ manual.
+* Basic Shell Features:: The shell "building blocks".
+* Shell Builtin Commands:: Commands that are a part of the shell.
+* Shell Variables:: Variables used or set by Bash.
+* Bash Features:: Features found only in Bash.
+* Job Control:: What job control is and how Bash allows you
+ to use it.
+* Command Line Editing:: Chapter describing the command line
+ editing features.
+* Using History Interactively:: Command History Expansion
+* Installing Bash:: How to build and install Bash on your system.
+* Reporting Bugs:: How to report bugs in Bash.
+* Major Differences From The Bourne Shell:: A terse list of the differences
+ between Bash and historical
+ versions of /bin/sh.
+* GNU Free Documentation License:: Copying and sharing this documentation.
+* Indexes:: Various indexes for this manual.
+
+
+File: bashref.info, Node: Introduction, Next: Definitions, Prev: Top, Up: Top
+
+1 Introduction
+**************
+
+* Menu:
+
+* What is Bash?:: A short description of Bash.
+* What is a shell?:: A brief introduction to shells.
+
+
+File: bashref.info, Node: What is Bash?, Next: What is a shell?, Up: Introduction
+
+1.1 What is Bash?
+=================
+
+Bash is the shell, or command language interpreter, for the GNU
+operating system. The name is an acronym for the `Bourne-Again SHell',
+a pun on Stephen Bourne, the author of the direct ancestor of the
+current Unix shell `sh', which appeared in the Seventh Edition Bell
+Labs Research version of Unix.
+
+ Bash is largely compatible with `sh' and incorporates useful
+features from the Korn shell `ksh' and the C shell `csh'. It is
+intended to be a conformant implementation of the IEEE POSIX Shell and
+Tools portion of the IEEE POSIX specification (IEEE Standard 1003.1).
+It offers functional improvements over `sh' for both interactive and
+programming use.
+
+ While the GNU operating system provides other shells, including a
+version of `csh', Bash is the default shell. Like other GNU software,
+Bash is quite portable. It currently runs on nearly every version of
+Unix and a few other operating systems - independently-supported ports
+exist for MS-DOS, OS/2, and Windows platforms.
+
+
+File: bashref.info, Node: What is a shell?, Prev: What is Bash?, Up: Introduction
+
+1.2 What is a shell?
+====================
+
+At its base, a shell is simply a macro processor that executes
+commands. The term macro processor means functionality where text and
+symbols are expanded to create larger expressions.
+
+ A Unix shell is both a command interpreter and a programming
+language. As a command interpreter, the shell provides the user
+interface to the rich set of GNU utilities. The programming language
+features allow these utilities to be combined. Files containing
+commands can be created, and become commands themselves. These new
+commands have the same status as system commands in directories such as
+`/bin', allowing users or groups to establish custom environments to
+automate their common tasks.
+
+ Shells may be used interactively or non-interactively. In
+interactive mode, they accept input typed from the keyboard. When
+executing non-interactively, shells execute commands read from a file.
+
+ A shell allows execution of GNU commands, both synchronously and
+asynchronously. The shell waits for synchronous commands to complete
+before accepting more input; asynchronous commands continue to execute
+in parallel with the shell while it reads and executes additional
+commands. The "redirection" constructs permit fine-grained control of
+the input and output of those commands. Moreover, the shell allows
+control over the contents of commands' environments.
+
+ Shells also provide a small set of built-in commands ("builtins")
+implementing functionality impossible or inconvenient to obtain via
+separate utilities. For example, `cd', `break', `continue', and
+`exec') cannot be implemented outside of the shell because they
+directly manipulate the shell itself. The `history', `getopts',
+`kill', or `pwd' builtins, among others, could be implemented in
+separate utilities, but they are more convenient to use as builtin
+commands. All of the shell builtins are described in subsequent
+sections.
+
+ While executing commands is essential, most of the power (and
+complexity) of shells is due to their embedded programming languages.
+Like any high-level language, the shell provides variables, flow
+control constructs, quoting, and functions.
+
+ Shells offer features geared specifically for interactive use rather
+than to augment the programming language. These interactive features
+include job control, command line editing, command history and aliases.
+Each of these features is described in this manual.
+
+
+File: bashref.info, Node: Definitions, Next: Basic Shell Features, Prev: Introduction, Up: Top
+
+2 Definitions
+*************
+
+These definitions are used throughout the remainder of this manual.
+
+`POSIX'
+ A family of open system standards based on Unix. Bash is
+ primarily concerned with the Shell and Utilities portion of the
+ POSIX 1003.1 standard.
+
+`blank'
+ A space or tab character.
+
+`builtin'
+ A command that is implemented internally by the shell itself,
+ rather than by an executable program somewhere in the file system.
+
+`control operator'
+ A `token' that performs a control function. It is a `newline' or
+ one of the following: `||', `&&', `&', `;', `;;', `|', `|&', `(',
+ or `)'.
+
+`exit status'
+ The value returned by a command to its caller. The value is
+ restricted to eight bits, so the maximum value is 255.
+
+`field'
+ A unit of text that is the result of one of the shell expansions.
+ After expansion, when executing a command, the resulting fields
+ are used as the command name and arguments.
+
+`filename'
+ A string of characters used to identify a file.
+
+`job'
+ A set of processes comprising a pipeline, and any processes
+ descended from it, that are all in the same process group.
+
+`job control'
+ A mechanism by which users can selectively stop (suspend) and
+ restart (resume) execution of processes.
+
+`metacharacter'
+ A character that, when unquoted, separates words. A metacharacter
+ is a `blank' or one of the following characters: `|', `&', `;',
+ `(', `)', `<', or `>'.
+
+`name'
+ A `word' consisting solely of letters, numbers, and underscores,
+ and beginning with a letter or underscore. `Name's are used as
+ shell variable and function names. Also referred to as an
+ `identifier'.
+
+`operator'
+ A `control operator' or a `redirection operator'. *Note
+ Redirections::, for a list of redirection operators. Operators
+ contain at least one unquoted `metacharacter'.
+
+`process group'
+ A collection of related processes each having the same process
+ group ID.
+
+`process group ID'
+ A unique identifier that represents a `process group' during its
+ lifetime.
+
+`reserved word'
+ A `word' that has a special meaning to the shell. Most reserved
+ words introduce shell flow control constructs, such as `for' and
+ `while'.
+
+`return status'
+ A synonym for `exit status'.
+
+`signal'
+ A mechanism by which a process may be notified by the kernel of an
+ event occurring in the system.
+
+`special builtin'
+ A shell builtin command that has been classified as special by the
+ POSIX standard.
+
+`token'
+ A sequence of characters considered a single unit by the shell.
+ It is either a `word' or an `operator'.
+
+`word'
+ A sequence of characters treated as a unit by the shell. Words
+ may not include unquoted `metacharacters'.
+
+
+File: bashref.info, Node: Basic Shell Features, Next: Shell Builtin Commands, Prev: Definitions, Up: Top
+
+3 Basic Shell Features
+**********************
+
+Bash is an acronym for `Bourne-Again SHell'. The Bourne shell is the
+traditional Unix shell originally written by Stephen Bourne. All of
+the Bourne shell builtin commands are available in Bash, The rules for
+evaluation and quoting are taken from the POSIX specification for the
+`standard' Unix shell.
+
+ This chapter briefly summarizes the shell's `building blocks':
+commands, control structures, shell functions, shell parameters, shell
+expansions, redirections, which are a way to direct input and output
+from and to named files, and how the shell executes commands.
+
+* Menu:
+
+* Shell Syntax:: What your input means to the shell.
+* Shell Commands:: The types of commands you can use.
+* Shell Functions:: Grouping commands by name.
+* Shell Parameters:: How the shell stores values.
+* Shell Expansions:: How Bash expands parameters and the various
+ expansions available.
+* Redirections:: A way to control where input and output go.
+* Executing Commands:: What happens when you run a command.
+* Shell Scripts:: Executing files of shell commands.
+
+
+File: bashref.info, Node: Shell Syntax, Next: Shell Commands, Up: Basic Shell Features
+
+3.1 Shell Syntax
+================
+
+* Menu:
+
+* Shell Operation:: The basic operation of the shell.
+* Quoting:: How to remove the special meaning from characters.
+* Comments:: How to specify comments.
+
+ When the shell reads input, it proceeds through a sequence of
+operations. If the input indicates the beginning of a comment, the
+shell ignores the comment symbol (`#'), and the rest of that line.
+
+ Otherwise, roughly speaking, the shell reads its input and divides
+the input into words and operators, employing the quoting rules to
+select which meanings to assign various words and characters.
+
+ The shell then parses these tokens into commands and other
+constructs, removes the special meaning of certain words or characters,
+expands others, redirects input and output as needed, executes the
+specified command, waits for the command's exit status, and makes that
+exit status available for further inspection or processing.
+
+
+File: bashref.info, Node: Shell Operation, Next: Quoting, Up: Shell Syntax
+
+3.1.1 Shell Operation
+---------------------
+
+The following is a brief description of the shell's operation when it
+reads and executes a command. Basically, the shell does the following:
+
+ 1. Reads its input from a file (*note Shell Scripts::), from a string
+ supplied as an argument to the `-c' invocation option (*note
+ Invoking Bash::), or from the user's terminal.
+
+ 2. Breaks the input into words and operators, obeying the quoting
+ rules described in *note Quoting::. These tokens are separated by
+ `metacharacters'. Alias expansion is performed by this step
+ (*note Aliases::).
+
+ 3. Parses the tokens into simple and compound commands (*note Shell
+ Commands::).
+
+ 4. Performs the various shell expansions (*note Shell Expansions::),
+ breaking the expanded tokens into lists of filenames (*note
+ Filename Expansion::) and commands and arguments.
+
+ 5. Performs any necessary redirections (*note Redirections::) and
+ removes the redirection operators and their operands from the
+ argument list.
+
+ 6. Executes the command (*note Executing Commands::).
+
+ 7. Optionally waits for the command to complete and collects its exit
+ status (*note Exit Status::).
+
+
+
+File: bashref.info, Node: Quoting, Next: Comments, Prev: Shell Operation, Up: Shell Syntax
+
+3.1.2 Quoting
+-------------
+
+* Menu:
+
+* Escape Character:: How to remove the special meaning from a single
+ character.
+* Single Quotes:: How to inhibit all interpretation of a sequence
+ of characters.
+* Double Quotes:: How to suppress most of the interpretation of a
+ sequence of characters.
+* ANSI-C Quoting:: How to expand ANSI-C sequences in quoted strings.
+* Locale Translation:: How to translate strings into different languages.
+
+ Quoting is used to remove the special meaning of certain characters
+or words to the shell. Quoting can be used to disable special
+treatment for special characters, to prevent reserved words from being
+recognized as such, and to prevent parameter expansion.
+
+ Each of the shell metacharacters (*note Definitions::) has special
+meaning to the shell and must be quoted if it is to represent itself.
+When the command history expansion facilities are being used (*note
+History Interaction::), the HISTORY EXPANSION character, usually `!',
+must be quoted to prevent history expansion. *Note Bash History
+Facilities::, for more details concerning history expansion.
+
+ There are three quoting mechanisms: the ESCAPE CHARACTER, single
+quotes, and double quotes.
+
+
+File: bashref.info, Node: Escape Character, Next: Single Quotes, Up: Quoting
+
+3.1.2.1 Escape Character
+........................
+
+A non-quoted backslash `\' is the Bash escape character. It preserves
+the literal value of the next character that follows, with the
+exception of `newline'. If a `\newline' pair appears, and the
+backslash itself is not quoted, the `\newline' is treated as a line
+continuation (that is, it is removed from the input stream and
+effectively ignored).
+
+
+File: bashref.info, Node: Single Quotes, Next: Double Quotes, Prev: Escape Character, Up: Quoting
+
+3.1.2.2 Single Quotes
+.....................
+
+Enclosing characters in single quotes (`'') preserves the literal value
+of each character within the quotes. A single quote may not occur
+between single quotes, even when preceded by a backslash.
+
+
+File: bashref.info, Node: Double Quotes, Next: ANSI-C Quoting, Prev: Single Quotes, Up: Quoting
+
+3.1.2.3 Double Quotes
+.....................
+
+Enclosing characters in double quotes (`"') preserves the literal value
+of all characters within the quotes, with the exception of `$', ``',
+`\', and, when history expansion is enabled, `!'. The characters `$'
+and ``' retain their special meaning within double quotes (*note Shell
+Expansions::). The backslash retains its special meaning only when
+followed by one of the following characters: `$', ``', `"', `\', or
+`newline'. Within double quotes, backslashes that are followed by one
+of these characters are removed. Backslashes preceding characters
+without a special meaning are left unmodified. A double quote may be
+quoted within double quotes by preceding it with a backslash. If
+enabled, history expansion will be performed unless an `!' appearing in
+double quotes is escaped using a backslash. The backslash preceding
+the `!' is not removed.
+
+ The special parameters `*' and `@' have special meaning when in
+double quotes (*note Shell Parameter Expansion::).
+
+
+File: bashref.info, Node: ANSI-C Quoting, Next: Locale Translation, Prev: Double Quotes, Up: Quoting
+
+3.1.2.4 ANSI-C Quoting
+......................
+
+Words of the form `$'STRING'' are treated specially. The word expands
+to STRING, with backslash-escaped characters replaced as specified by
+the ANSI C standard. Backslash escape sequences, if present, are
+decoded as follows:
+
+`\a'
+ alert (bell)
+
+`\b'
+ backspace
+
+`\e'
+`\E'
+ an escape character (not ANSI C)
+
+`\f'
+ form feed
+
+`\n'
+ newline
+
+`\r'
+ carriage return
+
+`\t'
+ horizontal tab
+
+`\v'
+ vertical tab
+
+`\\'
+ backslash
+
+`\''
+ single quote
+
+`\"'
+ double quote
+
+`\NNN'
+ the eight-bit character whose value is the octal value NNN (one to
+ three digits)
+
+`\xHH'
+ the eight-bit character whose value is the hexadecimal value HH
+ (one or two hex digits)
+
+`\cX'
+ a control-X character
+
+The expanded result is single-quoted, as if the dollar sign had not
+been present.
+
+
+File: bashref.info, Node: Locale Translation, Prev: ANSI-C Quoting, Up: Quoting
+
+3.1.2.5 Locale-Specific Translation
+...................................
+
+A double-quoted string preceded by a dollar sign (`$') will cause the
+string to be translated according to the current locale. If the
+current locale is `C' or `POSIX', the dollar sign is ignored. If the
+string is translated and replaced, the replacement is double-quoted.
+
+ Some systems use the message catalog selected by the `LC_MESSAGES'
+shell variable. Others create the name of the message catalog from the
+value of the `TEXTDOMAIN' shell variable, possibly adding a suffix of
+`.mo'. If you use the `TEXTDOMAIN' variable, you may need to set the
+`TEXTDOMAINDIR' variable to the location of the message catalog files.
+Still others use both variables in this fashion:
+`TEXTDOMAINDIR'/`LC_MESSAGES'/LC_MESSAGES/`TEXTDOMAIN'.mo.
+
+
+File: bashref.info, Node: Comments, Prev: Quoting, Up: Shell Syntax
+
+3.1.3 Comments
+--------------
+
+In a non-interactive shell, or an interactive shell in which the
+`interactive_comments' option to the `shopt' builtin is enabled (*note
+The Shopt Builtin::), a word beginning with `#' causes that word and
+all remaining characters on that line to be ignored. An interactive
+shell without the `interactive_comments' option enabled does not allow
+comments. The `interactive_comments' option is on by default in
+interactive shells. *Note Interactive Shells::, for a description of
+what makes a shell interactive.
+
+
+File: bashref.info, Node: Shell Commands, Next: Shell Functions, Prev: Shell Syntax, Up: Basic Shell Features
+
+3.2 Shell Commands
+==================
+
+A simple shell command such as `echo a b c' consists of the command
+itself followed by arguments, separated by spaces.
+
+ More complex shell commands are composed of simple commands arranged
+together in a variety of ways: in a pipeline in which the output of one
+command becomes the input of a second, in a loop or conditional
+construct, or in some other grouping.
+
+* Menu:
+
+* Simple Commands:: The most common type of command.
+* Pipelines:: Connecting the input and output of several
+ commands.
+* Lists:: How to execute commands sequentially.
+* Compound Commands:: Shell commands for control flow.
+* Coprocesses:: Two-way communication between commands.
+
+
+File: bashref.info, Node: Simple Commands, Next: Pipelines, Up: Shell Commands
+
+3.2.1 Simple Commands
+---------------------
+
+A simple command is the kind of command encountered most often. It's
+just a sequence of words separated by `blank's, terminated by one of
+the shell's control operators (*note Definitions::). The first word
+generally specifies a command to be executed, with the rest of the
+words being that command's arguments.
+
+ The return status (*note Exit Status::) of a simple command is its
+exit status as provided by the POSIX 1003.1 `waitpid' function, or
+128+N if the command was terminated by signal N.
+
+
+File: bashref.info, Node: Pipelines, Next: Lists, Prev: Simple Commands, Up: Shell Commands
+
+3.2.2 Pipelines
+---------------
+
+A `pipeline' is a sequence of simple commands separated by one of the
+control operators `|' or `|&'.
+
+ The format for a pipeline is
+ [`time' [`-p']] [`!'] COMMAND1 [ [`|' or `|&'] COMMAND2 ...]
+
+The output of each command in the pipeline is connected via a pipe to
+the input of the next command. That is, each command reads the
+previous command's output. This connection is performed before any
+redirections specified by the command.
+
+ If `|&' is used, the standard error of COMMAND1 is connected to
+COMMAND2's standard input through the pipe; it is shorthand for `2>&1
+|'. This implicit redirection of the standard error is performed after
+any redirections specified by the command.
+
+ The reserved word `time' causes timing statistics to be printed for
+the pipeline once it finishes. The statistics currently consist of
+elapsed (wall-clock) time and user and system time consumed by the
+command's execution. The `-p' option changes the output format to that
+specified by POSIX. The `TIMEFORMAT' variable may be set to a format
+string that specifies how the timing information should be displayed.
+*Note Bash Variables::, for a description of the available formats.
+The use of `time' as a reserved word permits the timing of shell
+builtins, shell functions, and pipelines. An external `time' command
+cannot time these easily.
+
+ If the pipeline is not executed asynchronously (*note Lists::), the
+shell waits for all commands in the pipeline to complete.
+
+ Each command in a pipeline is executed in its own subshell (*note
+Command Execution Environment::). The exit status of a pipeline is the
+exit status of the last command in the pipeline, unless the `pipefail'
+option is enabled (*note The Set Builtin::). If `pipefail' is enabled,
+the pipeline's return status is the value of the last (rightmost)
+command to exit with a non-zero status, or zero if all commands exit
+successfully. If the reserved word `!' precedes the pipeline, the exit
+status is the logical negation of the exit status as described above.
+The shell waits for all commands in the pipeline to terminate before
+returning a value.
+
+
+File: bashref.info, Node: Lists, Next: Compound Commands, Prev: Pipelines, Up: Shell Commands
+
+3.2.3 Lists of Commands
+-----------------------
+
+A `list' is a sequence of one or more pipelines separated by one of the
+operators `;', `&', `&&', or `||', and optionally terminated by one of
+`;', `&', or a `newline'.
+
+ Of these list operators, `&&' and `||' have equal precedence,
+followed by `;' and `&', which have equal precedence.
+
+ A sequence of one or more newlines may appear in a `list' to delimit
+commands, equivalent to a semicolon.
+
+ If a command is terminated by the control operator `&', the shell
+executes the command asynchronously in a subshell. This is known as
+executing the command in the BACKGROUND. The shell does not wait for
+the command to finish, and the return status is 0 (true). When job
+control is not active (*note Job Control::), the standard input for
+asynchronous commands, in the absence of any explicit redirections, is
+redirected from `/dev/null'.
+
+ Commands separated by a `;' are executed sequentially; the shell
+waits for each command to terminate in turn. The return status is the
+exit status of the last command executed.
+
+ AND and OR lists are sequences of one or more pipelines separated by
+the control operators `&&' and `||', respectively. AND and OR lists
+are executed with left associativity.
+
+ An AND list has the form
+ COMMAND1 && COMMAND2
+
+COMMAND2 is executed if, and only if, COMMAND1 returns an exit status
+of zero.
+
+ An OR list has the form
+ COMMAND1 || COMMAND2
+
+COMMAND2 is executed if, and only if, COMMAND1 returns a non-zero exit
+status.
+
+ The return status of AND and OR lists is the exit status of the last
+command executed in the list.
+
+
+File: bashref.info, Node: Compound Commands, Next: Coprocesses, Prev: Lists, Up: Shell Commands
+
+3.2.4 Compound Commands
+-----------------------
+
+* Menu:
+
+* Looping Constructs:: Shell commands for iterative action.
+* Conditional Constructs:: Shell commands for conditional execution.
+* Command Grouping:: Ways to group commands.
+
+ Compound commands are the shell programming constructs. Each
+construct begins with a reserved word or control operator and is
+terminated by a corresponding reserved word or operator. Any
+redirections (*note Redirections::) associated with a compound command
+apply to all commands within that compound command unless explicitly
+overridden.
+
+ Bash provides looping constructs, conditional commands, and
+mechanisms to group commands and execute them as a unit.
+
+
+File: bashref.info, Node: Looping Constructs, Next: Conditional Constructs, Up: Compound Commands
+
+3.2.4.1 Looping Constructs
+..........................
+
+Bash supports the following looping constructs.
+
+ Note that wherever a `;' appears in the description of a command's
+syntax, it may be replaced with one or more newlines.
+
+`until'
+ The syntax of the `until' command is:
+ until TEST-COMMANDS; do CONSEQUENT-COMMANDS; done
+ Execute CONSEQUENT-COMMANDS as long as TEST-COMMANDS has an exit
+ status which is not zero. The return status is the exit status of
+ the last command executed in CONSEQUENT-COMMANDS, or zero if none
+ was executed.
+
+`while'
+ The syntax of the `while' command is:
+ while TEST-COMMANDS; do CONSEQUENT-COMMANDS; done
+
+ Execute CONSEQUENT-COMMANDS as long as TEST-COMMANDS has an exit
+ status of zero. The return status is the exit status of the last
+ command executed in CONSEQUENT-COMMANDS, or zero if none was
+ executed.
+
+`for'
+ The syntax of the `for' command is:
+
+ for NAME [ [in [WORDS ...] ] ; ] do COMMANDS; done
+ Expand WORDS, and execute COMMANDS once for each member in the
+ resultant list, with NAME bound to the current member. If `in
+ WORDS' is not present, the `for' command executes the COMMANDS
+ once for each positional parameter that is set, as if `in "$@"'
+ had been specified (*note Special Parameters::). The return
+ status is the exit status of the last command that executes. If
+ there are no items in the expansion of WORDS, no commands are
+ executed, and the return status is zero.
+
+ An alternate form of the `for' command is also supported:
+
+ for (( EXPR1 ; EXPR2 ; EXPR3 )) ; do COMMANDS ; done
+ First, the arithmetic expression EXPR1 is evaluated according to
+ the rules described below (*note Shell Arithmetic::). The
+ arithmetic expression EXPR2 is then evaluated repeatedly until it
+ evaluates to zero. Each time EXPR2 evaluates to a non-zero value,
+ COMMANDS are executed and the arithmetic expression EXPR3 is
+ evaluated. If any expression is omitted, it behaves as if it
+ evaluates to 1. The return value is the exit status of the last
+ command in LIST that is executed, or false if any of the
+ expressions is invalid.
+
+
+ The `break' and `continue' builtins (*note Bourne Shell Builtins::)
+may be used to control loop execution.
+
+
+File: bashref.info, Node: Conditional Constructs, Next: Command Grouping, Prev: Looping Constructs, Up: Compound Commands
+
+3.2.4.2 Conditional Constructs
+..............................
+
+`if'
+ The syntax of the `if' command is:
+
+ if TEST-COMMANDS; then
+ CONSEQUENT-COMMANDS;
+ [elif MORE-TEST-COMMANDS; then
+ MORE-CONSEQUENTS;]
+ [else ALTERNATE-CONSEQUENTS;]
+ fi
+
+ The TEST-COMMANDS list is executed, and if its return status is
+ zero, the CONSEQUENT-COMMANDS list is executed. If TEST-COMMANDS
+ returns a non-zero status, each `elif' list is executed in turn,
+ and if its exit status is zero, the corresponding MORE-CONSEQUENTS
+ is executed and the command completes. If `else
+ ALTERNATE-CONSEQUENTS' is present, and the final command in the
+ final `if' or `elif' clause has a non-zero exit status, then
+ ALTERNATE-CONSEQUENTS is executed. The return status is the exit
+ status of the last command executed, or zero if no condition
+ tested true.
+
+`case'
+ The syntax of the `case' command is:
+
+ `case WORD in [ [(] PATTERN [| PATTERN]...) COMMAND-LIST ;;]... esac'
+
+ `case' will selectively execute the COMMAND-LIST corresponding to
+ the first PATTERN that matches WORD. If the shell option
+ `nocasematch' (see the description of `shopt' in *note The Shopt
+ Builtin::) is enabled, the match is performed without regard to
+ the case of alphabetic characters. The `|' is used to separate
+ multiple patterns, and the `)' operator terminates a pattern list.
+ A list of patterns and an associated command-list is known as a
+ CLAUSE.
+
+ Each clause must be terminated with `;;', `;&', or `;;&'. The
+ WORD undergoes tilde expansion, parameter expansion, command
+ substitution, arithmetic expansion, and quote removal before
+ matching is attempted. Each PATTERN undergoes tilde expansion,
+ parameter expansion, command substitution, and arithmetic
+ expansion.
+
+ There may be an arbitrary number of `case' clauses, each terminated
+ by a `;;', `;&', or `;;&'. The first pattern that matches
+ determines the command-list that is executed.
+
+ Here is an example using `case' in a script that could be used to
+ describe one interesting feature of an animal:
+
+ echo -n "Enter the name of an animal: "
+ read ANIMAL
+ echo -n "The $ANIMAL has "
+ case $ANIMAL in
+ horse | dog | cat) echo -n "four";;
+ man | kangaroo ) echo -n "two";;
+ *) echo -n "an unknown number of";;
+ esac
+ echo " legs."
+
+ If the `;;' operator is used, no subsequent matches are attempted
+ after the first pattern match. Using `;&' in place of `;;'
+ causes execution to continue with the COMMAND-LIST associated with
+ the next clause, if any. Using `;;&' in place of `;;' causes the
+ shell to test the patterns in the next clause, if any, and execute
+ any associated COMMAND-LIST on a successful match.
+
+ The return status is zero if no PATTERN is matched. Otherwise, the
+ return status is the exit status of the COMMAND-LIST executed.
+
+`select'
+ The `select' construct allows the easy generation of menus. It
+ has almost the same syntax as the `for' command:
+
+ select NAME [in WORDS ...]; do COMMANDS; done
+
+ The list of words following `in' is expanded, generating a list of
+ items. The set of expanded words is printed on the standard error
+ output stream, each preceded by a number. If the `in WORDS' is
+ omitted, the positional parameters are printed, as if `in "$@"'
+ had been specified. The `PS3' prompt is then displayed and a line
+ is read from the standard input. If the line consists of a number
+ corresponding to one of the displayed words, then the value of
+ NAME is set to that word. If the line is empty, the words and
+ prompt are displayed again. If `EOF' is read, the `select'
+ command completes. Any other value read causes NAME to be set to
+ null. The line read is saved in the variable `REPLY'.
+
+ The COMMANDS are executed after each selection until a `break'
+ command is executed, at which point the `select' command completes.
+
+ Here is an example that allows the user to pick a filename from the
+ current directory, and displays the name and index of the file
+ selected.
+
+ select fname in *;
+ do
+ echo you picked $fname \($REPLY\)
+ break;
+ done
+
+`((...))'
+ (( EXPRESSION ))
+
+ The arithmetic EXPRESSION is evaluated according to the rules
+ described below (*note Shell Arithmetic::). If the value of the
+ expression is non-zero, the return status is 0; otherwise the
+ return status is 1. This is exactly equivalent to
+ let "EXPRESSION"
+ *Note Bash Builtins::, for a full description of the `let' builtin.
+
+`[[...]]'
+ [[ EXPRESSION ]]
+
+ Return a status of 0 or 1 depending on the evaluation of the
+ conditional expression EXPRESSION. Expressions are composed of
+ the primaries described below in *note Bash Conditional
+ Expressions::. Word splitting and filename expansion are not
+ performed on the words between the `[[' and `]]'; tilde expansion,
+ parameter and variable expansion, arithmetic expansion, command
+ substitution, process substitution, and quote removal are
+ performed. Conditional operators such as `-f' must be unquoted to
+ be recognized as primaries.
+
+ When used with `[[', The `<' and `>' operators sort
+ lexicographically using the current locale.
+
+ When the `==' and `!=' operators are used, the string to the right
+ of the operator is considered a pattern and matched according to
+ the rules described below in *note Pattern Matching::. If the
+ shell option `nocasematch' (see the description of `shopt' in
+ *note The Shopt Builtin::) is enabled, the match is performed
+ without regard to the case of alphabetic characters. The return
+ value is 0 if the string matches (`==') or does not match
+ (`!=')the pattern, and 1 otherwise. Any part of the pattern may
+ be quoted to force it to be matched as a string.
+
+ An additional binary operator, `=~', is available, with the same
+ precedence as `==' and `!='. When it is used, the string to the
+ right of the operator is considered an extended regular expression
+ and matched accordingly (as in regex3)). The return value is 0 if
+ the string matches the pattern, and 1 otherwise. If the regular
+ expression is syntactically incorrect, the conditional
+ expression's return value is 2. If the shell option `nocasematch'
+ (see the description of `shopt' in *note The Shopt Builtin::) is
+ enabled, the match is performed without regard to the case of
+ alphabetic characters. Any part of the pattern may be quoted to
+ force it to be matched as a string. Substrings matched by
+ parenthesized subexpressions within the regular expression are
+ saved in the array variable `BASH_REMATCH'. The element of
+ `BASH_REMATCH' with index 0 is the portion of the string matching
+ the entire regular expression. The element of `BASH_REMATCH' with
+ index N is the portion of the string matching the Nth
+ parenthesized subexpression.
+
+ Expressions may be combined using the following operators, listed
+ in decreasing order of precedence:
+
+ `( EXPRESSION )'
+ Returns the value of EXPRESSION. This may be used to
+ override the normal precedence of operators.
+
+ `! EXPRESSION'
+ True if EXPRESSION is false.
+
+ `EXPRESSION1 && EXPRESSION2'
+ True if both EXPRESSION1 and EXPRESSION2 are true.
+
+ `EXPRESSION1 || EXPRESSION2'
+ True if either EXPRESSION1 or EXPRESSION2 is true.
+ The `&&' and `||' operators do not evaluate EXPRESSION2 if the
+ value of EXPRESSION1 is sufficient to determine the return value
+ of the entire conditional expression.
+
+
+
+File: bashref.info, Node: Command Grouping, Prev: Conditional Constructs, Up: Compound Commands
+
+3.2.4.3 Grouping Commands
+.........................
+
+Bash provides two ways to group a list of commands to be executed as a
+unit. When commands are grouped, redirections may be applied to the
+entire command list. For example, the output of all the commands in
+the list may be redirected to a single stream.
+
+`()'
+ ( LIST )
+
+ Placing a list of commands between parentheses causes a subshell
+ environment to be created (*note Command Execution Environment::),
+ and each of the commands in LIST to be executed in that subshell.
+ Since the LIST is executed in a subshell, variable assignments do
+ not remain in effect after the subshell completes.
+
+`{}'
+ { LIST; }
+
+ Placing a list of commands between curly braces causes the list to
+ be executed in the current shell context. No subshell is created.
+ The semicolon (or newline) following LIST is required.
+
+ In addition to the creation of a subshell, there is a subtle
+difference between these two constructs due to historical reasons. The
+braces are `reserved words', so they must be separated from the LIST by
+`blank's or other shell metacharacters. The parentheses are
+`operators', and are recognized as separate tokens by the shell even if
+they are not separated from the LIST by whitespace.
+
+ The exit status of both of these constructs is the exit status of
+LIST.
+
+
+File: bashref.info, Node: Coprocesses, Prev: Compound Commands, Up: Shell Commands
+
+3.2.5 Coprocesses
+-----------------
+
+A `coprocess' is a shell command preceded by the `coproc' reserved word.
+A coprocess is executed asynchronously in a subshell, as if the command
+had been terminated with the `&' control operator, with a two-way pipe
+established between the executing shell and the coprocess.
+
+ The format for a coprocess is:
+ `coproc' [NAME] COMMAND [REDIRECTIONS]
+
+This creates a coprocess named NAME. If NAME is not supplied, the
+default name is COPROC. NAME must not be supplied if COMMAND is a
+simple command (*note Simple Commands::); otherwise, it is interpreted
+as the first word of the simple command.
+
+ When the coproc is executed, the shell creates an array variable
+(*note Arrays::) named NAME in the context of the executing shell. The
+standard output of COMMAND is connected via a pipe to a file descriptor
+in the executing shell, and that file descriptor is assigned to NAME[0].
+The standard input of COMMAND is connected via a pipe to a file
+descriptor in the executing shell, and that file descriptor is assigned
+to NAME[1]. This pipe is established before any redirections specified
+by the command (*note Redirections::). The file descriptors can be
+utilized as arguments to shell commands and redirections using standard
+word expansions.
+
+ The process id of the shell spawned to execute the coprocess is
+available as the value of the variable NAME_PID. The `wait' builtin
+command may be used to wait for the coprocess to terminate.
+
+ The return status of a coprocess is the exit status of COMMAND.
+
+
+File: bashref.info, Node: Shell Functions, Next: Shell Parameters, Prev: Shell Commands, Up: Basic Shell Features
+
+3.3 Shell Functions
+===================
+
+Shell functions are a way to group commands for later execution using a
+single name for the group. They are executed just like a "regular"
+command. When the name of a shell function is used as a simple command
+name, the list of commands associated with that function name is
+executed. Shell functions are executed in the current shell context;
+no new process is created to interpret them.
+
+ Functions are declared using this syntax:
+ [ `function' ] NAME () COMPOUND-COMMAND [ REDIRECTIONS ]
+
+ This defines a shell function named NAME. The reserved word
+`function' is optional. If the `function' reserved word is supplied,
+the parentheses are optional. The BODY of the function is the compound
+command COMPOUND-COMMAND (*note Compound Commands::). That command is
+usually a LIST enclosed between { and }, but may be any compound
+command listed above. COMPOUND-COMMAND is executed whenever NAME is
+specified as the name of a command. Any redirections (*note
+Redirections::) associated with the shell function are performed when
+the function is executed.
+
+ A function definition may be deleted using the `-f' option to the
+`unset' builtin (*note Bourne Shell Builtins::).
+
+ The exit status of a function definition is zero unless a syntax
+error occurs or a readonly function with the same name already exists.
+When executed, the exit status of a function is the exit status of the
+last command executed in the body.
+
+ Note that for historical reasons, in the most common usage the curly
+braces that surround the body of the function must be separated from
+the body by `blank's or newlines. This is because the braces are
+reserved words and are only recognized as such when they are separated
+from the command list by whitespace or another shell metacharacter.
+Also, when using the braces, the LIST must be terminated by a semicolon,
+a `&', or a newline.
+
+ When a function is executed, the arguments to the function become
+the positional parameters during its execution (*note Positional
+Parameters::). The special parameter `#' that expands to the number of
+positional parameters is updated to reflect the change. Special
+parameter `0' is unchanged. The first element of the `FUNCNAME'
+variable is set to the name of the function while the function is
+executing.
+
+ All other aspects of the shell execution environment are identical
+between a function and its caller with these exceptions: the `DEBUG'
+and `RETURN' traps are not inherited unless the function has been given
+the `trace' attribute using the `declare' builtin or the `-o functrace'
+option has been enabled with the `set' builtin, (in which case all
+functions inherit the `DEBUG' and `RETURN' traps), and the `ERR' trap
+is not inherited unless the `-o errtrace' shell option has been enabled.
+*Note Bourne Shell Builtins::, for the description of the `trap'
+builtin.
+
+ If the builtin command `return' is executed in a function, the
+function completes and execution resumes with the next command after
+the function call. Any command associated with the `RETURN' trap is
+executed before execution resumes. When a function completes, the
+values of the positional parameters and the special parameter `#' are
+restored to the values they had prior to the function's execution. If
+a numeric argument is given to `return', that is the function's return
+status; otherwise the function's return status is the exit status of
+the last command executed before the `return'.
+
+ Variables local to the function may be declared with the `local'
+builtin. These variables are visible only to the function and the
+commands it invokes.
+
+ Function names and definitions may be listed with the `-f' option to
+the `declare' or `typeset' builtin commands (*note Bash Builtins::).
+The `-F' option to `declare' or `typeset' will list the function names
+only (and optionally the source file and line number, if the `extdebug'
+shell option is enabled). Functions may be exported so that subshells
+automatically have them defined with the `-f' option to the `export'
+builtin (*note Bourne Shell Builtins::). Note that shell functions and
+variables with the same name may result in multiple identically-named
+entries in the environment passed to the shell's children. Care should
+be taken in cases where this may cause a problem.
+
+ Functions may be recursive. No limit is placed on the number of
+recursive calls.
+
+
+File: bashref.info, Node: Shell Parameters, Next: Shell Expansions, Prev: Shell Functions, Up: Basic Shell Features
+
+3.4 Shell Parameters
+====================
+
+* Menu:
+
+* Positional Parameters:: The shell's command-line arguments.
+* Special Parameters:: Parameters denoted by special characters.
+
+ A PARAMETER is an entity that stores values. It can be a `name', a
+number, or one of the special characters listed below. A VARIABLE is a
+parameter denoted by a `name'. A variable has a VALUE and zero or more
+ATTRIBUTES. Attributes are assigned using the `declare' builtin command
+(see the description of the `declare' builtin in *note Bash Builtins::).
+
+ A parameter is set if it has been assigned a value. The null string
+is a valid value. Once a variable is set, it may be unset only by using
+the `unset' builtin command.
+
+ A variable may be assigned to by a statement of the form
+ NAME=[VALUE]
+ If VALUE is not given, the variable is assigned the null string. All
+VALUEs undergo tilde expansion, parameter and variable expansion,
+command substitution, arithmetic expansion, and quote removal (detailed
+below). If the variable has its `integer' attribute set, then VALUE is
+evaluated as an arithmetic expression even if the `$((...))' expansion
+is not used (*note Arithmetic Expansion::). Word splitting is not
+performed, with the exception of `"$@"' as explained below. Filename
+expansion is not performed. Assignment statements may also appear as
+arguments to the `alias', `declare', `typeset', `export', `readonly',
+and `local' builtin commands.
+
+ In the context where an assignment statement is assigning a value to
+a shell variable or array index (*note Arrays::), the `+=' operator can
+be used to append to or add to the variable's previous value. When
+`+=' is applied to a variable for which the integer attribute has been
+set, VALUE is evaluated as an arithmetic expression and added to the
+variable's current value, which is also evaluated. When `+=' is
+applied to an array variable using compound assignment (*note
+Arrays::), the variable's value is not unset (as it is when using `='),
+and new values are appended to the array beginning at one greater than
+the array's maximum index (for indexed arrays), or added as additional
+key-value pairs in an associative array. When applied to a
+string-valued variable, VALUE is expanded and appended to the
+variable's value.
+
+
+File: bashref.info, Node: Positional Parameters, Next: Special Parameters, Up: Shell Parameters
+
+3.4.1 Positional Parameters
+---------------------------
+
+A POSITIONAL PARAMETER is a parameter denoted by one or more digits,
+other than the single digit `0'. Positional parameters are assigned
+from the shell's arguments when it is invoked, and may be reassigned
+using the `set' builtin command. Positional parameter `N' may be
+referenced as `${N}', or as `$N' when `N' consists of a single digit.
+Positional parameters may not be assigned to with assignment statements.
+The `set' and `shift' builtins are used to set and unset them (*note
+Shell Builtin Commands::). The positional parameters are temporarily
+replaced when a shell function is executed (*note Shell Functions::).
+
+ When a positional parameter consisting of more than a single digit
+is expanded, it must be enclosed in braces.
+
+
+File: bashref.info, Node: Special Parameters, Prev: Positional Parameters, Up: Shell Parameters
+
+3.4.2 Special Parameters
+------------------------
+
+The shell treats several parameters specially. These parameters may
+only be referenced; assignment to them is not allowed.
+
+`*'
+ Expands to the positional parameters, starting from one. When the
+ expansion occurs within double quotes, it expands to a single word
+ with the value of each parameter separated by the first character
+ of the `IFS' special variable. That is, `"$*"' is equivalent to
+ `"$1C$2C..."', where C is the first character of the value of the
+ `IFS' variable. If `IFS' is unset, the parameters are separated
+ by spaces. If `IFS' is null, the parameters are joined without
+ intervening separators.
+
+`@'
+ Expands to the positional parameters, starting from one. When the
+ expansion occurs within double quotes, each parameter expands to a
+ separate word. That is, `"$@"' is equivalent to `"$1" "$2" ...'.
+ If the double-quoted expansion occurs within a word, the expansion
+ of the first parameter is joined with the beginning part of the
+ original word, and the expansion of the last parameter is joined
+ with the last part of the original word. When there are no
+ positional parameters, `"$@"' and `$@' expand to nothing (i.e.,
+ they are removed).
+
+`#'
+ Expands to the number of positional parameters in decimal.
+
+`?'
+ Expands to the exit status of the most recently executed foreground
+ pipeline.
+
+`-'
+ (A hyphen.) Expands to the current option flags as specified upon
+ invocation, by the `set' builtin command, or those set by the
+ shell itself (such as the `-i' option).
+
+`$'
+ Expands to the process ID of the shell. In a `()' subshell, it
+ expands to the process ID of the invoking shell, not the subshell.
+
+`!'
+ Expands to the process ID of the most recently executed background
+ (asynchronous) command.
+
+`0'
+ Expands to the name of the shell or shell script. This is set at
+ shell initialization. If Bash is invoked with a file of commands
+ (*note Shell Scripts::), `$0' is set to the name of that file. If
+ Bash is started with the `-c' option (*note Invoking Bash::), then
+ `$0' is set to the first argument after the string to be executed,
+ if one is present. Otherwise, it is set to the filename used to
+ invoke Bash, as given by argument zero.
+
+`_'
+ (An underscore.) At shell startup, set to the absolute pathname
+ used to invoke the shell or shell script being executed as passed
+ in the environment or argument list. Subsequently, expands to the
+ last argument to the previous command, after expansion. Also set
+ to the full pathname used to invoke each command executed and
+ placed in the environment exported to that command. When checking
+ mail, this parameter holds the name of the mail file.
+
+
+File: bashref.info, Node: Shell Expansions, Next: Redirections, Prev: Shell Parameters, Up: Basic Shell Features
+
+3.5 Shell Expansions
+====================
+
+Expansion is performed on the command line after it has been split into
+`token's. There are seven kinds of expansion performed:
+ * brace expansion
+
+ * tilde expansion
+
+ * parameter and variable expansion
+
+ * command substitution
+
+ * arithmetic expansion
+
+ * word splitting
+
+ * filename expansion
+
+* Menu:
+
+* Brace Expansion:: Expansion of expressions within braces.
+* Tilde Expansion:: Expansion of the ~ character.
+* Shell Parameter Expansion:: How Bash expands variables to their values.
+* Command Substitution:: Using the output of a command as an argument.
+* Arithmetic Expansion:: How to use arithmetic in shell expansions.
+* Process Substitution:: A way to write and read to and from a
+ command.
+* Word Splitting:: How the results of expansion are split into separate
+ arguments.
+* Filename Expansion:: A shorthand for specifying filenames matching patterns.
+* Quote Removal:: How and when quote characters are removed from
+ words.
+
+ The order of expansions is: brace expansion, tilde expansion,
+parameter, variable, and arithmetic expansion and command substitution
+(done in a left-to-right fashion), word splitting, and filename
+expansion.
+
+ On systems that can support it, there is an additional expansion
+available: PROCESS SUBSTITUTION. This is performed at the same time as
+parameter, variable, and arithmetic expansion and command substitution.
+
+ Only brace expansion, word splitting, and filename expansion can
+change the number of words of the expansion; other expansions expand a
+single word to a single word. The only exceptions to this are the
+expansions of `"$@"' (*note Special Parameters::) and `"${NAME[@]}"'
+(*note Arrays::).
+
+ After all expansions, `quote removal' (*note Quote Removal::) is
+performed.
+
+
+File: bashref.info, Node: Brace Expansion, Next: Tilde Expansion, Up: Shell Expansions
+
+3.5.1 Brace Expansion
+---------------------
+
+Brace expansion is a mechanism by which arbitrary strings may be
+generated. This mechanism is similar to FILENAME EXPANSION (*note
+Filename Expansion::), but the file names generated need not exist.
+Patterns to be brace expanded take the form of an optional PREAMBLE,
+followed by either a series of comma-separated strings or a seqeunce
+expression between a pair of braces, followed by an optional POSTSCRIPT.
+The preamble is prefixed to each string contained within the braces, and
+the postscript is then appended to each resulting string, expanding left
+to right.
+
+ Brace expansions may be nested. The results of each expanded string
+are not sorted; left to right order is preserved. For example,
+ bash$ echo a{d,c,b}e
+ ade ace abe
+
+ A sequence expression takes the form `{X..Y[..INCR]}', where X and Y
+are either integers or single characters, and INCR, an optional
+increment, is an integer. When integers are supplied, the expression
+expands to each number between X and Y, inclusive. Supplied integers
+may be prefixed with `0' to force each term to have the same width.
+When either X or Y begins with a zero, the shell attempts to force all
+generated terms to contain the same number of digits, zero-padding
+where necessary. When characters are supplied, the expression expands
+to each character lexicographically between X and Y, inclusive. Note
+that both X and Y must be of the same type. When the increment is
+supplied, it is used as the difference between each term. The default
+increment is 1 or -1 as appropriate.
+
+ Brace expansion is performed before any other expansions, and any
+characters special to other expansions are preserved in the result. It
+is strictly textual. Bash does not apply any syntactic interpretation
+to the context of the expansion or the text between the braces. To
+avoid conflicts with parameter expansion, the string `${' is not
+considered eligible for brace expansion.
+
+ A correctly-formed brace expansion must contain unquoted opening and
+closing braces, and at least one unquoted comma or a valid sequence
+expression. Any incorrectly formed brace expansion is left unchanged.
+
+ A { or `,' may be quoted with a backslash to prevent its being
+considered part of a brace expression. To avoid conflicts with
+parameter expansion, the string `${' is not considered eligible for
+brace expansion.
+
+ This construct is typically used as shorthand when the common prefix
+of the strings to be generated is longer than in the above example:
+ mkdir /usr/local/src/bash/{old,new,dist,bugs}
+ or
+ chown root /usr/{ucb/{ex,edit},lib/{ex?.?*,how_ex}}
+
+
+File: bashref.info, Node: Tilde Expansion, Next: Shell Parameter Expansion, Prev: Brace Expansion, Up: Shell Expansions
+
+3.5.2 Tilde Expansion
+---------------------
+
+If a word begins with an unquoted tilde character (`~'), all of the
+characters up to the first unquoted slash (or all characters, if there
+is no unquoted slash) are considered a TILDE-PREFIX. If none of the
+characters in the tilde-prefix are quoted, the characters in the
+tilde-prefix following the tilde are treated as a possible LOGIN NAME.
+If this login name is the null string, the tilde is replaced with the
+value of the `HOME' shell variable. If `HOME' is unset, the home
+directory of the user executing the shell is substituted instead.
+Otherwise, the tilde-prefix is replaced with the home directory
+associated with the specified login name.
+
+ If the tilde-prefix is `~+', the value of the shell variable `PWD'
+replaces the tilde-prefix. If the tilde-prefix is `~-', the value of
+the shell variable `OLDPWD', if it is set, is substituted.
+
+ If the characters following the tilde in the tilde-prefix consist of
+a number N, optionally prefixed by a `+' or a `-', the tilde-prefix is
+replaced with the corresponding element from the directory stack, as it
+would be displayed by the `dirs' builtin invoked with the characters
+following tilde in the tilde-prefix as an argument (*note The Directory
+Stack::). If the tilde-prefix, sans the tilde, consists of a number
+without a leading `+' or `-', `+' is assumed.
+
+ If the login name is invalid, or the tilde expansion fails, the word
+is left unchanged.
+
+ Each variable assignment is checked for unquoted tilde-prefixes
+immediately following a `:' or the first `='. In these cases, tilde
+expansion is also performed. Consequently, one may use file names with
+tildes in assignments to `PATH', `MAILPATH', and `CDPATH', and the
+shell assigns the expanded value.
+
+ The following table shows how Bash treats unquoted tilde-prefixes:
+
+`~'
+ The value of `$HOME'
+
+`~/foo'
+ `$HOME/foo'
+
+`~fred/foo'
+ The subdirectory `foo' of the home directory of the user `fred'
+
+`~+/foo'
+ `$PWD/foo'
+
+`~-/foo'
+ `${OLDPWD-'~-'}/foo'
+
+`~N'
+ The string that would be displayed by `dirs +N'
+
+`~+N'
+ The string that would be displayed by `dirs +N'
+
+`~-N'
+ The string that would be displayed by `dirs -N'
+
+
+
+File: bashref.info, Node: Shell Parameter Expansion, Next: Command Substitution, Prev: Tilde Expansion, Up: Shell Expansions
+
+3.5.3 Shell Parameter Expansion
+-------------------------------
+
+The `$' character introduces parameter expansion, command substitution,
+or arithmetic expansion. The parameter name or symbol to be expanded
+may be enclosed in braces, which are optional but serve to protect the
+variable to be expanded from characters immediately following it which
+could be interpreted as part of the name.
+
+ When braces are used, the matching ending brace is the first `}' not
+escaped by a backslash or within a quoted string, and not within an
+embedded arithmetic expansion, command substitution, or parameter
+expansion.
+
+ The basic form of parameter expansion is ${PARAMETER}. The value of
+PARAMETER is substituted. The braces are required when PARAMETER is a
+positional parameter with more than one digit, or when PARAMETER is
+followed by a character that is not to be interpreted as part of its
+name.
+
+ If the first character of PARAMETER is an exclamation point (!), a
+level of variable indirection is introduced. Bash uses the value of
+the variable formed from the rest of PARAMETER as the name of the
+variable; this variable is then expanded and that value is used in the
+rest of the substitution, rather than the value of PARAMETER itself.
+This is known as `indirect expansion'. The exceptions to this are the
+expansions of ${!PREFIX*} and ${!NAME[@]} described below. The
+exclamation point must immediately follow the left brace in order to
+introduce indirection.
+
+ In each of the cases below, WORD is subject to tilde expansion,
+parameter expansion, command substitution, and arithmetic expansion.
+
+ When not performing substring expansion, using the form described
+below, Bash tests for a parameter that is unset or null. Omitting the
+colon results in a test only for a parameter that is unset. Put
+another way, if the colon is included, the operator tests for both
+PARAMETER's existence and that its value is not null; if the colon is
+omitted, the operator tests only for existence.
+
+`${PARAMETER:-WORD}'
+ If PARAMETER is unset or null, the expansion of WORD is
+ substituted. Otherwise, the value of PARAMETER is substituted.
+
+`${PARAMETER:=WORD}'
+ If PARAMETER is unset or null, the expansion of WORD is assigned
+ to PARAMETER. The value of PARAMETER is then substituted.
+ Positional parameters and special parameters may not be assigned to
+ in this way.
+
+`${PARAMETER:?WORD}'
+ If PARAMETER is null or unset, the expansion of WORD (or a message
+ to that effect if WORD is not present) is written to the standard
+ error and the shell, if it is not interactive, exits. Otherwise,
+ the value of PARAMETER is substituted.
+
+`${PARAMETER:+WORD}'
+ If PARAMETER is null or unset, nothing is substituted, otherwise
+ the expansion of WORD is substituted.
+
+`${PARAMETER:OFFSET}'
+`${PARAMETER:OFFSET:LENGTH}'
+ Expands to up to LENGTH characters of PARAMETER starting at the
+ character specified by OFFSET. If LENGTH is omitted, expands to
+ the substring of PARAMETER starting at the character specified by
+ OFFSET. LENGTH and OFFSET are arithmetic expressions (*note Shell
+ Arithmetic::). This is referred to as Substring Expansion.
+
+ LENGTH must evaluate to a number greater than or equal to zero.
+ If OFFSET evaluates to a number less than zero, the value is used
+ as an offset from the end of the value of PARAMETER. If PARAMETER
+ is `@', the result is LENGTH positional parameters beginning at
+ OFFSET. If PARAMETER is an indexed array name subscripted by `@'
+ or `*', the result is the LENGTH members of the array beginning
+ with `${PARAMETER[OFFSET]}'. A negative OFFSET is taken relative
+ to one greater than the maximum index of the specified array.
+ Substring expansion applied to an associative array produces
+ undefined results.
+
+ Note that a negative offset must be separated from the colon by at
+ least one space to avoid being confused with the `:-' expansion.
+ Substring indexing is zero-based unless the positional parameters
+ are used, in which case the indexing starts at 1 by default. If
+ OFFSET is 0, and the positional parameters are used, `$@' is
+ prefixed to the list.
+
+`${!PREFIX*}'
+`${!PREFIX@}'
+ Expands to the names of variables whose names begin with PREFIX,
+ separated by the first character of the `IFS' special variable.
+ When `@' is used and the expansion appears within double quotes,
+ each variable name expands to a separate word.
+
+`${!NAME[@]}'
+`${!NAME[*]}'
+ If NAME is an array variable, expands to the list of array indices
+ (keys) assigned in NAME. If NAME is not an array, expands to 0 if
+ NAME is set and null otherwise. When `@' is used and the
+ expansion appears within double quotes, each key expands to a
+ separate word.
+
+`${#PARAMETER}'
+ The length in characters of the expanded value of PARAMETER is
+ substituted. If PARAMETER is `*' or `@', the value substituted is
+ the number of positional parameters. If PARAMETER is an array
+ name subscripted by `*' or `@', the value substituted is the
+ number of elements in the array.
+
+`${PARAMETER#WORD}'
+`${PARAMETER##WORD}'
+ The WORD is expanded to produce a pattern just as in filename
+ expansion (*note Filename Expansion::). If the pattern matches
+ the beginning of the expanded value of PARAMETER, then the result
+ of the expansion is the expanded value of PARAMETER with the
+ shortest matching pattern (the `#' case) or the longest matching
+ pattern (the `##' case) deleted. If PARAMETER is `@' or `*', the
+ pattern removal operation is applied to each positional parameter
+ in turn, and the expansion is the resultant list. If PARAMETER is
+ an array variable subscripted with `@' or `*', the pattern removal
+ operation is applied to each member of the array in turn, and the
+ expansion is the resultant list.
+
+`${PARAMETER%WORD}'
+`${PARAMETER%%WORD}'
+ The WORD is expanded to produce a pattern just as in filename
+ expansion. If the pattern matches a trailing portion of the
+ expanded value of PARAMETER, then the result of the expansion is
+ the value of PARAMETER with the shortest matching pattern (the `%'
+ case) or the longest matching pattern (the `%%' case) deleted. If
+ PARAMETER is `@' or `*', the pattern removal operation is applied
+ to each positional parameter in turn, and the expansion is the
+ resultant list. If PARAMETER is an array variable subscripted
+ with `@' or `*', the pattern removal operation is applied to each
+ member of the array in turn, and the expansion is the resultant
+ list.
+
+`${PARAMETER/PATTERN/STRING}'
+ The PATTERN is expanded to produce a pattern just as in filename
+ expansion. PARAMETER is expanded and the longest match of PATTERN
+ against its value is replaced with STRING. If PATTERN begins with
+ `/', all matches of PATTERN are replaced with STRING. Normally
+ only the first match is replaced. If PATTERN begins with `#', it
+ must match at the beginning of the expanded value of PARAMETER.
+ If PATTERN begins with `%', it must match at the end of the
+ expanded value of PARAMETER. If STRING is null, matches of
+ PATTERN are deleted and the `/' following PATTERN may be omitted.
+ If PARAMETER is `@' or `*', the substitution operation is applied
+ to each positional parameter in turn, and the expansion is the
+ resultant list. If PARAMETER is an array variable subscripted
+ with `@' or `*', the substitution operation is applied to each
+ member of the array in turn, and the expansion is the resultant
+ list.
+
+`${PARAMETER^PATTERN}'
+`${PARAMETER^^PATTERN}'
+`${PARAMETER,PATTERN}'
+`${PARAMETER,,PATTERN}'
+ This expansion modifies the case of alphabetic characters in
+ PARAMETER. The PATTERN is expanded to produce a pattern just as in
+ filename expansion. The `^' operator converts lowercase letters
+ matching PATTERN to uppercase; the `,' operator converts matching
+ uppercase letters to lowercase. The `^^' and `,,' expansions
+ convert each matched character in the expanded value; the `^' and
+ `,' expansions match and convert only the first character in the
+ expanded value. If PATTERN is omitted, it is treated like a `?',
+ which matches every character. If PARAMETER is `@' or `*', the
+ case modification operation is applied to each positional
+ parameter in turn, and the expansion is the resultant list. If
+ PARAMETER is an array variable subscripted with `@' or `*', the
+ case modification operation is applied to each member of the array
+ in turn, and the expansion is the resultant list.
+
+
+
+File: bashref.info, Node: Command Substitution, Next: Arithmetic Expansion, Prev: Shell Parameter Expansion, Up: Shell Expansions
+
+3.5.4 Command Substitution
+--------------------------
+
+Command substitution allows the output of a command to replace the
+command itself. Command substitution occurs when a command is enclosed
+as follows:
+ $(COMMAND)
+ or
+ `COMMAND`
+
+Bash performs the expansion by executing COMMAND and replacing the
+command substitution with the standard output of the command, with any
+trailing newlines deleted. Embedded newlines are not deleted, but they
+may be removed during word splitting. The command substitution `$(cat
+FILE)' can be replaced by the equivalent but faster `$(< FILE)'.
+
+ When the old-style backquote form of substitution is used, backslash
+retains its literal meaning except when followed by `$', ``', or `\'.
+The first backquote not preceded by a backslash terminates the command
+substitution. When using the `$(COMMAND)' form, all characters between
+the parentheses make up the command; none are treated specially.
+
+ Command substitutions may be nested. To nest when using the
+backquoted form, escape the inner backquotes with backslashes.
+
+ If the substitution appears within double quotes, word splitting and
+filename expansion are not performed on the results.
+
+
+File: bashref.info, Node: Arithmetic Expansion, Next: Process Substitution, Prev: Command Substitution, Up: Shell Expansions
+
+3.5.5 Arithmetic Expansion
+--------------------------
+
+Arithmetic expansion allows the evaluation of an arithmetic expression
+and the substitution of the result. The format for arithmetic
+expansion is:
+
+ $(( EXPRESSION ))
+
+ The expression is treated as if it were within double quotes, but a
+double quote inside the parentheses is not treated specially. All
+tokens in the expression undergo parameter expansion, command
+substitution, and quote removal. Arithmetic expansions may be nested.
+
+ The evaluation is performed according to the rules listed below
+(*note Shell Arithmetic::). If the expression is invalid, Bash prints
+a message indicating failure to the standard error and no substitution
+occurs.
+
+
+File: bashref.info, Node: Process Substitution, Next: Word Splitting, Prev: Arithmetic Expansion, Up: Shell Expansions
+
+3.5.6 Process Substitution
+--------------------------
+
+Process substitution is supported on systems that support named pipes
+(FIFOs) or the `/dev/fd' method of naming open files. It takes the
+form of
+ <(LIST)
+ or
+ >(LIST)
+ The process LIST is run with its input or output connected to a FIFO
+or some file in `/dev/fd'. The name of this file is passed as an
+argument to the current command as the result of the expansion. If the
+`>(LIST)' form is used, writing to the file will provide input for
+LIST. If the `<(LIST)' form is used, the file passed as an argument
+should be read to obtain the output of LIST. Note that no space may
+appear between the `<' or `>' and the left parenthesis, otherwise the
+construct would be interpreted as a redirection.
+
+ When available, process substitution is performed simultaneously with
+parameter and variable expansion, command substitution, and arithmetic
+expansion.
+
+
+File: bashref.info, Node: Word Splitting, Next: Filename Expansion, Prev: Process Substitution, Up: Shell Expansions
+
+3.5.7 Word Splitting
+--------------------
+
+The shell scans the results of parameter expansion, command
+substitution, and arithmetic expansion that did not occur within double
+quotes for word splitting.
+
+ The shell treats each character of `$IFS' as a delimiter, and splits
+the results of the other expansions into words on these characters. If
+`IFS' is unset, or its value is exactly `<space><tab><newline>', the
+default, then sequences of ` <space>', `<tab>', and `<newline>' at the
+beginning and end of the results of the previous expansions are
+ignored, and any sequence of `IFS' characters not at the beginning or
+end serves to delimit words. If `IFS' has a value other than the
+default, then sequences of the whitespace characters `space' and `tab'
+are ignored at the beginning and end of the word, as long as the
+whitespace character is in the value of `IFS' (an `IFS' whitespace
+character). Any character in `IFS' that is not `IFS' whitespace, along
+with any adjacent `IFS' whitespace characters, delimits a field. A
+sequence of `IFS' whitespace characters is also treated as a delimiter.
+If the value of `IFS' is null, no word splitting occurs.
+
+ Explicit null arguments (`""' or `''') are retained. Unquoted
+implicit null arguments, resulting from the expansion of parameters
+that have no values, are removed. If a parameter with no value is
+expanded within double quotes, a null argument results and is retained.
+
+ Note that if no expansion occurs, no splitting is performed.
+
+
+File: bashref.info, Node: Filename Expansion, Next: Quote Removal, Prev: Word Splitting, Up: Shell Expansions
+
+3.5.8 Filename Expansion
+------------------------
+
+* Menu:
+
+* Pattern Matching:: How the shell matches patterns.
+
+ After word splitting, unless the `-f' option has been set (*note The
+Set Builtin::), Bash scans each word for the characters `*', `?', and
+`['. If one of these characters appears, then the word is regarded as
+a PATTERN, and replaced with an alphabetically sorted list of file
+names matching the pattern. If no matching file names are found, and
+the shell option `nullglob' is disabled, the word is left unchanged.
+If the `nullglob' option is set, and no matches are found, the word is
+removed. If the `failglob' shell option is set, and no matches are
+found, an error message is printed and the command is not executed. If
+the shell option `nocaseglob' is enabled, the match is performed
+without regard to the case of alphabetic characters.
+
+ When a pattern is used for filename expansion, the character `.' at
+the start of a filename or immediately following a slash must be
+matched explicitly, unless the shell option `dotglob' is set. When
+matching a file name, the slash character must always be matched
+explicitly. In other cases, the `.' character is not treated specially.
+
+ See the description of `shopt' in *note The Shopt Builtin::, for a
+description of the `nocaseglob', `nullglob', `failglob', and `dotglob'
+options.
+
+ The `GLOBIGNORE' shell variable may be used to restrict the set of
+filenames matching a pattern. If `GLOBIGNORE' is set, each matching
+filename that also matches one of the patterns in `GLOBIGNORE' is
+removed from the list of matches. The filenames `.' and `..' are
+always ignored when `GLOBIGNORE' is set and not null. However, setting
+`GLOBIGNORE' to a non-null value has the effect of enabling the
+`dotglob' shell option, so all other filenames beginning with a `.'
+will match. To get the old behavior of ignoring filenames beginning
+with a `.', make `.*' one of the patterns in `GLOBIGNORE'. The
+`dotglob' option is disabled when `GLOBIGNORE' is unset.
+
+
+File: bashref.info, Node: Pattern Matching, Up: Filename Expansion
+
+3.5.8.1 Pattern Matching
+........................
+
+Any character that appears in a pattern, other than the special pattern
+characters described below, matches itself. The NUL character may not
+occur in a pattern. A backslash escapes the following character; the
+escaping backslash is discarded when matching. The special pattern
+characters must be quoted if they are to be matched literally.
+
+ The special pattern characters have the following meanings:
+`*'
+ Matches any string, including the null string. When the
+ `globstar' shell option is enabled, and `*' is used in a filename
+ expansion context, two adjacent `*'s used as a single pattern will
+ match all files and zero or more directories and subdirectories.
+ If followed by a `/', two adjacent `*'s will match only
+ directories and subdirectories.
+
+`?'
+ Matches any single character.
+
+`[...]'
+ Matches any one of the enclosed characters. A pair of characters
+ separated by a hyphen denotes a RANGE EXPRESSION; any character
+ that sorts between those two characters, inclusive, using the
+ current locale's collating sequence and character set, is matched.
+ If the first character following the `[' is a `!' or a `^' then
+ any character not enclosed is matched. A `-' may be matched by
+ including it as the first or last character in the set. A `]' may
+ be matched by including it as the first character in the set. The
+ sorting order of characters in range expressions is determined by
+ the current locale and the value of the `LC_COLLATE' shell
+ variable, if set.
+
+ For example, in the default C locale, `[a-dx-z]' is equivalent to
+ `[abcdxyz]'. Many locales sort characters in dictionary order,
+ and in these locales `[a-dx-z]' is typically not equivalent to
+ `[abcdxyz]'; it might be equivalent to `[aBbCcDdxXyYz]', for
+ example. To obtain the traditional interpretation of ranges in
+ bracket expressions, you can force the use of the C locale by
+ setting the `LC_COLLATE' or `LC_ALL' environment variable to the
+ value `C'.
+
+ Within `[' and `]', CHARACTER CLASSES can be specified using the
+ syntax `[:'CLASS`:]', where CLASS is one of the following classes
+ defined in the POSIX standard:
+ alnum alpha ascii blank cntrl digit graph lower
+ print punct space upper word xdigit
+ A character class matches any character belonging to that class.
+ The `word' character class matches letters, digits, and the
+ character `_'.
+
+ Within `[' and `]', an EQUIVALENCE CLASS can be specified using
+ the syntax `[='C`=]', which matches all characters with the same
+ collation weight (as defined by the current locale) as the
+ character C.
+
+ Within `[' and `]', the syntax `[.'SYMBOL`.]' matches the
+ collating symbol SYMBOL.
+
+ If the `extglob' shell option is enabled using the `shopt' builtin,
+several extended pattern matching operators are recognized. In the
+following description, a PATTERN-LIST is a list of one or more patterns
+separated by a `|'. Composite patterns may be formed using one or more
+of the following sub-patterns:
+
+`?(PATTERN-LIST)'
+ Matches zero or one occurrence of the given patterns.
+
+`*(PATTERN-LIST)'
+ Matches zero or more occurrences of the given patterns.
+
+`+(PATTERN-LIST)'
+ Matches one or more occurrences of the given patterns.
+
+`@(PATTERN-LIST)'
+ Matches one of the given patterns.
+
+`!(PATTERN-LIST)'
+ Matches anything except one of the given patterns.
+
+
+File: bashref.info, Node: Quote Removal, Prev: Filename Expansion, Up: Shell Expansions
+
+3.5.9 Quote Removal
+-------------------
+
+After the preceding expansions, all unquoted occurrences of the
+characters `\', `'', and `"' that did not result from one of the above
+expansions are removed.
+
+
+File: bashref.info, Node: Redirections, Next: Executing Commands, Prev: Shell Expansions, Up: Basic Shell Features
+
+3.6 Redirections
+================
+
+Before a command is executed, its input and output may be REDIRECTED
+using a special notation interpreted by the shell. Redirection may
+also be used to open and close files for the current shell execution
+environment. The following redirection operators may precede or appear
+anywhere within a simple command or may follow a command. Redirections
+are processed in the order they appear, from left to right.
+
+ Each redirection that may be preceded by a file descriptor number
+may instead be preceded by a word of the form {VARNAME}. In this case,
+for each redirection operator except >&- and <&-, the shell will
+allocate a file descriptor greater than 10 and assign it to {VARNAME}.
+If >&- or <&- is preceded by {VARNAME}, the value of VARNAME defines
+the file descriptor to close.
+
+ In the following descriptions, if the file descriptor number is
+omitted, and the first character of the redirection operator is `<',
+the redirection refers to the standard input (file descriptor 0). If
+the first character of the redirection operator is `>', the redirection
+refers to the standard output (file descriptor 1).
+
+ The word following the redirection operator in the following
+descriptions, unless otherwise noted, is subjected to brace expansion,
+tilde expansion, parameter expansion, command substitution, arithmetic
+expansion, quote removal, filename expansion, and word splitting. If
+it expands to more than one word, Bash reports an error.
+
+ Note that the order of redirections is significant. For example,
+the command
+ ls > DIRLIST 2>&1
+ directs both standard output (file descriptor 1) and standard error
+(file descriptor 2) to the file DIRLIST, while the command
+ ls 2>&1 > DIRLIST
+ directs only the standard output to file DIRLIST, because the
+standard error was made a copy of the standard output before the
+standard output was redirected to DIRLIST.
+
+ Bash handles several filenames specially when they are used in
+redirections, as described in the following table:
+
+`/dev/fd/FD'
+ If FD is a valid integer, file descriptor FD is duplicated.
+
+`/dev/stdin'
+ File descriptor 0 is duplicated.
+
+`/dev/stdout'
+ File descriptor 1 is duplicated.
+
+`/dev/stderr'
+ File descriptor 2 is duplicated.
+
+`/dev/tcp/HOST/PORT'
+ If HOST is a valid hostname or Internet address, and PORT is an
+ integer port number or service name, Bash attempts to open a TCP
+ connection to the corresponding socket.
+
+`/dev/udp/HOST/PORT'
+ If HOST is a valid hostname or Internet address, and PORT is an
+ integer port number or service name, Bash attempts to open a UDP
+ connection to the corresponding socket.
+
+
+ A failure to open or create a file causes the redirection to fail.
+
+ Redirections using file descriptors greater than 9 should be used
+with care, as they may conflict with file descriptors the shell uses
+internally.
+
+3.6.1 Redirecting Input
+-----------------------
+
+Redirection of input causes the file whose name results from the
+expansion of WORD to be opened for reading on file descriptor `n', or
+the standard input (file descriptor 0) if `n' is not specified.
+
+ The general format for redirecting input is:
+ [N]<WORD
+
+3.6.2 Redirecting Output
+------------------------
+
+Redirection of output causes the file whose name results from the
+expansion of WORD to be opened for writing on file descriptor N, or the
+standard output (file descriptor 1) if N is not specified. If the file
+does not exist it is created; if it does exist it is truncated to zero
+size.
+
+ The general format for redirecting output is:
+ [N]>[|]WORD
+
+ If the redirection operator is `>', and the `noclobber' option to
+the `set' builtin has been enabled, the redirection will fail if the
+file whose name results from the expansion of WORD exists and is a
+regular file. If the redirection operator is `>|', or the redirection
+operator is `>' and the `noclobber' option is not enabled, the
+redirection is attempted even if the file named by WORD exists.
+
+3.6.3 Appending Redirected Output
+---------------------------------
+
+Redirection of output in this fashion causes the file whose name
+results from the expansion of WORD to be opened for appending on file
+descriptor N, or the standard output (file descriptor 1) if N is not
+specified. If the file does not exist it is created.
+
+ The general format for appending output is:
+ [N]>>WORD
+
+3.6.4 Redirecting Standard Output and Standard Error
+----------------------------------------------------
+
+This construct allows both the standard output (file descriptor 1) and
+the standard error output (file descriptor 2) to be redirected to the
+file whose name is the expansion of WORD.
+
+ There are two formats for redirecting standard output and standard
+error:
+ &>WORD
+ and
+ >&WORD
+ Of the two forms, the first is preferred. This is semantically
+equivalent to
+ >WORD 2>&1
+
+3.6.5 Appending Standard Output and Standard Error
+--------------------------------------------------
+
+This construct allows both the standard output (file descriptor 1) and
+the standard error output (file descriptor 2) to be appended to the
+file whose name is the expansion of WORD.
+
+ The format for appending standard output and standard error is:
+ &>>WORD
+ This is semantically equivalent to
+ >>WORD 2>&1
+
+3.6.6 Here Documents
+--------------------
+
+This type of redirection instructs the shell to read input from the
+current source until a line containing only WORD (with no trailing
+blanks) is seen. All of the lines read up to that point are then used
+as the standard input for a command.
+
+ The format of here-documents is:
+ <<[-]WORD
+ HERE-DOCUMENT
+ DELIMITER
+
+ No parameter expansion, command substitution, arithmetic expansion,
+or filename expansion is performed on WORD. If any characters in WORD
+are quoted, the DELIMITER is the result of quote removal on WORD, and
+the lines in the here-document are not expanded. If WORD is unquoted,
+all lines of the here-document are subjected to parameter expansion,
+command substitution, and arithmetic expansion. In the latter case,
+the character sequence `\newline' is ignored, and `\' must be used to
+quote the characters `\', `$', and ``'.
+
+ If the redirection operator is `<<-', then all leading tab
+characters are stripped from input lines and the line containing
+DELIMITER. This allows here-documents within shell scripts to be
+indented in a natural fashion.
+
+3.6.7 Here Strings
+------------------
+
+A variant of here documents, the format is:
+ <<< WORD
+
+ The WORD is expanded and supplied to the command on its standard
+input.
+
+3.6.8 Duplicating File Descriptors
+----------------------------------
+
+The redirection operator
+ [N]<&WORD
+ is used to duplicate input file descriptors. If WORD expands to one
+or more digits, the file descriptor denoted by N is made to be a copy
+of that file descriptor. If the digits in WORD do not specify a file
+descriptor open for input, a redirection error occurs. If WORD
+evaluates to `-', file descriptor N is closed. If N is not specified,
+the standard input (file descriptor 0) is used.
+
+ The operator
+ [N]>&WORD
+ is used similarly to duplicate output file descriptors. If N is not
+specified, the standard output (file descriptor 1) is used. If the
+digits in WORD do not specify a file descriptor open for output, a
+redirection error occurs. As a special case, if N is omitted, and WORD
+does not expand to one or more digits, the standard output and standard
+error are redirected as described previously.
+
+3.6.9 Moving File Descriptors
+-----------------------------
+
+The redirection operator
+ [N]<&DIGIT-
+ moves the file descriptor DIGIT to file descriptor N, or the
+standard input (file descriptor 0) if N is not specified. DIGIT is
+closed after being duplicated to N.
+
+ Similarly, the redirection operator
+ [N]>&DIGIT-
+ moves the file descriptor DIGIT to file descriptor N, or the
+standard output (file descriptor 1) if N is not specified.
+
+3.6.10 Opening File Descriptors for Reading and Writing
+-------------------------------------------------------
+
+The redirection operator
+ [N]<>WORD
+ causes the file whose name is the expansion of WORD to be opened for
+both reading and writing on file descriptor N, or on file descriptor 0
+if N is not specified. If the file does not exist, it is created.
+
+
+File: bashref.info, Node: Executing Commands, Next: Shell Scripts, Prev: Redirections, Up: Basic Shell Features
+
+3.7 Executing Commands
+======================
+
+* Menu:
+
+* Simple Command Expansion:: How Bash expands simple commands before
+ executing them.
+* Command Search and Execution:: How Bash finds commands and runs them.
+* Command Execution Environment:: The environment in which Bash
+ executes commands that are not
+ shell builtins.
+* Environment:: The environment given to a command.
+* Exit Status:: The status returned by commands and how Bash
+ interprets it.
+* Signals:: What happens when Bash or a command it runs
+ receives a signal.
+
+
+File: bashref.info, Node: Simple Command Expansion, Next: Command Search and Execution, Up: Executing Commands
+
+3.7.1 Simple Command Expansion
+------------------------------
+
+When a simple command is executed, the shell performs the following
+expansions, assignments, and redirections, from left to right.
+
+ 1. The words that the parser has marked as variable assignments (those
+ preceding the command name) and redirections are saved for later
+ processing.
+
+ 2. The words that are not variable assignments or redirections are
+ expanded (*note Shell Expansions::). If any words remain after
+ expansion, the first word is taken to be the name of the command
+ and the remaining words are the arguments.
+
+ 3. Redirections are performed as described above (*note
+ Redirections::).
+
+ 4. The text after the `=' in each variable assignment undergoes tilde
+ expansion, parameter expansion, command substitution, arithmetic
+ expansion, and quote removal before being assigned to the variable.
+
+ If no command name results, the variable assignments affect the
+current shell environment. Otherwise, the variables are added to the
+environment of the executed command and do not affect the current shell
+environment. If any of the assignments attempts to assign a value to a
+readonly variable, an error occurs, and the command exits with a
+non-zero status.
+
+ If no command name results, redirections are performed, but do not
+affect the current shell environment. A redirection error causes the
+command to exit with a non-zero status.
+
+ If there is a command name left after expansion, execution proceeds
+as described below. Otherwise, the command exits. If one of the
+expansions contained a command substitution, the exit status of the
+command is the exit status of the last command substitution performed.
+If there were no command substitutions, the command exits with a status
+of zero.
+
+
+File: bashref.info, Node: Command Search and Execution, Next: Command Execution Environment, Prev: Simple Command Expansion, Up: Executing Commands
+
+3.7.2 Command Search and Execution
+----------------------------------
+
+After a command has been split into words, if it results in a simple
+command and an optional list of arguments, the following actions are
+taken.
+
+ 1. If the command name contains no slashes, the shell attempts to
+ locate it. If there exists a shell function by that name, that
+ function is invoked as described in *note Shell Functions::.
+
+ 2. If the name does not match a function, the shell searches for it
+ in the list of shell builtins. If a match is found, that builtin
+ is invoked.
+
+ 3. If the name is neither a shell function nor a builtin, and
+ contains no slashes, Bash searches each element of `$PATH' for a
+ directory containing an executable file by that name. Bash uses a
+ hash table to remember the full pathnames of executable files to
+ avoid multiple `PATH' searches (see the description of `hash' in
+ *note Bourne Shell Builtins::). A full search of the directories
+ in `$PATH' is performed only if the command is not found in the
+ hash table. If the search is unsuccessful, the shell searches for
+ a defined shell function named `command_not_found_handle'. If
+ that function exists, it is invoked with the original command and
+ the original command's arguments as its arguments, and the
+ function's exit status becomes the exit status of the shell. If
+ that function is not defined, the shell prints an error message
+ and returns an exit status of 127.
+
+ 4. If the search is successful, or if the command name contains one
+ or more slashes, the shell executes the named program in a
+ separate execution environment. Argument 0 is set to the name
+ given, and the remaining arguments to the command are set to the
+ arguments supplied, if any.
+
+ 5. If this execution fails because the file is not in executable
+ format, and the file is not a directory, it is assumed to be a
+ SHELL SCRIPT and the shell executes it as described in *note Shell
+ Scripts::.
+
+ 6. If the command was not begun asynchronously, the shell waits for
+ the command to complete and collects its exit status.
+
+
+
+File: bashref.info, Node: Command Execution Environment, Next: Environment, Prev: Command Search and Execution, Up: Executing Commands
+
+3.7.3 Command Execution Environment
+-----------------------------------
+
+The shell has an EXECUTION ENVIRONMENT, which consists of the following:
+
+ * open files inherited by the shell at invocation, as modified by
+ redirections supplied to the `exec' builtin
+
+ * the current working directory as set by `cd', `pushd', or `popd',
+ or inherited by the shell at invocation
+
+ * the file creation mode mask as set by `umask' or inherited from
+ the shell's parent
+
+ * current traps set by `trap'
+
+ * shell parameters that are set by variable assignment or with `set'
+ or inherited from the shell's parent in the environment
+
+ * shell functions defined during execution or inherited from the
+ shell's parent in the environment
+
+ * options enabled at invocation (either by default or with
+ command-line arguments) or by `set'
+
+ * options enabled by `shopt' (*note The Shopt Builtin::)
+
+ * shell aliases defined with `alias' (*note Aliases::)
+
+ * various process IDs, including those of background jobs (*note
+ Lists::), the value of `$$', and the value of `$PPID'
+
+
+ When a simple command other than a builtin or shell function is to
+be executed, it is invoked in a separate execution environment that
+consists of the following. Unless otherwise noted, the values are
+inherited from the shell.
+
+ * the shell's open files, plus any modifications and additions
+ specified by redirections to the command
+
+ * the current working directory
+
+ * the file creation mode mask
+
+ * shell variables and functions marked for export, along with
+ variables exported for the command, passed in the environment
+ (*note Environment::)
+
+ * traps caught by the shell are reset to the values inherited from
+ the shell's parent, and traps ignored by the shell are ignored
+
+
+ A command invoked in this separate environment cannot affect the
+shell's execution environment.
+
+ Command substitution, commands grouped with parentheses, and
+asynchronous commands are invoked in a subshell environment that is a
+duplicate of the shell environment, except that traps caught by the
+shell are reset to the values that the shell inherited from its parent
+at invocation. Builtin commands that are invoked as part of a pipeline
+are also executed in a subshell environment. Changes made to the
+subshell environment cannot affect the shell's execution environment.
+
+ Subshells spawned to execute command substitutions inherit the value
+of the `-e' option from the parent shell. When not in POSIX mode, Bash
+clears the `-e' option in such subshells.
+
+ If a command is followed by a `&' and job control is not active, the
+default standard input for the command is the empty file `/dev/null'.
+Otherwise, the invoked command inherits the file descriptors of the
+calling shell as modified by redirections.
+
+
+File: bashref.info, Node: Environment, Next: Exit Status, Prev: Command Execution Environment, Up: Executing Commands
+
+3.7.4 Environment
+-----------------
+
+When a program is invoked it is given an array of strings called the
+ENVIRONMENT. This is a list of name-value pairs, of the form
+`name=value'.
+
+ Bash provides several ways to manipulate the environment. On
+invocation, the shell scans its own environment and creates a parameter
+for each name found, automatically marking it for EXPORT to child
+processes. Executed commands inherit the environment. The `export'
+and `declare -x' commands allow parameters and functions to be added to
+and deleted from the environment. If the value of a parameter in the
+environment is modified, the new value becomes part of the environment,
+replacing the old. The environment inherited by any executed command
+consists of the shell's initial environment, whose values may be
+modified in the shell, less any pairs removed by the `unset' and
+`export -n' commands, plus any additions via the `export' and `declare
+-x' commands.
+
+ The environment for any simple command or function may be augmented
+temporarily by prefixing it with parameter assignments, as described in
+*note Shell Parameters::. These assignment statements affect only the
+environment seen by that command.
+
+ If the `-k' option is set (*note The Set Builtin::), then all
+parameter assignments are placed in the environment for a command, not
+just those that precede the command name.
+
+ When Bash invokes an external command, the variable `$_' is set to
+the full path name of the command and passed to that command in its
+environment.
+
+
+File: bashref.info, Node: Exit Status, Next: Signals, Prev: Environment, Up: Executing Commands
+
+3.7.5 Exit Status
+-----------------
+
+The exit status of an executed command is the value returned by the
+WAITPID system call or equivalent function. Exit statuses fall between
+0 and 255, though, as explained below, the shell may use values above
+125 specially. Exit statuses from shell builtins and compound commands
+are also limited to this range. Under certain circumstances, the shell
+will use special values to indicate specific failure modes.
+
+ For the shell's purposes, a command which exits with a zero exit
+status has succeeded. A non-zero exit status indicates failure. This
+seemingly counter-intuitive scheme is used so there is one well-defined
+way to indicate success and a variety of ways to indicate various
+failure modes. When a command terminates on a fatal signal whose
+number is N, Bash uses the value 128+N as the exit status.
+
+ If a command is not found, the child process created to execute it
+returns a status of 127. If a command is found but is not executable,
+the return status is 126.
+
+ If a command fails because of an error during expansion or
+redirection, the exit status is greater than zero.
+
+ The exit status is used by the Bash conditional commands (*note
+Conditional Constructs::) and some of the list constructs (*note
+Lists::).
+
+ All of the Bash builtins return an exit status of zero if they
+succeed and a non-zero status on failure, so they may be used by the
+conditional and list constructs. All builtins return an exit status of
+2 to indicate incorrect usage.
+
+
+File: bashref.info, Node: Signals, Prev: Exit Status, Up: Executing Commands
+
+3.7.6 Signals
+-------------
+
+When Bash is interactive, in the absence of any traps, it ignores
+`SIGTERM' (so that `kill 0' does not kill an interactive shell), and
+`SIGINT' is caught and handled (so that the `wait' builtin is
+interruptible). When Bash receives a `SIGINT', it breaks out of any
+executing loops. In all cases, Bash ignores `SIGQUIT'. If job control
+is in effect (*note Job Control::), Bash ignores `SIGTTIN', `SIGTTOU',
+and `SIGTSTP'.
+
+ Non-builtin commands started by Bash have signal handlers set to the
+values inherited by the shell from its parent. When job control is not
+in effect, asynchronous commands ignore `SIGINT' and `SIGQUIT' in
+addition to these inherited handlers. Commands run as a result of
+command substitution ignore the keyboard-generated job control signals
+`SIGTTIN', `SIGTTOU', and `SIGTSTP'.
+
+ The shell exits by default upon receipt of a `SIGHUP'. Before
+exiting, an interactive shell resends the `SIGHUP' to all jobs, running
+or stopped. Stopped jobs are sent `SIGCONT' to ensure that they receive
+the `SIGHUP'. To prevent the shell from sending the `SIGHUP' signal to
+a particular job, it should be removed from the jobs table with the
+`disown' builtin (*note Job Control Builtins::) or marked to not
+receive `SIGHUP' using `disown -h'.
+
+ If the `huponexit' shell option has been set with `shopt' (*note
+The Shopt Builtin::), Bash sends a `SIGHUP' to all jobs when an
+interactive login shell exits.
+
+ If Bash is waiting for a command to complete and receives a signal
+for which a trap has been set, the trap will not be executed until the
+command completes. When Bash is waiting for an asynchronous command
+via the `wait' builtin, the reception of a signal for which a trap has
+been set will cause the `wait' builtin to return immediately with an
+exit status greater than 128, immediately after which the trap is
+executed.
+
+
+File: bashref.info, Node: Shell Scripts, Prev: Executing Commands, Up: Basic Shell Features
+
+3.8 Shell Scripts
+=================
+
+A shell script is a text file containing shell commands. When such a
+file is used as the first non-option argument when invoking Bash, and
+neither the `-c' nor `-s' option is supplied (*note Invoking Bash::),
+Bash reads and executes commands from the file, then exits. This mode
+of operation creates a non-interactive shell. The shell first searches
+for the file in the current directory, and looks in the directories in
+`$PATH' if not found there.
+
+ When Bash runs a shell script, it sets the special parameter `0' to
+the name of the file, rather than the name of the shell, and the
+positional parameters are set to the remaining arguments, if any are
+given. If no additional arguments are supplied, the positional
+parameters are unset.
+
+ A shell script may be made executable by using the `chmod' command
+to turn on the execute bit. When Bash finds such a file while
+searching the `$PATH' for a command, it spawns a subshell to execute
+it. In other words, executing
+ filename ARGUMENTS
+ is equivalent to executing
+ bash filename ARGUMENTS
+
+if `filename' is an executable shell script. This subshell
+reinitializes itself, so that the effect is as if a new shell had been
+invoked to interpret the script, with the exception that the locations
+of commands remembered by the parent (see the description of `hash' in
+*note Bourne Shell Builtins::) are retained by the child.
+
+ Most versions of Unix make this a part of the operating system's
+command execution mechanism. If the first line of a script begins with
+the two characters `#!', the remainder of the line specifies an
+interpreter for the program. Thus, you can specify Bash, `awk', Perl,
+or some other interpreter and write the rest of the script file in that
+language.
+
+ The arguments to the interpreter consist of a single optional
+argument following the interpreter name on the first line of the script
+file, followed by the name of the script file, followed by the rest of
+the arguments. Bash will perform this action on operating systems that
+do not handle it themselves. Note that some older versions of Unix
+limit the interpreter name and argument to a maximum of 32 characters.
+
+ Bash scripts often begin with `#! /bin/bash' (assuming that Bash has
+been installed in `/bin'), since this ensures that Bash will be used to
+interpret the script, even if it is executed under another shell.
+
+
+File: bashref.info, Node: Shell Builtin Commands, Next: Shell Variables, Prev: Basic Shell Features, Up: Top
+
+4 Shell Builtin Commands
+************************
+
+* Menu:
+
+* Bourne Shell Builtins:: Builtin commands inherited from the Bourne
+ Shell.
+* Bash Builtins:: Table of builtins specific to Bash.
+* Modifying Shell Behavior:: Builtins to modify shell attributes and
+ optional behavior.
+* Special Builtins:: Builtin commands classified specially by
+ POSIX.
+
+ Builtin commands are contained within the shell itself. When the
+name of a builtin command is used as the first word of a simple command
+(*note Simple Commands::), the shell executes the command directly,
+without invoking another program. Builtin commands are necessary to
+implement functionality impossible or inconvenient to obtain with
+separate utilities.
+
+ This section briefly describes the builtins which Bash inherits from
+the Bourne Shell, as well as the builtin commands which are unique to
+or have been extended in Bash.
+
+ Several builtin commands are described in other chapters: builtin
+commands which provide the Bash interface to the job control facilities
+(*note Job Control Builtins::), the directory stack (*note Directory
+Stack Builtins::), the command history (*note Bash History Builtins::),
+and the programmable completion facilities (*note Programmable
+Completion Builtins::).
+
+ Many of the builtins have been extended by POSIX or Bash.
+
+ Unless otherwise noted, each builtin command documented as accepting
+options preceded by `-' accepts `--' to signify the end of the options.
+The `:', `true', `false', and `test' builtins do not accept options and
+do not treat `--' specially. The `exit', `logout', `break',
+`continue', `let', and `shift' builtins accept and process arguments
+beginning with `-' without requiring `--'. Other builtins that accept
+arguments but are not specified as accepting options interpret
+arguments beginning with `-' as invalid options and require `--' to
+prevent this interpretation.
+
+
+File: bashref.info, Node: Bourne Shell Builtins, Next: Bash Builtins, Up: Shell Builtin Commands
+
+4.1 Bourne Shell Builtins
+=========================
+
+The following shell builtin commands are inherited from the Bourne
+Shell. These commands are implemented as specified by the POSIX
+standard.
+
+`: (a colon)'
+ : [ARGUMENTS]
+ Do nothing beyond expanding ARGUMENTS and performing redirections.
+ The return status is zero.
+
+`. (a period)'
+ . FILENAME [ARGUMENTS]
+ Read and execute commands from the FILENAME argument in the
+ current shell context. If FILENAME does not contain a slash, the
+ `PATH' variable is used to find FILENAME. When Bash is not in
+ POSIX mode, the current directory is searched if FILENAME is not
+ found in `$PATH'. If any ARGUMENTS are supplied, they become the
+ positional parameters when FILENAME is executed. Otherwise the
+ positional parameters are unchanged. The return status is the
+ exit status of the last command executed, or zero if no commands
+ are executed. If FILENAME is not found, or cannot be read, the
+ return status is non-zero. This builtin is equivalent to `source'.
+
+`break'
+ break [N]
+ Exit from a `for', `while', `until', or `select' loop. If N is
+ supplied, the Nth enclosing loop is exited. N must be greater
+ than or equal to 1. The return status is zero unless N is not
+ greater than or equal to 1.
+
+`cd'
+ cd [-L|-P] [DIRECTORY]
+ Change the current working directory to DIRECTORY. If DIRECTORY
+ is not given, the value of the `HOME' shell variable is used. If
+ the shell variable `CDPATH' exists, it is used as a search path.
+ If DIRECTORY begins with a slash, `CDPATH' is not used.
+
+ The `-P' option means to not follow symbolic links; symbolic links
+ are followed by default or with the `-L' option. If DIRECTORY is
+ `-', it is equivalent to `$OLDPWD'.
+
+ If a non-empty directory name from `CDPATH' is used, or if `-' is
+ the first argument, and the directory change is successful, the
+ absolute pathname of the new working directory is written to the
+ standard output.
+
+ The return status is zero if the directory is successfully changed,
+ non-zero otherwise.
+
+`continue'
+ continue [N]
+ Resume the next iteration of an enclosing `for', `while', `until',
+ or `select' loop. If N is supplied, the execution of the Nth
+ enclosing loop is resumed. N must be greater than or equal to 1.
+ The return status is zero unless N is not greater than or equal to
+ 1.
+
+`eval'
+ eval [ARGUMENTS]
+ The arguments are concatenated together into a single command,
+ which is then read and executed, and its exit status returned as
+ the exit status of `eval'. If there are no arguments or only
+ empty arguments, the return status is zero.
+
+`exec'
+ exec [-cl] [-a NAME] [COMMAND [ARGUMENTS]]
+ If COMMAND is supplied, it replaces the shell without creating a
+ new process. If the `-l' option is supplied, the shell places a
+ dash at the beginning of the zeroth argument passed to COMMAND.
+ This is what the `login' program does. The `-c' option causes
+ COMMAND to be executed with an empty environment. If `-a' is
+ supplied, the shell passes NAME as the zeroth argument to COMMAND.
+ If no COMMAND is specified, redirections may be used to affect the
+ current shell environment. If there are no redirection errors, the
+ return status is zero; otherwise the return status is non-zero.
+
+`exit'
+ exit [N]
+ Exit the shell, returning a status of N to the shell's parent. If
+ N is omitted, the exit status is that of the last command executed.
+ Any trap on `EXIT' is executed before the shell terminates.
+
+`export'
+ export [-fn] [-p] [NAME[=VALUE]]
+ Mark each NAME to be passed to child processes in the environment.
+ If the `-f' option is supplied, the NAMEs refer to shell
+ functions; otherwise the names refer to shell variables. The `-n'
+ option means to no longer mark each NAME for export. If no NAMES
+ are supplied, or if the `-p' option is given, a list of exported
+ names is displayed. The `-p' option displays output in a form
+ that may be reused as input. If a variable name is followed by
+ =VALUE, the value of the variable is set to VALUE.
+
+ The return status is zero unless an invalid option is supplied,
+ one of the names is not a valid shell variable name, or `-f' is
+ supplied with a name that is not a shell function.
+
+`getopts'
+ getopts OPTSTRING NAME [ARGS]
+ `getopts' is used by shell scripts to parse positional parameters.
+ OPTSTRING contains the option characters to be recognized; if a
+ character is followed by a colon, the option is expected to have an
+ argument, which should be separated from it by white space. The
+ colon (`:') and question mark (`?') may not be used as option
+ characters. Each time it is invoked, `getopts' places the next
+ option in the shell variable NAME, initializing NAME if it does
+ not exist, and the index of the next argument to be processed into
+ the variable `OPTIND'. `OPTIND' is initialized to 1 each time the
+ shell or a shell script is invoked. When an option requires an
+ argument, `getopts' places that argument into the variable
+ `OPTARG'. The shell does not reset `OPTIND' automatically; it
+ must be manually reset between multiple calls to `getopts' within
+ the same shell invocation if a new set of parameters is to be used.
+
+ When the end of options is encountered, `getopts' exits with a
+ return value greater than zero. `OPTIND' is set to the index of
+ the first non-option argument, and `name' is set to `?'.
+
+ `getopts' normally parses the positional parameters, but if more
+ arguments are given in ARGS, `getopts' parses those instead.
+
+ `getopts' can report errors in two ways. If the first character of
+ OPTSTRING is a colon, SILENT error reporting is used. In normal
+ operation diagnostic messages are printed when invalid options or
+ missing option arguments are encountered. If the variable `OPTERR'
+ is set to 0, no error messages will be displayed, even if the first
+ character of `optstring' is not a colon.
+
+ If an invalid option is seen, `getopts' places `?' into NAME and,
+ if not silent, prints an error message and unsets `OPTARG'. If
+ `getopts' is silent, the option character found is placed in
+ `OPTARG' and no diagnostic message is printed.
+
+ If a required argument is not found, and `getopts' is not silent,
+ a question mark (`?') is placed in NAME, `OPTARG' is unset, and a
+ diagnostic message is printed. If `getopts' is silent, then a
+ colon (`:') is placed in NAME and `OPTARG' is set to the option
+ character found.
+
+`hash'
+ hash [-r] [-p FILENAME] [-dt] [NAME]
+ Remember the full pathnames of commands specified as NAME
+ arguments, so they need not be searched for on subsequent
+ invocations. The commands are found by searching through the
+ directories listed in `$PATH'. The `-p' option inhibits the path
+ search, and FILENAME is used as the location of NAME. The `-r'
+ option causes the shell to forget all remembered locations. The
+ `-d' option causes the shell to forget the remembered location of
+ each NAME. If the `-t' option is supplied, the full pathname to
+ which each NAME corresponds is printed. If multiple NAME
+ arguments are supplied with `-t' the NAME is printed before the
+ hashed full pathname. The `-l' option causes output to be
+ displayed in a format that may be reused as input. If no
+ arguments are given, or if only `-l' is supplied, information
+ about remembered commands is printed. The return status is zero
+ unless a NAME is not found or an invalid option is supplied.
+
+`pwd'
+ pwd [-LP]
+ Print the absolute pathname of the current working directory. If
+ the `-P' option is supplied, the pathname printed will not contain
+ symbolic links. If the `-L' option is supplied, the pathname
+ printed may contain symbolic links. The return status is zero
+ unless an error is encountered while determining the name of the
+ current directory or an invalid option is supplied.
+
+`readonly'
+ readonly [-aApf] [NAME[=VALUE]] ...
+ Mark each NAME as readonly. The values of these names may not be
+ changed by subsequent assignment. If the `-f' option is supplied,
+ each NAME refers to a shell function. The `-a' option means each
+ NAME refers to an indexed array variable; the `-A' option means
+ each NAME refers to an associative array variable. If no NAME
+ arguments are given, or if the `-p' option is supplied, a list of
+ all readonly names is printed. The `-p' option causes output to
+ be displayed in a format that may be reused as input. If a
+ variable name is followed by =VALUE, the value of the variable is
+ set to VALUE. The return status is zero unless an invalid option
+ is supplied, one of the NAME arguments is not a valid shell
+ variable or function name, or the `-f' option is supplied with a
+ name that is not a shell function.
+
+`return'
+ return [N]
+ Cause a shell function to exit with the return value N. If N is
+ not supplied, the return value is the exit status of the last
+ command executed in the function. This may also be used to
+ terminate execution of a script being executed with the `.' (or
+ `source') builtin, returning either N or the exit status of the
+ last command executed within the script as the exit status of the
+ script. Any command associated with the `RETURN' trap is executed
+ before execution resumes after the function or script. The return
+ status is non-zero if `return' is used outside a function and not
+ during the execution of a script by `.' or `source'.
+
+`shift'
+ shift [N]
+ Shift the positional parameters to the left by N. The positional
+ parameters from N+1 ... `$#' are renamed to `$1' ... `$#'-N.
+ Parameters represented by the numbers `$#' to `$#'-N+1 are unset.
+ N must be a non-negative number less than or equal to `$#'. If N
+ is zero or greater than `$#', the positional parameters are not
+ changed. If N is not supplied, it is assumed to be 1. The return
+ status is zero unless N is greater than `$#' or less than zero,
+ non-zero otherwise.
+
+`test'
+`['
+ Evaluate a conditional expression EXPR. Each operator and operand
+ must be a separate argument. Expressions are composed of the
+ primaries described below in *note Bash Conditional Expressions::.
+ `test' does not accept any options, nor does it accept and ignore
+ an argument of `--' as signifying the end of options.
+
+ When the `[' form is used, the last argument to the command must
+ be a `]'.
+
+ Expressions may be combined using the following operators, listed
+ in decreasing order of precedence. The evaluation depends on the
+ number of arguments; see below.
+
+ `! EXPR'
+ True if EXPR is false.
+
+ `( EXPR )'
+ Returns the value of EXPR. This may be used to override the
+ normal precedence of operators.
+
+ `EXPR1 -a EXPR2'
+ True if both EXPR1 and EXPR2 are true.
+
+ `EXPR1 -o EXPR2'
+ True if either EXPR1 or EXPR2 is true.
+
+ The `test' and `[' builtins evaluate conditional expressions using
+ a set of rules based on the number of arguments.
+
+ 0 arguments
+ The expression is false.
+
+ 1 argument
+ The expression is true if and only if the argument is not
+ null.
+
+ 2 arguments
+ If the first argument is `!', the expression is true if and
+ only if the second argument is null. If the first argument
+ is one of the unary conditional operators (*note Bash
+ Conditional Expressions::), the expression is true if the
+ unary test is true. If the first argument is not a valid
+ unary operator, the expression is false.
+
+ 3 arguments
+ If the second argument is one of the binary conditional
+ operators (*note Bash Conditional Expressions::), the result
+ of the expression is the result of the binary test using the
+ first and third arguments as operands. The `-a' and `-o'
+ operators are considered binary operators when there are
+ three arguments. If the first argument is `!', the value is
+ the negation of the two-argument test using the second and
+ third arguments. If the first argument is exactly `(' and
+ the third argument is exactly `)', the result is the
+ one-argument test of the second argument. Otherwise, the
+ expression is false.
+
+ 4 arguments
+ If the first argument is `!', the result is the negation of
+ the three-argument expression composed of the remaining
+ arguments. Otherwise, the expression is parsed and evaluated
+ according to precedence using the rules listed above.
+
+ 5 or more arguments
+ The expression is parsed and evaluated according to precedence
+ using the rules listed above.
+
+`times'
+ times
+ Print out the user and system times used by the shell and its
+ children. The return status is zero.
+
+`trap'
+ trap [-lp] [ARG] [SIGSPEC ...]
+ The commands in ARG are to be read and executed when the shell
+ receives signal SIGSPEC. If ARG is absent (and there is a single
+ SIGSPEC) or equal to `-', each specified signal's disposition is
+ reset to the value it had when the shell was started. If ARG is
+ the null string, then the signal specified by each SIGSPEC is
+ ignored by the shell and commands it invokes. If ARG is not
+ present and `-p' has been supplied, the shell displays the trap
+ commands associated with each SIGSPEC. If no arguments are
+ supplied, or only `-p' is given, `trap' prints the list of commands
+ associated with each signal number in a form that may be reused as
+ shell input. The `-l' option causes the shell to print a list of
+ signal names and their corresponding numbers. Each SIGSPEC is
+ either a signal name or a signal number. Signal names are case
+ insensitive and the `SIG' prefix is optional.
+
+ If a SIGSPEC is `0' or `EXIT', ARG is executed when the shell
+ exits. If a SIGSPEC is `DEBUG', the command ARG is executed
+ before every simple command, `for' command, `case' command,
+ `select' command, every arithmetic `for' command, and before the
+ first command executes in a shell function. Refer to the
+ description of the `extdebug' option to the `shopt' builtin (*note
+ The Shopt Builtin::) for details of its effect on the `DEBUG' trap.
+ If a SIGSPEC is `RETURN', the command ARG is executed each time a
+ shell function or a script executed with the `.' or `source'
+ builtins finishes executing.
+
+ If a SIGSPEC is `ERR', the command ARG is executed whenever a
+ simple command has a non-zero exit status, subject to the
+ following conditions. The `ERR' trap is not executed if the
+ failed command is part of the command list immediately following
+ an `until' or `while' keyword, part of the test following the `if'
+ or `elif' reserved words, part of a command executed in a `&&' or
+ `||' list, or if the command's return status is being inverted
+ using `!'. These are the same conditions obeyed by the `errexit'
+ option.
+
+ Signals ignored upon entry to the shell cannot be trapped or reset.
+ Trapped signals that are not being ignored are reset to their
+ original values in a subshell or subshell environment when one is
+ created.
+
+ The return status is zero unless a SIGSPEC does not specify a
+ valid signal.
+
+`umask'
+ umask [-p] [-S] [MODE]
+ Set the shell process's file creation mask to MODE. If MODE
+ begins with a digit, it is interpreted as an octal number; if not,
+ it is interpreted as a symbolic mode mask similar to that accepted
+ by the `chmod' command. If MODE is omitted, the current value of
+ the mask is printed. If the `-S' option is supplied without a
+ MODE argument, the mask is printed in a symbolic format. If the
+ `-p' option is supplied, and MODE is omitted, the output is in a
+ form that may be reused as input. The return status is zero if
+ the mode is successfully changed or if no MODE argument is
+ supplied, and non-zero otherwise.
+
+ Note that when the mode is interpreted as an octal number, each
+ number of the umask is subtracted from `7'. Thus, a umask of `022'
+ results in permissions of `755'.
+
+`unset'
+ unset [-fv] [NAME]
+ Each variable or function NAME is removed. If no options are
+ supplied, or the `-v' option is given, each NAME refers to a shell
+ variable. If the `-f' option is given, the NAMEs refer to shell
+ functions, and the function definition is removed. Readonly
+ variables and functions may not be unset. The return status is
+ zero unless a NAME is readonly.
+
+
+File: bashref.info, Node: Bash Builtins, Next: Modifying Shell Behavior, Prev: Bourne Shell Builtins, Up: Shell Builtin Commands
+
+4.2 Bash Builtin Commands
+=========================
+
+This section describes builtin commands which are unique to or have
+been extended in Bash. Some of these commands are specified in the
+POSIX standard.
+
+`alias'
+ alias [`-p'] [NAME[=VALUE] ...]
+
+ Without arguments or with the `-p' option, `alias' prints the list
+ of aliases on the standard output in a form that allows them to be
+ reused as input. If arguments are supplied, an alias is defined
+ for each NAME whose VALUE is given. If no VALUE is given, the name
+ and value of the alias is printed. Aliases are described in *note
+ Aliases::.
+
+`bind'
+ bind [-m KEYMAP] [-lpsvPSV]
+ bind [-m KEYMAP] [-q FUNCTION] [-u FUNCTION] [-r KEYSEQ]
+ bind [-m KEYMAP] -f FILENAME
+ bind [-m KEYMAP] -x KEYSEQ:SHELL-COMMAND
+ bind [-m KEYMAP] KEYSEQ:FUNCTION-NAME
+ bind READLINE-COMMAND
+
+ Display current Readline (*note Command Line Editing::) key and
+ function bindings, bind a key sequence to a Readline function or
+ macro, or set a Readline variable. Each non-option argument is a
+ command as it would appear in a Readline initialization file
+ (*note Readline Init File::), but each binding or command must be
+ passed as a separate argument; e.g.,
+ `"\C-x\C-r":re-read-init-file'.
+
+ Options, if supplied, have the following meanings:
+
+ `-m KEYMAP'
+ Use KEYMAP as the keymap to be affected by the subsequent
+ bindings. Acceptable KEYMAP names are `emacs',
+ `emacs-standard', `emacs-meta', `emacs-ctlx', `vi', `vi-move',
+ `vi-command', and `vi-insert'. `vi' is equivalent to
+ `vi-command'; `emacs' is equivalent to `emacs-standard'.
+
+ `-l'
+ List the names of all Readline functions.
+
+ `-p'
+ Display Readline function names and bindings in such a way
+ that they can be used as input or in a Readline
+ initialization file.
+
+ `-P'
+ List current Readline function names and bindings.
+
+ `-v'
+ Display Readline variable names and values in such a way that
+ they can be used as input or in a Readline initialization
+ file.
+
+ `-V'
+ List current Readline variable names and values.
+
+ `-s'
+ Display Readline key sequences bound to macros and the
+ strings they output in such a way that they can be used as
+ input or in a Readline initialization file.
+
+ `-S'
+ Display Readline key sequences bound to macros and the
+ strings they output.
+
+ `-f FILENAME'
+ Read key bindings from FILENAME.
+
+ `-q FUNCTION'
+ Query about which keys invoke the named FUNCTION.
+
+ `-u FUNCTION'
+ Unbind all keys bound to the named FUNCTION.
+
+ `-r KEYSEQ'
+ Remove any current binding for KEYSEQ.
+
+ `-x KEYSEQ:SHELL-COMMAND'
+ Cause SHELL-COMMAND to be executed whenever KEYSEQ is entered.
+ When SHELL-COMMAND is executed, the shell sets the
+ `READLINE_LINE' variable to the contents of the Readline line
+ buffer and the `READLINE_POINT' variable to the current
+ location of the insertion point. If the executed command
+ changes the value of `READLINE_LINE' or `READLINE_POINT',
+ those new values will be reflected in the editing state.
+
+ The return status is zero unless an invalid option is supplied or
+ an error occurs.
+
+`builtin'
+ builtin [SHELL-BUILTIN [ARGS]]
+ Run a shell builtin, passing it ARGS, and return its exit status.
+ This is useful when defining a shell function with the same name
+ as a shell builtin, retaining the functionality of the builtin
+ within the function. The return status is non-zero if
+ SHELL-BUILTIN is not a shell builtin command.
+
+`caller'
+ caller [EXPR]
+ Returns the context of any active subroutine call (a shell
+ function or a script executed with the `.' or `source' builtins).
+
+ Without EXPR, `caller' displays the line number and source
+ filename of the current subroutine call. If a non-negative
+ integer is supplied as EXPR, `caller' displays the line number,
+ subroutine name, and source file corresponding to that position in
+ the current execution call stack. This extra information may be
+ used, for example, to print a stack trace. The current frame is
+ frame 0.
+
+ The return value is 0 unless the shell is not executing a
+ subroutine call or EXPR does not correspond to a valid position in
+ the call stack.
+
+`command'
+ command [-pVv] COMMAND [ARGUMENTS ...]
+ Runs COMMAND with ARGUMENTS ignoring any shell function named
+ COMMAND. Only shell builtin commands or commands found by
+ searching the `PATH' are executed. If there is a shell function
+ named `ls', running `command ls' within the function will execute
+ the external command `ls' instead of calling the function
+ recursively. The `-p' option means to use a default value for
+ `PATH' that is guaranteed to find all of the standard utilities.
+ The return status in this case is 127 if COMMAND cannot be found
+ or an error occurred, and the exit status of COMMAND otherwise.
+
+ If either the `-V' or `-v' option is supplied, a description of
+ COMMAND is printed. The `-v' option causes a single word
+ indicating the command or file name used to invoke COMMAND to be
+ displayed; the `-V' option produces a more verbose description.
+ In this case, the return status is zero if COMMAND is found, and
+ non-zero if not.
+
+`declare'
+ declare [-aAfFilrtux] [-p] [NAME[=VALUE] ...]
+
+ Declare variables and give them attributes. If no NAMEs are
+ given, then display the values of variables instead.
+
+ The `-p' option will display the attributes and values of each
+ NAME. When `-p' is used with NAME arguments, additional options
+ are ignored.
+
+ When `-p' is supplied without NAME arguments, `declare' will
+ display the attributes and values of all variables having the
+ attributes specified by the additional options. If no other
+ options are supplied with `-p', `declare' will display the
+ attributes and values of all shell variables. The `-f' option
+ will restrict the display to shell functions.
+
+ The `-F' option inhibits the display of function definitions; only
+ the function name and attributes are printed. If the `extdebug'
+ shell option is enabled using `shopt' (*note The Shopt Builtin::),
+ the source file name and line number where the function is defined
+ are displayed as well. `-F' implies `-f'. The following options
+ can be used to restrict output to variables with the specified
+ attributes or to give variables attributes:
+
+ `-a'
+ Each NAME is an indexed array variable (*note Arrays::).
+
+ `-A'
+ Each NAME is an associative array variable (*note Arrays::).
+
+ `-f'
+ Use function names only.
+
+ `-i'
+ The variable is to be treated as an integer; arithmetic
+ evaluation (*note Shell Arithmetic::) is performed when the
+ variable is assigned a value.
+
+ `-l'
+ When the variable is assigned a value, all upper-case
+ characters are converted to lower-case. The upper-case
+ attribute is disabled.
+
+ `-r'
+ Make NAMEs readonly. These names cannot then be assigned
+ values by subsequent assignment statements or unset.
+
+ `-t'
+ Give each NAME the `trace' attribute. Traced functions
+ inherit the `DEBUG' and `RETURN' traps from the calling shell.
+ The trace attribute has no special meaning for variables.
+
+ `-u'
+ When the variable is assigned a value, all lower-case
+ characters are converted to upper-case. The lower-case
+ attribute is disabled.
+
+ `-x'
+ Mark each NAME for export to subsequent commands via the
+ environment.
+
+ Using `+' instead of `-' turns off the attribute instead, with the
+ exceptions that `+a' may not be used to destroy an array variable
+ and `+r' will not remove the readonly attribute. When used in a
+ function, `declare' makes each NAME local, as with the `local'
+ command. If a variable name is followed by =VALUE, the value of
+ the variable is set to VALUE.
+
+ The return status is zero unless an invalid option is encountered,
+ an attempt is made to define a function using `-f foo=bar', an
+ attempt is made to assign a value to a readonly variable, an
+ attempt is made to assign a value to an array variable without
+ using the compound assignment syntax (*note Arrays::), one of the
+ NAMES is not a valid shell variable name, an attempt is made to
+ turn off readonly status for a readonly variable, an attempt is
+ made to turn off array status for an array variable, or an attempt
+ is made to display a non-existent function with `-f'.
+
+`echo'
+ echo [-neE] [ARG ...]
+ Output the ARGs, separated by spaces, terminated with a newline.
+ The return status is always 0. If `-n' is specified, the trailing
+ newline is suppressed. If the `-e' option is given,
+ interpretation of the following backslash-escaped characters is
+ enabled. The `-E' option disables the interpretation of these
+ escape characters, even on systems where they are interpreted by
+ default. The `xpg_echo' shell option may be used to dynamically
+ determine whether or not `echo' expands these escape characters by
+ default. `echo' does not interpret `--' to mean the end of
+ options.
+
+ `echo' interprets the following escape sequences:
+ `\a'
+ alert (bell)
+
+ `\b'
+ backspace
+
+ `\c'
+ suppress further output
+
+ `\e'
+ escape
+
+ `\f'
+ form feed
+
+ `\n'
+ new line
+
+ `\r'
+ carriage return
+
+ `\t'
+ horizontal tab
+
+ `\v'
+ vertical tab
+
+ `\\'
+ backslash
+
+ `\0NNN'
+ the eight-bit character whose value is the octal value NNN
+ (zero to three octal digits)
+
+ `\xHH'
+ the eight-bit character whose value is the hexadecimal value
+ HH (one or two hex digits)
+
+`enable'
+ enable [-a] [-dnps] [-f FILENAME] [NAME ...]
+ Enable and disable builtin shell commands. Disabling a builtin
+ allows a disk command which has the same name as a shell builtin
+ to be executed without specifying a full pathname, even though the
+ shell normally searches for builtins before disk commands. If
+ `-n' is used, the NAMEs become disabled. Otherwise NAMEs are
+ enabled. For example, to use the `test' binary found via `$PATH'
+ instead of the shell builtin version, type `enable -n test'.
+
+ If the `-p' option is supplied, or no NAME arguments appear, a
+ list of shell builtins is printed. With no other arguments, the
+ list consists of all enabled shell builtins. The `-a' option
+ means to list each builtin with an indication of whether or not it
+ is enabled.
+
+ The `-f' option means to load the new builtin command NAME from
+ shared object FILENAME, on systems that support dynamic loading.
+ The `-d' option will delete a builtin loaded with `-f'.
+
+ If there are no options, a list of the shell builtins is displayed.
+ The `-s' option restricts `enable' to the POSIX special builtins.
+ If `-s' is used with `-f', the new builtin becomes a special
+ builtin (*note Special Builtins::).
+
+ The return status is zero unless a NAME is not a shell builtin or
+ there is an error loading a new builtin from a shared object.
+
+`help'
+ help [-dms] [PATTERN]
+ Display helpful information about builtin commands. If PATTERN is
+ specified, `help' gives detailed help on all commands matching
+ PATTERN, otherwise a list of the builtins is printed.
+
+ Options, if supplied, have the following meanings:
+
+ `-d'
+ Display a short description of each PATTERN
+
+ `-m'
+ Display the description of each PATTERN in a manpage-like
+ format
+
+ `-s'
+ Display only a short usage synopsis for each PATTERN
+
+ The return status is zero unless no command matches PATTERN.
+
+`let'
+ let EXPRESSION [EXPRESSION]
+ The `let' builtin allows arithmetic to be performed on shell
+ variables. Each EXPRESSION is evaluated according to the rules
+ given below in *note Shell Arithmetic::. If the last EXPRESSION
+ evaluates to 0, `let' returns 1; otherwise 0 is returned.
+
+`local'
+ local [OPTION] NAME[=VALUE] ...
+ For each argument, a local variable named NAME is created, and
+ assigned VALUE. The OPTION can be any of the options accepted by
+ `declare'. `local' can only be used within a function; it makes
+ the variable NAME have a visible scope restricted to that function
+ and its children. The return status is zero unless `local' is
+ used outside a function, an invalid NAME is supplied, or NAME is a
+ readonly variable.
+
+`logout'
+ logout [N]
+ Exit a login shell, returning a status of N to the shell's parent.
+
+`mapfile'
+ mapfile [-n COUNT] [-O ORIGIN] [-s COUNT] [-t] [-u FD] [
+ -C CALLBACK] [-c QUANTUM] [ARRAY]
+ Read lines from the standard input into the indexed array variable
+ ARRAY, or from file descriptor FD if the `-u' option is supplied.
+ The variable `MAPFILE' is the default ARRAY. Options, if
+ supplied, have the following meanings:
+ `-n'
+ Copy at most COUNT lines. If COUNT is 0, all lines are
+ copied.
+
+ `-O'
+ Begin assigning to ARRAY at index ORIGIN. The default index
+ is 0.
+
+ `-s'
+ Discard the first COUNT lines read.
+
+ `-t'
+ Remove a trailing newline from each line read.
+
+ `-u'
+ Read lines from file descriptor FD instead of the standard
+ input.
+
+ `-C'
+ Evaluate CALLBACK each time QUANTUMP lines are read. The
+ `-c' option specifies QUANTUM.
+
+ `-c'
+ Specify the number of lines read between each call to
+ CALLBACK.
+
+ If `-C' is specified without `-c', the default quantum is 5000.
+ When CALLBACK is evaluated, it is supplied the index of the next
+ array element to be assigned as an additional argument. CALLBACK
+ is evaluated after the line is read but before the array element
+ is assigned.
+
+ If not supplied with an explicit origin, `mapfile' will clear ARRAY
+ before assigning to it.
+
+ `mapfile' returns successfully unless an invalid option or option
+ argument is supplied, ARRAY is invalid or unassignable, or ARRAY
+ is not an indexed array.
+
+`printf'
+ printf [-v VAR] FORMAT [ARGUMENTS]
+ Write the formatted ARGUMENTS to the standard output under the
+ control of the FORMAT. The FORMAT is a character string which
+ contains three types of objects: plain characters, which are
+ simply copied to standard output, character escape sequences,
+ which are converted and copied to the standard output, and format
+ specifications, each of which causes printing of the next
+ successive ARGUMENT. In addition to the standard `printf(1)'
+ formats, `%b' causes `printf' to expand backslash escape sequences
+ in the corresponding ARGUMENT, (except that `\c' terminates
+ output, backslashes in `\'', `\"', and `\?' are not removed, and
+ octal escapes beginning with `\0' may contain up to four digits),
+ and `%q' causes `printf' to output the corresponding ARGUMENT in a
+ format that can be reused as shell input.
+
+ The `-v' option causes the output to be assigned to the variable
+ VAR rather than being printed to the standard output.
+
+ The FORMAT is reused as necessary to consume all of the ARGUMENTS.
+ If the FORMAT requires more ARGUMENTS than are supplied, the extra
+ format specifications behave as if a zero value or null string, as
+ appropriate, had been supplied. The return value is zero on
+ success, non-zero on failure.
+
+`read'
+ read [-ers] [-a ANAME] [-d DELIM] [-i TEXT] [-n NCHARS] [-N NCHARS] [-p PROMPT] [-t TIMEOUT] [-u FD] [NAME ...]
+ One line is read from the standard input, or from the file
+ descriptor FD supplied as an argument to the `-u' option, and the
+ first word is assigned to the first NAME, the second word to the
+ second NAME, and so on, with leftover words and their intervening
+ separators assigned to the last NAME. If there are fewer words
+ read from the input stream than names, the remaining names are
+ assigned empty values. The characters in the value of the `IFS'
+ variable are used to split the line into words. The backslash
+ character `\' may be used to remove any special meaning for the
+ next character read and for line continuation. If no names are
+ supplied, the line read is assigned to the variable `REPLY'. The
+ return code is zero, unless end-of-file is encountered, `read'
+ times out (in which case the return code is greater than 128), or
+ an invalid file descriptor is supplied as the argument to `-u'.
+
+ Options, if supplied, have the following meanings:
+
+ `-a ANAME'
+ The words are assigned to sequential indices of the array
+ variable ANAME, starting at 0. All elements are removed from
+ ANAME before the assignment. Other NAME arguments are
+ ignored.
+
+ `-d DELIM'
+ The first character of DELIM is used to terminate the input
+ line, rather than newline.
+
+ `-e'
+ Readline (*note Command Line Editing::) is used to obtain the
+ line. Readline uses the current (or default, if line editing
+ was not previously active) editing settings.
+
+ `-i TEXT'
+ If Readline is being used to read the line, TEXT is placed
+ into the editing buffer before editing begins.
+
+ `-n NCHARS'
+ `read' returns after reading NCHARS characters rather than
+ waiting for a complete line of input, but honor a delimiter
+ if fewer than NCHARS characters are read before the delimiter.
+
+ `-N NCHARS'
+ `read' returns after reading exactly NCHARS characters rather
+ than waiting for a complete line of input, unless EOF is
+ encountered or `read' times out. Delimiter characters
+ encountered in the input are not treated specially and do not
+ cause `read' to return until NCHARS characters are read.
+
+ `-p PROMPT'
+ Display PROMPT, without a trailing newline, before attempting
+ to read any input. The prompt is displayed only if input is
+ coming from a terminal.
+
+ `-r'
+ If this option is given, backslash does not act as an escape
+ character. The backslash is considered to be part of the
+ line. In particular, a backslash-newline pair may not be
+ used as a line continuation.
+
+ `-s'
+ Silent mode. If input is coming from a terminal, characters
+ are not echoed.
+
+ `-t TIMEOUT'
+ Cause `read' to time out and return failure if a complete
+ line of input is not read within TIMEOUT seconds. TIMEOUT
+ may be a decimal number with a fractional portion following
+ the decimal point. This option is only effective if `read'
+ is reading input from a terminal, pipe, or other special
+ file; it has no effect when reading from regular files. If
+ TIMEOUT is 0, `read' returns success if input is available on
+ the specified file descriptor, failure otherwise. The exit
+ status is greater than 128 if the timeout is exceeded.
+
+ `-u FD'
+ Read input from file descriptor FD.
+
+
+`readarray'
+ readarray [-n COUNT] [-O ORIGIN] [-s COUNT] [-t] [-u FD] [
+ -C CALLBACK] [-c QUANTUM] [ARRAY]
+ Read lines from the standard input into the indexed array variable
+ ARRAY, or from file descriptor FD if the `-u' option is supplied.
+
+ A synonym for `mapfile'.
+
+`source'
+ source FILENAME
+ A synonym for `.' (*note Bourne Shell Builtins::).
+
+`type'
+ type [-afptP] [NAME ...]
+ For each NAME, indicate how it would be interpreted if used as a
+ command name.
+
+ If the `-t' option is used, `type' prints a single word which is
+ one of `alias', `function', `builtin', `file' or `keyword', if
+ NAME is an alias, shell function, shell builtin, disk file, or
+ shell reserved word, respectively. If the NAME is not found, then
+ nothing is printed, and `type' returns a failure status.
+
+ If the `-p' option is used, `type' either returns the name of the
+ disk file that would be executed, or nothing if `-t' would not
+ return `file'.
+
+ The `-P' option forces a path search for each NAME, even if `-t'
+ would not return `file'.
+
+ If a command is hashed, `-p' and `-P' print the hashed value, not
+ necessarily the file that appears first in `$PATH'.
+
+ If the `-a' option is used, `type' returns all of the places that
+ contain an executable named FILE. This includes aliases and
+ functions, if and only if the `-p' option is not also used.
+
+ If the `-f' option is used, `type' does not attempt to find shell
+ functions, as with the `command' builtin.
+
+ The return status is zero if all of the NAMES are found, non-zero
+ if any are not found.
+
+`typeset'
+ typeset [-afFrxi] [-p] [NAME[=VALUE] ...]
+ The `typeset' command is supplied for compatibility with the Korn
+ shell; however, it has been deprecated in favor of the `declare'
+ builtin command.
+
+`ulimit'
+ ulimit [-abcdefilmnpqrstuvxHST] [LIMIT]
+ `ulimit' provides control over the resources available to processes
+ started by the shell, on systems that allow such control. If an
+ option is given, it is interpreted as follows:
+ `-S'
+ Change and report the soft limit associated with a resource.
+
+ `-H'
+ Change and report the hard limit associated with a resource.
+
+ `-a'
+ All current limits are reported.
+
+ `-b'
+ The maximum socket buffer size.
+
+ `-c'
+ The maximum size of core files created.
+
+ `-d'
+ The maximum size of a process's data segment.
+
+ `-e'
+ The maximum scheduling priority ("nice").
+
+ `-f'
+ The maximum size of files written by the shell and its
+ children.
+
+ `-i'
+ The maximum number of pending signals.
+
+ `-l'
+ The maximum size that may be locked into memory.
+
+ `-m'
+ The maximum resident set size (many systems do not honor this
+ limit).
+
+ `-n'
+ The maximum number of open file descriptors (most systems do
+ not allow this value to be set).
+
+ `-p'
+ The pipe buffer size.
+
+ `-q'
+ The maximum number of bytes in POSIX message queues.
+
+ `-r'
+ The maximum real-time scheduling priority.
+
+ `-s'
+ The maximum stack size.
+
+ `-t'
+ The maximum amount of cpu time in seconds.
+
+ `-u'
+ The maximum number of processes available to a single user.
+
+ `-v'
+ The maximum amount of virtual memory available to the process.
+
+ `-x'
+ The maximum number of file locks.
+
+ `-T'
+ The maximum number of threads.
+
+
+ If LIMIT is given, it is the new value of the specified resource;
+ the special LIMIT values `hard', `soft', and `unlimited' stand for
+ the current hard limit, the current soft limit, and no limit,
+ respectively. A hard limit cannot be increased by a non-root user
+ once it is set; a soft limit may be increased up to the value of
+ the hard limit. Otherwise, the current value of the soft limit
+ for the specified resource is printed, unless the `-H' option is
+ supplied. When setting new limits, if neither `-H' nor `-S' is
+ supplied, both the hard and soft limits are set. If no option is
+ given, then `-f' is assumed. Values are in 1024-byte increments,
+ except for `-t', which is in seconds, `-p', which is in units of
+ 512-byte blocks, and `-n' and `-u', which are unscaled values.
+
+ The return status is zero unless an invalid option or argument is
+ supplied, or an error occurs while setting a new limit.
+
+`unalias'
+ unalias [-a] [NAME ... ]
+
+ Remove each NAME from the list of aliases. If `-a' is supplied,
+ all aliases are removed. Aliases are described in *note Aliases::.
+
+
+
+File: bashref.info, Node: Modifying Shell Behavior, Next: Special Builtins, Prev: Bash Builtins, Up: Shell Builtin Commands
+
+4.3 Modifying Shell Behavior
+============================
+
+* Menu:
+
+* The Set Builtin:: Change the values of shell attributes and
+ positional parameters.
+* The Shopt Builtin:: Modify shell optional behavior.
+
+
+File: bashref.info, Node: The Set Builtin, Next: The Shopt Builtin, Up: Modifying Shell Behavior
+
+4.3.1 The Set Builtin
+---------------------
+
+This builtin is so complicated that it deserves its own section. `set'
+allows you to change the values of shell options and set the positional
+parameters, or to display the names and values of shell variables.
+
+`set'
+ set [--abefhkmnptuvxBCEHPT] [-o OPTION] [ARGUMENT ...]
+ set [+abefhkmnptuvxBCEHPT] [+o OPTION] [ARGUMENT ...]
+
+ If no options or arguments are supplied, `set' displays the names
+ and values of all shell variables and functions, sorted according
+ to the current locale, in a format that may be reused as input for
+ setting or resetting the currently-set variables. Read-only
+ variables cannot be reset. In POSIX mode, only shell variables
+ are listed.
+
+ When options are supplied, they set or unset shell attributes.
+ Options, if specified, have the following meanings:
+
+ `-a'
+ Mark variables and function which are modified or created for
+ export to the environment of subsequent commands.
+
+ `-b'
+ Cause the status of terminated background jobs to be reported
+ immediately, rather than before printing the next primary
+ prompt.
+
+ `-e'
+ Exit immediately if a pipeline (*note Pipelines::), which may
+ consist of a single simple command (*note Simple Commands::),
+ a subshell command enclosed in parentheses (*note Command
+ Grouping::), or one of the commands executed as part of a
+ command list enclosed by braces (*note Command Grouping::)
+ returns a non-zero status. The shell does not exit if the
+ command that fails is part of the command list immediately
+ following a `while' or `until' keyword, part of the test in
+ an `if' statement, part of any command executed in a `&&' or
+ `||' list except the command following the final `&&' or `||',
+ any command in a pipeline but the last, or if the command's
+ return status is being inverted with `!'. A trap on `ERR',
+ if set, is executed before the shell exits.
+
+ This option applies to the shell environment and each
+ subshell environment separately (*note Command Execution
+ Environment::), and may cause subshells to exit before
+ executing all the commands in the subshell.
+
+ `-f'
+ Disable filename expansion (globbing).
+
+ `-h'
+ Locate and remember (hash) commands as they are looked up for
+ execution. This option is enabled by default.
+
+ `-k'
+ All arguments in the form of assignment statements are placed
+ in the environment for a command, not just those that precede
+ the command name.
+
+ `-m'
+ Job control is enabled (*note Job Control::).
+
+ `-n'
+ Read commands but do not execute them; this may be used to
+ check a script for syntax errors. This option is ignored by
+ interactive shells.
+
+ `-o OPTION-NAME'
+ Set the option corresponding to OPTION-NAME:
+
+ `allexport'
+ Same as `-a'.
+
+ `braceexpand'
+ Same as `-B'.
+
+ `emacs'
+ Use an `emacs'-style line editing interface (*note
+ Command Line Editing::). This also affects the editing
+ interface used for `read -e'.
+
+ `errexit'
+ Same as `-e'.
+
+ `errtrace'
+ Same as `-E'.
+
+ `functrace'
+ Same as `-T'.
+
+ `hashall'
+ Same as `-h'.
+
+ `histexpand'
+ Same as `-H'.
+
+ `history'
+ Enable command history, as described in *note Bash
+ History Facilities::. This option is on by default in
+ interactive shells.
+
+ `ignoreeof'
+ An interactive shell will not exit upon reading EOF.
+
+ `keyword'
+ Same as `-k'.
+
+ `monitor'
+ Same as `-m'.
+
+ `noclobber'
+ Same as `-C'.
+
+ `noexec'
+ Same as `-n'.
+
+ `noglob'
+ Same as `-f'.
+
+ `nolog'
+ Currently ignored.
+
+ `notify'
+ Same as `-b'.
+
+ `nounset'
+ Same as `-u'.
+
+ `onecmd'
+ Same as `-t'.
+
+ `physical'
+ Same as `-P'.
+
+ `pipefail'
+ If set, the return value of a pipeline is the value of
+ the last (rightmost) command to exit with a non-zero
+ status, or zero if all commands in the pipeline exit
+ successfully. This option is disabled by default.
+
+ `posix'
+ Change the behavior of Bash where the default operation
+ differs from the POSIX standard to match the standard
+ (*note Bash POSIX Mode::). This is intended to make
+ Bash behave as a strict superset of that standard.
+
+ `privileged'
+ Same as `-p'.
+
+ `verbose'
+ Same as `-v'.
+
+ `vi'
+ Use a `vi'-style line editing interface. This also
+ affects the editing interface used for `read -e'.
+
+ `xtrace'
+ Same as `-x'.
+
+ `-p'
+ Turn on privileged mode. In this mode, the `$BASH_ENV' and
+ `$ENV' files are not processed, shell functions are not
+ inherited from the environment, and the `SHELLOPTS',
+ `BASHOPTS', `CDPATH' and `GLOBIGNORE' variables, if they
+ appear in the environment, are ignored. If the shell is
+ started with the effective user (group) id not equal to the
+ real user (group) id, and the `-p' option is not supplied,
+ these actions are taken and the effective user id is set to
+ the real user id. If the `-p' option is supplied at startup,
+ the effective user id is not reset. Turning this option off
+ causes the effective user and group ids to be set to the real
+ user and group ids.
+
+ `-t'
+ Exit after reading and executing one command.
+
+ `-u'
+ Treat unset variables and parameters other than the special
+ parameters `@' or `*' as an error when performing parameter
+ expansion. An error message will be written to the standard
+ error, and a non-interactive shell will exit.
+
+ `-v'
+ Print shell input lines as they are read.
+
+ `-x'
+ Print a trace of simple commands, `for' commands, `case'
+ commands, `select' commands, and arithmetic `for' commands
+ and their arguments or associated word lists after they are
+ expanded and before they are executed. The value of the `PS4'
+ variable is expanded and the resultant value is printed before
+ the command and its expanded arguments.
+
+ `-B'
+ The shell will perform brace expansion (*note Brace
+ Expansion::). This option is on by default.
+
+ `-C'
+ Prevent output redirection using `>', `>&', and `<>' from
+ overwriting existing files.
+
+ `-E'
+ If set, any trap on `ERR' is inherited by shell functions,
+ command substitutions, and commands executed in a subshell
+ environment. The `ERR' trap is normally not inherited in
+ such cases.
+
+ `-H'
+ Enable `!' style history substitution (*note History
+ Interaction::). This option is on by default for interactive
+ shells.
+
+ `-P'
+ If set, do not follow symbolic links when performing commands
+ such as `cd' which change the current directory. The
+ physical directory is used instead. By default, Bash follows
+ the logical chain of directories when performing commands
+ which change the current directory.
+
+ For example, if `/usr/sys' is a symbolic link to
+ `/usr/local/sys' then:
+ $ cd /usr/sys; echo $PWD
+ /usr/sys
+ $ cd ..; pwd
+ /usr
+
+ If `set -P' is on, then:
+ $ cd /usr/sys; echo $PWD
+ /usr/local/sys
+ $ cd ..; pwd
+ /usr/local
+
+ `-T'
+ If set, any trap on `DEBUG' and `RETURN' are inherited by
+ shell functions, command substitutions, and commands executed
+ in a subshell environment. The `DEBUG' and `RETURN' traps
+ are normally not inherited in such cases.
+
+ `--'
+ If no arguments follow this option, then the positional
+ parameters are unset. Otherwise, the positional parameters
+ are set to the ARGUMENTS, even if some of them begin with a
+ `-'.
+
+ `-'
+ Signal the end of options, cause all remaining ARGUMENTS to
+ be assigned to the positional parameters. The `-x' and `-v'
+ options are turned off. If there are no arguments, the
+ positional parameters remain unchanged.
+
+ Using `+' rather than `-' causes these options to be turned off.
+ The options can also be used upon invocation of the shell. The
+ current set of options may be found in `$-'.
+
+ The remaining N ARGUMENTS are positional parameters and are
+ assigned, in order, to `$1', `$2', ... `$N'. The special
+ parameter `#' is set to N.
+
+ The return status is always zero unless an invalid option is
+ supplied.
+
+
+File: bashref.info, Node: The Shopt Builtin, Prev: The Set Builtin, Up: Modifying Shell Behavior
+
+4.3.2 The Shopt Builtin
+-----------------------
+
+This builtin allows you to change additional shell optional behavior.
+
+`shopt'
+ shopt [-pqsu] [-o] [OPTNAME ...]
+ Toggle the values of variables controlling optional shell behavior.
+ With no options, or with the `-p' option, a list of all settable
+ options is displayed, with an indication of whether or not each is
+ set. The `-p' option causes output to be displayed in a form that
+ may be reused as input. Other options have the following meanings:
+
+ `-s'
+ Enable (set) each OPTNAME.
+
+ `-u'
+ Disable (unset) each OPTNAME.
+
+ `-q'
+ Suppresses normal output; the return status indicates whether
+ the OPTNAME is set or unset. If multiple OPTNAME arguments
+ are given with `-q', the return status is zero if all
+ OPTNAMES are enabled; non-zero otherwise.
+
+ `-o'
+ Restricts the values of OPTNAME to be those defined for the
+ `-o' option to the `set' builtin (*note The Set Builtin::).
+
+ If either `-s' or `-u' is used with no OPTNAME arguments, the
+ display is limited to those options which are set or unset,
+ respectively.
+
+ Unless otherwise noted, the `shopt' options are disabled (off) by
+ default.
+
+ The return status when listing options is zero if all OPTNAMES are
+ enabled, non-zero otherwise. When setting or unsetting options,
+ the return status is zero unless an OPTNAME is not a valid shell
+ option.
+
+ The list of `shopt' options is:
+ `autocd'
+ If set, a command name that is the name of a directory is
+ executed as if it were the argument to the `cd' command.
+ This option is only used by interactive shells.
+
+ `cdable_vars'
+ If this is set, an argument to the `cd' builtin command that
+ is not a directory is assumed to be the name of a variable
+ whose value is the directory to change to.
+
+ `cdspell'
+ If set, minor errors in the spelling of a directory component
+ in a `cd' command will be corrected. The errors checked for
+ are transposed characters, a missing character, and a
+ character too many. If a correction is found, the corrected
+ path is printed, and the command proceeds. This option is
+ only used by interactive shells.
+
+ `checkhash'
+ If this is set, Bash checks that a command found in the hash
+ table exists before trying to execute it. If a hashed
+ command no longer exists, a normal path search is performed.
+
+ `checkjobs'
+ If set, Bash lists the status of any stopped and running jobs
+ before exiting an interactive shell. If any jobs are
+ running, this causes the exit to be deferred until a second
+ exit is attempted without an intervening command (*note Job
+ Control::). The shell always postpones exiting if any jobs
+ are stopped.
+
+ `checkwinsize'
+ If set, Bash checks the window size after each command and,
+ if necessary, updates the values of `LINES' and `COLUMNS'.
+
+ `cmdhist'
+ If set, Bash attempts to save all lines of a multiple-line
+ command in the same history entry. This allows easy
+ re-editing of multi-line commands.
+
+ `compat31'
+ If set, Bash changes its behavior to that of version 3.1 with
+ respect to quoted arguments to the conditional command's =~
+ operator.
+
+ `dirspell'
+ If set, Bash attempts spelling correction on directory names
+ during word completion if the directory name initially
+ supplied does not exist.
+
+ `dotglob'
+ If set, Bash includes filenames beginning with a `.' in the
+ results of filename expansion.
+
+ `execfail'
+ If this is set, a non-interactive shell will not exit if it
+ cannot execute the file specified as an argument to the `exec'
+ builtin command. An interactive shell does not exit if `exec'
+ fails.
+
+ `expand_aliases'
+ If set, aliases are expanded as described below under Aliases,
+ *note Aliases::. This option is enabled by default for
+ interactive shells.
+
+ `extdebug'
+ If set, behavior intended for use by debuggers is enabled:
+
+ 1. The `-F' option to the `declare' builtin (*note Bash
+ Builtins::) displays the source file name and line
+ number corresponding to each function name supplied as
+ an argument.
+
+ 2. If the command run by the `DEBUG' trap returns a
+ non-zero value, the next command is skipped and not
+ executed.
+
+ 3. If the command run by the `DEBUG' trap returns a value
+ of 2, and the shell is executing in a subroutine (a
+ shell function or a shell script executed by the `.' or
+ `source' builtins), a call to `return' is simulated.
+
+ 4. `BASH_ARGC' and `BASH_ARGV' are updated as described in
+ their descriptions (*note Bash Variables::).
+
+ 5. Function tracing is enabled: command substitution,
+ shell functions, and subshells invoked with `( COMMAND
+ )' inherit the `DEBUG' and `RETURN' traps.
+
+ 6. Error tracing is enabled: command substitution, shell
+ functions, and subshells invoked with `( COMMAND )'
+ inherit the `ERROR' trap.
+
+ `extglob'
+ If set, the extended pattern matching features described above
+ (*note Pattern Matching::) are enabled.
+
+ `extquote'
+ If set, `$'STRING'' and `$"STRING"' quoting is performed
+ within `${PARAMETER}' expansions enclosed in double quotes.
+ This option is enabled by default.
+
+ `failglob'
+ If set, patterns which fail to match filenames during
+ filename expansion result in an expansion error.
+
+ `force_fignore'
+ If set, the suffixes specified by the `FIGNORE' shell variable
+ cause words to be ignored when performing word completion
+ even if the ignored words are the only possible completions.
+ *Note Bash Variables::, for a description of `FIGNORE'. This
+ option is enabled by default.
+
+ `globstar'
+ If set, the pattern `**' used in a filename expansion context
+ will match a files and zero or more directories and
+ subdirectories. If the pattern is followed by a `/', only
+ directories and subdirectories match.
+
+ `gnu_errfmt'
+ If set, shell error messages are written in the standard GNU
+ error message format.
+
+ `histappend'
+ If set, the history list is appended to the file named by the
+ value of the `HISTFILE' variable when the shell exits, rather
+ than overwriting the file.
+
+ `histreedit'
+ If set, and Readline is being used, a user is given the
+ opportunity to re-edit a failed history substitution.
+
+ `histverify'
+ If set, and Readline is being used, the results of history
+ substitution are not immediately passed to the shell parser.
+ Instead, the resulting line is loaded into the Readline
+ editing buffer, allowing further modification.
+
+ `hostcomplete'
+ If set, and Readline is being used, Bash will attempt to
+ perform hostname completion when a word containing a `@' is
+ being completed (*note Commands For Completion::). This
+ option is enabled by default.
+
+ `huponexit'
+ If set, Bash will send `SIGHUP' to all jobs when an
+ interactive login shell exits (*note Signals::).
+
+ `interactive_comments'
+ Allow a word beginning with `#' to cause that word and all
+ remaining characters on that line to be ignored in an
+ interactive shell. This option is enabled by default.
+
+ `lithist'
+ If enabled, and the `cmdhist' option is enabled, multi-line
+ commands are saved to the history with embedded newlines
+ rather than using semicolon separators where possible.
+
+ `login_shell'
+ The shell sets this option if it is started as a login shell
+ (*note Invoking Bash::). The value may not be changed.
+
+ `mailwarn'
+ If set, and a file that Bash is checking for mail has been
+ accessed since the last time it was checked, the message
+ `"The mail in MAILFILE has been read"' is displayed.
+
+ `no_empty_cmd_completion'
+ If set, and Readline is being used, Bash will not attempt to
+ search the `PATH' for possible completions when completion is
+ attempted on an empty line.
+
+ `nocaseglob'
+ If set, Bash matches filenames in a case-insensitive fashion
+ when performing filename expansion.
+
+ `nocasematch'
+ If set, Bash matches patterns in a case-insensitive fashion
+ when performing matching while executing `case' or `[['
+ conditional commands.
+
+ `nullglob'
+ If set, Bash allows filename patterns which match no files to
+ expand to a null string, rather than themselves.
+
+ `progcomp'
+ If set, the programmable completion facilities (*note
+ Programmable Completion::) are enabled. This option is
+ enabled by default.
+
+ `promptvars'
+ If set, prompt strings undergo parameter expansion, command
+ substitution, arithmetic expansion, and quote removal after
+ being expanded as described below (*note Printing a Prompt::).
+ This option is enabled by default.
+
+ `restricted_shell'
+ The shell sets this option if it is started in restricted mode
+ (*note The Restricted Shell::). The value may not be changed.
+ This is not reset when the startup files are executed,
+ allowing the startup files to discover whether or not a shell
+ is restricted.
+
+ `shift_verbose'
+ If this is set, the `shift' builtin prints an error message
+ when the shift count exceeds the number of positional
+ parameters.
+
+ `sourcepath'
+ If set, the `source' builtin uses the value of `PATH' to find
+ the directory containing the file supplied as an argument.
+ This option is enabled by default.
+
+ `xpg_echo'
+ If set, the `echo' builtin expands backslash-escape sequences
+ by default.
+
+
+ The return status when listing options is zero if all OPTNAMES are
+ enabled, non-zero otherwise. When setting or unsetting options,
+ the return status is zero unless an OPTNAME is not a valid shell
+ option.
+
+
+
+File: bashref.info, Node: Special Builtins, Prev: Modifying Shell Behavior, Up: Shell Builtin Commands
+
+4.4 Special Builtins
+====================
+
+For historical reasons, the POSIX standard has classified several
+builtin commands as _special_. When Bash is executing in POSIX mode,
+the special builtins differ from other builtin commands in three
+respects:
+
+ 1. Special builtins are found before shell functions during command
+ lookup.
+
+ 2. If a special builtin returns an error status, a non-interactive
+ shell exits.
+
+ 3. Assignment statements preceding the command stay in effect in the
+ shell environment after the command completes.
+
+ When Bash is not executing in POSIX mode, these builtins behave no
+differently than the rest of the Bash builtin commands. The Bash POSIX
+mode is described in *note Bash POSIX Mode::.
+
+ These are the POSIX special builtins:
+ break : . continue eval exec exit export readonly return set
+ shift trap unset
+
+
+File: bashref.info, Node: Shell Variables, Next: Bash Features, Prev: Shell Builtin Commands, Up: Top
+
+5 Shell Variables
+*****************
+
+* Menu:
+
+* Bourne Shell Variables:: Variables which Bash uses in the same way
+ as the Bourne Shell.
+* Bash Variables:: List of variables that exist in Bash.
+
+ This chapter describes the shell variables that Bash uses. Bash
+automatically assigns default values to a number of variables.
+
+
+File: bashref.info, Node: Bourne Shell Variables, Next: Bash Variables, Up: Shell Variables
+
+5.1 Bourne Shell Variables
+==========================
+
+Bash uses certain shell variables in the same way as the Bourne shell.
+In some cases, Bash assigns a default value to the variable.
+
+`CDPATH'
+ A colon-separated list of directories used as a search path for
+ the `cd' builtin command.
+
+`HOME'
+ The current user's home directory; the default for the `cd' builtin
+ command. The value of this variable is also used by tilde
+ expansion (*note Tilde Expansion::).
+
+`IFS'
+ A list of characters that separate fields; used when the shell
+ splits words as part of expansion.
+
+`MAIL'
+ If this parameter is set to a filename and the `MAILPATH' variable
+ is not set, Bash informs the user of the arrival of mail in the
+ specified file.
+
+`MAILPATH'
+ A colon-separated list of filenames which the shell periodically
+ checks for new mail. Each list entry can specify the message that
+ is printed when new mail arrives in the mail file by separating
+ the file name from the message with a `?'. When used in the text
+ of the message, `$_' expands to the name of the current mail file.
+
+`OPTARG'
+ The value of the last option argument processed by the `getopts'
+ builtin.
+
+`OPTIND'
+ The index of the last option argument processed by the `getopts'
+ builtin.
+
+`PATH'
+ A colon-separated list of directories in which the shell looks for
+ commands. A zero-length (null) directory name in the value of
+ `PATH' indicates the current directory. A null directory name may
+ appear as two adjacent colons, or as an initial or trailing colon.
+
+`PS1'
+ The primary prompt string. The default value is `\s-\v\$ '.
+ *Note Printing a Prompt::, for the complete list of escape
+ sequences that are expanded before `PS1' is displayed.
+
+`PS2'
+ The secondary prompt string. The default value is `> '.
+
+
+
+File: bashref.info, Node: Bash Variables, Prev: Bourne Shell Variables, Up: Shell Variables
+
+5.2 Bash Variables
+==================
+
+These variables are set or used by Bash, but other shells do not
+normally treat them specially.
+
+ A few variables used by Bash are described in different chapters:
+variables for controlling the job control facilities (*note Job Control
+Variables::).
+
+`BASH'
+ The full pathname used to execute the current instance of Bash.
+
+`BASHOPTS'
+ A colon-separated list of enabled shell options. Each word in the
+ list is a valid argument for the `-s' option to the `shopt'
+ builtin command (*note The Shopt Builtin::). The options
+ appearing in `BASHOPTS' are those reported as `on' by `shopt'. If
+ this variable is in the environment when Bash starts up, each
+ shell option in the list will be enabled before reading any
+ startup files. This variable is readonly.
+
+`BASHPID'
+ Expands to the process id of the current Bash process. This
+ differs from `$$' under certain circumstances, such as subshells
+ that do not require Bash to be re-initialized.
+
+`BASH_ALIASES'
+ An associative array variable whose members correspond to the
+ internal list of aliases as maintained by the `alias' builtin
+ (*note Bourne Shell Builtins::). Elements added to this array
+ appear in the alias list; unsetting array elements cause aliases
+ to be removed from the alias list.
+
+`BASH_ARGC'
+ An array variable whose values are the number of parameters in each
+ frame of the current bash execution call stack. The number of
+ parameters to the current subroutine (shell function or script
+ executed with `.' or `source') is at the top of the stack. When a
+ subroutine is executed, the number of parameters passed is pushed
+ onto `BASH_ARGC'. The shell sets `BASH_ARGC' only when in
+ extended debugging mode (see *note The Shopt Builtin:: for a
+ description of the `extdebug' option to the `shopt' builtin).
+
+`BASH_ARGV'
+ An array variable containing all of the parameters in the current
+ bash execution call stack. The final parameter of the last
+ subroutine call is at the top of the stack; the first parameter of
+ the initial call is at the bottom. When a subroutine is executed,
+ the parameters supplied are pushed onto `BASH_ARGV'. The shell
+ sets `BASH_ARGV' only when in extended debugging mode (see *note
+ The Shopt Builtin:: for a description of the `extdebug' option to
+ the `shopt' builtin).
+
+`BASH_CMDS'
+ An associative array variable whose members correspond to the
+ internal hash table of commands as maintained by the `hash' builtin
+ (*note Bourne Shell Builtins::). Elements added to this array
+ appear in the hash table; unsetting array elements cause commands
+ to be removed from the hash table.
+
+`BASH_COMMAND'
+ The command currently being executed or about to be executed,
+ unless the shell is executing a command as the result of a trap,
+ in which case it is the command executing at the time of the trap.
+
+`BASH_ENV'
+ If this variable is set when Bash is invoked to execute a shell
+ script, its value is expanded and used as the name of a startup
+ file to read before executing the script. *Note Bash Startup
+ Files::.
+
+`BASH_EXECUTION_STRING'
+ The command argument to the `-c' invocation option.
+
+`BASH_LINENO'
+ An array variable whose members are the line numbers in source
+ files corresponding to each member of FUNCNAME.
+ `${BASH_LINENO[$i]}' is the line number in the source file where
+ `${FUNCNAME[$i]}' was called (or `${BASH_LINENO[$i-1]}' if
+ referenced within another shell function). The corresponding
+ source file name is `${BASH_SOURCE[$i]}'. Use `LINENO' to obtain
+ the current line number.
+
+`BASH_REMATCH'
+ An array variable whose members are assigned by the `=~' binary
+ operator to the `[[' conditional command (*note Conditional
+ Constructs::). The element with index 0 is the portion of the
+ string matching the entire regular expression. The element with
+ index N is the portion of the string matching the Nth
+ parenthesized subexpression. This variable is read-only.
+
+`BASH_SOURCE'
+ An array variable whose members are the source filenames
+ corresponding to the elements in the `FUNCNAME' array variable.
+
+`BASH_SUBSHELL'
+ Incremented by one each time a subshell or subshell environment is
+ spawned. The initial value is 0.
+
+`BASH_VERSINFO'
+ A readonly array variable (*note Arrays::) whose members hold
+ version information for this instance of Bash. The values
+ assigned to the array members are as follows:
+
+ `BASH_VERSINFO[0]'
+ The major version number (the RELEASE).
+
+ `BASH_VERSINFO[1]'
+ The minor version number (the VERSION).
+
+ `BASH_VERSINFO[2]'
+ The patch level.
+
+ `BASH_VERSINFO[3]'
+ The build version.
+
+ `BASH_VERSINFO[4]'
+ The release status (e.g., BETA1).
+
+ `BASH_VERSINFO[5]'
+ The value of `MACHTYPE'.
+
+
+`BASH_VERSION'
+ The version number of the current instance of Bash.
+
+`BASH_XTRACEFD'
+ If set to an integer corresponding to a valid file descriptor, Bash
+ will write the trace output generated when `set -x' is enabled to
+ that file descriptor. This allows tracing output to be separated
+ from diagnostic and error messages. The file descriptor is closed
+ when `BASH_XTRACEFD' is unset or assigned a new value. Unsetting
+ `BASH_XTRACEFD' or assigning it the empty string causes the trace
+ output to be sent to the standard error. Note that setting
+ `BASH_XTRACEFD' to 2 (the standard error file descriptor) and then
+ unsetting it will result in the standard error being closed.
+
+`COLUMNS'
+ Used by the `select' builtin command to determine the terminal
+ width when printing selection lists. Automatically set upon
+ receipt of a `SIGWINCH'.
+
+`COMP_CWORD'
+ An index into `${COMP_WORDS}' of the word containing the current
+ cursor position. This variable is available only in shell
+ functions invoked by the programmable completion facilities (*note
+ Programmable Completion::).
+
+`COMP_LINE'
+ The current command line. This variable is available only in
+ shell functions and external commands invoked by the programmable
+ completion facilities (*note Programmable Completion::).
+
+`COMP_POINT'
+ The index of the current cursor position relative to the beginning
+ of the current command. If the current cursor position is at the
+ end of the current command, the value of this variable is equal to
+ `${#COMP_LINE}'. This variable is available only in shell
+ functions and external commands invoked by the programmable
+ completion facilities (*note Programmable Completion::).
+
+`COMP_TYPE'
+ Set to an integer value corresponding to the type of completion
+ attempted that caused a completion function to be called: TAB, for
+ normal completion, `?', for listing completions after successive
+ tabs, `!', for listing alternatives on partial word completion,
+ `@', to list completions if the word is not unmodified, or `%',
+ for menu completion. This variable is available only in shell
+ functions and external commands invoked by the programmable
+ completion facilities (*note Programmable Completion::).
+
+`COMP_KEY'
+ The key (or final key of a key sequence) used to invoke the current
+ completion function.
+
+`COMP_WORDBREAKS'
+ The set of characters that the Readline library treats as word
+ separators when performing word completion. If `COMP_WORDBREAKS'
+ is unset, it loses its special properties, even if it is
+ subsequently reset.
+
+`COMP_WORDS'
+ An array variable consisting of the individual words in the
+ current command line. The line is split into words as Readline
+ would split it, using `COMP_WORDBREAKS' as described above. This
+ variable is available only in shell functions invoked by the
+ programmable completion facilities (*note Programmable
+ Completion::).
+
+`COMPREPLY'
+ An array variable from which Bash reads the possible completions
+ generated by a shell function invoked by the programmable
+ completion facility (*note Programmable Completion::).
+
+`DIRSTACK'
+ An array variable containing the current contents of the directory
+ stack. Directories appear in the stack in the order they are
+ displayed by the `dirs' builtin. Assigning to members of this
+ array variable may be used to modify directories already in the
+ stack, but the `pushd' and `popd' builtins must be used to add and
+ remove directories. Assignment to this variable will not change
+ the current directory. If `DIRSTACK' is unset, it loses its
+ special properties, even if it is subsequently reset.
+
+`EMACS'
+ If Bash finds this variable in the environment when the shell
+ starts with value `t', it assumes that the shell is running in an
+ emacs shell buffer and disables line editing.
+
+`EUID'
+ The numeric effective user id of the current user. This variable
+ is readonly.
+
+`FCEDIT'
+ The editor used as a default by the `-e' option to the `fc'
+ builtin command.
+
+`FIGNORE'
+ A colon-separated list of suffixes to ignore when performing
+ filename completion. A file name whose suffix matches one of the
+ entries in `FIGNORE' is excluded from the list of matched file
+ names. A sample value is `.o:~'
+
+`FUNCNAME'
+ An array variable containing the names of all shell functions
+ currently in the execution call stack. The element with index 0
+ is the name of any currently-executing shell function. The
+ bottom-most element is `"main"'. This variable exists only when a
+ shell function is executing. Assignments to `FUNCNAME' have no
+ effect and return an error status. If `FUNCNAME' is unset, it
+ loses its special properties, even if it is subsequently reset.
+
+`GLOBIGNORE'
+ A colon-separated list of patterns defining the set of filenames to
+ be ignored by filename expansion. If a filename matched by a
+ filename expansion pattern also matches one of the patterns in
+ `GLOBIGNORE', it is removed from the list of matches.
+
+`GROUPS'
+ An array variable containing the list of groups of which the
+ current user is a member. Assignments to `GROUPS' have no effect
+ and return an error status. If `GROUPS' is unset, it loses its
+ special properties, even if it is subsequently reset.
+
+`histchars'
+ Up to three characters which control history expansion, quick
+ substitution, and tokenization (*note History Interaction::). The
+ first character is the HISTORY EXPANSION character, that is, the
+ character which signifies the start of a history expansion,
+ normally `!'. The second character is the character which
+ signifies `quick substitution' when seen as the first character on
+ a line, normally `^'. The optional third character is the
+ character which indicates that the remainder of the line is a
+ comment when found as the first character of a word, usually `#'.
+ The history comment character causes history substitution to be
+ skipped for the remaining words on the line. It does not
+ necessarily cause the shell parser to treat the rest of the line
+ as a comment.
+
+`HISTCMD'
+ The history number, or index in the history list, of the current
+ command. If `HISTCMD' is unset, it loses its special properties,
+ even if it is subsequently reset.
+
+`HISTCONTROL'
+ A colon-separated list of values controlling how commands are
+ saved on the history list. If the list of values includes
+ `ignorespace', lines which begin with a space character are not
+ saved in the history list. A value of `ignoredups' causes lines
+ which match the previous history entry to not be saved. A value
+ of `ignoreboth' is shorthand for `ignorespace' and `ignoredups'.
+ A value of `erasedups' causes all previous lines matching the
+ current line to be removed from the history list before that line
+ is saved. Any value not in the above list is ignored. If
+ `HISTCONTROL' is unset, or does not include a valid value, all
+ lines read by the shell parser are saved on the history list,
+ subject to the value of `HISTIGNORE'. The second and subsequent
+ lines of a multi-line compound command are not tested, and are
+ added to the history regardless of the value of `HISTCONTROL'.
+
+`HISTFILE'
+ The name of the file to which the command history is saved. The
+ default value is `~/.bash_history'.
+
+`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 history file is also truncated to
+ this size after writing it when an interactive shell exits. The
+ default value is 500.
+
+`HISTIGNORE'
+ A colon-separated list of patterns used to decide which command
+ lines should be saved on the history list. Each pattern is
+ anchored at the beginning of the line and must match the complete
+ line (no implicit `*' is appended). Each pattern is tested
+ against the line after the checks specified by `HISTCONTROL' are
+ applied. In addition to the normal shell pattern matching
+ characters, `&' matches the previous history line. `&' may be
+ escaped using a backslash; the backslash is removed before
+ attempting a match. The second and subsequent lines of a
+ multi-line compound command are not tested, and are added to the
+ history regardless of the value of `HISTIGNORE'.
+
+ `HISTIGNORE' subsumes the function of `HISTCONTROL'. A pattern of
+ `&' is identical to `ignoredups', and a pattern of `[ ]*' is
+ identical to `ignorespace'. Combining these two patterns,
+ separating them with a colon, provides the functionality of
+ `ignoreboth'.
+
+`HISTSIZE'
+ The maximum number of commands to remember on the history list.
+ The default value is 500.
+
+`HISTTIMEFORMAT'
+ If this variable is set and not null, its value is used as a
+ format string for STRFTIME to print the time stamp associated with
+ each history entry displayed by the `history' builtin. If this
+ variable is set, time stamps are written to the history file so
+ they may be preserved across shell sessions. This uses the
+ history comment character to distinguish timestamps from other
+ history lines.
+
+`HOSTFILE'
+ Contains the name of a file in the same format as `/etc/hosts' that
+ should be read when the shell needs to complete a hostname. The
+ list of possible hostname completions may be changed while the
+ shell is running; the next time hostname completion is attempted
+ after the value is changed, Bash adds the contents of the new file
+ to the existing list. If `HOSTFILE' is set, but has no value, or
+ does not name a readable file, Bash attempts to read `/etc/hosts'
+ to obtain the list of possible hostname completions. When
+ `HOSTFILE' is unset, the hostname list is cleared.
+
+`HOSTNAME'
+ The name of the current host.
+
+`HOSTTYPE'
+ A string describing the machine Bash is running on.
+
+`IGNOREEOF'
+ Controls the action of the shell on receipt of an `EOF' character
+ as the sole input. If set, the value denotes the number of
+ consecutive `EOF' characters that can be read as the first
+ character on an input line before the shell will exit. If the
+ variable exists but does not have a numeric value (or has no
+ value) then the default is 10. If the variable does not exist,
+ then `EOF' signifies the end of input to the shell. This is only
+ in effect for interactive shells.
+
+`INPUTRC'
+ The name of the Readline initialization file, overriding the
+ default of `~/.inputrc'.
+
+`LANG'
+ Used to determine the locale category for any category not
+ specifically selected with a variable starting with `LC_'.
+
+`LC_ALL'
+ This variable overrides the value of `LANG' and any other `LC_'
+ variable specifying a locale category.
+
+`LC_COLLATE'
+ This variable determines the collation order used when sorting the
+ results of filename expansion, and determines the behavior of
+ range expressions, equivalence classes, and collating sequences
+ within filename expansion and pattern matching (*note Filename
+ Expansion::).
+
+`LC_CTYPE'
+ This variable determines the interpretation of characters and the
+ behavior of character classes within filename expansion and pattern
+ matching (*note Filename Expansion::).
+
+`LC_MESSAGES'
+ This variable determines the locale used to translate double-quoted
+ strings preceded by a `$' (*note Locale Translation::).
+
+`LC_NUMERIC'
+ This variable determines the locale category used for number
+ formatting.
+
+`LINENO'
+ The line number in the script or shell function currently
+ executing.
+
+`LINES'
+ Used by the `select' builtin command to determine the column length
+ for printing selection lists. Automatically set upon receipt of a
+ `SIGWINCH'.
+
+`MACHTYPE'
+ A string that fully describes the system type on which Bash is
+ executing, in the standard GNU CPU-COMPANY-SYSTEM format.
+
+`MAILCHECK'
+ How often (in seconds) that the shell should check for mail in the
+ files specified in the `MAILPATH' or `MAIL' variables. The
+ default is 60 seconds. When it is time to check for mail, the
+ shell does so before displaying the primary prompt. If this
+ variable is unset, or set to a value that is not a number greater
+ than or equal to zero, the shell disables mail checking.
+
+`OLDPWD'
+ The previous working directory as set by the `cd' builtin.
+
+`OPTERR'
+ If set to the value 1, Bash displays error messages generated by
+ the `getopts' builtin command.
+
+`OSTYPE'
+ A string describing the operating system Bash is running on.
+
+`PIPESTATUS'
+ An array variable (*note Arrays::) containing a list of exit
+ status values from the processes in the most-recently-executed
+ foreground pipeline (which may contain only a single command).
+
+`POSIXLY_CORRECT'
+ If this variable is in the environment when `bash' starts, the
+ shell enters POSIX mode (*note Bash POSIX Mode::) before reading
+ the startup files, as if the `--posix' invocation option had been
+ supplied. If it is set while the shell is running, `bash' enables
+ POSIX mode, as if the command
+ `set -o posix'
+ had been executed.
+
+`PPID'
+ The process ID of the shell's parent process. This variable is
+ readonly.
+
+`PROMPT_COMMAND'
+ If set, the value is interpreted as a command to execute before
+ the printing of each primary prompt (`$PS1').
+
+`PROMPT_DIRTRIM'
+ If set to a number greater than zero, the value is used as the
+ number of trailing directory components to retain when expanding
+ the `\w' and `\W' prompt string escapes (*note Printing a
+ Prompt::). Characters removed are replaced with an ellipsis.
+
+`PS3'
+ The value of this variable is used as the prompt for the `select'
+ command. If this variable is not set, the `select' command
+ prompts with `#? '
+
+`PS4'
+ The value is the prompt printed before the command line is echoed
+ when the `-x' option is set (*note The Set Builtin::). The first
+ character of `PS4' is replicated multiple times, as necessary, to
+ indicate multiple levels of indirection. The default is `+ '.
+
+`PWD'
+ The current working directory as set by the `cd' builtin.
+
+`RANDOM'
+ Each time this parameter is referenced, a random integer between 0
+ and 32767 is generated. Assigning a value to this variable seeds
+ the random number generator.
+
+`REPLY'
+ The default variable for the `read' builtin.
+
+`SECONDS'
+ This variable expands to the number of seconds since the shell was
+ started. Assignment to this variable resets the count to the
+ value assigned, and the expanded value becomes the value assigned
+ plus the number of seconds since the assignment.
+
+`SHELL'
+ The full pathname to the shell is kept in this environment
+ variable. If it is not set when the shell starts, Bash assigns to
+ it the full pathname of the current user's login shell.
+
+`SHELLOPTS'
+ A colon-separated list of enabled shell options. Each word in the
+ list is a valid argument for the `-o' option to the `set' builtin
+ command (*note The Set Builtin::). The options appearing in
+ `SHELLOPTS' are those reported as `on' by `set -o'. If this
+ variable is in the environment when Bash starts up, each shell
+ option in the list will be enabled before reading any startup
+ files. This variable is readonly.
+
+`SHLVL'
+ Incremented by one each time a new instance of Bash is started.
+ This is intended to be a count of how deeply your Bash shells are
+ nested.
+
+`TIMEFORMAT'
+ The value of this parameter is used as a format string specifying
+ how the timing information for pipelines prefixed with the `time'
+ reserved word should be displayed. The `%' character introduces an
+ escape sequence that is expanded to a time value or other
+ information. The escape sequences and their meanings are as
+ follows; the braces denote optional portions.
+
+ `%%'
+ A literal `%'.
+
+ `%[P][l]R'
+ The elapsed time in seconds.
+
+ `%[P][l]U'
+ The number of CPU seconds spent in user mode.
+
+ `%[P][l]S'
+ The number of CPU seconds spent in system mode.
+
+ `%P'
+ The CPU percentage, computed as (%U + %S) / %R.
+
+ The optional P is a digit specifying the precision, the number of
+ fractional digits after a decimal point. A value of 0 causes no
+ decimal point or fraction to be output. At most three places
+ after the decimal point may be specified; values of P greater than
+ 3 are changed to 3. If P is not specified, the value 3 is used.
+
+ The optional `l' specifies a longer format, including minutes, of
+ the form MMmSS.FFs. The value of P determines whether or not the
+ fraction is included.
+
+ If this variable is not set, Bash acts as if it had the value
+ `$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS''
+ If the value is null, no timing information is displayed. A
+ trailing newline is added when the format string is displayed.
+
+`TMOUT'
+ If set to a value greater than zero, `TMOUT' is treated as the
+ default timeout for the `read' builtin (*note Bash Builtins::).
+ The `select' command (*note Conditional Constructs::) terminates
+ if input does not arrive after `TMOUT' seconds when input is coming
+ from a terminal.
+
+ In an interactive shell, the value is interpreted as the number of
+ seconds to wait for input after issuing the primary prompt when
+ the shell is interactive. Bash terminates after that number of
+ seconds if input does not arrive.
+
+`TMPDIR'
+ If set, Bash uses its value as the name of a directory in which
+ Bash creates temporary files for the shell's use.
+
+`UID'
+ The numeric real user id of the current user. This variable is
+ readonly.
+
+
+
+File: bashref.info, Node: Bash Features, Next: Job Control, Prev: Shell Variables, Up: Top
+
+6 Bash Features
+***************
+
+This section describes features unique to Bash.
+
+* Menu:
+
+* Invoking Bash:: Command line options that you can give
+ to Bash.
+* Bash Startup Files:: When and how Bash executes scripts.
+* Interactive Shells:: What an interactive shell is.
+* Bash Conditional Expressions:: Primitives used in composing expressions for
+ the `test' builtin.
+* Shell Arithmetic:: Arithmetic on shell variables.
+* Aliases:: Substituting one command for another.
+* Arrays:: Array Variables.
+* The Directory Stack:: History of visited directories.
+* Printing a Prompt:: Controlling the PS1 string.
+* The Restricted Shell:: A more controlled mode of shell execution.
+* Bash POSIX Mode:: Making Bash behave more closely to what
+ the POSIX standard specifies.
+
+
+File: bashref.info, Node: Invoking Bash, Next: Bash Startup Files, Up: Bash Features
+
+6.1 Invoking Bash
+=================
+
+ bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o OPTION] [-O SHOPT_OPTION] [ARGUMENT ...]
+ bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o OPTION] [-O SHOPT_OPTION] -c STRING [ARGUMENT ...]
+ bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o OPTION] [-O SHOPT_OPTION] [ARGUMENT ...]
+
+ In addition to the single-character shell command-line options
+(*note The Set Builtin::), there are several multi-character options
+that you can use. These options must appear on the command line before
+the single-character options to be recognized.
+
+`--debugger'
+ Arrange for the debugger profile to be executed before the shell
+ starts. Turns on extended debugging mode (see *note The Shopt
+ Builtin:: for a description of the `extdebug' option to the `shopt'
+ builtin) and shell function tracing (see *note The Set Builtin::
+ for a description of the `-o functrace' option).
+
+`--dump-po-strings'
+ A list of all double-quoted strings preceded by `$' is printed on
+ the standard output in the GNU `gettext' PO (portable object) file
+ format. Equivalent to `-D' except for the output format.
+
+`--dump-strings'
+ Equivalent to `-D'.
+
+`--help'
+ Display a usage message on standard output and exit successfully.
+
+`--init-file FILENAME'
+`--rcfile FILENAME'
+ Execute commands from FILENAME (instead of `~/.bashrc') in an
+ interactive shell.
+
+`--login'
+ Equivalent to `-l'.
+
+`--noediting'
+ Do not use the GNU Readline library (*note Command Line Editing::)
+ to read command lines when the shell is interactive.
+
+`--noprofile'
+ Don't load the system-wide startup file `/etc/profile' or any of
+ the personal initialization files `~/.bash_profile',
+ `~/.bash_login', or `~/.profile' when Bash is invoked as a login
+ shell.
+
+`--norc'
+ Don't read the `~/.bashrc' initialization file in an interactive
+ shell. This is on by default if the shell is invoked as `sh'.
+
+`--posix'
+ Change the behavior of Bash where the default operation differs
+ from the POSIX standard to match the standard. This is intended
+ to make Bash behave as a strict superset of that standard. *Note
+ Bash POSIX Mode::, for a description of the Bash POSIX mode.
+
+`--restricted'
+ Make the shell a restricted shell (*note The Restricted Shell::).
+
+`--verbose'
+ Equivalent to `-v'. Print shell input lines as they're read.
+
+`--version'
+ Show version information for this instance of Bash on the standard
+ output and exit successfully.
+
+
+ There are several single-character options that may be supplied at
+invocation which are not available with the `set' builtin.
+
+`-c STRING'
+ Read and execute commands from STRING after processing the
+ options, then exit. Any remaining arguments are assigned to the
+ positional parameters, starting with `$0'.
+
+`-i'
+ Force the shell to run interactively. Interactive shells are
+ described in *note Interactive Shells::.
+
+`-l'
+ Make this shell act as if it had been directly invoked by login.
+ When the shell is interactive, this is equivalent to starting a
+ login shell with `exec -l bash'. When the shell is not
+ interactive, the login shell startup files will be executed.
+ `exec bash -l' or `exec bash --login' will replace the current
+ shell with a Bash login shell. *Note Bash Startup Files::, for a
+ description of the special behavior of a login shell.
+
+`-r'
+ Make the shell a restricted shell (*note The Restricted Shell::).
+
+`-s'
+ If this option is present, or if no arguments remain after option
+ processing, then commands are read from the standard input. This
+ option allows the positional parameters to be set when invoking an
+ interactive shell.
+
+`-D'
+ A list of all double-quoted strings preceded by `$' is printed on
+ the standard output. These are the strings that are subject to
+ language translation when the current locale is not `C' or `POSIX'
+ (*note Locale Translation::). This implies the `-n' option; no
+ commands will be executed.
+
+`[-+]O [SHOPT_OPTION]'
+ SHOPT_OPTION is one of the shell options accepted by the `shopt'
+ builtin (*note The Shopt Builtin::). If SHOPT_OPTION is present,
+ `-O' sets the value of that option; `+O' unsets it. If
+ SHOPT_OPTION is not supplied, the names and values of the shell
+ options accepted by `shopt' are printed on the standard output.
+ If the invocation option is `+O', the output is displayed in a
+ format that may be reused as input.
+
+`--'
+ A `--' signals the end of options and disables further option
+ processing. Any arguments after the `--' are treated as filenames
+ and arguments.
+
+
+ A _login_ shell is one whose first character of argument zero is
+`-', or one invoked with the `--login' option.
+
+ An _interactive_ shell is one started without non-option arguments,
+unless `-s' is specified, without specifying the `-c' option, and whose
+input and output are both connected to terminals (as determined by
+`isatty(3)'), or one started with the `-i' option. *Note Interactive
+Shells::, for more information.
+
+ If arguments remain after option processing, and neither the `-c'
+nor the `-s' option has been supplied, the first argument is assumed to
+be the name of a file containing shell commands (*note Shell Scripts::).
+When Bash is invoked in this fashion, `$0' is set to the name of the
+file, and the positional parameters are set to the remaining arguments.
+Bash reads and executes commands from this file, then exits. Bash's
+exit status is the exit status of the last command executed in the
+script. If no commands are executed, the exit status is 0.
+
+
+File: bashref.info, Node: Bash Startup Files, Next: Interactive Shells, Prev: Invoking Bash, Up: Bash Features
+
+6.2 Bash Startup Files
+======================
+
+This section describes how Bash executes its startup files. If any of
+the files exist but cannot be read, Bash reports an error. Tildes are
+expanded in file names as described above under Tilde Expansion (*note
+Tilde Expansion::).
+
+ Interactive shells are described in *note Interactive Shells::.
+
+Invoked as an interactive login shell, or with `--login'
+........................................................
+
+When Bash is invoked as an interactive login shell, or as a
+non-interactive shell with the `--login' option, it first reads and
+executes commands from the file `/etc/profile', if that file exists.
+After reading that file, it looks for `~/.bash_profile',
+`~/.bash_login', and `~/.profile', in that order, and reads and
+executes commands from the first one that exists and is readable. The
+`--noprofile' option may be used when the shell is started to inhibit
+this behavior.
+
+ When a login shell exits, Bash reads and executes commands from the
+file `~/.bash_logout', if it exists.
+
+Invoked as an interactive non-login shell
+.........................................
+
+When an interactive shell that is not a login shell is started, Bash
+reads and executes commands from `~/.bashrc', if that file exists.
+This may be inhibited by using the `--norc' option. The `--rcfile
+FILE' option will force Bash to read and execute commands from FILE
+instead of `~/.bashrc'.
+
+ So, typically, your `~/.bash_profile' contains the line
+ `if [ -f ~/.bashrc ]; then . ~/.bashrc; fi'
+ after (or before) any login-specific initializations.
+
+Invoked non-interactively
+.........................
+
+When Bash is started non-interactively, to run a shell script, for
+example, it looks for the variable `BASH_ENV' in the environment,
+expands its value if it appears there, and uses the expanded value as
+the name of a file to read and execute. Bash behaves as if the
+following command were executed:
+ `if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi'
+ but the value of the `PATH' variable is not used to search for the
+file name.
+
+ As noted above, if a non-interactive shell is invoked with the
+`--login' option, Bash attempts to read and execute commands from the
+login shell startup files.
+
+Invoked with name `sh'
+......................
+
+If Bash is invoked with the name `sh', it tries to mimic the startup
+behavior of historical versions of `sh' as closely as possible, while
+conforming to the POSIX standard as well.
+
+ When invoked as an interactive login shell, or as a non-interactive
+shell with the `--login' option, it first attempts to read and execute
+commands from `/etc/profile' and `~/.profile', in that order. The
+`--noprofile' option may be used to inhibit this behavior. When
+invoked as an interactive shell with the name `sh', Bash looks for the
+variable `ENV', expands its value if it is defined, and uses the
+expanded value as the name of a file to read and execute. Since a
+shell invoked as `sh' does not attempt to read and execute commands
+from any other startup files, the `--rcfile' option has no effect. A
+non-interactive shell invoked with the name `sh' does not attempt to
+read any other startup files.
+
+ When invoked as `sh', Bash enters POSIX mode after the startup files
+are read.
+
+Invoked in POSIX mode
+.....................
+
+When Bash is started in POSIX mode, as with the `--posix' command line
+option, it follows the POSIX standard for startup files. In this mode,
+interactive shells expand the `ENV' variable and commands are read and
+executed from the file whose name is the expanded value. No other
+startup files are read.
+
+Invoked by remote shell daemon
+..............................
+
+Bash attempts to determine when it is being run with its standard input
+connected to a a network connection, as if by the remote shell daemon,
+usually `rshd', or the secure shell daemon `sshd'. If Bash determines
+it is being run in this fashion, it reads and executes commands from
+`~/.bashrc', if that file exists and is readable. It will not do this
+if invoked as `sh'. The `--norc' option may be used to inhibit this
+behavior, and the `--rcfile' option may be used to force another file
+to be read, but `rshd' does not generally invoke the shell with those
+options or allow them to be specified.
+
+Invoked with unequal effective and real UID/GIDs
+................................................
+
+If Bash is started with the effective user (group) id not equal to the
+real user (group) id, and the `-p' option is not supplied, no startup
+files are read, shell functions are not inherited from the environment,
+the `SHELLOPTS', `BASHOPTS', `CDPATH', and `GLOBIGNORE' variables, if
+they appear in the environment, are ignored, and the effective user id
+is set to the real user id. If the `-p' option is supplied at
+invocation, the startup behavior is the same, but the effective user id
+is not reset.
+
+
+File: bashref.info, Node: Interactive Shells, Next: Bash Conditional Expressions, Prev: Bash Startup Files, Up: Bash Features
+
+6.3 Interactive Shells
+======================
+
+* Menu:
+
+* What is an Interactive Shell?:: What determines whether a shell is Interactive.
+* Is this Shell Interactive?:: How to tell if a shell is interactive.
+* Interactive Shell Behavior:: What changes in a interactive shell?
+
+
+File: bashref.info, Node: What is an Interactive Shell?, Next: Is this Shell Interactive?, Up: Interactive Shells
+
+6.3.1 What is an Interactive Shell?
+-----------------------------------
+
+An interactive shell is one started without non-option arguments,
+unless `-s' is specified, without specifying the `-c' option, and whose
+input and error output are both connected to terminals (as determined
+by `isatty(3)'), or one started with the `-i' option.
+
+ An interactive shell generally reads from and writes to a user's
+terminal.
+
+ The `-s' invocation option may be used to set the positional
+parameters when an interactive shell is started.
+
+
+File: bashref.info, Node: Is this Shell Interactive?, Next: Interactive Shell Behavior, Prev: What is an Interactive Shell?, Up: Interactive Shells
+
+6.3.2 Is this Shell Interactive?
+--------------------------------
+
+To determine within a startup script whether or not Bash is running
+interactively, test the value of the `-' special parameter. It
+contains `i' when the shell is interactive. For example:
+
+ case "$-" in
+ *i*) echo This shell is interactive ;;
+ *) echo This shell is not interactive ;;
+ esac
+
+ Alternatively, startup scripts may examine the variable `PS1'; it is
+unset in non-interactive shells, and set in interactive shells. Thus:
+
+ if [ -z "$PS1" ]; then
+ echo This shell is not interactive
+ else
+ echo This shell is interactive
+ fi
+
+
+File: bashref.info, Node: Interactive Shell Behavior, Prev: Is this Shell Interactive?, Up: Interactive Shells
+
+6.3.3 Interactive Shell Behavior
+--------------------------------
+
+When the shell is running interactively, it changes its behavior in
+several ways.
+
+ 1. Startup files are read and executed as described in *note Bash
+ Startup Files::.
+
+ 2. Job Control (*note Job Control::) is enabled by default. When job
+ control is in effect, Bash ignores the keyboard-generated job
+ control signals `SIGTTIN', `SIGTTOU', and `SIGTSTP'.
+
+ 3. Bash expands and displays `PS1' before reading the first line of a
+ command, and expands and displays `PS2' before reading the second
+ and subsequent lines of a multi-line command.
+
+ 4. Bash executes the value of the `PROMPT_COMMAND' variable as a
+ command before printing the primary prompt, `$PS1' (*note Bash
+ Variables::).
+
+ 5. Readline (*note Command Line Editing::) is used to read commands
+ from the user's terminal.
+
+ 6. Bash inspects the value of the `ignoreeof' option to `set -o'
+ instead of exiting immediately when it receives an `EOF' on its
+ standard input when reading a command (*note The Set Builtin::).
+
+ 7. Command history (*note Bash History Facilities::) and history
+ expansion (*note History Interaction::) are enabled by default.
+ Bash will save the command history to the file named by `$HISTFILE'
+ when an interactive shell exits.
+
+ 8. Alias expansion (*note Aliases::) is performed by default.
+
+ 9. In the absence of any traps, Bash ignores `SIGTERM' (*note
+ Signals::).
+
+ 10. In the absence of any traps, `SIGINT' is caught and handled
+ ((*note Signals::). `SIGINT' will interrupt some shell builtins.
+
+ 11. An interactive login shell sends a `SIGHUP' to all jobs on exit if
+ the `huponexit' shell option has been enabled (*note Signals::).
+
+ 12. The `-n' invocation option is ignored, and `set -n' has no effect
+ (*note The Set Builtin::).
+
+ 13. Bash will check for mail periodically, depending on the values of
+ the `MAIL', `MAILPATH', and `MAILCHECK' shell variables (*note
+ Bash Variables::).
+
+ 14. Expansion errors due to references to unbound shell variables after
+ `set -u' has been enabled will not cause the shell to exit (*note
+ The Set Builtin::).
+
+ 15. The shell will not exit on expansion errors caused by VAR being
+ unset or null in `${VAR:?WORD}' expansions (*note Shell Parameter
+ Expansion::).
+
+ 16. Redirection errors encountered by shell builtins will not cause the
+ shell to exit.
+
+ 17. When running in POSIX mode, a special builtin returning an error
+ status will not cause the shell to exit (*note Bash POSIX Mode::).
+
+ 18. A failed `exec' will not cause the shell to exit (*note Bourne
+ Shell Builtins::).
+
+ 19. Parser syntax errors will not cause the shell to exit.
+
+ 20. Simple spelling correction for directory arguments to the `cd'
+ builtin is enabled by default (see the description of the `cdspell'
+ option to the `shopt' builtin in *note The Shopt Builtin::).
+
+ 21. The shell will check the value of the `TMOUT' variable and exit if
+ a command is not read within the specified number of seconds after
+ printing `$PS1' (*note Bash Variables::).
+
+
+
+File: bashref.info, Node: Bash Conditional Expressions, Next: Shell Arithmetic, Prev: Interactive Shells, Up: Bash Features
+
+6.4 Bash Conditional Expressions
+================================
+
+Conditional expressions are used by the `[[' compound command and the
+`test' and `[' builtin commands.
+
+ Expressions may be unary or binary. Unary expressions are often
+used to examine the status of a file. There are string operators and
+numeric comparison operators as well. If the FILE argument to one of
+the primaries is of the form `/dev/fd/N', then file descriptor N is
+checked. If the FILE argument to one of the primaries is one of
+`/dev/stdin', `/dev/stdout', or `/dev/stderr', file descriptor 0, 1, or
+2, respectively, is checked.
+
+ When used with `[[', The `<' and `>' operators sort
+lexicographically using the current locale.
+
+ Unless otherwise specified, primaries that operate on files follow
+symbolic links and operate on the target of the link, rather than the
+link itself.
+
+`-a FILE'
+ True if FILE exists.
+
+`-b FILE'
+ True if FILE exists and is a block special file.
+
+`-c FILE'
+ True if FILE exists and is a character special file.
+
+`-d FILE'
+ True if FILE exists and is a directory.
+
+`-e FILE'
+ True if FILE exists.
+
+`-f FILE'
+ True if FILE exists and is a regular file.
+
+`-g FILE'
+ True if FILE exists and its set-group-id bit is set.
+
+`-h FILE'
+ True if FILE exists and is a symbolic link.
+
+`-k FILE'
+ True if FILE exists and its "sticky" bit is set.
+
+`-p FILE'
+ True if FILE exists and is a named pipe (FIFO).
+
+`-r FILE'
+ True if FILE exists and is readable.
+
+`-s FILE'
+ True if FILE exists and has a size greater than zero.
+
+`-t FD'
+ True if file descriptor FD is open and refers to a terminal.
+
+`-u FILE'
+ True if FILE exists and its set-user-id bit is set.
+
+`-w FILE'
+ True if FILE exists and is writable.
+
+`-x FILE'
+ True if FILE exists and is executable.
+
+`-O FILE'
+ True if FILE exists and is owned by the effective user id.
+
+`-G FILE'
+ True if FILE exists and is owned by the effective group id.
+
+`-L FILE'
+ True if FILE exists and is a symbolic link.
+
+`-S FILE'
+ True if FILE exists and is a socket.
+
+`-N FILE'
+ True if FILE exists and has been modified since it was last read.
+
+`FILE1 -nt FILE2'
+ True if FILE1 is newer (according to modification date) than
+ FILE2, or if FILE1 exists and FILE2 does not.
+
+`FILE1 -ot FILE2'
+ True if FILE1 is older than FILE2, or if FILE2 exists and FILE1
+ does not.
+
+`FILE1 -ef FILE2'
+ True if FILE1 and FILE2 refer to the same device and inode numbers.
+
+`-o OPTNAME'
+ True if shell option OPTNAME is enabled. The list of options
+ appears in the description of the `-o' option to the `set' builtin
+ (*note The Set Builtin::).
+
+`-z STRING'
+ True if the length of STRING is zero.
+
+`-n STRING'
+`STRING'
+ True if the length of STRING is non-zero.
+
+`STRING1 == STRING2'
+`STRING1 = STRING2'
+ True if the strings are equal. `=' should be used with the `test'
+ command for POSIX conformance.
+
+`STRING1 != STRING2'
+ True if the strings are not equal.
+
+`STRING1 < STRING2'
+ True if STRING1 sorts before STRING2 lexicographically.
+
+`STRING1 > STRING2'
+ True if STRING1 sorts after STRING2 lexicographically.
+
+`ARG1 OP ARG2'
+ `OP' is one of `-eq', `-ne', `-lt', `-le', `-gt', or `-ge'. These
+ arithmetic binary operators return true if ARG1 is equal to, not
+ equal to, less than, less than or equal to, greater than, or
+ greater than or equal to ARG2, respectively. ARG1 and ARG2 may be
+ positive or negative integers.
+
+
+
+File: bashref.info, Node: Shell Arithmetic, Next: Aliases, Prev: Bash Conditional Expressions, Up: Bash Features
+
+6.5 Shell Arithmetic
+====================
+
+The shell allows arithmetic expressions to be evaluated, as one of the
+shell expansions or by the `let' and the `-i' option to the `declare'
+builtins.
+
+ Evaluation is done in fixed-width integers with no check for
+overflow, though division by 0 is trapped and flagged as an error. The
+operators and their precedence, associativity, and values are the same
+as in the C language. The following list of operators is grouped into
+levels of equal-precedence operators. The levels are listed in order
+of decreasing precedence.
+
+`ID++ ID--'
+ variable post-increment and post-decrement
+
+`++ID --ID'
+ variable pre-increment and pre-decrement
+
+`- +'
+ unary minus and plus
+
+`! ~'
+ logical and bitwise negation
+
+`**'
+ exponentiation
+
+`* / %'
+ multiplication, division, remainder
+
+`+ -'
+ addition, subtraction
+
+`<< >>'
+ left and right bitwise shifts
+
+`<= >= < >'
+ comparison
+
+`== !='
+ equality and inequality
+
+`&'
+ bitwise AND
+
+`^'
+ bitwise exclusive OR
+
+`|'
+ bitwise OR
+
+`&&'
+ logical AND
+
+`||'
+ logical OR
+
+`expr ? expr : expr'
+ conditional operator
+
+`= *= /= %= += -= <<= >>= &= ^= |='
+ assignment
+
+`expr1 , expr2'
+ comma
+
+ Shell variables are allowed as operands; parameter expansion is
+performed before the expression is evaluated. Within an expression,
+shell variables may also be referenced by name without using the
+parameter expansion syntax. A shell variable that is null or unset
+evaluates to 0 when referenced by name without using the parameter
+expansion syntax. The value of a variable is evaluated as an
+arithmetic expression when it is referenced, or when a variable which
+has been given the INTEGER attribute using `declare -i' is assigned a
+value. A null value evaluates to 0. A shell variable need not have
+its integer attribute turned on to be used in an expression.
+
+ Constants with a leading 0 are interpreted as octal numbers. A
+leading `0x' or `0X' denotes hexadecimal. Otherwise, numbers take the
+form [BASE`#']N, where BASE is a decimal number between 2 and 64
+representing the arithmetic base, and N is a number in that base. If
+BASE`#' is omitted, then base 10 is used. The digits greater than 9
+are represented by the lowercase letters, the uppercase letters, `@',
+and `_', in that order. If BASE is less than or equal to 36, lowercase
+and uppercase letters may be used interchangeably to represent numbers
+between 10 and 35.
+
+ Operators are evaluated in order of precedence. Sub-expressions in
+parentheses are evaluated first and may override the precedence rules
+above.
+
+
+File: bashref.info, Node: Aliases, Next: Arrays, Prev: Shell Arithmetic, Up: Bash Features
+
+6.6 Aliases
+===========
+
+ALIASES allow a string to be substituted for a word when it is used as
+the first word of a simple command. The shell maintains a list of
+aliases that may be set and unset with the `alias' and `unalias'
+builtin commands.
+
+ The first word of each simple command, if unquoted, is checked to see
+if it has an alias. If so, that word is replaced by the text of the
+alias. The characters `/', `$', ``', `=' and any of the shell
+metacharacters or quoting characters listed above may not appear in an
+alias name. The replacement text may contain any valid shell input,
+including shell metacharacters. The first word of the replacement text
+is tested for aliases, but a word that is identical to an alias being
+expanded is not expanded a second time. This means that one may alias
+`ls' to `"ls -F"', for instance, and Bash does not try to recursively
+expand the replacement text. If the last character of the alias value
+is a space or tab character, then the next command word following the
+alias is also checked for alias expansion.
+
+ Aliases are created and listed with the `alias' command, and removed
+with the `unalias' command.
+
+ There is no mechanism for using arguments in the replacement text,
+as in `csh'. If arguments are needed, a shell function should be used
+(*note Shell Functions::).
+
+ Aliases are not expanded when the shell is not interactive, unless
+the `expand_aliases' shell option is set using `shopt' (*note The Shopt
+Builtin::).
+
+ The rules concerning the definition and use of aliases are somewhat
+confusing. Bash always reads at least one complete line of input
+before executing any of the commands on that line. Aliases are
+expanded when a command is read, not when it is executed. Therefore, an
+alias definition appearing on the same line as another command does not
+take effect until the next line of input is read. The commands
+following the alias definition on that line are not affected by the new
+alias. This behavior is also an issue when functions are executed.
+Aliases are expanded when a function definition is read, not when the
+function is executed, because a function definition is itself a
+compound command. As a consequence, aliases defined in a function are
+not available until after that function is executed. To be safe,
+always put alias definitions on a separate line, and do not use `alias'
+in compound commands.
+
+ For almost every purpose, shell functions are preferred over aliases.
+
+
+File: bashref.info, Node: Arrays, Next: The Directory Stack, Prev: Aliases, Up: Bash Features
+
+6.7 Arrays
+==========
+
+Bash provides one-dimensional indexed and associative array variables.
+Any variable may be used as an indexed array; the `declare' builtin
+will explicitly declare an array. There is no maximum limit on the
+size of an array, nor any requirement that members be indexed or
+assigned contiguously. Indexed arrays are referenced using integers
+(including arithmetic expressions (*note Shell Arithmetic::) and are
+zero-based; associative arrays use arbitrary strings.
+
+ An indexed array is created automatically if any variable is
+assigned to using the syntax
+ name[SUBSCRIPT]=VALUE
+
+The SUBSCRIPT is treated as an arithmetic expression that must evaluate
+to a number greater than or equal to zero. To explicitly declare an
+array, use
+ declare -a NAME
+ The syntax
+ declare -a NAME[SUBSCRIPT]
+ is also accepted; the SUBSCRIPT is ignored.
+
+ Associative arrays are created using
+ declare -A NAME.
+
+ Attributes may be specified for an array variable using the
+`declare' and `readonly' builtins. Each attribute applies to all
+members of an array.
+
+ Arrays are assigned to using compound assignments of the form
+ name=(value1 ... valueN)
+ where each VALUE is of the form `[SUBSCRIPT]='STRING. Indexed array
+assignments do not require the bracket and subscript. When assigning
+to indexed arrays, if the optional subscript is supplied, that index is
+assigned to; otherwise the index of the element assigned is the last
+index assigned to by the statement plus one. Indexing starts at zero.
+
+ When assigning to an associative array, the subscript is required.
+
+ This syntax is also accepted by the `declare' builtin. Individual
+array elements may be assigned to using the `name['SUBSCRIPT`]='VALUE
+syntax introduced above.
+
+ Any element of an array may be referenced using
+`${name['SUBSCRIPT`]}'. The braces are required to avoid conflicts
+with the shell's filename expansion operators. If the SUBSCRIPT is `@'
+or `*', the word expands to all members of the array NAME. These
+subscripts differ only when the word appears within double quotes. If
+the word is double-quoted, `${name[*]}' expands to a single word with
+the value of each array member separated by the first character of the
+`IFS' variable, and `${name[@]}' expands each element of NAME to a
+separate word. When there are no array members, `${name[@]}' expands
+to nothing. If the double-quoted expansion occurs within a word, the
+expansion of the first parameter is joined with the beginning part of
+the original word, and the expansion of the last parameter is joined
+with the last part of the original word. This is analogous to the
+expansion of the special parameters `@' and `*'.
+`${#name['SUBSCRIPT`]}' expands to the length of `${name['SUBSCRIPT`]}'.
+If SUBSCRIPT is `@' or `*', the expansion is the number of elements in
+the array. Referencing an array variable without a subscript is
+equivalent to referencing with a subscript of 0.
+
+ An array variable is considered set if a subscript has been assigned
+a value. The null string is a valid value.
+
+ The `unset' builtin is used to destroy arrays. `unset'
+NAME[SUBSCRIPT] destroys the array element at index SUBSCRIPT. Care
+must be taken to avoid unwanted side effects caused by filename
+expansion. `unset' NAME, where NAME is an array, removes the entire
+array. A subscript of `*' or `@' also removes the entire array.
+
+ The `declare', `local', and `readonly' builtins each accept a `-a'
+option to specify an indexed array and a `-A' option to specify an
+associative array. The `read' builtin accepts a `-a' option to assign
+a list of words read from the standard input to an array, and can read
+values from the standard input into individual array elements. The
+`set' and `declare' builtins display array values in a way that allows
+them to be reused as input.
+
+
+File: bashref.info, Node: The Directory Stack, Next: Printing a Prompt, Prev: Arrays, Up: Bash Features
+
+6.8 The Directory Stack
+=======================
+
+* Menu:
+
+* Directory Stack Builtins:: Bash builtin commands to manipulate
+ the directory stack.
+
+ The directory stack is a list of recently-visited directories. The
+`pushd' builtin adds directories to the stack as it changes the current
+directory, and the `popd' builtin removes specified directories from
+the stack and changes the current directory to the directory removed.
+The `dirs' builtin displays the contents of the directory stack.
+
+ The contents of the directory stack are also visible as the value of
+the `DIRSTACK' shell variable.
+
+
+File: bashref.info, Node: Directory Stack Builtins, Up: The Directory Stack
+
+6.8.1 Directory Stack Builtins
+------------------------------
+
+`dirs'
+ dirs [+N | -N] [-clpv]
+ Display the list of currently remembered directories. Directories
+ are added to the list with the `pushd' command; the `popd' command
+ removes directories from the list.
+ `+N'
+ Displays the Nth directory (counting from the left of the
+ list printed by `dirs' when invoked without options), starting
+ with zero.
+
+ `-N'
+ Displays the Nth directory (counting from the right of the
+ list printed by `dirs' when invoked without options), starting
+ with zero.
+
+ `-c'
+ Clears the directory stack by deleting all of the elements.
+
+ `-l'
+ Produces a longer listing; the default listing format uses a
+ tilde to denote the home directory.
+
+ `-p'
+ Causes `dirs' to print the directory stack with one entry per
+ line.
+
+ `-v'
+ Causes `dirs' to print the directory stack with one entry per
+ line, prefixing each entry with its index in the stack.
+
+`popd'
+ popd [+N | -N] [-n]
+
+ Remove the top entry from the directory stack, and `cd' to the new
+ top directory. When no arguments are given, `popd' removes the
+ top directory from the stack and performs a `cd' to the new top
+ directory. The elements are numbered from 0 starting at the first
+ directory listed with `dirs'; i.e., `popd' is equivalent to `popd
+ +0'.
+ `+N'
+ Removes the Nth directory (counting from the left of the list
+ printed by `dirs'), starting with zero.
+
+ `-N'
+ Removes the Nth directory (counting from the right of the
+ list printed by `dirs'), starting with zero.
+
+ `-n'
+ Suppresses the normal change of directory when removing
+ directories from the stack, so that only the stack is
+ manipulated.
+
+`pushd'
+ pushd [-n] [+N | -N | DIR ]
+
+ Save the current directory on the top of the directory stack and
+ then `cd' to DIR. With no arguments, `pushd' exchanges the top
+ two directories.
+
+ `-n'
+ Suppresses the normal change of directory when adding
+ directories to the stack, so that only the stack is
+ manipulated.
+
+ `+N'
+ Brings the Nth directory (counting from the left of the list
+ printed by `dirs', starting with zero) to the top of the list
+ by rotating the stack.
+
+ `-N'
+ Brings the Nth directory (counting from the right of the list
+ printed by `dirs', starting with zero) to the top of the list
+ by rotating the stack.
+
+ `DIR'
+ Makes the current working directory be the top of the stack,
+ and then executes the equivalent of ``cd' DIR'. `cd's to DIR.
+
+
+
+File: bashref.info, Node: Printing a Prompt, Next: The Restricted Shell, Prev: The Directory Stack, Up: Bash Features
+
+6.9 Controlling the Prompt
+==========================
+
+The value of the variable `PROMPT_COMMAND' is examined just before Bash
+prints each primary prompt. If `PROMPT_COMMAND' is set and has a
+non-null value, then the value is executed just as if it had been typed
+on the command line.
+
+ In addition, the following table describes the special characters
+which can appear in the prompt variables:
+
+`\a'
+ A bell character.
+
+`\d'
+ The date, in "Weekday Month Date" format (e.g., "Tue May 26").
+
+`\D{FORMAT}'
+ The FORMAT is passed to `strftime'(3) and the result is inserted
+ into the prompt string; an empty FORMAT results in a
+ locale-specific time representation. The braces are required.
+
+`\e'
+ An escape character.
+
+`\h'
+ The hostname, up to the first `.'.
+
+`\H'
+ The hostname.
+
+`\j'
+ The number of jobs currently managed by the shell.
+
+`\l'
+ The basename of the shell's terminal device name.
+
+`\n'
+ A newline.
+
+`\r'
+ A carriage return.
+
+`\s'
+ The name of the shell, the basename of `$0' (the portion following
+ the final slash).
+
+`\t'
+ The time, in 24-hour HH:MM:SS format.
+
+`\T'
+ The time, in 12-hour HH:MM:SS format.
+
+`\@'
+ The time, in 12-hour am/pm format.
+
+`\A'
+ The time, in 24-hour HH:MM format.
+
+`\u'
+ The username of the current user.
+
+`\v'
+ The version of Bash (e.g., 2.00)
+
+`\V'
+ The release of Bash, version + patchlevel (e.g., 2.00.0)
+
+`\w'
+ The current working directory, with `$HOME' abbreviated with a
+ tilde (uses the `$PROMPT_DIRTRIM' variable).
+
+`\W'
+ The basename of `$PWD', with `$HOME' abbreviated with a tilde.
+
+`\!'
+ The history number of this command.
+
+`\#'
+ The command number of this command.
+
+`\$'
+ If the effective uid is 0, `#', otherwise `$'.
+
+`\NNN'
+ The character whose ASCII code is the octal value NNN.
+
+`\\'
+ A backslash.
+
+`\['
+ Begin a sequence of non-printing characters. This could be used to
+ embed a terminal control sequence into the prompt.
+
+`\]'
+ End a sequence of non-printing characters.
+
+ The command number and the history number are usually different: the
+history number of a command is its position in the history list, which
+may include commands restored from the history file (*note Bash History
+Facilities::), while the command number is the position in the sequence
+of commands executed during the current shell session.
+
+ After the string is decoded, it is expanded via parameter expansion,
+command substitution, arithmetic expansion, and quote removal, subject
+to the value of the `promptvars' shell option (*note Bash Builtins::).
+
+
+File: bashref.info, Node: The Restricted Shell, Next: Bash POSIX Mode, Prev: Printing a Prompt, Up: Bash Features
+
+6.10 The Restricted Shell
+=========================
+
+If Bash is started with the name `rbash', or the `--restricted' or `-r'
+option is supplied at invocation, the shell becomes restricted. A
+restricted shell is used to set up an environment more controlled than
+the standard shell. A restricted shell behaves identically to `bash'
+with the exception that the following are disallowed or not performed:
+
+ * Changing directories with the `cd' builtin.
+
+ * Setting or unsetting the values of the `SHELL', `PATH', `ENV', or
+ `BASH_ENV' variables.
+
+ * Specifying command names containing slashes.
+
+ * Specifying a filename containing a slash as an argument to the `.'
+ builtin command.
+
+ * Specifying a filename containing a slash as an argument to the `-p'
+ option to the `hash' builtin command.
+
+ * Importing function definitions from the shell environment at
+ startup.
+
+ * Parsing the value of `SHELLOPTS' from the shell environment at
+ startup.
+
+ * Redirecting output using the `>', `>|', `<>', `>&', `&>', and `>>'
+ redirection operators.
+
+ * Using the `exec' builtin to replace the shell with another command.
+
+ * Adding or deleting builtin commands with the `-f' and `-d' options
+ to the `enable' builtin.
+
+ * Using the `enable' builtin command to enable disabled shell
+ builtins.
+
+ * Specifying the `-p' option to the `command' builtin.
+
+ * Turning off restricted mode with `set +r' or `set +o restricted'.
+
+ These restrictions are enforced after any startup files are read.
+
+ When a command that is found to be a shell script is executed (*note
+Shell Scripts::), `rbash' turns off any restrictions in the shell
+spawned to execute the script.
+
+
+File: bashref.info, Node: Bash POSIX Mode, Prev: The Restricted Shell, Up: Bash Features
+
+6.11 Bash POSIX Mode
+====================
+
+Starting Bash with the `--posix' command-line option or executing `set
+-o posix' while Bash is running will cause Bash to conform more closely
+to the POSIX standard by changing the behavior to match that specified
+by POSIX in areas where the Bash default differs.
+
+ When invoked as `sh', Bash enters POSIX mode after reading the
+startup files.
+
+ The following list is what's changed when `POSIX mode' is in effect:
+
+ 1. When a command in the hash table no longer exists, Bash will
+ re-search `$PATH' to find the new location. This is also
+ available with `shopt -s checkhash'.
+
+ 2. The message printed by the job control code and builtins when a job
+ exits with a non-zero status is `Done(status)'.
+
+ 3. The message printed by the job control code and builtins when a job
+ is stopped is `Stopped(SIGNAME)', where SIGNAME is, for example,
+ `SIGTSTP'.
+
+ 4. The `bg' builtin uses the required format to describe each job
+ placed in the background, which does not include an indication of
+ whether the job is the current or previous job.
+
+ 5. Reserved words appearing in a context where reserved words are
+ recognized do not undergo alias expansion.
+
+ 6. The POSIX `PS1' and `PS2' expansions of `!' to the history number
+ and `!!' to `!' are enabled, and parameter expansion is performed
+ on the values of `PS1' and `PS2' regardless of the setting of the
+ `promptvars' option.
+
+ 7. The POSIX startup files are executed (`$ENV') rather than the
+ normal Bash files.
+
+ 8. Tilde expansion is only performed on assignments preceding a
+ command name, rather than on all assignment statements on the line.
+
+ 9. The default history file is `~/.sh_history' (this is the default
+ value of `$HISTFILE').
+
+ 10. The output of `kill -l' prints all the signal names on a single
+ line, separated by spaces, without the `SIG' prefix.
+
+ 11. The `kill' builtin does not accept signal names with a `SIG'
+ prefix.
+
+ 12. Non-interactive shells exit if FILENAME in `.' FILENAME is not
+ found.
+
+ 13. Non-interactive shells exit if a syntax error in an arithmetic
+ expansion results in an invalid expression.
+
+ 14. Redirection operators do not perform filename expansion on the word
+ in the redirection unless the shell is interactive.
+
+ 15. Redirection operators do not perform word splitting on the word in
+ the redirection.
+
+ 16. Function names must be valid shell `name's. That is, they may not
+ contain characters other than letters, digits, and underscores, and
+ may not start with a digit. Declaring a function with an invalid
+ name causes a fatal syntax error in non-interactive shells.
+
+ 17. POSIX special builtins are found before shell functions during
+ command lookup.
+
+ 18. If a POSIX special builtin returns an error status, a
+ non-interactive shell exits. The fatal errors are those listed in
+ the POSIX standard, and include things like passing incorrect
+ options, redirection errors, variable assignment errors for
+ assignments preceding the command name, and so on.
+
+ 19. If `CDPATH' is set, the `cd' builtin will not implicitly append
+ the current directory to it. This means that `cd' will fail if no
+ valid directory name can be constructed from any of the entries in
+ `$CDPATH', even if the a directory with the same name as the name
+ given as an argument to `cd' exists in the current directory.
+
+ 20. A non-interactive shell exits with an error status if a variable
+ assignment error occurs when no command name follows the assignment
+ statements. A variable assignment error occurs, for example, when
+ trying to assign a value to a readonly variable.
+
+ 21. A non-interactive shell exits with an error status if the iteration
+ variable in a `for' statement or the selection variable in a
+ `select' statement is a readonly variable.
+
+ 22. Process substitution is not available.
+
+ 23. Assignment statements preceding POSIX special builtins persist in
+ the shell environment after the builtin completes.
+
+ 24. Assignment statements preceding shell function calls persist in the
+ shell environment after the function returns, as if a POSIX
+ special builtin command had been executed.
+
+ 25. The `export' and `readonly' builtin commands display their output
+ in the format required by POSIX.
+
+ 26. The `trap' builtin displays signal names without the leading `SIG'.
+
+ 27. The `trap' builtin doesn't check the first argument for a possible
+ signal specification and revert the signal handling to the original
+ disposition if it is, unless that argument consists solely of
+ digits and is a valid signal number. If users want to reset the
+ handler for a given signal to the original disposition, they
+ should use `-' as the first argument.
+
+ 28. The `.' and `source' builtins do not search the current directory
+ for the filename argument if it is not found by searching `PATH'.
+
+ 29. Subshells spawned to execute command substitutions inherit the
+ value of the `-e' option from the parent shell. When not in POSIX
+ mode, Bash clears the `-e' option in such subshells.
+
+ 30. Alias expansion is always enabled, even in non-interactive shells.
+
+ 31. When the `alias' builtin displays alias definitions, it does not
+ display them with a leading `alias ' unless the `-p' option is
+ supplied.
+
+ 32. When the `set' builtin is invoked without options, it does not
+ display shell function names and definitions.
+
+ 33. When the `set' builtin is invoked without options, it displays
+ variable values without quotes, unless they contain shell
+ metacharacters, even if the result contains nonprinting characters.
+
+ 34. When the `cd' builtin is invoked in LOGICAL mode, and the pathname
+ constructed from `$PWD' and the directory name supplied as an
+ argument does not refer to an existing directory, `cd' will fail
+ instead of falling back to PHYSICAL mode.
+
+ 35. When the `pwd' builtin is supplied the `-P' option, it resets
+ `$PWD' to a pathname containing no symlinks.
+
+ 36. The `pwd' builtin verifies that the value it prints is the same as
+ the current directory, even if it is not asked to check the file
+ system with the `-P' option.
+
+ 37. When listing the history, the `fc' builtin does not include an
+ indication of whether or not a history entry has been modified.
+
+ 38. The default editor used by `fc' is `ed'.
+
+ 39. The `type' and `command' builtins will not report a non-executable
+ file as having been found, though the shell will attempt to
+ execute such a file if it is the only so-named file found in
+ `$PATH'.
+
+ 40. The `vi' editing mode will invoke the `vi' editor directly when
+ the `v' command is run, instead of checking `$VISUAL' and
+ `$EDITOR'.
+
+ 41. When the `xpg_echo' option is enabled, Bash does not attempt to
+ interpret any arguments to `echo' as options. Each argument is
+ displayed, after escape characters are converted.
+
+ 42. The `ulimit' builtin uses a block size of 512 bytes for the `-c'
+ and `-f' options.
+
+ 43. The arrival of `SIGCHLD' when a trap is set on `SIGCHLD' does not
+ interrupt the `wait' builtin and cause it to return immediately.
+ The trap command is run once for each child that exits.
+
+
+ There is other POSIX behavior that Bash does not implement by
+default even when in POSIX mode. Specifically:
+
+ 1. The `fc' builtin checks `$EDITOR' as a program to edit history
+ entries if `FCEDIT' is unset, rather than defaulting directly to
+ `ed'. `fc' uses `ed' if `EDITOR' is unset.
+
+ 2. As noted above, Bash requires the `xpg_echo' option to be enabled
+ for the `echo' builtin to be fully conformant.
+
+
+ Bash can be configured to be POSIX-conformant by default, by
+specifying the `--enable-strict-posix-default' to `configure' when
+building (*note Optional Features::).
+
+
+File: bashref.info, Node: Job Control, Next: Command Line Editing, Prev: Bash Features, Up: Top
+
+7 Job Control
+*************
+
+This chapter discusses what job control is, how it works, and how Bash
+allows you to access its facilities.
+
+* Menu:
+
+* Job Control Basics:: How job control works.
+* Job Control Builtins:: Bash builtin commands used to interact
+ with job control.
+* Job Control Variables:: Variables Bash uses to customize job
+ control.
+
+
+File: bashref.info, Node: Job Control Basics, Next: Job Control Builtins, Up: Job Control
+
+7.1 Job Control Basics
+======================
+
+Job control refers to the ability to selectively stop (suspend) the
+execution of processes and continue (resume) their execution at a later
+point. A user typically employs this facility via an interactive
+interface supplied jointly by the operating system kernel's terminal
+driver and Bash.
+
+ The shell associates a JOB with each pipeline. It keeps a table of
+currently executing jobs, which may be listed with the `jobs' command.
+When Bash starts a job asynchronously, it prints a line that looks like:
+ [1] 25647
+ indicating that this job is job number 1 and that the process ID of
+the last process in the pipeline associated with this job is 25647.
+All of the processes in a single pipeline are members of the same job.
+Bash uses the JOB abstraction as the basis for job control.
+
+ To facilitate the implementation of the user interface to job
+control, the operating system maintains the notion of a current terminal
+process group ID. Members of this process group (processes whose
+process group ID is equal to the current terminal process group ID)
+receive keyboard-generated signals such as `SIGINT'. These processes
+are said to be in the foreground. Background processes are those whose
+process group ID differs from the terminal's; such processes are immune
+to keyboard-generated signals. Only foreground processes are allowed
+to read from or, if the user so specifies with `stty tostop', write to
+the terminal. Background processes which attempt to read from (write
+to when `stty tostop' is in effect) the terminal are sent a `SIGTTIN'
+(`SIGTTOU') signal by the kernel's terminal driver, which, unless
+caught, suspends the process.
+
+ If the operating system on which Bash is running supports job
+control, Bash contains facilities to use it. Typing the SUSPEND
+character (typically `^Z', Control-Z) while a process is running causes
+that process to be stopped and returns control to Bash. Typing the
+DELAYED SUSPEND character (typically `^Y', Control-Y) causes the
+process to be stopped when it attempts to read input from the terminal,
+and control to be returned to Bash. The user then manipulates the
+state of this job, using the `bg' command to continue it in the
+background, the `fg' command to continue it in the foreground, or the
+`kill' command to kill it. A `^Z' takes effect immediately, and has
+the additional side effect of causing pending output and typeahead to
+be discarded.
+
+ There are a number of ways to refer to a job in the shell. The
+character `%' introduces a job specification (JOBSPEC).
+
+ Job number `n' may be referred to as `%n'. The symbols `%%' and
+`%+' refer to the shell's notion of the current job, which is the last
+job stopped while it was in the foreground or started in the background.
+A single `%' (with no accompanying job specification) also refers to
+the current job. The previous job may be referenced using `%-'. If
+there is only a single job, `%+' and `%-' can both be used to refer to
+that job. In output pertaining to jobs (e.g., the output of the `jobs'
+command), the current job is always flagged with a `+', and the
+previous job with a `-'.
+
+ A job may also be referred to using a prefix of the name used to
+start it, or using a substring that appears in its command line. For
+example, `%ce' refers to a stopped `ce' job. Using `%?ce', on the other
+hand, refers to any job containing the string `ce' in its command line.
+If the prefix or substring matches more than one job, Bash reports an
+error.
+
+ Simply naming a job can be used to bring it into the foreground:
+`%1' is a synonym for `fg %1', bringing job 1 from the background into
+the foreground. Similarly, `%1 &' resumes job 1 in the background,
+equivalent to `bg %1'
+
+ The shell learns immediately whenever a job changes state.
+Normally, Bash waits until it is about to print a prompt before
+reporting changes in a job's status so as to not interrupt any other
+output. If the `-b' option to the `set' builtin is enabled, Bash
+reports such changes immediately (*note The Set Builtin::). Any trap
+on `SIGCHLD' is executed for each child process that exits.
+
+ If an attempt to exit Bash is made while jobs are stopped, (or
+running, if the `checkjobs' option is enabled - see *note The Shopt
+Builtin::), the shell prints a warning message, and if the `checkjobs'
+option is enabled, lists the jobs and their statuses. The `jobs'
+command may then be used to inspect their status. If a second attempt
+to exit is made without an intervening command, Bash does not print
+another warning, and any stopped jobs are terminated.
+
+
+File: bashref.info, Node: Job Control Builtins, Next: Job Control Variables, Prev: Job Control Basics, Up: Job Control
+
+7.2 Job Control Builtins
+========================
+
+`bg'
+ bg [JOBSPEC ...]
+ Resume each suspended job JOBSPEC in the background, as if it had
+ been started with `&'. If JOBSPEC is not supplied, the current
+ job is used. The return status is zero unless it is run when job
+ control is not enabled, or, when run with job control enabled, any
+ JOBSPEC was not found or specifies a job that was started without
+ job control.
+
+`fg'
+ fg [JOBSPEC]
+ Resume the job JOBSPEC in the foreground and make it the current
+ job. If JOBSPEC is not supplied, the current job is used. The
+ return status is that of the command placed into the foreground,
+ or non-zero if run when job control is disabled or, when run with
+ job control enabled, JOBSPEC does not specify a valid job or
+ JOBSPEC specifies a job that was started without job control.
+
+`jobs'
+ jobs [-lnprs] [JOBSPEC]
+ jobs -x COMMAND [ARGUMENTS]
+
+ The first form lists the active jobs. The options have the
+ following meanings:
+
+ `-l'
+ List process IDs in addition to the normal information.
+
+ `-n'
+ Display information only about jobs that have changed status
+ since the user was last notified of their status.
+
+ `-p'
+ List only the process ID of the job's process group leader.
+
+ `-r'
+ Restrict output to running jobs.
+
+ `-s'
+ Restrict output to stopped jobs.
+
+ If JOBSPEC is given, output is restricted to information about
+ that job. If JOBSPEC is not supplied, the status of all jobs is
+ listed.
+
+ If the `-x' option is supplied, `jobs' replaces any JOBSPEC found
+ in COMMAND or ARGUMENTS with the corresponding process group ID,
+ and executes COMMAND, passing it ARGUMENTs, returning its exit
+ status.
+
+`kill'
+ kill [-s SIGSPEC] [-n SIGNUM] [-SIGSPEC] JOBSPEC or PID
+ kill -l [EXIT_STATUS]
+ Send a signal specified by SIGSPEC or SIGNUM to the process named
+ by job specification JOBSPEC or process ID PID. SIGSPEC is either
+ a case-insensitive signal name such as `SIGINT' (with or without
+ the `SIG' prefix) or a signal number; SIGNUM is a signal number.
+ If SIGSPEC and SIGNUM are not present, `SIGTERM' is used. The
+ `-l' option lists the signal names. If any arguments are supplied
+ when `-l' is given, the names of the signals corresponding to the
+ arguments are listed, and the return status is zero. EXIT_STATUS
+ is a number specifying a signal number or the exit status of a
+ process terminated by a signal. The return status is zero if at
+ least one signal was successfully sent, or non-zero if an error
+ occurs or an invalid option is encountered.
+
+`wait'
+ wait [JOBSPEC or PID ...]
+ Wait until the child process specified by each process ID PID or
+ job specification JOBSPEC exits and return the exit status of the
+ last command waited for. If a job spec is given, all processes in
+ the job are waited for. If no arguments are given, all currently
+ active child processes are waited for, and the return status is
+ zero. If neither JOBSPEC nor PID specifies an active child process
+ of the shell, the return status is 127.
+
+`disown'
+ disown [-ar] [-h] [JOBSPEC ...]
+ Without options, each JOBSPEC is removed from the table of active
+ jobs. If the `-h' option is given, the job is not removed from
+ the table, but is marked so that `SIGHUP' is not sent to the job
+ if the shell receives a `SIGHUP'. If JOBSPEC is not present, and
+ neither the `-a' nor `-r' option is supplied, the current job is
+ used. If no JOBSPEC is supplied, the `-a' option means to remove
+ or mark all jobs; the `-r' option without a JOBSPEC argument
+ restricts operation to running jobs.
+
+`suspend'
+ suspend [-f]
+ Suspend the execution of this shell until it receives a `SIGCONT'
+ signal. A login shell cannot be suspended; the `-f' option can be
+ used to override this and force the suspension.
+
+
+ When job control is not active, the `kill' and `wait' builtins do
+not accept JOBSPEC arguments. They must be supplied process IDs.
+
+
+File: bashref.info, Node: Job Control Variables, Prev: Job Control Builtins, Up: Job Control
+
+7.3 Job Control Variables
+=========================
+
+`auto_resume'
+ This variable controls how the shell interacts with the user and
+ job control. If this variable exists then single word simple
+ commands without redirections are treated as candidates for
+ resumption of an existing job. There is no ambiguity allowed; if
+ there is more than one job beginning with the string typed, then
+ the most recently accessed job will be selected. The name of a
+ stopped job, in this context, is the command line used to start
+ it. If this variable is set to the value `exact', the string
+ supplied must match the name of a stopped job exactly; if set to
+ `substring', the string supplied needs to match a substring of the
+ name of a stopped job. The `substring' value provides
+ functionality analogous to the `%?' job ID (*note Job Control
+ Basics::). If set to any other value, the supplied string must be
+ a prefix of a stopped job's name; this provides functionality
+ analogous to the `%' job ID.
+
+
+
+File: bashref.info, Node: Command Line Editing, Next: Using History Interactively, Prev: Job Control, Up: Top
+
+8 Command Line Editing
+**********************
+
+This chapter describes the basic features of the GNU command line
+editing interface. Command line editing is provided by the Readline
+library, which is used by several different programs, including Bash.
+Command line editing is enabled by default when using an interactive
+shell, unless the `--noediting' option is supplied at shell invocation.
+Line editing is also used when using the `-e' option to the `read'
+builtin command (*note Bash Builtins::). By default, the line editing
+commands are similar to those of emacs. A vi-style line editing
+interface is also available. Line editing can be enabled at any time
+using the `-o emacs' or `-o vi' options to the `set' builtin command
+(*note The Set Builtin::), or disabled using the `+o emacs' or `+o vi'
+options to `set'.
+
+* Menu:
+
+* Introduction and Notation:: Notation used in this text.
+* Readline Interaction:: The minimum set of commands for editing a line.
+* Readline Init File:: Customizing Readline from a user's view.
+* Bindable Readline Commands:: A description of most of the Readline commands
+ available for binding
+* Readline vi Mode:: A short description of how to make Readline
+ behave like the vi editor.
+
+* Programmable Completion:: How to specify the possible completions for
+ a specific command.
+* Programmable Completion Builtins:: Builtin commands to specify how to
+ complete arguments for a particular command.
+
+
+File: bashref.info, Node: Introduction and Notation, Next: Readline Interaction, Up: Command Line Editing
+
+8.1 Introduction to Line Editing
+================================
+
+The following paragraphs describe the notation used to represent
+keystrokes.
+
+ The text `C-k' is read as `Control-K' and describes the character
+produced when the <k> key is pressed while the Control key is depressed.
+
+ The text `M-k' is read as `Meta-K' and describes the character
+produced when the Meta key (if you have one) is depressed, and the <k>
+key is pressed. The Meta key is labeled <ALT> on many keyboards. On
+keyboards with two keys labeled <ALT> (usually to either side of the
+space bar), the <ALT> on the left side is generally set to work as a
+Meta key. The <ALT> key on the right may also be configured to work as
+a Meta key or may be configured as some other modifier, such as a
+Compose key for typing accented characters.
+
+ If you do not have a Meta or <ALT> key, or another key working as a
+Meta key, the identical keystroke can be generated by typing <ESC>
+_first_, and then typing <k>. Either process is known as "metafying"
+the <k> key.
+
+ The text `M-C-k' is read as `Meta-Control-k' and describes the
+character produced by "metafying" `C-k'.
+
+ In addition, several keys have their own names. Specifically,
+<DEL>, <ESC>, <LFD>, <SPC>, <RET>, and <TAB> all stand for themselves
+when seen in this text, or in an init file (*note Readline Init File::).
+If your keyboard lacks a <LFD> key, typing <C-j> will produce the
+desired character. The <RET> key may be labeled <Return> or <Enter> on
+some keyboards.
+
+
+File: bashref.info, Node: Readline Interaction, Next: Readline Init File, Prev: Introduction and Notation, Up: Command Line Editing
+
+8.2 Readline Interaction
+========================
+
+Often during an interactive session you type in a long line of text,
+only to notice that the first word on the line is misspelled. The
+Readline library gives you a set of commands for manipulating the text
+as you type it in, allowing you to just fix your typo, and not forcing
+you to retype the majority of the line. Using these editing commands,
+you move the cursor to the place that needs correction, and delete or
+insert the text of the corrections. Then, when you are satisfied with
+the line, you simply press <RET>. You do not have to be at the end of
+the line to press <RET>; the entire line is accepted regardless of the
+location of the cursor within the line.
+
+* Menu:
+
+* Readline Bare Essentials:: The least you need to know about Readline.
+* Readline Movement Commands:: Moving about the input line.
+* Readline Killing Commands:: How to delete text, and how to get it back!
+* Readline Arguments:: Giving numeric arguments to commands.
+* Searching:: Searching through previous lines.
+
+
+File: bashref.info, Node: Readline Bare Essentials, Next: Readline Movement Commands, Up: Readline Interaction
+
+8.2.1 Readline Bare Essentials
+------------------------------
+
+In order to enter characters into the line, simply type them. The typed
+character appears where the cursor was, and then the cursor moves one
+space to the right. If you mistype a character, you can use your erase
+character to back up and delete the mistyped character.
+
+ Sometimes you may mistype a character, and not notice the error
+until you have typed several other characters. In that case, you can
+type `C-b' to move the cursor to the left, and then correct your
+mistake. Afterwards, you can move the cursor to the right with `C-f'.
+
+ When you add text in the middle of a line, you will notice that
+characters to the right of the cursor are `pushed over' to make room
+for the text that you have inserted. Likewise, when you delete text
+behind the cursor, characters to the right of the cursor are `pulled
+back' to fill in the blank space created by the removal of the text. A
+list of the bare essentials for editing the text of an input line
+follows.
+
+`C-b'
+ Move back one character.
+
+`C-f'
+ Move forward one character.
+
+<DEL> or <Backspace>
+ Delete the character to the left of the cursor.
+
+`C-d'
+ Delete the character underneath the cursor.
+
+Printing characters
+ Insert the character into the line at the cursor.
+
+`C-_' or `C-x C-u'
+ Undo the last editing command. You can undo all the way back to an
+ empty line.
+
+(Depending on your configuration, the <Backspace> key be set to delete
+the character to the left of the cursor and the <DEL> key set to delete
+the character underneath the cursor, like `C-d', rather than the
+character to the left of the cursor.)
+
+
+File: bashref.info, Node: Readline Movement Commands, Next: Readline Killing Commands, Prev: Readline Bare Essentials, Up: Readline Interaction
+
+8.2.2 Readline Movement Commands
+--------------------------------
+
+The above table describes the most basic keystrokes that you need in
+order to do editing of the input line. For your convenience, many
+other commands have been added in addition to `C-b', `C-f', `C-d', and
+<DEL>. Here are some commands for moving more rapidly about the line.
+
+`C-a'
+ Move to the start of the line.
+
+`C-e'
+ Move to the end of the line.
+
+`M-f'
+ Move forward a word, where a word is composed of letters and
+ digits.
+
+`M-b'
+ Move backward a word.
+
+`C-l'
+ Clear the screen, reprinting the current line at the top.
+
+ Notice how `C-f' moves forward a character, while `M-f' moves
+forward a word. It is a loose convention that control keystrokes
+operate on characters while meta keystrokes operate on words.
+
+
+File: bashref.info, Node: Readline Killing Commands, Next: Readline Arguments, Prev: Readline Movement Commands, Up: Readline Interaction
+
+8.2.3 Readline Killing Commands
+-------------------------------
+
+"Killing" text means to delete the text from the line, but to save it
+away for later use, usually by "yanking" (re-inserting) it back into
+the line. (`Cut' and `paste' are more recent jargon for `kill' and
+`yank'.)
+
+ If the description for a command says that it `kills' text, then you
+can be sure that you can get the text back in a different (or the same)
+place later.
+
+ When you use a kill command, the text is saved in a "kill-ring".
+Any number of consecutive kills save all of the killed text together, so
+that when you yank it back, you get it all. The kill ring is not line
+specific; the text that you killed on a previously typed line is
+available to be yanked back later, when you are typing another line.
+
+ Here is the list of commands for killing text.
+
+`C-k'
+ Kill the text from the current cursor position to the end of the
+ line.
+
+`M-d'
+ Kill from the cursor to the end of the current word, or, if between
+ words, to the end of the next word. Word boundaries are the same
+ as those used by `M-f'.
+
+`M-<DEL>'
+ Kill from the cursor the start of the current word, or, if between
+ words, to the start of the previous word. Word boundaries are the
+ same as those used by `M-b'.
+
+`C-w'
+ Kill from the cursor to the previous whitespace. This is
+ different than `M-<DEL>' because the word boundaries differ.
+
+
+ Here is how to "yank" the text back into the line. Yanking means to
+copy the most-recently-killed text from the kill buffer.
+
+`C-y'
+ Yank the most recently killed text back into the buffer at the
+ cursor.
+
+`M-y'
+ Rotate the kill-ring, and yank the new top. You can only do this
+ if the prior command is `C-y' or `M-y'.
+
+
+File: bashref.info, Node: Readline Arguments, Next: Searching, Prev: Readline Killing Commands, Up: Readline Interaction
+
+8.2.4 Readline Arguments
+------------------------
+
+You can pass numeric arguments to Readline commands. Sometimes the
+argument acts as a repeat count, other times it is the sign of the
+argument that is significant. If you pass a negative argument to a
+command which normally acts in a forward direction, that command will
+act in a backward direction. For example, to kill text back to the
+start of the line, you might type `M-- C-k'.
+
+ The general way to pass numeric arguments to a command is to type
+meta digits before the command. If the first `digit' typed is a minus
+sign (`-'), then the sign of the argument will be negative. Once you
+have typed one meta digit to get the argument started, you can type the
+remainder of the digits, and then the command. For example, to give
+the `C-d' command an argument of 10, you could type `M-1 0 C-d', which
+will delete the next ten characters on the input line.
+
+
+File: bashref.info, Node: Searching, Prev: Readline Arguments, Up: Readline Interaction
+
+8.2.5 Searching for Commands in the History
+-------------------------------------------
+
+Readline provides commands for searching through the command history
+(*note Bash History Facilities::) for lines containing a specified
+string. There are two search modes: "incremental" and
+"non-incremental".
+
+ Incremental searches begin before the user has finished typing the
+search string. As each character of the search string is typed,
+Readline displays the next entry from the history matching the string
+typed so far. An incremental search requires only as many characters
+as needed to find the desired history entry. To search backward in the
+history for a particular string, type `C-r'. Typing `C-s' searches
+forward through the history. The characters present in the value of
+the `isearch-terminators' variable are used to terminate an incremental
+search. If that variable has not been assigned a value, the <ESC> and
+`C-J' characters will terminate an incremental search. `C-g' will
+abort an incremental search and restore the original line. When the
+search is terminated, the history entry containing the search string
+becomes the current line.
+
+ To find other matching entries in the history list, type `C-r' or
+`C-s' as appropriate. This will search backward or forward in the
+history for the next entry matching the search string typed so far.
+Any other key sequence bound to a Readline command will terminate the
+search and execute that command. For instance, a <RET> will terminate
+the search and accept the line, thereby executing the command from the
+history list. A movement command will terminate the search, make the
+last line found the current line, and begin editing.
+
+ Readline remembers the last incremental search string. If two
+`C-r's are typed without any intervening characters defining a new
+search string, any remembered search string is used.
+
+ Non-incremental searches read the entire search string before
+starting to search for matching history lines. The search string may be
+typed by the user or be part of the contents of the current line.
+
+
+File: bashref.info, Node: Readline Init File, Next: Bindable Readline Commands, Prev: Readline Interaction, Up: Command Line Editing
+
+8.3 Readline Init File
+======================
+
+Although the Readline library comes with a set of Emacs-like
+keybindings installed by default, it is possible to use a different set
+of keybindings. Any user can customize programs that use Readline by
+putting commands in an "inputrc" file, conventionally in his home
+directory. The name of this file is taken from the value of the shell
+variable `INPUTRC'. If that variable is unset, the default is
+`~/.inputrc'. If that file does not exist or cannot be read, the
+ultimate default is `/etc/inputrc'.
+
+ When a program which uses the Readline library starts up, the init
+file is read, and the key bindings are set.
+
+ In addition, the `C-x C-r' command re-reads this init file, thus
+incorporating any changes that you might have made to it.
+
+* Menu:
+
+* Readline Init File Syntax:: Syntax for the commands in the inputrc file.
+
+* Conditional Init Constructs:: Conditional key bindings in the inputrc file.
+
+* Sample Init File:: An example inputrc file.
+
+
+File: bashref.info, Node: Readline Init File Syntax, Next: Conditional Init Constructs, Up: Readline Init File
+
+8.3.1 Readline Init File Syntax
+-------------------------------
+
+There are only a few basic constructs allowed in the Readline init
+file. Blank lines are ignored. Lines beginning with a `#' are
+comments. Lines beginning with a `$' indicate conditional constructs
+(*note Conditional Init Constructs::). Other lines denote variable
+settings and key bindings.
+
+Variable Settings
+ You can modify the run-time behavior of Readline by altering the
+ values of variables in Readline using the `set' command within the
+ init file. The syntax is simple:
+
+ set VARIABLE VALUE
+
+ Here, for example, is how to change from the default Emacs-like
+ key binding to use `vi' line editing commands:
+
+ set editing-mode vi
+
+ Variable names and values, where appropriate, are recognized
+ without regard to case. Unrecognized variable names are ignored.
+
+ Boolean variables (those that can be set to on or off) are set to
+ on if the value is null or empty, ON (case-insensitive), or 1.
+ Any other value results in the variable being set to off.
+
+ The `bind -V' command lists the current Readline variable names
+ and values. *Note Bash Builtins::.
+
+ A great deal of run-time behavior is changeable with the following
+ variables.
+
+ `bell-style'
+ Controls what happens when Readline wants to ring the
+ terminal bell. If set to `none', Readline never rings the
+ bell. If set to `visible', Readline uses a visible bell if
+ one is available. If set to `audible' (the default),
+ Readline attempts to ring the terminal's bell.
+
+ `bind-tty-special-chars'
+ If set to `on', Readline attempts to bind the control
+ characters treated specially by the kernel's terminal driver
+ to their Readline equivalents.
+
+ `comment-begin'
+ The string to insert at the beginning of the line when the
+ `insert-comment' command is executed. The default value is
+ `"#"'.
+
+ `completion-ignore-case'
+ If set to `on', Readline performs filename matching and
+ completion in a case-insensitive fashion. The default value
+ is `off'.
+
+ `completion-prefix-display-length'
+ The length in characters of the common prefix of a list of
+ possible completions that is displayed without modification.
+ When set to a value greater than zero, common prefixes longer
+ than this value are replaced with an ellipsis when displaying
+ possible completions.
+
+ `completion-query-items'
+ The number of possible completions that determines when the
+ user is asked whether the list of possibilities should be
+ displayed. If the number of possible completions is greater
+ than this value, Readline will ask the user whether or not he
+ wishes to view them; otherwise, they are simply listed. This
+ variable must be set to an integer value greater than or
+ equal to 0. A negative value means Readline should never ask.
+ The default limit is `100'.
+
+ `convert-meta'
+ If set to `on', Readline will convert characters with the
+ eighth bit set to an ASCII key sequence by stripping the
+ eighth bit and prefixing an <ESC> character, converting them
+ to a meta-prefixed key sequence. The default value is `on'.
+
+ `disable-completion'
+ If set to `On', Readline will inhibit word completion.
+ Completion characters will be inserted into the line as if
+ they had been mapped to `self-insert'. The default is `off'.
+
+ `editing-mode'
+ The `editing-mode' variable controls which default set of key
+ bindings is used. By default, Readline starts up in Emacs
+ editing mode, where the keystrokes are most similar to Emacs.
+ This variable can be set to either `emacs' or `vi'.
+
+ `echo-control-characters'
+ When set to `on', on operating systems that indicate they
+ support it, readline echoes a character corresponding to a
+ signal generated from the keyboard. The default is `on'.
+
+ `enable-keypad'
+ When set to `on', Readline will try to enable the application
+ keypad when it is called. Some systems need this to enable
+ the arrow keys. The default is `off'.
+
+ `enable-meta-key'
+ When set to `on', Readline will try to enable any meta
+ modifier key the terminal claims to support when it is
+ called. On many terminals, the meta key is used to send
+ eight-bit characters. The default is `on'.
+
+ `expand-tilde'
+ If set to `on', tilde expansion is performed when Readline
+ attempts word completion. The default is `off'.
+
+ `history-preserve-point'
+ If set to `on', the history code attempts to place the point
+ (the current cursor position) at the same location on each
+ history line retrieved with `previous-history' or
+ `next-history'. The default is `off'.
+
+ `history-size'
+ Set the maximum number of history entries saved in the
+ history list. If set to zero, the number of entries in the
+ history list is not limited.
+
+ `horizontal-scroll-mode'
+ This variable can be set to either `on' or `off'. Setting it
+ to `on' means that the text of the lines being edited will
+ scroll horizontally on a single screen line when they are
+ longer than the width of the screen, instead of wrapping onto
+ a new screen line. By default, this variable is set to `off'.
+
+ `input-meta'
+ If set to `on', Readline will enable eight-bit input (it will
+ not clear the eighth bit in the characters it reads),
+ regardless of what the terminal claims it can support. The
+ default value is `off'. The name `meta-flag' is a synonym
+ for this variable.
+
+ `isearch-terminators'
+ The string of characters that should terminate an incremental
+ search without subsequently executing the character as a
+ command (*note Searching::). If this variable has not been
+ given a value, the characters <ESC> and `C-J' will terminate
+ an incremental search.
+
+ `keymap'
+ Sets Readline's idea of the current keymap for key binding
+ commands. Acceptable `keymap' names are `emacs',
+ `emacs-standard', `emacs-meta', `emacs-ctlx', `vi', `vi-move',
+ `vi-command', and `vi-insert'. `vi' is equivalent to
+ `vi-command'; `emacs' is equivalent to `emacs-standard'. The
+ default value is `emacs'. The value of the `editing-mode'
+ variable also affects the default keymap.
+
+ `mark-directories'
+ If set to `on', completed directory names have a slash
+ appended. The default is `on'.
+
+ `mark-modified-lines'
+ This variable, when set to `on', causes Readline to display an
+ asterisk (`*') at the start of history lines which have been
+ modified. This variable is `off' by default.
+
+ `mark-symlinked-directories'
+ If set to `on', completed names which are symbolic links to
+ directories have a slash appended (subject to the value of
+ `mark-directories'). The default is `off'.
+
+ `match-hidden-files'
+ This variable, when set to `on', causes Readline to match
+ files whose names begin with a `.' (hidden files) when
+ performing filename completion, unless the leading `.' is
+ supplied by the user in the filename to be completed. This
+ variable is `on' by default.
+
+ `output-meta'
+ If set to `on', Readline will display characters with the
+ eighth bit set directly rather than as a meta-prefixed escape
+ sequence. The default is `off'.
+
+ `page-completions'
+ If set to `on', Readline uses an internal `more'-like pager
+ to display a screenful of possible completions at a time.
+ This variable is `on' by default.
+
+ `print-completions-horizontally'
+ If set to `on', Readline will display completions with matches
+ sorted horizontally in alphabetical order, rather than down
+ the screen. The default is `off'.
+
+ `revert-all-at-newline'
+ If set to `on', Readline will undo all changes to history
+ lines before returning when `accept-line' is executed. By
+ default, history lines may be modified and retain individual
+ undo lists across calls to `readline'. The default is `off'.
+
+ `show-all-if-ambiguous'
+ This alters the default behavior of the completion functions.
+ If set to `on', words which have more than one possible
+ completion cause the matches to be listed immediately instead
+ of ringing the bell. The default value is `off'.
+
+ `show-all-if-unmodified'
+ This alters the default behavior of the completion functions
+ in a fashion similar to SHOW-ALL-IF-AMBIGUOUS. If set to
+ `on', words which have more than one possible completion
+ without any possible partial completion (the possible
+ completions don't share a common prefix) cause the matches to
+ be listed immediately instead of ringing the bell. The
+ default value is `off'.
+
+ `skip-completed-text'
+ If set to `on', this alters the default completion behavior
+ when inserting a single match into the line. It's only
+ active when performing completion in the middle of a word.
+ If enabled, readline does not insert characters from the
+ completion that match characters after point in the word
+ being completed, so portions of the word following the cursor
+ are not duplicated. For instance, if this is enabled,
+ attempting completion when the cursor is after the `e' in
+ `Makefile' will result in `Makefile' rather than
+ `Makefilefile', assuming there is a single possible
+ completion. The default value is `off'.
+
+ `visible-stats'
+ If set to `on', a character denoting a file's type is
+ appended to the filename when listing possible completions.
+ The default is `off'.
+
+
+Key Bindings
+ The syntax for controlling key bindings in the init file is
+ simple. First you need to find the name of the command that you
+ want to change. The following sections contain tables of the
+ command name, the default keybinding, if any, and a short
+ description of what the command does.
+
+ Once you know the name of the command, simply place on a line in
+ the init file the name of the key you wish to bind the command to,
+ a colon, and then the name of the command. There can be no space
+ between the key name and the colon - that will be interpreted as
+ part of the key name. The name of the key can be expressed in
+ different ways, depending on what you find most comfortable.
+
+ In addition to command names, readline allows keys to be bound to
+ a string that is inserted when the key is pressed (a MACRO).
+
+ The `bind -p' command displays Readline function names and
+ bindings in a format that can put directly into an initialization
+ file. *Note Bash Builtins::.
+
+ KEYNAME: FUNCTION-NAME or MACRO
+ KEYNAME is the name of a key spelled out in English. For
+ example:
+ Control-u: universal-argument
+ Meta-Rubout: backward-kill-word
+ Control-o: "> output"
+
+ In the above example, `C-u' is bound to the function
+ `universal-argument', `M-DEL' is bound to the function
+ `backward-kill-word', and `C-o' is bound to run the macro
+ expressed on the right hand side (that is, to insert the text
+ `> output' into the line).
+
+ A number of symbolic character names are recognized while
+ processing this key binding syntax: DEL, ESC, ESCAPE, LFD,
+ NEWLINE, RET, RETURN, RUBOUT, SPACE, SPC, and TAB.
+
+ "KEYSEQ": FUNCTION-NAME or MACRO
+ KEYSEQ differs from KEYNAME above in that strings denoting an
+ entire key sequence can be specified, by placing the key
+ sequence in double quotes. Some GNU Emacs style key escapes
+ can be used, as in the following example, but the special
+ character names are not recognized.
+
+ "\C-u": universal-argument
+ "\C-x\C-r": re-read-init-file
+ "\e[11~": "Function Key 1"
+
+ In the above example, `C-u' is again bound to the function
+ `universal-argument' (just as it was in the first example),
+ `C-x C-r' is bound to the function `re-read-init-file', and
+ `<ESC> <[> <1> <1> <~>' is bound to insert the text `Function
+ Key 1'.
+
+
+ The following GNU Emacs style escape sequences are available when
+ specifying key sequences:
+
+ `\C-'
+ control prefix
+
+ `\M-'
+ meta prefix
+
+ `\e'
+ an escape character
+
+ `\\'
+ backslash
+
+ `\"'
+ <">, a double quotation mark
+
+ `\''
+ <'>, a single quote or apostrophe
+
+ In addition to the GNU Emacs style escape sequences, a second set
+ of backslash escapes is available:
+
+ `\a'
+ alert (bell)
+
+ `\b'
+ backspace
+
+ `\d'
+ delete
+
+ `\f'
+ form feed
+
+ `\n'
+ newline
+
+ `\r'
+ carriage return
+
+ `\t'
+ horizontal tab
+
+ `\v'
+ vertical tab
+
+ `\NNN'
+ the eight-bit character whose value is the octal value NNN
+ (one to three digits)
+
+ `\xHH'
+ the eight-bit character whose value is the hexadecimal value
+ HH (one or two hex digits)
+
+ When entering the text of a macro, single or double quotes must be
+ used to indicate a macro definition. Unquoted text is assumed to
+ be a function name. In the macro body, the backslash escapes
+ described above are expanded. Backslash will quote any other
+ character in the macro text, including `"' and `''. For example,
+ the following binding will make `C-x \' insert a single `\' into
+ the line:
+ "\C-x\\": "\\"
+
+
+
+File: bashref.info, Node: Conditional Init Constructs, Next: Sample Init File, Prev: Readline Init File Syntax, Up: Readline Init File
+
+8.3.2 Conditional Init Constructs
+---------------------------------
+
+Readline implements a facility similar in spirit to the conditional
+compilation features of the C preprocessor which allows key bindings
+and variable settings to be performed as the result of tests. There
+are four parser directives used.
+
+`$if'
+ The `$if' construct allows bindings to be made based on the
+ editing mode, the terminal being used, or the application using
+ Readline. The text of the test extends to the end of the line; no
+ characters are required to isolate it.
+
+ `mode'
+ The `mode=' form of the `$if' directive is used to test
+ whether Readline is in `emacs' or `vi' mode. This may be
+ used in conjunction with the `set keymap' command, for
+ instance, to set bindings in the `emacs-standard' and
+ `emacs-ctlx' keymaps only if Readline is starting out in
+ `emacs' mode.
+
+ `term'
+ The `term=' form may be used to include terminal-specific key
+ bindings, perhaps to bind the key sequences output by the
+ terminal's function keys. The word on the right side of the
+ `=' is tested against both the full name of the terminal and
+ the portion of the terminal name before the first `-'. This
+ allows `sun' to match both `sun' and `sun-cmd', for instance.
+
+ `application'
+ The APPLICATION construct is used to include
+ application-specific settings. Each program using the
+ Readline library sets the APPLICATION NAME, and you can test
+ for a particular value. This could be used to bind key
+ sequences to functions useful for a specific program. For
+ instance, the following command adds a key sequence that
+ quotes the current or previous word in Bash:
+ $if Bash
+ # Quote the current or previous word
+ "\C-xq": "\eb\"\ef\""
+ $endif
+
+`$endif'
+ This command, as seen in the previous example, terminates an `$if'
+ command.
+
+`$else'
+ Commands in this branch of the `$if' directive are executed if the
+ test fails.
+
+`$include'
+ This directive takes a single filename as an argument and reads
+ commands and bindings from that file. For example, the following
+ directive reads from `/etc/inputrc':
+ $include /etc/inputrc
+
+
+File: bashref.info, Node: Sample Init File, Prev: Conditional Init Constructs, Up: Readline Init File
+
+8.3.3 Sample Init File
+----------------------
+
+Here is an example of an INPUTRC file. This illustrates key binding,
+variable assignment, and conditional syntax.
+
+
+ # This file controls the behaviour of line input editing for
+ # programs that use the GNU Readline library. Existing
+ # programs include FTP, Bash, and GDB.
+ #
+ # You can re-read the inputrc file with C-x C-r.
+ # Lines beginning with '#' are comments.
+ #
+ # First, include any systemwide bindings and variable
+ # assignments from /etc/Inputrc
+ $include /etc/Inputrc
+
+ #
+ # Set various bindings for emacs mode.
+
+ set editing-mode emacs
+
+ $if mode=emacs
+
+ Meta-Control-h: backward-kill-word Text after the function name is ignored
+
+ #
+ # Arrow keys in keypad mode
+ #
+ #"\M-OD": backward-char
+ #"\M-OC": forward-char
+ #"\M-OA": previous-history
+ #"\M-OB": next-history
+ #
+ # Arrow keys in ANSI mode
+ #
+ "\M-[D": backward-char
+ "\M-[C": forward-char
+ "\M-[A": previous-history
+ "\M-[B": next-history
+ #
+ # Arrow keys in 8 bit keypad mode
+ #
+ #"\M-\C-OD": backward-char
+ #"\M-\C-OC": forward-char
+ #"\M-\C-OA": previous-history
+ #"\M-\C-OB": next-history
+ #
+ # Arrow keys in 8 bit ANSI mode
+ #
+ #"\M-\C-[D": backward-char
+ #"\M-\C-[C": forward-char
+ #"\M-\C-[A": previous-history
+ #"\M-\C-[B": next-history
+
+ C-q: quoted-insert
+
+ $endif
+
+ # An old-style binding. This happens to be the default.
+ TAB: complete
+
+ # Macros that are convenient for shell interaction
+ $if Bash
+ # edit the path
+ "\C-xp": "PATH=${PATH}\e\C-e\C-a\ef\C-f"
+ # prepare to type a quoted word --
+ # insert open and close double quotes
+ # and move to just after the open quote
+ "\C-x\"": "\"\"\C-b"
+ # insert a backslash (testing backslash escapes
+ # in sequences and macros)
+ "\C-x\\": "\\"
+ # Quote the current or previous word
+ "\C-xq": "\eb\"\ef\""
+ # Add a binding to refresh the line, which is unbound
+ "\C-xr": redraw-current-line
+ # Edit variable on current line.
+ "\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="
+ $endif
+
+ # use a visible bell if one is available
+ set bell-style visible
+
+ # don't strip characters to 7 bits when reading
+ set input-meta on
+
+ # allow iso-latin1 characters to be inserted rather
+ # than converted to prefix-meta sequences
+ set convert-meta off
+
+ # display characters with the eighth bit set directly
+ # rather than as meta-prefixed characters
+ set output-meta on
+
+ # if there are more than 150 possible completions for
+ # a word, ask the user if he wants to see all of them
+ set completion-query-items 150
+
+ # For FTP
+ $if Ftp
+ "\C-xg": "get \M-?"
+ "\C-xt": "put \M-?"
+ "\M-.": yank-last-arg
+ $endif
+
+
+File: bashref.info, Node: Bindable Readline Commands, Next: Readline vi Mode, Prev: Readline Init File, Up: Command Line Editing
+
+8.4 Bindable Readline Commands
+==============================
+
+* Menu:
+
+* Commands For Moving:: Moving about the line.
+* Commands For History:: Getting at previous lines.
+* Commands For Text:: Commands for changing text.
+* Commands For Killing:: Commands for killing and yanking.
+* Numeric Arguments:: Specifying numeric arguments, repeat counts.
+* Commands For Completion:: Getting Readline to do the typing for you.
+* Keyboard Macros:: Saving and re-executing typed characters
+* Miscellaneous Commands:: Other miscellaneous commands.
+
+ This section describes Readline commands that may be bound to key
+sequences. You can list your key bindings by executing `bind -P' or,
+for a more terse format, suitable for an INPUTRC file, `bind -p'.
+(*Note Bash Builtins::.) Command names without an accompanying key
+sequence are unbound by default.
+
+ In the following descriptions, "point" refers to the current cursor
+position, and "mark" refers to a cursor position saved by the
+`set-mark' command. The text between the point and mark is referred to
+as the "region".
+
+
+File: bashref.info, Node: Commands For Moving, Next: Commands For History, Up: Bindable Readline Commands
+
+8.4.1 Commands For Moving
+-------------------------
+
+`beginning-of-line (C-a)'
+ Move to the start of the current line.
+
+`end-of-line (C-e)'
+ Move to the end of the line.
+
+`forward-char (C-f)'
+ Move forward a character.
+
+`backward-char (C-b)'
+ Move back a character.
+
+`forward-word (M-f)'
+ Move forward to the end of the next word. Words are composed of
+ letters and digits.
+
+`backward-word (M-b)'
+ Move back to the start of the current or previous word. Words are
+ composed of letters and digits.
+
+`shell-forward-word ()'
+ Move forward to the end of the next word. Words are delimited by
+ non-quoted shell metacharacters.
+
+`shell-backward-word ()'
+ Move back to the start of the current or previous word. Words are
+ delimited by non-quoted shell metacharacters.
+
+`clear-screen (C-l)'
+ Clear the screen and redraw the current line, leaving the current
+ line at the top of the screen.
+
+`redraw-current-line ()'
+ Refresh the current line. By default, this is unbound.
+
+
+
+File: bashref.info, Node: Commands For History, Next: Commands For Text, Prev: Commands For Moving, Up: Bindable Readline Commands
+
+8.4.2 Commands For Manipulating The History
+-------------------------------------------
+
+`accept-line (Newline or Return)'
+ Accept the line regardless of where the cursor is. If this line is
+ non-empty, add it to the history list according to the setting of
+ the `HISTCONTROL' and `HISTIGNORE' variables. If this line is a
+ modified history line, then restore the history line to its
+ original state.
+
+`previous-history (C-p)'
+ Move `back' through the history list, fetching the previous
+ command.
+
+`next-history (C-n)'
+ Move `forward' through the history list, fetching the next command.
+
+`beginning-of-history (M-<)'
+ Move to the first line in the history.
+
+`end-of-history (M->)'
+ Move to the end of the input history, i.e., the line currently
+ being entered.
+
+`reverse-search-history (C-r)'
+ Search backward starting at the current line and moving `up'
+ through the history as necessary. This is an incremental search.
+
+`forward-search-history (C-s)'
+ Search forward starting at the current line and moving `down'
+ through the the history as necessary. This is an incremental
+ search.
+
+`non-incremental-reverse-search-history (M-p)'
+ Search backward starting at the current line and moving `up'
+ through the history as necessary using a non-incremental search
+ for a string supplied by the user.
+
+`non-incremental-forward-search-history (M-n)'
+ Search forward starting at the current line and moving `down'
+ through the the history as necessary using a non-incremental search
+ for a string supplied by the user.
+
+`history-search-forward ()'
+ Search forward through the history for the string of characters
+ between the start of the current line and the point. This is a
+ non-incremental search. By default, this command is unbound.
+
+`history-search-backward ()'
+ Search backward through the history for the string of characters
+ between the start of the current line and the point. This is a
+ non-incremental search. By default, this command is unbound.
+
+`yank-nth-arg (M-C-y)'
+ Insert the first argument to the previous command (usually the
+ second word on the previous line) at point. With an argument N,
+ insert the Nth word from the previous command (the words in the
+ previous command begin with word 0). A negative argument inserts
+ the Nth word from the end of the previous command. Once the
+ argument N is computed, the argument is extracted as if the `!N'
+ history expansion had been specified.
+
+`yank-last-arg (M-. or M-_)'
+ Insert last argument to the previous command (the last word of the
+ previous history entry). With an argument, behave exactly like
+ `yank-nth-arg'. Successive calls to `yank-last-arg' move back
+ through the history list, inserting the last argument of each line
+ in turn. The history expansion facilities are used to extract the
+ last argument, as if the `!$' history expansion had been specified.
+
+
+
+File: bashref.info, Node: Commands For Text, Next: Commands For Killing, Prev: Commands For History, Up: Bindable Readline Commands
+
+8.4.3 Commands For Changing Text
+--------------------------------
+
+`delete-char (C-d)'
+ Delete the character at point. If point is at the beginning of
+ the line, there are no characters in the line, and the last
+ character typed was not bound to `delete-char', then return EOF.
+
+`backward-delete-char (Rubout)'
+ Delete the character behind the cursor. A numeric argument means
+ to kill the characters instead of deleting them.
+
+`forward-backward-delete-char ()'
+ Delete the character under the cursor, unless the cursor is at the
+ end of the line, in which case the character behind the cursor is
+ deleted. By default, this is not bound to a key.
+
+`quoted-insert (C-q or C-v)'
+ Add the next character typed to the line verbatim. This is how to
+ insert key sequences like `C-q', for example.
+
+`self-insert (a, b, A, 1, !, ...)'
+ Insert yourself.
+
+`transpose-chars (C-t)'
+ Drag the character before the cursor forward over the character at
+ the cursor, moving the cursor forward as well. If the insertion
+ point is at the end of the line, then this transposes the last two
+ characters of the line. Negative arguments have no effect.
+
+`transpose-words (M-t)'
+ Drag the word before point past the word after point, moving point
+ past that word as well. If the insertion point is at the end of
+ the line, this transposes the last two words on the line.
+
+`upcase-word (M-u)'
+ Uppercase the current (or following) word. With a negative
+ argument, uppercase the previous word, but do not move the cursor.
+
+`downcase-word (M-l)'
+ Lowercase the current (or following) word. With a negative
+ argument, lowercase the previous word, but do not move the cursor.
+
+`capitalize-word (M-c)'
+ Capitalize the current (or following) word. With a negative
+ argument, capitalize the previous word, but do not move the cursor.
+
+`overwrite-mode ()'
+ Toggle overwrite mode. With an explicit positive numeric argument,
+ switches to overwrite mode. With an explicit non-positive numeric
+ argument, switches to insert mode. This command affects only
+ `emacs' mode; `vi' mode does overwrite differently. Each call to
+ `readline()' starts in insert mode.
+
+ In overwrite mode, characters bound to `self-insert' replace the
+ text at point rather than pushing the text to the right.
+ Characters bound to `backward-delete-char' replace the character
+ before point with a space.
+
+ By default, this command is unbound.
+
+
+
+File: bashref.info, Node: Commands For Killing, Next: Numeric Arguments, Prev: Commands For Text, Up: Bindable Readline Commands
+
+8.4.4 Killing And Yanking
+-------------------------
+
+`kill-line (C-k)'
+ Kill the text from point to the end of the line.
+
+`backward-kill-line (C-x Rubout)'
+ Kill backward to the beginning of the line.
+
+`unix-line-discard (C-u)'
+ Kill backward from the cursor to the beginning of the current line.
+
+`kill-whole-line ()'
+ Kill all characters on the current line, no matter where point is.
+ By default, this is unbound.
+
+`kill-word (M-d)'
+ Kill from point to the end of the current word, or if between
+ words, to the end of the next word. Word boundaries are the same
+ as `forward-word'.
+
+`backward-kill-word (M-<DEL>)'
+ Kill the word behind point. Word boundaries are the same as
+ `backward-word'.
+
+`shell-kill-word ()'
+ Kill from point to the end of the current word, or if between
+ words, to the end of the next word. Word boundaries are the same
+ as `shell-forward-word'.
+
+`backward-kill-word ()'
+ Kill the word behind point. Word boundaries are the same as
+ `shell-backward-word'.
+
+`unix-word-rubout (C-w)'
+ Kill the word behind point, using white space as a word boundary.
+ The killed text is saved on the kill-ring.
+
+`unix-filename-rubout ()'
+ Kill the word behind point, using white space and the slash
+ character as the word boundaries. The killed text is saved on the
+ kill-ring.
+
+`delete-horizontal-space ()'
+ Delete all spaces and tabs around point. By default, this is
+ unbound.
+
+`kill-region ()'
+ Kill the text in the current region. By default, this command is
+ unbound.
+
+`copy-region-as-kill ()'
+ Copy the text in the region to the kill buffer, so it can be yanked
+ right away. By default, this command is unbound.
+
+`copy-backward-word ()'
+ Copy the word before point to the kill buffer. The word
+ boundaries are the same as `backward-word'. By default, this
+ command is unbound.
+
+`copy-forward-word ()'
+ Copy the word following point to the kill buffer. The word
+ boundaries are the same as `forward-word'. By default, this
+ command is unbound.
+
+`yank (C-y)'
+ Yank the top of the kill ring into the buffer at point.
+
+`yank-pop (M-y)'
+ Rotate the kill-ring, and yank the new top. You can only do this
+ if the prior command is `yank' or `yank-pop'.
+
+
+File: bashref.info, Node: Numeric Arguments, Next: Commands For Completion, Prev: Commands For Killing, Up: Bindable Readline Commands
+
+8.4.5 Specifying Numeric Arguments
+----------------------------------
+
+`digit-argument (M-0, M-1, ... M--)'
+ Add this digit to the argument already accumulating, or start a new
+ argument. `M--' starts a negative argument.
+
+`universal-argument ()'
+ This is another way to specify an argument. If this command is
+ followed by one or more digits, optionally with a leading minus
+ sign, those digits define the argument. If the command is
+ followed by digits, executing `universal-argument' again ends the
+ numeric argument, but is otherwise ignored. As a special case, if
+ this command is immediately followed by a character that is
+ neither a digit or minus sign, the argument count for the next
+ command is multiplied by four. The argument count is initially
+ one, so executing this function the first time makes the argument
+ count four, a second time makes the argument count sixteen, and so
+ on. By default, this is not bound to a key.
+
+
+File: bashref.info, Node: Commands For Completion, Next: Keyboard Macros, Prev: Numeric Arguments, Up: Bindable Readline Commands
+
+8.4.6 Letting Readline Type For You
+-----------------------------------
+
+`complete (<TAB>)'
+ Attempt to perform completion on the text before point. The
+ actual completion performed is application-specific. Bash
+ attempts completion treating the text as a variable (if the text
+ begins with `$'), username (if the text begins with `~'), hostname
+ (if the text begins with `@'), or command (including aliases and
+ functions) in turn. If none of these produces a match, filename
+ completion is attempted.
+
+`possible-completions (M-?)'
+ List the possible completions of the text before point.
+
+`insert-completions (M-*)'
+ Insert all completions of the text before point that would have
+ been generated by `possible-completions'.
+
+`menu-complete ()'
+ Similar to `complete', but replaces the word to be completed with
+ a single match from the list of possible completions. Repeated
+ execution of `menu-complete' steps through the list of possible
+ completions, inserting each match in turn. At the end of the list
+ of completions, the bell is rung (subject to the setting of
+ `bell-style') and the original text is restored. An argument of N
+ moves N positions forward in the list of matches; a negative
+ argument may be used to move backward through the list. This
+ command is intended to be bound to <TAB>, but is unbound by
+ default.
+
+`menu-complete-backward ()'
+ Identical to `menu-complete', but moves backward through the list
+ of possible completions, as if `menu-complete' had been given a
+ negative argument.
+
+`delete-char-or-list ()'
+ Deletes the character under the cursor if not at the beginning or
+ end of the line (like `delete-char'). If at the end of the line,
+ behaves identically to `possible-completions'. This command is
+ unbound by default.
+
+`complete-filename (M-/)'
+ Attempt filename completion on the text before point.
+
+`possible-filename-completions (C-x /)'
+ List the possible completions of the text before point, treating
+ it as a filename.
+
+`complete-username (M-~)'
+ Attempt completion on the text before point, treating it as a
+ username.
+
+`possible-username-completions (C-x ~)'
+ List the possible completions of the text before point, treating
+ it as a username.
+
+`complete-variable (M-$)'
+ Attempt completion on the text before point, treating it as a
+ shell variable.
+
+`possible-variable-completions (C-x $)'
+ List the possible completions of the text before point, treating
+ it as a shell variable.
+
+`complete-hostname (M-@)'
+ Attempt completion on the text before point, treating it as a
+ hostname.
+
+`possible-hostname-completions (C-x @)'
+ List the possible completions of the text before point, treating
+ it as a hostname.
+
+`complete-command (M-!)'
+ Attempt completion on the text before point, treating it as a
+ command name. Command completion attempts to match the text
+ against aliases, reserved words, shell functions, shell builtins,
+ and finally executable filenames, in that order.
+
+`possible-command-completions (C-x !)'
+ List the possible completions of the text before point, treating
+ it as a command name.
+
+`dynamic-complete-history (M-<TAB>)'
+ Attempt completion on the text before point, comparing the text
+ against lines from the history list for possible completion
+ matches.
+
+`dabbrev-expand ()'
+ Attempt menu completion on the text before point, comparing the
+ text against lines from the history list for possible completion
+ matches.
+
+`complete-into-braces (M-{)'
+ Perform filename completion and insert the list of possible
+ completions enclosed within braces so the list is available to the
+ shell (*note Brace Expansion::).
+
+
+
+File: bashref.info, Node: Keyboard Macros, Next: Miscellaneous Commands, Prev: Commands For Completion, Up: Bindable Readline Commands
+
+8.4.7 Keyboard Macros
+---------------------
+
+`start-kbd-macro (C-x ()'
+ Begin saving the characters typed into the current keyboard macro.
+
+`end-kbd-macro (C-x ))'
+ Stop saving the characters typed into the current keyboard macro
+ and save the definition.
+
+`call-last-kbd-macro (C-x e)'
+ Re-execute the last keyboard macro defined, by making the
+ characters in the macro appear as if typed at the keyboard.
+
+
+
+File: bashref.info, Node: Miscellaneous Commands, Prev: Keyboard Macros, Up: Bindable Readline Commands
+
+8.4.8 Some Miscellaneous Commands
+---------------------------------
+
+`re-read-init-file (C-x C-r)'
+ Read in the contents of the INPUTRC file, and incorporate any
+ bindings or variable assignments found there.
+
+`abort (C-g)'
+ Abort the current editing command and ring the terminal's bell
+ (subject to the setting of `bell-style').
+
+`do-uppercase-version (M-a, M-b, M-X, ...)'
+ If the metafied character X is lowercase, run the command that is
+ bound to the corresponding uppercase character.
+
+`prefix-meta (<ESC>)'
+ Metafy the next character typed. This is for keyboards without a
+ meta key. Typing `<ESC> f' is equivalent to typing `M-f'.
+
+`undo (C-_ or C-x C-u)'
+ Incremental undo, separately remembered for each line.
+
+`revert-line (M-r)'
+ Undo all changes made to this line. This is like executing the
+ `undo' command enough times to get back to the beginning.
+
+`tilde-expand (M-&)'
+ Perform tilde expansion on the current word.
+
+`set-mark (C-@)'
+ Set the mark to the point. If a numeric argument is supplied, the
+ mark is set to that position.
+
+`exchange-point-and-mark (C-x C-x)'
+ Swap the point with the mark. The current cursor position is set
+ to the saved position, and the old cursor position is saved as the
+ mark.
+
+`character-search (C-])'
+ A character is read and point is moved to the next occurrence of
+ that character. A negative count searches for previous
+ occurrences.
+
+`character-search-backward (M-C-])'
+ A character is read and point is moved to the previous occurrence
+ of that character. A negative count searches for subsequent
+ occurrences.
+
+`skip-csi-sequence ()'
+ Read enough characters to consume a multi-key sequence such as
+ those defined for keys like Home and End. Such sequences begin
+ with a Control Sequence Indicator (CSI), usually ESC-[. If this
+ sequence is bound to "\e[", keys producing such sequences will
+ have no effect unless explicitly bound to a readline command,
+ instead of inserting stray characters into the editing buffer.
+ This is unbound by default, but usually bound to ESC-[.
+
+`insert-comment (M-#)'
+ Without a numeric argument, the value of the `comment-begin'
+ variable is inserted at the beginning of the current line. If a
+ numeric argument is supplied, this command acts as a toggle: if
+ the characters at the beginning of the line do not match the value
+ of `comment-begin', the value is inserted, otherwise the
+ characters in `comment-begin' are deleted from the beginning of
+ the line. In either case, the line is accepted as if a newline
+ had been typed. The default value of `comment-begin' causes this
+ command to make the current line a shell comment. If a numeric
+ argument causes the comment character to be removed, the line will
+ be executed by the shell.
+
+`dump-functions ()'
+ Print all of the functions and their key bindings to the Readline
+ output stream. If a numeric argument is supplied, the output is
+ formatted in such a way that it can be made part of an INPUTRC
+ file. This command is unbound by default.
+
+`dump-variables ()'
+ Print all of the settable variables and their values to the
+ Readline output stream. If a numeric argument is supplied, the
+ output is formatted in such a way that it can be made part of an
+ INPUTRC file. This command is unbound by default.
+
+`dump-macros ()'
+ Print all of the Readline key sequences bound to macros and the
+ strings they output. If a numeric argument is supplied, the
+ output is formatted in such a way that it can be made part of an
+ INPUTRC file. This command is unbound by default.
+
+`glob-complete-word (M-g)'
+ The word before point is treated as a pattern for pathname
+ expansion, with an asterisk implicitly appended. This pattern is
+ used to generate a list of matching file names for possible
+ completions.
+
+`glob-expand-word (C-x *)'
+ The word before point is treated as a pattern for pathname
+ expansion, and the list of matching file names is inserted,
+ replacing the word. If a numeric argument is supplied, a `*' is
+ appended before pathname expansion.
+
+`glob-list-expansions (C-x g)'
+ The list of expansions that would have been generated by
+ `glob-expand-word' is displayed, and the line is redrawn. If a
+ numeric argument is supplied, a `*' is appended before pathname
+ expansion.
+
+`display-shell-version (C-x C-v)'
+ Display version information about the current instance of Bash.
+
+`shell-expand-line (M-C-e)'
+ Expand the line as the shell does. This performs alias and
+ history expansion as well as all of the shell word expansions
+ (*note Shell Expansions::).
+
+`history-expand-line (M-^)'
+ Perform history expansion on the current line.
+
+`magic-space ()'
+ Perform history expansion on the current line and insert a space
+ (*note History Interaction::).
+
+`alias-expand-line ()'
+ Perform alias expansion on the current line (*note Aliases::).
+
+`history-and-alias-expand-line ()'
+ Perform history and alias expansion on the current line.
+
+`insert-last-argument (M-. or M-_)'
+ A synonym for `yank-last-arg'.
+
+`operate-and-get-next (C-o)'
+ Accept the current line for execution and fetch the next line
+ relative to the current line from the history for editing. Any
+ argument is ignored.
+
+`edit-and-execute-command (C-xC-e)'
+ Invoke an editor on the current command line, and execute the
+ result as shell commands. Bash attempts to invoke `$VISUAL',
+ `$EDITOR', and `emacs' as the editor, in that order.
+
+
+
+File: bashref.info, Node: Readline vi Mode, Next: Programmable Completion, Prev: Bindable Readline Commands, Up: Command Line Editing
+
+8.5 Readline vi Mode
+====================
+
+While the Readline library does not have a full set of `vi' editing
+functions, it does contain enough to allow simple editing of the line.
+The Readline `vi' mode behaves as specified in the POSIX 1003.2
+standard.
+
+ In order to switch interactively between `emacs' and `vi' editing
+modes, use the `set -o emacs' and `set -o vi' commands (*note The Set
+Builtin::). The Readline default is `emacs' mode.
+
+ When you enter a line in `vi' mode, you are already placed in
+`insertion' mode, as if you had typed an `i'. Pressing <ESC> switches
+you into `command' mode, where you can edit the text of the line with
+the standard `vi' movement keys, move to previous history lines with
+`k' and subsequent lines with `j', and so forth.
+
+
+File: bashref.info, Node: Programmable Completion, Next: Programmable Completion Builtins, Prev: Readline vi Mode, Up: Command Line Editing
+
+8.6 Programmable Completion
+===========================
+
+When word completion is attempted for an argument to a command for
+which a completion specification (a COMPSPEC) has been defined using
+the `complete' builtin (*note Programmable Completion Builtins::), the
+programmable completion facilities are invoked.
+
+ First, the command name is identified. If a compspec has been
+defined for that command, the compspec is used to generate the list of
+possible completions for the word. If the command word is the empty
+string (completion attempted at the beginning of an empty line), any
+compspec defined with the `-E' option to `complete' is used. If the
+command word is a full pathname, a compspec for the full pathname is
+searched for first. If no compspec is found for the full pathname, an
+attempt is made to find a compspec for the portion following the final
+slash. If those searches do not result in a compspec, any compspec
+defined with the `-D' option to `complete' is used as the default.
+
+ Once a compspec has been found, it is used to generate the list of
+matching words. If a compspec is not found, the default Bash completion
+described above (*note Commands For Completion::) is performed.
+
+ First, the actions specified by the compspec are used. Only matches
+which are prefixed by the word being completed are returned. When the
+`-f' or `-d' option is used for filename or directory name completion,
+the shell variable `FIGNORE' is used to filter the matches. *Note Bash
+Variables::, for a description of `FIGNORE'.
+
+ Any completions specified by a filename expansion pattern to the
+`-G' option are generated next. The words generated by the pattern
+need not match the word being completed. The `GLOBIGNORE' shell
+variable is not used to filter the matches, but the `FIGNORE' shell
+variable is used.
+
+ Next, the string specified as the argument to the `-W' option is
+considered. The string is first split using the characters in the `IFS'
+special variable as delimiters. Shell quoting is honored. Each word
+is then expanded using brace expansion, tilde expansion, parameter and
+variable expansion, command substitution, and arithmetic expansion, as
+described above (*note Shell Expansions::). The results are split
+using the rules described above (*note Word Splitting::). The results
+of the expansion are prefix-matched against the word being completed,
+and the matching words become the possible completions.
+
+ After these matches have been generated, any shell function or
+command specified with the `-F' and `-C' options is invoked. When the
+command or function is invoked, the `COMP_LINE', `COMP_POINT',
+`COMP_KEY', and `COMP_TYPE' variables are assigned values as described
+above (*note Bash Variables::). If a shell function is being invoked,
+the `COMP_WORDS' and `COMP_CWORD' variables are also set. When the
+function or command is invoked, the first argument is the name of the
+command whose arguments are being completed, the second argument is the
+word being completed, and the third argument is the word preceding the
+word being completed on the current command line. No filtering of the
+generated completions against the word being completed is performed;
+the function or command has complete freedom in generating the matches.
+
+ Any function specified with `-F' is invoked first. The function may
+use any of the shell facilities, including the `compgen' and `compopt'
+builtins described below (*note Programmable Completion Builtins::), to
+generate the matches. It must put the possible completions in the
+`COMPREPLY' array variable.
+
+ Next, any command specified with the `-C' option is invoked in an
+environment equivalent to command substitution. It should print a list
+of completions, one per line, to the standard output. Backslash may be
+used to escape a newline, if necessary.
+
+ After all of the possible completions are generated, any filter
+specified with the `-X' option is applied to the list. The filter is a
+pattern as used for pathname expansion; a `&' in the pattern is
+replaced with the text of the word being completed. A literal `&' may
+be escaped with a backslash; the backslash is removed before attempting
+a match. Any completion that matches the pattern will be removed from
+the list. A leading `!' negates the pattern; in this case any
+completion not matching the pattern will be removed.
+
+ Finally, any prefix and suffix specified with the `-P' and `-S'
+options are added to each member of the completion list, and the result
+is returned to the Readline completion code as the list of possible
+completions.
+
+ If the previously-applied actions do not generate any matches, and
+the `-o dirnames' option was supplied to `complete' when the compspec
+was defined, directory name completion is attempted.
+
+ If the `-o plusdirs' option was supplied to `complete' when the
+compspec was defined, directory name completion is attempted and any
+matches are added to the results of the other actions.
+
+ By default, if a compspec is found, whatever it generates is
+returned to the completion code as the full set of possible completions.
+The default Bash completions are not attempted, and the Readline default
+of filename completion is disabled. If the `-o bashdefault' option was
+supplied to `complete' when the compspec was defined, the default Bash
+completions are attempted if the compspec generates no matches. If the
+`-o default' option was supplied to `complete' when the compspec was
+defined, Readline's default completion will be performed if the
+compspec (and, if attempted, the default Bash completions) generate no
+matches.
+
+ When a compspec indicates that directory name completion is desired,
+the programmable completion functions force Readline to append a slash
+to completed names which are symbolic links to directories, subject to
+the value of the MARK-DIRECTORIES Readline variable, regardless of the
+setting of the MARK-SYMLINKED-DIRECTORIES Readline variable.
+
+ There is some support for dynamically modifying completions. This is
+most useful when used in combination with a default completion specified
+with `-D'. It's possible for shell functions executed as completion
+handlers to indicate that completion should be retried by returning an
+exit status of 124. If a shell function returns 124, and changes the
+compspec associated with the command on which completion is being
+attempted (supplied as the first argument when the function is
+executed), programmable completion restarts from the beginning, with an
+attempt to find a compspec for that command. This allows a set of
+completions to be built dynamically as completion is attempted, rather
+than being loaded all at once.
+
+ For instance, assuming that there is a library of compspecs, each
+kept in a file corresponding to the name of the command, the following
+default completion function would load completions dynamically:
+
+ _completion_loader()
+ {
+ . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124
+ }
+ complete -D -F _completion_loader
+
+
+File: bashref.info, Node: Programmable Completion Builtins, Prev: Programmable Completion, Up: Command Line Editing
+
+8.7 Programmable Completion Builtins
+====================================
+
+Two builtin commands are available to manipulate the programmable
+completion facilities.
+
+`compgen'
+ `compgen [OPTION] [WORD]'
+
+ Generate possible completion matches for WORD according to the
+ OPTIONs, which may be any option accepted by the `complete'
+ builtin with the exception of `-p' and `-r', and write the matches
+ to the standard output. When using the `-F' or `-C' options, the
+ various shell variables set by the programmable completion
+ facilities, while available, will not have useful values.
+
+ The matches will be generated in the same way as if the
+ programmable completion code had generated them directly from a
+ completion specification with the same flags. If WORD is
+ specified, only those completions matching WORD will be displayed.
+
+ The return value is true unless an invalid option is supplied, or
+ no matches were generated.
+
+`complete'
+ `complete [-abcdefgjksuv] [-o COMP-OPTION] [-DE] [-A ACTION] [-G GLOBPAT] [-W WORDLIST]
+ [-F FUNCTION] [-C COMMAND] [-X FILTERPAT]
+ [-P PREFIX] [-S SUFFIX] NAME [NAME ...]'
+ `complete -pr [-DE] [NAME ...]'
+
+ Specify how arguments to each NAME should be completed. If the
+ `-p' option is supplied, or if no options are supplied, existing
+ completion specifications are printed in a way that allows them to
+ be reused as input. The `-r' option removes a completion
+ specification for each NAME, or, if no NAMEs are supplied, all
+ completion specifications. The `-D' option indicates that the
+ remaining options and actions should apply to the "default"
+ command completion; that is, completion attempted on a command for
+ which no completion has previously been defined. The `-E' option
+ indicates that the remaining options and actions should apply to
+ "empty" command completion; that is, completion attempted on a
+ blank line.
+
+ The process of applying these completion specifications when word
+ completion is attempted is described above (*note Programmable
+ Completion::). The `-D' option takes precedence over `-E'.
+
+ Other options, if specified, have the following meanings. The
+ arguments to the `-G', `-W', and `-X' options (and, if necessary,
+ the `-P' and `-S' options) should be quoted to protect them from
+ expansion before the `complete' builtin is invoked.
+
+ `-o COMP-OPTION'
+ The COMP-OPTION controls several aspects of the compspec's
+ behavior beyond the simple generation of completions.
+ COMP-OPTION may be one of:
+
+ `bashdefault'
+ Perform the rest of the default Bash completions if the
+ compspec generates no matches.
+
+ `default'
+ Use Readline's default filename completion if the
+ compspec generates no matches.
+
+ `dirnames'
+ Perform directory name completion if the compspec
+ generates no matches.
+
+ `filenames'
+ Tell Readline that the compspec generates filenames, so
+ it can perform any filename-specific processing (like
+ adding a slash to directory names quoting special
+ characters, or suppressing trailing spaces). This
+ option is intended to be used with shell functions
+ specified with `-F'.
+
+ `nospace'
+ Tell Readline not to append a space (the default) to
+ words completed at the end of the line.
+
+ `plusdirs'
+ After any matches defined by the compspec are generated,
+ directory name completion is attempted and any matches
+ are added to the results of the other actions.
+
+
+ `-A ACTION'
+ The ACTION may be one of the following to generate a list of
+ possible completions:
+
+ `alias'
+ Alias names. May also be specified as `-a'.
+
+ `arrayvar'
+ Array variable names.
+
+ `binding'
+ Readline key binding names (*note Bindable Readline
+ Commands::).
+
+ `builtin'
+ Names of shell builtin commands. May also be specified
+ as `-b'.
+
+ `command'
+ Command names. May also be specified as `-c'.
+
+ `directory'
+ Directory names. May also be specified as `-d'.
+
+ `disabled'
+ Names of disabled shell builtins.
+
+ `enabled'
+ Names of enabled shell builtins.
+
+ `export'
+ Names of exported shell variables. May also be
+ specified as `-e'.
+
+ `file'
+ File names. May also be specified as `-f'.
+
+ `function'
+ Names of shell functions.
+
+ `group'
+ Group names. May also be specified as `-g'.
+
+ `helptopic'
+ Help topics as accepted by the `help' builtin (*note
+ Bash Builtins::).
+
+ `hostname'
+ Hostnames, as taken from the file specified by the
+ `HOSTFILE' shell variable (*note Bash Variables::).
+
+ `job'
+ Job names, if job control is active. May also be
+ specified as `-j'.
+
+ `keyword'
+ Shell reserved words. May also be specified as `-k'.
+
+ `running'
+ Names of running jobs, if job control is active.
+
+ `service'
+ Service names. May also be specified as `-s'.
+
+ `setopt'
+ Valid arguments for the `-o' option to the `set' builtin
+ (*note The Set Builtin::).
+
+ `shopt'
+ Shell option names as accepted by the `shopt' builtin
+ (*note Bash Builtins::).
+
+ `signal'
+ Signal names.
+
+ `stopped'
+ Names of stopped jobs, if job control is active.
+
+ `user'
+ User names. May also be specified as `-u'.
+
+ `variable'
+ Names of all shell variables. May also be specified as
+ `-v'.
+
+ `-G GLOBPAT'
+ The filename expansion pattern GLOBPAT is expanded to generate
+ the possible completions.
+
+ `-W WORDLIST'
+ The WORDLIST is split using the characters in the `IFS'
+ special variable as delimiters, and each resultant word is
+ expanded. The possible completions are the members of the
+ resultant list which match the word being completed.
+
+ `-C COMMAND'
+ COMMAND is executed in a subshell environment, and its output
+ is used as the possible completions.
+
+ `-F FUNCTION'
+ The shell function FUNCTION is executed in the current shell
+ environment. When it finishes, the possible completions are
+ retrieved from the value of the `COMPREPLY' array variable.
+
+ `-X FILTERPAT'
+ FILTERPAT is a pattern as used for filename expansion. It is
+ applied to the list of possible completions generated by the
+ preceding options and arguments, and each completion matching
+ FILTERPAT is removed from the list. A leading `!' in
+ FILTERPAT negates the pattern; in this case, any completion
+ not matching FILTERPAT is removed.
+
+ `-P PREFIX'
+ PREFIX is added at the beginning of each possible completion
+ after all other options have been applied.
+
+ `-S SUFFIX'
+ SUFFIX is appended to each possible completion after all
+ other options have been applied.
+
+ The return value is true unless an invalid option is supplied, an
+ option other than `-p' or `-r' is supplied without a NAME
+ argument, an attempt is made to remove a completion specification
+ for a NAME for which no specification exists, or an error occurs
+ adding a completion specification.
+
+`compopt'
+ `compopt' [-o OPTION] [-DE] [+o OPTION] [NAME]
+ Modify completion options for each NAME according to the OPTIONs,
+ or for the currently-execution completion if no NAMEs are supplied.
+ If no OPTIONs are given, display the completion options for each
+ NAME or the current completion. The possible values of OPTION are
+ those valid for the `complete' builtin described above. The `-D'
+ option indicates that the remaining options should apply to the
+ "default" command completion; that is, completion attempted on a
+ command for which no completion has previously been defined. The
+ `-E' option indicates that the remaining options should apply to
+ "empty" command completion; that is, completion attempted on a
+ blank line.
+
+ The `-D' option takes precedence over `-E'.
+
+ The return value is true unless an invalid option is supplied, an
+ attempt is made to modify the options for a NAME for which no
+ completion specification exists, or an output error occurs.
+
+
+
+File: bashref.info, Node: Using History Interactively, Next: Installing Bash, Prev: Command Line Editing, Up: Top
+
+9 Using History Interactively
+*****************************
+
+This chapter describes how to use the GNU History Library
+interactively, from a user's standpoint. It should be considered a
+user's guide. For information on using the GNU History Library in
+other programs, see the GNU Readline Library Manual.
+
+* 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.
+
+
+File: bashref.info, Node: Bash History Facilities, Next: Bash History Builtins, Up: Using History Interactively
+
+9.1 Bash History Facilities
+===========================
+
+When the `-o history' option to the `set' builtin is enabled (*note The
+Set Builtin::), the shell provides access to the "command history", the
+list of commands previously typed. The value of the `HISTSIZE' shell
+variable is used as the number of commands to save in a history list.
+The text of the last `$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 `HISTIGNORE' and `HISTCONTROL'.
+
+ When the shell starts up, the history is initialized from the file
+named by the `HISTFILE' variable (default `~/.bash_history'). The file
+named by the value of `HISTFILE' is truncated, if necessary, to contain
+no more than the number of lines specified by the value of the
+`HISTFILESIZE' variable. When an interactive shell exits, the last
+`$HISTSIZE' lines are copied from the history list to the file named by
+`$HISTFILE'. If the `histappend' shell option is set (*note Bash
+Builtins::), the lines are appended to the history file, otherwise the
+history file is overwritten. If `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
+`$HISTFILESIZE' lines. If `HISTFILESIZE' is not set, no truncation is
+performed.
+
+ If the `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 `fc' may be used to list or edit and re-execute
+a portion of the history list. The `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 (*note Commands
+For History::).
+
+ The shell allows control over which commands are saved on the history
+list. The `HISTCONTROL' and `HISTIGNORE' variables may be set to cause
+the shell to save only a subset of the commands entered. The `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 `lithist' shell
+option causes the shell to save the command with embedded newlines
+instead of semicolons. The `shopt' builtin is used to set these
+options. *Note Bash Builtins::, for a description of `shopt'.
+
+
+File: bashref.info, Node: Bash History Builtins, Next: History Interaction, Prev: Bash History Facilities, Up: Using History Interactively
+
+9.2 Bash History Builtins
+=========================
+
+Bash provides two builtin commands which manipulate the history list
+and history file.
+
+`fc'
+ `fc [-e ENAME] [-lnr] [FIRST] [LAST]'
+ `fc -s [PAT=REP] [COMMAND]'
+
+ Fix Command. In the first form, a range of commands from FIRST to
+ LAST is selected from the history list. Both FIRST and 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 LAST is not specified it is set to
+ FIRST. If FIRST is not specified it is set to the previous
+ command for editing and -16 for listing. If the `-l' flag is
+ given, the commands are listed on standard output. The `-n' flag
+ suppresses the command numbers when listing. The `-r' flag
+ reverses the order of the listing. Otherwise, the editor given by
+ ENAME is invoked on a file containing those commands. If ENAME is
+ not given, the value of the following variable expansion is used:
+ `${FCEDIT:-${EDITOR:-vi}}'. This says to use the value of the
+ `FCEDIT' variable if set, or the value of the `EDITOR' variable if
+ that is set, or `vi' if neither is set. When editing is complete,
+ the edited commands are echoed and executed.
+
+ In the second form, COMMAND is re-executed after each instance of
+ PAT in the selected command is replaced by REP.
+
+ A useful alias to use with the `fc' command is `r='fc -s'', so
+ that typing `r cc' runs the last command beginning with `cc' and
+ typing `r' re-executes the last command (*note Aliases::).
+
+`history'
+ history [N]
+ history -c
+ history -d OFFSET
+ history [-anrw] [FILENAME]
+ history -ps ARG
+
+ With no options, display the history list with line numbers.
+ Lines prefixed with a `*' have been modified. An argument of N
+ lists only the last N lines. If the shell variable
+ `HISTTIMEFORMAT' is set and not null, it is used as a format
+ string for 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:
+
+ `-c'
+ Clear the history list. This may be combined with the other
+ options to replace the history list completely.
+
+ `-d OFFSET'
+ Delete the history entry at position OFFSET. OFFSET should
+ be specified as it appears when the history is displayed.
+
+ `-a'
+ Append the new history lines (history lines entered since the
+ beginning of the current Bash session) to the history file.
+
+ `-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.
+
+ `-r'
+ Read the current history file and append its contents to the
+ history list.
+
+ `-w'
+ Write out the current history to the history file.
+
+ `-p'
+ Perform history substitution on the ARGs and display the
+ result on the standard output, without storing the results in
+ the history list.
+
+ `-s'
+ The ARGs are added to the end of the history list as a single
+ entry.
+
+
+ When any of the `-w', `-r', `-a', or `-n' options is used, if
+ FILENAME is given, then it is used as the history file. If not,
+ then the value of the `HISTFILE' variable is used.
+
+
+
+File: bashref.info, Node: History Interaction, Prev: Bash History Builtins, Up: Using History Interactively
+
+9.3 History Expansion
+=====================
+
+The History library provides a history expansion feature that is similar
+to the history expansion provided by `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 "event", and the portions of that line that are acted upon
+are called "words". Various "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 `!' by default.
+Only `\' and `'' may be used to escape the history expansion character.
+
+ Several shell options settable with the `shopt' builtin (*note Bash
+Builtins::) may be used to tailor the behavior of history expansion.
+If the `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 `histreedit' shell option is enabled, a failed history
+expansion will be reloaded into the Readline editing buffer for
+correction. The `-p' option to the `history' builtin command may be
+used to see what a history expansion will do before using it. The `-s'
+option to the `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 `histchars' variable, as explained
+above (*note Bash Variables::). The shell uses the history comment
+character to mark history timestamps when writing the history file.
+
+* 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.
+
+
+File: bashref.info, Node: Event Designators, Next: Word Designators, Up: History Interaction
+
+9.3.1 Event Designators
+-----------------------
+
+An event designator is a reference to a command line entry in the
+history list.
+
+`!'
+ Start a history substitution, except when followed by a space, tab,
+ the end of the line, `=' or `(' (when the `extglob' shell option
+ is enabled using the `shopt' builtin).
+
+`!N'
+ Refer to command line N.
+
+`!-N'
+ Refer to the command N lines back.
+
+`!!'
+ Refer to the previous command. This is a synonym for `!-1'.
+
+`!STRING'
+ Refer to the most recent command starting with STRING.
+
+`!?STRING[?]'
+ Refer to the most recent command containing STRING. The trailing
+ `?' may be omitted if the STRING is followed immediately by a
+ newline.
+
+`^STRING1^STRING2^'
+ Quick Substitution. Repeat the last command, replacing STRING1
+ with STRING2. Equivalent to `!!:s/STRING1/STRING2/'.
+
+`!#'
+ The entire command line typed so far.
+
+
+
+File: bashref.info, Node: Word Designators, Next: Modifiers, Prev: Event Designators, Up: History Interaction
+
+9.3.2 Word Designators
+----------------------
+
+Word designators are used to select desired words from the event. A
+`:' separates the event specification from the word designator. It may
+be omitted if the word designator begins with a `^', `$', `*', `-', or
+`%'. 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.
+
+ For example,
+
+`!!'
+ designates the preceding command. When you type this, the
+ preceding command is repeated in toto.
+
+`!!:$'
+ designates the last argument of the preceding command. This may be
+ shortened to `!$'.
+
+`!fi:2'
+ designates the second argument of the most recent command starting
+ with the letters `fi'.
+
+ Here are the word designators:
+
+`0 (zero)'
+ The `0'th word. For many applications, this is the command word.
+
+`N'
+ The Nth word.
+
+`^'
+ The first argument; that is, word 1.
+
+`$'
+ The last argument.
+
+`%'
+ The word matched by the most recent `?STRING?' search.
+
+`X-Y'
+ A range of words; `-Y' abbreviates `0-Y'.
+
+`*'
+ All of the words, except the `0'th. This is a synonym for `1-$'.
+ It is not an error to use `*' if there is just one word in the
+ event; the empty string is returned in that case.
+
+`X*'
+ Abbreviates `X-$'
+
+`X-'
+ Abbreviates `X-$' like `X*', but omits the last word.
+
+
+ If a word designator is supplied without an event specification, the
+previous command is used as the event.
+
+
+File: bashref.info, Node: Modifiers, Prev: Word Designators, Up: History Interaction
+
+9.3.3 Modifiers
+---------------
+
+After the optional word designator, you can add a sequence of one or
+more of the following modifiers, each preceded by a `:'.
+
+`h'
+ Remove a trailing pathname component, leaving only the head.
+
+`t'
+ Remove all leading pathname components, leaving the tail.
+
+`r'
+ Remove a trailing suffix of the form `.SUFFIX', leaving the
+ basename.
+
+`e'
+ Remove all but the trailing suffix.
+
+`p'
+ Print the new command but do not execute it.
+
+`q'
+ Quote the substituted words, escaping further substitutions.
+
+`x'
+ Quote the substituted words as with `q', but break into words at
+ spaces, tabs, and newlines.
+
+`s/OLD/NEW/'
+ Substitute NEW for the first occurrence of OLD in the event line.
+ Any delimiter may be used in place of `/'. The delimiter may be
+ quoted in OLD and NEW with a single backslash. If `&' appears in
+ NEW, it is replaced by OLD. A single backslash will quote the
+ `&'. The final delimiter is optional if it is the last character
+ on the input line.
+
+`&'
+ Repeat the previous substitution.
+
+`g'
+`a'
+ Cause changes to be applied over the entire event line. Used in
+ conjunction with `s', as in `gs/OLD/NEW/', or with `&'.
+
+`G'
+ Apply the following `s' modifier once to each word in the event.
+
+
+
+File: bashref.info, Node: Installing Bash, Next: Reporting Bugs, Prev: Using History Interactively, Up: Top
+
+10 Installing Bash
+******************
+
+This chapter provides basic instructions for installing Bash on the
+various supported platforms. The distribution supports the GNU
+operating systems, nearly every version of Unix, and several non-Unix
+systems such as BeOS and Interix. Other independent ports exist for
+MS-DOS, OS/2, and Windows platforms.
+
+* Menu:
+
+* Basic Installation:: Installation instructions.
+* Compilers and Options:: How to set special options for various
+ systems.
+* Compiling For Multiple Architectures:: How to compile Bash for more
+ than one kind of system from
+ the same source tree.
+* Installation Names:: How to set the various paths used by the installation.
+* Specifying the System Type:: How to configure Bash for a particular system.
+* Sharing Defaults:: How to share default configuration values among GNU
+ programs.
+* Operation Controls:: Options recognized by the configuration program.
+* Optional Features:: How to enable and disable optional features when
+ building Bash.
+
+
+File: bashref.info, Node: Basic Installation, Next: Compilers and Options, Up: Installing Bash
+
+10.1 Basic Installation
+=======================
+
+These are installation instructions for Bash.
+
+ The simplest way to compile Bash is:
+
+ 1. `cd' to the directory containing the source code and type
+ `./configure' to configure Bash for your system. If you're using
+ `csh' on an old version of System V, you might need to type `sh
+ ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes some time. While running, it prints
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile Bash and build the `bashbug' bug reporting
+ script.
+
+ 3. Optionally, type `make tests' to run the Bash test suite.
+
+ 4. Type `make install' to install `bash' and `bashbug'. This will
+ also install the manual pages and Info file.
+
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package
+(the top directory, the `builtins', `doc', and `support' directories,
+each directory under `lib', and several others). It also creates a
+`config.h' file containing system-dependent definitions. Finally, it
+creates a shell script named `config.status' that you can run in the
+future to recreate the current configuration, a file `config.cache'
+that saves the results of its tests to speed up reconfiguring, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure'). If at some point `config.cache' contains
+results you don't want to keep, you may remove or edit it.
+
+ To find out more about the options and arguments that the
+`configure' script understands, type
+
+ bash-2.04$ ./configure --help
+
+at the Bash prompt in your Bash source directory.
+
+ If you need to do unusual things to compile Bash, please try to
+figure out how `configure' could check whether or not to do them, and
+mail diffs or instructions to <bash-maintainers@gnu.org> so they can be
+considered for the next release.
+
+ The file `configure.in' is used to create `configure' by a program
+called Autoconf. You only need `configure.in' if you want to change it
+or regenerate `configure' using a newer version of Autoconf. If you do
+this, make sure you are using Autoconf version 2.50 or newer.
+
+ You can remove the program binaries and object files from the source
+code directory by typing `make clean'. To also remove the files that
+`configure' created (so you can compile Bash for a different kind of
+computer), type `make distclean'.
+
+
+File: bashref.info, Node: Compilers and Options, Next: Compiling For Multiple Architectures, Prev: Basic Installation, Up: Installing Bash
+
+10.2 Compilers and Options
+==========================
+
+Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. You can give `configure'
+initial values for variables by setting them in the environment. Using
+a Bourne-compatible shell, you can do that on the command line like
+this:
+
+ CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+
+ On systems that have the `env' program, you can do it like this:
+
+ env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+
+ The configuration process uses GCC to build Bash if it is available.
+
+
+File: bashref.info, Node: Compiling For Multiple Architectures, Next: Installation Names, Prev: Compilers and Options, Up: Installing Bash
+
+10.3 Compiling For Multiple Architectures
+=========================================
+
+You can compile Bash for more than one kind of computer at the same
+time, by placing the object files for each architecture in their own
+directory. To do this, you must use a version of `make' that supports
+the `VPATH' variable, such as GNU `make'. `cd' to the directory where
+you want the object files and executables to go and run the `configure'
+script from the source directory. You may need to supply the
+`--srcdir=PATH' argument to tell `configure' where the source files
+are. `configure' automatically checks for the source code in the
+directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not supports the `VPATH'
+variable, you can compile Bash for one architecture at a time in the
+source code directory. After you have installed Bash for one
+architecture, use `make distclean' before reconfiguring for another
+architecture.
+
+ Alternatively, if your system supports symbolic links, you can use
+the `support/mkclone' script to create a build tree which has symbolic
+links back to each file in the source directory. Here's an example
+that creates a build directory in the current directory from a source
+directory `/usr/gnu/src/bash-2.0':
+
+ bash /usr/gnu/src/bash-2.0/support/mkclone -s /usr/gnu/src/bash-2.0 .
+
+The `mkclone' script requires Bash, so you must have already built Bash
+for at least one architecture before you can create build directories
+for other architectures.
+
+
+File: bashref.info, Node: Installation Names, Next: Specifying the System Type, Prev: Compiling For Multiple Architectures, Up: Installing Bash
+
+10.4 Installation Names
+=======================
+
+By default, `make install' will install into `/usr/local/bin',
+`/usr/local/man', etc. You can specify an installation prefix other
+than `/usr/local' by giving `configure' the option `--prefix=PATH', or
+by specifying a value for the `DESTDIR' `make' variable when running
+`make install'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', `make install' will
+use PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+
+File: bashref.info, Node: Specifying the System Type, Next: Sharing Defaults, Prev: Installation Names, Up: Installing Bash
+
+10.5 Specifying the System Type
+===============================
+
+There may be some features `configure' can not figure out
+automatically, but need to determine by the type of host Bash will run
+on. Usually `configure' can figure that out, but if it prints a
+message saying it can not guess the host type, give it the
+`--host=TYPE' option. `TYPE' can either be a short name for the system
+type, such as `sun4', or a canonical name with three fields:
+`CPU-COMPANY-SYSTEM' (e.g., `i386-unknown-freebsd4.2').
+
+ See the file `support/config.sub' for the possible values of each
+field.
+
+
+File: bashref.info, Node: Sharing Defaults, Next: Operation Controls, Prev: Specifying the System Type, Up: Installing Bash
+
+10.6 Sharing Defaults
+=====================
+
+If you want to set default values for `configure' scripts to share, you
+can create a site shell script called `config.site' that gives default
+values for variables like `CC', `cache_file', and `prefix'. `configure'
+looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: the Bash `configure' looks for a site script, but not all
+`configure' scripts do.
+
+
+File: bashref.info, Node: Operation Controls, Next: Optional Features, Prev: Sharing Defaults, Up: Installing Bash
+
+10.7 Operation Controls
+=======================
+
+`configure' recognizes the following options to control how it operates.
+
+`--cache-file=FILE'
+ Use and save the results of the tests in FILE instead of
+ `./config.cache'. Set FILE to `/dev/null' to disable caching, for
+ debugging `configure'.
+
+`--help'
+ Print a summary of the options to `configure', and exit.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made.
+
+`--srcdir=DIR'
+ Look for the Bash source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`--version'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+ `configure' also accepts some other, not widely used, boilerplate
+options. `configure --help' prints the complete list.
+
+
+File: bashref.info, Node: Optional Features, Prev: Operation Controls, Up: Installing Bash
+
+10.8 Optional Features
+======================
+
+The Bash `configure' has a number of `--enable-FEATURE' options, where
+FEATURE indicates an optional part of Bash. There are also several
+`--with-PACKAGE' options, where PACKAGE is something like `bash-malloc'
+or `purify'. To turn off the default use of a package, use
+`--without-PACKAGE'. To configure Bash without a feature that is
+enabled by default, use `--disable-FEATURE'.
+
+ Here is a complete list of the `--enable-' and `--with-' options
+that the Bash `configure' recognizes.
+
+`--with-afs'
+ Define if you are using the Andrew File System from Transarc.
+
+`--with-bash-malloc'
+ Use the Bash version of `malloc' in the directory `lib/malloc'.
+ This is not the same `malloc' that appears in GNU libc, but an
+ older version originally derived from the 4.2 BSD `malloc'. This
+ `malloc' is very fast, but wastes some space on each allocation.
+ This option is enabled by default. The `NOTES' file contains a
+ list of systems for which this should be turned off, and
+ `configure' disables this option automatically for a number of
+ systems.
+
+`--with-curses'
+ Use the curses library instead of the termcap library. This should
+ be supplied if your system has an inadequate or incomplete termcap
+ database.
+
+`--with-gnu-malloc'
+ A synonym for `--with-bash-malloc'.
+
+`--with-installed-readline[=PREFIX]'
+ Define this to make Bash link with a locally-installed version of
+ Readline rather than the version in `lib/readline'. This works
+ only with Readline 5.0 and later versions. If PREFIX is `yes' or
+ not supplied, `configure' uses the values of the make variables
+ `includedir' and `libdir', which are subdirectories of `prefix' by
+ default, to find the installed version of Readline if it is not in
+ the standard system include and library directories. If PREFIX is
+ `no', Bash links with the version in `lib/readline'. If PREFIX is
+ set to any other value, `configure' treats it as a directory
+ pathname and looks for the installed version of Readline in
+ subdirectories of that directory (include files in
+ PREFIX/`include' and the library in PREFIX/`lib').
+
+`--with-purify'
+ Define this to use the Purify memory allocation checker from
+ Rational Software.
+
+`--enable-minimal-config'
+ This produces a shell with minimal features, close to the
+ historical Bourne shell.
+
+ There are several `--enable-' options that alter how Bash is
+compiled and linked, rather than changing run-time features.
+
+`--enable-largefile'
+ Enable support for large files
+ (http://www.sas.com/standards/large_file/x_open.20Mar96.html) if
+ the operating system requires special compiler options to build
+ programs which can access large files. This is enabled by
+ default, if the operating system provides large file support.
+
+`--enable-profiling'
+ This builds a Bash binary that produces profiling information to be
+ processed by `gprof' each time it is executed.
+
+`--enable-static-link'
+ This causes Bash to be linked statically, if `gcc' is being used.
+ This could be used to build a version to use as root's shell.
+
+ The `minimal-config' option can be used to disable all of the
+following options, but it is processed first, so individual options may
+be enabled using `enable-FEATURE'.
+
+ All of the following options except for `disabled-builtins' and
+`xpg-echo-default' are enabled by default, unless the operating system
+does not provide the necessary support.
+
+`--enable-alias'
+ Allow alias expansion and include the `alias' and `unalias'
+ builtins (*note Aliases::).
+
+`--enable-arith-for-command'
+ Include support for the alternate form of the `for' command that
+ behaves like the C language `for' statement (*note Looping
+ Constructs::).
+
+`--enable-array-variables'
+ Include support for one-dimensional array shell variables (*note
+ Arrays::).
+
+`--enable-bang-history'
+ Include support for `csh'-like history substitution (*note History
+ Interaction::).
+
+`--enable-brace-expansion'
+ Include `csh'-like brace expansion ( `b{a,b}c' ==> `bac bbc' ).
+ See *note Brace Expansion::, for a complete description.
+
+`--enable-casemod-attributes'
+ Include support for case-modifying attributes in the `declare'
+ builtin and assignment statements. Variables with the UPPERCASE
+ attribute, for example, will have their values converted to
+ uppercase upon assignment.
+
+`--enable-casemod-expansion'
+ Include support for case-modifying word expansions.
+
+`--enable-command-timing'
+ Include support for recognizing `time' as a reserved word and for
+ displaying timing statistics for the pipeline following `time'
+ (*note Pipelines::). This allows pipelines as well as shell
+ builtins and functions to be timed.
+
+`--enable-cond-command'
+ Include support for the `[[' conditional command. (*note
+ Conditional Constructs::).
+
+`--enable-cond-regexp'
+ Include support for matching POSIX regular expressions using the
+ `=~' binary operator in the `[[' conditional command. (*note
+ Conditional Constructs::).
+
+`--enable-coprocesses'
+ Include support for coprocesses and the `coproc' reserved word
+ (*note Pipelines::).
+
+`--enable-debugger'
+ Include support for the bash debugger (distributed separately).
+
+`--enable-directory-stack'
+ Include support for a `csh'-like directory stack and the `pushd',
+ `popd', and `dirs' builtins (*note The Directory Stack::).
+
+`--enable-disabled-builtins'
+ Allow builtin commands to be invoked via `builtin xxx' even after
+ `xxx' has been disabled using `enable -n xxx'. See *note Bash
+ Builtins::, for details of the `builtin' and `enable' builtin
+ commands.
+
+`--enable-dparen-arithmetic'
+ Include support for the `((...))' command (*note Conditional
+ Constructs::).
+
+`--enable-extended-glob'
+ Include support for the extended pattern matching features
+ described above under *note Pattern Matching::.
+
+`--enable-extended-glob-default'
+ Set the default value of the EXTGLOB shell option described above
+ under *note The Shopt Builtin:: to be enabled.
+
+`--enable-help-builtin'
+ Include the `help' builtin, which displays help on shell builtins
+ and variables (*note Bash Builtins::).
+
+`--enable-history'
+ Include command history and the `fc' and `history' builtin
+ commands (*note Bash History Facilities::).
+
+`--enable-job-control'
+ This enables the job control features (*note Job Control::), if
+ the operating system supports them.
+
+`--enable-multibyte'
+ This enables support for multibyte characters if the operating
+ system provides the necessary support.
+
+`--enable-net-redirections'
+ This enables the special handling of filenames of the form
+ `/dev/tcp/HOST/PORT' and `/dev/udp/HOST/PORT' when used in
+ redirections (*note Redirections::).
+
+`--enable-process-substitution'
+ This enables process substitution (*note Process Substitution::) if
+ the operating system provides the necessary support.
+
+`--enable-progcomp'
+ Enable the programmable completion facilities (*note Programmable
+ Completion::). If Readline is not enabled, this option has no
+ effect.
+
+`--enable-prompt-string-decoding'
+ Turn on the interpretation of a number of backslash-escaped
+ characters in the `$PS1', `$PS2', `$PS3', and `$PS4' prompt
+ strings. See *note Printing a Prompt::, for a complete list of
+ prompt string escape sequences.
+
+`--enable-readline'
+ Include support for command-line editing and history with the Bash
+ version of the Readline library (*note Command Line Editing::).
+
+`--enable-restricted'
+ Include support for a "restricted shell". If this is enabled,
+ Bash, when called as `rbash', enters a restricted mode. See *note
+ The Restricted Shell::, for a description of restricted mode.
+
+`--enable-select'
+ Include the `select' builtin, which allows the generation of simple
+ menus (*note Conditional Constructs::).
+
+`--enable-separate-helpfiles'
+ Use external files for the documentation displayed by the `help'
+ builtin instead of storing the text internally.
+
+`--enable-single-help-strings'
+ Store the text displayed by the `help' builtin as a single string
+ for each help topic. This aids in translating the text to
+ different languages. You may need to disable this if your
+ compiler cannot handle very long string literals.
+
+`--enable-strict-posix-default'
+ Make Bash POSIX-conformant by default (*note Bash POSIX Mode::).
+
+`--enable-usg-echo-default'
+ A synonym for `--enable-xpg-echo-default'.
+
+`--enable-xpg-echo-default'
+ Make the `echo' builtin expand backslash-escaped characters by
+ default, without requiring the `-e' option. This sets the default
+ value of the `xpg_echo' shell option to `on', which makes the Bash
+ `echo' behave more like the version specified in the Single Unix
+ Specification, version 3. *Note Bash Builtins::, for a
+ description of the escape sequences that `echo' recognizes.
+
+
+ The file `config-top.h' contains C Preprocessor `#define' statements
+for options which are not settable from `configure'. Some of these are
+not meant to be changed; beware of the consequences if you do. Read
+the comments associated with each definition for more information about
+its effect.
+
+
+File: bashref.info, Node: Reporting Bugs, Next: Major Differences From The Bourne Shell, Prev: Installing Bash, Up: Top
+
+Appendix A Reporting Bugs
+*************************
+
+Please report all bugs you find in Bash. But first, you should make
+sure that it really is a bug, and that it appears in the latest version
+of Bash. The latest version of Bash is always available for FTP from
+`ftp://ftp.gnu.org/pub/gnu/bash/'.
+
+ Once you have determined that a bug actually exists, use the
+`bashbug' command to submit a bug report. If you have a fix, you are
+encouraged to mail that as well! Suggestions and `philosophical' bug
+reports may be mailed to <bug-bash@gnu.org> or posted to the Usenet
+newsgroup `gnu.bash.bug'.
+
+ All bug reports should include:
+ * The version number of Bash.
+
+ * The hardware and operating system.
+
+ * The compiler used to compile Bash.
+
+ * A description of the bug behaviour.
+
+ * A short script or `recipe' which exercises the bug and may be used
+ to reproduce it.
+
+`bashbug' inserts the first three items automatically into the template
+it provides for filing a bug report.
+
+ Please send all reports concerning this manual to
+<chet.ramey@case.edu>.
+
+
+File: bashref.info, Node: Major Differences From The Bourne Shell, Next: GNU Free Documentation License, Prev: Reporting Bugs, Up: Top
+
+Appendix B Major Differences From The Bourne Shell
+**************************************************
+
+Bash implements essentially the same grammar, parameter and variable
+expansion, redirection, and quoting as the Bourne Shell. Bash uses the
+POSIX standard as the specification of how these features are to be
+implemented. There are some differences between the traditional Bourne
+shell and Bash; this section quickly details the differences of
+significance. A number of these differences are explained in greater
+depth in previous sections. This section uses the version of `sh'
+included in SVR4.2 (the last version of the historical Bourne shell) as
+the baseline reference.
+
+ * Bash is POSIX-conformant, even where the POSIX specification
+ differs from traditional `sh' behavior (*note Bash POSIX Mode::).
+
+ * Bash has multi-character invocation options (*note Invoking
+ Bash::).
+
+ * Bash has command-line editing (*note Command Line Editing::) and
+ the `bind' builtin.
+
+ * Bash provides a programmable word completion mechanism (*note
+ Programmable Completion::), and builtin commands `complete',
+ `compgen', and `compopt', to manipulate it.
+
+ * Bash has command history (*note Bash History Facilities::) and the
+ `history' and `fc' builtins to manipulate it. The Bash history
+ list maintains timestamp information and uses the value of the
+ `HISTTIMEFORMAT' variable to display it.
+
+ * Bash implements `csh'-like history expansion (*note History
+ Interaction::).
+
+ * Bash has one-dimensional array variables (*note Arrays::), and the
+ appropriate variable expansions and assignment syntax to use them.
+ Several of the Bash builtins take options to act on arrays. Bash
+ provides a number of built-in array variables.
+
+ * The `$'...'' quoting syntax, which expands ANSI-C
+ backslash-escaped characters in the text between the single quotes,
+ is supported (*note ANSI-C Quoting::).
+
+ * Bash supports the `$"..."' quoting syntax to do locale-specific
+ translation of the characters between the double quotes. The
+ `-D', `--dump-strings', and `--dump-po-strings' invocation options
+ list the translatable strings found in a script (*note Locale
+ Translation::).
+
+ * Bash implements the `!' keyword to negate the return value of a
+ pipeline (*note Pipelines::). Very useful when an `if' statement
+ needs to act only if a test fails. The Bash `-o pipefail' option
+ to `set' will cause a pipeline to return a failure status if any
+ command fails.
+
+ * Bash has the `time' reserved word and command timing (*note
+ Pipelines::). The display of the timing statistics may be
+ controlled with the `TIMEFORMAT' variable.
+
+ * Bash implements the `for (( EXPR1 ; EXPR2 ; EXPR3 ))' arithmetic
+ for command, similar to the C language (*note Looping
+ Constructs::).
+
+ * Bash includes the `select' compound command, which allows the
+ generation of simple menus (*note Conditional Constructs::).
+
+ * Bash includes the `[[' compound command, which makes conditional
+ testing part of the shell grammar (*note Conditional
+ Constructs::), including optional regular expression matching.
+
+ * Bash provides optional case-insensitive matching for the `case' and
+ `[[' constructs.
+
+ * Bash includes brace expansion (*note Brace Expansion::) and tilde
+ expansion (*note Tilde Expansion::).
+
+ * Bash implements command aliases and the `alias' and `unalias'
+ builtins (*note Aliases::).
+
+ * Bash provides shell arithmetic, the `((' compound command (*note
+ Conditional Constructs::), and arithmetic expansion (*note Shell
+ Arithmetic::).
+
+ * Variables present in the shell's initial environment are
+ automatically exported to child processes. The Bourne shell does
+ not normally do this unless the variables are explicitly marked
+ using the `export' command.
+
+ * Bash supports the `+=' assignment operator, which appends to the
+ value of the variable named on the left hand side.
+
+ * Bash includes the POSIX pattern removal `%', `#', `%%' and `##'
+ expansions to remove leading or trailing substrings from variable
+ values (*note Shell Parameter Expansion::).
+
+ * The expansion `${#xx}', which returns the length of `${xx}', is
+ supported (*note Shell Parameter Expansion::).
+
+ * The expansion `${var:'OFFSET`[:'LENGTH`]}', which expands to the
+ substring of `var''s value of length LENGTH, beginning at OFFSET,
+ is present (*note Shell Parameter Expansion::).
+
+ * The expansion `${var/[/]'PATTERN`[/'REPLACEMENT`]}', which matches
+ PATTERN and replaces it with REPLACEMENT in the value of `var', is
+ available (*note Shell Parameter Expansion::).
+
+ * The expansion `${!PREFIX}*' expansion, which expands to the names
+ of all shell variables whose names begin with PREFIX, is available
+ (*note Shell Parameter Expansion::).
+
+ * Bash has INDIRECT variable expansion using `${!word}' (*note Shell
+ Parameter Expansion::).
+
+ * Bash can expand positional parameters beyond `$9' using `${NUM}'.
+
+ * The POSIX `$()' form of command substitution is implemented (*note
+ Command Substitution::), and preferred to the Bourne shell's ```'
+ (which is also implemented for backwards compatibility).
+
+ * Bash has process substitution (*note Process Substitution::).
+
+ * Bash automatically assigns variables that provide information
+ about the current user (`UID', `EUID', and `GROUPS'), the current
+ host (`HOSTTYPE', `OSTYPE', `MACHTYPE', and `HOSTNAME'), and the
+ instance of Bash that is running (`BASH', `BASH_VERSION', and
+ `BASH_VERSINFO'). *Note Bash Variables::, for details.
+
+ * The `IFS' variable is used to split only the results of expansion,
+ not all words (*note Word Splitting::). This closes a
+ longstanding shell security hole.
+
+ * Bash implements the full set of POSIX filename expansion operators,
+ including CHARACTER CLASSES, EQUIVALENCE CLASSES, and COLLATING
+ SYMBOLS (*note Filename Expansion::).
+
+ * Bash implements extended pattern matching features when the
+ `extglob' shell option is enabled (*note Pattern Matching::).
+
+ * It is possible to have a variable and a function with the same
+ name; `sh' does not separate the two name spaces.
+
+ * Bash functions are permitted to have local variables using the
+ `local' builtin, and thus useful recursive functions may be written
+ (*note Bash Builtins::).
+
+ * Variable assignments preceding commands affect only that command,
+ even builtins and functions (*note Environment::). In `sh', all
+ variable assignments preceding commands are global unless the
+ command is executed from the file system.
+
+ * Bash performs filename expansion on filenames specified as operands
+ to input and output redirection operators (*note Redirections::).
+
+ * Bash contains the `<>' redirection operator, allowing a file to be
+ opened for both reading and writing, and the `&>' redirection
+ operator, for directing standard output and standard error to the
+ same file (*note Redirections::).
+
+ * Bash includes the `<<<' redirection operator, allowing a string to
+ be used as the standard input to a command.
+
+ * Bash implements the `[n]<&WORD' and `[n]>&WORD' redirection
+ operators, which move one file descriptor to another.
+
+ * Bash treats a number of filenames specially when they are used in
+ redirection operators (*note Redirections::).
+
+ * Bash can open network connections to arbitrary machines and
+ services with the redirection operators (*note Redirections::).
+
+ * The `noclobber' option is available to avoid overwriting existing
+ files with output redirection (*note The Set Builtin::). The `>|'
+ redirection operator may be used to override `noclobber'.
+
+ * The Bash `cd' and `pwd' builtins (*note Bourne Shell Builtins::)
+ each take `-L' and `-P' options to switch between logical and
+ physical modes.
+
+ * Bash allows a function to override a builtin with the same name,
+ and provides access to that builtin's functionality within the
+ function via the `builtin' and `command' builtins (*note Bash
+ Builtins::).
+
+ * The `command' builtin allows selective disabling of functions when
+ command lookup is performed (*note Bash Builtins::).
+
+ * Individual builtins may be enabled or disabled using the `enable'
+ builtin (*note Bash Builtins::).
+
+ * The Bash `exec' builtin takes additional options that allow users
+ to control the contents of the environment passed to the executed
+ command, and what the zeroth argument to the command is to be
+ (*note Bourne Shell Builtins::).
+
+ * Shell functions may be exported to children via the environment
+ using `export -f' (*note Shell Functions::).
+
+ * The Bash `export', `readonly', and `declare' builtins can take a
+ `-f' option to act on shell functions, a `-p' option to display
+ variables with various attributes set in a format that can be used
+ as shell input, a `-n' option to remove various variable
+ attributes, and `name=value' arguments to set variable attributes
+ and values simultaneously.
+
+ * The Bash `hash' builtin allows a name to be associated with an
+ arbitrary filename, even when that filename cannot be found by
+ searching the `$PATH', using `hash -p' (*note Bourne Shell
+ Builtins::).
+
+ * Bash includes a `help' builtin for quick reference to shell
+ facilities (*note Bash Builtins::).
+
+ * The `printf' builtin is available to display formatted output
+ (*note Bash Builtins::).
+
+ * The Bash `read' builtin (*note Bash Builtins::) will read a line
+ ending in `\' with the `-r' option, and will use the `REPLY'
+ variable as a default if no non-option arguments are supplied.
+ The Bash `read' builtin also accepts a prompt string with the `-p'
+ option and will use Readline to obtain the line when given the
+ `-e' option. The `read' builtin also has additional options to
+ control input: the `-s' option will turn off echoing of input
+ characters as they are read, the `-t' option will allow `read' to
+ time out if input does not arrive within a specified number of
+ seconds, the `-n' option will allow reading only a specified
+ number of characters rather than a full line, and the `-d' option
+ will read until a particular character rather than newline.
+
+ * The `return' builtin may be used to abort execution of scripts
+ executed with the `.' or `source' builtins (*note Bourne Shell
+ Builtins::).
+
+ * Bash includes the `shopt' builtin, for finer control of shell
+ optional capabilities (*note The Shopt Builtin::), and allows
+ these options to be set and unset at shell invocation (*note
+ Invoking Bash::).
+
+ * Bash has much more optional behavior controllable with the `set'
+ builtin (*note The Set Builtin::).
+
+ * The `-x' (`xtrace') option displays commands other than simple
+ commands when performing an execution trace (*note The Set
+ Builtin::).
+
+ * The `test' builtin (*note Bourne Shell Builtins::) is slightly
+ different, as it implements the POSIX algorithm, which specifies
+ the behavior based on the number of arguments.
+
+ * Bash includes the `caller' builtin, which displays the context of
+ any active subroutine call (a shell function or a script executed
+ with the `.' or `source' builtins). This supports the bash
+ debugger.
+
+ * The `trap' builtin (*note Bourne Shell Builtins::) allows a
+ `DEBUG' pseudo-signal specification, similar to `EXIT'. Commands
+ specified with a `DEBUG' trap are executed before every simple
+ command, `for' command, `case' command, `select' command, every
+ arithmetic `for' command, and before the first command executes in
+ a shell function. The `DEBUG' trap is not inherited by shell
+ functions unless the function has been given the `trace' attribute
+ or the `functrace' option has been enabled using the `shopt'
+ builtin. The `extdebug' shell option has additional effects on the
+ `DEBUG' trap.
+
+ The `trap' builtin (*note Bourne Shell Builtins::) allows an `ERR'
+ pseudo-signal specification, similar to `EXIT' and `DEBUG'.
+ Commands specified with an `ERR' trap are executed after a simple
+ command fails, with a few exceptions. The `ERR' trap is not
+ inherited by shell functions unless the `-o errtrace' option to
+ the `set' builtin is enabled.
+
+ The `trap' builtin (*note Bourne Shell Builtins::) allows a
+ `RETURN' pseudo-signal specification, similar to `EXIT' and
+ `DEBUG'. Commands specified with an `RETURN' trap are executed
+ before execution resumes after a shell function or a shell script
+ executed with `.' or `source' returns. The `RETURN' trap is not
+ inherited by shell functions unless the function has been given
+ the `trace' attribute or the `functrace' option has been enabled
+ using the `shopt' builtin.
+
+ * The Bash `type' builtin is more extensive and gives more
+ information about the names it finds (*note Bash Builtins::).
+
+ * The Bash `umask' builtin permits a `-p' option to cause the output
+ to be displayed in the form of a `umask' command that may be
+ reused as input (*note Bourne Shell Builtins::).
+
+ * Bash implements a `csh'-like directory stack, and provides the
+ `pushd', `popd', and `dirs' builtins to manipulate it (*note The
+ Directory Stack::). Bash also makes the directory stack visible
+ as the value of the `DIRSTACK' shell variable.
+
+ * Bash interprets special backslash-escaped characters in the prompt
+ strings when interactive (*note Printing a Prompt::).
+
+ * The Bash restricted mode is more useful (*note The Restricted
+ Shell::); the SVR4.2 shell restricted mode is too limited.
+
+ * The `disown' builtin can remove a job from the internal shell job
+ table (*note Job Control Builtins::) or suppress the sending of
+ `SIGHUP' to a job when the shell exits as the result of a `SIGHUP'.
+
+ * Bash includes a number of features to support a separate debugger
+ for shell scripts.
+
+ * The SVR4.2 shell has two privilege-related builtins (`mldmode' and
+ `priv') not present in Bash.
+
+ * Bash does not have the `stop' or `newgrp' builtins.
+
+ * Bash does not use the `SHACCT' variable or perform shell
+ accounting.
+
+ * The SVR4.2 `sh' uses a `TIMEOUT' variable like Bash uses `TMOUT'.
+
+
+More features unique to Bash may be found in *note Bash Features::.
+
+B.1 Implementation Differences From The SVR4.2 Shell
+====================================================
+
+Since Bash is a completely new implementation, it does not suffer from
+many of the limitations of the SVR4.2 shell. For instance:
+
+ * Bash does not fork a subshell when redirecting into or out of a
+ shell control structure such as an `if' or `while' statement.
+
+ * Bash does not allow unbalanced quotes. The SVR4.2 shell will
+ silently insert a needed closing quote at `EOF' under certain
+ circumstances. This can be the cause of some hard-to-find errors.
+
+ * The SVR4.2 shell uses a baroque memory management scheme based on
+ trapping `SIGSEGV'. If the shell is started from a process with
+ `SIGSEGV' blocked (e.g., by using the `system()' C library
+ function call), it misbehaves badly.
+
+ * In a questionable attempt at security, the SVR4.2 shell, when
+ invoked without the `-p' option, will alter its real and effective
+ UID and GID if they are less than some magic threshold value,
+ commonly 100. This can lead to unexpected results.
+
+ * The SVR4.2 shell does not allow users to trap `SIGSEGV',
+ `SIGALRM', or `SIGCHLD'.
+
+ * The SVR4.2 shell does not allow the `IFS', `MAILCHECK', `PATH',
+ `PS1', or `PS2' variables to be unset.
+
+ * The SVR4.2 shell treats `^' as the undocumented equivalent of `|'.
+
+ * Bash allows multiple option arguments when it is invoked (`-x -v');
+ the SVR4.2 shell allows only one option argument (`-xv'). In
+ fact, some versions of the shell dump core if the second argument
+ begins with a `-'.
+
+ * The SVR4.2 shell exits a script if any builtin fails; Bash exits a
+ script only if one of the POSIX special builtins fails, and only
+ for certain failures, as enumerated in the POSIX standard.
+
+ * The SVR4.2 shell behaves differently when invoked as `jsh' (it
+ turns on job control).
+
+
+File: bashref.info, Node: GNU Free Documentation License, Next: Indexes, Prev: Major Differences From The Bourne Shell, Up: Top
+
+Appendix C GNU Free Documentation License
+*****************************************
+
+ Version 1.3, 3 November 2008
+
+ Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+ `http://fsf.org/'
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ 0. PREAMBLE
+
+ The purpose of this License is to make a manual, textbook, or other
+ functional and useful document "free" in the sense of freedom: to
+ assure everyone the effective freedom to copy and redistribute it,
+ with or without modifying it, either commercially or
+ noncommercially. Secondarily, this License preserves for the
+ author and publisher a way to get credit for their work, while not
+ being considered responsible for modifications made by others.
+
+ This License is a kind of "copyleft", which means that derivative
+ works of the document must themselves be free in the same sense.
+ It complements the GNU General Public License, which is a copyleft
+ license designed for free software.
+
+ We have designed this License in order to use it for manuals for
+ free software, because free software needs free documentation: a
+ free program should come with manuals providing the same freedoms
+ that the software does. But this License is not limited to
+ software manuals; it can be used for any textual work, regardless
+ of subject matter or whether it is published as a printed book.
+ We recommend this License principally for works whose purpose is
+ instruction or reference.
+
+ 1. APPLICABILITY AND DEFINITIONS
+
+ This License applies to any manual or other work, in any medium,
+ that contains a notice placed by the copyright holder saying it
+ can be distributed under the terms of this License. Such a notice
+ grants a world-wide, royalty-free license, unlimited in duration,
+ to use that work under the conditions stated herein. The
+ "Document", below, refers to any such manual or work. Any member
+ of the public is a licensee, and is addressed as "you". You
+ accept the license if you copy, modify or distribute the work in a
+ way requiring permission under copyright law.
+
+ A "Modified Version" of the Document means any work containing the
+ Document or a portion of it, either copied verbatim, or with
+ modifications and/or translated into another language.
+
+ A "Secondary Section" is a named appendix or a front-matter section
+ of the Document that deals exclusively with the relationship of the
+ publishers or authors of the Document to the Document's overall
+ subject (or to related matters) and contains nothing that could
+ fall directly within that overall subject. (Thus, if the Document
+ is in part a textbook of mathematics, a Secondary Section may not
+ explain any mathematics.) The relationship could be a matter of
+ historical connection with the subject or with related matters, or
+ of legal, commercial, philosophical, ethical or political position
+ regarding them.
+
+ The "Invariant Sections" are certain Secondary Sections whose
+ titles are designated, as being those of Invariant Sections, in
+ the notice that says that the Document is released under this
+ License. If a section does not fit the above definition of
+ Secondary then it is not allowed to be designated as Invariant.
+ The Document may contain zero Invariant Sections. If the Document
+ does not identify any Invariant Sections then there are none.
+
+ The "Cover Texts" are certain short passages of text that are
+ listed, as Front-Cover Texts or Back-Cover Texts, in the notice
+ that says that the Document is released under this License. A
+ Front-Cover Text may be at most 5 words, and a Back-Cover Text may
+ be at most 25 words.
+
+ A "Transparent" copy of the Document means a machine-readable copy,
+ represented in a format whose specification is available to the
+ general public, that is suitable for revising the document
+ straightforwardly with generic text editors or (for images
+ composed of pixels) generic paint programs or (for drawings) some
+ widely available drawing editor, and that is suitable for input to
+ text formatters or for automatic translation to a variety of
+ formats suitable for input to text formatters. A copy made in an
+ otherwise Transparent file format whose markup, or absence of
+ markup, has been arranged to thwart or discourage subsequent
+ modification by readers is not Transparent. An image format is
+ not Transparent if used for any substantial amount of text. A
+ copy that is not "Transparent" is called "Opaque".
+
+ Examples of suitable formats for Transparent copies include plain
+ ASCII without markup, Texinfo input format, LaTeX input format,
+ SGML or XML using a publicly available DTD, and
+ standard-conforming simple HTML, PostScript or PDF designed for
+ human modification. Examples of transparent image formats include
+ PNG, XCF and JPG. Opaque formats include proprietary formats that
+ can be read and edited only by proprietary word processors, SGML or
+ XML for which the DTD and/or processing tools are not generally
+ available, and the machine-generated HTML, PostScript or PDF
+ produced by some word processors for output purposes only.
+
+ The "Title Page" means, for a printed book, the title page itself,
+ plus such following pages as are needed to hold, legibly, the
+ material this License requires to appear in the title page. For
+ works in formats which do not have any title page as such, "Title
+ Page" means the text near the most prominent appearance of the
+ work's title, preceding the beginning of the body of the text.
+
+ The "publisher" means any person or entity that distributes copies
+ of the Document to the public.
+
+ A section "Entitled XYZ" means a named subunit of the Document
+ whose title either is precisely XYZ or contains XYZ in parentheses
+ following text that translates XYZ in another language. (Here XYZ
+ stands for a specific section name mentioned below, such as
+ "Acknowledgements", "Dedications", "Endorsements", or "History".)
+ To "Preserve the Title" of such a section when you modify the
+ Document means that it remains a section "Entitled XYZ" according
+ to this definition.
+
+ The Document may include Warranty Disclaimers next to the notice
+ which states that this License applies to the Document. These
+ Warranty Disclaimers are considered to be included by reference in
+ this License, but only as regards disclaiming warranties: any other
+ implication that these Warranty Disclaimers may have is void and
+ has no effect on the meaning of this License.
+
+ 2. VERBATIM COPYING
+
+ You may copy and distribute the Document in any medium, either
+ commercially or noncommercially, provided that this License, the
+ copyright notices, and the license notice saying this License
+ applies to the Document are reproduced in all copies, and that you
+ add no other conditions whatsoever to those of this License. You
+ may not use technical measures to obstruct or control the reading
+ or further copying of the copies you make or distribute. However,
+ you may accept compensation in exchange for copies. If you
+ distribute a large enough number of copies you must also follow
+ the conditions in section 3.
+
+ You may also lend copies, under the same conditions stated above,
+ and you may publicly display copies.
+
+ 3. COPYING IN QUANTITY
+
+ If you publish printed copies (or copies in media that commonly
+ have printed covers) of the Document, numbering more than 100, and
+ the Document's license notice requires Cover Texts, you must
+ enclose the copies in covers that carry, clearly and legibly, all
+ these Cover Texts: Front-Cover Texts on the front cover, and
+ Back-Cover Texts on the back cover. Both covers must also clearly
+ and legibly identify you as the publisher of these copies. The
+ front cover must present the full title with all words of the
+ title equally prominent and visible. You may add other material
+ on the covers in addition. Copying with changes limited to the
+ covers, as long as they preserve the title of the Document and
+ satisfy these conditions, can be treated as verbatim copying in
+ other respects.
+
+ If the required texts for either cover are too voluminous to fit
+ legibly, you should put the first ones listed (as many as fit
+ reasonably) on the actual cover, and continue the rest onto
+ adjacent pages.
+
+ If you publish or distribute Opaque copies of the Document
+ numbering more than 100, you must either include a
+ machine-readable Transparent copy along with each Opaque copy, or
+ state in or with each Opaque copy a computer-network location from
+ which the general network-using public has access to download
+ using public-standard network protocols a complete Transparent
+ copy of the Document, free of added material. If you use the
+ latter option, you must take reasonably prudent steps, when you
+ begin distribution of Opaque copies in quantity, to ensure that
+ this Transparent copy will remain thus accessible at the stated
+ location until at least one year after the last time you
+ distribute an Opaque copy (directly or through your agents or
+ retailers) of that edition to the public.
+
+ It is requested, but not required, that you contact the authors of
+ the Document well before redistributing any large number of
+ copies, to give them a chance to provide you with an updated
+ version of the Document.
+
+ 4. MODIFICATIONS
+
+ You may copy and distribute a Modified Version of the Document
+ under the conditions of sections 2 and 3 above, provided that you
+ release the Modified Version under precisely this License, with
+ the Modified Version filling the role of the Document, thus
+ licensing distribution and modification of the Modified Version to
+ whoever possesses a copy of it. In addition, you must do these
+ things in the Modified Version:
+
+ A. Use in the Title Page (and on the covers, if any) a title
+ distinct from that of the Document, and from those of
+ previous versions (which should, if there were any, be listed
+ in the History section of the Document). You may use the
+ same title as a previous version if the original publisher of
+ that version gives permission.
+
+ B. List on the Title Page, as authors, one or more persons or
+ entities responsible for authorship of the modifications in
+ the Modified Version, together with at least five of the
+ principal authors of the Document (all of its principal
+ authors, if it has fewer than five), unless they release you
+ from this requirement.
+
+ C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+
+ D. Preserve all the copyright notices of the Document.
+
+ E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+
+ F. Include, immediately after the copyright notices, a license
+ notice giving the public permission to use the Modified
+ Version under the terms of this License, in the form shown in
+ the Addendum below.
+
+ G. Preserve in that license notice the full lists of Invariant
+ Sections and required Cover Texts given in the Document's
+ license notice.
+
+ H. Include an unaltered copy of this License.
+
+ I. Preserve the section Entitled "History", Preserve its Title,
+ and add to it an item stating at least the title, year, new
+ authors, and publisher of the Modified Version as given on
+ the Title Page. If there is no section Entitled "History" in
+ the Document, create one stating the title, year, authors,
+ and publisher of the Document as given on its Title Page,
+ then add an item describing the Modified Version as stated in
+ the previous sentence.
+
+ J. Preserve the network location, if any, given in the Document
+ for public access to a Transparent copy of the Document, and
+ likewise the network locations given in the Document for
+ previous versions it was based on. These may be placed in
+ the "History" section. You may omit a network location for a
+ work that was published at least four years before the
+ Document itself, or if the original publisher of the version
+ it refers to gives permission.
+
+ K. For any section Entitled "Acknowledgements" or "Dedications",
+ Preserve the Title of the section, and preserve in the
+ section all the substance and tone of each of the contributor
+ acknowledgements and/or dedications given therein.
+
+ L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section
+ titles.
+
+ M. Delete any section Entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+
+ N. Do not retitle any existing section to be Entitled
+ "Endorsements" or to conflict in title with any Invariant
+ Section.
+
+ O. Preserve any Warranty Disclaimers.
+
+ If the Modified Version includes new front-matter sections or
+ appendices that qualify as Secondary Sections and contain no
+ material copied from the Document, you may at your option
+ designate some or all of these sections as invariant. To do this,
+ add their titles to the list of Invariant Sections in the Modified
+ Version's license notice. These titles must be distinct from any
+ other section titles.
+
+ You may add a section Entitled "Endorsements", provided it contains
+ nothing but endorsements of your Modified Version by various
+ parties--for example, statements of peer review or that the text
+ has been approved by an organization as the authoritative
+ definition of a standard.
+
+ You may add a passage of up to five words as a Front-Cover Text,
+ and a passage of up to 25 words as a Back-Cover Text, to the end
+ of the list of Cover Texts in the Modified Version. Only one
+ passage of Front-Cover Text and one of Back-Cover Text may be
+ added by (or through arrangements made by) any one entity. If the
+ Document already includes a cover text for the same cover,
+ previously added by you or by arrangement made by the same entity
+ you are acting on behalf of, you may not add another; but you may
+ replace the old one, on explicit permission from the previous
+ publisher that added the old one.
+
+ The author(s) and publisher(s) of the Document do not by this
+ License give permission to use their names for publicity for or to
+ assert or imply endorsement of any Modified Version.
+
+ 5. COMBINING DOCUMENTS
+
+ You may combine the Document with other documents released under
+ this License, under the terms defined in section 4 above for
+ modified versions, provided that you include in the combination
+ all of the Invariant Sections of all of the original documents,
+ unmodified, and list them all as Invariant Sections of your
+ combined work in its license notice, and that you preserve all
+ their Warranty Disclaimers.
+
+ The combined work need only contain one copy of this License, and
+ multiple identical Invariant Sections may be replaced with a single
+ copy. If there are multiple Invariant Sections with the same name
+ but different contents, make the title of each such section unique
+ by adding at the end of it, in parentheses, the name of the
+ original author or publisher of that section if known, or else a
+ unique number. Make the same adjustment to the section titles in
+ the list of Invariant Sections in the license notice of the
+ combined work.
+
+ In the combination, you must combine any sections Entitled
+ "History" in the various original documents, forming one section
+ Entitled "History"; likewise combine any sections Entitled
+ "Acknowledgements", and any sections Entitled "Dedications". You
+ must delete all sections Entitled "Endorsements."
+
+ 6. COLLECTIONS OF DOCUMENTS
+
+ You may make a collection consisting of the Document and other
+ documents released under this License, and replace the individual
+ copies of this License in the various documents with a single copy
+ that is included in the collection, provided that you follow the
+ rules of this License for verbatim copying of each of the
+ documents in all other respects.
+
+ You may extract a single document from such a collection, and
+ distribute it individually under this License, provided you insert
+ a copy of this License into the extracted document, and follow
+ this License in all other respects regarding verbatim copying of
+ that document.
+
+ 7. AGGREGATION WITH INDEPENDENT WORKS
+
+ A compilation of the Document or its derivatives with other
+ separate and independent documents or works, in or on a volume of
+ a storage or distribution medium, is called an "aggregate" if the
+ copyright resulting from the compilation is not used to limit the
+ legal rights of the compilation's users beyond what the individual
+ works permit. When the Document is included in an aggregate, this
+ License does not apply to the other works in the aggregate which
+ are not themselves derivative works of the Document.
+
+ If the Cover Text requirement of section 3 is applicable to these
+ copies of the Document, then if the Document is less than one half
+ of the entire aggregate, the Document's Cover Texts may be placed
+ on covers that bracket the Document within the aggregate, or the
+ electronic equivalent of covers if the Document is in electronic
+ form. Otherwise they must appear on printed covers that bracket
+ the whole aggregate.
+
+ 8. TRANSLATION
+
+ Translation is considered a kind of modification, so you may
+ distribute translations of the Document under the terms of section
+ 4. Replacing Invariant Sections with translations requires special
+ permission from their copyright holders, but you may include
+ translations of some or all Invariant Sections in addition to the
+ original versions of these Invariant Sections. You may include a
+ translation of this License, and all the license notices in the
+ Document, and any Warranty Disclaimers, provided that you also
+ include the original English version of this License and the
+ original versions of those notices and disclaimers. In case of a
+ disagreement between the translation and the original version of
+ this License or a notice or disclaimer, the original version will
+ prevail.
+
+ If a section in the Document is Entitled "Acknowledgements",
+ "Dedications", or "History", the requirement (section 4) to
+ Preserve its Title (section 1) will typically require changing the
+ actual title.
+
+ 9. TERMINATION
+
+ You may not copy, modify, sublicense, or distribute the Document
+ except as expressly provided under this License. Any attempt
+ otherwise to copy, modify, sublicense, or distribute it is void,
+ and will automatically terminate your rights under this License.
+
+ However, if you cease all violation of this License, then your
+ license from a particular copyright holder is reinstated (a)
+ provisionally, unless and until the copyright holder explicitly
+ and finally terminates your license, and (b) permanently, if the
+ copyright holder fails to notify you of the violation by some
+ reasonable means prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+ reinstated permanently if the copyright holder notifies you of the
+ violation by some reasonable means, this is the first time you have
+ received notice of violation of this License (for any work) from
+ that copyright holder, and you cure the violation prior to 30 days
+ after your receipt of the notice.
+
+ Termination of your rights under this section does not terminate
+ the licenses of parties who have received copies or rights from
+ you under this License. If your rights have been terminated and
+ not permanently reinstated, receipt of a copy of some or all of
+ the same material does not give you any rights to use it.
+
+ 10. FUTURE REVISIONS OF THIS LICENSE
+
+ The Free Software Foundation may publish new, revised versions of
+ the GNU Free Documentation License from time to time. Such new
+ versions will be similar in spirit to the present version, but may
+ differ in detail to address new problems or concerns. See
+ `http://www.gnu.org/copyleft/'.
+
+ Each version of the License is given a distinguishing version
+ number. If the Document specifies that a particular numbered
+ version of this License "or any later version" applies to it, you
+ have the option of following the terms and conditions either of
+ that specified version or of any later version that has been
+ published (not as a draft) by the Free Software Foundation. If
+ the Document does not specify a version number of this License,
+ you may choose any version ever published (not as a draft) by the
+ Free Software Foundation. If the Document specifies that a proxy
+ can decide which future versions of this License can be used, that
+ proxy's public statement of acceptance of a version permanently
+ authorizes you to choose that version for the Document.
+
+ 11. RELICENSING
+
+ "Massive Multiauthor Collaboration Site" (or "MMC Site") means any
+ World Wide Web server that publishes copyrightable works and also
+ provides prominent facilities for anybody to edit those works. A
+ public wiki that anybody can edit is an example of such a server.
+ A "Massive Multiauthor Collaboration" (or "MMC") contained in the
+ site means any set of copyrightable works thus published on the MMC
+ site.
+
+ "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
+ license published by Creative Commons Corporation, a not-for-profit
+ corporation with a principal place of business in San Francisco,
+ California, as well as future copyleft versions of that license
+ published by that same organization.
+
+ "Incorporate" means to publish or republish a Document, in whole or
+ in part, as part of another Document.
+
+ An MMC is "eligible for relicensing" if it is licensed under this
+ License, and if all works that were first published under this
+ License somewhere other than this MMC, and subsequently
+ incorporated in whole or in part into the MMC, (1) had no cover
+ texts or invariant sections, and (2) were thus incorporated prior
+ to November 1, 2008.
+
+ The operator of an MMC Site may republish an MMC contained in the
+ site under CC-BY-SA on the same site at any time before August 1,
+ 2009, provided the MMC is eligible for relicensing.
+
+
+ADDENDUM: How to use this License for your documents
+====================================================
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and license
+notices just after the title page:
+
+ Copyright (C) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
+ Texts. A copy of the license is included in the section entitled ``GNU
+ Free Documentation License''.
+
+ If you have Invariant Sections, Front-Cover Texts and Back-Cover
+Texts, replace the "with...Texts." line with this:
+
+ with the Invariant Sections being LIST THEIR TITLES, with
+ the Front-Cover Texts being LIST, and with the Back-Cover Texts
+ being LIST.
+
+ If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+ If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License, to
+permit their use in free software.
+
+
+File: bashref.info, Node: Indexes, Prev: GNU Free Documentation License, Up: Top
+
+Appendix D Indexes
+******************
+
+* Menu:
+
+* Builtin Index:: Index of Bash builtin commands.
+* Reserved Word Index:: Index of Bash reserved words.
+* Variable Index:: Quick reference helps you find the
+ variable you want.
+* Function Index:: Index of bindable Readline functions.
+* Concept Index:: General index for concepts described in
+ this manual.
+
+
+File: bashref.info, Node: Builtin Index, Next: Reserved Word Index, Up: Indexes
+
+D.1 Index of Shell Builtin Commands
+===================================
+
+
+* Menu:
+
+* .: Bourne Shell Builtins.
+ (line 16)
+* :: Bourne Shell Builtins.
+ (line 11)
+* [: Bourne Shell Builtins.
+ (line 213)
+* alias: Bash Builtins. (line 11)
+* bg: Job Control Builtins.
+ (line 7)
+* bind: Bash Builtins. (line 21)
+* break: Bourne Shell Builtins.
+ (line 29)
+* builtin: Bash Builtins. (line 98)
+* caller: Bash Builtins. (line 106)
+* cd: Bourne Shell Builtins.
+ (line 36)
+* command: Bash Builtins. (line 123)
+* compgen: Programmable Completion Builtins.
+ (line 10)
+* complete: Programmable Completion Builtins.
+ (line 28)
+* compopt: Programmable Completion Builtins.
+ (line 217)
+* continue: Bourne Shell Builtins.
+ (line 55)
+* declare: Bash Builtins. (line 142)
+* dirs: Directory Stack Builtins.
+ (line 7)
+* disown: Job Control Builtins.
+ (line 83)
+* echo: Bash Builtins. (line 221)
+* enable: Bash Builtins. (line 273)
+* eval: Bourne Shell Builtins.
+ (line 63)
+* exec: Bourne Shell Builtins.
+ (line 70)
+* exit: Bourne Shell Builtins.
+ (line 82)
+* export: Bourne Shell Builtins.
+ (line 88)
+* fc: Bash History Builtins.
+ (line 10)
+* fg: Job Control Builtins.
+ (line 16)
+* getopts: Bourne Shell Builtins.
+ (line 103)
+* hash: Bourne Shell Builtins.
+ (line 145)
+* help: Bash Builtins. (line 301)
+* history: Bash History Builtins.
+ (line 39)
+* jobs: Job Control Builtins.
+ (line 25)
+* kill: Job Control Builtins.
+ (line 57)
+* let: Bash Builtins. (line 321)
+* local: Bash Builtins. (line 328)
+* logout: Bash Builtins. (line 338)
+* mapfile: Bash Builtins. (line 342)
+* popd: Directory Stack Builtins.
+ (line 37)
+* printf: Bash Builtins. (line 388)
+* pushd: Directory Stack Builtins.
+ (line 58)
+* pwd: Bourne Shell Builtins.
+ (line 163)
+* read: Bash Builtins. (line 413)
+* readarray: Bash Builtins. (line 493)
+* readonly: Bourne Shell Builtins.
+ (line 172)
+* return: Bourne Shell Builtins.
+ (line 188)
+* set: The Set Builtin. (line 11)
+* shift: Bourne Shell Builtins.
+ (line 201)
+* shopt: The Shopt Builtin. (line 9)
+* source: Bash Builtins. (line 501)
+* suspend: Job Control Builtins.
+ (line 94)
+* test: Bourne Shell Builtins.
+ (line 213)
+* times: Bourne Shell Builtins.
+ (line 281)
+* trap: Bourne Shell Builtins.
+ (line 286)
+* type: Bash Builtins. (line 505)
+* typeset: Bash Builtins. (line 536)
+* ulimit: Bash Builtins. (line 542)
+* umask: Bourne Shell Builtins.
+ (line 332)
+* unalias: Bash Builtins. (line 630)
+* unset: Bourne Shell Builtins.
+ (line 349)
+* wait: Job Control Builtins.
+ (line 73)
+
+
+File: bashref.info, Node: Reserved Word Index, Next: Variable Index, Prev: Builtin Index, Up: Indexes
+
+D.2 Index of Shell Reserved Words
+=================================
+
+
+* Menu:
+
+* !: Pipelines. (line 9)
+* [[: Conditional Constructs.
+ (line 117)
+* ]]: Conditional Constructs.
+ (line 117)
+* case: Conditional Constructs.
+ (line 28)
+* do: Looping Constructs. (line 12)
+* done: Looping Constructs. (line 12)
+* elif: Conditional Constructs.
+ (line 7)
+* else: Conditional Constructs.
+ (line 7)
+* esac: Conditional Constructs.
+ (line 28)
+* fi: Conditional Constructs.
+ (line 7)
+* for: Looping Constructs. (line 29)
+* function: Shell Functions. (line 13)
+* if: Conditional Constructs.
+ (line 7)
+* in: Conditional Constructs.
+ (line 28)
+* select: Conditional Constructs.
+ (line 76)
+* then: Conditional Constructs.
+ (line 7)
+* time: Pipelines. (line 9)
+* until: Looping Constructs. (line 12)
+* while: Looping Constructs. (line 20)
+* {: Command Grouping. (line 21)
+* }: Command Grouping. (line 21)
+
+
+File: bashref.info, Node: Variable Index, Next: Function Index, Prev: Reserved Word Index, Up: Indexes
+
+D.3 Parameter and Variable Index
+================================
+
+
+* Menu:
+
+* !: Special Parameters. (line 46)
+* #: Special Parameters. (line 30)
+* $: Special Parameters. (line 42)
+* *: Special Parameters. (line 9)
+* -: Special Parameters. (line 37)
+* 0: Special Parameters. (line 50)
+* ?: Special Parameters. (line 33)
+* @: Special Parameters. (line 19)
+* _: Special Parameters. (line 59)
+* auto_resume: Job Control Variables.
+ (line 6)
+* BASH: Bash Variables. (line 13)
+* BASH_ALIASES: Bash Variables. (line 30)
+* BASH_ARGC: Bash Variables. (line 37)
+* BASH_ARGV: Bash Variables. (line 47)
+* BASH_CMDS: Bash Variables. (line 57)
+* BASH_COMMAND: Bash Variables. (line 64)
+* BASH_ENV: Bash Variables. (line 69)
+* BASH_EXECUTION_STRING: Bash Variables. (line 75)
+* BASH_LINENO: Bash Variables. (line 78)
+* BASH_REMATCH: Bash Variables. (line 87)
+* BASH_SOURCE: Bash Variables. (line 95)
+* BASH_SUBSHELL: Bash Variables. (line 99)
+* BASH_VERSINFO: Bash Variables. (line 103)
+* BASH_VERSION: Bash Variables. (line 127)
+* BASH_XTRACEFD: Bash Variables. (line 130)
+* BASHOPTS: Bash Variables. (line 16)
+* BASHPID: Bash Variables. (line 25)
+* bell-style: Readline Init File Syntax.
+ (line 38)
+* bind-tty-special-chars: Readline Init File Syntax.
+ (line 45)
+* CDPATH: Bourne Shell Variables.
+ (line 9)
+* COLUMNS: Bash Variables. (line 141)
+* comment-begin: Readline Init File Syntax.
+ (line 50)
+* COMP_CWORD: Bash Variables. (line 146)
+* COMP_KEY: Bash Variables. (line 175)
+* COMP_LINE: Bash Variables. (line 152)
+* COMP_POINT: Bash Variables. (line 157)
+* COMP_TYPE: Bash Variables. (line 165)
+* COMP_WORDBREAKS: Bash Variables. (line 179)
+* COMP_WORDS: Bash Variables. (line 185)
+* completion-prefix-display-length: Readline Init File Syntax.
+ (line 60)
+* completion-query-items: Readline Init File Syntax.
+ (line 67)
+* COMPREPLY: Bash Variables. (line 193)
+* convert-meta: Readline Init File Syntax.
+ (line 77)
+* DIRSTACK: Bash Variables. (line 198)
+* disable-completion: Readline Init File Syntax.
+ (line 83)
+* editing-mode: Readline Init File Syntax.
+ (line 88)
+* EMACS: Bash Variables. (line 208)
+* enable-keypad: Readline Init File Syntax.
+ (line 99)
+* EUID: Bash Variables. (line 213)
+* expand-tilde: Readline Init File Syntax.
+ (line 110)
+* FCEDIT: Bash Variables. (line 217)
+* FIGNORE: Bash Variables. (line 221)
+* FUNCNAME: Bash Variables. (line 227)
+* GLOBIGNORE: Bash Variables. (line 236)
+* GROUPS: Bash Variables. (line 242)
+* histchars: Bash Variables. (line 248)
+* HISTCMD: Bash Variables. (line 263)
+* HISTCONTROL: Bash Variables. (line 268)
+* HISTFILE: Bash Variables. (line 284)
+* HISTFILESIZE: Bash Variables. (line 288)
+* HISTIGNORE: Bash Variables. (line 296)
+* history-preserve-point: Readline Init File Syntax.
+ (line 114)
+* history-size: Readline Init File Syntax.
+ (line 120)
+* HISTSIZE: Bash Variables. (line 315)
+* HISTTIMEFORMAT: Bash Variables. (line 319)
+* HOME: Bourne Shell Variables.
+ (line 13)
+* horizontal-scroll-mode: Readline Init File Syntax.
+ (line 125)
+* HOSTFILE: Bash Variables. (line 328)
+* HOSTNAME: Bash Variables. (line 339)
+* HOSTTYPE: Bash Variables. (line 342)
+* IFS: Bourne Shell Variables.
+ (line 18)
+* IGNOREEOF: Bash Variables. (line 345)
+* input-meta: Readline Init File Syntax.
+ (line 132)
+* INPUTRC: Bash Variables. (line 355)
+* isearch-terminators: Readline Init File Syntax.
+ (line 139)
+* keymap: Readline Init File Syntax.
+ (line 146)
+* LANG: Bash Variables. (line 359)
+* LC_ALL: Bash Variables. (line 363)
+* LC_COLLATE: Bash Variables. (line 367)
+* LC_CTYPE: Bash Variables. (line 374)
+* LC_MESSAGES <1>: Locale Translation. (line 11)
+* LC_MESSAGES: Bash Variables. (line 379)
+* LC_NUMERIC: Bash Variables. (line 383)
+* LINENO: Bash Variables. (line 387)
+* LINES: Bash Variables. (line 391)
+* MACHTYPE: Bash Variables. (line 396)
+* MAIL: Bourne Shell Variables.
+ (line 22)
+* MAILCHECK: Bash Variables. (line 400)
+* MAILPATH: Bourne Shell Variables.
+ (line 27)
+* mark-modified-lines: Readline Init File Syntax.
+ (line 159)
+* mark-symlinked-directories: Readline Init File Syntax.
+ (line 164)
+* match-hidden-files: Readline Init File Syntax.
+ (line 169)
+* meta-flag: Readline Init File Syntax.
+ (line 132)
+* OLDPWD: Bash Variables. (line 408)
+* OPTARG: Bourne Shell Variables.
+ (line 34)
+* OPTERR: Bash Variables. (line 411)
+* OPTIND: Bourne Shell Variables.
+ (line 38)
+* OSTYPE: Bash Variables. (line 415)
+* output-meta: Readline Init File Syntax.
+ (line 176)
+* page-completions: Readline Init File Syntax.
+ (line 181)
+* PATH: Bourne Shell Variables.
+ (line 42)
+* PIPESTATUS: Bash Variables. (line 418)
+* POSIXLY_CORRECT: Bash Variables. (line 423)
+* PPID: Bash Variables. (line 432)
+* PROMPT_COMMAND: Bash Variables. (line 436)
+* PROMPT_DIRTRIM: Bash Variables. (line 440)
+* PS1: Bourne Shell Variables.
+ (line 48)
+* PS2: Bourne Shell Variables.
+ (line 53)
+* PS3: Bash Variables. (line 446)
+* PS4: Bash Variables. (line 451)
+* PWD: Bash Variables. (line 457)
+* RANDOM: Bash Variables. (line 460)
+* REPLY: Bash Variables. (line 465)
+* revert-all-at-newline: Readline Init File Syntax.
+ (line 191)
+* SECONDS: Bash Variables. (line 468)
+* SHELL: Bash Variables. (line 474)
+* SHELLOPTS: Bash Variables. (line 479)
+* SHLVL: Bash Variables. (line 488)
+* show-all-if-ambiguous: Readline Init File Syntax.
+ (line 197)
+* show-all-if-unmodified: Readline Init File Syntax.
+ (line 203)
+* skip-completed-text: Readline Init File Syntax.
+ (line 212)
+* TEXTDOMAIN: Locale Translation. (line 11)
+* TEXTDOMAINDIR: Locale Translation. (line 11)
+* TIMEFORMAT: Bash Variables. (line 493)
+* TMOUT: Bash Variables. (line 531)
+* TMPDIR: Bash Variables. (line 543)
+* UID: Bash Variables. (line 547)
+* visible-stats: Readline Init File Syntax.
+ (line 225)
+
+
+File: bashref.info, Node: Function Index, Next: Concept Index, Prev: Variable Index, Up: Indexes
+
+D.4 Function Index
+==================
+
+
+* Menu:
+
+* abort (C-g): Miscellaneous Commands.
+ (line 10)
+* accept-line (Newline or Return): Commands For History. (line 6)
+* backward-char (C-b): Commands For Moving. (line 15)
+* backward-delete-char (Rubout): Commands For Text. (line 11)
+* backward-kill-line (C-x Rubout): Commands For Killing. (line 9)
+* backward-kill-word (M-<DEL>): Commands For Killing. (line 24)
+* backward-word (M-b): Commands For Moving. (line 22)
+* beginning-of-history (M-<): Commands For History. (line 20)
+* beginning-of-line (C-a): Commands For Moving. (line 6)
+* call-last-kbd-macro (C-x e): Keyboard Macros. (line 13)
+* capitalize-word (M-c): Commands For Text. (line 46)
+* character-search (C-]): Miscellaneous Commands.
+ (line 41)
+* character-search-backward (M-C-]): Miscellaneous Commands.
+ (line 46)
+* clear-screen (C-l): Commands For Moving. (line 34)
+* complete (<TAB>): Commands For Completion.
+ (line 6)
+* copy-backward-word (): Commands For Killing. (line 58)
+* copy-forward-word (): Commands For Killing. (line 63)
+* copy-region-as-kill (): Commands For Killing. (line 54)
+* delete-char (C-d): Commands For Text. (line 6)
+* delete-char-or-list (): Commands For Completion.
+ (line 39)
+* delete-horizontal-space (): Commands For Killing. (line 46)
+* digit-argument (M-0, M-1, ... M--): Numeric Arguments. (line 6)
+* do-uppercase-version (M-a, M-b, M-X, ...): Miscellaneous Commands.
+ (line 14)
+* downcase-word (M-l): Commands For Text. (line 42)
+* dump-functions (): Miscellaneous Commands.
+ (line 73)
+* dump-macros (): Miscellaneous Commands.
+ (line 85)
+* dump-variables (): Miscellaneous Commands.
+ (line 79)
+* end-kbd-macro (C-x )): Keyboard Macros. (line 9)
+* end-of-history (M->): Commands For History. (line 23)
+* end-of-line (C-e): Commands For Moving. (line 9)
+* exchange-point-and-mark (C-x C-x): Miscellaneous Commands.
+ (line 36)
+* forward-backward-delete-char (): Commands For Text. (line 15)
+* forward-char (C-f): Commands For Moving. (line 12)
+* forward-search-history (C-s): Commands For History. (line 31)
+* forward-word (M-f): Commands For Moving. (line 18)
+* history-search-backward (): Commands For History. (line 51)
+* history-search-forward (): Commands For History. (line 46)
+* insert-comment (M-#): Miscellaneous Commands.
+ (line 60)
+* insert-completions (M-*): Commands For Completion.
+ (line 18)
+* kill-line (C-k): Commands For Killing. (line 6)
+* kill-region (): Commands For Killing. (line 50)
+* kill-whole-line (): Commands For Killing. (line 15)
+* kill-word (M-d): Commands For Killing. (line 19)
+* menu-complete (): Commands For Completion.
+ (line 22)
+* menu-complete-backward (): Commands For Completion.
+ (line 34)
+* next-history (C-n): Commands For History. (line 17)
+* non-incremental-forward-search-history (M-n): Commands For History.
+ (line 41)
+* non-incremental-reverse-search-history (M-p): Commands For History.
+ (line 36)
+* overwrite-mode (): Commands For Text. (line 50)
+* possible-completions (M-?): Commands For Completion.
+ (line 15)
+* prefix-meta (<ESC>): Miscellaneous Commands.
+ (line 18)
+* previous-history (C-p): Commands For History. (line 13)
+* quoted-insert (C-q or C-v): Commands For Text. (line 20)
+* re-read-init-file (C-x C-r): Miscellaneous Commands.
+ (line 6)
+* redraw-current-line (): Commands For Moving. (line 38)
+* reverse-search-history (C-r): Commands For History. (line 27)
+* revert-line (M-r): Miscellaneous Commands.
+ (line 25)
+* self-insert (a, b, A, 1, !, ...): Commands For Text. (line 24)
+* set-mark (C-@): Miscellaneous Commands.
+ (line 32)
+* skip-csi-sequence (): Miscellaneous Commands.
+ (line 51)
+* start-kbd-macro (C-x (): Keyboard Macros. (line 6)
+* transpose-chars (C-t): Commands For Text. (line 27)
+* transpose-words (M-t): Commands For Text. (line 33)
+* undo (C-_ or C-x C-u): Miscellaneous Commands.
+ (line 22)
+* universal-argument (): Numeric Arguments. (line 10)
+* unix-filename-rubout (): Commands For Killing. (line 41)
+* unix-line-discard (C-u): Commands For Killing. (line 12)
+* unix-word-rubout (C-w): Commands For Killing. (line 37)
+* upcase-word (M-u): Commands For Text. (line 38)
+* yank (C-y): Commands For Killing. (line 68)
+* yank-last-arg (M-. or M-_): Commands For History. (line 65)
+* yank-nth-arg (M-C-y): Commands For History. (line 56)
+* yank-pop (M-y): Commands For Killing. (line 71)
+
+
+File: bashref.info, Node: Concept Index, Prev: Function Index, Up: Indexes
+
+D.5 Concept Index
+=================
+
+
+* Menu:
+
+* alias expansion: Aliases. (line 6)
+* arithmetic evaluation: Shell Arithmetic. (line 6)
+* arithmetic expansion: Arithmetic Expansion.
+ (line 6)
+* arithmetic, shell: Shell Arithmetic. (line 6)
+* arrays: Arrays. (line 6)
+* background: Job Control Basics. (line 6)
+* Bash configuration: Basic Installation. (line 6)
+* Bash installation: Basic Installation. (line 6)
+* Bourne shell: Basic Shell Features.
+ (line 6)
+* brace expansion: Brace Expansion. (line 6)
+* builtin: Definitions. (line 17)
+* command editing: Readline Bare Essentials.
+ (line 6)
+* command execution: Command Search and Execution.
+ (line 6)
+* command expansion: Simple Command Expansion.
+ (line 6)
+* command history: Bash History Facilities.
+ (line 6)
+* command search: Command Search and Execution.
+ (line 6)
+* command substitution: Command Substitution.
+ (line 6)
+* command timing: Pipelines. (line 9)
+* commands, compound: Compound Commands. (line 6)
+* commands, conditional: Conditional Constructs.
+ (line 6)
+* commands, grouping: Command Grouping. (line 6)
+* commands, lists: Lists. (line 6)
+* commands, looping: Looping Constructs. (line 6)
+* commands, pipelines: Pipelines. (line 6)
+* commands, shell: Shell Commands. (line 6)
+* commands, simple: Simple Commands. (line 6)
+* comments, shell: Comments. (line 6)
+* completion builtins: Programmable Completion Builtins.
+ (line 6)
+* configuration: Basic Installation. (line 6)
+* control operator: Definitions. (line 21)
+* coprocess: Coprocesses. (line 6)
+* directory stack: The Directory Stack. (line 6)
+* editing command lines: Readline Bare Essentials.
+ (line 6)
+* environment: Environment. (line 6)
+* evaluation, arithmetic: Shell Arithmetic. (line 6)
+* event designators: Event Designators. (line 6)
+* execution environment: Command Execution Environment.
+ (line 6)
+* exit status <1>: Exit Status. (line 6)
+* exit status: Definitions. (line 26)
+* expansion: Shell Expansions. (line 6)
+* expansion, arithmetic: Arithmetic Expansion.
+ (line 6)
+* expansion, brace: Brace Expansion. (line 6)
+* expansion, filename: Filename Expansion. (line 9)
+* expansion, parameter: Shell Parameter Expansion.
+ (line 6)
+* expansion, pathname: Filename Expansion. (line 9)
+* expansion, tilde: Tilde Expansion. (line 6)
+* expressions, arithmetic: Shell Arithmetic. (line 6)
+* expressions, conditional: Bash Conditional Expressions.
+ (line 6)
+* field: Definitions. (line 30)
+* filename: Definitions. (line 35)
+* filename expansion: Filename Expansion. (line 9)
+* foreground: Job Control Basics. (line 6)
+* functions, shell: Shell Functions. (line 6)
+* history builtins: Bash History Builtins.
+ (line 6)
+* history events: Event Designators. (line 7)
+* history expansion: History Interaction. (line 6)
+* history list: Bash History Facilities.
+ (line 6)
+* History, how to use: Programmable Completion Builtins.
+ (line 237)
+* identifier: Definitions. (line 51)
+* initialization file, readline: Readline Init File. (line 6)
+* installation: Basic Installation. (line 6)
+* interaction, readline: Readline Interaction.
+ (line 6)
+* interactive shell <1>: Interactive Shells. (line 6)
+* interactive shell: Invoking Bash. (line 127)
+* internationalization: Locale Translation. (line 6)
+* job: Definitions. (line 38)
+* job control <1>: Job Control Basics. (line 6)
+* job control: Definitions. (line 42)
+* kill ring: Readline Killing Commands.
+ (line 19)
+* killing text: Readline Killing Commands.
+ (line 6)
+* localization: Locale Translation. (line 6)
+* login shell: Invoking Bash. (line 124)
+* matching, pattern: Pattern Matching. (line 6)
+* metacharacter: Definitions. (line 46)
+* name: Definitions. (line 51)
+* native languages: Locale Translation. (line 6)
+* notation, readline: Readline Bare Essentials.
+ (line 6)
+* operator, shell: Definitions. (line 57)
+* parameter expansion: Shell Parameter Expansion.
+ (line 6)
+* parameters: Shell Parameters. (line 6)
+* parameters, positional: Positional Parameters.
+ (line 6)
+* parameters, special: Special Parameters. (line 6)
+* pathname expansion: Filename Expansion. (line 9)
+* pattern matching: Pattern Matching. (line 6)
+* pipeline: Pipelines. (line 6)
+* POSIX: Definitions. (line 9)
+* POSIX Mode: Bash POSIX Mode. (line 6)
+* process group: Definitions. (line 62)
+* process group ID: Definitions. (line 66)
+* process substitution: Process Substitution.
+ (line 6)
+* programmable completion: Programmable Completion.
+ (line 6)
+* prompting: Printing a Prompt. (line 6)
+* quoting: Quoting. (line 6)
+* quoting, ANSI: ANSI-C Quoting. (line 6)
+* Readline, how to use: Job Control Variables.
+ (line 24)
+* redirection: Redirections. (line 6)
+* reserved word: Definitions. (line 70)
+* restricted shell: The Restricted Shell.
+ (line 6)
+* return status: Definitions. (line 75)
+* shell arithmetic: Shell Arithmetic. (line 6)
+* shell function: Shell Functions. (line 6)
+* shell script: Shell Scripts. (line 6)
+* shell variable: Shell Parameters. (line 6)
+* shell, interactive: Interactive Shells. (line 6)
+* signal: Definitions. (line 78)
+* signal handling: Signals. (line 6)
+* special builtin <1>: Special Builtins. (line 6)
+* special builtin: Definitions. (line 82)
+* startup files: Bash Startup Files. (line 6)
+* suspending jobs: Job Control Basics. (line 6)
+* tilde expansion: Tilde Expansion. (line 6)
+* token: Definitions. (line 86)
+* translation, native languages: Locale Translation. (line 6)
+* variable, shell: Shell Parameters. (line 6)
+* variables, readline: Readline Init File Syntax.
+ (line 37)
+* word: Definitions. (line 90)
+* word splitting: Word Splitting. (line 6)
+* yanking text: Readline Killing Commands.
+ (line 6)
+
+
+
+Tag Table:
+Node: Top1346
+Node: Introduction3185
+Node: What is Bash?3413
+Node: What is a shell?4526
+Node: Definitions7066
+Node: Basic Shell Features9984
+Node: Shell Syntax11203
+Node: Shell Operation12233
+Node: Quoting13527
+Node: Escape Character14830
+Node: Single Quotes15315
+Node: Double Quotes15663
+Node: ANSI-C Quoting16788
+Node: Locale Translation17773
+Node: Comments18669
+Node: Shell Commands19287
+Node: Simple Commands20111
+Node: Pipelines20742
+Node: Lists22998
+Node: Compound Commands24727
+Node: Looping Constructs25531
+Node: Conditional Constructs27986
+Node: Command Grouping36099
+Node: Coprocesses37578
+Node: Shell Functions39222
+Node: Shell Parameters43776
+Node: Positional Parameters46192
+Node: Special Parameters47092
+Node: Shell Expansions50056
+Node: Brace Expansion51981
+Node: Tilde Expansion54736
+Node: Shell Parameter Expansion57087
+Node: Command Substitution65988
+Node: Arithmetic Expansion67321
+Node: Process Substitution68171
+Node: Word Splitting69221
+Node: Filename Expansion70844
+Node: Pattern Matching72983
+Node: Quote Removal76622
+Node: Redirections76917
+Node: Executing Commands85442
+Node: Simple Command Expansion86112
+Node: Command Search and Execution88042
+Node: Command Execution Environment90379
+Node: Environment93365
+Node: Exit Status95025
+Node: Signals96646
+Node: Shell Scripts98614
+Node: Shell Builtin Commands101132
+Node: Bourne Shell Builtins103160
+Node: Bash Builtins120536
+Node: Modifying Shell Behavior145364
+Node: The Set Builtin145709
+Node: The Shopt Builtin155233
+Node: Special Builtins166095
+Node: Shell Variables167074
+Node: Bourne Shell Variables167514
+Node: Bash Variables169495
+Node: Bash Features192981
+Node: Invoking Bash193864
+Node: Bash Startup Files199673
+Node: Interactive Shells204685
+Node: What is an Interactive Shell?205095
+Node: Is this Shell Interactive?205744
+Node: Interactive Shell Behavior206559
+Node: Bash Conditional Expressions209839
+Node: Shell Arithmetic213488
+Node: Aliases216234
+Node: Arrays218806
+Node: The Directory Stack222764
+Node: Directory Stack Builtins223478
+Node: Printing a Prompt226370
+Node: The Restricted Shell229122
+Node: Bash POSIX Mode230954
+Node: Job Control239011
+Node: Job Control Basics239471
+Node: Job Control Builtins244188
+Node: Job Control Variables248552
+Node: Command Line Editing249710
+Node: Introduction and Notation251277
+Node: Readline Interaction252899
+Node: Readline Bare Essentials254090
+Node: Readline Movement Commands255879
+Node: Readline Killing Commands256844
+Node: Readline Arguments258764
+Node: Searching259808
+Node: Readline Init File261994
+Node: Readline Init File Syntax263141
+Node: Conditional Init Constructs277628
+Node: Sample Init File280161
+Node: Bindable Readline Commands283278
+Node: Commands For Moving284485
+Node: Commands For History285629
+Node: Commands For Text288784
+Node: Commands For Killing291457
+Node: Numeric Arguments293908
+Node: Commands For Completion295047
+Node: Keyboard Macros299007
+Node: Miscellaneous Commands299578
+Node: Readline vi Mode305384
+Node: Programmable Completion306298
+Node: Programmable Completion Builtins313504
+Node: Using History Interactively322640
+Node: Bash History Facilities323324
+Node: Bash History Builtins326238
+Node: History Interaction330095
+Node: Event Designators332800
+Node: Word Designators333815
+Node: Modifiers335454
+Node: Installing Bash336858
+Node: Basic Installation337995
+Node: Compilers and Options340687
+Node: Compiling For Multiple Architectures341428
+Node: Installation Names343092
+Node: Specifying the System Type343910
+Node: Sharing Defaults344626
+Node: Operation Controls345299
+Node: Optional Features346257
+Node: Reporting Bugs355816
+Node: Major Differences From The Bourne Shell357017
+Node: GNU Free Documentation License373704
+Node: Indexes398900
+Node: Builtin Index399354
+Node: Reserved Word Index406181
+Node: Variable Index408629
+Node: Function Index420722
+Node: Concept Index427731
+
+End Tag Table
diff --git a/doc/bashref.pdf b/doc/bashref.pdf
new file mode 100644
index 0000000..61b2472
--- /dev/null
+++ b/doc/bashref.pdf
Binary files differ
diff --git a/doc/bashref.ps b/doc/bashref.ps
new file mode 100644
index 0000000..8eb5d43
--- /dev/null
+++ b/doc/bashref.ps
@@ -0,0 +1,16298 @@
+%!PS-Adobe-2.0
+%%Creator: dvips(k) 5.95a Copyright 2005 Radical Eye Software
+%%Title: bashref.dvi
+%%Pages: 164
+%%PageOrder: Ascend
+%%BoundingBox: 0 0 612 792
+%%DocumentFonts: CMBX12 CMR10 CMTT10 CMSL10 CMSY10 CMMI12 CMMI10 CMCSC10
+%%+ CMTI10 CMSLTT10 CMTT12 CMTT9 CMMI9 CMR9
+%%DocumentPaperSizes: Letter
+%%EndComments
+%DVIPSWebPage: (www.radicaleye.com)
+%DVIPSCommandLine: dvips -D 600 -t letter -o bashref.ps bashref.dvi
+%DVIPSParameters: dpi=600
+%DVIPSSource: TeX output 2009.12.29:1559
+%%BeginProcSet: tex.pro 0 0
+%!
+/TeXDict 300 dict def TeXDict begin/N{def}def/B{bind def}N/S{exch}N/X{S
+N}B/A{dup}B/TR{translate}N/isls false N/vsize 11 72 mul N/hsize 8.5 72
+mul N/landplus90{false}def/@rigin{isls{[0 landplus90{1 -1}{-1 1}ifelse 0
+0 0]concat}if 72 Resolution div 72 VResolution div neg scale isls{
+landplus90{VResolution 72 div vsize mul 0 exch}{Resolution -72 div hsize
+mul 0}ifelse TR}if Resolution VResolution vsize -72 div 1 add mul TR[
+matrix currentmatrix{A A round sub abs 0.00001 lt{round}if}forall round
+exch round exch]setmatrix}N/@landscape{/isls true N}B/@manualfeed{
+statusdict/manualfeed true put}B/@copies{/#copies X}B/FMat[1 0 0 -1 0 0]
+N/FBB[0 0 0 0]N/nn 0 N/IEn 0 N/ctr 0 N/df-tail{/nn 8 dict N nn begin
+/FontType 3 N/FontMatrix fntrx N/FontBBox FBB N string/base X array
+/BitMaps X/BuildChar{CharBuilder}N/Encoding IEn N end A{/foo setfont}2
+array copy cvx N load 0 nn put/ctr 0 N[}B/sf 0 N/df{/sf 1 N/fntrx FMat N
+df-tail}B/dfs{div/sf X/fntrx[sf 0 0 sf neg 0 0]N df-tail}B/E{pop nn A
+definefont setfont}B/Cw{Cd A length 5 sub get}B/Ch{Cd A length 4 sub get
+}B/Cx{128 Cd A length 3 sub get sub}B/Cy{Cd A length 2 sub get 127 sub}
+B/Cdx{Cd A length 1 sub get}B/Ci{Cd A type/stringtype ne{ctr get/ctr ctr
+1 add N}if}B/CharBuilder{save 3 1 roll S A/base get 2 index get S
+/BitMaps get S get/Cd X pop/ctr 0 N Cdx 0 Cx Cy Ch sub Cx Cw add Cy
+setcachedevice Cw Ch true[1 0 0 -1 -.1 Cx sub Cy .1 sub]{Ci}imagemask
+restore}B/D{/cc X A type/stringtype ne{]}if nn/base get cc ctr put nn
+/BitMaps get S ctr S sf 1 ne{A A length 1 sub A 2 index S get sf div put
+}if put/ctr ctr 1 add N}B/I{cc 1 add D}B/bop{userdict/bop-hook known{
+bop-hook}if/SI save N @rigin 0 0 moveto/V matrix currentmatrix A 1 get A
+mul exch 0 get A mul add .99 lt{/QV}{/RV}ifelse load def pop pop}N/eop{
+SI restore userdict/eop-hook known{eop-hook}if showpage}N/@start{
+userdict/start-hook known{start-hook}if pop/VResolution X/Resolution X
+1000 div/DVImag X/IEn 256 array N 2 string 0 1 255{IEn S A 360 add 36 4
+index cvrs cvn put}for pop 65781.76 div/vsize X 65781.76 div/hsize X}N
+/p{show}N/RMat[1 0 0 -1 0 0]N/BDot 260 string N/Rx 0 N/Ry 0 N/V{}B/RV/v{
+/Ry X/Rx X V}B statusdict begin/product where{pop false[(Display)(NeXT)
+(LaserWriter 16/600)]{A length product length le{A length product exch 0
+exch getinterval eq{pop true exit}if}{pop}ifelse}forall}{false}ifelse
+end{{gsave TR -.1 .1 TR 1 1 scale Rx Ry false RMat{BDot}imagemask
+grestore}}{{gsave TR -.1 .1 TR Rx Ry scale 1 1 false RMat{BDot}
+imagemask grestore}}ifelse B/QV{gsave newpath transform round exch round
+exch itransform moveto Rx 0 rlineto 0 Ry neg rlineto Rx neg 0 rlineto
+fill grestore}B/a{moveto}B/delta 0 N/tail{A/delta X 0 rmoveto}B/M{S p
+delta add tail}B/b{S p tail}B/c{-4 M}B/d{-3 M}B/e{-2 M}B/f{-1 M}B/g{0 M}
+B/h{1 M}B/i{2 M}B/j{3 M}B/k{4 M}B/w{0 rmoveto}B/l{p -4 w}B/m{p -3 w}B/n{
+p -2 w}B/o{p -1 w}B/q{p 1 w}B/r{p 2 w}B/s{p 3 w}B/t{p 4 w}B/x{0 S
+rmoveto}B/y{3 2 roll p a}B/bos{/SS save N}B/eos{SS restore}B end
+
+%%EndProcSet
+%%BeginProcSet: texps.pro 0 0
+%!
+TeXDict begin/rf{findfont dup length 1 add dict begin{1 index/FID ne 2
+index/UniqueID ne and{def}{pop pop}ifelse}forall[1 index 0 6 -1 roll
+exec 0 exch 5 -1 roll VResolution Resolution div mul neg 0 0]FontType 0
+ne{/Metrics exch def dict begin Encoding{exch dup type/integertype ne{
+pop pop 1 sub dup 0 le{pop}{[}ifelse}{FontMatrix 0 get div Metrics 0 get
+div def}ifelse}forall Metrics/Metrics currentdict end def}{{1 index type
+/nametype eq{exit}if exch pop}loop}ifelse[2 index currentdict end
+definefont 3 -1 roll makefont/setfont cvx]cvx def}def/ObliqueSlant{dup
+sin S cos div neg}B/SlantFont{4 index mul add}def/ExtendFont{3 -1 roll
+mul exch}def/ReEncodeFont{CharStrings rcheck{/Encoding false def dup[
+exch{dup CharStrings exch known not{pop/.notdef/Encoding true def}if}
+forall Encoding{]exch pop}{cleartomark}ifelse}if/Encoding exch def}def
+end
+
+%%EndProcSet
+%%BeginFont: CMTT12
+%!PS-AdobeFont-1.1: CMTT12 1.0
+%%CreationDate: 1991 Aug 20 16:45:46
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.0) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMTT12) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle 0 def
+/isFixedPitch true def
+end readonly def
+/FontName /CMTT12 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 45 /hyphen put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 108 /l put
+dup 110 /n put
+dup 111 /o put
+dup 115 /s put
+dup 123 /braceleft put
+dup 125 /braceright put
+readonly def
+/FontBBox{-1 -234 524 695}readonly def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891
+016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171
+9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F
+D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758
+469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8
+2BDBF16FBC7512FAA308A093FE5F0364CD5660FE13FF01BC20148F9C480BCD0E
+C81D5BFC66F04993DD73F0BE0AB13F53B1BA79FE5F618A4F672B16C06BE3251E
+3BCB599BFA0E6041FBD558475370D693A959259A2699BA6E97CF40435B8E8A4B
+426343E145DF14E59028D4E0941AB537E34024E6CDE0EA9AF8038A3260A0358D
+D5B1DB53582F0DAB7ADE29CF8DBA0992D5A94672DFF91573F38D9BFD1A57E161
+E52DA1B41433C82261E47F79997DF603935D2A187A95F7A25D148FB3C2B6AA32
+6B982C32C6B25867871ED7B38E150031A3DE568C8D3731A779EAAF09AC5CE6C5
+A129C4147E56882B8068DF37C97C761694F1316AF93E33FF7E0B2F1F252735CE
+0D9F7BCE136B06EE967ABE0C8DF24DCBBF99874702ED252B677F407CB39678CC
+85DDFC2F45C552BA967E4158165ED16FECC4E32AC4D3B3EB8046DCDD37C92FDF
+F1F3710BB8EF5CA358ABACA33C7E5ACAD6BF5DC58BDFC3CF09BA2A38291D45A4
+C15FF1916FE2EC47FDC80911EB9C61F5D355BEDFC9DB17588547763AC5F0B1CC
+12D2FFB32E0803D37E3281DA9CE36C5433655526ACFB3A301C56FAB09DF07B5D
+048B47687348DEB96F3F9C53CE56DDD312B93D3918CD92AF53FB9461864D11B8
+0138918D0B1270C54873C4012CDE6F886DB11BCEA04B023EBB43E0D0A06BE725
+741D08B9DB688731A6C9886C15A83C28DADCC81385EA239E045E8F3670CE03DB
+9EE77ED067036595C9F3B1854343BE3A12E486B6E5A2F8AC44FA5378D28DCCEE
+306B0E283AA444423F9A4FF38E2B56DCF67A39CEB2C643DAE86865517D5D0371
+CB8797208ADEC637330A3A57902C9A88EDB75A7C16FA9850075D9F19578EC666
+1353CC1FC512D59DFF847ACCD3D295C5D09DFE2A27B87A0F54938CC908FC87F8
+A08FF8F94A3051855B401F349F5CBC1DAD02C3CBE583E69FBD18FC747D2730B9
+A62F25952755ECC04C1852CB5CA505043B428E2BF1D407A26E0AC0C85E0DEB4C
+425D14F1A1BA5972EC78AF68FFDB2425A9F5ED10220B1716A83D53D5958094ED
+3D2CD66F2A070515F737516108CB2B0205255E9BA568C2A847679FCE1B1AAC31
+128359CED2C77D35333CE94AB2B05797C43EA28810F314D3283555D399E30FEC
+C1F113B94484B6CFCC0988EA652BD5E0F61983225CE3A1CC1FA80F13DD945516
+C84962DC76A254C62CCBDB47B6CBE6DD237E38177D216AB3F9BBF876C4775680
+A4F8CE4DB65064C59D540E36EDCF9C3AD79FFCFA244A6FB20D047BB4774E6316
+69F7D47D459A56A68B2F45417DA9C04CF6F370D13E2292908671929511BAC37F
+B8F709AC597A2B80340B60584817C685319CE7CD7FB243F5D9F9848D4B45CC4D
+22CE6FEDDC2316EC3199EEEF12CA0263ED6122153C444612F0612C338981E889
+ECB0006CFA33076F02EA838E03E551785BFD414BB360B19A0CFCEA852C12F6A7
+C36E68E2121B416EB29CC55D87804D6E79B876C7A0BEA416FE1FCC727D00E341
+47F2B3A20534E6C16D81C0CAA970639C0D690DF2383FA7D6693E1863F2BFA94D
+D7A0B91D6E2A5770D6997971C227B38D3AB79D62CFA3BB7E18E5857FDE0271DC
+8D0467EB8A60EF3A0EBD77730AD8F4D7AE248C103CCEFC17C717DDFCDE9ACE1C
+1BBBF78434C9F66C455D1A02859960717C61B0FE911A0FEC12B0783F944F9B1C
+B7BE3D1B67108D79A2C5C578B97B870F5BB646CFCECB27885DDAF5342783ED3D
+84463FF40B432FCDCEDAC7827FA0C1F6E26805C50EE6448BE598BA51324A6F5E
+493F035C131B7D9DB57EF720FE2E5FE1C532C51A0905EAFFE463BF7E47202808
+DFB0934AB9B27C12D8BB566BCF4D89709D282CDA9607E25DBC140F61671B1926
+0CBE74FBB99D87802E74A250E87029AA28E98B3FA3DFEFAD4723DE5961E9AF3C
+B5A35E3BED0B97894CF8E44176570DDCD6EDF06CB66F0CDCBE75F77E14C90F89
+BA830760415ECCE0DD1A1B2191891182275904FA1B587DE149829C711CB58ACA
+33843E14B42B9C120C917D57DD8EE4F0ECC257767B6AC6EB80E563F84101AE08
+829ABC0A055A4D33AB19281A0345AEE764A7D135BCAB8735A051D8A7892B4702
+E9917E2CB149C24C721C1D12731A5F8412524CED7E850602D8BD05F7BEB64F46
+472A600F50E758FD22A8126A913C001473CBC84165A4B46B25E00FB2348F3896
+20C8886A5B08704C319924C1749F33A3096406A27FDADC6F17807103DA04D354
+FEF400100881609A42E8572819B845B8A8B7FCF2CCCA75A1CB25BBBF3E2B1C45
+FC4BDEC03311D6CCF78669C53432D786530039B36A8037A95A231F17E98359E6
+F0E892CAEB646877F4C4FFBCCB5C5A8143FF00B90F01A62D0BE68D593E97A2CF
+2EC3C1D389C2474878A7E7BAF4C97C2733F958D6CD02F9EF880158455958A15A
+C2A4ED22526838EC3530C7EC5654204444A28529BF68ADCF93E3DA72ABD50E46
+3499D9A9A061D59C0D35F1FA5C5EA5CB93500268FE96B416F66EF179E184D595
+14DED98C95A8EEF2D172F8F59AC529A392838572C0E48018F8C9D6E6644AEA2D
+60C68F8B4BE2420B171750C96F8398C99DFB709379085C901EE6DA44DC4F671D
+10172309F8E7E7E8D9F5D4A6EBCFE0C28BDD4D6DAA0C103AA0BB2F2D52217302
+B580D26E9A89AB56927E729AFB576FDE9877B16A2483B67D3917729597707B08
+C183A0DE48462D2E16BA17F8BACB18BB9B15434551FD9F0D9F6142F4A668F631
+8BE9288B53AAF5755A28DAA6D71D17062D29D19A9EB299814755C4C6E5D03B64
+CE8ECD65C961AB35E468C36E087857A9315D362A1D3655A41D249C32C459760E
+A66FD627FCC6745F9575782B47F362A33C418F10C16E0DFB67A151E107B5109F
+4F58565797D5BA3E4B0A45978FDFA804C452F708A81314B36D5F448A836C08EB
+A2FF2DE947BD3779658BEA382C00DE63BF2AC04DC2DED83B8DFC1263E7819446
+244FBF5CFD4581952D515909B617C205A54AB0B40CA7ADE8DF11B60C4F14802A
+1398444E83A91834D2BF6E9525E6F9BBB4757EC393751695D626926D4240CA7D
+501664845B89C7E6BE94E3BE8D67531C5528465CCF393A383238EE573E2A452A
+97ECE639797A8B18FE620BE63784BAAD630E0F534E3715408A0AAABDB0767EE9
+92E8CC835ADACCE79B38AF6C21DA95F5B5EB17AD07892B6DE3598FE66FDB07F6
+
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMR9
+%!PS-AdobeFont-1.1: CMR9 1.0
+%%CreationDate: 1991 Aug 20 16:39:59
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.0) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMR9) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle 0 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMR9 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 12 /fi put
+dup 44 /comma put
+dup 48 /zero put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 53 /five put
+dup 54 /six put
+dup 55 /seven put
+dup 56 /eight put
+dup 57 /nine put
+dup 65 /A put
+dup 66 /B put
+dup 68 /D put
+dup 72 /H put
+dup 73 /I put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 82 /R put
+dup 83 /S put
+dup 88 /X put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+dup 122 /z put
+readonly def
+/FontBBox{-39 -250 1036 750}readonly def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891
+016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171
+9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F
+D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758
+469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8
+2BDBF16FBC7512FAA308A093FE5CF7158F1163BC1F3352E22A1452E73FECA8A4
+87100FB1FFC4C8AF409B2067537220E605DA0852CA49839E1386AF9D7A1A455F
+D1F017CE45884D76EF2CB9BC5821FD25365DDEA6E45F332B5F68A44AD8A530F0
+92A36FADB679CF58BAFDD3E51DFDD314B91A605515D729EE20C42505FD4E0835
+3C9D365B14C003BC6DD352F0228A8C161F172D2551CD1C67CD0B1B21DED53203
+046FAFF9B1129167921DD82C5964F9DDDFE0D2686875BD075FC81831A941F20E
+C5CD90040A092E559F6D1D3B0E9BB71733595AE0EA6093F986377A96060BF12A
+A1B525CD9FA741FE051DD54A32BECD55A868DD63119A4370F8322CCBEC889BC2
+A723CB4015FC4AA90AE873EA14DE13382CA9CF0D8DFB65F0ABEDFD9A64BB3F4D
+731E2E1C9A1789228FF44116230A70C339C9819676022AB31B5C9C589AE9094B
+09882051AD4637C1710D93E8DD117B4E7B478493B91EA6306FDB3FA6D738AAB1
+49FBB21A00AC2A999C21445DE3177F21D8B6AAB33869C882613EA6B5EC56476B
+5634181ECBF03BFEDB57F079EACE3B334F6F384BDF9D70AEBD592C8ECF21378B
+54A8B5DBF7CB9282E16AA517E14843909339B5E7C55B038BF3BB493F3B884A1C
+C25F9E8FB912CBE23199AD9D2C3E573727701BA301526C66C3617B9514D6F11F
+11930B1D97C17816C85B1BFD9B973A191B33CC3B391815AC46268691C741B2D4
+48A840F1128D9B2F9CF07D0709FE796B23A836417BF7B5B12D67F74453C82F5F
+25F7B30701D6F6D4F4DC623C0C27D6A6FBECC7312A3CD10932FC7C10851C3C52
+24B75DEA8A648B7F34F5711DB0E843C914E25663C510185BC37BDB7593C1C259
+21D8DDAD33982C336BF272BAB2F48E68217403FE9F54877B243614A87E64784D
+2796EE4179FBF96123D1BEE3EF89D682B427BA4F12A1318A57F18BE5DD903815
+2614114FCB2EAD5C07129169D177068A05D123FA94A1BA4CB69D6866DE72B305
+542D8C5FC997943D3A74BCC67CE5838933B4DD72CFF5EF285AF1A3678FA1E276
+B880602235D8D3633777078D9CF03CED0145A2C98A90DF1DEB7AE8FF96D370F4
+DB15045DED7BC8EBFDECABDFF6FBBF244A31A576203FE1A8292E91A9D1FBE931
+051570D4224B4A0A6A229B322E8C312E422AE6B50B05DA2BD42B784B5F64AF81
+89010C01067C52625CFC6BE9A6D383C0A4117C3E7B5A6102B4E499DA1091F10E
+98790162606EC258F6A203691A8838758D5E915A78B191C56072663CB37CD138
+8CD0866D26682029FE24391284179BE85A1086C6C307756D7FF138284B662FBE
+A86B5216EF695048AE526910BFE88DDB8D651D585B5B8D7A1E457A284979BCCB
+7A38585791293443055C7C79EFC140E6725DCD4CC66866178331939ED55262F0
+68A85757C07FB3E661324FCCFB3C394164BDEE5AB9E19F48D4F8264BD153B0F3
+BDBB617BD78B95096AB3E1790675C1A4E553516EAE0BA4ECF3703EF646E9F4E0
+AE9B346936CCE23F44F821AB12DA11D312D33830F07A000529D3A2A0866F67BD
+D1E50FAE5C1539EA730EE72EA642A060F1352CE7D8DF27CFDD1D007FEB36070B
+0C807A2EECE49A3DE849DA9CEAD0487A2EAC929C92270EA13C1A03196937B747
+3DD88B5E47CE93D8B07F6DBFE375B6AFA033692C61CF03A842E358ADA933C697
+D26914CCC7505CAB2973E488A195DB54F82412E0AFF344B116763FBC730747F5
+24EBCC4FECAF9450ADFCFE7AFCEBB795C39599A5C38392F8376EC4BA39C42EC9
+C35EE3324D35A6C4902FFC9266A12B6F9B2F2FD6C25B54B86286C96942DF91DF
+770D4A1CA99D2D08079EFD8C5969FB473FD832646105CA6DD00EC559BE8EBB14
+04667BA9EF9370D1787D94A108ECF9E5FD2B1E86C0417147BB31020C9F6AB571
+63853F5718ABA2B0E8B5DBB1CF13A31E3EFC464631B3027DB4001EC0BEBE50AB
+24ADDEA0BE07A3D0A9656E5E7A235B7C23BC77A99D18B3962B095FCFAECC3189
+7A4FB593ABE57BC0587E1DD883C1C7708AE98B2BA288CF4DE3E759A046D1A4D2
+3AC2ED1D728FCFB52AC7092C24AA1A2BC0901C9875A3D547BE00AF69F96DFE6E
+E2465104579A8E72D62CA221DC32E0F8B7670250C6797E7A8D320F8FAF3CAF55
+06A48B1388A1890485E17DBD705F0EC72469733343A3CB0B5000EB286D86FD35
+089CEC45CE92E5F7E86D10EF6EA41B8B2E0ECCC9580A4D6EEEB1A632B421ABBF
+67946E1DB896C5093F733DC91B39F5426807647B5B0436468609DA0BAB8BE701
+FC10CFBD1C9D02810FE22F3E6FC4575D7A576FBB2CB4039E785C9180101386DB
+4AB343DE4E705B6E5BC821E0F0CF7D3B021C558E61D68B98A9C89218E19CCE3B
+80FF99E8C213C796FD3CF43476832FDAEEA71CDC2C8C475D18745332B845DC96
+1AF7E38FEC1E0C12A785718405BF5AE70780161A7B39278956B1C073DA090220
+87873DB2F2C84DF46EEF6D169E9243AC8CDF7AE56BD45F92EB921B216C3A182B
+0BACE2FF94B8CD6A0D089F58E96CAB516637A5BB4CA22FDC56503C947CB0BDB9
+E57204111C8A60FF1354604EDC13AF4062E53848BE4B82799CDB525E494170EF
+3131F3B1EF71F9018ABEB33B64EEE7640B3DCC7A1519C7EE1B88971676CDDA06
+8E7E54F8DE8485873F3297097C7A7BDBAB6BE876080C75E953CD2B875C541138
+59E72622A8719A1640FE2524889C19B80514BBE1EC2C8164E687624F49B890F8
+6D74A758BC66F9F269FEF1AE396F7EA885F739D4156F917B3C072BD68CE5A5D9
+92A8569884F5344DD92B7DB405990E6CB885BD9A4970BAA28FC168066DC943FC
+F3B9EDCE7E78B857E76B1B4C3200FCAC0298E2B8DF7105BD6458DB913EB76136
+FF9F6B7C940FC435F3E803A9603D24D97A683FF9C6DF75B29D10378AB7AAE5DA
+5F531DA50A1CA6837C88B16683D626AC7D22EBB06B09A72A893EE52BCD9BE1AE
+F53FD9B40FEF8E75EACCA630701C9BD333F2C4ADFDB69383A4B9791E65FC0A4C
+FEF2001704072FFF68DD6CE5252E0C35DB2E3C68D0B4BF6B31C175B77C1B2DB1
+D3BCA2C544E9B4CB843CA268E024CEF1420DD215C4F74FCDB39FFECA898ECA3F
+999693191EEE8A29B54F519177763F5580F59F82F427A776406A00A44E748A1F
+E5E0D292A763CAE8F278792822C41F0BBB828B18CF312EE0F8A4A09005AC1022
+6A40D186FB40A2BD6A8EDBFDC9D09D4A591BFC7A75E709E91C08CF379FC48B09
+BE319E09D18D18EAB2E4A4A9F3B2F8DBD064D836041AAC60BA5318417E65B130
+79724639EDE691DE718600EA592E08B2E6171A2B6BABCB867EE1B96B545AC399
+1A904D67B9127317BE9C5FB65887A22A356844857795C46A9AE4F81EF4686314
+B642FC7C3730DD3AEA4FC3A0443E8584C4A7A725A0FF1ED837729EC244163846
+C172F50122C0AF2D8813C20048CA2C94932D35C4C8DC04C39B4C36E81316F137
+50C2F675678BA9BD8B2CB9C4F2A38554BC54E85FD27CEAC8B555A3749C05C0FF
+E067ED27A933FE2081EE405C1A923D1A9334B4E8357430C4F637B90B6CEDC216
+B7F6892493686733268A8FDDA644DB79E8E5713C5F7C7A50DE64C40AEAE7DC54
+6CFACBB0C0F46A953899489787CFFD8C7FA1EC161F4B2EF2D2C0B704654C3225
+4FF4A4874E34B32E4F82E1ECED0BBDCAF0DADD3DCF20549E6A40345F5C442E32
+A191BDEF9431589D3778CE7083849F4983953686BB56D13FB8A6C1E9CA76BFED
+4F89CE11C81E551D994ABF775D2B60639F0A2A67C4DAF416A71821C1E3AB37A9
+A4353C908A9DB90712EAD91E66A909A18125E6B25CCACBD7298A9A0D3A787BBC
+FDD94B012AF32AB92ECF0041ECA76D445E00B92C3314B510BB4AA0050CB0DB88
+1C62F1103E1D55E4878ECA9400B92B139A31E7BBDB0642175D0B407F9FCDA194
+C9CDB455870EA50F2890A9284EB97A010832AAF9B7CD0A686C27F3EE3A23AFB1
+F8A53AFF67550FAE4AF01F7FF4E43C8F70CE90F0E011EA960EBEFC24D4FD63B0
+58C3377E262D09848D159B48E55C975C926E0E3B9A31E9A54869675593E0C822
+D54AB77B23F5A3EA77C844EAF690D887BA3142B7B947180EF1B02F5DE124E66E
+EA1221BE552672EF39A35F64C73ED1E4CEDB9BB34D2909E878377F0D9CB5F189
+FE76F098DB219D29B3933D446D67A7D9C3F6841ED9CC89BF31573FFDD1D796F8
+DDAE883524C758EBF7BE4EE6E659DDB4459E7844FB36B390A59EBC8E808D954D
+69A2595CF84112ED51613961F98AB24F0E343E88882CEC9B8EFA07AAE1352590
+F6C42DF3EE257D32C6066495B9D45E15F1EDE670303FF6B32D5F7A796474DCBB
+70BA1ECE7E6DC941883B37B7FCB918781F834F19A13A3CDF96101A1BE14A8040
+1C4EA70314CFDEBF0EDD6805C730F83DF7F637C057E2180C3D2B40811B0B79F8
+C30D4DFDCCFEDC943CB6FA25E862A0220C064AB3F8310047DBF33DFABD94B6E3
+0D5B49A8254AE26DE08DA4ED08A4D7BB2B8A55E4BFB8716B73FEC259D6BEEE26
+BB60AED6332A87E45897F51C7A12B03B9A36BEC38518BFC382DA4D41E1F5AE6D
+6E4B77DC99D23E18F2255EE43E594D350D7AE8C83A402041E42718EDA46AFA98
+857879E51E5DAF09848D852FD6827310EEFFDF1CD784B73EEC932C54EAC836E0
+70618B66801630EDB278E4508EF63C9831F0A4D8DB7CCB39728AD4A5044FDE07
+E2768FDC60191A7C70CBE976EE4C1BAEC6FF07DBE4614CF0CC1239C266269064
+BA7A950E4E8FE1F75191438B2C3DC018B94BC673EA0DC79BC52DE624B3DE39E7
+581BC8DAABFD865697BECA2007BE57E026BDA607B48D90804206BE5147D94F92
+CFD28198136B07829DDDA89DC06A4A738448882BEE3A961C4CEB245250416A5E
+057FE491568CDB970B580B922F7121D76B517CBF310CC3C6BDC79B156B33F96F
+DD649953DADD5A7666A91EE7614F7EB5D3F40C68C7A3E74C21C8AD3DA764D8AC
+C9289A5A5CF4E6BD220090A8CD749BE50D2C0135B1FF443E41A7F037E3136DE2
+6AD9DD4D840E2265D6EFC1862738D11D11CB0498111EAD036F9A920B8079EA13
+1DA60D4487DFBAEA127D9330305019BAC3D62CB449458B3728C37B5970CD7FCF
+2CEF653CB1A37B8E16149A796F5F1515C2D505CAA449CF1571D2403A66808534
+37E8EA975F71FBF84FAF9D2A6E19778D4F0A21DC35DC73CC6851EFB55C04F832
+98816C20F8A7AF1E7BD898BC92E5B17E0C2560BFF448FF4F0C61B9B619AA9344
+957BA4DF012AA7CB844F6A2045B35E002755949748483545CDE6BA268F45CF93
+9A4BB9847D73CD53C0C54D27678A3C6BE478928AE3F7FEA9CA415CDF4467304F
+90EE099A0D1597241AAFB7C6594D48D0076FC938FDDB99E769B7C9E26CD3B834
+E708F72D69EA101A7A659D9A45EAD212A79CA612C46AB0C3822390CF8C359715
+842B0B9724CD7968B62A9AB251DBE3230E2A75780344004EB9565798A41725D8
+62C9316F4DAFD66FB503EDABFE85CA7A2DC73F2D3CFEF347C4396F67199275D6
+C15D4441727F2CC6F749B527CFE9C8FF95F87DE5C45DFA8BDBE0639916E92F86
+B5191DBBFA50186ACB02D0CF4A978CABDC22673BE96EB7B9D55E8AC8A42F5616
+0D47CF1C4D2788339C8995A6E93348B313ED8ECD4F7562FD46FCF7DAB75216A0
+A7368EA565E2AFCB92857C37C41E54FF1DE1430EB24CCC1A0441FDC87D122DDC
+8959FA7A691C18CB44EC2A5A711FC9188362597510C894CBDA48486E932BB1ED
+A35DC7083570126411BCF1838F3593A4D208C042F55A4A96CC0DE494EDD67AE3
+89CD635AA5093B969B604241F4F01AF65B430EEAC934D9A23C5DF3CB7156419E
+2D8977C77CA4CEE2293FCAAD12B694163FB4AA99C7348216BE0A9A86AF66C01A
+4F98E0E6C9CC4FE29D1494ACF281B4A0656909B87E6336F8D5EB590032268401
+C186C2B53E1026BFC1D001363B376A6AA5EBCBDFFFE87468B2ED480496035BCF
+2F409D2A4755AFD7CDA87DD3A6D4490CC5E1A18339DF00D3BD8803A78E75EBA5
+DC16C429474AD2F1C4D6E33EC477DC7F63F03501745573C9295555FE520A4090
+97AE83F9A411879BFF20BE70893A2C8FA46889B0340C30294D69F6472B94B615
+21745C9EB65997EBA32789FDB9144A630A34100B3FC2142213248488DDD46B19
+0E7B03AA78B70F66DCB5D80AB7A59AD954D90B212E723B2C19CDC44BF34EF8CD
+876EE89F3B29C2B3B7E1EF2894B109B59F1C1423C02D89A9594566E5FE179778
+3523F2C665DD4E2ADED8B09A6B4B7E5977245DC95C8E626E8F02F72F6BC0C9CD
+6F6B396FCA89FCD9BDD82F21C72F0208877C38525E087AD63EF3A73A64B460C7
+437D3DE8A3D33C7E13885581A3B895F28EF6EE357B78D9FE7172F42A4363B18F
+9060AA31889FA69584FE4B99F62C387AAE5F47F233ABB03E56B066B7687F2E83
+2D1A5B1294B1F778B40EF5614E05953F0539EDBE10F8151D23F7301F1BD3CC80
+03D645F6CE4E8DAF2C126537A54EAC7AC1772D1128FFF1E2F7AAFB60790453BE
+F11898B68FD4344CE141046FC591B4B8FA886E8C3BA638946D1629DC93B48CBA
+633F48348E4AB5BAA46AB436B6542DBE4D3BC3B26B3BAC8C5BF99334F1D8DA68
+2A805CCEA0FF53510C91BB85E137D3E63DB8647C7E46A9765278767DA1838964
+43F9C84F4AC0FC4FAA4951BE3D02BD4DE4AE4778E492544F4D9997DCDCBDD3E8
+2A6A780DDA679D86BB60BD08F4AC2E3467DB2A4E1F17E1A38DF332F82EA8B3EE
+1676C93888796C57BDAE6572795990157084750D6B080C2BEBD3F19A5FC61AEB
+BCB426DB3570BB0803D0EDF1712CABDC6474828C1BBC1B1E67FA18AA21D86A16
+C6E72EF8F6F4DB2898191ABA2486F94048CEB5F4B2D1321B0047476764577A8F
+F0492DA9A77B606FBB6787B94536AB286C6F6E68350C7F92E1945BBEAD8575E1
+DA29818CB64C28B48013D6E1B8EE3F26A3EFE588A278988EC249FDAD4E077A4C
+9EF91FD4F8256CC77601D4A0D9A0724A43D156F0E7603D67476D2E3493C4690D
+A84B84834827B84138B934FEC3CEED73AC380934C041A9EB8B24C8C035418D3D
+05232452BB268C814EAE8F9C73B0E4A3625CA4FD471F69DD1D576B7E11B3EFDB
+B38139565DA3B669D91C68F42097B5467329D6F56B722EB39330C92448F63EB9
+C2E54DA0233CBA9FD6E3D12E9419A6101D1CF32AE8BFDCAD20C40E2FD1F1F57B
+A9756C0577EA1B24D9C36935F20806C0342BA7DC0CAAE4CEB5AF5FCDC29BE62A
+19F65367AC70A0E54B4E5FA4DFA84B0B65129FE167B0855BA02C519A6FBA3BD8
+11D03A4091BA6CADA914FDD2AE88725ADA74829D757CC226D2BF4C45737732E5
+0494A4CB815BCCB8C5C9C7F88BEC01D07788630D0412BA25E890F7863250A482
+4E5D799CC845B8B39D8D17367F8CBB3211C0BF2EC572545E0D413FC1EB25073B
+BFD3FA9E510AF6CA80C2B0F827B36B9306C1462C801CBE28D1F4CBB9930AFE79
+B860D82CB414823E255899D716DB932AC10C19C33849B8D75A7EF322577FE59F
+8E90608F83C6CFDD029D367B7B7C76C34A5FE5E6D2B53B2C63DBDFAD937F73A6
+77950F4BF36B5F506B2C153CEC1D8FFD9F6ACED3C0EF99006E8FEA7C7354C53B
+F2069BB90D4C150DAA5B04273E7A5456385464A1DFC7BAA74273D473D5BF0D64
+536A749405170936BA5AFBEE07E9263452BC0242E9544FBB084C1BF99B4EB8E7
+A57C91062D07DA08D56F12435C45204BA6268F47553A4635EFD17D6A6593CCE3
+3DA4C57DF99373EE38E012F69F77F1616CD94C7CA262E6E0D90D7B9795F34EF6
+C04B75687090633AF0AF8829DD5035A04CD9D6235309CC673BB61E0729C49815
+D9EF9E3F14A09E10DDD7741D621AFDBA25A4937D432E54D0079C26349EA54A01
+10DE11D9408BBB86E0861C4E0966E4F6DDC790CD86719D53B6A1EE3E85B3A65F
+9B1C72C7CBA58C768685104BB7E68D83080928947CF4C5F699F3690967D166C5
+E21B97AEDDC77930B43273D9F1C2BF5DE9934E4B888742139301CEE5DFEA2C15
+5F8E0C765789200784CA6CC04D56AF3DAF9D5990E11E5677082B54317C310054
+5531B57F088323356355BF7A5BC9D839BA7C96F7178CA23C0FD1A24AAACE763F
+A58B4C0485787C170F5606792E6F3B4610EF7960D62D3E45D78645FC19B624EA
+9E0E24CAD0115F3FC6A1DC312D7CF8A76CEBAAF6B87BD2954BFDF244F9B7EA80
+C8C3B5352DF852343E982E8E2ED15A5F5103C556FF2954EADE05BAA4CB066B7F
+F21E08D46561B074308DC324B490E66112B91973F17AE2C98FC16009F9A9B31A
+9E08614579C94948A68042092BD45D87C6191838188FB7EC077DF88BC0810EEA
+39CE5F6E6A4E79A1A1DA4B4D02D1086A2D88F4DD7CE7221B813734A3FF4B5E4D
+1504E2EB87FECE3621B4684237DE50F129294D134213EE5A47FFC1471750F66E
+123667282C40828E3EAE7B5CC2750226CD2B0FF9B2E49F5D859D6AA6104098BC
+671E502CF2BD475F7AFA0EF0F95C1303832EE419B6A9EC838E971941C0D27DB5
+B1D2622E69D103937B0A0A34A057ED275C4207AC3E1077751C9A25820B0CE2A2
+A44FC289D78ABD3C156F6F1ADF1816766E77F28FFB75A393ADE51FAB234AFCD5
+37E271175ACE565A85482A25620984BD5D0737D6AC77EEE4EA9F3402D4965D33
+C7000C1069803BA6C3A821904BB97A3587170381537FC5A581707D4C3C632EA2
+741279DAAF6F7726B8DFC4279B89DFD1A43B26CD09F5F38DB748D114047C310D
+50FC309491913198D180FBBB3C1A89F682D5758C5D940A132FF032F3B44CA0FC
+FBC6811739B78F9A22A0B9DBCB31BC08376365E08452F8E276E05B4ECC6A9B1F
+846A7A6EC7A7BC86551E26286F5EE860F72D76D40E22EFD637B632A22D061060
+E51360F95697B02F523598854827B76B0B4E86F0BA7B0850455561D0E4FA44CA
+FF98CD03F4E085B6494F3822A8BC6297872AA7E666E281BCC44DA002B73F3271
+2808A77E6B548B0FD7B24B03A32205A066ADE862C501E15591E1057595D1B983
+81DA042F3FC24EF52EC513F85AE80B88D673374AF31A671DB169BA4A8EC43DD6
+A27CCD44EE88C681EC61CE61C2A54E5F1867A5C8D5923FD0BD3E448C3B2E5626
+D311B706525D769F5062915F05BEEE5140B7860AE4E282C2C8810BF944AB4760
+DE02BFE3E1840160F8F080291BBB03FA55E2CB6D15E2D2F50DB74ACFE0AE1AD7
+5F415B63DA8E5C7444C64EB93EF3017DB1564BC6D3A07E1AC4126DA48E92F316
+C3D1BB18451AD8C5BD89E16607B680275B444F61ADB6832090B8488DDF7EA5A5
+EBB1E70DD1BA9B8CC665A16046F4075760783891B7FBC717BC3C49423528473E
+5C616359F7D0E528CA71E643EB88AAF241A20CFF8667FBF43743CDFD1E45BD2D
+4212A276BEBE73081A5A8BF890E3CF932F8B8E70E646E2D78D64182BBEA6A94B
+1BAD8F9FAEA95C2468B3377CBEF942CAAB37BC8E9FA902E27B0A032449895AE9
+46989ECFF2EA561EE0138C9A43A3A74331BE94F083278AA1DEAB6B2B691E17CD
+9E83B9F4BC05F58C44660A81FA8EC8977877EC572450EEFA3EA452DB93FD5C90
+3D6CD160F80534ABA44D7A88130B6B890805AC3B1F7549DAF96C49D1D7BCD684
+BF9361A00814CBCEC8E6A89D95FF3F702360939851170399E0B3EE4044B7034F
+466C09BF2ECE65D4A379F00724C447526D4D461161F79D9C17FF9551900A39A4
+13DC53A0694C26A90F644B19D343AC29FD49A826D51199D1A3C6BA16FAE9F790
+A757995A523C424459555FCB4F8D1E722E606904920C7F02948E2D1112D0C646
+76E66D29E5F727402299E6804BB21B4212BCBB9CD600DA03057FCCC0366D5BD0
+1420DF25CE02266819D912E433C8C4813D0FBE2A7CF429A6BFA942E0B8BF5705
+9C312FF2C6151973F03F3E75663F7F05477E9488547E5A25F3AFA84467CA7241
+2FACC538E87F6213D9151BA1622DAB8D0EB2DE7163BB82C3FEE77D18A409DA5D
+410572C0861469721C7627DC1AFD9A5A30C0F23FF26B31E66826093A22504F5B
+7F492FEC4C163074796CE703B9BA9B20D2A72ADEB311994FBCDB4CC94C1E9C5D
+E8DC754DA37D7FE30393D6E1C8B3047C6349A11932BEC07D78931ABDCA9AC911
+4D155A91C95508300C13404A24B94A116789A65A02BC19F87AA5165F9A421EE0
+4176DCA8CF68C8F2CA4B9F1E029C8AD47E27C9ED39DD00EB3865BCCB7823FC46
+8293334870B2DD9C260FF0163239DCA914D262300693FA51BF52440A9C04EDBA
+2A43C092C10D1AD9E82C4E2100B9D4EC8466EC5A035F2996F05496ECB61364DE
+5CB529D3F268E135A0B84ED583B3C217E48C1295A5DB3FA48BED14B8BD1B66E6
+74FD14BC56326945C406C66985B7CF135A72B58018DFC5B6D2FAE195D85A6BC0
+6E90E8621DA89B783A7E1FE79F5E731F929292D1B37F064417E51B64E0870B4C
+C094CA5EDBF626EEE88935261B25244F36158EC58E8EC77922A16D6DAAAB60B5
+883D8F6257971A7CDA8F52B8BE18748170E5CC0D4E6D7265D901B3875C228D26
+813D99357B6229C9C49E382FC14FC01CA2E34C39ED57E805A30A5AF850A3891C
+D873638CD806D88D42D749837878C14E0B9AB950BB9F367AAC3EA506C5742196
+9460A3A2C2F4A03705A4F0A75FAF09C62EF6DE40485D72444E8F92A22FA84624
+012D2FABBD0CF86907BC75571DEDC9A9DAC47CB61FDBD08606DBABB4F8AB0884
+2D705A8DC2044EF01FB71B31E087C6B30F90C10C295E82346EA4C702FFF1E98B
+D7382C180C960E81CC5E3DA66B44701EF921150938CEC0FB0E2ED609F4F3D2E9
+9AAE5E4D6A8C9F541799280F9EE2911A47633F72D739487798BB6AC40F375C74
+2AB78B8D4B2954C65E2D6C5EEB6E7657DBD6715CCAFC9859002566410F67CA80
+073C8238A3E35512C8B1FDE88A2D8CB35B444A837C931E9A5239970CE2F971EB
+13CA32BE3420455FDA398D508AB41B6F92401F0DCBBB78FC3E2D2FB1B5FB09AF
+B0717D615B3ED608ED99C968A2790761C102CDA4CE40A60E4AA58DA3B92F6726
+2D0C0DF60BE0A7D24F168902B6CED64C3C69900BCF6F53981150A9F307A7EC6E
+C7A61B401AB530D995D7DFE0714FDF186C2F71459D116923FA4B3AE794C463DB
+F6CDFD8504DFE9E2A37E59508CA79CF3ACB323CADEED5EB59931B160AC6F616E
+5A2E8021E12FA8AEA8CB004DB2F6783BEEE1C0CC2F86481503E690D3990990EB
+F9C8DA3B2134662A78BF5C9397321C07197EA40B9D2712ABA8AEC64CF511B6A6
+A903F75FAEFD5FD78BACEF6AA9F7F21870AE17BB4870481DC2E421115071CD68
+98FF25BBABA862683D0DEBEDD73C25389E998A4BC54EDC1DD1FC2CC1F90EC83F
+DC5D7322062DED9DD30EDEDE0B4DE90AAC1A9E1C5BE4978BCBA8A2065C88440D
+6801B6A5566E1D219644C4929497B28DF2F9D9A399EF07B24841AD158871DE63
+4ACD35A46AAEEBB3580401470CDB02D3568E4DFEAB6417AF1F26A61C88AE3422
+19C24FA79A446E68A0300662485DCA28404AED8F0A54B530BFD243DBB7DB1C24
+532F5B6D0430C0778E99836AD0195313B830CE169547070C6FB78CE10356A240
+90F82B11C69AAAB9BDE21164C547851CCA2537F28A5DA32C4ACAAA5B2DAD4018
+B110FA3DE7AC13248D2777E0BFF838CBF2970AE48FB22A62452B6C244CB3ED1B
+AF7EC8C45DE1633947246F8A08FA5C68EED3AEFBF010A9B5FD3D828D2FA99EFE
+4CAD56638EDBE256A918D772A39A549BB6B04702AE1E90C64019124E5EB66A22
+6B0352E76B9E504B5A9A3559F06F077089C214097031D462E4C174133F92504E
+3BB0C4A5681CC87B7CB49B87C196F22A50A567FECB211A706090606AF8BC0BDE
+C27141308785FF015B6684959527FEA8DFA797FB396BA417050DFCCE775E452B
+BA5B1C1B3D3DDAB465EF77B4D598F55A518BB51F5BE4CC56E4FEA18DAB1D8793
+6659192B7FED0634EF63651196C4EBF0131EFDED59020525114C65D04212106A
+6F701AF5FC13D79202F85D28FFABB3B24123652BD7CE8B4097A716519B96CF85
+26A71B6A39271A43417A381901436FB7AE6140AE32B01D7C2E3F512B143A6850
+B06BFECE1F804B59D376BA8D8C67925179A0154C8E3B9884FF1D7750AF416A55
+72591DFCEE2C809E40D7BC49541D3C1BAC83CAB239533D5EE5A6DEF300B5F46C
+B3A18679DE50905A1D3F77DA8F366C4D028256025EC193C3B1A71EEDBAB523C1
+9C3AE134629627057257CFDCFB1D14B9C3DFF7008F73D2A0638D9A72DCEB6FB8
+FBF0A604EF3A92C3A49E840C293ED592AC1138055525F6B1D92613266017968F
+75A072E62EAB08CFA7F9061113F6BDDC33BEA121DD1E3BD868587E86E055E4D0
+BCCBA1E827F3F37909A43B065945B93939FBF4588407270FB026F40BB171A88A
+3E7D888F95A0E9499851FADF25C9636C50198318EA652E031D64714A59812901
+22A4FCA0FA88754AE96CFEE4163A1DA328AB83DC9E4436B5A5870E8D5588DC09
+576FA26F2C2D995CF67639EE5C4C209687C25290B4531210D38BD5B9BF503B39
+067421FB71DA146ED4C22EDFBE5201DEA9C9CC4A6C5CE215D1F0076739E2A70F
+14A6365C6FBDD8A0F0DC091A7E121450493490B2B226CC9096D57EE0B818EBBB
+3B1E653E3AA2DF732D1AED8DE83C28F32EA03098A10A8BB1E3F10841F7E288B7
+0731D5DE0C0C243702C4571B0F08341029EA61A0AFBF2BA1CD41CC1904A48573
+BA511FFD7E4D880D4263CE69AD0ABF0E146C27CAD8D71299C4AFA2532F2E8481
+C6126402923476EAB2E345750D6A22A40ACA5617938FF6BA331B58225111539F
+1C8E2C83B75A62E22D3DB4B910E909A588084F69F60272A4DAF44F1469DBC9AF
+F91393D79AEC524DE64ED9AD42516985CE04D37027DFFFAFD36CF3D444D7F946
+288EFAB1744B8FF8F1CC6A0C268DBD466BCC0E9BABD426CB0E2F67
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMMI9
+%!PS-AdobeFont-1.1: CMMI9 1.100
+%%CreationDate: 1996 Jul 23 07:53:55
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.100) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMMI9) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle -14.04 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMMI9 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 58 /period put
+readonly def
+/FontBBox{-29 -250 1075 750}readonly def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE
+3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B
+532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470
+B72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B
+986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE
+D919C2DDD26BDC0D99398B9F4D03D5993DFC0930297866E1CD0A319B6B1FD958
+9E394A533A081C36D6F5CA5FED4F9AC9ADE41E04F9FC52E758C9F45A92BED935
+86F9CFDB57732045913A6422AD4206418610C81D882EE493DE9523CC1BFE1505
+DD1390B19BC1947A01B93BC668BE9B2A0E69A968554239B88C00AF9FBDF09CCD
+67D3B2094C11A04762FE8CC1E91D020A28B3C122D24BEAACF82313F4604F2FEF
+6E176D730A879BE45DD0D4996EF0247AEB1CA0AB08FF374D99F06D47B36F9554
+FAD9A2D3CE451B7791C3709D8A1DDDEFBD840C1B42AB824D5A0DFF0E0F15B0B7
+22AEEB877FF489581DA6FA8DA64944555101EB16F7AB0B717E148B7B98D8DBFD
+730C52937E226545CF8DC3E07C5BA30739BAFCD0F2B44275A6D503F582C0FB4F
+449963D0AD2FAFDE33BA3D77BCA9D1DF878DDAFCA2E22CC4BACD542B282164C7
+97C2BDE318AF9D501CA21F6E662E7AAB75A5F24D2C182E598D175D44E88AB19A
+E7CD59584F95B389183EE21B525BF52A3F23C0FE5383A5565A19361D716F508C
+AAB78411CA5A4D27552CC1C435760D5A89D535B71C593E755C616661363308DA
+A683F54ED0C23FB2C225A008392B0B719F66F11A946A090B7C00B662A3C69599
+B4ECB0CC70C85C4BBBF207E0026F6C7A19F2ACFB7A60804FC98A4BFFD7BFFF2B
+9529E6D9D4238002BBC255BC62959D6F3381FE06E0621B879D5FE5B541D45A1E
+759A6E7DC32B1D1632368D09A97039DF255B6492B1B2B7E2C1434E8306ECA7D3
+5A79B6D614B4979F10988BC76ED53A5F45315CD7DA216221F842FD0F3E050DD2
+BAC23C984D506D8F7D614BCB6B244F5F41321549BB0BD041FBF3053307168680
+3435E9C9445A59A7C666418C4F2512C32058B1CE1EA46C7839C6E372F6CC60AE
+2CF46DD2F130B532DE8ECD42D9204500E413799E298CF6426F28D23BB7216BEA
+1A618B3ECC61B44DDEF0BB22D640B47C09AC0DF378CE68FC9CD88BDAE9ED89CB
+431A5CF9C3E9528FEE7A9936C2B1CF7B38DD2B95773F0EA0051607BE1B0B3588
+A8B907A5EF011B4622C5093A7B107DD1EED6FEE9536DECF1CC96E65373D0F433
+30AE3C094654ABF4698C07F8C74E71D023DFD242EE83B1306786124DD8C6BFA7
+801E66CB944BE7EBCB3FE803EC97067AF7AFC8A4E9AC9D11
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMSLTT10
+%!PS-AdobeFont-1.1: CMSLTT10 1.0
+%%CreationDate: 1991 Aug 20 16:41:43
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.0) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMSLTT10) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle -9.46 def
+/isFixedPitch true def
+end readonly def
+/FontName /CMSLTT10 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 39 /quoteright put
+dup 42 /asterisk put
+dup 45 /hyphen put
+dup 48 /zero put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 58 /colon put
+dup 65 /A put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 72 /H put
+dup 73 /I put
+dup 74 /J put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 80 /P put
+dup 82 /R put
+dup 84 /T put
+dup 88 /X put
+dup 92 /backslash put
+dup 95 /underscore put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+readonly def
+/FontBBox{-20 -233 617 696}readonly def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA0528A405DF15F03DB1C3DA8B850431F8
+0E5F73DAC973450D1ED0530313057E971FC7E7CA88E61DA6DB9A5CD61F0F76CB
+4DE9105D0627B8DDF51A655098229920CF429CDAFC3F7788C95E7AB30E84F840
+8CED52E98DB4CFF161D2E62B0D28CB8B0AC82E7A8D2C007953BAFB3056D66079
+8064956E257D31C13509FB81A250D9E875C77A4E91CC49E9FB3C0718B2F691D4
+B4A64F351F4DD68133DED7629B0D96E5124584A16FD2AC7A3EB244A934FF059F
+ED7297B0505F3C2994AD66A3CA5D2728B034DE94B64A8AFAF341601BD4DB5858
+C9950A8BB9C598B8960609F48116ABA8C007190AF0ED335EB5BF61BA6871FA5F
+EAB5A26AEB5C7C352EB80799CEB983F19EEFA801093F62086AADD0B80BB6580F
+2CF61B1390FA56DFA1A0B61C58DEF96BA767A8A37EA44730783C600706606C60
+4EE74EA99B7C0F8E2525C8847F3D31907C3C483EFA98F6C416B6B2C343DE6370
+52FAE423008D086A76A1FFB327CC7FD84B1C66B203A4F41582F4599A82F8362D
+38108452EACCC937FFC4F3ABBFE3628DF51367DA6BA3F6826FC6522D6AC5E8EA
+00BAD300FFB6DEDAB93237704202BACD030AA824B1E97C0AFE17FCE8C75F4FA0
+B8A74329A6CF1788C7EB34DA7307411E9AD7ED8D6582884456E06E033B4FFE7D
+CD4DD8B06AD01340CCCFBC382C18CA451E4C886B01D082FF8CC5793F4727C3DF
+B52B4F1A242F31D1EB79D1E39A1D4FD13D6C5E2A42AD4B4D1CC4EE7BA0E5F80F
+802E5AB57EA15F4DE44D82AC408AA86D4BF58EF967FBC6497BBC7F017C0598AE
+32CF865DFFF0FC7FF9E6DCE9B5F2F4C7491AC674F46E8E7660452CE0A77C1EE8
+00DE382ABED85350033EC00053134DBABB69DD3098576DACC5D1E325C4B372B3
+943F8E90BE7B97B996D39337ED6D90F8041298B7A27B223358A5161FE98FA4E0
+6879524934E026863F790FE3B5A8A41AD2E91866F81B195E0A02D9BDF971633F
+0FE9A9BEA04CBEA9E46AA44C31D694A0AF3D7CBC1FC4988F6A81130613047150
+12203A85849EF4D9238604ED8040DC85FB0CDE867F50EE685C8B2BB0574FE22E
+B02F2595A161E810E2C9FB46B3E15BF0B3E7591FE9CCF7689B1988B354D81E42
+145BDD9A5C21B3E52BA1F1CB76BCEAD38C97D40F1FB50C505B0FC423A1F495BF
+62332481948BC331BE6395DB78C35E5DD1B55E92FD14F1943E73B157F5E5C24C
+AB2D70824FC69C818980EF3954F79FAA4E946064F55D8A62723694E4C489A1FB
+6A082DE0BE740A145A71F1F9FD011E558E3F27DFCCDDD49DC348707DAB524EA6
+88370F288567B17F313D9EF6300E8D910F49A4E9E581BC95D89B84E2591EE3FA
+41FFED57028D28600F1AEDFCB752BEE359856AB8F776A166C83929C17BA13600
+0A5D2447AD901988E5F5B6B9D710080392FEA79CD595FCAB7B9B52C94E0733A2
+BC63FBE36CECAE723EBAC3BDF4AAD1494B9F3D146F7E3DE66F77F6C3636C6BF9
+EE6C73AB8F1E98E043710DABDD1E9CE6E3F5FA8F44670AE15BF8FFEF72E849CC
+A9E20CBFB577BB42C9D842A3812FD73D0E26D592ECB2A920986F623184ACDCE0
+90610840699BF7302E534D6F9EC4B007E6CE4D8D07BF9D4F486C503A3EEF3999
+50E3A7402046E7C08AD26751A910154284312117F6C6AD506038B4A5A4E1097F
+26241689BA60A4B2E58103089301AEE41DDEEC60CA3ED74B2E838AC0A86E355E
+EFB46562208EC834133CACC4A6516B4378B8C3F86083B18AD53C3C1E13200B8C
+6F4ED7346CE480809EA316BC70C5AAD4FAFBAF995C7ED82624552BF2F0017E07
+51AEEB8E2529CE5E24087FF3F0921DD9963AF7BCA9582565573CB5A463C4A5DA
+0F1C8A82D76213DF461AD578C25340C4178CA8A7E99D85CEAF6605FB5AC336AC
+22CE77D930F859E0089A09D80C694C573BED5448F793FA7A3A977AC2EED1BD47
+7DDE4D72B9DB3828175AC20BBA66EB0C3D1CE9931AF3B5FDA9D9CF3C67E65CB7
+439F5FA380AFEC7DDB17FF8468D03ED4E99C507C3312E7926A5650346C44560B
+F729A594E0651F7BC3A0EAF5C66BBF27070CB1E691D584D48998189152D78F5A
+E2FFD2C517BA7127DF128CA5DEF2576FE2BF61733D5F3C0972BC423E34C102FC
+F84E33813FFB62ECDBDB494AD6A3AD2C9D1EF30D11031EE57D8F7775A6A0400F
+3EEE57D877FB8E007E4B309412660197770EF9792605C08668F694608E37BD9F
+264A298AB09C2A6E605C6A6BC523197E1F87DCA1150DE1A535C327CF09C86A3E
+2FF9FFA2C5A12E2C4F1DFB00BE313BA13F80379EB70873D89667D0E274EB43EC
+69E1D140DA4D02C8D2F8D088B2BF240EB96641836FA71EB749829ACFBAFB152A
+E67B9428C24006EC9AE92BBD00614E4FEF490944C906EC75508730FBD7F8E439
+1FC995C07CC43B83E2F4063A30BAA9E1E7398C250368C6E13BEDF0F14E6EF31B
+823FAF0EEC9A2F745125AA099110843D606073A374E97AA91139C190B0992CC7
+07926D8F9F04132B6C629B6149B07229E3774AB12FD9CD2917E8162D6F4D26AE
+99AB9F015A6C629B094E6C98767B8903678EFAEE09BF1C7B6F299A0821877171
+FD01FC4AB79872088C954ED616FC17DA91B76F33BC8AF20EB81BDD3CC686C5D1
+E28ADBE191E355419683D64E7A3C9F78C380052F9329EA6E7102ACD7D5588DDA
+B1EFEE6F0E6B4378D5E7DD88163141E47FF011C056319F8F8ACCFDCC2F352696
+3C04052BBEB16682801F73BE5B988BBED6D4C31B5D188E2C1D42C368BCF81B7F
+363189B07A5056FEB84F7DFA5186E9DB319854FCCF6AB41FD87EA5C65C66201E
+00D743116D2F0B799DCD60FF0F534FFA92A4B8073E12245F194D9DA9D76993F6
+A17AEDEF24027EBB10EC75130081B6843C302BB5EB62CA40186F2E9E4ED17296
+632B085C31B432E748433B4FF2F1CD7BDD4E6B1E6C0C369DBCB7D5AB64D2D275
+D93A35F54339DE4EB8DE77418B977E50D459732048AB32EA4CF69DD7DEF04CAA
+C22F16BCB3BE34512364791EE63E29B5733401C8F5A847764525E1B14CD6CCE1
+81A16F9FFC6D5B37B293938F0555AF9592537F4A9B2AEBE9EF766921DB1D2B43
+7AF063B20D66F4079ED13B0FA60EB782DBE17C5539A1A5CCD335F90B489E8C68
+95C28F9EE0E36BF385C0D554C681E5D927017B7DAC58A4C3442BD015892BB7CF
+51CB250208CF5661918B5098017CEA30B5C0402C155D4A8D4935B92670B333E9
+BE3154BAE9CF9BD47D79FA369216E2F3F0AA37DF598036400107B60E25FAA284
+87BDD4BA6459617AC77787137BA30F0CD07576E66527BF4D39E39E4AE54508DF
+351035A3A1BFFDFE5BC76222C8797D78723A2F3A69042BD31ED69F88E8F6C68C
+F0D8EA3F36AFA8ED13EBB95ADD129E21932EFCE965F89A399970F30011AF367B
+3AD8089D6B51E0DDC6B95F56435610DEE2AD9D8A2FCCD9699663523754C23A6F
+774F44816FECAC1EF43BA3F9A1D69CC5457482E07B1976EFE7A7FAA60579B95F
+8DDABBEAEE10353D72759E316932D064EF132FD0517BE7009431A5C185CF7A1B
+13EA10A69449674E950ACFD367713348FDBAEBD12AECBFE70C4B7FEF702BAD2B
+19DB97450F38E73B2784E98FBDAE84D2C3B1167E8B85A1ECAC09E62D187A3043
+ACB93A5701AB9E66F25BC7D103DEB8161FF7DE5CC957218F0D279723DA4377CF
+A08BB2B08218D5F62D4FE80B8EBC3B8B2D0847C561A2A8A1F09EA64AEC9281D0
+7BEA4DF7C7ADA40809268E1DDA46FB41216DEBE3C971CE51C367773F7492208E
+E7EB797235FD349F6BAD6D6E4F99C29F5A6C3C87D6662210AEB92C0FD64B3CF6
+AE2DF93D6A6EFA27B976E3A91BE80CCC2E7A1F2B90E1058F8AB9FAA0CF87C15D
+AF37C5EEF32ADACB6FDE08EB99F62F9194328C09BE10B390C349606AC58C167A
+15728318A475D8F402E294B0E07FBE936574A0FA09EC4F829794285AE3150269
+91D07377024ED8EF474898744B82C693B8D9C91E1A9011D60B34391564A747E8
+57EFD30427B4001470009229591EA924C547FD154E16646DAE7BD115B0C8E3E8
+BA8FDCDADFF9A09639A4B9FEB1B9F5C00CA5C87C7C04AC37BB7692689C832071
+5FC338C4E5B448BEB3B9F60394B6C8362D523E10B2DCDEEB70ECA04CC1C7CCDF
+2827E3A40F34B70247CF6C5D3A638896366D4A28FAA2B1B98F865626C69039FF
+3D54638C23EA32624CF10216A10D83BCB734A09575AF1B41A26B18FE5AC7C89F
+64B70002CBD12AA01EB9BB97EA993BEA9FA225552AD79B23ADE62D47C48BE023
+AB1ECD12E6D825A62962C41BC108E8E7FB37B976A4F826C12A59E7CE61C6CF71
+41F24BEF3E29709C371211809636651F02BC08EACA9B0AB2632DBD5D6E756953
+5C4145A7A3A81133D237335D202DF3673BDD07F679F650C67066ED300205584A
+26E444A3731355C11FE972E181D9C93C6C29CB8CF542CAC213D9040EAA05889C
+8C6EEF27DE0846314699DF54E99FAE310F11E3AB9005C432E5208D8BCE1A37AD
+F2D7F3289C7C564A24B951E0AA63BC60D75AF80428FA27EF965A1600D1A7D357
+935589477B0B5E12EA0512C7D219561F91A9BC95580D4CAEA7218F8B1045D6E3
+FABEA4A25ED4453A7773D2C314B8F156249CA4AA102AD02343E5BFD0396C07B3
+14DF0108D25FFE8ECFA22D7C5DD91D422A399821E7D910FC87B00544E53AF711
+E98F45C4329FBDACD3C332454809DEAB801F6DCB9511E92F235E1A17EF8DC8CA
+1C1B6217082CB95C1A605D7835741D3DECDE9202DE38392B18AC147608CFEE8A
+BF21E6DE2429846EDE6CA2D573C1506039E9AECF0A52318E992EE6A2F23469AE
+C0CA4F3F90A79E610E4928D95D0210A30E9DBE65B841D16CEEDB1D98FC42CD3E
+34426D5FEDC316E922F98EDE044DD192037787704B1206A21F759DE304972B60
+36115A6DA1512B38FECB759432F3A3BCF3DF0376B5F8D478DFF2BCEF69A3BF3C
+7A65C734EB54BA16D2DF4B7D12F646DCE4FDEC0BBBCE02A623EEEEB4C6E81593
+C0A3731B901C2D65F353937FB0CE821490398DD73B24EEF7943CDB0A1FA1EA6E
+6CDB64DDE68377298A655116C02BC58E7A1401024394FCB4A4781BB0ECCA339E
+7E8890D1C5E5B6549B5C7B42E3C1FE35703B21906A0B9AD51EE5117FAE9515E0
+3C1B82C57BDA12592692CB93370742E5AE20601AF5B4EF353CFA3EF5C92FEC69
+49EEBA22B9129068DEB74C4D04756695745C02DF963F12D7A256680DD052B070
+CD7B9EBB05015170EFA40BE9E5C6A3B6CFC2C2F2A2CADA796B837E0E9E308551
+E95A5D6598D332806D7E1423B0D572961949E322CA226726FB20DB1F25DB537D
+3579D615A955EA323132CF0DCA83AEA15A738111BC420C200067379B0E90584B
+7D142B52915DD2507477E6B6026CE3F55B42B6CD45263637D232FF9106934947
+0F31918EB3FE1AA0C56A67102D3341551365F0D02CFD324627C4C1BA77E9302F
+673FE00CAECDD5CDBDC142E7074631C26258B1BC4DC5301FBD06C5CC46ECC9EE
+8A3FC96AF26D9FAD776F4CB4BEA8A76362BA77AA07F4AF80BA17D6AFC668FAFD
+4444E78E82FE7D70226125C15388F46D723804D215BF2A16F7C21AD0A632998D
+E9023CC75FC816112850565757C5E537BE8AF1EE069C3817CC8C4FD85BA8791F
+6CFCD13667DC618DEF2B7F6CB788D8A039BEED888E4D0D8C41E36012774A92C1
+1B9D1A7343CC7513730619F110C055D61A4FEA3666097E27626F7AF00D63C49E
+C7B65540B1315CF48871455762EAA5EEB3714564E27C3C3F06AB0D5F08152B1C
+3FE59C125EC1EC478957F9C41523DB63EA844B6BCC3F37A7AB39780DA0886F21
+F3DF1BA3D37580DCE6D4E9A512669B1864EEAB35DEF3FD4A9279394E1E581020
+6FC27F2DB0AD5BCF04DD864B8070AF99E37440F80A80E13037CA7C146BE7943D
+B9BC86AD2B250657F97C7A96A551326980E14D16B5470CB75801581F8179BD05
+5A87E566BF2E2BD81C3CE1156E54636F0C0AE68AEF10BC74CD0A3B6DFAEC2970
+2C23166B8BC41F06EE48DE5D6B187F25C74A5A8C6A464CB9E3735320114E9A39
+00923504771DACDE90073F2DA7BA91E9D86B0660897BB72BE5D851F5AB62C6D4
+5709A2DBB85801A8D7FF60B14540305280E53C605121A863665E0A2D47D8A31D
+173372FF7C179A1D1A8E4F6F9B34D274A94B25BBE087C657E09EFC6BA43445C1
+70FAB6A3EF0814094FBF5370382DBC64C4F03CD96364E047CFFFFA66C2D4F478
+9280BE9F6538BE45898F52E2F05D58DAD8DE61D096B08D5A80A65FC46F8FEBFF
+C7506D9EE411E3D68BA61C3B768D563FB9942E0DC5DF82A6AD090D514D682ECA
+C1F50E14EBF58D3E1513909F4C7CEBACFD88102670F5EB176D5F53C9C92C6BC4
+B62C55E5555548B1D649D9A23EFAEAEF97EC0C3C627DFE4C8FD0E1065ADE5A74
+856863FEA0A73BBE28B5EC450596006508EF8FD468C1E2700D9B328684ECB780
+3167104317B143F059A53FBF64E4B7F7DC60B7701AA8CE4B5ED2A6AC991A1E99
+BAFA89A16DE0E3A0AA33022B87D694B3CC40A9D0B346B1080C840182A0917431
+CC2250854A407D83239A811130EF7EA6841A215B02248258FF3BA66DAEF6E137
+088980B04FC658DA0DF60DE24077F71318AE06B30627C3A638D6C0B2076D7A04
+5988936B9CC5ADAA2169F739B8F54AA91B85EB119E5E6894BF4A76E74F96F3FB
+CD6A3E96E85567581B91BE4A78FE90CBB1AD177F3A08B96BEABEEA5BA017B545
+69643B523626A76B823F8A010398229379FC051B846597EC174F3BDBE86AED57
+D29BEF440D0A458A51658A8F11A84D553ED15BE9437F4F0C8D3EC3084F0868F1
+C8E36F3E97E657F815560E470E8BAC98AE4E40DF2CEB35A76859083046CE172E
+C2F0DE76BDADE3E6C9FEC16F42605A41DFA748987D9196C3A8895535B756A37E
+D9E8056F6AE08DAB8BC625D127BD2B1633FEDB2DE282A2F22C0CC0CD45D7DF8F
+6735C77DCFC66730A8D0D5C802E3D3E8A2F7C95BDBC769E9C8975116F3B97C59
+4F57E6CB135B014E34E1B2914AD2C4DB41E573730783F6531347F27077A1DBBA
+FE6DC259D3CD70C36CAD4529DFFD07305D786AEACC8BF3C4D3B7A1ECDCD3C4C4
+0607418948E6C8510C9CFD3E2B93675C81C33D1ADEE32892A47D92A29BB8F04C
+278350E660667BE6139C0C8E1794FC9AD2099F3647BE96B1CBC8BA2F77A0AEFE
+97EDE59D9F9550FD3952449BEFEC5CD25632998EA8E32DB16E6C93A83687C853
+FEF32A49FF372CF8E580CFCDA6BD6E3BD60BE8E652FCE38D54FCB4F00055EC0D
+A41C9085CA039DC00843F9EFC88D12AF8C8826822464926023EB66AF8ECF3F86
+2F0488DAEA9F996FA25E8C8258FCE63B3A6C661BE677D165F65EA67B152ECA14
+0D2E61BEE481BEB1F45F2A83A96E95CFA2E2D076706320682B19F1547E68413C
+581183B679DE75B7CFA694BB4E9D032D43AC0F08AE04416A60DD62682D30838C
+DD4E0897E2D8A178F4A829DE0783312970A8431705CD2FC6DBFBF57FEF332AB0
+5473B356B7E2AE91BF8D1CD9D780FAADF246AC930C0347713F96D82F1EE3BC2E
+F84A6CB140CF7AC313F34B3C1E073501607447C8B8324BA5728A28669B5D44B3
+7F9B38562E61D74CACC250BF9EBC2097167A013338D44F51D036257398267560
+5B4BDF8089C59CC50704DB35FB7EFE08E51F6A7CAD8EEA51C4909F8B22313881
+D90C6CA7CFF8A4135330BF780BE40249052A29934D57F83F6667EEC4A7733447
+B84CBB016D021625AB1B40F9AFC0405DBE0D7394D46595613CF234CD7BA6979E
+4AFFE8FFFB005B3D18A93A2DBC465E0ED90B113DE484084914B9DF7EBF44A678
+AD814A4EA2815C3BB1811109F500738F860EF4079AB3E826C2F92980CDC7F942
+0679A6EE279291C5ED84D53EA15B59EE47646DD51155020EA7DA8D4A475F1266
+18A8C879F4CF3D0562E61122B59A087BBE110188E634685D9E87DC0E5A8D06BE
+98AADB84E98A4428B25E66DD2AE23AB185D95D62ECE4085BE1D4967E9CADD5E5
+EC92BB488AAE7814EDBFCE5BB7F866668CBD8AF904FE4C7699DE9764C96CE74C
+17AA20AC60CD480F562778A95E025A3B98233F6F7EBF2F0359498A389D0F5B55
+8CF1686AB3F1752B18B4A4B1D873DD8A35E73B3A7F08BD152DB528C52ABD9D29
+9BD2DB7F07658D1F7E51D9038CFE60DC9D03FB2B6634074B6DEA51B63A358B58
+1F7096676997D5B9DC7F1C68008B0BBBE13D2FE4CF2BEC425CFC8230D895E97A
+C2C664A99AAAF37B627B33A57B4131959FF07E80E7D35DC9F6C0C216781F0F63
+AD3396D9D197EB54E70288A6EB1C63DC0CB185F08C1262EE0E63ECE4DDE17EFF
+4C074B28BE3419A6A6FB04E0ADE4E61F54FDDD69AC02DE30B9B419975870BA13
+0ADF9F2658D799E9DA2E4AE93C75E0EEDBAC66D77F14097370BD22D009BCF6D0
+838A4434CE9E65A045538BE825C804732D0C98615B724F8B1B6F052AA52851CF
+7ABC84AD999A9EA32304582C04B91B501B9B3CD2A685B9361F21BB52AFBE0496
+2C9DD63C1664BF0693DFDFC3724DEAF49F6B9025672BFC12BA194CC5DF0EF962
+18AC0130436D9D27F66B1089C0B59264FD1A388B545A469D57D20BC3864534AD
+73C748659935976CB0BA8AF81A159B4BF95EDA9C8130984631F1F4912412F02F
+BABFE838EE13FE744CED03E6914BF43FA6DFF3F9314F42BEE02C6663037A3DDC
+6BBE88130E6525D2191EEB828FF6D7208FFECB77554DC41596FC1EE24FAA32A6
+01D701BBC23147AC135A7AF22F8E82C5FFC20478C097EF9DAD8D0465D271DE62
+012B1026F6970C05071ACC483D1B8A0E759152D94E9470EC560315AAD8666A16
+7E422D75CA857276B0679AEC89E78EB6E5603B2C6588A27EC513F6BD48F839C1
+3BD38C5B094110AE4DBFBE728CA8DD44249512B9AC86254D618F9CEBA7C6C544
+967DA6AA44DC0654E581B4CB0F8F739AF8EF2A92B2A359FA4B3A0EA3FF4A8736
+853D6CDA7034C13AD2DB0ED59AA9E6515227ED65E82B0A149F68AE248FE21B0D
+50CADB74A015BA18F6C1E534A626C4F50A379E53B18CB8BEC38298B6FCD95A69
+601D2508FE90F45AF92D2AEFABBB0D0AE51BCBE5AAA96393328FEC03597B4415
+941F0F2DAC79DAB1BBD04F1B9B8CA189F72D15D29C3F7C491FFBE9C991CAFB48
+55E2F73EFB9C3CCFB791863AEC846799202754ABF7E01158F6DB791B8338264F
+0853D06D1230D8B025DAA6095C9DFFF2E08829C7BCA90F6D986ECFDDF424F532
+29033647C954BA1F9C77E9955905867B31E45751F240261A3DF10F3F175DE485
+D08E903475856918194BD011FA5BCAB3C9923CC8D8F78B688E7892107A3A27AF
+BDE5CBFDBB4E29B28208F66AB1456452EA0E36F75D6938312C7D160957E3D555
+E2DEC5B209D8FF62449CBF1DD1B5D7A799167AEE4DECD8E4FF761766AA094FB3
+7FB7E86CFD76979667AE69886C797BFBC2E5AB647EFDE080AAB5B1AF6A20C0A9
+BD705D2B6AE86218C50829CA99D4EB234CBB0476F32A186B45EE45D41785AB77
+434538B55F485CA58FFC35EF51C7C830EAC2EC176F816A2B3F271FCB610BBB24
+76C36D8EA7D5F12845DCC200227D86A640CC0D70F59791F6408702AC7D1DF14B
+F4CAAAB32F181BAC49255BB853F6B082EBFD1CA577F6B6253616DF067F003C65
+88AF610C5F58E8D91660F51E586229ED325C5AE4C82E3187B70E0E59AD7B20E7
+375327EACC433FE34B699AFC471832AECBF19488FE673BAFF48409D24B4AB58B
+1C8E8A561E3C8B28A078FC161655D90609B014012CFAB0F5EB875E9A83D2B88A
+87E11FB574749EC6763D722D8CBEB5F98143DF01AC4FAA1A3B70844E24C92A82
+C864731DDBB846D8BF01C0805A24EA471C6E18C34C756C0EAE281A9F00AC4948
+3D2CC2F22C0637FC8DA5F4A9BBE085757EFB9CBD9E54F895D433E69E579D8ED5
+D8BA8C864142129E0AD170A7D4544ABD8A802191EAF6CF6F5E285404B7D19B38
+093B52AB8112001A8546DE62C64F2605011DF6E02C967E02E340F1E9383043F5
+4EF3E7E6DBAEE40AD431464011B25C8078DE28346216FFD394087F322007F911
+1EE21C688102610F6394E3BEB9BDDBF8A36A1273D6316A53B9EBFA037D6AC637
+BA0B36AAD961061CBD3C31463380D6D13003C5FA5F68F276468AF2CED48A6CB9
+387AE5741C7C79252928D88B51A853B00BE8C029E8B8C58F8C92ED4C74CC8943
+B4D89282E7160D532F9F22007312EA18C33A848E4248204F776F00D46D483259
+CA0104174D2F5DCDB64CCBFF60977D35A6CFC2CB3441EF966D15C7AA462B1737
+0079B920361AE754EFF71DBEC68B21A885AB9A61C653841B9A9DAED199F33089
+C560C28FA29073899466B9BA55EA63439B4D675811D5CED006FB6FEA2674CBB8
+ED75493173B82B70ACA4C66AF3BABDEB0B43F1E43583D64EEB11CC16B1F481A5
+68B11795DDB67CB33A03025AC2B215D5379835A32CE1D4E327EDE5B53FA360C0
+399A30E2DE611B64862138476D68C9CCF899FD89B5EB8E155733364FCF981F0A
+4E14E79325210F6C3B9C594C1B8DD2725DD694F7AA30A48735D69434C650AA7F
+563DAB6D793E70767DDF0EB615F44E56002946E3506686BB09A365C31A2C38C1
+E95E601A0987902A54BB1743D9EC5A5C496FBC987D796B9C75DAF3513D0C2685
+F315A7E3C61D75C661CD4A5B49297B16C1FB62104F0AB175DA178EAF5B63C026
+E99E23AEFDC25D1C93BFB7C9182B58D4A599B484616286CFC0C93425DE11417F
+7F7BC7B05E6F8B2E3E37383BE6DEC107EB08971A6ACCC66AE172EFC6F529DCB2
+4D478FA20742410A8804624DB03A90C6BDE00B38F92100E065BBB2755618A570
+BC84C28EB5DFEC2A4BA7EF6F4A6B6DBE18069229D912A310DF592878ADE6D3B8
+4684C42D5DB517E86265F689D54E870E0EF9D64EEDD723BB9F99B820EC790FEA
+7BFD5EAA848D6EE17519EC82A9070B500BB5DB318509F72B316ACF162A1FAF75
+E5C7AD5A8F7A2CA610C1A78DAC995C378C38D73CADB167EFD61F1410BC166FAB
+BFBF9C311FBA0040D77848DCB1B093D7AFA67C9CC400B1CC2790682D6077A400
+091915F6F609C581705F095BA8CD132E31341168597CBFB9CEB29287176EB484
+689573754C275F67B2802E9614B665C945B8A18B7E3355A922BB45011DA7251B
+90812D8C817AB81D65E3D69B00F9236D5CF95CEB734ABF83478BFEEDDA250CE5
+859AFE01BD9375719F1DE48B9700AF63892C3D5CC9ACB84F07D77B68025D44EC
+F6E08A113DFE85D935832BFF21A193F96A57594B79A69C3278794F3B96943F07
+9A6C629AC9BD16924E2C18268F6482A73AA98B0FF28E9B8E1E2932683C155B14
+491257A7FB094FEDD7501AB7C24CD11F3B45593702E4D462BB73AAC8C6D85A17
+94AC384C6B1AED89EA4DA938A789C3E19C19447DB3219EDA58ECDC1602A8CD86
+7416B777C32251EBC0B1135AF96111918ABDCDECADD7BA4FCFC07EBEC5F29863
+458D30E5707343040174C85044FDE203878346FB14007EBFA2D7548E7ED1790F
+E5CAB33BE24FEA0DC7B8091FA1DD58B303A449015E089FD7D0C3A102114FA2BB
+72213BA3EF3D1981F4DFCF0B7C3EAAB740AB77FC4401899DB5CF7D4AB0D50B3E
+D1D050B48D4DD999594B576A72C6FADBBE7B08AEE834858101054CF8EF86ABA2
+F82F97CD18CA9E5D5BDD5C9FE6079531EA709F6E12E8633C8335E1A68C1E639A
+7D8F2916118506FB51D79B02614CFBA56C44F6CE83FDCE29A606FAB6E06D4AF3
+D9819629213892707B1B48CC0FBE495FE8AEE915CD7E4F3E107D8427C710E6EB
+5FD126FA9ED1C43F6EBEB2771D9179CFDAF9532176AD8BF820351A6B614D2B9B
+DC0391C729A2F535326FFBBD9C5859B3D29F494FCE6D6C49E9D1AA97FAA8FC4A
+618E25F00BCBC742F3C9
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMTT9
+%!PS-AdobeFont-1.1: CMTT9 1.0
+%%CreationDate: 1991 Aug 20 16:46:24
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.0) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMTT9) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle 0 def
+/isFixedPitch true def
+end readonly def
+/FontName /CMTT9 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 33 /exclam put
+dup 35 /numbersign put
+dup 36 /dollar put
+dup 38 /ampersand put
+dup 39 /quoteright put
+dup 40 /parenleft put
+dup 41 /parenright put
+dup 42 /asterisk put
+dup 44 /comma put
+dup 45 /hyphen put
+dup 46 /period put
+dup 47 /slash put
+dup 48 /zero put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 58 /colon put
+dup 59 /semicolon put
+dup 60 /less put
+dup 62 /greater put
+dup 63 /question put
+dup 64 /at put
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 86 /V put
+dup 87 /W put
+dup 88 /X put
+dup 89 /Y put
+dup 90 /Z put
+dup 91 /bracketleft put
+dup 93 /bracketright put
+dup 94 /asciicircum put
+dup 95 /underscore put
+dup 96 /quoteleft put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+dup 122 /z put
+dup 123 /braceleft put
+dup 125 /braceright put
+dup 126 /asciitilde put
+readonly def
+/FontBBox{-6 -233 542 698}readonly def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891
+016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171
+9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F
+D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758
+469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8
+2BDBF16FBC7512FAA308A093FE5F00F963068B8232429ED8B7CF6A3D879A2D1E
+2931CE5F5D18C658602059F07BE66E6EFC9239D7AB2FB8A4CBD41675B8ECF279
+650C29E53B14AC0E392A664848C1844B1CECBB2D5CFB72D0916B675C9A9A1E35
+F12696A6F628473C604A95376468E06E295AD6F76CEB939D94113532050B9D5A
+D2F41A9EFB9424D986612313B89EFE9C8A71313340B248F6853B1EDBF02B7F9E
+F447220FE131D7D54CFB8AA1281DBAEA73E665BACB1F164552CC0CEDB63BD4B1
+4A9AE8AC6FA02242DBE8DA46B64B6BFC11762F0784F216FC8B9120D688D1705A
+438B14F5E5DEAF2A98408B3B64620DE3732A4DAE6D08D5D97E34C75DAE19EABD
+BA0796165C1151BCBFB1DF8D29A63A8300DBDB9E3323CB82D0337598B83F4F2B
+A97CF5196D4D1CEC1EDB8966E548C0D9C194C932319610FB43EA1B86322FE641
+AB48770FF13BD475A7267E142388563D1A400419C585B22A9886074687BEDF74
+D905BE8EE440BA2ABF28EAB673399B7F129B9729DD5564C681954621903B84BB
+CAF89AC5ADB2932472DF29ADA2BDBDB4D05F65F28F5F4C529613D61858E0074A
+082A852710A62A147C966F2B85B51B0BE85F11D2057C66FDD61F6C5755367980
+9F4DE680601D4DA41B46F8D2148450000413C27AA39B586B74B977B25F0FD3C0
+4BA1EBFAFDBEC531EA1210365091671CE3C86A6D4BC591C37DCC02570042575A
+9D24252D6E01A8603753934D7EA5CAC1BE4E5AD2BA047DE8F3983B23A8A1511F
+B08D373B69E5076CE4300137B8805EBCC0AAB89BBB312A77835795E3C069322D
+42C893A30AD739E2BDD299679B158F7493764F2321E3965141B5ED1C6F4765ED
+F46D391A646B30C90002B1C461AEE79E5F094CACCA656CEA3DB921CC5205F328
+A2C69F817061D6C60B121EEE844CA5008F23DF072D4D1C9EE000CBF2FC3FF4E2
+119740FB306D340D92D733000471A990E5227B06C53B3DA72141948D2FC17A77
+0AD21196F678B0A93DC026C410A781255D359F043B777B70E1331E88E68032E1
+AFD0CB35E99550E1C0FD2852A7D190E079C1B8EA1F8B005D66F8406E14DCCD92
+9B1F39E6A9CF2E33CBEEEAA09AE1930C846ACADD3B0F0F102B43AE6EEB3D9A24
+50C521F1B4D0541CF7B325D14EF0575ED2A7A659C828570DE5A4A773DC6493AC
+C95FDEE00FC1E9E332B536AE670CB145808E654923F757EDA89FF2BCA9E89FF1
+6D0D03C51443C52FD718CAE35DCE7CB7BC738614074131479E3B05F534F67874
+E2118A332C880EA45B91253E8101C38FDF36BC7766CB320D14F34722E2F40F8E
+A469DE22A904697BF8487AF1F26166730DEF2B9502847EA432FD862BA777B6E0
+C62A9622491A23CEF57E9713CD3D61A36E00C865E445BACF3536E9E33DF6DA81
+995CDC130C5AF0CDB265692F769BC0200B42BC73A117C0617C412ACA508F970C
+B20652DC14D4031E531BF59295938866FD3EC6F19B4DDA468C69B78E117DA535
+438B129CE6DEC5FC2EA667058B36799189DD9CCFC0D60F96A055280C298663DF
+B58FDA736DC747662D83914A9845669E87F78AD78F2E93466B14DE865CDABA3C
+444C8C17CF2C964CB42EEF8D7D72AA73B6E5A7DC48FDC0849A92A97253B05C76
+5E4D2A947538E7DD046A0107C5B473C460F9C0367646875035C53D4435A5DF36
+0D4C415B18D38411CCD3E29F3D63A14C9DE5B44CFA9DB7E3EDE6B5D881903618
+CFA9FC3BACEFE774B0052896286D9C8A5F302F1BAD47BC71064039020B164409
+7261EBC080F141CAD093315E0687776D604C8D74C77CCCAD5FA2A808BF9ED3FF
+FAADF730A8113AC0EEA8ECC761060D6A6D35DB4F902B6F63350EB5A819092DFD
+06559E737140E60F72543E3151039715DDE716517DA0A15BA43A7C0825997371
+B9B6CF9E3D3ACD82B053682EFA03ACC9055BB1C644F1BFEB1A543768237ADFF4
+91123E508671FAAE22B1118471A081520C6E138CCC5543F163BB6D28D09F6371
+78737184F1D3692BE655E3EEA04BB9B159B07EB70D22B4F27D218E8535282047
+8AED37D8470659F013D648B1FD43CAA99437827E88BEFD7B7B51D38B68FD18E5
+60B7C3BB9A1981D3CD0208FB94D29DC1BFD86AF42099D5AD7F0C49B05CB27291
+7DC54D7CB4465E78864D78236419EDD8C52CC26D7041C16EBD06FA6F6FCE91E7
+A86B11C0D436E13958C81814F59007DD17FC68AC26029BCB74C4C01B7BEF049A
+81F2D35F0AD2313B95A09A65D8A915185EC6BB038F15B29ECD29E6110DD53E0C
+B09883576A64A272D02A84AF63800E505D8B6B95CAC9E510EAED3888E193CD5E
+2348079F78FA6AEF1DB0A8A020A89315F26A4D3923DE9A6B6349AD75F1E08250
+95996A8C71DC6901E90845D6ED174CCE6A2F2D7E1864469CA04567BB3A0B749D
+D09F26846E95CD9B707331381AA1962CBE6092808DE03FD97022732E229F6107
+6933E9BF8F63A0C0F73AA73EE8F64BD049F12FEF37957FFCF9EE4DCD373E6991
+BAF5FE4415CB2784AE7EEA194BCA730D552E6B23DCAD2ACE75C9239EFDEDD3A1
+1A7E33C5D64F9664D26ED72EE280BB33C4DD08B76F787B2A8F5E484B6679B4C9
+70A123B9DCAC536130E9095BA6688551392AFEADC8169F67ECF580B9A0F10BD7
+4760E803C4B4624EF892A07F4A879436493D782F2BF34A0B560EEB21880246E9
+4C2126D731636A317090E91CC4CA05D99E18764DCE7B1ED9A78ADC5C3F51EBC0
+887F0E6409424D067AD199F238C059D05BEFA084ABD4A2CA7F5C16DBE97AE843
+B51BCB3B5CF71C9168040203083A3EE50E4D492BC21B7CA1648FB31645C74F32
+801B3743CE95D230920B59DCE8D587EC6917D31CE10D60AB047040A4194E3DC5
+347105F38770D26B9CFC472B3B88459DA521985B1F6005980A4D7C6A3B90901C
+0B79D23FD1BA58F75E0F9AAE0389FCA0D10C061A4469B4EF66523A2DA39B617D
+8E21BC50F7DE585F9DA3AF48A5E88237544D230562BC6E7B6B26CE43176EA3F9
+A8F1F13971F7C65C4C8FB391CFBE58CA3BAD327DAB59E6496869715FF5E8872A
+68409C73D11951511F5A8826BB47C051762D2E9E8495AFE328CCF14B4192724F
+4697500FA7007C9F662CCEE6EF492EC198515B9901E12D27991A029141D1826B
+D722D41DC8FC2F7E197DE911445AF33E4F58E7E1A2067AAF19B5D46173039D43
+4AAC3991E07AE3262F2AA3195F6F3B022FB40436111CC7BA6ECA51BE2C3867DE
+20D8AF638B6136320F9F214BE615954F01AE717CBBA102DC69B961ADCF6085D1
+EB59F2228F373E184EA3808359E2979DAD578C643F496645D97F41F46357FFC0
+1219A3CE14E1BAB3D0CA3F79BC299CC0A810B44872C3BD0D12D06BA4945A9E71
+E792DCE14E8DF47DDB17D01DDFDF110D7F4D928E187E25DABC3F34F5428147B9
+0F2F756B07763AD25685F99CAEAB3138A0809B272154A17EFE2E371CD9FBAA79
+B34F34A8466CA9B637C5FDE77A65A67FA68E4F1B6D1A2286A2F6F024A8ACD7A5
+9F187818C7666E5BFAEACAF13B6489C88731287D58EB413006653574126EAF5F
+6E78B13514FE40761B70ECE6B6C1D2422F9FA86AC4DD12A807445A750E6774CA
+90DA9FC8211134451FFCC547ABCFAA8F63E934DFEC3B4443ACF203EBBFD7AB93
+3EE98240E47B12A7423C2622E4D0DD6F5DF97421C29A644F2F37221C3F311FE1
+418FFF1B36F1057CE5EFCB2801777DB7E746EB933D892FB57E94E8A0C617A6BE
+1711CAF45373D573A7D6018673AD72BBC10A418C756E7FC82F9A2824F3B080AA
+175631DFFD9D2C78A92FCCCE9E864173F774BE42D6A0B4F95DFC23E9FF4FB0DA
+4E69424B496A08308BDD03BA40E1E29004033959ECC88898D0057AA9E62974CA
+4BE6651B893AEEC10F325264D0C14A8142C30A58B87583A5A5938E43A4E39B60
+C47A1A227144050933BBA8095CFB4FF475EE9BD0FF44CE610E1E50390F641D2E
+1B0DD50C2BD7033C286A666C4B07CF27789D68F987AEBA241EF087D9215F89D6
+0A89D4049EEACFF77A183ACFD83B60A492A0E847741E036353D0DEF1DBB01BC1
+3354F15232992FC283EC2D95E93A8537AA790F21F23F9DE5C168C90933C6F9A6
+3A4B773C1C1860A1E3B0C466B709D27C68FAB1B3617A73DF9E018C2E4B595330
+8A0E8D1BDA0967B1DC3A5DA5B96627CA556E23BA89C12A512026CF6D43702E67
+2EBA6786ABFEF3F10E204B9B5B72C738268BAB512ED9B8E1A5DBF95CB75738BE
+ABDE1AD1208DD41BA7B9F7081B01AA22CA257C602E0CB9769973B4FB46C1A4D0
+5EC5B567A9EC991DF2D7EFF791AB4A051220C2E3CB17D3A6FE6CE802A3BBE6E1
+656BA3F612E6479BA94CE2020C55345ACCAA514A55C72C940419CBF128643946
+E0721F8945CFA9A7664D3E274AC498ACEDF9C8A9D09E931533CBFB712057B3AC
+44CA4BC95BB96F9B3FD438AF46D0FD5CB66EF308278ADEB0FE31CEB9E93E2373
+0306CF0EDFAE6C73EFEB1540E342C89FC626966B7D01C2734795D3402A6BE710
+660B2822088D5A9879DE4C6A74CB5719F766866D797FB846F4AE181ECE9E447A
+6FDC5365A937F5D5CDEE1F961210917191CCE511F442B34E2399C42C5CFC8F5A
+7B9EB407F508B1B998B295E39C04DDED5571492932537FF6AF76526E739C99E9
+9B702414478863057F264B11BB195433D247AB684722B9EA66B02EE1BDC57422
+6498382B2AA196C1EE9E8ACEBD946E16E415B148F3BEDB889B95645499E61EC5
+DFC8169ABC03A1AE3E51E85028338FD7FD471CED1708BBE55577560EEF0B4263
+17C87251F434C0C40FDBA5E12F3720459421557A280233DCE87805BED9184318
+9C4A55B99560459F0932A5656389255C259ABC6F115B900B8D6A82853FBCD7AE
+01BDE047AD558106FB9A5310C42E9CF17A1DA691234BF71E47EEAB720FF71B67
+9723E6514600ED5733EC66969B367BD930D98B01F2DDB5B9A5C162EF2ED10E00
+9A58B69492A07ACA258EA7E7BC0E6AA07C4389BF545F3C54FE5AACAAAC1F90A0
+F165EE30AB18495387C1CA716EBCCD08325EB578BC59C991EE784DE7040624A1
+48183FC209D720FFF4CE907A4AE4D5057640F777A34B16B9E3096A83BB50D1F3
+953E82F3F1A4828BC561DE99582E0AA54B2A963BE17EC5023FEEEA505DF9DF15
+BB5C2D3F4B75625C3FF06C0D843C3947D8EA58AB2A6267BE6E2506E0D58A2DD8
+E05B61C4D2F4231A3D4032175BA3C536A0A50DF906B2FA23A8F54848E81A9FF3
+25354A7D5B17E9BC9CC2765865CE9F8BFF07BA9AD27E4ACB531D20A6EFF49B1A
+D479A82CE51E83AC378677E19CB593735EC2E7BB14540B5E120DBCFC4CCD6319
+16E6987A488031144E36DED23AB83ADE5DAD374A35620CE27AD89E54C176C0E5
+B0EE1A88D96A072A8950F425430624CDDB8ABD6F45D79004A72CAD5AA17F0714
+A3238C3E42814D7719A11017A656678DC89CD48D5B92FBDEC2A3506458B5050C
+87CD8B9CD0E7FC0CA26B822265E14E2B4812FF00C96FC342C4CE55B25E628CDE
+49099B12513DC1484CAE9462F09A946301E9597E11CDF3A31AC2420E4DFA47D4
+259AF53C3AF330DFE4734B72684E50BD5895A8F64FC814B561342CFEE20A56A9
+CD60C3E9FD187D6033B322075E715BD230C4DB95EE677EC9147C78DF1BD284D8
+8FF42450CDA9C4C556065898A93F2777B52203E2128713C1669484C10952C0A0
+C2306E036045E6370655A8D323BBFF8A6F2BE1F9B8446CB5955C9F3F1EF9F13F
+CE8903EE90D0F7A2BDA34B279C4BB3D8BEE6A8C256DCA01D7149308A33926437
+85E22529ECD1CC157AD27393B461A9F4685D0EEC63AC9EABA6309C0A36CE3198
+2B6FDFDB499E29B46C692609400C55E13C491CEDD0BA275D2D876E06E4B9D255
+5DBA5322454C6AF0602E0B01547145C502B0DFB31EFCD86743BDF087790B31A1
+25F14F796BCB613625E1D915E6CB8598F17B463209CD72B4558D398B6D5A8BCA
+9FE5BE145AAD891E064E1E6E96D32B248E30C550A7EE4E533531007C29D83E23
+CB6075CDA42913296BE65F9CD48A7384CF56B86913D4BC5B11054431C32CB43E
+757B7D1A23100CADF5391C44CC9A614B180657C956BD408F7C7F81D31FB8EA8C
+8D038351A8F6CC8C8E25671AC4B77CB608B3882B2EA0A9B081C9B2F81EFC6DA5
+CC858FAEED1AE829E6488337429FCC62C2BA5C355154E05B9A3BD5944511CE0E
+8BF787EEFB3F136FCABE6CBA3C609C248AD6640530EEC6AD8247E77A6AC12E80
+C82732137D8CF638CD0EC7D4CDE42F80C8C7149244D6FBF1701E1E3C5666D02C
+2F68126B54B2333661C32F70051FBB82C750FD1C60FD9F667DFCF8657154F409
+7E99629D2B7B926E8A1077CF78CA89AC5EDDBA3E04FB0A565AE2DF997E05AA09
+73A00018671B2AB71652FF9A059F1C361659523606B78E9B4B10F6D72847FA39
+953ECB88070296C1B09FE8D92A50EA8E98FD6FBACFD178EF5B2BF23150749F27
+2CA4491C4C6AF4D6237EE0E912773A04CA55814FD6EFA493D01D1D911A29BFDD
+D53F39E8CD7B7F964AA091DDE7CE9CD3EB8757DE545D074EAA584B8E24676364
+F666FE6F9B9EB570D154E7E2C05A8DB5A40AD741F0585641F4F32CA05A7F3016
+E116A22E4F85AD5E123F07FE0FE3AB55A7ECB31503202AEE7D66BB8E89421F08
+1ED8C1734A93FF047AE8D0F87F83474EEC20D55E9763A4CACEF15F12AE7E3A20
+667DC66A042FB67F3A140D1042E8175E47FD6140C05D89925DDF10BEA57A71CD
+C778A57564AA74D7AF7B2074A4580331240782D35E80B528B8950FBCB1A8E593
+F96EFFE0F1DD23F6377363D661E1C4F98104C31D7C0E7F9C6F219AD81617A512
+69B5322506690A672CB9E2877309F6DE2EAD18A4DC9102A1955E94E3081AB800
+9202CFE99B057B1F41EEB87543BFBF5EE1FF1C93DADD0ACE6A7C7E779E011A6F
+39C0CA50F406A7F107418B4ACA6A69E0CB46C43676B0843463D5C53AB375B595
+62E9F1FD5DF4E2D5BF34B7D111C8AD6CF2BFF59655C20D40B50EC525386887E1
+B6B11D62A02B7F81F65AB65472EDDB9A196D41D98FD5B1BC6D339964346CC55D
+A55B98C5FB4A4BA1ACF255B2380447DE3732AB82E3BD0433D642ADB7D67C2217
+884A6C99345D4638646CEF366A85F92860A0716F3DDE3E73CA907D4BE597AD07
+053CD914362D5C6AFFAC009D29B7D288499522B923394AC2F02191EC869C5A6B
+1CBE5EB7B47A790040D3270E5AD0396C05FCF895E2E0AAC4A94C2EEF4B7C19D0
+F799E1507C81E2129F4E287B7318E62ED92300F121F282AB65872102B94314A8
+1108E733828CF33ED983C7F72E3AB8CE5F6B61232965AD4D5259AFEA3FA8CC5C
+AE4E0D1BB9F3180312DAE392E28B22EECFAD24965EF9756A29858A9901018FC6
+ED605A1F43886FE9E5307CA56DABBC9D42B0A606307E81705565D9CB81814DC5
+78E5BB93DE5BEF316304E8D33D3AD847332A706853FADCDA40B7F04E11340EBD
+BBAE024BBCA535597FF8D3215869F2CD3AA0A2BEC830F379FD005D12AF2CD298
+53906D4DF912C3FF79C0A04020BDD46020CA80748920845D7C9AD60BFF780A45
+99114B8E401BD5F3CC489432880EC68186FC7661F93F636A0CA790FBDBDEE105
+BC0C11C03C246365BD4090923BBDECF9F7501A65E9D6EF06B752B0B6C92B0469
+C1DF26D6384103B405D948CF0C4310CE34B0CCC47C98A38E7A237BB737C7B6E6
+2298F143A5BB9769A5D7E4330F1C64C9EDA7EA34F85F31B19BD546516B3C97CE
+5B7906B0FA5D39FEA3C84C48C331A549DAD1A114A43AE7EE8ABFDE8FBC767F71
+E86450864BB71B9D11D9614EAFD6547E509081CC17C6261D3B81511EE43C33B2
+F63601B3519AB2F58A8A03A304DE0586517E0D9CD27E756AF6EC6FCEBD897FFC
+89CD5D760EEF2DC6C185126A7B85C0043B785A90901137FE197A57E9CC1116FB
+604E291B7846ACEB236E1C3BE9029B7B07D21900D8A2D6F19FDDC2EEAB076854
+6443D8C28B4BC46D7CDE0D841E7B0C43F86A30DA56F6BE0F6023E2AA8064EA2E
+DDC9D42906137635BC7D21312C23C19593756F4A344C72E7505C41A401B91887
+9512A20F1E1F5A1E065FC6DDDA3412C255C89B9A77CF05A0FEB510146A0EED02
+13633DE45D4626307B03A012A1C44AA0BC4039744D2EF60AA999C0D6F0C2A5EC
+065D730A2F43DA9396A58F41F57787BFE8FA71CCF395B9B68C221FA789279CCD
+EF29B6635F6028A95C124C6A3025F2B16550E9206CC3245FBCA796E91098F4B5
+C61BBD21365F39045FB67086B11C32515AD245CD0F50687387DE65DB08CF6D4C
+9899DF674E334FC25A3B16FD97B19228951D43EA09EF4D0FBAE1D7589B312AE7
+FEC3EA4A20C9D63B7D9DC1A1C35EF58808A988C20ECCD08A407E8F1028B204B4
+267453C5CDD206E47119ACAB15B690EF50B59224D863EE703C76F271E89A4827
+14E154FD7DDA5BAFCD97DC9FECC47F0F136243DC58963D492C3CA6C91E54577D
+669228FA800E18F6F60F47675814A7BD746A79AA1F727539F1A7039B65049D41
+2648B977A75178D2EA2806CCB41046C10BC62E2AF9F61A1EEBB7D762FC3F10C7
+30457B1AA72511F10AA111D6DC77EB18F93A6DDFE8B98625FF037B088556DBB1
+86FD399255368EA7161AD6E779502EEDA86F0D1EA4873C01E8A7BF9CE7CD3AB5
+50DD7234BEAB66700D8F028B2468C367841DD2BF035A151FB15EE213C0A5943C
+A0A5FD68B90C976EF9A008960CC12257203E95BBF7C82EFC853D41C9F983A6DF
+ED243C9C67CA1889719EBE9D5F684210FABC485C3CA8675F2AAE6360312C191A
+8B1A0F18AA901257157CD7840324B2B0D78B1D50EDF9B3A812A9321F3091D203
+2E113E616F09DFBC0FFCB15C54F8ABCADCED58DD3BB2526A81119F2B4FF93910
+26A70BC4AB00D54047D1E997C375BA799635AE4AE0E7DF9A4FF97EAA560C269F
+4380E3252E6ADEECBA2BAFC7AE56729474E05DEC8A40ED3E0518732FCD253CEB
+71F1A8B18EA41AF08D54880924F5B02D7B181BC76B29A4DF769EC1723DDE2519
+6B2170C3C5D4E70C50A21283ABEFE0064996392DFE93EEDBC854BDE2D4EA81BF
+AD04AAC565C48737838933C5257D3AC9BE85E4C22AC3AB4FCF28B7580079D8E9
+0F56C6ACABAB0D38C60FE08F5CEB05BA4DAD9B09B0F9E57C4AA524300E6B8AEF
+1250C6432E54D007AEA9B36E43890355C788E233454A7D59120E3277DA3EDB55
+6BD9EE10B356C16E67F93F9891EDCD06B16279125C22F2B0EF90315F574BD651
+B46AD78D7723FA0CA2B0A0AE9C102C4CDA3155E33CCCBE026C5E8B603A3210E1
+FE538DD514A4D1FF897BE4655B5D8D752439F135E6EA7869F315F3E9699B7B77
+810A6989623051130F6E4E1471656F6CCB10A13034FF085403221017732F2390
+259FE3B29F6331804C300132B9586D3C6B08318A71AC700FAA6E83CB3A86B1FD
+61C6DC7BAFABD3B49F8DA9E3A98BC94926E07DE98945A45061CD0FD002B90CF2
+B8D294606DA133D4CB0874FA3ECD4843828F6F384A595EC123817EEB3BC6140E
+6419208362639835765C432D7BE88C8BB85DB91051F2BB3C247E729F25EE441E
+BD3D4A44D90E9948BAD1D5C168D7FD14694599566116387F622B53F0E4096071
+0DD97D7A6E64F3A2B11BFD075C6F7DD953F57C1B1C3FC952200E8142AC1D561D
+963C5F5C67A05D8E6872B97C6C54AFB455DAC53C80660E6E4CC554E3B5F5C268
+E0E027D321DA10B59BDAECB378E304D11A1CCF3D72A029FC4BBC2CAC76D1D5F2
+84DF09B99A2249E6F1A0ABF58707BCC2C460DB4D4D9250B0FE4283BDE6CA55AE
+BCB1C85A373E382ADDB1AA92B2FAA83858FC6444942CB783D5B639D69344B8BB
+4A8C7DCBBA3FDCD2B455ED377C3022E2BA3D7D717468B42B731CBBE3FA439E97
+EADECB5AD8DC8ABEF73F510FC6039D001EE8DE53E239594E64428F2A460FC809
+3BB40C9C6A8358C7122B45483FAF3471F164D8BA84D4A844E09188B4C34FABEA
+79BEF8F884756AC909B70460BC22C6874F966699DFD1F3C54FA1D2AA72264E93
+75596BA06673B01D2A763CE177E248960BA0F7E3BADD59265C8876EFDC6FCFD1
+81469DBC59AFE8CD07EA8FC0BA3FEFE43DD7D527D84F685FD985B3A89BB5ACC1
+31BEBCE59665D9CCA179B774390A1CA5573A2AFC8BDD6D6901FEBC9CAEBCC5AD
+9CF26EF10987154F9CA620F426E3EDE082A2551C5E949984C30CCD98E2B1D0FC
+3CCAF3EEADF436ED12108134359B711772E6D3C921B02677BB15EE87DFA5A2FF
+A3F253528D2D0828BE0778AA599900DAF72AB2C17D1513BE9630761128C366EF
+B3330BCBC83A5F745D0F163CFA100DD8177309A5ECAA912C8FE8546140587FC7
+50B14AE5B8DAE05BD2399CD44B888A894F79550DAA5DBC84AAB94E62F0441A6D
+3E7D008F10EE46C58F1A92994269B52DA17A8266BEA8EB4BD99FD39D5361C028
+81FBD28300E40BE415F7306C8D6D94713869722A6A179F5FA66A332CE60A0C39
+97AAF72BED0B337795CEC21379D67FDF7D5011BFCC60CD433EDE8A3768455F68
+62A9CBCC695F9F8B4A265026B1678DCD7ABD8FD566792218BFD7FE5A61FED3DA
+9307CF0FA486FB636D09E95D640A95483A929639D14141679BCE01337A309ABE
+6CC846D012CAE3E838FCC4FCE3372D020343A155EE284BD858C33A245EFE1B79
+A9FBEFFFA2B402ED5E17A9CBCB2AB9B2B131CCA1484291ADBEAC711503405F17
+66570740C63CCA6E7AD5871AAB381ED4968806A911D6B6A2EF18CA9C6A4A800F
+95DB24AD68BDA434CA725D17F0AB0E99E339967FD4F0455D7301ADA41ACA31A9
+6A03698C9A012E022234DC03E2F3276D2DA1FB03955C191D2E8B4DDDD668CF04
+23F806E181DFB4CAC3E4B3C66E79AE87749C4083E84848BE641133EA61D06708
+B3F84508985C54352247D3B42857C49382FDC78F5F0D6101908673D90F4ED17E
+040F0B0F6EF8C1AE38B5BA866A45EB0DD3B3C9BB3F342B7F504A37605609E111
+1CFDDFC92101E71E3F6DCA38F0A833D0CDC52CF1A03EC5F49506618277D382EA
+94DAC5B910F48275CCFC2AA7181DE0675079286DD6A06FC691989197A40305BD
+246A28B5F578E458B39EACEB1361AA5DA481563592DB0C9F03DFBF4D6D84D72D
+C6FEBBB5DD1825735C97C51941B9CF05DB32D1C9A33A0676AF6A652077DA1FBC
+6E51CD90D46B767C729D54499D392EB6202DC498B57A50ED44FABCB78E8F7B23
+5337EB2DF8395002AC4E2AC04974C9AC46E01BB7DA9C55074EA3BE0FE9F6846F
+9C573876BDD9A1086838430B9E5C42246117D7F5B2A8EE45DD30A6DA2504E2A3
+2CAE453E9747615D9F0A0BA9F06B0026DF21FDEB50A4FFE7952FABFD6D17F098
+79237B36805490D764D1843DF4A0190F094778D114489F6D2B5FE89B614BC0F6
+23F5A366B2AC497155D729530FF1BF982C82D24204826C6AEDCB4F3B4AB88CE3
+FD55E650E8E67214253D189D67AC4CCD9090E0482CA19977166DE08230D434C6
+41405B7E4AE2D63BF49E78819CB661237A9E27B2C2091E6EBAC4AAB0C5021B26
+1D38AC2EE717F583B31AD83326080FE441FD2AF2637178F7C4EFDBED63A32C33
+19C315F16BF7D12E78C11D9D769C7B52A453016538A2F72F4FCAB0DEFC246AF4
+FB40A1B5D3520839FAEB7B5E9BBCE4F0EA3874C2426085620B7E62C4FBB47CA0
+7C32065EEE2B8A824999496999F06A6E34FF667808965E11605A19B744CB775D
+D0598DFCCD73A530DF88D72D2D467D9631A8D7E665EAED42B3F74586795F7B43
+51FBFA148672EEAA600B76FA43B0D14AFA5BC1BC57A8C13445FF035D5A754687
+986A1774822DD5CA273D64E2D2CC94AC913859D435DE7C8DE64C5F2150BB395F
+E55C60C898DA92625462846464F073F2699642F4D3CF0F849A7D9A2B2FDC80C1
+D26C06208191D63E97A2AAA73EC4B96373F23D4FC1FB91B93899E2A6DE369D90
+830C451C3462DA0137C812BF06E8D219B90DC6A551FEBB2A52565030772C8657
+DDDC5D3ED99982F6A3F9FA842C550FE8A5A7A2BA36862EF2C3A413EF94F437CC
+E3D51F5196918E4D9F1AF0CA1110AC00F963EE17AB1A2F1B7D6242C29D98747C
+E91E8A6F924E89B4C6794677EF604FA3235E8F44578A5A87CE1114631260751A
+909C7274E941FA9596669D9FF82C29EC8280B1B326EDBC8812D2EE2DF812C02D
+AAFFCEF6165985DDBA1D9537AA0948A4A797F01B316FFF6EEDBE874BD467A239
+E89435CB0AAD16CB06D3401F42EF7677C2D8EC60A395F716687958E5F9B6B887
+5F9C29BB8320634C9892C9E72369A9CC1447B51489743E755363E4624CB88265
+4315F7C6C62EFE3916F7580B3E226FE6C8B3429AF51F93DED861D22EFDB49B3C
+6C5FCB5893774E880566DBD66A408495FF65F8BB99D04E33F8830726B20C872C
+8F4A8537542E1956C1125311CBC0A014F0E8E90124AE145D2D8FB12D113D79B6
+6D5828941563B1C3F2EC506BD4807A969279AEE347AA6B552E328C9D11AE52C7
+61DAED073036C79B9DA40BACB90855AA3CA93020E2B553BD377C3504D7BE25CD
+5A43DD1C53FC73E3C2E1690FD80B93C4C6AA5C76324F32400C019D6360B2BCD0
+F33E15562763487060CD620C5F48C40000671A83C22E4F7E3F5F37C9F70BDD83
+07085085B3F881555E1B8D0C45F13C95916907CC0A8E85EB1BE75A3382D16224
+041858FB54EB7F0B8719AD892B123A2EA81EECF9CA572AF8509B94FF7DCD544A
+4CF9A7235FE70F97B9D817EB60E8A809BEB69DC4FFDA1653F588896C4C3E2378
+D1FE3F902ED27E3AD5BEEA4A54A88EFD453B380B06F222C088C5CA5536E1EC70
+3CBB82839056CDCA0E770634B7E8320D856487E9C4B02CAA605B5510D563C3DE
+A0709BEB02EDBB59432B65F5D27E38F5F91290B1C871E9FF9901BA8A3F938659
+C5A5D28E001A3F8DDEF24DFE7211081ED9749FF5A753F6FC8F3064ADA79EA8B5
+201161CCC9385FBEF61739C6F103EF29135978DC77B9C374695CE7209F3C2B64
+36CC939E58840C9FCF40888EA836B6EDD24B38A678EC8B988865D41E1389A32F
+4B6319BF59D48FF6349C98E611CFE1E7EB55EC557444F22EBF414E8EBE976472
+B2F7580731D42BEB735396F8F144587665BA950F43802B7FD8C4BBAA4D25345B
+736C90FE9838EFA1BB52B1973ED01D4DE7E7E1DBE08162C352B06918CF62523F
+A135923EC6D932F5DB3469AC188E1409A83839C3F5B9A4967B1E77889C2DD5CA
+98D3038CACE8D9623BE6425378CF5262961462D7FF5F2761C1BBEF2A032FA6B2
+7D67129F35D5FB609E5E60398CAEAD4079A9FB008F8EB9FFB26C04914ABAE0BD
+AB4875F982AA68C8DEA77CF1F0F7BC8236DFBAC37302BB695E7102373A9DDF67
+2163973FFD610BBB8E0D6E4DCBE688D092E6583EEC11CF6F42245871A3F86AA4
+4D59A9BB6D53E586A4D187930AEAADFA4A072CFD97E3973475A8DDAFD6639535
+44A41BBB8F81ADDBCE14CCBC9DB20268AFDD05E2B85779B0E0CC49E200CFCDE7
+B6B2B98034BB562A43B080360966D51E1DA0EEBA8803A9526F86A59B50861C2B
+CE3D72A03EEDABD9ED8935A1C8BAD1D924EE7A118225A576830D30FFA3B2AF1A
+8D6B4AB990D3DA5428F6CAD5788553BCC2448DA0896C6A481FB803E28D7D335B
+2D569A4D801D66F27175EA483381F5B6ABE1DFA739AEB016C4B95CF230146B59
+440F72EAF259ED4AA1798345DCC04786B8BDE68BE9D85F8AB4FCEF54D8E72DFF
+7D0BBBF7D4A79E71CE98EC0F130A2414B4F958DCF7E138C8A15984693FE1A092
+5204582EC8F65BC1E4AA0654D4392B78C29649431886B236C95C11A3ACE49002
+5D83E07965B396FDD136B49B203FC9E48A8BEA97CB77C6EE0F6A5AAFE249AB4A
+3194A802121CE314FB773F02A5A1D28C040CEDC32A1EE958018B48AB84E563B6
+DAE93C28036FACAFD6EC351D7960047B9AE8DE4845536EC7C02C4AADB202FAB8
+E32C9FB7056D17A5CF6817679E30A2E58BF2531F8F1521F5EB3F58EBE1EAD4C8
+1BF11243FEA3332BFC647ADC8B7929A78D105423C6E34E5194BD8C18BE0512AF
+5A989420376FCB97176DF17EC9922C42E00D1987680C7CD96C3C81BA0C490A4F
+A54F11154F3F105D05B465F6711DECDC06391325F04875805F0BE3294B4B412F
+425998A37BAB0DAFEBB09F5BB79C344E31FF93A81784CC3B334ADF4E515045A7
+22B5F88737620B4098A7B38842A888AE61DF3E1A5A40E41315886A24C71E744D
+05FDE20901F03C5D5747789A686303DAC5690FDCFC5E09F3A031121509455FA7
+8FE6B5C878495F39C40E6241E3A5AC629A1872E2332BEA5C0831D1106CA169A5
+3F596660252B63AED600B8388E89202F81241BF0AD676D1632DDF73C379E05C4
+315839EA8196F9FA4065294AA1770F75F6793D29E585737657A8FB0E3946A6D2
+304F2241C79CDDCACA3162B28EE02C9BA50E511DB84463EB2EEA28CF96D3BDDF
+486E44FB8C4EAF0A6C44B459DBDF135863FB8B31958D49BD0C097A4D15C76D00
+EE844D99EF977BC0E89287B0C2C67C06D2256E846F85DBBF41A7059B2BC15D9C
+66D5D7693642901D17FA0C68FE80F3D3F7234B6E8D7067658E23FD09CFDEBAD8
+6B35ED0A1EA4A69FD7E8E7EC16394C1E3CAAA9EFFAF95EF6C13230DEFF0302AA
+448B60136747CB51427943E0DB1C1DD087AD6B284DE4E354070CCABE9E1D5EEC
+B6975793FB09A9655D36BE2D4A3026DC4689294DAF0D7B6320C34B5AC6C32FEA
+7E0675B45D3967D1B476FEB52744FFAB4BB49970F13642C89FFF63FED0D6B350
+2B5C2972C747FA0B43C834363D848F99AF84FF0FE8A786D26C4D3167CC08CC67
+ED566087EDA4550120253ED1F19F1A4161E705A3D8DE6DF75C330D571FF2AB5F
+E022B58D2EA582091CA3282EED6F075FB96000B36EFA323EC9B893A2CEC57865
+09EEA572BB127A4DB00331BD574C258CBCABB02EC1E088F076EEE22362E93F49
+7B4E08CB19E55431C59CBE634FD12B28D56320FA1A753B528FAD98DE5513CE90
+CC1B0D722A4437FA1508F6FAB9BB8F3BF38F7EDEB6947D2C46580A7602FA90AB
+0062ECD827C062737A163E1797576D1C83A31E0F4F892F7D7F83F1F4563EDFB3
+219A03CF16638E6D5E7E961EF4341AB0D7AE9D80B38A0FA8AD4B7D24E4071F04
+8A2B4FEC937C73FDC45CD570DA8C96D56FC104E39EDBB672478D9C34171D93A1
+3A995D5F9306E3B39B35D04D76CAFCBFA1398465FCC9B544B2FCF97424120227
+A97CF3B254084F65516DF48F799D6D4F0E830314E1E7FDF23847B7B22CBB4739
+708B3C0FB3043096AAFD133A43930819F5D16C57BC9A5913B8A552A9CDF5BE41
+4B29F40F181A1089EAB1E1D4298EA03D94BB9D1365BCD0613CD5247A623E0603
+23ED64BDCE80A76F28AD9DBD65495C2E32F8BEB374F2BAC04DEA83299A9FDD4D
+5D13287A44190D8CBC8F275AA695D58E7DD99A958FB645929E1134B5A796AF5D
+B4DBF734E15633F17FBCEB18A41805E56D3B33C18E0D3DB638B5716FC11609BF
+42F01966B3D9E2D05DFC7E61326FF476C5973A6863E0318A95B0DA88F668A6CC
+6C657707388B0ECDAC67288015611D0AE7958F52D7F7C380FFD27AC1D3B83934
+C3F22276DC03EEB1DD096D86A24119D3FF9194ADF3FDBB09C42FFFA860550CFE
+290553C71DE6CFC37B9A11C22F859D956BC38CF9A4FCEF72B459F44ED1B31C66
+79D80C7C88A7DD4833EE90FC64B7D8CDA2D0C98235665F71B07A3570189C6C88
+FC4AD8D1B0EE5A3BC948004F39963DAC6EBA7240DD832D60472C4F088274CCD7
+A97A05F6AB7BEB8292E20DE373513632C9AF5B1449D1D03BC4EBFE36DC25F58B
+75C2461DFB41E1AE20901F01A15362434460A638D80E2F569DD4948C1674B8AE
+C5B1C3322B9DAD25A9A99D84932B2CEF8E074F2C031D9BE0CACD94CAC6ED149C
+86E787ACBD3CDDCB45057D149A2A155274C6FC165797F5A0973FE29FC9D3914D
+1F44B6CF95F23BB378C06447810BD91402DF356E30FB965A69676DD932659481
+A66CA8B8015B4112CC1EE2D90FF1BDDEDD4F80A232351389CABDD596766F19DE
+4D93DEF877106A54B0FECB005F41C9468CCF2C84DDB15732B015B2CD1A4155CE
+52D8AF86FBC1D97D8249A84C8CF54C271A206CBB0291C9A83F9D3F80A9A94052
+D090CDE951BCE2CC812F66A47202F44AC93FA73A7987D3286FE133103B364E5B
+04F3BF4907EFD49128AE6C07DDDA38A257ABD45F13872E0D70A19B82AEF69344
+01F869C42AFE47B8CB550B6EF46B853952EDC511A909B4C8904B4BD121249977
+5785489C28A02A3052D5A122132ED896BF20A5DD0ECFC08C933235FFABF515A5
+C7280AF5CFC4C13B6F153AA92EE18301448E410B882FC827343444B8AA88E281
+73C15C38EFAFA3E640DB986A69B0D2D882DD31B2BAFCF09F8AE98F86761557E7
+BD3ADDBF480C7571770CB086139CB970FBBB4578923726F492DF82FDE83E4F94
+171BFFB8B11C6B195CF22684A8D5F0D63C57E654F196DEFB51A5DC591FDBEB4E
+28310F8317514EB7770041BA2B6172B96E691D4F9F289B2E785058F99C288EA6
+9FAC0E3D8D71EC5F16F1FC1F48962488CDE53B1BA5E57FAF21610326F3CEF7A4
+24B314C4A55AD1C644604EA428830304AA36451AC1FD41F007E0AE84C4DF757A
+B85F4F91BC123DD926A47161FF996C1EC4A722B912188E626AD7D928526BD12E
+ED244BE4CFBBB20676C3BECDE1B734085F00B72C32267DCF002B47E6112BE3DB
+9A72953B4B34F98B4FC3E80ADD37A8E2D408007745F51F4BDDDA57038755F031
+D2B09BE5249A9A2C9BFF225C5C7AE43D97B761501B610891725CE320BF9C7C85
+93C9E9AC2BA6947535BC406ECD989D01728EA41D963A8753DA2A0C9B4D9238EF
+826DA874319F994FDE1859E4CC3B17601D1495D1B3500AE1B861C55901D9610A
+25078C498AFC38B6C64118EE9837E5C61E03B2E7CDEBFD8B37646D649B1A8E21
+B6BA6A8552FFA55102A7F6BF6F8C0A15C66548AB867957728C673DF3221EDE4B
+022428A6E829E6CABC7CCA6C1A60700FE68D11C122930FF0D75DF89D89252CCA
+692CC02DC52F158E3874A9D030C8EF5B0DCB633B2025C203AE79636E1B2497C1
+51208C4DDAF096885EEC50CDCA1133179227427AB85AF800122A7B7A506BACF1
+6AD4B3954794B5D37F42AD94A93B90846C55E12B8943172C8C4715685D0EB537
+75430F0A6EF94CCE0B6B9D71EA42571E9E26DA0840B0624E1F97FA1548F45FCB
+FAA189A40844D88D87AE8EA4DE29CD9E7DF322016AAB4A472DA4DE10956E3DBD
+5B8E20B8AE941CD8541419FC0E90813FEC3DF42FE4F8A7C67C661F1AC766A278
+EABCCEE8F45150E4EF2D6F967E98CC3E1578FC5235C9111AE4ABB028A4E8E683
+E39056B5F1CB6E8F5EEBF12BB7DABBA1626D691C4AF07767537462AB6472B6CB
+A9F4CC1DC29ABC46FBF92908E1C09D21DF40BA8E0D9376449FC64B1F91B13F10
+9A1A484C7361EDC66F7603CB5C00D988E3A34057E2AB21071AA4554D1234D6B3
+BF04C440FEE0ECDC5378E34ECFE504D9B917543DEE8D86A1A1AAE111F7870C4E
+D81D0B277CA333690FB282
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMR10
+%!PS-AdobeFont-1.1: CMR10 1.00B
+%%CreationDate: 1992 Feb 19 19:54:52
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.00B) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMR10) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle 0 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMR10 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 11 /ff put
+dup 12 /fi put
+dup 13 /fl put
+dup 14 /ffi put
+dup 33 /exclam put
+dup 34 /quotedblright put
+dup 36 /dollar put
+dup 37 /percent put
+dup 38 /ampersand put
+dup 39 /quoteright put
+dup 40 /parenleft put
+dup 41 /parenright put
+dup 44 /comma put
+dup 45 /hyphen put
+dup 46 /period put
+dup 47 /slash put
+dup 48 /zero put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 53 /five put
+dup 54 /six put
+dup 55 /seven put
+dup 56 /eight put
+dup 57 /nine put
+dup 58 /colon put
+dup 59 /semicolon put
+dup 61 /equal put
+dup 63 /question put
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 74 /J put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 81 /Q put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 86 /V put
+dup 87 /W put
+dup 88 /X put
+dup 89 /Y put
+dup 90 /Z put
+dup 91 /bracketleft put
+dup 92 /quotedblleft put
+dup 93 /bracketright put
+dup 96 /quoteleft put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+dup 122 /z put
+dup 123 /endash put
+dup 124 /emdash put
+readonly def
+/FontBBox{-251 -250 1009 969}readonly def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891
+016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171
+9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F
+D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758
+469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8
+2BDBF16FBC7512FAA308A093FE5CF7158F1163BC1F3352E22A1452E73FECA8A4
+87100FB1FFC4C8AF409B2067537220E605DA0852CA49839E1386AF9D7A1A455F
+D1F017CE45884D76EF2CB9BC5821FD25365DDEA6E45F332B5F68A44AD8A530F0
+92A36FAC8D27F9087AFEEA2096F839A2BC4B937F24E080EF7C0F9374A18D565C
+295A05210DB96A23175AC59A9BD0147A310EF49C551A417E0A22703F94FF7B75
+409A5D417DA6730A69E310FA6A4229FC7E4F620B0FC4C63C50E99E179EB51E4C
+4BC45217722F1E8E40F1E1428E792EAFE05C5A50D38C52114DFCD24D54027CBF
+2512DD116F0463DE4052A7AD53B641A27E81E481947884CE35661B49153FA19E
+0A2A860C7B61558671303DE6AE06A80E4E450E17067676E6BBB42A9A24ACBC3E
+B0CA7B7A3BFEA84FED39CCFB6D545BB2BCC49E5E16976407AB9D94556CD4F008
+24EF579B6800B6DC3AAF840B3FC6822872368E3B4274DD06CA36AF8F6346C11B
+43C772CC242F3B212C4BD7018D71A1A74C9A94ED0093A5FB6557F4E0751047AF
+D72098ECA301B8AE68110F983796E581F106144951DF5B750432A230FDA3B575
+5A38B5E7972AABC12306A01A99FCF8189D71B8DBF49550BAEA9CF1B97CBFC7CC
+96498ECC938B1A1710B670657DE923A659DB8757147B140A48067328E7E3F9C3
+7D1888B284904301450CE0BC15EEEA00E48CCD6388F3FC3BEFD8D9C400015B65
+0F2F536D035626B1FF0A69D732C7A1836D635C30C06BED4327737029E5BA5830
+B9E88A4024C3326AD2F34F47B54739B48825AD6699F7D117EA4C4AEC4440BF6D
+AA0099DEFD326235965C63647921828BF269ECC87A2B1C8CAD6C78B6E561B007
+97BE2BC7CA32B4534075F6491BE959D1F635463E71679E527F4F456F774B2AF8
+FEF3D8C63B2F8B99FE0F73BA44B3CF15A613471EA3C7A1CD783D3EB41F4ACEE5
+20759B6A4C4466E2D80EF7C7866BAD06E5DF0434D2C607FC82C9EBD4D8902EE4
+0A7617C3AEACCB7CCE00319D0677AA6DB7E0250B51908F966977BD8C8D07FDBD
+F4D058444E7D7D91788DEA997CBE0545902E67194B7BA3CD0BF454FCA60B9A20
+3E6BB526D2D5B5321EE18DD2A0B15E53BCB8E3E01067B30ED2DD2CB9B06D3122
+A737435305D42DE9C6B614926BFD44DF10D14402EBEDFF0B144B1C9BD22D7379
+5262FEEAFE31C8A721C2D46AA00C10681BA9970D09F1EA4FA77428025D4059BA
+2988AC2E3D7246BAAAFB89745F0E38580546045527C8779A254DB08DCC6FB9B9
+0E172209FBE3857AF495A7F2B34BC895A39A30F903DC6E3202D29AC110D868F4
+7184CB78407B8B9D42F6375F67FD4B828592E4A977B9E71854D143CD1A9EDCD1
+767CC2929E071FBA4C3D17500E28A23F697B5D5CC68D5F56EAD14BD504E07182
+3FDC12F5404E74EC1C02AF00C1A6A17F958770ED4A024F5B3644DEFB61F2578E
+56013D0B4E7CA3AD255E23DD63369A921D427EEE0E098E8148B16E8A5613A8F8
+A5F1099E15AD16EC554B644DF306F0CF3571055A81F1B464529DB49E919F88E7
+581066BEC4765E31BBE28C245BBF0B74610DBA30C63A71A4F3B60593A6B41C6C
+636C980828CFE9A3362FBC02F1967F0F770A4790F90DEF9D56E0A76B0703FC58
+2841E6E8D984FB476D4FEB960FFB6B386EC6CBB9EB83704B0AF63F38C77090A8
+DAA165E6C6BC86601B14F8E9F504A9D578AF05128D8C1BCEA9D21057958D5DCF
+63459352EAD6B4A2A666CC5D85855641CB31507F9E30405977B74356FE985A6D
+541884CB65A4F5A8D4C82CB9D82846CC510CBD243E98A0011AD37A81047021DF
+46F69D7C3DFAF2F10F1F0CCEFBE12EB70420BE90C450975434E223C67D24226E
+8B62BCA6BF93B0B1373AF55E4ADD92775B2DF199B6599CB02DB64B2D6160BEBE
+449C057B5B2D226E0F5D7CFB5C9A4A7184FB29A595E91252AE787861A6331FC2
+6605C995D55120121CB463473A7CBD22F270D56CA8E0DA99832A468D399CB9F5
+A1CBCF0031D99F3C4F4B78A0944BED5A7B1AE23E3A66EED453917F9296077306
+06CFA772BE60854A30885DC5FB8417E0D3F7AB45ABFE186D877A377F5D17DD35
+0FAB81745294E35A5DCAB20321C6ECAE276B63BB17366867F346CAD53E06AD96
+091CAC75465BCDDFDE9C4364B2A8EF496C4CDF76B058E4BC1F616F6CF62FB60A
+64F81BABA7A729B8CF679CEE01B1C985558E8D1493C03B834F3696E5511A1917
+2AE7E16AA8FC516CD2CEDE020BC5777598165B6EF2310F4DBD54FE14071101EB
+47F4B2B59778B1EA7DE13ADF46393E07DBE2082C2487944A71CEDD4ED7D3D877
+749D2500636C3996A34EE0CBA770F6B6A655DCB9840AA8236EF3F6182E1C8997
+395077D9DB15B9D0A2DF9A3F6042C94E6E492C965E4E8542AC4AF5B21906B6E8
+4AE2B01C0810E38BFAE99DD83EBFF8E145D09F763B6B134A25A1CC067C6DC1D0
+7286045CE90BA968598D83E5602ED96C72A424848E211C028CB344D95DA04ADE
+4C5DADCE9009A72B6EC01E7B5CF8C52BDFD2B416F5E1833F514659D94BB2F452
+EC4F2E65CE71AAF79106A0468D76D283ADD44D7DB5760AA429D61C1DC2E912C7
+9446C19557A1D12E7116B765BE522EA166E8F0B604807215323DC5C2DB1F2E05
+246873CE189E03FA291A961E4AD90563A8F7B0E08A67DE4CB3607C6ECA114DD0
+DCE97976E208615F3CA13FC44041360086A4A173D5441D9C33A38013099F73E9
+0FBC96808F7442FD4D56DF7C4F2D4C9B2301F7CE626B4C6C1617B8F1584DF195
+F92FC6385070EB02BF2541307E4EA34C131815FB9028C118F4B792C5E92BA39B
+732EC013E2B29FF8AB36FECD056B8A0123B2E0E756F6F36D1121446A90F6BFD7
+D076C80FCC1E88445AFF2C4D17D25BCC028840AAECD82282BD3720BDC1ADC56C
+9EA1525E6DDC2B3C5E66115838C0168070EF155FFA9EE2AF0B1F58736140541C
+42300199F8F7509DC6F8FCB3E3F76E429A92CE89A195FD2C39ECC95D90D8745E
+5667E1399D4D54788BA3A46906538E24B3846FF10246C3CC049846391B8728FD
+9EAD19AB90473454C26C6CCADD66E6C5DE8225A164730F6778DF10820C2BA54C
+D9E5823FB4FB192F7210200093A7FDEF6803F656D3201DD7B065E834205A528C
+BCDA52E22337E27447C2C750C3730E9BBDA96E944A74AD2B02E4CF6D3B5B7E03
+A9D0DFD550C7224EDDF2F7CFEB0818D15545A50333AE7A8D44F5183E572EF324
+FF51EA08E93305172AD6945C1F023676C538160448E1DF49DEC2BF386B4AF07F
+AEEC9D2E0A70CF68473886A398DC83F0CCBE0955E80E7CF44D03717875B89ABD
+780C448DFAE200862748F1AEC7F958C42344C93D6B6EF29DF4F563C4912EA159
+4E8C77EA5AC7CA4487E9D29D2D13EF45DABA13F0D1B922CDF7FB0F347C5857BF
+EF7ACC16EB538BC2217B0137BD575DAE18F3DA198CF90B0DCB373040C91F6F24
+486DBBA77F6032A17FF382FB14F4AAA3D3608ABA208E94B69A0A1E721B995E54
+F271E5CED22F28313D7FE5679610A946D3AA637765CD441270BAD7808844363B
+4251D831391E2C6E88F609BD4280D2B07663B482A2C018512C665BC7ACAA5A7B
+29187497986970C06AEEA1CACC1D9375576B85F2BC1CB9498A8F60C8466133AD
+8D01E2080BF508B1B4A372209F5CF528986EFF0FA4333BF92EB50154D1CFDC92
+57BC2210E3FF670DA4E64F98C6CB3F396AEB146E7F845F62AEA83388A2AB028E
+F12C1FC987897640ED50DD651EE9B0710138751C2E3C9FAA647A4A8D52B0E267
+11108B99F7E090DA4F777B73A33B006C209307F2170D75F5BEB1B576C1A3E2DB
+9207958A900BF90786908A9B9CE1DD9EAB4D6EF7FD724B2A22F944FEEE17355E
+D21493AA355501EBD985AEFB696ABBC75C40CD1A2FE0DE4BE42F16CF7B599957
+E8096363723E2BBED8B24551DE3FAB160985F36ACDAE7321D7B3A9AD0F164B08
+52074C54BE452F5445D375B85DC2F7F6AD2C0794C0830AC559209E68169DADEF
+F78B82317AB6ABDD8874FFD804F70730A9D084B4E9E143226EAC38E7B1F4E1C9
+0270BA81A8B43CCC2F8F3B5E01E90284BC56126233FD45044FD64E5B2D159EB2
+5579F9FD11E0C86CD4F3FF5D06B11BCB1A2BE95570307A372E5FCD0495611D17
+623804766C93D6AC547AEF388F2A3598E519E3D41353F3ABB6F2EAB767D740AF
+AA6ED9641EB3E75E36CB9E4779C5A443C4CF780F47CD103CA77C0C873E8AACEE
+A7BF44436605A1698CC66DC38DB95393CECED515664ECA7D744AA1FF262F3DC2
+DC7A6420735E7CCA979D78DC2A46C49D0AE793B6DBEBB2F598149827B6A53AE2
+2063E781A6C9A9DB2E3749E46F5E192954E51AC6A715954CA0AC851B2E87C33B
+9670D407D1768B181BAE10589F38DAA5C0DC4C33DB7D5BAAC1A23D10C311C09A
+35EDD551BD1534D3DBFE58D7A7AA79F93772EFC6052AD3E8F1D196073BB1885B
+FBF95F9BFE07E8E2AFC23358A1DF2079C7A6E8D221617A5A6FEF9FC048CA06CF
+F2353B9A16F17D6D408FEAD5DB180AAFCA1C17BFB5A7473076DD4EB598ED049C
+9469628318347508C2BC5CDF052D452FE48ED25D7F3FC062C8702BFEAE853F1B
+CE12F266E2B4CAFE23E2A6BDB3A50669CF1A4F4F1889A90B77A69F00597D5568
+BCB4D9F21BE26267E84AF5C401F96B3B23A80D7FC6956ACD1E0709D0D7222498
+6417B31705074D6728F508F21A3CEA89CCF53F3E0C4E03A2CBB1276A45F456A0
+128F0BD9E095457527D9B6A248DA7FA24ADD7F0B0A7B825FAF9AF69E210FF3C5
+73764761DD61D03DAA7AF4009002AF363A101FDF3BF338247B6B2215AAE38476
+AD6613B5C7D9D0BAA9556BE4C57CBD3C0A86F5446FEE7AB2B738E4043A7AB149
+DF8A86270E888605ABEA1962CABA87E1B6BE4F772D0278FA5286EDAFFE55ACD7
+97EBF448FAA44F33CCAD8A28E883F03EADB5AAE23F700571F6A1ADBB515216B9
+02B59E11FCD26B98FB61871DF998E725974B71BA9B8075C9ACA5BA5AACC43079
+28F62018463D91D404A1024655DAD4CA952E2939394CFFAABF278DF6AC311007
+F9D7FB5FD477B669C2A068BCFEA52F248FFD1D0ED2E47556DD686E5090F91265
+A9B7D19F400A6A056A56C0EA9E74CFD16484BD2767E6B51F5AF34FA6030BAD0B
+A791CB6307133C9C16E63547B41DE8A67E0E2A60DBD575D3945B8E29AB07A1DB
+E752B54F6B423C787DC3E2E48F3D546C2F6245C8B775684CF1106D621C64E111
+BCC2369ED42B5AC1A43A3F56902CDD3D1167EB6B08D14ABDC75B2E50175D730B
+D2AF00DA66A847A3C9A49D447E6071A7E977A58E300D96657AABDEFFEA489DC9
+75AE346C6B9BEF82AF077D6A90489FBF0101FE77BE5C3DC2670765688E014FD0
+5E0E8A2210CA3EB3AA78FF1781552D0DCC4A98A991D582F5D40A0174E33AE2DC
+715F5FCE505E8333530611DCDEF642E35839C33C9B94C40792D970EDCBC9CD16
+0EB0D3377020678B474DF8CB1EC018C586399ED22B01218B5C75CE40EBBDA0A9
+EDE1F4E03CEB5B3EECEB0694059162830F53EEBF77CDC7550C20DD9EADE2F052
+6CE34C8F67C21BF6005828D755E857C058E6C7060B610D801617A601DC3F8EAF
+618AD72C4828E33967AAB60B411DB233B7B29D62B017FC51467603FF003CD000
+607B8D8DFC04FC22A178E6A038ADF4E8EC72382906BEE75B24CA8F6BCAFDF77A
+2D0B5DD4FA43E1007B84948293F8C019DB9979523DA8CA732784082A6ADEF415
+5FF813D469C337441EAA8CF9F920BCA094744A306D4922CC420757D541BD2435
+FE2717A018C89A5490FAB88D6984C09E5C7F62BFF6DFCA24A69F8E29A9DF0D5E
+9FC0A12EA1940F72D90DD7CDDB82B2597DA1CBD8F4302F9598920A9B9AE67D0F
+E10B30B928B6B2669A08792235482A728E9549E76A15DA1029BE883FF2715020
+73337BEEEF7CAE168CEB6E2AC916D5A68BF4211DEC462703828F2E5CE112E398
+7B79DF6389E5CC1AEB74BB4E4C6793A2666BF9EAFA72BE966C9451104CE2CE24
+45894DF3304E620F484273163D9213853D242DC308055AEE087A588A6FC8CA96
+52D94D576539C3728853FB9658A0CED91EB96148B806644895A49328625499D6
+3186BF65D263D138AC4027A43FFF7024518037ECC474BC3D42307D474312D388
+A163D7DDD77003116C071FF5A84B61DA0E559E96B427ED0D346417236C1AD6E7
+B1CAD4C7AABE7A900D6E4B9C8D472C8909123F0203E285E5DBF7C111B18AEFBD
+624DD20CFCF974241215364B627B04FF18D0068835B21C07739A91DDE7B08FE3
+82D175CB6A9FE5DEC9DFC4066339988F06ED8F41E7700E2D0B23016DA5119F3F
+9BE6162549B3B4920B383980EFBD90C90AD4E935A9816ECB45ACB0D9F13A3F8C
+BB175A17070C5D6195F064CED7176E8484A88D3FFB76BD7700F1CC331CABBAE4
+C89BE8F6D93453E30D2BAABCBDD3551CF2A36BA79E99930F6DD82BE1B0546E9C
+7E0CDEB1C823D75FB0998300FDDBF750A43460D0415DE713B7C2A5E7316D020E
+B4A20F987C0A996DFA94D6833EC9539B0E75528F7E9FBBD4C4726F2783EB33EA
+D564885E0233331432CBF3424C130D3A96F79F4BB503A310D3030BE5AF110CE2
+7A463DC21A8692CEE0A80FCFF803E7202048A8F3ED58EECCC8CCD35B32D414ED
+2FE715B39DBD34CB9AD7FAFDB1A1993D3AD5264DE6A52B7D04FD681A28BCD3F6
+80DAB12C43362512F4CECBF5438B3A72317A1BB884DB9B519A8DA6CE1CAD2CC8
+81E283839366441718896F219440D63D2497971BC9E5AFF32A156BA3AD297EA0
+46DFF3B39E4EE1389FB041EB63A82529BBFD882BE02BDE0B25D15C5EE522663F
+5C7D054249460D66987AFE8C7FCA65A88003DC933240920463D50130F7A79F85
+17FB7EA80120C5E91411366F06953609323B21A4B5702447D1C54A08A4104EC0
+7C2F9B1C42EB601DB32FEBA0F5A03B7EDF4A3EE9B25A26E4D797BABD1D80E6F5
+1EE2347925BE9A99D7563053611095EF6E54675E146E3B04F3E0F3C051EF3175
+187665A2C7EAB425A8EF999692BE5C224A27B635E249618CCFBD80E7CCB959BC
+3DAB0121A2CA60F33E604591C285A31B4B289F44C9E452C7AC45994EA9AF436E
+D1282AFA204248362A2C93B4574663B15787575C116CFB343CF0AEC7D593669C
+A7D457AC8F865266593D38C52EF63F818835F45C957D2BB9A216EB42DF410DAD
+BB20BE33D50278FB254C3414619ADE4CAE4C296DCE73813C777186EB4E67E0C3
+958FCAACE325BB5BDE181053EA6A0C55972CA85A56EAA1C1E3DC9A6534602C39
+24645BF60AB0BB12873BDC5AFC9D2A857C6DA73DAB8B476F8B0D0275220E0A9F
+82EFA82C02AE2C375ED3AC6D372590DE40842638F674E7CF92A21551D15E8EF9
+86259CFCA8D82AC06B5B7BB79B9D7CB7C711D5947D01E8FCBEB3028BD300139C
+819123EDD7FED75EBA789815185FF47EF9BAC1F23433523A1F4A1FB01153ADEF
+8732F194895831C0A1C3D0A186F788BB5B4672A028752287F6570FEDCA05B4EA
+0F45CC407AC51FB6960CB331514FF07C7FB6AB575A9558D6C16DA3C4DA01F47B
+66617F310D5D3D3197A5E7400D72FD86FBA372454B9BF6F7E2D937EA3A57808F
+792E8E51CE5BE1EDA1AF93768B37370DB0075A4C564B128779152E8E363DCA39
+C4DF701E223ED5088F7B71FA76BCC01B3A983E855EF34E6E660FE58D4615CA18
+0868D0104890EA7B56DEB102CFE3A2E6EBD9BF225C51A9BEDAEBE67425A0C3EB
+4CDF81701BE383C279850DD8DF20956DFBDCC484D2331F9435CBBB81B57677B5
+4C08D89FD133EA65EB64D26AB8A3A5B69EB04B95DE0B06C3E28D2C6BDEF75325
+3A5CC081DDD1CFD2B505FBD4EEB20E4485F1059591DA43E4CD81C5D491ACE20F
+5F71533978C0AF5239EDC9F5BA1FFD5EF3F11F4924D5F27D3205391297F4F6F8
+1AB40A0DDE52ABF5C1A8934B4687604AFB30D2CFE4E0CD2B3E135A7CAE24E872
+E5C67FEA64A4F404354C6F8F284DB570123133B911624E23BC8DE3C6C88F49EA
+A78C39621372444C86BBBB534EC955D1116B95D50A7C15EA6CE8644AC2C43382
+196E3ECB853D09713D83F9AEB36CB66BF51204EB72B5F3D0D428BDF2DE64B856
+A0B35830D72ACCCA11A8E19071DC8A3DC7907276FE897AE4545BA75E4AC26078
+046644462A4A8470E593273DED74D8438A7D64625FD4F3E8FCF4062A754FEC62
+0B42D9D0B1EA160A11BCA8C16D33E840455047C747C0D6E7C94B7724E4142A5B
+A765C17BE7B49FBDC0CC5A91C837518E745A530327C229463BA7CF9543C5C54C
+7E6C2357F18CC07A6D33769343630BA8E4F5AF449465789E48041597A7E4EAF2
+C87CFD08ADEFDCC8691EA54E793C2B2F6C9798C1207AAA3DF7073C15F67F4325
+D881C081634073B98A5964E40744B976744954727CB6C93E89B8B7797D7AC5BF
+71F0FB317CE8DB3452FA7F0B6DB6EF9A51372E333982016D2B6F25B018C8ED5D
+CB31BD9001BA52D967639B6DF4432BAB04A0CF33BC4AC5216BEFC9B3E7ABAB2E
+88D5C93DDABF3ABA3D48781C168AF2D36B2CA24E3EAFFED679453913701E4796
+01091556E4AFD9BFD85BE266F63EE32CABADDB819911C2496A876DF4FE185EE5
+0CDC8CFBF824812402882061FDC2AAE8C85BF2454B513291F8D3C9C85B6DFD63
+628806A9B99D8D3FDC5B9809879C7BF34AE7D6E49736B8E7BC4E93845EF26FB6
+2D5DD1BCF13CB6A3D92924923C1608CAB3E63190854EEEAF7502D68A48194825
+43083BF0607815B532066C631C52C1B8BE3A1C9CF00FFC0C6E044EE75F097BB9
+7D75D7D04E9F412D0823ACA48BB0375270414AA399C72B51F36DBBA81130BD5D
+94C5963FE39F8FD28B1B9C93306424AA6F70795A49D5FB9A567D62E4C506967D
+6F61E3E15659D23A3B8A60CD0F90888C0B96488612E5253A7855BA567A7C6B3F
+1973A96975AE4674332854BB40C4051194A564EB78DFAFE80A8CAEE74C42CDA0
+9254462ED0E1CEE88E0346672815FC0559C8C524FF2E303015DC709A239A2C50
+E49EDB65EEC7EE3A937386DF93D1CCC27270E50312440E06C6BBBE4E8792A47C
+D063898C5F34D83BBFEF71DD8B2C081DC8D122A1B279EAAA44D69F5D95ED7DD3
+0820BAAD9C6E3AFF1E24AF5CED94E682FF612C44948E94B982C73A5371D97B90
+4BD25D3850B26F71F71EC4EE368C88582B1677A57403774BC15AD4A153B2C112
+537EF525582DAC217594D09373E745EFCF65911FC804E6CFB441F24416AF11BB
+CEFDCA172D7BD04B2E207517A4E578F622488E3D88EB4ABD24F67CB3CB21394E
+8B599E4F646A4B4AEE8424B2E322CBB4F98D00FDDB7B21FB72C9A2ED08984504
+42FA811EF7E8B99FC632BFA1044CDC831220988071A33FA5C4B4A0058384357B
+BD1B1A113C3C4E1FBE658FB25D111B15A4C253AD44C331233147F289552664A1
+F0C1F186810459C6A41EE0A53EE20149ADBB40EBE3775FE2577A52BAEE2DC9D7
+17D807C801572DD209956BD69D672A731CF9D8747231EDC0BBF0BA5946978A0C
+5AB3D4FD0333937C949AFE2E92617A4B46BA01537494101F96568D28993DB807
+3BCD5078A3D49E9950A6E373E7E3E08BED02CECEA8A739985F01E1C4293EEC78
+99D9A46E0936476C2A50CD25F3D8BFFBAB66B8EA5FEC0D0B6DEB314D2D06262E
+C6B39A36606F745819252FECD07F53AF0FE4792FD615E329A49994C63EF1AFE1
+B28429C1E8A94EC01D0FB2EC7C0F8DB9DEB0F32947528DE7BE3D008BABCB1C2B
+0442AB83B7945E4682BB77D4BF15855464CA59F6E2B67F7E97675F79A78CFE83
+C0313A826C35CD5B321A41EDB4B799B175CB0A27B60D71D24F4286635A354DF6
+84A777DF84AD8D3B4FCEFC6D96A8754C668770DB7A7B200B8E542B7490152BC2
+24B8CCA8E1D9A3BCA2325DAE70DD5109977D5F8C0568AC55F70812B1841F8017
+4CC2C36B4D8618D2B3DBF87F54C2141AA75ED0B5285D1EDA2435BAFC99F518D2
+F3F41B8F674095D15CDC366B8F344DD917EF647B9EAA1F499DDE25D39EA758B7
+D2EDD23E00B8182E9410C14BC31A75C2FE70869212B5F58915F5EF929C2333AB
+B9833686A29D7D43BF99D45BD60439CDD5FE3A50ABD328F6C87701C714359F45
+F8664941CACECAC72308503C9FDAB00EF7941AE1EA57A3C4DA8835207CF56F29
+0EDA202E8EC2164041701D2BB5C31F46F4A7AFBF71D8487750E76BDCEBEBBDE0
+B0096D143E923F7B5E6AE139CC44177E86FF3C1348B097004EA8D359D45B7713
+00892975F37C2A2141432DB9D43D84F650575ED5E05DEF92B391562B1EB58CD4
+7942D928E05578CE75CD38458DBB5A0D345A80193D36158A4BAF4E738AD1CA62
+81F8E071DFF98448ACC3D3700A79FD05B7ABA3C06D166EF11B2C622438A60B25
+2D913DD1C1D5B84DF40097E303DACD1E7B6C70C17BFA2851331B5452DD60DF6A
+D00501179E18756106D813BAFE909E32ACAAB36785409DBCFF0DC8EF504D94C6
+1353141DDEB71F73E33AE10D48B356797E2E8B5FDB99332F52728E4DD1B01ECD
+D43535A1A32D54EE60A6168EEC7156FE6B2AABFC9C6C502B8B19D69E56FA5BBB
+7B6ECFF2CD15C964183F3358D2C2D5736B11724E8B5B070C06A729A46606EF12
+2471EE0F28EB50B0B89334C903BEF66B9E6748EB62217C8C4869C2477E9D8D07
+08A53DAFA31818EAB2C9E7E3AADD92B6811B9E2EEC1861A56BDA86590BCB2ADF
+31E762D31064C82E4517640539A598E68203C6296ABE191BA759BF5F1A64D9D1
+45A10DDDE932C24F3FD7EBFAF21E43217781334472AF231E4D0E41C509B00B33
+4494FD54A54E3EE5A7A30C148BBF3A8141F825DA530769C32B52BF44E11C00C6
+7F3F71A041287DCCC2B9BC1CAC1F393F8227C256F139607829D18A1EA86BB97C
+AA02C568EE3074D8D72D32F53EC60598617DDA06352F83A66123D2183EB58246
+3078ED99ED3A3F326AA95D6E83C2CEFD6B78FE2F2E8BC6BBC96FBDD27E443221
+B2C9F258F0E41C0BAD87EEDA543A2240E4ECC1A0F27F8087310B21211D133DCD
+91B0F57E649B550193B0A80946B9A78DB36AB95611BDF60B7F4E009306D7F92A
+8E1092B2B87B57A1A72BD5F231F0DDB91B9527A1F128FEB68372CC0704900993
+7BA65818F86C935CE0007A6FF9DBA13B4D2684BC40AD7AA39F7AF164700E91F3
+82B2F393C4D071A58830C91287450D37091E2A750715BC7920137FF21EB45E14
+10C278990E7868671185959739C2373BD957140285B0B13D9BF99D0D895B0E64
+6B4D1B9BD58268B99C6AD6339AA9AF00621C5F19C604760794992EACD9AE35FB
+8055C9EC7B456824CCB1F832A9216D853A2E74F66BB9006DCC3D5E00331A9E4C
+17ADAF039C11DC0ABB78144D9347A2A2D5A1CA5686D602D9E05EA9F5258BC992
+2FF2D4B6F132DDB2B44CAC473EEF92509D609BD925BE5F1E0A4B17AFB88FA1DC
+077B1B4B47A0C2A6521D98EFC7FC0618C07813ABB0AAD9BB44361E6960DD86D4
+1AAAF213B0E459DB193E47382564C8B43D5E2BB1A76D9B00CEE59A0BA1EB70D2
+5FD3907964AF0FCE666350CB0E71A2DE9F2C38068ADF8A80CD08AB3664F0D8CE
+CBA06D3427E2D9CCCA8BBBBE30D76693A6E33F0FA093CF77E1D521E5CDC094E2
+C7C078E637FBFC23BB92C158411B65E3944EC1A307801D88DEA7D0ECBEFCD242
+6261F2C8F21353EF10EBECC427CD82D5A05297347024E4A4A1429C09A8675BBD
+8E9FE30DCF0C1743AF8E2FCD94C5FE0CD84148336D6DE4A2FE1B9470C998CDB1
+BF1331AE586CAE6EA795E063A7EFCD5C517BA446C798CAD723DD60712F59E12D
+9E48DEC3C28462EC24A720B8FF706560850F34D47AC35FDFD2321CF03E70CC01
+C17A5FFC311BC4F86FB8840984A7C6301DFE29DE27E61D4E2A21B45E93C67DF6
+6851DE050CE8EBDDC60D80B3EC6EC129A237F077F1CA031B64AEAC2511BF0CBE
+594139930826B9C08E2964A58F135EEE5C49194A77808944FFF53C33EDF831F0
+9C6F8FD4986BF5B22AAC4F363B48B60BFEE02F289286435CD0558847F9F7670E
+70784604B75C9B6EF327BE547B26634D77A65BDEB092418EC321481C0E54A8C1
+520294C14422C78CA00A56BB67E75B8A82F2D6F0B4536D8F986AD679C98C4E28
+1233ECE67645F2852D63608F0661F8E6F4B4AE19CA443D58BB0224C15C7250F8
+1EAB2E52C334811FD9EBE0CE83ECEC82FE75BAAE2970CFF8A48D96574A89E270
+EDF3172C1B1CE073005F3CD914283149A6ABFA26979FA942C02DD6D3B25DE635
+638EF495A73307E51FF0CDF0024E872B25A00D3BDB193E02547D5D22BF0DCCDB
+97C60D1FC7D7E7202F3F8AAEB43A9DD8CDFDE52819AD152C5DED4CCE57F17B73
+4B49D33E6A94995F9F1B65E86E8C601502416FD071E53FA1117014B9B6926183
+58A94512114E8E65A93FCCBAC3490506915A03209FEE47F9F375F74ED3BB6D17
+6169D49650112156515F95AEF30B40886F7E76977921A91A81CA0135C45D8FEC
+D1882CE1FE2FADDFE51FC81BA5CB3B25FCB1D66925A83F014915431A6FC8DE7B
+64BCDBCF86AC60B8DEB471513A77A7D706F95B7831F6CF572BF59D2FFC17487D
+4C7C1F072BFC246D205E5DE07CD2C847B5F952C9F4A56D5F995BF9C984059E6D
+BF7627540F1385DEFD1B10904F38E89B04A2A10AAAFFFCDF844B83C2F42A96A0
+A9A56CCE03ACAE766ACCDB94D5E8EB6F1C65AC89EEA87C8A10B2054C62C7910A
+AACFE3C4598A034FBE0EC9265FD121A036103FB5EEE6BC3A75F5DA03A4ECC38A
+47467415C26A30863CB6B554DAB4D31841E6EA7BF3E825213B1B8E937832D271
+CA30CB39D34949D88A6505FAD3767CC6301AFC64F3B7C7314955D4577D1091B6
+D17B5A86F6B03FE591ECE351CCA301AA3186E8CAF897DBFE62FF9FE2BEDE52BD
+8BF91A3332E70912B4F41EC27A5D843F40FE6F2E9D914B19C2B717CB3D758F9D
+B38436B22EBE94F93234F57A5C10FD16338DADFD5E2506F36CD2C597FA71FCE1
+6DAF07C543FF764C69FFDDACF6E4D36FBC43B1D12E3D794E7D8CEDE19EA5A840
+73D9C27C0802B264DBE0A88BCDAA28FAA21768FC9162FD523BB88B33D47B83D4
+CDE6EFA33F908DC4D08EF99A66D4BE4F3B0EDC0571DBE24AAB7BFE6EF61EA800
+63A28D318F872BE817BDE61FC18547BACD2E20826D31B887CBB032F603D1A8B4
+740C630684D7D5277C102622B021A94BC6778E95EF72EFA105629F941589936A
+8637EB305A4D2D34D4E91727487C4FD3AD1CD54835245511F92C7D5339706F82
+2166652497E715CF95C28550648799556B3C930853165BF7529BED689BBCB4BB
+7BF17F636C8550015E1F5D1E9B84E020FAE16188A0E5D35219887925FDB3451C
+6D748C7C01006F48D61743803C4AF43D599CCAB72B3BD3D54CA06CBEDEFE6580
+6CCC0AD4825D300AB511ADCB73D598D72A69BAE2AAC68E83F6158B90CEB61418
+931882921551622EAB521451A770B8CB37AF98066796923B2D2DB0360C8C50EF
+1C38F511663CC74139C3A736C8D9E32CEBCD6C76CE7BA90BF99F8438FCA9AADE
+9C2D3765A233F3407AA935C2B0E78D20F51F03D4AF95FD9265A5B4E81A70F365
+F7F41C1DE616150F7318725AD035FB85A1CE2BE0BC985AEC91BB729EA3C50696
+605A1D27690E1F9A044F0046E3C051454AF414D8499020ED8C125E50235B2CFC
+4E2D40371B113B3F6F5A5AB11D9585D451390AC886DC4A63F09C99EEF844862B
+394BDDFC170D5D2D52F334E260CE7F821A880C0FFD71762C70A0C182331D074D
+05679BC6B45D3AFE4102007FBB7E8EDEEDC678C35450E3B591D9DEC9E0ADACAD
+BA83A5AFDD1652D4FAC6879A8DA4D0C7F06F2C15D19DBC96EAFBEF722FC02F2C
+AB5CFB310E84FB104BDF6E2F09915EC3AB1E37F53FD59C4EE2B5662B1AAB849E
+554472C675AC8EF847039923AA1624C6C32286E9A458877C5FCECF7B6CA1568A
+C9D47FDC77151406D8F87D2A40179067FC738EC9CD16AFDE2554C8B036DE44E8
+E028D2748C70F456C5A72C694AB55C0C912BD509766484D026BC6C9E086CB98B
+FA3D2D198527644A5913F48ADEF18C34B02EC085131FFCB039DA40302BD725FB
+C1624B2625B7E33BA8DA5318C98BF031D08363172BBD64F7114737F415F3C0B9
+593A6607699B2795F3AF151F6474CB1065F655D4F61F435D6D737D89A48174E0
+48916AD8E74E9AF0864D378967B44384ECFC992D07F3525FED977E13C8E08BDE
+E6C73A9FCC110D592769F22FBE3AD16BFAC56612EEA2291132197132EFE4F8F8
+0153C23422BD913B9EAF0A4881BA22E6DB148C7120B3100321880B8938EC1327
+20B4D8DF046B0724C980569222BF08DED088D39E613A0CDBC6069B0D3D8782CF
+1383AC14455985A6D26E7686BF6CA39B87CD15405D783A95BC462FE21D14BD61
+4A7AAF05ACA0CDD079E4776D48B6A5FD0D6E6DB159F09358B93CD5E98286982C
+1DBA18A61D8BAFE933F94D8835E297B886585724F460A4724C706E90B6B4A938
+30A1554536A2A6FBCBE6145136A01EE051258B3D2CAA0BE9FA5D87617EAF5B81
+4989D0100D1DF1475D19591D4962F269788484833D4297B5B4AFB56E21AA7ECE
+68FCD137FB888FE908ECCBBA4218026C0EE52EE046CD113B5185F093BFAE7F11
+964068B1EC998136616C69FF172829A1B24571BB5B6C6C3A9C4683FC99900F69
+AD839F972E4318B5DD3F189F1F7A2173F8D4FF60C81847792ECD2D26222CB479
+15A6B0FB560684CF2129879002019A9122EDE9E4879194AE5A363D91E7AFA33D
+07ADF72E5C0B2B13496591662E1D14C0B1EB1628E59D7754E14CF28DC18D2269
+FC99697B1976ACCCC77A8E6FCE44CD91B4F11055FB4735D9A2449C3D29CFCB05
+95E9F08D0D359CF454C25C64248AB1AD08D71B452673448214A4AAA787623E6A
+FE57143A557FBFDCFBC6FF8D6939725B59031B1C120AA7EA05FEF8123E8CFC70
+6E4C6F20EB68014DDAC3DD5E8DF02C131C26139D1266EA5E5082C07E1883216D
+D23AD5C840F04465A12DE929BDE69193062E814D93D681AF67D50D2B7B1EC175
+27AF17F8F538D09AFEE2EE1A394A6A6E8DA057C74B842D9A75BAC2B642CD7B93
+83CEC2D79ED00016D48CDA845F1A800626239C919313906B5A7D1E016F26D1C3
+543A67AAB698E21CF45C65AABC2DEC61CB78EFC8FBBED7D1B7D1FF47FD5B5EF8
+1D45DF65C69ED1485859E029DBAB233A93E9CC86BD1509AFBD3F4D09655D07EE
+2FEB614C28A7FF72B4B18B38FAB217EF4F59627B7E2EEEC0AA2D9739DCDE5062
+66E4CD49456D111AEF35AC11AB1843A5A6E2343D111A2F039554C195FCA18B4D
+6EB5A869E06D046CAE3784DEBB455C07211257C174A28B9A01A8F0787A428BC3
+B1827F1CD86E9C9F2279B6EAC9BA07CFB55988F6622EE68B9E832C407FF6D3B5
+04973A4EF13E5431F06148CFEFF5B3A31D98A82D8972907C6557A33BDD20D053
+C967DC3399E4F5D61439869AFA1B293737F877FC4B544BF61AF482CB7FC1C1B0
+9780180EB8CAD7F07EF95919B4C44B43681FCA7E0818205450DBE4614CF0DC39
+28A303E4DB82C3C2289CD3323340FA5B2086E34DCB74C4F4DCF41AEA4943AA48
+8A64DD91FE7102BF4E40A43FCD360C3B0C5103BDC555193FC0AA209D9806955A
+5F89B92A8AC3AB9AB3F036378B26197C56223E6886D0F713AE5CC32C71E4B1A1
+D5BCF53A9213DF7B3C0198CE0DE819FFEEF250132150EB78D61CC1839F9E4660
+2BF7E88C072F6B9E2FECEF82A24F959B3D37A3E77FAF592E1008E8F5F19EB9A2
+4735E8F64343E2CD69C298A6A9318C09E8242340BBCBFA81A83958CDFFE39146
+39A143B1F5E3247D50EEEDB18AAB03A584EE00D470E59E432955EA484C76942B
+C4968C023A1143DC66D7FDDDCE31E99F41B969F6D4479B809D3C9464979275C8
+EEA46290956E7359F091BD876FB1EF5329048883A9F3C0FEF768F402173CA5A6
+30D7A5D57D05A4A8824702E76AA5F5D003A78E133CFFD42D99F6F02082E33D8A
+90C7437604DC3900056FBF8F5F1AAB3853C554B8736ABE01FFB1E5BD575F9D30
+C36F5E11DEFE09E0A561FFBFB3E9F0E635D75D545246DA7D8F50CCED8BAD92D7
+0FDF181FB3DA4FE539ABDD8FC3579490A87B674B88EDC86D2F6D39CAF33AA197
+1DB1E5221B056B5445C2FA6447243474B1EB79A4B03B136D485AB4A62974F0CE
+01C65B7CF210D1A9DE21849A9255960692068407635A23A7B0F0265ADDFDE177
+097C1F3BD1DD1D6FACB7CDF110BFDE0B2963269BD31E1A4358E4626A9D3C8563
+3D44F9196D567ED72539C0B750DDDCE780E14EA3B683CC098D464E4A757DCA91
+A7014851D8596285CDF52646146DD5DF679FF81359DE979D33DF491F3662C87C
+469CA72935A4C3EB71A299BCF6E1B3F173130F86859A6F6F469B0BF3AF7D2E73
+0630AA1973CC564FBFE0C752FED518163E5CBF7C9CDD22DEFED51619838136EC
+174D503ECAB2323971D68A3853818CE57A77EE2468FE5C7273C77B29315D98AD
+8E0742DC918898F2F551CF381F162186F87BCA3C6DDE7438E1B06A4609FD3BC9
+2DFA788022309AED10281D4CB3A71A1595BE7DC1386240D95D729E251020B356
+511D5CAFD847AFFEFBD79862BA19DC4C7951970C0C9ED44ABA02A68FF5CCC246
+13BD451E7C5913C5DE0C523612E27FC923C74BFD5677EEA6457B02E0444A04C8
+3FB26E224713F2AAA3EA3B5FC50A36EADBE3AB0777D88C151F8C7503D20ABC11
+0CBF03C39C97DF7E43DE551D9E041EEA9C86AFD3518F9E9A8C2AB570E531D75E
+AF59BDE9780919E64DF81AC24EDAF91DC47EBEAFBB5BBA57D5800D801C116437
+C63C7A8DE84782394B4CB699A3A0B0E3798324E1FCA522F5854ABC83B0D4B418
+4D408A0B1B900E8602A3EF6D9EE3BBA3DD876AFD25F69513FBE5BD51B401864A
+76255A5E64AF2B28B3B3D138069D5906FD33483AA62D3FA2A1747AD444C55A76
+93FD19854E684A584C822F4A9D2C9799E83230E8774C0A5942806F3738AD1425
+C055CBF364A6EB3D47012389FE430DCFA3440F84500E35843CCBFF860DE1DC66
+8F32943568A0767A3989ACDE3FCBE70B0A2F59012E677A5453ADB258EC8169AC
+BA489273284F03A6875CC457C5717A97D7B945CDA1670ADBBC5D3FD622EF483C
+99CB7717190B5190408DB73E488FCED65518E8CA3EBBAB43449DB5F57810B4FE
+6695F940926DE16480831E8E4DAD65074D989C772E1A143547200B733F3CA84E
+A9EDC51A074092AB4963466806EA91E34EE4439D2C8F1AC9DC3B31AC04F94641
+D053C4B265C3387BC718B363C2BBC6C6F284935FD9C7FD7BA14A32B2C2AF1E4B
+3739A2257C60B5DD3715E99B0EC878442EC6305224F09158B947670AFB74597A
+5224189B403BA81BE4404900BA522E4E78AFD79F96E5F6549711D417AE05342D
+6BE3A1FE0BA1F1633391DCB6E798D14A190C6588161AE82B101F77C973310252
+E90CBFA354C89B1D816BF1370F9345834A05EFB21E8C52DED86BB69EFD3C3764
+DBE34A571602F05538400E4BDA2AF7CA8B50C28AFC821B251B9EB5C3F4183836
+F27CBBC378621A244DD82BEC981A6D1A132EA870A09C3AE661B0EE145C2ACDCD
+317B8B0CCAAFEAE0ADA2A777359170183C9A69E0CD629C17A0F84B3C32B3862E
+2D4C313B9A61935F57F4F93D5292880079E6071682E80D9A87DAD6C609D9D141
+14879B8CA8A7449D04FCA686D44696FD8331B9E6EE6C2B59B950DE663964BCDA
+74BFADA585601819C06FE1FA3C098F92E96AEE4FA6F0600718B127D220319750
+EACE38DCAC4AA2CFA1E5BB904F4BE757C68583F875426434819631882F75FA35
+62A62AACBDBE7AB41261B68B1A553C93801723747A90D71764DAF8FB7FECDDCE
+7548D5167D3AD2CF89A4504EE7454F3BF2A8A6F8958AEDF25729C61A38870C7A
+098D0F41A77E4C5432C4FF56E6C96BB34BE9276727C63FE9B4246A41C614FB89
+223CA46A324DC52FDC7186B468771F4F7033B702260CFFACFFF59CA7F6253CC1
+7344A2A4A885C5A5090F14EE18EBBEC69EC24D809AAA923FD9C1B386F9A64530
+C6379E44AF4824D13D4F947094DD3BE24FBC7D790E6BD0F1A6B3AE63B352D83F
+CD789FFDE1965600535B61D91C4C2C44E5ED051715D3900929FA4C13C792761F
+448E9B00E59184182398DFC523E990A2432F6C77F05C7A1CF7F24E7E5EB1078A
+9769D53ED58F5523C6FC25441682DE3A91B0B14AC6CFFD2CF1ECC6264249B14F
+9F1B9682E2A21E2A6070FCA63AF62E2381AA5F4180AAADA3E775891680F3BBA9
+55CBB62C7E80108A348AB2F99B664A9667183159DCE3FC08DDBCFE625528AD54
+9E3CF770CB13D05E4F9424F38FE35074CE024B2AABA2963A5565C70E6579EDFA
+A9DA79C5E9C678CD9D988E0EE58DEFE3D6959675A004A236C4074B0452764632
+F6E5A18DDF3942BF038CF0A2AC9AEF98A6EE6CE5F2DEBE26218D2105A3807508
+5DB199DA8381E56E52FF8CF776A88DDEB9312BDD07B6AB03EC9E35876DB3AACA
+9CFFBA40CD426FEFB6992C89FE4BEBD80681A1E01701A3DDBCB85E30D7405F86
+21D1D5ED21CB1F559096E2874572221B95FE3528F6571E46D12A89DD347CA976
+F0E0BCD152AEB860F53707461A50A4A2F0D5BD384B44C4122FCF544C3763A8D5
+D978842034B5B083D2C02FBC4AA897BA90BC2DCD408B77B0D14E9BC4F52E1F01
+C5C8BE41EBBA87969DBD1C48E69C0715C65A954603BA69CD423B641FBE43E859
+2D8024429D19182CA87670B2BD8F0488FB68B453DF5B52DA10A2437528FD55F9
+94C868088C61586E09CCA9CC24B7269FD330B69112A16776A08491E653DE7A13
+50AB14E3E6ABE9ADAD7B7601676AB0AA88C0603C1CF6E07B1DE7ABB6ACFE948B
+E1B9DA9237F9C41B48F5F0708A0F3E85F0A12F1369AEDE38ED12F3FCB02238E9
+2B674E995A7DFB44459AE09702BA0EC70737213594F0DC1A5D4A9E841BE5D985
+5C42F5A9D5E25CBF85771D0C6D14F934AC5D3622EEA3419D362AC03FF973715D
+A82F54E81D9A2DEA6D5047DC4706B71F5B8929C7D11BFDF1EDB5B4574B8CFEFF
+A619B01E0B73830F3B241DA42B8EE022B639165C26445B1172D8F625E24CCBF2
+F86E2170EE96EB1B0CA10200E393DC402DA602415A150529C2022F9C4398AD58
+1BEC5AAB4A3D18C54E8DB9DE2AC089C066CAF988FB093EEE303FC99D12E355ED
+EAFFA90F0426CFE25A69070FBC7376214B3A8A3FC60E560009A2159B07CAA909
+8DF022C891F54C2DED1391AFFE894BC990B28EB94A7EAB870799E6D0980974C7
+99DAF9F1464B4F3603E3382F195DED9B78EB08700546509F730E2C016AF19088
+289998B271B69468F6319AC55D7BF218CA407BEF60366CE694A4DFC9E3CCC5BD
+9F30F14123B1E7CDB50344C45708E600A08B86A88AF3EA67D85C9C19D9AE3189
+2B3373E3AA286D8F4C481930920805802BFC8E51696CD82383653DACC794CB8B
+F115851597EDF37827EA38B94657E9C7030CA1C46D238A181B3EDE8A3217CCE8
+519C5D0F74CDBA7DE1C0F2D47AD98FF5B1ABF695CFD1CAD1902BD47F9DE9EB5A
+EB190C525E83020CC24830F52ED40DD3D5D9579E3CC02867918BC5B60C6CC68F
+BF2DDA27F17FBF84BF7C4DD978CABE2C3092F6C9E201B31578FAC3D9655D8081
+FD8BD9B977DFD95FD1887AE024E7FD9202D3662B5C75760A4E70B08DA6C95006
+E7F7689D66DC874568B0FBF98B6C4E5CBFA96C306B7EEEFEB0A0D5D96A8472E5
+0F649A6C61CAD0D90D46C847081E496F4D523D471AF73B82CC6D744C9A274328
+7969F66EE4002C3B82B5ACEBFAFCDCB77FA8062A742974C27D4A4AA37C3B89B0
+12E8B6814C41776A41652A65D6464C8ECAF0FA42A28ABB9E84841D5D9B334245
+22EB2B835A002038B512C633BC20D7BF59C4725094A38CD11EEC59A4605D1CFC
+E9DA9254910AA951D47A7108EDAAE8383B51059A0BF6357F698C21D9A473044B
+7828FB5BF05DB0435CB37840BBCAA368D07CF44ADD383E521731A300CEDE2F2C
+B108643D548331850F51464E8AE5D257EF53D51516FB4C4C4176A6D9A2F46DB0
+70B10360A8DD870C0B654D1002B8E25C9D39DB5AB34F4D0857D980999E5ED4D1
+5A33CB97414E39BA94A9799412CA6E08BADDD5F33C33A7BBF38B91F6E59B4C52
+25E8115A08ECCC5F54EE4BA92962A12402433EF12CF3FF90D50DA8939B50C1ED
+6CFD48FE86B06EC15443B257E5377BACF3BA79C1C90688B54AA9D4A56B0CAC8E
+DFFBA242084DD87534FA21E0174E4D342DBF3E4A44C18E6C976E5164DB749528
+14F598CFF640A4DE7D57163F18714D35CC9A10D727187097A0A6F42721D78213
+F1BFFE950D5505D9427C9D7E19D99D231001D2BA8569E8E49CDBD82FC0E358AF
+A4ADF0EF2728D289FE4A5F4F8D6B8AC38DC3FAE985005EC396444CAA7582843E
+B7EA619993758B7174F39155E4A0C36122729205C09474094F8E5E48341F8368
+702E7A85258052F0260B1A4F7E36D679E13E28FB0DE87275A92DF72585C1AAA0
+772ED992E6F49F3B392085586DDD87E6BE16656C673ED5E134E17501144D84C7
+B661005829B212EB53A07F7590196B217BD097914E955C5D81F9B6944AC83716
+E10A2868234A4DAE402054D384BC00ECC3C8DB95A443A4211A125751DB40A283
+CB3FE6125CC609A97C5FA631213AE1CAFEFAF41182459E13E97A4DA186D613C4
+08ECBBB9E6A40809883266EF6E68B07935245823F358C4235C446C750A80746E
+8B156B6D95B636700AE9FF44704AE2DEEF8463282B171423F24B921874C9FD81
+5E6905B6266EEE8EFCD5164D8985E2EA84DDB0637B09B95B61A94AFD5899B26B
+917F7984A7B6206D2859B4024E80C71B47FA862F6F648C444C8920FB8A6D6F68
+5F1DF4B28A8F7B3253C9FF97D7676FD694FB420454041D4249ABEE685276117E
+5F59C853078E6C1DF2C54B9DB5324281F41AC6106FA7246C2BF540DE25BE4E36
+E2572AEA0A993F57EC8A19E7E78A7B8FF6628FE898184763440C8B52F8A8214B
+C1F67D3DD2F63C60DB01110A998A99372F63DEB1002AA6F885F356B0CC8CF6D7
+208FE8B8586B03C760F26C300CCD82811D71C385FAE1FC4770027B2994BCDB4A
+88EDEAC938E4B3144DBBF9A921A429824AADC7D1D71ED3947763F97E5B227336
+E0D5C3108EA260DE5237B6324527373B0937873586BE1E408B2326981242EC82
+247ACBF8169B5FAC8D59CB8377858A44458280852FEA8420B3A7C6E975D5A0DE
+F871DBEEC19DF6560AD6760C0C69388C4910BF79F3CE9B8DBA56431EE3F60097
+BD782A01CF2DDE86662D878A5D5F332BAEB6C2866129120F08A7DFFBCB908475
+A6B827DB33150A8A2FA8C8C942C0E5F26A6CB80D1944C630C421644D6BEAE3A1
+DC78596083F8E0FD24EABD83E2EFA91A2FFC5A31F7756ADFEC46F6149F7843B8
+1CFFFEFC1A3624F416B0AE9E65496455825B53C2ABA1CBD2818C9F60EDF6AB64
+671A87B5B908260E44110C38841A3C2C47032CA91B904895063DB6F1EDFB0BA4
+5D28A4D3F8E1828BC4409BFF5ACD5E0D89CEE8A2418DE054498E8D1C82081E58
+E5365C9993E10EF250A644A4365E34C0E94BED8A638F3281404A8275AE7237F6
+14AEAEFD6AFA0660D1428FE7F6443F4686CA7CB0F48023D3D165158A2A3238CC
+0D318B2042209B6522A7F42BD4F67FBABE76D3409FAAE2B16C27C5FC4DC3D2B4
+DD15497659235D1A264F50B912A13F43637350FBCD3BEACA5D3CF62260F44733
+48A4C4FD285967AC60A49EA5FA8E253C009A1166C8E402F83F5E6A460018FBBE
+32CEA943B9871D9A4559A6EE776E46C6FDA4692169F5CDCD9458813C6C32689F
+AA853F11AC89828E0FFDAF7D8BF25D9FA9F900D554CA7B2095B5F89688A5A6BC
+B39508E0D96C8E33A3894A5E00E0A97007B08C64E1A14D080F3E2594A5A029E4
+305EC3790B1CACC592644035C2279226EC4227E8DCA3B15488173CE5231221E4
+A6DFA0FE8BF3912843432CC081AA1396874099332DE150402AA21D1DBA056548
+F6FB3E96488BD07DDB8813653B67C9D4CF67E5CD80C00EF70BA738460AAC255E
+A0AE846B04C59A56009EB9CC1A2F0040C20CDFEC2FF8AA1245DF14D74C71B769
+572A15F5A8E627EBE5C8081BF6B77E251340C30EDDF3207C7923B7C70FC00927
+AB4F26BABB73FDFB7BB8002F96F1B14C8259A1A5CF1DE0EFCCF711B93B1ABC51
+A92E11E3B43450B7252E3FEB3491B36C18C35F5D8FDDF35D0D29A6AAD844B4B0
+A94079C01DC7139C526DECDE8F307FB8687BFB484E21A9D97FBA35BFB5B85927
+BEA114B7CD39C8FA313AA8AB4995C496DC3909E45ABDA71126C5649C1D8ED49C
+C99A956859216BAB195F56412B73682520947030B9C8C3A760BDFE4F0457ECB2
+D9480917AFF2411FAA0AE36390D14FEBFA2E682C04AF7AAF447160EF4CC7EF70
+D50BC32731B9CC9A79D378BDD5E5B33319A2F93F500C8B88D54F6465A8E66A4B
+A5C81A6FF7BF8960C274288D3E3C3CA91765F3FEDA39EA1F5FD1357346BF30C2
+DA09C2A5B36BA44B73F2C1F2F29A08E86285D9A5B33C97F7FFC877DBCD2C5098
+B5C6768E13BBFFBBB9E385C5DE70564456F45E9C5E48C92A4E12F31206E52D72
+6F1BBDCE33FEA115502B2DE84F9B0DB87FD0A19ADFFD0D0AC5348E4DAEEB7BE6
+54A0E92CFB4BA347075ADA7B07FD44F436BC74DB1361F0195B9DC7CA76DC994F
+BD4AFAB58C4758331853F35B90D737CC6BB90F82946F1CEDDC36BCAFFBD91778
+2C45352271F00B553E70E1C7699353C21AC2FF5269D5C070A24642A20F959E4B
+EC352E7BFAB8C8CD0259A47222B98A223ADAE09309CE254008D0A8215890541A
+2B64D0AE4846D56B0E296C2BECB4E6E15FAE6189907A772DCBFE7D9A534DAF45
+E9806B580D6E7437D6EC6C212918E096FAAE8AAF2EE471A670487D9106C59C8D
+9E0E72CA5B325E976E534E0FC4402580D531D8873DCBEF1FA5AD86758E8E3000
+7CC778A190AA1F04591FEC4DC81DC3B4D9
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMCSC10
+%!PS-AdobeFont-1.1: CMCSC10 1.0
+%%CreationDate: 1991 Aug 18 17:46:49
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.0) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMCSC10) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle 0 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMCSC10 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 45 /hyphen put
+dup 47 /slash put
+dup 50 /two put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 105 /i put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 114 /r put
+dup 115 /s put
+dup 117 /u put
+dup 120 /x put
+readonly def
+/FontBBox{14 -250 1077 750}readonly def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE
+3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B
+532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470
+B72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B
+986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE
+D919C2DDD26BDC0D99398B9F4D03D5993DFC0930297866E1CD0A30EB76029337
+900ECFB1390CA5C0C3A04528044F266BA17BE487C79B94FAC6D6484684C5BFEA
+87BCCC77D40AD11552035E95E3007126418ED49B68468B38A14E88E68A267B98
+076F1C9769A5AFBC285E5B158EAC9F926F1D6C0B8F1D57D9C31D25AE27123518
+9D2CD92E5689E0213089BD268DA5E47525CB8EABAA4B78A15AEA34705889AB3A
+FFB8953B5B3482E52BFA0940630ADF8C0AC2177D907324299EE980E850F203CD
+B627962F43D5A678C44243CDE97853BDC6AB45FD5C09AD274DAF89929F583CC9
+CCC24BDFC68B92111055ABA5F26D2DC67C70906F71C2957701D65AE746A60C30
+40E6CB24B97FCDAD0487AE38A201FBF0E41BABD2181981A71940F1E707F91E5D
+C8CA50CB16D8702D188E56D014D92F76CE0B52ABDB9110E32438D2BBF3E6A40B
+7B005F10BB437812CAC6ED2996F7606DC962C4FDE207FF322782C343DF44CEC5
+FF06A55C630C20E9AE1B0D1C5673753C43BA0767D65D1B451CC6380D8BB3C4DC
+81E8FD8AA79BE993218686F29D3CD925566DD587F541A0DA1B1CC3BCEA2E6C7D
+5E1016F6917A871F1BBAD96AF9E867735017119A381FCF33EB2D3E1E7093FD90
+CDB0CED4818CFD9E201A03430CEC713620BE0D3254158931FB657C6AD4B2482A
+0E7D070D7497892E9E942DF58E88CAF0C8221BF36BF7C435BF2C683A4A2EF4CB
+E85820A8AD3486155A40143011BA9D76297F46DEF69ECA4596D6E4CAABF84091
+22A96A4BC78A8DD072FEB759A68A44BE1164638B6D952147EE3C628F9A022060
+1D1941E73310943FA782532ABB1116532AD67AEFE0758C051241E301C7E13A98
+6447EB0180BF6799814BEA4DC0F727D0A40B7BC3B1269CDE174453D6A3C4479C
+146001CF717DE25AC1BE5AEA5F2F1C17719251C429D3AED19EFB5A6812F33CB8
+554D92C7AB2C51C09C7EE0E5344CE62BEEB49D5F09AAE8AE94984EAD1847C5C7
+72B2A06D1906BE1B19B8672AF6C90238BB7A697EDF6C299BB33275CACDECCCB5
+5A2AC6B60E598D35B682B3445B029767AAED04633BD8C7F65DF5B19E68BAB10A
+1941EF5974412C72A167C7899691A81DFB0F11107009CBDBE91BA59603A49A10
+7D1F25271F3978093DF92B9899EA3F62A16C032F432ADF2D882FBBE99164176F
+026A97BF90473AD4F4DAB59E8D19A3F95A29E4D872FFA35AA6821F8BB8912534
+AF87564ABC178962288EB3EF0996127FDEEB56DA2A67399B52A50869E6F81207
+423B5181D9707C9C5A8E4EEAD48B967A5CE54ADA3A4C923E6B9E5D893E9FC93A
+D8D2FE2ACD2CCFD644D020FBD6E57B8CE610A777C9C0C13F99B949105004821C
+A093A86B100DB0FF4B1151E0E3CE04C45A6A3EEE664243CC1A58DBA98FA7E455
+460C26843DC93DF1F9D1E076FD2EFEB77EE7BD7ED299E991DFE2F98089CCE967
+40FF20C8751D5266C7C44BBB5B357C808EC9019446E96D1520C3C707A0C5AF9A
+A0AC16D7DCCE3E622B1AFE418CF0FDF81220202C6A6413F071E4781425C6BCC0
+6443F29F7C38C6086F644100AD8DDF3D78D120CE99F422C9A277589362076868
+AB8B5C5A7B99E79266915C95BE2D712322C85FDF0A2118452E1321AD76C7FCC9
+F4F067BF3A9B7F06ED98C9534528A3EDAEE3354BC95C03E21441B199CA288E58
+7AECE47656B66475AC53D9B7FC4613260628895CA1BFB21E25B1098EE7779DA6
+D46C18933860924530644D877A5A1755A6EADF2EC377A40AB8A87FE650B774C2
+AD0FB796AFF2DC6DEE921DFCB4406440F493777AB4AB145CF5DABC0A803E36BC
+63ADB4E3A8E4060CDA2767C70793726A3E093235BFE0EE4498B7D8A01762734B
+303E9D24E5354AF9B2519CFB708661C630664F9EDE2CDCA80777FECA16627495
+04E32CD2A9B68E29577B27C65B0AA3AD89C23BA2B79F0EFB08C08BA8DFC1D5B9
+FA53DB87349E7CC25082FB7395CEB69C8A185A6C6BA5686E476FC86D6A22E306
+AB5E1C1D2809485E299312C66BC6C9BC0D95552539D22DA59B874A318C03D9E0
+0A60B47AB88C68AFC89B5EEA0521C4528283FC44BBB90861F9C1D428C81E69DC
+D2476FAA9113341BE5324695E96BB0E9E83455BD2F020B19C7D47DDD66932C57
+B92E7A6EC1EFE1B38F145E4A09C4F86E2DE2251078F33399B6DBF6B093B596C3
+8553B2C2B14CFF58CCBD97C117616E5A0FA91F740F1F113CA22C8872082750CB
+AB56FB6298AA24A6FC17CB63FD919D83FFD8E21D7CF08278AD5B774B18E2845E
+B8A690ADB9EEF48C65B7A1FE2767E923A4ED2FC14831F76D07B5449057CD6ADA
+8A6017783DB40B74467260E2E710DAD3B54A3750B2EDD2A5D9D86F33B2692F42
+DB513C6CE754145E880CD636BD81FB09DDD312285B37EAEB06771AF9C4A94FB2
+B5118E00399D78094375E381860F28AF216546AE14336AA8021AAEBEC7B18D4B
+4D951ADFFF236BE54405680A893DA6963810697D154E599CE6488C6E0651942B
+A046A769CFB69F0D6ED0CCEB32DFF9BA1F42DC407AD6168D1E8F9F543462CA0B
+D2D4F6A743241A0AE8209D24C3CFD15FCE0BFC5B12A38D79D7B6B542358E5D38
+1E2FB10DF79DB1EBEDA7B62B4ED1908B6958367320BC5540F29720015BF69836
+A816CEA95F20AB0C4AFBAEE96E148642AFC20ACED0614386B26FD5A17A661987
+6BD1EA156E836689A39200851A1ABFC51691BAE4706F60F255443A6A5D1770B6
+97F11FAC489336A2EE528D25FB23C8EFAD6DBA039A189885A350C82880DC5223
+1B30F1EC85EB3CCDCD88DD1C030F9B346A46C4EA46FEDC6E13AB155AAADB4CCB
+1E2B585A9C1C6CEA143E43DE0A0E344AF525368138B475C665572B46BCB211F5
+9B14464D112DA0BC53710A573B9D061399DD6D4C7E7DFAEE23F06DA8AC4FEC16
+6493ABC66E6C64D115992E8C11307589809ED7DBF05F079003517753256BBC3F
+129CC928B009A30709FA4A8527686342C3EF7F7352D7C070838D6586B1E5728A
+2AB44B2DD2B158CD4D4214A01D25384ACE75298AC298E6D47FD1F4936A52855A
+C99070A834C957F9B09BEA059841DA63CA94CD5BC7B01A7156BBBE71254A1F4A
+EE8E7A82EC8A64B4CF55F0FA6ED8A60B7DA91518AE7FBE43E93025E2BCEE5B92
+3A622D725BEA3D14E14735BCE2FC04BF11120B761E3DCEF94D582020BBD67C32
+3B1AEAA0A82FAEAA69B8A2C74F6D82436ABBAEB48F2DCD8F4C9A99012E73F8EB
+E34E43E27AE6B7228EC48B226DE50FD58AEEF7A28CE336F4A113D679024A053B
+AFE36FEE965917F5A1910443C11147836AF4430C3D4A7D4F4CF759E9E1EF1268
+163F077B862B77ABD0F7DB83EC447F872BC219AFA9B3EBC8FF0A9CB558A35F5A
+FA49258CB038E7D3F0EE530972D4C245EEBEA89BE3DC179B567487EB44FA6CF9
+088A5ABBF8DF8EA830FF67A9409BC8258285F7650F924E167F405EADEAE15921
+9A72E2C9DF52FD66C9762EF5CDC5146932D2F322871922577C04CD90865E1BA6
+1E792CB2EE30BE10721C014DF1C53D8F2F07B27E970D9AA1D70DDB06D09BBAED
+CBFC0855651175B85C86119EC3316F7A8A9F237C63AEFEBCEA7DB430B8A9A0F9
+87C7DF4A86ED545DA1CF238A61B9E6F6E827BED954282F163F01E911B17C4000
+E8BEDE28EF8AE821F1A319EF110C75A15FF0D55FEF8D9961D4FBFE1087C5888D
+CED4ADB1EA201C1D91FD6DF71D121B5F05F98041AF17514496D5B3CA7BB09E0E
+19FA8C9FF2196DE23663684794C65C684B7AF97BE6754AA108C2C7015A14D975
+1B8D3D39F376E3F693E12DB603A39BD41670CA0F997BAA41E30817B4CD2DAB98
+1EAC8E82E058A71C1729EF32B9DB11A9F2546E43618ACB1D0CC698219C6FDE29
+E4D783343E8A3DAF9DB2EC3FF1E95EBC4D9B0E482FCDCBF5D14FE05E4D3F87F2
+07659A072D9465DA3D5D684481AEFD853D83ADAF5B61BA84F09346FB68379836
+00652CCDB39DC8CA06A668EFA3A570B6F22F5BA266F6A6C8BAE414ABE7278973
+CBCF137158CD9DBC409F2B510E86879EFAFBD5D810717BCBEF5E45E74193A352
+E6F1BAC1433CEB19BE0FDEB6EF159FEE2CCBF08FF84C788AB5B898F460C756F0
+1DE3CF57C53E48C2A61EEB5A83875C156F000909E643F202148DA4D634BCF8BB
+212AE802172D1B73DBCA14040817537FEBBD6DFF70C55A53C03DC314394EC407
+0BA251E7DBFD890416B42630CAC6B927D1324F9FA3BA236C5A7CF47C1C97FC62
+2C80366A3FF8A31E07754E01DF6293487C8F05E2C7E07DF4EE1B103C4AC1A979
+4FDBE6F0E997E72B321CEC0D5AC53D13D13749700199D7E4A728A8DC2E4566C3
+6EC71AC96F2EA85ED2EC9DD95B69A8368521FE1860BADDB68AD640AE3D651D58
+47F72E37D21B707D9C68F9485D2229233B284EEBA81FE8FDE475E62729054F11
+B2ABF54A241DE72B75B06A594016362AADCD8E06E7BECD43A9DD3167831FE455
+4AF2706AF62475223AC236B1218CF8E167B7C2704B185F9AD9FF978E1341692E
+6716EDBE7925E39DF0315408E92E2274829945A54CE69EC9A6A3F7A5A382366D
+72770D713BABC37C30686CCE65AA741A93561F9B9D938A4A63D791DE94B6455F
+5E5FED608643CE8C429E4A3E845E79965AA5CC327524626D833A44E0BA98C915
+41F440B593B406CDDB69A369606C034E065EAB6FE42B6F0E9852878B934A03CB
+037F5AAD74C1C5E846AB464C0566F36B921144C6E44824D78D81FEBCF8F58D25
+04161A00B077979A9A4A7E8E1CEA8EB6220F8BBA12756F4BE9D7026244970E41
+B982BA34C9DC3A0BCF765A77B314903338F301DD71FDD813ED616A88DD4DF27D
+5F3B4261450145A2A7F5EDE3616B026F5FA3B67B4C83139DD628127D4C46652B
+0187BA8DB624E4444555B851C759F6EA0BEE67AA734ED11E6BFAC849711AFCF9
+1DF03E08886702F00E1889DD54D65DA5D377FCFBF958250B926A0DD7B1AFCB63
+ACE9ED6756F871F7FD49583B2DCAE606E015D5C9DA104C844E393DCD49033471
+1248AAAA3812AD25210516018A15CE1C14CAFB533D4FD3A2A4ACA4230FEAB582
+C2BDC65CED03492CADAE4B1686CCAA16CD8C7581672590727933FE63030DF2AF
+FEE52DF524AE193D19B2821DCF83EF667CFA3770A3214FBDFFE854ADFC42BFD4
+8E461C73E94DAA9693AE3F632EC8BC5BA18CF4A5C49716C6D7840CE439A508DA
+32650240CFE8A11D2EA8E44DDDC4C3F86FFF13F10BFF03A9BADE6B614D23F05D
+AC5400CCE1ACDA00A76443871FCECF4F7F68FC04C71A56DC94290DDCAFC88B27
+141DA29CC8500D776DBF086280D30B6F498E83FFB6C1CFCBF64046C819B8DD7E
+1622CF99F02DB2EAB639A148FDA44139203C21B179BFD9F2600F1D6EFE2F2F49
+6F0CE21F7FB711E494F65ACCC420850E77939D8F179D861190BA922E5AE6A1BE
+E5981475AB279740A40CBCA4B1C955C888F97C1FAAA6F1AF6F2CFFC5F2458F
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMBX12
+%!PS-AdobeFont-1.1: CMBX12 1.0
+%%CreationDate: 1991 Aug 20 16:34:54
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.0) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMBX12) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Bold) readonly def
+/ItalicAngle 0 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMBX12 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 11 /ff put
+dup 12 /fi put
+dup 33 /exclam put
+dup 35 /numbersign put
+dup 36 /dollar put
+dup 39 /quoteright put
+dup 42 /asterisk put
+dup 44 /comma put
+dup 45 /hyphen put
+dup 46 /period put
+dup 48 /zero put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 53 /five put
+dup 54 /six put
+dup 55 /seven put
+dup 56 /eight put
+dup 57 /nine put
+dup 58 /colon put
+dup 63 /question put
+dup 64 /at put
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 74 /J put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 81 /Q put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 86 /V put
+dup 87 /W put
+dup 88 /X put
+dup 89 /Y put
+dup 91 /bracketleft put
+dup 93 /bracketright put
+dup 96 /quoteleft put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+readonly def
+/FontBBox{-53 -251 1139 750}readonly def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891
+016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171
+9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F
+D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758
+469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8
+2BDBF16FBC7512FAA308A093FE5F0364CD5660F74BEE96790DE35AFA90CCF712
+B1805DA88AE375A04D99598EADFC625BDC1F9C315B6CF28C9BD427F32C745C99
+AEBE70DAAED49EA45AF94F081934AA47894A370D698ABABDA4215500B190AF26
+7FCFB7DDA2BC68605A4EF61ECCA3D61C684B47FFB5887A3BEDE0B4D30E8EBABF
+20980C23312618EB0EAF289B2924FF4A334B85D98FD68545FDADB47F991E7390
+B10EE86A46A5AF8866C010225024D5E5862D49DEB5D8ECCB95D94283C50A363D
+68A49071445610F03CE3600945118A6BC0B3AA4593104E727261C68C4A47F809
+D77E4CF27B3681F6B6F3AC498E45361BF9E01FAF5527F5E3CC790D3084674B3E
+26296F3E03321B5C555D2458578A89E72D3166A3C5D740B3ABB127CF420C316D
+F957873DA04CF0DB25A73574A4DE2E4F2D5D4E8E0B430654CF7F341A1BDB3E26
+77C194764EAD58C585F49EF10843FE020F9FDFD9008D660DE50B9BD7A2A87299
+BC319E66D781101BB956E30643A19B93C8967E1AE4719F300BFE5866F0D6DA5E
+C55E171A24D3B707EFA325D47F473764E99BC8B1108D815CF2ACADFA6C4663E8
+30855D673CE98AB78F5F829F7FA226AB57F07B3E7D4E7CE30ED3B7EB0D3035C5
+148DA8D9FA34483414FDA8E3DC9E6C479E3EEE9A11A0547FC9085FA4631AD19C
+E936E0598E3197207FA7BB6E55CFD5EF72AEC12D9A9675241C7A71316B2E148D
+E2A1732B3627109EA446CB320EBBE2E78281CDF0890E2E72B6711335857F1E23
+337C75E729701E93D5BEC0630CDC7F4E957233EC09F917E5CA703C7E93841598
+0E73843FC6619DE017C8473A6D1B2BE5142DEBA285B98FA1CC5E64D2ADB981E6
+472971848451A245DDF6AA3B8225E9AC8E4630B0FF32D679EC27ACAD85C6394E
+A6F71023B660EE883D8B676837E9EBA4E42BA8F365433A900F1DC3A9F0E88A26
+31B84248049A4C7D49ACFC81E3E4FEF5F69FA691073C34351C95E8BACB6C51F1
+F0A239823BF97F518E4B04A7F85F0AC7C6BE40E6FBCA328F96D0F9D9AC3C2A53
+F5781366C50469C5386935E833FC248D8260AD6F72D2F2D3688E9A94F87E5F62
+5DD3358365F85FBE367FA2769C7EAD5EC9BEF5292B14ADDC9683E8CFD76FDECB
+CB72CC020BF223B29FF3A9538B04C9B9403B01CE4DE99EF7B0CCDDCDAA7AC5AA
+8D7BFA69A836CFE988DDEF001303F7D58DD7E193171F7E9A23ADCB244AEDA2F9
+642CBF8FDD62F6E91B80825292EDDDCD7496624B6C1D381A61E8C1AA0A00DC0F
+2280242088F24D4129B4CF1320A2989A08765AC390CA76720FA030743CAD6846
+F6E8789A5E3E96940C65CF0C9677DA1EA3162B71E99B770228070BB9A660909C
+47F380B10F7DD5AB2BC23044B4175164A88BA16451EF494E5A1902F43E9FAFFC
+3A60286E5561E16780F2115B85685E797E63731011E10EE1D64C148F65873F06
+5DB9C32ADFCA9342F4A18E85BB905DD4AC45AA56B38EAFE3F1C9D17D689D8B0E
+C6E91A7D42EE6BF82651E7BDB46BD65BFA57BE8E0A797E97BC1DECF2EA2DDAC3
+CA6164F5AE380D6B2A23B5DE1B97C91D29E535A2274BBFCACFC10C12E554D0C4
+EB97C43A3C752B5393154E9865685D33439FDDDC258860296047026EBF689762
+A1067296C711A03086D178FEC65A2FB0BE917ACA96321BBBFA8458EFA0E14A4C
+85AEB8EF6597D75D5BCCD1B0935DC1AFFB755BE6106162EFB60676735BE64564
+B5DDDAA7C26ECE1690A043F2754103FA3F81E29DA762BFB50D4A3F3C8BB419FF
+E9317E01EF54AF28B4F875896C7B8196A95707DC79F1C3538D4F162260AFCD90
+61A3967C99F6F780646B5B2A97DD6649CACB141F76E10EFD1A7A9DE0D76705A5
+AB7155D73ADEE46D19B6A7CFC58F614678D999A23C31E1C86CDBF7017DB90531
+C14ACA1F11A9FEDD6C0AE413C7DD478AD99E7CEFF7785DD631552FACE5B0B428
+5781E221364CCDEAA1AB3486990515939A9EDB065282DA4C5A837C81CDE67A52
+97FA3936E332AD57319A0DCF95DD083934855AB5CC535EA4E9D9DAE662F7BB0A
+6D45FBE3072DB42C1D27BC8DB5257FEB94D5CC9E7B944C1AE3F4B7322182690C
+9541CA08810032516B71FA614EC6823210DF837B551624862C9D4A1A863500A2
+A913E18C4298DB9EA02BDC2BACA79F0B57897AF2E486CDBEBE200FA42B0C2213
+E577843CC8090A89B416F8D09827C62EA1756C82BCFDB38A7888DD1866DF0EB8
+E45701027A28440A6DBADD0D1158BFB645F23DCF66205A14175E31281B1E5CE6
+7BDAD0C786B0782E76044594F693B3546D0D807168833ACAFD06DC4B8CB05496
+D8041FD42795FE58DC25E5C14E78FFFEDE3B48BA53C008C1FC1723551B65BAC9
+155B82AA53A9475D2B62954504DFEDB3DB0A8912313978CDAA587619F64BB9BE
+C99872DA229A8D5A282A92148A68DBEA0DA4B2F0A08D2A00F6BC04F793968D0B
+7CB56E8AD3ABB9AB57A514A170F16EDA92F8176DE7CB42C4F23E504DFCAD2B20
+2ED5863AAF337A28DAF9FFDAF578C029EE69B0A030CD6134DAEC4C0E71BB0851
+E7753AE655AEA168919C087038417510DAF6C48C31886A2674E2487C2E226B99
+585FB5225A704EAF95B54E688080E863FB94407DDBBDF259620A9BD9073640C5
+ADBF23A33F705B852365912A262A40CB57FF109A87AF25466AE93C957DA63E5E
+6DC474A4DAABBD9337A852206C50B645D28AC81A9F1848425DFCF6A10702F23A
+1CDA1F43EFF11578D55C1380AA9DE2B0CB7BDCE13C78966FC614FBA1BF4F64F5
+4B38ABC7919DA46D084DE5A435F006F127F3D1B232089ADA7B1705E03D727BA0
+0F8BCB53E985AEF73B9D68B3DE0B1CD36E566072AF21BDE7D991E090D02E3239
+E1E389F9F799BD17C453F0885D74FB9CA04E6DB6BE1EC840F8C1E7C117199177
+A8BD4361E733E53210D3FD7B71825563EDA0D99153F1A81174D5850704559972
+60D67F2A11FF9403C64D9F58F30C2A0E89C96281F8395E26B12C6EA61FEBFE63
+737F0A33D7E37E3DCD245043BA1522729C6DBD5D78B2C8C58FA5BA77BFABCAE1
+AAE7C36E70FFA3E83A906E8E63CF6F331499964299443B9C5F0EFB91DC4E675C
+5784DBA5413F3DE861903D970018AC64CCB010133F2EFA4821ACD4474715F057
+6FA8565AAD50B9F19F8DBB6E3AC72E1906423AB35A93D56E34CFD5F3B5863571
+F654EA6D67B299A48185EE5DA4F873932B39C23F57764ED19EBBA923A51A2C6C
+5CD7A59477341ABB5B5F21115D1774500B930AD6CD07638047F45A2AD8FFBA36
+05C5CB6B7B97F88404462CC50EC5A75676E8F91E7D42C4DB59AA74E24848DFFE
+B556A249D8E3D23137B60D9E8FE2A9641AF959A216C57A825B811C6E7522C443
+69B8FA6395F7F3C628A3CA99FC5D8689C95E35EDD6B271F3FEED9D184F0B3AFA
+8A7B6100E336589BDD6FBD03B782E36D809A64E9A94F5E9B3C9E7822D24D46D8
+515CBAFB830CE3F1923F6156E29AD479301470DB9A9180FA7381C4A09E9D1ADB
+51DA817559A37DE2615DF1AA2DD6B8C4BB1C9B27723DDE22C116B4E43ACE5463
+71C4B79C1729EBF6F1ACABB12A3F596817827589E67879ED40DF7DDD403D45AA
+021B11B11859CD7ED42A6C6F15021E04508C2CBF94CDA637A75ACB47D3A249B3
+31DC550B331B22CE2191850799B2E0AF443ABB788CC6297929AF3D3BC9405C8F
+2433C4BF18C250C2C15C442C10C119F543C101F60FEF1EE0F9558A8E2F6035B0
+C5789E9248D846D2ECD3EC4E790A79D2817F5E612833FCDC360C6902F176E130
+E70FC6E15E07ABF4FD6BE5F3EE3BD4A48DD38256706C25BF0E6D9A7C51DC80BA
+72BC5F5243C1B49E3D75455BEA13195C093C47AAC6ED3EABFFA674F9E66207EB
+98571BAA8C06389AD5402730DA846CDD6040CA84E0F27A65D1194D916A835275
+4E99D6F6084F8EB0E34940F47C4D8700E1B46AAD46EE464D4E10C4E1259D2208
+70D0EB1661EE28B7FBA067BAF8067480793B37D4C881678B2612531E87BC7243
+0AC0B8A4B816F1670443C0A3E4FD631EB8B48DF3D4A03D9690408986E98F227E
+05253E9BCCB8C61AA0B4E352B6B76FD9D785AC8823A4FBCEBD4574182D86382F
+6CF90EE394506B1043FC4137E9FBE5D471F605E34B59AB3822ACF3B71730A79D
+802486209B66D4AF6BCB7821CE4BBC447F66B35ED8BC949A935C335B9F61646B
+AED373E141AEFCC868D068C2D133AC284885829718513ED5328EDF5230C38399
+F97CE6F55004A89D21937914FC9CDEABC3837A63B658C1F96E1F6474420916CB
+3197C6F107159EC20D34E13A8698BB04E9E8BBB59993776DA701148447D07F19
+2E8FFF1160E89A82D07D58C7DFC3B71EEBF7A9E958572BAAC093568F5BA7C0BD
+B118994D1A3A9F60CC96A1A996D369E7FC684244C07C3461C932ABF4C266B7A3
+239D80C79F603449A0145D88AB24A4DD8B2D82F315AF8F05904EF22F09331D9E
+D6340306D266B4283E919117D283918BF0B4D944BD0B7990DEA8859A690F011C
+7C6843BFEFC9329CAE786F102EF0CF8A2D70050B264BF0D824E1647191D1AC13
+C23E7F53BA73E1B3636C50BC33E2F8D0631C3A76789304A52DC48AB4BD9D6C9C
+51D64DCF77AD95EFA09415A64B346B32D4189A9922B9514A26AD918667CE94DB
+A631AAA4EABD64C71E9E954A40A16A66CC50F444350FBB77C1BF49868E2DF59F
+5EEBB30170DD95B0D8D7530E3B613B70337239A47C582AB7E3E0EA6C6C908B16
+5E89F0969A57D2AB5429DE5CABF2158AD4DDEBA86000C37DA9D859BA60A6A4B0
+EC7C29E0B6E01D174EC741BD5989B5BE020C843A86ADCD2D6BA02CB524140D80
+97FFC7AA43CD5ED3B6A4E7D4D90F3244A71598955428E310D2263394B807FF04
+E102DD0203FC79B002D2458B4E29AEEB42CB757197316ECA9A21D5E8D0F1CA74
+1B52DFB5FDC9EE0764E5A2F2CA7307050D13DFAA548514374CE8BFFFE8109F57
+638DD8BFCA8F51079D9ED3621A6AE9CAF4BC163F79E283BC7D52E215E73B896E
+7A208969AE5E6D2660B73891FE0C38D3F65A65117EFEA6C9008F006811ECABB3
+ACED727AB8D25D9D6F7B12A630090675131BD7657017E0D1BEBA6C721D97E496
+3113B14D6D8C6ECCE0C82CD092480BE17F5031FE21FA67AEBAFE90E2DE02F273
+8B82E66CA84CE6210D492175BD6A0EB412240AA3799637142CB8F8E07033FC81
+CAC9CC379FE10A0E444A373605647996A2AFF259B0A2332DC2C4C6AB519A102B
+5A0EF3331915EF092F5ACF3CAB65F21DBD04986BE3DF862411E7EDFF32867B63
+9891E06A0BDCDABCD7EFB0F8080CA30C79FEA9ED999B9B2D94CB3CD3ABC6C94B
+1460CDB5C58247EE64C7B0A3896E86DFF036B3BACB489FCDE3C6B4926F7D6EF7
+0166D4B404F3EEC540EB39B801F22B57F59F7E987F76E6BC8A61DC216557FF8F
+98901298DD5571653CC29C5B7F2DA9FBB4D93B62CE43C06AEC1B942BA6A3E86D
+7C1F83AC372F681EFCC95CC23149881FD1BF6951C669977722357026C481BD85
+C8B79C02D35D6EDF2DA523EF97B32CA023C21B7C0E746DC61A4E062AFA6033E2
+D1221BBB36256B230363B9B4E40E34272AB93C63D962D5BCFF652259E9EED617
+38DB29D6521453834C876865FBA9AED8D6F740EFD3A0AC9DDDF999DEBFCE49B0
+848E6B535C89DC288C1BC750B9FD923A74853E2EC884AF81499539BA9DA06041
+89BFC782FB656E28F911EFFC5CD1AB78AD270D02AB7D129F1512EDAFF40E1895
+4B9B7FD4D3F0669B1692B22690B08623D21318669D032E899617279149C08A48
+E71DB761E6E25DAFA8B51755120DAB6C7D9AA16EE353A5A619EB659C974FC026
+9558753A717D6F3928835038F32C0FDD63D4664BC97FFC8FD5378CDDC66A3CFA
+093EE8063A0B09B9DF05F7564D65940FE9E6F1E9461355ACCA406A4B6E16FBCB
+5A2C9BA2EF4FFE362FA6CA020F5DB489755D27557242393E50377C6945B64996
+868A29A500C5D5772BDBED54B25DCD6C229F6D43290FDD5D410576511D907D3A
+5BAFC90F329A4C861883FE8185ED5ABA95A7DF29623704DD4EF379ECDE1CEC4F
+AC06577755135A1B5427D5DAD85485AF0741FF7F16884AD6509854D7944CC513
+6EF45A4A3E3F1F4C2DC86682B7A62811F784C3B7A735BE518196E8E2CAD81E6B
+2B8734FF26C91E988AA5B9E1E7FB42DE6B82FF6479AFBB7368A4260F67BDAB69
+3E689082825E4FE7469CBA1B9B7177119C0825B100BE8E6F1A910DE8F92CB3A6
+661B19BE5EC3B6DF6B04781432F40EDB678878FA51FB4F3DDE2076921CF3EEB8
+AB9885EDE74E091F0A6C1583515C7C46828AB1487B18B84F8B85A439A6C8EE1E
+3822776A0A1E25216B7BA38AE77EBC4FB706257290FCBDECBDC13BEB402F2C25
+610AF618A12E7D229F6A83B8CA7D8A117E1EBAFE6C044F13D583223F4DC56E79
+4C297063953E49AEC2428F1E96B1EAFAE79099FCA69EAC63E970F10512AE8B91
+5BD5E11C20C0D65F637642E85058D8B2ECB4A5E6C6EBF6C7DEA6EADA0F978CB5
+EDFE9D9A7E608088F791EC9A12612DD9C997C71BD0465B2D06AEF2DA48BD4C2C
+ABA638772D5E614C726AC75F61823707B4F72F2D42146089FEFC3998D9C15521
+27863929D103F46673B563712BF63819930CD03242F480A026F77B3FB17C8819
+4F9FC69F0EE56E975EF3C545AB514B0E6DCB8E575388E0961CCE8D200F445B2A
+4EC2A853EE7B2192526999A1C0AAE2A90A58DB58EC82A10661DC30134286FFEE
+3EA512A024143D07A6C671AFEC84858B4828B2B772AAE09E9CA9F7882A4220C8
+D618C9C5892FA5A36059B978EF8B26D6839EA8D9C679452810CC9E132C8E0274
+117339DCEED2A92632DA2BA784AB19E90A938C9ABCEAE9296E0935F5F6309B16
+1EC413004EC7E3CD2CEB4452AA657183E4733200C62A02914ECAC30FE556AF4A
+1AF2B26101CFDA61F122B1F4353F9551E38FEA412DE7D0A8445B9D039A417861
+5C373641A4B6532370C2E8C5257583484A065421EDB4E50EE8AEEDE46F557A6C
+6CD994D162A969698AE100116344007A7B7F747391DA9796409D301E59C94148
+F285929AF6B8C6A31D65594F63BFA0D352BCEC60D50E9232C8F28E73B2DDE881
+DBC5F5DD8E88E8EF97828453D5095311B92409C532A1A549EFE3CAC1F3D91E5D
+2EEC82CA6129FE9DB8CC6FBD6F4BC204CA9454C475BD8877597D75ECBCEACC97
+9DC698CC7A064227CBA45EAD0AD850C45D059E2A4ABB0C830EBF95E61F8AC3B3
+8A9389EE9E05EA091E64DB71863480D9E4312772FD9B4D6757556CC7C43FB03E
+04EEA1C9A048ECEC4B7C465CDFCEAB707F67FFDC903F784CDB60CCA60CB3DA37
+09CDEC7264AE28487F0042ED019070BA501C22685AD2EA7BB03EFD5D8728F672
+E8FAEC9A5885461CE9F2FE3BEB7F64DDBDE5B0F2A6CF1FF0CB2BA0DFA2CBFA20
+C539DBA84F0DDFD3E62AFA11CADD416CA921C2965093177B34DAC627D18442AD
+3167DFA2688C2364C0AB3F2DC94D0867CCF22998ECFC568EC07F28161F401789
+4F3A13987DCA67E0012D41C712F4515135DAB1405B77BC1C2C3B7CFB52BDE5B1
+7E2EFF5C3F19195B778B0016ADF3FF0B11DBF0D674A412AA946167CE88D6B10C
+3D77EC4BAE76A665329C977409D2AA8A8CB07325501FCCA2A295F83C21AD5582
+09406FD233B02E25A465739986A6962ACC3FECCEA316A8C747B6CBA3B1C4C7F8
+5A01B5BB008651EDAFC2A0AAB839EBDD14025BC19B9233D54CB5D400345106AB
+E2D1617BC855A3AA6E2B60C50AFBC7FEA9DBA3D30EF2905D96A5F928011CAE86
+B1C6FB92AC8BA20D7B15B40113BDCFD9A05B0F9293477C4695E6FF84AA54E779
+AF7E19AFE02FE9A3DE310E6CDD4A2C612C227FBEA17CC5014AD9853A74BB6D05
+5A64F1C4366DD4D807809FD02B29B8E455293104ED7187A3D4943C2643ADE321
+3299D423DA71D017DEF79F33E499D5DEDC97120E91D0408ABA55CD77190E0964
+F7B7FCD76DC3213CC9D6F5EF9A7456A181433712F1ED8FCC46BA54793C33F10B
+F8BF3C7E8B59C058AA0A9C18CFCF23CCE06D71A146A34B5362CA8EE5DBA42690
+1EE541CD07C043C565F803F5EB1E459807DE1380398989EE397D73EA7D142AED
+B255F05A5BBFF1F73C05FFDD277EF060CA9E3C7318A58AC3BA0A335442BAB763
+E725EDFAB0C984B14893F0050D0773F5037D763074D3CD9EDCFC92F17C3FB699
+F7AF92090BAB4B356C4837B9ECB1D71BCC98ACE7F88448A2E2FFE1B96767F9C9
+45FE6C13E93E0638B370D660FE15D1AD1B6BEEC26C04EC188641560733EB5C39
+D19FE0D6CCADA8D7004F8132E7F535BCEC3C5D45321E59EEAB9576F7B4B39ADE
+59A85AA8EA28B2C737F4368720E2AF82A7BC1B364FCB39588256017A745059BD
+7C31D183495F63A7B4A76BC50C4A00EB2FE4EE0C512C3BD2573D2E6E415CC58D
+E2933DB1BB194B005651138415593EB9EB4B9BD91D37A0CD576B218B6827EFC4
+1D3F1D036C6DA66217EF92B6F349B918AA5E20B9D4BB950823BF7EB9FC07F78C
+8574224AA93ED2064D7A00C98C41F732215ECC9DE1017CFA379A5B8569C3A496
+C0CD61A6201D53177F2736DDF182379C671B38B16AF092D63450CA96C8E8084F
+2DB8C8EBA732B5A84F540CC34A4AD3E9908B3DD149A10767999850D353EB7149
+E2BD0102585AE07505B83FAE856F467310372205F79199BAE473893B723F7E21
+88EE6659BE3088859D2FCEC1604FD568DDA45559DDF64EB10FDB19FE8C9D7C59
+F0E7B781DB5FD80A3C7A73420D470F1256D683F92EE6A7A9DD241B66CE4FC35E
+C6D69D2B66834D848437D45374829F5F1624722806B9E126B43A51B4FB9C27E9
+D5EC07C90DFB7CDA30B53C0DDA3D1F93B7EE82DB6EBC14466F0FCA5149F13B4A
+BD949717FB44FF8BFAFDAA7914240E43B0253E4F8ED5C481376C3B609A191670
+1F2BDA2F6F6A466FD42FE9BE9EF7C3A5B20DCB2A7C18DACD0A75038DC30E3FD3
+64F8389204FEEC67029A64FCC3E5FCF97AF24D98A455997D5667270A95BE2D13
+ED87F410B35B52A2D3D89BF180B3EF83CF39B634A0C1CAFB62D76F373D675E86
+856E7D0ECFD67A5C48A7FF4653B7A607622DBDE7CB434E145F9A4B0501456B86
+3E99DF2570B034243861E4BB80E0F9CE2649329960A792F30913C967F9538E76
+75B1591E075C10BB59139E2D1933F6BED658D704F623F8507B0E2A03C582B75D
+657B577A72585B6926D51882ABE25C752824092C6A1F5A006512FFAB96700DCA
+E2AD0C7D7A3AFFC4F823A02FAB788C32ABDFCDD56DDE65FBA63BF95E890573CB
+EA28F7BB049BD3133DE22E8F4F05AD04133FE48785524A14041C73EAD6F60D7A
+2CF1F8F3C7258172EAC2A9820F4C04DC34DECF2912182EDC86D7412A25A6FB25
+F46341AC7889B645C36A85C8F10D22E41D4143D10EDFF014C00A7B1E4EFAAD1A
+7E42EBC657CBA442E9B2DA0BF049E86D680C5E1C4B2588E99F24844E8EA639D3
+A4CED6A0A7BE055856FD998BECB9DAADEFACA913A60AE501FDB6F035A2D300FB
+FF13B510595A64A900DA5496B7CF1085676680008CE70D114082EBDB5B384058
+06A99A26CBB247CFE8EDB6EA428D261602319D5EF03C9B6BB657E6D8A7632970
+491BA80744BB5DF021382808F3F99ACDC4EBF26887523FA5EA81321D6EF2AA9A
+55939200A4D011602FFF717AD90EB5E47807CB58370C40461591217C2A714DCD
+2BE918A0177D068A21B5927C254643AE0B36EA772A3D2EFC25083B8291BF311D
+74B95C21696904773C60760CBEE6F94638855697A1948221438456099589576A
+AE5438C70C082D177905FB82FFDBD4BD94ECAC1B6FAF0D4D7578A1B6576B4F13
+E3A6F814B4AB580ED09C916E20820DF0626FC1D9A925E8BB6A368E630AC6EBEB
+933991990F4E49075B318B62CA8296CA43B77FBB16578839419929DC8A2AD819
+F3C404FBAC9CE3CAE8AA904E39924C4B704272257DD3D0C8421A90D426376F9E
+E2A4B6C868BA2884D7BAF0BADA6299E307ACA1A74B1D73D73F0150A6C560E65E
+6C0D247AD55969C1FC5DD81C764338799892D391A254B3613F89D1A348A9BDAF
+CCA171CC6E51DEF7A91C7929D6FA2BBC243DA7B1BEF9652F1D8FBCEB2D367187
+9FD4B2C681820B2189A213866CE3456E2007FB3DFE2E362149177CD104444D0B
+C026EAD4390AF141B33868DC5A49E0E1108DF1A6DBC81E2015969F66773BFF69
+707FCD43DD72B483EA751FB1C840C917EAAE7447AEC688EB9922FAAACE7BC094
+F617EFFA3199DD06552C72E53E67B0053A3BE5C5750EA0581B1A7692AEF0921A
+859C7F04DB8AAB312D2480ABE8AAFF257469A555B5F983D277ECE041588E8F94
+07ACAC0E3DDFF44817A21B86939E7787FA7772113699B0A4D9E5462D3E59CEFC
+2798A0D70911F57BB068F9D11393D3F2A4161C26DC2F3C92A7D1F5FC32C6295D
+9C6DFD5E9561DD4443F5CB7A356A9BDCBB61706ACF0C51670668C67DC0FFF754
+286CF2BEF36A02F637DA2DAB10F4897FAB65E78A408C405B52C4F88C4F70CE20
+9A27803EAE707C5E9BBEAEF09A2ACEE9986A64BC671BA9D638375ADEC6E83038
+303B41BD653612FBE967C4B5A121032C73C085A237A561B860660D52FC408F3F
+CCC694CED076A3F42CA1CA6C12A222BEF6850199F45E2354CC7E308D277CE2FF
+F85076C0FF875911B86306112881047E688C5EA9CB6497EF84A659A54ACE4AE9
+774EB2A9ECD4ABA95831E2B6DCF60E8CCD197670E2CA7B79FBBF3C9D9990E737
+D8372E43DB9D4A1B488C630E86BB9B9E91012DAD1D7FD603D2DBBC732690B2A0
+8295EB964EDC0197D6CE17CC3C71559962405AA1E21BB1A8C17EA1DB8911C970
+4EFC85F0DB429C54FC4BDAE64F5BF4B5DD90236269894A180920BF30FED59182
+6781F1602EFE3DFB2467EAB8B00CB5FC30B9669AADD4DAB5795E69F4B8703815
+95F15C33DDF808D242BC2169FF88EB6D74E9E10B638658330EBC284C89442949
+8F4658A6B3B0E70D1431E969676900E56D0773D36A7CD91CBA93C35EE3E07BB8
+2124EA7CDAFD27C4EAB0C53754CD38D4A08C362E0479422E9042C8586BE74C21
+FE71358084B5395DED53C62FEE8ED78460D8A9E8C39E49355E9F712142D3CC38
+A62E9B7BA97061D2C70579E40A54C0962BFD0C5DC6B3338FE09770DE0910F9FC
+4B35C0A307412BF77CB83E62BE74B4EDD3A6BBF2E2294477209F823F57B87452
+778759BA065047FA61F3CF1853F60BF4600245237CAA359DBD88619EE2E948A7
+FD380EE535751CEC58BEA1C0E48E098CAA97C0AB72A2BAD0B538D8D48A44CAC1
+AEA3848BE1B68AA401F37A1E2C4361FE68EF65617237AEC00A37FDA5E826ABD3
+291EEA47E3D9800F98665C75184247D4CEE91401411E53B8B48FD8CFA7147E05
+3603F82AA77C3FB65E787AF953D88B897ABF206480083C171AD32AF26F927E7F
+58F29406D9A4C64522378E3009AB2DDFA65F62ACBB25888F7244002324FCDD2C
+D01D4E83F7D222DED9242922F1187FCFEDD0DC300E05C4508256AF9D8DF2141A
+84265C77AE2034B7848A2078933229C180BB2176481EA46056610BC76B21B33E
+B5792BB9A3C4AFDA74A7316CFDBC0F9C63625CAC268AD7A3B82A9E693F4A2CC1
+6CD9E3499B943C6B6522F4DFF471B012E8BBC82E941CB87F1672669A7297DA94
+1D05CBE1D1BA7E3749E59275B55C1893F0EACF28EA06567D4702EFA6328B4E06
+A179896B168BEA4B248FF64884DA6B42EC4E49116F1BD06104C77E80DEE2B5B3
+96476851455CBC7BA1F8D37E927F2B8AA5F6860070940F182B1643929C4A02C8
+0D0CF40CBD295C8B5965CAF002D464D032209B83A69CDAC059D2C949A1CA48DC
+93C3F287AB2FAAA8010D2B982AD7663E331752B23C82FC07E7F3EB7D72FCE84F
+02EF6982C96FA3FCFCEA45BC433C3A1EAF91DA6BB03B8E6C22EB79958025C3D9
+6BF93DD6421909607AC24B682E90C3E6F1559C58ADFC90350EB44CC159A69475
+BD46BB4123F4AA935D836E5BE5AD399F13D35136933D47F980D19CCA98DC441A
+351E2843395245E1A3412ABEAADCC1D314E61FD3F7C227804175717E50D4A553
+F329D7D5B1D3ECA7C063471ECB6F72B2FCF5B31C18FCB1C92B013C502C36E795
+4BEBEA3247CCA9989B9AFB2E0144C8FDB21E6611242D26DDEF38024E971E3BB8
+2ED74172E32515C57A002275759AE8C59CC17AA0EB4A849BB434F1CFE128CF02
+E5EF9D2A02279E03CFACBE546FEA176A9864EA3E2748CE7D6480C7BB1E8A469D
+85DF3BBB2D98337E82B68BE7A8C2DFE8D6D86FF6BD205D332030679599B70AFD
+8A002326707FB485B995826FC0D2F8C3588D1201446162A1F8FC7E75F9208B05
+EFF017F40F429CBF0CDE769D14016514543752438D907B32F0C40398C0E0B246
+B06E5C2740E7E5A6AF3182E0E0860A0B5158241D79F7F5FF174764D8351A89FD
+0A7D99E40F317AEFAE208F3C463DB86593B91892F11C9BFDCC8D741ACA2A0BEE
+B2C1A836EC39A8894B9097B194F980E7501608B1403CAC065E92B41AE18664ED
+8D9A889C1653217FFDF6006CDAF20073DB4300CFA63025D381E4AE4FE969FBF4
+1C66D6FBAA6C0BA67B91CE299044261708D93B15F30F685589FEF331733633D7
+F90D071B2CAF4106C22DC5C7361AE88FC817DB8BF37FCF2E409D882F1FEAEF11
+41DC3702D9B44DAD630071210E34D2E644101C7CB2AAF0892C497BB391146614
+50AD23021FE8FDFF23A505B207A89803DADB5E0E16886FC382809EB0854346C3
+5D4D7084F688EBC02DF2673AFF763801F90DBCF5B43FB0E8D57B3079A2C6B07A
+69A462168B9FC750AD55E11A10724943B61F425344C8FAA924C87F31E07C3467
+1002FDC8CCF3153405FD66EF0EB2FA0FF5E5E0A35FCF5052133B5550152BD88C
+2700F1A7D05EAF25B6857615918BA5654925448B950BEFB9EA36073AA00E7B40
+0D7E839AC159B8856EDC45FEE444945EA9C4DE984C68C9C1EE918A8CD45BEB50
+58C8DA3508F5353B1EB83FD38BAB985608E08A0412A5C83C2CBFE295057EC58C
+1C6B537EC6CBE44342700E114DF42ADD55E2FE7FDD9056908AF166ADDDDD93F7
+DD5865C03E8FAAADEA4173E3213392D37A545B409211E2D30F2118B5183DBEBD
+E7CAB3C1E3C17CDDC47BA80B2EEC36E47E9CF81A30780B0B50B231A7A4C5E3D8
+4151DE0CF686095E2706850C90761CCF524D1B61B3E76F6E8611F0E4D993D87C
+8A08A4809656DC07FDDFFCD8F5E60782F3160171BB025A6B736D4F4093BBB062
+B2F3704B7A438495FD39CE9270411A5111B499A5B97AE75D94A56EBCBD013406
+BD215B1A3526C8ECD4C745FA6384931D197EDF17C37BA19DCC3B0E0FB79C1946
+53145487B08EF827AB1E4AE0BD7A0106CC4C1A61F2529CFEA254FA028D0D3DF8
+48D762C42E711FDB0EDCC0D3D1DD6B4ABF4650856B8F275DF1C8179A8B4D3A28
+94EC6376424A8F2462A99D1989AAAB1163A67D05D4EF46D07EADBF747BD56E9A
+DC48E7E1B40A2FBDAF5D8CE2EB3AC9CDE96A6044160DA3D5B96B52ED82EE892D
+CF600C28E53B9AAE89AA2FFD100EC94BEAE73FCFAB2F4FBC2CE26570C17AFC32
+5B343E71769C190E8BB3CC4FAA48991930F7A5995F998D382A90C2A0C98AD6B1
+57782EB0D16F191AAA1F04D2BAF1DB754D8543FBCD2B5D3E76591E5E6F1A2F80
+6705E607D921873420D7A347215D7A522BAD6CAA9A2285D0353820C27D0834C2
+B3BF27AA4704E1E8ADF303E3855D4447BA084098B6E37F578DE9D6C739D44353
+10957E129D642D099B137C406524161A5CBF6619FAB7BDB4A1FEB5F69EC2D8C0
+803685291E483C2A9DDB83D8F7D751AE6C69DB8297702D20BDD7E293F7DACFA7
+E56F7B77F915221981C363DC170F6E04267CE593751908CAB3D95018E8CA038C
+8BA4EA16A91A227F04552857B947B693B0DAA420C7D99B5BFD058677FEB15E61
+EF1888A69C9E33CFB2E0010E1BA49CA8198242B9E025B988A9E6AB0A7D434C80
+50CD2307B194DFB07FC8A827BF6239B3226935A32CCD429348E1789C8B3DFAF3
+03B59B0905DF2EBE6C807F52A4811D10B8B10E967FED1853A6D4DB02A46DA4D5
+05150D24118FFB7445C8CA17168BD332F32A78DD5211A37FCE92F8BC2142BAE5
+FED439839A5F7D1FA4364A2F5F8B1BB4F4BFD27F0078EF167F247DDE2210128F
+B927D08CB682DE3C8F954E064349C585376E84DD8D0A15FACFFBC5F54CDB2EA7
+34728FE9B4A4D2B07FBF7C6598EE6A5CE1CBB7C0A176D890AD82F3E2F19D686D
+75A6B5816D89FAEA212AA077AFEB0055AC44B4E9E639B7D7C8A2FD4C476F4A61
+AFE52462E4B8352D98B3412DD494642AD5BF0D59050DE29A72F90838941C4BB7
+8A826E48A9AA4AFFC93DBB77A7C8BF4787C47E54F24BD702A3459CD060E70429
+5EE5A72C97BCC54F001241C7E0B1D5E0DF76DA82FBDDD294ED30876554BE1E88
+DFAAD6D8DA75ECEC61588EDCB48E39A654CC3A8C5641A385B3E0590DE54E9EE2
+65A85A1DAC0AAE90E1B131E7064006D5933D96A18235EA1CDE5662B14C393359
+6F7995B833A671DC33B8ECCBEAE657004483AEDCB128D2D89DBBE7D87F56FBA8
+091300D55B04A20C4ECED98B229A61D4A0ADFA6E7CB8EF07D92F69BA316F6690
+02BAC63DF03E07BF5DDDF5C26EF67375032DD9E1CD0A4F9DEAE0AEB79D3BC2B2
+A084661D6DA1DBF6B5AB2047BDF4C1A52856524E17ABE66E38A37711FFE2C3AB
+0FAE88F096CECB55695970A1EB99491DADB601E0872543310D4335E11FC92DA0
+EC1E364D1A81CB3CDCDA4ACD219104C828108D8F75EA0990D6F39F879A58A757
+56709186B52D8BDD9205E22DCE70F81FF0DB0F73D7BF22906A9DC9A95AF8452B
+40F60A11EDB522C9C8B1473C1B7409E95C520E660EF08F99BA405F44CBEF56B4
+388ED1E816AAD6C5DFBA690C207D08DAE204826183FE0C18261EB2E51B594561
+D88BCFB02E70054F35E0DE0F31B15191867079301EAA85D5FE398D83F08F9FF9
+054E00968650A1546AAF86268CD31B5769B6CAB63D5539D67B426847A822468E
+472A5BCFEA9DC15DDD0ECCBEFF03BEB6FA5ACBABEE7CF2A4CB7D85388BD84649
+4ABAE15C9B52FED3B8C9AAAB550719309764625EBBD5434F4049309FCAF7571B
+377C4DFD355A890803929CBC4596FCDC5875E36668E891E1FFD980B8FA734931
+632D59F23D6A80FFDAB866B595A86E6EF798FBDF73C1B0F7073F1C671D641F55
+9757E3459CEFF505F1F35CA640B572F985717C6E5CA9E6C006DD797B3F47E0E4
+03AA2294E550C63651FA76B2C32ADBB897A3F6099D211A31081AC349B67C89FA
+9D2BCDAE1BA92DF9F7B8AA9035783EAFA722A038AA94EBE8453B4A7C1C875090
+3D13D7D2843E9E92FD2D55C5A31D7A0FB86A63E6F39D8A2E285AA7767EEBF42A
+ADA62726BE511F7283FB148079086AE4A4148CD3B0BA71D2366D02DCEBC34EBB
+278D4869B09CC8E191C28D212615125A7BF3C7ABD0ED0173EB04751EB4AEC783
+3E781DE01956244B1502D5CCB14EC3C1558F44BD8A7B4C5235EE01EB9787E3F4
+7633CF9ACF9D1B95CCD78FCBE8B015FADFF6961D960DFF37AC63E5FCB3BDB0FA
+455935C1DD9D3D0D6B998E83E562A0CCECED8BCADB546D4298854C3E760A34E6
+63AB4419351F5567DFA518340EA5E8DFF2C63E8A8862B992C3BF020A514EBA10
+718183819DA30F6DCF7C47D94845835495E3B69FEF796728DDFE4C9E2E32D163
+E02393F60133F2316BB88A3FDF7BCE977CD1F23B4735DA3DC10631D5716CDD84
+A9E67B3A60493AB9589026321993D57CAA1E68A8E15BF7CAA67AC1C33A5458B5
+4D6FDD851667B28F5E50EDFF7051F2A934BE94F86D5088412F5720D25A480D21
+CBD723974537BD0D8EC45B84FE50B15548CC910BD0E91BEEAA1966F3CD79EB7F
+5111A9E7597217524A812DD4C2FF71CD57EC7E368A13B56EF52BDE19E34561E6
+58AC76FC258B6CAC1AB4A5564F90761D0A9EF18FFB33D27AFAA073B3228C22C9
+E2D0106451552CDB212B28F3597D8B652F03B94DF3A980C6888D69BD8597C73C
+5F9C6FD102453E2DE1DA43F0531BCD09873867BCCB7D2A78E8205BDDDF4F1602
+6A9B9C370F9EB49AB46C6686BB5B74A65F0F7BC4A6028BCD93CA252785E8E27E
+F0ED475B95D2819629AF5C08BCE99EE7F5AD89152FA4B6C5A06A15FF077911D0
+F3D99CCAB72B83A877508AD5AA2D8551623E22B1CB39753D61099184D035B063
+69B7D8FDD9AF3515AB4EB6D423E302EE2D0D6E402632D9FD28BDC27B40157940
+809A7F580610903D5BB8D3AA9B2D7F7B6512C106267D41B3644A21F2D8770E4E
+4A69BAC7DF73C94BDDCA5A54810FD0F4CB27E4583D1AF77A631DBD0F260296F4
+E61B4CBD7641D80CB0FCBBCBB03229D6386111E927B91B128E601ADF44B8F481
+99E9941A3E9E5C4E791D822C4DA3B6DDF7D8E01FF3F4264C61E8A779BEC51DA8
+FAF47F90BFEF18B8A02E27C4F98A2413C659002232AD2FF6F556F90B634A4F3A
+220E89D77C19E9D9AADABF338EDB3C0A0FBF2995C8BD1FF35826988935FEA5EC
+C36D3994011F3FDC88581F9431335719FBEA6CA09E232F3D3723937C4EF79E04
+C1026CF28D01A630044065B894C833F83254155E92B0B2EA97F1F262FAF419F6
+7C665F1675CBE362A3848613677132FD9F8674B23937243BDA27D8C17521FE63
+7950087A0D9E678AF1814B234127353D9C9BBDC7A156F8A67B45B3D7708B9AFD
+4647790FF9E9AC3CD84D67CE96E98FE1FC45526F0B1CED5A8E6E1117342DE6B5
+966B2B006F3475210B2293769BD5119042D8D610BF2A98A8A749F99F54537A76
+BAE6FF65A536DF5C93F04CBBFE4736375CF9FE05CD4444D0DC75D5A19351AF7B
+E3708E72FDB3246E2ED29E8E2D1DE84A547C72450185FA82E066369D37467725
+6ECA1771A162DBE738F68EBE829C6F4297DCA6AC1C58072015551631C88DBFDF
+1887D5CE0726800230AE561F8B37880C536F39C70FE9A3FECDAFC92DBF5726EC
+8B4D486AFED75AB1FBE9468E449CAA33D450D68936A5DC20F9E179438318F5A8
+CE9D51AFB937162E7DDD1AA3292C17BA791657A7EE7DC44E80D363B0A0A26E03
+F6DD84E89D28D7C1C3ED347AF7FD4816B66FBF56A4A551776FD3DBBBAFBFAAA5
+A99CBA77634AC5FBA9A02B8289E14FD064591A9C1DAFBBA02F44125B931ACC5F
+B94304B22DF6D09845415B0FBAD0F206E809EB721B7D57B4538A364EC470CFBC
+3D9D30311A4C98976498DE7B6FAF7EA6385B2F6BC3F913517083EA1A03BF3A37
+28B17D9D90DDEEFFB6FED93911508F48424A2C7EF96FF5F7C2BE572C6BECEDAE
+9895E3364C10ECF70C24CF1F16C4265E4AE26E8118AD1CA54D17E0E5E1DC3E54
+25A65F2180CADDBD660CC16034A000CB321E3F55C07039A5DAE31B9AFFB2A33F
+E85C43EBFF2216229FAFF16DA8B2E91272C20A3D44BD9D1613347B80FC96D23A
+E84FB08E2C4AF42E48C6DBE656C1593E1DEC2E3C5C5719AE12B5507840D27383
+5D8B266561EEEC730072BB24DC7E734DDF6B8E725E9205AD2DA26A517478AA2A
+531AD334BC428F48586FC2DAEA9D262B673F5F3FCC1EE33C0FCA58955E739C58
+75306B3CE28A091645670B38846F56D438561B84D7DDD7FCD31A7023916E0079
+FF95D359F472198BAE4628F8097C984B094C5601B8BF3AE95BD8F7ABE1BAA6A6
+A4E073756A2140A266B01B1D31253FA57BE714282F88960BAF37AA5DFE4FBBAE
+9DC32332D7C578C5
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMTI10
+%!PS-AdobeFont-1.1: CMTI10 1.00B
+%%CreationDate: 1992 Feb 19 19:56:16
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.00B) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMTI10) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle -14.04 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMTI10 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 12 /fi put
+dup 45 /hyphen put
+dup 97 /a put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 103 /g put
+dup 105 /i put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 118 /v put
+dup 120 /x put
+readonly def
+/FontBBox{-163 -250 1146 969}readonly def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE
+3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B
+532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470
+B72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B
+986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE
+D919C2DDD26BDC0D99398B9F4D03D5993DFC0930297866E1CD0A319B6B1FD958
+9E3948FFB0B4E70F212EC976D65099D84E0D37A7A771C3101D6AD26A0513378F
+21EC3643079EECE0C9AB54B4772E5DCA82D0D4ACC7F42FB493AA04A3BF4A1BD6
+06ECE186315DBE9CFDCB1A0303E8D3E83027CD3AFA8F0BD466A8E8CA0E7164CF
+55B332FAD43482748DD4A1CB3F40CB1F5E67192B8216A0D8FE30F9F05BF016F5
+B5CC130A4B0796EE065495422FBA55BEE9BFD99D04464D987AC4D237C208FA86
+0B112E55CE7B3782A34BC22E3DE31755D9AFF19E490C8E43B85E17ECE87FA8B9
+1485831624D24F37C39BF9972D74E6EC4784727AC00B9C4A3AD3DA1C22BD6961
+7E0ADAF55422F22ACA5E4DCD4DF9FCD187A566B7FB661D0530454D0DD6C6C50A
+7A3875C6CBF8EC7769F32A1F3F7FC1C072BADEC97794D4E90E0035282A170402
+356E5A9CD9ABD80AC4342A5283E458A7269252F4541CBB6452B39ED54D336D0B
+19928E9CD1AB26AD83EB209E2EC75011A2643813053B5DBB0246097C4821B5F2
+C92554E9140BE35B2DBFCD98809A8EC9FC910FDE9E0D86457C70ACB056EBF90F
+244DC0A5BBD455E15D6E3180311D52CF50B0BF7D0A7F64F3A1821E0AEDBC2E7B
+AEB549FE1D51088C153799C6E089B5D5D65E1C4E2D2B430CDF1FFA23CCB25D95
+5C43C8942435D0AAA3D9055FF808F2C3C887A3C469BBD98F026D0A59E26BA9F9
+C2144CFE49A9AD892D4D31764F0AE3A10644AE3966B0A790684B14D11FA49785
+EC5565D2B2E584CBFD85125F3FAC133338DE35361943DCE9AF05FCF2840CE512
+998D42CBEC52B57B79DD63F00985881E8463396ADA47189A94DDF951A78866F0
+B8A3D9197E39335277EF2294308DA70065D910943A34F7D5F2090FB4AA42ED70
+CBA469A9F64B95A6FBA4BC89DBC93765E3AE4723162DF3F9D6BDE77DD5870ADE
+C8900D6346957B84C3CE88A8F9A12D46B8FCA50DF4433B0B8AED6A63B3DA102B
+6DF94E62408E24154BAAC66B2B249C695BC0FA37A28699D9C0F3EE94AA32E3C5
+8F8D7F803B5D25014D43A353D719B14B247A87898A960DF68C0C0BAF70C83917
+6E9F7B3ACC64DBAEF3FDCD3A80C0AB907EE342E543D607556CBE5A9089B86D1D
+E768F27D74A613F3ABF883222A8596B542EBF54E9DCE327B5682AEE5F6BCC38A
+2A052EC4018AE3189DC1963BA39ACDED8F0C60C83F8873FBBF0302010956C520
+A7F3F8ECD0F177EDF5F4D5522C5984A3678FF32EEEB570B69C142AB89467641F
+917155D646DAF3352E27BF2AA0746E062E48532256AF364EFC0F0AAE3766F68E
+89DF9AEAE43DE6B2E2EBCB666FB344286445FFA4714A341419C7FE51D43CF1B8
+01FC0B0071F73EA4FEB08FEAB64FC98F56EDA5E27B7A71F1F8E350BD94C093D5
+9A86175C46B78C65BD85BA347656778AEEBC81467970F644D32D6F2BF2A3F14A
+6B05DAE8858A02D212177F15DABAFB2961F2746D4C3176FDDB5AB9821C57C417
+0C8E0DC8B069090D8C95DCC3340643C68E5CFA60C3F41326579B869EA5D832D9
+85119A957DE314546187E8C4AD9841F42DCAE231C5FDDB483481FF29FDE695C8
+45FEC01A911F1390E3E3B80D59A30805601366FC0535E62E0CD9EAEBDE4DDEE0
+260B40C3F20D80944ADEBD496A4C82985FA55362CEF5AA91377F3E5E2C3300AA
+C24A28B5DE446EA56CE7173EA3A3983F8A39C1C04DC1117A9AD9EE90A6B0A6B8
+340651456ECDE53615252416539F5CDCC809BBEB1FD5312D83E683356670AACC
+97E95202657848F59D564FC6F4DD08792FCA977F09DBB0ECF3A57BAAC110DF24
+29AA33642650834A240116F984213A043B38FDC4922254789F951FE907B95881
+28B3CB8D33416E23168989E283ED3D01C5C17E9003676FE45C35E14DD10042EA
+F0BF9262955F512C16D95B55C2D976B6C7DCE0665C82C1DD66752A74B8FD4EB9
+4DD212B7A7A82D1BF4ECC2FDB00680D107B3074A5A0638699B86EDC52AB0875E
+CFECE6276446186B226D8ABEAA30EC5524F6A293EC01DF5EB1B8BD65A0318419
+F56652CDF1C7BA2189FA55A8BB75630F58A2270D573A2924C1A2EAF4DD3ED46D
+293711EDC9F95497CBC2BDB73C35A6D614CD8B871A29AB724F4C35CBB3E5E36F
+F2CA1079FCE485B94B0582B17E08B21165B8B0B367AD4468229996DFD88A3558
+F61AEB65C3D7B646F126C2C929ECF6BD3AC4156FFCA2D175D3DB61910F22E2DC
+D493751023913190A945A274AD2744258A3AA21C284F7EAAE53CA112EEE32E8D
+D70D543688BFEB944C697DF184161DAFA6198317774DF841E5378B44865A34F3
+C7870FC43F21B52364A0059F8660D55AA1D418CE4376F8EED12C015AD054E3DE
+623A8C6CC5278069D34FF8E0D5133B950CC5912E4EC8C3120F40D530110834CA
+E0A0C90F4432836A3C01B3D7021AE52E7F2E9796AE380979C80AC2210FDCAD6D
+65A099C762B1EA11F4FE055684CF3C449B2CD9ABCDC0FB3317BDB45EAF9707A8
+39DC9289C9F89EC6E79974B9A3FE62C3C0BA62D0EA6DEB3FCE1FF38170205011
+E76AEA346EAB416F39BF6AABED2DBEBD993520282AAA34077E2B21D5833D737F
+F92E8883D351BCE621BCF65DE21FE99467B4E3CBF022B6AE9886000212C69EB0
+8270823D46B390AAF582747D1E57BBB27F2B4461513125AC826B0181690AA46B
+0690E903DBD3FF7D23CBE2FA6FC2504342DB6797658DCEDBFD8C61D034694881
+71D7DECC437496E7E7408F465E945E28C544942CC0BCBC250D4E0AF14D9F81E7
+8D8521A893AB2DD7B456FF8F0DE426AF5F94CD626CE320AC8D2C0FB2DCBE346C
+E864950CE39F58A8EEEC66FB491B3BEF7A5ECC9F652C4560D46775E553FA3B14
+E8D88EE59D2C6C8940B4942478E6652113A7104EF9A7B7BF39BB1C85055C8647
+EA3F3EACEDC13EA0020326E111EE6CCE763B761A82853D626036DC1FC293B118
+F3054946D2123D595F452AA40E8DC325669DCBFDC3DC330932A4C4086A9D9FC0
+6A03D3B807D7FEB165869EA049BC841CB94F34FD3C00B7A355399ACDE83C51A8
+4C4506E7D670F49A5B21E249AB3E5347C17FB9AFFBD4D5423F62751DDE8BFBB0
+21967DE512591E181108649B113CC3E7319D61CF208F4E0011E79A8585532C37
+19CB1DE645A5B07C8AC0C5C55BCAC7E01F13F6544B428B6F3A7FE67509A14A35
+430CB295ECF49CB5D00DB6C14E60A164C8D8D83341AF9DD6250CCDA3845A29EE
+0BFA6D3B0820A5BDDAC9680EABF26A5EBDCE9CD54ECB820F2590BDEA36BBEB23
+F12CD662ABAC43B4096ADDFDB6E0BDD31E07D3DF37A72F0BD72DA2BDDBD756FD
+A52D351EDA9FC8B39BA1CFDABFF5B7B061E8435486ECA0ACACBC4917CDB9D4C7
+6D81CC1A9FEE75EA765B4F20F511F271B5B4E054E02CA7FF5990BAE4D271C5DA
+ED2E796B32B7015493512F81B910B5795D38DAFF64928CABBBE031E92B1C08A2
+86F2C1F68FDE286FAF7CA74C9913385D739262D5C06EF73A1C3976698F51D2D0
+F858984D2BCA7941D2181C99A7C33B65A17B6A1C02CCFDB9A23D0E3E729B85AB
+405830E2D06B2B35EB265900DDBDBE125C0F82613FF98CF49E7294F3ECF414DF
+EA84248C22A561477861EA75492743C4FB8935D446A121FD8F60AC14C61DB254
+07FBDDA07CDD853AFE99EB5B54C3F89503040DB85714CD95725D3344C5131B3A
+5330021B809B995E123E060CCDAB57183CA09E554E8145887E80EF7AF58835C7
+D6F5A4E695551D4CABDDF5E90DB51A41110BAB360EFED144A6699F00FE3023A7
+CF7AA2055BC8D55C67DE8128527AE31D9130E5EA7A07BF2067CB108127BD8C5A
+B6D325A6415EA9C20C5702A1A58725A385F69BFDAD14B6C21D2CF73A77E68713
+45DB838A412DEA0D0575D6DD2B7A1650BCAB58E5BEEAAEADA39023C2CB326512
+E8D89107960E19213BA4C18929C09C2EF5E216F2DF15FEE3D68E2D3253FF0FBD
+0B1E09E63EE47A6EEE92F79FB4D3382AE21F7C7FE24C1C5E28B6BABB761FB9D6
+6BFBB74E0A29FBF106DC542DA56E84B1DA7EF89DC9EE90B6421CD0C69FBD7850
+5C5D461310A26AD4E91563CEBD727B0E327E5DE3DCF1DC53974B5D47D21B8B6B
+A91C05685BC0AA35709BD3DBE8AA91F9ACA6A1091EF4CD5336C76543A1EBDE83
+ADA5206DA79094F67BA57B508073ED36029A5472EABADE8DD76CDC578827DE8F
+A92896430254C0A2DB513EF6A5B619880926C0039ECBED0ED9CB4EE2DDAE7B38
+39633206926DB7589EDA69A409B9F6A0E691DEB2B7EA4069C5689F1FF2B73AFD
+1EB302099183F5611D5AB1027B7D970DB28B621E67936ED0EB201A048BA1310F
+7F4401234B19FD34674B851E635A1621C15A1F4D1232ABFF7B1E145F6DD8E603
+38F1A2487B742AE67F4773B3C595A7602247DA7CB4C6F8A9963F63DC09E6A532
+BFE5F5AEC47992B8813ADD822CB3E731940A8BA3B39C01EA2A935A6BD453D655
+B1A11B3107D196A5760ED2E4E1B4C61D3EB276FFF61DB628695CC6902CC3C708
+8196E3165A0CCEAF5352D3B7555D83E6D0377C325B1224E86930040F3FF47DE6
+F5EDB77FE09A3F8D39A0783B2E8739D9D8EC76F0C846C32259C8691118E67475
+10470154D3B6B35E4C6EAE6A5898313E55DB0625A3F92E755393AD5D51E40955
+BB5373BB842E80B0EFC3C4B3783B980952E871730DFC94056E093072869C14EE
+3E722BB2801C8BDF3C0EA18C7DB3AF8EFFA64FFC28094D2EFE57DD02F4C7D576
+977D9AF960A3C79C3B3C95AA5F3FF4D9E1DD7C1E2470351296F1D2D0C68911FF
+26B3C4F5CA46BB694244554CAC720E1D1CF66F68E9E1E0502773AE3D5C317A98
+4B08881BF4D931E1D2C6FB39D8C04F4149F003C846D7EAF1474FB8CBE9E3A93A
+AF8A65A5B4ED2D2011B60C4F48FC91A030D6C6977159AA76838B6CE596A6DA92
+BE1B1D3A9C2BAB9EEC1E32D810DAED8AB3AC500BADBC03B357DF6AB8DD95FF22
+499BA619627A9BE8F803F331C95AA64A1FEF457C96012068637F7DB1AA4A2B43
+17285FE41B2109E3CB752413933E04292449CAA9DF8502E55C808BC2DF3F2B1E
+0F0167D66371E6FDE932B77C478BE64124158C7D3EB2AEB7C1138C51F9BBE4BC
+27DFC04D1C87B422709024AE639FFE87EBC03AF0AABDEA9A836EF77CFA0F60E3
+EF2FD1967D178827C85ED92D08F44642EE15D547DE067DF3F432FB557BA6D162
+3F3575BB854DA9FE02C7C4E06A75AF13A4924D144C3A91FFCE9BC2FC878259F1
+7C4051FAC31F1FF13A2D088C72F3B1EB03618B2D0E620759C1DD37D171EAE046
+5A51AFAD8ED2A7A18FEF4B4A16AC12CD92233007E2C48FAEEB1501A3F82AAC62
+FA3A83A70653EB36D237C23B37B1E2A549C50C9D51DF8A737E422ABA9C1CE63F
+862BB06BC0134FC43658008E3F5D40C55FE92AABDE7B3AE6546AC1C37D2BE0AE
+6C870FB22D5A744126A34AA7F426CF2E74F3F7443373615FA9A530BE5B4A57C3
+8E650A8B155FF8620F458F0CD87841A4F41587578F5A420D7CE90C6449BBD6D8
+0BCBD039A4A03E6CE6E02B2D31F544DED20D9BB03A1E50D6CA679011844C452B
+96CDD80B67CC95C6B760A2A59A74FE37695ACD1673AC17ACA5F27AECAF921931
+47C905266992CE1E53677854D6111E787550717D74C93AC6C9DCD8F559AAA559
+1ABD98B9B1956E4CBEB9CEC3A1BC1AE6C45106A6BC2D86216DBBD7F953E5B271
+465D5DB891CF5571745CF32CFE0A52526B8215DD9F165D7A53820F1E089DF84B
+2EACF3C25DD708843DB319888186D4279DAF34DBC50FA97E4EA0D3F297578140
+5267C8EE6AFBA8C1598B4263100DF52D3897010A429BC15498C9F9C181542201
+488922DA2077CD26BBC5477430B2F06C629A2E720632D6812E3A606A650CD38E
+BC8828E1E37395FE0283B71451A0E94E16D8CC642AE498A191E7135C383F7742
+57200F56FCA40362072E3DE4957842C710AEFCB4F8830C4912EA5032E8EECDB2
+4C1CA969FFBDF37966A782DC92A0C8D1D9024A7F6131C1CEB3B458A8EB69C008
+9319C05A1AEFDE3BB663FB9174B94FEED60F6D914DAB5029DAF2F3A8131CD499
+5A74469662E126B9B000D5EC348452DE795677ABAB9089FDEB1B27B2E2E5E4F1
+B31E25B11D4B4C4E73499070249B16C0344FFBA87CD10A44A1E9E9F2962CC186
+78739D31823C2DE468D1FBB9849CC92F18B5FBE9DD385576A54215DF9339D5B8
+3AB66E902E43732750DA2F57F9F6C928C84E1B6ED12FBEADAFCC659E571F7D8D
+2B9121C134EB9FEE6FAF9C46D29AC24EB5592C9EEC5BF4140E8BBAF20422E47F
+A16A7BD43A6DA305A9FEC0A4BF7237AE50572766B27A0A2A4AAD47465B50D487
+BF9FC09B1680AAF48203C0C0
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMMI10
+%!PS-AdobeFont-1.1: CMMI10 1.100
+%%CreationDate: 1996 Jul 23 07:53:57
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.100) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMMI10) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle -14.04 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMMI10 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 58 /period put
+readonly def
+/FontBBox{-32 -250 1048 750}readonly def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE
+3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B
+532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470
+B72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B
+986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE
+D919C2DDD26BDC0D99398B9F4D03D5993DFC0930297866E1CD0A319B6B1FD958
+9E394A533A081C36D456A09920001A3D2199583EB9B84B4DEE08E3D12939E321
+990CD249827D9648574955F61BAAA11263A91B6C3D47A5190165B0C25ABF6D3E
+6EC187E4B05182126BB0D0323D943170B795255260F9FD25F2248D04F45DFBFB
+DEF7FF8B19BFEF637B210018AE02572B389B3F76282BEB29CC301905D388C721
+59616893E774413F48DE0B408BC66DCE3FE17CB9F84D205839D58014D6A88823
+D9320AE93AF96D97A02C4D5A2BB2B8C7925C4578003959C46E3CE1A2F0EAC4BF
+8B9B325E46435BDE60BC54D72BC8ACB5C0A34413AC87045DC7B84646A324B808
+6FD8E34217213E131C3B1510415CE45420688ED9C1D27890EC68BD7C1235FAF9
+1DAB3A369DD2FC3BE5CF9655C7B7EDA7361D7E05E5831B6B8E2EEC542A7B38EE
+03BE4BAC6079D038ACB3C7C916279764547C2D51976BABA94BA9866D79F13909
+95AA39B0F03103A07CBDF441B8C5669F729020AF284B7FF52A29C6255FCAACF1
+74109050FBA2602E72593FBCBFC26E726EE4AEF97B7632BC4F5F353B5C67FED2
+3EA752A4A57B8F7FEFF1D7341D895F0A3A0BE1D8E3391970457A967EFF84F6D8
+47750B1145B8CC5BD96EE7AA99DDC9E06939E383BDA41175233D58AD263EBF19
+AFC0E2F840512D321166547B306C592B8A01E1FA2564B9A26DAC14256414E4C8
+42616728D918C74D13C349F4186EC7B9708B86467425A6FDB3A396562F7EE4D8
+40B43621744CF8A23A6E532649B66C2A0002DD04F8F39618E4F572819DD34837
+B5A08E643FDCA1505AF6A1FA3DDFD1FA758013CAED8ACDDBBB334D664DFF5B53
+9560176676ABB71BBD0EE56B4CC492C0652750227CEC6CBEEE374709231B00CD
+0DE83AFDE295B314F6C8B1FFD32251C1925D96A64D739FF1DA4926460B28B3DE
+E949AA0BA3DDB16534FBA30C32092D5F712B5E8C8D5142F35AF2906E6C219D2C
+7FD9A368C193E0EB9C7E25FF03C546B6ED993F964CEDB1B8537C617170787F37
+88D6F2AD02384B01067FE3F98257BAB958BB3BCD1001090A4502DA0638080EC6
+DB784CC8AC37CDC01B29BC481D6A05ADC6188785262358C1BF1D694BBF31C1F1
+AF117C1ACED44AAC6EB4B9A2511A6762DDE8FCCBA5
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMMI12
+%!PS-AdobeFont-1.1: CMMI12 1.100
+%%CreationDate: 1996 Jul 27 08:57:55
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.100) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMMI12) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle -14.04 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMMI12 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 58 /period put
+readonly def
+/FontBBox{-30 -250 1026 750}readonly def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE
+3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B
+532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470
+B72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B
+986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE
+D919C2DDD26BDC0D99398B9F4D03D6A8F05B47AF95EF28A9C561DBDC98C47CF5
+5250011D19E9366EB6FD153D3A100CAA6212E3D5D93990737F8D326D347B7EDC
+4391C9DF440285B8FC159D0E98D4258FC57892DCC57F7903449E07914FBE9E67
+3C15C2153C061EB541F66C11E7EE77D5D77C0B11E1AC55101DA976CCACAB6993
+EED1406FBB7FF30EAC9E90B90B2AF4EC7C273CA32F11A5C1426FF641B4A2FB2F
+4E68635C93DB835737567FAF8471CBC05078DCD4E40E25A2F4E5AF46C234CF59
+2A1CE8F39E1BA1B2A594355637E474167EAD4D97D51AF0A899B44387E1FD933A
+323AFDA6BA740534A510B4705C0A15647AFBF3E53A82BF320DD96753639BE49C
+2F79A1988863EF977B800C9DB5B42039C23EB86953713F730E03EA22FF7BB2C1
+D97D33FD77B1BDCC2A60B12CF7805CFC90C5B914C0F30A673DF9587F93E47CEA
+5932DD1930560C4F0D97547BCD805D6D854455B13A4D7382A22F562D7C55041F
+0FD294BDAA1834820F894265A667E5C97D95FF152531EF97258F56374502865D
+A1E7C0C5FB7C6FB7D3C43FEB3431095A59FBF6F61CEC6D6DEE09F4EB0FD70D77
+2A8B0A4984C6120293F6B947944BE23259F6EB64303D627353163B6505FC8A60
+00681F7A3968B6CBB49E0420A691258F5E7B07B417157803FCBE9B9FB1F80FD8
+CA0DA1186446DD565542BCCC7D339A1EB34C7F49246E8D72E987EB477C6DB757
+99AF86CEBCD7605C487A00CD2CD093098182DC57B20D78ECE0BECF3A0BF88EBA
+C866DB19F34BBBED6634AFC0F08D2AFB2A92578A6F8B4ADCD6594737FF6EED7D
+5B536DA9E3E2CADB40DB7C600EA4D100D33C3B92B1CF857E012C4EB370BA8295
+55B50047CC8911C98FE1A7BA6CDEA82D34476286E710776823690AD333DD3A49
+335002F4680DBE1C21174BF016B0DF799B01EB9D6988479A8334BBA2F8DC7146
+BC0DAE9DE3A6453B181808E68A89E0C02DAC6264D002B422EBC1CF14F65D9888
+15EE6D514D3457F7F3C6A3D17EE1DA076F73ECC392D349174DA9E4680F29CE10
+0157E42CA35F5DBFF56BFC3AA07E61A78DBE882C5AB388220C19750D3643E7C8
+23D6673027CE568A4ACCE1D12B1D9E5A43507F4AF9BC873237F65A6B95078DD2
+378007CF0F0DE7CCEF760E19D6D1D7B412EC5D4972
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMSY10
+%!PS-AdobeFont-1.1: CMSY10 1.0
+%%CreationDate: 1991 Aug 15 07:20:57
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.0) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMSY10) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle -14.035 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMSY10 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 0 /minus put
+dup 13 /circlecopyrt put
+dup 15 /bullet put
+dup 33 /arrowright put
+dup 55 /mapsto put
+readonly def
+/FontBBox{-29 -960 1116 775}readonly def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA052F09F9C8ADE9D907C058B87E9B6964
+7D53359E51216774A4EAA1E2B58EC3176BD1184A633B951372B4198D4E8C5EF4
+A213ACB58AA0A658908035BF2ED8531779838A960DFE2B27EA49C37156989C85
+E21B3ABF72E39A89232CD9F4237FC80C9E64E8425AA3BEF7DED60B122A52922A
+221A37D9A807DD01161779DDE7D31FF2B87F97C73D63EECDDA4C49501773468A
+27D1663E0B62F461F6E40A5D6676D1D12B51E641C1D4E8E2771864FC104F8CBF
+5B78EC1D88228725F1C453A678F58A7E1B7BD7CA700717D288EB8DA1F57C4F09
+0ABF1D42C5DDD0C384C7E22F8F8047BE1D4C1CC8E33368FB1AC82B4E96146730
+DE3302B2E6B819CB6AE455B1AF3187FFE8071AA57EF8A6616B9CB7941D44EC7A
+71A7BB3DF755178D7D2E4BB69859EFA4BBC30BD6BB1531133FD4D9438FF99F09
+4ECC068A324D75B5F696B8688EEB2F17E5ED34CCD6D047A4E3806D000C199D7C
+515DB70A8D4F6146FE068DC1E5DE8BC57033D79919697C81395D5B94C3AAAB11
+52D73937B8F82D3E2E764DA1B3BE273CBB84E4B1919CC1D5586C21F6FC23BF1D
+82DE5A8DFA3E8F5C25622AAB9F7A588532D13C663079C8FB84DA6BD4D2DEDB2F
+84CE30D0F188EEA26BAA650B1AA18C7D241CC179AE82933C45A82BD57808E2D8
+032E1ABA37E4FD8E27AF35326011B8BD7FCA4EA71B5FDB60F7D63D0874B77656
+F289B324BE95E33A9B732669966C96E64C4840A8EDE39410E6F6F0F027063530
+B760AECC1594FED97FDAF84016D6D7CD8358E062040143593FD734B7EBEF810C
+6B1B941E0676910D0A04466C27EB62523967DA65748264D137D8ED841E3D36A8
+06761884C9AC0DE7C88FBA06B933E311EC28B17428C69C796E3F14C6E7CF97E7
+9FF2559E5D1F9EA00554A5995096075ED8901E2F45E76B2C5566E947E41294B5
+9BC17D2F1AB2C577F2710540F7235BB4569D2FEE06C8E45C8A1C0BDCA78A43D5
+7A687297D36E269B9EC59754EDB5DE481018BA228AEC200DD877D3E5DA7159C6
+50F4D7348BA64508F84DAF7FCF01B8C5ABFBE5861D4B32F9E32C7C4B2B6EA064
+F179E8F62E3A59DC65FB475A3DB61C36E43AB3EEF286A50FD5F57277747CB7B7
+78284143B3F0196437A1DEC9E61454F80C6720D8008EB945799236677E7FA331
+E091CD5D924C48EF02DEB2B54D8EE02897C481C815C24F15A7548E2ED908E3DE
+3763983CE2ED0A86B6BB97B4626F1AAFFAFF27CEF18947AF2EB40D7124A122C7
+6A6ED9E0528A29F7A238DB73B95869018D40674CEDB9A993B6C117FADE48A8C5
+C6ADAE4960C0D56F3E30ACB38CA8AA8443166BCFF6A5FC2177C6836859CDE55B
+E0F1E80605C8670AC34DC8E8586ACA6E1CECE99C53A42C5730
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMSL10
+%!PS-AdobeFont-1.1: CMSL10 1.0
+%%CreationDate: 1991 Aug 20 16:40:20
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.0) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMSL10) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle -9.46 def
+/isFixedPitch false def
+end readonly def
+/FontName /CMSL10 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 11 /ff put
+dup 12 /fi put
+dup 14 /ffi put
+dup 42 /asterisk put
+dup 45 /hyphen put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 87 /W put
+dup 88 /X put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+readonly def
+/FontBBox{-62 -250 1123 750}readonly def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA0529731C99A784CCBE85B4993B2EEBDE
+3B12D472B7CF54651EF21185116A69AB1096ED4BAD2F646635E019B6417CC77B
+532F85D811C70D1429A19A5307EF63EB5C5E02C89FC6C20F6D9D89E7D91FE470
+B72BEFDA23F5DF76BE05AF4CE93137A219ED8A04A9D7D6FDF37E6B7FCDE0D90B
+986423E5960A5D9FBB4C956556E8DF90CBFAEC476FA36FD9A5C8175C9AF513FE
+D919C2DDD26BDC0D99398B9F4D03D5993DFC0930297866E1CD0A319B6B1FD958
+9429B9D40924DC059325D9D4CC0344F3F997A99E6CC0676735EBCD685AAC9142
+08DAFEC78BB41AFC2F1C219910BDF41D6279284EF600B69776CA15BC8A34347C
+30783C52AFA60FBE3E353E2AE354CF87B558776A22C776C7A0B5AB5CE1F941EF
+C2D9CAC37294BF407A671F10E4743BF842143F4F7DFEE643BA3BBD8BB9E3F24A
+BCCF7F0ADF8BA500620C81033EAE8C4EF2C1DEF13AC575F1B3BBB66F093D3B78
+5412B82B67FFA087AF57182B2230F9F2137180CA58A7D9B2C822FF04BE6CD01D
+43B2CA7058C7B953F6D9B5D6E91ECBAA5CDE1159B0E59C83DBAD96D6C8C8BAB1
+374EF652D10C0F3EE7104472C98DD3572AAF2D45A70BF7061447E21EE3C3BF23
+DF39C2D1B35B42CD5297BEBE6BC94F7C9DC6E61EC67E4F677256FED9064BD3E4
+B51A71B1D27CA4E5AA9E1D8080E6DAB5310711EEF87C40859FA935B19524AE83
+63B163FA8397BDFF443227FEDF7DB27DC35D89FB1C5E435DA0619A5C88AFC73B
+89A2DF5E767C5B536BC7167A840A0C32BD57A14DE69A7D0D819AC36FF32F908A
+5070F32983BB007437E3500799DF5E0AD3710A4C0000F0098D5BE99F2EB9C1C2
+C444FD9552D0DCA098A94B3BF176F511CEE13DB7EFFAED7C47B5ADCF8D4700F5
+7A5FD1B49560969BF5C44F3749370663A04776F749DDD7B50674D93254426C4B
+EFE264BEE7810EC93784B7C01A7F29EFD92547E13A2C7851A2E709FBD5B87850
+4A44F08F56A542DBE072D2FBC58D9E6468E1AB858DC35240E30D31C7AC13D6C5
+7D2BB634BEE96FA0E10F842B11A789F72A333DD6DDCB1BC23227EBC406E50B40
+30AF0C48E6359AB0C46898CDAF1118E46BFF8B00F54EACBC2AC262AB898C42B9
+2E080C10DE923C195ED0A46BD535972F0A59D3977A0C4E4C413050044C486CCE
+9413D853E3FDF83C84B0A7E5FC5AA859BD382DC2D94780F2B9FACCDD437183AF
+E656EDA4147CB501BC39013529A953D6D78F640BD51EE6D1526D1D27F2538715
+2BFA7F33FC8CE7A1B811D7E4251EE8C0640097D655F9EBB15102F85DAFFAB797
+0E07D701E1BA93C6196EDE47DCF0491F102A3ADD983898E72900D1398033A2C1
+CB464B9EE9A47E7DE97F7D4ED4E99530C9A770F43EA6FFCBA27C41B4668C6047
+FD5DCECE8899E1603D3DEB282DFBEB30C8040E7EAAB83B8E78B2F7F61B7E8A77
+4C544F5ED83E5056EED08C1A29221D05A4949A0AD635D9C930F7FE8601D74FA5
+33B2F4FD4C29FAE4346FE914B123BA9CF5BA732FC430A128EDE270E3C60BD7AF
+CF54674799A0DC1C214E10BA5511B29813AF2E3768AE494D240EC647D9851CB2
+EC38976C6D8763F8C413B8CBFCF8EDD0FAE02F72C6366F5CEC2715BB7C90440F
+2D7BB30CD1F107CB2340075D2A0D9D4114D644A09003403685A7D466CF47362A
+B3187106FB1E2B32D7FE26F9231BE1AA87C8556A5421528BF5FC0478AC567DDF
+EC95E6151FB92C7986631F641E23CA968DBDDC42A5880B89CCC00F09B82ABF41
+F72B2F9F28806308176EA7081DAC3DE89BC389FBC54E60D2C6B666F18562BA0E
+32B5906EF1C2B6A31FE0946E648C73142ADB3136E7D2BE4BCC42E08DE3A5F02C
+4B8575B1A296F04735C0F30C32D3DB7423FBFE682109815234C88BE292C8F313
+F667207D842DE2052A8D3701AE71C44F6C4788AA08A967D66270C5EA7DDB61C7
+56D7BCBD106F1CF4EA7BC3A532CE23E29368899E7DE2175C4EB20802FAD3E840
+FD7B7B9956777195B646FCA2E5F4ABA05940E269858FDF5CBD236269C9FB0621
+C8224C63BC120EC8B8ECB643468C468CECAD06EA59C1CC6131F8091ECDD0D23A
+419DA3F684B229B64CADEF0AD3314C91186EC445B596FD398F41880FECC56453
+6459474EAD902F020B750E99DE425498DB3ABFCEF48305FF9B0C412ACE5363C2
+75EEA02FC8395179DF95E2A257E273F07CB0B899EC5E5AC093C9EEC345F6FA2E
+AF7A6FF8AC2786F25DFA834FDF023B1DA2C4301D807999010C5EFF3DEE1EEBD9
+F4D888F285847810A3DA48BE7B63D23D432231E1C3FD7D7F249A68DB43C0B439
+6EB0ACCE9083508830ED8BA1D9DC575938B07F07D9DAABA164281A09C7D00FDC
+78DB17CF89185DFF736892A6741CAF6B3864E92E7DE32A677E64B10C9765F925
+CFF01D76799957C8E2A4789CF754E9352C4957520A1D5303E4DFC850A5918A9D
+B90735BED913175122AAA4426917ABE09DC19218EABDE6FEF861669F60819DBF
+6A76690FE9C9CD86851FE1D1AAD0219178779037A3C0C66589ACDDB712CD236F
+DDC950DC13E099B747F7892B0B2DAB00161BA35240DD4CAE298B0EEAE5A4A2E5
+4DB38F070F3985205B2391FEDC8AF24256323A68AF8FD7A62BBA1A2F702F5402
+4EDC17889993E0D56817E6D2AE1469180286651F6C6643770D0251C8626A2A6E
+2CC25B87A3A520335B2AB1544807683BD52C3B8C3DAE7AD46077BC08E91D0701
+387312C9481A4CE788A11DF9E94A5700EA62581EC3BC2D0DDC709ADF5ED14CD2
+6B23D4480BFFD15828AA39A5E6A9BD9ED07C03F3B9528FEC1328AC1B35B5A1EA
+C0BBAB5E5ACEDE99FF0099625897168374623C391A76441CCB7ADA5B458D0EFA
+B829328D3A34C297BC605B3979C7110C90FA41295C25F84616A8F79A31B4E6D5
+B6F443022FB9F3AE6A0C23DC97F1811F50E38C254126EC2B9DD3992A6F61DED7
+02C3535B414C33DA24D5F172A6B34AA29336AB5AD10EDE4DBCDF08574BAFCAB2
+25D741156747BA56BF1069EDF0EF8AEF00C0B98860E8928DD5FA7600B2068188
+CF933C1C23DE74BDA86B3680D1E81401FE2FFF2905DDB015ED31F68F57BFF691
+DBBD798632E85A68477BAA42755C34A14D063059F88F411A0FDF0DFADFDC2F7F
+B77353A472CFF8B6C420C535288CB18B0B0CEE480DAB9A767F2F6C7C427310A9
+BB1FCBC48C194E91855E54CA50C1EEF64B1BE0F7C8CEE9E1EB620902FA40DE3E
+96F962F6E38B2C64BB774F45BA51986434C8E25716EC38E320D0914F68645DCF
+67454133BBFDD4AFFF0A8ADB82E9730F94B17964A5E8A4FC1D630D4C7A9CE970
+82C0B79D4E4B98CB3E173175CF1DDBD28A47FB67BAE582F9D072C1EA0B5A2B42
+988B173EFC21F67BE388BD8C9D1D83D4752DD5A6CC8DA57A86BEC2FE2B1E269C
+DBEAED127C4526C27FD349564F988DAF675C80E491162FDD7BCEBD7F3B13153C
+2AFD7F9D5CE941C6FCB0E585FF99D5706B3B90E630CF4985BD5CAE567CE919EB
+2DF4C66A7F366F68009E80373C0A9C386C1D30CE77A112C2BC3C59A2EBE50225
+75B58ADCB776094FCCA56C3892D8FE0911361D3FB581A7F2B2DFCA79042BE3A5
+80AFA160903B86CD46C65BC4BD9487928B06F6E387E8069AFFE9B2F784C0F722
+53E3FAE45E96D993999645621D2633035DF829279F51E25161A7A48317C904EF
+264642205EF3D61840425EDDF9B5B80D5F66D642F7C393CACEBC8DF6838E074F
+FB1FEDE41F42726CFBCC96B5BEF17EC26B27EF29087A163F40E3A1A777D4352E
+7E4E389F0685FDF4A6ACB6C88D997250104A35E879A0C0203BFC3BA7AE49AFCB
+3E8DFE3ACCC3F4A7364514AC94346332EFF06D7199CC29F017D9A21AB8731ECD
+1E01E0CC9B503C58A7093B2FE69282AAAF604849D7B916B477673CEB81C37AD7
+65B3CE3EA27E158868CF723F803409E48EE3B5B68D5116ED1276C95FA12C46F1
+EF8633329220C07A6C5830EF35E5F510F50A762EC69C0C4464175A7F8556860A
+1D8C0CA834721A33CAF6CDAFD6658B8E0FFE72369B355AD2A854D6DF4D5E2922
+EDB5DDB055ED9E349AA71B211A6C07ABD6A9184CAD668AE16F0DE68D7ABDAC6E
+1AD0A61EE9864500045F0F033303BBA2879BE36D4A52AEAF51CC1377A85D326D
+424E03664C527F74CD4466987C232AAA468048E5B517B79E4276EFE4B9B881AC
+E9BEC15016A207F3B270507EA8477A8F97E8E8B108733B4DC48505F14E93B75D
+1AEB210FA5E55F8C6EA04AA441A385E336B9FCB337C53261659A7AE9F69489B0
+E4B38ADE248B90043A6EB0DFA3795DD111931CE6462CACAD0B69B185E627B156
+960F46F9031790770D6A8BD3FC3F535CE85FDA7E27629AA14B3D97DE676EB440
+DE7ABD25EE41CC51BEC18F707D35DAD24662EA4EEAC59FA0A8F8AE09CED2653B
+013226BFFB578ABD5E2341759B229CA9D1882465784D5BCD351E3884620D0A9F
+075F1EA689A99C7F24878E8F79ED2AE6A8536F9D1BA1C07A2DC05807C438CA44
+F3E9708C877AB2BDD3F6467C39419606083598F1BD22DEDE6CDECEA07A838249
+1D289F98A1108574C5F13B25E2545B7146CD9AF5D11BA3DB3140EFCC7365C143
+DE5C87525122EC71BD00E3ABF2939DA6BCE4EE64C4B56271B393F3CB00413620
+B4AB8AA010B38FF264E76A5E74F1EBAD812BF9E7E0188F3308D85434360F124F
+8E9B24133BB853F4E64D973254E304BE6EAD60E2343DD994E61C26C496B4517E
+69F577D13817EB375933FD3FA53C9A1BF02A89CDFC00296E2A2D2689CC850088
+73E181933D90A88078AB76EF5C50598AFC12CEEF15A2BFE3C87B773B7FF1B8DC
+3F9A8D68908615F621BB695C57215308F69C069C24433349DFF17E8CA7273691
+845DE5B2B736CECA05A5BA8B3B61C04305C5CFB5E089FD4A8B9E6BAE31C4C5FF
+A84FBCB040C72A8D453BE0B263B223A8A9D1B74AA175F9AE02F2F4C34BA87263
+830A03CF5D34E060ED148221E3C617D1D4C70003EA05623C4C1F2082DC633E79
+A1E9D57A4AC834BFED02856B32DC13A39F39139D59F9637B8470C944D03A8D97
+DF61859A53954B7DED4738BFB91165EC60A44BB69D607AC6B70F592224121960
+E56BE9A190DFEC3F07EE60AC62AB28678F8DCB6A77CCF44B153789AFDB28CBBE
+BB99798FA478CEBF9C1BEDE10DCC704FC3FA0280EEABB6E909056242B7A2E193
+DCE348EC8587CF15D40C219251DAEA07854234A9EC835190EFD1CC69B3C7EC82
+AE57FEE324AA2F1A45EA3BDE5F60E1A232270C2105D57D3845A48837DFD389E1
+02293DC23B6E76AD95282017E91E7042D9734D82D46E3DBEE0CC790F4052E008
+B3792AD9822B94CC445AA1C9185466DD7D28A0F7D6A33D727A485F24E709DB18
+86AA1A798CC7758BE528C4300BA560FB89AD49AD57961E96799A1B31DEA2C715
+4E804BE9396A1AE54C7549E73B2ED2F548B042D8DED2B7C7BAA049C7D120149A
+A90B7D458D15B8DA6F533CCDF7E82D64A7E0CDEDC2D281D6B7E470D93849CF17
+2A579C3403F6FD16EF49C6F136449EED08BAFC1E0D03CBA37B4765BCA1F26699
+17E542001E2614D83877E37EBAD25029B97B94AC1586BC42A0A0C49066708051
+0DBD7B46D45A02E2FDD9F2FEFC8B1217811A3BE709F392AAA03D2F7EAEC828C3
+3C5EE95A5E273702A176ABB4B2C4BA48EE7F16348F650D426BC71C3EB740323A
+A8BEF22F6EBAADB73AD4C9883557AB33451A89DFBE25CA6C184A3C37F058C3A5
+4C6EFDA4E2B0354845CC6A38293891891FEF286712171E56FBD8B7A9EBFFF47E
+FBD889E1EA7D08F7A06BAF9CD988773FCD4DAE43FC6A9F80F1D6A56E550CF799
+3BBAEE0303933E02D1427A5842C9272D3D0A0ED94ECEAA9B82E81EDC54560F8F
+2A4C0D28B3264EA640491E24D3F7165A17725C28A6F153C742D01C7E95C79C1E
+8229B8183B8C10F00DF68899914534C58E2DFBF7087D7B6A3A4BF875F5A754C3
+B4B8713DC4EB1682B84151887B8461EE05A0C9FFD6F619B83444BA9ECE1D0C7B
+D17E96315220F7C341194994375CEA1AC7C061D9E7700B6B30B5F15A6A2A61E4
+25E6C3D0B1E13BCBE7FB89C24327AF46AC62B2EE332348B55D9E6D599D9FBD79
+E64E8BA6C960A598600EAEB080E08A0D9AF13FBC60218A9FB400D5CF3507DD38
+FE41BFBB0594F43F10EAE9CF159097226DE7706F34871A76661B6CB9EC1127DC
+09651E98E34D3ECA5BA7D695B27645AC8C16364CA380D45524D700A460051B62
+A69ED221BDA45051C1723796A305A3A7C85A62F5DFF7F7ED690DEE4C0BE2571A
+155ADB8BF7DD4E6B31AAD3D884337C1A2F99FAA44BFDA357966C77C35A435411
+2AF36766DC0BBEF0B50B742A9C9E8541C58AD964B26C47BED17B5BDD9C5520F5
+947E4B8017AFFF9FDD3BF15B2DDA6CD750E09222A3DF1D9ECE2AA6E22CC5FCD4
+C6746E58BD628558A7157B72F6370507AB0596FD4F4821A800A358BE7B62C7FD
+92131D308957E99FE4408ECDC0F48F5C747680992721F9D96B41B956C14F8E13
+FB260376C508F88D30355C94D0208D419F81019EE01A114E20EC2438C3894C79
+62096B4A5F6288116308FB98EB0DDADDB259205A11C56C6AC6C5E1C8FF45A25A
+F16596B76397BF54C3DBD0ACA1599AC886415E46EF99FD15C9218125CF0426CC
+B6B5BC60C0A14CFD116DCDCC3CE7DA6962B972AE23BCBDC5F283A807A63C1C8C
+9EDC5D95CBED7A9E1D63876A55C7A8878DBE0C66FAF5E7A680416840156FC63D
+FD8FD7FD12F32245B3084FC3532F3883DEEEFD52325439EDADE56EC1B4845CCB
+282FA0EDBC405ED2FC3B01FC93D1ABF06B64B2EF4D6FE40B6BC91D7540BDC5EB
+F3681BA084FE84FA153E8E11442A7840C6F7FEF98E346601A67885B3B0AE2EF2
+E3703ED14AB786488C48CD937E9DE8B666CD25DFC9AA9351338605D653BA6EC8
+16A18D7181B2DB084BB1D3E75C84D8CD3533EB35F150F006C6047BFCABDE14EA
+32FE9A0C1BACCBBAB3F6595E1D11D279A34CE66D0BDC09764436A23BAFC467E7
+A986D6947DE65B77BC8480B94E6F66F8B4D93FDB517FE1A6C2AE5FF3BDA37919
+6F34C72EDBD09CDA95D751CB5ADD93B422E98560EA03AFE810E1435490C19405
+C534026D001C4E2A86EFA7F342E3967059BE771E728361AA77E8C2F497442E24
+AB938CBA02C5FD0561A601BBA8AE96E8232212DB222C202C1AB4B4EDB4494CA2
+77221C9EE7810640B730DD31FFF60F2A05DB7FB80577A48513BB9A76B262EC6B
+751157FA65B47B7CE97D61DC0161877F89210EF3C9A8CEC5DBC5EDA5B9A8770D
+7643300C9C3A5D00F0FA18BCBED0295833612A57246D8184975ADF14D84C32F4
+BBF15E6BEBDA45A2E8BBA461D53C090C25BF7FD351CBF69CC904EEEF8D7802D5
+D14A4EBE6804075D2F742384749150174603F14519BAC00B220E83F7309D15BF
+12A0DC08230DBE23EF40048A77ED17D9F931C817F780C67E59ECFEA62FD4D8E9
+DEB4D1A8D28643C4E476AFB2F86FE8E5C353F08B9D0F0C10035B1737A7D51F4A
+6141D0000F04113A7FD710DFEAA16CED294E5AFC3856BB243E2A676794DE99EF
+660C4B522E5A4EDAD43C3A0A359B4B34AA9A59A6E2D4E5217553B790ADF45A9A
+7636529EF840879F18A34C3C2D5207B4D14C59E264A6415F142A7C0294597D64
+D02A28F126E774A31604FCC671E1BC0FF681082B2818792A60DAE56FFEDEE3B7
+6EA7A834D088E6D10B1673F3250D229F1BF59CE4D0AE3376E6FD99D883B2ED03
+71B72A3F679A5DBD76BD2FF6C04435D14364C4A61AFBC0D5B31E48BC631C0545
+DD3C1C0FBF3123EC3944C404D37398D05BE3756848E59FA54EE7C34D0D5382D8
+74DB6A6E70C7A5AAEC7B941B4F5D800B226D8976473FDABB34FDBFF2C6016FBC
+5E34BAA392A29B7CA9F667D609EA7A391C6067566631FA910BF17DDC0CE56F37
+A2E6A22228A4A0AE138924F09275921C8DA60D818AAB8C2B06108DCB9A85D6B9
+DF6BF40ED6E86DEC75A2DB917E605C1735D5896F29D762C77AC212994AA2F9D3
+96857C5A2F3E86FBE7E34F34D8E0CAB1024AAF59699844CECB49D7A429F4BD02
+5567416D4D0152C3D0B6B77D7104B20EE19EDB264DF437E51F4BD92D21873FBF
+3D35B2EFCDC5F146491099BCBD3B381AEE555FC25A7B0713FFB082389975552A
+825B8762D630B204B99D97E0F0062B358E1E443D65CD8DF3CF8284CF38066DEF
+3F130A06CCEA592955EA05F416E0F67AEEB690D626728426BA54BC4C4083CBD0
+F3F9A0E7EBF3B1489C019F7A29FA78F77D8A96251B66D73C7C858E2B7AA768C0
+31CCD34792D6D093643502BCB4453C3D5DEA5B577EF92D3EDAA22E90827F3573
+A811FF5C5F6697AB88C42291498BC348F4102BFBE007D68092C0057DD8576A9B
+5BD032CF7196103028156CDFEA122F9A7101F0DFB1C73D3B5605A73C1B335EC8
+7DA6B4CD39E976F7DB91CDA187B1CB4E4338F7C72873F24D5C02934BDFDA019A
+69FAD10C96BD82D12D07A2EF76D86C3082E1D68B0A4462D0635A8F15245EBDA4
+4EDBC69D510B12637F02ACEB3A1DF278C4055B98D77ECFF82BDDBEF4C5AFE2B0
+B88A9EB5333AE842093A80E2064BD36D5D81AAB9D80CAA04B55943FF5A1DDE94
+CF3CA32648BDCFAAC88E72CD3ACE65C880FD8BB75B11A8A6ED351524E1DA35F3
+13466B349A3E4CEEF0C1160B1F95643B500A171B33ADE7D55F4EEE1934952333
+2CBD044D07A12985D93FE51C93EC8F629DC423458C1B631A7364E17B07E89C40
+256DEF8A88897ACA388014A2C6969ACB9B3AE6925B4B4543BC924061EDCF86E7
+F51F447A7FB62E03A05EA6FA2DA1CD76615680FE009621148647C7C74E4BC6E0
+B34B356A3CB8947E0F775AE6079FC4594F39A4B8218E5D27DDA4583D9D5BAF07
+009CA08E3E08E407D0AA9EE80E3B0B049F37DC38FE8F7FD055CE316D72A6993D
+60CAAB09DB8A899E5EBD8AF11BBB8B2EA8E644D2B6CB4D9EED9266EDDC3A7ECC
+FBEBADD9506987DE2945A65D027DE828D5A12FB0D6AEF5D6A2035421DB46313A
+9CB95EEABB6F5A87013C3F3130DB32B3D955D22C9F3095A19715D341FD118259
+C661FC30E9D781B32396A8A2EA06122045D98EC5FCC6CFE11AF9B2A2FBBC99CE
+45925EDE91D6A964B68EE20032B96A71B48DACDBFC145B6F6DEA7F011DD7B246
+D9DBC3CC6B1EB35F471FFC463E8444F1E1CE43D3D41A113D9601C12FDD755E34
+86B8202134691C4DA22717CD3F9F958CC6E7BE20CFAE9F10EB67C0BB58E40F17
+5E3A142AE71E3619B1B61F706F611496EF29DC07111BEAFCF4D2979D39660C0D
+05A8A2BA5D2E0BBE2F522B6BA0A39B27AFB2FD2DD4666A0F895F49F7833C2661
+88D28BFD7522A9CE8EA109E1B8273A1295F4982907109518E82A156A9C4D7F27
+9B7EA2CAD89D22A3D56637D5427AEDEDA98A6D9257B419D761C8AC925B61C93D
+5E4C47DA6EFCC66A6A4D3B7FC1DF27C6F5C7919E34E9E7CA982C0D40C5D53F0D
+0A09C57FF29657A7FA230102C9487A8D68F93F278BFF94E6CFE8E5E3BA38A082
+744F9D018A6D7452D2BF0D06BB61D72F7767A4E9936DDB660C8CA18468262471
+3C81A68BCC375326C935B90D02F80B704F479DD7F030B089685F091B3144E794
+11D284BF2B8502964E4F6C7B79FC2C37197D52166E377D66AD0E7D0325909D46
+E0F8A35807DFB8C8208BA672EC21188149F3155027F16A23AAEFDD2F3AD642F9
+310D631E07655AB6885C6C3882CCC8690D05D96779CC83A117D946E2F9F6521F
+B8F4458B8E01FC30CF59ACDB52DAEAD21F7B7F490D74898F2570C6FA5B4DB522
+C077FF694CBEF398F0207C708D7C3E4F8EF42FAB91ADB4CEACB592E56035DA1D
+E8C44FE37116712D588C873D8C2C51B960E97D07651D611AB133D950258F0A2A
+D8C4557DE5EC6D98E1298B71FF08B5F59C6619AEA88CEA839A16B9C810438B78
+060594A85095D525246CA31DB045C2BEEBC0B1F8262C59F9A687951AD2A1A5E1
+3049E4BC2CF76E90956DC45670A6A7A6A4A07983758BA4887552CB30DDCFDB02
+090E12B56D356EBA8E7AEED14E4EA4C36A528A7F5105A545BD9EA5BDFD1F04E6
+C65428A54A41C5977142EBEB7F49D65F1FAB9FBBC2C283EC7AAB8562047E013D
+369A009127BAE150E7822A278BB3638BDEDE5A1985DD3081F08EDE5E0EC8C4EE
+56AAA592D3EB3BAA1CFFCE3AC23854790D0B648E83E2FE3C2CF7A14ED0601761
+E5A377DD4CFAAAA59D375499CF40DFC355D344AE50DFC65E4E5AEDC0ABB48A2D
+12DCA4C33F9671CBE7CBFF6D302805F433F581B4A6B1E4537EFE9C11F8C808F1
+F9C56321C402BA29DA2BDA3D2468CF3A26276929980D53E3BED09C5D9C2FAED6
+DBF053142E82A04F618CED7F51D09C28A1885DA028F275B85D3BF5DB6D20FCAC
+6202ED88D2DFC36D642FCB236F51B4016D7380CB85FC2306D986345F8A127EB8
+E32C7118C0F77B1B668D54FC2E8A4C70A681535A5117DB2E3D9ECD1B59A476CC
+8BE712591E1135B8E05652849F3A0737EDAA98E160D39A1C83AB9E586DE2524F
+C22C5BAB3075D6198C15F9E6EC9C066B085B532B8B1ACD16EDBA42DDA0C6E2C7
+DA50A742E55A1C4B86332FC7406BEE517373BD0E5A252763DF5886F433E60A64
+7BC6B0E70FB998C448F7C2D431249B581BF20680572405853CFB5CCAA1DE68B9
+D6AB0E0FE7E0C4D9DF2444267C6428C6D5CFAE69D651651FBF84C606282B4F95
+0C81904C77350ECA5B82128A4BD281C9889912ECB461D651652986EFA8B701F1
+4B721AFE6AD536CB1968FE14D0BADCBBDF798D11F4DC6A3EF533B3BB8A236595
+B70C4A03E6E33A6D44F93FB54A63063328305D2193E012D24E4D31E62CAE4DE2
+87D59D842475522204CEBB88D08AB0DD5DF57B6F165C693DD0AD34B87F89AAA4
+9F7B7A880BC3A5DBDFD9FD9C3D3B9DA30B132CA968A216BB52434FD3FE77BA51
+A70210B1ACFD28B81BDB75F97712DF6F7297F34A59A393006A881E2B3CCC3F7B
+B39C8D6E99AAAC39B071B7F383F9E8EC407118C5DC17BEB0D737059ED7DCE758
+83EE43E0514015D490C2271FA5463B93EAEF9B3BD3C88CD74A19D9DC95660C96
+0A38B26D3B023FFDD27FF6E9D98ADDADB54825D2B555206F0E7C889DB55347DA
+9A4C9519C0C8A8D3ACDC06AB3069268BA83984376BFED1CFE3B1417845911CAC
+5428A0800146CF549EE78C263F36DDD8A04A75BFBA4534A78412B7C2B6EC47DC
+49223DB72FCDC5E88839709D704C196133A3032149AD0AE29950C8D6509F877E
+04B849B5AC09421BB33B658D30CE6E04DA1A35862043BDEAB7BC684E1A6DE8E5
+CAF33EFC866D6D075C269693690750D526B801DBAF5099A04BD3E911135B118D
+EF01207599588E25EDE475FA428E67AD93FFF63682A9B1F9ED495C7AD50EB96E
+836A965C2B27CAC71CE79170C4F56E0497F0F6CA9041E92E1D01078FC922DDD7
+3F79147EA667173AB4E64AB4E3664054547AFC2E2E1382FE059C37B352120D69
+6A15BBA8670CAE7E310B03C2A4B12FB33617C17CB9D992AFE2DB2A1BC1DA806B
+1B82DACB2C1157A8D3F5D86353C12F474078418FAE22EB4213FBDFED904F0156
+C17A9C5205DE359694C899E992E40C2B54A565F4777C0147E864F25FD4C487ED
+6CB1C1BDD93702AEBC7278FD7E62A79A28F7E3A16E763F154471E001D21D4FE3
+2FD8ACBBCF301995528042E861A9830ACACB99669EABA851FF2A8609D30B9775
+A048BEA2E1B538D9865A8A646E907407EEBFAB32F76BDF132E905764EAF10891
+907EC36BDB2D8F89CDCF5365D2FDEF131B23A8308E05A696E5FF6EC44066FA26
+9348C4249B64F87D71C552F9CEE2AD126AB9A9B6FBFCC58438C6248A7C0962C5
+6D7622CF440288F906566E4947699270D4E5BB1E9D80E10C17A7147852495892
+707F47DD09B09802B37B1D40F848BB9C732941996EBF595184E4F484BE6561EE
+9BA94C00F1AA76BCBF817C814CDD4ED94F025A31765A118C75E6F3B2C6C2767A
+090D5389DCCB5A0ACCC67CB1B1DA2EB5B4B3EEAF5A4D7F390BC83A0C1B2B0910
+C180698E9E7F9D288C3BDEBD37D74CB5710AAACD2FAA4686A9A750064F6B306B
+F86C9F4BB77ED693419232AF4C1D897A6A5B737B41647A7E37350BC7853FBA31
+C5CA92ED67367D9858919229645A81EC6E30BE97FFF25AE6FE8CB16709D4550C
+DD5B4098ADD0D4D60ECE796384C007203A2B00595CB4608AB8C265C4E67FEAAD
+7B5AEDADDE94CCB6FFC545A9E3C47B8B911110EDCAF2160135492B722879C62A
+6A8FBB02BE4AC067194682264771595601859CDF549C3BD7A3DBF7F681D01F2A
+1FF5329CE52A00E9FB7F76E7F50A2B37AD1DF467A7B63EE8555FCFEC2A8C42CF
+C2297EF18EE8D49B0FAE5FE08857F0E0424FFCC5804D3063715F039C7F87396D
+579C57944840382C2A9524DDA1BB3C87866EF386581F2B1ABC18BD49490EC9DE
+5D184B752A976528892A0401AB4F165BEDA7597236C6A5433D7B8486FB007DF5
+A0A8503322639EA7916CE8D727284E90CD3F657E07C10370B3D8708B26AB933E
+DAF9BC060C2DE8345802CB0A3FF962FCA229295E15A02FB35D15476EFD85EB05
+AB102C504AC86BDFC3613EC7E947D5411CBE0A66AFC012115334ECA15BB0A353
+EAD3C33090046DD5FE981BE10A7EE6FEB747178AB6357EE22F6BE81D0FD617D7
+ABBA0F7ED0CB5E14F213A96854FE0FB0FAD0C3469A9590BCF9E7076BDC8BDF20
+933DE9DD6E99EA0C7DF1D28114B7EAD10367BD28A82314829E4FAB344F3A8882
+080BD2A920FBBD2227D2DA1FD6AF21E538DC10E50648535187EFAE304D0F72E5
+0746BE1853D59A1FC89BC3847BB8A0EB5A1BFD83B6E465D79012A80E27AE7BDA
+590BCDFDAA602DDD8D596F3B57490A564120EAEBCDCE0EA0000C572266CAA363
+536E654DEB595B137CB03701ABF08EC994B2D48622DCF99E137BB27DF2FC85B3
+FFFB9D781ED87B39054756B9B9AE7A13978E8EABD8F30804031CF77E698F8852
+F26626A3D817D3A3234475A80C1768CABAE431CC6E552596818F9B47161B8C67
+CFB0618039025E0B76E95B770BD302F3EE622C5E0898B34027932498345DF0D8
+32C65257F9DB75D158EF0081911CFBFD8E73BCC7F254C17C0B72AB39CE7EEDC8
+8ADD52AEB813C016D982BA5F10268E28466947C765F65C80E2595B2F732D4E68
+D69A757D8230F6ADEB79D31EEAEE284EBEE7E40A99C422050B338A07564BF7CB
+EBDB383FB6E5F632A972450E4F88241F4C7CA492A860822054E41BEEB3A59E7B
+6D6E769894FD8FE20B47D25F43809077696F516DE603D4EF1D683FC9895B9C4F
+00D38E738BC1899C9403F9BD7D861B0FB18AE11BBAF4438303AF6D1942A41DA0
+29FB10183B46BAC9AB9E858D95CD54DE11D3167B94F0642E89BB08082A3E589B
+33797A5B481669A45C76463B69BB4EF884CE76812BA488BD8A32DEE0AD6E9762
+10DE07FF0216F6B88AECD07E5A1DFE60801607FDC4F03D9A5B074E59A2EB23B8
+D85503FA1D12A6717FDC69220E31B04911E249446AF19FF550B09DBE833AE75D
+6BE48EB06866CDFB7999E9FCD923E5CAC8286D638C643AC161A80B1FF87A44AB
+6181929F69A6795591D319879BE5999F200F0556650475472F9863BE3525F6B3
+9DE2D2CD94229A257602F4956A0018A4211324E3ECEABE650EEA36D34A77E5D3
+DCA8AC728A71377A9E7A9B12E58492196C852303B9DD4EAE6983066C6ABD4D9C
+7787C837EFAA2F9D3FDE032665323585D4450A9D3E8C7E8FB2FBC87234CAF228
+B5C1654EB2B36AA06224C22A33C7E0300ABA12825C47D2F20BD71C03D546E4FB
+2FDD37D7069C6A8EE431A45D810E52CF05A478945988DF389AC0DC8C807CD51F
+EB049AC262A09D5355907421A5D3A5903A67C79F2F82BC62EAA06EFF45872229
+1E9AE5A761FBE2BAE8276314A1ABB109FCD681A0E339182720A41099D77C47EE
+7B6586829BC6728C44BA90D2A259130B78EA3648EAADF62B501D8482D7A0955C
+C7972E5C22435AE131CC837EA6481371E79535B455861023D881FFE838FEAAEB
+CA47DDB85DAF8FEBE91A5897CBCFC4E2E49213855ABFE6FBB558A9E27AA46244
+49FD8FABD897417E0008B57675283EFA92780046E5A1D41B3FFB3399518EB86F
+4D110EAA5C0AF45563103B89A9388929E719EF8FE2794B8BD18388DD66F2EF1E
+8C4206510EB7BE863F23D255C45B40CCCFCA951EF67582C00AFFF61C2199B046
+5D7C463F3AD70446A29F899E95EB6898721C737850E4350FD3660BE1FF7B317F
+E2F170120F972AE9923F79D453B5E51845E6264A41E1CD7545C35BC1AAAAA545
+BDF3D419D9D2E6B1F8DC295004689506BDBF6BF47BAC17CFEBB565C41700E784
+70BA1163B66A4FA197EF0D2868B1FC46E0E8695F8C92BBECE917C792442AE284
+A2F859DE93424F51D52D5D1C00DEF99BD1F1160EC2F94F84C3BB59C1EE56CA69
+A6616AD396B9469FBECB6B4986EAF6E439441CCDED87607BDDA10757BD4B439D
+28ABDB82D4CC8D4095831509F1087252BBB1DF0557B2F6275F7CC610E8742C01
+ACD9F985641A3C16A8BE1B172BFDFD36115855AC40A04C6C26060D6D95A10707
+B1F56D0DEDA7A48E25D9281790D3A2FFDDD479F24A3A0E68FD097448CF500597
+B662EF8DD419AE338D4C81859547CB86FABDD162907034D2ED814895115E76F5
+B8BA5DF352CBC93260002C3D72015180067F1A74ACB5A6BC48225E116395EA43
+65C12774423923E4859AF3374456F204E0FDC9460E8EE2E87098B9E7A3977992
+F106D0A8C542DED8B2E4C67527810CD19E03275998684483F33E9A6242ED0330
+EC553A673B1B34C89057D5972BE82AED5E88B5619C748DEBF6EE02489C51D3C5
+6DA3478C65521B8FFCADFA3E569963649019CF46AEA9357B5EDBA74A43A4A199
+A132885B74D5879BD2DDD2E444187737BE8CDEC939500F1CFF538BC8373266F9
+2E91BFCEDF58A2CC1F197EA1A941E85E021AAD4F94AB54986AA42E138BF54E26
+78BC33104EDD4E86565FF8456CD151FA2ECCEFC15943B7F0F23C359608D48D79
+B1BDE2A0308CD359089009E0B39CBC21FA4B337E7F502595D6B22CB92C096709
+EEB2B4D1D8F697EDA69C13EABAC0FAC550C5A15D1018B6DD4D740EDB2F9C700E
+9383D7307D0F6CB98006B0453EEFF884949DE1CDB38A681B412E2A98312C3A8E
+FCDB7080BBCAD61746027D3261389CCC55A6159B18B3B29B36C5071846117431
+C67079CDF2E5DC78EE02F82716E31D6B63AE901E7BFA1EE86F3858FBA107B735
+D42155673489A7714B683D2BC5D630D492F1537823001E70EF18242F06F52F38
+80901A5EF067BE5F2473DBE171E8D85A89796C98074424D384F01DE987F5544F
+118527F4C19427E8338B8CC7050DC48AC4BDB23C160EC2918EDD2AFD17B4DB92
+7B9736676D6AC40AF23A6541AA47141C047D0BFECF7DE8BC917FD34A13F2EB7A
+28A0EA62137A8A1CE7BC5F1439242084A4DF8DFEEF495D308830F04DD7D2286A
+499E3802995BEE8D3236511C1C2F6B5CF4668857386AA2AA42872E5769B49F66
+61F058103691825DCDEF5AA4554F4DA460FACBF69DD8956FE3F1766A72143EEB
+80D4F8D3A109C2277C620322B6B33C62382F4AC88E8A49451914A5FDC69E33FF
+3C65D1FF4A193AEDCA633FC5BAE6D10D63A98E0A2596B6E65456327E59EFBD37
+B5C45EDC86A4BBD9072061856C4FA228250640406F9976645171978F6DFF12B2
+C7946FF5FB10F4532F4A780BA48F5B203B223AF1043646A484CF7B4DB3628B9C
+B06DC7D8847A42F21328BC90A7BD8131B330D9EA2F513C564EB8B4B0EB3E404C
+13069D6ED4599EE4DCCD36A4178007D1AE551FC0863FBDE1CD639F05484598BD
+33325BBE61C5B10EF6A89886D854D6AD643005210262770A6F4D92E7328BB00C
+9E2D4DF7F41D941952F9A08D318EC90A5A6E0EA95DA7F21BBE72DBEA4BBD0002
+C7677F14F2DEFA91794674B4C06696C5D11C1350CFBD4F56FEDB1EFBAF120B6D
+D6CEF9ED27A6BDB215C4D25A0973CDFFDDEE574D4BEFA05AD9EF3BC70129B888
+84B6160AA09A3C2DDF44283511B376658B9985732F27A8B60CB60B87D8BE7383
+6A2EE83043FB5390E0CE89D7CE02E9C0B90183E959CB233AF3754C137962563D
+253B70B07A45DE56E476437DE41DBF7D178A902E899021E822C511CCD4EAA212
+4687E475F6817C093719800AC5E9B6F6F80C7A275DED35E7E8F35D365C070654
+DC5ABEC55536DC085808CE8B657711B9CE5F2347A5F99808EDFC577E587A6878
+DEC190AFFBB5E443EF719E72A8B5541EEE670E90B36042712FBB0AEED585B70F
+4260EC637590AECC2407A7DAB5D789AACC819C3460881FCBD0BDE3DA20E5A62B
+3B021CAC46DC9557559B483AB41ABD4B0EA498F483730454826891EB93523F32
+C07794BE2DEC3A86F0ADE128E9FAAE879A961B04C12F1F0E65CB869DF7C6A79F
+C7CE635163CBE878B3E8723706AB83A9334F4C67F72D28BD1D02F9600BEED3D0
+B4DBC423710CDE7FFD92C96E5B80D79E2142EBF216F4F10A857A744DC7BCFD44
+CA57CC9ACC7726B1A8F09039F77F0B1CD29FD64DFCD6A179961CA869E3AF0A63
+C1D1
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+%%BeginFont: CMTT10
+%!PS-AdobeFont-1.1: CMTT10 1.00B
+%%CreationDate: 1992 Apr 26 10:42:42
+% Copyright (C) 1997 American Mathematical Society. All Rights Reserved.
+11 dict begin
+/FontInfo 7 dict dup begin
+/version (1.00B) readonly def
+/Notice (Copyright (C) 1997 American Mathematical Society. All Rights Reserved) readonly def
+/FullName (CMTT10) readonly def
+/FamilyName (Computer Modern) readonly def
+/Weight (Medium) readonly def
+/ItalicAngle 0 def
+/isFixedPitch true def
+end readonly def
+/FontName /CMTT10 def
+/PaintType 0 def
+/FontType 1 def
+/FontMatrix [0.001 0 0 0.001 0 0] readonly def
+/Encoding 256 array
+0 1 255 {1 index exch /.notdef put} for
+dup 33 /exclam put
+dup 34 /quotedbl put
+dup 35 /numbersign put
+dup 36 /dollar put
+dup 37 /percent put
+dup 38 /ampersand put
+dup 39 /quoteright put
+dup 40 /parenleft put
+dup 41 /parenright put
+dup 42 /asterisk put
+dup 43 /plus put
+dup 44 /comma put
+dup 45 /hyphen put
+dup 46 /period put
+dup 47 /slash put
+dup 48 /zero put
+dup 49 /one put
+dup 50 /two put
+dup 51 /three put
+dup 52 /four put
+dup 53 /five put
+dup 54 /six put
+dup 55 /seven put
+dup 56 /eight put
+dup 57 /nine put
+dup 58 /colon put
+dup 59 /semicolon put
+dup 60 /less put
+dup 61 /equal put
+dup 62 /greater put
+dup 63 /question put
+dup 64 /at put
+dup 65 /A put
+dup 66 /B put
+dup 67 /C put
+dup 68 /D put
+dup 69 /E put
+dup 70 /F put
+dup 71 /G put
+dup 72 /H put
+dup 73 /I put
+dup 75 /K put
+dup 76 /L put
+dup 77 /M put
+dup 78 /N put
+dup 79 /O put
+dup 80 /P put
+dup 81 /Q put
+dup 82 /R put
+dup 83 /S put
+dup 84 /T put
+dup 85 /U put
+dup 86 /V put
+dup 87 /W put
+dup 88 /X put
+dup 89 /Y put
+dup 90 /Z put
+dup 91 /bracketleft put
+dup 92 /backslash put
+dup 93 /bracketright put
+dup 94 /asciicircum put
+dup 95 /underscore put
+dup 96 /quoteleft put
+dup 97 /a put
+dup 98 /b put
+dup 99 /c put
+dup 100 /d put
+dup 101 /e put
+dup 102 /f put
+dup 103 /g put
+dup 104 /h put
+dup 105 /i put
+dup 106 /j put
+dup 107 /k put
+dup 108 /l put
+dup 109 /m put
+dup 110 /n put
+dup 111 /o put
+dup 112 /p put
+dup 113 /q put
+dup 114 /r put
+dup 115 /s put
+dup 116 /t put
+dup 117 /u put
+dup 118 /v put
+dup 119 /w put
+dup 120 /x put
+dup 121 /y put
+dup 122 /z put
+dup 123 /braceleft put
+dup 124 /bar put
+dup 125 /braceright put
+dup 126 /asciitilde put
+readonly def
+/FontBBox{-4 -235 731 800}readonly def
+currentdict end
+currentfile eexec
+D9D66F633B846A97B686A97E45A3D0AA052A014267B7904EB3C0D3BD0B83D891
+016CA6CA4B712ADEB258FAAB9A130EE605E61F77FC1B738ABC7C51CD46EF8171
+9098D5FEE67660E69A7AB91B58F29A4D79E57022F783EB0FBBB6D4F4EC35014F
+D2DECBA99459A4C59DF0C6EBA150284454E707DC2100C15B76B4C19B84363758
+469A6C558785B226332152109871A9883487DD7710949204DDCF837E6A8708B8
+2BDBF16FBC7512FAA308A093FE5F00F963068B8232429ED8B7CF6A3D879A2D19
+38DD5C4467F9DD8C5D1A2000B3A6BF2F25629BAEC199AE8BD4BA6ED9BBF7DABF
+D0E153BAB1C17900D4FCE209622ACD19E7C74C2807D0397357ED07AB460D5204
+EB3A45B7AC4D106B7303AD8348853032A745F417943F9B4FED652B835AA49727
+A8B4117AFF1D4BCE831EB510B6851796D0BE6982B76620CB3CE0C22CACDD4593
+F244C14EEC0E5A7C4AC42392F81C01BC4257FE12AF33F4BFEA9108FF11CF9714
+4DD6EC70A2C4C1E4F328A1EB25E43525FB1E16C07E28CC359DF61F426B7D41EA
+6A0C84DD63275395A503AAE908E1C82D389FD12A21E86999799E7F24A994472E
+A10EAE77096709BE0D11AAD24A30D96E15A51D720AFB3B10D2E0AC8DC1A1204B
+E8725E00D7E3A96F9978BC19377034D93D080C4391E579C34FF9FC2379CB119F
+1E5BBEA91AE20F343C6420BE1E2BD0636B04FCCC0BEE0DC2D56D66F06DB22438
+452822CBEAF03EE9EAA8398F276EC0D92A7FB978C17805DB2F4A7DFBA56FD6AF
+8670EB364F01DE8FCAFBAF657D68C3A03112915736CEABAA8BA5C0AC25288369
+5D49BD891FABEFE8699A0AE3ED85B48ACB22229E15623399C93DE7D935734ADA
+DA7A1462C111D44AD53EA35B57E5D0B5FC0B481820E43222DB8EFCD5D30E15F9
+BA304FA879392EE0BCC0E1A61E74B3A1FC3A3D170218D7244580C7AA0DC65D19
+741FA5FE6F8CBF60250ACC27454BBF0897CA4B909C83A56672958752ED4B5E79
+E18660764F155E86F09EFA9F7685F2F5027EC85A775287B30E2069DE4E4D5712
+E7D033481A53A2702BA7542C71062173039030CF28D8B9C63B5596A9B42B33E7
+D922944A38713383D3648A4AF160A3B0C8F3379BA4372BE2E7EA49AABA75AEEE
+C5DDE1D8BF68483C3D21271280ABB91D54CC819680322EAB72E1250A760BC8DA
+726405EFE420635B5B7F0B48752C06083E92BDE06401C42A2C528C8A60381227
+CEBEF0C9440DC034DAD9C19FB27DB399BDAEE22053591D6538587C768C1B7B0B
+7D1E222D2D8AF3A6473CC4C0D6C3E0DB49068CEB8C9BD1C5CD486A50DAA10BC7
+7D6286142355E3F21DD254E27C00C442728A0BAEC9D3F17AE9CE320D365152E9
+EB0D5E3874F2BCEDA98521D23FCFC30B4B69DAD2ADBE80E5964ED0ABEF6C73B6
+DAD30E2C5061E3747FE536E1A5D190D028F2130AF608F5DDF9DDDF1E77DC8437
+ECB3EC93B33505DF47884DDBD1DC6BBE4098DF04A29AF6FA3AE344600D0AAB53
+B3820DD7ECB600A3B8001C51AF2CA7A39AE1485A087FD1752DF68F55B52B4DA7
+48030F2AA7E570B3D56C4EAD367B9B73FBC0A7356253233006178B9A6BC19081
+B815B5988AE76FE6FAFD7AC239072B1106A3F509381AAEE79B2F2154CAC4727B
+D199CDC8B4D05DF4BA006982512ABD7539E28D937B0F87FF79A3F84C29ECF943
+A8DCB8BDF8EA9E7A0E7CD60BC2308C96B3E889C797D0FF28FF4847016B3DA141
+E76FC6BE78A6EE9CE07E651FF86E720A1A1F075972D36E5C55162E3FE26BCE3A
+814BFEB12D4C5FD24340CFFED499C7CA183E57EC4F12CFFBE3291D43F7270575
+C6C3306F832EF182ADD0AA14C4D8669A17C09F632406AFA195F90C4DDC39779E
+EC0A77E590211592D6EE19563963225C06C2F13265EBB5A6CFB7C17D9E77650D
+11958305727AF662AE73AD0E3ED5F7E7086C5A0C3548A8129575980B06C715AF
+DD55C8DF869BED0A7883491030B1A7E82C5EB04E5A7D952E716DD8F2EF6275EE
+087614CFAB55FCE2BBECD7E8D9C90FD8359E929D5E0A416A23BD58158318B4FF
+87B095EB63F7F052B3A77F136FD66EB2C52BD46CD7DB3091A4B78A607112B12C
+4D171B2A00B78B0E1C44B0D90C20D9244281F5123DC1F6063F91E9E3E48DE78B
+C862D848BAD073A4FCB5EEC9FF54B5AB8E234CCC3C7439C62ABC4A13EF1B8897
+ABBF21F900C564C9A305FC36FC7224932F766E6E72C2EBB55953DFE2AFC2E3FD
+33A0C6F0FDFF086E9FD796E7242596AE85B877223532667625E371D2156E4C04
+0D7FFCD3337B93DF066CB6FE1E13960719EB7CB409EE805C08ACD2C06303ED9C
+E34C898787A43C1B428B896551C6FEB50A831C6F8CE2073EFC662EC286CB7555
+A3B42E58772E82FEE206948B8C439FEC5E4ECB9E11DC3A4CBC7611E30890E408
+637A01A2118441B4F9467A98BB2A1B03BB2F5D8E3DB7D1D15C188D9E856088EC
+B762F07B1C06024F7EF53A2FBD60C0A1F4C0275D07164545250ECEEF8CB15B04
+A2D8AC44DDE818C4E3CBD2A5FA0FE49750886CD7CFAAF8B780255F89DF7F4F5C
+BB594FE7C1597DA71813C2952AD3E811524459EB71D29696B450C924B6A5C843
+8F36A0F1D7DFE796FB9564333666D74AE614D0D698FAFF20F83C86524C894BB0
+272221C060544F3B653CB0E4E4F82B20D7530B3806E6A5830852C58070177815
+E287C847F19F64E854F1463C23DDD80093D6FEB8BAA22C5F05C21F99FBA7193A
+EB7CD49CFDF4308C6C68CC955A45FCFB54FCADA9A3BFBDE086B057DE88BE335D
+280F5338D7E66AD39FD08F9B55884F1F377FB6869FBABE3EAA4B7ACCD85BE672
+724B4B8F236B0889B6E7049CBA558A89F17863E82DF145DB8C7ED1F36332DE23
+3C0053B74E850FA14F9EC9EFC23AF18E153CC96FB0FFD910347370E57F0D81E9
+4A83E2D189EE5635E85A2BEAB5B1CB974546BFB2FC2ABA1E15DC0EC1BB3AF1DB
+B2F93538B92F504CBD7AAFE36F5F3AD45EB16378F169B17869FE81464CB826CB
+400D2F5441A496B6C60A4F15FD20ECCAC1F8F91015E7E1C1A10B7992A1554E52
+9FBEE905A3005336E49CB04BA7223F1674C0BBDFA06ACA34F7BFDA56906E04A7
+4DD79EC7E79B021A5008F3B1E04712D689366F520B0FA66A558F957011992728
+561BF4B75C2BE07C4024C172085E51CCC5CFA439F570297154CDDBB3AA25CD6A
+3004B936488851BA1E814260C06CD5479DCAB1A6AE21A5F4563024F973D738B4
+0DDB6C6DD2E3AC21B4F6D95CF9AACA782919F5D3E613D61F3224A982AF485C8D
+EA0037410EB70AB7D3EC174C6D5DE5C9C5A1220EF7C2B74499ADCEEFF077D1D3
+50C1124535F88C3C3F66477E42F1932665AD323E06B398D2805B9CEA632F5B1E
+50FA587B102A35E2F15EC22DD66E4DF06A3F4BB717A3ED7FBBE2458EB4D896DD
+AF00D1BC71FE1CCA27890ECBF9F0AF01D3E65CAA29427FAF06B3BE1E640522E0
+73B213D04491B93DB29113EF72211E31F4C5A7FD58451946CFC15FD805112FE2
+547D1131A46710DFB75659A33695FFAF3CDD40AE5260AD6766DA81DAB0A6E96B
+E89D57AAEF32B5EDBBE9F7CC033BB2595CA3FEDA2ABAC8E5395EBC35BC112FE9
+67EAF1F123228538091483050847F8FB5194203609502D3A09CDE811EADC18B9
+F039593782C27EFA7697182D6367E88E326AD5622C5A457FE2644FEADA88615D
+9DE3E483BFD9329667953CDB86F9D2F0D4F02DAB8A98FDEB1D17CAAED9B6E2E6
+0C55C1FEE25AB98FF59FC235876029CE03E4A713B75B3163BE3B2DC0D4472DBC
+473E10400C0F57E627AE97FD0C1CB0F78FD8E2FA831A3D2B1C2BB3F2D4E812A4
+194C8732B0C525361DC8480CB27C30CD4DCFF01318D2EB4F5234B4A42EA8C23E
+7B3EECA41B8E4F54D5458B37EF0FB2F49EB19F4EA8AD2B53820FA36E93DD309E
+48847F5C01B1118ECE7D0186E6B8953344EB775D655AAAD7BCDA642EA2E39A15
+855C027CBC0E3FA752900EEB464E2D39404D1B85072B40834748C6F9C74C5B6C
+3CEDE988343FD984CFE4B856A481E60E2E65D3BB41BAF2FA80AC0BFE381071C4
+573C6ED65C524FF777F34D82E9661E4A75E3878CC77BC59218244612219C5A92
+E95B90EC2C38614665550026F1730D11162F19D841681C04C401E102C047541B
+97B9264D86F47E25A347696AE5EF0FF3ECD9BA32C92901DEDD816F7D73ED1216
+0A98771892472CD625A8F7F19DEFCF5CA2AE57F8AD3898F2C1005B187DEC6F2A
+A31C32720EBC934178E0E9979013B3C9AEDA4051DF63D8C903A399DC88F83DCB
+A73F1B2083819D1BBEA5235F8FE1D098F32A2BA6274424A99A4975FE4BFD59AD
+79B40A8003CC0AA728EA79D6BDCBBD73DF45B7918BC099C5BE4A068BF64A30B1
+C39442CED98AAE1BD495F6CA32D564A72E3BF753B49E4178927E4BBC0F06048F
+96DE7C30AF580B0BFFDB330B3B87D7F6532A24F403680BD9F15E758CDF04EB94
+E83C7E644FDE5BEE7CE73EFAC75669E41BDFB20A5B8ADE1137378DD8102A0DBE
+19499A623770417CBF5211395A6BA9F4490F4707A46F1F9B3FBE642DEA0CA053
+9ABC307B1E71DC2B069DDDBB4EAE378BCC75AD61DA900AF8BA6DF0E27A8D2258
+DC80205305AB6ABFE3726703E60869BFAFF1874F3C0E05FAD9C05D7D89ECECA9
+DD2AF5F777D7514208697E712B52448B364D3ECEFD8127043DDC9D0757B7CC37
+5CDE8001D007A6E961EA24D7FFC92410F3B13A32946F12A50DFFA256249BC8D7
+C1842FB84AD51B41008EC4604F6B70990510EE13E6DA34F864A572D99A13FFC7
+3609EF2BB1FCDEDF37A6018248C545E086EAD1BA1143E74AC60B684E755E59E7
+36557B915F92EF78FC177621D49F777A2AF39F3C2AA6EC74750AAAE08BCC21CA
+A71CCDC91DD45E6050D83ABA49ECE425B55EEE137C55619037F1C30530BD0A6E
+CD2004B6A040405064D7E87C55536680364E09248BFAA3FDF95CDA0708E55F4C
+F7D0A92A93DEE0C7B69638F171B28B7F854CCC6EBC6AEE14864BF5144EA36D46
+A9C297225AB0325E28EF6BD06D7E40E3A724EA1E50C4C6163B195CFFD5DD291D
+D7BBE9AF4324A69394117EFD62F08D6BA6A8F0AC3E2353492999AF28FBA758C3
+A50B6840CC72054355E6CBDBD86F683537A4115049BC1616BA35C2B0B6F5CC32
+3F6831DE4E6029310738DE23D36D2C6E82F04EB675FB89789F74AFE3B8854250
+51812FBEFBCF162947554324FADAB765C74B6DA89F60A734076D44BBE45263B1
+3FEFEEA90EC7948F23F34D4049087AF6563692417DDBCDD5A9552A373C2528F8
+0318D3C0669279F292127CBA40B0ABE08A1476BC9EBFA8BD5D622BC5CE7DBA20
+C689BDAF50D5B1EAA89E296787CC53845DB2BA54FDE363DCC98A7BA256663869
+E9E02E09077884DF1A2A41AA698B7EDE8DAFA621B552DDA91AD1E671D636FB36
+91C62B4D2D4112F2C169E0023EB7521F570CECC54ECA5EBA462049AABBE2ADEF
+E3234BFD71B26DFDD9D34DFA69E5E80FD90406E6505A6798F030A4B5172A7BC2
+C9B765A86ED55C0590E0432719BCD7BDE7CCC7F6B33BD467063D886276C8879D
+E04897A4623111C14A1EDBBF69E2FEDDFEAEB2A785C6D2F0711DF4B93AAA291E
+7F4E0CF9CC3FF0D31953C594DAD014097DA02CBD5AE8828C7E7B5BDA09188B05
+0D7263F164E1E78CC430ACAD1E8FA71001E9BCEFAE47C79846916A5F819CA366
+5734089BCDD458CA1A9E8E17BFF357A91F9A7A8A6E1DEFB121353AA80F1906A5
+AF7CD2E59EE6776FC0DA6574DA0DE522918CAC4E566F13FB9B64EFE79F3A3BC0
+689E3B0676741C90FF3BF85C7A0FA9716F4ED0E329512B66BFB8AEB56C3DD6B2
+24F8D6E23751A8485F7EB46719E9D22618FEE86D5E01ECCF4C6E74368A8E9B49
+245D80E7484DFBC916FB2447852B36EF3F99A82B6C106F786707D7689DCD7AEC
+A0C51AC1A3F67034C16B74994403FAE7743BF02149BEBEF554814BEF31B79184
+3FAB4D2C887E1BEE81B465D12DCDDAD03DE5ABE9E763C440B2CFD42FD16D96EB
+C21FE788C8C2688F79F148AA7090BE64B0EA710D376222FD1590301BA9A2E715
+D33B8C1D95F2589AB0EE476F7046537E27DBBCDADEA1E7357C9D7FA92C2F93A6
+7BDDF58A44966590821023380C97CDE37EF6D449E35EF32BCA6E69DC8458511E
+8DC8AB63171A6018AC9A334829E5978484C4C6E917A5F1C254E6669F4037C691
+36980250A80673E0F18C9E0FBA1E5CCA3BE30B8E7B7188062B25F8E1E16528A2
+F217C18D6A1955482E5463FBF097ABAF7314E449C6FEE56E2695407A8AA9648C
+61AC2BF3B2D9CB6317A9B16CE931D318C8BC9676CD908505568C197D90C2BB46
+06431C999EB68C8216409E4CABACB2BB34A05B697B9DD1E91471A404B4969519
+E25209EF4EDD420944BED17B18DB3566FCB8059699FE416789191EC2B35086AA
+2E10C139E3C9FA0A535DEE9255A867A26656213E85851DE5F51F9780D3A6E572
+F1F5CE64DA176CA810799DC1C60A8FD2A5ED42E613021A19928EC4572059B2C1
+EE441E79CDF7DD4AF7B6E3D3230419ACAED329388044B107DCB4DE91B71EB838
+904B1F969738BBDA064FFE75C6623639BE9924602DDF0C166B433B9D54ACDA5E
+018680477FB8F10621FF32319E58DB672D744959A33E7314A1B3CDE0C038F7D6
+0C8A195AF191E36B0325334A711CD8E25D9C1D257E46A734779E486567481108
+E0281DE96907D460546578DE83A0A01A9ABF64402B48DEF739F4308E14145753
+719CEF720FE5CF8DAD7845E74D502B69DC18D172C3A27411259B8042F3FF82C3
+B157BE242C351830255CF0EDA96577375A70657BD9A2E9FFC54AF0AE563D73F2
+E510279FEF48D79F5F7745DBB492F1D74DA738E6A4FE4364799B5BEC93B4CAF6
+B06B9B8C8D164F8FA1FBBA693204064F2C1806C39910910E02ECA8D092558CB8
+33338B359D56483B7B99A1D8137204EC1AE70ED3D75881FC3B00BB9349AD934C
+81A9F285312FDDC77FA923B18B1873D288C2AAF2E6D0AF90BF25A982B843789D
+5662D6A2DD58E065026885601ABED4B09CAAA3116DEE6B430B15BE0A121FC1BB
+FDEA5A501F0798CFFFFEAB5101E707F1A00C8E014A3561FD39972EA9AB108EBB
+960AEA7FF60C301AD6CBFCAA7D35CBF6F8462A4D76C4FBA6F3DF6BB762DF7900
+9F69529AB4EAF96C2866444B257160E8822533A7A1240C83EC18C364F577407B
+4CB314678D2511735308A1660AD94B8B818CEA4A3DC00C5A1C978F8BB4E0491C
+49328F6CDF95BF620AE53056364423841D84418B23C2A447B0CCF8D8633FE2E8
+4A4AC1C6C74627EECDC994059F1BAE9E6B10FA80D767B3FE97BFFAD413DCB0A8
+495039744B48266278194D60422D6E7C74D0DB45ACF217797D0C0678EEB60759
+6231438CFEFB346553A7A447B50807EBB6E885B5A49CA9A350EC4A8C76EDFBB3
+A4DA1C9E3EFA193CDF08553302998F20055C84420A4C5252F764CC4B7A4BEF6A
+A09170EC417B296DD9E2301CD8EABE4A087E648E0525A9FFAF26374C47FDC123
+82F18C9884843864F418ACB08041E7896FDD395225532460A8194A8DB4DBD824
+1C68C6665F85059E365EC0972EC6465E2D8867449907DA6692A021F026F437BD
+D02654BC11381BB6557663E0B0B8C4F2FF69E4776F4EABA69311BC1AF8155F7D
+6D3A418BDC912CC7CF1A4BBC8A1376D8B4DEEB6585416959BCA4AA08D4520C33
+EB054DE53140992D0707210593BE62B3659E3E493C4562C2E99CECA143791DAC
+679896BCDA0699E405957E17DDBD243E65CDD7C9C8629F29A2078658746A7779
+0F75BE24E2DDBB672B95F26366BAF036B3C23BE4132D7362E76D4183A469E0F7
+29174711ECAF4FD9A923E72FE58DF2854C5537E3626317D471D1E8A922C9BBA4
+CE9163A4086AC4A231C2BF35FBC39A5BBCFE41843CAC7D81A054509D31572BE1
+596E0B0B563DF2BF0E57DB4943DAEE35CA26C8433FEE4FC61145C77F65DADE75
+62DA18DFABC7F4194906F53884E62E77D8AB3E099776AB93B2B4D0C98FA44C71
+597202A2643942795EE8CE098FE26F1AF8134F1E75FAE18D563B1FF43A511C9E
+EAFB9EFCF61490A1A4FD2CF354927B72C5EDD5D62B2F3F5006D6130562A13BCB
+1B988A994A8D68B051A5A821CCD5D0F8D9D49FE7CD04EECCFD7A554CCDFFD77E
+27AC4AB5BF9FE40F90EBD066C483796CE1A364E95C5E0CF2154834760522F128
+B2DBD1F4F73347D42635B2875A23597C35A0823CC6F71E49598125411BC9B2C2
+72470D36DD967C947AFB031BFCF770FE50551A134DF8C5D1AB1F09819569A57E
+E23D4E87C0B52CD02B0A2E3FAA7D27A94359E82AF047756BB769BC5950A75207
+78ABD49D174F2F69810AFFA9336A52D6B93B004DCA5CDE58475C0210E0BA1D20
+FD4FFD6838EC56A0922472D4C4EE0CC481574BC30618179E733EA40A48847E14
+A75BE7717CC5DDCB5B0718074EAB6FF07CFFE794D335B3A13EB968EA8FC5B08A
+13B38AD1C2C964E4B07E90B9732C458216B028E07DD593A5B767A2B415EFE7DA
+951FC07800F11C7E2EF9BDD152BC6815B7F32117F49FE08BD79BEB949003512A
+327F3F8FAE1767E7842348BA4373649F1A21DB2C56C081BCF9FA4EA86C8DFF00
+FF45C4F1386CF8C2C4120F3F6019CEBB639F2D272D08C1763A470D4BF6330DC8
+43C069A6333113C3A0C93471486EFE9BFC02B760C7CBB2E9156087D09EE8A178
+5EF50B34994094C3F0015EA2ADB6C920F4302FDEF128711994875551C4E883E2
+DDEFFAAE11F2234AFDD96400BB69C1B4E6EFD75734C586A10A54A98E7D790F28
+DEF7C7DF61FB23BF91AA700AE585EBDE74E215DA49F4ED466F46129022722086
+8884D8E026F35C4BEE7E866DF8E0846D5EC3534069B713FAB02D4B4EE3B44E1B
+656F30D629D40AA1337786C1FDA08EA1217AFA4A6E2498B334DAB5461A70DFBB
+5AA5686C89FFA4EE82D81CE2B28334DC5C032487CCE998616F48150BA1281911
+076E626E5BFCC56A0A4CDC559F878F14C2BD7A5148C1D8CC303FF9EC473354D2
+D4FB0F0F2AD0CF182A28074ED6552E179222570DE0E0D44E8FF4DB36C3AD6487
+C4BA53C8548714A69FCF8E3E5202F09469D7447C6519AE902C1D611A720BAFB5
+59E27A6DBA73624F44B4ABE0988BA3450F82E03521CCE8EDE8BE7EE1223B575A
+DF9A52650E85545525E6F121FF2D1531F156EA9D5594239AEA2CD09EE28ACB15
+A445E11FD1C031188DB61881F474D49425C084489A88A47D681EA68E7FC4B1F9
+DBB552063A02A0EB51125E9B2CC646B940D46FF457415F9565892DEAC030F08B
+E4C10DC38D825C7597394C844CB863CE6C843F67F2E1C42C4EF86AC7FB727BF0
+224B5E91BAD99CC6638AB2C64469A81D8B1789981872ED037B3A34BDF3130137
+80FE80FDA65EFBC11A08B98A1AE595F980B577E22D3CB7FED1D4016F5290ADF5
+47D7D9BAFE39F294582F2C084003E9C83FDB9EBC87C8B477CB8BB359EDD9BBC9
+9368D6605E1468A20909831BF602EFCEC0D5EBA99A2223E5A269275C8B221B3A
+F9226654185929F794E1979ED18B4CD36152F973433AC67BE24B9D953254FBBD
+B644CDF3BF0E29A2C72113DC486E46DED2CE8F8DFA8B0F8478D1F18C9AA8E054
+A31C3DBE84ECEDD85DF6AF9467AC2990ECAA3384FBCA1BBE598AA0D6813C859E
+1520B88BF30ADA910A6AC3068A5B8CFD76B7F0F6F4AF4C32450D628B5320C384
+F23A2B5E8756895584155226A30F8B0437E028978491DCD00E79C0ED58DF261E
+79B9DA17E57AEE03EE92102EAB2D63E69A88EE0B1E2087ED0C0CF6475EBDC3BE
+0324D1FC8F7B90D8D807533E5436F2C2583B9629EC390403437FDAC908557894
+03054A6DD6A3586043A9C8BFD0C7EDE1229DBB9F69F7A5D20F55664D061F6517
+0051C6B3CD7338241FB403F2AF77DAB1A8EBE1650156D40863EC1957372BFDEA
+BA8D0BB1193CC5BEB5A68C8274802E14FFA3ADCEBE19070325B1BDB960CF2988
+C0F5A9BFD843C515ADEC8B8AB02B2891EDD7502D9F28F4E58D8F67D1ACAFD0C3
+3531E0C7D1554344CCF90AC8696E83A3F968252981CAC09653956F4343B99D3D
+4F17CB8BBE4506B354439B70F2024871D16668F9DECD8EDB872BE5E6ACC406F1
+1DF4E3ADF60EFED57D1C426292970199BB663405236C6A907B6891C6190E87F2
+78D9142220FF295C7BF44AF61470798FB8CFBEE6973C69DA1CC24ECB058AA753
+DDBFD92FBB15560EA19D5D92F0005B74F06F0EA5901D231996E0866389DCA433
+E62BE48479687084C1D67BC592E592939F806FA8BF5F0D3F644B1FA6F056DE0D
+51D3F212C6818CB6166317058C2A0C07AE2E324CD90D4EC83CF4819B10CC348C
+6DBABA024A5FCDAE6E288F82DA060BCD16437F07DCA43BF1E5A1B402F16C78FC
+075BEE900B4021A1019C4A5ADC33230047FF11FDE8FB775DDA267040A22B4E5D
+6012F7E72B8BC8DD3A81369A08FB81C6C4873C2147D03D4181D6D8032DD2B610
+9C44CAB50C5BD8F489EBF01C72D4198B66EEA4E976462F8874143640B82AE57C
+A51EDEDE75A9A55D31587C14F8DEFFE69F75EA7B95BF725CE9991FB2F07AF568
+5AFEB39447B728B99BE0502BF28DE1D92B15926BE4E3DA2E7BB44A24836A97C6
+EE3A2080E01DC6514180DAF9C055F4C94929D34F193920020505E62804461630
+9F42C652F9D5681C91BE23DCB0C634247E739135F925EF3D5424767D5F5C5879
+C46F2E3395E2B49D282622FA4C18475FC52BA7AC4DB7C1AAD65352E66DB9D962
+AB975C01CC6490490F35CB358D77DF26703B356F5C5D80E25091CDE93B39BC22
+AC7F7CC6FBCBD39C39F7F8B41B3286CD39D6DE2E6B2A9AC1D2EE8AD1FF53AA85
+C34B2BB3A2E385B980FB5F35A1BECB5596FC2FB2209828F3C54D01B3D867B391
+033A752F4AA80C91775F9CB9BE939C850B2B322FA948907302D670F2302DAE93
+B5F8D2B835DDE001ECEA3B67BD3D620BC6D1E325C4B355985A129CBD6AFFD2D3
+5147E4CEC0209A8DF23ED77AE818B88A3696257268536CEF2DA90202ADF21C34
+07A0383E17206532F5F71061E625F3199D72E461D04F4AF18AD91B8A09E37E5A
+46D2E5D3634C508197C6CBD81F3E2BB8C759E331AD1CD54FCA815B92207579D5
+B248F2A1BD2B725117C76FE754F5D3CAA9F642D29AFE61DD78ACEB9F1DD67764
+0AE3E795C8016E150C92CC4D2EA682D6808DCCB4F24724541F856C29B3ED24D6
+64F1BFA439DD155E53F06FEBD8DD73C7C2D933CF70D9001707870C2D06EAB2F1
+649B32FFF09C7A1FA4C2E7EC2B3CEAEF12515CD401C582A315906EAE1A0D51B8
+1BF625E07761AC2BF59A28B7840E8833410C7A3CCFA16E32A0E90E0FDFDC46B6
+7E073A5957E59E58B33CDC146394FB7C860EF5CB1CC9871D3783D189B1A5EDB4
+1BD462A5AF1CE8BA67D096CCBA709C49A6EA7C1233C125155D8FC7E9482C8EED
+E15A207196E74C9D2C19CA96CB1B4852C3DB5ACFE88246F0325169DCCC88F4B8
+8BC213413EC95D2E3F39329B2165A0D1E3B4643C8AC58C126AD9E71B02B8A04E
+D5ED3F93B60A7D1D142A4CAEFDE0FD1C0778B3F9E2CEB4E0058D714FED13EFC0
+F4BC2FA09A125652BD936BDFB3B9C83C182DF3C329E060E983D054410928E4E2
+DA66453101A4D23BB5FDF7D67051BC92152A687620C9B653CBE6160929FBC393
+BCDD07F0010CB35BD030CB5E13A4AFEB7DC0DD5D89F9A638509AA2A4DCB83CF5
+DFC0873FCAA432F351D88B35DBC6129A44A35CB2CE4308979F474921590FE9B5
+45A4F50C799BFB555A1674D1E49CD81DD2EFF2A409626569C64B9C80B5341EAE
+50A011D7BC615F2BD6270981E2D66BEBB017EA4B5E9DC2EF8A7D059C94CDD2D1
+2C2C80FE9E086DFF9682C1BBD31EFC52E60625FD854280CB6717225D2FF35582
+CC3B9924635593248420EE48AC47332745597A5E542C2C375E947BB80F463C8D
+54FADB19A7B5993F39D9E07875785DF6342617F718A660F6A27C9642717CEC01
+D9DECD957E3C8CE1C0CFA3F2F02796EDC1CBE35E7F12C3CAF968D8EFB5F09588
+4277CDD2FB8DB2CF43C82980C9CD75599416218D7F88077B6B7CB579B7331D1E
+2ADCFF01EBB0A43FF5C78B5F4CE0F183FA66DD45BD9E950738FC3E78AB286B70
+FC45C628DD2DD70F8C33E99AD2F3A82389FAE546138FD8609EE51BF337C50EDF
+A4666AE87E764F38A99EA91F0CE63D72CBCB7B8EDDFB72AB57270F33599BE69B
+8C7A9F15B6704240A719A1B2B8E662B5F479ED331FDCD7EA86179971E0F193DA
+27DB7DDD61EEB68D5F5ADDF0827E7A961D0F35D943C89E46909EC09B3D02FA88
+10E8D8B85474248CBEE142D33C5CC24CA4923CDED8A4A5028D585392DD1BC8AD
+61CCE83D7D2371A5AA76F87642C10253D00EF336FF8C5B14BCBEA473577333D5
+5A858CCDC4D51A715859FE3DC0B79BEDD3187ED7C579615394354C46AB860C4E
+13D26ADD1D09B3B86FDDEF1D5232B618B6A8636BDBE04E7187F4CC624CF2BC9E
+38D39A393A0A6E42654329BB2F5735AEA951A1642CF093B06BB7656A23B9A9C5
+487947A4419B1AC4EDD7FDAF7FD0DB8FBA10E65AAFCECEEDA53D3CA4C5F381CF
+8A15DE4D52EA901171C5AC8D8D402F6EC75E898E0756BAD7F206311E74101055
+730DA667F74E9AD40BBDA833EA7439EC939381EFE8DE64917CBFC4E4C0A96A2A
+069053049D14A8CA33ACC6900C37CE589DEEC5CDCBC4153C0DEDE51266091DE5
+E417ACF812AC380EFB7523EAECEDC133D2368C3916A92B85EAAE86CE9CE912AC
+94749AF7E040CDFFA2EA2B78875EC3BF0E72C228B2C68ABA783E9EA17663CD76
+70CAD683E416E6863D21FC2A42F1BD447CAA62A66CAB6DE56B193B3D83FB521A
+82A7C3F08190BC10217F7EAB6876354320F1A63885479B1EC91750A247CB51B9
+1D22EF0D19D48C9893E0716A64ABF1A54700DD9BF0BB498EC874B2266B6E86C3
+2D273A2969F184B9023E83CB245FF9F484C9C37E70BFF61AD20EDB3C2DCCBD3C
+38716C5AEA8465E87C3E9F4B9884AC9E213817E102B30691D25D808388A3C4DC
+8894BA463F8E0F5E3406BAEA54BECA95E934C8E019AB014B13A618D68A89CBC8
+3F76AD4C46060C0FF3D0BEE87082294BCEC05BED477BF02BD9F8D62ACF3AB816
+30A0846A3FDCD885E4F310D56C332CED12A279154275A682438ADA6970E18CFF
+F66012252726FC421A3D772DDF7867ACA38E70DDC25255283E72918772DED8AB
+AB05ACA6477F6FB6D2C2A4C35D7CB877C2F07B6A3E113468B53356947B0EC500
+FF3ABA15ADC0466BB9333C6A1E73EBDDE53986FFC8F44ED9A1136BF27A599F28
+414C8A71B2893F248284DD7E0D887A1102357CD8EC4E034C7736469DAD3BBBF3
+45F0231D7C29DC8D0A62CF4ABA718BBD7D985513986B93B599C912408BBB2BA7
+DB96EEAFE84D1C6AD71FC59216FCE27E179BE74FD7007FBAB1AE2A9ECD11F1FF
+4396A13B7EE4FE5727E2142AEEE4E39941F02E54BA6730086B9FCFA6A6D00B7D
+BC6AA1432E129289B05C34A0B68494019D387AC6161B6585B2266DCF37DC63AE
+1CAFE2F3EC9E584981468CB2B1FF77C7FAF3342B72E260E15B558974BCCA35E1
+4D9040394866724F140857AAAB68BB9EE785787A857D17CBDB0F4CB00844FFB4
+2244AAD459ECCA522F5C590976EDDA6900919CDA0FE66DC39DBCF1434FD7EFF9
+194BEDAB53F7580D169909C31D6FD38EB7A79DD4426186235098A9F574E08DF1
+A03F709A1FA398A545331FF9454622B4CF225E95753037BF7620FAB86E06A1CB
+0B5FD5C82C3C2A9E2BDD2AEE6F3547033D5512045506D6DC0946AF56E87DD984
+2BC92D8C6F1494E6A19CEC6E3CC20CC46465AA61DF9A9CB7D9B4ED157E3DC4BF
+FF6B752AFD16943A4CA7B6954AD3C8E115055F0FCCED4A7A9AC3DF6888724A0C
+1AC640EF479E7D502B2F030F2B43D51996429B40841CA139E8EAA87B6AE277AE
+F8A4C55D4555BDBEE4232DFD1A468548DD2BE1193B3E0C7DE64A944973BA61A7
+4EB28DB3AA37C5FA901A9E7DB175DAED17DB95E22EFAC77CF7D4B0885824825C
+9B6C7B83BD0ECEB934797B49BC0F530F7E114C2B46D63DD7C56B89FE4A67EB3B
+6730F3281453F8B12A13967F1FC1428ED836B7B74C88C893407F13CD9FEB37A2
+E63D62D24F0097F41F756E706C376E1F85EA99FD6FA72611A9A92D3E49711516
+42FCDD0AB37B61DC086B7CE1D4FC559E2436D1334B3FC6A45F2FBFAEA7274455
+AC6715983EF884243D21C1FB3B433634A1B100DE7EFEDC96A2375C370F5F6AF7
+88FF97C7F49A8716AC5BE715578FA60394A5AA3ABD91750D3D92EB2C20697852
+A7701DE59D37A8FBE71FB85C8BB31BE3FB05443E7ACBED3CEB33379E088BA46C
+9F00659840057537B0CBBB92106343FE7B22E1EBDF988D2EDDE8454DE5042227
+B71CD978B414CEFD6CD9C3F17F11D325DFB90DACC1EA8D539B258B36A67AC1F4
+A3151BF7CC34F987932C469ADDE1FF880C6AA1638D11D339181C3AB485D9531C
+ECB30F18504BCBD1432123AAF1A20B45DD783C4BDE3D9222B7090F20D3DD0CC4
+46EDBECB37892190C4E3099B2A5599C2969A2772D7BCEAEF5E68C7BF2FA00DE2
+B955FB052E6C030D9077456494ED80A3E06937E0C47B28B92E3EE4E4D287C687
+E65221A1F3D8D61780C7A9199B373087770136C43A8B2A15A288CC4E89B3D298
+6F368BCC97D573BC587A0638FBD3618AB7AE3385BB12277EF891C06F6F618BC1
+5376A53CDDAC8067BE854DE1C5E554DAD1D067B6236E24C71E05DD580AF904BA
+B6085CC5FD0EF91C7A9D99E765C1A0C042508EE88E882121735E5A8FD6AB154F
+9993E0FB801632B535E6855A2E957D1DC342AECCF2E3BB566CD687271DC01C73
+C04F207F8C6294E0EC5C4644C8FC359A7DE5656D49965F7A4AF7D4AAB46BDE80
+7AAE6A0B0A1F737E075FD15984BDE06E06670A676EDDB0FD7BEFACBDD16EFB6D
+78AC731178AF94A77470EFD8F327A15F1A03300CFC19C9A9C90EF1388E9FF702
+5526B6990D2F8AA2DB72A1B19043045121F02D0212F3E892D1B13601E8324493
+BC4FB860EABE27DB73E5828FDE47C2D83E5505DB2C8491612605DC988F84574A
+5152E8F40CF20B26BE241B1036C9BF67942A8664398F43C4A5F1ADE0EB752D34
+1201D0DEC34EA95609A2DD65A7F761A0BE2FAB352F7AB8BFA31D559D39BC356B
+E796188AC31E0C512B37AA9637604C6656B10F0BF5C8F083496E3FBA6F449420
+C05C5371B16BA0B047F450104834C2FF96ED9E66F146D19E807B4C1C78746CF2
+C918DEBFA52C49A4645CCB2F3C5FF2E4588DDD1CC6832A7991CBCF3D3387992E
+4DBE05C65455EFC9D3F88248B27C5B83DBCFB13E72B24B9A13DF66E68CBACA95
+BEC7C0A6E2CBEE404259455688DA4F512A2AEACA619C2CB1FF20546200F164C9
+DAAD09F2CAAD9A9B05FD59790FB8B892B9A72B3A04F9443EB216E762AD9C0695
+B966BC2510652F31A1DD10AECE493329982E3583A7C106E8E4EDF7186574ADC4
+CF2227B520ED9DCEA96D8FDBA7E227219DC13DEEEF8958EA602FCB52DEF6F9A1
+589C659AAA7A4CA5D78176CD27F7328BB71FADE61224866B756C78329BB6557A
+3B003E15B66A6C307023282FFC3EA63467683B1428DCE51B2D5BA418661A4DA4
+BE4E35945C93F22D9B4467B2A20D1B282724A02D9032F48F2829868163989995
+1B866536E43B6AFD8090ECD4AE576A28CE2DC7BAF04111701A71EF4C3B8E8BA8
+8AFF6E096BCFEF20DF3BF29ABFDC2507896D53E3AA48DDCC77BB58D85A3515FF
+BA5BBB0A44D4FE8580838AB91BA337CE461B537EFCB0D4BD968D0CA8F4B808FC
+3ACB08AF1C580C634AE27123E50E7E42A8C861667238A52856A66E9BBBECB160
+DBDB1DD426A2F76CB8C7890320F7DF50C9FE89ED1405A59721D11FDF2FA2B048
+83B77C164248F7BF436E2007AC9BB4F27BD8FF62C4ED9D377F2044D2F5F63420
+1D9935BEC227187942805B7A66342044F54692D71C820729691709CFE6720A1C
+6DCE3E05095351635827C6C03B1E67C9CE546E5D464B6E2F608CFBDF7EBD0280
+04D2C1DD0AB53E75E0C4D2864D793E617477F3A308E95D68E717790B3BA4B4B6
+9CDC5B978CCA0A52FBF14D7FDB5AAEA8AF591CCEF944D9757163370A95394324
+8AE2885C1F9FDC8D5365811D20355BAFCCDA0722057A229D9609D5DBCAB0C3B7
+354B8A0432FF196F4B5DE84BF7B7C799C5772D9B1FE97ABBA646916F7081B98C
+5EE2019F992CD1611956B9C500F89DD6610224371833D0B85319EA50CA5B6797
+DFF2EAAD1A190F32CCC801C06D40DB4978646590FF40A943C419BEF1C1E7C642
+1CC1F33899247BF8B830FE58A2F0B93E5F011BF23A54782CA0EA09A0BDCC10DF
+7B688287D2D0DA736A9194F070DDA4D39248DEC41CB441A4225602C87AC3F7CC
+780120F4F92E65ADD62FEBA9F5D8AD1029AFC86EB4D8AB729B17E1AB21E5A07A
+DA4AF13BB3C02B9CDD7C063741D0E79310D48D7A435D8904F87BAD143BE8E521
+A51D6E7F3D348A3512C2D315BDF1A68D87FE3DE03F5D95E440B691AEE8C7DED7
+92189FC58C20E36FD72932BF07A921DFCB5C444F180D78F7CC5B83848DE155A2
+F3E47F45F576CF59C5D46ADD277B0DE74778F11F999F3C2B6436CDA253033328
+65D0BDBE877B644A4A6685C239921821357CFD228E9BE92C21B3428D693F48EC
+058CD8C02C5EEBE3957A671555703F01E430A5CDAFA3A95155E6750A4CE39D1E
+A89F19195788625B26FE693F312CBA53F08DE5E3A2A8C29FD7312A92DBF79C73
+0BC7A31C9D1945CF8578672F586493132463032964C629E0CCE49647DB95EF33
+CB434C8816E0E3427A0114F795F8A0C51CB2AEAEAA62C98CED7B87024BC16B30
+40D997940650EAE72BE6323F1697205F608091BE8AF08A9C91089C120420B3A6
+68FD09615D986FFD06EEDD39BBAC9C4C166FCB9E3657D88FADEFB2EAD4941591
+4420282BE836A4CCB74476114E2979CA9CDA9845668DC89B04BA0AD91CA46BF5
+F91F8E677815B3D2CACA13A3C7E62BA3FF44B35E957A0BE4A1EDB4DE5EC2B42B
+CC427D4E8B8907C7F0E3B82E960663456C1AEC4C2B275A1EAE6126BB5A802238
+1830D00CCF43963C8CA537D24D7B8A8A767E978DA955613A819AE1F5A0D12BFD
+378B8118EA7ED73D6914DA71C0FD41620151A7CAE1AA36625E98A25F72D0CEAD
+F48F4A822862095EEFA5FEA97A7A72047985E455F326F94F65F9B8ECAC0B2A42
+58396F7F3C4211EE320CBBE9280B08ED54171E44D8973256A286AF41730A9A7E
+A88FC1F92509135434BABCA88CEAAA2ED499E2F3C316529DEE9D024FC1F92FFA
+69D8BF95AE1A5ABAD706442CCA15D352D10A03384B06DB6C31AAE831013B32F7
+53C0D21ECB615D0F08BE01C0E7FB1F23715A10CE32F1E33CB40292CEDF59A4A3
+4BF715EDABE23B4D1FCFF71C40550249A03235D307F948D462944BF685530035
+1269AA516F99D95618B24B07A8D2E56F1DE82C5A2336263C46F329A5AFF5AB23
+FED8E1B05B07935581816B5A3F3412C403DCD207A1F332C79F17B711442DF1CD
+7A54B90653F78C0180FAF33C82BF371D56CCB71CC73B9EB2BB10E3617FB7E0D8
+C8AD510865216E44B6D2D3B2A02178A42766BBE1F738402C6DCE694307C8EA63
+25CCB6D7298A2200C63CEE67739D14270D1898C495361504B38A15F81057B129
+89835CA35A523E2B848DE47F50EEE2062050522B8C6E4EE0C3CDF8EA7E878C1C
+387B5BA7EAED5E890CA1508413CEAE9370286690BDE5A96E89E916A8A81A90CF
+223797B54F0C408044F035D1BCADFE1850DA6EEC5D61211A543741C36CA5A14B
+D5402FE65382DF64CE4072E5A532F009D156287866C0035953B5AC4CBFD33EB6
+AC1123A0D0B8AED978F2D9B7EA1923C104237A97AEE2263163727E98D22CC5FF
+BDC0352C9BC16ADFD1D4DC968882D53DCC5E7ADA2CA2FD67DA972CFF17735833
+D4E0DF395B0F5F8038E4B70D6CBB8DA85AAC12D8C9B63EDA42066977FAA79121
+43AE6F4692A9F7F88DC200D049FBAF35D776BDBB0B89811F2FADB8224690902B
+2A6E146A133A517CA12386AC920A4543A0F6CF05A9071074CD157C133EA7A7BC
+4E6A2874A6699DD65DC25C5859580308316E743B8938ED9DFAEA61E1F836D2D5
+F13DF35A82339269D80A1041651CB4A28B4608D0E2C326F01B698816DD20541A
+5D01822C865109022872230FC18DA7A7B3BD858712AF458F4D17F3286303F837
+954F784FF3CAC74E28C5C633A4581AB32C11B9974BDC0FC47F546A9F81FDC281
+6495A1229CA0B91B63E491842BCBFF262DE9556EFCBAE22881466AA874904438
+A57EE59D023A2D3C6EF7D5478323812CD8719A14AC99D480ACFD5CC9DC5C13B4
+28E43CC9784386169BA06D306E25C8D1BB6C0C325885423DAE98B7B74F477768
+6AC27A297360C8530142BC1E7DEFA726C2A6B191442BD7CA8936EF73087D8ADF
+6C9A1557BCA49C69E33081FD3F4766092F00DB3C7DC71CC151DEF1EBA8D9001C
+4F11AB87091DB2646CCF6D480B6E71E7106581A0509FA55E8326A428F3A2865C
+94B3A88660C35B24559ACC697DE7DB5729F33D1E72719D38CA6BBE24D3E6A0CC
+D291719268709C7AA1B4F00D42A973164E573827773F5D476D5FC2C915937065
+66C6F51D1E9293BE96E0E16AF71E5A26A64FB07D29D5548FEE89DC3A6CB98388
+5505C882BBFE323D4E7483BB1F5F75D9332C8FA1C75628FACC6F6C9CA2065DA3
+A69E213ECFE3B1EC646DAF1422AA8E8734B028314EC6318ADB331E25223E4C1A
+1312A03BC70E0A390F9F07A15E46AF1F39F561BF65790669866A9444D72C4D57
+181AD91B1350573D35122EDC10EF57CB6505EE89148D8750704A036F9B80078A
+D6DE659C19193236E531DEF598D972D826379B9C675A8CF10B3977E7088C717D
+A211BFCADDE1B91C9F79B3DB488C5EEF262F0524E6F82BE7E5D94B58953E72C9
+63F6778919F1F2126404A2E1EF9397773BB32C0C4EAA1B8E02BBE3E9FC75546A
+072611BF1D5DA8360AE0E2B199288F690859D9BA2720878301E6A358D26F04F0
+D93B36441077B89CD9ECC805B87BDD1FF13E6E4426C1CCA3E9F4141B4D268A07
+02ED31E3EE96C6E62DA983E9DDC28796995F452F5F1B9635DF1914140006FA69
+AE2D0C04D504E4B735B8BF7A5CA4ED496D56EF87389EDCD78B6870951F963F17
+A4A9E2378830CFD1B0AFAC64C93203C083D580D0DC575A69E5F2A318C35C4052
+FFFC7F4EC5DD7556DF2CE165A362FD3BD3BEB568C247569F18FD85B5CEBAB263
+9B7F1E9B5886F07E9E3BF192E462659944241030D9375DCC40E1D744CCCD18CB
+5A6595A1976E3767C0F1829F76F220A335A5EC49A6E099F7288FB1A415DE05CE
+F41FE8AF2DB82BE6B53EC82A0AB3FF14ADD98F5AFD9B68B76F5199BABA5436DC
+921C36A6AC8B245BE2702A7C036216C82E81A775D1AD068FF106789CED865D64
+A4FAA7861BF49C52065A1C9E52AFE9A0CC9BBC8863B902FA5DC046A645C3D72E
+E28FA624B18103C9782123D6AEB075E22B0707348C15159D1A3002B2822F3269
+129457B3FBDE1DD4E148B77D75A50A0A063D541DC4D00E1500E5A19BEF09BFCD
+C36D7E0B60BC2A745B50BD7B650536C563AC305C0AB63389BA4E9AB11A171D6E
+36EBB5CCA1A06960173A865B7BE57336C18BA87710092A12C88A4BB739A070B1
+92D1D52A22EA87E84B9D70A0C8764F48076F7C381E2FEA4DD8F9A86FAB2FF56A
+9FCE5A47BCFEBB78F4248513E9F117A50DF41F14379F9D61EE774F109162B87E
+A3F45F36EEAFFBC1EB63D796FE6D4FAF2D16B3807E4BE4E54F9779FA01EB853C
+B6DDCD9773EEDAD35F4795D90D17BE66400B31A2E4C3ECA5B5282E22CD2846AD
+C1D46908A493998F17D13A2416D4671F956398EBFD075FFC676F4BA9B8CD5BCE
+391B45AD842C43F98FF8FA42F6ADAF4C429DAF025AA7383F4CB0195CC514E804
+C47FC3217159F58E174481B4037112F219F4E7CD8816DD332F2596109AC3E46D
+C38E214ACBA5A55ABF5177D53782E2CE38763618ACA0E461B0B735AB5A9DC1AB
+B92F8588E3362F24202F163DB7CBB3D24A06620F0D75F621869A97DFB8678ABC
+EB57767E94672F51154F22FFF68EDC69279603BF5499F58B3BCF5ED32848F42A
+78A029DD1F5950DA3C6C4E7CB911C69A88075E14970EF23ACAB307D52A627EC4
+4359B28C00D05ADB4EB726FC31B0335E7C2942A851870D3520C5C96A4F1F834D
+584D92A454BAE25D79F2984A708C864B853B24A303F4EB132BD9DEAB438BCA65
+78864ECC83C746D63B7CF7B5CF1B9734E102007F9A0954EFB8550C43A9410168
+2D21E28DE211D231EE4A165EE129F47D07186048A152496E4FC9CE844FE45903
+076F6D4FEF780A52BCC56D8435A3949DB75C12F1F62CDFDC521CBCEC2554C460
+F700716A202A10153C800797C00F0162A14B8CB0E9B355938039773407738B57
+6380CAEAC0AA2AD724739796A9485D12ECCC0F3546F46D6040372B6E811212D0
+88758DF06DE11650C52F3C178CBE912B749351F065468DFFDCA9A01E14348D98
+EBBB9A7A168D1C4EEF97AA0C20FE37C3B3CE1CFD53AB00F5C7FA394F2123CFEB
+7A1DC68E7BA6467B2578EA2B00847F6BE6E11F77AD6EDAB10AF837551B81D429
+AB185372A6E567B73C56378A023AC24D83BDEC508CEA954A2609F0BF06389A22
+8F8D4ED71E2C0B202B68C0597DCB2421AA163E77CEEEA6908CD7F08B5DBFDD28
+DA55017714ABD1C98B5D5C8E01EAC1FFB4D4D00D7879B6EA44DFCF7C73EB1AD7
+0F8ACCC9A404496F769F5DC79FA1C28FB86F3C863D3B5961406B630D87270C63
+84FB51C5A8060B7E59211E3953A3FA571008D3677E8CED908A8BA2C7A0FBE6FF
+ADAC7053ECF03073C33A681065B5013F1F39E4D63CB657FC9DF6763440272B45
+0E908CBA727375DCE5D479B7604510D081F452E30AEE9335635BAC3FC4B4516F
+714A5D709BDB673A0E4C4A7CF7833F8011B1632F03B3C5815E4C2BC44502ECFE
+5791A5A92A8EA997530DB13A5BB2C9B8DC2E60D18FF029A88F63103AB54E9B52
+D08F82AFA775AEA9E0354C77F3442019698A08D366E88435A5FE1C388CCBDE65
+94A41A384AA4B4E47CA54D2F37B8B80FC3485EA95B33DF87A4A5CF313325C08A
+76C669C86AE536AE345D7E5A3052BAA92DBB827FB877A1EE8AB6914F672C37A2
+9469AFD84800A913AB4A1F681E7DF81E93B9C34076B32D03BDD8FFB2036A6035
+86E4CBDC20263AC0A990AFAC2EBD451CAB04EB66542AE984D0E610CA79FC3268
+CABBD8F91E8DB1AD7E81C13B5E9C682C679D48E9DC94DEDDC52A68F76DB57242
+1628F8941AF3B433B8A780C209DFA18AF329E93769DDDAABB87EB1FF71CF2401
+F3162EAB20883AE2423E84E05BD0A4D3A4BD1A3627FEBACF14E1245ABC8B378F
+406C6FD1C60F2B02B72DB5449582C0348B4DB66CD1B1800A27FC41DCC0F1B9C4
+E6ED1E83A78C452A4B55AA0A93EBEA6CC4618FEEA937695E6513B7875E4EFCDC
+643A87DE5F11B40ADA5D5A3D0F4245D5F8C8CB8D6E22
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+0000000000000000000000000000000000000000000000000000000000000000
+cleartomark
+%%EndFont
+TeXDict begin 40258431 52099146 1000 600 600 (bashref.dvi)
+@start /Fa 130[62 1[62 123[{}2 119.552 /CMTT12 rf /Fb
+133[34 41 41 55 41 43 30 30 30 41 43 38 43 64 21 41 23
+21 43 38 23 34 43 34 43 38 8[58 4[43 57 1[52 60 58 70
+3[28 58 3[59 1[54 58 7[38 38 38 38 38 38 38 38 38 38
+3[21 31[43 12[{}50 74.7198 /CMR9 rf /Fc 197[21 58[{}1
+74.7198 /CMMI9 rf /Fd 134[39 39 2[39 39 39 39 2[39 39
+39 39 2[39 39 2[39 3[39 19[39 27[39 39 2[39 45[{}18 74.7198
+/CMSLTT10 rf /Fe 129[39 39 1[39 39 39 39 39 39 39 39
+39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39 39
+39 39 39 39 39 1[39 39 39 39 39 39 39 39 39 39 1[39 39
+39 39 39 39 1[39 39 39 39 39 39 39 39 39 39 39 39 1[39
+39 39 5[39 39 39 39 39 39 39 39 39 1[39 39 39 39 39 1[39
+39 1[39 33[{}81 74.7198 /CMTT9 rf /Ff 167[62 3[60 46
+2[57 1[62 76 52 1[43 1[62 65 54 1[63 60 67[{}13 83.022
+/CMR10 rf /Fg 135[67 2[67 1[50 2[61 69 5[33 1[70 2[68
+52[60 47[{}9 109.174 /CMCSC10 rf /Fh 140[56 3[56 56 1[56
+2[56 56 56 57[56 45[{}8 109.091 /CMTT12 rf /Fi 134[48
+48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
+48 48 48 48 48 48 1[48 2[48 3[48 3[48 1[48 1[48 1[48
+48 48 1[48 48 48 1[48 48 48 48 1[48 6[48 6[48 48 48 48
+2[48 2[48 2[48 39[{}50 90.9091 /CMSLTT10 rf /Fj 134[65
+65 89 65 68 48 48 50 65 68 61 68 102 34 65 1[34 68 61
+37 56 68 55 68 60 34 6[93 1[127 2[85 68 92 92 84 92 96
+116 74 96 1[46 96 96 77 81 94 89 87 93 1[58 5[61 61 61
+61 61 61 61 61 61 61 1[34 41 34 4[34 26[68 72 11[{}63
+109.091 /CMBX12 rf /Fk 135[42 1[42 1[30 37 38 1[46 46
+51 74 23 2[28 1[42 1[42 46 42 1[46 51[33 32[51 12[{}18
+90.9091 /CMTI10 rf /Fl 135[56 2[56 1[42 55 1[51 58 56
+68 47 2[27 1[58 49 51 57 54 53 56 46[50 2[50 1[34 45[{}20
+90.9091 /CMCSC10 rf /Fm 197[25 58[{}1 90.9091 /CMMI10
+rf /Fn 197[33 58[{}1 119.552 /CMMI12 rf /Fo 134[85 85
+1[85 90 63 64 66 1[90 81 90 134 45 1[49 45 90 81 49 74
+90 72 90 78 10[122 124 112 90 120 3[126 153 97 1[83 60
+126 127 101 106 124 117 115 122 7[81 81 81 81 81 81 81
+81 81 81 35[90 94 11[{}52 143.462 /CMBX12 rf /Fp 200[0
+21[91 17[45 1[91 12[71{}5 90.9091 /CMSY10 rf /Fq 134[48
+48 66 48 51 35 36 36 48 51 45 51 76 25 48 28 25 51 45
+28 40 51 40 51 45 8[68 93 1[68 66 51 67 1[62 71 68 83
+57 71 1[33 68 71 59 62 69 66 64 68 13[45 45 45 3[30 2[45
+27[76 1[51 53 11[{}54 90.9091 /CMSL10 rf /Fr 134[71 71
+97 71 75 52 53 55 1[75 67 75 112 37 71 41 37 75 67 41
+61 75 60 75 65 3[37 1[37 1[102 102 139 102 103 94 75
+100 101 92 101 105 128 81 105 69 50 105 106 85 88 103
+97 96 102 105 64 4[37 67 67 67 67 67 67 67 67 67 67 1[37
+45 37 1[67 5[67 112 1[41 20[75 78 11[{}73 119.552 /CMBX12
+rf /Fs 129[48 48 48 48 48 48 48 48 48 48 48 48 48 48
+48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
+48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
+48 48 1[48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
+48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48 48
+48 48 48 48 48 48 48 48 33[{}93 90.9091 /CMTT10 rf /Ft
+131[91 45 40 48 48 66 48 51 35 36 36 48 51 45 51 76 25
+48 28 25 51 45 28 40 51 40 51 45 25 2[25 45 25 56 68
+68 93 68 68 66 51 67 71 62 71 68 83 57 71 47 33 68 71
+59 62 69 66 64 68 1[43 1[71 1[25 25 45 45 45 45 45 45
+45 45 45 45 45 25 30 25 2[35 35 25 71 76 45 1[45 25 18[76
+51 51 53 11[{}88 90.9091 /CMR10 rf /Fu 138[108 1[76 79
+3[108 1[54 3[108 1[59 88 1[86 1[94 14[144 4[184 10[138
+66[{}13 172.154 /CMBX12 rf end
+%%EndProlog
+%%BeginSetup
+%%Feature: *Resolution 600dpi
+TeXDict begin
+%%BeginPaperSize: Letter
+letter
+%%EndPaperSize
+ end
+%%EndSetup
+%%Page: 1 1
+TeXDict begin 1 0 bop 150 1318 a Fu(Bash)64 b(Reference)j(Man)-5
+b(ual)p 150 1385 3600 34 v 2361 1481 a Ft(Reference)31
+b(Do)s(cumen)m(tation)i(for)d(Bash)2428 1589 y(Edition)h(4.1,)g(for)f
+Fs(Bash)g Ft(V)-8 b(ersion)31 b(4.1.)3145 1697 y(Decem)m(b)s(er)g(2009)
+150 4935 y Fr(Chet)45 b(Ramey)-11 b(,)46 b(Case)g(W)-11
+b(estern)46 b(Reserv)l(e)g(Univ)l(ersit)l(y)150 5068
+y(Brian)f(F)-11 b(o)l(x,)45 b(F)-11 b(ree)45 b(Soft)l(w)l(are)h(F)-11
+b(oundation)p 150 5141 3600 17 v eop end
+%%Page: 2 2
+TeXDict begin 2 1 bop 150 2889 a Ft(This)35 b(text)h(is)g(a)g(brief)f
+(description)h(of)f(the)h(features)g(that)g(are)g(presen)m(t)g(in)f
+(the)h(Bash)f(shell)h(\(v)m(ersion)150 2999 y(4.1,)c(23)f(Decem)m(b)s
+(er)g(2009\).)150 3133 y(This)f(is)g(Edition)h(4.1,)h(last)g(up)s
+(dated)d(23)i(Decem)m(b)s(er)h(2009,)h(of)d Fq(The)g(GNU)i(Bash)e
+(Reference)i(Man)m(ual)p Ft(,)150 3243 y(for)e Fs(Bash)p
+Ft(,)g(V)-8 b(ersion)31 b(4.1.)150 3377 y(Cop)m(yrigh)m(t)602
+3374 y(c)577 3377 y Fp(\015)f Ft(1988{2009)35 b(F)-8
+b(ree)31 b(Soft)m(w)m(are)h(F)-8 b(oundation,)31 b(Inc.)150
+3512 y(P)m(ermission)h(is)h(gran)m(ted)g(to)f(mak)m(e)i(and)d
+(distribute)h(v)m(erbatim)h(copies)g(of)f(this)g(man)m(ual)h(pro)m
+(vided)f(the)150 3621 y(cop)m(yrigh)m(t)g(notice)f(and)f(this)g(p)s
+(ermission)g(notice)h(are)g(preserv)m(ed)f(on)h(all)g(copies.)390
+3756 y(P)m(ermission)k(is)h(gran)m(ted)f(to)h(cop)m(y)-8
+b(,)38 b(distribute)d(and/or)g(mo)s(dify)f(this)h(do)s(cumen)m(t)g
+(under)390 3866 y(the)j(terms)g(of)g(the)g(GNU)h(F)-8
+b(ree)39 b(Do)s(cumen)m(tation)h(License,)g(V)-8 b(ersion)39
+b(1.3)g(or)f(an)m(y)g(later)390 3975 y(v)m(ersion)28
+b(published)d(b)m(y)j(the)f(F)-8 b(ree)29 b(Soft)m(w)m(are)f(F)-8
+b(oundation;)30 b(with)d(no)g(In)m(v)-5 b(arian)m(t)28
+b(Sections,)390 4085 y(with)i(the)h(F)-8 b(ron)m(t-Co)m(v)m(er)33
+b(texts)e(b)s(eing)g(\\A)g(GNU)g(Man)m(ual",)h(and)e(with)g(the)h(Bac)m
+(k-Co)m(v)m(er)390 4194 y(T)-8 b(exts)33 b(as)g(in)f(\(a\))h(b)s(elo)m
+(w.)47 b(A)33 b(cop)m(y)g(of)f(the)h(license)g(is)g(included)e(in)h
+(the)h(section)g(en)m(titled)390 4304 y(\\GNU)e(F)-8
+b(ree)32 b(Do)s(cumen)m(tation)g(License".)390 4438 y(\(a\))f(The)f
+(FSF's)g(Bac)m(k-Co)m(v)m(er)j(T)-8 b(ext)31 b(is:)41
+b(Y)-8 b(ou)31 b(are)f(free)h(to)f(cop)m(y)h(and)f(mo)s(dify)f(this)h
+(GNU)390 4548 y(man)m(ual.)41 b(Buying)30 b(copies)h(from)e(GNU)i
+(Press)f(supp)s(orts)e(the)i(FSF)g(in)g(dev)m(eloping)h(GNU)390
+4658 y(and)f(promoting)g(soft)m(w)m(are)i(freedom.")150
+4902 y(Published)d(b)m(y)h(the)h(F)-8 b(ree)31 b(Soft)m(w)m(are)h(F)-8
+b(oundation)150 5011 y(59)31 b(T)-8 b(emple)31 b(Place,)h(Suite)e(330,)
+150 5121 y(Boston,)i(MA)e(02111-1307)150 5230 y(USA)p
+eop end
+%%Page: -1 3
+TeXDict begin -1 2 bop 3725 -116 a Ft(i)150 299 y Fo(T)-13
+b(able)53 b(of)h(Con)l(ten)l(ts)150 641 y Fr(1)135 b(In)l(tro)t
+(duction)13 b Fn(:)19 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)h(:)57 b Fr(1)275 778 y Ft(1.1)92
+b(What)31 b(is)f(Bash?)22 b Fm(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)52 b Ft(1)275 888 y(1.2)92 b(What)31
+b(is)f(a)h(shell?)13 b Fm(:)j(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)44 b Ft(1)150 1130 y Fr(2)135 b(De\014nitions)13
+b Fn(:)20 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+f(:)h(:)f(:)h(:)f(:)57 b Fr(3)150 1400 y(3)135 b(Basic)45
+b(Shell)g(F)-11 b(eatures)27 b Fn(:)21 b(:)e(:)g(:)h(:)f(:)h(:)f(:)h(:)
+f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h
+(:)f(:)72 b Fr(5)275 1537 y Ft(3.1)92 b(Shell)30 b(Syn)m(tax)25
+b Fm(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)55
+b Ft(5)399 1646 y(3.1.1)93 b(Shell)30 b(Op)s(eration)c
+Fm(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)56 b Ft(5)399 1756
+y(3.1.2)93 b(Quoting)15 b Fm(:)g(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)45 b Ft(6)524 1866 y(3.1.2.1)93 b(Escap)s(e)30
+b(Character)11 b Fm(:)16 b(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)41 b Ft(6)524 1975 y(3.1.2.2)93
+b(Single)31 b(Quotes)d Fm(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)58 b Ft(6)524
+2085 y(3.1.2.3)93 b(Double)31 b(Quotes)26 b Fm(:)16 b(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)56
+b Ft(6)524 2194 y(3.1.2.4)93 b(ANSI-C)30 b(Quoting)d
+Fm(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+f(:)g(:)h(:)57 b Ft(6)524 2304 y(3.1.2.5)93 b(Lo)s(cale-Sp)s(eci\014c)
+32 b(T)-8 b(ranslation)8 b Fm(:)16 b(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h
+(:)38 b Ft(7)399 2413 y(3.1.3)93 b(Commen)m(ts)26 b Fm(:)15
+b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)56 b
+Ft(7)275 2523 y(3.2)92 b(Shell)30 b(Commands)21 b Fm(:)14
+b(:)i(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)51 b Ft(7)399
+2633 y(3.2.1)93 b(Simple)30 b(Commands)c Fm(:)15 b(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)57
+b Ft(8)399 2742 y(3.2.2)93 b(Pip)s(elines)18 b Fm(:)d(:)g(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)48 b Ft(8)399
+2852 y(3.2.3)93 b(Lists)30 b(of)h(Commands)15 b Fm(:)f(:)h(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)45
+b Ft(8)399 2961 y(3.2.4)93 b(Comp)s(ound)28 b(Commands)22
+b Fm(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+f(:)g(:)54 b Ft(9)524 3071 y(3.2.4.1)93 b(Lo)s(oping)30
+b(Constructs)11 b Fm(:)k(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)41 b Ft(9)524 3181 y(3.2.4.2)93 b(Conditional)31
+b(Constructs)18 b Fm(:)d(:)g(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)47
+b Ft(10)524 3290 y(3.2.4.3)93 b(Grouping)30 b(Commands)15
+b Fm(:)f(:)i(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)45
+b Ft(13)399 3400 y(3.2.5)93 b(Copro)s(cesses)18 b Fm(:)d(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)47 b Ft(14)275 3509 y(3.3)92
+b(Shell)30 b(F)-8 b(unctions)29 b Fm(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)58 b Ft(14)275 3619 y(3.4)92 b(Shell)30
+b(P)m(arameters)17 b Fm(:)f(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)46
+b Ft(15)399 3729 y(3.4.1)93 b(P)m(ositional)32 b(P)m(arameters)20
+b Fm(:)d(:)f(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)50 b Ft(16)399 3838 y(3.4.2)93 b(Sp)s(ecial)30
+b(P)m(arameters)16 b Fm(:)h(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)46 b Ft(16)275 3948
+y(3.5)92 b(Shell)30 b(Expansions)17 b Fm(:)d(:)h(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+f(:)g(:)h(:)46 b Ft(17)399 4057 y(3.5.1)93 b(Brace)31
+b(Expansion)21 b Fm(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)50 b Ft(18)399
+4167 y(3.5.2)93 b(Tilde)30 b(Expansion)10 b Fm(:)15 b(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)40 b Ft(19)399 4276 y(3.5.3)93 b(Shell)30 b(P)m(arameter)i
+(Expansion)18 b Fm(:)d(:)g(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)
+48 b Ft(19)399 4386 y(3.5.4)93 b(Command)29 b(Substitution)12
+b Fm(:)j(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)42 b Ft(22)399 4496 y(3.5.5)93 b(Arithmetic)31 b(Expansion)19
+b Fm(:)c(:)g(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)48 b Ft(23)399 4605 y(3.5.6)93 b(Pro)s(cess)30
+b(Substitution)d Fm(:)15 b(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)57 b Ft(23)399 4715 y(3.5.7)93
+b(W)-8 b(ord)31 b(Splitting)20 b Fm(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)49
+b Ft(23)399 4824 y(3.5.8)93 b(Filename)32 b(Expansion)13
+b Fm(:)i(:)g(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)43 b Ft(24)524 4934 y(3.5.8.1)93 b(P)m(attern)31
+b(Matc)m(hing)d Fm(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)56 b Ft(24)399 5044 y(3.5.9)93 b(Quote)31
+b(Remo)m(v)-5 b(al)9 b Fm(:)17 b(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)39
+b Ft(25)275 5153 y(3.6)92 b(Redirections)26 b Fm(:)15
+b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)55
+b Ft(26)399 5263 y(3.6.1)93 b(Redirecting)31 b(Input)23
+b Fm(:)14 b(:)i(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)h(:)52 b Ft(27)p eop end
+%%Page: -2 4
+TeXDict begin -2 3 bop 150 -116 a Ft(ii)2612 b(Bash)31
+b(Reference)g(Man)m(ual)399 83 y(3.6.2)93 b(Redirecting)31
+b(Output)26 b Fm(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)g(:)h(:)56 b Ft(27)399 193 y(3.6.3)93
+b(App)s(ending)28 b(Redirected)k(Output)12 b Fm(:)h(:)j(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)41 b Ft(27)399 302 y(3.6.4)93 b(Redirecting)31
+b(Standard)e(Output)h(and)f(Standard)h(Error)d Fm(:)15
+b(:)g(:)h(:)f(:)h(:)f(:)g(:)58 b Ft(27)399 412 y(3.6.5)93
+b(App)s(ending)28 b(Standard)i(Output)f(and)h(Standard)f(Error)19
+b Fm(:)14 b(:)h(:)h(:)f(:)h(:)f(:)g(:)h(:)48 b Ft(28)399
+521 y(3.6.6)93 b(Here)31 b(Do)s(cumen)m(ts)c Fm(:)15
+b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)56 b Ft(28)399 631 y(3.6.7)93 b(Here)31
+b(Strings)c Fm(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)58
+b Ft(28)399 741 y(3.6.8)93 b(Duplicating)32 b(File)f(Descriptors)16
+b Fm(:)g(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)46
+b Ft(28)399 850 y(3.6.9)93 b(Mo)m(ving)32 b(File)f(Descriptors)19
+b Fm(:)d(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)49
+b Ft(29)399 960 y(3.6.10)93 b(Op)s(ening)29 b(File)j(Descriptors)f(for)
+f(Reading)h(and)f(W)-8 b(riting)19 b Fm(:)e(:)e(:)h(:)f(:)h(:)f(:)49
+b Ft(29)275 1069 y(3.7)92 b(Executing)31 b(Commands)17
+b Fm(:)d(:)h(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)46 b Ft(29)399 1179 y(3.7.1)93
+b(Simple)30 b(Command)f(Expansion)23 b Fm(:)15 b(:)g(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)52 b Ft(29)399 1289 y(3.7.2)93 b(Command)29
+b(Searc)m(h)i(and)f(Execution)d Fm(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)56
+b Ft(30)399 1398 y(3.7.3)93 b(Command)29 b(Execution)i(En)m(vironmen)m
+(t)8 b Fm(:)16 b(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)38 b Ft(30)399 1508
+y(3.7.4)93 b(En)m(vironmen)m(t)18 b Fm(:)d(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)47 b Ft(31)399 1617 y(3.7.5)93 b(Exit)31 b(Status)c
+Fm(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)57 b
+Ft(32)399 1727 y(3.7.6)93 b(Signals)15 b Fm(:)g(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)44 b Ft(32)275 1836
+y(3.8)92 b(Shell)30 b(Scripts)23 b Fm(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)g(:)h(:)53 b Ft(33)150 2079 y Fr(4)135
+b(Shell)45 b(Builtin)g(Commands)22 b Fn(:)e(:)g(:)f(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)67
+b Fr(35)275 2216 y Ft(4.1)92 b(Bourne)30 b(Shell)g(Builtins)e
+Fm(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)57 b Ft(35)275 2325 y(4.2)92
+b(Bash)30 b(Builtin)h(Commands)24 b Fm(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)54
+b Ft(41)275 2435 y(4.3)92 b(Mo)s(difying)30 b(Shell)g(Beha)m(vior)9
+b Fm(:)17 b(:)f(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)39 b Ft(51)399 2545 y(4.3.1)93 b(The)30
+b(Set)g(Builtin)c Fm(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)55 b
+Ft(51)399 2654 y(4.3.2)93 b(The)30 b(Shopt)f(Builtin)13
+b Fm(:)j(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)43 b Ft(55)275 2764 y(4.4)92 b(Sp)s(ecial)30
+b(Builtins)21 b Fm(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)50
+b Ft(59)150 3006 y Fr(5)135 b(Shell)45 b(V)-11 b(ariables)19
+b Fn(:)h(:)g(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)64
+b Fr(61)275 3143 y Ft(5.1)92 b(Bourne)30 b(Shell)g(V)-8
+b(ariables)22 b Fm(:)16 b(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)51 b Ft(61)275
+3253 y(5.2)92 b(Bash)30 b(V)-8 b(ariables)16 b Fm(:)h(:)f(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)46 b Ft(61)150 3495 y
+Fr(6)135 b(Bash)44 b(F)-11 b(eatures)13 b Fn(:)20 b(:)g(:)f(:)g(:)h(:)f
+(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)58 b Fr(71)275
+3632 y Ft(6.1)92 b(In)m(v)m(oking)31 b(Bash)d Fm(:)16
+b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)58 b
+Ft(71)275 3742 y(6.2)92 b(Bash)30 b(Startup)g(Files)20
+b Fm(:)c(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)49 b Ft(73)275
+3851 y(6.3)92 b(In)m(teractiv)m(e)32 b(Shells)11 b Fm(:)16
+b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)41 b Ft(75)399
+3961 y(6.3.1)93 b(What)31 b(is)f(an)h(In)m(teractiv)m(e)h(Shell?)17
+b Fm(:)f(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)47 b
+Ft(75)399 4071 y(6.3.2)93 b(Is)30 b(this)g(Shell)g(In)m(teractiv)m(e?)
+14 b Fm(:)k(:)e(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+44 b Ft(75)399 4180 y(6.3.3)93 b(In)m(teractiv)m(e)33
+b(Shell)d(Beha)m(vior)23 b Fm(:)17 b(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)52 b Ft(75)275 4290 y(6.4)92 b(Bash)30
+b(Conditional)h(Expressions)22 b Fm(:)14 b(:)i(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)g(:)h(:)51 b Ft(76)275 4399 y(6.5)92
+b(Shell)30 b(Arithmetic)c Fm(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)55 b Ft(78)275 4509 y(6.6)92 b(Aliases)12 b Fm(:)k(:)g(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)42
+b Ft(79)275 4619 y(6.7)92 b(Arra)m(ys)17 b Fm(:)e(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)47
+b Ft(80)275 4728 y(6.8)92 b(The)29 b(Directory)j(Stac)m(k)e
+Fm(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)58 b Ft(81)399 4838 y(6.8.1)93
+b(Directory)32 b(Stac)m(k)f(Builtins)14 b Fm(:)i(:)g(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)44 b Ft(81)275
+4947 y(6.9)92 b(Con)m(trolling)31 b(the)g(Prompt)24 b
+Fm(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)54 b Ft(82)275 5057 y(6.10)92 b(The)30
+b(Restricted)h(Shell)23 b Fm(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)53
+b Ft(84)275 5166 y(6.11)92 b(Bash)31 b(POSIX)e(Mo)s(de)9
+b Fm(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)38 b Ft(84)p eop
+end
+%%Page: -3 5
+TeXDict begin -3 4 bop 3674 -116 a Ft(iii)150 83 y Fr(7)135
+b(Job)45 b(Con)l(trol)24 b Fn(:)c(:)g(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)69 b Fr(89)275 220 y
+Ft(7.1)92 b(Job)30 b(Con)m(trol)h(Basics)17 b Fm(:)f(:)g(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)47 b Ft(89)275 330 y(7.2)92 b(Job)30 b(Con)m(trol)h
+(Builtins)25 b Fm(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)55 b Ft(90)275
+439 y(7.3)92 b(Job)30 b(Con)m(trol)h(V)-8 b(ariables)19
+b Fm(:)e(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)49 b Ft(92)150 682 y Fr(8)135
+b(Command)45 b(Line)g(Editing)27 b Fn(:)20 b(:)g(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)72
+b Fr(93)275 819 y Ft(8.1)92 b(In)m(tro)s(duction)30 b(to)h(Line)f
+(Editing)d Fm(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)56 b Ft(93)275 928 y(8.2)92 b(Readline)31
+b(In)m(teraction)8 b Fm(:)17 b(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)38
+b Ft(93)399 1038 y(8.2.1)93 b(Readline)31 b(Bare)g(Essen)m(tials)d
+Fm(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)57
+b Ft(94)399 1147 y(8.2.2)93 b(Readline)31 b(Mo)m(v)m(emen)m(t)i
+(Commands)27 b Fm(:)15 b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)57
+b Ft(94)399 1257 y(8.2.3)93 b(Readline)31 b(Killing)g(Commands)19
+b Fm(:)14 b(:)i(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)49
+b Ft(95)399 1367 y(8.2.4)93 b(Readline)31 b(Argumen)m(ts)11
+b Fm(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+f(:)g(:)h(:)f(:)41 b Ft(95)399 1476 y(8.2.5)93 b(Searc)m(hing)31
+b(for)f(Commands)f(in)h(the)h(History)9 b Fm(:)16 b(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)38
+b Ft(95)275 1586 y(8.3)92 b(Readline)31 b(Init)f(File)23
+b Fm(:)16 b(:)g(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)52 b Ft(96)399
+1695 y(8.3.1)93 b(Readline)31 b(Init)f(File)i(Syn)m(tax)15
+b Fm(:)g(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)44
+b Ft(96)399 1805 y(8.3.2)93 b(Conditional)31 b(Init)f(Constructs)25
+b Fm(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)56
+b Ft(102)399 1914 y(8.3.3)93 b(Sample)30 b(Init)g(File)12
+b Fm(:)17 b(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)42 b Ft(103)275 2024 y(8.4)92
+b(Bindable)30 b(Readline)h(Commands)11 b Fm(:)k(:)g(:)g(:)h(:)f(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)g(:)h(:)41 b Ft(106)399 2134 y(8.4.1)93
+b(Commands)29 b(F)-8 b(or)31 b(Mo)m(ving)e Fm(:)16 b(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)58 b Ft(106)399
+2243 y(8.4.2)93 b(Commands)29 b(F)-8 b(or)31 b(Manipulating)g(The)f
+(History)17 b Fm(:)g(:)e(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)47 b Ft(107)399 2353 y(8.4.3)93 b(Commands)29 b(F)-8
+b(or)31 b(Changing)f(T)-8 b(ext)21 b Fm(:)c(:)e(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+51 b Ft(108)399 2462 y(8.4.4)93 b(Killing)31 b(And)e(Y)-8
+b(anking)22 b Fm(:)17 b(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+f(:)g(:)h(:)f(:)h(:)52 b Ft(109)399 2572 y(8.4.5)93 b(Sp)s(ecifying)30
+b(Numeric)g(Argumen)m(ts)17 b Fm(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)47
+b Ft(110)399 2682 y(8.4.6)93 b(Letting)31 b(Readline)g(T)m(yp)s(e)f(F)
+-8 b(or)31 b(Y)-8 b(ou)12 b Fm(:)k(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)42
+b Ft(110)399 2791 y(8.4.7)93 b(Keyb)s(oard)29 b(Macros)21
+b Fm(:)16 b(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)51 b Ft(112)399 2901 y(8.4.8)93 b(Some)30
+b(Miscellaneous)j(Commands)24 b Fm(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)55
+b Ft(112)275 3010 y(8.5)92 b(Readline)31 b(vi)f(Mo)s(de)20
+b Fm(:)15 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)50 b Ft(114)275
+3120 y(8.6)92 b(Programmable)30 b(Completion)16 b Fm(:)g(:)f(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)46
+b Ft(115)275 3230 y(8.7)92 b(Programmable)30 b(Completion)h(Builtins)c
+Fm(:)15 b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)56 b Ft(117)150
+3472 y Fr(9)135 b(Using)45 b(History)h(In)l(teractiv)l(ely)39
+b Fn(:)19 b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h
+(:)80 b Fr(121)275 3609 y Ft(9.1)92 b(Bash)30 b(History)h(F)-8
+b(acilities)21 b Fm(:)d(:)e(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)51 b Ft(121)275 3719
+y(9.2)92 b(Bash)30 b(History)h(Builtins)19 b Fm(:)d(:)g(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)49
+b Ft(121)275 3828 y(9.3)92 b(History)31 b(Expansion)21
+b Fm(:)15 b(:)g(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)52 b Ft(123)399 3938
+y(9.3.1)93 b(Ev)m(en)m(t)31 b(Designators)10 b Fm(:)18
+b(:)d(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)40 b Ft(123)399 4047 y(9.3.2)93 b(W)-8 b(ord)31
+b(Designators)17 b Fm(:)g(:)e(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)47 b Ft(124)399 4157
+y(9.3.3)93 b(Mo)s(di\014ers)26 b Fm(:)16 b(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)57 b Ft(125)150 4399 y Fr(10)135 b(Installing)46
+b(Bash)24 b Fn(:)c(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f
+(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)68
+b Fr(127)275 4536 y Ft(10.1)92 b(Basic)32 b(Installation)20
+b Fm(:)d(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)50 b Ft(127)275 4646
+y(10.2)92 b(Compilers)30 b(and)g(Options)8 b Fm(:)15
+b(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)38 b Ft(128)275 4755 y(10.3)92 b(Compiling)30
+b(F)-8 b(or)32 b(Multiple)f(Arc)m(hitectures)21 b Fm(:)c(:)e(:)h(:)f(:)
+h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g
+(:)52 b Ft(128)275 4865 y(10.4)92 b(Installation)32 b(Names)13
+b Fm(:)j(:)g(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)43 b Ft(128)275 4975 y(10.5)92
+b(Sp)s(ecifying)30 b(the)g(System)h(T)m(yp)s(e)12 b Fm(:)j(:)g(:)h(:)f
+(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)42 b Ft(128)275
+5084 y(10.6)92 b(Sharing)30 b(Defaults)15 b Fm(:)i(:)e(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)46 b Ft(129)275 5194 y(10.7)92 b(Op)s(eration)30
+b(Con)m(trols)24 b Fm(:)16 b(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)54 b Ft(129)275
+5303 y(10.8)92 b(Optional)31 b(F)-8 b(eatures)10 b Fm(:)17
+b(:)e(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)40 b Ft(129)p eop end
+%%Page: -4 6
+TeXDict begin -4 5 bop 150 -116 a Ft(iv)2589 b(Bash)31
+b(Reference)g(Man)m(ual)150 83 y Fr(App)t(endix)44 b(A)160
+b(Rep)t(orting)46 b(Bugs)35 b Fn(:)20 b(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)80 b Fr(135)150 353 y(App)t(endix)44
+b(B)166 b(Ma)7 b(jor)45 b(Di\013erences)i(F)-11 b(rom)44
+b(The)419 486 y(Bourne)g(Shell)35 b Fn(:)19 b(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)78 b Fr(137)275 623 y Ft(B.1)92
+b(Implemen)m(tation)31 b(Di\013erences)h(F)-8 b(rom)31
+b(The)e(SVR4.2)j(Shell)13 b Fm(:)i(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)43
+b Ft(141)150 865 y Fr(App)t(endix)h(C)165 b(GNU)45 b(F)-11
+b(ree)45 b(Do)t(cumen)l(tation)h(License)439 998 y Fn(:)19
+b(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)64 b Fr(143)150
+1268 y(App)t(endix)44 b(D)159 b(Indexes)15 b Fn(:)20
+b(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)59 b Fr(151)275 1405
+y Ft(D.1)92 b(Index)29 b(of)i(Shell)f(Builtin)h(Commands)16
+b Fm(:)e(:)i(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)
+h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)46 b Ft(151)275
+1514 y(D.2)92 b(Index)29 b(of)i(Shell)f(Reserv)m(ed)h(W)-8
+b(ords)12 b Fm(:)j(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h
+(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)42
+b Ft(152)275 1624 y(D.3)92 b(P)m(arameter)31 b(and)f(V)-8
+b(ariable)32 b(Index)20 b Fm(:)14 b(:)i(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)50 b Ft(152)275 1733 y(D.4)92 b(F)-8 b(unction)31
+b(Index)16 b Fm(:)f(:)g(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f
+(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)47
+b Ft(154)275 1843 y(D.5)92 b(Concept)30 b(Index)d Fm(:)15
+b(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h
+(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)h(:)f(:)g(:)h(:)
+f(:)h(:)f(:)g(:)h(:)f(:)h(:)f(:)g(:)h(:)57 b Ft(156)p
+eop end
+%%Page: 1 7
+TeXDict begin 1 6 bop 150 -116 a Ft(Chapter)30 b(1:)41
+b(In)m(tro)s(duction)2592 b(1)150 299 y Fo(1)80 b(In)l(tro)t(duction)
+150 602 y Fr(1.1)68 b(What)45 b(is)g(Bash?)150 762 y
+Ft(Bash)38 b(is)g(the)g(shell,)i(or)d(command)h(language)h(in)m
+(terpreter,)h(for)e(the)g Fl(gnu)f Ft(op)s(erating)h(system.)63
+b(The)150 871 y(name)33 b(is)g(an)g(acron)m(ym)g(for)g(the)g(`)p
+Fs(Bourne-Again)27 b(SHell)p Ft(',)32 b(a)i(pun)d(on)i(Stephen)f
+(Bourne,)h(the)g(author)150 981 y(of)f(the)f(direct)h(ancestor)h(of)e
+(the)h(curren)m(t)f(Unix)g(shell)h Fs(sh)p Ft(,)f(whic)m(h)g(app)s
+(eared)g(in)g(the)h(Sev)m(en)m(th)g(Edition)150 1091
+y(Bell)g(Labs)e(Researc)m(h)h(v)m(ersion)g(of)f(Unix.)275
+1220 y(Bash)f(is)g(largely)i(compatible)f(with)f Fs(sh)g
+Ft(and)g(incorp)s(orates)g(useful)g(features)g(from)g(the)g(Korn)g
+(shell)150 1330 y Fs(ksh)37 b Ft(and)h(the)g(C)g(shell)g
+Fs(csh)p Ft(.)64 b(It)38 b(is)g(in)m(tended)g(to)h(b)s(e)f(a)g
+(conforman)m(t)h(implemen)m(tation)h(of)e(the)g Fl(ieee)150
+1439 y(posix)c Ft(Shell)g(and)g(T)-8 b(o)s(ols)35 b(p)s(ortion)f(of)g
+(the)h Fl(ieee)f(posix)f Ft(sp)s(eci\014cation)j(\()p
+Fl(ieee)e Ft(Standard)f(1003.1\).)56 b(It)150 1549 y(o\013ers)31
+b(functional)f(impro)m(v)m(emen)m(ts)i(o)m(v)m(er)g Fs(sh)d
+Ft(for)i(b)s(oth)e(in)m(teractiv)m(e)k(and)d(programming)g(use.)275
+1679 y(While)h(the)g Fl(gnu)f Ft(op)s(erating)h(system)g(pro)m(vides)f
+(other)h(shells,)g(including)f(a)h(v)m(ersion)g(of)g
+Fs(csh)p Ft(,)f(Bash)150 1788 y(is)j(the)h(default)f(shell.)49
+b(Lik)m(e)34 b(other)g Fl(gnu)f Ft(soft)m(w)m(are,)i(Bash)f(is)f(quite)
+h(p)s(ortable.)49 b(It)33 b(curren)m(tly)g(runs)f(on)150
+1898 y(nearly)c(ev)m(ery)g(v)m(ersion)g(of)f(Unix)h(and)e(a)i(few)f
+(other)h(op)s(erating)g(systems)f Fp(\000)g Ft(indep)s(enden)m
+(tly-supp)s(orted)150 2008 y(p)s(orts)j(exist)h(for)f
+Fl(ms-dos)p Ft(,)f Fl(os/2)p Ft(,)i(and)f(Windo)m(ws)g(platforms.)150
+2231 y Fr(1.2)68 b(What)45 b(is)g(a)h(shell?)150 2390
+y Ft(A)m(t)32 b(its)f(base,)h(a)f(shell)g(is)h(simply)e(a)h(macro)h
+(pro)s(cessor)f(that)g(executes)i(commands.)42 b(The)30
+b(term)h(macro)150 2500 y(pro)s(cessor)25 b(means)g(functionalit)m(y)i
+(where)d(text)j(and)d(sym)m(b)s(ols)h(are)h(expanded)e(to)i(create)h
+(larger)f(expres-)150 2609 y(sions.)275 2739 y(A)34 b(Unix)h(shell)g
+(is)f(b)s(oth)g(a)h(command)g(in)m(terpreter)g(and)f(a)h(programming)f
+(language.)55 b(As)35 b(a)g(com-)150 2848 y(mand)30 b(in)m(terpreter,)i
+(the)g(shell)f(pro)m(vides)g(the)h(user)e(in)m(terface)j(to)f(the)f
+(ric)m(h)h(set)g(of)f Fl(gnu)g Ft(utilities.)44 b(The)150
+2958 y(programming)30 b(language)h(features)f(allo)m(w)h(these)g
+(utilities)g(to)g(b)s(e)e(com)m(bined.)41 b(Files)31
+b(con)m(taining)g(com-)150 3068 y(mands)e(can)i(b)s(e)e(created,)j(and)
+d(b)s(ecome)i(commands)f(themselv)m(es.)42 b(These)30
+b(new)f(commands)h(ha)m(v)m(e)i(the)150 3177 y(same)f(status)h(as)f
+(system)g(commands)g(in)g(directories)h(suc)m(h)f(as)g(`)p
+Fs(/bin)p Ft(',)g(allo)m(wing)i(users)d(or)h(groups)f(to)150
+3287 y(establish)h(custom)f(en)m(vironmen)m(ts)h(to)g(automate)h(their)
+f(common)f(tasks.)275 3417 y(Shells)j(ma)m(y)h(b)s(e)f(used)g(in)m
+(teractiv)m(ely)k(or)d(non-in)m(teractiv)m(ely)-8 b(.)54
+b(In)33 b(in)m(teractiv)m(e)j(mo)s(de,)f(they)e(accept)150
+3526 y(input)21 b(t)m(yp)s(ed)h(from)g(the)h(k)m(eyb)s(oard.)37
+b(When)22 b(executing)i(non-in)m(teractiv)m(ely)-8 b(,)27
+b(shells)c(execute)g(commands)150 3636 y(read)30 b(from)g(a)h(\014le.)
+275 3765 y(A)41 b(shell)g(allo)m(ws)h(execution)h(of)e
+Fl(gnu)g Ft(commands,)i(b)s(oth)e(sync)m(hronously)f(and)h(async)m
+(hronously)-8 b(.)150 3875 y(The)29 b(shell)g(w)m(aits)i(for)e(sync)m
+(hronous)f(commands)h(to)h(complete)h(b)s(efore)e(accepting)i(more)e
+(input;)g(asyn-)150 3985 y(c)m(hronous)22 b(commands)h(con)m(tin)m(ue)h
+(to)f(execute)h(in)e(parallel)i(with)f(the)f(shell)h(while)g(it)g
+(reads)g(and)f(executes)150 4094 y(additional)35 b(commands.)50
+b(The)33 b Fq(redirection)h Ft(constructs)g(p)s(ermit)f(\014ne-grained)
+g(con)m(trol)i(of)f(the)g(input)150 4204 y(and)40 b(output)f(of)i
+(those)f(commands.)70 b(Moreo)m(v)m(er,)45 b(the)c(shell)f(allo)m(ws)h
+(con)m(trol)h(o)m(v)m(er)g(the)e(con)m(ten)m(ts)i(of)150
+4313 y(commands')30 b(en)m(vironmen)m(ts.)275 4443 y(Shells)k(also)i
+(pro)m(vide)g(a)f(small)h(set)f(of)g(built-in)g(commands)g(\()p
+Fq(builtins)t Ft(\))g(implemen)m(ting)h(function-)150
+4553 y(alit)m(y)i(imp)s(ossible)e(or)g(incon)m(v)m(enien)m(t)j(to)e
+(obtain)g(via)g(separate)g(utilities.)61 b(F)-8 b(or)37
+b(example,)i Fs(cd)p Ft(,)e Fs(break)p Ft(,)150 4662
+y Fs(continue)p Ft(,)43 b(and)f Fs(exec)p Ft(\))g(cannot)h(b)s(e)e
+(implemen)m(ted)i(outside)g(of)f(the)h(shell)f(b)s(ecause)h(they)f
+(directly)150 4772 y(manipulate)37 b(the)g(shell)f(itself.)61
+b(The)36 b Fs(history)p Ft(,)g Fs(getopts)p Ft(,)g Fs(kill)p
+Ft(,)h(or)g Fs(pwd)f Ft(builtins,)h(among)h(others,)150
+4881 y(could)33 b(b)s(e)f(implemen)m(ted)h(in)g(separate)g(utilities,)i
+(but)d(they)h(are)h(more)f(con)m(v)m(enien)m(t)h(to)g(use)e(as)h
+(builtin)150 4991 y(commands.)40 b(All)31 b(of)g(the)f(shell)h
+(builtins)f(are)h(describ)s(ed)e(in)h(subsequen)m(t)g(sections.)275
+5121 y(While)39 b(executing)h(commands)e(is)g(essen)m(tial,)43
+b(most)c(of)g(the)g(p)s(o)m(w)m(er)f(\(and)g(complexit)m(y\))j(of)e
+(shells)150 5230 y(is)34 b(due)f(to)i(their)f(em)m(b)s(edded)f
+(programming)h(languages.)52 b(Lik)m(e)35 b(an)m(y)f(high-lev)m(el)i
+(language,)h(the)d(shell)150 5340 y(pro)m(vides)c(v)-5
+b(ariables,)32 b(\015o)m(w)e(con)m(trol)i(constructs,)f(quoting,)g(and)
+f(functions.)p eop end
+%%Page: 2 8
+TeXDict begin 2 7 bop 150 -116 a Ft(2)2617 b(Bash)31
+b(Reference)g(Man)m(ual)275 299 y(Shells)21 b(o\013er)i(features)f
+(geared)h(sp)s(eci\014cally)g(for)f(in)m(teractiv)m(e)j(use)d(rather)g
+(than)g(to)h(augmen)m(t)g(the)f(pro-)150 408 y(gramming)32
+b(language.)48 b(These)32 b(in)m(teractiv)m(e)j(features)d(include)g
+(job)g(con)m(trol,)j(command)c(line)i(editing,)150 518
+y(command)d(history)g(and)g(aliases.)42 b(Eac)m(h)31
+b(of)g(these)g(features)f(is)h(describ)s(ed)e(in)h(this)g(man)m(ual.)p
+eop end
+%%Page: 3 9
+TeXDict begin 3 8 bop 150 -116 a Ft(Chapter)30 b(2:)41
+b(De\014nitions)2662 b(3)150 299 y Fo(2)80 b(De\014nitions)150
+552 y Ft(These)30 b(de\014nitions)g(are)h(used)e(throughout)h(the)h
+(remainder)f(of)g(this)h(man)m(ual.)150 720 y Fs(POSIX)240
+b Ft(A)27 b(family)g(of)g(op)s(en)f(system)g(standards)g(based)g(on)h
+(Unix.)39 b(Bash)27 b(is)g(primarily)f(concerned)630
+830 y(with)k(the)h(Shell)f(and)g(Utilities)i(p)s(ortion)e(of)h(the)f
+Fl(posix)g Ft(1003.1)j(standard.)150 995 y Fs(blank)240
+b Ft(A)30 b(space)h(or)g(tab)f(c)m(haracter.)150 1161
+y Fs(builtin)144 b Ft(A)35 b(command)g(that)g(is)g(implemen)m(ted)g(in)
+m(ternally)h(b)m(y)f(the)g(shell)g(itself,)i(rather)d(than)h(b)m(y)630
+1271 y(an)30 b(executable)i(program)e(somewhere)h(in)f(the)g(\014le)h
+(system.)150 1436 y Fs(control)d(operator)630 1546 y
+Ft(A)20 b Fs(token)f Ft(that)i(p)s(erforms)e(a)i(con)m(trol)g
+(function.)37 b(It)21 b(is)f(a)h Fs(newline)d Ft(or)j(one)f(of)h(the)f
+(follo)m(wing:)630 1655 y(`)p Fs(||)p Ft(',)31 b(`)p
+Fs(&&)p Ft(',)f(`)p Fs(&)p Ft(',)h(`)p Fs(;)p Ft(',)g(`)p
+Fs(;;)p Ft(',)f(`)p Fs(|)p Ft(',)h(`)p Fs(|&)p Ft(',)f(`)p
+Fs(\()p Ft(',)h(or)g(`)p Fs(\))p Ft('.)150 1821 y Fs(exit)e(status)630
+1931 y Ft(The)f(v)-5 b(alue)29 b(returned)e(b)m(y)h(a)h(command)f(to)h
+(its)g(caller.)41 b(The)28 b(v)-5 b(alue)29 b(is)f(restricted)h(to)h
+(eigh)m(t)630 2040 y(bits,)h(so)f(the)h(maxim)m(um)f(v)-5
+b(alue)31 b(is)f(255.)150 2206 y Fs(field)240 b Ft(A)27
+b(unit)g(of)g(text)h(that)g(is)f(the)g(result)g(of)g(one)h(of)f(the)g
+(shell)g(expansions.)40 b(After)27 b(expansion,)630 2315
+y(when)e(executing)h(a)g(command,)h(the)f(resulting)f(\014elds)g(are)h
+(used)f(as)h(the)g(command)f(name)630 2425 y(and)30 b(argumen)m(ts.)150
+2591 y Fs(filename)96 b Ft(A)30 b(string)h(of)f(c)m(haracters)i(used)e
+(to)h(iden)m(tify)g(a)f(\014le.)150 2756 y Fs(job)336
+b Ft(A)31 b(set)h(of)f(pro)s(cesses)g(comprising)g(a)g(pip)s(eline,)g
+(and)g(an)m(y)g(pro)s(cesses)g(descended)g(from)f(it,)630
+2866 y(that)h(are)g(all)g(in)f(the)h(same)f(pro)s(cess)g(group.)150
+3031 y Fs(job)f(control)630 3141 y Ft(A)22 b(mec)m(hanism)g(b)m(y)f
+(whic)m(h)h(users)f(can)h(selectiv)m(ely)i(stop)e(\(susp)s(end\))e(and)
+h(restart)i(\(resume\))630 3251 y(execution)32 b(of)e(pro)s(cesses.)150
+3416 y Fs(metacharacter)630 3526 y Ft(A)25 b(c)m(haracter)i(that,)g
+(when)d(unquoted,)i(separates)g(w)m(ords.)38 b(A)26 b(metac)m(haracter)
+i(is)d(a)g Fs(blank)630 3635 y Ft(or)30 b(one)h(of)g(the)f(follo)m
+(wing)i(c)m(haracters:)42 b(`)p Fs(|)p Ft(',)31 b(`)p
+Fs(&)p Ft(',)g(`)p Fs(;)p Ft(',)g(`)p Fs(\()p Ft(',)f(`)p
+Fs(\))p Ft(',)h(`)p Fs(<)p Ft(',)g(or)f(`)p Fs(>)p Ft('.)150
+3801 y Fs(name)288 b Ft(A)37 b Fs(word)f Ft(consisting)i(solely)h(of)e
+(letters,)j(n)m(um)m(b)s(ers,)e(and)f(underscores,)h(and)f(b)s
+(eginning)630 3910 y(with)23 b(a)g(letter)h(or)f(underscore.)38
+b Fs(Name)p Ft(s)22 b(are)h(used)f(as)i(shell)f(v)-5
+b(ariable)24 b(and)e(function)h(names.)630 4020 y(Also)31
+b(referred)f(to)h(as)f(an)h Fs(identifier)p Ft(.)150
+4186 y Fs(operator)96 b Ft(A)38 b Fs(control)28 b(operator)36
+b Ft(or)h(a)i Fs(redirection)27 b(operator)p Ft(.)61
+b(See)38 b(Section)g(3.6)h([Redirec-)630 4295 y(tions],)f(page)f(26,)i
+(for)d(a)g(list)h(of)f(redirection)h(op)s(erators.)58
+b(Op)s(erators)35 b(con)m(tain)j(at)f(least)630 4405
+y(one)31 b(unquoted)e Fs(metacharacter)p Ft(.)150 4570
+y Fs(process)f(group)630 4680 y Ft(A)i(collection)k(of)c(related)h(pro)
+s(cesses)g(eac)m(h)g(ha)m(ving)g(the)g(same)f(pro)s(cess)g(group)g
+Fl(id)p Ft(.)150 4846 y Fs(process)e(group)h(ID)630 4955
+y Ft(A)h(unique)g(iden)m(ti\014er)h(that)f(represen)m(ts)h(a)g
+Fs(process)d(group)h Ft(during)g(its)i(lifetime.)150
+5121 y Fs(reserved)d(word)630 5230 y Ft(A)h Fs(word)e
+Ft(that)i(has)f(a)h(sp)s(ecial)g(meaning)f(to)h(the)g(shell.)40
+b(Most)30 b(reserv)m(ed)e(w)m(ords)g(in)m(tro)s(duce)630
+5340 y(shell)j(\015o)m(w)f(con)m(trol)i(constructs,)f(suc)m(h)f(as)g
+Fs(for)g Ft(and)g Fs(while)p Ft(.)p eop end
+%%Page: 4 10
+TeXDict begin 4 9 bop 150 -116 a Ft(4)2617 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fs(return)e(status)630
+408 y Ft(A)h(synon)m(ym)g(for)g Fs(exit)g(status)p Ft(.)150
+568 y Fs(signal)192 b Ft(A)40 b(mec)m(hanism)h(b)m(y)e(whic)m(h)h(a)h
+(pro)s(cess)e(ma)m(y)i(b)s(e)e(noti\014ed)h(b)m(y)g(the)h(k)m(ernel)f
+(of)g(an)g(ev)m(en)m(t)630 677 y(o)s(ccurring)30 b(in)g(the)h(system.)
+150 837 y Fs(special)d(builtin)630 946 y Ft(A)j(shell)f(builtin)g
+(command)h(that)g(has)f(b)s(een)g(classi\014ed)h(as)g(sp)s(ecial)g(b)m
+(y)f(the)h Fl(posix)f Ft(stan-)630 1056 y(dard.)150 1215
+y Fs(token)240 b Ft(A)38 b(sequence)h(of)f(c)m(haracters)h(considered)f
+(a)h(single)g(unit)e(b)m(y)h(the)h(shell.)64 b(It)38
+b(is)g(either)h(a)630 1325 y Fs(word)29 b Ft(or)i(an)f
+Fs(operator)p Ft(.)150 1484 y Fs(word)288 b Ft(A)28 b(sequence)g(of)g
+(c)m(haracters)h(treated)g(as)f(a)g(unit)f(b)m(y)h(the)g(shell.)40
+b(W)-8 b(ords)28 b(ma)m(y)g(not)g(include)630 1594 y(unquoted)i
+Fs(metacharacters)p Ft(.)p eop end
+%%Page: 5 11
+TeXDict begin 5 10 bop 150 -116 a Ft(Chapter)30 b(3:)41
+b(Basic)32 b(Shell)e(F)-8 b(eatures)2292 b(5)150 299
+y Fo(3)80 b(Basic)54 b(Shell)e(F)-13 b(eatures)150 603
+y Ft(Bash)21 b(is)g(an)f(acron)m(ym)i(for)e(`)p Fs(Bourne-Again)27
+b(SHell)p Ft('.)37 b(The)20 b(Bourne)g(shell)h(is)g(the)g(traditional)h
+(Unix)f(shell)150 712 y(originally)h(written)f(b)m(y)f(Stephen)g
+(Bourne.)38 b(All)21 b(of)g(the)g(Bourne)f(shell)h(builtin)f(commands)g
+(are)i(a)m(v)-5 b(ailable)150 822 y(in)26 b(Bash,)h(The)f(rules)f(for)h
+(ev)-5 b(aluation)28 b(and)d(quoting)h(are)h(tak)m(en)g(from)f(the)g
+Fl(posix)f Ft(sp)s(eci\014cation)i(for)f(the)150 931
+y(`standard')k(Unix)g(shell.)275 1089 y(This)h(c)m(hapter)i(brie\015y)e
+(summarizes)h(the)h(shell's)f(`building)g(blo)s(c)m(ks':)45
+b(commands,)32 b(con)m(trol)i(struc-)150 1199 y(tures,)k(shell)e
+(functions,)h(shell)g Fk(p)-5 b(ar)g(ameters)p Ft(,)41
+b(shell)36 b(expansions,)i Fk(r)-5 b(e)g(dir)g(e)g(ctions)p
+Ft(,)40 b(whic)m(h)c(are)h(a)f(w)m(a)m(y)h(to)150 1308
+y(direct)31 b(input)e(and)h(output)g(from)g(and)g(to)h(named)f
+(\014les,)g(and)g(ho)m(w)g(the)h(shell)g(executes)g(commands.)150
+1576 y Fr(3.1)68 b(Shell)45 b(Syn)l(tax)150 1735 y Ft(When)40
+b(the)h(shell)g(reads)f(input,)i(it)f(pro)s(ceeds)f(through)g(a)h
+(sequence)g(of)g(op)s(erations.)71 b(If)40 b(the)h(input)150
+1845 y(indicates)31 b(the)f(b)s(eginning)f(of)h(a)g(commen)m(t,)h(the)f
+(shell)g(ignores)g(the)g(commen)m(t)h(sym)m(b)s(ol)f(\(`)p
+Fs(#)p Ft('\),)h(and)e(the)150 1954 y(rest)i(of)f(that)h(line.)275
+2112 y(Otherwise,)h(roughly)f(sp)s(eaking,)i(the)f(shell)g(reads)g(its)
+g(input)f(and)h(divides)f(the)i(input)e(in)m(to)h(w)m(ords)150
+2222 y(and)23 b(op)s(erators,)j(emplo)m(ying)e(the)g(quoting)h(rules)e
+(to)h(select)i(whic)m(h)d(meanings)h(to)h(assign)f(v)-5
+b(arious)23 b(w)m(ords)150 2331 y(and)30 b(c)m(haracters.)275
+2489 y(The)38 b(shell)h(then)f(parses)g(these)h(tok)m(ens)h(in)m(to)f
+(commands)g(and)f(other)h(constructs,)i(remo)m(v)m(es)f(the)150
+2598 y(sp)s(ecial)31 b(meaning)f(of)g(certain)h(w)m(ords)f(or)g(c)m
+(haracters,)i(expands)d(others,)h(redirects)h(input)e(and)g(output)150
+2708 y(as)d(needed,)g(executes)g(the)g(sp)s(eci\014ed)e(command,)j(w)m
+(aits)f(for)f(the)g(command's)g(exit)i(status,)f(and)f(mak)m(es)150
+2818 y(that)31 b(exit)g(status)g(a)m(v)-5 b(ailable)33
+b(for)d(further)f(insp)s(ection)h(or)h(pro)s(cessing.)150
+3040 y Fj(3.1.1)63 b(Shell)41 b(Op)s(eration)150 3187
+y Ft(The)c(follo)m(wing)h(is)f(a)h(brief)e(description)i(of)f(the)g
+(shell's)h(op)s(eration)f(when)f(it)i(reads)f(and)f(executes)j(a)150
+3297 y(command.)h(Basically)-8 b(,)34 b(the)c(shell)h(do)s(es)f(the)h
+(follo)m(wing:)199 3454 y(1.)61 b(Reads)42 b(its)h(input)e(from)h(a)g
+(\014le)h(\(see)g(Section)g(3.8)g([Shell)f(Scripts],)j(page)e(33\),)k
+(from)41 b(a)i(string)330 3564 y(supplied)26 b(as)i(an)f(argumen)m(t)g
+(to)h(the)g(`)p Fs(-c)p Ft(')f(in)m(v)m(o)s(cation)i(option)f(\(see)g
+(Section)h(6.1)f([In)m(v)m(oking)g(Bash],)330 3673 y(page)j(71\),)h(or)
+e(from)g(the)h(user's)f(terminal.)199 3820 y(2.)61 b(Breaks)43
+b(the)g(input)f(in)m(to)h(w)m(ords)f(and)g(op)s(erators,)k(ob)s(eying)d
+(the)g(quoting)g(rules)f(describ)s(ed)f(in)330 3929 y(Section)27
+b(3.1.2)i([Quoting],)f(page)f(6.)40 b(These)26 b(tok)m(ens)i(are)f
+(separated)g(b)m(y)f Fs(metacharacters)p Ft(.)36 b(Alias)330
+4039 y(expansion)30 b(is)h(p)s(erformed)d(b)m(y)j(this)f(step)g(\(see)i
+(Section)f(6.6)g([Aliases],)i(page)e(79\).)199 4185 y(3.)61
+b(P)m(arses)35 b(the)g(tok)m(ens)g(in)m(to)h(simple)e(and)g(comp)s
+(ound)f(commands)h(\(see)h(Section)h(3.2)f([Shell)g(Com-)330
+4294 y(mands],)30 b(page)h(7\).)199 4441 y(4.)61 b(P)m(erforms)40
+b(the)h(v)-5 b(arious)40 b(shell)h(expansions)f(\(see)h(Section)g(3.5)g
+([Shell)g(Expansions],)h(page)f(17\),)330 4550 y(breaking)35
+b(the)g(expanded)g(tok)m(ens)h(in)m(to)g(lists)f(of)g(\014lenames)h
+(\(see)g(Section)f(3.5.8)i([Filename)g(Ex-)330 4660 y(pansion],)30
+b(page)h(24\))h(and)e(commands)g(and)g(argumen)m(ts.)199
+4806 y(5.)61 b(P)m(erforms)36 b(an)m(y)i(necessary)f(redirections)g
+(\(see)h(Section)f(3.6)h([Redirections],)i(page)e(26\))g(and)e(re-)330
+4915 y(mo)m(v)m(es)c(the)e(redirection)h(op)s(erators)g(and)f(their)g
+(op)s(erands)f(from)h(the)h(argumen)m(t)f(list.)199 5062
+y(6.)61 b(Executes)31 b(the)g(command)f(\(see)h(Section)g(3.7)h
+([Executing)f(Commands],)f(page)h(29\).)199 5208 y(7.)61
+b(Optionally)40 b(w)m(aits)g(for)f(the)g(command)g(to)h(complete)g(and)
+f(collects)i(its)f(exit)g(status)f(\(see)h(Sec-)330 5317
+y(tion)31 b(3.7.5)h([Exit)f(Status],)g(page)g(32\).)p
+eop end
+%%Page: 6 12
+TeXDict begin 6 11 bop 150 -116 a Ft(6)2617 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fj(3.1.2)63 b(Quoting)150
+446 y Ft(Quoting)32 b(is)h(used)e(to)i(remo)m(v)m(e)h(the)e(sp)s(ecial)
+h(meaning)f(of)h(certain)g(c)m(haracters)g(or)f(w)m(ords)g(to)h(the)f
+(shell.)150 555 y(Quoting)c(can)f(b)s(e)g(used)f(to)j(disable)e(sp)s
+(ecial)h(treatmen)m(t)h(for)e(sp)s(ecial)h(c)m(haracters,)i(to)e(prev)m
+(en)m(t)g(reserv)m(ed)150 665 y(w)m(ords)i(from)g(b)s(eing)g
+(recognized)h(as)g(suc)m(h,)f(and)g(to)h(prev)m(en)m(t)g(parameter)g
+(expansion.)275 793 y(Eac)m(h)22 b(of)g(the)g(shell)g(metac)m
+(haracters)i(\(see)f(Chapter)e(2)i([De\014nitions],)h(page)f(3\))g(has)
+e(sp)s(ecial)i(meaning)150 902 y(to)40 b(the)g(shell)f(and)g(m)m(ust)g
+(b)s(e)g(quoted)g(if)h(it)g(is)f(to)h(represen)m(t)g(itself.)68
+b(When)39 b(the)h(command)f(history)150 1012 y(expansion)i(facilities)j
+(are)e(b)s(eing)f(used)g(\(see)h(Section)h(9.3)f([History)h(In)m
+(teraction],)j(page)c(123\),)47 b(the)150 1122 y Fq(history)30
+b(expansion)h Ft(c)m(haracter,)h(usually)f(`)p Fs(!)p
+Ft(',)g(m)m(ust)f(b)s(e)g(quoted)h(to)g(prev)m(en)m(t)g(history)g
+(expansion.)41 b(See)150 1231 y(Section)22 b(9.1)g([Bash)f(History)h(F)
+-8 b(acilities],)26 b(page)c(121,)j(for)20 b(more)h(details)h
+(concerning)g(history)f(expansion.)275 1359 y(There)36
+b(are)i(three)f(quoting)g(mec)m(hanisms:)55 b(the)37
+b Fq(escap)s(e)h(c)m(haracter)7 b Ft(,)40 b(single)d(quotes,)j(and)c
+(double)150 1469 y(quotes.)150 1655 y Fj(3.1.2.1)63 b(Escap)s(e)41
+b(Character)150 1802 y Ft(A)36 b(non-quoted)f(bac)m(kslash)h(`)p
+Fs(\\)p Ft(')g(is)f(the)h(Bash)g(escap)s(e)f(c)m(haracter.)58
+b(It)36 b(preserv)m(es)f(the)h(literal)h(v)-5 b(alue)36
+b(of)150 1911 y(the)27 b(next)g(c)m(haracter)h(that)f(follo)m(ws,)i
+(with)d(the)h(exception)g(of)g Fs(newline)p Ft(.)38 b(If)26
+b(a)h Fs(\\newline)d Ft(pair)i(app)s(ears,)150 2021 y(and)k(the)h(bac)m
+(kslash)g(itself)g(is)g(not)g(quoted,)g(the)f Fs(\\newline)f
+Ft(is)h(treated)i(as)f(a)g(line)g(con)m(tin)m(uation)h(\(that)150
+2131 y(is,)f(it)g(is)f(remo)m(v)m(ed)h(from)f(the)h(input)e(stream)i
+(and)f(e\013ectiv)m(ely)j(ignored\).)150 2317 y Fj(3.1.2.2)63
+b(Single)42 b(Quotes)150 2464 y Ft(Enclosing)24 b(c)m(haracters)h(in)e
+(single)h(quotes)g(\(`)p Fs(')p Ft('\))g(preserv)m(es)g(the)f(literal)i
+(v)-5 b(alue)24 b(of)g(eac)m(h)g(c)m(haracter)h(within)150
+2573 y(the)31 b(quotes.)42 b(A)31 b(single)h(quote)f(ma)m(y)g(not)g(o)s
+(ccur)g(b)s(et)m(w)m(een)g(single)h(quotes,)f(ev)m(en)h(when)d
+(preceded)i(b)m(y)g(a)150 2683 y(bac)m(kslash.)150 2869
+y Fj(3.1.2.3)63 b(Double)42 b(Quotes)150 3016 y Ft(Enclosing)24
+b(c)m(haracters)h(in)f(double)f(quotes)h(\(`)p Fs(")p
+Ft('\))g(preserv)m(es)g(the)g(literal)h(v)-5 b(alue)24
+b(of)g(all)g(c)m(haracters)h(within)150 3125 y(the)34
+b(quotes,)h(with)f(the)g(exception)h(of)f(`)p Fs($)p
+Ft(',)h(`)p Fs(`)p Ft(',)g(`)p Fs(\\)p Ft(',)g(and,)f(when)f(history)g
+(expansion)h(is)g(enabled,)h(`)p Fs(!)p Ft('.)150 3235
+y(The)25 b(c)m(haracters)h(`)p Fs($)p Ft(')g(and)f(`)p
+Fs(`)p Ft(')g(retain)h(their)f(sp)s(ecial)h(meaning)f(within)g(double)g
+(quotes)h(\(see)g(Section)g(3.5)150 3345 y([Shell)j(Expansions],)g
+(page)h(17\).)41 b(The)28 b(bac)m(kslash)i(retains)f(its)h(sp)s(ecial)f
+(meaning)g(only)g(when)f(follo)m(w)m(ed)150 3454 y(b)m(y)41
+b(one)f(of)h(the)g(follo)m(wing)h(c)m(haracters:)63 b(`)p
+Fs($)p Ft(',)43 b(`)p Fs(`)p Ft(',)h(`)p Fs(")p Ft(',)g(`)p
+Fs(\\)p Ft(',)f(or)e Fs(newline)p Ft(.)69 b(Within)41
+b(double)f(quotes,)150 3564 y(bac)m(kslashes)25 b(that)h(are)f(follo)m
+(w)m(ed)h(b)m(y)e(one)h(of)g(these)g(c)m(haracters)h(are)f(remo)m(v)m
+(ed.)40 b(Bac)m(kslashes)26 b(preceding)150 3673 y(c)m(haracters)35
+b(without)e(a)h(sp)s(ecial)f(meaning)h(are)f(left)h(unmo)s(di\014ed.)47
+b(A)34 b(double)f(quote)g(ma)m(y)h(b)s(e)f(quoted)150
+3783 y(within)h(double)h(quotes)g(b)m(y)g(preceding)g(it)g(with)g(a)g
+(bac)m(kslash.)55 b(If)35 b(enabled,)h(history)f(expansion)g(will)150
+3892 y(b)s(e)f(p)s(erformed)g(unless)g(an)h(`)p Fs(!)p
+Ft(')g(app)s(earing)f(in)h(double)f(quotes)i(is)f(escap)s(ed)g(using)f
+(a)h(bac)m(kslash.)55 b(The)150 4002 y(bac)m(kslash)31
+b(preceding)f(the)h(`)p Fs(!)p Ft(')f(is)h(not)g(remo)m(v)m(ed.)275
+4130 y(The)41 b(sp)s(ecial)h(parameters)f(`)p Fs(*)p
+Ft(')h(and)f(`)p Fs(@)p Ft(')h(ha)m(v)m(e)g(sp)s(ecial)g(meaning)g
+(when)f(in)g(double)g(quotes)h(\(see)150 4240 y(Section)31
+b(3.5.3)h([Shell)f(P)m(arameter)h(Expansion],)e(page)h(19\).)150
+4426 y Fj(3.1.2.4)63 b(ANSI-C)40 b(Quoting)150 4573 y
+Ft(W)-8 b(ords)41 b(of)h(the)f(form)g Fs($')p Fi(string)11
+b Fs(')38 b Ft(are)k(treated)g(sp)s(ecially)-8 b(.)75
+b(The)41 b(w)m(ord)g(expands)f(to)i Fq(string)8 b Ft(,)44
+b(with)150 4682 y(bac)m(kslash-escap)s(ed)g(c)m(haracters)h(replaced)f
+(as)g(sp)s(eci\014ed)f(b)m(y)g(the)g(ANSI)g(C)g(standard.)79
+b(Bac)m(kslash)150 4792 y(escap)s(e)31 b(sequences,)g(if)f(presen)m(t,)
+h(are)g(deco)s(ded)f(as)g(follo)m(ws:)150 4938 y Fs(\\a)384
+b Ft(alert)31 b(\(b)s(ell\))150 5084 y Fs(\\b)384 b Ft(bac)m(kspace)150
+5230 y Fs(\\e)150 5340 y(\\E)g Ft(an)30 b(escap)s(e)h(c)m(haracter)h
+(\(not)f(ANSI)f(C\))p eop end
+%%Page: 7 13
+TeXDict begin 7 12 bop 150 -116 a Ft(Chapter)30 b(3:)41
+b(Basic)32 b(Shell)e(F)-8 b(eatures)2292 b(7)150 299
+y Fs(\\f)384 b Ft(form)30 b(feed)150 475 y Fs(\\n)384
+b Ft(newline)150 652 y Fs(\\r)g Ft(carriage)32 b(return)150
+828 y Fs(\\t)384 b Ft(horizon)m(tal)32 b(tab)150 1005
+y Fs(\\v)384 b Ft(v)m(ertical)32 b(tab)150 1181 y Fs(\\\\)384
+b Ft(bac)m(kslash)150 1358 y Fs(\\')g Ft(single)31 b(quote)150
+1534 y Fs(\\")384 b Ft(double)30 b(quote)150 1711 y Fs(\\)p
+Fi(nnn)288 b Ft(the)31 b(eigh)m(t-bit)h(c)m(haracter)g(whose)e(v)-5
+b(alue)31 b(is)f(the)h(o)s(ctal)g(v)-5 b(alue)31 b Fq(nnn)e
+Ft(\(one)i(to)g(three)g(digits\))150 1887 y Fs(\\x)p
+Fi(HH)288 b Ft(the)36 b(eigh)m(t-bit)i(c)m(haracter)f(whose)f(v)-5
+b(alue)36 b(is)g(the)g(hexadecimal)h(v)-5 b(alue)36 b
+Fq(HH)46 b Ft(\(one)37 b(or)f(t)m(w)m(o)630 1997 y(hex)30
+b(digits\))150 2173 y Fs(\\c)p Fi(x)336 b Ft(a)31 b(con)m(trol-)p
+Fq(x)38 b Ft(c)m(haracter)150 2358 y(The)30 b(expanded)f(result)i(is)f
+(single-quoted,)i(as)f(if)f(the)g(dollar)h(sign)g(had)e(not)i(b)s(een)f
+(presen)m(t.)150 2575 y Fj(3.1.2.5)63 b(Lo)s(cale-Sp)s(eci\014c)41
+b(T)-10 b(ranslation)150 2722 y Ft(A)28 b(double-quoted)g(string)f
+(preceded)h(b)m(y)f(a)h(dollar)h(sign)e(\(`)p Fs($)p
+Ft('\))i(will)f(cause)g(the)g(string)g(to)g(b)s(e)f(translated)150
+2831 y(according)f(to)f(the)g(curren)m(t)g(lo)s(cale.)41
+b(If)24 b(the)h(curren)m(t)g(lo)s(cale)h(is)f Fs(C)g
+Ft(or)g Fs(POSIX)p Ft(,)f(the)h(dollar)h(sign)f(is)g(ignored.)150
+2941 y(If)30 b(the)g(string)h(is)f(translated)h(and)f(replaced,)h(the)g
+(replacemen)m(t)h(is)e(double-quoted.)275 3093 y(Some)20
+b(systems)h(use)f(the)h(message)h(catalog)h(selected)f(b)m(y)f(the)g
+Fs(LC_MESSAGES)c Ft(shell)k(v)-5 b(ariable.)39 b(Others)150
+3202 y(create)g(the)e(name)g(of)g(the)g(message)h(catalog)i(from)d(the)
+g(v)-5 b(alue)37 b(of)g(the)h Fs(TEXTDOMAIN)c Ft(shell)j(v)-5
+b(ariable,)150 3312 y(p)s(ossibly)31 b(adding)g(a)g(su\016x)g(of)h(`)p
+Fs(.mo)p Ft('.)43 b(If)31 b(y)m(ou)h(use)f(the)h Fs(TEXTDOMAIN)c
+Ft(v)-5 b(ariable,)33 b(y)m(ou)f(ma)m(y)g(need)f(to)h(set)150
+3421 y(the)22 b Fs(TEXTDOMAINDIR)d Ft(v)-5 b(ariable)23
+b(to)g(the)f(lo)s(cation)i(of)e(the)h(message)g(catalog)i(\014les.)38
+b(Still)23 b(others)f(use)g(b)s(oth)150 3531 y(v)-5 b(ariables)31
+b(in)f(this)g(fashion:)41 b Fs(TEXTDOMAINDIR)p Ft(/)p
+Fs(LC_MESSAGES)p Ft(/LC)p 2528 3531 28 4 v 34 w(MESSA)m(GES/)p
+Fs(TEXTDOMAIN)p Ft(.mo.)150 3747 y Fj(3.1.3)63 b(Commen)m(ts)150
+3894 y Ft(In)21 b(a)i(non-in)m(teractiv)m(e)h(shell,)g(or)e(an)g(in)m
+(teractiv)m(e)j(shell)d(in)g(whic)m(h)g(the)g Fs(interactive_comments)
+16 b Ft(option)150 4004 y(to)40 b(the)f Fs(shopt)e Ft(builtin)h(is)h
+(enabled)g(\(see)h(Section)g(4.3.2)g([The)f(Shopt)f(Builtin],)k(page)e
+(55\),)i(a)d(w)m(ord)150 4113 y(b)s(eginning)26 b(with)g(`)p
+Fs(#)p Ft(')g(causes)h(that)f(w)m(ord)g(and)g(all)h(remaining)g(c)m
+(haracters)g(on)f(that)h(line)g(to)g(b)s(e)f(ignored.)150
+4223 y(An)43 b(in)m(teractiv)m(e)j(shell)e(without)f(the)g
+Fs(interactive_comments)38 b Ft(option)44 b(enabled)f(do)s(es)g(not)g
+(allo)m(w)150 4333 y(commen)m(ts.)56 b(The)34 b Fs
+(interactive_comments)c Ft(option)35 b(is)g(on)g(b)m(y)g(default)g(in)g
+(in)m(teractiv)m(e)j(shells.)55 b(See)150 4442 y(Section)30
+b(6.3)f([In)m(teractiv)m(e)j(Shells],)d(page)h(75,)g(for)e(a)i
+(description)e(of)h(what)g(mak)m(es)h(a)f(shell)g(in)m(teractiv)m(e.)
+150 4700 y Fr(3.2)68 b(Shell)45 b(Commands)150 4860 y
+Ft(A)d(simple)g(shell)g(command)f(suc)m(h)h(as)g Fs(echo)29
+b(a)h(b)g(c)41 b Ft(consists)i(of)f(the)f(command)h(itself)h(follo)m(w)
+m(ed)g(b)m(y)150 4969 y(argumen)m(ts,)31 b(separated)g(b)m(y)f(spaces.)
+275 5121 y(More)h(complex)h(shell)f(commands)g(are)g(comp)s(osed)g(of)g
+(simple)g(commands)g(arranged)g(together)h(in)150 5230
+y(a)f(v)-5 b(ariet)m(y)32 b(of)f(w)m(a)m(ys:)41 b(in)31
+b(a)g(pip)s(eline)f(in)g(whic)m(h)g(the)h(output)f(of)h(one)f(command)h
+(b)s(ecomes)f(the)h(input)f(of)150 5340 y(a)h(second,)f(in)h(a)f(lo)s
+(op)h(or)f(conditional)i(construct,)f(or)f(in)g(some)h(other)g
+(grouping.)p eop end
+%%Page: 8 14
+TeXDict begin 8 13 bop 150 -116 a Ft(8)2617 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fj(3.2.1)63 b(Simple)41
+b(Commands)150 446 y Ft(A)29 b(simple)f(command)g(is)h(the)g(kind)e(of)
+i(command)f(encoun)m(tered)h(most)g(often.)40 b(It's)29
+b(just)f(a)h(sequence)g(of)150 555 y(w)m(ords)22 b(separated)i(b)m(y)e
+Fs(blank)p Ft(s,)i(terminated)f(b)m(y)g(one)g(of)g(the)g(shell's)g(con)
+m(trol)h(op)s(erators)f(\(see)h(Chapter)f(2)150 665 y([De\014nitions],)
+37 b(page)e(3\).)54 b(The)35 b(\014rst)e(w)m(ord)i(generally)g(sp)s
+(eci\014es)g(a)g(command)f(to)h(b)s(e)f(executed,)j(with)150
+775 y(the)31 b(rest)f(of)h(the)f(w)m(ords)g(b)s(eing)g(that)h
+(command's)f(argumen)m(ts.)275 912 y(The)h(return)h(status)g(\(see)i
+(Section)f(3.7.5)h([Exit)f(Status],)h(page)f(32\))g(of)g(a)g(simple)f
+(command)g(is)h(its)150 1022 y(exit)38 b(status)f(as)g(pro)m(vided)f(b)
+m(y)h(the)g Fl(posix)f Ft(1003.1)j Fs(waitpid)c Ft(function,)j(or)f
+(128)p Fs(+)p Fq(n)g Ft(if)g(the)g(command)150 1131 y(w)m(as)31
+b(terminated)g(b)m(y)f(signal)h Fq(n)p Ft(.)150 1333
+y Fj(3.2.2)63 b(Pip)s(elines)150 1480 y Ft(A)35 b Fs(pipeline)e
+Ft(is)j(a)f(sequence)h(of)f(simple)g(commands)g(separated)h(b)m(y)f
+(one)g(of)h(the)f(con)m(trol)i(op)s(erators)150 1590
+y(`)p Fs(|)p Ft(')31 b(or)f(`)p Fs(|&)p Ft('.)275 1727
+y(The)f(format)i(for)f(a)h(pip)s(eline)f(is)390 1865
+y Fs([time)46 b([-p]])h([!])g Fi(command1)56 b Fs([)47
+b([|)g(or)h(|&])e Fi(command2)56 b Fs(...])150 2002 y
+Ft(The)25 b(output)f(of)i(eac)m(h)g(command)f(in)f(the)i(pip)s(eline)e
+(is)i(connected)g(via)f(a)h(pip)s(e)e(to)i(the)f(input)f(of)h(the)h
+(next)150 2112 y(command.)40 b(That)29 b(is,)h(eac)m(h)h(command)e
+(reads)g(the)h(previous)f(command's)g(output.)40 b(This)29
+b(connection)150 2221 y(is)h(p)s(erformed)f(b)s(efore)h(an)m(y)h
+(redirections)g(sp)s(eci\014ed)f(b)m(y)g(the)g(command.)275
+2359 y(If)j(`)p Fs(|&)p Ft(')h(is)h(used,)f(the)h(standard)e(error)h
+(of)g Fq(command1)42 b Ft(is)34 b(connected)h(to)g Fq(command2)7
+b Ft('s)35 b(standard)150 2468 y(input)25 b(through)g(the)h(pip)s(e;)h
+(it)f(is)g(shorthand)f(for)g Fs(2>&1)k(|)p Ft(.)39 b(This)25
+b(implicit)i(redirection)g(of)f(the)g(standard)150 2578
+y(error)k(is)g(p)s(erformed)f(after)i(an)m(y)g(redirections)g(sp)s
+(eci\014ed)e(b)m(y)i(the)f(command.)275 2715 y(The)36
+b(reserv)m(ed)g(w)m(ord)g Fs(time)g Ft(causes)h(timing)g(statistics)h
+(to)f(b)s(e)f(prin)m(ted)g(for)g(the)h(pip)s(eline)f(once)h(it)150
+2825 y(\014nishes.)51 b(The)34 b(statistics)i(curren)m(tly)e(consist)h
+(of)f(elapsed)h(\(w)m(all-clo)s(c)m(k\))i(time)e(and)f(user)f(and)h
+(system)150 2935 y(time)i(consumed)f(b)m(y)g(the)h(command's)f
+(execution.)57 b(The)35 b(`)p Fs(-p)p Ft(')h(option)f(c)m(hanges)i(the)
+f(output)f(format)150 3044 y(to)i(that)f(sp)s(eci\014ed)f(b)m(y)h
+Fl(posix)p Ft(.)57 b(The)35 b Fs(TIMEFORMAT)e Ft(v)-5
+b(ariable)37 b(ma)m(y)g(b)s(e)e(set)h(to)h(a)f(format)g(string)g(that)
+150 3154 y(sp)s(eci\014es)29 b(ho)m(w)g(the)g(timing)g(information)h
+(should)d(b)s(e)i(displa)m(y)m(ed.)41 b(See)29 b(Section)h(5.2)g([Bash)
+f(V)-8 b(ariables],)150 3263 y(page)29 b(61,)h(for)e(a)g(description)h
+(of)f(the)g(a)m(v)-5 b(ailable)31 b(formats.)40 b(The)28
+b(use)g(of)g Fs(time)f Ft(as)i(a)f(reserv)m(ed)h(w)m(ord)f(p)s(er-)150
+3373 y(mits)g(the)g(timing)g(of)g(shell)g(builtins,)g(shell)g
+(functions,)g(and)f(pip)s(elines.)40 b(An)27 b(external)i
+Fs(time)d Ft(command)150 3483 y(cannot)31 b(time)g(these)g(easily)-8
+b(.)275 3620 y(If)24 b(the)h(pip)s(eline)g(is)g(not)g(executed)h(async)
+m(hronously)f(\(see)h(Section)g(3.2.3)h([Lists],)g(page)e(8\),)i(the)f
+(shell)150 3730 y(w)m(aits)31 b(for)f(all)i(commands)e(in)g(the)g(pip)s
+(eline)g(to)h(complete.)275 3867 y(Eac)m(h)25 b(command)g(in)g(a)g(pip)
+s(eline)g(is)g(executed)h(in)f(its)g(o)m(wn)h(subshell)e(\(see)i
+(Section)g(3.7.3)h([Command)150 3977 y(Execution)36 b(En)m(vironmen)m
+(t],)i(page)e(30\).)58 b(The)36 b(exit)g(status)g(of)g(a)g(pip)s(eline)
+g(is)f(the)h(exit)h(status)f(of)g(the)150 4086 y(last)27
+b(command)f(in)f(the)i(pip)s(eline,)f(unless)g(the)g
+Fs(pipefail)e Ft(option)i(is)g(enabled)g(\(see)h(Section)g(4.3.1)h
+([The)150 4196 y(Set)34 b(Builtin],)j(page)e(51\).)53
+b(If)34 b Fs(pipefail)e Ft(is)i(enabled,)h(the)g(pip)s(eline's)f
+(return)f(status)h(is)h(the)f(v)-5 b(alue)35 b(of)150
+4305 y(the)d(last)h(\(righ)m(tmost\))h(command)e(to)h(exit)g(with)e(a)i
+(non-zero)f(status,)h(or)f(zero)h(if)f(all)h(commands)f(exit)150
+4415 y(successfully)-8 b(.)67 b(If)38 b(the)h(reserv)m(ed)g(w)m(ord)g
+(`)p Fs(!)p Ft(')g(precedes)g(the)g(pip)s(eline,)h(the)g(exit)f(status)
+g(is)g(the)g(logical)150 4525 y(negation)h(of)f(the)f(exit)i(status)f
+(as)f(describ)s(ed)g(ab)s(o)m(v)m(e.)66 b(The)38 b(shell)h(w)m(aits)h
+(for)e(all)h(commands)g(in)f(the)150 4634 y(pip)s(eline)30
+b(to)h(terminate)g(b)s(efore)f(returning)g(a)h(v)-5 b(alue.)150
+4836 y Fj(3.2.3)63 b(Lists)41 b(of)h(Commands)150 4983
+y Ft(A)37 b Fs(list)e Ft(is)i(a)g(sequence)g(of)g(one)g(or)f(more)h
+(pip)s(elines)f(separated)h(b)m(y)g(one)g(of)f(the)h(op)s(erators)g(`)p
+Fs(;)p Ft(',)i(`)p Fs(&)p Ft(',)150 5093 y(`)p Fs(&&)p
+Ft(',)31 b(or)f(`)p Fs(||)p Ft(',)g(and)g(optionally)i(terminated)f(b)m
+(y)f(one)h(of)f(`)p Fs(;)p Ft(',)h(`)p Fs(&)p Ft(',)g(or)f(a)h
+Fs(newline)p Ft(.)275 5230 y(Of)23 b(these)h(list)g(op)s(erators,)i(`)p
+Fs(&&)p Ft(')d(and)g(`)p Fs(||)p Ft(')h(ha)m(v)m(e)h(equal)f
+(precedence,)i(follo)m(w)m(ed)f(b)m(y)f(`)p Fs(;)p Ft(')g(and)f(`)p
+Fs(&)p Ft(',)i(whic)m(h)150 5340 y(ha)m(v)m(e)32 b(equal)e(precedence.)
+p eop end
+%%Page: 9 15
+TeXDict begin 9 14 bop 150 -116 a Ft(Chapter)30 b(3:)41
+b(Basic)32 b(Shell)e(F)-8 b(eatures)2292 b(9)275 299
+y(A)29 b(sequence)h(of)g(one)g(or)g(more)g(newlines)f(ma)m(y)h(app)s
+(ear)f(in)h(a)g Fs(list)e Ft(to)j(delimit)f(commands,)g(equiv-)150
+408 y(alen)m(t)i(to)f(a)g(semicolon.)275 551 y(If)c(a)h(command)f(is)h
+(terminated)g(b)m(y)g(the)g(con)m(trol)h(op)s(erator)f(`)p
+Fs(&)p Ft(',)h(the)e(shell)h(executes)h(the)f(command)150
+661 y(async)m(hronously)g(in)g(a)h(subshell.)39 b(This)28
+b(is)g(kno)m(wn)g(as)h(executing)h(the)e(command)h(in)f(the)g
+Fq(bac)m(kground)t Ft(.)150 770 y(The)g(shell)h(do)s(es)f(not)h(w)m
+(ait)g(for)f(the)h(command)f(to)i(\014nish,)d(and)h(the)h(return)e
+(status)i(is)g(0)g(\(true\).)40 b(When)150 880 y(job)g(con)m(trol)h(is)
+g(not)f(activ)m(e)i(\(see)f(Chapter)f(7)h([Job)f(Con)m(trol],)j(page)e
+(89\),)j(the)d(standard)e(input)g(for)150 990 y(async)m(hronous)k
+(commands,)k(in)d(the)f(absence)i(of)f(an)m(y)g(explicit)h
+(redirections,)j(is)43 b(redirected)h(from)150 1099 y
+Fs(/dev/null)p Ft(.)275 1242 y(Commands)19 b(separated)j(b)m(y)f(a)g(`)
+p Fs(;)p Ft(')g(are)h(executed)g(sequen)m(tially;)k(the)21
+b(shell)g(w)m(aits)h(for)f(eac)m(h)h(command)150 1352
+y(to)31 b(terminate)h(in)e(turn.)39 b(The)30 b(return)f(status)i(is)f
+(the)h(exit)g(status)g(of)g(the)f(last)h(command)f(executed.)275
+1494 y Fl(and)g Ft(and)h Fl(or)g Ft(lists)h(are)g(sequences)f(of)h(one)
+g(or)f(more)h(pip)s(elines)e(separated)i(b)m(y)g(the)f(con)m(trol)i(op)
+s(er-)150 1604 y(ators)e(`)p Fs(&&)p Ft(')f(and)g(`)p
+Fs(||)p Ft(',)h(resp)s(ectiv)m(ely)-8 b(.)42 b Fl(and)30
+b Ft(and)f Fl(or)h Ft(lists)h(are)g(executed)g(with)f(left)h(asso)s
+(ciativit)m(y)-8 b(.)275 1747 y(An)30 b Fl(and)f Ft(list)i(has)f(the)h
+(form)390 1890 y Fi(command1)56 b Fs(&&)47 b Fi(command2)150
+2032 y Fq(command2)38 b Ft(is)30 b(executed)i(if,)e(and)g(only)g(if,)h
+Fq(command1)38 b Ft(returns)29 b(an)h(exit)h(status)g(of)g(zero.)275
+2175 y(An)f Fl(or)f Ft(list)i(has)f(the)h(form)390 2318
+y Fi(command1)56 b Fs(||)47 b Fi(command2)150 2461 y
+Fq(command2)38 b Ft(is)30 b(executed)i(if,)e(and)g(only)g(if,)h
+Fq(command1)38 b Ft(returns)29 b(a)i(non-zero)g(exit)g(status.)275
+2604 y(The)h(return)g(status)i(of)f Fl(and)f Ft(and)h
+Fl(or)f Ft(lists)i(is)f(the)g(exit)h(status)g(of)f(the)g(last)h
+(command)f(executed)150 2713 y(in)d(the)h(list.)150 2921
+y Fj(3.2.4)63 b(Comp)s(ound)42 b(Commands)150 3068 y
+Ft(Comp)s(ound)32 b(commands)j(are)g(the)g(shell)g(programming)f
+(constructs.)54 b(Eac)m(h)35 b(construct)g(b)s(egins)f(with)150
+3177 y(a)k(reserv)m(ed)f(w)m(ord)h(or)f(con)m(trol)i(op)s(erator)f(and)
+f(is)g(terminated)h(b)m(y)f(a)h(corresp)s(onding)f(reserv)m(ed)g(w)m
+(ord)150 3287 y(or)44 b(op)s(erator.)81 b(An)m(y)44 b(redirections)g
+(\(see)h(Section)g(3.6)g([Redirections],)j(page)d(26\))g(asso)s(ciated)
+g(with)150 3396 y(a)g(comp)s(ound)e(command)i(apply)f(to)h(all)h
+(commands)e(within)g(that)h(comp)s(ound)e(command)i(unless)150
+3506 y(explicitly)32 b(o)m(v)m(erridden.)275 3649 y(Bash)45
+b(pro)m(vides)h(lo)s(oping)g(constructs,)j(conditional)e(commands,)j
+(and)44 b(mec)m(hanisms)i(to)g(group)150 3758 y(commands)30
+b(and)g(execute)i(them)e(as)g(a)h(unit.)150 3966 y Fj(3.2.4.1)63
+b(Lo)s(oping)43 b(Constructs)150 4113 y Ft(Bash)31 b(supp)s(orts)d(the)
+j(follo)m(wing)g(lo)s(oping)g(constructs.)275 4256 y(Note)k(that)f
+(wherev)m(er)g(a)g(`)p Fs(;)p Ft(')g(app)s(ears)f(in)h(the)g
+(description)g(of)g(a)g(command's)g(syn)m(tax,)i(it)e(ma)m(y)h(b)s(e)
+150 4365 y(replaced)c(with)f(one)h(or)f(more)g(newlines.)150
+4537 y Fs(until)240 b Ft(The)30 b(syn)m(tax)h(of)f(the)h
+Fs(until)e Ft(command)h(is:)870 4676 y Fs(until)46 b
+Fi(test-commands)11 b Fs(;)44 b(do)j Fi(consequent-commands)11
+b Fs(;)42 b(done)630 4814 y Ft(Execute)g Fq(consequen)m(t-commands)k
+Ft(as)41 b(long)h(as)f Fq(test-commands)46 b Ft(has)41
+b(an)g(exit)h(status)630 4924 y(whic)m(h)c(is)h(not)g(zero.)67
+b(The)38 b(return)g(status)h(is)f(the)h(exit)h(status)f(of)g(the)g
+(last)g(command)630 5034 y(executed)31 b(in)f Fq(consequen)m
+(t-commands)t Ft(,)h(or)g(zero)g(if)f(none)h(w)m(as)f(executed.)150
+5201 y Fs(while)240 b Ft(The)30 b(syn)m(tax)h(of)f(the)h
+Fs(while)e Ft(command)h(is:)870 5340 y Fs(while)46 b
+Fi(test-commands)11 b Fs(;)44 b(do)j Fi(consequent-commands)11
+b Fs(;)42 b(done)p eop end
+%%Page: 10 16
+TeXDict begin 10 15 bop 150 -116 a Ft(10)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y(Execute)42 b Fq(consequen)m
+(t-commands)k Ft(as)41 b(long)h(as)f Fq(test-commands)46
+b Ft(has)41 b(an)g(exit)h(status)630 408 y(of)34 b(zero.)53
+b(The)34 b(return)f(status)h(is)h(the)f(exit)h(status)g(of)f(the)g
+(last)h(command)f(executed)h(in)630 518 y Fq(consequen)m(t-commands)t
+Ft(,)c(or)g(zero)g(if)f(none)g(w)m(as)h(executed.)150
+668 y Fs(for)336 b Ft(The)30 b(syn)m(tax)h(of)f(the)h
+Fs(for)e Ft(command)i(is:)870 797 y Fs(for)47 b Fi(name)57
+b Fs([)48 b([in)e([)p Fi(words)57 b Fs(...)o(])48 b(])f(;)h(])f(do)g
+Fi(commands)11 b Fs(;)45 b(done)630 927 y Ft(Expand)31
+b Fq(w)m(ords)t Ft(,)i(and)e(execute)j Fq(commands)i
+Ft(once)d(for)f(eac)m(h)i(mem)m(b)s(er)e(in)g(the)g(resultan)m(t)630
+1037 y(list,)d(with)f Fq(name)33 b Ft(b)s(ound)26 b(to)j(the)f(curren)m
+(t)g(mem)m(b)s(er.)40 b(If)27 b(`)p Fs(in)j Fi(words)11
+b Ft(')27 b(is)h(not)g(presen)m(t,)h(the)630 1146 y Fs(for)g
+Ft(command)g(executes)i(the)e Fq(commands)k Ft(once)d(for)f(eac)m(h)i
+(p)s(ositional)f(parameter)g(that)630 1256 y(is)d(set,)h(as)f(if)g(`)p
+Fs(in)j("$@")p Ft(')c(had)g(b)s(een)g(sp)s(eci\014ed)g(\(see)i(Section)
+f(3.4.2)i([Sp)s(ecial)e(P)m(arameters],)630 1365 y(page)c(16\).)39
+b(The)21 b(return)g(status)h(is)g(the)g(exit)h(status)f(of)g(the)g
+(last)g(command)g(that)g(executes.)630 1475 y(If)37 b(there)h(are)g(no)
+g(items)g(in)g(the)g(expansion)g(of)f Fq(w)m(ords)t Ft(,)j(no)d
+(commands)h(are)g(executed,)630 1585 y(and)30 b(the)g(return)g(status)g
+(is)h(zero.)630 1714 y(An)f(alternate)i(form)e(of)h(the)f
+Fs(for)g Ft(command)g(is)g(also)h(supp)s(orted:)870 1844
+y Fs(for)47 b(\(\()g Fi(expr1)57 b Fs(;)47 b Fi(expr2)57
+b Fs(;)48 b Fi(expr3)57 b Fs(\)\))47 b(;)g(do)g Fi(commands)57
+b Fs(;)47 b(done)630 1974 y Ft(First,)38 b(the)f(arithmetic)h
+(expression)e Fq(expr1)43 b Ft(is)36 b(ev)-5 b(aluated)38
+b(according)f(to)g(the)g(rules)f(de-)630 2083 y(scrib)s(ed)41
+b(b)s(elo)m(w)h(\(see)h(Section)g(6.5)g([Shell)g(Arithmetic],)j(page)d
+(78\).)77 b(The)42 b(arithmetic)630 2193 y(expression)33
+b Fq(expr2)41 b Ft(is)34 b(then)f(ev)-5 b(aluated)35
+b(rep)s(eatedly)f(un)m(til)g(it)g(ev)-5 b(aluates)35
+b(to)g(zero.)51 b(Eac)m(h)630 2302 y(time)23 b Fq(expr2)30
+b Ft(ev)-5 b(aluates)25 b(to)e(a)g(non-zero)h(v)-5 b(alue,)25
+b Fq(commands)h Ft(are)d(executed)g(and)g(the)g(arith-)630
+2412 y(metic)29 b(expression)f Fq(expr3)36 b Ft(is)28
+b(ev)-5 b(aluated.)41 b(If)28 b(an)m(y)h(expression)f(is)g(omitted,)i
+(it)f(b)s(eha)m(v)m(es)g(as)630 2522 y(if)i(it)h(ev)-5
+b(aluates)32 b(to)g(1.)44 b(The)30 b(return)g(v)-5 b(alue)32
+b(is)f(the)g(exit)h(status)g(of)f(the)g(last)h(command)f(in)630
+2631 y Fq(list)i Ft(that)e(is)f(executed,)i(or)e(false)h(if)g(an)m(y)f
+(of)h(the)f(expressions)g(is)h(in)m(v)-5 b(alid.)275
+2781 y(The)26 b Fs(break)g Ft(and)h Fs(continue)e Ft(builtins)i(\(see)h
+(Section)h(4.1)f([Bourne)g(Shell)f(Builtins],)i(page)f(35\))g(ma)m(y)
+150 2890 y(b)s(e)i(used)f(to)i(con)m(trol)h(lo)s(op)f(execution.)150
+3080 y Fj(3.2.4.2)63 b(Conditional)42 b(Constructs)150
+3247 y Fs(if)384 b Ft(The)30 b(syn)m(tax)h(of)f(the)h
+Fs(if)f Ft(command)g(is:)870 3377 y Fs(if)47 b Fi(test-commands)11
+b Fs(;)44 b(then)965 3486 y Fi(consequent-commands)11
+b Fs(;)870 3596 y([elif)46 b Fi(more-test-commands)11
+b Fs(;)42 b(then)965 3705 y Fi(more-consequents)11 b
+Fs(;])870 3815 y([else)46 b Fi(alternate-consequents)11
+b Fs(;])870 3925 y(fi)630 4054 y Ft(The)53 b Fq(test-commands)58
+b Ft(list)c(is)g(executed,)60 b(and)53 b(if)g(its)h(return)e(status)i
+(is)f(zero,)61 b(the)630 4164 y Fq(consequen)m(t-commands)44
+b Ft(list)d(is)f(executed.)70 b(If)40 b Fq(test-commands)k
+Ft(returns)39 b(a)h(non-zero)630 4273 y(status,)45 b(eac)m(h)e
+Fs(elif)d Ft(list)i(is)g(executed)h(in)e(turn,)j(and)d(if)g(its)h(exit)
+h(status)f(is)f(zero,)46 b(the)630 4383 y(corresp)s(onding)37
+b Fq(more-consequen)m(ts)42 b Ft(is)c(executed)g(and)f(the)h(command)g
+(completes.)63 b(If)630 4493 y(`)p Fs(else)29 b Fi
+(alternate-consequents)11 b Ft(')23 b(is)30 b(presen)m(t,)f(and)g(the)g
+(\014nal)g(command)f(in)h(the)g(\014nal)630 4602 y Fs(if)44
+b Ft(or)g Fs(elif)f Ft(clause)i(has)f(a)h(non-zero)g(exit)g(status,)j
+(then)c Fq(alternate-consequen)m(ts)51 b Ft(is)630 4712
+y(executed.)k(The)34 b(return)g(status)h(is)f(the)h(exit)h(status)f(of)
+g(the)g(last)g(command)g(executed,)630 4821 y(or)30 b(zero)i(if)e(no)g
+(condition)h(tested)g(true.)150 4971 y Fs(case)288 b
+Ft(The)30 b(syn)m(tax)h(of)f(the)h Fs(case)e Ft(command)h(is:)870
+5101 y Fs(case)47 b Fi(word)57 b Fs(in)47 b([)g([\(])g
+Fi(pattern)57 b Fs([|)47 b Fi(pattern)11 b Fs(]...)l(\))48
+b Fi(command-list)55 b Fs(;;]...)46 b(esac)630 5230 y(case)20
+b Ft(will)i(selectiv)m(ely)j(execute)e(the)e Fq(command-list)k
+Ft(corresp)s(onding)20 b(to)i(the)g(\014rst)f Fq(pattern)630
+5340 y Ft(that)42 b(matc)m(hes)g Fq(w)m(ord)t Ft(.)71
+b(If)41 b(the)g(shell)g(option)g Fs(nocasematch)d Ft(\(see)k(the)f
+(description)g(of)p eop end
+%%Page: 11 17
+TeXDict begin 11 16 bop 150 -116 a Ft(Chapter)30 b(3:)41
+b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(11)630 299
+y Fs(shopt)34 b Ft(in)h(Section)h(4.3.2)h([The)e(Shopt)f(Builtin],)k
+(page)e(55\))g(is)g(enabled,)g(the)g(matc)m(h)g(is)630
+408 y(p)s(erformed)29 b(without)i(regard)g(to)g(the)g(case)h(of)f
+(alphab)s(etic)g(c)m(haracters.)44 b(The)30 b(`)p Fs(|)p
+Ft(')h(is)g(used)630 518 y(to)e(separate)g(m)m(ultiple)g(patterns,)g
+(and)e(the)i(`)p Fs(\))p Ft(')f(op)s(erator)g(terminates)h(a)g(pattern)
+f(list.)41 b(A)630 628 y(list)31 b(of)g(patterns)f(and)g(an)g(asso)s
+(ciated)i(command-list)f(is)f(kno)m(wn)g(as)h(a)g Fq(clause)5
+b Ft(.)630 754 y(Eac)m(h)42 b(clause)g(m)m(ust)f(b)s(e)g(terminated)h
+(with)e(`)p Fs(;;)p Ft(',)45 b(`)p Fs(;&)p Ft(',)f(or)d(`)p
+Fs(;;&)p Ft('.)73 b(The)41 b Fq(w)m(ord)j Ft(under-)630
+864 y(go)s(es)35 b(tilde)f(expansion,)h(parameter)g(expansion,)g
+(command)f(substitution,)h(arithmetic)630 973 y(expansion,)47
+b(and)d(quote)g(remo)m(v)-5 b(al)45 b(b)s(efore)f(matc)m(hing)h(is)f
+(attempted.)82 b(Eac)m(h)45 b Fq(pattern)630 1083 y Ft(undergo)s(es)38
+b(tilde)h(expansion,)i(parameter)e(expansion,)i(command)d
+(substitution,)j(and)630 1192 y(arithmetic)32 b(expansion.)630
+1319 y(There)e(ma)m(y)g(b)s(e)f(an)h(arbitrary)g(n)m(um)m(b)s(er)f(of)h
+Fs(case)f Ft(clauses,)i(eac)m(h)g(terminated)g(b)m(y)e(a)i(`)p
+Fs(;;)p Ft(',)630 1428 y(`)p Fs(;&)p Ft(',)c(or)e(`)p
+Fs(;;&)p Ft('.)39 b(The)25 b(\014rst)g(pattern)h(that)g(matc)m(hes)h
+(determines)e(the)h(command-list)g(that)630 1538 y(is)k(executed.)630
+1665 y(Here)35 b(is)g(an)g(example)h(using)e Fs(case)g
+Ft(in)g(a)h(script)g(that)h(could)f(b)s(e)f(used)g(to)h(describ)s(e)g
+(one)630 1774 y(in)m(teresting)d(feature)f(of)f(an)g(animal:)870
+1901 y Fs(echo)47 b(-n)g("Enter)f(the)h(name)f(of)i(an)f(animal:)f(")
+870 2010 y(read)h(ANIMAL)870 2120 y(echo)g(-n)g("The)f($ANIMAL)g(has)h
+(")870 2229 y(case)g($ANIMAL)e(in)965 2339 y(horse)i(|)g(dog)g(|)h
+(cat\))e(echo)h(-n)g("four";;)965 2449 y(man)g(|)h(kangaroo)d(\))j
+(echo)e(-n)i("two";;)965 2558 y(*\))g(echo)e(-n)h("an)g(unknown)f
+(number)g(of";;)870 2668 y(esac)870 2777 y(echo)h(")g(legs.")630
+2921 y Ft(If)25 b(the)h(`)p Fs(;;)p Ft(')g(op)s(erator)g(is)g(used,)g
+(no)g(subsequen)m(t)f(matc)m(hes)i(are)f(attempted)h(after)g(the)f
+(\014rst)630 3030 y(pattern)g(matc)m(h.)40 b(Using)26
+b(`)p Fs(;&)p Ft(')f(in)h(place)g(of)g(`)p Fs(;;)p Ft(')g(causes)g
+(execution)h(to)f(con)m(tin)m(ue)h(with)f(the)630 3140
+y Fq(command-list)39 b Ft(asso)s(ciated)f(with)e(the)g(next)g(clause,)j
+(if)d(an)m(y)-8 b(.)59 b(Using)37 b(`)p Fs(;;&)p Ft(')f(in)g(place)h
+(of)630 3249 y(`)p Fs(;;)p Ft(')30 b(causes)g(the)g(shell)g(to)g(test)h
+(the)f(patterns)g(in)f(the)h(next)g(clause,)h(if)e(an)m(y)-8
+b(,)31 b(and)f(execute)630 3359 y(an)m(y)h(asso)s(ciated)h
+Fq(command-list)h Ft(on)d(a)h(successful)f(matc)m(h.)630
+3485 y(The)c(return)f(status)h(is)g(zero)h(if)f(no)g
+Fq(pattern)g Ft(is)g(matc)m(hed.)40 b(Otherwise,)27 b(the)g(return)e
+(status)630 3595 y(is)30 b(the)h(exit)g(status)g(of)f(the)h
+Fq(command-list)i Ft(executed.)150 3738 y Fs(select)630
+3865 y Ft(The)g Fs(select)f Ft(construct)i(allo)m(ws)h(the)f(easy)g
+(generation)h(of)e(men)m(us.)50 b(It)34 b(has)f(almost)i(the)630
+3974 y(same)c(syn)m(tax)g(as)f(the)h Fs(for)e Ft(command:)870
+4101 y Fs(select)46 b Fi(name)57 b Fs([in)47 b Fi(words)57
+b Fs(...)o(];)47 b(do)h Fi(commands)11 b Fs(;)44 b(done)630
+4227 y Ft(The)d(list)i(of)e(w)m(ords)h(follo)m(wing)h
+Fs(in)e Ft(is)h(expanded,)i(generating)f(a)f(list)g(of)g(items.)75
+b(The)630 4337 y(set)41 b(of)f(expanded)f(w)m(ords)g(is)i(prin)m(ted)e
+(on)h(the)g(standard)f(error)h(output)g(stream,)j(eac)m(h)630
+4446 y(preceded)30 b(b)m(y)g(a)h(n)m(um)m(b)s(er.)40
+b(If)29 b(the)i(`)p Fs(in)f Fi(words)11 b Ft(')29 b(is)h(omitted,)i
+(the)e(p)s(ositional)i(parameters)630 4556 y(are)22 b(prin)m(ted,)h(as)
+f(if)f(`)p Fs(in)30 b("$@")p Ft(')21 b(had)g(b)s(een)f(sp)s(eci\014ed.)
+37 b(The)21 b Fs(PS3)g Ft(prompt)g(is)g(then)g(displa)m(y)m(ed)630
+4666 y(and)38 b(a)h(line)g(is)f(read)h(from)f(the)h(standard)e(input.)
+65 b(If)38 b(the)h(line)g(consists)g(of)f(a)h(n)m(um)m(b)s(er)630
+4775 y(corresp)s(onding)33 b(to)i(one)f(of)g(the)g(displa)m(y)m(ed)h(w)
+m(ords,)f(then)g(the)g(v)-5 b(alue)34 b(of)h Fq(name)k
+Ft(is)34 b(set)g(to)630 4885 y(that)g(w)m(ord.)49 b(If)32
+b(the)i(line)f(is)h(empt)m(y)-8 b(,)35 b(the)e(w)m(ords)g(and)f(prompt)
+h(are)g(displa)m(y)m(ed)h(again.)50 b(If)630 4994 y Fs(EOF)23
+b Ft(is)g(read,)j(the)d Fs(select)f Ft(command)i(completes.)40
+b(An)m(y)23 b(other)h(v)-5 b(alue)24 b(read)g(causes)g
+Fq(name)630 5104 y Ft(to)31 b(b)s(e)f(set)h(to)g(n)m(ull.)41
+b(The)29 b(line)i(read)f(is)h(sa)m(v)m(ed)g(in)f(the)h(v)-5
+b(ariable)31 b Fs(REPLY)p Ft(.)630 5230 y(The)42 b Fq(commands)j
+Ft(are)d(executed)h(after)g(eac)m(h)g(selection)h(un)m(til)e(a)h
+Fs(break)d Ft(command)i(is)630 5340 y(executed,)32 b(at)f(whic)m(h)f(p)
+s(oin)m(t)g(the)h Fs(select)d Ft(command)i(completes.)p
+eop end
+%%Page: 12 18
+TeXDict begin 12 17 bop 150 -116 a Ft(12)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y(Here)39 b(is)g(an)g(example)h(that)f
+(allo)m(ws)i(the)e(user)f(to)i(pic)m(k)f(a)g(\014lename)h(from)e(the)h
+(curren)m(t)630 408 y(directory)-8 b(,)32 b(and)d(displa)m(ys)i(the)f
+(name)h(and)f(index)f(of)i(the)g(\014le)f(selected.)870
+542 y Fs(select)46 b(fname)g(in)i(*;)870 651 y(do)870
+761 y(echo)f(you)g(picked)f($fname)g(\\\($REPLY\\\))870
+870 y(break;)870 980 y(done)150 1136 y(\(\(...)o(\)\))870
+1270 y(\(\()h Fi(expression)56 b Fs(\)\))630 1403 y Ft(The)33
+b(arithmetic)i Fq(expression)f Ft(is)f(ev)-5 b(aluated)35
+b(according)g(to)f(the)g(rules)f(describ)s(ed)g(b)s(elo)m(w)630
+1512 y(\(see)j(Section)f(6.5)h([Shell)f(Arithmetic],)i(page)f(78\).)55
+b(If)34 b(the)h(v)-5 b(alue)35 b(of)g(the)g(expression)g(is)630
+1622 y(non-zero,)27 b(the)f(return)e(status)i(is)g(0;)h(otherwise)f
+(the)g(return)e(status)i(is)g(1.)39 b(This)25 b(is)g(exactly)630
+1731 y(equiv)-5 b(alen)m(t)32 b(to)870 1864 y Fs(let)47
+b(")p Fi(expression)11 b Fs(")630 1998 y Ft(See)25 b(Section)h(4.2)h
+([Bash)e(Builtins],)i(page)f(41,)i(for)c(a)i(full)f(description)g(of)g
+(the)h Fs(let)e Ft(builtin.)150 2154 y Fs([[...)o(]])870
+2287 y([[)47 b Fi(expression)56 b Fs(]])630 2420 y Ft(Return)25
+b(a)h(status)f(of)h(0)g(or)g(1)g(dep)s(ending)e(on)h(the)h(ev)-5
+b(aluation)27 b(of)e(the)h(conditional)h(expres-)630
+2530 y(sion)j Fq(expression)p Ft(.)41 b(Expressions)29
+b(are)i(comp)s(osed)f(of)g(the)h(primaries)f(describ)s(ed)f(b)s(elo)m
+(w)h(in)630 2639 y(Section)36 b(6.4)h([Bash)f(Conditional)g
+(Expressions],)h(page)f(76.)57 b(W)-8 b(ord)36 b(splitting)h(and)e
+(\014le-)630 2749 y(name)24 b(expansion)h(are)g(not)f(p)s(erformed)f
+(on)h(the)h(w)m(ords)f(b)s(et)m(w)m(een)h(the)g(`)p Fs([[)p
+Ft(')f(and)g(`)p Fs(]])p Ft(';)i(tilde)630 2859 y(expansion,)31
+b(parameter)g(and)f(v)-5 b(ariable)31 b(expansion,)g(arithmetic)g
+(expansion,)g(command)630 2968 y(substitution,)40 b(pro)s(cess)f
+(substitution,)h(and)e(quote)h(remo)m(v)-5 b(al)40 b(are)f(p)s
+(erformed.)63 b(Condi-)630 3078 y(tional)32 b(op)s(erators)e(suc)m(h)g
+(as)h(`)p Fs(-f)p Ft(')f(m)m(ust)g(b)s(e)g(unquoted)g(to)h(b)s(e)e
+(recognized)j(as)f(primaries.)630 3211 y(When)d(used)g(with)g(`)p
+Fs([[)p Ft(',)h(The)f(`)p Fs(<)p Ft(')g(and)g(`)p Fs(>)p
+Ft(')h(op)s(erators)f(sort)h(lexicographically)i(using)d(the)630
+3320 y(curren)m(t)i(lo)s(cale.)630 3453 y(When)22 b(the)h(`)p
+Fs(==)p Ft(')f(and)g(`)p Fs(!=)p Ft(')g(op)s(erators)h(are)g(used,)g
+(the)g(string)f(to)i(the)e(righ)m(t)h(of)g(the)g(op)s(erator)630
+3563 y(is)31 b(considered)g(a)h(pattern)f(and)g(matc)m(hed)h(according)
+g(to)g(the)g(rules)f(describ)s(ed)f(b)s(elo)m(w)h(in)630
+3673 y(Section)37 b(3.5.8.1)i([P)m(attern)e(Matc)m(hing],)j(page)c(24.)
+59 b(If)36 b(the)g(shell)g(option)h Fs(nocasematch)630
+3782 y Ft(\(see)42 b(the)f(description)g(of)h Fs(shopt)d
+Ft(in)i(Section)h(4.3.2)h([The)e(Shopt)f(Builtin],)45
+b(page)d(55\))630 3892 y(is)e(enabled,)i(the)e(matc)m(h)h(is)e(p)s
+(erformed)g(without)g(regard)h(to)h(the)f(case)g(of)g(alphab)s(etic)630
+4001 y(c)m(haracters.)h(The)28 b(return)e(v)-5 b(alue)28
+b(is)g(0)g(if)g(the)g(string)g(matc)m(hes)h(\(`)p Fs(==)p
+Ft('\))f(or)g(do)s(es)f(not)h(matc)m(h)630 4111 y(\(`)p
+Fs(!=)p Ft('\)the)33 b(pattern,)g(and)f(1)g(otherwise.)47
+b(An)m(y)32 b(part)g(of)h(the)f(pattern)g(ma)m(y)h(b)s(e)f(quoted)g(to)
+630 4221 y(force)f(it)g(to)g(b)s(e)f(matc)m(hed)h(as)f(a)h(string.)630
+4354 y(An)i(additional)i(binary)e(op)s(erator,)i(`)p
+Fs(=~)p Ft(',)g(is)f(a)m(v)-5 b(ailable,)37 b(with)c(the)h(same)g
+(precedence)h(as)630 4463 y(`)p Fs(==)p Ft(')29 b(and)f(`)p
+Fs(!=)p Ft('.)40 b(When)29 b(it)g(is)g(used,)f(the)h(string)g(to)h(the)
+e(righ)m(t)i(of)f(the)g(op)s(erator)g(is)g(consid-)630
+4573 y(ered)34 b(an)g(extended)g(regular)g(expression)g(and)f(matc)m
+(hed)i(accordingly)g(\(as)f(in)g Fk(r)-5 b(e)g(gex)11
+b Ft(3\)\).)630 4682 y(The)29 b(return)f(v)-5 b(alue)30
+b(is)g(0)g(if)f(the)h(string)g(matc)m(hes)g(the)g(pattern,)g(and)f(1)h
+(otherwise.)41 b(If)29 b(the)630 4792 y(regular)e(expression)g(is)h
+(syn)m(tactically)i(incorrect,)f(the)e(conditional)i(expression's)e
+(return)630 4902 y(v)-5 b(alue)40 b(is)g(2.)68 b(If)39
+b(the)h(shell)f(option)h Fs(nocasematch)d Ft(\(see)j(the)g(description)
+g(of)f Fs(shopt)f Ft(in)630 5011 y(Section)32 b(4.3.2)g([The)f(Shopt)f
+(Builtin],)i(page)g(55\))g(is)f(enabled,)g(the)g(matc)m(h)h(is)e(p)s
+(erformed)630 5121 y(without)36 b(regard)g(to)h(the)f(case)h(of)f
+(alphab)s(etic)h(c)m(haracters.)59 b(An)m(y)36 b(part)g(of)h(the)f
+(pattern)630 5230 y(ma)m(y)g(b)s(e)g(quoted)g(to)g(force)g(it)h(to)f(b)
+s(e)f(matc)m(hed)i(as)f(a)g(string.)57 b(Substrings)34
+b(matc)m(hed)j(b)m(y)630 5340 y(paren)m(thesized)44 b(sub)s
+(expressions)e(within)i(the)g(regular)g(expression)g(are)g(sa)m(v)m(ed)
+h(in)f(the)p eop end
+%%Page: 13 19
+TeXDict begin 13 18 bop 150 -116 a Ft(Chapter)30 b(3:)41
+b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(13)630 299
+y(arra)m(y)38 b(v)-5 b(ariable)38 b Fs(BASH_REMATCH)p
+Ft(.)59 b(The)36 b(elemen)m(t)j(of)f Fs(BASH_REMATCH)c
+Ft(with)j(index)g(0)h(is)630 408 y(the)c(p)s(ortion)f(of)h(the)f
+(string)h(matc)m(hing)g(the)g(en)m(tire)h(regular)e(expression.)50
+b(The)33 b(elemen)m(t)630 518 y(of)39 b Fs(BASH_REMATCH)c
+Ft(with)j(index)g Fq(n)f Ft(is)i(the)f(p)s(ortion)g(of)h(the)f(string)h
+(matc)m(hing)g(the)g Fq(n)p Ft(th)630 628 y(paren)m(thesized)31
+b(sub)s(expression.)630 770 y(Expressions)23 b(ma)m(y)h(b)s(e)e(com)m
+(bined)i(using)f(the)h(follo)m(wing)h(op)s(erators,)g(listed)f(in)f
+(decreasing)630 879 y(order)30 b(of)g(precedence:)630
+1054 y Fs(\()g Fi(expression)38 b Fs(\))1110 1163 y Ft(Returns)30
+b(the)h(v)-5 b(alue)31 b(of)g Fq(expression)p Ft(.)42
+b(This)30 b(ma)m(y)i(b)s(e)e(used)g(to)i(o)m(v)m(erride)g(the)1110
+1273 y(normal)e(precedence)h(of)g(op)s(erators.)630 1447
+y Fs(!)f Fi(expression)1110 1557 y Ft(T)-8 b(rue)30 b(if)g
+Fq(expression)g Ft(is)h(false.)630 1731 y Fi(expression1)38
+b Fs(&&)30 b Fi(expression2)1110 1841 y Ft(T)-8 b(rue)30
+b(if)g(b)s(oth)g Fq(expression1)38 b Ft(and)29 b Fq(expression2)38
+b Ft(are)31 b(true.)630 2015 y Fi(expression1)38 b Fs(||)30
+b Fi(expression2)1110 2125 y Ft(T)-8 b(rue)30 b(if)g(either)h
+Fq(expression1)38 b Ft(or)30 b Fq(expression2)38 b Ft(is)30
+b(true.)630 2299 y(The)25 b Fs(&&)g Ft(and)g Fs(||)f
+Ft(op)s(erators)i(do)f(not)h(ev)-5 b(aluate)27 b Fq(expression2)33
+b Ft(if)26 b(the)f(v)-5 b(alue)26 b(of)g Fq(expression1)630
+2408 y Ft(is)k(su\016cien)m(t)h(to)g(determine)g(the)f(return)g(v)-5
+b(alue)31 b(of)f(the)h(en)m(tire)g(conditional)h(expression.)150
+2623 y Fj(3.2.4.3)63 b(Grouping)43 b(Commands)150 2770
+y Ft(Bash)30 b(pro)m(vides)g(t)m(w)m(o)h(w)m(a)m(ys)f(to)h(group)e(a)h
+(list)g(of)g(commands)f(to)i(b)s(e)e(executed)h(as)g(a)h(unit.)40
+b(When)29 b(com-)150 2879 y(mands)h(are)i(group)s(ed,)f(redirections)h
+(ma)m(y)g(b)s(e)e(applied)i(to)g(the)f(en)m(tire)h(command)g(list.)44
+b(F)-8 b(or)32 b(example,)150 2989 y(the)f(output)f(of)g(all)h(the)g
+(commands)f(in)g(the)h(list)g(ma)m(y)g(b)s(e)e(redirected)i(to)g(a)g
+(single)g(stream.)150 3171 y Fs(\(\))870 3313 y(\()47
+b Fi(list)58 b Fs(\))630 3455 y Ft(Placing)30 b(a)f(list)g(of)g
+(commands)f(b)s(et)m(w)m(een)i(paren)m(theses)e(causes)i(a)f(subshell)e
+(en)m(vironmen)m(t)630 3564 y(to)k(b)s(e)e(created)j(\(see)f(Section)g
+(3.7.3)h([Command)d(Execution)i(En)m(vironmen)m(t],)g(page)f(30\),)630
+3674 y(and)d(eac)m(h)i(of)e(the)h(commands)f(in)g Fq(list)j
+Ft(to)f(b)s(e)e(executed)h(in)f(that)h(subshell.)39 b(Since)28
+b(the)f Fq(list)630 3783 y Ft(is)i(executed)g(in)f(a)h(subshell,)g(v)-5
+b(ariable)29 b(assignmen)m(ts)g(do)g(not)g(remain)f(in)g(e\013ect)j
+(after)e(the)630 3893 y(subshell)g(completes.)150 4067
+y Fs({})870 4209 y({)47 b Fi(list)11 b Fs(;)46 b(})630
+4351 y Ft(Placing)30 b(a)g(list)g(of)g(commands)f(b)s(et)m(w)m(een)h
+(curly)f(braces)g(causes)h(the)f(list)h(to)g(b)s(e)f(executed)630
+4461 y(in)d(the)h(curren)m(t)g(shell)f(con)m(text.)42
+b(No)27 b(subshell)f(is)g(created.)41 b(The)26 b(semicolon)i(\(or)f
+(newline\))630 4570 y(follo)m(wing)32 b Fq(list)h Ft(is)d(required.)275
+4752 y(In)44 b(addition)h(to)h(the)f(creation)i(of)e(a)g(subshell,)j
+(there)e(is)f(a)g(subtle)g(di\013erence)h(b)s(et)m(w)m(een)f(these)150
+4862 y(t)m(w)m(o)c(constructs)e(due)g(to)g(historical)i(reasons.)67
+b(The)39 b(braces)g(are)h Fs(reserved)28 b(words)p Ft(,)40
+b(so)g(they)f(m)m(ust)150 4971 y(b)s(e)d(separated)h(from)f(the)g
+Fq(list)j Ft(b)m(y)e Fs(blank)p Ft(s)e(or)h(other)h(shell)f(metac)m
+(haracters.)62 b(The)36 b(paren)m(theses)h(are)150 5081
+y Fs(operators)p Ft(,)23 b(and)h(are)g(recognized)i(as)e(separate)i
+(tok)m(ens)f(b)m(y)f(the)g(shell)h(ev)m(en)g(if)f(they)g(are)h(not)f
+(separated)150 5191 y(from)30 b(the)g Fq(list)j Ft(b)m(y)e(whitespace.)
+275 5340 y(The)e(exit)j(status)e(of)h(b)s(oth)f(of)g(these)h
+(constructs)g(is)f(the)h(exit)g(status)f(of)h Fq(list)r
+Ft(.)p eop end
+%%Page: 14 20
+TeXDict begin 14 19 bop 150 -116 a Ft(14)2572 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fj(3.2.5)63 b(Copro)s(cesses)150
+446 y Ft(A)37 b Fs(coprocess)c Ft(is)k(a)g(shell)f(command)h(preceded)f
+(b)m(y)g(the)h Fs(coproc)d Ft(reserv)m(ed)j(w)m(ord.)59
+b(A)36 b(copro)s(cess)h(is)150 555 y(executed)g(async)m(hronously)g(in)
+f(a)h(subshell,)g(as)g(if)g(the)f(command)h(had)f(b)s(een)f(terminated)
+i(with)g(the)150 665 y(`)p Fs(&)p Ft(')d(con)m(trol)h(op)s(erator,)g
+(with)f(a)g(t)m(w)m(o-w)m(a)m(y)i(pip)s(e)d(established)h(b)s(et)m(w)m
+(een)h(the)f(executing)h(shell)f(and)f(the)150 775 y(copro)s(cess.)275
+906 y(The)c(format)i(for)f(a)h(copro)s(cess)g(is:)390
+1037 y Fs(coproc)46 b([)p Fi(NAME)11 b Fs(])46 b Fi(command)56
+b Fs([)p Fi(redirections)11 b Fs(])150 1168 y Ft(This)41
+b(creates)i(a)g(copro)s(cess)f(named)f Fq(NAME)5 b Ft(.)43
+b(If)f Fq(NAME)47 b Ft(is)42 b(not)g(supplied,)i(the)e(default)g(name)g
+(is)150 1277 y Fq(COPR)m(OC)8 b Ft(.)22 b Fq(NAME)29
+b Ft(m)m(ust)23 b(not)g(b)s(e)g(supplied)e(if)i Fq(command)k
+Ft(is)c(a)g(simple)g(command)g(\(see)h(Section)g(3.2.1)150
+1387 y([Simple)39 b(Commands],)h(page)g(8\);)k(otherwise,)e(it)d(is)g
+(in)m(terpreted)h(as)f(the)g(\014rst)f(w)m(ord)h(of)g(the)g(simple)150
+1496 y(command.)275 1627 y(When)23 b(the)h(copro)s(c)g(is)g(executed,)i
+(the)e(shell)g(creates)h(an)e(arra)m(y)i(v)-5 b(ariable)24
+b(\(see)h(Section)f(6.7)h([Arra)m(ys],)150 1737 y(page)43
+b(80\))g(named)f Fq(NAME)48 b Ft(in)42 b(the)g(con)m(text)i(of)e(the)h
+(executing)g(shell.)76 b(The)42 b(standard)f(output)h(of)150
+1846 y Fq(command)d Ft(is)d(connected)h(via)g(a)f(pip)s(e)g(to)g(a)h
+(\014le)f(descriptor)g(in)f(the)i(executing)g(shell,)h(and)d(that)i
+(\014le)150 1956 y(descriptor)25 b(is)f(assigned)h(to)h
+Fq(NAME)5 b Ft([0].)40 b(The)25 b(standard)e(input)h(of)h
+Fq(command)j Ft(is)d(connected)g(via)h(a)f(pip)s(e)150
+2066 y(to)33 b(a)f(\014le)g(descriptor)g(in)f(the)i(executing)g(shell,)
+f(and)g(that)g(\014le)g(descriptor)g(is)g(assigned)g(to)h
+Fq(NAME)5 b Ft([1].)150 2175 y(This)31 b(pip)s(e)g(is)h(established)g
+(b)s(efore)g(an)m(y)g(redirections)g(sp)s(eci\014ed)g(b)m(y)f(the)i
+(command)e(\(see)i(Section)g(3.6)150 2285 y([Redirections],)25
+b(page)e(26\).)39 b(The)21 b(\014le)h(descriptors)g(can)g(b)s(e)f
+(utilized)i(as)f(argumen)m(ts)h(to)f(shell)g(commands)150
+2394 y(and)30 b(redirections)h(using)f(standard)f(w)m(ord)h
+(expansions.)275 2525 y(The)f(pro)s(cess)h(id)f(of)h(the)g(shell)h(spa)
+m(wned)e(to)i(execute)g(the)f(copro)s(cess)h(is)f(a)m(v)-5
+b(ailable)32 b(as)e(the)g(v)-5 b(alue)31 b(of)150 2635
+y(the)26 b(v)-5 b(ariable)26 b Fq(NAME)p 931 2635 28
+4 v 46 w Ft(PID.)g(The)f Fs(wait)g Ft(builtin)g(command)g(ma)m(y)h(b)s
+(e)f(used)g(to)i(w)m(ait)f(for)g(the)g(copro)s(cess)150
+2745 y(to)31 b(terminate.)275 2876 y(The)e(return)h(status)g(of)h(a)g
+(copro)s(cess)f(is)h(the)f(exit)i(status)e(of)h Fq(command)t
+Ft(.)150 3101 y Fr(3.3)68 b(Shell)45 b(F)-11 b(unctions)150
+3260 y Ft(Shell)35 b(functions)h(are)g(a)g(w)m(a)m(y)g(to)h(group)e
+(commands)g(for)h(later)g(execution)h(using)e(a)h(single)g(name)g(for)
+150 3370 y(the)f(group.)55 b(They)35 b(are)g(executed)h(just)f(lik)m(e)
+h(a)g Fs(")p Ft(regular)p Fs(")f Ft(command.)54 b(When)35
+b(the)h(name)f(of)g(a)h(shell)150 3480 y(function)j(is)g(used)f(as)h(a)
+h(simple)f(command)g(name,)i(the)e(list)h(of)f(commands)g(asso)s
+(ciated)i(with)d(that)150 3589 y(function)25 b(name)h(is)g(executed.)40
+b(Shell)25 b(functions)g(are)i(executed)f(in)f(the)h(curren)m(t)g
+(shell)g(con)m(text;)j(no)c(new)150 3699 y(pro)s(cess)30
+b(is)g(created)i(to)f(in)m(terpret)g(them.)275 3830 y(F)-8
+b(unctions)30 b(are)h(declared)g(using)f(this)g(syn)m(tax:)390
+3961 y Fs([)47 b(function)f(])h Fi(name)58 b Fs(\(\))47
+b Fi(compound-command)54 b Fs([)47 b Fi(redirections)55
+b Fs(])275 4092 y Ft(This)31 b(de\014nes)h(a)g(shell)h(function)f
+(named)g Fq(name)5 b Ft(.)47 b(The)32 b(reserv)m(ed)h(w)m(ord)f
+Fs(function)e Ft(is)i(optional.)48 b(If)150 4201 y(the)39
+b Fs(function)f Ft(reserv)m(ed)h(w)m(ord)g(is)g(supplied,)i(the)e
+(paren)m(theses)h(are)f(optional.)69 b(The)39 b Fq(b)s(o)s(dy)45
+b Ft(of)40 b(the)150 4311 y(function)h(is)h(the)g(comp)s(ound)e
+(command)h Fq(comp)s(ound-command)j Ft(\(see)e(Section)h(3.2.4)g([Comp)
+s(ound)150 4420 y(Commands],)33 b(page)g(9\).)48 b(That)33
+b(command)g(is)f(usually)h(a)g Fq(list)i Ft(enclosed)e(b)s(et)m(w)m
+(een)h Fs({)e Ft(and)g Fs(})p Ft(,)h(but)f(ma)m(y)150
+4530 y(b)s(e)27 b(an)m(y)h(comp)s(ound)e(command)h(listed)h(ab)s(o)m(v)
+m(e.)41 b Fq(comp)s(ound-command)30 b Ft(is)e(executed)g(whenev)m(er)g
+Fq(name)150 4640 y Ft(is)37 b(sp)s(eci\014ed)g(as)g(the)h(name)f(of)g
+(a)h(command.)61 b(An)m(y)37 b(redirections)h(\(see)g(Section)g(3.6)g
+([Redirections],)150 4749 y(page)31 b(26\))h(asso)s(ciated)g(with)e
+(the)g(shell)h(function)f(are)h(p)s(erformed)d(when)i(the)g(function)g
+(is)h(executed.)275 4880 y(A)41 b(function)f(de\014nition)h(ma)m(y)g(b)
+s(e)g(deleted)g(using)g(the)g(`)p Fs(-f)p Ft(')g(option)g(to)h(the)f
+Fs(unset)e Ft(builtin)i(\(see)150 4990 y(Section)31 b(4.1)h([Bourne)e
+(Shell)g(Builtins],)h(page)h(35\).)275 5121 y(The)26
+b(exit)i(status)g(of)f(a)h(function)f(de\014nition)g(is)g(zero)h
+(unless)f(a)g(syn)m(tax)h(error)f(o)s(ccurs)g(or)g(a)h(readonly)150
+5230 y(function)k(with)f(the)i(same)f(name)g(already)h(exists.)46
+b(When)32 b(executed,)h(the)f(exit)h(status)g(of)f(a)g(function)150
+5340 y(is)e(the)h(exit)g(status)g(of)f(the)h(last)g(command)f(executed)
+i(in)e(the)g(b)s(o)s(dy)-8 b(.)p eop end
+%%Page: 15 21
+TeXDict begin 15 20 bop 150 -116 a Ft(Chapter)30 b(3:)41
+b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(15)275 299
+y(Note)22 b(that)f(for)f(historical)i(reasons,)h(in)e(the)g(most)g
+(common)g(usage)g(the)g(curly)f(braces)h(that)g(surround)150
+408 y(the)38 b(b)s(o)s(dy)d(of)j(the)f(function)g(m)m(ust)g(b)s(e)g
+(separated)h(from)f(the)g(b)s(o)s(dy)f(b)m(y)h Fs(blank)p
+Ft(s)f(or)h(newlines.)62 b(This)150 518 y(is)38 b(b)s(ecause)g(the)h
+(braces)f(are)h(reserv)m(ed)f(w)m(ords)g(and)f(are)i(only)f(recognized)
+i(as)e(suc)m(h)g(when)f(they)i(are)150 628 y(separated)26
+b(from)f(the)h(command)f(list)i(b)m(y)e(whitespace)h(or)g(another)g
+(shell)g(metac)m(haracter.)41 b(Also,)28 b(when)150 737
+y(using)i(the)g(braces,)h(the)g Fq(list)i Ft(m)m(ust)d(b)s(e)g
+(terminated)h(b)m(y)f(a)h(semicolon,)h(a)e(`)p Fs(&)p
+Ft(',)h(or)g(a)f(newline.)275 879 y(When)i(a)i(function)f(is)g
+(executed,)i(the)e(argumen)m(ts)h(to)g(the)f(function)g(b)s(ecome)g
+(the)h(p)s(ositional)g(pa-)150 988 y(rameters)42 b(during)e(its)i
+(execution)h(\(see)f(Section)g(3.4.1)h([P)m(ositional)h(P)m
+(arameters],)i(page)c(16\).)75 b(The)150 1098 y(sp)s(ecial)37
+b(parameter)f(`)p Fs(#)p Ft(')g(that)h(expands)e(to)i(the)f(n)m(um)m(b)
+s(er)f(of)h(p)s(ositional)h(parameters)f(is)g(up)s(dated)f(to)150
+1207 y(re\015ect)h(the)f(c)m(hange.)56 b(Sp)s(ecial)35
+b(parameter)h Fs(0)f Ft(is)g(unc)m(hanged.)54 b(The)35
+b(\014rst)f(elemen)m(t)j(of)e(the)g Fs(FUNCNAME)150 1317
+y Ft(v)-5 b(ariable)31 b(is)g(set)f(to)i(the)e(name)h(of)f(the)h
+(function)f(while)g(the)h(function)f(is)g(executing.)275
+1459 y(All)25 b(other)g(asp)s(ects)g(of)g(the)g(shell)g(execution)h(en)
+m(vironmen)m(t)g(are)f(iden)m(tical)h(b)s(et)m(w)m(een)g(a)f(function)g
+(and)150 1568 y(its)35 b(caller)i(with)d(these)i(exceptions:)50
+b(the)36 b Fs(DEBUG)d Ft(and)h Fs(RETURN)g Ft(traps)g(are)i(not)f
+(inherited)f(unless)h(the)150 1678 y(function)26 b(has)g(b)s(een)f(giv)
+m(en)i(the)g Fs(trace)d Ft(attribute)j(using)f(the)g
+Fs(declare)e Ft(builtin)i(or)g(the)h Fs(-o)i(functrace)150
+1787 y Ft(option)f(has)e(b)s(een)h(enabled)g(with)g(the)g
+Fs(set)f Ft(builtin,)i(\(in)f(whic)m(h)f(case)j(all)f(functions)e
+(inherit)h(the)g Fs(DEBUG)150 1897 y Ft(and)33 b Fs(RETURN)f
+Ft(traps\),)j(and)e(the)h Fs(ERR)f Ft(trap)h(is)g(not)g(inherited)f
+(unless)g(the)h Fs(-o)c(errtrace)h Ft(shell)j(option)150
+2007 y(has)h(b)s(een)f(enabled.)55 b(See)35 b(Section)h(4.1)g([Bourne)f
+(Shell)g(Builtins],)i(page)f(35,)i(for)c(the)i(description)f(of)150
+2116 y(the)c Fs(trap)e Ft(builtin.)275 2258 y(If)37 b(the)g(builtin)g
+(command)h Fs(return)d Ft(is)j(executed)g(in)g(a)g(function,)h(the)e
+(function)h(completes)h(and)150 2367 y(execution)25 b(resumes)e(with)h
+(the)g(next)g(command)f(after)i(the)f(function)f(call.)40
+b(An)m(y)24 b(command)f(asso)s(ciated)150 2477 y(with)36
+b(the)h Fs(RETURN)d Ft(trap)i(is)h(executed)g(b)s(efore)f(execution)i
+(resumes.)57 b(When)37 b(a)f(function)g(completes,)150
+2586 y(the)h(v)-5 b(alues)38 b(of)f(the)g(p)s(ositional)h(parameters)f
+(and)g(the)g(sp)s(ecial)h(parameter)f(`)p Fs(#)p Ft(')g(are)h(restored)
+f(to)h(the)150 2696 y(v)-5 b(alues)26 b(they)f(had)g(prior)f(to)i(the)g
+(function's)f(execution.)40 b(If)25 b(a)h(n)m(umeric)f(argumen)m(t)h
+(is)f(giv)m(en)h(to)g Fs(return)p Ft(,)150 2806 y(that)j(is)g(the)f
+(function's)h(return)e(status;)j(otherwise)f(the)f(function's)h(return)
+e(status)i(is)f(the)h(exit)h(status)150 2915 y(of)h(the)f(last)h
+(command)f(executed)i(b)s(efore)e(the)g Fs(return)p Ft(.)275
+3057 y(V)-8 b(ariables)31 b(lo)s(cal)g(to)f(the)g(function)f(ma)m(y)i
+(b)s(e)e(declared)h(with)f(the)h Fs(local)f Ft(builtin.)40
+b(These)29 b(v)-5 b(ariables)150 3166 y(are)31 b(visible)g(only)f(to)h
+(the)g(function)f(and)g(the)g(commands)g(it)h(in)m(v)m(ok)m(es.)275
+3308 y(F)-8 b(unction)38 b(names)f(and)g(de\014nitions)g(ma)m(y)i(b)s
+(e)e(listed)h(with)f(the)h(`)p Fs(-f)p Ft(')f(option)h(to)h(the)e
+Fs(declare)f Ft(or)150 3417 y Fs(typeset)d Ft(builtin)h(commands)h
+(\(see)h(Section)g(4.2)g([Bash)f(Builtins],)i(page)f(41\).)55
+b(The)35 b(`)p Fs(-F)p Ft(')g(option)g(to)150 3527 y
+Fs(declare)f Ft(or)i Fs(typeset)e Ft(will)i(list)h(the)f(function)g
+(names)g(only)g(\(and)g(optionally)h(the)f(source)g(\014le)h(and)150
+3636 y(line)c(n)m(um)m(b)s(er,)g(if)f(the)h Fs(extdebug)e
+Ft(shell)i(option)g(is)g(enabled\).)49 b(F)-8 b(unctions)33
+b(ma)m(y)h(b)s(e)e(exp)s(orted)g(so)h(that)150 3746 y(subshells)f
+(automatically)37 b(ha)m(v)m(e)d(them)g(de\014ned)e(with)h(the)g(`)p
+Fs(-f)p Ft(')h(option)g(to)g(the)f Fs(export)f Ft(builtin)h(\(see)150
+3856 y(Section)g(4.1)g([Bourne)f(Shell)g(Builtins],)i(page)f(35\).)47
+b(Note)33 b(that)g(shell)f(functions)g(and)f(v)-5 b(ariables)33
+b(with)150 3965 y(the)d(same)g(name)g(ma)m(y)g(result)g(in)g(m)m
+(ultiple)g(iden)m(tically-named)i(en)m(tries)f(in)e(the)h(en)m
+(vironmen)m(t)g(passed)150 4075 y(to)h(the)g(shell's)f(c)m(hildren.)41
+b(Care)30 b(should)g(b)s(e)f(tak)m(en)j(in)e(cases)h(where)f(this)g(ma)
+m(y)h(cause)g(a)g(problem.)275 4216 y(F)-8 b(unctions)30
+b(ma)m(y)h(b)s(e)f(recursiv)m(e.)41 b(No)31 b(limit)g(is)g(placed)g(on)
+f(the)g(n)m(um)m(b)s(er)g(of)g(recursiv)m(e)h(calls.)150
+4459 y Fr(3.4)68 b(Shell)45 b(P)l(arameters)150 4619
+y Ft(A)23 b Fq(parameter)31 b Ft(is)23 b(an)g(en)m(tit)m(y)i(that)f
+(stores)g(v)-5 b(alues.)39 b(It)23 b(can)h(b)s(e)f(a)g
+Fs(name)p Ft(,)h(a)g(n)m(um)m(b)s(er,)f(or)h(one)f(of)h(the)f(sp)s
+(ecial)150 4728 y(c)m(haracters)i(listed)f(b)s(elo)m(w.)39
+b(A)24 b Fq(v)-5 b(ariable)29 b Ft(is)24 b(a)g(parameter)g(denoted)f(b)
+m(y)h(a)g Fs(name)p Ft(.)37 b(A)24 b(v)-5 b(ariable)24
+b(has)f(a)h Fq(v)-5 b(alue)150 4838 y Ft(and)33 b(zero)i(or)e(more)h
+Fq(attributes)t Ft(.)51 b(A)m(ttributes)34 b(are)g(assigned)g(using)f
+(the)h Fs(declare)e Ft(builtin)h(command)150 4947 y(\(see)e(the)g
+(description)f(of)h(the)f Fs(declare)f Ft(builtin)h(in)g(Section)h(4.2)
+g([Bash)g(Builtins],)g(page)g(41\).)275 5089 y(A)d(parameter)h(is)g
+(set)g(if)f(it)h(has)f(b)s(een)g(assigned)h(a)g(v)-5
+b(alue.)40 b(The)28 b(n)m(ull)h(string)f(is)h(a)g(v)-5
+b(alid)28 b(v)-5 b(alue.)41 b(Once)150 5198 y(a)31 b(v)-5
+b(ariable)31 b(is)f(set,)i(it)e(ma)m(y)h(b)s(e)f(unset)g(only)h(b)m(y)f
+(using)g(the)g Fs(unset)f Ft(builtin)h(command.)275 5340
+y(A)g(v)-5 b(ariable)31 b(ma)m(y)g(b)s(e)f(assigned)g(to)i(b)m(y)e(a)h
+(statemen)m(t)h(of)e(the)h(form)p eop end
+%%Page: 16 22
+TeXDict begin 16 21 bop 150 -116 a Ft(16)2572 b(Bash)31
+b(Reference)g(Man)m(ual)390 299 y Fi(name)11 b Fs(=[)p
+Fi(value)g Fs(])150 435 y Ft(If)34 b Fq(v)-5 b(alue)40
+b Ft(is)35 b(not)g(giv)m(en,)h(the)f(v)-5 b(ariable)35
+b(is)g(assigned)g(the)f(n)m(ull)h(string.)53 b(All)35
+b Fq(v)-5 b(alue)5 b Ft(s)35 b(undergo)f(tilde)h(ex-)150
+544 y(pansion,)h(parameter)f(and)f(v)-5 b(ariable)36
+b(expansion,)f(command)g(substitution,)h(arithmetic)g(expansion,)150
+654 y(and)k(quote)h(remo)m(v)-5 b(al)42 b(\(detailed)h(b)s(elo)m(w\).)
+72 b(If)40 b(the)h(v)-5 b(ariable)41 b(has)g(its)g Fs(integer)e
+Ft(attribute)i(set,)j(then)150 763 y Fq(v)-5 b(alue)38
+b Ft(is)33 b(ev)-5 b(aluated)34 b(as)f(an)g(arithmetic)h(expression)f
+(ev)m(en)h(if)e(the)h Fs($\(\(...)o(\)\))f Ft(expansion)h(is)g(not)g
+(used)150 873 y(\(see)e(Section)g(3.5.5)i([Arithmetic)e(Expansion],)f
+(page)h(23\).)42 b(W)-8 b(ord)31 b(splitting)g(is)g(not)f(p)s
+(erformed,)f(with)150 983 y(the)35 b(exception)h(of)f
+Fs("$@")f Ft(as)h(explained)g(b)s(elo)m(w.)54 b(Filename)36
+b(expansion)f(is)g(not)g(p)s(erformed.)53 b(Assign-)150
+1092 y(men)m(t)33 b(statemen)m(ts)h(ma)m(y)f(also)g(app)s(ear)f(as)g
+(argumen)m(ts)h(to)g(the)g Fs(alias)p Ft(,)e Fs(declare)p
+Ft(,)g Fs(typeset)p Ft(,)g Fs(export)p Ft(,)150 1202
+y Fs(readonly)p Ft(,)d(and)i Fs(local)f Ft(builtin)h(commands.)275
+1338 y(In)f(the)h(con)m(text)i(where)d(an)h(assignmen)m(t)h(statemen)m
+(t)h(is)e(assigning)g(a)h(v)-5 b(alue)30 b(to)h(a)f(shell)g(v)-5
+b(ariable)31 b(or)150 1447 y(arra)m(y)f(index)g(\(see)h(Section)g(6.7)g
+([Arra)m(ys],)g(page)g(80\),)g(the)f(`)p Fs(+=)p Ft(')g(op)s(erator)g
+(can)h(b)s(e)e(used)g(to)i(app)s(end)d(to)150 1557 y(or)36
+b(add)g(to)h(the)f(v)-5 b(ariable's)37 b(previous)f(v)-5
+b(alue.)59 b(When)36 b(`)p Fs(+=)p Ft(')g(is)g(applied)g(to)h(a)g(v)-5
+b(ariable)37 b(for)f(whic)m(h)g(the)150 1666 y(in)m(teger)k(attribute)e
+(has)g(b)s(een)g(set,)j Fq(v)-5 b(alue)44 b Ft(is)38
+b(ev)-5 b(aluated)39 b(as)g(an)f(arithmetic)h(expression)f(and)g(added)
+150 1776 y(to)e(the)f(v)-5 b(ariable's)36 b(curren)m(t)f(v)-5
+b(alue,)37 b(whic)m(h)e(is)g(also)h(ev)-5 b(aluated.)56
+b(When)35 b(`)p Fs(+=)p Ft(')g(is)h(applied)f(to)g(an)g(arra)m(y)150
+1886 y(v)-5 b(ariable)26 b(using)e(comp)s(ound)f(assignmen)m(t)j(\(see)
+f(Section)h(6.7)f([Arra)m(ys],)i(page)f(80\),)h(the)e(v)-5
+b(ariable's)25 b(v)-5 b(alue)150 1995 y(is)32 b(not)f(unset)h(\(as)g
+(it)g(is)f(when)g(using)g(`)p Fs(=)p Ft('\),)i(and)e(new)g(v)-5
+b(alues)32 b(are)g(app)s(ended)d(to)k(the)f(arra)m(y)g(b)s(eginning)150
+2105 y(at)27 b(one)f(greater)i(than)e(the)g(arra)m(y's)h(maxim)m(um)f
+(index)g(\(for)g(indexed)g(arra)m(ys\),)i(or)e(added)g(as)g(additional)
+150 2214 y(k)m(ey-v)-5 b(alue)35 b(pairs)e(in)g(an)g(asso)s(ciativ)m(e)
+j(arra)m(y)-8 b(.)51 b(When)33 b(applied)g(to)h(a)g(string-v)-5
+b(alued)34 b(v)-5 b(ariable,)35 b Fq(v)-5 b(alue)39 b
+Ft(is)150 2324 y(expanded)30 b(and)f(app)s(ended)g(to)i(the)g(v)-5
+b(ariable's)31 b(v)-5 b(alue.)150 2525 y Fj(3.4.1)63
+b(P)m(ositional)41 b(P)m(arameters)150 2671 y Ft(A)28
+b Fq(p)s(ositional)h(parameter)35 b Ft(is)28 b(a)g(parameter)g(denoted)
+g(b)m(y)g(one)g(or)g(more)g(digits,)h(other)g(than)e(the)h(single)150
+2781 y(digit)34 b Fs(0)p Ft(.)48 b(P)m(ositional)36 b(parameters)d(are)
+g(assigned)h(from)e(the)i(shell's)f(argumen)m(ts)g(when)f(it)i(is)f(in)
+m(v)m(ok)m(ed,)150 2891 y(and)38 b(ma)m(y)i(b)s(e)e(reassigned)i(using)
+e(the)h Fs(set)g Ft(builtin)f(command.)67 b(P)m(ositional)41
+b(parameter)e Fs(N)g Ft(ma)m(y)h(b)s(e)150 3000 y(referenced)34
+b(as)h Fs(${N})p Ft(,)g(or)f(as)h Fs($N)e Ft(when)h Fs(N)g
+Ft(consists)h(of)f(a)h(single)g(digit.)54 b(P)m(ositional)37
+b(parameters)d(ma)m(y)150 3110 y(not)j(b)s(e)f(assigned)h(to)g(with)f
+(assignmen)m(t)i(statemen)m(ts.)61 b(The)36 b Fs(set)g
+Ft(and)g Fs(shift)f Ft(builtins)h(are)h(used)f(to)150
+3219 y(set)k(and)f(unset)f(them)i(\(see)g(Chapter)f(4)g([Shell)h
+(Builtin)g(Commands],)h(page)f(35\).)68 b(The)39 b(p)s(ositional)150
+3329 y(parameters)44 b(are)g(temp)s(orarily)g(replaced)h(when)e(a)h
+(shell)g(function)g(is)g(executed)g(\(see)h(Section)g(3.3)150
+3439 y([Shell)30 b(F)-8 b(unctions],)32 b(page)f(14\).)275
+3574 y(When)c(a)i(p)s(ositional)g(parameter)g(consisting)f(of)h(more)f
+(than)g(a)g(single)h(digit)g(is)f(expanded,)g(it)h(m)m(ust)150
+3684 y(b)s(e)h(enclosed)h(in)f(braces.)150 3885 y Fj(3.4.2)63
+b(Sp)s(ecial)41 b(P)m(arameters)150 4032 y Ft(The)d(shell)g(treats)h
+(sev)m(eral)g(parameters)f(sp)s(ecially)-8 b(.)65 b(These)38
+b(parameters)h(ma)m(y)f(only)g(b)s(e)g(referenced;)150
+4141 y(assignmen)m(t)31 b(to)g(them)g(is)f(not)h(allo)m(w)m(ed.)150
+4303 y Fs(*)432 b Ft(Expands)29 b(to)h(the)h(p)s(ositional)f
+(parameters,)h(starting)g(from)e(one.)41 b(When)30 b(the)g(expansion)
+630 4412 y(o)s(ccurs)e(within)f(double)h(quotes,)h(it)g(expands)e(to)i
+(a)f(single)h(w)m(ord)f(with)g(the)g(v)-5 b(alue)29 b(of)f(eac)m(h)630
+4522 y(parameter)i(separated)g(b)m(y)f(the)g(\014rst)g(c)m(haracter)i
+(of)e(the)h Fs(IFS)e Ft(sp)s(ecial)i(v)-5 b(ariable.)41
+b(That)30 b(is,)630 4631 y Fs("$*")h Ft(is)i(equiv)-5
+b(alen)m(t)33 b(to)h Fs("$1)p Fi(c)11 b Fs($2)p Fi(c)g
+Fs(...)l(")p Ft(,)33 b(where)f Fq(c)38 b Ft(is)32 b(the)h(\014rst)e(c)m
+(haracter)j(of)f(the)f(v)-5 b(alue)630 4741 y(of)30 b(the)g
+Fs(IFS)g Ft(v)-5 b(ariable.)41 b(If)30 b Fs(IFS)f Ft(is)h(unset,)g(the)
+g(parameters)g(are)h(separated)f(b)m(y)g(spaces.)41 b(If)630
+4850 y Fs(IFS)29 b Ft(is)i(n)m(ull,)f(the)h(parameters)g(are)f(joined)h
+(without)f(in)m(terv)m(ening)i(separators.)150 5011 y
+Fs(@)432 b Ft(Expands)29 b(to)h(the)h(p)s(ositional)f(parameters,)h
+(starting)g(from)e(one.)41 b(When)30 b(the)g(expansion)630
+5121 y(o)s(ccurs)c(within)g(double)f(quotes,)j(eac)m(h)f(parameter)g
+(expands)e(to)i(a)g(separate)g(w)m(ord.)39 b(That)630
+5230 y(is,)29 b Fs("$@")e Ft(is)i(equiv)-5 b(alen)m(t)30
+b(to)f Fs("$1")g("$2")h(...)o Ft(.)40 b(If)28 b(the)g(double-quoted)h
+(expansion)f(o)s(ccurs)630 5340 y(within)d(a)h(w)m(ord,)g(the)g
+(expansion)f(of)h(the)g(\014rst)f(parameter)h(is)f(joined)h(with)f(the)
+h(b)s(eginning)p eop end
+%%Page: 17 23
+TeXDict begin 17 22 bop 150 -116 a Ft(Chapter)30 b(3:)41
+b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(17)630 299
+y(part)25 b(of)g(the)g(original)g(w)m(ord,)h(and)e(the)h(expansion)g
+(of)g(the)g(last)h(parameter)f(is)g(joined)f(with)630
+408 y(the)37 b(last)g(part)g(of)f(the)h(original)h(w)m(ord.)59
+b(When)36 b(there)h(are)g(no)f(p)s(ositional)h(parameters,)630
+518 y Fs("$@")29 b Ft(and)h Fs($@)g Ft(expand)f(to)j(nothing)e(\(i.e.,)
+i(they)e(are)h(remo)m(v)m(ed\).)150 677 y Fs(#)432 b
+Ft(Expands)29 b(to)i(the)g(n)m(um)m(b)s(er)e(of)h(p)s(ositional)h
+(parameters)g(in)f(decimal.)150 836 y Fs(?)432 b Ft(Expands)29
+b(to)i(the)g(exit)g(status)g(of)f(the)h(most)f(recen)m(tly)i(executed)f
+(foreground)f(pip)s(eline.)150 995 y Fs(-)432 b Ft(\(A)31
+b(h)m(yphen.\))42 b(Expands)30 b(to)h(the)g(curren)m(t)g(option)h
+(\015ags)f(as)g(sp)s(eci\014ed)f(up)s(on)g(in)m(v)m(o)s(cation,)630
+1105 y(b)m(y)35 b(the)h Fs(set)e Ft(builtin)h(command,)h(or)g(those)g
+(set)f(b)m(y)h(the)f(shell)h(itself)g(\(suc)m(h)f(as)h(the)f(`)p
+Fs(-i)p Ft(')630 1215 y(option\).)150 1374 y Fs($)432
+b Ft(Expands)39 b(to)j(the)f(pro)s(cess)f Fl(id)h Ft(of)g(the)g(shell.)
+73 b(In)40 b(a)h Fs(\(\))f Ft(subshell,)j(it)e(expands)f(to)i(the)630
+1483 y(pro)s(cess)30 b Fl(id)g Ft(of)h(the)g(in)m(v)m(oking)g(shell,)g
+(not)g(the)f(subshell.)150 1643 y Fs(!)432 b Ft(Expands)39
+b(to)i(the)g(pro)s(cess)e Fl(id)i Ft(of)f(the)h(most)g(recen)m(tly)g
+(executed)g(bac)m(kground)g(\(asyn-)630 1752 y(c)m(hronous\))30
+b(command.)150 1911 y Fs(0)432 b Ft(Expands)20 b(to)j(the)f(name)g(of)g
+(the)g(shell)g(or)f(shell)h(script.)38 b(This)21 b(is)h(set)g(at)h
+(shell)f(initialization.)630 2021 y(If)44 b(Bash)g(is)g(in)m(v)m(ok)m
+(ed)i(with)e(a)g(\014le)g(of)h(commands)e(\(see)j(Section)f(3.8)g
+([Shell)f(Scripts],)630 2130 y(page)39 b(33\),)i Fs($0)d
+Ft(is)g(set)g(to)h(the)f(name)g(of)g(that)h(\014le.)64
+b(If)37 b(Bash)i(is)f(started)g(with)g(the)g(`)p Fs(-c)p
+Ft(')630 2240 y(option)i(\(see)g(Section)h(6.1)f([In)m(v)m(oking)h
+(Bash],)h(page)e(71\),)j(then)d Fs($0)e Ft(is)i(set)g(to)g(the)g
+(\014rst)630 2350 y(argumen)m(t)31 b(after)g(the)g(string)g(to)g(b)s(e)
+f(executed,)i(if)f(one)g(is)f(presen)m(t.)42 b(Otherwise,)31
+b(it)g(is)f(set)630 2459 y(to)h(the)g(\014lename)f(used)g(to)h(in)m(v)m
+(ok)m(e)h(Bash,)f(as)g(giv)m(en)g(b)m(y)f(argumen)m(t)h(zero.)150
+2618 y Fs(_)432 b Ft(\(An)27 b(underscore.\))39 b(A)m(t)29
+b(shell)e(startup,)h(set)f(to)h(the)g(absolute)g(pathname)f(used)f(to)i
+(in)m(v)m(ok)m(e)630 2728 y(the)22 b(shell)g(or)g(shell)g(script)f(b)s
+(eing)h(executed)h(as)f(passed)f(in)g(the)h(en)m(vironmen)m(t)h(or)e
+(argumen)m(t)630 2838 y(list.)72 b(Subsequen)m(tly)-8
+b(,)43 b(expands)c(to)j(the)e(last)i(argumen)m(t)f(to)g(the)g(previous)
+f(command,)630 2947 y(after)35 b(expansion.)54 b(Also)36
+b(set)f(to)h(the)f(full)f(pathname)h(used)f(to)h(in)m(v)m(ok)m(e)i(eac)
+m(h)f(command)630 3057 y(executed)42 b(and)e(placed)i(in)e(the)h(en)m
+(vironmen)m(t)h(exp)s(orted)f(to)g(that)h(command.)72
+b(When)630 3166 y(c)m(hec)m(king)32 b(mail,)f(this)g(parameter)g(holds)
+e(the)i(name)f(of)h(the)g(mail)g(\014le.)150 3399 y Fr(3.5)68
+b(Shell)45 b(Expansions)150 3558 y Ft(Expansion)27 b(is)i(p)s(erformed)
+d(on)i(the)g(command)g(line)h(after)f(it)h(has)f(b)s(een)f(split)h(in)m
+(to)i Fs(token)p Ft(s.)38 b(There)28 b(are)150 3668 y(sev)m(en)j(kinds)
+e(of)i(expansion)f(p)s(erformed:)225 3802 y Fp(\017)60
+b Ft(brace)31 b(expansion)225 3936 y Fp(\017)60 b Ft(tilde)31
+b(expansion)225 4071 y Fp(\017)60 b Ft(parameter)31 b(and)f(v)-5
+b(ariable)31 b(expansion)225 4205 y Fp(\017)60 b Ft(command)30
+b(substitution)225 4339 y Fp(\017)60 b Ft(arithmetic)32
+b(expansion)225 4474 y Fp(\017)60 b Ft(w)m(ord)30 b(splitting)225
+4608 y Fp(\017)60 b Ft(\014lename)31 b(expansion)275
+4767 y(The)i(order)g(of)h(expansions)g(is:)47 b(brace)34
+b(expansion,)h(tilde)g(expansion,)f(parameter,)i(v)-5
+b(ariable,)36 b(and)150 4877 y(arithmetic)46 b(expansion)f(and)g
+(command)f(substitution)h(\(done)g(in)g(a)g(left-to-righ)m(t)j
+(fashion\),)h(w)m(ord)150 4986 y(splitting,)31 b(and)f(\014lename)h
+(expansion.)275 5121 y(On)42 b(systems)h(that)h(can)g(supp)s(ort)e(it,)
+47 b(there)d(is)f(an)h(additional)g(expansion)f(a)m(v)-5
+b(ailable:)69 b Fq(pro)s(cess)150 5230 y(substitution)p
+Ft(.)61 b(This)36 b(is)h(p)s(erformed)f(at)i(the)f(same)h(time)f(as)h
+(parameter,)h(v)-5 b(ariable,)40 b(and)d(arithmetic)150
+5340 y(expansion)30 b(and)g(command)g(substitution.)p
+eop end
+%%Page: 18 24
+TeXDict begin 18 23 bop 150 -116 a Ft(18)2572 b(Bash)31
+b(Reference)g(Man)m(ual)275 299 y(Only)k(brace)i(expansion,)h(w)m(ord)e
+(splitting,)j(and)d(\014lename)g(expansion)g(can)h(c)m(hange)h(the)e(n)
+m(um)m(b)s(er)150 408 y(of)h(w)m(ords)f(of)g(the)h(expansion;)i(other)e
+(expansions)f(expand)g(a)h(single)g(w)m(ord)f(to)h(a)g(single)g(w)m
+(ord.)58 b(The)150 518 y(only)32 b(exceptions)i(to)f(this)f(are)h(the)f
+(expansions)g(of)h Fs("$@")e Ft(\(see)i(Section)g(3.4.2)h([Sp)s(ecial)f
+(P)m(arameters],)150 628 y(page)e(16\))h(and)d Fs("${)p
+Fi(name)11 b Fs([@]}")27 b Ft(\(see)k(Section)h(6.7)f([Arra)m(ys],)g
+(page)g(80\).)275 765 y(After)41 b(all)i(expansions,)h
+Fs(quote)29 b(removal)40 b Ft(\(see)i(Section)h(3.5.9)g([Quote)f(Remo)m
+(v)-5 b(al],)47 b(page)42 b(25\))h(is)150 875 y(p)s(erformed.)150
+1077 y Fj(3.5.1)63 b(Brace)40 b(Expansion)150 1224 y
+Ft(Brace)28 b(expansion)f(is)h(a)f(mec)m(hanism)h(b)m(y)f(whic)m(h)f
+(arbitrary)h(strings)g(ma)m(y)h(b)s(e)f(generated.)40
+b(This)27 b(mec)m(ha-)150 1334 y(nism)e(is)h(similar)g(to)g
+Fq(\014lename)g(expansion)f Ft(\(see)i(Section)f(3.5.8)i([Filename)f
+(Expansion],)f(page)h(24\),)h(but)150 1443 y(the)36 b(\014le)f(names)h
+(generated)g(need)f(not)h(exist.)57 b(P)m(atterns)36
+b(to)g(b)s(e)f(brace)h(expanded)e(tak)m(e)j(the)f(form)f(of)150
+1553 y(an)29 b(optional)i Fq(pream)m(ble)5 b Ft(,)30
+b(follo)m(w)m(ed)i(b)m(y)d(either)h(a)g(series)g(of)g(comma-separated)h
+(strings)e(or)h(a)g(seqeunce)150 1663 y(expression)36
+b(b)s(et)m(w)m(een)g(a)g(pair)g(of)g(braces,)i(follo)m(w)m(ed)f(b)m(y)f
+(an)g(optional)h Fq(p)s(ostscript)r Ft(.)56 b(The)36
+b(pream)m(ble)g(is)150 1772 y(pre\014xed)28 b(to)h(eac)m(h)h(string)f
+(con)m(tained)h(within)e(the)h(braces,)g(and)g(the)g(p)s(ostscript)f
+(is)h(then)f(app)s(ended)f(to)150 1882 y(eac)m(h)32 b(resulting)e
+(string,)h(expanding)e(left)j(to)f(righ)m(t.)275 2019
+y(Brace)37 b(expansions)f(ma)m(y)h(b)s(e)f(nested.)59
+b(The)36 b(results)g(of)h(eac)m(h)g(expanded)f(string)g(are)h(not)g
+(sorted;)150 2129 y(left)31 b(to)g(righ)m(t)g(order)f(is)g(preserv)m
+(ed.)41 b(F)-8 b(or)31 b(example,)390 2267 y Fs(bash$)46
+b(echo)h(a{d,c,b}e)390 2376 y(ade)g(ace)g(abe)275 2514
+y Ft(A)20 b(sequence)h(expression)g(tak)m(es)h(the)f(form)f
+Fs({)p Fi(x)11 b Fs(..)p Fi(y)g Fs([..)p Fi(incr)g Fs(]})p
+Ft(,)18 b(where)i Fq(x)27 b Ft(and)20 b Fq(y)28 b Ft(are)22
+b(either)f(in)m(tegers)150 2623 y(or)42 b(single)h(c)m(haracters,)j
+(and)c Fq(incr)7 b Ft(,)44 b(an)e(optional)h(incremen)m(t,)j(is)c(an)g
+(in)m(teger.)77 b(When)41 b(in)m(tegers)j(are)150 2733
+y(supplied,)e(the)f(expression)g(expands)f(to)h(eac)m(h)h(n)m(um)m(b)s
+(er)e(b)s(et)m(w)m(een)h Fq(x)47 b Ft(and)40 b Fq(y)8
+b Ft(,)44 b(inclusiv)m(e.)73 b(Supplied)150 2842 y(in)m(tegers)33
+b(ma)m(y)e(b)s(e)g(pre\014xed)f(with)h(`)p Fs(0)p Ft(')h(to)g(force)g
+(eac)m(h)g(term)g(to)g(ha)m(v)m(e)g(the)g(same)g(width.)42
+b(When)31 b(either)150 2952 y Fq(x)43 b Ft(or)36 b Fq(y)44
+b Ft(b)s(egins)36 b(with)g(a)h(zero,)i(the)e(shell)g(attempts)g(to)g
+(force)g(all)h(generated)f(terms)g(to)g(con)m(tain)h(the)150
+3062 y(same)e(n)m(um)m(b)s(er)e(of)i(digits,)i(zero-padding)d(where)h
+(necessary)-8 b(.)57 b(When)35 b(c)m(haracters)i(are)f(supplied,)g(the)
+150 3171 y(expression)h(expands)f(to)i(eac)m(h)g(c)m(haracter)g
+(lexicographically)i(b)s(et)m(w)m(een)e Fq(x)43 b Ft(and)37
+b Fq(y)8 b Ft(,)38 b(inclusiv)m(e.)62 b(Note)150 3281
+y(that)30 b(b)s(oth)e Fq(x)35 b Ft(and)28 b Fq(y)37 b
+Ft(m)m(ust)29 b(b)s(e)f(of)h(the)g(same)g(t)m(yp)s(e.)41
+b(When)28 b(the)i(incremen)m(t)f(is)g(supplied,)f(it)i(is)f(used)f(as)
+150 3390 y(the)j(di\013erence)f(b)s(et)m(w)m(een)h(eac)m(h)h(term.)41
+b(The)30 b(default)g(incremen)m(t)h(is)g(1)f(or)h(-1)g(as)f
+(appropriate.)275 3528 y(Brace)36 b(expansion)g(is)f(p)s(erformed)f(b)s
+(efore)h(an)m(y)h(other)g(expansions,)h(and)e(an)m(y)g(c)m(haracters)i
+(sp)s(ecial)150 3638 y(to)32 b(other)g(expansions)g(are)g(preserv)m(ed)
+f(in)h(the)f(result.)45 b(It)32 b(is)g(strictly)g(textual.)46
+b(Bash)32 b(do)s(es)f(not)h(apply)150 3747 y(an)m(y)27
+b(syn)m(tactic)i(in)m(terpretation)g(to)f(the)f(con)m(text)i(of)e(the)g
+(expansion)g(or)g(the)h(text)g(b)s(et)m(w)m(een)f(the)h(braces.)150
+3857 y(T)-8 b(o)37 b(a)m(v)m(oid)g(con\015icts)g(with)f(parameter)h
+(expansion,)g(the)g(string)f(`)p Fs(${)p Ft(')g(is)g(not)g(considered)g
+(eligible)i(for)150 3966 y(brace)31 b(expansion.)275
+4104 y(A)e(correctly-formed)i(brace)f(expansion)f(m)m(ust)h(con)m(tain)
+h(unquoted)e(op)s(ening)g(and)g(closing)i(braces,)150
+4214 y(and)h(at)i(least)g(one)f(unquoted)g(comma)g(or)g(a)h(v)-5
+b(alid)33 b(sequence)g(expression.)48 b(An)m(y)33 b(incorrectly)h
+(formed)150 4323 y(brace)d(expansion)f(is)g(left)h(unc)m(hanged.)275
+4461 y(A)25 b Fs({)g Ft(or)g(`)p Fs(,)p Ft(')g(ma)m(y)h(b)s(e)f(quoted)
+g(with)g(a)h(bac)m(kslash)f(to)h(prev)m(en)m(t)g(its)g(b)s(eing)f
+(considered)g(part)g(of)g(a)h(brace)150 4570 y(expression.)51
+b(T)-8 b(o)34 b(a)m(v)m(oid)i(con\015icts)e(with)g(parameter)g
+(expansion,)h(the)f(string)g(`)p Fs(${)p Ft(')g(is)g(not)g(considered)
+150 4680 y(eligible)e(for)e(brace)h(expansion.)275 4818
+y(This)f(construct)h(is)g(t)m(ypically)i(used)d(as)h(shorthand)f(when)g
+(the)h(common)g(pre\014x)f(of)h(the)g(strings)g(to)150
+4927 y(b)s(e)f(generated)h(is)g(longer)g(than)f(in)g(the)g(ab)s(o)m(v)m
+(e)i(example:)390 5065 y Fs(mkdir)46 b(/usr/local/src/bash/{old,n)o
+(ew,)o(dist)o(,bug)o(s})275 5202 y Ft(or)390 5340 y Fs(chown)g(root)h
+(/usr/{ucb/{ex,edit},lib/)o({ex?)o(.?*,)o(how)o(_ex})o(})p
+eop end
+%%Page: 19 25
+TeXDict begin 19 24 bop 150 -116 a Ft(Chapter)30 b(3:)41
+b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(19)150 299
+y Fj(3.5.2)63 b(Tilde)41 b(Expansion)150 446 y Ft(If)29
+b(a)h(w)m(ord)g(b)s(egins)f(with)g(an)h(unquoted)f(tilde)h(c)m
+(haracter)h(\(`)p Fs(~)p Ft('\),)g(all)g(of)f(the)g(c)m(haracters)h(up)
+d(to)j(the)f(\014rst)150 555 y(unquoted)23 b(slash)h(\(or)h(all)g(c)m
+(haracters,)i(if)d(there)g(is)h(no)f(unquoted)f(slash\))h(are)h
+(considered)f(a)g Fq(tilde-pre\014x)6 b Ft(.)150 665
+y(If)38 b(none)g(of)g(the)h(c)m(haracters)g(in)f(the)h(tilde-pre\014x)f
+(are)h(quoted,)h(the)f(c)m(haracters)h(in)d(the)i(tilde-pre\014x)150
+775 y(follo)m(wing)28 b(the)f(tilde)g(are)g(treated)h(as)f(a)g(p)s
+(ossible)f Fq(login)i(name)5 b Ft(.)40 b(If)26 b(this)g(login)i(name)f
+(is)f(the)h(n)m(ull)g(string,)150 884 y(the)35 b(tilde)g(is)g(replaced)
+g(with)f(the)h(v)-5 b(alue)35 b(of)g(the)g Fs(HOME)e
+Ft(shell)i(v)-5 b(ariable.)54 b(If)34 b Fs(HOME)g Ft(is)h(unset,)g(the)
+g(home)150 994 y(directory)e(of)g(the)f(user)g(executing)i(the)e(shell)
+h(is)f(substituted)g(instead.)47 b(Otherwise,)33 b(the)g
+(tilde-pre\014x)150 1103 y(is)d(replaced)h(with)f(the)h(home)f
+(directory)h(asso)s(ciated)h(with)e(the)h(sp)s(eci\014ed)e(login)j
+(name.)275 1235 y(If)g(the)h(tilde-pre\014x)f(is)h(`)p
+Fs(~+)p Ft(',)g(the)g(v)-5 b(alue)33 b(of)g(the)g(shell)g(v)-5
+b(ariable)34 b Fs(PWD)d Ft(replaces)j(the)f(tilde-pre\014x.)47
+b(If)150 1344 y(the)31 b(tilde-pre\014x)f(is)g(`)p Fs(~-)p
+Ft(',)h(the)f(v)-5 b(alue)31 b(of)g(the)f(shell)h(v)-5
+b(ariable)31 b Fs(OLDPWD)p Ft(,)e(if)h(it)h(is)g(set,)g(is)f
+(substituted.)275 1476 y(If)e(the)i(c)m(haracters)g(follo)m(wing)h(the)
+e(tilde)h(in)f(the)g(tilde-pre\014x)h(consist)f(of)h(a)f(n)m(um)m(b)s
+(er)f Fq(N)10 b Ft(,)30 b(optionally)150 1585 y(pre\014xed)22
+b(b)m(y)h(a)h(`)p Fs(+)p Ft(')f(or)h(a)f(`)p Fs(-)p Ft(',)j(the)d
+(tilde-pre\014x)g(is)h(replaced)f(with)g(the)h(corresp)s(onding)e
+(elemen)m(t)j(from)e(the)150 1695 y(directory)36 b(stac)m(k,)i(as)e(it)
+g(w)m(ould)f(b)s(e)g(displa)m(y)m(ed)h(b)m(y)g(the)f
+Fs(dirs)g Ft(builtin)g(in)m(v)m(ok)m(ed)i(with)e(the)g(c)m(haracters)
+150 1804 y(follo)m(wing)40 b(tilde)f(in)g(the)f(tilde-pre\014x)h(as)g
+(an)f(argumen)m(t)h(\(see)h(Section)f(6.8)h([The)e(Directory)i(Stac)m
+(k],)150 1914 y(page)c(81\).)57 b(If)35 b(the)g(tilde-pre\014x,)i(sans)
+e(the)h(tilde,)h(consists)f(of)g(a)f(n)m(um)m(b)s(er)f(without)i(a)f
+(leading)h(`)p Fs(+)p Ft(')g(or)150 2024 y(`)p Fs(-)p
+Ft(',)31 b(`)p Fs(+)p Ft(')f(is)h(assumed.)275 2155 y(If)e(the)i(login)
+g(name)g(is)f(in)m(v)-5 b(alid,)31 b(or)g(the)f(tilde)h(expansion)f
+(fails,)i(the)e(w)m(ord)g(is)h(left)g(unc)m(hanged.)275
+2286 y(Eac)m(h)38 b(v)-5 b(ariable)38 b(assignmen)m(t)h(is)e(c)m(hec)m
+(k)m(ed)j(for)d(unquoted)g(tilde-pre\014xes)h(immediately)g(follo)m
+(wing)150 2396 y(a)d(`)p Fs(:)p Ft(')g(or)g(the)g(\014rst)f(`)p
+Fs(=)p Ft('.)54 b(In)34 b(these)h(cases,)i(tilde)e(expansion)g(is)g
+(also)h(p)s(erformed.)52 b(Consequen)m(tly)-8 b(,)37
+b(one)150 2505 y(ma)m(y)27 b(use)e(\014le)h(names)g(with)g(tildes)g(in)
+g(assignmen)m(ts)h(to)g Fs(PATH)p Ft(,)f Fs(MAILPATH)p
+Ft(,)e(and)i Fs(CDPATH)p Ft(,)f(and)h(the)g(shell)150
+2615 y(assigns)31 b(the)f(expanded)g(v)-5 b(alue.)275
+2746 y(The)29 b(follo)m(wing)j(table)g(sho)m(ws)e(ho)m(w)g(Bash)h
+(treats)g(unquoted)e(tilde-pre\014xes:)150 2899 y Fs(~)432
+b Ft(The)30 b(v)-5 b(alue)31 b(of)f Fs($HOME)150 3052
+y(~/foo)240 b Ft(`)p Fs($HOME/foo)p Ft(')150 3205 y Fs(~fred/foo)630
+3315 y Ft(The)30 b(sub)s(directory)f Fs(foo)h Ft(of)g(the)h(home)f
+(directory)h(of)g(the)f(user)g Fs(fred)150 3468 y(~+/foo)192
+b Ft(`)p Fs($PWD/foo)p Ft(')150 3621 y Fs(~-/foo)g Ft(`)p
+Fs(${OLDPWD-'~-'}/foo)p Ft(')150 3774 y Fs(~)p Fi(N)384
+b Ft(The)30 b(string)g(that)h(w)m(ould)f(b)s(e)g(displa)m(y)m(ed)h(b)m
+(y)f(`)p Fs(dirs)g(+)p Fi(N)11 b Ft(')150 3927 y Fs(~+)p
+Fi(N)336 b Ft(The)30 b(string)g(that)h(w)m(ould)f(b)s(e)g(displa)m(y)m
+(ed)h(b)m(y)f(`)p Fs(dirs)g(+)p Fi(N)11 b Ft(')150 4080
+y Fs(~-)p Fi(N)336 b Ft(The)30 b(string)g(that)h(w)m(ould)f(b)s(e)g
+(displa)m(y)m(ed)h(b)m(y)f(`)p Fs(dirs)g(-)p Fi(N)11
+b Ft(')150 4273 y Fj(3.5.3)63 b(Shell)41 b(P)m(arameter)f(Expansion)150
+4420 y Ft(The)g(`)p Fs($)p Ft(')h(c)m(haracter)i(in)m(tro)s(duces)d
+(parameter)h(expansion,)j(command)d(substitution,)i(or)e(arithmetic)150
+4529 y(expansion.)d(The)22 b(parameter)h(name)f(or)g(sym)m(b)s(ol)h(to)
+g(b)s(e)e(expanded)h(ma)m(y)h(b)s(e)f(enclosed)h(in)f(braces,)i(whic)m
+(h)150 4639 y(are)31 b(optional)g(but)f(serv)m(e)h(to)h(protect)f(the)g
+(v)-5 b(ariable)31 b(to)g(b)s(e)f(expanded)g(from)g(c)m(haracters)i
+(immediately)150 4749 y(follo)m(wing)g(it)f(whic)m(h)f(could)g(b)s(e)g
+(in)m(terpreted)h(as)f(part)h(of)f(the)h(name.)275 4880
+y(When)44 b(braces)i(are)f(used,)j(the)e(matc)m(hing)g(ending)f(brace)g
+(is)g(the)g(\014rst)g(`)p Fs(})p Ft(')g(not)g(escap)s(ed)h(b)m(y)f(a)
+150 4989 y(bac)m(kslash)40 b(or)f(within)g(a)g(quoted)g(string,)j(and)c
+(not)i(within)e(an)h(em)m(b)s(edded)f(arithmetic)j(expansion,)150
+5099 y(command)30 b(substitution,)g(or)h(parameter)g(expansion.)275
+5230 y(The)40 b(basic)h(form)g(of)g(parameter)h(expansion)e(is)h($)p
+Fs({)p Fq(parameter)7 b Fs(})p Ft(.)73 b(The)40 b(v)-5
+b(alue)42 b(of)f Fq(parameter)48 b Ft(is)150 5340 y(substituted.)43
+b(The)31 b(braces)g(are)h(required)e(when)h Fq(parameter)38
+b Ft(is)31 b(a)h(p)s(ositional)g(parameter)g(with)f(more)p
+eop end
+%%Page: 20 26
+TeXDict begin 20 25 bop 150 -116 a Ft(20)2572 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y(than)h(one)g(digit,)i(or)e(when)g
+Fq(parameter)39 b Ft(is)32 b(follo)m(w)m(ed)i(b)m(y)e(a)h(c)m(haracter)
+h(that)e(is)h(not)f(to)h(b)s(e)f(in)m(terpreted)150 408
+y(as)f(part)f(of)g(its)h(name.)275 553 y(If)c(the)g(\014rst)g(c)m
+(haracter)i(of)f Fq(parameter)35 b Ft(is)27 b(an)h(exclamation)i(p)s
+(oin)m(t)d(\(!\),)i(a)f(lev)m(el)i(of)d(v)-5 b(ariable)29
+b(indirec-)150 663 y(tion)e(is)f(in)m(tro)s(duced.)39
+b(Bash)27 b(uses)e(the)i(v)-5 b(alue)27 b(of)f(the)h(v)-5
+b(ariable)27 b(formed)f(from)g(the)g(rest)h(of)f Fq(parameter)34
+b Ft(as)150 772 y(the)e(name)h(of)f(the)h(v)-5 b(ariable;)34
+b(this)e(v)-5 b(ariable)33 b(is)g(then)f(expanded)f(and)h(that)h(v)-5
+b(alue)32 b(is)h(used)e(in)h(the)h(rest)150 882 y(of)h(the)f
+(substitution,)i(rather)e(than)g(the)h(v)-5 b(alue)34
+b(of)g Fq(parameter)40 b Ft(itself.)51 b(This)33 b(is)g(kno)m(wn)g(as)h
+Fs(indirect)150 991 y(expansion)p Ft(.)45 b(The)32 b(exceptions)i(to)g
+(this)e(are)h(the)g(expansions)g(of)g($)p Fs({)p Ft(!)p
+Fq(pre\014x*)8 b Fs(})31 b Ft(and)i($)p Fs({)p Ft(!)p
+Fq(name)5 b Ft([)p Fs(@)p Ft(])p Fs(})33 b Ft(de-)150
+1101 y(scrib)s(ed)h(b)s(elo)m(w.)56 b(The)35 b(exclamation)j(p)s(oin)m
+(t)d(m)m(ust)g(immediately)i(follo)m(w)g(the)e(left)i(brace)e(in)g
+(order)g(to)150 1210 y(in)m(tro)s(duce)30 b(indirection.)275
+1355 y(In)39 b(eac)m(h)i(of)g(the)f(cases)h(b)s(elo)m(w,)i
+Fq(w)m(ord)h Ft(is)c(sub)5 b(ject)40 b(to)h(tilde)f(expansion,)j
+(parameter)e(expansion,)150 1465 y(command)30 b(substitution,)g(and)g
+(arithmetic)i(expansion.)275 1609 y(When)h(not)h(p)s(erforming)e
+(substring)h(expansion,)h(using)f(the)h(form)f(describ)s(ed)g(b)s(elo)m
+(w,)h(Bash)g(tests)150 1719 y(for)44 b(a)i(parameter)f(that)g(is)g
+(unset)f(or)h(n)m(ull.)84 b(Omitting)45 b(the)g(colon)h(results)e(in)g
+(a)i(test)f(only)g(for)g(a)150 1828 y(parameter)36 b(that)f(is)g
+(unset.)55 b(Put)34 b(another)i(w)m(a)m(y)-8 b(,)38 b(if)d(the)g(colon)
+h(is)f(included,)h(the)f(op)s(erator)g(tests)h(for)150
+1938 y(b)s(oth)22 b Fq(parameter)7 b Ft('s)22 b(existence)i(and)e(that)
+h(its)g(v)-5 b(alue)23 b(is)g(not)f(n)m(ull;)k(if)c(the)h(colon)g(is)g
+(omitted,)i(the)e(op)s(erator)150 2047 y(tests)31 b(only)g(for)f
+(existence.)150 2222 y Fs(${)p Fi(parameter)11 b Fs(:)p
+Fp(\000)p Fi(word)g Fs(})630 2331 y Ft(If)30 b Fq(parameter)37
+b Ft(is)30 b(unset)g(or)h(n)m(ull,)f(the)h(expansion)f(of)g
+Fq(w)m(ord)k Ft(is)c(substituted.)40 b(Otherwise,)630
+2441 y(the)31 b(v)-5 b(alue)30 b(of)h Fq(parameter)37
+b Ft(is)31 b(substituted.)150 2610 y Fs(${)p Fi(parameter)11
+b Fs(:=)p Fi(word)g Fs(})630 2720 y Ft(If)32 b Fq(parameter)40
+b Ft(is)32 b(unset)g(or)h(n)m(ull,)g(the)f(expansion)h(of)f
+Fq(w)m(ord)k Ft(is)d(assigned)f(to)i Fq(parameter)7 b
+Ft(.)630 2829 y(The)30 b(v)-5 b(alue)32 b(of)f Fq(parameter)38
+b Ft(is)31 b(then)g(substituted.)42 b(P)m(ositional)33
+b(parameters)e(and)f(sp)s(ecial)630 2939 y(parameters)h(ma)m(y)g(not)f
+(b)s(e)g(assigned)h(to)g(in)f(this)g(w)m(a)m(y)-8 b(.)150
+3108 y Fs(${)p Fi(parameter)11 b Fs(:?)p Fi(word)g Fs(})630
+3218 y Ft(If)26 b Fq(parameter)33 b Ft(is)26 b(n)m(ull)g(or)g(unset,)h
+(the)f(expansion)g(of)g Fq(w)m(ord)k Ft(\(or)c(a)h(message)g(to)g(that)
+f(e\013ect)630 3328 y(if)i Fq(w)m(ord)j Ft(is)d(not)g(presen)m(t\))h
+(is)f(written)g(to)h(the)f(standard)f(error)h(and)f(the)h(shell,)h(if)f
+(it)h(is)f(not)630 3437 y(in)m(teractiv)m(e,)33 b(exits.)42
+b(Otherwise,)30 b(the)h(v)-5 b(alue)31 b(of)f Fq(parameter)38
+b Ft(is)30 b(substituted.)150 3606 y Fs(${)p Fi(parameter)11
+b Fs(:+)p Fi(word)g Fs(})630 3716 y Ft(If)35 b Fq(parameter)42
+b Ft(is)36 b(n)m(ull)f(or)h(unset,)g(nothing)g(is)f(substituted,)i
+(otherwise)e(the)h(expansion)630 3826 y(of)31 b Fq(w)m(ord)i
+Ft(is)e(substituted.)150 3995 y Fs(${)p Fi(parameter)11
+b Fs(:)p Fi(offset)g Fs(})150 4105 y(${)p Fi(parameter)g
+Fs(:)p Fi(offset)g Fs(:)p Fi(le)o(ngt)o(h)g Fs(})630
+4214 y Ft(Expands)44 b(to)i(up)e(to)i Fq(length)g Ft(c)m(haracters)h
+(of)e Fq(parameter)53 b Ft(starting)46 b(at)g(the)f(c)m(haracter)630
+4324 y(sp)s(eci\014ed)30 b(b)m(y)g Fq(o\013set)r Ft(.)43
+b(If)30 b Fq(length)h Ft(is)g(omitted,)g(expands)f(to)h(the)g
+(substring)f(of)g Fq(parameter)630 4433 y Ft(starting)38
+b(at)g(the)f(c)m(haracter)i(sp)s(eci\014ed)d(b)m(y)h
+Fq(o\013set)r Ft(.)62 b Fq(length)38 b Ft(and)e Fq(o\013set)k
+Ft(are)e(arithmetic)630 4543 y(expressions)30 b(\(see)i(Section)g(6.5)g
+([Shell)f(Arithmetic],)h(page)g(78\).)43 b(This)30 b(is)h(referred)f
+(to)i(as)630 4653 y(Substring)d(Expansion.)630 4792 y
+Fq(length)j Ft(m)m(ust)f(ev)-5 b(aluate)33 b(to)f(a)g(n)m(um)m(b)s(er)e
+(greater)i(than)f(or)g(equal)h(to)g(zero.)45 b(If)30
+b Fq(o\013set)35 b Ft(ev)-5 b(al-)630 4902 y(uates)36
+b(to)h(a)f(n)m(um)m(b)s(er)e(less)i(than)f(zero,)j(the)e(v)-5
+b(alue)36 b(is)g(used)f(as)g(an)h(o\013set)h(from)e(the)h(end)630
+5011 y(of)h(the)g(v)-5 b(alue)38 b(of)f Fq(parameter)7
+b Ft(.)61 b(If)36 b Fq(parameter)44 b Ft(is)37 b(`)p
+Fs(@)p Ft(',)i(the)f(result)f(is)g Fq(length)g Ft(p)s(ositional)630
+5121 y(parameters)i(b)s(eginning)f(at)i Fq(o\013set)r
+Ft(.)67 b(If)39 b Fq(parameter)45 b Ft(is)39 b(an)g(indexed)g(arra)m(y)
+g(name)g(sub-)630 5230 y(scripted)34 b(b)m(y)g(`)p Fs(@)p
+Ft(')g(or)g(`)p Fs(*)p Ft(',)h(the)f(result)g(is)g(the)g
+Fq(length)h Ft(mem)m(b)s(ers)e(of)h(the)g(arra)m(y)h(b)s(eginning)630
+5340 y(with)25 b Fs(${)p Fi(parameter)11 b Fs([)p Fi(offset)g
+Fs(]})p Ft(.)33 b(A)25 b(negativ)m(e)j Fq(o\013set)g
+Ft(is)e(tak)m(en)g(relativ)m(e)i(to)e(one)g(greater)p
+eop end
+%%Page: 21 27
+TeXDict begin 21 26 bop 150 -116 a Ft(Chapter)30 b(3:)41
+b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(21)630 299
+y(than)26 b(the)h(maxim)m(um)f(index)g(of)g(the)h(sp)s(eci\014ed)f
+(arra)m(y)-8 b(.)40 b(Substring)25 b(expansion)h(applied)g(to)630
+408 y(an)k(asso)s(ciativ)m(e)j(arra)m(y)e(pro)s(duces)e(unde\014ned)f
+(results.)630 548 y(Note)37 b(that)f(a)g(negativ)m(e)i(o\013set)f(m)m
+(ust)f(b)s(e)f(separated)h(from)f(the)h(colon)h(b)m(y)e(at)i(least)g
+(one)630 658 y(space)g(to)g(a)m(v)m(oid)g(b)s(eing)f(confused)f(with)h
+(the)h(`)p Fs(:-)p Ft(')f(expansion.)57 b(Substring)35
+b(indexing)h(is)630 767 y(zero-based)24 b(unless)f(the)h(p)s(ositional)
+g(parameters)g(are)g(used,)g(in)g(whic)m(h)f(case)h(the)g(indexing)630
+877 y(starts)30 b(at)g(1)f(b)m(y)h(default.)40 b(If)29
+b Fq(o\013set)j Ft(is)e(0,)g(and)f(the)g(p)s(ositional)h(parameters)g
+(are)g(used,)f Fs($@)630 986 y Ft(is)h(pre\014xed)g(to)h(the)f(list.)
+150 1156 y Fs(${!)p Fi(prefix)11 b Fs(*})150 1265 y(${!)p
+Fi(prefix)g Fs(@})630 1375 y Ft(Expands)23 b(to)i(the)g(names)f(of)h(v)
+-5 b(ariables)25 b(whose)f(names)g(b)s(egin)g(with)g
+Fq(pre\014x)6 b Ft(,)25 b(separated)g(b)m(y)630 1484
+y(the)k(\014rst)f(c)m(haracter)j(of)e(the)g Fs(IFS)f
+Ft(sp)s(ecial)i(v)-5 b(ariable.)41 b(When)29 b(`)p Fs(@)p
+Ft(')g(is)g(used)f(and)h(the)g(expan-)630 1594 y(sion)35
+b(app)s(ears)g(within)f(double)h(quotes,)i(eac)m(h)f(v)-5
+b(ariable)36 b(name)f(expands)g(to)g(a)h(separate)630
+1704 y(w)m(ord.)150 1873 y Fs(${!)p Fi(name)11 b Fs([@]})150
+1983 y(${!)p Fi(name)g Fs([*]})630 2092 y Ft(If)26 b
+Fq(name)32 b Ft(is)27 b(an)f(arra)m(y)h(v)-5 b(ariable,)29
+b(expands)d(to)h(the)g(list)g(of)g(arra)m(y)g(indices)g(\(k)m(eys\))h
+(assigned)630 2202 y(in)c Fq(name)5 b Ft(.)39 b(If)23
+b Fq(name)30 b Ft(is)24 b(not)g(an)g(arra)m(y)-8 b(,)27
+b(expands)c(to)i(0)f(if)h Fq(name)k Ft(is)24 b(set)h(and)e(n)m(ull)h
+(otherwise.)630 2311 y(When)39 b(`)p Fs(@)p Ft(')h(is)f(used)g(and)f
+(the)i(expansion)f(app)s(ears)g(within)f(double)h(quotes,)k(eac)m(h)d
+(k)m(ey)630 2421 y(expands)30 b(to)h(a)f(separate)i(w)m(ord.)150
+2590 y Fs(${#)p Fi(parameter)11 b Fs(})630 2700 y Ft(The)40
+b(length)g(in)g(c)m(haracters)i(of)e(the)h(expanded)e(v)-5
+b(alue)41 b(of)f Fq(parameter)47 b Ft(is)40 b(substituted.)630
+2809 y(If)i Fq(parameter)50 b Ft(is)43 b(`)p Fs(*)p Ft(')g(or)g(`)p
+Fs(@)p Ft(',)k(the)c(v)-5 b(alue)43 b(substituted)f(is)h(the)g(n)m(um)m
+(b)s(er)f(of)h(p)s(ositional)630 2919 y(parameters.)i(If)32
+b Fq(parameter)38 b Ft(is)32 b(an)g(arra)m(y)g(name)g(subscripted)f(b)m
+(y)g(`)p Fs(*)p Ft(')h(or)g(`)p Fs(@)p Ft(',)g(the)g(v)-5
+b(alue)630 3029 y(substituted)30 b(is)g(the)h(n)m(um)m(b)s(er)e(of)h
+(elemen)m(ts)i(in)e(the)h(arra)m(y)-8 b(.)150 3198 y
+Fs(${)p Fi(parameter)11 b Fs(#)p Fi(word)g Fs(})150 3308
+y(${)p Fi(parameter)g Fs(##)p Fi(word)g Fs(})630 3417
+y Ft(The)31 b Fq(w)m(ord)k Ft(is)d(expanded)f(to)i(pro)s(duce)e(a)h
+(pattern)g(just)f(as)i(in)e(\014lename)h(expansion)g(\(see)630
+3527 y(Section)k(3.5.8)h([Filename)g(Expansion],)g(page)f(24\).)56
+b(If)35 b(the)h(pattern)f(matc)m(hes)i(the)e(b)s(e-)630
+3636 y(ginning)g(of)g(the)g(expanded)f(v)-5 b(alue)36
+b(of)f Fq(parameter)7 b Ft(,)36 b(then)f(the)g(result)g(of)g(the)g
+(expansion)630 3746 y(is)28 b(the)g(expanded)e(v)-5 b(alue)28
+b(of)g Fq(parameter)35 b Ft(with)27 b(the)h(shortest)g(matc)m(hing)h
+(pattern)f(\(the)g(`)p Fs(#)p Ft(')630 3856 y(case\))e(or)f(the)g
+(longest)g(matc)m(hing)h(pattern)f(\(the)g(`)p Fs(##)p
+Ft(')g(case\))h(deleted.)39 b(If)24 b Fq(parameter)32
+b Ft(is)25 b(`)p Fs(@)p Ft(')630 3965 y(or)j(`)p Fs(*)p
+Ft(',)i(the)e(pattern)h(remo)m(v)-5 b(al)29 b(op)s(eration)g(is)f
+(applied)h(to)g(eac)m(h)g(p)s(ositional)g(parameter)g(in)630
+4075 y(turn,)i(and)g(the)h(expansion)g(is)g(the)g(resultan)m(t)g(list.)
+45 b(If)32 b Fq(parameter)38 b Ft(is)32 b(an)g(arra)m(y)g(v)-5
+b(ariable)630 4184 y(subscripted)39 b(with)g(`)p Fs(@)p
+Ft(')h(or)g(`)p Fs(*)p Ft(',)j(the)d(pattern)h(remo)m(v)-5
+b(al)41 b(op)s(eration)f(is)g(applied)g(to)h(eac)m(h)630
+4294 y(mem)m(b)s(er)30 b(of)g(the)h(arra)m(y)g(in)f(turn,)f(and)h(the)h
+(expansion)f(is)g(the)h(resultan)m(t)g(list.)150 4463
+y Fs(${)p Fi(parameter)11 b Fs(\045)p Fi(word)g Fs(})150
+4573 y(${)p Fi(parameter)g Fs(\045\045)p Fi(word)g Fs(})630
+4682 y Ft(The)35 b Fq(w)m(ord)k Ft(is)c(expanded)g(to)h(pro)s(duce)e(a)
+i(pattern)f(just)g(as)h(in)f(\014lename)h(expansion.)55
+b(If)630 4792 y(the)43 b(pattern)f(matc)m(hes)i(a)e(trailing)i(p)s
+(ortion)e(of)g(the)h(expanded)e(v)-5 b(alue)43 b(of)g
+Fq(parameter)7 b Ft(,)630 4902 y(then)39 b(the)g(result)g(of)h(the)f
+(expansion)g(is)h(the)f(v)-5 b(alue)40 b(of)f Fq(parameter)46
+b Ft(with)39 b(the)h(shortest)630 5011 y(matc)m(hing)31
+b(pattern)e(\(the)h(`)p Fs(\045)p Ft(')g(case\))h(or)e(the)h(longest)h
+(matc)m(hing)f(pattern)g(\(the)g(`)p Fs(\045\045)p Ft(')g(case\))630
+5121 y(deleted.)49 b(If)32 b Fq(parameter)40 b Ft(is)33
+b(`)p Fs(@)p Ft(')g(or)g(`)p Fs(*)p Ft(',)h(the)f(pattern)g(remo)m(v)-5
+b(al)34 b(op)s(eration)g(is)f(applied)f(to)630 5230 y(eac)m(h)38
+b(p)s(ositional)g(parameter)g(in)f(turn,)h(and)e(the)h(expansion)g(is)h
+(the)f(resultan)m(t)h(list.)61 b(If)630 5340 y Fq(parameter)38
+b Ft(is)32 b(an)f(arra)m(y)h(v)-5 b(ariable)32 b(subscripted)e(with)h
+(`)p Fs(@)p Ft(')g(or)h(`)p Fs(*)p Ft(',)g(the)f(pattern)h(remo)m(v)-5
+b(al)p eop end
+%%Page: 22 28
+TeXDict begin 22 27 bop 150 -116 a Ft(22)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y(op)s(eration)f(is)g(applied)f(to)i
+(eac)m(h)g(mem)m(b)s(er)e(of)h(the)g(arra)m(y)g(in)f(turn,)g(and)g(the)
+h(expansion)g(is)630 408 y(the)h(resultan)m(t)g(list.)150
+579 y Fs(${)p Fi(parameter)11 b Fs(/)p Fi(pattern)g Fs(/)p
+Fi(s)o(tri)o(ng)f Fs(})630 688 y Ft(The)37 b Fq(pattern)g
+Ft(is)g(expanded)g(to)h(pro)s(duce)e(a)h(pattern)g(just)g(as)h(in)e
+(\014lename)i(expansion.)630 798 y Fq(P)m(arameter)46
+b Ft(is)38 b(expanded)f(and)g(the)i(longest)g(matc)m(h)g(of)f
+Fq(pattern)g Ft(against)h(its)f(v)-5 b(alue)39 b(is)630
+908 y(replaced)33 b(with)f Fq(string)8 b Ft(.)47 b(If)33
+b Fq(pattern)f Ft(b)s(egins)g(with)h(`)p Fs(/)p Ft(',)g(all)h(matc)m
+(hes)f(of)g Fq(pattern)g Ft(are)g(re-)630 1017 y(placed)27
+b(with)f Fq(string)8 b Ft(.)40 b(Normally)27 b(only)g(the)g(\014rst)f
+(matc)m(h)h(is)g(replaced.)40 b(If)26 b Fq(pattern)g
+Ft(b)s(egins)630 1127 y(with)33 b(`)p Fs(#)p Ft(',)i(it)f(m)m(ust)f
+(matc)m(h)i(at)f(the)g(b)s(eginning)f(of)g(the)h(expanded)f(v)-5
+b(alue)34 b(of)g Fq(parameter)7 b Ft(.)630 1236 y(If)34
+b Fq(pattern)g Ft(b)s(egins)g(with)g(`)p Fs(\045)p Ft(',)h(it)g(m)m
+(ust)f(matc)m(h)h(at)g(the)f(end)g(of)g(the)h(expanded)e(v)-5
+b(alue)35 b(of)630 1346 y Fq(parameter)7 b Ft(.)40 b(If)29
+b Fq(string)36 b Ft(is)29 b(n)m(ull,)h(matc)m(hes)g(of)f
+Fq(pattern)g Ft(are)g(deleted)h(and)e(the)h Fs(/)f Ft(follo)m(wing)630
+1455 y Fq(pattern)34 b Ft(ma)m(y)g(b)s(e)f(omitted.)51
+b(If)33 b Fq(parameter)41 b Ft(is)33 b(`)p Fs(@)p Ft(')h(or)g(`)p
+Fs(*)p Ft(',)g(the)g(substitution)f(op)s(eration)630
+1565 y(is)38 b(applied)g(to)g(eac)m(h)h(p)s(ositional)g(parameter)f(in)
+g(turn,)h(and)e(the)h(expansion)g(is)g(the)g(re-)630
+1675 y(sultan)m(t)f(list.)59 b(If)36 b Fq(parameter)43
+b Ft(is)36 b(an)g(arra)m(y)h(v)-5 b(ariable)37 b(subscripted)e(with)h
+(`)p Fs(@)p Ft(')g(or)h(`)p Fs(*)p Ft(',)h(the)630 1784
+y(substitution)30 b(op)s(eration)h(is)f(applied)g(to)h(eac)m(h)g(mem)m
+(b)s(er)f(of)g(the)h(arra)m(y)g(in)f(turn,)f(and)h(the)630
+1894 y(expansion)g(is)h(the)f(resultan)m(t)h(list.)150
+2064 y Fs(${)p Fi(parameter)11 b Fs(^)p Fi(pattern)g
+Fs(})150 2174 y(${)p Fi(parameter)g Fs(^^)p Fi(pattern)g
+Fs(})150 2283 y(${)p Fi(parameter)g Fs(,)p Fi(pattern)g
+Fs(})150 2393 y(${)p Fi(parameter)g Fs(,,)p Fi(pattern)g
+Fs(})630 2502 y Ft(This)35 b(expansion)h(mo)s(di\014es)f(the)h(case)h
+(of)f(alphab)s(etic)h(c)m(haracters)g(in)f Fq(parameter)7
+b Ft(.)57 b(The)630 2612 y Fq(pattern)36 b Ft(is)f(expanded)g(to)h(pro)
+s(duce)e(a)i(pattern)g(just)f(as)h(in)f(\014lename)g(expansion.)56
+b(The)630 2722 y(`)p Fs(^)p Ft(')36 b(op)s(erator)g(con)m(v)m(erts)h
+(lo)m(w)m(ercase)h(letters)f(matc)m(hing)g Fq(pattern)f
+Ft(to)g(upp)s(ercase;)i(the)e(`)p Fs(,)p Ft(')630 2831
+y(op)s(erator)g(con)m(v)m(erts)i(matc)m(hing)f(upp)s(ercase)e(letters)i
+(to)g(lo)m(w)m(ercase.)59 b(The)36 b(`)p Fs(^^)p Ft(')g(and)f(`)p
+Fs(,,)p Ft(')630 2941 y(expansions)c(con)m(v)m(ert)i(eac)m(h)g(matc)m
+(hed)f(c)m(haracter)h(in)e(the)h(expanded)f(v)-5 b(alue;)32
+b(the)g(`)p Fs(^)p Ft(')g(and)630 3050 y(`)p Fs(,)p Ft(')24
+b(expansions)f(matc)m(h)i(and)e(con)m(v)m(ert)j(only)d(the)h(\014rst)f
+(c)m(haracter)j(in)d(the)h(expanded)f(v)-5 b(alue.)630
+3160 y(If)31 b Fq(pattern)g Ft(is)g(omitted,)i(it)f(is)f(treated)h(lik)
+m(e)h(a)e(`)p Fs(?)p Ft(',)h(whic)m(h)f(matc)m(hes)i(ev)m(ery)f(c)m
+(haracter.)44 b(If)630 3270 y Fq(parameter)37 b Ft(is)31
+b(`)p Fs(@)p Ft(')f(or)h(`)p Fs(*)p Ft(',)f(the)h(case)g(mo)s
+(di\014cation)g(op)s(eration)g(is)f(applied)g(to)i(eac)m(h)f(p)s(osi-)
+630 3379 y(tional)26 b(parameter)e(in)h(turn,)f(and)g(the)h(expansion)f
+(is)g(the)h(resultan)m(t)g(list.)40 b(If)23 b Fq(parameter)32
+b Ft(is)630 3489 y(an)e(arra)m(y)g(v)-5 b(ariable)31
+b(subscripted)d(with)i(`)p Fs(@)p Ft(')g(or)f(`)p Fs(*)p
+Ft(',)i(the)f(case)g(mo)s(di\014cation)h(op)s(eration)f(is)630
+3598 y(applied)d(to)g(eac)m(h)h(mem)m(b)s(er)e(of)h(the)g(arra)m(y)g
+(in)g(turn,)g(and)f(the)h(expansion)f(is)h(the)g(resultan)m(t)630
+3708 y(list.)150 3918 y Fj(3.5.4)63 b(Command)41 b(Substitution)150
+4065 y Ft(Command)f(substitution)h(allo)m(ws)i(the)e(output)g(of)h(a)f
+(command)g(to)h(replace)g(the)g(command)f(itself.)150
+4175 y(Command)29 b(substitution)h(o)s(ccurs)h(when)e(a)i(command)f(is)
+g(enclosed)h(as)g(follo)m(ws:)390 4320 y Fs($\()p Fi(command)11
+b Fs(\))150 4465 y Ft(or)390 4611 y Fs(`)p Fi(command)g
+Fs(`)150 4756 y Ft(Bash)45 b(p)s(erforms)f(the)h(expansion)f(b)m(y)h
+(executing)i Fq(command)h Ft(and)c(replacing)i(the)f(command)g(sub-)150
+4866 y(stitution)c(with)f(the)g(standard)g(output)g(of)g(the)g
+(command,)j(with)d(an)m(y)h(trailing)g(newlines)f(deleted.)150
+4975 y(Em)m(b)s(edded)30 b(newlines)h(are)h(not)f(deleted,)i(but)e
+(they)g(ma)m(y)h(b)s(e)f(remo)m(v)m(ed)i(during)d(w)m(ord)h(splitting.)
+44 b(The)150 5085 y(command)21 b(substitution)g Fs($\(cat)29
+b Fi(file)11 b Fs(\))20 b Ft(can)i(b)s(e)f(replaced)g(b)m(y)h(the)g
+(equiv)-5 b(alen)m(t)22 b(but)f(faster)h Fs($\(<)30 b
+Fi(file)11 b Fs(\))p Ft(.)275 5230 y(When)33 b(the)i(old-st)m(yle)h
+(bac)m(kquote)f(form)f(of)g(substitution)g(is)g(used,)h(bac)m(kslash)f
+(retains)h(its)f(literal)150 5340 y(meaning)k(except)h(when)e(follo)m
+(w)m(ed)j(b)m(y)e(`)p Fs($)p Ft(',)j(`)p Fs(`)p Ft(',)f(or)e(`)p
+Fs(\\)p Ft('.)64 b(The)38 b(\014rst)f(bac)m(kquote)j(not)e(preceded)g
+(b)m(y)g(a)p eop end
+%%Page: 23 29
+TeXDict begin 23 28 bop 150 -116 a Ft(Chapter)30 b(3:)41
+b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(23)150 299
+y(bac)m(kslash)41 b(terminates)g(the)f(command)g(substitution.)69
+b(When)40 b(using)g(the)g Fs($\()p Fi(command)11 b Fs(\))37
+b Ft(form,)42 b(all)150 408 y(c)m(haracters)32 b(b)s(et)m(w)m(een)f
+(the)f(paren)m(theses)h(mak)m(e)g(up)f(the)g(command;)h(none)f(are)h
+(treated)g(sp)s(ecially)-8 b(.)275 543 y(Command)22 b(substitutions)g
+(ma)m(y)i(b)s(e)e(nested.)39 b(T)-8 b(o)23 b(nest)g(when)f(using)h(the)
+g(bac)m(kquoted)h(form,)g(escap)s(e)150 653 y(the)31
+b(inner)e(bac)m(kquotes)j(with)e(bac)m(kslashes.)275
+787 y(If)e(the)i(substitution)e(app)s(ears)h(within)g(double)f(quotes,)
+i(w)m(ord)f(splitting)h(and)f(\014lename)g(expansion)150
+897 y(are)i(not)f(p)s(erformed)f(on)h(the)h(results.)150
+1096 y Fj(3.5.5)63 b(Arithmetic)40 b(Expansion)150 1243
+y Ft(Arithmetic)25 b(expansion)g(allo)m(ws)g(the)g(ev)-5
+b(aluation)26 b(of)f(an)f(arithmetic)i(expression)e(and)g(the)g
+(substitution)150 1353 y(of)31 b(the)f(result.)41 b(The)30
+b(format)g(for)g(arithmetic)i(expansion)e(is:)390 1488
+y Fs($\(\()47 b Fi(expression)55 b Fs(\)\))275 1622 y
+Ft(The)33 b(expression)g(is)h(treated)g(as)g(if)g(it)g(w)m(ere)g
+(within)f(double)h(quotes,)h(but)e(a)h(double)f(quote)h(inside)150
+1732 y(the)27 b(paren)m(theses)g(is)g(not)g(treated)h(sp)s(ecially)-8
+b(.)41 b(All)27 b(tok)m(ens)h(in)e(the)h(expression)g(undergo)f
+(parameter)h(ex-)150 1841 y(pansion,)h(command)f(substitution,)h(and)f
+(quote)i(remo)m(v)-5 b(al.)41 b(Arithmetic)28 b(expansions)g(ma)m(y)g
+(b)s(e)f(nested.)275 1976 y(The)34 b(ev)-5 b(aluation)37
+b(is)f(p)s(erformed)e(according)i(to)g(the)g(rules)f(listed)h(b)s(elo)m
+(w)g(\(see)g(Section)g(6.5)h([Shell)150 2086 y(Arithmetic],)32
+b(page)f(78\).)42 b(If)30 b(the)h(expression)f(is)g(in)m(v)-5
+b(alid,)32 b(Bash)e(prin)m(ts)g(a)h(message)g(indicating)h(failure)150
+2195 y(to)f(the)g(standard)e(error)h(and)g(no)g(substitution)g(o)s
+(ccurs.)150 2395 y Fj(3.5.6)63 b(Pro)s(cess)42 b(Substitution)150
+2542 y Ft(Pro)s(cess)i(substitution)g(is)g(supp)s(orted)f(on)h(systems)
+g(that)h(supp)s(ort)d(named)i(pip)s(es)f(\()p Fl(fif)n(o)p
+Ft(s\))i(or)f(the)150 2651 y(`)p Fs(/dev/fd)p Ft(')29
+b(metho)s(d)h(of)g(naming)g(op)s(en)g(\014les.)41 b(It)30
+b(tak)m(es)i(the)f(form)f(of)390 2786 y Fs(<\()p Fi(list)11
+b Fs(\))150 2921 y Ft(or)390 3055 y Fs(>\()p Fi(list)g
+Fs(\))150 3190 y Ft(The)23 b(pro)s(cess)g Fq(list)j Ft(is)d(run)f(with)
+h(its)h(input)f(or)g(output)g(connected)h(to)h(a)e Fl(fif)n(o)g
+Ft(or)h(some)g(\014le)f(in)g(`)p Fs(/dev/fd)p Ft('.)150
+3300 y(The)28 b(name)h(of)g(this)f(\014le)h(is)g(passed)f(as)h(an)f
+(argumen)m(t)h(to)h(the)f(curren)m(t)f(command)h(as)f(the)h(result)g
+(of)g(the)150 3409 y(expansion.)40 b(If)28 b(the)h Fs(>\()p
+Fi(list)11 b Fs(\))26 b Ft(form)h(is)i(used,)f(writing)h(to)g(the)f
+(\014le)h(will)g(pro)m(vide)f(input)g(for)g Fq(list)r
+Ft(.)41 b(If)28 b(the)150 3519 y Fs(<\()p Fi(list)11
+b Fs(\))23 b Ft(form)h(is)i(used,)f(the)h(\014le)f(passed)g(as)g(an)g
+(argumen)m(t)h(should)e(b)s(e)h(read)g(to)h(obtain)g(the)f(output)g(of)
+150 3628 y Fq(list)r Ft(.)41 b(Note)31 b(that)f(no)f(space)h(ma)m(y)g
+(app)s(ear)f(b)s(et)m(w)m(een)h(the)g Fs(<)f Ft(or)h
+Fs(>)f Ft(and)g(the)g(left)h(paren)m(thesis,)h(otherwise)150
+3738 y(the)g(construct)f(w)m(ould)g(b)s(e)g(in)m(terpreted)h(as)f(a)h
+(redirection.)275 3873 y(When)36 b(a)m(v)-5 b(ailable,)40
+b(pro)s(cess)c(substitution)h(is)f(p)s(erformed)f(sim)m(ultaneously)i
+(with)g(parameter)g(and)150 3982 y(v)-5 b(ariable)31
+b(expansion,)g(command)f(substitution,)g(and)g(arithmetic)i(expansion.)
+150 4182 y Fj(3.5.7)63 b(W)-10 b(ord)41 b(Splitting)150
+4329 y Ft(The)30 b(shell)h(scans)g(the)g(results)f(of)h(parameter)g
+(expansion,)g(command)g(substitution,)g(and)f(arithmetic)150
+4438 y(expansion)g(that)h(did)f(not)g(o)s(ccur)h(within)e(double)h
+(quotes)h(for)f(w)m(ord)g(splitting.)275 4573 y(The)43
+b(shell)h(treats)h(eac)m(h)h(c)m(haracter)f(of)g Fs($IFS)e
+Ft(as)h(a)g(delimiter,)49 b(and)43 b(splits)h(the)h(results)e(of)i(the)
+150 4682 y(other)40 b(expansions)f(in)m(to)i(w)m(ords)e(on)h(these)g(c)
+m(haracters.)70 b(If)39 b Fs(IFS)g Ft(is)h(unset,)i(or)d(its)h(v)-5
+b(alue)40 b(is)g(exactly)150 4792 y Fs(<space><tab><newline>)p
+Ft(,)26 b(the)32 b(default,)g(then)f(sequences)h(of)62
+b Fs(<space>)p Ft(,)30 b Fs(<tab>)p Ft(,)h(and)f Fs(<newline>)150
+4902 y Ft(at)39 b(the)f(b)s(eginning)g(and)f(end)h(of)g(the)h(results)f
+(of)g(the)g(previous)g(expansions)g(are)g(ignored,)j(and)d(an)m(y)150
+5011 y(sequence)31 b(of)g Fs(IFS)f Ft(c)m(haracters)j(not)e(at)g(the)g
+(b)s(eginning)g(or)f(end)h(serv)m(es)g(to)h(delimit)f(w)m(ords.)42
+b(If)30 b Fs(IFS)g Ft(has)150 5121 y(a)g(v)-5 b(alue)30
+b(other)g(than)g(the)g(default,)g(then)f(sequences)h(of)g(the)g
+(whitespace)g(c)m(haracters)h Fs(space)e Ft(and)g Fs(tab)150
+5230 y Ft(are)36 b(ignored)g(at)g(the)g(b)s(eginning)f(and)g(end)g(of)h
+(the)g(w)m(ord,)h(as)f(long)g(as)g(the)g(whitespace)h(c)m(haracter)g
+(is)150 5340 y(in)f(the)g(v)-5 b(alue)36 b(of)g Fs(IFS)f
+Ft(\(an)h Fs(IFS)f Ft(whitespace)h(c)m(haracter\).)60
+b(An)m(y)35 b(c)m(haracter)j(in)d Fs(IFS)g Ft(that)i(is)f(not)g
+Fs(IFS)p eop end
+%%Page: 24 30
+TeXDict begin 24 29 bop 150 -116 a Ft(24)2572 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y(whitespace,)c(along)f(with)f(an)m(y)g
+(adjacen)m(t)h Fs(IFS)e Ft(whitespace)i(c)m(haracters,)i(delimits)e(a)f
+(\014eld.)38 b(A)26 b(sequence)150 408 y(of)35 b Fs(IFS)f
+Ft(whitespace)h(c)m(haracters)i(is)d(also)i(treated)g(as)f(a)g
+(delimiter.)55 b(If)34 b(the)h(v)-5 b(alue)35 b(of)g
+Fs(IFS)f Ft(is)h(n)m(ull,)h(no)150 518 y(w)m(ord)30 b(splitting)h(o)s
+(ccurs.)275 648 y(Explicit)44 b(n)m(ull)f(argumen)m(ts)g(\()p
+Fs("")g Ft(or)h Fs('')p Ft(\))f(are)g(retained.)80 b(Unquoted)43
+b(implicit)h(n)m(ull)f(argumen)m(ts,)150 758 y(resulting)24
+b(from)f(the)g(expansion)g(of)h(parameters)g(that)g(ha)m(v)m(e)h(no)e
+(v)-5 b(alues,)25 b(are)f(remo)m(v)m(ed.)40 b(If)23 b(a)g(parameter)150
+867 y(with)30 b(no)g(v)-5 b(alue)31 b(is)g(expanded)e(within)h(double)g
+(quotes,)h(a)g(n)m(ull)f(argumen)m(t)h(results)f(and)g(is)g(retained.)
+275 997 y(Note)h(that)g(if)g(no)f(expansion)g(o)s(ccurs,)g(no)h
+(splitting)g(is)f(p)s(erformed.)150 1187 y Fj(3.5.8)63
+b(Filename)41 b(Expansion)150 1334 y Ft(After)26 b(w)m(ord)g
+(splitting,)i(unless)d(the)i(`)p Fs(-f)p Ft(')f(option)g(has)g(b)s(een)
+f(set)i(\(see)g(Section)g(4.3.1)h([The)e(Set)g(Builtin],)150
+1444 y(page)h(51\),)i(Bash)d(scans)h(eac)m(h)h(w)m(ord)e(for)g(the)h(c)
+m(haracters)g(`)p Fs(*)p Ft(',)h(`)p Fs(?)p Ft(',)g(and)e(`)p
+Fs([)p Ft('.)39 b(If)26 b(one)h(of)g(these)f(c)m(haracters)150
+1553 y(app)s(ears,)h(then)f(the)h(w)m(ord)f(is)h(regarded)g(as)g(a)g
+Fq(pattern)p Ft(,)g(and)g(replaced)g(with)f(an)h(alphab)s(etically)h
+(sorted)150 1663 y(list)k(of)g(\014le)g(names)g(matc)m(hing)h(the)f
+(pattern.)45 b(If)32 b(no)f(matc)m(hing)i(\014le)f(names)g(are)g
+(found,)f(and)h(the)g(shell)150 1772 y(option)c Fs(nullglob)e
+Ft(is)i(disabled,)h(the)f(w)m(ord)g(is)g(left)g(unc)m(hanged.)40
+b(If)28 b(the)g Fs(nullglob)e Ft(option)i(is)g(set,)i(and)150
+1882 y(no)38 b(matc)m(hes)h(are)f(found,)h(the)f(w)m(ord)f(is)h(remo)m
+(v)m(ed.)65 b(If)37 b(the)h Fs(failglob)e Ft(shell)i(option)g(is)g
+(set,)j(and)c(no)150 1991 y(matc)m(hes)f(are)g(found,)f(an)g(error)f
+(message)j(is)e(prin)m(ted)f(and)h(the)g(command)g(is)g(not)g
+(executed.)56 b(If)35 b(the)150 2101 y(shell)e(option)h
+Fs(nocaseglob)c Ft(is)j(enabled,)h(the)g(matc)m(h)g(is)f(p)s(erformed)e
+(without)i(regard)g(to)h(the)g(case)g(of)150 2211 y(alphab)s(etic)d(c)m
+(haracters.)275 2341 y(When)23 b(a)h(pattern)f(is)h(used)f(for)g
+(\014lename)h(expansion,)h(the)e(c)m(haracter)i(`)p Fs(.)p
+Ft(')f(at)g(the)g(start)g(of)g(a)g(\014lename)150 2450
+y(or)f(immediately)i(follo)m(wing)g(a)f(slash)f(m)m(ust)h(b)s(e)f(matc)
+m(hed)h(explicitly)-8 b(,)27 b(unless)c(the)g(shell)h(option)g
+Fs(dotglob)150 2560 y Ft(is)31 b(set.)45 b(When)31 b(matc)m(hing)h(a)g
+(\014le)f(name,)h(the)g(slash)f(c)m(haracter)i(m)m(ust)e(alw)m(a)m(ys)i
+(b)s(e)e(matc)m(hed)h(explicitly)-8 b(.)150 2669 y(In)30
+b(other)g(cases,)i(the)e(`)p Fs(.)p Ft(')h(c)m(haracter)h(is)e(not)h
+(treated)g(sp)s(ecially)-8 b(.)275 2799 y(See)28 b(the)g(description)g
+(of)g Fs(shopt)e Ft(in)i(Section)g(4.3.2)i([The)e(Shopt)f(Builtin],)i
+(page)g(55,)g(for)f(a)g(descrip-)150 2909 y(tion)j(of)f(the)h
+Fs(nocaseglob)p Ft(,)d Fs(nullglob)p Ft(,)g Fs(failglob)p
+Ft(,)h(and)g Fs(dotglob)g Ft(options.)275 3039 y(The)j
+Fs(GLOBIGNORE)f Ft(shell)i(v)-5 b(ariable)34 b(ma)m(y)g(b)s(e)f(used)f
+(to)i(restrict)g(the)g(set)f(of)h(\014lenames)f(matc)m(hing)i(a)150
+3148 y(pattern.)k(If)25 b Fs(GLOBIGNORE)e Ft(is)j(set,)h(eac)m(h)g
+(matc)m(hing)g(\014lename)f(that)g(also)h(matc)m(hes)f(one)g(of)g(the)g
+(patterns)150 3258 y(in)33 b Fs(GLOBIGNORE)d Ft(is)j(remo)m(v)m(ed)h
+(from)e(the)i(list)f(of)g(matc)m(hes.)50 b(The)33 b(\014lenames)g(`)p
+Fs(.)p Ft(')g(and)f(`)p Fs(..)p Ft(')h(are)g(alw)m(a)m(ys)150
+3367 y(ignored)g(when)e Fs(GLOBIGNORE)f Ft(is)j(set)g(and)f(not)h(n)m
+(ull.)48 b(Ho)m(w)m(ev)m(er,)35 b(setting)f Fs(GLOBIGNORE)c
+Ft(to)j(a)g(non-n)m(ull)150 3477 y(v)-5 b(alue)34 b(has)f(the)h
+(e\013ect)h(of)f(enabling)g(the)g Fs(dotglob)e Ft(shell)h(option,)j(so)
+e(all)g(other)g(\014lenames)g(b)s(eginning)150 3587 y(with)43
+b(a)h(`)p Fs(.)p Ft(')f(will)h(matc)m(h.)80 b(T)-8 b(o)44
+b(get)h(the)e(old)h(b)s(eha)m(vior)f(of)h(ignoring)f(\014lenames)h(b)s
+(eginning)f(with)g(a)150 3696 y(`)p Fs(.)p Ft(',)c(mak)m(e)g(`)p
+Fs(.*)p Ft(')e(one)g(of)g(the)h(patterns)f(in)g Fs(GLOBIGNORE)p
+Ft(.)58 b(The)37 b Fs(dotglob)e Ft(option)j(is)f(disabled)g(when)150
+3806 y Fs(GLOBIGNORE)28 b Ft(is)i(unset.)150 3996 y Fj(3.5.8.1)63
+b(P)m(attern)40 b(Matc)m(hing)150 4143 y Ft(An)m(y)24
+b(c)m(haracter)h(that)f(app)s(ears)f(in)g(a)h(pattern,)i(other)e(than)f
+(the)h(sp)s(ecial)g(pattern)g(c)m(haracters)h(describ)s(ed)150
+4252 y(b)s(elo)m(w,)31 b(matc)m(hes)g(itself.)42 b(The)29
+b Fl(nul)h Ft(c)m(haracter)i(ma)m(y)e(not)h(o)s(ccur)f(in)g(a)h
+(pattern.)40 b(A)31 b(bac)m(kslash)g(escap)s(es)150 4362
+y(the)38 b(follo)m(wing)g(c)m(haracter;)43 b(the)37 b(escaping)i(bac)m
+(kslash)e(is)h(discarded)f(when)f(matc)m(hing.)63 b(The)36
+b(sp)s(ecial)150 4471 y(pattern)30 b(c)m(haracters)i(m)m(ust)f(b)s(e)e
+(quoted)i(if)f(they)h(are)f(to)i(b)s(e)d(matc)m(hed)i(literally)-8
+b(.)275 4601 y(The)29 b(sp)s(ecial)i(pattern)g(c)m(haracters)h(ha)m(v)m
+(e)f(the)g(follo)m(wing)h(meanings:)150 4751 y Fs(*)432
+b Ft(Matc)m(hes)31 b(an)m(y)e(string,)h(including)f(the)g(n)m(ull)g
+(string.)41 b(When)29 b(the)g Fs(globstar)e Ft(shell)i(option)630
+4861 y(is)37 b(enabled,)h(and)e(`)p Fs(*)p Ft(')h(is)g(used)f(in)g(a)h
+(\014lename)g(expansion)g(con)m(text,)j(t)m(w)m(o)e(adjacen)m(t)g(`)p
+Fs(*)p Ft('s)630 4971 y(used)f(as)g(a)h(single)g(pattern)g(will)f(matc)
+m(h)i(all)f(\014les)f(and)g(zero)h(or)g(more)f(directories)i(and)630
+5080 y(sub)s(directories.)g(If)25 b(follo)m(w)m(ed)j(b)m(y)e(a)g(`)p
+Fs(/)p Ft(',)h(t)m(w)m(o)g(adjacen)m(t)h(`)p Fs(*)p Ft('s)e(will)g
+(matc)m(h)h(only)f(directories)630 5190 y(and)k(sub)s(directories.)150
+5340 y Fs(?)432 b Ft(Matc)m(hes)32 b(an)m(y)f(single)g(c)m(haracter.)p
+eop end
+%%Page: 25 31
+TeXDict begin 25 30 bop 150 -116 a Ft(Chapter)30 b(3:)41
+b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(25)150 299
+y Fs([...)o(])241 b Ft(Matc)m(hes)27 b(an)m(y)e(one)g(of)g(the)g
+(enclosed)g(c)m(haracters.)41 b(A)25 b(pair)f(of)h(c)m(haracters)i
+(separated)e(b)m(y)g(a)630 408 y(h)m(yphen)i(denotes)h(a)g
+Fq(range)g(expression)p Ft(;)g(an)m(y)h(c)m(haracter)g(that)f(sorts)g
+(b)s(et)m(w)m(een)g(those)h(t)m(w)m(o)630 518 y(c)m(haracters,)f
+(inclusiv)m(e,)f(using)d(the)h(curren)m(t)f(lo)s(cale's)j(collating)g
+(sequence)e(and)f(c)m(haracter)630 628 y(set,)31 b(is)f(matc)m(hed.)42
+b(If)30 b(the)g(\014rst)g(c)m(haracter)i(follo)m(wing)g(the)e(`)p
+Fs([)p Ft(')h(is)f(a)h(`)p Fs(!)p Ft(')f(or)g(a)h(`)p
+Fs(^)p Ft(')g(then)f(an)m(y)630 737 y(c)m(haracter)c(not)f(enclosed)g
+(is)g(matc)m(hed.)40 b(A)25 b(`)p Fp(\000)p Ft(')f(ma)m(y)i(b)s(e)e
+(matc)m(hed)h(b)m(y)f(including)h(it)g(as)g(the)630 847
+y(\014rst)32 b(or)h(last)h(c)m(haracter)h(in)e(the)g(set.)50
+b(A)33 b(`)p Fs(])p Ft(')g(ma)m(y)h(b)s(e)e(matc)m(hed)i(b)m(y)f
+(including)g(it)g(as)h(the)630 956 y(\014rst)25 b(c)m(haracter)i(in)e
+(the)h(set.)40 b(The)25 b(sorting)h(order)f(of)h(c)m(haracters)h(in)f
+(range)g(expressions)f(is)630 1066 y(determined)e(b)m(y)g(the)g(curren)
+m(t)f(lo)s(cale)j(and)e(the)g(v)-5 b(alue)23 b(of)g(the)h
+Fs(LC_COLLATE)c Ft(shell)j(v)-5 b(ariable,)630 1176 y(if)30
+b(set.)630 1309 y(F)-8 b(or)34 b(example,)g(in)f(the)g(default)g(C)f
+(lo)s(cale,)k(`)p Fs([a-dx-z])p Ft(')31 b(is)i(equiv)-5
+b(alen)m(t)34 b(to)g(`)p Fs([abcdxyz])p Ft('.)630 1418
+y(Man)m(y)68 b(lo)s(cales)h(sort)f(c)m(haracters)h(in)e(dictionary)i
+(order,)76 b(and)67 b(in)g(these)h(lo)s(cales)630 1528
+y(`)p Fs([a-dx-z])p Ft(')36 b(is)i(t)m(ypically)i(not)e(equiv)-5
+b(alen)m(t)39 b(to)g(`)p Fs([abcdxyz])p Ft(';)g(it)g(migh)m(t)f(b)s(e)f
+(equiv)-5 b(alen)m(t)630 1637 y(to)34 b(`)p Fs([aBbCcDdxXyYz])p
+Ft(',)c(for)j(example.)49 b(T)-8 b(o)33 b(obtain)h(the)f(traditional)h
+(in)m(terpretation)h(of)630 1747 y(ranges)e(in)f(brac)m(k)m(et)i
+(expressions,)g(y)m(ou)f(can)g(force)g(the)g(use)f(of)h(the)g(C)f(lo)s
+(cale)i(b)m(y)f(setting)630 1857 y(the)e Fs(LC_COLLATE)c
+Ft(or)k Fs(LC_ALL)d Ft(en)m(vironmen)m(t)j(v)-5 b(ariable)31
+b(to)g(the)g(v)-5 b(alue)31 b(`)p Fs(C)p Ft('.)630 1990
+y(Within)23 b(`)p Fs([)p Ft(')h(and)e(`)p Fs(])p Ft(',)j
+Fq(c)m(haracter)g(classes)j Ft(can)c(b)s(e)e(sp)s(eci\014ed)h(using)f
+(the)i(syn)m(tax)f Fs([:)p Fq(class)t Fs(:])p Ft(,)630
+2099 y(where)30 b Fq(class)35 b Ft(is)30 b(one)h(of)f(the)h(follo)m
+(wing)h(classes)f(de\014ned)e(in)h(the)h Fl(posix)f Ft(standard:)870
+2233 y Fs(alnum)142 b(alpha)g(ascii)f(blank)h(cntrl)g(digit)g(graph)g
+(lower)870 2342 y(print)g(punct)g(space)f(upper)h(word)190
+b(xdigit)630 2475 y Ft(A)42 b(c)m(haracter)h(class)f(matc)m(hes)h(an)m
+(y)f(c)m(haracter)h(b)s(elonging)f(to)g(that)g(class.)75
+b(The)41 b Fs(word)630 2585 y Ft(c)m(haracter)32 b(class)f(matc)m(hes)h
+(letters,)f(digits,)h(and)d(the)i(c)m(haracter)h(`)p
+Fs(_)p Ft('.)630 2718 y(Within)25 b(`)p Fs([)p Ft(')f(and)g(`)p
+Fs(])p Ft(',)i(an)e Fq(equiv)-5 b(alence)26 b(class)j
+Ft(can)24 b(b)s(e)g(sp)s(eci\014ed)g(using)g(the)g(syn)m(tax)h
+Fs([=)p Fq(c)6 b Fs(=])p Ft(,)630 2828 y(whic)m(h)29
+b(matc)m(hes)i(all)f(c)m(haracters)h(with)e(the)h(same)g(collation)h(w)
+m(eigh)m(t)g(\(as)f(de\014ned)e(b)m(y)i(the)630 2937
+y(curren)m(t)g(lo)s(cale\))j(as)d(the)h(c)m(haracter)h
+Fq(c)6 b Ft(.)630 3070 y(Within)21 b(`)p Fs([)p Ft(')h(and)e(`)p
+Fs(])p Ft(',)j(the)f(syn)m(tax)f Fs([.)p Fq(sym)m(b)s(ol)t
+Fs(.])f Ft(matc)m(hes)i(the)f(collating)j(sym)m(b)s(ol)c
+Fq(sym)m(b)s(ol)t Ft(.)275 3227 y(If)29 b(the)g Fs(extglob)f
+Ft(shell)h(option)h(is)g(enabled)f(using)g(the)h Fs(shopt)e
+Ft(builtin,)h(sev)m(eral)i(extended)f(pattern)150 3336
+y(matc)m(hing)37 b(op)s(erators)e(are)h(recognized.)58
+b(In)35 b(the)g(follo)m(wing)i(description,)g(a)f Fq(pattern-list)j
+Ft(is)d(a)g(list)g(of)150 3446 y(one)d(or)f(more)h(patterns)f
+(separated)h(b)m(y)f(a)h(`)p Fs(|)p Ft('.)47 b(Comp)s(osite)33
+b(patterns)f(ma)m(y)i(b)s(e)d(formed)h(using)g(one)h(or)150
+3556 y(more)e(of)f(the)h(follo)m(wing)g(sub-patterns:)150
+3712 y Fs(?\()p Fi(pattern-list)11 b Fs(\))630 3822 y
+Ft(Matc)m(hes)32 b(zero)f(or)g(one)f(o)s(ccurrence)h(of)f(the)h(giv)m
+(en)g(patterns.)150 3979 y Fs(*\()p Fi(pattern-list)11
+b Fs(\))630 4088 y Ft(Matc)m(hes)32 b(zero)f(or)g(more)f(o)s
+(ccurrences)h(of)f(the)h(giv)m(en)g(patterns.)150 4245
+y Fs(+\()p Fi(pattern-list)11 b Fs(\))630 4354 y Ft(Matc)m(hes)32
+b(one)f(or)f(more)h(o)s(ccurrences)f(of)h(the)f(giv)m(en)i(patterns.)
+150 4511 y Fs(@\()p Fi(pattern-list)11 b Fs(\))630 4621
+y Ft(Matc)m(hes)32 b(one)f(of)f(the)h(giv)m(en)g(patterns.)150
+4777 y Fs(!\()p Fi(pattern-list)11 b Fs(\))630 4887 y
+Ft(Matc)m(hes)32 b(an)m(ything)f(except)g(one)g(of)f(the)h(giv)m(en)g
+(patterns.)150 5083 y Fj(3.5.9)63 b(Quote)41 b(Remo)m(v)-7
+b(al)150 5230 y Ft(After)32 b(the)g(preceding)g(expansions,)h(all)f
+(unquoted)f(o)s(ccurrences)h(of)g(the)h(c)m(haracters)g(`)p
+Fs(\\)p Ft(',)g(`)p Fs(')p Ft(',)f(and)g(`)p Fs(")p Ft(')150
+5340 y(that)f(did)f(not)g(result)g(from)g(one)h(of)g(the)f(ab)s(o)m(v)m
+(e)i(expansions)e(are)h(remo)m(v)m(ed.)p eop end
+%%Page: 26 32
+TeXDict begin 26 31 bop 150 -116 a Ft(26)2572 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fr(3.6)68 b(Redirections)150
+458 y Ft(Before)43 b(a)f(command)f(is)h(executed,)j(its)d(input)f(and)g
+(output)g(ma)m(y)i(b)s(e)e Fq(redirected)k Ft(using)c(a)h(sp)s(ecial)
+150 568 y(notation)33 b(in)m(terpreted)g(b)m(y)f(the)g(shell.)46
+b(Redirection)33 b(ma)m(y)g(also)g(b)s(e)f(used)f(to)i(op)s(en)e(and)h
+(close)h(\014les)f(for)150 677 y(the)h(curren)m(t)g(shell)g(execution)h
+(en)m(vironmen)m(t.)49 b(The)33 b(follo)m(wing)h(redirection)g(op)s
+(erators)f(ma)m(y)h(precede)150 787 y(or)29 b(app)s(ear)g(an)m(ywhere)g
+(within)g(a)h(simple)f(command)g(or)h(ma)m(y)g(follo)m(w)g(a)g
+(command.)40 b(Redirections)31 b(are)150 897 y(pro)s(cessed)f(in)g(the)
+g(order)g(they)h(app)s(ear,)f(from)g(left)h(to)g(righ)m(t.)275
+1048 y(Eac)m(h)45 b(redirection)h(that)f(ma)m(y)h(b)s(e)e(preceded)g(b)
+m(y)h(a)h(\014le)f(descriptor)f(n)m(um)m(b)s(er)g(ma)m(y)h(instead)h(b)
+s(e)150 1158 y(preceded)41 b(b)m(y)g(a)g(w)m(ord)g(of)g(the)g(form)g
+Fs({)p Fq(v)-5 b(arname)5 b Fs(})p Ft(.)72 b(In)40 b(this)h(case,)k
+(for)c(eac)m(h)h(redirection)g(op)s(erator)150 1267 y(except)30
+b Fs(>)p Ft(&-)f(and)f Fs(<)p Ft(&-,)h(the)g(shell)g(will)h(allo)s
+(cate)h(a)e(\014le)h(descriptor)e(greater)j(than)d(10)i(and)e(assign)i
+(it)f(to)150 1377 y Fs({)p Fq(v)-5 b(arname)5 b Fs(})p
+Ft(.)42 b(If)31 b Fs(>)p Ft(&-)f(or)h Fs(<)p Ft(&-)g(is)g(preceded)g(b)
+m(y)g Fs({)p Fq(v)-5 b(arname)5 b Fs(})p Ft(,)31 b(the)g(v)-5
+b(alue)31 b(of)g Fq(v)-5 b(arname)37 b Ft(de\014nes)30
+b(the)h(\014le)150 1486 y(descriptor)f(to)h(close.)275
+1638 y(In)c(the)i(follo)m(wing)h(descriptions,)g(if)e(the)h(\014le)g
+(descriptor)f(n)m(um)m(b)s(er)g(is)g(omitted,)i(and)f(the)f(\014rst)g
+(c)m(har-)150 1747 y(acter)42 b(of)f(the)g(redirection)g(op)s(erator)g
+(is)g(`)p Fs(<)p Ft(',)i(the)e(redirection)g(refers)g(to)g(the)g
+(standard)f(input)f(\(\014le)150 1857 y(descriptor)33
+b(0\).)49 b(If)33 b(the)g(\014rst)f(c)m(haracter)i(of)g(the)f
+(redirection)g(op)s(erator)h(is)f(`)p Fs(>)p Ft(',)h(the)f(redirection)
+g(refers)150 1966 y(to)e(the)g(standard)e(output)h(\(\014le)h
+(descriptor)f(1\).)275 2118 y(The)h(w)m(ord)h(follo)m(wing)i(the)f
+(redirection)g(op)s(erator)f(in)g(the)h(follo)m(wing)h(descriptions,)f
+(unless)e(other-)150 2227 y(wise)21 b(noted,)i(is)e(sub)5
+b(jected)21 b(to)h(brace)f(expansion,)i(tilde)f(expansion,)h(parameter)
+e(expansion,)i(command)150 2337 y(substitution,)31 b(arithmetic)h
+(expansion,)f(quote)h(remo)m(v)-5 b(al,)33 b(\014lename)e(expansion,)g
+(and)f(w)m(ord)h(splitting.)150 2447 y(If)f(it)h(expands)e(to)i(more)g
+(than)f(one)h(w)m(ord,)f(Bash)h(rep)s(orts)e(an)h(error.)275
+2598 y(Note)h(that)g(the)g(order)f(of)g(redirections)h(is)g
+(signi\014can)m(t.)41 b(F)-8 b(or)31 b(example,)h(the)e(command)390
+2749 y Fs(ls)47 b(>)h Fi(dirlist)56 b Fs(2>&1)150 2901
+y Ft(directs)28 b(b)s(oth)f(standard)g(output)g(\(\014le)h(descriptor)f
+(1\))i(and)e(standard)f(error)i(\(\014le)g(descriptor)f(2\))h(to)h(the)
+150 3010 y(\014le)h Fq(dirlist)r Ft(,)h(while)f(the)h(command)390
+3161 y Fs(ls)47 b(2>&1)g(>)g Fi(dirlist)150 3313 y Ft(directs)28
+b(only)f(the)g(standard)g(output)g(to)h(\014le)f Fq(dirlist)r
+Ft(,)h(b)s(ecause)g(the)f(standard)g(error)g(w)m(as)g(made)h(a)f(cop)m
+(y)150 3422 y(of)k(the)f(standard)g(output)g(b)s(efore)g(the)g
+(standard)g(output)g(w)m(as)g(redirected)h(to)g Fq(dirlist)r
+Ft(.)275 3574 y(Bash)26 b(handles)f(sev)m(eral)j(\014lenames)e(sp)s
+(ecially)h(when)f(they)g(are)g(used)g(in)g(redirections,)i(as)e
+(describ)s(ed)150 3683 y(in)k(the)h(follo)m(wing)g(table:)150
+3868 y Fs(/dev/fd/)p Fi(fd)630 3977 y Ft(If)f Fq(fd)j
+Ft(is)d(a)h(v)-5 b(alid)31 b(in)m(teger,)h(\014le)e(descriptor)h
+Fq(fd)i Ft(is)d(duplicated.)150 4154 y Fs(/dev/stdin)630
+4263 y Ft(File)i(descriptor)e(0)h(is)f(duplicated.)150
+4440 y Fs(/dev/stdout)630 4549 y Ft(File)i(descriptor)e(1)h(is)f
+(duplicated.)150 4725 y Fs(/dev/stderr)630 4835 y Ft(File)i(descriptor)
+e(2)h(is)f(duplicated.)150 5011 y Fs(/dev/tcp/)p Fi(host)11
+b Fs(/)p Fi(port)630 5121 y Ft(If)41 b Fq(host)i Ft(is)f(a)g(v)-5
+b(alid)41 b(hostname)h(or)f(In)m(ternet)h(address,)i(and)c
+Fq(p)s(ort)j Ft(is)f(an)f(in)m(teger)i(p)s(ort)630 5230
+y(n)m(um)m(b)s(er)h(or)h(service)h(name,)j(Bash)c(attempts)h(to)g(op)s
+(en)f(a)g(TCP)g(connection)h(to)g(the)630 5340 y(corresp)s(onding)29
+b(so)s(c)m(k)m(et.)p eop end
+%%Page: 27 33
+TeXDict begin 27 32 bop 150 -116 a Ft(Chapter)30 b(3:)41
+b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(27)150 299
+y Fs(/dev/udp/)p Fi(host)11 b Fs(/)p Fi(port)630 408
+y Ft(If)41 b Fq(host)i Ft(is)f(a)g(v)-5 b(alid)41 b(hostname)h(or)f(In)
+m(ternet)h(address,)i(and)c Fq(p)s(ort)j Ft(is)f(an)f(in)m(teger)i(p)s
+(ort)630 518 y(n)m(um)m(b)s(er)g(or)i(service)g(name,)k(Bash)c
+(attempts)g(to)h(op)s(en)e(a)h(UDP)g(connection)g(to)h(the)630
+628 y(corresp)s(onding)29 b(so)s(c)m(k)m(et.)275 785
+y(A)h(failure)h(to)g(op)s(en)e(or)i(create)h(a)e(\014le)h(causes)g(the)
+f(redirection)h(to)g(fail.)275 918 y(Redirections)f(using)e(\014le)i
+(descriptors)f(greater)h(than)f(9)h(should)e(b)s(e)h(used)f(with)h
+(care,)h(as)g(they)f(ma)m(y)150 1027 y(con\015ict)i(with)f(\014le)h
+(descriptors)f(the)g(shell)h(uses)f(in)m(ternally)-8
+b(.)150 1224 y Fj(3.6.1)63 b(Redirecting)40 b(Input)150
+1371 y Ft(Redirection)35 b(of)f(input)f(causes)i(the)f(\014le)g(whose)g
+(name)g(results)g(from)g(the)g(expansion)g(of)g Fq(w)m(ord)k
+Ft(to)d(b)s(e)150 1481 y(op)s(ened)d(for)g(reading)g(on)g(\014le)h
+(descriptor)f Fs(n)p Ft(,)h(or)f(the)g(standard)g(input)f(\(\014le)i
+(descriptor)f(0\))h(if)f Fs(n)g Ft(is)h(not)150 1590
+y(sp)s(eci\014ed.)275 1724 y(The)c(general)j(format)e(for)h
+(redirecting)g(input)e(is:)390 1857 y Fs([)p Fi(n)11
+b Fs(]<)p Fi(word)150 2054 y Fj(3.6.2)63 b(Redirecting)40
+b(Output)150 2200 y Ft(Redirection)31 b(of)g(output)f(causes)h(the)f
+(\014le)h(whose)f(name)g(results)h(from)e(the)i(expansion)f(of)h
+Fq(w)m(ord)i Ft(to)f(b)s(e)150 2310 y(op)s(ened)d(for)g(writing)g(on)g
+(\014le)h(descriptor)f Fq(n)p Ft(,)g(or)g(the)h(standard)e(output)h
+(\(\014le)h(descriptor)f(1\))h(if)g Fq(n)e Ft(is)i(not)150
+2420 y(sp)s(eci\014ed.)40 b(If)30 b(the)g(\014le)h(do)s(es)f(not)h
+(exist)g(it)g(is)f(created;)i(if)e(it)h(do)s(es)f(exist)h(it)g(is)g
+(truncated)f(to)h(zero)g(size.)275 2553 y(The)e(general)j(format)e(for)
+h(redirecting)g(output)f(is:)390 2686 y Fs([)p Fi(n)11
+b Fs(]>[|])p Fi(word)275 2819 y Ft(If)30 b(the)h(redirection)g(op)s
+(erator)g(is)g(`)p Fs(>)p Ft(',)g(and)f(the)h Fs(noclobber)d
+Ft(option)j(to)g(the)g Fs(set)f Ft(builtin)g(has)h(b)s(een)150
+2929 y(enabled,)i(the)f(redirection)h(will)f(fail)h(if)f(the)g(\014le)g
+(whose)g(name)g(results)g(from)g(the)g(expansion)g(of)g
+Fq(w)m(ord)150 3039 y Ft(exists)f(and)f(is)g(a)h(regular)g(\014le.)41
+b(If)30 b(the)h(redirection)g(op)s(erator)g(is)f(`)p
+Fs(>|)p Ft(',)h(or)f(the)h(redirection)g(op)s(erator)g(is)150
+3148 y(`)p Fs(>)p Ft(')36 b(and)f(the)g Fs(noclobber)e
+Ft(option)j(is)g(not)g(enabled,)h(the)e(redirection)h(is)g(attempted)g
+(ev)m(en)h(if)e(the)h(\014le)150 3258 y(named)30 b(b)m(y)g
+Fq(w)m(ord)k Ft(exists.)150 3455 y Fj(3.6.3)63 b(App)s(ending)42
+b(Redirected)e(Output)150 3601 y Ft(Redirection)23 b(of)e(output)h(in)f
+(this)h(fashion)f(causes)h(the)g(\014le)g(whose)f(name)h(results)f
+(from)g(the)h(expansion)g(of)150 3711 y Fq(w)m(ord)28
+b Ft(to)e(b)s(e)e(op)s(ened)g(for)h(app)s(ending)e(on)i(\014le)g
+(descriptor)g Fq(n)p Ft(,)g(or)g(the)g(standard)f(output)h(\(\014le)g
+(descriptor)150 3821 y(1\))31 b(if)f Fq(n)g Ft(is)h(not)f(sp)s
+(eci\014ed.)40 b(If)30 b(the)h(\014le)f(do)s(es)g(not)h(exist)g(it)g
+(is)f(created.)275 3954 y(The)f(general)j(format)e(for)h(app)s(ending)e
+(output)h(is:)390 4087 y Fs([)p Fi(n)11 b Fs(]>>)p Fi(word)150
+4284 y Fj(3.6.4)63 b(Redirecting)40 b(Standard)h(Output)g(and)g
+(Standard)g(Error)150 4431 y Ft(This)33 b(construct)i(allo)m(ws)g(b)s
+(oth)f(the)g(standard)g(output)f(\(\014le)i(descriptor)f(1\))h(and)f
+(the)g(standard)f(error)150 4540 y(output)d(\(\014le)h(descriptor)f
+(2\))h(to)g(b)s(e)f(redirected)h(to)g(the)f(\014le)h(whose)f(name)h(is)
+f(the)g(expansion)h(of)f Fq(w)m(ord)t Ft(.)275 4674 y(There)f(are)i(t)m
+(w)m(o)h(formats)e(for)h(redirecting)g(standard)e(output)h(and)g
+(standard)f(error:)390 4807 y Fs(&>)p Fi(word)150 4940
+y Ft(and)390 5073 y Fs(>&)p Fi(word)150 5207 y Ft(Of)h(the)g(t)m(w)m(o)
+i(forms,)e(the)h(\014rst)e(is)i(preferred.)39 b(This)30
+b(is)g(seman)m(tically)j(equiv)-5 b(alen)m(t)32 b(to)390
+5340 y Fs(>)p Fi(word)57 b Fs(2>&1)p eop end
+%%Page: 28 34
+TeXDict begin 28 33 bop 150 -116 a Ft(28)2572 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fj(3.6.5)63 b(App)s(ending)42
+b(Standard)f(Output)g(and)g(Standard)g(Error)150 446
+y Ft(This)33 b(construct)i(allo)m(ws)g(b)s(oth)f(the)g(standard)g
+(output)f(\(\014le)i(descriptor)f(1\))h(and)f(the)g(standard)f(error)
+150 555 y(output)d(\(\014le)h(descriptor)f(2\))h(to)g(b)s(e)f(app)s
+(ended)f(to)i(the)f(\014le)h(whose)f(name)g(is)h(the)f(expansion)h(of)f
+Fq(w)m(ord)t Ft(.)275 689 y(The)f(format)i(for)f(app)s(ending)f
+(standard)h(output)g(and)f(standard)h(error)g(is:)390
+822 y Fs(&>>)p Fi(word)150 955 y Ft(This)g(is)g(seman)m(tically)j
+(equiv)-5 b(alen)m(t)32 b(to)390 1089 y Fs(>>)p Fi(word)57
+b Fs(2>&1)150 1286 y Fj(3.6.6)63 b(Here)41 b(Do)s(cumen)m(ts)150
+1432 y Ft(This)c(t)m(yp)s(e)h(of)f(redirection)i(instructs)e(the)h
+(shell)f(to)i(read)e(input)g(from)g(the)h(curren)m(t)f(source)h(un)m
+(til)g(a)150 1542 y(line)31 b(con)m(taining)g(only)g
+Fq(w)m(ord)i Ft(\(with)d(no)h(trailing)g(blanks\))f(is)g(seen.)41
+b(All)31 b(of)f(the)h(lines)f(read)g(up)f(to)i(that)150
+1652 y(p)s(oin)m(t)f(are)h(then)f(used)g(as)g(the)h(standard)f(input)f
+(for)h(a)h(command.)275 1785 y(The)e(format)i(of)g(here-do)s(cumen)m
+(ts)f(is:)390 1918 y Fs(<<[)p Fp(\000)p Fs(])p Fi(word)772
+2028 y(here-document)390 2137 y(delimiter)275 2271 y
+Ft(No)j(parameter)h(expansion,)g(command)f(substitution,)h(arithmetic)h
+(expansion,)f(or)f(\014lename)g(ex-)150 2380 y(pansion)h(is)h(p)s
+(erformed)f(on)g Fq(w)m(ord)t Ft(.)54 b(If)34 b(an)m(y)h(c)m(haracters)
+i(in)d Fq(w)m(ord)k Ft(are)d(quoted,)i(the)e Fq(delimiter)42
+b Ft(is)35 b(the)150 2490 y(result)40 b(of)g(quote)h(remo)m(v)-5
+b(al)42 b(on)e Fq(w)m(ord)t Ft(,)i(and)d(the)i(lines)f(in)g(the)g
+(here-do)s(cumen)m(t)h(are)f(not)g(expanded.)150 2600
+y(If)32 b Fq(w)m(ord)k Ft(is)d(unquoted,)f(all)i(lines)f(of)f(the)h
+(here-do)s(cumen)m(t)g(are)g(sub)5 b(jected)32 b(to)i(parameter)f
+(expansion,)150 2709 y(command)25 b(substitution,)g(and)g(arithmetic)h
+(expansion.)39 b(In)24 b(the)h(latter)h(case,)h(the)e(c)m(haracter)i
+(sequence)150 2819 y Fs(\\newline)h Ft(is)j(ignored,)f(and)g(`)p
+Fs(\\)p Ft(')h(m)m(ust)f(b)s(e)g(used)f(to)i(quote)g(the)g(c)m
+(haracters)h(`)p Fs(\\)p Ft(',)e(`)p Fs($)p Ft(',)h(and)f(`)p
+Fs(`)p Ft('.)275 2952 y(If)21 b(the)i(redirection)g(op)s(erator)g(is)f
+(`)p Fs(<<-)p Ft(',)i(then)e(all)h(leading)g(tab)g(c)m(haracters)h(are)
+e(stripp)s(ed)f(from)h(input)150 3062 y(lines)33 b(and)e(the)i(line)g
+(con)m(taining)h Fq(delimiter)7 b Ft(.)47 b(This)31 b(allo)m(ws)j
+(here-do)s(cumen)m(ts)f(within)e(shell)i(scripts)f(to)150
+3171 y(b)s(e)e(inden)m(ted)g(in)g(a)h(natural)f(fashion.)150
+3368 y Fj(3.6.7)63 b(Here)41 b(Strings)150 3515 y Ft(A)30
+b(v)-5 b(arian)m(t)32 b(of)e(here)h(do)s(cumen)m(ts,)f(the)g(format)h
+(is:)390 3648 y Fs(<<<)47 b Fi(word)275 3782 y Ft(The)29
+b Fq(w)m(ord)34 b Ft(is)c(expanded)g(and)g(supplied)f(to)i(the)f
+(command)h(on)f(its)h(standard)e(input.)150 3979 y Fj(3.6.8)63
+b(Duplicating)41 b(File)g(Descriptors)150 4125 y Ft(The)30
+b(redirection)h(op)s(erator)390 4259 y Fs([)p Fi(n)11
+b Fs(]<&)p Fi(word)150 4392 y Ft(is)35 b(used)e(to)j(duplicate)f(input)
+f(\014le)g(descriptors.)53 b(If)34 b Fq(w)m(ord)k Ft(expands)c(to)h
+(one)g(or)g(more)g(digits,)h(the)f(\014le)150 4502 y(descriptor)e
+(denoted)h(b)m(y)g Fq(n)f Ft(is)g(made)h(to)g(b)s(e)f(a)h(cop)m(y)g(of)
+g(that)g(\014le)g(descriptor.)50 b(If)33 b(the)h(digits)g(in)f
+Fq(w)m(ord)150 4611 y Ft(do)c(not)h(sp)s(ecify)f(a)h(\014le)f
+(descriptor)g(op)s(en)g(for)g(input,)g(a)h(redirection)g(error)f(o)s
+(ccurs.)40 b(If)29 b Fq(w)m(ord)j Ft(ev)-5 b(aluates)150
+4721 y(to)31 b(`)p Fs(-)p Ft(',)g(\014le)g(descriptor)g
+Fq(n)f Ft(is)g(closed.)43 b(If)30 b Fq(n)g Ft(is)g(not)h(sp)s
+(eci\014ed,)f(the)h(standard)f(input)g(\(\014le)h(descriptor)f(0\))150
+4830 y(is)g(used.)275 4964 y(The)f(op)s(erator)390 5097
+y Fs([)p Fi(n)11 b Fs(]>&)p Fi(word)150 5230 y Ft(is)40
+b(used)g(similarly)h(to)g(duplicate)f(output)g(\014le)h(descriptors.)70
+b(If)40 b Fq(n)f Ft(is)i(not)f(sp)s(eci\014ed,)i(the)f(standard)150
+5340 y(output)30 b(\(\014le)g(descriptor)g(1\))h(is)f(used.)39
+b(If)30 b(the)g(digits)h(in)e Fq(w)m(ord)34 b Ft(do)29
+b(not)i(sp)s(ecify)e(a)i(\014le)f(descriptor)g(op)s(en)p
+eop end
+%%Page: 29 35
+TeXDict begin 29 34 bop 150 -116 a Ft(Chapter)30 b(3:)41
+b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(29)150 299
+y(for)38 b(output,)i(a)e(redirection)h(error)f(o)s(ccurs.)63
+b(As)38 b(a)h(sp)s(ecial)f(case,)k(if)c Fq(n)f Ft(is)h(omitted,)k(and)
+37 b Fq(w)m(ord)k Ft(do)s(es)150 408 y(not)28 b(expand)f(to)i(one)f(or)
+f(more)h(digits,)i(the)e(standard)e(output)i(and)f(standard)g(error)g
+(are)i(redirected)f(as)150 518 y(describ)s(ed)h(previously)-8
+b(.)150 717 y Fj(3.6.9)63 b(Mo)m(ving)41 b(File)h(Descriptors)150
+864 y Ft(The)30 b(redirection)h(op)s(erator)390 999 y
+Fs([)p Fi(n)11 b Fs(]<&)p Fi(digit)g Fs(-)150 1133 y
+Ft(mo)m(v)m(es)33 b(the)f(\014le)g(descriptor)f Fq(digit)k
+Ft(to)d(\014le)g(descriptor)g Fq(n)p Ft(,)f(or)h(the)g(standard)f
+(input)f(\(\014le)j(descriptor)e(0\))150 1243 y(if)f
+Fq(n)g Ft(is)h(not)f(sp)s(eci\014ed.)40 b Fq(digit)33
+b Ft(is)e(closed)g(after)g(b)s(eing)f(duplicated)g(to)h
+Fq(n)p Ft(.)275 1377 y(Similarly)-8 b(,)31 b(the)f(redirection)h(op)s
+(erator)390 1512 y Fs([)p Fi(n)11 b Fs(]>&)p Fi(digit)g
+Fs(-)150 1646 y Ft(mo)m(v)m(es)29 b(the)g(\014le)f(descriptor)f
+Fq(digit)k Ft(to)e(\014le)f(descriptor)g Fq(n)p Ft(,)g(or)g(the)g
+(standard)f(output)h(\(\014le)g(descriptor)g(1\))150
+1756 y(if)i Fq(n)g Ft(is)h(not)f(sp)s(eci\014ed.)150
+1955 y Fj(3.6.10)63 b(Op)s(ening)42 b(File)g(Descriptors)g(for)g
+(Reading)e(and)h(W)-10 b(riting)150 2102 y Ft(The)30
+b(redirection)h(op)s(erator)390 2236 y Fs([)p Fi(n)11
+b Fs(]<>)p Fi(word)150 2371 y Ft(causes)39 b(the)g(\014le)g(whose)g
+(name)g(is)g(the)g(expansion)g(of)g Fq(w)m(ord)j Ft(to)d(b)s(e)g(op)s
+(ened)f(for)g(b)s(oth)h(reading)g(and)150 2480 y(writing)33
+b(on)f(\014le)h(descriptor)f Fq(n)p Ft(,)h(or)g(on)f(\014le)h
+(descriptor)g(0)g(if)f Fq(n)g Ft(is)h(not)g(sp)s(eci\014ed.)47
+b(If)32 b(the)h(\014le)f(do)s(es)h(not)150 2590 y(exist,)e(it)g(is)g
+(created.)150 2822 y Fr(3.7)68 b(Executing)46 b(Commands)150
+3046 y Fj(3.7.1)63 b(Simple)41 b(Command)h(Expansion)150
+3193 y Ft(When)33 b(a)g(simple)g(command)g(is)g(executed,)h(the)g
+(shell)f(p)s(erforms)e(the)i(follo)m(wing)i(expansions,)e(assign-)150
+3303 y(men)m(ts,)e(and)f(redirections,)h(from)f(left)h(to)g(righ)m(t.)
+199 3437 y(1.)61 b(The)38 b(w)m(ords)f(that)i(the)g(parser)e(has)h
+(mark)m(ed)g(as)h(v)-5 b(ariable)39 b(assignmen)m(ts)g(\(those)g
+(preceding)f(the)330 3547 y(command)30 b(name\))h(and)f(redirections)h
+(are)f(sa)m(v)m(ed)i(for)e(later)h(pro)s(cessing.)199
+3681 y(2.)61 b(The)39 b(w)m(ords)g(that)i(are)f(not)g(v)-5
+b(ariable)40 b(assignmen)m(ts)h(or)e(redirections)i(are)f(expanded)f
+(\(see)h(Sec-)330 3791 y(tion)d(3.5)i([Shell)e(Expansions],)h(page)g
+(17\).)61 b(If)37 b(an)m(y)g(w)m(ords)f(remain)h(after)h(expansion,)h
+(the)e(\014rst)330 3901 y(w)m(ord)31 b(is)g(tak)m(en)h(to)g(b)s(e)f
+(the)g(name)h(of)f(the)h(command)f(and)f(the)i(remaining)f(w)m(ords)g
+(are)g(the)h(argu-)330 4010 y(men)m(ts.)199 4145 y(3.)61
+b(Redirections)25 b(are)f(p)s(erformed)f(as)h(describ)s(ed)f(ab)s(o)m
+(v)m(e)i(\(see)g(Section)g(3.6)g([Redirections],)i(page)d(26\).)199
+4279 y(4.)61 b(The)25 b(text)h(after)f(the)g(`)p Fs(=)p
+Ft(')h(in)e(eac)m(h)j(v)-5 b(ariable)25 b(assignmen)m(t)h(undergo)s(es)
+e(tilde)i(expansion,)g(parameter)330 4389 y(expansion,)49
+b(command)d(substitution,)j(arithmetic)d(expansion,)k(and)45
+b(quote)h(remo)m(v)-5 b(al)46 b(b)s(efore)330 4498 y(b)s(eing)30
+b(assigned)h(to)g(the)f(v)-5 b(ariable.)275 4658 y(If)32
+b(no)i(command)f(name)g(results,)h(the)g(v)-5 b(ariable)34
+b(assignmen)m(ts)g(a\013ect)h(the)f(curren)m(t)f(shell)h(en)m(viron-)
+150 4767 y(men)m(t.)39 b(Otherwise,)27 b(the)e(v)-5 b(ariables)26
+b(are)g(added)f(to)h(the)f(en)m(vironmen)m(t)h(of)g(the)f(executed)h
+(command)g(and)150 4877 y(do)35 b(not)f(a\013ect)j(the)d(curren)m(t)h
+(shell)g(en)m(vironmen)m(t.)54 b(If)34 b(an)m(y)h(of)g(the)f(assignmen)
+m(ts)i(attempts)f(to)h(assign)150 4986 y(a)j(v)-5 b(alue)39
+b(to)g(a)g(readonly)f(v)-5 b(ariable,)42 b(an)c(error)g(o)s(ccurs,)j
+(and)c(the)i(command)f(exits)h(with)g(a)f(non-zero)150
+5096 y(status.)275 5230 y(If)33 b(no)g(command)g(name)h(results,)g
+(redirections)g(are)g(p)s(erformed,)f(but)g(do)h(not)f(a\013ect)i(the)f
+(curren)m(t)150 5340 y(shell)d(en)m(vironmen)m(t.)41
+b(A)30 b(redirection)h(error)f(causes)h(the)g(command)f(to)h(exit)g
+(with)f(a)h(non-zero)g(status.)p eop end
+%%Page: 30 36
+TeXDict begin 30 35 bop 150 -116 a Ft(30)2572 b(Bash)31
+b(Reference)g(Man)m(ual)275 299 y(If)26 b(there)i(is)f(a)h(command)f
+(name)h(left)g(after)g(expansion,)g(execution)h(pro)s(ceeds)e(as)g
+(describ)s(ed)f(b)s(elo)m(w.)150 408 y(Otherwise,)39
+b(the)e(command)g(exits.)62 b(If)37 b(one)g(of)g(the)h(expansions)f
+(con)m(tained)h(a)g(command)f(substitu-)150 518 y(tion,)i(the)d(exit)h
+(status)g(of)f(the)h(command)f(is)h(the)f(exit)h(status)g(of)f(the)h
+(last)g(command)f(substitution)150 628 y(p)s(erformed.)55
+b(If)35 b(there)g(w)m(ere)h(no)g(command)f(substitutions,)i(the)e
+(command)h(exits)g(with)f(a)h(status)g(of)150 737 y(zero.)150
+925 y Fj(3.7.2)63 b(Command)41 b(Searc)m(h)f(and)h(Execution)150
+1071 y Ft(After)i(a)h(command)f(has)g(b)s(een)f(split)h(in)m(to)h(w)m
+(ords,)j(if)c(it)g(results)g(in)g(a)h(simple)f(command)g(and)f(an)150
+1181 y(optional)32 b(list)f(of)f(argumen)m(ts,)h(the)g(follo)m(wing)g
+(actions)h(are)f(tak)m(en.)199 1310 y(1.)61 b(If)24 b(the)g(command)g
+(name)g(con)m(tains)i(no)e(slashes,)i(the)e(shell)h(attempts)g(to)g(lo)
+s(cate)h(it.)39 b(If)24 b(there)g(exists)330 1419 y(a)h(shell)g
+(function)f(b)m(y)g(that)h(name,)h(that)f(function)f(is)h(in)m(v)m(ok)m
+(ed)h(as)e(describ)s(ed)g(in)g(Section)h(3.3)h([Shell)330
+1529 y(F)-8 b(unctions],)31 b(page)h(14.)199 1657 y(2.)61
+b(If)41 b(the)g(name)h(do)s(es)f(not)g(matc)m(h)i(a)e(function,)j(the)e
+(shell)f(searc)m(hes)i(for)e(it)h(in)f(the)g(list)h(of)g(shell)330
+1767 y(builtins.)e(If)30 b(a)h(matc)m(h)g(is)f(found,)g(that)h(builtin)
+f(is)g(in)m(v)m(ok)m(ed.)199 1895 y(3.)61 b(If)40 b(the)g(name)h(is)f
+(neither)h(a)f(shell)h(function)f(nor)g(a)g(builtin,)j(and)d(con)m
+(tains)h(no)g(slashes,)i(Bash)330 2005 y(searc)m(hes)c(eac)m(h)g
+(elemen)m(t)g(of)g Fs($PATH)d Ft(for)i(a)g(directory)h(con)m(taining)g
+(an)f(executable)h(\014le)f(b)m(y)g(that)330 2115 y(name.)56
+b(Bash)36 b(uses)f(a)h(hash)e(table)j(to)f(remem)m(b)s(er)f(the)h(full)
+f(pathnames)g(of)h(executable)h(\014les)e(to)330 2224
+y(a)m(v)m(oid)e(m)m(ultiple)f Fs(PATH)f Ft(searc)m(hes)i(\(see)f(the)g
+(description)g(of)f Fs(hash)g Ft(in)g(Section)i(4.1)f([Bourne)g(Shell)
+330 2334 y(Builtins],)37 b(page)f(35\).)55 b(A)35 b(full)g(searc)m(h)g
+(of)g(the)g(directories)h(in)f Fs($PATH)e Ft(is)i(p)s(erformed)f(only)h
+(if)g(the)330 2443 y(command)24 b(is)h(not)g(found)e(in)i(the)g(hash)f
+(table.)39 b(If)25 b(the)f(searc)m(h)i(is)e(unsuccessful,)h(the)g
+(shell)g(searc)m(hes)330 2553 y(for)e(a)h(de\014ned)e(shell)h(function)
+h(named)e Fs(command_not_found_handle)p Ft(.)32 b(If)23
+b(that)h(function)f(exists,)330 2663 y(it)32 b(is)f(in)m(v)m(ok)m(ed)i
+(with)e(the)h(original)g(command)f(and)g(the)h(original)g(command's)f
+(argumen)m(ts)h(as)g(its)330 2772 y(argumen)m(ts,)h(and)e(the)i
+(function's)e(exit)i(status)g(b)s(ecomes)f(the)g(exit)h(status)f(of)h
+(the)f(shell.)46 b(If)31 b(that)330 2882 y(function)g(is)g(not)g
+(de\014ned,)f(the)i(shell)f(prin)m(ts)f(an)h(error)g(message)h(and)f
+(returns)e(an)i(exit)h(status)g(of)330 2991 y(127.)199
+3120 y(4.)61 b(If)33 b(the)g(searc)m(h)h(is)g(successful,)g(or)f(if)g
+(the)h(command)f(name)g(con)m(tains)i(one)f(or)f(more)g(slashes,)i(the)
+330 3229 y(shell)g(executes)h(the)f(named)f(program)g(in)h(a)g
+(separate)h(execution)f(en)m(vironmen)m(t.)55 b(Argumen)m(t)35
+b(0)330 3339 y(is)30 b(set)h(to)h(the)e(name)h(giv)m(en,)g(and)f(the)h
+(remaining)f(argumen)m(ts)h(to)g(the)g(command)f(are)h(set)g(to)g(the)
+330 3449 y(argumen)m(ts)g(supplied,)e(if)h(an)m(y)-8
+b(.)199 3577 y(5.)61 b(If)35 b(this)h(execution)h(fails)f(b)s(ecause)g
+(the)f(\014le)h(is)g(not)g(in)f(executable)j(format,)f(and)e(the)h
+(\014le)g(is)g(not)330 3687 y(a)d(directory)-8 b(,)34
+b(it)f(is)g(assumed)e(to)j(b)s(e)d(a)i Fq(shell)g(script)h
+Ft(and)e(the)h(shell)f(executes)i(it)f(as)g(describ)s(ed)e(in)330
+3796 y(Section)g(3.8)h([Shell)e(Scripts],)g(page)i(33.)199
+3925 y(6.)61 b(If)38 b(the)h(command)f(w)m(as)h(not)g(b)s(egun)e(async)
+m(hronously)-8 b(,)42 b(the)c(shell)h(w)m(aits)h(for)e(the)h(command)f
+(to)330 4034 y(complete)32 b(and)e(collects)i(its)f(exit)g(status.)150
+4222 y Fj(3.7.3)63 b(Command)41 b(Execution)f(En)m(vironmen)m(t)150
+4369 y Ft(The)30 b(shell)g(has)h(an)f Fq(execution)h(en)m(vironmen)m(t)
+r Ft(,)h(whic)m(h)e(consists)h(of)f(the)h(follo)m(wing:)225
+4497 y Fp(\017)60 b Ft(op)s(en)32 b(\014les)g(inherited)g(b)m(y)h(the)f
+(shell)h(at)g(in)m(v)m(o)s(cation,)j(as)c(mo)s(di\014ed)g(b)m(y)g
+(redirections)h(supplied)e(to)330 4607 y(the)g Fs(exec)e
+Ft(builtin)225 4735 y Fp(\017)60 b Ft(the)28 b(curren)m(t)g(w)m(orking)
+h(directory)g(as)f(set)h(b)m(y)f Fs(cd)p Ft(,)g Fs(pushd)p
+Ft(,)g(or)g Fs(popd)p Ft(,)g(or)g(inherited)g(b)m(y)g(the)h(shell)f(at)
+330 4845 y(in)m(v)m(o)s(cation)225 4973 y Fp(\017)60
+b Ft(the)31 b(\014le)f(creation)i(mo)s(de)e(mask)g(as)h(set)g(b)m(y)f
+Fs(umask)f Ft(or)h(inherited)g(from)g(the)h(shell's)f(paren)m(t)225
+5102 y Fp(\017)60 b Ft(curren)m(t)30 b(traps)g(set)h(b)m(y)f
+Fs(trap)225 5230 y Fp(\017)60 b Ft(shell)30 b(parameters)f(that)h(are)g
+(set)g(b)m(y)g(v)-5 b(ariable)30 b(assignmen)m(t)g(or)g(with)f
+Fs(set)f Ft(or)i(inherited)f(from)g(the)330 5340 y(shell's)i(paren)m(t)
+f(in)g(the)h(en)m(vironmen)m(t)p eop end
+%%Page: 31 37
+TeXDict begin 31 36 bop 150 -116 a Ft(Chapter)30 b(3:)41
+b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(31)225 299
+y Fp(\017)60 b Ft(shell)44 b(functions)f(de\014ned)f(during)h
+(execution)i(or)e(inherited)h(from)f(the)h(shell's)g(paren)m(t)f(in)h
+(the)330 408 y(en)m(vironmen)m(t)225 543 y Fp(\017)60
+b Ft(options)33 b(enabled)g(at)h(in)m(v)m(o)s(cation)h(\(either)f(b)m
+(y)f(default)g(or)g(with)g(command-line)g(argumen)m(ts\))h(or)330
+652 y(b)m(y)c Fs(set)225 787 y Fp(\017)60 b Ft(options)31
+b(enabled)f(b)m(y)g Fs(shopt)f Ft(\(see)j(Section)f(4.3.2)h([The)e
+(Shopt)g(Builtin],)h(page)g(55\))225 921 y Fp(\017)60
+b Ft(shell)31 b(aliases)g(de\014ned)f(with)g Fs(alias)f
+Ft(\(see)i(Section)g(6.6)h([Aliases],)g(page)f(79\))225
+1056 y Fp(\017)60 b Ft(v)-5 b(arious)50 b(pro)s(cess)f
+Fl(id)p Ft(s,)55 b(including)49 b(those)i(of)e(bac)m(kground)h(jobs)f
+(\(see)i(Section)g(3.2.3)g([Lists],)330 1165 y(page)31
+b(8\),)g(the)g(v)-5 b(alue)31 b(of)f Fs($$)p Ft(,)g(and)g(the)h(v)-5
+b(alue)31 b(of)f Fs($PPID)275 1324 y Ft(When)k(a)g(simple)h(command)f
+(other)g(than)g(a)h(builtin)f(or)g(shell)h(function)f(is)g(to)h(b)s(e)f
+(executed,)i(it)f(is)150 1434 y(in)m(v)m(ok)m(ed)25 b(in)f(a)g
+(separate)h(execution)g(en)m(vironmen)m(t)g(that)f(consists)g(of)h(the)
+f(follo)m(wing.)40 b(Unless)24 b(otherwise)150 1543 y(noted,)31
+b(the)f(v)-5 b(alues)31 b(are)g(inherited)f(from)g(the)g(shell.)225
+1678 y Fp(\017)60 b Ft(the)31 b(shell's)h(op)s(en)e(\014les,)i(plus)e
+(an)m(y)h(mo)s(di\014cations)h(and)e(additions)h(sp)s(eci\014ed)g(b)m
+(y)g(redirections)g(to)330 1787 y(the)g(command)225 1922
+y Fp(\017)60 b Ft(the)31 b(curren)m(t)f(w)m(orking)g(directory)225
+2056 y Fp(\017)60 b Ft(the)31 b(\014le)f(creation)i(mo)s(de)e(mask)225
+2190 y Fp(\017)60 b Ft(shell)32 b(v)-5 b(ariables)33
+b(and)e(functions)h(mark)m(ed)g(for)g(exp)s(ort,)g(along)h(with)f(v)-5
+b(ariables)32 b(exp)s(orted)g(for)g(the)330 2300 y(command,)e(passed)g
+(in)g(the)h(en)m(vironmen)m(t)g(\(see)g(Section)g(3.7.4)i([En)m
+(vironmen)m(t],)e(page)g(31\))225 2434 y Fp(\017)60 b
+Ft(traps)31 b(caugh)m(t)h(b)m(y)f(the)g(shell)h(are)f(reset)h(to)g(the)
+f(v)-5 b(alues)32 b(inherited)e(from)h(the)g(shell's)h(paren)m(t,)g
+(and)330 2544 y(traps)e(ignored)h(b)m(y)f(the)g(shell)h(are)g(ignored)
+275 2703 y(A)41 b(command)g(in)m(v)m(ok)m(ed)i(in)e(this)h(separate)g
+(en)m(vironmen)m(t)g(cannot)g(a\013ect)h(the)f(shell's)g(execution)150
+2813 y(en)m(vironmen)m(t.)275 2947 y(Command)35 b(substitution,)j
+(commands)e(group)s(ed)f(with)i(paren)m(theses,)h(and)e(async)m
+(hronous)g(com-)150 3057 y(mands)c(are)h(in)m(v)m(ok)m(ed)i(in)d(a)i
+(subshell)e(en)m(vironmen)m(t)h(that)h(is)f(a)g(duplicate)h(of)f(the)g
+(shell)g(en)m(vironmen)m(t,)150 3166 y(except)i(that)g(traps)f(caugh)m
+(t)h(b)m(y)f(the)h(shell)f(are)g(reset)h(to)g(the)f(v)-5
+b(alues)35 b(that)g(the)f(shell)h(inherited)e(from)150
+3276 y(its)g(paren)m(t)f(at)h(in)m(v)m(o)s(cation.)49
+b(Builtin)32 b(commands)g(that)h(are)g(in)m(v)m(ok)m(ed)h(as)e(part)g
+(of)h(a)f(pip)s(eline)g(are)h(also)150 3385 y(executed)41
+b(in)f(a)h(subshell)e(en)m(vironmen)m(t.)72 b(Changes)40
+b(made)g(to)h(the)g(subshell)e(en)m(vironmen)m(t)i(cannot)150
+3495 y(a\013ect)32 b(the)f(shell's)f(execution)i(en)m(vironmen)m(t.)275
+3629 y(Subshells)24 b(spa)m(wned)h(to)i(execute)g(command)f
+(substitutions)g(inherit)g(the)g(v)-5 b(alue)26 b(of)g(the)h(`)p
+Fs(-e)p Ft(')e(option)150 3739 y(from)20 b(the)h(paren)m(t)g(shell.)37
+b(When)21 b(not)f(in)h Fl(posix)f Ft(mo)s(de,)i(Bash)f(clears)g(the)g
+(`)p Fs(-e)p Ft(')f(option)h(in)g(suc)m(h)f(subshells.)275
+3873 y(If)38 b(a)h(command)f(is)g(follo)m(w)m(ed)j(b)m(y)d(a)h(`)p
+Fs(&)p Ft(')g(and)f(job)g(con)m(trol)i(is)e(not)h(activ)m(e,)k(the)c
+(default)g(standard)150 3983 y(input)e(for)g(the)h(command)f(is)h(the)g
+(empt)m(y)g(\014le)f(`)p Fs(/dev/null)p Ft('.)61 b(Otherwise,)39
+b(the)f(in)m(v)m(ok)m(ed)h(command)150 4093 y(inherits)30
+b(the)h(\014le)f(descriptors)g(of)h(the)f(calling)i(shell)f(as)f(mo)s
+(di\014ed)g(b)m(y)g(redirections.)150 4292 y Fj(3.7.4)63
+b(En)m(vironmen)m(t)150 4438 y Ft(When)28 b(a)i(program)e(is)h(in)m(v)m
+(ok)m(ed)h(it)f(is)g(giv)m(en)g(an)g(arra)m(y)g(of)g(strings)f(called)i
+(the)f Fq(en)m(vironmen)m(t)r Ft(.)41 b(This)28 b(is)h(a)150
+4548 y(list)i(of)g(name-v)-5 b(alue)31 b(pairs,)f(of)h(the)f(form)g
+Fs(name=value)p Ft(.)275 4682 y(Bash)39 b(pro)m(vides)g(sev)m(eral)i(w)
+m(a)m(ys)g(to)f(manipulate)f(the)h(en)m(vironmen)m(t.)69
+b(On)38 b(in)m(v)m(o)s(cation,)44 b(the)c(shell)150 4792
+y(scans)g(its)h(o)m(wn)f(en)m(vironmen)m(t)h(and)f(creates)i(a)f
+(parameter)f(for)g(eac)m(h)i(name)e(found,)i(automatically)150
+4902 y(marking)26 b(it)g(for)g Fq(exp)s(ort)h Ft(to)g(c)m(hild)f(pro)s
+(cesses.)39 b(Executed)26 b(commands)g(inherit)g(the)g(en)m(vironmen)m
+(t.)39 b(The)150 5011 y Fs(export)c Ft(and)i(`)p Fs(declare)29
+b(-x)p Ft(')36 b(commands)h(allo)m(w)i(parameters)e(and)g(functions)g
+(to)h(b)s(e)e(added)h(to)h(and)150 5121 y(deleted)21
+b(from)f(the)h(en)m(vironmen)m(t.)38 b(If)20 b(the)h(v)-5
+b(alue)21 b(of)g(a)g(parameter)g(in)f(the)g(en)m(vironmen)m(t)i(is)e
+(mo)s(di\014ed,)i(the)150 5230 y(new)31 b(v)-5 b(alue)32
+b(b)s(ecomes)f(part)h(of)f(the)h(en)m(vironmen)m(t,)g(replacing)h(the)e
+(old.)44 b(The)31 b(en)m(vironmen)m(t)h(inherited)150
+5340 y(b)m(y)f(an)m(y)g(executed)h(command)f(consists)g(of)g(the)g
+(shell's)h(initial)g(en)m(vironmen)m(t,)g(whose)f(v)-5
+b(alues)31 b(ma)m(y)h(b)s(e)p eop end
+%%Page: 32 38
+TeXDict begin 32 37 bop 150 -116 a Ft(32)2572 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y(mo)s(di\014ed)26 b(in)g(the)h(shell,)
+h(less)f(an)m(y)g(pairs)f(remo)m(v)m(ed)i(b)m(y)f(the)g
+Fs(unset)e Ft(and)h(`)p Fs(export)j(-n)p Ft(')e(commands,)g(plus)150
+408 y(an)m(y)k(additions)f(via)h(the)g Fs(export)d Ft(and)i(`)p
+Fs(declare)f(-x)p Ft(')h(commands.)275 549 y(The)j(en)m(vironmen)m(t)i
+(for)f(an)m(y)g(simple)h(command)f(or)g(function)g(ma)m(y)g(b)s(e)g
+(augmen)m(ted)h(temp)s(orarily)150 659 y(b)m(y)c(pre\014xing)e(it)i
+(with)g(parameter)g(assignmen)m(ts,)h(as)e(describ)s(ed)g(in)g(Section)
+i(3.4)g([Shell)e(P)m(arameters],)150 768 y(page)g(15.)41
+b(These)29 b(assignmen)m(t)i(statemen)m(ts)g(a\013ect)f(only)g(the)f
+(en)m(vironmen)m(t)h(seen)g(b)m(y)f(that)h(command.)275
+909 y(If)d(the)h(`)p Fs(-k)p Ft(')g(option)g(is)g(set)g(\(see)h
+(Section)f(4.3.1)i([The)e(Set)g(Builtin],)h(page)f(51\),)i(then)e(all)g
+(parameter)150 1019 y(assignmen)m(ts)i(are)g(placed)h(in)e(the)h(en)m
+(vironmen)m(t)g(for)g(a)g(command,)f(not)h(just)f(those)i(that)f
+(precede)g(the)150 1128 y(command)g(name.)275 1269 y(When)f(Bash)h(in)m
+(v)m(ok)m(es)i(an)e(external)g(command,)g(the)g(v)-5
+b(ariable)31 b(`)p Fs($_)p Ft(')f(is)g(set)g(to)h(the)f(full)f(path)h
+(name)150 1379 y(of)h(the)f(command)g(and)g(passed)g(to)h(that)g
+(command)f(in)g(its)h(en)m(vironmen)m(t.)150 1585 y Fj(3.7.5)63
+b(Exit)40 b(Status)150 1731 y Ft(The)26 b(exit)h(status)f(of)g(an)g
+(executed)h(command)f(is)g(the)h(v)-5 b(alue)26 b(returned)f(b)m(y)h
+(the)g Fq(w)m(aitpid)k Ft(system)d(call)g(or)150 1841
+y(equiv)-5 b(alen)m(t)33 b(function.)45 b(Exit)32 b(statuses)g(fall)g
+(b)s(et)m(w)m(een)h(0)f(and)f(255,)i(though,)f(as)g(explained)g(b)s
+(elo)m(w,)h(the)150 1951 y(shell)i(ma)m(y)g(use)f(v)-5
+b(alues)35 b(ab)s(o)m(v)m(e)g(125)h(sp)s(ecially)-8 b(.)54
+b(Exit)35 b(statuses)g(from)f(shell)h(builtins)f(and)f(comp)s(ound)150
+2060 y(commands)j(are)g(also)h(limited)g(to)g(this)f(range.)58
+b(Under)36 b(certain)h(circumstances,)h(the)e(shell)h(will)f(use)150
+2170 y(sp)s(ecial)31 b(v)-5 b(alues)31 b(to)g(indicate)g(sp)s(eci\014c)
+f(failure)h(mo)s(des.)275 2311 y(F)-8 b(or)32 b(the)g(shell's)g(purp)s
+(oses,)e(a)j(command)e(whic)m(h)h(exits)g(with)g(a)g(zero)g(exit)h
+(status)f(has)f(succeeded.)150 2420 y(A)e(non-zero)h(exit)g(status)g
+(indicates)g(failure.)40 b(This)28 b(seemingly)i(coun)m(ter-in)m
+(tuitiv)m(e)i(sc)m(heme)e(is)f(used)g(so)150 2530 y(there)34
+b(is)g(one)g(w)m(ell-de\014ned)g(w)m(a)m(y)g(to)h(indicate)g(success)f
+(and)f(a)h(v)-5 b(ariet)m(y)35 b(of)f(w)m(a)m(ys)h(to)f(indicate)h(v)-5
+b(arious)150 2639 y(failure)37 b(mo)s(des.)61 b(When)37
+b(a)g(command)g(terminates)h(on)f(a)g(fatal)i(signal)f(whose)f(n)m(um)m
+(b)s(er)e(is)i Fq(N)10 b Ft(,)38 b(Bash)150 2749 y(uses)30
+b(the)g(v)-5 b(alue)31 b(128)p Fs(+)p Fq(N)42 b Ft(as)30
+b(the)h(exit)g(status.)275 2890 y(If)k(a)h(command)g(is)g(not)g(found,)
+g(the)g(c)m(hild)h(pro)s(cess)e(created)i(to)g(execute)g(it)g(returns)d
+(a)j(status)f(of)150 2999 y(127.)42 b(If)30 b(a)h(command)f(is)g(found)
+f(but)h(is)g(not)h(executable,)h(the)f(return)e(status)i(is)f(126.)275
+3140 y(If)i(a)i(command)f(fails)g(b)s(ecause)g(of)h(an)f(error)f
+(during)g(expansion)h(or)g(redirection,)i(the)f(exit)g(status)150
+3250 y(is)c(greater)i(than)e(zero.)275 3391 y(The)38
+b(exit)h(status)g(is)g(used)f(b)m(y)g(the)h(Bash)g(conditional)h
+(commands)e(\(see)h(Section)h(3.2.4.2)h([Con-)150 3500
+y(ditional)i(Constructs],)h(page)f(10\))g(and)e(some)i(of)f(the)g(list)
+g(constructs)g(\(see)h(Section)f(3.2.3)i([Lists],)150
+3610 y(page)31 b(8\).)275 3751 y(All)40 b(of)g(the)h(Bash)f(builtins)f
+(return)g(an)h(exit)h(status)g(of)f(zero)h(if)f(they)g(succeed)g(and)g
+(a)g(non-zero)150 3860 y(status)34 b(on)f(failure,)i(so)f(they)g(ma)m
+(y)g(b)s(e)f(used)g(b)m(y)g(the)h(conditional)h(and)e(list)h
+(constructs.)50 b(All)35 b(builtins)150 3970 y(return)29
+b(an)i(exit)g(status)g(of)f(2)h(to)g(indicate)g(incorrect)h(usage.)150
+4175 y Fj(3.7.6)63 b(Signals)150 4322 y Ft(When)36 b(Bash)g(is)h(in)m
+(teractiv)m(e,)j(in)c(the)h(absence)f(of)h(an)m(y)f(traps,)i(it)e
+(ignores)h Fs(SIGTERM)d Ft(\(so)j(that)g(`)p Fs(kill)150
+4432 y(0)p Ft(')c(do)s(es)g(not)g(kill)g(an)g(in)m(teractiv)m(e)j
+(shell\),)f(and)d Fs(SIGINT)f Ft(is)i(caugh)m(t)h(and)f(handled)f(\(so)
+h(that)h(the)f Fs(wait)150 4542 y Ft(builtin)24 b(is)h(in)m
+(terruptible\).)39 b(When)24 b(Bash)g(receiv)m(es)j(a)d
+Fs(SIGINT)p Ft(,)h(it)g(breaks)f(out)h(of)f(an)m(y)h(executing)h(lo)s
+(ops.)150 4651 y(In)31 b(all)h(cases,)h(Bash)f(ignores)g
+Fs(SIGQUIT)p Ft(.)42 b(If)32 b(job)f(con)m(trol)i(is)e(in)h(e\013ect)h
+(\(see)f(Chapter)f(7)h([Job)g(Con)m(trol],)150 4761 y(page)f(89\),)h
+(Bash)e(ignores)h Fs(SIGTTIN)p Ft(,)e Fs(SIGTTOU)p Ft(,)g(and)g
+Fs(SIGTSTP)p Ft(.)275 4902 y(Non-builtin)i(commands)g(started)g(b)m(y)g
+(Bash)h(ha)m(v)m(e)g(signal)g(handlers)e(set)i(to)g(the)g(v)-5
+b(alues)31 b(inherited)150 5011 y(b)m(y)37 b(the)h(shell)g(from)f(its)h
+(paren)m(t.)62 b(When)38 b(job)f(con)m(trol)i(is)e(not)h(in)f
+(e\013ect,)k(async)m(hronous)c(commands)150 5121 y(ignore)f
+Fs(SIGINT)e Ft(and)h Fs(SIGQUIT)e Ft(in)j(addition)f(to)i(these)f
+(inherited)f(handlers.)55 b(Commands)35 b(run)f(as)i(a)150
+5230 y(result)27 b(of)h(command)f(substitution)h(ignore)g(the)g(k)m
+(eyb)s(oard-generated)g(job)g(con)m(trol)h(signals)f
+Fs(SIGTTIN)p Ft(,)150 5340 y Fs(SIGTTOU)p Ft(,)h(and)g
+Fs(SIGTSTP)p Ft(.)p eop end
+%%Page: 33 39
+TeXDict begin 33 38 bop 150 -116 a Ft(Chapter)30 b(3:)41
+b(Basic)32 b(Shell)e(F)-8 b(eatures)2246 b(33)275 299
+y(The)30 b(shell)i(exits)g(b)m(y)f(default)g(up)s(on)f(receipt)i(of)f
+(a)h Fs(SIGHUP)p Ft(.)42 b(Before)32 b(exiting,)h(an)e(in)m(teractiv)m
+(e)j(shell)150 408 y(resends)41 b(the)i Fs(SIGHUP)e Ft(to)i(all)g
+(jobs,)i(running)c(or)h(stopp)s(ed.)76 b(Stopp)s(ed)41
+b(jobs)h(are)h(sen)m(t)g Fs(SIGCONT)d Ft(to)150 518 y(ensure)32
+b(that)h(they)g(receiv)m(e)i(the)e Fs(SIGHUP)p Ft(.)47
+b(T)-8 b(o)33 b(prev)m(en)m(t)g(the)g(shell)g(from)g(sending)f(the)h
+Fs(SIGHUP)e Ft(signal)150 628 y(to)i(a)g(particular)g(job,)g(it)g
+(should)f(b)s(e)g(remo)m(v)m(ed)h(from)g(the)f(jobs)g(table)i(with)e
+(the)h Fs(disown)e Ft(builtin)h(\(see)150 737 y(Section)f(7.2)g([Job)f
+(Con)m(trol)h(Builtins],)g(page)g(90\))h(or)e(mark)m(ed)g(to)h(not)f
+(receiv)m(e)i Fs(SIGHUP)d Ft(using)h Fs(disown)150 847
+y(-h)p Ft(.)275 992 y(If)38 b(the)h Fs(huponexit)e Ft(shell)i(option)g
+(has)g(b)s(een)f(set)i(with)f Fs(shopt)e Ft(\(see)j(Section)g(4.3.2)h
+([The)e(Shopt)150 1102 y(Builtin],)31 b(page)g(55\),)h(Bash)f(sends)e
+(a)i Fs(SIGHUP)e Ft(to)i(all)g(jobs)f(when)f(an)i(in)m(teractiv)m(e)i
+(login)e(shell)g(exits.)275 1247 y(If)38 b(Bash)h(is)g(w)m(aiting)h
+(for)f(a)g(command)f(to)i(complete)g(and)e(receiv)m(es)j(a)e(signal)h
+(for)e(whic)m(h)h(a)g(trap)150 1357 y(has)c(b)s(een)f(set,)i(the)f
+(trap)g(will)g(not)g(b)s(e)f(executed)i(un)m(til)f(the)g(command)f
+(completes.)55 b(When)35 b(Bash)g(is)150 1467 y(w)m(aiting)j(for)f(an)g
+(async)m(hronous)g(command)g(via)h(the)f Fs(wait)f Ft(builtin,)i(the)g
+(reception)g(of)f(a)g(signal)h(for)150 1576 y(whic)m(h)d(a)g(trap)g
+(has)g(b)s(een)f(set)h(will)h(cause)f(the)g Fs(wait)f
+Ft(builtin)h(to)g(return)f(immediately)i(with)f(an)g(exit)150
+1686 y(status)c(greater)g(than)f(128,)i(immediately)g(after)f(whic)m(h)
+f(the)h(trap)f(is)g(executed.)150 1935 y Fr(3.8)68 b(Shell)45
+b(Scripts)150 2094 y Ft(A)30 b(shell)f(script)h(is)f(a)h(text)h(\014le)
+f(con)m(taining)h(shell)f(commands.)40 b(When)29 b(suc)m(h)g(a)h
+(\014le)g(is)f(used)g(as)h(the)g(\014rst)150 2204 y(non-option)i
+(argumen)m(t)h(when)e(in)m(v)m(oking)i(Bash,)g(and)e(neither)h(the)g(`)
+p Fs(-c)p Ft(')g(nor)g(`)p Fs(-s)p Ft(')g(option)g(is)g(supplied)150
+2313 y(\(see)25 b(Section)h(6.1)f([In)m(v)m(oking)h(Bash],)g(page)f
+(71\),)i(Bash)e(reads)f(and)g(executes)i(commands)e(from)g(the)h
+(\014le,)150 2423 y(then)32 b(exits.)46 b(This)32 b(mo)s(de)f(of)i(op)s
+(eration)f(creates)i(a)e(non-in)m(teractiv)m(e)j(shell.)46
+b(The)31 b(shell)i(\014rst)e(searc)m(hes)150 2532 y(for)d(the)g(\014le)
+g(in)g(the)g(curren)m(t)f(directory)-8 b(,)30 b(and)d(lo)s(oks)i(in)e
+(the)i(directories)g(in)e Fs($PATH)g Ft(if)h(not)g(found)e(there.)275
+2678 y(When)34 b(Bash)h(runs)e(a)i(shell)g(script,)g(it)h(sets)f(the)f
+(sp)s(ecial)i(parameter)f Fs(0)f Ft(to)h(the)g(name)g(of)g(the)g
+(\014le,)150 2787 y(rather)k(than)g(the)h(name)f(of)h(the)f(shell,)j
+(and)d(the)h(p)s(ositional)g(parameters)f(are)h(set)g(to)g(the)g
+(remain-)150 2897 y(ing)f(argumen)m(ts,)j(if)d(an)m(y)g(are)g(giv)m
+(en.)67 b(If)39 b(no)g(additional)g(argumen)m(ts)h(are)f(supplied,)h
+(the)f(p)s(ositional)150 3007 y(parameters)31 b(are)f(unset.)275
+3152 y(A)39 b(shell)h(script)f(ma)m(y)h(b)s(e)f(made)h(executable)h(b)m
+(y)e(using)g(the)h Fs(chmod)e Ft(command)h(to)h(turn)e(on)i(the)150
+3262 y(execute)j(bit.)73 b(When)41 b(Bash)g(\014nds)e(suc)m(h)i(a)h
+(\014le)f(while)g(searc)m(hing)h(the)f Fs($PATH)f Ft(for)h(a)h
+(command,)h(it)150 3371 y(spa)m(wns)30 b(a)g(subshell)g(to)h(execute)h
+(it.)41 b(In)30 b(other)g(w)m(ords,)g(executing)390 3517
+y Fs(filename)46 b Fi(arguments)150 3662 y Ft(is)30 b(equiv)-5
+b(alen)m(t)32 b(to)f(executing)390 3808 y Fs(bash)47
+b(filename)e Fi(arguments)150 3953 y Ft(if)30 b Fs(filename)d
+Ft(is)j(an)f(executable)j(shell)e(script.)40 b(This)29
+b(subshell)g(reinitializes)i(itself,)g(so)f(that)h(the)e(e\013ect)150
+4063 y(is)36 b(as)h(if)g(a)f(new)g(shell)h(had)f(b)s(een)g(in)m(v)m(ok)
+m(ed)h(to)h(in)m(terpret)e(the)h(script,)h(with)e(the)h(exception)h
+(that)f(the)150 4172 y(lo)s(cations)25 b(of)g(commands)e(remem)m(b)s
+(ered)h(b)m(y)g(the)g(paren)m(t)g(\(see)h(the)f(description)g(of)g
+Fs(hash)f Ft(in)h(Section)h(4.1)150 4282 y([Bourne)30
+b(Shell)h(Builtins],)g(page)g(35\))h(are)e(retained)h(b)m(y)f(the)h(c)m
+(hild.)275 4427 y(Most)36 b(v)m(ersions)g(of)g(Unix)f(mak)m(e)h(this)g
+(a)g(part)f(of)h(the)g(op)s(erating)g(system's)f(command)h(execution)
+150 4537 y(mec)m(hanism.)50 b(If)33 b(the)g(\014rst)g(line)h(of)f(a)h
+(script)f(b)s(egins)g(with)g(the)g(t)m(w)m(o)i(c)m(haracters)g(`)p
+Fs(#!)p Ft(',)f(the)g(remainder)150 4647 y(of)d(the)g(line)h(sp)s
+(eci\014es)e(an)h(in)m(terpreter)g(for)g(the)g(program.)43
+b(Th)m(us,)30 b(y)m(ou)h(can)h(sp)s(ecify)e(Bash,)i Fs(awk)p
+Ft(,)e(P)m(erl,)150 4756 y(or)g(some)h(other)g(in)m(terpreter)g(and)e
+(write)i(the)f(rest)h(of)g(the)f(script)g(\014le)h(in)f(that)h
+(language.)275 4902 y(The)40 b(argumen)m(ts)h(to)g(the)g(in)m
+(terpreter)g(consist)g(of)g(a)g(single)h(optional)f(argumen)m(t)h
+(follo)m(wing)g(the)150 5011 y(in)m(terpreter)33 b(name)h(on)f(the)g
+(\014rst)f(line)i(of)f(the)g(script)g(\014le,)h(follo)m(w)m(ed)h(b)m(y)
+e(the)g(name)g(of)g(the)h(script)f(\014le,)150 5121 y(follo)m(w)m(ed)g
+(b)m(y)f(the)f(rest)h(of)g(the)f(argumen)m(ts.)45 b(Bash)31
+b(will)h(p)s(erform)e(this)i(action)h(on)e(op)s(erating)h(systems)150
+5230 y(that)24 b(do)g(not)f(handle)g(it)h(themselv)m(es.)40
+b(Note)25 b(that)f(some)g(older)g(v)m(ersions)f(of)h(Unix)f(limit)i
+(the)f(in)m(terpreter)150 5340 y(name)30 b(and)g(argumen)m(t)h(to)g(a)g
+(maxim)m(um)f(of)h(32)g(c)m(haracters.)p eop end
+%%Page: 34 40
+TeXDict begin 34 39 bop 150 -116 a Ft(34)2572 b(Bash)31
+b(Reference)g(Man)m(ual)275 299 y(Bash)h(scripts)g(often)g(b)s(egin)g
+(with)g Fs(#!)e(/bin/bash)g Ft(\(assuming)i(that)h(Bash)f(has)g(b)s
+(een)f(installed)i(in)150 408 y(`)p Fs(/bin)p Ft('\),)25
+b(since)e(this)g(ensures)f(that)i(Bash)f(will)h(b)s(e)e(used)h(to)h(in)
+m(terpret)f(the)g(script,)i(ev)m(en)f(if)f(it)h(is)f(executed)150
+518 y(under)29 b(another)h(shell.)p eop end
+%%Page: 35 41
+TeXDict begin 35 40 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(35)150 299 y Fo(4)80
+b(Shell)53 b(Builtin)f(Commands)150 541 y Ft(Builtin)34
+b(commands)f(are)h(con)m(tained)g(within)f(the)h(shell)g(itself.)50
+b(When)34 b(the)f(name)h(of)f(a)h(builtin)f(com-)150
+651 y(mand)26 b(is)i(used)e(as)i(the)g(\014rst)e(w)m(ord)h(of)h(a)f
+(simple)h(command)f(\(see)h(Section)g(3.2.1)h([Simple)f(Commands],)150
+760 y(page)21 b(8\),)j(the)d(shell)g(executes)h(the)f(command)f
+(directly)-8 b(,)24 b(without)d(in)m(v)m(oking)h(another)f(program.)37
+b(Builtin)150 870 y(commands)f(are)h(necessary)g(to)g(implemen)m(t)g
+(functionalit)m(y)h(imp)s(ossible)e(or)h(incon)m(v)m(enien)m(t)h(to)f
+(obtain)150 979 y(with)30 b(separate)h(utilities.)275
+1117 y(This)c(section)j(brie\015y)e(describ)s(es)g(the)h(builtins)f
+(whic)m(h)g(Bash)h(inherits)f(from)g(the)h(Bourne)g(Shell,)g(as)150
+1226 y(w)m(ell)i(as)g(the)g(builtin)e(commands)h(whic)m(h)h(are)f
+(unique)g(to)h(or)f(ha)m(v)m(e)i(b)s(een)d(extended)i(in)f(Bash.)275
+1363 y(Sev)m(eral)45 b(builtin)e(commands)h(are)h(describ)s(ed)e(in)h
+(other)g(c)m(hapters:)69 b(builtin)43 b(commands)h(whic)m(h)150
+1473 y(pro)m(vide)23 b(the)h(Bash)f(in)m(terface)i(to)f(the)g(job)f
+(con)m(trol)i(facilities)g(\(see)f(Section)h(7.2)f([Job)f(Con)m(trol)h
+(Builtins],)150 1583 y(page)40 b(90\),)j(the)c(directory)h(stac)m(k)g
+(\(see)g(Section)g(6.8.1)h([Directory)g(Stac)m(k)f(Builtins],)i(page)e
+(81\),)j(the)150 1692 y(command)23 b(history)h(\(see)g(Section)g(9.2)h
+([Bash)f(History)g(Builtins],)h(page)g(121\),)h(and)d(the)h
+(programmable)150 1802 y(completion)32 b(facilities)g(\(see)g(Section)f
+(8.7)g([Programmable)g(Completion)g(Builtins],)g(page)h(117\).)275
+1939 y(Man)m(y)f(of)f(the)h(builtins)e(ha)m(v)m(e)j(b)s(een)e(extended)
+g(b)m(y)g Fl(posix)g Ft(or)g(Bash.)275 2076 y(Unless)39
+b(otherwise)h(noted,)i(eac)m(h)f(builtin)e(command)g(do)s(cumen)m(ted)g
+(as)h(accepting)h(options)f(pre-)150 2186 y(ceded)33
+b(b)m(y)h(`)p Fs(-)p Ft(')f(accepts)i(`)p Fs(--)p Ft(')e(to)h(signify)f
+(the)h(end)e(of)i(the)f(options.)50 b(The)33 b Fs(:)p
+Ft(,)h Fs(true)p Ft(,)f Fs(false)p Ft(,)f(and)h Fs(test)150
+2295 y Ft(builtins)i(do)g(not)h(accept)g(options)g(and)f(do)g(not)h
+(treat)g(`)p Fs(--)p Ft(')f(sp)s(ecially)-8 b(.)57 b(The)35
+b Fs(exit)p Ft(,)h Fs(logout)p Ft(,)f Fs(break)p Ft(,)150
+2405 y Fs(continue)p Ft(,)29 b Fs(let)p Ft(,)i(and)g
+Fs(shift)f Ft(builtins)g(accept)j(and)e(pro)s(cess)g(argumen)m(ts)g(b)s
+(eginning)g(with)g(`)p Fs(-)p Ft(')g(with-)150 2515 y(out)f(requiring)f
+(`)p Fs(--)p Ft('.)41 b(Other)29 b(builtins)h(that)g(accept)h(argumen)m
+(ts)f(but)g(are)g(not)g(sp)s(eci\014ed)f(as)h(accepting)150
+2624 y(options)25 b(in)m(terpret)f(argumen)m(ts)h(b)s(eginning)e(with)h
+(`)p Fs(-)p Ft(')h(as)f(in)m(v)-5 b(alid)25 b(options)g(and)e(require)h
+(`)p Fs(--)p Ft(')g(to)h(prev)m(en)m(t)150 2734 y(this)30
+b(in)m(terpretation.)150 2970 y Fr(4.1)68 b(Bourne)45
+b(Shell)g(Builtins)150 3130 y Ft(The)22 b(follo)m(wing)j(shell)d
+(builtin)h(commands)f(are)h(inherited)g(from)f(the)h(Bourne)g(Shell.)38
+b(These)22 b(commands)150 3239 y(are)31 b(implemen)m(ted)g(as)f(sp)s
+(eci\014ed)g(b)m(y)g(the)h Fl(posix)e Ft(standard.)150
+3403 y Fs(:)h Ft(\(a)h(colon\))870 3512 y Fs(:)47 b([)p
+Fi(arguments)11 b Fs(])630 3648 y Ft(Do)43 b(nothing)f(b)s(ey)m(ond)g
+(expanding)f Fq(argumen)m(ts)46 b Ft(and)c(p)s(erforming)f
+(redirections.)76 b(The)630 3758 y(return)29 b(status)i(is)f(zero.)150
+3920 y Fs(.)g Ft(\(a)h(p)s(erio)s(d\))870 4029 y Fs(.)47
+b Fi(filename)57 b Fs([)p Fi(arguments)11 b Fs(])630
+4165 y Ft(Read)34 b(and)f(execute)i(commands)e(from)g(the)h
+Fq(\014lename)39 b Ft(argumen)m(t)34 b(in)f(the)h(curren)m(t)g(shell)
+630 4275 y(con)m(text.)45 b(If)31 b Fq(\014lename)37
+b Ft(do)s(es)31 b(not)g(con)m(tain)i(a)e(slash,)h(the)g
+Fs(PATH)e Ft(v)-5 b(ariable)32 b(is)f(used)f(to)i(\014nd)630
+4384 y Fq(\014lename)5 b Ft(.)51 b(When)34 b(Bash)g(is)g(not)g(in)f
+Fl(posix)g Ft(mo)s(de,)i(the)f(curren)m(t)f(directory)i(is)e(searc)m
+(hed)630 4494 y(if)e Fq(\014lename)36 b Ft(is)31 b(not)h(found)d(in)i
+Fs($PATH)p Ft(.)41 b(If)31 b(an)m(y)g Fq(argumen)m(ts)k
+Ft(are)c(supplied,)f(they)i(b)s(ecome)630 4604 y(the)e(p)s(ositional)h
+(parameters)g(when)e Fq(\014lename)35 b Ft(is)30 b(executed.)42
+b(Otherwise)30 b(the)g(p)s(ositional)630 4713 y(parameters)43
+b(are)h(unc)m(hanged.)79 b(The)42 b(return)g(status)i(is)f(the)g(exit)h
+(status)g(of)f(the)g(last)630 4823 y(command)37 b(executed,)k(or)c
+(zero)h(if)g(no)f(commands)g(are)h(executed.)63 b(If)36
+b Fq(\014lename)43 b Ft(is)38 b(not)630 4932 y(found,)22
+b(or)f(cannot)g(b)s(e)f(read,)j(the)e(return)f(status)h(is)g(non-zero.)
+38 b(This)20 b(builtin)h(is)f(equiv)-5 b(alen)m(t)630
+5042 y(to)31 b Fs(source)p Ft(.)150 5204 y Fs(break)870
+5340 y(break)46 b([)p Fi(n)11 b Fs(])p eop end
+%%Page: 36 42
+TeXDict begin 36 41 bop 150 -116 a Ft(36)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y(Exit)45 b(from)f(a)g
+Fs(for)p Ft(,)k Fs(while)p Ft(,)e Fs(until)p Ft(,)h(or)d
+Fs(select)f Ft(lo)s(op.)83 b(If)44 b Fq(n)g Ft(is)g(supplied,)j(the)e
+Fq(n)p Ft(th)630 408 y(enclosing)c(lo)s(op)f(is)h(exited.)70
+b Fq(n)40 b Ft(m)m(ust)g(b)s(e)f(greater)j(than)d(or)i(equal)f(to)h(1.)
+70 b(The)40 b(return)630 518 y(status)31 b(is)f(zero)h(unless)f
+Fq(n)g Ft(is)g(not)h(greater)g(than)g(or)f(equal)h(to)g(1.)150
+671 y Fs(cd)870 803 y(cd)47 b([-L|-P])f([)p Fi(directory)11
+b Fs(])630 934 y Ft(Change)36 b(the)h(curren)m(t)f(w)m(orking)g
+(directory)h(to)g Fq(directory)8 b Ft(.)59 b(If)35 b
+Fq(directory)45 b Ft(is)36 b(not)h(giv)m(en,)630 1044
+y(the)31 b(v)-5 b(alue)31 b(of)g(the)g Fs(HOME)e Ft(shell)i(v)-5
+b(ariable)32 b(is)f(used.)40 b(If)31 b(the)g(shell)g(v)-5
+b(ariable)31 b Fs(CDPATH)e Ft(exists,)630 1154 y(it)f(is)f(used)f(as)h
+(a)h(searc)m(h)f(path.)40 b(If)26 b Fq(directory)35 b
+Ft(b)s(egins)27 b(with)g(a)g(slash,)h Fs(CDPATH)d Ft(is)i(not)g(used.)
+630 1285 y(The)h(`)p Fs(-P)p Ft(')h(option)g(means)f(to)h(not)g(follo)m
+(w)h(sym)m(b)s(olic)f(links;)g(sym)m(b)s(olic)g(links)f(are)h(follo)m
+(w)m(ed)630 1395 y(b)m(y)23 b(default)h(or)g(with)f(the)h(`)p
+Fs(-L)p Ft(')f(option.)39 b(If)23 b Fq(directory)32 b
+Ft(is)23 b(`)p Fs(-)p Ft(',)j(it)e(is)f(equiv)-5 b(alen)m(t)25
+b(to)g Fs($OLDPWD)p Ft(.)630 1526 y(If)33 b(a)h(non-empt)m(y)g
+(directory)g(name)f(from)g Fs(CDPATH)f Ft(is)h(used,)h(or)g(if)f(`)p
+Fs(-)p Ft(')h(is)f(the)h(\014rst)f(argu-)630 1636 y(men)m(t,)28
+b(and)e(the)h(directory)g(c)m(hange)h(is)f(successful,)h(the)f
+(absolute)g(pathname)g(of)f(the)h(new)630 1745 y(w)m(orking)k
+(directory)g(is)f(written)g(to)i(the)e(standard)g(output.)630
+1877 y(The)f(return)g(status)h(is)f(zero)i(if)e(the)h(directory)g(is)g
+(successfully)g(c)m(hanged,)g(non-zero)g(oth-)630 1987
+y(erwise.)150 2140 y Fs(continue)870 2271 y(continue)46
+b([)p Fi(n)11 b Fs(])630 2403 y Ft(Resume)32 b(the)g(next)g(iteration)i
+(of)e(an)g(enclosing)h Fs(for)p Ft(,)f Fs(while)p Ft(,)f
+Fs(until)p Ft(,)g(or)h Fs(select)f Ft(lo)s(op.)630 2513
+y(If)f Fq(n)h Ft(is)g(supplied,)e(the)j(execution)g(of)f(the)g
+Fq(n)p Ft(th)f(enclosing)i(lo)s(op)f(is)f(resumed.)42
+b Fq(n)30 b Ft(m)m(ust)h(b)s(e)630 2622 y(greater)39
+b(than)f(or)g(equal)g(to)h(1.)63 b(The)38 b(return)e(status)j(is)e
+(zero)i(unless)e Fq(n)h Ft(is)g(not)g(greater)630 2732
+y(than)30 b(or)g(equal)h(to)g(1.)150 2885 y Fs(eval)870
+3017 y(eval)47 b([)p Fi(arguments)11 b Fs(])630 3148
+y Ft(The)25 b(argumen)m(ts)h(are)g(concatenated)i(together)f(in)m(to)f
+(a)g(single)h(command,)f(whic)m(h)g(is)f(then)630 3258
+y(read)35 b(and)g(executed,)j(and)d(its)h(exit)g(status)g(returned)e
+(as)h(the)h(exit)g(status)g(of)g Fs(eval)p Ft(.)54 b(If)630
+3367 y(there)31 b(are)f(no)h(argumen)m(ts)f(or)h(only)f(empt)m(y)h
+(argumen)m(ts,)g(the)f(return)g(status)g(is)h(zero.)150
+3521 y Fs(exec)870 3652 y(exec)47 b([-cl])f([-a)h Fi(name)11
+b Fs(])46 b([)p Fi(command)56 b Fs([)p Fi(arguments)11
+b Fs(]])630 3784 y Ft(If)36 b Fq(command)k Ft(is)c(supplied,)h(it)g
+(replaces)h(the)e(shell)h(without)f(creating)i(a)f(new)f(pro)s(cess.)
+630 3893 y(If)h(the)g(`)p Fs(-l)p Ft(')g(option)h(is)f(supplied,)g(the)
+h(shell)f(places)h(a)g(dash)e(at)i(the)f(b)s(eginning)f(of)i(the)630
+4003 y(zeroth)e(argumen)m(t)g(passed)f(to)h Fq(command)t
+Ft(.)56 b(This)34 b(is)i(what)f(the)h Fs(login)e Ft(program)h(do)s(es.)
+630 4113 y(The)e(`)p Fs(-c)p Ft(')h(option)g(causes)g
+Fq(command)j Ft(to)e(b)s(e)e(executed)i(with)e(an)h(empt)m(y)g(en)m
+(vironmen)m(t.)630 4222 y(If)d(`)p Fs(-a)p Ft(')g(is)h(supplied,)f(the)
+g(shell)h(passes)f Fq(name)37 b Ft(as)31 b(the)h(zeroth)g(argumen)m(t)g
+(to)g Fq(command)t Ft(.)630 4332 y(If)45 b(no)g Fq(command)k
+Ft(is)c(sp)s(eci\014ed,)k(redirections)d(ma)m(y)g(b)s(e)f(used)f(to)j
+(a\013ect)g(the)e(curren)m(t)630 4441 y(shell)33 b(en)m(vironmen)m(t.)
+48 b(If)32 b(there)h(are)g(no)f(redirection)h(errors,)g(the)g(return)e
+(status)i(is)g(zero;)630 4551 y(otherwise)e(the)f(return)g(status)g(is)
+h(non-zero.)150 4704 y Fs(exit)870 4836 y(exit)47 b([)p
+Fi(n)11 b Fs(])630 4967 y Ft(Exit)30 b(the)g(shell,)h(returning)d(a)j
+(status)f(of)g Fq(n)f Ft(to)h(the)g(shell's)g(paren)m(t.)41
+b(If)30 b Fq(n)f Ft(is)h(omitted,)h(the)630 5077 y(exit)c(status)g(is)g
+(that)g(of)g(the)g(last)g(command)f(executed.)41 b(An)m(y)26
+b(trap)h(on)f Fs(EXIT)f Ft(is)i(executed)630 5187 y(b)s(efore)j(the)h
+(shell)f(terminates.)150 5340 y Fs(export)p eop end
+%%Page: 37 43
+TeXDict begin 37 42 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(37)870 299 y Fs(export)46
+b([-fn])g([-p])h([)p Fi(name)11 b Fs([=)p Fi(value)g
+Fs(]])630 432 y Ft(Mark)40 b(eac)m(h)h Fq(name)k Ft(to)40
+b(b)s(e)f(passed)g(to)i(c)m(hild)f(pro)s(cesses)f(in)g(the)h(en)m
+(vironmen)m(t.)70 b(If)39 b(the)630 542 y(`)p Fs(-f)p
+Ft(')29 b(option)h(is)g(supplied,)f(the)g Fq(name)5 b
+Ft(s)30 b(refer)f(to)h(shell)g(functions;)f(otherwise)h(the)g(names)630
+651 y(refer)36 b(to)i(shell)e(v)-5 b(ariables.)60 b(The)36
+b(`)p Fs(-n)p Ft(')h(option)g(means)f(to)h(no)g(longer)g(mark)f(eac)m
+(h)i Fq(name)630 761 y Ft(for)h(exp)s(ort.)65 b(If)39
+b(no)g Fq(names)j Ft(are)d(supplied,)h(or)f(if)g(the)g(`)p
+Fs(-p)p Ft(')g(option)g(is)g(giv)m(en,)j(a)d(list)h(of)630
+870 y(exp)s(orted)c(names)h(is)f(displa)m(y)m(ed.)60
+b(The)37 b(`)p Fs(-p)p Ft(')f(option)h(displa)m(ys)g(output)f(in)g(a)h
+(form)f(that)630 980 y(ma)m(y)31 b(b)s(e)f(reused)g(as)h(input.)41
+b(If)31 b(a)g(v)-5 b(ariable)31 b(name)g(is)g(follo)m(w)m(ed)i(b)m(y)d
+(=)p Fq(v)-5 b(alue)5 b Ft(,)32 b(the)f(v)-5 b(alue)31
+b(of)630 1089 y(the)g(v)-5 b(ariable)31 b(is)f(set)h(to)g
+Fq(v)-5 b(alue)5 b Ft(.)630 1223 y(The)29 b(return)e(status)j(is)f
+(zero)h(unless)e(an)h(in)m(v)-5 b(alid)29 b(option)h(is)f(supplied,)f
+(one)i(of)f(the)g(names)630 1332 y(is)h(not)h(a)f(v)-5
+b(alid)31 b(shell)f(v)-5 b(ariable)31 b(name,)f(or)h(`)p
+Fs(-f)p Ft(')f(is)g(supplied)f(with)g(a)i(name)f(that)h(is)f(not)h(a)
+630 1442 y(shell)g(function.)150 1598 y Fs(getopts)870
+1731 y(getopts)46 b Fi(optstring)56 b(name)h Fs([)p Fi(args)11
+b Fs(])630 1864 y(getopts)28 b Ft(is)i(used)g(b)m(y)g(shell)g(scripts)g
+(to)g(parse)g(p)s(ositional)h(parameters.)41 b Fq(optstring)d
+Ft(con-)630 1974 y(tains)k(the)g(option)f(c)m(haracters)i(to)g(b)s(e)d
+(recognized;)49 b(if)42 b(a)f(c)m(haracter)j(is)d(follo)m(w)m(ed)i(b)m
+(y)f(a)630 2084 y(colon,)33 b(the)f(option)g(is)g(exp)s(ected)g(to)h
+(ha)m(v)m(e)g(an)e(argumen)m(t,)i(whic)m(h)f(should)e(b)s(e)h
+(separated)630 2193 y(from)37 b(it)h(b)m(y)f(white)h(space.)63
+b(The)37 b(colon)h(\(`)p Fs(:)p Ft('\))h(and)d(question)i(mark)f(\(`)p
+Fs(?)p Ft('\))i(ma)m(y)f(not)g(b)s(e)630 2303 y(used)g(as)g(option)h(c)
+m(haracters.)67 b(Eac)m(h)39 b(time)g(it)g(is)f(in)m(v)m(ok)m(ed,)k
+Fs(getopts)37 b Ft(places)i(the)g(next)630 2412 y(option)29
+b(in)f(the)g(shell)h(v)-5 b(ariable)29 b Fq(name)5 b
+Ft(,)29 b(initializing)h Fq(name)k Ft(if)28 b(it)h(do)s(es)f(not)g
+(exist,)i(and)e(the)630 2522 y(index)33 b(of)g(the)h(next)f(argumen)m
+(t)h(to)g(b)s(e)e(pro)s(cessed)h(in)m(to)h(the)g(v)-5
+b(ariable)34 b Fs(OPTIND)p Ft(.)48 b Fs(OPTIND)630 2632
+y Ft(is)41 b(initialized)i(to)f(1)f(eac)m(h)h(time)g(the)f(shell)g(or)g
+(a)g(shell)g(script)g(is)g(in)m(v)m(ok)m(ed.)74 b(When)41
+b(an)630 2741 y(option)36 b(requires)e(an)h(argumen)m(t,)i
+Fs(getopts)c Ft(places)j(that)g(argumen)m(t)g(in)m(to)g(the)f(v)-5
+b(ariable)630 2851 y Fs(OPTARG)p Ft(.)55 b(The)35 b(shell)g(do)s(es)h
+(not)g(reset)g Fs(OPTIND)e Ft(automatically;)41 b(it)36
+b(m)m(ust)f(b)s(e)g(man)m(ually)630 2960 y(reset)i(b)s(et)m(w)m(een)g
+(m)m(ultiple)h(calls)f(to)g Fs(getopts)e Ft(within)h(the)h(same)g
+(shell)f(in)m(v)m(o)s(cation)j(if)e(a)630 3070 y(new)30
+b(set)h(of)f(parameters)h(is)f(to)i(b)s(e)d(used.)630
+3203 y(When)41 b(the)h(end)e(of)i(options)g(is)f(encoun)m(tered,)k
+Fs(getopts)39 b Ft(exits)j(with)f(a)h(return)e(v)-5 b(alue)630
+3313 y(greater)32 b(than)e(zero.)41 b Fs(OPTIND)29 b
+Ft(is)h(set)h(to)g(the)g(index)f(of)g(the)h(\014rst)f(non-option)g
+(argumen)m(t,)630 3422 y(and)g Fs(name)f Ft(is)h(set)h(to)g(`)p
+Fs(?)p Ft('.)630 3555 y Fs(getopts)c Ft(normally)j(parses)e(the)i(p)s
+(ositional)g(parameters,)g(but)e(if)i(more)f(argumen)m(ts)h(are)630
+3665 y(giv)m(en)h(in)f Fq(args)t Ft(,)h Fs(getopts)e
+Ft(parses)g(those)i(instead.)630 3798 y Fs(getopts)h
+Ft(can)h(rep)s(ort)g(errors)g(in)h(t)m(w)m(o)h(w)m(a)m(ys.)51
+b(If)33 b(the)h(\014rst)e(c)m(haracter)k(of)d Fq(optstring)42
+b Ft(is)34 b(a)630 3907 y(colon,)i Fq(silen)m(t)i Ft(error)33
+b(rep)s(orting)h(is)h(used.)51 b(In)33 b(normal)i(op)s(eration)f
+(diagnostic)i(messages)630 4017 y(are)30 b(prin)m(ted)e(when)g(in)m(v)
+-5 b(alid)30 b(options)g(or)f(missing)g(option)g(argumen)m(ts)h(are)f
+(encoun)m(tered.)630 4127 y(If)34 b(the)g(v)-5 b(ariable)35
+b Fs(OPTERR)d Ft(is)i(set)h(to)f(0,)i(no)e(error)g(messages)h(will)f(b)
+s(e)f(displa)m(y)m(ed,)j(ev)m(en)f(if)630 4236 y(the)c(\014rst)e(c)m
+(haracter)j(of)f Fs(optstring)d Ft(is)i(not)h(a)f(colon.)630
+4369 y(If)39 b(an)h(in)m(v)-5 b(alid)41 b(option)f(is)g(seen,)i
+Fs(getopts)c Ft(places)j(`)p Fs(?)p Ft(')f(in)m(to)h
+Fq(name)k Ft(and,)d(if)e(not)g(silen)m(t,)630 4479 y(prin)m(ts)f(an)h
+(error)f(message)h(and)f(unsets)g Fs(OPTARG)p Ft(.)67
+b(If)39 b Fs(getopts)f Ft(is)i(silen)m(t,)j(the)c(option)630
+4589 y(c)m(haracter)32 b(found)d(is)h(placed)h(in)f Fs(OPTARG)f
+Ft(and)h(no)g(diagnostic)i(message)f(is)g(prin)m(ted.)630
+4722 y(If)c(a)g(required)f(argumen)m(t)i(is)f(not)g(found,)g(and)f
+Fs(getopts)f Ft(is)i(not)h(silen)m(t,)h(a)e(question)g(mark)630
+4831 y(\(`)p Fs(?)p Ft('\))35 b(is)g(placed)g(in)g Fq(name)5
+b Ft(,)36 b Fs(OPTARG)d Ft(is)h(unset,)i(and)e(a)h(diagnostic)h
+(message)f(is)g(prin)m(ted.)630 4941 y(If)e Fs(getopts)f
+Ft(is)h(silen)m(t,)j(then)d(a)i(colon)f(\(`)p Fs(:)p
+Ft('\))h(is)e(placed)h(in)g Fq(name)k Ft(and)33 b Fs(OPTARG)f
+Ft(is)i(set)g(to)630 5050 y(the)d(option)f(c)m(haracter)i(found.)150
+5207 y Fs(hash)870 5340 y(hash)47 b([-r])f([-p)h Fi(filename)11
+b Fs(])45 b([-dt])h([)p Fi(name)11 b Fs(])p eop end
+%%Page: 38 44
+TeXDict begin 38 43 bop 150 -116 a Ft(38)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y(Remem)m(b)s(er)36 b(the)g(full)g
+(pathnames)g(of)g(commands)g(sp)s(eci\014ed)g(as)g Fq(name)41
+b Ft(argumen)m(ts,)e(so)630 408 y(they)34 b(need)h(not)f(b)s(e)g(searc)
+m(hed)h(for)f(on)g(subsequen)m(t)f(in)m(v)m(o)s(cations.)55
+b(The)34 b(commands)g(are)630 518 y(found)39 b(b)m(y)i(searc)m(hing)g
+(through)f(the)h(directories)g(listed)g(in)f Fs($PATH)p
+Ft(.)70 b(The)40 b(`)p Fs(-p)p Ft(')g(option)630 628
+y(inhibits)e(the)h(path)f(searc)m(h,)j(and)d Fq(\014lename)44
+b Ft(is)39 b(used)f(as)g(the)h(lo)s(cation)h(of)f Fq(name)5
+b Ft(.)65 b(The)630 737 y(`)p Fs(-r)p Ft(')28 b(option)g(causes)g(the)g
+(shell)h(to)f(forget)h(all)g(remem)m(b)s(ered)e(lo)s(cations.)41
+b(The)28 b(`)p Fs(-d)p Ft(')f(option)630 847 y(causes)38
+b(the)f(shell)h(to)g(forget)g(the)f(remem)m(b)s(ered)g(lo)s(cation)i
+(of)e(eac)m(h)h Fq(name)5 b Ft(.)62 b(If)37 b(the)g(`)p
+Fs(-t)p Ft(')630 956 y(option)22 b(is)g(supplied,)g(the)g(full)f
+(pathname)h(to)g(whic)m(h)g(eac)m(h)g Fq(name)27 b Ft(corresp)s(onds)20
+b(is)i(prin)m(ted.)630 1066 y(If)33 b(m)m(ultiple)h Fq(name)k
+Ft(argumen)m(ts)c(are)f(supplied)f(with)h(`)p Fs(-t)p
+Ft(')g(the)h Fq(name)k Ft(is)c(prin)m(ted)e(b)s(efore)630
+1176 y(the)h(hashed)f(full)g(pathname.)48 b(The)32 b(`)p
+Fs(-l)p Ft(')h(option)g(causes)g(output)f(to)i(b)s(e)e(displa)m(y)m(ed)
+h(in)g(a)630 1285 y(format)f(that)g(ma)m(y)g(b)s(e)f(reused)g(as)g
+(input.)43 b(If)31 b(no)h(argumen)m(ts)g(are)f(giv)m(en,)j(or)d(if)g
+(only)h(`)p Fs(-l)p Ft(')630 1395 y(is)j(supplied,)f(information)h(ab)s
+(out)g(remem)m(b)s(ered)f(commands)g(is)h(prin)m(ted.)53
+b(The)34 b(return)630 1504 y(status)d(is)f(zero)h(unless)f(a)h
+Fq(name)k Ft(is)c(not)f(found)f(or)i(an)f(in)m(v)-5 b(alid)31
+b(option)g(is)f(supplied.)150 1672 y Fs(pwd)870 1811
+y(pwd)47 b([-LP])630 1950 y Ft(Prin)m(t)24 b(the)h(absolute)g(pathname)
+g(of)f(the)h(curren)m(t)f(w)m(orking)h(directory)-8 b(.)40
+b(If)23 b(the)i(`)p Fs(-P)p Ft(')f(option)630 2060 y(is)36
+b(supplied,)f(the)h(pathname)f(prin)m(ted)g(will)h(not)g(con)m(tain)h
+(sym)m(b)s(olic)f(links.)55 b(If)35 b(the)h(`)p Fs(-L)p
+Ft(')630 2169 y(option)44 b(is)g(supplied,)i(the)e(pathname)f(prin)m
+(ted)h(ma)m(y)g(con)m(tain)h(sym)m(b)s(olic)f(links.)80
+b(The)630 2279 y(return)26 b(status)h(is)h(zero)g(unless)e(an)h(error)g
+(is)g(encoun)m(tered)g(while)h(determining)f(the)g(name)630
+2388 y(of)k(the)f(curren)m(t)g(directory)h(or)f(an)h(in)m(v)-5
+b(alid)31 b(option)g(is)f(supplied.)150 2556 y Fs(readonly)870
+2695 y(readonly)46 b([-aApf])f([)p Fi(name)11 b Fs([=)p
+Fi(value)g Fs(]])43 b(...)630 2834 y Ft(Mark)24 b(eac)m(h)h
+Fq(name)k Ft(as)24 b(readonly)-8 b(.)39 b(The)24 b(v)-5
+b(alues)24 b(of)g(these)g(names)g(ma)m(y)g(not)g(b)s(e)g(c)m(hanged)g
+(b)m(y)630 2944 y(subsequen)m(t)e(assignmen)m(t.)39 b(If)22
+b(the)h(`)p Fs(-f)p Ft(')f(option)i(is)e(supplied,)h(eac)m(h)h
+Fq(name)k Ft(refers)22 b(to)i(a)f(shell)630 3053 y(function.)39
+b(The)26 b(`)p Fs(-a)p Ft(')h(option)g(means)g(eac)m(h)h
+Fq(name)k Ft(refers)26 b(to)i(an)e(indexed)h(arra)m(y)g(v)-5
+b(ariable;)630 3163 y(the)33 b(`)p Fs(-A)p Ft(')g(option)g(means)g(eac)
+m(h)h Fq(name)k Ft(refers)32 b(to)h(an)g(asso)s(ciativ)m(e)j(arra)m(y)d
+(v)-5 b(ariable.)49 b(If)32 b(no)630 3272 y Fq(name)f
+Ft(argumen)m(ts)26 b(are)g(giv)m(en,)i(or)d(if)h(the)g(`)p
+Fs(-p)p Ft(')f(option)h(is)g(supplied,)f(a)h(list)h(of)e(all)i
+(readonly)630 3382 y(names)37 b(is)g(prin)m(ted.)59 b(The)37
+b(`)p Fs(-p)p Ft(')f(option)i(causes)f(output)g(to)g(b)s(e)f(displa)m
+(y)m(ed)i(in)e(a)i(format)630 3492 y(that)25 b(ma)m(y)g(b)s(e)e(reused)
+h(as)g(input.)38 b(If)24 b(a)g(v)-5 b(ariable)25 b(name)g(is)f(follo)m
+(w)m(ed)i(b)m(y)e(=)p Fq(v)-5 b(alue)5 b Ft(,)26 b(the)e(v)-5
+b(alue)630 3601 y(of)26 b(the)h(v)-5 b(ariable)27 b(is)f(set)h(to)g
+Fq(v)-5 b(alue)5 b Ft(.)40 b(The)26 b(return)f(status)i(is)f(zero)h
+(unless)e(an)i(in)m(v)-5 b(alid)26 b(option)630 3711
+y(is)k(supplied,)f(one)h(of)g(the)g Fq(name)35 b Ft(argumen)m(ts)30
+b(is)g(not)g(a)g(v)-5 b(alid)31 b(shell)f(v)-5 b(ariable)30
+b(or)g(function)630 3820 y(name,)h(or)f(the)h(`)p Fs(-f)p
+Ft(')f(option)h(is)f(supplied)f(with)h(a)h(name)f(that)h(is)g(not)f(a)h
+(shell)g(function.)150 3988 y Fs(return)870 4127 y(return)46
+b([)p Fi(n)11 b Fs(])630 4266 y Ft(Cause)30 b(a)g(shell)g(function)g
+(to)h(exit)f(with)g(the)g(return)f(v)-5 b(alue)31 b Fq(n)p
+Ft(.)40 b(If)29 b Fq(n)h Ft(is)g(not)g(supplied,)f(the)630
+4376 y(return)35 b(v)-5 b(alue)37 b(is)f(the)g(exit)h(status)f(of)h
+(the)f(last)h(command)f(executed)h(in)f(the)g(function.)630
+4485 y(This)21 b(ma)m(y)i(also)g(b)s(e)e(used)g(to)i(terminate)g
+(execution)g(of)f(a)h(script)f(b)s(eing)f(executed)i(with)f(the)630
+4595 y Fs(.)27 b Ft(\(or)g Fs(source)p Ft(\))f(builtin,)i(returning)e
+(either)h Fq(n)g Ft(or)g(the)g(exit)h(status)g(of)f(the)g(last)h
+(command)630 4704 y(executed)46 b(within)f(the)g(script)g(as)h(the)f
+(exit)h(status)g(of)f(the)h(script.)85 b(An)m(y)45 b(command)630
+4814 y(asso)s(ciated)30 b(with)e(the)g Fs(RETURN)f Ft(trap)h(is)g
+(executed)h(b)s(efore)f(execution)h(resumes)f(after)h(the)630
+4924 y(function)38 b(or)f(script.)63 b(The)38 b(return)e(status)i(is)g
+(non-zero)h(if)e Fs(return)g Ft(is)g(used)g(outside)i(a)630
+5033 y(function)30 b(and)g(not)g(during)g(the)g(execution)i(of)e(a)h
+(script)f(b)m(y)h Fs(.)f Ft(or)g Fs(source)p Ft(.)150
+5201 y Fs(shift)870 5340 y(shift)46 b([)p Fi(n)11 b Fs(])p
+eop end
+%%Page: 39 45
+TeXDict begin 39 44 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(39)630 299 y(Shift)41
+b(the)g(p)s(ositional)h(parameters)g(to)g(the)f(left)h(b)m(y)g
+Fq(n)p Ft(.)73 b(The)40 b(p)s(ositional)j(parameters)630
+408 y(from)34 b Fq(n)p Fs(+)p Ft(1)39 b(.)22 b(.)h(.)45
+b Fs($#)34 b Ft(are)g(renamed)g(to)h Fs($1)k Ft(.)22
+b(.)g(.)46 b Fs($#)p Ft(-)p Fq(n)p Ft(.)51 b(P)m(arameters)36
+b(represen)m(ted)e(b)m(y)g(the)630 518 y(n)m(um)m(b)s(ers)25
+b Fs($#)i Ft(to)g Fs($#)p Ft(-)p Fq(n)p Fs(+)p Ft(1)g(are)g(unset.)39
+b Fq(n)26 b Ft(m)m(ust)h(b)s(e)f(a)i(non-negativ)m(e)h(n)m(um)m(b)s(er)
+c(less)i(than)g(or)630 628 y(equal)33 b(to)h Fs($#)p
+Ft(.)47 b(If)33 b Fq(n)f Ft(is)h(zero)g(or)g(greater)h(than)f
+Fs($#)p Ft(,)g(the)g(p)s(ositional)g(parameters)g(are)h(not)630
+737 y(c)m(hanged.)48 b(If)32 b Fq(n)g Ft(is)h(not)f(supplied,)h(it)g
+(is)f(assumed)g(to)h(b)s(e)f(1.)48 b(The)32 b(return)g(status)h(is)f
+(zero)630 847 y(unless)e Fq(n)f Ft(is)i(greater)g(than)g
+Fs($#)e Ft(or)i(less)f(than)h(zero,)g(non-zero)g(otherwise.)150
+1006 y Fs(test)150 1116 y([)432 b Ft(Ev)-5 b(aluate)31
+b(a)g(conditional)g(expression)f Fq(expr)7 b Ft(.)40
+b(Eac)m(h)30 b(op)s(erator)h(and)e(op)s(erand)g(m)m(ust)h(b)s(e)g(a)630
+1225 y(separate)d(argumen)m(t.)40 b(Expressions)25 b(are)i(comp)s(osed)
+e(of)i(the)f(primaries)g(describ)s(ed)f(b)s(elo)m(w)630
+1335 y(in)34 b(Section)g(6.4)h([Bash)g(Conditional)f(Expressions],)h
+(page)g(76.)52 b Fs(test)33 b Ft(do)s(es)g(not)h(accept)630
+1445 y(an)m(y)27 b(options,)i(nor)d(do)s(es)h(it)g(accept)i(and)d
+(ignore)i(an)f(argumen)m(t)g(of)g(`)p Fs(--)p Ft(')g(as)h(signifying)f
+(the)630 1554 y(end)j(of)g(options.)630 1689 y(When)g(the)h
+Fs([)f Ft(form)g(is)g(used,)g(the)g(last)i(argumen)m(t)e(to)i(the)e
+(command)g(m)m(ust)h(b)s(e)e(a)i Fs(])p Ft(.)630 1823
+y(Expressions)23 b(ma)m(y)h(b)s(e)e(com)m(bined)i(using)f(the)h(follo)m
+(wing)h(op)s(erators,)g(listed)f(in)f(decreasing)630
+1933 y(order)30 b(of)h(precedence.)43 b(The)30 b(ev)-5
+b(aluation)33 b(dep)s(ends)28 b(on)j(the)g(n)m(um)m(b)s(er)f(of)h
+(argumen)m(ts;)g(see)630 2042 y(b)s(elo)m(w.)630 2202
+y Fs(!)f Fi(expr)210 b Ft(T)-8 b(rue)30 b(if)g Fq(expr)37
+b Ft(is)30 b(false.)630 2361 y Fs(\()g Fi(expr)40 b Fs(\))122
+b Ft(Returns)23 b(the)h(v)-5 b(alue)24 b(of)g Fq(expr)7
+b Ft(.)37 b(This)23 b(ma)m(y)i(b)s(e)e(used)g(to)h(o)m(v)m(erride)h
+(the)f(normal)1110 2471 y(precedence)31 b(of)f(op)s(erators.)630
+2630 y Fi(expr1)39 b Fs(-a)30 b Fi(expr2)1110 2740 y
+Ft(T)-8 b(rue)30 b(if)g(b)s(oth)g Fq(expr1)37 b Ft(and)30
+b Fq(expr2)38 b Ft(are)30 b(true.)630 2899 y Fi(expr1)39
+b Fs(-o)30 b Fi(expr2)1110 3009 y Ft(T)-8 b(rue)30 b(if)g(either)h
+Fq(expr1)38 b Ft(or)30 b Fq(expr2)37 b Ft(is)31 b(true.)630
+3168 y(The)37 b Fs(test)f Ft(and)g Fs([)h Ft(builtins)g(ev)-5
+b(aluate)39 b(conditional)f(expressions)f(using)g(a)g(set)h(of)f(rules)
+630 3278 y(based)30 b(on)g(the)h(n)m(um)m(b)s(er)e(of)h(argumen)m(ts.)
+630 3437 y(0)h(argumen)m(ts)1110 3547 y(The)f(expression)g(is)g(false.)
+630 3706 y(1)h(argumen)m(t)1110 3816 y(The)f(expression)g(is)g(true)h
+(if)f(and)g(only)g(if)h(the)f(argumen)m(t)h(is)f(not)h(n)m(ull.)630
+3975 y(2)g(argumen)m(ts)1110 4085 y(If)f(the)h(\014rst)f(argumen)m(t)h
+(is)g(`)p Fs(!)p Ft(',)g(the)g(expression)g(is)g(true)f(if)h(and)f
+(only)h(if)g(the)1110 4194 y(second)j(argumen)m(t)f(is)h(n)m(ull.)50
+b(If)33 b(the)h(\014rst)e(argumen)m(t)i(is)g(one)g(of)f(the)h(unary)
+1110 4304 y(conditional)42 b(op)s(erators)f(\(see)g(Section)h(6.4)f
+([Bash)g(Conditional)g(Expres-)1110 4413 y(sions],)34
+b(page)f(76\),)i(the)e(expression)f(is)h(true)g(if)g(the)g(unary)e
+(test)j(is)f(true.)47 b(If)1110 4523 y(the)33 b(\014rst)g(argumen)m(t)h
+(is)f(not)g(a)h(v)-5 b(alid)34 b(unary)e(op)s(erator,)i(the)g
+(expression)f(is)1110 4633 y(false.)630 4792 y(3)e(argumen)m(ts)1110
+4902 y(If)k(the)g(second)g(argumen)m(t)g(is)g(one)h(of)f(the)g(binary)f
+(conditional)j(op)s(erators)1110 5011 y(\(see)23 b(Section)g(6.4)f
+([Bash)h(Conditional)f(Expressions],)h(page)g(76\),)i(the)d(result)1110
+5121 y(of)44 b(the)h(expression)f(is)g(the)g(result)g(of)h(the)f
+(binary)g(test)h(using)e(the)i(\014rst)1110 5230 y(and)31
+b(third)g(argumen)m(ts)i(as)f(op)s(erands.)44 b(The)31
+b(`)p Fs(-a)p Ft(')h(and)g(`)p Fs(-o)p Ft(')f(op)s(erators)i(are)1110
+5340 y(considered)25 b(binary)g(op)s(erators)g(when)f(there)i(are)f
+(three)h(argumen)m(ts.)39 b(If)25 b(the)p eop end
+%%Page: 40 46
+TeXDict begin 40 45 bop 150 -116 a Ft(40)2572 b(Bash)31
+b(Reference)g(Man)m(ual)1110 299 y(\014rst)d(argumen)m(t)h(is)g(`)p
+Fs(!)p Ft(',)h(the)f(v)-5 b(alue)29 b(is)g(the)g(negation)i(of)e(the)g
+(t)m(w)m(o-argumen)m(t)1110 408 y(test)38 b(using)f(the)g(second)g(and)
+g(third)f(argumen)m(ts.)61 b(If)37 b(the)g(\014rst)f(argumen)m(t)1110
+518 y(is)j(exactly)i(`)p Fs(\()p Ft(')f(and)f(the)g(third)g(argumen)m
+(t)h(is)f(exactly)i(`)p Fs(\))p Ft(',)h(the)e(result)f(is)1110
+628 y(the)46 b(one-argumen)m(t)g(test)h(of)f(the)f(second)h(argumen)m
+(t.)86 b(Otherwise,)50 b(the)1110 737 y(expression)30
+b(is)h(false.)630 909 y(4)g(argumen)m(ts)1110 1019 y(If)h(the)i
+(\014rst)e(argumen)m(t)h(is)g(`)p Fs(!)p Ft(',)h(the)f(result)g(is)g
+(the)g(negation)h(of)f(the)g(three-)1110 1129 y(argumen)m(t)h
+(expression)f(comp)s(osed)h(of)f(the)h(remaining)g(argumen)m(ts.)50
+b(Oth-)1110 1238 y(erwise,)34 b(the)f(expression)g(is)g(parsed)g(and)f
+(ev)-5 b(aluated)34 b(according)h(to)e(prece-)1110 1348
+y(dence)e(using)e(the)i(rules)f(listed)h(ab)s(o)m(v)m(e.)630
+1520 y(5)g(or)f(more)h(argumen)m(ts)1110 1630 y(The)43
+b(expression)f(is)i(parsed)e(and)g(ev)-5 b(aluated)45
+b(according)f(to)f(precedence)1110 1739 y(using)30 b(the)g(rules)g
+(listed)h(ab)s(o)m(v)m(e.)150 1911 y Fs(times)870 2052
+y(times)630 2193 y Ft(Prin)m(t)37 b(out)h(the)g(user)e(and)h(system)g
+(times)h(used)f(b)m(y)g(the)h(shell)f(and)g(its)h(c)m(hildren.)61
+b(The)630 2303 y(return)29 b(status)i(is)f(zero.)150
+2475 y Fs(trap)870 2616 y(trap)47 b([-lp])f([)p Fi(arg)11
+b Fs(])46 b([)p Fi(sigspec)56 b Fs(...)o(])630 2757 y
+Ft(The)43 b(commands)f(in)h Fq(arg)51 b Ft(are)44 b(to)g(b)s(e)e(read)h
+(and)g(executed)h(when)e(the)h(shell)g(receiv)m(es)630
+2866 y(signal)36 b Fq(sigsp)s(ec)6 b Ft(.)55 b(If)35
+b Fq(arg)44 b Ft(is)35 b(absen)m(t)h(\(and)f(there)g(is)g(a)h(single)g
+Fq(sigsp)s(ec)6 b Ft(\))35 b(or)h(equal)f(to)i(`)p Fs(-)p
+Ft(',)630 2976 y(eac)m(h)28 b(sp)s(eci\014ed)e(signal's)h(disp)s
+(osition)f(is)h(reset)g(to)g(the)g(v)-5 b(alue)27 b(it)g(had)f(when)f
+(the)i(shell)g(w)m(as)630 3086 y(started.)63 b(If)37
+b Fq(arg)46 b Ft(is)37 b(the)h(n)m(ull)g(string,)h(then)e(the)h(signal)
+h(sp)s(eci\014ed)d(b)m(y)i(eac)m(h)h Fq(sigsp)s(ec)k
+Ft(is)630 3195 y(ignored)36 b(b)m(y)g(the)g(shell)g(and)g(commands)f
+(it)i(in)m(v)m(ok)m(es.)59 b(If)35 b Fq(arg)45 b Ft(is)36
+b(not)g(presen)m(t)g(and)f(`)p Fs(-p)p Ft(')630 3305
+y(has)e(b)s(een)g(supplied,)f(the)i(shell)f(displa)m(ys)h(the)f(trap)g
+(commands)g(asso)s(ciated)i(with)e(eac)m(h)630 3414 y
+Fq(sigsp)s(ec)6 b Ft(.)40 b(If)28 b(no)g(argumen)m(ts)h(are)g
+(supplied,)f(or)g(only)h(`)p Fs(-p)p Ft(')f(is)g(giv)m(en,)i
+Fs(trap)e Ft(prin)m(ts)g(the)g(list)630 3524 y(of)g(commands)f(asso)s
+(ciated)i(with)f(eac)m(h)h(signal)f(n)m(um)m(b)s(er)e(in)i(a)g(form)f
+(that)h(ma)m(y)h(b)s(e)e(reused)630 3634 y(as)34 b(shell)g(input.)51
+b(The)33 b(`)p Fs(-l)p Ft(')h(option)g(causes)h(the)f(shell)g(to)h
+(prin)m(t)e(a)i(list)f(of)g(signal)h(names)630 3743 y(and)j(their)h
+(corresp)s(onding)f(n)m(um)m(b)s(ers.)65 b(Eac)m(h)39
+b Fq(sigsp)s(ec)45 b Ft(is)39 b(either)g(a)g(signal)h(name)f(or)g(a)630
+3853 y(signal)27 b(n)m(um)m(b)s(er.)39 b(Signal)27 b(names)f(are)h
+(case)h(insensitiv)m(e)g(and)e(the)g Fs(SIG)g Ft(pre\014x)g(is)h
+(optional.)630 3994 y(If)35 b(a)g Fq(sigsp)s(ec)41 b
+Ft(is)35 b Fs(0)g Ft(or)g Fs(EXIT)p Ft(,)g Fq(arg)43
+b Ft(is)35 b(executed)h(when)e(the)h(shell)h(exits.)55
+b(If)35 b(a)g Fq(sigsp)s(ec)41 b Ft(is)630 4103 y Fs(DEBUG)p
+Ft(,)32 b(the)g(command)g Fq(arg)40 b Ft(is)33 b(executed)g(b)s(efore)f
+(ev)m(ery)h(simple)f(command,)h Fs(for)e Ft(com-)630
+4213 y(mand,)d Fs(case)g Ft(command,)h Fs(select)e Ft(command,)i(ev)m
+(ery)h(arithmetic)g Fs(for)d Ft(command,)j(and)630 4322
+y(b)s(efore)22 b(the)g(\014rst)f(command)h(executes)i(in)e(a)g(shell)h
+(function.)37 b(Refer)22 b(to)h(the)g(description)f(of)630
+4432 y(the)i Fs(extdebug)d Ft(option)j(to)h(the)f Fs(shopt)e
+Ft(builtin)h(\(see)i(Section)f(4.3.2)i([The)d(Shopt)g(Builtin],)630
+4542 y(page)33 b(55\))g(for)f(details)h(of)f(its)h(e\013ect)g(on)f(the)
+g Fs(DEBUG)f Ft(trap.)46 b(If)31 b(a)i Fq(sigsp)s(ec)38
+b Ft(is)32 b Fs(RETURN)p Ft(,)f(the)630 4651 y(command)h
+Fq(arg)41 b Ft(is)33 b(executed)g(eac)m(h)h(time)f(a)g(shell)g
+(function)g(or)f(a)h(script)g(executed)g(with)630 4761
+y(the)e Fs(.)f Ft(or)g Fs(source)f Ft(builtins)g(\014nishes)h
+(executing.)630 4902 y(If)g(a)i Fq(sigsp)s(ec)k Ft(is)31
+b Fs(ERR)p Ft(,)f(the)h(command)g Fq(arg)39 b Ft(is)31
+b(executed)g(whenev)m(er)g(a)g(simple)g(command)630 5011
+y(has)k(a)h(non-zero)h(exit)f(status,)i(sub)5 b(ject)35
+b(to)h(the)g(follo)m(wing)h(conditions.)57 b(The)35 b
+Fs(ERR)g Ft(trap)630 5121 y(is)30 b(not)f(executed)i(if)e(the)h(failed)
+g(command)g(is)f(part)h(of)f(the)h(command)f(list)i(immediately)630
+5230 y(follo)m(wing)47 b(an)d Fs(until)g Ft(or)h Fs(while)f
+Ft(k)m(eyw)m(ord,)49 b(part)c(of)g(the)h(test)g(follo)m(wing)g(the)f
+Fs(if)g Ft(or)630 5340 y Fs(elif)d Ft(reserv)m(ed)i(w)m(ords,)j(part)c
+(of)h(a)g(command)f(executed)i(in)e(a)h Fs(&&)f Ft(or)h
+Fs(||)f Ft(list,)k(or)d(if)p eop end
+%%Page: 41 47
+TeXDict begin 41 46 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(41)630 299 y(the)40
+b(command's)g(return)f(status)h(is)g(b)s(eing)f(in)m(v)m(erted)i(using)
+f Fs(!)p Ft(.)68 b(These)40 b(are)g(the)h(same)630 408
+y(conditions)31 b(ob)s(ey)m(ed)f(b)m(y)h(the)f Fs(errexit)f
+Ft(option.)630 545 y(Signals)37 b(ignored)f(up)s(on)f(en)m(try)i(to)g
+(the)f(shell)h(cannot)g(b)s(e)f(trapp)s(ed)f(or)h(reset.)59
+b(T)-8 b(rapp)s(ed)630 654 y(signals)28 b(that)f(are)h(not)f(b)s(eing)g
+(ignored)g(are)g(reset)h(to)g(their)f(original)h(v)-5
+b(alues)28 b(in)e(a)i(subshell)630 764 y(or)i(subshell)g(en)m(vironmen)
+m(t)h(when)e(one)i(is)f(created.)630 900 y(The)g(return)f(status)i(is)f
+(zero)h(unless)f(a)h Fq(sigsp)s(ec)36 b Ft(do)s(es)30
+b(not)h(sp)s(ecify)f(a)g(v)-5 b(alid)31 b(signal.)150
+1063 y Fs(umask)870 1199 y(umask)46 b([-p])h([-S])g([)p
+Fi(mode)11 b Fs(])630 1335 y Ft(Set)29 b(the)h(shell)f(pro)s(cess's)g
+(\014le)g(creation)h(mask)f(to)h Fq(mo)s(de)5 b Ft(.)40
+b(If)28 b Fq(mo)s(de)34 b Ft(b)s(egins)29 b(with)f(a)i(digit,)630
+1445 y(it)e(is)f(in)m(terpreted)g(as)g(an)g(o)s(ctal)i(n)m(um)m(b)s
+(er;)e(if)g(not,)h(it)g(is)f(in)m(terpreted)g(as)g(a)h(sym)m(b)s(olic)f
+(mo)s(de)630 1554 y(mask)i(similar)g(to)g(that)h(accepted)g(b)m(y)f
+(the)g Fs(chmod)e Ft(command.)40 b(If)28 b Fq(mo)s(de)34
+b Ft(is)28 b(omitted,)j(the)630 1664 y(curren)m(t)36
+b(v)-5 b(alue)36 b(of)g(the)h(mask)f(is)g(prin)m(ted.)57
+b(If)35 b(the)h(`)p Fs(-S)p Ft(')g(option)h(is)f(supplied)f(without)h
+(a)630 1773 y Fq(mo)s(de)k Ft(argumen)m(t,)d(the)e(mask)g(is)g(prin)m
+(ted)g(in)g(a)h(sym)m(b)s(olic)f(format.)55 b(If)35 b(the)g(`)p
+Fs(-p)p Ft(')g(option)630 1883 y(is)f(supplied,)f(and)g
+Fq(mo)s(de)38 b Ft(is)33 b(omitted,)j(the)e(output)f(is)g(in)h(a)g
+(form)f(that)h(ma)m(y)g(b)s(e)f(reused)630 1993 y(as)e(input.)41
+b(The)31 b(return)f(status)h(is)g(zero)h(if)e(the)h(mo)s(de)g(is)g
+(successfully)g(c)m(hanged)g(or)g(if)g(no)630 2102 y
+Fq(mo)s(de)k Ft(argumen)m(t)c(is)f(supplied,)g(and)f(non-zero)i
+(otherwise.)630 2238 y(Note)38 b(that)e(when)g(the)g(mo)s(de)g(is)g(in)
+m(terpreted)h(as)f(an)g(o)s(ctal)i(n)m(um)m(b)s(er,)e(eac)m(h)i(n)m(um)
+m(b)s(er)d(of)630 2348 y(the)f(umask)g(is)h(subtracted)f(from)f
+Fs(7)p Ft(.)53 b(Th)m(us,)34 b(a)h(umask)e(of)i Fs(022)e
+Ft(results)h(in)g(p)s(ermissions)630 2457 y(of)d Fs(755)p
+Ft(.)150 2620 y Fs(unset)870 2756 y(unset)46 b([-fv])h([)p
+Fi(name)11 b Fs(])630 2892 y Ft(Eac)m(h)34 b(v)-5 b(ariable)33
+b(or)g(function)g Fq(name)38 b Ft(is)33 b(remo)m(v)m(ed.)50
+b(If)32 b(no)h(options)h(are)f(supplied,)g(or)g(the)630
+3002 y(`)p Fs(-v)p Ft(')h(option)h(is)g(giv)m(en,)h(eac)m(h)g
+Fq(name)k Ft(refers)34 b(to)h(a)g(shell)f(v)-5 b(ariable.)54
+b(If)34 b(the)h(`)p Fs(-f)p Ft(')f(option)h(is)630 3112
+y(giv)m(en,)27 b(the)d Fq(name)5 b Ft(s)25 b(refer)f(to)h(shell)g
+(functions,)g(and)f(the)g(function)g(de\014nition)g(is)h(remo)m(v)m
+(ed.)630 3221 y(Readonly)32 b(v)-5 b(ariables)33 b(and)f(functions)f
+(ma)m(y)i(not)f(b)s(e)g(unset.)45 b(The)32 b(return)f(status)h(is)g
+(zero)630 3331 y(unless)e(a)g Fq(name)36 b Ft(is)30 b(readonly)-8
+b(.)150 3568 y Fr(4.2)68 b(Bash)45 b(Builtin)g(Commands)150
+3728 y Ft(This)c(section)h(describ)s(es)f(builtin)f(commands)h(whic)m
+(h)g(are)h(unique)e(to)j(or)e(ha)m(v)m(e)h(b)s(een)f(extended)g(in)150
+3837 y(Bash.)g(Some)30 b(of)h(these)g(commands)f(are)g(sp)s(eci\014ed)g
+(in)g(the)h Fl(posix)e Ft(standard.)150 4002 y Fs(alias)870
+4138 y(alias)46 b([-p])h([)p Fi(name)11 b Fs([=)p Fi(value)g
+Fs(])43 b(...)o(])630 4274 y Ft(Without)h(argumen)m(ts)f(or)g(with)g
+(the)h(`)p Fs(-p)p Ft(')f(option,)k Fs(alias)41 b Ft(prin)m(ts)i(the)g
+(list)h(of)f(aliases)630 4384 y(on)36 b(the)g(standard)f(output)h(in)f
+(a)i(form)e(that)i(allo)m(ws)g(them)f(to)g(b)s(e)g(reused)f(as)h
+(input.)56 b(If)630 4493 y(argumen)m(ts)29 b(are)g(supplied,)f(an)h
+(alias)h(is)f(de\014ned)e(for)i(eac)m(h)h Fq(name)k Ft(whose)28
+b Fq(v)-5 b(alue)35 b Ft(is)29 b(giv)m(en.)630 4603 y(If)39
+b(no)h Fq(v)-5 b(alue)45 b Ft(is)40 b(giv)m(en,)j(the)d(name)f(and)g(v)
+-5 b(alue)40 b(of)g(the)g(alias)h(is)f(prin)m(ted.)68
+b(Aliases)41 b(are)630 4712 y(describ)s(ed)29 b(in)h(Section)i(6.6)f
+([Aliases],)h(page)f(79.)150 4875 y Fs(bind)870 5011
+y(bind)47 b([-m)g Fi(keymap)11 b Fs(])45 b([-lpsvPSV])870
+5121 y(bind)i([-m)g Fi(keymap)11 b Fs(])45 b([-q)i Fi(function)11
+b Fs(])45 b([-u)h Fi(function)11 b Fs(])45 b([-r)i Fi(keyseq)11
+b Fs(])870 5230 y(bind)47 b([-m)g Fi(keymap)11 b Fs(])45
+b(-f)i Fi(filename)870 5340 y Fs(bind)g([-m)g Fi(keymap)11
+b Fs(])45 b(-x)i Fi(keyseq:shell-command)p eop end
+%%Page: 42 48
+TeXDict begin 42 47 bop 150 -116 a Ft(42)2572 b(Bash)31
+b(Reference)g(Man)m(ual)870 299 y Fs(bind)47 b([-m)g
+Fi(keymap)11 b Fs(])45 b Fi(keyseq:function-name)870
+408 y Fs(bind)i Fi(readline-command)630 545 y Ft(Displa)m(y)26
+b(curren)m(t)f(Readline)h(\(see)g(Chapter)f(8)g([Command)g(Line)g
+(Editing],)i(page)f(93\))g(k)m(ey)630 655 y(and)36 b(function)g
+(bindings,)i(bind)d(a)i(k)m(ey)g(sequence)g(to)h(a)f(Readline)g
+(function)f(or)h(macro,)630 765 y(or)44 b(set)h(a)g(Readline)f(v)-5
+b(ariable.)83 b(Eac)m(h)45 b(non-option)g(argumen)m(t)f(is)g(a)h
+(command)f(as)g(it)630 874 y(w)m(ould)e(app)s(ear)f(in)h(a)h(Readline)g
+(initialization)i(\014le)d(\(see)h(Section)g(8.3)g([Readline)g(Init)630
+984 y(File],)g(page)c(96\),)k(but)38 b(eac)m(h)i(binding)e(or)h
+(command)g(m)m(ust)g(b)s(e)f(passed)g(as)i(a)f(separate)630
+1093 y(argumen)m(t;)31 b(e.g.,)h(`)p Fs("\\C-x\\C-r":re-read-init-f)o
+(ile)p Ft('.)630 1230 y(Options,)e(if)h(supplied,)e(ha)m(v)m(e)i(the)g
+(follo)m(wing)h(meanings:)630 1395 y Fs(-m)e Fi(keymap)1110
+1504 y Ft(Use)54 b Fq(k)m(eymap)j Ft(as)d(the)g(k)m(eymap)g(to)h(b)s(e)
+e(a\013ected)i(b)m(y)f(the)g(subsequen)m(t)1110 1614
+y(bindings.)46 b(Acceptable)34 b Fq(k)m(eymap)i Ft(names)c(are)h
+Fs(emacs)p Ft(,)f Fs(emacs-standard)p Ft(,)1110 1724
+y Fs(emacs-meta)p Ft(,)99 b Fs(emacs-ctlx)p Ft(,)f Fs(vi)p
+Ft(,)j Fs(vi-move)p Ft(,)f Fs(vi-command)p Ft(,)f(and)1110
+1833 y Fs(vi-insert)p Ft(.)64 b Fs(vi)38 b Ft(is)h(equiv)-5
+b(alen)m(t)41 b(to)e Fs(vi-command)p Ft(;)i Fs(emacs)c
+Ft(is)i(equiv)-5 b(alen)m(t)1110 1943 y(to)31 b Fs(emacs-standard)p
+Ft(.)630 2107 y Fs(-l)384 b Ft(List)31 b(the)f(names)g(of)h(all)g
+(Readline)g(functions.)630 2271 y Fs(-p)384 b Ft(Displa)m(y)34
+b(Readline)f(function)g(names)g(and)f(bindings)f(in)i(suc)m(h)f(a)i(w)m
+(a)m(y)f(that)1110 2381 y(they)e(can)f(b)s(e)g(used)g(as)g(input)g(or)g
+(in)g(a)h(Readline)g(initialization)i(\014le.)630 2545
+y Fs(-P)384 b Ft(List)31 b(curren)m(t)f(Readline)h(function)f(names)g
+(and)g(bindings.)630 2710 y Fs(-v)384 b Ft(Displa)m(y)25
+b(Readline)f(v)-5 b(ariable)25 b(names)f(and)f(v)-5 b(alues)24
+b(in)g(suc)m(h)f(a)i(w)m(a)m(y)f(that)h(they)1110 2819
+y(can)31 b(b)s(e)e(used)h(as)h(input)e(or)h(in)g(a)h(Readline)g
+(initialization)j(\014le.)630 2984 y Fs(-V)384 b Ft(List)31
+b(curren)m(t)f(Readline)h(v)-5 b(ariable)31 b(names)f(and)g(v)-5
+b(alues.)630 3148 y Fs(-s)384 b Ft(Displa)m(y)39 b(Readline)f(k)m(ey)g
+(sequences)f(b)s(ound)f(to)i(macros)g(and)f(the)g(strings)1110
+3258 y(they)d(output)f(in)h(suc)m(h)f(a)h(w)m(a)m(y)h(that)f(they)g
+(can)g(b)s(e)f(used)g(as)h(input)e(or)i(in)g(a)1110 3367
+y(Readline)d(initialization)i(\014le.)630 3532 y Fs(-S)384
+b Ft(Displa)m(y)39 b(Readline)f(k)m(ey)g(sequences)f(b)s(ound)f(to)i
+(macros)g(and)f(the)g(strings)1110 3641 y(they)31 b(output.)630
+3806 y Fs(-f)f Fi(filename)1110 3915 y Ft(Read)h(k)m(ey)g(bindings)e
+(from)h Fq(\014lename)5 b Ft(.)630 4080 y Fs(-q)30 b
+Fi(function)1110 4189 y Ft(Query)g(ab)s(out)g(whic)m(h)g(k)m(eys)h(in)m
+(v)m(ok)m(e)h(the)f(named)f Fq(function)p Ft(.)630 4354
+y Fs(-u)g Fi(function)1110 4463 y Ft(Un)m(bind)f(all)i(k)m(eys)g(b)s
+(ound)e(to)i(the)f(named)g Fq(function)p Ft(.)630 4628
+y Fs(-r)g Fi(keyseq)1110 4737 y Ft(Remo)m(v)m(e)i(an)m(y)f(curren)m(t)f
+(binding)f(for)h Fq(k)m(eyseq)r Ft(.)630 4902 y Fs(-x)g
+Fi(keyseq:shell-command)1110 5011 y Ft(Cause)35 b Fq(shell-command)k
+Ft(to)d(b)s(e)f(executed)h(whenev)m(er)f Fq(k)m(eyseq)j
+Ft(is)d(en)m(tered.)1110 5121 y(When)46 b Fq(shell-command)k
+Ft(is)c(executed,)51 b(the)46 b(shell)g(sets)g(the)g
+Fs(READLINE_)1110 5230 y(LINE)37 b Ft(v)-5 b(ariable)38
+b(to)g(the)g(con)m(ten)m(ts)i(of)e(the)g(Readline)g(line)g(bu\013er)f
+(and)g(the)1110 5340 y Fs(READLINE_POINT)e Ft(v)-5 b(ariable)39
+b(to)h(the)e(curren)m(t)h(lo)s(cation)h(of)f(the)g(insertion)p
+eop end
+%%Page: 43 49
+TeXDict begin 43 48 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(43)1110 299 y(p)s(oin)m(t.)59
+b(If)37 b(the)f(executed)i(command)e(c)m(hanges)i(the)f(v)-5
+b(alue)37 b(of)f Fs(READLINE_)1110 408 y(LINE)29 b Ft(or)h
+Fs(READLINE_POINT)p Ft(,)c(those)31 b(new)e(v)-5 b(alues)31
+b(will)f(b)s(e)f(re\015ected)i(in)f(the)1110 518 y(editing)h(state.)630
+677 y(The)26 b(return)f(status)i(is)f(zero)i(unless)d(an)i(in)m(v)-5
+b(alid)27 b(option)g(is)f(supplied)f(or)i(an)f(error)g(o)s(ccurs.)150
+837 y Fs(builtin)870 971 y(builtin)46 b([)p Fi(shell-builtin)54
+b Fs([)p Fi(args)11 b Fs(]])630 1106 y Ft(Run)35 b(a)h(shell)h
+(builtin,)g(passing)f(it)g Fq(args)t Ft(,)i(and)e(return)f(its)h(exit)h
+(status.)58 b(This)36 b(is)g(useful)630 1215 y(when)29
+b(de\014ning)h(a)g(shell)h(function)f(with)g(the)g(same)h(name)f(as)h
+(a)g(shell)f(builtin,)g(retaining)630 1325 y(the)k(functionalit)m(y)h
+(of)f(the)f(builtin)g(within)g(the)h(function.)50 b(The)33
+b(return)g(status)h(is)f(non-)630 1435 y(zero)e(if)g
+Fq(shell-builtin)f Ft(is)g(not)h(a)g(shell)f(builtin)g(command.)150
+1594 y Fs(caller)870 1729 y(caller)46 b([)p Fi(expr)11
+b Fs(])630 1863 y Ft(Returns)34 b(the)g(con)m(text)j(of)e(an)m(y)g
+(activ)m(e)i(subroutine)c(call)j(\(a)f(shell)g(function)f(or)h(a)g
+(script)630 1973 y(executed)c(with)f(the)h Fs(.)f Ft(or)g
+Fs(source)f Ft(builtins\).)630 2107 y(Without)45 b Fq(expr)7
+b Ft(,)46 b Fs(caller)d Ft(displa)m(ys)h(the)g(line)g(n)m(um)m(b)s(er)f
+(and)g(source)h(\014lename)h(of)f(the)630 2217 y(curren)m(t)35
+b(subroutine)f(call.)56 b(If)35 b(a)h(non-negativ)m(e)h(in)m(teger)g
+(is)e(supplied)f(as)h Fq(expr)7 b Ft(,)36 b Fs(caller)630
+2326 y Ft(displa)m(ys)41 b(the)f(line)h(n)m(um)m(b)s(er,)h(subroutine)d
+(name,)44 b(and)c(source)g(\014le)h(corresp)s(onding)e(to)630
+2436 y(that)c(p)s(osition)g(in)f(the)h(curren)m(t)f(execution)i(call)g
+(stac)m(k.)54 b(This)34 b(extra)h(information)g(ma)m(y)630
+2545 y(b)s(e)30 b(used,)g(for)g(example,)h(to)g(prin)m(t)f(a)h(stac)m
+(k)h(trace.)42 b(The)29 b(curren)m(t)i(frame)f(is)g(frame)h(0.)630
+2680 y(The)e(return)f(v)-5 b(alue)29 b(is)h(0)f(unless)g(the)g(shell)g
+(is)h(not)f(executing)h(a)g(subroutine)e(call)i(or)g
+Fq(expr)630 2790 y Ft(do)s(es)g(not)h(corresp)s(ond)e(to)i(a)g(v)-5
+b(alid)30 b(p)s(osition)h(in)f(the)g(call)i(stac)m(k.)150
+2949 y Fs(command)870 3083 y(command)46 b([-pVv])g Fi(command)56
+b Fs([)p Fi(arguments)g Fs(...)o(])630 3218 y Ft(Runs)31
+b Fq(command)36 b Ft(with)d Fq(argumen)m(ts)j Ft(ignoring)d(an)m(y)g
+(shell)g(function)f(named)g Fq(command)t Ft(.)630 3328
+y(Only)39 b(shell)i(builtin)e(commands)h(or)g(commands)f(found)g(b)m(y)
+h(searc)m(hing)h(the)f Fs(PATH)f Ft(are)630 3437 y(executed.)g(If)23
+b(there)h(is)f(a)h(shell)f(function)g(named)g Fs(ls)p
+Ft(,)i(running)c(`)p Fs(command)29 b(ls)p Ft(')23 b(within)g(the)630
+3547 y(function)33 b(will)g(execute)i(the)f(external)g(command)f
+Fs(ls)f Ft(instead)i(of)f(calling)i(the)e(function)630
+3656 y(recursiv)m(ely)-8 b(.)84 b(The)44 b(`)p Fs(-p)p
+Ft(')h(option)g(means)f(to)h(use)g(a)f(default)h(v)-5
+b(alue)45 b(for)f Fs(PATH)g Ft(that)h(is)630 3766 y(guaran)m(teed)35
+b(to)f(\014nd)e(all)j(of)f(the)g(standard)f(utilities.)52
+b(The)33 b(return)g(status)h(in)f(this)h(case)630 3875
+y(is)29 b(127)g(if)g Fq(command)j Ft(cannot)d(b)s(e)e(found)h(or)g(an)g
+(error)h(o)s(ccurred,)f(and)g(the)h(exit)g(status)g(of)630
+3985 y Fq(command)34 b Ft(otherwise.)630 4120 y(If)25
+b(either)g(the)h(`)p Fs(-V)p Ft(')f(or)g(`)p Fs(-v)p
+Ft(')g(option)g(is)g(supplied,)h(a)f(description)g(of)h
+Fq(command)i Ft(is)d(prin)m(ted.)630 4229 y(The)i(`)p
+Fs(-v)p Ft(')h(option)h(causes)f(a)h(single)f(w)m(ord)g(indicating)h
+(the)f(command)g(or)g(\014le)g(name)g(used)630 4339 y(to)36
+b(in)m(v)m(ok)m(e)g Fq(command)j Ft(to)c(b)s(e)g(displa)m(y)m(ed;)j
+(the)d(`)p Fs(-V)p Ft(')g(option)g(pro)s(duces)e(a)j(more)f(v)m(erb)s
+(ose)630 4448 y(description.)61 b(In)36 b(this)h(case,)j(the)e(return)e
+(status)h(is)g(zero)h(if)f Fq(command)k Ft(is)c(found,)h(and)630
+4558 y(non-zero)31 b(if)f(not.)150 4717 y Fs(declare)870
+4852 y(declare)46 b([-aAfFilrtux])e([-p])j([)p Fi(name)11
+b Fs([=)p Fi(value)g Fs(])43 b(...)o(])630 4986 y Ft(Declare)29
+b(v)-5 b(ariables)28 b(and)e(giv)m(e)j(them)e(attributes.)40
+b(If)27 b(no)g Fq(name)5 b Ft(s)27 b(are)h(giv)m(en,)h(then)e(displa)m
+(y)630 5096 y(the)k(v)-5 b(alues)30 b(of)h(v)-5 b(ariables)31
+b(instead.)630 5230 y(The)c(`)p Fs(-p)p Ft(')h(option)g(will)g(displa)m
+(y)g(the)g(attributes)g(and)g(v)-5 b(alues)28 b(of)g(eac)m(h)h
+Fq(name)5 b Ft(.)40 b(When)27 b(`)p Fs(-p)p Ft(')630
+5340 y(is)j(used)g(with)g Fq(name)36 b Ft(argumen)m(ts,)31
+b(additional)g(options)f(are)h(ignored.)p eop end
+%%Page: 44 50
+TeXDict begin 44 49 bop 150 -116 a Ft(44)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y(When)36 b(`)p Fs(-p)p
+Ft(')f(is)h(supplied)f(without)h Fq(name)41 b Ft(argumen)m(ts,)d
+Fs(declare)c Ft(will)i(displa)m(y)g(the)g(at-)630 408
+y(tributes)31 b(and)f(v)-5 b(alues)31 b(of)g(all)h(v)-5
+b(ariables)31 b(ha)m(ving)h(the)f(attributes)g(sp)s(eci\014ed)f(b)m(y)h
+(the)g(addi-)630 518 y(tional)h(options.)41 b(If)30 b(no)g(other)h
+(options)g(are)g(supplied)e(with)h(`)p Fs(-p)p Ft(',)g
+Fs(declare)f Ft(will)i(displa)m(y)630 628 y(the)f(attributes)g(and)e(v)
+-5 b(alues)30 b(of)g(all)g(shell)g(v)-5 b(ariables.)41
+b(The)29 b(`)p Fs(-f)p Ft(')g(option)h(will)g(restrict)g(the)630
+737 y(displa)m(y)h(to)g(shell)f(functions.)630 867 y(The)36
+b(`)p Fs(-F)p Ft(')h(option)g(inhibits)f(the)h(displa)m(y)g(of)g
+(function)g(de\014nitions;)i(only)e(the)g(function)630
+976 y(name)30 b(and)f(attributes)i(are)f(prin)m(ted.)40
+b(If)30 b(the)g Fs(extdebug)e Ft(shell)i(option)g(is)g(enabled)g(using)
+630 1086 y Fs(shopt)24 b Ft(\(see)i(Section)g(4.3.2)i([The)d(Shopt)f
+(Builtin],)k(page)e(55\),)i(the)d(source)h(\014le)f(name)h(and)630
+1196 y(line)38 b(n)m(um)m(b)s(er)e(where)i(the)g(function)f(is)h
+(de\014ned)e(are)i(displa)m(y)m(ed)h(as)e(w)m(ell.)64
+b(`)p Fs(-F)p Ft(')38 b(implies)630 1305 y(`)p Fs(-f)p
+Ft('.)i(The)28 b(follo)m(wing)i(options)f(can)f(b)s(e)g(used)g(to)h
+(restrict)g(output)f(to)h(v)-5 b(ariables)30 b(with)e(the)630
+1415 y(sp)s(eci\014ed)i(attributes)h(or)f(to)h(giv)m(e)h(v)-5
+b(ariables)31 b(attributes:)630 1564 y Fs(-a)384 b Ft(Eac)m(h)36
+b Fq(name)k Ft(is)34 b(an)h(indexed)g(arra)m(y)g(v)-5
+b(ariable)36 b(\(see)f(Section)h(6.7)g([Arra)m(ys],)1110
+1674 y(page)31 b(80\).)630 1823 y Fs(-A)384 b Ft(Eac)m(h)24
+b Fq(name)k Ft(is)23 b(an)g(asso)s(ciativ)m(e)j(arra)m(y)e(v)-5
+b(ariable)24 b(\(see)g(Section)g(6.7)g([Arra)m(ys],)1110
+1933 y(page)31 b(80\).)630 2082 y Fs(-f)384 b Ft(Use)31
+b(function)f(names)g(only)-8 b(.)630 2232 y Fs(-i)384
+b Ft(The)36 b(v)-5 b(ariable)37 b(is)f(to)h(b)s(e)f(treated)h(as)g(an)f
+(in)m(teger;)41 b(arithmetic)c(ev)-5 b(aluation)1110
+2341 y(\(see)29 b(Section)f(6.5)h([Shell)f(Arithmetic],)i(page)e(78\))h
+(is)f(p)s(erformed)e(when)h(the)1110 2451 y(v)-5 b(ariable)31
+b(is)g(assigned)f(a)h(v)-5 b(alue.)630 2600 y Fs(-l)384
+b Ft(When)26 b(the)g(v)-5 b(ariable)27 b(is)f(assigned)g(a)g(v)-5
+b(alue,)28 b(all)f(upp)s(er-case)e(c)m(haracters)j(are)1110
+2710 y(con)m(v)m(erted)k(to)f(lo)m(w)m(er-case.)43 b(The)30
+b(upp)s(er-case)g(attribute)h(is)g(disabled.)630 2859
+y Fs(-r)384 b Ft(Mak)m(e)25 b Fq(name)5 b Ft(s)23 b(readonly)-8
+b(.)39 b(These)24 b(names)f(cannot)h(then)f(b)s(e)g(assigned)h(v)-5
+b(alues)1110 2969 y(b)m(y)30 b(subsequen)m(t)g(assignmen)m(t)h
+(statemen)m(ts)h(or)f(unset.)630 3118 y Fs(-t)384 b Ft(Giv)m(e)33
+b(eac)m(h)h Fq(name)j Ft(the)32 b Fs(trace)f Ft(attribute.)46
+b(T)-8 b(raced)32 b(functions)g(inherit)g(the)1110 3228
+y Fs(DEBUG)26 b Ft(and)h Fs(RETURN)f Ft(traps)h(from)g(the)h(calling)h
+(shell.)40 b(The)27 b(trace)i(attribute)1110 3337 y(has)h(no)g(sp)s
+(ecial)h(meaning)g(for)f(v)-5 b(ariables.)630 3487 y
+Fs(-u)384 b Ft(When)28 b(the)h(v)-5 b(ariable)29 b(is)f(assigned)h(a)f
+(v)-5 b(alue,)30 b(all)f(lo)m(w)m(er-case)i(c)m(haracters)f(are)1110
+3597 y(con)m(v)m(erted)i(to)f(upp)s(er-case.)40 b(The)30
+b(lo)m(w)m(er-case)j(attribute)e(is)g(disabled.)630 3746
+y Fs(-x)384 b Ft(Mark)30 b(eac)m(h)h Fq(name)k Ft(for)29
+b(exp)s(ort)h(to)g(subsequen)m(t)f(commands)h(via)g(the)g(en)m(vi-)1110
+3856 y(ronmen)m(t.)630 4005 y(Using)e(`)p Fs(+)p Ft(')h(instead)f(of)g
+(`)p Fs(-)p Ft(')g(turns)f(o\013)i(the)f(attribute)h(instead,)g(with)f
+(the)g(exceptions)h(that)630 4115 y(`)p Fs(+a)p Ft(')h(ma)m(y)h(not)f
+(b)s(e)f(used)g(to)i(destro)m(y)g(an)f(arra)m(y)g(v)-5
+b(ariable)31 b(and)f(`)p Fs(+r)p Ft(')g(will)g(not)g(remo)m(v)m(e)i
+(the)630 4224 y(readonly)e(attribute.)41 b(When)30 b(used)f(in)g(a)h
+(function,)g Fs(declare)e Ft(mak)m(es)j(eac)m(h)f Fq(name)35
+b Ft(lo)s(cal,)630 4334 y(as)40 b(with)g(the)g Fs(local)e
+Ft(command.)69 b(If)40 b(a)g(v)-5 b(ariable)41 b(name)f(is)g(follo)m(w)
+m(ed)h(b)m(y)f(=)p Fq(v)-5 b(alue)5 b Ft(,)43 b(the)630
+4443 y(v)-5 b(alue)31 b(of)f(the)h(v)-5 b(ariable)31
+b(is)g(set)f(to)i Fq(v)-5 b(alue)5 b Ft(.)630 4573 y(The)35
+b(return)f(status)i(is)g(zero)g(unless)f(an)g(in)m(v)-5
+b(alid)36 b(option)g(is)g(encoun)m(tered,)h(an)f(attempt)630
+4682 y(is)c(made)g(to)g(de\014ne)f(a)h(function)g(using)f(`)p
+Fs(-f)f(foo=bar)p Ft(',)h(an)h(attempt)g(is)g(made)g(to)h(assign)630
+4792 y(a)42 b(v)-5 b(alue)43 b(to)g(a)f(readonly)g(v)-5
+b(ariable,)47 b(an)42 b(attempt)h(is)f(made)g(to)h(assign)f(a)h(v)-5
+b(alue)42 b(to)h(an)630 4902 y(arra)m(y)30 b(v)-5 b(ariable)30
+b(without)g(using)e(the)i(comp)s(ound)e(assignmen)m(t)i(syn)m(tax)g
+(\(see)h(Section)f(6.7)630 5011 y([Arra)m(ys],)47 b(page)c(80\),)48
+b(one)43 b(of)g(the)g Fq(names)k Ft(is)c(not)g(a)g(v)-5
+b(alid)43 b(shell)g(v)-5 b(ariable)44 b(name,)i(an)630
+5121 y(attempt)28 b(is)f(made)h(to)f(turn)f(o\013)i(readonly)f(status)g
+(for)g(a)h(readonly)f(v)-5 b(ariable,)29 b(an)e(attempt)630
+5230 y(is)h(made)h(to)g(turn)e(o\013)i(arra)m(y)f(status)h(for)f(an)g
+(arra)m(y)h(v)-5 b(ariable,)30 b(or)e(an)g(attempt)i(is)e(made)g(to)630
+5340 y(displa)m(y)j(a)f(non-existen)m(t)i(function)e(with)g(`)p
+Fs(-f)p Ft('.)p eop end
+%%Page: 45 51
+TeXDict begin 45 50 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(45)150 299 y Fs(echo)870
+432 y(echo)47 b([-neE])f([)p Fi(arg)57 b Fs(...)o(])630
+565 y Ft(Output)31 b(the)i Fq(arg)8 b Ft(s,)33 b(separated)g(b)m(y)g
+(spaces,)g(terminated)g(with)f(a)h(newline.)47 b(The)32
+b(return)630 674 y(status)40 b(is)g(alw)m(a)m(ys)h(0.)69
+b(If)39 b(`)p Fs(-n)p Ft(')h(is)f(sp)s(eci\014ed,)j(the)e(trailing)h
+(newline)e(is)h(suppressed.)66 b(If)630 784 y(the)29
+b(`)p Fs(-e)p Ft(')g(option)g(is)h(giv)m(en,)g(in)m(terpretation)g(of)g
+(the)f(follo)m(wing)h(bac)m(kslash-escap)s(ed)g(c)m(har-)630
+893 y(acters)38 b(is)f(enabled.)60 b(The)36 b(`)p Fs(-E)p
+Ft(')h(option)g(disables)g(the)g(in)m(terpretation)h(of)f(these)g
+(escap)s(e)630 1003 y(c)m(haracters,)h(ev)m(en)d(on)g(systems)g(where)f
+(they)h(are)g(in)m(terpreted)h(b)m(y)e(default.)55 b(The)34
+b Fs(xpg_)630 1112 y(echo)d Ft(shell)h(option)h(ma)m(y)g(b)s(e)e(used)h
+(to)h(dynamically)g(determine)f(whether)f(or)i(not)f
+Fs(echo)630 1222 y Ft(expands)39 b(these)i(escap)s(e)g(c)m(haracters)g
+(b)m(y)g(default.)70 b Fs(echo)39 b Ft(do)s(es)h(not)g(in)m(terpret)h
+(`)p Fs(--)p Ft(')f(to)630 1332 y(mean)30 b(the)h(end)f(of)g(options.)
+630 1465 y Fs(echo)f Ft(in)m(terprets)i(the)f(follo)m(wing)i(escap)s(e)
+f(sequences:)630 1621 y Fs(\\a)384 b Ft(alert)31 b(\(b)s(ell\))630
+1777 y Fs(\\b)384 b Ft(bac)m(kspace)630 1933 y Fs(\\c)g
+Ft(suppress)28 b(further)h(output)630 2089 y Fs(\\e)384
+b Ft(escap)s(e)630 2245 y Fs(\\f)g Ft(form)30 b(feed)630
+2401 y Fs(\\n)384 b Ft(new)30 b(line)630 2557 y Fs(\\r)384
+b Ft(carriage)32 b(return)630 2713 y Fs(\\t)384 b Ft(horizon)m(tal)32
+b(tab)630 2869 y Fs(\\v)384 b Ft(v)m(ertical)32 b(tab)630
+3025 y Fs(\\\\)384 b Ft(bac)m(kslash)630 3181 y Fs(\\0)p
+Fi(nnn)240 b Ft(the)32 b(eigh)m(t-bit)i(c)m(haracter)g(whose)e(v)-5
+b(alue)33 b(is)f(the)g(o)s(ctal)i(v)-5 b(alue)32 b Fq(nnn)f
+Ft(\(zero)i(to)1110 3291 y(three)e(o)s(ctal)g(digits\))630
+3447 y Fs(\\x)p Fi(HH)288 b Ft(the)40 b(eigh)m(t-bit)h(c)m(haracter)g
+(whose)e(v)-5 b(alue)39 b(is)h(the)f(hexadecimal)i(v)-5
+b(alue)40 b Fq(HH)1110 3557 y Ft(\(one)31 b(or)f(t)m(w)m(o)i(hex)e
+(digits\))150 3713 y Fs(enable)870 3846 y(enable)46 b([-a])h([-dnps])f
+([-f)g Fi(filename)11 b Fs(])45 b([)p Fi(name)57 b Fs(...)o(])630
+3978 y Ft(Enable)36 b(and)f(disable)h(builtin)g(shell)g(commands.)56
+b(Disabling)37 b(a)g(builtin)e(allo)m(ws)i(a)f(disk)630
+4088 y(command)e(whic)m(h)g(has)g(the)g(same)h(name)f(as)h(a)f(shell)h
+(builtin)e(to)i(b)s(e)f(executed)h(without)630 4198 y(sp)s(ecifying)27
+b(a)g(full)g(pathname,)g(ev)m(en)h(though)f(the)g(shell)g(normally)g
+(searc)m(hes)h(for)f(builtins)630 4307 y(b)s(efore)32
+b(disk)f(commands.)46 b(If)31 b(`)p Fs(-n)p Ft(')h(is)g(used,)g(the)g
+Fq(name)5 b Ft(s)32 b(b)s(ecome)h(disabled.)45 b(Otherwise)630
+4417 y Fq(name)5 b Ft(s)44 b(are)h(enabled.)82 b(F)-8
+b(or)45 b(example,)k(to)c(use)f(the)g Fs(test)f Ft(binary)h(found)f
+(via)h Fs($PATH)630 4526 y Ft(instead)31 b(of)f(the)h(shell)f(builtin)g
+(v)m(ersion,)h(t)m(yp)s(e)g(`)p Fs(enable)e(-n)h(test)p
+Ft('.)630 4659 y(If)42 b(the)h(`)p Fs(-p)p Ft(')f(option)h(is)f
+(supplied,)j(or)d(no)h Fq(name)k Ft(argumen)m(ts)c(app)s(ear,)i(a)e
+(list)g(of)g(shell)630 4769 y(builtins)37 b(is)h(prin)m(ted.)63
+b(With)38 b(no)f(other)h(argumen)m(ts,)j(the)d(list)g(consists)g(of)g
+(all)h(enabled)630 4878 y(shell)33 b(builtins.)46 b(The)32
+b(`)p Fs(-a)p Ft(')h(option)g(means)f(to)i(list)f(eac)m(h)h(builtin)e
+(with)g(an)g(indication)i(of)630 4988 y(whether)c(or)g(not)h(it)g(is)f
+(enabled.)630 5121 y(The)40 b(`)p Fs(-f)p Ft(')g(option)g(means)g(to)h
+(load)g(the)f(new)f(builtin)h(command)g Fq(name)45 b
+Ft(from)40 b(shared)630 5230 y(ob)5 b(ject)26 b Fq(\014lename)5
+b Ft(,)28 b(on)d(systems)h(that)g(supp)s(ort)e(dynamic)h(loading.)40
+b(The)25 b(`)p Fs(-d)p Ft(')h(option)g(will)630 5340
+y(delete)32 b(a)e(builtin)g(loaded)h(with)f(`)p Fs(-f)p
+Ft('.)p eop end
+%%Page: 46 52
+TeXDict begin 46 51 bop 150 -116 a Ft(46)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y(If)g(there)g(are)g(no)g(options,)h(a)
+f(list)h(of)f(the)g(shell)g(builtins)g(is)g(displa)m(y)m(ed.)43
+b(The)31 b(`)p Fs(-s)p Ft(')f(option)630 408 y(restricts)f
+Fs(enable)e Ft(to)i(the)f Fl(posix)g Ft(sp)s(ecial)h(builtins.)40
+b(If)27 b(`)p Fs(-s)p Ft(')i(is)f(used)g(with)g(`)p Fs(-f)p
+Ft(',)h(the)f(new)630 518 y(builtin)i(b)s(ecomes)h(a)f(sp)s(ecial)h
+(builtin)f(\(see)i(Section)f(4.4)g([Sp)s(ecial)g(Builtins],)g(page)g
+(59\).)630 650 y(The)26 b(return)f(status)h(is)g(zero)h(unless)e(a)i
+Fq(name)k Ft(is)26 b(not)g(a)h(shell)f(builtin)g(or)g(there)g(is)g(an)g
+(error)630 760 y(loading)31 b(a)g(new)f(builtin)g(from)g(a)g(shared)g
+(ob)5 b(ject.)150 915 y Fs(help)870 1047 y(help)47 b([-dms])f([)p
+Fi(pattern)11 b Fs(])630 1179 y Ft(Displa)m(y)40 b(helpful)e
+(information)h(ab)s(out)g(builtin)f(commands.)66 b(If)38
+b Fq(pattern)h Ft(is)g(sp)s(eci\014ed,)630 1288 y Fs(help)28
+b Ft(giv)m(es)i(detailed)g(help)e(on)h(all)h(commands)e(matc)m(hing)i
+Fq(pattern)p Ft(,)g(otherwise)f(a)g(list)h(of)630 1398
+y(the)h(builtins)e(is)i(prin)m(ted.)630 1530 y(Options,)f(if)h
+(supplied,)e(ha)m(v)m(e)i(the)g(follo)m(wing)h(meanings:)630
+1685 y Fs(-d)384 b Ft(Displa)m(y)32 b(a)e(short)g(description)h(of)f
+(eac)m(h)i Fq(pattern)630 1840 y Fs(-m)384 b Ft(Displa)m(y)32
+b(the)e(description)g(of)h(eac)m(h)h Fq(pattern)e Ft(in)g(a)h
+(manpage-lik)m(e)h(format)630 1994 y Fs(-s)384 b Ft(Displa)m(y)32
+b(only)e(a)h(short)f(usage)h(synopsis)e(for)i(eac)m(h)g
+Fq(pattern)630 2149 y Ft(The)f(return)f(status)i(is)f(zero)h(unless)f
+(no)g(command)h(matc)m(hes)g Fq(pattern)p Ft(.)150 2304
+y Fs(let)870 2436 y(let)47 b Fi(expression)55 b Fs([)p
+Fi(expression)11 b Fs(])630 2568 y Ft(The)41 b Fs(let)g
+Ft(builtin)g(allo)m(ws)i(arithmetic)f(to)h(b)s(e)d(p)s(erformed)g(on)i
+(shell)g(v)-5 b(ariables.)74 b(Eac)m(h)630 2678 y Fq(expression)31
+b Ft(is)g(ev)-5 b(aluated)32 b(according)f(to)h(the)f(rules)g(giv)m(en)
+h(b)s(elo)m(w)f(in)f(Section)i(6.5)g([Shell)630 2787
+y(Arithmetic],)51 b(page)46 b(78.)87 b(If)45 b(the)g(last)h
+Fq(expression)g Ft(ev)-5 b(aluates)47 b(to)f(0,)k Fs(let)44
+b Ft(returns)g(1;)630 2897 y(otherwise)31 b(0)g(is)f(returned.)150
+3051 y Fs(local)870 3184 y(local)46 b([)p Fi(option)11
+b Fs(])45 b Fi(name)11 b Fs([=)p Fi(value)g Fs(])44 b(...)630
+3316 y Ft(F)-8 b(or)26 b(eac)m(h)h(argumen)m(t,)g(a)e(lo)s(cal)i(v)-5
+b(ariable)26 b(named)f Fq(name)31 b Ft(is)25 b(created,)j(and)d
+(assigned)g Fq(v)-5 b(alue)5 b Ft(.)630 3425 y(The)37
+b Fq(option)h Ft(can)f(b)s(e)g(an)m(y)h(of)f(the)h(options)g(accepted)g
+(b)m(y)g Fs(declare)p Ft(.)59 b Fs(local)36 b Ft(can)i(only)630
+3535 y(b)s(e)j(used)h(within)f(a)i(function;)48 b(it)42
+b(mak)m(es)h(the)f(v)-5 b(ariable)43 b Fq(name)48 b Ft(ha)m(v)m(e)43
+b(a)f(visible)h(scop)s(e)630 3645 y(restricted)c(to)g(that)g(function)f
+(and)f(its)i(c)m(hildren.)64 b(The)38 b(return)f(status)h(is)h(zero)g
+(unless)630 3754 y Fs(local)g Ft(is)h(used)g(outside)g(a)h(function,)h
+(an)e(in)m(v)-5 b(alid)41 b Fq(name)46 b Ft(is)40 b(supplied,)i(or)e
+Fq(name)45 b Ft(is)c(a)630 3864 y(readonly)30 b(v)-5
+b(ariable.)150 4018 y Fs(logout)870 4151 y(logout)46
+b([)p Fi(n)11 b Fs(])630 4283 y Ft(Exit)31 b(a)g(login)g(shell,)g
+(returning)e(a)i(status)g(of)f Fq(n)g Ft(to)h(the)g(shell's)f(paren)m
+(t.)150 4437 y Fs(mapfile)870 4570 y(mapfile)46 b([-n)h
+Fi(count)11 b Fs(])45 b([-O)i Fi(origin)11 b Fs(])46
+b([-s)g Fi(count)11 b Fs(])46 b([-t])h([-u)g Fi(fd)11
+b Fs(])46 b([)870 4679 y(-C)h Fi(callback)11 b Fs(])45
+b([-c)i Fi(quantum)11 b Fs(])45 b([)p Fi(array)11 b Fs(])630
+4811 y Ft(Read)37 b(lines)g(from)f(the)h(standard)f(input)g(in)m(to)h
+(the)g(indexed)f(arra)m(y)i(v)-5 b(ariable)37 b Fq(arra)m(y)8
+b Ft(,)39 b(or)630 4921 y(from)c(\014le)h(descriptor)g
+Fq(fd)j Ft(if)d(the)g(`)p Fs(-u)p Ft(')g(option)g(is)g(supplied.)56
+b(The)35 b(v)-5 b(ariable)37 b Fs(MAPFILE)d Ft(is)630
+5031 y(the)d(default)f Fq(arra)m(y)8 b Ft(.)41 b(Options,)30
+b(if)h(supplied,)e(ha)m(v)m(e)j(the)e(follo)m(wing)i(meanings:)630
+5185 y Fs(-n)384 b Ft(Cop)m(y)30 b(at)h(most)g Fq(coun)m(t)i
+Ft(lines.)41 b(If)30 b Fq(coun)m(t)j Ft(is)d(0,)h(all)h(lines)e(are)h
+(copied.)630 5340 y Fs(-O)384 b Ft(Begin)31 b(assigning)g(to)g
+Fq(arra)m(y)39 b Ft(at)31 b(index)f Fq(origin)p Ft(.)41
+b(The)30 b(default)h(index)f(is)g(0.)p eop end
+%%Page: 47 53
+TeXDict begin 47 52 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(47)630 299 y Fs(-s)384
+b Ft(Discard)31 b(the)f(\014rst)g Fq(coun)m(t)j Ft(lines)e(read.)630
+458 y Fs(-t)384 b Ft(Remo)m(v)m(e)32 b(a)f(trailing)g(newline)g(from)f
+(eac)m(h)h(line)g(read.)630 618 y Fs(-u)384 b Ft(Read)31
+b(lines)f(from)g(\014le)h(descriptor)f Fq(fd)j Ft(instead)e(of)f(the)h
+(standard)e(input.)630 777 y Fs(-C)384 b Ft(Ev)-5 b(aluate)43
+b Fq(callbac)m(k)49 b Ft(eac)m(h)42 b(time)g Fq(quan)m(tum)p
+Ft(P)f(lines)h(are)f(read.)74 b(The)41 b(`)p Fs(-c)p
+Ft(')1110 887 y(option)31 b(sp)s(eci\014es)f Fq(quan)m(tum)p
+Ft(.)630 1046 y Fs(-c)384 b Ft(Sp)s(ecify)30 b(the)g(n)m(um)m(b)s(er)f
+(of)i(lines)f(read)h(b)s(et)m(w)m(een)g(eac)m(h)g(call)h(to)f
+Fq(callbac)m(k)6 b Ft(.)630 1205 y(If)29 b(`)p Fs(-C)p
+Ft(')g(is)h(sp)s(eci\014ed)f(without)g(`)p Fs(-c)p Ft(',)h(the)g
+(default)g(quan)m(tum)f(is)g(5000.)42 b(When)30 b Fq(callbac)m(k)37
+b Ft(is)630 1315 y(ev)-5 b(aluated,)35 b(it)e(is)f(supplied)g(the)g
+(index)g(of)h(the)g(next)g(arra)m(y)g(elemen)m(t)h(to)f(b)s(e)f
+(assigned)h(as)630 1425 y(an)f(additional)h(argumen)m(t.)46
+b Fq(callbac)m(k)40 b Ft(is)32 b(ev)-5 b(aluated)33 b(after)g(the)f
+(line)h(is)f(read)g(but)f(b)s(efore)630 1534 y(the)g(arra)m(y)f(elemen)
+m(t)i(is)f(assigned.)630 1669 y(If)25 b(not)g(supplied)f(with)h(an)g
+(explicit)i(origin,)g Fs(mapfile)c Ft(will)j(clear)g
+Fq(arra)m(y)34 b Ft(b)s(efore)24 b(assigning)630 1778
+y(to)31 b(it.)630 1913 y Fs(mapfile)41 b Ft(returns)g(successfully)i
+(unless)e(an)i(in)m(v)-5 b(alid)43 b(option)g(or)g(option)g(argumen)m
+(t)g(is)630 2022 y(supplied,)29 b Fq(arra)m(y)39 b Ft(is)30
+b(in)m(v)-5 b(alid)31 b(or)g(unassignable,)f(or)h Fq(arra)m(y)38
+b Ft(is)31 b(not)f(an)h(indexed)e(arra)m(y)-8 b(.)150
+2182 y Fs(printf)870 2316 y(printf)46 b([-v)h Fi(var)11
+b Fs(])46 b Fi(format)57 b Fs([)p Fi(arguments)11 b Fs(])630
+2451 y Ft(W)-8 b(rite)27 b(the)g(formatted)f Fq(argumen)m(ts)k
+Ft(to)d(the)f(standard)f(output)h(under)e(the)i(con)m(trol)i(of)e(the)
+630 2560 y Fq(format)r Ft(.)40 b(The)29 b Fq(format)i
+Ft(is)d(a)h(c)m(haracter)i(string)d(whic)m(h)h(con)m(tains)h(three)e(t)
+m(yp)s(es)h(of)g(ob)5 b(jects:)630 2670 y(plain)28 b(c)m(haracters,)j
+(whic)m(h)d(are)h(simply)f(copied)h(to)h(standard)d(output,)i(c)m
+(haracter)h(escap)s(e)630 2780 y(sequences,)g(whic)m(h)f(are)g(con)m(v)
+m(erted)i(and)d(copied)i(to)f(the)h(standard)e(output,)h(and)g(format)
+630 2889 y(sp)s(eci\014cations,)38 b(eac)m(h)g(of)e(whic)m(h)g(causes)g
+(prin)m(ting)g(of)g(the)h(next)f(successiv)m(e)h Fq(argumen)m(t)r
+Ft(.)630 2999 y(In)31 b(addition)h(to)h(the)e(standard)g
+Fs(printf\(1\))f Ft(formats,)i(`)p Fs(\045b)p Ft(')g(causes)g
+Fs(printf)e Ft(to)j(expand)630 3108 y(bac)m(kslash)39
+b(escap)s(e)f(sequences)h(in)f(the)g(corresp)s(onding)f
+Fq(argumen)m(t)r Ft(,)k(\(except)e(that)g(`)p Fs(\\c)p
+Ft(')630 3218 y(terminates)44 b(output,)j(bac)m(kslashes)d(in)f(`)p
+Fs(\\')p Ft(',)k(`)p Fs(\\")p Ft(',)g(and)c(`)p Fs(\\?)p
+Ft(')g(are)h(not)g(remo)m(v)m(ed,)k(and)630 3328 y(o)s(ctal)25
+b(escap)s(es)f(b)s(eginning)f(with)g(`)p Fs(\\0)p Ft(')h(ma)m(y)g(con)m
+(tain)h(up)e(to)h(four)f(digits\),)j(and)d(`)p Fs(\045q)p
+Ft(')h(causes)630 3437 y Fs(printf)31 b Ft(to)i(output)f(the)h(corresp)
+s(onding)f Fq(argumen)m(t)j Ft(in)d(a)h(format)g(that)g(can)g(b)s(e)f
+(reused)630 3547 y(as)f(shell)f(input.)630 3681 y(The)24
+b(`)p Fs(-v)p Ft(')h(option)g(causes)g(the)g(output)g(to)g(b)s(e)f
+(assigned)h(to)h(the)f(v)-5 b(ariable)25 b Fq(v)-5 b(ar)32
+b Ft(rather)24 b(than)630 3791 y(b)s(eing)30 b(prin)m(ted)g(to)h(the)g
+(standard)e(output.)630 3925 y(The)i Fq(format)i Ft(is)e(reused)f(as)i
+(necessary)f(to)h(consume)f(all)h(of)f(the)g Fq(argumen)m(ts)t
+Ft(.)43 b(If)31 b(the)g Fq(for-)630 4035 y(mat)d Ft(requires)e(more)g
+Fq(argumen)m(ts)k Ft(than)25 b(are)i(supplied,)e(the)h(extra)h(format)f
+(sp)s(eci\014cations)630 4144 y(b)s(eha)m(v)m(e)j(as)g(if)f(a)h(zero)g
+(v)-5 b(alue)29 b(or)g(n)m(ull)f(string,)h(as)g(appropriate,)g(had)f(b)
+s(een)g(supplied.)38 b(The)630 4254 y(return)29 b(v)-5
+b(alue)31 b(is)g(zero)g(on)f(success,)h(non-zero)g(on)f(failure.)150
+4413 y Fs(read)870 4548 y(read)47 b([-ers])f([-a)h Fi(aname)11
+b Fs(])45 b([-d)i Fi(delim)11 b Fs(])46 b([-i)h Fi(text)11
+b Fs(])46 b([-n)g Fi(nchars)11 b Fs(])46 b([-N)h Fi(nchars)11
+b Fs(])45 b([-p)i Fi(prompt)11 b Fs(])45 b([-t)i Fi(time-)870
+4658 y(out)11 b Fs(])46 b([-u)h Fi(fd)11 b Fs(])46 b([)p
+Fi(name)57 b Fs(...])630 4792 y Ft(One)26 b(line)h(is)g(read)f(from)h
+(the)f(standard)g(input,)h(or)g(from)f(the)h(\014le)f(descriptor)h
+Fq(fd)i Ft(supplied)630 4902 y(as)37 b(an)g(argumen)m(t)h(to)f(the)h(`)
+p Fs(-u)p Ft(')e(option,)k(and)c(the)i(\014rst)e(w)m(ord)g(is)h
+(assigned)h(to)f(the)h(\014rst)630 5011 y Fq(name)5 b
+Ft(,)28 b(the)g(second)g(w)m(ord)f(to)h(the)f(second)h
+Fq(name)5 b Ft(,)28 b(and)f(so)h(on,)g(with)f(lefto)m(v)m(er)j(w)m
+(ords)d(and)630 5121 y(their)h(in)m(terv)m(ening)g(separators)g
+(assigned)g(to)h(the)e(last)i Fq(name)5 b Ft(.)40 b(If)27
+b(there)h(are)g(few)m(er)f(w)m(ords)630 5230 y(read)44
+b(from)f(the)g(input)g(stream)h(than)g(names,)j(the)c(remaining)h
+(names)g(are)g(assigned)630 5340 y(empt)m(y)31 b(v)-5
+b(alues.)41 b(The)30 b(c)m(haracters)i(in)e(the)h(v)-5
+b(alue)31 b(of)g(the)f Fs(IFS)g Ft(v)-5 b(ariable)31
+b(are)g(used)f(to)h(split)p eop end
+%%Page: 48 54
+TeXDict begin 48 53 bop 150 -116 a Ft(48)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y(the)37 b(line)h(in)m(to)g(w)m(ords.)
+61 b(The)36 b(bac)m(kslash)i(c)m(haracter)h(`)p Fs(\\)p
+Ft(')e(ma)m(y)h(b)s(e)f(used)f(to)i(remo)m(v)m(e)h(an)m(y)630
+408 y(sp)s(ecial)h(meaning)g(for)f(the)g(next)h(c)m(haracter)h(read)e
+(and)g(for)g(line)h(con)m(tin)m(uation.)69 b(If)39 b(no)630
+518 y(names)28 b(are)h(supplied,)f(the)g(line)h(read)g(is)f(assigned)h
+(to)g(the)f(v)-5 b(ariable)29 b Fs(REPLY)p Ft(.)39 b(The)28
+b(return)630 628 y(co)s(de)e(is)g(zero,)h(unless)e(end-of-\014le)h(is)g
+(encoun)m(tered,)h Fs(read)e Ft(times)h(out)g(\(in)g(whic)m(h)f(case)i
+(the)630 737 y(return)i(co)s(de)i(is)g(greater)g(than)g(128\),)h(or)f
+(an)f(in)m(v)-5 b(alid)31 b(\014le)g(descriptor)f(is)h(supplied)e(as)i
+(the)630 847 y(argumen)m(t)g(to)g(`)p Fs(-u)p Ft('.)630
+983 y(Options,)f(if)h(supplied,)e(ha)m(v)m(e)i(the)g(follo)m(wing)h
+(meanings:)630 1144 y Fs(-a)e Fi(aname)114 b Ft(The)34
+b(w)m(ords)f(are)i(assigned)f(to)h(sequen)m(tial)h(indices)e(of)g(the)g
+(arra)m(y)h(v)-5 b(ariable)1110 1254 y Fq(aname)5 b Ft(,)29
+b(starting)g(at)f(0.)40 b(All)29 b(elemen)m(ts)g(are)f(remo)m(v)m(ed)h
+(from)e Fq(aname)33 b Ft(b)s(efore)1110 1363 y(the)e(assignmen)m(t.)41
+b(Other)30 b Fq(name)36 b Ft(argumen)m(ts)30 b(are)h(ignored.)630
+1525 y Fs(-d)f Fi(delim)114 b Ft(The)41 b(\014rst)h(c)m(haracter)h(of)f
+Fq(delim)g Ft(is)g(used)g(to)g(terminate)h(the)f(input)f(line,)1110
+1635 y(rather)30 b(than)g(newline.)630 1797 y Fs(-e)384
+b Ft(Readline)28 b(\(see)h(Chapter)e(8)h([Command)f(Line)g(Editing],)i
+(page)f(93\))h(is)f(used)1110 1906 y(to)42 b(obtain)f(the)g(line.)73
+b(Readline)41 b(uses)g(the)g(curren)m(t)g(\(or)g(default,)j(if)d(line)
+1110 2016 y(editing)31 b(w)m(as)g(not)f(previously)g(activ)m(e\))j
+(editing)f(settings.)630 2178 y Fs(-i)e Fi(text)162 b
+Ft(If)36 b(Readline)i(is)f(b)s(eing)g(used)f(to)h(read)g(the)g(line,)j
+Fq(text)f Ft(is)e(placed)h(in)m(to)g(the)1110 2287 y(editing)31
+b(bu\013er)e(b)s(efore)h(editing)h(b)s(egins.)630 2449
+y Fs(-n)f Fi(nchars)1110 2559 y Fs(read)38 b Ft(returns)f(after)j
+(reading)f Fq(nc)m(hars)j Ft(c)m(haracters)e(rather)f(than)g(w)m
+(aiting)1110 2668 y(for)g(a)h(complete)h(line)f(of)f(input,)i(but)e
+(honor)g(a)h(delimiter)g(if)f(few)m(er)h(than)1110 2778
+y Fq(nc)m(hars)34 b Ft(c)m(haracters)e(are)e(read)h(b)s(efore)f(the)g
+(delimiter.)630 2939 y Fs(-N)g Fi(nchars)1110 3049 y
+Fs(read)39 b Ft(returns)f(after)j(reading)e(exactly)j
+Fq(nc)m(hars)h Ft(c)m(haracters)f(rather)d(than)1110
+3159 y(w)m(aiting)32 b(for)f(a)g(complete)i(line)e(of)g(input,)g
+(unless)f(EOF)h(is)g(encoun)m(tered)g(or)1110 3268 y
+Fs(read)f Ft(times)i(out.)43 b(Delimiter)33 b(c)m(haracters)f(encoun)m
+(tered)g(in)f(the)g(input)g(are)1110 3378 y(not)g(treated)h(sp)s
+(ecially)g(and)f(do)f(not)i(cause)f Fs(read)f Ft(to)i(return)e(un)m
+(til)h Fq(nc)m(hars)1110 3487 y Ft(c)m(haracters)h(are)f(read.)630
+3649 y Fs(-p)f Fi(prompt)1110 3759 y Ft(Displa)m(y)38
+b Fq(prompt)r Ft(,)f(without)g(a)f(trailing)i(newline,)g(b)s(efore)e
+(attempting)i(to)1110 3868 y(read)f(an)m(y)h(input.)60
+b(The)37 b(prompt)g(is)g(displa)m(y)m(ed)h(only)f(if)g(input)g(is)g
+(coming)1110 3978 y(from)30 b(a)h(terminal.)630 4140
+y Fs(-r)384 b Ft(If)21 b(this)h(option)g(is)f(giv)m(en,)k(bac)m(kslash)
+d(do)s(es)f(not)h(act)h(as)f(an)f(escap)s(e)h(c)m(haracter.)1110
+4249 y(The)30 b(bac)m(kslash)i(is)f(considered)g(to)h(b)s(e)e(part)h
+(of)g(the)g(line.)43 b(In)30 b(particular,)i(a)1110 4359
+y(bac)m(kslash-newline)f(pair)f(ma)m(y)h(not)g(b)s(e)f(used)f(as)i(a)g
+(line)f(con)m(tin)m(uation.)630 4521 y Fs(-s)384 b Ft(Silen)m(t)28
+b(mo)s(de.)40 b(If)27 b(input)f(is)i(coming)g(from)f(a)h(terminal,)h(c)
+m(haracters)g(are)f(not)1110 4630 y(ec)m(ho)s(ed.)630
+4792 y Fs(-t)i Fi(timeout)1110 4902 y Ft(Cause)23 b Fs(read)f
+Ft(to)i(time)f(out)h(and)e(return)g(failure)h(if)g(a)h(complete)g(line)
+g(of)f(input)1110 5011 y(is)44 b(not)f(read)h(within)e
+Fq(timeout)47 b Ft(seconds.)80 b Fq(timeout)46 b Ft(ma)m(y)e(b)s(e)f(a)
+h(decimal)1110 5121 y(n)m(um)m(b)s(er)26 b(with)h(a)h(fractional)h(p)s
+(ortion)d(follo)m(wing)j(the)f(decimal)g(p)s(oin)m(t.)40
+b(This)1110 5230 y(option)g(is)g(only)g(e\013ectiv)m(e)j(if)c
+Fs(read)g Ft(is)h(reading)g(input)f(from)g(a)h(terminal,)1110
+5340 y(pip)s(e,)25 b(or)e(other)i(sp)s(ecial)f(\014le;)i(it)f(has)e(no)
+h(e\013ect)h(when)e(reading)h(from)g(regular)p eop end
+%%Page: 49 55
+TeXDict begin 49 54 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(49)1110 299 y(\014les.)55
+b(If)34 b Fq(timeout)k Ft(is)d(0,)i Fs(read)d Ft(returns)g(success)h
+(if)g(input)g(is)g(a)m(v)-5 b(ailable)37 b(on)1110 408
+y(the)j(sp)s(eci\014ed)f(\014le)g(descriptor,)j(failure)e(otherwise.)69
+b(The)39 b(exit)h(status)g(is)1110 518 y(greater)32 b(than)e(128)h(if)g
+(the)f(timeout)i(is)e(exceeded.)630 682 y Fs(-u)g Fi(fd)258
+b Ft(Read)31 b(input)e(from)h(\014le)g(descriptor)h Fq(fd)t
+Ft(.)150 847 y Fs(readarray)870 956 y(readarray)45 b([-n)i
+Fi(count)11 b Fs(])46 b([-O)h Fi(origin)11 b Fs(])45
+b([-s)i Fi(count)11 b Fs(])46 b([-t])g([-u)h Fi(fd)11
+b Fs(])47 b([)870 1066 y(-C)g Fi(callback)11 b Fs(])45
+b([-c)i Fi(quantum)11 b Fs(])45 b([)p Fi(array)11 b Fs(])630
+1203 y Ft(Read)37 b(lines)g(from)f(the)h(standard)f(input)g(in)m(to)h
+(the)g(indexed)f(arra)m(y)i(v)-5 b(ariable)37 b Fq(arra)m(y)8
+b Ft(,)39 b(or)630 1313 y(from)30 b(\014le)g(descriptor)h
+Fq(fd)i Ft(if)d(the)h(`)p Fs(-u)p Ft(')f(option)h(is)f(supplied.)630
+1450 y(A)g(synon)m(ym)g(for)g Fs(mapfile)p Ft(.)150 1614
+y Fs(source)870 1751 y(source)46 b Fi(filename)630 1888
+y Ft(A)30 b(synon)m(ym)g(for)g Fs(.)g Ft(\(see)i(Section)f(4.1)g
+([Bourne)g(Shell)f(Builtins],)h(page)g(35\).)150 2052
+y Fs(type)870 2189 y(type)47 b([-afptP])e([)p Fi(name)57
+b Fs(...)o(])630 2326 y Ft(F)-8 b(or)41 b(eac)m(h)h Fq(name)5
+b Ft(,)44 b(indicate)e(ho)m(w)f(it)g(w)m(ould)f(b)s(e)g(in)m(terpreted)
+h(if)g(used)f(as)h(a)g(command)630 2436 y(name.)630 2573
+y(If)d(the)g(`)p Fs(-t)p Ft(')g(option)g(is)g(used,)i
+Fs(type)d Ft(prin)m(ts)g(a)i(single)f(w)m(ord)g(whic)m(h)g(is)g(one)g
+(of)h(`)p Fs(alias)p Ft(',)630 2682 y(`)p Fs(function)p
+Ft(',)32 b(`)p Fs(builtin)p Ft(',)g(`)p Fs(file)p Ft(')g(or)h(`)p
+Fs(keyword)p Ft(',)f(if)h Fq(name)38 b Ft(is)33 b(an)f(alias,)j(shell)e
+(function,)630 2792 y(shell)i(builtin,)g(disk)g(\014le,)h(or)e(shell)h
+(reserv)m(ed)g(w)m(ord,)h(resp)s(ectiv)m(ely)-8 b(.)55
+b(If)34 b(the)h Fq(name)40 b Ft(is)35 b(not)630 2902
+y(found,)29 b(then)h(nothing)h(is)f(prin)m(ted,)g(and)g
+Fs(type)f Ft(returns)g(a)i(failure)g(status.)630 3039
+y(If)39 b(the)g(`)p Fs(-p)p Ft(')g(option)h(is)f(used,)i
+Fs(type)d Ft(either)h(returns)f(the)i(name)f(of)g(the)g(disk)g(\014le)g
+(that)630 3148 y(w)m(ould)30 b(b)s(e)g(executed,)h(or)g(nothing)f(if)g
+(`)p Fs(-t)p Ft(')h(w)m(ould)f(not)g(return)g(`)p Fs(file)p
+Ft('.)630 3285 y(The)23 b(`)p Fs(-P)p Ft(')g(option)h(forces)g(a)g
+(path)f(searc)m(h)h(for)f(eac)m(h)h Fq(name)5 b Ft(,)26
+b(ev)m(en)e(if)f(`)p Fs(-t)p Ft(')g(w)m(ould)g(not)h(return)630
+3395 y(`)p Fs(file)p Ft('.)630 3532 y(If)34 b(a)i(command)e(is)h
+(hashed,)g(`)p Fs(-p)p Ft(')g(and)f(`)p Fs(-P)p Ft(')h(prin)m(t)f(the)h
+(hashed)f(v)-5 b(alue,)37 b(not)e(necessarily)630 3641
+y(the)c(\014le)f(that)h(app)s(ears)f(\014rst)f(in)h Fs($PATH)p
+Ft(.)630 3778 y(If)36 b(the)h(`)p Fs(-a)p Ft(')g(option)g(is)g(used,)g
+Fs(type)f Ft(returns)f(all)j(of)f(the)g(places)g(that)g(con)m(tain)h
+(an)f(exe-)630 3888 y(cutable)d(named)f Fq(\014le)5 b
+Ft(.)49 b(This)32 b(includes)h(aliases)i(and)d(functions,)i(if)f(and)f
+(only)i(if)f(the)g(`)p Fs(-p)p Ft(')630 3998 y(option)e(is)f(not)h
+(also)g(used.)630 4134 y(If)26 b(the)h(`)p Fs(-f)p Ft(')g(option)g(is)g
+(used,)g Fs(type)e Ft(do)s(es)i(not)g(attempt)g(to)h(\014nd)d(shell)i
+(functions,)g(as)g(with)630 4244 y(the)k Fs(command)d
+Ft(builtin.)630 4381 y(The)j(return)f(status)h(is)g(zero)h(if)f(all)h
+(of)f(the)h Fq(names)i Ft(are)e(found,)e(non-zero)i(if)f(an)m(y)g(are)h
+(not)630 4491 y(found.)150 4655 y Fs(typeset)870 4792
+y(typeset)46 b([-afFrxi])f([-p])i([)p Fi(name)11 b Fs([=)p
+Fi(value)g Fs(])43 b(...)o(])630 4929 y Ft(The)29 b Fs(typeset)f
+Ft(command)h(is)g(supplied)g(for)g(compatibilit)m(y)j(with)d(the)h
+(Korn)e(shell;)j(ho)m(w-)630 5039 y(ev)m(er,)g(it)g(has)f(b)s(een)g
+(deprecated)h(in)f(fa)m(v)m(or)i(of)e(the)h Fs(declare)d
+Ft(builtin)i(command.)150 5203 y Fs(ulimit)870 5340 y(ulimit)46
+b([-abcdefilmnpqrstuvxHST])41 b([)p Fi(limit)11 b Fs(])p
+eop end
+%%Page: 50 56
+TeXDict begin 50 55 bop 150 -116 a Ft(50)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y Fs(ulimit)25 b Ft(pro)m(vides)h(con)m
+(trol)i(o)m(v)m(er)g(the)f(resources)f(a)m(v)-5 b(ailable)29
+b(to)e(pro)s(cesses)f(started)h(b)m(y)g(the)630 408 y(shell,)i(on)f
+(systems)g(that)h(allo)m(w)h(suc)m(h)e(con)m(trol.)41
+b(If)28 b(an)g(option)h(is)f(giv)m(en,)i(it)e(is)h(in)m(terpreted)630
+518 y(as)i(follo)m(ws:)630 671 y Fs(-S)384 b Ft(Change)30
+b(and)g(rep)s(ort)g(the)g(soft)h(limit)g(asso)s(ciated)h(with)e(a)h
+(resource.)630 825 y Fs(-H)384 b Ft(Change)30 b(and)g(rep)s(ort)g(the)g
+(hard)g(limit)h(asso)s(ciated)h(with)e(a)h(resource.)630
+978 y Fs(-a)384 b Ft(All)31 b(curren)m(t)f(limits)h(are)g(rep)s(orted.)
+630 1132 y Fs(-b)384 b Ft(The)30 b(maxim)m(um)g(so)s(c)m(k)m(et)i
+(bu\013er)e(size.)630 1285 y Fs(-c)384 b Ft(The)30 b(maxim)m(um)g(size)
+h(of)g(core)g(\014les)f(created.)630 1439 y Fs(-d)384
+b Ft(The)30 b(maxim)m(um)g(size)h(of)g(a)g(pro)s(cess's)f(data)h
+(segmen)m(t.)630 1592 y Fs(-e)384 b Ft(The)30 b(maxim)m(um)g(sc)m
+(heduling)h(priorit)m(y)f(\()p Fs(")p Ft(nice)p Fs(")p
+Ft(\).)630 1745 y Fs(-f)384 b Ft(The)30 b(maxim)m(um)g(size)h(of)g
+(\014les)f(written)h(b)m(y)f(the)g(shell)h(and)f(its)h(c)m(hildren.)630
+1899 y Fs(-i)384 b Ft(The)30 b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i(p)s
+(ending)e(signals.)630 2052 y Fs(-l)384 b Ft(The)30 b(maxim)m(um)g
+(size)h(that)g(ma)m(y)g(b)s(e)f(lo)s(c)m(k)m(ed)i(in)m(to)f(memory)-8
+b(.)630 2206 y Fs(-m)384 b Ft(The)36 b(maxim)m(um)g(residen)m(t)h(set)g
+(size)g(\(man)m(y)g(systems)f(do)h(not)f(honor)g(this)1110
+2315 y(limit\).)630 2469 y Fs(-n)384 b Ft(The)38 b(maxim)m(um)h(n)m(um)
+m(b)s(er)e(of)i(op)s(en)f(\014le)h(descriptors)g(\(most)g(systems)g(do)
+1110 2578 y(not)31 b(allo)m(w)g(this)g(v)-5 b(alue)31
+b(to)g(b)s(e)e(set\).)630 2732 y Fs(-p)384 b Ft(The)30
+b(pip)s(e)f(bu\013er)h(size.)630 2885 y Fs(-q)384 b Ft(The)30
+b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i(b)m(ytes)g(in)f(POSIX)f(message)j
+(queues.)630 3039 y Fs(-r)384 b Ft(The)30 b(maxim)m(um)g(real-time)i
+(sc)m(heduling)f(priorit)m(y)-8 b(.)630 3192 y Fs(-s)384
+b Ft(The)30 b(maxim)m(um)g(stac)m(k)i(size.)630 3345
+y Fs(-t)384 b Ft(The)30 b(maxim)m(um)g(amoun)m(t)h(of)f(cpu)g(time)h
+(in)f(seconds.)630 3499 y Fs(-u)384 b Ft(The)30 b(maxim)m(um)g(n)m(um)m
+(b)s(er)f(of)i(pro)s(cesses)f(a)m(v)-5 b(ailable)33 b(to)e(a)f(single)i
+(user.)630 3652 y Fs(-v)384 b Ft(The)29 b(maxim)m(um)h(amoun)m(t)g(of)g
+(virtual)g(memory)g(a)m(v)-5 b(ailable)32 b(to)e(the)g(pro)s(cess.)630
+3806 y Fs(-x)384 b Ft(The)30 b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i
+(\014le)f(lo)s(c)m(ks.)630 3959 y Fs(-T)384 b Ft(The)30
+b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i(threads.)630 4113
+y(If)i Fq(limit)j Ft(is)e(giv)m(en,)h(it)f(is)g(the)g(new)f(v)-5
+b(alue)34 b(of)f(the)h(sp)s(eci\014ed)f(resource;)i(the)f(sp)s(ecial)g
+Fq(limit)630 4222 y Ft(v)-5 b(alues)27 b Fs(hard)p Ft(,)g
+Fs(soft)p Ft(,)g(and)g Fs(unlimited)d Ft(stand)j(for)g(the)g(curren)m
+(t)g(hard)f(limit,)j(the)e(curren)m(t)630 4332 y(soft)38
+b(limit,)j(and)d(no)f(limit,)k(resp)s(ectiv)m(ely)-8
+b(.)66 b(A)38 b(hard)f(limit)h(cannot)h(b)s(e)e(increased)i(b)m(y)f(a)
+630 4441 y(non-ro)s(ot)f(user)f(once)i(it)g(is)f(set;)k(a)c(soft)g
+(limit)h(ma)m(y)g(b)s(e)e(increased)h(up)f(to)i(the)f(v)-5
+b(alue)38 b(of)630 4551 y(the)c(hard)f(limit.)51 b(Otherwise,)35
+b(the)f(curren)m(t)f(v)-5 b(alue)35 b(of)f(the)f(soft)i(limit)f(for)g
+(the)g(sp)s(eci\014ed)630 4661 y(resource)27 b(is)h(prin)m(ted,)f
+(unless)g(the)g(`)p Fs(-H)p Ft(')g(option)h(is)f(supplied.)38
+b(When)27 b(setting)h(new)f(limits,)630 4770 y(if)40
+b(neither)f(`)p Fs(-H)p Ft(')h(nor)f(`)p Fs(-S)p Ft(')h(is)f(supplied,)
+i(b)s(oth)e(the)h(hard)f(and)g(soft)h(limits)g(are)g(set.)69
+b(If)630 4880 y(no)35 b(option)h(is)f(giv)m(en,)j(then)d(`)p
+Fs(-f)p Ft(')g(is)g(assumed.)55 b(V)-8 b(alues)36 b(are)f(in)g(1024-b)m
+(yte)j(incremen)m(ts,)630 4989 y(except)d(for)f(`)p Fs(-t)p
+Ft(',)g(whic)m(h)g(is)g(in)g(seconds,)h(`)p Fs(-p)p Ft(',)g(whic)m(h)e
+(is)h(in)g(units)f(of)h(512-b)m(yte)i(blo)s(c)m(ks,)630
+5099 y(and)30 b(`)p Fs(-n)p Ft(')g(and)g(`)p Fs(-u)p
+Ft(',)g(whic)m(h)g(are)h(unscaled)f(v)-5 b(alues.)630
+5230 y(The)34 b(return)g(status)h(is)f(zero)i(unless)e(an)g(in)m(v)-5
+b(alid)36 b(option)f(or)f(argumen)m(t)i(is)e(supplied,)h(or)630
+5340 y(an)30 b(error)g(o)s(ccurs)g(while)h(setting)g(a)g(new)f(limit.)p
+eop end
+%%Page: 51 57
+TeXDict begin 51 56 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(51)150 299 y Fs(unalias)870
+435 y(unalias)46 b([-a])g([)p Fi(name)57 b Fs(...)47
+b(])630 572 y Ft(Remo)m(v)m(e)39 b(eac)m(h)f Fq(name)k
+Ft(from)36 b(the)h(list)h(of)f(aliases.)61 b(If)36 b(`)p
+Fs(-a)p Ft(')h(is)g(supplied,)h(all)f(aliases)i(are)630
+681 y(remo)m(v)m(ed.)j(Aliases)31 b(are)g(describ)s(ed)e(in)h(Section)i
+(6.6)f([Aliases],)h(page)f(79.)150 919 y Fr(4.3)68 b(Mo)t(difying)45
+b(Shell)g(Beha)l(vior)150 1144 y Fj(4.3.1)63 b(The)41
+b(Set)g(Builtin)150 1290 y Ft(This)35 b(builtin)h(is)g(so)g
+(complicated)i(that)f(it)f(deserv)m(es)h(its)f(o)m(wn)g(section.)59
+b Fs(set)35 b Ft(allo)m(ws)j(y)m(ou)e(to)h(c)m(hange)150
+1400 y(the)c(v)-5 b(alues)34 b(of)f(shell)g(options)h(and)e(set)i(the)f
+(p)s(ositional)h(parameters,)h(or)e(to)h(displa)m(y)f(the)g(names)h
+(and)150 1510 y(v)-5 b(alues)31 b(of)f(shell)h(v)-5 b(ariables.)150
+1675 y Fs(set)870 1811 y(set)47 b([--abefhkmnptuvxBCEHPT])41
+b([-o)47 b Fi(option)11 b Fs(])46 b([)p Fi(argument)55
+b Fs(...])870 1921 y(set)47 b([+abefhkmnptuvxBCEHPT])42
+b([+o)47 b Fi(option)11 b Fs(])45 b([)p Fi(argument)56
+b Fs(...)o(])630 2057 y Ft(If)22 b(no)h(options)g(or)g(argumen)m(ts)g
+(are)g(supplied,)g Fs(set)f Ft(displa)m(ys)g(the)h(names)g(and)f(v)-5
+b(alues)23 b(of)g(all)630 2167 y(shell)j(v)-5 b(ariables)27
+b(and)e(functions,)h(sorted)g(according)h(to)g(the)f(curren)m(t)f(lo)s
+(cale,)k(in)c(a)i(format)630 2276 y(that)i(ma)m(y)h(b)s(e)e(reused)g
+(as)h(input)f(for)h(setting)h(or)e(resetting)i(the)f(curren)m(tly-set)h
+(v)-5 b(ariables.)630 2386 y(Read-only)37 b(v)-5 b(ariables)37
+b(cannot)h(b)s(e)e(reset.)59 b(In)36 b Fl(posix)g Ft(mo)s(de,)i(only)f
+(shell)f(v)-5 b(ariables)38 b(are)630 2495 y(listed.)630
+2632 y(When)29 b(options)g(are)g(supplied,)f(they)h(set)h(or)f(unset)f
+(shell)h(attributes.)41 b(Options,)29 b(if)g(sp)s(ec-)630
+2741 y(i\014ed,)h(ha)m(v)m(e)i(the)e(follo)m(wing)i(meanings:)630
+2905 y Fs(-a)384 b Ft(Mark)32 b(v)-5 b(ariables)33 b(and)e(function)h
+(whic)m(h)g(are)g(mo)s(di\014ed)f(or)h(created)h(for)f(ex-)1110
+3014 y(p)s(ort)e(to)h(the)f(en)m(vironmen)m(t)h(of)g(subsequen)m(t)f
+(commands.)630 3177 y Fs(-b)384 b Ft(Cause)44 b(the)h(status)g(of)f
+(terminated)h(bac)m(kground)g(jobs)f(to)h(b)s(e)f(rep)s(orted)1110
+3287 y(immediately)-8 b(,)30 b(rather)d(than)f(b)s(efore)h(prin)m(ting)
+g(the)g(next)g(primary)g(prompt.)630 3450 y Fs(-e)384
+b Ft(Exit)65 b(immediately)g(if)f(a)h(pip)s(eline)e(\(see)i(Section)g
+(3.2.2)h([Pip)s(elines],)1110 3560 y(page)56 b(8\),)62
+b(whic)m(h)55 b(ma)m(y)h(consist)f(of)h(a)f(single)h(simple)f(command)g
+(\(see)1110 3669 y(Section)43 b(3.2.1)i([Simple)d(Commands],)j(page)e
+(8\),)k(a)c(subshell)e(command)1110 3779 y(enclosed)32
+b(in)f(paren)m(theses)h(\(see)h(Section)f(3.2.4.3)i([Command)d
+(Grouping],)1110 3889 y(page)h(13\),)h(or)e(one)g(of)h(the)f(commands)g
+(executed)h(as)f(part)g(of)h(a)f(command)1110 3998 y(list)37
+b(enclosed)g(b)m(y)f(braces)g(\(see)h(Section)g(3.2.4.3)h([Command)e
+(Grouping],)1110 4108 y(page)48 b(13\))g(returns)d(a)j(non-zero)f
+(status.)91 b(The)46 b(shell)h(do)s(es)g(not)g(exit)h(if)1110
+4217 y(the)39 b(command)f(that)h(fails)g(is)f(part)g(of)h(the)f
+(command)h(list)g(immediately)1110 4327 y(follo)m(wing)47
+b(a)f Fs(while)e Ft(or)h Fs(until)f Ft(k)m(eyw)m(ord,)50
+b(part)45 b(of)h(the)g(test)g(in)f(an)h Fs(if)1110 4436
+y Ft(statemen)m(t,)31 b(part)d(of)h(an)m(y)g(command)f(executed)h(in)g
+(a)g Fs(&&)e Ft(or)i Fs(||)f Ft(list)h(except)1110 4546
+y(the)48 b(command)h(follo)m(wing)g(the)g(\014nal)f Fs(&&)f
+Ft(or)i Fs(||)p Ft(,)j(an)m(y)d(command)f(in)g(a)1110
+4656 y(pip)s(eline)39 b(but)f(the)i(last,)i(or)d(if)g(the)h(command's)f
+(return)f(status)h(is)g(b)s(eing)1110 4765 y(in)m(v)m(erted)33
+b(with)e Fs(!)p Ft(.)45 b(A)32 b(trap)g(on)f Fs(ERR)p
+Ft(,)h(if)g(set,)h(is)f(executed)g(b)s(efore)g(the)g(shell)1110
+4875 y(exits.)1110 5011 y(This)e(option)h(applies)f(to)h(the)g(shell)g
+(en)m(vironmen)m(t)g(and)f(eac)m(h)h(subshell)f(en-)1110
+5121 y(vironmen)m(t)j(separately)i(\(see)f(Section)g(3.7.3)h([Command)d
+(Execution)i(En-)1110 5230 y(vironmen)m(t],)i(page)f(30\),)i(and)d(ma)m
+(y)h(cause)f(subshells)g(to)h(exit)g(b)s(efore)f(exe-)1110
+5340 y(cuting)d(all)g(the)g(commands)f(in)g(the)g(subshell.)p
+eop end
+%%Page: 52 58
+TeXDict begin 52 57 bop 150 -116 a Ft(52)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y Fs(-f)384 b Ft(Disable)31
+b(\014lename)g(expansion)f(\(globbing\).)630 455 y Fs(-h)384
+b Ft(Lo)s(cate)33 b(and)e(remem)m(b)s(er)h(\(hash\))g(commands)f(as)h
+(they)g(are)g(lo)s(ok)m(ed)h(up)e(for)1110 565 y(execution.)42
+b(This)29 b(option)i(is)g(enabled)f(b)m(y)g(default.)630
+722 y Fs(-k)384 b Ft(All)34 b(argumen)m(ts)g(in)f(the)h(form)f(of)g
+(assignmen)m(t)h(statemen)m(ts)i(are)d(placed)h(in)1110
+831 y(the)k(en)m(vironmen)m(t)g(for)g(a)g(command,)h(not)f(just)f
+(those)i(that)f(precede)g(the)1110 941 y(command)30 b(name.)630
+1097 y Fs(-m)384 b Ft(Job)30 b(con)m(trol)i(is)e(enabled)h(\(see)g
+(Chapter)f(7)g([Job)h(Con)m(trol],)g(page)g(89\).)630
+1254 y Fs(-n)384 b Ft(Read)21 b(commands)f(but)g(do)h(not)g(execute)h
+(them;)i(this)d(ma)m(y)g(b)s(e)f(used)g(to)h(c)m(hec)m(k)1110
+1363 y(a)42 b(script)g(for)g(syn)m(tax)g(errors.)75 b(This)41
+b(option)h(is)g(ignored)g(b)m(y)g(in)m(teractiv)m(e)1110
+1473 y(shells.)630 1630 y Fs(-o)30 b Fi(option-name)1110
+1739 y Ft(Set)h(the)f(option)h(corresp)s(onding)e(to)i
+Fq(option-name)5 b Ft(:)1110 1896 y Fs(allexport)1590
+2005 y Ft(Same)30 b(as)h Fs(-a)p Ft(.)1110 2162 y Fs(braceexpand)1590
+2271 y Ft(Same)f(as)h Fs(-B)p Ft(.)1110 2428 y Fs(emacs)240
+b Ft(Use)25 b(an)f Fs(emacs)p Ft(-st)m(yle)h(line)f(editing)h(in)m
+(terface)h(\(see)g(Chapter)e(8)1590 2538 y([Command)38
+b(Line)g(Editing],)i(page)f(93\).)66 b(This)37 b(also)i(a\013ects)1590
+2647 y(the)31 b(editing)g(in)m(terface)h(used)d(for)h
+Fs(read)f(-e)p Ft(.)1110 2804 y Fs(errexit)144 b Ft(Same)30
+b(as)h Fs(-e)p Ft(.)1110 2960 y Fs(errtrace)96 b Ft(Same)30
+b(as)h Fs(-E)p Ft(.)1110 3117 y Fs(functrace)1590 3226
+y Ft(Same)f(as)h Fs(-T)p Ft(.)1110 3383 y Fs(hashall)144
+b Ft(Same)30 b(as)h Fs(-h)p Ft(.)1110 3540 y Fs(histexpand)1590
+3649 y Ft(Same)f(as)h Fs(-H)p Ft(.)1110 3806 y Fs(history)144
+b Ft(Enable)39 b(command)g(history)-8 b(,)42 b(as)d(describ)s(ed)f(in)h
+(Section)h(9.1)1590 3915 y([Bash)d(History)g(F)-8 b(acilities],)41
+b(page)c(121.)60 b(This)36 b(option)h(is)f(on)1590 4025
+y(b)m(y)30 b(default)h(in)f(in)m(teractiv)m(e)j(shells.)1110
+4181 y Fs(ignoreeof)1590 4291 y Ft(An)d(in)m(teractiv)m(e)j(shell)e
+(will)g(not)f(exit)h(up)s(on)e(reading)i(EOF.)1110 4448
+y Fs(keyword)144 b Ft(Same)30 b(as)h Fs(-k)p Ft(.)1110
+4604 y Fs(monitor)144 b Ft(Same)30 b(as)h Fs(-m)p Ft(.)1110
+4761 y Fs(noclobber)1590 4870 y Ft(Same)f(as)h Fs(-C)p
+Ft(.)1110 5027 y Fs(noexec)192 b Ft(Same)30 b(as)h Fs(-n)p
+Ft(.)1110 5183 y Fs(noglob)192 b Ft(Same)30 b(as)h Fs(-f)p
+Ft(.)1110 5340 y Fs(nolog)240 b Ft(Curren)m(tly)30 b(ignored.)p
+eop end
+%%Page: 53 59
+TeXDict begin 53 58 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(53)1110 299 y
+Fs(notify)192 b Ft(Same)30 b(as)h Fs(-b)p Ft(.)1110 455
+y Fs(nounset)144 b Ft(Same)30 b(as)h Fs(-u)p Ft(.)1110
+612 y Fs(onecmd)192 b Ft(Same)30 b(as)h Fs(-t)p Ft(.)1110
+769 y Fs(physical)96 b Ft(Same)30 b(as)h Fs(-P)p Ft(.)1110
+925 y Fs(pipefail)96 b Ft(If)44 b(set,)k(the)d(return)e(v)-5
+b(alue)45 b(of)f(a)h(pip)s(eline)e(is)i(the)f(v)-5 b(alue)45
+b(of)1590 1035 y(the)33 b(last)h(\(righ)m(tmost\))h(command)e(to)h
+(exit)g(with)f(a)g(non-zero)1590 1144 y(status,)28 b(or)f(zero)g(if)f
+(all)i(commands)e(in)g(the)h(pip)s(eline)f(exit)i(suc-)1590
+1254 y(cessfully)-8 b(.)41 b(This)30 b(option)h(is)f(disabled)g(b)m(y)h
+(default.)1110 1410 y Fs(posix)240 b Ft(Change)30 b(the)g(b)s(eha)m
+(vior)h(of)f(Bash)g(where)g(the)g(default)h(op)s(era-)1590
+1520 y(tion)25 b(di\013ers)f(from)g(the)h Fl(posix)f
+Ft(standard)f(to)i(matc)m(h)h(the)f(stan-)1590 1630 y(dard)32
+b(\(see)i(Section)g(6.11)h([Bash)e(POSIX)f(Mo)s(de],)j(page)e(84\).)
+1590 1739 y(This)k(is)g(in)m(tended)g(to)h(mak)m(e)g(Bash)g(b)s(eha)m
+(v)m(e)g(as)g(a)f(strict)h(su-)1590 1849 y(p)s(erset)30
+b(of)h(that)f(standard.)1110 2005 y Fs(privileged)1590
+2115 y Ft(Same)g(as)h Fs(-p)p Ft(.)1110 2271 y Fs(verbose)144
+b Ft(Same)30 b(as)h Fs(-v)p Ft(.)1110 2428 y Fs(vi)384
+b Ft(Use)36 b(a)g Fs(vi)p Ft(-st)m(yle)g(line)g(editing)g(in)m
+(terface.)58 b(This)35 b(also)h(a\013ects)1590 2538 y(the)31
+b(editing)g(in)m(terface)h(used)d(for)h Fs(read)f(-e)p
+Ft(.)1110 2694 y Fs(xtrace)192 b Ft(Same)30 b(as)h Fs(-x)p
+Ft(.)630 2851 y Fs(-p)384 b Ft(T)-8 b(urn)33 b(on)h(privileged)h(mo)s
+(de.)51 b(In)34 b(this)g(mo)s(de,)h(the)f Fs($BASH_ENV)e
+Ft(and)h Fs($ENV)1110 2960 y Ft(\014les)23 b(are)h(not)f(pro)s(cessed,)
+h(shell)g(functions)e(are)i(not)f(inherited)g(from)f(the)i(en-)1110
+3070 y(vironmen)m(t,)h(and)e(the)g Fs(SHELLOPTS)p Ft(,)f
+Fs(BASHOPTS)p Ft(,)h Fs(CDPATH)e Ft(and)i Fs(GLOBIGNORE)1110
+3180 y Ft(v)-5 b(ariables,)23 b(if)e(they)g(app)s(ear)f(in)g(the)h(en)m
+(vironmen)m(t,)i(are)e(ignored.)38 b(If)20 b(the)h(shell)1110
+3289 y(is)37 b(started)h(with)f(the)g(e\013ectiv)m(e)j(user)d
+(\(group\))g(id)g(not)g(equal)h(to)g(the)f(real)1110
+3399 y(user)h(\(group\))h(id,)i(and)d(the)h Fs(-p)f Ft(option)i(is)e
+(not)i(supplied,)f(these)h(actions)1110 3508 y(are)32
+b(tak)m(en)i(and)d(the)h(e\013ectiv)m(e)j(user)c(id)h(is)g(set)h(to)f
+(the)h(real)f(user)g(id.)45 b(If)32 b(the)1110 3618 y
+Fs(-p)i Ft(option)h(is)g(supplied)f(at)h(startup,)h(the)f(e\013ectiv)m
+(e)i(user)d(id)g(is)h(not)g(reset.)1110 3727 y(T)-8 b(urning)35
+b(this)i(option)g(o\013)g(causes)g(the)g(e\013ectiv)m(e)i(user)d(and)g
+(group)g(ids)g(to)1110 3837 y(b)s(e)30 b(set)h(to)g(the)f(real)h(user)f
+(and)g(group)g(ids.)630 3994 y Fs(-t)384 b Ft(Exit)31
+b(after)g(reading)f(and)g(executing)h(one)g(command.)630
+4150 y Fs(-u)384 b Ft(T)-8 b(reat)25 b(unset)e(v)-5 b(ariables)25
+b(and)e(parameters)h(other)h(than)e(the)h(sp)s(ecial)h(param-)1110
+4260 y(eters)35 b(`)p Fs(@)p Ft(')f(or)g(`)p Fs(*)p Ft(')h(as)f(an)g
+(error)g(when)f(p)s(erforming)g(parameter)i(expansion.)1110
+4369 y(An)28 b(error)h(message)g(will)g(b)s(e)f(written)h(to)h(the)e
+(standard)g(error,)h(and)f(a)h(non-)1110 4479 y(in)m(teractiv)m(e)k
+(shell)e(will)g(exit.)630 4635 y Fs(-v)384 b Ft(Prin)m(t)30
+b(shell)h(input)e(lines)i(as)g(they)f(are)h(read.)630
+4792 y Fs(-x)384 b Ft(Prin)m(t)21 b(a)h(trace)h(of)f(simple)f
+(commands,)i Fs(for)e Ft(commands,)i Fs(case)d Ft(commands,)1110
+4902 y Fs(select)29 b Ft(commands,)j(and)e(arithmetic)j
+Fs(for)d Ft(commands)h(and)f(their)i(argu-)1110 5011
+y(men)m(ts)h(or)f(asso)s(ciated)i(w)m(ord)e(lists)h(after)g(they)f(are)
+h(expanded)f(and)f(b)s(efore)1110 5121 y(they)i(are)g(executed.)49
+b(The)32 b(v)-5 b(alue)33 b(of)g(the)g Fs(PS4)f Ft(v)-5
+b(ariable)34 b(is)f(expanded)f(and)1110 5230 y(the)24
+b(resultan)m(t)h(v)-5 b(alue)24 b(is)g(prin)m(ted)g(b)s(efore)f(the)h
+(command)g(and)f(its)i(expanded)1110 5340 y(argumen)m(ts.)p
+eop end
+%%Page: 54 60
+TeXDict begin 54 59 bop 150 -116 a Ft(54)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y Fs(-B)384 b Ft(The)41
+b(shell)g(will)g(p)s(erform)f(brace)h(expansion)g(\(see)h(Section)g
+(3.5.1)g([Brace)1110 408 y(Expansion],)30 b(page)h(18\).)42
+b(This)30 b(option)h(is)f(on)g(b)m(y)h(default.)630 556
+y Fs(-C)384 b Ft(Prev)m(en)m(t)25 b(output)e(redirection)h(using)f(`)p
+Fs(>)p Ft(',)i(`)p Fs(>&)p Ft(',)g(and)e(`)p Fs(<>)p
+Ft(')g(from)h(o)m(v)m(erwriting)1110 666 y(existing)31
+b(\014les.)630 814 y Fs(-E)384 b Ft(If)39 b(set,)j(an)m(y)e(trap)f(on)g
+Fs(ERR)g Ft(is)g(inherited)g(b)m(y)g(shell)h(functions,)h(command)1110
+923 y(substitutions,)35 b(and)e(commands)g(executed)i(in)f(a)g
+(subshell)f(en)m(vironmen)m(t.)1110 1033 y(The)d Fs(ERR)f
+Ft(trap)i(is)f(normally)h(not)f(inherited)g(in)g(suc)m(h)g(cases.)630
+1181 y Fs(-H)384 b Ft(Enable)38 b(`)p Fs(!)p Ft(')h(st)m(yle)h(history)
+e(substitution)g(\(see)h(Section)h(9.3)f([History)g(In-)1110
+1290 y(teraction],)g(page)d(123\).)57 b(This)34 b(option)i(is)f(on)g(b)
+m(y)h(default)f(for)g(in)m(teractiv)m(e)1110 1400 y(shells.)630
+1548 y Fs(-P)384 b Ft(If)43 b(set,)k(do)c(not)g(follo)m(w)h(sym)m(b)s
+(olic)g(links)e(when)g(p)s(erforming)g(commands)1110
+1657 y(suc)m(h)29 b(as)h Fs(cd)f Ft(whic)m(h)g(c)m(hange)h(the)g
+(curren)m(t)f(directory)-8 b(.)42 b(The)28 b(ph)m(ysical)j(direc-)1110
+1767 y(tory)j(is)g(used)f(instead.)52 b(By)34 b(default,)h(Bash)f
+(follo)m(ws)h(the)f(logical)i(c)m(hain)f(of)1110 1877
+y(directories)j(when)d(p)s(erforming)h(commands)g(whic)m(h)g(c)m(hange)
+i(the)f(curren)m(t)1110 1986 y(directory)-8 b(.)1110
+2115 y(F)g(or)31 b(example,)g(if)f(`)p Fs(/usr/sys)p
+Ft(')e(is)i(a)g(sym)m(b)s(olic)h(link)f(to)g(`)p Fs(/usr/local/sys)p
+Ft(')1110 2224 y(then:)1350 2353 y Fs($)47 b(cd)h(/usr/sys;)d(echo)i
+($PWD)1350 2463 y(/usr/sys)1350 2572 y($)g(cd)h(..;)f(pwd)1350
+2682 y(/usr)1110 2811 y Ft(If)30 b Fs(set)f(-P)h Ft(is)h(on,)f(then:)
+1350 2939 y Fs($)47 b(cd)h(/usr/sys;)d(echo)i($PWD)1350
+3049 y(/usr/local/sys)1350 3158 y($)g(cd)h(..;)f(pwd)1350
+3268 y(/usr/local)630 3416 y(-T)384 b Ft(If)34 b(set,)j(an)m(y)e(trap)g
+(on)g Fs(DEBUG)e Ft(and)i Fs(RETURN)e Ft(are)i(inherited)g(b)m(y)f
+(shell)i(func-)1110 3525 y(tions,)k(command)d(substitutions,)h(and)f
+(commands)g(executed)h(in)f(a)h(sub-)1110 3635 y(shell)33
+b(en)m(vironmen)m(t.)49 b(The)32 b Fs(DEBUG)g Ft(and)g
+Fs(RETURN)f Ft(traps)h(are)i(normally)f(not)1110 3745
+y(inherited)d(in)g(suc)m(h)g(cases.)630 3892 y Fs(--)384
+b Ft(If)31 b(no)h(argumen)m(ts)f(follo)m(w)i(this)f(option,)g(then)f
+(the)h(p)s(ositional)h(parameters)1110 4002 y(are)h(unset.)49
+b(Otherwise,)34 b(the)g(p)s(ositional)g(parameters)g(are)g(set)g(to)g
+(the)g Fq(ar-)1110 4112 y(gumen)m(ts)t Ft(,)d(ev)m(en)g(if)f(some)h(of)
+f(them)h(b)s(egin)f(with)g(a)g(`)p Fs(-)p Ft('.)630 4260
+y Fs(-)432 b Ft(Signal)45 b(the)g(end)f(of)h(options,)k(cause)c(all)h
+(remaining)e Fq(argumen)m(ts)49 b Ft(to)d(b)s(e)1110
+4369 y(assigned)38 b(to)h(the)f(p)s(ositional)h(parameters.)65
+b(The)37 b(`)p Fs(-x)p Ft(')h(and)g(`)p Fs(-v)p Ft(')g(options)1110
+4479 y(are)25 b(turned)e(o\013.)40 b(If)24 b(there)h(are)g(no)f
+(argumen)m(ts,)i(the)f(p)s(ositional)h(parameters)1110
+4588 y(remain)k(unc)m(hanged.)630 4736 y(Using)d(`)p
+Fs(+)p Ft(')h(rather)f(than)g(`)p Fs(-)p Ft(')g(causes)h(these)f
+(options)h(to)g(b)s(e)e(turned)g(o\013.)40 b(The)27 b(options)h(can)630
+4846 y(also)36 b(b)s(e)f(used)f(up)s(on)g(in)m(v)m(o)s(cation)j(of)e
+(the)g(shell.)56 b(The)34 b(curren)m(t)h(set)h(of)f(options)h(ma)m(y)g
+(b)s(e)630 4955 y(found)29 b(in)h Fs($-)p Ft(.)630 5084
+y(The)43 b(remaining)h(N)f Fq(argumen)m(ts)48 b Ft(are)c(p)s(ositional)
+g(parameters)g(and)f(are)h(assigned,)j(in)630 5194 y(order,)30
+b(to)h Fs($1)p Ft(,)f Fs($2)p Ft(,)36 b(.)22 b(.)g(.)42
+b Fs($N)p Ft(.)e(The)30 b(sp)s(ecial)h(parameter)g Fs(#)f
+Ft(is)g(set)h(to)g(N.)630 5322 y(The)f(return)f(status)i(is)f(alw)m(a)m
+(ys)i(zero)f(unless)f(an)g(in)m(v)-5 b(alid)31 b(option)g(is)f
+(supplied.)p eop end
+%%Page: 55 61
+TeXDict begin 55 60 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(55)150 299 y Fj(4.3.2)63
+b(The)41 b(Shopt)h(Builtin)150 446 y Ft(This)30 b(builtin)g(allo)m(ws)h
+(y)m(ou)g(to)g(c)m(hange)h(additional)f(shell)f(optional)i(b)s(eha)m
+(vior.)150 618 y Fs(shopt)870 756 y(shopt)46 b([-pqsu])g([-o])h([)p
+Fi(optname)56 b Fs(...)o(])630 895 y Ft(T)-8 b(oggle)47
+b(the)d(v)-5 b(alues)45 b(of)g(v)-5 b(ariables)45 b(con)m(trolling)i
+(optional)f(shell)e(b)s(eha)m(vior.)84 b(With)45 b(no)630
+1004 y(options,)32 b(or)f(with)g(the)g(`)p Fs(-p)p Ft(')g(option,)h(a)g
+(list)f(of)h(all)g(settable)g(options)g(is)f(displa)m(y)m(ed,)h(with)
+630 1114 y(an)i(indication)i(of)f(whether)f(or)g(not)h(eac)m(h)h(is)e
+(set.)54 b(The)34 b(`)p Fs(-p)p Ft(')h(option)g(causes)g(output)f(to)
+630 1224 y(b)s(e)i(displa)m(y)m(ed)h(in)e(a)i(form)f(that)h(ma)m(y)g(b)
+s(e)e(reused)h(as)g(input.)58 b(Other)36 b(options)g(ha)m(v)m(e)i(the)
+630 1333 y(follo)m(wing)32 b(meanings:)630 1501 y Fs(-s)384
+b Ft(Enable)30 b(\(set\))i(eac)m(h)f Fq(optname)5 b Ft(.)630
+1668 y Fs(-u)384 b Ft(Disable)31 b(\(unset\))g(eac)m(h)h
+Fq(optname)5 b Ft(.)630 1836 y Fs(-q)384 b Ft(Suppresses)28
+b(normal)h(output;)h(the)g(return)e(status)i(indicates)h(whether)e(the)
+1110 1946 y Fq(optname)37 b Ft(is)31 b(set)h(or)f(unset.)43
+b(If)31 b(m)m(ultiple)h Fq(optname)37 b Ft(argumen)m(ts)31
+b(are)h(giv)m(en)1110 2055 y(with)43 b(`)p Fs(-q)p Ft(',)j(the)d
+(return)f(status)h(is)g(zero)h(if)f(all)g Fq(optnames)k
+Ft(are)d(enabled;)1110 2165 y(non-zero)31 b(otherwise.)630
+2333 y Fs(-o)384 b Ft(Restricts)28 b(the)g(v)-5 b(alues)28
+b(of)f Fq(optname)33 b Ft(to)c(b)s(e)d(those)i(de\014ned)f(for)g(the)g
+(`)p Fs(-o)p Ft(')h(op-)1110 2442 y(tion)23 b(to)h(the)f
+Fs(set)f Ft(builtin)h(\(see)g(Section)h(4.3.1)h([The)d(Set)i(Builtin],)
+h(page)e(51\).)630 2610 y(If)29 b(either)i(`)p Fs(-s)p
+Ft(')f(or)g(`)p Fs(-u)p Ft(')f(is)h(used)g(with)f(no)h
+Fq(optname)35 b Ft(argumen)m(ts,)c(the)f(displa)m(y)g(is)g(limited)630
+2719 y(to)h(those)g(options)g(whic)m(h)f(are)h(set)f(or)h(unset,)f
+(resp)s(ectiv)m(ely)-8 b(.)630 2858 y(Unless)30 b(otherwise)h(noted,)g
+(the)g Fs(shopt)d Ft(options)j(are)g(disabled)f(\(o\013)7
+b(\))32 b(b)m(y)e(default.)630 2997 y(The)d(return)f(status)i(when)f
+(listing)h(options)g(is)f(zero)i(if)e(all)i Fq(optnames)i
+Ft(are)d(enabled,)g(non-)630 3106 y(zero)40 b(otherwise.)66
+b(When)39 b(setting)h(or)f(unsetting)g(options,)i(the)e(return)f
+(status)h(is)g(zero)630 3216 y(unless)30 b(an)g Fq(optname)36
+b Ft(is)30 b(not)h(a)g(v)-5 b(alid)30 b(shell)h(option.)630
+3354 y(The)f(list)h(of)f Fs(shopt)f Ft(options)i(is:)630
+3522 y Fs(autocd)192 b Ft(If)27 b(set,)h(a)g(command)f(name)g(that)h
+(is)f(the)g(name)g(of)h(a)f(directory)h(is)f(executed)1110
+3632 y(as)j(if)f(it)h(w)m(ere)f(the)h(argumen)m(t)g(to)g(the)f
+Fs(cd)g Ft(command.)40 b(This)29 b(option)g(is)h(only)1110
+3741 y(used)g(b)m(y)g(in)m(teractiv)m(e)j(shells.)630
+3909 y Fs(cdable_vars)1110 4018 y Ft(If)h(this)h(is)g(set,)i(an)e
+(argumen)m(t)g(to)h(the)f Fs(cd)f Ft(builtin)h(command)f(that)i(is)f
+(not)1110 4128 y(a)c(directory)g(is)g(assumed)f(to)h(b)s(e)f(the)h
+(name)f(of)h(a)g(v)-5 b(ariable)31 b(whose)g(v)-5 b(alue)31
+b(is)1110 4238 y(the)g(directory)f(to)i(c)m(hange)f(to.)630
+4405 y Fs(cdspell)144 b Ft(If)27 b(set,)h(minor)f(errors)f(in)h(the)g
+(sp)s(elling)h(of)f(a)g(directory)h(comp)s(onen)m(t)f(in)g(a)h
+Fs(cd)1110 4515 y Ft(command)i(will)h(b)s(e)f(corrected.)43
+b(The)30 b(errors)g(c)m(hec)m(k)m(ed)j(for)d(are)h(transp)s(osed)1110
+4624 y(c)m(haracters,)46 b(a)c(missing)f(c)m(haracter,)47
+b(and)40 b(a)i(c)m(haracter)h(to)s(o)g(man)m(y)-8 b(.)74
+b(If)42 b(a)1110 4734 y(correction)25 b(is)e(found,)g(the)h(corrected)g
+(path)f(is)g(prin)m(ted,)h(and)f(the)g(command)1110 4844
+y(pro)s(ceeds.)40 b(This)30 b(option)h(is)f(only)h(used)e(b)m(y)h(in)m
+(teractiv)m(e)k(shells.)630 5011 y Fs(checkhash)1110
+5121 y Ft(If)29 b(this)h(is)g(set,)g(Bash)g(c)m(hec)m(ks)h(that)g(a)f
+(command)f(found)g(in)g(the)h(hash)f(table)1110 5230
+y(exists)k(b)s(efore)f(trying)h(to)h(execute)g(it.)48
+b(If)32 b(a)h(hashed)e(command)i(no)f(longer)1110 5340
+y(exists,)f(a)g(normal)f(path)g(searc)m(h)h(is)g(p)s(erformed.)p
+eop end
+%%Page: 56 62
+TeXDict begin 56 61 bop 150 -116 a Ft(56)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y Fs(checkjobs)1110 408
+y Ft(If)d(set,)i(Bash)e(lists)h(the)g(status)g(of)f(an)m(y)h(stopp)s
+(ed)f(and)g(running)e(jobs)i(b)s(efore)1110 518 y(exiting)42
+b(an)f(in)m(teractiv)m(e)j(shell.)72 b(If)41 b(an)m(y)g(jobs)f(are)i
+(running,)g(this)f(causes)1110 628 y(the)30 b(exit)g(to)g(b)s(e)f
+(deferred)g(un)m(til)h(a)f(second)h(exit)g(is)g(attempted)h(without)e
+(an)1110 737 y(in)m(terv)m(ening)j(command)e(\(see)h(Chapter)f(7)h
+([Job)f(Con)m(trol],)i(page)f(89\).)42 b(The)1110 847
+y(shell)31 b(alw)m(a)m(ys)g(p)s(ostp)s(ones)f(exiting)h(if)g(an)m(y)f
+(jobs)g(are)h(stopp)s(ed.)630 1009 y Fs(checkwinsize)1110
+1118 y Ft(If)41 b(set,)k(Bash)c(c)m(hec)m(ks)i(the)f(windo)m(w)e(size)j
+(after)f(eac)m(h)g(command)f(and,)j(if)1110 1228 y(necessary)-8
+b(,)31 b(up)s(dates)f(the)g(v)-5 b(alues)31 b(of)g Fs(LINES)e
+Ft(and)g Fs(COLUMNS)p Ft(.)630 1390 y Fs(cmdhist)144
+b Ft(If)33 b(set,)j(Bash)e(attempts)h(to)g(sa)m(v)m(e)g(all)g(lines)f
+(of)g(a)h(m)m(ultiple-line)g(command)1110 1499 y(in)c(the)g(same)g
+(history)g(en)m(try)-8 b(.)42 b(This)30 b(allo)m(ws)i(easy)g
+(re-editing)g(of)f(m)m(ulti-line)1110 1609 y(commands.)630
+1771 y Fs(compat31)96 b Ft(If)27 b(set,)i(Bash)e(c)m(hanges)i(its)f(b)s
+(eha)m(vior)f(to)i(that)f(of)f(v)m(ersion)h(3.1)h(with)e(resp)s(ect)
+1110 1880 y(to)k(quoted)g(argumen)m(ts)f(to)h(the)g(conditional)h
+(command's)e(=)p Fs(~)g Ft(op)s(erator.)630 2042 y Fs(dirspell)96
+b Ft(If)26 b(set,)i(Bash)f(attempts)g(sp)s(elling)g(correction)g(on)g
+(directory)g(names)f(during)1110 2151 y(w)m(ord)36 b(completion)h(if)f
+(the)g(directory)g(name)g(initially)h(supplied)e(do)s(es)h(not)1110
+2261 y(exist.)630 2423 y Fs(dotglob)144 b Ft(If)27 b(set,)i(Bash)f
+(includes)g(\014lenames)g(b)s(eginning)f(with)g(a)h(`.')41
+b(in)27 b(the)h(results)g(of)1110 2532 y(\014lename)j(expansion.)630
+2694 y Fs(execfail)96 b Ft(If)24 b(this)h(is)f(set,)j(a)e(non-in)m
+(teractiv)m(e)i(shell)e(will)f(not)h(exit)h(if)e(it)h(cannot)h(execute)
+1110 2804 y(the)i(\014le)g(sp)s(eci\014ed)g(as)g(an)g(argumen)m(t)g(to)
+h(the)f Fs(exec)f Ft(builtin)h(command.)39 b(An)1110
+2913 y(in)m(teractiv)m(e)33 b(shell)e(do)s(es)f(not)g(exit)i(if)e
+Fs(exec)f Ft(fails.)630 3075 y Fs(expand_aliases)1110
+3185 y Ft(If)j(set,)h(aliases)g(are)g(expanded)e(as)h(describ)s(ed)f(b)
+s(elo)m(w)h(under)f(Aliases,)i(Sec-)1110 3294 y(tion)38
+b(6.6)h([Aliases],)j(page)d(79.)64 b(This)37 b(option)h(is)g(enabled)g
+(b)m(y)g(default)g(for)1110 3404 y(in)m(teractiv)m(e)33
+b(shells.)630 3566 y Fs(extdebug)96 b Ft(If)30 b(set,)h(b)s(eha)m(vior)
+g(in)m(tended)f(for)g(use)g(b)m(y)g(debuggers)g(is)h(enabled:)1159
+3701 y(1.)61 b(The)32 b(`)p Fs(-F)p Ft(')g(option)h(to)g(the)g
+Fs(declare)d Ft(builtin)i(\(see)i(Section)f(4.2)h([Bash)1290
+3811 y(Builtins],)29 b(page)g(41\))g(displa)m(ys)f(the)g(source)h
+(\014le)f(name)g(and)f(line)h(n)m(um-)1290 3921 y(b)s(er)h(corresp)s
+(onding)g(to)i(eac)m(h)g(function)f(name)g(supplied)f(as)i(an)f(argu-)
+1290 4030 y(men)m(t.)1159 4166 y(2.)61 b(If)20 b(the)h(command)g(run)e
+(b)m(y)i(the)f Fs(DEBUG)g Ft(trap)g(returns)g(a)h(non-zero)g(v)-5
+b(alue,)1290 4275 y(the)31 b(next)f(command)g(is)h(skipp)s(ed)e(and)g
+(not)i(executed.)1159 4411 y(3.)61 b(If)37 b(the)g(command)g(run)f(b)m
+(y)i(the)f Fs(DEBUG)f Ft(trap)h(returns)f(a)i(v)-5 b(alue)38
+b(of)f(2,)1290 4521 y(and)c(the)g(shell)h(is)f(executing)i(in)e(a)h
+(subroutine)e(\(a)i(shell)g(function)f(or)1290 4630 y(a)h(shell)h
+(script)f(executed)h(b)m(y)f(the)g Fs(.)g Ft(or)g Fs(source)e
+Ft(builtins\),)j(a)g(call)g(to)1290 4740 y Fs(return)29
+b Ft(is)h(sim)m(ulated.)1159 4876 y(4.)61 b Fs(BASH_ARGC)34
+b Ft(and)i Fs(BASH_ARGV)e Ft(are)j(up)s(dated)e(as)h(describ)s(ed)g(in)
+g(their)1290 4985 y(descriptions)30 b(\(see)i(Section)f(5.2)g([Bash)g
+(V)-8 b(ariables],)32 b(page)f(61\).)1159 5121 y(5.)61
+b(F)-8 b(unction)57 b(tracing)g(is)g(enabled:)93 b(command)56
+b(substitution,)63 b(shell)1290 5230 y(functions,)30
+b(and)f(subshells)g(in)m(v)m(ok)m(ed)j(with)d Fs(\()h
+Fi(command)39 b Fs(\))30 b Ft(inherit)g(the)1290 5340
+y Fs(DEBUG)f Ft(and)h Fs(RETURN)e Ft(traps.)p eop end
+%%Page: 57 63
+TeXDict begin 57 62 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(57)1159 299 y(6.)61
+b(Error)74 b(tracing)i(is)f(enabled:)131 b(command)74
+b(substitution,)87 b(shell)1290 408 y(functions,)30 b(and)f(subshells)g
+(in)m(v)m(ok)m(ed)j(with)d Fs(\()h Fi(command)39 b Fs(\))30
+b Ft(inherit)g(the)1290 518 y Fs(ERROR)f Ft(trap.)630
+667 y Fs(extglob)144 b Ft(If)26 b(set,)i(the)f(extended)f(pattern)h
+(matc)m(hing)g(features)g(describ)s(ed)e(ab)s(o)m(v)m(e)j(\(see)1110
+777 y(Section)j(3.5.8.1)i([P)m(attern)f(Matc)m(hing],)g(page)f(24\))h
+(are)f(enabled.)630 927 y Fs(extquote)96 b Ft(If)49 b(set,)54
+b Fs($')p Fi(string)11 b Fs(')46 b Ft(and)j Fs($")p Fi(string)11
+b Fs(")46 b Ft(quoting)k(is)f(p)s(erformed)e(within)1110
+1036 y Fs(${)p Fi(parameter)11 b Fs(})30 b Ft(expansions)j(enclosed)h
+(in)g(double)f(quotes.)51 b(This)32 b(option)1110 1146
+y(is)e(enabled)h(b)m(y)f(default.)630 1295 y Fs(failglob)96
+b Ft(If)36 b(set,)j(patterns)d(whic)m(h)g(fail)h(to)h(matc)m(h)f
+(\014lenames)f(during)g(\014lename)g(ex-)1110 1405 y(pansion)30
+b(result)g(in)g(an)g(expansion)h(error.)630 1554 y Fs(force_fignore)
+1110 1664 y Ft(If)43 b(set,)k(the)d(su\016xes)f(sp)s(eci\014ed)f(b)m(y)
+i(the)f Fs(FIGNORE)f Ft(shell)h(v)-5 b(ariable)44 b(cause)1110
+1773 y(w)m(ords)31 b(to)h(b)s(e)f(ignored)h(when)f(p)s(erforming)f(w)m
+(ord)h(completion)i(ev)m(en)f(if)g(the)1110 1883 y(ignored)37
+b(w)m(ords)g(are)g(the)h(only)f(p)s(ossible)g(completions.)62
+b(See)37 b(Section)h(5.2)1110 1993 y([Bash)24 b(V)-8
+b(ariables],)27 b(page)e(61,)h(for)d(a)h(description)g(of)g
+Fs(FIGNORE)p Ft(.)37 b(This)22 b(option)1110 2102 y(is)30
+b(enabled)h(b)m(y)f(default.)630 2252 y Fs(globstar)96
+b Ft(If)38 b(set,)j(the)e(pattern)f(`)p Fs(**)p Ft(')h(used)e(in)i(a)f
+(\014lename)h(expansion)f(con)m(text)j(will)1110 2361
+y(matc)m(h)f(a)g(\014les)f(and)f(zero)i(or)g(more)f(directories)h(and)f
+(sub)s(directories.)66 b(If)1110 2471 y(the)30 b(pattern)g(is)g(follo)m
+(w)m(ed)i(b)m(y)d(a)i(`)p Fs(/)p Ft(',)f(only)g(directories)h(and)f
+(sub)s(directories)1110 2580 y(matc)m(h.)630 2730 y Fs(gnu_errfmt)1110
+2839 y Ft(If)35 b(set,)j(shell)e(error)g(messages)g(are)h(written)e(in)
+h(the)g(standard)f Fl(gnu)g Ft(error)1110 2949 y(message)c(format.)630
+3098 y Fs(histappend)1110 3208 y Ft(If)c(set,)j(the)e(history)g(list)g
+(is)g(app)s(ended)e(to)j(the)f(\014le)g(named)f(b)m(y)h(the)g(v)-5
+b(alue)29 b(of)1110 3318 y(the)d Fs(HISTFILE)d Ft(v)-5
+b(ariable)26 b(when)e(the)h(shell)h(exits,)h(rather)e(than)h(o)m(v)m
+(erwriting)1110 3427 y(the)31 b(\014le.)630 3577 y Fs(histreedit)1110
+3686 y Ft(If)i(set,)h(and)f(Readline)h(is)f(b)s(eing)g(used,)g(a)g
+(user)g(is)g(giv)m(en)h(the)g(opp)s(ortunit)m(y)1110
+3796 y(to)d(re-edit)g(a)g(failed)g(history)f(substitution.)630
+3945 y Fs(histverify)1110 4055 y Ft(If)35 b(set,)i(and)e(Readline)h(is)
+f(b)s(eing)g(used,)h(the)f(results)g(of)g(history)h(substitu-)1110
+4164 y(tion)h(are)g(not)g(immediately)h(passed)e(to)h(the)g(shell)g
+(parser.)59 b(Instead,)38 b(the)1110 4274 y(resulting)i(line)f(is)h
+(loaded)g(in)m(to)g(the)g(Readline)g(editing)g(bu\013er,)h(allo)m(wing)
+1110 4384 y(further)29 b(mo)s(di\014cation.)630 4533
+y Fs(hostcomplete)1110 4643 y Ft(If)38 b(set,)j(and)c(Readline)i(is)f
+(b)s(eing)g(used,)h(Bash)g(will)f(attempt)h(to)g(p)s(erform)1110
+4752 y(hostname)d(completion)h(when)e(a)h(w)m(ord)f(con)m(taining)i(a)f
+(`)p Fs(@)p Ft(')g(is)g(b)s(eing)f(com-)1110 4862 y(pleted)g(\(see)h
+(Section)f(8.4.6)i([Commands)d(F)-8 b(or)36 b(Completion],)g(page)g
+(110\).)1110 4971 y(This)30 b(option)g(is)h(enabled)f(b)m(y)g(default.)
+630 5121 y Fs(huponexit)1110 5230 y Ft(If)i(set,)i(Bash)f(will)h(send)d
+Fs(SIGHUP)h Ft(to)h(all)h(jobs)e(when)g(an)g(in)m(teractiv)m(e)k(login)
+1110 5340 y(shell)31 b(exits)g(\(see)g(Section)g(3.7.6)h([Signals],)g
+(page)f(32\).)p eop end
+%%Page: 58 64
+TeXDict begin 58 63 bop 150 -116 a Ft(58)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y Fs(interactive_comments)1110
+408 y Ft(Allo)m(w)c(a)g(w)m(ord)e(b)s(eginning)g(with)h(`)p
+Fs(#)p Ft(')g(to)h(cause)f(that)h(w)m(ord)f(and)f(all)i(remain-)1110
+518 y(ing)41 b(c)m(haracters)i(on)e(that)h(line)g(to)g(b)s(e)f(ignored)
+g(in)g(an)g(in)m(teractiv)m(e)j(shell.)1110 628 y(This)30
+b(option)g(is)h(enabled)f(b)m(y)g(default.)630 777 y
+Fs(lithist)144 b Ft(If)22 b(enabled,)i(and)d(the)h Fs(cmdhist)e
+Ft(option)j(is)f(enabled,)i(m)m(ulti-line)f(commands)1110
+887 y(are)28 b(sa)m(v)m(ed)h(to)g(the)f(history)g(with)f(em)m(b)s
+(edded)g(newlines)h(rather)g(than)f(using)1110 996 y(semicolon)32
+b(separators)f(where)e(p)s(ossible.)630 1146 y Fs(login_shell)1110
+1255 y Ft(The)35 b(shell)h(sets)g(this)f(option)h(if)g(it)g(is)f
+(started)h(as)g(a)g(login)g(shell)g(\(see)g(Sec-)1110
+1365 y(tion)29 b(6.1)g([In)m(v)m(oking)h(Bash],)f(page)g(71\).)41
+b(The)28 b(v)-5 b(alue)29 b(ma)m(y)g(not)f(b)s(e)g(c)m(hanged.)630
+1514 y Fs(mailwarn)96 b Ft(If)34 b(set,)i(and)e(a)h(\014le)g(that)g
+(Bash)f(is)h(c)m(hec)m(king)h(for)f(mail)g(has)f(b)s(een)g(accessed)
+1110 1624 y(since)24 b(the)h(last)g(time)f(it)h(w)m(as)f(c)m(hec)m(k)m
+(ed,)k(the)c(message)h Fs("The)k(mail)h(in)f Fi(mail-)1110
+1733 y(file)40 b Fs(has)29 b(been)g(read")g Ft(is)i(displa)m(y)m(ed.)
+630 1883 y Fs(no_empty_cmd_completion)1110 1993 y Ft(If)f(set,)g(and)g
+(Readline)g(is)h(b)s(eing)e(used,)h(Bash)g(will)g(not)g(attempt)i(to)e
+(searc)m(h)1110 2102 y(the)25 b Fs(PATH)f Ft(for)h(p)s(ossible)f
+(completions)j(when)d(completion)i(is)f(attempted)h(on)1110
+2212 y(an)k(empt)m(y)h(line.)630 2361 y Fs(nocaseglob)1110
+2471 y Ft(If)38 b(set,)k(Bash)d(matc)m(hes)g(\014lenames)g(in)f(a)h
+(case-insensitiv)m(e)j(fashion)c(when)1110 2580 y(p)s(erforming)29
+b(\014lename)i(expansion.)630 2730 y Fs(nocasematch)1110
+2839 y Ft(If)42 b(set,)k(Bash)d(matc)m(hes)g(patterns)g(in)f(a)h
+(case-insensitiv)m(e)i(fashion)d(when)1110 2949 y(p)s(erforming)31
+b(matc)m(hing)i(while)f(executing)i Fs(case)d Ft(or)h
+Fs([[)g Ft(conditional)h(com-)1110 3059 y(mands.)630
+3208 y Fs(nullglob)96 b Ft(If)23 b(set,)j(Bash)e(allo)m(ws)g
+(\014lename)g(patterns)g(whic)m(h)f(matc)m(h)h(no)g(\014les)f(to)i
+(expand)1110 3318 y(to)31 b(a)g(n)m(ull)f(string,)h(rather)f(than)g
+(themselv)m(es.)630 3467 y Fs(progcomp)96 b Ft(If)25
+b(set,)i(the)f(programmable)g(completion)g(facilities)i(\(see)f
+(Section)f(8.6)h([Pro-)1110 3577 y(grammable)45 b(Completion],)k(page)c
+(115\))h(are)f(enabled.)82 b(This)44 b(option)h(is)1110
+3686 y(enabled)30 b(b)m(y)h(default.)630 3836 y Fs(promptvars)1110
+3945 y Ft(If)24 b(set,)i(prompt)d(strings)h(undergo)f(parameter)i
+(expansion,)g(command)f(sub-)1110 4055 y(stitution,)34
+b(arithmetic)f(expansion,)g(and)e(quote)i(remo)m(v)-5
+b(al)33 b(after)g(b)s(eing)e(ex-)1110 4164 y(panded)39
+b(as)i(describ)s(ed)e(b)s(elo)m(w)i(\(see)g(Section)g(6.9)g([Prin)m
+(ting)g(a)g(Prompt],)1110 4274 y(page)31 b(82\).)42 b(This)30
+b(option)g(is)h(enabled)f(b)m(y)g(default.)630 4423 y
+Fs(restricted_shell)1110 4533 y Ft(The)40 b(shell)h(sets)g(this)g
+(option)g(if)g(it)h(is)e(started)i(in)e(restricted)i(mo)s(de)e(\(see)
+1110 4643 y(Section)c(6.10)g([The)f(Restricted)g(Shell],)i(page)e
+(84\).)56 b(The)34 b(v)-5 b(alue)35 b(ma)m(y)h(not)1110
+4752 y(b)s(e)c(c)m(hanged.)49 b(This)32 b(is)h(not)h(reset)f(when)f
+(the)h(startup)g(\014les)f(are)i(executed,)1110 4862
+y(allo)m(wing)k(the)e(startup)f(\014les)h(to)g(disco)m(v)m(er)h
+(whether)f(or)f(not)i(a)f(shell)g(is)g(re-)1110 4971
+y(stricted.)630 5121 y Fs(shift_verbose)1110 5230 y Ft(If)g(this)g(is)g
+(set,)j(the)d Fs(shift)f Ft(builtin)h(prin)m(ts)f(an)h(error)g(message)
+i(when)d(the)1110 5340 y(shift)30 b(coun)m(t)h(exceeds)g(the)g(n)m(um)m
+(b)s(er)e(of)h(p)s(ositional)i(parameters.)p eop end
+%%Page: 59 65
+TeXDict begin 59 64 bop 150 -116 a Ft(Chapter)30 b(4:)41
+b(Shell)30 b(Builtin)h(Commands)2069 b(59)630 299 y Fs(sourcepath)1110
+408 y Ft(If)22 b(set,)j(the)e Fs(source)e Ft(builtin)h(uses)g(the)h(v)
+-5 b(alue)23 b(of)g Fs(PATH)e Ft(to)j(\014nd)d(the)h(directory)1110
+518 y(con)m(taining)29 b(the)e(\014le)h(supplied)e(as)h(an)g(argumen)m
+(t.)40 b(This)27 b(option)h(is)f(enabled)1110 628 y(b)m(y)j(default.)
+630 787 y Fs(xpg_echo)96 b Ft(If)31 b(set,)h(the)g Fs(echo)e
+Ft(builtin)h(expands)f(bac)m(kslash-escap)s(e)j(sequences)f(b)m(y)f
+(de-)1110 897 y(fault.)630 1056 y(The)c(return)f(status)i(when)f
+(listing)h(options)g(is)f(zero)i(if)e(all)i Fq(optnames)i
+Ft(are)d(enabled,)g(non-)630 1166 y(zero)40 b(otherwise.)66
+b(When)39 b(setting)h(or)f(unsetting)g(options,)i(the)e(return)f
+(status)h(is)g(zero)630 1275 y(unless)30 b(an)g Fq(optname)36
+b Ft(is)30 b(not)h(a)g(v)-5 b(alid)30 b(shell)h(option.)150
+1508 y Fr(4.4)68 b(Sp)t(ecial)45 b(Builtins)150 1667
+y Ft(F)-8 b(or)35 b(historical)h(reasons,)g(the)e Fl(posix)g
+Ft(standard)f(has)i(classi\014ed)f(sev)m(eral)i(builtin)e(commands)g
+(as)h Fk(sp)-5 b(e-)150 1777 y(cial)p Ft(.)47 b(When)33
+b(Bash)f(is)h(executing)g(in)f Fl(posix)g Ft(mo)s(de,)h(the)g(sp)s
+(ecial)g(builtins)e(di\013er)i(from)f(other)g(builtin)150
+1886 y(commands)e(in)g(three)h(resp)s(ects:)199 2021
+y(1.)61 b(Sp)s(ecial)31 b(builtins)e(are)i(found)e(b)s(efore)h(shell)h
+(functions)f(during)f(command)h(lo)s(okup.)199 2155 y(2.)61
+b(If)30 b(a)h(sp)s(ecial)g(builtin)f(returns)f(an)h(error)g(status,)h
+(a)g(non-in)m(teractiv)m(e)i(shell)d(exits.)199 2290
+y(3.)61 b(Assignmen)m(t)30 b(statemen)m(ts)h(preceding)f(the)f(command)
+g(sta)m(y)i(in)e(e\013ect)i(in)e(the)h(shell)f(en)m(vironmen)m(t)330
+2399 y(after)i(the)f(command)h(completes.)275 2559 y(When)36
+b(Bash)g(is)h(not)f(executing)i(in)e Fl(posix)f Ft(mo)s(de,)j(these)f
+(builtins)f(b)s(eha)m(v)m(e)h(no)f(di\013eren)m(tly)h(than)150
+2668 y(the)31 b(rest)f(of)h(the)f(Bash)h(builtin)e(commands.)41
+b(The)30 b(Bash)g Fl(posix)g Ft(mo)s(de)g(is)g(describ)s(ed)f(in)h
+(Section)h(6.11)150 2778 y([Bash)g(POSIX)e(Mo)s(de],)i(page)g(84.)275
+2912 y(These)f(are)g(the)h Fl(posix)f Ft(sp)s(ecial)h(builtins:)390
+3047 y Fs(break)46 b(:)i(.)f(continue)f(eval)g(exec)h(exit)g(export)f
+(readonly)f(return)h(set)390 3156 y(shift)g(trap)h(unset)p
+eop end
+%%Page: 60 66
+TeXDict begin 60 65 bop eop end
+%%Page: 61 67
+TeXDict begin 61 66 bop 150 -116 a Ft(Chapter)30 b(5:)41
+b(Shell)30 b(V)-8 b(ariables)2459 b(61)150 299 y Fo(5)80
+b(Shell)53 b(V)-13 b(ariables)150 559 y Ft(This)21 b(c)m(hapter)i
+(describ)s(es)e(the)i(shell)f(v)-5 b(ariables)23 b(that)f(Bash)h(uses.)
+37 b(Bash)23 b(automatically)h(assigns)f(default)150
+668 y(v)-5 b(alues)31 b(to)g(a)g(n)m(um)m(b)s(er)e(of)h(v)-5
+b(ariables.)150 914 y Fr(5.1)68 b(Bourne)45 b(Shell)g(V)-11
+b(ariables)150 1073 y Ft(Bash)30 b(uses)g(certain)h(shell)g(v)-5
+b(ariables)31 b(in)f(the)g(same)h(w)m(a)m(y)g(as)g(the)f(Bourne)g
+(shell.)41 b(In)30 b(some)g(cases,)i(Bash)150 1183 y(assigns)f(a)f
+(default)h(v)-5 b(alue)31 b(to)g(the)f(v)-5 b(ariable.)150
+1355 y Fs(CDPATH)192 b Ft(A)39 b(colon-separated)i(list)e(of)g
+(directories)h(used)f(as)g(a)g(searc)m(h)h(path)e(for)h(the)g
+Fs(cd)f Ft(builtin)630 1464 y(command.)150 1632 y Fs(HOME)288
+b Ft(The)23 b(curren)m(t)h(user's)f(home)g(directory;)k(the)d(default)g
+(for)f(the)h Fs(cd)f Ft(builtin)g(command.)38 b(The)630
+1742 y(v)-5 b(alue)37 b(of)f(this)g(v)-5 b(ariable)37
+b(is)g(also)g(used)e(b)m(y)h(tilde)h(expansion)f(\(see)i(Section)f
+(3.5.2)h([Tilde)630 1852 y(Expansion],)30 b(page)h(19\).)150
+2020 y Fs(IFS)336 b Ft(A)25 b(list)i(of)e(c)m(haracters)i(that)f
+(separate)g(\014elds;)h(used)e(when)f(the)i(shell)f(splits)h(w)m(ords)e
+(as)i(part)630 2129 y(of)31 b(expansion.)150 2297 y Fs(MAIL)288
+b Ft(If)26 b(this)f(parameter)i(is)f(set)g(to)h(a)g(\014lename)f(and)f
+(the)h Fs(MAILPATH)e Ft(v)-5 b(ariable)27 b(is)f(not)g(set,)i(Bash)630
+2407 y(informs)i(the)g(user)g(of)g(the)h(arriv)-5 b(al)31
+b(of)f(mail)h(in)f(the)h(sp)s(eci\014ed)f(\014le.)150
+2575 y Fs(MAILPATH)96 b Ft(A)33 b(colon-separated)i(list)f(of)f
+(\014lenames)h(whic)m(h)f(the)g(shell)g(p)s(erio)s(dically)h(c)m(hec)m
+(ks)g(for)f(new)630 2684 y(mail.)60 b(Eac)m(h)37 b(list)g(en)m(try)g
+(can)g(sp)s(ecify)f(the)h(message)h(that)f(is)g(prin)m(ted)f(when)f
+(new)h(mail)630 2794 y(arriv)m(es)29 b(in)g(the)g(mail)g(\014le)g(b)m
+(y)g(separating)g(the)g(\014le)g(name)g(from)f(the)h(message)h(with)e
+(a)i(`)p Fs(?)p Ft('.)630 2903 y(When)i(used)f(in)h(the)g(text)i(of)e
+(the)g(message,)i Fs($_)e Ft(expands)f(to)i(the)f(name)g(of)h(the)f
+(curren)m(t)630 3013 y(mail)f(\014le.)150 3181 y Fs(OPTARG)192
+b Ft(The)30 b(v)-5 b(alue)31 b(of)f(the)h(last)g(option)g(argumen)m(t)g
+(pro)s(cessed)f(b)m(y)g(the)g Fs(getopts)f Ft(builtin.)150
+3349 y Fs(OPTIND)192 b Ft(The)30 b(index)g(of)g(the)h(last)g(option)g
+(argumen)m(t)g(pro)s(cessed)f(b)m(y)g(the)g Fs(getopts)f
+Ft(builtin.)150 3517 y Fs(PATH)288 b Ft(A)32 b(colon-separated)i(list)f
+(of)f(directories)h(in)e(whic)m(h)h(the)g(shell)g(lo)s(oks)h(for)f
+(commands.)45 b(A)630 3626 y(zero-length)e(\(n)m(ull\))g(directory)f
+(name)g(in)g(the)g(v)-5 b(alue)42 b(of)g Fs(PATH)f Ft(indicates)i(the)f
+(curren)m(t)630 3736 y(directory)-8 b(.)49 b(A)33 b(n)m(ull)f
+(directory)i(name)e(ma)m(y)i(app)s(ear)e(as)h(t)m(w)m(o)h(adjacen)m(t)g
+(colons,)g(or)f(as)g(an)630 3846 y(initial)f(or)e(trailing)h(colon.)150
+4014 y Fs(PS1)336 b Ft(The)35 b(primary)f(prompt)h(string.)55
+b(The)35 b(default)h(v)-5 b(alue)35 b(is)h(`)p Fs(\\s-\\v\\$)28
+b Ft('.)56 b(See)36 b(Section)g(6.9)630 4123 y([Prin)m(ting)28
+b(a)g(Prompt],)g(page)h(82,)g(for)e(the)h(complete)h(list)g(of)e(escap)
+s(e)h(sequences)g(that)h(are)630 4233 y(expanded)h(b)s(efore)g
+Fs(PS1)f Ft(is)h(displa)m(y)m(ed.)150 4401 y Fs(PS2)336
+b Ft(The)30 b(secondary)g(prompt)g(string.)41 b(The)29
+b(default)i(v)-5 b(alue)31 b(is)f(`)p Fs(>)g Ft('.)150
+4646 y Fr(5.2)68 b(Bash)45 b(V)-11 b(ariables)150 4805
+y Ft(These)45 b(v)-5 b(ariables)46 b(are)g(set)g(or)f(used)f(b)m(y)h
+(Bash,)50 b(but)44 b(other)i(shells)f(do)h(not)f(normally)h(treat)g
+(them)150 4915 y(sp)s(ecially)-8 b(.)275 5058 y(A)24
+b(few)g(v)-5 b(ariables)24 b(used)g(b)m(y)f(Bash)i(are)f(describ)s(ed)f
+(in)h(di\013eren)m(t)g(c)m(hapters:)38 b(v)-5 b(ariables)25
+b(for)f(con)m(trolling)150 5168 y(the)31 b(job)f(con)m(trol)h
+(facilities)i(\(see)e(Section)g(7.3)h([Job)e(Con)m(trol)h(V)-8
+b(ariables],)32 b(page)g(92\).)150 5340 y Fs(BASH)288
+b Ft(The)30 b(full)g(pathname)g(used)g(to)h(execute)h(the)e(curren)m(t)
+g(instance)h(of)g(Bash.)p eop end
+%%Page: 62 68
+TeXDict begin 62 67 bop 150 -116 a Ft(62)2572 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fs(BASHOPTS)96 b Ft(A)31
+b(colon-separated)h(list)f(of)g(enabled)f(shell)h(options.)41
+b(Eac)m(h)31 b(w)m(ord)f(in)g(the)h(list)g(is)g(a)g(v)-5
+b(alid)630 408 y(argumen)m(t)33 b(for)g(the)f(`)p Fs(-s)p
+Ft(')h(option)g(to)g(the)g Fs(shopt)e Ft(builtin)i(command)f(\(see)i
+(Section)f(4.3.2)630 518 y([The)j(Shopt)g(Builtin],)i(page)f(55\).)60
+b(The)36 b(options)h(app)s(earing)f(in)g Fs(BASHOPTS)e
+Ft(are)i(those)630 628 y(rep)s(orted)e(as)h(`)p Fs(on)p
+Ft(')f(b)m(y)h(`)p Fs(shopt)p Ft('.)53 b(If)34 b(this)g(v)-5
+b(ariable)36 b(is)f(in)f(the)h(en)m(vironmen)m(t)g(when)f(Bash)630
+737 y(starts)25 b(up,)f(eac)m(h)i(shell)e(option)h(in)e(the)i(list)g
+(will)f(b)s(e)g(enabled)g(b)s(efore)g(reading)g(an)m(y)g(startup)630
+847 y(\014les.)41 b(This)29 b(v)-5 b(ariable)31 b(is)g(readonly)-8
+b(.)150 998 y Fs(BASHPID)144 b Ft(Expands)36 b(to)j(the)f(pro)s(cess)g
+(id)f(of)h(the)g(curren)m(t)g(Bash)g(pro)s(cess.)63 b(This)37
+b(di\013ers)g(from)h Fs($$)630 1107 y Ft(under)31 b(certain)j
+(circumstances,)h(suc)m(h)e(as)g(subshells)f(that)i(do)f(not)g(require)
+g(Bash)g(to)h(b)s(e)630 1217 y(re-initialized.)150 1367
+y Fs(BASH_ALIASES)630 1477 y Ft(An)40 b(asso)s(ciativ)m(e)j(arra)m(y)d
+(v)-5 b(ariable)41 b(whose)f(mem)m(b)s(ers)f(corresp)s(ond)g(to)i(the)f
+(in)m(ternal)h(list)630 1587 y(of)g(aliases)h(as)f(main)m(tained)g(b)m
+(y)g(the)f Fs(alias)g Ft(builtin)g(\(see)h(Section)h(4.1)f([Bourne)g
+(Shell)630 1696 y(Builtins],)36 b(page)e(35\).)53 b(Elemen)m(ts)35
+b(added)e(to)i(this)e(arra)m(y)i(app)s(ear)e(in)h(the)g(alias)h(list;)i
+(un-)630 1806 y(setting)31 b(arra)m(y)g(elemen)m(ts)h(cause)f(aliases)h
+(to)f(b)s(e)f(remo)m(v)m(ed)h(from)f(the)h(alias)g(list.)150
+1956 y Fs(BASH_ARGC)630 2066 y Ft(An)f(arra)m(y)h(v)-5
+b(ariable)31 b(whose)f(v)-5 b(alues)31 b(are)g(the)f(n)m(um)m(b)s(er)g
+(of)g(parameters)h(in)f(eac)m(h)h(frame)g(of)630 2176
+y(the)26 b(curren)m(t)f(bash)g(execution)i(call)g(stac)m(k.)41
+b(The)25 b(n)m(um)m(b)s(er)g(of)h(parameters)g(to)g(the)g(curren)m(t)
+630 2285 y(subroutine)i(\(shell)i(function)g(or)f(script)g(executed)i
+(with)e Fs(.)g Ft(or)h Fs(source)p Ft(\))e(is)h(at)h(the)g(top)g(of)630
+2395 y(the)37 b(stac)m(k.)63 b(When)37 b(a)h(subroutine)e(is)h
+(executed,)j(the)e(n)m(um)m(b)s(er)d(of)j(parameters)f(passed)630
+2504 y(is)g(pushed)f(on)m(to)i Fs(BASH_ARGC)p Ft(.)59
+b(The)37 b(shell)g(sets)h Fs(BASH_ARGC)c Ft(only)k(when)e(in)h
+(extended)630 2614 y(debugging)23 b(mo)s(de)f(\(see)h(Section)g(4.3.2)i
+([The)d(Shopt)g(Builtin],)j(page)e(55)h(for)e(a)h(description)630
+2724 y(of)31 b(the)f Fs(extdebug)e Ft(option)j(to)g(the)g
+Fs(shopt)e Ft(builtin\).)150 2874 y Fs(BASH_ARGV)630
+2984 y Ft(An)24 b(arra)m(y)g(v)-5 b(ariable)25 b(con)m(taining)h(all)f
+(of)f(the)h(parameters)f(in)g(the)g(curren)m(t)g(bash)g(execution)630
+3093 y(call)35 b(stac)m(k.)53 b(The)34 b(\014nal)g(parameter)g(of)g
+(the)g(last)h(subroutine)e(call)i(is)f(at)h(the)f(top)h(of)f(the)630
+3203 y(stac)m(k;)28 b(the)c(\014rst)f(parameter)i(of)f(the)g(initial)i
+(call)f(is)f(at)h(the)f(b)s(ottom.)39 b(When)24 b(a)g(subroutine)630
+3313 y(is)40 b(executed,)j(the)d(parameters)h(supplied)d(are)i(pushed)f
+(on)m(to)i Fs(BASH_ARGV)p Ft(.)66 b(The)40 b(shell)630
+3422 y(sets)28 b Fs(BASH_ARGV)e Ft(only)i(when)f(in)h(extended)g
+(debugging)g(mo)s(de)g(\(see)h(Section)f(4.3.2)i([The)630
+3532 y(Shopt)i(Builtin],)h(page)g(55)g(for)f(a)h(description)f(of)h
+(the)f Fs(extdebug)e Ft(option)j(to)g(the)f Fs(shopt)630
+3641 y Ft(builtin\).)150 3792 y Fs(BASH_CMDS)630 3902
+y Ft(An)i(asso)s(ciativ)m(e)i(arra)m(y)f(v)-5 b(ariable)35
+b(whose)f(mem)m(b)s(ers)f(corresp)s(ond)g(to)i(the)f(in)m(ternal)h
+(hash)630 4011 y(table)c(of)g(commands)f(as)g(main)m(tained)h(b)m(y)g
+(the)f Fs(hash)f Ft(builtin)h(\(see)h(Section)g(4.1)h([Bourne)630
+4121 y(Shell)23 b(Builtins],)j(page)e(35\).)40 b(Elemen)m(ts)24
+b(added)e(to)j(this)e(arra)m(y)h(app)s(ear)e(in)i(the)f(hash)g(table;)
+630 4230 y(unsetting)30 b(arra)m(y)h(elemen)m(ts)h(cause)f(commands)f
+(to)h(b)s(e)f(remo)m(v)m(ed)h(from)f(the)h(hash)e(table.)150
+4381 y Fs(BASH_COMMAND)630 4491 y Ft(The)39 b(command)h(curren)m(tly)g
+(b)s(eing)f(executed)i(or)e(ab)s(out)h(to)g(b)s(e)f(executed,)44
+b(unless)39 b(the)630 4600 y(shell)g(is)g(executing)g(a)g(command)g(as)
+g(the)f(result)h(of)g(a)g(trap,)i(in)d(whic)m(h)g(case)i(it)f(is)g(the)
+630 4710 y(command)30 b(executing)i(at)f(the)f(time)h(of)g(the)g(trap.)
+150 4861 y Fs(BASH_ENV)96 b Ft(If)28 b(this)g(v)-5 b(ariable)30
+b(is)e(set)h(when)f(Bash)g(is)h(in)m(v)m(ok)m(ed)h(to)f(execute)h(a)e
+(shell)h(script,)g(its)g(v)-5 b(alue)29 b(is)630 4970
+y(expanded)k(and)h(used)g(as)g(the)h(name)f(of)g(a)h(startup)f(\014le)g
+(to)h(read)f(b)s(efore)g(executing)i(the)630 5080 y(script.)41
+b(See)30 b(Section)h(6.2)h([Bash)f(Startup)e(Files],)j(page)f(73.)150
+5230 y Fs(BASH_EXECUTION_STRING)630 5340 y Ft(The)f(command)g(argumen)m
+(t)h(to)g(the)g(`)p Fs(-c)p Ft(')f(in)m(v)m(o)s(cation)i(option.)p
+eop end
+%%Page: 63 69
+TeXDict begin 63 68 bop 150 -116 a Ft(Chapter)30 b(5:)41
+b(Shell)30 b(V)-8 b(ariables)2459 b(63)150 299 y Fs(BASH_LINENO)630
+408 y Ft(An)38 b(arra)m(y)h(v)-5 b(ariable)39 b(whose)g(mem)m(b)s(ers)e
+(are)i(the)g(line)g(n)m(um)m(b)s(ers)e(in)h(source)h(\014les)f(corre-)
+630 518 y(sp)s(onding)g(to)i(eac)m(h)h(mem)m(b)s(er)e(of)h
+Fq(FUNCNAME)5 b Ft(.)41 b Fs(${BASH_LINENO[$i]})34 b
+Ft(is)40 b(the)g(line)630 628 y(n)m(um)m(b)s(er)47 b(in)h(the)g(source)
+h(\014le)f(where)g Fs(${FUNCNAME[$i]})c Ft(w)m(as)49
+b(called)g(\(or)g Fs(${BASH_)630 737 y(LINENO[$i-1]})22
+b Ft(if)j(referenced)g(within)f(another)i(shell)f(function\).)39
+b(The)25 b(corresp)s(onding)630 847 y(source)f(\014le)h(name)f(is)g
+Fs(${BASH_SOURCE[$i]})p Ft(.)34 b(Use)25 b Fs(LINENO)d
+Ft(to)j(obtain)g(the)g(curren)m(t)f(line)630 956 y(n)m(um)m(b)s(er.)150
+1112 y Fs(BASH_REMATCH)630 1221 y Ft(An)43 b(arra)m(y)i(v)-5
+b(ariable)44 b(whose)g(mem)m(b)s(ers)f(are)h(assigned)g(b)m(y)f(the)h
+(`)p Fs(=~)p Ft(')g(binary)f(op)s(erator)630 1331 y(to)37
+b(the)f Fs([[)g Ft(conditional)i(command)e(\(see)h(Section)g(3.2.4.2)i
+([Conditional)e(Constructs],)630 1440 y(page)e(10\).)52
+b(The)33 b(elemen)m(t)j(with)d(index)g(0)i(is)f(the)g(p)s(ortion)f(of)h
+(the)g(string)g(matc)m(hing)h(the)630 1550 y(en)m(tire)29
+b(regular)f(expression.)40 b(The)27 b(elemen)m(t)j(with)d(index)h
+Fq(n)f Ft(is)h(the)g(p)s(ortion)g(of)g(the)g(string)630
+1660 y(matc)m(hing)j(the)g Fq(n)p Ft(th)f(paren)m(thesized)h(sub)s
+(expression.)39 b(This)29 b(v)-5 b(ariable)31 b(is)g(read-only)-8
+b(.)150 1815 y Fs(BASH_SOURCE)630 1924 y Ft(An)24 b(arra)m(y)h(v)-5
+b(ariable)26 b(whose)e(mem)m(b)s(ers)g(are)h(the)g(source)f
+(\014lenames)h(corresp)s(onding)e(to)j(the)630 2034 y(elemen)m(ts)32
+b(in)e(the)g Fs(FUNCNAME)e Ft(arra)m(y)j(v)-5 b(ariable.)150
+2189 y Fs(BASH_SUBSHELL)630 2299 y Ft(Incremen)m(ted)34
+b(b)m(y)h(one)f(eac)m(h)i(time)f(a)f(subshell)g(or)g(subshell)f(en)m
+(vironmen)m(t)i(is)f(spa)m(wned.)630 2408 y(The)c(initial)h(v)-5
+b(alue)31 b(is)g(0.)150 2564 y Fs(BASH_VERSINFO)630 2673
+y Ft(A)36 b(readonly)g(arra)m(y)g(v)-5 b(ariable)37 b(\(see)f(Section)h
+(6.7)g([Arra)m(ys],)h(page)e(80\))h(whose)f(mem)m(b)s(ers)630
+2783 y(hold)c(v)m(ersion)h(information)f(for)g(this)g(instance)h(of)g
+(Bash.)46 b(The)32 b(v)-5 b(alues)32 b(assigned)h(to)g(the)630
+2892 y(arra)m(y)e(mem)m(b)s(ers)e(are)i(as)g(follo)m(ws:)630
+3048 y Fs(BASH_VERSINFO[0])1110 3157 y Ft(The)f(ma)5
+b(jor)30 b(v)m(ersion)h(n)m(um)m(b)s(er)e(\(the)i Fq(release)5
+b Ft(\).)630 3313 y Fs(BASH_VERSINFO[1])1110 3422 y Ft(The)30
+b(minor)g(v)m(ersion)h(n)m(um)m(b)s(er)e(\(the)i Fq(v)m(ersion)p
+Ft(\).)630 3577 y Fs(BASH_VERSINFO[2])1110 3687 y Ft(The)f(patc)m(h)h
+(lev)m(el.)630 3842 y Fs(BASH_VERSINFO[3])1110 3952 y
+Ft(The)f(build)f(v)m(ersion.)630 4107 y Fs(BASH_VERSINFO[4])1110
+4217 y Ft(The)h(release)i(status)e(\(e.g.,)j Fq(b)s(eta1)7
+b Ft(\).)630 4372 y Fs(BASH_VERSINFO[5])1110 4482 y Ft(The)30
+b(v)-5 b(alue)31 b(of)f Fs(MACHTYPE)p Ft(.)150 4637 y
+Fs(BASH_VERSION)630 4746 y Ft(The)g(v)m(ersion)h(n)m(um)m(b)s(er)e(of)h
+(the)h(curren)m(t)f(instance)h(of)g(Bash.)150 4902 y
+Fs(BASH_XTRACEFD)630 5011 y Ft(If)f(set)h(to)h(an)e(in)m(teger)i
+(corresp)s(onding)e(to)h(a)g(v)-5 b(alid)31 b(\014le)g(descriptor,)g
+(Bash)g(will)g(write)g(the)630 5121 y(trace)37 b(output)f(generated)h
+(when)f(`)p Fs(set)29 b(-x)p Ft(')36 b(is)g(enabled)h(to)g(that)f
+(\014le)h(descriptor.)58 b(This)630 5230 y(allo)m(ws)29
+b(tracing)h(output)d(to)i(b)s(e)f(separated)g(from)g(diagnostic)h(and)f
+(error)f(messages.)41 b(The)630 5340 y(\014le)31 b(descriptor)f(is)h
+(closed)g(when)f Fs(BASH_XTRACEFD)d Ft(is)k(unset)f(or)g(assigned)h(a)g
+(new)f(v)-5 b(alue.)p eop end
+%%Page: 64 70
+TeXDict begin 64 69 bop 150 -116 a Ft(64)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y(Unsetting)45 b Fs(BASH_XTRACEFD)40
+b Ft(or)k(assigning)g(it)g(the)g(empt)m(y)h(string)e(causes)i(the)f
+(trace)630 408 y(output)33 b(to)i(b)s(e)d(sen)m(t)j(to)f(the)g
+(standard)e(error.)50 b(Note)35 b(that)g(setting)f Fs(BASH_XTRACEFD)c
+Ft(to)630 518 y(2)39 b(\(the)h(standard)e(error)g(\014le)h
+(descriptor\))h(and)e(then)h(unsetting)g(it)g(will)g(result)g(in)g(the)
+630 628 y(standard)30 b(error)g(b)s(eing)f(closed.)150
+819 y Fs(COLUMNS)144 b Ft(Used)36 b(b)m(y)h(the)f Fs(select)f
+Ft(builtin)h(command)h(to)g(determine)f(the)h(terminal)g(width)f(when)
+630 929 y(prin)m(ting)30 b(selection)i(lists.)42 b(Automatically)33
+b(set)e(up)s(on)d(receipt)k(of)e(a)h Fs(SIGWINCH)p Ft(.)150
+1121 y Fs(COMP_CWORD)630 1230 y Ft(An)38 b(index)g(in)m(to)h
+Fs(${COMP_WORDS})c Ft(of)k(the)g(w)m(ord)f(con)m(taining)i(the)e
+(curren)m(t)g(cursor)g(p)s(o-)630 1340 y(sition.)72 b(This)40
+b(v)-5 b(ariable)41 b(is)f(a)m(v)-5 b(ailable)43 b(only)e(in)f(shell)h
+(functions)f(in)m(v)m(ok)m(ed)i(b)m(y)e(the)h(pro-)630
+1450 y(grammable)36 b(completion)g(facilities)i(\(see)e(Section)g(8.6)g
+([Programmable)g(Completion],)630 1559 y(page)31 b(115\).)150
+1751 y Fs(COMP_LINE)630 1861 y Ft(The)38 b(curren)m(t)h(command)f
+(line.)66 b(This)37 b(v)-5 b(ariable)40 b(is)f(a)m(v)-5
+b(ailable)41 b(only)d(in)h(shell)f(functions)630 1970
+y(and)25 b(external)h(commands)f(in)m(v)m(ok)m(ed)h(b)m(y)f(the)h
+(programmable)f(completion)i(facilities)g(\(see)630 2080
+y(Section)k(8.6)h([Programmable)f(Completion],)g(page)g(115\).)150
+2271 y Fs(COMP_POINT)630 2381 y Ft(The)25 b(index)g(of)h(the)g(curren)m
+(t)f(cursor)g(p)s(osition)h(relativ)m(e)i(to)e(the)g(b)s(eginning)f(of)
+g(the)h(curren)m(t)630 2491 y(command.)40 b(If)27 b(the)h(curren)m(t)g
+(cursor)g(p)s(osition)g(is)g(at)g(the)g(end)g(of)g(the)g(curren)m(t)g
+(command,)630 2600 y(the)i(v)-5 b(alue)30 b(of)g(this)g(v)-5
+b(ariable)31 b(is)f(equal)g(to)h Fs(${#COMP_LINE})p Ft(.)37
+b(This)29 b(v)-5 b(ariable)31 b(is)f(a)m(v)-5 b(ailable)630
+2710 y(only)36 b(in)f(shell)h(functions)f(and)g(external)h(commands)g
+(in)m(v)m(ok)m(ed)h(b)m(y)e(the)h(programmable)630 2819
+y(completion)c(facilities)g(\(see)g(Section)f(8.6)g([Programmable)g
+(Completion],)h(page)f(115\).)150 3011 y Fs(COMP_TYPE)630
+3121 y Ft(Set)c(to)h(an)f(in)m(teger)h(v)-5 b(alue)28
+b(corresp)s(onding)e(to)h(the)h(t)m(yp)s(e)f(of)g(completion)h
+(attempted)g(that)630 3230 y(caused)e(a)g(completion)i(function)d(to)i
+(b)s(e)e(called:)40 b Fq(T)-8 b(AB)5 b Ft(,)27 b(for)f(normal)g
+(completion,)i(`)p Fs(?)p Ft(',)f(for)630 3340 y(listing)35
+b(completions)h(after)f(successiv)m(e)g(tabs,)h(`)p Fs(!)p
+Ft(',)g(for)e(listing)h(alternativ)m(es)i(on)d(partial)630
+3450 y(w)m(ord)22 b(completion,)k(`)p Fs(@)p Ft(',)f(to)e(list)g
+(completions)h(if)f(the)g(w)m(ord)f(is)h(not)g(unmo)s(di\014ed,)f(or)h
+(`)p Fs(\045)p Ft(',)h(for)630 3559 y(men)m(u)i(completion.)41
+b(This)25 b(v)-5 b(ariable)27 b(is)g(a)m(v)-5 b(ailable)28
+b(only)f(in)f(shell)g(functions)g(and)g(external)630
+3669 y(commands)32 b(in)m(v)m(ok)m(ed)i(b)m(y)e(the)g(programmable)h
+(completion)g(facilities)i(\(see)e(Section)g(8.6)630
+3778 y([Programmable)e(Completion],)h(page)f(115\).)150
+3970 y Fs(COMP_KEY)96 b Ft(The)29 b(k)m(ey)i(\(or)g(\014nal)e(k)m(ey)i
+(of)f(a)g(k)m(ey)h(sequence\))g(used)e(to)i(in)m(v)m(ok)m(e)h(the)e
+(curren)m(t)g(completion)630 4080 y(function.)150 4271
+y Fs(COMP_WORDBREAKS)630 4381 y Ft(The)f(set)i(of)e(c)m(haracters)j
+(that)e(the)g(Readline)g(library)g(treats)g(as)g(w)m(ord)g(separators)g
+(when)630 4491 y(p)s(erforming)i(w)m(ord)h(completion.)51
+b(If)33 b Fs(COMP_WORDBREAKS)c Ft(is)34 b(unset,)g(it)f(loses)i(its)e
+(sp)s(ecial)630 4600 y(prop)s(erties,)d(ev)m(en)h(if)f(it)h(is)g
+(subsequen)m(tly)f(reset.)150 4792 y Fs(COMP_WORDS)630
+4902 y Ft(An)36 b(arra)m(y)g(v)-5 b(ariable)37 b(consisting)g(of)f(the)
+g(individual)f(w)m(ords)h(in)f(the)h(curren)m(t)g(command)630
+5011 y(line.)94 b(The)47 b(line)i(is)f(split)g(in)m(to)h(w)m(ords)e(as)
+h(Readline)h(w)m(ould)f(split)g(it,)53 b(using)47 b Fs(COMP_)630
+5121 y(WORDBREAKS)34 b Ft(as)i(describ)s(ed)g(ab)s(o)m(v)m(e.)60
+b(This)36 b(v)-5 b(ariable)37 b(is)f(a)m(v)-5 b(ailable)39
+b(only)e(in)f(shell)h(func-)630 5230 y(tions)32 b(in)m(v)m(ok)m(ed)i(b)
+m(y)d(the)i(programmable)f(completion)h(facilities)h(\(see)f(Section)g
+(8.6)g([Pro-)630 5340 y(grammable)e(Completion],)g(page)g(115\).)p
+eop end
+%%Page: 65 71
+TeXDict begin 65 70 bop 150 -116 a Ft(Chapter)30 b(5:)41
+b(Shell)30 b(V)-8 b(ariables)2459 b(65)150 299 y Fs(COMPREPLY)630
+408 y Ft(An)37 b(arra)m(y)h(v)-5 b(ariable)38 b(from)f(whic)m(h)g(Bash)
+g(reads)g(the)h(p)s(ossible)e(completions)j(generated)630
+518 y(b)m(y)33 b(a)g(shell)h(function)f(in)m(v)m(ok)m(ed)h(b)m(y)f(the)
+g(programmable)h(completion)g(facilit)m(y)h(\(see)f(Sec-)630
+628 y(tion)d(8.6)g([Programmable)g(Completion],)h(page)f(115\).)150
+774 y Fs(DIRSTACK)96 b Ft(An)26 b(arra)m(y)h(v)-5 b(ariable)28
+b(con)m(taining)g(the)f(curren)m(t)f(con)m(ten)m(ts)j(of)e(the)f
+(directory)i(stac)m(k.)41 b(Direc-)630 883 y(tories)33
+b(app)s(ear)f(in)g(the)h(stac)m(k)h(in)e(the)h(order)f(they)h(are)g
+(displa)m(y)m(ed)g(b)m(y)f(the)h Fs(dirs)e Ft(builtin.)630
+993 y(Assigning)f(to)h(mem)m(b)s(ers)f(of)g(this)g(arra)m(y)g(v)-5
+b(ariable)31 b(ma)m(y)g(b)s(e)e(used)h(to)h(mo)s(dify)e(directories)630
+1103 y(already)41 b(in)f(the)h(stac)m(k,)k(but)40 b(the)h
+Fs(pushd)e Ft(and)h Fs(popd)f Ft(builtins)h(m)m(ust)h(b)s(e)e(used)h
+(to)i(add)630 1212 y(and)37 b(remo)m(v)m(e)h(directories.)63
+b(Assignmen)m(t)37 b(to)h(this)f(v)-5 b(ariable)38 b(will)g(not)f(c)m
+(hange)i(the)e(cur-)630 1322 y(ren)m(t)c(directory)-8
+b(.)47 b(If)32 b Fs(DIRSTACK)e Ft(is)i(unset,)g(it)h(loses)g(its)g(sp)s
+(ecial)g(prop)s(erties,)f(ev)m(en)h(if)f(it)h(is)630
+1431 y(subsequen)m(tly)d(reset.)150 1577 y Fs(EMACS)240
+b Ft(If)31 b(Bash)h(\014nds)d(this)j(v)-5 b(ariable)32
+b(in)f(the)h(en)m(vironmen)m(t)g(when)e(the)i(shell)f(starts)h(with)f
+(v)-5 b(alue)630 1687 y(`)p Fs(t)p Ft(',)38 b(it)e(assumes)g(that)g
+(the)h(shell)f(is)g(running)e(in)i(an)g(emacs)g(shell)h(bu\013er)e(and)
+g(disables)630 1797 y(line)c(editing.)150 1943 y Fs(EUID)288
+b Ft(The)30 b(n)m(umeric)g(e\013ectiv)m(e)j(user)d(id)g(of)g(the)h
+(curren)m(t)f(user.)40 b(This)30 b(v)-5 b(ariable)31
+b(is)f(readonly)-8 b(.)150 2089 y Fs(FCEDIT)192 b Ft(The)30
+b(editor)h(used)e(as)i(a)g(default)f(b)m(y)h(the)f(`)p
+Fs(-e)p Ft(')g(option)h(to)g(the)g Fs(fc)f Ft(builtin)g(command.)150
+2235 y Fs(FIGNORE)144 b Ft(A)35 b(colon-separated)i(list)f(of)g
+(su\016xes)e(to)i(ignore)g(when)e(p)s(erforming)g(\014lename)i(comple-)
+630 2345 y(tion.)j(A)25 b(\014le)g(name)g(whose)f(su\016x)g(matc)m(hes)
+i(one)f(of)g(the)g(en)m(tries)g(in)g Fs(FIGNORE)d Ft(is)j(excluded)630
+2454 y(from)30 b(the)g(list)h(of)g(matc)m(hed)g(\014le)g(names.)40
+b(A)31 b(sample)f(v)-5 b(alue)31 b(is)g(`)p Fs(.o:~)p
+Ft(')150 2600 y Fs(FUNCNAME)96 b Ft(An)35 b(arra)m(y)i(v)-5
+b(ariable)36 b(con)m(taining)h(the)f(names)g(of)g(all)g(shell)g
+(functions)g(curren)m(tly)f(in)h(the)630 2710 y(execution)g(call)h
+(stac)m(k.)57 b(The)34 b(elemen)m(t)j(with)e(index)g(0)h(is)f(the)g
+(name)h(of)f(an)m(y)h(curren)m(tly-)630 2819 y(executing)i(shell)f
+(function.)61 b(The)36 b(b)s(ottom-most)i(elemen)m(t)h(is)e
+Fs("main")p Ft(.)59 b(This)36 b(v)-5 b(ariable)630 2929
+y(exists)33 b(only)g(when)f(a)h(shell)g(function)f(is)h(executing.)49
+b(Assignmen)m(ts)33 b(to)g Fs(FUNCNAME)e Ft(ha)m(v)m(e)630
+3039 y(no)36 b(e\013ect)h(and)e(return)f(an)i(error)f(status.)57
+b(If)36 b Fs(FUNCNAME)d Ft(is)j(unset,)h(it)f(loses)g(its)g(sp)s(ecial)
+630 3148 y(prop)s(erties,)30 b(ev)m(en)h(if)f(it)h(is)g(subsequen)m
+(tly)f(reset.)150 3294 y Fs(GLOBIGNORE)630 3404 y Ft(A)38
+b(colon-separated)i(list)f(of)f(patterns)g(de\014ning)f(the)h(set)g(of)
+h(\014lenames)f(to)g(b)s(e)g(ignored)630 3513 y(b)m(y)31
+b(\014lename)g(expansion.)43 b(If)31 b(a)h(\014lename)f(matc)m(hed)h(b)
+m(y)f(a)g(\014lename)h(expansion)f(pattern)630 3623 y(also)i(matc)m
+(hes)g(one)f(of)g(the)g(patterns)g(in)f Fs(GLOBIGNORE)p
+Ft(,)f(it)i(is)g(remo)m(v)m(ed)h(from)e(the)h(list)h(of)630
+3733 y(matc)m(hes.)150 3879 y Fs(GROUPS)192 b Ft(An)36
+b(arra)m(y)g(v)-5 b(ariable)37 b(con)m(taining)g(the)f(list)h(of)f
+(groups)g(of)g(whic)m(h)f(the)i(curren)m(t)e(user)h(is)g(a)630
+3988 y(mem)m(b)s(er.)47 b(Assignmen)m(ts)33 b(to)g Fs(GROUPS)e
+Ft(ha)m(v)m(e)j(no)f(e\013ect)h(and)e(return)g(an)g(error)g(status.)48
+b(If)630 4098 y Fs(GROUPS)29 b Ft(is)h(unset,)g(it)h(loses)g(its)g(sp)s
+(ecial)g(prop)s(erties,)f(ev)m(en)h(if)f(it)h(is)g(subsequen)m(tly)f
+(reset.)150 4244 y Fs(histchars)630 4354 y Ft(Up)c(to)g(three)g(c)m
+(haracters)i(whic)m(h)d(con)m(trol)j(history)d(expansion,)i(quic)m(k)g
+(substitution,)g(and)630 4463 y(tok)m(enization)k(\(see)f(Section)f
+(9.3)h([History)f(In)m(teraction],)i(page)f(123\).)41
+b(The)29 b(\014rst)e(c)m(harac-)630 4573 y(ter)j(is)f(the)g
+Fq(history)g(expansion)g Ft(c)m(haracter,)j(that)e(is,)f(the)h(c)m
+(haracter)h(whic)m(h)d(signi\014es)i(the)630 4682 y(start)25
+b(of)f(a)h(history)f(expansion,)i(normally)e(`)p Fs(!)p
+Ft('.)39 b(The)24 b(second)g(c)m(haracter)i(is)e(the)g(c)m(haracter)630
+4792 y(whic)m(h)36 b(signi\014es)g(`quic)m(k)h(substitution')f(when)f
+(seen)h(as)g(the)g(\014rst)f(c)m(haracter)j(on)e(a)g(line,)630
+4902 y(normally)27 b(`)p Fs(^)p Ft('.)39 b(The)26 b(optional)i(third)d
+(c)m(haracter)j(is)e(the)h(c)m(haracter)h(whic)m(h)e(indicates)h(that)
+630 5011 y(the)34 b(remainder)f(of)h(the)g(line)g(is)f(a)h(commen)m(t)h
+(when)e(found)f(as)i(the)g(\014rst)f(c)m(haracter)i(of)f(a)630
+5121 y(w)m(ord,)i(usually)f(`)p Fs(#)p Ft('.)55 b(The)34
+b(history)h(commen)m(t)h(c)m(haracter)h(causes)e(history)g
+(substitution)630 5230 y(to)27 b(b)s(e)f(skipp)s(ed)f(for)i(the)f
+(remaining)h(w)m(ords)f(on)h(the)f(line.)40 b(It)27 b(do)s(es)f(not)h
+(necessarily)g(cause)630 5340 y(the)k(shell)f(parser)g(to)h(treat)g
+(the)g(rest)g(of)f(the)h(line)f(as)h(a)g(commen)m(t.)p
+eop end
+%%Page: 66 72
+TeXDict begin 66 71 bop 150 -116 a Ft(66)2572 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fs(HISTCMD)144 b Ft(The)35
+b(history)h(n)m(um)m(b)s(er,)g(or)f(index)g(in)h(the)g(history)f(list,)
+j(of)e(the)g(curren)m(t)f(command.)56 b(If)630 408 y
+Fs(HISTCMD)28 b Ft(is)h(unset,)h(it)g(loses)h(its)f(sp)s(ecial)g(prop)s
+(erties,)g(ev)m(en)g(if)g(it)g(is)g(subsequen)m(tly)f(reset.)150
+552 y Fs(HISTCONTROL)630 661 y Ft(A)40 b(colon-separated)i(list)f(of)f
+(v)-5 b(alues)40 b(con)m(trolling)i(ho)m(w)e(commands)g(are)h(sa)m(v)m
+(ed)g(on)f(the)630 771 y(history)29 b(list.)41 b(If)28
+b(the)h(list)h(of)f(v)-5 b(alues)29 b(includes)f(`)p
+Fs(ignorespace)p Ft(',)f(lines)i(whic)m(h)g(b)s(egin)f(with)630
+881 y(a)39 b(space)g(c)m(haracter)i(are)e(not)g(sa)m(v)m(ed)g(in)g(the)
+g(history)f(list.)66 b(A)39 b(v)-5 b(alue)39 b(of)g(`)p
+Fs(ignoredups)p Ft(')630 990 y(causes)34 b(lines)h(whic)m(h)f(matc)m(h)
+h(the)f(previous)f(history)h(en)m(try)h(to)g(not)f(b)s(e)f(sa)m(v)m
+(ed.)53 b(A)34 b(v)-5 b(alue)630 1100 y(of)32 b(`)p Fs(ignoreboth)p
+Ft(')d(is)j(shorthand)e(for)i(`)p Fs(ignorespace)p Ft(')d(and)i(`)p
+Fs(ignoredups)p Ft('.)42 b(A)32 b(v)-5 b(alue)32 b(of)630
+1209 y(`)p Fs(erasedups)p Ft(')f(causes)i(all)h(previous)f(lines)g
+(matc)m(hing)h(the)f(curren)m(t)g(line)g(to)h(b)s(e)e(remo)m(v)m(ed)630
+1319 y(from)42 b(the)h(history)f(list)i(b)s(efore)e(that)h(line)g(is)g
+(sa)m(v)m(ed.)78 b(An)m(y)43 b(v)-5 b(alue)43 b(not)g(in)f(the)h(ab)s
+(o)m(v)m(e)630 1428 y(list)35 b(is)g(ignored.)53 b(If)34
+b Fs(HISTCONTROL)e Ft(is)i(unset,)i(or)e(do)s(es)h(not)g(include)f(a)h
+(v)-5 b(alid)35 b(v)-5 b(alue,)36 b(all)630 1538 y(lines)30
+b(read)g(b)m(y)g(the)g(shell)g(parser)g(are)g(sa)m(v)m(ed)h(on)f(the)g
+(history)g(list,)h(sub)5 b(ject)30 b(to)g(the)g(v)-5
+b(alue)630 1648 y(of)42 b Fs(HISTIGNORE)p Ft(.)73 b(The)42
+b(second)g(and)g(subsequen)m(t)f(lines)h(of)h(a)f(m)m(ulti-line)h(comp)
+s(ound)630 1757 y(command)33 b(are)h(not)g(tested,)i(and)d(are)h(added)
+f(to)h(the)g(history)g(regardless)g(of)g(the)f(v)-5 b(alue)630
+1867 y(of)31 b Fs(HISTCONTROL)p Ft(.)150 2010 y Fs(HISTFILE)96
+b Ft(The)27 b(name)h(of)g(the)g(\014le)g(to)h(whic)m(h)f(the)g(command)
+f(history)h(is)g(sa)m(v)m(ed.)41 b(The)27 b(default)h(v)-5
+b(alue)630 2120 y(is)30 b(`)p Fs(~/.bash_history)p Ft('.)150
+2263 y Fs(HISTFILESIZE)630 2373 y Ft(The)c(maxim)m(um)f(n)m(um)m(b)s
+(er)g(of)h(lines)h(con)m(tained)g(in)f(the)g(history)g(\014le.)39
+b(When)26 b(this)g(v)-5 b(ariable)630 2482 y(is)33 b(assigned)h(a)g(v)
+-5 b(alue,)35 b(the)f(history)f(\014le)g(is)h(truncated,)g(if)g
+(necessary)-8 b(,)35 b(b)m(y)e(remo)m(ving)i(the)630
+2592 y(oldest)29 b(en)m(tries,)g(to)g(con)m(tain)g(no)f(more)g(than)f
+(that)i(n)m(um)m(b)s(er)e(of)h(lines.)40 b(The)27 b(history)h(\014le)g
+(is)630 2701 y(also)33 b(truncated)e(to)h(this)g(size)g(after)g
+(writing)g(it)g(when)f(an)g(in)m(teractiv)m(e)k(shell)c(exits.)45
+b(The)630 2811 y(default)31 b(v)-5 b(alue)30 b(is)h(500.)150
+2954 y Fs(HISTIGNORE)630 3064 y Ft(A)i(colon-separated)h(list)f(of)g
+(patterns)f(used)g(to)h(decide)g(whic)m(h)f(command)g(lines)h(should)
+630 3173 y(b)s(e)f(sa)m(v)m(ed)h(on)g(the)f(history)h(list.)47
+b(Eac)m(h)33 b(pattern)g(is)f(anc)m(hored)h(at)g(the)f(b)s(eginning)g
+(of)h(the)630 3283 y(line)43 b(and)e(m)m(ust)h(matc)m(h)h(the)g
+(complete)h(line)e(\(no)h(implicit)g(`)p Fs(*)p Ft(')f(is)g(app)s
+(ended\).)75 b(Eac)m(h)630 3393 y(pattern)42 b(is)g(tested)g(against)h
+(the)f(line)g(after)g(the)g(c)m(hec)m(ks)h(sp)s(eci\014ed)e(b)m(y)h
+Fs(HISTCONTROL)630 3502 y Ft(are)37 b(applied.)59 b(In)36
+b(addition)h(to)g(the)g(normal)g(shell)f(pattern)h(matc)m(hing)h(c)m
+(haracters,)i(`)p Fs(&)p Ft(')630 3612 y(matc)m(hes)d(the)f(previous)g
+(history)g(line.)57 b(`)p Fs(&)p Ft(')36 b(ma)m(y)h(b)s(e)e(escap)s(ed)
+h(using)g(a)g(bac)m(kslash;)k(the)630 3721 y(bac)m(kslash)34
+b(is)g(remo)m(v)m(ed)h(b)s(efore)e(attempting)i(a)g(matc)m(h.)51
+b(The)34 b(second)f(and)h(subsequen)m(t)630 3831 y(lines)e(of)h(a)g(m)m
+(ulti-line)g(comp)s(ound)e(command)h(are)h(not)f(tested,)i(and)e(are)g
+(added)g(to)h(the)630 3941 y(history)d(regardless)h(of)g(the)f(v)-5
+b(alue)31 b(of)g Fs(HISTIGNORE)p Ft(.)630 4067 y Fs(HISTIGNORE)20
+b Ft(subsumes)g(the)j(function)f(of)h Fs(HISTCONTROL)p
+Ft(.)35 b(A)23 b(pattern)f(of)h(`)p Fs(&)p Ft(')g(is)f(iden)m(tical)630
+4177 y(to)k Fs(ignoredups)p Ft(,)e(and)h(a)h(pattern)g(of)f(`)p
+Fs([)31 b(]*)p Ft(')25 b(is)h(iden)m(tical)h(to)f Fs(ignorespace)p
+Ft(.)36 b(Com)m(bining)630 4286 y(these)30 b(t)m(w)m(o)h(patterns,)f
+(separating)g(them)g(with)f(a)h(colon,)h(pro)m(vides)e(the)h
+(functionalit)m(y)h(of)630 4396 y Fs(ignoreboth)p Ft(.)150
+4539 y Fs(HISTSIZE)96 b Ft(The)42 b(maxim)m(um)g(n)m(um)m(b)s(er)f(of)i
+(commands)e(to)j(remem)m(b)s(er)d(on)h(the)h(history)f(list.)77
+b(The)630 4649 y(default)31 b(v)-5 b(alue)30 b(is)h(500.)150
+4792 y Fs(HISTTIMEFORMAT)630 4902 y Ft(If)44 b(this)g(v)-5
+b(ariable)45 b(is)f(set)g(and)g(not)g(n)m(ull,)k(its)d(v)-5
+b(alue)44 b(is)g(used)g(as)g(a)h(format)f(string)g(for)630
+5011 y Fq(strftime)c Ft(to)35 b(prin)m(t)f(the)h(time)g(stamp)f(asso)s
+(ciated)i(with)f(eac)m(h)g(history)g(en)m(try)f(displa)m(y)m(ed)630
+5121 y(b)m(y)g(the)f Fs(history)f Ft(builtin.)50 b(If)33
+b(this)h(v)-5 b(ariable)34 b(is)g(set,)h(time)f(stamps)g(are)g(written)
+f(to)i(the)630 5230 y(history)26 b(\014le)g(so)g(they)g(ma)m(y)h(b)s(e)
+e(preserv)m(ed)g(across)i(shell)f(sessions.)39 b(This)25
+b(uses)h(the)g(history)630 5340 y(commen)m(t)31 b(c)m(haracter)h(to)f
+(distinguish)f(timestamps)h(from)f(other)g(history)h(lines.)p
+eop end
+%%Page: 67 73
+TeXDict begin 67 72 bop 150 -116 a Ft(Chapter)30 b(5:)41
+b(Shell)30 b(V)-8 b(ariables)2459 b(67)150 299 y Fs(HOSTFILE)96
+b Ft(Con)m(tains)39 b(the)f(name)g(of)h(a)g(\014le)f(in)g(the)g(same)h
+(format)g(as)f(`)p Fs(/etc/hosts)p Ft(')e(that)j(should)630
+408 y(b)s(e)i(read)h(when)f(the)i(shell)f(needs)f(to)i(complete)h(a)e
+(hostname.)76 b(The)42 b(list)g(of)g(p)s(ossible)630
+518 y(hostname)26 b(completions)g(ma)m(y)h(b)s(e)d(c)m(hanged)j(while)e
+(the)h(shell)g(is)f(running;)h(the)g(next)f(time)630
+628 y(hostname)37 b(completion)i(is)e(attempted)h(after)g(the)f(v)-5
+b(alue)37 b(is)h(c)m(hanged,)h(Bash)e(adds)g(the)630
+737 y(con)m(ten)m(ts)43 b(of)f(the)f(new)g(\014le)h(to)g(the)f
+(existing)i(list.)74 b(If)41 b Fs(HOSTFILE)e Ft(is)i(set,)k(but)c(has)g
+(no)630 847 y(v)-5 b(alue,)29 b(or)e(do)s(es)h(not)g(name)f(a)h
+(readable)g(\014le,)h(Bash)f(attempts)g(to)g(read)g(`)p
+Fs(/etc/hosts)p Ft(')d(to)630 956 y(obtain)j(the)g(list)h(of)f(p)s
+(ossible)f(hostname)h(completions.)41 b(When)28 b Fs(HOSTFILE)e
+Ft(is)i(unset,)g(the)630 1066 y(hostname)j(list)g(is)f(cleared.)150
+1226 y Fs(HOSTNAME)96 b Ft(The)30 b(name)g(of)h(the)f(curren)m(t)h
+(host.)150 1386 y Fs(HOSTTYPE)96 b Ft(A)30 b(string)h(describing)f(the)
+g(mac)m(hine)h(Bash)g(is)f(running)f(on.)150 1547 y Fs(IGNOREEOF)630
+1656 y Ft(Con)m(trols)e(the)h(action)g(of)f(the)g(shell)g(on)g(receipt)
+h(of)f(an)g Fs(EOF)f Ft(c)m(haracter)i(as)g(the)f(sole)h(input.)630
+1766 y(If)i(set,)i(the)f(v)-5 b(alue)32 b(denotes)f(the)g(n)m(um)m(b)s
+(er)f(of)h(consecutiv)m(e)i Fs(EOF)d Ft(c)m(haracters)i(that)f(can)h(b)
+s(e)630 1875 y(read)40 b(as)f(the)h(\014rst)f(c)m(haracter)i(on)f(an)f
+(input)g(line)h(b)s(efore)f(the)h(shell)g(will)g(exit.)70
+b(If)39 b(the)630 1985 y(v)-5 b(ariable)38 b(exists)f(but)f(do)s(es)g
+(not)h(ha)m(v)m(e)h(a)g(n)m(umeric)e(v)-5 b(alue)37 b(\(or)h(has)e(no)h
+(v)-5 b(alue\))37 b(then)g(the)630 2094 y(default)31
+b(is)g(10.)43 b(If)30 b(the)h(v)-5 b(ariable)31 b(do)s(es)g(not)g
+(exist,)h(then)e Fs(EOF)g Ft(signi\014es)h(the)g(end)f(of)h(input)630
+2204 y(to)g(the)g(shell.)41 b(This)29 b(is)i(only)f(in)g(e\013ect)i
+(for)e(in)m(teractiv)m(e)j(shells.)150 2364 y Fs(INPUTRC)144
+b Ft(The)68 b(name)h(of)f(the)h(Readline)g(initialization)j(\014le,)78
+b(o)m(v)m(erriding)69 b(the)g(default)g(of)630 2474 y(`)p
+Fs(~/.inputrc)p Ft('.)150 2634 y Fs(LANG)288 b Ft(Used)28
+b(to)h(determine)f(the)g(lo)s(cale)h(category)h(for)e(an)m(y)h
+(category)h(not)e(sp)s(eci\014cally)g(selected)630 2744
+y(with)i(a)h(v)-5 b(ariable)31 b(starting)g(with)f Fs(LC_)p
+Ft(.)150 2904 y Fs(LC_ALL)192 b Ft(This)28 b(v)-5 b(ariable)29
+b(o)m(v)m(errides)h(the)f(v)-5 b(alue)29 b(of)g Fs(LANG)f
+Ft(and)g(an)m(y)h(other)g Fs(LC_)f Ft(v)-5 b(ariable)29
+b(sp)s(ecifying)630 3013 y(a)i(lo)s(cale)h(category)-8
+b(.)150 3173 y Fs(LC_COLLATE)630 3283 y Ft(This)37 b(v)-5
+b(ariable)38 b(determines)g(the)g(collation)i(order)d(used)g(when)f
+(sorting)i(the)g(results)g(of)630 3393 y(\014lename)e(expansion,)i(and)
+e(determines)g(the)h(b)s(eha)m(vior)f(of)g(range)h(expressions,)h
+(equiv-)630 3502 y(alence)e(classes,)h(and)e(collating)i(sequences)e
+(within)f(\014lename)h(expansion)g(and)f(pattern)630
+3612 y(matc)m(hing)d(\(see)h(Section)f(3.5.8)h([Filename)g(Expansion],)
+e(page)h(24\).)150 3772 y Fs(LC_CTYPE)96 b Ft(This)36
+b(v)-5 b(ariable)37 b(determines)f(the)h(in)m(terpretation)h(of)f(c)m
+(haracters)h(and)e(the)g(b)s(eha)m(vior)h(of)630 3882
+y(c)m(haracter)46 b(classes)g(within)e(\014lename)h(expansion)g(and)f
+(pattern)h(matc)m(hing)h(\(see)f(Sec-)630 3991 y(tion)31
+b(3.5.8)h([Filename)g(Expansion],)e(page)h(24\).)150
+4151 y Fs(LC_MESSAGES)630 4261 y Ft(This)25 b(v)-5 b(ariable)27
+b(determines)f(the)g(lo)s(cale)i(used)d(to)i(translate)g(double-quoted)
+f(strings)g(pre-)630 4371 y(ceded)31 b(b)m(y)f(a)h(`)p
+Fs($)p Ft(')f(\(see)h(Section)h(3.1.2.5)g([Lo)s(cale)g(T)-8
+b(ranslation],)32 b(page)f(7\).)150 4531 y Fs(LC_NUMERIC)630
+4640 y Ft(This)f(v)-5 b(ariable)31 b(determines)f(the)h(lo)s(cale)h
+(category)g(used)e(for)g(n)m(um)m(b)s(er)f(formatting.)150
+4800 y Fs(LINENO)192 b Ft(The)30 b(line)h(n)m(um)m(b)s(er)e(in)h(the)g
+(script)h(or)f(shell)g(function)h(curren)m(tly)f(executing.)150
+4961 y Fs(LINES)240 b Ft(Used)25 b(b)m(y)g(the)g Fs(select)e
+Ft(builtin)i(command)g(to)h(determine)f(the)g(column)g(length)g(for)g
+(prin)m(t-)630 5070 y(ing)31 b(selection)h(lists.)41
+b(Automatically)33 b(set)e(up)s(on)e(receipt)i(of)f(a)h
+Fs(SIGWINCH)p Ft(.)150 5230 y Fs(MACHTYPE)96 b Ft(A)26
+b(string)g(that)h(fully)f(describ)s(es)f(the)h(system)g(t)m(yp)s(e)h
+(on)f(whic)m(h)f(Bash)i(is)f(executing,)i(in)e(the)630
+5340 y(standard)k Fl(gnu)g Fq(cpu-compan)m(y-system)h
+Ft(format.)p eop end
+%%Page: 68 74
+TeXDict begin 68 73 bop 150 -116 a Ft(68)2572 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fs(MAILCHECK)630 408
+y Ft(Ho)m(w)d(often)g(\(in)g(seconds\))g(that)g(the)f(shell)h(should)f
+(c)m(hec)m(k)i(for)e(mail)h(in)f(the)h(\014les)g(sp)s(eci\014ed)630
+518 y(in)i(the)h Fs(MAILPATH)e Ft(or)i Fs(MAIL)e Ft(v)-5
+b(ariables.)43 b(The)30 b(default)h(is)f(60)i(seconds.)42
+b(When)30 b(it)h(is)g(time)630 628 y(to)37 b(c)m(hec)m(k)h(for)e(mail,)
+j(the)e(shell)f(do)s(es)g(so)h(b)s(efore)f(displa)m(ying)h(the)f
+(primary)g(prompt.)57 b(If)630 737 y(this)37 b(v)-5 b(ariable)38
+b(is)f(unset,)h(or)f(set)h(to)g(a)f(v)-5 b(alue)38 b(that)f(is)g(not)h
+(a)f(n)m(um)m(b)s(er)f(greater)i(than)f(or)630 847 y(equal)31
+b(to)g(zero,)g(the)g(shell)g(disables)f(mail)h(c)m(hec)m(king.)150
+1003 y Fs(OLDPWD)192 b Ft(The)30 b(previous)g(w)m(orking)g(directory)h
+(as)g(set)g(b)m(y)f(the)h Fs(cd)e Ft(builtin.)150 1160
+y Fs(OPTERR)192 b Ft(If)35 b(set)i(to)f(the)h(v)-5 b(alue)36
+b(1,)i(Bash)e(displa)m(ys)g(error)f(messages)i(generated)g(b)m(y)f(the)
+g Fs(getopts)630 1270 y Ft(builtin)30 b(command.)150
+1426 y Fs(OSTYPE)192 b Ft(A)30 b(string)h(describing)f(the)g(op)s
+(erating)h(system)g(Bash)f(is)h(running)d(on.)150 1583
+y Fs(PIPESTATUS)630 1692 y Ft(An)23 b(arra)m(y)h(v)-5
+b(ariable)24 b(\(see)h(Section)f(6.7)h([Arra)m(ys],)g(page)f(80\))h
+(con)m(taining)g(a)f(list)g(of)g(exit)g(sta-)630 1802
+y(tus)h(v)-5 b(alues)27 b(from)e(the)h(pro)s(cesses)g(in)f(the)h
+(most-recen)m(tly-executed)j(foreground)c(pip)s(eline)630
+1911 y(\(whic)m(h)30 b(ma)m(y)h(con)m(tain)h(only)f(a)f(single)h
+(command\).)150 2068 y Fs(POSIXLY_CORRECT)630 2178 y
+Ft(If)h(this)h(v)-5 b(ariable)34 b(is)f(in)f(the)h(en)m(vironmen)m(t)h
+(when)d Fs(bash)h Ft(starts,)i(the)f(shell)g(en)m(ters)h
+Fl(posix)630 2287 y Ft(mo)s(de)22 b(\(see)h(Section)g(6.11)h([Bash)e
+(POSIX)f(Mo)s(de],)k(page)e(84\))g(b)s(efore)f(reading)g(the)g(startup)
+630 2397 y(\014les,)32 b(as)f(if)h(the)f(`)p Fs(--posix)p
+Ft(')f(in)m(v)m(o)s(cation)j(option)f(had)f(b)s(een)g(supplied.)42
+b(If)31 b(it)h(is)f(set)h(while)630 2506 y(the)f(shell)f(is)h(running,)
+d Fs(bash)i Ft(enables)g Fl(posix)g Ft(mo)s(de,)g(as)h(if)f(the)h
+(command)870 2639 y Fs(set)47 b(-o)g(posix)630 2772 y
+Ft(had)30 b(b)s(een)f(executed.)150 2929 y Fs(PPID)288
+b Ft(The)30 b(pro)s(cess)g Fl(id)g Ft(of)h(the)f(shell's)h(paren)m(t)g
+(pro)s(cess.)40 b(This)30 b(v)-5 b(ariable)31 b(is)f(readonly)-8
+b(.)150 3086 y Fs(PROMPT_COMMAND)630 3195 y Ft(If)32
+b(set,)h(the)f(v)-5 b(alue)33 b(is)f(in)m(terpreted)g(as)g(a)h(command)
+f(to)h(execute)g(b)s(efore)f(the)g(prin)m(ting)g(of)630
+3305 y(eac)m(h)g(primary)d(prompt)g(\()p Fs($PS1)p Ft(\).)150
+3461 y Fs(PROMPT_DIRTRIM)630 3571 y Ft(If)e(set)g(to)h(a)g(n)m(um)m(b)s
+(er)e(greater)i(than)f(zero,)i(the)e(v)-5 b(alue)28 b(is)f(used)g(as)g
+(the)h(n)m(um)m(b)s(er)e(of)h(trailing)630 3680 y(directory)35
+b(comp)s(onen)m(ts)g(to)h(retain)f(when)f(expanding)g(the)h
+Fs(\\w)f Ft(and)g Fs(\\W)g Ft(prompt)g(string)630 3790
+y(escap)s(es)27 b(\(see)g(Section)g(6.9)h([Prin)m(ting)f(a)g(Prompt],)g
+(page)g(82\).)40 b(Characters)27 b(remo)m(v)m(ed)h(are)630
+3900 y(replaced)j(with)f(an)g(ellipsis.)150 4056 y Fs(PS3)336
+b Ft(The)34 b(v)-5 b(alue)35 b(of)f(this)g(v)-5 b(ariable)35
+b(is)g(used)e(as)i(the)f(prompt)g(for)g(the)g Fs(select)f
+Ft(command.)52 b(If)630 4166 y(this)30 b(v)-5 b(ariable)31
+b(is)g(not)f(set,)i(the)e Fs(select)f Ft(command)h(prompts)f(with)h(`)p
+Fs(#?)g Ft(')150 4322 y Fs(PS4)336 b Ft(The)20 b(v)-5
+b(alue)22 b(is)e(the)h(prompt)f(prin)m(ted)h(b)s(efore)f(the)h(command)
+g(line)g(is)g(ec)m(ho)s(ed)g(when)f(the)h(`)p Fs(-x)p
+Ft(')630 4432 y(option)32 b(is)f(set)h(\(see)g(Section)h(4.3.1)g([The)e
+(Set)g(Builtin],)i(page)f(51\).)45 b(The)31 b(\014rst)f(c)m(haracter)
+630 4542 y(of)k Fs(PS4)g Ft(is)g(replicated)i(m)m(ultiple)f(times,)h
+(as)e(necessary)-8 b(,)37 b(to)e(indicate)g(m)m(ultiple)g(lev)m(els)h
+(of)630 4651 y(indirection.)41 b(The)30 b(default)h(is)f(`)p
+Fs(+)g Ft('.)150 4808 y Fs(PWD)336 b Ft(The)30 b(curren)m(t)g(w)m
+(orking)h(directory)g(as)f(set)h(b)m(y)f(the)h Fs(cd)f
+Ft(builtin.)150 4964 y Fs(RANDOM)192 b Ft(Eac)m(h)30
+b(time)g(this)f(parameter)g(is)g(referenced,)h(a)f(random)g(in)m(teger)
+h(b)s(et)m(w)m(een)g(0)f(and)g(32767)630 5074 y(is)i(generated.)43
+b(Assigning)31 b(a)g(v)-5 b(alue)31 b(to)g(this)g(v)-5
+b(ariable)31 b(seeds)g(the)g(random)f(n)m(um)m(b)s(er)f(gen-)630
+5183 y(erator.)150 5340 y Fs(REPLY)240 b Ft(The)30 b(default)g(v)-5
+b(ariable)32 b(for)e(the)g Fs(read)g Ft(builtin.)p eop
+end
+%%Page: 69 75
+TeXDict begin 69 74 bop 150 -116 a Ft(Chapter)30 b(5:)41
+b(Shell)30 b(V)-8 b(ariables)2459 b(69)150 299 y Fs(SECONDS)144
+b Ft(This)40 b(v)-5 b(ariable)41 b(expands)f(to)h(the)g(n)m(um)m(b)s
+(er)e(of)i(seconds)g(since)g(the)f(shell)h(w)m(as)g(started.)630
+408 y(Assignmen)m(t)i(to)g(this)g(v)-5 b(ariable)43 b(resets)g(the)g
+(coun)m(t)g(to)g(the)g(v)-5 b(alue)43 b(assigned,)j(and)c(the)630
+518 y(expanded)35 b(v)-5 b(alue)36 b(b)s(ecomes)h(the)f(v)-5
+b(alue)36 b(assigned)g(plus)f(the)h(n)m(um)m(b)s(er)f(of)h(seconds)g
+(since)630 628 y(the)31 b(assignmen)m(t.)150 779 y Fs(SHELL)240
+b Ft(The)29 b(full)h(pathname)g(to)h(the)f(shell)g(is)g(k)m(ept)g(in)g
+(this)g(en)m(vironmen)m(t)g(v)-5 b(ariable.)42 b(If)29
+b(it)i(is)f(not)630 889 y(set)36 b(when)f(the)h(shell)g(starts,)i(Bash)
+e(assigns)h(to)f(it)h(the)f(full)f(pathname)h(of)g(the)g(curren)m(t)630
+999 y(user's)30 b(login)h(shell.)150 1150 y Fs(SHELLOPTS)630
+1260 y Ft(A)g(colon-separated)h(list)f(of)g(enabled)f(shell)h(options.)
+41 b(Eac)m(h)31 b(w)m(ord)f(in)g(the)h(list)g(is)g(a)g(v)-5
+b(alid)630 1369 y(argumen)m(t)24 b(for)f(the)h(`)p Fs(-o)p
+Ft(')f(option)h(to)g(the)g Fs(set)f Ft(builtin)g(command)g(\(see)i
+(Section)f(4.3.1)h([The)630 1479 y(Set)k(Builtin],)h(page)f(51\).)42
+b(The)28 b(options)h(app)s(earing)f(in)g Fs(SHELLOPTS)e
+Ft(are)j(those)h(rep)s(orted)630 1589 y(as)g(`)p Fs(on)p
+Ft(')f(b)m(y)h(`)p Fs(set)g(-o)p Ft('.)40 b(If)29 b(this)h(v)-5
+b(ariable)30 b(is)g(in)f(the)h(en)m(vironmen)m(t)g(when)f(Bash)h
+(starts)g(up,)630 1698 y(eac)m(h)41 b(shell)e(option)h(in)f(the)h(list)
+g(will)f(b)s(e)g(enabled)h(b)s(efore)f(reading)g(an)m(y)h(startup)f
+(\014les.)630 1808 y(This)30 b(v)-5 b(ariable)31 b(is)f(readonly)-8
+b(.)150 1960 y Fs(SHLVL)240 b Ft(Incremen)m(ted)21 b(b)m(y)g(one)g(eac)
+m(h)h(time)f(a)h(new)e(instance)h(of)g(Bash)g(is)g(started.)38
+b(This)20 b(is)h(in)m(tended)630 2069 y(to)31 b(b)s(e)f(a)h(coun)m(t)g
+(of)f(ho)m(w)h(deeply)f(y)m(our)g(Bash)h(shells)f(are)h(nested.)150
+2221 y Fs(TIMEFORMAT)630 2330 y Ft(The)f(v)-5 b(alue)32
+b(of)f(this)g(parameter)g(is)g(used)f(as)h(a)g(format)h(string)f(sp)s
+(ecifying)f(ho)m(w)h(the)g(tim-)630 2440 y(ing)37 b(information)f(for)h
+(pip)s(elines)f(pre\014xed)f(with)h(the)h Fs(time)e Ft(reserv)m(ed)i(w)
+m(ord)f(should)g(b)s(e)630 2550 y(displa)m(y)m(ed.)k(The)27
+b(`)p Fs(\045)p Ft(')h(c)m(haracter)h(in)m(tro)s(duces)e(an)h(escap)s
+(e)g(sequence)g(that)g(is)f(expanded)g(to)630 2659 y(a)37
+b(time)g(v)-5 b(alue)36 b(or)h(other)f(information.)59
+b(The)36 b(escap)s(e)g(sequences)h(and)e(their)i(meanings)630
+2769 y(are)31 b(as)f(follo)m(ws;)i(the)f(braces)f(denote)h(optional)h
+(p)s(ortions.)630 2921 y Fs(\045\045)384 b Ft(A)30 b(literal)i(`)p
+Fs(\045)p Ft('.)630 3072 y Fs(\045[)p Fi(p)11 b Fs(][l]R)85
+b Ft(The)30 b(elapsed)h(time)g(in)f(seconds.)630 3224
+y Fs(\045[)p Fi(p)11 b Fs(][l]U)85 b Ft(The)30 b(n)m(um)m(b)s(er)f(of)h
+(CPU)g(seconds)h(sp)s(en)m(t)f(in)g(user)f(mo)s(de.)630
+3376 y Fs(\045[)p Fi(p)11 b Fs(][l]S)85 b Ft(The)30 b(n)m(um)m(b)s(er)f
+(of)h(CPU)g(seconds)h(sp)s(en)m(t)f(in)g(system)g(mo)s(de.)630
+3528 y Fs(\045P)384 b Ft(The)30 b(CPU)g(p)s(ercen)m(tage,)i(computed)e
+(as)h(\(\045U)f Fs(+)g Ft(\045S\))g(/)h(\045R.)630 3679
+y(The)23 b(optional)j Fq(p)g Ft(is)e(a)g(digit)h(sp)s(ecifying)e(the)h
+(precision,)i(the)e(n)m(um)m(b)s(er)f(of)h(fractional)h(digits)630
+3789 y(after)36 b(a)f(decimal)i(p)s(oin)m(t.)55 b(A)35
+b(v)-5 b(alue)36 b(of)f(0)h(causes)g(no)f(decimal)h(p)s(oin)m(t)f(or)h
+(fraction)g(to)g(b)s(e)630 3898 y(output.)48 b(A)m(t)34
+b(most)f(three)g(places)h(after)f(the)g(decimal)h(p)s(oin)m(t)f(ma)m(y)
+h(b)s(e)e(sp)s(eci\014ed;)i(v)-5 b(alues)630 4008 y(of)31
+b Fq(p)h Ft(greater)g(than)e(3)h(are)f(c)m(hanged)h(to)g(3.)42
+b(If)29 b Fq(p)k Ft(is)d(not)h(sp)s(eci\014ed,)f(the)h(v)-5
+b(alue)30 b(3)h(is)g(used.)630 4139 y(The)54 b(optional)h
+Fs(l)f Ft(sp)s(eci\014es)g(a)h(longer)f(format,)61 b(including)54
+b(min)m(utes,)61 b(of)54 b(the)g(form)630 4248 y Fq(MM)10
+b Ft(m)p Fq(SS)5 b Ft(.)p Fq(FF)i Ft(s.)102 b(The)50
+b(v)-5 b(alue)51 b(of)g Fq(p)i Ft(determines)e(whether)f(or)h(not)f
+(the)h(fraction)h(is)630 4358 y(included.)630 4489 y(If)30
+b(this)g(v)-5 b(ariable)31 b(is)g(not)f(set,)i(Bash)e(acts)h(as)g(if)f
+(it)h(had)f(the)h(v)-5 b(alue)870 4619 y Fs
+($'\\nreal\\t\0453lR\\nuser\\t\0453)o(lU\\n)o(sys\\)o(t\0453)o(lS')630
+4750 y Ft(If)37 b(the)g(v)-5 b(alue)38 b(is)f(n)m(ull,)i(no)f(timing)f
+(information)h(is)f(displa)m(y)m(ed.)62 b(A)37 b(trailing)i(newline)e
+(is)630 4859 y(added)30 b(when)f(the)i(format)f(string)h(is)f(displa)m
+(y)m(ed.)150 5011 y Fs(TMOUT)240 b Ft(If)22 b(set)h(to)g(a)g(v)-5
+b(alue)23 b(greater)h(than)e(zero,)j Fs(TMOUT)d Ft(is)g(treated)i(as)e
+(the)h(default)g(timeout)g(for)g(the)630 5121 y Fs(read)31
+b Ft(builtin)h(\(see)h(Section)f(4.2)i([Bash)e(Builtins],)h(page)g
+(41\).)47 b(The)32 b Fs(select)e Ft(command)630 5230
+y(\(see)f(Section)h(3.2.4.2)g([Conditional)g(Constructs],)e(page)i
+(10\))f(terminates)g(if)g(input)e(do)s(es)630 5340 y(not)k(arriv)m(e)g
+(after)g Fs(TMOUT)e Ft(seconds)h(when)f(input)h(is)g(coming)h(from)f(a)
+h(terminal.)p eop end
+%%Page: 70 76
+TeXDict begin 70 75 bop 150 -116 a Ft(70)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y(In)25 b(an)h(in)m(teractiv)m(e)i
+(shell,)g(the)e(v)-5 b(alue)26 b(is)g(in)m(terpreted)g(as)g(the)g(n)m
+(um)m(b)s(er)f(of)h(seconds)f(to)i(w)m(ait)630 408 y(for)32
+b(input)f(after)i(issuing)f(the)g(primary)g(prompt)f(when)g(the)i
+(shell)f(is)h(in)m(teractiv)m(e.)49 b(Bash)630 518 y(terminates)31
+b(after)g(that)g(n)m(um)m(b)s(er)e(of)i(seconds)f(if)g(input)g(do)s(es)
+g(not)g(arriv)m(e.)150 677 y Fs(TMPDIR)192 b Ft(If)39
+b(set,)j(Bash)e(uses)f(its)h(v)-5 b(alue)40 b(as)f(the)h(name)f(of)h(a)
+g(directory)g(in)f(whic)m(h)g(Bash)h(creates)630 787
+y(temp)s(orary)30 b(\014les)g(for)g(the)h(shell's)g(use.)150
+946 y Fs(UID)336 b Ft(The)30 b(n)m(umeric)g(real)h(user)f(id)g(of)g
+(the)h(curren)m(t)f(user.)40 b(This)30 b(v)-5 b(ariable)31
+b(is)f(readonly)-8 b(.)p eop end
+%%Page: 71 77
+TeXDict begin 71 76 bop 150 -116 a Ft(Chapter)30 b(6:)41
+b(Bash)30 b(F)-8 b(eatures)2484 b(71)150 299 y Fo(6)80
+b(Bash)54 b(F)-13 b(eatures)150 554 y Ft(This)30 b(section)h(describ)s
+(es)f(features)g(unique)g(to)h(Bash.)150 797 y Fr(6.1)68
+b(In)l(v)l(oking)46 b(Bash)390 957 y Fs(bash)h([long-opt])e([-ir])h
+([-abefhkmnptuvxdBCDHP])c([-o)47 b Fi(option)11 b Fs(])45
+b([-O)i Fi(shopt_option)11 b Fs(])44 b([)p Fi(ar-)390
+1066 y(gument)57 b Fs(...)o(])390 1176 y(bash)47 b([long-opt])e
+([-abefhkmnptuvxdBCDHP])c([-o)47 b Fi(option)11 b Fs(])46
+b([-O)g Fi(shopt_option)11 b Fs(])44 b(-c)j Fi(string)57
+b Fs([)p Fi(ar-)390 1286 y(gument)g Fs(...)o(])390 1395
+y(bash)47 b([long-opt])e(-s)i([-abefhkmnptuvxdBCDHP])42
+b([-o)k Fi(option)11 b Fs(])46 b([-O)h Fi(shopt_option)11
+b Fs(])43 b([)p Fi(ar-)390 1505 y(gument)57 b Fs(...)o(])275
+1646 y Ft(In)22 b(addition)i(to)g(the)g(single-c)m(haracter)i(shell)e
+(command-line)g(options)f(\(see)i(Section)f(4.3.1)i([The)d(Set)150
+1756 y(Builtin],)k(page)e(51\),)i(there)e(are)g(sev)m(eral)h(m)m
+(ulti-c)m(haracter)h(options)e(that)g(y)m(ou)g(can)g(use.)38
+b(These)25 b(options)150 1865 y(m)m(ust)30 b(app)s(ear)g(on)g(the)h
+(command)f(line)h(b)s(efore)f(the)g(single-c)m(haracter)j(options)e(to)
+g(b)s(e)f(recognized.)150 2035 y Fs(--debugger)630 2145
+y Ft(Arrange)j(for)g(the)g(debugger)g(pro\014le)g(to)h(b)s(e)e
+(executed)i(b)s(efore)f(the)g(shell)g(starts.)49 b(T)-8
+b(urns)630 2255 y(on)25 b(extended)g(debugging)g(mo)s(de)f(\(see)i
+(Section)g(4.3.2)h([The)d(Shopt)h(Builtin],)i(page)e(55)h(for)630
+2364 y(a)35 b(description)f(of)h(the)g Fs(extdebug)d
+Ft(option)j(to)g(the)f Fs(shopt)f Ft(builtin\))i(and)f(shell)g
+(function)630 2474 y(tracing)d(\(see)g(Section)h(4.3.1)g([The)e(Set)g
+(Builtin],)h(page)g(51)h(for)e(a)g(description)h(of)f(the)h
+Fs(-o)630 2583 y(functrace)d Ft(option\).)150 2750 y
+Fs(--dump-po-strings)630 2859 y Ft(A)37 b(list)g(of)f(all)i
+(double-quoted)e(strings)g(preceded)g(b)m(y)h(`)p Fs($)p
+Ft(')f(is)h(prin)m(ted)f(on)g(the)h(standard)630 2969
+y(output)24 b(in)h(the)g Fl(gnu)f Fs(gettext)f Ft(PO)i(\(p)s(ortable)g
+(ob)5 b(ject\))26 b(\014le)f(format.)39 b(Equiv)-5 b(alen)m(t)26
+b(to)f(`)p Fs(-D)p Ft(')630 3079 y(except)31 b(for)f(the)h(output)f
+(format.)150 3245 y Fs(--dump-strings)630 3355 y Ft(Equiv)-5
+b(alen)m(t)31 b(to)g(`)p Fs(-D)p Ft('.)150 3521 y Fs(--help)192
+b Ft(Displa)m(y)32 b(a)e(usage)h(message)h(on)e(standard)g(output)g
+(and)f(exit)j(successfully)-8 b(.)150 3688 y Fs(--init-file)27
+b Fi(filename)150 3797 y Fs(--rcfile)h Fi(filename)630
+3907 y Ft(Execute)42 b(commands)f(from)f Fq(\014lename)47
+b Ft(\(instead)42 b(of)f(`)p Fs(~/.bashrc)p Ft('\))e(in)i(an)g(in)m
+(teractiv)m(e)630 4016 y(shell.)150 4183 y Fs(--login)144
+b Ft(Equiv)-5 b(alen)m(t)31 b(to)g(`)p Fs(-l)p Ft('.)150
+4349 y Fs(--noediting)630 4459 y Ft(Do)h(not)e(use)h(the)g
+Fl(gnu)f Ft(Readline)i(library)e(\(see)h(Chapter)g(8)g([Command)f(Line)
+g(Editing],)630 4569 y(page)h(93\))h(to)f(read)f(command)g(lines)h
+(when)e(the)i(shell)f(is)h(in)m(teractiv)m(e.)150 4735
+y Fs(--noprofile)630 4845 y Ft(Don't)h(load)f(the)g(system-wide)g
+(startup)f(\014le)g(`)p Fs(/etc/profile)p Ft(')e(or)j(an)m(y)g(of)g
+(the)f(p)s(ersonal)630 4954 y(initialization)g(\014les)d(`)p
+Fs(~/.bash_profile)p Ft(',)e(`)p Fs(~/.bash_login)p Ft(',)g(or)i(`)p
+Fs(~/.profile)p Ft(')e(when)630 5064 y(Bash)31 b(is)f(in)m(v)m(ok)m(ed)
+i(as)e(a)h(login)g(shell.)150 5230 y Fs(--norc)192 b
+Ft(Don't)31 b(read)g(the)f(`)p Fs(~/.bashrc)p Ft(')f(initialization)k
+(\014le)d(in)g(an)h(in)m(teractiv)m(e)i(shell.)41 b(This)30
+b(is)g(on)630 5340 y(b)m(y)g(default)h(if)f(the)h(shell)f(is)h(in)m(v)m
+(ok)m(ed)h(as)e Fs(sh)p Ft(.)p eop end
+%%Page: 72 78
+TeXDict begin 72 77 bop 150 -116 a Ft(72)2572 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fs(--posix)144 b Ft(Change)24
+b(the)h(b)s(eha)m(vior)f(of)g(Bash)h(where)e(the)i(default)f(op)s
+(eration)h(di\013ers)f(from)f(the)i Fl(posix)630 408
+y Ft(standard)35 b(to)h(matc)m(h)g(the)g(standard.)55
+b(This)35 b(is)h(in)m(tended)f(to)h(mak)m(e)h(Bash)f(b)s(eha)m(v)m(e)g
+(as)g(a)630 518 y(strict)26 b(sup)s(erset)e(of)h(that)g(standard.)38
+b(See)26 b(Section)f(6.11)i([Bash)e(POSIX)f(Mo)s(de],)j(page)f(84,)630
+628 y(for)k(a)h(description)f(of)h(the)f(Bash)h Fl(posix)f
+Ft(mo)s(de.)150 787 y Fs(--restricted)630 897 y Ft(Mak)m(e)54
+b(the)e(shell)g(a)h(restricted)g(shell)f(\(see)h(Section)g(6.10)h([The)
+d(Restricted)j(Shell],)630 1006 y(page)31 b(84\).)150
+1166 y Fs(--verbose)630 1275 y Ft(Equiv)-5 b(alen)m(t)31
+b(to)g(`)p Fs(-v)p Ft('.)41 b(Prin)m(t)30 b(shell)h(input)e(lines)i(as)
+g(they're)f(read.)150 1435 y Fs(--version)630 1544 y
+Ft(Sho)m(w)e(v)m(ersion)g(information)g(for)g(this)g(instance)h(of)f
+(Bash)g(on)g(the)g(standard)f(output)h(and)630 1654 y(exit)j
+(successfully)-8 b(.)275 1813 y(There)28 b(are)i(sev)m(eral)g(single-c)
+m(haracter)i(options)d(that)h(ma)m(y)g(b)s(e)e(supplied)g(at)i(in)m(v)m
+(o)s(cation)h(whic)m(h)e(are)150 1923 y(not)i(a)m(v)-5
+b(ailable)32 b(with)e(the)h Fs(set)e Ft(builtin.)150
+2082 y Fs(-c)h Fi(string)630 2192 y Ft(Read)23 b(and)f(execute)i
+(commands)f(from)f Fq(string)31 b Ft(after)23 b(pro)s(cessing)f(the)h
+(options,)i(then)e(exit.)630 2301 y(An)m(y)37 b(remaining)f(argumen)m
+(ts)h(are)g(assigned)g(to)g(the)g(p)s(ositional)g(parameters,)i
+(starting)630 2411 y(with)30 b Fs($0)p Ft(.)150 2570
+y Fs(-i)384 b Ft(F)-8 b(orce)22 b(the)g(shell)f(to)g(run)f(in)m
+(teractiv)m(ely)-8 b(.)41 b(In)m(teractiv)m(e)23 b(shells)e(are)h
+(describ)s(ed)d(in)i(Section)h(6.3)630 2680 y([In)m(teractiv)m(e)33
+b(Shells],)e(page)g(75.)150 2839 y Fs(-l)384 b Ft(Mak)m(e)33
+b(this)e(shell)h(act)g(as)g(if)f(it)h(had)f(b)s(een)f(directly)i(in)m
+(v)m(ok)m(ed)h(b)m(y)f(login.)44 b(When)31 b(the)h(shell)630
+2949 y(is)37 b(in)m(teractiv)m(e,)43 b(this)37 b(is)g(equiv)-5
+b(alen)m(t)39 b(to)f(starting)h(a)e(login)i(shell)e(with)g(`)p
+Fs(exec)30 b(-l)g(bash)p Ft('.)630 3059 y(When)h(the)g(shell)h(is)f
+(not)g(in)m(teractiv)m(e,)k(the)c(login)h(shell)g(startup)f(\014les)g
+(will)g(b)s(e)g(executed.)630 3168 y(`)p Fs(exec)e(bash)h(-l)p
+Ft(')43 b(or)h(`)p Fs(exec)29 b(bash)g(--login)p Ft(')42
+b(will)i(replace)h(the)f(curren)m(t)f(shell)h(with)g(a)630
+3278 y(Bash)26 b(login)g(shell.)39 b(See)26 b(Section)g(6.2)h([Bash)e
+(Startup)g(Files],)j(page)e(73,)i(for)d(a)h(description)630
+3387 y(of)31 b(the)f(sp)s(ecial)h(b)s(eha)m(vior)g(of)f(a)h(login)g
+(shell.)150 3547 y Fs(-r)384 b Ft(Mak)m(e)54 b(the)e(shell)g(a)h
+(restricted)g(shell)f(\(see)h(Section)g(6.10)h([The)d(Restricted)j
+(Shell],)630 3656 y(page)31 b(84\).)150 3816 y Fs(-s)384
+b Ft(If)24 b(this)h(option)h(is)f(presen)m(t,)h(or)f(if)g(no)f(argumen)
+m(ts)i(remain)e(after)i(option)f(pro)s(cessing,)h(then)630
+3925 y(commands)i(are)h(read)g(from)f(the)h(standard)f(input.)39
+b(This)28 b(option)h(allo)m(ws)h(the)f(p)s(ositional)630
+4035 y(parameters)i(to)g(b)s(e)f(set)g(when)g(in)m(v)m(oking)h(an)g(in)
+m(teractiv)m(e)i(shell.)150 4194 y Fs(-D)384 b Ft(A)37
+b(list)g(of)f(all)i(double-quoted)e(strings)g(preceded)g(b)m(y)h(`)p
+Fs($)p Ft(')f(is)h(prin)m(ted)f(on)g(the)h(standard)630
+4304 y(output.)63 b(These)38 b(are)g(the)g(strings)g(that)h(are)f(sub)5
+b(ject)38 b(to)h(language)g(translation)g(when)630 4413
+y(the)e(curren)m(t)g(lo)s(cale)h(is)f(not)g Fs(C)g Ft(or)f
+Fs(POSIX)g Ft(\(see)h(Section)h(3.1.2.5)h([Lo)s(cale)g(T)-8
+b(ranslation],)630 4523 y(page)31 b(7\).)42 b(This)29
+b(implies)i(the)f(`)p Fs(-n)p Ft(')h(option;)g(no)f(commands)g(will)h
+(b)s(e)e(executed.)150 4682 y Fs([-+]O)g([)p Fi(shopt_option)11
+b Fs(])630 4792 y Fq(shopt)p 854 4792 28 4 v 40 w(option)44
+b Ft(is)g(one)h(of)f(the)g(shell)h(options)f(accepted)h(b)m(y)f(the)h
+Fs(shopt)d Ft(builtin)i(\(see)630 4902 y(Section)28 b(4.3.2)g([The)f
+(Shopt)f(Builtin],)i(page)f(55\).)41 b(If)26 b Fq(shopt)p
+2690 4902 V 40 w(option)h Ft(is)g(presen)m(t,)h(`)p Fs(-O)p
+Ft(')f(sets)630 5011 y(the)40 b(v)-5 b(alue)40 b(of)f(that)h(option;)45
+b(`)p Fs(+O)p Ft(')40 b(unsets)e(it.)69 b(If)39 b Fq(shopt)p
+2631 5011 V 40 w(option)h Ft(is)f(not)h(supplied,)h(the)630
+5121 y(names)e(and)g(v)-5 b(alues)40 b(of)g(the)g(shell)f(options)h
+(accepted)h(b)m(y)e Fs(shopt)f Ft(are)i(prin)m(ted)f(on)h(the)630
+5230 y(standard)33 b(output.)50 b(If)33 b(the)h(in)m(v)m(o)s(cation)i
+(option)e(is)g(`)p Fs(+O)p Ft(',)g(the)g(output)f(is)h(displa)m(y)m(ed)
+g(in)g(a)630 5340 y(format)d(that)g(ma)m(y)g(b)s(e)e(reused)h(as)h
+(input.)p eop end
+%%Page: 73 79
+TeXDict begin 73 78 bop 150 -116 a Ft(Chapter)30 b(6:)41
+b(Bash)30 b(F)-8 b(eatures)2484 b(73)150 299 y Fs(--)384
+b Ft(A)38 b Fs(--)g Ft(signals)g(the)h(end)e(of)i(options)f(and)g
+(disables)g(further)f(option)h(pro)s(cessing.)64 b(An)m(y)630
+408 y(argumen)m(ts)31 b(after)g(the)f Fs(--)g Ft(are)h(treated)g(as)g
+(\014lenames)f(and)g(argumen)m(ts.)275 567 y(A)d Fk(lo)-5
+b(gin)35 b Ft(shell)27 b(is)g(one)h(whose)f(\014rst)f(c)m(haracter)j
+(of)e(argumen)m(t)h(zero)f(is)h(`)p Fs(-)p Ft(',)g(or)f(one)g(in)m(v)m
+(ok)m(ed)i(with)e(the)150 676 y(`)p Fs(--login)p Ft(')i(option.)275
+810 y(An)24 b Fk(inter)-5 b(active)33 b Ft(shell)25 b(is)g(one)g
+(started)g(without)g(non-option)h(argumen)m(ts,)g(unless)f(`)p
+Fs(-s)p Ft(')f(is)h(sp)s(eci\014ed,)150 920 y(without)43
+b(sp)s(ecifying)f(the)i(`)p Fs(-c)p Ft(')e(option,)47
+b(and)42 b(whose)h(input)f(and)g(output)g(are)h(b)s(oth)g(connected)g
+(to)150 1029 y(terminals)22 b(\(as)h(determined)f(b)m(y)g
+Fs(isatty\(3\))p Ft(\),)f(or)i(one)f(started)g(with)g(the)g(`)p
+Fs(-i)p Ft(')g(option.)39 b(See)22 b(Section)h(6.3)150
+1139 y([In)m(teractiv)m(e)33 b(Shells],)e(page)g(75,)g(for)f(more)h
+(information.)275 1273 y(If)38 b(argumen)m(ts)h(remain)g(after)g
+(option)h(pro)s(cessing,)h(and)d(neither)h(the)g(`)p
+Fs(-c)p Ft(')f(nor)h(the)g(`)p Fs(-s)p Ft(')f(option)150
+1382 y(has)33 b(b)s(een)g(supplied,)h(the)g(\014rst)e(argumen)m(t)j(is)
+e(assumed)g(to)h(b)s(e)f(the)h(name)g(of)g(a)g(\014le)g(con)m(taining)h
+(shell)150 1492 y(commands)30 b(\(see)g(Section)h(3.8)g([Shell)f
+(Scripts],)g(page)h(33\).)41 b(When)30 b(Bash)g(is)g(in)m(v)m(ok)m(ed)i
+(in)d(this)h(fashion,)150 1601 y Fs($0)37 b Ft(is)g(set)h(to)h(the)e
+(name)h(of)f(the)h(\014le,)i(and)c(the)i(p)s(ositional)g(parameters)g
+(are)g(set)g(to)g(the)g(remaining)150 1711 y(argumen)m(ts.)h(Bash)26
+b(reads)f(and)g(executes)h(commands)f(from)g(this)g(\014le,)i(then)e
+(exits.)40 b(Bash's)25 b(exit)i(status)150 1821 y(is)f(the)h(exit)h
+(status)e(of)h(the)g(last)g(command)f(executed)h(in)g(the)f(script.)40
+b(If)26 b(no)g(commands)g(are)h(executed,)150 1930 y(the)k(exit)g
+(status)g(is)f(0.)150 2161 y Fr(6.2)68 b(Bash)45 b(Startup)g(Files)150
+2321 y Ft(This)23 b(section)j(describ)s(es)d(ho)m(w)i(Bash)f(executes)h
+(its)g(startup)f(\014les.)38 b(If)24 b(an)m(y)h(of)f(the)h(\014les)f
+(exist)h(but)e(cannot)150 2430 y(b)s(e)k(read,)i(Bash)f(rep)s(orts)f
+(an)h(error.)39 b(Tildes)28 b(are)g(expanded)f(in)h(\014le)g(names)g
+(as)g(describ)s(ed)e(ab)s(o)m(v)m(e)j(under)150 2540
+y(Tilde)h(Expansion)g(\(see)h(Section)h(3.5.2)g([Tilde)e(Expansion],)h
+(page)g(19\).)275 2674 y(In)m(teractiv)m(e)h(shells)f(are)g(describ)s
+(ed)e(in)h(Section)h(6.3)h([In)m(teractiv)m(e)h(Shells],)d(page)h(75.)
+150 2872 y Fj(In)m(v)m(ok)m(ed)40 b(as)h(an)f(in)m(teractiv)m(e)f
+(login)j(shell,)g(or)g(with)e(`)p Fh(--login)p Fj(')150
+3019 y Ft(When)c(Bash)f(is)h(in)m(v)m(ok)m(ed)h(as)f(an)g(in)m
+(teractiv)m(e)j(login)d(shell,)i(or)e(as)g(a)g(non-in)m(teractiv)m(e)i
+(shell)e(with)g(the)150 3128 y(`)p Fs(--login)p Ft(')j(option,)k(it)e
+(\014rst)e(reads)h(and)g(executes)h(commands)f(from)f(the)i(\014le)f(`)
+p Fs(/etc/profile)p Ft(',)g(if)150 3238 y(that)35 b(\014le)g(exists.)55
+b(After)35 b(reading)g(that)g(\014le,)h(it)g(lo)s(oks)f(for)f(`)p
+Fs(~/.bash_profile)p Ft(',)f(`)p Fs(~/.bash_login)p Ft(',)150
+3348 y(and)28 b(`)p Fs(~/.profile)p Ft(',)f(in)i(that)g(order,)g(and)f
+(reads)g(and)h(executes)h(commands)e(from)g(the)h(\014rst)f(one)h(that)
+150 3457 y(exists)i(and)e(is)h(readable.)41 b(The)30
+b(`)p Fs(--noprofile)p Ft(')d(option)k(ma)m(y)f(b)s(e)g(used)f(when)g
+(the)h(shell)h(is)f(started)g(to)150 3567 y(inhibit)g(this)g(b)s(eha)m
+(vior.)275 3701 y(When)72 b(a)i(login)g(shell)f(exits,)85
+b(Bash)73 b(reads)g(and)g(executes)h(commands)f(from)g(the)g(\014le)150
+3810 y(`)p Fs(~/.bash_logout)p Ft(',)27 b(if)k(it)f(exists.)150
+4008 y Fj(In)m(v)m(ok)m(ed)40 b(as)h(an)f(in)m(teractiv)m(e)f
+(non-login)k(shell)150 4155 y Ft(When)g(an)h(in)m(teractiv)m(e)i(shell)
+e(that)g(is)f(not)h(a)g(login)g(shell)g(is)f(started,)48
+b(Bash)c(reads)f(and)g(executes)150 4265 y(commands)24
+b(from)f(`)p Fs(~/.bashrc)p Ft(',)h(if)g(that)g(\014le)g(exists.)40
+b(This)23 b(ma)m(y)i(b)s(e)e(inhibited)g(b)m(y)h(using)g(the)g(`)p
+Fs(--norc)p Ft(')150 4374 y(option.)52 b(The)33 b(`)p
+Fs(--rcfile)28 b Fi(file)11 b Ft(')33 b(option)h(will)g(force)h(Bash)f
+(to)h(read)e(and)h(execute)h(commands)e(from)150 4484
+y Fq(\014le)j Ft(instead)30 b(of)h(`)p Fs(~/.bashrc)p
+Ft('.)275 4618 y(So,)f(t)m(ypically)-8 b(,)33 b(y)m(our)d(`)p
+Fs(~/.bash_profile)p Ft(')d(con)m(tains)32 b(the)e(line)390
+4752 y Fs(if)47 b([)h(-f)f(~/.bashrc)e(];)i(then)g(.)g(~/.bashrc;)e(fi)
+150 4885 y Ft(after)31 b(\(or)g(b)s(efore\))f(an)m(y)h(login-sp)s
+(eci\014c)g(initializations.)150 5083 y Fj(In)m(v)m(ok)m(ed)40
+b(non-in)m(teractiv)m(ely)150 5230 y Ft(When)33 b(Bash)g(is)g(started)h
+(non-in)m(teractiv)m(ely)-8 b(,)37 b(to)d(run)e(a)h(shell)h(script,)g
+(for)f(example,)i(it)e(lo)s(oks)h(for)f(the)150 5340
+y(v)-5 b(ariable)35 b Fs(BASH_ENV)d Ft(in)i(the)h(en)m(vironmen)m(t,)h
+(expands)e(its)g(v)-5 b(alue)35 b(if)g(it)g(app)s(ears)e(there,)j(and)e
+(uses)g(the)p eop end
+%%Page: 74 80
+TeXDict begin 74 79 bop 150 -116 a Ft(74)2572 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y(expanded)f(v)-5 b(alue)30
+b(as)h(the)g(name)f(of)h(a)f(\014le)h(to)g(read)f(and)g(execute.)42
+b(Bash)31 b(b)s(eha)m(v)m(es)g(as)g(if)f(the)g(follo)m(wing)150
+408 y(command)g(w)m(ere)h(executed:)390 570 y Fs(if)47
+b([)h(-n)f("$BASH_ENV")e(];)i(then)f(.)i("$BASH_ENV";)c(fi)150
+732 y Ft(but)30 b(the)g(v)-5 b(alue)31 b(of)g(the)f Fs(PATH)f
+Ft(v)-5 b(ariable)32 b(is)e(not)h(used)e(to)i(searc)m(h)g(for)f(the)h
+(\014le)f(name.)275 893 y(As)38 b(noted)h(ab)s(o)m(v)m(e,)j(if)c(a)h
+(non-in)m(teractiv)m(e)i(shell)e(is)g(in)m(v)m(ok)m(ed)h(with)e(the)g
+(`)p Fs(--login)p Ft(')g(option,)j(Bash)150 1003 y(attempts)31
+b(to)g(read)g(and)e(execute)j(commands)e(from)g(the)h(login)g(shell)g
+(startup)e(\014les.)150 1229 y Fj(In)m(v)m(ok)m(ed)40
+b(with)g(name)h Fh(sh)150 1376 y Ft(If)c(Bash)g(is)g(in)m(v)m(ok)m(ed)i
+(with)e(the)g(name)g Fs(sh)p Ft(,)i(it)f(tries)f(to)h(mimic)g(the)f
+(startup)g(b)s(eha)m(vior)g(of)h(historical)150 1486
+y(v)m(ersions)31 b(of)f Fs(sh)g Ft(as)h(closely)h(as)e(p)s(ossible,)g
+(while)h(conforming)f(to)h(the)g Fl(posix)e Ft(standard)h(as)h(w)m
+(ell.)275 1647 y(When)50 b(in)m(v)m(ok)m(ed)j(as)f(an)f(in)m(teractiv)m
+(e)j(login)e(shell,)57 b(or)51 b(as)g(a)h(non-in)m(teractiv)m(e)h
+(shell)f(with)f(the)150 1757 y(`)p Fs(--login)p Ft(')39
+b(option,)k(it)e(\014rst)e(attempts)i(to)g(read)f(and)g(execute)h
+(commands)f(from)g(`)p Fs(/etc/profile)p Ft(')150 1867
+y(and)d(`)p Fs(~/.profile)p Ft(',)g(in)g(that)h(order.)62
+b(The)37 b(`)p Fs(--noprofile)p Ft(')e(option)j(ma)m(y)g(b)s(e)f(used)g
+(to)h(inhibit)f(this)150 1976 y(b)s(eha)m(vior.)82 b(When)44
+b(in)m(v)m(ok)m(ed)h(as)g(an)f(in)m(teractiv)m(e)j(shell)d(with)g(the)g
+(name)g Fs(sh)p Ft(,)j(Bash)d(lo)s(oks)h(for)f(the)150
+2086 y(v)-5 b(ariable)37 b Fs(ENV)p Ft(,)g(expands)e(its)i(v)-5
+b(alue)36 b(if)g(it)h(is)f(de\014ned,)h(and)e(uses)h(the)g(expanded)g
+(v)-5 b(alue)36 b(as)h(the)f(name)150 2195 y(of)i(a)h(\014le)g(to)g
+(read)f(and)g(execute.)66 b(Since)38 b(a)h(shell)f(in)m(v)m(ok)m(ed)i
+(as)f Fs(sh)e Ft(do)s(es)h(not)h(attempt)g(to)g(read)g(and)150
+2305 y(execute)i(commands)e(from)g(an)m(y)h(other)g(startup)f(\014les,)
+j(the)e(`)p Fs(--rcfile)p Ft(')d(option)j(has)g(no)f(e\013ect.)70
+b(A)150 2415 y(non-in)m(teractiv)m(e)32 b(shell)d(in)m(v)m(ok)m(ed)h
+(with)f(the)g(name)g Fs(sh)f Ft(do)s(es)g(not)i(attempt)g(to)f(read)g
+(an)m(y)g(other)g(startup)150 2524 y(\014les.)275 2686
+y(When)h(in)m(v)m(ok)m(ed)h(as)g Fs(sh)p Ft(,)f(Bash)h(en)m(ters)g
+Fl(posix)e Ft(mo)s(de)h(after)h(the)g(startup)f(\014les)g(are)h(read.)
+150 2912 y Fj(In)m(v)m(ok)m(ed)40 b(in)h Fg(posix)g Fj(mo)s(de)150
+3059 y Ft(When)25 b(Bash)g(is)h(started)f(in)g Fl(posix)g
+Ft(mo)s(de,)h(as)f(with)g(the)h(`)p Fs(--posix)p Ft(')d(command)i(line)
+h(option,)h(it)f(follo)m(ws)150 3169 y(the)e Fl(posix)f
+Ft(standard)h(for)f(startup)h(\014les.)38 b(In)24 b(this)g(mo)s(de,)h
+(in)m(teractiv)m(e)i(shells)d(expand)f(the)h Fs(ENV)f
+Ft(v)-5 b(ariable)150 3278 y(and)30 b(commands)g(are)g(read)h(and)e
+(executed)j(from)d(the)i(\014le)f(whose)g(name)h(is)f(the)h(expanded)e
+(v)-5 b(alue.)41 b(No)150 3388 y(other)31 b(startup)f(\014les)g(are)h
+(read.)150 3614 y Fj(In)m(v)m(ok)m(ed)40 b(b)m(y)g(remote)h(shell)h
+(daemon)150 3761 y Ft(Bash)36 b(attempts)h(to)g(determine)f(when)f(it)i
+(is)f(b)s(eing)g(run)e(with)i(its)g(standard)g(input)f(connected)i(to)g
+(a)150 3871 y(a)e(net)m(w)m(ork)h(connection,)h(as)e(if)g(b)m(y)g(the)g
+(remote)g(shell)g(daemon,)i(usually)d Fs(rshd)p Ft(,)h(or)g(the)g
+(secure)g(shell)150 3980 y(daemon)41 b Fs(sshd)p Ft(.)70
+b(If)40 b(Bash)h(determines)f(it)h(is)g(b)s(eing)f(run)f(in)i(this)f
+(fashion,)j(it)e(reads)g(and)f(executes)150 4090 y(commands)26
+b(from)f(`)p Fs(~/.bashrc)p Ft(',)g(if)i(that)f(\014le)g(exists)h(and)f
+(is)g(readable.)40 b(It)26 b(will)g(not)g(do)g(this)g(if)g(in)m(v)m(ok)
+m(ed)150 4200 y(as)g Fs(sh)p Ft(.)39 b(The)25 b(`)p Fs(--norc)p
+Ft(')g(option)h(ma)m(y)g(b)s(e)f(used)g(to)i(inhibit)e(this)h(b)s(eha)m
+(vior,)h(and)e(the)h(`)p Fs(--rcfile)p Ft(')e(option)150
+4309 y(ma)m(y)33 b(b)s(e)g(used)f(to)h(force)h(another)f(\014le)g(to)g
+(b)s(e)g(read,)g(but)f Fs(rshd)g Ft(do)s(es)h(not)g(generally)h(in)m(v)
+m(ok)m(e)h(the)e(shell)150 4419 y(with)d(those)h(options)g(or)f(allo)m
+(w)i(them)e(to)h(b)s(e)f(sp)s(eci\014ed.)150 4645 y Fj(In)m(v)m(ok)m
+(ed)40 b(with)g(unequal)h(e\013ectiv)m(e)e(and)i(real)g
+Fg(uid/gid)p Fj(s)150 4792 y Ft(If)34 b(Bash)h(is)g(started)g(with)f
+(the)h(e\013ectiv)m(e)i(user)d(\(group\))h(id)f(not)h(equal)g(to)g(the)
+g(real)g(user)f(\(group\))h(id,)150 4902 y(and)26 b(the)i
+Fs(-p)e Ft(option)h(is)g(not)h(supplied,)e(no)h(startup)g(\014les)g
+(are)g(read,)h(shell)f(functions)g(are)g(not)g(inherited)150
+5011 y(from)41 b(the)g(en)m(vironmen)m(t,)j(the)d Fs(SHELLOPTS)p
+Ft(,)h Fs(BASHOPTS)p Ft(,)g Fs(CDPATH)p Ft(,)g(and)e
+Fs(GLOBIGNORE)e Ft(v)-5 b(ariables,)45 b(if)150 5121
+y(they)28 b(app)s(ear)f(in)h(the)g(en)m(vironmen)m(t,)i(are)e(ignored,)
+h(and)e(the)h(e\013ectiv)m(e)j(user)c(id)h(is)g(set)g(to)h(the)f(real)h
+(user)150 5230 y(id.)62 b(If)38 b(the)f Fs(-p)h Ft(option)g(is)f
+(supplied)g(at)h(in)m(v)m(o)s(cation,)k(the)c(startup)f(b)s(eha)m(vior)
+h(is)g(the)g(same,)i(but)d(the)150 5340 y(e\013ectiv)m(e)c(user)d(id)g
+(is)g(not)h(reset.)p eop end
+%%Page: 75 81
+TeXDict begin 75 80 bop 150 -116 a Ft(Chapter)30 b(6:)41
+b(Bash)30 b(F)-8 b(eatures)2484 b(75)150 299 y Fr(6.3)68
+b(In)l(teractiv)l(e)47 b(Shells)150 520 y Fj(6.3.1)63
+b(What)40 b(is)h(an)g(In)m(teractiv)m(e)e(Shell?)150
+667 y Ft(An)c(in)m(teractiv)m(e)k(shell)d(is)g(one)g(started)g(without)
+f(non-option)h(argumen)m(ts,)i(unless)d(`)p Fs(-s)p Ft(')h(is)f(sp)s
+(eci\014ed,)150 777 y(without)f(sp)s(ecifying)h(the)f(`)p
+Fs(-c)p Ft(')g(option,)j(and)c(whose)h(input)g(and)g(error)g(output)g
+(are)g(b)s(oth)g(connected)150 886 y(to)d(terminals)g(\(as)g
+(determined)f(b)m(y)g Fs(isatty\(3\))p Ft(\),)f(or)h(one)h(started)f
+(with)g(the)h(`)p Fs(-i)p Ft(')f(option.)275 1018 y(An)g(in)m(teractiv)
+m(e)j(shell)d(generally)i(reads)e(from)g(and)g(writes)g(to)h(a)g
+(user's)f(terminal.)275 1150 y(The)e(`)p Fs(-s)p Ft(')i(in)m(v)m(o)s
+(cation)h(option)f(ma)m(y)g(b)s(e)f(used)f(to)i(set)g(the)g(p)s
+(ositional)g(parameters)f(when)g(an)g(in)m(ter-)150 1259
+y(activ)m(e)k(shell)d(is)h(started.)150 1453 y Fj(6.3.2)63
+b(Is)41 b(this)g(Shell)g(In)m(teractiv)m(e?)150 1600
+y Ft(T)-8 b(o)30 b(determine)g(within)f(a)h(startup)g(script)f(whether)
+g(or)h(not)g(Bash)g(is)g(running)e(in)m(teractiv)m(ely)-8
+b(,)33 b(test)e(the)150 1710 y(v)-5 b(alue)30 b(of)g(the)f(`)p
+Fs(-)p Ft(')h(sp)s(ecial)g(parameter.)41 b(It)29 b(con)m(tains)i
+Fs(i)e Ft(when)g(the)g(shell)h(is)f(in)m(teractiv)m(e.)44
+b(F)-8 b(or)30 b(example:)390 1841 y Fs(case)47 b("$-")f(in)390
+1951 y(*i*\))h(echo)f(This)h(shell)f(is)h(interactive)e(;;)390
+2061 y(*\))i(echo)g(This)f(shell)h(is)g(not)g(interactive)e(;;)390
+2170 y(esac)275 2302 y Ft(Alternativ)m(ely)-8 b(,)28
+b(startup)23 b(scripts)h(ma)m(y)g(examine)g(the)g(v)-5
+b(ariable)25 b Fs(PS1)p Ft(;)g(it)g(is)e(unset)h(in)f(non-in)m
+(teractiv)m(e)150 2411 y(shells,)31 b(and)e(set)i(in)f(in)m(teractiv)m
+(e)k(shells.)40 b(Th)m(us:)390 2543 y Fs(if)47 b([)h(-z)f("$PS1")f(];)h
+(then)772 2653 y(echo)f(This)h(shell)f(is)i(not)f(interactive)390
+2762 y(else)772 2872 y(echo)f(This)h(shell)f(is)i(interactive)390
+2981 y(fi)150 3175 y Fj(6.3.3)63 b(In)m(teractiv)m(e)38
+b(Shell)k(Beha)m(vior)150 3322 y Ft(When)30 b(the)h(shell)f(is)h
+(running)d(in)m(teractiv)m(ely)-8 b(,)34 b(it)d(c)m(hanges)h(its)f(b)s
+(eha)m(vior)f(in)g(sev)m(eral)i(w)m(a)m(ys.)199 3454
+y(1.)61 b(Startup)37 b(\014les)g(are)h(read)f(and)g(executed)h(as)f
+(describ)s(ed)g(in)g(Section)h(6.2)g([Bash)g(Startup)e(Files],)330
+3563 y(page)31 b(73.)199 3695 y(2.)61 b(Job)35 b(Con)m(trol)g(\(see)h
+(Chapter)f(7)g([Job)g(Con)m(trol],)i(page)f(89\))g(is)f(enabled)g(b)m
+(y)g(default.)55 b(When)34 b(job)330 3805 y(con)m(trol)h(is)f(in)f
+(e\013ect,)k(Bash)d(ignores)g(the)g(k)m(eyb)s(oard-generated)h(job)e
+(con)m(trol)i(signals)g Fs(SIGTTIN)p Ft(,)330 3914 y
+Fs(SIGTTOU)p Ft(,)29 b(and)g Fs(SIGTSTP)p Ft(.)199 4046
+y(3.)61 b(Bash)39 b(expands)f(and)g(displa)m(ys)h Fs(PS1)f
+Ft(b)s(efore)h(reading)g(the)g(\014rst)f(line)h(of)g(a)g(command,)i
+(and)d(ex-)330 4156 y(pands)30 b(and)g(displa)m(ys)h
+Fs(PS2)e Ft(b)s(efore)i(reading)g(the)g(second)f(and)h(subsequen)m(t)f
+(lines)h(of)g(a)g(m)m(ulti-line)330 4265 y(command.)199
+4397 y(4.)61 b(Bash)26 b(executes)i(the)e(v)-5 b(alue)27
+b(of)f(the)h Fs(PROMPT_COMMAND)22 b Ft(v)-5 b(ariable)27
+b(as)g(a)f(command)g(b)s(efore)g(prin)m(ting)330 4506
+y(the)31 b(primary)e(prompt,)h Fs($PS1)f Ft(\(see)i(Section)g(5.2)h
+([Bash)f(V)-8 b(ariables],)32 b(page)f(61\).)199 4638
+y(5.)61 b(Readline)30 b(\(see)h(Chapter)e(8)h([Command)e(Line)i
+(Editing],)g(page)g(93\))h(is)f(used)f(to)h(read)f(commands)330
+4748 y(from)h(the)g(user's)g(terminal.)199 4879 y(6.)61
+b(Bash)36 b(insp)s(ects)g(the)h(v)-5 b(alue)37 b(of)f(the)g
+Fs(ignoreeof)e Ft(option)j(to)g Fs(set)29 b(-o)36 b Ft(instead)h(of)f
+(exiting)i(imme-)330 4989 y(diately)f(when)e(it)i(receiv)m(es)h(an)e
+Fs(EOF)f Ft(on)h(its)g(standard)f(input)g(when)h(reading)g(a)g(command)
+g(\(see)330 5099 y(Section)31 b(4.3.1)h([The)e(Set)h(Builtin],)g(page)g
+(51\).)199 5230 y(7.)61 b(Command)43 b(history)h(\(see)h(Section)g(9.1)
+g([Bash)f(History)h(F)-8 b(acilities],)51 b(page)45 b(121\))h(and)d
+(history)330 5340 y(expansion)23 b(\(see)i(Section)f(9.3)h([History)f
+(In)m(teraction],)j(page)d(123\))h(are)f(enabled)g(b)m(y)f(default.)39
+b(Bash)p eop end
+%%Page: 76 82
+TeXDict begin 76 81 bop 150 -116 a Ft(76)2572 b(Bash)31
+b(Reference)g(Man)m(ual)330 299 y(will)23 b(sa)m(v)m(e)i(the)e(command)
+f(history)h(to)h(the)f(\014le)g(named)f(b)m(y)h Fs($HISTFILE)d
+Ft(when)i(an)h(in)m(teractiv)m(e)j(shell)330 408 y(exits.)199
+543 y(8.)61 b(Alias)31 b(expansion)g(\(see)g(Section)g(6.6)g
+([Aliases],)i(page)e(79\))h(is)e(p)s(erformed)f(b)m(y)h(default.)199
+678 y(9.)61 b(In)24 b(the)g(absence)h(of)f(an)m(y)h(traps,)g(Bash)g
+(ignores)f Fs(SIGTERM)f Ft(\(see)i(Section)g(3.7.6)h([Signals],)g(page)
+f(32\).)154 813 y(10.)61 b(In)26 b(the)h(absence)h(of)f(an)m(y)g
+(traps,)g Fs(SIGINT)e Ft(is)i(caugh)m(t)h(and)f(handled)e(\(\(see)k
+(Section)e(3.7.6)i([Signals],)330 923 y(page)i(32\).)42
+b Fs(SIGINT)29 b Ft(will)h(in)m(terrupt)g(some)h(shell)g(builtins.)154
+1058 y(11.)61 b(An)40 b(in)m(teractiv)m(e)j(login)e(shell)g(sends)e(a)i
+Fs(SIGHUP)d Ft(to)j(all)g(jobs)f(on)g(exit)h(if)g(the)f
+Fs(huponexit)e Ft(shell)330 1167 y(option)31 b(has)f(b)s(een)g(enabled)
+g(\(see)h(Section)g(3.7.6)i([Signals],)e(page)g(32\).)154
+1302 y(12.)61 b(The)26 b(`)p Fs(-n)p Ft(')f(in)m(v)m(o)s(cation)k
+(option)d(is)g(ignored,)h(and)f(`)p Fs(set)k(-n)p Ft(')25
+b(has)h(no)g(e\013ect)i(\(see)e(Section)h(4.3.1)h([The)330
+1412 y(Set)j(Builtin],)g(page)g(51\).)154 1547 y(13.)61
+b(Bash)32 b(will)g(c)m(hec)m(k)i(for)e(mail)g(p)s(erio)s(dically)-8
+b(,)34 b(dep)s(ending)c(on)i(the)g(v)-5 b(alues)32 b(of)g(the)h
+Fs(MAIL)p Ft(,)e Fs(MAILPATH)p Ft(,)330 1656 y(and)f
+Fs(MAILCHECK)e Ft(shell)i(v)-5 b(ariables)31 b(\(see)h(Section)f(5.2)g
+([Bash)g(V)-8 b(ariables],)32 b(page)f(61\).)154 1791
+y(14.)61 b(Expansion)32 b(errors)h(due)f(to)i(references)f(to)h(un)m(b)
+s(ound)c(shell)j(v)-5 b(ariables)34 b(after)g(`)p Fs(set)29
+b(-u)p Ft(')k(has)g(b)s(een)330 1901 y(enabled)d(will)h(not)g(cause)g
+(the)f(shell)h(to)g(exit)g(\(see)g(Section)h(4.3.1)g([The)e(Set)h
+(Builtin],)g(page)g(51\).)154 2036 y(15.)61 b(The)48
+b(shell)h(will)f(not)h(exit)g(on)g(expansion)f(errors)g(caused)g(b)m(y)
+h Fq(v)-5 b(ar)54 b Ft(b)s(eing)48 b(unset)g(or)h(n)m(ull)f(in)330
+2146 y Fs(${)p Fi(var)11 b Fs(:?)p Fi(word)g Fs(})26
+b Ft(expansions)k(\(see)h(Section)h(3.5.3)g([Shell)e(P)m(arameter)i
+(Expansion],)e(page)h(19\).)154 2280 y(16.)61 b(Redirection)31
+b(errors)f(encoun)m(tered)h(b)m(y)f(shell)h(builtins)f(will)g(not)h
+(cause)g(the)f(shell)h(to)g(exit.)154 2415 y(17.)61 b(When)26
+b(running)f(in)i Fl(posix)e Ft(mo)s(de,)j(a)f(sp)s(ecial)g(builtin)f
+(returning)g(an)g(error)h(status)g(will)g(not)f(cause)330
+2525 y(the)31 b(shell)f(to)h(exit)h(\(see)f(Section)g(6.11)h([Bash)f
+(POSIX)e(Mo)s(de],)i(page)g(84\).)154 2660 y(18.)61 b(A)34
+b(failed)g Fs(exec)f Ft(will)h(not)g(cause)g(the)g(shell)g(to)g(exit)h
+(\(see)f(Section)h(4.1)g([Bourne)f(Shell)f(Builtins],)330
+2770 y(page)e(35\).)154 2904 y(19.)61 b(P)m(arser)31
+b(syn)m(tax)f(errors)g(will)h(not)g(cause)g(the)f(shell)h(to)g(exit.)
+154 3039 y(20.)61 b(Simple)21 b(sp)s(elling)h(correction)g(for)g
+(directory)g(argumen)m(ts)f(to)i(the)e Fs(cd)g Ft(builtin)g(is)h
+(enabled)f(b)m(y)h(default)330 3149 y(\(see)35 b(the)g(description)f
+(of)h(the)f Fs(cdspell)f Ft(option)h(to)i(the)e Fs(shopt)f
+Ft(builtin)h(in)g(Section)h(4.3.2)h([The)330 3259 y(Shopt)30
+b(Builtin],)h(page)g(55\).)154 3394 y(21.)61 b(The)42
+b(shell)h(will)g(c)m(hec)m(k)h(the)f(v)-5 b(alue)43 b(of)f(the)h
+Fs(TMOUT)e Ft(v)-5 b(ariable)44 b(and)e(exit)h(if)g(a)g(command)f(is)h
+(not)330 3503 y(read)30 b(within)g(the)g(sp)s(eci\014ed)f(n)m(um)m(b)s
+(er)g(of)i(seconds)f(after)g(prin)m(ting)g Fs($PS1)f
+Ft(\(see)i(Section)g(5.2)h([Bash)330 3613 y(V)-8 b(ariables],)32
+b(page)f(61\).)150 3847 y Fr(6.4)68 b(Bash)45 b(Conditional)h
+(Expressions)150 4006 y Ft(Conditional)26 b(expressions)g(are)g(used)f
+(b)m(y)g(the)h Fs([[)f Ft(comp)s(ound)g(command)g(and)g(the)h
+Fs(test)f Ft(and)g Fs([)g Ft(builtin)150 4116 y(commands.)275
+4251 y(Expressions)32 b(ma)m(y)h(b)s(e)g(unary)f(or)h(binary)-8
+b(.)48 b(Unary)33 b(expressions)f(are)i(often)f(used)f(to)i(examine)g
+(the)150 4361 y(status)26 b(of)g(a)h(\014le.)39 b(There)26
+b(are)g(string)g(op)s(erators)g(and)g(n)m(umeric)f(comparison)i(op)s
+(erators)f(as)g(w)m(ell.)40 b(If)26 b(the)150 4470 y
+Fq(\014le)38 b Ft(argumen)m(t)c(to)f(one)h(of)f(the)g(primaries)g(is)g
+(of)g(the)g(form)g(`)p Fs(/dev/fd/)p Fi(N)11 b Ft(',)31
+b(then)i(\014le)g(descriptor)g Fq(N)43 b Ft(is)150 4580
+y(c)m(hec)m(k)m(ed.)e(If)26 b(the)g Fq(\014le)31 b Ft(argumen)m(t)26
+b(to)h(one)f(of)g(the)h(primaries)e(is)h(one)g(of)g(`)p
+Fs(/dev/stdin)p Ft(',)f(`)p Fs(/dev/stdout)p Ft(',)150
+4689 y(or)30 b(`)p Fs(/dev/stderr)p Ft(',)e(\014le)j(descriptor)f(0,)h
+(1,)g(or)g(2,)g(resp)s(ectiv)m(ely)-8 b(,)32 b(is)e(c)m(hec)m(k)m(ed.)
+275 4825 y(When)h(used)g(with)g(`)p Fs([[)p Ft(',)h(The)f(`)p
+Fs(<)p Ft(')h(and)f(`)p Fs(>)p Ft(')g(op)s(erators)h(sort)g
+(lexicographically)i(using)d(the)h(curren)m(t)150 4934
+y(lo)s(cale.)275 5070 y(Unless)44 b(otherwise)h(sp)s(eci\014ed,)j
+(primaries)c(that)h(op)s(erate)g(on)g(\014les)f(follo)m(w)i(sym)m(b)s
+(olic)f(links)g(and)150 5179 y(op)s(erate)31 b(on)f(the)h(target)h(of)e
+(the)h(link,)f(rather)h(than)f(the)g(link)h(itself.)150
+5340 y Fs(-a)f Fi(file)162 b Ft(T)-8 b(rue)30 b(if)g
+Fq(\014le)36 b Ft(exists.)p eop end
+%%Page: 77 83
+TeXDict begin 77 82 bop 150 -116 a Ft(Chapter)30 b(6:)41
+b(Bash)30 b(F)-8 b(eatures)2484 b(77)150 299 y Fs(-b)30
+b Fi(file)162 b Ft(T)-8 b(rue)30 b(if)g Fq(\014le)36
+b Ft(exists)31 b(and)f(is)g(a)h(blo)s(c)m(k)g(sp)s(ecial)g(\014le.)150
+461 y Fs(-c)f Fi(file)162 b Ft(T)-8 b(rue)30 b(if)g Fq(\014le)36
+b Ft(exists)31 b(and)f(is)g(a)h(c)m(haracter)h(sp)s(ecial)f(\014le.)150
+623 y Fs(-d)f Fi(file)162 b Ft(T)-8 b(rue)30 b(if)g Fq(\014le)36
+b Ft(exists)31 b(and)f(is)g(a)h(directory)-8 b(.)150
+785 y Fs(-e)30 b Fi(file)162 b Ft(T)-8 b(rue)30 b(if)g
+Fq(\014le)36 b Ft(exists.)150 948 y Fs(-f)30 b Fi(file)162
+b Ft(T)-8 b(rue)30 b(if)g Fq(\014le)36 b Ft(exists)31
+b(and)f(is)g(a)h(regular)f(\014le.)150 1110 y Fs(-g)g
+Fi(file)162 b Ft(T)-8 b(rue)30 b(if)g Fq(\014le)36 b
+Ft(exists)31 b(and)f(its)g(set-group-id)h(bit)g(is)f(set.)150
+1272 y Fs(-h)g Fi(file)162 b Ft(T)-8 b(rue)30 b(if)g
+Fq(\014le)36 b Ft(exists)31 b(and)f(is)g(a)h(sym)m(b)s(olic)g(link.)150
+1434 y Fs(-k)f Fi(file)162 b Ft(T)-8 b(rue)30 b(if)g
+Fq(\014le)36 b Ft(exists)31 b(and)f(its)g Fs(")p Ft(stic)m(ky)p
+Fs(")h Ft(bit)g(is)f(set.)150 1596 y Fs(-p)g Fi(file)162
+b Ft(T)-8 b(rue)30 b(if)g Fq(\014le)36 b Ft(exists)31
+b(and)f(is)g(a)h(named)f(pip)s(e)f(\(FIF)m(O\).)150 1759
+y Fs(-r)h Fi(file)162 b Ft(T)-8 b(rue)30 b(if)g Fq(\014le)36
+b Ft(exists)31 b(and)f(is)g(readable.)150 1921 y Fs(-s)g
+Fi(file)162 b Ft(T)-8 b(rue)30 b(if)g Fq(\014le)36 b
+Ft(exists)31 b(and)f(has)g(a)g(size)i(greater)f(than)f(zero.)150
+2083 y Fs(-t)g Fi(fd)258 b Ft(T)-8 b(rue)30 b(if)g(\014le)h(descriptor)
+f Fq(fd)j Ft(is)e(op)s(en)e(and)h(refers)g(to)h(a)g(terminal.)150
+2245 y Fs(-u)f Fi(file)162 b Ft(T)-8 b(rue)30 b(if)g
+Fq(\014le)36 b Ft(exists)31 b(and)f(its)g(set-user-id)h(bit)f(is)h
+(set.)150 2407 y Fs(-w)f Fi(file)162 b Ft(T)-8 b(rue)30
+b(if)g Fq(\014le)36 b Ft(exists)31 b(and)f(is)g(writable.)150
+2570 y Fs(-x)g Fi(file)162 b Ft(T)-8 b(rue)30 b(if)g
+Fq(\014le)36 b Ft(exists)31 b(and)f(is)g(executable.)150
+2732 y Fs(-O)g Fi(file)162 b Ft(T)-8 b(rue)30 b(if)g
+Fq(\014le)36 b Ft(exists)31 b(and)f(is)g(o)m(wned)g(b)m(y)h(the)f
+(e\013ectiv)m(e)j(user)d(id.)150 2894 y Fs(-G)g Fi(file)162
+b Ft(T)-8 b(rue)30 b(if)g Fq(\014le)36 b Ft(exists)31
+b(and)f(is)g(o)m(wned)g(b)m(y)h(the)f(e\013ectiv)m(e)j(group)d(id.)150
+3056 y Fs(-L)g Fi(file)162 b Ft(T)-8 b(rue)30 b(if)g
+Fq(\014le)36 b Ft(exists)31 b(and)f(is)g(a)h(sym)m(b)s(olic)g(link.)150
+3218 y Fs(-S)f Fi(file)162 b Ft(T)-8 b(rue)30 b(if)g
+Fq(\014le)36 b Ft(exists)31 b(and)f(is)g(a)h(so)s(c)m(k)m(et.)150
+3381 y Fs(-N)f Fi(file)162 b Ft(T)-8 b(rue)30 b(if)g
+Fq(\014le)36 b Ft(exists)31 b(and)f(has)g(b)s(een)f(mo)s(di\014ed)h
+(since)g(it)h(w)m(as)g(last)g(read.)150 3543 y Fi(file1)39
+b Fs(-nt)30 b Fi(file2)630 3652 y Ft(T)-8 b(rue)23 b(if)g
+Fq(\014le1)31 b Ft(is)24 b(new)m(er)f(\(according)i(to)f(mo)s
+(di\014cation)g(date\))g(than)g Fq(\014le2)7 b Ft(,)25
+b(or)f(if)f Fq(\014le1)31 b Ft(exists)630 3762 y(and)f
+Fq(\014le2)38 b Ft(do)s(es)30 b(not.)150 3924 y Fi(file1)39
+b Fs(-ot)30 b Fi(file2)630 4034 y Ft(T)-8 b(rue)30 b(if)g
+Fq(\014le1)38 b Ft(is)31 b(older)f(than)g Fq(\014le2)7
+b Ft(,)32 b(or)e(if)h Fq(\014le2)38 b Ft(exists)31 b(and)e
+Fq(\014le1)39 b Ft(do)s(es)30 b(not.)150 4196 y Fi(file1)39
+b Fs(-ef)30 b Fi(file2)630 4305 y Ft(T)-8 b(rue)30 b(if)g
+Fq(\014le1)38 b Ft(and)30 b Fq(\014le2)38 b Ft(refer)30
+b(to)i(the)e(same)h(device)g(and)f(ino)s(de)g(n)m(um)m(b)s(ers.)150
+4468 y Fs(-o)g Fi(optname)630 4577 y Ft(T)-8 b(rue)41
+b(if)g(shell)g(option)h Fq(optname)47 b Ft(is)41 b(enabled.)73
+b(The)41 b(list)h(of)f(options)g(app)s(ears)g(in)g(the)630
+4687 y(description)h(of)f(the)h(`)p Fs(-o)p Ft(')f(option)h(to)h(the)e
+Fs(set)g Ft(builtin)g(\(see)i(Section)f(4.3.1)h([The)f(Set)630
+4796 y(Builtin],)31 b(page)g(51\).)150 4959 y Fs(-z)f
+Fi(string)630 5068 y Ft(T)-8 b(rue)30 b(if)g(the)h(length)g(of)f
+Fq(string)38 b Ft(is)31 b(zero.)150 5230 y Fs(-n)f Fi(string)150
+5340 y(string)192 b Ft(T)-8 b(rue)30 b(if)g(the)h(length)g(of)f
+Fq(string)38 b Ft(is)31 b(non-zero.)p eop end
+%%Page: 78 84
+TeXDict begin 78 83 bop 150 -116 a Ft(78)2572 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fi(string1)39 b Fs(==)30
+b Fi(string2)150 408 y(string1)39 b Fs(=)30 b Fi(string2)630
+518 y Ft(T)-8 b(rue)35 b(if)h(the)g(strings)g(are)g(equal.)58
+b(`)p Fs(=)p Ft(')36 b(should)f(b)s(e)g(used)g(with)h(the)g
+Fs(test)f Ft(command)g(for)630 628 y Fl(posix)30 b Ft(conformance.)150
+790 y Fi(string1)39 b Fs(!=)30 b Fi(string2)630 899 y
+Ft(T)-8 b(rue)30 b(if)g(the)h(strings)f(are)h(not)f(equal.)150
+1061 y Fi(string1)39 b Fs(<)30 b Fi(string2)630 1171
+y Ft(T)-8 b(rue)30 b(if)g Fq(string1)38 b Ft(sorts)31
+b(b)s(efore)f Fq(string2)38 b Ft(lexicographically)-8
+b(.)150 1333 y Fi(string1)39 b Fs(>)30 b Fi(string2)630
+1442 y Ft(T)-8 b(rue)30 b(if)g Fq(string1)38 b Ft(sorts)31
+b(after)g Fq(string2)38 b Ft(lexicographically)-8 b(.)150
+1604 y Fi(arg1)40 b Fs(OP)29 b Fi(arg2)630 1714 y Fs(OP)k
+Ft(is)h(one)g(of)h(`)p Fs(-eq)p Ft(',)f(`)p Fs(-ne)p
+Ft(',)h(`)p Fs(-lt)p Ft(',)g(`)p Fs(-le)p Ft(',)f(`)p
+Fs(-gt)p Ft(',)h(or)f(`)p Fs(-ge)p Ft('.)51 b(These)34
+b(arithmetic)h(binary)630 1823 y(op)s(erators)h(return)e(true)i(if)f
+Fq(arg1)44 b Ft(is)36 b(equal)g(to,)i(not)e(equal)g(to,)i(less)e(than,)
+h(less)f(than)f(or)630 1933 y(equal)28 b(to,)h(greater)g(than,)f(or)f
+(greater)i(than)e(or)h(equal)g(to)g Fq(arg2)7 b Ft(,)30
+b(resp)s(ectiv)m(ely)-8 b(.)41 b Fq(Arg1)36 b Ft(and)630
+2043 y Fq(arg2)j Ft(ma)m(y)30 b(b)s(e)g(p)s(ositiv)m(e)i(or)e(negativ)m
+(e)j(in)m(tegers.)150 2279 y Fr(6.5)68 b(Shell)45 b(Arithmetic)150
+2438 y Ft(The)35 b(shell)g(allo)m(ws)i(arithmetic)f(expressions)f(to)h
+(b)s(e)f(ev)-5 b(aluated,)38 b(as)d(one)h(of)f(the)h(shell)f
+(expansions)g(or)150 2548 y(b)m(y)30 b(the)h Fs(let)e
+Ft(and)h(the)h(`)p Fs(-i)p Ft(')f(option)h(to)g(the)f
+Fs(declare)f Ft(builtins.)275 2685 y(Ev)-5 b(aluation)27
+b(is)g(done)f(in)g(\014xed-width)g(in)m(tegers)i(with)e(no)h(c)m(hec)m
+(k)h(for)e(o)m(v)m(er\015o)m(w,)j(though)d(division)h(b)m(y)150
+2795 y(0)g(is)g(trapp)s(ed)f(and)h(\015agged)g(as)h(an)f(error.)39
+b(The)26 b(op)s(erators)h(and)g(their)g(precedence,)h(asso)s(ciativit)m
+(y)-8 b(,)32 b(and)150 2904 y(v)-5 b(alues)35 b(are)h(the)f(same)g(as)h
+(in)e(the)h(C)g(language.)56 b(The)35 b(follo)m(wing)h(list)g(of)f(op)s
+(erators)g(is)g(group)s(ed)f(in)m(to)150 3014 y(lev)m(els)27
+b(of)f(equal-precedence)i(op)s(erators.)39 b(The)25 b(lev)m(els)j(are)e
+(listed)h(in)e(order)h(of)g(decreasing)g(precedence.)150
+3177 y Fi(id)11 b Fs(++)29 b Fi(id)11 b Fs(--)630 3287
+y Ft(v)-5 b(ariable)31 b(p)s(ost-incremen)m(t)g(and)f(p)s(ost-decremen)
+m(t)150 3449 y Fs(++)p Fi(id)40 b Fs(--)p Fi(id)630 3558
+y Ft(v)-5 b(ariable)31 b(pre-incremen)m(t)g(and)f(pre-decremen)m(t)150
+3720 y Fs(-)g(+)354 b Ft(unary)29 b(min)m(us)h(and)g(plus)150
+3882 y Fs(!)g(~)354 b Ft(logical)33 b(and)d(bit)m(wise)h(negation)150
+4044 y Fs(**)384 b Ft(exp)s(onen)m(tiation)150 4206 y
+Fs(*)30 b(/)g(\045)276 b Ft(m)m(ultiplication,)33 b(division,)d
+(remainder)150 4368 y Fs(+)g(-)354 b Ft(addition,)31
+b(subtraction)150 4530 y Fs(<<)f(>>)258 b Ft(left)31
+b(and)f(righ)m(t)h(bit)m(wise)g(shifts)150 4692 y Fs(<=)f(>=)g(<)g(>)
+102 b Ft(comparison)150 4854 y Fs(==)30 b(!=)258 b Ft(equalit)m(y)32
+b(and)e(inequalit)m(y)150 5016 y Fs(&)432 b Ft(bit)m(wise)31
+b(AND)150 5178 y Fs(^)432 b Ft(bit)m(wise)31 b(exclusiv)m(e)h(OR)150
+5340 y Fs(|)432 b Ft(bit)m(wise)31 b(OR)p eop end
+%%Page: 79 85
+TeXDict begin 79 84 bop 150 -116 a Ft(Chapter)30 b(6:)41
+b(Bash)30 b(F)-8 b(eatures)2484 b(79)150 299 y Fs(&&)384
+b Ft(logical)33 b(AND)150 446 y Fs(||)384 b Ft(logical)33
+b(OR)150 592 y Fs(expr)c(?)h(expr)f(:)h(expr)630 702
+y Ft(conditional)i(op)s(erator)150 849 y Fs(=)e(*=)g(/=)g(\045=)f(+=)h
+(-=)g(<<=)f(>>=)h(&=)g(^=)f(|=)630 958 y Ft(assignmen)m(t)150
+1105 y Fs(expr1)g(,)h(expr2)630 1214 y Ft(comma)275 1361
+y(Shell)38 b(v)-5 b(ariables)39 b(are)g(allo)m(w)m(ed)i(as)e(op)s
+(erands;)i(parameter)e(expansion)g(is)f(p)s(erformed)g(b)s(efore)g(the)
+150 1471 y(expression)g(is)g(ev)-5 b(aluated.)66 b(Within)38
+b(an)h(expression,)h(shell)e(v)-5 b(ariables)39 b(ma)m(y)g(also)g(b)s
+(e)f(referenced)g(b)m(y)150 1580 y(name)31 b(without)f(using)g(the)h
+(parameter)g(expansion)f(syn)m(tax.)42 b(A)31 b(shell)f(v)-5
+b(ariable)32 b(that)f(is)f(n)m(ull)h(or)f(unset)150 1690
+y(ev)-5 b(aluates)41 b(to)f(0)g(when)e(referenced)h(b)m(y)g(name)h
+(without)f(using)g(the)g(parameter)h(expansion)f(syn)m(tax.)150
+1800 y(The)c(v)-5 b(alue)37 b(of)f(a)h(v)-5 b(ariable)36
+b(is)g(ev)-5 b(aluated)38 b(as)e(an)g(arithmetic)h(expression)f(when)f
+(it)h(is)g(referenced,)i(or)150 1909 y(when)31 b(a)i(v)-5
+b(ariable)33 b(whic)m(h)f(has)g(b)s(een)f(giv)m(en)j(the)e
+Fq(in)m(teger)40 b Ft(attribute)33 b(using)f(`)p Fs(declare)d(-i)p
+Ft(')i(is)i(assigned)150 2019 y(a)k(v)-5 b(alue.)58 b(A)36
+b(n)m(ull)g(v)-5 b(alue)37 b(ev)-5 b(aluates)38 b(to)f(0.)58
+b(A)36 b(shell)h(v)-5 b(ariable)36 b(need)g(not)h(ha)m(v)m(e)g(its)g
+(in)m(teger)g(attribute)150 2128 y(turned)29 b(on)h(to)i(b)s(e)d(used)h
+(in)g(an)g(expression.)275 2256 y(Constan)m(ts)41 b(with)g(a)h(leading)
+f(0)h(are)g(in)m(terpreted)f(as)g(o)s(ctal)i(n)m(um)m(b)s(ers.)72
+b(A)41 b(leading)h(`)p Fs(0x)p Ft(')f(or)g(`)p Fs(0X)p
+Ft(')150 2366 y(denotes)31 b(hexadecimal.)43 b(Otherwise,)31
+b(n)m(um)m(b)s(ers)e(tak)m(e)k(the)e(form)f([)p Fq(base)5
+b Fs(#)p Ft(])p Fq(n)p Ft(,)31 b(where)f Fq(base)36 b
+Ft(is)31 b(a)g(decimal)150 2476 y(n)m(um)m(b)s(er)26
+b(b)s(et)m(w)m(een)i(2)f(and)g(64)h(represen)m(ting)g(the)f(arithmetic)
+h(base,)h(and)d Fq(n)h Ft(is)g(a)h(n)m(um)m(b)s(er)e(in)h(that)h(base.)
+150 2585 y(If)39 b Fq(base)5 b Fs(#)40 b Ft(is)g(omitted,)j(then)d
+(base)g(10)g(is)g(used.)68 b(The)39 b(digits)i(greater)g(than)e(9)h
+(are)g(represen)m(ted)g(b)m(y)150 2695 y(the)34 b(lo)m(w)m(ercase)h
+(letters,)h(the)d(upp)s(ercase)g(letters,)i(`)p Fs(@)p
+Ft(',)g(and)e(`)p Fs(_)p Ft(',)h(in)f(that)h(order.)50
+b(If)32 b Fq(base)39 b Ft(is)34 b(less)f(than)150 2804
+y(or)i(equal)g(to)g(36,)i(lo)m(w)m(ercase)g(and)e(upp)s(ercase)e
+(letters)j(ma)m(y)g(b)s(e)e(used)g(in)m(terc)m(hangeably)i(to)g
+(represen)m(t)150 2914 y(n)m(um)m(b)s(ers)29 b(b)s(et)m(w)m(een)i(10)g
+(and)f(35.)275 3042 y(Op)s(erators)44 b(are)h(ev)-5 b(aluated)46
+b(in)f(order)f(of)h(precedence.)85 b(Sub-expressions)44
+b(in)g(paren)m(theses)i(are)150 3152 y(ev)-5 b(aluated)32
+b(\014rst)d(and)h(ma)m(y)h(o)m(v)m(erride)g(the)g(precedence)g(rules)f
+(ab)s(o)m(v)m(e.)150 3371 y Fr(6.6)68 b(Aliases)150 3531
+y Fq(Aliases)41 b Ft(allo)m(w)d(a)f(string)f(to)h(b)s(e)f(substituted)g
+(for)g(a)g(w)m(ord)g(when)g(it)h(is)f(used)f(as)i(the)g(\014rst)e(w)m
+(ord)h(of)h(a)150 3640 y(simple)32 b(command.)45 b(The)31
+b(shell)i(main)m(tains)f(a)h(list)f(of)g(aliases)i(that)e(ma)m(y)h(b)s
+(e)e(set)h(and)g(unset)f(with)h(the)150 3750 y Fs(alias)d
+Ft(and)h Fs(unalias)e Ft(builtin)i(commands.)275 3878
+y(The)f(\014rst)f(w)m(ord)i(of)f(eac)m(h)i(simple)f(command,)g(if)f
+(unquoted,)g(is)h(c)m(hec)m(k)m(ed)h(to)g(see)f(if)g(it)g(has)f(an)g
+(alias.)150 3988 y(If)24 b(so,)i(that)g(w)m(ord)e(is)h(replaced)g(b)m
+(y)f(the)h(text)h(of)e(the)h(alias.)40 b(The)24 b(c)m(haracters)i(`)p
+Fs(/)p Ft(',)h(`)p Fs($)p Ft(',)f(`)p Fs(`)p Ft(',)g(`)p
+Fs(=)p Ft(')f(and)f(an)m(y)h(of)150 4097 y(the)e(shell)g(metac)m
+(haracters)i(or)e(quoting)g(c)m(haracters)h(listed)g(ab)s(o)m(v)m(e)g
+(ma)m(y)f(not)g(app)s(ear)f(in)h(an)g(alias)h(name.)150
+4207 y(The)e(replacemen)m(t)h(text)g(ma)m(y)g(con)m(tain)h(an)m(y)e(v)
+-5 b(alid)23 b(shell)f(input,)h(including)f(shell)g(metac)m(haracters.)
+40 b(The)150 4317 y(\014rst)35 b(w)m(ord)g(of)h(the)g(replacemen)m(t)i
+(text)e(is)g(tested)h(for)e(aliases,)k(but)c(a)h(w)m(ord)g(that)g(is)g
+(iden)m(tical)i(to)e(an)150 4426 y(alias)c(b)s(eing)f(expanded)f(is)h
+(not)g(expanded)f(a)h(second)g(time.)43 b(This)30 b(means)h(that)g(one)
+g(ma)m(y)h(alias)g Fs(ls)e Ft(to)150 4536 y Fs("ls)f(-F")p
+Ft(,)36 b(for)f(instance,)i(and)d(Bash)h(do)s(es)g(not)g(try)g(to)g
+(recursiv)m(ely)h(expand)e(the)h(replacemen)m(t)i(text.)150
+4645 y(If)31 b(the)h(last)h(c)m(haracter)g(of)f(the)g(alias)h(v)-5
+b(alue)32 b(is)g(a)g(space)g(or)g(tab)g(c)m(haracter,)i(then)d(the)h
+(next)g(command)150 4755 y(w)m(ord)e(follo)m(wing)i(the)e(alias)i(is)e
+(also)i(c)m(hec)m(k)m(ed)g(for)e(alias)i(expansion.)275
+4883 y(Aliases)d(are)f(created)i(and)d(listed)i(with)f(the)g
+Fs(alias)f Ft(command,)h(and)g(remo)m(v)m(ed)h(with)f(the)g
+Fs(unalias)150 4993 y Ft(command.)275 5121 y(There)44
+b(is)h(no)g(mec)m(hanism)g(for)f(using)h(argumen)m(ts)g(in)f(the)h
+(replacemen)m(t)i(text,)i(as)d(in)e Fs(csh)p Ft(.)83
+b(If)150 5230 y(argumen)m(ts)37 b(are)h(needed,)g(a)g(shell)f(function)
+f(should)g(b)s(e)h(used)f(\(see)i(Section)g(3.3)g([Shell)f(F)-8
+b(unctions],)150 5340 y(page)31 b(14\).)p eop end
+%%Page: 80 86
+TeXDict begin 80 85 bop 150 -116 a Ft(80)2572 b(Bash)31
+b(Reference)g(Man)m(ual)275 299 y(Aliases)i(are)h(not)e(expanded)g
+(when)g(the)h(shell)g(is)g(not)g(in)m(teractiv)m(e,)j(unless)c(the)h
+Fs(expand_aliases)150 408 y Ft(shell)e(option)f(is)h(set)g(using)f
+Fs(shopt)f Ft(\(see)i(Section)g(4.3.2)h([The)e(Shopt)g(Builtin],)h
+(page)g(55\).)275 540 y(The)38 b(rules)h(concerning)h(the)f
+(de\014nition)g(and)g(use)g(of)g(aliases)i(are)e(somewhat)h(confusing.)
+67 b(Bash)150 650 y(alw)m(a)m(ys)42 b(reads)f(at)h(least)g(one)f
+(complete)i(line)e(of)g(input)f(b)s(efore)h(executing)h(an)m(y)f(of)g
+(the)g(commands)150 760 y(on)h(that)h(line.)77 b(Aliases)44
+b(are)e(expanded)g(when)f(a)i(command)f(is)g(read,)k(not)c(when)g(it)g
+(is)h(executed.)150 869 y(Therefore,)f(an)e(alias)h(de\014nition)e(app)
+s(earing)h(on)f(the)h(same)h(line)f(as)g(another)g(command)f(do)s(es)h
+(not)150 979 y(tak)m(e)31 b(e\013ect)f(un)m(til)g(the)f(next)g(line)h
+(of)f(input)f(is)h(read.)41 b(The)28 b(commands)h(follo)m(wing)i(the)e
+(alias)h(de\014nition)150 1088 y(on)d(that)h(line)f(are)h(not)f
+(a\013ected)i(b)m(y)e(the)g(new)g(alias.)41 b(This)26
+b(b)s(eha)m(vior)h(is)g(also)h(an)f(issue)g(when)f(functions)150
+1198 y(are)d(executed.)39 b(Aliases)24 b(are)f(expanded)f(when)f(a)i
+(function)g(de\014nition)f(is)h(read,)h(not)f(when)e(the)i(function)150
+1308 y(is)i(executed,)j(b)s(ecause)d(a)h(function)f(de\014nition)f(is)i
+(itself)g(a)f(comp)s(ound)f(command.)39 b(As)25 b(a)h(consequence,)150
+1417 y(aliases)36 b(de\014ned)d(in)h(a)g(function)g(are)h(not)f(a)m(v)
+-5 b(ailable)37 b(un)m(til)d(after)h(that)g(function)f(is)g(executed.)
+53 b(T)-8 b(o)35 b(b)s(e)150 1527 y(safe,)41 b(alw)m(a)m(ys)f(put)d
+(alias)j(de\014nitions)e(on)g(a)h(separate)g(line,)i(and)d(do)g(not)g
+(use)g Fs(alias)f Ft(in)h(comp)s(ound)150 1636 y(commands.)275
+1768 y(F)-8 b(or)31 b(almost)g(ev)m(ery)g(purp)s(ose,)e(shell)i
+(functions)f(are)g(preferred)g(o)m(v)m(er)h(aliases.)150
+1996 y Fr(6.7)68 b(Arra)l(ys)150 2155 y Ft(Bash)33 b(pro)m(vides)g
+(one-dimensional)g(indexed)f(and)h(asso)s(ciativ)m(e)i(arra)m(y)e(v)-5
+b(ariables.)49 b(An)m(y)33 b(v)-5 b(ariable)33 b(ma)m(y)150
+2265 y(b)s(e)e(used)h(as)g(an)g(indexed)f(arra)m(y;)j(the)e
+Fs(declare)e Ft(builtin)h(will)i(explicitly)g(declare)g(an)f(arra)m(y)
+-8 b(.)46 b(There)32 b(is)150 2374 y(no)h(maxim)m(um)g(limit)h(on)f
+(the)g(size)h(of)g(an)f(arra)m(y)-8 b(,)35 b(nor)d(an)m(y)i(requiremen)
+m(t)f(that)h(mem)m(b)s(ers)e(b)s(e)g(indexed)150 2484
+y(or)26 b(assigned)h(con)m(tiguously)-8 b(.)41 b(Indexed)25
+b(arra)m(ys)i(are)f(referenced)g(using)g(in)m(tegers)i(\(including)e
+(arithmetic)150 2593 y(expressions)41 b(\(see)h(Section)g(6.5)h([Shell)
+e(Arithmetic],)46 b(page)c(78\))g(and)f(are)g(zero-based;)48
+b(asso)s(ciativ)m(e)150 2703 y(arra)m(ys)31 b(use)f(arbitrary)g
+(strings.)275 2835 y(An)c(indexed)h(arra)m(y)h(is)f(created)h
+(automatically)j(if)c(an)m(y)g(v)-5 b(ariable)28 b(is)g(assigned)f(to)h
+(using)f(the)g(syn)m(tax)390 2967 y Fs(name[)p Fi(subscript)11
+b Fs(]=)p Fi(value)150 3099 y Ft(The)25 b Fq(subscript)g
+Ft(is)h(treated)g(as)f(an)g(arithmetic)h(expression)f(that)h(m)m(ust)f
+(ev)-5 b(aluate)27 b(to)e(a)h(n)m(um)m(b)s(er)e(greater)150
+3208 y(than)30 b(or)g(equal)h(to)g(zero.)42 b(T)-8 b(o)31
+b(explicitly)h(declare)f(an)f(arra)m(y)-8 b(,)32 b(use)390
+3340 y Fs(declare)46 b(-a)h Fi(name)150 3472 y Ft(The)30
+b(syn)m(tax)390 3604 y Fs(declare)46 b(-a)h Fi(name)11
+b Fs([)p Fi(subscript)g Fs(])150 3736 y Ft(is)30 b(also)i(accepted;)g
+(the)e Fq(subscript)h Ft(is)g(ignored.)275 3868 y(Asso)s(ciativ)m(e)h
+(arra)m(ys)f(are)g(created)g(using)390 4000 y Fs(declare)46
+b(-A)h Fi(name)11 b Fs(.)275 4132 y Ft(A)m(ttributes)46
+b(ma)m(y)h(b)s(e)e(sp)s(eci\014ed)g(for)h(an)g(arra)m(y)g(v)-5
+b(ariable)47 b(using)e(the)h Fs(declare)e Ft(and)h Fs(readonly)150
+4242 y Ft(builtins.)40 b(Eac)m(h)31 b(attribute)g(applies)g(to)g(all)g
+(mem)m(b)s(ers)f(of)g(an)h(arra)m(y)-8 b(.)275 4374 y(Arra)m(ys)30
+b(are)h(assigned)f(to)h(using)f(comp)s(ound)f(assignmen)m(ts)i(of)g
+(the)f(form)390 4506 y Fs(name=\(value)p Fi(1)55 b Fs(...)47
+b(value)p Fi(n)11 b Fs(\))150 4638 y Ft(where)37 b(eac)m(h)i
+Fq(v)-5 b(alue)42 b Ft(is)c(of)g(the)f(form)g Fs([)p
+Fi(subscript)11 b Fs(]=)p Fq(string)d Ft(.)58 b(Indexed)36
+b(arra)m(y)i(assignmen)m(ts)g(do)g(not)150 4747 y(require)c(the)g(brac)
+m(k)m(et)h(and)e(subscript.)50 b(When)34 b(assigning)g(to)g(indexed)g
+(arra)m(ys,)h(if)f(the)g(optional)h(sub-)150 4857 y(script)c(is)h
+(supplied,)f(that)h(index)f(is)h(assigned)g(to;)h(otherwise)f(the)f
+(index)h(of)f(the)h(elemen)m(t)h(assigned)f(is)150 4966
+y(the)f(last)g(index)f(assigned)g(to)h(b)m(y)g(the)f(statemen)m(t)i
+(plus)e(one.)41 b(Indexing)30 b(starts)g(at)i(zero.)275
+5098 y(When)e(assigning)h(to)g(an)f(asso)s(ciativ)m(e)j(arra)m(y)-8
+b(,)32 b(the)e(subscript)f(is)i(required.)275 5230 y(This)f(syn)m(tax)j
+(is)e(also)i(accepted)g(b)m(y)f(the)f Fs(declare)f Ft(builtin.)44
+b(Individual)31 b(arra)m(y)h(elemen)m(ts)h(ma)m(y)g(b)s(e)150
+5340 y(assigned)e(to)g(using)f(the)g Fs(name[)p Fq(subscript)r
+Fs(]=)p Fq(v)-5 b(alue)33 b Ft(syn)m(tax)e(in)m(tro)s(duced)f(ab)s(o)m
+(v)m(e.)p eop end
+%%Page: 81 87
+TeXDict begin 81 86 bop 150 -116 a Ft(Chapter)30 b(6:)41
+b(Bash)30 b(F)-8 b(eatures)2484 b(81)275 299 y(An)m(y)33
+b(elemen)m(t)i(of)f(an)f(arra)m(y)h(ma)m(y)g(b)s(e)f(referenced)g
+(using)g Fs(${name[)p Fq(subscript)r Fs(]})p Ft(.)46
+b(The)33 b(braces)h(are)150 408 y(required)28 b(to)j(a)m(v)m(oid)f
+(con\015icts)g(with)f(the)h(shell's)f(\014lename)h(expansion)f(op)s
+(erators.)41 b(If)28 b(the)i Fq(subscript)g Ft(is)150
+518 y(`)p Fs(@)p Ft(')f(or)g(`)p Fs(*)p Ft(',)g(the)g(w)m(ord)g
+(expands)f(to)i(all)f(mem)m(b)s(ers)f(of)h(the)g(arra)m(y)h
+Fq(name)5 b Ft(.)40 b(These)29 b(subscripts)e(di\013er)i(only)150
+628 y(when)36 b(the)g(w)m(ord)g(app)s(ears)g(within)g(double)g(quotes.)
+60 b(If)36 b(the)h(w)m(ord)f(is)g(double-quoted,)j Fs(${name[*]})150
+737 y Ft(expands)20 b(to)h(a)g(single)g(w)m(ord)f(with)h(the)g(v)-5
+b(alue)21 b(of)f(eac)m(h)i(arra)m(y)f(mem)m(b)s(er)f(separated)h(b)m(y)
+g(the)f(\014rst)g(c)m(haracter)150 847 y(of)38 b(the)g
+Fs(IFS)f Ft(v)-5 b(ariable,)41 b(and)c Fs(${name[@]})e
+Ft(expands)i(eac)m(h)i(elemen)m(t)g(of)f Fq(name)43 b
+Ft(to)c(a)f(separate)h(w)m(ord.)150 956 y(When)32 b(there)h(are)f(no)g
+(arra)m(y)h(mem)m(b)s(ers,)f Fs(${name[@]})e Ft(expands)h(to)i
+(nothing.)47 b(If)31 b(the)i(double-quoted)150 1066 y(expansion)39
+b(o)s(ccurs)h(within)f(a)h(w)m(ord,)i(the)d(expansion)h(of)g(the)f
+(\014rst)g(parameter)h(is)g(joined)f(with)h(the)150 1176
+y(b)s(eginning)j(part)h(of)g(the)g(original)h(w)m(ord,)j(and)43
+b(the)h(expansion)g(of)g(the)g(last)h(parameter)f(is)g(joined)150
+1285 y(with)35 b(the)g(last)h(part)f(of)g(the)g(original)h(w)m(ord.)55
+b(This)34 b(is)h(analogous)h(to)g(the)f(expansion)g(of)g(the)g(sp)s
+(ecial)150 1395 y(parameters)28 b(`)p Fs(@)p Ft(')g(and)f(`)p
+Fs(*)p Ft('.)39 b Fs(${#name[)p Fq(subscript)r Fs(]})24
+b Ft(expands)j(to)h(the)g(length)g(of)f Fs(${name[)p
+Fq(subscript)r Fs(]})p Ft(.)150 1504 y(If)j Fq(subscript)i
+Ft(is)f(`)p Fs(@)p Ft(')f(or)h(`)p Fs(*)p Ft(',)g(the)g(expansion)g(is)
+g(the)g(n)m(um)m(b)s(er)e(of)i(elemen)m(ts)h(in)f(the)g(arra)m(y)-8
+b(.)42 b(Referencing)150 1614 y(an)30 b(arra)m(y)h(v)-5
+b(ariable)31 b(without)g(a)f(subscript)g(is)g(equiv)-5
+b(alen)m(t)32 b(to)f(referencing)g(with)f(a)g(subscript)g(of)g(0.)275
+1757 y(An)35 b(arra)m(y)i(v)-5 b(ariable)37 b(is)g(considered)f(set)h
+(if)f(a)h(subscript)e(has)h(b)s(een)g(assigned)g(a)h(v)-5
+b(alue.)59 b(The)36 b(n)m(ull)150 1866 y(string)30 b(is)h(a)g(v)-5
+b(alid)30 b(v)-5 b(alue.)275 2009 y(The)32 b Fs(unset)g
+Ft(builtin)h(is)g(used)g(to)h(destro)m(y)g(arra)m(ys.)50
+b Fs(unset)31 b Fq(name)5 b Ft([)p Fq(subscript)r Ft(])33
+b(destro)m(ys)h(the)f(arra)m(y)150 2119 y(elemen)m(t)i(at)g(index)f
+Fq(subscript)r Ft(.)50 b(Care)34 b(m)m(ust)f(b)s(e)h(tak)m(en)h(to)f(a)
+m(v)m(oid)i(un)m(w)m(an)m(ted)e(side)g(e\013ects)h(caused)f(b)m(y)150
+2228 y(\014lename)40 b(expansion.)69 b Fs(unset)39 b
+Fq(name)5 b Ft(,)42 b(where)e Fq(name)45 b Ft(is)39 b(an)h(arra)m(y)-8
+b(,)44 b(remo)m(v)m(es)d(the)f(en)m(tire)h(arra)m(y)-8
+b(.)70 b(A)150 2338 y(subscript)29 b(of)i(`)p Fs(*)p
+Ft(')f(or)h(`)p Fs(@)p Ft(')f(also)h(remo)m(v)m(es)h(the)f(en)m(tire)g
+(arra)m(y)-8 b(.)275 2481 y(The)41 b Fs(declare)p Ft(,)i
+Fs(local)p Ft(,)h(and)d Fs(readonly)f Ft(builtins)h(eac)m(h)j(accept)f
+(a)f(`)p Fs(-a)p Ft(')g(option)h(to)f(sp)s(ecify)g(an)150
+2591 y(indexed)34 b(arra)m(y)h(and)f(a)h(`)p Fs(-A)p
+Ft(')g(option)g(to)g(sp)s(ecify)g(an)f(asso)s(ciativ)m(e)j(arra)m(y)-8
+b(.)55 b(The)34 b Fs(read)f Ft(builtin)i(accepts)150
+2700 y(a)h(`)p Fs(-a)p Ft(')f(option)h(to)g(assign)g(a)f(list)h(of)g(w)
+m(ords)f(read)g(from)g(the)h(standard)e(input)h(to)h(an)f(arra)m(y)-8
+b(,)38 b(and)d(can)150 2810 y(read)c(v)-5 b(alues)31
+b(from)f(the)h(standard)f(input)g(in)m(to)i(individual)e(arra)m(y)h
+(elemen)m(ts.)44 b(The)30 b Fs(set)g Ft(and)g Fs(declare)150
+2919 y Ft(builtins)g(displa)m(y)g(arra)m(y)h(v)-5 b(alues)31
+b(in)f(a)h(w)m(a)m(y)g(that)g(allo)m(ws)h(them)e(to)h(b)s(e)f(reused)g
+(as)g(input.)150 3164 y Fr(6.8)68 b(The)45 b(Directory)g(Stac)l(k)150
+3324 y Ft(The)21 b(directory)h(stac)m(k)h(is)e(a)h(list)g(of)f(recen)m
+(tly-visited)j(directories.)39 b(The)20 b Fs(pushd)g
+Ft(builtin)h(adds)g(directories)150 3433 y(to)42 b(the)f(stac)m(k)i(as)
+e(it)h(c)m(hanges)g(the)f(curren)m(t)g(directory)-8 b(,)45
+b(and)40 b(the)i Fs(popd)e Ft(builtin)g(remo)m(v)m(es)j(sp)s(eci\014ed)
+150 3543 y(directories)29 b(from)f(the)h(stac)m(k)h(and)d(c)m(hanges)j
+(the)e(curren)m(t)g(directory)h(to)g(the)g(directory)f(remo)m(v)m(ed.)
+41 b(The)150 3653 y Fs(dirs)29 b Ft(builtin)h(displa)m(ys)h(the)f(con)m
+(ten)m(ts)i(of)f(the)f(directory)h(stac)m(k.)275 3795
+y(The)k(con)m(ten)m(ts)i(of)f(the)h(directory)f(stac)m(k)h(are)f(also)h
+(visible)g(as)f(the)g(v)-5 b(alue)36 b(of)g(the)g Fs(DIRSTACK)e
+Ft(shell)150 3905 y(v)-5 b(ariable.)150 4113 y Fj(6.8.1)63
+b(Directory)40 b(Stac)m(k)g(Builtins)150 4289 y Fs(dirs)870
+4427 y(dirs)47 b([+)p Fi(N)57 b Fs(|)48 b(-)p Fi(N)11
+b Fs(])46 b([-clpv])630 4566 y Ft(Displa)m(y)35 b(the)f(list)g(of)g
+(curren)m(tly)g(remem)m(b)s(ered)f(directories.)51 b(Directories)36
+b(are)e(added)f(to)630 4676 y(the)28 b(list)h(with)f(the)g
+Fs(pushd)f Ft(command;)i(the)f Fs(popd)f Ft(command)h(remo)m(v)m(es)h
+(directories)g(from)630 4785 y(the)i(list.)630 4953 y
+Fs(+)p Fi(N)384 b Ft(Displa)m(ys)23 b(the)f Fq(N)10 b
+Ft(th)21 b(directory)h(\(coun)m(ting)h(from)e(the)h(left)g(of)g(the)g
+(list)g(prin)m(ted)1110 5063 y(b)m(y)30 b Fs(dirs)f Ft(when)h(in)m(v)m
+(ok)m(ed)i(without)e(options\),)h(starting)g(with)g(zero.)630
+5230 y Fs(-)p Fi(N)384 b Ft(Displa)m(ys)47 b(the)g Fq(N)10
+b Ft(th)46 b(directory)h(\(coun)m(ting)g(from)f(the)g(righ)m(t)h(of)g
+(the)f(list)1110 5340 y(prin)m(ted)25 b(b)m(y)g Fs(dirs)g
+Ft(when)f(in)m(v)m(ok)m(ed)j(without)f(options\),)h(starting)g(with)e
+(zero.)p eop end
+%%Page: 82 88
+TeXDict begin 82 87 bop 150 -116 a Ft(82)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y Fs(-c)384 b Ft(Clears)31
+b(the)f(directory)h(stac)m(k)h(b)m(y)e(deleting)h(all)h(of)e(the)h
+(elemen)m(ts.)630 457 y Fs(-l)384 b Ft(Pro)s(duces)30
+b(a)i(longer)g(listing;)h(the)f(default)f(listing)i(format)e(uses)g(a)h
+(tilde)g(to)1110 567 y(denote)f(the)f(home)h(directory)-8
+b(.)630 725 y Fs(-p)384 b Ft(Causes)30 b Fs(dirs)f Ft(to)i(prin)m(t)f
+(the)h(directory)g(stac)m(k)h(with)e(one)g(en)m(try)h(p)s(er)e(line.)
+630 883 y Fs(-v)384 b Ft(Causes)36 b Fs(dirs)f Ft(to)i(prin)m(t)f(the)g
+(directory)h(stac)m(k)h(with)e(one)h(en)m(try)f(p)s(er)f(line,)1110
+993 y(pre\014xing)30 b(eac)m(h)h(en)m(try)g(with)f(its)h(index)e(in)i
+(the)f(stac)m(k.)150 1151 y Fs(popd)870 1285 y(popd)47
+b([+)p Fi(N)57 b Fs(|)48 b(-)p Fi(N)11 b Fs(])46 b([-n])630
+1419 y Ft(Remo)m(v)m(e)26 b(the)e(top)g(en)m(try)h(from)e(the)h
+(directory)h(stac)m(k,)i(and)c Fs(cd)h Ft(to)h(the)f(new)f(top)i
+(directory)-8 b(.)630 1528 y(When)32 b(no)g(argumen)m(ts)h(are)g(giv)m
+(en,)h Fs(popd)d Ft(remo)m(v)m(es)j(the)f(top)f(directory)h(from)f(the)
+g(stac)m(k)630 1638 y(and)f(p)s(erforms)e(a)j Fs(cd)f
+Ft(to)h(the)f(new)g(top)h(directory)-8 b(.)44 b(The)31
+b(elemen)m(ts)i(are)e(n)m(um)m(b)s(ered)f(from)630 1748
+y(0)d(starting)g(at)g(the)g(\014rst)f(directory)h(listed)g(with)f
+Fs(dirs)p Ft(;)h(i.e.,)i Fs(popd)c Ft(is)i(equiv)-5 b(alen)m(t)28
+b(to)f Fs(popd)630 1857 y(+0)p Ft(.)630 2015 y Fs(+)p
+Fi(N)384 b Ft(Remo)m(v)m(es)22 b(the)f Fq(N)10 b Ft(th)20
+b(directory)g(\(coun)m(ting)i(from)e(the)g(left)h(of)g(the)f(list)h
+(prin)m(ted)1110 2125 y(b)m(y)30 b Fs(dirs)p Ft(\),)g(starting)h(with)f
+(zero.)630 2283 y Fs(-)p Fi(N)384 b Ft(Remo)m(v)m(es)46
+b(the)g Fq(N)10 b Ft(th)44 b(directory)h(\(coun)m(ting)h(from)f(the)g
+(righ)m(t)g(of)g(the)g(list)1110 2393 y(prin)m(ted)30
+b(b)m(y)g Fs(dirs)p Ft(\),)g(starting)h(with)f(zero.)630
+2551 y Fs(-n)384 b Ft(Suppresses)27 b(the)j(normal)g(c)m(hange)g(of)g
+(directory)g(when)e(remo)m(ving)j(directo-)1110 2661
+y(ries)f(from)g(the)h(stac)m(k,)h(so)f(that)g(only)f(the)h(stac)m(k)g
+(is)g(manipulated.)150 2819 y Fs(pushd)870 2953 y(pushd)46
+b([-n])h([+)p Fi(N)57 b Fs(|)48 b Fi(-N)58 b Fs(|)47
+b Fi(dir)57 b Fs(])630 3087 y Ft(Sa)m(v)m(e)29 b(the)f(curren)m(t)g
+(directory)g(on)g(the)g(top)g(of)g(the)g(directory)h(stac)m(k)g(and)e
+(then)h Fs(cd)f Ft(to)i Fq(dir)7 b Ft(.)630 3196 y(With)31
+b(no)f(argumen)m(ts,)h Fs(pushd)e Ft(exc)m(hanges)j(the)e(top)h(t)m(w)m
+(o)h(directories.)630 3354 y Fs(-n)384 b Ft(Suppresses)26
+b(the)i(normal)h(c)m(hange)g(of)f(directory)h(when)e(adding)h
+(directories)1110 3464 y(to)j(the)g(stac)m(k,)h(so)e(that)h(only)g(the)
+f(stac)m(k)i(is)f(manipulated.)630 3622 y Fs(+)p Fi(N)384
+b Ft(Brings)29 b(the)f Fq(N)10 b Ft(th)29 b(directory)g(\(coun)m(ting)h
+(from)e(the)g(left)i(of)e(the)h(list)g(prin)m(ted)1110
+3732 y(b)m(y)34 b Fs(dirs)p Ft(,)g(starting)h(with)f(zero\))i(to)f(the)
+f(top)g(of)h(the)f(list)h(b)m(y)f(rotating)i(the)1110
+3841 y(stac)m(k.)630 4000 y Fs(-)p Fi(N)384 b Ft(Brings)23
+b(the)g Fq(N)10 b Ft(th)23 b(directory)h(\(coun)m(ting)g(from)e(the)i
+(righ)m(t)f(of)g(the)h(list)f(prin)m(ted)1110 4109 y(b)m(y)34
+b Fs(dirs)p Ft(,)g(starting)h(with)f(zero\))i(to)f(the)f(top)g(of)h
+(the)f(list)h(b)m(y)f(rotating)i(the)1110 4219 y(stac)m(k.)630
+4377 y Fi(dir)336 b Ft(Mak)m(es)36 b(the)f(curren)m(t)g(w)m(orking)g
+(directory)g(b)s(e)f(the)h(top)g(of)g(the)g(stac)m(k,)j(and)1110
+4487 y(then)30 b(executes)i(the)e(equiv)-5 b(alen)m(t)32
+b(of)f(`)p Fs(cd)f Fq(dir)7 b Ft('.)39 b Fs(cd)p Ft(s)30
+b(to)h Fq(dir)7 b Ft(.)150 4718 y Fr(6.9)68 b(Con)l(trolling)47
+b(the)e(Prompt)150 4877 y Ft(The)24 b(v)-5 b(alue)24
+b(of)h(the)f(v)-5 b(ariable)25 b Fs(PROMPT_COMMAND)20
+b Ft(is)25 b(examined)f(just)g(b)s(efore)f(Bash)i(prin)m(ts)e(eac)m(h)j
+(primary)150 4987 y(prompt.)39 b(If)28 b Fs(PROMPT_COMMAND)d
+Ft(is)j(set)h(and)f(has)g(a)h(non-n)m(ull)f(v)-5 b(alue,)29
+b(then)f(the)h(v)-5 b(alue)29 b(is)f(executed)i(just)150
+5096 y(as)h(if)f(it)h(had)f(b)s(een)f(t)m(yp)s(ed)h(on)h(the)f(command)
+g(line.)275 5230 y(In)d(addition,)j(the)f(follo)m(wing)h(table)f
+(describ)s(es)f(the)h(sp)s(ecial)g(c)m(haracters)h(whic)m(h)f(can)f
+(app)s(ear)g(in)h(the)150 5340 y(prompt)g(v)-5 b(ariables:)p
+eop end
+%%Page: 83 89
+TeXDict begin 83 88 bop 150 -116 a Ft(Chapter)30 b(6:)41
+b(Bash)30 b(F)-8 b(eatures)2484 b(83)150 299 y Fs(\\a)384
+b Ft(A)30 b(b)s(ell)h(c)m(haracter.)150 457 y Fs(\\d)384
+b Ft(The)30 b(date,)h(in)f Fs(")p Ft(W)-8 b(eekda)m(y)32
+b(Mon)m(th)f(Date)p Fs(")h Ft(format)f(\(e.g.,)h Fs(")p
+Ft(T)-8 b(ue)30 b(Ma)m(y)h(26)p Fs(")p Ft(\).)150 615
+y Fs(\\D{)p Fi(format)11 b Fs(})630 725 y Ft(The)27 b
+Fq(format)i Ft(is)f(passed)e(to)i Fs(strftime)p Ft(\(3\))f(and)f(the)i
+(result)f(is)g(inserted)g(in)m(to)h(the)g(prompt)630
+835 y(string;)42 b(an)d(empt)m(y)f Fq(format)j Ft(results)d(in)g(a)h
+(lo)s(cale-sp)s(eci\014c)h(time)f(represen)m(tation.)65
+b(The)630 944 y(braces)31 b(are)f(required.)150 1103
+y Fs(\\e)384 b Ft(An)30 b(escap)s(e)h(c)m(haracter.)150
+1261 y Fs(\\h)384 b Ft(The)30 b(hostname,)h(up)e(to)i(the)g(\014rst)e
+(`.'.)150 1419 y Fs(\\H)384 b Ft(The)30 b(hostname.)150
+1577 y Fs(\\j)384 b Ft(The)30 b(n)m(um)m(b)s(er)f(of)h(jobs)g(curren)m
+(tly)h(managed)g(b)m(y)f(the)g(shell.)150 1736 y Fs(\\l)384
+b Ft(The)30 b(basename)h(of)f(the)h(shell's)f(terminal)h(device)g
+(name.)150 1894 y Fs(\\n)384 b Ft(A)30 b(newline.)150
+2052 y Fs(\\r)384 b Ft(A)30 b(carriage)i(return.)150
+2211 y Fs(\\s)384 b Ft(The)22 b(name)g(of)h(the)f(shell,)i(the)f
+(basename)f(of)h Fs($0)f Ft(\(the)g(p)s(ortion)g(follo)m(wing)i(the)f
+(\014nal)e(slash\).)150 2369 y Fs(\\t)384 b Ft(The)30
+b(time,)h(in)f(24-hour)h(HH:MM:SS)g(format.)150 2527
+y Fs(\\T)384 b Ft(The)30 b(time,)h(in)f(12-hour)h(HH:MM:SS)g(format.)
+150 2685 y Fs(\\@)384 b Ft(The)30 b(time,)h(in)f(12-hour)h(am/pm)f
+(format.)150 2844 y Fs(\\A)384 b Ft(The)30 b(time,)h(in)f(24-hour)h
+(HH:MM)g(format.)150 3002 y Fs(\\u)384 b Ft(The)30 b(username)g(of)g
+(the)h(curren)m(t)f(user.)150 3160 y Fs(\\v)384 b Ft(The)30
+b(v)m(ersion)h(of)f(Bash)h(\(e.g.,)h(2.00\))150 3319
+y Fs(\\V)384 b Ft(The)30 b(release)i(of)e(Bash,)h(v)m(ersion)g
+Fs(+)f Ft(patc)m(hlev)m(el)i(\(e.g.,)h(2.00.0\))150 3477
+y Fs(\\w)384 b Ft(The)34 b(curren)m(t)h(w)m(orking)g(directory)-8
+b(,)37 b(with)e Fs($HOME)e Ft(abbreviated)j(with)e(a)h(tilde)h(\(uses)f
+(the)630 3587 y Fs($PROMPT_DIRTRIM)26 b Ft(v)-5 b(ariable\).)150
+3745 y Fs(\\W)384 b Ft(The)30 b(basename)h(of)f Fs($PWD)p
+Ft(,)g(with)g Fs($HOME)f Ft(abbreviated)h(with)g(a)h(tilde.)150
+3903 y Fs(\\!)384 b Ft(The)30 b(history)g(n)m(um)m(b)s(er)f(of)i(this)f
+(command.)150 4061 y Fs(\\#)384 b Ft(The)30 b(command)g(n)m(um)m(b)s
+(er)f(of)i(this)f(command.)150 4220 y Fs(\\$)384 b Ft(If)30
+b(the)g(e\013ectiv)m(e)j(uid)d(is)g(0,)h Fs(#)p Ft(,)g(otherwise)g
+Fs($)p Ft(.)150 4378 y Fs(\\)p Fi(nnn)288 b Ft(The)30
+b(c)m(haracter)i(whose)e(ASCI)s(I)f(co)s(de)h(is)h(the)f(o)s(ctal)i(v)
+-5 b(alue)31 b Fq(nnn)p Ft(.)150 4536 y Fs(\\\\)384 b
+Ft(A)30 b(bac)m(kslash.)150 4695 y Fs(\\[)384 b Ft(Begin)38
+b(a)f(sequence)g(of)g(non-prin)m(ting)g(c)m(haracters.)61
+b(This)36 b(could)h(b)s(e)g(used)f(to)h(em)m(b)s(ed)g(a)630
+4804 y(terminal)31 b(con)m(trol)h(sequence)e(in)m(to)i(the)e(prompt.)
+150 4963 y Fs(\\])384 b Ft(End)29 b(a)i(sequence)g(of)f(non-prin)m
+(ting)g(c)m(haracters.)275 5121 y(The)25 b(command)h(n)m(um)m(b)s(er)f
+(and)h(the)g(history)g(n)m(um)m(b)s(er)f(are)i(usually)f(di\013eren)m
+(t:)39 b(the)26 b(history)g(n)m(um)m(b)s(er)150 5230
+y(of)h(a)f(command)h(is)f(its)h(p)s(osition)f(in)g(the)h(history)f
+(list,)i(whic)m(h)f(ma)m(y)g(include)f(commands)g(restored)g(from)150
+5340 y(the)39 b(history)h(\014le)f(\(see)h(Section)g(9.1)h([Bash)e
+(History)h(F)-8 b(acilities],)45 b(page)40 b(121\),)j(while)d(the)f
+(command)p eop end
+%%Page: 84 90
+TeXDict begin 84 89 bop 150 -116 a Ft(84)2572 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y(n)m(um)m(b)s(er)42
+b(is)h(the)h(p)s(osition)f(in)g(the)g(sequence)h(of)f(commands)g
+(executed)h(during)e(the)i(curren)m(t)f(shell)150 408
+y(session.)275 550 y(After)35 b(the)g(string)g(is)g(deco)s(ded,)h(it)f
+(is)g(expanded)f(via)i(parameter)f(expansion,)i(command)d(substi-)150
+659 y(tution,)k(arithmetic)f(expansion,)g(and)e(quote)h(remo)m(v)-5
+b(al,)39 b(sub)5 b(ject)35 b(to)i(the)f(v)-5 b(alue)36
+b(of)g(the)g Fs(promptvars)150 769 y Ft(shell)31 b(option)f(\(see)i
+(Section)f(4.2)g([Bash)g(Builtins],)g(page)g(41\).)150
+1012 y Fr(6.10)68 b(The)45 b(Restricted)h(Shell)150 1171
+y Ft(If)27 b(Bash)h(is)g(started)g(with)g(the)g(name)g
+Fs(rbash)p Ft(,)f(or)g(the)h(`)p Fs(--restricted)p Ft(')d(or)j(`)p
+Fs(-r)p Ft(')g(option)g(is)g(supplied)e(at)150 1281 y(in)m(v)m(o)s
+(cation,)k(the)d(shell)g(b)s(ecomes)h(restricted.)40
+b(A)27 b(restricted)h(shell)f(is)g(used)f(to)i(set)f(up)f(an)h(en)m
+(vironmen)m(t)150 1391 y(more)g(con)m(trolled)i(than)e(the)g(standard)g
+(shell.)40 b(A)27 b(restricted)h(shell)f(b)s(eha)m(v)m(es)h(iden)m
+(tically)h(to)f Fs(bash)e Ft(with)150 1500 y(the)31 b(exception)g(that)
+g(the)g(follo)m(wing)h(are)e(disallo)m(w)m(ed)i(or)e(not)h(p)s
+(erformed:)225 1642 y Fp(\017)60 b Ft(Changing)30 b(directories)h(with)
+g(the)f Fs(cd)g Ft(builtin.)225 1780 y Fp(\017)60 b Ft(Setting)31
+b(or)f(unsetting)h(the)g(v)-5 b(alues)30 b(of)h(the)f
+Fs(SHELL)p Ft(,)g Fs(PATH)p Ft(,)f Fs(ENV)p Ft(,)h(or)g
+Fs(BASH_ENV)e Ft(v)-5 b(ariables.)225 1917 y Fp(\017)60
+b Ft(Sp)s(ecifying)30 b(command)g(names)g(con)m(taining)i(slashes.)225
+2055 y Fp(\017)60 b Ft(Sp)s(ecifying)30 b(a)h(\014lename)f(con)m
+(taining)i(a)f(slash)f(as)h(an)f(argumen)m(t)h(to)g(the)f
+Fs(.)h Ft(builtin)e(command.)225 2193 y Fp(\017)60 b
+Ft(Sp)s(ecifying)28 b(a)i(\014lename)f(con)m(taining)h(a)g(slash)e(as)h
+(an)g(argumen)m(t)h(to)f(the)g(`)p Fs(-p)p Ft(')g(option)g(to)h(the)f
+Fs(hash)330 2303 y Ft(builtin)h(command.)225 2441 y Fp(\017)60
+b Ft(Imp)s(orting)30 b(function)g(de\014nitions)g(from)f(the)i(shell)g
+(en)m(vironmen)m(t)g(at)g(startup.)225 2579 y Fp(\017)60
+b Ft(P)m(arsing)31 b(the)f(v)-5 b(alue)31 b(of)g Fs(SHELLOPTS)d
+Ft(from)h(the)i(shell)g(en)m(vironmen)m(t)g(at)g(startup.)225
+2717 y Fp(\017)60 b Ft(Redirecting)31 b(output)f(using)g(the)h(`)p
+Fs(>)p Ft(',)g(`)p Fs(>|)p Ft(',)f(`)p Fs(<>)p Ft(',)h(`)p
+Fs(>&)p Ft(',)f(`)p Fs(&>)p Ft(',)h(and)e(`)p Fs(>>)p
+Ft(')i(redirection)g(op)s(erators.)225 2855 y Fp(\017)60
+b Ft(Using)31 b(the)f Fs(exec)f Ft(builtin)h(to)h(replace)h(the)e
+(shell)h(with)f(another)h(command.)225 2993 y Fp(\017)60
+b Ft(Adding)40 b(or)h(deleting)h(builtin)e(commands)h(with)f(the)h(`)p
+Fs(-f)p Ft(')g(and)f(`)p Fs(-d)p Ft(')h(options)g(to)h(the)f
+Fs(enable)330 3102 y Ft(builtin.)225 3240 y Fp(\017)60
+b Ft(Using)31 b(the)f Fs(enable)f Ft(builtin)h(command)g(to)h(enable)g
+(disabled)f(shell)g(builtins.)225 3378 y Fp(\017)60 b
+Ft(Sp)s(ecifying)30 b(the)g(`)p Fs(-p)p Ft(')h(option)g(to)g(the)f
+Fs(command)f Ft(builtin.)225 3516 y Fp(\017)60 b Ft(T)-8
+b(urning)29 b(o\013)i(restricted)g(mo)s(de)f(with)g(`)p
+Fs(set)g(+r)p Ft(')g(or)g(`)p Fs(set)g(+o)g(restricted)p
+Ft('.)275 3686 y(These)g(restrictions)h(are)g(enforced)f(after)h(an)m
+(y)g(startup)f(\014les)g(are)h(read.)275 3828 y(When)j(a)i(command)e
+(that)i(is)f(found)f(to)h(b)s(e)g(a)g(shell)g(script)g(is)g(executed)h
+(\(see)g(Section)g(3.8)g([Shell)150 3937 y(Scripts],)25
+b(page)e(33\),)j Fs(rbash)c Ft(turns)g(o\013)i(an)m(y)f(restrictions)h
+(in)f(the)g(shell)h(spa)m(wned)e(to)i(execute)g(the)g(script.)150
+4180 y Fr(6.11)68 b(Bash)45 b(POSIX)f(Mo)t(de)150 4339
+y Ft(Starting)34 b(Bash)f(with)g(the)g(`)p Fs(--posix)p
+Ft(')f(command-line)i(option)g(or)f(executing)h(`)p Fs(set)c(-o)g
+(posix)p Ft(')i(while)150 4449 y(Bash)26 b(is)g(running)e(will)j(cause)
+f(Bash)g(to)h(conform)f(more)g(closely)h(to)g(the)f Fl(posix)f
+Ft(standard)g(b)m(y)h(c)m(hanging)150 4559 y(the)31 b(b)s(eha)m(vior)f
+(to)h(matc)m(h)g(that)g(sp)s(eci\014ed)f(b)m(y)g Fl(posix)g
+Ft(in)g(areas)h(where)f(the)h(Bash)f(default)h(di\013ers.)275
+4700 y(When)f(in)m(v)m(ok)m(ed)h(as)g Fs(sh)p Ft(,)f(Bash)h(en)m(ters)g
+Fl(posix)e Ft(mo)s(de)h(after)h(reading)g(the)f(startup)g(\014les.)275
+4841 y(The)f(follo)m(wing)j(list)f(is)g(what's)f(c)m(hanged)h(when)e(`)
+p Fl(posix)h Ft(mo)s(de')h(is)f(in)g(e\013ect:)199 4983
+y(1.)61 b(When)28 b(a)i(command)e(in)g(the)h(hash)f(table)i(no)e
+(longer)h(exists,)h(Bash)f(will)g(re-searc)m(h)h Fs($PATH)d
+Ft(to)i(\014nd)330 5092 y(the)i(new)e(lo)s(cation.)43
+b(This)29 b(is)i(also)g(a)m(v)-5 b(ailable)33 b(with)d(`)p
+Fs(shopt)f(-s)h(checkhash)p Ft('.)199 5230 y(2.)61 b(The)42
+b(message)h(prin)m(ted)e(b)m(y)h(the)g(job)g(con)m(trol)i(co)s(de)e
+(and)f(builtins)h(when)f(a)h(job)g(exits)h(with)f(a)330
+5340 y(non-zero)31 b(status)g(is)f(`Done\(status\)'.)p
+eop end
+%%Page: 85 91
+TeXDict begin 85 90 bop 150 -116 a Ft(Chapter)30 b(6:)41
+b(Bash)30 b(F)-8 b(eatures)2484 b(85)199 299 y(3.)61
+b(The)40 b(message)h(prin)m(ted)f(b)m(y)g(the)h(job)f(con)m(trol)h(co)s
+(de)g(and)f(builtins)f(when)h(a)g(job)g(is)h(stopp)s(ed)e(is)330
+408 y(`Stopp)s(ed\()p Fq(signame)5 b Ft(\)',)31 b(where)f
+Fq(signame)36 b Ft(is,)31 b(for)f(example,)h Fs(SIGTSTP)p
+Ft(.)199 545 y(4.)61 b(The)27 b Fs(bg)g Ft(builtin)g(uses)g(the)h
+(required)f(format)h(to)g(describ)s(e)f(eac)m(h)i(job)e(placed)h(in)f
+(the)h(bac)m(kground,)330 655 y(whic)m(h)h(do)s(es)g(not)g(include)g
+(an)g(indication)h(of)f(whether)f(the)h(job)g(is)g(the)h(curren)m(t)e
+(or)h(previous)g(job.)199 792 y(5.)61 b(Reserv)m(ed)40
+b(w)m(ords)g(app)s(earing)f(in)h(a)g(con)m(text)i(where)d(reserv)m(ed)h
+(w)m(ords)f(are)i(recognized)g(do)f(not)330 902 y(undergo)30
+b(alias)h(expansion.)199 1039 y(6.)61 b(The)38 b Fl(posix)h
+Fs(PS1)f Ft(and)g Fs(PS2)g Ft(expansions)g(of)i(`)p Fs(!)p
+Ft(')f(to)g(the)g(history)g(n)m(um)m(b)s(er)f(and)g(`)p
+Fs(!!)p Ft(')h(to)g(`)p Fs(!)p Ft(')h(are)330 1148 y(enabled,)26
+b(and)f(parameter)g(expansion)g(is)g(p)s(erformed)e(on)i(the)g(v)-5
+b(alues)25 b(of)g Fs(PS1)f Ft(and)h Fs(PS2)f Ft(regardless)330
+1258 y(of)31 b(the)f(setting)i(of)e(the)h Fs(promptvars)c
+Ft(option.)199 1395 y(7.)61 b(The)30 b Fl(posix)g Ft(startup)f(\014les)
+i(are)g(executed)g(\()p Fs($ENV)p Ft(\))f(rather)g(than)g(the)h(normal)
+f(Bash)g(\014les.)199 1532 y(8.)61 b(Tilde)30 b(expansion)g(is)f(only)h
+(p)s(erformed)f(on)h(assignmen)m(ts)g(preceding)g(a)g(command)g(name,)g
+(rather)330 1641 y(than)g(on)g(all)i(assignmen)m(t)f(statemen)m(ts)h
+(on)e(the)h(line.)199 1778 y(9.)61 b(The)30 b(default)g(history)h
+(\014le)f(is)h(`)p Fs(~/.sh_history)p Ft(')c(\(this)k(is)f(the)g
+(default)h(v)-5 b(alue)31 b(of)f Fs($HISTFILE)p Ft(\).)154
+1915 y(10.)61 b(The)23 b(output)f(of)i(`)p Fs(kill)29
+b(-l)p Ft(')23 b(prin)m(ts)f(all)i(the)g(signal)f(names)g(on)g(a)h
+(single)g(line,)h(separated)e(b)m(y)g(spaces,)330 2025
+y(without)30 b(the)h(`)p Fs(SIG)p Ft(')f(pre\014x.)154
+2162 y(11.)61 b(The)30 b Fs(kill)f Ft(builtin)h(do)s(es)g(not)h(accept)
+h(signal)f(names)f(with)g(a)h(`)p Fs(SIG)p Ft(')f(pre\014x.)154
+2299 y(12.)61 b(Non-in)m(teractiv)m(e)34 b(shells)c(exit)h(if)g
+Fq(\014lename)k Ft(in)30 b Fs(.)g Fq(\014lename)36 b
+Ft(is)31 b(not)f(found.)154 2436 y(13.)61 b(Non-in)m(teractiv)m(e)41
+b(shells)d(exit)h(if)f(a)g(syn)m(tax)g(error)g(in)f(an)h(arithmetic)h
+(expansion)f(results)f(in)h(an)330 2545 y(in)m(v)-5 b(alid)31
+b(expression.)154 2682 y(14.)61 b(Redirection)25 b(op)s(erators)f(do)g
+(not)g(p)s(erform)f(\014lename)h(expansion)g(on)g(the)g(w)m(ord)f(in)h
+(the)g(redirection)330 2792 y(unless)30 b(the)g(shell)h(is)f(in)m
+(teractiv)m(e.)154 2929 y(15.)61 b(Redirection)31 b(op)s(erators)g(do)f
+(not)h(p)s(erform)e(w)m(ord)h(splitting)h(on)f(the)h(w)m(ord)f(in)g
+(the)g(redirection.)154 3066 y(16.)61 b(F)-8 b(unction)35
+b(names)g(m)m(ust)f(b)s(e)g(v)-5 b(alid)35 b(shell)f
+Fs(name)p Ft(s.)52 b(That)34 b(is,)i(they)f(ma)m(y)g(not)g(con)m(tain)g
+(c)m(haracters)330 3176 y(other)e(than)g(letters,)h(digits,)h(and)d
+(underscores,)h(and)f(ma)m(y)h(not)g(start)h(with)e(a)h(digit.)49
+b(Declaring)330 3285 y(a)31 b(function)f(with)g(an)g(in)m(v)-5
+b(alid)31 b(name)g(causes)f(a)h(fatal)h(syn)m(tax)f(error)f(in)g
+(non-in)m(teractiv)m(e)j(shells.)154 3422 y(17.)61 b
+Fl(posix)30 b Ft(sp)s(ecial)h(builtins)e(are)i(found)e(b)s(efore)h
+(shell)h(functions)f(during)f(command)h(lo)s(okup.)154
+3559 y(18.)61 b(If)24 b(a)g Fl(posix)g Ft(sp)s(ecial)h(builtin)f
+(returns)f(an)h(error)g(status,)i(a)e(non-in)m(teractiv)m(e)j(shell)e
+(exits.)39 b(The)24 b(fatal)330 3669 y(errors)i(are)h(those)f(listed)h
+(in)f(the)h(POSIX)e(standard,)i(and)f(include)g(things)g(lik)m(e)i
+(passing)e(incorrect)330 3778 y(options,)43 b(redirection)d(errors,)i
+(v)-5 b(ariable)41 b(assignmen)m(t)g(errors)e(for)g(assignmen)m(ts)i
+(preceding)f(the)330 3888 y(command)30 b(name,)h(and)f(so)g(on.)154
+4025 y(19.)61 b(If)34 b Fs(CDPATH)f Ft(is)h(set,)i(the)f
+Fs(cd)f Ft(builtin)g(will)g(not)h(implicitly)h(app)s(end)c(the)j
+(curren)m(t)f(directory)h(to)g(it.)330 4134 y(This)29
+b(means)g(that)h Fs(cd)f Ft(will)h(fail)g(if)g(no)f(v)-5
+b(alid)30 b(directory)g(name)f(can)h(b)s(e)f(constructed)h(from)f(an)m
+(y)h(of)330 4244 y(the)i(en)m(tries)g(in)f Fs($CDPATH)p
+Ft(,)e(ev)m(en)j(if)g(the)f(a)h(directory)g(with)f(the)g(same)h(name)f
+(as)h(the)g(name)f(giv)m(en)330 4354 y(as)g(an)f(argumen)m(t)h(to)g
+Fs(cd)f Ft(exists)h(in)f(the)g(curren)m(t)g(directory)-8
+b(.)154 4491 y(20.)61 b(A)31 b(non-in)m(teractiv)m(e)j(shell)d(exits)h
+(with)e(an)h(error)g(status)g(if)g(a)g(v)-5 b(ariable)32
+b(assignmen)m(t)g(error)e(o)s(ccurs)330 4600 y(when)38
+b(no)h(command)g(name)g(follo)m(ws)i(the)e(assignmen)m(t)h(statemen)m
+(ts.)69 b(A)39 b(v)-5 b(ariable)40 b(assignmen)m(t)330
+4710 y(error)30 b(o)s(ccurs,)g(for)g(example,)i(when)d(trying)i(to)g
+(assign)f(a)h(v)-5 b(alue)31 b(to)g(a)g(readonly)f(v)-5
+b(ariable.)154 4847 y(21.)61 b(A)43 b(non-in)m(teractiv)m(e)i(shell)e
+(exits)h(with)f(an)f(error)h(status)g(if)g(the)g(iteration)h(v)-5
+b(ariable)44 b(in)f(a)g Fs(for)330 4956 y Ft(statemen)m(t)32
+b(or)f(the)f(selection)i(v)-5 b(ariable)32 b(in)e(a)g
+Fs(select)f Ft(statemen)m(t)j(is)f(a)f(readonly)h(v)-5
+b(ariable.)154 5093 y(22.)61 b(Pro)s(cess)30 b(substitution)g(is)h(not)
+f(a)m(v)-5 b(ailable.)154 5230 y(23.)61 b(Assignmen)m(t)23
+b(statemen)m(ts)h(preceding)e Fl(posix)f Ft(sp)s(ecial)i(builtins)f(p)s
+(ersist)g(in)f(the)i(shell)f(en)m(vironmen)m(t)330 5340
+y(after)31 b(the)f(builtin)g(completes.)p eop end
+%%Page: 86 92
+TeXDict begin 86 91 bop 150 -116 a Ft(86)2572 b(Bash)31
+b(Reference)g(Man)m(ual)154 299 y(24.)61 b(Assignmen)m(t)35
+b(statemen)m(ts)h(preceding)f(shell)f(function)g(calls)i(p)s(ersist)e
+(in)g(the)h(shell)f(en)m(vironmen)m(t)330 408 y(after)d(the)f(function)
+h(returns,)e(as)i(if)f(a)h Fl(posix)e Ft(sp)s(ecial)i(builtin)f
+(command)g(had)g(b)s(een)g(executed.)154 535 y(25.)61
+b(The)38 b Fs(export)f Ft(and)g Fs(readonly)f Ft(builtin)i(commands)g
+(displa)m(y)h(their)f(output)g(in)g(the)h(format)g(re-)330
+645 y(quired)30 b(b)m(y)g Fl(posix)p Ft(.)154 772 y(26.)61
+b(The)30 b Fs(trap)f Ft(builtin)h(displa)m(ys)g(signal)i(names)e
+(without)g(the)h(leading)g Fs(SIG)p Ft(.)154 899 y(27.)61
+b(The)39 b Fs(trap)e Ft(builtin)i(do)s(esn't)g(c)m(hec)m(k)h(the)g
+(\014rst)e(argumen)m(t)i(for)e(a)i(p)s(ossible)e(signal)i(sp)s
+(eci\014cation)330 1008 y(and)30 b(rev)m(ert)i(the)e(signal)i(handling)
+e(to)h(the)g(original)h(disp)s(osition)e(if)h(it)g(is,)g(unless)f(that)
+h(argumen)m(t)330 1118 y(consists)e(solely)g(of)g(digits)g(and)f(is)g
+(a)h(v)-5 b(alid)29 b(signal)g(n)m(um)m(b)s(er.)38 b(If)28
+b(users)g(w)m(an)m(t)h(to)g(reset)g(the)g(handler)330
+1228 y(for)h(a)g(giv)m(en)h(signal)g(to)f(the)h(original)g(disp)s
+(osition,)f(they)g(should)f(use)h(`)p Fs(-)p Ft(')g(as)g(the)g(\014rst)
+f(argumen)m(t.)154 1354 y(28.)61 b(The)21 b Fs(.)h Ft(and)f
+Fs(source)f Ft(builtins)h(do)g(not)h(searc)m(h)h(the)f(curren)m(t)f
+(directory)h(for)g(the)g(\014lename)f(argumen)m(t)330
+1464 y(if)30 b(it)h(is)g(not)f(found)f(b)m(y)i(searc)m(hing)g
+Fs(PATH)p Ft(.)154 1591 y(29.)61 b(Subshells)20 b(spa)m(wned)h(to)h
+(execute)g(command)g(substitutions)f(inherit)g(the)g(v)-5
+b(alue)22 b(of)g(the)f(`)p Fs(-e)p Ft(')g(option)330
+1700 y(from)34 b(the)h(paren)m(t)g(shell.)55 b(When)34
+b(not)i(in)e Fl(posix)g Ft(mo)s(de,)i(Bash)f(clears)h(the)f(`)p
+Fs(-e)p Ft(')f(option)i(in)e(suc)m(h)330 1810 y(subshells.)154
+1937 y(30.)61 b(Alias)31 b(expansion)g(is)f(alw)m(a)m(ys)i(enabled,)e
+(ev)m(en)i(in)e(non-in)m(teractiv)m(e)j(shells.)154 2064
+y(31.)61 b(When)43 b(the)g Fs(alias)f Ft(builtin)g(displa)m(ys)i(alias)
+g(de\014nitions,)i(it)d(do)s(es)g(not)g(displa)m(y)h(them)f(with)g(a)
+330 2173 y(leading)31 b(`)p Fs(alias)e Ft(')i(unless)f(the)g(`)p
+Fs(-p)p Ft(')g(option)h(is)g(supplied.)154 2300 y(32.)61
+b(When)40 b(the)g Fs(set)f Ft(builtin)h(is)g(in)m(v)m(ok)m(ed)h
+(without)f(options,)j(it)e(do)s(es)f(not)g(displa)m(y)g(shell)g
+(function)330 2410 y(names)30 b(and)g(de\014nitions.)154
+2537 y(33.)61 b(When)36 b(the)g Fs(set)g Ft(builtin)g(is)g(in)m(v)m(ok)
+m(ed)i(without)e(options,)i(it)f(displa)m(ys)f(v)-5 b(ariable)37
+b(v)-5 b(alues)37 b(without)330 2646 y(quotes,)26 b(unless)d(they)i
+(con)m(tain)g(shell)f(metac)m(haracters,)k(ev)m(en)d(if)f(the)g(result)
+g(con)m(tains)i(nonprin)m(ting)330 2756 y(c)m(haracters.)154
+2883 y(34.)61 b(When)35 b(the)g Fs(cd)f Ft(builtin)h(is)g(in)m(v)m(ok)m
+(ed)i(in)d Fq(logical)41 b Ft(mo)s(de,)36 b(and)f(the)g(pathname)g
+(constructed)g(from)330 2992 y Fs($PWD)i Ft(and)h(the)h(directory)f
+(name)h(supplied)e(as)i(an)f(argumen)m(t)h(do)s(es)f(not)g(refer)h(to)g
+(an)f(existing)330 3102 y(directory)-8 b(,)32 b Fs(cd)d
+Ft(will)i(fail)g(instead)g(of)f(falling)h(bac)m(k)h(to)f
+Fq(ph)m(ysical)j Ft(mo)s(de.)154 3229 y(35.)61 b(When)20
+b(the)h Fs(pwd)e Ft(builtin)h(is)g(supplied)g(the)g(`)p
+Fs(-P)p Ft(')g(option,)j(it)e(resets)g Fs($PWD)e Ft(to)i(a)g(pathname)f
+(con)m(taining)330 3339 y(no)30 b(symlinks.)154 3465
+y(36.)61 b(The)36 b Fs(pwd)f Ft(builtin)h(v)m(eri\014es)h(that)g(the)f
+(v)-5 b(alue)37 b(it)g(prin)m(ts)e(is)i(the)f(same)h(as)f(the)h(curren)
+m(t)f(directory)-8 b(,)330 3575 y(ev)m(en)31 b(if)f(it)h(is)g(not)f
+(ask)m(ed)h(to)g(c)m(hec)m(k)h(the)f(\014le)f(system)h(with)f(the)h(`)p
+Fs(-P)p Ft(')f(option.)154 3702 y(37.)61 b(When)35 b(listing)g(the)g
+(history)-8 b(,)36 b(the)f Fs(fc)g Ft(builtin)f(do)s(es)g(not)h
+(include)g(an)f(indication)i(of)f(whether)f(or)330 3811
+y(not)d(a)f(history)h(en)m(try)f(has)g(b)s(een)g(mo)s(di\014ed.)154
+3938 y(38.)61 b(The)30 b(default)g(editor)h(used)f(b)m(y)g
+Fs(fc)g Ft(is)g Fs(ed)p Ft(.)154 4065 y(39.)61 b(The)37
+b Fs(type)g Ft(and)g Fs(command)f Ft(builtins)i(will)g(not)g(rep)s(ort)
+f(a)i(non-executable)g(\014le)f(as)g(ha)m(ving)h(b)s(een)330
+4175 y(found,)26 b(though)h(the)g(shell)g(will)g(attempt)h(to)g
+(execute)g(suc)m(h)f(a)g(\014le)g(if)g(it)g(is)g(the)g(only)g(so-named)
+g(\014le)330 4284 y(found)i(in)h Fs($PATH)p Ft(.)154
+4411 y(40.)61 b(The)33 b Fs(vi)f Ft(editing)i(mo)s(de)f(will)g(in)m(v)m
+(ok)m(e)i(the)e Fs(vi)g Ft(editor)h(directly)f(when)f(the)i(`)p
+Fs(v)p Ft(')f(command)g(is)g(run,)330 4521 y(instead)e(of)f(c)m(hec)m
+(king)i Fs($VISUAL)d Ft(and)g Fs($EDITOR)p Ft(.)154 4648
+y(41.)61 b(When)41 b(the)g Fs(xpg_echo)e Ft(option)i(is)g(enabled,)j
+(Bash)d(do)s(es)g(not)g(attempt)h(to)g(in)m(terpret)f(an)m(y)h(ar-)330
+4757 y(gumen)m(ts)35 b(to)g Fs(echo)e Ft(as)i(options.)54
+b(Eac)m(h)35 b(argumen)m(t)g(is)f(displa)m(y)m(ed,)j(after)e(escap)s(e)
+g(c)m(haracters)h(are)330 4867 y(con)m(v)m(erted.)154
+4994 y(42.)61 b(The)30 b Fs(ulimit)f Ft(builtin)g(uses)h(a)h(blo)s(c)m
+(k)g(size)g(of)g(512)g(b)m(ytes)g(for)f(the)h(`)p Fs(-c)p
+Ft(')f(and)g(`)p Fs(-f)p Ft(')g(options.)154 5121 y(43.)61
+b(The)39 b(arriv)-5 b(al)41 b(of)f Fs(SIGCHLD)e Ft(when)h(a)h(trap)g
+(is)g(set)h(on)f Fs(SIGCHLD)e Ft(do)s(es)h(not)h(in)m(terrupt)g(the)g
+Fs(wait)330 5230 y Ft(builtin)c(and)h(cause)g(it)h(to)f(return)f
+(immediately)-8 b(.)62 b(The)37 b(trap)f(command)h(is)g(run)e(once)j
+(for)f(eac)m(h)330 5340 y(c)m(hild)31 b(that)g(exits.)p
+eop end
+%%Page: 87 93
+TeXDict begin 87 92 bop 150 -116 a Ft(Chapter)30 b(6:)41
+b(Bash)30 b(F)-8 b(eatures)2484 b(87)275 299 y(There)34
+b(is)g(other)h Fl(posix)f Ft(b)s(eha)m(vior)h(that)g(Bash)g(do)s(es)f
+(not)h(implemen)m(t)g(b)m(y)g(default)f(ev)m(en)i(when)d(in)150
+408 y Fl(posix)d Ft(mo)s(de.)40 b(Sp)s(eci\014cally:)199
+543 y(1.)61 b(The)30 b Fs(fc)f Ft(builtin)h(c)m(hec)m(ks)i
+Fs($EDITOR)c Ft(as)j(a)f(program)g(to)h(edit)g(history)f(en)m(tries)h
+(if)f Fs(FCEDIT)f Ft(is)h(unset,)330 653 y(rather)g(than)g(defaulting)h
+(directly)g(to)g Fs(ed)p Ft(.)40 b Fs(fc)30 b Ft(uses)g
+Fs(ed)g Ft(if)g Fs(EDITOR)f Ft(is)h(unset.)199 787 y(2.)61
+b(As)29 b(noted)g(ab)s(o)m(v)m(e,)i(Bash)e(requires)g(the)g
+Fs(xpg_echo)e Ft(option)j(to)g(b)s(e)e(enabled)h(for)g(the)g
+Fs(echo)f Ft(builtin)330 897 y(to)j(b)s(e)f(fully)g(conforman)m(t.)275
+1056 y(Bash)66 b(can)h(b)s(e)f(con\014gured)g(to)i(b)s(e)e
+Fl(posix)p Ft(-conforman)m(t)h(b)m(y)f(default,)77 b(b)m(y)66
+b(sp)s(ecifying)h(the)150 1166 y(`)p Fs(--enable-strict-posix-def)o
+(ault)o Ft(')i(to)76 b Fs(configure)c Ft(when)i(building)g(\(see)i
+(Section)f(10.8)150 1275 y([Optional)31 b(F)-8 b(eatures],)32
+b(page)f(129\).)p eop end
+%%Page: 88 94
+TeXDict begin 88 93 bop eop end
+%%Page: 89 95
+TeXDict begin 89 94 bop 150 -116 a Ft(Chapter)30 b(7:)41
+b(Job)30 b(Con)m(trol)2571 b(89)150 299 y Fo(7)80 b(Job)54
+b(Con)l(trol)150 521 y Ft(This)25 b(c)m(hapter)i(discusses)f(what)g
+(job)f(con)m(trol)j(is,)f(ho)m(w)f(it)h(w)m(orks,)g(and)f(ho)m(w)g
+(Bash)g(allo)m(ws)h(y)m(ou)g(to)g(access)150 631 y(its)k(facilities.)
+150 858 y Fr(7.1)68 b(Job)45 b(Con)l(trol)h(Basics)150
+1018 y Ft(Job)27 b(con)m(trol)i(refers)e(to)h(the)g(abilit)m(y)h(to)f
+(selectiv)m(ely)j(stop)c(\(susp)s(end\))f(the)i(execution)h(of)e(pro)s
+(cesses)h(and)150 1127 y(con)m(tin)m(ue)38 b(\(resume\))g(their)f
+(execution)h(at)g(a)g(later)g(p)s(oin)m(t.)61 b(A)37
+b(user)g(t)m(ypically)i(emplo)m(ys)f(this)f(facilit)m(y)150
+1237 y(via)27 b(an)e(in)m(teractiv)m(e)k(in)m(terface)f(supplied)d
+(join)m(tly)h(b)m(y)g(the)h(op)s(erating)f(system)g(k)m(ernel's)h
+(terminal)f(driv)m(er)150 1347 y(and)k(Bash.)275 1479
+y(The)23 b(shell)i(asso)s(ciates)h(a)f Fq(job)h Ft(with)e(eac)m(h)i
+(pip)s(eline.)38 b(It)25 b(k)m(eeps)f(a)h(table)h(of)e(curren)m(tly)h
+(executing)g(jobs,)150 1588 y(whic)m(h)33 b(ma)m(y)i(b)s(e)e(listed)h
+(with)f(the)h Fs(jobs)f Ft(command.)50 b(When)33 b(Bash)h(starts)g(a)g
+(job)g(async)m(hronously)-8 b(,)34 b(it)150 1698 y(prin)m(ts)c(a)h
+(line)f(that)h(lo)s(oks)g(lik)m(e:)390 1830 y Fs([1])47
+b(25647)150 1962 y Ft(indicating)34 b(that)g(this)f(job)g(is)g(job)g(n)
+m(um)m(b)s(er)f(1)i(and)f(that)g(the)h(pro)s(cess)f Fl(id)g
+Ft(of)g(the)h(last)g(pro)s(cess)f(in)g(the)150 2072 y(pip)s(eline)42
+b(asso)s(ciated)i(with)e(this)g(job)g(is)h(25647.)78
+b(All)43 b(of)g(the)g(pro)s(cesses)f(in)g(a)h(single)g(pip)s(eline)f
+(are)150 2181 y(mem)m(b)s(ers)30 b(of)g(the)h(same)f(job.)41
+b(Bash)30 b(uses)g(the)h Fq(job)h Ft(abstraction)f(as)g(the)g(basis)f
+(for)g(job)g(con)m(trol.)275 2313 y(T)-8 b(o)23 b(facilitate)j(the)d
+(implemen)m(tation)i(of)f(the)f(user)f(in)m(terface)j(to)f(job)f(con)m
+(trol,)j(the)d(op)s(erating)h(system)150 2423 y(main)m(tains)j(the)f
+(notion)h(of)f(a)g(curren)m(t)g(terminal)g(pro)s(cess)g(group)g
+Fl(id)p Ft(.)39 b(Mem)m(b)s(ers)26 b(of)g(this)g(pro)s(cess)f(group)150
+2533 y(\(pro)s(cesses)h(whose)g(pro)s(cess)g(group)g
+Fl(id)g Ft(is)h(equal)g(to)g(the)f(curren)m(t)g(terminal)h(pro)s(cess)f
+(group)f Fl(id)p Ft(\))i(receiv)m(e)150 2642 y(k)m(eyb)s
+(oard-generated)22 b(signals)g(suc)m(h)e(as)h Fs(SIGINT)p
+Ft(.)36 b(These)21 b(pro)s(cesses)g(are)g(said)g(to)g(b)s(e)g(in)f(the)
+h(foreground.)150 2752 y(Bac)m(kground)38 b(pro)s(cesses)f(are)h(those)
+g(whose)f(pro)s(cess)g(group)g Fl(id)h Ft(di\013ers)f(from)g(the)g
+(terminal's;)42 b(suc)m(h)150 2861 y(pro)s(cesses)24
+b(are)g(imm)m(une)g(to)g(k)m(eyb)s(oard-generated)h(signals.)40
+b(Only)23 b(foreground)g(pro)s(cesses)h(are)g(allo)m(w)m(ed)150
+2971 y(to)g(read)e(from)h(or,)h(if)f(the)g(user)f(so)i(sp)s(eci\014es)e
+(with)h Fs(stty)29 b(tostop)p Ft(,)23 b(write)g(to)g(the)h(terminal.)38
+b(Bac)m(kground)150 3081 y(pro)s(cesses)27 b(whic)m(h)g(attempt)h(to)f
+(read)g(from)g(\(write)g(to)h(when)e Fs(stty)j(tostop)d
+Ft(is)h(in)f(e\013ect\))j(the)e(terminal)150 3190 y(are)32
+b(sen)m(t)g(a)g Fs(SIGTTIN)e Ft(\()p Fs(SIGTTOU)p Ft(\))g(signal)i(b)m
+(y)g(the)g(k)m(ernel's)g(terminal)g(driv)m(er,)g(whic)m(h,)g(unless)f
+(caugh)m(t,)150 3300 y(susp)s(ends)d(the)i(pro)s(cess.)275
+3432 y(If)k(the)i(op)s(erating)g(system)f(on)h(whic)m(h)f(Bash)g(is)h
+(running)d(supp)s(orts)h(job)h(con)m(trol,)j(Bash)e(con)m(tains)150
+3541 y(facilities)30 b(to)f(use)f(it.)40 b(T)m(yping)28
+b(the)g Fq(susp)s(end)h Ft(c)m(haracter)h(\(t)m(ypically)g(`)p
+Fs(^Z)p Ft(',)f(Con)m(trol-Z\))g(while)f(a)g(pro)s(cess)150
+3651 y(is)42 b(running)f(causes)i(that)g(pro)s(cess)f(to)h(b)s(e)f
+(stopp)s(ed)f(and)h(returns)f(con)m(trol)j(to)f(Bash.)77
+b(T)m(yping)42 b(the)150 3761 y Fq(dela)m(y)m(ed)k(susp)s(end)f
+Ft(c)m(haracter)h(\(t)m(ypically)g(`)p Fs(^Y)p Ft(',)i(Con)m(trol-Y\))e
+(causes)e(the)h(pro)s(cess)e(to)i(b)s(e)f(stopp)s(ed)150
+3870 y(when)26 b(it)i(attempts)h(to)f(read)f(input)g(from)f(the)i
+(terminal,)h(and)e(con)m(trol)h(to)g(b)s(e)f(returned)f(to)j(Bash.)39
+b(The)150 3980 y(user)e(then)g(manipulates)h(the)g(state)h(of)f(this)f
+(job,)j(using)d(the)h Fs(bg)f Ft(command)g(to)h(con)m(tin)m(ue)h(it)f
+(in)g(the)150 4089 y(bac)m(kground,)g(the)f Fs(fg)g Ft(command)f(to)i
+(con)m(tin)m(ue)g(it)f(in)f(the)h(foreground,)h(or)f(the)g
+Fs(kill)f Ft(command)g(to)150 4199 y(kill)27 b(it.)40
+b(A)27 b(`)p Fs(^Z)p Ft(')g(tak)m(es)h(e\013ect)g(immediately)-8
+b(,)29 b(and)d(has)h(the)f(additional)i(side)e(e\013ect)j(of)d(causing)
+h(p)s(ending)150 4309 y(output)j(and)g(t)m(yp)s(eahead)h(to)g(b)s(e)e
+(discarded.)275 4441 y(There)j(are)g(a)h(n)m(um)m(b)s(er)e(of)i(w)m(a)m
+(ys)g(to)h(refer)e(to)h(a)g(job)f(in)g(the)h(shell.)47
+b(The)32 b(c)m(haracter)i(`)p Fs(\045)p Ft(')f(in)m(tro)s(duces)150
+4550 y(a)e(job)f(sp)s(eci\014cation)h(\()p Fq(jobsp)s(ec)6
+b Ft(\).)275 4682 y(Job)31 b(n)m(um)m(b)s(er)f Fs(n)h
+Ft(ma)m(y)h(b)s(e)f(referred)g(to)h(as)g(`)p Fs(\045n)p
+Ft('.)44 b(The)31 b(sym)m(b)s(ols)g(`)p Fs(\045\045)p
+Ft(')h(and)f(`)p Fs(\045+)p Ft(')g(refer)h(to)g(the)g(shell's)150
+4792 y(notion)k(of)f(the)g(curren)m(t)g(job,)h(whic)m(h)f(is)g(the)g
+(last)h(job)f(stopp)s(ed)f(while)h(it)h(w)m(as)g(in)e(the)i(foreground)
+e(or)150 4902 y(started)27 b(in)g(the)g(bac)m(kground.)40
+b(A)27 b(single)g(`)p Fs(\045)p Ft(')g(\(with)g(no)g(accompan)m(ying)i
+(job)d(sp)s(eci\014cation\))i(also)g(refers)150 5011
+y(to)k(the)e(curren)m(t)h(job.)42 b(The)30 b(previous)g(job)h(ma)m(y)g
+(b)s(e)f(referenced)h(using)f(`)p Fs(\045-)p Ft('.)42
+b(If)30 b(there)h(is)g(only)g(a)g(single)150 5121 y(job,)g(`)p
+Fs(\045+)p Ft(')g(and)f(`)p Fs(\045-)p Ft(')h(can)h(b)s(oth)e(b)s(e)g
+(used)h(to)g(refer)g(to)h(that)g(job.)42 b(In)30 b(output)h(p)s
+(ertaining)g(to)g(jobs)g(\(e.g.,)150 5230 y(the)39 b(output)f(of)g(the)
+h Fs(jobs)e Ft(command\),)k(the)d(curren)m(t)h(job)f(is)g(alw)m(a)m(ys)
+i(\015agged)f(with)f(a)h(`)p Fs(+)p Ft(',)i(and)d(the)150
+5340 y(previous)30 b(job)g(with)g(a)h(`)p Fs(-)p Ft('.)p
+eop end
+%%Page: 90 96
+TeXDict begin 90 95 bop 150 -116 a Ft(90)2572 b(Bash)31
+b(Reference)g(Man)m(ual)275 299 y(A)38 b(job)g(ma)m(y)h(also)g(b)s(e)f
+(referred)f(to)j(using)d(a)i(pre\014x)e(of)i(the)f(name)h(used)e(to)i
+(start)g(it,)i(or)e(using)f(a)150 408 y(substring)29
+b(that)i(app)s(ears)f(in)g(its)h(command)f(line.)41 b(F)-8
+b(or)31 b(example,)g(`)p Fs(\045ce)p Ft(')f(refers)g(to)h(a)g(stopp)s
+(ed)e Fs(ce)h Ft(job.)150 518 y(Using)d(`)p Fs(\045?ce)p
+Ft(',)g(on)f(the)h(other)g(hand,)g(refers)f(to)h(an)m(y)g(job)g(con)m
+(taining)h(the)f(string)f(`)p Fs(ce)p Ft(')h(in)f(its)h(command)150
+628 y(line.)41 b(If)30 b(the)h(pre\014x)e(or)h(substring)f(matc)m(hes)j
+(more)e(than)h(one)f(job,)h(Bash)f(rep)s(orts)g(an)g(error.)275
+762 y(Simply)g(naming)h(a)g(job)g(can)g(b)s(e)f(used)h(to)g(bring)f(it)
+i(in)m(to)g(the)f(foreground:)41 b(`)p Fs(\0451)p Ft(')31
+b(is)g(a)h(synon)m(ym)e(for)150 871 y(`)p Fs(fg)g(\0451)p
+Ft(',)i(bringing)f(job)g(1)g(from)g(the)h(bac)m(kground)f(in)m(to)i
+(the)e(foreground.)44 b(Similarly)-8 b(,)32 b(`)p Fs(\0451)e(&)p
+Ft(')i(resumes)150 981 y(job)e(1)h(in)f(the)g(bac)m(kground,)h(equiv)-5
+b(alen)m(t)32 b(to)f(`)p Fs(bg)f(\0451)p Ft(')275 1115
+y(The)g(shell)i(learns)f(immediately)i(whenev)m(er)e(a)h(job)f(c)m
+(hanges)h(state.)45 b(Normally)-8 b(,)33 b(Bash)e(w)m(aits)i(un)m(til)
+150 1224 y(it)25 b(is)g(ab)s(out)f(to)i(prin)m(t)e(a)h(prompt)f(b)s
+(efore)g(rep)s(orting)h(c)m(hanges)g(in)g(a)g(job's)f(status)h(so)g(as)
+g(to)g(not)g(in)m(terrupt)150 1334 y(an)m(y)g(other)g(output.)39
+b(If)24 b(the)i(`)p Fs(-b)p Ft(')e(option)i(to)f(the)g
+Fs(set)f Ft(builtin)h(is)g(enabled,)h(Bash)f(rep)s(orts)f(suc)m(h)h(c)m
+(hanges)150 1443 y(immediately)g(\(see)g(Section)g(4.3.1)g([The)f(Set)g
+(Builtin],)i(page)f(51\).)40 b(An)m(y)24 b(trap)f(on)h
+Fs(SIGCHLD)e Ft(is)i(executed)150 1553 y(for)30 b(eac)m(h)i(c)m(hild)e
+(pro)s(cess)g(that)h(exits.)275 1687 y(If)25 b(an)h(attempt)h(to)g
+(exit)g(Bash)f(is)h(made)f(while)g(jobs)f(are)i(stopp)s(ed,)f(\(or)h
+(running,)e(if)h(the)g Fs(checkjobs)150 1796 y Ft(option)e(is)f
+(enabled)h({)g(see)g(Section)g(4.3.2)h([The)e(Shopt)g(Builtin],)j(page)
+e(55\),)i(the)e(shell)f(prin)m(ts)g(a)h(w)m(arning)150
+1906 y(message,)k(and)c(if)i(the)f Fs(checkjobs)e Ft(option)j(is)f
+(enabled,)i(lists)e(the)h(jobs)f(and)f(their)i(statuses.)39
+b(The)25 b Fs(jobs)150 2016 y Ft(command)36 b(ma)m(y)h(then)f(b)s(e)f
+(used)g(to)i(insp)s(ect)f(their)g(status.)59 b(If)36
+b(a)g(second)g(attempt)i(to)f(exit)g(is)f(made)150 2125
+y(without)e(an)f(in)m(terv)m(ening)i(command,)f(Bash)g(do)s(es)f(not)h
+(prin)m(t)g(another)f(w)m(arning,)i(and)e(an)m(y)h(stopp)s(ed)150
+2235 y(jobs)c(are)h(terminated.)150 2466 y Fr(7.2)68
+b(Job)45 b(Con)l(trol)h(Builtins)150 2650 y Fs(bg)870
+2784 y(bg)h([)p Fi(jobspec)56 b Fs(...)o(])630 2918 y
+Ft(Resume)24 b(eac)m(h)h(susp)s(ended)d(job)i Fq(jobsp)s(ec)29
+b Ft(in)24 b(the)g(bac)m(kground,)h(as)g(if)f(it)h(had)e(b)s(een)g
+(started)630 3027 y(with)32 b(`)p Fs(&)p Ft('.)45 b(If)31
+b Fq(jobsp)s(ec)37 b Ft(is)32 b(not)g(supplied,)f(the)h(curren)m(t)g
+(job)f(is)h(used.)45 b(The)31 b(return)g(status)630 3137
+y(is)i(zero)g(unless)f(it)h(is)g(run)e(when)h(job)g(con)m(trol)i(is)f
+(not)g(enabled,)h(or,)f(when)f(run)f(with)h(job)630 3246
+y(con)m(trol)h(enabled,)g(an)m(y)f Fq(jobsp)s(ec)37 b
+Ft(w)m(as)32 b(not)g(found)f(or)g(sp)s(eci\014es)h(a)g(job)g(that)g(w)m
+(as)g(started)630 3356 y(without)e(job)g(con)m(trol.)150
+3514 y Fs(fg)870 3648 y(fg)47 b([)p Fi(jobspec)11 b Fs(])630
+3782 y Ft(Resume)43 b(the)g(job)g Fq(jobsp)s(ec)48 b
+Ft(in)43 b(the)g(foreground)g(and)f(mak)m(e)j(it)e(the)h(curren)m(t)f
+(job.)78 b(If)630 3891 y Fq(jobsp)s(ec)41 b Ft(is)c(not)f(supplied,)h
+(the)f(curren)m(t)h(job)f(is)g(used.)58 b(The)36 b(return)f(status)h
+(is)h(that)g(of)630 4001 y(the)d(command)g(placed)h(in)m(to)g(the)f
+(foreground,)g(or)g(non-zero)h(if)f(run)f(when)g(job)g(con)m(trol)630
+4111 y(is)i(disabled)g(or,)i(when)d(run)g(with)h(job)g(con)m(trol)h
+(enabled,)h Fq(jobsp)s(ec)j Ft(do)s(es)35 b(not)h(sp)s(ecify)f(a)630
+4220 y(v)-5 b(alid)31 b(job)f(or)g Fq(jobsp)s(ec)35 b
+Ft(sp)s(eci\014es)30 b(a)h(job)f(that)h(w)m(as)g(started)g(without)f
+(job)g(con)m(trol.)150 4378 y Fs(jobs)870 4512 y(jobs)47
+b([-lnprs])e([)p Fi(jobspec)11 b Fs(])870 4622 y(jobs)47
+b(-x)g Fi(command)56 b Fs([)p Fi(arguments)11 b Fs(])630
+4756 y Ft(The)30 b(\014rst)f(form)h(lists)h(the)g(activ)m(e)h(jobs.)41
+b(The)30 b(options)g(ha)m(v)m(e)i(the)e(follo)m(wing)i(meanings:)630
+4914 y Fs(-l)384 b Ft(List)31 b(pro)s(cess)f Fl(id)p
+Ft(s)g(in)g(addition)h(to)g(the)f(normal)h(information.)630
+5072 y Fs(-n)384 b Ft(Displa)m(y)26 b(information)f(only)h(ab)s(out)e
+(jobs)h(that)g(ha)m(v)m(e)i(c)m(hanged)e(status)h(since)1110
+5182 y(the)31 b(user)e(w)m(as)i(last)g(noti\014ed)f(of)h(their)f
+(status.)630 5340 y Fs(-p)384 b Ft(List)31 b(only)f(the)h(pro)s(cess)f
+Fl(id)g Ft(of)h(the)f(job's)g(pro)s(cess)g(group)g(leader.)p
+eop end
+%%Page: 91 97
+TeXDict begin 91 96 bop 150 -116 a Ft(Chapter)30 b(7:)41
+b(Job)30 b(Con)m(trol)2571 b(91)630 299 y Fs(-r)384 b
+Ft(Restrict)31 b(output)f(to)i(running)c(jobs.)630 461
+y Fs(-s)384 b Ft(Restrict)31 b(output)f(to)i(stopp)s(ed)d(jobs.)630
+622 y(If)23 b Fq(jobsp)s(ec)28 b Ft(is)c(giv)m(en,)i(output)d(is)h
+(restricted)g(to)g(information)g(ab)s(out)f(that)h(job.)39
+b(If)23 b Fq(jobsp)s(ec)630 732 y Ft(is)30 b(not)h(supplied,)e(the)i
+(status)g(of)f(all)h(jobs)f(is)h(listed.)630 868 y(If)g(the)g(`)p
+Fs(-x)p Ft(')g(option)h(is)f(supplied,)g Fs(jobs)f Ft(replaces)i(an)m
+(y)f Fq(jobsp)s(ec)37 b Ft(found)29 b(in)i Fq(command)k
+Ft(or)630 977 y Fq(argumen)m(ts)41 b Ft(with)36 b(the)i(corresp)s
+(onding)d(pro)s(cess)i(group)f Fl(id)p Ft(,)j(and)d(executes)i
+Fq(command)t Ft(,)630 1087 y(passing)30 b(it)h Fq(argumen)m(t)r
+Ft(s,)g(returning)f(its)g(exit)i(status.)150 1249 y Fs(kill)870
+1384 y(kill)47 b([-s)g Fi(sigspec)11 b Fs(])45 b([-n)i
+Fi(signum)11 b Fs(])45 b([-)p Fi(sigspec)11 b Fs(])44
+b Fi(jobspec)57 b Fs(or)47 b Fi(pid)870 1494 y Fs(kill)g(-l)g([)p
+Fi(exit_status)11 b Fs(])630 1630 y Ft(Send)22 b(a)i(signal)g(sp)s
+(eci\014ed)f(b)m(y)g Fq(sigsp)s(ec)29 b Ft(or)24 b Fq(sign)m(um)f
+Ft(to)h(the)g(pro)s(cess)f(named)g(b)m(y)g(job)g(sp)s(eci\014-)630
+1739 y(cation)j Fq(jobsp)s(ec)k Ft(or)25 b(pro)s(cess)g
+Fl(id)g Fq(pid)t Ft(.)38 b Fq(sigsp)s(ec)31 b Ft(is)25
+b(either)g(a)h(case-insensitiv)m(e)h(signal)f(name)630
+1849 y(suc)m(h)k(as)h Fs(SIGINT)d Ft(\(with)j(or)f(without)h(the)f
+Fs(SIG)g Ft(pre\014x\))f(or)i(a)f(signal)h(n)m(um)m(b)s(er;)f
+Fq(sign)m(um)g Ft(is)630 1958 y(a)i(signal)g(n)m(um)m(b)s(er.)43
+b(If)31 b Fq(sigsp)s(ec)37 b Ft(and)31 b Fq(sign)m(um)g
+Ft(are)h(not)f(presen)m(t,)h Fs(SIGTERM)e Ft(is)h(used.)43
+b(The)630 2068 y(`)p Fs(-l)p Ft(')34 b(option)g(lists)h(the)f(signal)h
+(names.)51 b(If)33 b(an)m(y)i(argumen)m(ts)f(are)g(supplied)f(when)g(`)
+p Fs(-l)p Ft(')h(is)630 2178 y(giv)m(en,)e(the)g(names)e(of)i(the)f
+(signals)g(corresp)s(onding)f(to)i(the)f(argumen)m(ts)g(are)h(listed,)g
+(and)630 2287 y(the)c(return)f(status)h(is)g(zero.)41
+b Fq(exit)p 1796 2287 28 4 v 41 w(status)32 b Ft(is)c(a)g(n)m(um)m(b)s
+(er)f(sp)s(ecifying)g(a)i(signal)f(n)m(um)m(b)s(er)f(or)630
+2397 y(the)35 b(exit)h(status)f(of)g(a)g(pro)s(cess)g(terminated)g(b)m
+(y)g(a)g(signal.)55 b(The)34 b(return)g(status)h(is)g(zero)630
+2506 y(if)c(at)h(least)g(one)g(signal)f(w)m(as)h(successfully)f(sen)m
+(t,)h(or)f(non-zero)h(if)f(an)g(error)f(o)s(ccurs)h(or)g(an)630
+2616 y(in)m(v)-5 b(alid)31 b(option)g(is)f(encoun)m(tered.)150
+2778 y Fs(wait)870 2913 y(wait)47 b([)p Fi(jobspec)56
+b Fs(or)47 b Fi(pid)57 b Fs(...])630 3049 y Ft(W)-8 b(ait)28
+b(un)m(til)f(the)f(c)m(hild)h(pro)s(cess)f(sp)s(eci\014ed)g(b)m(y)g
+(eac)m(h)h(pro)s(cess)f Fl(id)h Fq(pid)i Ft(or)d(job)g(sp)s
+(eci\014cation)630 3159 y Fq(jobsp)s(ec)40 b Ft(exits)35
+b(and)f(return)g(the)g(exit)i(status)f(of)g(the)g(last)g(command)f(w)m
+(aited)i(for.)53 b(If)35 b(a)630 3268 y(job)g(sp)s(ec)f(is)h(giv)m(en,)
+i(all)f(pro)s(cesses)f(in)f(the)h(job)g(are)g(w)m(aited)h(for.)54
+b(If)35 b(no)f(argumen)m(ts)i(are)630 3378 y(giv)m(en,)d(all)f(curren)m
+(tly)f(activ)m(e)i(c)m(hild)f(pro)s(cesses)f(are)g(w)m(aited)h(for,)g
+(and)e(the)i(return)e(status)630 3487 y(is)h(zero.)44
+b(If)30 b(neither)h Fq(jobsp)s(ec)36 b Ft(nor)31 b Fq(pid)i
+Ft(sp)s(eci\014es)e(an)g(activ)m(e)i(c)m(hild)f(pro)s(cess)e(of)h(the)g
+(shell,)630 3597 y(the)g(return)e(status)i(is)f(127.)150
+3759 y Fs(disown)870 3894 y(disown)46 b([-ar])g([-h])h([)p
+Fi(jobspec)56 b Fs(...)o(])630 4030 y Ft(Without)32 b(options,)g(eac)m
+(h)h Fq(jobsp)s(ec)j Ft(is)c(remo)m(v)m(ed)g(from)f(the)h(table)g(of)g
+(activ)m(e)h(jobs.)44 b(If)31 b(the)630 4140 y(`)p Fs(-h)p
+Ft(')36 b(option)h(is)g(giv)m(en,)i(the)e(job)f(is)h(not)f(remo)m(v)m
+(ed)i(from)e(the)h(table,)i(but)d(is)g(mark)m(ed)h(so)630
+4249 y(that)d Fs(SIGHUP)d Ft(is)j(not)f(sen)m(t)h(to)g(the)f(job)g(if)g
+(the)h(shell)f(receiv)m(es)i(a)f Fs(SIGHUP)p Ft(.)47
+b(If)33 b Fq(jobsp)s(ec)38 b Ft(is)630 4359 y(not)32
+b(presen)m(t,)f(and)g(neither)h(the)f(`)p Fs(-a)p Ft(')g(nor)g(`)p
+Fs(-r)p Ft(')g(option)h(is)g(supplied,)e(the)i(curren)m(t)f(job)g(is)
+630 4468 y(used.)58 b(If)36 b(no)g Fq(jobsp)s(ec)41 b
+Ft(is)36 b(supplied,)h(the)g(`)p Fs(-a)p Ft(')f(option)h(means)f(to)h
+(remo)m(v)m(e)h(or)e(mark)g(all)630 4578 y(jobs;)28 b(the)f(`)p
+Fs(-r)p Ft(')g(option)g(without)g(a)g Fq(jobsp)s(ec)32
+b Ft(argumen)m(t)27 b(restricts)h(op)s(eration)f(to)h(running)630
+4688 y(jobs.)150 4849 y Fs(suspend)870 4985 y(suspend)46
+b([-f])630 5121 y Ft(Susp)s(end)31 b(the)i(execution)h(of)g(this)f
+(shell)g(un)m(til)h(it)g(receiv)m(es)h(a)e Fs(SIGCONT)f
+Ft(signal.)50 b(A)33 b(login)630 5230 y(shell)24 b(cannot)h(b)s(e)e
+(susp)s(ended;)h(the)g(`)p Fs(-f)p Ft(')g(option)g(can)h(b)s(e)e(used)g
+(to)i(o)m(v)m(erride)g(this)f(and)f(force)630 5340 y(the)31
+b(susp)s(ension.)p eop end
+%%Page: 92 98
+TeXDict begin 92 97 bop 150 -116 a Ft(92)2572 b(Bash)31
+b(Reference)g(Man)m(ual)275 299 y(When)f(job)f(con)m(trol)j(is)e(not)h
+(activ)m(e,)i(the)d Fs(kill)f Ft(and)h Fs(wait)f Ft(builtins)g(do)h
+(not)h(accept)h Fq(jobsp)s(ec)j Ft(argu-)150 408 y(men)m(ts.)41
+b(They)30 b(m)m(ust)g(b)s(e)g(supplied)f(pro)s(cess)h
+Fl(id)p Ft(s.)150 641 y Fr(7.3)68 b(Job)45 b(Con)l(trol)h(V)-11
+b(ariables)150 825 y Fs(auto_resume)630 935 y Ft(This)31
+b(v)-5 b(ariable)32 b(con)m(trols)g(ho)m(w)g(the)f(shell)h(in)m
+(teracts)h(with)e(the)h(user)e(and)h(job)g(con)m(trol.)45
+b(If)630 1044 y(this)28 b(v)-5 b(ariable)30 b(exists)f(then)f(single)h
+(w)m(ord)f(simple)h(commands)f(without)g(redirections)i(are)630
+1154 y(treated)h(as)g(candidates)f(for)g(resumption)g(of)g(an)g
+(existing)h(job.)41 b(There)29 b(is)h(no)h(am)m(biguit)m(y)630
+1264 y(allo)m(w)m(ed;)f(if)d(there)g(is)g(more)g(than)f(one)h(job)g(b)s
+(eginning)f(with)g(the)h(string)g(t)m(yp)s(ed,)g(then)g(the)630
+1373 y(most)j(recen)m(tly)h(accessed)f(job)f(will)h(b)s(e)f(selected.)
+42 b(The)29 b(name)g(of)h(a)g(stopp)s(ed)e(job,)i(in)f(this)630
+1483 y(con)m(text,)h(is)e(the)g(command)g(line)g(used)f(to)h(start)g
+(it.)41 b(If)27 b(this)h(v)-5 b(ariable)28 b(is)g(set)g(to)h(the)e(v)-5
+b(alue)630 1592 y(`)p Fs(exact)p Ft(',)33 b(the)g(string)g(supplied)f
+(m)m(ust)h(matc)m(h)g(the)h(name)f(of)g(a)g(stopp)s(ed)f(job)h
+(exactly;)j(if)630 1702 y(set)29 b(to)h(`)p Fs(substring)p
+Ft(',)d(the)i(string)g(supplied)e(needs)i(to)g(matc)m(h)h(a)f
+(substring)f(of)h(the)g(name)630 1812 y(of)38 b(a)f(stopp)s(ed)g(job.)
+62 b(The)37 b(`)p Fs(substring)p Ft(')e(v)-5 b(alue)38
+b(pro)m(vides)f(functionalit)m(y)i(analogous)g(to)630
+1921 y(the)f(`)p Fs(\045?)p Ft(')f(job)h Fl(id)f Ft(\(see)i(Section)f
+(7.1)h([Job)f(Con)m(trol)g(Basics],)j(page)d(89\).)64
+b(If)37 b(set)h(to)h(an)m(y)630 2031 y(other)32 b(v)-5
+b(alue,)32 b(the)g(supplied)e(string)i(m)m(ust)f(b)s(e)g(a)h(pre\014x)f
+(of)h(a)g(stopp)s(ed)e(job's)i(name;)g(this)630 2140
+y(pro)m(vides)e(functionalit)m(y)i(analogous)g(to)f(the)g(`)p
+Fs(\045)p Ft(')f(job)g Fl(id)p Ft(.)p eop end
+%%Page: 93 99
+TeXDict begin 93 98 bop 150 -116 a Ft(Chapter)30 b(8:)41
+b(Command)29 b(Line)i(Editing)2107 b(93)150 299 y Fo(8)80
+b(Command)54 b(Line)f(Editing)150 640 y Ft(This)28 b(c)m(hapter)i
+(describ)s(es)e(the)h(basic)g(features)h(of)f(the)g Fl(gnu)f
+Ft(command)h(line)g(editing)h(in)m(terface.)42 b(Com-)150
+749 y(mand)c(line)i(editing)f(is)g(pro)m(vided)g(b)m(y)g(the)g
+(Readline)h(library)-8 b(,)41 b(whic)m(h)e(is)g(used)f(b)m(y)h(sev)m
+(eral)h(di\013eren)m(t)150 859 y(programs,)34 b(including)e(Bash.)49
+b(Command)32 b(line)i(editing)f(is)g(enabled)g(b)m(y)g(default)g(when)f
+(using)h(an)g(in-)150 969 y(teractiv)m(e)c(shell,)f(unless)e(the)h(`)p
+Fs(--noediting)p Ft(')d(option)k(is)e(supplied)g(at)h(shell)g(in)m(v)m
+(o)s(cation.)42 b(Line)26 b(editing)150 1078 y(is)i(also)h(used)e(when)
+h(using)f(the)h(`)p Fs(-e)p Ft(')g(option)h(to)g(the)f
+Fs(read)f Ft(builtin)h(command)f(\(see)i(Section)g(4.2)h([Bash)150
+1188 y(Builtins],)37 b(page)f(41\).)57 b(By)36 b(default,)h(the)e(line)
+h(editing)g(commands)f(are)h(similar)f(to)i(those)e(of)h(emacs.)150
+1297 y(A)f(vi-st)m(yle)h(line)f(editing)g(in)m(terface)h(is)e(also)i(a)
+m(v)-5 b(ailable.)55 b(Line)34 b(editing)h(can)g(b)s(e)f(enabled)g(at)h
+(an)m(y)g(time)150 1407 y(using)28 b(the)i(`)p Fs(-o)g(emacs)p
+Ft(')d(or)i(`)p Fs(-o)h(vi)p Ft(')f(options)g(to)h(the)f
+Fs(set)f Ft(builtin)h(command)g(\(see)h(Section)f(4.3.1)i([The)150
+1517 y(Set)g(Builtin],)g(page)g(51\),)h(or)e(disabled)g(using)g(the)h
+(`)p Fs(+o)f(emacs)p Ft(')f(or)h(`)p Fs(+o)g(vi)p Ft(')g(options)h(to)g
+Fs(set)p Ft(.)150 1802 y Fr(8.1)68 b(In)l(tro)t(duction)45
+b(to)g(Line)h(Editing)150 1962 y Ft(The)30 b(follo)m(wing)i(paragraphs)
+d(describ)s(e)h(the)h(notation)g(used)f(to)h(represen)m(t)f(k)m
+(eystrok)m(es.)275 2132 y(The)35 b(text)i Fi(C-k)f Ft(is)g(read)g(as)h
+(`Con)m(trol-K')g(and)f(describ)s(es)f(the)h(c)m(haracter)i(pro)s
+(duced)d(when)g(the)h Fs(k)150 2242 y Ft(k)m(ey)31 b(is)g(pressed)e
+(while)h(the)h(Con)m(trol)g(k)m(ey)g(is)g(depressed.)275
+2412 y(The)g(text)i Fi(M-k)e Ft(is)h(read)f(as)i(`Meta-K')g(and)f
+(describ)s(es)f(the)h(c)m(haracter)h(pro)s(duced)e(when)f(the)i(Meta)
+150 2521 y(k)m(ey)i(\(if)f(y)m(ou)h(ha)m(v)m(e)g(one\))g(is)f
+(depressed,)g(and)f(the)h Fs(k)g Ft(k)m(ey)h(is)f(pressed.)48
+b(The)32 b(Meta)j(k)m(ey)e(is)h(lab)s(eled)f Fs(ALT)150
+2631 y Ft(on)c(man)m(y)h(k)m(eyb)s(oards.)40 b(On)29
+b(k)m(eyb)s(oards)g(with)h(t)m(w)m(o)h(k)m(eys)f(lab)s(eled)g
+Fs(ALT)e Ft(\(usually)i(to)g(either)g(side)g(of)g(the)150
+2740 y(space)h(bar\),)f(the)g Fs(ALT)f Ft(on)h(the)g(left)h(side)f(is)g
+(generally)h(set)f(to)h(w)m(ork)f(as)g(a)h(Meta)g(k)m(ey)-8
+b(.)42 b(The)29 b Fs(ALT)g Ft(k)m(ey)i(on)150 2850 y(the)c(righ)m(t)h
+(ma)m(y)g(also)g(b)s(e)f(con\014gured)f(to)i(w)m(ork)f(as)h(a)f(Meta)i
+(k)m(ey)f(or)f(ma)m(y)h(b)s(e)e(con\014gured)h(as)g(some)h(other)150
+2960 y(mo)s(di\014er,)i(suc)m(h)g(as)g(a)h(Comp)s(ose)f(k)m(ey)h(for)f
+(t)m(yping)h(accen)m(ted)h(c)m(haracters.)275 3130 y(If)23
+b(y)m(ou)i(do)f(not)h(ha)m(v)m(e)h(a)f(Meta)g(or)g Fs(ALT)e
+Ft(k)m(ey)-8 b(,)27 b(or)e(another)f(k)m(ey)i(w)m(orking)e(as)h(a)g
+(Meta)h(k)m(ey)-8 b(,)27 b(the)d(iden)m(tical)150 3239
+y(k)m(eystrok)m(e)30 b(can)f(b)s(e)f(generated)h(b)m(y)g(t)m(yping)g
+Fs(ESC)e Fk(\014rst)p Ft(,)j(and)e(then)g(t)m(yping)h
+Fs(k)p Ft(.)40 b(Either)28 b(pro)s(cess)g(is)g(kno)m(wn)150
+3349 y(as)j Fq(metafying)39 b Ft(the)30 b Fs(k)g Ft(k)m(ey)-8
+b(.)275 3519 y(The)39 b(text)j Fi(M-C-k)d Ft(is)h(read)g(as)h
+(`Meta-Con)m(trol-k')j(and)39 b(describ)s(es)h(the)g(c)m(haracter)i
+(pro)s(duced)d(b)m(y)150 3629 y Fq(metafying)g Fi(C-k)p
+Ft(.)275 3799 y(In)c(addition,)j(sev)m(eral)f(k)m(eys)g(ha)m(v)m(e)g
+(their)f(o)m(wn)g(names.)58 b(Sp)s(eci\014cally)-8 b(,)38
+b Fs(DEL)p Ft(,)f Fs(ESC)p Ft(,)g Fs(LFD)p Ft(,)g Fs(SPC)p
+Ft(,)g Fs(RET)p Ft(,)150 3908 y(and)d Fs(TAB)f Ft(all)j(stand)e(for)g
+(themselv)m(es)i(when)d(seen)i(in)f(this)g(text,)j(or)d(in)h(an)f(init)
+h(\014le)f(\(see)i(Section)f(8.3)150 4018 y([Readline)27
+b(Init)g(File],)i(page)e(96\).)41 b(If)26 b(y)m(our)h(k)m(eyb)s(oard)f
+(lac)m(ks)i(a)f Fs(LFD)f Ft(k)m(ey)-8 b(,)29 b(t)m(yping)e
+Fs(C-j)e Ft(will)i(pro)s(duce)f(the)150 4128 y(desired)k(c)m(haracter.)
+42 b(The)30 b Fs(RET)g Ft(k)m(ey)h(ma)m(y)g(b)s(e)e(lab)s(eled)i
+Fs(Return)e Ft(or)h Fs(Enter)f Ft(on)h(some)h(k)m(eyb)s(oards.)150
+4413 y Fr(8.2)68 b(Readline)47 b(In)l(teraction)150 4573
+y Ft(Often)32 b(during)g(an)g(in)m(teractiv)m(e)j(session)e(y)m(ou)g(t)
+m(yp)s(e)g(in)f(a)h(long)g(line)g(of)f(text,)j(only)d(to)i(notice)g
+(that)f(the)150 4682 y(\014rst)f(w)m(ord)g(on)g(the)g(line)h(is)g
+(missp)s(elled.)46 b(The)32 b(Readline)h(library)f(giv)m(es)h(y)m(ou)g
+(a)g(set)g(of)f(commands)g(for)150 4792 y(manipulating)e(the)g(text)h
+(as)f(y)m(ou)g(t)m(yp)s(e)g(it)g(in,)g(allo)m(wing)h(y)m(ou)f(to)h
+(just)e(\014x)g(y)m(our)h(t)m(yp)s(o,)g(and)g(not)g(forcing)150
+4902 y(y)m(ou)e(to)h(ret)m(yp)s(e)g(the)f(ma)5 b(jorit)m(y)29
+b(of)f(the)h(line.)40 b(Using)28 b(these)h(editing)g(commands,)f(y)m
+(ou)h(mo)m(v)m(e)g(the)g(cursor)150 5011 y(to)35 b(the)f(place)i(that)e
+(needs)g(correction,)j(and)d(delete)h(or)f(insert)h(the)f(text)h(of)g
+(the)f(corrections.)54 b(Then,)150 5121 y(when)24 b(y)m(ou)h(are)g
+(satis\014ed)g(with)g(the)g(line,)i(y)m(ou)e(simply)f(press)g
+Fs(RET)p Ft(.)39 b(Y)-8 b(ou)25 b(do)g(not)g(ha)m(v)m(e)h(to)g(b)s(e)e
+(at)h(the)h(end)150 5230 y(of)33 b(the)h(line)g(to)g(press)e
+Fs(RET)p Ft(;)i(the)g(en)m(tire)g(line)f(is)h(accepted)g(regardless)g
+(of)f(the)h(lo)s(cation)h(of)e(the)h(cursor)150 5340
+y(within)c(the)g(line.)p eop end
+%%Page: 94 100
+TeXDict begin 94 99 bop 150 -116 a Ft(94)2572 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fj(8.2.1)63 b(Readline)40
+b(Bare)h(Essen)m(tials)150 446 y Ft(In)31 b(order)h(to)h(en)m(ter)g(c)m
+(haracters)g(in)m(to)g(the)g(line,)g(simply)e(t)m(yp)s(e)i(them.)46
+b(The)31 b(t)m(yp)s(ed)h(c)m(haracter)i(app)s(ears)150
+555 y(where)e(the)h(cursor)e(w)m(as,)j(and)e(then)g(the)h(cursor)e(mo)m
+(v)m(es)j(one)f(space)g(to)g(the)g(righ)m(t.)47 b(If)32
+b(y)m(ou)h(mist)m(yp)s(e)g(a)150 665 y(c)m(haracter,)f(y)m(ou)f(can)g
+(use)f(y)m(our)g(erase)h(c)m(haracter)h(to)f(bac)m(k)g(up)f(and)f
+(delete)j(the)f(mist)m(yp)s(ed)e(c)m(haracter.)275 806
+y(Sometimes)i(y)m(ou)g(ma)m(y)h(mist)m(yp)s(e)e(a)i(c)m(haracter,)g
+(and)e(not)i(notice)g(the)f(error)f(un)m(til)h(y)m(ou)g(ha)m(v)m(e)h(t)
+m(yp)s(ed)150 916 y(sev)m(eral)e(other)f(c)m(haracters.)42
+b(In)28 b(that)i(case,)g(y)m(ou)f(can)g(t)m(yp)s(e)h
+Fi(C-b)d Ft(to)j(mo)m(v)m(e)g(the)f(cursor)g(to)g(the)g(left,)i(and)150
+1026 y(then)f(correct)i(y)m(our)e(mistak)m(e.)42 b(Afterw)m(ards,)31
+b(y)m(ou)f(can)h(mo)m(v)m(e)h(the)e(cursor)g(to)h(the)g(righ)m(t)g
+(with)f Fi(C-f)p Ft(.)275 1167 y(When)i(y)m(ou)h(add)f(text)h(in)f(the)
+h(middle)f(of)h(a)g(line,)h(y)m(ou)e(will)h(notice)h(that)f(c)m
+(haracters)h(to)g(the)e(righ)m(t)150 1277 y(of)d(the)g(cursor)f(are)h
+(`pushed)e(o)m(v)m(er')j(to)g(mak)m(e)f(ro)s(om)g(for)f(the)h(text)h
+(that)f(y)m(ou)g(ha)m(v)m(e)h(inserted.)40 b(Lik)m(ewise,)150
+1386 y(when)d(y)m(ou)g(delete)i(text)g(b)s(ehind)c(the)j(cursor,)h(c)m
+(haracters)g(to)f(the)g(righ)m(t)g(of)g(the)g(cursor)e(are)i(`pulled)
+150 1496 y(bac)m(k')24 b(to)f(\014ll)g(in)f(the)h(blank)f(space)i
+(created)f(b)m(y)g(the)g(remo)m(v)-5 b(al)24 b(of)f(the)g(text.)39
+b(A)23 b(list)g(of)g(the)g(bare)f(essen)m(tials)150 1605
+y(for)30 b(editing)h(the)g(text)g(of)g(an)f(input)f(line)i(follo)m(ws.)
+150 1775 y Fi(C-b)336 b Ft(Mo)m(v)m(e)32 b(bac)m(k)g(one)e(c)m
+(haracter.)150 1941 y Fi(C-f)336 b Ft(Mo)m(v)m(e)32 b(forw)m(ard)e(one)
+h(c)m(haracter.)150 2108 y Fs(DEL)e Ft(or)i Fs(Backspace)630
+2217 y Ft(Delete)i(the)d(c)m(haracter)i(to)f(the)g(left)g(of)f(the)h
+(cursor.)150 2384 y Fi(C-d)336 b Ft(Delete)33 b(the)d(c)m(haracter)i
+(underneath)d(the)i(cursor.)150 2550 y(Prin)m(ting)g(c)m(haracters)630
+2660 y(Insert)f(the)g(c)m(haracter)i(in)m(to)g(the)e(line)h(at)g(the)g
+(cursor.)150 2826 y Fi(C-_)e Ft(or)i Fi(C-x)e(C-u)630
+2936 y Ft(Undo)k(the)h(last)g(editing)g(command.)50 b(Y)-8
+b(ou)34 b(can)f(undo)g(all)h(the)f(w)m(a)m(y)i(bac)m(k)f(to)g(an)g
+(empt)m(y)630 3045 y(line.)150 3215 y(\(Dep)s(ending)29
+b(on)h(y)m(our)f(con\014guration,)i(the)e Fs(Backspace)e
+Ft(k)m(ey)k(b)s(e)d(set)j(to)f(delete)h(the)e(c)m(haracter)i(to)g(the)
+150 3324 y(left)37 b(of)f(the)h(cursor)e(and)h(the)g
+Fs(DEL)g Ft(k)m(ey)h(set)f(to)h(delete)h(the)e(c)m(haracter)i
+(underneath)d(the)h(cursor,)i(lik)m(e)150 3434 y Fi(C-d)p
+Ft(,)30 b(rather)g(than)g(the)h(c)m(haracter)h(to)f(the)f(left)h(of)g
+(the)f(cursor.\))150 3640 y Fj(8.2.2)63 b(Readline)40
+b(Mo)m(v)m(emen)m(t)h(Commands)150 3787 y Ft(The)27 b(ab)s(o)m(v)m(e)i
+(table)g(describ)s(es)e(the)g(most)i(basic)f(k)m(eystrok)m(es)h(that)f
+(y)m(ou)g(need)g(in)f(order)g(to)i(do)e(editing)i(of)150
+3897 y(the)k(input)f(line.)49 b(F)-8 b(or)34 b(y)m(our)f(con)m(v)m
+(enience,)j(man)m(y)d(other)g(commands)f(ha)m(v)m(e)j(b)s(een)d(added)g
+(in)h(addition)150 4006 y(to)j Fi(C-b)p Ft(,)f Fi(C-f)p
+Ft(,)g Fi(C-d)p Ft(,)h(and)e Fs(DEL)p Ft(.)54 b(Here)35
+b(are)g(some)h(commands)e(for)h(mo)m(ving)h(more)f(rapidly)f(ab)s(out)h
+(the)150 4116 y(line.)150 4286 y Fi(C-a)336 b Ft(Mo)m(v)m(e)32
+b(to)g(the)e(start)h(of)g(the)f(line.)150 4452 y Fi(C-e)336
+b Ft(Mo)m(v)m(e)32 b(to)g(the)e(end)g(of)g(the)h(line.)150
+4618 y Fi(M-f)336 b Ft(Mo)m(v)m(e)32 b(forw)m(ard)e(a)h(w)m(ord,)f
+(where)g(a)h(w)m(ord)f(is)g(comp)s(osed)g(of)h(letters)h(and)d(digits.)
+150 4785 y Fi(M-b)336 b Ft(Mo)m(v)m(e)32 b(bac)m(kw)m(ard)f(a)g(w)m
+(ord.)150 4951 y Fi(C-l)336 b Ft(Clear)31 b(the)f(screen,)h(reprin)m
+(ting)f(the)h(curren)m(t)f(line)h(at)g(the)f(top.)275
+5121 y(Notice)c(ho)m(w)f Fi(C-f)e Ft(mo)m(v)m(es)j(forw)m(ard)e(a)h(c)m
+(haracter,)j(while)d Fi(M-f)e Ft(mo)m(v)m(es)j(forw)m(ard)e(a)h(w)m
+(ord.)39 b(It)24 b(is)h(a)g(lo)s(ose)150 5230 y(con)m(v)m(en)m(tion)32
+b(that)f(con)m(trol)g(k)m(eystrok)m(es)h(op)s(erate)e(on)g(c)m
+(haracters)h(while)f(meta)h(k)m(eystrok)m(es)h(op)s(erate)e(on)150
+5340 y(w)m(ords.)p eop end
+%%Page: 95 101
+TeXDict begin 95 100 bop 150 -116 a Ft(Chapter)30 b(8:)41
+b(Command)29 b(Line)i(Editing)2107 b(95)150 299 y Fj(8.2.3)63
+b(Readline)40 b(Killing)i(Commands)150 446 y Fq(Killing)35
+b Ft(text)28 b(means)e(to)h(delete)h(the)f(text)g(from)g(the)f(line,)i
+(but)e(to)h(sa)m(v)m(e)h(it)g(a)m(w)m(a)m(y)g(for)e(later)i(use,)f
+(usually)150 555 y(b)m(y)g Fq(y)m(anking)35 b Ft(\(re-inserting\))28
+b(it)g(bac)m(k)f(in)m(to)h(the)f(line.)40 b(\(`Cut')27
+b(and)g(`paste')h(are)f(more)g(recen)m(t)h(jargon)f(for)150
+665 y(`kill')32 b(and)d(`y)m(ank'.\))275 801 y(If)g(the)i(description)f
+(for)g(a)h(command)f(sa)m(ys)g(that)h(it)g(`kills')g(text,)h(then)e(y)m
+(ou)g(can)h(b)s(e)e(sure)h(that)h(y)m(ou)150 911 y(can)g(get)g(the)g
+(text)g(bac)m(k)g(in)f(a)h(di\013eren)m(t)g(\(or)g(the)f(same\))h
+(place)h(later.)275 1047 y(When)23 b(y)m(ou)g(use)g(a)h(kill)g
+(command,)g(the)g(text)g(is)f(sa)m(v)m(ed)i(in)e(a)g
+Fq(kill-ring)p Ft(.)39 b(An)m(y)24 b(n)m(um)m(b)s(er)e(of)h(consecutiv)
+m(e)150 1157 y(kills)31 b(sa)m(v)m(e)i(all)f(of)f(the)g(killed)h(text)g
+(together,)g(so)g(that)f(when)f(y)m(ou)h(y)m(ank)h(it)f(bac)m(k,)h(y)m
+(ou)g(get)g(it)f(all.)43 b(The)150 1267 y(kill)33 b(ring)f(is)g(not)h
+(line)g(sp)s(eci\014c;)g(the)g(text)g(that)g(y)m(ou)g(killed)f(on)h(a)f
+(previously)g(t)m(yp)s(ed)h(line)f(is)h(a)m(v)-5 b(ailable)150
+1376 y(to)31 b(b)s(e)f(y)m(ank)m(ed)h(bac)m(k)g(later,)h(when)d(y)m(ou)
+i(are)g(t)m(yping)f(another)h(line.)275 1513 y(Here)f(is)h(the)f(list)h
+(of)g(commands)f(for)g(killing)h(text.)150 1675 y Fi(C-k)336
+b Ft(Kill)31 b(the)f(text)i(from)e(the)g(curren)m(t)g(cursor)g(p)s
+(osition)h(to)g(the)f(end)g(of)g(the)h(line.)150 1836
+y Fi(M-d)336 b Ft(Kill)27 b(from)f(the)g(cursor)g(to)h(the)f(end)g(of)h
+(the)f(curren)m(t)g(w)m(ord,)h(or,)h(if)e(b)s(et)m(w)m(een)h(w)m(ords,)
+g(to)g(the)630 1946 y(end)j(of)g(the)h(next)f(w)m(ord.)41
+b(W)-8 b(ord)30 b(b)s(oundaries)f(are)i(the)g(same)f(as)h(those)g(used)
+f(b)m(y)g Fi(M-f)p Ft(.)150 2107 y Fi(M-DEL)240 b Ft(Kill)31
+b(from)f(the)h(cursor)f(the)g(start)h(of)g(the)g(curren)m(t)f(w)m(ord,)
+h(or,)f(if)h(b)s(et)m(w)m(een)g(w)m(ords,)f(to)i(the)630
+2217 y(start)39 b(of)f(the)h(previous)f(w)m(ord.)64 b(W)-8
+b(ord)39 b(b)s(oundaries)e(are)i(the)f(same)h(as)g(those)f(used)g(b)m
+(y)630 2326 y Fi(M-b)p Ft(.)150 2487 y Fi(C-w)336 b Ft(Kill)35
+b(from)g(the)g(cursor)f(to)i(the)f(previous)g(whitespace.)55
+b(This)34 b(is)h(di\013eren)m(t)h(than)e Fi(M-DEL)630
+2597 y Ft(b)s(ecause)c(the)h(w)m(ord)f(b)s(oundaries)f(di\013er.)275
+2759 y(Here)42 b(is)f(ho)m(w)h(to)g Fq(y)m(ank)47 b Ft(the)42
+b(text)g(bac)m(k)h(in)m(to)f(the)g(line.)74 b(Y)-8 b(anking)43
+b(means)e(to)h(cop)m(y)h(the)e(most-)150 2869 y(recen)m(tly-killed)33
+b(text)e(from)f(the)g(kill)i(bu\013er.)150 3031 y Fi(C-y)336
+b Ft(Y)-8 b(ank)31 b(the)f(most)h(recen)m(tly)h(killed)f(text)g(bac)m
+(k)g(in)m(to)h(the)e(bu\013er)g(at)h(the)f(cursor.)150
+3192 y Fi(M-y)336 b Ft(Rotate)36 b(the)f(kill-ring,)i(and)d(y)m(ank)h
+(the)f(new)g(top.)54 b(Y)-8 b(ou)35 b(can)g(only)f(do)h(this)f(if)h
+(the)g(prior)630 3302 y(command)30 b(is)h Fi(C-y)e Ft(or)h
+Fi(M-y)p Ft(.)150 3503 y Fj(8.2.4)63 b(Readline)40 b(Argumen)m(ts)150
+3650 y Ft(Y)-8 b(ou)40 b(can)f(pass)g(n)m(umeric)f(argumen)m(ts)i(to)f
+(Readline)h(commands.)67 b(Sometimes)39 b(the)g(argumen)m(t)h(acts)150
+3760 y(as)g(a)h(rep)s(eat)f(coun)m(t,)j(other)e(times)f(it)h(is)f(the)g
+Fk(sign)47 b Ft(of)41 b(the)f(argumen)m(t)g(that)h(is)f(signi\014can)m
+(t.)71 b(If)40 b(y)m(ou)150 3869 y(pass)33 b(a)h(negativ)m(e)i(argumen)
+m(t)e(to)g(a)g(command)f(whic)m(h)g(normally)h(acts)g(in)f(a)h(forw)m
+(ard)f(direction,)i(that)150 3979 y(command)g(will)h(act)g(in)f(a)h
+(bac)m(kw)m(ard)f(direction.)57 b(F)-8 b(or)36 b(example,)h(to)f(kill)g
+(text)g(bac)m(k)g(to)g(the)g(start)g(of)150 4088 y(the)31
+b(line,)g(y)m(ou)f(migh)m(t)h(t)m(yp)s(e)g(`)p Fs(M--)f(C-k)p
+Ft('.)275 4225 y(The)d(general)i(w)m(a)m(y)h(to)e(pass)g(n)m(umeric)g
+(argumen)m(ts)h(to)g(a)f(command)g(is)g(to)h(t)m(yp)s(e)f(meta)i
+(digits)e(b)s(efore)150 4334 y(the)j(command.)42 b(If)30
+b(the)h(\014rst)f(`digit')i(t)m(yp)s(ed)f(is)g(a)g(min)m(us)f(sign)h
+(\(`)p Fs(-)p Ft('\),)h(then)f(the)g(sign)f(of)h(the)g(argumen)m(t)150
+4444 y(will)39 b(b)s(e)e(negativ)m(e.)66 b(Once)38 b(y)m(ou)h(ha)m(v)m
+(e)g(t)m(yp)s(ed)f(one)h(meta)g(digit)g(to)f(get)i(the)e(argumen)m(t)h
+(started,)i(y)m(ou)150 4554 y(can)29 b(t)m(yp)s(e)g(the)g(remainder)f
+(of)h(the)g(digits,)h(and)f(then)f(the)h(command.)40
+b(F)-8 b(or)30 b(example,)g(to)f(giv)m(e)i(the)e Fi(C-d)150
+4663 y Ft(command)37 b(an)g(argumen)m(t)h(of)g(10,)i(y)m(ou)e(could)f
+(t)m(yp)s(e)h(`)p Fs(M-1)29 b(0)h(C-d)p Ft(',)39 b(whic)m(h)e(will)h
+(delete)h(the)e(next)h(ten)150 4773 y(c)m(haracters)32
+b(on)e(the)h(input)e(line.)150 4974 y Fj(8.2.5)63 b(Searc)m(hing)40
+b(for)i(Commands)g(in)f(the)g(History)150 5121 y Ft(Readline)35
+b(pro)m(vides)f(commands)g(for)g(searc)m(hing)h(through)e(the)i
+(command)f(history)g(\(see)h(Section)g(9.1)150 5230 y([Bash)i(History)h
+(F)-8 b(acilities],)42 b(page)37 b(121\))i(for)d(lines)h(con)m(taining)
+i(a)e(sp)s(eci\014ed)f(string.)60 b(There)36 b(are)i(t)m(w)m(o)150
+5340 y(searc)m(h)31 b(mo)s(des:)40 b Fq(incremen)m(tal)35
+b Ft(and)30 b Fq(non-incremen)m(tal)p Ft(.)p eop end
+%%Page: 96 102
+TeXDict begin 96 101 bop 150 -116 a Ft(96)2572 b(Bash)31
+b(Reference)g(Man)m(ual)275 299 y(Incremen)m(tal)26 b(searc)m(hes)h(b)s
+(egin)e(b)s(efore)g(the)h(user)f(has)h(\014nished)e(t)m(yping)i(the)g
+(searc)m(h)g(string.)39 b(As)26 b(eac)m(h)150 408 y(c)m(haracter)37
+b(of)e(the)h(searc)m(h)g(string)f(is)h(t)m(yp)s(ed,)g(Readline)g
+(displa)m(ys)g(the)f(next)h(en)m(try)g(from)e(the)i(history)150
+518 y(matc)m(hing)25 b(the)f(string)g(t)m(yp)s(ed)g(so)g(far.)39
+b(An)23 b(incremen)m(tal)j(searc)m(h)e(requires)g(only)g(as)g(man)m(y)g
+(c)m(haracters)i(as)150 628 y(needed)i(to)i(\014nd)d(the)i(desired)f
+(history)h(en)m(try)-8 b(.)41 b(T)-8 b(o)29 b(searc)m(h)h(bac)m(kw)m
+(ard)f(in)f(the)h(history)g(for)f(a)i(particular)150
+737 y(string,)g(t)m(yp)s(e)f Fi(C-r)p Ft(.)40 b(T)m(yping)29
+b Fi(C-s)g Ft(searc)m(hes)h(forw)m(ard)f(through)g(the)g(history)-8
+b(.)41 b(The)29 b(c)m(haracters)i(presen)m(t)150 847
+y(in)38 b(the)g(v)-5 b(alue)38 b(of)g(the)g Fs(isearch-terminators)33
+b Ft(v)-5 b(ariable)39 b(are)f(used)f(to)i(terminate)g(an)f(incremen)m
+(tal)150 956 y(searc)m(h.)71 b(If)40 b(that)h(v)-5 b(ariable)41
+b(has)f(not)h(b)s(een)e(assigned)i(a)f(v)-5 b(alue,)44
+b(the)c Fs(ESC)g Ft(and)f Fi(C-J)h Ft(c)m(haracters)i(will)150
+1066 y(terminate)h(an)g(incremen)m(tal)g(searc)m(h.)78
+b Fi(C-g)41 b Ft(will)i(ab)s(ort)f(an)g(incremen)m(tal)i(searc)m(h)f
+(and)f(restore)h(the)150 1176 y(original)30 b(line.)41
+b(When)28 b(the)h(searc)m(h)h(is)f(terminated,)h(the)f(history)g(en)m
+(try)g(con)m(taining)h(the)f(searc)m(h)h(string)150 1285
+y(b)s(ecomes)h(the)f(curren)m(t)g(line.)275 1428 y(T)-8
+b(o)31 b(\014nd)e(other)j(matc)m(hing)g(en)m(tries)g(in)e(the)h
+(history)g(list,)h(t)m(yp)s(e)g Fi(C-r)e Ft(or)h Fi(C-s)f
+Ft(as)h(appropriate.)43 b(This)150 1537 y(will)26 b(searc)m(h)h(bac)m
+(kw)m(ard)g(or)f(forw)m(ard)g(in)f(the)i(history)f(for)g(the)g(next)g
+(en)m(try)h(matc)m(hing)g(the)f(searc)m(h)h(string)150
+1647 y(t)m(yp)s(ed)37 b(so)h(far.)63 b(An)m(y)38 b(other)f(k)m(ey)i
+(sequence)f(b)s(ound)e(to)i(a)g(Readline)h(command)e(will)h(terminate)h
+(the)150 1757 y(searc)m(h)26 b(and)f(execute)i(that)f(command.)39
+b(F)-8 b(or)26 b(instance,)h(a)f Fs(RET)f Ft(will)g(terminate)i(the)f
+(searc)m(h)g(and)e(accept)150 1866 y(the)30 b(line,)g(thereb)m(y)f
+(executing)i(the)e(command)g(from)g(the)h(history)f(list.)41
+b(A)29 b(mo)m(v)m(emen)m(t)j(command)d(will)150 1976
+y(terminate)i(the)g(searc)m(h,)g(mak)m(e)h(the)e(last)h(line)g(found)e
+(the)i(curren)m(t)f(line,)h(and)f(b)s(egin)g(editing.)275
+2119 y(Readline)35 b(remem)m(b)s(ers)f(the)h(last)h(incremen)m(tal)g
+(searc)m(h)f(string.)54 b(If)34 b(t)m(w)m(o)j Fi(C-r)p
+Ft(s)c(are)i(t)m(yp)s(ed)g(without)150 2228 y(an)m(y)i(in)m(terv)m
+(ening)g(c)m(haracters)h(de\014ning)e(a)h(new)f(searc)m(h)h(string,)h
+(an)m(y)f(remem)m(b)s(ered)e(searc)m(h)i(string)g(is)150
+2338 y(used.)275 2480 y(Non-incremen)m(tal)48 b(searc)m(hes)g(read)e
+(the)h(en)m(tire)h(searc)m(h)f(string)g(b)s(efore)f(starting)h(to)h
+(searc)m(h)f(for)150 2590 y(matc)m(hing)d(history)e(lines.)78
+b(The)42 b(searc)m(h)h(string)g(ma)m(y)g(b)s(e)f(t)m(yp)s(ed)g(b)m(y)g
+(the)h(user)f(or)h(b)s(e)f(part)g(of)h(the)150 2700 y(con)m(ten)m(ts)32
+b(of)f(the)f(curren)m(t)g(line.)150 2944 y Fr(8.3)68
+b(Readline)47 b(Init)e(File)150 3104 y Ft(Although)f(the)g(Readline)g
+(library)f(comes)i(with)e(a)h(set)h(of)f(Emacs-lik)m(e)h(k)m
+(eybindings)f(installed)g(b)m(y)150 3213 y(default,)26
+b(it)g(is)e(p)s(ossible)h(to)g(use)f(a)i(di\013eren)m(t)f(set)g(of)g(k)
+m(eybindings.)38 b(An)m(y)25 b(user)f(can)h(customize)h(programs)150
+3323 y(that)45 b(use)f(Readline)h(b)m(y)f(putting)g(commands)g(in)g(an)
+g Fq(inputrc)49 b Ft(\014le,)g(con)m(v)m(en)m(tionally)e(in)d(his)g
+(home)150 3433 y(directory)-8 b(.)59 b(The)35 b(name)i(of)f(this)g
+(\014le)g(is)g(tak)m(en)h(from)f(the)g(v)-5 b(alue)37
+b(of)f(the)g(shell)h(v)-5 b(ariable)36 b Fs(INPUTRC)p
+Ft(.)56 b(If)150 3542 y(that)33 b(v)-5 b(ariable)33 b(is)g(unset,)f
+(the)h(default)f(is)h(`)p Fs(~/.inputrc)p Ft('.)44 b(If)32
+b(that)h(\014le)f(do)s(es)g(not)h(exist)g(or)g(cannot)g(b)s(e)150
+3652 y(read,)e(the)f(ultimate)i(default)e(is)h(`)p Fs(/etc/inputrc)p
+Ft('.)275 3794 y(When)e(a)h(program)f(whic)m(h)h(uses)f(the)h(Readline)
+g(library)f(starts)h(up,)f(the)h(init)g(\014le)f(is)h(read,)g(and)f
+(the)150 3904 y(k)m(ey)i(bindings)e(are)i(set.)275 4047
+y(In)26 b(addition,)i(the)f Fs(C-x)i(C-r)d Ft(command)h(re-reads)g
+(this)f(init)h(\014le,)h(th)m(us)f(incorp)s(orating)g(an)m(y)g(c)m
+(hanges)150 4156 y(that)k(y)m(ou)g(migh)m(t)g(ha)m(v)m(e)g(made)g(to)g
+(it.)150 4364 y Fj(8.3.1)63 b(Readline)40 b(Init)h(File)g(Syn)m(tax)150
+4511 y Ft(There)f(are)i(only)f(a)g(few)g(basic)g(constructs)h(allo)m(w)
+m(ed)h(in)d(the)h(Readline)h(init)f(\014le.)73 b(Blank)41
+b(lines)h(are)150 4620 y(ignored.)72 b(Lines)41 b(b)s(eginning)f(with)h
+(a)g(`)p Fs(#)p Ft(')g(are)h(commen)m(ts.)73 b(Lines)41
+b(b)s(eginning)f(with)g(a)i(`)p Fs($)p Ft(')f(indicate)150
+4730 y(conditional)e(constructs)f(\(see)g(Section)h(8.3.2)g
+([Conditional)g(Init)e(Constructs],)j(page)e(102\).)64
+b(Other)150 4839 y(lines)31 b(denote)g(v)-5 b(ariable)31
+b(settings)g(and)f(k)m(ey)h(bindings.)150 5011 y(V)-8
+b(ariable)32 b(Settings)630 5121 y(Y)-8 b(ou)41 b(can)g(mo)s(dify)e
+(the)i(run-time)f(b)s(eha)m(vior)g(of)h(Readline)g(b)m(y)f(altering)h
+(the)g(v)-5 b(alues)41 b(of)630 5230 y(v)-5 b(ariables)34
+b(in)f(Readline)i(using)e(the)g Fs(set)g Ft(command)g(within)g(the)h
+(init)g(\014le.)50 b(The)33 b(syn)m(tax)630 5340 y(is)d(simple:)p
+eop end
+%%Page: 97 103
+TeXDict begin 97 102 bop 150 -116 a Ft(Chapter)30 b(8:)41
+b(Command)29 b(Line)i(Editing)2107 b(97)870 299 y Fs(set)47
+b Fi(variable)56 b(value)630 445 y Ft(Here,)29 b(for)e(example,)h(is)g
+(ho)m(w)f(to)h(c)m(hange)g(from)f(the)g(default)h(Emacs-lik)m(e)h(k)m
+(ey)f(binding)e(to)630 555 y(use)k Fs(vi)g Ft(line)h(editing)g
+(commands:)870 701 y Fs(set)47 b(editing-mode)d(vi)630
+847 y Ft(V)-8 b(ariable)36 b(names)f(and)g(v)-5 b(alues,)36
+b(where)f(appropriate,)h(are)g(recognized)g(without)f(regard)630
+956 y(to)c(case.)42 b(Unrecognized)31 b(v)-5 b(ariable)31
+b(names)g(are)f(ignored.)630 1103 y(Bo)s(olean)c(v)-5
+b(ariables)26 b(\(those)g(that)g(can)f(b)s(e)f(set)i(to)g(on)f(or)g
+(o\013)7 b(\))25 b(are)h(set)f(to)h(on)f(if)g(the)g(v)-5
+b(alue)26 b(is)630 1212 y(n)m(ull)e(or)g(empt)m(y)-8
+b(,)27 b Fq(on)d Ft(\(case-insensitiv)m(e\),)29 b(or)24
+b(1.)39 b(An)m(y)25 b(other)f(v)-5 b(alue)25 b(results)f(in)g(the)g(v)
+-5 b(ariable)630 1322 y(b)s(eing)30 b(set)h(to)g(o\013.)630
+1468 y(The)37 b Fs(bind)30 b(-V)37 b Ft(command)g(lists)i(the)f(curren)
+m(t)f(Readline)i(v)-5 b(ariable)38 b(names)g(and)f(v)-5
+b(alues.)630 1577 y(See)31 b(Section)g(4.2)g([Bash)g(Builtins],)g(page)
+g(41.)630 1724 y(A)f(great)i(deal)f(of)g(run-time)f(b)s(eha)m(vior)g
+(is)g(c)m(hangeable)j(with)d(the)g(follo)m(wing)i(v)-5
+b(ariables.)630 1906 y Fs(bell-style)1110 2016 y Ft(Con)m(trols)44
+b(what)g(happ)s(ens)e(when)h(Readline)i(w)m(an)m(ts)f(to)h(ring)e(the)h
+(termi-)1110 2125 y(nal)37 b(b)s(ell.)61 b(If)37 b(set)h(to)g(`)p
+Fs(none)p Ft(',)g(Readline)g(nev)m(er)g(rings)e(the)i(b)s(ell.)61
+b(If)36 b(set)i(to)1110 2235 y(`)p Fs(visible)p Ft(',)32
+b(Readline)i(uses)f(a)g(visible)g(b)s(ell)g(if)g(one)g(is)g(a)m(v)-5
+b(ailable.)51 b(If)33 b(set)g(to)1110 2345 y(`)p Fs(audible)p
+Ft(')j(\(the)i(default\),)i(Readline)e(attempts)g(to)h(ring)e(the)g
+(terminal's)1110 2454 y(b)s(ell.)630 2637 y Fs(bind-tty-special-chars)
+1110 2746 y Ft(If)45 b(set)h(to)f(`)p Fs(on)p Ft(',)50
+b(Readline)45 b(attempts)i(to)f(bind)d(the)j(con)m(trol)g(c)m
+(haracters)1110 2856 y(treated)36 b(sp)s(ecially)h(b)m(y)e(the)h(k)m
+(ernel's)g(terminal)g(driv)m(er)f(to)h(their)f(Readline)1110
+2966 y(equiv)-5 b(alen)m(ts.)630 3148 y Fs(comment-begin)1110
+3258 y Ft(The)29 b(string)g(to)h(insert)f(at)h(the)f(b)s(eginning)g(of)
+g(the)h(line)f(when)f(the)i Fs(insert-)1110 3367 y(comment)e
+Ft(command)j(is)f(executed.)42 b(The)29 b(default)i(v)-5
+b(alue)31 b(is)f Fs("#")p Ft(.)630 3550 y Fs(completion-ignore-case)
+1110 3660 y Ft(If)d(set)h(to)g(`)p Fs(on)p Ft(',)g(Readline)g(p)s
+(erforms)e(\014lename)h(matc)m(hing)i(and)e(completion)1110
+3769 y(in)j(a)h(case-insensitiv)m(e)i(fashion.)40 b(The)30
+b(default)h(v)-5 b(alue)30 b(is)h(`)p Fs(off)p Ft('.)630
+3952 y Fs(completion-prefix-displa)o(y-le)o(ngth)1110
+4061 y Ft(The)g(length)g(in)g(c)m(haracters)i(of)f(the)f(common)h
+(pre\014x)e(of)h(a)h(list)g(of)f(p)s(ossible)1110 4171
+y(completions)g(that)f(is)g(displa)m(y)m(ed)g(without)g(mo)s
+(di\014cation.)41 b(When)29 b(set)h(to)h(a)1110 4281
+y(v)-5 b(alue)26 b(greater)h(than)e(zero,)j(common)e(pre\014xes)e
+(longer)j(than)e(this)g(v)-5 b(alue)27 b(are)1110 4390
+y(replaced)k(with)f(an)g(ellipsis)h(when)e(displa)m(ying)i(p)s(ossible)
+f(completions.)630 4573 y Fs(completion-query-items)1110
+4682 y Ft(The)c(n)m(um)m(b)s(er)f(of)h(p)s(ossible)g(completions)h
+(that)g(determines)f(when)f(the)i(user)1110 4792 y(is)i(ask)m(ed)h
+(whether)f(the)h(list)g(of)f(p)s(ossibilities)h(should)e(b)s(e)h
+(displa)m(y)m(ed.)41 b(If)29 b(the)1110 4902 y(n)m(um)m(b)s(er)d(of)h
+(p)s(ossible)f(completions)i(is)f(greater)h(than)e(this)h(v)-5
+b(alue,)28 b(Readline)1110 5011 y(will)f(ask)g(the)f(user)g(whether)g
+(or)g(not)h(he)f(wishes)g(to)i(view)e(them;)i(otherwise,)1110
+5121 y(they)d(are)f(simply)g(listed.)40 b(This)23 b(v)-5
+b(ariable)25 b(m)m(ust)g(b)s(e)e(set)i(to)g(an)g(in)m(teger)g(v)-5
+b(alue)1110 5230 y(greater)26 b(than)f(or)f(equal)i(to)f(0.)40
+b(A)24 b(negativ)m(e)j(v)-5 b(alue)26 b(means)e(Readline)i(should)1110
+5340 y(nev)m(er)31 b(ask.)41 b(The)29 b(default)i(limit)g(is)g
+Fs(100)p Ft(.)p eop end
+%%Page: 98 104
+TeXDict begin 98 103 bop 150 -116 a Ft(98)2572 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y Fs(convert-meta)1110
+408 y Ft(If)22 b(set)g(to)h(`)p Fs(on)p Ft(',)h(Readline)f(will)f(con)m
+(v)m(ert)i(c)m(haracters)f(with)f(the)g(eigh)m(th)h(bit)f(set)1110
+518 y(to)33 b(an)e Fl(asci)r(i)h Ft(k)m(ey)h(sequence)f(b)m(y)g
+(stripping)f(the)h(eigh)m(th)h(bit)f(and)f(pre\014xing)1110
+628 y(an)24 b Fs(ESC)g Ft(c)m(haracter,)j(con)m(v)m(erting)f(them)f(to)
+g(a)g(meta-pre\014xed)f(k)m(ey)h(sequence.)1110 737 y(The)30
+b(default)g(v)-5 b(alue)31 b(is)g(`)p Fs(on)p Ft('.)630
+896 y Fs(disable-completion)1110 1005 y Ft(If)36 b(set)h(to)h(`)p
+Fs(On)p Ft(',)g(Readline)f(will)g(inhibit)f(w)m(ord)h(completion.)60
+b(Completion)1110 1115 y(c)m(haracters)28 b(will)e(b)s(e)f(inserted)h
+(in)m(to)h(the)g(line)f(as)g(if)g(they)h(had)e(b)s(een)g(mapp)s(ed)1110
+1224 y(to)31 b Fs(self-insert)p Ft(.)38 b(The)30 b(default)g(is)h(`)p
+Fs(off)p Ft('.)630 1383 y Fs(editing-mode)1110 1492 y
+Ft(The)d Fs(editing-mode)e Ft(v)-5 b(ariable)29 b(con)m(trols)h(whic)m
+(h)e(default)h(set)h(of)e(k)m(ey)i(bind-)1110 1602 y(ings)25
+b(is)g(used.)38 b(By)26 b(default,)g(Readline)g(starts)f(up)f(in)h
+(Emacs)g(editing)h(mo)s(de,)1110 1711 y(where)j(the)g(k)m(eystrok)m(es)
+i(are)e(most)h(similar)f(to)h(Emacs.)40 b(This)29 b(v)-5
+b(ariable)30 b(can)1110 1821 y(b)s(e)g(set)h(to)g(either)g(`)p
+Fs(emacs)p Ft(')e(or)h(`)p Fs(vi)p Ft('.)630 1979 y Fs
+(echo-control-characters)1110 2089 y Ft(When)g(set)h(to)g(`)p
+Fs(on)p Ft(',)f(on)g(op)s(erating)h(systems)f(that)h(indicate)g(they)g
+(supp)s(ort)1110 2198 y(it,)i(readline)e(ec)m(ho)s(es)i(a)f(c)m
+(haracter)h(corresp)s(onding)d(to)j(a)f(signal)g(generated)1110
+2308 y(from)e(the)g(k)m(eyb)s(oard.)41 b(The)30 b(default)g(is)h(`)p
+Fs(on)p Ft('.)630 2466 y Fs(enable-keypad)1110 2576 y
+Ft(When)23 b(set)h(to)g(`)p Fs(on)p Ft(',)h(Readline)f(will)g(try)f(to)
+h(enable)g(the)f(application)i(k)m(eypad)1110 2685 y(when)h(it)h(is)f
+(called.)41 b(Some)27 b(systems)f(need)h(this)f(to)h(enable)g(the)g
+(arro)m(w)g(k)m(eys.)1110 2795 y(The)j(default)g(is)h(`)p
+Fs(off)p Ft('.)630 2953 y Fs(enable-meta-key)1110 3063
+y Ft(When)40 b(set)g(to)g(`)p Fs(on)p Ft(',)j(Readline)d(will)g(try)g
+(to)g(enable)g(an)m(y)g(meta)h(mo)s(di\014er)1110 3173
+y(k)m(ey)i(the)e(terminal)i(claims)f(to)h(supp)s(ort)d(when)h(it)h(is)g
+(called.)76 b(On)41 b(man)m(y)1110 3282 y(terminals,)c(the)e(meta)h(k)m
+(ey)g(is)f(used)g(to)h(send)e(eigh)m(t-bit)j(c)m(haracters.)56
+b(The)1110 3392 y(default)31 b(is)f(`)p Fs(on)p Ft('.)630
+3550 y Fs(expand-tilde)1110 3660 y Ft(If)d(set)h(to)h(`)p
+Fs(on)p Ft(',)f(tilde)g(expansion)g(is)f(p)s(erformed)f(when)h
+(Readline)h(attempts)1110 3769 y(w)m(ord)i(completion.)42
+b(The)30 b(default)g(is)h(`)p Fs(off)p Ft('.)630 3927
+y Fs(history-preserve-point)1110 4037 y Ft(If)41 b(set)h(to)h(`)p
+Fs(on)p Ft(',)i(the)c(history)h(co)s(de)g(attempts)h(to)f(place)h(the)f
+(p)s(oin)m(t)f(\(the)1110 4147 y(curren)m(t)35 b(cursor)g(p)s
+(osition\))g(at)h(the)g(same)f(lo)s(cation)i(on)e(eac)m(h)h(history)g
+(line)1110 4256 y(retriev)m(ed)h(with)f Fs(previous-history)c
+Ft(or)37 b Fs(next-history)p Ft(.)55 b(The)36 b(default)1110
+4366 y(is)30 b(`)p Fs(off)p Ft('.)630 4524 y Fs(history-size)1110
+4634 y Ft(Set)39 b(the)g(maxim)m(um)g(n)m(um)m(b)s(er)f(of)h(history)g
+(en)m(tries)h(sa)m(v)m(ed)g(in)f(the)g(history)1110 4743
+y(list.)53 b(If)34 b(set)h(to)g(zero,)i(the)d(n)m(um)m(b)s(er)g(of)g
+(en)m(tries)h(in)f(the)h(history)f(list)h(is)g(not)1110
+4853 y(limited.)630 5011 y Fs(horizontal-scroll-mode)1110
+5121 y Ft(This)g(v)-5 b(ariable)37 b(can)f(b)s(e)f(set)h(to)h(either)f
+(`)p Fs(on)p Ft(')g(or)g(`)p Fs(off)p Ft('.)57 b(Setting)36
+b(it)g(to)h(`)p Fs(on)p Ft(')1110 5230 y(means)26 b(that)h(the)f(text)h
+(of)g(the)f(lines)g(b)s(eing)g(edited)h(will)f(scroll)h(horizon)m
+(tally)1110 5340 y(on)32 b(a)g(single)g(screen)g(line)g(when)e(they)i
+(are)g(longer)h(than)e(the)h(width)f(of)h(the)p eop end
+%%Page: 99 105
+TeXDict begin 99 104 bop 150 -116 a Ft(Chapter)30 b(8:)41
+b(Command)29 b(Line)i(Editing)2107 b(99)1110 299 y(screen,)27
+b(instead)g(of)f(wrapping)f(on)m(to)i(a)f(new)g(screen)g(line.)39
+b(By)27 b(default,)g(this)1110 408 y(v)-5 b(ariable)31
+b(is)g(set)f(to)i(`)p Fs(off)p Ft('.)630 567 y Fs(input-meta)1110
+676 y Ft(If)f(set)g(to)h(`)p Fs(on)p Ft(',)g(Readline)g(will)f(enable)h
+(eigh)m(t-bit)h(input)d(\(it)i(will)f(not)h(clear)1110
+786 y(the)40 b(eigh)m(th)g(bit)g(in)f(the)h(c)m(haracters)h(it)f
+(reads\),)j(regardless)c(of)h(what)g(the)1110 896 y(terminal)g(claims)h
+(it)g(can)f(supp)s(ort.)68 b(The)39 b(default)h(v)-5
+b(alue)40 b(is)g(`)p Fs(off)p Ft('.)69 b(The)1110 1005
+y(name)30 b Fs(meta-flag)e Ft(is)j(a)f(synon)m(ym)g(for)g(this)h(v)-5
+b(ariable.)630 1163 y Fs(isearch-terminators)1110 1273
+y Ft(The)51 b(string)h(of)g(c)m(haracters)h(that)f(should)e(terminate)j
+(an)f(incremen)m(tal)1110 1383 y(searc)m(h)25 b(without)g(subsequen)m
+(tly)g(executing)h(the)f(c)m(haracter)h(as)f(a)g(command)1110
+1492 y(\(see)42 b(Section)f(8.2.5)i([Searc)m(hing],)i(page)c(95\).)73
+b(If)41 b(this)g(v)-5 b(ariable)41 b(has)g(not)1110 1602
+y(b)s(een)35 b(giv)m(en)h(a)g(v)-5 b(alue,)37 b(the)f(c)m(haracters)h
+Fs(ESC)d Ft(and)h Fi(C-J)g Ft(will)h(terminate)g(an)1110
+1711 y(incremen)m(tal)c(searc)m(h.)630 1870 y Fs(keymap)192
+b Ft(Sets)39 b(Readline's)g(idea)h(of)f(the)g(curren)m(t)f(k)m(eymap)h
+(for)g(k)m(ey)g(binding)f(com-)1110 1979 y(mands.)81
+b(Acceptable)47 b Fs(keymap)42 b Ft(names)i(are)h Fs(emacs)p
+Ft(,)i Fs(emacs-standard)p Ft(,)1110 2089 y Fs(emacs-meta)p
+Ft(,)99 b Fs(emacs-ctlx)p Ft(,)f Fs(vi)p Ft(,)j Fs(vi-move)p
+Ft(,)f Fs(vi-command)p Ft(,)f(and)1110 2198 y Fs(vi-insert)p
+Ft(.)64 b Fs(vi)38 b Ft(is)h(equiv)-5 b(alen)m(t)41 b(to)e
+Fs(vi-command)p Ft(;)i Fs(emacs)c Ft(is)i(equiv)-5 b(alen)m(t)1110
+2308 y(to)33 b Fs(emacs-standard)p Ft(.)41 b(The)31 b(default)h(v)-5
+b(alue)32 b(is)g Fs(emacs)p Ft(.)44 b(The)31 b(v)-5 b(alue)33
+b(of)f(the)1110 2418 y Fs(editing-mode)27 b Ft(v)-5 b(ariable)31
+b(also)h(a\013ects)f(the)g(default)f(k)m(eymap.)630 2576
+y Fs(mark-directories)1110 2685 y Ft(If)38 b(set)g(to)h(`)p
+Fs(on)p Ft(',)i(completed)e(directory)f(names)g(ha)m(v)m(e)i(a)e(slash)
+g(app)s(ended.)1110 2795 y(The)30 b(default)g(is)h(`)p
+Fs(on)p Ft('.)630 2953 y Fs(mark-modified-lines)1110
+3063 y Ft(This)k(v)-5 b(ariable,)38 b(when)d(set)h(to)h(`)p
+Fs(on)p Ft(',)g(causes)g(Readline)f(to)h(displa)m(y)f(an)f(as-)1110
+3173 y(terisk)f(\(`)p Fs(*)p Ft('\))h(at)f(the)g(start)g(of)g(history)g
+(lines)g(whic)m(h)f(ha)m(v)m(e)i(b)s(een)e(mo)s(di\014ed.)1110
+3282 y(This)d(v)-5 b(ariable)31 b(is)f(`)p Fs(off)p Ft(')g(b)m(y)g
+(default.)630 3440 y Fs(mark-symlinked-directori)o(es)1110
+3550 y Ft(If)44 b(set)h(to)h(`)p Fs(on)p Ft(',)i(completed)e(names)f
+(whic)m(h)f(are)h(sym)m(b)s(olic)g(links)g(to)g(di-)1110
+3660 y(rectories)j(ha)m(v)m(e)f(a)g(slash)f(app)s(ended)e(\(sub)5
+b(ject)47 b(to)g(the)f(v)-5 b(alue)47 b(of)f Fs(mark-)1110
+3769 y(directories)p Ft(\).)38 b(The)30 b(default)g(is)h(`)p
+Fs(off)p Ft('.)630 3927 y Fs(match-hidden-files)1110
+4037 y Ft(This)21 b(v)-5 b(ariable,)25 b(when)d(set)g(to)h(`)p
+Fs(on)p Ft(',)h(causes)f(Readline)g(to)g(matc)m(h)g(\014les)f(whose)
+1110 4147 y(names)44 b(b)s(egin)g(with)g(a)g(`)p Fs(.)p
+Ft(')g(\(hidden)f(\014les\))i(when)e(p)s(erforming)g(\014lename)1110
+4256 y(completion,)j(unless)41 b(the)g(leading)h(`)p
+Fs(.)p Ft(')g(is)g(supplied)e(b)m(y)h(the)h(user)f(in)g(the)1110
+4366 y(\014lename)31 b(to)g(b)s(e)e(completed.)42 b(This)30
+b(v)-5 b(ariable)31 b(is)f(`)p Fs(on)p Ft(')h(b)m(y)f(default.)630
+4524 y Fs(output-meta)1110 4634 y Ft(If)35 b(set)h(to)g(`)p
+Fs(on)p Ft(',)h(Readline)f(will)g(displa)m(y)f(c)m(haracters)i(with)e
+(the)h(eigh)m(th)g(bit)1110 4743 y(set)h(directly)g(rather)f(than)g(as)
+h(a)g(meta-pre\014xed)f(escap)s(e)h(sequence.)59 b(The)1110
+4853 y(default)31 b(is)f(`)p Fs(off)p Ft('.)630 5011
+y Fs(page-completions)1110 5121 y Ft(If)j(set)i(to)f(`)p
+Fs(on)p Ft(',)h(Readline)g(uses)e(an)h(in)m(ternal)h
+Fs(more)p Ft(-lik)m(e)f(pager)g(to)h(displa)m(y)1110
+5230 y(a)e(screenful)f(of)g(p)s(ossible)g(completions)i(at)f(a)g(time.)
+47 b(This)31 b(v)-5 b(ariable)34 b(is)e(`)p Fs(on)p Ft(')1110
+5340 y(b)m(y)e(default.)p eop end
+%%Page: 100 106
+TeXDict begin 100 105 bop 150 -116 a Ft(100)2527 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y Fs(print-completions-horizo)o(ntal)o
+(ly)1110 408 y Ft(If)23 b(set)i(to)g(`)p Fs(on)p Ft(',)g(Readline)g
+(will)f(displa)m(y)g(completions)h(with)f(matc)m(hes)h(sorted)1110
+518 y(horizon)m(tally)45 b(in)e(alphab)s(etical)i(order,)i(rather)c
+(than)g(do)m(wn)g(the)h(screen.)1110 628 y(The)30 b(default)g(is)h(`)p
+Fs(off)p Ft('.)630 788 y Fs(revert-all-at-newline)1110
+897 y Ft(If)e(set)h(to)g(`)p Fs(on)p Ft(',)g(Readline)g(will)g(undo)f
+(all)h(c)m(hanges)h(to)f(history)g(lines)f(b)s(efore)1110
+1007 y(returning)f(when)f Fs(accept-line)f Ft(is)j(executed.)41
+b(By)29 b(default,)g(history)g(lines)1110 1117 y(ma)m(y)42
+b(b)s(e)g(mo)s(di\014ed)e(and)h(retain)i(individual)e(undo)g(lists)h
+(across)g(calls)h(to)1110 1226 y Fs(readline)p Ft(.)38
+b(The)30 b(default)h(is)f(`)p Fs(off)p Ft('.)630 1386
+y Fs(show-all-if-ambiguous)1110 1496 y Ft(This)f(alters)i(the)f
+(default)g(b)s(eha)m(vior)g(of)g(the)h(completion)g(functions.)40
+b(If)29 b(set)1110 1606 y(to)f(`)p Fs(on)p Ft(',)g(w)m(ords)f(whic)m(h)
+g(ha)m(v)m(e)i(more)f(than)f(one)h(p)s(ossible)f(completion)h(cause)
+1110 1715 y(the)39 b(matc)m(hes)h(to)g(b)s(e)e(listed)h(immediately)i
+(instead)e(of)g(ringing)g(the)g(b)s(ell.)1110 1825 y(The)30
+b(default)g(v)-5 b(alue)31 b(is)g(`)p Fs(off)p Ft('.)630
+1985 y Fs(show-all-if-unmodified)1110 2094 y Ft(This)38
+b(alters)h(the)g(default)g(b)s(eha)m(vior)g(of)f(the)h(completion)h
+(functions)e(in)h(a)1110 2204 y(fashion)25 b(similar)g(to)h
+Fq(sho)m(w-all-if-am)m(biguous)t Ft(.)41 b(If)24 b(set)i(to)f(`)p
+Fs(on)p Ft(',)i(w)m(ords)d(whic)m(h)1110 2314 y(ha)m(v)m(e)32
+b(more)f(than)f(one)i(p)s(ossible)e(completion)i(without)f(an)m(y)g(p)s
+(ossible)f(par-)1110 2423 y(tial)43 b(completion)h(\(the)f(p)s(ossible)
+f(completions)h(don't)f(share)g(a)h(common)1110 2533
+y(pre\014x\))30 b(cause)g(the)h(matc)m(hes)g(to)g(b)s(e)f(listed)g
+(immediately)i(instead)e(of)h(ring-)1110 2642 y(ing)g(the)f(b)s(ell.)41
+b(The)30 b(default)g(v)-5 b(alue)31 b(is)f(`)p Fs(off)p
+Ft('.)630 2803 y Fs(skip-completed-text)1110 2912 y Ft(If)i(set)i(to)f
+(`)p Fs(on)p Ft(',)h(this)f(alters)g(the)g(default)g(completion)h(b)s
+(eha)m(vior)f(when)f(in-)1110 3022 y(serting)d(a)h(single)g(matc)m(h)f
+(in)m(to)h(the)g(line.)40 b(It's)30 b(only)f(activ)m(e)i(when)d(p)s
+(erform-)1110 3131 y(ing)35 b(completion)h(in)e(the)h(middle)f(of)h(a)f
+(w)m(ord.)53 b(If)35 b(enabled,)g(readline)g(do)s(es)1110
+3241 y(not)41 b(insert)f(c)m(haracters)i(from)e(the)h(completion)h
+(that)f(matc)m(h)g(c)m(haracters)1110 3351 y(after)c(p)s(oin)m(t)g(in)g
+(the)g(w)m(ord)f(b)s(eing)g(completed,)k(so)d(p)s(ortions)f(of)h(the)g
+(w)m(ord)1110 3460 y(follo)m(wing)c(the)f(cursor)f(are)h(not)g
+(duplicated.)45 b(F)-8 b(or)32 b(instance,)h(if)f(this)f(is)h(en-)1110
+3570 y(abled,)43 b(attempting)f(completion)g(when)d(the)i(cursor)f(is)g
+(after)h(the)g(`)p Fs(e)p Ft(')f(in)1110 3679 y(`)p Fs(Makefile)p
+Ft(')c(will)i(result)f(in)g(`)p Fs(Makefile)p Ft(')f(rather)h(than)h(`)
+p Fs(Makefilefile)p Ft(',)1110 3789 y(assuming)d(there)g(is)h(a)f
+(single)h(p)s(ossible)f(completion.)56 b(The)35 b(default)g(v)-5
+b(alue)1110 3898 y(is)30 b(`)p Fs(off)p Ft('.)630 4059
+y Fs(visible-stats)1110 4168 y Ft(If)h(set)i(to)f(`)p
+Fs(on)p Ft(',)h(a)f(c)m(haracter)i(denoting)e(a)g(\014le's)g(t)m(yp)s
+(e)g(is)g(app)s(ended)e(to)j(the)1110 4278 y(\014lename)e(when)e
+(listing)i(p)s(ossible)f(completions.)42 b(The)30 b(default)g(is)h(`)p
+Fs(off)p Ft('.)150 4438 y(Key)f(Bindings)630 4548 y(The)41
+b(syn)m(tax)i(for)f(con)m(trolling)h(k)m(ey)g(bindings)e(in)h(the)g
+(init)g(\014le)g(is)g(simple.)75 b(First)43 b(y)m(ou)630
+4657 y(need)27 b(to)i(\014nd)d(the)i(name)f(of)h(the)g(command)f(that)i
+(y)m(ou)f(w)m(an)m(t)g(to)g(c)m(hange.)41 b(The)27 b(follo)m(wing)630
+4767 y(sections)37 b(con)m(tain)g(tables)g(of)f(the)g(command)f(name,)j
+(the)e(default)g(k)m(eybinding,)h(if)f(an)m(y)-8 b(,)630
+4876 y(and)30 b(a)h(short)f(description)g(of)h(what)f(the)g(command)h
+(do)s(es.)630 5011 y(Once)36 b(y)m(ou)g(kno)m(w)g(the)g(name)g(of)g
+(the)g(command,)h(simply)f(place)h(on)e(a)i(line)f(in)g(the)g(init)630
+5121 y(\014le)e(the)g(name)f(of)h(the)g(k)m(ey)g(y)m(ou)g(wish)f(to)h
+(bind)f(the)h(command)f(to,)i(a)f(colon,)i(and)d(then)630
+5230 y(the)f(name)h(of)f(the)g(command.)46 b(There)32
+b(can)g(b)s(e)g(no)g(space)g(b)s(et)m(w)m(een)h(the)f(k)m(ey)h(name)g
+(and)630 5340 y(the)41 b(colon)h({)f(that)g(will)g(b)s(e)g(in)m
+(terpreted)g(as)g(part)f(of)h(the)g(k)m(ey)h(name.)72
+b(The)40 b(name)h(of)p eop end
+%%Page: 101 107
+TeXDict begin 101 106 bop 150 -116 a Ft(Chapter)30 b(8:)41
+b(Command)29 b(Line)i(Editing)2062 b(101)630 299 y(the)35
+b(k)m(ey)g(can)g(b)s(e)f(expressed)f(in)i(di\013eren)m(t)g(w)m(a)m(ys,)
+h(dep)s(ending)d(on)h(what)h(y)m(ou)g(\014nd)e(most)630
+408 y(comfortable.)630 538 y(In)i(addition)h(to)h(command)f(names,)i
+(readline)e(allo)m(ws)h(k)m(eys)g(to)g(b)s(e)e(b)s(ound)f(to)j(a)f
+(string)630 648 y(that)31 b(is)f(inserted)h(when)e(the)i(k)m(ey)g(is)f
+(pressed)g(\(a)h Fq(macro)5 b Ft(\).)630 778 y(The)42
+b Fs(bind)30 b(-p)42 b Ft(command)h(displa)m(ys)g(Readline)g(function)g
+(names)g(and)f(bindings)g(in)h(a)630 887 y(format)37
+b(that)h(can)f(put)f(directly)i(in)m(to)g(an)f(initialization)j
+(\014le.)60 b(See)38 b(Section)f(4.2)i([Bash)630 997
+y(Builtins],)31 b(page)g(41.)630 1147 y Fq(k)m(eyname)5
+b Ft(:)42 b Fq(function-name)35 b Ft(or)c Fq(macro)1110
+1257 y(k)m(eyname)k Ft(is)29 b(the)f(name)h(of)g(a)g(k)m(ey)h(sp)s
+(elled)e(out)h(in)g(English.)39 b(F)-8 b(or)30 b(example:)1350
+1387 y Fs(Control-u:)45 b(universal-argument)1350 1496
+y(Meta-Rubout:)f(backward-kill-word)1350 1606 y(Control-o:)h(">)i
+(output")1110 1736 y Ft(In)38 b(the)h(ab)s(o)m(v)m(e)h(example,)h
+Fi(C-u)d Ft(is)h(b)s(ound)d(to)k(the)e(function)h Fs(universal-)1110
+1845 y(argument)p Ft(,)f Fi(M-DEL)e Ft(is)i(b)s(ound)e(to)i(the)g
+(function)g Fs(backward-kill-word)p Ft(,)1110 1955 y(and)g
+Fi(C-o)g Ft(is)h(b)s(ound)e(to)j(run)d(the)j(macro)f(expressed)g(on)f
+(the)i(righ)m(t)f(hand)1110 2064 y(side)30 b(\(that)i(is,)e(to)h
+(insert)g(the)f(text)i(`)p Fs(>)e(output)p Ft(')f(in)m(to)i(the)g
+(line\).)1110 2194 y(A)37 b(n)m(um)m(b)s(er)f(of)h(sym)m(b)s(olic)g(c)m
+(haracter)i(names)e(are)g(recognized)h(while)f(pro-)1110
+2304 y(cessing)22 b(this)g(k)m(ey)g(binding)e(syn)m(tax:)37
+b Fq(DEL)p Ft(,)22 b Fq(ESC)8 b Ft(,)20 b Fq(ESCAPE)5
+b Ft(,)21 b Fq(LFD)5 b Ft(,)22 b Fq(NEW-)1110 2414 y(LINE)5
+b Ft(,)31 b Fq(RET)7 b Ft(,)29 b Fq(RETURN)10 b Ft(,)30
+b Fq(R)m(UBOUT)7 b Ft(,)31 b Fq(SP)-8 b(A)m(CE)5 b Ft(,)31
+b Fq(SPC)8 b Ft(,)29 b(and)h Fq(T)-8 b(AB)5 b Ft(.)630
+2564 y Fs(")p Fq(k)m(eyseq)r Fs(")p Ft(:)41 b Fq(function-name)36
+b Ft(or)30 b Fq(macro)1110 2673 y(k)m(eyseq)k Ft(di\013ers)d(from)f
+Fq(k)m(eyname)37 b Ft(ab)s(o)m(v)m(e)32 b(in)f(that)h(strings)f
+(denoting)g(an)g(en-)1110 2783 y(tire)j(k)m(ey)h(sequence)f(can)g(b)s
+(e)f(sp)s(eci\014ed,)h(b)m(y)f(placing)i(the)f(k)m(ey)g(sequence)g(in)
+1110 2892 y(double)29 b(quotes.)41 b(Some)29 b Fl(gnu)h
+Ft(Emacs)f(st)m(yle)i(k)m(ey)f(escap)s(es)g(can)g(b)s(e)f(used,)g(as)
+1110 3002 y(in)k(the)h(follo)m(wing)i(example,)f(but)e(the)h(sp)s
+(ecial)h(c)m(haracter)g(names)f(are)g(not)1110 3112 y(recognized.)1350
+3242 y Fs("\\C-u":)46 b(universal-argument)1350 3351
+y("\\C-x\\C-r":)f(re-read-init-file)1350 3461 y("\\e[11~":)g("Function)
+h(Key)g(1")1110 3591 y Ft(In)64 b(the)g(ab)s(o)m(v)m(e)i(example,)74
+b Fi(C-u)64 b Ft(is)g(again)i(b)s(ound)c(to)k(the)e(function)1110
+3700 y Fs(universal-argument)39 b Ft(\(just)k(as)h(it)g(w)m(as)g(in)g
+(the)f(\014rst)g(example\),)49 b(`)p Fi(C-x)1110 3810
+y(C-r)p Ft(')30 b(is)g(b)s(ound)e(to)j(the)g(function)f
+Fs(re-read-init-file)p Ft(,)c(and)j(`)p Fs(ESC)h([)g(1)g(1)1110
+3919 y(~)p Ft(')g(is)h(b)s(ound)d(to)j(insert)f(the)h(text)g(`)p
+Fs(Function)e(Key)g(1)p Ft('.)630 4070 y(The)g(follo)m(wing)i
+Fl(gnu)f Ft(Emacs)g(st)m(yle)h(escap)s(e)f(sequences)g(are)g(a)m(v)-5
+b(ailable)32 b(when)d(sp)s(ecifying)630 4179 y(k)m(ey)i(sequences:)630
+4329 y Fi(\\C-)336 b Ft(con)m(trol)32 b(pre\014x)630
+4479 y Fi(\\M-)336 b Ft(meta)31 b(pre\014x)630 4630 y
+Fi(\\e)384 b Ft(an)30 b(escap)s(e)h(c)m(haracter)630
+4780 y Fi(\\\\)384 b Ft(bac)m(kslash)630 4930 y Fi(\\)p
+Fs(")g(")p Ft(,)30 b(a)h(double)f(quotation)i(mark)630
+5080 y Fi(\\')384 b Fs(')p Ft(,)30 b(a)h(single)g(quote)g(or)f(ap)s
+(ostrophe)630 5230 y(In)d(addition)h(to)g(the)g Fl(gnu)f
+Ft(Emacs)h(st)m(yle)h(escap)s(e)f(sequences,)h(a)f(second)f(set)h(of)g
+(bac)m(kslash)630 5340 y(escap)s(es)j(is)f(a)m(v)-5 b(ailable:)p
+eop end
+%%Page: 102 108
+TeXDict begin 102 107 bop 150 -116 a Ft(102)2527 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y Fs(\\a)384 b Ft(alert)31
+b(\(b)s(ell\))630 460 y Fs(\\b)384 b Ft(bac)m(kspace)630
+621 y Fs(\\d)g Ft(delete)630 782 y Fs(\\f)g Ft(form)30
+b(feed)630 943 y Fs(\\n)384 b Ft(newline)630 1104 y Fs(\\r)g
+Ft(carriage)32 b(return)630 1266 y Fs(\\t)384 b Ft(horizon)m(tal)32
+b(tab)630 1427 y Fs(\\v)384 b Ft(v)m(ertical)32 b(tab)630
+1588 y Fs(\\)p Fi(nnn)288 b Ft(the)35 b(eigh)m(t-bit)h(c)m(haracter)g
+(whose)e(v)-5 b(alue)35 b(is)g(the)f(o)s(ctal)i(v)-5
+b(alue)35 b Fq(nnn)e Ft(\(one)i(to)1110 1697 y(three)c(digits\))630
+1858 y Fs(\\x)p Fi(HH)288 b Ft(the)40 b(eigh)m(t-bit)h(c)m(haracter)g
+(whose)e(v)-5 b(alue)39 b(is)h(the)f(hexadecimal)i(v)-5
+b(alue)40 b Fq(HH)1110 1968 y Ft(\(one)31 b(or)f(t)m(w)m(o)i(hex)e
+(digits\))630 2129 y(When)37 b(en)m(tering)h(the)g(text)g(of)g(a)g
+(macro,)i(single)e(or)f(double)g(quotes)h(m)m(ust)f(b)s(e)g(used)f(to)
+630 2239 y(indicate)23 b(a)e(macro)h(de\014nition.)38
+b(Unquoted)21 b(text)i(is)e(assumed)g(to)h(b)s(e)f(a)h(function)f
+(name.)38 b(In)630 2348 y(the)22 b(macro)f(b)s(o)s(dy)-8
+b(,)23 b(the)e(bac)m(kslash)h(escap)s(es)g(describ)s(ed)e(ab)s(o)m(v)m
+(e)j(are)e(expanded.)37 b(Bac)m(kslash)630 2458 y(will)j(quote)h(an)m
+(y)f(other)g(c)m(haracter)i(in)d(the)i(macro)f(text,)k(including)39
+b(`)p Fs(")p Ft(')h(and)g(`)p Fs(')p Ft('.)69 b(F)-8
+b(or)630 2568 y(example,)28 b(the)e(follo)m(wing)h(binding)d(will)i
+(mak)m(e)h(`)p Fi(C-x)j Fs(\\)p Ft(')c(insert)f(a)h(single)h(`)p
+Fs(\\)p Ft(')f(in)m(to)g(the)g(line:)870 2703 y Fs("\\C-x\\\\":)45
+b("\\\\")150 2904 y Fj(8.3.2)63 b(Conditional)41 b(Init)g(Constructs)
+150 3051 y Ft(Readline)c(implemen)m(ts)g(a)h(facilit)m(y)g(similar)f
+(in)g(spirit)f(to)i(the)f(conditional)h(compilation)g(features)f(of)150
+3160 y(the)31 b(C)f(prepro)s(cessor)g(whic)m(h)g(allo)m(ws)i(k)m(ey)g
+(bindings)d(and)h(v)-5 b(ariable)32 b(settings)f(to)h(b)s(e)e(p)s
+(erformed)f(as)i(the)150 3270 y(result)f(of)h(tests.)41
+b(There)30 b(are)h(four)f(parser)f(directiv)m(es)j(used.)150
+3432 y Fs($if)336 b Ft(The)31 b Fs($if)f Ft(construct)i(allo)m(ws)h
+(bindings)d(to)i(b)s(e)e(made)i(based)f(on)g(the)g(editing)h(mo)s(de,)g
+(the)630 3542 y(terminal)39 b(b)s(eing)e(used,)j(or)e(the)g
+(application)h(using)f(Readline.)64 b(The)38 b(text)h(of)f(the)g(test)
+630 3651 y(extends)30 b(to)h(the)g(end)f(of)g(the)h(line;)g(no)f(c)m
+(haracters)i(are)f(required)e(to)i(isolate)i(it.)630
+3812 y Fs(mode)288 b Ft(The)20 b Fs(mode=)g Ft(form)g(of)h(the)g
+Fs($if)f Ft(directiv)m(e)j(is)e(used)f(to)h(test)h(whether)e(Readline)
+1110 3922 y(is)29 b(in)h Fs(emacs)e Ft(or)h Fs(vi)g Ft(mo)s(de.)40
+b(This)29 b(ma)m(y)h(b)s(e)e(used)h(in)g(conjunction)h(with)f(the)1110
+4031 y(`)p Fs(set)h(keymap)p Ft(')c(command,)i(for)f(instance,)i(to)f
+(set)g(bindings)f(in)g(the)h Fs(emacs-)1110 4141 y(standard)23
+b Ft(and)h Fs(emacs-ctlx)f Ft(k)m(eymaps)i(only)g(if)g(Readline)h(is)f
+(starting)h(out)1110 4251 y(in)k Fs(emacs)f Ft(mo)s(de.)630
+4412 y Fs(term)288 b Ft(The)26 b Fs(term=)g Ft(form)g(ma)m(y)i(b)s(e)e
+(used)g(to)i(include)f(terminal-sp)s(eci\014c)g(k)m(ey)h(bind-)1110
+4521 y(ings,)38 b(p)s(erhaps)c(to)j(bind)e(the)h(k)m(ey)h(sequences)f
+(output)g(b)m(y)g(the)g(terminal's)1110 4631 y(function)24
+b(k)m(eys.)39 b(The)23 b(w)m(ord)h(on)f(the)i(righ)m(t)f(side)g(of)g
+(the)g(`)p Fs(=)p Ft(')g(is)g(tested)h(against)1110 4741
+y(b)s(oth)k(the)h(full)g(name)g(of)g(the)g(terminal)h(and)e(the)i(p)s
+(ortion)e(of)h(the)g(terminal)1110 4850 y(name)k(b)s(efore)f(the)g
+(\014rst)g(`)p Fs(-)p Ft('.)50 b(This)33 b(allo)m(ws)i
+Fs(sun)e Ft(to)h(matc)m(h)g(b)s(oth)f Fs(sun)g Ft(and)1110
+4960 y Fs(sun-cmd)p Ft(,)c(for)h(instance.)630 5121 y
+Fs(application)1110 5230 y Ft(The)21 b Fq(application)j
+Ft(construct)e(is)g(used)f(to)i(include)f(application-sp)s(eci\014c)h
+(set-)1110 5340 y(tings.)39 b(Eac)m(h)26 b(program)e(using)g(the)h
+(Readline)g(library)g(sets)g(the)g Fq(application)p eop
+end
+%%Page: 103 109
+TeXDict begin 103 108 bop 150 -116 a Ft(Chapter)30 b(8:)41
+b(Command)29 b(Line)i(Editing)2062 b(103)1110 299 y Fq(name)5
+b Ft(,)25 b(and)d(y)m(ou)h(can)g(test)h(for)e(a)h(particular)h(v)-5
+b(alue.)38 b(This)22 b(could)h(b)s(e)f(used)g(to)1110
+408 y(bind)32 b(k)m(ey)h(sequences)g(to)h(functions)e(useful)g(for)h(a)
+g(sp)s(eci\014c)f(program.)48 b(F)-8 b(or)1110 518 y(instance,)35
+b(the)e(follo)m(wing)h(command)f(adds)f(a)i(k)m(ey)f(sequence)h(that)f
+(quotes)1110 628 y(the)e(curren)m(t)f(or)g(previous)g(w)m(ord)g(in)g
+(Bash:)1350 762 y Fs($if)47 b(Bash)1350 872 y(#)g(Quote)g(the)g
+(current)f(or)h(previous)e(word)1350 981 y("\\C-xq":)h
+("\\eb\\"\\ef\\"")1350 1091 y($endif)150 1250 y($endif)192
+b Ft(This)29 b(command,)i(as)f(seen)h(in)f(the)g(previous)g(example,)h
+(terminates)g(an)g Fs($if)e Ft(command.)150 1410 y Fs($else)240
+b Ft(Commands)29 b(in)h(this)h(branc)m(h)e(of)i(the)f
+Fs($if)g Ft(directiv)m(e)i(are)f(executed)g(if)f(the)h(test)g(fails.)
+150 1569 y Fs($include)96 b Ft(This)43 b(directiv)m(e)i(tak)m(es)g(a)e
+(single)i(\014lename)e(as)h(an)f(argumen)m(t)h(and)f(reads)g(commands)
+630 1679 y(and)38 b(bindings)f(from)h(that)i(\014le.)65
+b(F)-8 b(or)39 b(example,)j(the)d(follo)m(wing)h(directiv)m(e)g(reads)e
+(from)630 1788 y(`)p Fs(/etc/inputrc)p Ft(':)870 1923
+y Fs($include)46 b(/etc/inputrc)150 2122 y Fj(8.3.3)63
+b(Sample)41 b(Init)g(File)150 2269 y Ft(Here)27 b(is)f(an)h(example)g
+(of)f(an)h Fq(inputrc)k Ft(\014le.)39 b(This)26 b(illustrates)h(k)m(ey)
+h(binding,)e(v)-5 b(ariable)27 b(assignmen)m(t,)i(and)150
+2379 y(conditional)j(syn)m(tax.)p eop end
+%%Page: 104 110
+TeXDict begin 104 109 bop 150 -116 a Ft(104)2527 b(Bash)31
+b(Reference)g(Man)m(ual)390 408 y Fs(#)47 b(This)g(file)g(controls)e
+(the)i(behaviour)e(of)j(line)e(input)h(editing)e(for)390
+518 y(#)i(programs)f(that)h(use)g(the)f(GNU)h(Readline)f(library.)93
+b(Existing)390 628 y(#)47 b(programs)f(include)g(FTP,)g(Bash,)h(and)g
+(GDB.)390 737 y(#)390 847 y(#)g(You)g(can)g(re-read)f(the)h(inputrc)f
+(file)g(with)h(C-x)g(C-r.)390 956 y(#)g(Lines)g(beginning)e(with)i('#')
+g(are)g(comments.)390 1066 y(#)390 1176 y(#)g(First,)g(include)e(any)i
+(systemwide)e(bindings)h(and)h(variable)390 1285 y(#)g(assignments)e
+(from)i(/etc/Inputrc)390 1395 y($include)f(/etc/Inputrc)390
+1614 y(#)390 1724 y(#)h(Set)g(various)f(bindings)g(for)h(emacs)f(mode.)
+390 1943 y(set)h(editing-mode)d(emacs)390 2162 y($if)j(mode=emacs)390
+2381 y(Meta-Control-h:)91 b(backward-kill-word)43 b(Text)k(after)f(the)
+h(function)f(name)g(is)h(ignored)390 2600 y(#)390 2710
+y(#)g(Arrow)g(keys)f(in)i(keypad)e(mode)390 2819 y(#)390
+2929 y(#"\\M-OD":)379 b(backward-char)390 3039 y(#"\\M-OC":)g
+(forward-char)390 3148 y(#"\\M-OA":)g(previous-history)390
+3258 y(#"\\M-OB":)g(next-history)390 3367 y(#)390 3477
+y(#)47 b(Arrow)g(keys)f(in)i(ANSI)e(mode)390 3587 y(#)390
+3696 y("\\M-[D":)380 b(backward-char)390 3806 y("\\M-[C":)g
+(forward-char)390 3915 y("\\M-[A":)g(previous-history)390
+4025 y("\\M-[B":)g(next-history)390 4134 y(#)390 4244
+y(#)47 b(Arrow)g(keys)f(in)i(8)f(bit)g(keypad)f(mode)390
+4354 y(#)390 4463 y(#"\\M-\\C-OD":)331 b(backward-char)390
+4573 y(#"\\M-\\C-OC":)g(forward-char)390 4682 y(#"\\M-\\C-OA":)g
+(previous-history)390 4792 y(#"\\M-\\C-OB":)g(next-history)390
+4902 y(#)390 5011 y(#)47 b(Arrow)g(keys)f(in)i(8)f(bit)g(ANSI)g(mode)
+390 5121 y(#)390 5230 y(#"\\M-\\C-[D":)331 b(backward-char)390
+5340 y(#"\\M-\\C-[C":)g(forward-char)p eop end
+%%Page: 105 111
+TeXDict begin 105 110 bop 150 -116 a Ft(Chapter)30 b(8:)41
+b(Command)29 b(Line)i(Editing)2062 b(105)390 299 y Fs(#"\\M-\\C-[A":)
+331 b(previous-history)390 408 y(#"\\M-\\C-[B":)g(next-history)390
+628 y(C-q:)47 b(quoted-insert)390 847 y($endif)390 1066
+y(#)g(An)h(old-style)d(binding.)93 b(This)47 b(happens)f(to)h(be)g(the)
+g(default.)390 1176 y(TAB:)g(complete)390 1395 y(#)g(Macros)g(that)f
+(are)h(convenient)e(for)i(shell)f(interaction)390 1504
+y($if)h(Bash)390 1614 y(#)g(edit)g(the)g(path)390 1724
+y("\\C-xp":)f("PATH=${PATH}\\e\\C-e\\C-a)o(\\ef)o(\\C-f)o(")390
+1833 y(#)h(prepare)f(to)h(type)g(a)h(quoted)e(word)g(--)390
+1943 y(#)h(insert)g(open)f(and)h(close)f(double)h(quotes)390
+2052 y(#)g(and)g(move)g(to)g(just)g(after)f(the)h(open)g(quote)390
+2162 y("\\C-x\\"":)e("\\"\\"\\C-b")390 2271 y(#)i(insert)g(a)g
+(backslash)e(\(testing)h(backslash)f(escapes)390 2381
+y(#)i(in)h(sequences)d(and)i(macros\))390 2491 y("\\C-x\\\\":)e("\\\\")
+390 2600 y(#)i(Quote)g(the)g(current)f(or)h(previous)e(word)390
+2710 y("\\C-xq":)h("\\eb\\"\\ef\\"")390 2819 y(#)h(Add)g(a)h(binding)e
+(to)h(refresh)f(the)h(line,)f(which)g(is)h(unbound)390
+2929 y("\\C-xr":)f(redraw-current-line)390 3039 y(#)h(Edit)g(variable)f
+(on)h(current)f(line.)390 3148 y("\\M-\\C-v":)f
+("\\C-a\\C-k$\\C-y\\M-\\C-e\\C-)o(a\\C-)o(y=")390 3258
+y($endif)390 3477 y(#)i(use)g(a)h(visible)e(bell)g(if)h(one)g(is)h
+(available)390 3587 y(set)f(bell-style)e(visible)390
+3806 y(#)i(don't)g(strip)f(characters)f(to)i(7)h(bits)e(when)h(reading)
+390 3915 y(set)g(input-meta)e(on)390 4134 y(#)i(allow)g(iso-latin1)e
+(characters)g(to)i(be)g(inserted)f(rather)390 4244 y(#)h(than)g
+(converted)e(to)j(prefix-meta)c(sequences)390 4354 y(set)j
+(convert-meta)d(off)390 4573 y(#)j(display)f(characters)f(with)i(the)g
+(eighth)f(bit)h(set)g(directly)390 4682 y(#)g(rather)g(than)f(as)h
+(meta-prefixed)e(characters)390 4792 y(set)i(output-meta)e(on)390
+5011 y(#)i(if)h(there)e(are)h(more)g(than)f(150)h(possible)f
+(completions)e(for)390 5121 y(#)j(a)h(word,)e(ask)h(the)g(user)g(if)g
+(he)g(wants)f(to)i(see)f(all)f(of)i(them)390 5230 y(set)f
+(completion-query-items)42 b(150)p eop end
+%%Page: 106 112
+TeXDict begin 106 111 bop 150 -116 a Ft(106)2527 b(Bash)31
+b(Reference)g(Man)m(ual)390 299 y Fs(#)47 b(For)g(FTP)390
+408 y($if)g(Ftp)390 518 y("\\C-xg":)f("get)g(\\M-?")390
+628 y("\\C-xt":)g("put)g(\\M-?")390 737 y("\\M-.":)g(yank-last-arg)390
+847 y($endif)150 1075 y Fr(8.4)68 b(Bindable)45 b(Readline)i(Commands)
+150 1235 y Ft(This)32 b(section)h(describ)s(es)f(Readline)h(commands)f
+(that)h(ma)m(y)h(b)s(e)d(b)s(ound)g(to)i(k)m(ey)g(sequences.)48
+b(Y)-8 b(ou)33 b(can)150 1344 y(list)40 b(y)m(our)f(k)m(ey)i(bindings)d
+(b)m(y)h(executing)i Fs(bind)29 b(-P)39 b Ft(or,)j(for)d(a)h(more)g
+(terse)g(format,)i(suitable)e(for)f(an)150 1454 y Fq(inputrc)34
+b Ft(\014le,)29 b Fs(bind)g(-p)p Ft(.)40 b(\(See)30 b(Section)f(4.2)h
+([Bash)g(Builtins],)g(page)g(41.\))41 b(Command)28 b(names)h(without)
+150 1563 y(an)h(accompan)m(ying)i(k)m(ey)f(sequence)g(are)g(un)m(b)s
+(ound)d(b)m(y)i(default.)275 1696 y(In)25 b(the)h(follo)m(wing)i
+(descriptions,)f Fq(p)s(oin)m(t)h Ft(refers)e(to)h(the)f(curren)m(t)g
+(cursor)g(p)s(osition,)h(and)f Fq(mark)31 b Ft(refers)150
+1805 y(to)40 b(a)f(cursor)f(p)s(osition)h(sa)m(v)m(ed)h(b)m(y)f(the)g
+Fs(set-mark)d Ft(command.)66 b(The)38 b(text)i(b)s(et)m(w)m(een)g(the)f
+(p)s(oin)m(t)g(and)150 1915 y(mark)30 b(is)h(referred)e(to)i(as)g(the)f
+Fq(region)p Ft(.)150 2110 y Fj(8.4.1)63 b(Commands)42
+b(F)-10 b(or)41 b(Mo)m(ving)150 2280 y Fs(beginning-of-line)26
+b(\(C-a\))630 2390 y Ft(Mo)m(v)m(e)32 b(to)g(the)e(start)h(of)g(the)f
+(curren)m(t)g(line.)150 2545 y Fs(end-of-line)d(\(C-e\))630
+2655 y Ft(Mo)m(v)m(e)32 b(to)g(the)e(end)g(of)g(the)h(line.)150
+2810 y Fs(forward-char)c(\(C-f\))630 2920 y Ft(Mo)m(v)m(e)32
+b(forw)m(ard)e(a)h(c)m(haracter.)150 3075 y Fs(backward-char)c(\(C-b\))
+630 3185 y Ft(Mo)m(v)m(e)32 b(bac)m(k)g(a)e(c)m(haracter.)150
+3340 y Fs(forward-word)d(\(M-f\))630 3450 y Ft(Mo)m(v)m(e)32
+b(forw)m(ard)e(to)h(the)f(end)g(of)g(the)h(next)f(w)m(ord.)41
+b(W)-8 b(ords)30 b(are)h(comp)s(osed)f(of)g(letters)i(and)630
+3559 y(digits.)150 3715 y Fs(backward-word)27 b(\(M-b\))630
+3824 y Ft(Mo)m(v)m(e)36 b(bac)m(k)e(to)g(the)g(start)g(of)g(the)g
+(curren)m(t)f(or)g(previous)g(w)m(ord.)50 b(W)-8 b(ords)34
+b(are)g(comp)s(osed)630 3934 y(of)d(letters)g(and)f(digits.)150
+4089 y Fs(shell-forward-word)25 b(\(\))630 4199 y Ft(Mo)m(v)m(e)30
+b(forw)m(ard)e(to)h(the)f(end)f(of)h(the)h(next)f(w)m(ord.)40
+b(W)-8 b(ords)28 b(are)g(delimited)h(b)m(y)f(non-quoted)630
+4308 y(shell)j(metac)m(haracters.)150 4464 y Fs(shell-backward-word)25
+b(\(\))630 4573 y Ft(Mo)m(v)m(e)37 b(bac)m(k)e(to)h(the)f(start)g(of)g
+(the)g(curren)m(t)g(or)f(previous)h(w)m(ord.)53 b(W)-8
+b(ords)35 b(are)g(delimited)630 4683 y(b)m(y)30 b(non-quoted)h(shell)f
+(metac)m(haracters.)150 4838 y Fs(clear-screen)d(\(C-l\))630
+4948 y Ft(Clear)g(the)g(screen)f(and)h(redra)m(w)f(the)h(curren)m(t)f
+(line,)i(lea)m(ving)g(the)f(curren)m(t)g(line)g(at)g(the)g(top)630
+5057 y(of)k(the)f(screen.)150 5213 y Fs(redraw-current-line)25
+b(\(\))630 5322 y Ft(Refresh)30 b(the)g(curren)m(t)h(line.)41
+b(By)30 b(default,)h(this)f(is)h(un)m(b)s(ound.)p eop
+end
+%%Page: 107 113
+TeXDict begin 107 112 bop 150 -116 a Ft(Chapter)30 b(8:)41
+b(Command)29 b(Line)i(Editing)2062 b(107)150 299 y Fj(8.4.2)63
+b(Commands)42 b(F)-10 b(or)41 b(Manipulating)h(The)f(History)150
+473 y Fs(accept-line)27 b(\(Newline)h(or)i(Return\))630
+582 y Ft(Accept)25 b(the)e(line)h(regardless)g(of)f(where)g(the)h
+(cursor)e(is.)39 b(If)23 b(this)g(line)h(is)f(non-empt)m(y)-8
+b(,)26 b(add)c(it)630 692 y(to)27 b(the)f(history)g(list)h(according)g
+(to)g(the)f(setting)i(of)e(the)g Fs(HISTCONTROL)d Ft(and)j
+Fs(HISTIGNORE)630 802 y Ft(v)-5 b(ariables.)42 b(If)30
+b(this)h(line)g(is)g(a)g(mo)s(di\014ed)e(history)i(line,)g(then)f
+(restore)i(the)f(history)f(line)h(to)630 911 y(its)g(original)g(state.)
+150 1075 y Fs(previous-history)26 b(\(C-p\))630 1184
+y Ft(Mo)m(v)m(e)32 b(`bac)m(k')g(through)e(the)g(history)h(list,)g
+(fetc)m(hing)g(the)g(previous)f(command.)150 1348 y Fs(next-history)d
+(\(C-n\))630 1457 y Ft(Mo)m(v)m(e)32 b(`forw)m(ard')f(through)e(the)i
+(history)f(list,)i(fetc)m(hing)f(the)g(next)f(command.)150
+1621 y Fs(beginning-of-history)25 b(\(M-<\))630 1730
+y Ft(Mo)m(v)m(e)32 b(to)g(the)e(\014rst)g(line)g(in)h(the)f(history)-8
+b(.)150 1894 y Fs(end-of-history)26 b(\(M->\))630 2004
+y Ft(Mo)m(v)m(e)32 b(to)g(the)e(end)g(of)g(the)h(input)e(history)-8
+b(,)31 b(i.e.,)h(the)f(line)f(curren)m(tly)h(b)s(eing)f(en)m(tered.)150
+2167 y Fs(reverse-search-history)24 b(\(C-r\))630 2277
+y Ft(Searc)m(h)31 b(bac)m(kw)m(ard)h(starting)g(at)g(the)f(curren)m(t)g
+(line)g(and)g(mo)m(ving)h(`up')e(through)h(the)g(his-)630
+2386 y(tory)g(as)f(necessary)-8 b(.)42 b(This)29 b(is)i(an)f(incremen)m
+(tal)i(searc)m(h.)150 2550 y Fs(forward-search-history)24
+b(\(C-s\))630 2659 y Ft(Searc)m(h)30 b(forw)m(ard)f(starting)h(at)g
+(the)g(curren)m(t)f(line)h(and)f(mo)m(ving)h(`do)m(wn')f(through)g(the)
+h(the)630 2769 y(history)g(as)h(necessary)-8 b(.)41 b(This)30
+b(is)g(an)h(incremen)m(tal)g(searc)m(h.)150 2932 y Fs
+(non-incremental-reverse-)o(sear)o(ch-h)o(ist)o(ory)24
+b(\(M-p\))630 3042 y Ft(Searc)m(h)31 b(bac)m(kw)m(ard)h(starting)g(at)g
+(the)f(curren)m(t)g(line)g(and)g(mo)m(ving)h(`up')e(through)h(the)g
+(his-)630 3152 y(tory)36 b(as)g(necessary)h(using)e(a)i(non-incremen)m
+(tal)g(searc)m(h)f(for)g(a)g(string)g(supplied)f(b)m(y)h(the)630
+3261 y(user.)150 3425 y Fs(non-incremental-forward-)o(sear)o(ch-h)o
+(ist)o(ory)24 b(\(M-n\))630 3534 y Ft(Searc)m(h)30 b(forw)m(ard)f
+(starting)h(at)g(the)g(curren)m(t)f(line)h(and)f(mo)m(ving)h(`do)m(wn')
+f(through)g(the)h(the)630 3644 y(history)d(as)f(necessary)i(using)e(a)h
+(non-incremen)m(tal)g(searc)m(h)h(for)e(a)h(string)g(supplied)e(b)m(y)i
+(the)630 3754 y(user.)150 3917 y Fs(history-search-forward)d(\(\))630
+4027 y Ft(Searc)m(h)42 b(forw)m(ard)f(through)f(the)i(history)f(for)g
+(the)h(string)f(of)h(c)m(haracters)h(b)s(et)m(w)m(een)f(the)630
+4136 y(start)36 b(of)f(the)g(curren)m(t)g(line)g(and)g(the)g(p)s(oin)m
+(t.)55 b(This)34 b(is)i(a)f(non-incremen)m(tal)h(searc)m(h.)56
+b(By)630 4246 y(default,)31 b(this)f(command)g(is)h(un)m(b)s(ound.)150
+4409 y Fs(history-search-backward)24 b(\(\))630 4519
+y Ft(Searc)m(h)35 b(bac)m(kw)m(ard)g(through)f(the)h(history)g(for)g
+(the)f(string)h(of)g(c)m(haracters)h(b)s(et)m(w)m(een)g(the)630
+4629 y(start)g(of)f(the)g(curren)m(t)g(line)g(and)g(the)g(p)s(oin)m(t.)
+55 b(This)34 b(is)i(a)f(non-incremen)m(tal)h(searc)m(h.)56
+b(By)630 4738 y(default,)31 b(this)f(command)g(is)h(un)m(b)s(ound.)150
+4902 y Fs(yank-nth-arg)c(\(M-C-y\))630 5011 y Ft(Insert)37
+b(the)g(\014rst)f(argumen)m(t)i(to)f(the)h(previous)e(command)h
+(\(usually)g(the)g(second)g(w)m(ord)630 5121 y(on)32
+b(the)g(previous)f(line\))i(at)f(p)s(oin)m(t.)46 b(With)32
+b(an)g(argumen)m(t)g Fq(n)p Ft(,)g(insert)g(the)g Fq(n)p
+Ft(th)f(w)m(ord)g(from)630 5230 y(the)k(previous)f(command)h(\(the)g(w)
+m(ords)g(in)f(the)h(previous)g(command)f(b)s(egin)h(with)f(w)m(ord)630
+5340 y(0\).)69 b(A)40 b(negativ)m(e)h(argumen)m(t)f(inserts)g(the)f
+Fq(n)p Ft(th)g(w)m(ord)g(from)g(the)h(end)f(of)h(the)f(previous)p
+eop end
+%%Page: 108 114
+TeXDict begin 108 113 bop 150 -116 a Ft(108)2527 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y(command.)48 b(Once)33
+b(the)g(argumen)m(t)h Fq(n)e Ft(is)h(computed,)h(the)f(argumen)m(t)g
+(is)g(extracted)i(as)e(if)630 408 y(the)e(`)p Fs(!)p
+Fi(n)11 b Ft(')29 b(history)i(expansion)f(had)g(b)s(een)f(sp)s
+(eci\014ed.)150 584 y Fs(yank-last-arg)e(\(M-.)i(or)h(M-_\))630
+693 y Ft(Insert)k(last)i(argumen)m(t)g(to)g(the)f(previous)f(command)h
+(\(the)h(last)f(w)m(ord)g(of)g(the)g(previous)630 803
+y(history)c(en)m(try\).)41 b(With)31 b(an)g(argumen)m(t,)g(b)s(eha)m(v)
+m(e)g(exactly)i(lik)m(e)f Fs(yank-nth-arg)p Ft(.)38 b(Succes-)630
+913 y(siv)m(e)d(calls)h(to)f Fs(yank-last-arg)c Ft(mo)m(v)m(e)36
+b(bac)m(k)g(through)d(the)i(history)g(list,)h(inserting)f(the)630
+1022 y(last)d(argumen)m(t)f(of)g(eac)m(h)h(line)f(in)f(turn.)41
+b(The)30 b(history)h(expansion)f(facilities)j(are)e(used)f(to)630
+1132 y(extract)i(the)e(last)i(argumen)m(t,)f(as)f(if)h(the)f(`)p
+Fs(!$)p Ft(')g(history)h(expansion)f(had)g(b)s(een)f(sp)s(eci\014ed.)
+150 1347 y Fj(8.4.3)63 b(Commands)42 b(F)-10 b(or)41
+b(Changing)g(T)-10 b(ext)150 1527 y Fs(delete-char)27
+b(\(C-d\))630 1636 y Ft(Delete)41 b(the)e(c)m(haracter)i(at)e(p)s(oin)m
+(t.)66 b(If)39 b(p)s(oin)m(t)f(is)h(at)h(the)f(b)s(eginning)f(of)h(the)
+g(line,)j(there)630 1746 y(are)37 b(no)g(c)m(haracters)i(in)d(the)i
+(line,)h(and)d(the)h(last)h(c)m(haracter)h(t)m(yp)s(ed)e(w)m(as)g(not)g
+(b)s(ound)e(to)630 1855 y Fs(delete-char)p Ft(,)28 b(then)i(return)f
+Fl(eof)p Ft(.)150 2031 y Fs(backward-delete-char)c(\(Rubout\))630
+2140 y Ft(Delete)32 b(the)f(c)m(haracter)g(b)s(ehind)e(the)h(cursor.)40
+b(A)30 b(n)m(umeric)g(argumen)m(t)h(means)f(to)h(kill)g(the)630
+2250 y(c)m(haracters)h(instead)e(of)h(deleting)g(them.)150
+2425 y Fs(forward-backward-delete-)o(char)24 b(\(\))630
+2535 y Ft(Delete)40 b(the)f(c)m(haracter)h(under)c(the)j(cursor,)h
+(unless)d(the)i(cursor)e(is)h(at)h(the)g(end)e(of)i(the)630
+2644 y(line,)33 b(in)e(whic)m(h)g(case)i(the)f(c)m(haracter)h(b)s
+(ehind)d(the)i(cursor)f(is)g(deleted.)46 b(By)32 b(default,)g(this)630
+2754 y(is)e(not)h(b)s(ound)d(to)j(a)g(k)m(ey)-8 b(.)150
+2929 y Fs(quoted-insert)27 b(\(C-q)i(or)h(C-v\))630 3039
+y Ft(Add)j(the)i(next)f(c)m(haracter)i(t)m(yp)s(ed)e(to)h(the)f(line)h
+(v)m(erbatim.)53 b(This)33 b(is)i(ho)m(w)f(to)h(insert)f(k)m(ey)630
+3148 y(sequences)d(lik)m(e)g Fi(C-q)p Ft(,)f(for)g(example.)150
+3324 y Fs(self-insert)d(\(a,)j(b,)g(A,)f(1,)h(!,)g(...)o(\))630
+3433 y Ft(Insert)g(y)m(ourself.)150 3609 y Fs(transpose-chars)c
+(\(C-t\))630 3718 y Ft(Drag)33 b(the)f(c)m(haracter)h(b)s(efore)f(the)g
+(cursor)f(forw)m(ard)h(o)m(v)m(er)h(the)f(c)m(haracter)i(at)e(the)g
+(cursor,)630 3828 y(mo)m(ving)k(the)g(cursor)f(forw)m(ard)g(as)g(w)m
+(ell.)57 b(If)35 b(the)h(insertion)g(p)s(oin)m(t)f(is)g(at)i(the)e(end)
+g(of)h(the)630 3937 y(line,)24 b(then)e(this)g(transp)s(oses)f(the)h
+(last)h(t)m(w)m(o)g(c)m(haracters)g(of)f(the)h(line.)38
+b(Negativ)m(e)25 b(argumen)m(ts)630 4047 y(ha)m(v)m(e)32
+b(no)e(e\013ect.)150 4222 y Fs(transpose-words)c(\(M-t\))630
+4332 y Ft(Drag)33 b(the)g(w)m(ord)f(b)s(efore)g(p)s(oin)m(t)g(past)g
+(the)h(w)m(ord)f(after)g(p)s(oin)m(t,)i(mo)m(ving)f(p)s(oin)m(t)f(past)
+g(that)630 4441 y(w)m(ord)c(as)h(w)m(ell.)41 b(If)27
+b(the)i(insertion)f(p)s(oin)m(t)h(is)f(at)h(the)g(end)e(of)i(the)f
+(line,)i(this)e(transp)s(oses)g(the)630 4551 y(last)j(t)m(w)m(o)h(w)m
+(ords)e(on)g(the)h(line.)150 4726 y Fs(upcase-word)c(\(M-u\))630
+4836 y Ft(Upp)s(ercase)32 b(the)g(curren)m(t)g(\(or)g(follo)m(wing\))i
+(w)m(ord.)45 b(With)32 b(a)g(negativ)m(e)j(argumen)m(t,)e(upp)s(er-)630
+4946 y(case)e(the)g(previous)f(w)m(ord,)g(but)g(do)g(not)h(mo)m(v)m(e)h
+(the)e(cursor.)150 5121 y Fs(downcase-word)d(\(M-l\))630
+5230 y Ft(Lo)m(w)m(ercase)c(the)f(curren)m(t)f(\(or)h(follo)m(wing\))i
+(w)m(ord.)37 b(With)22 b(a)g(negativ)m(e)i(argumen)m(t,)g(lo)m(w)m
+(ercase)630 5340 y(the)31 b(previous)e(w)m(ord,)i(but)e(do)i(not)f(mo)m
+(v)m(e)i(the)f(cursor.)p eop end
+%%Page: 109 115
+TeXDict begin 109 114 bop 150 -116 a Ft(Chapter)30 b(8:)41
+b(Command)29 b(Line)i(Editing)2062 b(109)150 299 y Fs(capitalize-word)
+26 b(\(M-c\))630 408 y Ft(Capitalize)d(the)f(curren)m(t)f(\(or)g(follo)
+m(wing\))i(w)m(ord.)38 b(With)21 b(a)h(negativ)m(e)h(argumen)m(t,)h
+(capitalize)630 518 y(the)31 b(previous)e(w)m(ord,)i(but)e(do)i(not)f
+(mo)m(v)m(e)i(the)f(cursor.)150 671 y Fs(overwrite-mode)26
+b(\(\))630 780 y Ft(T)-8 b(oggle)35 b(o)m(v)m(erwrite)g(mo)s(de.)48
+b(With)33 b(an)g(explicit)h(p)s(ositiv)m(e)g(n)m(umeric)f(argumen)m(t,)
+h(switc)m(hes)630 890 y(to)22 b(o)m(v)m(erwrite)i(mo)s(de.)37
+b(With)22 b(an)g(explicit)h(non-p)s(ositiv)m(e)f(n)m(umeric)g(argumen)m
+(t,)i(switc)m(hes)e(to)630 999 y(insert)30 b(mo)s(de.)41
+b(This)30 b(command)h(a\013ects)h(only)e Fs(emacs)f Ft(mo)s(de;)i
+Fs(vi)f Ft(mo)s(de)g(do)s(es)g(o)m(v)m(erwrite)630 1109
+y(di\013eren)m(tly)-8 b(.)42 b(Eac)m(h)31 b(call)h(to)f
+Fs(readline\(\))c Ft(starts)k(in)f(insert)g(mo)s(de.)630
+1240 y(In)e(o)m(v)m(erwrite)j(mo)s(de,)e(c)m(haracters)i(b)s(ound)c(to)
+j Fs(self-insert)c Ft(replace)k(the)g(text)g(at)g(p)s(oin)m(t)630
+1350 y(rather)41 b(than)h(pushing)e(the)i(text)g(to)g(the)g(righ)m(t.)
+75 b(Characters)42 b(b)s(ound)d(to)j Fs(backward-)630
+1459 y(delete-char)27 b Ft(replace)32 b(the)e(c)m(haracter)i(b)s(efore)
+e(p)s(oin)m(t)h(with)f(a)g(space.)630 1590 y(By)h(default,)f(this)h
+(command)f(is)g(un)m(b)s(ound.)150 1783 y Fj(8.4.4)63
+b(Killing)42 b(And)e(Y)-10 b(anking)150 1951 y Fs(kill-line)28
+b(\(C-k\))630 2061 y Ft(Kill)j(the)f(text)i(from)e(p)s(oin)m(t)g(to)h
+(the)g(end)e(of)i(the)f(line.)150 2213 y Fs(backward-kill-line)25
+b(\(C-x)30 b(Rubout\))630 2323 y Ft(Kill)h(bac)m(kw)m(ard)g(to)g(the)f
+(b)s(eginning)g(of)g(the)h(line.)150 2476 y Fs(unix-line-discard)26
+b(\(C-u\))630 2585 y Ft(Kill)31 b(bac)m(kw)m(ard)g(from)e(the)i(cursor)
+f(to)h(the)f(b)s(eginning)g(of)h(the)f(curren)m(t)g(line.)150
+2738 y Fs(kill-whole-line)c(\(\))630 2847 y Ft(Kill)37
+b(all)g(c)m(haracters)h(on)f(the)f(curren)m(t)h(line,)h(no)f(matter)g
+(where)f(p)s(oin)m(t)h(is.)59 b(By)36 b(default,)630
+2957 y(this)30 b(is)h(un)m(b)s(ound.)150 3109 y Fs(kill-word)d(\(M-d\))
+630 3219 y Ft(Kill)i(from)f(p)s(oin)m(t)g(to)h(the)g(end)e(of)i(the)f
+(curren)m(t)h(w)m(ord,)f(or)g(if)h(b)s(et)m(w)m(een)g(w)m(ords,)f(to)h
+(the)g(end)630 3329 y(of)h(the)f(next)h(w)m(ord.)40 b(W)-8
+b(ord)31 b(b)s(oundaries)e(are)h(the)h(same)g(as)f Fs(forward-word)p
+Ft(.)150 3481 y Fs(backward-kill-word)25 b(\(M-DEL\))630
+3591 y Ft(Kill)k(the)g(w)m(ord)g(b)s(ehind)e(p)s(oin)m(t.)40
+b(W)-8 b(ord)29 b(b)s(oundaries)f(are)h(the)g(same)g(as)g
+Fs(backward-word)p Ft(.)150 3743 y Fs(shell-kill-word)d(\(\))630
+3853 y Ft(Kill)k(from)f(p)s(oin)m(t)g(to)h(the)g(end)e(of)i(the)f
+(curren)m(t)h(w)m(ord,)f(or)g(if)h(b)s(et)m(w)m(een)g(w)m(ords,)f(to)h
+(the)g(end)630 3963 y(of)h(the)f(next)h(w)m(ord.)40 b(W)-8
+b(ord)31 b(b)s(oundaries)e(are)h(the)h(same)g(as)f Fs
+(shell-forward-word)p Ft(.)150 4115 y Fs(backward-kill-word)25
+b(\(\))630 4225 y Ft(Kill)d(the)h(w)m(ord)e(b)s(ehind)g(p)s(oin)m(t.)38
+b(W)-8 b(ord)22 b(b)s(oundaries)f(are)h(the)g(same)h(as)f
+Fs(shell-backward-)630 4334 y(word)p Ft(.)150 4487 y
+Fs(unix-word-rubout)k(\(C-w\))630 4596 y Ft(Kill)32 b(the)g(w)m(ord)f
+(b)s(ehind)f(p)s(oin)m(t,)i(using)f(white)h(space)g(as)g(a)g(w)m(ord)f
+(b)s(oundary)-8 b(.)43 b(The)31 b(killed)630 4706 y(text)g(is)g(sa)m(v)
+m(ed)g(on)g(the)f(kill-ring.)150 4859 y Fs(unix-filename-rubout)25
+b(\(\))630 4968 y Ft(Kill)37 b(the)f(w)m(ord)g(b)s(ehind)f(p)s(oin)m
+(t,)j(using)e(white)g(space)h(and)f(the)g(slash)g(c)m(haracter)i(as)f
+(the)630 5078 y(w)m(ord)30 b(b)s(oundaries.)39 b(The)30
+b(killed)h(text)g(is)g(sa)m(v)m(ed)g(on)g(the)f(kill-ring.)150
+5230 y Fs(delete-horizontal-space)24 b(\(\))630 5340
+y Ft(Delete)33 b(all)e(spaces)g(and)e(tabs)i(around)e(p)s(oin)m(t.)41
+b(By)31 b(default,)f(this)h(is)f(un)m(b)s(ound.)p eop
+end
+%%Page: 110 116
+TeXDict begin 110 115 bop 150 -116 a Ft(110)2527 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fs(kill-region)c(\(\))630
+408 y Ft(Kill)k(the)f(text)i(in)e(the)g(curren)m(t)h(region.)41
+b(By)31 b(default,)f(this)h(command)f(is)g(un)m(b)s(ound.)150
+579 y Fs(copy-region-as-kill)25 b(\(\))630 689 y Ft(Cop)m(y)34
+b(the)g(text)h(in)f(the)g(region)g(to)h(the)f(kill)h(bu\013er,)f(so)g
+(it)h(can)f(b)s(e)f(y)m(ank)m(ed)i(righ)m(t)f(a)m(w)m(a)m(y)-8
+b(.)630 799 y(By)31 b(default,)f(this)h(command)f(is)g(un)m(b)s(ound.)
+150 969 y Fs(copy-backward-word)25 b(\(\))630 1079 y
+Ft(Cop)m(y)38 b(the)h(w)m(ord)f(b)s(efore)g(p)s(oin)m(t)g(to)i(the)e
+(kill)h(bu\013er.)64 b(The)38 b(w)m(ord)g(b)s(oundaries)f(are)i(the)630
+1189 y(same)31 b(as)f Fs(backward-word)p Ft(.)38 b(By)30
+b(default,)h(this)f(command)g(is)h(un)m(b)s(ound.)150
+1359 y Fs(copy-forward-word)26 b(\(\))630 1469 y Ft(Cop)m(y)31
+b(the)g(w)m(ord)g(follo)m(wing)h(p)s(oin)m(t)f(to)h(the)f(kill)h
+(bu\013er.)42 b(The)30 b(w)m(ord)h(b)s(oundaries)e(are)j(the)630
+1579 y(same)f(as)f Fs(forward-word)p Ft(.)38 b(By)30
+b(default,)h(this)g(command)f(is)g(un)m(b)s(ound.)150
+1749 y Fs(yank)f(\(C-y\))630 1859 y Ft(Y)-8 b(ank)31
+b(the)f(top)h(of)g(the)f(kill)h(ring)f(in)m(to)i(the)e(bu\013er)g(at)h
+(p)s(oin)m(t.)150 2030 y Fs(yank-pop)d(\(M-y\))630 2139
+y Ft(Rotate)36 b(the)f(kill-ring,)i(and)d(y)m(ank)h(the)f(new)g(top.)54
+b(Y)-8 b(ou)35 b(can)g(only)f(do)h(this)f(if)h(the)g(prior)630
+2249 y(command)30 b(is)h Fs(yank)e Ft(or)h Fs(yank-pop)p
+Ft(.)150 2460 y Fj(8.4.5)63 b(Sp)s(ecifying)42 b(Numeric)f(Argumen)m
+(ts)150 2637 y Fs(digit-argument)26 b(\()p Fi(M-0)p Fs(,)j
+Fi(M-1)p Fs(,)h(...)f Fi(M--)p Fs(\))630 2747 y Ft(Add)d(this)h(digit)g
+(to)h(the)f(argumen)m(t)g(already)h(accum)m(ulating,)h(or)e(start)h(a)f
+(new)f(argumen)m(t.)630 2857 y Fi(M--)j Ft(starts)i(a)g(negativ)m(e)i
+(argumen)m(t.)150 3027 y Fs(universal-argument)25 b(\(\))630
+3137 y Ft(This)g(is)g(another)h(w)m(a)m(y)g(to)h(sp)s(ecify)e(an)g
+(argumen)m(t.)40 b(If)25 b(this)g(command)h(is)f(follo)m(w)m(ed)i(b)m
+(y)f(one)630 3247 y(or)k(more)f(digits,)i(optionally)g(with)e(a)h
+(leading)h(min)m(us)e(sign,)h(those)g(digits)g(de\014ne)f(the)h(ar-)630
+3356 y(gumen)m(t.)41 b(If)28 b(the)i(command)f(is)g(follo)m(w)m(ed)h(b)
+m(y)f(digits,)i(executing)f Fs(universal-argument)630
+3466 y Ft(again)j(ends)e(the)h(n)m(umeric)f(argumen)m(t,)i(but)e(is)h
+(otherwise)g(ignored.)45 b(As)32 b(a)g(sp)s(ecial)h(case,)630
+3575 y(if)g(this)g(command)f(is)h(immediately)h(follo)m(w)m(ed)h(b)m(y)
+d(a)h(c)m(haracter)i(that)e(is)g(neither)g(a)g(digit)630
+3685 y(or)28 b(min)m(us)f(sign,)i(the)f(argumen)m(t)g(coun)m(t)h(for)e
+(the)i(next)f(command)f(is)h(m)m(ultiplied)h(b)m(y)e(four.)630
+3795 y(The)37 b(argumen)m(t)h(coun)m(t)f(is)h(initially)h(one,)g(so)f
+(executing)g(this)f(function)g(the)h(\014rst)e(time)630
+3904 y(mak)m(es)d(the)e(argumen)m(t)i(coun)m(t)f(four,)f(a)i(second)e
+(time)i(mak)m(es)f(the)g(argumen)m(t)g(coun)m(t)h(six-)630
+4014 y(teen,)e(and)f(so)h(on.)40 b(By)31 b(default,)g(this)f(is)g(not)h
+(b)s(ound)d(to)j(a)g(k)m(ey)-8 b(.)150 4224 y Fj(8.4.6)63
+b(Letting)40 b(Readline)h(T)m(yp)s(e)g(F)-10 b(or)42
+b(Y)-10 b(ou)150 4402 y Fs(complete)28 b(\(TAB\))630
+4512 y Ft(A)m(ttempt)c(to)f(p)s(erform)e(completion)j(on)f(the)g(text)g
+(b)s(efore)f(p)s(oin)m(t.)39 b(The)22 b(actual)i(completion)630
+4621 y(p)s(erformed)33 b(is)h(application-sp)s(eci\014c.)53
+b(Bash)35 b(attempts)g(completion)g(treating)h(the)e(text)630
+4731 y(as)39 b(a)h(v)-5 b(ariable)39 b(\(if)h(the)f(text)h(b)s(egins)e
+(with)h(`)p Fs($)p Ft('\),)j(username)c(\(if)i(the)f(text)h(b)s(egins)e
+(with)630 4840 y(`)p Fs(~)p Ft('\),)31 b(hostname)f(\(if)g(the)g(text)h
+(b)s(egins)e(with)h(`)p Fs(@)p Ft('\),)h(or)f(command)f(\(including)h
+(aliases)i(and)630 4950 y(functions\))j(in)f(turn.)53
+b(If)34 b(none)g(of)h(these)h(pro)s(duces)d(a)i(matc)m(h,)i(\014lename)
+e(completion)h(is)630 5060 y(attempted.)150 5230 y Fs
+(possible-completions)25 b(\(M-?\))630 5340 y Ft(List)31
+b(the)f(p)s(ossible)g(completions)i(of)e(the)h(text)g(b)s(efore)f(p)s
+(oin)m(t.)p eop end
+%%Page: 111 117
+TeXDict begin 111 116 bop 150 -116 a Ft(Chapter)30 b(8:)41
+b(Command)29 b(Line)i(Editing)2062 b(111)150 299 y Fs
+(insert-completions)25 b(\(M-*\))630 408 y Ft(Insert)30
+b(all)h(completions)h(of)f(the)g(text)g(b)s(efore)f(p)s(oin)m(t)h(that)
+g(w)m(ould)f(ha)m(v)m(e)i(b)s(een)e(generated)630 518
+y(b)m(y)g Fs(possible-completions)p Ft(.)150 682 y Fs(menu-complete)d
+(\(\))630 792 y Ft(Similar)d(to)g Fs(complete)p Ft(,)f(but)h(replaces)g
+(the)g(w)m(ord)g(to)g(b)s(e)f(completed)i(with)e(a)i(single)f(matc)m(h)
+630 902 y(from)37 b(the)h(list)h(of)f(p)s(ossible)f(completions.)64
+b(Rep)s(eated)39 b(execution)g(of)f Fs(menu-complete)630
+1011 y Ft(steps)i(through)g(the)g(list)h(of)f(p)s(ossible)g
+(completions,)k(inserting)c(eac)m(h)i(matc)m(h)f(in)f(turn.)630
+1121 y(A)m(t)e(the)f(end)f(of)h(the)g(list)g(of)g(completions,)i(the)e
+(b)s(ell)g(is)g(rung)f(\(sub)5 b(ject)36 b(to)i(the)f(setting)630
+1230 y(of)f Fs(bell-style)p Ft(\))e(and)h(the)h(original)i(text)f(is)f
+(restored.)57 b(An)36 b(argumen)m(t)h(of)f Fq(n)f Ft(mo)m(v)m(es)i
+Fq(n)630 1340 y Ft(p)s(ositions)e(forw)m(ard)f(in)g(the)h(list)h(of)e
+(matc)m(hes;)39 b(a)c(negativ)m(e)i(argumen)m(t)e(ma)m(y)g(b)s(e)f
+(used)g(to)630 1450 y(mo)m(v)m(e)40 b(bac)m(kw)m(ard)e(through)g(the)g
+(list.)65 b(This)38 b(command)g(is)g(in)m(tended)g(to)h(b)s(e)f(b)s
+(ound)e(to)630 1559 y Fs(TAB)p Ft(,)30 b(but)f(is)i(un)m(b)s(ound)d(b)m
+(y)i(default.)150 1724 y Fs(menu-complete-backward)24
+b(\(\))630 1833 y Ft(Iden)m(tical)36 b(to)g Fs(menu-complete)p
+Ft(,)d(but)h(mo)m(v)m(es)j(bac)m(kw)m(ard)e(through)f(the)i(list)f(of)g
+(p)s(ossible)630 1943 y(completions,)d(as)e(if)h Fs(menu-complete)26
+b Ft(had)k(b)s(een)g(giv)m(en)h(a)g(negativ)m(e)i(argumen)m(t.)150
+2107 y Fs(delete-char-or-list)25 b(\(\))630 2217 y Ft(Deletes)k(the)e
+(c)m(haracter)h(under)e(the)h(cursor)f(if)h(not)g(at)g(the)g(b)s
+(eginning)g(or)f(end)h(of)g(the)g(line)630 2326 y(\(lik)m(e)k
+Fs(delete-char)p Ft(\).)37 b(If)29 b(at)h(the)f(end)f(of)i(the)f(line,)
+h(b)s(eha)m(v)m(es)g(iden)m(tically)h(to)e Fs(possible-)630
+2436 y(completions)p Ft(.)38 b(This)29 b(command)h(is)h(un)m(b)s(ound)d
+(b)m(y)i(default.)150 2600 y Fs(complete-filename)c(\(M-/\))630
+2710 y Ft(A)m(ttempt)32 b(\014lename)e(completion)i(on)e(the)h(text)g
+(b)s(efore)f(p)s(oin)m(t.)150 2874 y Fs(possible-filename-comple)o
+(tion)o(s)24 b(\(C-x)30 b(/\))630 2984 y Ft(List)f(the)g(p)s(ossible)f
+(completions)h(of)g(the)g(text)g(b)s(efore)g(p)s(oin)m(t,)g(treating)h
+(it)f(as)g(a)f(\014lename.)150 3148 y Fs(complete-username)e(\(M-~\))
+630 3258 y Ft(A)m(ttempt)32 b(completion)f(on)g(the)f(text)i(b)s(efore)
+e(p)s(oin)m(t,)g(treating)i(it)f(as)f(a)h(username.)150
+3422 y Fs(possible-username-comple)o(tion)o(s)24 b(\(C-x)30
+b(~\))630 3532 y Ft(List)25 b(the)g(p)s(ossible)g(completions)h(of)f
+(the)g(text)h(b)s(efore)f(p)s(oin)m(t,)h(treating)g(it)g(as)f(a)g
+(username.)150 3696 y Fs(complete-variable)h(\(M-$\))630
+3806 y Ft(A)m(ttempt)32 b(completion)f(on)g(the)f(text)i(b)s(efore)e(p)
+s(oin)m(t,)g(treating)i(it)f(as)f(a)h(shell)g(v)-5 b(ariable.)150
+3970 y Fs(possible-variable-comple)o(tion)o(s)24 b(\(C-x)30
+b($\))630 4080 y Ft(List)42 b(the)g(p)s(ossible)g(completions)h(of)f
+(the)g(text)h(b)s(efore)e(p)s(oin)m(t,)46 b(treating)d(it)f(as)g(a)h
+(shell)630 4189 y(v)-5 b(ariable.)150 4354 y Fs(complete-hostname)26
+b(\(M-@\))630 4463 y Ft(A)m(ttempt)32 b(completion)f(on)g(the)f(text)i
+(b)s(efore)e(p)s(oin)m(t,)g(treating)i(it)f(as)f(a)h(hostname.)150
+4628 y Fs(possible-hostname-comple)o(tion)o(s)24 b(\(C-x)30
+b(@\))630 4737 y Ft(List)25 b(the)g(p)s(ossible)f(completions)h(of)g
+(the)g(text)g(b)s(efore)g(p)s(oin)m(t,)h(treating)g(it)f(as)f(a)h
+(hostname.)150 4902 y Fs(complete-command)h(\(M-!\))630
+5011 y Ft(A)m(ttempt)32 b(completion)g(on)f(the)g(text)h(b)s(efore)e(p)
+s(oin)m(t,)h(treating)h(it)g(as)f(a)g(command)g(name.)630
+5121 y(Command)46 b(completion)i(attempts)g(to)f(matc)m(h)h(the)f(text)
+h(against)g(aliases,)53 b(reserv)m(ed)630 5230 y(w)m(ords,)36
+b(shell)g(functions,)h(shell)e(builtins,)i(and)e(\014nally)g
+(executable)i(\014lenames,)g(in)e(that)630 5340 y(order.)p
+eop end
+%%Page: 112 118
+TeXDict begin 112 117 bop 150 -116 a Ft(112)2527 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fs(possible-command-complet)o(ions)24
+b(\(C-x)29 b(!\))630 408 y Ft(List)d(the)h(p)s(ossible)f(completions)h
+(of)f(the)h(text)g(b)s(efore)f(p)s(oin)m(t,)h(treating)g(it)g(as)g(a)f
+(command)630 518 y(name.)150 675 y Fs(dynamic-complete-history)e
+(\(M-TAB\))630 784 y Ft(A)m(ttempt)31 b(completion)h(on)e(the)g(text)h
+(b)s(efore)f(p)s(oin)m(t,)g(comparing)h(the)f(text)h(against)h(lines)
+630 894 y(from)e(the)g(history)h(list)g(for)f(p)s(ossible)g(completion)
+i(matc)m(hes.)150 1051 y Fs(dabbrev-expand)26 b(\(\))630
+1160 y Ft(A)m(ttempt)i(men)m(u)e(completion)i(on)f(the)g(text)g(b)s
+(efore)f(p)s(oin)m(t,)i(comparing)f(the)g(text)h(against)630
+1270 y(lines)j(from)e(the)i(history)f(list)h(for)g(p)s(ossible)e
+(completion)j(matc)m(hes.)150 1427 y Fs(complete-into-braces)25
+b(\(M-{\))630 1536 y Ft(P)m(erform)f(\014lename)f(completion)i(and)f
+(insert)f(the)h(list)g(of)g(p)s(ossible)f(completions)i(enclosed)630
+1646 y(within)34 b(braces)h(so)f(the)h(list)g(is)g(a)m(v)-5
+b(ailable)37 b(to)e(the)g(shell)g(\(see)g(Section)h(3.5.1)g([Brace)g
+(Ex-)630 1755 y(pansion],)30 b(page)h(18\).)150 1952
+y Fj(8.4.7)63 b(Keyb)s(oard)41 b(Macros)150 2122 y Fs(start-kbd-macro)
+26 b(\(C-x)j(\(\))630 2232 y Ft(Begin)i(sa)m(ving)h(the)e(c)m
+(haracters)i(t)m(yp)s(ed)e(in)m(to)h(the)g(curren)m(t)f(k)m(eyb)s(oard)
+g(macro.)150 2389 y Fs(end-kbd-macro)d(\(C-x)i(\)\))630
+2498 y Ft(Stop)e(sa)m(ving)h(the)g(c)m(haracters)g(t)m(yp)s(ed)f(in)m
+(to)i(the)e(curren)m(t)g(k)m(eyb)s(oard)g(macro)h(and)f(sa)m(v)m(e)i
+(the)630 2608 y(de\014nition.)150 2765 y Fs(call-last-kbd-macro)c
+(\(C-x)k(e\))630 2874 y Ft(Re-execute)37 b(the)e(last)h(k)m(eyb)s(oard)
+f(macro)h(de\014ned,)f(b)m(y)h(making)f(the)g(c)m(haracters)i(in)e(the)
+630 2984 y(macro)c(app)s(ear)f(as)g(if)h(t)m(yp)s(ed)f(at)h(the)f(k)m
+(eyb)s(oard.)150 3180 y Fj(8.4.8)63 b(Some)41 b(Miscellaneous)i
+(Commands)150 3351 y Fs(re-read-init-file)26 b(\(C-x)j(C-r\))630
+3460 y Ft(Read)22 b(in)g(the)g(con)m(ten)m(ts)h(of)f(the)g
+Fq(inputrc)27 b Ft(\014le,)d(and)d(incorp)s(orate)h(an)m(y)h(bindings)d
+(or)i(v)-5 b(ariable)630 3570 y(assignmen)m(ts)31 b(found)e(there.)150
+3727 y Fs(abort)g(\(C-g\))630 3836 y Ft(Ab)s(ort)d(the)h(curren)m(t)f
+(editing)h(command)f(and)g(ring)h(the)f(terminal's)h(b)s(ell)g(\(sub)5
+b(ject)26 b(to)i(the)630 3946 y(setting)j(of)g Fs(bell-style)p
+Ft(\).)150 4103 y Fs(do-uppercase-version)25 b(\(M-a,)k(M-b,)g(M-)p
+Fi(x)11 b Fs(,)29 b(...)o(\))630 4212 y Ft(If)e(the)h(meta\014ed)g(c)m
+(haracter)h Fq(x)34 b Ft(is)28 b(lo)m(w)m(ercase,)i(run)d(the)g
+(command)h(that)g(is)g(b)s(ound)d(to)k(the)630 4322 y(corresp)s(onding)
+g(upp)s(ercase)h(c)m(haracter.)150 4479 y Fs(prefix-meta)d(\(ESC\))630
+4588 y Ft(Metafy)39 b(the)e(next)h(c)m(haracter)h(t)m(yp)s(ed.)62
+b(This)37 b(is)g(for)h(k)m(eyb)s(oards)f(without)g(a)h(meta)g(k)m(ey)-8
+b(.)630 4698 y(T)m(yping)30 b(`)p Fs(ESC)g(f)p Ft(')g(is)h(equiv)-5
+b(alen)m(t)31 b(to)g(t)m(yping)g Fi(M-f)p Ft(.)150 4854
+y Fs(undo)e(\(C-_)g(or)h(C-x)g(C-u\))630 4964 y Ft(Incremen)m(tal)h
+(undo,)f(separately)h(remem)m(b)s(ered)f(for)g(eac)m(h)i(line.)150
+5121 y Fs(revert-line)27 b(\(M-r\))630 5230 y Ft(Undo)33
+b(all)h(c)m(hanges)g(made)f(to)h(this)f(line.)49 b(This)32
+b(is)h(lik)m(e)i(executing)f(the)f Fs(undo)f Ft(command)630
+5340 y(enough)e(times)h(to)g(get)h(bac)m(k)f(to)g(the)f(b)s(eginning.)p
+eop end
+%%Page: 113 119
+TeXDict begin 113 118 bop 150 -116 a Ft(Chapter)30 b(8:)41
+b(Command)29 b(Line)i(Editing)2062 b(113)150 299 y Fs(tilde-expand)27
+b(\(M-&\))630 408 y Ft(P)m(erform)j(tilde)h(expansion)g(on)f(the)g
+(curren)m(t)h(w)m(ord.)150 555 y Fs(set-mark)d(\(C-@\))630
+664 y Ft(Set)33 b(the)g(mark)f(to)i(the)f(p)s(oin)m(t.)48
+b(If)32 b(a)h(n)m(umeric)g(argumen)m(t)g(is)g(supplied,)f(the)h(mark)g
+(is)f(set)630 774 y(to)f(that)g(p)s(osition.)150 920
+y Fs(exchange-point-and-mark)24 b(\(C-x)29 b(C-x\))630
+1029 y Ft(Sw)m(ap)i(the)g(p)s(oin)m(t)g(with)g(the)g(mark.)43
+b(The)31 b(curren)m(t)g(cursor)f(p)s(osition)i(is)f(set)h(to)f(the)h
+(sa)m(v)m(ed)630 1139 y(p)s(osition,)f(and)e(the)i(old)g(cursor)e(p)s
+(osition)i(is)f(sa)m(v)m(ed)i(as)e(the)h(mark.)150 1285
+y Fs(character-search)26 b(\(C-]\))630 1395 y Ft(A)f(c)m(haracter)h(is)
+f(read)g(and)f(p)s(oin)m(t)h(is)g(mo)m(v)m(ed)h(to)g(the)f(next)g(o)s
+(ccurrence)g(of)g(that)g(c)m(haracter.)630 1504 y(A)30
+b(negativ)m(e)j(coun)m(t)e(searc)m(hes)g(for)f(previous)g(o)s
+(ccurrences.)150 1650 y Fs(character-search-backwar)o(d)24
+b(\(M-C-]\))630 1760 y Ft(A)45 b(c)m(haracter)h(is)f(read)g(and)f(p)s
+(oin)m(t)h(is)g(mo)m(v)m(ed)h(to)f(the)g(previous)f(o)s(ccurrence)h(of)
+g(that)630 1870 y(c)m(haracter.)d(A)31 b(negativ)m(e)h(coun)m(t)f
+(searc)m(hes)h(for)e(subsequen)m(t)f(o)s(ccurrences.)150
+2016 y Fs(skip-csi-sequence)d(\(\))630 2125 y Ft(Read)i(enough)f(c)m
+(haracters)h(to)g(consume)f(a)h(m)m(ulti-k)m(ey)h(sequence)f(suc)m(h)f
+(as)g(those)h(de\014ned)630 2235 y(for)37 b(k)m(eys)h(lik)m(e)g(Home)g
+(and)f(End.)60 b(Suc)m(h)37 b(sequences)g(b)s(egin)g(with)g(a)h(Con)m
+(trol)g(Sequence)630 2345 y(Indicator)f(\(CSI\),)f(usually)h(ESC-[.)59
+b(If)36 b(this)g(sequence)h(is)g(b)s(ound)d(to)k Fs("\\)p
+Ft(e[)p Fs(")p Ft(,)g(k)m(eys)f(pro-)630 2454 y(ducing)31
+b(suc)m(h)h(sequences)g(will)h(ha)m(v)m(e)g(no)f(e\013ect)h(unless)e
+(explicitly)j(b)s(ound)c(to)i(a)h(readline)630 2564 y(command,)f
+(instead)g(of)g(inserting)g(stra)m(y)h(c)m(haracters)g(in)m(to)g(the)f
+(editing)h(bu\013er.)44 b(This)31 b(is)630 2673 y(un)m(b)s(ound)d(b)m
+(y)i(default,)h(but)f(usually)g(b)s(ound)e(to)j(ESC-[.)150
+2819 y Fs(insert-comment)26 b(\(M-#\))630 2929 y Ft(Without)36
+b(a)g(n)m(umeric)g(argumen)m(t,)h(the)f(v)-5 b(alue)36
+b(of)g(the)g Fs(comment-begin)c Ft(v)-5 b(ariable)36
+b(is)g(in-)630 3039 y(serted)c(at)g(the)g(b)s(eginning)f(of)h(the)f
+(curren)m(t)h(line.)45 b(If)31 b(a)h(n)m(umeric)f(argumen)m(t)h(is)g
+(supplied,)630 3148 y(this)k(command)h(acts)g(as)g(a)g(toggle:)55
+b(if)37 b(the)f(c)m(haracters)i(at)g(the)e(b)s(eginning)g(of)h(the)g
+(line)630 3258 y(do)30 b(not)h(matc)m(h)h(the)f(v)-5
+b(alue)31 b(of)f Fs(comment-begin)p Ft(,)e(the)i(v)-5
+b(alue)31 b(is)g(inserted,)g(otherwise)g(the)630 3367
+y(c)m(haracters)42 b(in)d Fs(comment-begin)e Ft(are)j(deleted)h(from)f
+(the)g(b)s(eginning)g(of)g(the)g(line.)71 b(In)630 3477
+y(either)37 b(case,)j(the)e(line)f(is)g(accepted)i(as)e(if)g(a)g
+(newline)g(had)g(b)s(een)f(t)m(yp)s(ed.)60 b(The)37 b(default)630
+3587 y(v)-5 b(alue)32 b(of)g Fs(comment-begin)c Ft(causes)k(this)f
+(command)h(to)g(mak)m(e)h(the)e(curren)m(t)h(line)g(a)g(shell)630
+3696 y(commen)m(t.)40 b(If)26 b(a)h(n)m(umeric)f(argumen)m(t)h(causes)g
+(the)f(commen)m(t)i(c)m(haracter)g(to)f(b)s(e)f(remo)m(v)m(ed,)630
+3806 y(the)31 b(line)f(will)h(b)s(e)f(executed)h(b)m(y)f(the)h(shell.)
+150 3952 y Fs(dump-functions)26 b(\(\))630 4061 y Ft(Prin)m(t)g(all)i
+(of)e(the)h(functions)f(and)g(their)g(k)m(ey)h(bindings)e(to)j(the)e
+(Readline)h(output)f(stream.)630 4171 y(If)31 b(a)h(n)m(umeric)g
+(argumen)m(t)g(is)g(supplied,)f(the)h(output)f(is)h(formatted)g(in)f
+(suc)m(h)h(a)g(w)m(a)m(y)g(that)630 4281 y(it)f(can)g(b)s(e)e(made)i
+(part)f(of)g(an)h Fq(inputrc)k Ft(\014le.)41 b(This)29
+b(command)h(is)h(un)m(b)s(ound)c(b)m(y)k(default.)150
+4427 y Fs(dump-variables)26 b(\(\))630 4536 y Ft(Prin)m(t)21
+b(all)h(of)g(the)f(settable)i(v)-5 b(ariables)22 b(and)f(their)g(v)-5
+b(alues)22 b(to)g(the)f(Readline)h(output)f(stream.)630
+4646 y(If)31 b(a)h(n)m(umeric)g(argumen)m(t)g(is)g(supplied,)f(the)h
+(output)f(is)h(formatted)g(in)f(suc)m(h)h(a)g(w)m(a)m(y)g(that)630
+4756 y(it)f(can)g(b)s(e)e(made)i(part)f(of)g(an)h Fq(inputrc)k
+Ft(\014le.)41 b(This)29 b(command)h(is)h(un)m(b)s(ound)c(b)m(y)k
+(default.)150 4902 y Fs(dump-macros)c(\(\))630 5011 y
+Ft(Prin)m(t)34 b(all)g(of)g(the)g(Readline)g(k)m(ey)h(sequences)f(b)s
+(ound)e(to)i(macros)g(and)f(the)h(strings)g(they)630
+5121 y(output.)53 b(If)35 b(a)g(n)m(umeric)f(argumen)m(t)i(is)e
+(supplied,)h(the)g(output)g(is)f(formatted)i(in)e(suc)m(h)h(a)630
+5230 y(w)m(a)m(y)c(that)g(it)f(can)g(b)s(e)g(made)g(part)f(of)i(an)e
+Fq(inputrc)35 b Ft(\014le.)41 b(This)29 b(command)h(is)g(un)m(b)s(ound)
+d(b)m(y)630 5340 y(default.)p eop end
+%%Page: 114 120
+TeXDict begin 114 119 bop 150 -116 a Ft(114)2527 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fs(glob-complete-word)25
+b(\(M-g\))630 408 y Ft(The)i(w)m(ord)h(b)s(efore)f(p)s(oin)m(t)h(is)g
+(treated)h(as)f(a)h(pattern)f(for)f(pathname)h(expansion,)g(with)g(an)
+630 518 y(asterisk)d(implicitly)h(app)s(ended.)37 b(This)23
+b(pattern)i(is)f(used)g(to)h(generate)h(a)e(list)h(of)g(matc)m(hing)630
+628 y(\014le)30 b(names)h(for)f(p)s(ossible)g(completions.)150
+791 y Fs(glob-expand-word)c(\(C-x)j(*\))630 900 y Ft(The)40
+b(w)m(ord)g(b)s(efore)g(p)s(oin)m(t)h(is)g(treated)g(as)g(a)g(pattern)g
+(for)f(pathname)g(expansion,)k(and)630 1010 y(the)c(list)g(of)f(matc)m
+(hing)i(\014le)e(names)g(is)h(inserted,)h(replacing)g(the)e(w)m(ord.)67
+b(If)39 b(a)h(n)m(umeric)630 1120 y(argumen)m(t)31 b(is)f(supplied,)g
+(a)g(`)p Fs(*)p Ft(')h(is)f(app)s(ended)f(b)s(efore)h(pathname)g
+(expansion.)150 1283 y Fs(glob-list-expansions)25 b(\(C-x)k(g\))630
+1392 y Ft(The)k(list)h(of)f(expansions)g(that)h(w)m(ould)f(ha)m(v)m(e)h
+(b)s(een)f(generated)h(b)m(y)f Fs(glob-expand-word)630
+1502 y Ft(is)h(displa)m(y)m(ed,)h(and)e(the)h(line)g(is)f(redra)m(wn.)
+50 b(If)33 b(a)h(n)m(umeric)g(argumen)m(t)g(is)f(supplied,)h(a)g(`)p
+Fs(*)p Ft(')630 1611 y(is)c(app)s(ended)f(b)s(efore)h(pathname)g
+(expansion.)150 1775 y Fs(display-shell-version)25 b(\(C-x)k(C-v\))630
+1884 y Ft(Displa)m(y)j(v)m(ersion)e(information)h(ab)s(out)f(the)h
+(curren)m(t)f(instance)h(of)f(Bash.)150 2047 y Fs(shell-expand-line)c
+(\(M-C-e\))630 2157 y Ft(Expand)34 b(the)h(line)h(as)g(the)f(shell)h
+(do)s(es.)55 b(This)34 b(p)s(erforms)g(alias)i(and)f(history)g
+(expansion)630 2266 y(as)f(w)m(ell)g(as)g(all)h(of)e(the)h(shell)g(w)m
+(ord)f(expansions)g(\(see)i(Section)f(3.5)h([Shell)e(Expansions],)630
+2376 y(page)e(17\).)150 2539 y Fs(history-expand-line)25
+b(\(M-^\))630 2649 y Ft(P)m(erform)30 b(history)h(expansion)f(on)g(the)
+h(curren)m(t)f(line.)150 2812 y Fs(magic-space)d(\(\))630
+2921 y Ft(P)m(erform)c(history)g(expansion)g(on)g(the)g(curren)m(t)g
+(line)g(and)g(insert)g(a)g(space)h(\(see)g(Section)g(9.3)630
+3031 y([History)31 b(In)m(teraction],)i(page)e(123\).)150
+3194 y Fs(alias-expand-line)26 b(\(\))630 3304 y Ft(P)m(erform)i(alias)
+i(expansion)e(on)g(the)h(curren)m(t)f(line)h(\(see)g(Section)g(6.6)h
+([Aliases],)g(page)f(79\).)150 3467 y Fs(history-and-alias-expand)o
+(-lin)o(e)24 b(\(\))630 3576 y Ft(P)m(erform)30 b(history)h(and)e
+(alias)j(expansion)e(on)g(the)h(curren)m(t)f(line.)150
+3740 y Fs(insert-last-argument)25 b(\(M-.)k(or)h(M-_\))630
+3849 y Ft(A)g(synon)m(ym)g(for)g Fs(yank-last-arg)p Ft(.)150
+4012 y Fs(operate-and-get-next)25 b(\(C-o\))630 4122
+y Ft(Accept)42 b(the)e(curren)m(t)h(line)f(for)h(execution)g(and)f
+(fetc)m(h)i(the)e(next)h(line)g(relativ)m(e)i(to)e(the)630
+4231 y(curren)m(t)30 b(line)h(from)f(the)g(history)h(for)f(editing.)41
+b(An)m(y)31 b(argumen)m(t)f(is)h(ignored.)150 4395 y
+Fs(edit-and-execute-command)24 b(\(C-xC-e\))630 4504
+y Ft(In)m(v)m(ok)m(e)34 b(an)f(editor)g(on)g(the)g(curren)m(t)f
+(command)h(line,)h(and)e(execute)i(the)f(result)g(as)g(shell)630
+4614 y(commands.)81 b(Bash)44 b(attempts)h(to)g(in)m(v)m(ok)m(e)h
+Fs($VISUAL)p Ft(,)f Fs($EDITOR)p Ft(,)h(and)d Fs(emacs)g
+Ft(as)h(the)630 4723 y(editor,)31 b(in)f(that)h(order.)150
+4961 y Fr(8.5)68 b(Readline)47 b(vi)e(Mo)t(de)150 5121
+y Ft(While)32 b(the)g(Readline)g(library)f(do)s(es)g(not)h(ha)m(v)m(e)h
+(a)f(full)f(set)h(of)g Fs(vi)f Ft(editing)h(functions,)f(it)h(do)s(es)g
+(con)m(tain)150 5230 y(enough)i(to)h(allo)m(w)g(simple)f(editing)h(of)f
+(the)g(line.)52 b(The)34 b(Readline)g Fs(vi)g Ft(mo)s(de)f(b)s(eha)m(v)
+m(es)i(as)f(sp)s(eci\014ed)f(in)150 5340 y(the)e Fl(posix)e
+Ft(1003.2)k(standard.)p eop end
+%%Page: 115 121
+TeXDict begin 115 120 bop 150 -116 a Ft(Chapter)30 b(8:)41
+b(Command)29 b(Line)i(Editing)2062 b(115)275 299 y(In)35
+b(order)g(to)i(switc)m(h)f(in)m(teractiv)m(ely)j(b)s(et)m(w)m(een)d
+Fs(emacs)f Ft(and)g Fs(vi)g Ft(editing)h(mo)s(des,)h(use)f(the)g(`)p
+Fs(set)30 b(-o)150 408 y(emacs)p Ft(')43 b(and)h(`)p
+Fs(set)30 b(-o)f(vi)p Ft(')44 b(commands)g(\(see)i(Section)f(4.3.1)h
+([The)e(Set)h(Builtin],)j(page)e(51\).)83 b(The)150 518
+y(Readline)31 b(default)g(is)f Fs(emacs)f Ft(mo)s(de.)275
+651 y(When)g(y)m(ou)i(en)m(ter)f(a)h(line)f(in)g Fs(vi)f
+Ft(mo)s(de,)h(y)m(ou)h(are)f(already)h(placed)f(in)g(`insertion')g(mo)s
+(de,)g(as)h(if)f(y)m(ou)150 760 y(had)f(t)m(yp)s(ed)g(an)g(`)p
+Fs(i)p Ft('.)41 b(Pressing)29 b Fs(ESC)f Ft(switc)m(hes)i(y)m(ou)g(in)m
+(to)h(`command')e(mo)s(de,)h(where)e(y)m(ou)i(can)g(edit)g(the)150
+870 y(text)35 b(of)f(the)g(line)g(with)f(the)h(standard)f
+Fs(vi)g Ft(mo)m(v)m(emen)m(t)j(k)m(eys,)g(mo)m(v)m(e)f(to)f(previous)g
+(history)f(lines)h(with)150 979 y(`)p Fs(k)p Ft(')d(and)e(subsequen)m
+(t)h(lines)h(with)f(`)p Fs(j)p Ft(',)g(and)g(so)h(forth.)150
+1208 y Fr(8.6)68 b(Programmable)47 b(Completion)150 1367
+y Ft(When)25 b(w)m(ord)g(completion)i(is)f(attempted)g(for)g(an)f
+(argumen)m(t)h(to)g(a)g(command)f(for)h(whic)m(h)f(a)h(completion)150
+1477 y(sp)s(eci\014cation)40 b(\(a)h Fq(compsp)s(ec)6
+b Ft(\))39 b(has)h(b)s(een)f(de\014ned)f(using)h(the)h
+Fs(complete)d Ft(builtin)j(\(see)g(Section)h(8.7)150
+1586 y([Programmable)h(Completion)f(Builtins],)k(page)d(117\),)j(the)c
+(programmable)g(completion)i(facilities)150 1696 y(are)31
+b(in)m(v)m(ok)m(ed.)275 1828 y(First,)23 b(the)e(command)g(name)g(is)h
+(iden)m(ti\014ed.)37 b(If)21 b(a)g(compsp)s(ec)g(has)g(b)s(een)f
+(de\014ned)g(for)h(that)h(command,)150 1938 y(the)44
+b(compsp)s(ec)g(is)g(used)f(to)h(generate)i(the)e(list)g(of)g(p)s
+(ossible)g(completions)h(for)e(the)h(w)m(ord.)81 b(If)44
+b(the)150 2048 y(command)36 b(w)m(ord)g(is)g(the)g(empt)m(y)h(string)f
+(\(completion)i(attempted)f(at)g(the)g(b)s(eginning)e(of)h(an)h(empt)m
+(y)150 2157 y(line\),)28 b(an)m(y)e(compsp)s(ec)f(de\014ned)g(with)g
+(the)h(`)p Fs(-E)p Ft(')f(option)i(to)f Fs(complete)e
+Ft(is)h(used.)39 b(If)25 b(the)h(command)f(w)m(ord)150
+2267 y(is)i(a)h(full)e(pathname,)i(a)g(compsp)s(ec)e(for)h(the)g(full)g
+(pathname)g(is)g(searc)m(hed)h(for)f(\014rst.)39 b(If)26
+b(no)h(compsp)s(ec)g(is)150 2376 y(found)22 b(for)g(the)h(full)g
+(pathname,)h(an)f(attempt)h(is)f(made)g(to)g(\014nd)f(a)h(compsp)s(ec)f
+(for)h(the)g(p)s(ortion)f(follo)m(wing)150 2486 y(the)34
+b(\014nal)g(slash.)53 b(If)34 b(those)g(searc)m(hes)i(do)e(not)g
+(result)h(in)f(a)g(compsp)s(ec,)h(an)m(y)g(compsp)s(ec)f(de\014ned)f
+(with)150 2595 y(the)e(`)p Fs(-D)p Ft(')f(option)h(to)g
+Fs(complete)d Ft(is)i(used)g(as)g(the)h(default.)275
+2728 y(Once)j(a)g(compsp)s(ec)g(has)g(b)s(een)f(found,)h(it)h(is)f
+(used)f(to)i(generate)h(the)e(list)h(of)f(matc)m(hing)h(w)m(ords.)51
+b(If)150 2838 y(a)37 b(compsp)s(ec)f(is)g(not)h(found,)f(the)h(default)
+f(Bash)h(completion)g(describ)s(ed)e(ab)s(o)m(v)m(e)j(\(see)f(Section)g
+(8.4.6)150 2947 y([Commands)30 b(F)-8 b(or)31 b(Completion],)g(page)g
+(110\))h(is)f(p)s(erformed.)275 3080 y(First,)g(the)g(actions)g(sp)s
+(eci\014ed)f(b)m(y)h(the)f(compsp)s(ec)h(are)g(used.)40
+b(Only)30 b(matc)m(hes)i(whic)m(h)e(are)h(pre\014xed)150
+3189 y(b)m(y)25 b(the)h(w)m(ord)f(b)s(eing)f(completed)j(are)e
+(returned.)38 b(When)25 b(the)h(`)p Fs(-f)p Ft(')f(or)g(`)p
+Fs(-d)p Ft(')g(option)h(is)f(used)g(for)g(\014lename)150
+3299 y(or)30 b(directory)h(name)f(completion,)i(the)e(shell)h(v)-5
+b(ariable)31 b Fs(FIGNORE)d Ft(is)i(used)f(to)i(\014lter)g(the)f(matc)m
+(hes.)42 b(See)150 3408 y(Section)31 b(5.2)h([Bash)e(V)-8
+b(ariables],)33 b(page)e(61,)g(for)f(a)h(description)g(of)f
+Fs(FIGNORE)p Ft(.)275 3541 y(An)m(y)f(completions)h(sp)s(eci\014ed)f(b)
+m(y)g(a)h(\014lename)f(expansion)h(pattern)f(to)h(the)g(`)p
+Fs(-G)p Ft(')f(option)h(are)f(gener-)150 3650 y(ated)h(next.)40
+b(The)29 b(w)m(ords)g(generated)h(b)m(y)f(the)h(pattern)f(need)g(not)g
+(matc)m(h)i(the)e(w)m(ord)g(b)s(eing)g(completed.)150
+3760 y(The)42 b Fs(GLOBIGNORE)d Ft(shell)k(v)-5 b(ariable)43
+b(is)f(not)h(used)e(to)i(\014lter)f(the)h(matc)m(hes,)j(but)c(the)g
+Fs(FIGNORE)f Ft(shell)150 3870 y(v)-5 b(ariable)31 b(is)g(used.)275
+4002 y(Next,)k(the)g(string)e(sp)s(eci\014ed)h(as)g(the)g(argumen)m(t)g
+(to)h(the)f(`)p Fs(-W)p Ft(')g(option)g(is)g(considered.)52
+b(The)33 b(string)150 4112 y(is)g(\014rst)e(split)i(using)f(the)h(c)m
+(haracters)h(in)e(the)h Fs(IFS)e Ft(sp)s(ecial)j(v)-5
+b(ariable)33 b(as)g(delimiters.)48 b(Shell)32 b(quoting)h(is)150
+4221 y(honored.)56 b(Eac)m(h)37 b(w)m(ord)e(is)h(then)f(expanded)g
+(using)h(brace)g(expansion,)h(tilde)f(expansion,)h(parameter)150
+4331 y(and)44 b(v)-5 b(ariable)46 b(expansion,)j(command)44
+b(substitution,)49 b(and)44 b(arithmetic)i(expansion,)j(as)c(describ)s
+(ed)150 4440 y(ab)s(o)m(v)m(e)38 b(\(see)f(Section)h(3.5)g([Shell)e
+(Expansions],)i(page)f(17\).)61 b(The)36 b(results)h(are)g(split)f
+(using)h(the)f(rules)150 4550 y(describ)s(ed)29 b(ab)s(o)m(v)m(e)i
+(\(see)f(Section)h(3.5.7)h([W)-8 b(ord)30 b(Splitting],)h(page)f(23\).)
+42 b(The)30 b(results)f(of)h(the)g(expansion)150 4660
+y(are)f(pre\014x-matc)m(hed)h(against)g(the)f(w)m(ord)g(b)s(eing)f
+(completed,)j(and)d(the)i(matc)m(hing)g(w)m(ords)e(b)s(ecome)i(the)150
+4769 y(p)s(ossible)g(completions.)275 4902 y(After)f(these)g(matc)m
+(hes)i(ha)m(v)m(e)f(b)s(een)f(generated,)h(an)m(y)g(shell)f(function)g
+(or)g(command)g(sp)s(eci\014ed)f(with)150 5011 y(the)i(`)p
+Fs(-F)p Ft(')g(and)f(`)p Fs(-C)p Ft(')h(options)g(is)g(in)m(v)m(ok)m
+(ed.)41 b(When)30 b(the)g(command)g(or)f(function)h(is)g(in)m(v)m(ok)m
+(ed,)h(the)f Fs(COMP_)150 5121 y(LINE)p Ft(,)42 b Fs(COMP_POINT)p
+Ft(,)d Fs(COMP_KEY)p Ft(,)i(and)e Fs(COMP_TYPE)f Ft(v)-5
+b(ariables)41 b(are)f(assigned)g(v)-5 b(alues)41 b(as)f(describ)s(ed)
+150 5230 y(ab)s(o)m(v)m(e)k(\(see)g(Section)f(5.2)h([Bash)f(V)-8
+b(ariables],)48 b(page)c(61\).)79 b(If)42 b(a)i(shell)f(function)f(is)h
+(b)s(eing)f(in)m(v)m(ok)m(ed,)150 5340 y(the)37 b Fs(COMP_WORDS)d
+Ft(and)i Fs(COMP_CWORD)e Ft(v)-5 b(ariables)38 b(are)f(also)h(set.)60
+b(When)37 b(the)g(function)f(or)h(command)p eop end
+%%Page: 116 122
+TeXDict begin 116 121 bop 150 -116 a Ft(116)2527 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y(is)42 b(in)m(v)m(ok)m(ed,)k(the)41
+b(\014rst)g(argumen)m(t)h(is)g(the)g(name)f(of)h(the)g(command)f(whose)
+h(argumen)m(ts)f(are)h(b)s(eing)150 408 y(completed,)d(the)d(second)g
+(argumen)m(t)h(is)f(the)g(w)m(ord)g(b)s(eing)g(completed,)i(and)e(the)g
+(third)f(argumen)m(t)i(is)150 518 y(the)28 b(w)m(ord)g(preceding)h(the)
+f(w)m(ord)g(b)s(eing)g(completed)h(on)f(the)h(curren)m(t)f(command)g
+(line.)40 b(No)29 b(\014ltering)g(of)150 628 y(the)i(generated)h
+(completions)h(against)f(the)f(w)m(ord)g(b)s(eing)g(completed)h(is)f(p)
+s(erformed;)f(the)h(function)g(or)150 737 y(command)f(has)g(complete)i
+(freedom)e(in)g(generating)i(the)f(matc)m(hes.)275 871
+y(An)m(y)g(function)h(sp)s(eci\014ed)f(with)g(`)p Fs(-F)p
+Ft(')h(is)g(in)m(v)m(ok)m(ed)h(\014rst.)44 b(The)31 b(function)h(ma)m
+(y)g(use)g(an)m(y)g(of)g(the)g(shell)150 981 y(facilities,)50
+b(including)44 b(the)h Fs(compgen)d Ft(and)i Fs(compopt)e
+Ft(builtins)i(describ)s(ed)f(b)s(elo)m(w)h(\(see)i(Section)f(8.7)150
+1090 y([Programmable)31 b(Completion)h(Builtins],)f(page)h(117\),)g(to)
+g(generate)g(the)f(matc)m(hes.)42 b(It)31 b(m)m(ust)g(put)f(the)150
+1200 y(p)s(ossible)g(completions)h(in)f(the)h Fs(COMPREPLY)d
+Ft(arra)m(y)j(v)-5 b(ariable.)275 1334 y(Next,)23 b(an)m(y)e(command)f
+(sp)s(eci\014ed)g(with)g(the)h(`)p Fs(-C)p Ft(')f(option)h(is)g(in)m(v)
+m(ok)m(ed)h(in)e(an)g(en)m(vironmen)m(t)h(equiv)-5 b(alen)m(t)150
+1443 y(to)26 b(command)e(substitution.)39 b(It)25 b(should)f(prin)m(t)h
+(a)g(list)h(of)f(completions,)i(one)e(p)s(er)f(line,)j(to)f(the)f
+(standard)150 1553 y(output.)40 b(Bac)m(kslash)32 b(ma)m(y)f(b)s(e)f
+(used)g(to)h(escap)s(e)g(a)f(newline,)h(if)f(necessary)-8
+b(.)275 1687 y(After)42 b(all)g(of)g(the)g(p)s(ossible)g(completions)h
+(are)f(generated,)k(an)m(y)c(\014lter)g(sp)s(eci\014ed)f(with)h(the)g
+(`)p Fs(-X)p Ft(')150 1797 y(option)34 b(is)f(applied)g(to)h(the)f
+(list.)49 b(The)33 b(\014lter)g(is)g(a)h(pattern)f(as)g(used)g(for)g
+(pathname)g(expansion;)h(a)g(`)p Fs(&)p Ft(')150 1906
+y(in)39 b(the)g(pattern)g(is)g(replaced)g(with)g(the)g(text)h(of)f(the)
+g(w)m(ord)g(b)s(eing)f(completed.)68 b(A)39 b(literal)h(`)p
+Fs(&)p Ft(')f(ma)m(y)150 2016 y(b)s(e)e(escap)s(ed)h(with)g(a)h(bac)m
+(kslash;)k(the)38 b(bac)m(kslash)h(is)f(remo)m(v)m(ed)h(b)s(efore)e
+(attempting)j(a)e(matc)m(h.)65 b(An)m(y)150 2125 y(completion)35
+b(that)g(matc)m(hes)g(the)f(pattern)g(will)g(b)s(e)g(remo)m(v)m(ed)h
+(from)e(the)h(list.)53 b(A)34 b(leading)g(`)p Fs(!)p
+Ft(')h(negates)150 2235 y(the)c(pattern;)f(in)g(this)h(case)g(an)m(y)g
+(completion)g(not)g(matc)m(hing)h(the)e(pattern)h(will)f(b)s(e)g(remo)m
+(v)m(ed.)275 2369 y(Finally)-8 b(,)33 b(an)m(y)f(pre\014x)f(and)g
+(su\016x)g(sp)s(eci\014ed)g(with)h(the)g(`)p Fs(-P)p
+Ft(')f(and)g(`)p Fs(-S)p Ft(')h(options)g(are)g(added)f(to)i(eac)m(h)
+150 2478 y(mem)m(b)s(er)e(of)g(the)h(completion)h(list,)f(and)f(the)h
+(result)f(is)h(returned)e(to)i(the)g(Readline)g(completion)h(co)s(de)
+150 2588 y(as)e(the)f(list)h(of)g(p)s(ossible)f(completions.)275
+2722 y(If)22 b(the)i(previously-applied)f(actions)i(do)e(not)h
+(generate)h(an)m(y)f(matc)m(hes,)i(and)d(the)g(`)p Fs(-o)30
+b(dirnames)p Ft(')22 b(op-)150 2832 y(tion)29 b(w)m(as)f(supplied)f(to)
+i Fs(complete)d Ft(when)h(the)h(compsp)s(ec)g(w)m(as)g(de\014ned,)g
+(directory)g(name)h(completion)150 2941 y(is)h(attempted.)275
+3075 y(If)g(the)i(`)p Fs(-o)e(plusdirs)p Ft(')f(option)j(w)m(as)f
+(supplied)f(to)i Fs(complete)e Ft(when)g(the)h(compsp)s(ec)g(w)m(as)h
+(de\014ned,)150 3185 y(directory)k(name)f(completion)i(is)e(attempted)h
+(and)f(an)m(y)h(matc)m(hes)g(are)g(added)f(to)h(the)f(results)g(of)h
+(the)150 3294 y(other)31 b(actions.)275 3428 y(By)g(default,)i(if)e(a)h
+(compsp)s(ec)f(is)h(found,)f(whatev)m(er)h(it)g(generates)h(is)e
+(returned)g(to)h(the)g(completion)150 3538 y(co)s(de)21
+b(as)g(the)g(full)g(set)g(of)g(p)s(ossible)f(completions.)39
+b(The)20 b(default)h(Bash)g(completions)h(are)g(not)f(attempted,)150
+3647 y(and)k(the)h(Readline)g(default)g(of)g(\014lename)g(completion)h
+(is)f(disabled.)38 b(If)26 b(the)g(`)p Fs(-o)k(bashdefault)p
+Ft(')22 b(option)150 3757 y(w)m(as)i(supplied)e(to)j
+Fs(complete)c Ft(when)i(the)g(compsp)s(ec)h(w)m(as)g(de\014ned,)g(the)f
+(default)h(Bash)g(completions)h(are)150 3867 y(attempted)f(if)f(the)g
+(compsp)s(ec)g(generates)i(no)e(matc)m(hes.)39 b(If)23
+b(the)g(`)p Fs(-o)30 b(default)p Ft(')21 b(option)j(w)m(as)f(supplied)f
+(to)150 3976 y Fs(complete)j Ft(when)h(the)h(compsp)s(ec)f(w)m(as)i
+(de\014ned,)e(Readline's)i(default)f(completion)h(will)f(b)s(e)f(p)s
+(erformed)150 4086 y(if)k(the)h(compsp)s(ec)f(\(and,)g(if)h(attempted,)
+g(the)g(default)f(Bash)h(completions\))h(generate)g(no)e(matc)m(hes.)
+275 4220 y(When)20 b(a)i(compsp)s(ec)e(indicates)i(that)g(directory)g
+(name)f(completion)h(is)f(desired,)i(the)e(programmable)150
+4329 y(completion)31 b(functions)e(force)i(Readline)f(to)h(app)s(end)d
+(a)i(slash)g(to)g(completed)h(names)e(whic)m(h)h(are)g(sym-)150
+4439 y(b)s(olic)40 b(links)g(to)h(directories,)j(sub)5
+b(ject)40 b(to)h(the)f(v)-5 b(alue)41 b(of)f(the)g Fq(mark-directories)
+45 b Ft(Readline)c(v)-5 b(ariable,)150 4548 y(regardless)31
+b(of)f(the)h(setting)g(of)g(the)f Fq(mark-symlink)m(ed-directories)36
+b Ft(Readline)31 b(v)-5 b(ariable.)275 4682 y(There)25
+b(is)i(some)g(supp)s(ort)e(for)h(dynamically)h(mo)s(difying)f
+(completions.)40 b(This)26 b(is)g(most)h(useful)f(when)150
+4792 y(used)37 b(in)h(com)m(bination)h(with)e(a)i(default)f(completion)
+h(sp)s(eci\014ed)e(with)h(`)p Fs(-D)p Ft('.)63 b(It's)38
+b(p)s(ossible)f(for)h(shell)150 4902 y(functions)28 b(executed)h(as)f
+(completion)i(handlers)d(to)i(indicate)g(that)g(completion)g(should)e
+(b)s(e)h(retried)g(b)m(y)150 5011 y(returning)j(an)i(exit)g(status)f
+(of)h(124.)48 b(If)31 b(a)i(shell)f(function)g(returns)f(124,)k(and)c
+(c)m(hanges)j(the)e(compsp)s(ec)150 5121 y(asso)s(ciated)43
+b(with)e(the)g(command)g(on)g(whic)m(h)g(completion)i(is)e(b)s(eing)g
+(attempted)h(\(supplied)e(as)i(the)150 5230 y(\014rst)29
+b(argumen)m(t)h(when)e(the)i(function)f(is)g(executed\),)j
+(programmable)d(completion)i(restarts)f(from)f(the)150
+5340 y(b)s(eginning,)40 b(with)e(an)h(attempt)g(to)h(\014nd)d(a)i
+(compsp)s(ec)f(for)g(that)h(command.)65 b(This)38 b(allo)m(ws)i(a)f
+(set)g(of)p eop end
+%%Page: 117 123
+TeXDict begin 117 122 bop 150 -116 a Ft(Chapter)30 b(8:)41
+b(Command)29 b(Line)i(Editing)2062 b(117)150 299 y(completions)33
+b(to)f(b)s(e)g(built)f(dynamically)i(as)f(completion)h(is)f(attempted,)
+h(rather)f(than)f(b)s(eing)g(loaded)150 408 y(all)g(at)g(once.)275
+564 y(F)-8 b(or)38 b(instance,)h(assuming)e(that)h(there)f(is)h(a)f
+(library)g(of)g(compsp)s(ecs,)i(eac)m(h)g(k)m(ept)e(in)g(a)h(\014le)f
+(corre-)150 673 y(sp)s(onding)g(to)j(the)f(name)f(of)h(the)g(command,)i
+(the)e(follo)m(wing)h(default)f(completion)h(function)e(w)m(ould)150
+783 y(load)31 b(completions)g(dynamically:)390 938 y
+Fs(_completion_loader\(\))390 1048 y({)390 1157 y(.)47
+b("/etc/bash_completion.d/$1)o(.sh")41 b(>/dev/null)k(2>&1)i(&&)g
+(return)f(124)390 1267 y(})390 1376 y(complete)g(-D)h(-F)g
+(_completion_loader)150 1640 y Fr(8.7)68 b(Programmable)47
+b(Completion)f(Builtins)150 1799 y Ft(Tw)m(o)27 b(builtin)g(commands)g
+(are)g(a)m(v)-5 b(ailable)29 b(to)f(manipulate)g(the)f(programmable)g
+(completion)h(facilities.)150 1990 y Fs(compgen)870 2134
+y(compgen)46 b([)p Fi(option)11 b Fs(])45 b([)p Fi(word)11
+b Fs(])630 2279 y Ft(Generate)27 b(p)s(ossible)e(completion)i(matc)m
+(hes)g(for)e Fq(w)m(ord)k Ft(according)e(to)f(the)g Fq(option)p
+Ft(s,)h(whic)m(h)630 2389 y(ma)m(y)h(b)s(e)f(an)m(y)h(option)g
+(accepted)h(b)m(y)e(the)h Fs(complete)d Ft(builtin)j(with)f(the)h
+(exception)g(of)g(`)p Fs(-p)p Ft(')630 2498 y(and)k(`)p
+Fs(-r)p Ft(',)i(and)e(write)h(the)g(matc)m(hes)h(to)g(the)f(standard)f
+(output.)48 b(When)33 b(using)f(the)h(`)p Fs(-F)p Ft(')630
+2608 y(or)28 b(`)p Fs(-C)p Ft(')g(options,)h(the)f(v)-5
+b(arious)29 b(shell)f(v)-5 b(ariables)29 b(set)f(b)m(y)g(the)g
+(programmable)h(completion)630 2718 y(facilities,)k(while)d(a)m(v)-5
+b(ailable,)33 b(will)e(not)g(ha)m(v)m(e)g(useful)f(v)-5
+b(alues.)630 2862 y(The)34 b(matc)m(hes)h(will)g(b)s(e)f(generated)h
+(in)f(the)h(same)g(w)m(a)m(y)g(as)g(if)f(the)h(programmable)f(com-)630
+2972 y(pletion)d(co)s(de)g(had)f(generated)i(them)e(directly)i(from)e
+(a)h(completion)h(sp)s(eci\014cation)f(with)630 3082
+y(the)e(same)h(\015ags.)40 b(If)29 b Fq(w)m(ord)j Ft(is)d(sp)s
+(eci\014ed,)g(only)g(those)h(completions)g(matc)m(hing)g
+Fq(w)m(ord)j Ft(will)630 3191 y(b)s(e)d(displa)m(y)m(ed.)630
+3336 y(The)24 b(return)g(v)-5 b(alue)25 b(is)g(true)f(unless)g(an)h(in)
+m(v)-5 b(alid)25 b(option)g(is)g(supplied,)f(or)h(no)g(matc)m(hes)g(w)m
+(ere)630 3446 y(generated.)150 3626 y Fs(complete)870
+3770 y(complete)46 b([-abcdefgjksuv])d([-o)k Fi(comp-option)11
+b Fs(])44 b([-DE])i([-A)h Fi(action)11 b Fs(])46 b([-)870
+3880 y(G)h Fi(globpat)11 b Fs(])46 b([-W)g Fi(wordlist)11
+b Fs(])870 3990 y([-F)47 b Fi(function)11 b Fs(])45 b([-C)i
+Fi(command)11 b Fs(])45 b([-X)i Fi(filterpat)11 b Fs(])870
+4099 y([-P)47 b Fi(prefix)11 b Fs(])45 b([-S)i Fi(suffix)11
+b Fs(])45 b Fi(name)58 b Fs([)p Fi(name)f Fs(...)o(])870
+4209 y(complete)46 b(-pr)g([-DE])h([)p Fi(name)57 b Fs(...)o(])630
+4354 y Ft(Sp)s(ecify)33 b(ho)m(w)h(argumen)m(ts)h(to)f(eac)m(h)i
+Fq(name)j Ft(should)33 b(b)s(e)g(completed.)53 b(If)33
+b(the)i(`)p Fs(-p)p Ft(')e(option)630 4463 y(is)d(supplied,)e(or)i(if)g
+(no)f(options)h(are)g(supplied,)f(existing)h(completion)h(sp)s
+(eci\014cations)g(are)630 4573 y(prin)m(ted)43 b(in)h(a)g(w)m(a)m(y)h
+(that)f(allo)m(ws)h(them)f(to)g(b)s(e)g(reused)f(as)h(input.)80
+b(The)43 b(`)p Fs(-r)p Ft(')g(option)630 4682 y(remo)m(v)m(es)29
+b(a)e(completion)i(sp)s(eci\014cation)e(for)g(eac)m(h)i
+Fq(name)5 b Ft(,)28 b(or,)g(if)f(no)g Fq(name)5 b Ft(s)27
+b(are)h(supplied,)630 4792 y(all)46 b(completion)h(sp)s
+(eci\014cations.)87 b(The)45 b(`)p Fs(-D)p Ft(')h(option)g(indicates)g
+(that)g(the)g(remaining)630 4902 y(options)35 b(and)f(actions)h(should)
+f(apply)g(to)h(the)g(\\default")g(command)f(completion;)k(that)630
+5011 y(is,)25 b(completion)g(attempted)g(on)e(a)h(command)f(for)g(whic)
+m(h)h(no)f(completion)i(has)e(previously)630 5121 y(b)s(een)28
+b(de\014ned.)39 b(The)27 b(`)p Fs(-E)p Ft(')i(option)g(indicates)g
+(that)g(the)g(remaining)f(options)h(and)f(actions)630
+5230 y(should)i(apply)i(to)g(\\empt)m(y")g(command)g(completion;)h
+(that)f(is,)g(completion)h(attempted)630 5340 y(on)d(a)h(blank)f(line.)
+p eop end
+%%Page: 118 124
+TeXDict begin 118 123 bop 150 -116 a Ft(118)2527 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y(The)e(pro)s(cess)g(of)h(applying)g
+(these)g(completion)g(sp)s(eci\014cations)h(when)d(w)m(ord)i
+(completion)630 408 y(is)35 b(attempted)h(is)f(describ)s(ed)f(ab)s(o)m
+(v)m(e)j(\(see)f(Section)g(8.6)g([Programmable)g(Completion],)630
+518 y(page)31 b(115\).)42 b(The)30 b(`)p Fs(-D)p Ft(')h(option)f(tak)m
+(es)i(precedence)f(o)m(v)m(er)h(`)p Fs(-E)p Ft('.)630
+656 y(Other)41 b(options,)46 b(if)41 b(sp)s(eci\014ed,)j(ha)m(v)m(e)f
+(the)f(follo)m(wing)i(meanings.)75 b(The)41 b(argumen)m(ts)h(to)630
+766 y(the)e(`)p Fs(-G)p Ft(',)j(`)p Fs(-W)p Ft(',)g(and)d(`)p
+Fs(-X)p Ft(')g(options)g(\(and,)j(if)d(necessary)-8 b(,)44
+b(the)c(`)p Fs(-P)p Ft(')h(and)e(`)p Fs(-S)p Ft(')h(options\))630
+875 y(should)30 b(b)s(e)h(quoted)g(to)h(protect)g(them)f(from)g
+(expansion)g(b)s(efore)g(the)g Fs(complete)e Ft(builtin)630
+985 y(is)h(in)m(v)m(ok)m(ed.)630 1151 y Fs(-o)g Fi(comp-option)1110
+1261 y Ft(The)c Fq(comp-option)i Ft(con)m(trols)g(sev)m(eral)h(asp)s
+(ects)e(of)g(the)g(compsp)s(ec's)g(b)s(eha)m(v-)1110
+1370 y(ior)g(b)s(ey)m(ond)f(the)g(simple)h(generation)h(of)e
+(completions.)41 b Fq(comp-option)27 b Ft(ma)m(y)1110
+1480 y(b)s(e)j(one)g(of:)1110 1646 y Fs(bashdefault)1590
+1756 y Ft(P)m(erform)d(the)h(rest)f(of)h(the)g(default)f(Bash)h
+(completions)g(if)g(the)1590 1866 y(compsp)s(ec)i(generates)i(no)e
+(matc)m(hes.)1110 2032 y Fs(default)144 b Ft(Use)22 b(Readline's)g
+(default)g(\014lename)g(completion)g(if)g(the)g(comp-)1590
+2142 y(sp)s(ec)30 b(generates)i(no)e(matc)m(hes.)1110
+2308 y Fs(dirnames)96 b Ft(P)m(erform)46 b(directory)g(name)h
+(completion)g(if)f(the)g(compsp)s(ec)1590 2418 y(generates)32
+b(no)e(matc)m(hes.)1110 2584 y Fs(filenames)1590 2694
+y Ft(T)-8 b(ell)40 b(Readline)f(that)h(the)f(compsp)s(ec)f(generates)j
+(\014lenames,)1590 2803 y(so)29 b(it)h(can)f(p)s(erform)f(an)m(y)h
+(\014lename-sp)s(eci\014c)h(pro)s(cessing)e(\(lik)m(e)1590
+2913 y(adding)d(a)h(slash)f(to)h(directory)g(names)f(quoting)h(sp)s
+(ecial)g(c)m(har-)1590 3022 y(acters,)39 b(or)d(suppressing)f(trailing)
+i(spaces\).)59 b(This)35 b(option)i(is)1590 3132 y(in)m(tended)30
+b(to)g(b)s(e)g(used)f(with)g(shell)i(functions)e(sp)s(eci\014ed)g(with)
+1590 3242 y(`)p Fs(-F)p Ft('.)1110 3408 y Fs(nospace)144
+b Ft(T)-8 b(ell)40 b(Readline)g(not)g(to)g(app)s(end)d(a)j(space)g
+(\(the)f(default\))h(to)1590 3518 y(w)m(ords)30 b(completed)h(at)g(the)
+g(end)f(of)g(the)h(line.)1110 3684 y Fs(plusdirs)96 b
+Ft(After)30 b(an)m(y)h(matc)m(hes)g(de\014ned)d(b)m(y)i(the)g(compsp)s
+(ec)g(are)g(gener-)1590 3794 y(ated,)g(directory)f(name)g(completion)i
+(is)d(attempted)i(and)f(an)m(y)1590 3903 y(matc)m(hes)j(are)e(added)g
+(to)h(the)g(results)f(of)g(the)h(other)g(actions.)630
+4070 y Fs(-A)f Fi(action)1110 4179 y Ft(The)25 b Fq(action)h
+Ft(ma)m(y)g(b)s(e)e(one)h(of)h(the)f(follo)m(wing)i(to)e(generate)i(a)e
+(list)h(of)f(p)s(ossible)1110 4289 y(completions:)1110
+4455 y Fs(alias)240 b Ft(Alias)31 b(names.)41 b(Ma)m(y)31
+b(also)h(b)s(e)e(sp)s(eci\014ed)f(as)i(`)p Fs(-a)p Ft('.)1110
+4622 y Fs(arrayvar)96 b Ft(Arra)m(y)31 b(v)-5 b(ariable)31
+b(names.)1110 4788 y Fs(binding)144 b Ft(Readline)30
+b(k)m(ey)f(binding)f(names)h(\(see)h(Section)f(8.4)h([Bindable)1590
+4898 y(Readline)h(Commands],)f(page)h(106\).)1110 5064
+y Fs(builtin)144 b Ft(Names)21 b(of)g(shell)f(builtin)h(commands.)37
+b(Ma)m(y)21 b(also)h(b)s(e)e(sp)s(eci\014ed)1590 5174
+y(as)31 b(`)p Fs(-b)p Ft('.)1110 5340 y Fs(command)144
+b Ft(Command)29 b(names.)41 b(Ma)m(y)32 b(also)f(b)s(e)f(sp)s
+(eci\014ed)f(as)i(`)p Fs(-c)p Ft('.)p eop end
+%%Page: 119 125
+TeXDict begin 119 124 bop 150 -116 a Ft(Chapter)30 b(8:)41
+b(Command)29 b(Line)i(Editing)2062 b(119)1110 299 y Fs(directory)1590
+408 y Ft(Directory)32 b(names.)40 b(Ma)m(y)32 b(also)f(b)s(e)f(sp)s
+(eci\014ed)g(as)g(`)p Fs(-d)p Ft('.)1110 573 y Fs(disabled)96
+b Ft(Names)31 b(of)g(disabled)f(shell)g(builtins.)1110
+737 y Fs(enabled)144 b Ft(Names)31 b(of)g(enabled)f(shell)g(builtins.)
+1110 902 y Fs(export)192 b Ft(Names)34 b(of)f(exp)s(orted)f(shell)h(v)
+-5 b(ariables.)49 b(Ma)m(y)35 b(also)e(b)s(e)g(sp)s(eci-)1590
+1011 y(\014ed)d(as)g(`)p Fs(-e)p Ft('.)1110 1176 y Fs(file)288
+b Ft(File)32 b(names.)40 b(Ma)m(y)32 b(also)f(b)s(e)f(sp)s(eci\014ed)f
+(as)i(`)p Fs(-f)p Ft('.)1110 1340 y Fs(function)96 b
+Ft(Names)31 b(of)g(shell)f(functions.)1110 1504 y Fs(group)240
+b Ft(Group)30 b(names.)40 b(Ma)m(y)32 b(also)f(b)s(e)f(sp)s(eci\014ed)g
+(as)g(`)p Fs(-g)p Ft('.)1110 1669 y Fs(helptopic)1590
+1778 y Ft(Help)37 b(topics)g(as)g(accepted)h(b)m(y)e(the)h
+Fs(help)f Ft(builtin)g(\(see)h(Sec-)1590 1888 y(tion)31
+b(4.2)g([Bash)g(Builtins],)g(page)g(41\).)1110 2052 y
+Fs(hostname)96 b Ft(Hostnames,)89 b(as)76 b(tak)m(en)h(from)f(the)g
+(\014le)h(sp)s(eci\014ed)e(b)m(y)1590 2162 y(the)55 b
+Fs(HOSTFILE)e Ft(shell)j(v)-5 b(ariable)56 b(\(see)g(Section)g(5.2)h
+([Bash)1590 2271 y(V)-8 b(ariables],)32 b(page)f(61\).)1110
+2436 y Fs(job)336 b Ft(Job)31 b(names,)h(if)g(job)f(con)m(trol)i(is)f
+(activ)m(e.)46 b(Ma)m(y)33 b(also)g(b)s(e)e(sp)s(eci-)1590
+2545 y(\014ed)f(as)g(`)p Fs(-j)p Ft('.)1110 2710 y Fs(keyword)144
+b Ft(Shell)30 b(reserv)m(ed)h(w)m(ords.)40 b(Ma)m(y)32
+b(also)f(b)s(e)f(sp)s(eci\014ed)f(as)i(`)p Fs(-k)p Ft('.)1110
+2874 y Fs(running)144 b Ft(Names)31 b(of)g(running)d(jobs,)i(if)h(job)f
+(con)m(trol)h(is)g(activ)m(e.)1110 3039 y Fs(service)144
+b Ft(Service)31 b(names.)41 b(Ma)m(y)31 b(also)g(b)s(e)f(sp)s
+(eci\014ed)g(as)g(`)p Fs(-s)p Ft('.)1110 3203 y Fs(setopt)192
+b Ft(V)-8 b(alid)34 b(argumen)m(ts)f(for)f(the)h(`)p
+Fs(-o)p Ft(')g(option)g(to)h(the)f Fs(set)e Ft(builtin)1590
+3313 y(\(see)g(Section)h(4.3.1)g([The)e(Set)g(Builtin],)i(page)f(51\).)
+1110 3477 y Fs(shopt)240 b Ft(Shell)40 b(option)g(names)g(as)g
+(accepted)i(b)m(y)e(the)g Fs(shopt)e Ft(builtin)1590
+3587 y(\(see)31 b(Section)h(4.2)f([Bash)g(Builtins],)g(page)g(41\).)
+1110 3751 y Fs(signal)192 b Ft(Signal)31 b(names.)1110
+3915 y Fs(stopped)144 b Ft(Names)31 b(of)g(stopp)s(ed)e(jobs,)h(if)g
+(job)g(con)m(trol)i(is)f(activ)m(e.)1110 4080 y Fs(user)288
+b Ft(User)30 b(names.)41 b(Ma)m(y)32 b(also)f(b)s(e)f(sp)s(eci\014ed)f
+(as)i(`)p Fs(-u)p Ft('.)1110 4244 y Fs(variable)96 b
+Ft(Names)36 b(of)g(all)g(shell)g(v)-5 b(ariables.)56
+b(Ma)m(y)37 b(also)f(b)s(e)f(sp)s(eci\014ed)g(as)1590
+4354 y(`)p Fs(-v)p Ft('.)630 4518 y Fs(-G)30 b Fi(globpat)1110
+4628 y Ft(The)39 b(\014lename)h(expansion)g(pattern)g
+Fq(globpat)j Ft(is)d(expanded)f(to)h(generate)1110 4737
+y(the)31 b(p)s(ossible)e(completions.)630 4902 y Fs(-W)h
+Fi(wordlist)1110 5011 y Ft(The)24 b Fq(w)m(ordlist)k
+Ft(is)d(split)g(using)f(the)h(c)m(haracters)i(in)d(the)i
+Fs(IFS)e Ft(sp)s(ecial)h(v)-5 b(ariable)1110 5121 y(as)36
+b(delimiters,)i(and)e(eac)m(h)h(resultan)m(t)g(w)m(ord)e(is)h
+(expanded.)57 b(The)35 b(p)s(ossible)1110 5230 y(completions)c(are)e
+(the)h(mem)m(b)s(ers)f(of)g(the)h(resultan)m(t)g(list)g(whic)m(h)f
+(matc)m(h)i(the)1110 5340 y(w)m(ord)f(b)s(eing)g(completed.)p
+eop end
+%%Page: 120 126
+TeXDict begin 120 125 bop 150 -116 a Ft(120)2527 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y Fs(-C)f Fi(command)1110
+408 y Fq(command)35 b Ft(is)e(executed)g(in)e(a)i(subshell)e(en)m
+(vironmen)m(t,)i(and)f(its)g(output)g(is)1110 518 y(used)e(as)g(the)h
+(p)s(ossible)f(completions.)630 677 y Fs(-F)g Fi(function)1110
+787 y Ft(The)25 b(shell)i(function)e Fq(function)h Ft(is)g(executed)h
+(in)e(the)i(curren)m(t)e(shell)i(en)m(viron-)1110 897
+y(men)m(t.)40 b(When)25 b(it)h(\014nishes,)f(the)h(p)s(ossible)f
+(completions)h(are)g(retriev)m(ed)g(from)1110 1006 y(the)31
+b(v)-5 b(alue)30 b(of)h(the)g Fs(COMPREPLY)c Ft(arra)m(y)k(v)-5
+b(ariable.)630 1166 y Fs(-X)30 b Fi(filterpat)1110 1275
+y Fq(\014lterpat)d Ft(is)e(a)g(pattern)g(as)f(used)g(for)h(\014lename)g
+(expansion.)38 b(It)25 b(is)g(applied)f(to)1110 1385
+y(the)30 b(list)f(of)h(p)s(ossible)f(completions)h(generated)h(b)m(y)e
+(the)g(preceding)h(options)1110 1494 y(and)d(argumen)m(ts,)i(and)e(eac)
+m(h)i(completion)g(matc)m(hing)g Fq(\014lterpat)h Ft(is)e(remo)m(v)m
+(ed)1110 1604 y(from)i(the)h(list.)42 b(A)30 b(leading)i(`)p
+Fs(!)p Ft(')e(in)g Fq(\014lterpat)j Ft(negates)f(the)f(pattern;)g(in)f
+(this)1110 1714 y(case,)i(an)m(y)e(completion)i(not)f(matc)m(hing)g
+Fq(\014lterpat)i Ft(is)d(remo)m(v)m(ed.)630 1873 y Fs(-P)g
+Fi(prefix)1110 1983 y Fq(pre\014x)39 b Ft(is)34 b(added)f(at)i(the)f(b)
+s(eginning)f(of)i(eac)m(h)g(p)s(ossible)e(completion)i(after)1110
+2092 y(all)c(other)g(options)g(ha)m(v)m(e)g(b)s(een)f(applied.)630
+2252 y Fs(-S)g Fi(suffix)1110 2361 y Fq(su\016x)c Ft(is)20
+b(app)s(ended)f(to)i(eac)m(h)h(p)s(ossible)e(completion)i(after)f(all)g
+(other)g(options)1110 2471 y(ha)m(v)m(e)32 b(b)s(een)d(applied.)630
+2630 y(The)35 b(return)g(v)-5 b(alue)37 b(is)f(true)f(unless)h(an)f(in)
+m(v)-5 b(alid)37 b(option)f(is)g(supplied,)g(an)g(option)h(other)630
+2740 y(than)31 b(`)p Fs(-p)p Ft(')g(or)g(`)p Fs(-r)p
+Ft(')g(is)g(supplied)f(without)h(a)g Fq(name)37 b Ft(argumen)m(t,)32
+b(an)f(attempt)h(is)f(made)g(to)630 2849 y(remo)m(v)m(e)h(a)e
+(completion)i(sp)s(eci\014cation)f(for)f(a)h Fq(name)k
+Ft(for)30 b(whic)m(h)g(no)g(sp)s(eci\014cation)h(exists,)630
+2959 y(or)f(an)h(error)f(o)s(ccurs)g(adding)g(a)g(completion)i(sp)s
+(eci\014cation.)150 3118 y Fs(compopt)870 3253 y(compopt)46
+b([-o)h Fi(option)11 b Fs(])45 b([-DE])h([+o)h Fi(option)11
+b Fs(])46 b([)p Fi(name)11 b Fs(])630 3387 y Ft(Mo)s(dify)33
+b(completion)h(options)g(for)f(eac)m(h)h Fq(name)39 b
+Ft(according)34 b(to)g(the)f Fq(option)p Ft(s,)i(or)e(for)g(the)630
+3497 y(curren)m(tly-execution)46 b(completion)f(if)f(no)f
+Fq(name)5 b Ft(s)44 b(are)h(supplied.)80 b(If)43 b(no)h
+Fq(option)p Ft(s)h(are)630 3606 y(giv)m(en,)30 b(displa)m(y)e(the)g
+(completion)h(options)g(for)e(eac)m(h)i Fq(name)34 b
+Ft(or)27 b(the)i(curren)m(t)e(completion.)630 3716 y(The)f(p)s(ossible)
+g(v)-5 b(alues)27 b(of)f Fq(option)h Ft(are)g(those)g(v)-5
+b(alid)26 b(for)g(the)h Fs(complete)d Ft(builtin)i(describ)s(ed)630
+3826 y(ab)s(o)m(v)m(e.)40 b(The)23 b(`)p Fs(-D)p Ft(')i(option)f
+(indicates)h(that)g(the)f(remaining)g(options)h(should)e(apply)h(to)h
+(the)630 3935 y(\\default")33 b(command)f(completion;)i(that)f(is,)g
+(completion)g(attempted)g(on)f(a)g(command)630 4045 y(for)c(whic)m(h)f
+(no)h(completion)h(has)f(previously)g(b)s(een)f(de\014ned.)38
+b(The)28 b(`)p Fs(-E)p Ft(')g(option)g(indicates)630
+4154 y(that)c(the)g(remaining)g(options)g(should)e(apply)h(to)i(\\empt)
+m(y")g(command)e(completion;)k(that)630 4264 y(is,)k(completion)g
+(attempted)h(on)e(a)h(blank)f(line.)630 4399 y(The)g(`)p
+Fs(-D)p Ft(')g(option)h(tak)m(es)h(precedence)f(o)m(v)m(er)g(`)p
+Fs(-E)p Ft('.)630 4533 y(The)23 b(return)g(v)-5 b(alue)25
+b(is)f(true)g(unless)f(an)h(in)m(v)-5 b(alid)24 b(option)h(is)f
+(supplied,)g(an)g(attempt)h(is)f(made)630 4643 y(to)32
+b(mo)s(dify)f(the)g(options)h(for)f(a)h Fq(name)k Ft(for)31
+b(whic)m(h)g(no)g(completion)i(sp)s(eci\014cation)f(exists,)630
+4752 y(or)e(an)h(output)f(error)g(o)s(ccurs.)p eop end
+%%Page: 121 127
+TeXDict begin 121 126 bop 150 -116 a Ft(Chapter)30 b(9:)41
+b(Using)30 b(History)h(In)m(teractiv)m(ely)1925 b(121)150
+299 y Fo(9)80 b(Using)53 b(History)g(In)l(teractiv)l(ely)150
+572 y Ft(This)42 b(c)m(hapter)h(describ)s(es)f(ho)m(w)g(to)h(use)g(the)
+f Fl(gnu)h Ft(History)g(Library)e(in)m(teractiv)m(ely)-8
+b(,)50 b(from)42 b(a)h(user's)150 681 y(standp)s(oin)m(t.)76
+b(It)42 b(should)f(b)s(e)h(considered)g(a)g(user's)g(guide.)76
+b(F)-8 b(or)43 b(information)f(on)g(using)g(the)g Fl(gnu)150
+791 y Ft(History)31 b(Library)f(in)g(other)g(programs,)g(see)h(the)g
+Fl(gnu)f Ft(Readline)h(Library)f(Man)m(ual.)150 1042
+y Fr(9.1)68 b(Bash)45 b(History)h(F)-11 b(acilities)150
+1202 y Ft(When)40 b(the)h(`)p Fs(-o)30 b(history)p Ft(')38
+b(option)j(to)g(the)g Fs(set)e Ft(builtin)h(is)h(enabled)f(\(see)h
+(Section)g(4.3.1)i([The)d(Set)150 1311 y(Builtin],)32
+b(page)g(51\),)h(the)e(shell)h(pro)m(vides)f(access)h(to)g(the)f
+Fq(command)g(history)p Ft(,)h(the)f(list)h(of)f(commands)150
+1421 y(previously)h(t)m(yp)s(ed.)47 b(The)33 b(v)-5 b(alue)33
+b(of)f(the)h Fs(HISTSIZE)e Ft(shell)h(v)-5 b(ariable)34
+b(is)f(used)e(as)i(the)g(n)m(um)m(b)s(er)e(of)i(com-)150
+1531 y(mands)i(to)i(sa)m(v)m(e)h(in)e(a)g(history)h(list.)58
+b(The)36 b(text)h(of)g(the)f(last)h Fs($HISTSIZE)d Ft(commands)i
+(\(default)g(500\))150 1640 y(is)h(sa)m(v)m(ed.)61 b(The)36
+b(shell)h(stores)h(eac)m(h)g(command)e(in)h(the)g(history)g(list)g
+(prior)f(to)i(parameter)f(and)f(v)-5 b(ari-)150 1750
+y(able)33 b(expansion)g(but)f(after)h(history)f(expansion)h(is)g(p)s
+(erformed,)e(sub)5 b(ject)33 b(to)g(the)g(v)-5 b(alues)33
+b(of)g(the)g(shell)150 1859 y(v)-5 b(ariables)31 b Fs(HISTIGNORE)d
+Ft(and)h Fs(HISTCONTROL)p Ft(.)275 2007 y(When)g(the)g(shell)h(starts)g
+(up,)f(the)h(history)f(is)h(initialized)h(from)e(the)h(\014le)f(named)g
+(b)m(y)h(the)f Fs(HISTFILE)150 2116 y Ft(v)-5 b(ariable)21
+b(\(default)h(`)p Fs(~/.bash_history)p Ft('\).)34 b(The)20
+b(\014le)h(named)f(b)m(y)h(the)g(v)-5 b(alue)21 b(of)g
+Fs(HISTFILE)d Ft(is)j(truncated,)150 2226 y(if)42 b(necessary)-8
+b(,)45 b(to)e(con)m(tain)g(no)f(more)g(than)f(the)h(n)m(um)m(b)s(er)f
+(of)h(lines)g(sp)s(eci\014ed)f(b)m(y)h(the)g(v)-5 b(alue)42
+b(of)g(the)150 2336 y Fs(HISTFILESIZE)21 b Ft(v)-5 b(ariable.)40
+b(When)24 b(an)g(in)m(teractiv)m(e)j(shell)e(exits,)h(the)f(last)g
+Fs($HISTSIZE)d Ft(lines)j(are)f(copied)150 2445 y(from)29
+b(the)i(history)e(list)i(to)g(the)f(\014le)g(named)f(b)m(y)h
+Fs($HISTFILE)p Ft(.)38 b(If)30 b(the)g Fs(histappend)d
+Ft(shell)j(option)g(is)g(set)150 2555 y(\(see)22 b(Section)g(4.2)g
+([Bash)g(Builtins],)h(page)f(41\),)j(the)c(lines)g(are)h(app)s(ended)d
+(to)j(the)f(history)g(\014le,)j(otherwise)150 2664 y(the)32
+b(history)f(\014le)g(is)h(o)m(v)m(erwritten.)45 b(If)31
+b Fs(HISTFILE)e Ft(is)j(unset,)f(or)h(if)f(the)h(history)f(\014le)g(is)
+h(un)m(writable,)g(the)150 2774 y(history)37 b(is)h(not)f(sa)m(v)m(ed.)
+63 b(After)38 b(sa)m(ving)g(the)f(history)-8 b(,)40 b(the)e(history)f
+(\014le)g(is)h(truncated)f(to)h(con)m(tain)h(no)150 2883
+y(more)31 b(than)f Fs($HISTFILESIZE)c Ft(lines.)41 b(If)30
+b Fs(HISTFILESIZE)d Ft(is)k(not)f(set,)h(no)g(truncation)f(is)h(p)s
+(erformed.)275 3031 y(If)g(the)h Fs(HISTTIMEFORMAT)d
+Ft(is)j(set,)h(the)f(time)h(stamp)f(information)g(asso)s(ciated)i(with)
+e(eac)m(h)h(history)150 3140 y(en)m(try)d(is)h(written)f(to)h(the)f
+(history)h(\014le,)f(mark)m(ed)h(with)f(the)g(history)g(commen)m(t)h(c)
+m(haracter.)43 b(When)30 b(the)150 3250 y(history)22
+b(\014le)h(is)g(read,)h(lines)f(b)s(eginning)e(with)i(the)f(history)h
+(commen)m(t)g(c)m(haracter)h(follo)m(w)m(ed)h(immediately)150
+3360 y(b)m(y)30 b(a)h(digit)g(are)g(in)m(terpreted)g(as)f(timestamps)h
+(for)f(the)h(previous)f(history)g(line.)275 3507 y(The)19
+b(builtin)h(command)g Fs(fc)g Ft(ma)m(y)h(b)s(e)f(used)f(to)i(list)g
+(or)g(edit)g(and)e(re-execute)j(a)f(p)s(ortion)f(of)g(the)h(history)150
+3617 y(list.)41 b(The)27 b Fs(history)f Ft(builtin)i(ma)m(y)h(b)s(e)e
+(used)g(to)i(displa)m(y)g(or)f(mo)s(dify)f(the)h(history)g(list)h(and)f
+(manipulate)150 3726 y(the)j(history)g(\014le.)42 b(When)31
+b(using)f(command-line)h(editing,)h(searc)m(h)f(commands)g(are)g(a)m(v)
+-5 b(ailable)33 b(in)e(eac)m(h)150 3836 y(editing)45
+b(mo)s(de)g(that)g(pro)m(vide)g(access)h(to)f(the)g(history)f(list)i
+(\(see)f(Section)h(8.4.2)g([Commands)e(F)-8 b(or)150
+3945 y(History],)31 b(page)h(107\).)275 4093 y(The)47
+b(shell)i(allo)m(ws)h(con)m(trol)f(o)m(v)m(er)h(whic)m(h)e(commands)g
+(are)h(sa)m(v)m(ed)g(on)f(the)h(history)f(list.)95 b(The)150
+4202 y Fs(HISTCONTROL)25 b Ft(and)j Fs(HISTIGNORE)e Ft(v)-5
+b(ariables)29 b(ma)m(y)h(b)s(e)d(set)j(to)f(cause)g(the)g(shell)f(to)i
+(sa)m(v)m(e)g(only)f(a)g(subset)150 4312 y(of)e(the)g(commands)f(en)m
+(tered.)40 b(The)26 b Fs(cmdhist)f Ft(shell)i(option,)h(if)f(enabled,)g
+(causes)h(the)e(shell)h(to)h(attempt)150 4421 y(to)23
+b(sa)m(v)m(e)h(eac)m(h)f(line)g(of)f(a)h(m)m(ulti-line)g(command)f(in)g
+(the)h(same)f(history)g(en)m(try)-8 b(,)25 b(adding)d(semicolons)h
+(where)150 4531 y(necessary)37 b(to)f(preserv)m(e)h(syn)m(tactic)h
+(correctness.)58 b(The)36 b Fs(lithist)e Ft(shell)i(option)h(causes)g
+(the)f(shell)g(to)150 4641 y(sa)m(v)m(e)25 b(the)e(command)h(with)f(em)
+m(b)s(edded)f(newlines)h(instead)h(of)f(semicolons.)40
+b(The)23 b Fs(shopt)e Ft(builtin)i(is)h(used)150 4750
+y(to)31 b(set)g(these)g(options.)41 b(See)31 b(Section)g(4.2)g([Bash)g
+(Builtins],)g(page)g(41,)h(for)e(a)h(description)f(of)h
+Fs(shopt)p Ft(.)150 5002 y Fr(9.2)68 b(Bash)45 b(History)h(Builtins)150
+5161 y Ft(Bash)31 b(pro)m(vides)f(t)m(w)m(o)i(builtin)e(commands)g
+(whic)m(h)g(manipulate)g(the)h(history)f(list)h(and)f(history)g
+(\014le.)150 5340 y Fs(fc)p eop end
+%%Page: 122 128
+TeXDict begin 122 127 bop 150 -116 a Ft(122)2527 b(Bash)31
+b(Reference)g(Man)m(ual)870 299 y Fs(fc)47 b([-e)g Fi(ename)11
+b Fs(])46 b([-lnr])g([)p Fi(first)11 b Fs(])45 b([)p
+Fi(last)11 b Fs(])870 408 y(fc)47 b(-s)g([)p Fi(pat)11
+b Fs(=)p Fi(rep)g Fs(])45 b([)p Fi(command)11 b Fs(])630
+539 y Ft(Fix)41 b(Command.)68 b(In)39 b(the)i(\014rst)e(form,)j(a)e
+(range)h(of)f(commands)g(from)f Fq(\014rst)i Ft(to)g
+Fq(last)i Ft(is)630 648 y(selected)35 b(from)e(the)g(history)g(list.)50
+b(Both)34 b Fq(\014rst)h Ft(and)e Fq(last)j Ft(ma)m(y)e(b)s(e)e(sp)s
+(eci\014ed)h(as)g(a)h(string)630 758 y(\(to)26 b(lo)s(cate)h(the)e
+(most)h(recen)m(t)g(command)e(b)s(eginning)h(with)g(that)g(string\))h
+(or)f(as)g(a)g(n)m(um)m(b)s(er)630 867 y(\(an)f(index)f(in)m(to)h(the)g
+(history)g(list,)h(where)e(a)h(negativ)m(e)i(n)m(um)m(b)s(er)c(is)i
+(used)f(as)g(an)h(o\013set)g(from)630 977 y(the)j(curren)m(t)f(command)
+h(n)m(um)m(b)s(er\).)38 b(If)26 b Fq(last)k Ft(is)c(not)h(sp)s
+(eci\014ed)f(it)h(is)g(set)g(to)g Fq(\014rst)r Ft(.)39
+b(If)26 b Fq(\014rst)i Ft(is)630 1087 y(not)j(sp)s(eci\014ed)f(it)h(is)
+g(set)h(to)f(the)g(previous)f(command)h(for)f(editing)i(and)e
+Fp(\000)p Ft(16)h(for)g(listing.)630 1196 y(If)f(the)g(`)p
+Fs(-l)p Ft(')g(\015ag)h(is)f(giv)m(en,)h(the)g(commands)e(are)i(listed)
+g(on)f(standard)f(output.)40 b(The)30 b(`)p Fs(-n)p Ft(')630
+1306 y(\015ag)i(suppresses)f(the)h(command)g(n)m(um)m(b)s(ers)e(when)i
+(listing.)46 b(The)32 b(`)p Fs(-r)p Ft(')g(\015ag)g(rev)m(erses)h(the)
+630 1415 y(order)g(of)g(the)h(listing.)50 b(Otherwise,)34
+b(the)f(editor)h(giv)m(en)g(b)m(y)f Fq(ename)39 b Ft(is)33
+b(in)m(v)m(ok)m(ed)i(on)e(a)h(\014le)630 1525 y(con)m(taining)i(those)f
+(commands.)52 b(If)33 b Fq(ename)40 b Ft(is)34 b(not)h(giv)m(en,)h(the)
+f(v)-5 b(alue)35 b(of)f(the)g(follo)m(wing)630 1634 y(v)-5
+b(ariable)33 b(expansion)e(is)h(used:)42 b Fs(${FCEDIT:-${EDITOR:-vi}})
+p Ft(.)d(This)31 b(sa)m(ys)h(to)g(use)g(the)630 1744
+y(v)-5 b(alue)34 b(of)f(the)h Fs(FCEDIT)e Ft(v)-5 b(ariable)34
+b(if)f(set,)i(or)f(the)f(v)-5 b(alue)34 b(of)g(the)f
+Fs(EDITOR)f Ft(v)-5 b(ariable)34 b(if)f(that)630 1854
+y(is)g(set,)i(or)e Fs(vi)g Ft(if)g(neither)g(is)g(set.)50
+b(When)33 b(editing)h(is)f(complete,)i(the)f(edited)f(commands)630
+1963 y(are)e(ec)m(ho)s(ed)g(and)f(executed.)630 2093
+y(In)k(the)g(second)g(form,)h Fq(command)j Ft(is)c(re-executed)i(after)
+f(eac)m(h)g(instance)g(of)f Fq(pat)j Ft(in)d(the)630
+2203 y(selected)e(command)e(is)g(replaced)h(b)m(y)g Fq(rep)s
+Ft(.)630 2333 y(A)g(useful)f(alias)i(to)g(use)e(with)h(the)g
+Fs(fc)f Ft(command)h(is)g Fs(r='fc)e(-s')p Ft(,)h(so)h(that)h(t)m
+(yping)f(`)p Fs(r)f(cc)p Ft(')630 2443 y(runs)35 b(the)h(last)h
+(command)f(b)s(eginning)g(with)g Fs(cc)f Ft(and)h(t)m(yping)g(`)p
+Fs(r)p Ft(')h(re-executes)h(the)e(last)630 2552 y(command)30
+b(\(see)h(Section)h(6.6)f([Aliases],)h(page)g(79\).)150
+2703 y Fs(history)870 2833 y(history)46 b([)p Fi(n)11
+b Fs(])870 2943 y(history)46 b(-c)870 3052 y(history)g(-d)h
+Fi(offset)870 3162 y Fs(history)f([-anrw])g([)p Fi(filename)11
+b Fs(])870 3271 y(history)46 b(-ps)h Fi(arg)630 3402
+y Ft(With)26 b(no)g(options,)h(displa)m(y)f(the)g(history)g(list)g
+(with)f(line)h(n)m(um)m(b)s(ers.)38 b(Lines)26 b(pre\014xed)e(with)630
+3511 y(a)35 b(`)p Fs(*)p Ft(')g(ha)m(v)m(e)h(b)s(een)e(mo)s(di\014ed.)
+53 b(An)34 b(argumen)m(t)h(of)g Fq(n)f Ft(lists)i(only)f(the)g(last)g
+Fq(n)f Ft(lines.)54 b(If)35 b(the)630 3621 y(shell)30
+b(v)-5 b(ariable)31 b Fs(HISTTIMEFORMAT)26 b Ft(is)k(set)h(and)e(not)i
+(n)m(ull,)f(it)h(is)f(used)f(as)h(a)h(format)f(string)630
+3730 y(for)36 b Fq(strftime)41 b Ft(to)36 b(displa)m(y)g(the)g(time)h
+(stamp)f(asso)s(ciated)h(with)f(eac)m(h)h(displa)m(y)m(ed)f(history)630
+3840 y(en)m(try)-8 b(.)47 b(No)33 b(in)m(terv)m(ening)g(blank)f(is)g
+(prin)m(ted)g(b)s(et)m(w)m(een)h(the)g(formatted)f(time)h(stamp)g(and)
+630 3950 y(the)e(history)f(line.)630 4080 y(Options,)g(if)h(supplied,)e
+(ha)m(v)m(e)i(the)g(follo)m(wing)h(meanings:)630 4230
+y Fs(-c)384 b Ft(Clear)23 b(the)g(history)g(list.)39
+b(This)22 b(ma)m(y)i(b)s(e)e(com)m(bined)h(with)f(the)h(other)h
+(options)1110 4340 y(to)31 b(replace)g(the)g(history)f(list)h
+(completely)-8 b(.)630 4491 y Fs(-d)30 b Fi(offset)1110
+4600 y Ft(Delete)25 b(the)f(history)f(en)m(try)g(at)h(p)s(osition)f
+Fq(o\013set)r Ft(.)39 b Fq(o\013set)26 b Ft(should)c(b)s(e)h(sp)s
+(eci\014ed)1110 4710 y(as)31 b(it)g(app)s(ears)e(when)h(the)g(history)g
+(is)h(displa)m(y)m(ed.)630 4861 y Fs(-a)384 b Ft(App)s(end)35
+b(the)i(new)g(history)g(lines)g(\(history)g(lines)g(en)m(tered)h(since)
+f(the)g(b)s(e-)1110 4970 y(ginning)30 b(of)h(the)f(curren)m(t)g(Bash)h
+(session\))g(to)g(the)g(history)f(\014le.)630 5121 y
+Fs(-n)384 b Ft(App)s(end)32 b(the)i(history)f(lines)h(not)g(already)g
+(read)g(from)f(the)h(history)f(\014le)h(to)1110 5230
+y(the)26 b(curren)m(t)f(history)g(list.)40 b(These)25
+b(are)h(lines)g(app)s(ended)e(to)i(the)f(history)h(\014le)1110
+5340 y(since)31 b(the)f(b)s(eginning)g(of)g(the)h(curren)m(t)f(Bash)h
+(session.)p eop end
+%%Page: 123 129
+TeXDict begin 123 128 bop 150 -116 a Ft(Chapter)30 b(9:)41
+b(Using)30 b(History)h(In)m(teractiv)m(ely)1925 b(123)630
+299 y Fs(-r)384 b Ft(Read)26 b(the)h(curren)m(t)f(history)g(\014le)g
+(and)g(app)s(end)e(its)j(con)m(ten)m(ts)h(to)f(the)f(history)1110
+408 y(list.)630 573 y Fs(-w)384 b Ft(W)-8 b(rite)32 b(out)e(the)h
+(curren)m(t)f(history)g(to)i(the)e(history)g(\014le.)630
+739 y Fs(-p)384 b Ft(P)m(erform)31 b(history)f(substitution)h(on)f(the)
+h Fq(arg)8 b Ft(s)31 b(and)f(displa)m(y)h(the)f(result)h(on)1110
+848 y(the)d(standard)f(output,)i(without)f(storing)g(the)g(results)g
+(in)g(the)g(history)g(list.)630 1013 y Fs(-s)384 b Ft(The)30
+b Fq(arg)8 b Ft(s)30 b(are)h(added)f(to)h(the)f(end)g(of)h(the)f
+(history)h(list)g(as)f(a)h(single)g(en)m(try)-8 b(.)630
+1178 y(When)24 b(an)m(y)h(of)f(the)h(`)p Fs(-w)p Ft(',)h(`)p
+Fs(-r)p Ft(',)f(`)p Fs(-a)p Ft(',)h(or)f(`)p Fs(-n)p
+Ft(')f(options)g(is)h(used,)g(if)f Fq(\014lename)30 b
+Ft(is)24 b(giv)m(en,)j(then)630 1288 y(it)32 b(is)g(used)f(as)h(the)f
+(history)h(\014le.)45 b(If)31 b(not,)h(then)g(the)f(v)-5
+b(alue)32 b(of)g(the)g Fs(HISTFILE)d Ft(v)-5 b(ariable)33
+b(is)630 1397 y(used.)150 1638 y Fr(9.3)68 b(History)46
+b(Expansion)150 1798 y Ft(The)f(History)h(library)e(pro)m(vides)i(a)f
+(history)g(expansion)g(feature)h(that)g(is)f(similar)h(to)g(the)f
+(history)150 1907 y(expansion)g(pro)m(vided)f(b)m(y)h
+Fs(csh)p Ft(.)83 b(This)44 b(section)i(describ)s(es)e(the)h(syn)m(tax)h
+(used)e(to)i(manipulate)f(the)150 2017 y(history)30 b(information.)275
+2157 y(History)h(expansions)f(in)m(tro)s(duce)g(w)m(ords)g(from)g(the)h
+(history)f(list)h(in)m(to)g(the)g(input)f(stream,)h(making)150
+2266 y(it)g(easy)g(to)g(rep)s(eat)g(commands,)f(insert)g(the)h(argumen)
+m(ts)f(to)h(a)g(previous)f(command)g(in)m(to)i(the)e(curren)m(t)150
+2376 y(input)f(line,)i(or)g(\014x)f(errors)f(in)h(previous)g(commands)g
+(quic)m(kly)-8 b(.)275 2516 y(History)27 b(expansion)f(tak)m(es)i
+(place)f(in)f(t)m(w)m(o)i(parts.)39 b(The)26 b(\014rst)g(is)g(to)h
+(determine)g(whic)m(h)f(line)h(from)f(the)150 2626 y(history)i(list)g
+(should)f(b)s(e)g(used)g(during)g(substitution.)39 b(The)27
+b(second)h(is)g(to)h(select)g(p)s(ortions)e(of)h(that)h(line)150
+2735 y(for)d(inclusion)f(in)m(to)i(the)f(curren)m(t)f(one.)40
+b(The)25 b(line)h(selected)h(from)f(the)g(history)f(is)h(called)h(the)f
+Fq(ev)m(en)m(t)p Ft(,)j(and)150 2845 y(the)21 b(p)s(ortions)g(of)g
+(that)h(line)f(that)h(are)g(acted)g(up)s(on)e(are)h(called)h
+Fq(w)m(ords)p Ft(.)38 b(V)-8 b(arious)21 b Fq(mo)s(di\014ers)j
+Ft(are)e(a)m(v)-5 b(ailable)150 2955 y(to)35 b(manipulate)f(the)g
+(selected)i(w)m(ords.)51 b(The)33 b(line)h(is)g(brok)m(en)g(in)m(to)h
+(w)m(ords)e(in)h(the)g(same)h(fashion)e(that)150 3064
+y(Bash)i(do)s(es,)h(so)f(that)h(sev)m(eral)g(w)m(ords)e(surrounded)f(b)
+m(y)i(quotes)g(are)g(considered)g(one)g(w)m(ord.)54 b(History)150
+3174 y(expansions)34 b(are)g(in)m(tro)s(duced)f(b)m(y)h(the)g(app)s
+(earance)g(of)g(the)g(history)g(expansion)g(c)m(haracter,)i(whic)m(h)e
+(is)150 3283 y(`)p Fs(!)p Ft(')d(b)m(y)f(default.)41
+b(Only)29 b(`)p Fs(\\)p Ft(')i(and)f(`)p Fs(')p Ft(')g(ma)m(y)h(b)s(e)f
+(used)g(to)h(escap)s(e)g(the)f(history)g(expansion)h(c)m(haracter.)275
+3423 y(Sev)m(eral)40 b(shell)g(options)g(settable)h(with)e(the)h
+Fs(shopt)e Ft(builtin)h(\(see)h(Section)h(4.2)f([Bash)g(Builtins],)150
+3533 y(page)32 b(41\))h(ma)m(y)f(b)s(e)f(used)g(to)i(tailor)g(the)e(b)s
+(eha)m(vior)h(of)g(history)g(expansion.)44 b(If)31 b(the)h
+Fs(histverify)d Ft(shell)150 3643 y(option)39 b(is)f(enabled,)i(and)e
+(Readline)g(is)h(b)s(eing)e(used,)j(history)e(substitutions)g(are)g
+(not)h(immediately)150 3752 y(passed)30 b(to)h(the)g(shell)g(parser.)40
+b(Instead,)30 b(the)h(expanded)f(line)h(is)f(reloaded)h(in)m(to)h(the)e
+(Readline)h(editing)150 3862 y(bu\013er)e(for)i(further)e(mo)s
+(di\014cation.)41 b(If)30 b(Readline)h(is)f(b)s(eing)g(used,)g(and)g
+(the)g Fs(histreedit)e Ft(shell)i(option)150 3971 y(is)k(enabled,)h(a)g
+(failed)g(history)f(expansion)g(will)g(b)s(e)g(reloaded)g(in)m(to)h
+(the)g(Readline)f(editing)h(bu\013er)e(for)150 4081 y(correction.)74
+b(The)41 b(`)p Fs(-p)p Ft(')g(option)g(to)h(the)f Fs(history)f
+Ft(builtin)g(command)h(ma)m(y)h(b)s(e)e(used)h(to)g(see)h(what)150
+4191 y(a)c(history)g(expansion)f(will)h(do)f(b)s(efore)h(using)f(it.)63
+b(The)37 b(`)p Fs(-s)p Ft(')g(option)h(to)h(the)f Fs(history)d
+Ft(builtin)i(ma)m(y)150 4300 y(b)s(e)c(used)h(to)g(add)g(commands)f(to)
+i(the)f(end)g(of)g(the)g(history)g(list)h(without)f(actually)i
+(executing)f(them,)150 4410 y(so)j(that)h(they)f(are)g(a)m(v)-5
+b(ailable)40 b(for)e(subsequen)m(t)f(recall.)65 b(This)37
+b(is)h(most)g(useful)g(in)f(conjunction)h(with)150 4519
+y(Readline.)275 4659 y(The)33 b(shell)h(allo)m(ws)h(con)m(trol)h(of)e
+(the)g(v)-5 b(arious)34 b(c)m(haracters)h(used)f(b)m(y)f(the)h(history)
+g(expansion)g(mec)m(h-)150 4769 y(anism)h(with)g(the)g
+Fs(histchars)d Ft(v)-5 b(ariable,)38 b(as)d(explained)g(ab)s(o)m(v)m(e)
+i(\(see)f(Section)f(5.2)i([Bash)e(V)-8 b(ariables],)150
+4879 y(page)32 b(61\).)44 b(The)31 b(shell)g(uses)g(the)g(history)g
+(commen)m(t)i(c)m(haracter)f(to)g(mark)f(history)g(timestamps)h(when)
+150 4988 y(writing)e(the)h(history)f(\014le.)150 5193
+y Fj(9.3.1)63 b(Ev)m(en)m(t)39 b(Designators)150 5340
+y Ft(An)30 b(ev)m(en)m(t)i(designator)f(is)f(a)h(reference)g(to)g(a)g
+(command)f(line)h(en)m(try)f(in)g(the)h(history)f(list.)p
+eop end
+%%Page: 124 130
+TeXDict begin 124 129 bop 150 -116 a Ft(124)2527 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fs(!)432 b Ft(Start)34
+b(a)f(history)h(substitution,)g(except)g(when)f(follo)m(w)m(ed)i(b)m(y)
+e(a)h(space,)h(tab,)f(the)g(end)f(of)630 408 y(the)i(line,)g(`)p
+Fs(=)p Ft(')g(or)f(`)p Fs(\()p Ft(')h(\(when)e(the)i
+Fs(extglob)d Ft(shell)j(option)f(is)h(enabled)f(using)g(the)g
+Fs(shopt)630 518 y Ft(builtin\).)150 680 y Fs(!)p Fi(n)384
+b Ft(Refer)30 b(to)i(command)e(line)g Fq(n)p Ft(.)150
+841 y Fs(!-)p Fi(n)336 b Ft(Refer)30 b(to)i(the)e(command)g
+Fq(n)g Ft(lines)h(bac)m(k.)150 1003 y Fs(!!)384 b Ft(Refer)30
+b(to)i(the)e(previous)g(command.)40 b(This)30 b(is)g(a)h(synon)m(ym)f
+(for)g(`)p Fs(!-1)p Ft('.)150 1164 y Fs(!)p Fi(string)144
+b Ft(Refer)30 b(to)i(the)e(most)h(recen)m(t)g(command)f(starting)i
+(with)e Fq(string)8 b Ft(.)150 1326 y Fs(!?)p Fi(string)j
+Fs([?])630 1436 y Ft(Refer)33 b(to)h(the)f(most)g(recen)m(t)h(command)f
+(con)m(taining)h Fq(string)8 b Ft(.)48 b(The)33 b(trailing)h(`)p
+Fs(?)p Ft(')f(ma)m(y)h(b)s(e)630 1545 y(omitted)d(if)g(the)f
+Fq(string)38 b Ft(is)31 b(follo)m(w)m(ed)h(immediately)g(b)m(y)e(a)h
+(newline.)150 1707 y Fs(^)p Fi(string1)11 b Fs(^)p Fi(string2)g
+Fs(^)630 1816 y Ft(Quic)m(k)31 b(Substitution.)43 b(Rep)s(eat)31
+b(the)g(last)h(command,)g(replacing)f Fq(string1)39 b
+Ft(with)31 b Fq(string2)7 b Ft(.)630 1926 y(Equiv)-5
+b(alen)m(t)31 b(to)g Fs(!!:s/)p Fi(string1)11 b Fs(/)p
+Fi(string2)g Fs(/)p Ft(.)150 2088 y Fs(!#)384 b Ft(The)30
+b(en)m(tire)h(command)f(line)h(t)m(yp)s(ed)f(so)h(far.)150
+2289 y Fj(9.3.2)63 b(W)-10 b(ord)41 b(Designators)150
+2436 y Ft(W)-8 b(ord)27 b(designators)h(are)g(used)e(to)i(select)h
+(desired)d(w)m(ords)h(from)f(the)i(ev)m(en)m(t.)41 b(A)27
+b(`)p Fs(:)p Ft(')g(separates)h(the)f(ev)m(en)m(t)150
+2546 y(sp)s(eci\014cation)38 b(from)e(the)h(w)m(ord)f(designator.)61
+b(It)37 b(ma)m(y)h(b)s(e)e(omitted)i(if)e(the)h(w)m(ord)g(designator)g
+(b)s(egins)150 2655 y(with)30 b(a)g(`)p Fs(^)p Ft(',)g(`)p
+Fs($)p Ft(',)g(`)p Fs(*)p Ft(',)h(`)p Fs(-)p Ft(',)f(or)g(`)p
+Fs(\045)p Ft('.)41 b(W)-8 b(ords)30 b(are)g(n)m(um)m(b)s(ered)e(from)i
+(the)g(b)s(eginning)f(of)h(the)g(line,)g(with)g(the)150
+2765 y(\014rst)f(w)m(ord)f(b)s(eing)h(denoted)h(b)m(y)f(0)h(\(zero\).)
+41 b(W)-8 b(ords)30 b(are)g(inserted)f(in)m(to)h(the)g(curren)m(t)f
+(line)g(separated)h(b)m(y)150 2874 y(single)h(spaces.)275
+3011 y(F)-8 b(or)31 b(example,)150 3174 y Fs(!!)384 b
+Ft(designates)37 b(the)f(preceding)g(command.)57 b(When)35
+b(y)m(ou)i(t)m(yp)s(e)f(this,)h(the)f(preceding)g(com-)630
+3283 y(mand)30 b(is)g(rep)s(eated)g(in)g(toto.)150 3445
+y Fs(!!:$)288 b Ft(designates)23 b(the)g(last)g(argumen)m(t)g(of)f(the)
+h(preceding)f(command.)38 b(This)22 b(ma)m(y)h(b)s(e)e(shortened)630
+3555 y(to)31 b Fs(!$)p Ft(.)150 3716 y Fs(!fi:2)240 b
+Ft(designates)30 b(the)g(second)f(argumen)m(t)h(of)f(the)h(most)f
+(recen)m(t)i(command)e(starting)h(with)f(the)630 3826
+y(letters)j Fs(fi)p Ft(.)275 3988 y(Here)e(are)h(the)g(w)m(ord)f
+(designators:)150 4151 y Fs(0)g(\(zero\))114 b Ft(The)30
+b Fs(0)p Ft(th)g(w)m(ord.)40 b(F)-8 b(or)31 b(man)m(y)g(applications,)h
+(this)e(is)g(the)h(command)f(w)m(ord.)150 4313 y Fi(n)432
+b Ft(The)30 b Fq(n)p Ft(th)g(w)m(ord.)150 4474 y Fs(^)432
+b Ft(The)30 b(\014rst)f(argumen)m(t;)j(that)f(is,)f(w)m(ord)g(1.)150
+4636 y Fs($)432 b Ft(The)30 b(last)h(argumen)m(t.)150
+4798 y Fs(\045)432 b Ft(The)30 b(w)m(ord)g(matc)m(hed)h(b)m(y)f(the)h
+(most)g(recen)m(t)g(`)p Fs(?)p Fi(string)11 b Fs(?)p
+Ft(')28 b(searc)m(h.)150 4959 y Fi(x)11 b Fs(-)p Fi(y)325
+b Ft(A)30 b(range)h(of)g(w)m(ords;)f(`)p Fs(-)p Fi(y)11
+b Ft(')30 b(abbreviates)h(`)p Fs(0-)p Fi(y)11 b Ft('.)150
+5121 y Fs(*)432 b Ft(All)28 b(of)g(the)g(w)m(ords,)g(except)h(the)e
+Fs(0)p Ft(th.)40 b(This)27 b(is)g(a)h(synon)m(ym)f(for)h(`)p
+Fs(1-$)p Ft('.)39 b(It)28 b(is)g(not)g(an)f(error)630
+5230 y(to)j(use)g(`)p Fs(*)p Ft(')f(if)h(there)g(is)g(just)f(one)h(w)m
+(ord)f(in)g(the)h(ev)m(en)m(t;)i(the)d(empt)m(y)i(string)e(is)h
+(returned)e(in)630 5340 y(that)j(case.)p eop end
+%%Page: 125 131
+TeXDict begin 125 130 bop 150 -116 a Ft(Chapter)30 b(9:)41
+b(Using)30 b(History)h(In)m(teractiv)m(ely)1925 b(125)150
+299 y Fi(x)11 b Fs(*)373 b Ft(Abbreviates)31 b(`)p Fi(x)11
+b Fs(-$)p Ft(')150 458 y Fi(x)g Fs(-)373 b Ft(Abbreviates)31
+b(`)p Fi(x)11 b Fs(-$)p Ft(')29 b(lik)m(e)j(`)p Fi(x)11
+b Fs(*)p Ft(',)30 b(but)g(omits)h(the)f(last)h(w)m(ord.)275
+618 y(If)i(a)h(w)m(ord)g(designator)g(is)g(supplied)f(without)h(an)g
+(ev)m(en)m(t)h(sp)s(eci\014cation,)h(the)e(previous)f(command)150
+727 y(is)d(used)g(as)h(the)f(ev)m(en)m(t.)150 927 y Fj(9.3.3)63
+b(Mo)s(di\014ers)150 1073 y Ft(After)29 b(the)g(optional)g(w)m(ord)g
+(designator,)g(y)m(ou)g(can)g(add)f(a)h(sequence)g(of)g(one)g(or)f
+(more)h(of)g(the)f(follo)m(wing)150 1183 y(mo)s(di\014ers,)h(eac)m(h)j
+(preceded)e(b)m(y)g(a)h(`)p Fs(:)p Ft('.)150 1342 y Fs(h)432
+b Ft(Remo)m(v)m(e)32 b(a)f(trailing)g(pathname)g(comp)s(onen)m(t,)g
+(lea)m(ving)h(only)e(the)h(head.)150 1502 y Fs(t)432
+b Ft(Remo)m(v)m(e)32 b(all)f(leading)h(pathname)e(comp)s(onen)m(ts,)h
+(lea)m(ving)h(the)e(tail.)150 1661 y Fs(r)432 b Ft(Remo)m(v)m(e)32
+b(a)f(trailing)g(su\016x)f(of)g(the)h(form)f(`)p Fs(.)p
+Fi(suffix)11 b Ft(',)28 b(lea)m(ving)33 b(the)d(basename.)150
+1821 y Fs(e)432 b Ft(Remo)m(v)m(e)32 b(all)f(but)f(the)h(trailing)g
+(su\016x.)150 1980 y Fs(p)432 b Ft(Prin)m(t)30 b(the)h(new)f(command)g
+(but)g(do)g(not)g(execute)i(it.)150 2139 y Fs(q)432 b
+Ft(Quote)31 b(the)f(substituted)g(w)m(ords,)g(escaping)h(further)e
+(substitutions.)150 2299 y Fs(x)432 b Ft(Quote)32 b(the)f(substituted)g
+(w)m(ords)f(as)i(with)f(`)p Fs(q)p Ft(',)h(but)e(break)h(in)m(to)i(w)m
+(ords)d(at)i(spaces,)h(tabs,)630 2408 y(and)d(newlines.)150
+2568 y Fs(s/)p Fi(old)11 b Fs(/)p Fi(new)g Fs(/)630 2677
+y Ft(Substitute)32 b Fq(new)40 b Ft(for)32 b(the)h(\014rst)f(o)s
+(ccurrence)h(of)f Fq(old)37 b Ft(in)32 b(the)h(ev)m(en)m(t)h(line.)48
+b(An)m(y)32 b(delimiter)630 2787 y(ma)m(y)25 b(b)s(e)g(used)f(in)g
+(place)i(of)f(`)p Fs(/)p Ft('.)39 b(The)24 b(delimiter)h(ma)m(y)h(b)s
+(e)e(quoted)h(in)f Fq(old)29 b Ft(and)24 b Fq(new)32
+b Ft(with)25 b(a)630 2897 y(single)j(bac)m(kslash.)40
+b(If)27 b(`)p Fs(&)p Ft(')g(app)s(ears)g(in)g Fq(new)8
+b Ft(,)27 b(it)h(is)f(replaced)h(b)m(y)f Fq(old)t Ft(.)39
+b(A)27 b(single)h(bac)m(kslash)630 3006 y(will)35 b(quote)g(the)g(`)p
+Fs(&)p Ft('.)54 b(The)34 b(\014nal)g(delimiter)i(is)e(optional)i(if)f
+(it)g(is)f(the)h(last)h(c)m(haracter)g(on)630 3116 y(the)31
+b(input)e(line.)150 3275 y Fs(&)432 b Ft(Rep)s(eat)31
+b(the)f(previous)g(substitution.)150 3435 y Fs(g)150
+3544 y(a)432 b Ft(Cause)38 b(c)m(hanges)i(to)f(b)s(e)f(applied)h(o)m(v)
+m(er)h(the)f(en)m(tire)g(ev)m(en)m(t)h(line.)66 b(Used)39
+b(in)f(conjunction)630 3654 y(with)30 b(`)p Fs(s)p Ft(',)h(as)f(in)h
+Fs(gs/)p Fi(old)11 b Fs(/)p Fi(new)g Fs(/)p Ft(,)26 b(or)k(with)h(`)p
+Fs(&)p Ft('.)150 3813 y Fs(G)432 b Ft(Apply)30 b(the)g(follo)m(wing)i
+(`)p Fs(s)p Ft(')f(mo)s(di\014er)e(once)i(to)g(eac)m(h)h(w)m(ord)e(in)g
+(the)g(ev)m(en)m(t.)p eop end
+%%Page: 126 132
+TeXDict begin 126 131 bop eop end
+%%Page: 127 133
+TeXDict begin 127 132 bop 150 -116 a Ft(Chapter)30 b(10:)41
+b(Installing)31 b(Bash)2356 b(127)150 299 y Fo(10)80
+b(Installing)52 b(Bash)150 556 y Ft(This)31 b(c)m(hapter)h(pro)m(vides)
+g(basic)g(instructions)f(for)g(installing)i(Bash)f(on)f(the)h(v)-5
+b(arious)31 b(supp)s(orted)f(plat-)150 665 y(forms.)40
+b(The)28 b(distribution)h(supp)s(orts)e(the)j Fl(gnu)f
+Ft(op)s(erating)h(systems,)f(nearly)h(ev)m(ery)g(v)m(ersion)f(of)h
+(Unix,)150 775 y(and)d(sev)m(eral)j(non-Unix)d(systems)h(suc)m(h)g(as)g
+(BeOS)g(and)f(In)m(terix.)40 b(Other)28 b(indep)s(enden)m(t)e(p)s(orts)
+h(exist)i(for)150 884 y Fl(ms-dos)p Ft(,)h Fl(os/2)p
+Ft(,)g(and)g(Windo)m(ws)g(platforms.)150 1128 y Fr(10.1)68
+b(Basic)45 b(Installation)150 1288 y Ft(These)30 b(are)h(installation)h
+(instructions)e(for)h(Bash.)275 1430 y(The)e(simplest)i(w)m(a)m(y)g(to)
+g(compile)h(Bash)e(is:)199 1572 y(1.)61 b Fs(cd)38 b
+Ft(to)h(the)f(directory)h(con)m(taining)h(the)f(source)f(co)s(de)h(and)
+f(t)m(yp)s(e)g(`)p Fs(./configure)p Ft(')e(to)j(con\014gure)330
+1681 y(Bash)c(for)f(y)m(our)h(system.)54 b(If)34 b(y)m(ou're)h(using)f
+Fs(csh)g Ft(on)g(an)h(old)g(v)m(ersion)g(of)g(System)f(V,)h(y)m(ou)g
+(migh)m(t)330 1791 y(need)21 b(to)g(t)m(yp)s(e)g(`)p
+Fs(sh)30 b(./configure)p Ft(')18 b(instead)j(to)g(prev)m(en)m(t)h
+Fs(csh)e Ft(from)g(trying)h(to)g(execute)h Fs(configure)330
+1901 y Ft(itself.)330 2039 y(Running)30 b Fs(configure)f
+Ft(tak)m(es)k(some)e(time.)45 b(While)32 b(running,)e(it)i(prin)m(ts)f
+(messages)h(telling)h(whic)m(h)330 2149 y(features)e(it)g(is)f(c)m(hec)
+m(king)i(for.)199 2287 y(2.)61 b(T)m(yp)s(e)30 b(`)p
+Fs(make)p Ft(')g(to)h(compile)g(Bash)g(and)e(build)h(the)g
+Fs(bashbug)f Ft(bug)g(rep)s(orting)h(script.)199 2425
+y(3.)61 b(Optionally)-8 b(,)32 b(t)m(yp)s(e)e(`)p Fs(make)g(tests)p
+Ft(')f(to)i(run)e(the)h(Bash)h(test)g(suite.)199 2563
+y(4.)61 b(T)m(yp)s(e)36 b(`)p Fs(make)29 b(install)p
+Ft(')35 b(to)i(install)h Fs(bash)d Ft(and)h Fs(bashbug)p
+Ft(.)57 b(This)35 b(will)i(also)h(install)f(the)g(man)m(ual)330
+2673 y(pages)31 b(and)f(Info)g(\014le.)275 2844 y(The)20
+b Fs(configure)f Ft(shell)i(script)g(attempts)h(to)g(guess)f(correct)i
+(v)-5 b(alues)21 b(for)g(v)-5 b(arious)21 b(system-dep)s(enden)m(t)150
+2953 y(v)-5 b(ariables)44 b(used)f(during)g(compilation.)82
+b(It)43 b(uses)h(those)g(v)-5 b(alues)44 b(to)g(create)h(a)g(`)p
+Fs(Makefile)p Ft(')c(in)j(eac)m(h)150 3063 y(directory)25
+b(of)g(the)g(pac)m(k)-5 b(age)27 b(\(the)e(top)g(directory)-8
+b(,)27 b(the)e(`)p Fs(builtins)p Ft(',)f(`)p Fs(doc)p
+Ft(',)i(and)e(`)p Fs(support)p Ft(')g(directories,)150
+3172 y(eac)m(h)32 b(directory)f(under)d(`)p Fs(lib)p
+Ft(',)j(and)f(sev)m(eral)h(others\).)42 b(It)30 b(also)i(creates)f(a)g
+(`)p Fs(config.h)p Ft(')e(\014le)h(con)m(taining)150
+3282 y(system-dep)s(enden)m(t)h(de\014nitions.)44 b(Finally)-8
+b(,)34 b(it)e(creates)h(a)f(shell)g(script)f(named)g
+Fs(config.status)d Ft(that)150 3392 y(y)m(ou)k(can)g(run)e(in)h(the)g
+(future)g(to)h(recreate)h(the)f(curren)m(t)f(con\014guration,)h(a)g
+(\014le)g(`)p Fs(config.cache)p Ft(')c(that)150 3501
+y(sa)m(v)m(es)35 b(the)f(results)f(of)h(its)g(tests)h(to)f(sp)s(eed)f
+(up)g(recon\014guring,)h(and)f(a)h(\014le)g(`)p Fs(config.log)p
+Ft(')d(con)m(taining)150 3611 y(compiler)25 b(output)g(\(useful)f
+(mainly)h(for)g(debugging)f Fs(configure)p Ft(\).)37
+b(If)24 b(at)i(some)f(p)s(oin)m(t)g(`)p Fs(config.cache)p
+Ft(')150 3720 y(con)m(tains)32 b(results)e(y)m(ou)g(don't)h(w)m(an)m(t)
+g(to)g(k)m(eep,)g(y)m(ou)g(ma)m(y)g(remo)m(v)m(e)h(or)e(edit)h(it.)275
+3862 y(T)-8 b(o)37 b(\014nd)f(out)i(more)f(ab)s(out)h(the)f(options)h
+(and)f(argumen)m(ts)g(that)h(the)g Fs(configure)d Ft(script)i(under-)
+150 3972 y(stands,)30 b(t)m(yp)s(e)390 4114 y Fs(bash-2.04$)45
+b(./configure)g(--help)150 4256 y Ft(at)31 b(the)g(Bash)f(prompt)g(in)g
+(y)m(our)g(Bash)h(source)f(directory)-8 b(.)275 4398
+y(If)53 b(y)m(ou)h(need)f(to)i(do)e(un)m(usual)g(things)g(to)i(compile)
+g(Bash,)k(please)c(try)e(to)i(\014gure)e(out)h(ho)m(w)150
+4508 y Fs(configure)47 b Ft(could)j(c)m(hec)m(k)h(whether)e(or)g(not)h
+(to)h(do)e(them,)55 b(and)49 b(mail)h(di\013s)f(or)h(instructions)f(to)
+150 4617 y Fs(bash-maintainers@gnu.org)24 b Ft(so)30
+b(they)h(can)g(b)s(e)e(considered)i(for)f(the)g(next)h(release.)275
+4760 y(The)24 b(\014le)i(`)p Fs(configure.in)p Ft(')c(is)k(used)e(to)j
+(create)g Fs(configure)22 b Ft(b)m(y)k(a)g(program)f(called)h(Auto)s
+(conf.)39 b(Y)-8 b(ou)150 4869 y(only)31 b(need)f(`)p
+Fs(configure.in)p Ft(')d(if)k(y)m(ou)f(w)m(an)m(t)i(to)f(c)m(hange)g
+(it)g(or)f(regenerate)i Fs(configure)c Ft(using)i(a)h(new)m(er)150
+4979 y(v)m(ersion)25 b(of)f(Auto)s(conf.)39 b(If)24 b(y)m(ou)h(do)f
+(this,)i(mak)m(e)f(sure)f(y)m(ou)h(are)f(using)g(Auto)s(conf)h(v)m
+(ersion)f(2.50)i(or)f(new)m(er.)275 5121 y(Y)-8 b(ou)29
+b(can)f(remo)m(v)m(e)i(the)f(program)g(binaries)f(and)g(ob)5
+b(ject)29 b(\014les)g(from)f(the)h(source)f(co)s(de)h(directory)g(b)m
+(y)150 5230 y(t)m(yping)j(`)p Fs(make)d(clean)p Ft('.)42
+b(T)-8 b(o)32 b(also)g(remo)m(v)m(e)g(the)g(\014les)f(that)g
+Fs(configure)e Ft(created)j(\(so)g(y)m(ou)g(can)f(compile)150
+5340 y(Bash)g(for)f(a)g(di\013eren)m(t)h(kind)f(of)g(computer\),)h(t)m
+(yp)s(e)g(`)p Fs(make)e(distclean)p Ft('.)p eop end
+%%Page: 128 134
+TeXDict begin 128 133 bop 150 -116 a Ft(128)2527 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fr(10.2)68 b(Compilers)46
+b(and)f(Options)150 458 y Ft(Some)28 b(systems)h(require)f(un)m(usual)f
+(options)i(for)f(compilation)i(or)f(linking)f(that)h(the)g
+Fs(configure)d Ft(script)150 568 y(do)s(es)32 b(not)g(kno)m(w)g(ab)s
+(out.)44 b(Y)-8 b(ou)33 b(can)f(giv)m(e)h Fs(configure)d
+Ft(initial)j(v)-5 b(alues)32 b(for)g(v)-5 b(ariables)32
+b(b)m(y)g(setting)h(them)150 677 y(in)k(the)g(en)m(vironmen)m(t.)62
+b(Using)38 b(a)f(Bourne-compatible)i(shell,)g(y)m(ou)f(can)g(do)f(that)
+h(on)f(the)g(command)150 787 y(line)31 b(lik)m(e)g(this:)390
+920 y Fs(CC=c89)46 b(CFLAGS=-O2)f(LIBS=-lposix)g(./configure)275
+1053 y Ft(On)29 b(systems)h(that)h(ha)m(v)m(e)h(the)f
+Fs(env)e Ft(program,)h(y)m(ou)h(can)g(do)f(it)h(lik)m(e)h(this:)390
+1186 y Fs(env)47 b(CPPFLAGS=-I/usr/local/in)o(clud)o(e)42
+b(LDFLAGS=-s)j(./configure)275 1318 y Ft(The)29 b(con\014guration)i
+(pro)s(cess)f(uses)g(GCC)g(to)h(build)e(Bash)i(if)f(it)h(is)g(a)m(v)-5
+b(ailable.)150 1548 y Fr(10.3)68 b(Compiling)46 b(F)-11
+b(or)45 b(Multiple)g(Arc)l(hitectures)150 1707 y Ft(Y)-8
+b(ou)27 b(can)g(compile)g(Bash)g(for)f(more)h(than)f(one)h(kind)f(of)g
+(computer)h(at)g(the)g(same)g(time,)h(b)m(y)e(placing)i(the)150
+1817 y(ob)5 b(ject)31 b(\014les)f(for)g(eac)m(h)i(arc)m(hitecture)f(in)
+f(their)g(o)m(wn)h(directory)-8 b(.)41 b(T)-8 b(o)31
+b(do)f(this,)g(y)m(ou)h(m)m(ust)f(use)g(a)g(v)m(ersion)150
+1926 y(of)25 b Fs(make)f Ft(that)h(supp)s(orts)f(the)h
+Fs(VPATH)e Ft(v)-5 b(ariable,)27 b(suc)m(h)e(as)g(GNU)h
+Fs(make)p Ft(.)37 b Fs(cd)25 b Ft(to)h(the)f(directory)g(where)g(y)m
+(ou)150 2036 y(w)m(an)m(t)34 b(the)f(ob)5 b(ject)34 b(\014les)f(and)f
+(executables)i(to)g(go)g(and)e(run)g(the)h Fs(configure)d
+Ft(script)j(from)g(the)g(source)150 2145 y(directory)-8
+b(.)41 b(Y)-8 b(ou)27 b(ma)m(y)h(need)f(to)g(supply)f(the)h(`)p
+Fs(--srcdir=PATH)p Ft(')d(argumen)m(t)k(to)g(tell)g Fs(configure)c
+Ft(where)150 2255 y(the)36 b(source)g(\014les)f(are.)57
+b Fs(configure)33 b Ft(automatically)39 b(c)m(hec)m(ks)e(for)e(the)h
+(source)g(co)s(de)f(in)h(the)f(directory)150 2364 y(that)c
+Fs(configure)d Ft(is)i(in)g(and)g(in)g(`..'.)275 2497
+y(If)20 b(y)m(ou)h(ha)m(v)m(e)i(to)e(use)g(a)g Fs(make)f
+Ft(that)i(do)s(es)e(not)i(supp)s(orts)d(the)i Fs(VPATH)e
+Ft(v)-5 b(ariable,)24 b(y)m(ou)e(can)f(compile)h(Bash)150
+2607 y(for)33 b(one)h(arc)m(hitecture)h(at)f(a)g(time)g(in)f(the)h
+(source)g(co)s(de)f(directory)-8 b(.)51 b(After)34 b(y)m(ou)g(ha)m(v)m
+(e)h(installed)f(Bash)150 2716 y(for)c(one)h(arc)m(hitecture,)h(use)e
+(`)p Fs(make)g(distclean)p Ft(')e(b)s(efore)i(recon\014guring)g(for)g
+(another)g(arc)m(hitecture.)275 2849 y(Alternativ)m(ely)-8
+b(,)26 b(if)21 b(y)m(our)h(system)g(supp)s(orts)d(sym)m(b)s(olic)j
+(links,)i(y)m(ou)e(can)g(use)f(the)h(`)p Fs(support/mkclone)p
+Ft(')150 2959 y(script)h(to)h(create)g(a)f(build)f(tree)i(whic)m(h)f
+(has)f(sym)m(b)s(olic)i(links)e(bac)m(k)i(to)g(eac)m(h)g(\014le)f(in)g
+(the)g(source)g(directory)-8 b(.)150 3068 y(Here's)41
+b(an)f(example)i(that)f(creates)h(a)e(build)g(directory)h(in)f(the)h
+(curren)m(t)f(directory)h(from)f(a)h(source)150 3178
+y(directory)31 b(`)p Fs(/usr/gnu/src/bash-2.0)p Ft(':)390
+3311 y Fs(bash)47 b(/usr/gnu/src/bash-2.0/s)o(uppo)o(rt/)o(mkcl)o(one)
+41 b(-s)47 b(/usr/gnu/src/bash-2.0)42 b(.)150 3444 y
+Ft(The)c Fs(mkclone)e Ft(script)i(requires)g(Bash,)i(so)f(y)m(ou)f(m)m
+(ust)h(ha)m(v)m(e)g(already)g(built)f(Bash)g(for)g(at)h(least)h(one)150
+3553 y(arc)m(hitecture)32 b(b)s(efore)e(y)m(ou)h(can)f(create)i(build)e
+(directories)h(for)f(other)h(arc)m(hitectures.)150 3782
+y Fr(10.4)68 b(Installation)47 b(Names)150 3942 y Ft(By)27
+b(default,)h(`)p Fs(make)i(install)p Ft(')25 b(will)j(install)g(in)m
+(to)g(`)p Fs(/usr/local/bin)p Ft(',)c(`)p Fs(/usr/local/man)p
+Ft(',)h(etc.)40 b(Y)-8 b(ou)150 4051 y(can)31 b(sp)s(ecify)f(an)h
+(installation)h(pre\014x)d(other)i(than)g(`)p Fs(/usr/local)p
+Ft(')d(b)m(y)i(giving)i Fs(configure)c Ft(the)i(option)150
+4161 y(`)p Fs(--prefix=)p Fi(PATH)11 b Ft(',)35 b(or)h(b)m(y)g(sp)s
+(ecifying)g(a)h(v)-5 b(alue)37 b(for)f(the)h Fs(DESTDIR)d
+Ft(`)p Fs(make)p Ft(')i(v)-5 b(ariable)37 b(when)f(running)150
+4271 y(`)p Fs(make)29 b(install)p Ft('.)275 4403 y(Y)-8
+b(ou)71 b(can)h(sp)s(ecify)f(separate)h(installation)h(pre\014xes)d
+(for)h(arc)m(hitecture-sp)s(eci\014c)i(\014les)f(and)150
+4513 y(arc)m(hitecture-indep)s(enden)m(t)38 b(\014les.)62
+b(If)37 b(y)m(ou)h(giv)m(e)g Fs(configure)d Ft(the)j(option)g(`)p
+Fs(--exec-prefix=)p Fi(PATH)11 b Ft(',)150 4623 y(`)p
+Fs(make)29 b(install)p Ft(')63 b(will)h(use)f Fq(P)-8
+b(A)g(TH)75 b Ft(as)64 b(the)g(pre\014x)e(for)i(installing)h(programs)e
+(and)h(libraries.)150 4732 y(Do)s(cumen)m(tation)32 b(and)e(other)h
+(data)g(\014les)f(will)h(still)g(use)f(the)h(regular)f(pre\014x.)150
+4961 y Fr(10.5)68 b(Sp)t(ecifying)45 b(the)g(System)h(T)l(yp)t(e)150
+5121 y Ft(There)f(ma)m(y)g(b)s(e)f(some)i(features)f
+Fs(configure)e Ft(can)i(not)g(\014gure)g(out)g(automatically)-8
+b(,)52 b(but)44 b(need)h(to)150 5230 y(determine)36 b(b)m(y)g(the)h(t)m
+(yp)s(e)f(of)g(host)h(Bash)f(will)h(run)d(on.)58 b(Usually)37
+b Fs(configure)d Ft(can)i(\014gure)g(that)g(out,)150
+5340 y(but)c(if)h(it)g(prin)m(ts)g(a)g(message)h(sa)m(ying)g(it)f(can)h
+(not)f(guess)g(the)g(host)g(t)m(yp)s(e,)h(giv)m(e)g(it)f(the)h(`)p
+Fs(--host=TYPE)p Ft(')p eop end
+%%Page: 129 135
+TeXDict begin 129 134 bop 150 -116 a Ft(Chapter)30 b(10:)41
+b(Installing)31 b(Bash)2356 b(129)150 299 y(option.)39
+b(`)p Fs(TYPE)p Ft(')25 b(can)g(either)g(b)s(e)g(a)g(short)g(name)g
+(for)g(the)g(system)g(t)m(yp)s(e,)h(suc)m(h)f(as)g(`)p
+Fs(sun4)p Ft(',)h(or)f(a)g(canonical)150 408 y(name)30
+b(with)g(three)h(\014elds:)40 b(`)p Fs(CPU-COMPANY-SYSTEM)p
+Ft(')26 b(\(e.g.,)32 b(`)p Fs(i386-unknown-freebsd4.2)p
+Ft('\).)275 539 y(See)e(the)h(\014le)f(`)p Fs(support/config.sub)p
+Ft(')c(for)k(the)h(p)s(ossible)f(v)-5 b(alues)30 b(of)h(eac)m(h)g
+(\014eld.)150 764 y Fr(10.6)68 b(Sharing)45 b(Defaults)150
+924 y Ft(If)d(y)m(ou)i(w)m(an)m(t)g(to)f(set)h(default)f(v)-5
+b(alues)43 b(for)g Fs(configure)d Ft(scripts)j(to)h(share,)i(y)m(ou)d
+(can)g(create)i(a)e(site)150 1033 y(shell)48 b(script)f(called)i
+Fs(config.site)44 b Ft(that)k(giv)m(es)h(default)f(v)-5
+b(alues)48 b(for)f(v)-5 b(ariables)48 b(lik)m(e)h Fs(CC)p
+Ft(,)j Fs(cache_)150 1143 y(file)p Ft(,)43 b(and)e Fs(prefix)p
+Ft(.)73 b Fs(configure)39 b Ft(lo)s(oks)j(for)f(`)p Fs
+(PREFIX/share/config.site)p Ft(')35 b(if)42 b(it)g(exists,)j(then)150
+1252 y(`)p Fs(PREFIX/etc/config.site)p Ft(')20 b(if)26
+b(it)g(exists.)40 b(Or,)26 b(y)m(ou)g(can)g(set)g(the)g
+Fs(CONFIG_SITE)c Ft(en)m(vironmen)m(t)k(v)-5 b(ari-)150
+1362 y(able)40 b(to)g(the)g(lo)s(cation)h(of)e(the)h(site)g(script.)67
+b(A)40 b(w)m(arning:)58 b(the)40 b(Bash)g Fs(configure)c
+Ft(lo)s(oks)k(for)f(a)h(site)150 1472 y(script,)31 b(but)e(not)i(all)g
+Fs(configure)d Ft(scripts)i(do.)150 1697 y Fr(10.7)68
+b(Op)t(eration)46 b(Con)l(trols)150 1856 y Fs(configure)28
+b Ft(recognizes)k(the)e(follo)m(wing)i(options)f(to)g(con)m(trol)h(ho)m
+(w)e(it)h(op)s(erates.)150 2008 y Fs(--cache-file=)p
+Fi(file)630 2117 y Ft(Use)k(and)g(sa)m(v)m(e)h(the)f(results)g(of)g
+(the)h(tests)f(in)g Fq(\014le)40 b Ft(instead)35 b(of)h(`)p
+Fs(./config.cache)p Ft('.)51 b(Set)630 2227 y Fq(\014le)36
+b Ft(to)31 b(`)p Fs(/dev/null)p Ft(')d(to)j(disable)g(cac)m(hing,)h
+(for)e(debugging)g Fs(configure)p Ft(.)150 2379 y Fs(--help)192
+b Ft(Prin)m(t)30 b(a)h(summary)e(of)i(the)f(options)h(to)g
+Fs(configure)p Ft(,)d(and)i(exit.)150 2531 y Fs(--quiet)150
+2641 y(--silent)150 2750 y(-q)384 b Ft(Do)31 b(not)g(prin)m(t)f
+(messages)h(sa)m(ying)g(whic)m(h)g(c)m(hec)m(ks)g(are)g(b)s(eing)f
+(made.)150 2902 y Fs(--srcdir=)p Fi(dir)630 3012 y Ft(Lo)s(ok)i(for)f
+(the)h(Bash)g(source)f(co)s(de)h(in)f(directory)h Fq(dir)7
+b Ft(.)44 b(Usually)32 b Fs(configure)d Ft(can)i(deter-)630
+3121 y(mine)f(that)h(directory)g(automatically)-8 b(.)150
+3273 y Fs(--version)630 3383 y Ft(Prin)m(t)29 b(the)h(v)m(ersion)g(of)g
+(Auto)s(conf)f(used)g(to)h(generate)h(the)f Fs(configure)d
+Ft(script,)j(and)f(exit.)275 3535 y Fs(configure)34 b
+Ft(also)k(accepts)g(some)g(other,)h(not)e(widely)g(used,)h(b)s
+(oilerplate)g(options.)61 b(`)p Fs(configure)150 3644
+y(--help)p Ft(')29 b(prin)m(ts)h(the)g(complete)i(list.)150
+3869 y Fr(10.8)68 b(Optional)46 b(F)-11 b(eatures)150
+4029 y Ft(The)24 b(Bash)g Fs(configure)e Ft(has)h(a)i(n)m(um)m(b)s(er)e
+(of)h(`)p Fs(--enable-)p Fi(feature)11 b Ft(')20 b(options,)26
+b(where)d Fq(feature)30 b Ft(indicates)150 4138 y(an)f(optional)i(part)
+e(of)g(Bash.)41 b(There)28 b(are)i(also)g(sev)m(eral)h(`)p
+Fs(--with-)p Fi(package)11 b Ft(')25 b(options,)30 b(where)f
+Fq(pac)m(k)-5 b(age)150 4248 y Ft(is)32 b(something)h(lik)m(e)h(`)p
+Fs(bash-malloc)p Ft(')c(or)i(`)p Fs(purify)p Ft('.)45
+b(T)-8 b(o)33 b(turn)e(o\013)i(the)f(default)h(use)f(of)g(a)h(pac)m(k)
+-5 b(age,)35 b(use)150 4357 y(`)p Fs(--without-)p Fi(package)11
+b Ft('.)36 b(T)-8 b(o)29 b(con\014gure)g(Bash)h(without)f(a)g(feature)h
+(that)g(is)f(enabled)g(b)m(y)g(default,)h(use)150 4467
+y(`)p Fs(--disable-)p Fi(feature)11 b Ft('.)275 4598
+y(Here)21 b(is)g(a)g(complete)h(list)g(of)f(the)g(`)p
+Fs(--enable-)p Ft(')e(and)h(`)p Fs(--with-)p Ft(')g(options)h(that)g
+(the)g(Bash)g Fs(configure)150 4707 y Ft(recognizes.)150
+4859 y Fs(--with-afs)630 4969 y Ft(De\014ne)31 b(if)f(y)m(ou)h(are)f
+(using)g(the)h(Andrew)e(File)j(System)e(from)g(T)-8 b(ransarc.)150
+5121 y Fs(--with-bash-malloc)630 5230 y Ft(Use)31 b(the)g(Bash)f(v)m
+(ersion)i(of)e Fs(malloc)f Ft(in)h(the)h(directory)g(`)p
+Fs(lib/malloc)p Ft('.)39 b(This)30 b(is)h(not)g(the)630
+5340 y(same)h Fs(malloc)e Ft(that)j(app)s(ears)e(in)g
+Fl(gnu)h Ft(lib)s(c,)g(but)f(an)h(older)f(v)m(ersion)i(originally)g
+(deriv)m(ed)p eop end
+%%Page: 130 136
+TeXDict begin 130 135 bop 150 -116 a Ft(130)2527 b(Bash)31
+b(Reference)g(Man)m(ual)630 299 y(from)h(the)h(4.2)g
+Fl(bsd)f Fs(malloc)p Ft(.)45 b(This)31 b Fs(malloc)g
+Ft(is)i(v)m(ery)f(fast,)i(but)e(w)m(astes)h(some)g(space)g(on)630
+408 y(eac)m(h)g(allo)s(cation.)48 b(This)31 b(option)i(is)f(enabled)g
+(b)m(y)g(default.)46 b(The)31 b(`)p Fs(NOTES)p Ft(')g(\014le)h(con)m
+(tains)i(a)630 518 y(list)29 b(of)f(systems)f(for)h(whic)m(h)g(this)g
+(should)e(b)s(e)i(turned)e(o\013,)j(and)f Fs(configure)d
+Ft(disables)j(this)630 628 y(option)j(automatically)i(for)d(a)h(n)m(um)
+m(b)s(er)e(of)i(systems.)150 798 y Fs(--with-curses)630
+907 y Ft(Use)h(the)h(curses)e(library)h(instead)g(of)h(the)f(termcap)g
+(library)-8 b(.)46 b(This)32 b(should)f(b)s(e)g(supplied)630
+1017 y(if)f(y)m(our)h(system)f(has)g(an)h(inadequate)g(or)f(incomplete)
+i(termcap)e(database.)150 1187 y Fs(--with-gnu-malloc)630
+1297 y Ft(A)g(synon)m(ym)g(for)g Fs(--with-bash-malloc)p
+Ft(.)150 1467 y Fs(--with-installed-readlin)o(e[=)p Fi(P)o(REFI)o(X)11
+b Fs(])630 1576 y Ft(De\014ne)26 b(this)f(to)h(mak)m(e)h(Bash)f(link)f
+(with)g(a)h(lo)s(cally-installed)i(v)m(ersion)e(of)g(Readline)g(rather)
+630 1686 y(than)38 b(the)h(v)m(ersion)g(in)g(`)p Fs(lib/readline)p
+Ft('.)62 b(This)38 b(w)m(orks)h(only)f(with)h(Readline)g(5.0)h(and)630
+1796 y(later)29 b(v)m(ersions.)40 b(If)28 b Fq(PREFIX)37
+b Ft(is)28 b Fs(yes)f Ft(or)h(not)g(supplied,)f Fs(configure)f
+Ft(uses)h(the)h(v)-5 b(alues)29 b(of)630 1905 y(the)c(mak)m(e)g(v)-5
+b(ariables)25 b Fs(includedir)d Ft(and)h Fs(libdir)p
+Ft(,)h(whic)m(h)h(are)f(sub)s(directories)g(of)h Fs(prefix)630
+2015 y Ft(b)m(y)32 b(default,)g(to)h(\014nd)d(the)i(installed)h(v)m
+(ersion)f(of)g(Readline)h(if)f(it)g(is)g(not)g(in)g(the)g(standard)630
+2124 y(system)j(include)f(and)g(library)g(directories.)54
+b(If)34 b Fq(PREFIX)43 b Ft(is)35 b Fs(no)p Ft(,)g(Bash)f(links)h(with)
+f(the)630 2234 y(v)m(ersion)k(in)f(`)p Fs(lib/readline)p
+Ft('.)58 b(If)37 b Fq(PREFIX)46 b Ft(is)38 b(set)g(to)g(an)m(y)f(other)
+h(v)-5 b(alue,)39 b Fs(configure)630 2344 y Ft(treats)27
+b(it)g(as)f(a)h(directory)g(pathname)f(and)f(lo)s(oks)i(for)f(the)g
+(installed)h(v)m(ersion)g(of)f(Readline)630 2453 y(in)34
+b(sub)s(directories)f(of)h(that)h(directory)g(\(include)f(\014les)g(in)
+g Fq(PREFIX)9 b Ft(/)p Fs(include)32 b Ft(and)i(the)630
+2563 y(library)c(in)g Fq(PREFIX)9 b Ft(/)p Fs(lib)p Ft(\).)150
+2733 y Fs(--with-purify)630 2843 y Ft(De\014ne)23 b(this)g(to)h(use)f
+(the)g(Purify)f(memory)h(allo)s(cation)i(c)m(hec)m(k)m(er)g(from)e
+(Rational)i(Soft)m(w)m(are.)150 3013 y Fs(--enable-minimal-config)630
+3122 y Ft(This)e(pro)s(duces)f(a)i(shell)g(with)f(minimal)h(features,)h
+(close)g(to)f(the)g(historical)h(Bourne)e(shell.)275
+3298 y(There)g(are)i(sev)m(eral)g(`)p Fs(--enable-)p
+Ft(')d(options)j(that)f(alter)h(ho)m(w)g(Bash)f(is)g(compiled)h(and)e
+(link)m(ed,)j(rather)150 3407 y(than)k(c)m(hanging)h(run-time)f
+(features.)150 3583 y Fs(--enable-largefile)630 3693
+y Ft(Enable)76 b(supp)s(ort)f(for)h(large)h(\014les)f(\()p
+Fs(http://www.sas.com/standar)o(ds/l)o(arge)o(_)630 3802
+y(file/x_open.20Mar96.html)o Ft(\))23 b(if)28 b(the)g(op)s(erating)h
+(system)f(requires)g(sp)s(ecial)g(compiler)630 3912 y(options)45
+b(to)g(build)e(programs)h(whic)m(h)g(can)g(access)i(large)f(\014les.)82
+b(This)44 b(is)g(enabled)g(b)m(y)630 4021 y(default,)31
+b(if)f(the)h(op)s(erating)g(system)f(pro)m(vides)g(large)i(\014le)e
+(supp)s(ort.)150 4191 y Fs(--enable-profiling)630 4301
+y Ft(This)h(builds)f(a)i(Bash)g(binary)f(that)h(pro)s(duces)e
+(pro\014ling)h(information)h(to)h(b)s(e)d(pro)s(cessed)630
+4411 y(b)m(y)g Fs(gprof)f Ft(eac)m(h)j(time)f(it)g(is)f(executed.)150
+4581 y Fs(--enable-static-link)630 4690 y Ft(This)37
+b(causes)h(Bash)f(to)h(b)s(e)f(link)m(ed)h(statically)-8
+b(,)43 b(if)37 b Fs(gcc)g Ft(is)g(b)s(eing)g(used.)61
+b(This)37 b(could)h(b)s(e)630 4800 y(used)30 b(to)h(build)e(a)i(v)m
+(ersion)g(to)g(use)f(as)g(ro)s(ot's)h(shell.)275 4976
+y(The)f(`)p Fs(minimal-config)p Ft(')d(option)k(can)g(b)s(e)f(used)f
+(to)j(disable)e(all)i(of)f(the)f(follo)m(wing)i(options,)g(but)d(it)150
+5085 y(is)h(pro)s(cessed)g(\014rst,)g(so)h(individual)f(options)g(ma)m
+(y)h(b)s(e)f(enabled)g(using)g(`)p Fs(enable-)p Fi(feature)11
+b Ft('.)275 5230 y(All)37 b(of)g(the)f(follo)m(wing)i(options)f(except)
+h(for)e(`)p Fs(disabled-builtins)p Ft(')d(and)j(`)p Fs
+(xpg-echo-default)p Ft(')150 5340 y(are)26 b(enabled)g(b)m(y)g
+(default,)h(unless)f(the)g(op)s(erating)g(system)g(do)s(es)g(not)g(pro)
+m(vide)g(the)g(necessary)g(supp)s(ort.)p eop end
+%%Page: 131 137
+TeXDict begin 131 136 bop 150 -116 a Ft(Chapter)30 b(10:)41
+b(Installing)31 b(Bash)2356 b(131)150 299 y Fs(--enable-alias)630
+408 y Ft(Allo)m(w)41 b(alias)g(expansion)f(and)f(include)g(the)h
+Fs(alias)f Ft(and)g Fs(unalias)e Ft(builtins)j(\(see)g(Sec-)630
+518 y(tion)31 b(6.6)g([Aliases],)i(page)e(79\).)150 692
+y Fs(--enable-arith-for-comma)o(nd)630 801 y Ft(Include)21
+b(supp)s(ort)g(for)g(the)i(alternate)g(form)f(of)g(the)g
+Fs(for)f Ft(command)h(that)h(b)s(eha)m(v)m(es)f(lik)m(e)i(the)630
+911 y(C)30 b(language)i Fs(for)d Ft(statemen)m(t)j(\(see)g(Section)f
+(3.2.4.1)i([Lo)s(oping)d(Constructs],)h(page)g(9\).)150
+1084 y Fs(--enable-array-variables)630 1194 y Ft(Include)h(supp)s(ort)g
+(for)h(one-dimensional)h(arra)m(y)f(shell)h(v)-5 b(ariables)33
+b(\(see)h(Section)g(6.7)h([Ar-)630 1303 y(ra)m(ys],)c(page)g(80\).)150
+1477 y Fs(--enable-bang-history)630 1587 y Ft(Include)36
+b(supp)s(ort)f(for)h Fs(csh)p Ft(-lik)m(e)h(history)g(substitution)f
+(\(see)h(Section)g(9.3)h([History)f(In-)630 1696 y(teraction],)c(page)e
+(123\).)150 1870 y Fs(--enable-brace-expansion)630 1979
+y Ft(Include)40 b Fs(csh)p Ft(-lik)m(e)h(brace)f(expansion)g(\()h
+Fs(b{a,b}c)d Fp(7!)i Fs(bac)30 b(bbc)39 b Ft(\).)71 b(See)40
+b(Section)h(3.5.1)630 2089 y([Brace)32 b(Expansion],)e(page)h(18,)h
+(for)e(a)g(complete)i(description.)150 2262 y Fs
+(--enable-casemod-attribu)o(tes)630 2372 y Ft(Include)37
+b(supp)s(ort)g(for)g(case-mo)s(difying)i(attributes)g(in)e(the)h
+Fs(declare)e Ft(builtin)i(and)f(as-)630 2482 y(signmen)m(t)29
+b(statemen)m(ts.)41 b(V)-8 b(ariables)30 b(with)e(the)g
+Fq(upp)s(ercase)k Ft(attribute,)e(for)e(example,)i(will)630
+2591 y(ha)m(v)m(e)i(their)e(v)-5 b(alues)31 b(con)m(v)m(erted)h(to)f
+(upp)s(ercase)e(up)s(on)g(assignmen)m(t.)150 2765 y Fs
+(--enable-casemod-expansi)o(on)630 2874 y Ft(Include)h(supp)s(ort)e
+(for)i(case-mo)s(difying)i(w)m(ord)e(expansions.)150
+3048 y Fs(--enable-command-timing)630 3157 y Ft(Include)43
+b(supp)s(ort)f(for)h(recognizing)i Fs(time)e Ft(as)g(a)h(reserv)m(ed)g
+(w)m(ord)f(and)g(for)h(displa)m(ying)630 3267 y(timing)37
+b(statistics)h(for)e(the)g(pip)s(eline)g(follo)m(wing)i
+Fs(time)d Ft(\(see)i(Section)g(3.2.2)h([Pip)s(elines],)630
+3377 y(page)24 b(8\).)39 b(This)23 b(allo)m(ws)h(pip)s(elines)f(as)h(w)
+m(ell)g(as)g(shell)f(builtins)g(and)g(functions)g(to)h(b)s(e)e(timed.)
+150 3550 y Fs(--enable-cond-command)630 3660 y Ft(Include)33
+b(supp)s(ort)f(for)i(the)g Fs([[)f Ft(conditional)i(command.)51
+b(\(see)34 b(Section)h(3.2.4.2)h([Condi-)630 3769 y(tional)c
+(Constructs],)e(page)h(10\).)150 3943 y Fs(--enable-cond-regexp)630
+4052 y Ft(Include)f(supp)s(ort)f(for)i(matc)m(hing)h(POSIX)d(regular)i
+(expressions)g(using)f(the)h(`)p Fs(=~)p Ft(')g(binary)630
+4162 y(op)s(erator)25 b(in)f(the)h Fs([[)f Ft(conditional)h(command.)39
+b(\(see)25 b(Section)h(3.2.4.2)h([Conditional)e(Con-)630
+4271 y(structs],)31 b(page)g(10\).)150 4445 y Fs(--enable-coprocesses)
+630 4555 y Ft(Include)23 b(supp)s(ort)f(for)i(copro)s(cesses)g(and)f
+(the)h Fs(coproc)e Ft(reserv)m(ed)i(w)m(ord)g(\(see)h(Section)f(3.2.2)
+630 4664 y([Pip)s(elines],)31 b(page)g(8\).)150 4838
+y Fs(--enable-debugger)630 4947 y Ft(Include)f(supp)s(ort)e(for)i(the)h
+(bash)f(debugger)g(\(distributed)g(separately\).)150
+5121 y Fs(--enable-directory-stack)630 5230 y Ft(Include)j(supp)s(ort)g
+(for)h(a)g Fs(csh)p Ft(-lik)m(e)h(directory)f(stac)m(k)i(and)d(the)i
+Fs(pushd)p Ft(,)f Fs(popd)p Ft(,)g(and)f Fs(dirs)630
+5340 y Ft(builtins)d(\(see)h(Section)g(6.8)h([The)e(Directory)i(Stac)m
+(k],)g(page)f(81\).)p eop end
+%%Page: 132 138
+TeXDict begin 132 137 bop 150 -116 a Ft(132)2527 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fs(--enable-disabled-builti)o(ns)630
+408 y Ft(Allo)m(w)40 b(builtin)e(commands)g(to)h(b)s(e)f(in)m(v)m(ok)m
+(ed)i(via)f(`)p Fs(builtin)29 b(xxx)p Ft(')37 b(ev)m(en)j(after)f
+Fs(xxx)e Ft(has)630 518 y(b)s(een)31 b(disabled)g(using)g(`)p
+Fs(enable)d(-n)i(xxx)p Ft('.)43 b(See)32 b(Section)g(4.2)h([Bash)e
+(Builtins],)i(page)f(41,)630 628 y(for)e(details)i(of)e(the)h
+Fs(builtin)d Ft(and)i Fs(enable)e Ft(builtin)i(commands.)150
+783 y Fs(--enable-dparen-arithmet)o(ic)630 892 y Ft(Include)42
+b(supp)s(ort)f(for)h(the)h Fs(\(\(...)o(\)\))f Ft(command)g(\(see)i
+(Section)f(3.2.4.2)i([Conditional)630 1002 y(Constructs],)30
+b(page)h(10\).)150 1157 y Fs(--enable-extended-glob)630
+1267 y Ft(Include)40 b(supp)s(ort)e(for)i(the)h(extended)f(pattern)h
+(matc)m(hing)g(features)g(describ)s(ed)e(ab)s(o)m(v)m(e)630
+1377 y(under)29 b(Section)i(3.5.8.1)i([P)m(attern)e(Matc)m(hing],)i
+(page)e(24.)150 1532 y Fs(--enable-extended-glob-d)o(efau)o(lt)630
+1641 y Ft(Set)40 b(the)g(default)g(v)-5 b(alue)41 b(of)f(the)g
+Fq(extglob)j Ft(shell)d(option)g(describ)s(ed)f(ab)s(o)m(v)m(e)i(under)
+d(Sec-)630 1751 y(tion)31 b(4.3.2)h([The)e(Shopt)g(Builtin],)h(page)g
+(55)g(to)h(b)s(e)d(enabled.)150 1906 y Fs(--enable-help-builtin)630
+2016 y Ft(Include)24 b(the)h Fs(help)f Ft(builtin,)h(whic)m(h)g(displa)
+m(ys)f(help)h(on)f(shell)h(builtins)f(and)h(v)-5 b(ariables)25
+b(\(see)630 2125 y(Section)31 b(4.2)h([Bash)e(Builtins],)i(page)f
+(41\).)150 2281 y Fs(--enable-history)630 2390 y Ft(Include)e(command)g
+(history)h(and)f(the)h Fs(fc)f Ft(and)g Fs(history)e
+Ft(builtin)j(commands)f(\(see)h(Sec-)630 2500 y(tion)h(9.1)g([Bash)g
+(History)g(F)-8 b(acilities],)34 b(page)d(121\).)150
+2655 y Fs(--enable-job-control)630 2765 y Ft(This)e(enables)i(the)f
+(job)g(con)m(trol)h(features)g(\(see)g(Chapter)f(7)g([Job)g(Con)m
+(trol],)h(page)g(89\),)h(if)630 2874 y(the)f(op)s(erating)f(system)h
+(supp)s(orts)d(them.)150 3029 y Fs(--enable-multibyte)630
+3139 y Ft(This)h(enables)i(supp)s(ort)d(for)i(m)m(ultib)m(yte)h(c)m
+(haracters)g(if)f(the)g(op)s(erating)h(system)f(pro)m(vides)630
+3249 y(the)h(necessary)f(supp)s(ort.)150 3404 y Fs
+(--enable-net-redirection)o(s)630 3513 y Ft(This)21 b(enables)h(the)g
+(sp)s(ecial)h(handling)e(of)h(\014lenames)g(of)g(the)g(form)f
+Fs(/dev/tcp/)p Fi(host)11 b Fs(/)p Fi(port)630 3623 y
+Ft(and)29 b Fs(/dev/udp/)p Fi(host)11 b Fs(/)p Fi(port)34
+b Ft(when)28 b(used)g(in)h(redirections)h(\(see)g(Section)g(3.6)g
+([Redirec-)630 3733 y(tions],)h(page)g(26\).)150 3888
+y Fs(--enable-process-substit)o(utio)o(n)630 3998 y Ft(This)49
+b(enables)i(pro)s(cess)f(substitution)g(\(see)h(Section)g(3.5.6)h([Pro)
+s(cess)e(Substitution],)630 4107 y(page)31 b(23\))h(if)e(the)h(op)s
+(erating)f(system)h(pro)m(vides)f(the)h(necessary)g(supp)s(ort.)150
+4262 y Fs(--enable-progcomp)630 4372 y Ft(Enable)d(the)g(programmable)g
+(completion)i(facilities)g(\(see)f(Section)g(8.6)g([Programmable)630
+4482 y(Completion],)i(page)h(115\).)42 b(If)30 b(Readline)h(is)f(not)h
+(enabled,)f(this)h(option)g(has)f(no)g(e\013ect.)150
+4637 y Fs(--enable-prompt-string-d)o(ecod)o(ing)630 4746
+y Ft(T)-8 b(urn)46 b(on)h(the)h(in)m(terpretation)g(of)g(a)g(n)m(um)m
+(b)s(er)e(of)h(bac)m(kslash-escap)s(ed)h(c)m(haracters)h(in)630
+4856 y(the)39 b Fs($PS1)p Ft(,)g Fs($PS2)p Ft(,)h Fs($PS3)p
+Ft(,)f(and)f Fs($PS4)f Ft(prompt)h(strings.)64 b(See)39
+b(Section)g(6.9)h([Prin)m(ting)f(a)630 4966 y(Prompt],)30
+b(page)h(82,)h(for)e(a)h(complete)h(list)f(of)f(prompt)g(string)g
+(escap)s(e)h(sequences.)150 5121 y Fs(--enable-readline)630
+5230 y Ft(Include)d(supp)s(ort)f(for)h(command-line)h(editing)g(and)f
+(history)g(with)g(the)h(Bash)g(v)m(ersion)g(of)630 5340
+y(the)i(Readline)g(library)f(\(see)h(Chapter)f(8)g([Command)g(Line)g
+(Editing],)h(page)g(93\).)p eop end
+%%Page: 133 139
+TeXDict begin 133 138 bop 150 -116 a Ft(Chapter)30 b(10:)41
+b(Installing)31 b(Bash)2356 b(133)150 299 y Fs(--enable-restricted)630
+408 y Ft(Include)41 b(supp)s(ort)f(for)i(a)g Fq(restricted)g(shell)p
+Ft(.)75 b(If)42 b(this)f(is)h(enabled,)j(Bash,)g(when)c(called)630
+518 y(as)f Fs(rbash)p Ft(,)h(en)m(ters)f(a)g(restricted)h(mo)s(de.)68
+b(See)40 b(Section)h(6.10)g([The)f(Restricted)h(Shell],)630
+628 y(page)31 b(84,)h(for)e(a)g(description)h(of)f(restricted)h(mo)s
+(de.)150 787 y Fs(--enable-select)630 897 y Ft(Include)k(the)g
+Fs(select)f Ft(builtin,)i(whic)m(h)f(allo)m(ws)i(the)f(generation)g(of)
+g(simple)f(men)m(us)g(\(see)630 1006 y(Section)c(3.2.4.2)i
+([Conditional)e(Constructs],)g(page)g(10\).)150 1166
+y Fs(--enable-separate-helpfi)o(les)630 1275 y Ft(Use)h(external)h
+(\014les)f(for)g(the)g(do)s(cumen)m(tation)h(displa)m(y)m(ed)f(b)m(y)g
+(the)g Fs(help)f Ft(builtin)h(instead)630 1385 y(of)f(storing)f(the)h
+(text)g(in)m(ternally)-8 b(.)150 1544 y Fs(--enable-single-help-str)o
+(ings)630 1654 y Ft(Store)40 b(the)g(text)h(displa)m(y)m(ed)g(b)m(y)e
+(the)i Fs(help)d Ft(builtin)i(as)g(a)g(single)h(string)f(for)f(eac)m(h)
+i(help)630 1763 y(topic.)54 b(This)33 b(aids)i(in)f(translating)h(the)g
+(text)g(to)g(di\013eren)m(t)g(languages.)54 b(Y)-8 b(ou)35
+b(ma)m(y)g(need)630 1873 y(to)c(disable)g(this)f(if)g(y)m(our)h
+(compiler)g(cannot)f(handle)g(v)m(ery)h(long)g(string)f(literals.)150
+2032 y Fs(--enable-strict-posix-de)o(faul)o(t)630 2142
+y Ft(Mak)m(e)c(Bash)f Fl(posix)p Ft(-conforman)m(t)g(b)m(y)f(default)h
+(\(see)g(Section)h(6.11)g([Bash)f(POSIX)e(Mo)s(de],)630
+2252 y(page)31 b(84\).)150 2411 y Fs(--enable-usg-echo-defaul)o(t)630
+2521 y Ft(A)f(synon)m(ym)g(for)g Fs(--enable-xpg-echo-default)p
+Ft(.)150 2680 y Fs(--enable-xpg-echo-defaul)o(t)630 2790
+y Ft(Mak)m(e)c(the)f Fs(echo)e Ft(builtin)i(expand)f(bac)m
+(kslash-escap)s(ed)h(c)m(haracters)h(b)m(y)f(default,)h(without)630
+2899 y(requiring)41 b(the)g(`)p Fs(-e)p Ft(')g(option.)73
+b(This)41 b(sets)g(the)g(default)h(v)-5 b(alue)41 b(of)h(the)f
+Fs(xpg_echo)e Ft(shell)630 3009 y(option)26 b(to)g Fs(on)p
+Ft(,)g(whic)m(h)g(mak)m(es)g(the)g(Bash)g Fs(echo)e Ft(b)s(eha)m(v)m(e)
+i(more)g(lik)m(e)h(the)f(v)m(ersion)g(sp)s(eci\014ed)630
+3118 y(in)41 b(the)h(Single)g(Unix)f(Sp)s(eci\014cation,)k(v)m(ersion)e
+(3.)74 b(See)42 b(Section)g(4.2)h([Bash)f(Builtins],)630
+3228 y(page)31 b(41,)h(for)e(a)g(description)h(of)f(the)h(escap)s(e)g
+(sequences)f(that)h Fs(echo)f Ft(recognizes.)275 3387
+y(The)23 b(\014le)i(`)p Fs(config-top.h)p Ft(')c(con)m(tains)26
+b(C)e(Prepro)s(cessor)g(`)p Fs(#define)p Ft(')e(statemen)m(ts)k(for)f
+(options)f(whic)m(h)150 3497 y(are)35 b(not)g(settable)i(from)d
+Fs(configure)p Ft(.)51 b(Some)35 b(of)g(these)g(are)h(not)f(mean)m(t)g
+(to)h(b)s(e)e(c)m(hanged;)k(b)s(ew)m(are)d(of)150 3606
+y(the)h(consequences)g(if)f(y)m(ou)h(do.)55 b(Read)36
+b(the)g(commen)m(ts)g(asso)s(ciated)h(with)e(eac)m(h)i(de\014nition)e
+(for)g(more)150 3716 y(information)c(ab)s(out)f(its)h(e\013ect.)p
+eop end
+%%Page: 134 140
+TeXDict begin 134 139 bop eop end
+%%Page: 135 141
+TeXDict begin 135 140 bop 150 -116 a Ft(App)s(endix)29
+b(A:)h(Rep)s(orting)h(Bugs)2299 b(135)150 299 y Fo(App)t(endix)52
+b(A)81 b(Rep)t(orting)53 b(Bugs)150 533 y Ft(Please)33
+b(rep)s(ort)e(all)h(bugs)f(y)m(ou)h(\014nd)e(in)i(Bash.)44
+b(But)32 b(\014rst,)g(y)m(ou)g(should)e(mak)m(e)j(sure)e(that)h(it)g
+(really)h(is)f(a)150 643 y(bug,)d(and)g(that)h(it)g(app)s(ears)f(in)g
+(the)h(latest)h(v)m(ersion)f(of)g(Bash.)40 b(The)29 b(latest)j(v)m
+(ersion)e(of)f(Bash)h(is)f(alw)m(a)m(ys)150 752 y(a)m(v)-5
+b(ailable)33 b(for)d(FTP)g(from)g Fs(ftp://ftp.gnu.org/pub/gn)o(u/ba)o
+(sh/)o Ft(.)275 887 y(Once)41 b(y)m(ou)g(ha)m(v)m(e)h(determined)f
+(that)h(a)f(bug)g(actually)h(exists,)j(use)c(the)g Fs(bashbug)e
+Ft(command)i(to)150 996 y(submit)25 b(a)h(bug)g(rep)s(ort.)38
+b(If)26 b(y)m(ou)g(ha)m(v)m(e)h(a)f(\014x,)h(y)m(ou)f(are)g(encouraged)
+h(to)f(mail)h(that)f(as)g(w)m(ell!)40 b(Suggestions)150
+1106 y(and)20 b(`philosophical')j(bug)d(rep)s(orts)g(ma)m(y)i(b)s(e)e
+(mailed)i(to)g Fs(bug-bash@gnu.org)17 b Ft(or)k(p)s(osted)f(to)i(the)f
+(Usenet)150 1215 y(newsgroup)29 b Fs(gnu.bash.bug)p Ft(.)275
+1350 y(All)i(bug)e(rep)s(orts)h(should)f(include:)225
+1484 y Fp(\017)60 b Ft(The)30 b(v)m(ersion)h(n)m(um)m(b)s(er)e(of)h
+(Bash.)225 1619 y Fp(\017)60 b Ft(The)30 b(hardw)m(are)g(and)g(op)s
+(erating)g(system.)225 1753 y Fp(\017)60 b Ft(The)30
+b(compiler)h(used)e(to)i(compile)h(Bash.)225 1888 y Fp(\017)60
+b Ft(A)30 b(description)h(of)f(the)h(bug)f(b)s(eha)m(viour.)225
+2022 y Fp(\017)60 b Ft(A)30 b(short)h(script)f(or)g(`recip)s(e')h(whic)
+m(h)f(exercises)i(the)e(bug)g(and)g(ma)m(y)h(b)s(e)f(used)f(to)i(repro)
+s(duce)e(it.)150 2182 y Fs(bashbug)d Ft(inserts)i(the)h(\014rst)f
+(three)g(items)h(automatically)i(in)m(to)f(the)e(template)i(it)f(pro)m
+(vides)f(for)g(\014ling)h(a)150 2291 y(bug)h(rep)s(ort.)275
+2426 y(Please)h(send)f(all)h(rep)s(orts)f(concerning)g(this)h(man)m
+(ual)f(to)h Fs(chet.ramey@case.edu)p Ft(.)p eop end
+%%Page: 136 142
+TeXDict begin 136 141 bop eop end
+%%Page: 137 143
+TeXDict begin 137 142 bop 150 -116 a Ft(App)s(endix)29
+b(B:)i(Ma)5 b(jor)31 b(Di\013erences)g(F)-8 b(rom)31
+b(The)f(Bourne)g(Shell)1258 b(137)150 141 y Fo(App)t(endix)58
+b(B)81 b(Ma)9 b(jor)54 b(Di\013erences)d(F)-13 b(rom)54
+b(The)g(Bourne)1088 299 y(Shell)150 530 y Ft(Bash)26
+b(implemen)m(ts)h(essen)m(tially)g(the)g(same)f(grammar,)h(parameter)f
+(and)g(v)-5 b(ariable)27 b(expansion,)g(redirec-)150
+640 y(tion,)i(and)e(quoting)g(as)h(the)g(Bourne)f(Shell.)40
+b(Bash)27 b(uses)g(the)h Fl(posix)f Ft(standard)f(as)i(the)g(sp)s
+(eci\014cation)g(of)150 749 y(ho)m(w)34 b(these)h(features)g(are)g(to)g
+(b)s(e)f(implemen)m(ted.)53 b(There)34 b(are)h(some)g(di\013erences)g
+(b)s(et)m(w)m(een)g(the)g(tradi-)150 859 y(tional)e(Bourne)e(shell)h
+(and)f(Bash;)i(this)f(section)g(quic)m(kly)h(details)g(the)e
+(di\013erences)h(of)g(signi\014cance.)46 b(A)150 969
+y(n)m(um)m(b)s(er)24 b(of)h(these)h(di\013erences)f(are)h(explained)f
+(in)g(greater)h(depth)f(in)g(previous)f(sections.)40
+b(This)25 b(section)150 1078 y(uses)33 b(the)i(v)m(ersion)f(of)g
+Fs(sh)f Ft(included)g(in)h(SVR4.2)h(\(the)f(last)h(v)m(ersion)f(of)g
+(the)g(historical)i(Bourne)d(shell\))150 1188 y(as)e(the)f(baseline)h
+(reference.)225 1322 y Fp(\017)60 b Ft(Bash)32 b(is)h
+Fl(posix)p Ft(-conforman)m(t,)g(ev)m(en)g(where)f(the)g
+Fl(posix)g Ft(sp)s(eci\014cation)h(di\013ers)f(from)g(traditional)330
+1431 y Fs(sh)e Ft(b)s(eha)m(vior)g(\(see)i(Section)f(6.11)h([Bash)e
+(POSIX)g(Mo)s(de],)h(page)g(84\).)225 1565 y Fp(\017)60
+b Ft(Bash)26 b(has)g(m)m(ulti-c)m(haracter)i(in)m(v)m(o)s(cation)g
+(options)f(\(see)f(Section)h(6.1)g([In)m(v)m(oking)g(Bash],)h(page)e
+(71\).)225 1699 y Fp(\017)60 b Ft(Bash)28 b(has)g(command-line)h
+(editing)f(\(see)h(Chapter)f(8)g([Command)f(Line)h(Editing],)i(page)e
+(93\))i(and)330 1809 y(the)h Fs(bind)e Ft(builtin.)225
+1943 y Fp(\017)60 b Ft(Bash)46 b(pro)m(vides)g(a)g(programmable)g(w)m
+(ord)f(completion)i(mec)m(hanism)f(\(see)h(Section)g(8.6)g([Pro-)330
+2052 y(grammable)39 b(Completion],)i(page)e(115\),)i(and)d(builtin)g
+(commands)f Fs(complete)p Ft(,)h Fs(compgen)p Ft(,)h(and)330
+2162 y Fs(compopt)p Ft(,)29 b(to)i(manipulate)g(it.)225
+2296 y Fp(\017)60 b Ft(Bash)26 b(has)f(command)h(history)f(\(see)i
+(Section)f(9.1)h([Bash)f(History)h(F)-8 b(acilities],)30
+b(page)c(121\))i(and)d(the)330 2405 y Fs(history)k Ft(and)h
+Fs(fc)g Ft(builtins)g(to)h(manipulate)g(it.)42 b(The)30
+b(Bash)h(history)g(list)g(main)m(tains)g(timestamp)330
+2515 y(information)g(and)e(uses)h(the)h(v)-5 b(alue)31
+b(of)f(the)h Fs(HISTTIMEFORMAT)26 b Ft(v)-5 b(ariable)32
+b(to)f(displa)m(y)f(it.)225 2649 y Fp(\017)60 b Ft(Bash)48
+b(implemen)m(ts)h Fs(csh)p Ft(-lik)m(e)g(history)f(expansion)g(\(see)h
+(Section)g(9.3)h([History)f(In)m(teraction],)330 2759
+y(page)31 b(123\).)225 2892 y Fp(\017)60 b Ft(Bash)33
+b(has)g(one-dimensional)h(arra)m(y)f(v)-5 b(ariables)34
+b(\(see)g(Section)g(6.7)g([Arra)m(ys],)g(page)g(80\),)h(and)e(the)330
+3002 y(appropriate)39 b(v)-5 b(ariable)40 b(expansions)f(and)g
+(assignmen)m(t)h(syn)m(tax)g(to)g(use)f(them.)67 b(Sev)m(eral)40
+b(of)g(the)330 3112 y(Bash)32 b(builtins)f(tak)m(e)j(options)e(to)h
+(act)g(on)e(arra)m(ys.)46 b(Bash)32 b(pro)m(vides)g(a)g(n)m(um)m(b)s
+(er)f(of)h(built-in)f(arra)m(y)330 3221 y(v)-5 b(ariables.)225
+3355 y Fp(\017)60 b Ft(The)37 b Fs($'...)n(')g Ft(quoting)g(syn)m(tax,)
+j(whic)m(h)d(expands)f(ANSI-C)h(bac)m(kslash-escap)s(ed)h(c)m
+(haracters)g(in)330 3465 y(the)26 b(text)h(b)s(et)m(w)m(een)g(the)g
+(single)f(quotes,)i(is)e(supp)s(orted)f(\(see)i(Section)g(3.1.2.4)h
+([ANSI-C)e(Quoting],)330 3574 y(page)31 b(6\).)225 3708
+y Fp(\017)60 b Ft(Bash)69 b(supp)s(orts)e(the)i Fs($"...)n(")g
+Ft(quoting)g(syn)m(tax)g(to)h(do)e(lo)s(cale-sp)s(eci\014c)j
+(translation)f(of)330 3818 y(the)65 b(c)m(haracters)i(b)s(et)m(w)m(een)
+f(the)f(double)g(quotes.)145 b(The)65 b(`)p Fs(-D)p Ft(',)74
+b(`)p Fs(--dump-strings)p Ft(',)d(and)330 3927 y(`)p
+Fs(--dump-po-strings)p Ft(')27 b(in)m(v)m(o)s(cation)33
+b(options)e(list)h(the)f(translatable)h(strings)f(found)f(in)h(a)g
+(script)330 4037 y(\(see)g(Section)h(3.1.2.5)g([Lo)s(cale)g(T)-8
+b(ranslation],)32 b(page)f(7\).)225 4171 y Fp(\017)60
+b Ft(Bash)44 b(implemen)m(ts)g(the)f Fs(!)h Ft(k)m(eyw)m(ord)g(to)g
+(negate)h(the)f(return)e(v)-5 b(alue)44 b(of)g(a)g(pip)s(eline)f(\(see)
+h(Sec-)330 4281 y(tion)33 b(3.2.2)i([Pip)s(elines],)f(page)g(8\).)49
+b(V)-8 b(ery)33 b(useful)f(when)g(an)h Fs(if)f Ft(statemen)m(t)j(needs)
+d(to)i(act)g(only)f(if)330 4390 y(a)k(test)h(fails.)60
+b(The)36 b(Bash)g(`)p Fs(-o)30 b(pipefail)p Ft(')35 b(option)i(to)h
+Fs(set)d Ft(will)i(cause)g(a)g(pip)s(eline)g(to)g(return)f(a)330
+4500 y(failure)31 b(status)f(if)h(an)m(y)f(command)g(fails.)225
+4634 y Fp(\017)60 b Ft(Bash)34 b(has)g(the)g Fs(time)f
+Ft(reserv)m(ed)h(w)m(ord)g(and)f(command)h(timing)h(\(see)g(Section)g
+(3.2.2)g([Pip)s(elines],)330 4743 y(page)g(8\).)52 b(The)33
+b(displa)m(y)i(of)f(the)g(timing)g(statistics)i(ma)m(y)f(b)s(e)e(con)m
+(trolled)j(with)e(the)g Fs(TIMEFORMAT)330 4853 y Ft(v)-5
+b(ariable.)225 4987 y Fp(\017)60 b Ft(Bash)23 b(implemen)m(ts)g(the)h
+Fs(for)29 b(\(\()h Fi(expr1)39 b Fs(;)30 b Fi(expr2)40
+b Fs(;)30 b Fi(expr3)39 b Fs(\)\))23 b Ft(arithmetic)h(for)e(command,)j
+(sim-)330 5096 y(ilar)31 b(to)g(the)g(C)f(language)h(\(see)h(Section)f
+(3.2.4.1)i([Lo)s(oping)d(Constructs],)h(page)g(9\).)225
+5230 y Fp(\017)60 b Ft(Bash)31 b(includes)f(the)g Fs(select)f
+Ft(comp)s(ound)g(command,)i(whic)m(h)f(allo)m(ws)i(the)f(generation)g
+(of)g(simple)330 5340 y(men)m(us)f(\(see)h(Section)g(3.2.4.2)i
+([Conditional)e(Constructs],)g(page)g(10\).)p eop end
+%%Page: 138 144
+TeXDict begin 138 143 bop 150 -116 a Ft(138)2527 b(Bash)31
+b(Reference)g(Man)m(ual)225 299 y Fp(\017)60 b Ft(Bash)40
+b(includes)g(the)g Fs([[)g Ft(comp)s(ound)e(command,)43
+b(whic)m(h)c(mak)m(es)i(conditional)h(testing)f(part)f(of)330
+408 y(the)f(shell)g(grammar)g(\(see)h(Section)f(3.2.4.2)j([Conditional)
+d(Constructs],)i(page)f(10\),)i(including)330 518 y(optional)32
+b(regular)e(expression)g(matc)m(hing.)225 653 y Fp(\017)60
+b Ft(Bash)31 b(pro)m(vides)f(optional)h(case-insensitiv)m(e)i(matc)m
+(hing)f(for)e(the)g Fs(case)g Ft(and)f Fs([[)h Ft(constructs.)225
+789 y Fp(\017)60 b Ft(Bash)27 b(includes)g(brace)h(expansion)f(\(see)h
+(Section)g(3.5.1)i([Brace)e(Expansion],)g(page)g(18\))h(and)d(tilde)330
+898 y(expansion)k(\(see)i(Section)f(3.5.2)h([Tilde)f(Expansion],)f
+(page)h(19\).)225 1034 y Fp(\017)60 b Ft(Bash)24 b(implemen)m(ts)h
+(command)e(aliases)j(and)d(the)i Fs(alias)d Ft(and)i
+Fs(unalias)e Ft(builtins)h(\(see)i(Section)g(6.6)330
+1143 y([Aliases],)32 b(page)f(79\).)225 1279 y Fp(\017)60
+b Ft(Bash)32 b(pro)m(vides)g(shell)g(arithmetic,)i(the)e
+Fs(\(\()g Ft(comp)s(ound)e(command)i(\(see)h(Section)f(3.2.4.2)j([Con-)
+330 1388 y(ditional)d(Constructs],)e(page)i(10\),)g(and)e(arithmetic)i
+(expansion)e(\(see)i(Section)f(6.5)h([Shell)f(Arith-)330
+1498 y(metic],)h(page)f(78\).)225 1633 y Fp(\017)60 b
+Ft(V)-8 b(ariables)31 b(presen)m(t)e(in)g(the)g(shell's)h(initial)g(en)
+m(vironmen)m(t)g(are)g(automatically)i(exp)s(orted)d(to)h(c)m(hild)330
+1743 y(pro)s(cesses.)38 b(The)23 b(Bourne)g(shell)g(do)s(es)g(not)g
+(normally)g(do)g(this)g(unless)g(the)g(v)-5 b(ariables)24
+b(are)f(explicitly)330 1852 y(mark)m(ed)30 b(using)g(the)h
+Fs(export)e Ft(command.)225 1988 y Fp(\017)60 b Ft(Bash)26
+b(supp)s(orts)d(the)j(`)p Fs(+=)p Ft(')f(assignmen)m(t)i(op)s(erator,)g
+(whic)m(h)e(app)s(ends)f(to)i(the)g(v)-5 b(alue)26 b(of)f(the)h(v)-5
+b(ariable)330 2097 y(named)30 b(on)g(the)h(left)g(hand)e(side.)225
+2233 y Fp(\017)60 b Ft(Bash)36 b(includes)g(the)g Fl(posix)f
+Ft(pattern)h(remo)m(v)-5 b(al)37 b(`)p Fs(\045)p Ft(',)h(`)p
+Fs(#)p Ft(',)g(`)p Fs(\045\045)p Ft(')e(and)f(`)p Fs(##)p
+Ft(')h(expansions)g(to)g(remo)m(v)m(e)330 2342 y(leading)f(or)f
+(trailing)h(substrings)e(from)g(v)-5 b(ariable)35 b(v)-5
+b(alues)35 b(\(see)g(Section)g(3.5.3)g([Shell)g(P)m(arameter)330
+2452 y(Expansion],)30 b(page)h(19\).)225 2587 y Fp(\017)60
+b Ft(The)46 b(expansion)g Fs(${#xx})p Ft(,)j(whic)m(h)d(returns)f(the)i
+(length)f(of)h Fs(${xx})p Ft(,)i(is)e(supp)s(orted)d(\(see)j(Sec-)330
+2697 y(tion)31 b(3.5.3)h([Shell)f(P)m(arameter)g(Expansion],)f(page)i
+(19\).)225 2832 y Fp(\017)60 b Ft(The)30 b(expansion)g
+Fs(${var:)p Fq(o\013set)r Fs([:)p Fq(length)p Fs(]})p
+Ft(,)g(whic)m(h)g(expands)g(to)h(the)g(substring)e(of)i
+Fs(var)p Ft('s)e(v)-5 b(alue)330 2942 y(of)43 b(length)g
+Fq(length)p Ft(,)j(b)s(eginning)c(at)i Fq(o\013set)r
+Ft(,)j(is)42 b(presen)m(t)h(\(see)h(Section)f(3.5.3)i([Shell)e(P)m
+(arameter)330 3051 y(Expansion],)30 b(page)h(19\).)225
+3187 y Fp(\017)60 b Ft(The)21 b(expansion)f Fs(${var/[/])p
+Fq(pattern)p Fs([/)p Fq(replacemen)m(t)r Fs(]})p Ft(,)i(whic)m(h)e
+(matc)m(hes)j Fq(pattern)e Ft(and)f(replaces)330 3296
+y(it)29 b(with)e Fq(replacemen)m(t)32 b Ft(in)c(the)g(v)-5
+b(alue)29 b(of)f Fs(var)p Ft(,)g(is)g(a)m(v)-5 b(ailable)31
+b(\(see)e(Section)f(3.5.3)i([Shell)f(P)m(arameter)330
+3406 y(Expansion],)h(page)h(19\).)225 3541 y Fp(\017)60
+b Ft(The)32 b(expansion)g Fs(${!)p Fi(prefix)p Fs(})p
+Fi(*)40 b Ft(expansion,)32 b(whic)m(h)g(expands)g(to)h(the)f(names)g
+(of)h(all)g(shell)f(v)-5 b(ari-)330 3651 y(ables)36 b(whose)f(names)h
+(b)s(egin)f(with)g Fq(pre\014x)6 b Ft(,)36 b(is)g(a)m(v)-5
+b(ailable)38 b(\(see)e(Section)h(3.5.3)g([Shell)f(P)m(arameter)330
+3761 y(Expansion],)30 b(page)h(19\).)225 3896 y Fp(\017)60
+b Ft(Bash)22 b(has)f Fq(indirect)j Ft(v)-5 b(ariable)22
+b(expansion)g(using)f Fs(${!word})e Ft(\(see)k(Section)f(3.5.3)i
+([Shell)e(P)m(arameter)330 4006 y(Expansion],)30 b(page)h(19\).)225
+4141 y Fp(\017)60 b Ft(Bash)31 b(can)f(expand)g(p)s(ositional)h
+(parameters)g(b)s(ey)m(ond)e Fs($9)h Ft(using)g Fs(${)p
+Fi(num)11 b Fs(})p Ft(.)225 4276 y Fp(\017)60 b Ft(The)27
+b Fl(posix)g Fs($\(\))g Ft(form)g(of)h(command)g(substitution)f(is)h
+(implemen)m(ted)g(\(see)h(Section)f(3.5.4)i([Com-)330
+4386 y(mand)38 b(Substitution],)k(page)e(22\),)j(and)38
+b(preferred)g(to)i(the)g(Bourne)f(shell's)h Fs(``)e Ft(\(whic)m(h)i(is)
+f(also)330 4495 y(implemen)m(ted)31 b(for)f(bac)m(kw)m(ards)h
+(compatibilit)m(y\).)225 4631 y Fp(\017)60 b Ft(Bash)31
+b(has)f(pro)s(cess)g(substitution)g(\(see)h(Section)g(3.5.6)h([Pro)s
+(cess)f(Substitution],)f(page)h(23\).)225 4766 y Fp(\017)60
+b Ft(Bash)55 b(automatically)j(assigns)e(v)-5 b(ariables)55
+b(that)h(pro)m(vide)f(information)h(ab)s(out)f(the)g(curren)m(t)330
+4876 y(user)40 b(\()p Fs(UID)p Ft(,)i Fs(EUID)p Ft(,)g(and)e
+Fs(GROUPS)p Ft(\),)h(the)g(curren)m(t)f(host)g(\()p Fs(HOSTTYPE)p
+Ft(,)h Fs(OSTYPE)p Ft(,)h Fs(MACHTYPE)p Ft(,)f(and)330
+4985 y Fs(HOSTNAME)p Ft(\),)55 b(and)c(the)g(instance)h(of)g(Bash)f
+(that)h(is)f(running)f(\()p Fs(BASH)p Ft(,)56 b Fs(BASH_VERSION)p
+Ft(,)e(and)330 5095 y Fs(BASH_VERSINFO)p Ft(\).)37 b(See)31
+b(Section)g(5.2)h([Bash)e(V)-8 b(ariables],)33 b(page)e(61,)g(for)f
+(details.)225 5230 y Fp(\017)60 b Ft(The)44 b Fs(IFS)f
+Ft(v)-5 b(ariable)45 b(is)f(used)f(to)i(split)f(only)g(the)g(results)g
+(of)h(expansion,)i(not)d(all)h(w)m(ords)f(\(see)330 5340
+y(Section)29 b(3.5.7)h([W)-8 b(ord)29 b(Splitting],)h(page)f(23\).)41
+b(This)28 b(closes)h(a)g(longstanding)g(shell)f(securit)m(y)h(hole.)p
+eop end
+%%Page: 139 145
+TeXDict begin 139 144 bop 150 -116 a Ft(App)s(endix)29
+b(B:)i(Ma)5 b(jor)31 b(Di\013erences)g(F)-8 b(rom)31
+b(The)f(Bourne)g(Shell)1258 b(139)225 299 y Fp(\017)60
+b Ft(Bash)38 b(implemen)m(ts)g(the)g(full)g(set)g(of)g
+Fl(posix)f Ft(\014lename)h(expansion)g(op)s(erators,)i(including)d
+Fq(c)m(har-)330 408 y(acter)i(classes)t Ft(,)h Fq(equiv)-5
+b(alence)39 b(classes)t Ft(,)h(and)d Fq(collating)j(sym)m(b)s(ols)g
+Ft(\(see)f(Section)f(3.5.8)h([Filename)330 518 y(Expansion],)30
+b(page)h(24\).)225 660 y Fp(\017)60 b Ft(Bash)35 b(implemen)m(ts)g
+(extended)g(pattern)g(matc)m(hing)h(features)f(when)f(the)h
+Fs(extglob)d Ft(shell)j(option)330 769 y(is)30 b(enabled)h(\(see)g
+(Section)g(3.5.8.1)i([P)m(attern)f(Matc)m(hing],)g(page)f(24\).)225
+911 y Fp(\017)60 b Ft(It)22 b(is)g(p)s(ossible)g(to)h(ha)m(v)m(e)g(a)f
+(v)-5 b(ariable)23 b(and)f(a)g(function)g(with)g(the)g(same)g(name;)j
+Fs(sh)d Ft(do)s(es)g(not)g(separate)330 1021 y(the)31
+b(t)m(w)m(o)g(name)g(spaces.)225 1163 y Fp(\017)60 b
+Ft(Bash)30 b(functions)e(are)i(p)s(ermitted)f(to)h(ha)m(v)m(e)h(lo)s
+(cal)g(v)-5 b(ariables)30 b(using)f(the)g Fs(local)f
+Ft(builtin,)i(and)e(th)m(us)330 1272 y(useful)i(recursiv)m(e)g
+(functions)g(ma)m(y)h(b)s(e)f(written)g(\(see)i(Section)f(4.2)g([Bash)g
+(Builtins],)g(page)h(41\).)225 1414 y Fp(\017)60 b Ft(V)-8
+b(ariable)25 b(assignmen)m(ts)g(preceding)e(commands)h(a\013ect)h(only)
+f(that)g(command,)h(ev)m(en)f(builtins)g(and)330 1524
+y(functions)36 b(\(see)h(Section)g(3.7.4)h([En)m(vironmen)m(t],)h(page)
+e(31\).)60 b(In)35 b Fs(sh)p Ft(,)j(all)f(v)-5 b(ariable)37
+b(assignmen)m(ts)330 1633 y(preceding)30 b(commands)g(are)h(global)h
+(unless)d(the)i(command)f(is)h(executed)g(from)f(the)g(\014le)h
+(system.)225 1775 y Fp(\017)60 b Ft(Bash)44 b(p)s(erforms)e(\014lename)
+i(expansion)f(on)h(\014lenames)g(sp)s(eci\014ed)f(as)h(op)s(erands)e
+(to)j(input)e(and)330 1885 y(output)30 b(redirection)h(op)s(erators)g
+(\(see)g(Section)g(3.6)h([Redirections],)g(page)f(26\).)225
+2027 y Fp(\017)60 b Ft(Bash)29 b(con)m(tains)h(the)f(`)p
+Fs(<>)p Ft(')f(redirection)i(op)s(erator,)f(allo)m(wing)i(a)e(\014le)g
+(to)g(b)s(e)f(op)s(ened)g(for)h(b)s(oth)f(read-)330 2136
+y(ing)35 b(and)f(writing,)i(and)e(the)h(`)p Fs(&>)p Ft(')g(redirection)
+g(op)s(erator,)h(for)f(directing)g(standard)f(output)h(and)330
+2246 y(standard)30 b(error)g(to)h(the)f(same)h(\014le)f(\(see)i
+(Section)f(3.6)g([Redirections],)h(page)g(26\).)225 2388
+y Fp(\017)60 b Ft(Bash)21 b(includes)f(the)h(`)p Fs(<<<)p
+Ft(')g(redirection)g(op)s(erator,)i(allo)m(wing)g(a)e(string)f(to)i(b)s
+(e)e(used)g(as)h(the)g(standard)330 2497 y(input)29 b(to)j(a)e
+(command.)225 2639 y Fp(\017)60 b Ft(Bash)29 b(implemen)m(ts)h(the)f(`)
+p Fs([n]<&)p Fi(word)11 b Ft(')26 b(and)j(`)p Fs([n]>&)p
+Fi(word)11 b Ft(')26 b(redirection)k(op)s(erators,)g(whic)m(h)e(mo)m(v)
+m(e)330 2749 y(one)j(\014le)f(descriptor)g(to)h(another.)225
+2890 y Fp(\017)60 b Ft(Bash)25 b(treats)h(a)f(n)m(um)m(b)s(er)e(of)i
+(\014lenames)g(sp)s(ecially)g(when)f(they)h(are)g(used)f(in)g
+(redirection)i(op)s(erators)330 3000 y(\(see)31 b(Section)h(3.6)f
+([Redirections],)h(page)f(26\).)225 3142 y Fp(\017)60
+b Ft(Bash)33 b(can)f(op)s(en)g(net)m(w)m(ork)i(connections)f(to)h
+(arbitrary)e(mac)m(hines)h(and)f(services)h(with)f(the)h(redi-)330
+3251 y(rection)e(op)s(erators)g(\(see)g(Section)g(3.6)h
+([Redirections],)g(page)f(26\).)225 3393 y Fp(\017)60
+b Ft(The)29 b Fs(noclobber)e Ft(option)j(is)g(a)m(v)-5
+b(ailable)32 b(to)e(a)m(v)m(oid)h(o)m(v)m(erwriting)g(existing)g
+(\014les)e(with)h(output)f(redi-)330 3503 y(rection)39
+b(\(see)h(Section)f(4.3.1)h([The)e(Set)h(Builtin],)i(page)e(51\).)66
+b(The)38 b(`)p Fs(>|)p Ft(')h(redirection)g(op)s(erator)330
+3612 y(ma)m(y)31 b(b)s(e)f(used)f(to)i(o)m(v)m(erride)h
+Fs(noclobber)p Ft(.)225 3754 y Fp(\017)60 b Ft(The)34
+b(Bash)g Fs(cd)g Ft(and)f Fs(pwd)g Ft(builtins)h(\(see)h(Section)g(4.1)
+g([Bourne)g(Shell)f(Builtins],)h(page)g(35\))h(eac)m(h)330
+3864 y(tak)m(e)c(`)p Fs(-L)p Ft(')e(and)g(`)p Fs(-P)p
+Ft(')g(options)h(to)g(switc)m(h)g(b)s(et)m(w)m(een)g(logical)i(and)c
+(ph)m(ysical)i(mo)s(des.)225 4006 y Fp(\017)60 b Ft(Bash)25
+b(allo)m(ws)h(a)g(function)e(to)i(o)m(v)m(erride)g(a)g(builtin)e(with)h
+(the)g(same)g(name,)i(and)d(pro)m(vides)h(access)h(to)330
+4115 y(that)34 b(builtin's)f(functionalit)m(y)h(within)f(the)g
+(function)g(via)h(the)f Fs(builtin)f Ft(and)g Fs(command)g
+Ft(builtins)330 4225 y(\(see)f(Section)h(4.2)f([Bash)g(Builtins],)g
+(page)g(41\).)225 4367 y Fp(\017)60 b Ft(The)35 b Fs(command)e
+Ft(builtin)i(allo)m(ws)i(selectiv)m(e)h(disabling)e(of)f(functions)g
+(when)g(command)g(lo)s(okup)g(is)330 4476 y(p)s(erformed)29
+b(\(see)i(Section)g(4.2)h([Bash)f(Builtins],)g(page)g(41\).)225
+4618 y Fp(\017)60 b Ft(Individual)23 b(builtins)g(ma)m(y)i(b)s(e)e
+(enabled)h(or)g(disabled)g(using)f(the)h Fs(enable)f
+Ft(builtin)g(\(see)i(Section)g(4.2)330 4728 y([Bash)31
+b(Builtins],)g(page)g(41\).)225 4869 y Fp(\017)60 b Ft(The)26
+b(Bash)h Fs(exec)e Ft(builtin)h(tak)m(es)i(additional)f(options)g(that)
+g(allo)m(w)h(users)d(to)j(con)m(trol)g(the)e(con)m(ten)m(ts)330
+4979 y(of)35 b(the)f(en)m(vironmen)m(t)h(passed)f(to)h(the)g(executed)g
+(command,)h(and)d(what)i(the)f(zeroth)h(argumen)m(t)330
+5089 y(to)c(the)g(command)f(is)g(to)h(b)s(e)f(\(see)h(Section)h(4.1)f
+([Bourne)f(Shell)h(Builtins],)g(page)g(35\).)225 5230
+y Fp(\017)60 b Ft(Shell)29 b(functions)g(ma)m(y)h(b)s(e)f(exp)s(orted)g
+(to)h(c)m(hildren)f(via)h(the)g(en)m(vironmen)m(t)g(using)f
+Fs(export)f(-f)h Ft(\(see)330 5340 y(Section)i(3.3)h([Shell)e(F)-8
+b(unctions],)32 b(page)f(14\).)p eop end
+%%Page: 140 146
+TeXDict begin 140 145 bop 150 -116 a Ft(140)2527 b(Bash)31
+b(Reference)g(Man)m(ual)225 299 y Fp(\017)60 b Ft(The)37
+b(Bash)g Fs(export)p Ft(,)h Fs(readonly)p Ft(,)f(and)f
+Fs(declare)g Ft(builtins)h(can)g(tak)m(e)i(a)f(`)p Fs(-f)p
+Ft(')f(option)h(to)g(act)g(on)330 408 y(shell)26 b(functions,)g(a)h(`)p
+Fs(-p)p Ft(')e(option)h(to)h(displa)m(y)f(v)-5 b(ariables)26
+b(with)g(v)-5 b(arious)25 b(attributes)i(set)f(in)f(a)i(format)330
+518 y(that)g(can)f(b)s(e)f(used)h(as)g(shell)g(input,)h(a)f(`)p
+Fs(-n)p Ft(')g(option)g(to)h(remo)m(v)m(e)h(v)-5 b(arious)26
+b(v)-5 b(ariable)27 b(attributes,)h(and)330 628 y(`)p
+Fs(name=value)p Ft(')g(argumen)m(ts)j(to)g(set)g(v)-5
+b(ariable)31 b(attributes)g(and)f(v)-5 b(alues)30 b(sim)m(ultaneously)
+-8 b(.)225 765 y Fp(\017)60 b Ft(The)42 b(Bash)h Fs(hash)f
+Ft(builtin)g(allo)m(ws)j(a)e(name)g(to)g(b)s(e)f(asso)s(ciated)j(with)d
+(an)h(arbitrary)f(\014lename,)330 874 y(ev)m(en)30 b(when)e(that)h
+(\014lename)g(cannot)h(b)s(e)e(found)g(b)m(y)h(searc)m(hing)g(the)g
+Fs($PATH)p Ft(,)g(using)f(`)p Fs(hash)h(-p)p Ft(')g(\(see)330
+984 y(Section)i(4.1)h([Bourne)e(Shell)g(Builtins],)h(page)h(35\).)225
+1121 y Fp(\017)60 b Ft(Bash)27 b(includes)f(a)i Fs(help)d
+Ft(builtin)i(for)f(quic)m(k)h(reference)h(to)f(shell)g(facilities)i
+(\(see)f(Section)g(4.2)g([Bash)330 1230 y(Builtins],)j(page)g(41\).)225
+1367 y Fp(\017)60 b Ft(The)42 b Fs(printf)g Ft(builtin)g(is)h(a)m(v)-5
+b(ailable)45 b(to)f(displa)m(y)f(formatted)g(output)g(\(see)h(Section)g
+(4.2)g([Bash)330 1477 y(Builtins],)31 b(page)g(41\).)225
+1614 y Fp(\017)60 b Ft(The)26 b(Bash)h Fs(read)f Ft(builtin)g(\(see)i
+(Section)g(4.2)g([Bash)f(Builtins],)h(page)g(41\))g(will)f(read)g(a)g
+(line)g(ending)330 1724 y(in)f(`)p Fs(\\)p Ft(')h(with)f(the)g(`)p
+Fs(-r)p Ft(')h(option,)h(and)d(will)i(use)f(the)h Fs(REPLY)e
+Ft(v)-5 b(ariable)27 b(as)g(a)f(default)h(if)f(no)h(non-option)330
+1833 y(argumen)m(ts)k(are)h(supplied.)42 b(The)30 b(Bash)i
+Fs(read)e Ft(builtin)g(also)j(accepts)f(a)g(prompt)e(string)h(with)g
+(the)330 1943 y(`)p Fs(-p)p Ft(')k(option)g(and)f(will)h(use)g
+(Readline)g(to)h(obtain)f(the)g(line)g(when)f(giv)m(en)i(the)f(`)p
+Fs(-e)p Ft(')g(option.)54 b(The)330 2052 y Fs(read)31
+b Ft(builtin)h(also)i(has)e(additional)h(options)g(to)g(con)m(trol)h
+(input:)44 b(the)32 b(`)p Fs(-s)p Ft(')h(option)f(will)h(turn)f(o\013)
+330 2162 y(ec)m(hoing)38 b(of)e(input)f(c)m(haracters)j(as)e(they)h
+(are)f(read,)i(the)e(`)p Fs(-t)p Ft(')g(option)h(will)g(allo)m(w)g
+Fs(read)e Ft(to)i(time)330 2271 y(out)c(if)g(input)f(do)s(es)g(not)h
+(arriv)m(e)g(within)g(a)g(sp)s(eci\014ed)f(n)m(um)m(b)s(er)f(of)i
+(seconds,)h(the)f(`)p Fs(-n)p Ft(')f(option)i(will)330
+2381 y(allo)m(w)29 b(reading)e(only)h(a)g(sp)s(eci\014ed)e(n)m(um)m(b)s
+(er)g(of)i(c)m(haracters)h(rather)e(than)g(a)h(full)f(line,)i(and)d
+(the)i(`)p Fs(-d)p Ft(')330 2491 y(option)j(will)g(read)f(un)m(til)g(a)
+h(particular)g(c)m(haracter)h(rather)e(than)g(newline.)225
+2628 y Fp(\017)60 b Ft(The)33 b Fs(return)e Ft(builtin)i(ma)m(y)g(b)s
+(e)g(used)f(to)i(ab)s(ort)f(execution)h(of)f(scripts)g(executed)h(with)
+f(the)g Fs(.)g Ft(or)330 2737 y Fs(source)c Ft(builtins)g(\(see)j
+(Section)f(4.1)g([Bourne)g(Shell)f(Builtins],)h(page)g(35\).)225
+2874 y Fp(\017)60 b Ft(Bash)43 b(includes)g(the)g Fs(shopt)f
+Ft(builtin,)k(for)d(\014ner)f(con)m(trol)j(of)e(shell)h(optional)g
+(capabilities)h(\(see)330 2984 y(Section)c(4.3.2)g([The)f(Shopt)f
+(Builtin],)k(page)d(55\),)k(and)39 b(allo)m(ws)i(these)f(options)h(to)f
+(b)s(e)f(set)i(and)330 3093 y(unset)30 b(at)h(shell)g(in)m(v)m(o)s
+(cation)h(\(see)f(Section)h(6.1)f([In)m(v)m(oking)g(Bash],)g(page)h
+(71\).)225 3230 y Fp(\017)60 b Ft(Bash)45 b(has)f(m)m(uc)m(h)g(more)h
+(optional)h(b)s(eha)m(vior)e(con)m(trollable)j(with)e(the)f
+Fs(set)g Ft(builtin)g(\(see)h(Sec-)330 3340 y(tion)31
+b(4.3.1)h([The)e(Set)h(Builtin],)g(page)g(51\).)225 3477
+y Fp(\017)60 b Ft(The)31 b(`)p Fs(-x)p Ft(')g(\()p Fs(xtrace)p
+Ft(\))g(option)h(displa)m(ys)f(commands)h(other)f(than)h(simple)f
+(commands)g(when)g(p)s(er-)330 3587 y(forming)f(an)g(execution)i(trace)
+f(\(see)h(Section)f(4.3.1)h([The)e(Set)h(Builtin],)g(page)g(51\).)225
+3724 y Fp(\017)60 b Ft(The)28 b Fs(test)g Ft(builtin)h(\(see)h(Section)
+f(4.1)h([Bourne)f(Shell)g(Builtins],)h(page)g(35\))g(is)f(sligh)m(tly)h
+(di\013eren)m(t,)330 3833 y(as)23 b(it)g(implemen)m(ts)f(the)h
+Fl(posix)f Ft(algorithm,)j(whic)m(h)d(sp)s(eci\014es)g(the)h(b)s(eha)m
+(vior)f(based)g(on)h(the)f(n)m(um)m(b)s(er)330 3943 y(of)31
+b(argumen)m(ts.)225 4080 y Fp(\017)60 b Ft(Bash)31 b(includes)g(the)h
+Fs(caller)d Ft(builtin,)j(whic)m(h)f(displa)m(ys)g(the)g(con)m(text)i
+(of)f(an)m(y)g(activ)m(e)h(subroutine)330 4189 y(call)28
+b(\(a)f(shell)f(function)h(or)f(a)h(script)f(executed)h(with)f(the)h
+Fs(.)f Ft(or)g Fs(source)f Ft(builtins\).)39 b(This)26
+b(supp)s(orts)330 4299 y(the)31 b(bash)e(debugger.)225
+4436 y Fp(\017)60 b Ft(The)42 b Fs(trap)f Ft(builtin)h(\(see)i(Section)
+f(4.1)h([Bourne)e(Shell)g(Builtins],)47 b(page)c(35\))h(allo)m(ws)g(a)e
+Fs(DEBUG)330 4545 y Ft(pseudo-signal)c(sp)s(eci\014cation,)i(similar)e
+(to)g Fs(EXIT)p Ft(.)62 b(Commands)36 b(sp)s(eci\014ed)h(with)g(a)h
+Fs(DEBUG)e Ft(trap)330 4655 y(are)k(executed)g(b)s(efore)f(ev)m(ery)h
+(simple)f(command,)j Fs(for)c Ft(command,)k Fs(case)c
+Ft(command,)k Fs(select)330 4765 y Ft(command,)35 b(ev)m(ery)g
+(arithmetic)g Fs(for)e Ft(command,)i(and)f(b)s(efore)g(the)g(\014rst)f
+(command)h(executes)h(in)330 4874 y(a)29 b(shell)g(function.)40
+b(The)28 b Fs(DEBUG)g Ft(trap)g(is)h(not)g(inherited)f(b)m(y)h(shell)g
+(functions)f(unless)g(the)h(function)330 4984 y(has)35
+b(b)s(een)g(giv)m(en)i(the)f Fs(trace)e Ft(attribute)i(or)g(the)g
+Fs(functrace)d Ft(option)j(has)f(b)s(een)g(enabled)g(using)330
+5093 y(the)28 b Fs(shopt)e Ft(builtin.)39 b(The)27 b
+Fs(extdebug)f Ft(shell)i(option)g(has)f(additional)h(e\013ects)h(on)f
+(the)g Fs(DEBUG)e Ft(trap.)330 5230 y(The)21 b Fs(trap)e
+Ft(builtin)i(\(see)h(Section)g(4.1)g([Bourne)f(Shell)g(Builtins],)j
+(page)e(35\))g(allo)m(ws)g(an)f Fs(ERR)f Ft(pseudo-)330
+5340 y(signal)30 b(sp)s(eci\014cation,)h(similar)f(to)g
+Fs(EXIT)f Ft(and)g Fs(DEBUG)p Ft(.)39 b(Commands)28 b(sp)s(eci\014ed)h
+(with)g(an)g Fs(ERR)g Ft(trap)p eop end
+%%Page: 141 147
+TeXDict begin 141 146 bop 150 -116 a Ft(App)s(endix)29
+b(B:)i(Ma)5 b(jor)31 b(Di\013erences)g(F)-8 b(rom)31
+b(The)f(Bourne)g(Shell)1258 b(141)330 299 y(are)40 b(executed)g(after)g
+(a)f(simple)h(command)f(fails,)j(with)d(a)h(few)f(exceptions.)68
+b(The)39 b Fs(ERR)g Ft(trap)g(is)330 408 y(not)g(inherited)f(b)m(y)h
+(shell)g(functions)f(unless)g(the)h Fs(-o)29 b(errtrace)37
+b Ft(option)i(to)g(the)g Fs(set)f Ft(builtin)g(is)330
+518 y(enabled.)330 650 y(The)g Fs(trap)g Ft(builtin)h(\(see)g(Section)h
+(4.1)g([Bourne)f(Shell)g(Builtins],)i(page)f(35\))g(allo)m(ws)g(a)g
+Fs(RETURN)330 760 y Ft(pseudo-signal)35 b(sp)s(eci\014cation,)j
+(similar)d(to)h Fs(EXIT)e Ft(and)g Fs(DEBUG)p Ft(.)54
+b(Commands)34 b(sp)s(eci\014ed)g(with)h(an)330 869 y
+Fs(RETURN)k Ft(trap)i(are)g(executed)h(b)s(efore)e(execution)i(resumes)
+e(after)h(a)g(shell)g(function)g(or)g(a)g(shell)330 979
+y(script)36 b(executed)g(with)g Fs(.)f Ft(or)h Fs(source)e
+Ft(returns.)56 b(The)35 b Fs(RETURN)f Ft(trap)i(is)g(not)g(inherited)f
+(b)m(y)h(shell)330 1088 y(functions)k(unless)h(the)g(function)f(has)h
+(b)s(een)f(giv)m(en)i(the)f Fs(trace)e Ft(attribute)j(or)e(the)h
+Fs(functrace)330 1198 y Ft(option)31 b(has)f(b)s(een)g(enabled)g(using)
+g(the)g Fs(shopt)f Ft(builtin.)225 1330 y Fp(\017)60
+b Ft(The)30 b(Bash)g Fs(type)f Ft(builtin)h(is)g(more)g(extensiv)m(e)i
+(and)d(giv)m(es)j(more)e(information)h(ab)s(out)f(the)g(names)330
+1440 y(it)h(\014nds)e(\(see)i(Section)g(4.2)h([Bash)e(Builtins],)i
+(page)f(41\).)225 1571 y Fp(\017)60 b Ft(The)34 b(Bash)h
+Fs(umask)e Ft(builtin)h(p)s(ermits)g(a)g(`)p Fs(-p)p
+Ft(')h(option)g(to)g(cause)g(the)g(output)f(to)h(b)s(e)f(displa)m(y)m
+(ed)h(in)330 1681 y(the)g(form)g(of)g(a)h Fs(umask)e
+Ft(command)h(that)g(ma)m(y)h(b)s(e)f(reused)f(as)h(input)g(\(see)h
+(Section)g(4.1)g([Bourne)330 1791 y(Shell)30 b(Builtins],)h(page)h
+(35\).)225 1923 y Fp(\017)60 b Ft(Bash)34 b(implemen)m(ts)h(a)g
+Fs(csh)p Ft(-lik)m(e)g(directory)f(stac)m(k,)j(and)d(pro)m(vides)g(the)
+g Fs(pushd)p Ft(,)g Fs(popd)p Ft(,)g(and)g Fs(dirs)330
+2032 y Ft(builtins)g(to)i(manipulate)f(it)h(\(see)f(Section)h(6.8)g
+([The)f(Directory)h(Stac)m(k],)i(page)d(81\).)56 b(Bash)35
+b(also)330 2142 y(mak)m(es)c(the)g(directory)g(stac)m(k)g(visible)g(as)
+g(the)f(v)-5 b(alue)31 b(of)g(the)f Fs(DIRSTACK)f Ft(shell)h(v)-5
+b(ariable.)225 2274 y Fp(\017)60 b Ft(Bash)28 b(in)m(terprets)h(sp)s
+(ecial)g(bac)m(kslash-escap)s(ed)g(c)m(haracters)g(in)f(the)h(prompt)e
+(strings)h(when)f(in)m(ter-)330 2383 y(activ)m(e)33 b(\(see)e(Section)g
+(6.9)h([Prin)m(ting)e(a)h(Prompt],)g(page)g(82\).)225
+2515 y Fp(\017)60 b Ft(The)46 b(Bash)h(restricted)g(mo)s(de)f(is)h
+(more)f(useful)g(\(see)h(Section)h(6.10)g([The)e(Restricted)i(Shell],)
+330 2625 y(page)31 b(84\);)h(the)f(SVR4.2)g(shell)f(restricted)h(mo)s
+(de)f(is)h(to)s(o)g(limited.)225 2757 y Fp(\017)60 b
+Ft(The)30 b Fs(disown)f Ft(builtin)h(can)h(remo)m(v)m(e)h(a)f(job)f
+(from)g(the)h(in)m(ternal)g(shell)g(job)f(table)i(\(see)f(Section)h
+(7.2)330 2866 y([Job)h(Con)m(trol)h(Builtins],)g(page)g(90\))h(or)e
+(suppress)e(the)i(sending)g(of)g Fs(SIGHUP)e Ft(to)j(a)g(job)f(when)f
+(the)330 2976 y(shell)f(exits)g(as)f(the)h(result)f(of)h(a)f
+Fs(SIGHUP)p Ft(.)225 3108 y Fp(\017)60 b Ft(Bash)31 b(includes)f(a)g(n)
+m(um)m(b)s(er)f(of)i(features)g(to)g(supp)s(ort)d(a)j(separate)g
+(debugger)f(for)h(shell)f(scripts.)225 3240 y Fp(\017)60
+b Ft(The)28 b(SVR4.2)h(shell)f(has)g(t)m(w)m(o)i(privilege-related)g
+(builtins)e(\()p Fs(mldmode)e Ft(and)i Fs(priv)p Ft(\))f(not)i(presen)m
+(t)f(in)330 3350 y(Bash.)225 3482 y Fp(\017)60 b Ft(Bash)31
+b(do)s(es)f(not)g(ha)m(v)m(e)i(the)e Fs(stop)g Ft(or)g
+Fs(newgrp)f Ft(builtins.)225 3613 y Fp(\017)60 b Ft(Bash)31
+b(do)s(es)f(not)g(use)g(the)h Fs(SHACCT)d Ft(v)-5 b(ariable)32
+b(or)e(p)s(erform)f(shell)i(accoun)m(ting.)225 3745 y
+Fp(\017)60 b Ft(The)30 b(SVR4.2)h Fs(sh)f Ft(uses)g(a)g
+Fs(TIMEOUT)f Ft(v)-5 b(ariable)31 b(lik)m(e)h(Bash)e(uses)g
+Fs(TMOUT)p Ft(.)150 3900 y(More)h(features)g(unique)e(to)i(Bash)g(ma)m
+(y)g(b)s(e)f(found)f(in)h(Chapter)f(6)i([Bash)g(F)-8
+b(eatures],)32 b(page)f(71.)150 4127 y Fr(B.1)67 b(Implemen)l(tation)48
+b(Di\013erences)e(F)-11 b(rom)44 b(The)h(SVR4.2)g(Shell)150
+4287 y Ft(Since)33 b(Bash)h(is)f(a)g(completely)i(new)e(implemen)m
+(tation,)j(it)e(do)s(es)e(not)i(su\013er)e(from)h(man)m(y)g(of)h(the)f
+(limi-)150 4396 y(tations)f(of)e(the)h(SVR4.2)g(shell.)41
+b(F)-8 b(or)31 b(instance:)225 4528 y Fp(\017)60 b Ft(Bash)32
+b(do)s(es)f(not)h(fork)f(a)h(subshell)e(when)h(redirecting)h(in)m(to)h
+(or)e(out)h(of)g(a)g(shell)f(con)m(trol)i(structure)330
+4638 y(suc)m(h)d(as)h(an)f Fs(if)g Ft(or)g Fs(while)f
+Ft(statemen)m(t.)225 4770 y Fp(\017)60 b Ft(Bash)29 b(do)s(es)f(not)h
+(allo)m(w)h(un)m(balanced)f(quotes.)41 b(The)28 b(SVR4.2)h(shell)g
+(will)g(silen)m(tly)i(insert)d(a)h(needed)330 4879 y(closing)g(quote)g
+(at)f Fs(EOF)f Ft(under)g(certain)h(circumstances.)41
+b(This)27 b(can)h(b)s(e)g(the)g(cause)g(of)g(some)h(hard-)330
+4989 y(to-\014nd)h(errors.)225 5121 y Fp(\017)60 b Ft(The)45
+b(SVR4.2)h(shell)f(uses)g(a)g(baro)s(que)g(memory)g(managemen)m(t)i(sc)
+m(heme)e(based)g(on)g(trapping)330 5230 y Fs(SIGSEGV)p
+Ft(.)57 b(If)35 b(the)i(shell)f(is)h(started)g(from)e(a)i(pro)s(cess)f
+(with)g Fs(SIGSEGV)e Ft(blo)s(c)m(k)m(ed)k(\(e.g.,)h(b)m(y)d(using)330
+5340 y(the)31 b Fs(system\(\))d Ft(C)i(library)g(function)g(call\),)i
+(it)f(misb)s(eha)m(v)m(es)g(badly)-8 b(.)p eop end
+%%Page: 142 148
+TeXDict begin 142 147 bop 150 -116 a Ft(142)2527 b(Bash)31
+b(Reference)g(Man)m(ual)225 299 y Fp(\017)60 b Ft(In)26
+b(a)i(questionable)g(attempt)h(at)f(securit)m(y)-8 b(,)29
+b(the)e(SVR4.2)h(shell,)g(when)f(in)m(v)m(ok)m(ed)h(without)g(the)f(`)p
+Fs(-p)p Ft(')330 408 y(option,)39 b(will)d(alter)i(its)e(real)h(and)f
+(e\013ectiv)m(e)j Fl(uid)d Ft(and)g Fl(gid)h Ft(if)f(they)h(are)f(less)
+h(than)f(some)h(magic)330 518 y(threshold)30 b(v)-5 b(alue,)31
+b(commonly)g(100.)42 b(This)29 b(can)i(lead)g(to)g(unexp)s(ected)f
+(results.)225 653 y Fp(\017)60 b Ft(The)30 b(SVR4.2)h(shell)g(do)s(es)f
+(not)g(allo)m(w)i(users)e(to)h(trap)f Fs(SIGSEGV)p Ft(,)f
+Fs(SIGALRM)p Ft(,)f(or)j Fs(SIGCHLD)p Ft(.)225 787 y
+Fp(\017)60 b Ft(The)34 b(SVR4.2)h(shell)g(do)s(es)g(not)f(allo)m(w)j
+(the)d Fs(IFS)p Ft(,)h Fs(MAILCHECK)p Ft(,)f Fs(PATH)p
+Ft(,)h Fs(PS1)p Ft(,)g(or)f Fs(PS2)g Ft(v)-5 b(ariables)35
+b(to)330 897 y(b)s(e)30 b(unset.)225 1031 y Fp(\017)60
+b Ft(The)30 b(SVR4.2)h(shell)g(treats)g(`)p Fs(^)p Ft(')f(as)h(the)g
+(undo)s(cumen)m(ted)e(equiv)-5 b(alen)m(t)31 b(of)g(`)p
+Fs(|)p Ft('.)225 1166 y Fp(\017)60 b Ft(Bash)37 b(allo)m(ws)h(m)m
+(ultiple)f(option)g(argumen)m(ts)g(when)e(it)i(is)g(in)m(v)m(ok)m(ed)h
+(\()p Fs(-x)30 b(-v)p Ft(\);)40 b(the)c(SVR4.2)i(shell)330
+1275 y(allo)m(ws)c(only)f(one)g(option)g(argumen)m(t)g(\()p
+Fs(-xv)p Ft(\).)47 b(In)32 b(fact,)i(some)f(v)m(ersions)g(of)g(the)g
+(shell)f(dump)f(core)330 1385 y(if)f(the)h(second)f(argumen)m(t)h(b)s
+(egins)f(with)g(a)h(`)p Fs(-)p Ft('.)225 1519 y Fp(\017)60
+b Ft(The)26 b(SVR4.2)i(shell)f(exits)g(a)g(script)g(if)g(an)m(y)g
+(builtin)f(fails;)j(Bash)e(exits)g(a)g(script)g(only)g(if)g(one)g(of)g
+(the)330 1629 y Fl(posix)34 b Ft(sp)s(ecial)h(builtins)f(fails,)i(and)e
+(only)h(for)f(certain)h(failures,)h(as)f(en)m(umerated)g(in)f(the)h
+Fl(posix)330 1738 y Ft(standard.)225 1873 y Fp(\017)60
+b Ft(The)30 b(SVR4.2)h(shell)g(b)s(eha)m(v)m(es)f(di\013eren)m(tly)h
+(when)f(in)m(v)m(ok)m(ed)i(as)e Fs(jsh)g Ft(\(it)h(turns)e(on)h(job)g
+(con)m(trol\).)p eop end
+%%Page: 143 149
+TeXDict begin 143 148 bop 150 -116 a Ft(App)s(endix)29
+b(C:)h(GNU)h(F)-8 b(ree)31 b(Do)s(cumen)m(tation)i(License)1560
+b(143)150 299 y Fo(App)t(endix)52 b(C)81 b(GNU)54 b(F)-13
+b(ree)53 b(Do)t(cumen)l(tation)e(License)1359 502 y Ft(V)-8
+b(ersion)31 b(1.3,)g(3)g(No)m(v)m(em)m(b)s(er)h(2008)390
+635 y(Cop)m(yrigh)m(t)842 632 y(c)817 635 y Fp(\015)e
+Ft(2000,)j(2001,)f(2002,)g(2007,)h(2008)f(F)-8 b(ree)31
+b(Soft)m(w)m(are)h(F)-8 b(oundation,)31 b(Inc.)390 745
+y Fs(http://fsf.org/)390 964 y Ft(Ev)m(ery)m(one)g(is)g(p)s(ermitted)f
+(to)h(cop)m(y)g(and)f(distribute)g(v)m(erbatim)h(copies)390
+1074 y(of)g(this)f(license)h(do)s(cumen)m(t,)g(but)e(c)m(hanging)j(it)f
+(is)f(not)h(allo)m(w)m(ed.)199 1207 y(0.)61 b(PREAMBLE)330
+1340 y(The)37 b(purp)s(ose)e(of)i(this)g(License)h(is)f(to)h(mak)m(e)g
+(a)g(man)m(ual,)h(textb)s(o)s(ok,)h(or)d(other)g(functional)h(and)330
+1450 y(useful)29 b(do)s(cumen)m(t)h Fq(free)36 b Ft(in)29
+b(the)i(sense)f(of)g(freedom:)41 b(to)31 b(assure)e(ev)m(ery)m(one)j
+(the)e(e\013ectiv)m(e)j(freedom)330 1559 y(to)f(cop)m(y)g(and)f
+(redistribute)g(it,)h(with)g(or)f(without)g(mo)s(difying)g(it,)i
+(either)f(commercially)h(or)e(non-)330 1669 y(commercially)-8
+b(.)56 b(Secondarily)-8 b(,)36 b(this)f(License)g(preserv)m(es)g(for)f
+(the)h(author)f(and)g(publisher)f(a)i(w)m(a)m(y)330 1778
+y(to)i(get)g(credit)g(for)f(their)g(w)m(ork,)i(while)e(not)g(b)s(eing)g
+(considered)g(resp)s(onsible)f(for)h(mo)s(di\014cations)330
+1888 y(made)30 b(b)m(y)h(others.)330 2021 y(This)22 b(License)i(is)f(a)
+h(kind)e(of)i(\\cop)m(yleft",)j(whic)m(h)c(means)g(that)h(deriv)-5
+b(ativ)m(e)24 b(w)m(orks)f(of)h(the)f(do)s(cumen)m(t)330
+2131 y(m)m(ust)34 b(themselv)m(es)h(b)s(e)e(free)h(in)g(the)g(same)g
+(sense.)51 b(It)34 b(complemen)m(ts)h(the)f(GNU)g(General)h(Public)330
+2240 y(License,)c(whic)m(h)f(is)h(a)f(cop)m(yleft)i(license)g(designed)
+e(for)g(free)h(soft)m(w)m(are.)330 2373 y(W)-8 b(e)31
+b(ha)m(v)m(e)f(designed)g(this)f(License)h(in)f(order)g(to)i(use)e(it)h
+(for)f(man)m(uals)h(for)f(free)h(soft)m(w)m(are,)h(b)s(ecause)330
+2483 y(free)42 b(soft)m(w)m(are)i(needs)e(free)g(do)s(cumen)m(tation:)
+65 b(a)42 b(free)h(program)f(should)f(come)i(with)f(man)m(uals)330
+2592 y(pro)m(viding)29 b(the)g(same)g(freedoms)f(that)i(the)f(soft)m(w)
+m(are)h(do)s(es.)40 b(But)29 b(this)f(License)i(is)f(not)g(limited)g
+(to)330 2702 y(soft)m(w)m(are)j(man)m(uals;)f(it)g(can)g(b)s(e)f(used)g
+(for)g(an)m(y)h(textual)h(w)m(ork,)f(regardless)g(of)g(sub)5
+b(ject)30 b(matter)i(or)330 2812 y(whether)f(it)h(is)f(published)f(as)i
+(a)f(prin)m(ted)g(b)s(o)s(ok.)44 b(W)-8 b(e)32 b(recommend)f(this)h
+(License)g(principally)f(for)330 2921 y(w)m(orks)f(whose)h(purp)s(ose)d
+(is)j(instruction)f(or)g(reference.)199 3054 y(1.)61
+b(APPLICABILITY)29 b(AND)j(DEFINITIONS)330 3187 y(This)39
+b(License)i(applies)f(to)g(an)m(y)h(man)m(ual)f(or)g(other)g(w)m(ork,)i
+(in)e(an)m(y)g(medium,)i(that)e(con)m(tains)i(a)330 3297
+y(notice)h(placed)f(b)m(y)f(the)h(cop)m(yrigh)m(t)h(holder)e(sa)m(ying)
+h(it)g(can)g(b)s(e)f(distributed)f(under)g(the)i(terms)330
+3407 y(of)c(this)f(License.)62 b(Suc)m(h)37 b(a)h(notice)h(gran)m(ts)f
+(a)g(w)m(orld-wide,)h(ro)m(y)m(alt)m(y-free)i(license,)f(unlimited)d
+(in)330 3516 y(duration,)49 b(to)d(use)f(that)g(w)m(ork)h(under)d(the)j
+(conditions)f(stated)h(herein.)85 b(The)45 b(\\Do)s(cumen)m(t",)330
+3626 y(b)s(elo)m(w,)29 b(refers)f(to)h(an)m(y)g(suc)m(h)f(man)m(ual)h
+(or)f(w)m(ork.)40 b(An)m(y)29 b(mem)m(b)s(er)e(of)i(the)f(public)g(is)g
+(a)h(licensee,)i(and)330 3735 y(is)25 b(addressed)f(as)h(\\y)m(ou".)40
+b(Y)-8 b(ou)26 b(accept)g(the)f(license)h(if)f(y)m(ou)h(cop)m(y)-8
+b(,)27 b(mo)s(dify)d(or)h(distribute)g(the)g(w)m(ork)330
+3845 y(in)30 b(a)h(w)m(a)m(y)g(requiring)f(p)s(ermission)f(under)g(cop)
+m(yrigh)m(t)j(la)m(w.)330 3978 y(A)i(\\Mo)s(di\014ed)f(V)-8
+b(ersion")35 b(of)f(the)g(Do)s(cumen)m(t)g(means)g(an)m(y)g(w)m(ork)f
+(con)m(taining)j(the)e(Do)s(cumen)m(t)g(or)330 4088 y(a)k(p)s(ortion)f
+(of)h(it,)i(either)e(copied)g(v)m(erbatim,)i(or)d(with)h(mo)s
+(di\014cations)f(and/or)h(translated)g(in)m(to)330 4197
+y(another)31 b(language.)330 4330 y(A)26 b(\\Secondary)g(Section")h(is)
+f(a)h(named)e(app)s(endix)f(or)i(a)h(fron)m(t-matter)g(section)g(of)f
+(the)g(Do)s(cumen)m(t)330 4440 y(that)c(deals)g(exclusiv)m(ely)h(with)e
+(the)g(relationship)h(of)f(the)h(publishers)d(or)i(authors)g(of)h(the)f
+(Do)s(cumen)m(t)330 4549 y(to)38 b(the)f(Do)s(cumen)m(t's)i(o)m(v)m
+(erall)g(sub)5 b(ject)37 b(\(or)h(to)g(related)g(matters\))g(and)f(con)
+m(tains)h(nothing)f(that)330 4659 y(could)j(fall)h(directly)g(within)f
+(that)h(o)m(v)m(erall)i(sub)5 b(ject.)70 b(\(Th)m(us,)42
+b(if)e(the)h(Do)s(cumen)m(t)g(is)f(in)g(part)h(a)330
+4769 y(textb)s(o)s(ok)24 b(of)g(mathematics,)j(a)d(Secondary)f(Section)
+h(ma)m(y)g(not)g(explain)g(an)m(y)g(mathematics.\))40
+b(The)330 4878 y(relationship)28 b(could)f(b)s(e)g(a)g(matter)i(of)e
+(historical)i(connection)f(with)f(the)h(sub)5 b(ject)27
+b(or)g(with)g(related)330 4988 y(matters,)38 b(or)d(of)h(legal,)i
+(commercial,)h(philosophical,)f(ethical)f(or)e(p)s(olitical)i(p)s
+(osition)f(regarding)330 5097 y(them.)330 5230 y(The)25
+b(\\In)m(v)-5 b(arian)m(t)27 b(Sections")g(are)f(certain)g(Secondary)g
+(Sections)g(whose)f(titles)i(are)f(designated,)i(as)330
+5340 y(b)s(eing)e(those)h(of)g(In)m(v)-5 b(arian)m(t)27
+b(Sections,)i(in)d(the)h(notice)h(that)f(sa)m(ys)g(that)g(the)g(Do)s
+(cumen)m(t)g(is)g(released)p eop end
+%%Page: 144 150
+TeXDict begin 144 149 bop 150 -116 a Ft(144)2527 b(Bash)31
+b(Reference)g(Man)m(ual)330 299 y(under)26 b(this)i(License.)40
+b(If)27 b(a)h(section)h(do)s(es)f(not)f(\014t)h(the)g(ab)s(o)m(v)m(e)h
+(de\014nition)e(of)h(Secondary)f(then)h(it)g(is)330 408
+y(not)k(allo)m(w)m(ed)i(to)e(b)s(e)g(designated)g(as)g(In)m(v)-5
+b(arian)m(t.)46 b(The)31 b(Do)s(cumen)m(t)i(ma)m(y)f(con)m(tain)i(zero)
+e(In)m(v)-5 b(arian)m(t)330 518 y(Sections.)39 b(If)25
+b(the)f(Do)s(cumen)m(t)i(do)s(es)e(not)h(iden)m(tify)g(an)m(y)g(In)m(v)
+-5 b(arian)m(t)25 b(Sections)h(then)e(there)h(are)g(none.)330
+669 y(The)36 b(\\Co)m(v)m(er)i(T)-8 b(exts")38 b(are)f(certain)g(short)
+g(passages)g(of)g(text)g(that)h(are)f(listed,)i(as)d(F)-8
+b(ron)m(t-Co)m(v)m(er)330 778 y(T)g(exts)26 b(or)f(Bac)m(k-Co)m(v)m(er)
+j(T)-8 b(exts,)27 b(in)d(the)h(notice)i(that)e(sa)m(ys)h(that)g(the)f
+(Do)s(cumen)m(t)h(is)f(released)g(under)330 888 y(this)h(License.)40
+b(A)25 b(F)-8 b(ron)m(t-Co)m(v)m(er)29 b(T)-8 b(ext)26
+b(ma)m(y)h(b)s(e)e(at)i(most)f(5)g(w)m(ords,)g(and)g(a)g(Bac)m(k-Co)m
+(v)m(er)j(T)-8 b(ext)26 b(ma)m(y)330 998 y(b)s(e)k(at)h(most)g(25)g(w)m
+(ords.)330 1148 y(A)36 b(\\T)-8 b(ransparen)m(t")36 b(cop)m(y)g(of)g
+(the)f(Do)s(cumen)m(t)h(means)g(a)g(mac)m(hine-readable)h(cop)m(y)-8
+b(,)38 b(represen)m(ted)330 1258 y(in)d(a)h(format)g(whose)g(sp)s
+(eci\014cation)g(is)g(a)m(v)-5 b(ailable)38 b(to)f(the)f(general)g
+(public,)h(that)f(is)g(suitable)g(for)330 1367 y(revising)c(the)g(do)s
+(cumen)m(t)f(straigh)m(tforw)m(ardly)i(with)e(generic)i(text)g(editors)
+f(or)f(\(for)h(images)h(com-)330 1477 y(p)s(osed)23 b(of)h(pixels\))g
+(generic)h(pain)m(t)f(programs)g(or)f(\(for)h(dra)m(wings\))g(some)g
+(widely)g(a)m(v)-5 b(ailable)26 b(dra)m(wing)330 1587
+y(editor,)k(and)f(that)g(is)g(suitable)h(for)f(input)f(to)i(text)g
+(formatters)f(or)g(for)g(automatic)i(translation)f(to)330
+1696 y(a)d(v)-5 b(ariet)m(y)28 b(of)f(formats)g(suitable)h(for)e(input)
+g(to)i(text)g(formatters.)40 b(A)27 b(cop)m(y)g(made)g(in)g(an)g
+(otherwise)330 1806 y(T)-8 b(ransparen)m(t)37 b(\014le)h(format)g
+(whose)f(markup,)i(or)e(absence)h(of)g(markup,)g(has)g(b)s(een)f
+(arranged)g(to)330 1915 y(th)m(w)m(art)27 b(or)g(discourage)g
+(subsequen)m(t)f(mo)s(di\014cation)h(b)m(y)g(readers)f(is)g(not)h(T)-8
+b(ransparen)m(t.)39 b(An)27 b(image)330 2025 y(format)35
+b(is)f(not)h(T)-8 b(ransparen)m(t)34 b(if)g(used)g(for)g(an)m(y)g
+(substan)m(tial)h(amoun)m(t)g(of)g(text.)53 b(A)35 b(cop)m(y)g(that)g
+(is)330 2134 y(not)c(\\T)-8 b(ransparen)m(t")31 b(is)f(called)i
+(\\Opaque".)330 2285 y(Examples)53 b(of)g(suitable)h(formats)f(for)g(T)
+-8 b(ransparen)m(t)53 b(copies)h(include)f(plain)g Fl(asci)r(i)g
+Ft(without)330 2395 y(markup,)37 b(T)-8 b(exinfo)36 b(input)f(format,)j
+(LaT)1759 2414 y(E)1810 2395 y(X)e(input)f(format,)j
+Ff(SGML)f Ft(or)f Ff(XML)g Ft(using)g(a)g(publicly)330
+2504 y(a)m(v)-5 b(ailable)42 b Ff(DTD)p Ft(,)g(and)d
+(standard-conforming)h(simple)g Ff(HTML)p Ft(,)g(P)m(ostScript)h(or)f
+Ff(PDF)g Ft(designed)330 2614 y(for)e(h)m(uman)g(mo)s(di\014cation.)65
+b(Examples)38 b(of)h(transparen)m(t)f(image)i(formats)e(include)g
+Ff(PNG)p Ft(,)h Ff(X)n(CF)330 2724 y Ft(and)h Ff(JPG)p
+Ft(.)g(Opaque)h(formats)g(include)f(proprietary)g(formats)h(that)h(can)
+f(b)s(e)f(read)g(and)h(edited)330 2833 y(only)54 b(b)m(y)f(proprietary)
+h(w)m(ord)f(pro)s(cessors,)59 b Ff(SGML)54 b Ft(or)f
+Ff(XML)h Ft(for)g(whic)m(h)f(the)h Ff(DTD)g Ft(and/or)330
+2943 y(pro)s(cessing)61 b(to)s(ols)h(are)f(not)g(generally)i(a)m(v)-5
+b(ailable,)71 b(and)60 b(the)h(mac)m(hine-generated)j
+Ff(HTML)p Ft(,)330 3052 y(P)m(ostScript)31 b(or)f Ff(PDF)h
+Ft(pro)s(duced)d(b)m(y)j(some)f(w)m(ord)g(pro)s(cessors)g(for)g(output)
+g(purp)s(oses)f(only)-8 b(.)330 3203 y(The)34 b(\\Title)h(P)m(age")i
+(means,)e(for)f(a)h(prin)m(ted)f(b)s(o)s(ok,)h(the)f(title)i(page)f
+(itself,)h(plus)e(suc)m(h)f(follo)m(wing)330 3313 y(pages)28
+b(as)g(are)g(needed)g(to)g(hold,)g(legibly)-8 b(,)30
+b(the)e(material)h(this)e(License)i(requires)e(to)h(app)s(ear)f(in)h
+(the)330 3422 y(title)g(page.)40 b(F)-8 b(or)28 b(w)m(orks)e(in)g
+(formats)h(whic)m(h)g(do)f(not)h(ha)m(v)m(e)h(an)m(y)e(title)j(page)e
+(as)g(suc)m(h,)g(\\Title)h(P)m(age")330 3532 y(means)j(the)f(text)i
+(near)e(the)h(most)g(prominen)m(t)g(app)s(earance)f(of)h(the)g(w)m
+(ork's)g(title,)h(preceding)f(the)330 3641 y(b)s(eginning)f(of)g(the)h
+(b)s(o)s(dy)e(of)h(the)h(text.)330 3792 y(The)j(\\publisher")g(means)h
+(an)m(y)f(p)s(erson)g(or)h(en)m(tit)m(y)h(that)f(distributes)f(copies)i
+(of)e(the)h(Do)s(cumen)m(t)330 3902 y(to)c(the)g(public.)330
+4052 y(A)f(section)h(\\En)m(titled)g(XYZ")f(means)f(a)h(named)g
+(subunit)e(of)h(the)h(Do)s(cumen)m(t)h(whose)e(title)i(either)330
+4162 y(is)d(precisely)g(XYZ)g(or)f(con)m(tains)i(XYZ)f(in)f(paren)m
+(theses)i(follo)m(wing)g(text)g(that)f(translates)h(XYZ)e(in)330
+4271 y(another)e(language.)40 b(\(Here)26 b(XYZ)f(stands)f(for)h(a)g
+(sp)s(eci\014c)g(section)h(name)f(men)m(tioned)h(b)s(elo)m(w,)g(suc)m
+(h)330 4381 y(as)i(\\Ac)m(kno)m(wledgemen)m(ts",)33 b(\\Dedications",)e
+(\\Endorsemen)m(ts",)e(or)f(\\History".\))42 b(T)-8 b(o)29
+b(\\Preserv)m(e)330 4491 y(the)34 b(Title")h(of)e(suc)m(h)h(a)g
+(section)g(when)f(y)m(ou)h(mo)s(dify)e(the)i(Do)s(cumen)m(t)h(means)e
+(that)h(it)g(remains)g(a)330 4600 y(section)e(\\En)m(titled)f(XYZ")g
+(according)g(to)g(this)g(de\014nition.)330 4751 y(The)c(Do)s(cumen)m(t)
+i(ma)m(y)f(include)f(W)-8 b(arran)m(t)m(y)30 b(Disclaimers)f(next)f(to)
+g(the)g(notice)h(whic)m(h)e(states)i(that)330 4861 y(this)34
+b(License)g(applies)g(to)h(the)f(Do)s(cumen)m(t.)52 b(These)33
+b(W)-8 b(arran)m(t)m(y)36 b(Disclaimers)f(are)g(considered)e(to)330
+4970 y(b)s(e)k(included)g(b)m(y)g(reference)h(in)g(this)f(License,)j
+(but)d(only)h(as)g(regards)f(disclaiming)i(w)m(arran)m(ties:)330
+5080 y(an)m(y)e(other)g(implication)i(that)e(these)g(W)-8
+b(arran)m(t)m(y)39 b(Disclaimers)f(ma)m(y)g(ha)m(v)m(e)g(is)f(v)m(oid)g
+(and)f(has)h(no)330 5189 y(e\013ect)32 b(on)e(the)h(meaning)f(of)h
+(this)f(License.)199 5340 y(2.)61 b(VERBA)-8 b(TIM)31
+b(COPYING)p eop end
+%%Page: 145 151
+TeXDict begin 145 150 bop 150 -116 a Ft(App)s(endix)29
+b(C:)h(GNU)h(F)-8 b(ree)31 b(Do)s(cumen)m(tation)i(License)1560
+b(145)330 299 y(Y)-8 b(ou)39 b(ma)m(y)f(cop)m(y)h(and)e(distribute)h
+(the)g(Do)s(cumen)m(t)h(in)f(an)m(y)g(medium,)h(either)g(commercially)h
+(or)330 408 y(noncommercially)-8 b(,)48 b(pro)m(vided)42
+b(that)h(this)f(License,)47 b(the)42 b(cop)m(yrigh)m(t)i(notices,)j
+(and)42 b(the)h(license)330 518 y(notice)37 b(sa)m(ying)g(this)e
+(License)i(applies)e(to)i(the)f(Do)s(cumen)m(t)g(are)g(repro)s(duced)e
+(in)i(all)g(copies,)j(and)330 628 y(that)27 b(y)m(ou)g(add)f(no)h
+(other)f(conditions)h(whatso)s(ev)m(er)h(to)f(those)g(of)g(this)f
+(License.)40 b(Y)-8 b(ou)27 b(ma)m(y)g(not)g(use)330
+737 y(tec)m(hnical)35 b(measures)d(to)i(obstruct)f(or)g(con)m(trol)h
+(the)f(reading)g(or)g(further)e(cop)m(ying)j(of)f(the)g(copies)330
+847 y(y)m(ou)25 b(mak)m(e)g(or)g(distribute.)38 b(Ho)m(w)m(ev)m(er,)28
+b(y)m(ou)d(ma)m(y)g(accept)h(comp)s(ensation)f(in)f(exc)m(hange)j(for)d
+(copies.)330 956 y(If)32 b(y)m(ou)g(distribute)g(a)h(large)g(enough)f
+(n)m(um)m(b)s(er)f(of)h(copies)h(y)m(ou)f(m)m(ust)h(also)g(follo)m(w)g
+(the)f(conditions)330 1066 y(in)e(section)i(3.)330 1200
+y(Y)-8 b(ou)21 b(ma)m(y)h(also)f(lend)g(copies,)i(under)d(the)h(same)g
+(conditions)g(stated)h(ab)s(o)m(v)m(e,)i(and)c(y)m(ou)h(ma)m(y)g
+(publicly)330 1310 y(displa)m(y)31 b(copies.)199 1443
+y(3.)61 b(COPYING)30 b(IN)g(QUANTITY)330 1577 y(If)25
+b(y)m(ou)g(publish)f(prin)m(ted)g(copies)i(\(or)g(copies)g(in)f(media)g
+(that)h(commonly)g(ha)m(v)m(e)g(prin)m(ted)f(co)m(v)m(ers\))i(of)330
+1687 y(the)32 b(Do)s(cumen)m(t,)h(n)m(um)m(b)s(ering)e(more)h(than)f
+(100,)j(and)d(the)h(Do)s(cumen)m(t's)h(license)f(notice)h(requires)330
+1797 y(Co)m(v)m(er)i(T)-8 b(exts,)36 b(y)m(ou)f(m)m(ust)f(enclose)i
+(the)e(copies)h(in)f(co)m(v)m(ers)i(that)f(carry)-8 b(,)36
+b(clearly)f(and)f(legibly)-8 b(,)37 b(all)330 1906 y(these)j(Co)m(v)m
+(er)g(T)-8 b(exts:)59 b(F)-8 b(ron)m(t-Co)m(v)m(er)41
+b(T)-8 b(exts)40 b(on)f(the)g(fron)m(t)g(co)m(v)m(er,)44
+b(and)38 b(Bac)m(k-Co)m(v)m(er)k(T)-8 b(exts)40 b(on)330
+2016 y(the)29 b(bac)m(k)h(co)m(v)m(er.)42 b(Both)30 b(co)m(v)m(ers)h(m)
+m(ust)e(also)h(clearly)g(and)f(legibly)h(iden)m(tify)f(y)m(ou)h(as)f
+(the)h(publisher)330 2125 y(of)k(these)h(copies.)53 b(The)34
+b(fron)m(t)h(co)m(v)m(er)h(m)m(ust)e(presen)m(t)g(the)h(full)f(title)i
+(with)d(all)j(w)m(ords)d(of)i(the)f(title)330 2235 y(equally)e
+(prominen)m(t)e(and)g(visible.)43 b(Y)-8 b(ou)31 b(ma)m(y)g(add)g
+(other)g(material)h(on)f(the)g(co)m(v)m(ers)h(in)e(addition.)330
+2345 y(Cop)m(ying)36 b(with)g(c)m(hanges)h(limited)g(to)g(the)g(co)m(v)
+m(ers,)i(as)d(long)h(as)g(they)f(preserv)m(e)g(the)h(title)g(of)g(the)
+330 2454 y(Do)s(cumen)m(t)h(and)e(satisfy)i(these)f(conditions,)j(can)d
+(b)s(e)g(treated)h(as)f(v)m(erbatim)h(cop)m(ying)g(in)f(other)330
+2564 y(resp)s(ects.)330 2698 y(If)32 b(the)h(required)f(texts)i(for)e
+(either)h(co)m(v)m(er)i(are)e(to)s(o)g(v)m(oluminous)g(to)g(\014t)g
+(legibly)-8 b(,)35 b(y)m(ou)e(should)f(put)330 2807 y(the)h(\014rst)f
+(ones)h(listed)g(\(as)h(man)m(y)f(as)g(\014t)g(reasonably\))g(on)g(the)
+g(actual)h(co)m(v)m(er,)h(and)e(con)m(tin)m(ue)h(the)330
+2917 y(rest)d(on)m(to)g(adjacen)m(t)h(pages.)330 3051
+y(If)27 b(y)m(ou)g(publish)e(or)i(distribute)g(Opaque)f(copies)i(of)f
+(the)h(Do)s(cumen)m(t)f(n)m(um)m(b)s(ering)f(more)i(than)e(100,)330
+3160 y(y)m(ou)i(m)m(ust)g(either)h(include)e(a)i(mac)m(hine-readable)g
+(T)-8 b(ransparen)m(t)28 b(cop)m(y)h(along)g(with)e(eac)m(h)i(Opaque)
+330 3270 y(cop)m(y)-8 b(,)38 b(or)d(state)h(in)f(or)g(with)g(eac)m(h)h
+(Opaque)e(cop)m(y)i(a)g(computer-net)m(w)m(ork)g(lo)s(cation)h(from)d
+(whic)m(h)330 3380 y(the)24 b(general)i(net)m(w)m(ork-using)f(public)e
+(has)h(access)i(to)f(do)m(wnload)f(using)g(public-standard)f(net)m(w)m
+(ork)330 3489 y(proto)s(cols)40 b(a)f(complete)h(T)-8
+b(ransparen)m(t)39 b(cop)m(y)g(of)g(the)h(Do)s(cumen)m(t,)i(free)d(of)g
+(added)f(material.)67 b(If)330 3599 y(y)m(ou)39 b(use)g(the)g(latter)h
+(option,)h(y)m(ou)f(m)m(ust)e(tak)m(e)j(reasonably)e(pruden)m(t)e
+(steps,)k(when)d(y)m(ou)h(b)s(egin)330 3708 y(distribution)f(of)g
+(Opaque)g(copies)h(in)e(quan)m(tit)m(y)-8 b(,)43 b(to)38
+b(ensure)g(that)h(this)f(T)-8 b(ransparen)m(t)38 b(cop)m(y)h(will)330
+3818 y(remain)30 b(th)m(us)g(accessible)i(at)f(the)f(stated)h(lo)s
+(cation)h(un)m(til)e(at)h(least)h(one)e(y)m(ear)h(after)g(the)f(last)h
+(time)330 3927 y(y)m(ou)37 b(distribute)f(an)h(Opaque)f(cop)m(y)i
+(\(directly)g(or)e(through)g(y)m(our)h(agen)m(ts)h(or)f(retailers\))h
+(of)f(that)330 4037 y(edition)31 b(to)g(the)g(public.)330
+4171 y(It)k(is)f(requested,)i(but)e(not)h(required,)g(that)g(y)m(ou)g
+(con)m(tact)h(the)f(authors)f(of)h(the)g(Do)s(cumen)m(t)g(w)m(ell)330
+4281 y(b)s(efore)28 b(redistributing)g(an)m(y)h(large)h(n)m(um)m(b)s
+(er)d(of)i(copies,)h(to)f(giv)m(e)h(them)f(a)g(c)m(hance)h(to)f(pro)m
+(vide)g(y)m(ou)330 4390 y(with)h(an)g(up)s(dated)f(v)m(ersion)i(of)g
+(the)f(Do)s(cumen)m(t.)199 4524 y(4.)61 b(MODIFICA)-8
+b(TIONS)330 4658 y(Y)g(ou)26 b(ma)m(y)g(cop)m(y)g(and)f(distribute)g(a)
+h(Mo)s(di\014ed)f(V)-8 b(ersion)26 b(of)g(the)g(Do)s(cumen)m(t)g(under)
+e(the)h(conditions)330 4768 y(of)c(sections)h(2)g(and)e(3)h(ab)s(o)m(v)
+m(e,)k(pro)m(vided)20 b(that)i(y)m(ou)f(release)i(the)e(Mo)s(di\014ed)f
+(V)-8 b(ersion)22 b(under)d(precisely)330 4877 y(this)29
+b(License,)h(with)f(the)g(Mo)s(di\014ed)f(V)-8 b(ersion)30
+b(\014lling)f(the)g(role)h(of)f(the)g(Do)s(cumen)m(t,)h(th)m(us)f
+(licensing)330 4987 y(distribution)k(and)h(mo)s(di\014cation)g(of)h
+(the)f(Mo)s(di\014ed)f(V)-8 b(ersion)35 b(to)g(who)s(ev)m(er)f(p)s
+(ossesses)f(a)i(cop)m(y)g(of)330 5096 y(it.)41 b(In)30
+b(addition,)h(y)m(ou)f(m)m(ust)h(do)f(these)h(things)f(in)g(the)h(Mo)s
+(di\014ed)e(V)-8 b(ersion:)357 5230 y(A.)60 b(Use)33
+b(in)f(the)h(Title)h(P)m(age)g(\(and)f(on)f(the)h(co)m(v)m(ers,)i(if)e
+(an)m(y\))g(a)g(title)h(distinct)f(from)g(that)g(of)g(the)510
+5340 y(Do)s(cumen)m(t,)j(and)d(from)g(those)i(of)f(previous)f(v)m
+(ersions)h(\(whic)m(h)g(should,)g(if)g(there)g(w)m(ere)g(an)m(y)-8
+b(,)p eop end
+%%Page: 146 152
+TeXDict begin 146 151 bop 150 -116 a Ft(146)2527 b(Bash)31
+b(Reference)g(Man)m(ual)510 299 y(b)s(e)g(listed)h(in)f(the)g(History)h
+(section)g(of)g(the)f(Do)s(cumen)m(t\).)45 b(Y)-8 b(ou)32
+b(ma)m(y)g(use)f(the)g(same)h(title)h(as)510 408 y(a)e(previous)f(v)m
+(ersion)g(if)h(the)f(original)i(publisher)d(of)h(that)h(v)m(ersion)g
+(giv)m(es)h(p)s(ermission.)360 545 y(B.)61 b(List)31
+b(on)f(the)h(Title)g(P)m(age,)i(as)d(authors,)h(one)g(or)f(more)h(p)s
+(ersons)e(or)h(en)m(tities)j(resp)s(onsible)c(for)510
+655 y(authorship)c(of)h(the)h(mo)s(di\014cations)f(in)g(the)g(Mo)s
+(di\014ed)f(V)-8 b(ersion,)28 b(together)g(with)d(at)i(least)h(\014v)m
+(e)510 765 y(of)c(the)g(principal)g(authors)f(of)i(the)f(Do)s(cumen)m
+(t)g(\(all)h(of)g(its)f(principal)g(authors,)h(if)f(it)g(has)g(few)m
+(er)510 874 y(than)30 b(\014v)m(e\),)h(unless)f(they)h(release)g(y)m
+(ou)g(from)f(this)g(requiremen)m(t.)359 1011 y(C.)60
+b(State)32 b(on)e(the)h(Title)h(page)f(the)g(name)g(of)g(the)g
+(publisher)e(of)i(the)g(Mo)s(di\014ed)f(V)-8 b(ersion,)32
+b(as)f(the)510 1121 y(publisher.)355 1258 y(D.)61 b(Preserv)m(e)31
+b(all)g(the)g(cop)m(yrigh)m(t)h(notices)f(of)g(the)f(Do)s(cumen)m(t.)
+363 1395 y(E.)60 b(Add)30 b(an)i(appropriate)f(cop)m(yrigh)m(t)i
+(notice)f(for)g(y)m(our)f(mo)s(di\014cations)g(adjacen)m(t)i(to)f(the)g
+(other)510 1504 y(cop)m(yrigh)m(t)g(notices.)365 1641
+y(F.)61 b(Include,)28 b(immediately)h(after)f(the)h(cop)m(yrigh)m(t)g
+(notices,)h(a)e(license)h(notice)g(giving)g(the)f(public)510
+1751 y(p)s(ermission)23 b(to)j(use)e(the)g(Mo)s(di\014ed)g(V)-8
+b(ersion)25 b(under)e(the)i(terms)f(of)h(this)f(License,)j(in)d(the)g
+(form)510 1861 y(sho)m(wn)30 b(in)g(the)g(Addendum)f(b)s(elo)m(w.)353
+1998 y(G.)61 b(Preserv)m(e)23 b(in)g(that)g(license)h(notice)g(the)f
+(full)g(lists)g(of)g(In)m(v)-5 b(arian)m(t)23 b(Sections)h(and)e
+(required)g(Co)m(v)m(er)510 2107 y(T)-8 b(exts)31 b(giv)m(en)g(in)f
+(the)h(Do)s(cumen)m(t's)g(license)h(notice.)357 2244
+y(H.)60 b(Include)30 b(an)g(unaltered)g(cop)m(y)h(of)g(this)f(License.)
+392 2381 y(I.)60 b(Preserv)m(e)33 b(the)f(section)h(En)m(titled)g
+(\\History",)h(Preserv)m(e)f(its)f(Title,)i(and)d(add)h(to)h(it)f(an)g
+(item)510 2491 y(stating)d(at)g(least)g(the)g(title,)h(y)m(ear,)g(new)d
+(authors,)i(and)e(publisher)f(of)j(the)f(Mo)s(di\014ed)f(V)-8
+b(ersion)510 2600 y(as)32 b(giv)m(en)g(on)f(the)h(Title)g(P)m(age.)45
+b(If)31 b(there)h(is)f(no)g(section)i(En)m(titled)f(\\History")h(in)e
+(the)g(Do)s(cu-)510 2710 y(men)m(t,)37 b(create)f(one)f(stating)h(the)f
+(title,)i(y)m(ear,)g(authors,)f(and)e(publisher)f(of)i(the)g(Do)s
+(cumen)m(t)510 2819 y(as)h(giv)m(en)h(on)f(its)h(Title)g(P)m(age,)i
+(then)d(add)g(an)g(item)g(describing)g(the)g(Mo)s(di\014ed)g(V)-8
+b(ersion)37 b(as)510 2929 y(stated)31 b(in)f(the)h(previous)f(sen)m
+(tence.)378 3066 y(J.)60 b(Preserv)m(e)33 b(the)g(net)m(w)m(ork)g(lo)s
+(cation,)i(if)d(an)m(y)-8 b(,)34 b(giv)m(en)f(in)g(the)f(Do)s(cumen)m
+(t)h(for)g(public)e(access)j(to)510 3176 y(a)e(T)-8 b(ransparen)m(t)30
+b(cop)m(y)i(of)g(the)f(Do)s(cumen)m(t,)h(and)f(lik)m(ewise)h(the)g(net)
+m(w)m(ork)g(lo)s(cations)g(giv)m(en)g(in)510 3285 y(the)g(Do)s(cumen)m
+(t)g(for)g(previous)f(v)m(ersions)h(it)g(w)m(as)g(based)f(on.)45
+b(These)31 b(ma)m(y)h(b)s(e)f(placed)h(in)g(the)510 3395
+y(\\History")27 b(section.)40 b(Y)-8 b(ou)25 b(ma)m(y)h(omit)g(a)f(net)
+m(w)m(ork)h(lo)s(cation)g(for)f(a)h(w)m(ork)f(that)g(w)m(as)h
+(published)510 3504 y(at)36 b(least)h(four)e(y)m(ears)i(b)s(efore)e
+(the)h(Do)s(cumen)m(t)h(itself,)h(or)d(if)h(the)g(original)h(publisher)
+d(of)i(the)510 3614 y(v)m(ersion)31 b(it)g(refers)f(to)h(giv)m(es)h(p)s
+(ermission.)354 3751 y(K.)60 b(F)-8 b(or)24 b(an)m(y)h(section)f(En)m
+(titled)h(\\Ac)m(kno)m(wledgemen)m(ts")i(or)d(\\Dedications",)k
+(Preserv)m(e)c(the)g(Title)510 3861 y(of)j(the)f(section,)j(and)d
+(preserv)m(e)h(in)f(the)h(section)g(all)h(the)e(substance)h(and)f(tone)
+h(of)f(eac)m(h)i(of)f(the)510 3970 y(con)m(tributor)k(ac)m(kno)m
+(wledgemen)m(ts)i(and/or)d(dedications)h(giv)m(en)h(therein.)368
+4107 y(L.)60 b(Preserv)m(e)36 b(all)g(the)g(In)m(v)-5
+b(arian)m(t)36 b(Sections)g(of)f(the)h(Do)s(cumen)m(t,)h(unaltered)f
+(in)f(their)g(text)i(and)510 4217 y(in)f(their)g(titles.)58
+b(Section)37 b(n)m(um)m(b)s(ers)d(or)i(the)g(equiv)-5
+b(alen)m(t)38 b(are)e(not)g(considered)g(part)g(of)g(the)510
+4326 y(section)c(titles.)341 4463 y(M.)61 b(Delete)33
+b(an)m(y)e(section)h(En)m(titled)f(\\Endorsemen)m(ts".)42
+b(Suc)m(h)30 b(a)i(section)f(ma)m(y)h(not)f(b)s(e)f(included)510
+4573 y(in)g(the)h(Mo)s(di\014ed)e(V)-8 b(ersion.)357
+4710 y(N.)60 b(Do)29 b(not)g(retitle)h(an)m(y)e(existing)i(section)f
+(to)g(b)s(e)f(En)m(titled)h(\\Endorsemen)m(ts")g(or)f(to)h(con\015ict)g
+(in)510 4819 y(title)j(with)e(an)m(y)h(In)m(v)-5 b(arian)m(t)31
+b(Section.)354 4956 y(O.)60 b(Preserv)m(e)31 b(an)m(y)g(W)-8
+b(arran)m(t)m(y)32 b(Disclaimers.)330 5121 y(If)h(the)g(Mo)s(di\014ed)g
+(V)-8 b(ersion)34 b(includes)f(new)g(fron)m(t-matter)i(sections)f(or)f
+(app)s(endices)g(that)h(qualify)330 5230 y(as)28 b(Secondary)g
+(Sections)g(and)f(con)m(tain)j(no)d(material)j(copied)e(from)f(the)h
+(Do)s(cumen)m(t,)i(y)m(ou)e(ma)m(y)g(at)330 5340 y(y)m(our)k(option)h
+(designate)h(some)e(or)h(all)g(of)f(these)h(sections)h(as)e(in)m(v)-5
+b(arian)m(t.)48 b(T)-8 b(o)33 b(do)f(this,)h(add)f(their)p
+eop end
+%%Page: 147 153
+TeXDict begin 147 152 bop 150 -116 a Ft(App)s(endix)29
+b(C:)h(GNU)h(F)-8 b(ree)31 b(Do)s(cumen)m(tation)i(License)1560
+b(147)330 299 y(titles)37 b(to)f(the)f(list)h(of)g(In)m(v)-5
+b(arian)m(t)36 b(Sections)g(in)f(the)h(Mo)s(di\014ed)f(V)-8
+b(ersion's)36 b(license)g(notice.)57 b(These)330 408
+y(titles)32 b(m)m(ust)e(b)s(e)g(distinct)h(from)e(an)m(y)i(other)g
+(section)g(titles.)330 551 y(Y)-8 b(ou)43 b(ma)m(y)g(add)f(a)g(section)
+i(En)m(titled)f(\\Endorsemen)m(ts",)j(pro)m(vided)c(it)h(con)m(tains)g
+(nothing)g(but)330 661 y(endorsemen)m(ts)30 b(of)g(y)m(our)f(Mo)s
+(di\014ed)g(V)-8 b(ersion)31 b(b)m(y)e(v)-5 b(arious)30
+b(parties|for)g(example,)g(statemen)m(ts)i(of)330 770
+y(p)s(eer)27 b(review)g(or)g(that)h(the)f(text)i(has)d(b)s(een)h(appro)
+m(v)m(ed)g(b)m(y)g(an)h(organization)h(as)e(the)h(authoritativ)m(e)330
+880 y(de\014nition)i(of)h(a)f(standard.)330 1022 y(Y)-8
+b(ou)29 b(ma)m(y)g(add)e(a)i(passage)g(of)g(up)e(to)i(\014v)m(e)g(w)m
+(ords)e(as)i(a)g(F)-8 b(ron)m(t-Co)m(v)m(er)30 b(T)-8
+b(ext,)30 b(and)e(a)g(passage)i(of)e(up)330 1132 y(to)g(25)g(w)m(ords)e
+(as)i(a)f(Bac)m(k-Co)m(v)m(er)j(T)-8 b(ext,)29 b(to)f(the)f(end)f(of)i
+(the)f(list)h(of)f(Co)m(v)m(er)h(T)-8 b(exts)27 b(in)g(the)h(Mo)s
+(di\014ed)330 1241 y(V)-8 b(ersion.)58 b(Only)35 b(one)h(passage)h(of)f
+(F)-8 b(ron)m(t-Co)m(v)m(er)38 b(T)-8 b(ext)36 b(and)g(one)g(of)g(Bac)m
+(k-Co)m(v)m(er)j(T)-8 b(ext)36 b(ma)m(y)h(b)s(e)330 1351
+y(added)27 b(b)m(y)g(\(or)h(through)f(arrangemen)m(ts)h(made)g(b)m(y\))
+g(an)m(y)g(one)f(en)m(tit)m(y)-8 b(.)42 b(If)27 b(the)h(Do)s(cumen)m(t)
+g(already)330 1461 y(includes)34 b(a)g(co)m(v)m(er)h(text)g(for)f(the)g
+(same)h(co)m(v)m(er,)h(previously)e(added)f(b)m(y)h(y)m(ou)g(or)g(b)m
+(y)g(arrangemen)m(t)330 1570 y(made)h(b)m(y)g(the)h(same)f(en)m(tit)m
+(y)i(y)m(ou)f(are)f(acting)i(on)e(b)s(ehalf)f(of,)j(y)m(ou)f(ma)m(y)g
+(not)f(add)g(another;)j(but)330 1680 y(y)m(ou)c(ma)m(y)h(replace)g(the)
+f(old)g(one,)i(on)e(explicit)h(p)s(ermission)e(from)g(the)i(previous)e
+(publisher)f(that)330 1789 y(added)e(the)g(old)h(one.)330
+1932 y(The)25 b(author\(s\))h(and)f(publisher\(s\))f(of)i(the)f(Do)s
+(cumen)m(t)h(do)g(not)f(b)m(y)h(this)f(License)h(giv)m(e)h(p)s
+(ermission)330 2041 y(to)k(use)f(their)g(names)h(for)f(publicit)m(y)g
+(for)h(or)f(to)h(assert)g(or)f(imply)g(endorsemen)m(t)g(of)h(an)m(y)g
+(Mo)s(di\014ed)330 2151 y(V)-8 b(ersion.)199 2293 y(5.)61
+b(COMBINING)31 b(DOCUMENTS)330 2436 y(Y)-8 b(ou)39 b(ma)m(y)g(com)m
+(bine)h(the)f(Do)s(cumen)m(t)g(with)g(other)f(do)s(cumen)m(ts)h
+(released)g(under)f(this)g(License,)330 2545 y(under)f(the)h(terms)g
+(de\014ned)f(in)h(section)h(4)g(ab)s(o)m(v)m(e)g(for)f(mo)s(di\014ed)f
+(v)m(ersions,)k(pro)m(vided)d(that)h(y)m(ou)330 2655
+y(include)25 b(in)g(the)g(com)m(bination)i(all)f(of)g(the)f(In)m(v)-5
+b(arian)m(t)26 b(Sections)g(of)g(all)g(of)f(the)h(original)g(do)s
+(cumen)m(ts,)330 2765 y(unmo)s(di\014ed,)g(and)g(list)h(them)g(all)g
+(as)g(In)m(v)-5 b(arian)m(t)28 b(Sections)f(of)g(y)m(our)g(com)m(bined)
+g(w)m(ork)f(in)h(its)g(license)330 2874 y(notice,)32
+b(and)e(that)h(y)m(ou)f(preserv)m(e)h(all)g(their)g(W)-8
+b(arran)m(t)m(y)32 b(Disclaimers.)330 3017 y(The)e(com)m(bined)g(w)m
+(ork)h(need)e(only)i(con)m(tain)g(one)g(cop)m(y)g(of)f(this)g(License,)
+i(and)d(m)m(ultiple)i(iden)m(tical)330 3126 y(In)m(v)-5
+b(arian)m(t)33 b(Sections)g(ma)m(y)g(b)s(e)f(replaced)h(with)f(a)h
+(single)g(cop)m(y)-8 b(.)48 b(If)32 b(there)h(are)g(m)m(ultiple)g(In)m
+(v)-5 b(arian)m(t)330 3236 y(Sections)27 b(with)g(the)g(same)g(name)g
+(but)f(di\013eren)m(t)h(con)m(ten)m(ts,)i(mak)m(e)f(the)f(title)h(of)f
+(eac)m(h)h(suc)m(h)f(section)330 3345 y(unique)33 b(b)m(y)h(adding)f
+(at)i(the)f(end)g(of)g(it,)h(in)f(paren)m(theses,)i(the)e(name)g(of)g
+(the)g(original)h(author)f(or)330 3455 y(publisher)23
+b(of)i(that)h(section)g(if)f(kno)m(wn,)h(or)f(else)h(a)f(unique)f(n)m
+(um)m(b)s(er.)38 b(Mak)m(e)26 b(the)g(same)f(adjustmen)m(t)330
+3565 y(to)g(the)g(section)g(titles)h(in)e(the)h(list)g(of)f(In)m(v)-5
+b(arian)m(t)26 b(Sections)f(in)f(the)g(license)i(notice)g(of)e(the)h
+(com)m(bined)330 3674 y(w)m(ork.)330 3817 y(In)41 b(the)g(com)m
+(bination,)46 b(y)m(ou)41 b(m)m(ust)g(com)m(bine)h(an)m(y)g(sections)g
+(En)m(titled)g(\\History")h(in)e(the)g(v)-5 b(ari-)330
+3926 y(ous)32 b(original)h(do)s(cumen)m(ts,)g(forming)f(one)g(section)h
+(En)m(titled)g(\\History";)i(lik)m(ewise)f(com)m(bine)f(an)m(y)330
+4036 y(sections)g(En)m(titled)f(\\Ac)m(kno)m(wledgemen)m(ts",)k(and)31
+b(an)m(y)h(sections)h(En)m(titled)g(\\Dedications".)47
+b(Y)-8 b(ou)330 4145 y(m)m(ust)30 b(delete)i(all)f(sections)h(En)m
+(titled)f(\\Endorsemen)m(ts.")199 4288 y(6.)61 b(COLLECTIONS)28
+b(OF)i(DOCUMENTS)330 4430 y(Y)-8 b(ou)32 b(ma)m(y)h(mak)m(e)g(a)f
+(collection)i(consisting)f(of)f(the)g(Do)s(cumen)m(t)g(and)g(other)g
+(do)s(cumen)m(ts)f(released)330 4540 y(under)41 b(this)h(License,)k
+(and)c(replace)h(the)g(individual)f(copies)h(of)f(this)g(License)h(in)f
+(the)h(v)-5 b(arious)330 4650 y(do)s(cumen)m(ts)42 b(with)g(a)h(single)
+g(cop)m(y)h(that)f(is)f(included)g(in)g(the)h(collection,)48
+b(pro)m(vided)42 b(that)i(y)m(ou)330 4759 y(follo)m(w)38
+b(the)g(rules)e(of)h(this)g(License)h(for)f(v)m(erbatim)h(cop)m(ying)g
+(of)f(eac)m(h)h(of)f(the)h(do)s(cumen)m(ts)e(in)h(all)330
+4869 y(other)31 b(resp)s(ects.)330 5011 y(Y)-8 b(ou)32
+b(ma)m(y)g(extract)h(a)f(single)g(do)s(cumen)m(t)f(from)g(suc)m(h)g(a)h
+(collection,)i(and)d(distribute)g(it)h(individu-)330
+5121 y(ally)k(under)d(this)i(License,)i(pro)m(vided)e(y)m(ou)g(insert)g
+(a)g(cop)m(y)h(of)f(this)g(License)g(in)m(to)h(the)g(extracted)330
+5230 y(do)s(cumen)m(t,)d(and)f(follo)m(w)i(this)e(License)h(in)g(all)g
+(other)g(resp)s(ects)f(regarding)h(v)m(erbatim)g(cop)m(ying)h(of)330
+5340 y(that)d(do)s(cumen)m(t.)p eop end
+%%Page: 148 154
+TeXDict begin 148 153 bop 150 -116 a Ft(148)2527 b(Bash)31
+b(Reference)g(Man)m(ual)199 299 y(7.)61 b(A)m(GGREGA)-8
+b(TION)32 b(WITH)e(INDEPENDENT)h(W)m(ORKS)330 441 y(A)d(compilation)i
+(of)e(the)g(Do)s(cumen)m(t)h(or)f(its)g(deriv)-5 b(ativ)m(es)30
+b(with)d(other)i(separate)g(and)e(indep)s(enden)m(t)330
+551 y(do)s(cumen)m(ts)33 b(or)g(w)m(orks,)h(in)f(or)h(on)f(a)g(v)m
+(olume)h(of)g(a)f(storage)i(or)e(distribution)g(medium,)g(is)h(called)
+330 661 y(an)c(\\aggregate")k(if)c(the)g(cop)m(yrigh)m(t)i(resulting)e
+(from)f(the)i(compilation)g(is)f(not)h(used)e(to)i(limit)g(the)330
+770 y(legal)d(righ)m(ts)f(of)g(the)g(compilation's)h(users)e(b)s(ey)m
+(ond)g(what)g(the)h(individual)f(w)m(orks)g(p)s(ermit.)39
+b(When)330 880 y(the)g(Do)s(cumen)m(t)g(is)f(included)g(in)g(an)g
+(aggregate,)44 b(this)38 b(License)h(do)s(es)f(not)h(apply)f(to)h(the)g
+(other)330 989 y(w)m(orks)30 b(in)g(the)h(aggregate)i(whic)m(h)d(are)h
+(not)g(themselv)m(es)g(deriv)-5 b(ativ)m(e)32 b(w)m(orks)f(of)f(the)h
+(Do)s(cumen)m(t.)330 1132 y(If)22 b(the)h(Co)m(v)m(er)h(T)-8
+b(ext)23 b(requiremen)m(t)g(of)g(section)h(3)f(is)g(applicable)h(to)f
+(these)h(copies)f(of)g(the)g(Do)s(cumen)m(t,)330 1241
+y(then)f(if)g(the)h(Do)s(cumen)m(t)g(is)g(less)f(than)g(one)h(half)f
+(of)h(the)g(en)m(tire)g(aggregate,)k(the)c(Do)s(cumen)m(t's)g(Co)m(v)m
+(er)330 1351 y(T)-8 b(exts)27 b(ma)m(y)g(b)s(e)f(placed)h(on)g(co)m(v)m
+(ers)h(that)f(brac)m(k)m(et)h(the)f(Do)s(cumen)m(t)g(within)f(the)h
+(aggregate,)j(or)d(the)330 1461 y(electronic)37 b(equiv)-5
+b(alen)m(t)36 b(of)g(co)m(v)m(ers)g(if)f(the)g(Do)s(cumen)m(t)h(is)f
+(in)g(electronic)i(form.)54 b(Otherwise)35 b(they)330
+1570 y(m)m(ust)30 b(app)s(ear)g(on)g(prin)m(ted)g(co)m(v)m(ers)i(that)f
+(brac)m(k)m(et)h(the)f(whole)f(aggregate.)199 1713 y(8.)61
+b(TRANSLA)-8 b(TION)330 1855 y(T)g(ranslation)41 b(is)f(considered)f(a)
+i(kind)e(of)h(mo)s(di\014cation,)j(so)d(y)m(ou)g(ma)m(y)h(distribute)e
+(translations)330 1965 y(of)45 b(the)f(Do)s(cumen)m(t)h(under)e(the)h
+(terms)h(of)f(section)i(4.)83 b(Replacing)45 b(In)m(v)-5
+b(arian)m(t)45 b(Sections)g(with)330 2074 y(translations)h(requires)f
+(sp)s(ecial)h(p)s(ermission)f(from)g(their)g(cop)m(yrigh)m(t)i
+(holders,)i(but)c(y)m(ou)g(ma)m(y)330 2184 y(include)24
+b(translations)i(of)e(some)h(or)g(all)g(In)m(v)-5 b(arian)m(t)25
+b(Sections)g(in)f(addition)h(to)g(the)g(original)h(v)m(ersions)330
+2293 y(of)32 b(these)f(In)m(v)-5 b(arian)m(t)33 b(Sections.)44
+b(Y)-8 b(ou)32 b(ma)m(y)g(include)f(a)h(translation)g(of)g(this)f
+(License,)i(and)d(all)j(the)330 2403 y(license)42 b(notices)g(in)f(the)
+h(Do)s(cumen)m(t,)j(and)40 b(an)m(y)i(W)-8 b(arran)m(t)m(y)42
+b(Disclaimers,)k(pro)m(vided)41 b(that)h(y)m(ou)330 2513
+y(also)f(include)f(the)g(original)h(English)f(v)m(ersion)g(of)g(this)g
+(License)h(and)e(the)h(original)h(v)m(ersions)g(of)330
+2622 y(those)35 b(notices)g(and)e(disclaimers.)53 b(In)33
+b(case)i(of)g(a)f(disagreemen)m(t)h(b)s(et)m(w)m(een)g(the)f
+(translation)i(and)330 2732 y(the)f(original)i(v)m(ersion)e(of)h(this)f
+(License)h(or)f(a)g(notice)i(or)e(disclaimer,)i(the)f(original)g(v)m
+(ersion)g(will)330 2841 y(prev)-5 b(ail.)330 2984 y(If)28
+b(a)h(section)h(in)e(the)h(Do)s(cumen)m(t)h(is)e(En)m(titled)i(\\Ac)m
+(kno)m(wledgemen)m(ts",)i(\\Dedications",)g(or)d(\\His-)330
+3093 y(tory",)f(the)f(requiremen)m(t)f(\(section)i(4\))f(to)g(Preserv)m
+(e)g(its)f(Title)i(\(section)f(1\))g(will)g(t)m(ypically)h(require)330
+3203 y(c)m(hanging)j(the)g(actual)h(title.)199 3345 y(9.)61
+b(TERMINA)-8 b(TION)330 3488 y(Y)g(ou)30 b(ma)m(y)h(not)f(cop)m(y)-8
+b(,)31 b(mo)s(dify)-8 b(,)30 b(sublicense,)g(or)g(distribute)f(the)h
+(Do)s(cumen)m(t)g(except)h(as)f(expressly)330 3598 y(pro)m(vided)38
+b(under)f(this)i(License.)65 b(An)m(y)39 b(attempt)h(otherwise)f(to)g
+(cop)m(y)-8 b(,)42 b(mo)s(dify)-8 b(,)40 b(sublicense,)h(or)330
+3707 y(distribute)30 b(it)h(is)f(v)m(oid,)h(and)f(will)h(automatically)
+i(terminate)f(y)m(our)e(righ)m(ts)h(under)e(this)h(License.)330
+3850 y(Ho)m(w)m(ev)m(er,)35 b(if)e(y)m(ou)f(cease)i(all)f(violation)i
+(of)d(this)g(License,)i(then)e(y)m(our)h(license)g(from)f(a)h
+(particular)330 3959 y(cop)m(yrigh)m(t)k(holder)e(is)h(reinstated)h
+(\(a\))f(pro)m(visionally)-8 b(,)39 b(unless)c(and)g(un)m(til)h(the)g
+(cop)m(yrigh)m(t)h(holder)330 4069 y(explicitly)42 b(and)e(\014nally)h
+(terminates)g(y)m(our)g(license,)j(and)c(\(b\))h(p)s(ermanen)m(tly)-8
+b(,)43 b(if)e(the)g(cop)m(yrigh)m(t)330 4178 y(holder)34
+b(fails)h(to)g(notify)g(y)m(ou)g(of)f(the)h(violation)h(b)m(y)e(some)h
+(reasonable)g(means)g(prior)e(to)i(60)h(da)m(ys)330 4288
+y(after)31 b(the)f(cessation.)330 4430 y(Moreo)m(v)m(er,)k(y)m(our)d
+(license)i(from)e(a)h(particular)f(cop)m(yrigh)m(t)i(holder)e(is)h
+(reinstated)g(p)s(ermanen)m(tly)f(if)330 4540 y(the)d(cop)m(yrigh)m(t)h
+(holder)f(noti\014es)g(y)m(ou)g(of)g(the)g(violation)h(b)m(y)f(some)g
+(reasonable)h(means,)f(this)g(is)g(the)330 4650 y(\014rst)f(time)i(y)m
+(ou)f(ha)m(v)m(e)h(receiv)m(ed)g(notice)g(of)f(violation)i(of)e(this)f
+(License)i(\(for)f(an)m(y)g(w)m(ork\))g(from)f(that)330
+4759 y(cop)m(yrigh)m(t)33 b(holder,)g(and)e(y)m(ou)h(cure)g(the)g
+(violation)i(prior)d(to)i(30)f(da)m(ys)h(after)f(y)m(our)g(receipt)h
+(of)f(the)330 4869 y(notice.)330 5011 y(T)-8 b(ermination)28
+b(of)g(y)m(our)f(righ)m(ts)h(under)e(this)i(section)g(do)s(es)f(not)h
+(terminate)h(the)e(licenses)i(of)f(parties)330 5121 y(who)38
+b(ha)m(v)m(e)h(receiv)m(ed)h(copies)e(or)h(righ)m(ts)f(from)g(y)m(ou)g
+(under)f(this)h(License.)64 b(If)38 b(y)m(our)g(righ)m(ts)h(ha)m(v)m(e)
+330 5230 y(b)s(een)25 b(terminated)i(and)e(not)h(p)s(ermanen)m(tly)g
+(reinstated,)i(receipt)f(of)f(a)g(cop)m(y)h(of)f(some)h(or)f(all)h(of)f
+(the)330 5340 y(same)31 b(material)h(do)s(es)e(not)g(giv)m(e)i(y)m(ou)f
+(an)m(y)g(righ)m(ts)f(to)i(use)e(it.)p eop end
+%%Page: 149 155
+TeXDict begin 149 154 bop 150 -116 a Ft(App)s(endix)29
+b(C:)h(GNU)h(F)-8 b(ree)31 b(Do)s(cumen)m(tation)i(License)1560
+b(149)154 299 y(10.)61 b(FUTURE)30 b(REVISIONS)f(OF)i(THIS)e(LICENSE)
+330 433 y(The)41 b(F)-8 b(ree)43 b(Soft)m(w)m(are)f(F)-8
+b(oundation)43 b(ma)m(y)f(publish)e(new,)k(revised)d(v)m(ersions)h(of)g
+(the)g(GNU)g(F)-8 b(ree)330 543 y(Do)s(cumen)m(tation)34
+b(License)e(from)g(time)h(to)g(time.)46 b(Suc)m(h)31
+b(new)h(v)m(ersions)g(will)h(b)s(e)e(similar)h(in)g(spirit)330
+653 y(to)j(the)g(presen)m(t)f(v)m(ersion,)i(but)e(ma)m(y)h(di\013er)f
+(in)g(detail)h(to)g(address)f(new)g(problems)f(or)i(concerns.)330
+762 y(See)c Fs(http://www.gnu.org/copy)o(left)o(/)p Ft(.)330
+897 y(Eac)m(h)f(v)m(ersion)g(of)g(the)f(License)h(is)g(giv)m(en)g(a)g
+(distinguishing)f(v)m(ersion)h(n)m(um)m(b)s(er.)39 b(If)29
+b(the)g(Do)s(cumen)m(t)330 1006 y(sp)s(eci\014es)45 b(that)h(a)g
+(particular)f(n)m(um)m(b)s(ered)f(v)m(ersion)i(of)f(this)g(License)h
+(\\or)g(an)m(y)g(later)g(v)m(ersion")330 1116 y(applies)33
+b(to)g(it,)h(y)m(ou)e(ha)m(v)m(e)i(the)f(option)g(of)f(follo)m(wing)i
+(the)f(terms)f(and)g(conditions)h(either)g(of)f(that)330
+1225 y(sp)s(eci\014ed)37 b(v)m(ersion)i(or)e(of)h(an)m(y)h(later)g(v)m
+(ersion)f(that)g(has)g(b)s(een)f(published)f(\(not)j(as)f(a)g(draft\))g
+(b)m(y)330 1335 y(the)33 b(F)-8 b(ree)34 b(Soft)m(w)m(are)f(F)-8
+b(oundation.)49 b(If)32 b(the)h(Do)s(cumen)m(t)g(do)s(es)g(not)g(sp)s
+(ecify)f(a)h(v)m(ersion)g(n)m(um)m(b)s(er)f(of)330 1445
+y(this)i(License,)j(y)m(ou)d(ma)m(y)i(c)m(ho)s(ose)f(an)m(y)g(v)m
+(ersion)g(ev)m(er)g(published)e(\(not)i(as)g(a)f(draft\))h(b)m(y)f(the)
+h(F)-8 b(ree)330 1554 y(Soft)m(w)m(are)33 b(F)-8 b(oundation.)46
+b(If)32 b(the)g(Do)s(cumen)m(t)g(sp)s(eci\014es)g(that)g(a)h(pro)m(xy)f
+(can)g(decide)g(whic)m(h)g(future)330 1664 y(v)m(ersions)h(of)g(this)f
+(License)h(can)g(b)s(e)f(used,)g(that)i(pro)m(xy's)e(public)g(statemen)
+m(t)i(of)f(acceptance)i(of)e(a)330 1773 y(v)m(ersion)e(p)s(ermanen)m
+(tly)f(authorizes)h(y)m(ou)g(to)g(c)m(ho)s(ose)g(that)g(v)m(ersion)g
+(for)f(the)h(Do)s(cumen)m(t.)154 1908 y(11.)61 b(RELICENSING)330
+2042 y(\\Massiv)m(e)39 b(Multiauthor)f(Collab)s(oration)g(Site")h(\(or)
+e(\\MMC)h(Site"\))h(means)e(an)m(y)h(W)-8 b(orld)37 b(Wide)330
+2152 y(W)-8 b(eb)36 b(serv)m(er)g(that)h(publishes)d(cop)m(yrigh)m
+(table)k(w)m(orks)e(and)f(also)i(pro)m(vides)e(prominen)m(t)h
+(facilities)330 2262 y(for)27 b(an)m(yb)s(o)s(dy)g(to)h(edit)g(those)g
+(w)m(orks.)39 b(A)28 b(public)f(wiki)h(that)g(an)m(yb)s(o)s(dy)e(can)i
+(edit)g(is)f(an)h(example)g(of)330 2371 y(suc)m(h)33
+b(a)h(serv)m(er.)51 b(A)34 b(\\Massiv)m(e)i(Multiauthor)e(Collab)s
+(oration")h(\(or)f(\\MMC"\))h(con)m(tained)g(in)f(the)330
+2481 y(site)d(means)f(an)m(y)h(set)g(of)g(cop)m(yrigh)m(table)h(w)m
+(orks)e(th)m(us)g(published)f(on)h(the)h(MMC)f(site.)330
+2615 y(\\CC-BY-SA")36 b(means)f(the)g(Creativ)m(e)i(Commons)e(A)m
+(ttribution-Share)g(Alik)m(e)i(3.0)f(license)g(pub-)330
+2725 y(lished)27 b(b)m(y)f(Creativ)m(e)j(Commons)d(Corp)s(oration,)h(a)
+g(not-for-pro\014t)g(corp)s(oration)h(with)e(a)h(principal)330
+2834 y(place)g(of)f(business)e(in)i(San)f(F)-8 b(rancisco,)29
+b(California,)f(as)e(w)m(ell)h(as)f(future)f(cop)m(yleft)i(v)m(ersions)
+f(of)g(that)330 2944 y(license)31 b(published)e(b)m(y)h(that)h(same)g
+(organization.)330 3078 y(\\Incorp)s(orate")h(means)e(to)h(publish)e
+(or)i(republish)e(a)i(Do)s(cumen)m(t,)g(in)g(whole)g(or)f(in)g(part,)h
+(as)g(part)330 3188 y(of)g(another)f(Do)s(cumen)m(t.)330
+3323 y(An)c(MMC)g(is)h(\\eligible)h(for)e(relicensing")h(if)g(it)f(is)h
+(licensed)f(under)f(this)h(License,)i(and)e(if)g(all)h(w)m(orks)330
+3432 y(that)43 b(w)m(ere)f(\014rst)f(published)f(under)h(this)h
+(License)g(somewhere)g(other)g(than)g(this)g(MMC,)h(and)330
+3542 y(subsequen)m(tly)34 b(incorp)s(orated)h(in)f(whole)h(or)g(in)f
+(part)h(in)m(to)h(the)f(MMC,)g(\(1\))h(had)e(no)h(co)m(v)m(er)h(texts)
+330 3651 y(or)30 b(in)m(v)-5 b(arian)m(t)32 b(sections,)g(and)d(\(2\))j
+(w)m(ere)f(th)m(us)f(incorp)s(orated)g(prior)g(to)h(No)m(v)m(em)m(b)s
+(er)g(1,)g(2008.)330 3786 y(The)40 b(op)s(erator)h(of)g(an)f(MMC)h
+(Site)g(ma)m(y)g(republish)e(an)h(MMC)h(con)m(tained)h(in)e(the)h(site)
+g(under)330 3895 y(CC-BY-SA)30 b(on)g(the)h(same)f(site)h(at)g(an)m(y)g
+(time)g(b)s(efore)e(August)h(1,)h(2009,)h(pro)m(vided)e(the)g(MMC)h(is)
+330 4005 y(eligible)h(for)e(relicensing.)p eop end
+%%Page: 150 156
+TeXDict begin 150 155 bop 150 -116 a Ft(150)2527 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fr(ADDENDUM:)45 b(Ho)l(w)h(to)f(use)g
+(this)h(License)f(for)g(y)l(our)g(do)t(cumen)l(ts)150
+458 y Ft(T)-8 b(o)35 b(use)f(this)h(License)g(in)f(a)h(do)s(cumen)m(t)g
+(y)m(ou)f(ha)m(v)m(e)i(written,)g(include)f(a)f(cop)m(y)i(of)f(the)f
+(License)h(in)g(the)150 568 y(do)s(cumen)m(t)30 b(and)g(put)g(the)g
+(follo)m(wing)i(cop)m(yrigh)m(t)g(and)e(license)h(notices)g(just)f
+(after)h(the)g(title)h(page:)468 680 y Fe(Copyright)42
+b(\(C\))79 b Fd(year)88 b(your)40 b(name)9 b Fe(.)468
+767 y(Permission)42 b(is)e(granted)g(to)g(copy,)h(distribute)g(and/or)g
+(modify)f(this)g(document)468 854 y(under)h(the)f(terms)g(of)g(the)g
+(GNU)g(Free)g(Documentation)i(License,)f(Version)g(1.3)468
+941 y(or)f(any)g(later)g(version)h(published)h(by)d(the)h(Free)g
+(Software)h(Foundation;)468 1029 y(with)g(no)e(Invariant)j(Sections,)f
+(no)f(Front-Cover)h(Texts,)g(and)f(no)f(Back-Cover)468
+1116 y(Texts.)80 b(A)40 b(copy)g(of)g(the)f(license)i(is)f(included)h
+(in)f(the)g(section)g(entitled)h(``GNU)468 1203 y(Free)g(Documentation)
+h(License''.)275 1337 y Ft(If)d(y)m(ou)h(ha)m(v)m(e)h(In)m(v)-5
+b(arian)m(t)41 b(Sections,)i(F)-8 b(ron)m(t-Co)m(v)m(er)42
+b(T)-8 b(exts)41 b(and)e(Bac)m(k-Co)m(v)m(er)k(T)-8 b(exts,)43
+b(replace)e(the)150 1447 y(\\with)6 b(.)22 b(.)g(.)12
+b(T)-8 b(exts.")41 b(line)31 b(with)f(this:)547 1559
+y Fe(with)40 b(the)g(Invariant)h(Sections)g(being)g Fd(list)f(their)g
+(titles)9 b Fe(,)41 b(with)547 1646 y(the)f(Front-Cover)i(Texts)e
+(being)g Fd(list)9 b Fe(,)40 b(and)g(with)g(the)g(Back-Cover)i(Texts)
+547 1733 y(being)e Fd(list)9 b Fe(.)275 1868 y Ft(If)34
+b(y)m(ou)i(ha)m(v)m(e)g(In)m(v)-5 b(arian)m(t)36 b(Sections)g(without)f
+(Co)m(v)m(er)h(T)-8 b(exts,)38 b(or)d(some)g(other)h(com)m(bination)g
+(of)g(the)150 1978 y(three,)31 b(merge)g(those)g(t)m(w)m(o)g
+(alternativ)m(es)i(to)e(suit)f(the)h(situation.)275 2112
+y(If)23 b(y)m(our)h(do)s(cumen)m(t)f(con)m(tains)i(non)m(trivial)g
+(examples)g(of)f(program)f(co)s(de,)j(w)m(e)e(recommend)g(releasing)150
+2222 y(these)44 b(examples)f(in)g(parallel)h(under)e(y)m(our)h(c)m
+(hoice)i(of)e(free)g(soft)m(w)m(are)h(license,)k(suc)m(h)43
+b(as)g(the)g(GNU)150 2331 y(General)31 b(Public)f(License,)i(to)f(p)s
+(ermit)e(their)i(use)f(in)g(free)g(soft)m(w)m(are.)p
+eop end
+%%Page: 151 157
+TeXDict begin 151 156 bop 150 -116 a Ft(App)s(endix)29
+b(D:)i(Indexes)2623 b(151)150 299 y Fo(App)t(endix)52
+b(D)81 b(Indexes)150 631 y Fr(D.1)68 b(Index)45 b(of)g(Shell)g(Builtin)
+g(Commands)150 868 y(.)150 984 y Fe(.)13 b Fc(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)39 b Fb(35)150 1218 y Fr(:)150 1335
+y Fe(:)13 b Fc(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)39
+b Fb(35)150 1579 y Fr([)150 1695 y Fe([)13 b Fc(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)39 b Fb(39)150 1938 y Fr(A)150 2055
+y Fe(alias)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)46 b Fb(41)150
+2289 y Fr(B)150 2405 y Fe(bg)10 b Fc(:)k(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)37 b Fb(90)150 2493 y Fe(bind)23 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+49 b Fb(41)150 2580 y Fe(break)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)46
+b Fb(35)150 2668 y Fe(builtin)15 b Fc(:)f(:)f(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)41
+b Fb(43)150 2902 y Fr(C)150 3019 y Fe(caller)17 b Fc(:)e(:)e(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+43 b Fb(43)150 3106 y Fe(cd)10 b Fc(:)k(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)37 b Fb(36)150 3194 y Fe(command)15 b Fc(:)f(:)f(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)41
+b Fb(43)150 3281 y Fe(compgen)12 b Fc(:)j(:)e(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)39 b
+Fb(117)150 3368 y Fe(complete)10 b Fc(:)15 b(:)e(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)37 b Fb(117)150
+3456 y Fe(compopt)12 b Fc(:)j(:)e(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)39 b Fb(120)150 3543
+y Fe(continue)12 b Fc(:)j(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)38 b Fb(36)150 3778 y
+Fr(D)150 3894 y Fe(declare)15 b Fc(:)f(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)41 b
+Fb(43)150 3982 y Fe(dirs)23 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)49
+b Fb(81)150 4069 y Fe(disown)17 b Fc(:)e(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)43
+b Fb(91)150 4303 y Fr(E)150 4420 y Fe(echo)23 b Fc(:)13
+b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)49 b Fb(45)150 4507 y Fe(enable)17
+b Fc(:)e(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)43 b Fb(45)150 4595 y Fe(eval)23
+b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)49 b Fb(36)150 4682 y
+Fe(exec)23 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)49 b Fb(36)150
+4770 y Fe(exit)23 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)49
+b Fb(36)150 4857 y Fe(export)17 b Fc(:)e(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)43
+b Fb(36)150 5110 y Fr(F)150 5227 y Fe(fc)8 b Fc(:)14
+b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)35 b Fb(121)150 5314
+y Fe(fg)10 b Fc(:)k(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)37
+b Fb(90)2025 868 y Fr(G)2025 988 y Fe(getopts)15 b Fc(:)f(:)f(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)41
+b Fb(37)2025 1250 y Fr(H)2025 1370 y Fe(hash)23 b Fc(:)13
+b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)49 b Fb(37)2025 1459 y Fe(help)23
+b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b Fb(46)2025 1549
+y Fe(history)12 b Fc(:)j(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39 b Fb(122)2025 1811
+y Fr(J)2025 1931 y Fe(jobs)23 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49
+b Fb(90)2025 2193 y Fr(K)2025 2313 y Fe(kill)23 b Fc(:)13
+b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)49 b Fb(91)2025 2557 y Fr(L)2025
+2677 y Fe(let)8 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34
+b Fb(46)2025 2766 y Fe(local)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46
+b Fb(46)2025 2856 y Fe(logout)17 b Fc(:)d(:)g(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)44
+b Fb(46)2025 3118 y Fr(M)2025 3238 y Fe(mapfile)15 b
+Fc(:)f(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)41 b Fb(46)2025 3500 y Fr(P)2025 3620
+y Fe(popd)23 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b Fb(82)2025
+3710 y Fe(printf)17 b Fc(:)d(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)44 b Fb(47)2025
+3799 y Fe(pushd)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b
+Fb(82)2025 3888 y Fe(pwd)8 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34
+b Fb(38)2025 4150 y Fr(R)2025 4270 y Fe(read)23 b Fc(:)13
+b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)49 b Fb(47)2025 4360 y Fe(readarray)9
+b Fc(:)15 b(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)36 b Fb(49)2025 4449 y Fe(readonly)12 b Fc(:)j(:)e(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)39
+b Fb(38)2025 4538 y Fe(return)17 b Fc(:)d(:)g(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)44
+b Fb(38)2025 4782 y Fr(S)2025 4902 y Fe(set)8 b Fc(:)13
+b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34 b Fb(51)2025 4991
+y Fe(shift)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b Fb(38)2025
+5080 y Fe(shopt)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b
+Fb(55)2025 5169 y Fe(source)17 b Fc(:)d(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)44
+b Fb(49)2025 5259 y Fe(suspend)15 b Fc(:)f(:)f(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)41
+b Fb(91)p eop end
+%%Page: 152 158
+TeXDict begin 152 157 bop 150 -116 a Ft(152)2527 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fr(T)150 428 y Fe(test)23
+b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)49 b Fb(39)150 522 y
+Fe(times)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)46 b Fb(40)150
+616 y Fe(trap)23 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)49
+b Fb(40)150 709 y Fe(type)23 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)49
+b Fb(49)150 803 y Fe(typeset)15 b Fc(:)f(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)41
+b Fb(49)2025 299 y Fr(U)2025 415 y Fe(ulimit)17 b Fc(:)d(:)g(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+44 b Fb(49)2025 502 y Fe(umask)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46
+b Fb(41)2025 590 y Fe(unalias)15 b Fc(:)f(:)f(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)41
+b Fb(51)2025 677 y Fe(unset)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46
+b Fb(41)2025 910 y Fr(W)2025 1026 y Fe(wait)23 b Fc(:)13
+b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)49 b Fb(91)150 1259 y Fr(D.2)68
+b(Index)45 b(of)g(Shell)g(Reserv)l(ed)h(W)-11 b(ords)150
+1495 y(!)150 1612 y Fe(!)15 b Fc(:)e(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)42 b Fb(8)150 1855 y Fr([)150 1971 y Fe([[)10
+b Fc(:)k(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)37 b Fb(12)150
+2220 y Fr(])150 2337 y Fe(]])10 b Fc(:)k(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)37 b Fb(12)150 2579 y Fa({)150 2695 y Fe({)13 b Fc(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)39 b Fb(13)150 2938 y Fa(})150
+3054 y Fe(})13 b Fc(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)39
+b Fb(13)150 3296 y Fr(C)150 3412 y Fe(case)23 b Fc(:)13
+b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)49 b Fb(10)150 3646 y Fr(D)150
+3762 y Fe(do)12 b Fc(:)i(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39
+b Fb(9)150 3849 y Fe(done)7 b Fc(:)14 b(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34
+b Fb(9)150 4083 y Fr(E)150 4199 y Fe(elif)23 b Fc(:)13
+b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)49 b Fb(10)2025 1495 y Fe(else)23
+b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b Fb(10)2025 1586
+y Fe(esac)23 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b Fb(10)2025
+1838 y Fr(F)2025 1961 y Fe(fi)10 b Fc(:)k(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)37 b Fb(10)2025 2052 y Fe(for)8 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)34 b Fb(10)2025 2143 y Fe(function)12 b Fc(:)j(:)e(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)39
+b Fb(14)2025 2394 y Fr(I)2025 2518 y Fe(if)10 b Fc(:)k(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)37 b Fb(10)2025 2608 y Fe(in)10 b
+Fc(:)k(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)37 b Fb(10)2025
+2860 y Fr(S)2025 2983 y Fe(select)17 b Fc(:)d(:)g(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)44
+b Fb(11)2025 3235 y Fr(T)2025 3358 y Fe(then)23 b Fc(:)13
+b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)49 b Fb(10)2025 3449 y Fe(time)7
+b Fc(:)14 b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)34 b Fb(8)2025
+3701 y Fr(U)2025 3824 y Fe(until)23 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)49
+b Fb(9)2025 4076 y Fr(W)2025 4199 y Fe(while)23 b Fc(:)13
+b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)49 b Fb(9)150 4431 y Fr(D.3)68
+b(P)l(arameter)47 b(and)d(V)-11 b(ariable)46 b(Index)150
+4668 y(!)150 4794 y Fe(!)13 b Fc(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)39 b Fb(17)150 5054 y Fr(#)150 5180 y Fe(#)13 b Fc(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)39 b Fb(17)2025 4668 y Fr($)2025
+4794 y Fe($)13 b Fc(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)39
+b Fb(17)2025 5067 y Fr(*)2025 5192 y Fe(*)13 b Fc(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)39 b Fb(16)p eop end
+%%Page: 153 159
+TeXDict begin 153 158 bop 150 -116 a Ft(App)s(endix)29
+b(D:)i(Indexes)2623 b(153)150 299 y Fr(-)150 415 y Fe(-)13
+b Fc(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)39 b Fb(17)150
+649 y Fr(?)150 765 y Fe(?)13 b Fc(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)39 b Fb(17)150 999 y Fr(@)150 1115 y Fe(@)13 b
+Fc(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)39 b Fb(16)p
+159 1349 41 6 v 150 1465 a Fe(_)13 b Fc(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)39 b Fb(17)150 1699 y Fr(0)150 1815 y Fe(0)13
+b Fc(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)39 b Fb(17)150
+2049 y Fr(A)150 2166 y Fe(auto_resume)24 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fb(92)150
+2409 y Fr(B)150 2525 y Fe(BASH)23 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)49
+b Fb(61)150 2612 y Fe(BASH_ALIASES)22 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)45 b Fb(62)150 2700
+y Fe(BASH_ARGC)9 b Fc(:)16 b(:)d(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)36 b Fb(62)150 2787 y
+Fe(BASH_ARGV)9 b Fc(:)16 b(:)d(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)36 b Fb(62)150 2874 y Fe(BASH_CMDS)9
+b Fc(:)16 b(:)d(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)36 b Fb(62)150 2962 y Fe(BASH_COMMAND)22
+b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)45
+b Fb(62)150 3049 y Fe(BASH_ENV)12 b Fc(:)j(:)e(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)38 b
+Fb(62)150 3137 y Fe(BASH_EXECUTION_STRING)13 b Fc(:)18
+b(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)39 b Fb(62)150 3224 y Fe(BASH_LINENO)24
+b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+48 b Fb(63)150 3311 y Fe(BASH_REMATCH)22 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)45 b Fb(63)150
+3399 y Fe(BASH_SOURCE)24 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fb(63)150 3486 y Fe(BASH_SUBSHELL)16
+b Fc(:)g(:)e(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)43
+b Fb(63)150 3573 y Fe(BASH_VERSINFO)16 b Fc(:)g(:)e(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)43 b Fb(63)150 3661 y Fe(BASH_VERSION)22
+b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)45
+b Fb(63)150 3748 y Fe(BASH_XTRACEFD)16 b Fc(:)g(:)e(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)43 b Fb(63)150 3835 y Fe(BASHOPTS)12
+b Fc(:)j(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)38 b Fb(62)150 3923 y Fe(BASHPID)15 b
+Fc(:)f(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)41 b Fb(62)150 4010 y Fe(bell-style)7
+b Fc(:)15 b(:)e(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)33 b Fb(97)150 4098 y Fe(bind-tty-special-chars)10
+b Fc(:)19 b(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)37 b Fb(97)150 4350 y Fr(C)150
+4466 y Fe(CDPATH)17 b Fc(:)e(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)43 b Fb(61)150
+4554 y Fe(COLUMNS)15 b Fc(:)f(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)41 b Fb(64)150
+4641 y Fe(comment-begin)16 b Fc(:)g(:)e(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)43 b Fb(97)150 4728 y Fe(COMP_CWORD)7
+b Fc(:)15 b(:)e(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)33 b Fb(64)150 4816 y Fe(COMP_KEY)12 b Fc(:)j(:)e(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)38
+b Fb(64)150 4903 y Fe(COMP_LINE)9 b Fc(:)16 b(:)d(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)36 b
+Fb(64)150 4991 y Fe(COMP_POINT)7 b Fc(:)15 b(:)e(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)33 b Fb(64)150
+5078 y Fe(COMP_TYPE)9 b Fc(:)16 b(:)d(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)36 b Fb(64)150 5165
+y Fe(COMP_WORDBREAKS)11 b Fc(:)17 b(:)c(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)38 b Fb(64)150 5253 y Fe(COMP_WORDS)7 b Fc(:)15
+b(:)e(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+33 b Fb(64)150 5340 y Fe(completion-prefix-display-len)q(gth)25
+b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)45 b Fb(97)2025
+299 y Fe(completion-query-items)10 b Fc(:)18 b(:)c(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)37
+b Fb(97)2025 387 y Fe(COMPREPLY)9 b Fc(:)15 b(:)f(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)36 b
+Fb(65)2025 475 y Fe(convert-meta)21 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)45 b Fb(98)2025 713 y
+Fr(D)2025 831 y Fe(DIRSTACK)12 b Fc(:)j(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)39 b Fb(65)2025
+919 y Fe(disable-completion)25 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+47 b Fb(98)2025 1175 y Fr(E)2025 1293 y Fe(editing-mode)21
+b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)45
+b Fb(98)2025 1381 y Fe(EMACS)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46
+b Fb(65)2025 1470 y Fe(enable-keypad)16 b Fc(:)g(:)d(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)43 b Fb(98)2025 1558 y
+Fe(EUID)23 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b Fb(65)2025
+1646 y Fe(expand-tilde)21 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)45 b Fb(98)2025 1902 y Fr(F)2025
+2020 y Fe(FCEDIT)17 b Fc(:)d(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)44 b Fb(65)2025
+2108 y Fe(FIGNORE)15 b Fc(:)f(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)41 b Fb(65)2025
+2196 y Fe(FUNCNAME)12 b Fc(:)j(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)39 b Fb(65)2025 2434
+y Fr(G)2025 2552 y Fe(GLOBIGNORE)7 b Fc(:)15 b(:)e(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)33 b Fb(65)2025
+2640 y Fe(GROUPS)17 b Fc(:)d(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)44 b Fb(65)2025
+2878 y Fr(H)2025 2996 y Fe(histchars)9 b Fc(:)15 b(:)f(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)36
+b Fb(65)2025 3084 y Fe(HISTCMD)15 b Fc(:)f(:)f(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)41
+b Fb(66)2025 3172 y Fe(HISTCONTROL)24 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)48 b Fb(66)2025
+3260 y Fe(HISTFILE)12 b Fc(:)j(:)e(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)39 b Fb(66)2025 3348
+y Fe(HISTFILESIZE)21 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)45 b Fb(66)2025 3436 y Fe(HISTIGNORE)7
+b Fc(:)15 b(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)33 b Fb(66)2025 3525 y Fe(history-preserve-point)10
+b Fc(:)18 b(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)37 b Fb(98)2025 3613 y Fe(history-size)21
+b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)45
+b Fb(98)2025 3701 y Fe(HISTSIZE)12 b Fc(:)j(:)e(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)39 b
+Fb(66)2025 3789 y Fe(HISTTIMEFORMAT)14 b Fc(:)i(:)d(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)40 b Fb(66)2025 3877 y Fe(HOME)23
+b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b Fb(61)2025 3965
+y Fe(horizontal-scroll-mode)10 b Fc(:)18 b(:)c(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)37
+b Fb(98)2025 4053 y Fe(HOSTFILE)12 b Fc(:)j(:)e(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)39 b
+Fb(67)2025 4141 y Fe(HOSTNAME)12 b Fc(:)j(:)e(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)39 b
+Fb(67)2025 4230 y Fe(HOSTTYPE)12 b Fc(:)j(:)e(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)39 b
+Fb(67)2025 4467 y Fr(I)2025 4585 y Fe(IFS)8 b Fc(:)13
+b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34 b Fb(61)2025 4673
+y Fe(IGNOREEOF)9 b Fc(:)15 b(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)36 b Fb(67)2025 4761 y
+Fe(input-meta)7 b Fc(:)15 b(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)33 b Fb(99)2025 4850 y Fe(INPUTRC)15
+b Fc(:)f(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)41 b Fb(67)2025 4938 y Fe(isearch-terminators)18
+b Fc(:)f(:)c(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45 b Fb(99)2025 5175
+y Fr(K)2025 5293 y Fe(keymap)17 b Fc(:)d(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)44
+b Fb(99)p eop end
+%%Page: 154 160
+TeXDict begin 154 159 bop 150 -116 a Ft(154)2527 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fr(L)150 415 y Fe(LANG)23
+b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)49 b Fb(67)150 502 y
+Fe(LC_ALL)17 b Fc(:)e(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)43 b Fb(67)150 589
+y Fe(LC_COLLATE)7 b Fc(:)15 b(:)e(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)33 b Fb(67)150 676 y Fe(LC_CTYPE)12
+b Fc(:)j(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)38 b Fb(67)150 764 y Fe(LC_MESSAGES)13
+b Fc(:)j(:)d(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)40
+b Fb(7,)26 b(67)150 851 y Fe(LC_NUMERIC)7 b Fc(:)15 b(:)e(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)33
+b Fb(67)150 938 y Fe(LINENO)17 b Fc(:)e(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)43
+b Fb(67)150 1025 y Fe(LINES)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)46
+b Fb(67)150 1258 y Fr(M)150 1374 y Fe(MACHTYPE)12 b Fc(:)j(:)e(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)38
+b Fb(67)150 1461 y Fe(MAIL)23 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)49
+b Fb(61)150 1549 y Fe(MAILCHECK)9 b Fc(:)16 b(:)d(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)36 b
+Fb(68)150 1636 y Fe(MAILPATH)12 b Fc(:)j(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)38 b Fb(61)150
+1723 y Fe(mark-modified-lines)18 b Fc(:)g(:)13 b(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)44
+b Fb(99)150 1810 y Fe(mark-symlinked-directories)18 b
+Fc(:)g(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)44
+b Fb(99)150 1897 y Fe(match-hidden-files)25 b Fc(:)13
+b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)47 b Fb(99)150 1985 y
+Fe(meta-flag)9 b Fc(:)16 b(:)d(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)36 b Fb(99)150 2236 y Fr(O)150
+2352 y Fe(OLDPWD)17 b Fc(:)e(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)43 b Fb(68)150
+2439 y Fe(OPTARG)17 b Fc(:)e(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)43 b Fb(61)150
+2526 y Fe(OPTERR)17 b Fc(:)e(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)43 b Fb(68)150
+2614 y Fe(OPTIND)17 b Fc(:)e(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)43 b Fb(61)150
+2701 y Fe(OSTYPE)17 b Fc(:)e(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)43 b Fb(68)150
+2788 y Fe(output-meta)24 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fb(99)150 3040 y Fr(P)150
+3156 y Fe(page-completions)9 b Fc(:)16 b(:)e(:)f(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)35 b Fb(99)150 3243 y Fe(PATH)23 b Fc(:)13
+b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)49 b Fb(61)150 3330 y Fe(PIPESTATUS)7
+b Fc(:)15 b(:)e(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)33 b Fb(68)150 3417 y Fe(POSIXLY_CORRECT)11 b
+Fc(:)17 b(:)c(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)38
+b Fb(68)150 3504 y Fe(PPID)23 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)49
+b Fb(68)150 3592 y Fe(PROMPT_COMMAND)14 b Fc(:)i(:)d(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)40 b Fb(68)2025 299 y Fe(PROMPT_DIRTRIM)14
+b Fc(:)i(:)d(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)40
+b Fb(68)2025 387 y Fe(PS1)8 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34
+b Fb(61)2025 475 y Fe(PS2)8 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34
+b Fb(61)2025 563 y Fe(PS3)8 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34
+b Fb(68)2025 651 y Fe(PS4)8 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34
+b Fb(68)2025 739 y Fe(PWD)8 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34
+b Fb(68)2025 977 y Fr(R)2025 1095 y Fe(RANDOM)17 b Fc(:)d(:)g(:)f(:)g
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)44 b Fb(68)2025 1183 y Fe(REPLY)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46
+b Fb(68)2025 1271 y Fe(revert-all-at-newline)11 b Fc(:)18
+b(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)38 b Fb(100)2025 1508 y Fr(S)2025 1626
+y Fe(SECONDS)15 b Fc(:)f(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)41 b Fb(69)2025 1714
+y Fe(SHELL)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b Fb(69)2025
+1802 y Fe(SHELLOPTS)9 b Fc(:)15 b(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)36 b Fb(69)2025 1890
+y Fe(SHLVL)21 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46 b Fb(69)2025
+1978 y Fe(show-all-if-ambiguous)11 b Fc(:)18 b(:)13 b(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)38
+b Fb(100)2025 2067 y Fe(show-all-if-unmodified)8 b Fc(:)18
+b(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)35 b Fb(100)2025 2155 y Fe(skip-completed-text)16
+b Fc(:)h(:)c(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)43 b Fb(100)2025 2411 y Fr(T)2025
+2529 y Fe(TEXTDOMAIN)9 b Fc(:)15 b(:)e(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)36 b Fb(7)2025 2617
+y Fe(TEXTDOMAINDIR)21 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)46 b Fb(7)2025 2705 y Fe(TIMEFORMAT)7
+b Fc(:)15 b(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)33 b Fb(69)2025 2793 y Fe(TMOUT)21 b Fc(:)13
+b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)46 b Fb(69)2025 2881 y Fe(TMPDIR)17
+b Fc(:)d(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)44 b Fb(70)2025 3119 y Fr(U)2025
+3236 y Fe(UID)8 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34
+b Fb(70)2025 3474 y Fr(V)2025 3592 y Fe(visible-stats)14
+b Fc(:)i(:)d(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)41
+b Fb(100)150 3831 y Fr(D.4)68 b(F)-11 b(unction)44 b(Index)150
+4068 y(A)150 4195 y Fe(abort)27 b(\(C-g\))9 b Fc(:)14
+b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)36
+b Fb(112)150 4287 y Fe(accept-line)28 b(\(Newline)g(or)e(Return\))e
+Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)50 b
+Fb(107)150 4380 y Fe(alias-expand-line)29 b(\(\))21 b
+Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)47 b Fb(114)150 4659 y Fr(B)150
+4785 y Fe(backward-char)29 b(\(C-b\))23 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)
+49 b Fb(106)150 4878 y Fe(backward-delete-char)30 b(\(Rubout\))14
+b Fc(:)h(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)41
+b Fb(108)150 4970 y Fe(backward-kill-line)30 b(\(C-x)c(Rubout\))16
+b Fc(:)f(:)e(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)43 b Fb(109)150
+5063 y Fe(backward-kill-word)30 b(\(\))18 b Fc(:)13 b(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)44
+b Fb(109)150 5155 y Fe(backward-kill-word)30 b(\(M-DEL\))23
+b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+49 b Fb(109)150 5248 y Fe(backward-word)29 b(\(M-b\))23
+b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)49 b Fb(106)150 5340 y
+Fe(beginning-of-history)30 b(\(M-<\))23 b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b Fb(107)2025
+4068 y Fe(beginning-of-line)29 b(\(C-a\))13 b Fc(:)h(:)f(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)40
+b Fb(106)2025 4329 y Fr(C)2025 4449 y Fe(call-last-kbd-macro)30
+b(\(C-x)c(e\))9 b Fc(:)14 b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)36 b Fb(112)2025 4538 y Fe(capitalize-word)29
+b(\(M-c\))18 b Fc(:)c(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45 b Fb(109)2025 4627
+y Fe(character-search)29 b(\(C-]\))15 b Fc(:)f(:)g(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)42
+b Fb(113)2025 4716 y Fe(character-search-backward)31
+b(\(M-C-]\))23 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)48
+b Fb(113)2025 4806 y Fe(clear-screen)28 b(\(C-l\))8 b
+Fc(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)35 b Fb(106)2025
+4895 y Fe(complete)27 b(\(TAB\))20 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)45 b Fb(110)2025 4984 y Fe(complete-command)29
+b(\(M-!\))15 b Fc(:)f(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)42 b Fb(111)2025 5073
+y Fe(complete-filename)29 b(\(M-/\))13 b Fc(:)h(:)f(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)40
+b Fb(111)2025 5162 y Fe(complete-hostname)29 b(\(M-@\))13
+b Fc(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)40 b Fb(111)2025 5251 y Fe(complete-into-braces)30
+b(\(M-{\))23 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)49 b Fb(112)2025 5340 y Fe(complete-username)29
+b(\(M-~\))13 b Fc(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)40 b Fb(111)p eop end
+%%Page: 155 161
+TeXDict begin 155 160 bop 150 -116 a Ft(App)s(endix)29
+b(D:)i(Indexes)2623 b(155)150 299 y Fe(complete-variable)29
+b(\(M-$\))13 b Fc(:)h(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)39 b Fb(111)150 389 y Fe(copy-backward-word)
+30 b(\(\))18 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)44 b Fb(110)150 479
+y Fe(copy-forward-word)29 b(\(\))21 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)47
+b Fb(110)150 569 y Fe(copy-region-as-kill)30 b(\(\))15
+b Fc(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)42 b Fb(110)150 836 y Fr(D)150 958 y
+Fe(dabbrev-expand)29 b(\(\))11 b Fc(:)i(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+38 b Fb(112)150 1048 y Fe(delete-char)28 b(\(C-d\))11
+b Fc(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)38 b Fb(108)150
+1138 y Fe(delete-char-or-list)30 b(\(\))15 b Fc(:)f(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)42
+b Fb(111)150 1228 y Fe(delete-horizontal-space)31 b(\(\))22
+b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+49 b Fb(109)150 1318 y Fe(digit-argument)29 b(\()p Fd(M-0)p
+Fe(,)e Fd(M-1)p Fe(,)f(...)g Fd(M--)p Fe(\))d Fc(:)13
+b(:)h(:)f(:)g(:)g(:)g(:)g(:)49 b Fb(110)150 1408 y Fe
+(display-shell-version)30 b(\(C-x)d(C-v\))16 b Fc(:)e(:)f(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)43 b Fb(114)150 1499 y Fe(do-uppercase-version)
+30 b(\(M-a,)d(M-b,)f(M-)p Fd(x)9 b Fe(,)27 b(...\))325
+1586 y Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)48 b Fb(112)150 1676
+y Fe(downcase-word)29 b(\(M-l\))23 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)49
+b Fb(108)150 1766 y Fe(dump-functions)29 b(\(\))11 b
+Fc(:)i(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)38 b Fb(113)150
+1856 y Fe(dump-macros)28 b(\(\))19 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)45 b Fb(113)150 1946 y Fe(dump-variables)29
+b(\(\))11 b Fc(:)i(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)38
+b Fb(113)150 2036 y Fe(dynamic-complete-history)31 b(\(M-TAB\))7
+b Fc(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)33 b Fb(112)150
+2303 y Fr(E)150 2425 y Fe(edit-and-execute-command)e(\(C-xC-e\))23
+b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)48 b Fb(114)150
+2515 y Fe(end-kbd-macro)29 b(\(C-x)d(\)\))7 b Fc(:)14
+b(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)34 b Fb(112)150 2605 y Fe(end-of-history)29
+b(\(M->\))21 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)47 b Fb(107)150
+2695 y Fe(end-of-line)28 b(\(C-e\))11 b Fc(:)j(:)f(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)38 b Fb(106)150 2785 y Fe(exchange-point-and-mark)31
+b(\(C-x)26 b(C-x\))11 b Fc(:)j(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)38
+b Fb(113)150 3052 y Fr(F)150 3174 y Fe(forward-backward-delete-char)32
+b(\(\))9 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)36
+b Fb(108)150 3264 y Fe(forward-char)28 b(\(C-f\))8 b
+Fc(:)15 b(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35 b Fb(106)150
+3354 y Fe(forward-search-history)c(\(C-s\))17 b Fc(:)d(:)f(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)44 b Fb(107)150 3445
+y Fe(forward-word)28 b(\(M-f\))8 b Fc(:)15 b(:)e(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)35 b Fb(106)150 3701 y Fr(G)150 3823 y Fe(glob-complete-word)30
+b(\(M-g\))10 b Fc(:)k(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)37 b Fb(114)150 3913 y Fe(glob-expand-word)29
+b(\(C-x)e(*\))17 b Fc(:)c(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)44 b Fb(114)150 4003 y Fe
+(glob-list-expansions)30 b(\(C-x)d(g\))7 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)33 b Fb(114)150 4270
+y Fr(H)150 4392 y Fe(history-and-alias-expand-line)f(\(\))7
+b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)33 b Fb(114)150
+4482 y Fe(history-expand-line)d(\(M-^\))8 b Fc(:)14 b(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)34
+b Fb(114)150 4572 y Fe(history-search-backward)d(\(\))22
+b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+49 b Fb(107)150 4662 y Fe(history-search-forward)31 b(\(\))8
+b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)34 b Fb(107)150 4929 y Fr(I)150 5051 y Fe(insert-comment)29
+b(\(M-#\))21 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)47 b Fb(113)150
+5141 y Fe(insert-completions)30 b(\(M-*\))10 b Fc(:)k(:)f(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)37
+b Fb(111)150 5231 y Fe(insert-last-argument)30 b(\(M-.)d(or)f(M-_\))18
+b Fc(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)45 b Fb(114)2025
+299 y Fr(K)2025 416 y Fe(kill-line)27 b(\(C-k\))16 b
+Fc(:)f(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)43 b Fb(109)2025
+503 y Fe(kill-region)28 b(\(\))19 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)45 b Fb(110)2025 591 y Fe(kill-whole-line)29
+b(\(\))8 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)35 b
+Fb(109)2025 678 y Fe(kill-word)27 b(\(M-d\))16 b Fc(:)f(:)e(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)43 b Fb(109)2025 921 y Fr(M)2025
+1038 y Fe(magic-space)28 b(\(\))19 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)45 b Fb(114)2025 1126 y Fe(menu-complete)28
+b(\(\))13 b Fc(:)h(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)40
+b Fb(111)2025 1213 y Fe(menu-complete-backward)30 b(\(\))8
+b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)34 b Fb(111)2025 1467 y Fr(N)2025 1584 y Fe(next-history)28
+b(\(C-n\))8 b Fc(:)15 b(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)35
+b Fb(107)2025 1671 y Fe(non-incremental-forward-search)q(-hist)q(ory)d
+(\(M-n\))2200 1758 y Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b
+Fb(107)2025 1846 y Fe(non-incremental-reverse-search)q(-hist)q(ory)32
+b(\(M-p\))2200 1933 y Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49 b
+Fb(107)2025 2168 y Fr(O)2025 2285 y Fe(operate-and-get-next)30
+b(\(C-o\))23 b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)49 b Fb(114)2025 2372 y Fe(overwrite-mode)29
+b(\(\))11 b Fc(:)i(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)38
+b Fb(109)2025 2615 y Fr(P)2025 2732 y Fe(possible-command-completions)
+32 b(\(C-x)26 b(!\))21 b Fc(:)13 b(:)g(:)h(:)f(:)47 b
+Fb(112)2025 2820 y Fe(possible-completions)30 b(\(M-?\))23
+b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+49 b Fb(110)2025 2907 y Fe(possible-filename-completions)32
+b(\(C-x)26 b(/\))18 b Fc(:)c(:)f(:)g(:)45 b Fb(111)2025
+2995 y Fe(possible-hostname-completions)32 b(\(C-x)26
+b(@\))18 b Fc(:)c(:)f(:)g(:)45 b Fb(111)2025 3082 y Fe
+(possible-username-completions)32 b(\(C-x)26 b(~\))18
+b Fc(:)c(:)f(:)g(:)45 b Fb(111)2025 3170 y Fe
+(possible-variable-completions)32 b(\(C-x)26 b($\))18
+b Fc(:)c(:)f(:)g(:)45 b Fb(111)2025 3258 y Fe(prefix-meta)28
+b(\(ESC\))11 b Fc(:)j(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)38
+b Fb(112)2025 3345 y Fe(previous-history)29 b(\(C-p\))15
+b Fc(:)f(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)42 b Fb(107)2025 3599 y Fr(Q)2025 3715
+y Fe(quoted-insert)28 b(\(C-q)f(or)f(C-v\))19 b Fc(:)14
+b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)46
+b Fb(108)2025 3969 y Fr(R)2025 4086 y Fe(re-read-init-file)29
+b(\(C-x)e(C-r\))9 b Fc(:)14 b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)36 b Fb(112)2025 4173 y Fe(redraw-current-line)30
+b(\(\))15 b Fc(:)e(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)42 b Fb(106)2025 4261 y Fe
+(reverse-search-history)30 b(\(C-r\))17 b Fc(:)e(:)e(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)44 b Fb(107)2025 4348 y Fe(revert-line)28
+b(\(M-r\))11 b Fc(:)j(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)38
+b Fb(112)2025 4592 y Fr(S)2025 4708 y Fe(self-insert)28
+b(\(a,)e(b,)g(A,)g(1,)g(!,)g(...)q(\))7 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)34 b Fb(108)2025 4796 y Fe(set-mark)27
+b(\(C-@\))20 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)45
+b Fb(113)2025 4883 y Fe(shell-backward-word)30 b(\(\))15
+b Fc(:)e(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)42 b Fb(106)2025 4971 y Fe(shell-expand-line)29
+b(\(M-C-e\))8 b Fc(:)14 b(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)34 b Fb(114)2025 5059 y Fe(shell-forward-word)29
+b(\(\))18 b Fc(:)c(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)45 b Fb(106)2025 5146
+y Fe(shell-kill-word)29 b(\(\))8 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)35 b Fb(109)2025 5234 y Fe(skip-csi-sequence)29 b(\(\))21
+b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)47 b Fb(113)2025 5321 y Fe(start-kbd-macro)
+29 b(\(C-x)d(\(\))20 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)46 b Fb(112)p eop
+end
+%%Page: 156 162
+TeXDict begin 156 161 bop 150 -116 a Ft(156)2527 b(Bash)31
+b(Reference)g(Man)m(ual)150 299 y Fr(T)150 415 y Fe(tilde-expand)d
+(\(M-&\))8 b Fc(:)15 b(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35
+b Fb(113)150 502 y Fe(transpose-chars)29 b(\(C-t\))18
+b Fc(:)c(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)44 b Fb(108)150 590 y Fe(transpose-words)29
+b(\(M-t\))18 b Fc(:)c(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)44 b Fb(108)150 842
+y Fr(U)150 958 y Fe(undo)27 b(\(C-_)f(or)g(C-x)g(C-u\))c
+Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fb(112)150 1046 y Fe
+(universal-argument)30 b(\(\))18 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)44
+b Fb(110)150 1133 y Fe(unix-filename-rubout)30 b(\(\))13
+b Fc(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)39 b Fb(109)2025 299 y Fe(unix-line-discard)29
+b(\(C-u\))13 b Fc(:)h(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)40 b Fb(109)2025 389 y Fe(unix-word-rubout)
+29 b(\(C-w\))15 b Fc(:)f(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)42 b Fb(109)2025 478
+y Fe(upcase-word)28 b(\(M-u\))11 b Fc(:)j(:)f(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)38 b Fb(108)2025 743 y Fr(Y)2025 864 y Fe(yank)26
+b(\(C-y\))12 b Fc(:)i(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)39 b Fb(110)2025 954 y Fe(yank-last-arg)28
+b(\(M-.)f(or)f(M-_\))19 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)46 b Fb(108)2025 1043 y Fe(yank-nth-arg)28
+b(\(M-C-y\))22 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)47 b Fb(107)2025
+1133 y Fe(yank-pop)27 b(\(M-y\))20 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)45 b Fb(110)150 1366 y Fr(D.5)68
+b(Concept)45 b(Index)150 1625 y(A)150 1743 y Fb(alias)27
+b(expansion)18 b Fc(:)c(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)44 b Fb(79)150 1831 y(arithmetic)26 b(ev)l(aluation)16
+b Fc(:)e(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)43 b Fb(78)150 1919
+y(arithmetic)26 b(expansion)d Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)49
+b Fb(23)150 2007 y(arithmetic,)27 b(shell)17 b Fc(:)d(:)f(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)43 b Fb(78)150 2095 y(arra)n(ys)15
+b Fc(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)41 b Fb(80)150 2348 y Fr(B)150
+2466 y Fb(bac)n(kground)9 b Fc(:)j(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)35 b Fb(89)150 2554 y(Bash)26
+b(con\014guration)d Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49
+b Fb(127)150 2642 y(Bash)26 b(installation)c Fc(:)13
+b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)46 b Fb(127)150
+2729 y(Bourne)26 b(shell)13 b Fc(:)h(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)40 b Fb(5)150 2817
+y(brace)26 b(expansion)20 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)47 b Fb(18)150 2905 y(builtin)9 b Fc(:)k(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)36 b Fb(3)150 3142 y Fr(C)150 3260 y Fb(command)26
+b(editing)15 b Fc(:)f(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)42
+b Fb(94)150 3348 y(command)26 b(execution)d Fc(:)13 b(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)49 b Fb(30)150 3435 y(command)26 b(expansion)16
+b Fc(:)d(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)42 b Fb(29)150
+3523 y(command)26 b(history)12 b Fc(:)h(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)39 b Fb(121)150 3611 y(command)26 b(searc)n(h)10
+b Fc(:)j(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)36
+b Fb(30)150 3699 y(command)26 b(substitution)15 b Fc(:)e(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)41 b Fb(22)150 3787 y(command)26 b(timing)7
+b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)34
+b Fb(8)150 3875 y(commands,)26 b(comp)r(ound)18 b Fc(:)c(:)f(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)45 b Fb(9)150 3963 y(commands,)26 b(conditional)d
+Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fb(10)150 4051 y(commands,)26
+b(grouping)9 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)35
+b Fb(13)150 4139 y(commands,)26 b(lists)6 b Fc(:)15 b(:)e(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)33 b Fb(8)150
+4227 y(commands,)26 b(lo)r(oping)18 b Fc(:)d(:)e(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)45 b Fb(9)150 4315 y(commands,)26 b(pip)r(elines)12
+b Fc(:)i(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)39 b Fb(8)150
+4403 y(commands,)26 b(shell)15 b Fc(:)f(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)42 b Fb(7)150 4491 y(commands,)26
+b(simple)17 b Fc(:)d(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)44
+b Fb(8)150 4579 y(commen)n(ts,)26 b(shell)7 b Fc(:)15
+b(:)e(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)34
+b Fb(7)150 4667 y(completion)27 b(builtins)15 b Fc(:)e(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)42 b Fb(117)150 4755 y(con\014guration)15
+b Fc(:)f(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)42
+b Fb(127)150 4842 y(con)n(trol)26 b(op)r(erator)21 b
+Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)46
+b Fb(3)150 4930 y(copro)r(cess)12 b Fc(:)i(:)g(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)38 b
+Fb(14)150 5184 y Fr(D)150 5301 y Fb(directory)26 b(stac)n(k)c
+Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)49
+b Fb(81)2025 1625 y Fr(E)2025 1745 y Fb(editing)26 b(command)g(lines)13
+b Fc(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)39 b Fb(94)2025 1834
+y(en)n(vironmen)n(t)12 b Fc(:)g(:)h(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)39 b Fb(31)2025 1923 y(ev)l(aluation,)26
+b(arithmetic)e Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)49 b
+Fb(78)2025 2012 y(ev)n(en)n(t)24 b(designators)14 b Fc(:)h(:)e(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)41 b Fb(123)2025 2101 y(execution)25
+b(en)n(vironmen)n(t)11 b Fc(:)i(:)g(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)37
+b Fb(30)2025 2190 y(exit)25 b(status)18 b Fc(:)c(:)f(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)45 b Fb(3,)26
+b(32)2025 2279 y(expansion)20 b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)47 b Fb(17)2025
+2368 y(expansion,)26 b(arithmetic)12 b Fc(:)i(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)38 b Fb(23)2025 2457 y(expansion,)26 b(brace)10 b
+Fc(:)j(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)36
+b Fb(18)2025 2546 y(expansion,)26 b(\014lename)12 b Fc(:)h(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)38 b Fb(24)2025 2635 y(expansion,)26
+b(parameter)14 b Fc(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)40
+b Fb(19)2025 2724 y(expansion,)26 b(pathname)18 b Fc(:)13
+b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)45 b Fb(24)2025 2813 y(expansion,)26
+b(tilde)8 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)34 b Fb(19)2025 2902 y(expressions,)27 b(arithmetic)7
+b Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)34 b Fb(78)2025 2991
+y(expressions,)27 b(conditional)11 b Fc(:)j(:)f(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)38
+b Fb(76)2025 3250 y Fr(F)2025 3369 y Fb(\014eld)15 b
+Fc(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)42 b Fb(3)2025 3458
+y(\014lename)15 b Fc(:)f(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)42 b Fb(3)2025
+3547 y(\014lename)26 b(expansion)c Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)49 b Fb(24)2025 3636 y(foreground)23 b Fc(:)13
+b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+49 b Fb(89)2025 3725 y(functions,)26 b(shell)21 b Fc(:)13
+b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)47
+b Fb(14)2025 3984 y Fr(H)2025 4104 y Fb(history)25 b(builtins)14
+b Fc(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)41
+b Fb(121)2025 4193 y(history)25 b(ev)n(en)n(ts)19 b Fc(:)13
+b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)46
+b Fb(123)2025 4282 y(history)25 b(expansion)8 b Fc(:)14
+b(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)35 b Fb(123)2025
+4371 y(history)25 b(list)c Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)47 b Fb(121)2025 4460
+y(History)-6 b(,)25 b(ho)n(w)h(to)g(use)13 b Fc(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)40 b Fb(120)2025 4719 y Fr(I)2025 4838 y
+Fb(iden)n(ti\014er)22 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)50 b Fb(3)2025
+4927 y(initialization)28 b(\014le,)e(readline)13 b Fc(:)h(:)f(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+40 b Fb(96)2025 5016 y(installation)13 b Fc(:)i(:)e(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)40 b Fb(127)2025
+5105 y(in)n(teraction,)26 b(readline)c Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)47 b Fb(93)2025 5194 y(in)n(teractiv)n(e)26
+b(shell)14 b Fc(:)f(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)40
+b Fb(73,)27 b(75)2025 5283 y(in)n(ternationalization)14
+b Fc(:)h(:)e(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)41 b
+Fb(7)p eop end
+%%Page: 157 163
+TeXDict begin 157 162 bop 150 -116 a Ft(App)s(endix)29
+b(D:)i(Indexes)2623 b(157)150 299 y Fr(J)150 415 y Fb(job)16
+b Fc(:)e(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)43 b Fb(3)150
+503 y(job)26 b(con)n(trol)13 b Fc(:)h(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)40 b Fb(3,)26 b(89)150 753
+y Fr(K)150 870 y Fb(kill)g(ring)21 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)47
+b Fb(95)150 957 y(killing)27 b(text)19 b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)46 b
+Fb(95)150 1208 y Fr(L)150 1324 y Fb(lo)r(calization)14
+b Fc(:)i(:)d(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)41 b Fb(7)150 1412 y(login)27 b(shell)17 b
+Fc(:)d(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)g(:)44 b Fb(73)150 1662 y Fr(M)150 1779 y Fb(matc)n(hing,)26
+b(pattern)20 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)47
+b Fb(24)150 1866 y(metac)n(haracter)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)45 b Fb(3)150 2100
+y Fr(N)150 2217 y Fb(name)13 b Fc(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)40
+b Fb(3)150 2304 y(nativ)n(e)25 b(languages)13 b Fc(:)i(:)e(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)40 b Fb(7)150 2391
+y(notation,)27 b(readline)9 b Fc(:)k(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)35 b Fb(94)150 2642 y Fr(O)150 2759 y Fb(op)r(erator,)27
+b(shell)16 b Fc(:)e(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)43 b Fb(3)150 3009 y Fr(P)150 3126 y Fb(parameter)26
+b(expansion)7 b Fc(:)14 b(:)f(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)34
+b Fb(19)150 3213 y(parameters)17 b Fc(:)d(:)f(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)43 b Fb(15)150
+3300 y(parameters,)27 b(p)r(ositional)18 b Fc(:)d(:)e(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)44 b Fb(16)150 3388 y(parameters,)27 b(sp)r(ecial)18
+b Fc(:)c(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)44 b Fb(16)150
+3475 y(pathname)25 b(expansion)12 b Fc(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)38 b Fb(24)150 3563 y(pattern)25 b(matc)n(hing)14
+b Fc(:)g(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)40
+b Fb(24)150 3650 y(pip)r(eline)23 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)50
+b Fb(8)150 3737 y(POSIX)17 b Fc(:)12 b(:)h(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)44
+b Fb(3)150 3825 y(POSIX)25 b(Mo)r(de)11 b Fc(:)i(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)37 b Fb(84)150
+3912 y(pro)r(cess)27 b(group)9 b Fc(:)k(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)36 b Fb(3)150 4000 y(pro)r(cess)27
+b(group)e(ID)d Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)49 b Fb(3)150 4087 y(pro)r(cess)27 b(substitution)21
+b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)48 b Fb(23)150
+4175 y(programmable)27 b(completion)20 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)46
+b Fb(115)150 4262 y(prompting)11 b Fc(:)i(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)37 b Fb(82)2025
+299 y Fr(Q)2025 419 y Fb(quoting)10 b Fc(:)j(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)37
+b Fb(6)2025 508 y(quoting,)26 b(ANSI)13 b Fc(:)e(:)j(:)f(:)g(:)g(:)g(:)
+g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)40 b Fb(6)2025
+768 y Fr(R)2025 888 y Fb(Readline,)26 b(ho)n(w)g(to)g(use)7
+b Fc(:)13 b(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)34 b Fb(92)2025
+977 y(redirection)7 b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)33 b Fb(26)2025 1066
+y(reserv)n(ed)25 b(w)n(ord)7 b Fc(:)14 b(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)34 b Fb(3)2025 1155
+y(restricted)26 b(shell)8 b Fc(:)14 b(:)f(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)35 b Fb(84)2025 1244 y(return)25
+b(status)c Fc(:)13 b(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)48 b Fb(4)2025 1487 y Fr(S)2025 1607 y
+Fb(shell)26 b(arithmetic)11 b Fc(:)j(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)37 b Fb(78)2025 1696 y(shell)26 b(function)12
+b Fc(:)h(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)38
+b Fb(14)2025 1785 y(shell)26 b(script)c Fc(:)13 b(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b
+Fb(33)2025 1874 y(shell)26 b(v)l(ariable)18 b Fc(:)c(:)f(:)g(:)g(:)h(:)
+f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)45 b Fb(15)2025
+1964 y(shell,)26 b(in)n(teractiv)n(e)14 b Fc(:)g(:)f(:)g(:)g(:)g(:)g(:)
+h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)h(:)40 b Fb(75)2025 2053 y(signal)7
+b Fc(:)14 b(:)f(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)34 b Fb(4)2025 2142
+y(signal)27 b(handling)17 b Fc(:)c(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g
+(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)
+g(:)g(:)g(:)g(:)44 b Fb(32)2025 2231 y(sp)r(ecial)27
+b(builtin)10 b Fc(:)j(:)g(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+37 b Fb(4,)26 b(59)2025 2320 y(startup)f(\014les)d Fc(:)13
+b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)48
+b Fb(73)2025 2409 y(susp)r(ending)25 b(jobs)6 b Fc(:)14
+b(:)g(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h
+(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)33
+b Fb(89)2025 2669 y Fr(T)2025 2789 y Fb(tilde)26 b(expansion)18
+b Fc(:)13 b(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)45
+b Fb(19)2025 2878 y(tok)n(en)11 b Fc(:)h(:)i(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)38
+b Fb(4)2025 2967 y(translation,)27 b(nativ)n(e)e(languages)13
+b Fc(:)i(:)e(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)
+g(:)g(:)g(:)40 b Fb(7)2025 3227 y Fr(V)2025 3347 y Fb(v)l(ariable,)26
+b(shell)8 b Fc(:)14 b(:)f(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g
+(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)
+f(:)g(:)g(:)34 b Fb(15)2025 3436 y(v)l(ariables,)27 b(readline)21
+b Fc(:)13 b(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f
+(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)47
+b Fb(97)2025 3695 y Fr(W)2025 3815 y Fb(w)n(ord)21 b
+Fc(:)13 b(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g
+(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)
+g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)48 b Fb(4)2025 3904
+y(w)n(ord)26 b(splitting)21 b Fc(:)13 b(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)47 b Fb(23)2025 4164 y Fr(Y)2025
+4284 y Fb(y)n(anking)25 b(text)9 b Fc(:)j(:)h(:)g(:)h(:)f(:)g(:)g(:)g
+(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)
+g(:)h(:)f(:)g(:)g(:)g(:)g(:)g(:)h(:)35 b Fb(95)p eop
+end
+%%Page: 158 164
+TeXDict begin 158 163 bop eop end
+%%Trailer
+
+userdict /end-hook known{end-hook}if
+%%EOF
diff --git a/doc/bashref.texi b/doc/bashref.texi
new file mode 100644
index 0000000..bf8e3d0
--- /dev/null
+++ b/doc/bashref.texi
@@ -0,0 +1,7931 @@
+\input texinfo.tex @c -*- texinfo -*-
+@c %**start of header
+@setfilename bashref.info
+@settitle Bash Reference Manual
+@c %**end of header
+
+@setchapternewpage odd
+
+@include version.texi
+
+@copying
+This text is a brief description of the features that are present in
+the Bash shell (version @value{VERSION}, @value{UPDATED}).
+
+This is Edition @value{EDITION}, last updated @value{UPDATED},
+of @cite{The GNU Bash Reference Manual},
+for @code{Bash}, Version @value{VERSION}.
+
+Copyright @copyright{} 1988--2009 Free Software Foundation, Inc.
+
+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.
+
+@quotation
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
+and with the Back-Cover Texts as in (a) below. A copy of the license is
+included in the section entitled ``GNU Free Documentation License''.
+
+(a) The FSF's Back-Cover Text is: You are free to copy and modify
+this GNU manual. Buying copies from GNU Press supports the FSF in
+developing GNU and promoting software freedom.''
+
+@end quotation
+@end copying
+
+@defcodeindex bt
+@defcodeindex rw
+@set BashFeatures
+
+@dircategory Basics
+@direntry
+* Bash: (bash). The GNU Bourne-Again SHell.
+@end direntry
+
+@finalout
+
+@titlepage
+@title Bash Reference Manual
+@subtitle Reference Documentation for Bash
+@subtitle Edition @value{EDITION}, for @code{Bash} Version @value{VERSION}.
+@subtitle @value{UPDATED-MONTH}
+@author Chet Ramey, Case Western Reserve University
+@author Brian Fox, Free Software Foundation
+
+@page
+@vskip 0pt plus 1filll
+@insertcopying
+
+@sp 1
+Published by the Free Software Foundation @*
+59 Temple Place, Suite 330, @*
+Boston, MA 02111-1307 @*
+USA @*
+
+@end titlepage
+
+@contents
+
+@ifnottex
+@node Top, Introduction, (dir), (dir)
+@top Bash Features
+
+This text is a brief description of the features that are present in
+the Bash shell (version @value{VERSION}, @value{UPDATED}).
+
+This is Edition @value{EDITION}, last updated @value{UPDATED},
+of @cite{The GNU Bash Reference Manual},
+for @code{Bash}, Version @value{VERSION}.
+
+Bash contains features that appear in other popular shells, and some
+features that only appear in Bash. Some of the shells that Bash has
+borrowed concepts from are the Bourne Shell (@file{sh}), the Korn Shell
+(@file{ksh}), and the C-shell (@file{csh} and its successor,
+@file{tcsh}). The following menu breaks the features up into
+categories based upon which one of these other shells inspired the
+feature.
+
+This manual is meant as a brief introduction to features found in
+Bash. The Bash manual page should be used as the definitive
+reference on shell behavior.
+
+@menu
+* Introduction:: An introduction to the shell.
+* Definitions:: Some definitions used in the rest of this
+ manual.
+* Basic Shell Features:: The shell "building blocks".
+* Shell Builtin Commands:: Commands that are a part of the shell.
+* Shell Variables:: Variables used or set by Bash.
+* Bash Features:: Features found only in Bash.
+* Job Control:: What job control is and how Bash allows you
+ to use it.
+* Command Line Editing:: Chapter describing the command line
+ editing features.
+* Using History Interactively:: Command History Expansion
+* Installing Bash:: How to build and install Bash on your system.
+* Reporting Bugs:: How to report bugs in Bash.
+* Major Differences From The Bourne Shell:: A terse list of the differences
+ between Bash and historical
+ versions of /bin/sh.
+* GNU Free Documentation License:: Copying and sharing this documentation.
+* Indexes:: Various indexes for this manual.
+@end menu
+@end ifnottex
+
+@node Introduction
+@chapter Introduction
+@menu
+* What is Bash?:: A short description of Bash.
+* What is a shell?:: A brief introduction to shells.
+@end menu
+
+@node What is Bash?
+@section What is Bash?
+
+Bash is the shell, or command language interpreter,
+for the @sc{gnu} operating system.
+The name is an acronym for the @samp{Bourne-Again SHell},
+a pun on Stephen Bourne, the author of the direct ancestor of
+the current Unix shell @code{sh},
+which appeared in the Seventh Edition Bell Labs Research version
+of Unix.
+
+Bash is largely compatible with @code{sh} and incorporates useful
+features from the Korn shell @code{ksh} and the C shell @code{csh}.
+It is intended to be a conformant implementation of the @sc{ieee}
+@sc{posix} Shell and Tools portion of the @sc{ieee} @sc{posix}
+specification (@sc{ieee} Standard 1003.1).
+It offers functional improvements over @code{sh} for both interactive and
+programming use.
+
+While the @sc{gnu} operating system provides other shells, including
+a version of @code{csh}, Bash is the default shell.
+Like other @sc{gnu} software, Bash is quite portable. It currently runs
+on nearly every version of Unix and a few other operating systems @minus{}
+independently-supported ports exist for @sc{ms-dos}, @sc{os/2},
+and Windows platforms.
+
+@node What is a shell?
+@section What is a shell?
+
+At its base, a shell is simply a macro processor that executes
+commands. The term macro processor means functionality where text
+and symbols are expanded to create larger expressions.
+
+A Unix shell is both a command interpreter and a programming
+language. As a command interpreter, the shell provides the user
+interface to the rich set of @sc{gnu} utilities. The programming
+language features allow these utilities to be combined.
+Files containing commands can be created, and become
+commands themselves. These new commands have the same status as
+system commands in directories such as @file{/bin}, allowing users
+or groups to establish custom environments to automate their common
+tasks.
+
+Shells may be used interactively or non-interactively. In
+interactive mode, they accept input typed from the keyboard.
+When executing non-interactively, shells execute commands read
+from a file.
+
+A shell allows execution of @sc{gnu} commands, both synchronously and
+asynchronously.
+The shell waits for synchronous commands to complete before accepting
+more input; asynchronous commands continue to execute in parallel
+with the shell while it reads and executes additional commands.
+The @dfn{redirection} constructs permit
+fine-grained control of the input and output of those commands.
+Moreover, the shell allows control over the contents of commands'
+environments.
+
+Shells also provide a small set of built-in
+commands (@dfn{builtins}) implementing functionality impossible
+or inconvenient to obtain via separate utilities.
+For example, @code{cd}, @code{break}, @code{continue}, and
+@code{exec}) cannot be implemented outside of the shell because
+they directly manipulate the shell itself.
+The @code{history}, @code{getopts}, @code{kill}, or @code{pwd}
+builtins, among others, could be implemented in separate utilities,
+but they are more convenient to use as builtin commands.
+All of the shell builtins are described in
+subsequent sections.
+
+While executing commands is essential, most of the power (and
+complexity) of shells is due to their embedded programming
+languages. Like any high-level language, the shell provides
+variables, flow control constructs, quoting, and functions.
+
+Shells offer features geared specifically for
+interactive use rather than to augment the programming language.
+These interactive features include job control, command line
+editing, command history and aliases. Each of these features is
+described in this manual.
+
+@node Definitions
+@chapter Definitions
+These definitions are used throughout the remainder of this manual.
+
+@table @code
+
+@item POSIX
+@cindex POSIX
+A family of open system standards based on Unix. Bash
+is primarily concerned with the Shell and Utilities portion of the
+@sc{posix} 1003.1 standard.
+
+@item blank
+A space or tab character.
+
+@item builtin
+@cindex builtin
+A command that is implemented internally by the shell itself, rather
+than by an executable program somewhere in the file system.
+
+@item control operator
+@cindex control operator
+A @code{token} that performs a control function. It is a @code{newline}
+or one of the following:
+@samp{||}, @samp{&&}, @samp{&}, @samp{;}, @samp{;;},
+@samp{|}, @samp{|&}, @samp{(}, or @samp{)}.
+
+@item exit status
+@cindex exit status
+The value returned by a command to its caller. The value is restricted
+to eight bits, so the maximum value is 255.
+
+@item field
+@cindex field
+A unit of text that is the result of one of the shell expansions. After
+expansion, when executing a command, the resulting fields are used as
+the command name and arguments.
+
+@item filename
+@cindex filename
+A string of characters used to identify a file.
+
+@item job
+@cindex job
+A set of processes comprising a pipeline, and any processes descended
+from it, that are all in the same process group.
+
+@item job control
+@cindex job control
+A mechanism by which users can selectively stop (suspend) and restart
+(resume) execution of processes.
+
+@item metacharacter
+@cindex metacharacter
+A character that, when unquoted, separates words. A metacharacter is
+a @code{blank} or one of the following characters:
+@samp{|}, @samp{&}, @samp{;}, @samp{(}, @samp{)}, @samp{<}, or
+@samp{>}.
+
+@item name
+@cindex name
+@cindex identifier
+A @code{word} consisting solely of letters, numbers, and underscores,
+and beginning with a letter or underscore. @code{Name}s are used as
+shell variable and function names.
+Also referred to as an @code{identifier}.
+
+@item operator
+@cindex operator, shell
+A @code{control operator} or a @code{redirection operator}.
+@xref{Redirections}, for a list of redirection operators.
+Operators contain at least one unquoted @code{metacharacter}.
+
+@item process group
+@cindex process group
+A collection of related processes each having the same process
+group @sc{id}.
+
+@item process group ID
+@cindex process group ID
+A unique identifier that represents a @code{process group}
+during its lifetime.
+
+@item reserved word
+@cindex reserved word
+A @code{word} that has a special meaning to the shell. Most reserved
+words introduce shell flow control constructs, such as @code{for} and
+@code{while}.
+
+@item return status
+@cindex return status
+A synonym for @code{exit status}.
+
+@item signal
+@cindex signal
+A mechanism by which a process may be notified by the kernel
+of an event occurring in the system.
+
+@item special builtin
+@cindex special builtin
+A shell builtin command that has been classified as special by the
+@sc{posix} standard.
+
+@item token
+@cindex token
+A sequence of characters considered a single unit by the shell.
+It is either a @code{word} or an @code{operator}.
+
+@item word
+@cindex word
+A sequence of characters treated as a unit by the shell.
+Words may not include unquoted @code{metacharacters}.
+@end table
+
+@node Basic Shell Features
+@chapter Basic Shell Features
+@cindex Bourne shell
+
+Bash is an acronym for @samp{Bourne-Again SHell}.
+The Bourne shell is
+the traditional Unix shell originally written by Stephen Bourne.
+All of the Bourne shell builtin commands are available in Bash,
+The rules for evaluation and quoting are taken from the @sc{posix}
+specification for the `standard' Unix shell.
+
+This chapter briefly summarizes the shell's `building blocks':
+commands, control structures, shell functions, shell @i{parameters},
+shell expansions,
+@i{redirections}, which are a way to direct input and output from
+and to named files, and how the shell executes commands.
+
+@menu
+* Shell Syntax:: What your input means to the shell.
+* Shell Commands:: The types of commands you can use.
+* Shell Functions:: Grouping commands by name.
+* Shell Parameters:: How the shell stores values.
+* Shell Expansions:: How Bash expands parameters and the various
+ expansions available.
+* Redirections:: A way to control where input and output go.
+* Executing Commands:: What happens when you run a command.
+* Shell Scripts:: Executing files of shell commands.
+@end menu
+
+@node Shell Syntax
+@section Shell Syntax
+@menu
+* Shell Operation:: The basic operation of the shell.
+* Quoting:: How to remove the special meaning from characters.
+* Comments:: How to specify comments.
+@end menu
+
+When the shell reads input, it proceeds through a
+sequence of operations. If the input indicates the beginning of a
+comment, the shell ignores the comment symbol (@samp{#}), and the rest
+of that line.
+
+Otherwise, roughly speaking, the shell reads its input and
+divides the input into words and operators, employing the quoting rules
+to select which meanings to assign various words and characters.
+
+The shell then parses these tokens into commands and other constructs,
+removes the special meaning of certain words or characters, expands
+others, redirects input and output as needed, executes the specified
+command, waits for the command's exit status, and makes that exit status
+available for further inspection or processing.
+
+@node Shell Operation
+@subsection Shell Operation
+
+The following is a brief description of the shell's operation when it
+reads and executes a command. Basically, the shell does the
+following:
+
+@enumerate
+@item
+Reads its input from a file (@pxref{Shell Scripts}), from a string
+supplied as an argument to the @option{-c} invocation option
+(@pxref{Invoking Bash}), or from the user's terminal.
+
+@item
+Breaks the input into words and operators, obeying the quoting rules
+described in @ref{Quoting}. These tokens are separated by
+@code{metacharacters}. Alias expansion is performed by this step
+(@pxref{Aliases}).
+
+@item
+Parses the tokens into simple and compound commands
+(@pxref{Shell Commands}).
+
+@item
+Performs the various shell expansions (@pxref{Shell Expansions}), breaking
+the expanded tokens into lists of filenames (@pxref{Filename Expansion})
+and commands and arguments.
+
+@item
+Performs any necessary redirections (@pxref{Redirections}) and removes
+the redirection operators and their operands from the argument list.
+
+@item
+Executes the command (@pxref{Executing Commands}).
+
+@item
+Optionally waits for the command to complete and collects its exit
+status (@pxref{Exit Status}).
+
+@end enumerate
+
+@node Quoting
+@subsection Quoting
+@cindex quoting
+@menu
+* Escape Character:: How to remove the special meaning from a single
+ character.
+* Single Quotes:: How to inhibit all interpretation of a sequence
+ of characters.
+* Double Quotes:: How to suppress most of the interpretation of a
+ sequence of characters.
+* ANSI-C Quoting:: How to expand ANSI-C sequences in quoted strings.
+* Locale Translation:: How to translate strings into different languages.
+@end menu
+
+Quoting is used to remove the special meaning of certain
+characters or words to the shell. Quoting can be used to
+disable special treatment for special characters, to prevent
+reserved words from being recognized as such, and to prevent
+parameter expansion.
+
+Each of the shell metacharacters (@pxref{Definitions})
+has special meaning to the shell and must be quoted if it is to
+represent itself.
+When the command history expansion facilities are being used
+(@pxref{History Interaction}), the
+@var{history expansion} character, usually @samp{!}, must be quoted
+to prevent history expansion. @xref{Bash History Facilities}, for
+more details concerning history expansion.
+
+There are three quoting mechanisms: the
+@var{escape character}, single quotes, and double quotes.
+
+@node Escape Character
+@subsubsection Escape Character
+A non-quoted backslash @samp{\} is the Bash escape character.
+It preserves the literal value of the next character that follows,
+with the exception of @code{newline}. If a @code{\newline} pair
+appears, and the backslash itself is not quoted, the @code{\newline}
+is treated as a line continuation (that is, it is removed from
+the input stream and effectively ignored).
+
+@node Single Quotes
+@subsubsection Single Quotes
+
+Enclosing characters in single quotes (@samp{'}) preserves the literal value
+of each character within the quotes. A single quote may not occur
+between single quotes, even when preceded by a backslash.
+
+@node Double Quotes
+@subsubsection Double Quotes
+
+Enclosing characters in double quotes (@samp{"}) preserves the literal value
+of all characters within the quotes, with the exception of
+@samp{$}, @samp{`}, @samp{\},
+and, when history expansion is enabled, @samp{!}.
+The characters @samp{$} and @samp{`}
+retain their special meaning within double quotes (@pxref{Shell Expansions}).
+The backslash retains its special meaning only when followed by one of
+the following characters:
+@samp{$}, @samp{`}, @samp{"}, @samp{\}, or @code{newline}.
+Within double quotes, backslashes that are followed by one of these
+characters are removed. Backslashes preceding characters without a
+special meaning are left unmodified.
+A double quote may be quoted within double quotes by preceding it with
+a backslash.
+If enabled, history expansion will be performed unless an @samp{!}
+appearing in double quotes is escaped using a backslash.
+The backslash preceding the @samp{!} is not removed.
+
+The special parameters @samp{*} and @samp{@@} have special meaning
+when in double quotes (@pxref{Shell Parameter Expansion}).
+
+@node ANSI-C Quoting
+@subsubsection ANSI-C Quoting
+@cindex quoting, ANSI
+
+Words of the form @code{$'@var{string}'} are treated specially. The
+word expands to @var{string}, with backslash-escaped characters replaced
+as specified by the ANSI C standard. Backslash escape sequences, if
+present, are decoded as follows:
+
+@table @code
+@item \a
+alert (bell)
+@item \b
+backspace
+@item \e
+@itemx \E
+an escape character (not ANSI C)
+@item \f
+form feed
+@item \n
+newline
+@item \r
+carriage return
+@item \t
+horizontal tab
+@item \v
+vertical tab
+@item \\
+backslash
+@item \'
+single quote
+@item \"
+double quote
+@item \@var{nnn}
+the eight-bit character whose value is the octal value @var{nnn}
+(one to three digits)
+@item \x@var{HH}
+the eight-bit character whose value is the hexadecimal value @var{HH}
+(one or two hex digits)
+@item \c@var{x}
+a control-@var{x} character
+@end table
+
+@noindent
+The expanded result is single-quoted, as if the dollar sign had not
+been present.
+
+@node Locale Translation
+@subsubsection Locale-Specific Translation
+@cindex localization
+@cindex internationalization
+@cindex native languages
+@cindex translation, native languages
+
+A double-quoted string preceded by a dollar sign (@samp{$}) will cause
+the string to be translated according to the current locale.
+If the current locale is @code{C} or @code{POSIX}, the dollar sign
+is ignored.
+If the string is translated and replaced, the replacement is
+double-quoted.
+
+@vindex LC_MESSAGES
+@vindex TEXTDOMAIN
+@vindex TEXTDOMAINDIR
+Some systems use the message catalog selected by the @env{LC_MESSAGES}
+shell variable. Others create the name of the message catalog from the
+value of the @env{TEXTDOMAIN} shell variable, possibly adding a
+suffix of @samp{.mo}. If you use the @env{TEXTDOMAIN} variable, you
+may need to set the @env{TEXTDOMAINDIR} variable to the location of
+the message catalog files. Still others use both variables in this
+fashion:
+@env{TEXTDOMAINDIR}/@env{LC_MESSAGES}/LC_MESSAGES/@env{TEXTDOMAIN}.mo.
+
+@node Comments
+@subsection Comments
+@cindex comments, shell
+
+In a non-interactive shell, or an interactive shell in which the
+@code{interactive_comments} option to the @code{shopt}
+builtin is enabled (@pxref{The Shopt Builtin}),
+a word beginning with @samp{#}
+causes that word and all remaining characters on that line to
+be ignored. An interactive shell without the @code{interactive_comments}
+option enabled does not allow comments. The @code{interactive_comments}
+option is on by default in interactive shells.
+@xref{Interactive Shells}, for a description of what makes
+a shell interactive.
+
+@node Shell Commands
+@section Shell Commands
+@cindex commands, shell
+
+A simple shell command such as @code{echo a b c} consists of the command
+itself followed by arguments, separated by spaces.
+
+More complex shell commands are composed of simple commands arranged together
+in a variety of ways: in a pipeline in which the output of one command
+becomes the input of a second, in a loop or conditional construct, or in
+some other grouping.
+
+@menu
+* Simple Commands:: The most common type of command.
+* Pipelines:: Connecting the input and output of several
+ commands.
+* Lists:: How to execute commands sequentially.
+* Compound Commands:: Shell commands for control flow.
+* Coprocesses:: Two-way communication between commands.
+@end menu
+
+@node Simple Commands
+@subsection Simple Commands
+@cindex commands, simple
+
+A simple command is the kind of command encountered most often.
+It's just a sequence of words separated by @code{blank}s, terminated
+by one of the shell's control operators (@pxref{Definitions}). The
+first word generally specifies a command to be executed, with the
+rest of the words being that command's arguments.
+
+The return status (@pxref{Exit Status}) of a simple command is
+its exit status as provided
+by the @sc{posix} 1003.1 @code{waitpid} function, or 128+@var{n} if
+the command was terminated by signal @var{n}.
+
+@node Pipelines
+@subsection Pipelines
+@cindex pipeline
+@cindex commands, pipelines
+
+A @code{pipeline} is a sequence of simple commands separated by one of
+the control operators @samp{|} or @samp{|&}.
+
+@rwindex time
+@rwindex !
+@cindex command timing
+The format for a pipeline is
+@example
+[@code{time} [@code{-p}]] [@code{!}] @var{command1} [ [@code{|} or @code{|&}] @var{command2} @dots{}]
+@end example
+
+@noindent
+The output of each command in the pipeline is connected via a pipe
+to the input of the next command.
+That is, each command reads the previous command's output. This
+connection is performed before any redirections specified by the
+command.
+
+If @samp{|&} is used, the standard error of @var{command1} is connected to
+@var{command2}'s standard input through the pipe; it is shorthand for
+@code{2>&1 |}. This implicit redirection of the standard error is
+performed after any redirections specified by the command.
+
+The reserved word @code{time} causes timing statistics
+to be printed for the pipeline once it finishes.
+The statistics currently consist of elapsed (wall-clock) time and
+user and system time consumed by the command's execution.
+The @option{-p} option changes the output format to that specified
+by @sc{posix}.
+The @env{TIMEFORMAT} variable may be set to a format string that
+specifies how the timing information should be displayed.
+@xref{Bash Variables}, for a description of the available formats.
+The use of @code{time} as a reserved word permits the timing of
+shell builtins, shell functions, and pipelines. An external
+@code{time} command cannot time these easily.
+
+If the pipeline is not executed asynchronously (@pxref{Lists}), the
+shell waits for all commands in the pipeline to complete.
+
+Each command in a pipeline is executed in its own subshell
+(@pxref{Command Execution Environment}). The exit
+status of a pipeline is the exit status of the last command in the
+pipeline, unless the @code{pipefail} option is enabled
+(@pxref{The Set Builtin}).
+If @code{pipefail} is enabled, the pipeline's return status is the
+value of the last (rightmost) command to exit with a non-zero status,
+or zero if all commands exit successfully.
+If the reserved word @samp{!} precedes the pipeline, the
+exit status is the logical negation of the exit status as described
+above.
+The shell waits for all commands in the pipeline to terminate before
+returning a value.
+
+@node Lists
+@subsection Lists of Commands
+@cindex commands, lists
+
+A @code{list} is a sequence of one or more pipelines separated by one
+of the operators @samp{;}, @samp{&}, @samp{&&}, or @samp{||},
+and optionally terminated by one of @samp{;}, @samp{&}, or a
+@code{newline}.
+
+Of these list operators, @samp{&&} and @samp{||}
+have equal precedence, followed by @samp{;} and @samp{&},
+which have equal precedence.
+
+A sequence of one or more newlines may appear in a @code{list}
+to delimit commands, equivalent to a semicolon.
+
+If a command is terminated by the control operator @samp{&},
+the shell executes the command asynchronously in a subshell.
+This is known as executing the command in the @var{background}.
+The shell does not wait for the command to finish, and the return
+status is 0 (true).
+When job control is not active (@pxref{Job Control}),
+the standard input for asynchronous commands, in the absence of any
+explicit redirections, is redirected from @code{/dev/null}.
+
+Commands separated by a @samp{;} are executed sequentially; the shell
+waits for each command to terminate in turn. The return status is the
+exit status of the last command executed.
+
+@sc{and} and @sc{or} lists are sequences of one or more pipelines
+separated by the control operators @samp{&&} and @samp{||},
+respectively. @sc{and} and @sc{or} lists are executed with left
+associativity.
+
+An @sc{and} list has the form
+@example
+@var{command1} && @var{command2}
+@end example
+
+@noindent
+@var{command2} is executed if, and only if, @var{command1}
+returns an exit status of zero.
+
+An @sc{or} list has the form
+@example
+@var{command1} || @var{command2}
+@end example
+
+@noindent
+@var{command2} is executed if, and only if, @var{command1}
+returns a non-zero exit status.
+
+The return status of
+@sc{and} and @sc{or} lists is the exit status of the last command
+executed in the list.
+
+@node Compound Commands
+@subsection Compound Commands
+@cindex commands, compound
+
+@menu
+* Looping Constructs:: Shell commands for iterative action.
+* Conditional Constructs:: Shell commands for conditional execution.
+* Command Grouping:: Ways to group commands.
+@end menu
+
+Compound commands are the shell programming constructs.
+Each construct begins with a reserved word or control operator and is
+terminated by a corresponding reserved word or operator.
+Any redirections (@pxref{Redirections}) associated with a compound command
+apply to all commands within that compound command unless explicitly overridden.
+
+Bash provides looping constructs, conditional commands, and mechanisms
+to group commands and execute them as a unit.
+
+@node Looping Constructs
+@subsubsection Looping Constructs
+@cindex commands, looping
+
+Bash supports the following looping constructs.
+
+Note that wherever a @samp{;} appears in the description of a
+command's syntax, it may be replaced with one or more newlines.
+
+@table @code
+@item until
+@rwindex until
+@rwindex do
+@rwindex done
+The syntax of the @code{until} command is:
+@example
+until @var{test-commands}; do @var{consequent-commands}; done
+@end example
+Execute @var{consequent-commands} as long as
+@var{test-commands} has an exit status which is not zero.
+The return status is the exit status of the last command executed
+in @var{consequent-commands}, or zero if none was executed.
+
+@item while
+@rwindex while
+The syntax of the @code{while} command is:
+@example
+while @var{test-commands}; do @var{consequent-commands}; done
+@end example
+
+Execute @var{consequent-commands} as long as
+@var{test-commands} has an exit status of zero.
+The return status is the exit status of the last command executed
+in @var{consequent-commands}, or zero if none was executed.
+
+@item for
+@rwindex for
+The syntax of the @code{for} command is:
+
+@example
+for @var{name} [ [in [@var{words} @dots{}] ] ; ] do @var{commands}; done
+@end example
+Expand @var{words}, and execute @var{commands} once for each member
+in the resultant list, with @var{name} bound to the current member.
+If @samp{in @var{words}} is not present, the @code{for} command
+executes the @var{commands} once for each positional parameter that is
+set, as if @samp{in "$@@"} had been specified
+(@pxref{Special Parameters}).
+The return status is the exit status of the last command that executes.
+If there are no items in the expansion of @var{words}, no commands are
+executed, and the return status is zero.
+
+An alternate form of the @code{for} command is also supported:
+
+@example
+for (( @var{expr1} ; @var{expr2} ; @var{expr3} )) ; do @var{commands} ; done
+@end example
+First, the arithmetic expression @var{expr1} is evaluated according
+to the rules described below (@pxref{Shell Arithmetic}).
+The arithmetic expression @var{expr2} is then evaluated repeatedly
+until it evaluates to zero.
+Each time @var{expr2} evaluates to a non-zero value, @var{commands} are
+executed and the arithmetic expression @var{expr3} is evaluated.
+If any expression is omitted, it behaves as if it evaluates to 1.
+The return value is the exit status of the last command in @var{list}
+that is executed, or false if any of the expressions is invalid.
+
+@end table
+
+The @code{break} and @code{continue} builtins (@pxref{Bourne Shell Builtins})
+may be used to control loop execution.
+
+@node Conditional Constructs
+@subsubsection Conditional Constructs
+@cindex commands, conditional
+
+@table @code
+@item if
+@rwindex if
+@rwindex then
+@rwindex else
+@rwindex elif
+@rwindex fi
+The syntax of the @code{if} command is:
+
+@example
+if @var{test-commands}; then
+ @var{consequent-commands};
+[elif @var{more-test-commands}; then
+ @var{more-consequents};]
+[else @var{alternate-consequents};]
+fi
+@end example
+
+The @var{test-commands} list is executed, and if its return status is zero,
+the @var{consequent-commands} list is executed.
+If @var{test-commands} returns a non-zero status, each @code{elif} list
+is executed in turn, and if its exit status is zero,
+the corresponding @var{more-consequents} is executed and the
+command completes.
+If @samp{else @var{alternate-consequents}} is present, and
+the final command in the final @code{if} or @code{elif} clause
+has a non-zero exit status, then @var{alternate-consequents} is executed.
+The return status is the exit status of the last command executed, or
+zero if no condition tested true.
+
+@item case
+@rwindex case
+@rwindex in
+@rwindex esac
+The syntax of the @code{case} command is:
+
+@example
+@code{case @var{word} in [ [(] @var{pattern} [| @var{pattern}]@dots{}) @var{command-list} ;;]@dots{} esac}
+@end example
+
+@code{case} will selectively execute the @var{command-list} corresponding to
+the first @var{pattern} that matches @var{word}.
+If the shell option @code{nocasematch}
+(see the description of @code{shopt} in @ref{The Shopt Builtin})
+is enabled, the match is performed without regard to the case
+of alphabetic characters.
+The @samp{|} is used to separate multiple patterns, and the @samp{)}
+operator terminates a pattern list.
+A list of patterns and an associated command-list is known
+as a @var{clause}.
+
+Each clause must be terminated with @samp{;;}, @samp{;&}, or @samp{;;&}.
+The @var{word} undergoes tilde expansion, parameter expansion, command
+substitution, arithmetic expansion, and quote removal before matching is
+attempted. Each @var{pattern} undergoes tilde expansion, parameter
+expansion, command substitution, and arithmetic expansion.
+
+There may be an arbitrary number of @code{case} clauses, each terminated
+by a @samp{;;}, @samp{;&}, or @samp{;;&}.
+The first pattern that matches determines the
+command-list that is executed.
+
+Here is an example using @code{case} in a script that could be used to
+describe one interesting feature of an animal:
+
+@example
+echo -n "Enter the name of an animal: "
+read ANIMAL
+echo -n "The $ANIMAL has "
+case $ANIMAL in
+ horse | dog | cat) echo -n "four";;
+ man | kangaroo ) echo -n "two";;
+ *) echo -n "an unknown number of";;
+esac
+echo " legs."
+@end example
+
+@noindent
+
+If the @samp{;;} operator is used, no subsequent matches are attempted after
+the first pattern match.
+Using @samp{;&} in place of @samp{;;} causes execution to continue with
+the @var{command-list} associated with the next clause, if any.
+Using @samp{;;&} in place of @samp{;;} causes the shell to test the patterns
+in the next clause, if any, and execute any associated @var{command-list}
+on a successful match.
+
+The return status is zero if no @var{pattern} is matched. Otherwise, the
+return status is the exit status of the @var{command-list} executed.
+
+@item select
+@rwindex select
+
+The @code{select} construct allows the easy generation of menus.
+It has almost the same syntax as the @code{for} command:
+
+@example
+select @var{name} [in @var{words} @dots{}]; do @var{commands}; done
+@end example
+
+The list of words following @code{in} is expanded, generating a list
+of items. The set of expanded words is printed on the standard
+error output stream, each preceded by a number. If the
+@samp{in @var{words}} is omitted, the positional parameters are printed,
+as if @samp{in "$@@"} had been specified.
+The @env{PS3} prompt is then displayed and a line is read from the
+standard input.
+If the line consists of a number corresponding to one of the displayed
+words, then the value of @var{name} is set to that word.
+If the line is empty, the words and prompt are displayed again.
+If @code{EOF} is read, the @code{select} command completes.
+Any other value read causes @var{name} to be set to null.
+The line read is saved in the variable @env{REPLY}.
+
+The @var{commands} are executed after each selection until a
+@code{break} command is executed, at which
+point the @code{select} command completes.
+
+Here is an example that allows the user to pick a filename from the
+current directory, and displays the name and index of the file
+selected.
+
+@example
+select fname in *;
+do
+ echo you picked $fname \($REPLY\)
+ break;
+done
+@end example
+
+@item ((@dots{}))
+@example
+(( @var{expression} ))
+@end example
+
+The arithmetic @var{expression} is evaluated according to the rules
+described below (@pxref{Shell Arithmetic}).
+If the value of the expression is non-zero, the return status is 0;
+otherwise the return status is 1. This is exactly equivalent to
+@example
+let "@var{expression}"
+@end example
+@noindent
+@xref{Bash Builtins}, for a full description of the @code{let} builtin.
+
+@item [[@dots{}]]
+@rwindex [[
+@rwindex ]]
+@example
+[[ @var{expression} ]]
+@end example
+
+Return a status of 0 or 1 depending on the evaluation of
+the conditional expression @var{expression}.
+Expressions are composed of the primaries described below in
+@ref{Bash Conditional Expressions}.
+Word splitting and filename expansion are not performed on the words
+between the @samp{[[} and @samp{]]}; tilde expansion, parameter and
+variable expansion, arithmetic expansion, command substitution, process
+substitution, and quote removal are performed.
+Conditional operators such as @samp{-f} must be unquoted to be recognized
+as primaries.
+
+When used with @samp{[[}, The @samp{<} and @samp{>} operators sort
+lexicographically using the current locale.
+
+When the @samp{==} and @samp{!=} operators are used, the string to the
+right of the operator is considered a pattern and matched according
+to the rules described below in @ref{Pattern Matching}.
+If the shell option @code{nocasematch}
+(see the description of @code{shopt} in @ref{The Shopt Builtin})
+is enabled, the match is performed without regard to the case
+of alphabetic characters.
+The return value is 0 if the string matches (@samp{==}) or does not
+match (@samp{!=})the pattern, and 1 otherwise.
+Any part of the pattern may be quoted to force it to be matched as a
+string.
+
+An additional binary operator, @samp{=~}, is available, with the same
+precedence as @samp{==} and @samp{!=}.
+When it is used, the string to the right of the operator is considered
+an extended regular expression and matched accordingly (as in @i{regex}3)).
+The return value is 0 if the string matches
+the pattern, and 1 otherwise.
+If the regular expression is syntactically incorrect, the conditional
+expression's return value is 2.
+If the shell option @code{nocasematch}
+(see the description of @code{shopt} in @ref{The Shopt Builtin})
+is enabled, the match is performed without regard to the case
+of alphabetic characters.
+Any part of the pattern may be quoted to force it to be matched as a
+string.
+Substrings matched by parenthesized subexpressions within the regular
+expression are saved in the array variable @code{BASH_REMATCH}.
+The element of @code{BASH_REMATCH} with index 0 is the portion of the string
+matching the entire regular expression.
+The element of @code{BASH_REMATCH} with index @var{n} is the portion of the
+string matching the @var{n}th parenthesized subexpression.
+
+Expressions may be combined using the following operators, listed
+in decreasing order of precedence:
+
+@table @code
+@item ( @var{expression} )
+Returns the value of @var{expression}.
+This may be used to override the normal precedence of operators.
+
+@item ! @var{expression}
+True if @var{expression} is false.
+
+@item @var{expression1} && @var{expression2}
+True if both @var{expression1} and @var{expression2} are true.
+
+@item @var{expression1} || @var{expression2}
+True if either @var{expression1} or @var{expression2} is true.
+@end table
+@noindent
+The @code{&&} and @code{||} operators do not evaluate @var{expression2} if the
+value of @var{expression1} is sufficient to determine the return
+value of the entire conditional expression.
+
+@end table
+
+@node Command Grouping
+@subsubsection Grouping Commands
+@cindex commands, grouping
+
+Bash provides two ways to group a list of commands to be executed
+as a unit. When commands are grouped, redirections may be applied
+to the entire command list. For example, the output of all the
+commands in the list may be redirected to a single stream.
+
+@table @code
+@item ()
+@example
+( @var{list} )
+@end example
+
+Placing a list of commands between parentheses causes a subshell
+environment to be created (@pxref{Command Execution Environment}), and each
+of the commands in @var{list} to be executed in that subshell. Since the
+@var{list} is executed in a subshell, variable assignments do not remain in
+effect after the subshell completes.
+
+@item @{@}
+@rwindex @{
+@rwindex @}
+@example
+@{ @var{list}; @}
+@end example
+
+Placing a list of commands between curly braces causes the list to
+be executed in the current shell context. No subshell is created.
+The semicolon (or newline) following @var{list} is required.
+@end table
+
+In addition to the creation of a subshell, there is a subtle difference
+between these two constructs due to historical reasons. The braces
+are @code{reserved words}, so they must be separated from the @var{list}
+by @code{blank}s or other shell metacharacters.
+The parentheses are @code{operators}, and are
+recognized as separate tokens by the shell even if they are not separated
+from the @var{list} by whitespace.
+
+The exit status of both of these constructs is the exit status of
+@var{list}.
+
+@node Coprocesses
+@subsection Coprocesses
+@cindex coprocess
+
+A @code{coprocess} is a shell command preceded by the @code{coproc}
+reserved word.
+A coprocess is executed asynchronously in a subshell, as if the command
+had been terminated with the @samp{&} control operator, with a two-way pipe
+established between the executing shell and the coprocess.
+
+The format for a coprocess is:
+@example
+@code{coproc} [@var{NAME}] @var{command} [@var{redirections}]
+@end example
+
+@noindent
+This creates a coprocess named @var{NAME}.
+If @var{NAME} is not supplied, the default name is @var{COPROC}.
+@var{NAME} must not be supplied if @var{command} is a simple
+command (@pxref{Simple Commands}); otherwise, it is interpreted as
+the first word of the simple command.
+
+When the coproc is executed, the shell creates an array variable
+(@pxref{Arrays})
+named @var{NAME} in the context of the executing shell.
+The standard output of @var{command}
+is connected via a pipe to a file descriptor in the executing shell,
+and that file descriptor is assigned to @var{NAME}[0].
+The standard input of @var{command}
+is connected via a pipe to a file descriptor in the executing shell,
+and that file descriptor is assigned to @var{NAME}[1].
+This pipe is established before any redirections specified by the
+command (@pxref{Redirections}).
+The file descriptors can be utilized as arguments to shell commands
+and redirections using standard word expansions.
+
+The process id of the shell spawned to execute the coprocess is
+available as the value of the variable @var{NAME}_PID.
+The @code{wait}
+builtin command may be used to wait for the coprocess to terminate.
+
+The return status of a coprocess is the exit status of @var{command}.
+
+@node Shell Functions
+@section Shell Functions
+@cindex shell function
+@cindex functions, shell
+
+Shell functions are a way to group commands for later execution
+using a single name for the group. They are executed just like
+a "regular" command.
+When the name of a shell function is used as a simple command name,
+the list of commands associated with that function name is executed.
+Shell functions are executed in the current
+shell context; no new process is created to interpret them.
+
+Functions are declared using this syntax:
+@rwindex function
+@example
+[ @code{function} ] @var{name} () @var{compound-command} [ @var{redirections} ]
+@end example
+
+This defines a shell function named @var{name}. The reserved
+word @code{function} is optional.
+If the @code{function} reserved
+word is supplied, the parentheses are optional.
+The @var{body} of the function is the compound command
+@var{compound-command} (@pxref{Compound Commands}).
+That command is usually a @var{list} enclosed between @{ and @}, but
+may be any compound command listed above.
+@var{compound-command} is executed whenever @var{name} is specified as the
+name of a command.
+Any redirections (@pxref{Redirections}) associated with the shell function
+are performed when the function is executed.
+
+A function definition may be deleted using the @option{-f} option to the
+@code{unset} builtin (@pxref{Bourne Shell Builtins}).
+
+The exit status of a function definition is zero unless a syntax error
+occurs or a readonly function with the same name already exists.
+When executed, the exit status of a function is the exit status of the
+last command executed in the body.
+
+Note that for historical reasons, in the most common usage the curly braces
+that surround the body of the function must be separated from the body by
+@code{blank}s or newlines.
+This is because the braces are reserved words and are only recognized
+as such when they are separated from the command list
+by whitespace or another shell metacharacter.
+Also, when using the braces, the @var{list} must be terminated by a semicolon,
+a @samp{&}, or a newline.
+
+When a function is executed, the arguments to the
+function become the positional parameters
+during its execution (@pxref{Positional Parameters}).
+The special parameter @samp{#} that expands to the number of
+positional parameters is updated to reflect the change.
+Special parameter @code{0} is unchanged.
+The first element of the @env{FUNCNAME} variable is set to the
+name of the function while the function is executing.
+
+All other aspects of the shell execution
+environment are identical between a function and its caller
+with these exceptions:
+the @env{DEBUG} and @env{RETURN} traps
+are not inherited unless the function has been given the
+@code{trace} attribute using the @code{declare} builtin or
+the @code{-o functrace} option has been enabled with
+the @code{set} builtin,
+(in which case all functions inherit the @env{DEBUG} and @env{RETURN} traps),
+and the @env{ERR} trap is not inherited unless the @code{-o errtrace}
+shell option has been enabled.
+@xref{Bourne Shell Builtins}, for the description of the
+@code{trap} builtin.
+
+If the builtin command @code{return}
+is executed in a function, the function completes and
+execution resumes with the next command after the function
+call.
+Any command associated with the @code{RETURN} trap is executed
+before execution resumes.
+When a function completes, the values of the
+positional parameters and the special parameter @samp{#}
+are restored to the values they had prior to the function's
+execution. If a numeric argument is given to @code{return},
+that is the function's return status; otherwise the function's
+return status is the exit status of the last command executed
+before the @code{return}.
+
+Variables local to the function may be declared with the
+@code{local} builtin. These variables are visible only to
+the function and the commands it invokes.
+
+Function names and definitions may be listed with the
+@option{-f} option to the @code{declare} or @code{typeset}
+builtin commands (@pxref{Bash Builtins}).
+The @option{-F} option to @code{declare} or @code{typeset}
+will list the function names only
+(and optionally the source file and line number, if the @code{extdebug}
+shell option is enabled).
+Functions may be exported so that subshells
+automatically have them defined with the
+@option{-f} option to the @code{export} builtin
+(@pxref{Bourne Shell Builtins}).
+Note that shell functions and variables with the same name may result
+in multiple identically-named entries in the environment passed to the
+shell's children.
+Care should be taken in cases where this may cause a problem.
+
+Functions may be recursive. No limit is placed on the number of
+recursive calls.
+
+@node Shell Parameters
+@section Shell Parameters
+@cindex parameters
+@cindex variable, shell
+@cindex shell variable
+
+@menu
+* Positional Parameters:: The shell's command-line arguments.
+* Special Parameters:: Parameters denoted by special characters.
+@end menu
+
+A @var{parameter} is an entity that stores values.
+It can be a @code{name}, a number, or one of the special characters
+listed below.
+A @var{variable} is a parameter denoted by a @code{name}.
+A variable has a @var{value} and zero or more @var{attributes}.
+Attributes are assigned using the @code{declare} builtin command
+(see the description of the @code{declare} builtin in @ref{Bash Builtins}).
+
+A parameter is set if it has been assigned a value. The null string is
+a valid value. Once a variable is set, it may be unset only by using
+the @code{unset} builtin command.
+
+A variable may be assigned to by a statement of the form
+@example
+@var{name}=[@var{value}]
+@end example
+@noindent
+If @var{value}
+is not given, the variable is assigned the null string. All
+@var{value}s undergo tilde expansion, parameter and variable expansion,
+command substitution, arithmetic expansion, and quote
+removal (detailed below). If the variable has its @code{integer}
+attribute set, then @var{value}
+is evaluated as an arithmetic expression even if the @code{$((@dots{}))}
+expansion is not used (@pxref{Arithmetic Expansion}).
+Word splitting is not performed, with the exception
+of @code{"$@@"} as explained below.
+Filename expansion is not performed.
+Assignment statements may also appear as arguments to the
+@code{alias},
+@code{declare}, @code{typeset}, @code{export}, @code{readonly},
+and @code{local} builtin commands.
+
+In the context where an assignment statement is assigning a value
+to a shell variable or array index (@pxref{Arrays}), the @samp{+=}
+operator can be used to
+append to or add to the variable's previous value.
+When @samp{+=} is applied to a variable for which the integer attribute
+has been set, @var{value} is evaluated as an arithmetic expression and
+added to the variable's current value, which is also evaluated.
+When @samp{+=} is applied to an array variable using compound assignment
+(@pxref{Arrays}), the
+variable's value is not unset (as it is when using @samp{=}), and new
+values are appended to the array beginning at one greater than the array's
+maximum index (for indexed arrays), or added as additional key-value pairs
+in an associative array.
+When applied to a string-valued variable, @var{value} is expanded and
+appended to the variable's value.
+
+@node Positional Parameters
+@subsection Positional Parameters
+@cindex parameters, positional
+
+A @var{positional parameter} is a parameter denoted by one or more
+digits, other than the single digit @code{0}. Positional parameters are
+assigned from the shell's arguments when it is invoked,
+and may be reassigned using the @code{set} builtin command.
+Positional parameter @code{N} may be referenced as @code{$@{N@}}, or
+as @code{$N} when @code{N} consists of a single digit.
+Positional parameters may not be assigned to with assignment statements.
+The @code{set} and @code{shift} builtins are used to set and
+unset them (@pxref{Shell Builtin Commands}).
+The positional parameters are
+temporarily replaced when a shell function is executed
+(@pxref{Shell Functions}).
+
+When a positional parameter consisting of more than a single
+digit is expanded, it must be enclosed in braces.
+
+@node Special Parameters
+@subsection Special Parameters
+@cindex parameters, special
+
+The shell treats several parameters specially. These parameters may
+only be referenced; assignment to them is not allowed.
+
+@vtable @code
+
+@item *
+Expands to the positional parameters, starting from one. When the
+expansion occurs within double quotes, it expands to a single word
+with the value of each parameter separated by the first character
+of the @env{IFS}
+special variable. That is, @code{"$*"} is equivalent
+to @code{"$1@var{c}$2@var{c}@dots{}"}, where @var{c}
+is the first character of the value of the @code{IFS}
+variable.
+If @env{IFS} is unset, the parameters are separated by spaces.
+If @env{IFS} is null, the parameters are joined without intervening
+separators.
+
+
+@item @@
+Expands to the positional parameters, starting from one. When the
+expansion occurs within double quotes, each parameter expands to a
+separate word. That is, @code{"$@@"} is equivalent to
+@code{"$1" "$2" @dots{}}.
+If the double-quoted expansion occurs within a word, the expansion of
+the first parameter is joined with the beginning part of the original
+word, and the expansion of the last parameter is joined with the last
+part of the original word.
+When there are no positional parameters, @code{"$@@"} and
+@code{$@@}
+expand to nothing (i.e., they are removed).
+
+@item #
+Expands to the number of positional parameters in decimal.
+
+@item ?
+Expands to the exit status of the most recently executed foreground
+pipeline.
+
+@item -
+(A hyphen.) Expands to the current option flags as specified upon
+invocation, by the @code{set}
+builtin command, or those set by the shell itself
+(such as the @option{-i} option).
+
+@item $
+Expands to the process @sc{id} of the shell. In a @code{()} subshell, it
+expands to the process @sc{id} of the invoking shell, not the subshell.
+
+@item !
+Expands to the process @sc{id} of the most recently executed background
+(asynchronous) command.
+
+@item 0
+Expands to the name of the shell or shell script. This is set at
+shell initialization. If Bash is invoked with a file of commands
+(@pxref{Shell Scripts}), @code{$0} is set to the name of that file.
+If Bash is started with the @option{-c} option (@pxref{Invoking Bash}),
+then @code{$0} is set to the first argument after the string to be
+executed, if one is present. Otherwise, it is set
+to the filename used to invoke Bash, as given by argument zero.
+
+@item _
+(An underscore.)
+At shell startup, set to the absolute pathname used to invoke the
+shell or shell script being executed as passed in the environment
+or argument list.
+Subsequently, expands to the last argument to the previous command,
+after expansion.
+Also set to the full pathname used to invoke each command executed
+and placed in the environment exported to that command.
+When checking mail, this parameter holds the name of the mail file.
+@end vtable
+
+@node Shell Expansions
+@section Shell Expansions
+@cindex expansion
+
+Expansion is performed on the command line after it has been split into
+@code{token}s. There are seven kinds of expansion performed:
+@itemize @bullet
+@item brace expansion
+@item tilde expansion
+@item parameter and variable expansion
+@item command substitution
+@item arithmetic expansion
+@item word splitting
+@item filename expansion
+@end itemize
+
+@menu
+* Brace Expansion:: Expansion of expressions within braces.
+* Tilde Expansion:: Expansion of the ~ character.
+* Shell Parameter Expansion:: How Bash expands variables to their values.
+* Command Substitution:: Using the output of a command as an argument.
+* Arithmetic Expansion:: How to use arithmetic in shell expansions.
+* Process Substitution:: A way to write and read to and from a
+ command.
+* Word Splitting:: How the results of expansion are split into separate
+ arguments.
+* Filename Expansion:: A shorthand for specifying filenames matching patterns.
+* Quote Removal:: How and when quote characters are removed from
+ words.
+@end menu
+
+The order of expansions is: brace expansion, tilde expansion,
+parameter, variable, and arithmetic expansion and
+command substitution
+(done in a left-to-right fashion), word splitting, and filename
+expansion.
+
+On systems that can support it, there is an additional expansion
+available: @var{process substitution}. This is performed at the
+same time as parameter, variable, and arithmetic expansion and
+command substitution.
+
+Only brace expansion, word splitting, and filename expansion
+can change the number of words of the expansion; other expansions
+expand a single word to a single word.
+The only exceptions to this are the expansions of
+@code{"$@@"} (@pxref{Special Parameters}) and @code{"$@{@var{name}[@@]@}"}
+(@pxref{Arrays}).
+
+After all expansions, @code{quote removal} (@pxref{Quote Removal})
+is performed.
+
+@node Brace Expansion
+@subsection Brace Expansion
+@cindex brace expansion
+@cindex expansion, brace
+
+Brace expansion is a mechanism by which arbitrary strings may be generated.
+This mechanism is similar to
+@var{filename expansion} (@pxref{Filename Expansion}),
+but the file names generated need not exist.
+Patterns to be brace expanded take the form of an optional @var{preamble},
+followed by either a series of comma-separated strings or a seqeunce expression
+between a pair of braces,
+followed by an optional @var{postscript}.
+The preamble is prefixed to each string contained within the braces, and
+the postscript is then appended to each resulting string, expanding left
+to right.
+
+Brace expansions may be nested.
+The results of each expanded string are not sorted; left to right order
+is preserved.
+For example,
+@example
+bash$ echo a@{d,c,b@}e
+ade ace abe
+@end example
+
+A sequence expression takes the form @code{@{@var{x}..@var{y}[..@var{incr}]@}},
+where @var{x} and @var{y} are either integers or single characters,
+and @var{incr}, an optional increment, is an integer.
+When integers are supplied, the expression expands to each number between
+@var{x} and @var{y}, inclusive.
+Supplied integers may be prefixed with @samp{0} to force each term to have the
+same width. When either @var{x} or @var{y} begins with a zero, the shell
+attempts to force all generated terms to contain the same number of digits,
+zero-padding where necessary.
+When characters are supplied, the expression expands to each character
+lexicographically between @var{x} and @var{y}, inclusive. Note that
+both @var{x} and @var{y} must be of the same type.
+When the increment is supplied, it is used as the difference between
+each term. The default increment is 1 or -1 as appropriate.
+
+Brace expansion is performed before any other expansions,
+and any characters special to other expansions are preserved
+in the result. It is strictly textual. Bash
+does not apply any syntactic interpretation to the context of the
+expansion or the text between the braces.
+To avoid conflicts with parameter expansion, the string @samp{$@{}
+is not considered eligible for brace expansion.
+
+A correctly-formed brace expansion must contain unquoted opening
+and closing braces, and at least one unquoted comma or a valid
+sequence expression.
+Any incorrectly formed brace expansion is left unchanged.
+
+A @{ or @samp{,} may be quoted with a backslash to prevent its
+being considered part of a brace expression.
+To avoid conflicts with parameter expansion, the string @samp{$@{}
+is not considered eligible for brace expansion.
+
+This construct is typically used as shorthand when the common
+prefix of the strings to be generated is longer than in the
+above example:
+@example
+mkdir /usr/local/src/bash/@{old,new,dist,bugs@}
+@end example
+or
+@example
+chown root /usr/@{ucb/@{ex,edit@},lib/@{ex?.?*,how_ex@}@}
+@end example
+
+@node Tilde Expansion
+@subsection Tilde Expansion
+@cindex tilde expansion
+@cindex expansion, tilde
+
+If a word begins with an unquoted tilde character (@samp{~}), all of the
+characters up to the first unquoted slash (or all characters,
+if there is no unquoted slash) are considered a @var{tilde-prefix}.
+If none of the characters in the tilde-prefix are quoted, the
+characters in the tilde-prefix following the tilde are treated as a
+possible @var{login name}.
+If this login name is the null string, the tilde is replaced with the
+value of the @env{HOME} shell variable.
+If @env{HOME} is unset, the home directory of the user executing the
+shell is substituted instead.
+Otherwise, the tilde-prefix is replaced with the home directory
+associated with the specified login name.
+
+If the tilde-prefix is @samp{~+}, the value of
+the shell variable @env{PWD} replaces the tilde-prefix.
+If the tilde-prefix is @samp{~-}, the value of the shell variable
+@env{OLDPWD}, if it is set, is substituted.
+
+If the characters following the tilde in the tilde-prefix consist of a
+number @var{N}, optionally prefixed by a @samp{+} or a @samp{-},
+the tilde-prefix is replaced with the
+corresponding element from the directory stack, as it would be displayed
+by the @code{dirs} builtin invoked with the characters following tilde
+in the tilde-prefix as an argument (@pxref{The Directory Stack}).
+If the tilde-prefix, sans the tilde, consists of a number without a
+leading @samp{+} or @samp{-}, @samp{+} is assumed.
+
+If the login name is invalid, or the tilde expansion fails, the word is
+left unchanged.
+
+Each variable assignment is checked for unquoted tilde-prefixes immediately
+following a @samp{:} or the first @samp{=}.
+In these cases, tilde expansion is also performed.
+Consequently, one may use file names with tildes in assignments to
+@env{PATH}, @env{MAILPATH}, and @env{CDPATH},
+and the shell assigns the expanded value.
+
+The following table shows how Bash treats unquoted tilde-prefixes:
+
+@table @code
+@item ~
+The value of @code{$HOME}
+@item ~/foo
+@file{$HOME/foo}
+
+@item ~fred/foo
+The subdirectory @code{foo} of the home directory of the user
+@code{fred}
+
+@item ~+/foo
+@file{$PWD/foo}
+
+@item ~-/foo
+@file{$@{OLDPWD-'~-'@}/foo}
+
+@item ~@var{N}
+The string that would be displayed by @samp{dirs +@var{N}}
+
+@item ~+@var{N}
+The string that would be displayed by @samp{dirs +@var{N}}
+
+@item ~-@var{N}
+The string that would be displayed by @samp{dirs -@var{N}}
+
+@end table
+
+@node Shell Parameter Expansion
+@subsection Shell Parameter Expansion
+@cindex parameter expansion
+@cindex expansion, parameter
+
+The @samp{$} character introduces parameter expansion,
+command substitution, or arithmetic expansion. The parameter name
+or symbol to be expanded may be enclosed in braces, which
+are optional but serve to protect the variable to be expanded from
+characters immediately following it which could be
+interpreted as part of the name.
+
+When braces are used, the matching ending brace is the first @samp{@}}
+not escaped by a backslash or within a quoted string, and not within an
+embedded arithmetic expansion, command substitution, or parameter
+expansion.
+
+The basic form of parameter expansion is $@{@var{parameter}@}.
+The value of @var{parameter} is substituted. The braces are required
+when @var{parameter}
+is a positional parameter with more than one digit,
+or when @var{parameter}
+is followed by a character that is not to be
+interpreted as part of its name.
+
+If the first character of @var{parameter} is an exclamation point (!),
+a level of variable indirection is introduced.
+Bash uses the value of the variable formed from the rest of
+@var{parameter} as the name of the variable; this variable is then
+expanded and that value is used in the rest of the substitution, rather
+than the value of @var{parameter} itself.
+This is known as @code{indirect expansion}.
+The exceptions to this are the expansions of $@{!@var{prefix*}@}
+and $@{!@var{name}[@@]@}
+described below.
+The exclamation point must immediately follow the left brace in order to
+introduce indirection.
+
+In each of the cases below, @var{word} is subject to tilde expansion,
+parameter expansion, command substitution, and arithmetic expansion.
+
+When not performing substring expansion, using the form described
+below, Bash tests for a parameter that is unset or null.
+Omitting the colon results in a test only for a parameter that is unset.
+Put another way, if the colon is included,
+the operator tests for both @var{parameter}'s existence and that its value
+is not null; if the colon is omitted, the operator tests only for existence.
+
+@table @code
+
+@item $@{@var{parameter}:@minus{}@var{word}@}
+If @var{parameter} is unset or null, the expansion of
+@var{word} is substituted. Otherwise, the value of
+@var{parameter} is substituted.
+
+@item $@{@var{parameter}:=@var{word}@}
+If @var{parameter}
+is unset or null, the expansion of @var{word}
+is assigned to @var{parameter}.
+The value of @var{parameter} is then substituted.
+Positional parameters and special parameters may not be assigned to
+in this way.
+
+@item $@{@var{parameter}:?@var{word}@}
+If @var{parameter}
+is null or unset, the expansion of @var{word} (or a message
+to that effect if @var{word}
+is not present) is written to the standard error and the shell, if it
+is not interactive, exits. Otherwise, the value of @var{parameter} is
+substituted.
+
+@item $@{@var{parameter}:+@var{word}@}
+If @var{parameter}
+is null or unset, nothing is substituted, otherwise the expansion of
+@var{word} is substituted.
+
+@item $@{@var{parameter}:@var{offset}@}
+@itemx $@{@var{parameter}:@var{offset}:@var{length}@}
+Expands to up to @var{length} characters of @var{parameter}
+starting at the character specified by @var{offset}.
+If @var{length} is omitted, expands to the substring of
+@var{parameter} starting at the character specified by @var{offset}.
+@var{length} and @var{offset} are arithmetic expressions
+(@pxref{Shell Arithmetic}).
+This is referred to as Substring Expansion.
+
+@var{length} must evaluate to a number greater than or equal to zero.
+If @var{offset} evaluates to a number less than zero, the value
+is used as an offset from the end of the value of @var{parameter}.
+If @var{parameter} is @samp{@@}, the result is @var{length} positional
+parameters beginning at @var{offset}.
+If @var{parameter} is an indexed array name subscripted
+by @samp{@@} or @samp{*}, the result is the @var{length}
+members of the array beginning with @code{$@{@var{parameter}[@var{offset}]@}}.
+A negative @var{offset} is taken relative to one greater than the maximum
+index of the specified array.
+Substring expansion applied to an associative array produces undefined
+results.
+
+Note that a negative offset must be separated from the colon by at least
+one space to avoid being confused with the @samp{:-} expansion.
+Substring indexing is zero-based unless the positional parameters
+are used, in which case the indexing starts at 1 by default.
+If @var{offset} is 0, and the positional parameters are used, @code{$@@} is
+prefixed to the list.
+
+@item $@{!@var{prefix}*@}
+@itemx $@{!@var{prefix}@@@}
+Expands to the names of variables whose names begin with @var{prefix},
+separated by the first character of the @env{IFS} special variable.
+When @samp{@@} is used and the expansion appears within double quotes, each
+variable name expands to a separate word.
+
+@item $@{!@var{name}[@@]@}
+@itemx $@{!@var{name}[*]@}
+If @var{name} is an array variable, expands to the list of array indices
+(keys) assigned in @var{name}.
+If @var{name} is not an array, expands to 0 if @var{name} is set and null
+otherwise.
+When @samp{@@} is used and the expansion appears within double quotes, each
+key expands to a separate word.
+
+@item $@{#@var{parameter}@}
+The length in characters of the expanded value of @var{parameter} is
+substituted.
+If @var{parameter} is @samp{*} or @samp{@@}, the value substituted
+is the number of positional parameters.
+If @var{parameter} is an array name subscripted by @samp{*} or @samp{@@},
+the value substituted is the number of elements in the array.
+
+@item $@{@var{parameter}#@var{word}@}
+@itemx $@{@var{parameter}##@var{word}@}
+The @var{word}
+is expanded to produce a pattern just as in filename
+expansion (@pxref{Filename Expansion}). If the pattern matches
+the beginning of the expanded value of @var{parameter},
+then the result of the expansion is the expanded value of @var{parameter}
+with the shortest matching pattern (the @samp{#} case) or the
+longest matching pattern (the @samp{##} case) deleted.
+If @var{parameter} is @samp{@@} or @samp{*},
+the pattern removal operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If @var{parameter} is an array variable subscripted with
+@samp{@@} or @samp{*},
+the pattern removal operation is applied to each member of the
+array in turn, and the expansion is the resultant list.
+
+@item $@{@var{parameter}%@var{word}@}
+@itemx $@{@var{parameter}%%@var{word}@}
+The @var{word} is expanded to produce a pattern just as in
+filename expansion.
+If the pattern matches a trailing portion of the expanded value of
+@var{parameter}, then the result of the expansion is the value of
+@var{parameter} with the shortest matching pattern (the @samp{%} case)
+or the longest matching pattern (the @samp{%%} case) deleted.
+If @var{parameter} is @samp{@@} or @samp{*},
+the pattern removal operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If @var{parameter}
+is an array variable subscripted with @samp{@@} or @samp{*},
+the pattern removal operation is applied to each member of the
+array in turn, and the expansion is the resultant list.
+
+@item $@{@var{parameter}/@var{pattern}/@var{string}@}
+
+The @var{pattern} is expanded to produce a pattern just as in
+filename expansion.
+@var{Parameter} is expanded and the longest match of @var{pattern}
+against its value is replaced with @var{string}.
+If @var{pattern} begins with @samp{/}, all matches of @var{pattern} are
+replaced with @var{string}. Normally only the first match is replaced.
+If @var{pattern} begins with @samp{#}, it must match at the beginning
+of the expanded value of @var{parameter}.
+If @var{pattern} begins with @samp{%}, it must match at the end
+of the expanded value of @var{parameter}.
+If @var{string} is null, matches of @var{pattern} are deleted
+and the @code{/} following @var{pattern} may be omitted.
+If @var{parameter} is @samp{@@} or @samp{*},
+the substitution operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If @var{parameter}
+is an array variable subscripted with @samp{@@} or @samp{*},
+the substitution operation is applied to each member of the
+array in turn, and the expansion is the resultant list.
+
+@item $@{@var{parameter}^@var{pattern}@}
+@itemx $@{@var{parameter}^^@var{pattern}@}
+@itemx $@{@var{parameter},@var{pattern}@}
+@itemx $@{@var{parameter},,@var{pattern}@}
+This expansion modifies the case of alphabetic characters in @var{parameter}.
+The @var{pattern} is expanded to produce a pattern just as in
+filename expansion.
+The @samp{^} operator converts lowercase letters matching @var{pattern}
+to uppercase; the @samp{,} operator converts matching uppercase letters
+to lowercase.
+The @samp{^^} and @samp{,,} expansions convert each matched character in the
+expanded value; the @samp{^} and @samp{,} expansions match and convert only
+the first character in the expanded value.
+If @var{pattern} is omitted, it is treated like a @samp{?}, which matches
+every character.
+If @var{parameter} is @samp{@@} or @samp{*},
+the case modification operation is applied to each positional
+parameter in turn, and the expansion is the resultant list.
+If @var{parameter}
+is an array variable subscripted with @samp{@@} or @samp{*},
+the case modification operation is applied to each member of the
+array in turn, and the expansion is the resultant list.
+
+@end table
+
+@node Command Substitution
+@subsection Command Substitution
+@cindex command substitution
+
+Command substitution allows the output of a command to replace
+the command itself.
+Command substitution occurs when a command is enclosed as follows:
+@example
+$(@var{command})
+@end example
+@noindent
+or
+@example
+`@var{command}`
+@end example
+
+@noindent
+Bash performs the expansion by executing @var{command} and
+replacing the command substitution with the standard output of the
+command, with any trailing newlines deleted.
+Embedded newlines are not deleted, but they may be removed during
+word splitting.
+The command substitution @code{$(cat @var{file})} can be
+replaced by the equivalent but faster @code{$(< @var{file})}.
+
+When the old-style backquote form of substitution is used,
+backslash retains its literal meaning except when followed by
+@samp{$}, @samp{`}, or @samp{\}.
+The first backquote not preceded by a backslash terminates the
+command substitution.
+When using the @code{$(@var{command})} form, all characters between
+the parentheses make up the command; none are treated specially.
+
+Command substitutions may be nested. To nest when using the backquoted
+form, escape the inner backquotes with backslashes.
+
+If the substitution appears within double quotes, word splitting and
+filename expansion are not performed on the results.
+
+@node Arithmetic Expansion
+@subsection Arithmetic Expansion
+@cindex expansion, arithmetic
+@cindex arithmetic expansion
+
+Arithmetic expansion allows the evaluation of an arithmetic expression
+and the substitution of the result. The format for arithmetic expansion is:
+
+@example
+$(( @var{expression} ))
+@end example
+
+The expression is treated as if it were within double quotes, but
+a double quote inside the parentheses is not treated specially.
+All tokens in the expression undergo parameter expansion, command
+substitution, and quote removal.
+Arithmetic expansions may be nested.
+
+The evaluation is performed according to the rules listed below
+(@pxref{Shell Arithmetic}).
+If the expression is invalid, Bash prints a message indicating
+failure to the standard error and no substitution occurs.
+
+@node Process Substitution
+@subsection Process Substitution
+@cindex process substitution
+
+Process substitution is supported on systems that support named
+pipes (@sc{fifo}s) or the @file{/dev/fd} method of naming open files.
+It takes the form of
+@example
+<(@var{list})
+@end example
+@noindent
+or
+@example
+>(@var{list})
+@end example
+@noindent
+The process @var{list} is run with its input or output connected to a
+@sc{fifo} or some file in @file{/dev/fd}. The name of this file is
+passed as an argument to the current command as the result of the
+expansion. If the @code{>(@var{list})} form is used, writing to
+the file will provide input for @var{list}. If the
+@code{<(@var{list})} form is used, the file passed as an
+argument should be read to obtain the output of @var{list}.
+Note that no space may appear between the @code{<} or @code{>}
+and the left parenthesis, otherwise the construct would be interpreted
+as a redirection.
+
+When available, process substitution is performed simultaneously with
+parameter and variable expansion, command substitution, and arithmetic
+expansion.
+
+@node Word Splitting
+@subsection Word Splitting
+@cindex word splitting
+
+The shell scans the results of parameter expansion, command substitution,
+and arithmetic expansion that did not occur within double quotes for
+word splitting.
+
+The shell treats each character of @env{$IFS} as a delimiter, and splits
+the results of the other expansions into words on these characters.
+If @env{IFS} is unset, or its value is exactly @code{<space><tab><newline>},
+the default, then sequences of
+@code{ <space>}, @code{<tab>}, and @code{<newline>}
+at the beginning and end of the results of the previous
+expansions are ignored, and any sequence of @env{IFS}
+characters not at the beginning or end serves to delimit words.
+If @env{IFS} has a value other than the default, then sequences of
+the whitespace characters @code{space} and @code{tab}
+are ignored at the beginning and end of the
+word, as long as the whitespace character is in the
+value of @env{IFS} (an @env{IFS} whitespace character).
+Any character in @env{IFS} that is not @env{IFS}
+whitespace, along with any adjacent @env{IFS}
+whitespace characters, delimits a field. A sequence of @env{IFS}
+whitespace characters is also treated as a delimiter.
+If the value of @env{IFS} is null, no word splitting occurs.
+
+Explicit null arguments (@code{""} or @code{''}) are retained.
+Unquoted implicit null arguments, resulting from the expansion of
+parameters that have no values, are removed.
+If a parameter with no value is expanded within double quotes, a
+null argument results and is retained.
+
+Note that if no expansion occurs, no splitting
+is performed.
+
+@node Filename Expansion
+@subsection Filename Expansion
+@menu
+* Pattern Matching:: How the shell matches patterns.
+@end menu
+@cindex expansion, filename
+@cindex expansion, pathname
+@cindex filename expansion
+@cindex pathname expansion
+
+After word splitting, unless the @option{-f} option has been set
+(@pxref{The Set Builtin}), Bash scans each word for the characters
+@samp{*}, @samp{?}, and @samp{[}.
+If one of these characters appears, then the word is
+regarded as a @var{pattern},
+and replaced with an alphabetically sorted list of
+file names matching the pattern. If no matching file names are found,
+and the shell option @code{nullglob} is disabled, the word is left
+unchanged.
+If the @code{nullglob} option is set, and no matches are found, the word
+is removed.
+If the @code{failglob} shell option is set, and no matches are found,
+an error message is printed and the command is not executed.
+If the shell option @code{nocaseglob} is enabled, the match is performed
+without regard to the case of alphabetic characters.
+
+When a pattern is used for filename expansion, the character @samp{.}
+at the start of a filename or immediately following a slash
+must be matched explicitly, unless the shell option @code{dotglob} is set.
+When matching a file name, the slash character must always be
+matched explicitly.
+In other cases, the @samp{.} character is not treated specially.
+
+See the description of @code{shopt} in @ref{The Shopt Builtin},
+for a description of the @code{nocaseglob}, @code{nullglob},
+@code{failglob}, and @code{dotglob} options.
+
+The @env{GLOBIGNORE}
+shell variable may be used to restrict the set of filenames matching a
+pattern. If @env{GLOBIGNORE}
+is set, each matching filename that also matches one of the patterns in
+@env{GLOBIGNORE} is removed from the list of matches. The filenames
+@file{.} and @file{..}
+are always ignored when @env{GLOBIGNORE}
+is set and not null.
+However, setting @env{GLOBIGNORE} to a non-null value has the effect of
+enabling the @code{dotglob}
+shell option, so all other filenames beginning with a
+@samp{.} will match.
+To get the old behavior of ignoring filenames beginning with a
+@samp{.}, make @samp{.*} one of the patterns in @env{GLOBIGNORE}.
+The @code{dotglob} option is disabled when @env{GLOBIGNORE}
+is unset.
+
+@node Pattern Matching
+@subsubsection Pattern Matching
+@cindex pattern matching
+@cindex matching, pattern
+
+Any character that appears in a pattern, other than the special pattern
+characters described below, matches itself.
+The @sc{nul} character may not occur in a pattern.
+A backslash escapes the following character; the
+escaping backslash is discarded when matching.
+The special pattern characters must be quoted if they are to be matched
+literally.
+
+The special pattern characters have the following meanings:
+@table @code
+@item *
+Matches any string, including the null string.
+When the @code{globstar} shell option is enabled, and @samp{*} is used in
+a filename expansion context, two adjacent @samp{*}s used as a single
+pattern will match all files and zero or more directories and
+subdirectories.
+If followed by a @samp{/}, two adjacent @samp{*}s will match only
+directories and subdirectories.
+@item ?
+Matches any single character.
+@item [@dots{}]
+Matches any one of the enclosed characters. A pair of characters
+separated by a hyphen denotes a @var{range expression};
+any character that sorts between those two characters, inclusive,
+using the current locale's collating sequence and character set,
+is matched. If the first character following the
+@samp{[} is a @samp{!} or a @samp{^}
+then any character not enclosed is matched. A @samp{@minus{}}
+may be matched by including it as the first or last character
+in the set. A @samp{]} may be matched by including it as the first
+character in the set.
+The sorting order of characters in range expressions is determined by
+the current locale and the value of the @env{LC_COLLATE} shell variable,
+if set.
+
+For example, in the default C locale, @samp{[a-dx-z]} is equivalent to
+@samp{[abcdxyz]}. Many locales sort characters in dictionary order, and in
+these locales @samp{[a-dx-z]} is typically not equivalent to @samp{[abcdxyz]};
+it might be equivalent to @samp{[aBbCcDdxXyYz]}, for example. To obtain
+the traditional interpretation of ranges in bracket expressions, you can
+force the use of the C locale by setting the @env{LC_COLLATE} or
+@env{LC_ALL} environment variable to the value @samp{C}.
+
+Within @samp{[} and @samp{]}, @var{character classes} can be specified
+using the syntax
+@code{[:}@var{class}@code{:]}, where @var{class} is one of the
+following classes defined in the @sc{posix} standard:
+@example
+alnum alpha ascii blank cntrl digit graph lower
+print punct space upper word xdigit
+@end example
+@noindent
+A character class matches any character belonging to that class.
+The @code{word} character class matches letters, digits, and the character
+@samp{_}.
+
+Within @samp{[} and @samp{]}, an @var{equivalence class} can be
+specified using the syntax @code{[=}@var{c}@code{=]}, which
+matches all characters with the same collation weight (as defined
+by the current locale) as the character @var{c}.
+
+Within @samp{[} and @samp{]}, the syntax @code{[.}@var{symbol}@code{.]}
+matches the collating symbol @var{symbol}.
+@end table
+
+If the @code{extglob} shell option is enabled using the @code{shopt}
+builtin, several extended pattern matching operators are recognized.
+In the following description, a @var{pattern-list} is a list of one
+or more patterns separated by a @samp{|}.
+Composite patterns may be formed using one or more of the following
+sub-patterns:
+
+@table @code
+@item ?(@var{pattern-list})
+Matches zero or one occurrence of the given patterns.
+
+@item *(@var{pattern-list})
+Matches zero or more occurrences of the given patterns.
+
+@item +(@var{pattern-list})
+Matches one or more occurrences of the given patterns.
+
+@item @@(@var{pattern-list})
+Matches one of the given patterns.
+
+@item !(@var{pattern-list})
+Matches anything except one of the given patterns.
+@end table
+
+@node Quote Removal
+@subsection Quote Removal
+
+After the preceding expansions, all unquoted occurrences of the
+characters @samp{\}, @samp{'}, and @samp{"} that did not
+result from one of the above expansions are removed.
+
+@node Redirections
+@section Redirections
+@cindex redirection
+
+Before a command is executed, its input and output
+may be @var{redirected}
+using a special notation interpreted by the shell.
+Redirection may also be used to open and close files for the
+current shell execution environment. The following redirection
+operators may precede or appear anywhere within a
+simple command or may follow a command.
+Redirections are processed in the order they appear, from
+left to right.
+
+Each redirection that may be preceded by a file descriptor number
+may instead be preceded by a word of the form @{@var{varname}@}.
+In this case, for each redirection operator except
+>&- and <&-, the shell will allocate a file descriptor greater
+than 10 and assign it to @{@var{varname}@}. If >&- or <&- is preceded
+by @{@var{varname}@}, the value of @var{varname} defines the file
+descriptor to close.
+
+In the following descriptions, if the file descriptor number is
+omitted, and the first character of the redirection operator is
+@samp{<}, the redirection refers to the standard input (file
+descriptor 0). If the first character of the redirection operator
+is @samp{>}, the redirection refers to the standard output (file
+descriptor 1).
+
+The word following the redirection operator in the following
+descriptions, unless otherwise noted, is subjected to brace expansion,
+tilde expansion, parameter expansion, command substitution, arithmetic
+expansion, quote removal, filename expansion, and word splitting.
+If it expands to more than one word, Bash reports an error.
+
+Note that the order of redirections is significant. For example,
+the command
+@example
+ls > @var{dirlist} 2>&1
+@end example
+@noindent
+directs both standard output (file descriptor 1) and standard error
+(file descriptor 2) to the file @var{dirlist}, while the command
+@example
+ls 2>&1 > @var{dirlist}
+@end example
+@noindent
+directs only the standard output to file @var{dirlist},
+because the standard error was made a copy of the standard output
+before the standard output was redirected to @var{dirlist}.
+
+Bash handles several filenames specially when they are used in
+redirections, as described in the following table:
+
+@table @code
+@item /dev/fd/@var{fd}
+If @var{fd} is a valid integer, file descriptor @var{fd} is duplicated.
+
+@item /dev/stdin
+File descriptor 0 is duplicated.
+
+@item /dev/stdout
+File descriptor 1 is duplicated.
+
+@item /dev/stderr
+File descriptor 2 is duplicated.
+
+@item /dev/tcp/@var{host}/@var{port}
+If @var{host} is a valid hostname or Internet address, and @var{port}
+is an integer port number or service name, Bash attempts to open a TCP
+connection to the corresponding socket.
+
+@item /dev/udp/@var{host}/@var{port}
+If @var{host} is a valid hostname or Internet address, and @var{port}
+is an integer port number or service name, Bash attempts to open a UDP
+connection to the corresponding socket.
+
+@end table
+
+A failure to open or create a file causes the redirection to fail.
+
+Redirections using file descriptors greater than 9 should be used with
+care, as they may conflict with file descriptors the shell uses
+internally.
+
+@subsection Redirecting Input
+Redirection of input causes the file whose name results from
+the expansion of @var{word}
+to be opened for reading on file descriptor @code{n},
+or the standard input (file descriptor 0) if @code{n}
+is not specified.
+
+The general format for redirecting input is:
+@example
+[@var{n}]<@var{word}
+@end example
+
+@subsection Redirecting Output
+Redirection of output causes the file whose name results from
+the expansion of @var{word}
+to be opened for writing on file descriptor @var{n},
+or the standard output (file descriptor 1) if @var{n}
+is not specified. If the file does not exist it is created;
+if it does exist it is truncated to zero size.
+
+The general format for redirecting output is:
+@example
+[@var{n}]>[|]@var{word}
+@end example
+
+If the redirection operator is @samp{>}, and the @code{noclobber}
+option to the @code{set} builtin has been enabled, the redirection
+will fail if the file whose name results from the expansion of
+@var{word} exists and is a regular file.
+If the redirection operator is @samp{>|}, or the redirection operator is
+@samp{>} and the @code{noclobber} option is not enabled, the redirection
+is attempted even if the file named by @var{word} exists.
+
+@subsection Appending Redirected Output
+Redirection of output in this fashion
+causes the file whose name results from
+the expansion of @var{word}
+to be opened for appending on file descriptor @var{n},
+or the standard output (file descriptor 1) if @var{n}
+is not specified. If the file does not exist it is created.
+
+The general format for appending output is:
+@example
+[@var{n}]>>@var{word}
+@end example
+
+@subsection Redirecting Standard Output and Standard Error
+This construct allows both the
+standard output (file descriptor 1) and
+the standard error output (file descriptor 2)
+to be redirected to the file whose name is the
+expansion of @var{word}.
+
+There are two formats for redirecting standard output and
+standard error:
+@example
+&>@var{word}
+@end example
+@noindent
+and
+@example
+>&@var{word}
+@end example
+@noindent
+Of the two forms, the first is preferred.
+This is semantically equivalent to
+@example
+>@var{word} 2>&1
+@end example
+
+@subsection Appending Standard Output and Standard Error
+This construct allows both the
+standard output (file descriptor 1) and
+the standard error output (file descriptor 2)
+to be appended to the file whose name is the
+expansion of @var{word}.
+
+The format for appending standard output and standard error is:
+@example
+&>>@var{word}
+@end example
+@noindent
+This is semantically equivalent to
+@example
+>>@var{word} 2>&1
+@end example
+
+@subsection Here Documents
+This type of redirection instructs the shell to read input from the
+current source until a line containing only @var{word}
+(with no trailing blanks) is seen. All of
+the lines read up to that point are then used as the standard
+input for a command.
+
+The format of here-documents is:
+@example
+<<[@minus{}]@var{word}
+ @var{here-document}
+@var{delimiter}
+@end example
+
+No parameter expansion, command substitution, arithmetic expansion,
+or filename expansion is performed on
+@var{word}. If any characters in @var{word} are quoted, the
+@var{delimiter} is the result of quote removal on @var{word},
+and the lines in the here-document are not expanded.
+If @var{word} is unquoted,
+all lines of the here-document are subjected to parameter expansion,
+command substitution, and arithmetic expansion. In the latter
+case, the character sequence @code{\newline} is ignored, and @samp{\}
+must be used to quote the characters
+@samp{\}, @samp{$}, and @samp{`}.
+
+If the redirection operator is @samp{<<-},
+then all leading tab characters are stripped from input lines and the
+line containing @var{delimiter}.
+This allows here-documents within shell scripts to be indented in a
+natural fashion.
+
+@subsection Here Strings
+A variant of here documents, the format is:
+@example
+<<< @var{word}
+@end example
+
+The @var{word} is expanded and supplied to the command on its standard
+input.
+
+@subsection Duplicating File Descriptors
+The redirection operator
+@example
+[@var{n}]<&@var{word}
+@end example
+@noindent
+is used to duplicate input file descriptors.
+If @var{word}
+expands to one or more digits, the file descriptor denoted by @var{n}
+is made to be a copy of that file descriptor.
+If the digits in @var{word} do not specify a file descriptor open for
+input, a redirection error occurs.
+If @var{word}
+evaluates to @samp{-}, file descriptor @var{n} is closed. If
+@var{n} is not specified, the standard input (file descriptor 0) is used.
+
+The operator
+@example
+[@var{n}]>&@var{word}
+@end example
+@noindent
+is used similarly to duplicate output file descriptors. If
+@var{n} is not specified, the standard output (file descriptor 1) is used.
+If the digits in @var{word} do not specify a file descriptor open for
+output, a redirection error occurs.
+As a special case, if @var{n} is omitted, and @var{word} does not
+expand to one or more digits, the standard output and standard
+error are redirected as described previously.
+
+@subsection Moving File Descriptors
+The redirection operator
+@example
+[@var{n}]<&@var{digit}-
+@end example
+@noindent
+moves the file descriptor @var{digit} to file descriptor @var{n},
+or the standard input (file descriptor 0) if @var{n} is not specified.
+@var{digit} is closed after being duplicated to @var{n}.
+
+Similarly, the redirection operator
+@example
+[@var{n}]>&@var{digit}-
+@end example
+@noindent
+moves the file descriptor @var{digit} to file descriptor @var{n},
+or the standard output (file descriptor 1) if @var{n} is not specified.
+
+@subsection Opening File Descriptors for Reading and Writing
+The redirection operator
+@example
+[@var{n}]<>@var{word}
+@end example
+@noindent
+causes the file whose name is the expansion of @var{word}
+to be opened for both reading and writing on file descriptor
+@var{n}, or on file descriptor 0 if @var{n}
+is not specified. If the file does not exist, it is created.
+
+@node Executing Commands
+@section Executing Commands
+
+@menu
+* Simple Command Expansion:: How Bash expands simple commands before
+ executing them.
+* Command Search and Execution:: How Bash finds commands and runs them.
+* Command Execution Environment:: The environment in which Bash
+ executes commands that are not
+ shell builtins.
+* Environment:: The environment given to a command.
+* Exit Status:: The status returned by commands and how Bash
+ interprets it.
+* Signals:: What happens when Bash or a command it runs
+ receives a signal.
+@end menu
+
+@node Simple Command Expansion
+@subsection Simple Command Expansion
+@cindex command expansion
+
+When a simple command is executed, the shell performs the following
+expansions, assignments, and redirections, from left to right.
+
+@enumerate
+@item
+The words that the parser has marked as variable assignments (those
+preceding the command name) and redirections are saved for later
+processing.
+
+@item
+The words that are not variable assignments or redirections are
+expanded (@pxref{Shell Expansions}).
+If any words remain after expansion, the first word
+is taken to be the name of the command and the remaining words are
+the arguments.
+
+@item
+Redirections are performed as described above (@pxref{Redirections}).
+
+@item
+The text after the @samp{=} in each variable assignment undergoes tilde
+expansion, parameter expansion, command substitution, arithmetic expansion,
+and quote removal before being assigned to the variable.
+@end enumerate
+
+If no command name results, the variable assignments affect the current
+shell environment. Otherwise, the variables are added to the environment
+of the executed command and do not affect the current shell environment.
+If any of the assignments attempts to assign a value to a readonly variable,
+an error occurs, and the command exits with a non-zero status.
+
+If no command name results, redirections are performed, but do not
+affect the current shell environment. A redirection error causes the
+command to exit with a non-zero status.
+
+If there is a command name left after expansion, execution proceeds as
+described below. Otherwise, the command exits. If one of the expansions
+contained a command substitution, the exit status of the command is
+the exit status of the last command substitution performed. If there
+were no command substitutions, the command exits with a status of zero.
+
+@node Command Search and Execution
+@subsection Command Search and Execution
+@cindex command execution
+@cindex command search
+
+After a command has been split into words, if it results in a
+simple command and an optional list of arguments, the following
+actions are taken.
+
+@enumerate
+@item
+If the command name contains no slashes, the shell attempts to
+locate it. If there exists a shell function by that name, that
+function is invoked as described in @ref{Shell Functions}.
+
+@item
+If the name does not match a function, the shell searches for
+it in the list of shell builtins. If a match is found, that
+builtin is invoked.
+
+@item
+If the name is neither a shell function nor a builtin,
+and contains no slashes, Bash searches each element of
+@env{$PATH} for a directory containing an executable file
+by that name. Bash uses a hash table to remember the full
+pathnames of executable files to avoid multiple @env{PATH} searches
+(see the description of @code{hash} in @ref{Bourne Shell Builtins}).
+A full search of the directories in @env{$PATH}
+is performed only if the command is not found in the hash table.
+If the search is unsuccessful, the shell searches for a defined shell
+function named @code{command_not_found_handle}.
+If that function exists, it is invoked with the original command and
+the original command's arguments as its arguments, and the function's
+exit status becomes the exit status of the shell.
+If that function is not defined, the shell prints an error
+message and returns an exit status of 127.
+
+@item
+If the search is successful, or if the command name contains
+one or more slashes, the shell executes the named program in
+a separate execution environment.
+Argument 0 is set to the name given, and the remaining arguments
+to the command are set to the arguments supplied, if any.
+
+@item
+If this execution fails because the file is not in executable
+format, and the file is not a directory, it is assumed to be a
+@var{shell script} and the shell executes it as described in
+@ref{Shell Scripts}.
+
+@item
+If the command was not begun asynchronously, the shell waits for
+the command to complete and collects its exit status.
+
+@end enumerate
+
+@node Command Execution Environment
+@subsection Command Execution Environment
+@cindex execution environment
+
+The shell has an @var{execution environment}, which consists of the
+following:
+
+@itemize @bullet
+@item
+open files inherited by the shell at invocation, as modified by
+redirections supplied to the @code{exec} builtin
+
+@item
+the current working directory as set by @code{cd}, @code{pushd}, or
+@code{popd}, or inherited by the shell at invocation
+
+@item
+the file creation mode mask as set by @code{umask} or inherited from
+the shell's parent
+
+@item
+current traps set by @code{trap}
+
+@item
+shell parameters that are set by variable assignment or with @code{set}
+or inherited from the shell's parent in the environment
+
+@item
+shell functions defined during execution or inherited from the shell's
+parent in the environment
+
+@item
+options enabled at invocation (either by default or with command-line
+arguments) or by @code{set}
+
+@item
+options enabled by @code{shopt} (@pxref{The Shopt Builtin})
+
+@item
+shell aliases defined with @code{alias} (@pxref{Aliases})
+
+@item
+various process @sc{id}s, including those of background jobs
+(@pxref{Lists}), the value of @code{$$}, and the value of
+@env{$PPID}
+
+@end itemize
+
+When a simple command other than a builtin or shell function
+is to be executed, it
+is invoked in a separate execution environment that consists of
+the following. Unless otherwise noted, the values are inherited
+from the shell.
+
+@itemize @bullet
+@item
+the shell's open files, plus any modifications and additions specified
+by redirections to the command
+
+@item
+the current working directory
+
+@item
+the file creation mode mask
+
+@item
+shell variables and functions marked for export, along with variables
+exported for the command, passed in the environment (@pxref{Environment})
+
+@item
+traps caught by the shell are reset to the values inherited from the
+shell's parent, and traps ignored by the shell are ignored
+
+@end itemize
+
+A command invoked in this separate environment cannot affect the
+shell's execution environment.
+
+Command substitution, commands grouped with parentheses,
+and asynchronous commands are invoked in a
+subshell environment that is a duplicate of the shell environment,
+except that traps caught by the shell are reset to the values
+that the shell inherited from its parent at invocation. Builtin
+commands that are invoked as part of a pipeline are also executed
+in a subshell environment. Changes made to the subshell environment
+cannot affect the shell's execution environment.
+
+Subshells spawned to execute command substitutions inherit the value of
+the @option{-e} option from the parent shell. When not in @sc{posix} mode,
+Bash clears the @option{-e} option in such subshells.
+
+If a command is followed by a @samp{&} and job control is not active, the
+default standard input for the command is the empty file @file{/dev/null}.
+Otherwise, the invoked command inherits the file descriptors of the calling
+shell as modified by redirections.
+
+@node Environment
+@subsection Environment
+@cindex environment
+
+When a program is invoked it is given an array of strings
+called the @var{environment}.
+This is a list of name-value pairs, of the form @code{name=value}.
+
+Bash provides several ways to manipulate the environment.
+On invocation, the shell scans its own environment and
+creates a parameter for each name found, automatically marking
+it for @var{export}
+to child processes. Executed commands inherit the environment.
+The @code{export} and @samp{declare -x}
+commands allow parameters and functions to be added to and
+deleted from the environment. If the value of a parameter
+in the environment is modified, the new value becomes part
+of the environment, replacing the old. The environment
+inherited by any executed command consists of the shell's
+initial environment, whose values may be modified in the shell,
+less any pairs removed by the @code{unset} and @samp{export -n}
+commands, plus any additions via the @code{export} and
+@samp{declare -x} commands.
+
+The environment for any simple command
+or function may be augmented temporarily by prefixing it with
+parameter assignments, as described in @ref{Shell Parameters}.
+These assignment statements affect only the environment seen
+by that command.
+
+If the @option{-k} option is set (@pxref{The Set Builtin}), then all
+parameter assignments are placed in the environment for a command,
+not just those that precede the command name.
+
+When Bash invokes an external command, the variable @samp{$_}
+is set to the full path name of the command and passed to that
+command in its environment.
+
+@node Exit Status
+@subsection Exit Status
+@cindex exit status
+
+The exit status of an executed command is the value returned by the
+@var{waitpid} system call or equivalent function. Exit statuses
+fall between 0 and 255, though, as explained below, the shell may
+use values above 125 specially. Exit statuses from shell builtins and
+compound commands are also limited to this range. Under certain
+circumstances, the shell will use special values to indicate specific
+failure modes.
+
+For the shell's purposes, a command which exits with a
+zero exit status has succeeded.
+A non-zero exit status indicates failure.
+This seemingly counter-intuitive scheme is used so there
+is one well-defined way to indicate success and a variety of
+ways to indicate various failure modes.
+When a command terminates on a fatal signal whose number is @var{N},
+Bash uses the value 128+@var{N} as the exit status.
+
+If a command is not found, the child process created to
+execute it returns a status of 127. If a command is found
+but is not executable, the return status is 126.
+
+If a command fails because of an error during expansion or redirection,
+the exit status is greater than zero.
+
+The exit status is used by the Bash conditional commands
+(@pxref{Conditional Constructs}) and some of the list
+constructs (@pxref{Lists}).
+
+All of the Bash builtins return an exit status of zero if they succeed
+and a non-zero status on failure, so they may be used by the
+conditional and list constructs.
+All builtins return an exit status of 2 to indicate incorrect usage.
+
+@node Signals
+@subsection Signals
+@cindex signal handling
+
+When Bash is interactive, in the absence of any traps, it ignores
+@code{SIGTERM} (so that @samp{kill 0} does not kill an interactive shell),
+and @code{SIGINT}
+is caught and handled (so that the @code{wait} builtin is interruptible).
+When Bash receives a @code{SIGINT}, it breaks out of any executing loops.
+In all cases, Bash ignores @code{SIGQUIT}.
+If job control is in effect (@pxref{Job Control}), Bash
+ignores @code{SIGTTIN}, @code{SIGTTOU}, and @code{SIGTSTP}.
+
+Non-builtin commands started by Bash have signal handlers set to the
+values inherited by the shell from its parent.
+When job control is not in effect, asynchronous commands
+ignore @code{SIGINT} and @code{SIGQUIT} in addition to these inherited
+handlers.
+Commands run as a result of
+command substitution ignore the keyboard-generated job control signals
+@code{SIGTTIN}, @code{SIGTTOU}, and @code{SIGTSTP}.
+
+The shell exits by default upon receipt of a @code{SIGHUP}.
+Before exiting, an interactive shell resends the @code{SIGHUP} to
+all jobs, running or stopped.
+Stopped jobs are sent @code{SIGCONT} to ensure that they receive
+the @code{SIGHUP}.
+To prevent the shell from sending the @code{SIGHUP} signal to a
+particular job, it should be removed
+from the jobs table with the @code{disown}
+builtin (@pxref{Job Control Builtins}) or marked
+to not receive @code{SIGHUP} using @code{disown -h}.
+
+If the @code{huponexit} shell option has been set with @code{shopt}
+(@pxref{The Shopt Builtin}), Bash sends a @code{SIGHUP} to all jobs when
+an interactive login shell exits.
+
+If Bash is waiting for a command to complete and receives a signal
+for which a trap has been set, the trap will not be executed until
+the command completes.
+When Bash is waiting for an asynchronous
+command via the @code{wait} builtin, the reception of a signal for
+which a trap has been set will cause the @code{wait} builtin to return
+immediately with an exit status greater than 128, immediately after
+which the trap is executed.
+
+@node Shell Scripts
+@section Shell Scripts
+@cindex shell script
+
+A shell script is a text file containing shell commands. When such
+a file is used as the first non-option argument when invoking Bash,
+and neither the @option{-c} nor @option{-s} option is supplied
+(@pxref{Invoking Bash}),
+Bash reads and executes commands from the file, then exits. This
+mode of operation creates a non-interactive shell. The shell first
+searches for the file in the current directory, and looks in the
+directories in @env{$PATH} if not found there.
+
+When Bash runs
+a shell script, it sets the special parameter @code{0} to the name
+of the file, rather than the name of the shell, and the positional
+parameters are set to the remaining arguments, if any are given.
+If no additional arguments are supplied, the positional parameters
+are unset.
+
+A shell script may be made executable by using the @code{chmod} command
+to turn on the execute bit. When Bash finds such a file while
+searching the @env{$PATH} for a command, it spawns a subshell to
+execute it. In other words, executing
+@example
+filename @var{arguments}
+@end example
+@noindent
+is equivalent to executing
+@example
+bash filename @var{arguments}
+@end example
+
+@noindent
+if @code{filename} is an executable shell script.
+This subshell reinitializes itself, so that the effect is as if a
+new shell had been invoked to interpret the script, with the
+exception that the locations of commands remembered by the parent
+(see the description of @code{hash} in @ref{Bourne Shell Builtins})
+are retained by the child.
+
+Most versions of Unix make this a part of the operating system's command
+execution mechanism. If the first line of a script begins with
+the two characters @samp{#!}, the remainder of the line specifies
+an interpreter for the program.
+Thus, you can specify Bash, @code{awk}, Perl, or some other
+interpreter and write the rest of the script file in that language.
+
+The arguments to the interpreter
+consist of a single optional argument following the interpreter
+name on the first line of the script file, followed by the name of
+the script file, followed by the rest of the arguments. Bash
+will perform this action on operating systems that do not handle it
+themselves. Note that some older versions of Unix limit the interpreter
+name and argument to a maximum of 32 characters.
+
+Bash scripts often begin with @code{#! /bin/bash} (assuming that
+Bash has been installed in @file{/bin}), since this ensures that
+Bash will be used to interpret the script, even if it is executed
+under another shell.
+
+@node Shell Builtin Commands
+@chapter Shell Builtin Commands
+
+@menu
+* Bourne Shell Builtins:: Builtin commands inherited from the Bourne
+ Shell.
+* Bash Builtins:: Table of builtins specific to Bash.
+* Modifying Shell Behavior:: Builtins to modify shell attributes and
+ optional behavior.
+* Special Builtins:: Builtin commands classified specially by
+ POSIX.
+@end menu
+
+Builtin commands are contained within the shell itself.
+When the name of a builtin command is used as the first word of
+a simple command (@pxref{Simple Commands}), the shell executes
+the command directly, without invoking another program.
+Builtin commands are necessary to implement functionality impossible
+or inconvenient to obtain with separate utilities.
+
+This section briefly describes the builtins which Bash inherits from
+the Bourne Shell, as well as the builtin commands which are unique
+to or have been extended in Bash.
+
+Several builtin commands are described in other chapters: builtin
+commands which provide the Bash interface to the job control
+facilities (@pxref{Job Control Builtins}), the directory stack
+(@pxref{Directory Stack Builtins}), the command history
+(@pxref{Bash History Builtins}), and the programmable completion
+facilities (@pxref{Programmable Completion Builtins}).
+
+Many of the builtins have been extended by @sc{posix} or Bash.
+
+Unless otherwise noted, each builtin command documented as accepting
+options preceded by @samp{-} accepts @samp{--}
+to signify the end of the options.
+The @code{:}, @code{true}, @code{false}, and @code{test}
+builtins do not accept options and do not treat @samp{--} specially.
+The @code{exit}, @code{logout}, @code{break}, @code{continue}, @code{let},
+and @code{shift} builtins accept and process arguments beginning
+with @samp{-} without requiring @samp{--}.
+Other builtins that accept arguments but are not specified as accepting
+options interpret arguments beginning with @samp{-} as invalid options and
+require @samp{--} to prevent this interpretation.
+
+@node Bourne Shell Builtins
+@section Bourne Shell Builtins
+
+The following shell builtin commands are inherited from the Bourne Shell.
+These commands are implemented as specified by the @sc{posix} standard.
+
+@table @code
+@item : @r{(a colon)}
+@btindex :
+@example
+: [@var{arguments}]
+@end example
+Do nothing beyond expanding @var{arguments} and performing redirections.
+The return status is zero.
+
+@item . @r{(a period)}
+@btindex .
+@example
+. @var{filename} [@var{arguments}]
+@end example
+Read and execute commands from the @var{filename} argument in the
+current shell context. If @var{filename} does not contain a slash,
+the @env{PATH} variable is used to find @var{filename}.
+When Bash is not in @sc{posix} mode, the current directory is searched
+if @var{filename} is not found in @env{$PATH}.
+If any @var{arguments} are supplied, they become the positional
+parameters when @var{filename} is executed. Otherwise the positional
+parameters are unchanged.
+The return status is the exit status of the last command executed, or
+zero if no commands are executed. If @var{filename} is not found, or
+cannot be read, the return status is non-zero.
+This builtin is equivalent to @code{source}.
+
+@item break
+@btindex break
+@example
+break [@var{n}]
+@end example
+Exit from a @code{for}, @code{while}, @code{until}, or @code{select} loop.
+If @var{n} is supplied, the @var{n}th enclosing loop is exited.
+@var{n} must be greater than or equal to 1.
+The return status is zero unless @var{n} is not greater than or equal to 1.
+
+@item cd
+@btindex cd
+@example
+cd [-L|-P] [@var{directory}]
+@end example
+Change the current working directory to @var{directory}.
+If @var{directory} is not given, the value of the @env{HOME} shell
+variable is used.
+If the shell variable @env{CDPATH} exists, it is used as a search path.
+If @var{directory} begins with a slash, @env{CDPATH} is not used.
+
+The @option{-P} option means to not follow symbolic links; symbolic
+links are followed by default or with the @option{-L} option.
+If @var{directory} is @samp{-}, it is equivalent to @env{$OLDPWD}.
+
+If a non-empty directory name from @env{CDPATH} is used, or if
+@samp{-} is the first argument, and the directory change is
+successful, the absolute pathname of the new working directory is
+written to the standard output.
+
+The return status is zero if the directory is successfully changed,
+non-zero otherwise.
+
+@item continue
+@btindex continue
+@example
+continue [@var{n}]
+@end example
+Resume the next iteration of an enclosing @code{for}, @code{while},
+@code{until}, or @code{select} loop.
+If @var{n} is supplied, the execution of the @var{n}th enclosing loop
+is resumed.
+@var{n} must be greater than or equal to 1.
+The return status is zero unless @var{n} is not greater than or equal to 1.
+
+@item eval
+@btindex eval
+@example
+eval [@var{arguments}]
+@end example
+The arguments are concatenated together into a single command, which is
+then read and executed, and its exit status returned as the exit status
+of @code{eval}.
+If there are no arguments or only empty arguments, the return status is
+zero.
+
+@item exec
+@btindex exec
+@example
+exec [-cl] [-a @var{name}] [@var{command} [@var{arguments}]]
+@end example
+If @var{command}
+is supplied, it replaces the shell without creating a new process.
+If the @option{-l} option is supplied, the shell places a dash at the
+beginning of the zeroth argument passed to @var{command}.
+This is what the @code{login} program does.
+The @option{-c} option causes @var{command} to be executed with an empty
+environment.
+If @option{-a} is supplied, the shell passes @var{name} as the zeroth
+argument to @var{command}.
+If no @var{command} is specified, redirections may be used to affect
+the current shell environment. If there are no redirection errors, the
+return status is zero; otherwise the return status is non-zero.
+
+@item exit
+@btindex exit
+@example
+exit [@var{n}]
+@end example
+Exit the shell, returning a status of @var{n} to the shell's parent.
+If @var{n} is omitted, the exit status is that of the last command executed.
+Any trap on @code{EXIT} is executed before the shell terminates.
+
+@item export
+@btindex export
+@example
+export [-fn] [-p] [@var{name}[=@var{value}]]
+@end example
+Mark each @var{name} to be passed to child processes
+in the environment. If the @option{-f} option is supplied, the @var{name}s
+refer to shell functions; otherwise the names refer to shell variables.
+The @option{-n} option means to no longer mark each @var{name} for export.
+If no @var{names} are supplied, or if the @option{-p} option is given, a
+list of exported names is displayed.
+The @option{-p} option displays output in a form that may be reused as input.
+If a variable name is followed by =@var{value}, the value of
+the variable is set to @var{value}.
+
+The return status is zero unless an invalid option is supplied, one of
+the names is not a valid shell variable name, or @option{-f} is supplied
+with a name that is not a shell function.
+
+@item getopts
+@btindex getopts
+@example
+getopts @var{optstring} @var{name} [@var{args}]
+@end example
+@code{getopts} is used by shell scripts to parse positional parameters.
+@var{optstring} contains the option characters to be recognized; if a
+character is followed by a colon, the option is expected to have an
+argument, which should be separated from it by white space.
+The colon (@samp{:}) and question mark (@samp{?}) may not be
+used as option characters.
+Each time it is invoked, @code{getopts}
+places the next option in the shell variable @var{name}, initializing
+@var{name} if it does not exist,
+and the index of the next argument to be processed into the
+variable @env{OPTIND}.
+@env{OPTIND} is initialized to 1 each time the shell or a shell script
+is invoked.
+When an option requires an argument,
+@code{getopts} places that argument into the variable @env{OPTARG}.
+The shell does not reset @env{OPTIND} automatically; it must be manually
+reset between multiple calls to @code{getopts} within the same shell
+invocation if a new set of parameters is to be used.
+
+When the end of options is encountered, @code{getopts} exits with a
+return value greater than zero.
+@env{OPTIND} is set to the index of the first non-option argument,
+and @code{name} is set to @samp{?}.
+
+@code{getopts}
+normally parses the positional parameters, but if more arguments are
+given in @var{args}, @code{getopts} parses those instead.
+
+@code{getopts} can report errors in two ways. If the first character of
+@var{optstring} is a colon, @var{silent}
+error reporting is used. In normal operation diagnostic messages
+are printed when invalid options or missing option arguments are
+encountered.
+If the variable @env{OPTERR}
+is set to 0, no error messages will be displayed, even if the first
+character of @code{optstring} is not a colon.
+
+If an invalid option is seen,
+@code{getopts} places @samp{?} into @var{name} and, if not silent,
+prints an error message and unsets @env{OPTARG}.
+If @code{getopts} is silent, the option character found is placed in
+@env{OPTARG} and no diagnostic message is printed.
+
+If a required argument is not found, and @code{getopts}
+is not silent, a question mark (@samp{?}) is placed in @var{name},
+@code{OPTARG} is unset, and a diagnostic message is printed.
+If @code{getopts} is silent, then a colon (@samp{:}) is placed in
+@var{name} and @env{OPTARG} is set to the option character found.
+
+@item hash
+@btindex hash
+@example
+hash [-r] [-p @var{filename}] [-dt] [@var{name}]
+@end example
+Remember the full pathnames of commands specified as @var{name} arguments,
+so they need not be searched for on subsequent invocations.
+The commands are found by searching through the directories listed in
+@env{$PATH}.
+The @option{-p} option inhibits the path search, and @var{filename} is
+used as the location of @var{name}.
+The @option{-r} option causes the shell to forget all remembered locations.
+The @option{-d} option causes the shell to forget the remembered location
+of each @var{name}.
+If the @option{-t} option is supplied, the full pathname to which each
+@var{name} corresponds is printed. If multiple @var{name} arguments are
+supplied with @option{-t} the @var{name} is printed before the hashed
+full pathname.
+The @option{-l} option causes output to be displayed in a format
+that may be reused as input.
+If no arguments are given, or if only @option{-l} is supplied,
+information about remembered commands is printed.
+The return status is zero unless a @var{name} is not found or an invalid
+option is supplied.
+
+@item pwd
+@btindex pwd
+@example
+pwd [-LP]
+@end example
+Print the absolute pathname of the current working directory.
+If the @option{-P} option is supplied, the pathname printed will not
+contain symbolic links.
+If the @option{-L} option is supplied, the pathname printed may contain
+symbolic links.
+The return status is zero unless an error is encountered while
+determining the name of the current directory or an invalid option
+is supplied.
+
+@item readonly
+@btindex readonly
+@example
+readonly [-aApf] [@var{name}[=@var{value}]] @dots{}
+@end example
+Mark each @var{name} as readonly.
+The values of these names may not be changed by subsequent assignment.
+If the @option{-f} option is supplied, each @var{name} refers to a shell
+function.
+The @option{-a} option means each @var{name} refers to an indexed
+array variable; the @option{-A} option means each @var{name} refers
+to an associative array variable.
+If no @var{name} arguments are given, or if the @option{-p}
+option is supplied, a list of all readonly names is printed.
+The @option{-p} option causes output to be displayed in a format that
+may be reused as input.
+If a variable name is followed by =@var{value}, the value of
+the variable is set to @var{value}.
+The return status is zero unless an invalid option is supplied, one of
+the @var{name} arguments is not a valid shell variable or function name,
+or the @option{-f} option is supplied with a name that is not a shell function.
+
+@item return
+@btindex return
+@example
+return [@var{n}]
+@end example
+Cause a shell function to exit with the return value @var{n}.
+If @var{n} is not supplied, the return value is the exit status of the
+last command executed in the function.
+This may also be used to terminate execution of a script being executed
+with the @code{.} (or @code{source}) builtin, returning either @var{n} or
+the exit status of the last command executed within the script as the exit
+status of the script.
+Any command associated with the @code{RETURN} trap is executed
+before execution resumes after the function or script.
+The return status is non-zero if @code{return} is used outside a function
+and not during the execution of a script by @code{.} or @code{source}.
+
+@item shift
+@btindex shift
+@example
+shift [@var{n}]
+@end example
+Shift the positional parameters to the left by @var{n}.
+The positional parameters from @var{n}+1 @dots{} @code{$#} are
+renamed to @code{$1} @dots{} @code{$#}-@var{n}.
+Parameters represented by the numbers @code{$#} to @code{$#}-@var{n}+1
+are unset.
+@var{n} must be a non-negative number less than or equal to @code{$#}.
+If @var{n} is zero or greater than @code{$#}, the positional parameters
+are not changed.
+If @var{n} is not supplied, it is assumed to be 1.
+The return status is zero unless @var{n} is greater than @code{$#} or
+less than zero, non-zero otherwise.
+
+@item test
+@itemx [
+@btindex test
+@btindex [
+Evaluate a conditional expression @var{expr}.
+Each operator and operand must be a separate argument.
+Expressions are composed of the primaries described below in
+@ref{Bash Conditional Expressions}.
+@code{test} does not accept any options, nor does it accept and ignore
+an argument of @option{--} as signifying the end of options.
+
+When the @code{[} form is used, the last argument to the command must
+be a @code{]}.
+
+Expressions may be combined using the following operators, listed in
+decreasing order of precedence.
+The evaluation depends on the number of arguments; see below.
+
+@table @code
+@item ! @var{expr}
+True if @var{expr} is false.
+
+@item ( @var{expr} )
+Returns the value of @var{expr}.
+This may be used to override the normal precedence of operators.
+
+@item @var{expr1} -a @var{expr2}
+True if both @var{expr1} and @var{expr2} are true.
+
+@item @var{expr1} -o @var{expr2}
+True if either @var{expr1} or @var{expr2} is true.
+@end table
+
+The @code{test} and @code{[} builtins evaluate conditional
+expressions using a set of rules based on the number of arguments.
+
+@table @asis
+@item 0 arguments
+The expression is false.
+
+@item 1 argument
+The expression is true if and only if the argument is not null.
+
+@item 2 arguments
+If the first argument is @samp{!}, the expression is true if and
+only if the second argument is null.
+If the first argument is one of the unary conditional operators
+(@pxref{Bash Conditional Expressions}), the expression
+is true if the unary test is true.
+If the first argument is not a valid unary operator, the expression is
+false.
+
+@item 3 arguments
+If the second argument is one of the binary conditional
+operators (@pxref{Bash Conditional Expressions}), the
+result of the expression is the result of the binary test using the
+first and third arguments as operands.
+The @samp{-a} and @samp{-o} operators are considered binary operators
+when there are three arguments.
+If the first argument is @samp{!}, the value is the negation of
+the two-argument test using the second and third arguments.
+If the first argument is exactly @samp{(} and the third argument is
+exactly @samp{)}, the result is the one-argument test of the second
+argument.
+Otherwise, the expression is false.
+
+@item 4 arguments
+If the first argument is @samp{!}, the result is the negation of
+the three-argument expression composed of the remaining arguments.
+Otherwise, the expression is parsed and evaluated according to
+precedence using the rules listed above.
+
+@item 5 or more arguments
+The expression is parsed and evaluated according to precedence
+using the rules listed above.
+@end table
+
+@item times
+@btindex times
+@example
+times
+@end example
+Print out the user and system times used by the shell and its children.
+The return status is zero.
+
+@item trap
+@btindex trap
+@example
+trap [-lp] [@var{arg}] [@var{sigspec} @dots{}]
+@end example
+The commands in @var{arg} are to be read and executed when the
+shell receives signal @var{sigspec}. If @var{arg} is absent (and
+there is a single @var{sigspec}) or
+equal to @samp{-}, each specified signal's disposition is reset
+to the value it had when the shell was started.
+If @var{arg} is the null string, then the signal specified by
+each @var{sigspec} is ignored by the shell and commands it invokes.
+If @var{arg} is not present and @option{-p} has been supplied,
+the shell displays the trap commands associated with each @var{sigspec}.
+If no arguments are supplied, or
+only @option{-p} is given, @code{trap} prints the list of commands
+associated with each signal number in a form that may be reused as
+shell input.
+The @option{-l} option causes the shell to print a list of signal names
+and their corresponding numbers.
+Each @var{sigspec} is either a signal name or a signal number.
+Signal names are case insensitive and the @code{SIG} prefix is optional.
+
+If a @var{sigspec}
+is @code{0} or @code{EXIT}, @var{arg} is executed when the shell exits.
+If a @var{sigspec} is @code{DEBUG}, the command @var{arg} is executed
+before every simple command, @code{for} command, @code{case} command,
+@code{select} command, every arithmetic @code{for} command, and before
+the first command executes in a shell function.
+Refer to the description of the @code{extdebug} option to the
+@code{shopt} builtin (@pxref{The Shopt Builtin}) for details of its
+effect on the @code{DEBUG} trap.
+If a @var{sigspec} is @code{RETURN}, the command @var{arg} is executed
+each time a shell function or a script executed with the @code{.} or
+@code{source} builtins finishes executing.
+
+If a @var{sigspec} is @code{ERR}, the command @var{arg}
+is executed whenever a simple command has a non-zero exit status,
+subject to the following conditions.
+The @code{ERR} trap is not executed if the failed command is part of the
+command list immediately following an @code{until} or @code{while} keyword,
+part of the test following the @code{if} or @code{elif} reserved words,
+part of a command executed in a @code{&&} or @code{||} list,
+or if the command's return
+status is being inverted using @code{!}.
+These are the same conditions obeyed by the @code{errexit} option.
+
+Signals ignored upon entry to the shell cannot be trapped or reset.
+Trapped signals that are not being ignored are reset to their original
+values in a subshell or subshell environment when one is created.
+
+The return status is zero unless a @var{sigspec} does not specify a
+valid signal.
+
+@item umask
+@btindex umask
+@example
+umask [-p] [-S] [@var{mode}]
+@end example
+Set the shell process's file creation mask to @var{mode}. If
+@var{mode} begins with a digit, it is interpreted as an octal number;
+if not, it is interpreted as a symbolic mode mask similar
+to that accepted by the @code{chmod} command. If @var{mode} is
+omitted, the current value of the mask is printed. If the @option{-S}
+option is supplied without a @var{mode} argument, the mask is printed
+in a symbolic format.
+If the @option{-p} option is supplied, and @var{mode}
+is omitted, the output is in a form that may be reused as input.
+The return status is zero if the mode is successfully changed or if
+no @var{mode} argument is supplied, and non-zero otherwise.
+
+Note that when the mode is interpreted as an octal number, each number
+of the umask is subtracted from @code{7}. Thus, a umask of @code{022}
+results in permissions of @code{755}.
+
+@item unset
+@btindex unset
+@example
+unset [-fv] [@var{name}]
+@end example
+Each variable or function @var{name} is removed.
+If no options are supplied, or the @option{-v} option is given, each
+@var{name} refers to a shell variable.
+If the @option{-f} option is given, the @var{name}s refer to shell
+functions, and the function definition is removed.
+Readonly variables and functions may not be unset.
+The return status is zero unless a @var{name} is readonly.
+@end table
+
+@node Bash Builtins
+@section Bash Builtin Commands
+
+This section describes builtin commands which are unique to
+or have been extended in Bash.
+Some of these commands are specified in the @sc{posix} standard.
+
+@table @code
+
+@item alias
+@btindex alias
+@example
+alias [@code{-p}] [@var{name}[=@var{value}] @dots{}]
+@end example
+
+Without arguments or with the @option{-p} option, @code{alias} prints
+the list of aliases on the standard output in a form that allows
+them to be reused as input.
+If arguments are supplied, an alias is defined for each @var{name}
+whose @var{value} is given. If no @var{value} is given, the name
+and value of the alias is printed.
+Aliases are described in @ref{Aliases}.
+
+@item bind
+@btindex bind
+@example
+bind [-m @var{keymap}] [-lpsvPSV]
+bind [-m @var{keymap}] [-q @var{function}] [-u @var{function}] [-r @var{keyseq}]
+bind [-m @var{keymap}] -f @var{filename}
+bind [-m @var{keymap}] -x @var{keyseq:shell-command}
+bind [-m @var{keymap}] @var{keyseq:function-name}
+bind @var{readline-command}
+@end example
+
+Display current Readline (@pxref{Command Line Editing})
+key and function bindings,
+bind a key sequence to a Readline function or macro,
+or set a Readline variable.
+Each non-option argument is a command as it would appear in a
+Readline initialization file (@pxref{Readline Init File}),
+but each binding or command must be passed as a separate argument; e.g.,
+@samp{"\C-x\C-r":re-read-init-file}.
+
+Options, if supplied, have the following meanings:
+
+@table @code
+@item -m @var{keymap}
+Use @var{keymap} as the keymap to be affected by
+the subsequent bindings. Acceptable @var{keymap}
+names are
+@code{emacs},
+@code{emacs-standard},
+@code{emacs-meta},
+@code{emacs-ctlx},
+@code{vi},
+@code{vi-move},
+@code{vi-command}, and
+@code{vi-insert}.
+@code{vi} is equivalent to @code{vi-command};
+@code{emacs} is equivalent to @code{emacs-standard}.
+
+@item -l
+List the names of all Readline functions.
+
+@item -p
+Display Readline function names and bindings in such a way that they
+can be used as input or in a Readline initialization file.
+
+@item -P
+List current Readline function names and bindings.
+
+@item -v
+Display Readline variable names and values in such a way that they
+can be used as input or in a Readline initialization file.
+
+@item -V
+List current Readline variable names and values.
+
+@item -s
+Display Readline key sequences bound to macros and the strings they output
+in such a way that they can be used as input or in a Readline
+initialization file.
+
+@item -S
+Display Readline key sequences bound to macros and the strings they output.
+
+@item -f @var{filename}
+Read key bindings from @var{filename}.
+
+@item -q @var{function}
+Query about which keys invoke the named @var{function}.
+
+@item -u @var{function}
+Unbind all keys bound to the named @var{function}.
+
+@item -r @var{keyseq}
+Remove any current binding for @var{keyseq}.
+
+@item -x @var{keyseq:shell-command}
+Cause @var{shell-command} to be executed whenever @var{keyseq} is
+entered.
+When @var{shell-command} is executed, the shell sets the
+@code{READLINE_LINE} variable to the contents of the Readline line
+buffer and the @code{READLINE_POINT} variable to the current location
+of the insertion point.
+If the executed command changes the value of @code{READLINE_LINE} or
+@code{READLINE_POINT}, those new values will be reflected in the
+editing state.
+@end table
+
+@noindent
+The return status is zero unless an invalid option is supplied or an
+error occurs.
+
+@item builtin
+@btindex builtin
+@example
+builtin [@var{shell-builtin} [@var{args}]]
+@end example
+Run a shell builtin, passing it @var{args}, and return its exit status.
+This is useful when defining a shell function with the same
+name as a shell builtin, retaining the functionality of the builtin within
+the function.
+The return status is non-zero if @var{shell-builtin} is not a shell
+builtin command.
+
+@item caller
+@btindex caller
+@example
+caller [@var{expr}]
+@end example
+Returns the context of any active subroutine call (a shell function or
+a script executed with the @code{.} or @code{source} builtins).
+
+Without @var{expr}, @code{caller} displays the line number and source
+filename of the current subroutine call.
+If a non-negative integer is supplied as @var{expr}, @code{caller}
+displays the line number, subroutine name, and source file corresponding
+to that position in the current execution call stack. This extra
+information may be used, for example, to print a stack trace. The
+current frame is frame 0.
+
+The return value is 0 unless the shell is not executing a subroutine
+call or @var{expr} does not correspond to a valid position in the
+call stack.
+
+@item command
+@btindex command
+@example
+command [-pVv] @var{command} [@var{arguments} @dots{}]
+@end example
+Runs @var{command} with @var{arguments} ignoring any shell function
+named @var{command}.
+Only shell builtin commands or commands found by searching the
+@env{PATH} are executed.
+If there is a shell function named @code{ls}, running @samp{command ls}
+within the function will execute the external command @code{ls}
+instead of calling the function recursively.
+The @option{-p} option means to use a default value for @env{PATH}
+that is guaranteed to find all of the standard utilities.
+The return status in this case is 127 if @var{command} cannot be
+found or an error occurred, and the exit status of @var{command}
+otherwise.
+
+If either the @option{-V} or @option{-v} option is supplied, a
+description of @var{command} is printed. The @option{-v} option
+causes a single word indicating the command or file name used to
+invoke @var{command} to be displayed; the @option{-V} option produces
+a more verbose description. In this case, the return status is
+zero if @var{command} is found, and non-zero if not.
+
+@item declare
+@btindex declare
+@example
+declare [-aAfFilrtux] [-p] [@var{name}[=@var{value}] @dots{}]
+@end example
+
+Declare variables and give them attributes. If no @var{name}s
+are given, then display the values of variables instead.
+
+The @option{-p} option will display the attributes and values of each
+@var{name}.
+When @option{-p} is used with @var{name} arguments, additional options
+are ignored.
+
+When @option{-p} is supplied without @var{name} arguments, @code{declare}
+will display the attributes and values of all variables having the
+attributes specified by the additional options.
+If no other options are supplied with @option{-p}, @code{declare} will
+display the attributes and values of all shell variables. The @option{-f}
+option will restrict the display to shell functions.
+
+The @option{-F} option inhibits the display of function definitions;
+only the function name and attributes are printed.
+If the @code{extdebug} shell option is enabled using @code{shopt}
+(@pxref{The Shopt Builtin}), the source file name and line number where
+the function is defined are displayed as well.
+@option{-F} implies @option{-f}.
+The following options can be used to restrict output to variables with
+the specified attributes or to give variables attributes:
+
+@table @code
+@item -a
+Each @var{name} is an indexed array variable (@pxref{Arrays}).
+
+@item -A
+Each @var{name} is an associative array variable (@pxref{Arrays}).
+
+@item -f
+Use function names only.
+
+@item -i
+The variable is to be treated as
+an integer; arithmetic evaluation (@pxref{Shell Arithmetic}) is
+performed when the variable is assigned a value.
+
+@item -l
+When the variable is assigned a value, all upper-case characters are
+converted to lower-case.
+The upper-case attribute is disabled.
+
+@item -r
+Make @var{name}s readonly. These names cannot then be assigned values
+by subsequent assignment statements or unset.
+
+@item -t
+Give each @var{name} the @code{trace} attribute.
+Traced functions inherit the @code{DEBUG} and @code{RETURN} traps from
+the calling shell.
+The trace attribute has no special meaning for variables.
+
+@item -u
+When the variable is assigned a value, all lower-case characters are
+converted to upper-case.
+The lower-case attribute is disabled.
+
+@item -x
+Mark each @var{name} for export to subsequent commands via
+the environment.
+@end table
+
+Using @samp{+} instead of @samp{-} turns off the attribute instead,
+with the exceptions that @samp{+a}
+may not be used to destroy an array variable and @samp{+r} will not
+remove the readonly attribute.
+When used in a function, @code{declare} makes each @var{name} local,
+as with the @code{local} command. If a variable name is followed by
+=@var{value}, the value of the variable is set to @var{value}.
+
+The return status is zero unless an invalid option is encountered,
+an attempt is made to define a function using @samp{-f foo=bar},
+an attempt is made to assign a value to a readonly variable,
+an attempt is made to assign a value to an array variable without
+using the compound assignment syntax (@pxref{Arrays}),
+one of the @var{names} is not a valid shell variable name,
+an attempt is made to turn off readonly status for a readonly variable,
+an attempt is made to turn off array status for an array variable,
+or an attempt is made to display a non-existent function with @option{-f}.
+
+@item echo
+@btindex echo
+@example
+echo [-neE] [@var{arg} @dots{}]
+@end example
+Output the @var{arg}s, separated by spaces, terminated with a
+newline.
+The return status is always 0.
+If @option{-n} is specified, the trailing newline is suppressed.
+If the @option{-e} option is given, interpretation of the following
+backslash-escaped characters is enabled.
+The @option{-E} option disables the interpretation of these escape characters,
+even on systems where they are interpreted by default.
+The @code{xpg_echo} shell option may be used to
+dynamically determine whether or not @code{echo} expands these
+escape characters by default.
+@code{echo} does not interpret @option{--} to mean the end of options.
+
+@code{echo} interprets the following escape sequences:
+@table @code
+@item \a
+alert (bell)
+@item \b
+backspace
+@item \c
+suppress further output
+@item \e
+escape
+@item \f
+form feed
+@item \n
+new line
+@item \r
+carriage return
+@item \t
+horizontal tab
+@item \v
+vertical tab
+@item \\
+backslash
+@item \0@var{nnn}
+the eight-bit character whose value is the octal value @var{nnn}
+(zero to three octal digits)
+@item \x@var{HH}
+the eight-bit character whose value is the hexadecimal value @var{HH}
+(one or two hex digits)
+@end table
+
+@item enable
+@btindex enable
+@example
+enable [-a] [-dnps] [-f @var{filename}] [@var{name} @dots{}]
+@end example
+Enable and disable builtin shell commands.
+Disabling a builtin allows a disk command which has the same name
+as a shell builtin to be executed without specifying a full pathname,
+even though the shell normally searches for builtins before disk commands.
+If @option{-n} is used, the @var{name}s become disabled. Otherwise
+@var{name}s are enabled. For example, to use the @code{test} binary
+found via @env{$PATH} instead of the shell builtin version, type
+@samp{enable -n test}.
+
+If the @option{-p} option is supplied, or no @var{name} arguments appear,
+a list of shell builtins is printed. With no other arguments, the list
+consists of all enabled shell builtins.
+The @option{-a} option means to list
+each builtin with an indication of whether or not it is enabled.
+
+The @option{-f} option means to load the new builtin command @var{name}
+from shared object @var{filename}, on systems that support dynamic loading.
+The @option{-d} option will delete a builtin loaded with @option{-f}.
+
+If there are no options, a list of the shell builtins is displayed.
+The @option{-s} option restricts @code{enable} to the @sc{posix} special
+builtins. If @option{-s} is used with @option{-f}, the new builtin becomes
+a special builtin (@pxref{Special Builtins}).
+
+The return status is zero unless a @var{name} is not a shell builtin
+or there is an error loading a new builtin from a shared object.
+
+@item help
+@btindex help
+@example
+help [-dms] [@var{pattern}]
+@end example
+Display helpful information about builtin commands.
+If @var{pattern} is specified, @code{help} gives detailed help
+on all commands matching @var{pattern}, otherwise a list of
+the builtins is printed.
+
+Options, if supplied, have the following meanings:
+
+@table @code
+@item -d
+Display a short description of each @var{pattern}
+@item -m
+Display the description of each @var{pattern} in a manpage-like format
+@item -s
+Display only a short usage synopsis for each @var{pattern}
+@end table
+
+The return status is zero unless no command matches @var{pattern}.
+
+@item let
+@btindex let
+@example
+let @var{expression} [@var{expression}]
+@end example
+The @code{let} builtin allows arithmetic to be performed on shell
+variables. Each @var{expression} is evaluated according to the
+rules given below in @ref{Shell Arithmetic}. If the
+last @var{expression} evaluates to 0, @code{let} returns 1;
+otherwise 0 is returned.
+
+@item local
+@btindex local
+@example
+local [@var{option}] @var{name}[=@var{value}] @dots{}
+@end example
+For each argument, a local variable named @var{name} is created,
+and assigned @var{value}.
+The @var{option} can be any of the options accepted by @code{declare}.
+@code{local} can only be used within a function; it makes the variable
+@var{name} have a visible scope restricted to that function and its
+children. The return status is zero unless @code{local} is used outside
+a function, an invalid @var{name} is supplied, or @var{name} is a
+readonly variable.
+
+@item logout
+@btindex logout
+@example
+logout [@var{n}]
+@end example
+Exit a login shell, returning a status of @var{n} to the shell's
+parent.
+
+@item mapfile
+@btindex mapfile
+@example
+mapfile [-n @var{count}] [-O @var{origin}] [-s @var{count}] [-t] [-u @var{fd}] [
+-C @var{callback}] [-c @var{quantum}] [@var{array}]
+@end example
+Read lines from the standard input into the indexed array variable @var{array},
+or from file descriptor @var{fd}
+if the @option{-u} option is supplied.
+The variable @code{MAPFILE} is the default @var{array}.
+Options, if supplied, have the following meanings:
+@table @code
+
+@item -n
+Copy at most @var{count} lines. If @var{count} is 0, all lines are copied.
+@item -O
+Begin assigning to @var{array} at index @var{origin}.
+The default index is 0.
+@item -s
+Discard the first @var{count} lines read.
+@item -t
+Remove a trailing newline from each line read.
+@item -u
+Read lines from file descriptor @var{fd} instead of the standard input.
+@item -C
+Evaluate @var{callback} each time @var{quantum}P lines are read.
+The @option{-c} option specifies @var{quantum}.
+@item -c
+Specify the number of lines read between each call to @var{callback}.
+@end table
+
+If @option{-C} is specified without @option{-c},
+the default quantum is 5000.
+When @var{callback} is evaluated, it is supplied the index of the next
+array element to be assigned as an additional argument.
+@var{callback} is evaluated after the line is read but before the
+array element is assigned.
+
+If not supplied with an explicit origin, @code{mapfile} will clear @var{array}
+before assigning to it.
+
+@code{mapfile} returns successfully unless an invalid option or option
+argument is supplied, @var{array} is invalid or unassignable, or @var{array}
+is not an indexed array.
+
+@item printf
+@btindex printf
+@example
+printf [-v @var{var}] @var{format} [@var{arguments}]
+@end example
+Write the formatted @var{arguments} to the standard output under the
+control of the @var{format}.
+The @var{format} is a character string which contains three types of objects:
+plain characters, which are simply copied to standard output, character
+escape sequences, which are converted and copied to the standard output, and
+format specifications, each of which causes printing of the next successive
+@var{argument}.
+In addition to the standard @code{printf(1)} formats, @samp{%b} causes
+@code{printf} to expand backslash escape sequences in the corresponding
+@var{argument},
+(except that @samp{\c} terminates output, backslashes in
+@samp{\'}, @samp{\"}, and @samp{\?} are not removed, and octal escapes
+beginning with @samp{\0} may contain up to four digits),
+and @samp{%q} causes @code{printf} to output the
+corresponding @var{argument} in a format that can be reused as shell input.
+
+The @option{-v} option causes the output to be assigned to the variable
+@var{var} rather than being printed to the standard output.
+
+The @var{format} is reused as necessary to consume all of the @var{arguments}.
+If the @var{format} requires more @var{arguments} than are supplied, the
+extra format specifications behave as if a zero value or null string, as
+appropriate, had been supplied. The return value is zero on success,
+non-zero on failure.
+
+@item read
+@btindex read
+@example
+read [-ers] [-a @var{aname}] [-d @var{delim}] [-i @var{text}] [-n @var{nchars}] [-N @var{nchars}] [-p @var{prompt}] [-t @var{timeout}] [-u @var{fd}] [@var{name} @dots{}]
+@end example
+One line is read from the standard input, or from the file descriptor
+@var{fd} supplied as an argument to the @option{-u} option, and the first word
+is assigned to the first @var{name}, the second word to the second @var{name},
+and so on, with leftover words and their intervening separators assigned
+to the last @var{name}.
+If there are fewer words read from the input stream than names,
+the remaining names are assigned empty values.
+The characters in the value of the @env{IFS} variable
+are used to split the line into words.
+The backslash character @samp{\} may be used to remove any special
+meaning for the next character read and for line continuation.
+If no names are supplied, the line read is assigned to the
+variable @env{REPLY}.
+The return code is zero, unless end-of-file is encountered, @code{read}
+times out (in which case the return code is greater than 128), or an
+invalid file descriptor is supplied as the argument to @option{-u}.
+
+Options, if supplied, have the following meanings:
+
+@table @code
+@item -a @var{aname}
+The words are assigned to sequential indices of the array variable
+@var{aname}, starting at 0.
+All elements are removed from @var{aname} before the assignment.
+Other @var{name} arguments are ignored.
+
+@item -d @var{delim}
+The first character of @var{delim} is used to terminate the input line,
+rather than newline.
+
+@item -e
+Readline (@pxref{Command Line Editing}) is used to obtain the line.
+Readline uses the current (or default, if line editing was not previously
+active) editing settings.
+
+@item -i @var{text}
+If Readline is being used to read the line, @var{text} is placed into
+the editing buffer before editing begins.
+
+@item -n @var{nchars}
+@code{read} returns after reading @var{nchars} characters rather than
+waiting for a complete line of input, but honor a delimiter if fewer
+than @var{nchars} characters are read before the delimiter.
+
+@item -N @var{nchars}
+@code{read} returns after reading exactly @var{nchars} characters rather
+than waiting for a complete line of input, unless EOF is encountered or
+@code{read} times out.
+Delimiter characters encountered in the input are
+not treated specially and do not cause @code{read} to return until
+@var{nchars} characters are read.
+
+@item -p @var{prompt}
+Display @var{prompt}, without a trailing newline, before attempting
+to read any input.
+The prompt is displayed only if input is coming from a terminal.
+
+@item -r
+If this option is given, backslash does not act as an escape character.
+The backslash is considered to be part of the line.
+In particular, a backslash-newline pair may not be used as a line
+continuation.
+
+@item -s
+Silent mode. If input is coming from a terminal, characters are
+not echoed.
+
+@item -t @var{timeout}
+Cause @code{read} to time out and return failure if a complete line of
+input is not read within @var{timeout} seconds.
+@var{timeout} may be a decimal number with a fractional portion following
+the decimal point.
+This option is only effective if @code{read} is reading input from a
+terminal, pipe, or other special file; it has no effect when reading
+from regular files.
+If @var{timeout} is 0, @code{read} returns success if input is available on
+the specified file descriptor, failure otherwise.
+The exit status is greater than 128 if the timeout is exceeded.
+
+@item -u @var{fd}
+Read input from file descriptor @var{fd}.
+
+@end table
+
+@item readarray
+@btindex readarray
+@example
+readarray [-n @var{count}] [-O @var{origin}] [-s @var{count}] [-t] [-u @var{fd}] [
+-C @var{callback}] [-c @var{quantum}] [@var{array}]
+@end example
+Read lines from the standard input into the indexed array variable @var{array},
+or from file descriptor @var{fd}
+if the @option{-u} option is supplied.
+
+A synonym for @code{mapfile}.
+
+@item source
+@btindex source
+@example
+source @var{filename}
+@end example
+A synonym for @code{.} (@pxref{Bourne Shell Builtins}).
+
+@item type
+@btindex type
+@example
+type [-afptP] [@var{name} @dots{}]
+@end example
+For each @var{name}, indicate how it would be interpreted if used as a
+command name.
+
+If the @option{-t} option is used, @code{type} prints a single word
+which is one of @samp{alias}, @samp{function}, @samp{builtin},
+@samp{file} or @samp{keyword},
+if @var{name} is an alias, shell function, shell builtin,
+disk file, or shell reserved word, respectively.
+If the @var{name} is not found, then nothing is printed, and
+@code{type} returns a failure status.
+
+If the @option{-p} option is used, @code{type} either returns the name
+of the disk file that would be executed, or nothing if @option{-t}
+would not return @samp{file}.
+
+The @option{-P} option forces a path search for each @var{name}, even if
+@option{-t} would not return @samp{file}.
+
+If a command is hashed, @option{-p} and @option{-P} print the hashed value,
+not necessarily the file that appears first in @code{$PATH}.
+
+If the @option{-a} option is used, @code{type} returns all of the places
+that contain an executable named @var{file}.
+This includes aliases and functions, if and only if the @option{-p} option
+is not also used.
+
+If the @option{-f} option is used, @code{type} does not attempt to find
+shell functions, as with the @code{command} builtin.
+
+The return status is zero if all of the @var{names} are found, non-zero
+if any are not found.
+
+@item typeset
+@btindex typeset
+@example
+typeset [-afFrxi] [-p] [@var{name}[=@var{value}] @dots{}]
+@end example
+The @code{typeset} command is supplied for compatibility with the Korn
+shell; however, it has been deprecated in favor of the @code{declare}
+builtin command.
+
+@item ulimit
+@btindex ulimit
+@example
+ulimit [-abcdefilmnpqrstuvxHST] [@var{limit}]
+@end example
+@code{ulimit} provides control over the resources available to processes
+started by the shell, on systems that allow such control. If an
+option is given, it is interpreted as follows:
+@table @code
+@item -S
+Change and report the soft limit associated with a resource.
+
+@item -H
+Change and report the hard limit associated with a resource.
+
+@item -a
+All current limits are reported.
+
+@item -b
+The maximum socket buffer size.
+
+@item -c
+The maximum size of core files created.
+
+@item -d
+The maximum size of a process's data segment.
+
+@item -e
+The maximum scheduling priority ("nice").
+
+@item -f
+The maximum size of files written by the shell and its children.
+
+@item -i
+The maximum number of pending signals.
+
+@item -l
+The maximum size that may be locked into memory.
+
+@item -m
+The maximum resident set size (many systems do not honor this limit).
+
+@item -n
+The maximum number of open file descriptors (most systems do not
+allow this value to be set).
+
+@item -p
+The pipe buffer size.
+
+@item -q
+The maximum number of bytes in POSIX message queues.
+
+@item -r
+The maximum real-time scheduling priority.
+
+@item -s
+The maximum stack size.
+
+@item -t
+The maximum amount of cpu time in seconds.
+
+@item -u
+The maximum number of processes available to a single user.
+
+@item -v
+The maximum amount of virtual memory available to the process.
+
+@item -x
+The maximum number of file locks.
+
+@item -T
+The maximum number of threads.
+
+@end table
+
+If @var{limit} is given, it is the new value of the specified resource;
+the special @var{limit} values @code{hard}, @code{soft}, and
+@code{unlimited} stand for the current hard limit, the current soft limit,
+and no limit, respectively.
+A hard limit cannot be increased by a non-root user once it is set;
+a soft limit may be increased up to the value of the hard limit.
+Otherwise, the current value of the soft limit for the specified resource
+is printed, unless the @option{-H} option is supplied.
+When setting new limits, if neither @option{-H} nor @option{-S} is supplied,
+both the hard and soft limits are set.
+If no option is given, then @option{-f} is assumed. Values are in 1024-byte
+increments, except for @option{-t}, which is in seconds, @option{-p},
+which is in units of 512-byte blocks, and @option{-n} and @option{-u}, which
+are unscaled values.
+
+The return status is zero unless an invalid option or argument is supplied,
+or an error occurs while setting a new limit.
+
+@item unalias
+@btindex unalias
+@example
+unalias [-a] [@var{name} @dots{} ]
+@end example
+
+Remove each @var{name} from the list of aliases. If @option{-a} is
+supplied, all aliases are removed.
+Aliases are described in @ref{Aliases}.
+
+@end table
+
+@node Modifying Shell Behavior
+@section Modifying Shell Behavior
+
+@menu
+* The Set Builtin:: Change the values of shell attributes and
+ positional parameters.
+* The Shopt Builtin:: Modify shell optional behavior.
+@end menu
+
+@node The Set Builtin
+@subsection The Set Builtin
+
+This builtin is so complicated that it deserves its own section. @code{set}
+allows you to change the values of shell options and set the positional
+parameters, or to display the names and values of shell variables.
+
+@table @code
+@item set
+@btindex set
+@example
+set [--abefhkmnptuvxBCEHPT] [-o @var{option}] [@var{argument} @dots{}]
+set [+abefhkmnptuvxBCEHPT] [+o @var{option}] [@var{argument} @dots{}]
+@end example
+
+If no options or arguments are supplied, @code{set} displays the names
+and values of all shell variables and functions, sorted according to the
+current locale, in a format that may be reused as input
+for setting or resetting the currently-set variables.
+Read-only variables cannot be reset.
+In @sc{posix} mode, only shell variables are listed.
+
+When options are supplied, they set or unset shell attributes.
+Options, if specified, have the following meanings:
+
+@table @code
+@item -a
+Mark variables and function which are modified or created for export
+to the environment of subsequent commands.
+
+@item -b
+Cause the status of terminated background jobs to be reported
+immediately, rather than before printing the next primary prompt.
+
+@item -e
+Exit immediately if a pipeline (@pxref{Pipelines}), which may consist
+of a single simple command (@pxref{Simple Commands}),
+a subshell command enclosed in parentheses (@pxref{Command Grouping}),
+or one of the commands executed as part of a command list enclosed
+by braces (@pxref{Command Grouping})
+returns a non-zero status.
+The shell does not exit if the command that fails is part of the
+command list immediately following a @code{while} or @code{until} keyword,
+part of the test in an @code{if} statement,
+part of any command executed in a @code{&&} or @code{||} list except
+the command following the final @code{&&} or @code{||},
+any command in a pipeline but the last,
+or if the command's return status is being inverted with @code{!}.
+A trap on @code{ERR}, if set, is executed before the shell exits.
+
+This option applies to the shell environment and each subshell environment
+separately (@pxref{Command Execution Environment}), and may cause
+subshells to exit before executing all the commands in the subshell.
+
+@item -f
+Disable filename expansion (globbing).
+
+@item -h
+Locate and remember (hash) commands as they are looked up for execution.
+This option is enabled by default.
+
+@item -k
+All arguments in the form of assignment statements are placed
+in the environment for a command, not just those that precede
+the command name.
+
+@item -m
+Job control is enabled (@pxref{Job Control}).
+
+@item -n
+Read commands but do not execute them; this may be used to check a
+script for syntax errors.
+This option is ignored by interactive shells.
+
+@item -o @var{option-name}
+
+Set the option corresponding to @var{option-name}:
+
+@table @code
+@item allexport
+Same as @code{-a}.
+
+@item braceexpand
+Same as @code{-B}.
+
+@item emacs
+Use an @code{emacs}-style line editing interface (@pxref{Command Line Editing}).
+This also affects the editing interface used for @code{read -e}.
+
+@item errexit
+Same as @code{-e}.
+
+@item errtrace
+Same as @code{-E}.
+
+@item functrace
+Same as @code{-T}.
+
+@item hashall
+Same as @code{-h}.
+
+@item histexpand
+Same as @code{-H}.
+
+@item history
+Enable command history, as described in @ref{Bash History Facilities}.
+This option is on by default in interactive shells.
+
+@item ignoreeof
+An interactive shell will not exit upon reading EOF.
+
+@item keyword
+Same as @code{-k}.
+
+@item monitor
+Same as @code{-m}.
+
+@item noclobber
+Same as @code{-C}.
+
+@item noexec
+Same as @code{-n}.
+
+@item noglob
+Same as @code{-f}.
+
+@item nolog
+Currently ignored.
+
+@item notify
+Same as @code{-b}.
+
+@item nounset
+Same as @code{-u}.
+
+@item onecmd
+Same as @code{-t}.
+
+@item physical
+Same as @code{-P}.
+
+@item pipefail
+If set, the return value of a pipeline is the value of the last
+(rightmost) command to exit with a non-zero status, or zero if all
+commands in the pipeline exit successfully.
+This option is disabled by default.
+
+@item posix
+Change the behavior of Bash where the default operation differs
+from the @sc{posix} standard to match the standard
+(@pxref{Bash POSIX Mode}).
+This is intended to make Bash behave as a strict superset of that
+standard.
+
+@item privileged
+Same as @code{-p}.
+
+@item verbose
+Same as @code{-v}.
+
+@item vi
+Use a @code{vi}-style line editing interface.
+This also affects the editing interface used for @code{read -e}.
+
+@item xtrace
+Same as @code{-x}.
+@end table
+
+@item -p
+Turn on privileged mode.
+In this mode, the @env{$BASH_ENV} and @env{$ENV} files are not
+processed, shell functions are not inherited from the environment,
+and the @env{SHELLOPTS}, @env{BASHOPTS}, @env{CDPATH} and @env{GLOBIGNORE}
+variables, if they appear in the environment, are ignored.
+If the shell is started with the effective user (group) id not equal to the
+real user (group) id, and the @code{-p} option is not supplied, these actions
+are taken and the effective user id is set to the real user id.
+If the @code{-p} option is supplied at startup, the effective user id is
+not reset.
+Turning this option off causes the effective user
+and group ids to be set to the real user and group ids.
+
+@item -t
+Exit after reading and executing one command.
+
+@item -u
+Treat unset variables and parameters other than the special parameters
+@samp{@@} or @samp{*} as an error when performing parameter expansion.
+An error message will be written to the standard error, and a non-interactive
+shell will exit.
+
+@item -v
+Print shell input lines as they are read.
+
+@item -x
+Print a trace of simple commands, @code{for} commands, @code{case}
+commands, @code{select} commands, and arithmetic @code{for} commands
+and their arguments or associated word lists after they are
+expanded and before they are executed. The value of the @env{PS4}
+variable is expanded and the resultant value is printed before
+the command and its expanded arguments.
+
+@item -B
+The shell will perform brace expansion (@pxref{Brace Expansion}).
+This option is on by default.
+
+@item -C
+Prevent output redirection using @samp{>}, @samp{>&}, and @samp{<>}
+from overwriting existing files.
+
+@item -E
+If set, any trap on @code{ERR} is inherited by shell functions, command
+substitutions, and commands executed in a subshell environment.
+The @code{ERR} trap is normally not inherited in such cases.
+
+@item -H
+Enable @samp{!} style history substitution (@pxref{History Interaction}).
+This option is on by default for interactive shells.
+
+@item -P
+If set, do not follow symbolic links when performing commands such as
+@code{cd} which change the current directory. The physical directory
+is used instead. By default, Bash follows
+the logical chain of directories when performing commands
+which change the current directory.
+
+For example, if @file{/usr/sys} is a symbolic link to @file{/usr/local/sys}
+then:
+@example
+$ cd /usr/sys; echo $PWD
+/usr/sys
+$ cd ..; pwd
+/usr
+@end example
+
+@noindent
+If @code{set -P} is on, then:
+@example
+$ cd /usr/sys; echo $PWD
+/usr/local/sys
+$ cd ..; pwd
+/usr/local
+@end example
+
+@item -T
+If set, any trap on @code{DEBUG} and @code{RETURN} are inherited by
+shell functions, command substitutions, and commands executed
+in a subshell environment.
+The @code{DEBUG} and @code{RETURN} traps are normally not inherited
+in such cases.
+
+@item --
+If no arguments follow this option, then the positional parameters are
+unset. Otherwise, the positional parameters are set to the
+@var{arguments}, even if some of them begin with a @samp{-}.
+
+@item -
+Signal the end of options, cause all remaining @var{arguments}
+to be assigned to the positional parameters. The @option{-x}
+and @option{-v} options are turned off.
+If there are no arguments, the positional parameters remain unchanged.
+@end table
+
+Using @samp{+} rather than @samp{-} causes these options to be
+turned off. The options can also be used upon invocation of the
+shell. The current set of options may be found in @code{$-}.
+
+The remaining N @var{arguments} are positional parameters and are
+assigned, in order, to @code{$1}, @code{$2}, @dots{} @code{$N}.
+The special parameter @code{#} is set to N.
+
+The return status is always zero unless an invalid option is supplied.
+@end table
+
+@node The Shopt Builtin
+@subsection The Shopt Builtin
+
+This builtin allows you to change additional shell optional behavior.
+
+@table @code
+
+@item shopt
+@btindex shopt
+@example
+shopt [-pqsu] [-o] [@var{optname} @dots{}]
+@end example
+Toggle the values of variables controlling optional shell behavior.
+With no options, or with the @option{-p} option, a list of all settable
+options is displayed, with an indication of whether or not each is set.
+The @option{-p} option causes output to be displayed in a form that
+may be reused as input.
+Other options have the following meanings:
+
+@table @code
+@item -s
+Enable (set) each @var{optname}.
+
+@item -u
+Disable (unset) each @var{optname}.
+
+@item -q
+Suppresses normal output; the return status
+indicates whether the @var{optname} is set or unset.
+If multiple @var{optname} arguments are given with @option{-q},
+the return status is zero if all @var{optnames} are enabled;
+non-zero otherwise.
+
+@item -o
+Restricts the values of
+@var{optname} to be those defined for the @option{-o} option to the
+@code{set} builtin (@pxref{The Set Builtin}).
+@end table
+
+If either @option{-s} or @option{-u}
+is used with no @var{optname} arguments, the display is limited to
+those options which are set or unset, respectively.
+
+Unless otherwise noted, the @code{shopt} options are disabled (off)
+by default.
+
+The return status when listing options is zero if all @var{optnames}
+are enabled, non-zero otherwise. When setting or unsetting options,
+the return status is zero unless an @var{optname} is not a valid shell
+option.
+
+The list of @code{shopt} options is:
+@table @code
+
+@item autocd
+If set, a command name that is the name of a directory is executed as if
+it were the argument to the @code{cd} command.
+This option is only used by interactive shells.
+
+@item cdable_vars
+If this is set, an argument to the @code{cd} builtin command that
+is not a directory is assumed to be the name of a variable whose
+value is the directory to change to.
+
+@item cdspell
+If set, minor errors in the spelling of a directory component in a
+@code{cd} command will be corrected.
+The errors checked for are transposed characters,
+a missing character, and a character too many.
+If a correction is found, the corrected path is printed,
+and the command proceeds.
+This option is only used by interactive shells.
+
+@item checkhash
+If this is set, Bash checks that a command found in the hash
+table exists before trying to execute it. If a hashed command no
+longer exists, a normal path search is performed.
+
+@item checkjobs
+If set, Bash lists the status of any stopped and running jobs before
+exiting an interactive shell. If any jobs are running, this causes
+the exit to be deferred until a second exit is attempted without an
+intervening command (@pxref{Job Control}).
+The shell always postpones exiting if any jobs are stopped.
+
+@item checkwinsize
+If set, Bash checks the window size after each command
+and, if necessary, updates the values of
+@env{LINES} and @env{COLUMNS}.
+
+@item cmdhist
+If set, Bash
+attempts to save all lines of a multiple-line
+command in the same history entry. This allows
+easy re-editing of multi-line commands.
+
+@item compat31
+If set, Bash
+changes its behavior to that of version 3.1 with respect to quoted
+arguments to the conditional command's =~ operator.
+
+@item dirspell
+If set, Bash
+attempts spelling correction on directory names during word completion
+if the directory name initially supplied does not exist.
+
+@item dotglob
+If set, Bash includes filenames beginning with a `.' in
+the results of filename expansion.
+
+@item execfail
+If this is set, a non-interactive shell will not exit if
+it cannot execute the file specified as an argument to the @code{exec}
+builtin command. An interactive shell does not exit if @code{exec}
+fails.
+
+@item expand_aliases
+If set, aliases are expanded as described below under Aliases,
+@ref{Aliases}.
+This option is enabled by default for interactive shells.
+
+@item extdebug
+If set, behavior intended for use by debuggers is enabled:
+
+@enumerate
+@item
+The @option{-F} option to the @code{declare} builtin (@pxref{Bash Builtins})
+displays the source file name and line number corresponding to each function
+name supplied as an argument.
+
+@item
+If the command run by the @code{DEBUG} trap returns a non-zero value, the
+next command is skipped and not executed.
+
+@item
+If the command run by the @code{DEBUG} trap returns a value of 2, and the
+shell is executing in a subroutine (a shell function or a shell script
+executed by the @code{.} or @code{source} builtins), a call to
+@code{return} is simulated.
+
+@item
+@code{BASH_ARGC} and @code{BASH_ARGV} are updated as described in their
+descriptions (@pxref{Bash Variables}).
+
+@item
+Function tracing is enabled: command substitution, shell functions, and
+subshells invoked with @code{( @var{command} )} inherit the
+@code{DEBUG} and @code{RETURN} traps.
+
+@item
+Error tracing is enabled: command substitution, shell functions, and
+subshells invoked with @code{( @var{command} )} inherit the
+@code{ERROR} trap.
+@end enumerate
+
+@item extglob
+If set, the extended pattern matching features described above
+(@pxref{Pattern Matching}) are enabled.
+
+@item extquote
+If set, @code{$'@var{string}'} and @code{$"@var{string}"} quoting is
+performed within @code{$@{@var{parameter}@}} expansions
+enclosed in double quotes. This option is enabled by default.
+
+@item failglob
+If set, patterns which fail to match filenames during filename expansion
+result in an expansion error.
+
+@item force_fignore
+If set, the suffixes specified by the @env{FIGNORE} shell variable
+cause words to be ignored when performing word completion even if
+the ignored words are the only possible completions.
+@xref{Bash Variables}, for a description of @env{FIGNORE}.
+This option is enabled by default.
+
+@item globstar
+If set, the pattern @samp{**} used in a filename expansion context will
+match a files and zero or more directories and subdirectories.
+If the pattern is followed by a @samp{/}, only directories and
+subdirectories match.
+
+@item gnu_errfmt
+If set, shell error messages are written in the standard @sc{gnu} error
+message format.
+
+@item histappend
+If set, the history list is appended to the file named by the value
+of the @env{HISTFILE}
+variable when the shell exits, rather than overwriting the file.
+
+@item histreedit
+If set, and Readline
+is being used, a user is given the opportunity to re-edit a
+failed history substitution.
+
+@item histverify
+If set, and Readline
+is being used, the results of history substitution are not immediately
+passed to the shell parser. Instead, the resulting line is loaded into
+the Readline editing buffer, allowing further modification.
+
+@item hostcomplete
+If set, and Readline is being used, Bash will attempt to perform
+hostname completion when a word containing a @samp{@@} is being
+completed (@pxref{Commands For Completion}). This option is enabled
+by default.
+
+@item huponexit
+If set, Bash will send @code{SIGHUP} to all jobs when an interactive
+login shell exits (@pxref{Signals}).
+
+@item interactive_comments
+Allow a word beginning with @samp{#}
+to cause that word and all remaining characters on that
+line to be ignored in an interactive shell.
+This option is enabled by default.
+
+@item lithist
+If enabled, and the @code{cmdhist}
+option is enabled, multi-line commands are saved to the history with
+embedded newlines rather than using semicolon separators where possible.
+
+@item login_shell
+The shell sets this option if it is started as a login shell
+(@pxref{Invoking Bash}).
+The value may not be changed.
+
+@item mailwarn
+If set, and a file that Bash is checking for mail has been
+accessed since the last time it was checked, the message
+@code{"The mail in @var{mailfile} has been read"} is displayed.
+
+@item no_empty_cmd_completion
+If set, and Readline is being used, Bash will not attempt to search
+the @env{PATH} for possible completions when completion is attempted
+on an empty line.
+
+@item nocaseglob
+If set, Bash matches filenames in a case-insensitive fashion when
+performing filename expansion.
+
+@item nocasematch
+If set, Bash matches patterns in a case-insensitive fashion when
+performing matching while executing @code{case} or @code{[[}
+conditional commands.
+
+@item nullglob
+If set, Bash allows filename patterns which match no
+files to expand to a null string, rather than themselves.
+
+@item progcomp
+If set, the programmable completion facilities
+(@pxref{Programmable Completion}) are enabled.
+This option is enabled by default.
+
+@item promptvars
+If set, prompt strings undergo
+parameter expansion, command substitution, arithmetic
+expansion, and quote removal after being expanded
+as described below (@pxref{Printing a Prompt}).
+This option is enabled by default.
+
+@item restricted_shell
+The shell sets this option if it is started in restricted mode
+(@pxref{The Restricted Shell}).
+The value may not be changed.
+This is not reset when the startup files are executed, allowing
+the startup files to discover whether or not a shell is restricted.
+
+@item shift_verbose
+If this is set, the @code{shift}
+builtin prints an error message when the shift count exceeds the
+number of positional parameters.
+
+@item sourcepath
+If set, the @code{source} builtin uses the value of @env{PATH}
+to find the directory containing the file supplied as an argument.
+This option is enabled by default.
+
+@item xpg_echo
+If set, the @code{echo} builtin expands backslash-escape sequences
+by default.
+
+@end table
+
+@noindent
+The return status when listing options is zero if all @var{optnames}
+are enabled, non-zero otherwise.
+When setting or unsetting options, the return status is zero unless an
+@var{optname} is not a valid shell option.
+
+@end table
+
+@node Special Builtins
+@section Special Builtins
+@cindex special builtin
+
+For historical reasons, the @sc{posix} standard has classified
+several builtin commands as @emph{special}.
+When Bash is executing in @sc{posix} mode, the special builtins
+differ from other builtin commands in three respects:
+
+@enumerate
+@item
+Special builtins are found before shell functions during command lookup.
+
+@item
+If a special builtin returns an error status, a non-interactive shell exits.
+
+@item
+Assignment statements preceding the command stay in effect in the shell
+environment after the command completes.
+@end enumerate
+
+When Bash is not executing in @sc{posix} mode, these builtins behave no
+differently than the rest of the Bash builtin commands.
+The Bash @sc{posix} mode is described in @ref{Bash POSIX Mode}.
+
+These are the @sc{posix} special builtins:
+@example
+@w{break : . continue eval exec exit export readonly return set}
+@w{shift trap unset}
+@end example
+
+@node Shell Variables
+@chapter Shell Variables
+
+@menu
+* Bourne Shell Variables:: Variables which Bash uses in the same way
+ as the Bourne Shell.
+* Bash Variables:: List of variables that exist in Bash.
+@end menu
+
+This chapter describes the shell variables that Bash uses.
+Bash automatically assigns default values to a number of variables.
+
+@node Bourne Shell Variables
+@section Bourne Shell Variables
+
+Bash uses certain shell variables in the same way as the Bourne shell.
+In some cases, Bash assigns a default value to the variable.
+
+@vtable @code
+
+@item CDPATH
+A colon-separated list of directories used as a search path for
+the @code{cd} builtin command.
+
+@item HOME
+The current user's home directory; the default for the @code{cd} builtin
+command.
+The value of this variable is also used by tilde expansion
+(@pxref{Tilde Expansion}).
+
+@item IFS
+A list of characters that separate fields; used when the shell splits
+words as part of expansion.
+
+@item MAIL
+If this parameter is set to a filename and the @env{MAILPATH} variable
+is not set, Bash informs the user of the arrival of mail in
+the specified file.
+
+@item MAILPATH
+A colon-separated list of filenames which the shell periodically checks
+for new mail.
+Each list entry can specify the message that is printed when new mail
+arrives in the mail file by separating the file name from the message with
+a @samp{?}.
+When used in the text of the message, @code{$_} expands to the name of
+the current mail file.
+
+@item OPTARG
+The value of the last option argument processed by the @code{getopts} builtin.
+
+@item OPTIND
+The index of the last option argument processed by the @code{getopts} builtin.
+
+@item PATH
+A colon-separated list of directories in which the shell looks for
+commands.
+A zero-length (null) directory name in the value of @code{PATH} indicates the
+current directory.
+A null directory name may appear as two adjacent colons, or as an initial
+or trailing colon.
+
+
+@item PS1
+The primary prompt string. The default value is @samp{\s-\v\$ }.
+@xref{Printing a Prompt}, for the complete list of escape
+sequences that are expanded before @env{PS1} is displayed.
+
+@item PS2
+The secondary prompt string. The default value is @samp{> }.
+
+@end vtable
+
+@node Bash Variables
+@section Bash Variables
+
+These variables are set or used by Bash, but other shells
+do not normally treat them specially.
+
+A few variables used by Bash are described in different chapters:
+variables for controlling the job control facilities
+(@pxref{Job Control Variables}).
+
+@vtable @code
+
+@item BASH
+The full pathname used to execute the current instance of Bash.
+
+@item BASHOPTS
+A colon-separated list of enabled shell options. Each word in
+the list is a valid argument for the @option{-s} option to the
+@code{shopt} builtin command (@pxref{The Shopt Builtin}).
+The options appearing in @env{BASHOPTS} are those reported
+as @samp{on} by @samp{shopt}.
+If this variable is in the environment when Bash
+starts up, each shell option in the list will be enabled before
+reading any startup files. This variable is readonly.
+
+@item BASHPID
+Expands to the process id of the current Bash process.
+This differs from @code{$$} under certain circumstances, such as subshells
+that do not require Bash to be re-initialized.
+
+@item BASH_ALIASES
+An associative array variable whose members correspond to the internal
+list of aliases as maintained by the @code{alias} builtin
+(@pxref{Bourne Shell Builtins}).
+Elements added to this array appear in the alias list; unsetting array
+elements cause aliases to be removed from the alias list.
+
+@item BASH_ARGC
+An array variable whose values are the number of parameters in each
+frame of the current bash execution call stack. The number of
+parameters to the current subroutine (shell function or script executed
+with @code{.} or @code{source}) is at the top of the stack. When a
+subroutine is executed, the number of parameters passed is pushed onto
+@code{BASH_ARGC}.
+The shell sets @code{BASH_ARGC} only when in extended debugging mode
+(see @ref{The Shopt Builtin}
+for a description of the @code{extdebug} option to the @code{shopt}
+builtin).
+
+@item BASH_ARGV
+An array variable containing all of the parameters in the current bash
+execution call stack. The final parameter of the last subroutine call
+is at the top of the stack; the first parameter of the initial call is
+at the bottom. When a subroutine is executed, the parameters supplied
+are pushed onto @code{BASH_ARGV}.
+The shell sets @code{BASH_ARGV} only when in extended debugging mode
+(see @ref{The Shopt Builtin}
+for a description of the @code{extdebug} option to the @code{shopt}
+builtin).
+
+@item BASH_CMDS
+An associative array variable whose members correspond to the internal
+hash table of commands as maintained by the @code{hash} builtin
+(@pxref{Bourne Shell Builtins}).
+Elements added to this array appear in the hash table; unsetting array
+elements cause commands to be removed from the hash table.
+
+@item BASH_COMMAND
+The command currently being executed or about to be executed, unless the
+shell is executing a command as the result of a trap,
+in which case it is the command executing at the time of the trap.
+
+@item BASH_ENV
+If this variable is set when Bash is invoked to execute a shell
+script, its value is expanded and used as the name of a startup file
+to read before executing the script. @xref{Bash Startup Files}.
+
+@item BASH_EXECUTION_STRING
+The command argument to the @option{-c} invocation option.
+
+@item BASH_LINENO
+An array variable whose members are the line numbers in source files
+corresponding to each member of @var{FUNCNAME}.
+@code{$@{BASH_LINENO[$i]@}} is the line number in the source file where
+@code{$@{FUNCNAME[$i]@}} was called (or @code{$@{BASH_LINENO[$i-1]@}} if
+referenced within another shell function).
+The corresponding source file name is @code{$@{BASH_SOURCE[$i]@}}.
+Use @code{LINENO} to obtain the current line number.
+
+@item BASH_REMATCH
+An array variable whose members are assigned by the @samp{=~} binary
+operator to the @code{[[} conditional command
+(@pxref{Conditional Constructs}).
+The element with index 0 is the portion of the string
+matching the entire regular expression.
+The element with index @var{n} is the portion of the
+string matching the @var{n}th parenthesized subexpression.
+This variable is read-only.
+
+@item BASH_SOURCE
+An array variable whose members are the source filenames corresponding
+to the elements in the @code{FUNCNAME} array variable.
+
+@item BASH_SUBSHELL
+Incremented by one each time a subshell or subshell environment is spawned.
+The initial value is 0.
+
+@item BASH_VERSINFO
+A readonly array variable (@pxref{Arrays})
+whose members hold version information for this instance of Bash.
+The values assigned to the array members are as follows:
+
+@table @code
+
+@item BASH_VERSINFO[0]
+The major version number (the @var{release}).
+
+@item BASH_VERSINFO[1]
+The minor version number (the @var{version}).
+
+@item BASH_VERSINFO[2]
+The patch level.
+
+@item BASH_VERSINFO[3]
+The build version.
+
+@item BASH_VERSINFO[4]
+The release status (e.g., @var{beta1}).
+
+@item BASH_VERSINFO[5]
+The value of @env{MACHTYPE}.
+
+@end table
+
+@item BASH_VERSION
+The version number of the current instance of Bash.
+
+@item BASH_XTRACEFD
+If set to an integer corresponding to a valid file descriptor, Bash
+will write the trace output generated when @samp{set -x}
+is enabled to that file descriptor.
+This allows tracing output to be separated from diagnostic and error
+messages.
+The file descriptor is closed when @code{BASH_XTRACEFD} is unset or assigned
+a new value.
+Unsetting @code{BASH_XTRACEFD} or assigning it the empty string causes the
+trace output to be sent to the standard error.
+Note that setting @code{BASH_XTRACEFD} to 2 (the standard error file
+descriptor) and then unsetting it will result in the standard error
+being closed.
+
+@item COLUMNS
+Used by the @code{select} builtin command to determine the terminal width
+when printing selection lists. Automatically set upon receipt of a
+@code{SIGWINCH}.
+
+@item COMP_CWORD
+An index into @env{$@{COMP_WORDS@}} of the word containing the current
+cursor position.
+This variable is available only in shell functions invoked by the
+programmable completion facilities (@pxref{Programmable Completion}).
+
+@item COMP_LINE
+The current command line.
+This variable is available only in shell functions and external
+commands invoked by the
+programmable completion facilities (@pxref{Programmable Completion}).
+
+@item COMP_POINT
+The index of the current cursor position relative to the beginning of
+the current command.
+If the current cursor position is at the end of the current command,
+the value of this variable is equal to @code{$@{#COMP_LINE@}}.
+This variable is available only in shell functions and external
+commands invoked by the
+programmable completion facilities (@pxref{Programmable Completion}).
+
+@item COMP_TYPE
+Set to an integer value corresponding to the type of completion attempted
+that caused a completion function to be called:
+@var{TAB}, for normal completion,
+@samp{?}, for listing completions after successive tabs,
+@samp{!}, for listing alternatives on partial word completion,
+@samp{@@}, to list completions if the word is not unmodified,
+or
+@samp{%}, for menu completion.
+This variable is available only in shell functions and external
+commands invoked by the
+programmable completion facilities (@pxref{Programmable Completion}).
+
+@item COMP_KEY
+The key (or final key of a key sequence) used to invoke the current
+completion function.
+
+@item COMP_WORDBREAKS
+The set of characters that the Readline library treats as word
+separators when performing word completion.
+If @code{COMP_WORDBREAKS} is unset, it loses its special properties,
+even if it is subsequently reset.
+
+@item COMP_WORDS
+An array variable consisting of the individual
+words in the current command line.
+The line is split into words as Readline would split it, using
+@code{COMP_WORDBREAKS} as described above.
+This variable is available only in shell functions invoked by the
+programmable completion facilities (@pxref{Programmable Completion}).
+
+@item COMPREPLY
+An array variable from which Bash reads the possible completions
+generated by a shell function invoked by the programmable completion
+facility (@pxref{Programmable Completion}).
+
+@item DIRSTACK
+An array variable containing the current contents of the directory stack.
+Directories appear in the stack in the order they are displayed by the
+@code{dirs} builtin.
+Assigning to members of this array variable may be used to modify
+directories already in the stack, but the @code{pushd} and @code{popd}
+builtins must be used to add and remove directories.
+Assignment to this variable will not change the current directory.
+If @env{DIRSTACK} is unset, it loses its special properties, even if
+it is subsequently reset.
+
+@item EMACS
+If Bash finds this variable in the environment when the shell
+starts with value @samp{t}, it assumes that the shell is running in an
+emacs shell buffer and disables line editing.
+
+@item EUID
+The numeric effective user id of the current user. This variable
+is readonly.
+
+@item FCEDIT
+The editor used as a default by the @option{-e} option to the @code{fc}
+builtin command.
+
+@item FIGNORE
+A colon-separated list of suffixes to ignore when performing
+filename completion.
+A file name whose suffix matches one of the entries in
+@env{FIGNORE}
+is excluded from the list of matched file names. A sample
+value is @samp{.o:~}
+
+@item FUNCNAME
+An array variable containing the names of all shell functions
+currently in the execution call stack.
+The element with index 0 is the name of any currently-executing
+shell function.
+The bottom-most element is @code{"main"}.
+This variable exists only when a shell function is executing.
+Assignments to @env{FUNCNAME} have no effect and return an error status.
+If @env{FUNCNAME} is unset, it loses its special properties, even if
+it is subsequently reset.
+
+@item GLOBIGNORE
+A colon-separated list of patterns defining the set of filenames to
+be ignored by filename expansion.
+If a filename matched by a filename expansion pattern also matches one
+of the patterns in @env{GLOBIGNORE}, it is removed from the list
+of matches.
+
+@item GROUPS
+An array variable containing the list of groups of which the current
+user is a member.
+Assignments to @env{GROUPS} have no effect and return an error status.
+If @env{GROUPS} is unset, it loses its special properties, even if it is
+subsequently reset.
+
+@item histchars
+Up to three characters which control history expansion, quick
+substitution, and tokenization (@pxref{History Interaction}).
+The first character is the
+@var{history expansion} character, that is, the character which signifies the
+start of a history expansion, normally @samp{!}. The second character is the
+character which signifies `quick substitution' when seen as the first
+character on a line, normally @samp{^}. The optional third character is the
+character which indicates that the remainder of the line is a comment when
+found as the first character of a word, usually @samp{#}. The history
+comment character causes history substitution to be skipped for the
+remaining words on the line. It does not necessarily cause the shell
+parser to treat the rest of the line as a comment.
+
+@item HISTCMD
+The history number, or index in the history list, of the current
+command. If @env{HISTCMD} is unset, it loses its special properties,
+even if it is subsequently reset.
+
+@item HISTCONTROL
+A colon-separated list of values controlling how commands are saved on
+the history list.
+If the list of values includes @samp{ignorespace}, lines which begin
+with a space character are not saved in the history list.
+A value of @samp{ignoredups} causes lines which match the previous
+history entry to not be saved.
+A value of @samp{ignoreboth} is shorthand for
+@samp{ignorespace} and @samp{ignoredups}.
+A value of @samp{erasedups} causes all previous lines matching the
+current line to be removed from the history list before that line
+is saved.
+Any value not in the above list is ignored.
+If @env{HISTCONTROL} is unset, or does not include a valid value,
+all lines read by the shell parser are saved on the history list,
+subject to the value of @env{HISTIGNORE}.
+The second and subsequent lines of a multi-line compound command are
+not tested, and are added to the history regardless of the value of
+@env{HISTCONTROL}.
+
+@item HISTFILE
+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 history file is also truncated to this size after
+writing it when an interactive shell exits.
+The default value is 500.
+
+@item HISTIGNORE
+A colon-separated list of patterns used to decide which command
+lines should be saved on the history list. Each pattern is
+anchored at the beginning of the line and must match the complete
+line (no implicit @samp{*} is appended). Each pattern is tested
+against the line after the checks specified by @env{HISTCONTROL}
+are applied. In addition to the normal shell pattern matching
+characters, @samp{&} matches the previous history line. @samp{&}
+may be escaped using a backslash; the backslash is removed
+before attempting a match.
+The second and subsequent lines of a multi-line compound command are
+not tested, and are added to the history regardless of the value of
+@env{HISTIGNORE}.
+
+@env{HISTIGNORE} subsumes the function of @env{HISTCONTROL}. A
+pattern of @samp{&} is identical to @code{ignoredups}, and a
+pattern of @samp{[ ]*} is identical to @code{ignorespace}.
+Combining these two patterns, separating them with a colon,
+provides the functionality of @code{ignoreboth}.
+
+@item HISTSIZE
+The maximum number of commands to remember on the history list.
+The default value is 500.
+
+@item HISTTIMEFORMAT
+If this variable is set and not null, its value is used as a format string
+for @var{strftime} to print the time stamp associated with each history
+entry displayed by the @code{history} builtin.
+If this variable is set, time stamps are written to the history file so
+they may be preserved across shell sessions.
+This uses the history comment character to distinguish timestamps from
+other history lines.
+
+@item HOSTFILE
+Contains the name of a file in the same format as @file{/etc/hosts} that
+should be read when the shell needs to complete a hostname.
+The list of possible hostname completions may be changed while the shell
+is running;
+the next time hostname completion is attempted after the
+value is changed, Bash adds the contents of the new file to the
+existing list.
+If @env{HOSTFILE} is set, but has no value, or does not name a readable file,
+Bash attempts to read
+@file{/etc/hosts} to obtain the list of possible hostname completions.
+When @env{HOSTFILE} is unset, the hostname list is cleared.
+
+@item HOSTNAME
+The name of the current host.
+
+@item HOSTTYPE
+A string describing the machine Bash is running on.
+
+@item IGNOREEOF
+Controls the action of the shell on receipt of an @code{EOF} character
+as the sole input. If set, the value denotes the number
+of consecutive @code{EOF} characters that can be read as the
+first character on an input line
+before the shell will exit. If the variable exists but does not
+have a numeric value (or has no value) then the default is 10.
+If the variable does not exist, then @code{EOF} signifies the end of
+input to the shell. This is only in effect for interactive shells.
+
+@item INPUTRC
+The name of the Readline initialization file, overriding the default
+of @file{~/.inputrc}.
+
+@item LANG
+Used to determine the locale category for any category not specifically
+selected with a variable starting with @code{LC_}.
+
+@item LC_ALL
+This variable overrides the value of @env{LANG} and any other
+@code{LC_} variable specifying a locale category.
+
+@item LC_COLLATE
+This variable determines the collation order used when sorting the
+results of filename expansion, and
+determines the behavior of range expressions, equivalence classes,
+and collating sequences within filename expansion and pattern matching
+(@pxref{Filename Expansion}).
+
+@item LC_CTYPE
+This variable determines the interpretation of characters and the
+behavior of character classes within filename expansion and pattern
+matching (@pxref{Filename Expansion}).
+
+@item LC_MESSAGES
+This variable determines the locale used to translate double-quoted
+strings preceded by a @samp{$} (@pxref{Locale Translation}).
+
+@item LC_NUMERIC
+This variable determines the locale category used for number formatting.
+
+@item LINENO
+The line number in the script or shell function currently executing.
+
+@item LINES
+Used by the @code{select} builtin command to determine the column length
+for printing selection lists. Automatically set upon receipt of a
+@code{SIGWINCH}.
+
+@item MACHTYPE
+A string that fully describes the system type on which Bash
+is executing, in the standard @sc{gnu} @var{cpu-company-system} format.
+
+@item MAILCHECK
+How often (in seconds) that the shell should check for mail in the
+files specified in the @env{MAILPATH} or @env{MAIL} variables.
+The default is 60 seconds. When it is time to check
+for mail, the shell does so before displaying the primary prompt.
+If this variable is unset, or set to a value that is not a number
+greater than or equal to zero, the shell disables mail checking.
+
+@item OLDPWD
+The previous working directory as set by the @code{cd} builtin.
+
+@item OPTERR
+If set to the value 1, Bash displays error messages
+generated by the @code{getopts} builtin command.
+
+@item OSTYPE
+A string describing the operating system Bash is running on.
+
+@item PIPESTATUS
+An array variable (@pxref{Arrays})
+containing a list of exit status values from the processes
+in the most-recently-executed foreground pipeline (which may
+contain only a single command).
+
+@item POSIXLY_CORRECT
+If this variable is in the environment when @code{bash} starts, the shell
+enters @sc{posix} mode (@pxref{Bash POSIX Mode}) before reading the
+startup files, as if the @option{--posix} invocation option had been supplied.
+If it is set while the shell is running, @code{bash} enables @sc{posix} mode,
+as if the command
+@example
+@code{set -o posix}
+@end example
+@noindent
+had been executed.
+
+@item PPID
+The process @sc{id} of the shell's parent process. This variable
+is readonly.
+
+@item PROMPT_COMMAND
+If set, the value is interpreted as a command to execute
+before the printing of each primary prompt (@env{$PS1}).
+
+@item PROMPT_DIRTRIM
+If set to a number greater than zero, the value is used as the number of
+trailing directory components to retain when expanding the @code{\w} and
+@code{\W} prompt string escapes (@pxref{Printing a Prompt}).
+Characters removed are replaced with an ellipsis.
+
+@item PS3
+The value of this variable is used as the prompt for the
+@code{select} command. If this variable is not set, the
+@code{select} command prompts with @samp{#? }
+
+@item PS4
+The value is the prompt printed before the command line is echoed
+when the @option{-x} option is set (@pxref{The Set Builtin}).
+The first character of @env{PS4} is replicated multiple times, as
+necessary, to indicate multiple levels of indirection.
+The default is @samp{+ }.
+
+@item PWD
+The current working directory as set by the @code{cd} builtin.
+
+@item RANDOM
+Each time this parameter is referenced, a random integer
+between 0 and 32767 is generated. Assigning a value to this
+variable seeds the random number generator.
+
+@item REPLY
+The default variable for the @code{read} builtin.
+
+@item SECONDS
+This variable expands to the number of seconds since the
+shell was started. Assignment to this variable resets
+the count to the value assigned, and the expanded value
+becomes the value assigned plus the number of seconds
+since the assignment.
+
+@item SHELL
+The full pathname to the shell is kept in this environment variable.
+If it is not set when the shell starts,
+Bash assigns to it the full pathname of the current user's login shell.
+
+@item SHELLOPTS
+A colon-separated list of enabled shell options. Each word in
+the list is a valid argument for the @option{-o} option to the
+@code{set} builtin command (@pxref{The Set Builtin}).
+The options appearing in @env{SHELLOPTS} are those reported
+as @samp{on} by @samp{set -o}.
+If this variable is in the environment when Bash
+starts up, each shell option in the list will be enabled before
+reading any startup files. This variable is readonly.
+
+@item SHLVL
+Incremented by one each time a new instance of Bash is started. This is
+intended to be a count of how deeply your Bash shells are nested.
+
+@item TIMEFORMAT
+The value of this parameter is used as a format string specifying
+how the timing information for pipelines prefixed with the @code{time}
+reserved word should be displayed.
+The @samp{%} character introduces an
+escape sequence that is expanded to a time value or other
+information.
+The escape sequences and their meanings are as
+follows; the braces denote optional portions.
+
+@table @code
+
+@item %%
+A literal @samp{%}.
+
+@item %[@var{p}][l]R
+The elapsed time in seconds.
+
+@item %[@var{p}][l]U
+The number of CPU seconds spent in user mode.
+
+@item %[@var{p}][l]S
+The number of CPU seconds spent in system mode.
+
+@item %P
+The CPU percentage, computed as (%U + %S) / %R.
+@end table
+
+The optional @var{p} is a digit specifying the precision, the number of
+fractional digits after a decimal point.
+A value of 0 causes no decimal point or fraction to be output.
+At most three places after the decimal point may be specified; values
+of @var{p} greater than 3 are changed to 3.
+If @var{p} is not specified, the value 3 is used.
+
+The optional @code{l} specifies a longer format, including minutes, of
+the form @var{MM}m@var{SS}.@var{FF}s.
+The value of @var{p} determines whether or not the fraction is included.
+
+If this variable is not set, Bash acts as if it had the value
+@example
+@code{$'\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS'}
+@end example
+If the value is null, no timing information is displayed.
+A trailing newline is added when the format string is displayed.
+
+@item TMOUT
+If set to a value greater than zero, @code{TMOUT} is treated as the
+default timeout for the @code{read} builtin (@pxref{Bash Builtins}).
+The @code{select} command (@pxref{Conditional Constructs}) terminates
+if input does not arrive after @code{TMOUT} seconds when input is coming
+from a terminal.
+
+In an interactive shell, the value is interpreted as
+the number of seconds to wait for input after issuing the primary
+prompt when the shell is interactive.
+Bash terminates after that number of seconds if input does
+not arrive.
+
+@item TMPDIR
+If set, Bash uses its value as the name of a directory in which
+Bash creates temporary files for the shell's use.
+
+@item UID
+The numeric real user id of the current user. This variable is readonly.
+
+@end vtable
+
+@node Bash Features
+@chapter Bash Features
+
+This section describes features unique to Bash.
+
+@menu
+* Invoking Bash:: Command line options that you can give
+ to Bash.
+* Bash Startup Files:: When and how Bash executes scripts.
+* Interactive Shells:: What an interactive shell is.
+* Bash Conditional Expressions:: Primitives used in composing expressions for
+ the @code{test} builtin.
+* Shell Arithmetic:: Arithmetic on shell variables.
+* Aliases:: Substituting one command for another.
+* Arrays:: Array Variables.
+* The Directory Stack:: History of visited directories.
+* Printing a Prompt:: Controlling the PS1 string.
+* The Restricted Shell:: A more controlled mode of shell execution.
+* Bash POSIX Mode:: Making Bash behave more closely to what
+ the POSIX standard specifies.
+@end menu
+
+@node Invoking Bash
+@section Invoking Bash
+
+@example
+bash [long-opt] [-ir] [-abefhkmnptuvxdBCDHP] [-o @var{option}] [-O @var{shopt_option}] [@var{argument} @dots{}]
+bash [long-opt] [-abefhkmnptuvxdBCDHP] [-o @var{option}] [-O @var{shopt_option}] -c @var{string} [@var{argument} @dots{}]
+bash [long-opt] -s [-abefhkmnptuvxdBCDHP] [-o @var{option}] [-O @var{shopt_option}] [@var{argument} @dots{}]
+@end example
+
+In addition to the single-character shell command-line options
+(@pxref{The Set Builtin}), there are several multi-character
+options that you can use. These options must appear on the command
+line before the single-character options to be recognized.
+
+@table @code
+@item --debugger
+Arrange for the debugger profile to be executed before the shell
+starts. Turns on extended debugging mode (see @ref{The Shopt Builtin}
+for a description of the @code{extdebug} option to the @code{shopt}
+builtin) and shell function tracing
+(see @ref{The Set Builtin} for a description of the @code{-o functrace}
+option).
+
+@item --dump-po-strings
+A list of all double-quoted strings preceded by @samp{$}
+is printed on the standard output
+in the @sc{gnu} @code{gettext} PO (portable object) file format.
+Equivalent to @option{-D} except for the output format.
+
+@item --dump-strings
+Equivalent to @option{-D}.
+
+@item --help
+Display a usage message on standard output and exit successfully.
+
+@item --init-file @var{filename}
+@itemx --rcfile @var{filename}
+Execute commands from @var{filename} (instead of @file{~/.bashrc})
+in an interactive shell.
+
+@item --login
+Equivalent to @option{-l}.
+
+@item --noediting
+Do not use the @sc{gnu} Readline library (@pxref{Command Line Editing})
+to read command lines when the shell is interactive.
+
+@item --noprofile
+Don't load the system-wide startup file @file{/etc/profile}
+or any of the personal initialization files
+@file{~/.bash_profile}, @file{~/.bash_login}, or @file{~/.profile}
+when Bash is invoked as a login shell.
+
+@item --norc
+Don't read the @file{~/.bashrc} initialization file in an
+interactive shell. This is on by default if the shell is
+invoked as @code{sh}.
+
+@item --posix
+Change the behavior of Bash where the default operation differs
+from the @sc{posix} standard to match the standard. This
+is intended to make Bash behave as a strict superset of that
+standard. @xref{Bash POSIX Mode}, for a description of the Bash
+@sc{posix} mode.
+
+@item --restricted
+Make the shell a restricted shell (@pxref{The Restricted Shell}).
+
+@item --verbose
+Equivalent to @option{-v}. Print shell input lines as they're read.
+
+@item --version
+Show version information for this instance of
+Bash on the standard output and exit successfully.
+
+@end table
+
+There are several single-character options that may be supplied at
+invocation which are not available with the @code{set} builtin.
+
+@table @code
+@item -c @var{string}
+Read and execute commands from @var{string} after processing the
+options, then exit. Any remaining arguments are assigned to the
+positional parameters, starting with @code{$0}.
+
+@item -i
+Force the shell to run interactively. Interactive shells are
+described in @ref{Interactive Shells}.
+
+@item -l
+Make this shell act as if it had been directly invoked by login.
+When the shell is interactive, this is equivalent to starting a
+login shell with @samp{exec -l bash}.
+When the shell is not interactive, the login shell startup files will
+be executed.
+@samp{exec bash -l} or @samp{exec bash --login}
+will replace the current shell with a Bash login shell.
+@xref{Bash Startup Files}, for a description of the special behavior
+of a login shell.
+
+@item -r
+Make the shell a restricted shell (@pxref{The Restricted Shell}).
+
+@item -s
+If this option is present, or if no arguments remain after option
+processing, then commands are read from the standard input.
+This option allows the positional parameters to be set
+when invoking an interactive shell.
+
+@item -D
+A list of all double-quoted strings preceded by @samp{$}
+is printed on the standard output.
+These are the strings that
+are subject to language translation when the current locale
+is not @code{C} or @code{POSIX} (@pxref{Locale Translation}).
+This implies the @option{-n} option; no commands will be executed.
+
+@item [-+]O [@var{shopt_option}]
+@var{shopt_option} is one of the shell options accepted by the
+@code{shopt} builtin (@pxref{The Shopt Builtin}).
+If @var{shopt_option} is present, @option{-O} sets the value of that option;
+@option{+O} unsets it.
+If @var{shopt_option} is not supplied, the names and values of the shell
+options accepted by @code{shopt} are printed on the standard output.
+If the invocation option is @option{+O}, the output is displayed in a format
+that may be reused as input.
+
+@item --
+A @code{--} signals the end of options and disables further option
+processing.
+Any arguments after the @code{--} are treated as filenames and arguments.
+
+@end table
+
+@cindex login shell
+A @emph{login} shell is one whose first character of argument zero is
+@samp{-}, or one invoked with the @option{--login} option.
+
+@cindex interactive shell
+An @emph{interactive} shell is one started without non-option arguments,
+unless @option{-s} is specified,
+without specifying the @option{-c} option, and whose input and output are both
+connected to terminals (as determined by @code{isatty(3)}), or one
+started with the @option{-i} option. @xref{Interactive Shells}, for more
+information.
+
+If arguments remain after option processing, and neither the
+@option{-c} nor the @option{-s}
+option has been supplied, the first argument is assumed to
+be the name of a file containing shell commands (@pxref{Shell Scripts}).
+When Bash is invoked in this fashion, @code{$0}
+is set to the name of the file, and the positional parameters
+are set to the remaining arguments.
+Bash reads and executes commands from this file, then exits.
+Bash's exit status is the exit status of the last command executed
+in the script. If no commands are executed, the exit status is 0.
+
+@node Bash Startup Files
+@section Bash Startup Files
+@cindex startup files
+
+This section describes how Bash executes its startup files.
+If any of the files exist but cannot be read, Bash reports an error.
+Tildes are expanded in file names as described above under
+Tilde Expansion (@pxref{Tilde Expansion}).
+
+Interactive shells are described in @ref{Interactive Shells}.
+
+@subsubheading Invoked as an interactive login shell, or with @option{--login}
+
+When Bash is invoked as an interactive login shell, or as a
+non-interactive shell with the @option{--login} option, it first reads and
+executes commands from the file @file{/etc/profile}, if that file exists.
+After reading that file, it looks for @file{~/.bash_profile},
+@file{~/.bash_login}, and @file{~/.profile}, in that order, and reads
+and executes commands from the first one that exists and is readable.
+The @option{--noprofile} option may be used when the shell is started to
+inhibit this behavior.
+
+When a login shell exits, Bash reads and executes commands from
+the file @file{~/.bash_logout}, if it exists.
+
+@subsubheading Invoked as an interactive non-login shell
+
+When an interactive shell that is not a login shell is started, Bash
+reads and executes commands from @file{~/.bashrc}, if that file exists.
+This may be inhibited by using the @option{--norc} option.
+The @option{--rcfile @var{file}} option will force Bash to read and
+execute commands from @var{file} instead of @file{~/.bashrc}.
+
+So, typically, your @file{~/.bash_profile} contains the line
+@example
+@code{if [ -f ~/.bashrc ]; then . ~/.bashrc; fi}
+@end example
+@noindent
+after (or before) any login-specific initializations.
+
+@subsubheading Invoked non-interactively
+
+When Bash is started non-interactively, to run a shell script,
+for example, it looks for the variable @env{BASH_ENV} in the environment,
+expands its value if it appears there, and uses the expanded value as
+the name of a file to read and execute. Bash behaves as if the
+following command were executed:
+@example
+@code{if [ -n "$BASH_ENV" ]; then . "$BASH_ENV"; fi}
+@end example
+@noindent
+but the value of the @env{PATH} variable is not used to search for the
+file name.
+
+As noted above, if a non-interactive shell is invoked with the
+@option{--login} option, Bash attempts to read and execute commands from the
+login shell startup files.
+
+@subsubheading Invoked with name @code{sh}
+
+If Bash is invoked with the name @code{sh}, it tries to mimic the
+startup behavior of historical versions of @code{sh} as closely as
+possible, while conforming to the @sc{posix} standard as well.
+
+When invoked as an interactive login shell, or as a non-interactive
+shell with the @option{--login} option, it first attempts to read
+and execute commands from @file{/etc/profile} and @file{~/.profile}, in
+that order.
+The @option{--noprofile} option may be used to inhibit this behavior.
+When invoked as an interactive shell with the name @code{sh}, Bash
+looks for the variable @env{ENV}, expands its value if it is defined,
+and uses the expanded value as the name of a file to read and execute.
+Since a shell invoked as @code{sh} does not attempt to read and execute
+commands from any other startup files, the @option{--rcfile} option has
+no effect.
+A non-interactive shell invoked with the name @code{sh} does not attempt
+to read any other startup files.
+
+When invoked as @code{sh}, Bash enters @sc{posix} mode after
+the startup files are read.
+
+@subsubheading Invoked in @sc{posix} mode
+
+When Bash is started in @sc{posix} mode, as with the
+@option{--posix} command line option, it follows the @sc{posix} standard
+for startup files.
+In this mode, interactive shells expand the @env{ENV} variable
+and commands are read and executed from the file whose name is the
+expanded value.
+No other startup files are read.
+
+@subsubheading Invoked by remote shell daemon
+
+Bash attempts to determine when it is being run with its standard input
+connected to a a network connection, as if by the remote shell
+daemon, usually @code{rshd}, or the secure shell daemon @code{sshd}.
+If Bash determines it is being run in
+this fashion, it reads and executes commands from @file{~/.bashrc}, if that
+file exists and is readable.
+It will not do this if invoked as @code{sh}.
+The @option{--norc} option may be used to inhibit this behavior, and the
+@option{--rcfile} option may be used to force another file to be read, but
+@code{rshd} does not generally invoke the shell with those options or
+allow them to be specified.
+
+@subsubheading Invoked with unequal effective and real @sc{uid/gid}s
+
+If Bash is started with the effective user (group) id not equal to the
+real user (group) id, and the @code{-p} option is not supplied, no startup
+files are read, shell functions are not inherited from the environment,
+the @env{SHELLOPTS}, @env{BASHOPTS}, @env{CDPATH}, and @env{GLOBIGNORE}
+variables, if they appear in the environment, are ignored, and the effective
+user id is set to the real user id.
+If the @code{-p} option is supplied at invocation, the startup behavior is
+the same, but the effective user id is not reset.
+
+@node Interactive Shells
+@section Interactive Shells
+@cindex interactive shell
+@cindex shell, interactive
+
+@menu
+* What is an Interactive Shell?:: What determines whether a shell is Interactive.
+* Is this Shell Interactive?:: How to tell if a shell is interactive.
+* Interactive Shell Behavior:: What changes in a interactive shell?
+@end menu
+
+@node What is an Interactive Shell?
+@subsection What is an Interactive Shell?
+
+An interactive shell
+is one started without non-option arguments, unless @option{-s} is
+specified, without specifying the @option{-c} option, and
+whose input and error output are both
+connected to terminals (as determined by @code{isatty(3)}),
+or one started with the @option{-i} option.
+
+An interactive shell generally reads from and writes to a user's
+terminal.
+
+The @option{-s} invocation option may be used to set the positional parameters
+when an interactive shell is started.
+
+@node Is this Shell Interactive?
+@subsection Is this Shell Interactive?
+
+To determine within a startup script whether or not Bash is
+running interactively,
+test the value of the @samp{-} special parameter.
+It contains @code{i} when the shell is interactive. For example:
+
+@example
+case "$-" in
+*i*) echo This shell is interactive ;;
+*) echo This shell is not interactive ;;
+esac
+@end example
+
+Alternatively, startup scripts may examine the variable
+@env{PS1}; it is unset in non-interactive shells, and set in
+interactive shells. Thus:
+
+@example
+if [ -z "$PS1" ]; then
+ echo This shell is not interactive
+else
+ echo This shell is interactive
+fi
+@end example
+
+@node Interactive Shell Behavior
+@subsection Interactive Shell Behavior
+
+When the shell is running interactively, it changes its behavior in
+several ways.
+
+@enumerate
+@item
+Startup files are read and executed as described in @ref{Bash Startup Files}.
+
+@item
+Job Control (@pxref{Job Control}) is enabled by default. When job
+control is in effect, Bash ignores the keyboard-generated job control
+signals @code{SIGTTIN}, @code{SIGTTOU}, and @code{SIGTSTP}.
+
+@item
+Bash expands and displays @env{PS1} before reading the first line
+of a command, and expands and displays @env{PS2} before reading the
+second and subsequent lines of a multi-line command.
+
+@item
+Bash executes the value of the @env{PROMPT_COMMAND} variable as a command
+before printing the primary prompt, @env{$PS1}
+(@pxref{Bash Variables}).
+
+@item
+Readline (@pxref{Command Line Editing}) is used to read commands from
+the user's terminal.
+
+@item
+Bash inspects the value of the @code{ignoreeof} option to @code{set -o}
+instead of exiting immediately when it receives an @code{EOF} on its
+standard input when reading a command (@pxref{The Set Builtin}).
+
+@item
+Command history (@pxref{Bash History Facilities})
+and history expansion (@pxref{History Interaction})
+are enabled by default.
+Bash will save the command history to the file named by @env{$HISTFILE}
+when an interactive shell exits.
+
+@item
+Alias expansion (@pxref{Aliases}) is performed by default.
+
+@item
+In the absence of any traps, Bash ignores @code{SIGTERM}
+(@pxref{Signals}).
+
+@item
+In the absence of any traps, @code{SIGINT} is caught and handled
+((@pxref{Signals}).
+@code{SIGINT} will interrupt some shell builtins.
+
+@item
+An interactive login shell sends a @code{SIGHUP} to all jobs on exit
+if the @code{huponexit} shell option has been enabled (@pxref{Signals}).
+
+@item
+The @option{-n} invocation option is ignored, and @samp{set -n} has
+no effect (@pxref{The Set Builtin}).
+
+@item
+Bash will check for mail periodically, depending on the values of the
+@env{MAIL}, @env{MAILPATH}, and @env{MAILCHECK} shell variables
+(@pxref{Bash Variables}).
+
+@item
+Expansion errors due to references to unbound shell variables after
+@samp{set -u} has been enabled will not cause the shell to exit
+(@pxref{The Set Builtin}).
+
+@item
+The shell will not exit on expansion errors caused by @var{var} being unset
+or null in @code{$@{@var{var}:?@var{word}@}} expansions
+(@pxref{Shell Parameter Expansion}).
+
+@item
+Redirection errors encountered by shell builtins will not cause the
+shell to exit.
+
+@item
+When running in @sc{posix} mode, a special builtin returning an error
+status will not cause the shell to exit (@pxref{Bash POSIX Mode}).
+
+@item
+A failed @code{exec} will not cause the shell to exit
+(@pxref{Bourne Shell Builtins}).
+
+@item
+Parser syntax errors will not cause the shell to exit.
+
+@item
+Simple spelling correction for directory arguments to the @code{cd}
+builtin is enabled by default (see the description of the @code{cdspell}
+option to the @code{shopt} builtin in @ref{The Shopt Builtin}).
+
+@item
+The shell will check the value of the @env{TMOUT} variable and exit
+if a command is not read within the specified number of seconds after
+printing @env{$PS1} (@pxref{Bash Variables}).
+
+@end enumerate
+
+@node Bash Conditional Expressions
+@section Bash Conditional Expressions
+@cindex expressions, conditional
+
+Conditional expressions are used by the @code{[[} compound command
+and the @code{test} and @code{[} builtin commands.
+
+Expressions may be unary or binary.
+Unary expressions are often used to examine the status of a file.
+There are string operators and numeric comparison operators as well.
+If the @var{file} argument to one of the primaries is of the form
+@file{/dev/fd/@var{N}}, then file descriptor @var{N} is checked.
+If the @var{file} argument to one of the primaries is one of
+@file{/dev/stdin}, @file{/dev/stdout}, or @file{/dev/stderr}, file
+descriptor 0, 1, or 2, respectively, is checked.
+
+When used with @samp{[[}, The @samp{<} and @samp{>} operators sort
+lexicographically using the current locale.
+
+Unless otherwise specified, primaries that operate on files follow symbolic
+links and operate on the target of the link, rather than the link itself.
+
+@table @code
+@item -a @var{file}
+True if @var{file} exists.
+
+@item -b @var{file}
+True if @var{file} exists and is a block special file.
+
+@item -c @var{file}
+True if @var{file} exists and is a character special file.
+
+@item -d @var{file}
+True if @var{file} exists and is a directory.
+
+@item -e @var{file}
+True if @var{file} exists.
+
+@item -f @var{file}
+True if @var{file} exists and is a regular file.
+
+@item -g @var{file}
+True if @var{file} exists and its set-group-id bit is set.
+
+@item -h @var{file}
+True if @var{file} exists and is a symbolic link.
+
+@item -k @var{file}
+True if @var{file} exists and its "sticky" bit is set.
+
+@item -p @var{file}
+True if @var{file} exists and is a named pipe (FIFO).
+
+@item -r @var{file}
+True if @var{file} exists and is readable.
+
+@item -s @var{file}
+True if @var{file} exists and has a size greater than zero.
+
+@item -t @var{fd}
+True if file descriptor @var{fd} is open and refers to a terminal.
+
+@item -u @var{file}
+True if @var{file} exists and its set-user-id bit is set.
+
+@item -w @var{file}
+True if @var{file} exists and is writable.
+
+@item -x @var{file}
+True if @var{file} exists and is executable.
+
+@item -O @var{file}
+True if @var{file} exists and is owned by the effective user id.
+
+@item -G @var{file}
+True if @var{file} exists and is owned by the effective group id.
+
+@item -L @var{file}
+True if @var{file} exists and is a symbolic link.
+
+@item -S @var{file}
+True if @var{file} exists and is a socket.
+
+@item -N @var{file}
+True if @var{file} exists and has been modified since it was last read.
+
+@item @var{file1} -nt @var{file2}
+True if @var{file1} is newer (according to modification date)
+than @var{file2}, or if @var{file1} exists and @var{file2} does not.
+
+@item @var{file1} -ot @var{file2}
+True if @var{file1} is older than @var{file2},
+or if @var{file2} exists and @var{file1} does not.
+
+@item @var{file1} -ef @var{file2}
+True if @var{file1} and @var{file2} refer to the same device and
+inode numbers.
+
+@item -o @var{optname}
+True if shell option @var{optname} is enabled.
+The list of options appears in the description of the @option{-o}
+option to the @code{set} builtin (@pxref{The Set Builtin}).
+
+@item -z @var{string}
+True if the length of @var{string} is zero.
+
+@item -n @var{string}
+@itemx @var{string}
+True if the length of @var{string} is non-zero.
+
+@item @var{string1} == @var{string2}
+@itemx @var{string1} = @var{string2}
+True if the strings are equal.
+@samp{=} should be used with the @code{test} command for @sc{posix} conformance.
+
+@item @var{string1} != @var{string2}
+True if the strings are not equal.
+
+@item @var{string1} < @var{string2}
+True if @var{string1} sorts before @var{string2} lexicographically.
+
+@item @var{string1} > @var{string2}
+True if @var{string1} sorts after @var{string2} lexicographically.
+
+@item @var{arg1} OP @var{arg2}
+@code{OP} is one of
+@samp{-eq}, @samp{-ne}, @samp{-lt}, @samp{-le}, @samp{-gt}, or @samp{-ge}.
+These arithmetic binary operators return true if @var{arg1}
+is equal to, not equal to, less than, less than or equal to,
+greater than, or greater than or equal to @var{arg2},
+respectively. @var{Arg1} and @var{arg2}
+may be positive or negative integers.
+
+@end table
+
+@node Shell Arithmetic
+@section Shell Arithmetic
+@cindex arithmetic, shell
+@cindex shell arithmetic
+@cindex expressions, arithmetic
+@cindex evaluation, arithmetic
+@cindex arithmetic evaluation
+
+The shell allows arithmetic expressions to be evaluated, as one of
+the shell expansions or by the @code{let} and the @option{-i} option
+to the @code{declare} builtins.
+
+Evaluation is done in fixed-width integers with no check for overflow,
+though division by 0 is trapped and flagged as an error.
+The operators and their precedence, associativity, and values
+are the same as in the C language.
+The following list of operators is grouped into levels of
+equal-precedence operators.
+The levels are listed in order of decreasing precedence.
+
+@table @code
+
+@item @var{id}++ @var{id}--
+variable post-increment and post-decrement
+
+@item ++@var{id} --@var{id}
+variable pre-increment and pre-decrement
+
+@item - +
+unary minus and plus
+
+@item ! ~
+logical and bitwise negation
+
+@item **
+exponentiation
+
+@item * / %
+multiplication, division, remainder
+
+@item + -
+addition, subtraction
+
+@item << >>
+left and right bitwise shifts
+
+@item <= >= < >
+comparison
+
+@item == !=
+equality and inequality
+
+@item &
+bitwise AND
+
+@item ^
+bitwise exclusive OR
+
+@item |
+bitwise OR
+
+@item &&
+logical AND
+
+@item ||
+logical OR
+
+@item expr ? expr : expr
+conditional operator
+
+@item = *= /= %= += -= <<= >>= &= ^= |=
+assignment
+
+@item expr1 , expr2
+comma
+@end table
+
+Shell variables are allowed as operands; parameter expansion is
+performed before the expression is evaluated.
+Within an expression, shell variables may also be referenced by name
+without using the parameter expansion syntax.
+A shell variable that is null or unset evaluates to 0 when referenced
+by name without using the parameter expansion syntax.
+The value of a variable is evaluated as an arithmetic expression
+when it is referenced, or when a variable which has been given the
+@var{integer} attribute using @samp{declare -i} is assigned a value.
+A null value evaluates to 0.
+A shell variable need not have its integer attribute turned on
+to be used in an expression.
+
+Constants with a leading 0 are interpreted as octal numbers.
+A leading @samp{0x} or @samp{0X} denotes hexadecimal. Otherwise,
+numbers take the form [@var{base}@code{#}]@var{n}, where @var{base}
+is a decimal number between 2 and 64 representing the arithmetic
+base, and @var{n} is a number in that base. If @var{base}@code{#} is
+omitted, then base 10 is used.
+The digits greater than 9 are represented by the lowercase letters,
+the uppercase letters, @samp{@@}, and @samp{_}, in that order.
+If @var{base} is less than or equal to 36, lowercase and uppercase
+letters may be used interchangeably to represent numbers between 10
+and 35.
+
+Operators are evaluated in order of precedence. Sub-expressions in
+parentheses are evaluated first and may override the precedence
+rules above.
+
+@node Aliases
+@section Aliases
+@cindex alias expansion
+
+@var{Aliases} allow a string to be substituted for a word when it is used
+as the first word of a simple command.
+The shell maintains a list of aliases that may be set and unset with
+the @code{alias} and @code{unalias} builtin commands.
+
+The first word of each simple command, if unquoted, is checked to see
+if it has an alias.
+If so, that word is replaced by the text of the alias.
+The characters @samp{/}, @samp{$}, @samp{`}, @samp{=} and any of the
+shell metacharacters or quoting characters listed above may not appear
+in an alias name.
+The replacement text may contain any valid
+shell input, including shell metacharacters.
+The first word of the replacement text is tested for
+aliases, but a word that is identical to an alias being expanded
+is not expanded a second time.
+This means that one may alias @code{ls} to @code{"ls -F"},
+for instance, and Bash does not try to recursively expand the
+replacement text. If the last character of the alias value is a
+space or tab character, then the next command word following the
+alias is also checked for alias expansion.
+
+Aliases are created and listed with the @code{alias}
+command, and removed with the @code{unalias} command.
+
+There is no mechanism for using arguments in the replacement text,
+as in @code{csh}.
+If arguments are needed, a shell function should be used
+(@pxref{Shell Functions}).
+
+Aliases are not expanded when the shell is not interactive,
+unless the @code{expand_aliases} shell option is set using
+@code{shopt} (@pxref{The Shopt Builtin}).
+
+The rules concerning the definition and use of aliases are
+somewhat confusing. Bash
+always reads at least one complete line
+of input before executing any
+of the commands on that line. Aliases are expanded when a
+command is read, not when it is executed. Therefore, an
+alias definition appearing on the same line as another
+command does not take effect until the next line of input is read.
+The commands following the alias definition
+on that line are not affected by the new alias.
+This behavior is also an issue when functions are executed.
+Aliases are expanded when a function definition is read,
+not when the function is executed, because a function definition
+is itself a compound command. As a consequence, aliases
+defined in a function are not available until after that
+function is executed. To be safe, always put
+alias definitions on a separate line, and do not use @code{alias}
+in compound commands.
+
+For almost every purpose, shell functions are preferred over aliases.
+
+@node Arrays
+@section Arrays
+@cindex arrays
+
+Bash provides one-dimensional indexed and associative array variables.
+Any variable may be used as an indexed array;
+the @code{declare} builtin will explicitly declare an array.
+There is no maximum
+limit on the size of an array, nor any requirement that members
+be indexed or assigned contiguously.
+Indexed arrays are referenced using integers (including arithmetic
+expressions (@pxref{Shell Arithmetic}) and are zero-based;
+associative arrays use arbitrary strings.
+
+An indexed array is created automatically if any variable is assigned to
+using the syntax
+@example
+name[@var{subscript}]=@var{value}
+@end example
+
+@noindent
+The @var{subscript}
+is treated as an arithmetic expression that must evaluate to a number
+greater than or equal to zero. To explicitly declare an array, use
+@example
+declare -a @var{name}
+@end example
+@noindent
+The syntax
+@example
+declare -a @var{name}[@var{subscript}]
+@end example
+@noindent
+is also accepted; the @var{subscript} is ignored.
+
+Associative arrays are created using
+@example
+declare -A @var{name}.
+@end example
+
+Attributes may be
+specified for an array variable using the @code{declare} and
+@code{readonly} builtins. Each attribute applies to all members of
+an array.
+
+Arrays are assigned to using compound assignments of the form
+@example
+name=(value@var{1} @dots{} value@var{n})
+@end example
+@noindent
+where each
+@var{value} is of the form @code{[@var{subscript}]=}@var{string}.
+Indexed array assignments do not require the bracket and subscript.
+When assigning to indexed arrays, if
+the optional subscript is supplied, that index is assigned to;
+otherwise the index of the element assigned is the last index assigned
+to by the statement plus one. Indexing starts at zero.
+
+When assigning to an associative array, the subscript is required.
+
+This syntax is also accepted by the @code{declare}
+builtin. Individual array elements may be assigned to using the
+@code{name[}@var{subscript}@code{]=}@var{value} syntax introduced above.
+
+Any element of an array may be referenced using
+@code{$@{name[}@var{subscript}@code{]@}}.
+The braces are required to avoid
+conflicts with the shell's filename expansion operators. If the
+@var{subscript} is @samp{@@} or @samp{*}, the word expands to all members
+of the array @var{name}. These subscripts differ only when the word
+appears within double quotes.
+If the word is double-quoted,
+@code{$@{name[*]@}} expands to a single word with
+the value of each array member separated by the first character of the
+@env{IFS} variable, and @code{$@{name[@@]@}} expands each element of
+@var{name} to a separate word. When there are no array members,
+@code{$@{name[@@]@}} expands to nothing.
+If the double-quoted expansion occurs within a word, the expansion of
+the first parameter is joined with the beginning part of the original
+word, and the expansion of the last parameter is joined with the last
+part of the original word.
+This is analogous to the
+expansion of the special parameters @samp{@@} and @samp{*}.
+@code{$@{#name[}@var{subscript}@code{]@}} expands to the length of
+@code{$@{name[}@var{subscript}@code{]@}}.
+If @var{subscript} is @samp{@@} or
+@samp{*}, the expansion is the number of elements in the array.
+Referencing an array variable without a subscript is equivalent to
+referencing with a subscript of 0.
+
+An array variable is considered set if a subscript has been assigned a
+value. The null string is a valid value.
+
+The @code{unset} builtin is used to destroy arrays.
+@code{unset} @var{name}[@var{subscript}]
+destroys the array element at index @var{subscript}.
+Care must be taken to avoid unwanted side effects caused by filename
+expansion.
+@code{unset} @var{name}, where @var{name} is an array, removes the
+entire array. A subscript of @samp{*} or @samp{@@} also removes the
+entire array.
+
+The @code{declare}, @code{local}, and @code{readonly}
+builtins each accept a @option{-a} option to specify an indexed
+array and a @option{-A} option to specify an associative array.
+The @code{read} builtin accepts a @option{-a}
+option to assign a list of words read from the standard input
+to an array, and can read values from the standard input into
+individual array elements. The @code{set} and @code{declare}
+builtins display array values in a way that allows them to be
+reused as input.
+
+@node The Directory Stack
+@section The Directory Stack
+@cindex directory stack
+
+@menu
+* Directory Stack Builtins:: Bash builtin commands to manipulate
+ the directory stack.
+@end menu
+
+The directory stack is a list of recently-visited directories. The
+@code{pushd} builtin adds directories to the stack as it changes
+the current directory, and the @code{popd} builtin removes specified
+directories from the stack and changes the current directory to
+the directory removed. The @code{dirs} builtin displays the contents
+of the directory stack.
+
+The contents of the directory stack are also visible
+as the value of the @env{DIRSTACK} shell variable.
+
+@node Directory Stack Builtins
+@subsection Directory Stack Builtins
+
+@table @code
+
+@item dirs
+@btindex dirs
+@example
+dirs [+@var{N} | -@var{N}] [-clpv]
+@end example
+Display the list of currently remembered directories. Directories
+are added to the list with the @code{pushd} command; the
+@code{popd} command removes directories from the list.
+@table @code
+@item +@var{N}
+Displays the @var{N}th directory (counting from the left of the
+list printed by @code{dirs} when invoked without options), starting
+with zero.
+@item -@var{N}
+Displays the @var{N}th directory (counting from the right of the
+list printed by @code{dirs} when invoked without options), starting
+with zero.
+@item -c
+Clears the directory stack by deleting all of the elements.
+@item -l
+Produces a longer listing; the default listing format uses a
+tilde to denote the home directory.
+@item -p
+Causes @code{dirs} to print the directory stack with one entry per
+line.
+@item -v
+Causes @code{dirs} to print the directory stack with one entry per
+line, prefixing each entry with its index in the stack.
+@end table
+
+@item popd
+@btindex popd
+@example
+popd [+@var{N} | -@var{N}] [-n]
+@end example
+
+Remove the top entry from the directory stack, and @code{cd}
+to the new top directory.
+When no arguments are given, @code{popd}
+removes the top directory from the stack and
+performs a @code{cd} to the new top directory. The
+elements are numbered from 0 starting at the first directory listed with
+@code{dirs}; i.e., @code{popd} is equivalent to @code{popd +0}.
+@table @code
+@item +@var{N}
+Removes the @var{N}th directory (counting from the left of the
+list printed by @code{dirs}), starting with zero.
+@item -@var{N}
+Removes the @var{N}th directory (counting from the right of the
+list printed by @code{dirs}), starting with zero.
+@item -n
+Suppresses the normal change of directory when removing directories
+from the stack, so that only the stack is manipulated.
+@end table
+
+@btindex pushd
+@item pushd
+@example
+pushd [-n] [@var{+N} | @var{-N} | @var{dir} ]
+@end example
+
+Save the current directory on the top of the directory stack
+and then @code{cd} to @var{dir}.
+With no arguments, @code{pushd} exchanges the top two directories.
+
+@table @code
+@item -n
+Suppresses the normal change of directory when adding directories
+to the stack, so that only the stack is manipulated.
+@item +@var{N}
+Brings the @var{N}th directory (counting from the left of the
+list printed by @code{dirs}, starting with zero) to the top of
+the list by rotating the stack.
+@item -@var{N}
+Brings the @var{N}th directory (counting from the right of the
+list printed by @code{dirs}, starting with zero) to the top of
+the list by rotating the stack.
+@item @var{dir}
+Makes the current working directory be the top of the stack, and then
+executes the equivalent of `@code{cd} @var{dir}'.
+@code{cd}s to @var{dir}.
+@end table
+
+@end table
+
+@node Printing a Prompt
+@section Controlling the Prompt
+@cindex prompting
+
+The value of the variable @env{PROMPT_COMMAND} is examined just before
+Bash prints each primary prompt. If @env{PROMPT_COMMAND} is set and
+has a non-null value, then the
+value is executed just as if it had been typed on the command line.
+
+In addition, the following table describes the special characters which
+can appear in the prompt variables:
+
+@table @code
+@item \a
+A bell character.
+@item \d
+The date, in "Weekday Month Date" format (e.g., "Tue May 26").
+@item \D@{@var{format}@}
+The @var{format} is passed to @code{strftime}(3) and the result is inserted
+into the prompt string; an empty @var{format} results in a locale-specific
+time representation. The braces are required.
+@item \e
+An escape character.
+@item \h
+The hostname, up to the first `.'.
+@item \H
+The hostname.
+@item \j
+The number of jobs currently managed by the shell.
+@item \l
+The basename of the shell's terminal device name.
+@item \n
+A newline.
+@item \r
+A carriage return.
+@item \s
+The name of the shell, the basename of @code{$0} (the portion
+following the final slash).
+@item \t
+The time, in 24-hour HH:MM:SS format.
+@item \T
+The time, in 12-hour HH:MM:SS format.
+@item \@@
+The time, in 12-hour am/pm format.
+@item \A
+The time, in 24-hour HH:MM format.
+@item \u
+The username of the current user.
+@item \v
+The version of Bash (e.g., 2.00)
+@item \V
+The release of Bash, version + patchlevel (e.g., 2.00.0)
+@item \w
+The current working directory, with @env{$HOME} abbreviated with a tilde
+(uses the @env{$PROMPT_DIRTRIM} variable).
+@item \W
+The basename of @env{$PWD}, with @env{$HOME} abbreviated with a tilde.
+@item \!
+The history number of this command.
+@item \#
+The command number of this command.
+@item \$
+If the effective uid is 0, @code{#}, otherwise @code{$}.
+@item \@var{nnn}
+The character whose ASCII code is the octal value @var{nnn}.
+@item \\
+A backslash.
+@item \[
+Begin a sequence of non-printing characters. This could be used to
+embed a terminal control sequence into the prompt.
+@item \]
+End a sequence of non-printing characters.
+@end table
+
+The command number and the history number are usually different:
+the history number of a command is its position in the history
+list, which may include commands restored from the history file
+(@pxref{Bash History Facilities}), while the command number is
+the position in the sequence of commands executed during the current
+shell session.
+
+After the string is decoded, it is expanded via
+parameter expansion, command substitution, arithmetic
+expansion, and quote removal, subject to the value of the
+@code{promptvars} shell option (@pxref{Bash Builtins}).
+
+@node The Restricted Shell
+@section The Restricted Shell
+@cindex restricted shell
+
+If Bash is started with the name @code{rbash}, or the
+@option{--restricted}
+or
+@option{-r}
+option is supplied at invocation, the shell becomes restricted.
+A restricted shell is used to
+set up an environment more controlled than the standard shell.
+A restricted shell behaves identically to @code{bash}
+with the exception that the following are disallowed or not performed:
+
+@itemize @bullet
+@item
+Changing directories with the @code{cd} builtin.
+@item
+Setting or unsetting the values of the @env{SHELL}, @env{PATH},
+@env{ENV}, or @env{BASH_ENV} variables.
+@item
+Specifying command names containing slashes.
+@item
+Specifying a filename containing a slash as an argument to the @code{.}
+builtin command.
+@item
+Specifying a filename containing a slash as an argument to the @option{-p}
+option to the @code{hash} builtin command.
+@item
+Importing function definitions from the shell environment at startup.
+@item
+Parsing the value of @env{SHELLOPTS} from the shell environment at startup.
+@item
+Redirecting output using the @samp{>}, @samp{>|}, @samp{<>}, @samp{>&},
+@samp{&>}, and @samp{>>} redirection operators.
+@item
+Using the @code{exec} builtin to replace the shell with another command.
+@item
+Adding or deleting builtin commands with the
+@option{-f} and @option{-d} options to the @code{enable} builtin.
+@item
+Using the @code{enable} builtin command to enable disabled shell builtins.
+@item
+Specifying the @option{-p} option to the @code{command} builtin.
+@item
+Turning off restricted mode with @samp{set +r} or @samp{set +o restricted}.
+@end itemize
+
+These restrictions are enforced after any startup files are read.
+
+When a command that is found to be a shell script is executed
+(@pxref{Shell Scripts}), @code{rbash} turns off any restrictions in
+the shell spawned to execute the script.
+
+@node Bash POSIX Mode
+@section Bash POSIX Mode
+@cindex POSIX Mode
+
+Starting Bash with the @option{--posix} command-line option or executing
+@samp{set -o posix} while Bash is running will cause Bash to conform more
+closely to the @sc{posix} standard by changing the behavior to
+match that specified by @sc{posix} in areas where the Bash default differs.
+
+When invoked as @code{sh}, Bash enters @sc{posix} mode after reading the
+startup files.
+
+The following list is what's changed when `@sc{posix} mode' is in effect:
+
+@enumerate
+@item
+When a command in the hash table no longer exists, Bash will re-search
+@env{$PATH} to find the new location. This is also available with
+@samp{shopt -s checkhash}.
+
+@item
+The message printed by the job control code and builtins when a job
+exits with a non-zero status is `Done(status)'.
+
+@item
+The message printed by the job control code and builtins when a job
+is stopped is `Stopped(@var{signame})', where @var{signame} is, for
+example, @code{SIGTSTP}.
+
+@item
+The @code{bg} builtin uses the required format to describe each job placed
+in the background, which does not include an indication of whether the job
+is the current or previous job.
+
+@item
+Reserved words appearing in a context where reserved words are recognized
+do not undergo alias expansion.
+
+@item
+The @sc{posix} @env{PS1} and @env{PS2} expansions of @samp{!} to
+the history number and @samp{!!} to @samp{!} are enabled,
+and parameter expansion is performed on the values of @env{PS1} and
+@env{PS2} regardless of the setting of the @code{promptvars} option.
+
+@item
+The @sc{posix} startup files are executed (@env{$ENV}) rather than
+the normal Bash files.
+
+@item
+Tilde expansion is only performed on assignments preceding a command
+name, rather than on all assignment statements on the line.
+
+@item
+The default history file is @file{~/.sh_history} (this is the
+default value of @env{$HISTFILE}).
+
+@item
+The output of @samp{kill -l} prints all the signal names on a single line,
+separated by spaces, without the @samp{SIG} prefix.
+
+@item
+The @code{kill} builtin does not accept signal names with a @samp{SIG}
+prefix.
+
+@item
+Non-interactive shells exit if @var{filename} in @code{.} @var{filename}
+is not found.
+
+@item
+Non-interactive shells exit if a syntax error in an arithmetic expansion
+results in an invalid expression.
+
+@item
+Redirection operators do not perform filename expansion on the word
+in the redirection unless the shell is interactive.
+
+@item
+Redirection operators do not perform word splitting on the word in the
+redirection.
+
+@item
+Function names must be valid shell @code{name}s. That is, they may not
+contain characters other than letters, digits, and underscores, and
+may not start with a digit. Declaring a function with an invalid name
+causes a fatal syntax error in non-interactive shells.
+
+@item
+@sc{posix} special builtins are found before shell functions
+during command lookup.
+
+@item
+If a @sc{posix} special builtin returns an error status, a
+non-interactive shell exits. The fatal errors are those listed in
+the POSIX standard, and include things like passing incorrect options,
+redirection errors, variable assignment errors for assignments preceding
+the command name, and so on.
+
+@item
+If @env{CDPATH} is set, the @code{cd} builtin will not implicitly
+append the current directory to it. This means that @code{cd} will
+fail if no valid directory name can be constructed from
+any of the entries in @env{$CDPATH}, even if the a directory with
+the same name as the name given as an argument to @code{cd} exists
+in the current directory.
+
+@item
+A non-interactive shell exits with an error status if a variable
+assignment error occurs when no command name follows the assignment
+statements.
+A variable assignment error occurs, for example, when trying to assign
+a value to a readonly variable.
+
+@item
+A non-interactive shell exits with an error status if the iteration
+variable in a @code{for} statement or the selection variable in a
+@code{select} statement is a readonly variable.
+
+@item
+Process substitution is not available.
+
+@item
+Assignment statements preceding @sc{posix} special builtins
+persist in the shell environment after the builtin completes.
+
+@item
+Assignment statements preceding shell function calls persist in the
+shell environment after the function returns, as if a @sc{posix}
+special builtin command had been executed.
+
+@item
+The @code{export} and @code{readonly} builtin commands display their
+output in the format required by @sc{posix}.
+
+@item
+The @code{trap} builtin displays signal names without the leading
+@code{SIG}.
+
+@item
+The @code{trap} builtin doesn't check the first argument for a possible
+signal specification and revert the signal handling to the original
+disposition if it is, unless that argument consists solely of digits and
+is a valid signal number. If users want to reset the handler for a given
+signal to the original disposition, they should use @samp{-} as the
+first argument.
+
+@item
+The @code{.} and @code{source} builtins do not search the current directory
+for the filename argument if it is not found by searching @env{PATH}.
+
+@item
+Subshells spawned to execute command substitutions inherit the value of
+the @option{-e} option from the parent shell. When not in @sc{posix} mode,
+Bash clears the @option{-e} option in such subshells.
+
+@item
+Alias expansion is always enabled, even in non-interactive shells.
+
+@item
+When the @code{alias} builtin displays alias definitions, it does not
+display them with a leading @samp{alias } unless the @option{-p} option
+is supplied.
+
+@item
+When the @code{set} builtin is invoked without options, it does not display
+shell function names and definitions.
+
+@item
+When the @code{set} builtin is invoked without options, it displays
+variable values without quotes, unless they contain shell metacharacters,
+even if the result contains nonprinting characters.
+
+@item
+When the @code{cd} builtin is invoked in @var{logical} mode, and the pathname
+constructed from @code{$PWD} and the directory name supplied as an argument
+does not refer to an existing directory, @code{cd} will fail instead of
+falling back to @var{physical} mode.
+
+@item
+When the @code{pwd} builtin is supplied the @option{-P} option, it resets
+@code{$PWD} to a pathname containing no symlinks.
+
+@item
+The @code{pwd} builtin verifies that the value it prints is the same as the
+current directory, even if it is not asked to check the file system with the
+@option{-P} option.
+
+@item
+When listing the history, the @code{fc} builtin does not include an
+indication of whether or not a history entry has been modified.
+
+@item
+The default editor used by @code{fc} is @code{ed}.
+
+@item
+The @code{type} and @code{command} builtins will not report a non-executable
+file as having been found, though the shell will attempt to execute such a
+file if it is the only so-named file found in @code{$PATH}.
+
+@item
+The @code{vi} editing mode will invoke the @code{vi} editor directly when
+the @samp{v} command is run, instead of checking @code{$VISUAL} and
+@code{$EDITOR}.
+
+@item
+When the @code{xpg_echo} option is enabled, Bash does not attempt to interpret
+any arguments to @code{echo} as options. Each argument is displayed, after
+escape characters are converted.
+
+@item
+The @code{ulimit} builtin uses a block size of 512 bytes for the @option{-c}
+and @option{-f} options.
+
+@item
+The arrival of @code{SIGCHLD} when a trap is set on @code{SIGCHLD} does
+not interrupt the @code{wait} builtin and cause it to return immediately.
+The trap command is run once for each child that exits.
+
+@end enumerate
+
+There is other @sc{posix} behavior that Bash does not implement by
+default even when in @sc{posix} mode.
+Specifically:
+
+@enumerate
+
+@item
+The @code{fc} builtin checks @code{$EDITOR} as a program to edit history
+entries if @code{FCEDIT} is unset, rather than defaulting directly to
+@code{ed}. @code{fc} uses @code{ed} if @code{EDITOR} is unset.
+
+@item
+As noted above, Bash requires the @code{xpg_echo} option to be enabled for
+the @code{echo} builtin to be fully conformant.
+
+@end enumerate
+
+Bash can be configured to be @sc{posix}-conformant by default, by specifying
+the @option{--enable-strict-posix-default} to @code{configure} when building
+(@pxref{Optional Features}).
+
+@node Job Control
+@chapter Job Control
+
+This chapter discusses what job control is, how it works, and how
+Bash allows you to access its facilities.
+
+@menu
+* Job Control Basics:: How job control works.
+* Job Control Builtins:: Bash builtin commands used to interact
+ with job control.
+* Job Control Variables:: Variables Bash uses to customize job
+ control.
+@end menu
+
+@node Job Control Basics
+@section Job Control Basics
+@cindex job control
+@cindex foreground
+@cindex background
+@cindex suspending jobs
+
+Job control
+refers to the ability to selectively stop (suspend)
+the execution of processes and continue (resume)
+their execution at a later point. A user typically employs
+this facility via an interactive interface supplied jointly
+by the operating system kernel's terminal driver and Bash.
+
+The shell associates a @var{job} with each pipeline. It keeps a
+table of currently executing jobs, which may be listed with the
+@code{jobs} command. When Bash starts a job
+asynchronously, it prints a line that looks
+like:
+@example
+[1] 25647
+@end example
+@noindent
+indicating that this job is job number 1 and that the process @sc{id}
+of the last process in the pipeline associated with this job is
+25647. All of the processes in a single pipeline are members of
+the same job. Bash uses the @var{job} abstraction as the
+basis for job control.
+
+To facilitate the implementation of the user interface to job
+control, the operating system maintains the notion of a current terminal
+process group @sc{id}. Members of this process group (processes whose
+process group @sc{id} is equal to the current terminal process group
+@sc{id}) receive keyboard-generated signals such as @code{SIGINT}.
+These processes are said to be in the foreground. Background
+processes are those whose process group @sc{id} differs from the
+terminal's; such processes are immune to keyboard-generated
+signals. Only foreground processes are allowed to read from or, if
+the user so specifies with @code{stty tostop}, write to the terminal.
+Background processes which attempt to
+read from (write to when @code{stty tostop} is in effect) the
+terminal are sent a @code{SIGTTIN} (@code{SIGTTOU})
+signal by the kernel's terminal driver,
+which, unless caught, suspends the process.
+
+If the operating system on which Bash is running supports
+job control, Bash contains facilities to use it. Typing the
+@var{suspend} character (typically @samp{^Z}, Control-Z) while a
+process is running causes that process to be stopped and returns
+control to Bash. Typing the @var{delayed suspend} character
+(typically @samp{^Y}, Control-Y) causes the process to be stopped
+when it attempts to read input from the terminal, and control to
+be returned to Bash. The user then manipulates the state of
+this job, using the @code{bg} command to continue it in the
+background, the @code{fg} command to continue it in the
+foreground, or the @code{kill} command to kill it. A @samp{^Z}
+takes effect immediately, and has the additional side effect of
+causing pending output and typeahead to be discarded.
+
+There are a number of ways to refer to a job in the shell. The
+character @samp{%} introduces a job specification (@var{jobspec}).
+
+Job number @code{n} may be referred to as @samp{%n}.
+The symbols @samp{%%} and @samp{%+} refer to the shell's notion of the
+current job, which is the last job stopped while it was in the foreground
+or started in the background.
+A single @samp{%} (with no accompanying job specification) also refers
+to the current job.
+The previous job may be referenced using @samp{%-}.
+If there is only a single job, @samp{%+} and @samp{%-} can both be used
+to refer to that job.
+In output pertaining to jobs (e.g., the output of the @code{jobs}
+command), the current job is always flagged with a @samp{+}, and the
+previous job with a @samp{-}.
+
+A job may also be referred to
+using a prefix of the name used to start it, or using a substring
+that appears in its command line. For example, @samp{%ce} refers
+to a stopped @code{ce} job. Using @samp{%?ce}, on the
+other hand, refers to any job containing the string @samp{ce} in
+its command line. If the prefix or substring matches more than one job,
+Bash reports an error.
+
+Simply naming a job can be used to bring it into the foreground:
+@samp{%1} is a synonym for @samp{fg %1}, bringing job 1 from the
+background into the foreground. Similarly, @samp{%1 &} resumes
+job 1 in the background, equivalent to @samp{bg %1}
+
+The shell learns immediately whenever a job changes state.
+Normally, Bash waits until it is about to print a prompt
+before reporting changes in a job's status so as to not interrupt
+any other output.
+If the @option{-b} option to the @code{set} builtin is enabled,
+Bash reports such changes immediately (@pxref{The Set Builtin}).
+Any trap on @code{SIGCHLD} is executed for each child process
+that exits.
+
+If an attempt to exit Bash is made while jobs are stopped, (or running, if
+the @code{checkjobs} option is enabled -- see @ref{The Shopt Builtin}), the
+shell prints a warning message, and if the @code{checkjobs} option is
+enabled, lists the jobs and their statuses.
+The @code{jobs} command may then be used to inspect their status.
+If a second attempt to exit is made without an intervening command,
+Bash does not print another warning, and any stopped jobs are terminated.
+
+@node Job Control Builtins
+@section Job Control Builtins
+
+@table @code
+
+@item bg
+@btindex bg
+@example
+bg [@var{jobspec} @dots{}]
+@end example
+Resume each suspended job @var{jobspec} in the background, as if it
+had been started with @samp{&}.
+If @var{jobspec} is not supplied, the current job is used.
+The return status is zero unless it is run when job control is not
+enabled, or, when run with job control enabled, any
+@var{jobspec} was not found or specifies a job
+that was started without job control.
+
+@item fg
+@btindex fg
+@example
+fg [@var{jobspec}]
+@end example
+Resume the job @var{jobspec} in the foreground and make it the current job.
+If @var{jobspec} is not supplied, the current job is used.
+The return status is that of the command placed into the foreground,
+or non-zero if run when job control is disabled or, when run with
+job control enabled, @var{jobspec} does not specify a valid job or
+@var{jobspec} specifies a job that was started without job control.
+
+@item jobs
+@btindex jobs
+@example
+jobs [-lnprs] [@var{jobspec}]
+jobs -x @var{command} [@var{arguments}]
+@end example
+
+The first form lists the active jobs. The options have the
+following meanings:
+
+@table @code
+@item -l
+List process @sc{id}s in addition to the normal information.
+
+@item -n
+Display information only about jobs that have changed status since
+the user was last notified of their status.
+
+@item -p
+List only the process @sc{id} of the job's process group leader.
+
+@item -r
+Restrict output to running jobs.
+
+@item -s
+Restrict output to stopped jobs.
+@end table
+
+If @var{jobspec} is given,
+output is restricted to information about that job.
+If @var{jobspec} is not supplied, the status of all jobs is
+listed.
+
+If the @option{-x} option is supplied, @code{jobs} replaces any
+@var{jobspec} found in @var{command} or @var{arguments} with the
+corresponding process group @sc{id}, and executes @var{command},
+passing it @var{argument}s, returning its exit status.
+
+@item kill
+@btindex kill
+@example
+kill [-s @var{sigspec}] [-n @var{signum}] [-@var{sigspec}] @var{jobspec} or @var{pid}
+kill -l [@var{exit_status}]
+@end example
+Send a signal specified by @var{sigspec} or @var{signum} to the process
+named by job specification @var{jobspec} or process @sc{id} @var{pid}.
+@var{sigspec} is either a case-insensitive signal name such as
+@code{SIGINT} (with or without the @code{SIG} prefix)
+or a signal number; @var{signum} is a signal number.
+If @var{sigspec} and @var{signum} are not present, @code{SIGTERM} is used.
+The @option{-l} option lists the signal names.
+If any arguments are supplied when @option{-l} is given, the names of the
+signals corresponding to the arguments are listed, and the return status
+is zero.
+@var{exit_status} is a number specifying a signal number or the exit
+status of a process terminated by a signal.
+The return status is zero if at least one signal was successfully sent,
+or non-zero if an error occurs or an invalid option is encountered.
+
+@item wait
+@btindex wait
+@example
+wait [@var{jobspec} or @var{pid} ...]
+@end example
+Wait until the child process specified by each process @sc{id} @var{pid}
+or job specification @var{jobspec} exits and return the exit status of the
+last command waited for.
+If a job spec is given, all processes in the job are waited for.
+If no arguments are given, all currently active child processes are
+waited for, and the return status is zero.
+If neither @var{jobspec} nor @var{pid} specifies an active child process
+of the shell, the return status is 127.
+
+@item disown
+@btindex disown
+@example
+disown [-ar] [-h] [@var{jobspec} @dots{}]
+@end example
+Without options, each @var{jobspec} is removed from the table of
+active jobs.
+If the @option{-h} option is given, the job is not removed from the table,
+but is marked so that @code{SIGHUP} is not sent to the job if the shell
+receives a @code{SIGHUP}.
+If @var{jobspec} is not present, and neither the @option{-a} nor @option{-r}
+option is supplied, the current job is used.
+If no @var{jobspec} is supplied, the @option{-a} option means to remove or
+mark all jobs; the @option{-r} option without a @var{jobspec}
+argument restricts operation to running jobs.
+
+@item suspend
+@btindex suspend
+@example
+suspend [-f]
+@end example
+Suspend the execution of this shell until it receives a
+@code{SIGCONT} signal.
+A login shell cannot be suspended; the @option{-f}
+option can be used to override this and force the suspension.
+
+@end table
+
+When job control is not active, the @code{kill} and @code{wait}
+builtins do not accept @var{jobspec} arguments. They must be
+supplied process @sc{id}s.
+
+@node Job Control Variables
+@section Job Control Variables
+
+@vtable @code
+
+@item auto_resume
+This variable controls how the shell interacts with the user and
+job control. If this variable exists then single word simple
+commands without redirections are treated as candidates for resumption
+of an existing job. There is no ambiguity allowed; if there is
+more than one job beginning with the string typed, then
+the most recently accessed job will be selected.
+The name of a stopped job, in this context, is the command line
+used to start it. If this variable is set to the value @samp{exact},
+the string supplied must match the name of a stopped job exactly;
+if set to @samp{substring},
+the string supplied needs to match a substring of the name of a
+stopped job. The @samp{substring} value provides functionality
+analogous to the @samp{%?} job @sc{id} (@pxref{Job Control Basics}).
+If set to any other value, the supplied string must
+be a prefix of a stopped job's name; this provides functionality
+analogous to the @samp{%} job @sc{id}.
+
+@end vtable
+
+@set readline-appendix
+@set history-appendix
+@cindex Readline, how to use
+@include rluser.texi
+@cindex History, how to use
+@include hsuser.texi
+@clear readline-appendix
+@clear history-appendix
+
+@node Installing Bash
+@chapter Installing Bash
+
+This chapter provides basic instructions for installing Bash on
+the various supported platforms. The distribution supports the
+@sc{gnu} operating systems, nearly every version of Unix, and several
+non-Unix systems such as BeOS and Interix.
+Other independent ports exist for
+@sc{ms-dos}, @sc{os/2}, and Windows platforms.
+
+@menu
+* Basic Installation:: Installation instructions.
+* Compilers and Options:: How to set special options for various
+ systems.
+* Compiling For Multiple Architectures:: How to compile Bash for more
+ than one kind of system from
+ the same source tree.
+* Installation Names:: How to set the various paths used by the installation.
+* Specifying the System Type:: How to configure Bash for a particular system.
+* Sharing Defaults:: How to share default configuration values among GNU
+ programs.
+* Operation Controls:: Options recognized by the configuration program.
+* Optional Features:: How to enable and disable optional features when
+ building Bash.
+@end menu
+
+@node Basic Installation
+@section Basic Installation
+@cindex installation
+@cindex configuration
+@cindex Bash installation
+@cindex Bash configuration
+
+These are installation instructions for Bash.
+
+The simplest way to compile Bash is:
+
+@enumerate
+@item
+@code{cd} to the directory containing the source code and type
+@samp{./configure} to configure Bash for your system. If you're
+using @code{csh} on an old version of System V, you might need to
+type @samp{sh ./configure} instead to prevent @code{csh} from trying
+to execute @code{configure} itself.
+
+Running @code{configure} takes some time.
+While running, it prints messages telling which features it is
+checking for.
+
+@item
+Type @samp{make} to compile Bash and build the @code{bashbug} bug
+reporting script.
+
+@item
+Optionally, type @samp{make tests} to run the Bash test suite.
+
+@item
+Type @samp{make install} to install @code{bash} and @code{bashbug}.
+This will also install the manual pages and Info file.
+
+@end enumerate
+
+The @code{configure} shell script attempts to guess correct
+values for various system-dependent variables used during
+compilation. It uses those values to create a @file{Makefile} in
+each directory of the package (the top directory, the
+@file{builtins}, @file{doc}, and @file{support} directories,
+each directory under @file{lib}, and several others). It also creates a
+@file{config.h} file containing system-dependent definitions.
+Finally, it creates a shell script named @code{config.status} that you
+can run in the future to recreate the current configuration, a
+file @file{config.cache} that saves the results of its tests to
+speed up reconfiguring, and a file @file{config.log} containing
+compiler output (useful mainly for debugging @code{configure}).
+If at some point
+@file{config.cache} contains results you don't want to keep, you
+may remove or edit it.
+
+To find out more about the options and arguments that the
+@code{configure} script understands, type
+
+@example
+bash-2.04$ ./configure --help
+@end example
+
+@noindent
+at the Bash prompt in your Bash source directory.
+
+If you need to do unusual things to compile Bash, please
+try to figure out how @code{configure} could check whether or not
+to do them, and mail diffs or instructions to
+@email{bash-maintainers@@gnu.org} so they can be
+considered for the next release.
+
+The file @file{configure.in} is used to create @code{configure}
+by a program called Autoconf. You only need
+@file{configure.in} if you want to change it or regenerate
+@code{configure} using a newer version of Autoconf. If
+you do this, make sure you are using Autoconf version 2.50 or
+newer.
+
+You can remove the program binaries and object files from the
+source code directory by typing @samp{make clean}. To also remove the
+files that @code{configure} created (so you can compile Bash for
+a different kind of computer), type @samp{make distclean}.
+
+@node Compilers and Options
+@section Compilers and Options
+
+Some systems require unusual options for compilation or linking
+that the @code{configure} script does not know about. You can
+give @code{configure} initial values for variables by setting
+them in the environment. Using a Bourne-compatible shell, you
+can do that on the command line like this:
+
+@example
+CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure
+@end example
+
+On systems that have the @code{env} program, you can do it like this:
+
+@example
+env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure
+@end example
+
+The configuration process uses GCC to build Bash if it
+is available.
+
+@node Compiling For Multiple Architectures
+@section Compiling For Multiple Architectures
+
+You can compile Bash for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of @code{make} that
+supports the @code{VPATH} variable, such as GNU @code{make}.
+@code{cd} to the
+directory where you want the object files and executables to go and run
+the @code{configure} script from the source directory. You may need to
+supply the @option{--srcdir=PATH} argument to tell @code{configure} where the
+source files are. @code{configure} automatically checks for the
+source code in the directory that @code{configure} is in and in `..'.
+
+If you have to use a @code{make} that does not supports the @code{VPATH}
+variable, you can compile Bash for one architecture at a
+time in the source code directory. After you have installed
+Bash for one architecture, use @samp{make distclean} before
+reconfiguring for another architecture.
+
+Alternatively, if your system supports symbolic links, you can use the
+@file{support/mkclone} script to create a build tree which has
+symbolic links back to each file in the source directory. Here's an
+example that creates a build directory in the current directory from a
+source directory @file{/usr/gnu/src/bash-2.0}:
+
+@example
+bash /usr/gnu/src/bash-2.0/support/mkclone -s /usr/gnu/src/bash-2.0 .
+@end example
+
+@noindent
+The @code{mkclone} script requires Bash, so you must have already built
+Bash for at least one architecture before you can create build
+directories for other architectures.
+
+@node Installation Names
+@section Installation Names
+
+By default, @samp{make install} will install into
+@file{/usr/local/bin}, @file{/usr/local/man}, etc. You can
+specify an installation prefix other than @file{/usr/local} by
+giving @code{configure} the option @option{--prefix=@var{PATH}},
+or by specifying a value for the @code{DESTDIR} @samp{make}
+variable when running @samp{make install}.
+
+You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.
+If you give @code{configure} the option
+@option{--exec-prefix=@var{PATH}}, @samp{make install} will use
+@var{PATH} as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+@node Specifying the System Type
+@section Specifying the System Type
+
+There may be some features @code{configure} can not figure out
+automatically, but need to determine by the type of host Bash
+will run on. Usually @code{configure} can figure that
+out, but if it prints a message saying it can not guess the host
+type, give it the @option{--host=TYPE} option. @samp{TYPE} can
+either be a short name for the system type, such as @samp{sun4},
+or a canonical name with three fields: @samp{CPU-COMPANY-SYSTEM}
+(e.g., @samp{i386-unknown-freebsd4.2}).
+
+See the file @file{support/config.sub} for the possible
+values of each field.
+
+@node Sharing Defaults
+@section Sharing Defaults
+
+If you want to set default values for @code{configure} scripts to
+share, you can create a site shell script called
+@code{config.site} that gives default values for variables like
+@code{CC}, @code{cache_file}, and @code{prefix}. @code{configure}
+looks for @file{PREFIX/share/config.site} if it exists, then
+@file{PREFIX/etc/config.site} if it exists. Or, you can set the
+@code{CONFIG_SITE} environment variable to the location of the site
+script. A warning: the Bash @code{configure} looks for a site script,
+but not all @code{configure} scripts do.
+
+@node Operation Controls
+@section Operation Controls
+
+@code{configure} recognizes the following options to control how it
+operates.
+
+@table @code
+
+@item --cache-file=@var{file}
+Use and save the results of the tests in
+@var{file} instead of @file{./config.cache}. Set @var{file} to
+@file{/dev/null} to disable caching, for debugging
+@code{configure}.
+
+@item --help
+Print a summary of the options to @code{configure}, and exit.
+
+@item --quiet
+@itemx --silent
+@itemx -q
+Do not print messages saying which checks are being made.
+
+@item --srcdir=@var{dir}
+Look for the Bash source code in directory @var{dir}. Usually
+@code{configure} can determine that directory automatically.
+
+@item --version
+Print the version of Autoconf used to generate the @code{configure}
+script, and exit.
+@end table
+
+@code{configure} also accepts some other, not widely used, boilerplate
+options. @samp{configure --help} prints the complete list.
+
+@node Optional Features
+@section Optional Features
+
+The Bash @code{configure} has a number of @option{--enable-@var{feature}}
+options, where @var{feature} indicates an optional part of Bash.
+There are also several @option{--with-@var{package}} options,
+where @var{package} is something like @samp{bash-malloc} or @samp{purify}.
+To turn off the default use of a package, use
+@option{--without-@var{package}}. To configure Bash without a feature
+that is enabled by default, use @option{--disable-@var{feature}}.
+
+Here is a complete list of the @option{--enable-} and
+@option{--with-} options that the Bash @code{configure} recognizes.
+
+@table @code
+@item --with-afs
+Define if you are using the Andrew File System from Transarc.
+
+@item --with-bash-malloc
+Use the Bash version of
+@code{malloc} in the directory @file{lib/malloc}. This is not the same
+@code{malloc} that appears in @sc{gnu} libc, but an older version
+originally derived from the 4.2 @sc{bsd} @code{malloc}. This @code{malloc}
+is very fast, but wastes some space on each allocation.
+This option is enabled by default.
+The @file{NOTES} file contains a list of systems for
+which this should be turned off, and @code{configure} disables this
+option automatically for a number of systems.
+
+@item --with-curses
+Use the curses library instead of the termcap library. This should
+be supplied if your system has an inadequate or incomplete termcap
+database.
+
+@item --with-gnu-malloc
+A synonym for @code{--with-bash-malloc}.
+
+@item --with-installed-readline[=@var{PREFIX}]
+Define this to make Bash link with a locally-installed version of Readline
+rather than the version in @file{lib/readline}. This works only with
+Readline 5.0 and later versions. If @var{PREFIX} is @code{yes} or not
+supplied, @code{configure} uses the values of the make variables
+@code{includedir} and @code{libdir}, which are subdirectories of @code{prefix}
+by default, to find the installed version of Readline if it is not in
+the standard system include and library directories.
+If @var{PREFIX} is @code{no}, Bash links with the version in
+@file{lib/readline}.
+If @var{PREFIX} is set to any other value, @code{configure} treats it as
+a directory pathname and looks for
+the installed version of Readline in subdirectories of that directory
+(include files in @var{PREFIX}/@code{include} and the library in
+@var{PREFIX}/@code{lib}).
+
+@item --with-purify
+Define this to use the Purify memory allocation checker from Rational
+Software.
+
+@item --enable-minimal-config
+This produces a shell with minimal features, close to the historical
+Bourne shell.
+@end table
+
+There are several @option{--enable-} options that alter how Bash is
+compiled and linked, rather than changing run-time features.
+
+@table @code
+@item --enable-largefile
+Enable support for @uref{http://www.sas.com/standards/large_file/x_open.20Mar96.html,
+large files} if the operating system requires special compiler options
+to build programs which can access large files. This is enabled by
+default, if the operating system provides large file support.
+
+@item --enable-profiling
+This builds a Bash binary that produces profiling information to be
+processed by @code{gprof} each time it is executed.
+
+@item --enable-static-link
+This causes Bash to be linked statically, if @code{gcc} is being used.
+This could be used to build a version to use as root's shell.
+@end table
+
+The @samp{minimal-config} option can be used to disable all of
+the following options, but it is processed first, so individual
+options may be enabled using @samp{enable-@var{feature}}.
+
+All of the following options except for @samp{disabled-builtins} and
+@samp{xpg-echo-default} are
+enabled by default, unless the operating system does not provide the
+necessary support.
+
+@table @code
+@item --enable-alias
+Allow alias expansion and include the @code{alias} and @code{unalias}
+builtins (@pxref{Aliases}).
+
+@item --enable-arith-for-command
+Include support for the alternate form of the @code{for} command
+that behaves like the C language @code{for} statement
+(@pxref{Looping Constructs}).
+
+@item --enable-array-variables
+Include support for one-dimensional array shell variables
+(@pxref{Arrays}).
+
+@item --enable-bang-history
+Include support for @code{csh}-like history substitution
+(@pxref{History Interaction}).
+
+@item --enable-brace-expansion
+Include @code{csh}-like brace expansion
+( @code{b@{a,b@}c} @expansion{} @code{bac bbc} ).
+See @ref{Brace Expansion}, for a complete description.
+
+@item --enable-casemod-attributes
+Include support for case-modifying attributes in the @code{declare} builtin
+and assignment statements. Variables with the @var{uppercase} attribute,
+for example, will have their values converted to uppercase upon assignment.
+
+@item --enable-casemod-expansion
+Include support for case-modifying word expansions.
+
+@item --enable-command-timing
+Include support for recognizing @code{time} as a reserved word and for
+displaying timing statistics for the pipeline following @code{time}
+(@pxref{Pipelines}).
+This allows pipelines as well as shell builtins and functions to be timed.
+
+@item --enable-cond-command
+Include support for the @code{[[} conditional command.
+(@pxref{Conditional Constructs}).
+
+@item --enable-cond-regexp
+Include support for matching POSIX regular expressions using the
+@samp{=~} binary operator in the @code{[[} conditional command.
+(@pxref{Conditional Constructs}).
+
+@item --enable-coprocesses
+Include support for coprocesses and the @code{coproc} reserved word
+(@pxref{Pipelines}).
+
+@item --enable-debugger
+Include support for the bash debugger (distributed separately).
+
+@item --enable-directory-stack
+Include support for a @code{csh}-like directory stack and the
+@code{pushd}, @code{popd}, and @code{dirs} builtins
+(@pxref{The Directory Stack}).
+
+@item --enable-disabled-builtins
+Allow builtin commands to be invoked via @samp{builtin xxx}
+even after @code{xxx} has been disabled using @samp{enable -n xxx}.
+See @ref{Bash Builtins}, for details of the @code{builtin} and
+@code{enable} builtin commands.
+
+@item --enable-dparen-arithmetic
+Include support for the @code{((@dots{}))} command
+(@pxref{Conditional Constructs}).
+
+@item --enable-extended-glob
+Include support for the extended pattern matching features described
+above under @ref{Pattern Matching}.
+
+@item --enable-extended-glob-default
+Set the default value of the @var{extglob} shell option described
+above under @ref{The Shopt Builtin} to be enabled.
+
+@item --enable-help-builtin
+Include the @code{help} builtin, which displays help on shell builtins and
+variables (@pxref{Bash Builtins}).
+
+@item --enable-history
+Include command history and the @code{fc} and @code{history}
+builtin commands (@pxref{Bash History Facilities}).
+
+@item --enable-job-control
+This enables the job control features (@pxref{Job Control}),
+if the operating system supports them.
+
+@item --enable-multibyte
+This enables support for multibyte characters if the operating
+system provides the necessary support.
+
+@item --enable-net-redirections
+This enables the special handling of filenames of the form
+@code{/dev/tcp/@var{host}/@var{port}} and
+@code{/dev/udp/@var{host}/@var{port}}
+when used in redirections (@pxref{Redirections}).
+
+@item --enable-process-substitution
+This enables process substitution (@pxref{Process Substitution}) if
+the operating system provides the necessary support.
+
+@item --enable-progcomp
+Enable the programmable completion facilities
+(@pxref{Programmable Completion}).
+If Readline is not enabled, this option has no effect.
+
+@item --enable-prompt-string-decoding
+Turn on the interpretation of a number of backslash-escaped characters
+in the @env{$PS1}, @env{$PS2}, @env{$PS3}, and @env{$PS4} prompt
+strings. See @ref{Printing a Prompt}, for a complete list of prompt
+string escape sequences.
+
+@item --enable-readline
+Include support for command-line editing and history with the Bash
+version of the Readline library (@pxref{Command Line Editing}).
+
+@item --enable-restricted
+Include support for a @dfn{restricted shell}. If this is enabled, Bash,
+when called as @code{rbash}, enters a restricted mode. See
+@ref{The Restricted Shell}, for a description of restricted mode.
+
+@item --enable-select
+Include the @code{select} builtin, which allows the generation of simple
+menus (@pxref{Conditional Constructs}).
+
+@item --enable-separate-helpfiles
+Use external files for the documentation displayed by the @code{help} builtin
+instead of storing the text internally.
+
+@item --enable-single-help-strings
+Store the text displayed by the @code{help} builtin as a single string for
+each help topic. This aids in translating the text to different languages.
+You may need to disable this if your compiler cannot handle very long string
+literals.
+
+@item --enable-strict-posix-default
+Make Bash @sc{posix}-conformant by default (@pxref{Bash POSIX Mode}).
+
+@item --enable-usg-echo-default
+A synonym for @code{--enable-xpg-echo-default}.
+
+@item --enable-xpg-echo-default
+Make the @code{echo} builtin expand backslash-escaped characters by default,
+without requiring the @option{-e} option.
+This sets the default value of the @code{xpg_echo} shell option to @code{on},
+which makes the Bash @code{echo} behave more like the version specified in
+the Single Unix Specification, version 3.
+@xref{Bash Builtins}, for a description of the escape sequences that
+@code{echo} recognizes.
+
+@end table
+
+The file @file{config-top.h} contains C Preprocessor
+@samp{#define} statements for options which are not settable from
+@code{configure}.
+Some of these are not meant to be changed; beware of the consequences if
+you do.
+Read the comments associated with each definition for more
+information about its effect.
+
+@node Reporting Bugs
+@appendix Reporting Bugs
+
+Please report all bugs you find in Bash.
+But first, you should
+make sure that it really is a bug, and that it appears in the latest
+version of Bash.
+The latest version of Bash is always available for FTP from
+@uref{ftp://ftp.gnu.org/pub/gnu/bash/}.
+
+Once you have determined that a bug actually exists, use the
+@code{bashbug} command to submit a bug report.
+If you have a fix, you are encouraged to mail that as well!
+Suggestions and `philosophical' bug reports may be mailed
+to @email{bug-bash@@gnu.org} or posted to the Usenet
+newsgroup @code{gnu.bash.bug}.
+
+All bug reports should include:
+@itemize @bullet
+@item
+The version number of Bash.
+@item
+The hardware and operating system.
+@item
+The compiler used to compile Bash.
+@item
+A description of the bug behaviour.
+@item
+A short script or `recipe' which exercises the bug and may be used
+to reproduce it.
+@end itemize
+
+@noindent
+@code{bashbug} inserts the first three items automatically into
+the template it provides for filing a bug report.
+
+Please send all reports concerning this manual to
+@email{chet.ramey@@case.edu}.
+
+@node Major Differences From The Bourne Shell
+@appendix Major Differences From The Bourne Shell
+
+Bash implements essentially the same grammar, parameter and
+variable expansion, redirection, and quoting as the Bourne Shell.
+Bash uses the @sc{posix} standard as the specification of
+how these features are to be implemented. There are some
+differences between the traditional Bourne shell and Bash; this
+section quickly details the differences of significance. A
+number of these differences are explained in greater depth in
+previous sections.
+This section uses the version of @code{sh} included in SVR4.2 (the
+last version of the historical Bourne shell) as the baseline reference.
+
+@itemize @bullet
+
+@item
+Bash is @sc{posix}-conformant, even where the @sc{posix} specification
+differs from traditional @code{sh} behavior (@pxref{Bash POSIX Mode}).
+
+@item
+Bash has multi-character invocation options (@pxref{Invoking Bash}).
+
+@item
+Bash has command-line editing (@pxref{Command Line Editing}) and
+the @code{bind} builtin.
+
+@item
+Bash provides a programmable word completion mechanism
+(@pxref{Programmable Completion}), and builtin commands
+@code{complete}, @code{compgen}, and @code{compopt}, to
+manipulate it.
+
+@item
+Bash has command history (@pxref{Bash History Facilities}) and the
+@code{history} and @code{fc} builtins to manipulate it.
+The Bash history list maintains timestamp information and uses the
+value of the @code{HISTTIMEFORMAT} variable to display it.
+
+@item
+Bash implements @code{csh}-like history expansion
+(@pxref{History Interaction}).
+
+@item
+Bash has one-dimensional array variables (@pxref{Arrays}), and the
+appropriate variable expansions and assignment syntax to use them.
+Several of the Bash builtins take options to act on arrays.
+Bash provides a number of built-in array variables.
+
+@item
+The @code{$'@dots{}'} quoting syntax, which expands ANSI-C
+backslash-escaped characters in the text between the single quotes,
+is supported (@pxref{ANSI-C Quoting}).
+
+@item
+Bash supports the @code{$"@dots{}"} quoting syntax to do
+locale-specific translation of the characters between the double
+quotes. The @option{-D}, @option{--dump-strings}, and @option{--dump-po-strings}
+invocation options list the translatable strings found in a script
+(@pxref{Locale Translation}).
+
+@item
+Bash implements the @code{!} keyword to negate the return value of
+a pipeline (@pxref{Pipelines}).
+Very useful when an @code{if} statement needs to act only if a test fails.
+The Bash @samp{-o pipefail} option to @code{set} will cause a pipeline to
+return a failure status if any command fails.
+
+@item
+Bash has the @code{time} reserved word and command timing (@pxref{Pipelines}).
+The display of the timing statistics may be controlled with the
+@env{TIMEFORMAT} variable.
+
+@item
+Bash implements the @code{for (( @var{expr1} ; @var{expr2} ; @var{expr3} ))}
+arithmetic for command, similar to the C language (@pxref{Looping Constructs}).
+
+@item
+Bash includes the @code{select} compound command, which allows the
+generation of simple menus (@pxref{Conditional Constructs}).
+
+@item
+Bash includes the @code{[[} compound command, which makes conditional
+testing part of the shell grammar (@pxref{Conditional Constructs}), including
+optional regular expression matching.
+
+@item
+Bash provides optional case-insensitive matching for the @code{case} and
+@code{[[} constructs.
+
+@item
+Bash includes brace expansion (@pxref{Brace Expansion}) and tilde
+expansion (@pxref{Tilde Expansion}).
+
+@item
+Bash implements command aliases and the @code{alias} and @code{unalias}
+builtins (@pxref{Aliases}).
+
+@item
+Bash provides shell arithmetic, the @code{((} compound command
+(@pxref{Conditional Constructs}),
+and arithmetic expansion (@pxref{Shell Arithmetic}).
+
+@item
+Variables present in the shell's initial environment are automatically
+exported to child processes. The Bourne shell does not normally do
+this unless the variables are explicitly marked using the @code{export}
+command.
+
+@item
+Bash supports the @samp{+=} assignment operator, which appends to the value
+of the variable named on the left hand side.
+
+@item
+Bash includes the @sc{posix} pattern removal @samp{%}, @samp{#}, @samp{%%}
+and @samp{##} expansions to remove leading or trailing substrings from
+variable values (@pxref{Shell Parameter Expansion}).
+
+@item
+The expansion @code{$@{#xx@}}, which returns the length of @code{$@{xx@}},
+is supported (@pxref{Shell Parameter Expansion}).
+
+@item
+The expansion @code{$@{var:}@var{offset}@code{[:}@var{length}@code{]@}},
+which expands to the substring of @code{var}'s value of length
+@var{length}, beginning at @var{offset}, is present
+(@pxref{Shell Parameter Expansion}).
+
+@item
+The expansion
+@code{$@{var/[/]}@var{pattern}@code{[/}@var{replacement}@code{]@}},
+which matches @var{pattern} and replaces it with @var{replacement} in
+the value of @code{var}, is available (@pxref{Shell Parameter Expansion}).
+
+@item
+The expansion @code{$@{!@var{prefix@}*}} expansion, which expands to
+the names of all shell variables whose names begin with @var{prefix},
+is available (@pxref{Shell Parameter Expansion}).
+
+@item
+Bash has @var{indirect} variable expansion using @code{$@{!word@}}
+(@pxref{Shell Parameter Expansion}).
+
+@item
+Bash can expand positional parameters beyond @code{$9} using
+@code{$@{@var{num}@}}.
+
+@item
+The @sc{posix} @code{$()} form of command substitution
+is implemented (@pxref{Command Substitution}),
+and preferred to the Bourne shell's @code{``} (which
+is also implemented for backwards compatibility).
+
+@item
+Bash has process substitution (@pxref{Process Substitution}).
+
+@item
+Bash automatically assigns variables that provide information about the
+current user (@env{UID}, @env{EUID}, and @env{GROUPS}), the current host
+(@env{HOSTTYPE}, @env{OSTYPE}, @env{MACHTYPE}, and @env{HOSTNAME}),
+and the instance of Bash that is running (@env{BASH},
+@env{BASH_VERSION}, and @env{BASH_VERSINFO}). @xref{Bash Variables},
+for details.
+
+@item
+The @env{IFS} variable is used to split only the results of expansion,
+not all words (@pxref{Word Splitting}).
+This closes a longstanding shell security hole.
+
+@item
+Bash implements the full set of @sc{posix} filename expansion operators,
+including @var{character classes}, @var{equivalence classes}, and
+@var{collating symbols} (@pxref{Filename Expansion}).
+
+@item
+Bash implements extended pattern matching features when the @code{extglob}
+shell option is enabled (@pxref{Pattern Matching}).
+
+@item
+It is possible to have a variable and a function with the same name;
+@code{sh} does not separate the two name spaces.
+
+@item
+Bash functions are permitted to have local variables using the
+@code{local} builtin, and thus useful recursive functions may be written
+(@pxref{Bash Builtins}).
+
+@item
+Variable assignments preceding commands affect only that command, even
+builtins and functions (@pxref{Environment}).
+In @code{sh}, all variable assignments
+preceding commands are global unless the command is executed from the
+file system.
+
+@item
+Bash performs filename expansion on filenames specified as operands
+to input and output redirection operators (@pxref{Redirections}).
+
+@item
+Bash contains the @samp{<>} redirection operator, allowing a file to be
+opened for both reading and writing, and the @samp{&>} redirection
+operator, for directing standard output and standard error to the same
+file (@pxref{Redirections}).
+
+@item
+Bash includes the @samp{<<<} redirection operator, allowing a string to
+be used as the standard input to a command.
+
+@item
+Bash implements the @samp{[n]<&@var{word}} and @samp{[n]>&@var{word}}
+redirection operators, which move one file descriptor to another.
+
+@item
+Bash treats a number of filenames specially when they are
+used in redirection operators (@pxref{Redirections}).
+
+@item
+Bash can open network connections to arbitrary machines and services
+with the redirection operators (@pxref{Redirections}).
+
+@item
+The @code{noclobber} option is available to avoid overwriting existing
+files with output redirection (@pxref{The Set Builtin}).
+The @samp{>|} redirection operator may be used to override @code{noclobber}.
+
+@item
+The Bash @code{cd} and @code{pwd} builtins (@pxref{Bourne Shell Builtins})
+each take @option{-L} and @option{-P} options to switch between logical and
+physical modes.
+
+@item
+Bash allows a function to override a builtin with the same name, and provides
+access to that builtin's functionality within the function via the
+@code{builtin} and @code{command} builtins (@pxref{Bash Builtins}).
+
+@item
+The @code{command} builtin allows selective disabling of functions
+when command lookup is performed (@pxref{Bash Builtins}).
+
+@item
+Individual builtins may be enabled or disabled using the @code{enable}
+builtin (@pxref{Bash Builtins}).
+
+@item
+The Bash @code{exec} builtin takes additional options that allow users
+to control the contents of the environment passed to the executed
+command, and what the zeroth argument to the command is to be
+(@pxref{Bourne Shell Builtins}).
+
+@item
+Shell functions may be exported to children via the environment
+using @code{export -f} (@pxref{Shell Functions}).
+
+@item
+The Bash @code{export}, @code{readonly}, and @code{declare} builtins can
+take a @option{-f} option to act on shell functions, a @option{-p} option to
+display variables with various attributes set in a format that can be
+used as shell input, a @option{-n} option to remove various variable
+attributes, and @samp{name=value} arguments to set variable attributes
+and values simultaneously.
+
+@item
+The Bash @code{hash} builtin allows a name to be associated with
+an arbitrary filename, even when that filename cannot be found by
+searching the @env{$PATH}, using @samp{hash -p}
+(@pxref{Bourne Shell Builtins}).
+
+@item
+Bash includes a @code{help} builtin for quick reference to shell
+facilities (@pxref{Bash Builtins}).
+
+@item
+The @code{printf} builtin is available to display formatted output
+(@pxref{Bash Builtins}).
+
+@item
+The Bash @code{read} builtin (@pxref{Bash Builtins})
+will read a line ending in @samp{\} with
+the @option{-r} option, and will use the @env{REPLY} variable as a
+default if no non-option arguments are supplied.
+The Bash @code{read} builtin
+also accepts a prompt string with the @option{-p} option and will use
+Readline to obtain the line when given the @option{-e} option.
+The @code{read} builtin also has additional options to control input:
+the @option{-s} option will turn off echoing of input characters as
+they are read, the @option{-t} option will allow @code{read} to time out
+if input does not arrive within a specified number of seconds, the
+@option{-n} option will allow reading only a specified number of
+characters rather than a full line, and the @option{-d} option will read
+until a particular character rather than newline.
+
+@item
+The @code{return} builtin may be used to abort execution of scripts
+executed with the @code{.} or @code{source} builtins
+(@pxref{Bourne Shell Builtins}).
+
+@item
+Bash includes the @code{shopt} builtin, for finer control of shell
+optional capabilities (@pxref{The Shopt Builtin}), and allows these options
+to be set and unset at shell invocation (@pxref{Invoking Bash}).
+
+@item
+Bash has much more optional behavior controllable with the @code{set}
+builtin (@pxref{The Set Builtin}).
+
+@item
+The @samp{-x} (@code{xtrace}) option displays commands other than
+simple commands when performing an execution trace
+(@pxref{The Set Builtin}).
+
+@item
+The @code{test} builtin (@pxref{Bourne Shell Builtins})
+is slightly different, as it implements the @sc{posix} algorithm,
+which specifies the behavior based on the number of arguments.
+
+@item
+Bash includes the @code{caller} builtin, which displays the context of
+any active subroutine call (a shell function or a script executed with
+the @code{.} or @code{source} builtins). This supports the bash
+debugger.
+
+@item
+The @code{trap} builtin (@pxref{Bourne Shell Builtins}) allows a
+@code{DEBUG} pseudo-signal specification, similar to @code{EXIT}.
+Commands specified with a @code{DEBUG} trap are executed before every
+simple command, @code{for} command, @code{case} command,
+@code{select} command, every arithmetic @code{for} command, and before
+the first command executes in a shell function.
+The @code{DEBUG} trap is not inherited by shell functions unless the
+function has been given the @code{trace} attribute or the
+@code{functrace} option has been enabled using the @code{shopt} builtin.
+The @code{extdebug} shell option has additional effects on the
+@code{DEBUG} trap.
+
+The @code{trap} builtin (@pxref{Bourne Shell Builtins}) allows an
+@code{ERR} pseudo-signal specification, similar to @code{EXIT} and @code{DEBUG}.
+Commands specified with an @code{ERR} trap are executed after a simple
+command fails, with a few exceptions.
+The @code{ERR} trap is not inherited by shell functions unless the
+@code{-o errtrace} option to the @code{set} builtin is enabled.
+
+The @code{trap} builtin (@pxref{Bourne Shell Builtins}) allows a
+@code{RETURN} pseudo-signal specification, similar to
+@code{EXIT} and @code{DEBUG}.
+Commands specified with an @code{RETURN} trap are executed before
+execution resumes after a shell function or a shell script executed with
+@code{.} or @code{source} returns.
+The @code{RETURN} trap is not inherited by shell functions unless the
+function has been given the @code{trace} attribute or the
+@code{functrace} option has been enabled using the @code{shopt} builtin.
+
+@item
+The Bash @code{type} builtin is more extensive and gives more information
+about the names it finds (@pxref{Bash Builtins}).
+
+@item
+The Bash @code{umask} builtin permits a @option{-p} option to cause
+the output to be displayed in the form of a @code{umask} command
+that may be reused as input (@pxref{Bourne Shell Builtins}).
+
+@item
+Bash implements a @code{csh}-like directory stack, and provides the
+@code{pushd}, @code{popd}, and @code{dirs} builtins to manipulate it
+(@pxref{The Directory Stack}).
+Bash also makes the directory stack visible as the value of the
+@env{DIRSTACK} shell variable.
+
+@item
+Bash interprets special backslash-escaped characters in the prompt
+strings when interactive (@pxref{Printing a Prompt}).
+
+@item
+The Bash restricted mode is more useful (@pxref{The Restricted Shell});
+the SVR4.2 shell restricted mode is too limited.
+
+@item
+The @code{disown} builtin can remove a job from the internal shell
+job table (@pxref{Job Control Builtins}) or suppress the sending
+of @code{SIGHUP} to a job when the shell exits as the result of a
+@code{SIGHUP}.
+
+@item
+Bash includes a number of features to support a separate debugger for
+shell scripts.
+
+@item
+The SVR4.2 shell has two privilege-related builtins
+(@code{mldmode} and @code{priv}) not present in Bash.
+
+@item
+Bash does not have the @code{stop} or @code{newgrp} builtins.
+
+@item
+Bash does not use the @env{SHACCT} variable or perform shell accounting.
+
+@item
+The SVR4.2 @code{sh} uses a @env{TIMEOUT} variable like Bash uses
+@env{TMOUT}.
+
+@end itemize
+
+@noindent
+More features unique to Bash may be found in @ref{Bash Features}.
+
+
+@appendixsec Implementation Differences From The SVR4.2 Shell
+
+Since Bash is a completely new implementation, it does not suffer from
+many of the limitations of the SVR4.2 shell. For instance:
+
+@itemize @bullet
+
+@item
+Bash does not fork a subshell when redirecting into or out of
+a shell control structure such as an @code{if} or @code{while}
+statement.
+
+@item
+Bash does not allow unbalanced quotes. The SVR4.2 shell will silently
+insert a needed closing quote at @code{EOF} under certain circumstances.
+This can be the cause of some hard-to-find errors.
+
+@item
+The SVR4.2 shell uses a baroque memory management scheme based on
+trapping @code{SIGSEGV}. If the shell is started from a process with
+@code{SIGSEGV} blocked (e.g., by using the @code{system()} C library
+function call), it misbehaves badly.
+
+@item
+In a questionable attempt at security, the SVR4.2 shell,
+when invoked without the @option{-p} option, will alter its real
+and effective @sc{uid} and @sc{gid} if they are less than some
+magic threshold value, commonly 100.
+This can lead to unexpected results.
+
+@item
+The SVR4.2 shell does not allow users to trap @code{SIGSEGV},
+@code{SIGALRM}, or @code{SIGCHLD}.
+
+@item
+The SVR4.2 shell does not allow the @env{IFS}, @env{MAILCHECK},
+@env{PATH}, @env{PS1}, or @env{PS2} variables to be unset.
+
+@item
+The SVR4.2 shell treats @samp{^} as the undocumented equivalent of
+@samp{|}.
+
+@item
+Bash allows multiple option arguments when it is invoked (@code{-x -v});
+the SVR4.2 shell allows only one option argument (@code{-xv}). In
+fact, some versions of the shell dump core if the second argument begins
+with a @samp{-}.
+
+@item
+The SVR4.2 shell exits a script if any builtin fails; Bash exits
+a script only if one of the @sc{posix} special builtins fails, and
+only for certain failures, as enumerated in the @sc{posix} standard.
+
+@item
+The SVR4.2 shell behaves differently when invoked as @code{jsh}
+(it turns on job control).
+@end itemize
+
+@node GNU Free Documentation License
+@appendix GNU Free Documentation License
+
+@include fdl.texi
+
+@node Indexes
+@appendix Indexes
+
+@menu
+* Builtin Index:: Index of Bash builtin commands.
+* Reserved Word Index:: Index of Bash reserved words.
+* Variable Index:: Quick reference helps you find the
+ variable you want.
+* Function Index:: Index of bindable Readline functions.
+* Concept Index:: General index for concepts described in
+ this manual.
+@end menu
+
+@node Builtin Index
+@appendixsec Index of Shell Builtin Commands
+@printindex bt
+
+@node Reserved Word Index
+@appendixsec Index of Shell Reserved Words
+@printindex rw
+
+@node Variable Index
+@appendixsec Parameter and Variable Index
+@printindex vr
+
+@node Function Index
+@appendixsec Function Index
+@printindex fn
+
+@node Concept Index
+@appendixsec Concept Index
+@printindex cp
+
+@bye
diff --git a/doc/builtins.0 b/doc/builtins.0
new file mode 100644
index 0000000..a721e38
--- /dev/null
+++ b/doc/builtins.0
@@ -0,0 +1,1579 @@
+BASH_BUILTINS(1) BASH_BUILTINS(1)
+
+
+
+NNAAMMEE
+ bash, :, ., [, alias, bg, bind, break, builtin, caller, cd, command,
+ compgen, complete, compopt, continue, declare, dirs, disown, echo,
+ enable, eval, exec, exit, export, false, fc, fg, getopts, hash, help,
+ history, jobs, kill, let, local, logout, mapfile, popd, printf, pushd,
+ pwd, read, readonly, return, set, shift, shopt, source, suspend, test,
+ times, trap, true, type, typeset, ulimit, umask, unalias, unset, wait -
+ bash built-in commands, see bbaasshh(1)
+
+BBAASSHH BBUUIILLTTIINN CCOOMMMMAANNDDSS
+ Unless otherwise noted, each builtin command documented in this section
+ as accepting options preceded by -- accepts ---- to signify the end of the
+ options. The ::, ttrruuee, ffaallssee, and tteesstt builtins do not accept options
+ and do not treat ---- specially. The eexxiitt, llooggoouutt, bbrreeaakk, ccoonnttiinnuuee, lleett,
+ and sshhiifftt builtins accept and process arguments beginning with -- with-
+ out requiring ----. Other builtins that accept arguments but are not
+ specified as accepting options interpret arguments beginning with -- as
+ invalid options and require ---- to prevent this interpretation.
+ :: [_a_r_g_u_m_e_n_t_s]
+ No effect; the command does nothing beyond expanding _a_r_g_u_m_e_n_t_s
+ and performing any specified redirections. A zero exit code is
+ returned.
+
+ .. _f_i_l_e_n_a_m_e [_a_r_g_u_m_e_n_t_s]
+ ssoouurrccee _f_i_l_e_n_a_m_e [_a_r_g_u_m_e_n_t_s]
+ Read and execute commands from _f_i_l_e_n_a_m_e in the current shell
+ environment and return the exit status of the last command exe-
+ cuted from _f_i_l_e_n_a_m_e. If _f_i_l_e_n_a_m_e does not contain a slash, file
+ names in PPAATTHH are used to find the directory containing _f_i_l_e_-
+ _n_a_m_e. The file searched for in PPAATTHH need not be executable.
+ When bbaasshh is not in _p_o_s_i_x _m_o_d_e, the current directory is
+ searched if no file is found in PPAATTHH. If the ssoouurrcceeppaatthh option
+ to the sshhoopptt builtin command is turned off, the PPAATTHH is not
+ searched. If any _a_r_g_u_m_e_n_t_s are supplied, they become the posi-
+ tional parameters when _f_i_l_e_n_a_m_e is executed. Otherwise the
+ positional parameters are unchanged. The return status is the
+ status of the last command exited within the script (0 if no
+ commands are executed), and false if _f_i_l_e_n_a_m_e is not found or
+ cannot be read.
+
+ aalliiaass [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
+ AAlliiaass with no arguments or with the --pp option prints the list of
+ aliases in the form aalliiaass _n_a_m_e=_v_a_l_u_e on standard output. When
+ arguments are supplied, an alias is defined for each _n_a_m_e whose
+ _v_a_l_u_e is given. A trailing space in _v_a_l_u_e causes the next word
+ to be checked for alias substitution when the alias is expanded.
+ For each _n_a_m_e in the argument list for which no _v_a_l_u_e is sup-
+ plied, the name and value of the alias is printed. AAlliiaass
+ returns true unless a _n_a_m_e is given for which no alias has been
+ defined.
+
+ bbgg [_j_o_b_s_p_e_c ...]
+ Resume each suspended job _j_o_b_s_p_e_c in the background, as if it
+ had been started with &&. If _j_o_b_s_p_e_c is not present, the shell's
+ notion of the _c_u_r_r_e_n_t _j_o_b is used. bbgg _j_o_b_s_p_e_c returns 0 unless
+ run when job control is disabled or, when run with job control
+ enabled, any specified _j_o_b_s_p_e_c was not found or was started
+ without job control.
+
+ bbiinndd [--mm _k_e_y_m_a_p] [--llppssvvPPSSVV]
+ bbiinndd [--mm _k_e_y_m_a_p] [--qq _f_u_n_c_t_i_o_n] [--uu _f_u_n_c_t_i_o_n] [--rr _k_e_y_s_e_q]
+ bbiinndd [--mm _k_e_y_m_a_p] --ff _f_i_l_e_n_a_m_e
+ bbiinndd [--mm _k_e_y_m_a_p] --xx _k_e_y_s_e_q:_s_h_e_l_l_-_c_o_m_m_a_n_d
+ bbiinndd [--mm _k_e_y_m_a_p] _k_e_y_s_e_q:_f_u_n_c_t_i_o_n_-_n_a_m_e
+ bbiinndd _r_e_a_d_l_i_n_e_-_c_o_m_m_a_n_d
+ Display current rreeaaddlliinnee key and function bindings, bind a key
+ sequence to a rreeaaddlliinnee function or macro, or set a rreeaaddlliinnee
+ variable. Each non-option argument is a command as it would
+ appear in _._i_n_p_u_t_r_c, but each binding or command must be passed
+ as a separate argument; e.g., '"\C-x\C-r": re-read-init-file'.
+ Options, if supplied, have the following meanings:
+ --mm _k_e_y_m_a_p
+ Use _k_e_y_m_a_p as the keymap to be affected by the subsequent
+ bindings. Acceptable _k_e_y_m_a_p names are _e_m_a_c_s_, _e_m_a_c_s_-_s_t_a_n_-
+ _d_a_r_d_, _e_m_a_c_s_-_m_e_t_a_, _e_m_a_c_s_-_c_t_l_x_, _v_i_, _v_i_-_m_o_v_e_, _v_i_-_c_o_m_m_a_n_d,
+ and _v_i_-_i_n_s_e_r_t. _v_i is equivalent to _v_i_-_c_o_m_m_a_n_d; _e_m_a_c_s is
+ equivalent to _e_m_a_c_s_-_s_t_a_n_d_a_r_d.
+ --ll List the names of all rreeaaddlliinnee functions.
+ --pp Display rreeaaddlliinnee function names and bindings in such a
+ way that they can be re-read.
+ --PP List current rreeaaddlliinnee function names and bindings.
+ --ss Display rreeaaddlliinnee key sequences bound to macros and the
+ strings they output in such a way that they can be re-
+ read.
+ --SS Display rreeaaddlliinnee key sequences bound to macros and the
+ strings they output.
+ --vv Display rreeaaddlliinnee variable names and values in such a way
+ that they can be re-read.
+ --VV List current rreeaaddlliinnee variable names and values.
+ --ff _f_i_l_e_n_a_m_e
+ Read key bindings from _f_i_l_e_n_a_m_e.
+ --qq _f_u_n_c_t_i_o_n
+ Query about which keys invoke the named _f_u_n_c_t_i_o_n.
+ --uu _f_u_n_c_t_i_o_n
+ Unbind all keys bound to the named _f_u_n_c_t_i_o_n.
+ --rr _k_e_y_s_e_q
+ Remove any current binding for _k_e_y_s_e_q.
+ --xx _k_e_y_s_e_q::_s_h_e_l_l_-_c_o_m_m_a_n_d
+ Cause _s_h_e_l_l_-_c_o_m_m_a_n_d to be executed whenever _k_e_y_s_e_q is
+ entered. When _s_h_e_l_l_-_c_o_m_m_a_n_d is executed, the shell sets
+ the RREEAADDLLIINNEE__LLIINNEE variable to the contents of the rreeaadd--
+ lliinnee line buffer and the RREEAADDLLIINNEE__PPOOIINNTT variable to the
+ current location of the insertion point. If the executed
+ command changes the value of RREEAADDLLIINNEE__LLIINNEE or RREEAADD--
+ LLIINNEE__PPOOIINNTT, those new values will be reflected in the
+ editing state.
+
+ The return value is 0 unless an unrecognized option is given or
+ an error occurred.
+
+ bbrreeaakk [_n]
+ Exit from within a ffoorr, wwhhiillee, uunnttiill, or sseelleecctt loop. If _n is
+ specified, break _n levels. _n must be >= 1. If _n is greater
+ than the number of enclosing loops, all enclosing loops are
+ exited. The return value is 0 unless _n is not greater than or
+ equal to 1.
+
+ bbuuiillttiinn _s_h_e_l_l_-_b_u_i_l_t_i_n [_a_r_g_u_m_e_n_t_s]
+ Execute the specified shell builtin, passing it _a_r_g_u_m_e_n_t_s, and
+ return its exit status. This is useful when defining a function
+ whose name is the same as a shell builtin, retaining the func-
+ tionality of the builtin within the function. The ccdd builtin is
+ commonly redefined this way. The return status is false if
+ _s_h_e_l_l_-_b_u_i_l_t_i_n is not a shell builtin command.
+
+ ccaalllleerr [_e_x_p_r]
+ Returns the context of any active subroutine call (a shell func-
+ tion or a script executed with the .. or ssoouurrccee builtins. With-
+ out _e_x_p_r, ccaalllleerr displays the line number and source filename of
+ the current subroutine call. If a non-negative integer is sup-
+ plied as _e_x_p_r, ccaalllleerr displays the line number, subroutine name,
+ and source file corresponding to that position in the current
+ execution call stack. This extra information may be used, for
+ example, to print a stack trace. The current frame is frame 0.
+ The return value is 0 unless the shell is not executing a sub-
+ routine call or _e_x_p_r does not correspond to a valid position in
+ the call stack.
+
+ ccdd [--LL||--PP] [_d_i_r]
+ Change the current directory to _d_i_r. The variable HHOOMMEE is the
+ default _d_i_r. The variable CCDDPPAATTHH defines the search path for
+ the directory containing _d_i_r. Alternative directory names in
+ CCDDPPAATTHH are separated by a colon (:). A null directory name in
+ CCDDPPAATTHH is the same as the current directory, i.e., ``..''. If
+ _d_i_r begins with a slash (/), then CCDDPPAATTHH is not used. The --PP
+ option says to use the physical directory structure instead of
+ following symbolic links (see also the --PP option to the sseett
+ builtin command); the --LL option forces symbolic links to be fol-
+ lowed. An argument of -- is equivalent to $$OOLLDDPPWWDD. If a non-
+ empty directory name from CCDDPPAATTHH is used, or if -- is the first
+ argument, and the directory change is successful, the absolute
+ pathname of the new working directory is written to the standard
+ output. The return value is true if the directory was success-
+ fully changed; false otherwise.
+
+ ccoommmmaanndd [--ppVVvv] _c_o_m_m_a_n_d [_a_r_g ...]
+ Run _c_o_m_m_a_n_d with _a_r_g_s suppressing the normal shell function
+ lookup. Only builtin commands or commands found in the PPAATTHH are
+ executed. If the --pp option is given, the search for _c_o_m_m_a_n_d is
+ performed using a default value for PPAATTHH that is guaranteed to
+ find all of the standard utilities. If either the --VV or --vv
+ option is supplied, a description of _c_o_m_m_a_n_d is printed. The --vv
+ option causes a single word indicating the command or file name
+ used to invoke _c_o_m_m_a_n_d to be displayed; the --VV option produces a
+ more verbose description. If the --VV or --vv option is supplied,
+ the exit status is 0 if _c_o_m_m_a_n_d was found, and 1 if not. If
+ neither option is supplied and an error occurred or _c_o_m_m_a_n_d can-
+ not be found, the exit status is 127. Otherwise, the exit sta-
+ tus of the ccoommmmaanndd builtin is the exit status of _c_o_m_m_a_n_d.
+
+ ccoommppggeenn [_o_p_t_i_o_n] [_w_o_r_d]
+ Generate possible completion matches for _w_o_r_d according to the
+ _o_p_t_i_o_ns, which may be any option accepted by the ccoommpplleettee
+ builtin with the exception of --pp and --rr, and write the matches
+ to the standard output. When using the --FF or --CC options, the
+ various shell variables set by the programmable completion
+ facilities, while available, will not have useful values.
+
+ The matches will be generated in the same way as if the pro-
+ grammable completion code had generated them directly from a
+ completion specification with the same flags. If _w_o_r_d is speci-
+ fied, only those completions matching _w_o_r_d will be displayed.
+
+ The return value is true unless an invalid option is supplied,
+ or no matches were generated.
+
+ ccoommpplleettee [--aabbccddeeffggjjkkssuuvv] [--oo _c_o_m_p_-_o_p_t_i_o_n] [--DDEE] [--AA _a_c_t_i_o_n] [--GG _g_l_o_b_-
+ _p_a_t] [--WW _w_o_r_d_l_i_s_t] [--FF _f_u_n_c_t_i_o_n] [--CC _c_o_m_m_a_n_d]
+ [--XX _f_i_l_t_e_r_p_a_t] [--PP _p_r_e_f_i_x] [--SS _s_u_f_f_i_x] _n_a_m_e [_n_a_m_e _._._.]
+ ccoommpplleettee --pprr [--DDEE] [_n_a_m_e ...]
+ Specify how arguments to each _n_a_m_e should be completed. If the
+ --pp option is supplied, or if no options are supplied, existing
+ completion specifications are printed in a way that allows them
+ to be reused as input. The --rr option removes a completion spec-
+ ification for each _n_a_m_e, or, if no _n_a_m_es are supplied, all com-
+ pletion specifications. The --DD option indicates that the
+ remaining options and actions should apply to the ``default''
+ command completion; that is, completion attempted on a command
+ for which no completion has previously been defined. The --EE
+ option indicates that the remaining options and actions should
+ apply to ``empty'' command completion; that is, completion
+ attempted on a blank line.
+
+ The process of applying these completion specifications when
+ word completion is attempted is described above under PPrroo--
+ ggrraammmmaabbllee CCoommpplleettiioonn.
+
+ Other options, if specified, have the following meanings. The
+ arguments to the --GG, --WW, and --XX options (and, if necessary, the
+ --PP and --SS options) should be quoted to protect them from expan-
+ sion before the ccoommpplleettee builtin is invoked.
+ --oo _c_o_m_p_-_o_p_t_i_o_n
+ The _c_o_m_p_-_o_p_t_i_o_n controls several aspects of the comp-
+ spec's behavior beyond the simple generation of comple-
+ tions. _c_o_m_p_-_o_p_t_i_o_n may be one of:
+ bbaasshhddeeffaauulltt
+ Perform the rest of the default bbaasshh completions
+ if the compspec generates no matches.
+ ddeeffaauulltt Use readline's default filename completion if
+ the compspec generates no matches.
+ ddiirrnnaammeess
+ Perform directory name completion if the comp-
+ spec generates no matches.
+ ffiilleennaammeess
+ Tell readline that the compspec generates file-
+ names, so it can perform any filename-specific
+ processing (like adding a slash to directory
+ names, quoting special characters, or suppress-
+ ing trailing spaces). Intended to be used with
+ shell functions.
+ nnoossppaaccee Tell readline not to append a space (the
+ default) to words completed at the end of the
+ line.
+ pplluussddiirrss
+ After any matches defined by the compspec are
+ generated, directory name completion is
+ attempted and any matches are added to the
+ results of the other actions.
+ --AA _a_c_t_i_o_n
+ The _a_c_t_i_o_n may be one of the following to generate a
+ list of possible completions:
+ aalliiaass Alias names. May also be specified as --aa.
+ aarrrraayyvvaarr
+ Array variable names.
+ bbiinnddiinngg RReeaaddlliinnee key binding names.
+ bbuuiillttiinn Names of shell builtin commands. May also be
+ specified as --bb.
+ ccoommmmaanndd Command names. May also be specified as --cc.
+ ddiirreeccttoorryy
+ Directory names. May also be specified as --dd.
+ ddiissaabblleedd
+ Names of disabled shell builtins.
+ eennaabblleedd Names of enabled shell builtins.
+ eexxppoorrtt Names of exported shell variables. May also be
+ specified as --ee.
+ ffiillee File names. May also be specified as --ff.
+ ffuunnccttiioonn
+ Names of shell functions.
+ ggrroouupp Group names. May also be specified as --gg.
+ hheellppttooppiicc
+ Help topics as accepted by the hheellpp builtin.
+ hhoossttnnaammee
+ Hostnames, as taken from the file specified by
+ the HHOOSSTTFFIILLEE shell variable.
+ jjoobb Job names, if job control is active. May also
+ be specified as --jj.
+ kkeeyywwoorrdd Shell reserved words. May also be specified as
+ --kk.
+ rruunnnniinngg Names of running jobs, if job control is active.
+ sseerrvviiccee Service names. May also be specified as --ss.
+ sseettoopptt Valid arguments for the --oo option to the sseett
+ builtin.
+ sshhoopptt Shell option names as accepted by the sshhoopptt
+ builtin.
+ ssiiggnnaall Signal names.
+ ssttooppppeedd Names of stopped jobs, if job control is active.
+ uusseerr User names. May also be specified as --uu.
+ vvaarriiaabbllee
+ Names of all shell variables. May also be spec-
+ ified as --vv.
+ --GG _g_l_o_b_p_a_t
+ The pathname expansion pattern _g_l_o_b_p_a_t is expanded to
+ generate the possible completions.
+ --WW _w_o_r_d_l_i_s_t
+ The _w_o_r_d_l_i_s_t is split using the characters in the IIFFSS
+ special variable as delimiters, and each resultant word
+ is expanded. The possible completions are the members
+ of the resultant list which match the word being com-
+ pleted.
+ --CC _c_o_m_m_a_n_d
+ _c_o_m_m_a_n_d is executed in a subshell environment, and its
+ output is used as the possible completions.
+ --FF _f_u_n_c_t_i_o_n
+ The shell function _f_u_n_c_t_i_o_n is executed in the current
+ shell environment. When it finishes, the possible com-
+ pletions are retrieved from the value of the CCOOMMPPRREEPPLLYY
+ array variable.
+ --XX _f_i_l_t_e_r_p_a_t
+ _f_i_l_t_e_r_p_a_t is a pattern as used for pathname expansion.
+ It is applied to the list of possible completions gener-
+ ated by the preceding options and arguments, and each
+ completion matching _f_i_l_t_e_r_p_a_t is removed from the list.
+ A leading !! in _f_i_l_t_e_r_p_a_t negates the pattern; in this
+ case, any completion not matching _f_i_l_t_e_r_p_a_t is removed.
+ --PP _p_r_e_f_i_x
+ _p_r_e_f_i_x is added at the beginning of each possible com-
+ pletion after all other options have been applied.
+ --SS _s_u_f_f_i_x
+ _s_u_f_f_i_x is appended to each possible completion after all
+ other options have been applied.
+
+ The return value is true unless an invalid option is supplied,
+ an option other than --pp or --rr is supplied without a _n_a_m_e argu-
+ ment, an attempt is made to remove a completion specification
+ for a _n_a_m_e for which no specification exists, or an error occurs
+ adding a completion specification.
+
+ ccoommppoopptt [--oo _o_p_t_i_o_n] [--DDEE] [++oo _o_p_t_i_o_n] [_n_a_m_e]
+ Modify completion options for each _n_a_m_e according to the
+ _o_p_t_i_o_ns, or for the currently-execution completion if no _n_a_m_es
+ are supplied. If no _o_p_t_i_o_ns are given, display the completion
+ options for each _n_a_m_e or the current completion. The possible
+ values of _o_p_t_i_o_n are those valid for the ccoommpplleettee builtin
+ described above. The --DD option indicates that the remaining
+ options should apply to the ``default'' command completion; that
+ is, completion attempted on a command for which no completion
+ has previously been defined. The --EE option indicates that the
+ remaining options should apply to ``empty'' command completion;
+ that is, completion attempted on a blank line.
+
+ The return value is true unless an invalid option is supplied, an
+ attempt is made to modify the options for a _n_a_m_e for which no comple-
+ tion specification exists, or an output error occurs.
+
+ ccoonnttiinnuuee [_n]
+ Resume the next iteration of the enclosing ffoorr, wwhhiillee, uunnttiill, or
+ sseelleecctt loop. If _n is specified, resume at the _nth enclosing
+ loop. _n must be >= 1. If _n is greater than the number of
+ enclosing loops, the last enclosing loop (the ``top-level''
+ loop) is resumed. The return value is 0 unless _n is not greater
+ than or equal to 1.
+
+ ddeeccllaarree [--aaAAffFFiillrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
+ ttyyppeesseett [--aaAAffFFiillrrttuuxx] [--pp] [_n_a_m_e[=_v_a_l_u_e] ...]
+ Declare variables and/or give them attributes. If no _n_a_m_es are
+ given then display the values of variables. The --pp option will
+ display the attributes and values of each _n_a_m_e. When --pp is used
+ with _n_a_m_e arguments, additional options are ignored. When --pp is
+ supplied without _n_a_m_e arguments, it will display the attributes
+ and values of all variables having the attributes specified by
+ the additional options. If no other options are supplied with
+ --pp, ddeeccllaarree will display the attributes and values of all shell
+ variables. The --ff option will restrict the display to shell
+ functions. The --FF option inhibits the display of function defi-
+ nitions; only the function name and attributes are printed. If
+ the eexxttddeebbuugg shell option is enabled using sshhoopptt, the source
+ file name and line number where the function is defined are dis-
+ played as well. The --FF option implies --ff. The following
+ options can be used to restrict output to variables with the
+ specified attribute or to give variables attributes:
+ --aa Each _n_a_m_e is an indexed array variable (see AArrrraayyss
+ above).
+ --AA Each _n_a_m_e is an associative array variable (see AArrrraayyss
+ above).
+ --ff Use function names only.
+ --ii The variable is treated as an integer; arithmetic evalua-
+ tion (see AARRIITTHHMMEETTIICC EEVVAALLUUAATTIIOONN above) is performed when
+ the variable is assigned a value.
+ --ll When the variable is assigned a value, all upper-case
+ characters are converted to lower-case. The upper-case
+ attribute is disabled.
+ --rr Make _n_a_m_es readonly. These names cannot then be assigned
+ values by subsequent assignment statements or unset.
+ --tt Give each _n_a_m_e the _t_r_a_c_e attribute. Traced functions
+ inherit the DDEEBBUUGG and RREETTUURRNN traps from the calling
+ shell. The trace attribute has no special meaning for
+ variables.
+ --uu When the variable is assigned a value, all lower-case
+ characters are converted to upper-case. The lower-case
+ attribute is disabled.
+ --xx Mark _n_a_m_es for export to subsequent commands via the
+ environment.
+
+ Using `+' instead of `-' turns off the attribute instead, with
+ the exceptions that ++aa may not be used to destroy an array vari-
+ able and ++rr will not remove the readonly attribute. When used
+ in a function, makes each _n_a_m_e local, as with the llooccaall command.
+ If a variable name is followed by =_v_a_l_u_e, the value of the vari-
+ able is set to _v_a_l_u_e. The return value is 0 unless an invalid
+ option is encountered, an attempt is made to define a function
+ using ``-f foo=bar'', an attempt is made to assign a value to a
+ readonly variable, an attempt is made to assign a value to an
+ array variable without using the compound assignment syntax (see
+ AArrrraayyss above), one of the _n_a_m_e_s is not a valid shell variable
+ name, an attempt is made to turn off readonly status for a read-
+ only variable, an attempt is made to turn off array status for
+ an array variable, or an attempt is made to display a non-exis-
+ tent function with --ff.
+
+ ddiirrss [[++_n]] [[--_n]] [[--ccppllvv]]
+ Without options, displays the list of currently remembered
+ directories. The default display is on a single line with
+ directory names separated by spaces. Directories are added to
+ the list with the ppuusshhdd command; the ppooppdd command removes
+ entries from the list.
+ ++_n Displays the _nth entry counting from the left of the list
+ shown by ddiirrss when invoked without options, starting with
+ zero.
+ --_n Displays the _nth entry counting from the right of the
+ list shown by ddiirrss when invoked without options, starting
+ with zero.
+ --cc Clears the directory stack by deleting all of the
+ entries.
+ --ll Produces a longer listing; the default listing format
+ uses a tilde to denote the home directory.
+ --pp Print the directory stack with one entry per line.
+ --vv Print the directory stack with one entry per line, pre-
+ fixing each entry with its index in the stack.
+
+ The return value is 0 unless an invalid option is supplied or _n
+ indexes beyond the end of the directory stack.
+
+ ddiissoowwnn [--aarr] [--hh] [_j_o_b_s_p_e_c ...]
+ Without options, each _j_o_b_s_p_e_c is removed from the table of
+ active jobs. If _j_o_b_s_p_e_c is not present, and neither --aa nor --rr
+ is supplied, the shell's notion of the _c_u_r_r_e_n_t _j_o_b is used. If
+ the --hh option is given, each _j_o_b_s_p_e_c is not removed from the ta-
+ ble, but is marked so that SSIIGGHHUUPP is not sent to the job if the
+ shell receives a SSIIGGHHUUPP. If no _j_o_b_s_p_e_c is present, and neither
+ the --aa nor the --rr option is supplied, the _c_u_r_r_e_n_t _j_o_b is used.
+ If no _j_o_b_s_p_e_c is supplied, the --aa option means to remove or mark
+ all jobs; the --rr option without a _j_o_b_s_p_e_c argument restricts
+ operation to running jobs. The return value is 0 unless a _j_o_b_-
+ _s_p_e_c does not specify a valid job.
+
+ eecchhoo [--nneeEE] [_a_r_g ...]
+ Output the _a_r_gs, separated by spaces, followed by a newline.
+ The return status is always 0. If --nn is specified, the trailing
+ newline is suppressed. If the --ee option is given, interpreta-
+ tion of the following backslash-escaped characters is enabled.
+ The --EE option disables the interpretation of these escape char-
+ acters, even on systems where they are interpreted by default.
+ The xxppgg__eecchhoo shell option may be used to dynamically determine
+ whether or not eecchhoo expands these escape characters by default.
+ eecchhoo does not interpret ---- to mean the end of options. eecchhoo
+ interprets the following escape sequences:
+ \\aa alert (bell)
+ \\bb backspace
+ \\cc suppress further output
+ \\ee an escape character
+ \\ff form feed
+ \\nn new line
+ \\rr carriage return
+ \\tt horizontal tab
+ \\vv vertical tab
+ \\\\ backslash
+ \\00_n_n_n the eight-bit character whose value is the octal value
+ _n_n_n (zero to three octal digits)
+ \\xx_H_H the eight-bit character whose value is the hexadecimal
+ value _H_H (one or two hex digits)
+
+ eennaabbllee [--aa] [--ddnnppss] [--ff _f_i_l_e_n_a_m_e] [_n_a_m_e ...]
+ Enable and disable builtin shell commands. Disabling a builtin
+ allows a disk command which has the same name as a shell builtin
+ to be executed without specifying a full pathname, even though
+ the shell normally searches for builtins before disk commands.
+ If --nn is used, each _n_a_m_e is disabled; otherwise, _n_a_m_e_s are
+ enabled. For example, to use the tteesstt binary found via the PPAATTHH
+ instead of the shell builtin version, run ``enable -n test''.
+ The --ff option means to load the new builtin command _n_a_m_e from
+ shared object _f_i_l_e_n_a_m_e, on systems that support dynamic loading.
+ The --dd option will delete a builtin previously loaded with --ff.
+ If no _n_a_m_e arguments are given, or if the --pp option is supplied,
+ a list of shell builtins is printed. With no other option argu-
+ ments, the list consists of all enabled shell builtins. If --nn
+ is supplied, only disabled builtins are printed. If --aa is sup-
+ plied, the list printed includes all builtins, with an indica-
+ tion of whether or not each is enabled. If --ss is supplied, the
+ output is restricted to the POSIX _s_p_e_c_i_a_l builtins. The return
+ value is 0 unless a _n_a_m_e is not a shell builtin or there is an
+ error loading a new builtin from a shared object.
+
+ eevvaall [_a_r_g ...]
+ The _a_r_gs are read and concatenated together into a single com-
+ mand. This command is then read and executed by the shell, and
+ its exit status is returned as the value of eevvaall. If there are
+ no _a_r_g_s, or only null arguments, eevvaall returns 0.
+
+ eexxeecc [--ccll] [--aa _n_a_m_e] [_c_o_m_m_a_n_d [_a_r_g_u_m_e_n_t_s]]
+ If _c_o_m_m_a_n_d is specified, it replaces the shell. No new process
+ is created. The _a_r_g_u_m_e_n_t_s become the arguments to _c_o_m_m_a_n_d. If
+ the --ll option is supplied, the shell places a dash at the begin-
+ ning of the zeroth argument passed to _c_o_m_m_a_n_d. This is what
+ _l_o_g_i_n(1) does. The --cc option causes _c_o_m_m_a_n_d to be executed with
+ an empty environment. If --aa is supplied, the shell passes _n_a_m_e
+ as the zeroth argument to the executed command. If _c_o_m_m_a_n_d can-
+ not be executed for some reason, a non-interactive shell exits,
+ unless the shell option eexxeeccffaaiill is enabled, in which case it
+ returns failure. An interactive shell returns failure if the
+ file cannot be executed. If _c_o_m_m_a_n_d is not specified, any redi-
+ rections take effect in the current shell, and the return status
+ is 0. If there is a redirection error, the return status is 1.
+
+ eexxiitt [_n]
+ Cause the shell to exit with a status of _n. If _n is omitted,
+ the exit status is that of the last command executed. A trap on
+ EEXXIITT is executed before the shell terminates.
+
+ eexxppoorrtt [--ffnn] [_n_a_m_e[=_w_o_r_d]] ...
+ eexxppoorrtt --pp
+ The supplied _n_a_m_e_s are marked for automatic export to the envi-
+ ronment of subsequently executed commands. If the --ff option is
+ given, the _n_a_m_e_s refer to functions. If no _n_a_m_e_s are given, or
+ if the --pp option is supplied, a list of all names that are
+ exported in this shell is printed. The --nn option causes the
+ export property to be removed from each _n_a_m_e. If a variable
+ name is followed by =_w_o_r_d, the value of the variable is set to
+ _w_o_r_d. eexxppoorrtt returns an exit status of 0 unless an invalid
+ option is encountered, one of the _n_a_m_e_s is not a valid shell
+ variable name, or --ff is supplied with a _n_a_m_e that is not a func-
+ tion.
+
+ ffcc [--ee _e_n_a_m_e] [--llnnrr] [_f_i_r_s_t] [_l_a_s_t]
+ ffcc --ss [_p_a_t=_r_e_p] [_c_m_d]
+ Fix Command. In the first form, a range of commands from _f_i_r_s_t
+ to _l_a_s_t is selected from the history list. _F_i_r_s_t and _l_a_s_t may
+ be specified as a string (to locate the last 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 cur-
+ rent command number). If _l_a_s_t is not specified it is set to the
+ current command for listing (so that ``fc -l -10'' prints the
+ last 10 commands) and to _f_i_r_s_t otherwise. If _f_i_r_s_t is not spec-
+ ified it is set to the previous command for editing and -16 for
+ listing.
+
+ The --nn option suppresses the command numbers when listing. The
+ --rr option reverses the order of the commands. If the --ll option
+ is given, the commands are listed on standard output. Other-
+ wise, the editor given by _e_n_a_m_e is invoked on a file containing
+ those commands. If _e_n_a_m_e is not given, the value of the FFCCEEDDIITT
+ variable is used, and the value of EEDDIITTOORR if FFCCEEDDIITT is not set.
+ If neither variable is set, is used. When editing is complete,
+ the edited commands are echoed and executed.
+
+ In the second form, _c_o_m_m_a_n_d is re-executed after each instance
+ of _p_a_t is replaced by _r_e_p. A useful alias to use with this is
+ ``r="fc -s"'', so that typing ``r cc'' runs the last command
+ beginning with ``cc'' and typing ``r'' re-executes the last com-
+ mand.
+
+ If the first form is used, the return value is 0 unless an
+ invalid option is encountered or _f_i_r_s_t or _l_a_s_t specify history
+ lines out of range. If the --ee option is supplied, the return
+ value is the value of the last command executed or failure if an
+ error occurs with the temporary file of commands. If the second
+ form is used, the return status is that of the command re-exe-
+ cuted, unless _c_m_d does not specify a valid history line, in
+ which case ffcc returns failure.
+
+ ffgg [_j_o_b_s_p_e_c]
+ Resume _j_o_b_s_p_e_c in the foreground, and make it the current job.
+ If _j_o_b_s_p_e_c is not present, the shell's notion of the _c_u_r_r_e_n_t _j_o_b
+ is used. The return value is that of the command placed into
+ the foreground, or failure if run when job control is disabled
+ or, when run with job control enabled, if _j_o_b_s_p_e_c does not spec-
+ ify a valid job or _j_o_b_s_p_e_c specifies a job that was started
+ without job control.
+
+ ggeettooppttss _o_p_t_s_t_r_i_n_g _n_a_m_e [_a_r_g_s]
+ ggeettooppttss is used by shell procedures to parse positional parame-
+ ters. _o_p_t_s_t_r_i_n_g contains the option characters to be recog-
+ nized; if a character is followed by a colon, the option is
+ expected to have an argument, which should be separated from it
+ by white space. The colon and question mark characters may not
+ be used as option characters. Each time it is invoked, ggeettooppttss
+ places the next option in the shell variable _n_a_m_e, initializing
+ _n_a_m_e if it does not exist, and the index of the next argument to
+ be processed into the variable OOPPTTIINNDD. OOPPTTIINNDD is initialized to
+ 1 each time the shell or a shell script is invoked. When an
+ option requires an argument, ggeettooppttss places that argument into
+ the variable OOPPTTAARRGG. The shell does not reset OOPPTTIINNDD automati-
+ cally; it must be manually reset between multiple calls to
+ ggeettooppttss within the same shell invocation if a new set of parame-
+ ters is to be used.
+
+ When the end of options is encountered, ggeettooppttss exits with a
+ return value greater than zero. OOPPTTIINNDD is set to the index of
+ the first non-option argument, and nnaammee is set to ?.
+
+ ggeettooppttss normally parses the positional parameters, but if more
+ arguments are given in _a_r_g_s, ggeettooppttss parses those instead.
+
+ ggeettooppttss can report errors in two ways. If the first character
+ of _o_p_t_s_t_r_i_n_g is a colon, _s_i_l_e_n_t error reporting is used. In
+ normal operation diagnostic messages are printed when invalid
+ options or missing option arguments are encountered. If the
+ variable OOPPTTEERRRR is set to 0, no error messages will be dis-
+ played, even if the first character of _o_p_t_s_t_r_i_n_g is not a colon.
+
+ If an invalid option is seen, ggeettooppttss places ? into _n_a_m_e and, if
+ not silent, prints an error message and unsets OOPPTTAARRGG. If
+ ggeettooppttss is silent, the option character found is placed in
+ OOPPTTAARRGG and no diagnostic message is printed.
+
+ If a required argument is not found, and ggeettooppttss is not silent,
+ a question mark (??) is placed in _n_a_m_e, OOPPTTAARRGG is unset, and a
+ diagnostic message is printed. If ggeettooppttss is silent, then a
+ colon (::) is placed in _n_a_m_e and OOPPTTAARRGG is set to the option
+ character found.
+
+ ggeettooppttss returns true if an option, specified or unspecified, is
+ found. It returns false if the end of options is encountered or
+ an error occurs.
+
+ hhaasshh [--llrr] [--pp _f_i_l_e_n_a_m_e] [--ddtt] [_n_a_m_e]
+ For each _n_a_m_e, the full file name of the command is determined
+ by searching the directories in $$PPAATTHH and remembered. If the --pp
+ option is supplied, no path search is performed, and _f_i_l_e_n_a_m_e is
+ used as the full file name of the command. The --rr option causes
+ the shell to forget all remembered locations. The --dd option
+ causes the shell to forget the remembered location of each _n_a_m_e.
+ If the --tt option is supplied, the full pathname to which each
+ _n_a_m_e corresponds is printed. If multiple _n_a_m_e arguments are
+ supplied with --tt, the _n_a_m_e is printed before the hashed full
+ pathname. The --ll option causes output to be displayed in a for-
+ mat that may be reused as input. If no arguments are given, or
+ if only --ll is supplied, information about remembered commands is
+ printed. The return status is true unless a _n_a_m_e is not found
+ or an invalid option is supplied.
+
+ hheellpp [--ddmmss] [_p_a_t_t_e_r_n]
+ Display helpful information about builtin commands. If _p_a_t_t_e_r_n
+ is specified, hheellpp gives detailed help on all commands matching
+ _p_a_t_t_e_r_n; otherwise help for all the builtins and shell control
+ structures is printed.
+ --dd Display a short description of each _p_a_t_t_e_r_n
+ --mm Display the description of each _p_a_t_t_e_r_n in a manpage-like
+ format
+ --ss Display only a short usage synopsis for each _p_a_t_t_e_r_n
+ The return status is 0 unless no command matches _p_a_t_t_e_r_n.
+
+ hhiissttoorryy [[_n]]
+ hhiissttoorryy --cc
+ hhiissttoorryy --dd _o_f_f_s_e_t
+ hhiissttoorryy --aannrrww [_f_i_l_e_n_a_m_e]
+ hhiissttoorryy --pp _a_r_g [_a_r_g _._._.]
+ hhiissttoorryy --ss _a_r_g [_a_r_g _._._.]
+ With no options, display the command history list with line num-
+ bers. Lines listed with a ** have been modified. An argument of
+ _n lists only the last _n lines. If the shell variable HHIISSTTTTIIMMEE--
+ FFOORRMMAATT is set and not null, it is used as a format string for
+ _s_t_r_f_t_i_m_e(3) to display the time stamp associated with each dis-
+ played history entry. No intervening blank is printed between
+ the formatted time stamp and the history line. If _f_i_l_e_n_a_m_e is
+ supplied, it is used as the name of the history file; if not,
+ the value of HHIISSTTFFIILLEE is used. Options, if supplied, have the
+ following meanings:
+ --cc Clear the history list by deleting all the entries.
+ --dd _o_f_f_s_e_t
+ Delete the history entry at position _o_f_f_s_e_t.
+ --aa Append the ``new'' history lines (history lines entered
+ since the beginning of the current bbaasshh session) to the
+ history file.
+ --nn Read the history lines not already read from the history
+ file into the current history list. These are lines
+ appended to the history file since the beginning of the
+ current bbaasshh session.
+ --rr Read the contents of the history file and use them as the
+ current history.
+ --ww Write the current history to the history file, overwrit-
+ ing the history file's contents.
+ --pp Perform history substitution on the following _a_r_g_s and
+ display the result on the standard output. Does not
+ store the results in the history list. Each _a_r_g must be
+ quoted to disable normal history expansion.
+ --ss Store the _a_r_g_s in the history list as a single entry.
+ The last command in the history list is removed before
+ the _a_r_g_s are added.
+
+ If the HHIISSTTTTIIMMEEFFOORRMMAATT variable is set, the time stamp informa-
+ tion associated with each history entry is written to the his-
+ tory 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 return value is 0
+ unless an invalid option is encountered, an error occurs while
+ reading or writing the history file, an invalid _o_f_f_s_e_t is sup-
+ plied as an argument to --dd, or the history expansion supplied as
+ an argument to --pp fails.
+
+ jjoobbss [--llnnpprrss] [ _j_o_b_s_p_e_c ... ]
+ jjoobbss --xx _c_o_m_m_a_n_d [ _a_r_g_s ... ]
+ The first form lists the active jobs. The options have the fol-
+ lowing meanings:
+ --ll List process IDs in addition to the normal information.
+ --pp List only the process ID of the job's process group
+ leader.
+ --nn Display information only about jobs that have changed
+ status since the user was last notified of their status.
+ --rr Restrict output to running jobs.
+ --ss Restrict output to stopped jobs.
+
+ If _j_o_b_s_p_e_c is given, output is restricted to information about
+ that job. The return status is 0 unless an invalid option is
+ encountered or an invalid _j_o_b_s_p_e_c is supplied.
+
+ If the --xx option is supplied, jjoobbss replaces any _j_o_b_s_p_e_c found in
+ _c_o_m_m_a_n_d or _a_r_g_s with the corresponding process group ID, and
+ executes _c_o_m_m_a_n_d passing it _a_r_g_s, returning its exit status.
+
+ kkiillll [--ss _s_i_g_s_p_e_c | --nn _s_i_g_n_u_m | --_s_i_g_s_p_e_c] [_p_i_d | _j_o_b_s_p_e_c] ...
+ kkiillll --ll [_s_i_g_s_p_e_c | _e_x_i_t___s_t_a_t_u_s]
+ Send the signal named by _s_i_g_s_p_e_c or _s_i_g_n_u_m to the processes
+ named by _p_i_d or _j_o_b_s_p_e_c. _s_i_g_s_p_e_c is either a case-insensitive
+ signal name such as SSIIGGKKIILLLL (with or without the SSIIGG prefix) or
+ a signal number; _s_i_g_n_u_m is a signal number. If _s_i_g_s_p_e_c is not
+ present, then SSIIGGTTEERRMM is assumed. An argument of --ll lists the
+ signal names. If any arguments are supplied when --ll is given,
+ the names of the signals corresponding to the arguments are
+ listed, and the return status is 0. The _e_x_i_t___s_t_a_t_u_s argument to
+ --ll is a number specifying either a signal number or the exit
+ status of a process terminated by a signal. kkiillll returns true
+ if at least one signal was successfully sent, or false if an
+ error occurs or an invalid option is encountered.
+
+ lleett _a_r_g [_a_r_g ...]
+ Each _a_r_g is an arithmetic expression to be evaluated (see AARRIITTHH--
+ MMEETTIICC EEVVAALLUUAATTIIOONN above). If the last _a_r_g evaluates to 0, lleett
+ returns 1; 0 is returned otherwise.
+
+ llooccaall [_o_p_t_i_o_n] [_n_a_m_e[=_v_a_l_u_e] ...]
+ For each argument, a local variable named _n_a_m_e is created, and
+ assigned _v_a_l_u_e. The _o_p_t_i_o_n can be any of the options accepted
+ by ddeeccllaarree. When llooccaall is used within a function, it causes the
+ variable _n_a_m_e to have a visible scope restricted to that func-
+ tion and its children. With no operands, llooccaall writes a list of
+ local variables to the standard output. It is an error to use
+ llooccaall when not within a function. The return status is 0 unless
+ llooccaall is used outside a function, an invalid _n_a_m_e is supplied,
+ or _n_a_m_e is a readonly variable.
+
+ llooggoouutt Exit a login shell.
+
+ mmaappffiillee [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u_n_t] [--tt] [--uu _f_d] [--CC _c_a_l_l_b_a_c_k]
+ [--cc _q_u_a_n_t_u_m] [_a_r_r_a_y]
+ rreeaaddaarrrraayy [--nn _c_o_u_n_t] [--OO _o_r_i_g_i_n] [--ss _c_o_u_n_t] [--tt] [--uu _f_d] [--CC _c_a_l_l_b_a_c_k]
+ [--cc _q_u_a_n_t_u_m] [_a_r_r_a_y]
+ Read lines from the standard input into the indexed array vari-
+ able _a_r_r_a_y, or from file descriptor _f_d if the --uu option is sup-
+ plied. The variable MMAAPPFFIILLEE is the default _a_r_r_a_y. Options, if
+ supplied, have the following meanings:
+ --nn Copy at most _c_o_u_n_t lines. If _c_o_u_n_t is 0, all lines are
+ copied.
+ --OO Begin assigning to _a_r_r_a_y at index _o_r_i_g_i_n. The default
+ index is 0.
+ --ss Discard the first _c_o_u_n_t lines read.
+ --tt Remove a trailing newline from each line read.
+ --uu Read lines from file descriptor _f_d instead of the stan-
+ dard input.
+ --CC Evaluate _c_a_l_l_b_a_c_k each time _q_u_a_n_t_u_m lines are read. The
+ --cc option specifies _q_u_a_n_t_u_m.
+ --cc Specify the number of lines read between each call to
+ _c_a_l_l_b_a_c_k.
+
+ If --CC is specified without --cc, the default quantum is 5000.
+ When _c_a_l_l_b_a_c_k is evaluated, it is supplied the index of the next
+ array element to be assigned as an additional argument. _c_a_l_l_-
+ _b_a_c_k is evaluated after the line is read but before the array
+ element is assigned.
+
+ If not supplied with an explicit origin, mmaappffiillee will clear
+ _a_r_r_a_y before assigning to it.
+
+ mmaappffiillee returns successfully unless an invalid option or option
+ argument is supplied, _a_r_r_a_y is invalid or unassignable, or if
+ _a_r_r_a_y is not an indexed array.
+
+ ppooppdd [-nn] [+_n] [-_n]
+ Removes entries from the directory stack. With no arguments,
+ removes the top directory from the stack, and performs a ccdd to
+ the new top directory. Arguments, if supplied, have the follow-
+ ing meanings:
+ --nn Suppresses the normal change of directory when removing
+ directories from the stack, so that only the stack is
+ manipulated.
+ ++_n Removes the _nth entry counting from the left of the list
+ shown by ddiirrss, starting with zero. For example: ``popd
+ +0'' removes the first directory, ``popd +1'' the second.
+ --_n Removes the _nth entry counting from the right of the list
+ shown by ddiirrss, starting with zero. For example: ``popd
+ -0'' removes the last directory, ``popd -1'' the next to
+ last.
+
+ If the ppooppdd command is successful, a ddiirrss is performed as well,
+ and the return status is 0. ppooppdd returns false if an invalid
+ option is encountered, the directory stack is empty, a non-exis-
+ tent directory stack entry is specified, or the directory change
+ fails.
+
+ pprriinnttff [--vv _v_a_r] _f_o_r_m_a_t [_a_r_g_u_m_e_n_t_s]
+ Write the formatted _a_r_g_u_m_e_n_t_s to the standard output under the
+ control of the _f_o_r_m_a_t. The _f_o_r_m_a_t is a character string which
+ contains three types of objects: plain characters, which are
+ simply copied to standard output, character escape sequences,
+ which are converted and copied to the standard output, and for-
+ mat specifications, each of which causes printing of the next
+ successive _a_r_g_u_m_e_n_t. In addition to the standard _p_r_i_n_t_f(1) for-
+ mats, %%bb causes pprriinnttff to expand backslash escape sequences in
+ the corresponding _a_r_g_u_m_e_n_t (except that \\cc terminates output,
+ backslashes in \\'', \\"", and \\?? are not removed, and octal escapes
+ beginning with \\00 may contain up to four digits), and %%qq causes
+ pprriinnttff to output the corresponding _a_r_g_u_m_e_n_t in a format that can
+ be reused as shell input.
+
+ The --vv option causes the output to be assigned to the variable
+ _v_a_r rather than being printed to the standard output.
+
+ The _f_o_r_m_a_t is reused as necessary to consume all of the _a_r_g_u_-
+ _m_e_n_t_s. If the _f_o_r_m_a_t requires more _a_r_g_u_m_e_n_t_s than are supplied,
+ the extra format specifications behave as if a zero value or
+ null string, as appropriate, had been supplied. The return
+ value is zero on success, non-zero on failure.
+
+ ppuusshhdd [--nn] [+_n] [-_n]
+ ppuusshhdd [--nn] [_d_i_r]
+ Adds a directory to the top of the directory stack, or rotates
+ the stack, making the new top of the stack the current working
+ directory. With no arguments, exchanges the top two directories
+ and returns 0, unless the directory stack is empty. Arguments,
+ if supplied, have the following meanings:
+ --nn Suppresses the normal change of directory when adding
+ directories to the stack, so that only the stack is
+ manipulated.
+ ++_n Rotates the stack so that the _nth directory (counting
+ from the left of the list shown by ddiirrss, starting with
+ zero) is at the top.
+ --_n Rotates the stack so that the _nth directory (counting
+ from the right of the list shown by ddiirrss, starting with
+ zero) is at the top.
+ _d_i_r Adds _d_i_r to the directory stack at the top, making it the
+ new current working directory.
+
+ If the ppuusshhdd command is successful, a ddiirrss is performed as well.
+ If the first form is used, ppuusshhdd returns 0 unless the cd to _d_i_r
+ fails. With the second form, ppuusshhdd returns 0 unless the direc-
+ tory stack is empty, a non-existent directory stack element is
+ specified, or the directory change to the specified new current
+ directory fails.
+
+ ppwwdd [--LLPP]
+ Print the absolute pathname of the current working directory.
+ The pathname printed contains no symbolic links if the --PP option
+ is supplied or the --oo pphhyyssiiccaall option to the sseett builtin command
+ is enabled. If the --LL option is used, the pathname printed may
+ contain symbolic links. The return status is 0 unless an error
+ occurs while reading the name of the current directory or an
+ invalid option is supplied.
+
+ rreeaadd [--eerrss] [--aa _a_n_a_m_e] [--dd _d_e_l_i_m] [--ii _t_e_x_t] [--nn _n_c_h_a_r_s] [--NN _n_c_h_a_r_s] [--pp
+ _p_r_o_m_p_t] [--tt _t_i_m_e_o_u_t] [--uu _f_d] [_n_a_m_e ...]
+ One line is read from the standard input, or from the file
+ descriptor _f_d supplied as an argument to the --uu option, and the
+ first word is assigned to the first _n_a_m_e, the second word to the
+ second _n_a_m_e, and so on, with leftover words and their interven-
+ ing separators assigned to the last _n_a_m_e. If there are fewer
+ words read from the input stream than names, the remaining names
+ are assigned empty values. The characters in IIFFSS are used to
+ split the line into words. The backslash character (\\) may be
+ used to remove any special meaning for the next character read
+ and for line continuation. Options, if supplied, have the fol-
+ lowing meanings:
+ --aa _a_n_a_m_e
+ The words are assigned to sequential indices of the array
+ variable _a_n_a_m_e, starting at 0. _a_n_a_m_e is unset before any
+ new values are assigned. Other _n_a_m_e arguments are
+ ignored.
+ --dd _d_e_l_i_m
+ The first character of _d_e_l_i_m is used to terminate the
+ input line, rather than newline.
+ --ee If the standard input is coming from a terminal, rreeaaddlliinnee
+ (see RREEAADDLLIINNEE above) is used to obtain the line. Read-
+ line uses the current (or default, if line editing was
+ not previously active) editing settings.
+ --ii _t_e_x_t
+ If rreeaaddlliinnee is being used to read the line, _t_e_x_t is
+ placed into the editing buffer before editing begins.
+ --nn _n_c_h_a_r_s
+ rreeaadd returns after reading _n_c_h_a_r_s characters rather than
+ waiting for a complete line of input, but honor a delim-
+ iter if fewer than _n_c_h_a_r_s characters are read before the
+ delimiter.
+ --NN _n_c_h_a_r_s
+ rreeaadd returns after reading exactly _n_c_h_a_r_s characters
+ rather than waiting for a complete line of input, unless
+ EOF is encountered or rreeaadd times out. Delimiter charac-
+ ters encountered in the input are not treated specially
+ and do not cause rreeaadd to return until _n_c_h_a_r_s characters
+ are read.
+ --pp _p_r_o_m_p_t
+ Display _p_r_o_m_p_t on standard error, without a trailing new-
+ line, before attempting to read any input. The prompt is
+ displayed only if input is coming from a terminal.
+ --rr Backslash does not act as an escape character. The back-
+ slash is considered to be part of the line. In particu-
+ lar, a backslash-newline pair may not be used as a line
+ continuation.
+ --ss Silent mode. If input is coming from a terminal, charac-
+ ters are not echoed.
+ --tt _t_i_m_e_o_u_t
+ Cause rreeaadd to time out and return failure if a complete
+ line of input is not read within _t_i_m_e_o_u_t seconds. _t_i_m_e_-
+ _o_u_t may be a decimal number with a fractional portion
+ following the decimal point. This option is only effec-
+ tive if rreeaadd is reading input from a terminal, pipe, or
+ other special file; it has no effect when reading from
+ regular files. If _t_i_m_e_o_u_t is 0, rreeaadd returns success if
+ input is available on the specified file descriptor,
+ failure otherwise. The exit status is greater than 128
+ if the timeout is exceeded.
+ --uu _f_d Read input from file descriptor _f_d.
+
+ If no _n_a_m_e_s are supplied, the line read is assigned to the vari-
+ able RREEPPLLYY. The return code is zero, unless end-of-file is
+ encountered, rreeaadd times out (in which case the return code is
+ greater than 128), or an invalid file descriptor is supplied as
+ the argument to --uu.
+
+ rreeaaddoonnllyy [--aaAAppff] [_n_a_m_e[=_w_o_r_d] ...]
+ The given _n_a_m_e_s are marked readonly; the values of these _n_a_m_e_s
+ may not be changed by subsequent assignment. If the --ff option
+ is supplied, the functions corresponding to the _n_a_m_e_s are so
+ marked. The --aa option restricts the variables to indexed
+ arrays; the --AA option restricts the variables to associative
+ arrays. If no _n_a_m_e arguments are given, or if the --pp option is
+ supplied, a list of all readonly names is printed. The --pp
+ option causes output to be displayed in a format that may be
+ reused as input. If a variable name is followed by =_w_o_r_d, the
+ value of the variable is set to _w_o_r_d. The return status is 0
+ unless an invalid option is encountered, one of the _n_a_m_e_s is not
+ a valid shell variable name, or --ff is supplied with a _n_a_m_e that
+ is not a function.
+
+ rreettuurrnn [_n]
+ Causes a function to exit with the return value specified by _n.
+ If _n is omitted, the return status is that of the last command
+ executed in the function body. If used outside a function, but
+ during execution of a script by the .. (ssoouurrccee) command, it
+ causes the shell to stop executing that script and return either
+ _n or the exit status of the last command executed within the
+ script as the exit status of the script. If used outside a
+ function and not during execution of a script by .., the return
+ status is false. Any command associated with the RREETTUURRNN trap is
+ executed before execution resumes after the function or script.
+
+ sseett [----aabbeeffhhkkmmnnppttuuvvxxBBCCEEHHPPTT] [--oo _o_p_t_i_o_n] [_a_r_g ...]
+ sseett [++aabbeeffhhkkmmnnppttuuvvxxBBCCEEHHPPTT] [++oo _o_p_t_i_o_n] [_a_r_g ...]
+ Without options, the name and value of each shell variable are
+ displayed in a format that can be reused as input for setting or
+ resetting the currently-set variables. Read-only variables can-
+ not be reset. In _p_o_s_i_x _m_o_d_e, only shell variables are listed.
+ The output is sorted according to the current locale. When
+ options are specified, they set or unset shell attributes. Any
+ arguments remaining after option processing are treated as val-
+ ues for the positional parameters and are assigned, in order, to
+ $$11, $$22, ...... $$_n. Options, if specified, have the following
+ meanings:
+ --aa Automatically mark variables and functions which are
+ modified or created for export to the environment of
+ subsequent commands.
+ --bb Report the status of terminated background jobs immedi-
+ ately, rather than before the next primary prompt. This
+ is effective only when job control is enabled.
+ --ee Exit immediately if a _p_i_p_e_l_i_n_e (which may consist of a
+ single _s_i_m_p_l_e _c_o_m_m_a_n_d), a _s_u_b_s_h_e_l_l command enclosed in
+ parentheses, or one of the commands executed as part of
+ a command list enclosed by braces (see SSHHEELLLL GGRRAAMMMMAARR
+ above) exits with a non-zero status. The shell does not
+ exit if the command that fails is part of the command
+ list immediately following a wwhhiillee or uunnttiill keyword,
+ part of the test following the iiff or eelliiff reserved
+ words, part of any command executed in a &&&& or |||| list
+ except the command following the final &&&& or ||||, any
+ command in a pipeline but the last, or if the command's
+ return value is being inverted with !!. A trap on EERRRR,
+ if set, is executed before the shell exits. This option
+ applies to the shell environment and each subshell envi-
+ ronment separately (see CCOOMMMMAANNDD EEXXEECCUUTTIIOONN EENNVVIIRROONNMMEENNTT
+ above), and may cause subshells to exit before executing
+ all the commands in the subshell.
+ --ff Disable pathname expansion.
+ --hh Remember the location of commands as they are looked up
+ for execution. This is enabled by default.
+ --kk All arguments in the form of assignment statements are
+ placed in the environment for a command, not just those
+ that precede the command name.
+ --mm Monitor mode. Job control is enabled. This option is
+ on by default for interactive shells on systems that
+ support it (see JJOOBB CCOONNTTRROOLL above). Background pro-
+ cesses run in a separate process group and a line con-
+ taining their exit status is printed upon their comple-
+ tion.
+ --nn Read commands but do not execute them. This may be used
+ to check a shell script for syntax errors. This is
+ ignored by interactive shells.
+ --oo _o_p_t_i_o_n_-_n_a_m_e
+ The _o_p_t_i_o_n_-_n_a_m_e can be one of the following:
+ aalllleexxppoorrtt
+ Same as --aa.
+ bbrraacceeeexxppaanndd
+ Same as --BB.
+ eemmaaccss Use an emacs-style command line editing inter-
+ face. This is enabled by default when the shell
+ is interactive, unless the shell is started with
+ the ----nnooeeddiittiinngg option. This also affects the
+ editing interface used for rreeaadd --ee.
+ eerrrreexxiitt Same as --ee.
+ eerrrrttrraaccee
+ Same as --EE.
+ ffuunnccttrraaccee
+ Same as --TT.
+ hhaasshhaallll Same as --hh.
+ hhiisstteexxppaanndd
+ Same as --HH.
+ hhiissttoorryy Enable command history, as described above under
+ HHIISSTTOORRYY. This option is on by default in inter-
+ active shells.
+ iiggnnoorreeeeooff
+ The effect is as if the shell command
+ ``IGNOREEOF=10'' had been executed (see SShheellll
+ VVaarriiaabblleess above).
+ kkeeyywwoorrdd Same as --kk.
+ mmoonniittoorr Same as --mm.
+ nnoocclloobbbbeerr
+ Same as --CC.
+ nnooeexxeecc Same as --nn.
+ nnoogglloobb Same as --ff.
+ nnoolloogg Currently ignored.
+ nnoottiiffyy Same as --bb.
+ nnoouunnsseett Same as --uu.
+ oonneeccmmdd Same as --tt.
+ pphhyyssiiccaall
+ Same as --PP.
+ ppiippeeffaaiill
+ If set, the return value of a pipeline is the
+ value of the last (rightmost) command to exit
+ with a non-zero status, or zero if all commands
+ in the pipeline exit successfully. This option
+ is disabled by default.
+ ppoossiixx Change the behavior of bbaasshh where the default
+ operation differs from the POSIX standard to
+ match the standard (_p_o_s_i_x _m_o_d_e).
+ pprriivviilleeggeedd
+ Same as --pp.
+ vveerrbboossee Same as --vv.
+ vvii Use a vi-style command line editing interface.
+ This also affects the editing interface used for
+ rreeaadd --ee.
+ xxttrraaccee Same as --xx.
+ If --oo is supplied with no _o_p_t_i_o_n_-_n_a_m_e, the values of the
+ current options are printed. If ++oo is supplied with no
+ _o_p_t_i_o_n_-_n_a_m_e, a series of sseett commands to recreate the
+ current option settings is displayed on the standard
+ output.
+ --pp Turn on _p_r_i_v_i_l_e_g_e_d mode. In this mode, the $$EENNVV and
+ $$BBAASSHH__EENNVV files are not processed, shell functions are
+ not inherited from the environment, and the SSHHEELLLLOOPPTTSS,
+ BBAASSHHOOPPTTSS, CCDDPPAATTHH, and GGLLOOBBIIGGNNOORREE variables, if they
+ appear in the environment, are ignored. If the shell is
+ started with the effective user (group) id not equal to
+ the real user (group) id, and the --pp option is not sup-
+ plied, these actions are taken and the effective user id
+ is set to the real user id. If the --pp option is sup-
+ plied at startup, the effective user id is not reset.
+ Turning this option off causes the effective user and
+ group ids to be set to the real user and group ids.
+ --tt Exit after reading and executing one command.
+ --uu Treat unset variables and parameters other than the spe-
+ cial parameters "@" and "*" as an error when performing
+ parameter expansion. If expansion is attempted on an
+ unset variable or parameter, the shell prints an error
+ message, and, if not interactive, exits with a non-zero
+ status.
+ --vv Print shell input lines as they are read.
+ --xx After expanding each _s_i_m_p_l_e _c_o_m_m_a_n_d, ffoorr command, ccaassee
+ command, sseelleecctt command, or arithmetic ffoorr command, dis-
+ play the expanded value of PPSS44, followed by the command
+ and its expanded arguments or associated word list.
+ --BB The shell performs brace expansion (see BBrraaccee EExxppaannssiioonn
+ above). This is on by default.
+ --CC If set, bbaasshh does not overwrite an existing file with
+ the >>, >>&&, and <<>> redirection operators. This may be
+ overridden when creating output files by using the redi-
+ rection operator >>|| instead of >>.
+ --EE If set, any trap on EERRRR is inherited by shell functions,
+ command substitutions, and commands executed in a sub-
+ shell environment. The EERRRR trap is normally not inher-
+ ited in such cases.
+ --HH Enable !! style history substitution. This option is on
+ by default when the shell is interactive.
+ --PP If set, the shell does not follow symbolic links when
+ executing commands such as ccdd that change the current
+ working directory. It uses the physical directory
+ structure instead. By default, bbaasshh follows the logical
+ chain of directories when performing commands which
+ change the current directory.
+ --TT If set, any traps on DDEEBBUUGG and RREETTUURRNN are inherited by
+ shell functions, command substitutions, and commands
+ executed in a subshell environment. The DDEEBBUUGG and
+ RREETTUURRNN traps are normally not inherited in such cases.
+ ---- If no arguments follow this option, then the positional
+ parameters are unset. Otherwise, the positional parame-
+ ters are set to the _a_r_gs, even if some of them begin
+ with a --.
+ -- Signal the end of options, cause all remaining _a_r_gs to
+ be assigned to the positional parameters. The --xx and --vv
+ options are turned off. If there are no _a_r_gs, the posi-
+ tional parameters remain unchanged.
+
+ The options are off by default unless otherwise noted. Using +
+ rather than - causes these options to be turned off. The
+ options can also be specified as arguments to an invocation of
+ the shell. The current set of options may be found in $$--. The
+ return status is always true unless an invalid option is encoun-
+ tered.
+
+ sshhiifftt [_n]
+ The positional parameters from _n+1 ... are renamed to $$11 ........
+ Parameters represented by the numbers $$## down to $$##-_n+1 are
+ unset. _n must be a non-negative number less than or equal to
+ $$##. If _n is 0, no parameters are changed. If _n is not given,
+ it is assumed to be 1. If _n is greater than $$##, the positional
+ parameters are not changed. The return status is greater than
+ zero if _n is greater than $$## or less than zero; otherwise 0.
+
+ sshhoopptt [--ppqqssuu] [--oo] [_o_p_t_n_a_m_e ...]
+ Toggle the values of variables controlling optional shell behav-
+ ior. With no options, or with the --pp option, a list of all set-
+ table options is displayed, with an indication of whether or not
+ each is set. The --pp option causes output to be displayed in a
+ form that may be reused as input. Other options have the fol-
+ lowing meanings:
+ --ss Enable (set) each _o_p_t_n_a_m_e.
+ --uu Disable (unset) each _o_p_t_n_a_m_e.
+ --qq Suppresses normal output (quiet mode); the return status
+ indicates whether the _o_p_t_n_a_m_e is set or unset. If multi-
+ ple _o_p_t_n_a_m_e arguments are given with --qq, the return sta-
+ tus is zero if all _o_p_t_n_a_m_e_s are enabled; non-zero other-
+ wise.
+ --oo Restricts the values of _o_p_t_n_a_m_e to be those defined for
+ the --oo option to the sseett builtin.
+
+ If either --ss or --uu is used with no _o_p_t_n_a_m_e arguments, the dis-
+ play is limited to those options which are set or unset, respec-
+ tively. Unless otherwise noted, the sshhoopptt options are disabled
+ (unset) by default.
+
+ The return status when listing options is zero if all _o_p_t_n_a_m_e_s
+ are enabled, non-zero otherwise. When setting or unsetting
+ options, the return status is zero unless an _o_p_t_n_a_m_e is not a
+ valid shell option.
+
+ The list of sshhoopptt options is:
+
+ aauuttooccdd If set, a command name that is the name of a directory
+ is executed as if it were the argument to the ccdd com-
+ mand. This option is only used by interactive shells.
+ ccddaabbllee__vvaarrss
+ If set, an argument to the ccdd builtin command that is
+ not a directory is assumed to be the name of a variable
+ whose value is the directory to change to.
+ ccddssppeellll If set, minor errors in the spelling of a directory com-
+ ponent in a ccdd command will be corrected. The errors
+ checked for are transposed characters, a missing charac-
+ ter, and one character too many. If a correction is
+ found, the corrected file name is printed, and the com-
+ mand proceeds. This option is only used by interactive
+ shells.
+ cchheecckkhhaasshh
+ If set, bbaasshh checks that a command found in the hash ta-
+ ble exists before trying to execute it. If a hashed
+ command no longer exists, a normal path search is per-
+ formed.
+ cchheecckkjjoobbss
+ If set, bbaasshh lists the status of any stopped and running
+ jobs before exiting an interactive shell. If any jobs
+ are running, this causes the exit to be deferred until a
+ second exit is attempted without an intervening command
+ (see JJOOBB CCOONNTTRROOLL above). The shell always postpones
+ exiting if any jobs are stopped.
+ cchheecckkwwiinnssiizzee
+ If set, bbaasshh checks the window size after each command
+ and, if necessary, updates the values of LLIINNEESS and CCOOLL--
+ UUMMNNSS.
+ ccmmddhhiisstt If set, bbaasshh attempts to save all lines of a multiple-
+ line command in the same history entry. This allows
+ easy re-editing of multi-line commands.
+ ccoommppaatt3311
+ If set, bbaasshh changes its behavior to that of version 3.1
+ with respect to quoted arguments to the conditional com-
+ mand's =~ operator.
+ ccoommppaatt3322
+ If set, bbaasshh changes its behavior to that of version 3.2
+ with respect to locale-specific string comparison when
+ using the conditional command's < and > operators.
+ ccoommppaatt4400
+ If set, bbaasshh changes its behavior to that of version 4.0
+ with respect to locale-specific string comparison when
+ using the conditional command's < and > operators and
+ the effect of interrupting a command list.
+ ddiirrssppeellll
+ If set, bbaasshh attempts spelling correction on directory
+ names during word completion if the directory name ini-
+ tially supplied does not exist.
+ ddoottgglloobb If set, bbaasshh includes filenames beginning with a `.' in
+ the results of pathname expansion.
+ eexxeeccffaaiill
+ If set, a non-interactive shell will not exit if it can-
+ not execute the file specified as an argument to the
+ eexxeecc builtin command. An interactive shell does not
+ exit if eexxeecc fails.
+ eexxppaanndd__aalliiaasseess
+ If set, aliases are expanded as described above under
+ AALLIIAASSEESS. This option is enabled by default for interac-
+ tive shells.
+ eexxttddeebbuugg
+ If set, behavior intended for use by debuggers is
+ enabled:
+ 11.. The --FF option to the ddeeccllaarree builtin displays the
+ source file name and line number corresponding to
+ each function name supplied as an argument.
+ 22.. If the command run by the DDEEBBUUGG trap returns a
+ non-zero value, the next command is skipped and
+ not executed.
+ 33.. If the command run by the DDEEBBUUGG trap returns a
+ value of 2, and the shell is executing in a sub-
+ routine (a shell function or a shell script exe-
+ cuted by the .. or ssoouurrccee builtins), a call to
+ rreettuurrnn is simulated.
+ 44.. BBAASSHH__AARRGGCC and BBAASSHH__AARRGGVV are updated as described
+ in their descriptions above.
+ 55.. Function tracing is enabled: command substitu-
+ tion, shell functions, and subshells invoked with
+ (( _c_o_m_m_a_n_d )) inherit the DDEEBBUUGG and RREETTUURRNN traps.
+ 66.. Error tracing is enabled: command substitution,
+ shell functions, and subshells invoked with ((
+ _c_o_m_m_a_n_d )) inherit the EERRRROORR trap.
+ eexxttgglloobb If set, the extended pattern matching features described
+ above under PPaatthhnnaammee EExxppaannssiioonn are enabled.
+ eexxttqquuoottee
+ If set, $$'_s_t_r_i_n_g' and $$"_s_t_r_i_n_g" quoting is performed
+ within $${{_p_a_r_a_m_e_t_e_r}} expansions enclosed in double
+ quotes. This option is enabled by default.
+ ffaaiillgglloobb
+ If set, patterns which fail to match filenames during
+ pathname expansion result in an expansion error.
+ ffoorrccee__ffiiggnnoorree
+ If set, the suffixes specified by the FFIIGGNNOORREE shell
+ variable cause words to be ignored when performing word
+ completion even if the ignored words are the only possi-
+ ble completions. See SSHHEELLLL VVAARRIIAABBLLEESS above for a
+ description of FFIIGGNNOORREE. This option is enabled by
+ default.
+ gglloobbssttaarr
+ If set, the pattern **** used in a pathname expansion con-
+ text will match a files and zero or more directories and
+ subdirectories. If the pattern is followed by a //, only
+ directories and subdirectories match.
+ ggnnuu__eerrrrffmmtt
+ If set, shell error messages are written in the standard
+ GNU error message format.
+ hhiissttaappppeenndd
+ If set, the history list is appended to the file named
+ by the value of the HHIISSTTFFIILLEE variable when the shell
+ exits, rather than overwriting the file.
+ hhiissttrreeeeddiitt
+ If set, and rreeaaddlliinnee is being used, a user is given the
+ opportunity to re-edit a failed history substitution.
+ hhiissttvveerriiffyy
+ If set, and rreeaaddlliinnee is being used, the results of his-
+ tory substitution are not immediately passed to the
+ shell parser. Instead, the resulting line is loaded
+ into the rreeaaddlliinnee editing buffer, allowing further modi-
+ fication.
+ hhoossttccoommpplleettee
+ If set, and rreeaaddlliinnee is being used, bbaasshh will attempt to
+ perform hostname completion when a word containing a @@
+ is being completed (see CCoommpplleettiinngg under RREEAADDLLIINNEE
+ above). This is enabled by default.
+ hhuuppoonneexxiitt
+ If set, bbaasshh will send SSIIGGHHUUPP to all jobs when an inter-
+ active login shell exits.
+ iinntteerraaccttiivvee__ccoommmmeennttss
+ If set, allow a word beginning with ## to cause that word
+ and all remaining characters on that line to be ignored
+ in an interactive shell (see CCOOMMMMEENNTTSS above). This
+ option is enabled by default.
+ lliitthhiisstt If set, and the ccmmddhhiisstt option is enabled, multi-line
+ commands are saved to the history with embedded newlines
+ rather than using semicolon separators where possible.
+ llooggiinn__sshheellll
+ The shell sets this option if it is started as a login
+ shell (see IINNVVOOCCAATTIIOONN above). The value may not be
+ changed.
+ mmaaiillwwaarrnn
+ If set, and a file that bbaasshh is checking for mail has
+ been accessed since the last time it was checked, the
+ message ``The mail in _m_a_i_l_f_i_l_e has been read'' is dis-
+ played.
+ nnoo__eemmppttyy__ccmmdd__ccoommpplleettiioonn
+ If set, and rreeaaddlliinnee is being used, bbaasshh will not
+ attempt to search the PPAATTHH for possible completions when
+ completion is attempted on an empty line.
+ nnooccaasseegglloobb
+ If set, bbaasshh matches filenames in a case-insensitive
+ fashion when performing pathname expansion (see PPaatthhnnaammee
+ EExxppaannssiioonn above).
+ nnooccaasseemmaattcchh
+ If set, bbaasshh matches patterns in a case-insensitive
+ fashion when performing matching while executing ccaassee or
+ [[[[ conditional commands.
+ nnuullllgglloobb
+ If set, bbaasshh allows patterns which match no files (see
+ PPaatthhnnaammee EExxppaannssiioonn above) to expand to a null string,
+ rather than themselves.
+ pprrooggccoommpp
+ If set, the programmable completion facilities (see PPrroo--
+ ggrraammmmaabbllee CCoommpplleettiioonn above) are enabled. This option is
+ enabled by default.
+ pprroommppttvvaarrss
+ If set, prompt strings undergo parameter expansion, com-
+ mand substitution, arithmetic expansion, and quote
+ removal after being expanded as described in PPRROOMMPPTTIINNGG
+ above. This option is enabled by default.
+ rreessttrriicctteedd__sshheellll
+ The shell sets this option if it is started in
+ restricted mode (see RREESSTTRRIICCTTEEDD SSHHEELLLL below). The value
+ may not be changed. This is not reset when the startup
+ files are executed, allowing the startup files to dis-
+ cover whether or not a shell is restricted.
+ sshhiifftt__vveerrbboossee
+ If set, the sshhiifftt builtin prints an error message when
+ the shift count exceeds the number of positional parame-
+ ters.
+ ssoouurrcceeppaatthh
+ If set, the ssoouurrccee (..) builtin uses the value of PPAATTHH to
+ find the directory containing the file supplied as an
+ argument. This option is enabled by default.
+ xxppgg__eecchhoo
+ If set, the eecchhoo builtin expands backslash-escape
+ sequences by default.
+ ssuussppeenndd [--ff]
+ Suspend the execution of this shell until it receives a SSIIGGCCOONNTT
+ signal. A login shell cannot be suspended; the --ff option can be
+ used to override this and force the suspension. The return sta-
+ tus is 0 unless the shell is a login shell and --ff is not sup-
+ plied, or if job control is not enabled.
+ tteesstt _e_x_p_r
+ [[ _e_x_p_r ]]
+ Return a status of 0 or 1 depending on the evaluation of the
+ conditional expression _e_x_p_r. Each operator and operand must be
+ a separate argument. Expressions are composed of the primaries
+ described above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS. tteesstt does not
+ accept any options, nor does it accept and ignore an argument of
+ ---- as signifying the end of options.
+
+ Expressions may be combined using the following operators,
+ listed in decreasing order of precedence. The evaluation
+ depends on the number of arguments; see below.
+ !! _e_x_p_r True if _e_x_p_r is false.
+ (( _e_x_p_r ))
+ Returns the value of _e_x_p_r. This may be used to override
+ the normal precedence of operators.
+ _e_x_p_r_1 -aa _e_x_p_r_2
+ True if both _e_x_p_r_1 and _e_x_p_r_2 are true.
+ _e_x_p_r_1 -oo _e_x_p_r_2
+ True if either _e_x_p_r_1 or _e_x_p_r_2 is true.
+
+ tteesstt and [[ evaluate conditional expressions using a set of rules
+ based on the number of arguments.
+
+ 0 arguments
+ The expression is false.
+ 1 argument
+ The expression is true if and only if the argument is not
+ null.
+ 2 arguments
+ If the first argument is !!, the expression is true if and
+ only if the second argument is null. If the first argu-
+ ment is one of the unary conditional operators listed
+ above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the expression is
+ true if the unary test is true. If the first argument is
+ not a valid unary conditional operator, the expression is
+ false.
+ 3 arguments
+ If the second argument is one of the binary conditional
+ operators listed above under CCOONNDDIITTIIOONNAALL EEXXPPRREESSSSIIOONNSS, the
+ result of the expression is the result of the binary test
+ using the first and third arguments as operands. The --aa
+ and --oo operators are considered binary operators when
+ there are three arguments. If the first argument is !!,
+ the value is the negation of the two-argument test using
+ the second and third arguments. If the first argument is
+ exactly (( and the third argument is exactly )), the result
+ is the one-argument test of the second argument. Other-
+ wise, the expression is false.
+ 4 arguments
+ If the first argument is !!, the result is the negation of
+ the three-argument expression composed of the remaining
+ arguments. Otherwise, the expression is parsed and eval-
+ uated according to precedence using the rules listed
+ above.
+ 5 or more arguments
+ The expression is parsed and evaluated according to
+ precedence using the rules listed above.
+
+ ttiimmeess Print the accumulated user and system times for the shell and
+ for processes run from the shell. The return status is 0.
+
+ ttrraapp [--llpp] [[_a_r_g] _s_i_g_s_p_e_c ...]
+ The command _a_r_g is to be read and executed when the shell
+ receives signal(s) _s_i_g_s_p_e_c. If _a_r_g is absent (and there is a
+ single _s_i_g_s_p_e_c) or --, each specified signal is reset to its
+ original disposition (the value it had upon entrance to the
+ shell). If _a_r_g is the null string the signal specified by each
+ _s_i_g_s_p_e_c is ignored by the shell and by the commands it invokes.
+ If _a_r_g is not present and --pp has been supplied, then the trap
+ commands associated with each _s_i_g_s_p_e_c are displayed. If no
+ arguments are supplied or if only --pp is given, ttrraapp prints the
+ list of commands associated with each signal. The --ll option
+ causes the shell to print a list of signal names and their cor-
+ responding numbers. Each _s_i_g_s_p_e_c is either a signal name
+ defined in <_s_i_g_n_a_l_._h>, or a signal number. Signal names are
+ case insensitive and the SIG prefix is optional.
+
+ If a _s_i_g_s_p_e_c is EEXXIITT (0) the command _a_r_g is executed on exit
+ from the shell. If a _s_i_g_s_p_e_c is DDEEBBUUGG, the command _a_r_g is exe-
+ cuted before every _s_i_m_p_l_e _c_o_m_m_a_n_d, _f_o_r command, _c_a_s_e command,
+ _s_e_l_e_c_t command, every arithmetic _f_o_r command, and before the
+ first command executes in a shell function (see SSHHEELLLL GGRRAAMMMMAARR
+ above). Refer to the description of the eexxttddeebbuugg option to the
+ sshhoopptt builtin for details of its effect on the DDEEBBUUGG trap. If a
+ _s_i_g_s_p_e_c is RREETTUURRNN, the command _a_r_g is executed each time a shell
+ function or a script executed with the .. or ssoouurrccee builtins fin-
+ ishes executing.
+
+ If a _s_i_g_s_p_e_c is EERRRR, the command _a_r_g is executed whenever a sim-
+ ple command has a non-zero exit status, subject to the following
+ conditions. The EERRRR trap is not executed if the failed command
+ is part of the command list immediately following a wwhhiillee or
+ uunnttiill keyword, part of the test in an _i_f statement, part of a
+ command executed in a &&&& or |||| list, or if the command's return
+ value is being inverted via !!. These are the same conditions
+ obeyed by the eerrrreexxiitt option.
+
+ Signals ignored upon entry to the shell cannot be trapped or
+ reset. Trapped signals that are not being ignored are reset to
+ their original values in a subshell or subshell environment when
+ one is created. The return status is false if any _s_i_g_s_p_e_c is
+ invalid; otherwise ttrraapp returns true.
+
+ ttyyppee [--aaffttppPP] _n_a_m_e [_n_a_m_e ...]
+ With no options, indicate how each _n_a_m_e would be interpreted if
+ used as a command name. If the --tt option is used, ttyyppee prints a
+ string which is one of _a_l_i_a_s, _k_e_y_w_o_r_d, _f_u_n_c_t_i_o_n, _b_u_i_l_t_i_n, or
+ _f_i_l_e if _n_a_m_e is an alias, shell reserved word, function,
+ builtin, or disk file, respectively. If the _n_a_m_e is not found,
+ then nothing is printed, and an exit status of false is
+ returned. If the --pp option is used, ttyyppee either returns the
+ name of the disk file that would be executed if _n_a_m_e were speci-
+ fied as a command name, or nothing if ``type -t name'' would not
+ return _f_i_l_e. The --PP option forces a PPAATTHH search for each _n_a_m_e,
+ even if ``type -t name'' would not return _f_i_l_e. If a command is
+ hashed, --pp and --PP print the hashed value, not necessarily the
+ file that appears first in PPAATTHH. If the --aa option is used, ttyyppee
+ prints all of the places that contain an executable named _n_a_m_e.
+ This includes aliases and functions, if and only if the --pp
+ option is not also used. The table of hashed commands is not
+ consulted when using --aa. The --ff option suppresses shell func-
+ tion lookup, as with the ccoommmmaanndd builtin. ttyyppee returns true if
+ all of the arguments are found, false if any are not found.
+
+ uulliimmiitt [--HHSSTTaabbccddeeffiillmmnnppqqrrssttuuvvxx [_l_i_m_i_t]]
+ Provides control over the resources available to the shell and
+ to processes started by it, on systems that allow such control.
+ The --HH and --SS options specify that the hard or soft limit is set
+ for the given resource. A hard limit cannot be increased by a
+ non-root user once it is set; a soft limit may be increased up
+ to the value of the hard limit. If neither --HH nor --SS is speci-
+ fied, both the soft and hard limits are set. The value of _l_i_m_i_t
+ can be a number in the unit specified for the resource or one of
+ the special values hhaarrdd, ssoofftt, or uunnlliimmiitteedd, which stand for the
+ current hard limit, the current soft limit, and no limit,
+ respectively. If _l_i_m_i_t is omitted, the current value of the
+ soft limit of the resource is printed, unless the --HH option is
+ given. When more than one resource is specified, the limit name
+ and unit are printed before the value. Other options are inter-
+ preted as follows:
+ --aa All current limits are reported
+ --bb The maximum socket buffer size
+ --cc The maximum size of core files created
+ --dd The maximum size of a process's data segment
+ --ee The maximum scheduling priority ("nice")
+ --ff The maximum size of files written by the shell and its
+ children
+ --ii The maximum number of pending signals
+ --ll The maximum size that may be locked into memory
+ --mm The maximum resident set size (many systems do not honor
+ this limit)
+ --nn The maximum number of open file descriptors (most systems
+ do not allow this value to be set)
+ --pp The pipe size in 512-byte blocks (this may not be set)
+ --qq The maximum number of bytes in POSIX message queues
+ --rr The maximum real-time scheduling priority
+ --ss The maximum stack size
+ --tt The maximum amount of cpu time in seconds
+ --uu The maximum number of processes available to a single
+ user
+ --vv The maximum amount of virtual memory available to the
+ shell
+ --xx The maximum number of file locks
+ --TT The maximum number of threads
+
+ If _l_i_m_i_t is given, it is the new value of the specified resource
+ (the --aa option is display only). If no option is given, then --ff
+ is assumed. Values are in 1024-byte increments, except for --tt,
+ which is in seconds, --pp, which is in units of 512-byte blocks,
+ and --TT, --bb, --nn, and --uu, which are unscaled values. The return
+ status is 0 unless an invalid option or argument is supplied, or
+ an error occurs while setting a new limit.
+
+ uummaasskk [--pp] [--SS] [_m_o_d_e]
+ The user file-creation mask is set to _m_o_d_e. If _m_o_d_e begins with
+ a digit, it is interpreted as an octal number; otherwise it is
+ interpreted as a symbolic mode mask similar to that accepted by
+ _c_h_m_o_d(1). If _m_o_d_e is omitted, the current value of the mask is
+ printed. The --SS option causes the mask to be printed in sym-
+ bolic form; the default output is an octal number. If the --pp
+ option is supplied, and _m_o_d_e is omitted, the output is in a form
+ that may be reused as input. The return status is 0 if the mode
+ was successfully changed or if no _m_o_d_e argument was supplied,
+ and false otherwise.
+
+ uunnaalliiaass [-aa] [_n_a_m_e ...]
+ Remove each _n_a_m_e from the list of defined aliases. If --aa is
+ supplied, all alias definitions are removed. The return value
+ is true unless a supplied _n_a_m_e is not a defined alias.
+
+ uunnsseett [-ffvv] [_n_a_m_e ...]
+ For each _n_a_m_e, remove the corresponding variable or function.
+ If no options are supplied, or the --vv option is given, each _n_a_m_e
+ refers to a shell variable. Read-only variables may not be
+ unset. If --ff is specified, each _n_a_m_e refers to a shell func-
+ tion, and the function definition is removed. Each unset vari-
+ able or function is removed from the environment passed to sub-
+ sequent commands. If any of CCOOMMPP__WWOORRDDBBRREEAAKKSS, RRAANNDDOOMM, SSEECCOONNDDSS,
+ LLIINNEENNOO, HHIISSTTCCMMDD, FFUUNNCCNNAAMMEE, GGRROOUUPPSS, or DDIIRRSSTTAACCKK are unset, they
+ lose their special properties, even if they are subsequently
+ reset. The exit status is true unless a _n_a_m_e is readonly.
+
+ wwaaiitt [_n _._._.]
+ Wait for each specified process and return its termination sta-
+ tus. Each _n may be a process ID or a job specification; if a
+ job spec is given, all processes in that job's pipeline are
+ waited for. If _n is not given, all currently active child pro-
+ cesses are waited for, and the return status is zero. If _n
+ specifies a non-existent process or job, the return status is
+ 127. Otherwise, the return status is the exit status of the
+ last process or job waited for.
+
+SSEEEE AALLSSOO
+ bash(1), sh(1)
+
+
+
+GNU Bash-4.0 2004 Apr 20 BASH_BUILTINS(1)
diff --git a/doc/builtins.1 b/doc/builtins.1
new file mode 100644
index 0000000..bf8bfec
--- /dev/null
+++ b/doc/builtins.1
@@ -0,0 +1,17 @@
+.\" This is a hack to force bash builtins into the whatis database
+.\" and to get the list of builtins to come up with the man command.
+.TH BASH_BUILTINS 1 "2004 Apr 20" "GNU Bash-4.0"
+.SH NAME
+bash, :, ., [, alias, bg, bind, break, builtin, caller,
+cd, command, compgen, complete,
+compopt, continue, declare, dirs, disown, echo, enable, eval, exec, exit,
+export, false, fc, fg, getopts, hash, help, history, jobs, kill,
+let, local, logout, mapfile, popd, printf, pushd, pwd, read,
+readonly, return, set,
+shift, shopt, source, suspend, test, times, trap, true, type, typeset,
+ulimit, umask, unalias, unset, wait \- bash built-in commands, see \fBbash\fR(1)
+.SH BASH BUILTIN COMMANDS
+.nr zZ 1
+.so bash.1
+.SH SEE ALSO
+bash(1), sh(1)
diff --git a/doc/builtins.ps b/doc/builtins.ps
new file mode 100644
index 0000000..539dfb0
--- /dev/null
+++ b/doc/builtins.ps
@@ -0,0 +1,2651 @@
+%!PS-Adobe-3.0
+%%Creator: groff version 1.19.2
+%%CreationDate: Wed Dec 30 13:07:37 2009
+%%DocumentNeededResources: font Times-Roman
+%%+ font Times-Bold
+%%+ font Times-Italic
+%%+ font Symbol
+%%+ font Courier
+%%DocumentSuppliedResources: procset grops 1.19 2
+%%Pages: 21
+%%PageOrder: Ascend
+%%DocumentMedia: Default 595 842 0 () ()
+%%Orientation: Portrait
+%%EndComments
+%%BeginDefaults
+%%PageMedia: Default
+%%EndDefaults
+%%BeginProlog
+%%BeginResource: procset grops 1.19 2
+%!PS-Adobe-3.0 Resource-ProcSet
+/setpacking where{
+pop
+currentpacking
+true setpacking
+}if
+/grops 120 dict dup begin
+/SC 32 def
+/A/show load def
+/B{0 SC 3 -1 roll widthshow}bind def
+/C{0 exch ashow}bind def
+/D{0 exch 0 SC 5 2 roll awidthshow}bind def
+/E{0 rmoveto show}bind def
+/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
+/G{0 rmoveto 0 exch ashow}bind def
+/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/I{0 exch rmoveto show}bind def
+/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
+/K{0 exch rmoveto 0 exch ashow}bind def
+/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/M{rmoveto show}bind def
+/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
+/O{rmoveto 0 exch ashow}bind def
+/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/Q{moveto show}bind def
+/R{moveto 0 SC 3 -1 roll widthshow}bind def
+/S{moveto 0 exch ashow}bind def
+/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/SF{
+findfont exch
+[exch dup 0 exch 0 exch neg 0 0]makefont
+dup setfont
+[exch/setfont cvx]cvx bind def
+}bind def
+/MF{
+findfont
+[5 2 roll
+0 3 1 roll
+neg 0 0]makefont
+dup setfont
+[exch/setfont cvx]cvx bind def
+}bind def
+/level0 0 def
+/RES 0 def
+/PL 0 def
+/LS 0 def
+/MANUAL{
+statusdict begin/manualfeed true store end
+}bind def
+/PLG{
+gsave newpath clippath pathbbox grestore
+exch pop add exch pop
+}bind def
+/BP{
+/level0 save def
+1 setlinecap
+1 setlinejoin
+72 RES div dup scale
+LS{
+90 rotate
+}{
+0 PL translate
+}ifelse
+1 -1 scale
+}bind def
+/EP{
+level0 restore
+showpage
+}def
+/DA{
+newpath arcn stroke
+}bind def
+/SN{
+transform
+.25 sub exch .25 sub exch
+round .25 add exch round .25 add exch
+itransform
+}bind def
+/DL{
+SN
+moveto
+SN
+lineto stroke
+}bind def
+/DC{
+newpath 0 360 arc closepath
+}bind def
+/TM matrix def
+/DE{
+TM currentmatrix pop
+translate scale newpath 0 0 .5 0 360 arc closepath
+TM setmatrix
+}bind def
+/RC/rcurveto load def
+/RL/rlineto load def
+/ST/stroke load def
+/MT/moveto load def
+/CL/closepath load def
+/Fr{
+setrgbcolor fill
+}bind def
+/setcmykcolor where{
+pop
+/Fk{
+setcmykcolor fill
+}bind def
+}if
+/Fg{
+setgray fill
+}bind def
+/FL/fill load def
+/LW/setlinewidth load def
+/Cr/setrgbcolor load def
+/setcmykcolor where{
+pop
+/Ck/setcmykcolor load def
+}if
+/Cg/setgray load def
+/RE{
+findfont
+dup maxlength 1 index/FontName known not{1 add}if dict begin
+{
+1 index/FID ne{def}{pop pop}ifelse
+}forall
+/Encoding exch def
+dup/FontName exch def
+currentdict end definefont pop
+}bind def
+/DEFS 0 def
+/EBEGIN{
+moveto
+DEFS begin
+}bind def
+/EEND/end load def
+/CNT 0 def
+/level1 0 def
+/PBEGIN{
+/level1 save def
+translate
+div 3 1 roll div exch scale
+neg exch neg exch translate
+0 setgray
+0 setlinecap
+1 setlinewidth
+0 setlinejoin
+10 setmiterlimit
+[]0 setdash
+/setstrokeadjust where{
+pop
+false setstrokeadjust
+}if
+/setoverprint where{
+pop
+false setoverprint
+}if
+newpath
+/CNT countdictstack def
+userdict begin
+/showpage{}def
+/setpagedevice{}def
+}bind def
+/PEND{
+countdictstack CNT sub{end}repeat
+level1 restore
+}bind def
+end def
+/setpacking where{
+pop
+setpacking
+}if
+%%EndResource
+%%EndProlog
+%%BeginSetup
+%%BeginFeature: *PageSize Default
+<< /PageSize [ 595 842 ] /ImagingBBox null >> setpagedevice
+%%EndFeature
+%%IncludeResource: font Times-Roman
+%%IncludeResource: font Times-Bold
+%%IncludeResource: font Times-Italic
+%%IncludeResource: font Symbol
+%%IncludeResource: font Courier
+grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
+def/PL 841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron
+/Zcaron/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef
+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
+/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
+/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
+/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
+/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
+/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
+/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
+/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
+/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
+/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
+/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
+/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
+/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
+/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
+/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
+/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
+/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
+/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
+/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
+/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
+/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
+/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
+/Courier@0 ENC0/Courier RE/Times-Italic@0 ENC0/Times-Italic RE
+/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE
+%%EndSetup
+%%Page: 1 1
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10.95
+/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0 1.325
+(bash, :, ., [, alias, bg, bind, break, b)108 96 R 1.325(uiltin, caller)
+-.2 F 3.825(,c)-.4 G 1.324
+(d, command, compgen, complete, compopt, continue,)-3.825 F .903
+(declare, dirs, diso)108 108 R .903(wn, echo, enable, e)-.25 F -.25(va)
+-.25 G .904(l, e).25 F -.15(xe)-.15 G .904(c, e).15 F .904(xit, e)-.15 F
+.904(xport, f)-.15 F .904(alse, fc, fg, getopts, hash, help, history)-.1
+F 3.404(,j)-.65 G(obs,)-3.404 E .133(kill, let, local, logout, map\214l\
+e, popd, printf, pushd, pwd, read, readonly)108 120 R 2.633(,r)-.65 G
+.133(eturn, set, shift, shopt, source, sus-)-2.633 F .279(pend, test, t\
+imes, trap, true, type, typeset, ulimit, umask, unalias, unset, w)108
+132 R .279(ait \255 bash b)-.1 F .279(uilt-in commands, see)-.2 F/F2 10
+/Times-Bold@0 SF(bash)108 144 Q F0(\(1\))A F1 -.329(BA)72 160.8 S(SH B)
+.329 E(UIL)-.11 E(TIN COMMANDS)-1.007 E F0 .063
+(Unless otherwise noted, each b)108 172.8 R .062(uiltin command documen\
+ted in this section as accepting options preceded by)-.2 F F2<ad>108
+184.8 Q F0(accepts)2.533 E F2<adad>2.533 E F0 .034
+(to signify the end of the options.)2.533 F(The)5.034 E F2(:)2.534 E F0
+(,)A F2(true)2.534 E F0(,)A F2(false)2.534 E F0 2.534(,a)C(nd)-2.534 E
+F2(test)2.534 E F0 -.2(bu)2.534 G .034(iltins do not accept options and)
+.2 F .078(do not treat)108 196.8 R F2<adad>2.577 E F0(specially)2.577 E
+5.077(.T)-.65 G(he)-5.077 E F2(exit)2.577 E F0(,)A F2(logout)2.577 E F0
+(,)A F2(br)2.577 E(eak)-.18 E F0(,)A F2(continue)2.577 E F0(,)A F2(let)
+2.577 E F0 2.577(,a)C(nd)-2.577 E F2(shift)2.577 E F0 -.2(bu)2.577 G
+.077(iltins accept and process ar).2 F(gu-)-.18 E .319(ments be)108
+208.8 R .319(ginning with)-.15 F F2<ad>2.819 E F0 .319
+(without requiring)2.819 F F2<adad>2.819 E F0 5.319(.O)C .319(ther b)
+-5.319 F .319(uiltins that accept ar)-.2 F .32(guments b)-.18 F .32
+(ut are not speci\214ed as)-.2 F 1.144(accepting options interpret ar)
+108 220.8 R 1.144(guments be)-.18 F 1.144(ginning with)-.15 F F2<ad>
+3.643 E F0 1.143(as in)3.643 F -.25(va)-.4 G 1.143
+(lid options and require).25 F F2<adad>3.643 E F0 1.143(to pre)3.643 F
+-.15(ve)-.25 G 1.143(nt this).15 F(interpretation.)108 232.8 Q F2(:)108
+250.8 Q F0([)2.5 E/F3 10/Times-Italic@0 SF(ar)A(guments)-.37 E F0(])A
+.451(No ef)144 262.8 R .451(fect; the command does nothing be)-.25 F
+.452(yond e)-.15 F(xpanding)-.15 E F3(ar)3.282 E(guments)-.37 E F0 .452
+(and performing an)3.222 F 2.952(ys)-.15 G(peci\214ed)-2.952 E 2.5
+(redirections. A)144 274.8 R(zero e)2.5 E(xit code is returned.)-.15 E
+F2(.)110.5 291.6 Q F3(\214lename)6.666 E F0([)2.5 E F3(ar)A(guments)-.37
+E F0(])A F2(sour)108 303.6 Q(ce)-.18 E F3(\214lename)2.5 E F0([)2.5 E F3
+(ar)A(guments)-.37 E F0(])A 1.02(Read and e)144 315.6 R -.15(xe)-.15 G
+1.02(cute commands from).15 F F3(\214lename)5.43 E F0 1.02
+(in the current shell en)3.7 F 1.02(vironment and return the e)-.4 F
+(xit)-.15 E 1.68(status of the last command e)144 327.6 R -.15(xe)-.15 G
+1.68(cuted from).15 F F3(\214lename)4.18 E F0 6.68(.I).18 G(f)-6.68 E F3
+(\214lename)6.09 E F0 1.68(does not contain a slash, \214le)4.36 F .608
+(names in)144 339.6 R/F4 9/Times-Bold@0 SF -.666(PA)3.108 G(TH)-.189 E
+F0 .608(are used to \214nd the directory containing)2.858 F F3
+(\214lename)3.108 E F0 5.608(.T).18 G .608(he \214le searched for in)
+-5.608 F F4 -.666(PA)3.108 G(TH)-.189 E F0 .832(need not be e)144 351.6
+R -.15(xe)-.15 G 3.332(cutable. When).15 F F2(bash)3.332 E F0 .832
+(is not in)3.332 F F3 .832(posix mode)3.332 F F0 3.332(,t)C .833
+(he current directory is searched if no)-3.332 F .982
+(\214le is found in)144 363.6 R F4 -.666(PA)3.481 G(TH)-.189 E/F5 9
+/Times-Roman@0 SF(.)A F0 .981(If the)5.481 F F2(sour)3.481 E(cepath)-.18
+E F0 .981(option to the)3.481 F F2(shopt)3.481 E F0 -.2(bu)3.481 G .981
+(iltin command is turned of).2 F .981(f, the)-.25 F F4 -.666(PA)144
+375.6 S(TH)-.189 E F0 .112(is not searched.)2.362 F .112(If an)5.112 F
+(y)-.15 E F3(ar)2.612 E(guments)-.37 E F0 .112(are supplied, the)2.612 F
+2.612(yb)-.15 G .112(ecome the positional parameters when)-2.612 F F3
+(\214lename)144 387.6 Q F0 .342(is e)2.842 F -.15(xe)-.15 G 2.842
+(cuted. Otherwise).15 F .342(the positional parameters are unchanged.)
+2.842 F .341(The return status is the)5.341 F .716
+(status of the last command e)144 399.6 R .716
+(xited within the script \(0 if no commands are e)-.15 F -.15(xe)-.15 G
+.716(cuted\), and f).15 F .716(alse if)-.1 F F3(\214lename)145.91 411.6
+Q F0(is not found or cannot be read.)2.68 E F2(alias)108 428.4 Q F0([)
+2.5 E F2<ad70>A F0 2.5(][)C F3(name)-2.5 E F0([=)A F3(value)A F0 2.5(].)
+C(..])-2.5 E F2(Alias)144 440.4 Q F0 2.725(with no ar)5.225 F 2.724
+(guments or with the)-.18 F F2<ad70>5.224 E F0 2.724
+(option prints the list of aliases in the form)5.224 F F2(alias)5.224 E
+F3(name)144 452.4 Q F0(=)A F3(value)A F0 .58(on standard output.)3.08 F
+.58(When ar)5.58 F .58
+(guments are supplied, an alias is de\214ned for each)-.18 F F3(name)
+3.08 E F0(whose)144 464.4 Q F3(value)2.895 E F0 .395(is gi)2.895 F -.15
+(ve)-.25 G 2.895(n. A).15 F .395(trailing space in)2.895 F F3(value)
+5.395 E F0 .395(causes the ne)2.895 F .395(xt w)-.15 F .395
+(ord to be check)-.1 F .395(ed for alias sub-)-.1 F .054
+(stitution when the alias is e)144 476.4 R 2.554(xpanded. F)-.15 F .054
+(or each)-.15 F F3(name)2.554 E F0 .054(in the ar)2.554 F .054
+(gument list for which no)-.18 F F3(value)2.554 E F0 .054(is sup-)2.554
+F 1.314(plied, the name and v)144 488.4 R 1.314
+(alue of the alias is printed.)-.25 F F2(Alias)6.314 E F0 1.314
+(returns true unless a)3.814 F F3(name)3.814 E F0 1.313(is gi)3.814 F
+-.15(ve)-.25 G 3.813(nf).15 G(or)-3.813 E
+(which no alias has been de\214ned.)144 500.4 Q F2(bg)108 517.2 Q F0([)
+2.5 E F3(jobspec)A F0(...])2.5 E .744(Resume each suspended job)144
+529.2 R F3(jobspec)3.244 E F0 .745
+(in the background, as if it had been started with)3.244 F F2(&)3.245 E
+F0 5.745(.I)C(f)-5.745 E F3(job-)4.985 E(spec)144 541.2 Q F0 .672
+(is not present, the shell')3.482 F 3.172(sn)-.55 G .672(otion of the)
+-3.172 F F3(curr)3.172 E .672(ent job)-.37 F F0 .672(is used.)3.172 F F2
+(bg)5.671 E F3(jobspec)4.911 E F0 .671(returns 0 unless run)3.481 F .418
+(when job control is disabled or)144 553.2 R 2.919(,w)-.4 G .419
+(hen run with job control enabled, an)-2.919 F 2.919(ys)-.15 G
+(peci\214ed)-2.919 E F3(jobspec)2.919 E F0 -.1(wa)2.919 G 2.919(sn).1 G
+(ot)-2.919 E(found or w)144 565.2 Q(as started without job control.)-.1
+E F2(bind)108 582 Q F0([)2.5 E F2<ad6d>A F3 -.1(ke)2.5 G(ymap)-.2 E F0
+2.5(][)C F2(\255lpsvPSV)-2.5 E F0(])A F2(bind)108 594 Q F0([)2.5 E F2
+<ad6d>A F3 -.1(ke)2.5 G(ymap)-.2 E F0 2.5(][)C F2<ad71>-2.5 E F3
+(function)2.5 E F0 2.5(][)C F2<ad75>-2.5 E F3(function)2.5 E F0 2.5(][)C
+F2<ad72>-2.5 E F3 -.1(ke)2.5 G(yseq)-.2 E F0(])A F2(bind)108 606 Q F0([)
+2.5 E F2<ad6d>A F3 -.1(ke)2.5 G(ymap)-.2 E F0(])A F2<ad66>2.5 E F3
+(\214lename)2.5 E F2(bind)108 618 Q F0([)2.5 E F2<ad6d>A F3 -.1(ke)2.5 G
+(ymap)-.2 E F0(])A F2<ad78>2.5 E F3 -.1(ke)2.5 G(yseq)-.2 E F0(:)A F3
+(shell\255command)A F2(bind)108 630 Q F0([)2.5 E F2<ad6d>A F3 -.1(ke)2.5
+G(ymap)-.2 E F0(])A F3 -.1(ke)2.5 G(yseq)-.2 E F0(:)A F3
+(function\255name)A F2(bind)108 642 Q F3 -.37(re)2.5 G
+(adline\255command).37 E F0 .239(Display current)144 654 R F2 -.18(re)
+2.739 G(adline).18 E F0 -.1(ke)2.739 G 2.739(ya)-.05 G .239
+(nd function bindings, bind a k)-2.739 F .539 -.15(ey s)-.1 H .238
+(equence to a).15 F F2 -.18(re)2.738 G(adline).18 E F0 .238(function or)
+2.738 F .475(macro, or set a)144 666 R F2 -.18(re)2.975 G(adline).18 E
+F0 -.25(va)2.975 G 2.975(riable. Each).25 F .476(non-option ar)2.976 F
+.476(gument is a command as it w)-.18 F .476(ould appear in)-.1 F F3
+(.inputr)144 678 Q(c)-.37 E F0 2.984(,b).31 G .484
+(ut each binding or command must be passed as a separate ar)-3.184 F
+.483(gument; e.g., '"\\C\255x\\C\255r":)-.18 F 2.5
+(re\255read\255init\255\214le'. Options,)144 690 R(if supplied, ha)2.5 E
+.3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F2<ad6d>144 702
+Q F3 -.1(ke)2.5 G(ymap)-.2 E F0(Use)180 714 Q F3 -.1(ke)5.158 G(ymap)-.2
+E F0 2.658(as the k)5.348 F -.15(ey)-.1 G 2.658(map to be af).15 F 2.659
+(fected by the subsequent bindings.)-.25 F(Acceptable)7.659 E F3 -.1(ke)
+180 726 S(ymap)-.2 E F0 3.193(names are)5.883 F F3 3.193
+(emacs, emacs\255standar)5.693 F 3.192
+(d, emacs\255meta, emacs\255ctlx, vi, vi\255mo)-.37 F(ve)-.1 E(,)-.1 E
+F0(GNU Bash-4.0)72 768 Q(2004 Apr 20)148.735 E(1)203.725 E 0 Cg EP
+%%Page: 2 2
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
+/Times-Italic@0 SF(vi\255command)180 84 Q F0 4.429(,a)C(nd)-4.429 E F1
+(vi\255insert)4.429 E F0(.).68 E F1(vi)6.929 E F0 1.929(is equi)4.429 F
+-.25(va)-.25 G 1.929(lent to).25 F F1(vi\255command)4.429 E F0(;)A F1
+(emacs)4.429 E F0 1.929(is equi)4.429 F -.25(va)-.25 G 1.93(lent to).25
+F F1(emacs\255standar)180 96 Q(d)-.37 E F0(.)A/F2 10/Times-Bold@0 SF
+<ad6c>144 108 Q F0(List the names of all)27.52 E F2 -.18(re)2.5 G
+(adline).18 E F0(functions.)2.5 E F2<ad70>144 120 Q F0(Display)24.74 E
+F2 -.18(re)2.5 G(adline).18 E F0
+(function names and bindings in such a w)2.5 E(ay that the)-.1 E 2.5(yc)
+-.15 G(an be re-read.)-2.5 E F2<ad50>144 132 Q F0(List current)24.19 E
+F2 -.18(re)2.5 G(adline).18 E F0(function names and bindings.)2.5 E F2
+<ad73>144 144 Q F0(Display)26.41 E F2 -.18(re)3.655 G(adline).18 E F0
+-.1(ke)3.655 G 3.655(ys)-.05 G 1.155
+(equences bound to macros and the strings the)-3.655 F 3.655(yo)-.15 G
+1.155(utput in such a)-3.655 F -.1(wa)180 156 S 2.5(yt).1 G(hat the)-2.5
+E 2.5(yc)-.15 G(an be re-read.)-2.5 E F2<ad53>144 168 Q F0(Display)24.74
+E F2 -.18(re)2.5 G(adline).18 E F0 -.1(ke)2.5 G 2.5(ys)-.05 G
+(equences bound to macros and the strings the)-2.5 E 2.5(yo)-.15 G
+(utput.)-2.5 E F2<ad76>144 180 Q F0(Display)25.3 E F2 -.18(re)2.5 G
+(adline).18 E F0 -.25(va)2.5 G(riable names and v).25 E
+(alues in such a w)-.25 E(ay that the)-.1 E 2.5(yc)-.15 G
+(an be re-read.)-2.5 E F2<ad56>144 192 Q F0(List current)23.08 E F2 -.18
+(re)2.5 G(adline).18 E F0 -.25(va)2.5 G(riable names and v).25 E(alues.)
+-.25 E F2<ad66>144 204 Q F1(\214lename)2.5 E F0(Read k)180 216 Q .3 -.15
+(ey b)-.1 H(indings from).15 E F1(\214lename)2.5 E F0(.)A F2<ad71>144
+228 Q F1(function)2.5 E F0(Query about which k)180 240 Q -.15(ey)-.1 G
+2.5(si).15 G -1.9 -.4(nv o)-2.5 H .2 -.1(ke t).4 H(he named).1 E F1
+(function)2.5 E F0(.)A F2<ad75>144 252 Q F1(function)2.5 E F0
+(Unbind all k)180 264 Q -.15(ey)-.1 G 2.5(sb).15 G(ound to the named)
+-2.5 E F1(function)2.5 E F0(.)A F2<ad72>144 276 Q F1 -.1(ke)2.5 G(yseq)
+-.2 E F0(Remo)180 288 Q .3 -.15(ve a)-.15 H .3 -.15(ny c).15 H
+(urrent binding for).15 E F1 -.1(ke)2.5 G(yseq)-.2 E F0(.)A F2<ad78>144
+300 Q F1 -.1(ke)2.5 G(yseq)-.2 E F2(:)A F1(shell\255command)A F0(Cause)
+180 312 Q F1(shell\255command)4.325 E F0 1.825(to be e)4.325 F -.15(xe)
+-.15 G 1.825(cuted whene).15 F -.15(ve)-.25 G(r).15 E F1 -.1(ke)4.325 G
+(yseq)-.2 E F0 1.825(is entered.)4.325 F(When)6.825 E F1(shell\255com-)
+4.325 E(mand)180 324 Q F0 1.765(is e)4.265 F -.15(xe)-.15 G 1.765
+(cuted, the shell sets the).15 F/F3 9/Times-Bold@0 SF(READLINE_LINE)
+4.265 E F0 -.25(va)4.015 G 1.765(riable to the contents of the).25 F F2
+-.18(re)180 336 S(adline).18 E F0 1.353(line b)3.852 F(uf)-.2 E 1.353
+(fer and the)-.25 F F3(READLINE_POINT)3.853 E F0 -.25(va)3.603 G 1.353
+(riable to the current location of the).25 F 2.012(insertion point.)180
+348 R 2.011(If the e)7.012 F -.15(xe)-.15 G 2.011
+(cuted command changes the v).15 F 2.011(alue of)-.25 F F3
+(READLINE_LINE)4.511 E F0(or)4.261 E F3(READLINE_POINT)180 360 Q/F4 9
+/Times-Roman@0 SF(,)A F0(those ne)2.25 E 2.5(wv)-.25 G
+(alues will be re\215ected in the editing state.)-2.75 E(The return v)
+144 376.8 Q(alue is 0 unless an unrecognized option is gi)-.25 E -.15
+(ve)-.25 G 2.5(no).15 G 2.5(ra)-2.5 G 2.5(ne)-2.5 G(rror occurred.)-2.5
+E F2(br)108 393.6 Q(eak)-.18 E F0([)2.5 E F1(n)A F0(])A .054
+(Exit from within a)144 405.6 R F2 -.25(fo)2.554 G(r).25 E F0(,)A F2
+(while)2.554 E F0(,)A F2(until)2.555 E F0 2.555(,o)C(r)-2.555 E F2
+(select)2.555 E F0 2.555(loop. If)2.555 F F1(n)2.555 E F0 .055
+(is speci\214ed, break)2.555 F F1(n)2.555 E F0(le)2.555 E -.15(ve)-.25 G
+(ls.).15 E F1(n)5.415 E F0 .055(must be)2.795 F/F5 10/Symbol SF<b3>2.555
+E F0(1.)2.555 E(If)144 417.6 Q F1(n)3.075 E F0 .215(is greater than the\
+ number of enclosing loops, all enclosing loops are e)2.955 F 2.714
+(xited. The)-.15 F .214(return v)2.714 F(alue)-.25 E(is 0 unless)144
+429.6 Q F1(n)2.5 E F0(is not greater than or equal to 1.)2.5 E F2 -.2
+(bu)108 446.4 S(iltin).2 E F1(shell\255b)2.5 E(uiltin)-.2 E F0([)2.5 E
+F1(ar)A(guments)-.37 E F0(])A(Ex)144 458.4 Q .792
+(ecute the speci\214ed shell b)-.15 F .792(uiltin, passing it)-.2 F F1
+(ar)3.293 E(guments)-.37 E F0 3.293(,a).27 G .793(nd return its e)-3.293
+F .793(xit status.)-.15 F .793(This is useful)5.793 F .616
+(when de\214ning a function whose name is the same as a shell b)144
+470.4 R .615(uiltin, retaining the functionality of)-.2 F .57(the b)144
+482.4 R .57(uiltin within the function.)-.2 F(The)5.57 E F2(cd)3.07 E F0
+-.2(bu)3.07 G .57(iltin is commonly rede\214ned this w).2 F(ay)-.1 E
+5.57(.T)-.65 G .57(he return status)-5.57 F(is f)144 494.4 Q(alse if)-.1
+E F1(shell\255b)2.84 E(uiltin)-.2 E F0(is not a shell b)2.74 E
+(uiltin command.)-.2 E F2(caller)108 511.2 Q F0([)2.5 E F1 -.2(ex)C(pr)
+.2 E F0(])A .254(Returns the conte)144 523.2 R .254(xt of an)-.15 F
+2.754(ya)-.15 G(cti)-2.754 E .554 -.15(ve s)-.25 H .254
+(ubroutine call \(a shell function or a script e).15 F -.15(xe)-.15 G
+.254(cuted with the).15 F F2(.)2.753 E F0(or)2.753 E F2(sour)144 535.2 Q
+(ce)-.18 E F0 -.2(bu)3.062 G 3.062(iltins. W).2 F(ithout)-.4 E F1 -.2
+(ex)3.062 G(pr).2 E F0(,)A F2(caller)3.062 E F0 .562
+(displays the line number and source \214lename of the current)3.062 F
+.254(subroutine call.)144 547.2 R .254(If a non-ne)5.254 F -.05(ga)-.15
+G(ti).05 E .554 -.15(ve i)-.25 H(nte).15 E .253(ger is supplied as)-.15
+F F1 -.2(ex)2.753 G(pr).2 E F0(,)A F2(caller)2.753 E F0 .253
+(displays the line number)2.753 F 2.753(,s)-.4 G(ub-)-2.753 E 1.327(rou\
+tine name, and source \214le corresponding to that position in the curr\
+ent e)144 559.2 R -.15(xe)-.15 G 1.328(cution call stack.).15 F .001
+(This e)144 571.2 R .001(xtra information may be used, for e)-.15 F .001
+(xample, to print a stack trace.)-.15 F(The current frame is frame)5 E
+3.019(0. The)144 583.2 R .519(return v)3.019 F .519
+(alue is 0 unless the shell is not e)-.25 F -.15(xe)-.15 G .52
+(cuting a subroutine call or).15 F F1 -.2(ex)3.02 G(pr).2 E F0 .52
+(does not corre-)3.02 F(spond to a v)144 595.2 Q
+(alid position in the call stack.)-.25 E F2(cd)108 612 Q F0([)2.5 E F2
+(\255L|-P)A F0 2.5(][)C F1(dir)-2.5 E F0(])A .21
+(Change the current directory to)144 624 R F1(dir)2.71 E F0 5.21(.T)C
+.21(he v)-5.21 F(ariable)-.25 E F3(HOME)2.71 E F0 .21(is the def)2.46 F
+(ault)-.1 E F1(dir)2.71 E F0 5.21(.T).73 G .21(he v)-5.21 F(ariable)-.25
+E F3(CDP)2.71 E -.855(AT)-.666 G(H).855 E F0 .776
+(de\214nes the search path for the directory containing)144 636 R F1
+(dir)3.276 E F0 5.777(.A).73 G(lternati)-5.777 E 1.077 -.15(ve d)-.25 H
+.777(irectory names in).15 F F3(CDP)3.277 E -.855(AT)-.666 G(H).855 E F0
+.764(are separated by a colon \(:\).)144 648 R 3.264(An)5.764 G .764
+(ull directory name in)-3.264 F F3(CDP)3.264 E -.855(AT)-.666 G(H).855 E
+F0 .764(is the same as the current direc-)3.014 F(tory)144 660 Q 2.973
+(,i)-.65 G .473(.e., `)-2.973 F(`)-.74 E F2(.)A F0 -.74('')C 5.473(.I)
+.74 G(f)-5.473 E F1(dir)3.323 E F0(be)3.703 E .474
+(gins with a slash \(/\), then)-.15 F F3(CDP)2.974 E -.855(AT)-.666 G(H)
+.855 E F0 .474(is not used. The)2.724 F F2<ad50>2.974 E F0 .474
+(option says to use)2.974 F .58(the ph)144 672 R .58
+(ysical directory structure instead of follo)-.05 F .579
+(wing symbolic links \(see also the)-.25 F F2<ad50>3.079 E F0 .579
+(option to the)3.079 F F2(set)144 684 Q F0 -.2(bu)3.383 G .883
+(iltin command\); the).2 F F2<ad4c>3.383 E F0 .884
+(option forces symbolic links to be follo)3.384 F 3.384(wed. An)-.25 F
+(ar)3.384 E .884(gument of)-.18 F F2<ad>3.384 E F0(is)3.384 E(equi)144
+696 Q -.25(va)-.25 G .316(lent to).25 F F3($OLDPWD)2.816 E F4(.)A F0
+.316(If a non-empty directory name from)4.816 F F3(CDP)2.815 E -.855(AT)
+-.666 G(H).855 E F0 .315(is used, or if)2.565 F F2<ad>2.815 E F0 .315
+(is the \214rst)2.815 F(ar)144 708 Q .116(gument, and the directory cha\
+nge is successful, the absolute pathname of the ne)-.18 F 2.616(ww)-.25
+G .116(orking direc-)-2.716 F 1.165
+(tory is written to the standard output.)144 720 R 1.164(The return v)
+6.164 F 1.164(alue is true if the directory w)-.25 F 1.164
+(as successfully)-.1 F(GNU Bash-4.0)72 768 Q(2004 Apr 20)148.735 E(2)
+203.725 E 0 Cg EP
+%%Page: 3 3
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E(changed; f)
+144 84 Q(alse otherwise.)-.1 E/F1 10/Times-Bold@0 SF(command)108 100.8 Q
+F0([)2.5 E F1(\255pVv)A F0(])A/F2 10/Times-Italic@0 SF(command)2.5 E F0
+([)2.5 E F2(ar)A(g)-.37 E F0(...])2.5 E(Run)144 112.8 Q F2(command)2.956
+E F0(with)3.527 E F2(ar)3.087 E(gs)-.37 E F0 .257
+(suppressing the normal shell function lookup. Only b)3.027 F .257
+(uiltin commands or)-.2 F .502(commands found in the)144 124.8 R/F3 9
+/Times-Bold@0 SF -.666(PA)3.002 G(TH)-.189 E F0 .502(are e)2.752 F -.15
+(xe)-.15 G 3.002(cuted. If).15 F(the)3.002 E F1<ad70>3.002 E F0 .502
+(option is gi)3.002 F -.15(ve)-.25 G .501(n, the search for).15 F F2
+(command)3.201 E F0(is)3.771 E .399(performed using a def)144 136.8 R
+.399(ault v)-.1 F .399(alue for)-.25 F F3 -.666(PA)2.899 G(TH)-.189 E F0
+.4(that is guaranteed to \214nd all of the standard utilities.)2.649 F
+(If)5.4 E .175(either the)144 148.8 R F1<ad56>2.675 E F0(or)2.675 E F1
+<ad76>2.675 E F0 .175(option is supplied, a description of)2.675 F F2
+(command)2.875 E F0 .174(is printed.)3.445 F(The)5.174 E F1<ad76>2.674 E
+F0 .174(option causes)2.674 F 3.11(as)144 160.8 S .61(ingle w)-3.11 F
+.61(ord indicating the command or \214le name used to in)-.1 F -.2(vo)
+-.4 G -.1(ke).2 G F2(command)3.41 E F0 .61(to be displayed; the)3.88 F
+F1<ad56>144 172.8 Q F0 .25(option produces a more v)2.75 F .25
+(erbose description.)-.15 F .249(If the)5.25 F F1<ad56>2.749 E F0(or)
+2.749 E F1<ad76>2.749 E F0 .249(option is supplied, the e)2.749 F .249
+(xit status)-.15 F 1.004(is 0 if)144 184.8 R F2(command)3.704 E F0 -.1
+(wa)4.274 G 3.504(sf).1 G 1.005(ound, and 1 if not.)-3.504 F 1.005
+(If neither option is supplied and an error occurred or)6.005 F F2
+(command)144.2 196.8 Q F0 1.599(cannot be found, the e)4.869 F 1.599
+(xit status is 127.)-.15 F 1.599(Otherwise, the e)6.599 F 1.598
+(xit status of the)-.15 F F1(command)4.098 E F0 -.2(bu)144 208.8 S
+(iltin is the e).2 E(xit status of)-.15 E F2(command)2.5 E F0(.).77 E F1
+(compgen)108 225.6 Q F0([)2.5 E F2(option)A F0 2.5(][)C F2(wor)-2.5 E(d)
+-.37 E F0(])A .012(Generate possible completion matches for)144 237.6 R
+F2(wor)2.513 E(d)-.37 E F0 .013(according to the)2.513 F F2(option)2.513
+E F0 .013(s, which may be an)B 2.513(yo)-.15 G(ption)-2.513 E .982
+(accepted by the)144 249.6 R F1(complete)3.482 E F0 -.2(bu)3.481 G .981
+(iltin with the e).2 F .981(xception of)-.15 F F1<ad70>3.481 E F0(and)
+3.481 E F1<ad72>3.481 E F0 3.481(,a)C .981(nd write the matches to the)
+-3.481 F 1.415(standard output.)144 261.6 R 1.415(When using the)6.415 F
+F1<ad46>3.915 E F0(or)3.915 E F1<ad43>3.915 E F0 1.415(options, the v)
+3.915 F 1.415(arious shell v)-.25 F 1.415(ariables set by the pro-)-.25
+F(grammable completion f)144 273.6 Q(acilities, while a)-.1 E -.25(va)
+-.2 G(ilable, will not ha).25 E .3 -.15(ve u)-.2 H(seful v).15 E(alues.)
+-.25 E .352(The matches will be generated in the same w)144 297.6 R .352
+(ay as if the programmable completion code had gen-)-.1 F .02(erated th\
+em directly from a completion speci\214cation with the same \215ags.)144
+309.6 R(If)5.02 E F2(wor)2.52 E(d)-.37 E F0 .02(is speci\214ed, only)
+2.52 F(those completions matching)144 321.6 Q F2(wor)2.5 E(d)-.37 E F0
+(will be displayed.)2.5 E(The return v)144 345.6 Q
+(alue is true unless an in)-.25 E -.25(va)-.4 G
+(lid option is supplied, or no matches were generated.).25 E F1
+(complete)108 362.4 Q F0([)3.729 E F1(\255abcdefgjksuv)A F0 3.729(][)C
+F1<ad6f>-3.729 E F2(comp-option)3.729 E F0 3.729(][)C F1(\255DE)-3.729 E
+F0 3.728(][)C F1<ad41>-3.728 E F2(action)3.728 E F0 3.728(][)C F1<ad47>
+-3.728 E F2(globpat)3.728 E F0 3.728(][)C F1<ad57>-3.728 E F2(wor)3.728
+E(dlist)-.37 E F0 3.728(][)C F1<ad46>-3.728 E F2(func-)3.728 E(tion)108
+374.4 Q F0 2.5(][)C F1<ad43>-2.5 E F2(command)2.5 E F0(])A([)144 386.4 Q
+F1<ad58>A F2(\214lterpat)2.5 E F0 2.5(][)C F1<ad50>-2.5 E F2(pr)2.5 E
+(e\214x)-.37 E F0 2.5(][)C F1<ad53>-2.5 E F2(suf)2.5 E<8c78>-.18 E F0(])
+A F2(name)2.5 E F0([)2.5 E F2(name ...)A F0(])A F1(complete \255pr)108
+398.4 Q F0([)2.5 E F1(\255DE)A F0 2.5(][)C F2(name)-2.5 E F0(...])2.5 E
+.634(Specify ho)144 410.4 R 3.134(wa)-.25 G -.18(rg)-3.134 G .634
+(uments to each).18 F F2(name)3.134 E F0 .634(should be completed.)3.134
+F .633(If the)5.634 F F1<ad70>3.133 E F0 .633
+(option is supplied, or if no)3.133 F .139(options are supplied, e)144
+422.4 R .139(xisting completion speci\214cations are printed in a w)-.15
+F .14(ay that allo)-.1 F .14(ws them to be)-.25 F .31(reused as input.)
+144 434.4 R(The)5.31 E F1<ad72>2.81 E F0 .31(option remo)2.81 F -.15(ve)
+-.15 G 2.81(sac).15 G .31(ompletion speci\214cation for each)-2.81 F F2
+(name)2.81 E F0 2.81(,o)C 1.11 -.4(r, i)-2.81 H 2.81(fn).4 G(o)-2.81 E
+F2(name)2.81 E F0(s)A 1.346
+(are supplied, all completion speci\214cations.)144 446.4 R(The)6.347 E
+F1<ad44>3.847 E F0 1.347(option indicates that the remaining options)
+3.847 F .5(and actions should apply to the `)144 458.4 R(`def)-.74 E
+(ault')-.1 E 3('c)-.74 G .5
+(ommand completion; that is, completion attempted on)-3 F 3.455(ac)144
+470.4 S .955(ommand for which no completion has pre)-3.455 F .955
+(viously been de\214ned.)-.25 F(The)5.955 E F1<ad45>3.455 E F0 .955
+(option indicates that)3.455 F .065
+(the remaining options and actions should apply to `)144 482.4 R
+(`empty')-.74 E 2.564('c)-.74 G .064
+(ommand completion; that is, comple-)-2.564 F
+(tion attempted on a blank line.)144 494.4 Q 1.437
+(The process of applying these completion speci\214cations when w)144
+518.4 R 1.438(ord completion is attempted is)-.1 F(described abo)144
+530.4 Q .3 -.15(ve u)-.15 H(nder).15 E F1(Pr)2.5 E
+(ogrammable Completion)-.18 E F0(.)A .556
+(Other options, if speci\214ed, ha)144 554.4 R .856 -.15(ve t)-.2 H .555
+(he follo).15 F .555(wing meanings.)-.25 F .555(The ar)5.555 F .555
+(guments to the)-.18 F F1<ad47>3.055 E F0(,)A F1<ad57>3.055 E F0 3.055
+(,a)C(nd)-3.055 E F1<ad58>3.055 E F0 .722(options \(and, if necessary)
+144 566.4 R 3.222(,t)-.65 G(he)-3.222 E F1<ad50>3.222 E F0(and)3.222 E
+F1<ad53>3.222 E F0 .723
+(options\) should be quoted to protect them from e)3.222 F(xpan-)-.15 E
+(sion before the)144 578.4 Q F1(complete)2.5 E F0 -.2(bu)2.5 G
+(iltin is in).2 E -.2(vo)-.4 G -.1(ke).2 G(d.).1 E F1<ad6f>144 590.4 Q
+F2(comp-option)2.5 E F0(The)184 602.4 Q F2(comp-option)2.791 E F0 .291
+(controls se)2.791 F -.15(ve)-.25 G .291(ral aspects of the compspec')
+.15 F 2.791(sb)-.55 G(eha)-2.791 E .291(vior be)-.2 F .291
+(yond the simple)-.15 F(generation of completions.)184 614.4 Q F2
+(comp-option)5 E F0(may be one of:)2.5 E F1(bashdefault)184 626.4 Q F0
+.281(Perform the rest of the def)224 638.4 R(ault)-.1 E F1(bash)2.781 E
+F0 .281(completions if the compspec generates no)2.781 F(matches.)224
+650.4 Q F1(default)184 662.4 Q F0 2.876(Use readline')10 F 5.376(sd)-.55
+G(ef)-5.376 E 2.875
+(ault \214lename completion if the compspec generates no)-.1 F(matches.)
+224 674.4 Q F1(dir)184 686.4 Q(names)-.15 E F0(Perform directory name c\
+ompletion if the compspec generates no matches.)224 698.4 Q
+(GNU Bash-4.0)72 768 Q(2004 Apr 20)148.735 E(3)203.725 E 0 Cg EP
+%%Page: 4 4
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
+/Times-Bold@0 SF(\214lenames)184 84 Q F0 -.7(Te)224 96 S .137(ll readli\
+ne that the compspec generates \214lenames, so it can perform an).7 F
+2.637<798c>-.15 G(le-)-2.637 E .134(name\255speci\214c processing \(lik)
+224 108 R 2.634(ea)-.1 G .134
+(dding a slash to directory names, quoting spe-)-2.634 F .45
+(cial characters, or suppressing trailing spaces\).)224 120 R .45
+(Intended to be used with shell)5.45 F(functions.)224 132 Q F1(nospace)
+184 144 Q F0 -.7(Te)6.11 G .22
+(ll readline not to append a space \(the def).7 F .22(ault\) to w)-.1 F
+.22(ords completed at the end)-.1 F(of the line.)224 156 Q F1(plusdirs)
+184 168 Q F0 1.985(After an)5.54 F 4.485(ym)-.15 G 1.985
+(atches de\214ned by the compspec are generated, directory name)-4.485 F
+.584(completion is attempted and an)224 180 R 3.084(ym)-.15 G .584
+(atches are added to the results of the other)-3.084 F(actions.)224 192
+Q F1<ad41>144 204 Q/F2 10/Times-Italic@0 SF(action)2.5 E F0(The)184 216
+Q F2(action)2.5 E F0(may be one of the follo)2.5 E
+(wing to generate a list of possible completions:)-.25 E F1(alias)184
+228 Q F0(Alias names.)20.55 E(May also be speci\214ed as)5 E F1<ad61>2.5
+E F0(.)A F1(arrayv)184 240 Q(ar)-.1 E F0(Array v)224 252 Q
+(ariable names.)-.25 E F1 4.7(binding Readline)184 264 R F0 -.1(ke)2.5 G
+2.5(yb)-.05 G(inding names.)-2.5 E F1 -.2(bu)184 276 S(iltin).2 E F0
+(Names of shell b)11.85 E(uiltin commands.)-.2 E
+(May also be speci\214ed as)5 E F1<ad62>2.5 E F0(.)A F1(command)184 288
+Q F0(Command names.)224 300 Q(May also be speci\214ed as)5 E F1<ad63>2.5
+E F0(.)A F1(dir)184 312 Q(ectory)-.18 E F0(Directory names.)224 324 Q
+(May also be speci\214ed as)5 E F1<ad64>2.5 E F0(.)A F1(disabled)184 336
+Q F0(Names of disabled shell b)224 348 Q(uiltins.)-.2 E F1(enabled)184
+360 Q F0(Names of enabled shell b)6.66 E(uiltins.)-.2 E F1(export)184
+372 Q F0(Names of e)12.23 E(xported shell v)-.15 E 2.5(ariables. May)
+-.25 F(also be speci\214ed as)2.5 E F1<ad65>2.5 E F0(.)A F1(\214le)184
+384 Q F0(File names.)27.22 E(May also be speci\214ed as)5 E F1<ad66>2.5
+E F0(.)A F1(function)184 396 Q F0(Names of shell functions.)224 408 Q F1
+(gr)184 420 Q(oup)-.18 E F0(Group names.)14.62 E
+(May also be speci\214ed as)5 E F1<ad67>2.5 E F0(.)A F1(helptopic)184
+432 Q F0(Help topics as accepted by the)224 444 Q F1(help)2.5 E F0 -.2
+(bu)2.5 G(iltin.).2 E F1(hostname)184 456 Q F0(Hostnames, as tak)224 468
+Q(en from the \214le speci\214ed by the)-.1 E/F3 9/Times-Bold@0 SF
+(HOSTFILE)2.5 E F0(shell v)2.25 E(ariable.)-.25 E F1(job)184 480 Q F0
+(Job names, if job control is acti)26.11 E -.15(ve)-.25 G 5(.M).15 G
+(ay also be speci\214ed as)-5 E F1<ad6a>2.5 E F0(.)A F1 -.1(ke)184 492 S
+(yw).1 E(ord)-.1 E F0(Shell reserv)224 504 Q(ed w)-.15 E 2.5(ords. May)
+-.1 F(also be speci\214ed as)2.5 E F1<ad6b>2.5 E F0(.)A F1(running)184
+516 Q F0(Names of running jobs, if job control is acti)5.54 E -.15(ve)
+-.25 G(.).15 E F1(ser)184 528 Q(vice)-.1 E F0(Service names.)10.67 E
+(May also be speci\214ed as)5 E F1<ad73>2.5 E F0(.)A F1(setopt)184 540 Q
+F0 -1.11(Va)14.45 G(lid ar)1.11 E(guments for the)-.18 E F1<ad6f>2.5 E
+F0(option to the)2.5 E F1(set)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F1
+(shopt)184 552 Q F0(Shell option names as accepted by the)16.66 E F1
+(shopt)2.5 E F0 -.2(bu)2.5 G(iltin.).2 E F1(signal)184 564 Q F0
+(Signal names.)14.99 E F1(stopped)184 576 Q F0
+(Names of stopped jobs, if job control is acti)6.66 E -.15(ve)-.25 G(.)
+.15 E F1(user)184 588 Q F0(User names.)21.67 E
+(May also be speci\214ed as)5 E F1<ad75>2.5 E F0(.)A F1 -.1(va)184 600 S
+(riable).1 E F0(Names of all shell v)5.1 E 2.5(ariables. May)-.25 F
+(also be speci\214ed as)2.5 E F1<ad76>2.5 E F0(.)A F1<ad47>144 612 Q F2
+(globpat)2.5 E F0 1.007(The pathname e)184 624 R 1.007(xpansion pattern)
+-.15 F F2(globpat)3.507 E F0 1.007(is e)3.507 F 1.008
+(xpanded to generate the possible comple-)-.15 F(tions.)184 636 Q F1
+<ad57>144 648 Q F2(wor)2.5 E(dlist)-.37 E F0(The)184 660 Q F2(wor)3.64 E
+(dlist)-.37 E F0 1.14(is split using the characters in the)3.64 F F3
+(IFS)3.64 E F0 1.139(special v)3.39 F 1.139(ariable as delimiters, and)
+-.25 F 2.007(each resultant w)184 672 R 2.007(ord is e)-.1 F 4.507
+(xpanded. The)-.15 F 2.008(possible completions are the members of the)
+4.507 F(resultant list which match the w)184 684 Q(ord being completed.)
+-.1 E F1<ad43>144 696 Q F2(command)2.5 E(command)184 708 Q F0 1.056
+(is e)3.556 F -.15(xe)-.15 G 1.056(cuted in a subshell en).15 F 1.056
+(vironment, and its output is used as the possible)-.4 F(completions.)
+184 720 Q(GNU Bash-4.0)72 768 Q(2004 Apr 20)148.735 E(4)203.725 E 0 Cg
+EP
+%%Page: 5 5
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
+/Times-Bold@0 SF<ad46>144 84 Q/F2 10/Times-Italic@0 SF(function)2.5 E F0
+1.18(The shell function)184 96 R F2(function)3.68 E F0 1.181(is e)3.681
+F -.15(xe)-.15 G 1.181(cuted in the current shell en).15 F 3.681
+(vironment. When)-.4 F 1.181(it \214n-)3.681 F .932
+(ishes, the possible completions are retrie)184 108 R -.15(ve)-.25 G
+3.432(df).15 G .932(rom the v)-3.432 F .932(alue of the)-.25 F/F3 9
+/Times-Bold@0 SF(COMPREPL)3.431 E(Y)-.828 E F0(array)3.181 E -.25(va)184
+120 S(riable.).25 E F1<ad58>144 132 Q F2(\214lterpat)2.5 E(\214lterpat)
+184 144 Q F0 .455(is a pattern as used for pathname e)2.955 F 2.956
+(xpansion. It)-.15 F .456(is applied to the list of possible)2.956 F
+1.596(completions generated by the preceding options and ar)184 156 R
+1.596(guments, and each completion)-.18 F(matching)184 168 Q F2
+(\214lterpat)3.204 E F0 .704(is remo)3.204 F -.15(ve)-.15 G 3.204(df).15
+G .704(rom the list.)-3.204 F 3.204(Al)5.704 G(eading)-3.204 E F1(!)
+3.204 E F0(in)3.204 E F2(\214lterpat)3.205 E F0(ne)3.205 E -.05(ga)-.15
+G .705(tes the pattern;).05 F(in this case, an)184 180 Q 2.5(yc)-.15 G
+(ompletion not matching)-2.5 E F2(\214lterpat)2.5 E F0(is remo)2.5 E
+-.15(ve)-.15 G(d.).15 E F1<ad50>144 192 Q F2(pr)2.5 E(e\214x)-.37 E(pr)
+184 204 Q(e\214x)-.37 E F0 .535(is added at the be)3.035 F .534
+(ginning of each possible completion after all other options ha)-.15 F
+-.15(ve)-.2 G(been applied.)184 216 Q F1<ad53>144 228 Q F2(suf)2.5 E
+2.81(\214x suf)-.18 F<8c78>-.18 E F0
+(is appended to each possible completion after all other options ha)2.5
+E .3 -.15(ve b)-.2 H(een applied.).15 E .466(The return v)144 244.8 R
+.466(alue is true unless an in)-.25 F -.25(va)-.4 G .466
+(lid option is supplied, an option other than).25 F F1<ad70>2.967 E F0
+(or)2.967 E F1<ad72>2.967 E F0 .467(is sup-)2.967 F 1.362
+(plied without a)144 256.8 R F2(name)3.862 E F0(ar)3.862 E 1.361
+(gument, an attempt is made to remo)-.18 F 1.661 -.15(ve a c)-.15 H
+1.361(ompletion speci\214cation for a).15 F F2(name)144 268.8 Q F0
+(for which no speci\214cation e)2.5 E
+(xists, or an error occurs adding a completion speci\214cation.)-.15 E
+F1(compopt)108 285.6 Q F0([)2.5 E F1<ad6f>A F2(option)2.5 E F0 2.5(][)C
+F1(\255DE)-2.5 E F0 2.5(][)C F1(+o)-2.5 E F2(option)2.5 E F0 2.5(][)C F2
+(name)-2.5 E F0(])A .447(Modify completion options for each)144 297.6 R
+F2(name)2.947 E F0 .447(according to the)2.947 F F2(option)2.947 E F0
+.447(s, or for the currently-e)B -.15(xe)-.15 G(cution).15 E .726
+(completion if no)144 309.6 R F2(name)3.226 E F0 3.226(sa)C .726
+(re supplied.)-3.226 F .725(If no)5.725 F F2(option)3.225 E F0 3.225(sa)
+C .725(re gi)-3.225 F -.15(ve)-.25 G .725
+(n, display the completion options for).15 F(each)144 321.6 Q F2(name)
+3.223 E F0 .723(or the current completion.)3.223 F .724(The possible v)
+5.724 F .724(alues of)-.25 F F2(option)3.224 E F0 .724(are those v)3.224
+F .724(alid for the)-.25 F F1(com-)3.224 E(plete)144 333.6 Q F0 -.2(bu)
+2.798 G .298(iltin described abo).2 F -.15(ve)-.15 G 5.297(.T).15 G(he)
+-5.297 E F1<ad44>2.797 E F0 .297
+(option indicates that the remaining options should apply to)2.797 F
+1.227(the `)144 345.6 R(`def)-.74 E(ault')-.1 E 3.727('c)-.74 G 1.228(o\
+mmand completion; that is, completion attempted on a command for which \
+no)-3.727 F 2.178(completion has pre)144 357.6 R 2.178
+(viously been de\214ned.)-.25 F(The)7.178 E F1<ad45>4.678 E F0 2.177
+(option indicates that the remaining options)4.677 F(should apply to `)
+144 369.6 Q(`empty')-.74 E 2.5('c)-.74 G
+(ommand completion; that is, completion attempted on a blank line.)-2.5
+E .327(The return v)108 386.4 R .327(alue is true unless an in)-.25 F
+-.25(va)-.4 G .327
+(lid option is supplied, an attempt is made to modify the options for a)
+.25 F F2(name)108 398.4 Q F0(for which no completion speci\214cation e)
+2.5 E(xists, or an output error occurs.)-.15 E F1(continue)108 415.2 Q
+F0([)2.5 E F2(n)A F0(])A 1.754(Resume the ne)144 427.2 R 1.754
+(xt iteration of the enclosing)-.15 F F1 -.25(fo)4.254 G(r).25 E F0(,)A
+F1(while)4.254 E F0(,)A F1(until)4.254 E F0 4.254(,o)C(r)-4.254 E F1
+(select)4.254 E F0 4.253(loop. If)4.254 F F2(n)4.613 E F0 1.753
+(is speci\214ed,)4.493 F 1.208(resume at the)144 439.2 R F2(n)3.709 E F0
+1.209(th enclosing loop.)B F2(n)6.569 E F0 1.209(must be)3.949 F/F4 10
+/Symbol SF<b3>3.709 E F0 3.709(1. If)3.709 F F2(n)4.069 E F0 1.209
+(is greater than the number of enclosing)3.949 F .514
+(loops, the last enclosing loop \(the `)144 451.2 R(`top-le)-.74 E -.15
+(ve)-.25 G(l').15 E 3.014('l)-.74 G .514(oop\) is resumed.)-3.014 F .513
+(The return v)5.513 F .513(alue is 0 unless)-.25 F F2(n)3.013 E F0(is)
+3.013 E(not greater than or equal to 1.)144 463.2 Q F1(declar)108 480 Q
+(e)-.18 E F0([)2.5 E F1(\255aAfFilrtux)A F0 2.5(][)C F1<ad70>-2.5 E F0
+2.5(][)C F2(name)-2.5 E F0([=)A F2(value)A F0 2.5(].)C(..])-2.5 E F1
+(typeset)108 492 Q F0([)2.5 E F1(\255aAfFilrtux)A F0 2.5(][)C F1<ad70>
+-2.5 E F0 2.5(][)C F2(name)-2.5 E F0([=)A F2(value)A F0 2.5(].)C(..])
+-2.5 E 1.264(Declare v)144 504 R 1.264(ariables and/or gi)-.25 F 1.564
+-.15(ve t)-.25 H 1.264(hem attrib).15 F 3.765(utes. If)-.2 F(no)3.765 E
+F2(name)3.765 E F0 3.765(sa)C 1.265(re gi)-3.765 F -.15(ve)-.25 G 3.765
+(nt).15 G 1.265(hen display the v)-3.765 F 1.265(alues of)-.25 F -.25
+(va)144 516 S 3.483(riables. The).25 F F1<ad70>3.483 E F0 .983
+(option will display the attrib)3.483 F .983(utes and v)-.2 F .982
+(alues of each)-.25 F F2(name)3.482 E F0 5.982(.W).18 G(hen)-5.982 E F1
+<ad70>3.482 E F0 .982(is used)3.482 F(with)144 528 Q F2(name)3.579 E F0
+(ar)3.579 E 1.079(guments, additional options are ignored.)-.18 F(When)
+6.079 E F1<ad70>3.579 E F0 1.079(is supplied without)3.579 F F2(name)
+3.58 E F0(ar)3.58 E(gu-)-.18 E .151(ments, it will display the attrib)
+144 540 R .151(utes and v)-.2 F .151(alues of all v)-.25 F .15
+(ariables ha)-.25 F .15(ving the attrib)-.2 F .15
+(utes speci\214ed by the)-.2 F .046(additional options.)144 552 R .046
+(If no other options are supplied with)5.046 F F1<ad70>2.547 E F0(,)A F1
+(declar)2.547 E(e)-.18 E F0 .047(will display the attrib)2.547 F .047
+(utes and)-.2 F -.25(va)144 564 S 1.363(lues of all shell v).25 F 3.863
+(ariables. The)-.25 F F1<ad66>3.863 E F0 1.362
+(option will restrict the display to shell functions.)3.863 F(The)6.362
+E F1<ad46>3.862 E F0 2.422(option inhibits the display of function de\
+\214nitions; only the function name and attrib)144 576 R 2.423(utes are)
+-.2 F 2.664(printed. If)144 588 R(the)2.664 E F1(extdeb)2.664 E(ug)-.2 E
+F0 .164(shell option is enabled using)2.664 F F1(shopt)2.664 E F0 2.664
+(,t)C .163(he source \214le name and line number)-2.664 F 1.382
+(where the function is de\214ned are displayed as well.)144 600 R(The)
+6.382 E F1<ad46>3.882 E F0 1.382(option implies)3.882 F F1<ad66>3.882 E
+F0 6.382(.T)C 1.382(he follo)-6.382 F(wing)-.25 E .794
+(options can be used to restrict output to v)144 612 R .794
+(ariables with the speci\214ed attrib)-.25 F .793(ute or to gi)-.2 F
+1.093 -.15(ve v)-.25 H(ariables)-.1 E(attrib)144 624 Q(utes:)-.2 E F1
+<ad61>144 636 Q F0(Each)25.3 E F2(name)2.5 E F0(is an inde)2.5 E -.15
+(xe)-.15 G 2.5(da).15 G(rray v)-2.5 E(ariable \(see)-.25 E F1(Arrays)2.5
+E F0(abo)2.5 E -.15(ve)-.15 G(\).).15 E F1<ad41>144 648 Q F0(Each)23.08
+E F2(name)2.5 E F0(is an associati)2.5 E .3 -.15(ve a)-.25 H(rray v).15
+E(ariable \(see)-.25 E F1(Arrays)2.5 E F0(abo)2.5 E -.15(ve)-.15 G(\).)
+.15 E F1<ad66>144 660 Q F0(Use function names only)26.97 E(.)-.65 E F1
+<ad69>144 672 Q F0 .557(The v)27.52 F .558
+(ariable is treated as an inte)-.25 F .558(ger; arithmetic e)-.15 F -.25
+(va)-.25 G .558(luation \(see).25 F F3 .558(ARITHMETIC EV)3.058 F(ALU)
+-1.215 E(A-)-.54 E(TION)180 684 Q F0(abo)2.25 E -.15(ve)-.15 G 2.5(\)i)
+.15 G 2.5(sp)-2.5 G(erformed when the v)-2.5 E(ariable is assigned a v)
+-.25 E(alue.)-.25 E F1<ad6c>144 696 Q F0 .91(When the v)27.52 F .909
+(ariable is assigned a v)-.25 F .909(alue, all upper)-.25 F .909
+(-case characters are con)-.2 F -.15(ve)-.4 G .909(rted to lo).15 F(wer)
+-.25 E(-)-.2 E 2.5(case. The)180 708 R(upper)2.5 E(-case attrib)-.2 E
+(ute is disabled.)-.2 E(GNU Bash-4.0)72 768 Q(2004 Apr 20)148.735 E(5)
+203.725 E 0 Cg EP
+%%Page: 6 6
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
+/Times-Bold@0 SF<ad72>144 84 Q F0(Mak)25.86 E(e)-.1 E/F2 10
+/Times-Italic@0 SF(name)5.046 E F0 5.046(sr)C(eadonly)-5.046 E 7.546(.T)
+-.65 G 2.546(hese names cannot then be assigned v)-7.546 F 2.547
+(alues by subsequent)-.25 F(assignment statements or unset.)180 96 Q F1
+<ad74>144 108 Q F0(Gi)26.97 E .73 -.15(ve e)-.25 H(ach).15 E F2(name)
+2.93 E F0(the)2.929 E F2(tr)2.929 E(ace)-.15 E F0(attrib)2.929 E 2.929
+(ute. T)-.2 F .429(raced functions inherit the)-.35 F F1(DEB)2.929 E(UG)
+-.1 E F0(and)2.929 E F1(RETURN)2.929 E F0(traps from the calling shell.)
+180 120 Q(The trace attrib)5 E(ute has no special meaning for v)-.2 E
+(ariables.)-.25 E F1<ad75>144 132 Q F0 .909(When the v)24.74 F .909
+(ariable is assigned a v)-.25 F .909(alue, all lo)-.25 F(wer)-.25 E .909
+(-case characters are con)-.2 F -.15(ve)-.4 G .91(rted to upper).15 F(-)
+-.2 E 2.5(case. The)180 144 R(lo)2.5 E(wer)-.25 E(-case attrib)-.2 E
+(ute is disabled.)-.2 E F1<ad78>144 156 Q F0(Mark)25.3 E F2(name)2.5 E
+F0 2.5(sf)C(or e)-2.5 E(xport to subsequent commands via the en)-.15 E
+(vironment.)-.4 E .121(Using `+' instead of `\255' turns of)144 172.8 R
+2.621(ft)-.25 G .121(he attrib)-2.621 F .121(ute instead, with the e)-.2
+F .12(xceptions that)-.15 F F1(+a)2.62 E F0 .12(may not be used)2.62 F
+.644(to destro)144 184.8 R 3.144(ya)-.1 G 3.144(na)-3.144 G .644(rray v)
+-3.144 F .644(ariable and)-.25 F F1(+r)3.145 E F0 .645(will not remo)
+3.145 F .945 -.15(ve t)-.15 H .645(he readonly attrib).15 F 3.145
+(ute. When)-.2 F .645(used in a func-)3.145 F 1.945(tion, mak)144 196.8
+R 1.945(es each)-.1 F F2(name)4.445 E F0 1.945(local, as with the)4.445
+F F1(local)4.444 E F0 4.444(command. If)4.444 F 4.444(av)4.444 G 1.944
+(ariable name is follo)-4.694 F 1.944(wed by)-.25 F(=)144 208.8 Q F2
+(value)A F0 3.238(,t)C .738(he v)-3.238 F .738(alue of the v)-.25 F .738
+(ariable is set to)-.25 F F2(value)3.238 E F0 5.738(.T)C .738
+(he return v)-5.738 F .739(alue is 0 unless an in)-.25 F -.25(va)-.4 G
+.739(lid option is).25 F .603
+(encountered, an attempt is made to de\214ne a function using)144 220.8
+R/F3 10/Courier@0 SF .603(\255f foo=bar)3.103 F F0 3.103(,a)C 3.103(na)
+-3.103 G .603(ttempt is made to)-3.103 F 1.242(assign a v)144 232.8 R
+1.242(alue to a readonly v)-.25 F 1.242
+(ariable, an attempt is made to assign a v)-.25 F 1.243
+(alue to an array v)-.25 F(ariable)-.25 E 1.386
+(without using the compound assignment syntax \(see)144 244.8 R F1
+(Arrays)3.886 E F0(abo)3.886 E -.15(ve)-.15 G 1.386(\), one of the).15 F
+F2(names)3.886 E F0 1.386(is not a)3.886 F -.25(va)144 256.8 S .171
+(lid shell v).25 F .171(ariable name, an attempt is made to turn of)-.25
+F 2.671(fr)-.25 G .171(eadonly status for a readonly v)-2.671 F .172
+(ariable, an)-.25 F .96(attempt is made to turn of)144 268.8 R 3.46(fa)
+-.25 G .96(rray status for an array v)-3.46 F .96
+(ariable, or an attempt is made to display a)-.25 F(non-e)144 280.8 Q
+(xistent function with)-.15 E F1<ad66>2.5 E F0(.)A F1(dirs [+)108 297.6
+Q F2(n)A F1 2.5(][)C<ad>-2.5 E F2(n)A F1 2.5(][)C(\255cplv])-2.5 E F0
+-.4(Wi)144 309.6 S .328
+(thout options, displays the list of currently remembered directories.)
+.4 F .329(The def)5.329 F .329(ault display is on a)-.1 F 1.238
+(single line with directory names separated by spaces.)144 321.6 R 1.238
+(Directories are added to the list with the)6.238 F F1(pushd)144 333.6 Q
+F0(command; the)2.5 E F1(popd)2.5 E F0(command remo)2.5 E -.15(ve)-.15 G
+2.5(se).15 G(ntries from the list.)-2.5 E F1(+)144 345.6 Q F2(n)A F0
+1.564(Displays the)25.3 F F2(n)4.064 E F0 1.565
+(th entry counting from the left of the list sho)B 1.565(wn by)-.25 F F1
+(dirs)4.065 E F0 1.565(when in)4.065 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E
+(without options, starting with zero.)180 357.6 Q F1<ad>144 369.6 Q F2
+(n)A F0 1.194(Displays the)25.3 F F2(n)3.694 E F0 1.194
+(th entry counting from the right of the list sho)B 1.194(wn by)-.25 F
+F1(dirs)3.694 E F0 1.194(when in)3.694 F -.2(vo)-.4 G -.1(ke).2 G(d).1 E
+(without options, starting with zero.)180 381.6 Q F1<ad63>144 393.6 Q F0
+(Clears the directory stack by deleting all of the entries.)25.86 E F1
+<ad6c>144 405.6 Q F0 .324(Produces a longer listing; the def)27.52 F
+.324(ault listing format uses a tilde to denote the home direc-)-.1 F
+(tory)180 417.6 Q(.)-.65 E F1<ad70>144 429.6 Q F0
+(Print the directory stack with one entry per line.)24.74 E F1<ad76>144
+441.6 Q F0 .273(Print the directory stack with one entry per line, pre\
+\214xing each entry with its inde)25.3 F 2.772(xi)-.15 G 2.772(nt)-2.772
+G(he)-2.772 E(stack.)180 453.6 Q .257(The return v)144 470.4 R .258
+(alue is 0 unless an in)-.25 F -.25(va)-.4 G .258
+(lid option is supplied or).25 F F2(n)2.758 E F0(inde)2.758 E -.15(xe)
+-.15 G 2.758(sb).15 G -.15(ey)-2.758 G .258(ond the end of the direc-)
+.15 F(tory stack.)144 482.4 Q F1(diso)108 499.2 Q(wn)-.1 E F0([)2.5 E F1
+(\255ar)A F0 2.5(][)C F1<ad68>-2.5 E F0 2.5(][)C F2(jobspec)-2.5 E F0
+(...])2.5 E -.4(Wi)144 511.2 S .295(thout options, each).4 F F2(jobspec)
+4.535 E F0 .295(is remo)3.105 F -.15(ve)-.15 G 2.795(df).15 G .295
+(rom the table of acti)-2.795 F .595 -.15(ve j)-.25 H 2.795(obs. If).15
+F F2(jobspec)4.535 E F0 .295(is not present,)3.105 F .422(and neither)
+144 523.2 R F1<ad61>2.922 E F0(nor)2.922 E F1<ad72>2.922 E F0 .422
+(is supplied, the shell')2.922 F 2.922(sn)-.55 G .422(otion of the)
+-2.922 F F2(curr)2.923 E .423(ent job)-.37 F F0 .423(is used.)2.923 F
+.423(If the)5.423 F F1<ad68>2.923 E F0 .423(option is)2.923 F(gi)144
+535.2 Q -.15(ve)-.25 G .141(n, each).15 F F2(jobspec)4.381 E F0 .141
+(is not remo)2.951 F -.15(ve)-.15 G 2.641(df).15 G .141
+(rom the table, b)-2.641 F .141(ut is mark)-.2 F .141(ed so that)-.1 F
+/F4 9/Times-Bold@0 SF(SIGHUP)2.641 E F0 .14(is not sent to the)2.39 F
+.004(job if the shell recei)144 547.2 R -.15(ve)-.25 G 2.504(sa).15 G F4
+(SIGHUP)A/F5 9/Times-Roman@0 SF(.)A F0 .004(If no)4.504 F F2(jobspec)
+4.244 E F0 .004(is present, and neither the)2.814 F F1<ad61>2.504 E F0
+.005(nor the)2.504 F F1<ad72>2.505 E F0 .005(option is)2.505 F 1.229
+(supplied, the)144 559.2 R F2(curr)3.729 E 1.229(ent job)-.37 F F0 1.229
+(is used.)3.729 F 1.229(If no)6.229 F F2(jobspec)5.469 E F0 1.229
+(is supplied, the)4.039 F F1<ad61>3.729 E F0 1.228(option means to remo)
+3.729 F 1.528 -.15(ve o)-.15 H(r).15 E .656(mark all jobs; the)144 571.2
+R F1<ad72>3.156 E F0 .657(option without a)3.156 F F2(jobspec)4.897 E F0
+(ar)3.467 E .657(gument restricts operation to running jobs.)-.18 F(The)
+5.657 E(return v)144 583.2 Q(alue is 0 unless a)-.25 E F2(jobspec)4.24 E
+F0(does not specify a v)2.81 E(alid job)-.25 E(.)-.4 E F1(echo)108 600 Q
+F0([)2.5 E F1(\255neE)A F0 2.5(][)C F2(ar)-2.5 E(g)-.37 E F0(...])2.5 E
+.395(Output the)144 612 R F2(ar)2.895 E(g)-.37 E F0 .395
+(s, separated by spaces, follo)B .395(wed by a ne)-.25 F 2.895
+(wline. The)-.25 F .394(return status is al)2.895 F -.1(wa)-.1 G .394
+(ys 0.).1 F(If)5.394 E F1<ad6e>2.894 E F0 .548
+(is speci\214ed, the trailing ne)144 624 R .548(wline is suppressed.)
+-.25 F .548(If the)5.548 F F1<ad65>3.048 E F0 .548(option is gi)3.048 F
+-.15(ve)-.25 G .548(n, interpretation of the fol-).15 F(lo)144 636 Q
+.053(wing backslash-escaped characters is enabled.)-.25 F(The)5.053 E F1
+<ad45>2.553 E F0 .052(option disables the interpretation of these)2.552
+F 1.502(escape characters, e)144 648 R -.15(ve)-.25 G 4.002(no).15 G
+4.002(ns)-4.002 G 1.502(ystems where the)-4.002 F 4.002(ya)-.15 G 1.502
+(re interpreted by def)-4.002 F 4.003(ault. The)-.1 F F1(xpg_echo)4.003
+E F0(shell)4.003 E .009
+(option may be used to dynamically determine whether or not)144 660 R F1
+(echo)2.509 E F0 -.15(ex)2.509 G .009(pands these escape characters).15
+F .659(by def)144 672 R(ault.)-.1 E F1(echo)5.659 E F0 .659
+(does not interpret)3.159 F F1<adad>3.159 E F0 .659
+(to mean the end of options.)3.159 F F1(echo)5.66 E F0 .66
+(interprets the follo)3.16 F(wing)-.25 E(escape sequences:)144 684 Q F1
+(\\a)144 696 Q F0(alert \(bell\))28.22 E F1(\\b)144 708 Q F0(backspace)
+27.66 E(GNU Bash-4.0)72 768 Q(2004 Apr 20)148.735 E(6)203.725 E 0 Cg EP
+%%Page: 7 7
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
+/Times-Bold@0 SF(\\c)144 84 Q F0(suppress further output)28.78 E F1(\\e)
+144 96 Q F0(an escape character)28.78 E F1(\\f)144 108 Q F0(form feed)
+29.89 E F1(\\n)144 120 Q F0(ne)27.66 E 2.5(wl)-.25 G(ine)-2.5 E F1(\\r)
+144 132 Q F0(carriage return)28.78 E F1(\\t)144 144 Q F0(horizontal tab)
+29.89 E F1(\\v)144 156 Q F0 -.15(ve)28.22 G(rtical tab).15 E F1(\\\\)144
+168 Q F0(backslash)30.44 E F1(\\0)144 180 Q/F2 10/Times-Italic@0 SF(nnn)
+A F0(the eight-bit character whose v)13.22 E(alue is the octal v)-.25 E
+(alue)-.25 E F2(nnn)2.5 E F0(\(zero to three octal digits\))2.5 E F1
+(\\x)144 192 Q F2(HH)A F0(the eight-bit character whose v)13.78 E
+(alue is the he)-.25 E(xadecimal v)-.15 E(alue)-.25 E F2(HH)2.5 E F0
+(\(one or tw)2.5 E 2.5(oh)-.1 G .3 -.15(ex d)-2.5 H(igits\)).15 E F1
+(enable)108 208.8 Q F0([)2.5 E F1<ad61>A F0 2.5(][)C F1(\255dnps)-2.5 E
+F0 2.5(][)C F1<ad66>-2.5 E F2(\214lename)2.5 E F0 2.5(][)C F2(name)-2.5
+E F0(...])2.5 E .278(Enable and disable b)144 220.8 R .278
+(uiltin shell commands.)-.2 F .278(Disabling a b)5.278 F .278
+(uiltin allo)-.2 F .278(ws a disk command which has)-.25 F .833
+(the same name as a shell b)144 232.8 R .834(uiltin to be e)-.2 F -.15
+(xe)-.15 G .834(cuted without specifying a full pathname, e).15 F -.15
+(ve)-.25 G 3.334(nt).15 G(hough)-3.334 E .99
+(the shell normally searches for b)144 244.8 R .989
+(uiltins before disk commands.)-.2 F(If)5.989 E F1<ad6e>3.489 E F0 .989
+(is used, each)3.489 F F2(name)3.489 E F0 .989(is dis-)3.489 F 1.581
+(abled; otherwise,)144 256.8 R F2(names)4.082 E F0 1.582(are enabled.)
+4.082 F -.15(Fo)6.582 G 4.082(re).15 G 1.582(xample, to use the)-4.232 F
+F1(test)4.082 E F0 1.582(binary found via the)4.082 F/F3 9/Times-Bold@0
+SF -.666(PA)4.082 G(TH)-.189 E F0 .081(instead of the shell b)144 268.8
+R .081(uiltin v)-.2 F .081(ersion, run)-.15 F/F4 10/Courier@0 SF .081
+(enable -n test)2.581 F F0 5.081(.T)C(he)-5.081 E F1<ad66>2.58 E F0 .08
+(option means to load the ne)2.58 F(w)-.25 E -.2(bu)144 280.8 S 1.524
+(iltin command).2 F F2(name)4.384 E F0 1.524(from shared object)4.204 F
+F2(\214lename)4.024 E F0 4.024(,o).18 G 4.024(ns)-4.024 G 1.524
+(ystems that support dynamic loading.)-4.024 F(The)144 292.8 Q F1<ad64>
+2.867 E F0 .367(option will delete a b)2.867 F .367(uiltin pre)-.2 F
+.367(viously loaded with)-.25 F F1<ad66>2.866 E F0 5.366(.I)C 2.866(fn)
+-5.366 G(o)-2.866 E F2(name)2.866 E F0(ar)2.866 E .366(guments are gi)
+-.18 F -.15(ve)-.25 G .366(n, or).15 F .398(if the)144 304.8 R F1<ad70>
+2.898 E F0 .399(option is supplied, a list of shell b)2.899 F .399
+(uiltins is printed.)-.2 F -.4(Wi)5.399 G .399(th no other option ar).4
+F .399(guments, the)-.18 F .099(list consists of all enabled shell b)144
+316.8 R 2.598(uiltins. If)-.2 F F1<ad6e>2.598 E F0 .098
+(is supplied, only disabled b)2.598 F .098(uiltins are printed.)-.2 F
+(If)5.098 E F1<ad61>2.598 E F0 1.916
+(is supplied, the list printed includes all b)144 328.8 R 1.916
+(uiltins, with an indication of whether or not each is)-.2 F 2.879
+(enabled. If)144 340.8 R F1<ad73>2.879 E F0 .379
+(is supplied, the output is restricted to the POSIX)2.879 F F2(special)
+2.879 E F0 -.2(bu)2.878 G 2.878(iltins. The).2 F .378(return v)2.878 F
+(alue)-.25 E .994(is 0 unless a)144 352.8 R F2(name)3.854 E F0 .994
+(is not a shell b)3.674 F .994(uiltin or there is an error loading a ne)
+-.2 F 3.495(wb)-.25 G .995(uiltin from a shared)-3.695 F(object.)144
+364.8 Q F1 -2.3 -.15(ev a)108 381.6 T(l).15 E F0([)2.5 E F2(ar)A(g)-.37
+E F0(...])2.5 E(The)144 393.6 Q F2(ar)3.171 E(g)-.37 E F0 3.171(sa)C
+.671(re read and concatenated together into a single command.)-3.171 F
+.67(This command is then read)5.67 F .495(and e)144 405.6 R -.15(xe)-.15
+G .495(cuted by the shell, and its e).15 F .495
+(xit status is returned as the v)-.15 F .495(alue of)-.25 F F1 -2.3 -.15
+(ev a)2.995 H(l).15 E F0 5.495(.I)C 2.995(ft)-5.495 G .495(here are no)
+-2.995 F F2(ar)2.995 E(gs)-.37 E F0(,).27 E(or only null ar)144 417.6 Q
+(guments,)-.18 E F1 -2.3 -.15(ev a)2.5 H(l).15 E F0(returns 0.)2.5 E F1
+(exec)108 434.4 Q F0([)2.5 E F1(\255cl)A F0 2.5(][)C F1<ad61>-2.5 E F2
+(name)2.5 E F0 2.5(][)C F2(command)-2.5 E F0([)2.5 E F2(ar)A(guments)
+-.37 E F0(]])A(If)144 446.4 Q F2(command)3.006 E F0 .306
+(is speci\214ed, it replaces the shell.)3.576 F .305(No ne)5.305 F 2.805
+(wp)-.25 G .305(rocess is created.)-2.805 F(The)5.305 E F2(ar)3.135 E
+(guments)-.37 E F0(become)3.075 E .176(the ar)144 458.4 R .176
+(guments to)-.18 F F2(command)2.676 E F0 5.176(.I)C 2.676(ft)-5.176 G
+(he)-2.676 E F1<ad6c>2.676 E F0 .176
+(option is supplied, the shell places a dash at the be)2.676 F .177
+(ginning of)-.15 F .5(the zeroth ar)144 470.4 R .5(gument passed to)-.18
+F F2(command)3 E F0 5.499(.T).77 G .499(his is what)-5.499 F F2(lo)2.999
+E(gin)-.1 E F0 .499(\(1\) does.).24 F(The)5.499 E F1<ad63>2.999 E F0
+.499(option causes)2.999 F F2(com-)3.199 E(mand)144 482.4 Q F0 .638
+(to be e)3.908 F -.15(xe)-.15 G .638(cuted with an empty en).15 F 3.138
+(vironment. If)-.4 F F1<ad61>3.138 E F0 .638
+(is supplied, the shell passes)3.138 F F2(name)3.499 E F0 .639(as the)
+3.319 F 1.078(zeroth ar)144 494.4 R 1.077(gument to the e)-.18 F -.15
+(xe)-.15 G 1.077(cuted command.).15 F(If)6.077 E F2(command)3.777 E F0
+1.077(cannot be e)4.347 F -.15(xe)-.15 G 1.077(cuted for some reason, a)
+.15 F(non-interacti)144 506.4 Q .617 -.15(ve s)-.25 H .317(hell e).15 F
+.317(xits, unless the shell option)-.15 F F1(execfail)2.817 E F0 .318
+(is enabled, in which case it returns f)2.817 F(ail-)-.1 E 2.505
+(ure. An)144 518.4 R(interacti)2.505 E .305 -.15(ve s)-.25 H .005
+(hell returns f).15 F .005(ailure if the \214le cannot be e)-.1 F -.15
+(xe)-.15 G 2.505(cuted. If).15 F F2(command)2.705 E F0 .005
+(is not speci\214ed,)3.275 F(an)144 530.4 Q 3.036(yr)-.15 G .536
+(edirections tak)-3.036 F 3.036(ee)-.1 G -.25(ff)-3.036 G .536
+(ect in the current shell, and the return status is 0.).25 F .536
+(If there is a redirection)5.536 F(error)144 542.4 Q 2.5(,t)-.4 G
+(he return status is 1.)-2.5 E F1(exit)108 559.2 Q F0([)2.5 E F2(n)A F0
+6.29(]C)C .096(ause the shell to e)-6.29 F .096(xit with a status of)
+-.15 F F2(n)2.596 E F0 5.096(.I)C(f)-5.096 E F2(n)2.955 E F0 .095
+(is omitted, the e)2.835 F .095(xit status is that of the last command)
+-.15 F -.15(exe)144 571.2 S 2.5(cuted. A).15 F(trap on)2.5 E F3(EXIT)2.5
+E F0(is e)2.25 E -.15(xe)-.15 G(cuted before the shell terminates.).15 E
+F1(export)108 588 Q F0([)2.5 E F1(\255fn)A F0 2.5(][).833 G F2(name)-2.5
+E F0([=)A F2(wor)A(d)-.37 E F0(]] ...)A F1(export \255p)108 600 Q F0
+.256(The supplied)144 612 R F2(names)3.117 E F0 .257(are mark)3.027 F
+.257(ed for automatic e)-.1 F .257(xport to the en)-.15 F .257
+(vironment of subsequently e)-.4 F -.15(xe)-.15 G(cuted).15 E 2.627
+(commands. If)144 624 R(the)2.627 E F1<ad66>2.627 E F0 .127
+(option is gi)2.627 F -.15(ve)-.25 G .127(n, the).15 F F2(names)2.987 E
+F0 .127(refer to functions.)2.897 F .127(If no)5.127 F F2(names)2.987 E
+F0 .127(are gi)2.897 F -.15(ve)-.25 G .126(n, or if the).15 F F1<ad70>
+144 636 Q F0 .659(option is supplied, a list of all names that are e)
+3.159 F .66(xported in this shell is printed.)-.15 F(The)5.66 E F1<ad6e>
+3.16 E F0(option)3.16 E 1.587(causes the e)144 648 R 1.587
+(xport property to be remo)-.15 F -.15(ve)-.15 G 4.086(df).15 G 1.586
+(rom each)-4.086 F F2(name)4.086 E F0 6.586(.I)C 4.086(fav)-6.586 G
+1.586(ariable name is follo)-4.336 F 1.586(wed by)-.25 F(=)144 660 Q F2
+(wor)A(d)-.37 E F0 2.803(,t)C .303(he v)-2.803 F .303(alue of the v)-.25
+F .304(ariable is set to)-.25 F F2(wor)2.804 E(d)-.37 E F0(.)A F1
+(export)5.304 E F0 .304(returns an e)2.804 F .304
+(xit status of 0 unless an in)-.15 F -.25(va)-.4 G(lid).25 E .294
+(option is encountered, one of the)144 672 R F2(names)2.793 E F0 .293
+(is not a v)2.793 F .293(alid shell v)-.25 F .293(ariable name, or)-.25
+F F1<ad66>2.793 E F0 .293(is supplied with a)2.793 F F2(name)144.36 684
+Q F0(that is not a function.)2.68 E F1(fc)108 700.8 Q F0([)2.5 E F1
+<ad65>A F2(ename)2.5 E F0 2.5(][)C F1(\255lnr)-2.5 E F0 2.5(][)C F2
+<8c72>-2.5 E(st)-.1 E F0 2.5(][)C F2(last)-2.5 E F0(])A(GNU Bash-4.0)72
+768 Q(2004 Apr 20)148.735 E(7)203.725 E 0 Cg EP
+%%Page: 8 8
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
+/Times-Bold@0 SF(fc \255s)108 84 Q F0([)2.5 E/F2 10/Times-Italic@0 SF
+(pat)A F0(=)A F2 -.37(re)C(p).37 E F0 2.5(][)C F2(cmd)-2.5 E F0(])A .477
+(Fix Command.)144 96 R .478
+(In the \214rst form, a range of commands from)5.477 F F2<8c72>4.888 E
+(st)-.1 E F0(to)3.658 E F2(last)3.068 E F0 .478
+(is selected from the his-)3.658 F .882(tory list.)144 108 R F2 -.45(Fi)
+5.882 G -.1(rs).45 G(t).1 E F0(and)4.062 E F2(last)3.472 E F0 .882
+(may be speci\214ed as a string \(to locate the last command be)4.062 F
+.881(ginning with)-.15 F .797(that string\) or as a number \(an inde)144
+120 R 3.297(xi)-.15 G .797(nto the history list, where a ne)-3.297 F
+-.05(ga)-.15 G(ti).05 E 1.097 -.15(ve n)-.25 H .797(umber is used as an)
+.15 F(of)144 132 Q .277(fset from the current command number\).)-.25 F
+(If)5.277 E F2(last)2.867 E F0 .276
+(is not speci\214ed it is set to the current command)3.457 F .092
+(for listing \(so that)144 144 R/F3 10/Courier@0 SF .092
+(fc \255l \25510)2.592 F F0 .092(prints the last 10 commands\) and to)
+2.592 F F2<8c72>4.502 E(st)-.1 E F0 2.592(otherwise. If)3.272 F F2<8c72>
+4.502 E(st)-.1 E F0 .093(is not)3.273 F
+(speci\214ed it is set to the pre)144 156 Q
+(vious command for editing and \25516 for listing.)-.25 E(The)144 180 Q
+F1<ad6e>2.522 E F0 .022
+(option suppresses the command numbers when listing.)2.522 F(The)5.022 E
+F1<ad72>2.522 E F0 .022(option re)2.522 F -.15(ve)-.25 G .022
+(rses the order of).15 F .438(the commands.)144 192 R .438(If the)5.438
+F F1<ad6c>2.938 E F0 .438(option is gi)2.938 F -.15(ve)-.25 G .438
+(n, the commands are listed on standard output.).15 F(Otherwise,)5.438 E
+.335(the editor gi)144 204 R -.15(ve)-.25 G 2.835(nb).15 G(y)-2.835 E F2
+(ename)3.025 E F0 .335(is in)3.015 F -.2(vo)-.4 G -.1(ke).2 G 2.835(do)
+.1 G 2.835(na\214)-2.835 G .335(le containing those commands.)-2.835 F
+(If)5.334 E F2(ename)3.024 E F0 .334(is not gi)3.014 F -.15(ve)-.25 G
+(n,).15 E .63(the v)144 216 R .63(alue of the)-.25 F/F4 9/Times-Bold@0
+SF(FCEDIT)3.13 E F0 -.25(va)2.88 G .631(riable is used, and the v).25 F
+.631(alue of)-.25 F F4(EDIT)3.131 E(OR)-.162 E F0(if)2.881 E F4(FCEDIT)
+3.131 E F0 .631(is not set.)2.881 F .631(If nei-)5.631 F 1.884(ther v)
+144 228 R 1.884(ariable is set, is used.)-.25 F 1.884
+(When editing is complete, the edited commands are echoed and)6.884 F
+-.15(exe)144 240 S(cuted.).15 E .039(In the second form,)144 264 R F2
+(command)2.539 E F0 .039(is re-e)2.539 F -.15(xe)-.15 G .039
+(cuted after each instance of).15 F F2(pat)2.54 E F0 .04(is replaced by)
+2.54 F F2 -.37(re)2.54 G(p).37 E F0 5.04(.A)C(useful)-2.5 E .406
+(alias to use with this is)144 276 R F3 .406(r='fc \255s')2.906 F F0
+2.906(,s)C 2.906(ot)-2.906 G .406(hat typing)-2.906 F F3 6.406(rc)2.906
+G(c)-6.406 E F0 .406(runs the last command be)2.906 F .406(ginning with)
+-.15 F F3(cc)144 288 Q F0(and typing)2.5 E F3(r)2.5 E F0(re-e)2.5 E -.15
+(xe)-.15 G(cutes the last command.).15 E .142
+(If the \214rst form is used, the return v)144 312 R .142
+(alue is 0 unless an in)-.25 F -.25(va)-.4 G .142
+(lid option is encountered or).25 F F2<8c72>4.552 E(st)-.1 E F0(or)3.322
+E F2(last)2.732 E F0 .455(specify history lines out of range.)144 324 R
+.454(If the)5.454 F F1<ad65>2.954 E F0 .454
+(option is supplied, the return v)2.954 F .454(alue is the v)-.25 F .454
+(alue of the)-.25 F .787(last command e)144 336 R -.15(xe)-.15 G .787
+(cuted or f).15 F .788
+(ailure if an error occurs with the temporary \214le of commands.)-.1 F
+.788(If the)5.788 F 1.136
+(second form is used, the return status is that of the command re-e)144
+348 R -.15(xe)-.15 G 1.135(cuted, unless).15 F F2(cmd)3.835 E F0 1.135
+(does not)4.405 F(specify a v)144 360 Q
+(alid history line, in which case)-.25 E F1(fc)2.5 E F0(returns f)2.5 E
+(ailure.)-.1 E F1(fg)108 376.8 Q F0([)2.5 E F2(jobspec)A F0(])A(Resume)
+144 388.8 Q F2(jobspec)5.653 E F0 1.413(in the fore)4.223 F 1.413
+(ground, and mak)-.15 F 3.913(ei)-.1 G 3.913(tt)-3.913 G 1.413
+(he current job)-3.913 F 6.413(.I)-.4 G(f)-6.413 E F2(jobspec)5.653 E F0
+1.414(is not present, the)4.223 F(shell')144 400.8 Q 3.117(sn)-.55 G
+.617(otion of the)-3.117 F F2(curr)3.117 E .617(ent job)-.37 F F0 .617
+(is used.)3.117 F .617(The return v)5.617 F .616
+(alue is that of the command placed into the)-.25 F(fore)144 412.8 Q
+.362(ground, or f)-.15 F .362
+(ailure if run when job control is disabled or)-.1 F 2.862(,w)-.4 G .363
+(hen run with job control enabled, if)-2.862 F F2(jobspec)145.74 424.8 Q
+F0 .004(does not specify a v)2.815 F .004(alid job or)-.25 F F2(jobspec)
+4.244 E F0 .004(speci\214es a job that w)2.814 F .004
+(as started without job control.)-.1 F F1(getopts)108 441.6 Q F2
+(optstring name)2.5 E F0([)2.5 E F2(ar)A(gs)-.37 E F0(])A F1(getopts)144
+453.6 Q F0 .793
+(is used by shell procedures to parse positional parameters.)3.293 F F2
+(optstring)6.023 E F0 .793(contains the option)3.513 F .15
+(characters to be recognized; if a character is follo)144 465.6 R .149
+(wed by a colon, the option is e)-.25 F .149(xpected to ha)-.15 F .449
+-.15(ve a)-.2 H(n).15 E(ar)144 477.6 Q .578
+(gument, which should be separated from it by white space.)-.18 F .579
+(The colon and question mark char)5.579 F(-)-.2 E 1.665
+(acters may not be used as option characters.)144 489.6 R 1.665
+(Each time it is in)6.665 F -.2(vo)-.4 G -.1(ke).2 G(d,).1 E F1(getopts)
+4.165 E F0 1.665(places the ne)4.165 F(xt)-.15 E .796
+(option in the shell v)144 501.6 R(ariable)-.25 E F2(name)3.296 E F0
+3.296(,i).18 G(nitializing)-3.296 E F2(name)3.657 E F0 .797
+(if it does not e)3.477 F .797(xist, and the inde)-.15 F 3.297(xo)-.15 G
+3.297(ft)-3.297 G .797(he ne)-3.297 F(xt)-.15 E(ar)144 513.6 Q .085
+(gument to be processed into the v)-.18 F(ariable)-.25 E F4(OPTIND)2.585
+E/F5 9/Times-Roman@0 SF(.)A F4(OPTIND)4.585 E F0 .085
+(is initialized to 1 each time the shell)2.335 F .845
+(or a shell script is in)144 525.6 R -.2(vo)-.4 G -.1(ke).2 G 3.345
+(d. When).1 F .845(an option requires an ar)3.345 F(gument,)-.18 E F1
+(getopts)3.346 E F0 .846(places that ar)3.346 F(gument)-.18 E .804
+(into the v)144 537.6 R(ariable)-.25 E F4(OPT)3.304 E(ARG)-.81 E F5(.)A
+F0 .803(The shell does not reset)5.304 F F4(OPTIND)3.303 E F0 .803
+(automatically; it must be manually)3.053 F .293
+(reset between multiple calls to)144 549.6 R F1(getopts)2.793 E F0 .293
+(within the same shell in)2.793 F -.2(vo)-.4 G .293(cation if a ne).2 F
+2.793(ws)-.25 G .294(et of parameters)-2.793 F(is to be used.)144 561.6
+Q 2.044(When the end of options is encountered,)144 585.6 R F1(getopts)
+4.543 E F0 -.15(ex)4.543 G 2.043(its with a return v).15 F 2.043
+(alue greater than zero.)-.25 F F4(OPTIND)144 597.6 Q F0
+(is set to the inde)2.25 E 2.5(xo)-.15 G 2.5(ft)-2.5 G
+(he \214rst non-option ar)-2.5 E(gument, and)-.18 E F1(name)2.5 E F0
+(is set to ?.)2.5 E F1(getopts)144 621.6 Q F0 2.392
+(normally parses the positional parameters, b)4.892 F 2.392
+(ut if more ar)-.2 F 2.393(guments are gi)-.18 F -.15(ve)-.25 G 4.893
+(ni).15 G(n)-4.893 E F2(ar)4.893 E(gs)-.37 E F0(,).27 E F1(getopts)144
+633.6 Q F0(parses those instead.)2.5 E F1(getopts)144 657.6 Q F0 1.166
+(can report errors in tw)3.666 F 3.665(ow)-.1 G 3.665(ays. If)-3.765 F
+1.165(the \214rst character of)3.665 F F2(optstring)3.895 E F0 1.165
+(is a colon,)3.885 F F2(silent)4.005 E F0(error)4.345 E 1.263
+(reporting is used.)144 669.6 R 1.263
+(In normal operation diagnostic messages are printed when in)6.263 F
+-.25(va)-.4 G 1.263(lid options or).25 F .394(missing option ar)144
+681.6 R .394(guments are encountered.)-.18 F .394(If the v)5.394 F
+(ariable)-.25 E F4(OPTERR)2.894 E F0 .394
+(is set to 0, no error messages)2.644 F(will be displayed, e)144 693.6 Q
+-.15(ve)-.25 G 2.5(ni).15 G 2.5(ft)-2.5 G(he \214rst character of)-2.5 E
+F2(optstring)2.73 E F0(is not a colon.)2.72 E .666(If an in)144 717.6 R
+-.25(va)-.4 G .666(lid option is seen,).25 F F1(getopts)3.166 E F0 .667
+(places ? into)3.167 F F2(name)3.527 E F0 .667
+(and, if not silent, prints an error message)3.347 F .4(and unsets)144
+729.6 R F4(OPT)2.9 E(ARG)-.81 E F5(.)A F0(If)4.899 E F1(getopts)2.899 E
+F0 .399(is silent, the option character found is placed in)2.899 F F4
+(OPT)2.899 E(ARG)-.81 E F0 .399(and no)2.649 F(GNU Bash-4.0)72 768 Q
+(2004 Apr 20)148.735 E(8)203.725 E 0 Cg EP
+%%Page: 9 9
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E
+(diagnostic message is printed.)144 84 Q 1.241(If a required ar)144 108
+R 1.241(gument is not found, and)-.18 F/F1 10/Times-Bold@0 SF(getopts)
+3.741 E F0 1.241(is not silent, a question mark \()3.741 F F1(?).833 E
+F0 3.742(\)i).833 G 3.742(sp)-3.742 G 1.242(laced in)-3.742 F/F2 10
+/Times-Italic@0 SF(name)144 120 Q F0(,).18 E/F3 9/Times-Bold@0 SF(OPT)
+2.735 E(ARG)-.81 E F0 .234
+(is unset, and a diagnostic message is printed.)2.485 F(If)5.234 E F1
+(getopts)2.734 E F0 .234(is silent, then a colon \()2.734 F F1(:).833 E
+F0(\)).833 E(is placed in)144 132 Q F2(name)2.86 E F0(and)2.68 E F3(OPT)
+2.5 E(ARG)-.81 E F0(is set to the option character found.)2.25 E F1
+(getopts)144 156 Q F0 .902
+(returns true if an option, speci\214ed or unspeci\214ed, is found.)
+3.401 F .902(It returns f)5.902 F .902(alse if the end of)-.1 F
+(options is encountered or an error occurs.)144 168 Q F1(hash)108 184.8
+Q F0([)2.5 E F1(\255lr)A F0 2.5(][)C F1<ad70>-2.5 E F2(\214lename)2.5 E
+F0 2.5(][)C F1(\255dt)-2.5 E F0 2.5(][)C F2(name)-2.5 E F0(])A -.15(Fo)
+144 196.8 S 3.555(re).15 G(ach)-3.555 E F2(name)3.555 E F0 3.555(,t).18
+G 1.054(he full \214le name of the command is determined by searching t\
+he directories in)-3.555 F F1($P)144 208.8 Q -.95(AT)-.74 G(H).95 E F0
+.349(and remembered.)2.849 F .349(If the)5.349 F F1<ad70>2.849 E F0 .349
+(option is supplied, no path search is performed, and)2.849 F F2
+(\214lename)4.76 E F0 .452
+(is used as the full \214le name of the command.)144 220.8 R(The)5.452 E
+F1<ad72>2.952 E F0 .452(option causes the shell to for)2.952 F .452
+(get all remem-)-.18 F .592(bered locations.)144 232.8 R(The)5.592 E F1
+<ad64>3.092 E F0 .593(option causes the shell to for)3.092 F .593
+(get the remembered location of each)-.18 F F2(name)3.093 E F0(.)A .021
+(If the)144 244.8 R F1<ad74>2.521 E F0 .021
+(option is supplied, the full pathname to which each)2.521 F F2(name)
+2.52 E F0 .02(corresponds is printed.)2.52 F .02(If multi-)5.02 F(ple)
+144 256.8 Q F2(name)3.703 E F0(ar)3.703 E 1.203
+(guments are supplied with)-.18 F F1<ad74>3.703 E F0 3.703(,t)C(he)
+-3.703 E F2(name)3.703 E F0 1.204
+(is printed before the hashed full pathname.)3.703 F(The)144 268.8 Q F1
+<ad6c>3.216 E F0 .715(option causes output to be displayed in a format \
+that may be reused as input.)3.216 F .715(If no ar)5.715 F(gu-)-.18 E
+1.183(ments are gi)144 280.8 R -.15(ve)-.25 G 1.183(n, or if only).15 F
+F1<ad6c>3.683 E F0 1.184
+(is supplied, information about remembered commands is printed.)3.684 F
+(The return status is true unless a)144 292.8 Q F2(name)2.86 E F0
+(is not found or an in)2.68 E -.25(va)-.4 G(lid option is supplied.).25
+E F1(help)108 309.6 Q F0([)2.5 E F1(\255dms)A F0 2.5(][)C F2(pattern)
+-2.5 E F0(])A .867(Display helpful information about b)144 321.6 R .867
+(uiltin commands.)-.2 F(If)5.867 E F2(pattern)4.617 E F0 .866
+(is speci\214ed,)3.607 F F1(help)3.366 E F0(gi)3.366 E -.15(ve)-.25 G
+3.366(sd).15 G(etailed)-3.366 E .306(help on all commands matching)144
+333.6 R F2(pattern)2.806 E F0 2.807(;o).24 G .307
+(therwise help for all the b)-2.807 F .307
+(uiltins and shell control struc-)-.2 F(tures is printed.)144 345.6 Q F1
+<ad64>144 357.6 Q F0(Display a short description of each)24.74 E F2
+(pattern)2.5 E F1<ad6d>144 369.6 Q F0(Display the description of each)
+21.97 E F2(pattern)2.5 E F0(in a manpage-lik)2.5 E 2.5(ef)-.1 G(ormat)
+-2.5 E F1<ad73>144 381.6 Q F0
+(Display only a short usage synopsis for each)26.41 E F2(pattern)2.5 E
+F0(The return status is 0 unless no command matches)108 393.6 Q F2
+(pattern)2.5 E F0(.).24 E F1(history [)108 410.4 Q F2(n)A F1(])A
+(history \255c)108 422.4 Q(history \255d)108 434.4 Q F2(of)2.5 E(fset)
+-.18 E F1(history \255anrw)108 446.4 Q F0([)2.5 E F2(\214lename)A F0(])A
+F1(history \255p)108 458.4 Q F2(ar)2.5 E(g)-.37 E F0([)2.5 E F2(ar)A 2.5
+(g.)-.37 G(..)-2.5 E F0(])A F1(history \255s)108 470.4 Q F2(ar)2.5 E(g)
+-.37 E F0([)2.5 E F2(ar)A 2.5(g.)-.37 G(..)-2.5 E F0(])A -.4(Wi)144
+482.4 S .752
+(th no options, display the command history list with line numbers.).4 F
+.752(Lines listed with a)5.752 F F1(*)3.251 E F0(ha)3.251 E -.15(ve)-.2
+G .38(been modi\214ed.)144 494.4 R .38(An ar)5.38 F .38(gument of)-.18 F
+F2(n)3.24 E F0 .38(lists only the last)3.12 F F2(n)3.24 E F0 2.88
+(lines. If)3.12 F .38(the shell v)2.88 F(ariable)-.25 E F3(HISTTIMEFOR-)
+2.881 E(MA)144 506.4 Q(T)-.855 E F0 .265
+(is set and not null, it is used as a format string for)2.515 F F2
+(strftime)2.764 E F0 .264(\(3\) to display the time stamp asso-)B 1.019
+(ciated with each displayed history entry)144 518.4 R 6.019(.N)-.65 G
+3.519(oi)-6.019 G(nterv)-3.519 E 1.019
+(ening blank is printed between the formatted)-.15 F .176
+(time stamp and the history line.)144 530.4 R(If)5.176 E F2(\214lename)
+2.676 E F0 .176
+(is supplied, it is used as the name of the history \214le; if)2.676 F
+(not, the v)144 542.4 Q(alue of)-.25 E F3(HISTFILE)2.5 E F0(is used.)
+2.25 E(Options, if supplied, ha)5 E .3 -.15(ve t)-.2 H(he follo).15 E
+(wing meanings:)-.25 E F1<ad63>144 554.4 Q F0
+(Clear the history list by deleting all the entries.)25.86 E F1<ad64>144
+566.4 Q F2(of)2.5 E(fset)-.18 E F0(Delete the history entry at position)
+180 578.4 Q F2(of)2.5 E(fset)-.18 E F0(.)A F1<ad61>144 590.4 Q F0 .598
+(Append the `)25.3 F(`ne)-.74 E(w')-.25 E 3.098('h)-.74 G .598
+(istory lines \(history lines entered since the be)-3.098 F .599
+(ginning of the current)-.15 F F1(bash)180 602.4 Q F0
+(session\) to the history \214le.)2.5 E F1<ad6e>144 614.4 Q F0 .854(Rea\
+d the history lines not already read from the history \214le into the c\
+urrent history list.)24.74 F .772
+(These are lines appended to the history \214le since the be)180 626.4 R
+.773(ginning of the current)-.15 F F1(bash)3.273 E F0(ses-)3.273 E
+(sion.)180 638.4 Q F1<ad72>144 650.4 Q F0(Read the contents of the hist\
+ory \214le and use them as the current history)25.86 E(.)-.65 E F1<ad77>
+144 662.4 Q F0(Write the current history to the history \214le, o)23.08
+E -.15(ve)-.15 G(rwriting the history \214le').15 E 2.5(sc)-.55 G
+(ontents.)-2.5 E F1<ad70>144 674.4 Q F0 .626
+(Perform history substitution on the follo)24.74 F(wing)-.25 E F2(ar)
+3.125 E(gs)-.37 E F0 .625(and display the result on the standard)3.125 F
+2.975(output. Does)180 686.4 R .475
+(not store the results in the history list.)2.975 F(Each)5.475 E F2(ar)
+2.975 E(g)-.37 E F0 .475(must be quoted to disable)2.975 F
+(normal history e)180 698.4 Q(xpansion.)-.15 E F1<ad73>144 710.4 Q F0
+.363(Store the)26.41 F F2(ar)3.193 E(gs)-.37 E F0 .363
+(in the history list as a single entry)3.133 F 5.363(.T)-.65 G .362
+(he last command in the history list is)-5.363 F(remo)180 722.4 Q -.15
+(ve)-.15 G 2.5(db).15 G(efore the)-2.5 E F2(ar)2.83 E(gs)-.37 E F0
+(are added.)2.77 E(GNU Bash-4.0)72 768 Q(2004 Apr 20)148.735 E(9)203.725
+E 0 Cg EP
+%%Page: 10 10
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E .145(If the)
+144 84 R/F1 9/Times-Bold@0 SF(HISTTIMEFORMA)2.645 E(T)-.855 E F0 -.25
+(va)2.395 G .145
+(riable is set, the time stamp information associated with each history)
+.25 F .669(entry is written to the history \214le, mark)144 96 R .669
+(ed with the history comment character)-.1 F 5.668(.W)-.55 G .668
+(hen the history)-5.668 F .955(\214le is read, lines be)144 108 R .956
+(ginning with the history comment character follo)-.15 F .956
+(wed immediately by a digit)-.25 F .416
+(are interpreted as timestamps for the pre)144 120 R .416
+(vious history line.)-.25 F .416(The return v)5.416 F .415
+(alue is 0 unless an in)-.25 F -.25(va)-.4 G(lid).25 E .499(option is e\
+ncountered, an error occurs while reading or writing the history \214le\
+, an in)144 132 R -.25(va)-.4 G(lid).25 E/F2 10/Times-Italic@0 SF(of)3 E
+(fset)-.18 E F0(is)3 E(supplied as an ar)144 144 Q(gument to)-.18 E/F3
+10/Times-Bold@0 SF<ad64>2.5 E F0 2.5(,o)C 2.5(rt)-2.5 G(he history e)
+-2.5 E(xpansion supplied as an ar)-.15 E(gument to)-.18 E F3<ad70>2.5 E
+F0 -.1(fa)2.5 G(ils.).1 E F3(jobs)108 160.8 Q F0([)2.5 E F3(\255lnprs)A
+F0 2.5(][)C F2(jobspec)A F0(... ])2.5 E F3(jobs \255x)108 172.8 Q F2
+(command)2.5 E F0([)2.5 E F2(ar)2.5 E(gs)-.37 E F0(... ])2.5 E
+(The \214rst form lists the acti)144 184.8 Q .3 -.15(ve j)-.25 H 2.5
+(obs. The).15 F(options ha)2.5 E .3 -.15(ve t)-.2 H(he follo).15 E
+(wing meanings:)-.25 E F3<ad6c>144 196.8 Q F0
+(List process IDs in addition to the normal information.)27.52 E F3
+<ad70>144 208.8 Q F0(List only the process ID of the job')24.74 E 2.5
+(sp)-.55 G(rocess group leader)-2.5 E(.)-.55 E F3<ad6e>144 220.8 Q F0
+.194(Display information only about jobs that ha)24.74 F .494 -.15(ve c)
+-.2 H .193(hanged status since the user w).15 F .193(as last noti-)-.1 F
+(\214ed of their status.)180 232.8 Q F3<ad72>144 244.8 Q F0
+(Restrict output to running jobs.)25.86 E F3<ad73>144 256.8 Q F0
+(Restrict output to stopped jobs.)26.41 E(If)144 273.6 Q F2(jobspec)
+4.553 E F0 .313(is gi)3.123 F -.15(ve)-.25 G .313
+(n, output is restricted to information about that job).15 F 5.314(.T)
+-.4 G .314(he return status is 0 unless)-5.314 F(an in)144 285.6 Q -.25
+(va)-.4 G(lid option is encountered or an in).25 E -.25(va)-.4 G(lid).25
+E F2(jobspec)4.24 E F0(is supplied.)2.81 E .395(If the)144 302.4 R F3
+<ad78>2.895 E F0 .394(option is supplied,)2.894 F F3(jobs)2.894 E F0
+.394(replaces an)2.894 F(y)-.15 E F2(jobspec)4.634 E F0 .394(found in)
+3.204 F F2(command)3.094 E F0(or)3.664 E F2(ar)3.224 E(gs)-.37 E F0 .394
+(with the corre-)3.164 F(sponding process group ID, and e)144 314.4 Q
+-.15(xe)-.15 G(cutes).15 E F2(command)2.7 E F0(passing it)3.27 E F2(ar)
+2.5 E(gs)-.37 E F0 2.5(,r).27 G(eturning its e)-2.5 E(xit status.)-.15 E
+F3(kill)108 331.2 Q F0([)2.5 E F3<ad73>A F2(sigspec)2.5 E F0(|)2.5 E F3
+<ad6e>2.5 E F2(signum)2.5 E F0(|)2.5 E F3<ad>2.5 E F2(sigspec)A F0 2.5
+(][)C F2(pid)-2.5 E F0(|)2.5 E F2(jobspec)2.5 E F0 2.5(].)C(..)-2.5 E F3
+(kill \255l)108 343.2 Q F0([)2.5 E F2(sigspec)A F0(|)2.5 E F2 -.2(ex)2.5
+G(it_status).2 E F0(])A .119(Send the signal named by)144 355.2 R F2
+(sigspec)2.959 E F0(or)2.929 E F2(signum)2.959 E F0 .119
+(to the processes named by)2.939 F F2(pid)3.87 E F0(or)3.39 E F2
+(jobspec)2.62 E F0(.).31 E F2(sigspec)5.46 E F0(is)2.93 E .319
+(either a case-insensiti)144 367.2 R .619 -.15(ve s)-.25 H .319
+(ignal name such as).15 F F1(SIGKILL)2.819 E F0 .318
+(\(with or without the)2.569 F F1(SIG)2.818 E F0 .318
+(pre\214x\) or a signal)2.568 F(number;)144 379.2 Q F2(signum)4.188 E F0
+1.349(is a signal number)4.168 F 6.349(.I)-.55 G(f)-6.349 E F2(sigspec)
+4.189 E F0 1.349(is not present, then)4.159 F F1(SIGTERM)3.849 E F0
+1.349(is assumed.)3.599 F(An)6.349 E(ar)144 391.2 Q .523(gument of)-.18
+F F3<ad6c>3.023 E F0 .523(lists the signal names.)3.023 F .523(If an)
+5.523 F 3.023(ya)-.15 G -.18(rg)-3.023 G .523(uments are supplied when)
+.18 F F3<ad6c>3.023 E F0 .523(is gi)3.023 F -.15(ve)-.25 G .523
+(n, the names).15 F .28(of the signals corresponding to the ar)144 403.2
+R .28(guments are listed, and the return status is 0.)-.18 F(The)5.28 E
+F2 -.2(ex)2.78 G(it_status).2 E F0(ar)144 415.2 Q .378(gument to)-.18 F
+F3<ad6c>2.878 E F0 .378
+(is a number specifying either a signal number or the e)2.878 F .377
+(xit status of a process termi-)-.15 F .593(nated by a signal.)144 427.2
+R F3(kill)5.593 E F0 .593(returns true if at least one signal w)3.093 F
+.593(as successfully sent, or f)-.1 F .594(alse if an error)-.1 F
+(occurs or an in)144 439.2 Q -.25(va)-.4 G(lid option is encountered.)
+.25 E F3(let)108 456 Q F2(ar)2.5 E(g)-.37 E F0([)2.5 E F2(ar)A(g)-.37 E
+F0(...])2.5 E(Each)144 468 Q F2(ar)3.027 E(g)-.37 E F0 .197
+(is an arithmetic e)2.917 F .197(xpression to be e)-.15 F -.25(va)-.25 G
+.196(luated \(see).25 F F1 .196(ARITHMETIC EV)2.696 F(ALU)-1.215 E -.855
+(AT)-.54 G(ION).855 E F0(abo)2.446 E -.15(ve)-.15 G 2.696(\). If).15 F
+(the last)144 480 Q F2(ar)2.83 E(g)-.37 E F0 -.25(eva)2.72 G
+(luates to 0,).25 E F3(let)2.5 E F0(returns 1; 0 is returned otherwise.)
+2.5 E F3(local)108 496.8 Q F0([)2.5 E F2(option)A F0 2.5(][)C F2(name)
+-2.5 E F0([=)A F2(value)A F0 2.5(].)C(..])-2.5 E -.15(Fo)144 508.8 S
+2.56(re).15 G .06(ach ar)-2.56 F .06(gument, a local v)-.18 F .06
+(ariable named)-.25 F F2(name)2.92 E F0 .06(is created, and assigned)
+2.74 F F2(value)2.56 E F0 5.06(.T).18 G(he)-5.06 E F2(option)2.56 E F0
+.06(can be)2.56 F(an)144 520.8 Q 3.153(yo)-.15 G 3.153(ft)-3.153 G .653
+(he options accepted by)-3.153 F F3(declar)3.153 E(e)-.18 E F0 5.652(.W)
+C(hen)-5.652 E F3(local)3.152 E F0 .652
+(is used within a function, it causes the v)3.152 F(ari-)-.25 E(able)144
+532.8 Q F2(name)3.72 E F0 .86(to ha)3.54 F 1.16 -.15(ve a v)-.2 H .861
+(isible scope restricted to that function and its children.).15 F -.4
+(Wi)5.861 G .861(th no operands,).4 F F3(local)144 544.8 Q F0 1.165
+(writes a list of local v)3.665 F 1.165
+(ariables to the standard output.)-.25 F 1.165(It is an error to use)
+6.165 F F3(local)3.664 E F0 1.164(when not)3.664 F .232
+(within a function.)144 556.8 R .233(The return status is 0 unless)5.232
+F F3(local)2.733 E F0 .233(is used outside a function, an in)2.733 F
+-.25(va)-.4 G(lid).25 E F2(name)3.093 E F0(is)2.913 E(supplied, or)144
+568.8 Q F2(name)2.5 E F0(is a readonly v)2.5 E(ariable.)-.25 E F3
+(logout)108 585.6 Q F0(Exit a login shell.)9.33 E F3(map\214le)108 602.4
+Q F0([)2.5 E F3<ad6e>A F2(count)2.5 E F0 2.5(][)C F3<ad4f>-2.5 E F2
+(origin)2.5 E F0 2.5(][)C F3<ad73>-2.5 E F2(count)2.5 E F0 2.5(][)C F3
+<ad74>-2.5 E F0 2.5(][)C F3<ad75>-2.5 E F2(fd)2.5 E F0 2.5(][)C F3<ad43>
+-2.5 E F2(callbac)2.5 E(k)-.2 E F0 2.5(][)C F3<ad63>-2.5 E F2(quantum)
+2.5 E F0 2.5(][)C F2(arr)-2.5 E(ay)-.15 E F0(])A F3 -.18(re)108 614.4 S
+(adarray).18 E F0([)2.5 E F3<ad6e>A F2(count)2.5 E F0 2.5(][)C F3<ad4f>
+-2.5 E F2(origin)2.5 E F0 2.5(][)C F3<ad73>-2.5 E F2(count)2.5 E F0 2.5
+(][)C F3<ad74>-2.5 E F0 2.5(][)C F3<ad75>-2.5 E F2(fd)2.5 E F0 2.5(][)C
+F3<ad43>-2.5 E F2(callbac)2.5 E(k)-.2 E F0 2.5(][)C F3<ad63>-2.5 E F2
+(quantum)2.5 E F0 2.5(][)C F2(arr)-2.5 E(ay)-.15 E F0(])A .351
+(Read lines from the standard input into the inde)144 626.4 R -.15(xe)
+-.15 G 2.851(da).15 G .351(rray v)-2.851 F(ariable)-.25 E F2(arr)2.85 E
+(ay)-.15 E F0 2.85(,o).32 G 2.85(rf)-2.85 G .35(rom \214le descriptor)
+-2.85 F F2(fd)2.85 E F0 1.248(if the)144 638.4 R F3<ad75>3.748 E F0
+1.248(option is supplied.)3.748 F 1.249(The v)6.249 F(ariable)-.25 E F1
+(MAPFILE)3.749 E F0 1.249(is the def)3.499 F(ault)-.1 E F2(arr)3.749 E
+(ay)-.15 E F0 6.249(.O)C 1.249(ptions, if supplied,)-6.249 F(ha)144
+650.4 Q .3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F3<ad6e>
+144 662.4 Q F0(Cop)24.74 E 2.5(ya)-.1 G 2.5(tm)-2.5 G(ost)-2.5 E F2
+(count)2.7 E F0 2.5(lines. If)3.18 F F2(count)2.5 E F0
+(is 0, all lines are copied.)2.5 E F3<ad4f>144 674.4 Q F0(Be)22.52 E
+(gin assigning to)-.15 E F2(arr)2.83 E(ay)-.15 E F0(at inde)2.82 E(x)
+-.15 E F2(origin)2.5 E F0 5(.T).24 G(he def)-5 E(ault inde)-.1 E 2.5(xi)
+-.15 G 2.5(s0)-2.5 G(.)-2.5 E F3<ad73>144 686.4 Q F0
+(Discard the \214rst)26.41 E F2(count)2.5 E F0(lines read.)2.5 E F3
+<ad74>144 698.4 Q F0(Remo)26.97 E .3 -.15(ve a t)-.15 H(railing ne).15 E
+(wline from each line read.)-.25 E F3<ad75>144 710.4 Q F0
+(Read lines from \214le descriptor)24.74 E F2(fd)2.5 E F0
+(instead of the standard input.)2.5 E(GNU Bash-4.0)72 768 Q(2004 Apr 20)
+148.735 E(10)198.725 E 0 Cg EP
+%%Page: 11 11
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
+/Times-Bold@0 SF<ad43>144 84 Q F0(Ev)23.08 E(aluate)-.25 E/F2 10
+/Times-Italic@0 SF(callbac)2.7 E(k)-.2 E F0(each time)3.17 E F2(quantum)
+2.5 E F0(lines are read.)2.5 E(The)5 E F1<ad63>2.5 E F0
+(option speci\214es)2.5 E F2(quantum)2.5 E F0(.).32 E F1<ad63>144 96 Q
+F0(Specify the number of lines read between each call to)25.86 E F2
+(callbac)2.5 E(k)-.2 E F0(.).67 E(If)144 112.8 Q F1<ad43>2.968 E F0 .467
+(is speci\214ed without)2.967 F F1<ad63>2.967 E F0 2.967(,t)C .467
+(he def)-2.967 F .467(ault quantum is 5000.)-.1 F(When)5.467 E F2
+(callbac)2.967 E(k)-.2 E F0 .467(is e)2.967 F -.25(va)-.25 G .467
+(luated, it is sup-).25 F 1.22(plied the inde)144 124.8 R 3.72(xo)-.15 G
+3.72(ft)-3.72 G 1.22(he ne)-3.72 F 1.22
+(xt array element to be assigned as an additional ar)-.15 F(gument.)-.18
+E F2(callbac)6.22 E(k)-.2 E F0(is)3.72 E -.25(eva)144 136.8 S
+(luated after the line is read b).25 E
+(ut before the array element is assigned.)-.2 E
+(If not supplied with an e)144 153.6 Q(xplicit origin,)-.15 E F1
+(map\214le)2.5 E F0(will clear)2.5 E F2(arr)2.5 E(ay)-.15 E F0
+(before assigning to it.)2.5 E F1(map\214le)144 170.4 Q F0 1.906
+(returns successfully unless an in)4.406 F -.25(va)-.4 G 1.905
+(lid option or option ar).25 F 1.905(gument is supplied,)-.18 F F2(arr)
+4.405 E(ay)-.15 E F0(is)4.405 E(in)144 182.4 Q -.25(va)-.4 G
+(lid or unassignable, or if).25 E F2(arr)2.5 E(ay)-.15 E F0
+(is not an inde)2.5 E -.15(xe)-.15 G 2.5(da).15 G(rray)-2.5 E(.)-.65 E
+F1(popd)108 199.2 Q F0<5bad>2.5 E F1(n)A F0 2.5(][)C(+)-2.5 E F2(n)A F0
+2.5(][)C<ad>-2.5 E F2(n)A F0(])A(Remo)144 211.2 Q -.15(ve)-.15 G 2.799
+(se).15 G .299(ntries from the directory stack.)-2.799 F -.4(Wi)5.299 G
+.299(th no ar).4 F .299(guments, remo)-.18 F -.15(ve)-.15 G 2.799(st).15
+G .3(he top directory from the)-2.799 F 1.479(stack, and performs a)144
+223.2 R F1(cd)3.979 E F0 1.479(to the ne)3.979 F 3.979(wt)-.25 G 1.479
+(op directory)-3.979 F 6.479(.A)-.65 G -.18(rg)-6.479 G 1.478
+(uments, if supplied, ha).18 F 1.778 -.15(ve t)-.2 H 1.478(he follo).15
+F(wing)-.25 E(meanings:)144 235.2 Q F1<ad6e>144 247.2 Q F0 .551
+(Suppresses the normal change of directory when remo)24.74 F .551
+(ving directories from the stack, so)-.15 F
+(that only the stack is manipulated.)180 259.2 Q F1(+)144 271.2 Q F2(n)A
+F0(Remo)25.3 E -.15(ve)-.15 G 2.64(st).15 G(he)-2.64 E F2(n)2.64 E F0
+.14(th entry counting from the left of the list sho)B .14(wn by)-.25 F
+F1(dirs)2.64 E F0 2.64(,s)C .14(tarting with zero.)-2.64 F -.15(Fo)180
+283.2 S 2.5(re).15 G(xample:)-2.65 E/F3 10/Courier@0 SF(popd +0)2.5 E F0
+(remo)2.5 E -.15(ve)-.15 G 2.5(st).15 G(he \214rst directory)-2.5 E(,)
+-.65 E F3(popd +1)2.5 E F0(the second.)2.5 E F1<ad>144 295.2 Q F2(n)A F0
+(Remo)25.3 E -.15(ve)-.15 G 3.759(st).15 G(he)-3.759 E F2(n)3.759 E F0
+1.259(th entry counting from the right of the list sho)B 1.26(wn by)-.25
+F F1(dirs)3.76 E F0 3.76(,s)C 1.26(tarting with)-3.76 F 2.5(zero. F)180
+307.2 R(or e)-.15 E(xample:)-.15 E F3(popd -0)2.5 E F0(remo)2.5 E -.15
+(ve)-.15 G 2.5(st).15 G(he last directory)-2.5 E(,)-.65 E F3(popd -1)2.5
+E F0(the ne)2.5 E(xt to last.)-.15 E .644(If the)144 324 R F1(popd)3.144
+E F0 .644(command is successful, a)3.144 F F1(dirs)3.143 E F0 .643
+(is performed as well, and the return status is 0.)3.143 F F1(popd)5.643
+E F0 .415(returns f)144 336 R .415(alse if an in)-.1 F -.25(va)-.4 G
+.415(lid option is encountered, the directory stack is empty).25 F 2.916
+(,an)-.65 G(on-e)-2.916 E .416(xistent direc-)-.15 F
+(tory stack entry is speci\214ed, or the directory change f)144 348 Q
+(ails.)-.1 E F1(printf)108 364.8 Q F0([)2.5 E F1<ad76>A F2(var)2.5 E F0
+(])A F2(format)2.5 E F0([)2.5 E F2(ar)A(guments)-.37 E F0(])A .372
+(Write the formatted)144 376.8 R F2(ar)2.872 E(guments)-.37 E F0 .372
+(to the standard output under the control of the)2.872 F F2(format)2.872
+E F0 5.372(.T)C(he)-5.372 E F2(format)2.872 E F0 1.804(is a character s\
+tring which contains three types of objects: plain characters, which ar\
+e simply)144 388.8 R .159
+(copied to standard output, character escape sequences, which are con)
+144 400.8 R -.15(ve)-.4 G .158(rted and copied to the stan-).15 F .499(\
+dard output, and format speci\214cations, each of which causes printing\
+ of the ne)144 412.8 R .5(xt successi)-.15 F -.15(ve)-.25 G F2(ar)3.15 E
+(gu-)-.37 E(ment)144 424.8 Q F0 5.424(.I)C 2.924(na)-5.424 G .424
+(ddition to the standard)-2.924 F F2(printf)2.924 E F0 .424
+(\(1\) formats,)B F1(%b)2.924 E F0(causes)2.923 E F1(printf)2.923 E F0
+.423(to e)2.923 F .423(xpand backslash escape)-.15 F .976
+(sequences in the corresponding)144 436.8 R F2(ar)3.476 E(gument)-.37 E
+F0(\(e)3.476 E .976(xcept that)-.15 F F1(\\c)3.476 E F0 .976
+(terminates output, backslashes in)3.476 F F1<5c08>3.477 E F0(,)A F1
+(\\")3.477 E F0(,)A(and)144 448.8 Q F1(\\?)3.422 E F0 .922(are not remo)
+3.422 F -.15(ve)-.15 G .922(d, and octal escapes be).15 F .922
+(ginning with)-.15 F F1(\\0)3.422 E F0 .921
+(may contain up to four digits\), and)3.422 F F1(%q)144 460.8 Q F0
+(causes)3.63 E F1(printf)3.63 E F0 1.13(to output the corresponding)3.63
+F F2(ar)3.631 E(gument)-.37 E F0 1.131
+(in a format that can be reused as shell)3.631 F(input.)144 472.8 Q(The)
+144 496.8 Q F1<ad76>2.904 E F0 .404
+(option causes the output to be assigned to the v)2.904 F(ariable)-.25 E
+F2(var)2.904 E F0 .404(rather than being printed to the)2.904 F
+(standard output.)144 508.8 Q(The)144 532.8 Q F2(format)3.423 E F0 .923
+(is reused as necessary to consume all of the)3.423 F F2(ar)3.423 E
+(guments)-.37 E F0 5.923(.I)C 3.423(ft)-5.923 G(he)-3.423 E F2(format)
+3.423 E F0 .924(requires more)3.424 F F2(ar)144 544.8 Q(guments)-.37 E
+F0 .033(than are supplied, the e)2.534 F .033
+(xtra format speci\214cations beha)-.15 F .333 -.15(ve a)-.2 H 2.533(si)
+.15 G 2.533(faz)-2.533 G .033(ero v)-2.533 F .033(alue or null string,)
+-.25 F(as appropriate, had been supplied.)144 556.8 Q(The return v)5 E
+(alue is zero on success, non-zero on f)-.25 E(ailure.)-.1 E F1(pushd)
+108 573.6 Q F0([)2.5 E F1<ad6e>A F0 2.5(][)C(+)-2.5 E F2(n)A F0 2.5(][)C
+<ad>-2.5 E F2(n)A F0(])A F1(pushd)108 585.6 Q F0([)2.5 E F1<ad6e>A F0
+2.5(][)C F2(dir)-2.5 E F0(])A .639(Adds a directory to the top of the d\
+irectory stack, or rotates the stack, making the ne)144 597.6 R 3.14(wt)
+-.25 G .64(op of the)-3.14 F 1.316(stack the current w)144 609.6 R 1.316
+(orking directory)-.1 F 6.316(.W)-.65 G 1.315(ith no ar)-6.716 F 1.315
+(guments, e)-.18 F 1.315(xchanges the top tw)-.15 F 3.815(od)-.1 G 1.315
+(irectories and)-3.815 F .871
+(returns 0, unless the directory stack is empty)144 621.6 R 5.871(.A)
+-.65 G -.18(rg)-5.871 G .872(uments, if supplied, ha).18 F 1.172 -.15
+(ve t)-.2 H .872(he follo).15 F .872(wing mean-)-.25 F(ings:)144 633.6 Q
+F1<ad6e>144 645.6 Q F0 .902(Suppresses the normal change of directory w\
+hen adding directories to the stack, so that)24.74 F
+(only the stack is manipulated.)180 657.6 Q F1(+)144 669.6 Q F2(n)A F0
+1.267(Rotates the stack so that the)25.3 F F2(n)3.767 E F0 1.268
+(th directory \(counting from the left of the list sho)B 1.268(wn by)
+-.25 F F1(dirs)180 681.6 Q F0 2.5(,s)C
+(tarting with zero\) is at the top.)-2.5 E F1<ad>144 693.6 Q F2(n)A F0
+.92(Rotates the stack so that the)25.3 F F2(n)3.42 E F0 .92
+(th directory \(counting from the right of the list sho)B .92(wn by)-.25
+F F1(dirs)180 705.6 Q F0 2.5(,s)C(tarting with zero\) is at the top.)
+-2.5 E F2(dir)144.35 717.6 Q F0(Adds)23.98 E F2(dir)2.85 E F0
+(to the directory stack at the top, making it the ne)3.23 E 2.5(wc)-.25
+G(urrent w)-2.5 E(orking directory)-.1 E(.)-.65 E(GNU Bash-4.0)72 768 Q
+(2004 Apr 20)148.735 E(11)198.725 E 0 Cg EP
+%%Page: 12 12
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E .488(If the)
+144 84 R/F1 10/Times-Bold@0 SF(pushd)2.988 E F0 .488
+(command is successful, a)2.988 F F1(dirs)2.988 E F0 .488
+(is performed as well.)2.988 F .489(If the \214rst form is used,)5.488 F
+F1(pushd)2.989 E F0 1.04(returns 0 unless the cd to)144 96 R/F2 10
+/Times-Italic@0 SF(dir)3.89 E F0 -.1(fa)4.27 G 3.539(ils. W).1 F 1.039
+(ith the second form,)-.4 F F1(pushd)3.539 E F0 1.039
+(returns 0 unless the directory)3.539 F .846(stack is empty)144 108 R
+3.346(,an)-.65 G(on-e)-3.346 E .847(xistent directory stack element is \
+speci\214ed, or the directory change to the)-.15 F(speci\214ed ne)144
+120 Q 2.5(wc)-.25 G(urrent directory f)-2.5 E(ails.)-.1 E F1(pwd)108
+136.8 Q F0([)2.5 E F1(\255LP)A F0(])A .845
+(Print the absolute pathname of the current w)144 148.8 R .845
+(orking directory)-.1 F 5.844(.T)-.65 G .844
+(he pathname printed contains no)-5.844 F .181(symbolic links if the)144
+160.8 R F1<ad50>2.681 E F0 .181(option is supplied or the)2.681 F F1
+.181(\255o ph)2.681 F(ysical)-.15 E F0 .181(option to the)2.681 F F1
+(set)2.681 E F0 -.2(bu)2.681 G .182(iltin command is).2 F 3.264
+(enabled. If)144 172.8 R(the)3.264 E F1<ad4c>3.264 E F0 .763
+(option is used, the pathname printed may contain symbolic links.)3.264
+F .763(The return)5.763 F 1.36(status is 0 unless an error occurs while\
+ reading the name of the current directory or an in)144 184.8 R -.25(va)
+-.4 G(lid).25 E(option is supplied.)144 196.8 Q F1 -.18(re)108 213.6 S
+(ad).18 E F0([)3.817 E F1(\255ers)A F0 3.817(][)C F1<ad61>-3.817 E F2
+(aname)3.817 E F0 3.817(][)C F1<ad64>-3.817 E F2(delim)3.817 E F0 3.817
+(][)C F1<ad69>-3.817 E F2(te)3.817 E(xt)-.2 E F0 3.817(][)C F1<ad6e>
+-3.817 E F2(nc)3.816 E(har)-.15 E(s)-.1 E F0 3.816(][)C F1<ad4e>-3.816 E
+F2(nc)3.816 E(har)-.15 E(s)-.1 E F0 3.816(][)C F1<ad70>-3.816 E F2(pr)
+3.816 E(ompt)-.45 E F0 3.816(][)C F1<ad74>-3.816 E F2(timeout)3.816 E F0
+3.816(][)C F1<ad75>-3.816 E F2(fd)3.816 E F0(])A([)108 225.6 Q F2(name)A
+F0(...])2.5 E .516(One line is read from the standard input, or from th\
+e \214le descriptor)144 237.6 R F2(fd)3.016 E F0 .516(supplied as an ar)
+3.016 F .516(gument to)-.18 F(the)144 249.6 Q F1<ad75>2.538 E F0 .038
+(option, and the \214rst w)2.538 F .038(ord is assigned to the \214rst)
+-.1 F F2(name)2.539 E F0 2.539(,t).18 G .039(he second w)-2.539 F .039
+(ord to the second)-.1 F F2(name)2.539 E F0(,).18 E .42
+(and so on, with lefto)144 261.6 R -.15(ve)-.15 G 2.92(rw).15 G .42
+(ords and their interv)-3.02 F .42
+(ening separators assigned to the last)-.15 F F2(name)2.92 E F0 5.42(.I)
+.18 G 2.92(ft)-5.42 G(here)-2.92 E .54(are fe)144 273.6 R .54(wer w)-.25
+F .541(ords read from the input stream than names, the remaining names \
+are assigned empty)-.1 F -.25(va)144 285.6 S 2.511(lues. The).25 F .011
+(characters in)2.511 F/F3 9/Times-Bold@0 SF(IFS)2.511 E F0 .011
+(are used to split the line into w)2.261 F 2.511(ords. The)-.1 F .011
+(backslash character \()2.511 F F1(\\)A F0 2.51(\)m)C(ay)-2.51 E 1.89
+(be used to remo)144 297.6 R 2.19 -.15(ve a)-.15 H 2.19 -.15(ny s).15 H
+1.891(pecial meaning for the ne).15 F 1.891
+(xt character read and for line continuation.)-.15 F
+(Options, if supplied, ha)144 309.6 Q .3 -.15(ve t)-.2 H(he follo).15 E
+(wing meanings:)-.25 E F1<ad61>144 321.6 Q F2(aname)2.5 E F0 1.05(The w)
+180 333.6 R 1.049
+(ords are assigned to sequential indices of the array v)-.1 F(ariable)
+-.25 E F2(aname)3.549 E F0 3.549(,s).18 G 1.049(tarting at 0.)-3.549 F
+F2(aname)180.33 345.6 Q F0(is unset before an)2.68 E 2.5(yn)-.15 G .5
+-.25(ew va)-2.5 H(lues are assigned.).25 E(Other)5 E F2(name)2.5 E F0
+(ar)2.5 E(guments are ignored.)-.18 E F1<ad64>144 357.6 Q F2(delim)2.5 E
+F0(The \214rst character of)180 369.6 Q F2(delim)2.5 E F0
+(is used to terminate the input line, rather than ne)2.5 E(wline.)-.25 E
+F1<ad65>144 381.6 Q F0 .372
+(If the standard input is coming from a terminal,)25.86 F F1 -.18(re)
+2.873 G(adline).18 E F0(\(see)2.873 E F3(READLINE)2.873 E F0(abo)2.623 E
+-.15(ve)-.15 G 2.873(\)i).15 G 2.873(su)-2.873 G(sed)-2.873 E .218
+(to obtain the line.)180 393.6 R .218
+(Readline uses the current \(or def)5.218 F .218
+(ault, if line editing w)-.1 F .218(as not pre)-.1 F(viously)-.25 E
+(acti)180 405.6 Q -.15(ve)-.25 G 2.5(\)e).15 G(diting settings.)-2.5 E
+F1<ad69>144 417.6 Q F2(te)2.5 E(xt)-.2 E F0(If)10.78 E F1 -.18(re)2.715
+G(adline).18 E F0 .216(is being used to read the line,)2.715 F F2(te)
+2.716 E(xt)-.2 E F0 .216(is placed into the editing b)2.716 F(uf)-.2 E
+.216(fer before edit-)-.25 F(ing be)180 429.6 Q(gins.)-.15 E F1<ad6e>144
+441.6 Q F2(nc)2.5 E(har)-.15 E(s)-.1 E F1 -.18(re)180 453.6 S(ad).18 E
+F0 1.395(returns after reading)3.895 F F2(nc)3.895 E(har)-.15 E(s)-.1 E
+F0 1.395(characters rather than w)3.895 F 1.394
+(aiting for a complete line of)-.1 F(input, b)180 465.6 Q
+(ut honor a delimiter if fe)-.2 E(wer than)-.25 E F2(nc)2.5 E(har)-.15 E
+(s)-.1 E F0(characters are read before the delimiter)2.5 E(.)-.55 E F1
+<ad4e>144 477.6 Q F2(nc)2.5 E(har)-.15 E(s)-.1 E F1 -.18(re)180 489.6 S
+(ad).18 E F0 1.269(returns after reading e)3.769 F(xactly)-.15 E F2(nc)
+3.769 E(har)-.15 E(s)-.1 E F0 1.269(characters rather than w)3.769 F
+1.27(aiting for a complete)-.1 F .275
+(line of input, unless EOF is encountered or)180 501.6 R F1 -.18(re)
+2.775 G(ad).18 E F0 .274(times out.)2.774 F .274
+(Delimiter characters encoun-)5.274 F 1.002
+(tered in the input are not treated specially and do not cause)180 513.6
+R F1 -.18(re)3.503 G(ad).18 E F0 1.003(to return until)3.503 F F2(nc)
+3.503 E(har)-.15 E(s)-.1 E F0(characters are read.)180 525.6 Q F1<ad70>
+144 537.6 Q F2(pr)2.5 E(ompt)-.45 E F0(Display)180 549.6 Q F2(pr)3.661 E
+(ompt)-.45 E F0 1.161(on standard error)3.661 F 3.661(,w)-.4 G 1.161
+(ithout a trailing ne)-3.661 F 1.161(wline, before attempting to read)
+-.25 F(an)180 561.6 Q 2.5(yi)-.15 G 2.5(nput. The)-2.5 F
+(prompt is displayed only if input is coming from a terminal.)2.5 E F1
+<ad72>144 573.6 Q F0 .543(Backslash does not act as an escape character)
+25.86 F 5.543(.T)-.55 G .544(he backslash is considered to be part of)
+-5.543 F(the line.)180 585.6 Q(In particular)5 E 2.5(,ab)-.4 G
+(ackslash-ne)-2.5 E(wline pair may not be used as a line continuation.)
+-.25 E F1<ad73>144 597.6 Q F0(Silent mode.)26.41 E
+(If input is coming from a terminal, characters are not echoed.)5 E F1
+<ad74>144 609.6 Q F2(timeout)2.5 E F0(Cause)180 621.6 Q F1 -.18(re)3.549
+G(ad).18 E F0 1.048(to time out and return f)3.549 F 1.048
+(ailure if a complete line of input is not read within)-.1 F F2(timeout)
+180 633.6 Q F0(seconds.)3.496 E F2(timeout)5.996 E F0 .997
+(may be a decimal number with a fractional portion follo)3.496 F(wing)
+-.25 E .576(the decimal point.)180 645.6 R .576(This option is only ef)
+5.576 F(fecti)-.25 E .876 -.15(ve i)-.25 H(f).15 E F1 -.18(re)3.076 G
+(ad).18 E F0 .576(is reading input from a terminal,)3.076 F .141
+(pipe, or other special \214le; it has no ef)180 657.6 R .142
+(fect when reading from re)-.25 F .142(gular \214les.)-.15 F(If)5.142 E
+F2(timeout)2.642 E F0 .142(is 0,)2.642 F F1 -.18(re)180 669.6 S(ad).18 E
+F0 .113(returns success if input is a)2.614 F -.25(va)-.2 G .113
+(ilable on the speci\214ed \214le descriptor).25 F 2.613(,f)-.4 G .113
+(ailure otherwise.)-2.713 F(The e)180 681.6 Q
+(xit status is greater than 128 if the timeout is e)-.15 E(xceeded.)-.15
+E F1<ad75>144 693.6 Q F2(fd)2.5 E F0(Read input from \214le descriptor)
+14.46 E F2(fd)2.5 E F0(.)A .191(If no)144 710.4 R F2(names)3.051 E F0
+.191(are supplied, the line read is assigned to the v)2.961 F(ariable)
+-.25 E F3(REPL)2.692 E(Y)-.828 E/F4 9/Times-Roman@0 SF(.)A F0 .192
+(The return code is zero,)4.692 F 1.344
+(unless end-of-\214le is encountered,)144 722.4 R F1 -.18(re)3.844 G(ad)
+.18 E F0 1.343
+(times out \(in which case the return code is greater than)3.844 F
+(GNU Bash-4.0)72 768 Q(2004 Apr 20)148.735 E(12)198.725 E 0 Cg EP
+%%Page: 13 13
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E
+(128\), or an in)144 84 Q -.25(va)-.4 G
+(lid \214le descriptor is supplied as the ar).25 E(gument to)-.18 E/F1
+10/Times-Bold@0 SF<ad75>2.5 E F0(.)A F1 -.18(re)108 100.8 S(adonly).18 E
+F0([)2.5 E F1(\255aA)A(pf)-.25 E F0 2.5(][)C/F2 10/Times-Italic@0 SF
+(name)-2.5 E F0([=)A F2(wor)A(d)-.37 E F0 2.5(].)C(..])-2.5 E .77
+(The gi)144 112.8 R -.15(ve)-.25 G(n).15 E F2(names)3.27 E F0 .77
+(are mark)3.27 F .77(ed readonly; the v)-.1 F .77(alues of these)-.25 F
+F2(names)3.63 E F0 .77(may not be changed by subse-)3.54 F 1.097
+(quent assignment.)144 124.8 R 1.097(If the)6.097 F F1<ad66>3.597 E F0
+1.097(option is supplied, the functions corresponding to the)3.597 F F2
+(names)3.596 E F0 1.096(are so)3.596 F(mark)144 136.8 Q 3.334(ed. The)
+-.1 F F1<ad61>3.334 E F0 .834(option restricts the v)3.334 F .834
+(ariables to inde)-.25 F -.15(xe)-.15 G 3.334(da).15 G .834(rrays; the)
+-3.334 F F1<ad41>3.334 E F0 .834(option restricts the v)3.334 F(ari-)
+-.25 E .538(ables to associati)144 148.8 R .838 -.15(ve a)-.25 H 3.038
+(rrays. If).15 F(no)3.038 E F2(name)3.398 E F0(ar)3.218 E .538
+(guments are gi)-.18 F -.15(ve)-.25 G .538(n, or if the).15 F F1<ad70>
+3.038 E F0 .537(option is supplied, a list)3.038 F .08
+(of all readonly names is printed.)144 160.8 R(The)5.08 E F1<ad70>2.58 E
+F0 .081(option causes output to be displayed in a format that may)2.58 F
+1.177(be reused as input.)144 172.8 R 1.177(If a v)6.177 F 1.176
+(ariable name is follo)-.25 F 1.176(wed by =)-.25 F F2(wor)A(d)-.37 E F0
+3.676(,t)C 1.176(he v)-3.676 F 1.176(alue of the v)-.25 F 1.176
+(ariable is set to)-.25 F F2(wor)144 184.8 Q(d)-.37 E F0 6.205(.T)C
+1.205(he return status is 0 unless an in)-6.205 F -.25(va)-.4 G 1.206
+(lid option is encountered, one of the).25 F F2(names)4.066 E F0 1.206
+(is not a)3.976 F -.25(va)144 196.8 S(lid shell v).25 E
+(ariable name, or)-.25 E F1<ad66>2.5 E F0(is supplied with a)2.5 E F2
+(name)2.86 E F0(that is not a function.)2.68 E F1 -.18(re)108 213.6 S
+(tur).18 E(n)-.15 E F0([)2.5 E F2(n)A F0(])A .587
+(Causes a function to e)144 225.6 R .587(xit with the return v)-.15 F
+.587(alue speci\214ed by)-.25 F F2(n)3.087 E F0 5.587(.I).24 G(f)-5.587
+E F2(n)3.447 E F0 .586(is omitted, the return status is)3.327 F 1.335
+(that of the last command e)144 237.6 R -.15(xe)-.15 G 1.335
+(cuted in the function body).15 F 6.335(.I)-.65 G 3.835(fu)-6.335 G
+1.335(sed outside a function, b)-3.835 F 1.335(ut during)-.2 F -.15(exe)
+144 249.6 S .794(cution of a script by the).15 F F1(.)3.294 E F0(\()
+5.794 E F1(sour)A(ce)-.18 E F0 3.294(\)c)C .794
+(ommand, it causes the shell to stop e)-3.294 F -.15(xe)-.15 G .794
+(cuting that script).15 F .245(and return either)144 261.6 R F2(n)3.105
+E F0 .246(or the e)2.985 F .246(xit status of the last command e)-.15 F
+-.15(xe)-.15 G .246(cuted within the script as the e).15 F .246
+(xit sta-)-.15 F .082(tus of the script.)144 273.6 R .082
+(If used outside a function and not during e)5.082 F -.15(xe)-.15 G .082
+(cution of a script by).15 F F1(.)2.582 E F0 2.581(,t).833 G .081
+(he return sta-)-2.581 F 2.305(tus is f)144 285.6 R 4.805(alse. An)-.1 F
+4.805(yc)-.15 G 2.305(ommand associated with the)-4.805 F F1(RETURN)
+4.805 E F0 2.306(trap is e)4.806 F -.15(xe)-.15 G 2.306(cuted before e)
+.15 F -.15(xe)-.15 G(cution).15 E(resumes after the function or script.)
+144 297.6 Q F1(set)108 314.4 Q F0([)2.5 E F1
+(\255\255abefhkmnptuvxBCEHPT)A F0 2.5(][)C F1<ad6f>-2.5 E F2(option)2.5
+E F0 2.5(][)C F2(ar)-2.5 E(g)-.37 E F0(...])2.5 E F1(set)108 326.4 Q F0
+([)2.5 E F1(+abefhkmnptuvxBCEHPT)A F0 2.5(][)C F1(+o)-2.5 E F2(option)
+2.5 E F0 2.5(][)C F2(ar)-2.5 E(g)-.37 E F0(...])2.5 E -.4(Wi)144 338.4 S
+.836(thout options, the name and v).4 F .835(alue of each shell v)-.25 F
+.835(ariable are displayed in a format that can be)-.25 F .784
+(reused as input for setting or resetting the currently-set v)144 350.4
+R 3.284(ariables. Read-only)-.25 F -.25(va)3.284 G .784
+(riables cannot be).25 F 2.947(reset. In)144 362.4 R F2 .447(posix mode)
+2.947 F F0 2.947(,o)C .447(nly shell v)-2.947 F .447
+(ariables are listed.)-.25 F .447
+(The output is sorted according to the current)5.447 F 3.53
+(locale. When)144 374.4 R 1.031(options are speci\214ed, the)3.53 F
+3.531(ys)-.15 G 1.031(et or unset shell attrib)-3.531 F 3.531(utes. An)
+-.2 F 3.531(ya)-.15 G -.18(rg)-3.531 G 1.031(uments remaining).18 F
+1.624(after option processing are treated as v)144 386.4 R 1.623
+(alues for the positional parameters and are assigned, in)-.25 F(order)
+144 398.4 Q 2.5(,t)-.4 G(o)-2.5 E F1($1)2.5 E F0(,)A F1($2)2.5 E F0(,)A
+F1 2.5(... $)2.5 F F2(n)A F0 5(.O)C(ptions, if speci\214ed, ha)-5 E .3
+-.15(ve t)-.2 H(he follo).15 E(wing meanings:)-.25 E F1<ad61>144 410.4 Q
+F0 .539(Automatically mark v)29.3 F .539
+(ariables and functions which are modi\214ed or created for e)-.25 F .54
+(xport to)-.15 F(the en)184 422.4 Q(vironment of subsequent commands.)
+-.4 E F1<ad62>144 434.4 Q F0 .132
+(Report the status of terminated background jobs immediately)28.74 F
+2.632(,r)-.65 G .131(ather than before the ne)-2.632 F(xt)-.15 E
+(primary prompt.)184 446.4 Q(This is ef)5 E(fecti)-.25 E .3 -.15(ve o)
+-.25 H(nly when job control is enabled.).15 E F1<ad65>144 458.4 Q F0 .51
+(Exit immediately if a)29.86 F F2(pipeline)3.01 E F0 .511
+(\(which may consist of a single)3.011 F F2 .511(simple command)3.011 F
+F0 3.011(\), a)B F2(sub-)3.011 E(shell)184 470.4 Q F0 .872
+(command enclosed in parentheses, or one of the commands e)3.373 F -.15
+(xe)-.15 G .872(cuted as part of a).15 F .399
+(command list enclosed by braces \(see)184 482.4 R/F3 9/Times-Bold@0 SF
+.399(SHELL GRAMMAR)2.899 F F0(abo)2.649 E -.15(ve)-.15 G 2.899(\)e).15 G
+.399(xits with a non-zero)-3.049 F 3.969(status. The)184 494.4 R 1.468
+(shell does not e)3.969 F 1.468(xit if the command that f)-.15 F 1.468
+(ails is part of the command list)-.1 F .569(immediately follo)184 506.4
+R .569(wing a)-.25 F F1(while)3.069 E F0(or)3.069 E F1(until)3.069 E F0
+-.1(ke)3.069 G(yw)-.05 E .569(ord, part of the test follo)-.1 F .57
+(wing the)-.25 F F1(if)3.07 E F0(or)3.07 E F1(elif)3.07 E F0(reserv)184
+518.4 Q .544(ed w)-.15 F .544(ords, part of an)-.1 F 3.044(yc)-.15 G
+.544(ommand e)-3.044 F -.15(xe)-.15 G .544(cuted in a).15 F F1(&&)3.044
+E F0(or)3.044 E/F4 10/Symbol SF<efef>3.044 E F0 .544(list e)3.044 F .544
+(xcept the command)-.15 F(follo)184 530.4 Q 1.23(wing the \214nal)-.25 F
+F1(&&)3.73 E F0(or)3.73 E F4<efef>3.73 E F0 3.73(,a)C 1.53 -.15(ny c)
+-3.73 H 1.231(ommand in a pipeline b).15 F 1.231
+(ut the last, or if the com-)-.2 F(mand')184 542.4 Q 3.191(sr)-.55 G
+.691(eturn v)-3.191 F .691(alue is being in)-.25 F -.15(ve)-.4 G .691
+(rted with).15 F F1(!)3.191 E F0 5.691(.A)C .691(trap on)-2.5 F F1(ERR)
+3.19 E F0 3.19(,i)C 3.19(fs)-3.19 G .69(et, is e)-3.19 F -.15(xe)-.15 G
+.69(cuted before).15 F .686(the shell e)184 554.4 R 3.186(xits. This)
+-.15 F .686(option applies to the shell en)3.186 F .686
+(vironment and each subshell en)-.4 F(viron-)-.4 E .068
+(ment separately \(see)184 566.4 R F3 .068(COMMAND EXECUTION ENVIR)2.568
+F(ONMENT)-.27 E F0(abo)2.318 E -.15(ve)-.15 G .068(\), and may cause).15
+F(subshells to e)184 578.4 Q(xit before e)-.15 E -.15(xe)-.15 G
+(cuting all the commands in the subshell.).15 E F1<ad66>144 590.4 Q F0
+(Disable pathname e)30.97 E(xpansion.)-.15 E F1<ad68>144 602.4 Q F0
+2.238(Remember the location of commands as the)28.74 F 4.738(ya)-.15 G
+2.239(re look)-4.738 F 2.239(ed up for e)-.1 F -.15(xe)-.15 G 4.739
+(cution. This).15 F(is)4.739 E(enabled by def)184 614.4 Q(ault.)-.1 E F1
+<ad6b>144 626.4 Q F0 .514(All ar)28.74 F .514
+(guments in the form of assignment statements are placed in the en)-.18
+F .513(vironment for a)-.4 F
+(command, not just those that precede the command name.)184 638.4 Q F1
+<ad6d>144 650.4 Q F0 .148(Monitor mode.)25.97 F .148
+(Job control is enabled.)5.148 F .149(This option is on by def)5.148 F
+.149(ault for interacti)-.1 F .449 -.15(ve s)-.25 H(hells).15 E .637
+(on systems that support it \(see)184 662.4 R F3 .636(JOB CONTR)3.136 F
+(OL)-.27 E F0(abo)2.886 E -.15(ve)-.15 G 3.136(\). Background).15 F .636
+(processes run in a)3.136 F .641
+(separate process group and a line containing their e)184 674.4 R .642
+(xit status is printed upon their com-)-.15 F(pletion.)184 686.4 Q F1
+<ad6e>144 698.4 Q F0 .653(Read commands b)28.74 F .653(ut do not e)-.2 F
+-.15(xe)-.15 G .653(cute them.).15 F .652
+(This may be used to check a shell script for)5.653 F(syntax errors.)184
+710.4 Q(This is ignored by interacti)5 E .3 -.15(ve s)-.25 H(hells.).15
+E(GNU Bash-4.0)72 768 Q(2004 Apr 20)148.735 E(13)198.725 E 0 Cg EP
+%%Page: 14 14
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
+/Times-Bold@0 SF<ad6f>144 84 Q/F2 10/Times-Italic@0 SF(option\255name)
+2.5 E F0(The)184 96 Q F2(option\255name)2.5 E F0
+(can be one of the follo)2.5 E(wing:)-.25 E F1(allexport)184 108 Q F0
+(Same as)224 120 Q F1<ad61>2.5 E F0(.)A F1(braceexpand)184 132 Q F0
+(Same as)224 144 Q F1<ad42>2.5 E F0(.)A F1(emacs)184 156 Q F0 .089
+(Use an emacs-style command line editing interf)13.9 F 2.589(ace. This)
+-.1 F .089(is enabled by def)2.589 F(ault)-.1 E .95
+(when the shell is interacti)224 168 R -.15(ve)-.25 G 3.45(,u).15 G .95
+(nless the shell is started with the)-3.45 F F1(\255\255noediting)3.45 E
+F0 2.5(option. This)224 180 R(also af)2.5 E(fects the editing interf)
+-.25 E(ace used for)-.1 E F1 -.18(re)2.5 G(ad \255e).18 E F0(.)A F1(err)
+184 192 Q(exit)-.18 E F0(Same as)11.31 E F1<ad65>2.5 E F0(.)A F1
+(errtrace)184 204 Q F0(Same as)5.03 E F1<ad45>2.5 E F0(.)A F1(functrace)
+184 216 Q F0(Same as)224 228 Q F1<ad54>2.5 E F0(.)A F1(hashall)184 240 Q
+F0(Same as)9.43 E F1<ad68>2.5 E F0(.)A F1(histexpand)184 252 Q F0
+(Same as)224 264 Q F1<ad48>2.5 E F0(.)A F1(history)184 276 Q F0 .586
+(Enable command history)10 F 3.087(,a)-.65 G 3.087(sd)-3.087 G .587
+(escribed abo)-3.087 F .887 -.15(ve u)-.15 H(nder).15 E/F3 9
+/Times-Bold@0 SF(HIST)3.087 E(OR)-.162 E(Y)-.315 E/F4 9/Times-Roman@0 SF
+(.)A F0 .587(This option is)5.087 F(on by def)224 288 Q
+(ault in interacti)-.1 E .3 -.15(ve s)-.25 H(hells.).15 E F1(ignor)184
+300 Q(eeof)-.18 E F0 1.657(The ef)224 312 R 1.657
+(fect is as if the shell command)-.25 F/F5 10/Courier@0 SF(IGNOREEOF=10)
+4.156 E F0 1.656(had been e)4.156 F -.15(xe)-.15 G(cuted).15 E(\(see)224
+324 Q F1(Shell V)2.5 E(ariables)-.92 E F0(abo)2.5 E -.15(ve)-.15 G(\).)
+.15 E F1 -.1(ke)184 336 S(yw).1 E(ord)-.1 E F0(Same as)224 348 Q F1
+<ad6b>2.5 E F0(.)A F1(monitor)184 360 Q F0(Same as)5.56 E F1<ad6d>2.5 E
+F0(.)A F1(noclob)184 372 Q(ber)-.1 E F0(Same as)224 384 Q F1<ad43>2.5 E
+F0(.)A F1(noexec)184 396 Q F0(Same as)11.12 E F1<ad6e>2.5 E F0(.)A F1
+(noglob)184 408 Q F0(Same as)11.1 E F1<ad66>2.5 E F0(.)A F1(nolog)184
+420 Q F0(Currently ignored.)16.66 E F1(notify)184 432 Q F0(Same as)15 E
+F1<ad62>2.5 E F0(.)A F1(nounset)184 444 Q F0(Same as)6.66 E F1<ad75>2.5
+E F0(.)A F1(onecmd)184 456 Q F0(Same as)6.67 E F1<ad74>2.5 E F0(.)A F1
+(ph)184 468 Q(ysical)-.15 E F0(Same as)5.14 E F1<ad50>2.5 E F0(.)A F1
+(pipefail)184 480 Q F0 1.029(If set, the return v)7.77 F 1.029
+(alue of a pipeline is the v)-.25 F 1.03
+(alue of the last \(rightmost\) com-)-.25 F 1.137(mand to e)224 492 R
+1.136
+(xit with a non-zero status, or zero if all commands in the pipeline)
+-.15 F -.15(ex)224 504 S(it successfully).15 E 5(.T)-.65 G
+(his option is disabled by def)-5 E(ault.)-.1 E F1(posix)184 516 Q F0
+2.09(Change the beha)17.77 F 2.091(vior of)-.2 F F1(bash)4.591 E F0
+2.091(where the def)4.591 F 2.091(ault operation dif)-.1 F 2.091
+(fers from the)-.25 F(POSIX standard to match the standard \()224 528 Q
+F2(posix mode)A F0(\).)A F1(pri)184 540 Q(vileged)-.1 E F0(Same as)224
+552 Q F1<ad70>2.5 E F0(.)A F1 -.1(ve)184 564 S(rbose).1 E F0(Same as)
+7.33 E F1<ad76>2.5 E F0(.)A F1(vi)184 576 Q F0 1.466
+(Use a vi-style command line editing interf)32.22 F 3.965(ace. This)-.1
+F 1.465(also af)3.965 F 1.465(fects the editing)-.25 F(interf)224 588 Q
+(ace used for)-.1 E F1 -.18(re)2.5 G(ad \255e).18 E F0(.)A F1(xtrace)184
+600 Q F0(Same as)13.35 E F1<ad78>2.5 E F0(.)A(If)184 618 Q F1<ad6f>3.052
+E F0 .552(is supplied with no)3.052 F F2(option\255name)3.053 E F0 3.053
+(,t)C .553(he v)-3.053 F .553(alues of the current options are printed.)
+-.25 F(If)5.553 E F1(+o)184 630 Q F0 1.072(is supplied with no)3.572 F
+F2(option\255name)3.572 E F0 3.572(,a)C 1.071(series of)-.001 F F1(set)
+3.571 E F0 1.071(commands to recreate the current)3.571 F
+(option settings is displayed on the standard output.)184 642 Q F1<ad70>
+144 654 Q F0 -.45(Tu)28.74 G 1.071(rn on).45 F F2(privile)4.821 E -.1
+(ge)-.4 G(d).1 E F0 3.572(mode. In)4.341 F 1.072(this mode, the)3.572 F
+F3($ENV)3.572 E F0(and)3.322 E F3($B)3.572 E(ASH_ENV)-.27 E F0 1.072
+(\214les are not pro-)3.322 F 1.501
+(cessed, shell functions are not inherited from the en)184 666 R 1.5
+(vironment, and the)-.4 F F3(SHELLOPTS)4 E F4(,)A F3 -.27(BA)184 678 S
+(SHOPTS).27 E F4(,)A F3(CDP)2.774 E -.855(AT)-.666 G(H).855 E F4(,)A F0
+(and)2.774 E F3(GLOBIGNORE)3.024 E F0 -.25(va)2.774 G .524
+(riables, if the).25 F 3.025(ya)-.15 G .525(ppear in the en)-3.025 F
+(vironment,)-.4 E .38(are ignored.)184 690 R .38
+(If the shell is started with the ef)5.38 F(fecti)-.25 E .679 -.15(ve u)
+-.25 H .379(ser \(group\) id not equal to the real).15 F .461
+(user \(group\) id, and the)184 702 R F1<ad70>2.961 E F0 .461
+(option is not supplied, these actions are tak)2.961 F .462
+(en and the ef)-.1 F(fec-)-.25 E(ti)184 714 Q .695 -.15(ve u)-.25 H .395
+(ser id is set to the real user id.).15 F .395(If the)5.395 F F1<ad70>
+2.895 E F0 .394(option is supplied at startup, the ef)2.895 F(fecti)-.25
+E -.15(ve)-.25 G .386(user id is not reset.)184 726 R -.45(Tu)5.386 G
+.386(rning this option of).45 F 2.886(fc)-.25 G .387(auses the ef)-2.886
+F(fecti)-.25 E .687 -.15(ve u)-.25 H .387(ser and group ids to be).15 F
+(GNU Bash-4.0)72 768 Q(2004 Apr 20)148.735 E(14)198.725 E 0 Cg EP
+%%Page: 15 15
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E
+(set to the real user and group ids.)184 84 Q/F1 10/Times-Bold@0 SF
+<ad74>144 96 Q F0(Exit after reading and e)30.97 E -.15(xe)-.15 G
+(cuting one command.).15 E F1<ad75>144 108 Q F0 -.35(Tr)28.74 G .044
+(eat unset v).35 F .044(ariables and parameters other than the special \
+parameters "@" and "*" as an)-.25 F .182
+(error when performing parameter e)184 120 R 2.682(xpansion. If)-.15 F
+-.15(ex)2.682 G .183(pansion is attempted on an unset v).15 F(ari-)-.25
+E .746(able or parameter)184 132 R 3.246(,t)-.4 G .746
+(he shell prints an error message, and, if not interacti)-3.246 F -.15
+(ve)-.25 G 3.246(,e).15 G .746(xits with a)-3.396 F(non-zero status.)184
+144 Q F1<ad76>144 156 Q F0(Print shell input lines as the)29.3 E 2.5(ya)
+-.15 G(re read.)-2.5 E F1<ad78>144 168 Q F0 .315(After e)29.3 F .315
+(xpanding each)-.15 F/F2 10/Times-Italic@0 SF .315(simple command)2.815
+F F0(,)A F1 -.25(fo)2.815 G(r).25 E F0(command,)2.815 E F1(case)2.815 E
+F0(command,)2.815 E F1(select)2.815 E F0(command,)2.815 E 1.236
+(or arithmetic)184 180 R F1 -.25(fo)3.736 G(r).25 E F0 1.236
+(command, display the e)3.736 F 1.236(xpanded v)-.15 F 1.236(alue of)
+-.25 F/F3 9/Times-Bold@0 SF(PS4)3.736 E/F4 9/Times-Roman@0 SF(,)A F0
+(follo)3.486 E 1.236(wed by the com-)-.25 F(mand and its e)184 192 Q
+(xpanded ar)-.15 E(guments or associated w)-.18 E(ord list.)-.1 E F1
+<ad42>144 204 Q F0 2.578(The shell performs brace e)27.63 F 2.578
+(xpansion \(see)-.15 F F1 2.578(Brace Expansion)5.078 F F0(abo)5.078 E
+-.15(ve)-.15 G 5.079(\). This).15 F 2.579(is on by)5.079 F(def)184 216 Q
+(ault.)-.1 E F1<ad43>144 228 Q F0 .214(If set,)27.08 F F1(bash)2.714 E
+F0 .214(does not o)2.714 F -.15(ve)-.15 G .214(rwrite an e).15 F .214
+(xisting \214le with the)-.15 F F1(>)2.714 E F0(,)A F1(>&)2.714 E F0
+2.713(,a)C(nd)-2.713 E F1(<>)2.713 E F0 .213(redirection opera-)2.713 F
+3.053(tors. This)184 240 R .553(may be o)3.053 F -.15(ve)-.15 G .553
+(rridden when creating output \214les by using the redirection opera-)
+.15 F(tor)184 252 Q F1(>|)2.5 E F0(instead of)2.5 E F1(>)2.5 E F0(.)A F1
+<ad45>144 264 Q F0 .104(If set, an)27.63 F 2.604(yt)-.15 G .104(rap on)
+-2.604 F F1(ERR)2.604 E F0 .103
+(is inherited by shell functions, command substitutions, and com-)2.604
+F .838(mands e)184 276 R -.15(xe)-.15 G .838(cuted in a subshell en).15
+F 3.338(vironment. The)-.4 F F1(ERR)3.338 E F0 .839
+(trap is normally not inherited in)3.339 F(such cases.)184 288 Q F1
+<ad48>144 300 Q F0(Enable)26.52 E F1(!)3.032 E F0 .532
+(style history substitution.)5.532 F .531(This option is on by def)5.532
+F .531(ault when the shell is inter)-.1 F(-)-.2 E(acti)184 312 Q -.15
+(ve)-.25 G(.).15 E F1<ad50>144 324 Q F0 1.164
+(If set, the shell does not follo)28.19 F 3.664(ws)-.25 G 1.164
+(ymbolic links when e)-3.664 F -.15(xe)-.15 G 1.165
+(cuting commands such as).15 F F1(cd)3.665 E F0 2.822
+(that change the current w)184 336 R 2.822(orking directory)-.1 F 7.822
+(.I)-.65 G 5.322(tu)-7.822 G 2.822(ses the ph)-5.322 F 2.821
+(ysical directory structure)-.05 F 2.685(instead. By)184 348 R(def)2.685
+E(ault,)-.1 E F1(bash)2.686 E F0(follo)2.686 E .186
+(ws the logical chain of directories when performing com-)-.25 F
+(mands which change the current directory)184 360 Q(.)-.65 E F1<ad54>144
+372 Q F0 .89(If set, an)27.63 F 3.39(yt)-.15 G .89(raps on)-3.39 F F1
+(DEB)3.39 E(UG)-.1 E F0(and)3.39 E F1(RETURN)3.39 E F0 .89
+(are inherited by shell functions, command)3.39 F 1.932
+(substitutions, and commands e)184 384 R -.15(xe)-.15 G 1.932
+(cuted in a subshell en).15 F 4.432(vironment. The)-.4 F F1(DEB)4.432 E
+(UG)-.1 E F0(and)4.432 E F1(RETURN)184 396 Q F0
+(traps are normally not inherited in such cases.)2.5 E F1<adad>144 408 Q
+F0 .401(If no ar)28.6 F .401(guments follo)-.18 F 2.901(wt)-.25 G .401
+(his option, then the positional parameters are unset.)-2.901 F
+(Otherwise,)5.4 E(the positional parameters are set to the)184 420 Q F2
+(ar)2.5 E(g)-.37 E F0(s, e)A -.15(ve)-.25 G 2.5(ni).15 G 2.5(fs)-2.5 G
+(ome of them be)-2.5 E(gin with a)-.15 E F1<ad>2.5 E F0(.)A F1<ad>144
+432 Q F0 1.944(Signal the end of options, cause all remaining)34.3 F F2
+(ar)4.444 E(g)-.37 E F0 4.444(st)C 4.444(ob)-4.444 G 4.445(ea)-4.444 G
+1.945(ssigned to the positional)-4.445 F 3.446(parameters. The)184 444 R
+F1<ad78>3.446 E F0(and)3.446 E F1<ad76>3.446 E F0 .945
+(options are turned of)3.446 F 3.445(f. If)-.25 F .945(there are no)
+3.445 F F2(ar)3.445 E(g)-.37 E F0 .945(s, the positional)B
+(parameters remain unchanged.)184 456 Q .425(The options are of)144
+472.8 R 2.925(fb)-.25 G 2.925(yd)-2.925 G(ef)-2.925 E .425
+(ault unless otherwise noted.)-.1 F .425
+(Using + rather than \255 causes these options)5.425 F .178
+(to be turned of)144 484.8 R 2.678(f. The)-.25 F .178
+(options can also be speci\214ed as ar)2.678 F .178(guments to an in)
+-.18 F -.2(vo)-.4 G .177(cation of the shell.).2 F(The)5.177 E .066
+(current set of options may be found in)144 496.8 R F1<24ad>2.566 E F0
+5.066(.T)C .066(he return status is al)-5.066 F -.1(wa)-.1 G .066
+(ys true unless an in).1 F -.25(va)-.4 G .067(lid option).25 F
+(is encountered.)144 508.8 Q F1(shift)108 525.6 Q F0([)2.5 E F2(n)A F0
+(])A .429(The positional parameters from)144 537.6 R F2(n)2.929 E F0
+.429(+1 ... are renamed to)B F1 .429($1 ....)2.929 F F0 -.15(Pa)5.428 G
+.428(rameters represented by the num-).15 F(bers)144 549.6 Q F1($#)2.582
+E F0(do)2.582 E .082(wn to)-.25 F F1($#)2.582 E F0<ad>A F2(n)A F0 .082
+(+1 are unset.)B F2(n)5.442 E F0 .082(must be a non-ne)2.822 F -.05(ga)
+-.15 G(ti).05 E .383 -.15(ve n)-.25 H .083(umber less than or equal to)
+.15 F F1($#)2.583 E F0 5.083(.I)C(f)-5.083 E F2(n)2.943 E F0 .06
+(is 0, no parameters are changed.)144 561.6 R(If)5.06 E F2(n)2.92 E F0
+.06(is not gi)2.8 F -.15(ve)-.25 G .06(n, it is assumed to be 1.).15 F
+(If)5.06 E F2(n)2.92 E F0 .06(is greater than)2.8 F F1($#)2.56 E F0 2.56
+(,t)C(he)-2.56 E .143(positional parameters are not changed.)144 573.6 R
+.144(The return status is greater than zero if)5.143 F F2(n)3.004 E F0
+.144(is greater than)2.884 F F1($#)2.644 E F0
+(or less than zero; otherwise 0.)144 585.6 Q F1(shopt)108 602.4 Q F0([)
+2.5 E F1(\255pqsu)A F0 2.5(][)C F1<ad6f>-2.5 E F0 2.5(][)C F2(optname)
+-2.5 E F0(...])2.5 E -.8(To)144 614.4 S .222(ggle the v).8 F .222
+(alues of v)-.25 F .222(ariables controlling optional shell beha)-.25 F
+(vior)-.2 E 5.222(.W)-.55 G .222(ith no options, or with the)-5.622 F F1
+<ad70>2.722 E F0 .721(option, a list of all settable options is display\
+ed, with an indication of whether or not each is set.)144 626.4 R(The)
+144 638.4 Q F1<ad70>2.828 E F0 .327(option causes output to be displaye\
+d in a form that may be reused as input.)2.828 F .327(Other options)
+5.327 F(ha)144 650.4 Q .3 -.15(ve t)-.2 H(he follo).15 E(wing meanings:)
+-.25 E F1<ad73>144 662.4 Q F0(Enable \(set\) each)26.41 E F2(optname)2.5
+E F0(.)A F1<ad75>144 674.4 Q F0(Disable \(unset\) each)24.74 E F2
+(optname)2.5 E F0(.)A F1<ad71>144 686.4 Q F0 .003(Suppresses normal out\
+put \(quiet mode\); the return status indicates whether the)24.74 F F2
+(optname)2.504 E F0(is)2.504 E .256(set or unset.)180 698.4 R .256
+(If multiple)5.256 F F2(optname)2.756 E F0(ar)2.756 E .256
+(guments are gi)-.18 F -.15(ve)-.25 G 2.756(nw).15 G(ith)-2.756 E F1
+<ad71>2.756 E F0 2.755(,t)C .255(he return status is zero if)-2.755 F
+(all)180 710.4 Q F2(optnames)2.5 E F0(are enabled; non-zero otherwise.)
+2.5 E(GNU Bash-4.0)72 768 Q(2004 Apr 20)148.735 E(15)198.725 E 0 Cg EP
+%%Page: 16 16
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
+/Times-Bold@0 SF<ad6f>144 84 Q F0(Restricts the v)25.3 E(alues of)-.25 E
+/F2 10/Times-Italic@0 SF(optname)2.5 E F0(to be those de\214ned for the)
+2.5 E F1<ad6f>2.5 E F0(option to the)2.5 E F1(set)2.5 E F0 -.2(bu)2.5 G
+(iltin.).2 E .127(If either)144 100.8 R F1<ad73>2.627 E F0(or)2.627 E F1
+<ad75>2.627 E F0 .127(is used with no)2.627 F F2(optname)2.627 E F0(ar)
+2.627 E .127(guments, the display is limited to those options which)-.18
+F 1.024(are set or unset, respecti)144 112.8 R -.15(ve)-.25 G(ly).15 E
+6.024(.U)-.65 G 1.024(nless otherwise noted, the)-6.024 F F1(shopt)3.523
+E F0 1.023(options are disabled \(unset\) by)3.523 F(def)144 124.8 Q
+(ault.)-.1 E 1.544
+(The return status when listing options is zero if all)144 141.6 R F2
+(optnames)4.044 E F0 1.545(are enabled, non-zero otherwise.)4.045 F .696
+(When setting or unsetting options, the return status is zero unless an)
+144 153.6 R F2(optname)3.196 E F0 .696(is not a v)3.196 F .695
+(alid shell)-.25 F(option.)144 165.6 Q(The list of)144 182.4 Q F1(shopt)
+2.5 E F0(options is:)2.5 E F1(autocd)144 200.4 Q F0 .199
+(If set, a command name that is the name of a directory is e)11.11 F
+-.15(xe)-.15 G .2(cuted as if it were the ar).15 F(gu-)-.18 E
+(ment to the)184 212.4 Q F1(cd)2.5 E F0 2.5(command. This)2.5 F
+(option is only used by interacti)2.5 E .3 -.15(ve s)-.25 H(hells.).15 E
+F1(cdable_v)144 224.4 Q(ars)-.1 E F0 .156(If set, an ar)184 236.4 R .156
+(gument to the)-.18 F F1(cd)2.656 E F0 -.2(bu)2.656 G .155
+(iltin command that is not a directory is assumed to be the).2 F
+(name of a v)184 248.4 Q(ariable whose v)-.25 E
+(alue is the directory to change to.)-.25 E F1(cdspell)144 260.4 Q F0
+1.055
+(If set, minor errors in the spelling of a directory component in a)
+10.55 F F1(cd)3.555 E F0 1.055(command will be)3.555 F 3.988
+(corrected. The)184 272.4 R 1.488(errors check)3.988 F 1.487
+(ed for are transposed characters, a missing character)-.1 F 3.987(,a)
+-.4 G(nd)-3.987 E .552(one character too man)184 284.4 R 4.352 -.65
+(y. I)-.15 H 3.052(fac).65 G .552
+(orrection is found, the corrected \214le name is printed, and)-3.052 F
+(the command proceeds.)184 296.4 Q
+(This option is only used by interacti)5 E .3 -.15(ve s)-.25 H(hells.)
+.15 E F1(checkhash)144 308.4 Q F0 2.08(If set,)184 320.4 R F1(bash)4.58
+E F0 2.079(checks that a command found in the hash table e)4.58 F 2.079
+(xists before trying to)-.15 F -.15(exe)184 332.4 S(cute it.).15 E
+(If a hashed command no longer e)5 E
+(xists, a normal path search is performed.)-.15 E F1(checkjobs)144 344.4
+Q F0 .448(If set,)184 356.4 R F1(bash)2.948 E F0 .448
+(lists the status of an)2.948 F 2.949(ys)-.15 G .449
+(topped and running jobs before e)-2.949 F .449(xiting an interacti)-.15
+F -.15(ve)-.25 G 3.439(shell. If)184 368.4 R(an)3.439 E 3.439(yj)-.15 G
+.938(obs are running, this causes the e)-3.439 F .938
+(xit to be deferred until a second e)-.15 F .938(xit is)-.15 F 2.203
+(attempted without an interv)184 380.4 R 2.203(ening command \(see)-.15
+F/F3 9/Times-Bold@0 SF 2.203(JOB CONTR)4.703 F(OL)-.27 E F0(abo)4.453 E
+-.15(ve)-.15 G 4.703(\). The).15 F(shell)4.704 E(al)184 392.4 Q -.1(wa)
+-.1 G(ys postpones e).1 E(xiting if an)-.15 E 2.5(yj)-.15 G
+(obs are stopped.)-2.5 E F1(checkwinsize)144 404.4 Q F0 .797(If set,)184
+416.4 R F1(bash)3.297 E F0 .797(checks the windo)3.297 F 3.297(ws)-.25 G
+.796(ize after each command and, if necessary)-3.297 F 3.296(,u)-.65 G
+.796(pdates the)-3.296 F -.25(va)184 428.4 S(lues of).25 E F3(LINES)2.5
+E F0(and)2.25 E F3(COLUMNS)2.5 E/F4 9/Times-Roman@0 SF(.)A F1(cmdhist)
+144 440.4 Q F0 1.202(If set,)6.11 F F1(bash)3.702 E F0 1.202
+(attempts to sa)3.702 F 1.502 -.15(ve a)-.2 H 1.202
+(ll lines of a multiple-line command in the same history).15 F(entry)184
+452.4 Q 5(.T)-.65 G(his allo)-5 E
+(ws easy re-editing of multi-line commands.)-.25 E F1(compat31)144 464.4
+Q F0 .42(If set,)184 476.4 R F1(bash)2.92 E F0 .42(changes its beha)2.92
+F .419(vior to that of v)-.2 F .419
+(ersion 3.1 with respect to quoted ar)-.15 F(guments)-.18 E
+(to the conditional command')184 488.4 Q 2.5(s=)-.55 G 2.5(~o)-2.5 G
+(perator)-2.5 E(.)-.55 E F1(compat32)144 500.4 Q F0 1.409(If set,)184
+512.4 R F1(bash)3.909 E F0 1.409(changes its beha)3.909 F 1.409
+(vior to that of v)-.2 F 1.41
+(ersion 3.2 with respect to locale-speci\214c)-.15 F
+(string comparison when using the conditional command')184 524.4 Q 2.5
+(s<a)-.55 G(nd > operators.)-2.5 E F1(compat40)144 536.4 Q F0 1.41
+(If set,)184 548.4 R F1(bash)3.91 E F0 1.41(changes its beha)3.91 F
+1.409(vior to that of v)-.2 F 1.409
+(ersion 4.0 with respect to locale-speci\214c)-.15 F 1.692
+(string comparison when using the conditional command')184 560.4 R 4.193
+(s<a)-.55 G 1.693(nd > operators and the)-4.193 F(ef)184 572.4 Q
+(fect of interrupting a command list.)-.25 E F1(dirspell)144 584.4 Q F0
+.859(If set,)7.77 F F1(bash)3.359 E F0 .858
+(attempts spelling correction on directory names during w)3.359 F .858
+(ord completion if)-.1 F
+(the directory name initially supplied does not e)184 596.4 Q(xist.)-.15
+E F1(dotglob)144 608.4 Q F0 .165(If set,)7.77 F F1(bash)2.665 E F0 .165
+(includes \214lenames be)2.665 F .165(ginning with a `.)-.15 F 2.665('i)
+-.7 G 2.665(nt)-2.665 G .165(he results of pathname e)-2.665 F
+(xpansion.)-.15 E F1(execfail)144 620.4 Q F0 1.387
+(If set, a non-interacti)7.79 F 1.687 -.15(ve s)-.25 H 1.386
+(hell will not e).15 F 1.386(xit if it cannot e)-.15 F -.15(xe)-.15 G
+1.386(cute the \214le speci\214ed as an).15 F(ar)184 632.4 Q
+(gument to the)-.18 E F1(exec)2.5 E F0 -.2(bu)2.5 G(iltin command.).2 E
+(An interacti)5 E .3 -.15(ve s)-.25 H(hell does not e).15 E(xit if)-.15
+E F1(exec)2.5 E F0 -.1(fa)2.5 G(ils.).1 E F1(expand_aliases)144 644.4 Q
+F0 .716(If set, aliases are e)184 656.4 R .717(xpanded as described abo)
+-.15 F 1.017 -.15(ve u)-.15 H(nder).15 E F3(ALIASES)3.217 E F4(.)A F0
+.717(This option is enabled)5.217 F(by def)184 668.4 Q
+(ault for interacti)-.1 E .3 -.15(ve s)-.25 H(hells.).15 E F1(extdeb)144
+680.4 Q(ug)-.2 E F0(If set, beha)184 692.4 Q
+(vior intended for use by deb)-.2 E(uggers is enabled:)-.2 E F1(1.)184
+704.4 Q F0(The)28.5 E F1<ad46>4.251 E F0 1.751(option to the)4.251 F F1
+(declar)4.251 E(e)-.18 E F0 -.2(bu)4.251 G 1.751
+(iltin displays the source \214le name and line).2 F
+(number corresponding to each function name supplied as an ar)220 716.4
+Q(gument.)-.18 E(GNU Bash-4.0)72 768 Q(2004 Apr 20)148.735 E(16)198.725
+E 0 Cg EP
+%%Page: 17 17
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
+/Times-Bold@0 SF(2.)184 84 Q F0 1.667(If the command run by the)28.5 F
+F1(DEB)4.167 E(UG)-.1 E F0 1.667(trap returns a non-zero v)4.167 F 1.667
+(alue, the ne)-.25 F(xt)-.15 E(command is skipped and not e)220 96 Q
+-.15(xe)-.15 G(cuted.).15 E F1(3.)184 108 Q F0 .841
+(If the command run by the)28.5 F F1(DEB)3.341 E(UG)-.1 E F0 .841
+(trap returns a v)3.341 F .84(alue of 2, and the shell is)-.25 F -.15
+(exe)220 120 S .488
+(cuting in a subroutine \(a shell function or a shell script e).15 F
+-.15(xe)-.15 G .488(cuted by the).15 F F1(.)2.988 E F0(or)2.988 E F1
+(sour)220 132 Q(ce)-.18 E F0 -.2(bu)2.5 G(iltins\), a call to).2 E F1
+-.18(re)2.5 G(tur).18 E(n)-.15 E F0(is simulated.)2.5 E F1(4.)184 144 Q
+/F2 9/Times-Bold@0 SF -.27(BA)28.5 G(SH_ARGC).27 E F0(and)3.154 E F2
+-.27(BA)3.404 G(SH_ARGV).27 E F0 .904
+(are updated as described in their descriptions)3.154 F(abo)220 156 Q
+-.15(ve)-.15 G(.).15 E F1(5.)184 168 Q F0 1.359
+(Function tracing is enabled:)28.5 F 1.359
+(command substitution, shell functions, and sub-)6.359 F(shells in)220
+180 Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith)-2.5 E F1(\()2.5 E/F3 10
+/Times-Italic@0 SF(command)2.5 E F1(\))2.5 E F0(inherit the)2.5 E F1
+(DEB)2.5 E(UG)-.1 E F0(and)2.5 E F1(RETURN)2.5 E F0(traps.)2.5 E F1(6.)
+184 192 Q F0 .805(Error tracing is enabled:)28.5 F .804
+(command substitution, shell functions, and subshells)5.805 F(in)220 204
+Q -.2(vo)-.4 G -.1(ke).2 G 2.5(dw).1 G(ith)-2.5 E F1(\()2.5 E F3
+(command)2.5 E F1(\))2.5 E F0(inherit the)2.5 E F1(ERR)2.5 E(OR)-.3 E F0
+(trap.)2.5 E F1(extglob)144 216 Q F0 .4(If set, the e)8.89 F .4
+(xtended pattern matching features described abo)-.15 F .7 -.15(ve u)
+-.15 H(nder).15 E F1 -.1(Pa)2.9 G .4(thname Expan-).1 F(sion)184 228 Q
+F0(are enabled.)2.5 E F1(extquote)144 240 Q F0 2.473(If set,)184 252 R
+F1($)4.973 E F0<08>A F3(string)A F0 4.973<0861>C(nd)-4.973 E F1($)4.973
+E F0(")A F3(string)A F0 4.973("q)C 2.473(uoting is performed within)
+-4.973 F F1(${)4.973 E F3(par)A(ameter)-.15 E F1(})A F0 -.15(ex)4.973 G
+(pansions).15 E(enclosed in double quotes.)184 264 Q
+(This option is enabled by def)5 E(ault.)-.1 E F1(failglob)144 276 Q F0
+1.424(If set, patterns which f)7.77 F 1.425
+(ail to match \214lenames during pathname e)-.1 F 1.425
+(xpansion result in an)-.15 F -.15(ex)184 288 S(pansion error).15 E(.)
+-.55 E F1 -.25(fo)144 300 S -.18(rc).25 G(e_\214gnor).18 E(e)-.18 E F0
+.937(If set, the suf)184 312 R<8c78>-.25 E .936(es speci\214ed by the)
+-.15 F F2(FIGNORE)3.436 E F0 .936(shell v)3.186 F .936(ariable cause w)
+-.25 F .936(ords to be ignored)-.1 F .32(when performing w)184 324 R .32
+(ord completion e)-.1 F -.15(ve)-.25 G 2.82(ni).15 G 2.82(ft)-2.82 G .32
+(he ignored w)-2.82 F .32(ords are the only possible com-)-.1 F 2.948
+(pletions. See)184 336 R F2 .448(SHELL V)2.948 F(ARIABLES)-1.215 E F0
+(abo)2.698 E .748 -.15(ve f)-.15 H .448(or a description of).15 F F2
+(FIGNORE)2.947 E/F4 9/Times-Roman@0 SF(.)A F0 .447(This option is)4.947
+F(enabled by def)184 348 Q(ault.)-.1 E F1(globstar)144 360 Q F0 .178
+(If set, the pattern)5 F F1(**)2.678 E F0 .178(used in a pathname e)
+2.678 F .178(xpansion conte)-.15 F .179
+(xt will match a \214les and zero or)-.15 F 1.298
+(more directories and subdirectories.)184 372 R 1.298
+(If the pattern is follo)6.298 F 1.298(wed by a)-.25 F F1(/)3.797 E F0
+3.797(,o)C 1.297(nly directories)-3.797 F(and subdirectories match.)184
+384 Q F1(gnu_errfmt)144 396 Q F0(If set, shell error messages are writt\
+en in the standard GNU error message format.)184 408 Q F1(histappend)144
+420 Q F0 .676
+(If set, the history list is appended to the \214le named by the v)184
+432 R .676(alue of the)-.25 F F2(HISTFILE)3.177 E F0 -.25(va)2.927 G
+(ri-).25 E(able when the shell e)184 444 Q(xits, rather than o)-.15 E
+-.15(ve)-.15 G(rwriting the \214le.).15 E F1(histr)144 456 Q(eedit)-.18
+E F0 .576(If set, and)184 468 R F1 -.18(re)3.076 G(adline).18 E F0 .575
+(is being used, a user is gi)3.076 F -.15(ve)-.25 G 3.075(nt).15 G .575
+(he opportunity to re-edit a f)-3.075 F .575(ailed his-)-.1 F
+(tory substitution.)184 480 Q F1(histv)144 492 Q(erify)-.1 E F0 .402
+(If set, and)184 504 R F1 -.18(re)2.903 G(adline).18 E F0 .403
+(is being used, the results of history substitution are not immediately)
+2.903 F .662(passed to the shell parser)184 516 R 5.662(.I)-.55 G .661
+(nstead, the resulting line is loaded into the)-5.662 F F1 -.18(re)3.161
+G(adline).18 E F0(editing)3.161 E -.2(bu)184 528 S -.25(ff).2 G(er).25 E
+2.5(,a)-.4 G(llo)-2.5 E(wing further modi\214cation.)-.25 E F1
+(hostcomplete)144 540 Q F0 1.181(If set, and)184 552 R F1 -.18(re)3.681
+G(adline).18 E F0 1.181(is being used,)3.681 F F1(bash)3.682 E F0 1.182
+(will attempt to perform hostname completion)3.682 F 1.381(when a w)184
+564 R 1.381(ord containing a)-.1 F F1(@)3.881 E F0 1.381
+(is being completed \(see)3.881 F F1(Completing)3.88 E F0(under)3.88 E
+F2(READLINE)3.88 E F0(abo)184 576 Q -.15(ve)-.15 G 2.5(\). This).15 F
+(is enabled by def)2.5 E(ault.)-.1 E F1(huponexit)144 588 Q F0(If set,)
+184 600 Q F1(bash)2.5 E F0(will send)2.5 E F2(SIGHUP)2.5 E F0
+(to all jobs when an interacti)2.25 E .3 -.15(ve l)-.25 H(ogin shell e)
+.15 E(xits.)-.15 E F1(interacti)144 612 Q -.1(ve)-.1 G(_comments).1 E F0
+.33(If set, allo)184 624 R 2.83(waw)-.25 G .33(ord be)-2.93 F .33
+(ginning with)-.15 F F1(#)2.83 E F0 .33(to cause that w)2.83 F .33
+(ord and all remaining characters on)-.1 F .967
+(that line to be ignored in an interacti)184 636 R 1.267 -.15(ve s)-.25
+H .967(hell \(see).15 F F2(COMMENTS)3.467 E F0(abo)3.217 E -.15(ve)-.15
+G 3.467(\). This).15 F .967(option is)3.467 F(enabled by def)184 648 Q
+(ault.)-.1 E F1(lithist)144 660 Q F0 .654(If set, and the)15.55 F F1
+(cmdhist)3.154 E F0 .654(option is enabled, multi-line commands are sa)
+3.154 F -.15(ve)-.2 G 3.155(dt).15 G 3.155(ot)-3.155 G .655(he history)
+-3.155 F(with embedded ne)184 672 Q
+(wlines rather than using semicolon separators where possible.)-.25 E F1
+(login_shell)144 684 Q F0 .486
+(The shell sets this option if it is started as a login shell \(see)184
+696 R F2(INV)2.986 E(OCA)-.405 E(TION)-.855 E F0(abo)2.736 E -.15(ve)
+-.15 G 2.986(\). The).15 F -.25(va)184 708 S(lue may not be changed.).25
+E(GNU Bash-4.0)72 768 Q(2004 Apr 20)148.735 E(17)198.725 E 0 Cg EP
+%%Page: 18 18
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
+/Times-Bold@0 SF(mailwar)144 84 Q(n)-.15 E F0 .814
+(If set, and a \214le that)184 96 R F1(bash)3.314 E F0 .815
+(is checking for mail has been accessed since the last time it)3.314 F
+-.1(wa)184 108 S 2.5(sc).1 G(heck)-2.5 E(ed, the message `)-.1 E
+(`The mail in)-.74 E/F2 10/Times-Italic@0 SF(mail\214le)2.5 E F0
+(has been read')2.5 E 2.5('i)-.74 G 2.5(sd)-2.5 G(isplayed.)-2.5 E F1
+(no_empty_cmd_completion)144 120 Q F0 .325(If set, and)184 132 R F1 -.18
+(re)2.825 G(adline).18 E F0 .325(is being used,)2.825 F F1(bash)2.824 E
+F0 .324(will not attempt to search the)2.824 F/F3 9/Times-Bold@0 SF
+-.666(PA)2.824 G(TH)-.189 E F0 .324(for possible)2.574 F
+(completions when completion is attempted on an empty line.)184 144 Q F1
+(nocaseglob)144 156 Q F0 .436(If set,)184 168 R F1(bash)2.936 E F0 .436
+(matches \214lenames in a case\255insensiti)2.936 F .737 -.15(ve f)-.25
+H .437(ashion when performing pathname).05 F -.15(ex)184 180 S
+(pansion \(see).15 E F1 -.1(Pa)2.5 G(thname Expansion).1 E F0(abo)2.5 E
+-.15(ve)-.15 G(\).).15 E F1(nocasematch)144 192 Q F0 1.194(If set,)184
+204 R F1(bash)3.694 E F0 1.194(matches patterns in a case\255insensiti)
+3.694 F 1.493 -.15(ve f)-.25 H 1.193(ashion when performing matching).05
+F(while e)184 216 Q -.15(xe)-.15 G(cuting).15 E F1(case)2.5 E F0(or)2.5
+E F1([[)2.5 E F0(conditional commands.)2.5 E F1(nullglob)144 228 Q F0
+.854(If set,)184 240 R F1(bash)3.354 E F0(allo)3.354 E .855
+(ws patterns which match no \214les \(see)-.25 F F1 -.1(Pa)3.355 G .855
+(thname Expansion).1 F F0(abo)3.355 E -.15(ve)-.15 G 3.355(\)t).15 G(o)
+-3.355 E -.15(ex)184 252 S(pand to a null string, rather than themselv)
+.15 E(es.)-.15 E F1(pr)144 264 Q(ogcomp)-.18 E F0 .677
+(If set, the programmable completion f)184 276 R .677(acilities \(see)
+-.1 F F1(Pr)3.176 E .676(ogrammable Completion)-.18 F F0(abo)3.176 E
+-.15(ve)-.15 G(\)).15 E(are enabled.)184 288 Q
+(This option is enabled by def)5 E(ault.)-.1 E F1(pr)144 300 Q(omptv)
+-.18 E(ars)-.1 E F0 1.447(If set, prompt strings under)184 312 R 1.448
+(go parameter e)-.18 F 1.448(xpansion, command substitution, arithmetic)
+-.15 F -.15(ex)184 324 S .171(pansion, and quote remo).15 F -.25(va)-.15
+G 2.67(la).25 G .17(fter being e)-2.67 F .17(xpanded as described in)
+-.15 F F3(PR)2.67 E(OMPTING)-.27 E F0(abo)2.42 E -.15(ve)-.15 G(.).15 E
+(This option is enabled by def)184 336 Q(ault.)-.1 E F1 -.18(re)144 348
+S(stricted_shell).18 E F0 1.069
+(The shell sets this option if it is started in restricted mode \(see)
+184 360 R F3 1.069(RESTRICTED SHELL)3.569 F F0(belo)184 372 Q 4.178
+(w\). The)-.25 F -.25(va)4.178 G 1.678(lue may not be changed.).25 F
+1.678(This is not reset when the startup \214les are)6.678 F -.15(exe)
+184 384 S(cuted, allo).15 E(wing the startup \214les to disco)-.25 E
+-.15(ve)-.15 G 2.5(rw).15 G(hether or not a shell is restricted.)-2.5 E
+F1(shift_v)144 396 Q(erbose)-.1 E F0 .501(If set, the)184 408 R F1
+(shift)3.001 E F0 -.2(bu)3.001 G .501
+(iltin prints an error message when the shift count e).2 F .502
+(xceeds the number)-.15 F(of positional parameters.)184 420 Q F1(sour)
+144 432 Q(cepath)-.18 E F0 .771(If set, the)184 444 R F1(sour)3.271 E
+(ce)-.18 E F0(\()3.271 E F1(.)A F0 3.271(\)b)C .771(uiltin uses the v)
+-3.471 F .771(alue of)-.25 F F3 -.666(PA)3.27 G(TH)-.189 E F0 .77
+(to \214nd the directory containing the)3.02 F(\214le supplied as an ar)
+184 456 Q 2.5(gument. This)-.18 F(option is enabled by def)2.5 E(ault.)
+-.1 E F1(xpg_echo)144 468 Q F0(If set, the)184 480 Q F1(echo)2.5 E F0
+-.2(bu)2.5 G(iltin e).2 E(xpands backslash-escape sequences by def)-.15
+E(ault.)-.1 E F1(suspend)108 492 Q F0([)2.5 E F1<ad66>A F0(])A 1.001
+(Suspend the e)144 504 R -.15(xe)-.15 G 1.001
+(cution of this shell until it recei).15 F -.15(ve)-.25 G 3.501(sa).15 G
+F3(SIGCONT)A F0 3.502(signal. A)3.252 F 1.002(login shell cannot be)
+3.502 F .023(suspended; the)144 516 R F1<ad66>2.523 E F0 .023
+(option can be used to o)2.523 F -.15(ve)-.15 G .022
+(rride this and force the suspension.).15 F .022(The return status is)
+5.022 F 2.5(0u)144 528 S(nless the shell is a login shell and)-2.5 E F1
+<ad66>2.5 E F0(is not supplied, or if job control is not enabled.)2.5 E
+F1(test)108 540 Q F2 -.2(ex)2.5 G(pr).2 E F1([)108 552 Q F2 -.2(ex)2.5 G
+(pr).2 E F1(])2.5 E F0 1.15
+(Return a status of 0 or 1 depending on the e)6.77 F -.25(va)-.25 G 1.15
+(luation of the conditional e).25 F(xpression)-.15 E F2 -.2(ex)3.65 G
+(pr).2 E F0 6.15(.E).73 G(ach)-6.15 E 1.188
+(operator and operand must be a separate ar)144 564 R 3.688
+(gument. Expressions)-.18 F 1.187(are composed of the primaries)3.688 F
+1.889(described abo)144 576 R 2.189 -.15(ve u)-.15 H(nder).15 E F3
+(CONDITION)4.389 E 1.889(AL EXPRESSIONS)-.18 F/F4 9/Times-Roman@0 SF(.)A
+F1(test)6.389 E F0 1.89(does not accept an)4.389 F 4.39(yo)-.15 G 1.89
+(ptions, nor)-4.39 F(does it accept and ignore an ar)144 588 Q
+(gument of)-.18 E F1<adad>2.5 E F0(as signifying the end of options.)2.5
+E .786(Expressions may be combined using the follo)144 606 R .785
+(wing operators, listed in decreasing order of prece-)-.25 F 2.5
+(dence. The)144 618 R -.25(eva)2.5 G
+(luation depends on the number of ar).25 E(guments; see belo)-.18 E -.65
+(w.)-.25 G F1(!)144 630 Q F2 -.2(ex)2.5 G(pr).2 E F0 -.35(Tr)12.6 G
+(ue if).35 E F2 -.2(ex)2.5 G(pr).2 E F0(is f)3.23 E(alse.)-.1 E F1(\()
+144 642 Q F2 -.2(ex)2.5 G(pr).2 E F1(\))2.5 E F0 .26(Returns the v)6.77
+F .26(alue of)-.25 F F2 -.2(ex)2.76 G(pr).2 E F0 5.26(.T)C .26
+(his may be used to o)-5.26 F -.15(ve)-.15 G .26
+(rride the normal precedence of opera-).15 F(tors.)180 654 Q F2 -.2(ex)
+144 666 S(pr1).2 E F0<ad>2.5 E F1(a)A F2 -.2(ex)2.5 G(pr2).2 E F0 -.35
+(Tr)180 678 S(ue if both).35 E F2 -.2(ex)2.5 G(pr1).2 E F0(and)2.5 E F2
+-.2(ex)2.5 G(pr2).2 E F0(are true.)2.52 E F2 -.2(ex)144 690 S(pr1).2 E
+F0<ad>2.5 E F1(o)A F2 -.2(ex)2.5 G(pr2).2 E F0 -.35(Tr)180 702 S
+(ue if either).35 E F2 -.2(ex)2.5 G(pr1).2 E F0(or)2.5 E F2 -.2(ex)2.5 G
+(pr2).2 E F0(is true.)2.52 E F1(test)144 718.8 Q F0(and)2.5 E F1([)2.5 E
+F0 -.25(eva)2.5 G(luate conditional e).25 E
+(xpressions using a set of rules based on the number of ar)-.15 E
+(guments.)-.18 E(GNU Bash-4.0)72 768 Q(2004 Apr 20)148.735 E(18)198.725
+E 0 Cg EP
+%%Page: 19 19
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E 2.5(0a)144
+84 S -.18(rg)-2.5 G(uments).18 E(The e)180 96 Q(xpression is f)-.15 E
+(alse.)-.1 E 2.5(1a)144 108 S -.18(rg)-2.5 G(ument).18 E(The e)180 120 Q
+(xpression is true if and only if the ar)-.15 E(gument is not null.)-.18
+E 2.5(2a)144 132 S -.18(rg)-2.5 G(uments).18 E .37(If the \214rst ar)180
+144 R .37(gument is)-.18 F/F1 10/Times-Bold@0 SF(!)2.87 E F0 2.87(,t)C
+.37(he e)-2.87 F .37(xpression is true if and only if the second ar)-.15
+F .37(gument is null.)-.18 F .379(If the \214rst ar)180 156 R .38
+(gument is one of the unary conditional operators listed abo)-.18 F .68
+-.15(ve u)-.15 H(nder).15 E/F2 9/Times-Bold@0 SF(CONDI-)2.88 E(TION)180
+168 Q .553(AL EXPRESSIONS)-.18 F/F3 9/Times-Roman@0 SF(,)A F0 .552
+(the e)2.802 F .552(xpression is true if the unary test is true.)-.15 F
+.552(If the \214rst ar)5.552 F(gu-)-.18 E(ment is not a v)180 180 Q
+(alid unary conditional operator)-.25 E 2.5(,t)-.4 G(he e)-2.5 E
+(xpression is f)-.15 E(alse.)-.1 E 2.5(3a)144 192 S -.18(rg)-2.5 G
+(uments).18 E .023(If the second ar)180 204 R .023
+(gument is one of the binary conditional operators listed abo)-.18 F
+.324 -.15(ve u)-.15 H(nder).15 E F2(CON-)2.524 E(DITION)180 216 Q 1.478
+(AL EXPRESSIONS)-.18 F F3(,)A F0 1.477(the result of the e)3.727 F 1.477
+(xpression is the result of the binary test)-.15 F .513
+(using the \214rst and third ar)180 228 R .513(guments as operands.)-.18
+F(The)5.513 E F1<ad61>3.013 E F0(and)3.013 E F1<ad6f>3.013 E F0 .513
+(operators are considered)3.013 F .972
+(binary operators when there are three ar)180 240 R 3.472(guments. If)
+-.18 F .972(the \214rst ar)3.472 F .972(gument is)-.18 F F1(!)3.472 E F0
+3.472(,t)C .972(he v)-3.472 F .972(alue is)-.25 F .883(the ne)180 252 R
+-.05(ga)-.15 G .883(tion of the tw).05 F(o-ar)-.1 E .884
+(gument test using the second and third ar)-.18 F 3.384(guments. If)-.18
+F .884(the \214rst)3.384 F(ar)180 264 Q .875(gument is e)-.18 F(xactly)
+-.15 E F1(\()3.375 E F0 .875(and the third ar)3.375 F .875(gument is e)
+-.18 F(xactly)-.15 E F1(\))3.375 E F0 3.374(,t)C .874
+(he result is the one-ar)-3.374 F(gument)-.18 E(test of the second ar)
+180 276 Q 2.5(gument. Otherwise,)-.18 F(the e)2.5 E(xpression is f)-.15
+E(alse.)-.1 E 2.5(4a)144 288 S -.18(rg)-2.5 G(uments).18 E .384
+(If the \214rst ar)180 300 R .384(gument is)-.18 F F1(!)2.884 E F0 2.885
+(,t)C .385(he result is the ne)-2.885 F -.05(ga)-.15 G .385
+(tion of the three-ar).05 F .385(gument e)-.18 F .385(xpression com-)
+-.15 F 1.648(posed of the remaining ar)180 312 R 4.147
+(guments. Otherwise,)-.18 F 1.647(the e)4.147 F 1.647
+(xpression is parsed and e)-.15 F -.25(va)-.25 G(luated).25 E
+(according to precedence using the rules listed abo)180 324 Q -.15(ve)
+-.15 G(.).15 E 2.5(5o)144 336 S 2.5(rm)-2.5 G(ore ar)-2.5 E(guments)-.18
+E 1.635(The e)180 348 R 1.635(xpression is parsed and e)-.15 F -.25(va)
+-.25 G 1.635(luated according to precedence using the rules listed).25 F
+(abo)180 360 Q -.15(ve)-.15 G(.).15 E F1(times)108 376.8 Q F0 1.229(Pri\
+nt the accumulated user and system times for the shell and for processe\
+s run from the shell.)13.23 F(The return status is 0.)144 388.8 Q F1
+(trap)108 405.6 Q F0([)2.5 E F1(\255lp)A F0 2.5(][)C([)-2.5 E/F4 10
+/Times-Italic@0 SF(ar)A(g)-.37 E F0(])A F4(sigspec)2.5 E F0(...])2.5 E
+.702(The command)144 417.6 R F4(ar)3.532 E(g)-.37 E F0 .702
+(is to be read and e)3.422 F -.15(xe)-.15 G .702
+(cuted when the shell recei).15 F -.15(ve)-.25 G 3.203(ss).15 G
+(ignal\(s\))-3.203 E F4(sigspec)3.203 E F0 5.703(.I).31 G(f)-5.703 E F4
+(ar)3.533 E(g)-.37 E F0(is)3.423 E .609(absent \(and there is a single)
+144 429.6 R F4(sigspec)3.108 E F0 3.108(\)o)C(r)-3.108 E F1<ad>3.108 E
+F0 3.108(,e)C .608
+(ach speci\214ed signal is reset to its original disposition)-3.108 F
+.658(\(the v)144 441.6 R .658(alue it had upon entrance to the shell\).)
+-.25 F(If)5.658 E F4(ar)3.488 E(g)-.37 E F0 .659
+(is the null string the signal speci\214ed by each)3.378 F F4(sigspec)
+144.34 453.6 Q F0 .581
+(is ignored by the shell and by the commands it in)3.391 F -.2(vo)-.4 G
+-.1(ke).2 G 3.08(s. If).1 F F4(ar)3.41 E(g)-.37 E F0 .58
+(is not present and)3.3 F F1<ad70>3.08 E F0(has)3.08 E 1.214
+(been supplied, then the trap commands associated with each)144 465.6 R
+F4(sigspec)4.054 E F0 1.215(are displayed.)4.024 F 1.215(If no ar)6.215
+F(gu-)-.18 E .86(ments are supplied or if only)144 477.6 R F1<ad70>3.36
+E F0 .86(is gi)3.36 F -.15(ve)-.25 G(n,).15 E F1(trap)3.36 E F0 .86
+(prints the list of commands associated with each)3.36 F 2.83
+(signal. The)144 489.6 R F1<ad6c>2.83 E F0 .33(option causes the shell \
+to print a list of signal names and their corresponding num-)2.83 F
+4.311(bers. Each)144 501.6 R F4(sigspec)4.651 E F0 1.811
+(is either a signal name de\214ned in <)4.621 F F4(signal.h)A F0 1.81
+(>, or a signal number)B 6.81(.S)-.55 G(ignal)-6.81 E
+(names are case insensiti)144 513.6 Q .3 -.15(ve a)-.25 H
+(nd the SIG pre\214x is optional.).15 E 1.648(If a)144 531.6 R F4
+(sigspec)4.488 E F0(is)4.458 E F2(EXIT)4.148 E F0 1.648
+(\(0\) the command)3.898 F F4(ar)4.479 E(g)-.37 E F0 1.649(is e)4.369 F
+-.15(xe)-.15 G 1.649(cuted on e).15 F 1.649(xit from the shell.)-.15 F
+1.649(If a)6.649 F F4(sigspec)4.489 E F0(is)4.459 E F2(DEB)144 543.6 Q
+(UG)-.09 E F3(,)A F0 1.168(the command)3.418 F F4(ar)3.998 E(g)-.37 E F0
+1.168(is e)3.888 F -.15(xe)-.15 G 1.167(cuted before e).15 F -.15(ve)
+-.25 G(ry).15 E F4 1.167(simple command)3.667 F F0(,)A F4(for)3.667 E F0
+(command,)3.667 E F4(case)3.667 E F0(com-)3.667 E(mand,)144 555.6 Q F4
+(select)2.646 E F0 .146(command, e)2.646 F -.15(ve)-.25 G .146
+(ry arithmetic).15 F F4(for)2.646 E F0 .147
+(command, and before the \214rst command e)2.646 F -.15(xe)-.15 G .147
+(cutes in a).15 F .146(shell function \(see)144 567.6 R F2 .146
+(SHELL GRAMMAR)2.646 F F0(abo)2.396 E -.15(ve)-.15 G 2.646(\). Refer).15
+F .146(to the description of the)2.646 F F1(extdeb)2.645 E(ug)-.2 E F0
+.145(option to)2.645 F(the)144 579.6 Q F1(shopt)3.2 E F0 -.2(bu)3.2 G .7
+(iltin for details of its ef).2 F .7(fect on the)-.25 F F1(DEB)3.2 E(UG)
+-.1 E F0 3.2(trap. If)3.2 F(a)3.2 E F4(sigspec)3.54 E F0(is)3.51 E F2
+(RETURN)3.2 E F3(,)A F0 .701(the com-)2.951 F(mand)144 591.6 Q F4(ar)
+3.474 E(g)-.37 E F0 .644(is e)3.364 F -.15(xe)-.15 G .643
+(cuted each time a shell function or a script e).15 F -.15(xe)-.15 G
+.643(cuted with the).15 F F1(.)3.143 E F0(or)3.143 E F1(sour)3.143 E(ce)
+-.18 E F0 -.2(bu)3.143 G(iltins).2 E(\214nishes e)144 603.6 Q -.15(xe)
+-.15 G(cuting.).15 E .928(If a)144 621.6 R F4(sigspec)3.768 E F0(is)
+3.738 E F2(ERR)3.429 E F3(,)A F0 .929(the command)3.179 F F4(ar)3.759 E
+(g)-.37 E F0 .929(is e)3.649 F -.15(xe)-.15 G .929(cuted whene).15 F
+-.15(ve)-.25 G 3.429(ras).15 G .929(imple command has a non\255zero)
+-3.429 F -.15(ex)144 633.6 S 1.009(it status, subject to the follo).15 F
+1.009(wing conditions.)-.25 F(The)6.009 E F2(ERR)3.509 E F0 1.009
+(trap is not e)3.259 F -.15(xe)-.15 G 1.008(cuted if the f).15 F 1.008
+(ailed com-)-.1 F .324
+(mand is part of the command list immediately follo)144 645.6 R .324
+(wing a)-.25 F F1(while)2.824 E F0(or)2.824 E F1(until)2.824 E F0 -.1
+(ke)2.824 G(yw)-.05 E .324(ord, part of the test)-.1 F 1.129(in an)144
+657.6 R F4(if)3.639 E F0 1.129(statement, part of a command e)5.589 F
+-.15(xe)-.15 G 1.129(cuted in a).15 F F1(&&)3.629 E F0(or)3.629 E/F5 10
+/Symbol SF<efef>3.629 E F0 1.129(list, or if the command')3.629 F 3.628
+(sr)-.55 G(eturn)-3.628 E -.25(va)144 669.6 S(lue is being in).25 E -.15
+(ve)-.4 G(rted via).15 E F1(!)2.5 E F0 5(.T)C
+(hese are the same conditions obe)-5 E(yed by the)-.15 E F1(err)2.5 E
+(exit)-.18 E F0(option.)2.5 E 1.095
+(Signals ignored upon entry to the shell cannot be trapped or reset.)144
+687.6 R -.35(Tr)6.095 G 1.095(apped signals that are not).35 F .662
+(being ignored are reset to their original v)144 699.6 R .662
+(alues in a subshell or subshell en)-.25 F .661(vironment when one is)
+-.4 F 2.5(created. The)144 711.6 R(return status is f)2.5 E(alse if an)
+-.1 E(y)-.15 E F4(sigspec)2.84 E F0(is in)2.81 E -.25(va)-.4 G
+(lid; otherwise).25 E F1(trap)2.5 E F0(returns true.)2.5 E(GNU Bash-4.0)
+72 768 Q(2004 Apr 20)148.735 E(19)198.725 E 0 Cg EP
+%%Page: 20 20
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
+/Times-Bold@0 SF(type)108 84 Q F0([)2.5 E F1(\255aftpP)A F0(])A/F2 10
+/Times-Italic@0 SF(name)2.5 E F0([)2.5 E F2(name)A F0(...])2.5 E -.4(Wi)
+144 96 S .173(th no options, indicate ho).4 F 2.673(we)-.25 G(ach)-2.673
+E F2(name)3.033 E F0 -.1(wo)2.853 G .174
+(uld be interpreted if used as a command name.).1 F .174(If the)5.174 F
+F1<ad74>144 108 Q F0 .843(option is used,)3.343 F F1(type)3.343 E F0
+.843(prints a string which is one of)3.343 F F2(alias)3.343 E F0(,).27 E
+F2 -.1(ke)3.343 G(ywor)-.2 E(d)-.37 E F0(,).77 E F2(function)3.343 E F0
+(,).24 E F2 -.2(bu)3.342 G(iltin).2 E F0 3.342(,o).24 G(r)-3.342 E F2
+(\214le)5.252 E F0(if)3.522 E F2(name)144.36 120 Q F0 .086
+(is an alias, shell reserv)2.766 F .086(ed w)-.15 F .086
+(ord, function, b)-.1 F .087(uiltin, or disk \214le, respecti)-.2 F -.15
+(ve)-.25 G(ly).15 E 5.087(.I)-.65 G 2.587(ft)-5.087 G(he)-2.587 E F2
+(name)2.947 E F0 .087(is not)2.767 F .119
+(found, then nothing is printed, and an e)144 132 R .118
+(xit status of f)-.15 F .118(alse is returned.)-.1 F .118(If the)5.118 F
+F1<ad70>2.618 E F0 .118(option is used,)2.618 F F1(type)2.618 E F0 .855
+(either returns the name of the disk \214le that w)144 144 R .855
+(ould be e)-.1 F -.15(xe)-.15 G .855(cuted if).15 F F2(name)3.715 E F0
+.855(were speci\214ed as a com-)3.535 F .641(mand name, or nothing if)
+144 156 R/F3 10/Courier@0 SF .641(type -t name)3.141 F F0 -.1(wo)3.141 G
+.641(uld not return).1 F F2(\214le)3.14 E F0 5.64(.T).18 G(he)-5.64 E F1
+<ad50>3.14 E F0 .64(option forces a)3.14 F/F4 9/Times-Bold@0 SF -.666
+(PA)3.14 G(TH)-.189 E F0 .112(search for each)144 168 R F2(name)2.612 E
+F0 2.612(,e)C -.15(ve)-2.862 G 2.613(ni).15 G(f)-2.613 E F3 .113
+(type -t name)2.613 F F0 -.1(wo)2.613 G .113(uld not return).1 F F2
+(\214le)2.613 E F0 5.113(.I).18 G 2.613(fac)-5.113 G .113
+(ommand is hashed,)-2.613 F F1<ad70>2.613 E F0(and)144 180 Q F1<ad50>
+2.945 E F0 .445(print the hashed v)2.945 F .444
+(alue, not necessarily the \214le that appears \214rst in)-.25 F F4
+-.666(PA)2.944 G(TH)-.189 E/F5 9/Times-Roman@0 SF(.)A F0 .444(If the)
+4.944 F F1<ad61>2.944 E F0(option)2.944 E .265(is used,)144 192 R F1
+(type)2.765 E F0 .265(prints all of the places that contain an e)2.765 F
+-.15(xe)-.15 G .265(cutable named).15 F F2(name)2.765 E F0 5.265(.T).18
+G .265(his includes aliases)-5.265 F .427
+(and functions, if and only if the)144 204 R F1<ad70>2.926 E F0 .426
+(option is not also used.)2.926 F .426
+(The table of hashed commands is not)5.426 F .548(consulted when using)
+144 216 R F1<ad61>3.048 E F0 5.548(.T)C(he)-5.548 E F1<ad66>3.048 E F0
+.549(option suppresses shell function lookup, as with the)3.048 F F1
+(command)3.049 E F0 -.2(bu)144 228 S(iltin.).2 E F1(type)5 E F0
+(returns true if all of the ar)2.5 E(guments are found, f)-.18 E
+(alse if an)-.1 E 2.5(ya)-.15 G(re not found.)-2.5 E F1(ulimit)108 244.8
+Q F0([)2.5 E F1(\255HST)A(abcde\214lmnpqrstuvx)-.92 E F0([)2.5 E F2
+(limit)A F0(]])A(Pro)144 256.8 Q .244(vides control o)-.15 F -.15(ve)
+-.15 G 2.744(rt).15 G .244(he resources a)-2.744 F -.25(va)-.2 G .244
+(ilable to the shell and to processes started by it, on systems).25 F
+.943(that allo)144 268.8 R 3.443(ws)-.25 G .943(uch control.)-3.443 F
+(The)5.943 E F1<ad48>3.443 E F0(and)3.443 E F1<ad53>3.444 E F0 .944
+(options specify that the hard or soft limit is set for the)3.444 F(gi)
+144 280.8 Q -.15(ve)-.25 G 2.709(nr).15 G 2.709(esource. A)-2.709 F .208
+(hard limit cannot be increased by a non-root user once it is set; a so\
+ft limit may)2.709 F .425(be increased up to the v)144 292.8 R .425
+(alue of the hard limit.)-.25 F .426(If neither)5.425 F F1<ad48>2.926 E
+F0(nor)2.926 E F1<ad53>2.926 E F0 .426
+(is speci\214ed, both the soft and)2.926 F .139(hard limits are set.)144
+304.8 R .139(The v)5.139 F .139(alue of)-.25 F F2(limit)2.729 E F0 .139
+(can be a number in the unit speci\214ed for the resource or one)3.319 F
+.741(of the special v)144 316.8 R(alues)-.25 E F1(hard)3.241 E F0(,)A F1
+(soft)3.241 E F0 3.241(,o)C(r)-3.241 E F1(unlimited)3.241 E F0 3.241(,w)
+C .741(hich stand for the current hard limit, the current)-3.241 F .78
+(soft limit, and no limit, respecti)144 328.8 R -.15(ve)-.25 G(ly).15 E
+5.78(.I)-.65 G(f)-5.78 E F2(limit)3.37 E F0 .78
+(is omitted, the current v)3.96 F .78(alue of the soft limit of the)-.25
+F .498(resource is printed, unless the)144 340.8 R F1<ad48>2.999 E F0
+.499(option is gi)2.999 F -.15(ve)-.25 G 2.999(n. When).15 F .499
+(more than one resource is speci\214ed, the)2.999 F
+(limit name and unit are printed before the v)144 352.8 Q 2.5
+(alue. Other)-.25 F(options are interpreted as follo)2.5 E(ws:)-.25 E F1
+<ad61>144 364.8 Q F0(All current limits are reported)25.3 E F1<ad62>144
+376.8 Q F0(The maximum sock)24.74 E(et b)-.1 E(uf)-.2 E(fer size)-.25 E
+F1<ad63>144 388.8 Q F0(The maximum size of core \214les created)25.86 E
+F1<ad64>144 400.8 Q F0(The maximum size of a process')24.74 E 2.5(sd)
+-.55 G(ata se)-2.5 E(gment)-.15 E F1<ad65>144 412.8 Q F0
+(The maximum scheduling priority \("nice"\))25.86 E F1<ad66>144 424.8 Q
+F0(The maximum size of \214les written by the shell and its children)
+26.97 E F1<ad69>144 436.8 Q F0(The maximum number of pending signals)
+27.52 E F1<ad6c>144 448.8 Q F0(The maximum size that may be lock)27.52 E
+(ed into memory)-.1 E F1<ad6d>144 460.8 Q F0
+(The maximum resident set size \(man)21.97 E 2.5(ys)-.15 G
+(ystems do not honor this limit\))-2.5 E F1<ad6e>144 472.8 Q F0 .791(Th\
+e maximum number of open \214le descriptors \(most systems do not allo)
+24.74 F 3.29(wt)-.25 G .79(his v)-3.29 F .79(alue to)-.25 F(be set\))180
+484.8 Q F1<ad70>144 496.8 Q F0
+(The pipe size in 512-byte blocks \(this may not be set\))24.74 E F1
+<ad71>144 508.8 Q F0
+(The maximum number of bytes in POSIX message queues)24.74 E F1<ad72>144
+520.8 Q F0(The maximum real-time scheduling priority)25.86 E F1<ad73>144
+532.8 Q F0(The maximum stack size)26.41 E F1<ad74>144 544.8 Q F0
+(The maximum amount of cpu time in seconds)26.97 E F1<ad75>144 556.8 Q
+F0(The maximum number of processes a)24.74 E -.25(va)-.2 G
+(ilable to a single user).25 E F1<ad76>144 568.8 Q F0
+(The maximum amount of virtual memory a)25.3 E -.25(va)-.2 G
+(ilable to the shell).25 E F1<ad78>144 580.8 Q F0
+(The maximum number of \214le locks)25.3 E F1<ad54>144 592.8 Q F0
+(The maximum number of threads)23.63 E(If)144 609.6 Q F2(limit)2.933 E
+F0 .343(is gi)3.523 F -.15(ve)-.25 G .343(n, it is the ne).15 F 2.843
+(wv)-.25 G .343(alue of the speci\214ed resource \(the)-3.093 F F1<ad61>
+2.843 E F0 .343(option is display only\).)2.843 F .343(If no)5.343 F
+.176(option is gi)144 621.6 R -.15(ve)-.25 G .176(n, then).15 F F1<ad66>
+2.676 E F0 .175(is assumed.)2.676 F -1.11(Va)5.175 G .175
+(lues are in 1024-byte increments, e)1.11 F .175(xcept for)-.15 F F1
+<ad74>2.675 E F0 2.675(,w)C .175(hich is in)-2.675 F(seconds,)144 633.6
+Q F1<ad70>2.515 E F0 2.515(,w)C .015
+(hich is in units of 512-byte blocks, and)-2.515 F F1<ad54>2.516 E F0(,)
+A F1<ad62>2.516 E F0(,)A F1<ad6e>2.516 E F0 2.516(,a)C(nd)-2.516 E F1
+<ad75>2.516 E F0 2.516(,w)C .016(hich are unscaled v)-2.516 F(al-)-.25 E
+3.788(ues. The)144 645.6 R 1.287(return status is 0 unless an in)3.787 F
+-.25(va)-.4 G 1.287(lid option or ar).25 F 1.287
+(gument is supplied, or an error occurs)-.18 F(while setting a ne)144
+657.6 Q 2.5(wl)-.25 G(imit.)-2.5 E F1(umask)108 674.4 Q F0([)2.5 E F1
+<ad70>A F0 2.5(][)C F1<ad53>-2.5 E F0 2.5(][)C F2(mode)-2.5 E F0(])A .2
+(The user \214le-creation mask is set to)144 686.4 R F2(mode)2.7 E F0
+5.2(.I).18 G(f)-5.2 E F2(mode)3.08 E F0(be)2.88 E .2
+(gins with a digit, it is interpreted as an octal)-.15 F .066(number; o\
+therwise it is interpreted as a symbolic mode mask similar to that acce\
+pted by)144 698.4 R F2 -.15(ch)2.566 G(mod).15 E F0(\(1\).).77 E(If)144
+710.4 Q F2(mode)3.262 E F0 .382(is omitted, the current v)3.062 F .382
+(alue of the mask is printed.)-.25 F(The)5.382 E F1<ad53>2.882 E F0 .382
+(option causes the mask to be)2.882 F .547
+(printed in symbolic form; the def)144 722.4 R .547
+(ault output is an octal number)-.1 F 5.547(.I)-.55 G 3.047(ft)-5.547 G
+(he)-3.047 E F1<ad70>3.047 E F0 .547(option is supplied, and)3.047 F
+(GNU Bash-4.0)72 768 Q(2004 Apr 20)148.735 E(20)198.725 E 0 Cg EP
+%%Page: 21 21
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF -.35(BA)72 48 S(SH_B).35 E(UIL)-.1 E 290.48
+(TINS\(1\) B)-.92 F(ASH_B)-.35 E(UIL)-.1 E(TINS\(1\))-.92 E/F1 10
+/Times-Italic@0 SF(mode)144.38 84 Q F0 .551
+(is omitted, the output is in a form that may be reused as input.)3.231
+F .552(The return status is 0 if the)5.552 F(mode w)144 96 Q
+(as successfully changed or if no)-.1 E F1(mode)2.5 E F0(ar)2.5 E
+(gument w)-.18 E(as supplied, and f)-.1 E(alse otherwise.)-.1 E/F2 10
+/Times-Bold@0 SF(unalias)108 112.8 Q F0<5bad>2.5 E F2(a)A F0 2.5(][)C F1
+(name)-2.5 E F0(...])2.5 E(Remo)144 124.8 Q 1.955 -.15(ve e)-.15 H(ach)
+.15 E F1(name)4.155 E F0 1.655(from the list of de\214ned aliases.)4.155
+F(If)6.655 E F2<ad61>4.155 E F0 1.655
+(is supplied, all alias de\214nitions are)4.155 F(remo)144 136.8 Q -.15
+(ve)-.15 G 2.5(d. The).15 F(return v)2.5 E
+(alue is true unless a supplied)-.25 E F1(name)2.86 E F0
+(is not a de\214ned alias.)2.68 E F2(unset)108 153.6 Q F0<5bad>2.5 E F2
+(fv)A F0 2.5(][)C F1(name)-2.5 E F0(...])2.5 E -.15(Fo)144 165.6 S 3.106
+(re).15 G(ach)-3.106 E F1(name)3.106 E F0 3.106(,r).18 G(emo)-3.106 E
+.906 -.15(ve t)-.15 H .606(he corresponding v).15 F .607
+(ariable or function.)-.25 F .607(If no options are supplied, or the)
+5.607 F F2<ad76>144 177.6 Q F0 .305(option is gi)2.805 F -.15(ve)-.25 G
+.305(n, each).15 F F1(name)3.165 E F0 .305(refers to a shell v)2.985 F
+2.805(ariable. Read-only)-.25 F -.25(va)2.805 G .304
+(riables may not be unset.).25 F(If)5.304 E F2<ad66>144 189.6 Q F0 .459
+(is speci\214ed, each)2.959 F F1(name)3.319 E F0 .459
+(refers to a shell function, and the function de\214nition is remo)3.139
+F -.15(ve)-.15 G 2.96(d. Each).15 F .903(unset v)144 201.6 R .903
+(ariable or function is remo)-.25 F -.15(ve)-.15 G 3.402(df).15 G .902
+(rom the en)-3.402 F .902(vironment passed to subsequent commands.)-.4 F
+(If)5.902 E(an)144 213.6 Q 6.915(yo)-.15 G(f)-6.915 E/F3 9/Times-Bold@0
+SF(COMP_W)6.915 E(ORDBREAKS)-.09 E/F4 9/Times-Roman@0 SF(,)A F3(RANDOM)
+6.665 E F4(,)A F3(SECONDS)6.665 E F4(,)A F3(LINENO)6.665 E F4(,)A F3
+(HISTCMD)6.666 E F4(,)A F3(FUNCN)6.666 E(AME)-.18 E F4(,)A F3(GR)144
+225.6 Q(OUPS)-.27 E F4(,)A F0(or)2.523 E F3(DIRST)2.773 E -.495(AC)-.81
+G(K).495 E F0 .272(are unset, the)2.522 F 2.772(yl)-.15 G .272
+(ose their special properties, e)-2.772 F -.15(ve)-.25 G 2.772(ni).15 G
+2.772(ft)-2.772 G(he)-2.772 E 2.772(ya)-.15 G .272(re subsequently)
+-2.772 F 2.5(reset. The)144 237.6 R -.15(ex)2.5 G
+(it status is true unless a).15 E F1(name)2.86 E F0(is readonly)2.68 E
+(.)-.65 E F2(wait)108 254.4 Q F0([)2.5 E F1 2.5(n.)C(..)-2.5 E F0(])A
+-.8(Wa)144 266.4 S .288
+(it for each speci\214ed process and return its termination status.).8 F
+(Each)5.288 E F1(n)3.148 E F0 .288(may be a process ID or a)3.028 F .722
+(job speci\214cation; if a job spec is gi)144 278.4 R -.15(ve)-.25 G
+.722(n, all processes in that job').15 F 3.222(sp)-.55 G .722
+(ipeline are w)-3.222 F .722(aited for)-.1 F 5.722(.I)-.55 G(f)-5.722 E
+F1(n)3.582 E F0(is)3.462 E 1.265(not gi)144 290.4 R -.15(ve)-.25 G 1.265
+(n, all currently acti).15 F 1.565 -.15(ve c)-.25 H 1.265
+(hild processes are w).15 F 1.265(aited for)-.1 F 3.765(,a)-.4 G 1.266
+(nd the return status is zero.)-3.765 F(If)6.266 E F1(n)4.126 E F0 .457
+(speci\214es a non-e)144 302.4 R .457
+(xistent process or job, the return status is 127.)-.15 F .457
+(Otherwise, the return status is the)5.457 F -.15(ex)144 314.4 S
+(it status of the last process or job w).15 E(aited for)-.1 E(.)-.55 E
+/F5 10.95/Times-Bold@0 SF(SEE ALSO)72 331.2 Q F0(bash\(1\), sh\(1\))108
+343.2 Q(GNU Bash-4.0)72 768 Q(2004 Apr 20)148.735 E(21)198.725 E 0 Cg EP
+%%Trailer
+end
+%%EOF
diff --git a/doc/fdl.texi b/doc/fdl.texi
new file mode 100644
index 0000000..8805f1a
--- /dev/null
+++ b/doc/fdl.texi
@@ -0,0 +1,506 @@
+@c The GNU Free Documentation License.
+@center Version 1.3, 3 November 2008
+
+@c This file is intended to be included within another document,
+@c hence no sectioning command or @node.
+
+@display
+Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+@uref{http://fsf.org/}
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@end display
+
+@enumerate 0
+@item
+PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document @dfn{free} in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of ``copyleft'', which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+@item
+APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The ``Document'', below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as ``you''. You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A ``Modified Version'' of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A ``Secondary Section'' is a named appendix or a front-matter section
+of the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject. (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The ``Invariant Sections'' are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
+
+The ``Cover Texts'' are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A ``Transparent'' copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not ``Transparent'' is called ``Opaque''.
+
+Examples of suitable formats for Transparent copies include plain
+@sc{ascii} without markup, Texinfo input format, La@TeX{} input
+format, @acronym{SGML} or @acronym{XML} using a publicly available
+@acronym{DTD}, and standard-conforming simple @acronym{HTML},
+PostScript or @acronym{PDF} designed for human modification. Examples
+of transparent image formats include @acronym{PNG}, @acronym{XCF} and
+@acronym{JPG}. Opaque formats include proprietary formats that can be
+read and edited only by proprietary word processors, @acronym{SGML} or
+@acronym{XML} for which the @acronym{DTD} and/or processing tools are
+not generally available, and the machine-generated @acronym{HTML},
+PostScript or @acronym{PDF} produced by some word processors for
+output purposes only.
+
+The ``Title Page'' means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, ``Title Page'' means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+The ``publisher'' means any person or entity that distributes copies
+of the Document to the public.
+
+A section ``Entitled XYZ'' means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as ``Acknowledgements'',
+``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
+of such a section when you modify the Document means that it remains a
+section ``Entitled XYZ'' according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+@item
+VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+@item
+COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+@item
+MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+@enumerate A
+@item
+Use in the Title Page (and on the covers, if any) a title distinct
+from that of the Document, and from those of previous versions
+(which should, if there were any, be listed in the History section
+of the Document). You may use the same title as a previous version
+if the original publisher of that version gives permission.
+
+@item
+List on the Title Page, as authors, one or more persons or entities
+responsible for authorship of the modifications in the Modified
+Version, together with at least five of the principal authors of the
+Document (all of its principal authors, if it has fewer than five),
+unless they release you from this requirement.
+
+@item
+State on the Title page the name of the publisher of the
+Modified Version, as the publisher.
+
+@item
+Preserve all the copyright notices of the Document.
+
+@item
+Add an appropriate copyright notice for your modifications
+adjacent to the other copyright notices.
+
+@item
+Include, immediately after the copyright notices, a license notice
+giving the public permission to use the Modified Version under the
+terms of this License, in the form shown in the Addendum below.
+
+@item
+Preserve in that license notice the full lists of Invariant Sections
+and required Cover Texts given in the Document's license notice.
+
+@item
+Include an unaltered copy of this License.
+
+@item
+Preserve the section Entitled ``History'', Preserve its Title, and add
+to it an item stating at least the title, year, new authors, and
+publisher of the Modified Version as given on the Title Page. If
+there is no section Entitled ``History'' in the Document, create one
+stating the title, year, authors, and publisher of the Document as
+given on its Title Page, then add an item describing the Modified
+Version as stated in the previous sentence.
+
+@item
+Preserve the network location, if any, given in the Document for
+public access to a Transparent copy of the Document, and likewise
+the network locations given in the Document for previous versions
+it was based on. These may be placed in the ``History'' section.
+You may omit a network location for a work that was published at
+least four years before the Document itself, or if the original
+publisher of the version it refers to gives permission.
+
+@item
+For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
+the Title of the section, and preserve in the section all the
+substance and tone of each of the contributor acknowledgements and/or
+dedications given therein.
+
+@item
+Preserve all the Invariant Sections of the Document,
+unaltered in their text and in their titles. Section numbers
+or the equivalent are not considered part of the section titles.
+
+@item
+Delete any section Entitled ``Endorsements''. Such a section
+may not be included in the Modified Version.
+
+@item
+Do not retitle any existing section to be Entitled ``Endorsements'' or
+to conflict in title with any Invariant Section.
+
+@item
+Preserve any Warranty Disclaimers.
+@end enumerate
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled ``Endorsements'', provided it contains
+nothing but endorsements of your Modified Version by various
+parties---for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+@item
+COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled ``History''
+in the various original documents, forming one section Entitled
+``History''; likewise combine any sections Entitled ``Acknowledgements'',
+and any sections Entitled ``Dedications''. You must delete all
+sections Entitled ``Endorsements.''
+
+@item
+COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+@item
+AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an ``aggregate'' if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+@item
+TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled ``Acknowledgements'',
+``Dedications'', or ``History'', the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+@item
+TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
+
+@item
+FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+@uref{http://www.gnu.org/copyleft/}.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License ``or any later version'' applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation. If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
+@item
+RELICENSING
+
+``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works. A
+public wiki that anybody can edit is an example of such a server. A
+``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
+site means any set of copyrightable works thus published on the MMC
+site.
+
+``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+
+``Incorporate'' means to publish or republish a Document, in whole or
+in part, as part of another Document.
+
+An MMC is ``eligible for relicensing'' if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole
+or in part into the MMC, (1) had no cover texts or invariant sections,
+and (2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+
+@end enumerate
+
+@page
+@heading ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+@group
+ Copyright (C) @var{year} @var{your name}.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
+ Texts. A copy of the license is included in the section entitled ``GNU
+ Free Documentation License''.
+@end group
+@end smallexample
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the ``with@dots{}Texts.'' line with this:
+
+@smallexample
+@group
+ with the Invariant Sections being @var{list their titles}, with
+ the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
+ being @var{list}.
+@end group
+@end smallexample
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
+@c Local Variables:
+@c ispell-local-pdict: "ispell-dict"
+@c End:
+
diff --git a/doc/fdl.txt b/doc/fdl.txt
new file mode 100644
index 0000000..2f7e03c
--- /dev/null
+++ b/doc/fdl.txt
@@ -0,0 +1,451 @@
+
+ GNU Free Documentation License
+ Version 1.3, 3 November 2008
+
+
+ Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+ <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+0. PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document "free" in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of "copyleft", which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+
+1. APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The "Document", below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as "you". You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A "Modified Version" of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A "Secondary Section" is a named appendix or a front-matter section of
+the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject. (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The "Invariant Sections" are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
+
+The "Cover Texts" are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A "Transparent" copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not "Transparent" is called "Opaque".
+
+Examples of suitable formats for Transparent copies include plain
+ASCII without markup, Texinfo input format, LaTeX input format, SGML
+or XML using a publicly available DTD, and standard-conforming simple
+HTML, PostScript or PDF designed for human modification. Examples of
+transparent image formats include PNG, XCF and JPG. Opaque formats
+include proprietary formats that can be read and edited only by
+proprietary word processors, SGML or XML for which the DTD and/or
+processing tools are not generally available, and the
+machine-generated HTML, PostScript or PDF produced by some word
+processors for output purposes only.
+
+The "Title Page" means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, "Title Page" means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+The "publisher" means any person or entity that distributes copies of
+the Document to the public.
+
+A section "Entitled XYZ" means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as "Acknowledgements",
+"Dedications", "Endorsements", or "History".) To "Preserve the Title"
+of such a section when you modify the Document means that it remains a
+section "Entitled XYZ" according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+2. VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no
+other conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+
+3. COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to
+give them a chance to provide you with an updated version of the
+Document.
+
+
+4. MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+A. Use in the Title Page (and on the covers, if any) a title distinct
+ from that of the Document, and from those of previous versions
+ (which should, if there were any, be listed in the History section
+ of the Document). You may use the same title as a previous version
+ if the original publisher of that version gives permission.
+B. List on the Title Page, as authors, one or more persons or entities
+ responsible for authorship of the modifications in the Modified
+ Version, together with at least five of the principal authors of the
+ Document (all of its principal authors, if it has fewer than five),
+ unless they release you from this requirement.
+C. State on the Title page the name of the publisher of the
+ Modified Version, as the publisher.
+D. Preserve all the copyright notices of the Document.
+E. Add an appropriate copyright notice for your modifications
+ adjacent to the other copyright notices.
+F. Include, immediately after the copyright notices, a license notice
+ giving the public permission to use the Modified Version under the
+ terms of this License, in the form shown in the Addendum below.
+G. Preserve in that license notice the full lists of Invariant Sections
+ and required Cover Texts given in the Document's license notice.
+H. Include an unaltered copy of this License.
+I. Preserve the section Entitled "History", Preserve its Title, and add
+ to it an item stating at least the title, year, new authors, and
+ publisher of the Modified Version as given on the Title Page. If
+ there is no section Entitled "History" in the Document, create one
+ stating the title, year, authors, and publisher of the Document as
+ given on its Title Page, then add an item describing the Modified
+ Version as stated in the previous sentence.
+J. Preserve the network location, if any, given in the Document for
+ public access to a Transparent copy of the Document, and likewise
+ the network locations given in the Document for previous versions
+ it was based on. These may be placed in the "History" section.
+ You may omit a network location for a work that was published at
+ least four years before the Document itself, or if the original
+ publisher of the version it refers to gives permission.
+K. For any section Entitled "Acknowledgements" or "Dedications",
+ Preserve the Title of the section, and preserve in the section all
+ the substance and tone of each of the contributor acknowledgements
+ and/or dedications given therein.
+L. Preserve all the Invariant Sections of the Document,
+ unaltered in their text and in their titles. Section numbers
+ or the equivalent are not considered part of the section titles.
+M. Delete any section Entitled "Endorsements". Such a section
+ may not be included in the Modified Version.
+N. Do not retitle any existing section to be Entitled "Endorsements"
+ or to conflict in title with any Invariant Section.
+O. Preserve any Warranty Disclaimers.
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled "Endorsements", provided it contains
+nothing but endorsements of your Modified Version by various
+parties--for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+
+5. COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled "History"
+in the various original documents, forming one section Entitled
+"History"; likewise combine any sections Entitled "Acknowledgements",
+and any sections Entitled "Dedications". You must delete all sections
+Entitled "Endorsements".
+
+
+6. COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other
+documents released under this License, and replace the individual
+copies of this License in the various documents with a single copy
+that is included in the collection, provided that you follow the rules
+of this License for verbatim copying of each of the documents in all
+other respects.
+
+You may extract a single document from such a collection, and
+distribute it individually under this License, provided you insert a
+copy of this License into the extracted document, and follow this
+License in all other respects regarding verbatim copying of that
+document.
+
+
+7. AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an "aggregate" if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+
+8. TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled "Acknowledgements",
+"Dedications", or "History", the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+
+9. TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
+
+
+10. FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions of the
+GNU Free Documentation License from time to time. Such new versions
+will be similar in spirit to the present version, but may differ in
+detail to address new problems or concerns. See
+http://www.gnu.org/copyleft/.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License "or any later version" applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation. If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
+11. RELICENSING
+
+"Massive Multiauthor Collaboration Site" (or "MMC Site") means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works. A
+public wiki that anybody can edit is an example of such a server. A
+"Massive Multiauthor Collaboration" (or "MMC") contained in the site
+means any set of copyrightable works thus published on the MMC site.
+
+"CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+
+"Incorporate" means to publish or republish a Document, in whole or in
+part, as part of another Document.
+
+An MMC is "eligible for relicensing" if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole or
+in part into the MMC, (1) had no cover texts or invariant sections, and
+(2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+
+
+ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+ Copyright (c) YEAR YOUR NAME.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
+ A copy of the license is included in the section entitled "GNU
+ Free Documentation License".
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the "with...Texts." line with this:
+
+ with the Invariant Sections being LIST THEIR TITLES, with the
+ Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
diff --git a/doc/htmlpost.sh b/doc/htmlpost.sh
new file mode 100755
index 0000000..51241b1
--- /dev/null
+++ b/doc/htmlpost.sh
@@ -0,0 +1,19 @@
+#! /bin/sh
+#
+# Some of these should really be done by man2html
+#
+# The ~/xxx links don't really work -- netscape doesn't expand the home
+# directory of the user running navigator
+#
+
+sed -e 's|<B>gnu.bash.bug</B>|<A HREF="news:gnu.bash.bug">gnu.bash.bug</A>|g' \
+ -e 's|<I>/bin/bash</I>|<A HREF="file:/bin/bash"><I>/bin/bash</I></A>|g' \
+ -e 's|<I>/etc/profile</I>|<A HREF="file:/etc/profile"><I>/etc/profile</I></A>|g' \
+ -e 's|<I>~/.bash_profile</I>|<A HREF="file:~/.bash_profile"><I>~/.bash_profile</I></A>|g' \
+ -e 's|<I>~/.bash_login</I>|<A HREF="file:~/.bash_login"><I>~/.bash_login</I></A>|g' \
+ -e 's|<I>~/.profile</I>|<A HREF="file:~/.profile"><I>~/.profile</I></A>|g' \
+ -e 's|<I>~/.bashrc</I>|<A HREF="file:~/.bashrc"><I>~/.bashrc</I></A>|g' \
+ -e 's|<I>~/.bash_logout</I>|<A HREF="file:~/.bash_logout"><I>~/.bash_logout</I></A>|g' \
+ -e 's|<I>~/.bash_history</I>|<A HREF="file:~/.bash_history"><I>~/.bash_history</I></A>|g' \
+ -e 's|<I>~/.inputrc</I>|<A HREF="file:~/.inputrc"><I>~/.inputrc</I></A>|g' \
+ -e 's|<I>/etc/inputrc</I>|<A HREF="file:/etc/inputrc"><I>/etc/inputrc</I></A>|g'
diff --git a/doc/infopost.sh b/doc/infopost.sh
new file mode 100755
index 0000000..85c49b4
--- /dev/null
+++ b/doc/infopost.sh
@@ -0,0 +1,8 @@
+#! /bin/sh
+#
+# Some of these should really be done by options to makeinfo or by
+# using @setfilename, but this way we can have both bashref.info and
+# bash.info (for installing)
+#
+
+sed -e 's|bashref.info|bash.info|g'
diff --git a/doc/rbash.0 b/doc/rbash.0
new file mode 100644
index 0000000..eb06220
--- /dev/null
+++ b/doc/rbash.0
@@ -0,0 +1,59 @@
+RBASH(1) RBASH(1)
+
+
+
+NNAAMMEE
+ rbash - restricted bash, see bbaasshh(1)
+
+RREESSTTRRIICCTTEEDD SSHHEELLLL
+ If bbaasshh is started with the name rrbbaasshh, or the --rr option is supplied at
+ invocation, the shell becomes restricted. A restricted shell is used
+ to set up an environment more controlled than the standard shell. It
+ behaves identically to bbaasshh with the exception that the following are
+ disallowed or not performed:
+
+ +o changing directories with ccdd
+
+ +o setting or unsetting the values of SSHHEELLLL, PPAATTHH, EENNVV, or BBAASSHH__EENNVV
+
+ +o specifying command names containing //
+
+ +o specifying a file name containing a // as an argument to the ..
+ builtin command
+
+ +o Specifying a filename containing a slash as an argument to the
+ --pp option to the hhaasshh builtin command
+
+ +o importing function definitions from the shell environment at
+ startup
+
+ +o parsing the value of SSHHEELLLLOOPPTTSS from the shell environment at
+ startup
+
+ +o redirecting output using the >, >|, <>, >&, &>, and >> redirect-
+ ion operators
+
+ +o using the eexxeecc builtin command to replace the shell with another
+ command
+
+ +o adding or deleting builtin commands with the --ff and --dd options
+ to the eennaabbllee builtin command
+
+ +o Using the eennaabbllee builtin command to enable disabled shell
+ builtins
+
+ +o specifying the --pp option to the ccoommmmaanndd builtin command
+
+ +o turning off restricted mode with sseett ++rr or sseett ++oo rreessttrriicctteedd.
+
+ These restrictions are enforced after any startup files are read.
+
+ When a command that is found to be a shell script is executed, rrbbaasshh
+ turns off any restrictions in the shell spawned to execute the script.
+
+SSEEEE AALLSSOO
+ bash(1)
+
+
+
+GNU Bash-4.0 2004 Apr 20 RBASH(1)
diff --git a/doc/rbash.1 b/doc/rbash.1
new file mode 100644
index 0000000..56e38fd
--- /dev/null
+++ b/doc/rbash.1
@@ -0,0 +1,8 @@
+.TH RBASH 1 "2004 Apr 20" "GNU Bash-4.0"
+.SH NAME
+rbash \- restricted bash, see \fBbash\fR(1)
+.SH RESTRICTED SHELL
+.nr zY 1
+.so bash.1
+.SH SEE ALSO
+bash(1)
diff --git a/doc/rbash.ps b/doc/rbash.ps
new file mode 100644
index 0000000..518087d
--- /dev/null
+++ b/doc/rbash.ps
@@ -0,0 +1,280 @@
+%!PS-Adobe-3.0
+%%Creator: groff version 1.19.2
+%%CreationDate: Wed Dec 30 13:07:37 2009
+%%DocumentNeededResources: font Times-Roman
+%%+ font Times-Bold
+%%DocumentSuppliedResources: procset grops 1.19 2
+%%Pages: 1
+%%PageOrder: Ascend
+%%DocumentMedia: Default 595 842 0 () ()
+%%Orientation: Portrait
+%%EndComments
+%%BeginDefaults
+%%PageMedia: Default
+%%EndDefaults
+%%BeginProlog
+%%BeginResource: procset grops 1.19 2
+%!PS-Adobe-3.0 Resource-ProcSet
+/setpacking where{
+pop
+currentpacking
+true setpacking
+}if
+/grops 120 dict dup begin
+/SC 32 def
+/A/show load def
+/B{0 SC 3 -1 roll widthshow}bind def
+/C{0 exch ashow}bind def
+/D{0 exch 0 SC 5 2 roll awidthshow}bind def
+/E{0 rmoveto show}bind def
+/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
+/G{0 rmoveto 0 exch ashow}bind def
+/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/I{0 exch rmoveto show}bind def
+/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
+/K{0 exch rmoveto 0 exch ashow}bind def
+/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/M{rmoveto show}bind def
+/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
+/O{rmoveto 0 exch ashow}bind def
+/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/Q{moveto show}bind def
+/R{moveto 0 SC 3 -1 roll widthshow}bind def
+/S{moveto 0 exch ashow}bind def
+/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/SF{
+findfont exch
+[exch dup 0 exch 0 exch neg 0 0]makefont
+dup setfont
+[exch/setfont cvx]cvx bind def
+}bind def
+/MF{
+findfont
+[5 2 roll
+0 3 1 roll
+neg 0 0]makefont
+dup setfont
+[exch/setfont cvx]cvx bind def
+}bind def
+/level0 0 def
+/RES 0 def
+/PL 0 def
+/LS 0 def
+/MANUAL{
+statusdict begin/manualfeed true store end
+}bind def
+/PLG{
+gsave newpath clippath pathbbox grestore
+exch pop add exch pop
+}bind def
+/BP{
+/level0 save def
+1 setlinecap
+1 setlinejoin
+72 RES div dup scale
+LS{
+90 rotate
+}{
+0 PL translate
+}ifelse
+1 -1 scale
+}bind def
+/EP{
+level0 restore
+showpage
+}def
+/DA{
+newpath arcn stroke
+}bind def
+/SN{
+transform
+.25 sub exch .25 sub exch
+round .25 add exch round .25 add exch
+itransform
+}bind def
+/DL{
+SN
+moveto
+SN
+lineto stroke
+}bind def
+/DC{
+newpath 0 360 arc closepath
+}bind def
+/TM matrix def
+/DE{
+TM currentmatrix pop
+translate scale newpath 0 0 .5 0 360 arc closepath
+TM setmatrix
+}bind def
+/RC/rcurveto load def
+/RL/rlineto load def
+/ST/stroke load def
+/MT/moveto load def
+/CL/closepath load def
+/Fr{
+setrgbcolor fill
+}bind def
+/setcmykcolor where{
+pop
+/Fk{
+setcmykcolor fill
+}bind def
+}if
+/Fg{
+setgray fill
+}bind def
+/FL/fill load def
+/LW/setlinewidth load def
+/Cr/setrgbcolor load def
+/setcmykcolor where{
+pop
+/Ck/setcmykcolor load def
+}if
+/Cg/setgray load def
+/RE{
+findfont
+dup maxlength 1 index/FontName known not{1 add}if dict begin
+{
+1 index/FID ne{def}{pop pop}ifelse
+}forall
+/Encoding exch def
+dup/FontName exch def
+currentdict end definefont pop
+}bind def
+/DEFS 0 def
+/EBEGIN{
+moveto
+DEFS begin
+}bind def
+/EEND/end load def
+/CNT 0 def
+/level1 0 def
+/PBEGIN{
+/level1 save def
+translate
+div 3 1 roll div exch scale
+neg exch neg exch translate
+0 setgray
+0 setlinecap
+1 setlinewidth
+0 setlinejoin
+10 setmiterlimit
+[]0 setdash
+/setstrokeadjust where{
+pop
+false setstrokeadjust
+}if
+/setoverprint where{
+pop
+false setoverprint
+}if
+newpath
+/CNT countdictstack def
+userdict begin
+/showpage{}def
+/setpagedevice{}def
+}bind def
+/PEND{
+countdictstack CNT sub{end}repeat
+level1 restore
+}bind def
+end def
+/setpacking where{
+pop
+setpacking
+}if
+%%EndResource
+%%EndProlog
+%%BeginSetup
+%%BeginFeature: *PageSize Default
+<< /PageSize [ 595 842 ] /ImagingBBox null >> setpagedevice
+%%EndFeature
+%%IncludeResource: font Times-Roman
+%%IncludeResource: font Times-Bold
+grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72
+def/PL 841.89 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron
+/Zcaron/scaron/zcaron/Ydieresis/trademark/quotesingle/Euro/.notdef
+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
+/.notdef/.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent
+/ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen
+/period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon
+/semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O
+/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex
+/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y
+/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft
+/guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl
+/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
+/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
+/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen
+/brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft
+/logicalnot/minus/registered/macron/degree/plusminus/twosuperior
+/threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior
+/ordmasculine/guilsinglright/onequarter/onehalf/threequarters
+/questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE
+/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex
+/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
+/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
+/germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
+/egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
+/eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash
+/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def
+/Times-Bold@0 ENC0/Times-Bold RE/Times-Roman@0 ENC0/Times-Roman RE
+%%EndSetup
+%%Page: 1 1
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF(RB)72 48 Q 376.2(ASH\(1\) RB)-.35 F(ASH\(1\))
+-.35 E/F1 10.95/Times-Bold@0 SF -.219(NA)72 84 S(ME).219 E F0
+(rbash \255 restricted bash, see)108 96 Q/F2 10/Times-Bold@0 SF(bash)2.5
+E F0(\(1\))A F1(RESTRICTED SHELL)72 112.8 Q F0(If)108 124.8 Q F2(bash)
+4.397 E F0 1.897(is started with the name)4.397 F F2(rbash)4.397 E F0
+4.397(,o)C 4.397(rt)-4.397 G(he)-4.397 E F2<ad72>4.397 E F0 1.896
+(option is supplied at in)4.397 F -.2(vo)-.4 G 1.896
+(cation, the shell becomes).2 F 3.445(restricted. A)108 136.8 R .945
+(restricted shell is used to set up an en)3.445 F .946
+(vironment more controlled than the standard shell.)-.4 F(It)5.946 E
+(beha)108 148.8 Q -.15(ve)-.2 G 2.5(si).15 G(dentically to)-2.5 E F2
+(bash)2.5 E F0(with the e)2.5 E(xception that the follo)-.15 E
+(wing are disallo)-.25 E(wed or not performed:)-.25 E 32.5<8363>108
+165.6 S(hanging directories with)-32.5 E F2(cd)2.5 E F0 32.5<8373>108
+182.4 S(etting or unsetting the v)-32.5 E(alues of)-.25 E/F3 9
+/Times-Bold@0 SF(SHELL)2.5 E/F4 9/Times-Roman@0 SF(,)A F3 -.666(PA)2.25
+G(TH)-.189 E F4(,)A F3(ENV)2.25 E F4(,)A F0(or)2.25 E F3 -.27(BA)2.5 G
+(SH_ENV).27 E F0 32.5<8373>108 199.2 S
+(pecifying command names containing)-32.5 E F2(/)2.5 E F0 32.5<8373>108
+216 S(pecifying a \214le name containing a)-32.5 E F2(/)2.5 E F0
+(as an ar)2.5 E(gument to the)-.18 E F2(.)2.5 E F0 -.2(bu)5 G
+(iltin command).2 E 32.5<8353>108 232.8 S .351
+(pecifying a \214lename containing a slash as an ar)-32.5 F .351
+(gument to the)-.18 F F2<ad70>2.851 E F0 .351(option to the)2.851 F F2
+(hash)2.851 E F0 -.2(bu)2.851 G .351(iltin com-).2 F(mand)144 244.8 Q
+32.5<8369>108 261.6 S(mporting function de\214nitions from the shell en)
+-32.5 E(vironment at startup)-.4 E 32.5<8370>108 278.4 S(arsing the v)
+-32.5 E(alue of)-.25 E F3(SHELLOPTS)2.5 E F0(from the shell en)2.25 E
+(vironment at startup)-.4 E 32.5<8372>108 295.2 S(edirecting output usi\
+ng the >, >|, <>, >&, &>, and >> redirection operators)-32.5 E 32.5
+<8375>108 312 S(sing the)-32.5 E F2(exec)2.5 E F0 -.2(bu)2.5 G
+(iltin command to replace the shell with another command).2 E 32.5<8361>
+108 328.8 S(dding or deleting b)-32.5 E(uiltin commands with the)-.2 E
+F2<ad66>2.5 E F0(and)2.5 E F2<ad64>2.5 E F0(options to the)2.5 E F2
+(enable)2.5 E F0 -.2(bu)2.5 G(iltin command).2 E 32.5<8355>108 345.6 S
+(sing the)-32.5 E F2(enable)2.5 E F0 -.2(bu)2.5 G
+(iltin command to enable disabled shell b).2 E(uiltins)-.2 E 32.5<8373>
+108 362.4 S(pecifying the)-32.5 E F2<ad70>2.5 E F0(option to the)2.5 E
+F2(command)2.5 E F0 -.2(bu)2.5 G(iltin command).2 E 32.5<8374>108 379.2
+S(urning of)-32.5 E 2.5(fr)-.25 G(estricted mode with)-2.5 E F2(set +r)
+2.5 E F0(or)2.5 E F2(set +o r)2.5 E(estricted)-.18 E F0(.)A
+(These restrictions are enforced after an)108 396 Q 2.5(ys)-.15 G
+(tartup \214les are read.)-2.5 E .429
+(When a command that is found to be a shell script is e)108 412.8 R -.15
+(xe)-.15 G(cuted,).15 E F2(rbash)2.929 E F0 .429(turns of)2.929 F 2.929
+(fa)-.25 G .729 -.15(ny r)-2.929 H .429(estrictions in the shell).15 F
+(spa)108 424.8 Q(wned to e)-.15 E -.15(xe)-.15 G(cute the script.).15 E
+F1(SEE ALSO)72 441.6 Q F0(bash\(1\))108 453.6 Q(GNU Bash-4.0)72 768 Q
+(2004 Apr 20)148.735 E(1)203.725 E 0 Cg EP
+%%Trailer
+end
+%%EOF
diff --git a/doc/rose94.pdf b/doc/rose94.pdf
new file mode 100644
index 0000000..1772f54
--- /dev/null
+++ b/doc/rose94.pdf
Binary files differ
diff --git a/doc/rose94.ps b/doc/rose94.ps
new file mode 100644
index 0000000..1fff283
--- /dev/null
+++ b/doc/rose94.ps
@@ -0,0 +1,1581 @@
+%!PS-Adobe-3.0
+%%Creator: groff version 1.08
+%%DocumentNeededResources: font Times-Bold
+%%+ font Times-Italic
+%%+ font Times-Roman
+%%+ font Courier
+%%+ font Symbol
+%%DocumentSuppliedResources: procset grops 1.08 0
+%%Pages: 13
+%%PageOrder: Ascend
+%%Orientation: Portrait
+%%EndComments
+%%BeginProlog
+%%BeginResource: procset grops 1.08 0
+/setpacking where{
+pop
+currentpacking
+true setpacking
+}if
+/grops 120 dict dup begin
+/SC 32 def
+/A/show load def
+/B{0 SC 3 -1 roll widthshow}bind def
+/C{0 exch ashow}bind def
+/D{0 exch 0 SC 5 2 roll awidthshow}bind def
+/E{0 rmoveto show}bind def
+/F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def
+/G{0 rmoveto 0 exch ashow}bind def
+/H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/I{0 exch rmoveto show}bind def
+/J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def
+/K{0 exch rmoveto 0 exch ashow}bind def
+/L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/M{rmoveto show}bind def
+/N{rmoveto 0 SC 3 -1 roll widthshow}bind def
+/O{rmoveto 0 exch ashow}bind def
+/P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/Q{moveto show}bind def
+/R{moveto 0 SC 3 -1 roll widthshow}bind def
+/S{moveto 0 exch ashow}bind def
+/T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def
+/SF{
+findfont exch
+[exch dup 0 exch 0 exch neg 0 0]makefont
+dup setfont
+[exch/setfont cvx]cvx bind def
+}bind def
+/MF{
+findfont
+[5 2 roll
+0 3 1 roll
+neg 0 0]makefont
+dup setfont
+[exch/setfont cvx]cvx bind def
+}bind def
+/level0 0 def
+/RES 0 def
+/PL 0 def
+/LS 0 def
+/PLG{
+gsave newpath clippath pathbbox grestore
+exch pop add exch pop
+}bind def
+/BP{
+/level0 save def
+1 setlinecap
+1 setlinejoin
+72 RES div dup scale
+LS{
+90 rotate
+}{
+0 PL translate
+}ifelse
+1 -1 scale
+}bind def
+/EP{
+level0 restore
+showpage
+}bind def
+/DA{
+newpath arcn stroke
+}bind def
+/SN{
+transform
+.25 sub exch .25 sub exch
+round .25 add exch round .25 add exch
+itransform
+}bind def
+/DL{
+SN
+moveto
+SN
+lineto stroke
+}bind def
+/DC{
+newpath 0 360 arc closepath
+}bind def
+/TM matrix def
+/DE{
+TM currentmatrix pop
+translate scale newpath 0 0 .5 0 360 arc closepath
+TM setmatrix
+}bind def
+/RC/rcurveto load def
+/RL/rlineto load def
+/ST/stroke load def
+/MT/moveto load def
+/CL/closepath load def
+/FL{
+currentgray exch setgray fill setgray
+}bind def
+/BL/fill load def
+/LW/setlinewidth load def
+/RE{
+findfont
+dup maxlength 1 index/FontName known not{1 add}if dict begin
+{
+1 index/FID ne{def}{pop pop}ifelse
+}forall
+/Encoding exch def
+dup/FontName exch def
+currentdict end definefont pop
+}bind def
+/DEFS 0 def
+/EBEGIN{
+moveto
+DEFS begin
+}bind def
+/EEND/end load def
+/CNT 0 def
+/level1 0 def
+/PBEGIN{
+/level1 save def
+translate
+div 3 1 roll div exch scale
+neg exch neg exch translate
+0 setgray
+0 setlinecap
+1 setlinewidth
+0 setlinejoin
+10 setmiterlimit
+[]0 setdash
+/setstrokeadjust where{
+pop
+false setstrokeadjust
+}if
+/setoverprint where{
+pop
+false setoverprint
+}if
+newpath
+/CNT countdictstack def
+userdict begin
+/showpage{}def
+}bind def
+/PEND{
+clear
+countdictstack CNT sub{end}repeat
+level1 restore
+}bind def
+end def
+/setpacking where{
+pop
+setpacking
+}if
+%%EndResource
+%%IncludeResource: font Times-Bold
+%%IncludeResource: font Times-Italic
+%%IncludeResource: font Times-Roman
+%%IncludeResource: font Courier
+%%IncludeResource: font Symbol
+grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL
+792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron/scaron/zcaron
+/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef/.notdef/.notdef
+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
+/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space
+/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright/parenleft
+/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one/two/three/four
+/five/six/seven/eight/nine/colon/semicolon/less/equal/greater/question/at/A/B/C
+/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash
+/bracketright/circumflex/underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q
+/r/s/t/u/v/w/x/y/z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase
+/guillemotleft/guillemotright/bullet/florin/fraction/perthousand/dagger
+/daggerdbl/endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut
+/dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash
+/quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen/brokenbar
+/section/dieresis/copyright/ordfeminine/guilsinglleft/logicalnot/minus
+/registered/macron/degree/plusminus/twosuperior/threesuperior/acute/mu
+/paragraph/periodcentered/cedilla/onesuperior/ordmasculine/guilsinglright
+/onequarter/onehalf/threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde
+/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute
+/Icircumflex/Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis
+/multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
+/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla/egrave/eacute
+/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis/eth/ntilde/ograve
+/oacute/ocircumflex/otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex
+/udieresis/yacute/thorn/ydieresis]def/Courier@0 ENC0/Courier RE/Times-Roman@0
+ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE/Times-Bold@0 ENC0
+/Times-Bold RE
+%%EndProlog
+%%Page: 1 1
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 12/Times-Bold@0 SF(Bash, the Bour)210.99 123 Q(ne\255Again Shell)-.18 E/F1
+10/Times-Italic@0 SF(Chet Rame)263.85 147 Q(y)-.3 E(Case W)221.72 159 Q
+(estern Reserve Univer)-.92 E(sity)-.1 E -.15(ch)250.425 171 S(et@po.cwru.edu)
+.15 E(ABSTRA)264.535 213 Q(CT)-.3 E/F2 10/Times-Roman@0 SF .019(An o)133 237 R
+-.15(ve)-.15 G(rvie).15 E 2.519(wo)-.25 G 2.519(f/)191.918 237 S .018
+(bin/sh\255compatible shells is presented, as well as an introduction to)
+200.547 237 R .128(the POSIX.2 shell and tools standard.)108 249 R .128
+(These serv)5.128 F 2.628(ea)-.15 G 2.628(sa)318.562 249 S 2.628(ni)329.52 249
+S .128(ntroduction to bash.)339.928 249 R 2.628(Ac)5.128 G(ompar)439.32 249 Q
+(-)-.2 E .188(ison of bash to sh and ksh is presented, as well as a discussion\
+ of features unique to bash.)108 261 R(Finally)108 273 Q 3.178(,s)-.65 G .678
+(ome of the changes and ne)145.258 273 R 3.178(wf)-.25 G .678
+(eatures to appear in the ne)268.486 273 R .678(xt bash release will be)-.15 F
+(discussed.)108 285 Q/F3 10/Times-Bold@0 SF 2.5(1. Intr)72 321 R(oduction)-.18
+E(Bash)97 336.6 Q F2 .904(is the shell, or command language interpreter)3.404 F
+3.404(,t)-.4 G .904(hat will appear in the GNU operating system.)316.032 336.6
+R .782(The name is an acron)72 348.6 R .782(ym for the `)-.15 F(`Bourne\255Ag)
+-.74 E .782(ain SHell')-.05 F .782(', a pun on Ste)-.74 F 1.082 -.15(ve B)-.25
+H .783(ourne, the author of the direct).15 F .212(ancestor of the current)72
+360.6 R/F4 9/Times-Roman@0 SF(UNIX)2.712 E F2 2.712<8773>C(hell)199.131 360.6 Q
+F1(/bin/sh)2.712 E F2 2.712(,w)C .212(hich appeared in the Se)256.505 360.6 R
+-.15(ve)-.25 G .211(nth Edition Bell Labs Research v).15 F(er)-.15 E(-)-.2 E
+(sion of)72 372.6 Q F4(UNIX)2.5 E F2([1].).833 E .191(Bash is an)97 388.2 R F3
+(sh)2.691 E F2 .192
+(\255compatible shell that incorporates useful features from the K)B .192
+(orn shell \()-.35 F F3(ksh)A F2 .833(\)[)C .192(2] and the)-.833 F 2.767(Cs)72
+400.2 S .267(hell \()85.327 400.2 R F3(csh)A F2 .833(\)[)C .267
+(3], described later in this article.)-.833 F .266
+(It is ultimately intended to be a conformant implementation)5.267 F 1.965
+(of the IEEE POSIX Shell and T)72 412.2 R 1.966(ools speci\214cation \(IEEE W)
+-.8 F 1.966(orking Group 1003.2\).)-.8 F 1.966(It of)6.966 F 1.966
+(fers functional)-.25 F(impro)72 424.2 Q -.15(ve)-.15 G(ments o).15 E -.15(ve)
+-.15 G 2.5(rs).15 G 2.5(hf)155.28 424.2 S(or both interacti)166.11 424.2 Q .3
+-.15(ve a)-.25 H(nd programming use.).15 E .802
+(While the GNU operating system will most lik)97 439.8 R .801(ely include a v)
+-.1 F .801(ersion of the Berk)-.15 F(ele)-.1 E 3.301(ys)-.15 G .801
+(hell csh, bash)448.238 439.8 R .108(will be the def)72 451.8 R .108
+(ault shell.)-.1 F(Lik)5.108 E 2.608(eo)-.1 G .108(ther GNU softw)199.658 451.8
+R .108(are, bash is quite portable.)-.1 F .109(It currently runs on nearly e)
+5.109 F -.15(ve)-.25 G(ry).15 E -.15(ve)72 463.8 S .367(rsion of).15 F F4(UNIX)
+2.867 E F2 .367(and a fe)2.867 F 2.867(wo)-.25 G .367
+(ther operating systems \255 an independently-supported port e)187.933 463.8 R
+.366(xists for OS/2, and)-.15 F .706(there are rumors of ports to DOS and W)72
+475.8 R(indo)-.4 E .706(ws NT)-.25 F 5.706(.P)-.74 G .706(orts to)295.97 475.8
+R F4(UNIX)3.206 E F2(-lik)A 3.206(es)-.1 G .706(ystems such as QNX and Minix)
+372.979 475.8 R(are part of the distrib)72 487.8 Q(ution.)-.2 E .51
+(The original author of bash w)97 503.4 R .51(as Brian F)-.1 F .509
+(ox, an emplo)-.15 F .509(yee of the Free Softw)-.1 F .509(are F)-.1 F 3.009
+(oundation. The)-.15 F(cur)3.009 E(-)-.2 E(rent de)72 515.4 Q -.15(ve)-.25 G
+(loper and maintainer is Chet Rame).15 E 1.3 -.65(y, a v)-.15 H(olunteer who w)
+.45 E(orks at Case W)-.1 E(estern Reserv)-.8 E 2.5(eU)-.15 G(ni)458.91 515.4 Q
+-.15(ve)-.25 G(rsity).15 E(.)-.65 E F3 2.5(2. What)72 539.4 R(is a shell?)2.5 E
+F2 1.241(At its base, a shell is simply a macro processor that e)97 555 R -.15
+(xe)-.15 G 1.242(cutes commands.).15 F(A)6.242 E F4(UNIX)3.742 E F2 1.242
+(shell is both a)3.742 F .189(command interpreter)72 567 R 2.688(,w)-.4 G .188
+(hich pro)167.787 567 R .188(vides the user interf)-.15 F .188
+(ace to the rich set of)-.1 F F4(UNIX)2.688 E F2 .188
+(utilities, and a programming)2.688 F .751(language, allo)72 579 R .752
+(wing these utilitites to be combined.)-.25 F .752
+(The shell reads commands either from a terminal or a)5.752 F 2.52
+(\214le. Files)72 591 R .019
+(containing commands can be created, and become commands themselv)2.52 F 2.519
+(es. These)-.15 F(ne)2.519 E 2.519(wc)-.25 G(ommands)465.11 591 Q(ha)72 603 Q
+.395 -.15(ve t)-.2 H .095(he same status as system commands in directories lik)
+.15 F(e)-.1 E F3(/bin)2.595 E F2 2.595(,a)C(llo)342.575 603 Q .096
+(wing users or groups to establish cus-)-.25 F(tom en)72 615 Q(vironments.)-.4
+E F3 2.5(2.1. Command)72 639 R(Inter)2.5 E(pr)-.1 E(eter)-.18 E F2 2.926(As)97
+654.6 S .426(hell allo)111.036 654.6 R .426(ws e)-.25 F -.15(xe)-.15 G .426
+(cution of).15 F F4(UNIX)2.926 E F2 .426
+(commands, both synchronously and asynchronously)2.926 F 5.425(.T)-.65 G(he)
+460.165 654.6 Q F1 -.37(re)2.925 G(dir).37 E(ec-)-.37 E(tion)72 666.6 Q F2 .334
+(constructs permit \214ne-grained control of the input and output of those com\
+mands, and the shell allo)2.833 F(ws)-.25 E .559(control o)72 678.6 R -.15(ve)
+-.15 G 3.058(rt).15 G .558(he contents of their en)126.697 678.6 R(vironment.)
+-.4 E F4(UNIX)5.558 E F2 .558(shells also pro)3.058 F .558
+(vide a small set of b)-.15 F .558(uilt-in commands)-.2 F(\()72 690.6 Q F1 -.2
+(bu)C(iltins).2 E F2 4.611(\)i)C 2.112
+(mplementing functionality impossible \(e.g.,)115.861 690.6 R F3(cd)4.612 E F2
+(,)A F3(br)4.612 E(eak)-.18 E F2(,)A F3(continue)4.612 E F2 4.612(,a)C(nd)
+399.074 690.6 Q F3(exec)4.612 E F2 4.612(\)o)C 4.612(ri)444.948 690.6 S(ncon)
+455.67 690.6 Q -.15(ve)-.4 G(nient).15 E .32 LW 76 700.6 72 700.6 DL 80 700.6
+76 700.6 DL 84 700.6 80 700.6 DL 88 700.6 84 700.6 DL 92 700.6 88 700.6 DL 96
+700.6 92 700.6 DL 100 700.6 96 700.6 DL 104 700.6 100 700.6 DL 108 700.6 104
+700.6 DL 112 700.6 108 700.6 DL 116 700.6 112 700.6 DL 120 700.6 116 700.6 DL
+124 700.6 120 700.6 DL 128 700.6 124 700.6 DL 132 700.6 128 700.6 DL 136 700.6
+132 700.6 DL 140 700.6 136 700.6 DL 144 700.6 140 700.6 DL/F5 8/Times-Roman@0
+SF 2<8755>72 710.6 S(NIX is a trademark of X/OPEN)83.776 710.6 Q EP
+%%Page: 2 2
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF 2.5(-2-)279.67 48 S(\()72 84 Q/F1 10/Times-Bold@0 SF
+(history)A F0(,)A F1(getopts)3.505 E F0(,)A F1(kill)3.505 E F0 3.505(,o)C(r)
+172.795 84 Q F1(pwd)3.505 E F0 3.505(,f)C 1.005(or e)207.305 84 R 1.005
+(xample\) to obtain via separate utilities.)-.15 F 1.005
+(Shells may be used interac-)6.005 F(ti)72 96 Q -.15(ve)-.25 G
+(ly or non-interacti).15 E -.15(ve)-.25 G 2.5(ly: the).15 F 2.5(ya)-.15 G
+(ccept input typed from the k)207.42 96 Q -.15(ey)-.1 G
+(board or from a \214le.).15 E F1 2.5(2.2. Pr)72 120 R(ogramming Language)-.18
+E F0 .501(While e)97 135.6 R -.15(xe)-.15 G .501
+(cuting commands is essential, most of the po).15 F .501(wer \(and comple)-.25
+F .502(xity\) of shells is due to their)-.15 F .05
+(embedded programming languages.)72 147.6 R(Lik)5.049 E 2.549(ea)-.1 G .349
+-.15(ny h)245.398 147.6 T(igh-le).15 E -.15(ve)-.25 G 2.549(ll).15 G .049
+(anguage, the shell pro)303.276 147.6 R .049(vides v)-.15 F .049
+(ariables, \215o)-.25 F 2.549(wc)-.25 G(ontrol)480.11 147.6 Q
+(constructs, quoting, and functions.)72 159.6 Q .475
+(The basic syntactic element is a)97 175.2 R/F2 10/Times-Italic@0 SF .475
+(simple command)2.975 F F0 5.475(.A)C .475
+(simple command consists of an optional set of)315.405 175.2 R -.25(va)72 187.2
+S .525(riable assignments, a command w).25 F .525
+(ord, and an optional list of ar)-.1 F 3.024(guments. Operators)-.18 F .524
+(to redirect input and)3.024 F(output may appear an)72 199.2 Q
+(ywhere in a simple command.)-.15 E(Some e)5 E(xamples are:)-.15 E/F3 10
+/Courier@0 SF(who)97 211.2 Q(trn -e -S1 -N)97 223.2 Q(ls -l /bin > binfiles)97
+235.2 Q(make > make.out 2>make.errs)97 247.2 Q F0 2.518(Ap)97 262.8 S .018
+(ipeline is a sequence of tw)111.738 262.8 R 2.518(oo)-.1 G 2.518(rm)230.056
+262.8 S .018(ore commands separated by the character)243.684 262.8 R/F4 10
+/Symbol SF<ef>2.519 E F0 5.019(.T)C .019(he standard output)430.082 262.8 R
+(of the \214rst command is connected to the standard input of the second.)72
+274.8 Q(Examples of pipelines include:)5 E F3(who | wc -l)97 286.8 Q
+(ls -l | sort +3nr)97 298.8 Q F0 .578
+(Simple commands and pipelines may be combined into)97 314.4 R F2(lists)3.078 E
+F0 5.578(.A)C .578(list is a sequence of pipelines sepa-)360.002 314.4 R .289
+(rated by one of)72 326.4 R F1(;)2.789 E F0(,)A F1(&)2.789 E F0(,)A F1(&&)2.789
+E F0 2.789(,o)C(r)185.103 326.4 Q F4<efef>2.789 E F0 2.789(,a)C .289
+(nd optionally terminated by)210.831 326.4 R F1(;)2.789 E F0(,)A F1(&)2.789 E
+F0 2.789(,o)C 2.789(ran)352.555 326.4 S -.25(ew)370.903 326.4 S 2.789
+(line. Commands).25 F .289(separated by)2.789 F F1(;)72 338.4 Q F0 .336(are e)
+2.836 F -.15(xe)-.15 G .336(cuted sequentially; the shell w).15 F .335
+(aits for each to complete in turn.)-.1 F .335(If a command is terminated by)
+5.335 F F1(&)2.835 E F0(,)A .007(the shell e)72 350.4 R -.15(xe)-.15 G .007
+(cutes it in the).15 F F2(bac)2.507 E(kgr)-.2 E(ound)-.45 E F0 2.508(,a)1.666 G
+.008(nd does not w)236.076 350.4 R .008(ait for it to \214nish.)-.1 F .008
+(If tw)5.008 F 2.508(oc)-.1 G .008(ommands are separated by)397.616 350.4 R F1
+(&&)72 362.4 Q F0 3.008(,t)C .508(he second command e)96.948 362.4 R -.15(xe)
+-.15 G .508(cutes only if the \214rst command succeeds.).15 F 3.007(As)5.508 G
+.507(eparator of)383.575 362.4 R F4<efef>3.007 E F0 .507(causes the sec-)3.007
+F(ond command to e)72 374.4 Q -.15(xe)-.15 G(cute only if the \214rst f).15 E
+2.5(ails. Some)-.1 F -.15(ex)2.5 G(amples are:).15 E F3(who ; date)97 386.4 Q
+(cd /usr/src || exit 1)97 398.4 Q(cd "$@" && xtitle $HOST: $PWD)97 410.4 Q F0
+1.36(The shell programming language pro)97 426 R 1.361(vides a v)-.15 F 1.361
+(ariety of \215o)-.25 F 3.861(wc)-.25 G 1.361(ontrol structures.)353.276 426 R
+(The)6.361 E F1 -.25(fo)3.861 G(r).25 E F0(command)3.861 E(allo)72 438 Q .654
+(ws a list of commands to be e)-.25 F -.15(xe)-.15 G .654
+(cuted once for each w).15 F .654(ord in a w)-.1 F .654(ord list.)-.1 F(The)
+5.654 E F1(case)3.154 E F0 .654(command allo)3.154 F .654(ws a)-.25 F .627
+(list to be e)72 450 R -.15(xe)-.15 G .628(cuted if a w).15 F .628
+(ord matches a speci\214ed pattern.)-.1 F(The)5.628 E F1(while)3.128 E F0(and)
+3.128 E F1(until)3.128 E F0 .628(commands e)3.128 F -.15(xe)-.15 G .628
+(cute a list of).15 F 1.559
+(commands as long as a guard command completes successfully or f)72 462 R 1.559
+(ails, respecti)-.1 F -.15(ve)-.25 G(ly).15 E 6.559(.T)-.65 G(he)440.892 462 Q
+F1(if)4.059 E F0(command)4.059 E(allo)72 474 Q(ws e)-.25 E -.15(xe)-.15 G
+(cution of dif).15 E(ferent command lists depending on the e)-.25 E
+(xit status of a guard command.)-.15 E(A)97 489.6 Q F2 .385(shell function)
+2.885 F F0 .385(associates a list of commands with a name.)2.885 F .386
+(Each time the name is used as a simple)5.385 F .938(command, the list is e)72
+501.6 R -.15(xe)-.15 G 3.438(cuted. This).15 F -.15(exe)3.438 G .938
+(cution tak).15 F .938(es place in the current shell conte)-.1 F .937
+(xt; no ne)-.15 F 3.437(wp)-.25 G .937(rocess is)468.903 501.6 R 2.5
+(created. Functions)72 513.6 R(may ha)2.5 E .3 -.15(ve t)-.2 H(heir o).15 E
+(wn ar)-.25 E(gument lists and local v)-.18 E(ariables, and may be recursi)-.25
+E -.15(ve)-.25 G(.).15 E .722(The shell language pro)97 529.2 R .722(vides v)
+-.15 F .722(ariables, which may be both set and referenced.)-.25 F 3.222(An)
+5.722 G .722(umber of special)435.906 529.2 R 1.02
+(parameters are present, such as)72 541.2 R F1($@)3.519 E F0 3.519(,w)C 1.019
+(hich returns the shell')231.257 541.2 R 3.519(sp)-.55 G 1.019
+(ositional parameters \(command-line ar)333.103 541.2 R(gu-)-.18 E(ments\),)72
+553.2 Q F1($?)2.906 E F0 2.906(,t)C .406(he e)122.812 553.2 R .406
+(xit status of the pre)-.15 F .406(vious command, and)-.25 F F1($$)2.906 E F0
+2.906(,t)C .406(he shell')322.436 553.2 R 2.906(sp)-.55 G .406(rocess I.D.)
+368.248 553.2 R .407(In addition to pro)5.406 F(vid-)-.15 E .129
+(ing special parameters and user)72 565.2 R .129(-de\214ned v)-.2 F .129
+(ariables, the shell permits the v)-.25 F .128(alues of certain v)-.25 F .128
+(ariables to control)-.25 F .16(its beha)72 577.2 R(vior)-.2 E 5.16(.S)-.55 G
+.16(ome of these v)131.57 577.2 R .16(ariables include)-.25 F F1(IFS)2.661 E F0
+2.661(,w)C .161(hich controls ho)284.202 577.2 R 2.661(wt)-.25 G .161
+(he shell splits w)361.375 577.2 R(ords,)-.1 E F1 -.74(PA)2.661 G(TH)-.21 E F0
+2.661(,w)C(hich)486.78 577.2 Q .392
+(tells the shell where to look for commands, and)72 589.2 R F1(PS1)2.892 E F0
+2.892(,w)C .392(hose v)297.01 589.2 R .392
+(alue is the string the shell uses to prompt for)-.25 F 3.371(commands. There)
+72 601.2 R .871(are a fe)3.371 F 3.371(wv)-.25 G .871(ariables whose v)196.645
+601.2 R .871(alues are set by the shell and normally only referenced by)-.25 F
+(users;)72 613.2 Q F1(PWD)3.663 E F0 3.663(,w)C 1.163(hose v)135.706 613.2 R
+1.163(alue is the pathname of the shell')-.25 F 3.662(sc)-.55 G 1.162(urrent w)
+313.068 613.2 R 1.162(orking directory)-.1 F 3.662(,i)-.65 G 3.662(so)421.894
+613.2 S 1.162(ne such v)434.446 613.2 R(ariable.)-.25 E -1.11(Va)72 625.2 S
+.008(riables can be used in nearly an)1.11 F 2.509(ys)-.15 G .009(hell conte)
+219.37 625.2 R .009(xt and are particularly v)-.15 F .009
+(aluable when used with control struc-)-.25 F(tures.)72 637.2 Q .583
+(There are se)97 652.8 R -.15(ve)-.25 G .583(ral shell).15 F F2 -.2(ex)3.083 G
+(pansions).2 E F0 5.583(.A)C -.25(va)254.298 652.8 S(riable).25 E F2(name)3.083
+E F0 .583(is e)3.083 F .582(xpanded to its v)-.15 F .582(alue using ${)-.25 F
+F2(name)A F0 .582(}, where)B 1.387(the braces are optional.)72 664.8 R 1.387
+(There are a number of parameter e)6.387 F 1.388(xpansions a)-.15 F -.25(va)-.2
+G 3.888(ilable. F).25 F 1.388(or e)-.15 F 1.388(xample, there are)-.15 F(${)72
+676.8 Q F2(name)A F0<3aad>A F2(wor)A(d)-.37 E F0 .891(}, which e)B .891
+(xpands to)-.15 F F2(wor)3.391 E(d)-.37 E F0(if)3.391 E F2(name)3.391 E F0 .891
+(is unset or null, and the in)3.391 F -.15(ve)-.4 G .89(rse ${).15 F F2(name)A
+F0(:+)A F2(wor)A(d)-.37 E F0 .89(}, which)B -.15(ex)72 688.8 S 1.203(pands to)
+.15 F F2(wor)3.703 E(d)-.37 E F0(if)3.703 E F2(name)3.703 E F0 1.203
+(is set and not null.)3.703 F F2 1.203(Command substitution)6.203 F F0(allo)
+3.703 E 1.204(ws the output of a command to)-.25 F .918
+(replace the command name.)72 700.8 R .918(The syntax is `)5.918 F F2(command)A
+F0(`.)A F2(Command)5.918 E F0 .918(is e)3.418 F -.15(xe)-.15 G .918
+(cuted and it and the backquotes).15 F .299
+(are replaced by its output, with trailing ne)72 712.8 R .299(wlines remo)-.25
+F -.15(ve)-.15 G(d.).15 E F2 -.8(Pa)5.299 G .299(thname e).8 F(xpansion)-.2 E
+F0 .299(is a w)2.799 F .299(ay to e)-.1 F .299(xpand a w)-.15 F(ord)-.1 E 1.586
+(to a set of \214lenames.)72 724.8 R -.8(Wo)6.586 G 1.586(rds are re).8 F -.05
+(ga)-.15 G 1.586(rded as patterns, in which the characters).05 F F1(*)4.086 E
+F0(,)A F1(?)4.086 E F0 4.085(,a)C(nd)432.115 724.8 Q F1([)4.085 E F0(ha)4.085 E
+1.885 -.15(ve s)-.2 H(pecial).15 E EP
+%%Page: 3 3
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF 2.5(-3-)279.67 48 S 2.845(meaning. W)72 84 R .346(ords\
+ containing these special characters are replaced with a sorted list of matchi\
+ng pathnames.)-.8 F(If a w)72 96 Q
+(ord generates no matches, it is left unchanged.)-.1 E/F1 10/Times-Italic@0 SF
+(Quoting)97 111.6 Q F0 .85(is used to remo)3.35 F 1.15 -.15(ve t)-.15 H .85
+(he special meaning of characters or w).15 F 3.35(ords. It)-.1 F .85
+(can disable special treat-)3.35 F .314
+(ment for shell operators or other special characters, pre)72 123.6 R -.15(ve)
+-.25 G .315(nt reserv).15 F .315(ed w)-.15 F .315
+(ords from being recognized as such,)-.1 F .683(and inhibit v)72 135.6 R .683
+(ariable e)-.25 F 3.183(xpansion. The)-.15 F .683
+(shell has three quoting mechanisms:)3.183 F 3.183(ab)5.683 G .683
+(ackslash preserv)387.413 135.6 R .682(es the literal)-.15 F -.25(va)72 147.6 S
+.417(lue of the ne).25 F .417(xt character)-.15 F 2.917(,ap)-.4 G .417
+(air of single quotes preserv)196.712 147.6 R .417(es the literal v)-.15 F .418
+(alue of each character between the)-.25 F 1.426
+(quotes, and a pair of double quotes preserv)72 159.6 R 1.425
+(es the literal meaning of enclosed characters while allo)-.15 F(wing)-.25 E
+(some e)72 171.6 Q(xpansions.)-.15 E 1.054(Some of the commands b)97 187.2 R
+1.054(uilt into the shell are part of the programming language.)-.2 F(The)6.055
+E/F2 10/Times-Bold@0 SF(br)3.555 E(eak)-.18 E F0(and)3.555 E F2(continue)72
+199.2 Q F0 1.175(commands control loop e)3.675 F -.15(xe)-.15 G 1.175
+(cution as in the C language.).15 F(The)6.175 E F2 -2.3 -.15(ev a)3.675 H(l).15
+E F0 -.2(bu)3.675 G 1.174(iltin allo).2 F 1.174(ws a string to be)-.25 F .204
+(parsed and e)72 211.2 R -.15(xe)-.15 G .204(cuted as a command.).15 F F2 -.65
+(Wa)5.205 G(it).65 E F0 .205
+(tells the shell to pause until the processes speci\214ed as ar)2.705 F
+(guments)-.18 E(ha)72 223.2 Q .3 -.15(ve ex)-.2 H(ited.).15 E F2 2.5
+(2.3. Interacti)72 247.2 R .2 -.1(ve F)-.1 H(eatur)-.15 E(es)-.18 E F0 .51
+(Shells ha)97 262.8 R .81 -.15(ve b)-.2 H -.15(eg).15 G .51(un of).15 F .51
+(fering features geared speci\214cally for interacti)-.25 F .81 -.15(ve u)-.25
+H .51(se rather than to augment the).15 F .76(programming language.)72 274.8 R
+.761(These interacti)5.76 F 1.061 -.15(ve f)-.25 H .761
+(eatures include job control, command line editing, history and).15 F(aliases.)
+72 286.8 Q .626(Job control is a f)97 302.4 R .626(acility pro)-.1 F .626
+(vided jointly by the shell and the)-.15 F/F3 9/Times-Roman@0 SF(UNIX)3.125 E
+F0 -.1(ke)3.125 G .625(rnel that allo).1 F .625(ws users to selec-)-.25 F(ti)72
+314.4 Q -.15(ve)-.25 G .344
+(ly stop \(suspend\) and restart \(resume\) processes.).15 F .345
+(Each pipeline e)5.345 F -.15(xe)-.15 G .345
+(cuted by the shell is referred to as a).15 F F1(job)72 326.4 Q F0 2.989(.J)C
+.488(obs may be suspended and restarted in either the fore)94.159 326.4 R .488
+(ground, where the)-.15 F 2.988(yh)-.15 G -2.25 -.2(av e)397.148 326.4 T .488
+(access to the terminal,)3.188 F .833(or background, where the)72 338.4 R 3.333
+(ya)-.15 G .834(re isolated and cannot read from the terminal.)189.312 338.4 R
+-.8(Ty)5.834 G .834(ping the).8 F F1(suspend)3.334 E F0(character)5 E .459(whi\
+le a process is running stops that process and returns control to the shell.)72
+350.4 R .459(Once a job is suspended, the)5.459 F .392
+(user manipulates the job')72 362.4 R 2.892(ss)-.55 G .392(tate, using)184.118
+362.4 R F2(bg)2.892 E F0 .393(to continue it in the background,)2.892 F F2(fg)
+2.893 E F0 .393(to return it to the fore)2.893 F(ground)-.15 E .891(and a)72
+374.4 R -.1(wa)-.15 G .891(it its completion, or).1 F F2(kill)3.391 E F0 .891
+(to send it a signal.)3.391 F(The)5.89 E F2(jobs)3.39 E F0 .89
+(command lists the status of jobs, and)3.39 F F2(wait)3.39 E F0 .407
+(will pause the shell until a speci\214ed job terminates.)72 386.4 R .407
+(The shell pro)5.407 F .407(vides a number of w)-.15 F .407
+(ays to refer to a job,)-.1 F(and will notify the user whene)72 398.4 Q -.15
+(ve)-.25 G 2.5(rab).15 G(ackground job terminates.)220.18 398.4 Q -.4(Wi)97 414
+S .956(th the adv).4 F .956(ent of more po)-.15 F .956
+(werful terminals and terminal emulators, more sophisticated interaction)-.25 F
+.253(than that pro)72 426 R .253(vided by the)-.15 F F3(UNIX)2.753 E F0 -.1(ke)
+2.754 G .254(rnel terminal dri).1 F -.15(ve)-.25 G 2.754(ri).15 G 2.754(sp)
+293.592 426 S 2.754(ossible. Some)305.236 426 R .254(shells of)2.754 F .254
+(fer command line editing,)-.25 F 1.141
+(which permits a user to edit lines of input using f)72 438 R(amiliar)-.1 E F1
+(emacs)3.64 E F0(or)3.64 E F1(vi)3.64 E F0 1.14
+(-style commands before submitting)B .02(them to the shell.)72 450 R .02
+(Editors allo)5.02 F 2.52(wc)-.25 G .02(orrections to be made without ha)206.31
+450 R .021(ving to erase back to the point of error)-.2 F 2.521(,o)-.4 G(r)
+500.67 450 Q .135(start the line ane)72 462 R 3.935 -.65(w. C)-.25 H .135
+(ommand line editors run the g).65 F .135(amut from a small \214x)-.05 F .134
+(ed set of commands and k)-.15 F .434 -.15(ey b)-.1 H(ind-).15 E
+(ings to input f)72 474 Q(acilities which allo)-.1 E 2.5(wa)-.25 G
+(rbitrary actions to be bound to a k)217.2 474 Q .3 -.15(ey o)-.1 H 2.5(rk).15
+G .3 -.15(ey s)379.88 474 T(equence.).15 E .145(Modern shells also k)97 489.6 R
+.145(eep a history)-.1 F 2.645(,w)-.65 G .146
+(hich is the list of commands a user has typed.)243.49 489.6 R .146(Shell f)
+5.146 F .146(acilities are)-.1 F -.2(av)72 501.6 S .368(ailable to recall pre)
+-.05 F .367(vious commands and use portions of old commands when composing ne)
+-.25 F 2.867(wo)-.25 G 2.867(nes. The)467.253 501.6 R 1.456
+(command history can be sa)72 513.6 R -.15(ve)-.2 G 3.957(dt).15 G 3.957
+(oa\214)207.522 513.6 S 1.457
+(le and read back in at shell startup, so it persists across sessions.)230.436
+513.6 R .675(Shells which pro)72 525.6 R .675
+(vide both command editing and history generally ha)-.15 F .974 -.15(ve e)-.2 H
+.674(diting commands to interacti).15 F -.15(ve)-.25 G(ly).15 E(step forw)72
+537.6 Q(ard and backw)-.1 E(ard through the history list.)-.1 E .013
+(Aliases allo)97 553.2 R -5.012 2.513(wa s)-.25 H .014
+(tring to be substituted for a command name.)164.28 553.2 R(The)5.014 E 2.514
+(yc)-.15 G .014(an be used to create a mnemonic)373.396 553.2 R .568(for a)72
+565.2 R F3(UNIX)3.068 E F0 .568(command name \()3.068 F/F4 10/Courier@0 SF .568
+(alias del=rm)B F0 .568(\), to e)B .567(xpand a single w)-.15 F .567
+(ord to a comple)-.1 F 3.067(xc)-.15 G .567(ommand \()432.603 565.2 R F4(alias)
+A .255(news='xterm -g 80x45 -title trn -e trn -e -S1 -N &')72 577.2 R F0 .255
+(\), or to ensure that a command)B(is in)72 589.2 Q -.2(vo)-.4 G -.1(ke).2 G
+2.5(dw).1 G(ith a basic set of options \()122.41 589.2 Q F4
+(alias ls="/bin/ls -F")A F0(\).)A F2 2.5(3. The)72 613.2 R
+(POSIX Shell Standard)2.5 E F1(POSIX)97 628.8 Q F0 .239
+(is a name originally coined by Richard Stallman for a f)4.405 F .239
+(amily of open system standards based)-.1 F(on)72 640.8 Q F3(UNIX)3.239 E F0
+5.739(.T)C .74(here are a number of aspects of)122.079 640.8 R F3(UNIX)3.24 E
+F0 .74(under consideration for standardization, from the basic)3.24 F .192
+(system services at the system call and C library le)72 652.8 R -.15(ve)-.25 G
+2.692(lt).15 G 2.692(oa)290.16 652.8 S .191
+(pplications and tools to system administration and)302.292 652.8 R 2.5
+(management. Each)72 664.8 R(area of standardization is assigned to a w)2.5 E
+(orking group in the 1003 series.)-.1 E 3.602(The POSIX Shell and T)97 680.4 R
+3.602(ools standard has been de)-.8 F -.15(ve)-.25 G 3.603(loped by IEEE W).15
+F 3.603(orking Group 1003.2)-.8 F -1.667(\(POSIX.2\) [4].)72 692.4 R 2.799
+(It concentrates on the command interpreter interf)7.799 F 2.799
+(ace and utility programs commonly)-.1 F -.15(exe)72 704.4 S 2.345
+(cuted from the command line or by other programs.).15 F 2.345(An initial v)
+7.345 F 2.345(ersion of the standard has been)-.15 F(appro)72 716.4 Q -.15(ve)
+-.15 G 2.915(da).15 G .414(nd published by the IEEE, and w)116.265 716.4 R .414
+(ork is currently underw)-.1 F .414(ay to update it.)-.1 F .414
+(There are four primary)5.414 F(areas of w)72 728.4 Q
+(ork in the 1003.2 standard:)-.1 E EP
+%%Page: 4 4
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF 2.5(-4-)279.67 48 S 21.5<8341>72 84 S .835
+(spects of the shell')104.22 84 R 3.335(ss)-.55 G .835
+(yntax and command language.)192 84 R 3.335(An)5.835 G .835(umber of special b)
+338.095 84 R .835(uiltins such as)-.2 F/F1 10/Times-Bold@0 SF(cd)3.335 E F0
+(and)3.335 E F1(exec)97 96 Q F0 .545(are being speci\214ed as part of the shel\
+l, since their functionality usually cannot be implemented)3.046 F
+(by a separate e)97 108 Q -.15(xe)-.15 G(cutable;).15 E 21.5<8341>72 123.6 S
+.73(set of utilities to be called by shell scripts and applications.)107.45
+123.6 R .731(Examples are programs lik)5.731 F(e)-.1 E/F2 10/Times-Italic@0 SF
+2.397(sed, tr)3.231 F(,)-1.11 E F0(and)97 135.6 Q F2(awk.)2.853 E F0 .352
+(Utilities commonly implemented as shell b)4.519 F .352
+(uiltins are described in this section, such as)-.2 F F1(test)2.852 E F0(and)97
+147.6 Q F1(kill)3.422 E F0 5.922(.A)C 3.422(ne)144.404 147.6 S .922
+(xpansion of this section')157.116 147.6 R 3.423(ss)-.55 G .923
+(cope, termed the User Portability Extension, or UPE, has)268.586 147.6 R
+(standardized interacti)97 159.6 Q .3 -.15(ve p)-.25 H(rograms such as).15 E F2
+(vi)2.5 E F0(and)4.166 E F2(mailx;)2.5 E F0 21.5<8341>72 175.2 S .926
+(group of functional interf)107.646 175.2 R .926(aces to services pro)-.1 F
+.926(vided by the shell, such as the traditional)-.15 F F2(system)3.425 E F0(C)
+5.091 E .507(library function.)97 187.2 R .507
+(There are functions to perform shell w)5.507 F .508(ord e)-.1 F .508
+(xpansions, perform \214lename e)-.15 F(xpansion)-.15 E(\()97 199.2 Q F2
+(globbing)A F0 .58(\), obtain v)B .58
+(alues of POSIX.2 system con\214guration v)-.25 F .58(ariables, retrie)-.25 F
+.88 -.15(ve v)-.25 H .58(alues of en)-.1 F(vironment)-.4 E -.25(va)97 211.2 S
+(riables \().25 E F2 -.1(ge)C(ten).1 E(v\(\))-.4 E F0(\), and other services;)
+.833 E 21.5<8341>72 226.8 S(suite of `)106.72 226.8 Q(`de)-.74 E -.15(ve)-.25 G
+(lopment').15 E 2.5('u)-.74 G(tilities such as)209.54 226.8 Q F2(c89)2.5 E F0
+(\(the POSIX.2 v)4.166 E(ersion of)-.15 E F2(cc)2.5 E F0(\), and)A F2(yacc.)2.5
+E F0 .483(Bash is concerned with the aspects of the shell')97 242.4 R 2.983(sb)
+-.55 G(eha)301.597 242.4 Q .484(vior de\214ned by POSIX.2.)-.2 F .484
+(The shell command)5.484 F 1.439
+(language has of course been standardized, including the basic \215o)72 254.4 R
+3.938(wc)-.25 G 1.438(ontrol and program e)359.688 254.4 R -.15(xe)-.15 G 1.438
+(cution con-).15 F 1.145(structs, I/O redirection and pipelining, ar)72 266.4 R
+1.145(gument handling, v)-.18 F 1.145(ariable e)-.25 F 1.146
+(xpansion, and quoting.)-.15 F(The)6.146 E F2(special)3.646 E F0 -.2(bu)72
+278.4 S .676(iltins, which must be implemented as part of the shell to pro).2 F
+.676(vide the desired functionality)-.15 F 3.176(,a)-.65 G .676(re speci\214ed)
+457.504 278.4 R .7(as being part of the shell; e)72 290.4 R .7
+(xamples of these are)-.15 F F1 -2.3 -.15(ev a)3.201 H(l).15 E F0(and)3.201 E
+F1(export)3.201 E F0 5.701(.O)C .701(ther utilities appear in the sections of)
+352.034 290.4 R .256(POSIX.2 not de)72 302.4 R -.2(vo)-.25 G .256(ted to the s\
+hell which are commonly \(and in some cases must be\) implemented as b).2 F
+(uiltin)-.2 E(commands, such as)72 314.4 Q F1 -.18(re)2.5 G(ad).18 E F0(and)2.5
+E F1(test)2.5 E F0(.)A .972(POSIX.2 also speci\214es aspects of the shell')97
+330 R 3.473(si)-.55 G(nteracti)286.016 330 Q 1.273 -.15(ve b)-.25 H(eha).15 E
+.973(vior as part of the UPE, including job)-.2 F .233
+(control, command line editing, and history)72 342 R 5.233(.I)-.65 G .233
+(nterestingly enough, only)253.849 342 R F2(vi)2.733 E F0 .233
+(-style line editing commands ha)B -.15(ve)-.2 G(been standardized;)72 354 Q F2
+(emacs)2.5 E F0(editing commands were left out due to objections.)2.5 E .148
+(There were certain areas in which POSIX.2 felt standardization w)97 369.6 R
+.149(as necessary)-.1 F 2.649(,b)-.65 G .149(ut no e)420.643 369.6 R .149
+(xisting imple-)-.15 F 1.598(mentation pro)72 381.6 R 1.598
+(vided the proper beha)-.15 F(vior)-.2 E 6.598(.T)-.55 G 1.598(he w)251.56
+381.6 R 1.597(orking group in)-.1 F -.15(ve)-.4 G 1.597
+(nted and standardized functionality in).15 F .228(these areas.)72 393.6 R(The)
+5.228 E F1(command)2.728 E F0 -.2(bu)2.728 G .228(iltin w).2 F .228(as in)-.1 F
+-.15(ve)-.4 G .228(nted so that shell functions could be written to replace b)
+.15 F(uiltins;)-.2 E 1.663(it mak)72 405.6 R 1.663
+(es the capabilities of the b)-.1 F 1.663(uiltin a)-.2 F -.25(va)-.2 G 1.663
+(ilable to the function.).25 F 1.663(The reserv)6.663 F 1.663(ed w)-.15 F 1.663
+(ord `)-.1 F(`!')-.74 E 4.163('w)-.74 G 1.663(as added to)455.685 405.6 R(ne)72
+417.6 Q -.05(ga)-.15 G .915(te the return v).05 F .915
+(alue of a command or pipeline; it w)-.25 F .916(as nearly impossible to e)-.1
+F .916(xpress `)-.15 F .916(`if not x')-.74 F 3.416('c)-.74 G(leanly)479.56
+417.6 Q .904(using the sh language.)72 429.6 R .904(There e)5.904 F .904
+(xist multiple incompatible implementations of the)-.15 F F1(test)3.403 E F0
+-.2(bu)3.403 G .903(iltin, which tests).2 F .28
+(\214les for type and other attrib)72 441.6 R .281
+(utes and performs arithmetic and string comparisons.)-.2 F .281
+(POSIX considered none)5.281 F .868(of these correct, so the standard beha)72
+453.6 R .868(vior w)-.2 F .868(as speci\214ed in terms of the number of ar)-.1
+F .867(guments to the com-)-.18 F 3.803(mand. POSIX.2)72 465.6 R 1.303
+(dictates e)3.803 F 1.303(xactly what will happen when four or fe)-.15 F 1.303
+(wer ar)-.25 F 1.303(guments are gi)-.18 F -.15(ve)-.25 G 3.803(nt).15 G(o)
+459.462 465.6 Q F1(test)3.804 E F0 3.804(,a)C(nd)494 465.6 Q(lea)72 477.6 Q
+-.15(ve)-.2 G 4.531(st).15 G 2.031(he beha)103.951 477.6 R 2.031
+(vior unde\214ned when more ar)-.2 F 2.031(guments are supplied.)-.18 F 2.03
+(Bash uses the POSIX.2 algorithm,)7.031 F(which w)72 489.6 Q(as concei)-.1 E
+-.15(ve)-.25 G 2.5(db).15 G 2.5(yD)164.53 489.6 S -.2(av)179.25 489.6 S(id K).2
+E(orn.)-.35 E 1.128
+(While POSIX.2 includes much of what the shell has traditionally pro)97 505.2 R
+1.129(vided, some important things)-.15 F(ha)72 517.2 Q .58 -.15(ve b)-.2 H .28
+(een omitted as being `).15 F(`be)-.74 E .28(yond its scope.)-.15 F 4.26 -.74
+('' T)-.7 H .28(here is, for instance, no mention of a dif).74 F .28
+(ference between)-.25 F(a)72 529.2 Q F2(lo)3.354 E(gin)-.1 E F0 .854
+(shell and an)5.02 F 3.354(yo)-.15 G .854(ther interacti)167.956 529.2 R 1.154
+-.15(ve s)-.25 H .854(hell \(since POSIX.2 does not specify a login program\).)
+.15 F .855(No \214x)5.855 F(ed)-.15 E
+(startup \214les are de\214ned, either \255 the standard does not mention)72
+541.2 Q F2(.pr)2.5 E(o\214le)-.45 E F0(.)1.666 E F1 2.5(4. Shell)72 565.2 R
+(Comparison)2.5 E F0 .693(This section compares features of bash, sh, and ksh \
+\(the three shells closest to POSIX compliance\).)97 580.8 R .245(Since ksh an\
+d bash are supersets of sh, the features common to all three are co)72 592.8 R
+-.15(ve)-.15 G .245(red \214rst.).15 F .245(Some of the fea-)5.245 F 1.198
+(tures bash and ksh contain which are not in sh will be discussed.)72 604.8 R
+(Ne)6.198 E 1.198(xt, features unique to bash will be)-.15 F 2.866(listed. The)
+72 616.8 R .366(\214rst three sections pro)2.866 F .366(vide a progressi)-.15 F
+-.15(ve)-.25 G .366(ly more detailed o).15 F -.15(ve)-.15 G(rvie).15 E 2.866
+(wo)-.25 G 2.866(fb)395.706 616.8 S 2.866(ash. Finally)406.902 616.8 R 2.866
+(,f)-.65 G .366(eatures of)464.484 616.8 R(ksh-88 \(the currently-a)72 628.8 Q
+-.25(va)-.2 G(ilable v).25 E(ersion\) not in sh or bash will be presented.)-.15
+E F1 2.5(4.1. Common)72 652.8 R -.25(Fe)2.5 G(atur).25 E(es)-.18 E F0 .021
+(All three shells ha)97 668.4 R .321 -.15(ve t)-.2 H .021
+(he same basic feature set, which is essentially that pro).15 F .02
+(vided by sh and described)-.15 F 1.026(in an)72 680.4 R 3.526(ys)-.15 G 3.526
+(hm)105.012 680.4 S 1.027
+(anual page. Bash and ksh are both sh supersets, and so all three pro)121.318
+680.4 R 1.027(vide the command inter)-.15 F(-)-.2 E .714
+(preter and programming language described earlier)72 692.4 R 3.214(.T)-.55 G
+.714(he shell grammar)291.506 692.4 R 3.214(,s)-.4 G .714(yntax, \215o)371.568
+692.4 R 3.214(wc)-.25 G .714(ontrol, redirections,)424.686 692.4 R(and b)72
+704.4 Q(uiltins implemented by the Bourne shell are the baseline for subsequen\
+t discussion.)-.2 E EP
+%%Page: 5 5
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF 2.5(-5-)279.67 48 S/F1 10/Times-Bold@0 SF 2.5(4.2. F)72
+84 R(eatur)-.25 E(es in bash and ksh)-.18 E F0 .458(Ksh and bash ha)97 99.6 R
+.758 -.15(ve s)-.2 H -2.15 -.25(ev e).15 H .459(ral features in common be).25 F
+.459(yond this base le)-.15 F -.15(ve)-.25 G 2.959(lo).15 G 2.959(ff)387.814
+99.6 S(unctionality)397.433 99.6 Q 5.459(.S)-.65 G .459(ome of this)458.082
+99.6 R(is due to the POSIX.2 standard.)72 111.6 Q(Other functions ha)5 E .3
+-.15(ve b)-.2 H(een implemented in bash using ksh as a guide.).15 E F1 2.5
+(4.2.1. V)72 135.6 R(ariables and V)-.92 E(ariable Expansion)-.92 E F0 .097
+(Bash and ksh ha)97 151.2 R .396 -.15(ve a)-.2 H .096(ugmented v).15 F .096
+(ariable e)-.25 F 2.596(xpansion. Arithmetic)-.15 F .096(substitution allo)
+2.596 F .096(ws an e)-.25 F .096(xpression to be)-.15 F -.25(eva)72 163.2 S .6
+(luated and the result substituted.).25 F .6(Shell v)5.6 F .6
+(ariables may be used as operands, and the result of an e)-.25 F(xpres-)-.15 E
+.41(sion may be assigned to a v)72 175.2 R 2.91(ariable. Nearly)-.25 F .41
+(all of the operators from the C language are a)2.91 F -.25(va)-.2 G .41
+(ilable, with the).25 F(same precedence rules:)72 187.2 Q/F2 10/Courier@0 SF 6
+($e)97 205.2 S(cho $\(\(3 + 5 * 32\)\))115 205.2 Q(163)97 217.2 Q F0 -1.11(Va)
+72 238.8 S 1.445(riables may be declared as)1.11 F/F3 10/Times-Italic@0 SF
+(inte)3.945 E -.1(ge)-.4 G(r).1 E F0 3.945(,w)1.666 G 1.446
+(hich causes arithmetic e)240.956 238.8 R -.25(va)-.25 G 1.446
+(luation to be performed on the v).25 F(alue)-.25 E(whene)72 250.8 Q -.15(ve)
+-.25 G 2.5(rt).15 G(he)115.75 250.8 Q 2.5(ya)-.15 G(re assigned to.)136.98
+250.8 Q .483(There are ne)97 266.4 R 2.983(we)-.25 G .483
+(xpansions to obtain the length of a v)162.179 266.4 R(ariable')-.25 E 2.982
+(sv)-.55 G .482(alue and to remo)352.19 266.4 R .782 -.15(ve s)-.15 H .482
+(ubstrings match-).15 F .063(ing speci\214ed patterns from the be)72 278.4 R
+.063(ginning and end of v)-.15 F .063(ariable v)-.25 F 2.563(alues. A)-.25 F
+(ne)2.563 E 2.563(wf)-.25 G .064(orm of command substitution,)383.249 278.4 R
+F1($\()72 290.4 Q F3(list)A F1(\))A F0 2.5(,i)C 2.5(sm)103.67 290.4 S
+(uch easier to nest than `)117.84 290.4 Q F3(list)A F0 2.5(`a)C
+(nd has simpli\214ed quoting rules.)235.04 290.4 Q .082(There are ne)97 306 R
+2.582(wv)-.25 G .082(ariables to control the shell')161.436 306 R 2.581(sb)-.55
+G(eha)284.333 306 Q(vior)-.2 E 2.581(,a)-.4 G .081(nd additional v)323.244 306
+R .081(ariables set or interpreted spe-)-.25 F 1.038(cially by the shell.)72
+318 R F1(RANDOM)6.038 E F0(and)3.538 E F1(SECONDS)3.538 E F0(are)3.539 E F3
+(dynamic)3.539 E F0 -.25(va)3.539 G 3.539(riables: their).25 F -.25(va)3.539 G
+1.039(lues are generated afresh).25 F 1.022(each time the)72 330 R 3.522(ya)
+-.15 G 1.022(re referenced.)140.176 330 R F1(RANDOM)6.022 E F0 1.021
+(returns a dif)3.521 F 1.021(ferent random number each time it is referenced,)
+-.25 F(and)72 342 Q F1(SECONDS)3.138 E F0 .638
+(returns the number of seconds since the shell w)3.138 F .638
+(as started or the v)-.1 F .639(ariable w)-.25 F .639(as assigned to,)-.1 F
+1.448(plus an)72 354 R 3.948(yv)-.15 G 1.448(alue assigned.)115.606 354 R F1
+(PWD)6.448 E F0(and)3.948 E F1(OLDPWD)3.947 E F0 1.447
+(are set to the current and pre)3.947 F 1.447(vious w)-.25 F 1.447
+(orking directories,)-.1 F(respecti)72 366 Q -.15(ve)-.25 G(ly).15 E(.)-.65 E
+F1(TMOUT)5.604 E F0 .604(controls ho)3.104 F 3.104(wl)-.25 G .604
+(ong the shell will w)226.436 366 R .604(ait at a prompt for input.)-.1 F(If)
+5.604 E F1(TMOUT)3.104 E F0 .605(is set to a)3.105 F -.25(va)72 378 S 1.168
+(lue greater than zero, the shell e).25 F 1.168(xits after w)-.15 F 1.168
+(aiting that man)-.1 F 3.668(ys)-.15 G 1.167(econds for input.)337.478 378 R F1
+(REPL)6.167 E(Y)-.92 E F0 1.167(is the def)3.667 F(ault)-.1 E -.25(va)72 390 S
+.991(riable for the).25 F F1 -.18(re)3.491 G(ad).18 E F0 -.2(bu)3.491 G .991
+(iltin; if no v).2 F .992(ariable names are supplied as ar)-.25 F .992
+(guments, the line read is assigned to)-.18 F F1(REPL)72 402 Q(Y)-.92 E F0(.)A
+F1 2.5(4.2.2. New)72 426 R(and Modi\214ed Builtins)2.5 E F0 .652(Both shells e)
+97 441.6 R .651(xpand the basic sh set of b)-.15 F .651(uiltin commands.)-.2 F
+F1(Let)5.651 E F0(pro)3.151 E .651(vides a w)-.15 F .651
+(ay to perform arithmetic)-.1 F 2.767(on shell v)72 453.6 R 5.268
+(ariables. Shell)-.25 F 2.768(programmers use)5.268 F F1(typeset)5.268 E F0
+2.768(\(bash includes)5.268 F F1(declar)5.268 E(e)-.18 E F0 2.768(as a synon)
+5.268 F 2.768(ym\) to assign)-.15 F(attrib)72 465.6 Q .295(utes such as)-.2 F
+F3 -.2(ex)2.795 G(port).2 E F0(and)4.461 E F3 -.37(re)2.795 G(adonly).37 E F0
+.295(to v)4.461 F(ariables.)-.25 E F1(Getopts)5.295 E F0 .294
+(is used by shell scripts to parse script options)2.795 F .962(and ar)72 477.6
+R 3.462(guments. The)-.18 F F1(set)3.462 E F0 .962(command has a ne)3.462 F
+3.462(wo)-.25 G(ption)266.446 477.6 Q F1<ad6f>3.463 E F0 .963(which tak)3.463 F
+.963(es option names as ar)-.1 F 3.463(guments. Option)-.18 F 1.28
+(names are synon)72 489.6 R 1.28(yms for the other set options \(e.g.,)-.15 F
+F1<ad66>3.78 E F0(and)3.78 E F1 1.28(\255o noglob)3.78 F F0 3.78(\)o)C 3.78(rp)
+375.97 489.6 S(ro)388.08 489.6 Q 1.28(vide ne)-.15 F 3.78(wf)-.25 G 1.28
+(unctionality \()440.78 489.6 R F1(-o)A(notify)72 501.6 Q F0 3.348(,f)C .849
+(or e)106.178 501.6 R 3.349(xample\). The)-.15 F F1 -.18(re)3.349 G(ad).18 E F0
+-.2(bu)3.349 G .849(iltin tak).2 F .849(es a ne)-.1 F(w)-.25 E F1<ad72>3.349 E
+F0 .849(option to specify that a line ending in a backslash)3.349 F
+(should not be continued.)72 513.6 Q F1 2.5(4.2.3. T)72 537.6 R(ilde Expansion)
+-.18 E F0 -.35(Ti)97 553.2 S .252(lde e).35 F .251
+(xpansion is a feature adopted from the C shell.)-.15 F 2.751(At)5.251 G .251
+(ilde character at the be)331.172 553.2 R .251(ginning of a w)-.15 F .251
+(ord is)-.1 F -.15(ex)72 565.2 S(panded to either).15 E F1($HOME)2.5 E F0
+(or the home directory of another user)2.5 E 2.5(,d)-.4 G
+(epending on what follo)345.84 565.2 Q(ws the tilde.)-.25 E F1 2.5
+(4.2.4. Interacti)72 589.2 R .2 -.1(ve I)-.1 H(mpr).1 E -.1(ove)-.18 G(ments).1
+E F0 .789(The most noticable impro)97 604.8 R -.15(ve)-.15 G .789(ments o).15 F
+-.15(ve)-.15 G 3.289(rs).15 G 3.289(ha)263.385 604.8 S .789
+(re geared for interacti)276.114 604.8 R 1.089 -.15(ve u)-.25 H 3.29(se. Ksh)
+.15 F .79(and bash pro)3.29 F .79(vide job)-.15 F .882(control in a v)72 616.8
+R .882(ery similar f)-.15 F .882
+(ashion, with the same options to enable and disable it \()-.1 F F1 .881
+(set -o monitor)B F0 3.381(\)a)C .881(nd the)478.399 616.8 R(same b)72 628.8 Q
+(uiltin commands to manipulate jobs \()-.2 E F1(jobs/fg/bg/kill/wait)A F0(\).)A
+.866(Command line editing, with emacs and vi-style k)97 644.4 R 1.166 -.15
+(ey b)-.1 H .866(indings, is a).15 F -.25(va)-.2 G .866(ilable in both shells.)
+.25 F .866(The Bash)5.866 F F3 -.37(re)72 656.4 S(adline).37 E F0 1.578
+(library is considerably more sophisticated than the ksh editing library:)5.744
+F 1.577(it allo)6.577 F 1.577(ws arbitrary k)-.25 F -.15(ey)-.1 G 1.867
+(bindings, macros, a per)72 668.4 R 1.868(-user customization \214le \()-.2 F
+F3(~/.inputr)A(c)-.37 E F0 1.868(\), a number of v)B 1.868
+(ariables to further customize)-.25 F(beha)72 680.4 Q(vior)-.2 E 3.538(,a)-.4 G
+1.038(nd a much lar)116.868 680.4 R 1.038
+(ger set of bindable editing commands.)-.18 F 1.037
+(The ksh editing library pro)6.037 F 1.037(vides a small)-.15 F<8c78>72 692.4 Q
+(ed command set and only clumsy macros.)-.15 E .706(Both shells of)97 708 R
+.706(fer access to the command history)-.25 F 5.706(.T)-.65 G .706
+(he in-line editing options ha)307.278 708 R 1.006 -.15(ve d)-.2 H(ef).15 E
+.706(ault k)-.1 F 1.006 -.15(ey b)-.1 H(ind-).15 E .624
+(ings to access the history list.)72 720 R(The)5.624 E F1(fc)3.124 E F0 .624
+(command is pro)3.124 F .624(vided to re-e)-.15 F -.15(xe)-.15 G .623(cute pre)
+.15 F .623(vious commands and display)-.25 F EP
+%%Page: 6 6
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF 2.5(-6-)279.67 48 S(the contents of the history list.)
+72 84 Q/F1 10/Times-Bold@0 SF 2.5(4.2.5. Miscellaneous)72 108 R
+(Changes and Impr)2.5 E -.1(ov)-.18 G(ments).1 E F0 .707(Other impro)97 123.6 R
+-.15(ve)-.15 G .707(ments include aliases, the).15 F F1(select)3.207 E F0 .708
+(shell language construct, which supports the genera-)3.207 F 1.298
+(tion and presentation of simple menus, and e)72 135.6 R 1.298
+(xtensions to the)-.15 F F1(export)3.798 E F0(and)3.798 E F1 -.18(re)3.798 G
+(adonly).18 E F0 -.2(bu)3.798 G 1.298(iltins which allo).2 F(w)-.25 E -.25(va)
+72 147.6 S .017(riables to be assigned v).25 F .017
+(alues at the same time the attrib)-.25 F .017(utes are set.)-.2 F -.8(Wo)5.018
+G .018(rd splitting has changed:).8 F .018(if tw)5.018 F 2.518(oo)-.1 G(r)
+500.67 147.6 Q .158(more adjacent w)72 159.6 R .157
+(ord splitting characters occur)-.1 F 2.657(,b)-.4 G .157
+(ash and ksh will generate null \214elds; sh mak)264.893 159.6 R .157
+(es runs of mul-)-.1 F .339
+(tiple \214eld separator charactors the same as a single separator)72 171.6 R
+5.339(.B)-.55 G .34(ash and ksh split only the results of e)330.89 171.6 R
+(xpan-)-.15 E(sion, rather than e)72 183.6 Q -.15(ve)-.25 G(ry w).15 E
+(ord as sh does, closing a long-standing shell security hole.)-.1 E 1.234
+(Shell functions in bash and ksh may ha)97 199.2 R 1.534 -.15(ve l)-.2 H 1.234
+(ocal v).15 F 3.734(ariables. V)-.25 F 1.234(ariables declared with)-1.11 F F1
+(typeset)3.734 E F0 1.234(\(or the)3.734 F .001(bash synon)72 211.2 R(ym,)-.15
+E F1(local)2.501 E F0 .001(\), ha)B .301 -.15(ve a s)-.2 H .001
+(cope restricted to the function and its descendents, and may shado).15 F 2.502
+(wv)-.25 G(ariables)472.9 211.2 Q(de\214ned by the in)72 223.2 Q -.2(vo)-.4 G
+(king shell.).2 E(Local v)5 E(ariables are remo)-.25 E -.15(ve)-.15 G 2.5(dw)
+.15 G(hen a function completes.)317.75 223.2 Q F1 2.5(4.3. F)72 247.2 R(eatur)
+-.25 E(es Unique to bash)-.18 E F0(Naturally)97 262.8 Q 2.895(,b)-.65 G .395
+(ash includes features not in sh or ksh.)144.515 262.8 R .395
+(This section discusses some of the features which)5.395 F(mak)72 274.8 Q 2.986
+(eb)-.1 G .486(ash unique.)101.546 274.8 R .486(Most of them pro)5.486 F .486
+(vide impro)-.15 F -.15(ve)-.15 G 2.986(di).15 G(nteracti)288.098 274.8 Q .787
+-.15(ve u)-.25 H .487(se, b).15 F .487(ut a fe)-.2 F 2.987(wp)-.25 G .487
+(rogramming impro)394.653 274.8 R -.15(ve)-.15 G(ments).15 E
+(are present as well.)72 286.8 Q
+(Full descriptions of these features can be found in the bash documentation.)5
+E F1 2.5(4.3.1. Startup)72 310.8 R(Files)2.5 E F0 .281(Bash e)97 326.4 R -.15
+(xe)-.15 G .281(cutes startup \214les dif).15 F .281
+(ferently than other shells.)-.25 F .281(The bash beha)5.281 F .28
+(vior is a compromise between)-.2 F .116
+(the csh principle of startup \214les with \214x)72 338.4 R .116(ed names e)
+-.15 F -.15(xe)-.15 G .116(cuted for each shell and the sh `).15 F
+(`minimalist')-.74 E 2.616('b)-.74 G(eha)472.26 338.4 Q(vior)-.2 E(.)-.55 E
+2.956(An interacti)72 350.4 R 3.256 -.15(ve i)-.25 H 2.956
+(nstance of bash started as a login shell reads and e).15 F -.15(xe)-.15 G
+(cutes).15 E/F2 10/Times-Italic@0 SF(~/.bash_pr)5.455 E(o\214le)-.45 E F0 2.955
+(\(the \214le)7.121 F F2(.bash_pr)72 362.4 Q(o\214le)-.45 E F0 .835
+(in the user')5 F 3.335(sh)-.55 G .835(ome directory\), if it e)187.385 362.4 R
+3.335(xists. An)-.15 F(interacti)3.335 E 1.135 -.15(ve n)-.25 H .835
+(on-login shell reads and e).15 F -.15(xe)-.15 G(cutes).15 E F2(~/.bashr)72
+374.4 Q(c)-.37 E F0 5.538(.A)1.666 G(non-interacti)127.422 374.4 Q .838 -.15
+(ve s)-.25 H .538(hell \(one be).15 F .538(gun to e)-.15 F -.15(xe)-.15 G .538
+(cute a shell script, for e).15 F .537(xample\) reads no \214x)-.15 F .537
+(ed startup)-.15 F .139(\214le, b)72 386.4 R .139(ut uses the v)-.2 F .139
+(alue of the v)-.25 F(ariable)-.25 E F1(ENV)2.639 E F0 2.639(,i)C 2.639(fs)
+253.361 386.4 S .139(et, as the name of a startup \214le.)263.22 386.4 R .139
+(The ksh practice of reading)5.139 F F1($ENV)72 398.4 Q F0 .69(for e)3.19 F
+-.15(ve)-.25 G .69(ry shell, with the accompan).15 F .689(ying dif)-.15 F .689
+(\214culty of de\214ning the proper v)-.25 F .689(ariables and functions for)
+-.25 F(interacti)72 410.4 Q .946 -.15(ve a)-.25 H .646(nd non-interacti).15 F
+.946 -.15(ve s)-.25 H .646(hells or ha).15 F .646
+(ving the \214le read only for interacti)-.2 F .946 -.15(ve s)-.25 H .646
+(hells, w).15 F .646(as considered too)-.1 F(comple)72 422.4 Q(x.)-.15 E F1 2.5
+(4.3.2. New)72 446.4 R(Builtin Commands)2.5 E F0 1.119(There are a fe)97 462 R
+3.619(wb)-.25 G 1.118(uiltins which are ne)170.986 462 R 3.618(wo)-.25 G 3.618
+(rh)268.528 462 S -2.25 -.2(av e)280.476 462 T 1.118(been e)3.818 F 1.118
+(xtended in bash.)-.15 F(The)6.118 E F1(enable)3.618 E F0 -.2(bu)3.618 G 1.118
+(iltin allo).2 F(ws)-.25 E -.2(bu)72 474 S .736
+(iltin commands to be turned on and of).2 F 3.236(fa)-.25 G(rbitrarily)250.198
+474 Q 5.736(.T)-.65 G 3.237(ou)298.644 474 S .737(se the v)311.881 474 R .737
+(ersion of)-.15 F F2(ec)3.237 E(ho)-.15 E F0 .737(found in a user')4.903 F
+3.237(ss)-.55 G(earch)482.35 474 Q .013(path rather than the bash b)72 486 R
+(uiltin,)-.2 E/F3 10/Courier@0 SF .013(enable -n echo)2.513 F F0(suf)2.513 E
+2.513(\214ces. The)-.25 F F1(help)2.513 E F0 -.2(bu)2.513 G .013(iltin pro).2 F
+.013(vides quick synopses of)-.15 F 1.382(the shell f)72 498 R 1.382
+(acilities without requiring access to a manual page.)-.1 F F1(Builtin)6.382 E
+F0 1.383(is similar to)3.882 F F1(command)3.883 E F0 1.383(in that it)3.883 F
+.342(bypasses shell functions and directly e)72 510 R -.15(xe)-.15 G .342
+(cutes b).15 F .342(uiltin commands.)-.2 F .342
+(Access to a csh-style stack of directories)5.342 F .072(is pro)72 522 R .073
+(vided via the)-.15 F F1(pushd)2.573 E F0(,)A F1(popd)2.573 E F0 2.573(,a)C(nd)
+211.197 522 Q F1(dirs)2.573 E F0 -.2(bu)2.573 G(iltins.).2 E F1(Pushd)5.073 E
+F0(and)2.573 E F1(popd)2.573 E F0 .073(insert and remo)2.573 F .373 -.15(ve d)
+-.15 H .073(irectories from the).15 F .094(stack, respecti)72 534 R -.15(ve)
+-.25 G(ly).15 E 2.594(,a)-.65 G(nd)154.448 534 Q F1(dirs)2.594 E F0 .094
+(lists the stack contents.The)2.594 F F1(suspend)2.594 E F0 .094
+(command will stop the shell process when)2.594 F 1.329(job control is acti)72
+546 R -.15(ve)-.25 G 3.829(;m).15 G 1.329(ost other shells do not allo)169.136
+546 R 3.829(wt)-.25 G(hemselv)294.64 546 Q 1.33(es to be stopped lik)-.15 F
+3.83(et)-.1 G(hat.)421.31 546 Q F1 -.74(Ty)6.33 G(pe,).74 E F0 1.33(the bash)
+3.83 F(answer to)72 558 Q F1(which)2.5 E F0(and)2.5 E F1(whence,)2.5 E F0(sho)
+2.5 E(ws what will happen when a w)-.25 E(ord is typed as a command:)-.1 E F3 6
+($t)97 576 S(ype export)115 576 Q(export is a shell builtin)97 588 Q 6($t)97
+600 S(ype -t export)115 600 Q(builtin)97 612 Q 6($t)97 624 S(ype bash)115 624 Q
+(bash is /bin/bash)97 636 Q 6($t)97 648 S(ype cd)115 648 Q(cd is a function)97
+660 Q(cd \(\))97 672 Q({)97 684 Q(builtin cd "$@" && xtitle $HOST: $PWD)121 696
+Q(})97 708 Q EP
+%%Page: 7 7
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF 2.5(-7-)279.67 48 S -1.11(Va)72 84 S .682
+(rious modes tell what a command w)1.11 F .681(ord is \(reserv)-.1 F .681(ed w)
+-.15 F .681(ord, alias, function, b)-.1 F .681(uiltin, or \214le\) or which v)
+-.2 F(er)-.15 E(-)-.2 E 1.15(sion of a command will be e)72 96 R -.15(xe)-.15 G
+1.15(cuted based on a user').15 F 3.65(ss)-.55 G 1.15(earch path.)305.7 96 R
+1.15(Some of this functionality has been)6.15 F
+(adopted by POSIX.2 and folded into the)72 108 Q/F1 10/Times-Bold@0 SF(command)
+2.5 E F0(utility)2.5 E(.)-.65 E F1 2.5(4.3.3. Editing)72 132 R(and Completion)
+2.5 E F0 .682(One area in which bash shines is command line editing.)97 147.6 R
+.682(Bash uses the)5.682 F/F2 10/Times-Italic@0 SF -.37(re)3.182 G(adline).37 E
+F0 .682(library to read and)4.848 F .102(edit lines when interacti)72 159.6 R
+-.15(ve)-.25 G 5.102(.R).15 G .103(eadline is a po)191.438 159.6 R .103
+(werful and \215e)-.25 F .103(xible input f)-.15 F .103
+(acility that a user can con\214gure to his)-.1 F 2.506(tastes. It)72 171.6 R
+(allo)2.506 E .006(ws lines to be edited using either emacs or vi commands, wh\
+ere those commands are appropri-)-.25 F 2.994(ate. The)72 183.6 R .494
+(full capability of emacs is not present \255 there is no w)2.994 F .495
+(ay to e)-.1 F -.15(xe)-.15 G .495(cute a named command with M-x,).15 F .222
+(for instance \255 b)72 195.6 R .222(ut the e)-.2 F .222
+(xisting commands are more than adequate.)-.15 F .221
+(The vi mode is compliant with the com-)5.222 F
+(mand line editing standardized by POSIX.2.)72 207.6 Q 1.69
+(Readline is fully customizable.)97 223.2 R 1.691
+(In addition to the basic commands and k)6.69 F 1.991 -.15(ey b)-.1 H 1.691
+(indings, the library).15 F(allo)72 235.2 Q .83
+(ws users to de\214ne additional k)-.25 F 1.13 -.15(ey b)-.1 H .83
+(indings using a startup \214le.).15 F(The)5.83 E F2(inputr)3.329 E(c)-.37 E F0
+.829(\214le, which def)4.995 F .829(aults to the)-.1 F(\214le)72 247.2 Q F2
+(~/.inputr)4.287 E(c)-.37 E F0 4.287(,i)1.666 G 4.287(sr)137.43 247.2 S 1.788(\
+ead each time readline initializes, permitting users to maintain a consistent \
+interf)148.937 247.2 R(ace)-.1 E .547(across a set of programs.)72 259.2 R .546
+(Readline includes an e)5.546 F .546(xtensible interf)-.15 F .546
+(ace, so each program using the library can)-.1 F .23(add its o)72 271.2 R .23
+(wn bindable commands and program-speci\214c k)-.25 F .531 -.15(ey b)-.1 H
+2.731(indings. Bash).15 F .231(uses this f)2.731 F .231
+(acility to add bindings)-.1 F(that perform history e)72 283.2 Q
+(xpansion or shell w)-.15 E(ord e)-.1 E(xpansions on the current input line.)
+-.15 E .707(Readline interprets a number of v)97 298.8 R .706
+(ariables which further tune its beha)-.25 F(vior)-.2 E 5.706(.V)-.55 G .706
+(ariables e)408.432 298.8 R .706(xist to control)-.15 F .157
+(whether or not eight-bit characters are directly read as input or con)72 310.8
+R -.15(ve)-.4 G .158(rted to meta-pre\214x).15 F .158(ed k)-.15 F .458 -.15
+(ey s)-.1 H .158(equences \(a).15 F(meta-pre\214x)72 322.8 Q 1.575(ed k)-.15 F
+1.875 -.15(ey s)-.1 H 1.575
+(equence consists of the character with the eighth bit zeroed, preceded by the)
+.15 F F2(meta-)4.074 E(pr)72 334.8 Q(e\214x)-.37 E F0(character)4.45 E 2.784
+(,u)-.4 G .284(sually escape, which selects an alternate k)145.374 334.8 R -.15
+(ey)-.1 G .285(map\), to decide whether to output characters).15 F .485
+(with the eighth bit set directly or as a meta-pre\214x)72 346.8 R .485(ed k)
+-.15 F .784 -.15(ey s)-.1 H .484(equence, whether or not to wrap to a ne).15 F
+2.984(ws)-.25 G(creen)482.35 346.8 Q .157
+(line when a line being edited is longer than the screen width, the k)72 358.8
+R -.15(ey)-.1 G .158(map to which subsequent k).15 F .458 -.15(ey b)-.1 H
+(indings).15 E .531(should apply)72 370.8 R 3.031(,o)-.65 G 3.031(re)133.802
+370.8 S -.15(ve)144.353 370.8 S 3.031(nw).15 G .531
+(hat happens when readline w)168.894 370.8 R .531(ants to ring the terminal')
+-.1 F 3.03(sb)-.55 G 3.03(ell. All)399.37 370.8 R .53(of these v)3.03 F
+(ariables)-.25 E(can be set in the inputrc \214le.)72 382.8 Q .284
+(The startup \214le understands a set of C preprocessor)97 398.4 R(-lik)-.2 E
+2.785(ec)-.1 G .285(onditional constructs which allo)329.49 398.4 R 2.785(wv)
+-.25 G(ariables)472.9 398.4 Q .12(or k)72 410.4 R .42 -.15(ey b)-.1 H .119(ind\
+ings to be assigned based on the application using readline, the terminal curr\
+ently being used, or).15 F .316(the editing mode.)72 422.4 R .317
+(Users can add program-speci\214c bindings to mak)5.317 F 2.817(et)-.1 G .317
+(heir li)352.808 422.4 R -.15(ve)-.25 G 2.817(se).15 G 2.817(asier: here)
+396.922 422.4 R .317(are bindings to)2.817 F(edit the v)72 434.4 Q(alue of)-.25
+E F1 -.74(PA)2.5 G(TH)-.21 E F0(and double-quote the current or pre)2.5 E
+(vious w)-.25 E(ord:)-.1 E/F3 10/Courier@0 SF 6(#M)97 452.4 S
+(acros that are convenient for shell interaction)115 452.4 Q($if Bash)97 464.4
+Q 6(#e)97 476.4 S(dit the path)115 476.4 Q
+("\\C-xp": "PATH=${PATH}\\e\\C-e\\C-a\\ef\\C-f")97 488.4 Q 6(#p)97 500.4 S
+(repare to type a quoted word -- insert open and close double quotes)115 500.4
+Q 6(#a)97 512.4 S(nd move to just after the open quote)115 512.4 Q
+("\\C-x\\"": "\\"\\"\\C-b")97 524.4 Q 6(#Q)97 536.4 S
+(uote the current or previous word)115 536.4 Q("\\C-xq": "\\eb\\"\\ef\\"")97
+548.4 Q($endif)97 560.4 Q F0 .322(There is a readline command to re-read the \
+\214le, so users can edit the \214le, change some bindings, and be)72 582 R
+(gin)-.15 E(to use them almost immediately)72 594 Q(.)-.65 E .851
+(Bash implements the)97 609.6 R F1(bind)3.351 E F0 -.2(bu)3.351 G .851
+(iltin for more dyamic control of readline than the startup \214le permits.).2
+F F1(Bind)72 621.6 Q F0 .167(is used in se)2.667 F -.15(ve)-.25 G .167(ral w)
+.15 F 2.667(ays. In)-.1 F F2(list)2.667 E F0 .167
+(mode, it can display the current k)4.333 F .466 -.15(ey b)-.1 H .166
+(indings, list all the readline edit-).15 F .149(ing directi)72 633.6 R -.15
+(ve)-.25 G 2.649(sa).15 G -.25(va)132.798 633.6 S .149
+(ilable for binding, list which k).25 F -.15(ey)-.1 G 2.649(si).15 G -1.9 -.4
+(nv o)282.352 633.6 T .349 -.1(ke a g).4 H -2.15 -.25(iv e).1 H 2.65(nd).25 G
+(irecti)345.3 633.6 Q -.15(ve)-.25 G 2.65(,o).15 G 2.65(ro)385.04 633.6 S .15
+(utput the current set of k)396.02 633.6 R -.15(ey)-.1 G .526(bindings in a fo\
+rmat that can be incorporated directly into an inputrc \214le.)72 645.6 R(In)
+5.526 E F2(batc)3.026 E(h)-.15 E F0 .526(mode, it reads a series)4.692 F .71
+(of k)72 657.6 R 1.01 -.15(ey b)-.1 H .71
+(indings directly from a \214le and passes them to readline.).15 F .71
+(In its most common usage,)5.71 F F1(bind)3.21 E F0(tak)3.21 E .71(es a)-.1 F
+.534(single string and passes it directly to readline, which interprets the li\
+ne as if it had just been read from the)72 669.6 R(inputrc \214le.)72 681.6 Q
+(Both k)5 E .3 -.15(ey b)-.1 H(indings and v).15 E
+(ariable assignments can appear in the string gi)-.25 E -.15(ve)-.25 G 2.5(nt)
+.15 G(o)424.4 681.6 Q F1(bind)2.5 E F0(.)A .401(The readline library also pro)
+97 697.2 R .402(vides an interf)-.15 F .402(ace for)-.1 F F2(wor)2.902 E 2.902
+(dc)-.37 G(ompletion)328.546 697.2 Q F0 5.402(.W)C .402(hen the)385.888 697.2 R
+F2(completion)2.902 E F0(character)4.568 E 1.261(\(usually T)72 709.2 R 1.261
+(AB\) is typed, readline looks at the w)-.93 F 1.26
+(ord currently being entered and computes the set of \214le-)-.1 F .523
+(names of which the current w)72 721.2 R .523(ord is a v)-.1 F .523
+(alid pre\214x.)-.25 F .524
+(If there is only one possible completion, the rest of the)5.523 F EP
+%%Page: 8 8
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF 2.5(-8-)279.67 48 S .358
+(characters are inserted directly)72 84 R 2.858(,o)-.65 G .358(therwise the co\
+mmon pre\214x of the set of \214lenames is added to the current)205.232 84 R
+-.1(wo)72 96 S 3.199(rd. A).1 F .699(second T)3.199 F .699(AB character entere\
+d immediately after a non-unique completion causes readline to list)-.93 F
+1.814(the possible completions; there is an option to ha)72 108 R 2.113 -.15
+(ve t)-.2 H 1.813(he list displayed immediately).15 F 6.813(.R)-.65 G 1.813
+(eadline pro)436.517 108 R(vides)-.15 E .482
+(hooks so that applications can pro)72 120 R .482
+(vide speci\214c types of completion before the def)-.15 F .483
+(ault \214lename completion)-.1 F .132(is attempted.)72 132 R .132
+(This is quite \215e)5.132 F .132(xible, though it is not completely user)-.15
+F 2.632(-programmable. Bash,)-.2 F .132(for e)2.632 F .132(xample, can)-.15 F
+.37(complete \214lenames, command names \(including aliases, b)72 144 R .37
+(uiltins, shell reserv)-.2 F .37(ed w)-.15 F .37(ords, shell functions, and)-.1
+F -.15(exe)72 156 S .424(cutables found in the \214le system\), shell v).15 F
+.424(ariables, usernames, and hostnames.)-.25 F .423
+(It uses a set of heuristics)5.424 F(that, while not perfect, is generally qui\
+te good at determining what type of completion to attempt.)72 168 Q/F1 10
+/Times-Bold@0 SF 2.5(4.3.4. History)72 192 R F0 .255
+(Access to the list of commands pre)97 207.6 R .255(viously entered \(the)-.25
+F/F2 10/Times-Italic@0 SF .255(command history)2.755 F F0 2.756(\)i)C 2.756(sp)
+399.236 207.6 S(ro)410.882 207.6 Q .256(vided jointly by bash)-.15 F .095
+(and the readline library)72 219.6 R 5.094(.B)-.65 G .094(ash pro)178.928 219.6
+R .094(vides v)-.15 F .094(ariables \()-.25 F F1(HISTFILE)A F0(,)A F1(HISTSIZE)
+2.594 E F0 2.594(,a)C(nd)382.068 219.6 Q F1(HISTCONTR)2.594 E(OL)-.3 E F0 2.594
+(\)a)C .094(nd the)479.186 219.6 R F1(history)72 231.6 Q F0(and)2.825 E F1(fc)
+2.825 E F0 -.2(bu)2.825 G .325(iltins to manipulate the history list.).2 F .325
+(The v)5.325 F .325(alue of)-.25 F F1(HISTFILE)2.825 E F0 .326
+(specifes the \214le where bash)2.826 F .128(writes the command history on e)72
+243.6 R .128(xit and reads it on startup.)-.15 F F1(HISTSIZE)5.128 E F0 .128
+(is used to limit the number of com-)2.628 F .346(mands sa)72 255.6 R -.15(ve)
+-.2 G 2.846(di).15 G 2.846(nt)129.002 255.6 S .346(he history)139.628 255.6 R
+(.)-.65 E F1(HISTCONTR)5.346 E(OL)-.3 E F0(pro)2.846 E .346
+(vides a crude form of control o)-.15 F -.15(ve)-.15 G 2.846(rw).15 G .346
+(hich commands are)425.548 255.6 R(sa)72 267.6 Q -.15(ve)-.2 G 2.905(do).15 G
+2.905(nt)102.325 267.6 S .405(he history list: a v)113.01 267.6 R .405(alue of)
+-.25 F F2(ignor)2.905 E(espace)-.37 E F0 .405(means to not sa)4.571 F .705 -.15
+(ve c)-.2 H .405(ommands which be).15 F .405(gin with a space; a)-.15 F -.25
+(va)72 279.6 S .339(lue of).25 F F2(ignor)2.839 E(edups)-.37 E F0 .339
+(means to not sa)4.505 F .64 -.15(ve c)-.2 H .34
+(ommands identical to the last command sa).15 F -.15(ve)-.2 G(d.).15 E F1
+(HISTCONTR)5.34 E(OL)-.3 E F0 -.1(wa)72 291.6 S 3.15(sn).1 G(amed)95.6 291.6 Q
+F1(history_contr)3.15 E(ol)-.18 E F0 .65(in earlier v)3.15 F .649
+(ersions of bash; the old name is still accepted for backw)-.15 F .649
+(ards com-)-.1 F(patibility)72 303.6 Q 5.723(.T)-.65 G(he)121.803 303.6 Q F1
+(history)3.223 E F0 .724(command can read or write \214les containing the hist\
+ory list and display the current)3.223 F .895(list contents.)72 315.6 R(The)
+5.895 E F1(fc)3.395 E F0 -.2(bu)3.395 G .895
+(iltin, adopted from POSIX.2 and the K).2 F .894(orn Shell, allo)-.35 F .894
+(ws display and re-e)-.25 F -.15(xe)-.15 G(cution,).15 E .461
+(with optional editing, of commands from the history list.)72 327.6 R .462
+(The readline library of)5.462 F .462(fers a set of commands to)-.25 F .657(se\
+arch the history list for a portion of the current input line or a string type\
+d by the user)72 339.6 R 5.657(.F)-.55 G(inally)445.836 339.6 Q 3.157(,t)-.65 G
+(he)476.403 339.6 Q F2(his-)3.157 E(tory)72 351.6 Q F0(library)4.196 E 2.53(,g)
+-.65 G .03(enerally incorporated directly into the readline library)128.346
+351.6 R 2.53(,i)-.65 G .03(mplements a f)350.636 351.6 R .031
+(acility for history recall,)-.1 F -.15(ex)72 363.6 S .594(pansion, and re-e)
+.15 F -.15(xe)-.15 G .594(cution of pre).15 F .594(vious commands v)-.25 F .594
+(ery similar to csh \(`)-.15 F .593(`bang history')-.74 F .593
+(', so called because)-.74 F(the e)72 375.6 Q
+(xclamation point introduces a history substitution\):)-.15 E/F3 10/Courier@0
+SF 6($e)97 393.6 S(cho a b c d e)115 393.6 Q 6(abcde)97 405.6 S 6($!)97 417.6 S
+6(!fghi)115 417.6 S(echo a b c d e f g h i)97 429.6 Q 6(abcdefghi)97 441.6 S 6
+($!)97 453.6 S(-2)115 453.6 Q(echo a b c d e)97 465.6 Q 6(abcde)97 477.6 S 6
+($e)97 489.6 S(cho !-2:1-4)115 489.6 Q(echo a b c d)97 501.6 Q 6(abcd)97 513.6
+S F0 1.456(The command history is only sa)72 535.2 R -.15(ve)-.2 G 3.957(dw).15
+G 1.457(hen the shell is interacti)232.599 535.2 R -.15(ve)-.25 G 3.957(,s).15
+G 3.957(oi)352.804 535.2 S 3.957(ti)364.541 535.2 S 3.957(sn)374.058 535.2 S
+1.457(ot a)386.905 535.2 R -.25(va)-.2 G 1.457(ilable for use by shell).25 F
+(scripts.)72 547.2 Q F1 2.5(4.3.5. New)72 571.2 R(Shell V)2.5 E(ariables)-.92 E
+F0 .701(There are a number of con)97 586.8 R -.15(ve)-.4 G .701(nience v).15 F
+.701(ariables that bash interprets to mak)-.25 F 3.2(el)-.1 G .7(ife easier)
+402.76 586.8 R 5.7(.T)-.55 G .7(hese include)453.59 586.8 R F1(FIGNORE)72 598.8
+Q F0 3.973(,w)C 1.473(hich is a set of \214lename suf)132.363 598.8 R<8c78>-.25
+E 1.474(es identifying \214les to e)-.15 F 1.474
+(xclude when completing \214lenames;)-.15 F F1(HOSTTYPE)72 610.8 Q F0 3.03(,w)C
+.53(hich is automatically set to a string describing the type of hardw)139.21
+610.8 R .53(are on which bash is cur)-.1 F(-)-.2 E .76(rently e)72 622.8 R -.15
+(xe)-.15 G(cuting;).15 E F1(OSTYPE)3.26 E F0 3.26(,t)C 3.26(ow)191.76 622.8 S
+.76(hich bash assigns a v)207.24 622.8 R .761(alue that identi\214es the v)-.25
+F .761(ersion of)-.15 F/F4 9/Times-Roman@0 SF(UNIX)3.261 E F0(it')3.261 E 3.261
+(sr)-.55 G(unning)476.22 622.8 Q 1.354
+(on \(great for putting architecture-speci\214c binary directories into the)72
+634.8 R F1 -.74(PA)3.854 G(TH)-.21 E F0 1.354(\); and)B F1(IGNOREEOF)3.854 E F0
+3.854(,w)C(hose)485.67 634.8 Q -.25(va)72 646.8 S .062
+(lue indicates the number of consecuti).25 F .362 -.15(ve E)-.25 H .062
+(OF characters that an interacti).15 F .362 -.15(ve s)-.25 H .062
+(hell will read before e).15 F .062(xiting \255)-.15 F .114(an easy w)72 658.8
+R .113(ay to k)-.1 F .113(eep yourself from being logged out accidentally)-.1 F
+5.113(.T)-.65 G(he)344.285 658.8 Q F1(auto_r)2.613 E(esume)-.18 E F0 -.25(va)
+2.613 G .113(riable alters the w).25 F(ay)-.1 E .409
+(the shell treats simple command names: if job control is acti)72 670.8 R -.15
+(ve)-.25 G 2.909(,a).15 G .409(nd this v)335.516 670.8 R .409
+(ariable is set, single-w)-.25 F .409(ord simple)-.1 F .17(commands without re\
+directions cause the shell to \214rst look for a suspended job with that name \
+before start-)72 682.8 R(ing a ne)72 694.8 Q 2.5(wp)-.25 G(rocess.)118.13 694.8
+Q EP
+%%Page: 9 9
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF 2.5(-9-)279.67 48 S/F1 10/Times-Bold@0 SF 2.5
+(4.3.6. Brace)72 84 R(Expansion)2.5 E F0 .653(Since sh of)97 99.6 R .653
+(fers no con)-.25 F -.15(ve)-.4 G .653(nient w).15 F .653
+(ay to generate arbitrary strings that share a common pre\214x or suf)-.1 F
+<8c78>-.25 E 1.893(\(pathname e)72 111.6 R 1.893
+(xpansion requires that the \214lenames e)-.15 F 1.892(xist\), bash implements)
+-.15 F/F2 10/Times-Italic@0 SF(br)4.392 E 1.892(ace e)-.15 F(xpansion)-.2 E F0
+4.392(,ac)C(apability)469 111.6 Q(pick)72 123.6 Q .496(ed up from csh.)-.1 F
+.496(Brace e)5.496 F .496(xpansion is similar to pathname e)-.15 F .496
+(xpansion, b)-.15 F .497(ut the strings generated need not)-.2 F 1.107
+(correspond to e)72 135.6 R 1.107(xisting \214les.)-.15 F 3.607(Ab)6.107 G
+1.107(race e)207.655 135.6 R 1.107(xpression consists of an optional)-.15 F F2
+(pr)3.606 E(eamble)-.37 E F0 3.606(,f)1.666 G(ollo)419.286 135.6 Q 1.106
+(wed by a pair of)-.25 F 2.809
+(braces enclosing a series of comma-separated strings, and an optional)72 147.6
+R F2(postamble)5.31 E F0 7.81(.T)1.666 G 2.81(he preamble is)440.06 147.6 R(pr\
+epended to each string within the braces, and the postamble is then appended t\
+o each resulting string:)72 159.6 Q/F3 10/Courier@0 SF 6($e)97 177.6 S
+(cho a{d,c,b}e)115 177.6 Q(ade ace abe)97 189.6 Q F1 2.5(4.3.7. Pr)72 219.6 R
+(ompt Customization)-.18 E F0 .077(One of the more popular interacti)97 235.2 R
+.376 -.15(ve f)-.25 H .076(eatures that bash pro).15 F .076
+(vides is the ability to customize the prompt.)-.15 F(Both)72 247.2 Q F1(PS1)
+3.305 E F0(and)3.305 E F1(PS2,)3.305 E F0 .805
+(the primary and secondary prompts, are e)3.305 F .805
+(xpanded before being displayed.)-.15 F -.15(Pa)5.805 G(rameter).15 E .324
+(and v)72 259.2 R .324(ariable e)-.25 F .324
+(xpansion is performed when the prompt string is e)-.15 F .323
+(xpanded, so the v)-.15 F .323(alue of an)-.25 F 2.823(ys)-.15 G .323(hell v)
+454.217 259.2 R(ariable)-.25 E .728(can be put into the prompt \(e.g.,)72 271.2
+R F1($SHL)3.228 E(VL)-.92 E F0 3.228(,w)C .728(hich indicates ho)258.564 271.2
+R 3.228(wd)-.25 G .729(eeply the current shell is nested\).)342.988 271.2 R
+(Bash)5.729 E 1.895
+(specially interprets characters in the prompt string preceded by a backslash.)
+72 283.2 R 1.895(Some of these backslash)6.895 F .874
+(escapes are replaced with the current time, the date, the current w)72 295.2 R
+.874(orking directory)-.1 F 3.374(,t)-.65 G .874(he username, and the)416.958
+295.2 R .781(command number or history number of the command being entered.)72
+307.2 R .78(There is e)5.781 F -.15(ve)-.25 G 3.28(nab).15 G .78
+(ackslash escape to)429.13 307.2 R .007
+(cause the shell to change its prompt when running as root after an)72 319.2 R
+F2(su)2.507 E F0 5.007(.B)C .008(efore printing each primary prompt,)360.388
+319.2 R .27(bash e)72 331.2 R .27(xpands the v)-.15 F(ariable)-.25 E F1(PR)2.77
+E(OMPT_COMMAND)-.3 E F0 .269(and, if it has a v)2.77 F .269(alue, e)-.25 F -.15
+(xe)-.15 G .269(cutes the e).15 F .269(xpanded v)-.15 F .269(alue as a)-.25 F
+.04(command, allo)72 343.2 R .041(wing additional prompt customization.)-.25 F
+-.15(Fo)5.041 G 2.541(re).15 G .041
+(xample, this assignment causes the current user)311.964 343.2 R(,)-.4 E .99
+(the current host, the time, the last component of the current w)72 355.2 R
+.989(orking directory)-.1 F 3.489(,t)-.65 G .989(he le)402.954 355.2 R -.15(ve)
+-.25 G 3.489(lo).15 G 3.489(fs)443.412 355.2 S .989(hell nesting,)454.121 355.2
+R(and the history number of the current command to be embedded into the primar\
+y prompt:)72 367.2 Q F3 6($P)97 385.2 S
+(S1='\\u@\\h [\\t] \\W\($SHLVL:\\!\)\\$ ')115 385.2 Q
+(chet@odin [21:03:44] documentation\(2:636\)$ cd ..)97 397.2 Q
+(chet@odin [21:03:54] src\(2:637\)$)97 409.2 Q F0 .619
+(The string being assigned is surrounded by single quotes so that if it is e)72
+430.8 R(xported,)-.15 E F1(SHL)3.119 E(VL)-.92 E F0 .619(will be updated)3.119
+F(by a child shell:)72 442.8 Q F3
+(chet@odin [21:13:35] src\(2:638\)$ export PS1)97 460.8 Q
+(chet@odin [21:17:40] src\(2:639\)$ bash)97 472.8 Q
+(chet@odin [21:17:46] src\(3:696\)$)97 484.8 Q F0(The)72 506.4 Q F1(\\$)2.5 E
+F0(escape is displayed as `)2.5 E(`)-.74 E F1($)A F0 1.48 -.74('' w)D
+(hen running as a normal user).74 E 2.5(,b)-.4 G(ut as `)342.08 506.4 Q(`)-.74
+E F1(#)A F0 1.48 -.74('' w)D(hen running as root.).74 E F1 2.5(4.3.8. POSIX)72
+530.4 R(Mode)2.5 E F0 .46(Although bash is intended to be POSIX.2 compliant, t\
+here are areas in which the def)97 546 R .46(ault beha)-.1 F .46(vior is)-.2 F
+1.168(not compatible with the standard.)72 558 R -.15(Fo)6.169 G 3.669(ru).15 G
+1.169(sers who wish to operate in a strict POSIX.2 en)238.85 558 R 1.169
+(vironment, bash)-.4 F .61(implements a)72 570 R F2 .61(POSIX mode)3.11 F F0
+5.61(.W)C .61(hen this mode is acti)199.42 570 R -.15(ve)-.25 G 3.109(,b).15 G
+.609(ash modi\214es its def)303.727 570 R .609(ault operation where it dif)-.1
+F(fers)-.25 E .066(from POSIX.2 to match the standard.)72 582 R .067
+(POSIX mode is entered when bash is started with the)5.066 F F1 .067(-o posix)
+2.567 F F0(option)2.567 E .382(or when)72 594 R F1 .382(set -o posix)2.882 F F0
+.381(is e)2.881 F -.15(xe)-.15 G 2.881(cuted. F).15 F .381
+(or compatibility with other GNU softw)-.15 F .381
+(are that attempts to be POSIX.2)-.1 F 5.752
+(compliant, bash also enters POSIX mode if either of the v)72 606 R(ariables)
+-.25 E F1(POSIX_PED)8.253 E(ANTIC)-.35 E F0(or)8.253 E F1(POSIXL)72 618 Q
+(Y_CORRECT)-.92 E F0 1.179(is set when bash is started or assigned a v)3.679 F
+1.178(alue during e)-.25 F -.15(xe)-.15 G 3.678(cution. When).15 F 1.178
+(bash is)3.678 F .218(started in POSIX mode, for e)72 630 R .218(xample, the)
+-.15 F F1(kill)2.718 E F0 -.2(bu)2.718 G(iltin').2 E(s)-.55 E F1<ad6c>2.718 E
+F0 .218(option beha)2.718 F -.15(ve)-.2 G 2.718(sd).15 G(if)370.166 630 Q .219
+(ferently: it lists the names of all)-.25 F 1.084(signals on a single line sep\
+arated by spaces, rather than listing the signal names and their corresponding)
+72 642 R(numbers.)72 654 Q .865(Some of the def)97 669.6 R .865(ault bash beha)
+-.1 F .865(vior dif)-.2 F .865
+(fers from other shells as a result of the POSIX standard.)-.25 F -.15(Fo)5.866
+G(r).15 E 1.16(instance, bash includes the)72 681.6 R F1(!)3.66 E F0(reserv)
+6.16 E 1.16(ed w)-.15 F 1.16(ord to ne)-.1 F -.05(ga)-.15 G 1.16
+(te the return status of a pipeline because it has been).05 F
+(de\214ned by POSIX.2.)72 693.6 Q
+(Neither sh nor ksh has implemented that feature.)5 E EP
+%%Page: 10 10
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(0-)288 48 S/F1 10/Times-Bold@0
+SF 2.5(4.4. F)72 84 R(eatur)-.25 E(es Unique to ksh)-.18 E F0 .177
+(Ksh includes a number of features not in the currently-released v)97 99.6 R
+.178(ersion of bash, v)-.15 F .178(ersion 1.14.)-.15 F(Unless)5.178 E .822
+(noted, none of these features is in the POSIX.2 standard.)72 111.6 R .821
+(Where appropriate the equi)5.821 F -.25(va)-.25 G .821(lent bash features).25
+F(are noted.)72 123.6 Q F1 2.5(4.4.1. The)72 147.6 R(ksh Language)2.5 E F0
+2.955(An)97 163.2 S .955 -.25(ew c)112.175 163.2 T .455(ompound command folds)
+.25 F F1(test)2.955 E F0 .456(into the ksh language, delimited by the reserv)
+2.955 F .456(ed w)-.15 F(ords)-.1 E F1([[)2.956 E F0(and)2.956 E F1(]])72 175.2
+Q F0 5.726(.T)C .726(he syntax is identical to)92.996 175.2 R F1(test)3.225 E
+F0 .725(with a fe)3.225 F 3.225(wc)-.25 G .725
+(hanges: for instance, instead of)262.855 175.2 R F1<ad61>3.225 E F0(and)3.225
+E F1<ad6f>3.225 E F0(,)A F1(&&)3.225 E F0(and)3.225 E/F2 10/Symbol SF<efef>
+3.225 E F0(are)3.225 E 3.32(used. The)72 187.2 R -.1(wo)3.32 G .82(rds between)
+.1 F F1([[)3.32 E F0(and)3.32 E F1(]])3.32 E F0 .82(are not processed for w)
+3.32 F .82(ord splitting or \214lename generation.)-.1 F .82(The ne)5.82 F(w)
+-.25 E .926
+(command does pattern matching as well as string comparison, a la the)72 199.2
+R F1(case)3.425 E F0 3.425(command. This)3.425 F(ne)3.425 E 3.425(wc)-.25 G
+(ontrol)480.11 199.2 Q .165(structure does ha)72 211.2 R .465 -.15(ve t)-.2 H
+.165(he adv).15 F .166(antage of reducing common ar)-.25 F .166
+(gument problems encountered using test \(e.g.)-.18 F F1(test)2.666 E
+("$string")72 223.2 Q F0 2.928(,w)C(here)125.748 223.2 Q F1($string)2.928 E F0
+-.15(ex)2.928 G .428(pands to).15 F F1<ad66>2.928 E F0 .428(\), b)B .428
+(ut at the cost of bloating the language.)-.2 F .427(The POSIX.2 test algo-)
+5.427 F 2.752(rithm that bash uses, along with some programmer care, alle)72
+235.2 R 2.752(viates those problems in a backw)-.25 F(ards-)-.1 E .854
+(compatible w)72 247.2 R .853(ay with no additions to the language.)-.1 F .853
+(The one capability of)5.853 F F1 .853([[ ]])3.353 F F0 .853(not a)3.353 F -.25
+(va)-.2 G .853(ilable in bash is its).25 F(ability to test whether an indi)72
+259.2 Q(vidual)-.25 E F1(set \255o)2.5 E F0(option is turned on or of)2.5 E(f.)
+-.25 E .339(Other parts of the ksh language are not common to bash.)97 274.8 R
+(The)5.34 E F1(\(\(...\)\))2.84 E F0(operator)5.34 E 2.84(,e)-.4 G(qui)419.33
+274.8 Q -.25(va)-.25 G .34(lent to).25 F F1 .34(let "...")2.84 F F0(,)A .197
+(is unique to ksh, as are the concept of co-processes and the)72 286.8 R F1
+(time)2.697 E F0 -.1(ke)2.696 G(yw)-.05 E .196
+(ord to time commands and pipelines.)-.1 F F1 2.5(4.4.2. Functions)72 310.8 R
+(and Aliases)2.5 E F0 1.022(The K)97 326.4 R 1.022(orn shell has)-.35 F/F3 10
+/Times-Italic@0 SF(autoloaded)3.522 E F0 3.522(functions. A)3.522 F 1.022
+(function mark)3.522 F 1.022(ed as)-.1 F F3(autoload)3.522 E F0 1.022
+(is not de\214ned until it is)5.188 F 1.042(\214rst e)72 338.4 R -.15(xe)-.15 G
+3.542(cuted. When).15 F 1.042(such a function is e)3.542 F -.15(xe)-.15 G 1.042
+(cuted, a search is made through the directories in).15 F F1(FP)3.541 E -.95
+(AT)-.74 G(H).95 E F0(\(a)3.541 E .27
+(colon-separated list of directories similar to)72 350.4 R F1 -.74(PA)2.77 G
+(TH)-.21 E F0 2.77(\)f)C .27(or a \214le with the same name as the function.)
+285.78 350.4 R .27(That \214le)5.27 F .548(is then read in as with the)72 362.4
+R F1(.)3.881 E F0 .547(command; presumably the function is de\214ned therein.)
+3.047 F .547(There is a pair of shell)5.547 F .886
+(functions included in the bash distrib)72 374.4 R .886(ution \()-.2 F F3 -.2
+(ex)C(amples/functions/autoload).2 E F0 5.886(\)t)C .886(hat pro)378.35 374.4 R
+.886(vide much of this func-)-.15 F
+(tionality without changing the shell itself.)72 386.4 Q .116
+(Ksh functions are scoped in such a w)97 402 R .116(ay that the en)-.1 F .116
+(vironment in which the)-.4 F 2.616(ya)-.15 G .116(re e)405.144 402 R -.15(xe)
+-.15 G .115(cuted is closer to a).15 F .827(shell script en)72 414 R 3.327
+(vironment. Bash)-.4 F .827(uses the POSIX.2 scoping rules, which mak)3.327 F
+3.327(et)-.1 G .827(he function e)392.517 414 R -.15(xe)-.15 G .828(cution en)
+.15 F(vi-)-.4 E 1.2(ronment an e)72 426 R 1.2(xact cop)-.15 F 3.7(yo)-.1 G 3.7
+(ft)174.86 426 S 1.199(he shell en)184.67 426 R 1.199
+(vironment with the replacement of the shell')-.4 F 3.699(sp)-.55 G 1.199
+(ositional paramters)426.421 426 R(with the function ar)72 438 Q 2.5
+(guments. K)-.18 F
+(orn shell functions do not share options or traps with the in)-.35 E -.2(vo)
+-.4 G(king shell.).2 E .451(Ksh has)97 453.6 R F3(tr)2.951 E(ac)-.15 E -.1(ke)
+-.2 G(d).1 E F0 .452(aliases, which alias a command name to its full pathname.)
+2.952 F .452(Bash has true command)5.452 F(hashing.)72 465.6 Q F1 2.5
+(4.4.3. Arrays)72 489.6 R F0 .246
+(Arrays are an aspect of ksh that has no real bash equi)97 505.2 R -.25(va)-.25
+G 2.746(lent. The).25 F 2.746(ya)-.15 G .246(re easy to create and manipulate:)
+371.42 505.2 R 1.637
+(an array is created automatically by using subscript assignment \()72 517.2 R
+F1(name)A F0([)A F3(inde)A(x)-.2 E F0(]=)A F1 -.1(va)C(lue).1 E F0 1.637
+(\), and an)B 4.137(yv)-.15 G(ariable)476.79 517.2 Q 1.967
+(may be referred to as an array)72 529.2 R 6.967(.K)-.65 G 1.967(sh arrays, ho)
+219.229 529.2 R(we)-.25 E -.15(ve)-.25 G 2.767 -.4(r, h).15 H -2.25 -.2(av e).4
+H(se)4.667 E -.15(ve)-.25 G 1.967(ral anno).15 F 1.967(ying limitations: the)
+-.1 F 4.466(ym)-.15 G 1.966(ay be)480.654 529.2 R(inde)72 541.2 Q -.15(xe)-.15
+G 3.498(do).15 G .998(nly up to 512 or 1024 elements, depending on ho)111.858
+541.2 R 3.498(wt)-.25 G .999(he shell is compiled, and there is only the)
+330.188 541.2 R(clumsy)72 553.2 Q F1 .223(set -A)2.723 F F0 .223
+(to assign a list of v)2.723 F .223(alues sequentially)-.25 F 5.223(.D)-.65 G
+.223(espite these limits, arrays are useful, if underutilized)293.31 553.2 R
+(by shell programmers.)72 565.2 Q F1 2.5(4.4.4. Builtin)72 589.2 R(Commands)2.5
+E F0 .112(Some of the b)97 604.8 R .112(uiltin commands ha)-.2 F .412 -.15
+(ve b)-.2 H .112(een e).15 F .112(xtended or are ne)-.15 F 2.612(wi)-.25 G
+2.613(nk)351.402 604.8 S 2.613(sh. The)364.015 604.8 R F1(print)2.613 E F0 -.2
+(bu)2.613 G .113(iltin w).2 F .113(as included)-.1 F .242(to w)72 616.8 R .242
+(ork around the incompatibilities and limitations of)-.1 F F1(echo)2.741 E F0
+5.241(.T)C(he)328.234 616.8 Q F1(whence)2.741 E F0 .241(command tells what w)
+2.741 F .241(ould hap-)-.1 F .418(pen if each ar)72 628.8 R .418
+(gument were typed as a command name.)-.18 F(The)5.418 E F1(cd)2.919 E F0 -.2
+(bu)2.919 G .419(iltin has been e).2 F .419(xtended to tak)-.15 F 2.919(eu)-.1
+G 2.919(pt)470.482 628.8 S 2.919(ot)481.181 628.8 S -.1(wo)491.88 628.8 S(ar)72
+640.8 Q 1.425(guments: if tw)-.18 F 3.925(oa)-.1 G -.18(rg)153.485 640.8 S
+1.424(uments are supplied, the second is substituted for the \214rst in the cu\
+rrent directory).18 F 2.294
+(name and the shell changes to the resultant directory name.)72 652.8 R 2.295
+(The ksh)7.294 F F1(trap)4.795 E F0 -.2(bu)4.795 G 2.295(iltin accepts).2 F F1
+(ERR)4.795 E F0(and)4.795 E F1(DEB)72 664.8 Q(UG)-.1 E F0 .15(as trap names.)
+2.65 F(The)5.15 E F1(ERR)2.65 E F0 .15(trap is e)2.65 F -.15(xe)-.15 G .15
+(cuted when a command f).15 F(ails;)-.1 E F1(DEB)2.65 E(UG)-.1 E F0 .15(is e)
+2.65 F -.15(xe)-.15 G .15(cuted after e).15 F -.15(ve)-.25 G(ry).15 E
+(simple command.)72 676.8 Q .05(The bash distrib)97 692.4 R .05
+(ution includes shell functions that implement)-.2 F F1(print)2.55 E F0(and)
+2.55 E F1(whence)2.55 E F0 .05(and the e)2.55 F .05(xtensions to)-.15 F F1(cd)
+72 704.4 Q F0(.)A EP
+%%Page: 11 11
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(1-)288 48 S/F1 10/Times-Bold@0
+SF 2.5(4.4.5. Expansion)72 84 R F0 .282(The ksh \214lename generation \()97
+99.6 R/F2 10/Times-Italic@0 SF(globbing)A F0 2.782(\)f)C .282(acilities ha)
+262.45 99.6 R .581 -.15(ve b)-.2 H .281(een e).15 F .281(xtended be)-.15 F .281
+(yond their bash and sh coun-)-.15 F 3.68(terparts. In)72 111.6 R 1.181
+(this area, ksh can be thought of as)3.681 F F2 -.4(eg)3.681 G -.37(re).4 G(p)
+.37 E F0 1.181(to the bash)5.347 F F2(gr)3.681 E(ep)-.37 E F0 6.181(.K)1.666 G
+1.181(sh globbing of)382.406 111.6 R 1.181(fers things lik)-.25 F(e)-.1 E 1.018
+(alternation, the ability to match zero or more instances of a pattern, and th\
+e ability to match e)72 123.6 R 1.018(xactly one)-.15 F(occurrence of an)72
+135.6 Q 2.5(yo)-.15 G 2.5(fal)150.98 135.6 S(ist of patterns.)166.53 135.6 Q F1
+2.5(4.4.6. Startup)72 159.6 R(Files)2.5 E F0 .977(Ksh and bash e)97 175.2 R
+-.15(xe)-.15 G .977(cute startup \214les dif).15 F(ferently)-.25 E 5.977(.K)
+-.65 G .977(sh e)297.879 175.2 R(xpands)-.15 E F1(ENV)3.478 E F0 .978
+(and sources the \214le it names for)3.478 F -2.15 -.25(ev e)72 187.2 T 1.85
+(ry shell.).25 F 1.85(Bash sources)6.85 F F1($ENV)4.35 E F0 1.85
+(only in non-interacti)4.35 F 2.15 -.15(ve s)-.25 H 1.85(hells; interacti).15 F
+2.15 -.15(ve s)-.25 H 1.85(hells source \214x).15 F 1.85(ed \214les, as)-.15 F
+-.15(ex)72 199.2 S 1.285(plained in the pre).15 F 1.285(vious section.)-.25 F
+1.285(The POSIX standard has speci\214ed the ksh beha)6.285 F(vior)-.2 E 3.785
+(,s)-.4 G 3.785(ob)441.545 199.2 S 1.285(ash acts the)455.33 199.2 R
+(same as ksh if started with the)72 211.2 Q F1(\255posix)2.5 E F0(or)2.5 E F1
+(\255o posix)2.5 E F0(options.)2.5 E F1 2.5(4.4.7. History)72 235.2 R F0
+(Finally)97 250.8 Q 3.372(,t)-.65 G .872(he ksh history implementation dif)
+133.342 250.8 R .871(fers slightly from bash.)-.25 F .871
+(Each instance of bash k)5.871 F .871(eeps the)-.1 F .633
+(history list in memory and of)72 262.8 R .633(fers options to the)-.25 F F1
+(history)3.133 E F0 -.2(bu)3.133 G .634
+(iltin to write the list to or read it from a named).2 F 3.216(\214le. Ksh)72
+274.8 R -.1(ke)3.216 G .716
+(eps the history in a \214le, which it accesses each time a command is sa).1 F
+-.15(ve)-.2 G 3.215(dt).15 G 3.215(oo)426.445 274.8 S 3.215(rr)439.66 274.8 S
+(etrie)449.535 274.8 Q -.15(ve)-.25 G 3.215(df).15 G(rom)487.89 274.8 Q .338
+(the history)72 286.8 R 5.338(.K)-.65 G .338
+(sh history \214les may be shared among dif)129.246 286.8 R .338
+(ferent concurrent instances of ksh, which could be a)-.25 F
+(bene\214t to the user)72 298.8 Q(.)-.55 E F1 2.5(5. F)72 322.8 R(eatur)-.25 E
+(es in Bash-2.0)-.18 E F0 .657(The ne)97 338.4 R .657
+(xt release of bash, 2.0, will be a major o)-.15 F -.15(ve)-.15 G 3.157
+(rhaul. It).15 F .656(will include man)3.157 F 3.156(yn)-.15 G 1.156 -.25(ew f)
+419.532 338.4 T .656(eatures, for both).25 F .705(programming and interacti)72
+350.4 R 1.005 -.15(ve u)-.25 H 3.205(se. Redundant).15 F -.15(ex)3.205 G .705
+(isting functions will be remo).15 F -.15(ve)-.15 G 3.206(d. There).15 F .706
+(are se)3.206 F -.15(ve)-.25 G .706(ral cases).15 F 1.34(where bash treats a v)
+72 362.4 R 1.34(ariable specially to enable functionality a)-.25 F -.25(va)-.2
+G 1.34(ilable another w).25 F 1.34(ay \()-.1 F F1($nolinks)A F0(vs.)3.84 E F1
+1.34(set -o)3.84 F(ph)72 374.4 Q(ysical)-.15 E F0 2.5(,f)C(or e)115.19 374.4 Q
+(xample\); the special treatment of the v)-.15 E(ariable name will be remo)-.25
+E -.15(ve)-.15 G(d.).15 E F1 2.5(5.1. Arrays)72 398.4 R F0 .546(Bash-2.0 will \
+include arrays which are a superset of those in ksh, with the size limitations\
+ remo)97 414 R -.15(ve)-.15 G(d.).15 E(The)72 426 Q F1(declar)3.086 E(e)-.18 E
+F0(,)A F1 -.18(re)3.086 G(adonly).18 E F0 3.086(,a)C(nd)174.768 426 Q F1
+(export)3.086 E F0 -.2(bu)3.086 G .586
+(iltins will accept options to specify arrays, and the).2 F F1 -.18(re)3.085 G
+(ad).18 E F0 -.2(bu)3.085 G .585(iltin will).2 F(ha)72 438 Q .81 -.15(ve a)-.2
+H 3.01(no).15 G .51(ption to read a list of w)110.99 438 R .51
+(ords and assign them directly to an array)-.1 F 5.51(.T)-.65 G .51
+(here will also be a ne)386.23 438 R 3.01(wa)-.25 G(rray)487.9 438 Q F2 .262
+(compound assignment)72 450 R F0 .262(syntax a)2.762 F -.25(va)-.2 G .262
+(ilable for assignment statements and the).25 F F1(declar)2.761 E(e)-.18 E F0
+-.2(bu)2.761 G 2.761(iltin. This).2 F(ne)2.761 E 2.761(ws)-.25 G(yntax)481.78
+450 Q .441(has the form)72 462 R F2(name)2.941 E F0(=\()A F2(value1)A F0(...)
+2.941 E F2(valueN)2.941 E F0 .441(\), where each)B F2(value)2.942 E F0 .442
+(has the form [)4.608 F F2(subscript)A F0(]=)A F2(string)A F0 5.442(.O)C .442
+(nly the)449.776 462 R F2(string)2.942 E F0 1.395(is required.)72 474 R 1.395
+(If the optional brack)6.395 F 1.395(ets and)-.1 F F2(subscript)3.894 E F0
+1.394(are included, that inde)3.894 F 3.894(xi)-.15 G 3.894(sa)388.714 474 S
+1.394(ssigned to, otherwise the)400.938 474 R(inde)72 486 Q 3.656(xo)-.15 G
+3.656(ft)102.726 486 S 1.156(he element assigned is the last inde)112.492 486 R
+3.657(xa)-.15 G 1.157(ssigned to by the statement plus one.)272.917 486 R(Inde)
+6.157 E 1.157(xing starts at)-.15 F 2.73(zero. The)72 498 R .23
+(same syntax is accepted by)2.73 F F1(declar)2.73 E(e)-.18 E F0 5.229(.I)C(ndi)
+269.159 498 Q .229(vidual array elements may be assigned to using the ksh)-.25
+F F2(name)72 510 Q F0([)A F2(subscript)A F0(]=)A F2(value)A F0(.)A F1 2.5
+(5.2. Dynamic)72 534 R(Loading)2.5 E F0 .348(On systems that support the)97
+549.6 R F2(dlopen)2.848 E F0 .349(\(3\) library function, bash-2.0 will allo)B
+2.849(wn)-.25 G .849 -.25(ew b)407.504 549.6 T .349(uiltins to be loaded).05 F
+.049(into a running shell from a shared object \214le.)72 561.6 R .049(The ne)
+5.049 F 2.549(wb)-.25 G .049(uiltins will ha)298.999 561.6 R .348 -.15(ve a)-.2
+H .048(ccess to the rest of the shell f).15 F(acil-)-.1 E .649(ities, b)72
+573.6 R .649(ut programmers will be subject to a fe)-.2 F 3.149(ws)-.25 G .649
+(tructural rules.)269.591 573.6 R .65(This will be pro)5.65 F .65
+(vided via a ne)-.15 F 3.15(wo)-.25 G .65(ption to)472.51 573.6 R F1(enable)72
+585.6 Q F0(.)A F1 2.5(5.3. Builtins)72 609.6 R F0 .889(Some of the e)97 625.2 R
+.889(xisting b)-.15 F .889(uiltins will change in bash-2.0.)-.2 F .888(As pre)
+5.888 F .888(viously noted,)-.25 F F1(declar)3.388 E(e)-.18 E F0(,)A F1(export)
+3.388 E F0(,)A F1 -.18(re)3.388 G(ad-).18 E(only)72 637.2 Q F0 2.873(,a)C(nd)
+100.153 637.2 Q F1 -.18(re)2.873 G(ad).18 E F0 .373(will accept ne)2.873 F
+2.873(wo)-.25 G .374(ptions to specify arrays.)206.288 637.2 R(The)5.374 E F1
+(jobs)2.874 E F0 -.2(bu)2.874 G .374(iltin will be able to list only stopped).2
+F .323(or running jobs.)72 649.2 R(The)5.322 E F1(enable)2.822 E F0 .322
+(command will tak)2.822 F 2.822(ean)-.1 G -.25(ew)282.84 649.2 S F1<ad73>3.072
+E F0 .322(option to restrict its actions to the POSIX.2)2.822 F F2(spe-)2.822 E
+(cial)72 661.2 Q F0 -.2(bu)3.14 G(iltins.).2 E F1(Kill)5.64 E F0 .64
+(will be able to list signal numbers corresponding to indi)3.14 F .64
+(vidual signal names.)-.25 F .64(The read-)5.64 F .703(line library interf)72
+673.2 R(ace,)-.1 E F1(bind)3.203 E F0 3.203(,w)C .703(ill ha)193.032 673.2 R
+1.003 -.15(ve a)-.2 H 3.203(no).15 G .703(ption to remo)243.951 673.2 R 1.003
+-.15(ve t)-.15 H .703(he binding for an).15 F 3.203(yk)-.15 G 1.002 -.15(ey s)
+398.032 673.2 T .702(equence \(which is not).15 F
+(the same as binding it to self-insert\).)72 685.2 Q .494(There will be tw)97
+700.8 R 2.994(on)-.1 G .994 -.25(ew b)177.196 700.8 T .495
+(uiltin commands in bash-2.0.).05 F(The)5.495 E F1(diso)2.995 E(wn)-.1 E F0
+.495(command will remo)2.995 F .795 -.15(ve j)-.15 H .495(obs from).15 F(bash')
+72 712.8 Q 3.445(si)-.55 G .945(nternal jobs table when job control is acti)
+103.225 712.8 R -.15(ve)-.25 G 5.945(.A).15 G(diso)303.25 712.8 Q .944
+(wned job will not be listed by the jobs com-)-.25 F .666(mand, nor will its e)
+72 724.8 R .666(xit status be reported.)-.15 F(Diso)5.667 E .667
+(wned jobs will not be sent a)-.25 F F1(SIGHUP)3.167 E F0 .667
+(when an interacti)3.167 F -.15(ve)-.25 G EP
+%%Page: 12 12
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(2-)288 48 S .688(shell e)72 84 R
+3.187(xits. Most)-.15 F .687(of the shell')3.187 F 3.187(so)-.55 G .687
+(ptional or)205.423 84 R/F1 10/Times-Italic@0 SF(to)3.187 E -.1(gg)-.1 G(led).1
+E F0 .687(functionality will be folded into the ne)3.187 F(w)-.25 E/F2 10
+/Times-Bold@0 SF(shopt)3.187 E F0 -.2(bu)3.187 G(iltin.).2 E(Man)72 96 Q 3.714
+(yo)-.15 G 3.714(ft)103.894 96 S 1.214(he v)113.718 96 R 1.214
+(ariables which alter the shell')-.25 F 3.714(sb)-.55 G(eha)266.282 96 Q 1.214
+(vior when set \(re)-.2 F -.05(ga)-.15 G 1.214(rdless of their v).05 F 1.215
+(alue\) will be made)-.25 F 6(options settable with)72 108 R F2(shopt)8.5 E F0
+11(.E)C 6(xamples of such v)218.23 108 R 6(ariables include)-.25 F F2(allo)8.5
+E(w_null_glob_expansion)-.1 E F0(,)A F2(glob_dot_\214lenames)72 120 Q F0 2.5
+(,a)C(nd)163.67 120 Q F2(MAIL_W)2.5 E(ARNING)-1.2 E F0(.)A F2 2.5(5.4. V)72 144
+R(ariables and V)-.92 E(ariable Expansion)-.92 E F0 .047
+(Bash-2.0 will implement se)97 159.6 R -.15(ve)-.25 G .048(ral ne).15 F 2.548
+(wv)-.25 G .048(ariable e)252.988 159.6 R 2.548(xpansions. These)-.15 F .048
+(will answer se)2.548 F -.15(ve)-.25 G .048(ral of the most per).15 F(-)-.2 E
+.213(sistant requests for ne)72 171.6 R 2.713(wf)-.25 G 2.713(eatures. It)
+172.582 171.6 R .213(will be possible to `)2.713 F .212(`indirectly reference')
+-.74 F 2.712('av)-.74 G .212(ariable with an e)398.534 171.6 R(xpansion,)-.15 E
+(lik)72 183.6 Q 3.01(eu)-.1 G(sing)94.91 183.6 Q/F3 10/Courier@0 SF .51
+(eval \\$${name})3.01 F F0 .51(to reference a v)3.01 F .51(ariable named by)
+-.25 F F3(${name})3.01 E F0 5.51(.E)C .51(xpansions will be a)394.32 183.6 R
+-.25(va)-.2 G(ilable).25 E .462(to retrie)72 195.6 R .762 -.15(ve s)-.25 H .462
+(ubstrings of v).15 F .461(ariables in an)-.25 F F1(awk)2.961 E F0(-lik)A 2.961
+(em)-.1 G .461(anner: starting at a speci\214c inde)277.692 195.6 R .461
+(x, retrie)-.15 F .461(ving some num-)-.25 F .941
+(ber of characters or the rest of the string.)72 207.6 R .941
+(It will be possible to retrie)5.941 F 1.241 -.15(ve s)-.25 H .941
+(equences of array elements lik).15 F(e)-.1 E .354(this, too.)72 219.6 R .354
+(It w)5.354 F .354(ould be nice to ha)-.1 F .654 -.15(ve a w)-.2 H .354
+(ay to replace portions of a v).05 F .353
+(ariable matching a pattern the same w)-.25 F(ay)-.1 E(leading or trailing sub\
+strings are presently stripped; that capability may be a)72 231.6 Q -.25(va)-.2
+G(ilable.).25 E .453(Another ne)97 247.2 R 2.953(we)-.25 G .453
+(xpansion will pro)156.376 247.2 R .453(vide a w)-.15 F .454
+(ay to create strings containing arbitrary characters, which is)-.1 F(incon)72
+259.2 Q -.15(ve)-.4 G 1.636(nient in the current v).15 F 4.136(ersion. W)-.15 F
+1.635(ords of the form $')-.8 F F1(string)A F0 4.135('w)C 1.635(ill e)355.145
+259.2 R 1.635(xpand to)-.15 F F1(string)4.135 E F0 1.635(with backslash-)4.135
+F 1.231(escaped characters in)72 271.2 R F1(string)3.731 E F0 1.231
+(replaced as speci\214ed by the ANSI C standard.)3.731 F 1.232
+(As with other single-quoted)6.232 F
+(shell strings, the only character that may not appear in)72 283.2 Q F1(string)
+2.5 E F0(is a single quote.)2.5 E 1.436(The shell v)97 298.8 R 1.436
+(ariables will change also.)-.25 F 3.936(An)6.436 G 1.936 -.25(ew va)272.052
+298.8 T(riable).25 E F2(HISTIGNORE)3.936 E F0 1.435(will supersede)3.936 F F2
+(HISTCON-)3.935 E(TR)72 310.8 Q(OL)-.3 E F0(.)A F2(HISTIGNORE)5.327 E F0 .327
+(is the history analogy of)2.827 F F2(FIGNORE)2.828 E F0 2.828(:ac)C .328
+(olon-separated list of patterns specifying)339.938 310.8 R 1.082
+(commands to omit from the history list.)72 322.8 R 1.081
+(The special pattern '&' will match the pre)6.081 F 1.081
+(vious history line, to)-.25 F(pro)72 334.8 Q 1.568(vide the)-.15 F F2
+(HISTCONTR)4.068 E(OL)-.3 E F1(ignor)4.068 E(edups)-.37 E F0(beha)5.734 E(vior)
+-.2 E 6.568(.M)-.55 G(an)303.546 334.8 Q 4.069(yv)-.15 G 1.569
+(ariables which modify the shell')326.655 334.8 R 4.069(sb)-.55 G(eha)474.21
+334.8 Q(vior)-.2 E .395(will lose their special meaning.)72 346.8 R -1.11(Va)
+5.395 G .395(riables such as)1.11 F F2(notify)2.895 E F0(and)2.895 E F2(noclob)
+2.895 E(ber)-.1 E F0 .395(which pro)2.895 F .395(vide functionality a)-.15 F
+-.25(va)-.2 G(il-).25 E .931
+(able via other mechanisms will no longer be treated specially)72 358.8 R 5.931
+(.O)-.65 G .931(ther v)340.06 358.8 R .932(ariables will be folded into)-.25 F
+F2(shopt)3.432 E F0(.)A(The)72 370.8 Q F2(history_contr)5.519 E(ol)-.18 E F0
+(and)5.519 E F2(hostname_completion_\214le)5.519 E F0 -.25(va)5.519 G 3.019
+(riables, superseded by).25 F F2(HISTCONTR)5.518 E(OL)-.3 E F0(and)5.518 E F2
+(HOSTFILE)72 382.8 Q F0(respecti)2.5 E -.15(ve)-.25 G(ly).15 E 2.5(,w)-.65 G
+(ill be remo)185.12 382.8 Q -.15(ve)-.15 G(d.).15 E F2 2.5(5.5. Readline)72
+406.8 R F0(Naturally)97 422.4 Q 2.94(,t)-.65 G .44(here will be impro)142.34
+422.4 R -.15(ve)-.15 G .441(ments to readline as well.).15 F .441
+(All of the POSIX.2)5.441 F F1(vi)2.941 E F0 .441(-mode editing com-)B .33
+(mands will be implemented; missing commands lik)72 434.4 R 2.829(e`)-.1 G .329
+(m' to sa)290.599 434.4 R .629 -.15(ve t)-.2 H .329
+(he current cursor position \().15 F F1(mark)A F0 2.829(\)a)C .329(nd the)
+478.951 434.4 R .36(`@' command for macro e)72 446.4 R .36(xpansion will be a)
+-.15 F -.25(va)-.2 G 2.861(ilable. The).25 F .361
+(ability to set the mark and e)2.861 F .361(xchange the current)-.15 F .764
+(cursor position \()72 458.4 R F1(point)A F0 3.264(\)a)C .764
+(nd mark will be added to the readline emacs mode as well.)170.672 458.4 R .763
+(Since there are com-)5.764 F .196
+(mands to set the mark, commands to manipulate the re)72 470.4 R .197
+(gion \(the characters between the point and the mark\))-.15 F .111(will be a)
+72 482.4 R -.25(va)-.2 G 2.611(ilable. Commands).25 F(ha)2.611 E .411 -.15
+(ve b)-.2 H .11
+(een added to the readline emacs mode for more complete ksh compati-).15 F
+(bility)72 494.4 Q 2.5(,s)-.65 G(uch as the C-])101.36 494.4 Q F1(c)A F0
+(character search command.)2.5 E F2 2.5(5.6. Con\214guration)72 518.4 R F0 .318
+(Bash w)97 534 R .318
+(as the \214rst GNU program to completely autocon\214gure.)-.1 F .319
+(Its autocon\214guration mechanism pre-)5.319 F(dates)72 546 Q F1(autoconf)4.07
+E F0 4.07(,t)C 1.569
+(he current GNU con\214guration program, and needs updating.)140.97 546 R 1.569
+(Bash-2.0 may include an)6.569 F .603
+(autoconf-based con\214guration script, if necessary ne)72 558 R 3.103(wf)-.25
+G .603(unctionality can be added to autoconf, or its limita-)294.476 558 R
+(tions bypassed.)72 570 Q F2 2.5(5.7. Miscellaneous)72 594 R F0 1.632
+(The POSIX mode will be impro)97 609.6 R -.15(ve)-.15 G 4.131(di).15 G 4.131
+(nb)254.26 609.6 S 1.631(ash-2.0; it will pro)268.391 609.6 R 1.631
+(vide a more complete superset of the)-.15 F(POSIX standard.)72 621.6 Q -.15
+(Fo)5 G 2.5(rt).15 G(he \214rst time, bash will recognize the e)163.79 621.6 Q
+(xistance of the POSIX.2)-.15 E F1(special)2.5 E F0 -.2(bu)2.5 G(iltins.).2 E
+2.627(An)97 637.2 S .627 -.25(ew t)111.847 637.2 T .127(rap v).25 F(alue,)-.25
+E F2(DEB)2.627 E(UG)-.1 E F0 2.627(,w)C .128(ill be present, as in ksh.)218.405
+637.2 R .128(Commands speci\214ed with a)5.128 F F2(DEB)2.628 E(UG)-.1 E F0
+.128(trap will)2.628 F 1.908(be e)72 649.2 R -.15(xe)-.15 G 1.908
+(cuted after e).15 F -.15(ve)-.25 G 1.908(ry simple command.).15 F 1.908
+(Since this mak)6.908 F 1.908(es shell script deb)-.1 F 1.908
+(uggers possible, I hope to)-.2 F(include a bash deb)72 661.2 Q
+(ugger in the bash-2.0 release.)-.2 E F2 2.5(6. A)72 685.2 R -.1(va)-1 G
+(ilability).1 E F0 5.997(The current v)97 700.8 R 5.997(ersion of bash is a)
+-.15 F -.25(va)-.2 G 5.998(ilable for anon).25 F 5.998
+(ymous FTP from prep.ai.mit.edu as)-.15 F F1(/pub/gnu/bash-1.14.2.tar)72 712.8
+Q(.gz)-1.11 E F0(.)1.666 E EP
+%%Page: 13 13
+%%BeginPageSetup
+BP
+%%EndPageSetup
+/F0 10/Times-Roman@0 SF 2.5(-1)277.17 48 S 2.5(3-)288 48 S/F1 10/Times-Bold@0
+SF 2.5(7. Conclusion)72 84 R F0 .755(This paper has presented an o)97 99.6 R
+-.15(ve)-.15 G(rvie).15 E 3.255(wo)-.25 G 3.255(fb)259.27 99.6 S .755
+(ash, compared its features with those of other shells, and)270.855 99.6 R
+(hinted at features in the ne)72 111.6 Q(xt release, bash-2.0.)-.15 E .483
+(Bash is a solid replacement for sh.)97 127.2 R .483(It is suf)5.483 F .483
+(\214ciently portable to run on nearly e)-.25 F -.15(ve)-.25 G .484(ry v).15 F
+.484(ersion of)-.15 F/F2 9/Times-Roman@0 SF(UNIX)2.984 E F0 .514
+(from 4.3 BSD to SVR4.2, and se)72 139.2 R -.15(ve)-.25 G(ral).15 E F2(UNIX)
+3.013 E F0 -.1(wo)3.013 G(rkalik).1 E .513(es, and rob)-.1 F .513
+(ust enough to replace sh on most of those)-.2 F .771(systems, It is v)72 151.2
+R .771(ery close to POSIX.2-conformant in POSIX mode, and is getting f)-.15 F
+(aster)-.1 E 5.771(.I)-.55 G 3.272(ti)436.684 151.2 S 3.272(sn)445.516 151.2 S
+.772(ot, unfortu-)457.678 151.2 R(nately)72 163.2 Q 2.663(,g)-.65 G .163
+(etting smaller)105.953 163.2 R 2.663(,b)-.4 G .163(ut there are man)170.399
+163.2 R 2.663(yo)-.15 G .163(ptional features.)248.101 163.2 R .163(It is v)
+5.163 F .162(ery easy to b)-.15 F .162(uild a small subset to use as)-.2 F 2.5
+(ad)72 175.2 S(irect replacement for /bin/sh.)83.94 175.2 Q .909
+(Bash has thousands of users w)97 190.8 R .909(orldwide, all of whom ha)-.1 F
+1.209 -.15(ve h)-.2 H .91(elped to mak).15 F 3.41(ei)-.1 G 3.41(tb)409.34 190.8
+S(etter)420.53 190.8 Q 5.91(.A)-.55 G .91(nother testa-)453.38 190.8 R
+(ment to the bene\214ts of free softw)72 202.8 Q(are.)-.1 E F1 2.5(8. Refer)72
+226.8 R(ences)-.18 E F0 .432([1] S. R. Bourne, `)72 242.4 R .432(`UNIX T)-.74 F
+.432(ime-Sharing System:)-.35 F .431(The UNIX Shell')5.431 F(',)-.74 E/F3 10
+/Times-Italic@0 SF .431(Bell System T)2.931 F(ec)-.92 E .431(hnical J)-.15 F
+(ournal)-.25 E F0 2.931(,5)C(7\(6\),)484.84 242.4 Q
+(July-August, 1978, pp. 1971-1990.)72 254.4 Q .736([2] Morris Bolsk)72 270 R
+3.237(ya)-.15 G .737(nd Da)153.22 270 R .737(vid K)-.2 F(orn,)-.35 E F3 .737
+(The K)3.237 F .737(ornShell Command and Pr)-.4 F -.1(og)-.45 G -.15(ra).1 G
+.737(mming Langua).15 F -.1(ge)-.1 G F0 3.237(,P).1 G .737(rentice Hall,)
+453.833 270 R(1989.)72 282 Q .142([3] Bill Jo)72 297.6 R 1.442 -.65(y, A)-.1 H
+2.642(nI).65 G .141(ntroduction to the C Shell,)140.428 297.6 R F3 .141
+(UNIX User')2.641 F 2.641(sS)-.4 G .141(upplementary Documents)309.346 297.6 R
+F0 2.641(,U)C(ni)424.328 297.6 Q -.15(ve)-.25 G .141(rsity of Califor).15 F(-)
+-.2 E(nia at Berk)72 309.6 Q(ele)-.1 E 1.3 -.65(y, 1)-.15 H(986.).65 E .283
+([4] IEEE,)72 325.2 R F3 .283(IEEE Standar)2.783 F 2.783(df)-.37 G .283
+(or Information T)179.692 325.2 R(ec)-.92 E(hnolo)-.15 E .283(gy -- P)-.1 F
+.283(ortable Oper)-.8 F .283(ating System Interface \(POSIX\) P)-.15 F(art)-.8
+E(2: Shell and Utilities)72 337.2 Q F0 2.5(,1)C(992.)165.06 337.2 Q F1 2.5
+(9. A)72 361.2 R(uthor Inf)-.5 E(ormation)-.25 E F0 .937(Chet Rame)97 376.8 R
+3.437(yi)-.15 G 3.437(sas)153.724 376.8 S(oftw)172.818 376.8 Q .936
+(are engineer w)-.1 F .936(orking at Case W)-.1 F .936(estern Reserv)-.8 F
+3.436(eU)-.15 G(ni)393.43 376.8 Q -.15(ve)-.25 G(rsity).15 E 5.936(.H)-.65 G
+3.436(eh)443.036 376.8 S .936(as a B.S. in)455.912 376.8 R .072
+(Computer Engineering and an M.S. in Computer Science, both from CWR)72 388.8 R
+2.573(U. He)-.4 F .073(has been w)2.573 F .073(orking on bash)-.1 F
+(for six years, and the primary maintainer for one.)72 400.8 Q EP
+%%Trailer
+end
+%%EOF
diff --git a/doc/texinfo.tex b/doc/texinfo.tex
new file mode 100644
index 0000000..03c2998
--- /dev/null
+++ b/doc/texinfo.tex
@@ -0,0 +1,9250 @@
+% texinfo.tex -- TeX macros to handle Texinfo files.
+%
+% Load plain if necessary, i.e., if running under initex.
+\expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
+%
+\def\texinfoversion{2009-01-18.17}
+%
+% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
+% 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+% 2007, 2008, 2009 Free Software Foundation, Inc.
+%
+% This texinfo.tex file is free software: you can redistribute it and/or
+% modify it under the terms of the GNU General Public License as
+% published by the Free Software Foundation, either version 3 of the
+% License, or (at your option) any later version.
+%
+% This texinfo.tex file is distributed in the hope that it will be
+% useful, but WITHOUT ANY WARRANTY; without even the implied warranty
+% of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+% General Public License for more details.
+%
+% You should have received a copy of the GNU General Public License
+% along with this program. If not, see <http://www.gnu.org/licenses/>.
+%
+% As a special exception, when this file is read by TeX when processing
+% a Texinfo source document, you may use the result without
+% restriction. (This has been our intent since Texinfo was invented.)
+%
+% Please try the latest version of texinfo.tex before submitting bug
+% reports; you can get the latest version from:
+% http://www.gnu.org/software/texinfo/ (the Texinfo home page), or
+% ftp://tug.org/tex/texinfo.tex
+% (and all CTAN mirrors, see http://www.ctan.org).
+% The texinfo.tex in any given distribution could well be out
+% of date, so if that's what you're using, please check.
+%
+% Send bug reports to bug-texinfo@gnu.org. Please include including a
+% complete document in each bug report with which we can reproduce the
+% problem. Patches are, of course, greatly appreciated.
+%
+% To process a Texinfo manual with TeX, it's most reliable to use the
+% texi2dvi shell script that comes with the distribution. For a simple
+% manual foo.texi, however, you can get away with this:
+% tex foo.texi
+% texindex foo.??
+% tex foo.texi
+% tex foo.texi
+% dvips foo.dvi -o # or whatever; this makes foo.ps.
+% The extra TeX runs get the cross-reference information correct.
+% Sometimes one run after texindex suffices, and sometimes you need more
+% than two; texi2dvi does it as many times as necessary.
+%
+% It is possible to adapt texinfo.tex for other languages, to some
+% extent. You can get the existing language-specific files from the
+% full Texinfo distribution.
+%
+% The GNU Texinfo home page is http://www.gnu.org/software/texinfo.
+
+
+\message{Loading texinfo [version \texinfoversion]:}
+
+% If in a .fmt file, print the version number
+% and turn on active characters that we couldn't do earlier because
+% they might have appeared in the input file name.
+\everyjob{\message{[Texinfo version \texinfoversion]}%
+ \catcode`+=\active \catcode`\_=\active}
+
+
+\chardef\other=12
+
+% We never want plain's \outer definition of \+ in Texinfo.
+% For @tex, we can use \tabalign.
+\let\+ = \relax
+
+% Save some plain tex macros whose names we will redefine.
+\let\ptexb=\b
+\let\ptexbullet=\bullet
+\let\ptexc=\c
+\let\ptexcomma=\,
+\let\ptexdot=\.
+\let\ptexdots=\dots
+\let\ptexend=\end
+\let\ptexequiv=\equiv
+\let\ptexexclam=\!
+\let\ptexfootnote=\footnote
+\let\ptexgtr=>
+\let\ptexhat=^
+\let\ptexi=\i
+\let\ptexindent=\indent
+\let\ptexinsert=\insert
+\let\ptexlbrace=\{
+\let\ptexless=<
+\let\ptexnewwrite\newwrite
+\let\ptexnoindent=\noindent
+\let\ptexplus=+
+\let\ptexrbrace=\}
+\let\ptexslash=\/
+\let\ptexstar=\*
+\let\ptext=\t
+\let\ptextop=\top
+{\catcode`\'=\active
+\global\let\ptexquoteright'}% Math-mode def from plain.tex.
+\let\ptexraggedright=\raggedright
+
+% If this character appears in an error message or help string, it
+% starts a new line in the output.
+\newlinechar = `^^J
+
+% Use TeX 3.0's \inputlineno to get the line number, for better error
+% messages, but if we're using an old version of TeX, don't do anything.
+%
+\ifx\inputlineno\thisisundefined
+ \let\linenumber = \empty % Pre-3.0.
+\else
+ \def\linenumber{l.\the\inputlineno:\space}
+\fi
+
+% Set up fixed words for English if not already set.
+\ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi
+\ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi
+\ifx\putwordfile\undefined \gdef\putwordfile{file}\fi
+\ifx\putwordin\undefined \gdef\putwordin{in}\fi
+\ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi
+\ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi
+\ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi
+\ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi
+\ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi
+\ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi
+\ifx\putwordof\undefined \gdef\putwordof{of}\fi
+\ifx\putwordon\undefined \gdef\putwordon{on}\fi
+\ifx\putwordpage\undefined \gdef\putwordpage{page}\fi
+\ifx\putwordsection\undefined \gdef\putwordsection{section}\fi
+\ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi
+\ifx\putwordsee\undefined \gdef\putwordsee{see}\fi
+\ifx\putwordSee\undefined \gdef\putwordSee{See}\fi
+\ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi
+\ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi
+%
+\ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi
+\ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi
+\ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi
+\ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi
+\ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi
+\ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi
+\ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi
+\ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi
+\ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi
+\ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi
+\ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi
+\ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi
+%
+\ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi
+\ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi
+\ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi
+\ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi
+\ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi
+
+% Since the category of space is not known, we have to be careful.
+\chardef\spacecat = 10
+\def\spaceisspace{\catcode`\ =\spacecat}
+
+% sometimes characters are active, so we need control sequences.
+\chardef\colonChar = `\:
+\chardef\commaChar = `\,
+\chardef\dashChar = `\-
+\chardef\dotChar = `\.
+\chardef\exclamChar= `\!
+\chardef\lquoteChar= `\`
+\chardef\questChar = `\?
+\chardef\rquoteChar= `\'
+\chardef\semiChar = `\;
+\chardef\underChar = `\_
+
+% Ignore a token.
+%
+\def\gobble#1{}
+
+% The following is used inside several \edef's.
+\def\makecsname#1{\expandafter\noexpand\csname#1\endcsname}
+
+% Hyphenation fixes.
+\hyphenation{
+ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script
+ ap-pen-dix bit-map bit-maps
+ data-base data-bases eshell fall-ing half-way long-est man-u-script
+ man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm
+ par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces
+ spell-ing spell-ings
+ stand-alone strong-est time-stamp time-stamps which-ever white-space
+ wide-spread wrap-around
+}
+
+% Margin to add to right of even pages, to left of odd pages.
+\newdimen\bindingoffset
+\newdimen\normaloffset
+\newdimen\pagewidth \newdimen\pageheight
+
+% For a final copy, take out the rectangles
+% that mark overfull boxes (in case you have decided
+% that the text looks ok even though it passes the margin).
+%
+\def\finalout{\overfullrule=0pt}
+
+% @| inserts a changebar to the left of the current line. It should
+% surround any changed text. This approach does *not* work if the
+% change spans more than two lines of output. To handle that, we would
+% have adopt a much more difficult approach (putting marks into the main
+% vertical list for the beginning and end of each change).
+%
+\def\|{%
+ % \vadjust can only be used in horizontal mode.
+ \leavevmode
+ %
+ % Append this vertical mode material after the current line in the output.
+ \vadjust{%
+ % We want to insert a rule with the height and depth of the current
+ % leading; that is exactly what \strutbox is supposed to record.
+ \vskip-\baselineskip
+ %
+ % \vadjust-items are inserted at the left edge of the type. So
+ % the \llap here moves out into the left-hand margin.
+ \llap{%
+ %
+ % For a thicker or thinner bar, change the `1pt'.
+ \vrule height\baselineskip width1pt
+ %
+ % This is the space between the bar and the text.
+ \hskip 12pt
+ }%
+ }%
+}
+
+% Sometimes it is convenient to have everything in the transcript file
+% and nothing on the terminal. We don't just call \tracingall here,
+% since that produces some useless output on the terminal. We also make
+% some effort to order the tracing commands to reduce output in the log
+% file; cf. trace.sty in LaTeX.
+%
+\def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}%
+\def\loggingall{%
+ \tracingstats2
+ \tracingpages1
+ \tracinglostchars2 % 2 gives us more in etex
+ \tracingparagraphs1
+ \tracingoutput1
+ \tracingmacros2
+ \tracingrestores1
+ \showboxbreadth\maxdimen \showboxdepth\maxdimen
+ \ifx\eTeXversion\undefined\else % etex gives us more logging
+ \tracingscantokens1
+ \tracingifs1
+ \tracinggroups1
+ \tracingnesting2
+ \tracingassigns1
+ \fi
+ \tracingcommands3 % 3 gives us more in etex
+ \errorcontextlines16
+}%
+
+% add check for \lastpenalty to plain's definitions. If the last thing
+% we did was a \nobreak, we don't want to insert more space.
+%
+\def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount
+ \removelastskip\penalty-50\smallskip\fi\fi}
+\def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount
+ \removelastskip\penalty-100\medskip\fi\fi}
+\def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
+ \removelastskip\penalty-200\bigskip\fi\fi}
+
+% For @cropmarks command.
+% Do @cropmarks to get crop marks.
+%
+\newif\ifcropmarks
+\let\cropmarks = \cropmarkstrue
+%
+% Dimensions to add cropmarks at corners.
+% Added by P. A. MacKay, 12 Nov. 1986
+%
+\newdimen\outerhsize \newdimen\outervsize % set by the paper size routines
+\newdimen\cornerlong \cornerlong=1pc
+\newdimen\cornerthick \cornerthick=.3pt
+\newdimen\topandbottommargin \topandbottommargin=.75in
+
+% Output a mark which sets \thischapter, \thissection and \thiscolor.
+% We dump everything together because we only have one kind of mark.
+% This works because we only use \botmark / \topmark, not \firstmark.
+%
+% A mark contains a subexpression of the \ifcase ... \fi construct.
+% \get*marks macros below extract the needed part using \ifcase.
+%
+% Another complication is to let the user choose whether \thischapter
+% (\thissection) refers to the chapter (section) in effect at the top
+% of a page, or that at the bottom of a page. The solution is
+% described on page 260 of The TeXbook. It involves outputting two
+% marks for the sectioning macros, one before the section break, and
+% one after. I won't pretend I can describe this better than DEK...
+\def\domark{%
+ \toks0=\expandafter{\lastchapterdefs}%
+ \toks2=\expandafter{\lastsectiondefs}%
+ \toks4=\expandafter{\prevchapterdefs}%
+ \toks6=\expandafter{\prevsectiondefs}%
+ \toks8=\expandafter{\lastcolordefs}%
+ \mark{%
+ \the\toks0 \the\toks2
+ \noexpand\or \the\toks4 \the\toks6
+ \noexpand\else \the\toks8
+ }%
+}
+% \topmark doesn't work for the very first chapter (after the title
+% page or the contents), so we use \firstmark there -- this gets us
+% the mark with the chapter defs, unless the user sneaks in, e.g.,
+% @setcolor (or @url, or @link, etc.) between @contents and the very
+% first @chapter.
+\def\gettopheadingmarks{%
+ \ifcase0\topmark\fi
+ \ifx\thischapter\empty \ifcase0\firstmark\fi \fi
+}
+\def\getbottomheadingmarks{\ifcase1\botmark\fi}
+\def\getcolormarks{\ifcase2\topmark\fi}
+
+% Avoid "undefined control sequence" errors.
+\def\lastchapterdefs{}
+\def\lastsectiondefs{}
+\def\prevchapterdefs{}
+\def\prevsectiondefs{}
+\def\lastcolordefs{}
+
+% Main output routine.
+\chardef\PAGE = 255
+\output = {\onepageout{\pagecontents\PAGE}}
+
+\newbox\headlinebox
+\newbox\footlinebox
+
+% \onepageout takes a vbox as an argument. Note that \pagecontents
+% does insertions, but you have to call it yourself.
+\def\onepageout#1{%
+ \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi
+ %
+ \ifodd\pageno \advance\hoffset by \bindingoffset
+ \else \advance\hoffset by -\bindingoffset\fi
+ %
+ % Do this outside of the \shipout so @code etc. will be expanded in
+ % the headline as they should be, not taken literally (outputting ''code).
+ \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi
+ \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}%
+ \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi
+ \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}%
+ %
+ {%
+ % Have to do this stuff outside the \shipout because we want it to
+ % take effect in \write's, yet the group defined by the \vbox ends
+ % before the \shipout runs.
+ %
+ \indexdummies % don't expand commands in the output.
+ \normalturnoffactive % \ in index entries must not stay \, e.g., if
+ % the page break happens to be in the middle of an example.
+ % We don't want .vr (or whatever) entries like this:
+ % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
+ % "\acronym" won't work when it's read back in;
+ % it needs to be
+ % {\code {{\tt \backslashcurfont }acronym}
+ \shipout\vbox{%
+ % Do this early so pdf references go to the beginning of the page.
+ \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi
+ %
+ \ifcropmarks \vbox to \outervsize\bgroup
+ \hsize = \outerhsize
+ \vskip-\topandbottommargin
+ \vtop to0pt{%
+ \line{\ewtop\hfil\ewtop}%
+ \nointerlineskip
+ \line{%
+ \vbox{\moveleft\cornerthick\nstop}%
+ \hfill
+ \vbox{\moveright\cornerthick\nstop}%
+ }%
+ \vss}%
+ \vskip\topandbottommargin
+ \line\bgroup
+ \hfil % center the page within the outer (page) hsize.
+ \ifodd\pageno\hskip\bindingoffset\fi
+ \vbox\bgroup
+ \fi
+ %
+ \unvbox\headlinebox
+ \pagebody{#1}%
+ \ifdim\ht\footlinebox > 0pt
+ % Only leave this space if the footline is nonempty.
+ % (We lessened \vsize for it in \oddfootingyyy.)
+ % The \baselineskip=24pt in plain's \makefootline has no effect.
+ \vskip 24pt
+ \unvbox\footlinebox
+ \fi
+ %
+ \ifcropmarks
+ \egroup % end of \vbox\bgroup
+ \hfil\egroup % end of (centering) \line\bgroup
+ \vskip\topandbottommargin plus1fill minus1fill
+ \boxmaxdepth = \cornerthick
+ \vbox to0pt{\vss
+ \line{%
+ \vbox{\moveleft\cornerthick\nsbot}%
+ \hfill
+ \vbox{\moveright\cornerthick\nsbot}%
+ }%
+ \nointerlineskip
+ \line{\ewbot\hfil\ewbot}%
+ }%
+ \egroup % \vbox from first cropmarks clause
+ \fi
+ }% end of \shipout\vbox
+ }% end of group with \indexdummies
+ \advancepageno
+ \ifnum\outputpenalty>-20000 \else\dosupereject\fi
+}
+
+\newinsert\margin \dimen\margin=\maxdimen
+
+\def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}}
+{\catcode`\@ =11
+\gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi
+% marginal hacks, juha@viisa.uucp (Juha Takala)
+\ifvoid\margin\else % marginal info is present
+ \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi
+\dimen@=\dp#1\relax \unvbox#1\relax
+\ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi
+\ifr@ggedbottom \kern-\dimen@ \vfil \fi}
+}
+
+% Here are the rules for the cropmarks. Note that they are
+% offset so that the space between them is truly \outerhsize or \outervsize
+% (P. A. MacKay, 12 November, 1986)
+%
+\def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong}
+\def\nstop{\vbox
+ {\hrule height\cornerthick depth\cornerlong width\cornerthick}}
+\def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong}
+\def\nsbot{\vbox
+ {\hrule height\cornerlong depth\cornerthick width\cornerthick}}
+
+% Parse an argument, then pass it to #1. The argument is the rest of
+% the input line (except we remove a trailing comment). #1 should be a
+% macro which expects an ordinary undelimited TeX argument.
+%
+\def\parsearg{\parseargusing{}}
+\def\parseargusing#1#2{%
+ \def\argtorun{#2}%
+ \begingroup
+ \obeylines
+ \spaceisspace
+ #1%
+ \parseargline\empty% Insert the \empty token, see \finishparsearg below.
+}
+
+{\obeylines %
+ \gdef\parseargline#1^^M{%
+ \endgroup % End of the group started in \parsearg.
+ \argremovecomment #1\comment\ArgTerm%
+ }%
+}
+
+% First remove any @comment, then any @c comment.
+\def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
+\def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
+
+% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
+%
+% \argremovec might leave us with trailing space, e.g.,
+% @end itemize @c foo
+% This space token undergoes the same procedure and is eventually removed
+% by \finishparsearg.
+%
+\def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M}
+\def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M}
+\def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{%
+ \def\temp{#3}%
+ \ifx\temp\empty
+ % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp:
+ \let\temp\finishparsearg
+ \else
+ \let\temp\argcheckspaces
+ \fi
+ % Put the space token in:
+ \temp#1 #3\ArgTerm
+}
+
+% If a _delimited_ argument is enclosed in braces, they get stripped; so
+% to get _exactly_ the rest of the line, we had to prevent such situation.
+% We prepended an \empty token at the very beginning and we expand it now,
+% just before passing the control to \argtorun.
+% (Similarly, we have to think about #3 of \argcheckspacesY above: it is
+% either the null string, or it ends with \^^M---thus there is no danger
+% that a pair of braces would be stripped.
+%
+% But first, we have to remove the trailing space token.
+%
+\def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}}
+
+% \parseargdef\foo{...}
+% is roughly equivalent to
+% \def\foo{\parsearg\Xfoo}
+% \def\Xfoo#1{...}
+%
+% Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my
+% favourite TeX trick. --kasal, 16nov03
+
+\def\parseargdef#1{%
+ \expandafter \doparseargdef \csname\string#1\endcsname #1%
+}
+\def\doparseargdef#1#2{%
+ \def#2{\parsearg#1}%
+ \def#1##1%
+}
+
+% Several utility definitions with active space:
+{
+ \obeyspaces
+ \gdef\obeyedspace{ }
+
+ % Make each space character in the input produce a normal interword
+ % space in the output. Don't allow a line break at this space, as this
+ % is used only in environments like @example, where each line of input
+ % should produce a line of output anyway.
+ %
+ \gdef\sepspaces{\obeyspaces\let =\tie}
+
+ % If an index command is used in an @example environment, any spaces
+ % therein should become regular spaces in the raw index file, not the
+ % expansion of \tie (\leavevmode \penalty \@M \ ).
+ \gdef\unsepspaces{\let =\space}
+}
+
+
+\def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next}
+
+% Define the framework for environments in texinfo.tex. It's used like this:
+%
+% \envdef\foo{...}
+% \def\Efoo{...}
+%
+% It's the responsibility of \envdef to insert \begingroup before the
+% actual body; @end closes the group after calling \Efoo. \envdef also
+% defines \thisenv, so the current environment is known; @end checks
+% whether the environment name matches. The \checkenv macro can also be
+% used to check whether the current environment is the one expected.
+%
+% Non-false conditionals (@iftex, @ifset) don't fit into this, so they
+% are not treated as environments; they don't open a group. (The
+% implementation of @end takes care not to call \endgroup in this
+% special case.)
+
+
+% At run-time, environments start with this:
+\def\startenvironment#1{\begingroup\def\thisenv{#1}}
+% initialize
+\let\thisenv\empty
+
+% ... but they get defined via ``\envdef\foo{...}'':
+\long\def\envdef#1#2{\def#1{\startenvironment#1#2}}
+\def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}}
+
+% Check whether we're in the right environment:
+\def\checkenv#1{%
+ \def\temp{#1}%
+ \ifx\thisenv\temp
+ \else
+ \badenverr
+ \fi
+}
+
+% Environment mismatch, #1 expected:
+\def\badenverr{%
+ \errhelp = \EMsimple
+ \errmessage{This command can appear only \inenvironment\temp,
+ not \inenvironment\thisenv}%
+}
+\def\inenvironment#1{%
+ \ifx#1\empty
+ out of any environment%
+ \else
+ in environment \expandafter\string#1%
+ \fi
+}
+
+% @end foo executes the definition of \Efoo.
+% But first, it executes a specialized version of \checkenv
+%
+\parseargdef\end{%
+ \if 1\csname iscond.#1\endcsname
+ \else
+ % The general wording of \badenverr may not be ideal, but... --kasal, 06nov03
+ \expandafter\checkenv\csname#1\endcsname
+ \csname E#1\endcsname
+ \endgroup
+ \fi
+}
+
+\newhelp\EMsimple{Press RETURN to continue.}
+
+
+%% Simple single-character @ commands
+
+% @@ prints an @
+% Kludge this until the fonts are right (grr).
+\def\@{{\tt\char64}}
+
+% This is turned off because it was never documented
+% and you can use @w{...} around a quote to suppress ligatures.
+%% Define @` and @' to be the same as ` and '
+%% but suppressing ligatures.
+%\def\`{{`}}
+%\def\'{{'}}
+
+% Used to generate quoted braces.
+\def\mylbrace {{\tt\char123}}
+\def\myrbrace {{\tt\char125}}
+\let\{=\mylbrace
+\let\}=\myrbrace
+\begingroup
+ % Definitions to produce \{ and \} commands for indices,
+ % and @{ and @} for the aux/toc files.
+ \catcode`\{ = \other \catcode`\} = \other
+ \catcode`\[ = 1 \catcode`\] = 2
+ \catcode`\! = 0 \catcode`\\ = \other
+ !gdef!lbracecmd[\{]%
+ !gdef!rbracecmd[\}]%
+ !gdef!lbraceatcmd[@{]%
+ !gdef!rbraceatcmd[@}]%
+!endgroup
+
+% @comma{} to avoid , parsing problems.
+\let\comma = ,
+
+% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
+\let\, = \c
+\let\dotaccent = \.
+\def\ringaccent#1{{\accent23 #1}}
+\let\tieaccent = \t
+\let\ubaraccent = \b
+\let\udotaccent = \d
+
+% Other special characters: @questiondown @exclamdown @ordf @ordm
+% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
+\def\questiondown{?`}
+\def\exclamdown{!`}
+\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
+\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
+
+% Dotless i and dotless j, used for accents.
+\def\imacro{i}
+\def\jmacro{j}
+\def\dotless#1{%
+ \def\temp{#1}%
+ \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
+ \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
+ \else \errmessage{@dotless can be used only with i or j}%
+ \fi\fi
+}
+
+% The \TeX{} logo, as in plain, but resetting the spacing so that a
+% period following counts as ending a sentence. (Idea found in latex.)
+%
+\edef\TeX{\TeX \spacefactor=1000 }
+
+% @LaTeX{} logo. Not quite the same results as the definition in
+% latex.ltx, since we use a different font for the raised A; it's most
+% convenient for us to use an explicitly smaller font, rather than using
+% the \scriptstyle font (since we don't reset \scriptstyle and
+% \scriptscriptstyle).
+%
+\def\LaTeX{%
+ L\kern-.36em
+ {\setbox0=\hbox{T}%
+ \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}%
+ \kern-.15em
+ \TeX
+}
+
+% Be sure we're in horizontal mode when doing a tie, since we make space
+% equivalent to this in @example-like environments. Otherwise, a space
+% at the beginning of a line will start with \penalty -- and
+% since \penalty is valid in vertical mode, we'd end up putting the
+% penalty on the vertical list instead of in the new paragraph.
+{\catcode`@ = 11
+ % Avoid using \@M directly, because that causes trouble
+ % if the definition is written into an index file.
+ \global\let\tiepenalty = \@M
+ \gdef\tie{\leavevmode\penalty\tiepenalty\ }
+}
+
+% @: forces normal size whitespace following.
+\def\:{\spacefactor=1000 }
+
+% @* forces a line break.
+\def\*{\hfil\break\hbox{}\ignorespaces}
+
+% @/ allows a line break.
+\let\/=\allowbreak
+
+% @. is an end-of-sentence period.
+\def\.{.\spacefactor=\endofsentencespacefactor\space}
+
+% @! is an end-of-sentence bang.
+\def\!{!\spacefactor=\endofsentencespacefactor\space}
+
+% @? is an end-of-sentence query.
+\def\?{?\spacefactor=\endofsentencespacefactor\space}
+
+% @frenchspacing on|off says whether to put extra space after punctuation.
+%
+\def\onword{on}
+\def\offword{off}
+%
+\parseargdef\frenchspacing{%
+ \def\temp{#1}%
+ \ifx\temp\onword \plainfrenchspacing
+ \else\ifx\temp\offword \plainnonfrenchspacing
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @frenchspacing option `\temp', must be on/off}%
+ \fi\fi
+}
+
+% @w prevents a word break. Without the \leavevmode, @w at the
+% beginning of a paragraph, when TeX is still in vertical mode, would
+% produce a whole line of output instead of starting the paragraph.
+\def\w#1{\leavevmode\hbox{#1}}
+
+% @group ... @end group forces ... to be all on one page, by enclosing
+% it in a TeX vbox. We use \vtop instead of \vbox to construct the box
+% to keep its height that of a normal line. According to the rules for
+% \topskip (p.114 of the TeXbook), the glue inserted is
+% max (\topskip - \ht (first item), 0). If that height is large,
+% therefore, no glue is inserted, and the space between the headline and
+% the text is small, which looks bad.
+%
+% Another complication is that the group might be very large. This can
+% cause the glue on the previous page to be unduly stretched, because it
+% does not have much material. In this case, it's better to add an
+% explicit \vfill so that the extra space is at the bottom. The
+% threshold for doing this is if the group is more than \vfilllimit
+% percent of a page (\vfilllimit can be changed inside of @tex).
+%
+\newbox\groupbox
+\def\vfilllimit{0.7}
+%
+\envdef\group{%
+ \ifnum\catcode`\^^M=\active \else
+ \errhelp = \groupinvalidhelp
+ \errmessage{@group invalid in context where filling is enabled}%
+ \fi
+ \startsavinginserts
+ %
+ \setbox\groupbox = \vtop\bgroup
+ % Do @comment since we are called inside an environment such as
+ % @example, where each end-of-line in the input causes an
+ % end-of-line in the output. We don't want the end-of-line after
+ % the `@group' to put extra space in the output. Since @group
+ % should appear on a line by itself (according to the Texinfo
+ % manual), we don't worry about eating any user text.
+ \comment
+}
+%
+% The \vtop produces a box with normal height and large depth; thus, TeX puts
+% \baselineskip glue before it, and (when the next line of text is done)
+% \lineskip glue after it. Thus, space below is not quite equal to space
+% above. But it's pretty close.
+\def\Egroup{%
+ % To get correct interline space between the last line of the group
+ % and the first line afterwards, we have to propagate \prevdepth.
+ \endgraf % Not \par, as it may have been set to \lisppar.
+ \global\dimen1 = \prevdepth
+ \egroup % End the \vtop.
+ % \dimen0 is the vertical size of the group's box.
+ \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox
+ % \dimen2 is how much space is left on the page (more or less).
+ \dimen2 = \pageheight \advance\dimen2 by -\pagetotal
+ % if the group doesn't fit on the current page, and it's a big big
+ % group, force a page break.
+ \ifdim \dimen0 > \dimen2
+ \ifdim \pagetotal < \vfilllimit\pageheight
+ \page
+ \fi
+ \fi
+ \box\groupbox
+ \prevdepth = \dimen1
+ \checkinserts
+}
+%
+% TeX puts in an \escapechar (i.e., `@') at the beginning of the help
+% message, so this ends up printing `@group can only ...'.
+%
+\newhelp\groupinvalidhelp{%
+group can only be used in environments such as @example,^^J%
+where each line of input produces a line of output.}
+
+% @need space-in-mils
+% forces a page break if there is not space-in-mils remaining.
+
+\newdimen\mil \mil=0.001in
+
+% Old definition--didn't work.
+%\parseargdef\need{\par %
+%% This method tries to make TeX break the page naturally
+%% if the depth of the box does not fit.
+%{\baselineskip=0pt%
+%\vtop to #1\mil{\vfil}\kern -#1\mil\nobreak
+%\prevdepth=-1000pt
+%}}
+
+\parseargdef\need{%
+ % Ensure vertical mode, so we don't make a big box in the middle of a
+ % paragraph.
+ \par
+ %
+ % If the @need value is less than one line space, it's useless.
+ \dimen0 = #1\mil
+ \dimen2 = \ht\strutbox
+ \advance\dimen2 by \dp\strutbox
+ \ifdim\dimen0 > \dimen2
+ %
+ % Do a \strut just to make the height of this box be normal, so the
+ % normal leading is inserted relative to the preceding line.
+ % And a page break here is fine.
+ \vtop to #1\mil{\strut\vfil}%
+ %
+ % TeX does not even consider page breaks if a penalty added to the
+ % main vertical list is 10000 or more. But in order to see if the
+ % empty box we just added fits on the page, we must make it consider
+ % page breaks. On the other hand, we don't want to actually break the
+ % page after the empty box. So we use a penalty of 9999.
+ %
+ % There is an extremely small chance that TeX will actually break the
+ % page at this \penalty, if there are no other feasible breakpoints in
+ % sight. (If the user is using lots of big @group commands, which
+ % almost-but-not-quite fill up a page, TeX will have a hard time doing
+ % good page breaking, for example.) However, I could not construct an
+ % example where a page broke at this \penalty; if it happens in a real
+ % document, then we can reconsider our strategy.
+ \penalty9999
+ %
+ % Back up by the size of the box, whether we did a page break or not.
+ \kern -#1\mil
+ %
+ % Do not allow a page break right after this kern.
+ \nobreak
+ \fi
+}
+
+% @br forces paragraph break (and is undocumented).
+
+\let\br = \par
+
+% @page forces the start of a new page.
+%
+\def\page{\par\vfill\supereject}
+
+% @exdent text....
+% outputs text on separate line in roman font, starting at standard page margin
+
+% This records the amount of indent in the innermost environment.
+% That's how much \exdent should take out.
+\newskip\exdentamount
+
+% This defn is used inside fill environments such as @defun.
+\parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break}
+
+% This defn is used inside nofill environments such as @example.
+\parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount
+ \leftline{\hskip\leftskip{\rm#1}}}}
+
+% @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
+% paragraph. For more general purposes, use the \margin insertion
+% class. WHICH is `l' or `r'.
+%
+\newskip\inmarginspacing \inmarginspacing=1cm
+\def\strutdepth{\dp\strutbox}
+%
+\def\doinmargin#1#2{\strut\vadjust{%
+ \nobreak
+ \kern-\strutdepth
+ \vtop to \strutdepth{%
+ \baselineskip=\strutdepth
+ \vss
+ % if you have multiple lines of stuff to put here, you'll need to
+ % make the vbox yourself of the appropriate size.
+ \ifx#1l%
+ \llap{\ignorespaces #2\hskip\inmarginspacing}%
+ \else
+ \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}%
+ \fi
+ \null
+ }%
+}}
+\def\inleftmargin{\doinmargin l}
+\def\inrightmargin{\doinmargin r}
+%
+% @inmargin{TEXT [, RIGHT-TEXT]}
+% (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right;
+% else use TEXT for both).
+%
+\def\inmargin#1{\parseinmargin #1,,\finish}
+\def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing.
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt
+ \def\lefttext{#1}% have both texts
+ \def\righttext{#2}%
+ \else
+ \def\lefttext{#1}% have only one text
+ \def\righttext{#1}%
+ \fi
+ %
+ \ifodd\pageno
+ \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin
+ \else
+ \def\temp{\inleftmargin\lefttext}%
+ \fi
+ \temp
+}
+
+% @include FILE -- \input text of FILE.
+%
+\def\include{\parseargusing\filenamecatcodes\includezzz}
+\def\includezzz#1{%
+ \pushthisfilestack
+ \def\thisfile{#1}%
+ {%
+ \makevalueexpandable % we want to expand any @value in FILE.
+ \turnoffactive % and allow special characters in the expansion
+ \indexnofonts % Allow `@@' and other weird things in file names.
+ \edef\temp{\noexpand\input #1 }%
+ %
+ % This trickery is to read FILE outside of a group, in case it makes
+ % definitions, etc.
+ \expandafter
+ }\temp
+ \popthisfilestack
+}
+\def\filenamecatcodes{%
+ \catcode`\\=\other
+ \catcode`~=\other
+ \catcode`^=\other
+ \catcode`_=\other
+ \catcode`|=\other
+ \catcode`<=\other
+ \catcode`>=\other
+ \catcode`+=\other
+ \catcode`-=\other
+ \catcode`\`=\other
+ \catcode`\'=\other
+}
+
+\def\pushthisfilestack{%
+ \expandafter\pushthisfilestackX\popthisfilestack\StackTerm
+}
+\def\pushthisfilestackX{%
+ \expandafter\pushthisfilestackY\thisfile\StackTerm
+}
+\def\pushthisfilestackY #1\StackTerm #2\StackTerm {%
+ \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}%
+}
+
+\def\popthisfilestack{\errthisfilestackempty}
+\def\errthisfilestackempty{\errmessage{Internal error:
+ the stack of filenames is empty.}}
+
+\def\thisfile{}
+
+% @center line
+% outputs that line, centered.
+%
+\parseargdef\center{%
+ \ifhmode
+ \let\next\centerH
+ \else
+ \let\next\centerV
+ \fi
+ \next{\hfil \ignorespaces#1\unskip \hfil}%
+}
+\def\centerH#1{%
+ {%
+ \hfil\break
+ \advance\hsize by -\leftskip
+ \advance\hsize by -\rightskip
+ \line{#1}%
+ \break
+ }%
+}
+\def\centerV#1{\line{\kern\leftskip #1\kern\rightskip}}
+
+% @sp n outputs n lines of vertical space
+
+\parseargdef\sp{\vskip #1\baselineskip}
+
+% @comment ...line which is ignored...
+% @c is the same as @comment
+% @ignore ... @end ignore is another way to write a comment
+
+\def\comment{\begingroup \catcode`\^^M=\other%
+\catcode`\@=\other \catcode`\{=\other \catcode`\}=\other%
+\commentxxx}
+{\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}}
+
+\let\c=\comment
+
+% @paragraphindent NCHARS
+% We'll use ems for NCHARS, close enough.
+% NCHARS can also be the word `asis' or `none'.
+% We cannot feasibly implement @paragraphindent asis, though.
+%
+\def\asisword{asis} % no translation, these are keywords
+\def\noneword{none}
+%
+\parseargdef\paragraphindent{%
+ \def\temp{#1}%
+ \ifx\temp\asisword
+ \else
+ \ifx\temp\noneword
+ \defaultparindent = 0pt
+ \else
+ \defaultparindent = #1em
+ \fi
+ \fi
+ \parindent = \defaultparindent
+}
+
+% @exampleindent NCHARS
+% We'll use ems for NCHARS like @paragraphindent.
+% It seems @exampleindent asis isn't necessary, but
+% I preserve it to make it similar to @paragraphindent.
+\parseargdef\exampleindent{%
+ \def\temp{#1}%
+ \ifx\temp\asisword
+ \else
+ \ifx\temp\noneword
+ \lispnarrowing = 0pt
+ \else
+ \lispnarrowing = #1em
+ \fi
+ \fi
+}
+
+% @firstparagraphindent WORD
+% If WORD is `none', then suppress indentation of the first paragraph
+% after a section heading. If WORD is `insert', then do indent at such
+% paragraphs.
+%
+% The paragraph indentation is suppressed or not by calling
+% \suppressfirstparagraphindent, which the sectioning commands do.
+% We switch the definition of this back and forth according to WORD.
+% By default, we suppress indentation.
+%
+\def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent}
+\def\insertword{insert}
+%
+\parseargdef\firstparagraphindent{%
+ \def\temp{#1}%
+ \ifx\temp\noneword
+ \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent
+ \else\ifx\temp\insertword
+ \let\suppressfirstparagraphindent = \relax
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @firstparagraphindent option `\temp'}%
+ \fi\fi
+}
+
+% Here is how we actually suppress indentation. Redefine \everypar to
+% \kern backwards by \parindent, and then reset itself to empty.
+%
+% We also make \indent itself not actually do anything until the next
+% paragraph.
+%
+\gdef\dosuppressfirstparagraphindent{%
+ \gdef\indent{%
+ \restorefirstparagraphindent
+ \indent
+ }%
+ \gdef\noindent{%
+ \restorefirstparagraphindent
+ \noindent
+ }%
+ \global\everypar = {%
+ \kern -\parindent
+ \restorefirstparagraphindent
+ }%
+}
+
+\gdef\restorefirstparagraphindent{%
+ \global \let \indent = \ptexindent
+ \global \let \noindent = \ptexnoindent
+ \global \everypar = {}%
+}
+
+
+% @asis just yields its argument. Used with @table, for example.
+%
+\def\asis#1{#1}
+
+% @math outputs its argument in math mode.
+%
+% One complication: _ usually means subscripts, but it could also mean
+% an actual _ character, as in @math{@var{some_variable} + 1}. So make
+% _ active, and distinguish by seeing if the current family is \slfam,
+% which is what @var uses.
+{
+ \catcode`\_ = \active
+ \gdef\mathunderscore{%
+ \catcode`\_=\active
+ \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
+ }
+}
+% Another complication: we want \\ (and @\) to output a \ character.
+% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
+% this is not advertised and we don't care. Texinfo does not
+% otherwise define @\.
+%
+% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
+\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
+%
+\def\math{%
+ \tex
+ \mathunderscore
+ \let\\ = \mathbackslash
+ \mathactive
+ % make the texinfo accent commands work in math mode
+ \let\"=\ddot
+ \let\'=\acute
+ \let\==\bar
+ \let\^=\hat
+ \let\`=\grave
+ \let\u=\breve
+ \let\v=\check
+ \let\~=\tilde
+ \let\dotaccent=\dot
+ $\finishmath
+}
+\def\finishmath#1{#1$\endgroup} % Close the group opened by \tex.
+
+% Some active characters (such as <) are spaced differently in math.
+% We have to reset their definitions in case the @math was an argument
+% to a command which sets the catcodes (such as @item or @section).
+%
+{
+ \catcode`^ = \active
+ \catcode`< = \active
+ \catcode`> = \active
+ \catcode`+ = \active
+ \catcode`' = \active
+ \gdef\mathactive{%
+ \let^ = \ptexhat
+ \let< = \ptexless
+ \let> = \ptexgtr
+ \let+ = \ptexplus
+ \let' = \ptexquoteright
+ }
+}
+
+% Some math mode symbols.
+\def\bullet{$\ptexbullet$}
+\def\geq{\ifmmode \ge\else $\ge$\fi}
+\def\leq{\ifmmode \le\else $\le$\fi}
+\def\minus{\ifmmode -\else $-$\fi}
+
+% @dots{} outputs an ellipsis using the current font.
+% We do .5em per period so that it has the same spacing in the cm
+% typewriter fonts as three actual period characters; on the other hand,
+% in other typewriter fonts three periods are wider than 1.5em. So do
+% whichever is larger.
+%
+\def\dots{%
+ \leavevmode
+ \setbox0=\hbox{...}% get width of three periods
+ \ifdim\wd0 > 1.5em
+ \dimen0 = \wd0
+ \else
+ \dimen0 = 1.5em
+ \fi
+ \hbox to \dimen0{%
+ \hskip 0pt plus.25fil
+ .\hskip 0pt plus1fil
+ .\hskip 0pt plus1fil
+ .\hskip 0pt plus.5fil
+ }%
+}
+
+% @enddots{} is an end-of-sentence ellipsis.
+%
+\def\enddots{%
+ \dots
+ \spacefactor=\endofsentencespacefactor
+}
+
+% @comma{} is so commas can be inserted into text without messing up
+% Texinfo's parsing.
+%
+\let\comma = ,
+
+% @refill is a no-op.
+\let\refill=\relax
+
+% If working on a large document in chapters, it is convenient to
+% be able to disable indexing, cross-referencing, and contents, for test runs.
+% This is done with @novalidate (before @setfilename).
+%
+\newif\iflinks \linkstrue % by default we want the aux files.
+\let\novalidate = \linksfalse
+
+% @setfilename is done at the beginning of every texinfo file.
+% So open here the files we need to have open while reading the input.
+% This makes it possible to make a .fmt file for texinfo.
+\def\setfilename{%
+ \fixbackslash % Turn off hack to swallow `\input texinfo'.
+ \iflinks
+ \tryauxfile
+ % Open the new aux file. TeX will close it automatically at exit.
+ \immediate\openout\auxfile=\jobname.aux
+ \fi % \openindices needs to do some work in any case.
+ \openindices
+ \let\setfilename=\comment % Ignore extra @setfilename cmds.
+ %
+ % If texinfo.cnf is present on the system, read it.
+ % Useful for site-wide @afourpaper, etc.
+ \openin 1 texinfo.cnf
+ \ifeof 1 \else \input texinfo.cnf \fi
+ \closein 1
+ %
+ \comment % Ignore the actual filename.
+}
+
+% Called from \setfilename.
+%
+\def\openindices{%
+ \newindex{cp}%
+ \newcodeindex{fn}%
+ \newcodeindex{vr}%
+ \newcodeindex{tp}%
+ \newcodeindex{ky}%
+ \newcodeindex{pg}%
+}
+
+% @bye.
+\outer\def\bye{\pagealignmacro\tracingstats=1\ptexend}
+
+
+\message{pdf,}
+% adobe `portable' document format
+\newcount\tempnum
+\newcount\lnkcount
+\newtoks\filename
+\newcount\filenamelength
+\newcount\pgn
+\newtoks\toksA
+\newtoks\toksB
+\newtoks\toksC
+\newtoks\toksD
+\newbox\boxA
+\newcount\countA
+\newif\ifpdf
+\newif\ifpdfmakepagedest
+
+% when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1
+% can be set). So we test for \relax and 0 as well as \undefined,
+% borrowed from ifpdf.sty.
+\ifx\pdfoutput\undefined
+\else
+ \ifx\pdfoutput\relax
+ \else
+ \ifcase\pdfoutput
+ \else
+ \pdftrue
+ \fi
+ \fi
+\fi
+
+% PDF uses PostScript string constants for the names of xref targets,
+% for display in the outlines, and in other places. Thus, we have to
+% double any backslashes. Otherwise, a name like "\node" will be
+% interpreted as a newline (\n), followed by o, d, e. Not good.
+% http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html
+% (and related messages, the final outcome is that it is up to the TeX
+% user to double the backslashes and otherwise make the string valid, so
+% that's what we do).
+
+% double active backslashes.
+%
+{\catcode`\@=0 \catcode`\\=\active
+ @gdef@activebackslashdouble{%
+ @catcode`@\=@active
+ @let\=@doublebackslash}
+}
+
+% To handle parens, we must adopt a different approach, since parens are
+% not active characters. hyperref.dtx (which has the same problem as
+% us) handles it with this amazing macro to replace tokens, with minor
+% changes for Texinfo. It is included here under the GPL by permission
+% from the author, Heiko Oberdiek.
+%
+% #1 is the tokens to replace.
+% #2 is the replacement.
+% #3 is the control sequence with the string.
+%
+\def\HyPsdSubst#1#2#3{%
+ \def\HyPsdReplace##1#1##2\END{%
+ ##1%
+ \ifx\\##2\\%
+ \else
+ #2%
+ \HyReturnAfterFi{%
+ \HyPsdReplace##2\END
+ }%
+ \fi
+ }%
+ \xdef#3{\expandafter\HyPsdReplace#3#1\END}%
+}
+\long\def\HyReturnAfterFi#1\fi{\fi#1}
+
+% #1 is a control sequence in which to do the replacements.
+\def\backslashparens#1{%
+ \xdef#1{#1}% redefine it as its expansion; the definition is simply
+ % \lastnode when called from \setref -> \pdfmkdest.
+ \HyPsdSubst{(}{\realbackslash(}{#1}%
+ \HyPsdSubst{)}{\realbackslash)}{#1}%
+}
+
+\newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images
+with PDF output, and none of those formats could be found. (.eps cannot
+be supported due to the design of the PDF format; use regular TeX (DVI
+output) for that.)}
+
+\ifpdf
+ %
+ % Color manipulation macros based on pdfcolor.tex.
+ \def\cmykDarkRed{0.28 1 1 0.35}
+ \def\cmykBlack{0 0 0 1}
+ %
+ % k sets the color for filling (usual text, etc.);
+ % K sets the color for stroking (thin rules, e.g., normal _'s).
+ \def\pdfsetcolor#1{\pdfliteral{#1 k #1 K}}
+ %
+ % Set color, and create a mark which defines \thiscolor accordingly,
+ % so that \makeheadline knows which color to restore.
+ \def\setcolor#1{%
+ \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}%
+ \domark
+ \pdfsetcolor{#1}%
+ }
+ %
+ \def\maincolor{\cmykBlack}
+ \pdfsetcolor{\maincolor}
+ \edef\thiscolor{\maincolor}
+ \def\lastcolordefs{}
+ %
+ \def\makefootline{%
+ \baselineskip24pt
+ \line{\pdfsetcolor{\maincolor}\the\footline}%
+ }
+ %
+ \def\makeheadline{%
+ \vbox to 0pt{%
+ \vskip-22.5pt
+ \line{%
+ \vbox to8.5pt{}%
+ % Extract \thiscolor definition from the marks.
+ \getcolormarks
+ % Typeset the headline with \maincolor, then restore the color.
+ \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}%
+ }%
+ \vss
+ }%
+ \nointerlineskip
+ }
+ %
+ %
+ \pdfcatalog{/PageMode /UseOutlines}
+ %
+ % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto).
+ \def\dopdfimage#1#2#3{%
+ \def\imagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}%
+ \def\imageheight{#3}\setbox2 = \hbox{\ignorespaces #3}%
+ %
+ % pdftex (and the PDF format) support .png, .jpg, .pdf (among
+ % others). Let's try in that order.
+ \let\pdfimgext=\empty
+ \begingroup
+ \openin 1 #1.png \ifeof 1
+ \openin 1 #1.jpg \ifeof 1
+ \openin 1 #1.jpeg \ifeof 1
+ \openin 1 #1.JPG \ifeof 1
+ \openin 1 #1.pdf \ifeof 1
+ \openin 1 #1.PDF \ifeof 1
+ \errhelp = \nopdfimagehelp
+ \errmessage{Could not find image file #1 for pdf}%
+ \else \gdef\pdfimgext{PDF}%
+ \fi
+ \else \gdef\pdfimgext{pdf}%
+ \fi
+ \else \gdef\pdfimgext{JPG}%
+ \fi
+ \else \gdef\pdfimgext{jpeg}%
+ \fi
+ \else \gdef\pdfimgext{jpg}%
+ \fi
+ \else \gdef\pdfimgext{png}%
+ \fi
+ \closein 1
+ \endgroup
+ %
+ % without \immediate, ancient pdftex seg faults when the same image is
+ % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.)
+ \ifnum\pdftexversion < 14
+ \immediate\pdfimage
+ \else
+ \immediate\pdfximage
+ \fi
+ \ifdim \wd0 >0pt width \imagewidth \fi
+ \ifdim \wd2 >0pt height \imageheight \fi
+ \ifnum\pdftexversion<13
+ #1.\pdfimgext
+ \else
+ {#1.\pdfimgext}%
+ \fi
+ \ifnum\pdftexversion < 14 \else
+ \pdfrefximage \pdflastximage
+ \fi}
+ %
+ \def\pdfmkdest#1{{%
+ % We have to set dummies so commands such as @code, and characters
+ % such as \, aren't expanded when present in a section title.
+ \indexnofonts
+ \turnoffactive
+ \activebackslashdouble
+ \makevalueexpandable
+ \def\pdfdestname{#1}%
+ \backslashparens\pdfdestname
+ \safewhatsit{\pdfdest name{\pdfdestname} xyz}%
+ }}
+ %
+ % used to mark target names; must be expandable.
+ \def\pdfmkpgn#1{#1}
+ %
+ % by default, use a color that is dark enough to print on paper as
+ % nearly black, but still distinguishable for online viewing.
+ \def\urlcolor{\cmykDarkRed}
+ \def\linkcolor{\cmykDarkRed}
+ \def\endlink{\setcolor{\maincolor}\pdfendlink}
+ %
+ % Adding outlines to PDF; macros for calculating structure of outlines
+ % come from Petr Olsak
+ \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0%
+ \else \csname#1\endcsname \fi}
+ \def\advancenumber#1{\tempnum=\expnumber{#1}\relax
+ \advance\tempnum by 1
+ \expandafter\xdef\csname#1\endcsname{\the\tempnum}}
+ %
+ % #1 is the section text, which is what will be displayed in the
+ % outline by the pdf viewer. #2 is the pdf expression for the number
+ % of subentries (or empty, for subsubsections). #3 is the node text,
+ % which might be empty if this toc entry had no corresponding node.
+ % #4 is the page number
+ %
+ \def\dopdfoutline#1#2#3#4{%
+ % Generate a link to the node text if that exists; else, use the
+ % page number. We could generate a destination for the section
+ % text in the case where a section has no node, but it doesn't
+ % seem worth the trouble, since most documents are normally structured.
+ \def\pdfoutlinedest{#3}%
+ \ifx\pdfoutlinedest\empty
+ \def\pdfoutlinedest{#4}%
+ \else
+ % Doubled backslashes in the name.
+ {\activebackslashdouble \xdef\pdfoutlinedest{#3}%
+ \backslashparens\pdfoutlinedest}%
+ \fi
+ %
+ % Also double the backslashes in the display string.
+ {\activebackslashdouble \xdef\pdfoutlinetext{#1}%
+ \backslashparens\pdfoutlinetext}%
+ %
+ \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}%
+ }
+ %
+ \def\pdfmakeoutlines{%
+ \begingroup
+ % Thanh's hack / proper braces in bookmarks
+ \edef\mylbrace{\iftrue \string{\else}\fi}\let\{=\mylbrace
+ \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
+ %
+ % Read toc silently, to get counts of subentries for \pdfoutline.
+ \def\numchapentry##1##2##3##4{%
+ \def\thischapnum{##2}%
+ \def\thissecnum{0}%
+ \def\thissubsecnum{0}%
+ }%
+ \def\numsecentry##1##2##3##4{%
+ \advancenumber{chap\thischapnum}%
+ \def\thissecnum{##2}%
+ \def\thissubsecnum{0}%
+ }%
+ \def\numsubsecentry##1##2##3##4{%
+ \advancenumber{sec\thissecnum}%
+ \def\thissubsecnum{##2}%
+ }%
+ \def\numsubsubsecentry##1##2##3##4{%
+ \advancenumber{subsec\thissubsecnum}%
+ }%
+ \def\thischapnum{0}%
+ \def\thissecnum{0}%
+ \def\thissubsecnum{0}%
+ %
+ % use \def rather than \let here because we redefine \chapentry et
+ % al. a second time, below.
+ \def\appentry{\numchapentry}%
+ \def\appsecentry{\numsecentry}%
+ \def\appsubsecentry{\numsubsecentry}%
+ \def\appsubsubsecentry{\numsubsubsecentry}%
+ \def\unnchapentry{\numchapentry}%
+ \def\unnsecentry{\numsecentry}%
+ \def\unnsubsecentry{\numsubsecentry}%
+ \def\unnsubsubsecentry{\numsubsubsecentry}%
+ \readdatafile{toc}%
+ %
+ % Read toc second time, this time actually producing the outlines.
+ % The `-' means take the \expnumber as the absolute number of
+ % subentries, which we calculated on our first read of the .toc above.
+ %
+ % We use the node names as the destinations.
+ \def\numchapentry##1##2##3##4{%
+ \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}%
+ \def\numsecentry##1##2##3##4{%
+ \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}%
+ \def\numsubsecentry##1##2##3##4{%
+ \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}%
+ \def\numsubsubsecentry##1##2##3##4{% count is always zero
+ \dopdfoutline{##1}{}{##3}{##4}}%
+ %
+ % PDF outlines are displayed using system fonts, instead of
+ % document fonts. Therefore we cannot use special characters,
+ % since the encoding is unknown. For example, the eogonek from
+ % Latin 2 (0xea) gets translated to a | character. Info from
+ % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100.
+ %
+ % xx to do this right, we have to translate 8-bit characters to
+ % their "best" equivalent, based on the @documentencoding. Right
+ % now, I guess we'll just let the pdf reader have its way.
+ \indexnofonts
+ \setupdatafile
+ \catcode`\\=\active \otherbackslash
+ \input \tocreadfilename
+ \endgroup
+ }
+ %
+ \def\skipspaces#1{\def\PP{#1}\def\D{|}%
+ \ifx\PP\D\let\nextsp\relax
+ \else\let\nextsp\skipspaces
+ \ifx\p\space\else\addtokens{\filename}{\PP}%
+ \advance\filenamelength by 1
+ \fi
+ \fi
+ \nextsp}
+ \def\getfilename#1{\filenamelength=0\expandafter\skipspaces#1|\relax}
+ \ifnum\pdftexversion < 14
+ \let \startlink \pdfannotlink
+ \else
+ \let \startlink \pdfstartlink
+ \fi
+ % make a live url in pdf output.
+ \def\pdfurl#1{%
+ \begingroup
+ % it seems we really need yet another set of dummies; have not
+ % tried to figure out what each command should do in the context
+ % of @url. for now, just make @/ a no-op, that's the only one
+ % people have actually reported a problem with.
+ %
+ \normalturnoffactive
+ \def\@{@}%
+ \let\/=\empty
+ \makevalueexpandable
+ % do we want to go so far as to use \indexnofonts instead of just
+ % special-casing \var here?
+ \def\var##1{##1}%
+ %
+ \leavevmode\setcolor{\urlcolor}%
+ \startlink attr{/Border [0 0 0]}%
+ user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
+ \endgroup}
+ \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}}
+ \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks}
+ \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks}
+ \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}}
+ \def\maketoks{%
+ \expandafter\poptoks\the\toksA|ENDTOKS|\relax
+ \ifx\first0\adn0
+ \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3
+ \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6
+ \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9
+ \else
+ \ifnum0=\countA\else\makelink\fi
+ \ifx\first.\let\next=\done\else
+ \let\next=\maketoks
+ \addtokens{\toksB}{\the\toksD}
+ \ifx\first,\addtokens{\toksB}{\space}\fi
+ \fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \next}
+ \def\makelink{\addtokens{\toksB}%
+ {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0}
+ \def\pdflink#1{%
+ \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}}
+ \setcolor{\linkcolor}#1\endlink}
+ \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
+\else
+ % non-pdf mode
+ \let\pdfmkdest = \gobble
+ \let\pdfurl = \gobble
+ \let\endlink = \relax
+ \let\setcolor = \gobble
+ \let\pdfsetcolor = \gobble
+ \let\pdfmakeoutlines = \relax
+\fi % \ifx\pdfoutput
+
+
+\message{fonts,}
+
+% Change the current font style to #1, remembering it in \curfontstyle.
+% For now, we do not accumulate font styles: @b{@i{foo}} prints foo in
+% italics, not bold italics.
+%
+\def\setfontstyle#1{%
+ \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd.
+ \csname ten#1\endcsname % change the current font
+}
+
+% Select #1 fonts with the current style.
+%
+\def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname}
+
+\def\rm{\fam=0 \setfontstyle{rm}}
+\def\it{\fam=\itfam \setfontstyle{it}}
+\def\sl{\fam=\slfam \setfontstyle{sl}}
+\def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
+\def\tt{\fam=\ttfam \setfontstyle{tt}}
+
+% Unfortunately, we have to override this for titles and the like, since
+% in those cases "rm" is bold. Sigh.
+\def\rmisbold{\rm\def\curfontstyle{bf}}
+
+% Texinfo sort of supports the sans serif font style, which plain TeX does not.
+% So we set up a \sf.
+\newfam\sffam
+\def\sf{\fam=\sffam \setfontstyle{sf}}
+\let\li = \sf % Sometimes we call it \li, not \sf.
+
+% We don't need math for this font style.
+\def\ttsl{\setfontstyle{ttsl}}
+
+
+% Default leading.
+\newdimen\textleading \textleading = 13.2pt
+
+% Set the baselineskip to #1, and the lineskip and strut size
+% correspondingly. There is no deep meaning behind these magic numbers
+% used as factors; they just match (closely enough) what Knuth defined.
+%
+\def\lineskipfactor{.08333}
+\def\strutheightpercent{.70833}
+\def\strutdepthpercent {.29167}
+%
+% can get a sort of poor man's double spacing by redefining this.
+\def\baselinefactor{1}
+%
+\def\setleading#1{%
+ \dimen0 = #1\relax
+ \normalbaselineskip = \baselinefactor\dimen0
+ \normallineskip = \lineskipfactor\normalbaselineskip
+ \normalbaselines
+ \setbox\strutbox =\hbox{%
+ \vrule width0pt height\strutheightpercent\baselineskip
+ depth \strutdepthpercent \baselineskip
+ }%
+}
+
+% PDF CMaps. See also LaTeX's t1.cmap.
+%
+% do nothing with this by default.
+\expandafter\let\csname cmapOT1\endcsname\gobble
+\expandafter\let\csname cmapOT1IT\endcsname\gobble
+\expandafter\let\csname cmapOT1TT\endcsname\gobble
+
+% if we are producing pdf, and we have \pdffontattr, then define cmaps.
+% (\pdffontattr was introduced many years ago, but people still run
+% older pdftex's; it's easy to conditionalize, so we do.)
+\ifpdf \ifx\pdffontattr\undefined \else
+ \begingroup
+ \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
+ \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-OT1-0)
+%%Title: (TeX-OT1-0 TeX OT1 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (OT1)
+/Supplement 0
+>> def
+/CMapName /TeX-OT1-0 def
+/CMapType 2 def
+1 begincodespacerange
+<00> <7F>
+endcodespacerange
+8 beginbfrange
+<00> <01> <0393>
+<09> <0A> <03A8>
+<23> <26> <0023>
+<28> <3B> <0028>
+<3F> <5B> <003F>
+<5D> <5E> <005D>
+<61> <7A> <0061>
+<7B> <7C> <2013>
+endbfrange
+40 beginbfchar
+<02> <0398>
+<03> <039B>
+<04> <039E>
+<05> <03A0>
+<06> <03A3>
+<07> <03D2>
+<08> <03A6>
+<0B> <00660066>
+<0C> <00660069>
+<0D> <0066006C>
+<0E> <006600660069>
+<0F> <00660066006C>
+<10> <0131>
+<11> <0237>
+<12> <0060>
+<13> <00B4>
+<14> <02C7>
+<15> <02D8>
+<16> <00AF>
+<17> <02DA>
+<18> <00B8>
+<19> <00DF>
+<1A> <00E6>
+<1B> <0153>
+<1C> <00F8>
+<1D> <00C6>
+<1E> <0152>
+<1F> <00D8>
+<21> <0021>
+<22> <201D>
+<27> <2019>
+<3C> <00A1>
+<3D> <003D>
+<3E> <00BF>
+<5C> <201C>
+<5F> <02D9>
+<60> <2018>
+<7D> <02DD>
+<7E> <007E>
+<7F> <00A8>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+ }\endgroup
+ \expandafter\edef\csname cmapOT1\endcsname#1{%
+ \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
+ }%
+%
+% \cmapOT1IT
+ \begingroup
+ \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
+ \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-OT1IT-0)
+%%Title: (TeX-OT1IT-0 TeX OT1IT 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (OT1IT)
+/Supplement 0
+>> def
+/CMapName /TeX-OT1IT-0 def
+/CMapType 2 def
+1 begincodespacerange
+<00> <7F>
+endcodespacerange
+8 beginbfrange
+<00> <01> <0393>
+<09> <0A> <03A8>
+<25> <26> <0025>
+<28> <3B> <0028>
+<3F> <5B> <003F>
+<5D> <5E> <005D>
+<61> <7A> <0061>
+<7B> <7C> <2013>
+endbfrange
+42 beginbfchar
+<02> <0398>
+<03> <039B>
+<04> <039E>
+<05> <03A0>
+<06> <03A3>
+<07> <03D2>
+<08> <03A6>
+<0B> <00660066>
+<0C> <00660069>
+<0D> <0066006C>
+<0E> <006600660069>
+<0F> <00660066006C>
+<10> <0131>
+<11> <0237>
+<12> <0060>
+<13> <00B4>
+<14> <02C7>
+<15> <02D8>
+<16> <00AF>
+<17> <02DA>
+<18> <00B8>
+<19> <00DF>
+<1A> <00E6>
+<1B> <0153>
+<1C> <00F8>
+<1D> <00C6>
+<1E> <0152>
+<1F> <00D8>
+<21> <0021>
+<22> <201D>
+<23> <0023>
+<24> <00A3>
+<27> <2019>
+<3C> <00A1>
+<3D> <003D>
+<3E> <00BF>
+<5C> <201C>
+<5F> <02D9>
+<60> <2018>
+<7D> <02DD>
+<7E> <007E>
+<7F> <00A8>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+ }\endgroup
+ \expandafter\edef\csname cmapOT1IT\endcsname#1{%
+ \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
+ }%
+%
+% \cmapOT1TT
+ \begingroup
+ \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char.
+ \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap
+%%DocumentNeededResources: ProcSet (CIDInit)
+%%IncludeResource: ProcSet (CIDInit)
+%%BeginResource: CMap (TeX-OT1TT-0)
+%%Title: (TeX-OT1TT-0 TeX OT1TT 0)
+%%Version: 1.000
+%%EndComments
+/CIDInit /ProcSet findresource begin
+12 dict begin
+begincmap
+/CIDSystemInfo
+<< /Registry (TeX)
+/Ordering (OT1TT)
+/Supplement 0
+>> def
+/CMapName /TeX-OT1TT-0 def
+/CMapType 2 def
+1 begincodespacerange
+<00> <7F>
+endcodespacerange
+5 beginbfrange
+<00> <01> <0393>
+<09> <0A> <03A8>
+<21> <26> <0021>
+<28> <5F> <0028>
+<61> <7E> <0061>
+endbfrange
+32 beginbfchar
+<02> <0398>
+<03> <039B>
+<04> <039E>
+<05> <03A0>
+<06> <03A3>
+<07> <03D2>
+<08> <03A6>
+<0B> <2191>
+<0C> <2193>
+<0D> <0027>
+<0E> <00A1>
+<0F> <00BF>
+<10> <0131>
+<11> <0237>
+<12> <0060>
+<13> <00B4>
+<14> <02C7>
+<15> <02D8>
+<16> <00AF>
+<17> <02DA>
+<18> <00B8>
+<19> <00DF>
+<1A> <00E6>
+<1B> <0153>
+<1C> <00F8>
+<1D> <00C6>
+<1E> <0152>
+<1F> <00D8>
+<20> <2423>
+<27> <2019>
+<60> <2018>
+<7F> <00A8>
+endbfchar
+endcmap
+CMapName currentdict /CMap defineresource pop
+end
+end
+%%EndResource
+%%EOF
+ }\endgroup
+ \expandafter\edef\csname cmapOT1TT\endcsname#1{%
+ \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}%
+ }%
+\fi\fi
+
+
+% Set the font macro #1 to the font named #2, adding on the
+% specified font prefix (normally `cm').
+% #3 is the font's design size, #4 is a scale factor, #5 is the CMap
+% encoding (currently only OT1, OT1IT and OT1TT are allowed, pass
+% empty to omit).
+\def\setfont#1#2#3#4#5{%
+ \font#1=\fontprefix#2#3 scaled #4
+ \csname cmap#5\endcsname#1%
+}
+% This is what gets called when #5 of \setfont is empty.
+\let\cmap\gobble
+% emacs-page end of cmaps
+
+% Use cm as the default font prefix.
+% To specify the font prefix, you must define \fontprefix
+% before you read in texinfo.tex.
+\ifx\fontprefix\undefined
+\def\fontprefix{cm}
+\fi
+% Support font families that don't use the same naming scheme as CM.
+\def\rmshape{r}
+\def\rmbshape{bx} %where the normal face is bold
+\def\bfshape{b}
+\def\bxshape{bx}
+\def\ttshape{tt}
+\def\ttbshape{tt}
+\def\ttslshape{sltt}
+\def\itshape{ti}
+\def\itbshape{bxti}
+\def\slshape{sl}
+\def\slbshape{bxsl}
+\def\sfshape{ss}
+\def\sfbshape{ss}
+\def\scshape{csc}
+\def\scbshape{csc}
+
+% Definitions for a main text size of 11pt. This is the default in
+% Texinfo.
+%
+\def\definetextfontsizexi{%
+% Text fonts (11.2pt, magstep1).
+\def\textnominalsize{11pt}
+\edef\mainmagstep{\magstephalf}
+\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
+\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
+\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
+\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
+\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
+\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
+\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
+\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
+\font\texti=cmmi10 scaled \mainmagstep
+\font\textsy=cmsy10 scaled \mainmagstep
+\def\textecsize{1095}
+
+% A few fonts for @defun names and args.
+\setfont\defbf\bfshape{10}{\magstep1}{OT1}
+\setfont\deftt\ttshape{10}{\magstep1}{OT1TT}
+\setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT}
+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
+
+% Fonts for indices, footnotes, small examples (9pt).
+\def\smallnominalsize{9pt}
+\setfont\smallrm\rmshape{9}{1000}{OT1}
+\setfont\smalltt\ttshape{9}{1000}{OT1TT}
+\setfont\smallbf\bfshape{10}{900}{OT1}
+\setfont\smallit\itshape{9}{1000}{OT1IT}
+\setfont\smallsl\slshape{9}{1000}{OT1}
+\setfont\smallsf\sfshape{9}{1000}{OT1}
+\setfont\smallsc\scshape{10}{900}{OT1}
+\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
+\font\smalli=cmmi9
+\font\smallsy=cmsy9
+\def\smallecsize{0900}
+
+% Fonts for small examples (8pt).
+\def\smallernominalsize{8pt}
+\setfont\smallerrm\rmshape{8}{1000}{OT1}
+\setfont\smallertt\ttshape{8}{1000}{OT1TT}
+\setfont\smallerbf\bfshape{10}{800}{OT1}
+\setfont\smallerit\itshape{8}{1000}{OT1IT}
+\setfont\smallersl\slshape{8}{1000}{OT1}
+\setfont\smallersf\sfshape{8}{1000}{OT1}
+\setfont\smallersc\scshape{10}{800}{OT1}
+\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
+\font\smalleri=cmmi8
+\font\smallersy=cmsy8
+\def\smallerecsize{0800}
+
+% Fonts for title page (20.4pt):
+\def\titlenominalsize{20pt}
+\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
+\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
+\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
+\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
+\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
+\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
+\let\titlebf=\titlerm
+\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
+\font\titlei=cmmi12 scaled \magstep3
+\font\titlesy=cmsy10 scaled \magstep4
+\def\titleecsize{2074}
+
+% Chapter (and unnumbered) fonts (17.28pt).
+\def\chapnominalsize{17pt}
+\setfont\chaprm\rmbshape{12}{\magstep2}{OT1}
+\setfont\chapit\itbshape{10}{\magstep3}{OT1IT}
+\setfont\chapsl\slbshape{10}{\magstep3}{OT1}
+\setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT}
+\setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT}
+\setfont\chapsf\sfbshape{17}{1000}{OT1}
+\let\chapbf=\chaprm
+\setfont\chapsc\scbshape{10}{\magstep3}{OT1}
+\font\chapi=cmmi12 scaled \magstep2
+\font\chapsy=cmsy10 scaled \magstep3
+\def\chapecsize{1728}
+
+% Section fonts (14.4pt).
+\def\secnominalsize{14pt}
+\setfont\secrm\rmbshape{12}{\magstep1}{OT1}
+\setfont\secit\itbshape{10}{\magstep2}{OT1IT}
+\setfont\secsl\slbshape{10}{\magstep2}{OT1}
+\setfont\sectt\ttbshape{12}{\magstep1}{OT1TT}
+\setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT}
+\setfont\secsf\sfbshape{12}{\magstep1}{OT1}
+\let\secbf\secrm
+\setfont\secsc\scbshape{10}{\magstep2}{OT1}
+\font\seci=cmmi12 scaled \magstep1
+\font\secsy=cmsy10 scaled \magstep2
+\def\sececsize{1440}
+
+% Subsection fonts (13.15pt).
+\def\ssecnominalsize{13pt}
+\setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1}
+\setfont\ssecit\itbshape{10}{1315}{OT1IT}
+\setfont\ssecsl\slbshape{10}{1315}{OT1}
+\setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT}
+\setfont\ssecttsl\ttslshape{10}{1315}{OT1TT}
+\setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1}
+\let\ssecbf\ssecrm
+\setfont\ssecsc\scbshape{10}{1315}{OT1}
+\font\sseci=cmmi12 scaled \magstephalf
+\font\ssecsy=cmsy10 scaled 1315
+\def\ssececsize{1200}
+
+% Reduced fonts for @acro in text (10pt).
+\def\reducednominalsize{10pt}
+\setfont\reducedrm\rmshape{10}{1000}{OT1}
+\setfont\reducedtt\ttshape{10}{1000}{OT1TT}
+\setfont\reducedbf\bfshape{10}{1000}{OT1}
+\setfont\reducedit\itshape{10}{1000}{OT1IT}
+\setfont\reducedsl\slshape{10}{1000}{OT1}
+\setfont\reducedsf\sfshape{10}{1000}{OT1}
+\setfont\reducedsc\scshape{10}{1000}{OT1}
+\setfont\reducedttsl\ttslshape{10}{1000}{OT1TT}
+\font\reducedi=cmmi10
+\font\reducedsy=cmsy10
+\def\reducedecsize{1000}
+
+% reset the current fonts
+\textfonts
+\rm
+} % end of 11pt text font size definitions
+
+
+% Definitions to make the main text be 10pt Computer Modern, with
+% section, chapter, etc., sizes following suit. This is for the GNU
+% Press printing of the Emacs 22 manual. Maybe other manuals in the
+% future. Used with @smallbook, which sets the leading to 12pt.
+%
+\def\definetextfontsizex{%
+% Text fonts (10pt).
+\def\textnominalsize{10pt}
+\edef\mainmagstep{1000}
+\setfont\textrm\rmshape{10}{\mainmagstep}{OT1}
+\setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT}
+\setfont\textbf\bfshape{10}{\mainmagstep}{OT1}
+\setfont\textit\itshape{10}{\mainmagstep}{OT1IT}
+\setfont\textsl\slshape{10}{\mainmagstep}{OT1}
+\setfont\textsf\sfshape{10}{\mainmagstep}{OT1}
+\setfont\textsc\scshape{10}{\mainmagstep}{OT1}
+\setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT}
+\font\texti=cmmi10 scaled \mainmagstep
+\font\textsy=cmsy10 scaled \mainmagstep
+\def\textecsize{1000}
+
+% A few fonts for @defun names and args.
+\setfont\defbf\bfshape{10}{\magstephalf}{OT1}
+\setfont\deftt\ttshape{10}{\magstephalf}{OT1TT}
+\setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT}
+\def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf}
+
+% Fonts for indices, footnotes, small examples (9pt).
+\def\smallnominalsize{9pt}
+\setfont\smallrm\rmshape{9}{1000}{OT1}
+\setfont\smalltt\ttshape{9}{1000}{OT1TT}
+\setfont\smallbf\bfshape{10}{900}{OT1}
+\setfont\smallit\itshape{9}{1000}{OT1IT}
+\setfont\smallsl\slshape{9}{1000}{OT1}
+\setfont\smallsf\sfshape{9}{1000}{OT1}
+\setfont\smallsc\scshape{10}{900}{OT1}
+\setfont\smallttsl\ttslshape{10}{900}{OT1TT}
+\font\smalli=cmmi9
+\font\smallsy=cmsy9
+\def\smallecsize{0900}
+
+% Fonts for small examples (8pt).
+\def\smallernominalsize{8pt}
+\setfont\smallerrm\rmshape{8}{1000}{OT1}
+\setfont\smallertt\ttshape{8}{1000}{OT1TT}
+\setfont\smallerbf\bfshape{10}{800}{OT1}
+\setfont\smallerit\itshape{8}{1000}{OT1IT}
+\setfont\smallersl\slshape{8}{1000}{OT1}
+\setfont\smallersf\sfshape{8}{1000}{OT1}
+\setfont\smallersc\scshape{10}{800}{OT1}
+\setfont\smallerttsl\ttslshape{10}{800}{OT1TT}
+\font\smalleri=cmmi8
+\font\smallersy=cmsy8
+\def\smallerecsize{0800}
+
+% Fonts for title page (20.4pt):
+\def\titlenominalsize{20pt}
+\setfont\titlerm\rmbshape{12}{\magstep3}{OT1}
+\setfont\titleit\itbshape{10}{\magstep4}{OT1IT}
+\setfont\titlesl\slbshape{10}{\magstep4}{OT1}
+\setfont\titlett\ttbshape{12}{\magstep3}{OT1TT}
+\setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT}
+\setfont\titlesf\sfbshape{17}{\magstep1}{OT1}
+\let\titlebf=\titlerm
+\setfont\titlesc\scbshape{10}{\magstep4}{OT1}
+\font\titlei=cmmi12 scaled \magstep3
+\font\titlesy=cmsy10 scaled \magstep4
+\def\titleecsize{2074}
+
+% Chapter fonts (14.4pt).
+\def\chapnominalsize{14pt}
+\setfont\chaprm\rmbshape{12}{\magstep1}{OT1}
+\setfont\chapit\itbshape{10}{\magstep2}{OT1IT}
+\setfont\chapsl\slbshape{10}{\magstep2}{OT1}
+\setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT}
+\setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT}
+\setfont\chapsf\sfbshape{12}{\magstep1}{OT1}
+\let\chapbf\chaprm
+\setfont\chapsc\scbshape{10}{\magstep2}{OT1}
+\font\chapi=cmmi12 scaled \magstep1
+\font\chapsy=cmsy10 scaled \magstep2
+\def\chapecsize{1440}
+
+% Section fonts (12pt).
+\def\secnominalsize{12pt}
+\setfont\secrm\rmbshape{12}{1000}{OT1}
+\setfont\secit\itbshape{10}{\magstep1}{OT1IT}
+\setfont\secsl\slbshape{10}{\magstep1}{OT1}
+\setfont\sectt\ttbshape{12}{1000}{OT1TT}
+\setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT}
+\setfont\secsf\sfbshape{12}{1000}{OT1}
+\let\secbf\secrm
+\setfont\secsc\scbshape{10}{\magstep1}{OT1}
+\font\seci=cmmi12
+\font\secsy=cmsy10 scaled \magstep1
+\def\sececsize{1200}
+
+% Subsection fonts (10pt).
+\def\ssecnominalsize{10pt}
+\setfont\ssecrm\rmbshape{10}{1000}{OT1}
+\setfont\ssecit\itbshape{10}{1000}{OT1IT}
+\setfont\ssecsl\slbshape{10}{1000}{OT1}
+\setfont\ssectt\ttbshape{10}{1000}{OT1TT}
+\setfont\ssecttsl\ttslshape{10}{1000}{OT1TT}
+\setfont\ssecsf\sfbshape{10}{1000}{OT1}
+\let\ssecbf\ssecrm
+\setfont\ssecsc\scbshape{10}{1000}{OT1}
+\font\sseci=cmmi10
+\font\ssecsy=cmsy10
+\def\ssececsize{1000}
+
+% Reduced fonts for @acro in text (9pt).
+\def\reducednominalsize{9pt}
+\setfont\reducedrm\rmshape{9}{1000}{OT1}
+\setfont\reducedtt\ttshape{9}{1000}{OT1TT}
+\setfont\reducedbf\bfshape{10}{900}{OT1}
+\setfont\reducedit\itshape{9}{1000}{OT1IT}
+\setfont\reducedsl\slshape{9}{1000}{OT1}
+\setfont\reducedsf\sfshape{9}{1000}{OT1}
+\setfont\reducedsc\scshape{10}{900}{OT1}
+\setfont\reducedttsl\ttslshape{10}{900}{OT1TT}
+\font\reducedi=cmmi9
+\font\reducedsy=cmsy9
+\def\reducedecsize{0900}
+
+% reduce space between paragraphs
+\divide\parskip by 2
+
+% reset the current fonts
+\textfonts
+\rm
+} % end of 10pt text font size definitions
+
+
+% We provide the user-level command
+% @fonttextsize 10
+% (or 11) to redefine the text font size. pt is assumed.
+%
+\def\xword{10}
+\def\xiword{11}
+%
+\parseargdef\fonttextsize{%
+ \def\textsizearg{#1}%
+ \wlog{doing @fonttextsize \textsizearg}%
+ %
+ % Set \globaldefs so that documents can use this inside @tex, since
+ % makeinfo 4.8 does not support it, but we need it nonetheless.
+ %
+ \begingroup \globaldefs=1
+ \ifx\textsizearg\xword \definetextfontsizex
+ \else \ifx\textsizearg\xiword \definetextfontsizexi
+ \else
+ \errhelp=\EMsimple
+ \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'}
+ \fi\fi
+ \endgroup
+}
+
+
+% In order for the font changes to affect most math symbols and letters,
+% we have to define the \textfont of the standard families. Since
+% texinfo doesn't allow for producing subscripts and superscripts except
+% in the main text, we don't bother to reset \scriptfont and
+% \scriptscriptfont (which would also require loading a lot more fonts).
+%
+\def\resetmathfonts{%
+ \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy
+ \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf
+ \textfont\ttfam=\tentt \textfont\sffam=\tensf
+}
+
+% The font-changing commands redefine the meanings of \tenSTYLE, instead
+% of just \STYLE. We do this because \STYLE needs to also set the
+% current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire
+% \tenSTYLE to set the current font.
+%
+% Each font-changing command also sets the names \lsize (one size lower)
+% and \lllsize (three sizes lower). These relative commands are used in
+% the LaTeX logo and acronyms.
+%
+% This all needs generalizing, badly.
+%
+\def\textfonts{%
+ \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl
+ \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc
+ \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy
+ \let\tenttsl=\textttsl
+ \def\curfontsize{text}%
+ \def\lsize{reduced}\def\lllsize{smaller}%
+ \resetmathfonts \setleading{\textleading}}
+\def\titlefonts{%
+ \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl
+ \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc
+ \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy
+ \let\tenttsl=\titlettsl
+ \def\curfontsize{title}%
+ \def\lsize{chap}\def\lllsize{subsec}%
+ \resetmathfonts \setleading{25pt}}
+\def\titlefont#1{{\titlefonts\rmisbold #1}}
+\def\chapfonts{%
+ \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
+ \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
+ \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy
+ \let\tenttsl=\chapttsl
+ \def\curfontsize{chap}%
+ \def\lsize{sec}\def\lllsize{text}%
+ \resetmathfonts \setleading{19pt}}
+\def\secfonts{%
+ \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl
+ \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc
+ \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy
+ \let\tenttsl=\secttsl
+ \def\curfontsize{sec}%
+ \def\lsize{subsec}\def\lllsize{reduced}%
+ \resetmathfonts \setleading{16pt}}
+\def\subsecfonts{%
+ \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl
+ \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc
+ \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy
+ \let\tenttsl=\ssecttsl
+ \def\curfontsize{ssec}%
+ \def\lsize{text}\def\lllsize{small}%
+ \resetmathfonts \setleading{15pt}}
+\let\subsubsecfonts = \subsecfonts
+\def\reducedfonts{%
+ \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl
+ \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc
+ \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy
+ \let\tenttsl=\reducedttsl
+ \def\curfontsize{reduced}%
+ \def\lsize{small}\def\lllsize{smaller}%
+ \resetmathfonts \setleading{10.5pt}}
+\def\smallfonts{%
+ \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl
+ \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc
+ \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy
+ \let\tenttsl=\smallttsl
+ \def\curfontsize{small}%
+ \def\lsize{smaller}\def\lllsize{smaller}%
+ \resetmathfonts \setleading{10.5pt}}
+\def\smallerfonts{%
+ \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl
+ \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc
+ \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy
+ \let\tenttsl=\smallerttsl
+ \def\curfontsize{smaller}%
+ \def\lsize{smaller}\def\lllsize{smaller}%
+ \resetmathfonts \setleading{9.5pt}}
+
+% Fonts for short table of contents.
+\setfont\shortcontrm\rmshape{12}{1000}{OT1}
+\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12
+\setfont\shortcontsl\slshape{12}{1000}{OT1}
+\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
+
+% Define these just so they can be easily changed for other fonts.
+\def\angleleft{$\langle$}
+\def\angleright{$\rangle$}
+
+% Set the fonts to use with the @small... environments.
+\let\smallexamplefonts = \smallfonts
+
+% About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample
+% can fit this many characters:
+% 8.5x11=86 smallbook=72 a4=90 a5=69
+% If we use \scriptfonts (8pt), then we can fit this many characters:
+% 8.5x11=90+ smallbook=80 a4=90+ a5=77
+% For me, subjectively, the few extra characters that fit aren't worth
+% the additional smallness of 8pt. So I'm making the default 9pt.
+%
+% By the way, for comparison, here's what fits with @example (10pt):
+% 8.5x11=71 smallbook=60 a4=75 a5=58
+% --karl, 24jan03.
+
+% Set up the default fonts, so we can use them for creating boxes.
+%
+\definetextfontsizexi
+
+
+\message{markup,}
+
+% Check if we are currently using a typewriter font. Since all the
+% Computer Modern typewriter fonts have zero interword stretch (and
+% shrink), and it is reasonable to expect all typewriter fonts to have
+% this property, we can check that font parameter.
+%
+\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+
+% Markup style infrastructure. \defmarkupstylesetup\INITMACRO will
+% define and register \INITMACRO to be called on markup style changes.
+% \INITMACRO can check \currentmarkupstyle for the innermost
+% style and the set of \ifmarkupSTYLE switches for all styles
+% currently in effect.
+\newif\ifmarkupvar
+\newif\ifmarkupsamp
+\newif\ifmarkupkey
+%\newif\ifmarkupfile % @file == @samp.
+%\newif\ifmarkupoption % @option == @samp.
+\newif\ifmarkupcode
+\newif\ifmarkupkbd
+%\newif\ifmarkupenv % @env == @code.
+%\newif\ifmarkupcommand % @command == @code.
+\newif\ifmarkuptex % @tex (and part of @math, for now).
+\newif\ifmarkupexample
+\newif\ifmarkupverb
+\newif\ifmarkupverbatim
+
+\let\currentmarkupstyle\empty
+
+\def\setupmarkupstyle#1{%
+ \csname markup#1true\endcsname
+ \def\currentmarkupstyle{#1}%
+ \markupstylesetup
+}
+
+\let\markupstylesetup\empty
+
+\def\defmarkupstylesetup#1{%
+ \expandafter\def\expandafter\markupstylesetup
+ \expandafter{\markupstylesetup #1}%
+ \def#1%
+}
+
+% Markup style setup for left and right quotes.
+\defmarkupstylesetup\markupsetuplq{%
+ \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname
+ \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
+}
+
+\defmarkupstylesetup\markupsetuprq{%
+ \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname
+ \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
+}
+
+{
+\catcode`\'=\active
+\catcode`\`=\active
+
+\gdef\markupsetuplqdefault{\let`\lq}
+\gdef\markupsetuprqdefault{\let'\rq}
+
+\gdef\markupsetcodequoteleft{\let`\codequoteleft}
+\gdef\markupsetcodequoteright{\let'\codequoteright}
+
+\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
+}
+
+\let\markupsetuplqcode \markupsetcodequoteleft
+\let\markupsetuprqcode \markupsetcodequoteright
+\let\markupsetuplqexample \markupsetcodequoteleft
+\let\markupsetuprqexample \markupsetcodequoteright
+\let\markupsetuplqverb \markupsetcodequoteleft
+\let\markupsetuprqverb \markupsetcodequoteright
+\let\markupsetuplqverbatim \markupsetcodequoteleft
+\let\markupsetuprqverbatim \markupsetcodequoteright
+
+\let\markupsetuplqsamp \markupsetnoligaturesquoteleft
+\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
+
+% Allow an option to not replace quotes with a regular directed right
+% quote/apostrophe (char 0x27), but instead use the undirected quote
+% from cmtt (char 0x0d). The undirected quote is ugly, so don't make it
+% the default, but it works for pasting with more pdf viewers (at least
+% evince), the lilypond developers report. xpdf does work with the
+% regular 0x27.
+%
+\def\codequoteright{%
+ \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
+ \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
+ '%
+ \else \char'15 \fi
+ \else \char'15 \fi
+}
+%
+% and a similar option for the left quote char vs. a grave accent.
+% Modern fonts display ASCII 0x60 as a grave accent, so some people like
+% the code environments to do likewise.
+%
+\def\codequoteleft{%
+ \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
+ \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
+ % [Knuth] pp. 380,381,391
+ % \relax disables Spanish ligatures ?` and !` of \tt font.
+ \relax`%
+ \else \char'22 \fi
+ \else \char'22 \fi
+}
+
+% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
+\def\noligaturesquoteleft{\relax\lq}
+
+% Count depth in font-changes, for error checks
+\newcount\fontdepth \fontdepth=0
+
+%% Add scribe-like font environments, plus @l for inline lisp (usually sans
+%% serif) and @ii for TeX italic
+
+% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
+% unless the following character is such as not to need one.
+\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
+ \ptexslash\fi\fi\fi}
+\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
+\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
+
+% like \smartslanted except unconditionally uses \ttsl.
+% @var is set to this for defun arguments.
+\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
+
+% @cite is like \smartslanted except unconditionally use \sl. We never want
+% ttsl for book titles, do we?
+\def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
+
+\let\i=\smartitalic
+\let\slanted=\smartslanted
+\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}}
+\let\dfn=\smartslanted
+\let\emph=\smartitalic
+
+% Explicit font changes: @r, @sc, undocumented @ii.
+\def\r#1{{\rm #1}} % roman font
+\def\sc#1{{\smallcaps#1}} % smallcaps font
+\def\ii#1{{\it #1}} % italic font
+
+% @b, explicit bold. Also @strong.
+\def\b#1{{\bf #1}}
+\let\strong=\b
+
+% @sansserif, explicit sans.
+\def\sansserif#1{{\sf #1}}
+
+% We can't just use \exhyphenpenalty, because that only has effect at
+% the end of a paragraph. Restore normal hyphenation at the end of the
+% group within which \nohyphenation is presumably called.
+%
+\def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation}
+\def\restorehyphenation{\hyphenchar\font = `- }
+
+% Set sfcode to normal for the chars that usually have another value.
+% Can't use plain's \frenchspacing because it uses the `\x notation, and
+% sometimes \x has an active definition that messes things up.
+%
+\catcode`@=11
+ \def\plainfrenchspacing{%
+ \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m
+ \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m
+ \def\endofsentencespacefactor{1000}% for @. and friends
+ }
+ \def\plainnonfrenchspacing{%
+ \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000
+ \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250
+ \def\endofsentencespacefactor{3000}% for @. and friends
+ }
+\catcode`@=\other
+\def\endofsentencespacefactor{3000}% default
+
+% @t, explicit typewriter.
+\def\t#1{%
+ {\tt \rawbackslash \plainfrenchspacing #1}%
+ \null
+}
+
+% @samp.
+\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
+
+% definition of @key that produces a lozenge. Doesn't adjust to text size.
+%\setfont\keyrm\rmshape{8}{1000}{OT1}
+%\font\keysy=cmsy9
+%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+% \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+% \vbox{\hrule\kern-0.4pt
+% \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+% \kern-0.4pt\hrule}%
+% \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+
+% definition of @key with no lozenge. If the current font is already
+% monospace, don't change it; that way, we respect @kbdinputstyle. But
+% if it isn't monospace, then use \tt.
+%
+\def\key#1{{\setupmarkupstyle{key}%
+ \nohyphenation
+ \ifmonospace\else\tt\fi
+ #1}\null}
+
+% ctrl is no longer a Texinfo command.
+\def\ctrl #1{{\tt \rawbackslash \hat}#1}
+
+% @file, @option are the same as @samp.
+\let\file=\samp
+\let\option=\samp
+
+% @code is a modification of @t,
+% which makes spaces the same size as normal in the surrounding text.
+\def\tclose#1{%
+ {%
+ % Change normal interword space to be same as for the current font.
+ \spaceskip = \fontdimen2\font
+ %
+ % Switch to typewriter.
+ \tt
+ %
+ % But `\ ' produces the large typewriter interword space.
+ \def\ {{\spaceskip = 0pt{} }}%
+ %
+ % Turn off hyphenation.
+ \nohyphenation
+ %
+ \rawbackslash
+ \plainfrenchspacing
+ #1%
+ }%
+ \null
+}
+
+% We *must* turn on hyphenation at `-' and `_' in @code.
+% Otherwise, it is too hard to avoid overfull hboxes
+% in the Emacs manual, the Library manual, etc.
+
+% Unfortunately, TeX uses one parameter (\hyphenchar) to control
+% both hyphenation at - and hyphenation within words.
+% We must therefore turn them both off (\tclose does that)
+% and arrange explicitly to hyphenate at a dash.
+% -- rms.
+{
+ \catcode`\-=\active \catcode`\_=\active
+ \catcode`\'=\active \catcode`\`=\active
+ \global\let'=\rq \global\let`=\lq % default definitions
+ %
+ \global\def\code{\begingroup
+ \setupmarkupstyle{code}%
+ % The following should really be moved into \setupmarkupstyle handlers.
+ \catcode\dashChar=\active \catcode\underChar=\active
+ \ifallowcodebreaks
+ \let-\codedash
+ \let_\codeunder
+ \else
+ \let-\realdash
+ \let_\realunder
+ \fi
+ \codex
+ }
+}
+
+\def\realdash{-}
+\def\codedash{-\discretionary{}{}{}}
+\def\codeunder{%
+ % this is all so @math{@code{var_name}+1} can work. In math mode, _
+ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.)
+ % will therefore expand the active definition of _, which is us
+ % (inside @code that is), therefore an endless loop.
+ \ifusingtt{\ifmmode
+ \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_.
+ \else\normalunderscore \fi
+ \discretionary{}{}{}}%
+ {\_}%
+}
+\def\codex #1{\tclose{#1}\endgroup}
+
+% An additional complication: the above will allow breaks after, e.g.,
+% each of the four underscores in __typeof__. This is undesirable in
+% some manuals, especially if they don't have long identifiers in
+% general. @allowcodebreaks provides a way to control this.
+%
+\newif\ifallowcodebreaks \allowcodebreakstrue
+
+\def\keywordtrue{true}
+\def\keywordfalse{false}
+
+\parseargdef\allowcodebreaks{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\keywordtrue
+ \allowcodebreakstrue
+ \else\ifx\txiarg\keywordfalse
+ \allowcodebreaksfalse
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @allowcodebreaks option `\txiarg'}%
+ \fi\fi
+}
+
+% @kbd is like @code, except that if the argument is just one @key command,
+% then @kbd has no effect.
+\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
+
+% @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
+% `example' (@kbd uses ttsl only inside of @example and friends),
+% or `code' (@kbd uses normal tty font always).
+\parseargdef\kbdinputstyle{%
+ \def\txiarg{#1}%
+ \ifx\txiarg\worddistinct
+ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}%
+ \else\ifx\txiarg\wordexample
+ \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}%
+ \else\ifx\txiarg\wordcode
+ \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}%
+ \else
+ \errhelp = \EMsimple
+ \errmessage{Unknown @kbdinputstyle option `\txiarg'}%
+ \fi\fi\fi
+}
+\def\worddistinct{distinct}
+\def\wordexample{example}
+\def\wordcode{code}
+
+% Default is `distinct'.
+\kbdinputstyle distinct
+
+\def\xkey{\key}
+\def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
+\ifx\one\xkey\ifx\threex\three \key{#2}%
+\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
+
+% For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
+\let\indicateurl=\code
+\let\env=\code
+\let\command=\code
+
+% @clicksequence{File @click{} Open ...}
+\def\clicksequence#1{\begingroup #1\endgroup}
+
+% @clickstyle @arrow (by default)
+\parseargdef\clickstyle{\def\click{#1}}
+\def\click{\arrow}
+
+% @uref (abbreviation for `urlref') takes an optional (comma-separated)
+% second argument specifying the text to display and an optional third
+% arg as text to display instead of (rather than in addition to) the url
+% itself. First (mandatory) arg is the url. Perhaps eventually put in
+% a hypertex \special here.
+%
+\def\uref#1{\douref #1,,,\finish}
+\def\douref#1,#2,#3,#4\finish{\begingroup
+ \unsepspaces
+ \pdfurl{#1}%
+ \setbox0 = \hbox{\ignorespaces #3}%
+ \ifdim\wd0 > 0pt
+ \unhbox0 % third arg given, show only that
+ \else
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0 > 0pt
+ \ifpdf
+ \unhbox0 % PDF: 2nd arg given, show only it
+ \else
+ \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url
+ \fi
+ \else
+ \code{#1}% only url given, so show it
+ \fi
+ \fi
+ \endlink
+\endgroup}
+
+% @url synonym for @uref, since that's how everyone uses it.
+%
+\let\url=\uref
+
+% rms does not like angle brackets --karl, 17may97.
+% So now @email is just like @uref, unless we are pdf.
+%
+%\def\email#1{\angleleft{\tt #1}\angleright}
+\ifpdf
+ \def\email#1{\doemail#1,,\finish}
+ \def\doemail#1,#2,#3\finish{\begingroup
+ \unsepspaces
+ \pdfurl{mailto:#1}%
+ \setbox0 = \hbox{\ignorespaces #2}%
+ \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi
+ \endlink
+ \endgroup}
+\else
+ \let\email=\uref
+\fi
+
+% Typeset a dimension, e.g., `in' or `pt'. The only reason for the
+% argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
+%
+\def\dmn#1{\thinspace #1}
+
+% @l was never documented to mean ``switch to the Lisp font'',
+% and it is not used as such in any manual I can find. We need it for
+% Polish suppressed-l. --karl, 22sep96.
+%\def\l#1{{\li #1}\null}
+
+% @acronym for "FBI", "NATO", and the like.
+% We print this one point size smaller, since it's intended for
+% all-uppercase.
+%
+\def\acronym#1{\doacronym #1,,\finish}
+\def\doacronym#1,#2,#3\finish{%
+ {\selectfonts\lsize #1}%
+ \def\temp{#2}%
+ \ifx\temp\empty \else
+ \space ({\unsepspaces \ignorespaces \temp \unskip})%
+ \fi
+}
+
+% @abbr for "Comput. J." and the like.
+% No font change, but don't do end-of-sentence spacing.
+%
+\def\abbr#1{\doabbr #1,,\finish}
+\def\doabbr#1,#2,#3\finish{%
+ {\plainfrenchspacing #1}%
+ \def\temp{#2}%
+ \ifx\temp\empty \else
+ \space ({\unsepspaces \ignorespaces \temp \unskip})%
+ \fi
+}
+
+
+\message{glyphs,}
+
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+%
+% Since these characters are used in examples, they should be an even number of
+% \tt widths. Each \tt character is 1en, so two makes it 1em.
+%
+\def\point{$\star$}
+\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
+\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
+\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
+\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
+\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
+
+% The @error{} command.
+% Adapted from the TeXbook's \boxit.
+%
+\newbox\errorbox
+%
+{\tentt \global\dimen0 = 3em}% Width of the box.
+\dimen2 = .55pt % Thickness of rules
+% The text. (`r' is open on the right, `e' somewhat less so on the left.)
+\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
+%
+\setbox\errorbox=\hbox to \dimen0{\hfil
+ \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
+ \advance\hsize by -2\dimen2 % Rules.
+ \vbox{%
+ \hrule height\dimen2
+ \hbox{\vrule width\dimen2 \kern3pt % Space to left of text.
+ \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
+ \kern3pt\vrule width\dimen2}% Space to right.
+ \hrule height\dimen2}
+ \hfil}
+%
+\def\error{\leavevmode\lower.7ex\copy\errorbox}
+
+% @pounds{} is a sterling sign, which Knuth put in the CM italic font.
+%
+\def\pounds{{\it\$}}
+
+% @euro{} comes from a separate font, depending on the current style.
+% We use the free feym* fonts from the eurosym package by Henrik
+% Theiling, which support regular, slanted, bold and bold slanted (and
+% "outlined" (blackboard board, sort of) versions, which we don't need).
+% It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
+%
+% Although only regular is the truly official Euro symbol, we ignore
+% that. The Euro is designed to be slightly taller than the regular
+% font height.
+%
+% feymr - regular
+% feymo - slanted
+% feybr - bold
+% feybo - bold slanted
+%
+% There is no good (free) typewriter version, to my knowledge.
+% A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
+% Hmm.
+%
+% Also doesn't work in math. Do we need to do math with euro symbols?
+% Hope not.
+%
+%
+\def\euro{{\eurofont e}}
+\def\eurofont{%
+ % We set the font at each command, rather than predefining it in
+ % \textfonts and the other font-switching commands, so that
+ % installations which never need the symbol don't have to have the
+ % font installed.
+ %
+ % There is only one designed size (nominal 10pt), so we always scale
+ % that to the current nominal size.
+ %
+ % By the way, simply using "at 1em" works for cmr10 and the like, but
+ % does not work for cmbx10 and other extended/shrunken fonts.
+ %
+ \def\eurosize{\csname\curfontsize nominalsize\endcsname}%
+ %
+ \ifx\curfontstyle\bfstylename
+ % bold:
+ \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
+ \else
+ % regular:
+ \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
+ \fi
+ \thiseurofont
+}
+
+% Hacks for glyphs from the EC fonts similar to \euro. We don't
+% use \let for the aliases, because sometimes we redefine the original
+% macro, and the alias should reflect the redefinition.
+\def\guillemetleft{{\ecfont \char"13}}
+\def\guillemotleft{\guillemetleft}
+\def\guillemetright{{\ecfont \char"14}}
+\def\guillemotright{\guillemetright}
+\def\guilsinglleft{{\ecfont \char"0E}}
+\def\guilsinglright{{\ecfont \char"0F}}
+\def\quotedblbase{{\ecfont \char"12}}
+\def\quotesinglbase{{\ecfont \char"0D}}
+%
+% This positioning is not perfect (see the ogonek LaTeX package), but
+% we have the precomposed glyphs for the most common cases. We put the
+% tests to use those glyphs in the single \ogonek macro so we have fewer
+% dummy definitions to worry about for index entries, etc.
+%
+% ogonek is also used with other letters in Lithuanian (IOU), but using
+% the precomposed glyphs for those is not so easy since they aren't in
+% the same EC font.
+\def\ogonek#1{{%
+ \def\temp{#1}%
+ \ifx\temp\macrocharA\Aogonek
+ \else\ifx\temp\macrochara\aogonek
+ \else\ifx\temp\macrocharE\Eogonek
+ \else\ifx\temp\macrochare\eogonek
+ \else
+ \ecfont \setbox0=\hbox{#1}%
+ \ifdim\ht0=1ex\accent"0C #1%
+ \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}%
+ \fi
+ \fi\fi\fi\fi
+ }%
+}
+\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A}
+\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a}
+\def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
+\def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
+%
+\def\ecfont{%
+ % We can't distinguish serif/sans and italic/slanted, but this
+ % is used for crude hacks anyway (like adding French and German
+ % quotes to documents typeset with CM, where we lose kerning), so
+ % hopefully nobody will notice/care.
+ \edef\ecsize{\csname\curfontsize ecsize\endcsname}%
+ \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}%
+ \ifx\curfontstyle\bfstylename
+ % bold:
+ \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize
+ \else
+ % regular:
+ \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize
+ \fi
+ \thisecfont
+}
+
+% @registeredsymbol - R in a circle. The font for the R should really
+% be smaller yet, but lllsize is the best we can do for now.
+% Adapted from the plain.tex definition of \copyright.
+%
+\def\registeredsymbol{%
+ $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}%
+ \hfil\crcr\Orb}}%
+ }$%
+}
+
+% @textdegree - the normal degrees sign.
+%
+\def\textdegree{$^\circ$}
+
+% Laurent Siebenmann reports \Orb undefined with:
+% Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38
+% so we'll define it if necessary.
+%
+\ifx\Orb\undefined
+\def\Orb{\mathhexbox20D}
+\fi
+
+% Quotes.
+\chardef\quotedblleft="5C
+\chardef\quotedblright=`\"
+\chardef\quoteleft=`\`
+\chardef\quoteright=`\'
+
+
+\message{page headings,}
+
+\newskip\titlepagetopglue \titlepagetopglue = 1.5in
+\newskip\titlepagebottomglue \titlepagebottomglue = 2pc
+
+% First the title page. Must do @settitle before @titlepage.
+\newif\ifseenauthor
+\newif\iffinishedtitlepage
+
+% Do an implicit @contents or @shortcontents after @end titlepage if the
+% user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage.
+%
+\newif\ifsetcontentsaftertitlepage
+ \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue
+\newif\ifsetshortcontentsaftertitlepage
+ \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue
+
+\parseargdef\shorttitlepage{\begingroup\hbox{}\vskip 1.5in \chaprm \centerline{#1}%
+ \endgroup\page\hbox{}\page}
+
+\envdef\titlepage{%
+ % Open one extra group, as we want to close it in the middle of \Etitlepage.
+ \begingroup
+ \parindent=0pt \textfonts
+ % Leave some space at the very top of the page.
+ \vglue\titlepagetopglue
+ % No rule at page bottom unless we print one at the top with @title.
+ \finishedtitlepagetrue
+ %
+ % Most title ``pages'' are actually two pages long, with space
+ % at the top of the second. We don't want the ragged left on the second.
+ \let\oldpage = \page
+ \def\page{%
+ \iffinishedtitlepage\else
+ \finishtitlepage
+ \fi
+ \let\page = \oldpage
+ \page
+ \null
+ }%
+}
+
+\def\Etitlepage{%
+ \iffinishedtitlepage\else
+ \finishtitlepage
+ \fi
+ % It is important to do the page break before ending the group,
+ % because the headline and footline are only empty inside the group.
+ % If we use the new definition of \page, we always get a blank page
+ % after the title page, which we certainly don't want.
+ \oldpage
+ \endgroup
+ %
+ % Need this before the \...aftertitlepage checks so that if they are
+ % in effect the toc pages will come out with page numbers.
+ \HEADINGSon
+ %
+ % If they want short, they certainly want long too.
+ \ifsetshortcontentsaftertitlepage
+ \shortcontents
+ \contents
+ \global\let\shortcontents = \relax
+ \global\let\contents = \relax
+ \fi
+ %
+ \ifsetcontentsaftertitlepage
+ \contents
+ \global\let\contents = \relax
+ \global\let\shortcontents = \relax
+ \fi
+}
+
+\def\finishtitlepage{%
+ \vskip4pt \hrule height 2pt width \hsize
+ \vskip\titlepagebottomglue
+ \finishedtitlepagetrue
+}
+
+%%% Macros to be used within @titlepage:
+
+\let\subtitlerm=\tenrm
+\def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
+
+\parseargdef\title{%
+ \checkenv\titlepage
+ \leftline{\titlefonts\rmisbold #1}
+ % print a rule at the page bottom also.
+ \finishedtitlepagefalse
+ \vskip4pt \hrule height 4pt width \hsize \vskip4pt
+}
+
+\parseargdef\subtitle{%
+ \checkenv\titlepage
+ {\subtitlefont \rightline{#1}}%
+}
+
+% @author should come last, but may come many times.
+% It can also be used inside @quotation.
+%
+\parseargdef\author{%
+ \def\temp{\quotation}%
+ \ifx\thisenv\temp
+ \def\quotationauthor{#1}% printed in \Equotation.
+ \else
+ \checkenv\titlepage
+ \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
+ {\secfonts\rmisbold \leftline{#1}}%
+ \fi
+}
+
+
+%%% Set up page headings and footings.
+
+\let\thispage=\folio
+
+\newtoks\evenheadline % headline on even pages
+\newtoks\oddheadline % headline on odd pages
+\newtoks\evenfootline % footline on even pages
+\newtoks\oddfootline % footline on odd pages
+
+% Now make TeX use those variables
+\headline={{\textfonts\rm \ifodd\pageno \the\oddheadline
+ \else \the\evenheadline \fi}}
+\footline={{\textfonts\rm \ifodd\pageno \the\oddfootline
+ \else \the\evenfootline \fi}\HEADINGShook}
+\let\HEADINGShook=\relax
+
+% Commands to set those variables.
+% For example, this is what @headings on does
+% @evenheading @thistitle|@thispage|@thischapter
+% @oddheading @thischapter|@thispage|@thistitle
+% @evenfooting @thisfile||
+% @oddfooting ||@thisfile
+
+
+\def\evenheading{\parsearg\evenheadingxxx}
+\def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish}
+\def\evenheadingyyy #1\|#2\|#3\|#4\finish{%
+\global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\def\oddheading{\parsearg\oddheadingxxx}
+\def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish}
+\def\oddheadingyyy #1\|#2\|#3\|#4\finish{%
+\global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}%
+
+\def\evenfooting{\parsearg\evenfootingxxx}
+\def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish}
+\def\evenfootingyyy #1\|#2\|#3\|#4\finish{%
+\global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}}
+
+\def\oddfooting{\parsearg\oddfootingxxx}
+\def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish}
+\def\oddfootingyyy #1\|#2\|#3\|#4\finish{%
+ \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}%
+ %
+ % Leave some space for the footline. Hopefully ok to assume
+ % @evenfooting will not be used by itself.
+ \global\advance\pageheight by -12pt
+ \global\advance\vsize by -12pt
+}
+
+\parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}}
+
+% @evenheadingmarks top \thischapter <- chapter at the top of a page
+% @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page
+%
+% The same set of arguments for:
+%
+% @oddheadingmarks
+% @evenfootingmarks
+% @oddfootingmarks
+% @everyheadingmarks
+% @everyfootingmarks
+
+\def\evenheadingmarks{\headingmarks{even}{heading}}
+\def\oddheadingmarks{\headingmarks{odd}{heading}}
+\def\evenfootingmarks{\headingmarks{even}{footing}}
+\def\oddfootingmarks{\headingmarks{odd}{footing}}
+\def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1}
+ \headingmarks{odd}{heading}{#1} }
+\def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1}
+ \headingmarks{odd}{footing}{#1} }
+% #1 = even/odd, #2 = heading/footing, #3 = top/bottom.
+\def\headingmarks#1#2#3 {%
+ \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname
+ \global\expandafter\let\csname get#1#2marks\endcsname \temp
+}
+
+\everyheadingmarks bottom
+\everyfootingmarks bottom
+
+% @headings double turns headings on for double-sided printing.
+% @headings single turns headings on for single-sided printing.
+% @headings off turns them off.
+% @headings on same as @headings double, retained for compatibility.
+% @headings after turns on double-sided headings after this page.
+% @headings doubleafter turns on double-sided headings after this page.
+% @headings singleafter turns on single-sided headings after this page.
+% By default, they are off at the start of a document,
+% and turned `on' after @end titlepage.
+
+\def\headings #1 {\csname HEADINGS#1\endcsname}
+
+\def\HEADINGSoff{%
+\global\evenheadline={\hfil} \global\evenfootline={\hfil}
+\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
+\HEADINGSoff
+% When we turn headings on, set the page number to 1.
+% For double-sided printing, put current file name in lower left corner,
+% chapter name on inside top of right hand pages, document
+% title on inside top of left hand pages, and page numbers on outside top
+% edge of all pages.
+\def\HEADINGSdouble{%
+\global\pageno=1
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\folio\hfil\thistitle}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chapoddpage
+}
+\let\contentsalignmacro = \chappager
+
+% For single-sided printing, chapter title goes across top left of page,
+% page number on top right.
+\def\HEADINGSsingle{%
+\global\pageno=1
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chappager
+}
+\def\HEADINGSon{\HEADINGSdouble}
+
+\def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex}
+\let\HEADINGSdoubleafter=\HEADINGSafter
+\def\HEADINGSdoublex{%
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\folio\hfil\thistitle}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chapoddpage
+}
+
+\def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex}
+\def\HEADINGSsinglex{%
+\global\evenfootline={\hfil}
+\global\oddfootline={\hfil}
+\global\evenheadline={\line{\thischapter\hfil\folio}}
+\global\oddheadline={\line{\thischapter\hfil\folio}}
+\global\let\contentsalignmacro = \chappager
+}
+
+% Subroutines used in generating headings
+% This produces Day Month Year style of output.
+% Only define if not already defined, in case a txi-??.tex file has set
+% up a different format (e.g., txi-cs.tex does this).
+\ifx\today\undefined
+\def\today{%
+ \number\day\space
+ \ifcase\month
+ \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr
+ \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug
+ \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec
+ \fi
+ \space\number\year}
+\fi
+
+% @settitle line... specifies the title of the document, for headings.
+% It generates no output of its own.
+\def\thistitle{\putwordNoTitle}
+\def\settitle{\parsearg{\gdef\thistitle}}
+
+
+\message{tables,}
+% Tables -- @table, @ftable, @vtable, @item(x).
+
+% default indentation of table text
+\newdimen\tableindent \tableindent=.8in
+% default indentation of @itemize and @enumerate text
+\newdimen\itemindent \itemindent=.3in
+% margin between end of table item and start of table text.
+\newdimen\itemmargin \itemmargin=.1in
+
+% used internally for \itemindent minus \itemmargin
+\newdimen\itemmax
+
+% Note @table, @ftable, and @vtable define @item, @itemx, etc., with
+% these defs.
+% They also define \itemindex
+% to index the item name in whatever manner is desired (perhaps none).
+
+\newif\ifitemxneedsnegativevskip
+
+\def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi}
+
+\def\internalBitem{\smallbreak \parsearg\itemzzz}
+\def\internalBitemx{\itemxpar \parsearg\itemzzz}
+
+\def\itemzzz #1{\begingroup %
+ \advance\hsize by -\rightskip
+ \advance\hsize by -\tableindent
+ \setbox0=\hbox{\itemindicate{#1}}%
+ \itemindex{#1}%
+ \nobreak % This prevents a break before @itemx.
+ %
+ % If the item text does not fit in the space we have, put it on a line
+ % by itself, and do not allow a page break either before or after that
+ % line. We do not start a paragraph here because then if the next
+ % command is, e.g., @kindex, the whatsit would get put into the
+ % horizontal list on a line by itself, resulting in extra blank space.
+ \ifdim \wd0>\itemmax
+ %
+ % Make this a paragraph so we get the \parskip glue and wrapping,
+ % but leave it ragged-right.
+ \begingroup
+ \advance\leftskip by-\tableindent
+ \advance\hsize by\tableindent
+ \advance\rightskip by0pt plus1fil
+ \leavevmode\unhbox0\par
+ \endgroup
+ %
+ % We're going to be starting a paragraph, but we don't want the
+ % \parskip glue -- logically it's part of the @item we just started.
+ \nobreak \vskip-\parskip
+ %
+ % Stop a page break at the \parskip glue coming up. However, if
+ % what follows is an environment such as @example, there will be no
+ % \parskip glue; then the negative vskip we just inserted would
+ % cause the example and the item to crash together. So we use this
+ % bizarre value of 10001 as a signal to \aboveenvbreak to insert
+ % \parskip glue after all. Section titles are handled this way also.
+ %
+ \penalty 10001
+ \endgroup
+ \itemxneedsnegativevskipfalse
+ \else
+ % The item text fits into the space. Start a paragraph, so that the
+ % following text (if any) will end up on the same line.
+ \noindent
+ % Do this with kerns and \unhbox so that if there is a footnote in
+ % the item text, it can migrate to the main vertical list and
+ % eventually be printed.
+ \nobreak\kern-\tableindent
+ \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0
+ \unhbox0
+ \nobreak\kern\dimen0
+ \endgroup
+ \itemxneedsnegativevskiptrue
+ \fi
+}
+
+\def\item{\errmessage{@item while not in a list environment}}
+\def\itemx{\errmessage{@itemx while not in a list environment}}
+
+% @table, @ftable, @vtable.
+\envdef\table{%
+ \let\itemindex\gobble
+ \tablecheck{table}%
+}
+\envdef\ftable{%
+ \def\itemindex ##1{\doind {fn}{\code{##1}}}%
+ \tablecheck{ftable}%
+}
+\envdef\vtable{%
+ \def\itemindex ##1{\doind {vr}{\code{##1}}}%
+ \tablecheck{vtable}%
+}
+\def\tablecheck#1{%
+ \ifnum \the\catcode`\^^M=\active
+ \endgroup
+ \errmessage{This command won't work in this context; perhaps the problem is
+ that we are \inenvironment\thisenv}%
+ \def\next{\doignore{#1}}%
+ \else
+ \let\next\tablex
+ \fi
+ \next
+}
+\def\tablex#1{%
+ \def\itemindicate{#1}%
+ \parsearg\tabley
+}
+\def\tabley#1{%
+ {%
+ \makevalueexpandable
+ \edef\temp{\noexpand\tablez #1\space\space\space}%
+ \expandafter
+ }\temp \endtablez
+}
+\def\tablez #1 #2 #3 #4\endtablez{%
+ \aboveenvbreak
+ \ifnum 0#1>0 \advance \leftskip by #1\mil \fi
+ \ifnum 0#2>0 \tableindent=#2\mil \fi
+ \ifnum 0#3>0 \advance \rightskip by #3\mil \fi
+ \itemmax=\tableindent
+ \advance \itemmax by -\itemmargin
+ \advance \leftskip by \tableindent
+ \exdentamount=\tableindent
+ \parindent = 0pt
+ \parskip = \smallskipamount
+ \ifdim \parskip=0pt \parskip=2pt \fi
+ \let\item = \internalBitem
+ \let\itemx = \internalBitemx
+}
+\def\Etable{\endgraf\afterenvbreak}
+\let\Eftable\Etable
+\let\Evtable\Etable
+\let\Eitemize\Etable
+\let\Eenumerate\Etable
+
+% This is the counter used by @enumerate, which is really @itemize
+
+\newcount \itemno
+
+\envdef\itemize{\parsearg\doitemize}
+
+\def\doitemize#1{%
+ \aboveenvbreak
+ \itemmax=\itemindent
+ \advance\itemmax by -\itemmargin
+ \advance\leftskip by \itemindent
+ \exdentamount=\itemindent
+ \parindent=0pt
+ \parskip=\smallskipamount
+ \ifdim\parskip=0pt \parskip=2pt \fi
+ %
+ % Try typesetting the item mark that if the document erroneously says
+ % something like @itemize @samp (intending @table), there's an error
+ % right away at the @itemize. It's not the best error message in the
+ % world, but it's better than leaving it to the @item. This means if
+ % the user wants an empty mark, they have to say @w{} not just @w.
+ \def\itemcontents{#1}%
+ \setbox0 = \hbox{\itemcontents}%
+ %
+ % @itemize with no arg is equivalent to @itemize @bullet.
+ \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
+ %
+ \let\item=\itemizeitem
+}
+
+% Definition of @item while inside @itemize and @enumerate.
+%
+\def\itemizeitem{%
+ \advance\itemno by 1 % for enumerations
+ {\let\par=\endgraf \smallbreak}% reasonable place to break
+ {%
+ % If the document has an @itemize directly after a section title, a
+ % \nobreak will be last on the list, and \sectionheading will have
+ % done a \vskip-\parskip. In that case, we don't want to zero
+ % parskip, or the item text will crash with the heading. On the
+ % other hand, when there is normal text preceding the item (as there
+ % usually is), we do want to zero parskip, or there would be too much
+ % space. In that case, we won't have a \nobreak before. At least
+ % that's the theory.
+ \ifnum\lastpenalty<10000 \parskip=0in \fi
+ \noindent
+ \hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
+ %
+ \vadjust{\penalty 1200}}% not good to break after first line of item.
+ \flushcr
+}
+
+% \splitoff TOKENS\endmark defines \first to be the first token in
+% TOKENS, and \rest to be the remainder.
+%
+\def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}%
+
+% Allow an optional argument of an uppercase letter, lowercase letter,
+% or number, to specify the first label in the enumerated list. No
+% argument is the same as `1'.
+%
+\envparseargdef\enumerate{\enumeratey #1 \endenumeratey}
+\def\enumeratey #1 #2\endenumeratey{%
+ % If we were given no argument, pretend we were given `1'.
+ \def\thearg{#1}%
+ \ifx\thearg\empty \def\thearg{1}\fi
+ %
+ % Detect if the argument is a single token. If so, it might be a
+ % letter. Otherwise, the only valid thing it can be is a number.
+ % (We will always have one token, because of the test we just made.
+ % This is a good thing, since \splitoff doesn't work given nothing at
+ % all -- the first parameter is undelimited.)
+ \expandafter\splitoff\thearg\endmark
+ \ifx\rest\empty
+ % Only one token in the argument. It could still be anything.
+ % A ``lowercase letter'' is one whose \lccode is nonzero.
+ % An ``uppercase letter'' is one whose \lccode is both nonzero, and
+ % not equal to itself.
+ % Otherwise, we assume it's a number.
+ %
+ % We need the \relax at the end of the \ifnum lines to stop TeX from
+ % continuing to look for a <number>.
+ %
+ \ifnum\lccode\expandafter`\thearg=0\relax
+ \numericenumerate % a number (we hope)
+ \else
+ % It's a letter.
+ \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax
+ \lowercaseenumerate % lowercase letter
+ \else
+ \uppercaseenumerate % uppercase letter
+ \fi
+ \fi
+ \else
+ % Multiple tokens in the argument. We hope it's a number.
+ \numericenumerate
+ \fi
+}
+
+% An @enumerate whose labels are integers. The starting integer is
+% given in \thearg.
+%
+\def\numericenumerate{%
+ \itemno = \thearg
+ \startenumeration{\the\itemno}%
+}
+
+% The starting (lowercase) letter is in \thearg.
+\def\lowercaseenumerate{%
+ \itemno = \expandafter`\thearg
+ \startenumeration{%
+ % Be sure we're not beyond the end of the alphabet.
+ \ifnum\itemno=0
+ \errmessage{No more lowercase letters in @enumerate; get a bigger
+ alphabet}%
+ \fi
+ \char\lccode\itemno
+ }%
+}
+
+% The starting (uppercase) letter is in \thearg.
+\def\uppercaseenumerate{%
+ \itemno = \expandafter`\thearg
+ \startenumeration{%
+ % Be sure we're not beyond the end of the alphabet.
+ \ifnum\itemno=0
+ \errmessage{No more uppercase letters in @enumerate; get a bigger
+ alphabet}
+ \fi
+ \char\uccode\itemno
+ }%
+}
+
+% Call \doitemize, adding a period to the first argument and supplying the
+% common last two arguments. Also subtract one from the initial value in
+% \itemno, since @item increments \itemno.
+%
+\def\startenumeration#1{%
+ \advance\itemno by -1
+ \doitemize{#1.}\flushcr
+}
+
+% @alphaenumerate and @capsenumerate are abbreviations for giving an arg
+% to @enumerate.
+%
+\def\alphaenumerate{\enumerate{a}}
+\def\capsenumerate{\enumerate{A}}
+\def\Ealphaenumerate{\Eenumerate}
+\def\Ecapsenumerate{\Eenumerate}
+
+
+% @multitable macros
+% Amy Hendrickson, 8/18/94, 3/6/96
+%
+% @multitable ... @end multitable will make as many columns as desired.
+% Contents of each column will wrap at width given in preamble. Width
+% can be specified either with sample text given in a template line,
+% or in percent of \hsize, the current width of text on page.
+
+% Table can continue over pages but will only break between lines.
+
+% To make preamble:
+%
+% Either define widths of columns in terms of percent of \hsize:
+% @multitable @columnfractions .25 .3 .45
+% @item ...
+%
+% Numbers following @columnfractions are the percent of the total
+% current hsize to be used for each column. You may use as many
+% columns as desired.
+
+
+% Or use a template:
+% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
+% @item ...
+% using the widest term desired in each column.
+
+% Each new table line starts with @item, each subsequent new column
+% starts with @tab. Empty columns may be produced by supplying @tab's
+% with nothing between them for as many times as empty columns are needed,
+% ie, @tab@tab@tab will produce two empty columns.
+
+% @item, @tab do not need to be on their own lines, but it will not hurt
+% if they are.
+
+% Sample multitable:
+
+% @multitable {Column 1 template} {Column 2 template} {Column 3 template}
+% @item first col stuff @tab second col stuff @tab third col
+% @item
+% first col stuff
+% @tab
+% second col stuff
+% @tab
+% third col
+% @item first col stuff @tab second col stuff
+% @tab Many paragraphs of text may be used in any column.
+%
+% They will wrap at the width determined by the template.
+% @item@tab@tab This will be in third column.
+% @end multitable
+
+% Default dimensions may be reset by user.
+% @multitableparskip is vertical space between paragraphs in table.
+% @multitableparindent is paragraph indent in table.
+% @multitablecolmargin is horizontal space to be left between columns.
+% @multitablelinespace is space to leave between table items, baseline
+% to baseline.
+% 0pt means it depends on current normal line spacing.
+%
+\newskip\multitableparskip
+\newskip\multitableparindent
+\newdimen\multitablecolspace
+\newskip\multitablelinespace
+\multitableparskip=0pt
+\multitableparindent=6pt
+\multitablecolspace=12pt
+\multitablelinespace=0pt
+
+% Macros used to set up halign preamble:
+%
+\let\endsetuptable\relax
+\def\xendsetuptable{\endsetuptable}
+\let\columnfractions\relax
+\def\xcolumnfractions{\columnfractions}
+\newif\ifsetpercent
+
+% #1 is the @columnfraction, usually a decimal number like .5, but might
+% be just 1. We just use it, whatever it is.
+%
+\def\pickupwholefraction#1 {%
+ \global\advance\colcount by 1
+ \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}%
+ \setuptable
+}
+
+\newcount\colcount
+\def\setuptable#1{%
+ \def\firstarg{#1}%
+ \ifx\firstarg\xendsetuptable
+ \let\go = \relax
+ \else
+ \ifx\firstarg\xcolumnfractions
+ \global\setpercenttrue
+ \else
+ \ifsetpercent
+ \let\go\pickupwholefraction
+ \else
+ \global\advance\colcount by 1
+ \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a
+ % separator; typically that is always in the input, anyway.
+ \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}%
+ \fi
+ \fi
+ \ifx\go\pickupwholefraction
+ % Put the argument back for the \pickupwholefraction call, so
+ % we'll always have a period there to be parsed.
+ \def\go{\pickupwholefraction#1}%
+ \else
+ \let\go = \setuptable
+ \fi%
+ \fi
+ \go
+}
+
+% multitable-only commands.
+%
+% @headitem starts a heading row, which we typeset in bold.
+% Assignments have to be global since we are inside the implicit group
+% of an alignment entry. \everycr resets \everytab so we don't have to
+% undo it ourselves.
+\def\headitemfont{\b}% for people to use in the template row; not changeable
+\def\headitem{%
+ \checkenv\multitable
+ \crcr
+ \global\everytab={\bf}% can't use \headitemfont since the parsing differs
+ \the\everytab % for the first item
+}%
+%
+% A \tab used to include \hskip1sp. But then the space in a template
+% line is not enough. That is bad. So let's go back to just `&' until
+% we again encounter the problem the 1sp was intended to solve.
+% --karl, nathan@acm.org, 20apr99.
+\def\tab{\checkenv\multitable &\the\everytab}%
+
+% @multitable ... @end multitable definitions:
+%
+\newtoks\everytab % insert after every tab.
+%
+\envdef\multitable{%
+ \vskip\parskip
+ \startsavinginserts
+ %
+ % @item within a multitable starts a normal row.
+ % We use \def instead of \let so that if one of the multitable entries
+ % contains an @itemize, we don't choke on the \item (seen as \crcr aka
+ % \endtemplate) expanding \doitemize.
+ \def\item{\crcr}%
+ %
+ \tolerance=9500
+ \hbadness=9500
+ \setmultitablespacing
+ \parskip=\multitableparskip
+ \parindent=\multitableparindent
+ \overfullrule=0pt
+ \global\colcount=0
+ %
+ \everycr = {%
+ \noalign{%
+ \global\everytab={}%
+ \global\colcount=0 % Reset the column counter.
+ % Check for saved footnotes, etc.
+ \checkinserts
+ % Keeps underfull box messages off when table breaks over pages.
+ %\filbreak
+ % Maybe so, but it also creates really weird page breaks when the
+ % table breaks over pages. Wouldn't \vfil be better? Wait until the
+ % problem manifests itself, so it can be fixed for real --karl.
+ }%
+ }%
+ %
+ \parsearg\domultitable
+}
+\def\domultitable#1{%
+ % To parse everything between @multitable and @item:
+ \setuptable#1 \endsetuptable
+ %
+ % This preamble sets up a generic column definition, which will
+ % be used as many times as user calls for columns.
+ % \vtop will set a single line and will also let text wrap and
+ % continue for many paragraphs if desired.
+ \halign\bgroup &%
+ \global\advance\colcount by 1
+ \multistrut
+ \vtop{%
+ % Use the current \colcount to find the correct column width:
+ \hsize=\expandafter\csname col\the\colcount\endcsname
+ %
+ % In order to keep entries from bumping into each other
+ % we will add a \leftskip of \multitablecolspace to all columns after
+ % the first one.
+ %
+ % If a template has been used, we will add \multitablecolspace
+ % to the width of each template entry.
+ %
+ % If the user has set preamble in terms of percent of \hsize we will
+ % use that dimension as the width of the column, and the \leftskip
+ % will keep entries from bumping into each other. Table will start at
+ % left margin and final column will justify at right margin.
+ %
+ % Make sure we don't inherit \rightskip from the outer environment.
+ \rightskip=0pt
+ \ifnum\colcount=1
+ % The first column will be indented with the surrounding text.
+ \advance\hsize by\leftskip
+ \else
+ \ifsetpercent \else
+ % If user has not set preamble in terms of percent of \hsize
+ % we will advance \hsize by \multitablecolspace.
+ \advance\hsize by \multitablecolspace
+ \fi
+ % In either case we will make \leftskip=\multitablecolspace:
+ \leftskip=\multitablecolspace
+ \fi
+ % Ignoring space at the beginning and end avoids an occasional spurious
+ % blank line, when TeX decides to break the line at the space before the
+ % box from the multistrut, so the strut ends up on a line by itself.
+ % For example:
+ % @multitable @columnfractions .11 .89
+ % @item @code{#}
+ % @tab Legal holiday which is valid in major parts of the whole country.
+ % Is automatically provided with highlighting sequences respectively
+ % marking characters.
+ \noindent\ignorespaces##\unskip\multistrut
+ }\cr
+}
+\def\Emultitable{%
+ \crcr
+ \egroup % end the \halign
+ \global\setpercentfalse
+}
+
+\def\setmultitablespacing{%
+ \def\multistrut{\strut}% just use the standard line spacing
+ %
+ % Compute \multitablelinespace (if not defined by user) for use in
+ % \multitableparskip calculation. We used define \multistrut based on
+ % this, but (ironically) that caused the spacing to be off.
+ % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100.
+\ifdim\multitablelinespace=0pt
+\setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip
+\global\advance\multitablelinespace by-\ht0
+\fi
+%% Test to see if parskip is larger than space between lines of
+%% table. If not, do nothing.
+%% If so, set to same dimension as multitablelinespace.
+\ifdim\multitableparskip>\multitablelinespace
+\global\multitableparskip=\multitablelinespace
+\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
+ %% than skip between lines in the table.
+\fi%
+\ifdim\multitableparskip=0pt
+\global\multitableparskip=\multitablelinespace
+\global\advance\multitableparskip-7pt %% to keep parskip somewhat smaller
+ %% than skip between lines in the table.
+\fi}
+
+
+\message{conditionals,}
+
+% @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext,
+% @ifnotxml always succeed. They currently do nothing; we don't
+% attempt to check whether the conditionals are properly nested. But we
+% have to remember that they are conditionals, so that @end doesn't
+% attempt to close an environment group.
+%
+\def\makecond#1{%
+ \expandafter\let\csname #1\endcsname = \relax
+ \expandafter\let\csname iscond.#1\endcsname = 1
+}
+\makecond{iftex}
+\makecond{ifnotdocbook}
+\makecond{ifnothtml}
+\makecond{ifnotinfo}
+\makecond{ifnotplaintext}
+\makecond{ifnotxml}
+
+% Ignore @ignore, @ifhtml, @ifinfo, and the like.
+%
+\def\direntry{\doignore{direntry}}
+\def\documentdescription{\doignore{documentdescription}}
+\def\docbook{\doignore{docbook}}
+\def\html{\doignore{html}}
+\def\ifdocbook{\doignore{ifdocbook}}
+\def\ifhtml{\doignore{ifhtml}}
+\def\ifinfo{\doignore{ifinfo}}
+\def\ifnottex{\doignore{ifnottex}}
+\def\ifplaintext{\doignore{ifplaintext}}
+\def\ifxml{\doignore{ifxml}}
+\def\ignore{\doignore{ignore}}
+\def\menu{\doignore{menu}}
+\def\xml{\doignore{xml}}
+
+% Ignore text until a line `@end #1', keeping track of nested conditionals.
+%
+% A count to remember the depth of nesting.
+\newcount\doignorecount
+
+\def\doignore#1{\begingroup
+ % Scan in ``verbatim'' mode:
+ \obeylines
+ \catcode`\@ = \other
+ \catcode`\{ = \other
+ \catcode`\} = \other
+ %
+ % Make sure that spaces turn into tokens that match what \doignoretext wants.
+ \spaceisspace
+ %
+ % Count number of #1's that we've seen.
+ \doignorecount = 0
+ %
+ % Swallow text until we reach the matching `@end #1'.
+ \dodoignore{#1}%
+}
+
+{ \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source.
+ \obeylines %
+ %
+ \gdef\dodoignore#1{%
+ % #1 contains the command name as a string, e.g., `ifinfo'.
+ %
+ % Define a command to find the next `@end #1'.
+ \long\def\doignoretext##1^^M@end #1{%
+ \doignoretextyyy##1^^M@#1\_STOP_}%
+ %
+ % And this command to find another #1 command, at the beginning of a
+ % line. (Otherwise, we would consider a line `@c @ifset', for
+ % example, to count as an @ifset for nesting.)
+ \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}%
+ %
+ % And now expand that command.
+ \doignoretext ^^M%
+ }%
+}
+
+\def\doignoreyyy#1{%
+ \def\temp{#1}%
+ \ifx\temp\empty % Nothing found.
+ \let\next\doignoretextzzz
+ \else % Found a nested condition, ...
+ \advance\doignorecount by 1
+ \let\next\doignoretextyyy % ..., look for another.
+ % If we're here, #1 ends with ^^M\ifinfo (for example).
+ \fi
+ \next #1% the token \_STOP_ is present just after this macro.
+}
+
+% We have to swallow the remaining "\_STOP_".
+%
+\def\doignoretextzzz#1{%
+ \ifnum\doignorecount = 0 % We have just found the outermost @end.
+ \let\next\enddoignore
+ \else % Still inside a nested condition.
+ \advance\doignorecount by -1
+ \let\next\doignoretext % Look for the next @end.
+ \fi
+ \next
+}
+
+% Finish off ignored text.
+{ \obeylines%
+ % Ignore anything after the last `@end #1'; this matters in verbatim
+ % environments, where otherwise the newline after an ignored conditional
+ % would result in a blank line in the output.
+ \gdef\enddoignore#1^^M{\endgroup\ignorespaces}%
+}
+
+
+% @set VAR sets the variable VAR to an empty value.
+% @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE.
+%
+% Since we want to separate VAR from REST-OF-LINE (which might be
+% empty), we can't just use \parsearg; we have to insert a space of our
+% own to delimit the rest of the line, and then take it out again if we
+% didn't need it.
+% We rely on the fact that \parsearg sets \catcode`\ =10.
+%
+\parseargdef\set{\setyyy#1 \endsetyyy}
+\def\setyyy#1 #2\endsetyyy{%
+ {%
+ \makevalueexpandable
+ \def\temp{#2}%
+ \edef\next{\gdef\makecsname{SET#1}}%
+ \ifx\temp\empty
+ \next{}%
+ \else
+ \setzzz#2\endsetzzz
+ \fi
+ }%
+}
+% Remove the trailing space \setxxx inserted.
+\def\setzzz#1 \endsetzzz{\next{#1}}
+
+% @clear VAR clears (i.e., unsets) the variable VAR.
+%
+\parseargdef\clear{%
+ {%
+ \makevalueexpandable
+ \global\expandafter\let\csname SET#1\endcsname=\relax
+ }%
+}
+
+% @value{foo} gets the text saved in variable foo.
+\def\value{\begingroup\makevalueexpandable\valuexxx}
+\def\valuexxx#1{\expandablevalue{#1}\endgroup}
+{
+ \catcode`\- = \active \catcode`\_ = \active
+ %
+ \gdef\makevalueexpandable{%
+ \let\value = \expandablevalue
+ % We don't want these characters active, ...
+ \catcode`\-=\other \catcode`\_=\other
+ % ..., but we might end up with active ones in the argument if
+ % we're called from @code, as @code{@value{foo-bar_}}, though.
+ % So \let them to their normal equivalents.
+ \let-\realdash \let_\normalunderscore
+ }
+}
+
+% We have this subroutine so that we can handle at least some @value's
+% properly in indexes (we call \makevalueexpandable in \indexdummies).
+% The command has to be fully expandable (if the variable is set), since
+% the result winds up in the index file. This means that if the
+% variable's value contains other Texinfo commands, it's almost certain
+% it will fail (although perhaps we could fix that with sufficient work
+% to do a one-level expansion on the result, instead of complete).
+%
+\def\expandablevalue#1{%
+ \expandafter\ifx\csname SET#1\endcsname\relax
+ {[No value for ``#1'']}%
+ \message{Variable `#1', used in @value, is not set.}%
+ \else
+ \csname SET#1\endcsname
+ \fi
+}
+
+% @ifset VAR ... @end ifset reads the `...' iff VAR has been defined
+% with @set.
+%
+% To get special treatment of `@end ifset,' call \makeond and the redefine.
+%
+\makecond{ifset}
+\def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}}
+\def\doifset#1#2{%
+ {%
+ \makevalueexpandable
+ \let\next=\empty
+ \expandafter\ifx\csname SET#2\endcsname\relax
+ #1% If not set, redefine \next.
+ \fi
+ \expandafter
+ }\next
+}
+\def\ifsetfail{\doignore{ifset}}
+
+% @ifclear VAR ... @end ifclear reads the `...' iff VAR has never been
+% defined with @set, or has been undefined with @clear.
+%
+% The `\else' inside the `\doifset' parameter is a trick to reuse the
+% above code: if the variable is not set, do nothing, if it is set,
+% then redefine \next to \ifclearfail.
+%
+\makecond{ifclear}
+\def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}}
+\def\ifclearfail{\doignore{ifclear}}
+
+% @dircategory CATEGORY -- specify a category of the dir file
+% which this file should belong to. Ignore this in TeX.
+\let\dircategory=\comment
+
+% @defininfoenclose.
+\let\definfoenclose=\comment
+
+
+\message{indexing,}
+% Index generation facilities
+
+% Define \newwrite to be identical to plain tex's \newwrite
+% except not \outer, so it can be used within macros and \if's.
+\edef\newwrite{\makecsname{ptexnewwrite}}
+
+% \newindex {foo} defines an index named foo.
+% It automatically defines \fooindex such that
+% \fooindex ...rest of line... puts an entry in the index foo.
+% It also defines \fooindfile to be the number of the output channel for
+% the file that accumulates this index. The file's extension is foo.
+% The name of an index should be no more than 2 characters long
+% for the sake of vms.
+%
+\def\newindex#1{%
+ \iflinks
+ \expandafter\newwrite \csname#1indfile\endcsname
+ \openout \csname#1indfile\endcsname \jobname.#1 % Open the file
+ \fi
+ \expandafter\xdef\csname#1index\endcsname{% % Define @#1index
+ \noexpand\doindex{#1}}
+}
+
+% @defindex foo == \newindex{foo}
+%
+\def\defindex{\parsearg\newindex}
+
+% Define @defcodeindex, like @defindex except put all entries in @code.
+%
+\def\defcodeindex{\parsearg\newcodeindex}
+%
+\def\newcodeindex#1{%
+ \iflinks
+ \expandafter\newwrite \csname#1indfile\endcsname
+ \openout \csname#1indfile\endcsname \jobname.#1
+ \fi
+ \expandafter\xdef\csname#1index\endcsname{%
+ \noexpand\docodeindex{#1}}%
+}
+
+
+% @synindex foo bar makes index foo feed into index bar.
+% Do this instead of @defindex foo if you don't want it as a separate index.
+%
+% @syncodeindex foo bar similar, but put all entries made for index foo
+% inside @code.
+%
+\def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}}
+\def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}}
+
+% #1 is \doindex or \docodeindex, #2 the index getting redefined (foo),
+% #3 the target index (bar).
+\def\dosynindex#1#2#3{%
+ % Only do \closeout if we haven't already done it, else we'll end up
+ % closing the target index.
+ \expandafter \ifx\csname donesynindex#2\endcsname \relax
+ % The \closeout helps reduce unnecessary open files; the limit on the
+ % Acorn RISC OS is a mere 16 files.
+ \expandafter\closeout\csname#2indfile\endcsname
+ \expandafter\let\csname donesynindex#2\endcsname = 1
+ \fi
+ % redefine \fooindfile:
+ \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
+ \expandafter\let\csname#2indfile\endcsname=\temp
+ % redefine \fooindex:
+ \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}%
+}
+
+% Define \doindex, the driver for all \fooindex macros.
+% Argument #1 is generated by the calling \fooindex macro,
+% and it is "foo", the name of the index.
+
+% \doindex just uses \parsearg; it calls \doind for the actual work.
+% This is because \doind is more useful to call from other macros.
+
+% There is also \dosubind {index}{topic}{subtopic}
+% which makes an entry in a two-level index such as the operation index.
+
+\def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer}
+\def\singleindexer #1{\doind{\indexname}{#1}}
+
+% like the previous two, but they put @code around the argument.
+\def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer}
+\def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}}
+
+% Take care of Texinfo commands that can appear in an index entry.
+% Since there are some commands we want to expand, and others we don't,
+% we have to laboriously prevent expansion for those that we don't.
+%
+\def\indexdummies{%
+ \escapechar = `\\ % use backslash in output files.
+ \def\@{@}% change to @@ when we switch to @ as escape char in index files.
+ \def\ {\realbackslash\space }%
+ %
+ % Need these in case \tex is in effect and \{ is a \delimiter again.
+ % But can't use \lbracecmd and \rbracecmd because texindex assumes
+ % braces and backslashes are used only as delimiters.
+ \let\{ = \mylbrace
+ \let\} = \myrbrace
+ %
+ % I don't entirely understand this, but when an index entry is
+ % generated from a macro call, the \endinput which \scanmacro inserts
+ % causes processing to be prematurely terminated. This is,
+ % apparently, because \indexsorttmp is fully expanded, and \endinput
+ % is an expandable command. The redefinition below makes \endinput
+ % disappear altogether for that purpose -- although logging shows that
+ % processing continues to some further point. On the other hand, it
+ % seems \endinput does not hurt in the printed index arg, since that
+ % is still getting written without apparent harm.
+ %
+ % Sample source (mac-idx3.tex, reported by Graham Percival to
+ % help-texinfo, 22may06):
+ % @macro funindex {WORD}
+ % @findex xyz
+ % @end macro
+ % ...
+ % @funindex commtest
+ %
+ % The above is not enough to reproduce the bug, but it gives the flavor.
+ %
+ % Sample whatsit resulting:
+ % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}}
+ %
+ % So:
+ \let\endinput = \empty
+ %
+ % Do the redefinitions.
+ \commondummies
+}
+
+% For the aux and toc files, @ is the escape character. So we want to
+% redefine everything using @ as the escape character (instead of
+% \realbackslash, still used for index files). When everything uses @,
+% this will be simpler.
+%
+\def\atdummies{%
+ \def\@{@@}%
+ \def\ {@ }%
+ \let\{ = \lbraceatcmd
+ \let\} = \rbraceatcmd
+ %
+ % Do the redefinitions.
+ \commondummies
+ \otherbackslash
+}
+
+% Called from \indexdummies and \atdummies.
+%
+\def\commondummies{%
+ %
+ % \definedummyword defines \#1 as \string\#1\space, thus effectively
+ % preventing its expansion. This is used only for control% words,
+ % not control letters, because the \space would be incorrect for
+ % control characters, but is needed to separate the control word
+ % from whatever follows.
+ %
+ % For control letters, we have \definedummyletter, which omits the
+ % space.
+ %
+ % These can be used both for control words that take an argument and
+ % those that do not. If it is followed by {arg} in the input, then
+ % that will dutifully get written to the index (or wherever).
+ %
+ \def\definedummyword ##1{\def##1{\string##1\space}}%
+ \def\definedummyletter##1{\def##1{\string##1}}%
+ \let\definedummyaccent\definedummyletter
+ %
+ \commondummiesnofonts
+ %
+ \definedummyletter\_%
+ %
+ % Non-English letters.
+ \definedummyword\AA
+ \definedummyword\AE
+ \definedummyword\L
+ \definedummyword\OE
+ \definedummyword\O
+ \definedummyword\aa
+ \definedummyword\ae
+ \definedummyword\l
+ \definedummyword\oe
+ \definedummyword\o
+ \definedummyword\ss
+ \definedummyword\exclamdown
+ \definedummyword\questiondown
+ \definedummyword\ordf
+ \definedummyword\ordm
+ %
+ % Although these internal commands shouldn't show up, sometimes they do.
+ \definedummyword\bf
+ \definedummyword\gtr
+ \definedummyword\hat
+ \definedummyword\less
+ \definedummyword\sf
+ \definedummyword\sl
+ \definedummyword\tclose
+ \definedummyword\tt
+ %
+ \definedummyword\LaTeX
+ \definedummyword\TeX
+ %
+ % Assorted special characters.
+ \definedummyword\bullet
+ \definedummyword\comma
+ \definedummyword\copyright
+ \definedummyword\registeredsymbol
+ \definedummyword\dots
+ \definedummyword\enddots
+ \definedummyword\equiv
+ \definedummyword\error
+ \definedummyword\euro
+ \definedummyword\guillemetleft
+ \definedummyword\guillemetright
+ \definedummyword\guilsinglleft
+ \definedummyword\guilsinglright
+ \definedummyword\expansion
+ \definedummyword\minus
+ \definedummyword\ogonek
+ \definedummyword\pounds
+ \definedummyword\point
+ \definedummyword\print
+ \definedummyword\quotedblbase
+ \definedummyword\quotedblleft
+ \definedummyword\quotedblright
+ \definedummyword\quoteleft
+ \definedummyword\quoteright
+ \definedummyword\quotesinglbase
+ \definedummyword\result
+ \definedummyword\textdegree
+ %
+ % We want to disable all macros so that they are not expanded by \write.
+ \macrolist
+ %
+ \normalturnoffactive
+ %
+ % Handle some cases of @value -- where it does not contain any
+ % (non-fully-expandable) commands.
+ \makevalueexpandable
+}
+
+% \commondummiesnofonts: common to \commondummies and \indexnofonts.
+%
+\def\commondummiesnofonts{%
+ % Control letters and accents.
+ \definedummyletter\!%
+ \definedummyaccent\"%
+ \definedummyaccent\'%
+ \definedummyletter\*%
+ \definedummyaccent\,%
+ \definedummyletter\.%
+ \definedummyletter\/%
+ \definedummyletter\:%
+ \definedummyaccent\=%
+ \definedummyletter\?%
+ \definedummyaccent\^%
+ \definedummyaccent\`%
+ \definedummyaccent\~%
+ \definedummyword\u
+ \definedummyword\v
+ \definedummyword\H
+ \definedummyword\dotaccent
+ \definedummyword\ogonek
+ \definedummyword\ringaccent
+ \definedummyword\tieaccent
+ \definedummyword\ubaraccent
+ \definedummyword\udotaccent
+ \definedummyword\dotless
+ %
+ % Texinfo font commands.
+ \definedummyword\b
+ \definedummyword\i
+ \definedummyword\r
+ \definedummyword\sc
+ \definedummyword\t
+ %
+ % Commands that take arguments.
+ \definedummyword\acronym
+ \definedummyword\cite
+ \definedummyword\code
+ \definedummyword\command
+ \definedummyword\dfn
+ \definedummyword\emph
+ \definedummyword\env
+ \definedummyword\file
+ \definedummyword\kbd
+ \definedummyword\key
+ \definedummyword\math
+ \definedummyword\option
+ \definedummyword\pxref
+ \definedummyword\ref
+ \definedummyword\samp
+ \definedummyword\strong
+ \definedummyword\tie
+ \definedummyword\uref
+ \definedummyword\url
+ \definedummyword\var
+ \definedummyword\verb
+ \definedummyword\w
+ \definedummyword\xref
+}
+
+% \indexnofonts is used when outputting the strings to sort the index
+% by, and when constructing control sequence names. It eliminates all
+% control sequences and just writes whatever the best ASCII sort string
+% would be for a given command (usually its argument).
+%
+\def\indexnofonts{%
+ % Accent commands should become @asis.
+ \def\definedummyaccent##1{\let##1\asis}%
+ % We can just ignore other control letters.
+ \def\definedummyletter##1{\let##1\empty}%
+ % Hopefully, all control words can become @asis.
+ \let\definedummyword\definedummyaccent
+ %
+ \commondummiesnofonts
+ %
+ % Don't no-op \tt, since it isn't a user-level command
+ % and is used in the definitions of the active chars like <, >, |, etc.
+ % Likewise with the other plain tex font commands.
+ %\let\tt=\asis
+ %
+ \def\ { }%
+ \def\@{@}%
+ % how to handle braces?
+ \def\_{\normalunderscore}%
+ %
+ % Non-English letters.
+ \def\AA{AA}%
+ \def\AE{AE}%
+ \def\L{L}%
+ \def\OE{OE}%
+ \def\O{O}%
+ \def\aa{aa}%
+ \def\ae{ae}%
+ \def\l{l}%
+ \def\oe{oe}%
+ \def\o{o}%
+ \def\ss{ss}%
+ \def\exclamdown{!}%
+ \def\questiondown{?}%
+ \def\ordf{a}%
+ \def\ordm{o}%
+ %
+ \def\LaTeX{LaTeX}%
+ \def\TeX{TeX}%
+ %
+ % Assorted special characters.
+ % (The following {} will end up in the sort string, but that's ok.)
+ \def\bullet{bullet}%
+ \def\comma{,}%
+ \def\copyright{copyright}%
+ \def\registeredsymbol{R}%
+ \def\dots{...}%
+ \def\enddots{...}%
+ \def\equiv{==}%
+ \def\error{error}%
+ \def\euro{euro}%
+ \def\guillemetleft{<<}%
+ \def\guillemetright{>>}%
+ \def\guilsinglleft{<}%
+ \def\guilsinglright{>}%
+ \def\expansion{==>}%
+ \def\minus{-}%
+ \def\pounds{pounds}%
+ \def\point{.}%
+ \def\print{-|}%
+ \def\quotedblbase{"}%
+ \def\quotedblleft{"}%
+ \def\quotedblright{"}%
+ \def\quoteleft{`}%
+ \def\quoteright{'}%
+ \def\quotesinglbase{,}%
+ \def\result{=>}%
+ \def\textdegree{degrees}%
+ %
+ % We need to get rid of all macros, leaving only the arguments (if present).
+ % Of course this is not nearly correct, but it is the best we can do for now.
+ % makeinfo does not expand macros in the argument to @deffn, which ends up
+ % writing an index entry, and texindex isn't prepared for an index sort entry
+ % that starts with \.
+ %
+ % Since macro invocations are followed by braces, we can just redefine them
+ % to take a single TeX argument. The case of a macro invocation that
+ % goes to end-of-line is not handled.
+ %
+ \macrolist
+}
+
+\let\indexbackslash=0 %overridden during \printindex.
+\let\SETmarginindex=\relax % put index entries in margin (undocumented)?
+
+% Most index entries go through here, but \dosubind is the general case.
+% #1 is the index name, #2 is the entry text.
+\def\doind#1#2{\dosubind{#1}{#2}{}}
+
+% Workhorse for all \fooindexes.
+% #1 is name of index, #2 is stuff to put there, #3 is subentry --
+% empty if called from \doind, as we usually are (the main exception
+% is with most defuns, which call us directly).
+%
+\def\dosubind#1#2#3{%
+ \iflinks
+ {%
+ % Store the main index entry text (including the third arg).
+ \toks0 = {#2}%
+ % If third arg is present, precede it with a space.
+ \def\thirdarg{#3}%
+ \ifx\thirdarg\empty \else
+ \toks0 = \expandafter{\the\toks0 \space #3}%
+ \fi
+ %
+ \edef\writeto{\csname#1indfile\endcsname}%
+ %
+ \safewhatsit\dosubindwrite
+ }%
+ \fi
+}
+
+% Write the entry in \toks0 to the index file:
+%
+\def\dosubindwrite{%
+ % Put the index entry in the margin if desired.
+ \ifx\SETmarginindex\relax\else
+ \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}%
+ \fi
+ %
+ % Remember, we are within a group.
+ \indexdummies % Must do this here, since \bf, etc expand at this stage
+ \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now
+ % so it will be output as is; and it will print as backslash.
+ %
+ % Process the index entry with all font commands turned off, to
+ % get the string to sort by.
+ {\indexnofonts
+ \edef\temp{\the\toks0}% need full expansion
+ \xdef\indexsorttmp{\temp}%
+ }%
+ %
+ % Set up the complete index entry, with both the sort key and
+ % the original text, including any font commands. We write
+ % three arguments to \entry to the .?? file (four in the
+ % subentry case), texindex reduces to two when writing the .??s
+ % sorted result.
+ \edef\temp{%
+ \write\writeto{%
+ \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}%
+ }%
+ \temp
+}
+
+% Take care of unwanted page breaks/skips around a whatsit:
+%
+% If a skip is the last thing on the list now, preserve it
+% by backing up by \lastskip, doing the \write, then inserting
+% the skip again. Otherwise, the whatsit generated by the
+% \write or \pdfdest will make \lastskip zero. The result is that
+% sequences like this:
+% @end defun
+% @tindex whatever
+% @defun ...
+% will have extra space inserted, because the \medbreak in the
+% start of the @defun won't see the skip inserted by the @end of
+% the previous defun.
+%
+% But don't do any of this if we're not in vertical mode. We
+% don't want to do a \vskip and prematurely end a paragraph.
+%
+% Avoid page breaks due to these extra skips, too.
+%
+% But wait, there is a catch there:
+% We'll have to check whether \lastskip is zero skip. \ifdim is not
+% sufficient for this purpose, as it ignores stretch and shrink parts
+% of the skip. The only way seems to be to check the textual
+% representation of the skip.
+%
+% The following is almost like \def\zeroskipmacro{0.0pt} except that
+% the ``p'' and ``t'' characters have catcode \other, not 11 (letter).
+%
+\edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname}
+%
+\newskip\whatsitskip
+\newcount\whatsitpenalty
+%
+% ..., ready, GO:
+%
+\def\safewhatsit#1{%
+\ifhmode
+ #1%
+\else
+ % \lastskip and \lastpenalty cannot both be nonzero simultaneously.
+ \whatsitskip = \lastskip
+ \edef\lastskipmacro{\the\lastskip}%
+ \whatsitpenalty = \lastpenalty
+ %
+ % If \lastskip is nonzero, that means the last item was a
+ % skip. And since a skip is discardable, that means this
+ % -\whatsitskip glue we're inserting is preceded by a
+ % non-discardable item, therefore it is not a potential
+ % breakpoint, therefore no \nobreak needed.
+ \ifx\lastskipmacro\zeroskipmacro
+ \else
+ \vskip-\whatsitskip
+ \fi
+ %
+ #1%
+ %
+ \ifx\lastskipmacro\zeroskipmacro
+ % If \lastskip was zero, perhaps the last item was a penalty, and
+ % perhaps it was >=10000, e.g., a \nobreak. In that case, we want
+ % to re-insert the same penalty (values >10000 are used for various
+ % signals); since we just inserted a non-discardable item, any
+ % following glue (such as a \parskip) would be a breakpoint. For example:
+ %
+ % @deffn deffn-whatever
+ % @vindex index-whatever
+ % Description.
+ % would allow a break between the index-whatever whatsit
+ % and the "Description." paragraph.
+ \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi
+ \else
+ % On the other hand, if we had a nonzero \lastskip,
+ % this make-up glue would be preceded by a non-discardable item
+ % (the whatsit from the \write), so we must insert a \nobreak.
+ \nobreak\vskip\whatsitskip
+ \fi
+\fi
+}
+
+% The index entry written in the file actually looks like
+% \entry {sortstring}{page}{topic}
+% or
+% \entry {sortstring}{page}{topic}{subtopic}
+% The texindex program reads in these files and writes files
+% containing these kinds of lines:
+% \initial {c}
+% before the first topic whose initial is c
+% \entry {topic}{pagelist}
+% for a topic that is used without subtopics
+% \primary {topic}
+% for the beginning of a topic that is used with subtopics
+% \secondary {subtopic}{pagelist}
+% for each subtopic.
+
+% Define the user-accessible indexing commands
+% @findex, @vindex, @kindex, @cindex.
+
+\def\findex {\fnindex}
+\def\kindex {\kyindex}
+\def\cindex {\cpindex}
+\def\vindex {\vrindex}
+\def\tindex {\tpindex}
+\def\pindex {\pgindex}
+
+\def\cindexsub {\begingroup\obeylines\cindexsub}
+{\obeylines %
+\gdef\cindexsub "#1" #2^^M{\endgroup %
+\dosubind{cp}{#2}{#1}}}
+
+% Define the macros used in formatting output of the sorted index material.
+
+% @printindex causes a particular index (the ??s file) to get printed.
+% It does not print any chapter heading (usually an @unnumbered).
+%
+\parseargdef\printindex{\begingroup
+ \dobreak \chapheadingskip{10000}%
+ %
+ \smallfonts \rm
+ \tolerance = 9500
+ \plainfrenchspacing
+ \everypar = {}% don't want the \kern\-parindent from indentation suppression.
+ %
+ % See if the index file exists and is nonempty.
+ % Change catcode of @ here so that if the index file contains
+ % \initial {@}
+ % as its first line, TeX doesn't complain about mismatched braces
+ % (because it thinks @} is a control sequence).
+ \catcode`\@ = 11
+ \openin 1 \jobname.#1s
+ \ifeof 1
+ % \enddoublecolumns gets confused if there is no text in the index,
+ % and it loses the chapter title and the aux file entries for the
+ % index. The easiest way to prevent this problem is to make sure
+ % there is some text.
+ \putwordIndexNonexistent
+ \else
+ %
+ % If the index file exists but is empty, then \openin leaves \ifeof
+ % false. We have to make TeX try to read something from the file, so
+ % it can discover if there is anything in it.
+ \read 1 to \temp
+ \ifeof 1
+ \putwordIndexIsEmpty
+ \else
+ % Index files are almost Texinfo source, but we use \ as the escape
+ % character. It would be better to use @, but that's too big a change
+ % to make right now.
+ \def\indexbackslash{\backslashcurfont}%
+ \catcode`\\ = 0
+ \escapechar = `\\
+ \begindoublecolumns
+ \input \jobname.#1s
+ \enddoublecolumns
+ \fi
+ \fi
+ \closein 1
+\endgroup}
+
+% These macros are used by the sorted index file itself.
+% Change them to control the appearance of the index.
+
+\def\initial#1{{%
+ % Some minor font changes for the special characters.
+ \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt
+ %
+ % Remove any glue we may have, we'll be inserting our own.
+ \removelastskip
+ %
+ % We like breaks before the index initials, so insert a bonus.
+ \nobreak
+ \vskip 0pt plus 3\baselineskip
+ \penalty 0
+ \vskip 0pt plus -3\baselineskip
+ %
+ % Typeset the initial. Making this add up to a whole number of
+ % baselineskips increases the chance of the dots lining up from column
+ % to column. It still won't often be perfect, because of the stretch
+ % we need before each entry, but it's better.
+ %
+ % No shrink because it confuses \balancecolumns.
+ \vskip 1.67\baselineskip plus .5\baselineskip
+ \leftline{\secbf #1}%
+ % Do our best not to break after the initial.
+ \nobreak
+ \vskip .33\baselineskip plus .1\baselineskip
+}}
+
+% \entry typesets a paragraph consisting of the text (#1), dot leaders, and
+% then page number (#2) flushed to the right margin. It is used for index
+% and table of contents entries. The paragraph is indented by \leftskip.
+%
+% A straightforward implementation would start like this:
+% \def\entry#1#2{...
+% But this freezes the catcodes in the argument, and can cause problems to
+% @code, which sets - active. This problem was fixed by a kludge---
+% ``-'' was active throughout whole index, but this isn't really right.
+%
+% The right solution is to prevent \entry from swallowing the whole text.
+% --kasal, 21nov03
+\def\entry{%
+ \begingroup
+ %
+ % Start a new paragraph if necessary, so our assignments below can't
+ % affect previous text.
+ \par
+ %
+ % Do not fill out the last line with white space.
+ \parfillskip = 0in
+ %
+ % No extra space above this paragraph.
+ \parskip = 0in
+ %
+ % Do not prefer a separate line ending with a hyphen to fewer lines.
+ \finalhyphendemerits = 0
+ %
+ % \hangindent is only relevant when the entry text and page number
+ % don't both fit on one line. In that case, bob suggests starting the
+ % dots pretty far over on the line. Unfortunately, a large
+ % indentation looks wrong when the entry text itself is broken across
+ % lines. So we use a small indentation and put up with long leaders.
+ %
+ % \hangafter is reset to 1 (which is the value we want) at the start
+ % of each paragraph, so we need not do anything with that.
+ \hangindent = 2em
+ %
+ % When the entry text needs to be broken, just fill out the first line
+ % with blank space.
+ \rightskip = 0pt plus1fil
+ %
+ % A bit of stretch before each entry for the benefit of balancing
+ % columns.
+ \vskip 0pt plus1pt
+ %
+ % Swallow the left brace of the text (first parameter):
+ \afterassignment\doentry
+ \let\temp =
+}
+\def\doentry{%
+ \bgroup % Instead of the swallowed brace.
+ \noindent
+ \aftergroup\finishentry
+ % And now comes the text of the entry.
+}
+\def\finishentry#1{%
+ % #1 is the page number.
+ %
+ % The following is kludged to not output a line of dots in the index if
+ % there are no page numbers. The next person who breaks this will be
+ % cursed by a Unix daemon.
+ \setbox\boxA = \hbox{#1}%
+ \ifdim\wd\boxA = 0pt
+ \ %
+ \else
+ %
+ % If we must, put the page number on a line of its own, and fill out
+ % this line with blank space. (The \hfil is overwhelmed with the
+ % fill leaders glue in \indexdotfill if the page number does fit.)
+ \hfil\penalty50
+ \null\nobreak\indexdotfill % Have leaders before the page number.
+ %
+ % The `\ ' here is removed by the implicit \unskip that TeX does as
+ % part of (the primitive) \par. Without it, a spurious underfull
+ % \hbox ensues.
+ \ifpdf
+ \pdfgettoks#1.%
+ \ \the\toksA
+ \else
+ \ #1%
+ \fi
+ \fi
+ \par
+ \endgroup
+}
+
+% Like plain.tex's \dotfill, except uses up at least 1 em.
+\def\indexdotfill{\cleaders
+ \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill}
+
+\def\primary #1{\line{#1\hfil}}
+
+\newskip\secondaryindent \secondaryindent=0.5cm
+\def\secondary#1#2{{%
+ \parfillskip=0in
+ \parskip=0in
+ \hangindent=1in
+ \hangafter=1
+ \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill
+ \ifpdf
+ \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph.
+ \else
+ #2
+ \fi
+ \par
+}}
+
+% Define two-column mode, which we use to typeset indexes.
+% Adapted from the TeXbook, page 416, which is to say,
+% the manmac.tex format used to print the TeXbook itself.
+\catcode`\@=11
+
+\newbox\partialpage
+\newdimen\doublecolumnhsize
+
+\def\begindoublecolumns{\begingroup % ended by \enddoublecolumns
+ % Grab any single-column material above us.
+ \output = {%
+ %
+ % Here is a possibility not foreseen in manmac: if we accumulate a
+ % whole lot of material, we might end up calling this \output
+ % routine twice in a row (see the doublecol-lose test, which is
+ % essentially a couple of indexes with @setchapternewpage off). In
+ % that case we just ship out what is in \partialpage with the normal
+ % output routine. Generally, \partialpage will be empty when this
+ % runs and this will be a no-op. See the indexspread.tex test case.
+ \ifvoid\partialpage \else
+ \onepageout{\pagecontents\partialpage}%
+ \fi
+ %
+ \global\setbox\partialpage = \vbox{%
+ % Unvbox the main output page.
+ \unvbox\PAGE
+ \kern-\topskip \kern\baselineskip
+ }%
+ }%
+ \eject % run that output routine to set \partialpage
+ %
+ % Use the double-column output routine for subsequent pages.
+ \output = {\doublecolumnout}%
+ %
+ % Change the page size parameters. We could do this once outside this
+ % routine, in each of @smallbook, @afourpaper, and the default 8.5x11
+ % format, but then we repeat the same computation. Repeating a couple
+ % of assignments once per index is clearly meaningless for the
+ % execution time, so we may as well do it in one place.
+ %
+ % First we halve the line length, less a little for the gutter between
+ % the columns. We compute the gutter based on the line length, so it
+ % changes automatically with the paper format. The magic constant
+ % below is chosen so that the gutter has the same value (well, +-<1pt)
+ % as it did when we hard-coded it.
+ %
+ % We put the result in a separate register, \doublecolumhsize, so we
+ % can restore it in \pagesofar, after \hsize itself has (potentially)
+ % been clobbered.
+ %
+ \doublecolumnhsize = \hsize
+ \advance\doublecolumnhsize by -.04154\hsize
+ \divide\doublecolumnhsize by 2
+ \hsize = \doublecolumnhsize
+ %
+ % Double the \vsize as well. (We don't need a separate register here,
+ % since nobody clobbers \vsize.)
+ \vsize = 2\vsize
+}
+
+% The double-column output routine for all double-column pages except
+% the last.
+%
+\def\doublecolumnout{%
+ \splittopskip=\topskip \splitmaxdepth=\maxdepth
+ % Get the available space for the double columns -- the normal
+ % (undoubled) page height minus any material left over from the
+ % previous page.
+ \dimen@ = \vsize
+ \divide\dimen@ by 2
+ \advance\dimen@ by -\ht\partialpage
+ %
+ % box0 will be the left-hand column, box2 the right.
+ \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@
+ \onepageout\pagesofar
+ \unvbox255
+ \penalty\outputpenalty
+}
+%
+% Re-output the contents of the output page -- any previous material,
+% followed by the two boxes we just split, in box0 and box2.
+\def\pagesofar{%
+ \unvbox\partialpage
+ %
+ \hsize = \doublecolumnhsize
+ \wd0=\hsize \wd2=\hsize
+ \hbox to\pagewidth{\box0\hfil\box2}%
+}
+%
+% All done with double columns.
+\def\enddoublecolumns{%
+ % The following penalty ensures that the page builder is exercised
+ % _before_ we change the output routine. This is necessary in the
+ % following situation:
+ %
+ % The last section of the index consists only of a single entry.
+ % Before this section, \pagetotal is less than \pagegoal, so no
+ % break occurs before the last section starts. However, the last
+ % section, consisting of \initial and the single \entry, does not
+ % fit on the page and has to be broken off. Without the following
+ % penalty the page builder will not be exercised until \eject
+ % below, and by that time we'll already have changed the output
+ % routine to the \balancecolumns version, so the next-to-last
+ % double-column page will be processed with \balancecolumns, which
+ % is wrong: The two columns will go to the main vertical list, with
+ % the broken-off section in the recent contributions. As soon as
+ % the output routine finishes, TeX starts reconsidering the page
+ % break. The two columns and the broken-off section both fit on the
+ % page, because the two columns now take up only half of the page
+ % goal. When TeX sees \eject from below which follows the final
+ % section, it invokes the new output routine that we've set after
+ % \balancecolumns below; \onepageout will try to fit the two columns
+ % and the final section into the vbox of \pageheight (see
+ % \pagebody), causing an overfull box.
+ %
+ % Note that glue won't work here, because glue does not exercise the
+ % page builder, unlike penalties (see The TeXbook, pp. 280-281).
+ \penalty0
+ %
+ \output = {%
+ % Split the last of the double-column material. Leave it on the
+ % current page, no automatic page break.
+ \balancecolumns
+ %
+ % If we end up splitting too much material for the current page,
+ % though, there will be another page break right after this \output
+ % invocation ends. Having called \balancecolumns once, we do not
+ % want to call it again. Therefore, reset \output to its normal
+ % definition right away. (We hope \balancecolumns will never be
+ % called on to balance too much material, but if it is, this makes
+ % the output somewhat more palatable.)
+ \global\output = {\onepageout{\pagecontents\PAGE}}%
+ }%
+ \eject
+ \endgroup % started in \begindoublecolumns
+ %
+ % \pagegoal was set to the doubled \vsize above, since we restarted
+ % the current page. We're now back to normal single-column
+ % typesetting, so reset \pagegoal to the normal \vsize (after the
+ % \endgroup where \vsize got restored).
+ \pagegoal = \vsize
+}
+%
+% Called at the end of the double column material.
+\def\balancecolumns{%
+ \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120.
+ \dimen@ = \ht0
+ \advance\dimen@ by \topskip
+ \advance\dimen@ by-\baselineskip
+ \divide\dimen@ by 2 % target to split to
+ %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}%
+ \splittopskip = \topskip
+ % Loop until we get a decent breakpoint.
+ {%
+ \vbadness = 10000
+ \loop
+ \global\setbox3 = \copy0
+ \global\setbox1 = \vsplit3 to \dimen@
+ \ifdim\ht3>\dimen@
+ \global\advance\dimen@ by 1pt
+ \repeat
+ }%
+ %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}%
+ \setbox0=\vbox to\dimen@{\unvbox1}%
+ \setbox2=\vbox to\dimen@{\unvbox3}%
+ %
+ \pagesofar
+}
+\catcode`\@ = \other
+
+
+\message{sectioning,}
+% Chapters, sections, etc.
+
+% \unnumberedno is an oxymoron, of course. But we count the unnumbered
+% sections so that we can refer to them unambiguously in the pdf
+% outlines by their "section number". We avoid collisions with chapter
+% numbers by starting them at 10000. (If a document ever has 10000
+% chapters, we're in trouble anyway, I'm sure.)
+\newcount\unnumberedno \unnumberedno = 10000
+\newcount\chapno
+\newcount\secno \secno=0
+\newcount\subsecno \subsecno=0
+\newcount\subsubsecno \subsubsecno=0
+
+% This counter is funny since it counts through charcodes of letters A, B, ...
+\newcount\appendixno \appendixno = `\@
+%
+% \def\appendixletter{\char\the\appendixno}
+% We do the following ugly conditional instead of the above simple
+% construct for the sake of pdftex, which needs the actual
+% letter in the expansion, not just typeset.
+%
+\def\appendixletter{%
+ \ifnum\appendixno=`A A%
+ \else\ifnum\appendixno=`B B%
+ \else\ifnum\appendixno=`C C%
+ \else\ifnum\appendixno=`D D%
+ \else\ifnum\appendixno=`E E%
+ \else\ifnum\appendixno=`F F%
+ \else\ifnum\appendixno=`G G%
+ \else\ifnum\appendixno=`H H%
+ \else\ifnum\appendixno=`I I%
+ \else\ifnum\appendixno=`J J%
+ \else\ifnum\appendixno=`K K%
+ \else\ifnum\appendixno=`L L%
+ \else\ifnum\appendixno=`M M%
+ \else\ifnum\appendixno=`N N%
+ \else\ifnum\appendixno=`O O%
+ \else\ifnum\appendixno=`P P%
+ \else\ifnum\appendixno=`Q Q%
+ \else\ifnum\appendixno=`R R%
+ \else\ifnum\appendixno=`S S%
+ \else\ifnum\appendixno=`T T%
+ \else\ifnum\appendixno=`U U%
+ \else\ifnum\appendixno=`V V%
+ \else\ifnum\appendixno=`W W%
+ \else\ifnum\appendixno=`X X%
+ \else\ifnum\appendixno=`Y Y%
+ \else\ifnum\appendixno=`Z Z%
+ % The \the is necessary, despite appearances, because \appendixletter is
+ % expanded while writing the .toc file. \char\appendixno is not
+ % expandable, thus it is written literally, thus all appendixes come out
+ % with the same letter (or @) in the toc without it.
+ \else\char\the\appendixno
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi
+ \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi}
+
+% Each @chapter defines these (using marks) as the number+name, number
+% and name of the chapter. Page headings and footings can use
+% these. @section does likewise.
+\def\thischapter{}
+\def\thischapternum{}
+\def\thischaptername{}
+\def\thissection{}
+\def\thissectionnum{}
+\def\thissectionname{}
+
+\newcount\absseclevel % used to calculate proper heading level
+\newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count
+
+% @raisesections: treat @section as chapter, @subsection as section, etc.
+\def\raisesections{\global\advance\secbase by -1}
+\let\up=\raisesections % original BFox name
+
+% @lowersections: treat @chapter as section, @section as subsection, etc.
+\def\lowersections{\global\advance\secbase by 1}
+\let\down=\lowersections % original BFox name
+
+% we only have subsub.
+\chardef\maxseclevel = 3
+%
+% A numbered section within an unnumbered changes to unnumbered too.
+% To achive this, remember the "biggest" unnum. sec. we are currently in:
+\chardef\unmlevel = \maxseclevel
+%
+% Trace whether the current chapter is an appendix or not:
+% \chapheadtype is "N" or "A", unnumbered chapters are ignored.
+\def\chapheadtype{N}
+
+% Choose a heading macro
+% #1 is heading type
+% #2 is heading level
+% #3 is text for heading
+\def\genhead#1#2#3{%
+ % Compute the abs. sec. level:
+ \absseclevel=#2
+ \advance\absseclevel by \secbase
+ % Make sure \absseclevel doesn't fall outside the range:
+ \ifnum \absseclevel < 0
+ \absseclevel = 0
+ \else
+ \ifnum \absseclevel > 3
+ \absseclevel = 3
+ \fi
+ \fi
+ % The heading type:
+ \def\headtype{#1}%
+ \if \headtype U%
+ \ifnum \absseclevel < \unmlevel
+ \chardef\unmlevel = \absseclevel
+ \fi
+ \else
+ % Check for appendix sections:
+ \ifnum \absseclevel = 0
+ \edef\chapheadtype{\headtype}%
+ \else
+ \if \headtype A\if \chapheadtype N%
+ \errmessage{@appendix... within a non-appendix chapter}%
+ \fi\fi
+ \fi
+ % Check for numbered within unnumbered:
+ \ifnum \absseclevel > \unmlevel
+ \def\headtype{U}%
+ \else
+ \chardef\unmlevel = 3
+ \fi
+ \fi
+ % Now print the heading:
+ \if \headtype U%
+ \ifcase\absseclevel
+ \unnumberedzzz{#3}%
+ \or \unnumberedseczzz{#3}%
+ \or \unnumberedsubseczzz{#3}%
+ \or \unnumberedsubsubseczzz{#3}%
+ \fi
+ \else
+ \if \headtype A%
+ \ifcase\absseclevel
+ \appendixzzz{#3}%
+ \or \appendixsectionzzz{#3}%
+ \or \appendixsubseczzz{#3}%
+ \or \appendixsubsubseczzz{#3}%
+ \fi
+ \else
+ \ifcase\absseclevel
+ \chapterzzz{#3}%
+ \or \seczzz{#3}%
+ \or \numberedsubseczzz{#3}%
+ \or \numberedsubsubseczzz{#3}%
+ \fi
+ \fi
+ \fi
+ \suppressfirstparagraphindent
+}
+
+% an interface:
+\def\numhead{\genhead N}
+\def\apphead{\genhead A}
+\def\unnmhead{\genhead U}
+
+% @chapter, @appendix, @unnumbered. Increment top-level counter, reset
+% all lower-level sectioning counters to zero.
+%
+% Also set \chaplevelprefix, which we prepend to @float sequence numbers
+% (e.g., figures), q.v. By default (before any chapter), that is empty.
+\let\chaplevelprefix = \empty
+%
+\outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz
+\def\chapterzzz#1{%
+ % section resetting is \global in case the chapter is in a group, such
+ % as an @include file.
+ \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
+ \global\advance\chapno by 1
+ %
+ % Used for \float.
+ \gdef\chaplevelprefix{\the\chapno.}%
+ \resetallfloatnos
+ %
+ \message{\putwordChapter\space \the\chapno}%
+ %
+ % Write the actual heading.
+ \chapmacro{#1}{Ynumbered}{\the\chapno}%
+ %
+ % So @section and the like are numbered underneath this chapter.
+ \global\let\section = \numberedsec
+ \global\let\subsection = \numberedsubsec
+ \global\let\subsubsection = \numberedsubsubsec
+}
+
+\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls appendixzzz
+\def\appendixzzz#1{%
+ \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
+ \global\advance\appendixno by 1
+ \gdef\chaplevelprefix{\appendixletter.}%
+ \resetallfloatnos
+ %
+ \def\appendixnum{\putwordAppendix\space \appendixletter}%
+ \message{\appendixnum}%
+ %
+ \chapmacro{#1}{Yappendix}{\appendixletter}%
+ %
+ \global\let\section = \appendixsec
+ \global\let\subsection = \appendixsubsec
+ \global\let\subsubsection = \appendixsubsubsec
+}
+
+\outer\parseargdef\unnumbered{\unnmhead0{#1}} % normally unnmhead0 calls unnumberedzzz
+\def\unnumberedzzz#1{%
+ \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
+ \global\advance\unnumberedno by 1
+ %
+ % Since an unnumbered has no number, no prefix for figures.
+ \global\let\chaplevelprefix = \empty
+ \resetallfloatnos
+ %
+ % This used to be simply \message{#1}, but TeX fully expands the
+ % argument to \message. Therefore, if #1 contained @-commands, TeX
+ % expanded them. For example, in `@unnumbered The @cite{Book}', TeX
+ % expanded @cite (which turns out to cause errors because \cite is meant
+ % to be executed, not expanded).
+ %
+ % Anyway, we don't want the fully-expanded definition of @cite to appear
+ % as a result of the \message, we just want `@cite' itself. We use
+ % \the<toks register> to achieve this: TeX expands \the<toks> only once,
+ % simply yielding the contents of <toks register>. (We also do this for
+ % the toc entries.)
+ \toks0 = {#1}%
+ \message{(\the\toks0)}%
+ %
+ \chapmacro{#1}{Ynothing}{\the\unnumberedno}%
+ %
+ \global\let\section = \unnumberedsec
+ \global\let\subsection = \unnumberedsubsec
+ \global\let\subsubsection = \unnumberedsubsubsec
+}
+
+% @centerchap is like @unnumbered, but the heading is centered.
+\outer\parseargdef\centerchap{%
+ % Well, we could do the following in a group, but that would break
+ % an assumption that \chapmacro is called at the outermost level.
+ % Thus we are safer this way: --kasal, 24feb04
+ \let\centerparametersmaybe = \centerparameters
+ \unnmhead0{#1}%
+ \let\centerparametersmaybe = \relax
+}
+
+% @top is like @unnumbered.
+\let\top\unnumbered
+
+% Sections.
+\outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz
+\def\seczzz#1{%
+ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
+ \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}%
+}
+
+\outer\parseargdef\appendixsection{\apphead1{#1}} % normally calls appendixsectionzzz
+\def\appendixsectionzzz#1{%
+ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
+ \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}%
+}
+\let\appendixsec\appendixsection
+
+\outer\parseargdef\unnumberedsec{\unnmhead1{#1}} % normally calls unnumberedseczzz
+\def\unnumberedseczzz#1{%
+ \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1
+ \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}%
+}
+
+% Subsections.
+\outer\parseargdef\numberedsubsec{\numhead2{#1}} % normally calls numberedsubseczzz
+\def\numberedsubseczzz#1{%
+ \global\subsubsecno=0 \global\advance\subsecno by 1
+ \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}%
+}
+
+\outer\parseargdef\appendixsubsec{\apphead2{#1}} % normally calls appendixsubseczzz
+\def\appendixsubseczzz#1{%
+ \global\subsubsecno=0 \global\advance\subsecno by 1
+ \sectionheading{#1}{subsec}{Yappendix}%
+ {\appendixletter.\the\secno.\the\subsecno}%
+}
+
+\outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} %normally calls unnumberedsubseczzz
+\def\unnumberedsubseczzz#1{%
+ \global\subsubsecno=0 \global\advance\subsecno by 1
+ \sectionheading{#1}{subsec}{Ynothing}%
+ {\the\unnumberedno.\the\secno.\the\subsecno}%
+}
+
+% Subsubsections.
+\outer\parseargdef\numberedsubsubsec{\numhead3{#1}} % normally numberedsubsubseczzz
+\def\numberedsubsubseczzz#1{%
+ \global\advance\subsubsecno by 1
+ \sectionheading{#1}{subsubsec}{Ynumbered}%
+ {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}%
+}
+
+\outer\parseargdef\appendixsubsubsec{\apphead3{#1}} % normally appendixsubsubseczzz
+\def\appendixsubsubseczzz#1{%
+ \global\advance\subsubsecno by 1
+ \sectionheading{#1}{subsubsec}{Yappendix}%
+ {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}%
+}
+
+\outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} %normally unnumberedsubsubseczzz
+\def\unnumberedsubsubseczzz#1{%
+ \global\advance\subsubsecno by 1
+ \sectionheading{#1}{subsubsec}{Ynothing}%
+ {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}%
+}
+
+% These macros control what the section commands do, according
+% to what kind of chapter we are in (ordinary, appendix, or unnumbered).
+% Define them by default for a numbered chapter.
+\let\section = \numberedsec
+\let\subsection = \numberedsubsec
+\let\subsubsection = \numberedsubsubsec
+
+% Define @majorheading, @heading and @subheading
+
+% NOTE on use of \vbox for chapter headings, section headings, and such:
+% 1) We use \vbox rather than the earlier \line to permit
+% overlong headings to fold.
+% 2) \hyphenpenalty is set to 10000 because hyphenation in a
+% heading is obnoxious; this forbids it.
+% 3) Likewise, headings look best if no \parindent is used, and
+% if justification is not attempted. Hence \raggedright.
+
+\def\majorheading{%
+ {\advance\chapheadingskip by 10pt \chapbreak }%
+ \parsearg\chapheadingzzz
+}
+
+\def\chapheading{\chapbreak \parsearg\chapheadingzzz}
+\def\chapheadingzzz#1{%
+ {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt\ptexraggedright
+ \rmisbold #1\hfill}}%
+ \bigskip \par\penalty 200\relax
+ \suppressfirstparagraphindent
+}
+
+% @heading, @subheading, @subsubheading.
+\parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{}
+ \suppressfirstparagraphindent}
+\parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{}
+ \suppressfirstparagraphindent}
+\parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{}
+ \suppressfirstparagraphindent}
+
+% These macros generate a chapter, section, etc. heading only
+% (including whitespace, linebreaking, etc. around it),
+% given all the information in convenient, parsed form.
+
+%%% Args are the skip and penalty (usually negative)
+\def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi}
+
+%%% Define plain chapter starts, and page on/off switching for it
+% Parameter controlling skip before chapter headings (if needed)
+
+\newskip\chapheadingskip
+
+\def\chapbreak{\dobreak \chapheadingskip {-4000}}
+\def\chappager{\par\vfill\supereject}
+% Because \domark is called before \chapoddpage, the filler page will
+% get the headings for the next chapter, which is wrong. But we don't
+% care -- we just disable all headings on the filler page.
+\def\chapoddpage{%
+ \chappager
+ \ifodd\pageno \else
+ \begingroup
+ \evenheadline={\hfil}\evenfootline={\hfil}%
+ \oddheadline={\hfil}\oddfootline={\hfil}%
+ \hbox to 0pt{}%
+ \chappager
+ \endgroup
+ \fi
+}
+
+\def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname}
+
+\def\CHAPPAGoff{%
+\global\let\contentsalignmacro = \chappager
+\global\let\pchapsepmacro=\chapbreak
+\global\let\pagealignmacro=\chappager}
+
+\def\CHAPPAGon{%
+\global\let\contentsalignmacro = \chappager
+\global\let\pchapsepmacro=\chappager
+\global\let\pagealignmacro=\chappager
+\global\def\HEADINGSon{\HEADINGSsingle}}
+
+\def\CHAPPAGodd{%
+\global\let\contentsalignmacro = \chapoddpage
+\global\let\pchapsepmacro=\chapoddpage
+\global\let\pagealignmacro=\chapoddpage
+\global\def\HEADINGSon{\HEADINGSdouble}}
+
+\CHAPPAGon
+
+% Chapter opening.
+%
+% #1 is the text, #2 is the section type (Ynumbered, Ynothing,
+% Yappendix, Yomitfromtoc), #3 the chapter number.
+%
+% To test against our argument.
+\def\Ynothingkeyword{Ynothing}
+\def\Yomitfromtockeyword{Yomitfromtoc}
+\def\Yappendixkeyword{Yappendix}
+%
+\def\chapmacro#1#2#3{%
+ % Insert the first mark before the heading break (see notes for \domark).
+ \let\prevchapterdefs=\lastchapterdefs
+ \let\prevsectiondefs=\lastsectiondefs
+ \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}%
+ \gdef\thissection{}}%
+ %
+ \def\temptype{#2}%
+ \ifx\temptype\Ynothingkeyword
+ \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
+ \gdef\thischapter{\thischaptername}}%
+ \else\ifx\temptype\Yomitfromtockeyword
+ \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}%
+ \gdef\thischapter{}}%
+ \else\ifx\temptype\Yappendixkeyword
+ \toks0={#1}%
+ \xdef\lastchapterdefs{%
+ \gdef\noexpand\thischaptername{\the\toks0}%
+ \gdef\noexpand\thischapternum{\appendixletter}%
+ \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum:
+ \noexpand\thischaptername}%
+ }%
+ \else
+ \toks0={#1}%
+ \xdef\lastchapterdefs{%
+ \gdef\noexpand\thischaptername{\the\toks0}%
+ \gdef\noexpand\thischapternum{\the\chapno}%
+ \gdef\noexpand\thischapter{\putwordChapter{} \noexpand\thischapternum:
+ \noexpand\thischaptername}%
+ }%
+ \fi\fi\fi
+ %
+ % Output the mark. Pass it through \safewhatsit, to take care of
+ % the preceding space.
+ \safewhatsit\domark
+ %
+ % Insert the chapter heading break.
+ \pchapsepmacro
+ %
+ % Now the second mark, after the heading break. No break points
+ % between here and the heading.
+ \let\prevchapterdefs=\lastchapterdefs
+ \let\prevsectiondefs=\lastsectiondefs
+ \domark
+ %
+ {%
+ \chapfonts \rmisbold
+ %
+ % Have to define \lastsection before calling \donoderef, because the
+ % xref code eventually uses it. On the other hand, it has to be called
+ % after \pchapsepmacro, or the headline will change too soon.
+ \gdef\lastsection{#1}%
+ %
+ % Only insert the separating space if we have a chapter/appendix
+ % number, and don't print the unnumbered ``number''.
+ \ifx\temptype\Ynothingkeyword
+ \setbox0 = \hbox{}%
+ \def\toctype{unnchap}%
+ \else\ifx\temptype\Yomitfromtockeyword
+ \setbox0 = \hbox{}% contents like unnumbered, but no toc entry
+ \def\toctype{omit}%
+ \else\ifx\temptype\Yappendixkeyword
+ \setbox0 = \hbox{\putwordAppendix{} #3\enspace}%
+ \def\toctype{app}%
+ \else
+ \setbox0 = \hbox{#3\enspace}%
+ \def\toctype{numchap}%
+ \fi\fi\fi
+ %
+ % Write the toc entry for this chapter. Must come before the
+ % \donoderef, because we include the current node name in the toc
+ % entry, and \donoderef resets it to empty.
+ \writetocentry{\toctype}{#1}{#3}%
+ %
+ % For pdftex, we have to write out the node definition (aka, make
+ % the pdfdest) after any page break, but before the actual text has
+ % been typeset. If the destination for the pdf outline is after the
+ % text, then jumping from the outline may wind up with the text not
+ % being visible, for instance under high magnification.
+ \donoderef{#2}%
+ %
+ % Typeset the actual heading.
+ \nobreak % Avoid page breaks at the interline glue.
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
+ \hangindent=\wd0 \centerparametersmaybe
+ \unhbox0 #1\par}%
+ }%
+ \nobreak\bigskip % no page break after a chapter title
+ \nobreak
+}
+
+% @centerchap -- centered and unnumbered.
+\let\centerparametersmaybe = \relax
+\def\centerparameters{%
+ \advance\rightskip by 3\rightskip
+ \leftskip = \rightskip
+ \parfillskip = 0pt
+}
+
+
+% I don't think this chapter style is supported any more, so I'm not
+% updating it with the new noderef stuff. We'll see. --karl, 11aug03.
+%
+\def\setchapterstyle #1 {\csname CHAPF#1\endcsname}
+%
+\def\unnchfopen #1{%
+\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt\ptexraggedright
+ \rmisbold #1\hfill}}\bigskip \par\nobreak
+}
+\def\chfopen #1#2{\chapoddpage {\chapfonts
+\vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
+\par\penalty 5000 %
+}
+\def\centerchfopen #1{%
+\chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
+ \parindent=0pt
+ \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
+}
+\def\CHAPFopen{%
+ \global\let\chapmacro=\chfopen
+ \global\let\centerchapmacro=\centerchfopen}
+
+
+% Section titles. These macros combine the section number parts and
+% call the generic \sectionheading to do the printing.
+%
+\newskip\secheadingskip
+\def\secheadingbreak{\dobreak \secheadingskip{-1000}}
+
+% Subsection titles.
+\newskip\subsecheadingskip
+\def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}}
+
+% Subsubsection titles.
+\def\subsubsecheadingskip{\subsecheadingskip}
+\def\subsubsecheadingbreak{\subsecheadingbreak}
+
+
+% Print any size, any type, section title.
+%
+% #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is
+% the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the
+% section number.
+%
+\def\seckeyword{sec}
+%
+\def\sectionheading#1#2#3#4{%
+ {%
+ % Switch to the right set of fonts.
+ \csname #2fonts\endcsname \rmisbold
+ %
+ \def\sectionlevel{#2}%
+ \def\temptype{#3}%
+ %
+ % Insert first mark before the heading break (see notes for \domark).
+ \let\prevsectiondefs=\lastsectiondefs
+ \ifx\temptype\Ynothingkeyword
+ \ifx\sectionlevel\seckeyword
+ \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}%
+ \gdef\thissection{\thissectionname}}%
+ \fi
+ \else\ifx\temptype\Yomitfromtockeyword
+ % Don't redefine \thissection.
+ \else\ifx\temptype\Yappendixkeyword
+ \ifx\sectionlevel\seckeyword
+ \toks0={#1}%
+ \xdef\lastsectiondefs{%
+ \gdef\noexpand\thissectionname{\the\toks0}%
+ \gdef\noexpand\thissectionnum{#4}%
+ \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum:
+ \noexpand\thissectionname}%
+ }%
+ \fi
+ \else
+ \ifx\sectionlevel\seckeyword
+ \toks0={#1}%
+ \xdef\lastsectiondefs{%
+ \gdef\noexpand\thissectionname{\the\toks0}%
+ \gdef\noexpand\thissectionnum{#4}%
+ \gdef\noexpand\thissection{\putwordSection{} \noexpand\thissectionnum:
+ \noexpand\thissectionname}%
+ }%
+ \fi
+ \fi\fi\fi
+ %
+ % Go into vertical mode. Usually we'll already be there, but we
+ % don't want the following whatsit to end up in a preceding paragraph
+ % if the document didn't happen to have a blank line.
+ \par
+ %
+ % Output the mark. Pass it through \safewhatsit, to take care of
+ % the preceding space.
+ \safewhatsit\domark
+ %
+ % Insert space above the heading.
+ \csname #2headingbreak\endcsname
+ %
+ % Now the second mark, after the heading break. No break points
+ % between here and the heading.
+ \let\prevsectiondefs=\lastsectiondefs
+ \domark
+ %
+ % Only insert the space after the number if we have a section number.
+ \ifx\temptype\Ynothingkeyword
+ \setbox0 = \hbox{}%
+ \def\toctype{unn}%
+ \gdef\lastsection{#1}%
+ \else\ifx\temptype\Yomitfromtockeyword
+ % for @headings -- no section number, don't include in toc,
+ % and don't redefine \lastsection.
+ \setbox0 = \hbox{}%
+ \def\toctype{omit}%
+ \let\sectionlevel=\empty
+ \else\ifx\temptype\Yappendixkeyword
+ \setbox0 = \hbox{#4\enspace}%
+ \def\toctype{app}%
+ \gdef\lastsection{#1}%
+ \else
+ \setbox0 = \hbox{#4\enspace}%
+ \def\toctype{num}%
+ \gdef\lastsection{#1}%
+ \fi\fi\fi
+ %
+ % Write the toc entry (before \donoderef). See comments in \chapmacro.
+ \writetocentry{\toctype\sectionlevel}{#1}{#4}%
+ %
+ % Write the node reference (= pdf destination for pdftex).
+ % Again, see comments in \chapmacro.
+ \donoderef{#3}%
+ %
+ % Interline glue will be inserted when the vbox is completed.
+ % That glue will be a valid breakpoint for the page, since it'll be
+ % preceded by a whatsit (usually from the \donoderef, or from the
+ % \writetocentry if there was no node). We don't want to allow that
+ % break, since then the whatsits could end up on page n while the
+ % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000.
+ \nobreak
+ %
+ % Output the actual section heading.
+ \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
+ \hangindent=\wd0 % zero if no section number
+ \unhbox0 #1}%
+ }%
+ % Add extra space after the heading -- half of whatever came above it.
+ % Don't allow stretch, though.
+ \kern .5 \csname #2headingskip\endcsname
+ %
+ % Do not let the kern be a potential breakpoint, as it would be if it
+ % was followed by glue.
+ \nobreak
+ %
+ % We'll almost certainly start a paragraph next, so don't let that
+ % glue accumulate. (Not a breakpoint because it's preceded by a
+ % discardable item.)
+ \vskip-\parskip
+ %
+ % This is purely so the last item on the list is a known \penalty >
+ % 10000. This is so \startdefun can avoid allowing breakpoints after
+ % section headings. Otherwise, it would insert a valid breakpoint between:
+ %
+ % @section sec-whatever
+ % @deffn def-whatever
+ \penalty 10001
+}
+
+
+\message{toc,}
+% Table of contents.
+\newwrite\tocfile
+
+% Write an entry to the toc file, opening it if necessary.
+% Called from @chapter, etc.
+%
+% Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno}
+% We append the current node name (if any) and page number as additional
+% arguments for the \{chap,sec,...}entry macros which will eventually
+% read this. The node name is used in the pdf outlines as the
+% destination to jump to.
+%
+% We open the .toc file for writing here instead of at @setfilename (or
+% any other fixed time) so that @contents can be anywhere in the document.
+% But if #1 is `omit', then we don't do anything. This is used for the
+% table of contents chapter openings themselves.
+%
+\newif\iftocfileopened
+\def\omitkeyword{omit}%
+%
+\def\writetocentry#1#2#3{%
+ \edef\writetoctype{#1}%
+ \ifx\writetoctype\omitkeyword \else
+ \iftocfileopened\else
+ \immediate\openout\tocfile = \jobname.toc
+ \global\tocfileopenedtrue
+ \fi
+ %
+ \iflinks
+ {\atdummies
+ \edef\temp{%
+ \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}%
+ \temp
+ }%
+ \fi
+ \fi
+ %
+ % Tell \shipout to create a pdf destination on each page, if we're
+ % writing pdf. These are used in the table of contents. We can't
+ % just write one on every page because the title pages are numbered
+ % 1 and 2 (the page numbers aren't printed), and so are the first
+ % two pages of the document. Thus, we'd have two destinations named
+ % `1', and two named `2'.
+ \ifpdf \global\pdfmakepagedesttrue \fi
+}
+
+
+% These characters do not print properly in the Computer Modern roman
+% fonts, so we must take special care. This is more or less redundant
+% with the Texinfo input format setup at the end of this file.
+%
+\def\activecatcodes{%
+ \catcode`\"=\active
+ \catcode`\$=\active
+ \catcode`\<=\active
+ \catcode`\>=\active
+ \catcode`\\=\active
+ \catcode`\^=\active
+ \catcode`\_=\active
+ \catcode`\|=\active
+ \catcode`\~=\active
+}
+
+
+% Read the toc file, which is essentially Texinfo input.
+\def\readtocfile{%
+ \setupdatafile
+ \activecatcodes
+ \input \tocreadfilename
+}
+
+\newskip\contentsrightmargin \contentsrightmargin=1in
+\newcount\savepageno
+\newcount\lastnegativepageno \lastnegativepageno = -1
+
+% Prepare to read what we've written to \tocfile.
+%
+\def\startcontents#1{%
+ % If @setchapternewpage on, and @headings double, the contents should
+ % start on an odd page, unlike chapters. Thus, we maintain
+ % \contentsalignmacro in parallel with \pagealignmacro.
+ % From: Torbjorn Granlund <tege@matematik.su.se>
+ \contentsalignmacro
+ \immediate\closeout\tocfile
+ %
+ % Don't need to put `Contents' or `Short Contents' in the headline.
+ % It is abundantly clear what they are.
+ \chapmacro{#1}{Yomitfromtoc}{}%
+ %
+ \savepageno = \pageno
+ \begingroup % Set up to handle contents files properly.
+ \raggedbottom % Worry more about breakpoints than the bottom.
+ \advance\hsize by -\contentsrightmargin % Don't use the full line length.
+ %
+ % Roman numerals for page numbers.
+ \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi
+}
+
+% redefined for the two-volume lispref. We always output on
+% \jobname.toc even if this is redefined.
+%
+\def\tocreadfilename{\jobname.toc}
+
+% Normal (long) toc.
+%
+\def\contents{%
+ \startcontents{\putwordTOC}%
+ \openin 1 \tocreadfilename\space
+ \ifeof 1 \else
+ \readtocfile
+ \fi
+ \vfill \eject
+ \contentsalignmacro % in case @setchapternewpage odd is in effect
+ \ifeof 1 \else
+ \pdfmakeoutlines
+ \fi
+ \closein 1
+ \endgroup
+ \lastnegativepageno = \pageno
+ \global\pageno = \savepageno
+}
+
+% And just the chapters.
+\def\summarycontents{%
+ \startcontents{\putwordShortTOC}%
+ %
+ \let\numchapentry = \shortchapentry
+ \let\appentry = \shortchapentry
+ \let\unnchapentry = \shortunnchapentry
+ % We want a true roman here for the page numbers.
+ \secfonts
+ \let\rm=\shortcontrm \let\bf=\shortcontbf
+ \let\sl=\shortcontsl \let\tt=\shortconttt
+ \rm
+ \hyphenpenalty = 10000
+ \advance\baselineskip by 1pt % Open it up a little.
+ \def\numsecentry##1##2##3##4{}
+ \let\appsecentry = \numsecentry
+ \let\unnsecentry = \numsecentry
+ \let\numsubsecentry = \numsecentry
+ \let\appsubsecentry = \numsecentry
+ \let\unnsubsecentry = \numsecentry
+ \let\numsubsubsecentry = \numsecentry
+ \let\appsubsubsecentry = \numsecentry
+ \let\unnsubsubsecentry = \numsecentry
+ \openin 1 \tocreadfilename\space
+ \ifeof 1 \else
+ \readtocfile
+ \fi
+ \closein 1
+ \vfill \eject
+ \contentsalignmacro % in case @setchapternewpage odd is in effect
+ \endgroup
+ \lastnegativepageno = \pageno
+ \global\pageno = \savepageno
+}
+\let\shortcontents = \summarycontents
+
+% Typeset the label for a chapter or appendix for the short contents.
+% The arg is, e.g., `A' for an appendix, or `3' for a chapter.
+%
+\def\shortchaplabel#1{%
+ % This space should be enough, since a single number is .5em, and the
+ % widest letter (M) is 1em, at least in the Computer Modern fonts.
+ % But use \hss just in case.
+ % (This space doesn't include the extra space that gets added after
+ % the label; that gets put in by \shortchapentry above.)
+ %
+ % We'd like to right-justify chapter numbers, but that looks strange
+ % with appendix letters. And right-justifying numbers and
+ % left-justifying letters looks strange when there is less than 10
+ % chapters. Have to read the whole toc once to know how many chapters
+ % there are before deciding ...
+ \hbox to 1em{#1\hss}%
+}
+
+% These macros generate individual entries in the table of contents.
+% The first argument is the chapter or section name.
+% The last argument is the page number.
+% The arguments in between are the chapter number, section number, ...
+
+% Chapters, in the main contents.
+\def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
+%
+% Chapters, in the short toc.
+% See comments in \dochapentry re vbox and related settings.
+\def\shortchapentry#1#2#3#4{%
+ \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}%
+}
+
+% Appendices, in the main contents.
+% Need the word Appendix, and a fixed-size box.
+%
+\def\appendixbox#1{%
+ % We use M since it's probably the widest letter.
+ \setbox0 = \hbox{\putwordAppendix{} M}%
+ \hbox to \wd0{\putwordAppendix{} #1\hss}}
+%
+\def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}}
+
+% Unnumbered chapters.
+\def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}}
+\def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}}
+
+% Sections.
+\def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}}
+\let\appsecentry=\numsecentry
+\def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}}
+
+% Subsections.
+\def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}}
+\let\appsubsecentry=\numsubsecentry
+\def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}}
+
+% And subsubsections.
+\def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}}
+\let\appsubsubsecentry=\numsubsubsecentry
+\def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}}
+
+% This parameter controls the indentation of the various levels.
+% Same as \defaultparindent.
+\newdimen\tocindent \tocindent = 15pt
+
+% Now for the actual typesetting. In all these, #1 is the text and #2 is the
+% page number.
+%
+% If the toc has to be broken over pages, we want it to be at chapters
+% if at all possible; hence the \penalty.
+\def\dochapentry#1#2{%
+ \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip
+ \begingroup
+ \chapentryfonts
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+ \endgroup
+ \nobreak\vskip .25\baselineskip plus.1\baselineskip
+}
+
+\def\dosecentry#1#2{\begingroup
+ \secentryfonts \leftskip=\tocindent
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+\endgroup}
+
+\def\dosubsecentry#1#2{\begingroup
+ \subsecentryfonts \leftskip=2\tocindent
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+\endgroup}
+
+\def\dosubsubsecentry#1#2{\begingroup
+ \subsubsecentryfonts \leftskip=3\tocindent
+ \tocentry{#1}{\dopageno\bgroup#2\egroup}%
+\endgroup}
+
+% We use the same \entry macro as for the index entries.
+\let\tocentry = \entry
+
+% Space between chapter (or whatever) number and the title.
+\def\labelspace{\hskip1em \relax}
+
+\def\dopageno#1{{\rm #1}}
+\def\doshortpageno#1{{\rm #1}}
+
+\def\chapentryfonts{\secfonts \rm}
+\def\secentryfonts{\textfonts}
+\def\subsecentryfonts{\textfonts}
+\def\subsubsecentryfonts{\textfonts}
+
+
+\message{environments,}
+% @foo ... @end foo.
+
+% @tex ... @end tex escapes into raw Tex temporarily.
+% One exception: @ is still an escape character, so that @end tex works.
+% But \@ or @@ will get a plain tex @ character.
+
+\envdef\tex{%
+ \setupmarkupstyle{tex}%
+ \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
+ \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
+ \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
+ \catcode `\%=14
+ \catcode `\+=\other
+ \catcode `\"=\other
+ \catcode `\|=\other
+ \catcode `\<=\other
+ \catcode `\>=\other
+ \catcode`\`=\other
+ \catcode`\'=\other
+ \escapechar=`\\
+ %
+ \let\b=\ptexb
+ \let\bullet=\ptexbullet
+ \let\c=\ptexc
+ \let\,=\ptexcomma
+ \let\.=\ptexdot
+ \let\dots=\ptexdots
+ \let\equiv=\ptexequiv
+ \let\!=\ptexexclam
+ \let\i=\ptexi
+ \let\indent=\ptexindent
+ \let\noindent=\ptexnoindent
+ \let\{=\ptexlbrace
+ \let\+=\tabalign
+ \let\}=\ptexrbrace
+ \let\/=\ptexslash
+ \let\*=\ptexstar
+ \let\t=\ptext
+ \expandafter \let\csname top\endcsname=\ptextop % outer
+ \let\frenchspacing=\plainfrenchspacing
+ %
+ \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}%
+ \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}%
+ \def\@{@}%
+}
+% There is no need to define \Etex.
+
+% Define @lisp ... @end lisp.
+% @lisp environment forms a group so it can rebind things,
+% including the definition of @end lisp (which normally is erroneous).
+
+% Amount to narrow the margins by for @lisp.
+\newskip\lispnarrowing \lispnarrowing=0.4in
+
+% This is the definition that ^^M gets inside @lisp, @example, and other
+% such environments. \null is better than a space, since it doesn't
+% have any width.
+\def\lisppar{\null\endgraf}
+
+% This space is always present above and below environments.
+\newskip\envskipamount \envskipamount = 0pt
+
+% Make spacing and below environment symmetrical. We use \parskip here
+% to help in doing that, since in @example-like environments \parskip
+% is reset to zero; thus the \afterenvbreak inserts no space -- but the
+% start of the next paragraph will insert \parskip.
+%
+\def\aboveenvbreak{{%
+ % =10000 instead of <10000 because of a special case in \itemzzz and
+ % \sectionheading, q.v.
+ \ifnum \lastpenalty=10000 \else
+ \advance\envskipamount by \parskip
+ \endgraf
+ \ifdim\lastskip<\envskipamount
+ \removelastskip
+ % it's not a good place to break if the last penalty was \nobreak
+ % or better ...
+ \ifnum\lastpenalty<10000 \penalty-50 \fi
+ \vskip\envskipamount
+ \fi
+ \fi
+}}
+
+\let\afterenvbreak = \aboveenvbreak
+
+% \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will
+% also clear it, so that its embedded environments do the narrowing again.
+\let\nonarrowing=\relax
+
+% @cartouche ... @end cartouche: draw rectangle w/rounded corners around
+% environment contents.
+\font\circle=lcircle10
+\newdimen\circthick
+\newdimen\cartouter\newdimen\cartinner
+\newskip\normbskip\newskip\normpskip\newskip\normlskip
+\circthick=\fontdimen8\circle
+%
+\def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth
+\def\ctr{{\hskip 6pt\circle\char'010}}
+\def\cbl{{\circle\char'012\hskip -6pt}}
+\def\cbr{{\hskip 6pt\circle\char'011}}
+\def\carttop{\hbox to \cartouter{\hskip\lskip
+ \ctl\leaders\hrule height\circthick\hfil\ctr
+ \hskip\rskip}}
+\def\cartbot{\hbox to \cartouter{\hskip\lskip
+ \cbl\leaders\hrule height\circthick\hfil\cbr
+ \hskip\rskip}}
+%
+\newskip\lskip\newskip\rskip
+
+\envdef\cartouche{%
+ \ifhmode\par\fi % can't be in the midst of a paragraph.
+ \startsavinginserts
+ \lskip=\leftskip \rskip=\rightskip
+ \leftskip=0pt\rightskip=0pt % we want these *outside*.
+ \cartinner=\hsize \advance\cartinner by-\lskip
+ \advance\cartinner by-\rskip
+ \cartouter=\hsize
+ \advance\cartouter by 18.4pt % allow for 3pt kerns on either
+ % side, and for 6pt waste from
+ % each corner char, and rule thickness
+ \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip
+ % Flag to tell @lisp, etc., not to narrow margin.
+ \let\nonarrowing = t%
+ \vbox\bgroup
+ \baselineskip=0pt\parskip=0pt\lineskip=0pt
+ \carttop
+ \hbox\bgroup
+ \hskip\lskip
+ \vrule\kern3pt
+ \vbox\bgroup
+ \kern3pt
+ \hsize=\cartinner
+ \baselineskip=\normbskip
+ \lineskip=\normlskip
+ \parskip=\normpskip
+ \vskip -\parskip
+ \comment % For explanation, see the end of \def\group.
+}
+\def\Ecartouche{%
+ \ifhmode\par\fi
+ \kern3pt
+ \egroup
+ \kern3pt\vrule
+ \hskip\rskip
+ \egroup
+ \cartbot
+ \egroup
+ \checkinserts
+}
+
+
+% This macro is called at the beginning of all the @example variants,
+% inside a group.
+\newdimen\nonfillparindent
+\def\nonfillstart{%
+ \aboveenvbreak
+ \hfuzz = 12pt % Don't be fussy
+ \sepspaces % Make spaces be word-separators rather than space tokens.
+ \let\par = \lisppar % don't ignore blank lines
+ \obeylines % each line of input is a line of output
+ \parskip = 0pt
+ % Turn off paragraph indentation but redefine \indent to emulate
+ % the normal \indent.
+ \nonfillparindent=\parindent
+ \parindent = 0pt
+ \let\indent\nonfillindent
+ %
+ \emergencystretch = 0pt % don't try to avoid overfull boxes
+ \ifx\nonarrowing\relax
+ \advance \leftskip by \lispnarrowing
+ \exdentamount=\lispnarrowing
+ \else
+ \let\nonarrowing = \relax
+ \fi
+ \let\exdent=\nofillexdent
+}
+
+\begingroup
+\obeyspaces
+% We want to swallow spaces (but not other tokens) after the fake
+% @indent in our nonfill-environments, where spaces are normally
+% active and set to @tie, resulting in them not being ignored after
+% @indent.
+\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
+\gdef\nonfillindentcheck{%
+\ifx\temp %
+\expandafter\nonfillindentgobble%
+\else%
+\leavevmode\nonfillindentbox%
+\fi%
+}%
+\endgroup
+\def\nonfillindentgobble#1{\nonfillindent}
+\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}}
+
+% If you want all examples etc. small: @set dispenvsize small.
+% If you want even small examples the full size: @set dispenvsize nosmall.
+% This affects the following displayed environments:
+% @example, @display, @format, @lisp
+%
+\def\smallword{small}
+\def\nosmallword{nosmall}
+\let\SETdispenvsize\relax
+\def\setnormaldispenv{%
+ \ifx\SETdispenvsize\smallword
+ % end paragraph for sake of leading, in case document has no blank
+ % line. This is redundant with what happens in \aboveenvbreak, but
+ % we need to do it before changing the fonts, and it's inconvenient
+ % to change the fonts afterward.
+ \ifnum \lastpenalty=10000 \else \endgraf \fi
+ \smallexamplefonts \rm
+ \fi
+}
+\def\setsmalldispenv{%
+ \ifx\SETdispenvsize\nosmallword
+ \else
+ \ifnum \lastpenalty=10000 \else \endgraf \fi
+ \smallexamplefonts \rm
+ \fi
+}
+
+% We often define two environments, @foo and @smallfoo.
+% Let's do it by one command:
+\def\makedispenv #1#2{
+ \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}
+ \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}
+ \expandafter\let\csname E#1\endcsname \afterenvbreak
+ \expandafter\let\csname Esmall#1\endcsname \afterenvbreak
+}
+
+% Define two synonyms:
+\def\maketwodispenvs #1#2#3{
+ \makedispenv{#1}{#3}
+ \makedispenv{#2}{#3}
+}
+
+% @lisp: indented, narrowed, typewriter font; @example: same as @lisp.
+%
+% @smallexample and @smalllisp: use smaller fonts.
+% Originally contributed by Pavel@xerox.
+%
+\maketwodispenvs {lisp}{example}{%
+ \nonfillstart
+ \tt\setupmarkupstyle{example}%
+ \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
+ \gobble % eat return
+}
+% @display/@smalldisplay: same as @lisp except keep current font.
+%
+\makedispenv {display}{%
+ \nonfillstart
+ \gobble
+}
+
+% @format/@smallformat: same as @display except don't narrow margins.
+%
+\makedispenv{format}{%
+ \let\nonarrowing = t%
+ \nonfillstart
+ \gobble
+}
+
+% @flushleft: same as @format, but doesn't obey \SETdispenvsize.
+\envdef\flushleft{%
+ \let\nonarrowing = t%
+ \nonfillstart
+ \gobble
+}
+\let\Eflushleft = \afterenvbreak
+
+% @flushright.
+%
+\envdef\flushright{%
+ \let\nonarrowing = t%
+ \nonfillstart
+ \advance\leftskip by 0pt plus 1fill
+ \gobble
+}
+\let\Eflushright = \afterenvbreak
+
+
+% @raggedright does more-or-less normal line breaking but no right
+% justification. From plain.tex.
+\envdef\raggedright{%
+ \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
+}
+\let\Eraggedright\par
+
+\envdef\raggedleft{%
+ \parindent=0pt \leftskip0pt plus2em
+ \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
+ \hbadness=10000 % Last line will usually be underfull, so turn off
+ % badness reporting.
+}
+\let\Eraggedleft\par
+
+\envdef\raggedcenter{%
+ \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em
+ \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
+ \hbadness=10000 % Last line will usually be underfull, so turn off
+ % badness reporting.
+}
+\let\Eraggedcenter\par
+
+
+% @quotation does normal linebreaking (hence we can't use \nonfillstart)
+% and narrows the margins. We keep \parskip nonzero in general, since
+% we're doing normal filling. So, when using \aboveenvbreak and
+% \afterenvbreak, temporarily make \parskip 0.
+%
+\def\quotationstart{%
+ {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
+ \parindent=0pt
+ %
+ % @cartouche defines \nonarrowing to inhibit narrowing at next level down.
+ \ifx\nonarrowing\relax
+ \advance\leftskip by \lispnarrowing
+ \advance\rightskip by \lispnarrowing
+ \exdentamount = \lispnarrowing
+ \else
+ \let\nonarrowing = \relax
+ \fi
+ \parsearg\quotationlabel
+}
+
+\envdef\quotation{%
+ \setnormaldispenv
+ \quotationstart
+}
+
+\envdef\smallquotation{%
+ \setsmalldispenv
+ \quotationstart
+}
+\let\Esmallquotation = \Equotation
+
+% We have retained a nonzero parskip for the environment, since we're
+% doing normal filling.
+%
+\def\Equotation{%
+ \par
+ \ifx\quotationauthor\undefined\else
+ % indent a bit.
+ \leftline{\kern 2\leftskip \sl ---\quotationauthor}%
+ \fi
+ {\parskip=0pt \afterenvbreak}%
+}
+
+% If we're given an argument, typeset it in bold with a colon after.
+\def\quotationlabel#1{%
+ \def\temp{#1}%
+ \ifx\temp\empty \else
+ {\bf #1: }%
+ \fi
+}
+
+
+% LaTeX-like @verbatim...@end verbatim and @verb{<char>...<char>}
+% If we want to allow any <char> as delimiter,
+% we need the curly braces so that makeinfo sees the @verb command, eg:
+% `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org
+%
+% [Knuth]: Donald Ervin Knuth, 1996. The TeXbook.
+%
+% [Knuth] p.344; only we need to do the other characters Texinfo sets
+% active too. Otherwise, they get lost as the first character on a
+% verbatim line.
+\def\dospecials{%
+ \do\ \do\\\do\{\do\}\do\$\do\&%
+ \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
+ \do\<\do\>\do\|\do\@\do+\do\"%
+ % Don't do the quotes -- if we do, @set txicodequoteundirected and
+ % @set txicodequotebacktick will not have effect on @verb and
+ % @verbatim, and ?` and !` ligatures won't get disabled.
+ %\do\`\do\'%
+}
+%
+% [Knuth] p. 380
+\def\uncatcodespecials{%
+ \def\do##1{\catcode`##1=\other}\dospecials}
+%
+% Setup for the @verb command.
+%
+% Eight spaces for a tab
+\begingroup
+ \catcode`\^^I=\active
+ \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }}
+\endgroup
+%
+\def\setupverb{%
+ \tt % easiest (and conventionally used) font for verbatim
+ \def\par{\leavevmode\endgraf}%
+ \setupmarkupstyle{verb}%
+ \tabeightspaces
+ % Respect line breaks,
+ % print special symbols as themselves, and
+ % make each space count
+ % must do in this order:
+ \obeylines \uncatcodespecials \sepspaces
+}
+
+% Setup for the @verbatim environment
+%
+% Real tab expansion
+\newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
+%
+\def\starttabbox{\setbox0=\hbox\bgroup}
+%
+\begingroup
+ \catcode`\^^I=\active
+ \gdef\tabexpand{%
+ \catcode`\^^I=\active
+ \def^^I{\leavevmode\egroup
+ \dimen0=\wd0 % the width so far, or since the previous tab
+ \divide\dimen0 by\tabw
+ \multiply\dimen0 by\tabw % compute previous multiple of \tabw
+ \advance\dimen0 by\tabw % advance to next multiple of \tabw
+ \wd0=\dimen0 \box0 \starttabbox
+ }%
+ }
+\endgroup
+
+% start the verbatim environment.
+\def\setupverbatim{%
+ \let\nonarrowing = t%
+ \nonfillstart
+ % Easiest (and conventionally used) font for verbatim
+ \tt
+ \def\par{\leavevmode\egroup\box0\endgraf}%
+ \tabexpand
+ \setupmarkupstyle{verbatim}%
+ % Respect line breaks,
+ % print special symbols as themselves, and
+ % make each space count
+ % must do in this order:
+ \obeylines \uncatcodespecials \sepspaces
+ \everypar{\starttabbox}%
+}
+
+% Do the @verb magic: verbatim text is quoted by unique
+% delimiter characters. Before first delimiter expect a
+% right brace, after last delimiter expect closing brace:
+%
+% \def\doverb'{'<char>#1<char>'}'{#1}
+%
+% [Knuth] p. 382; only eat outer {}
+\begingroup
+ \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other
+ \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next]
+\endgroup
+%
+\def\verb{\begingroup\setupverb\doverb}
+%
+%
+% Do the @verbatim magic: define the macro \doverbatim so that
+% the (first) argument ends when '@end verbatim' is reached, ie:
+%
+% \def\doverbatim#1@end verbatim{#1}
+%
+% For Texinfo it's a lot easier than for LaTeX,
+% because texinfo's \verbatim doesn't stop at '\end{verbatim}':
+% we need not redefine '\', '{' and '}'.
+%
+% Inspired by LaTeX's verbatim command set [latex.ltx]
+%
+\begingroup
+ \catcode`\ =\active
+ \obeylines %
+ % ignore everything up to the first ^^M, that's the newline at the end
+ % of the @verbatim input line itself. Otherwise we get an extra blank
+ % line in the output.
+ \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}%
+ % We really want {...\end verbatim} in the body of the macro, but
+ % without the active space; thus we have to use \xdef and \gobble.
+\endgroup
+%
+\envdef\verbatim{%
+ \setupverbatim\doverbatim
+}
+\let\Everbatim = \afterenvbreak
+
+
+% @verbatiminclude FILE - insert text of file in verbatim environment.
+%
+\def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude}
+%
+\def\doverbatiminclude#1{%
+ {%
+ \makevalueexpandable
+ \setupverbatim
+ \indexnofonts % Allow `@@' and other weird things in file names.
+ \input #1
+ \afterenvbreak
+ }%
+}
+
+% @copying ... @end copying.
+% Save the text away for @insertcopying later.
+%
+% We save the uninterpreted tokens, rather than creating a box.
+% Saving the text in a box would be much easier, but then all the
+% typesetting commands (@smallbook, font changes, etc.) have to be done
+% beforehand -- and a) we want @copying to be done first in the source
+% file; b) letting users define the frontmatter in as flexible order as
+% possible is very desirable.
+%
+\def\copying{\checkenv{}\begingroup\scanargctxt\docopying}
+\def\docopying#1@end copying{\endgroup\def\copyingtext{#1}}
+%
+\def\insertcopying{%
+ \begingroup
+ \parindent = 0pt % paragraph indentation looks wrong on title page
+ \scanexp\copyingtext
+ \endgroup
+}
+
+
+\message{defuns,}
+% @defun etc.
+
+\newskip\defbodyindent \defbodyindent=.4in
+\newskip\defargsindent \defargsindent=50pt
+\newskip\deflastargmargin \deflastargmargin=18pt
+\newcount\defunpenalty
+
+% Start the processing of @deffn:
+\def\startdefun{%
+ \ifnum\lastpenalty<10000
+ \medbreak
+ \defunpenalty=10003 % Will keep this @deffn together with the
+ % following @def command, see below.
+ \else
+ % If there are two @def commands in a row, we'll have a \nobreak,
+ % which is there to keep the function description together with its
+ % header. But if there's nothing but headers, we need to allow a
+ % break somewhere. Check specifically for penalty 10002, inserted
+ % by \printdefunline, instead of 10000, since the sectioning
+ % commands also insert a nobreak penalty, and we don't want to allow
+ % a break between a section heading and a defun.
+ %
+ % As a minor refinement, we avoid "club" headers by signalling
+ % with penalty of 10003 after the very first @deffn in the
+ % sequence (see above), and penalty of 10002 after any following
+ % @def command.
+ \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi
+ %
+ % Similarly, after a section heading, do not allow a break.
+ % But do insert the glue.
+ \medskip % preceded by discardable penalty, so not a breakpoint
+ \fi
+ %
+ \parindent=0in
+ \advance\leftskip by \defbodyindent
+ \exdentamount=\defbodyindent
+}
+
+\def\dodefunx#1{%
+ % First, check whether we are in the right environment:
+ \checkenv#1%
+ %
+ % As above, allow line break if we have multiple x headers in a row.
+ % It's not a great place, though.
+ \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi
+ %
+ % And now, it's time to reuse the body of the original defun:
+ \expandafter\gobbledefun#1%
+}
+\def\gobbledefun#1\startdefun{}
+
+% \printdefunline \deffnheader{text}
+%
+\def\printdefunline#1#2{%
+ \begingroup
+ % call \deffnheader:
+ #1#2 \endheader
+ % common ending:
+ \interlinepenalty = 10000
+ \advance\rightskip by 0pt plus 1fil
+ \endgraf
+ \nobreak\vskip -\parskip
+ \penalty\defunpenalty % signal to \startdefun and \dodefunx
+ % Some of the @defun-type tags do not enable magic parentheses,
+ % rendering the following check redundant. But we don't optimize.
+ \checkparencounts
+ \endgroup
+}
+
+\def\Edefun{\endgraf\medbreak}
+
+% \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
+% the only thing remaining is to define \deffnheader.
+%
+\def\makedefun#1{%
+ \expandafter\let\csname E#1\endcsname = \Edefun
+ \edef\temp{\noexpand\domakedefun
+ \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}%
+ \temp
+}
+
+% \domakedefun \deffn \deffnx \deffnheader
+%
+% Define \deffn and \deffnx, without parameters.
+% \deffnheader has to be defined explicitly.
+%
+\def\domakedefun#1#2#3{%
+ \envdef#1{%
+ \startdefun
+ \parseargusing\activeparens{\printdefunline#3}%
+ }%
+ \def#2{\dodefunx#1}%
+ \def#3%
+}
+
+%%% Untyped functions:
+
+% @deffn category name args
+\makedefun{deffn}{\deffngeneral{}}
+
+% @deffn category class name args
+\makedefun{defop}#1 {\defopon{#1\ \putwordon}}
+
+% \defopon {category on}class name args
+\def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
+
+% \deffngeneral {subind}category name args
+%
+\def\deffngeneral#1#2 #3 #4\endheader{%
+ % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}.
+ \dosubind{fn}{\code{#3}}{#1}%
+ \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}%
+}
+
+%%% Typed functions:
+
+% @deftypefn category type name args
+\makedefun{deftypefn}{\deftypefngeneral{}}
+
+% @deftypeop category class type name args
+\makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}}
+
+% \deftypeopon {category on}class type name args
+\def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} }
+
+% \deftypefngeneral {subind}category type name args
+%
+\def\deftypefngeneral#1#2 #3 #4 #5\endheader{%
+ \dosubind{fn}{\code{#4}}{#1}%
+ \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
+}
+
+%%% Typed variables:
+
+% @deftypevr category type var args
+\makedefun{deftypevr}{\deftypecvgeneral{}}
+
+% @deftypecv category class type var args
+\makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}}
+
+% \deftypecvof {category of}class type var args
+\def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} }
+
+% \deftypecvgeneral {subind}category type var args
+%
+\def\deftypecvgeneral#1#2 #3 #4 #5\endheader{%
+ \dosubind{vr}{\code{#4}}{#1}%
+ \defname{#2}{#3}{#4}\defunargs{#5\unskip}%
+}
+
+%%% Untyped variables:
+
+% @defvr category var args
+\makedefun{defvr}#1 {\deftypevrheader{#1} {} }
+
+% @defcv category class var args
+\makedefun{defcv}#1 {\defcvof{#1\ \putwordof}}
+
+% \defcvof {category of}class var args
+\def\defcvof#1#2 {\deftypecvof{#1}#2 {} }
+
+%%% Type:
+% @deftp category name args
+\makedefun{deftp}#1 #2 #3\endheader{%
+ \doind{tp}{\code{#2}}%
+ \defname{#1}{}{#2}\defunargs{#3\unskip}%
+}
+
+% Remaining @defun-like shortcuts:
+\makedefun{defun}{\deffnheader{\putwordDeffunc} }
+\makedefun{defmac}{\deffnheader{\putwordDefmac} }
+\makedefun{defspec}{\deffnheader{\putwordDefspec} }
+\makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} }
+\makedefun{defvar}{\defvrheader{\putwordDefvar} }
+\makedefun{defopt}{\defvrheader{\putwordDefopt} }
+\makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} }
+\makedefun{defmethod}{\defopon\putwordMethodon}
+\makedefun{deftypemethod}{\deftypeopon\putwordMethodon}
+\makedefun{defivar}{\defcvof\putwordInstanceVariableof}
+\makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof}
+
+% \defname, which formats the name of the @def (not the args).
+% #1 is the category, such as "Function".
+% #2 is the return type, if any.
+% #3 is the function name.
+%
+% We are followed by (but not passed) the arguments, if any.
+%
+\def\defname#1#2#3{%
+ % Get the values of \leftskip and \rightskip as they were outside the @def...
+ \advance\leftskip by -\defbodyindent
+ %
+ % How we'll format the type name. Putting it in brackets helps
+ % distinguish it from the body text that may end up on the next line
+ % just below it.
+ \def\temp{#1}%
+ \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi}
+ %
+ % Figure out line sizes for the paragraph shape.
+ % The first line needs space for \box0; but if \rightskip is nonzero,
+ % we need only space for the part of \box0 which exceeds it:
+ \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip
+ % The continuations:
+ \dimen2=\hsize \advance\dimen2 by -\defargsindent
+ % (plain.tex says that \dimen1 should be used only as global.)
+ \parshape 2 0in \dimen0 \defargsindent \dimen2
+ %
+ % Put the type name to the right margin.
+ \noindent
+ \hbox to 0pt{%
+ \hfil\box0 \kern-\hsize
+ % \hsize has to be shortened this way:
+ \kern\leftskip
+ % Intentionally do not respect \rightskip, since we need the space.
+ }%
+ %
+ % Allow all lines to be underfull without complaint:
+ \tolerance=10000 \hbadness=10000
+ \exdentamount=\defbodyindent
+ {%
+ % defun fonts. We use typewriter by default (used to be bold) because:
+ % . we're printing identifiers, they should be in tt in principle.
+ % . in languages with many accents, such as Czech or French, it's
+ % common to leave accents off identifiers. The result looks ok in
+ % tt, but exceedingly strange in rm.
+ % . we don't want -- and --- to be treated as ligatures.
+ % . this still does not fix the ?` and !` ligatures, but so far no
+ % one has made identifiers using them :).
+ \df \tt
+ \def\temp{#2}% return value type
+ \ifx\temp\empty\else \tclose{\temp} \fi
+ #3% output function name
+ }%
+ {\rm\enskip}% hskip 0.5 em of \tenrm
+ %
+ \boldbrax
+ % arguments will be output next, if any.
+}
+
+% Print arguments in slanted roman (not ttsl), inconsistently with using
+% tt for the name. This is because literal text is sometimes needed in
+% the argument list (groff manual), and ttsl and tt are not very
+% distinguishable. Prevent hyphenation at `-' chars.
+%
+\def\defunargs#1{%
+ % use sl by default (not ttsl),
+ % tt for the names.
+ \df \sl \hyphenchar\font=0
+ %
+ % On the other hand, if an argument has two dashes (for instance), we
+ % want a way to get ttsl. Let's try @var for that.
+ \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
+ #1%
+ \sl\hyphenchar\font=45
+}
+
+% We want ()&[] to print specially on the defun line.
+%
+\def\activeparens{%
+ \catcode`\(=\active \catcode`\)=\active
+ \catcode`\[=\active \catcode`\]=\active
+ \catcode`\&=\active
+}
+
+% Make control sequences which act like normal parenthesis chars.
+\let\lparen = ( \let\rparen = )
+
+% Be sure that we always have a definition for `(', etc. For example,
+% if the fn name has parens in it, \boldbrax will not be in effect yet,
+% so TeX would otherwise complain about undefined control sequence.
+{
+ \activeparens
+ \global\let(=\lparen \global\let)=\rparen
+ \global\let[=\lbrack \global\let]=\rbrack
+ \global\let& = \&
+
+ \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb}
+ \gdef\magicamp{\let&=\amprm}
+}
+
+\newcount\parencount
+
+% If we encounter &foo, then turn on ()-hacking afterwards
+\newif\ifampseen
+\def\amprm#1 {\ampseentrue{\bf\&#1 }}
+
+\def\parenfont{%
+ \ifampseen
+ % At the first level, print parens in roman,
+ % otherwise use the default font.
+ \ifnum \parencount=1 \rm \fi
+ \else
+ % The \sf parens (in \boldbrax) actually are a little bolder than
+ % the contained text. This is especially needed for [ and ] .
+ \sf
+ \fi
+}
+\def\infirstlevel#1{%
+ \ifampseen
+ \ifnum\parencount=1
+ #1%
+ \fi
+ \fi
+}
+\def\bfafterword#1 {#1 \bf}
+
+\def\opnr{%
+ \global\advance\parencount by 1
+ {\parenfont(}%
+ \infirstlevel \bfafterword
+}
+\def\clnr{%
+ {\parenfont)}%
+ \infirstlevel \sl
+ \global\advance\parencount by -1
+}
+
+\newcount\brackcount
+\def\lbrb{%
+ \global\advance\brackcount by 1
+ {\bf[}%
+}
+\def\rbrb{%
+ {\bf]}%
+ \global\advance\brackcount by -1
+}
+
+\def\checkparencounts{%
+ \ifnum\parencount=0 \else \badparencount \fi
+ \ifnum\brackcount=0 \else \badbrackcount \fi
+}
+% these should not use \errmessage; the glibc manual, at least, actually
+% has such constructs (when documenting function pointers).
+\def\badparencount{%
+ \message{Warning: unbalanced parentheses in @def...}%
+ \global\parencount=0
+}
+\def\badbrackcount{%
+ \message{Warning: unbalanced square brackets in @def...}%
+ \global\brackcount=0
+}
+
+
+\message{macros,}
+% @macro.
+
+% To do this right we need a feature of e-TeX, \scantokens,
+% which we arrange to emulate with a temporary file in ordinary TeX.
+\ifx\eTeXversion\undefined
+ \newwrite\macscribble
+ \def\scantokens#1{%
+ \toks0={#1}%
+ \immediate\openout\macscribble=\jobname.tmp
+ \immediate\write\macscribble{\the\toks0}%
+ \immediate\closeout\macscribble
+ \input \jobname.tmp
+ }
+\fi
+
+\def\scanmacro#1{%
+ \begingroup
+ \newlinechar`\^^M
+ \let\xeatspaces\eatspaces
+ % Undo catcode changes of \startcontents and \doprintindex
+ % When called from @insertcopying or (short)caption, we need active
+ % backslash to get it printed correctly. Previously, we had
+ % \catcode`\\=\other instead. We'll see whether a problem appears
+ % with macro expansion. --kasal, 19aug04
+ \catcode`\@=0 \catcode`\\=\active \escapechar=`\@
+ % ... and \example
+ \spaceisspace
+ %
+ % Append \endinput to make sure that TeX does not see the ending newline.
+ % I've verified that it is necessary both for e-TeX and for ordinary TeX
+ % --kasal, 29nov03
+ \scantokens{#1\endinput}%
+ \endgroup
+}
+
+\def\scanexp#1{%
+ \edef\temp{\noexpand\scanmacro{#1}}%
+ \temp
+}
+
+\newcount\paramno % Count of parameters
+\newtoks\macname % Macro name
+\newif\ifrecursive % Is it recursive?
+
+% List of all defined macros in the form
+% \definedummyword\macro1\definedummyword\macro2...
+% Currently is also contains all @aliases; the list can be split
+% if there is a need.
+\def\macrolist{}
+
+% Add the macro to \macrolist
+\def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname}
+\def\addtomacrolistxxx#1{%
+ \toks0 = \expandafter{\macrolist\definedummyword#1}%
+ \xdef\macrolist{\the\toks0}%
+}
+
+% Utility routines.
+% This does \let #1 = #2, with \csnames; that is,
+% \let \csname#1\endcsname = \csname#2\endcsname
+% (except of course we have to play expansion games).
+%
+\def\cslet#1#2{%
+ \expandafter\let
+ \csname#1\expandafter\endcsname
+ \csname#2\endcsname
+}
+
+% Trim leading and trailing spaces off a string.
+% Concepts from aro-bend problem 15 (see CTAN).
+{\catcode`\@=11
+\gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }}
+\gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@}
+\gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @}
+\def\unbrace#1{#1}
+\unbrace{\gdef\trim@@@ #1 } #2@{#1}
+}
+
+% Trim a single trailing ^^M off a string.
+{\catcode`\^^M=\other \catcode`\Q=3%
+\gdef\eatcr #1{\eatcra #1Q^^MQ}%
+\gdef\eatcra#1^^MQ{\eatcrb#1Q}%
+\gdef\eatcrb#1Q#2Q{#1}%
+}
+
+% Macro bodies are absorbed as an argument in a context where
+% all characters are catcode 10, 11 or 12, except \ which is active
+% (as in normal texinfo). It is necessary to change the definition of \.
+
+% Non-ASCII encodings make 8-bit characters active, so un-activate
+% them to avoid their expansion. Must do this non-globally, to
+% confine the change to the current group.
+
+% It's necessary to have hard CRs when the macro is executed. This is
+% done by making ^^M (\endlinechar) catcode 12 when reading the macro
+% body, and then making it the \newlinechar in \scanmacro.
+
+\def\scanctxt{%
+ \catcode`\"=\other
+ \catcode`\+=\other
+ \catcode`\<=\other
+ \catcode`\>=\other
+ \catcode`\@=\other
+ \catcode`\^=\other
+ \catcode`\_=\other
+ \catcode`\|=\other
+ \catcode`\~=\other
+ \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
+}
+
+\def\scanargctxt{%
+ \scanctxt
+ \catcode`\\=\other
+ \catcode`\^^M=\other
+}
+
+\def\macrobodyctxt{%
+ \scanctxt
+ \catcode`\{=\other
+ \catcode`\}=\other
+ \catcode`\^^M=\other
+ \usembodybackslash
+}
+
+\def\macroargctxt{%
+ \scanctxt
+ \catcode`\\=\other
+}
+
+% \mbodybackslash is the definition of \ in @macro bodies.
+% It maps \foo\ => \csname macarg.foo\endcsname => #N
+% where N is the macro parameter number.
+% We define \csname macarg.\endcsname to be \realbackslash, so
+% \\ in macro replacement text gets you a backslash.
+
+{\catcode`@=0 @catcode`@\=@active
+ @gdef@usembodybackslash{@let\=@mbodybackslash}
+ @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
+}
+\expandafter\def\csname macarg.\endcsname{\realbackslash}
+
+\def\macro{\recursivefalse\parsearg\macroxxx}
+\def\rmacro{\recursivetrue\parsearg\macroxxx}
+
+\def\macroxxx#1{%
+ \getargs{#1}% now \macname is the macname and \argl the arglist
+ \ifx\argl\empty % no arguments
+ \paramno=0%
+ \else
+ \expandafter\parsemargdef \argl;%
+ \fi
+ \if1\csname ismacro.\the\macname\endcsname
+ \message{Warning: redefining \the\macname}%
+ \else
+ \expandafter\ifx\csname \the\macname\endcsname \relax
+ \else \errmessage{Macro name \the\macname\space already defined}\fi
+ \global\cslet{macsave.\the\macname}{\the\macname}%
+ \global\expandafter\let\csname ismacro.\the\macname\endcsname=1%
+ \addtomacrolist{\the\macname}%
+ \fi
+ \begingroup \macrobodyctxt
+ \ifrecursive \expandafter\parsermacbody
+ \else \expandafter\parsemacbody
+ \fi}
+
+\parseargdef\unmacro{%
+ \if1\csname ismacro.#1\endcsname
+ \global\cslet{#1}{macsave.#1}%
+ \global\expandafter\let \csname ismacro.#1\endcsname=0%
+ % Remove the macro name from \macrolist:
+ \begingroup
+ \expandafter\let\csname#1\endcsname \relax
+ \let\definedummyword\unmacrodo
+ \xdef\macrolist{\macrolist}%
+ \endgroup
+ \else
+ \errmessage{Macro #1 not defined}%
+ \fi
+}
+
+% Called by \do from \dounmacro on each macro. The idea is to omit any
+% macro definitions that have been changed to \relax.
+%
+\def\unmacrodo#1{%
+ \ifx #1\relax
+ % remove this
+ \else
+ \noexpand\definedummyword \noexpand#1%
+ \fi
+}
+
+% This makes use of the obscure feature that if the last token of a
+% <parameter list> is #, then the preceding argument is delimited by
+% an opening brace, and that opening brace is not consumed.
+\def\getargs#1{\getargsxxx#1{}}
+\def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
+\def\getmacname #1 #2\relax{\macname={#1}}
+\def\getmacargs#1{\def\argl{#1}}
+
+% Parse the optional {params} list. Set up \paramno and \paramlist
+% so \defmacro knows what to do. Define \macarg.blah for each blah
+% in the params list, to be ##N where N is the position in that list.
+% That gets used by \mbodybackslash (above).
+
+% We need to get `macro parameter char #' into several definitions.
+% The technique used is stolen from LaTeX: let \hash be something
+% unexpandable, insert that wherever you need a #, and then redefine
+% it to # just before using the token list produced.
+%
+% The same technique is used to protect \eatspaces till just before
+% the macro is used.
+
+\def\parsemargdef#1;{\paramno=0\def\paramlist{}%
+ \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
+\def\parsemargdefxxx#1,{%
+ \if#1;\let\next=\relax
+ \else \let\next=\parsemargdefxxx
+ \advance\paramno by 1%
+ \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
+ {\xeatspaces{\hash\the\paramno}}%
+ \edef\paramlist{\paramlist\hash\the\paramno,}%
+ \fi\next}
+
+% These two commands read recursive and nonrecursive macro bodies.
+% (They're different since rec and nonrec macros end differently.)
+
+\long\def\parsemacbody#1@end macro%
+{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
+\long\def\parsermacbody#1@end rmacro%
+{\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
+
+% This defines the macro itself. There are six cases: recursive and
+% nonrecursive macros of zero, one, and many arguments.
+% Much magic with \expandafter here.
+% \xdef is used so that macro definitions will survive the file
+% they're defined in; @include reads the file inside a group.
+\def\defmacro{%
+ \let\hash=##% convert placeholders to macro parameter chars
+ \ifrecursive
+ \ifcase\paramno
+ % 0
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\scanmacro{\temp}}%
+ \or % 1
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \noexpand\braceorline
+ \expandafter\noexpand\csname\the\macname xxx\endcsname}%
+ \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
+ \egroup\noexpand\scanmacro{\temp}}%
+ \else % many
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname xxx\endcsname
+ \paramlist{\egroup\noexpand\scanmacro{\temp}}%
+ \fi
+ \else
+ \ifcase\paramno
+ % 0
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
+ \or % 1
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \noexpand\braceorline
+ \expandafter\noexpand\csname\the\macname xxx\endcsname}%
+ \expandafter\xdef\csname\the\macname xxx\endcsname##1{%
+ \egroup
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
+ \else % many
+ \expandafter\xdef\csname\the\macname\endcsname{%
+ \bgroup\noexpand\macroargctxt
+ \expandafter\noexpand\csname\the\macname xx\endcsname}%
+ \expandafter\xdef\csname\the\macname xx\endcsname##1{%
+ \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}%
+ \expandafter\expandafter
+ \expandafter\xdef
+ \expandafter\expandafter
+ \csname\the\macname xxx\endcsname
+ \paramlist{%
+ \egroup
+ \noexpand\norecurse{\the\macname}%
+ \noexpand\scanmacro{\temp}\egroup}%
+ \fi
+ \fi}
+
+\def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}}
+
+% \braceorline decides whether the next nonwhitespace character is a
+% {. If so it reads up to the closing }, if not, it reads the whole
+% line. Whatever was read is then fed to the next control sequence
+% as an argument (by \parsebrace or \parsearg)
+\def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
+\def\braceorlinexxx{%
+ \ifx\nchar\bgroup\else
+ \expandafter\parsearg
+ \fi \macnamexxx}
+
+
+% @alias.
+% We need some trickery to remove the optional spaces around the equal
+% sign. Just make them active and then expand them all to nothing.
+\def\alias{\parseargusing\obeyspaces\aliasxxx}
+\def\aliasxxx #1{\aliasyyy#1\relax}
+\def\aliasyyy #1=#2\relax{%
+ {%
+ \expandafter\let\obeyedspace=\empty
+ \addtomacrolist{#1}%
+ \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}%
+ }%
+ \next
+}
+
+
+\message{cross references,}
+
+\newwrite\auxfile
+\newif\ifhavexrefs % True if xref values are known.
+\newif\ifwarnedxrefs % True if we warned once that they aren't known.
+
+% @inforef is relatively simple.
+\def\inforef #1{\inforefzzz #1,,,,**}
+\def\inforefzzz #1,#2,#3,#4**{\putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}},
+ node \samp{\ignorespaces#1{}}}
+
+% @node's only job in TeX is to define \lastnode, which is used in
+% cross-references. The @node line might or might not have commas, and
+% might or might not have spaces before the first comma, like:
+% @node foo , bar , ...
+% We don't want such trailing spaces in the node name.
+%
+\parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse}
+%
+% also remove a trailing comma, in case of something like this:
+% @node Help-Cross, , , Cross-refs
+\def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse}
+\def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}}
+
+\let\nwnode=\node
+\let\lastnode=\empty
+
+% Write a cross-reference definition for the current node. #1 is the
+% type (Ynumbered, Yappendix, Ynothing).
+%
+\def\donoderef#1{%
+ \ifx\lastnode\empty\else
+ \setref{\lastnode}{#1}%
+ \global\let\lastnode=\empty
+ \fi
+}
+
+% @anchor{NAME} -- define xref target at arbitrary point.
+%
+\newcount\savesfregister
+%
+\def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi}
+\def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi}
+\def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces}
+
+% \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an
+% anchor), which consists of three parts:
+% 1) NAME-title - the current sectioning name taken from \lastsection,
+% or the anchor name.
+% 2) NAME-snt - section number and type, passed as the SNT arg, or
+% empty for anchors.
+% 3) NAME-pg - the page number.
+%
+% This is called from \donoderef, \anchor, and \dofloat. In the case of
+% floats, there is an additional part, which is not written here:
+% 4) NAME-lof - the text as it should appear in a @listoffloats.
+%
+\def\setref#1#2{%
+ \pdfmkdest{#1}%
+ \iflinks
+ {%
+ \atdummies % preserve commands, but don't expand them
+ \edef\writexrdef##1##2{%
+ \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef
+ ##1}{##2}}% these are parameters of \writexrdef
+ }%
+ \toks0 = \expandafter{\lastsection}%
+ \immediate \writexrdef{title}{\the\toks0 }%
+ \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc.
+ \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, during \shipout
+ }%
+ \fi
+}
+
+% @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is
+% the node name, #2 the name of the Info cross-reference, #3 the printed
+% node name, #4 the name of the Info file, #5 the name of the printed
+% manual. All but the node name can be omitted.
+%
+\def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]}
+\def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]}
+\def\ref#1{\xrefX[#1,,,,,,,]}
+\def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup
+ \unsepspaces
+ \def\printedmanual{\ignorespaces #5}%
+ \def\printedrefname{\ignorespaces #3}%
+ \setbox1=\hbox{\printedmanual\unskip}%
+ \setbox0=\hbox{\printedrefname\unskip}%
+ \ifdim \wd0 = 0pt
+ % No printed node name was explicitly given.
+ \expandafter\ifx\csname SETxref-automatic-section-title\endcsname\relax
+ % Use the node name inside the square brackets.
+ \def\printedrefname{\ignorespaces #1}%
+ \else
+ % Use the actual chapter/section title appear inside
+ % the square brackets. Use the real section title if we have it.
+ \ifdim \wd1 > 0pt
+ % It is in another manual, so we don't have it.
+ \def\printedrefname{\ignorespaces #1}%
+ \else
+ \ifhavexrefs
+ % We know the real title if we have the xref values.
+ \def\printedrefname{\refx{#1-title}{}}%
+ \else
+ % Otherwise just copy the Info node name.
+ \def\printedrefname{\ignorespaces #1}%
+ \fi%
+ \fi
+ \fi
+ \fi
+ %
+ % Make link in pdf output.
+ \ifpdf
+ {\indexnofonts
+ \turnoffactive
+ % This expands tokens, so do it after making catcode changes, so _
+ % etc. don't get their TeX definitions.
+ \getfilename{#4}%
+ %
+ % See comments at \activebackslashdouble.
+ {\activebackslashdouble \xdef\pdfxrefdest{#1}%
+ \backslashparens\pdfxrefdest}%
+ %
+ \leavevmode
+ \startlink attr{/Border [0 0 0]}%
+ \ifnum\filenamelength>0
+ goto file{\the\filename.pdf} name{\pdfxrefdest}%
+ \else
+ goto name{\pdfmkpgn{\pdfxrefdest}}%
+ \fi
+ }%
+ \setcolor{\linkcolor}%
+ \fi
+ %
+ % Float references are printed completely differently: "Figure 1.2"
+ % instead of "[somenode], p.3". We distinguish them by the
+ % LABEL-title being set to a magic string.
+ {%
+ % Have to otherify everything special to allow the \csname to
+ % include an _ in the xref name, etc.
+ \indexnofonts
+ \turnoffactive
+ \expandafter\global\expandafter\let\expandafter\Xthisreftitle
+ \csname XR#1-title\endcsname
+ }%
+ \iffloat\Xthisreftitle
+ % If the user specified the print name (third arg) to the ref,
+ % print it instead of our usual "Figure 1.2".
+ \ifdim\wd0 = 0pt
+ \refx{#1-snt}{}%
+ \else
+ \printedrefname
+ \fi
+ %
+ % if the user also gave the printed manual name (fifth arg), append
+ % "in MANUALNAME".
+ \ifdim \wd1 > 0pt
+ \space \putwordin{} \cite{\printedmanual}%
+ \fi
+ \else
+ % node/anchor (non-float) references.
+ %
+ % If we use \unhbox0 and \unhbox1 to print the node names, TeX does not
+ % insert empty discretionaries after hyphens, which means that it will
+ % not find a line break at a hyphen in a node names. Since some manuals
+ % are best written with fairly long node names, containing hyphens, this
+ % is a loss. Therefore, we give the text of the node name again, so it
+ % is as if TeX is seeing it for the first time.
+ \ifdim \wd1 > 0pt
+ \putwordSection{} ``\printedrefname'' \putwordin{} \cite{\printedmanual}%
+ \else
+ % _ (for example) has to be the character _ for the purposes of the
+ % control sequence corresponding to the node, but it has to expand
+ % into the usual \leavevmode...\vrule stuff for purposes of
+ % printing. So we \turnoffactive for the \refx-snt, back on for the
+ % printing, back off for the \refx-pg.
+ {\turnoffactive
+ % Only output a following space if the -snt ref is nonempty; for
+ % @unnumbered and @anchor, it won't be.
+ \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}%
+ \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi
+ }%
+ % output the `[mynode]' via a macro so it can be overridden.
+ \xrefprintnodename\printedrefname
+ %
+ % But we always want a comma and a space:
+ ,\space
+ %
+ % output the `page 3'.
+ \turnoffactive \putwordpage\tie\refx{#1-pg}{}%
+ \fi
+ \fi
+ \endlink
+\endgroup}
+
+% This macro is called from \xrefX for the `[nodename]' part of xref
+% output. It's a separate macro only so it can be changed more easily,
+% since square brackets don't work well in some documents. Particularly
+% one that Bob is working on :).
+%
+\def\xrefprintnodename#1{[#1]}
+
+% Things referred to by \setref.
+%
+\def\Ynothing{}
+\def\Yomitfromtoc{}
+\def\Ynumbered{%
+ \ifnum\secno=0
+ \putwordChapter@tie \the\chapno
+ \else \ifnum\subsecno=0
+ \putwordSection@tie \the\chapno.\the\secno
+ \else \ifnum\subsubsecno=0
+ \putwordSection@tie \the\chapno.\the\secno.\the\subsecno
+ \else
+ \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno
+ \fi\fi\fi
+}
+\def\Yappendix{%
+ \ifnum\secno=0
+ \putwordAppendix@tie @char\the\appendixno{}%
+ \else \ifnum\subsecno=0
+ \putwordSection@tie @char\the\appendixno.\the\secno
+ \else \ifnum\subsubsecno=0
+ \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno
+ \else
+ \putwordSection@tie
+ @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno
+ \fi\fi\fi
+}
+
+% Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME.
+% If its value is nonempty, SUFFIX is output afterward.
+%
+\def\refx#1#2{%
+ {%
+ \indexnofonts
+ \otherbackslash
+ \expandafter\global\expandafter\let\expandafter\thisrefX
+ \csname XR#1\endcsname
+ }%
+ \ifx\thisrefX\relax
+ % If not defined, say something at least.
+ \angleleft un\-de\-fined\angleright
+ \iflinks
+ \ifhavexrefs
+ \message{\linenumber Undefined cross reference `#1'.}%
+ \else
+ \ifwarnedxrefs\else
+ \global\warnedxrefstrue
+ \message{Cross reference values unknown; you must run TeX again.}%
+ \fi
+ \fi
+ \fi
+ \else
+ % It's defined, so just use it.
+ \thisrefX
+ \fi
+ #2% Output the suffix in any case.
+}
+
+% This is the macro invoked by entries in the aux file. Usually it's
+% just a \def (we prepend XR to the control sequence name to avoid
+% collisions). But if this is a float type, we have more work to do.
+%
+\def\xrdef#1#2{%
+ {% The node name might contain 8-bit characters, which in our current
+ % implementation are changed to commands like @'e. Don't let these
+ % mess up the control sequence name.
+ \indexnofonts
+ \turnoffactive
+ \xdef\safexrefname{#1}%
+ }%
+ %
+ \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref
+ %
+ % Was that xref control sequence that we just defined for a float?
+ \expandafter\iffloat\csname XR\safexrefname\endcsname
+ % it was a float, and we have the (safe) float type in \iffloattype.
+ \expandafter\let\expandafter\floatlist
+ \csname floatlist\iffloattype\endcsname
+ %
+ % Is this the first time we've seen this float type?
+ \expandafter\ifx\floatlist\relax
+ \toks0 = {\do}% yes, so just \do
+ \else
+ % had it before, so preserve previous elements in list.
+ \toks0 = \expandafter{\floatlist\do}%
+ \fi
+ %
+ % Remember this xref in the control sequence \floatlistFLOATTYPE,
+ % for later use in \listoffloats.
+ \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0
+ {\safexrefname}}%
+ \fi
+}
+
+% Read the last existing aux file, if any. No error if none exists.
+%
+\def\tryauxfile{%
+ \openin 1 \jobname.aux
+ \ifeof 1 \else
+ \readdatafile{aux}%
+ \global\havexrefstrue
+ \fi
+ \closein 1
+}
+
+\def\setupdatafile{%
+ \catcode`\^^@=\other
+ \catcode`\^^A=\other
+ \catcode`\^^B=\other
+ \catcode`\^^C=\other
+ \catcode`\^^D=\other
+ \catcode`\^^E=\other
+ \catcode`\^^F=\other
+ \catcode`\^^G=\other
+ \catcode`\^^H=\other
+ \catcode`\^^K=\other
+ \catcode`\^^L=\other
+ \catcode`\^^N=\other
+ \catcode`\^^P=\other
+ \catcode`\^^Q=\other
+ \catcode`\^^R=\other
+ \catcode`\^^S=\other
+ \catcode`\^^T=\other
+ \catcode`\^^U=\other
+ \catcode`\^^V=\other
+ \catcode`\^^W=\other
+ \catcode`\^^X=\other
+ \catcode`\^^Z=\other
+ \catcode`\^^[=\other
+ \catcode`\^^\=\other
+ \catcode`\^^]=\other
+ \catcode`\^^^=\other
+ \catcode`\^^_=\other
+ % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc.
+ % in xref tags, i.e., node names. But since ^^e4 notation isn't
+ % supported in the main text, it doesn't seem desirable. Furthermore,
+ % that is not enough: for node names that actually contain a ^
+ % character, we would end up writing a line like this: 'xrdef {'hat
+ % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first
+ % argument, and \hat is not an expandable control sequence. It could
+ % all be worked out, but why? Either we support ^^ or we don't.
+ %
+ % The other change necessary for this was to define \auxhat:
+ % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter
+ % and then to call \auxhat in \setq.
+ %
+ \catcode`\^=\other
+ %
+ % Special characters. Should be turned off anyway, but...
+ \catcode`\~=\other
+ \catcode`\[=\other
+ \catcode`\]=\other
+ \catcode`\"=\other
+ \catcode`\_=\other
+ \catcode`\|=\other
+ \catcode`\<=\other
+ \catcode`\>=\other
+ \catcode`\$=\other
+ \catcode`\#=\other
+ \catcode`\&=\other
+ \catcode`\%=\other
+ \catcode`+=\other % avoid \+ for paranoia even though we've turned it off
+ %
+ % This is to support \ in node names and titles, since the \
+ % characters end up in a \csname. It's easier than
+ % leaving it active and making its active definition an actual \
+ % character. What I don't understand is why it works in the *value*
+ % of the xrdef. Seems like it should be a catcode12 \, and that
+ % should not typeset properly. But it works, so I'm moving on for
+ % now. --karl, 15jan04.
+ \catcode`\\=\other
+ %
+ % Make the characters 128-255 be printing characters.
+ {%
+ \count1=128
+ \def\loop{%
+ \catcode\count1=\other
+ \advance\count1 by 1
+ \ifnum \count1<256 \loop \fi
+ }%
+ }%
+ %
+ % @ is our escape character in .aux files, and we need braces.
+ \catcode`\{=1
+ \catcode`\}=2
+ \catcode`\@=0
+}
+
+\def\readdatafile#1{%
+\begingroup
+ \setupdatafile
+ \input\jobname.#1
+\endgroup}
+
+
+\message{insertions,}
+% including footnotes.
+
+\newcount \footnoteno
+
+% The trailing space in the following definition for supereject is
+% vital for proper filling; pages come out unaligned when you do a
+% pagealignmacro call if that space before the closing brace is
+% removed. (Generally, numeric constants should always be followed by a
+% space to prevent strange expansion errors.)
+\def\supereject{\par\penalty -20000\footnoteno =0 }
+
+% @footnotestyle is meaningful for info output only.
+\let\footnotestyle=\comment
+
+{\catcode `\@=11
+%
+% Auto-number footnotes. Otherwise like plain.
+\gdef\footnote{%
+ \let\indent=\ptexindent
+ \let\noindent=\ptexnoindent
+ \global\advance\footnoteno by \@ne
+ \edef\thisfootno{$^{\the\footnoteno}$}%
+ %
+ % In case the footnote comes at the end of a sentence, preserve the
+ % extra spacing after we do the footnote number.
+ \let\@sf\empty
+ \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi
+ %
+ % Remove inadvertent blank space before typesetting the footnote number.
+ \unskip
+ \thisfootno\@sf
+ \dofootnote
+}%
+
+% Don't bother with the trickery in plain.tex to not require the
+% footnote text as a parameter. Our footnotes don't need to be so general.
+%
+% Oh yes, they do; otherwise, @ifset (and anything else that uses
+% \parseargline) fails inside footnotes because the tokens are fixed when
+% the footnote is read. --karl, 16nov96.
+%
+\gdef\dofootnote{%
+ \insert\footins\bgroup
+ % We want to typeset this text as a normal paragraph, even if the
+ % footnote reference occurs in (for example) a display environment.
+ % So reset some parameters.
+ \hsize=\pagewidth
+ \interlinepenalty\interfootnotelinepenalty
+ \splittopskip\ht\strutbox % top baseline for broken footnotes
+ \splitmaxdepth\dp\strutbox
+ \floatingpenalty\@MM
+ \leftskip\z@skip
+ \rightskip\z@skip
+ \spaceskip\z@skip
+ \xspaceskip\z@skip
+ \parindent\defaultparindent
+ %
+ \smallfonts \rm
+ %
+ % Because we use hanging indentation in footnotes, a @noindent appears
+ % to exdent this text, so make it be a no-op. makeinfo does not use
+ % hanging indentation so @noindent can still be needed within footnote
+ % text after an @example or the like (not that this is good style).
+ \let\noindent = \relax
+ %
+ % Hang the footnote text off the number. Use \everypar in case the
+ % footnote extends for more than one paragraph.
+ \everypar = {\hang}%
+ \textindent{\thisfootno}%
+ %
+ % Don't crash into the line above the footnote text. Since this
+ % expands into a box, it must come within the paragraph, lest it
+ % provide a place where TeX can split the footnote.
+ \footstrut
+ \futurelet\next\fo@t
+}
+}%end \catcode `\@=11
+
+% In case a @footnote appears in a vbox, save the footnote text and create
+% the real \insert just after the vbox finished. Otherwise, the insertion
+% would be lost.
+% Similarly, if a @footnote appears inside an alignment, save the footnote
+% text to a box and make the \insert when a row of the table is finished.
+% And the same can be done for other insert classes. --kasal, 16nov03.
+
+% Replace the \insert primitive by a cheating macro.
+% Deeper inside, just make sure that the saved insertions are not spilled
+% out prematurely.
+%
+\def\startsavinginserts{%
+ \ifx \insert\ptexinsert
+ \let\insert\saveinsert
+ \else
+ \let\checkinserts\relax
+ \fi
+}
+
+% This \insert replacement works for both \insert\footins{foo} and
+% \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}.
+%
+\def\saveinsert#1{%
+ \edef\next{\noexpand\savetobox \makeSAVEname#1}%
+ \afterassignment\next
+ % swallow the left brace
+ \let\temp =
+}
+\def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}}
+\def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1}
+
+\def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi}
+
+\def\placesaveins#1{%
+ \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname
+ {\box#1}%
+}
+
+% eat @SAVE -- beware, all of them have catcode \other:
+{
+ \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-)
+ \gdef\gobblesave @SAVE{}
+}
+
+% initialization:
+\def\newsaveins #1{%
+ \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}%
+ \next
+}
+\def\newsaveinsX #1{%
+ \csname newbox\endcsname #1%
+ \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts
+ \checksaveins #1}%
+}
+
+% initialize:
+\let\checkinserts\empty
+\newsaveins\footins
+\newsaveins\margin
+
+
+% @image. We use the macros from epsf.tex to support this.
+% If epsf.tex is not installed and @image is used, we complain.
+%
+% Check for and read epsf.tex up front. If we read it only at @image
+% time, we might be inside a group, and then its definitions would get
+% undone and the next image would fail.
+\openin 1 = epsf.tex
+\ifeof 1 \else
+ % Do not bother showing banner with epsf.tex v2.7k (available in
+ % doc/epsf.tex and on ctan).
+ \def\epsfannounce{\toks0 = }%
+ \input epsf.tex
+\fi
+\closein 1
+%
+% We will only complain once about lack of epsf.tex.
+\newif\ifwarnednoepsf
+\newhelp\noepsfhelp{epsf.tex must be installed for images to
+ work. It is also included in the Texinfo distribution, or you can get
+ it from ftp://tug.org/tex/epsf.tex.}
+%
+\def\image#1{%
+ \ifx\epsfbox\undefined
+ \ifwarnednoepsf \else
+ \errhelp = \noepsfhelp
+ \errmessage{epsf.tex not found, images will be ignored}%
+ \global\warnednoepsftrue
+ \fi
+ \else
+ \imagexxx #1,,,,,\finish
+ \fi
+}
+%
+% Arguments to @image:
+% #1 is (mandatory) image filename; we tack on .eps extension.
+% #2 is (optional) width, #3 is (optional) height.
+% #4 is (ignored optional) html alt text.
+% #5 is (ignored optional) extension.
+% #6 is just the usual extra ignored arg for parsing this stuff.
+\newif\ifimagevmode
+\def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
+ \catcode`\^^M = 5 % in case we're inside an example
+ \normalturnoffactive % allow _ et al. in names
+ % If the image is by itself, center it.
+ \ifvmode
+ \imagevmodetrue
+ \nobreak\medskip
+ % Usually we'll have text after the image which will insert
+ % \parskip glue, so insert it here too to equalize the space
+ % above and below.
+ \nobreak\vskip\parskip
+ \nobreak
+ \fi
+ %
+ % Leave vertical mode so that indentation from an enclosing
+ % environment such as @quotation is respected. On the other hand, if
+ % it's at the top level, we don't want the normal paragraph indentation.
+ \noindent
+ %
+ % Output the image.
+ \ifpdf
+ \dopdfimage{#1}{#2}{#3}%
+ \else
+ % \epsfbox itself resets \epsf?size at each figure.
+ \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi
+ \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi
+ \epsfbox{#1.eps}%
+ \fi
+ %
+ \ifimagevmode \medskip \fi % space after the standalone image
+\endgroup}
+
+
+% @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables,
+% etc. We don't actually implement floating yet, we always include the
+% float "here". But it seemed the best name for the future.
+%
+\envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish}
+
+% There may be a space before second and/or third parameter; delete it.
+\def\eatcommaspace#1, {#1,}
+
+% #1 is the optional FLOATTYPE, the text label for this float, typically
+% "Figure", "Table", "Example", etc. Can't contain commas. If omitted,
+% this float will not be numbered and cannot be referred to.
+%
+% #2 is the optional xref label. Also must be present for the float to
+% be referable.
+%
+% #3 is the optional positioning argument; for now, it is ignored. It
+% will somehow specify the positions allowed to float to (here, top, bottom).
+%
+% We keep a separate counter for each FLOATTYPE, which we reset at each
+% chapter-level command.
+\let\resetallfloatnos=\empty
+%
+\def\dofloat#1,#2,#3,#4\finish{%
+ \let\thiscaption=\empty
+ \let\thisshortcaption=\empty
+ %
+ % don't lose footnotes inside @float.
+ %
+ % BEWARE: when the floats start float, we have to issue warning whenever an
+ % insert appears inside a float which could possibly float. --kasal, 26may04
+ %
+ \startsavinginserts
+ %
+ % We can't be used inside a paragraph.
+ \par
+ %
+ \vtop\bgroup
+ \def\floattype{#1}%
+ \def\floatlabel{#2}%
+ \def\floatloc{#3}% we do nothing with this yet.
+ %
+ \ifx\floattype\empty
+ \let\safefloattype=\empty
+ \else
+ {%
+ % the floattype might have accents or other special characters,
+ % but we need to use it in a control sequence name.
+ \indexnofonts
+ \turnoffactive
+ \xdef\safefloattype{\floattype}%
+ }%
+ \fi
+ %
+ % If label is given but no type, we handle that as the empty type.
+ \ifx\floatlabel\empty \else
+ % We want each FLOATTYPE to be numbered separately (Figure 1,
+ % Table 1, Figure 2, ...). (And if no label, no number.)
+ %
+ \expandafter\getfloatno\csname\safefloattype floatno\endcsname
+ \global\advance\floatno by 1
+ %
+ {%
+ % This magic value for \lastsection is output by \setref as the
+ % XREFLABEL-title value. \xrefX uses it to distinguish float
+ % labels (which have a completely different output format) from
+ % node and anchor labels. And \xrdef uses it to construct the
+ % lists of floats.
+ %
+ \edef\lastsection{\floatmagic=\safefloattype}%
+ \setref{\floatlabel}{Yfloat}%
+ }%
+ \fi
+ %
+ % start with \parskip glue, I guess.
+ \vskip\parskip
+ %
+ % Don't suppress indentation if a float happens to start a section.
+ \restorefirstparagraphindent
+}
+
+% we have these possibilities:
+% @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap
+% @float Foo,lbl & no caption: Foo 1.1
+% @float Foo & @caption{Cap}: Foo: Cap
+% @float Foo & no caption: Foo
+% @float ,lbl & Caption{Cap}: 1.1: Cap
+% @float ,lbl & no caption: 1.1
+% @float & @caption{Cap}: Cap
+% @float & no caption:
+%
+\def\Efloat{%
+ \let\floatident = \empty
+ %
+ % In all cases, if we have a float type, it comes first.
+ \ifx\floattype\empty \else \def\floatident{\floattype}\fi
+ %
+ % If we have an xref label, the number comes next.
+ \ifx\floatlabel\empty \else
+ \ifx\floattype\empty \else % if also had float type, need tie first.
+ \appendtomacro\floatident{\tie}%
+ \fi
+ % the number.
+ \appendtomacro\floatident{\chaplevelprefix\the\floatno}%
+ \fi
+ %
+ % Start the printed caption with what we've constructed in
+ % \floatident, but keep it separate; we need \floatident again.
+ \let\captionline = \floatident
+ %
+ \ifx\thiscaption\empty \else
+ \ifx\floatident\empty \else
+ \appendtomacro\captionline{: }% had ident, so need a colon between
+ \fi
+ %
+ % caption text.
+ \appendtomacro\captionline{\scanexp\thiscaption}%
+ \fi
+ %
+ % If we have anything to print, print it, with space before.
+ % Eventually this needs to become an \insert.
+ \ifx\captionline\empty \else
+ \vskip.5\parskip
+ \captionline
+ %
+ % Space below caption.
+ \vskip\parskip
+ \fi
+ %
+ % If have an xref label, write the list of floats info. Do this
+ % after the caption, to avoid chance of it being a breakpoint.
+ \ifx\floatlabel\empty \else
+ % Write the text that goes in the lof to the aux file as
+ % \floatlabel-lof. Besides \floatident, we include the short
+ % caption if specified, else the full caption if specified, else nothing.
+ {%
+ \atdummies
+ %
+ % since we read the caption text in the macro world, where ^^M
+ % is turned into a normal character, we have to scan it back, so
+ % we don't write the literal three characters "^^M" into the aux file.
+ \scanexp{%
+ \xdef\noexpand\gtemp{%
+ \ifx\thisshortcaption\empty
+ \thiscaption
+ \else
+ \thisshortcaption
+ \fi
+ }%
+ }%
+ \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident
+ \ifx\gtemp\empty \else : \gtemp \fi}}%
+ }%
+ \fi
+ \egroup % end of \vtop
+ %
+ % place the captured inserts
+ %
+ % BEWARE: when the floats start floating, we have to issue warning
+ % whenever an insert appears inside a float which could possibly
+ % float. --kasal, 26may04
+ %
+ \checkinserts
+}
+
+% Append the tokens #2 to the definition of macro #1, not expanding either.
+%
+\def\appendtomacro#1#2{%
+ \expandafter\def\expandafter#1\expandafter{#1#2}%
+}
+
+% @caption, @shortcaption
+%
+\def\caption{\docaption\thiscaption}
+\def\shortcaption{\docaption\thisshortcaption}
+\def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption}
+\def\defcaption#1#2{\egroup \def#1{#2}}
+
+% The parameter is the control sequence identifying the counter we are
+% going to use. Create it if it doesn't exist and assign it to \floatno.
+\def\getfloatno#1{%
+ \ifx#1\relax
+ % Haven't seen this figure type before.
+ \csname newcount\endcsname #1%
+ %
+ % Remember to reset this floatno at the next chap.
+ \expandafter\gdef\expandafter\resetallfloatnos
+ \expandafter{\resetallfloatnos #1=0 }%
+ \fi
+ \let\floatno#1%
+}
+
+% \setref calls this to get the XREFLABEL-snt value. We want an @xref
+% to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we
+% first read the @float command.
+%
+\def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}%
+
+% Magic string used for the XREFLABEL-title value, so \xrefX can
+% distinguish floats from other xref types.
+\def\floatmagic{!!float!!}
+
+% #1 is the control sequence we are passed; we expand into a conditional
+% which is true if #1 represents a float ref. That is, the magic
+% \lastsection value which we \setref above.
+%
+\def\iffloat#1{\expandafter\doiffloat#1==\finish}
+%
+% #1 is (maybe) the \floatmagic string. If so, #2 will be the
+% (safe) float type for this float. We set \iffloattype to #2.
+%
+\def\doiffloat#1=#2=#3\finish{%
+ \def\temp{#1}%
+ \def\iffloattype{#2}%
+ \ifx\temp\floatmagic
+}
+
+% @listoffloats FLOATTYPE - print a list of floats like a table of contents.
+%
+\parseargdef\listoffloats{%
+ \def\floattype{#1}% floattype
+ {%
+ % the floattype might have accents or other special characters,
+ % but we need to use it in a control sequence name.
+ \indexnofonts
+ \turnoffactive
+ \xdef\safefloattype{\floattype}%
+ }%
+ %
+ % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE.
+ \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax
+ \ifhavexrefs
+ % if the user said @listoffloats foo but never @float foo.
+ \message{\linenumber No `\safefloattype' floats to list.}%
+ \fi
+ \else
+ \begingroup
+ \leftskip=\tocindent % indent these entries like a toc
+ \let\do=\listoffloatsdo
+ \csname floatlist\safefloattype\endcsname
+ \endgroup
+ \fi
+}
+
+% This is called on each entry in a list of floats. We're passed the
+% xref label, in the form LABEL-title, which is how we save it in the
+% aux file. We strip off the -title and look up \XRLABEL-lof, which
+% has the text we're supposed to typeset here.
+%
+% Figures without xref labels will not be included in the list (since
+% they won't appear in the aux file).
+%
+\def\listoffloatsdo#1{\listoffloatsdoentry#1\finish}
+\def\listoffloatsdoentry#1-title\finish{{%
+ % Can't fully expand XR#1-lof because it can contain anything. Just
+ % pass the control sequence. On the other hand, XR#1-pg is just the
+ % page number, and we want to fully expand that so we can get a link
+ % in pdf output.
+ \toksA = \expandafter{\csname XR#1-lof\endcsname}%
+ %
+ % use the same \entry macro we use to generate the TOC and index.
+ \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}%
+ \writeentry
+}}
+
+
+\message{localization,}
+
+% For single-language documents, @documentlanguage is usually given very
+% early, just after @documentencoding. Single argument is the language
+% (de) or locale (de_DE) abbreviation.
+%
+{
+ \catcode`\_ = \active
+ \globaldefs=1
+\parseargdef\documentlanguage{\begingroup
+ \let_=\normalunderscore % normal _ character for filenames
+ \tex % read txi-??.tex file in plain TeX.
+ % Read the file by the name they passed if it exists.
+ \openin 1 txi-#1.tex
+ \ifeof 1
+ \documentlanguagetrywithoutunderscore{#1_\finish}%
+ \else
+ \globaldefs = 1 % everything in the txi-LL files needs to persist
+ \input txi-#1.tex
+ \fi
+ \closein 1
+ \endgroup % end raw TeX
+\endgroup}
+}
+%
+% If they passed de_DE, and txi-de_DE.tex doesn't exist,
+% try txi-de.tex.
+%
+\def\documentlanguagetrywithoutunderscore#1_#2\finish{%
+ \openin 1 txi-#1.tex
+ \ifeof 1
+ \errhelp = \nolanghelp
+ \errmessage{Cannot read language file txi-#1.tex}%
+ \else
+ \input txi-#1.tex
+ \fi
+ \closein 1
+}
+%
+\newhelp\nolanghelp{The given language definition file cannot be found or
+is empty. Maybe you need to install it? Putting it in the current
+directory should work if nowhere else does.}
+
+% This macro is called from txi-??.tex files; the first argument is the
+% \language name to set (without the "\lang@" prefix), the second and
+% third args are \{left,right}hyphenmin.
+%
+% The language names to pass are determined when the format is built.
+% See the etex.log file created at that time, e.g.,
+% /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
+%
+% With TeX Live 2008, etex now includes hyphenation patterns for all
+% available languages. This means we can support hyphenation in
+% Texinfo, at least to some extent. (This still doesn't solve the
+% accented characters problem.)
+%
+\catcode`@=11
+\def\txisetlanguage#1#2#3{%
+ % do not set the language if the name is undefined in the current TeX.
+ \expandafter\ifx\csname lang@#1\endcsname \relax
+ \message{no patterns for #1}%
+ \else
+ \global\language = \csname lang@#1\endcsname
+ \fi
+ % but there is no harm in adjusting the hyphenmin values regardless.
+ \global\lefthyphenmin = #2\relax
+ \global\righthyphenmin = #3\relax
+}
+
+% Helpers for encodings.
+% Set the catcode of characters 128 through 255 to the specified number.
+%
+\def\setnonasciicharscatcode#1{%
+ \count255=128
+ \loop\ifnum\count255<256
+ \global\catcode\count255=#1\relax
+ \advance\count255 by 1
+ \repeat
+}
+
+\def\setnonasciicharscatcodenonglobal#1{%
+ \count255=128
+ \loop\ifnum\count255<256
+ \catcode\count255=#1\relax
+ \advance\count255 by 1
+ \repeat
+}
+
+% @documentencoding sets the definition of non-ASCII characters
+% according to the specified encoding.
+%
+\parseargdef\documentencoding{%
+ % Encoding being declared for the document.
+ \def\declaredencoding{\csname #1.enc\endcsname}%
+ %
+ % Supported encodings: names converted to tokens in order to be able
+ % to compare them with \ifx.
+ \def\ascii{\csname US-ASCII.enc\endcsname}%
+ \def\latnine{\csname ISO-8859-15.enc\endcsname}%
+ \def\latone{\csname ISO-8859-1.enc\endcsname}%
+ \def\lattwo{\csname ISO-8859-2.enc\endcsname}%
+ \def\utfeight{\csname UTF-8.enc\endcsname}%
+ %
+ \ifx \declaredencoding \ascii
+ \asciichardefs
+ %
+ \else \ifx \declaredencoding \lattwo
+ \setnonasciicharscatcode\active
+ \lattwochardefs
+ %
+ \else \ifx \declaredencoding \latone
+ \setnonasciicharscatcode\active
+ \latonechardefs
+ %
+ \else \ifx \declaredencoding \latnine
+ \setnonasciicharscatcode\active
+ \latninechardefs
+ %
+ \else \ifx \declaredencoding \utfeight
+ \setnonasciicharscatcode\active
+ \utfeightchardefs
+ %
+ \else
+ \message{Unknown document encoding #1, ignoring.}%
+ %
+ \fi % utfeight
+ \fi % latnine
+ \fi % latone
+ \fi % lattwo
+ \fi % ascii
+}
+
+% A message to be logged when using a character that isn't available
+% the default font encoding (OT1).
+%
+\def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
+
+% Take account of \c (plain) vs. \, (Texinfo) difference.
+\def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi}
+
+% First, make active non-ASCII characters in order for them to be
+% correctly categorized when TeX reads the replacement text of
+% macros containing the character definitions.
+\setnonasciicharscatcode\active
+%
+% Latin1 (ISO-8859-1) character definitions.
+\def\latonechardefs{%
+ \gdef^^a0{~}
+ \gdef^^a1{\exclamdown}
+ \gdef^^a2{\missingcharmsg{CENT SIGN}}
+ \gdef^^a3{{\pounds}}
+ \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
+ \gdef^^a5{\missingcharmsg{YEN SIGN}}
+ \gdef^^a6{\missingcharmsg{BROKEN BAR}}
+ \gdef^^a7{\S}
+ \gdef^^a8{\"{}}
+ \gdef^^a9{\copyright}
+ \gdef^^aa{\ordf}
+ \gdef^^ab{\guillemetleft}
+ \gdef^^ac{$\lnot$}
+ \gdef^^ad{\-}
+ \gdef^^ae{\registeredsymbol}
+ \gdef^^af{\={}}
+ %
+ \gdef^^b0{\textdegree}
+ \gdef^^b1{$\pm$}
+ \gdef^^b2{$^2$}
+ \gdef^^b3{$^3$}
+ \gdef^^b4{\'{}}
+ \gdef^^b5{$\mu$}
+ \gdef^^b6{\P}
+ %
+ \gdef^^b7{$^.$}
+ \gdef^^b8{\cedilla\ }
+ \gdef^^b9{$^1$}
+ \gdef^^ba{\ordm}
+ %
+ \gdef^^bb{\guilletright}
+ \gdef^^bc{$1\over4$}
+ \gdef^^bd{$1\over2$}
+ \gdef^^be{$3\over4$}
+ \gdef^^bf{\questiondown}
+ %
+ \gdef^^c0{\`A}
+ \gdef^^c1{\'A}
+ \gdef^^c2{\^A}
+ \gdef^^c3{\~A}
+ \gdef^^c4{\"A}
+ \gdef^^c5{\ringaccent A}
+ \gdef^^c6{\AE}
+ \gdef^^c7{\cedilla C}
+ \gdef^^c8{\`E}
+ \gdef^^c9{\'E}
+ \gdef^^ca{\^E}
+ \gdef^^cb{\"E}
+ \gdef^^cc{\`I}
+ \gdef^^cd{\'I}
+ \gdef^^ce{\^I}
+ \gdef^^cf{\"I}
+ %
+ \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}}
+ \gdef^^d1{\~N}
+ \gdef^^d2{\`O}
+ \gdef^^d3{\'O}
+ \gdef^^d4{\^O}
+ \gdef^^d5{\~O}
+ \gdef^^d6{\"O}
+ \gdef^^d7{$\times$}
+ \gdef^^d8{\O}
+ \gdef^^d9{\`U}
+ \gdef^^da{\'U}
+ \gdef^^db{\^U}
+ \gdef^^dc{\"U}
+ \gdef^^dd{\'Y}
+ \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}}
+ \gdef^^df{\ss}
+ %
+ \gdef^^e0{\`a}
+ \gdef^^e1{\'a}
+ \gdef^^e2{\^a}
+ \gdef^^e3{\~a}
+ \gdef^^e4{\"a}
+ \gdef^^e5{\ringaccent a}
+ \gdef^^e6{\ae}
+ \gdef^^e7{\cedilla c}
+ \gdef^^e8{\`e}
+ \gdef^^e9{\'e}
+ \gdef^^ea{\^e}
+ \gdef^^eb{\"e}
+ \gdef^^ec{\`{\dotless i}}
+ \gdef^^ed{\'{\dotless i}}
+ \gdef^^ee{\^{\dotless i}}
+ \gdef^^ef{\"{\dotless i}}
+ %
+ \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}}
+ \gdef^^f1{\~n}
+ \gdef^^f2{\`o}
+ \gdef^^f3{\'o}
+ \gdef^^f4{\^o}
+ \gdef^^f5{\~o}
+ \gdef^^f6{\"o}
+ \gdef^^f7{$\div$}
+ \gdef^^f8{\o}
+ \gdef^^f9{\`u}
+ \gdef^^fa{\'u}
+ \gdef^^fb{\^u}
+ \gdef^^fc{\"u}
+ \gdef^^fd{\'y}
+ \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}}
+ \gdef^^ff{\"y}
+}
+
+% Latin9 (ISO-8859-15) encoding character definitions.
+\def\latninechardefs{%
+ % Encoding is almost identical to Latin1.
+ \latonechardefs
+ %
+ \gdef^^a4{\euro}
+ \gdef^^a6{\v S}
+ \gdef^^a8{\v s}
+ \gdef^^b4{\v Z}
+ \gdef^^b8{\v z}
+ \gdef^^bc{\OE}
+ \gdef^^bd{\oe}
+ \gdef^^be{\"Y}
+}
+
+% Latin2 (ISO-8859-2) character definitions.
+\def\lattwochardefs{%
+ \gdef^^a0{~}
+ \gdef^^a1{\ogonek{A}}
+ \gdef^^a2{\u{}}
+ \gdef^^a3{\L}
+ \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
+ \gdef^^a5{\v L}
+ \gdef^^a6{\'S}
+ \gdef^^a7{\S}
+ \gdef^^a8{\"{}}
+ \gdef^^a9{\v S}
+ \gdef^^aa{\cedilla S}
+ \gdef^^ab{\v T}
+ \gdef^^ac{\'Z}
+ \gdef^^ad{\-}
+ \gdef^^ae{\v Z}
+ \gdef^^af{\dotaccent Z}
+ %
+ \gdef^^b0{\textdegree}
+ \gdef^^b1{\ogonek{a}}
+ \gdef^^b2{\ogonek{ }}
+ \gdef^^b3{\l}
+ \gdef^^b4{\'{}}
+ \gdef^^b5{\v l}
+ \gdef^^b6{\'s}
+ \gdef^^b7{\v{}}
+ \gdef^^b8{\cedilla\ }
+ \gdef^^b9{\v s}
+ \gdef^^ba{\cedilla s}
+ \gdef^^bb{\v t}
+ \gdef^^bc{\'z}
+ \gdef^^bd{\H{}}
+ \gdef^^be{\v z}
+ \gdef^^bf{\dotaccent z}
+ %
+ \gdef^^c0{\'R}
+ \gdef^^c1{\'A}
+ \gdef^^c2{\^A}
+ \gdef^^c3{\u A}
+ \gdef^^c4{\"A}
+ \gdef^^c5{\'L}
+ \gdef^^c6{\'C}
+ \gdef^^c7{\cedilla C}
+ \gdef^^c8{\v C}
+ \gdef^^c9{\'E}
+ \gdef^^ca{\ogonek{E}}
+ \gdef^^cb{\"E}
+ \gdef^^cc{\v E}
+ \gdef^^cd{\'I}
+ \gdef^^ce{\^I}
+ \gdef^^cf{\v D}
+ %
+ \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}}
+ \gdef^^d1{\'N}
+ \gdef^^d2{\v N}
+ \gdef^^d3{\'O}
+ \gdef^^d4{\^O}
+ \gdef^^d5{\H O}
+ \gdef^^d6{\"O}
+ \gdef^^d7{$\times$}
+ \gdef^^d8{\v R}
+ \gdef^^d9{\ringaccent U}
+ \gdef^^da{\'U}
+ \gdef^^db{\H U}
+ \gdef^^dc{\"U}
+ \gdef^^dd{\'Y}
+ \gdef^^de{\cedilla T}
+ \gdef^^df{\ss}
+ %
+ \gdef^^e0{\'r}
+ \gdef^^e1{\'a}
+ \gdef^^e2{\^a}
+ \gdef^^e3{\u a}
+ \gdef^^e4{\"a}
+ \gdef^^e5{\'l}
+ \gdef^^e6{\'c}
+ \gdef^^e7{\cedilla c}
+ \gdef^^e8{\v c}
+ \gdef^^e9{\'e}
+ \gdef^^ea{\ogonek{e}}
+ \gdef^^eb{\"e}
+ \gdef^^ec{\v e}
+ \gdef^^ed{\'\i}
+ \gdef^^ee{\^\i}
+ \gdef^^ef{\v d}
+ %
+ \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}}
+ \gdef^^f1{\'n}
+ \gdef^^f2{\v n}
+ \gdef^^f3{\'o}
+ \gdef^^f4{\^o}
+ \gdef^^f5{\H o}
+ \gdef^^f6{\"o}
+ \gdef^^f7{$\div$}
+ \gdef^^f8{\v r}
+ \gdef^^f9{\ringaccent u}
+ \gdef^^fa{\'u}
+ \gdef^^fb{\H u}
+ \gdef^^fc{\"u}
+ \gdef^^fd{\'y}
+ \gdef^^fe{\cedilla t}
+ \gdef^^ff{\dotaccent{}}
+}
+
+% UTF-8 character definitions.
+%
+% This code to support UTF-8 is based on LaTeX's utf8.def, with some
+% changes for Texinfo conventions. It is included here under the GPL by
+% permission from Frank Mittelbach and the LaTeX team.
+%
+\newcount\countUTFx
+\newcount\countUTFy
+\newcount\countUTFz
+
+\gdef\UTFviiiTwoOctets#1#2{\expandafter
+ \UTFviiiDefined\csname u8:#1\string #2\endcsname}
+%
+\gdef\UTFviiiThreeOctets#1#2#3{\expandafter
+ \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname}
+%
+\gdef\UTFviiiFourOctets#1#2#3#4{\expandafter
+ \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname}
+
+\gdef\UTFviiiDefined#1{%
+ \ifx #1\relax
+ \message{\linenumber Unicode char \string #1 not defined for Texinfo}%
+ \else
+ \expandafter #1%
+ \fi
+}
+
+\begingroup
+ \catcode`\~13
+ \catcode`\"12
+
+ \def\UTFviiiLoop{%
+ \global\catcode\countUTFx\active
+ \uccode`\~\countUTFx
+ \uppercase\expandafter{\UTFviiiTmp}%
+ \advance\countUTFx by 1
+ \ifnum\countUTFx < \countUTFy
+ \expandafter\UTFviiiLoop
+ \fi}
+
+ \countUTFx = "C2
+ \countUTFy = "E0
+ \def\UTFviiiTmp{%
+ \xdef~{\noexpand\UTFviiiTwoOctets\string~}}
+ \UTFviiiLoop
+
+ \countUTFx = "E0
+ \countUTFy = "F0
+ \def\UTFviiiTmp{%
+ \xdef~{\noexpand\UTFviiiThreeOctets\string~}}
+ \UTFviiiLoop
+
+ \countUTFx = "F0
+ \countUTFy = "F4
+ \def\UTFviiiTmp{%
+ \xdef~{\noexpand\UTFviiiFourOctets\string~}}
+ \UTFviiiLoop
+\endgroup
+
+\begingroup
+ \catcode`\"=12
+ \catcode`\<=12
+ \catcode`\.=12
+ \catcode`\,=12
+ \catcode`\;=12
+ \catcode`\!=12
+ \catcode`\~=13
+
+ \gdef\DeclareUnicodeCharacter#1#2{%
+ \countUTFz = "#1\relax
+ \wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}%
+ \begingroup
+ \parseXMLCharref
+ \def\UTFviiiTwoOctets##1##2{%
+ \csname u8:##1\string ##2\endcsname}%
+ \def\UTFviiiThreeOctets##1##2##3{%
+ \csname u8:##1\string ##2\string ##3\endcsname}%
+ \def\UTFviiiFourOctets##1##2##3##4{%
+ \csname u8:##1\string ##2\string ##3\string ##4\endcsname}%
+ \expandafter\expandafter\expandafter\expandafter
+ \expandafter\expandafter\expandafter
+ \gdef\UTFviiiTmp{#2}%
+ \endgroup}
+
+ \gdef\parseXMLCharref{%
+ \ifnum\countUTFz < "A0\relax
+ \errhelp = \EMsimple
+ \errmessage{Cannot define Unicode char value < 00A0}%
+ \else\ifnum\countUTFz < "800\relax
+ \parseUTFviiiA,%
+ \parseUTFviiiB C\UTFviiiTwoOctets.,%
+ \else\ifnum\countUTFz < "10000\relax
+ \parseUTFviiiA;%
+ \parseUTFviiiA,%
+ \parseUTFviiiB E\UTFviiiThreeOctets.{,;}%
+ \else
+ \parseUTFviiiA;%
+ \parseUTFviiiA,%
+ \parseUTFviiiA!%
+ \parseUTFviiiB F\UTFviiiFourOctets.{!,;}%
+ \fi\fi\fi
+ }
+
+ \gdef\parseUTFviiiA#1{%
+ \countUTFx = \countUTFz
+ \divide\countUTFz by 64
+ \countUTFy = \countUTFz
+ \multiply\countUTFz by 64
+ \advance\countUTFx by -\countUTFz
+ \advance\countUTFx by 128
+ \uccode `#1\countUTFx
+ \countUTFz = \countUTFy}
+
+ \gdef\parseUTFviiiB#1#2#3#4{%
+ \advance\countUTFz by "#10\relax
+ \uccode `#3\countUTFz
+ \uppercase{\gdef\UTFviiiTmp{#2#3#4}}}
+\endgroup
+
+\def\utfeightchardefs{%
+ \DeclareUnicodeCharacter{00A0}{\tie}
+ \DeclareUnicodeCharacter{00A1}{\exclamdown}
+ \DeclareUnicodeCharacter{00A3}{\pounds}
+ \DeclareUnicodeCharacter{00A8}{\"{ }}
+ \DeclareUnicodeCharacter{00A9}{\copyright}
+ \DeclareUnicodeCharacter{00AA}{\ordf}
+ \DeclareUnicodeCharacter{00AB}{\guillemetleft}
+ \DeclareUnicodeCharacter{00AD}{\-}
+ \DeclareUnicodeCharacter{00AE}{\registeredsymbol}
+ \DeclareUnicodeCharacter{00AF}{\={ }}
+
+ \DeclareUnicodeCharacter{00B0}{\ringaccent{ }}
+ \DeclareUnicodeCharacter{00B4}{\'{ }}
+ \DeclareUnicodeCharacter{00B8}{\cedilla{ }}
+ \DeclareUnicodeCharacter{00BA}{\ordm}
+ \DeclareUnicodeCharacter{00BB}{\guillemetright}
+ \DeclareUnicodeCharacter{00BF}{\questiondown}
+
+ \DeclareUnicodeCharacter{00C0}{\`A}
+ \DeclareUnicodeCharacter{00C1}{\'A}
+ \DeclareUnicodeCharacter{00C2}{\^A}
+ \DeclareUnicodeCharacter{00C3}{\~A}
+ \DeclareUnicodeCharacter{00C4}{\"A}
+ \DeclareUnicodeCharacter{00C5}{\AA}
+ \DeclareUnicodeCharacter{00C6}{\AE}
+ \DeclareUnicodeCharacter{00C7}{\cedilla{C}}
+ \DeclareUnicodeCharacter{00C8}{\`E}
+ \DeclareUnicodeCharacter{00C9}{\'E}
+ \DeclareUnicodeCharacter{00CA}{\^E}
+ \DeclareUnicodeCharacter{00CB}{\"E}
+ \DeclareUnicodeCharacter{00CC}{\`I}
+ \DeclareUnicodeCharacter{00CD}{\'I}
+ \DeclareUnicodeCharacter{00CE}{\^I}
+ \DeclareUnicodeCharacter{00CF}{\"I}
+
+ \DeclareUnicodeCharacter{00D1}{\~N}
+ \DeclareUnicodeCharacter{00D2}{\`O}
+ \DeclareUnicodeCharacter{00D3}{\'O}
+ \DeclareUnicodeCharacter{00D4}{\^O}
+ \DeclareUnicodeCharacter{00D5}{\~O}
+ \DeclareUnicodeCharacter{00D6}{\"O}
+ \DeclareUnicodeCharacter{00D8}{\O}
+ \DeclareUnicodeCharacter{00D9}{\`U}
+ \DeclareUnicodeCharacter{00DA}{\'U}
+ \DeclareUnicodeCharacter{00DB}{\^U}
+ \DeclareUnicodeCharacter{00DC}{\"U}
+ \DeclareUnicodeCharacter{00DD}{\'Y}
+ \DeclareUnicodeCharacter{00DF}{\ss}
+
+ \DeclareUnicodeCharacter{00E0}{\`a}
+ \DeclareUnicodeCharacter{00E1}{\'a}
+ \DeclareUnicodeCharacter{00E2}{\^a}
+ \DeclareUnicodeCharacter{00E3}{\~a}
+ \DeclareUnicodeCharacter{00E4}{\"a}
+ \DeclareUnicodeCharacter{00E5}{\aa}
+ \DeclareUnicodeCharacter{00E6}{\ae}
+ \DeclareUnicodeCharacter{00E7}{\cedilla{c}}
+ \DeclareUnicodeCharacter{00E8}{\`e}
+ \DeclareUnicodeCharacter{00E9}{\'e}
+ \DeclareUnicodeCharacter{00EA}{\^e}
+ \DeclareUnicodeCharacter{00EB}{\"e}
+ \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}}
+ \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}}
+ \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
+ \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
+
+ \DeclareUnicodeCharacter{00F1}{\~n}
+ \DeclareUnicodeCharacter{00F2}{\`o}
+ \DeclareUnicodeCharacter{00F3}{\'o}
+ \DeclareUnicodeCharacter{00F4}{\^o}
+ \DeclareUnicodeCharacter{00F5}{\~o}
+ \DeclareUnicodeCharacter{00F6}{\"o}
+ \DeclareUnicodeCharacter{00F8}{\o}
+ \DeclareUnicodeCharacter{00F9}{\`u}
+ \DeclareUnicodeCharacter{00FA}{\'u}
+ \DeclareUnicodeCharacter{00FB}{\^u}
+ \DeclareUnicodeCharacter{00FC}{\"u}
+ \DeclareUnicodeCharacter{00FD}{\'y}
+ \DeclareUnicodeCharacter{00FF}{\"y}
+
+ \DeclareUnicodeCharacter{0100}{\=A}
+ \DeclareUnicodeCharacter{0101}{\=a}
+ \DeclareUnicodeCharacter{0102}{\u{A}}
+ \DeclareUnicodeCharacter{0103}{\u{a}}
+ \DeclareUnicodeCharacter{0104}{\ogonek{A}}
+ \DeclareUnicodeCharacter{0105}{\ogonek{a}}
+ \DeclareUnicodeCharacter{0106}{\'C}
+ \DeclareUnicodeCharacter{0107}{\'c}
+ \DeclareUnicodeCharacter{0108}{\^C}
+ \DeclareUnicodeCharacter{0109}{\^c}
+ \DeclareUnicodeCharacter{0118}{\ogonek{E}}
+ \DeclareUnicodeCharacter{0119}{\ogonek{e}}
+ \DeclareUnicodeCharacter{010A}{\dotaccent{C}}
+ \DeclareUnicodeCharacter{010B}{\dotaccent{c}}
+ \DeclareUnicodeCharacter{010C}{\v{C}}
+ \DeclareUnicodeCharacter{010D}{\v{c}}
+ \DeclareUnicodeCharacter{010E}{\v{D}}
+
+ \DeclareUnicodeCharacter{0112}{\=E}
+ \DeclareUnicodeCharacter{0113}{\=e}
+ \DeclareUnicodeCharacter{0114}{\u{E}}
+ \DeclareUnicodeCharacter{0115}{\u{e}}
+ \DeclareUnicodeCharacter{0116}{\dotaccent{E}}
+ \DeclareUnicodeCharacter{0117}{\dotaccent{e}}
+ \DeclareUnicodeCharacter{011A}{\v{E}}
+ \DeclareUnicodeCharacter{011B}{\v{e}}
+ \DeclareUnicodeCharacter{011C}{\^G}
+ \DeclareUnicodeCharacter{011D}{\^g}
+ \DeclareUnicodeCharacter{011E}{\u{G}}
+ \DeclareUnicodeCharacter{011F}{\u{g}}
+
+ \DeclareUnicodeCharacter{0120}{\dotaccent{G}}
+ \DeclareUnicodeCharacter{0121}{\dotaccent{g}}
+ \DeclareUnicodeCharacter{0124}{\^H}
+ \DeclareUnicodeCharacter{0125}{\^h}
+ \DeclareUnicodeCharacter{0128}{\~I}
+ \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}}
+ \DeclareUnicodeCharacter{012A}{\=I}
+ \DeclareUnicodeCharacter{012B}{\={\dotless{i}}}
+ \DeclareUnicodeCharacter{012C}{\u{I}}
+ \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}}
+
+ \DeclareUnicodeCharacter{0130}{\dotaccent{I}}
+ \DeclareUnicodeCharacter{0131}{\dotless{i}}
+ \DeclareUnicodeCharacter{0132}{IJ}
+ \DeclareUnicodeCharacter{0133}{ij}
+ \DeclareUnicodeCharacter{0134}{\^J}
+ \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}}
+ \DeclareUnicodeCharacter{0139}{\'L}
+ \DeclareUnicodeCharacter{013A}{\'l}
+
+ \DeclareUnicodeCharacter{0141}{\L}
+ \DeclareUnicodeCharacter{0142}{\l}
+ \DeclareUnicodeCharacter{0143}{\'N}
+ \DeclareUnicodeCharacter{0144}{\'n}
+ \DeclareUnicodeCharacter{0147}{\v{N}}
+ \DeclareUnicodeCharacter{0148}{\v{n}}
+ \DeclareUnicodeCharacter{014C}{\=O}
+ \DeclareUnicodeCharacter{014D}{\=o}
+ \DeclareUnicodeCharacter{014E}{\u{O}}
+ \DeclareUnicodeCharacter{014F}{\u{o}}
+
+ \DeclareUnicodeCharacter{0150}{\H{O}}
+ \DeclareUnicodeCharacter{0151}{\H{o}}
+ \DeclareUnicodeCharacter{0152}{\OE}
+ \DeclareUnicodeCharacter{0153}{\oe}
+ \DeclareUnicodeCharacter{0154}{\'R}
+ \DeclareUnicodeCharacter{0155}{\'r}
+ \DeclareUnicodeCharacter{0158}{\v{R}}
+ \DeclareUnicodeCharacter{0159}{\v{r}}
+ \DeclareUnicodeCharacter{015A}{\'S}
+ \DeclareUnicodeCharacter{015B}{\'s}
+ \DeclareUnicodeCharacter{015C}{\^S}
+ \DeclareUnicodeCharacter{015D}{\^s}
+ \DeclareUnicodeCharacter{015E}{\cedilla{S}}
+ \DeclareUnicodeCharacter{015F}{\cedilla{s}}
+
+ \DeclareUnicodeCharacter{0160}{\v{S}}
+ \DeclareUnicodeCharacter{0161}{\v{s}}
+ \DeclareUnicodeCharacter{0162}{\cedilla{t}}
+ \DeclareUnicodeCharacter{0163}{\cedilla{T}}
+ \DeclareUnicodeCharacter{0164}{\v{T}}
+
+ \DeclareUnicodeCharacter{0168}{\~U}
+ \DeclareUnicodeCharacter{0169}{\~u}
+ \DeclareUnicodeCharacter{016A}{\=U}
+ \DeclareUnicodeCharacter{016B}{\=u}
+ \DeclareUnicodeCharacter{016C}{\u{U}}
+ \DeclareUnicodeCharacter{016D}{\u{u}}
+ \DeclareUnicodeCharacter{016E}{\ringaccent{U}}
+ \DeclareUnicodeCharacter{016F}{\ringaccent{u}}
+
+ \DeclareUnicodeCharacter{0170}{\H{U}}
+ \DeclareUnicodeCharacter{0171}{\H{u}}
+ \DeclareUnicodeCharacter{0174}{\^W}
+ \DeclareUnicodeCharacter{0175}{\^w}
+ \DeclareUnicodeCharacter{0176}{\^Y}
+ \DeclareUnicodeCharacter{0177}{\^y}
+ \DeclareUnicodeCharacter{0178}{\"Y}
+ \DeclareUnicodeCharacter{0179}{\'Z}
+ \DeclareUnicodeCharacter{017A}{\'z}
+ \DeclareUnicodeCharacter{017B}{\dotaccent{Z}}
+ \DeclareUnicodeCharacter{017C}{\dotaccent{z}}
+ \DeclareUnicodeCharacter{017D}{\v{Z}}
+ \DeclareUnicodeCharacter{017E}{\v{z}}
+
+ \DeclareUnicodeCharacter{01C4}{D\v{Z}}
+ \DeclareUnicodeCharacter{01C5}{D\v{z}}
+ \DeclareUnicodeCharacter{01C6}{d\v{z}}
+ \DeclareUnicodeCharacter{01C7}{LJ}
+ \DeclareUnicodeCharacter{01C8}{Lj}
+ \DeclareUnicodeCharacter{01C9}{lj}
+ \DeclareUnicodeCharacter{01CA}{NJ}
+ \DeclareUnicodeCharacter{01CB}{Nj}
+ \DeclareUnicodeCharacter{01CC}{nj}
+ \DeclareUnicodeCharacter{01CD}{\v{A}}
+ \DeclareUnicodeCharacter{01CE}{\v{a}}
+ \DeclareUnicodeCharacter{01CF}{\v{I}}
+
+ \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}}
+ \DeclareUnicodeCharacter{01D1}{\v{O}}
+ \DeclareUnicodeCharacter{01D2}{\v{o}}
+ \DeclareUnicodeCharacter{01D3}{\v{U}}
+ \DeclareUnicodeCharacter{01D4}{\v{u}}
+
+ \DeclareUnicodeCharacter{01E2}{\={\AE}}
+ \DeclareUnicodeCharacter{01E3}{\={\ae}}
+ \DeclareUnicodeCharacter{01E6}{\v{G}}
+ \DeclareUnicodeCharacter{01E7}{\v{g}}
+ \DeclareUnicodeCharacter{01E8}{\v{K}}
+ \DeclareUnicodeCharacter{01E9}{\v{k}}
+
+ \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}}
+ \DeclareUnicodeCharacter{01F1}{DZ}
+ \DeclareUnicodeCharacter{01F2}{Dz}
+ \DeclareUnicodeCharacter{01F3}{dz}
+ \DeclareUnicodeCharacter{01F4}{\'G}
+ \DeclareUnicodeCharacter{01F5}{\'g}
+ \DeclareUnicodeCharacter{01F8}{\`N}
+ \DeclareUnicodeCharacter{01F9}{\`n}
+ \DeclareUnicodeCharacter{01FC}{\'{\AE}}
+ \DeclareUnicodeCharacter{01FD}{\'{\ae}}
+ \DeclareUnicodeCharacter{01FE}{\'{\O}}
+ \DeclareUnicodeCharacter{01FF}{\'{\o}}
+
+ \DeclareUnicodeCharacter{021E}{\v{H}}
+ \DeclareUnicodeCharacter{021F}{\v{h}}
+
+ \DeclareUnicodeCharacter{0226}{\dotaccent{A}}
+ \DeclareUnicodeCharacter{0227}{\dotaccent{a}}
+ \DeclareUnicodeCharacter{0228}{\cedilla{E}}
+ \DeclareUnicodeCharacter{0229}{\cedilla{e}}
+ \DeclareUnicodeCharacter{022E}{\dotaccent{O}}
+ \DeclareUnicodeCharacter{022F}{\dotaccent{o}}
+
+ \DeclareUnicodeCharacter{0232}{\=Y}
+ \DeclareUnicodeCharacter{0233}{\=y}
+ \DeclareUnicodeCharacter{0237}{\dotless{j}}
+
+ \DeclareUnicodeCharacter{02DB}{\ogonek{ }}
+
+ \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
+ \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
+ \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
+ \DeclareUnicodeCharacter{1E05}{\udotaccent{b}}
+ \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}}
+ \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}}
+ \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}}
+ \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}}
+ \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}}
+ \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}}
+ \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}}
+ \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}}
+
+ \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}}
+ \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}}
+
+ \DeclareUnicodeCharacter{1E20}{\=G}
+ \DeclareUnicodeCharacter{1E21}{\=g}
+ \DeclareUnicodeCharacter{1E22}{\dotaccent{H}}
+ \DeclareUnicodeCharacter{1E23}{\dotaccent{h}}
+ \DeclareUnicodeCharacter{1E24}{\udotaccent{H}}
+ \DeclareUnicodeCharacter{1E25}{\udotaccent{h}}
+ \DeclareUnicodeCharacter{1E26}{\"H}
+ \DeclareUnicodeCharacter{1E27}{\"h}
+
+ \DeclareUnicodeCharacter{1E30}{\'K}
+ \DeclareUnicodeCharacter{1E31}{\'k}
+ \DeclareUnicodeCharacter{1E32}{\udotaccent{K}}
+ \DeclareUnicodeCharacter{1E33}{\udotaccent{k}}
+ \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}}
+ \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}}
+ \DeclareUnicodeCharacter{1E36}{\udotaccent{L}}
+ \DeclareUnicodeCharacter{1E37}{\udotaccent{l}}
+ \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}}
+ \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}}
+ \DeclareUnicodeCharacter{1E3E}{\'M}
+ \DeclareUnicodeCharacter{1E3F}{\'m}
+
+ \DeclareUnicodeCharacter{1E40}{\dotaccent{M}}
+ \DeclareUnicodeCharacter{1E41}{\dotaccent{m}}
+ \DeclareUnicodeCharacter{1E42}{\udotaccent{M}}
+ \DeclareUnicodeCharacter{1E43}{\udotaccent{m}}
+ \DeclareUnicodeCharacter{1E44}{\dotaccent{N}}
+ \DeclareUnicodeCharacter{1E45}{\dotaccent{n}}
+ \DeclareUnicodeCharacter{1E46}{\udotaccent{N}}
+ \DeclareUnicodeCharacter{1E47}{\udotaccent{n}}
+ \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}}
+ \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}}
+
+ \DeclareUnicodeCharacter{1E54}{\'P}
+ \DeclareUnicodeCharacter{1E55}{\'p}
+ \DeclareUnicodeCharacter{1E56}{\dotaccent{P}}
+ \DeclareUnicodeCharacter{1E57}{\dotaccent{p}}
+ \DeclareUnicodeCharacter{1E58}{\dotaccent{R}}
+ \DeclareUnicodeCharacter{1E59}{\dotaccent{r}}
+ \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}}
+ \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}}
+ \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}}
+ \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}}
+
+ \DeclareUnicodeCharacter{1E60}{\dotaccent{S}}
+ \DeclareUnicodeCharacter{1E61}{\dotaccent{s}}
+ \DeclareUnicodeCharacter{1E62}{\udotaccent{S}}
+ \DeclareUnicodeCharacter{1E63}{\udotaccent{s}}
+ \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}}
+ \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}}
+ \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}}
+ \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}}
+ \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}}
+ \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}}
+
+ \DeclareUnicodeCharacter{1E7C}{\~V}
+ \DeclareUnicodeCharacter{1E7D}{\~v}
+ \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}}
+ \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}}
+
+ \DeclareUnicodeCharacter{1E80}{\`W}
+ \DeclareUnicodeCharacter{1E81}{\`w}
+ \DeclareUnicodeCharacter{1E82}{\'W}
+ \DeclareUnicodeCharacter{1E83}{\'w}
+ \DeclareUnicodeCharacter{1E84}{\"W}
+ \DeclareUnicodeCharacter{1E85}{\"w}
+ \DeclareUnicodeCharacter{1E86}{\dotaccent{W}}
+ \DeclareUnicodeCharacter{1E87}{\dotaccent{w}}
+ \DeclareUnicodeCharacter{1E88}{\udotaccent{W}}
+ \DeclareUnicodeCharacter{1E89}{\udotaccent{w}}
+ \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}}
+ \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}}
+ \DeclareUnicodeCharacter{1E8C}{\"X}
+ \DeclareUnicodeCharacter{1E8D}{\"x}
+ \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}}
+ \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}}
+
+ \DeclareUnicodeCharacter{1E90}{\^Z}
+ \DeclareUnicodeCharacter{1E91}{\^z}
+ \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}}
+ \DeclareUnicodeCharacter{1E93}{\udotaccent{z}}
+ \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}}
+ \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}}
+ \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}}
+ \DeclareUnicodeCharacter{1E97}{\"t}
+ \DeclareUnicodeCharacter{1E98}{\ringaccent{w}}
+ \DeclareUnicodeCharacter{1E99}{\ringaccent{y}}
+
+ \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}}
+ \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}}
+
+ \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}}
+ \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}}
+ \DeclareUnicodeCharacter{1EBC}{\~E}
+ \DeclareUnicodeCharacter{1EBD}{\~e}
+
+ \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}}
+ \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}}
+ \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}}
+ \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}}
+
+ \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}}
+ \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}}
+
+ \DeclareUnicodeCharacter{1EF2}{\`Y}
+ \DeclareUnicodeCharacter{1EF3}{\`y}
+ \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}}
+
+ \DeclareUnicodeCharacter{1EF8}{\~Y}
+ \DeclareUnicodeCharacter{1EF9}{\~y}
+
+ \DeclareUnicodeCharacter{2013}{--}
+ \DeclareUnicodeCharacter{2014}{---}
+ \DeclareUnicodeCharacter{2018}{\quoteleft}
+ \DeclareUnicodeCharacter{2019}{\quoteright}
+ \DeclareUnicodeCharacter{201A}{\quotesinglbase}
+ \DeclareUnicodeCharacter{201C}{\quotedblleft}
+ \DeclareUnicodeCharacter{201D}{\quotedblright}
+ \DeclareUnicodeCharacter{201E}{\quotedblbase}
+ \DeclareUnicodeCharacter{2022}{\bullet}
+ \DeclareUnicodeCharacter{2026}{\dots}
+ \DeclareUnicodeCharacter{2039}{\guilsinglleft}
+ \DeclareUnicodeCharacter{203A}{\guilsinglright}
+ \DeclareUnicodeCharacter{20AC}{\euro}
+
+ \DeclareUnicodeCharacter{2192}{\expansion}
+ \DeclareUnicodeCharacter{21D2}{\result}
+
+ \DeclareUnicodeCharacter{2212}{\minus}
+ \DeclareUnicodeCharacter{2217}{\point}
+ \DeclareUnicodeCharacter{2261}{\equiv}
+}% end of \utfeightchardefs
+
+
+% US-ASCII character definitions.
+\def\asciichardefs{% nothing need be done
+ \relax
+}
+
+% Make non-ASCII characters printable again for compatibility with
+% existing Texinfo documents that may use them, even without declaring a
+% document encoding.
+%
+\setnonasciicharscatcode \other
+
+
+\message{formatting,}
+
+\newdimen\defaultparindent \defaultparindent = 15pt
+
+\chapheadingskip = 15pt plus 4pt minus 2pt
+\secheadingskip = 12pt plus 3pt minus 2pt
+\subsecheadingskip = 9pt plus 2pt minus 2pt
+
+% Prevent underfull vbox error messages.
+\vbadness = 10000
+
+% Don't be so finicky about underfull hboxes, either.
+\hbadness = 2000
+
+% Following George Bush, get rid of widows and orphans.
+\widowpenalty=10000
+\clubpenalty=10000
+
+% Use TeX 3.0's \emergencystretch to help line breaking, but if we're
+% using an old version of TeX, don't do anything. We want the amount of
+% stretch added to depend on the line length, hence the dependence on
+% \hsize. We call this whenever the paper size is set.
+%
+\def\setemergencystretch{%
+ \ifx\emergencystretch\thisisundefined
+ % Allow us to assign to \emergencystretch anyway.
+ \def\emergencystretch{\dimen0}%
+ \else
+ \emergencystretch = .15\hsize
+ \fi
+}
+
+% Parameters in order: 1) textheight; 2) textwidth;
+% 3) voffset; 4) hoffset; 5) binding offset; 6) topskip;
+% 7) physical page height; 8) physical page width.
+%
+% We also call \setleading{\textleading}, so the caller should define
+% \textleading. The caller should also set \parskip.
+%
+\def\internalpagesizes#1#2#3#4#5#6#7#8{%
+ \voffset = #3\relax
+ \topskip = #6\relax
+ \splittopskip = \topskip
+ %
+ \vsize = #1\relax
+ \advance\vsize by \topskip
+ \outervsize = \vsize
+ \advance\outervsize by 2\topandbottommargin
+ \pageheight = \vsize
+ %
+ \hsize = #2\relax
+ \outerhsize = \hsize
+ \advance\outerhsize by 0.5in
+ \pagewidth = \hsize
+ %
+ \normaloffset = #4\relax
+ \bindingoffset = #5\relax
+ %
+ \ifpdf
+ \pdfpageheight #7\relax
+ \pdfpagewidth #8\relax
+ % if we don't reset these, they will remain at "1 true in" of
+ % whatever layout pdftex was dumped with.
+ \pdfhorigin = 1 true in
+ \pdfvorigin = 1 true in
+ \fi
+ %
+ \setleading{\textleading}
+ %
+ \parindent = \defaultparindent
+ \setemergencystretch
+}
+
+% @letterpaper (the default).
+\def\letterpaper{{\globaldefs = 1
+ \parskip = 3pt plus 2pt minus 1pt
+ \textleading = 13.2pt
+ %
+ % If page is nothing but text, make it come out even.
+ \internalpagesizes{607.2pt}{6in}% that's 46 lines
+ {\voffset}{.25in}%
+ {\bindingoffset}{36pt}%
+ {11in}{8.5in}%
+}}
+
+% Use @smallbook to reset parameters for 7x9.25 trim size.
+\def\smallbook{{\globaldefs = 1
+ \parskip = 2pt plus 1pt
+ \textleading = 12pt
+ %
+ \internalpagesizes{7.5in}{5in}%
+ {-.2in}{0in}%
+ {\bindingoffset}{16pt}%
+ {9.25in}{7in}%
+ %
+ \lispnarrowing = 0.3in
+ \tolerance = 700
+ \hfuzz = 1pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = .5cm
+}}
+
+% Use @smallerbook to reset parameters for 6x9 trim size.
+% (Just testing, parameters still in flux.)
+\def\smallerbook{{\globaldefs = 1
+ \parskip = 1.5pt plus 1pt
+ \textleading = 12pt
+ %
+ \internalpagesizes{7.4in}{4.8in}%
+ {-.2in}{-.4in}%
+ {0pt}{14pt}%
+ {9in}{6in}%
+ %
+ \lispnarrowing = 0.25in
+ \tolerance = 700
+ \hfuzz = 1pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = .4cm
+}}
+
+% Use @afourpaper to print on European A4 paper.
+\def\afourpaper{{\globaldefs = 1
+ \parskip = 3pt plus 2pt minus 1pt
+ \textleading = 13.2pt
+ %
+ % Double-side printing via postscript on Laserjet 4050
+ % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm.
+ % To change the settings for a different printer or situation, adjust
+ % \normaloffset until the front-side and back-side texts align. Then
+ % do the same for \bindingoffset. You can set these for testing in
+ % your texinfo source file like this:
+ % @tex
+ % \global\normaloffset = -6mm
+ % \global\bindingoffset = 10mm
+ % @end tex
+ \internalpagesizes{673.2pt}{160mm}% that's 51 lines
+ {\voffset}{\hoffset}%
+ {\bindingoffset}{44pt}%
+ {297mm}{210mm}%
+ %
+ \tolerance = 700
+ \hfuzz = 1pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = 5mm
+}}
+
+% Use @afivepaper to print on European A5 paper.
+% From romildo@urano.iceb.ufop.br, 2 July 2000.
+% He also recommends making @example and @lisp be small.
+\def\afivepaper{{\globaldefs = 1
+ \parskip = 2pt plus 1pt minus 0.1pt
+ \textleading = 12.5pt
+ %
+ \internalpagesizes{160mm}{120mm}%
+ {\voffset}{\hoffset}%
+ {\bindingoffset}{8pt}%
+ {210mm}{148mm}%
+ %
+ \lispnarrowing = 0.2in
+ \tolerance = 800
+ \hfuzz = 1.2pt
+ \contentsrightmargin = 0pt
+ \defbodyindent = 2mm
+ \tableindent = 12mm
+}}
+
+% A specific text layout, 24x15cm overall, intended for A4 paper.
+\def\afourlatex{{\globaldefs = 1
+ \afourpaper
+ \internalpagesizes{237mm}{150mm}%
+ {\voffset}{4.6mm}%
+ {\bindingoffset}{7mm}%
+ {297mm}{210mm}%
+ %
+ % Must explicitly reset to 0 because we call \afourpaper.
+ \globaldefs = 0
+}}
+
+% Use @afourwide to print on A4 paper in landscape format.
+\def\afourwide{{\globaldefs = 1
+ \afourpaper
+ \internalpagesizes{241mm}{165mm}%
+ {\voffset}{-2.95mm}%
+ {\bindingoffset}{7mm}%
+ {297mm}{210mm}%
+ \globaldefs = 0
+}}
+
+% @pagesizes TEXTHEIGHT[,TEXTWIDTH]
+% Perhaps we should allow setting the margins, \topskip, \parskip,
+% and/or leading, also. Or perhaps we should compute them somehow.
+%
+\parseargdef\pagesizes{\pagesizesyyy #1,,\finish}
+\def\pagesizesyyy#1,#2,#3\finish{{%
+ \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi
+ \globaldefs = 1
+ %
+ \parskip = 3pt plus 2pt minus 1pt
+ \setleading{\textleading}%
+ %
+ \dimen0 = #1\relax
+ \advance\dimen0 by \voffset
+ %
+ \dimen2 = \hsize
+ \advance\dimen2 by \normaloffset
+ %
+ \internalpagesizes{#1}{\hsize}%
+ {\voffset}{\normaloffset}%
+ {\bindingoffset}{44pt}%
+ {\dimen0}{\dimen2}%
+}}
+
+% Set default to letter.
+%
+\letterpaper
+
+
+\message{and turning on texinfo input format.}
+
+% DEL is a comment character, in case @c does not suffice.
+\catcode`\^^? = 14
+
+% Define macros to output various characters with catcode for normal text.
+\catcode`\"=\other
+\catcode`\~=\other
+\catcode`\^=\other
+\catcode`\_=\other
+\catcode`\|=\other
+\catcode`\<=\other
+\catcode`\>=\other
+\catcode`\+=\other
+\catcode`\$=\other
+\def\normaldoublequote{"}
+\def\normaltilde{~}
+\def\normalcaret{^}
+\def\normalunderscore{_}
+\def\normalverticalbar{|}
+\def\normalless{<}
+\def\normalgreater{>}
+\def\normalplus{+}
+\def\normaldollar{$}%$ font-lock fix
+
+% This macro is used to make a character print one way in \tt
+% (where it can probably be output as-is), and another way in other fonts,
+% where something hairier probably needs to be done.
+%
+% #1 is what to print if we are indeed using \tt; #2 is what to print
+% otherwise. Since all the Computer Modern typewriter fonts have zero
+% interword stretch (and shrink), and it is reasonable to expect all
+% typewriter fonts to have this, we can check that font parameter.
+%
+\def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi}
+
+% Same as above, but check for italic font. Actually this also catches
+% non-italic slanted fonts since it is impossible to distinguish them from
+% italic fonts. But since this is only used by $ and it uses \sl anyway
+% this is not a problem.
+\def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi}
+
+% Turn off all special characters except @
+% (and those which the user can use as if they were ordinary).
+% Most of these we simply print from the \tt font, but for some, we can
+% use math or other variants that look better in normal text.
+
+\catcode`\"=\active
+\def\activedoublequote{{\tt\char34}}
+\let"=\activedoublequote
+\catcode`\~=\active
+\def~{{\tt\char126}}
+\chardef\hat=`\^
+\catcode`\^=\active
+\def^{{\tt \hat}}
+
+\catcode`\_=\active
+\def_{\ifusingtt\normalunderscore\_}
+\let\realunder=_
+% Subroutine for the previous macro.
+\def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em }
+
+\catcode`\|=\active
+\def|{{\tt\char124}}
+\chardef \less=`\<
+\catcode`\<=\active
+\def<{{\tt \less}}
+\chardef \gtr=`\>
+\catcode`\>=\active
+\def>{{\tt \gtr}}
+\catcode`\+=\active
+\def+{{\tt \char 43}}
+\catcode`\$=\active
+\def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix
+
+% If a .fmt file is being used, characters that might appear in a file
+% name cannot be active until we have parsed the command line.
+% So turn them off again, and have \everyjob (or @setfilename) turn them on.
+% \otherifyactive is called near the end of this file.
+\def\otherifyactive{\catcode`+=\other \catcode`\_=\other}
+
+% Used sometimes to turn off (effectively) the active characters even after
+% parsing them.
+\def\turnoffactive{%
+ \normalturnoffactive
+ \otherbackslash
+}
+
+\catcode`\@=0
+
+% \backslashcurfont outputs one backslash character in current font,
+% as in \char`\\.
+\global\chardef\backslashcurfont=`\\
+\global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work
+
+% \realbackslash is an actual character `\' with catcode other, and
+% \doublebackslash is two of them (for the pdf outlines).
+{\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}}
+
+% In texinfo, backslash is an active character; it prints the backslash
+% in fixed width font.
+\catcode`\\=\active
+@def@normalbackslash{{@tt@backslashcurfont}}
+% On startup, @fixbackslash assigns:
+% @let \ = @normalbackslash
+
+% \rawbackslash defines an active \ to do \backslashcurfont.
+% \otherbackslash defines an active \ to be a literal `\' character with
+% catcode other.
+@gdef@rawbackslash{@let\=@backslashcurfont}
+@gdef@otherbackslash{@let\=@realbackslash}
+
+% Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
+% the literal character `\'.
+%
+@def@normalturnoffactive{%
+ @let\=@normalbackslash
+ @let"=@normaldoublequote
+ @let~=@normaltilde
+ @let^=@normalcaret
+ @let_=@normalunderscore
+ @let|=@normalverticalbar
+ @let<=@normalless
+ @let>=@normalgreater
+ @let+=@normalplus
+ @let$=@normaldollar %$ font-lock fix
+ @markupsetuplqdefault
+ @markupsetuprqdefault
+ @unsepspaces
+}
+
+% Make _ and + \other characters, temporarily.
+% This is canceled by @fixbackslash.
+@otherifyactive
+
+% If a .fmt file is being used, we don't want the `\input texinfo' to show up.
+% That is what \eatinput is for; after that, the `\' should revert to printing
+% a backslash.
+%
+@gdef@eatinput input texinfo{@fixbackslash}
+@global@let\ = @eatinput
+
+% On the other hand, perhaps the file did not have a `\input texinfo'. Then
+% the first `\' in the file would cause an error. This macro tries to fix
+% that, assuming it is called before the first `\' could plausibly occur.
+% Also turn back on active characters that might appear in the input
+% file name, in case not using a pre-dumped format.
+%
+@gdef@fixbackslash{%
+ @ifx\@eatinput @let\ = @normalbackslash @fi
+ @catcode`+=@active
+ @catcode`@_=@active
+}
+
+% Say @foo, not \foo, in error messages.
+@escapechar = `@@
+
+% These look ok in all fonts, so just make them not special.
+@catcode`@& = @other
+@catcode`@# = @other
+@catcode`@% = @other
+
+@c Finally, make ` and ' active, so that txicodequoteundirected and
+@c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we
+@c don't make ` and ' active, @code will not get them as active chars.
+@c Do this last of all since we use ` in the previous @catcode assignments.
+@catcode`@'=@active
+@catcode`@`=@active
+@markupsetuplqdefault
+@markupsetuprqdefault
+
+@c Local variables:
+@c eval: (add-hook 'write-file-hooks 'time-stamp)
+@c page-delimiter: "^\\\\message"
+@c time-stamp-start: "def\\\\texinfoversion{"
+@c time-stamp-format: "%:y-%02m-%02d.%02H"
+@c time-stamp-end: "}"
+@c End:
+
+@c vim:sw=2:
+
+@ignore
+ arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115
+@end ignore
diff --git a/doc/version.texi b/doc/version.texi
new file mode 100644
index 0000000..80a2209
--- /dev/null
+++ b/doc/version.texi
@@ -0,0 +1,10 @@
+@ignore
+Copyright (C) 1988-2009 Free Software Foundation, Inc.
+@end ignore
+
+@set LASTCHANGE Wed Dec 23 16:29:41 EST 2009
+
+@set EDITION 4.1
+@set VERSION 4.1
+@set UPDATED 23 December 2009
+@set UPDATED-MONTH December 2009
diff --git a/error.c b/error.c
new file mode 100644
index 0000000..72da9f5
--- /dev/null
+++ b/error.c
@@ -0,0 +1,455 @@
+/* error.c -- Functions for handling errors. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+#include <fcntl.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#if defined (PREFER_STDARG)
+# include <stdarg.h>
+#else
+# include <varargs.h>
+#endif
+
+#include <stdio.h>
+
+#include <errno.h>
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+#include "bashansi.h"
+#include "bashintl.h"
+
+#include "shell.h"
+#include "flags.h"
+#include "input.h"
+
+#if defined (HISTORY)
+# include "bashhist.h"
+#endif
+
+extern int executing_line_number __P((void));
+
+extern int last_command_exit_value;
+extern char *shell_name;
+#if defined (JOB_CONTROL)
+extern pid_t shell_pgrp;
+extern int give_terminal_to __P((pid_t, int));
+#endif /* JOB_CONTROL */
+
+#if defined (ARRAY_VARS)
+extern const char * const bash_badsub_errmsg;
+#endif
+
+static void error_prolog __P((int));
+
+/* The current maintainer of the shell. You change this in the
+ Makefile. */
+#if !defined (MAINTAINER)
+#define MAINTAINER "bash-maintainers@gnu.org"
+#endif
+
+const char * const the_current_maintainer = MAINTAINER;
+
+int gnu_error_format = 0;
+
+static void
+error_prolog (print_lineno)
+ int print_lineno;
+{
+ char *ename;
+ int line;
+
+ ename = get_name_for_error ();
+ line = (print_lineno && interactive_shell == 0) ? executing_line_number () : -1;
+
+ if (line > 0)
+ fprintf (stderr, "%s:%s%d: ", ename, gnu_error_format ? "" : _(" line "), line);
+ else
+ fprintf (stderr, "%s: ", ename);
+}
+
+/* Return the name of the shell or the shell script for error reporting. */
+char *
+get_name_for_error ()
+{
+ char *name;
+#if defined (ARRAY_VARS)
+ SHELL_VAR *bash_source_v;
+ ARRAY *bash_source_a;
+#endif
+
+ name = (char *)NULL;
+ if (interactive_shell == 0)
+ {
+#if defined (ARRAY_VARS)
+ bash_source_v = find_variable ("BASH_SOURCE");
+ if (bash_source_v && array_p (bash_source_v) &&
+ (bash_source_a = array_cell (bash_source_v)))
+ name = array_reference (bash_source_a, 0);
+ if (name == 0 || *name == '\0') /* XXX - was just name == 0 */
+#endif
+ name = dollar_vars[0];
+ }
+ if (name == 0 && shell_name && *shell_name)
+ name = base_pathname (shell_name);
+ if (name == 0)
+#if defined (PROGRAM)
+ name = PROGRAM;
+#else
+ name = "bash";
+#endif
+
+ return (name);
+}
+
+/* Report an error having to do with FILENAME. This does not use
+ sys_error so the filename is not interpreted as a printf-style
+ format string. */
+void
+file_error (filename)
+ const char *filename;
+{
+ report_error ("%s: %s", filename, strerror (errno));
+}
+
+void
+#if defined (PREFER_STDARG)
+programming_error (const char *format, ...)
+#else
+programming_error (format, va_alist)
+ const char *format;
+ va_dcl
+#endif
+{
+ va_list args;
+ char *h;
+
+#if defined (JOB_CONTROL)
+ give_terminal_to (shell_pgrp, 0);
+#endif /* JOB_CONTROL */
+
+ SH_VA_START (args, format);
+
+ vfprintf (stderr, format, args);
+ fprintf (stderr, "\n");
+ va_end (args);
+
+#if defined (HISTORY)
+ if (remember_on_history)
+ {
+ h = last_history_line ();
+ fprintf (stderr, _("last command: %s\n"), h ? h : "(null)");
+ }
+#endif
+
+#if 0
+ fprintf (stderr, "Report this to %s\n", the_current_maintainer);
+#endif
+
+ fprintf (stderr, _("Aborting..."));
+ fflush (stderr);
+
+ abort ();
+}
+
+/* Print an error message and, if `set -e' has been executed, exit the
+ shell. Used in this file by file_error and programming_error. Used
+ outside this file mostly to report substitution and expansion errors,
+ and for bad invocation options. */
+void
+#if defined (PREFER_STDARG)
+report_error (const char *format, ...)
+#else
+report_error (format, va_alist)
+ const char *format;
+ va_dcl
+#endif
+{
+ va_list args;
+
+ error_prolog (1);
+
+ SH_VA_START (args, format);
+
+ vfprintf (stderr, format, args);
+ fprintf (stderr, "\n");
+
+ va_end (args);
+ if (exit_immediately_on_error)
+ exit_shell (1);
+}
+
+void
+#if defined (PREFER_STDARG)
+fatal_error (const char *format, ...)
+#else
+fatal_error (format, va_alist)
+ const char *format;
+ va_dcl
+#endif
+{
+ va_list args;
+
+ error_prolog (0);
+
+ SH_VA_START (args, format);
+
+ vfprintf (stderr, format, args);
+ fprintf (stderr, "\n");
+
+ va_end (args);
+ sh_exit (2);
+}
+
+void
+#if defined (PREFER_STDARG)
+internal_error (const char *format, ...)
+#else
+internal_error (format, va_alist)
+ const char *format;
+ va_dcl
+#endif
+{
+ va_list args;
+
+ error_prolog (1);
+
+ SH_VA_START (args, format);
+
+ vfprintf (stderr, format, args);
+ fprintf (stderr, "\n");
+
+ va_end (args);
+}
+
+void
+#if defined (PREFER_STDARG)
+internal_warning (const char *format, ...)
+#else
+internal_warning (format, va_alist)
+ const char *format;
+ va_dcl
+#endif
+{
+ va_list args;
+
+ error_prolog (1);
+ fprintf (stderr, _("warning: "));
+
+ SH_VA_START (args, format);
+
+ vfprintf (stderr, format, args);
+ fprintf (stderr, "\n");
+
+ va_end (args);
+}
+
+void
+#if defined (PREFER_STDARG)
+sys_error (const char *format, ...)
+#else
+sys_error (format, va_alist)
+ const char *format;
+ va_dcl
+#endif
+{
+ int e;
+ va_list args;
+
+ e = errno;
+ error_prolog (0);
+
+ SH_VA_START (args, format);
+
+ vfprintf (stderr, format, args);
+ fprintf (stderr, ": %s\n", strerror (e));
+
+ va_end (args);
+}
+
+/* An error from the parser takes the general form
+
+ shell_name: input file name: line number: message
+
+ The input file name and line number are omitted if the shell is
+ currently interactive. If the shell is not currently interactive,
+ the input file name is inserted only if it is different from the
+ shell name. */
+void
+#if defined (PREFER_STDARG)
+parser_error (int lineno, const char *format, ...)
+#else
+parser_error (lineno, format, va_alist)
+ int lineno;
+ const char *format;
+ va_dcl
+#endif
+{
+ va_list args;
+ char *ename, *iname;
+
+ ename = get_name_for_error ();
+ iname = yy_input_name ();
+
+ if (interactive)
+ fprintf (stderr, "%s: ", ename);
+ else if (interactive_shell)
+ fprintf (stderr, "%s: %s:%s%d: ", ename, iname, gnu_error_format ? "" : _(" line "), lineno);
+ else if (STREQ (ename, iname))
+ fprintf (stderr, "%s:%s%d: ", ename, gnu_error_format ? "" : _(" line "), lineno);
+ else
+ fprintf (stderr, "%s: %s:%s%d: ", ename, iname, gnu_error_format ? "" : _(" line "), lineno);
+
+ SH_VA_START (args, format);
+
+ vfprintf (stderr, format, args);
+ fprintf (stderr, "\n");
+
+ va_end (args);
+
+ if (exit_immediately_on_error)
+ exit_shell (last_command_exit_value = 2);
+}
+
+#ifdef DEBUG
+void
+#if defined (PREFER_STDARG)
+itrace (const char *format, ...)
+#else
+itrace (format, va_alist)
+ const char *format;
+ va_dcl
+#endif
+{
+ va_list args;
+
+ fprintf(stderr, "TRACE: pid %ld: ", (long)getpid());
+
+ SH_VA_START (args, format);
+
+ vfprintf (stderr, format, args);
+ fprintf (stderr, "\n");
+
+ va_end (args);
+
+ fflush(stderr);
+}
+
+/* A trace function for silent debugging -- doesn't require a control
+ terminal. */
+void
+#if defined (PREFER_STDARG)
+trace (const char *format, ...)
+#else
+trace (format, va_alist)
+ const char *format;
+ va_dcl
+#endif
+{
+ va_list args;
+ static FILE *tracefp = (FILE *)NULL;
+
+ if (tracefp == NULL)
+ tracefp = fopen("/tmp/bash-trace.log", "a+");
+
+ if (tracefp == NULL)
+ tracefp = stderr;
+ else
+ fcntl (fileno (tracefp), F_SETFD, 1); /* close-on-exec */
+
+ fprintf(tracefp, "TRACE: pid %ld: ", (long)getpid());
+
+ SH_VA_START (args, format);
+
+ vfprintf (tracefp, format, args);
+ fprintf (tracefp, "\n");
+
+ va_end (args);
+
+ fflush(tracefp);
+}
+
+#endif /* DEBUG */
+
+/* **************************************************************** */
+/* */
+/* Common error reporting */
+/* */
+/* **************************************************************** */
+
+
+static const char * const cmd_error_table[] = {
+ N_("unknown command error"), /* CMDERR_DEFAULT */
+ N_("bad command type"), /* CMDERR_BADTYPE */
+ N_("bad connector"), /* CMDERR_BADCONN */
+ N_("bad jump"), /* CMDERR_BADJUMP */
+ 0
+};
+
+void
+command_error (func, code, e, flags)
+ const char *func;
+ int code, e, flags; /* flags currently unused */
+{
+ if (code > CMDERR_LAST)
+ code = CMDERR_DEFAULT;
+
+ programming_error ("%s: %s: %d", func, _(cmd_error_table[code]), e);
+}
+
+char *
+command_errstr (code)
+ int code;
+{
+ if (code > CMDERR_LAST)
+ code = CMDERR_DEFAULT;
+
+ return (_(cmd_error_table[code]));
+}
+
+#ifdef ARRAY_VARS
+void
+err_badarraysub (s)
+ const char *s;
+{
+ report_error ("%s: %s", s, _(bash_badsub_errmsg));
+}
+#endif
+
+void
+err_unboundvar (s)
+ const char *s;
+{
+ report_error (_("%s: unbound variable"), s);
+}
+
+void
+err_readonly (s)
+ const char *s;
+{
+ report_error (_("%s: readonly variable"), s);
+}
diff --git a/error.h b/error.h
new file mode 100644
index 0000000..e79ba3e
--- /dev/null
+++ b/error.h
@@ -0,0 +1,69 @@
+/* error.h -- External declarations of functions appearing in error.c. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_ERROR_H_)
+#define _ERROR_H_
+
+#include "stdc.h"
+
+/* Get the name of the shell or shell script for an error message. */
+extern char *get_name_for_error __P((void));
+
+/* Report an error having to do with FILENAME. */
+extern void file_error __P((const char *));
+
+/* Report a programmer's error, and abort. Pass REASON, and ARG1 ... ARG5. */
+extern void programming_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2)));
+
+/* General error reporting. Pass FORMAT and ARG1 ... ARG5. */
+extern void report_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2)));
+
+/* Error messages for parts of the parser that don't call report_syntax_error */
+extern void parser_error __P((int, const char *, ...)) __attribute__((__format__ (printf, 2, 3)));
+
+/* Report an unrecoverable error and exit. Pass FORMAT and ARG1 ... ARG5. */
+extern void fatal_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2)));
+
+/* Report a system error, like BSD warn(3). */
+extern void sys_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2)));
+
+/* Report an internal error. */
+extern void internal_error __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2)));
+
+/* Report an internal warning. */
+extern void internal_warning __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2)));
+
+/* Debugging functions, not enabled in released version. */
+extern void itrace __P((const char *, ...)) __attribute__ ((__format__ (printf, 1, 2)));
+extern void trace __P((const char *, ...)) __attribute__ ((__format__ (printf, 1, 2)));
+
+/* Report an error having to do with command parsing or execution. */
+extern void command_error __P((const char *, int, int, int));
+
+extern char *command_errstr __P((int));
+
+/* Specific errror message functions that eventually call report_error or
+ internal_error. */
+
+extern void err_badarraysub __P((const char *));
+extern void err_unboundvar __P((const char *));
+extern void err_readonly __P((const char *));
+
+#endif /* !_ERROR_H_ */
diff --git a/eval.c b/eval.c
new file mode 100644
index 0000000..9011e0b
--- /dev/null
+++ b/eval.c
@@ -0,0 +1,281 @@
+/* eval.c -- reading and evaluating commands. */
+
+/* Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+#include <stdio.h>
+
+#include "bashintl.h"
+
+#include "shell.h"
+#include "flags.h"
+#include "trap.h"
+
+#include "builtins/common.h"
+
+#include "input.h"
+#include "execute_cmd.h"
+
+#if defined (HISTORY)
+# include "bashhist.h"
+#endif
+
+extern int EOF_reached;
+extern int indirection_level;
+extern int posixly_correct;
+extern int subshell_environment, running_under_emacs;
+extern int last_command_exit_value, stdin_redir;
+extern int need_here_doc;
+extern int current_command_number, current_command_line_count, line_number;
+extern int expand_aliases;
+
+static void send_pwd_to_eterm __P((void));
+static sighandler alrm_catcher __P((int));
+
+/* Read and execute commands until EOF is reached. This assumes that
+ the input source has already been initialized. */
+int
+reader_loop ()
+{
+ int our_indirection_level;
+ COMMAND * volatile current_command;
+
+ USE_VAR(current_command);
+
+ current_command = (COMMAND *)NULL;
+
+ our_indirection_level = ++indirection_level;
+
+ while (EOF_Reached == 0)
+ {
+ int code;
+
+ code = setjmp (top_level);
+
+#if defined (PROCESS_SUBSTITUTION)
+ unlink_fifo_list ();
+#endif /* PROCESS_SUBSTITUTION */
+
+ if (interactive_shell && signal_is_ignored (SIGINT) == 0)
+ set_signal_handler (SIGINT, sigint_sighandler);
+
+ if (code != NOT_JUMPED)
+ {
+ indirection_level = our_indirection_level;
+
+ switch (code)
+ {
+ /* Some kind of throw to top_level has occured. */
+ case FORCE_EOF:
+ case ERREXIT:
+ case EXITPROG:
+ current_command = (COMMAND *)NULL;
+ if (exit_immediately_on_error)
+ variable_context = 0; /* not in a function */
+ EOF_Reached = EOF;
+ goto exec_done;
+
+ case DISCARD:
+ /* Make sure the exit status is reset to a non-zero value, but
+ leave existing non-zero values (e.g., > 128 on signal)
+ alone. */
+ if (last_command_exit_value == 0)
+ last_command_exit_value = EXECUTION_FAILURE;
+ if (subshell_environment)
+ {
+ current_command = (COMMAND *)NULL;
+ EOF_Reached = EOF;
+ goto exec_done;
+ }
+ /* Obstack free command elements, etc. */
+ if (current_command)
+ {
+ dispose_command (current_command);
+ current_command = (COMMAND *)NULL;
+ }
+ break;
+
+ default:
+ command_error ("reader_loop", CMDERR_BADJUMP, code, 0);
+ }
+ }
+
+ executing = 0;
+ if (temporary_env)
+ dispose_used_env_vars ();
+
+#if (defined (ultrix) && defined (mips)) || defined (C_ALLOCA)
+ /* Attempt to reclaim memory allocated with alloca (). */
+ (void) alloca (0);
+#endif
+
+ if (read_command () == 0)
+ {
+ if (interactive_shell == 0 && read_but_dont_execute)
+ {
+ last_command_exit_value = EXECUTION_SUCCESS;
+ dispose_command (global_command);
+ global_command = (COMMAND *)NULL;
+ }
+ else if (current_command = global_command)
+ {
+ global_command = (COMMAND *)NULL;
+ current_command_number++;
+
+ executing = 1;
+ stdin_redir = 0;
+ execute_command (current_command);
+
+ exec_done:
+ QUIT;
+
+ if (current_command)
+ {
+ dispose_command (current_command);
+ current_command = (COMMAND *)NULL;
+ }
+ }
+ }
+ else
+ {
+ /* Parse error, maybe discard rest of stream if not interactive. */
+ if (interactive == 0)
+ EOF_Reached = EOF;
+ }
+ if (just_one_command)
+ EOF_Reached = EOF;
+ }
+ indirection_level--;
+ return (last_command_exit_value);
+}
+
+static sighandler
+alrm_catcher(i)
+ int i;
+{
+ printf (_("\007timed out waiting for input: auto-logout\n"));
+ fflush (stdout);
+ bash_logout (); /* run ~/.bash_logout if this is a login shell */
+ jump_to_top_level (EXITPROG);
+ SIGRETURN (0);
+}
+
+/* Send an escape sequence to emacs term mode to tell it the
+ current working directory. */
+static void
+send_pwd_to_eterm ()
+{
+ char *pwd;
+
+ pwd = get_string_value ("PWD");
+ if (pwd == 0)
+ pwd = get_working_directory ("eterm");
+ fprintf (stderr, "\032/%s\n", pwd);
+}
+
+/* Call the YACC-generated parser and return the status of the parse.
+ Input is read from the current input stream (bash_input). yyparse
+ leaves the parsed command in the global variable GLOBAL_COMMAND.
+ This is where PROMPT_COMMAND is executed. */
+int
+parse_command ()
+{
+ int r;
+ char *command_to_execute;
+
+ need_here_doc = 0;
+ run_pending_traps ();
+
+ /* Allow the execution of a random command just before the printing
+ of each primary prompt. If the shell variable PROMPT_COMMAND
+ is set then the value of it is the command to execute. */
+ if (interactive && bash_input.type != st_string)
+ {
+ command_to_execute = get_string_value ("PROMPT_COMMAND");
+ if (command_to_execute)
+ execute_variable_command (command_to_execute, "PROMPT_COMMAND");
+
+ if (running_under_emacs == 2)
+ send_pwd_to_eterm (); /* Yuck */
+ }
+
+ current_command_line_count = 0;
+ r = yyparse ();
+
+ if (need_here_doc)
+ gather_here_documents ();
+
+ return (r);
+}
+
+/* Read and parse a command, returning the status of the parse. The command
+ is left in the globval variable GLOBAL_COMMAND for use by reader_loop.
+ This is where the shell timeout code is executed. */
+int
+read_command ()
+{
+ SHELL_VAR *tmout_var;
+ int tmout_len, result;
+ SigHandler *old_alrm;
+
+ set_current_prompt_level (1);
+ global_command = (COMMAND *)NULL;
+
+ /* Only do timeouts if interactive. */
+ tmout_var = (SHELL_VAR *)NULL;
+ tmout_len = 0;
+ old_alrm = (SigHandler *)NULL;
+
+ if (interactive)
+ {
+ tmout_var = find_variable ("TMOUT");
+
+ if (tmout_var && var_isset (tmout_var))
+ {
+ tmout_len = atoi (value_cell (tmout_var));
+ if (tmout_len > 0)
+ {
+ old_alrm = set_signal_handler (SIGALRM, alrm_catcher);
+ alarm (tmout_len);
+ }
+ }
+ }
+
+ QUIT;
+
+ current_command_line_count = 0;
+ result = parse_command ();
+
+ if (interactive && tmout_var && (tmout_len > 0))
+ {
+ alarm(0);
+ set_signal_handler (SIGALRM, old_alrm);
+ }
+
+ return (result);
+}
diff --git a/examples/INDEX.html b/examples/INDEX.html
new file mode 100644
index 0000000..5e8cdc6
--- /dev/null
+++ b/examples/INDEX.html
@@ -0,0 +1,824 @@
+<table border=1>
+ <tr>
+ <th>Path</th>
+ <th>Description</th>
+ <th>X-Ref</th>
+ </tr>
+ <tr>
+ <td>./obashdb</td>
+ <td>Deprecated sample implementation of a bash debugger</td>
+ </tr>
+ <tr>
+ </tr>
+ <tr>
+ <td>./complete</td>
+ <td>Shell completion code</td>
+ </tr>
+ <tr>
+ </tr>
+ <tr>
+ <td>./functions</td>
+ <td>Example functions</td>
+ </tr>
+ <tr>
+ <td>./functions/array-stuff</td>
+ <td>Various array functions (ashift, array_sort, reverse).</td>
+ </tr>
+ <tr>
+ <td>./functions/array-to-string</td>
+ <td>Convert an array to a string.</td>
+ </tr>
+ <tr>
+ <td>./functions/autoload</td>
+ <td>An almost ksh-compatible 'autoload' (no lazy load).</td>
+ <td>ksh</td>
+ </tr>
+ <tr>
+ <td>./functions/autoload.v2</td>
+ <td>An almost ksh-compatible 'autoload' (no lazy load).</td>
+ <td>ksh</td>
+ </tr>
+ <tr>
+ <td>./functions/autoload.v3</td>
+ <td>A more ksh-compatible 'autoload' (with lazy load).</td>
+ <td>ksh</td>
+ </tr>
+ <tr>
+ <td>./functions/basename</td>
+ <td>A replacement for basename(1).</td>
+ <td>basename</td>
+ </tr>
+ <tr>
+ <td>./functions/basename2</td>
+ <td>Fast basename(1) and dirname(1) functions for BASH/SH.</td>
+ <td>basename, dirname</td>
+ </tr>
+ <tr>
+ <td>./functions/coproc.bash</td>
+ <td>Start, control, and end coprocesses.</td>
+ </tr>
+ <tr>
+ <td>./functions/coshell.bash</td>
+ <td>Control shell coprocesses (see coprocess.bash).</td>
+ </tr>
+ <tr>
+ <td>./functions/coshell.README</td>
+ <td>README for coshell and coproc.</td>
+ </tr>
+ <tr>
+ <td>./functions/csh-compat</td>
+ <td>A C-shell compatibility package.</td>
+ <td>csh</td>
+ </tr>
+ <tr>
+ <td>./functions/dirfuncs</td>
+ <td>Directory manipulation functions from the book 'The Korn Shell'.</td>
+ </tr>
+ <tr>
+ <td>./functions/dirname</td>
+ <td>A replacement for dirname(1).</td>
+ <td>dirname</td>
+ </tr>
+ <tr>
+ <td>./functions/emptydir</td>
+ <td>Find out if a directory is empty.</td>
+ </tr>
+ <tr>
+ <td>./functions/exitstat</td>
+ <td>Display the exit status of processes.</td>
+ </tr>
+ <tr>
+ <td>./functions/external</td>
+ <td>Like 'command' but FORCES use of external command.</td>
+ </tr>
+ <tr>
+ <td>./functions/fact</td>
+ <td>Recursive factorial function.</td>
+ </tr>
+ <tr>
+ <td>./functions/fstty</td>
+ <td>Front end to sync TERM changes to both stty(1) and readline 'bind'.</td>
+ <td>stty.bash</td>
+ </tr>
+ <tr>
+ <td>./functions/func</td>
+ <td>Print out definitions for functions named by arguments.</td>
+ </tr>
+ <tr>
+ <td>./functions/gethtml</td>
+ <td>Get a web page from a remote server (wget(1) in bash!).</td>
+ </tr>
+ <tr>
+ <td>./functions/getoptx.bash</td>
+ <td>getopt function that parses long-named options.</td>
+ </tr>
+ <tr>
+ <td>./functions/inetaddr</td>
+ <td>Internet address conversion (inet2hex & hex2inet).</td>
+ </tr>
+ <tr>
+ <td>./functions/inpath</td>
+ <td>Return zero if the argument is in the path and executable.</td>
+ <td>inpath</td>
+ </tr>
+ <tr>
+ <td>./functions/isnum.bash</td>
+ <td>Test user input on numeric or character value.</td>
+ </tr>
+ <tr>
+ <td>./functions/isnum2</td>
+ <td>Test user input on numeric values, with floating point.</td>
+ </tr>
+ <tr>
+ <td>./functions/isvalidip</td>
+ <td>Test user input for valid IP Addresses.</td>
+ </tr>
+ <tr>
+ <td>./functions/jdate.bash</td>
+ <td>Julian date conversion.</td>
+ </tr>
+ <tr>
+ <td>./functions/jj.bash</td>
+ <td>Look for running jobs.</td>
+ </tr>
+ <tr>
+ <td>./functions/keep</td>
+ <td>Try to keep some programs in the forground and running.</td>
+ </tr>
+ <tr>
+ <td>./functions/ksh-cd</td>
+ <td>ksh-like 'cd': cd [-LP] [dir [change]].</td>
+ <td>ksh</td>
+ </tr>
+ <tr>
+ <td>./functions/ksh-compat-test</td>
+ <td>ksh-like arithmetic test replacements.</td>
+ <td>ksh</td>
+ </tr>
+ <tr>
+ <td>./functions/kshenv</td>
+ <td>Functions and aliases to provide the beginnings of a ksh environment for bash.</td>
+ <td>ksh</td>
+ </tr>
+ <tr>
+ <td>./functions/login</td>
+ <td>Replace the 'login' and 'newgrp' builtins in old Bourne shells.</td>
+ </tr>
+ <tr>
+ <td>./functions/lowercase</td>
+ <td>Rename files to lower case.</td>
+ <td>rename lower</td>
+ </tr>
+ <tr>
+ <td>./functions/manpage</td>
+ <td>Find and print a manual page.</td>
+ <td>fman</td>
+ </tr>
+ <tr>
+ <td>./functions/mhfold</td>
+ <td>Print MH folders, useful only because folders(1) doesn't print mod date/times.</td>
+ </tr>
+ <tr>
+ <td>./functions/notify.bash</td>
+ <td>Notify when jobs change status.</td>
+ </tr>
+ <tr>
+ <td>./functions/pathfuncs</td>
+ <td>Path related functions (no_path, add_path, pre-path, del_path).</td>
+ <td>path</td>
+ </tr>
+ <tr>
+ <td>./functions/README</td>
+ <td>README</td>
+ </tr>
+ <tr>
+ <td>./functions/recurse</td>
+ <td>Recursive directory traverser.</td>
+ </tr>
+ <tr>
+ <td>./functions/repeat2</td>
+ <td>A clone of C shell builtin 'repeat'.</td>
+ <td>repeat, csh</td>
+ </tr>
+ <tr>
+ <td>./functions/repeat3</td>
+ <td>A clone of C shell builtin 'repeat'.</td>
+ <td>repeat, csh</td>
+ </tr>
+ <tr>
+ <td>./functions/seq</td>
+ <td>Generate a sequence from m to n, m defaults to 1.</td>
+ </tr>
+ <tr>
+ <td>./functions/seq2</td>
+ <td>Generate a sequence from m to n, m defaults to 1.</td>
+ </tr>
+ <tr>
+ <td>./functions/shcat</td>
+ <td>Readline-based pager.</td>
+ <td>cat, readline pager</td>
+ </tr>
+ <tr>
+ <td>./functions/shcat2</td>
+ <td>Readline-based pagers.</td>
+ <td>cat, readline pager</td>
+ </tr>
+ <tr>
+ <td>./functions/sort-pos-params</td>
+ <td>Sort the positional parameters.</td>
+ </tr>
+ <tr>
+ <td>./functions/substr</td>
+ <td>A function to emulate the ancient ksh builtin.</td>
+ <td>ksh</td>
+ </tr>
+ <tr>
+ <td>./functions/substr2</td>
+ <td>A function to emulate the ancient ksh builtin.</td>
+ <td>ksh</td>
+ </tr>
+ <tr>
+ <td>./functions/term</td>
+ <td>A shell function to set the terminal type interactively or not.</td>
+ </tr>
+ <tr>
+ <td>./functions/whatis</td>
+ <td>An implementation of the 10th Edition Unix sh builtin 'whatis(1)' command.</td>
+ </tr>
+ <tr>
+ <td>./functions/whence</td>
+ <td>An almost-ksh compatible 'whence(1)' command.</td>
+ </tr>
+ <tr>
+ <td>./functions/which</td>
+ <td>An emulation of 'which(1)' as it appears in FreeBSD.</td>
+ </tr>
+ <tr>
+ <td>./functions/xalias.bash</td>
+ <td>Convert csh alias commands to bash functions.</td>
+ <td>csh, aliasconv</td>
+ </tr>
+ <tr>
+ <td>./functions/xfind.bash</td>
+ <td>A 'find(1)' clone.</td>
+ </tr>
+ <tr>
+ </tr>
+ <tr>
+ <td>./loadables/</td>
+ <td>Example loadable replacements</td>
+ </tr>
+ <tr>
+ <td>./loadables/basename.c</td>
+ <td>Return non-directory portion of pathname.</td>
+ <td>basename</td>
+ </tr>
+ <tr>
+ <td>./loadables/cat.c</td>
+ <td>cat(1) replacement with no options - the way cat was intended.</td>
+ <td>cat, readline pager</td>
+ </tr>
+ <tr>
+ <td>./loadables/cut.c</td>
+ <td>cut(1) replacement.</td>
+ </tr>
+ <tr>
+ <td>./loadables/dirname.c</td>
+ <td>Return directory portion of pathname.</td>
+ <td>dirname</td>
+ </tr>
+ <tr>
+ <td>./loadables/finfo.c</td>
+ <td>Print file info.</td>
+ </tr>
+ <tr>
+ <td>./loadables/getconf.c</td>
+ <td>POSIX.2 getconf utility.</td>
+ </tr>
+ <tr>
+ <td>./loadables/getconf.h</td>
+ <td>Replacement definitions for ones the system doesn't provide.</td>
+ </tr>
+ <tr>
+ <td>./loadables/head.c</td>
+ <td>Copy first part of files.</td>
+ </tr>
+ <tr>
+ <td>./loadables/hello.c</td>
+ <td>Obligatory "Hello World" / sample loadable.</td>
+ </tr>
+ <tr>
+ <td>./loadables/id.c</td>
+ <td>POSIX.2 user identity.</td>
+ </tr>
+ <tr>
+ <td>./loadables/ln.c</td>
+ <td>Make links.</td>
+ </tr>
+ <tr>
+ <td>./loadables/logname.c</td>
+ <td>Print login name of current user.</td>
+ </tr>
+ <tr>
+ <td>./loadables/Makefile.in</td>
+ <td>Simple makefile for the sample loadable builtins.</td>
+ </tr>
+ <tr>
+ <td>./loadables/mkdir.c</td>
+ <td>Make directories.</td>
+ </tr>
+ <tr>
+ <td>./loadables/necho.c</td>
+ <td>echo without options or argument interpretation.</td>
+ </tr>
+ <tr>
+ <td>./loadables/pathchk.c</td>
+ <td>Check pathnames for validity and portability.</td>
+ </tr>
+ <tr>
+ <td>./loadables/print.c</td>
+ <td>Loadable ksh-93 style print builtin.</td>
+ </tr>
+ <tr>
+ <td>./loadables/printenv.c</td>
+ <td>Minimal builtin clone of BSD printenv(1).</td>
+ </tr>
+ <tr>
+ <td>./loadables/push.c</td>
+ <td>Anyone remember TOPS-20?</td>
+ </tr>
+ <tr>
+ <td>./loadables/README</td>
+ <td>README</td>
+ </tr>
+ <tr>
+ <td>./loadables/realpath.c</td>
+ <td>Canonicalize pathnames, resolving symlinks.</td>
+ </tr>
+ <tr>
+ <td>./loadables/rmdir.c</td>
+ <td>Remove directory.</td>
+ </tr>
+ <tr>
+ <td>./loadables/sleep.c</td>
+ <td>sleep for fractions of a second.</td>
+ </tr>
+ <tr>
+ <td>./loadables/strftime.c</td>
+ <td>Loadable builtin interface to strftime(3).</td>
+ </tr>
+ <tr>
+ <td>./loadables/sync.c</td>
+ <td>Sync the disks by forcing pending filesystem writes to complete.</td>
+ </tr>
+ <tr>
+ <td>./loadables/tee.c</td>
+ <td>Duplicate standard input.</td>
+ </tr>
+ <tr>
+ <td>./loadables/template.c</td>
+ <td>Example template for loadable builtin.</td>
+ </tr>
+ <tr>
+ <td>./loadables/truefalse.c</td>
+ <td>True and false builtins.</td>
+ </tr>
+ <tr>
+ <td>./loadables/tty.c</td>
+ <td>Return terminal name.</td>
+ </tr>
+ <tr>
+ <td>./loadables/uname.c</td>
+ <td>Print system information.</td>
+ </tr>
+ <tr>
+ <td>./loadables/unlink.c</td>
+ <td>Remove a directory entry.</td>
+ </tr>
+ <tr>
+ <td>./loadables/whoami.c</td>
+ <td>Print out username of current user.</td>
+ </tr>
+ <tr>
+ </tr>
+ <tr>
+ <td>./loadables/perl/</td>
+ <td>Illustrate how to build a Perl interpreter into bash.</td>
+ </tr>
+ <tr>
+ </tr>
+ <tr>
+ <td>./misc</td>
+ <td>Miscellaneous</td>
+ </tr>
+ <tr>
+ <td>./misc/aliasconv.bash</td>
+ <td>Convert csh aliases to bash aliases and functions.</td>
+ <td>csh, xalias</td>
+ </tr>
+ <tr>
+ <td>./misc/aliasconv.sh</td>
+ <td>Convert csh aliases to bash aliases and functions.</td>
+ <td>csh, xalias</td>
+ </tr>
+ <tr>
+ <td>./misc/cshtobash</td>
+ <td>Convert csh aliases, environment variables, and variables to bash equivalents.</td>
+ <td>csh, xalias</td>
+ </tr>
+ <tr>
+ <td>./misc/README</td>
+ <td>README</td>
+ </tr>
+ <tr>
+ <td>./misc/suncmd.termcap</td>
+ <td>SunView TERMCAP string.</td>
+ </tr>
+ <tr>
+ </tr>
+ <tr>
+ <td>./scripts.noah</td>
+ <td>Noah Friedman's collection of scripts (updated to bash v2 syntax by Chet Ramey)</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/aref.bash</td>
+ <td>Pseudo-arrays and substring indexing examples.</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/bash.sub.bash</td>
+ <td>Library functions used by require.bash.</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/bash_version.bash</td>
+ <td>A function to slice up $BASH_VERSION.</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/meta.bash</td>
+ <td>Enable and disable eight-bit readline input.</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/mktmp.bash</td>
+ <td>Make a temporary file with a unique name.</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/number.bash</td>
+ <td>A fun hack to translate numerals into English.</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/PERMISSION</td>
+ <td>Permissions to use the scripts in this directory.</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/prompt.bash</td>
+ <td>A way to set PS1 to some predefined strings.</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/README</td>
+ <td>README</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/remap_keys.bash</td>
+ <td>A front end to 'bind' to redo readline bindings.</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/require.bash</td>
+ <td>Lisp-like require/provide library functions for bash.</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/send_mail.bash</td>
+ <td>Replacement SMTP client written in bash.</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/shcat.bash</td>
+ <td>Bash replacement for 'cat(1)'.</td>
+ <td>cat</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/source.bash</td>
+ <td>Replacement for source that uses current directory.</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/string.bash</td>
+ <td>The string(3) functions at the shell level.</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/stty.bash</td>
+ <td>Front-end to stty(1) that changes readline bindings too.</td>
+ <td>fstty</td>
+ </tr>
+ <tr>
+ <td>./scripts.noah/y_or_n_p.bash</td>
+ <td>Prompt for a yes/no/quit answer.</td>
+ <td>ask</td>
+ </tr>
+ <tr>
+ </tr>
+ <tr>
+ <td>./scripts.v2</td>
+ <td>John DuBois' ksh script collection (converted to bash v2 syntax by Chet Ramey).</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/arc2tarz</td>
+ <td>Convert an "arc" archive to a compressed tar archive.</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/bashrand</td>
+ <td>Random number generator with upper and lower bounds and optional seed.</td>
+ <td>random</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/cal2day.bash</td>
+ <td>Convert a day number to a name.</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/cdhist.bash</td>
+ <td>cd replacement with a directory stack added.</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/corename</td>
+ <td>Tell what produced a core file.</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/fman</td>
+ <td>Fast man(1) replacement.</td>
+ <td>manpage</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/frcp</td>
+ <td>Copy files using ftp(1) but with rcp-type command line syntax.</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/lowercase</td>
+ <td>Change filenames to lower case.</td>
+ <td>rename lower</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/ncp</td>
+ <td>A nicer front end for cp(1) (has -i, etc.).</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/newext</td>
+ <td>Change the extension of a group of files.</td>
+ <td>rename</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/nmv</td>
+ <td>A nicer front end for mv(1) (has -i, etc.).</td>
+ <td>rename</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/pages</td>
+ <td>Print specified pages from files.</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/PERMISSION</td>
+ <td>Permissions to use the scripts in this directory.</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/pf</td>
+ <td>A pager front end that handles compressed files.</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/pmtop</td>
+ <td>Poor man's 'top(1)' for SunOS 4.x and BSD/OS.</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/README</td>
+ <td>README</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/ren</td>
+ <td>Rename files by changing parts of filenames that match a pattern.</td>
+ <td>rename</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/rename</td>
+ <td>Change the names of files that match a pattern.</td>
+ <td>rename</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/repeat</td>
+ <td>Execute a command multiple times.</td>
+ <td>repeat</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/shprof</td>
+ <td>Line profiler for bash scripts.</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/untar</td>
+ <td>Unarchive a (possibly compressed) tarfile into a directory.</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/uudec</td>
+ <td>Carefully uudecode(1) multiple files.</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/uuenc</td>
+ <td>uuencode(1) multiple files.</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/vtree</td>
+ <td>Print a visual display of a directory tree.</td>
+ <td>tree</td>
+ </tr>
+ <tr>
+ <td>./scripts.v2/where</td>
+ <td>Show where commands that match a pattern are.</td>
+ </tr>
+ <tr>
+ </tr>
+ <tr>
+ <td>./scripts</td>
+ <td>Example scripts</td>
+ </tr>
+ <tr>
+ <td>./scripts/adventure.sh</td>
+ <td>Text adventure game in bash!</td>
+ </tr>
+ <tr>
+ <td>./scripts/bcsh.sh</td>
+ <td>Bourne shell cshell-emulator.</td>
+ <td>csh</td>
+ </tr>
+ <tr>
+ <td>./scripts/cat.sh</td>
+ <td>Readline-based pager.</td>
+ <td>cat, readline pager</td>
+ </tr>
+ <tr>
+ <td>./scripts/center</td>
+ <td>Center - center a group of lines.</td>
+ </tr>
+ <tr>
+ <td>./scripts/dd-ex.sh</td>
+ <td>Line editor using only /bin/sh, /bin/dd and /bin/rm.</td>
+ </tr>
+ <tr>
+ <td>./scripts/fixfiles.bash</td>
+ <td>Recurse a tree and fix files containing various "bad" chars.</td>
+ </tr>
+ <tr>
+ <td>./scripts/hanoi.bash</td>
+ <td>The inevitable Towers of Hanoi in bash.</td>
+ </tr>
+ <tr>
+ <td>./scripts/inpath</td>
+ <td>Search $PATH for a file the same name as $1; return TRUE if found.</td>
+ <td>inpath</td>
+ </tr>
+ <tr>
+ <td>./scripts/krand.bash</td>
+ <td>Produces a random number within integer limits.</td>
+ <td>random</td>
+ </tr>
+ <tr>
+ <td>./scripts/line-input.bash</td>
+ <td>Line input routine for GNU Bourne-Again Shell plus terminal-control primitives.</td>
+ </tr>
+ <tr>
+ <td>./scripts/nohup.bash</td>
+ <td>bash version of 'nohup' command.</td>
+ </tr>
+ <tr>
+ <td>./scripts/precedence</td>
+ <td>Test relative precedences for '&&' and '||' operators.</td>
+ </tr>
+ <tr>
+ <td>./scripts/randomcard.bash</td>
+ <td>Print a random card from a card deck.</td>
+ <td>random</td>
+ </tr>
+ <tr>
+ <td>./scripts/README</td>
+ <td>README</td>
+ </tr>
+ <tr>
+ <td>./scripts/scrollbar</td>
+ <td>Display scrolling text.</td>
+ </tr>
+ <tr>
+ <td>./scripts/scrollbar2</td>
+ <td>Display scrolling text.</td>
+ </tr>
+ <tr>
+ <td>./scripts/self-repro</td>
+ <td>A self-reproducing script (careful!)</td>
+ </tr>
+ <tr>
+ <td>./scripts/showperm.bash</td>
+ <td>Convert ls(1) symbolic permissions into octal mode.</td>
+ </tr>
+ <tr>
+ <td>./scripts/shprompt</td>
+ <td>Display a prompt and get an answer satisfying certain criteria.</td>
+ <td>ask</td>
+ </tr>
+ <tr>
+ <td>./scripts/spin.bash</td>
+ <td>Display a 'spinning wheel' to show progress.</td>
+ </tr>
+ <tr>
+ <td>./scripts/timeout</td>
+ <td>Give rsh(1) a shorter timeout.</td>
+ </tr>
+ <tr>
+ <td>./scripts/timeout2</td>
+ <td>Execute a given command with a timeout.</td>
+ </tr>
+ <tr>
+ <td>./scripts/timeout3</td>
+ <td>Execute a given command with a timeout.</td>
+ </tr>
+ <tr>
+ <td>./scripts/vtree2</td>
+ <td>Display a tree printout of dir in 1k blocks.</td>
+ <td>tree</td>
+ </tr>
+ <tr>
+ <td>./scripts/vtree3</td>
+ <td>Display a graphical tree printout of dir.</td>
+ <td>tree</td>
+ </tr>
+ <tr>
+ <td>./scripts/vtree3a</td>
+ <td>Display a graphical tree printout of dir.</td>
+ <td>tree</td>
+ </tr>
+ <tr>
+ <td>./scripts/websrv.sh</td>
+ <td>A web server in bash!</td>
+ </tr>
+ <tr>
+ <td>./scripts/xterm_title</td>
+ <td>Print the contents of the xterm title bar.</td>
+ </tr>
+ <tr>
+ <td>./scripts/zprintf</td>
+ <td>Emulate printf (obsolete since it's now a bash builtin).</td>
+ </tr>
+ <tr>
+ </tr>
+ <tr>
+ <td>./startup-files</td>
+ <td>Example Start-up files.</td>
+ </tr>
+ <tr>
+ <td>./startup-files/Bash_aliases</td>
+ <td>Some useful aliases (Fox).</td>
+ </tr>
+ <tr>
+ <td>./startup-files/Bash_profile</td>
+ <td>Sample startup file for bash login shells (Fox).</td>
+ </tr>
+ <tr>
+ <td>./startup-files/bash-profile</td>
+ <td>Sample startup file for bash login shells (Ramey).</td>
+ </tr>
+ <tr>
+ <td>./startup-files/bashrc</td>
+ <td>Sample Bourne Again SHell init file (Ramey).</td>
+ </tr>
+ <tr>
+ <td>./startup-files/Bashrc.bfox</td>
+ <td>Sample Bourne Again SHell init file (Fox).</td>
+ </tr>
+ <tr>
+ <td>./startup-files/README</td>
+ <td>README</td>
+ </tr>
+ <tr>
+ </tr>
+ <tr>
+ <td>./startup-files/apple</td>
+ <td>Example Start-up files for Mac OS X.</td>
+ </tr>
+ <tr>
+ <td>./startup-files/apple/aliases</td>
+ <td>Sample aliases for Mac OS X.</td>
+ </tr>
+ <tr>
+ <td>./startup-files/apple/bash.defaults</td>
+ <td>Sample User preferences file.</td>
+ </tr>
+ <tr>
+ <td>./startup-files/apple/environment</td>
+ <td>Sample Bourne Again Shell environment file.</td>
+ </tr>
+ <tr>
+ <td>./startup-files/apple/login</td>
+ <td>Sample login wrapper.</td>
+ </tr>
+ <tr>
+ <td>./startup-files/apple/logout</td>
+ <td>Sample logout wrapper.</td>
+ </tr>
+ <tr>
+ <td>./startup-files/apple/rc</td>
+ <td>Sample Bourne Again Shell config file.</td>
+ </tr>
+ <tr>
+ <td>./startup-files/apple/README</td>
+ <td>README</td>
+ </tr>
+</table>
diff --git a/examples/INDEX.txt b/examples/INDEX.txt
new file mode 100644
index 0000000..db2858f
--- /dev/null
+++ b/examples/INDEX.txt
@@ -0,0 +1,198 @@
+Path Description X-Ref
+./obashdb Deprecated sample implementation of a bash debugger
+
+./complete Shell completion code
+
+./functions Example functions
+./functions/array-stuff Various array functions (ashift, array_sort, reverse).
+./functions/array-to-string Convert an array to a string.
+./functions/autoload An almost ksh-compatible 'autoload' (no lazy load). ksh
+./functions/autoload.v2 An almost ksh-compatible 'autoload' (no lazy load). ksh
+./functions/autoload.v3 A more ksh-compatible 'autoload' (with lazy load). ksh
+./functions/basename A replacement for basename(1). basename
+./functions/basename2 Fast basename(1) and dirname(1) functions for BASH/SH. basename, dirname
+./functions/coproc.bash Start, control, and end coprocesses.
+./functions/coshell.bash Control shell coprocesses (see coprocess.bash).
+./functions/coshell.README README for coshell and coproc.
+./functions/csh-compat A C-shell compatibility package. csh
+./functions/dirfuncs Directory manipulation functions from the book 'The Korn Shell'.
+./functions/dirname A replacement for dirname(1). dirname
+./functions/emptydir Find out if a directory is empty.
+./functions/exitstat Display the exit status of processes.
+./functions/external Like 'command' but FORCES use of external command.
+./functions/fact Recursive factorial function.
+./functions/fstty Front end to sync TERM changes to both stty(1) and readline 'bind'. stty.bash
+./functions/func Print out definitions for functions named by arguments.
+./functions/gethtml Get a web page from a remote server (wget(1) in bash!).
+./functions/getoptx.bash getopt function that parses long-named options.
+./functions/inetaddr Internet address conversion (inet2hex & hex2inet).
+./functions/inpath Return zero if the argument is in the path and executable. inpath
+./functions/isnum.bash Test user input on numeric or character value.
+./functions/isnum2 Test user input on numeric values, with floating point.
+./functions/isvalidip Test user input for valid IP Addresses.
+./functions/jdate.bash Julian date conversion.
+./functions/jj.bash Look for running jobs.
+./functions/keep Try to keep some programs in the forground and running.
+./functions/ksh-cd ksh-like 'cd': cd [-LP] [dir [change]]. ksh
+./functions/ksh-compat-test ksh-like arithmetic test replacements. ksh
+./functions/kshenv Functions and aliases to provide the beginnings of a ksh environment for bash. ksh
+./functions/login Replace the 'login' and 'newgrp' builtins in old Bourne shells.
+./functions/lowercase Rename files to lower case. rename lower
+./functions/manpage Find and print a manual page. fman
+./functions/mhfold Print MH folders, useful only because folders(1) doesn't print mod date/times.
+./functions/notify.bash Notify when jobs change status.
+./functions/pathfuncs Path related functions (no_path, add_path, pre-path, del_path). path
+./functions/README README
+./functions/recurse Recursive directory traverser.
+./functions/repeat2 A clone of C shell builtin 'repeat'. repeat, csh
+./functions/repeat3 A clone of C shell builtin 'repeat'. repeat, csh
+./functions/seq Generate a sequence from m to n, m defaults to 1.
+./functions/seq2 Generate a sequence from m to n, m defaults to 1.
+./functions/shcat Readline-based pager. cat, readline pager
+./functions/shcat2 Readline-based pagers. cat, readline pager
+./functions/sort-pos-params Sort the positional parameters.
+./functions/substr A function to emulate the ancient ksh builtin. ksh
+./functions/substr2 A function to emulate the ancient ksh builtin. ksh
+./functions/term A shell function to set the terminal type interactively or not.
+./functions/whatis An implementation of the 10th Edition Unix sh builtin 'whatis(1)' command.
+./functions/whence An almost-ksh compatible 'whence(1)' command.
+./functions/which An emulation of 'which(1)' as it appears in FreeBSD.
+./functions/xalias.bash Convert csh alias commands to bash functions. csh, aliasconv
+./functions/xfind.bash A 'find(1)' clone.
+
+./loadables/ Example loadable replacements
+./loadables/basename.c Return non-directory portion of pathname. basename
+./loadables/cat.c cat(1) replacement with no options - the way cat was intended. cat, readline pager
+./loadables/cut.c cut(1) replacement.
+./loadables/dirname.c Return directory portion of pathname. dirname
+./loadables/finfo.c Print file info.
+./loadables/getconf.c POSIX.2 getconf utility.
+./loadables/getconf.h Replacement definitions for ones the system doesn't provide.
+./loadables/head.c Copy first part of files.
+./loadables/hello.c Obligatory "Hello World" / sample loadable.
+./loadables/id.c POSIX.2 user identity.
+./loadables/ln.c Make links.
+./loadables/logname.c Print login name of current user.
+./loadables/Makefile.in Simple makefile for the sample loadable builtins.
+./loadables/mkdir.c Make directories.
+./loadables/necho.c echo without options or argument interpretation.
+./loadables/pathchk.c Check pathnames for validity and portability.
+./loadables/print.c Loadable ksh-93 style print builtin.
+./loadables/printenv.c Minimal builtin clone of BSD printenv(1).
+./loadables/push.c Anyone remember TOPS-20?
+./loadables/README README
+./loadables/realpath.c Canonicalize pathnames, resolving symlinks.
+./loadables/rmdir.c Remove directory.
+./loadables/sleep.c sleep for fractions of a second.
+./loadables/strftime.c Loadable builtin interface to strftime(3).
+./loadables/sync.c Sync the disks by forcing pending filesystem writes to complete.
+./loadables/tee.c Duplicate standard input.
+./loadables/template.c Example template for loadable builtin.
+./loadables/truefalse.c True and false builtins.
+./loadables/tty.c Return terminal name.
+./loadables/uname.c Print system information.
+./loadables/unlink.c Remove a directory entry.
+./loadables/whoami.c Print out username of current user.
+
+./loadables/perl/ Illustrate how to build a Perl interpreter into bash.
+
+./misc Miscellaneous
+./misc/aliasconv.bash Convert csh aliases to bash aliases and functions. csh, xalias
+./misc/aliasconv.sh Convert csh aliases to bash aliases and functions. csh, xalias
+./misc/cshtobash Convert csh aliases, environment variables, and variables to bash equivalents. csh, xalias
+./misc/README README
+./misc/suncmd.termcap SunView TERMCAP string.
+
+./scripts.noah Noah Friedman's collection of scripts (updated to bash v2 syntax by Chet Ramey)
+./scripts.noah/aref.bash Pseudo-arrays and substring indexing examples.
+./scripts.noah/bash.sub.bash Library functions used by require.bash.
+./scripts.noah/bash_version.bash A function to slice up $BASH_VERSION.
+./scripts.noah/meta.bash Enable and disable eight-bit readline input.
+./scripts.noah/mktmp.bash Make a temporary file with a unique name.
+./scripts.noah/number.bash A fun hack to translate numerals into English.
+./scripts.noah/PERMISSION Permissions to use the scripts in this directory.
+./scripts.noah/prompt.bash A way to set PS1 to some predefined strings.
+./scripts.noah/README README
+./scripts.noah/remap_keys.bash A front end to 'bind' to redo readline bindings.
+./scripts.noah/require.bash Lisp-like require/provide library functions for bash.
+./scripts.noah/send_mail.bash Replacement SMTP client written in bash.
+./scripts.noah/shcat.bash Bash replacement for 'cat(1)'. cat
+./scripts.noah/source.bash Replacement for source that uses current directory.
+./scripts.noah/string.bash The string(3) functions at the shell level.
+./scripts.noah/stty.bash Front-end to stty(1) that changes readline bindings too. fstty
+./scripts.noah/y_or_n_p.bash Prompt for a yes/no/quit answer. ask
+
+./scripts.v2 John DuBois' ksh script collection (converted to bash v2 syntax by Chet Ramey).
+./scripts.v2/arc2tarz Convert an "arc" archive to a compressed tar archive.
+./scripts.v2/bashrand Random number generator with upper and lower bounds and optional seed. random
+./scripts.v2/cal2day.bash Convert a day number to a name.
+./scripts.v2/cdhist.bash cd replacement with a directory stack added.
+./scripts.v2/corename Tell what produced a core file.
+./scripts.v2/fman Fast man(1) replacement. manpage
+./scripts.v2/frcp Copy files using ftp(1) but with rcp-type command line syntax.
+./scripts.v2/lowercase Change filenames to lower case. rename lower
+./scripts.v2/ncp A nicer front end for cp(1) (has -i, etc.).
+./scripts.v2/newext Change the extension of a group of files. rename
+./scripts.v2/nmv A nicer front end for mv(1) (has -i, etc.). rename
+./scripts.v2/pages Print specified pages from files.
+./scripts.v2/PERMISSION Permissions to use the scripts in this directory.
+./scripts.v2/pf A pager front end that handles compressed files.
+./scripts.v2/pmtop Poor man's 'top(1)' for SunOS 4.x and BSD/OS.
+./scripts.v2/README README
+./scripts.v2/ren Rename files by changing parts of filenames that match a pattern. rename
+./scripts.v2/rename Change the names of files that match a pattern. rename
+./scripts.v2/repeat Execute a command multiple times. repeat
+./scripts.v2/shprof Line profiler for bash scripts.
+./scripts.v2/untar Unarchive a (possibly compressed) tarfile into a directory.
+./scripts.v2/uudec Carefully uudecode(1) multiple files.
+./scripts.v2/uuenc uuencode(1) multiple files.
+./scripts.v2/vtree Print a visual display of a directory tree. tree
+./scripts.v2/where Show where commands that match a pattern are.
+
+./scripts Example scripts
+./scripts/adventure.sh Text adventure game in bash!
+./scripts/bcsh.sh Bourne shell cshell-emulator. csh
+./scripts/cat.sh Readline-based pager. cat, readline pager
+./scripts/center Center - center a group of lines.
+./scripts/dd-ex.sh Line editor using only /bin/sh, /bin/dd and /bin/rm.
+./scripts/fixfiles.bash Recurse a tree and fix files containing various "bad" chars.
+./scripts/hanoi.bash The inevitable Towers of Hanoi in bash.
+./scripts/inpath Search $PATH for a file the same name as $1; return TRUE if found. inpath
+./scripts/krand.bash Produces a random number within integer limits. random
+./scripts/line-input.bash Line input routine for GNU Bourne-Again Shell plus terminal-control primitives.
+./scripts/nohup.bash bash version of 'nohup' command.
+./scripts/precedence Test relative precedences for '&&' and '||' operators.
+./scripts/randomcard.bash Print a random card from a card deck. random
+./scripts/README README
+./scripts/scrollbar Display scrolling text.
+./scripts/scrollbar2 Display scrolling text.
+./scripts/self-repro A self-reproducing script (careful!)
+./scripts/showperm.bash Convert ls(1) symbolic permissions into octal mode.
+./scripts/shprompt Display a prompt and get an answer satisfying certain criteria. ask
+./scripts/spin.bash Display a 'spinning wheel' to show progress.
+./scripts/timeout Give rsh(1) a shorter timeout.
+./scripts/timeout2 Execute a given command with a timeout.
+./scripts/timeout3 Execute a given command with a timeout.
+./scripts/vtree2 Display a tree printout of dir in 1k blocks. tree
+./scripts/vtree3 Display a graphical tree printout of dir. tree
+./scripts/vtree3a Display a graphical tree printout of dir. tree
+./scripts/websrv.sh A web server in bash!
+./scripts/xterm_title Print the contents of the xterm title bar.
+./scripts/zprintf Emulate printf (obsolete since it's now a bash builtin).
+
+./startup-files Example Start-up files.
+./startup-files/Bash_aliases Some useful aliases (Fox).
+./startup-files/Bash_profile Sample startup file for bash login shells (Fox).
+./startup-files/bash-profile Sample startup file for bash login shells (Ramey).
+./startup-files/bashrc Sample Bourne Again SHell init file (Ramey).
+./startup-files/Bashrc.bfox Sample Bourne Again SHell init file (Fox).
+./startup-files/README README
+
+./startup-files/apple Example Start-up files for Mac OS X.
+./startup-files/apple/aliases Sample aliases for Mac OS X.
+./startup-files/apple/bash.defaults Sample User preferences file.
+./startup-files/apple/environment Sample Bourne Again Shell environment file.
+./startup-files/apple/login Sample login wrapper.
+./startup-files/apple/logout Sample logout wrapper.
+./startup-files/apple/rc Sample Bourne Again Shell config file.
+./startup-files/apple/README README
diff --git a/examples/complete/bash_completion b/examples/complete/bash_completion
new file mode 100644
index 0000000..b0cf4a8
--- /dev/null
+++ b/examples/complete/bash_completion
@@ -0,0 +1,9401 @@
+# bash_completion - programmable completion functions for bash 3.x
+# (backwards compatible with bash 2.05b)
+#
+# $Id: bash_completion,v 1.872 2006/03/01 16:20:18 ianmacd Exp $
+#
+# Copyright (C) Ian Macdonald <ian@caliban.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# The latest version of this software can be obtained here:
+#
+# http://www.caliban.org/bash/index.shtml#completion
+#
+# RELEASE: 20060301
+
+if [[ $- == *v* ]]; then
+ BASH_COMPLETION_ORIGINAL_V_VALUE="-v"
+else
+ BASH_COMPLETION_ORIGINAL_V_VALUE="+v"
+fi
+
+if [[ -n $BASH_COMPLETION_DEBUG ]]; then
+ set -v
+else
+ set +v
+fi
+
+# Alter the following to reflect the location of this file.
+#
+[ -n "$BASH_COMPLETION" ] || BASH_COMPLETION=/etc/bash_completion
+[ -n "$BASH_COMPLETION_DIR" ] || BASH_COMPLETION_DIR=/etc/bash_completion.d
+readonly BASH_COMPLETION BASH_COMPLETION_DIR
+
+# Set a couple of useful vars
+#
+UNAME=$( uname -s )
+# strip OS type and version under Cygwin (e.g. CYGWIN_NT-5.1 => Cygwin)
+UNAME=${UNAME/CYGWIN_*/Cygwin}
+RELEASE=$( uname -r )
+
+# features supported by bash 2.05 and higher
+if [ ${BASH_VERSINFO[0]} -eq 2 ] && [[ ${BASH_VERSINFO[1]} > 04 ]] ||
+ [ ${BASH_VERSINFO[0]} -gt 2 ]; then
+ declare -r bash205=$BASH_VERSION 2>/dev/null || :
+ default="-o default"
+ dirnames="-o dirnames"
+ filenames="-o filenames"
+fi
+# features supported by bash 2.05b and higher
+if [ ${BASH_VERSINFO[0]} -eq 2 ] && [[ ${BASH_VERSINFO[1]} = "05b" ]] ||
+ [ ${BASH_VERSINFO[0]} -gt 2 ]; then
+ declare -r bash205b=$BASH_VERSION 2>/dev/null || :
+ nospace="-o nospace"
+fi
+# features supported by bash 3.0 and higher
+if [ ${BASH_VERSINFO[0]} -gt 2 ]; then
+ declare -r bash3=$BASH_VERSION 2>/dev/null || :
+ bashdefault="-o bashdefault"
+ plusdirs="-o plusdirs"
+fi
+
+# Turn on extended globbing and programmable completion
+shopt -s extglob progcomp
+
+# A lot of the following one-liners were taken directly from the
+# completion examples provided with the bash 2.04 source distribution
+
+# Make directory commands see only directories
+complete -d pushd
+
+# The following section lists completions that are redefined later
+# Do NOT break these over multiple lines.
+#
+# START exclude -- do NOT remove this line
+complete -f -X '!*.?(t)bz?(2)' bunzip2 bzcat bzcmp bzdiff bzegrep bzfgrep bzgrep
+complete -f -X '!*.@(zip|ZIP|jar|JAR|exe|EXE|pk3|war|wsz|ear|zargo|xpi|sxw|ott)' unzip zipinfo
+complete -f -X '*.Z' compress znew
+complete -f -X '!*.@(Z|gz|tgz|Gz|dz)' gunzip zcmp zdiff zcat zegrep zfgrep zgrep zless zmore
+complete -f -X '!*.Z' uncompress
+complete -f -X '!*.@(gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX)' ee display
+complete -f -X '!*.@(gif|jp?(e)g|tif?(f)|png|p[bgp]m|bmp|x[bp]m|rle|rgb|pcx|fits|pm|GIF|JPG|JP?(E)G|TIF?(F)|PNG|P[BGP]M|BMP|X[BP]M|RLE|RGB|PCX|FITS|PM)' xv qiv
+complete -f -X '!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ|.bz2|.BZ2|.Z))' gv ggv kghostview
+complete -f -X '!*.@(dvi|DVI)?(.@(gz|Z|bz2))' xdvi
+complete -f -X '!*.@(dvi|DVI)?(.@(gz|bz2))' kdvi
+complete -f -X '!*.@(dvi|DVI)' dvips dviselect dvitype dvipdf advi dvipdfm dvipdfmx
+complete -f -X '!*.@(pdf|PDF)' acroread gpdf xpdf
+complete -f -X '!*.@(?(e)ps|?(E)PS|pdf|PDF)' kpdf
+complete -f -X '!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ)|cb(r|z)|CB(R|Z)|djv?(u)|DJV?(U)||dvi|DVI|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX)' evince
+complete -f -X '!*.@(?(e)ps|?(E)PS)' ps2pdf
+complete -f -X '!*.texi*' makeinfo texi2html
+complete -f -X '!*.@(?(la)tex|?(LA)TEX|texi|TEXI|dtx|DTX|ins|INS)' tex latex slitex jadetex pdfjadetex pdftex pdflatex texi2dvi
+complete -f -X '!*.@(mp3|MP3)' mpg123 mpg321 madplay
+complete -f -X '!*.@(mp?(e)g|MP?(E)G|wma|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|viv|rm|ram|yuv|mov|MOV|qt|QT|wmv|mp3|MP3|m4v|M4V|ogg|OGG|ogm|OGM|mp4|MP4|wav|WAV|asx|ASX|mng|MNG|srt)' xine aaxine fbxine kaffeine
+complete -f -X '!*.@(avi|asf|wmv)' aviplay
+complete -f -X '!*.@(rm?(j)|ra?(m)|smi?(l))' realplay
+complete -f -X '!*.@(mpg|mpeg|avi|mov|qt)' xanim
+complete -f -X '!*.@(ogg|OGG|m3u|flac|spx)' ogg123
+complete -f -X '!*.@(mp3|MP3|ogg|OGG|pls|m3u)' gqmpeg freeamp
+complete -f -X '!*.fig' xfig
+complete -f -X '!*.@(mid?(i)|MID?(I))' playmidi
+complete -f -X '!*.@(mid?(i)|MID?(I)|rmi|RMI|rcp|RCP|[gr]36|[GR]36|g18|G18|mod|MOD|xm|XM|it|IT|x3m|X3M)' timidity
+complete -f -X '*.@(o|so|so.!(conf)|a|rpm|gif|GIF|jp?(e)g|JP?(E)G|mp3|MP3|mp?(e)g|MPG|avi|AVI|asf|ASF|ogg|OGG|class|CLASS)' vi vim gvim rvim view rview rgvim rgview gview
+complete -f -X '*.@(o|so|so.!(conf)|a|rpm|gif|GIF|jp?(e)g|JP?(E)G|mp3|MP3|mp?(e)g|MPG|avi|AVI|asf|ASF|ogg|OGG|class|CLASS)' emacs
+complete -f -X '!*.@(exe|EXE|com|COM|scr|SCR|exe.so)' wine
+complete -f -X '!*.@(zip|ZIP|z|Z|gz|GZ|tgz|TGZ)' bzme
+complete -f -X '!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))' netscape mozilla lynx opera galeon curl dillo elinks amaya
+complete -f -X '!*.@(sxw|stw|sxg|sgl|doc|dot|rtf|txt|htm|html|odt|ott|odm)' oowriter
+complete -f -X '!*.@(sxi|sti|pps|ppt|pot|odp|otp)' ooimpress
+complete -f -X '!*.@(sxc|stc|xls|xlw|xlt|csv|ods|ots)' oocalc
+complete -f -X '!*.@(sxd|std|sda|sdd|odg|otg)' oodraw
+complete -f -X '!*.@(sxm|smf|mml|odf)' oomath
+complete -f -X '!*.odb' oobase
+complete -f -X '!*.rpm' rpm2cpio
+# FINISH exclude -- do not remove this line
+
+# start of section containing compspecs that can be handled within bash
+
+# user commands see only users
+complete -u su usermod userdel passwd chage write chfn groups slay w sux
+
+# group commands see only groups
+[ -n "$bash205" ] && complete -g groupmod groupdel newgrp 2>/dev/null
+
+# bg completes with stopped jobs
+complete -A stopped -P '%' bg
+
+# other job commands
+complete -j -P '%' fg jobs disown
+
+# readonly and unset complete with shell variables
+complete -v readonly unset
+
+# set completes with set options
+complete -A setopt set
+
+# shopt completes with shopt options
+complete -A shopt shopt
+
+# helptopics
+complete -A helptopic help
+
+# unalias completes with aliases
+complete -a unalias
+
+# bind completes with readline bindings (make this more intelligent)
+complete -A binding bind
+
+# type and which complete on commands
+complete -c command type which
+
+# builtin completes on builtins
+complete -b builtin
+
+# start of section containing completion functions called by other functions
+
+# This function checks whether we have a given program on the system.
+# No need for bulky functions in memory if we don't.
+#
+have()
+{
+ unset -v have
+ PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin type $1 &>/dev/null &&
+ have="yes"
+}
+
+# use GNU sed if we have it, since its extensions are still used in our code
+#
+[ $UNAME != Linux ] && have gsed && alias sed=gsed
+
+# This function checks whether a given readline variable
+# is `on'.
+#
+_rl_enabled()
+{
+ [[ "$( bind -v )" = *$1+([[:space:]])on* ]]
+}
+
+# This function shell-quotes the argument
+quote()
+{
+ echo \'${1//\'/\'\\\'\'}\' #'# Help vim syntax highlighting
+}
+
+# This function quotes the argument in a way so that readline dequoting
+# results in the original argument
+quote_readline()
+{
+ local t="${1//\\/\\\\}"
+ echo \'${t//\'/\'\\\'\'}\' #'# Help vim syntax highlighting
+}
+
+# This function shell-dequotes the argument
+dequote()
+{
+ eval echo "$1"
+}
+
+
+# Get the word to complete
+# This is nicer than ${COMP_WORDS[$COMP_CWORD]}, since it handles cases
+# where the user is completing in the middle of a word.
+# (For example, if the line is "ls foobar",
+# and the cursor is here --------> ^
+# it will complete just "foo", not "foobar", which is what the user wants.)
+_get_cword()
+{
+ if [[ "${#COMP_WORDS[COMP_CWORD]}" -eq 0 ]] || [[ "$COMP_POINT" == "${#COMP_LINE}" ]]; then
+ echo "${COMP_WORDS[COMP_CWORD]}"
+ else
+ local i
+ local cur="$COMP_LINE"
+ local index="$COMP_POINT"
+ for (( i = 0; i <= COMP_CWORD; ++i )); do
+ while [[ "${#cur}" -ge ${#COMP_WORDS[i]} ]] && [[ "${cur:0:${#COMP_WORDS[i]}}" != "${COMP_WORDS[i]}" ]]; do
+ cur="${cur:1}"
+ index="$(( index - 1 ))"
+ done
+ if [[ "$i" -lt "$COMP_CWORD" ]]; then
+ local old_size="${#cur}"
+ cur="${cur#${COMP_WORDS[i]}}"
+ local new_size="${#cur}"
+ index="$(( index - old_size + new_size ))"
+ fi
+ done
+
+ if [[ "${COMP_WORDS[COMP_CWORD]:0:${#cur}}" != "$cur" ]]; then
+ # We messed up! At least return the whole word so things keep working
+ echo "${COMP_WORDS[COMP_CWORD]}"
+ else
+ echo "${cur:0:$index}"
+ fi
+ fi
+}
+
+
+# This function performs file and directory completion. It's better than
+# simply using 'compgen -f', because it honours spaces in filenames.
+# If passed -d, it completes only on directories. If passed anything else,
+# it's assumed to be a file glob to complete on.
+#
+_filedir()
+{
+ local IFS=$'\t\n' xspec
+
+ _expand || return 0
+
+ local toks=( ) tmp
+ while read -r tmp; do
+ [[ -n $tmp ]] && toks[${#toks[@]}]=$tmp
+ done < <( compgen -d -- "$(quote_readline "$cur")" )
+
+ if [[ "$1" != -d ]]; then
+ xspec=${1:+"!*.$1"}
+ while read -r tmp; do
+ [[ -n $tmp ]] && toks[${#toks[@]}]=$tmp
+ done < <( compgen -f -X "$xspec" -- "$(quote_readline "$cur")" )
+ fi
+
+ COMPREPLY=( "${COMPREPLY[@]}" "${toks[@]}" )
+}
+
+# This function completes on signal names
+#
+_signals()
+{
+ local i
+
+ # standard signal completion is rather braindead, so we need
+ # to hack around to get what we want here, which is to
+ # complete on a dash, followed by the signal name minus
+ # the SIG prefix
+ COMPREPLY=( $( compgen -A signal SIG${cur#-} ))
+ for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do
+ COMPREPLY[i]=-${COMPREPLY[i]#SIG}
+ done
+}
+
+# This function completes on configured network interfaces
+#
+_configured_interfaces()
+{
+ if [ -f /etc/debian_version ]; then
+ # Debian system
+ COMPREPLY=( $( sed -ne 's|^iface \([^ ]\+\).*$|\1|p' \
+ /etc/network/interfaces ) )
+ elif [ -f /etc/SuSE-release ]; then
+ # SuSE system
+ COMPREPLY=( $( command ls \
+ /etc/sysconfig/network/ifcfg-* | \
+ sed -ne 's|.*ifcfg-\('$cur'.*\)|\1|p' ) )
+ elif [ -f /etc/pld-release ]; then
+ # PLD Linux
+ COMPREPLY=( $( command ls -B \
+ /etc/sysconfig/interfaces | \
+ sed -ne 's|.*ifcfg-\('$cur'.*\)|\1|p' ) )
+ else
+ # Assume Red Hat
+ COMPREPLY=( $( command ls \
+ /etc/sysconfig/network-scripts/ifcfg-* | \
+ sed -ne 's|.*ifcfg-\('$cur'.*\)|\1|p' ) )
+ fi
+}
+
+# This function completes on all available network interfaces
+# -a: restrict to active interfaces only
+# -w: restrict to wireless interfaces only
+#
+_available_interfaces()
+{
+ local cmd
+
+ if [ "${1:-}" = -w ]; then
+ cmd="iwconfig"
+ elif [ "${1:-}" = -a ]; then
+ cmd="ifconfig"
+ else
+ cmd="ifconfig -a"
+ fi
+
+ COMPREPLY=( $( eval $cmd 2>/dev/null | \
+ sed -ne 's|^\('$cur'[^[:space:][:punct:]]\{1,\}\).*$|\1|p') )
+}
+
+# This function expands tildes in pathnames
+#
+_expand()
+{
+ # FIXME: Why was this here?
+ # [ "$cur" != "${cur%\\}" ] && cur="$cur\\"
+
+ # expand ~username type directory specifications
+ if [[ "$cur" == \~*/* ]]; then
+ eval cur=$cur
+ elif [[ "$cur" == \~* ]]; then
+ cur=${cur#\~}
+ COMPREPLY=( $( compgen -P '~' -u $cur ) )
+ return ${#COMPREPLY[@]}
+ fi
+}
+
+# This function completes on process IDs.
+# AIX and Solaris ps prefers X/Open syntax.
+[ $UNAME = SunOS -o $UNAME = AIX ] &&
+_pids()
+{
+ COMPREPLY=( $( compgen -W '$( command ps -efo pid | sed 1d )' -- $cur ))
+} ||
+_pids()
+{
+ COMPREPLY=( $( compgen -W '$( command ps axo pid | sed 1d )' -- $cur ) )
+}
+
+# This function completes on process group IDs.
+# AIX and SunOS prefer X/Open, all else should be BSD.
+[ $UNAME = SunOS -o $UNAME = AIX ] &&
+_pgids()
+{
+ COMPREPLY=( $( compgen -W '$( command ps -efo pgid | sed 1d )' -- $cur ))
+} ||
+_pgids()
+{
+ COMPREPLY=( $( compgen -W '$( command ps axo pgid | sed 1d )' -- $cur ))
+}
+
+# This function completes on user IDs
+#
+_uids()
+{
+ if type getent &>/dev/null; then
+ COMPREPLY=( $( getent passwd | \
+ awk -F: '{if ($3 ~ /^'$cur'/) print $3}' ) )
+ elif type perl &>/dev/null; then
+ COMPREPLY=( $( compgen -W '$( perl -e '"'"'while (($uid) = (getpwent)[2]) { print $uid . "\n" }'"'"' )' -- $cur ) )
+ else
+ # make do with /etc/passwd
+ COMPREPLY=( $( awk 'BEGIN {FS=":"} {if ($3 ~ /^'$cur'/) print $3}'\
+ /etc/passwd ) )
+ fi
+}
+
+# This function completes on group IDs
+#
+_gids()
+{
+ if type getent &>/dev/null; then
+ COMPREPLY=( $( getent group | \
+ awk -F: '{if ($3 ~ /^'$cur'/) print $3}' ) )
+ elif type perl &>/dev/null; then
+ COMPREPLY=( $( compgen -W '$( perl -e '"'"'while (($gid) = (getgrent)[2]) { print $gid . "\n" }'"'"' )' -- $cur ) )
+ else
+ # make do with /etc/group
+ COMPREPLY=( $( awk 'BEGIN {FS=":"} {if ($3 ~ /^'$cur'/) print $3}'\
+ /etc/group ) )
+ fi
+}
+
+# This function completes on services
+#
+_services()
+{
+ local sysvdir famdir
+ [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d || sysvdir=/etc/init.d
+ famdir=/etc/xinetd.d
+ COMPREPLY=( $( builtin echo $sysvdir/!(*.rpmsave|*.rpmorig|*~|functions)) )
+
+ if [ -d $famdir ]; then
+ COMPREPLY=( "${COMPREPLY[@]}" $( builtin echo $famdir/!(*.rpmsave|*.rpmorig|*~)) )
+ fi
+
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]#@($sysvdir|$famdir)/}' -- $cur ) )
+}
+
+# This function complete on modules
+#
+_modules()
+{
+ local modpath
+ modpath=/lib/modules/$1
+ COMPREPLY=( $( command ls -R $modpath | \
+ sed -ne 's/^\('$cur'.*\)\.k\?o\(\|.gz\)$/\1/p') )
+}
+
+# this function complete on user:group format
+#
+_usergroup()
+{
+ local IFS=$'\n'
+ cur=${cur//\\\\ / }
+ if [[ $cur = *@(\\:|.)* ]] && [ -n "$bash205" ]; then
+ user=${cur%%*([^:.])}
+ COMPREPLY=( $(compgen -P ${user/\\\\} -g -- ${cur##*[.:]}) )
+ elif [[ $cur = *:* ]] && [ -n "$bash205" ]; then
+ COMPREPLY=( $( compgen -g -- ${cur##*[.:]} ) )
+ else
+ COMPREPLY=( $( compgen -S : -u -- $cur ) )
+ fi
+}
+
+# this function count the number of mandatory args
+#
+_count_args()
+{
+ args=1
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" != -* ]]; then
+ args=$(($args+1))
+ fi
+ done
+}
+
+# start of section containing completion functions for bash built-ins
+
+# bash alias completion
+#
+_alias()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[$COMP_CWORD]}
+
+ case "$COMP_LINE" in
+ *[^=])
+ COMPREPLY=( $( compgen -A alias -S '=' -- $cur ) )
+ ;;
+ *=)
+ COMPREPLY=( "$( alias ${cur%=} 2>/dev/null | \
+ sed -e 's|^alias '$cur'\(.*\)$|\1|' )" )
+ ;;
+ esac
+}
+complete -F _alias $nospace alias
+
+# bash export completion
+#
+_export()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[$COMP_CWORD]}
+
+ case "$COMP_LINE" in
+ *=\$*)
+ COMPREPLY=( $( compgen -v -P '$' -- ${cur#*=\$} ) )
+ ;;
+ *[^=])
+ COMPREPLY=( $( compgen -v -S '=' -- $cur ) )
+ ;;
+ *=)
+ COMPREPLY=( "$( eval echo -n \"$`echo ${cur%=}`\" |
+ ( echo -n \'
+ sed -e 's/'\''/'\''\\\'\'''\''/g'
+ echo -n \' ) )" )
+ ;;
+ esac
+}
+complete -F _export $default $nospace export
+
+# bash shell function completion
+#
+_function()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [[ $1 == @(declare|typeset) ]]; then
+ if [ "$prev" = -f ]; then
+ COMPREPLY=( $( compgen -A function -- $cur ) )
+ elif [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a -f -F -i -r -x -p' -- \
+ $cur ) )
+ fi
+ elif [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -A function -- $cur ) )
+ else
+ COMPREPLY=( "() $( type -- ${COMP_WORDS[1]} | sed -e 1,2d )" )
+ fi
+}
+complete -F _function function declare typeset
+
+# bash complete completion
+#
+_complete()
+{
+ local cur prev options
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ -o)
+ options="default dirnames filenames"
+ [ -n "$bash205b" ] && options="$options nospace"
+ [ -n "$bash3" ] && options="$options bashdefault plusdirs"
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ return 0
+ ;;
+
+ -A)
+ COMPREPLY=( $( compgen -W 'alias arrayvar binding \
+ builtin command directory disabled enabled \
+ export file function group helptopic hostname \
+ job keyword running service setopt shopt \
+ signal stopped user variable' -- $cur ) )
+ return 0
+ ;;
+
+ -C)
+ COMPREPLY=( $( compgen -A command -- $cur ) )
+ return 0
+ ;;
+ -F)
+ COMPREPLY=( $( compgen -A function -- $cur ) )
+ return 0
+ ;;
+ -@(p|r))
+ COMPREPLY=( $( complete -p | sed -e 's|.* ||' | \
+ grep "^$cur" ) )
+ return 0
+ ;;
+
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ # relevant options completion
+ options="-a -b -c -d -e -f -g -j -k -s -v -u -A -G -W -P -S -X -F -C"
+ [ -n "$bash205" ] && options="$options -o"
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -A command -- $cur ) )
+ fi
+}
+complete -F _complete complete
+
+# start of section containing completion functions for external programs
+
+# a little help for FreeBSD ports users
+[ $UNAME = FreeBSD ] && complete -W 'index search fetch fetch-list \
+ extract patch configure build install reinstall \
+ deinstall clean clean-depends kernel buildworld' make
+
+# This completes on a list of all available service scripts for the
+# 'service' command and/or the SysV init.d directory, followed by
+# that script's available commands
+#
+{ have service || [ -d /etc/init.d/ ]; } &&
+_service()
+{
+ local cur sysvdir
+
+ COMPREPLY=()
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ cur=`_get_cword`
+
+ # don't complete for things like killall, ssh and mysql if it's
+ # the standalone command, rather than the init script
+ [[ ${COMP_WORDS[0]} != @(*init.d/!(functions|~)|service) ]] && return 0
+
+ # don't complete past 2nd token
+ [ $COMP_CWORD -gt 2 ] && return 0
+
+ [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d \
+ || sysvdir=/etc/init.d
+
+ if [[ $COMP_CWORD -eq 1 ]] && [[ $prev == "service" ]]; then
+ _services
+ else
+ COMPREPLY=( $( compgen -W '`sed -ne "y/|/ /; \
+ s/^.*Usage.*{\(.*\)}.*$/\1/p" \
+ $sysvdir/${prev##*/} 2>/dev/null`' -- $cur ) )
+ fi
+
+ return 0
+} &&
+complete -F _service service
+[ -d /etc/init.d/ ] && complete -F _service $default \
+ $(for i in /etc/init.d/*; do echo ${i##*/}; done)
+
+# chown(1) completion
+#
+_chown()
+{
+ local cur
+ cur=`_get_cword`
+
+ # options completion
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes \
+ --dereference --no-dereference --from= --silent --quiet \
+ --reference= --recursive --verbose --help --version' -- $cur ) )
+ else
+ _count_args
+
+ case $args in
+ 1)
+ _usergroup
+ ;;
+ *)
+ _filedir
+ ;;
+ esac
+ fi
+}
+complete -F _chown $filenames chown
+
+# chgrp(1) completion
+#
+_chgrp()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ cur=${cur//\\\\/}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # options completion
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes \
+ --dereference --no-dereference --silent --quiet \
+ --reference= --recursive --verbose --help --version' -- $cur ) )
+ return 0
+ fi
+
+ # first parameter on line or first since an option?
+ if [ $COMP_CWORD -eq 1 ] && [[ "$cur" != -* ]] || \
+ [[ "$prev" == -* ]] && [ -n "$bash205" ]; then
+ local IFS=$'\n'
+ COMPREPLY=( $( compgen -g $cur 2>/dev/null ) )
+ else
+ _filedir || return 0
+ fi
+
+ return 0
+}
+complete -F _chgrp $filenames chgrp
+
+# umount(8) completion. This relies on the mount point being the third
+# space-delimited field in the output of mount(8)
+#
+_umount()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ OLDIFS="$IFS"
+ IFS="\n"
+ COMPREPLY=( $( compgen -W '$( mount | cut -d" " -f 3 )' -- $cur ) )
+ IFS="$OLDIFS"
+
+ return 0
+}
+complete -F _umount $dirnames umount
+
+# mount(8) completion. This will pull a list of possible mounts out of
+# /etc/{,v}fstab, unless the word being completed contains a ':', which
+# would indicate the specification of an NFS server. In that case, we
+# query the server for a list of all available exports and complete on
+# that instead.
+#
+_mount()
+{ local cur i sm host
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ [[ "$cur" == \\ ]] && cur="/"
+
+ for i in {,/usr}/{,s}bin/showmount; do [ -x $i ] && sm=$i && break; done
+
+ if [ -n "$sm" ] && [[ "$cur" == *:* ]]; then
+ COMPREPLY=( $( $sm -e ${cur%%:*} | sed 1d | \
+ grep ^${cur#*:} | awk '{print $1}' ) )
+ elif [[ "$cur" == //* ]]; then
+ host=${cur#//}
+ host=${host%%/*}
+ if [ -n "$host" ]; then
+ COMPREPLY=( $( compgen -W "$( echo $( smbclient -d 0 -NL $host 2>/dev/null|
+ sed -ne '/^['"$'\t '"']*Sharename/,/^$/p' |
+ sed -ne '3,$s|^[^A-Za-z]*\([^'"$'\t '"']*\).*$|//'$host'/\1|p' ) )" -- "$cur" ) )
+ fi
+ elif [ -r /etc/vfstab ]; then
+ # Solaris
+ COMPREPLY=( $( awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' \
+ /etc/vfstab | grep "^$cur" ) )
+ elif [ ! -e /etc/fstab ]; then
+ # probably Cygwin
+ COMPREPLY=( $( mount | awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' \
+ | grep "^$cur" ) )
+ else
+ # probably Linux
+ COMPREPLY=( $( awk '! /^[ \t]*#/ {if ($2 ~ /\//) print $2}' \
+ /etc/fstab | grep "^$cur" ) )
+ fi
+
+ return 0
+}
+complete -F _mount $default $filenames mount
+
+# Linux rmmod(8) completion. This completes on a list of all currently
+# installed kernel modules.
+#
+have rmmod && {
+_rmmod()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ COMPREPLY=( $( /sbin/lsmod | \
+ awk '{if (NR != 1 && $1 ~ /^'$cur'/) print $1}' 2>/dev/null ))
+ return 0
+}
+complete -F _rmmod rmmod
+
+# Linux insmod(8), modprobe(8) and modinfo(8) completion. This completes on a
+# list of all available modules for the version of the kernel currently
+# running.
+#
+_insmod()
+{
+ local cur prev modpath
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # behave like lsmod for modprobe -r
+ if [ $1 = "modprobe" ] &&
+ [ "${COMP_WORDS[1]}" = "-r" ]; then
+ COMPREPLY=( $( /sbin/lsmod | \
+ awk '{if (NR != 1 && $1 ~ /^'$cur'/) print $1}' ) )
+ return 0
+ fi
+
+ # do filename completion if we're giving a path to a module
+ if [[ "$cur" == */* ]]; then
+ _filedir '@(?(k)o?(.gz))'
+ return 0
+ fi
+
+ if [ $COMP_CWORD -gt 1 ] &&
+ [[ "${COMP_WORDS[COMP_CWORD-1]}" != -* ]]; then
+ # do module parameter completion
+ COMPREPLY=( $( /sbin/modinfo -p ${COMP_WORDS[1]} 2>/dev/null | \
+ awk '{if ($1 ~ /^parm:/ && $2 ~ /^'$cur'/) { print $2 } \
+ else if ($1 !~ /:/ && $1 ~ /^'$cur'/) { print $1 }}' ) )
+ else
+ _modules $(uname -r)
+ fi
+
+ return 0
+}
+complete -F _insmod $filenames insmod modprobe modinfo
+}
+
+# man(1) completion
+#
+[ $UNAME = GNU -o $UNAME = Linux -o $UNAME = Darwin \
+ -o $UNAME = FreeBSD -o $UNAME = SunOS -o $UNAME = Cygwin \
+ -o $UNAME = OpenBSD ] &&
+_man()
+{
+ local cur prev sect manpath UNAME
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ _expand || return 0
+
+ # default completion if parameter contains /
+ if [[ "$cur" == */* ]]; then
+ _filedir
+ return 0
+ fi
+
+ UNAME=$( uname -s )
+ # strip OS type and version under Cygwin
+ UNAME=${UNAME/CYGWIN_*/Cygwin}
+ if [ $UNAME = GNU -o $UNAME = Linux -o $UNAME = FreeBSD \
+ -o $UNAME = Cygwin ]; then
+ manpath=$( manpath 2>/dev/null || command man --path )
+ else
+ manpath=$MANPATH
+ fi
+
+ if [ -z "$manpath" ]; then
+ COMPREPLY=( $( compgen -c -- $cur ) )
+ return 0
+ fi
+
+ # determine manual section to search
+ [[ "$prev" == [0-9ln] ]] && sect=$prev || sect='*'
+
+ manpath=$manpath:
+ if [ -n "$cur" ]; then
+ manpath="${manpath//://*man$sect/$cur* } ${manpath//://*cat$sect/$cur* }"
+ else
+ manpath="${manpath//://*man$sect/ } ${manpath//://*cat$sect/ }"
+ fi
+
+ # redirect stderr for when path doesn't exist
+ COMPREPLY=( $( eval command ls "$manpath" 2>/dev/null ) )
+ # weed out directory path names and paths to man pages
+ COMPREPLY=( ${COMPREPLY[@]##*/?(:)} )
+ # strip suffix from man pages
+ COMPREPLY=( ${COMPREPLY[@]%.@(gz|bz2)} )
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]%.*}' -- "${cur//\\\\/}" ) )
+
+ [[ "$prev" != [0-9ln] ]] && _filedir '[0-9ln]'
+
+ return 0
+}
+[ $UNAME = GNU -o $UNAME = Linux -o $UNAME = Darwin \
+ -o $UNAME = FreeBSD -o $UNAME = SunOS -o $UNAME = Cygwin \
+ -o $UNAME = OpenBSD ] && \
+complete -F _man $filenames man apropos whatis
+
+# renice(8) completion
+#
+_renice()
+{
+ local command cur curopt i
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ command=$1
+
+ i=0
+ # walk back through command line and find last option
+ while [ $i -le $COMP_CWORD -a ${#COMPREPLY[@]} -eq 0 ]; do
+ curopt=${COMP_WORDS[COMP_CWORD-$i]}
+ case "$curopt" in
+ -u)
+ COMPREPLY=( $( compgen -u -- $cur ) )
+ ;;
+ -g)
+ _pgids
+ ;;
+ -p|$command)
+ _pids
+ ;;
+ esac
+ i=$(( ++i ))
+ done
+}
+complete -F _renice renice
+
+# kill(1) completion
+#
+_kill()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [ $COMP_CWORD -eq 1 ] && [[ "$cur" == -* ]]; then
+ # return list of available signals
+ _signals
+ else
+ # return list of available PIDs
+ _pids
+ fi
+}
+complete -F _kill kill
+
+# Linux and FreeBSD killall(1) completion.
+#
+[ $UNAME = Linux -o $UNAME = FreeBSD ] &&
+_killall()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [ $COMP_CWORD -eq 1 ] && [[ "$cur" == -* ]]; then
+ _signals
+ else
+ COMPREPLY=( $( compgen -W '$( command ps axo command | \
+ sed -ne "1d; s/^\[\?\([^-][^] ]*\).*$/\1/p" | \
+ sed -e "s/.*\///" )' -- $cur ) )
+ fi
+
+ return 0
+}
+[ $UNAME = Linux -o $UNAME = FreeBSD ] && complete -F _killall killall pkill
+
+# Linux and FreeBSD pgrep(1) completion.
+#
+[ $UNAME = Linux -o $UNAME = FreeBSD ] &&
+_pgrep()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ COMPREPLY=( $( compgen -W '$( command ps axo command | \
+ sed -ne "1d; s/^\[\?\([^-][^] ]*\).*$/\1/p" | \
+ sed -e "s/.*\///" )' -- $cur ) )
+
+ return 0
+}
+[ $UNAME = Linux -o $UNAME = FreeBSD ] && complete -F _pgrep pgrep
+# Linux pidof(8) completion.
+[ $UNAME = Linux ] && complete -F _pgrep pidof
+
+# GNU find(1) completion. This makes heavy use of ksh style extended
+# globs and contains Linux specific code for completing the parameter
+# to the -fstype option.
+#
+_find()
+{
+ local cur prev i exprfound onlyonce
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(max|min)depth)
+ COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9' -- $cur ) )
+ return 0
+ ;;
+ -?(a|c)newer|-fls|-fprint?(0|f)|-?(i)?(l)name|-?(i)wholename)
+ _filedir
+ return 0
+ ;;
+ -fstype)
+ # this is highly non-portable
+ [ -e /proc/filesystems ] &&
+ COMPREPLY=( $( cut -d$'\t' -f 2 /proc/filesystems | \
+ grep "^$cur" ) )
+ return 0
+ ;;
+ -gid)
+ _gids
+ return 0
+ ;;
+ -group)
+ if [ -n "$bash205" ]; then
+ COMPREPLY=( $( compgen -g -- $cur 2>/dev/null) )
+ fi
+ return 0
+ ;;
+ -?(x)type)
+ COMPREPLY=( $( compgen -W 'b c d p f l s' -- $cur ) )
+ return 0
+ ;;
+ -uid)
+ _uids
+ return 0
+ ;;
+ -user)
+ COMPREPLY=( $( compgen -u -- $cur ) )
+ return 0
+ ;;
+ -exec|-ok)
+ COMP_WORDS=(COMP_WORDS[0] $cur)
+ COMP_CWORD=1
+ _command
+ return 0
+ ;;
+ -[acm]min|-[acm]time|-?(i)?(l)name|-inum|-?(i)path|-?(i)regex| \
+ -links|-perm|-size|-used|-printf)
+ # do nothing, just wait for a parameter to be given
+ return 0
+ ;;
+ esac
+
+ _expand || return 0
+
+ # set exprfound to 1 if there is already an expression present
+ for i in ${COMP_WORDS[@]}; do
+ [[ "$i" = [-\(\),\!]* ]] && exprfound=1 && break
+ done
+
+ # handle case where first parameter is not a dash option
+ if [ "$exprfound" != 1 ] && [[ "$cur" != [-\(\),\!]* ]]; then
+ _filedir -d
+ return 0
+ fi
+
+ # complete using basic options
+ COMPREPLY=( $( compgen -W '-daystart -depth -follow -help -maxdepth \
+ -mindepth -mount -noleaf -version -xdev -amin -anewer \
+ -atime -cmin -cnewer -ctime -empty -false -fstype \
+ -gid -group -ilname -iname -inum -ipath -iregex \
+ -wholename \
+ -links -lname -mmin -mtime -name -newer -nouser \
+ -nogroup -perm -regex -size -true -type -uid -used \
+ -user -xtype -exec -fls -fprint -fprint0 -fprintf -ok \
+ -print -print0 -printf -prune -ls' -- $cur ) )
+
+ # this removes any options from the list of completions that have
+ # already been specified somewhere on the command line, as long as
+ # these options can only be used once (in a word, "options", in
+ # opposition to "tests" and "actions", as in the find(1) manpage).
+ onlyonce=' -daystart -depth -follow -help -maxdepth -mindepth -mount \
+ -noleaf -version -xdev '
+ COMPREPLY=( $( echo "${COMP_WORDS[@]}" | \
+ (while read -d ' ' i; do
+ [ "$i" == "" ] ||
+ [ "${onlyonce/ ${i%% *} / }" == "$onlyonce" ] &&
+ continue
+ # flatten array with spaces on either side,
+ # otherwise we cannot grep on word boundaries of
+ # first and last word
+ COMPREPLY=" ${COMPREPLY[@]} "
+ # remove word from list of completions
+ COMPREPLY=( ${COMPREPLY/ ${i%% *} / } )
+ done
+ echo "${COMPREPLY[@]}")
+ ) )
+
+ _filedir
+
+ return 0
+}
+complete -F _find $filenames find
+
+# Linux iwconfig(8) completion
+#
+[ $UNAME = Linux ] && have iwconfig &&
+_iwconfig()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ mode)
+ COMPREPLY=( $( compgen -W 'managed ad-hoc master \
+ repeater secondary monitor' -- $cur ) )
+ return 0
+ ;;
+ essid)
+ COMPREPLY=( $( compgen -W 'on off any' -- $cur ) )
+ if [ -n "${COMP_IWLIST_SCAN:-}" ]; then
+ COMPREPLY=( "${COMPREPLY[@]}" \
+ $( iwlist ${COMP_WORDS[1]} scan | \
+ awk -F '"' '/ESSID/ {print $2}' | \
+ grep "^$cur" ))
+ fi
+ return 0
+ ;;
+ nwid)
+ COMPREPLY=( $( compgen -W 'on off' -- $cur ) )
+ return 0
+ ;;
+ channel)
+ COMPREPLY=( $( iwlist ${COMP_WORDS[1]} channel | \
+ awk '/^[[:space:]]*Channel/ {print $2}' | \
+ grep "^$cur" ) )
+ return 0
+ ;;
+
+ freq)
+ COMPREPLY=( $( iwlist ${COMP_WORDS[1]} channel | \
+ awk '/^[[:space:]]*Channel/ {print $4"G"}' | \
+ grep "^$cur" ) )
+ return 0
+ ;;
+ ap)
+ COMPREPLY=( $( compgen -W 'on off any' -- $cur ) )
+ if [ -n "${COMP_IWLIST_SCAN:-}" ]; then
+ COMPREPLY=( "${COMPREPLY[@]}" \
+ $( iwlist ${COMP_WORDS[1]} scan | \
+ awk -F ': ' '/Address/ {print $2}' | \
+ grep "^$cur" ) )
+ fi
+ return 0
+ ;;
+ rate)
+ COMPREPLY=( $( compgen -W 'auto fixed' -- $cur ) )
+ COMPREPLY=( "${COMPREPLY[@]}" \
+ $( iwlist ${COMP_WORDS[1]} rate | \
+ awk '/^[[:space:]]*[0-9]/ {print $1"M"}' | \
+ grep "^$cur" ) )
+ return 0
+ ;;
+ rts)
+ COMPREPLY=( $( compgen -W 'auto fixed off' -- $cur ) )
+ return 0
+ ;;
+ frag)
+ COMPREPLY=( $( compgen -W 'auto fixed off' -- $cur ) )
+ return 0
+ ;;
+ key)
+ COMPREPLY=( $( compgen -W 'off on open restricted' -- $cur ) )
+ return 0
+ ;;
+ enc)
+ COMPREPLY=( $( compgen -W 'off on open restricted' -- $cur ) )
+ return 0
+ ;;
+ power)
+ COMPREPLY=( $( compgen -W 'period timeout off on' -- $cur ) )
+ return 0
+ ;;
+ txpower)
+ COMPREPLY=( $( compgen -W 'off on auto' -- $cur ) )
+ return 0
+ ;;
+ retry)
+ COMPREPLY=( $( compgen -W 'limit lifetime' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--help --version' -- $cur ) )
+ else
+ _available_interfaces -w
+ fi
+ else
+ COMPREPLY=( $( compgen -W 'essid nwid mode freq channel sens mode \
+ ap nick rate rts frag enc key power txpower commit' -- $cur ) )
+ fi
+
+} &&
+complete -F _iwconfig iwconfig
+
+# Linux iwlist(8) completion
+#
+[ $UNAME = Linux ] && have iwlist &&
+_iwlist()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--help --version' -- $cur ) )
+ else
+ _available_interfaces -w
+ fi
+ else
+ COMPREPLY=( $( compgen -W 'scan scanning freq frequency \
+ channel rate bit bitrate key enc encryption power \
+ txpower retry ap accesspoint peers event' -- $cur ) )
+ fi
+} &&
+complete -F _iwlist iwlist
+
+# Linux iwspy(8) completion
+#
+[ $UNAME = Linux ] && have iwspy &&
+_iwspy()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--help --version' -- $cur ) )
+ else
+ _available_interfaces -w
+ fi
+ else
+ COMPREPLY=( $( compgen -W 'setthr getthr off' -- $cur ) )
+ fi
+} &&
+complete -F _iwspy iwspy
+
+# Linux iwpriv(8) completion
+#
+[ $UNAME = Linux ] && have iwpriv &&
+_iwpriv()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ roam)
+ COMPREPLY=( $( compgen -W 'on off' -- $cur ) )
+ return 0
+ ;;
+ port)
+ COMPREPLY=( $( compgen -W 'ad-hoc managed' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--help --version' -- $cur ) )
+ else
+ _available_interfaces -w
+ fi
+ else
+ COMPREPLY=( $( compgen -W '--all roam port' -- $cur ) )
+ fi
+} &&
+complete -F _iwpriv iwpriv
+
+# RedHat & Debian GNU/Linux if{up,down} completion
+#
+[ $UNAME = Linux ] && { have ifup || have ifdown; } &&
+_ifupdown()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ _configured_interfaces
+ COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' -- "$cur") )
+ fi
+
+ return 0
+} &&
+complete -F _ifupdown ifup ifdown
+[ $UNAME = Linux ] && have ifstatus && complete -F _ifupdown ifstatus
+
+# Linux ipsec(8) completion (for FreeS/WAN)
+#
+[ $UNAME = Linux ] && have ipsec &&
+_ipsec()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W 'auto barf eroute klipsdebug look \
+ manual pluto ranbits rsasigkey \
+ setup showdefaults showhostkey spi \
+ spigrp tncfg whack' -- $cur ) )
+ return 0
+ fi
+
+ case ${COMP_WORDS[1]} in
+ auto)
+ COMPREPLY=( $( compgen -W '--asynchronous --up --add --delete \
+ --replace --down --route --unroute \
+ --ready --status --rereadsecrets' \
+ -- $cur ) )
+ ;;
+ manual)
+ COMPREPLY=( $( compgen -W '--up --down --route --unroute \
+ --union' -- $cur ) )
+ ;;
+ ranbits)
+ COMPREPLY=( $( compgen -W '--quick --continuous --bytes' \
+ -- $cur ) )
+ ;;
+ setup)
+ COMPREPLY=( $( compgen -W '--start --stop --restart' -- $cur ) )
+ ;;
+
+ *)
+ ;;
+ esac
+
+ return 0
+} &&
+complete -F _ipsec ipsec
+
+# Postfix completion.
+#
+have postfix && {
+# postfix(1)
+#
+_postfix()
+{
+ local cur prev
+
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [[ $cur == '-' ]]; then
+ COMPREPLY=(-c -D -v)
+ return 0
+ fi
+ if [[ $prev == '-c' ]]; then
+ _filedir -d
+ return 0
+ fi
+ if [[ $prev == '-D' ]]; then
+ COMPREPLY=( $( compgen -W 'start' -- "`get_cword`" ) )
+ return 0
+ fi
+ COMPREPLY=( $( compgen -W 'start stop reload abort flush check' -- \
+ "`get_cword`" ) )
+}
+complete -F _postfix postfix
+
+# postalias(1) and postmap(1)
+#
+_postmap()
+{
+ local cur prev len idx
+
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [[ $cur == '-' ]]; then
+ COMPREPLY=(-N -f -i -n -o -p -r -v -w -c -d -q)
+ return 0
+ fi
+ if [[ $prev == '-c' ]]; then
+ _filedir -d
+ return 0
+ fi
+ if [[ $prev == -[dq] ]]; then
+ return 0
+ fi
+
+ if [[ "$cur" == *:* ]]; then
+ COMPREPLY=( $( compgen -f -- ${cur#*:} ) )
+ else
+ len=${#cur}
+ idx=0
+ for pval in $( /usr/sbin/postconf -m ); do
+ if [[ "$cur" == "${pval:0:$len}" ]]; then
+ COMPREPLY[$idx]="$pval:"
+ idx=$(($idx+1))
+ fi
+ done
+ if [[ $idx -eq 0 ]]; then
+ COMPREPLY=( $( compgen -f -- "$cur" ) )
+ fi
+ fi
+ return 0
+}
+complete -F _postmap postmap postalias
+
+# postcat(1)
+#
+_postcat()
+{
+ local cur prev pval len idx qfile
+
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [[ $cur == '-' ]]; then
+ COMPREPLY=(-c -q -v)
+ return 0
+ fi
+ if [[ $prev == '-c' ]]; then
+ _filedir -d
+ return 0
+ fi
+
+ qfile=0
+ for idx in "${COMP_WORDS[@]}"; do
+ [[ "$idx" = -q ]] && qfile=1 && break
+ done
+ if [[ $qfile == 1 ]]; then
+ len=${#cur}
+ idx=0
+ for pval in $( mailq | \
+ sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; s/[* !].*$//' ); do
+ if [[ "$cur" == "${pval:0:$len}" ]]; then
+ COMPREPLY[$idx]=$pval
+ idx=$(($idx+1))
+ fi
+ done
+ return 0
+ else
+ _filedir
+ return 0
+ fi
+}
+complete -F _postcat postcat
+
+# postconf(1)
+#
+_postconf()
+{
+ local cur prev pval len idx eqext
+
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ if [[ $cur == '-' ]]; then
+ COMPREPLY=(-c -d -e -h -m -l -n -v)
+ return 0
+ fi
+ if [[ $prev == '-c' ]]; then
+ _filedir -d
+ return 0
+ fi
+ if [[ $prev == '-e' ]]; then
+ cur=${cur#[\"\']}
+ eqext='='
+ fi
+ len=${#cur}
+ idx=0
+ for pval in $( /usr/sbin/postconf | cut -d ' ' -f 1 ); do
+ if [[ "$cur" == "${pval:0:$len}" ]]; then
+ COMPREPLY[$idx]="$pval$eqext"
+ idx=$(($idx+1))
+ fi
+ done
+ return 0
+}
+complete -F _postconf postconf
+
+# postsuper(1)
+#
+_postsuper()
+{
+ local cur prev pval len idx
+
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [[ $cur == '-' ]]; then
+ COMPREPLY=(-c -d -h -H -p -r -s -v)
+ return 0
+ fi
+ case $prev in
+ -[dr])
+ len=${#cur}
+ idx=0
+ for pval in $( echo ALL; mailq | \
+ sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; s/[* !].*$//' ); do
+ if [[ "$cur" == "${pval:0:$len}" ]]; then
+ COMPREPLY[$idx]=$pval
+ idx=$(($idx+1))
+ fi
+ done
+ return 0
+ ;;
+ -h)
+ len=${#cur}
+ idx=0
+ for pval in $( echo ALL; mailq | \
+ sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; s/[* ].*$//; /!$/d' ); do
+ if [[ "$cur" == "${pval:0:$len}" ]]; then
+ COMPREPLY[$idx]=$pval
+ idx=$(($idx+1))
+ fi
+ done
+ return 0
+ ;;
+ -H)
+ len=${#cur}
+ idx=0
+ for pval in $( echo ALL; mailq | \
+ sed -e '1d; $d; /^[^0-9A-Z]\|^$/d; /^[0-9A-Z]*[* ]/d; s/!.*$//' ); do
+ if [[ "$cur" == "${pval:0:$len}" ]]; then
+ COMPREPLY[$idx]=$pval
+ idx=$(($idx+1))
+ fi
+ done
+ return 0
+ ;;
+ esac
+ COMPREPLY=( $( compgen -W 'hold incoming active deferred' -- $cur ) )
+ return 0
+}
+complete -F _postsuper postsuper
+}
+
+# cvs(1) completion
+#
+have cvs && {
+set_prefix()
+{
+ [ -z ${prefix:-} ] || prefix=${cur%/*}/
+ [ -r ${prefix:-}CVS/Entries ] || prefix=""
+}
+
+get_entries()
+{
+ local IFS=$'\n'
+ [ -r ${prefix:-}CVS/Entries ] && \
+ entries=$(cut -d/ -f2 -s ${prefix:-}CVS/Entries)
+}
+
+get_modules()
+{
+ if [ -n "$prefix" ]; then
+ COMPREPLY=( $( command ls -d ${cvsroot}/${prefix}/!(CVSROOT) ) )
+ else
+ COMPREPLY=( $( command ls -d ${cvsroot}/!(CVSROOT) ) )
+ fi
+}
+
+_cvs()
+{
+ local cur count mode i cvsroot cvsroots pwd
+ local -a flags miss files entries changed newremoved
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ count=0
+ for i in "${COMP_WORDS[@]}"; do
+ [ $count -eq $COMP_CWORD ] && break
+ # Last parameter was the CVSROOT, now go back to mode selection
+ if [ "${COMP_WORDS[((count))]}" == "$cvsroot" -a "$mode" == "cvsroot" ]; then
+ mode=""
+ fi
+ if [ -z "$mode" ]; then
+ case $i in
+ -d)
+ mode=cvsroot
+ cvsroot=${COMP_WORDS[((count+1))]}
+ ;;
+ @(ad?(d)|new))
+ mode=add
+ ;;
+ @(adm?(in)|rcs))
+ mode=admin
+ ;;
+ ann?(notate))
+ mode=annotate
+ ;;
+ @(checkout|co|get))
+ mode=checkout
+ ;;
+ @(com?(mit)|ci))
+ mode=commit
+ ;;
+ di?(f?(f)))
+ mode=diff
+ ;;
+ ex?(p?(ort)))
+ mode=export
+ ;;
+ ?(un)edit)
+ mode=$i
+ ;;
+ hi?(s?(tory)))
+ mode=history
+ ;;
+ im?(p?(ort)))
+ mode=import
+ ;;
+ re?(l?(ease)))
+ mode=release
+ ;;
+ ?(r)log)
+ mode=log
+ ;;
+ @(rdiff|patch))
+ mode=rdiff
+ ;;
+ @(remove|rm|delete))
+ mode=remove
+ ;;
+ @(rtag|rfreeze))
+ mode=rtag
+ ;;
+ st?(at?(us)))
+ mode=status
+ ;;
+ @(tag|freeze))
+ mode=tag
+ ;;
+ up?(d?(ate)))
+ mode=update
+ ;;
+ *)
+ ;;
+ esac
+ elif [[ "$i" = -* ]]; then
+ flags=( "${flags[@]}" $i )
+ fi
+ count=$((++count))
+ done
+
+ case "$mode" in
+ add)
+ if [[ "$cur" != -* ]]; then
+ set_prefix
+ if [ $COMP_CWORD -gt 1 -a -r ${prefix:-}CVS/Entries ]; then
+ get_entries
+ [ -z "$cur" ] && \
+ files=$( command ls -Ad !(CVS) ) || \
+ files=$( command ls -d ${cur}* 2>/dev/null )
+ for i in "${entries[@]}"; do
+ files=( ${files[@]/#$i//} )
+ done
+ COMPREPLY=( $( compgen -W '${files[@]}' -- \
+ $cur ) )
+ fi
+ else
+ COMPREPLY=( $( compgen -W '-k -m' -- $cur ) )
+ fi
+ ;;
+ admin)
+ if [[ "$cur" = -* ]]; then
+ COMPREPLY=( $( compgen -W '-i -a -A -e -b -c -k -l -u \
+ -L -U -m -M -n -N -o -q -I \
+ -s -t -t- -T -V -x -z' -- \
+ $cur ) )
+ fi
+ ;;
+ annotate)
+ if [[ "$cur" = -* ]]; then
+ COMPREPLY=( $( compgen -W '-D -F -f -l -R -r' -- $cur ) )
+ else
+ get_entries
+ COMPREPLY=( $( compgen -W '${entries[@]}' -- $cur ) )
+ fi
+ ;;
+ checkout)
+ if [[ "$cur" != -* ]]; then
+ [ -z "$cvsroot" ] && cvsroot=$CVSROOT
+ COMPREPLY=( $( cvs -d "$cvsroot" co -c 2> /dev/null | \
+ awk '{print $1}' ) )
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W '-A -N -P -R -c -f -l -n -p \
+ -s -r -D -d -k -j' -- $cur ) )
+ fi
+ ;;
+ commit)
+ set_prefix
+
+ if [[ "$cur" != -* ]] && [ -r ${prefix:-}CVS/Entries ]; then
+ # if $COMP_CVS_REMOTE is not null, 'cvs commit' will
+ # complete on remotely checked-out files (requires
+ # passwordless access to the remote repository
+ if [ -n "${COMP_CVS_REMOTE:-}" ]; then
+ # this is the least computationally intensive
+ # way found so far, but other changes
+ # (something other than changed/removed/new)
+ # may be missing
+ changed=( $( cvs -q diff --brief 2>&1 | \
+ sed -ne 's/^Files [^ ]* and \([^ ]*\) differ$/\1/p' ) )
+ newremoved=( $( cvs -q diff --brief 2>&1 | \
+ sed -ne 's/^cvs diff: \([^ ]*\) .*, no comparison available$/\1/p' ) )
+ COMPREPLY=( $( compgen -W '${changed[@]:-} \
+ ${newremoved[@]:-}' -- $cur ) )
+ else
+ _filedir
+ fi
+ else
+ COMPREPLY=( $( compgen -W '-n -R -l -f -F -m -r' -- \
+ $cur ) )
+ fi
+ ;;
+ cvsroot)
+ if [ -r ~/.cvspass ]; then
+ # Ugly escaping because of bash treating ':' specially
+ cvsroots=$( sed 's/^[^ ]* //; s/:/\\:/g' ~/.cvspass )
+ COMPREPLY=( $( compgen -W '$cvsroots' -- $cur ) )
+ fi
+ ;;
+ export)
+ if [[ "$cur" != -* ]]; then
+ [ -z "$cvsroot" ] && cvsroot=$CVSROOT
+ COMPREPLY=( $( cvs -d "$cvsroot" co -c | awk '{print $1}' ) )
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]}' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W '-N -f -l -R -n \
+ -r -D -d -k' -- $cur ) )
+ fi
+ ;;
+ diff)
+ if [[ "$cur" == -* ]]; then
+ _longopt diff
+ else
+ get_entries
+ COMPREPLY=( $( compgen -W '${entries[@]:-}' -- $cur ) )
+ fi
+ ;;
+ remove)
+ if [[ "$cur" != -* ]]; then
+ set_prefix
+ if [ $COMP_CWORD -gt 1 -a -r ${prefix:-}CVS/Entries ]; then
+ get_entries
+ # find out what files are missing
+ for i in "${entries[@]}"; do
+ [ ! -r "$i" ] && miss=( "${miss[@]}" $i )
+ done
+ COMPREPLY=( $(compgen -W '${miss[@]:-}' -- $cur) )
+ fi
+ else
+ COMPREPLY=( $( compgen -W '-f -l -R' -- $cur ) )
+ fi
+ ;;
+ import)
+ if [[ "$cur" != -* ]]; then
+ # starts with same algorithm as checkout
+ [ -z "$cvsroot" ] && cvsroot=$CVSROOT
+ prefix=${cur%/*}
+ if [ -r ${cvsroot}/${prefix} ]; then
+ get_modules
+ COMPREPLY=( ${COMPREPLY[@]#$cvsroot} )
+ COMPREPLY=( ${COMPREPLY[@]#\/} )
+ fi
+ pwd=$( pwd )
+ pwd=${pwd##*/}
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]} $pwd' -- \
+ $cur ) )
+ else
+ COMPREPLY=( $( compgen -W '-d -k -I -b -m -W' -- $cur ))
+ fi
+ ;;
+ update)
+ if [[ "$cur" = -* ]]; then
+ COMPREPLY=( $( compgen -W '-A -P -C -d -f -l -R -p \
+ -k -r -D -j -I -W' -- \
+ $cur ) )
+ fi
+ ;;
+ "")
+ COMPREPLY=( $( compgen -W 'add admin annotate checkout ci co \
+ commit diff delete edit export \
+ freeze get history import log new \
+ patch rcs rdiff release remove \
+ rfreeze rlog rm rtag stat status \
+ tag unedit up update -H -Q -q -b \
+ -d -e -f -l -n -t -r -v -w -x -z \
+ --help --version' -- $cur ) )
+ ;;
+ *)
+ ;;
+ esac
+
+ return 0
+}
+complete -F _cvs $default cvs
+}
+
+have rpm && {
+# helper functions for rpm completion
+#
+_rpm_installed_packages()
+{
+ local ver nodig nosig
+
+ if [ -r /var/log/rpmpkgs -a \
+ /var/log/rpmpkgs -nt /var/lib/rpm/Packages ]; then
+ # using RHL 7.2 or later - this is quicker than querying the DB
+ COMPREPLY=( $( sed -ne \
+ 's|^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.@]\+.*\.rpm$|\1|p' \
+ /var/log/rpmpkgs ) )
+ else
+ nodig=""
+ nosig=""
+ ver=$(rpm --version)
+ ver=${ver##* }
+
+ if [[ "$ver" > "4.0.4" ]]; then
+ nodig="--nodigest"
+ fi
+ if [[ "$ver" > "4.0.99" ]]; then
+ nosig="--nosignature"
+ fi
+
+ COMPREPLY=( $( rpm -qa $nodig $nosig | sed -ne \
+ 's|^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9a-z.@]\+$|\1|p' ) )
+ fi
+}
+
+_rpm_groups()
+{
+ local IFS=$'\t'
+ # remove trailing backslash, or grep will complain
+ cur=${cur%"\\"}
+ COMPREPLY=( $( rpm -qa $nodig $nosig --queryformat '%{group}\n' | \
+ grep "^$cur" ) )
+ # backslash escape spaces and translate newlines to tabs
+ COMPREPLY=( $( echo "${COMPREPLY[@]}" | sed 's/ /\\ /g' | tr '\n' '\t' ) )
+}
+
+# rpm(8) completion
+#
+_rpm()
+{
+ local cur prev ver nodig nosig
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ nodig=""
+ nosig=""
+ ver=$(rpm --version); ver=${ver##* }
+
+ if [[ "$ver" > "4.0.4" ]]; then
+ nodig="--nodigest"
+ fi
+ if [[ "$ver" > "4.0.99" ]]; then
+ nosig="--nosignature"
+ fi
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ # first parameter on line
+ case "$cur" in
+ -b*)
+ COMPREPLY=( $( compgen -W '-ba -bb -bc -bi -bl -bp -bs'\
+ -- $cur ) )
+ ;;
+ -t*)
+ COMPREPLY=( $( compgen -W '-ta -tb -tc -ti -tl -tp -ts'\
+ -- $cur ) )
+ ;;
+ --*)
+ COMPREPLY=( $( compgen -W '--help --version --initdb \
+ --checksig --recompile --rebuild --resign --addsign \
+ --rebuilddb --showrc --setperms --setugids --tarbuild \
+ --eval --install --upgrade --query --freshen --erase \
+ --verify --querytags --rmsource --rmspec --clean \
+ --import' -- $cur ) )
+ ;;
+ *)
+ COMPREPLY=( $( compgen -W '-b -e -F -i -q -t -U -V' \
+ -- $cur ) )
+ ;;
+ esac
+
+ return 0
+ fi
+
+ case "$prev" in
+ --@(@(db|exclude)path|prefix|relocate|root))
+ _filedir -d
+ return 0
+ ;;
+ --eval)
+ # get a list of macros
+ COMPREPLY=( $( sed -ne 's|^\(%'${cur#\%}'[^ '$'\t'']*\).*$|\1|p' \
+ /usr/lib/rpm/macros ) )
+ return 0
+ ;;
+ --pipe)
+ COMPREPLY=( $( compgen -c -- $cur ) )
+ return 0
+ ;;
+ --rcfile)
+ _filedir
+ return 0
+ ;;
+ --specfile)
+ # complete on .spec files
+ _filedir spec
+ return 0
+ ;;
+ --whatprovides)
+ if [[ "$cur" == */* ]]; then
+ _filedir
+ else
+ # complete on capabilities
+ COMPREPLY=( $( rpm -qa $nodig $nosig --queryformat \
+ '%{providename}\n' | grep "^$cur" ) )
+ fi
+ return 0
+ ;;
+ --whatrequires)
+ # complete on capabilities
+ COMPREPLY=( $( rpm -qa $nodig $nosig --queryformat \
+ '%{requirename}\n' | grep "^$cur" ) )
+ return 0
+ ;;
+ esac
+
+ case "${COMP_WORDS[1]}" in
+ -@([iFU]*|-install|-freshen|-upgrade))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--percent --force --test \
+ --replacepkgs --replacefiles --root --excludedocs \
+ --includedocs --noscripts --rcfile --ignorearch \
+ --dbpath --prefix --ignoreos --nodeps --allfiles \
+ --ftpproxy --ftpport --justdb --httpproxy --httpport \
+ --noorder --relocate --badreloc --notriggers \
+ --excludepath --ignoresize --oldpackage --define \
+ --eval --pipe --queryformat --repackage --nosuggests \
+ --nodigest --nosignature' -- $cur ) )
+ else
+ _filedir 'rpm'
+ fi
+ ;;
+ -@(e|-erase))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--allmatches --noscripts \
+ --notriggers --nodeps --test --repackage' -- $cur ) )
+ else
+ _rpm_installed_packages
+ fi
+ ;;
+ -@(q*|-query))
+ # check whether we're doing file completion
+ if [ "${COMP_LINE#* -*([^ -])f}" != "$COMP_LINE" ]; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--scripts --root \
+ --rcfile --requires --ftpport --ftpproxy \
+ --httpproxy --httpport --provides --triggers \
+ --dump --changelog --dbpath \
+ --last --filesbypkg \
+ --info --list --state \
+ --docfiles --configfiles --queryformat \
+ --conflicts --obsoletes \
+ --nodigest --nosignature \
+ --triggerscripts' -- $cur ) )
+ else
+ _filedir
+ fi
+ elif [ "${COMP_LINE#* -*([^ -])g}" != "$COMP_LINE" ]; then
+ _rpm_groups
+ elif [ "${COMP_LINE#* -*([^ -])p}" != "$COMP_LINE" ]; then
+ # uninstalled package completion
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--scripts --root \
+ --rcfile --whatprovides --whatrequires \
+ --requires --triggeredby --ftpport --ftpproxy \
+ --httpproxy --httpport --provides --triggers \
+ --dump --changelog --dbpath --filesbypkg \
+ --define --eval --pipe --showrc --info --list \
+ --state --docfiles --configfiles --queryformat\
+ --conflicts --obsoletes --nodigest \
+ --nosignature' -- $cur ) )
+ else
+ _filedir 'rpm'
+ fi
+ else
+ # installed package completion
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--scripts --root \
+ --rcfile --whatprovides --whatrequires \
+ --requires --triggeredby --ftpport --ftpproxy \
+ --httpproxy --httpport --provides --triggers \
+ --dump --changelog --dbpath --specfile \
+ --querybynumber --last --filesbypkg --define \
+ --eval --pipe --showrc --info --list --state \
+ --docfiles --configfiles --queryformat \
+ --conflicts --obsoletes --pkgid --hdrid \
+ --fileid --tid --nodigest --nosignature \
+ --triggerscripts' -- $cur ) )
+ elif [ "${COMP_LINE#* -*([^ -])a}" == "$COMP_LINE" ]; then
+ _rpm_installed_packages
+ fi
+ fi
+ ;;
+ -@(K*|-checksig))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--nopgp --nogpg --nomd5 \
+ --nodigest --nosignature' -- $cur ) )
+ else
+ _filedir 'rpm'
+ fi
+ ;;
+ -@([Vy]*|-verify))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--root --rcfile --dbpath \
+ --nodeps --nogroup --nolinkto --nomode --nomtime \
+ --nordev --nouser --nofiles --noscripts --nomd5 \
+ --querytags --specfile --whatrequires --whatprovides \
+ --nodigest --nosignature' -- $cur ) )
+ # check whether we're doing file completion
+ elif [ "${COMP_LINE#* -*([^ -])f}" != "$COMP_LINE" ]; then
+ _filedir
+ elif [ "${COMP_LINE#* -*([^ -])g}" != "$COMP_LINE" ]; then
+ _rpm_groups
+ elif [ "${COMP_LINE#* -*([^ -])p}" != "$COMP_LINE" ]; then
+ _filedir 'rpm'
+ else
+ _rpm_installed_packages
+ fi
+ ;;
+ -[bt]*)
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--short-circuit --timecheck \
+ --clean --rmsource --rmspec --test --sign --buildroot \
+ --target -- buildarch --buildos --nobuild --nodeps \
+ --nodirtokens' -- $cur ) )
+ elif [[ ${COMP_WORDS[1]} == -b* ]]; then
+ _filedir 'spec'
+ else
+ _filedir '@(tgz|tar.@(gz|bz2))'
+ fi
+ ;;
+ --re@(build|compile))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--nodeps --rmsource \
+ --rmspec --sign --nodirtokens --target' -- $cur ) )
+ else
+ _filedir '?(no)src.rpm'
+ fi
+ ;;
+ --tarbuild)
+ _filedir '@(tgz|tar.@(gz|bz2))'
+ ;;
+ --@(re|add)sign)
+ _filedir 'rpm'
+ ;;
+ --set@(perms|gids))
+ _rpm_installed_packages
+ ;;
+ --@(clean|rms@(ource|pec)))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--clean --rmsource \
+ --rmspec' -- $cur ) )
+ else
+ _filedir 'spec'
+ fi
+ ;;
+ --@(import|dbpath|root))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--import --dbpath --root' \
+ -- $cur ) )
+ else
+ _filedir
+ fi
+ ;;
+ esac
+
+ return 0
+}
+complete -F _rpm $filenames rpm rpmbuild
+}
+
+# Debian apt-get(8) completion.
+#
+have apt-get &&
+_apt_get()
+{
+ local cur prev special i
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
+ if [[ ${COMP_WORDS[i]} == @(install|remove|purge|source|build-dep) ]]; then
+ special=${COMP_WORDS[i]}
+ fi
+ done
+
+ if [ -n "$special" ]; then
+ case $special in
+ remove|purge)
+ if [ -f /etc/debian_version ]; then
+ # Debian system
+ COMPREPLY=( $( _comp_dpkg_installed_packages \
+ $cur ) )
+ else
+ # assume RPM based
+ _rpm_installed_packages
+ fi
+ return 0
+ ;;
+ *)
+ COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
+ return 0
+ ;;
+
+ esac
+ fi
+
+ case "$prev" in
+ -@(c|-config-file))
+ _filedir
+ return 0
+ ;;
+
+ -@(t|-target-release|-default-release))
+ COMPREPLY=( $( apt-cache policy | \
+ grep "release.o=Debian,a=$cur" | \
+ sed -e "s/.*a=\(\w*\).*/\1/" | uniq 2> /dev/null) )
+ return 0
+ ;;
+
+ esac
+
+ if [[ "$cur" == -* ]]; then
+
+ COMPREPLY=( $( compgen -W '-d -f -h -v -m -q -s -y \
+ -u -t -b -c -o --download-only --fix-broken \
+ --help --version --ignore-missing \
+ --fix-missing --no-download --quiet --simulate \
+ --just-print --dry-run --recon --no-act --yes \
+ --assume-yes --show-upgraded --only-source \
+ --compile --build --ignore-hold \
+ --target-release --no-upgrade --force-yes \
+ --print-uris --purge --reinstall \
+ --list-cleanup --default-release \
+ --trivial-only --no-remove --diff-only \
+ --tar-only --config-file --option --auto-remove' -- $cur ) )
+ else
+
+ COMPREPLY=( $( compgen -W 'update upgrade dselect-upgrade \
+ dist-upgrade install remove purge source \
+ build-dep check clean autoclean autoremove' \
+ -- $cur ) )
+
+ fi
+
+
+ return 0
+} &&
+complete -F _apt_get $filenames apt-get
+
+# Debian apt-cache(8) completion.
+#
+have apt-cache &&
+_apt_cache()
+{
+ local cur prev special i
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+
+ if [ "$cur" != show ]; then
+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
+ if [[ ${COMP_WORDS[i]} == @(add|depends|dotty|policy|rdepends|madison|show?(pkg|src|)) ]]; then
+ special=${COMP_WORDS[i]}
+ fi
+ done
+ fi
+
+
+ if [ -n "$special" ]; then
+ case $special in
+ add)
+ _filedir
+ return 0
+ ;;
+
+ *)
+ COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
+ return 0
+ ;;
+
+ esac
+ fi
+
+
+ case "$prev" in
+ -@(c|p|s|-config-file|-@(pkg|src)-cache))
+ _filedir
+ return 0
+ ;;
+ search)
+ if [[ "$cur" != -* ]]; then
+ return 0
+ fi
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+
+ COMPREPLY=( $( compgen -W '-h -v -p -s -q -i -f -a -g -c \
+ -o --help --version --pkg-cache --src-cache \
+ --quiet --important --full --all-versions \
+ --no-all-versions --generate --no-generate \
+ --names-only --all-names --recurse \
+ --config-file --option' -- $cur ) )
+ else
+
+ COMPREPLY=( $( compgen -W 'add gencaches show showpkg showsrc \
+ stats dump dumpavail unmet search search \
+ depends rdepends pkgnames dotty xvcg \
+ policy madison' -- $cur ) )
+
+ fi
+
+
+ return 0
+} &&
+complete -F _apt_cache $filenames apt-cache
+
+
+# Debian aptitude(1) completion
+#
+have aptitude && {
+have grep-status && {
+_comp_dpkg_hold_packages()
+{
+ grep-status -P -e "^$1" -a -FStatus 'hold' -n -s Package
+}
+} || {
+_comp_dpkg_hold_packages()
+{
+ grep -B 2 'hold' /var/lib/dpkg/status | grep "Package: $1" \
+ | cut -d\ -f2
+}
+}
+
+_aptitude()
+{
+ local cur dashoptions prev special i
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+
+ dashoptions='-S -u -i -h --help --version -s --simulate -d \
+ --download-only -P --prompt -y --assume-yes -F \
+ --display-format -O --sort -w --width -f -r -g \
+ --with-recommends --with-suggests -R -G \
+ --without-recommends --without-suggests -t \
+ --target-release -V --show-versions -D --show-deps\
+ -Z -v --verbose --purge-unused'
+
+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
+ if [[ ${COMP_WORDS[i]} == @(install|reinstall|hold|unhold|markauto|unmarkauto|dist-upgrade|full-upgrade|download|show|forbid-version|purge|remove|changelog|why|why-not|keep|keep-all) ]]; then
+ special=${COMP_WORDS[i]}
+ fi
+ #exclude some mutually exclusive options
+ [[ ${COMP_WORDS[i]} == '-u' ]] && dashoptions=${dashoptions/-i}
+ [[ ${COMP_WORDS[i]} == '-i' ]] && dashoptions=${dashoptions/-u}
+ done
+
+ if [[ -n "$special" ]]; then
+ case $special in
+ @(install|hold|markauto|unmarkauto|dist-upgrade|full-upgrade|download|show|changelog|why|why-not))
+ COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
+ return 0
+ ;;
+ @(purge|remove|reinstall|forbid-version))
+ COMPREPLY=( $( _comp_dpkg_installed_packages $cur ) )
+ return 0
+ ;;
+ unhold)
+ COMPREPLY=( $( _comp_dpkg_hold_packages $cur ) )
+ return 0
+ ;;
+
+ esac
+ fi
+
+ case $prev in
+ # don't complete anything if these options are found
+ @(autoclean|clean|forget-new|search|upgrade|safe-upgrade|update|keep-all))
+ return 0
+ ;;
+
+ -S)
+ _filedir
+ return 0
+ ;;
+
+ -@(t|-target-release|-default-release))
+ COMPREPLY=( $( apt-cache policy | \
+ grep "release.o=Debian,a=$cur" | \
+ sed -e "s/.*a=\(\w*\).*/\1/" | uniq 2> /dev/null ) )
+ return 0
+ ;;
+
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W "$dashoptions" -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W 'update upgrade safe-upgrade forget-new clean \
+ autoclean install reinstall remove \
+ hold unhold purge markauto unmarkauto why why-not \
+ dist-upgrade full-upgrade download search show \
+ forbid-version changelog keep-all' -- $cur ) )
+ fi
+
+
+ return 0
+}
+complete -F _aptitude $default aptitude
+}
+
+# Debian apt-build(1) completion.
+#
+have apt-build &&
+_apt_build()
+{
+ local cur prev special i
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
+ if [[ ${COMP_WORDS[i]} == @(install|remove|source|info|clean) ]]; then
+ special=${COMP_WORDS[i]}
+ fi
+ done
+
+ if [ -n "$special" ]; then
+ case $special in
+ @(install|source|info))
+ COMPREPLY=( $( apt-cache pkgnames $cur 2> /dev/null ) )
+ return 0
+ ;;
+ remove)
+ COMPREPLY=( $( _comp_dpkg_installed_packages \
+ $cur ) )
+ return 0
+ ;;
+ *)
+ return 0
+ ;;
+ esac
+ fi
+
+ case "$prev" in
+
+ --@(patch|build-dir|repository-dir))
+ _filedir
+ return 0
+ ;;
+
+ -@(h|-help))
+ return 0
+ ;;
+
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--help --show-upgraded -u --build-dir \
+ --repository-dir --build-only \
+ --build-command --reinstall --rebuild \
+ --remove-builddep --no-wrapper --purge \
+ --patch --patch-strip -p --yes -y \
+ --version -v --no-source' -- $cur ) )
+
+ else
+ COMPREPLY=( $( compgen -W 'update upgrade install remove \
+ source dist-upgrade world clean info \
+ clean-build update-repository ' -- $cur ) )
+ fi
+
+
+ return 0
+} &&
+complete -F _apt_build $filenames apt-build
+
+# chsh(1) completion
+#
+_chsh()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [ "$prev" = "-s" ]; then
+ if [ -f /etc/debian_version ]; then
+ COMPREPLY=( $( </etc/shells ) )
+ else
+ COMPREPLY=( $( chsh -l | grep "^$cur" ) )
+ fi
+ else
+ COMPREPLY=( $( compgen -u -- $cur ) )
+ fi
+
+ return 0
+}
+complete -F _chsh chsh
+
+# chkconfig(8) completion
+#
+have chkconfig &&
+_chkconfig()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ @([1-6]|--@(list|add|del)))
+ _services
+ return 0
+ ;;
+ --level)
+ COMPREPLY=( $( compgen -W '1 2 3 4 5 6' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--list --add --del --level' -- $cur ) )
+ else
+ if [ $COMP_CWORD -eq 2 -o $COMP_CWORD -eq 4 ]; then
+ COMPREPLY=( $( compgen -W 'on off reset' -- $cur ) )
+ else
+ _services
+ fi
+ fi
+} &&
+complete -F _chkconfig chkconfig
+
+# This function provides simple user@host completion
+#
+_user_at_host() {
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [[ $cur == *@* ]]; then
+ _known_hosts
+ else
+ COMPREPLY=( $( compgen -u -- "$cur" ) )
+ fi
+
+ return 0
+}
+shopt -u hostcomplete && complete -F _user_at_host $nospace talk ytalk finger
+
+# This function performs host completion based on ssh's known_hosts files,
+# defaulting to standard host completion if they don't exist.
+#
+_known_hosts()
+{
+ local cur curd ocur user suffix aliases global_kh user_kh hosts i host
+ local -a kh khd config
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ ocur=$cur
+
+ [ "$1" = -a ] || [ "$2" = -a ] && aliases='yes'
+ [ "$1" = -c ] || [ "$2" = -c ] && suffix=':'
+ [[ $cur == *@* ]] && user=${cur%@*}@ && cur=${cur#*@}
+ kh=()
+
+ # ssh config files
+ [ -r /etc/ssh/ssh_config ] &&
+ config=( "${config[@]}" "/etc/ssh/ssh_config" )
+ [ -r "${HOME}/.ssh/config" ] &&
+ config=( "${config[@]}" "${HOME}/.ssh/config" )
+ [ -r "${HOME}/.ssh2/config" ] &&
+ config=( "${config[@]}" "${HOME}/.ssh2/config" )
+
+ if [ ${#config[@]} -gt 0 ]; then
+ # expand path (if present) to global known hosts file
+ global_kh=$( eval echo $( sed -ne 's/^[ \t]*[Gg][Ll][Oo][Bb][Aa][Ll][Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t '"']*\(.*\)$/\1/p' "${config[@]}" ) )
+ # expand path (if present) to user known hosts file
+ user_kh=$( eval echo $( sed -ne 's/^[ \t]*[Uu][Ss][Ee][Rr][Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t '"']*\(.*\)$/\1/p' "${config[@]}" ) )
+ fi
+
+ # Global known_hosts files
+ [ -r "$global_kh" ] &&
+ kh=( "${kh[@]}" "$global_kh" )
+ [ -r /etc/ssh/ssh_known_hosts ] &&
+ kh=( "${kh[@]}" /etc/ssh/ssh_known_hosts )
+ [ -r /etc/ssh/ssh_known_hosts2 ] &&
+ kh=( "${kh[@]}" /etc/ssh/ssh_known_hosts2 )
+ [ -r /etc/known_hosts ] &&
+ kh=( "${kh[@]}" /etc/known_hosts )
+ [ -r /etc/known_hosts2 ] &&
+ kh=( "${kh[@]}" /etc/known_hosts2 )
+ [ -d /etc/ssh2/knownhosts ] &&
+ khd=( "${khd[@]}" /etc/ssh2/knownhosts/*pub )
+
+ # User known_hosts files
+ [ -r "$user_kh" ] &&
+ kh=( "${kh[@]}" "$user_kh" )
+ [ -r ~/.ssh/known_hosts ] &&
+ kh=( "${kh[@]}" ~/.ssh/known_hosts )
+ [ -r ~/.ssh/known_hosts2 ] &&
+ kh=( "${kh[@]}" ~/.ssh/known_hosts2 )
+ [ -d ~/.ssh2/hostkeys ] &&
+ khd=( "${khd[@]}" ~/.ssh2/hostkeys/*pub )
+
+ # If we have known_hosts files to use
+ if [ ${#kh[@]} -gt 0 -o ${#khd[@]} -gt 0 ]; then
+ # Escape slashes and dots in paths for awk
+ cur=${cur//\//\\\/}
+ cur=${cur//\./\\\.}
+ curd=$cur
+
+ if [[ "$cur" == [0-9]*.* ]]; then
+ # Digits followed by a dot - just search for that
+ cur="^$cur.*"
+ elif [[ "$cur" == [0-9]* ]]; then
+ # Digits followed by no dot - search for digits followed
+ # by a dot
+ cur="^$cur.*\."
+ elif [ -z "$cur" ]; then
+ # A blank - search for a dot or an alpha character
+ cur="[a-z.]"
+ else
+ cur="^$cur"
+ fi
+
+ if [ ${#kh[@]} -gt 0 ]; then
+
+ # FS needs to look for a comma separated list
+ COMPREPLY=( $( awk 'BEGIN {FS=","}
+ /^[^|]/ {for (i=1; i<=2; ++i) { \
+ gsub(" .*$", "", $i); \
+ if ($i ~ /'$cur'/) {print $i} \
+ }}' "${kh[@]}" 2>/dev/null ) )
+ fi
+ if [ ${#khd[@]} -gt 0 ]; then
+ # Needs to look for files called
+ # .../.ssh2/key_22_<hostname>.pub
+ # dont fork any processes, because in a cluster environment,
+ # there can be hundreds of hostkeys
+ for i in "${khd[@]}" ; do
+ if [[ "$i" == *key_22_$curd*.pub ]] && [ -r "$i" ] ; then
+ host=${i/#*key_22_/}
+ host=${host/%.pub/}
+ COMPREPLY=( "${COMPREPLY[@]}" $host )
+ fi
+ done
+ fi
+
+ # append any available aliases from config files
+ if [ ${#config[@]} -gt 0 ] && [ -n "$aliases" ]; then
+ local host_aliases=$( sed -ne 's/^[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\?['"$'\t '"']\+\([^*?]*\)$/\2/p' "${config[@]}" )
+ hosts=$( compgen -W "$host_aliases" -- $ocur )
+ COMPREPLY=( "${COMPREPLY[@]}" $hosts )
+ fi
+
+ # Now add results of normal hostname completion
+ COMPREPLY=( "${COMPREPLY[@]}" $( compgen -A hostname -- $ocur ) )
+
+ # apply suffix
+ for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do
+ COMPREPLY[i]=$user${COMPREPLY[i]}$suffix
+ done
+ else
+ # Just do normal hostname completion
+ COMPREPLY=( $( compgen -A hostname -S "$suffix" -- $cur ) )
+ fi
+
+ return 0
+}
+complete -F _known_hosts traceroute traceroute6 tracepath tracepath6 \
+ ping ping6 fping fping6 telnet host nslookup rsh rlogin ftp dig ssh-installkeys mtr
+
+# ssh(1) completion
+#
+have ssh && {
+_ssh()
+{
+ local cur prev
+ local -a config
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -*c)
+ COMPREPLY=( $( compgen -W 'blowfish 3des 3des-cbc blowfish-cbc \
+ arcfour cast128-cbc' -- $cur ) )
+ ;;
+ -*i)
+ _filedir
+ ;;
+ -*l)
+ COMPREPLY=( $( compgen -u -- $cur ) )
+ ;;
+ *)
+ _known_hosts -a
+
+ [ $COMP_CWORD -eq 1 ] || \
+ COMPREPLY=( "${COMPREPLY[@]}" $( compgen -c -- $cur ) )
+ esac
+
+ return 0
+}
+shopt -u hostcomplete && complete -F _ssh ssh slogin sftp xhost autossh
+
+# scp(1) completion
+#
+_scp()
+{
+ local cur userhost path
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ _expand || return 0
+
+ if [[ "$cur" == *:* ]]; then
+ local IFS=$'\t\n'
+ # remove backslash escape from :
+ cur=${cur/\\:/:}
+ userhost=${cur%%?(\\):*}
+ path=${cur#*:}
+ # unescape spaces
+ path=${path//\\\\\\\\ / }
+ if [ -z "$path" ]; then
+ # default to home dir of specified user on remote host
+ path=$(ssh -o 'Batchmode yes' $userhost pwd 2>/dev/null)
+ fi
+ # escape spaces; remove executables, aliases, pipes and sockets;
+ # add space at end of file names
+ COMPREPLY=( $( ssh -o 'Batchmode yes' $userhost \
+ command ls -aF1d "$path*" 2>/dev/null | \
+ sed -e "s/[][(){}<>\",:;^&!$&=?\`|\\ ']/\\\\\\\\\\\\&/g" \
+ -e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) )
+ return 0
+ fi
+
+ [[ "$cur" == */* ]] || _known_hosts -c -a
+ local IFS=$'\t\n'
+ COMPREPLY=( "${COMPREPLY[@]}" $( command ls -aF1d $cur* \
+ 2>/dev/null | sed \
+ -e "s/[][(){}<>\",:;^&!$&=?\`|\\ ']/\\\\&/g" \
+ -e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' ) )
+ return 0
+}
+complete -F _scp $nospace scp
+}
+
+# rsync(1) completion
+#
+have rsync &&
+_rsync()
+{
+ local cur prev shell i userhost path
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ _expand || return 0
+
+ case "$prev" in
+ --@(config|password-file|include-from|exclude-from))
+ _filedir
+ return 0
+ ;;
+ -@(T|-temp-dir|-compare-dest))
+ _filedir -d
+ return 0
+ ;;
+ -@(e|-rsh))
+ COMPREPLY=( $( compgen -W 'rsh ssh' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ case "$cur" in
+ -*)
+ COMPREPLY=( $( compgen -W '-v -q -c -a -r -R -b -u -l -L -H \
+ -p -o -g -D -t -S -n -W -x -B -e -C -I -T -P \
+ -z -h -4 -6 --verbose --quiet --checksum \
+ --archive --recursive --relative --backup \
+ --backup-dir --suffix= --update --links \
+ --copy-links --copy-unsafe-links --safe-links \
+ --hard-links --perms --owner --group --devices\
+ --times --sparse --dry-run --whole-file \
+ --no-whole-file --one-file-system \
+ --block-size= --rsh= --rsync-path= \
+ --cvs-exclude --existing --ignore-existing \
+ --delete --delete-excluded --delete-after \
+ --ignore-errors --max-delete= --partial \
+ --force --numeric-ids --timeout= \
+ --ignore-times --size-only --modify-window= \
+ --temp-dir= --compare-dest= --compress \
+ --exclude= --exclude-from= --include= \
+ --include-from= --version --daemon --no-detach\
+ --address= --config= --port= --blocking-io \
+ --no-blocking-io --stats --progress \
+ --log-format= --password-file= --bwlimit= \
+ --write-batch= --read-batch= --help' -- $cur ))
+ ;;
+ *:*)
+ # find which remote shell is used
+ shell=rsh
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == -@(e|-rsh) ]]; then
+ shell=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+ if [[ "$shell" == ssh ]]; then
+ # remove backslash escape from :
+ cur=${cur/\\:/:}
+ userhost=${cur%%?(\\):*}
+ path=${cur#*:}
+ # unescape spaces
+ path=${path//\\\\\\\\ / }
+ if [ -z "$path" ]; then
+ # default to home dir of specified
+ # user on remote host
+ path=$(ssh -o 'Batchmode yes' \
+ $userhost pwd 2>/dev/null)
+ fi
+ # escape spaces; remove executables, aliases, pipes
+ # and sockets; add space at end of file names
+ COMPREPLY=( $( ssh -o 'Batchmode yes' $userhost \
+ command ls -aF1d "$path*" 2>/dev/null | \
+ sed -e 's/ /\\\\\\\ /g' -e 's/[*@|=]$//g' \
+ -e 's/[^\/]$/& /g' ) )
+ fi
+ ;;
+ *)
+ _known_hosts -c -a
+ _filedir
+ ;;
+ esac
+
+ return 0
+} &&
+complete -F _rsync $nospace $filenames rsync
+
+# Linux route(8) completion
+#
+[ $UNAME = Linux ] &&
+_route()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [ "$prev" = dev ]; then
+ COMPREPLY=( $( ifconfig -a | sed -ne 's|^\('$cur'[^ ]*\).*$|\1|p' ))
+ return 0
+ fi
+
+ COMPREPLY=( $( compgen -W 'add del -host -net netmask metric mss \
+ window irtt reject mod dyn reinstate dev \
+ default gw' -- $cur ) )
+
+ COMPREPLY=( $( echo " ${COMP_WORDS[@]}" | \
+ (while read -d ' ' i; do
+ [ "$i" == "" ] && continue
+ # flatten array with spaces on either side,
+ # otherwise we cannot grep on word
+ # boundaries of first and last word
+ COMPREPLY=" ${COMPREPLY[@]} "
+ # remove word from list of completions
+ COMPREPLY=( ${COMPREPLY/ $i / } )
+ done
+ echo "${COMPREPLY[@]}")
+ ) )
+ return 0
+}
+[ $UNAME = Linux ] && complete -F _route route
+
+# GNU make(1) completion
+#
+have make || have gmake || have gnumake || have pmake &&
+_make()
+{
+ local file makef makef_dir="." makef_inc cur prev i
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # --name value style option
+ case $prev in
+ -@(f|o|W))
+ _filedir
+ return 0
+ ;;
+ -@(I|C))
+ _filedir -d
+ return 0
+ ;;
+ esac
+
+ # --name=value style option
+ if [[ "$cur" == *=* ]]; then
+ prev=${cur/=*/}
+ cur=${cur/*=/}
+ case "$prev" in
+ --@(file|makefile))
+ _filedir
+ return 0
+ ;;
+ --@(directory|include-dir))
+ _filedir -d
+ return 0
+ ;;
+ esac
+ fi
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-b -m -B -C -d -e -f -h -i -I\
+ -j -l -k -n -o -p -q -r -R - s -S -t -v -w -W \
+ --always-make --directory= --debug \
+ --environment-overrides --file= --makefile= --help \
+ --ignore-errors --include-dir= --jobs --load-average \
+ --max-load --keep-going --just-print --dry-run \
+ --recon --old-file= --assume-old= --print-data-base \
+ --question --no-builtin-rules --no-builtin-variables \
+ --silent --quiet --no-keep-goind --stop --touch \
+ --version --print-directory --no-print-directory \
+ --what-if= --new-file= --assume-new= \
+ --warn-undefined-variables' -- $cur ) )
+ else
+ # before we check for makefiles, see if a path was specified
+ # with -C
+ for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do
+ if [[ ${COMP_WORDS[i]} == -C ]]; then
+ # eval for tilde expansion
+ eval makef_dir=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+
+ # make reads `GNUmakefile', then `makefile', then `Makefile'
+ if [ -f ${makef_dir}/GNUmakefile ]; then
+ makef=${makef_dir}/GNUmakefile
+ elif [ -f ${makef_dir}/makefile ]; then
+ makef=${makef_dir}/makefile
+ elif [ -f ${makef_dir}/Makefile ]; then
+ makef=${makef_dir}/Makefile
+ else
+ makef=${makef_dir}/*.mk # local convention
+ fi
+
+ # before we scan for targets, see if a Makefile name was
+ # specified with -f
+ for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do
+ if [[ ${COMP_WORDS[i]} == -f ]]; then
+ # eval for tilde expansion
+ eval makef=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+
+ [ ! -f $makef ] && return 0
+
+ # deal with included Makefiles
+ makef_inc=$( grep -E '^-?include' $makef | sed -e "s,^.* ,"$makef_dir"/," )
+
+ for file in $makef_inc; do
+ [ -f $file ] && makef="$makef $file"
+ done
+
+ COMPREPLY=( $( awk -F':' '/^[a-zA-Z0-9][^$#\/\t=]*:([^=]|$)/ \
+ {split($1,A,/ /);for(i in A)print A[i]}' \
+ $makef 2>/dev/null | command grep "^$cur" ))
+ fi
+} &&
+complete -f -F _make $filenames make gmake gnumake pmake
+
+# GNU tar(1) completion
+#
+_tar()
+{
+ local cur ext regex tar untar
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W 'c t x u r d A' -- $cur ) )
+ return 0
+ fi
+
+ case "${COMP_WORDS[1]}" in
+ ?(-)[cr]*f)
+ _filedir
+ return 0
+ ;;
+ +([^IZzjy])f)
+ ext='t@(ar?(.@(Z|gz|bz?(2)))|gz|bz?(2))'
+ regex='t\(ar\(\.\(Z\|gz\|bz2\?\)\)\?\|gz\|bz2\?\)'
+ ;;
+ *[Zz]*f)
+ ext='t?(ar.)@(gz|Z)'
+ regex='t\(ar\.\)\?\(gz\|Z\)'
+ ;;
+ *[Ijy]*f)
+ ext='t?(ar.)bz?(2)'
+ regex='t\(ar\.\)\?bz2\?'
+ ;;
+ *)
+ _filedir
+ return 0
+ ;;
+
+ esac
+
+ if [[ "$COMP_LINE" == *$ext' ' ]]; then
+ # complete on files in tar file
+ #
+ # get name of tar file from command line
+ tar=$( echo "$COMP_LINE" | \
+ sed -e 's/^.* \([^ ]*'$regex'\) .*$/\1/' )
+ # devise how to untar and list it
+ untar=t${COMP_WORDS[1]//[^Izjyf]/}
+
+ COMPREPLY=( $( compgen -W "$( echo $( tar $untar $tar \
+ 2>/dev/null ) )" -- "$cur" ) )
+ return 0
+ fi
+
+ # file completion on relevant files
+ _filedir "$ext"
+
+ return 0
+}
+[ -n "${COMP_TAR_INTERNAL_PATHS:-}" ] && complete -F _tar $dirnames tar ||
+ complete -F _tar $filenames tar
+
+# jar(1) completion
+#
+have jar &&
+_jar()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [ $COMP_CWORD = 1 ]; then
+ COMPREPLY=( $( compgen -W 'c t x u' -- $cur ) )
+ return 0
+ fi
+
+ case "${COMP_WORDS[1]}" in
+ *c*f)
+ _filedir
+ ;;
+ *f)
+ _filedir '?(e|j|w)ar'
+ ;;
+ *)
+ _filedir
+ ;;
+ esac
+} &&
+complete -F _jar $filenames jar
+
+# Linux iptables(8) completion
+#
+have iptables &&
+_iptables()
+{
+ local cur prev table chain
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ chain='s/^Chain \([^ ]\+\).*$/\1/p'
+
+ if [[ $COMP_LINE == *-t\ *filter* ]]; then
+ table="-t filter"
+ elif [[ $COMP_LINE == *-t\ *nat* ]]; then
+ table="-t nat"
+ elif [[ $COMP_LINE == *-t\ *mangle* ]]; then
+ table="-t mangle"
+ fi
+
+ case "$prev" in
+ -*[AIDRPFXLZ])
+ COMPREPLY=( $( compgen -W '`iptables $table -nL | \
+ sed -ne "s/^Chain \([^ ]\+\).*$/\1/p"`' -- $cur ) )
+ ;;
+ -*t)
+ COMPREPLY=( $( compgen -W 'nat filter mangle' -- $cur ) )
+ ;;
+ -j)
+ if [ "$table" = "-t filter" -o "$table" = "" ]; then
+ COMPREPLY=( $( compgen -W 'ACCEPT DROP LOG ULOG REJECT \
+ `iptables $table -nL | sed -ne "$chain" \
+ -e "s/INPUT|OUTPUT|FORWARD|PREROUTING|POSTROUTING//"`' -- \
+ $cur ) )
+ elif [ "$table" = "-t nat" ]; then
+ COMPREPLY=( $( compgen -W 'ACCEPT DROP LOG ULOG REJECT \
+ MIRROR SNAT DNAT MASQUERADE `iptables $table -nL | \
+ sed -ne "$chain" -e "s/OUTPUT|PREROUTING|POSTROUTING//"`' \
+ -- $cur ) )
+ elif [ "$table" = "-t mangle" ]; then
+ COMPREPLY=( $( compgen -W 'ACCEPT DROP LOG ULOG REJECT \
+ MARK TOS `iptables $table -nL | sed -ne "$chain" \
+ -e "s/INPUT|OUTPUT|FORWARD|PREROUTING|POSTROUTING//"`' -- \
+ $cur ) )
+ fi
+ ;;
+ *)
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-i -o -s -d -p -f -m --append \
+ --delete --insert --replace --list --flush --zero --new \
+ --delete-chain --policy --rename-chain --proto --source \
+ --destination --in-interface --jump --match --numeric \
+ --out-interface --table --verbose --line-numbers --exact \
+ --fragment --modprobe= --set-counters --version' -- "$cur") )
+ fi
+ ;;
+ esac
+
+} &&
+complete -F _iptables iptables
+
+# tcpdump(8) completion
+#
+have tcpdump &&
+_tcpdump()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(r|w|F))
+ _filedir
+ return 0
+ ;;
+ -i)
+ _available_interfaces -a
+ return 0
+ ;;
+ esac
+
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a -d -e -f -l -n -N -O -p \
+ -q -R -S -t -u -v -x -C -F -i -m -r -s -T -w \
+ -E' -- $cur ) )
+ fi
+
+} &&
+complete -F _tcpdump tcpdump
+
+# autorpm(8) completion
+#
+have autorpm &&
+_autorpm()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ COMPREPLY=( $( compgen -W '--notty --debug --help --version \
+ auto add fullinfo info help install list \
+ remove set' -- $cur ) )
+
+} &&
+complete -F _autorpm autorpm
+
+# This meta-cd function observes the CDPATH variable, so that cd additionally
+# completes on directories under those specified in CDPATH.
+#
+_cd()
+{
+ local IFS=$'\t\n' cur=`_get_cword` i j k
+
+ # try to allow variable completion
+ if [[ "$cur" == ?(\\)\$* ]]; then
+ COMPREPLY=( $( compgen -v -P '$' -- "${cur#?(\\)$}" ) )
+ return 0
+ fi
+
+ # Use standard dir completion if no CDPATH or parameter starts with /,
+ # ./ or ../
+ if [ -z "${CDPATH:-}" ] || [[ "$cur" == ?(.)?(.)/* ]]; then
+ _filedir -d
+ return 0
+ fi
+
+ local -r mark_dirs=$(_rl_enabled mark-directories && echo y)
+ local -r mark_symdirs=$(_rl_enabled mark-symlinked-directories && echo y)
+
+ # we have a CDPATH, so loop on its contents
+ for i in ${CDPATH//:/$'\t'}; do
+ # create an array of matched subdirs
+ k="${#COMPREPLY[@]}"
+ for j in $( compgen -d $i/$cur ); do
+ if [[ ( $mark_symdirs && -h $j || $mark_dirs && ! -h $j ) && ! -d ${j#$i/} ]]; then
+ j="${j}/"
+ fi
+ COMPREPLY[k++]=${j#$i/}
+ done
+ done
+
+ _filedir -d
+
+ if [[ ${#COMPREPLY[@]} -eq 1 ]]; then
+ i=${COMPREPLY[0]}
+ if [ "$i" == "$cur" ] && [[ $i != "*/" ]]; then
+ COMPREPLY[0]="${i}/"
+ fi
+ fi
+
+ return 0
+}
+if shopt -q cdable_vars; then
+ complete -v -F _cd $nospace $filenames cd
+else
+ complete -F _cd $nospace $filenames cd
+fi
+
+_remove_comp_word()
+{
+ if [[ COMP_CWORD -eq 0 ]]; then
+ return
+ elif [[ ${#COMP_WORDS[@]} -ge 2 ]]; then
+ local old_cw0="${COMP_WORDS[0]}"
+ local new_cw0="${COMP_WORDS[1]}"
+ local old_length="${#COMP_LINE}"
+ COMP_LINE=${COMP_LINE#${old_cw0}}
+ local head=${COMP_LINE:0:${#new_cw0}}
+ local i=1
+ while [[ $head != $new_cw0 ]]; do
+ COMP_LINE=${COMP_LINE:1}
+ head=${COMP_LINE:0:${#new_cw0}}
+ if (( ++i > 10 )); then
+ break
+ fi
+ done
+ local new_length="${#COMP_LINE}"
+ COMP_POINT=$(( COMP_POINT + new_length - old_length))
+
+ COMP_CWORD=$(( COMP_CWORD - 1 ))
+ for (( i=0; i < ${#COMP_WORDS[@]} - 1; ++i )); do
+ COMP_WORDS[i]="${COMP_WORDS[i+1]}"
+ done
+ unset COMP_WORDS[${#COMP_WORDS[@]}-1]
+ else
+ return
+ fi
+}
+
+# A meta-command completion function for commands like sudo(8), which need to
+# first complete on a command, then complete according to that command's own
+# completion definition - currently not quite foolproof (e.g. mount and umount
+# don't work properly), but still quite useful.
+#
+_command()
+{
+ local cur func cline cspec noglob cmd done i \
+ _COMMAND_FUNC _COMMAND_FUNC_ARGS
+
+ _remove_comp_word
+ COMPREPLY=()
+ cur=`_get_cword`
+ # If the the first arguments following our meta-command-invoker are
+ # switches, get rid of them. Most definitely not foolproof.
+ done=
+ while [ -z $done ] ; do
+ cmd=${COMP_WORDS[0]}
+ if [[ "$cmd" == -* ]] && [ $COMP_CWORD -ge 1 ]; then
+ _remove_comp_word
+ elif [[ "$cmd" == -* ]] && [[ $COMP_CWORD -eq 0 ]]; then
+ return
+ else
+ done=1
+ fi
+ done
+
+ if [ $COMP_CWORD -eq 0 ]; then
+ COMPREPLY=( $( compgen -c -- $cur ) )
+ elif complete -p $cmd &>/dev/null; then
+ cspec=$( complete -p $cmd )
+ if [ "${cspec#* -F }" != "$cspec" ]; then
+ # COMP_CWORD and COMP_WORDS() are not read-only,
+ # so we can set them before handing off to regular
+ # completion routine
+
+ # get function name
+ func=${cspec#*-F }
+ func=${func%% *}
+
+ if [[ ${#COMP_WORDS[@]} -ge 2 ]]; then
+ $func $cmd "${COMP_WORDS[${#COMP_WORDS[@]}-1]}" "${COMP_WORDS[${#COMP_WORDS[@]}-2]}"
+ else
+ $func $cmd "${COMP_WORDS[${#COMP_WORDS[@]}-1]}"
+ fi
+
+ # remove any \: generated by a command that doesn't
+ # default to filenames or dirnames (e.g. sudo chown)
+ # FIXME: I'm pretty sure this does not work!
+ if [ "${cspec#*-o }" != "$cspec" ]; then
+ cspec=${cspec#*-o }
+ cspec=${cspec%% *}
+ if [[ "$cspec" != @(dir|file)names ]]; then
+ COMPREPLY=("${COMPREPLY[@]//\\\\:/:}")
+ fi
+ fi
+ elif [ -n "$cspec" ]; then
+ cspec=${cspec#complete};
+ cspec=${cspec%%$cmd};
+ COMPREPLY=( $( eval compgen "$cspec" -- "$cur" ) );
+ fi
+ fi
+
+ [ ${#COMPREPLY[@]} -eq 0 ] && _filedir
+}
+complete -F _command $filenames nohup exec nice eval strace time ltrace then \
+ else do vsound command xargs
+
+_root_command()
+{
+ PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin _command $1 $2 $3
+}
+complete -F _root_command $filenames sudo fakeroot really
+
+# ant(1) completion
+#
+have ant && {
+_ant()
+{
+ local cur prev buildfile i
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -buildfile|-f)
+ _filedir 'xml'
+ return 0
+ ;;
+ -logfile)
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ # relevant options completion
+ COMPREPLY=( $( compgen -W '-help -projecthelp -version -quiet \
+ -verbose -debug -emacs -logfile -logger \
+ -listener -buildfile -f -D -find' -- $cur ) )
+ else
+ # available targets completion
+ # find which buildfile to use
+ buildfile=build.xml
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == -buildfile ]]; then
+ buildfile=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+ [ ! -f $buildfile ] && return 0
+
+ # parse buildfile for targets
+ COMPREPLY=( $( awk -F'"' '/<target name="/ {print $2}' \
+ $buildfile | grep "^$cur" )
+ $( awk -F"'" "/<target name='/ "'{print $2}' \
+ $buildfile | grep "^$cur" )
+ $( awk -F'"' '/<target [^n]/ {if ($1 ~ /name=/) { print $2 } else if ($3 ~ /name=/) {print $4} else if ($5 ~ /name=/) {print $6}}' \
+ $buildfile | grep "^$cur" ) )
+ fi
+}
+have complete-ant-cmd.pl && \
+ complete -C complete-ant-cmd.pl -F _ant $filenames ant || \
+ complete -F _ant $filenames ant
+}
+
+have nslookup &&
+_nslookup()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]#-}
+
+ COMPREPLY=( $( compgen -P '-' -W 'all class= debug d2 domain= \
+ srchlist= defname search port= querytype= \
+ type= recurse retry root timeout vc \
+ ignoretc' -- $cur ) )
+} &&
+complete -F _nslookup nslookup
+
+# mysqladmin(1) completion
+#
+have mysqladmin &&
+_mysqladmin()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -u)
+ COMPREPLY=( $( compgen -u -- $cur ) )
+ return 0
+ ;;
+ *)
+ ;;
+ esac
+
+ COMPREPLY=( $( compgen -W '-# -f -? -C -h -p -P -i -r -E -s -S -t -u \
+ -v -V -w' -- $cur ) )
+
+ COMPREPLY=( "${COMPREPLY[@]}" \
+ $( compgen -W 'create drop extended-status flush-hosts \
+ flush-logs flush-status flush-tables \
+ flush-threads flush-privileges kill \
+ password ping processlist reload refresh \
+ shutdown status variables version' \
+ -- $cur ) )
+} &&
+complete -F _mysqladmin mysqladmin
+
+# gzip(1) completion
+#
+have gzip &&
+_gzip()
+{
+ local cur prev xspec IFS=$'\t\n'
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c -d -f \
+ -h -l -L -n -N -q -r -S -t -v -V \
+ -1 -2 -3 -4 -5 -6 -7 -8 -9 \
+ --stdout --decompress --force --help --list \
+ --license --no-name --name --quiet --recursive \
+ --suffix --test --verbose --version --fast \
+ --best' -- $cur ) )
+ return 0
+ fi
+
+ xspec="*.?(t)gz"
+ if [[ "$prev" == --* ]]; then
+ [[ "$prev" == --decompress || \
+ "$prev" == --list || \
+ "$prev" == --test ]] && xspec="!"$xspec
+ [[ "$prev" == --force ]] && xspec=
+ elif [[ "$prev" == -* ]]; then
+ [[ "$prev" == -*[dlt]* ]] && xspec="!"$xspec
+ [[ "$prev" == -*f* ]] && xspec=
+ elif [ "$prev" = '>' ]; then
+ xspec=
+ elif [ "$prev" = '<' ]; then
+ xspec=
+ fi
+
+ _expand || return 0
+
+ COMPREPLY=( $( compgen -f -X "$xspec" -- $cur ) \
+ $( compgen -d -- $cur ) )
+} &&
+complete -F _gzip $filenames gzip
+
+# bzip2(1) completion
+#
+have bzip2 &&
+_bzip2()
+{
+ local cur prev xspec IFS=$'\t\n'
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c -d -f -h -k -L -q -s \
+ -t -v -V -z -1 -2 -3 -4 -5 -6 -7 -8 -9 \
+ --help --decompress --compress --keep --force \
+ --test --stdout --quiet --verbose --license \
+ --version --small --fast --best' -- $cur ) )
+ return 0
+ fi
+
+ xspec="*.bz2"
+ if [[ "$prev" == --* ]]; then
+ [[ "$prev" == --decompress || \
+ "$prev" == --list || \
+ "$prev" == --test ]] && xspec="!"$xspec
+ [[ "$prev" == --compress ]] && xspec=
+ elif [[ "$prev" == -* ]]; then
+ [[ "$prev" == -*[dt]* ]] && xspec="!"$xspec
+ [[ "$prev" == -*z* ]] && xspec=
+ fi
+
+ _expand || return 0
+
+ COMPREPLY=( $( compgen -f -X "$xspec" -- $cur ) \
+ $( compgen -d -- $cur ) )
+} &&
+complete -F _bzip2 $filenames bzip2
+
+# openssl(1) completion
+#
+have openssl && {
+_openssl_sections()
+{
+ local config
+
+ config=/etc/ssl/openssl.cnf
+ [ ! -f $config ] && config=/usr/share/ssl/openssl.cnf
+ for (( i=2; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == -config ]]; then
+ config=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+ [ ! -f $config ] && return 0
+
+ COMPREPLY=( $( awk '/\[.*\]/ {print $2} ' $config | grep "^$cur" ) )
+}
+
+_openssl()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W 'asn1parse ca ciphers crl crl2pkcs7 \
+ dgst dh dhparam dsa dsaparam enc errstr gendh gendsa \
+ genrsa nseq passwd pkcs12 pkcs7 pkcs8 rand req rsa \
+ rsautl s_client s_server s_time sess_id smime speed \
+ spkac verify version x509 md2 md4 md5 mdc2 rmd160 sha \
+ sha1 base64 bf bf-cbc bf-cfb bf-ecb bf-ofb cast \
+ cast-cbc cast5-cbc cast5-cfb cast5-ecb cast5-ofb des \
+ des-cbc des-cfb des-ecb des-ede des-ede-cbc \
+ des-ede-cfb des-ede-ofb des-ede3 des-ede3-cbc \
+ des-ede3-cfb des-ede3-ofb des-ofb des3 desx rc2 \
+ rc2-40-cbc rc2-64-cbc rc2-cbc rc2-cfb rc2-ecb rc2-ofb \
+ rc4 rc4-40' -- $cur ) )
+ else
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ case ${COMP_WORDS[1]} in
+ asn1parse)
+ case $prev in
+ -inform)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out|oid))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -in -out -noout -offset \
+ -length -i -oid -strparse' -- $cur ) )
+ fi
+ ;;
+ ca)
+ case $prev in
+ -@(config|revoke|cert|in|out|spkac|ss_cert))
+ _filedir
+ return 0
+ ;;
+ -outdir)
+ _filedir -d
+ return 0
+ ;;
+ -@(name|crlexts|extensions))
+ _openssl_sections
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-verbose -config -name \
+ -gencrl -revoke -crldays -crlhours -crlexts \
+ -startdate -enddate -days -md -policy -keyfile \
+ -key -passin -cert -in -out -notext -outdir \
+ -infiles -spkac -ss_cert -preserveDN -batch \
+ -msie_hack -extensions' -- $cur ) )
+ fi
+ ;;
+ ciphers)
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-v -ssl2 -ssl3 -tls1' -- $cur ) )
+ fi
+ ;;
+ crl)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out|CAfile))
+ _filedir
+ return 0
+ ;;
+ -CAPath)
+ _filedir -d
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -text -in -out -noout \
+ -hash -issuer -lastupdate -nextupdate -CAfile -CApath' -- $cur ) )
+ fi
+ ;;
+ crl2pkcs7)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -in -out -print_certs' -- $cur ) )
+ fi
+ ;;
+ dgst)
+ case $prev in
+ -@(out|sign|verify|prvrify|signature))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-md5 -md4 -md2 -sha1 -sha -mdc2 -ripemd160 -dss1 \
+ -c -d -hex -binary -out -sign -verify -prverify -signature' -- $cur ) )
+ else
+ _filedir
+ fi
+ ;;
+ dsa)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -in -passin -out -passout -des -des3 -idea -text -noout \
+ -modulus -pubin -pubout' -- $cur ) )
+ fi
+ ;;
+ dsaparam)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out|rand))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -in -out -noout \
+ -text -C -rand -genkey' -- $cur ) )
+ fi
+ ;;
+ enc)
+ case $prev in
+ -@(in|out|kfile))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-ciphername -in -out -pass \
+ -e -d -a -A -k -kfile -S -K -iv -p -P -bufsize -debug' -- $cur ) )
+ fi
+ ;;
+ dhparam)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out|rand))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -in -out -dsaparam -noout \
+ -text -C -2 -5 -rand' -- $cur ) )
+ fi
+ ;;
+ gendsa)
+ case $prev in
+ -@(out|rand))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-out -des -des3 -idea -rand' -- $cur ) )
+ else
+ _filedir
+ fi
+ ;;
+ genrsa)
+ case $prev in
+ -@(out|rand))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-out -passout -des -des3 -idea -f4 -3 -rand' -- $cur ) )
+ fi
+ ;;
+ pkcs7)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -in -out -print_certs -text -noout' -- $cur ) )
+ fi
+ ;;
+ rand)
+ case $prev in
+ -@(out|rand))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-out -rand -base64' -- $cur ) )
+ fi
+ ;;
+ req)
+ case "$prev" in
+ -@(in|out|key)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+
+ -@(in|out|rand|key|keyout|config))
+ _filedir
+ return 0
+ ;;
+ -extensions)
+ _openssl_sections
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -in \
+ -passin -out -passout -text -noout -verify \
+ -modulus -new -rand -newkey -newkey -nodes \
+ -key -keyform -keyout -md5 -sha1 -md2 -mdc2 \
+ -config -x509 -days -asn1-kludge -newhdr \
+ -extensions -reqexts section' -- $cur ) )
+ fi
+ ;;
+ rsa)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER NET PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -in -passin -out -passout \
+ -sgckey -des -des3 -idea -text -noout -modulus -check -pubin \
+ -pubout -engine' -- $cur ) )
+ fi
+ ;;
+ rsautl)
+ case $prev in
+ -@(in|out|inkey))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-in -out -inkey -pubin -certin -sign -verify \
+ -encrypt -decrypt -pkcs -ssl -raw -hexdump -asn1parse' -- $cur ) )
+ fi
+ ;;
+ s_client)
+ case $prev in
+ -connect)
+ _known_hosts
+ return 0
+ ;;
+ -@(cert|key|CAfile|rand))
+ _filedir
+ return 0
+ ;;
+ -CApath)
+ _filedir -d
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-connect -verify -cert -key -CApath -CAfile \
+ -reconnect -pause -showcerts -debug -msg -nbio_test -state -nbio \
+ -crlf -ign_eof -quiet -ssl2 -ssl3 -tls1 -no_ssl2 -no_ssl3 -no_tls1 \
+ -bugs -cipher -starttls -engine -rand' -- $cur ) )
+ fi
+ ;;
+ s_server)
+ case $prev in
+ -@(cert|key|dcert|dkey|dhparam|CAfile|rand))
+ _filedir
+ return 0
+ ;;
+ -CApath)
+ _filedir -d
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-accept -context -verify -Verify -cert -key \
+ -dcert -dkey -dhparam -nbio -nbio_test -crlf -debug -msg -state -CApath \
+ -CAfile -nocert -cipher -quiet -no_tmp_rsa -ssl2 -ssl3 -tls1 -no_ssl2 \
+ -no_ssl3 -no_tls1 -no_dhe -bugs -hack -www -WWW -HTTP -engine -id_prefix \
+ -rand' -- $cur ) )
+ fi
+ ;;
+ s_time)
+ case $prev in
+ -connect)
+ _known_hosts
+ return 0
+ ;;
+ -@(cert|key|CAfile))
+ _filedir
+ return 0
+ ;;
+ -CApath)
+ _filedir -d
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-connect -www -cert -key -CApath -CAfile -reuse \
+ -new -verify -nbio -time -ssl2 -ssl3 -bugs -cipher' -- $cur ) )
+ fi
+ ;;
+
+ sess_id)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out))
+ _filedir
+ return 0
+ ;;
+ esac
+
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform -in -out -text -noout \
+ -context ID' -- $cur ) )
+ fi
+ ;;
+ smime)
+ case $prev in
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'SMIME DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -@(in|out|certfile|signer|recip|inkey|content|rand))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-encrypt -decrypt -sign -verify -pk7out -des -des3 \
+ -rc2-40 -rc2-64 -rc2-128 -aes128 -aes192 -aes256 -in -certfile -signer \
+ -recip -inform -passin -inkey -out -outform -content -to -from -subject \
+ -text -rand' -- $cur ) )
+ else
+ _filedir
+ fi
+ ;;
+ speed)
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-engine' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W 'md2 mdc2 md5 hmac sha1 rmd160 idea-cbc \
+ rc2-cbc rc5-cbc bf-cbc des-cbc des-ede3 rc4 rsa512 rsa1024 rsa2048 \
+ rsa4096 dsa512 dsa1024 dsa2048 idea rc2 des rsa blowfish' -- $cur ) )
+ fi
+ ;;
+ verify)
+ case $prev in
+ -@(CAfile|untrusted))
+ _filedir
+ return 0
+ ;;
+ -CApath)
+ _filedir -d
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-CApath -CAfile -purpose -untrusted -help -issuer_checks \
+ -verbose -certificates' -- $cur ) )
+ else
+ _filedir
+ fi
+ ;;
+ x509)
+ case "$prev" in
+ -@(in|out|CA|CAkey|CAserial|extfile))
+ _filedir
+ return 0
+ ;;
+ -@(in|out)form)
+ COMPREPLY=( $( compgen -W 'DER PEM NET' -- $cur ) )
+ return 0
+ ;;
+ -@(key|CA|CAkey)form)
+ COMPREPLY=( $( compgen -W 'DER PEM' -- $cur ) )
+ return 0
+ ;;
+ -extensions)
+ _openssl_sections
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-inform -outform \
+ -keyform -CAform -CAkeyform -in -out \
+ -serial -hash -subject -issuer -nameopt \
+ -email -startdate -enddate -purpose \
+ -dates -modulus -fingerprint -alias \
+ -noout -trustout -clrtrust -clrreject \
+ -addtrust -addreject -setalias -days \
+ -set_serial -signkey -x509toreq -req \
+ -CA -CAkey -CAcreateserial -CAserial \
+ -text -C -md2 -md5 -sha1 -mdc2 -clrext \
+ -extfile -extensions -engine' -- $cur ) )
+ fi
+ ;;
+ @(md5|md4|md2|sha1|sha|mdc2|ripemd160))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c -d' -- $cur ) )
+ else
+ _filedir
+ fi
+ ;;
+ esac
+ fi
+
+ return 0
+}
+complete -F _openssl $default openssl
+}
+
+# screen(1) completion
+#
+have screen &&
+_screen()
+{
+ local cur prev preprev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ [ "$COMP_CWORD" -ge 2 ] && preprev=${COMP_WORDS[COMP_CWORD-2]}
+
+ if [ "$preprev" = "-d" -o "$preprev" = "-D" -a "$prev" = "-r" -o \
+ "$prev" = "-R" ]; then
+ # list all
+ COMPREPLY=( $( command screen -ls | \
+ sed -ne 's|^['$'\t'']\+\('$cur'[0-9]\+\.[^'$'\t'']\+\).*$|\1|p' ) )
+ else
+ case "$prev" in
+ -[rR])
+ # list detached
+ COMPREPLY=( $( command screen -ls | \
+ sed -ne 's|^['$'\t'']\+\('$cur'[0-9]\+\.[^'$'\t'']\+\).*Detached.*$|\1|p' ) )
+ ;;
+ -[dDx])
+ # list attached
+ COMPREPLY=( $( command screen -ls | \
+ sed -ne 's|^['$'\t'']\+\('$cur'[0-9]\+\.[^'$'\t'']\+\).*Attached.*$|\1|p' ) )
+ ;;
+ -s)
+ # shells
+ COMPREPLY=( $( grep ^${cur:-[^#]} /etc/shells ) )
+ ;;
+ *)
+ ;;
+ esac
+ fi
+
+ return 0
+} &&
+complete -F _screen $default screen
+
+# lftp(1) bookmark completion
+#
+have lftp &&
+_lftp()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [ $COMP_CWORD -eq 1 ] && [ -f ~/.lftp/bookmarks ]; then
+ COMPREPLY=( $( compgen -W '$( sed -ne "s/^\(.*\)'$'\t''.*$/\1/p" \
+ ~/.lftp/bookmarks )' -- $cur ) )
+ fi
+
+ return 0
+} &&
+complete -F _lftp $default lftp
+
+# ncftp(1) bookmark completion
+#
+have ncftp &&
+_ncftp()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [ $COMP_CWORD -eq 1 ] && [ -f ~/.ncftp/bookmarks ]; then
+ COMPREPLY=( $( compgen -W '$( sed -ne "s/^\([^,]\{1,\}\),.*$/\1/p" \
+ ~/.ncftp/bookmarks )' -- $cur ) )
+ fi
+
+ return 0
+} &&
+complete -F _ncftp $default ncftp
+
+# gdb(1) completion
+#
+have gdb &&
+_gdb()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -c -- $cur ) )
+ elif [ $COMP_CWORD -eq 2 ]; then
+ prev=${prev##*/}
+ COMPREPLY=( $( compgen -fW "$( command ps axo comm,pid | \
+ awk '{if ($1 ~ /^'"$prev"'/) print $2}' ) )" \
+ -- "$cur" ) )
+ fi
+} &&
+complete -F _gdb $filenames gdb
+
+# Postgresql completion
+#
+have psql && {
+_pg_databases()
+{
+ return
+ COMPREPLY=( $( psql -l 2>/dev/null | \
+ sed -e '1,/^-/d' -e '/^(/,$d' | \
+ awk '{print $1}' | grep "^$cur" ) )
+}
+
+_pg_users()
+{
+ #COMPREPLY=( $( psql -qtc 'select usename from pg_user' template1 2>/dev/null | \
+ # grep "^ $cur" ) )
+ #[ ${#COMPREPLY[@]} -eq 0 ] &&
+ COMPREPLY=( $( compgen -u -- $cur ) )
+}
+
+# createdb(1) completion
+#
+_createdb()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(h|-host=))
+ _known_hosts
+ return 0
+ ;;
+ -@(U|-username=))
+ _pg_users
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-D -T -E -h -p -U -W -e -q \
+ --location= --template= --encoding= --host= --port= \
+ --username= --password --echo --quiet --help' -- $cur ))
+ else
+ _pg_databases
+ fi
+}
+complete -F _createdb $default createdb
+
+# dropdb(1) completion
+#
+_dropdb()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(h|-host=))
+ _known_hosts
+ return 0
+ ;;
+ -@(U|-username=))
+ _pg_users
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-h -p -U -W -e -q \
+ --host= --port= --username= --password \
+ --interactive --echo --quiet --help' -- $cur ) )
+ else
+ _pg_databases
+ fi
+}
+complete -F _dropdb $default dropdb
+
+# psql(1) completion
+#
+_psql()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -h|--host)
+ _known_hosts
+ return 0
+ ;;
+ -U|--username)
+ _pg_users
+ return 0
+ ;;
+ -d|--dbname)
+ _pg_databases
+ return 0
+ ;;
+ -@(o|f)|--output|--file)
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ # return list of available options
+ COMPREPLY=( $( compgen -W '-a --echo-all -A --no-align \
+ -c --command -d --dbname -e --echo-queries \
+ -E --echo-hidden -f --file -F --filed-separator \
+ -h --host -H --html -l --list -n -o --output \
+ -p --port -P --pset -q -R --record-separator \
+ -s --single-step -S --single-line -t --tuples-only \
+ -T --table-attr -U --username -v --variable \
+ -V --version -W --password -x --expanded -X --nopsqlrc \
+ -? --help ' -- $cur ) )
+ else
+ # return list of available databases
+ _pg_databases
+ fi
+}
+complete -F _psql $default psql
+}
+
+_longopt()
+{
+ local cur opt
+
+ cur=`_get_cword`
+
+ if [[ "$cur" == --*=* ]]; then
+ opt=${cur%%=*}
+ # cut backslash that gets inserted before '=' sign
+ opt=${opt%\\*}
+ cur=${cur#*=}
+ _filedir
+ COMPREPLY=( $( compgen -P "$opt=" -W '${COMPREPLY[@]}' -- $cur))
+ return 0
+ fi
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( $1 --help 2>&1 | sed -e '/--/!d' \
+ -e 's/.*\(--[-A-Za-z0-9]\+=\?\).*/\1/' | \
+ command grep "^$cur" | sort -u ) )
+ elif [[ "$1" == @(mk|rm)dir ]]; then
+ _filedir -d
+ else
+ _filedir
+ fi
+}
+# makeinfo and texi2dvi are defined elsewhere.
+for i in a2ps autoconf automake bc gprof ld nm objcopy objdump readelf strip \
+ bison cpio diff patch enscript cp df dir du ln ls mkfifo mknod mv rm \
+ touch vdir awk gperf grep grub indent less m4 sed shar date \
+ tee who texindex cat csplit cut expand fmt fold head \
+ md5sum nl od paste pr ptx sha1sum sort split tac tail tr unexpand \
+ uniq wc ldd bash id irb mkdir rmdir; do
+ have $i && complete -F _longopt $filenames $i
+done
+
+# These commands use filenames, so '-o filenames' is not needed.
+for i in env netstat seq uname units wget; do
+ have $i && complete -F _longopt $default $i
+done
+unset i
+
+# gcc(1) completion
+#
+# The only unusual feature is that we don't parse "gcc --help -v" output
+# directly, because that would include the options of all the other backend
+# tools (linker, assembler, preprocessor, etc) without any indication that
+# you cannot feed such options to the gcc driver directly. (For example, the
+# linker takes a -z option, but you must type -Wl,-z for gcc.) Instead, we
+# ask the driver ("g++") for the name of the compiler ("cc1"), and parse the
+# --help output of the compiler.
+#
+have gcc &&
+_gcc()
+{
+ local cur cc backend
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ _expand || return 0
+
+ case "$1" in
+ gcj)
+ backend=jc1
+ ;;
+ gpc)
+ backend=gpc1
+ ;;
+ *77)
+ backend=f771
+ ;;
+ *)
+ backend=cc1 # (near-)universal backend
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ cc=$( $1 -print-prog-name=$backend )
+ # sink stderr:
+ # for C/C++/ObjectiveC it's useless
+ # for FORTRAN/Java it's an error
+ COMPREPLY=( $( $cc --help 2>/dev/null | tr '\t' ' ' | \
+ sed -e '/^ *-/!d' -e 's/ *-\([^ ]*\).*/-\1/' | \
+ command grep "^$cur" | sort -u ) )
+ else
+ _filedir
+ fi
+} &&
+complete $filenames -F _gcc gcc g++ c++ g77 gcj gpc
+[ $UNAME = GNU -o $UNAME = Linux -o $UNAME = Cygwin ] && \
+[ -n "${have:-}" ] && complete $filenames -F _gcc cc
+
+# Linux cardctl(8) completion
+#
+have cardctl &&
+_cardctl()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W 'status config ident suspend \
+ resume reset eject insert scheme' \
+ -- $cur ) )
+ fi
+} &&
+complete -F _cardctl cardctl
+
+# This function is required by _dpkg() and _dpkg-reconfigure()
+#
+have dpkg && {
+_comp_dpkg_installed_packages()
+{
+ grep -A 1 "Package: $1" /var/lib/dpkg/status | \
+ grep -B 1 -E "ok installed|half-installed|unpacked| \
+ half-configured|config-files" | \
+ grep "Package: $1" | cut -d\ -f2
+}
+
+# Debian dpkg(8) completion
+#
+_dpkg()
+{
+ local cur prev i
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ i=$COMP_CWORD
+
+ _expand || return 0
+
+ # find the last option flag
+ if [[ $cur != -* ]]; then
+ while [[ $prev != -* && $i != 1 ]]; do
+ i=$((i-1))
+ prev=${COMP_WORDS[i-1]}
+ done
+ fi
+
+ case "$prev" in
+ -@(c|i|A|I|f|e|x|X|-@(install|unpack|record-avail|contents|info|fsys-tarfile|field|control|extract)))
+ _filedir '?(u)deb'
+ return 0
+ ;;
+ -@(b|-build))
+ _filedir -d
+ return 0
+ ;;
+ -@(s|p|l|-@(status|print-avail|list)))
+ COMPREPLY=( $( apt-cache pkgnames $cur 2>/dev/null ) )
+ return 0
+ ;;
+ -@(S|-search))
+ _filedir
+ return 0
+ ;;
+ -@(r|L|P|-@(remove|purge|listfiles)))
+ COMPREPLY=( $( _comp_dpkg_installed_packages $cur ) )
+ return 0
+ ;;
+ *)
+
+ COMPREPLY=( $( compgen -W '-i --install --unpack -A --record-avail \
+ --configure -r --remove -P --purge --get-selections \
+ --set-selections --update-avail --merge-avail \
+ --clear-avail --command-fd --forget-old-unavail -s \
+ --status -p --print-avail -L --listfiles -l --list \
+ -S --search -C --audit --print-architecture \
+ --print-gnu-build-architecture \
+ --print-installation-architecture \
+ --compare-versions --help --version --force-help \
+ --force-all --force-auto-select --force-downgrade \
+ --force-configure-any --force-hold --force-bad-path \
+ --force-not-root --force-overwrite \
+ --force-overwrite-diverted --force-bad-verify \
+ --force-depends-version --force-depends \
+ --force-confnew --force-confold --force-confdef \
+ --force-confmiss --force-conflicts --force-architecture\
+ --force-overwrite-dir --force-remove-reinstreq \
+ --force-remove-essential -Dh \
+ --debug=help --licence --admindir= --root= --instdir= \
+ -O --selected-only -E --skip-same-version \
+ -G --refuse-downgrade -B --auto-deconfigure \
+ --no-debsig --no-act -D --debug= --status-fd \
+ -b --build -I --info -f --field -c --contents \
+ -x --extract -X --vextract --fsys-tarfile -e --control \
+ --ignore-depends= --abort-after' -- $cur ) )
+ ;;
+ esac
+
+
+}
+complete -F _dpkg $filenames dpkg dpkg-deb
+}
+
+# Debian GNU dpkg-reconfigure(8) completion
+#
+have dpkg-reconfigure &&
+_dpkg_reconfigure()
+{
+ local cur prev opt
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+
+ case "$prev" in
+ -@(f|-frontend))
+ opt=( $( echo /usr/share/perl5/Debconf/FrontEnd/* ) )
+ opt=( ${opt[@]##*/} )
+ opt=( ${opt[@]%.pm} )
+ COMPREPLY=( $( compgen -W '${opt[@]}' -- $cur ) )
+ return 0
+ ;;
+ -@(p|-priority))
+ COMPREPLY=( $( compgen -W 'low medium high critical' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-f --frontend -p --priority -a --all \
+ -u --unseen-only -h --help -s --showold \
+ --force --terse' -- $cur ) )
+ else
+ COMPREPLY=( $( _comp_dpkg_installed_packages $cur ) )
+ fi
+} &&
+complete -F _dpkg_reconfigure $default dpkg-reconfigure
+
+# Debian dpkg-source completion
+#
+have dpkg-source &&
+_dpkg_source()
+{
+ local cur prev options work i action packopts unpackopts
+
+ packopts="-c -l -F -V -T -D -U -W -E -sa -i -I -sk -sp -su -sr -ss -sn -sA -sK -sP -sU -sR"
+ unpackopts="-sp -sn -su"
+ options=`echo "-x -b $packopts $unpackopts" | xargs echo | sort -u | xargs echo`
+
+ COMPREPLY=()
+ if [ "$1" != "dpkg-source" ]; then
+ exit 1
+ fi
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ action="options"
+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
+ if [[ ${COMP_WORDS[$i]} == "-x" ]]; then
+ action=unpack
+ elif [[ ${COMP_WORDS[$i]} == "-b" ]]; then
+ action=pack
+ elif [[ ${COMP_WORDS[$i]} == "-h" ]]; then
+ action=help
+ fi
+ done
+ # if currently seeing a complete option, return just itself.
+ for i in $options; do
+ if [ "$cur" = "$i" ]; then
+ COMPREPLY=( "$cur" )
+ return 0
+ fi
+ done
+ case "$action" in
+ "unpack")
+ if [ "$cur" = "-" -o "$cur" = "-s" ]; then
+ COMPREPLY=( $unpackots )
+ return 0
+ fi
+ case "$prev" in
+ "-x")
+ COMPREPLY=( $( compgen -d -- "$cur" ) \
+ $( compgen -f -X '!*.dsc' -- "$cur" ) )
+ return 0
+ ;;
+ *)
+ COMPREPLY=( $unpackopts $(compgen -d -f -- "$cur" ) )
+ return 0
+ ;;
+ esac
+ return 0
+ ;;
+ "pack")
+ if [ "$cur" = "-" ]; then
+ COMPREPLY=( $packopts )
+ return 0
+ fi
+ if [ "$cur" = "-s" ]; then
+ COMPREPLY=( "-sa" "-sk" "-sp" "-su" "-sr" "-ss" "-sn" \
+ "-sA" "-sK" "-sP" "-sU" "-sR" )
+ return 0
+ fi
+ case "$prev" in
+ "-b")
+ COMPREPLY=( $( compgen -d -- "$cur" ) )
+ return 0
+ ;;
+ "-c"|"-l"|"-T"|"-i"|"-I")
+ # -c: get controlfile
+ # -l: get per-version info from this file
+ # -T: read variables here, not debian/substvars
+ # -i: <regexp> filter out files to ignore diffs of.
+ # -I: filter out files when building tarballs.
+ # return directory names and file names
+ COMPREPLY=( $( compgen -d -f ) )
+ return 0
+ ;;
+ "-F")
+ # -F: force change log format
+ COMPREPLY=( $( ( cd /usr/lib/dpkg/parsechangelog; compgen -f "$cur" ) ) )
+ return 0
+ ;;
+ "-V"|"-D")
+ # -V: set a substitution variable
+ # we don't know anything about possible variables or values
+ # so we don't try to suggest any completion.
+ COMPREPLY=()
+ return 0
+ ;;
+ "-D")
+ # -D: override or add a .dsc field and value
+ # if $cur doesn't contain a = yet, suggest variable names
+ if echo -- "$cur" | grep -q "="; then
+ # $cur contains a "="
+ COMPREPLY=()
+ return 0
+ else
+ COMPREPLY=( Format Source Version Binary Maintainer Uploader Architecture Standards-Version Build-Depends Files )
+ return 0
+ fi
+ ;;
+ "-U")
+ # -U: remove a field
+ # Suggest possible fieldnames
+ COMPREPLY=( Format Source Version Binary Maintainer Uploader Architecture Standards-Version Build-Depends Files )
+ return 0
+ ;;
+ *)
+ COMPREPLY=( $packopts )
+ return 0
+ ;;
+ esac
+ return 0
+ ;;
+ *)
+ # if seeing a partial option, return possible completions.
+ if [ "$cur" = "-s" ]; then
+ COMPREPLY=( "-sa" "-sk" "-sp" "-su" "-sr" "-ss" "-sn" \
+ "-sA" "-sK" "-sP" "-sU" "-sR" )
+ return 0
+ fi
+ # else return all possible options.
+ COMPREPLY=( $options )
+ return 0
+ ;;
+ esac
+} &&
+complete -F _dpkg_source dpkg-source
+
+# Debian Linux dselect(8) completion.
+#
+have dselect &&
+_dselect()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ --admindir)
+ _filedir -d
+ return 0
+ ;;
+
+ -@(D|debug))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--admindir --help --version --licence \
+ --license --expert --debug' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W 'access update select install config \
+ remove quit' -- $cur ) )
+ fi
+
+
+ return 0
+} &&
+complete -F _dselect $filenames dselect
+
+# Java completion
+#
+
+# available path elements completion
+have java && {
+_java_path()
+{
+ cur=${cur##*:}
+ _filedir '@(jar|zip)'
+}
+
+# exact classpath determination
+_java_find_classpath()
+{
+ local i
+
+ # search first in current options
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == -@(cp|classpath) ]]; then
+ classpath=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+
+ # default to environment
+ [ -z "$classpath" ] && classpath=$CLASSPATH
+
+ # default to current directory
+ [ -z "$classpath" ] && classpath=.
+}
+
+# exact sourcepath determination
+_java_find_sourcepath()
+{
+ local i
+
+ # search first in current options
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == -sourcepath ]]; then
+ sourcepath=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+
+ # default to classpath
+ [ -z "$sourcepath" ] && _java_find_classpath
+ sourcepath=$classpath
+}
+
+# available classes completion
+_java_classes()
+{
+ local classpath i
+
+ # find which classpath to use
+ _java_find_classpath
+
+ # convert package syntax to path syntax
+ cur=${cur//.//}
+ # parse each classpath element for classes
+ for i in ${classpath//:/ }; do
+ if [ -r $i ] && [[ "$i" == *.@(jar|zip) ]]; then
+ if type zipinfo &> /dev/null; then
+ COMPREPLY=( "${COMPREPLY[@]}" $( zipinfo -1 \
+ "$i" | grep "^$cur" | grep '\.class$' | \
+ grep -v "\\$" ) )
+ else
+ COMPREPLY=( "${COMPREPLY[@]}" $( jar tf "$i" \
+ "$cur" | grep "\.class$" | grep -v "\\$" ) )
+ fi
+
+ elif [ -d $i ]; then
+ i=${i%/}
+ COMPREPLY=( "${COMPREPLY[@]}" $( find "$i" -type f \
+ -path "$i/$cur*.class" 2>/dev/null | \
+ grep -v "\\$" | sed -e "s|^$i/||" ) )
+ fi
+ done
+
+ # remove class extension
+ COMPREPLY=( ${COMPREPLY[@]%.class} )
+ # convert path syntax to package syntax
+ COMPREPLY=( ${COMPREPLY[@]//\//.} )
+}
+
+# available packages completion
+_java_packages()
+{
+ local sourcepath i
+
+ # find wich sourcepath to use
+ _java_find_sourcepath
+
+ # convert package syntax to path syntax
+ cur=${cur//.//}
+ # parse each sourcepath element for packages
+ for i in ${sourcepath//:/ }; do
+ if [ -d $i ]; then
+ COMPREPLY=( "${COMPREPLY[@]}" $( command ls -F -d \
+ $i/$cur* 2>/dev/null | sed -e 's|^'$i'/||' ) )
+ fi
+ done
+ # keep only packages
+ COMPREPLY=( $( echo "${COMPREPLY[@]}" | tr " " "\n" | grep "/$" ) )
+ # remove packages extension
+ COMPREPLY=( ${COMPREPLY[@]%/} )
+ # convert path syntax to package syntax
+ cur=${COMPREPLY[@]//\//.}
+}
+
+# java completion
+#
+_java()
+{
+ local cur prev i
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ for ((i=1; i < $COMP_CWORD; i++)); do
+ case ${COMP_WORDS[$i]} in
+ -cp|-classpath)
+ ((i++)) # skip the classpath string.
+ ;;
+ -*)
+ # this is an option, not a class/jarfile name.
+ ;;
+ *)
+ # once we've seen a class, just do filename completion
+ _filedir
+ return 0
+ ;;
+ esac
+ done
+
+ case $prev in
+ -@(cp|classpath))
+ _java_path
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ # relevant options completion
+ COMPREPLY=( $( compgen -W '-client -hotspot -server -classic \
+ -cp -classpath -D -verbose -verbose:class \
+ -verbose:gc -version:jni -version \
+ -showversion -? -help -X -jar \
+ -ea -enableassertions -da -disableassertions \
+ -esa -enablesystemassertions \
+ -dsa -disablesystemassertions ' -- $cur ) )
+ else
+ if [[ "$prev" == -jar ]]; then
+ # jar file completion
+ _filedir jar
+ else
+ # classes completion
+ _java_classes
+ fi
+ fi
+}
+complete -F _java $filenames java
+}
+
+# javadoc completion
+#
+have javadoc &&
+_javadoc()
+{
+ COMPREPLY=()
+ local cur prev
+
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ -@(overview|helpfile|stylesheetfile))
+ _filedir
+ return 0
+ ;;
+ -d)
+ _filedir -d
+ return 0
+ ;;
+ -@(classpath|bootclasspath|docletpath|sourcepath|extdirs))
+ _java_path
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ # relevant options completion
+ COMPREPLY=( $( compgen -W '-overview -public -protected \
+ -package -private -help -doclet -docletpath \
+ -sourcepath -classpath -exclude -subpackages \
+ -breakiterator -bootclasspath -source -extdirs \
+ -verbose -locale -encoding -J -d -use -version \
+ -author -docfilessubdirs -splitindex \
+ -windowtitle -doctitle -header -footer -bottom \
+ -link -linkoffline -excludedocfilessubdir \
+ -group -nocomment -nodeprecated -noqualifier \
+ -nosince -nodeprecatedlist -notree -noindex \
+ -nohelp -nonavbar -quiet -serialwarn -tag \
+ -taglet -tagletpath -charset -helpfile \
+ -linksource -stylesheetfile -docencoding' -- \
+ $cur ) )
+ else
+ # source files completion
+ _filedir java
+ # packages completion
+ _java_packages
+ fi
+} &&
+complete -F _javadoc $filenames javadoc
+
+# javac completion
+#
+have javac &&
+_javac()
+{
+ COMPREPLY=()
+ local cur prev
+
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ -d)
+ _filedir -d
+ return 0
+ ;;
+ -@(classpath|bootclasspath|sourcepath|extdirs))
+ _java_path
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ # relevant options completion
+ COMPREPLY=( $( compgen -W '-g -g:none -g:lines -g:vars\
+ -g:source -O -nowarn -verbose -deprecation -classpath\
+ -sourcepath -bootclasspath -extdirs -d -encoding -source\
+ -target -help' -- $cur ) )
+ else
+ # source files completion
+ _filedir java
+ fi
+} &&
+complete -F _javac $filenames javac
+
+# PINE address-book completion
+#
+have pine &&
+_pineaddr()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ COMPREPLY=( $( compgen -W '$( awk "{print \$1}" ~/.addressbook 2>/dev/null)' \
+ -- $cur ) )
+} &&
+complete -F _pineaddr $default pine
+
+# mutt completion
+#
+# Mutt doesn't have an "addressbook" like Pine, but it has aliases and
+# a "query" function to retrieve addresses, so that's what we use here.
+have mutt || have muttng && {
+_muttaddr()
+{
+ _muttaliases
+ _muttquery
+ return 0
+}
+
+_muttconffiles()
+{
+ local file sofar
+ local -a newconffiles
+
+ sofar=" $1 "
+ shift
+ while [[ "$1" ]]; do
+ newconffiles=( $(sed -rn 's|^source[[:space:]]+([^[:space:]]+).*$|\1|p' $(eval echo $1) ) )
+ for file in "${newconffiles[@]}"; do
+ [[ ! "$file" ]] || [[ "${sofar/ ${file} / }" != "$sofar" ]] &&
+ continue
+ sofar="$sofar $file"
+ sofar=" $(eval _muttconffiles \"$sofar\" $file) "
+ done
+ shift
+ done
+ echo $sofar
+}
+
+_muttaliases()
+{
+ local cur muttrc
+ local -a conffiles aliases
+ cur=`_get_cword`
+
+ [ -f ~/.${muttcmd}/${muttcmd}rc ] && muttrc="~/.${muttcmd}/${muttcmd}rc"
+ [ -f ~/.${muttcmd}rc ] && muttrc="~/.${muttcmd}rc"
+ [ -z "$muttrc" ] && return 0
+
+ conffiles=( $(eval _muttconffiles $muttrc $muttrc) )
+ aliases=( $( sed -rn 's|^alias[[:space:]]+([^[:space:]]+).*$|\1|p' \
+ $(eval echo "${conffiles[@]}") ) )
+ COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "${aliases[*]}" -- $cur ) )
+
+ return 0
+}
+
+_muttquery()
+{
+ local cur querycmd
+ local -a queryresults
+ cur=`_get_cword`
+
+ querycmd="$( $muttcmd -Q query_command | sed -r 's|^query_command=\"(.*)\"$|\1|; s|%s|'$cur'|' )"
+ if [ -z "$cur" -o -z "$querycmd" ]; then
+ queryresults=()
+ else
+ queryresults=( $( $querycmd | \
+ sed -nr '2,$s|^([^[:space:]]+).*|\1|p' ) )
+ fi
+
+ COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "${queryresults[*]}" \
+ -- $cur ) )
+
+ return 0
+}
+
+_muttfiledir()
+{
+ local cur folder spoolfile
+ cur=`_get_cword`
+
+ # This is currently not working so well. Perhaps this function should
+ # just call _filedir() for the moment.
+ if [[ $cur == [=+]* ]]; then
+ folder="$( $muttcmd -Q folder | sed -r 's|^folder=\"(.*)\"$|\1|' )"
+ : folder:=~/Mail
+
+ # Match any file in $folder beginning with $cur
+ # (minus the leading '=' sign).
+ COMPREPLY=( $( compgen -f -- "$folder/${cur:1}" ) )
+ COMPREPLY=( ${COMPREPLY[@]#$folder/} )
+ return 0
+ elif [ "$cur" == !* ]; then
+ spoolfile="$( $muttcmd -Q spoolfile | sed -r 's|^spoolfile=\"(.*)\"$|\1|' )"
+ [ ! -z "$spoolfile" ] && eval cur="${cur/^!/$spoolfile}";
+ fi
+ _filedir
+
+ return 0
+}
+
+_mutt()
+{
+ local cur prev
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ COMPREPLY=()
+
+ [ ${COMP_WORDS[0]} == muttng ] && muttcmd="muttng" || muttcmd="mutt"
+
+ case "$cur" in
+ -*)
+ COMPREPLY=( $( compgen -W '-A -a -b -c -e -f -F -H -i -m -n \
+ -p -Q -R -s -v -x -y -z -Z -h' \
+ -- $cur ) )
+ return 0
+ ;;
+ *)
+ case "$prev" in
+ -@(a|f|F|H|i))
+ _muttfiledir
+ return 0
+ ;;
+ -A)
+ _muttaliases
+ return 0
+ ;;
+ -@(e|m|Q|s|h|p|R|v|y|z|Z))
+ return 0
+ ;;
+ *)
+ _muttaddr
+ return 0
+ ;;
+ esac
+ ;;
+ esac
+
+}
+complete -F _mutt $default $filenames mutt muttng
+}
+
+_configure_func()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ # if $COMP_CONFIGURE_HINTS is not null, then completions of the form
+ # --option=SETTING will include 'SETTING' as a contextual hint
+ [[ "$cur" != -* ]] && return 0
+
+ if [ -n "$COMP_CONFIGURE_HINTS" ]; then
+ COMPREPLY=( $( $1 --help | awk '/^ --[A-Za-z]/ { print $1; if ($2 ~ /--[A-Za-z]/) print $2 }' | sed -e 's/[[,].*//g' | grep ^$cur ) )
+
+ else
+ COMPREPLY=( $( $1 --help | awk '/^ --[A-Za-z]/ { print $1; if ($2 ~ /--[A-Za-z]/) print $2 }' | sed -e 's/[[,=].*//g' | grep ^$cur ) )
+ fi
+}
+complete -F _configure_func $default configure
+
+# Debian reportbug(1) completion
+#
+have reportbug &&
+_reportbug()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -f|--filename|-i|--include|--mta|-o|--output)
+ _filedir
+ return 0
+ ;;
+ -B|--bts)
+ COMPREPLY=( $( compgen -W "debian guug kde mandrake help" -- \
+ $cur ))
+ return 0
+ ;;
+ -e|--editor|--mua)
+ COMP_WORDS=(COMP_WORDS[0] $cur)
+ COMP_CWORD=1
+ _command
+ return 0
+ ;;
+ --mode)
+ COMPREPLY=( $( compgen -W "novice standard expert" -- $cur ) )
+ return 0
+ ;;
+ -S|--severity)
+ COMPREPLY=( $( compgen -W "grave serious important normal \
+ minor wishlist" -- $cur ) )
+ return 0
+ ;;
+ -u|--ui|--interface)
+ COMPREPLY=( $( compgen -W "newt text gnome" -- $cur ) )
+ return 0
+ ;;
+ -t|--type)
+ COMPREPLY=( $( compgen -W "gnats debbugs" -- $cur ) )
+ return 0
+ ;;
+ -T|--tags)
+ COMPREPLY=( $( compgen -W "none patch security upstream sid \
+ woody potato sarge fixed" -- $cur ))
+ return 0
+ ;;
+ *)
+ ;;
+ esac
+
+ COMPREPLY=($( compgen -W '-h --help -v --version -a --af -b \
+ --no-query-bts --query-bts -B --bts -c --configure \
+ --no-config-files --check-available -d --debug \
+ --no-check-available -e --editor --email -f \
+ --filename -g --gnupg -H --header -i --include -j \
+ --justification -l --ldap --no-ldap -L --list-cc -m \
+ --maintonly --mode --mua --mta --mutt -n --mh --nmh \
+ -o --output -p --print -P --pgp --proxy --http_proxy\
+ -q --quiet -Q --query-only --realname --report-quiet \
+ --reply-to --replyto -s --subject -S --severity \
+ --smtphost -t --type -T --tags --template -V -x \
+ --no-cc --package-version -z --no-compress \
+ --ui --interface -u \
+ wnpp boot-floppies kernel-image' -- $cur ) \
+ $( apt-cache pkgnames -- $cur 2> /dev/null ) )
+ _filedir
+ return 0
+} &&
+complete -F _reportbug $filenames reportbug
+
+# Debian querybts(1) completion
+#
+have querybts &&
+_querybts()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -B|--bts)
+ COMPREPLY=( $( compgen -W "debian guug kde mandrake help" -- \
+ $cur ))
+ return 0
+ ;;
+ -u|--ui|--interface)
+ COMPREPLY=($( compgen -W "newt text gnome" -- $cur ))
+ return 0
+ ;;
+ *)
+ ;;
+ esac
+
+ COMPREPLY=($( compgen -W '-h --help -v --version -A --archive \
+ -B --bts -l --ldap --no-ldap --proxy= --http_proxy= \
+ -s --source -w --web -u --ui --interface \
+ wnpp boot-floppies' -- $cur ) \
+ $( apt-cache pkgnames -- $cur 2> /dev/null ) )
+} &&
+complete -F _querybts $filenames querybts
+
+# update-alternatives completion
+#
+have update-alternatives && {
+installed_alternatives()
+{
+ local admindir
+ # find the admin dir
+ for i in alternatives dpkg/alternatives rpm/alternatives; do
+ [ -d /var/lib/$i ] && admindir=/var/lib/$i && break
+ done
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == --admindir ]]; then
+ admindir=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+ COMPREPLY=( $( command ls $admindir | grep "^$cur" ) )
+}
+
+_update_alternatives()
+{
+ local cur prev mode args i
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ --@(altdir|admindir))
+ _filedir -d
+ return 0
+ ;;
+ --@(help|version))
+ return 0
+ ;;
+ esac
+
+ # find wich mode to use and how many real args used so far
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == --@(install|remove|auto|display|config|remove-all) ]]; then
+ mode=${COMP_WORDS[i]}
+ args=$(($COMP_CWORD - i))
+ break
+ fi
+ done
+
+ case $mode in
+ --install)
+ case $args in
+ 1)
+ _filedir
+ ;;
+ 2)
+ installed_alternatives
+ ;;
+ 3)
+ _filedir
+ ;;
+ esac
+ ;;
+ --remove)
+ case $args in
+ 1)
+ installed_alternatives
+ ;;
+ 2)
+ _filedir
+ ;;
+ esac
+ ;;
+ --auto)
+ installed_alternatives
+ ;;
+ --remove-all)
+ installed_alternatives
+ ;;
+ --display)
+ installed_alternatives
+ ;;
+ --config)
+ installed_alternatives
+ ;;
+ *)
+ COMPREPLY=( $( compgen -W '--verbose --quiet --help --version \
+ --altdir --admindir' -- $cur ) \
+ $( compgen -W '--install --remove --auto --display \
+ --config' -- $cur ) )
+ esac
+}
+complete -F _update_alternatives update-alternatives
+}
+
+# Python completion
+#
+have python &&
+_python()
+{
+ local prev cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]##*/}
+
+ case "$prev" in
+ -Q)
+ COMPREPLY=( $( compgen -W "old new warn warnall" -- $cur ) )
+ return 0
+ ;;
+ -W)
+ COMPREPLY=( $( compgen -W "ignore default all module once error" -- $cur ) )
+ return 0
+ ;;
+ -c)
+ _filedir '@(py|pyc|pyo)'
+ return 0
+ ;;
+ !(python|-?))
+ [[ ${COMP_WORDS[COMP_CWORD-2]} != -@(Q|W) ]] && _filedir
+ ;;
+ esac
+
+
+ # if '-c' is already given, complete all kind of files.
+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
+ if [[ ${COMP_WORDS[i]} == -c ]]; then
+ _filedir
+ fi
+ done
+
+
+ if [[ "$cur" != -* ]]; then
+ _filedir '@(py|pyc|pyo)'
+ else
+ COMPREPLY=( $( compgen -W "- -d -E -h -i -O -Q -S -t -u \
+ -U -v -V -W -x -c" -- $cur ) )
+ fi
+
+
+
+ return 0
+} &&
+complete -F _python $filenames python
+
+# Perl completion
+#
+have perl &&
+{
+_perlmodules()
+{
+ COMPREPLY=( $( compgen -P "$prefix" -W "$( perl -e 'sub mods { my ($base,$dir)=@_; return if $base !~ /^\Q$ENV{cur}/; chdir($dir) or return; for (glob(q[*.pm])) {s/\.pm$//; print qq[$base$_\n]}; mods(/^(?:[.\d]+|$Config{archname}-$Config{osname}|auto)$/ ? undef : qq[${base}${_}\\\\:\\\\:],qq[$dir/$_]) for grep {-d} glob(q[*]); } mods(undef,$_) for @INC;' )" -- $cur ) )
+}
+
+_perl()
+{
+ local cur prev prefix temp
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ prefix=""
+
+ # completing an option (may or may not be separated by a space)
+ if [[ "$cur" == -?* ]]; then
+ temp=$cur
+ prev=${temp:0:2}
+ cur=${temp:2}
+ prefix=$prev
+ fi
+
+ # only handle module completion for now
+ case "$prev" in
+ -I|-x)
+ COMPREPLY=( $( compgen -d -P "$prev" -- "$cur" ) )
+ return 0
+ ;;
+ -m|-M)
+ _perlmodules
+ return 0
+ ;;
+ esac
+
+ # handle case where first parameter is not a dash option
+ if [[ "${COMP_WORDS[COMP_CWORD]}" != -* ]]; then
+ _filedir
+ return 0
+ fi
+
+ # complete using basic options
+ COMPREPLY=( $( compgen -W '-C -s -T -u -U -W -X -h -v -V -c -w -d -D -p \
+ -n -a -F -l -0 -I -m -M -P -S -x -i -e ' -- $cur ) )
+ return 0
+}
+complete -F _perl $filenames perl
+
+_perldoc()
+{
+ local cur prev prefix temp
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ prefix=""
+
+ # completing an option (may or may not be separated by a space)
+ if [[ "$cur" == -?* ]]; then
+ temp=$cur
+ prev=${temp:0:2}
+ cur=${temp:2}
+ prefix=$prev
+ fi
+
+ # complete builtin perl functions
+ case $prev in
+ -f)
+ COMPREPLY=( $( compgen -W 'chomp chop chr crypt hex index lc \
+ lcfirst length oct ord pack q qq reverse rindex sprintf \
+ substr tr uc ucfirst y m pos quotemeta s split study qr abs \
+ atan2 cos exp hex int log oct rand sin sqrt srand pop push \
+ shift splice unshift grep join map qw reverse sort unpack \
+ delete each exists keys values binmode close closedir \
+ dbmclose dbmopen die eof fileno flock format getc print \
+ printf read readdir rewinddir seek seekdir select syscall \
+ sysread sysseek syswrite tell telldir truncate warn write \
+ pack read syscall sysread syswrite unpack vec -X chdir chmod \
+ chown chroot fcntl glob ioctl link lstat mkdir open opendir \
+ readlink rename rmdir stat symlink umask unlink utime caller \
+ continue do dump eval exit goto last next redo return \
+ sub wantarray caller import local my our package use defined \
+ formline reset scalar undef \
+ alarm exec fork getpgrp getppid getpriority kill pipe qx \
+ setpgrp setpriority sleep system times wait waitpid \
+ import no package require use bless dbmclose dbmopen package \
+ ref tie tied untie use accept bind connect getpeername \
+ getsockname getsockopt listen recv send setsockopt shutdown \
+ socket socketpair msgctl msgget msgrcv msgsnd semctl semget \
+ semop shmctl shmget shmread shmwrite endgrent endhostent \
+ endnetent endpwent getgrent getgrgid getgrnam getlogin \
+ getpwent getpwnam getpwuid setgrent setpwent endprotoent \
+ endservent gethostbyaddr gethostbyname gethostent \
+ getnetbyaddr getnetbyname getnetent getprotobyname \
+ getprotobynumber getprotoent getservbyname getservbyport \
+ getservent sethostent setnetent setprotoent setservent \
+ gmtime localtime time times' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ case $cur in
+ -*)
+ COMPREPLY=( $( compgen -W '-h -v -t -u -m -l -F -X -f -q' -- $cur ))
+ return 0
+ ;;
+ */*)
+ return 0
+ ;;
+ *)
+ _perlmodules
+ COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W '$( PAGER=cat man perl 2>/dev/null | sed -ne "/perl.*Perl overview/,/perlwin32/s/^[^a-z0-9]*\([a-z0-9]*\).*$/\1/p")' -- $cur ) )
+
+ return 0
+ ;;
+ esac
+}
+complete -F _perldoc $default perldoc
+}
+
+# rcs(1) completion
+#
+have rcs &&
+_rcs()
+{
+ local cur prev file dir i
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ file=${cur##*/}
+ dir=${cur%/*}
+
+ # deal with relative directory
+ [ "$file" = "$dir" ] && dir=.
+
+ COMPREPLY=( $( compgen -f "$dir/RCS/$file" ) )
+
+ for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do
+ file=${COMPREPLY[$i]##*/}
+ dir=${COMPREPLY[$i]%RCS/*}
+ COMPREPLY[$i]=$dir$file
+ done
+
+ COMPREPLY=( "${COMPREPLY[@]}" $( compgen -G "$dir/$file*,v" ) )
+
+ for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do
+ COMPREPLY[$i]=${COMPREPLY[$i]%,v}
+ done
+
+ # default to files if nothing returned and we're checking in.
+ # otherwise, default to directories
+ [ ${#COMPREPLY[@]} -eq 0 -a $1 = ci ] && _filedir || _filedir -d
+} &&
+complete -F _rcs $filenames ci co rlog rcs rcsdiff
+
+# lilo(8) completion
+#
+have lilo && {
+_lilo_labels()
+{
+ COMPREPLY=( $( awk -F'=' '/label/ {print $2}' \
+ /etc/lilo.conf | sed -e 's/"//g' | grep "^$cur" ) )
+}
+
+_lilo()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ -@(C|i|m|s|S))
+ _filedir
+ return 0
+ ;;
+ -r)
+ _filedir -d
+ return 0
+ ;;
+ -@(I|D|R))
+ # label completion
+ _lilo_labels
+ return 0
+ ;;
+ -@(A|b|M|u|U))
+ # device completion
+ cur=${cur:=/dev/}
+ _filedir
+ return 0
+ ;;
+ -T)
+ # topic completion
+ COMPREPLY=( $( compgen -W 'help ChRul EBDA geom geom= \
+ table= video' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ # relevant options completion
+ COMPREPLY=( $( compgen -W '-A -b -c -C -d -f -g -i -I -l -L -m \
+ -M -p -P -q -r -R -s -S -t -T -u -U -v -V -w -x -z' -- \
+ $cur ) )
+ fi
+}
+complete -F _lilo lilo
+}
+
+# links completion
+#
+have links &&
+_links()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ case "$cur" in
+ --*)
+ COMPREPLY=( $( compgen -W '--help' -- $cur ) )
+ ;;
+ -*)
+ COMPREPLY=( $( compgen -W '-async-dns -max-connections \
+ -max-connections-to-host -retries \
+ -receive-timeout -unrestartable-receive-timeout\
+ -format-cache-size -memory-cache-size \
+ -http-proxy -ftp-proxy -download-dir \
+ -assume-codepage -anonymous -dump -no-connect \
+ -source -version -help' -- $cur ) )
+ ;;
+ *)
+ if [ -r ~/.links/links.his ]; then
+ COMPREPLY=( $( compgen -W '$( < ~/.links/links.his )' \
+ -- $cur ) )
+ fi
+ _filedir '@(htm|html)'
+ return 0
+ ;;
+ esac
+
+ return 0
+} &&
+complete -F _links $filenames links
+
+[ $UNAME = FreeBSD ] && {
+# FreeBSD package management tool completion
+#
+_pkg_delete()
+{
+ local cur pkgdir prev
+
+ pkgdir=${PKG_DBDIR:-/var/db/pkg}/
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ [ "$prev" = "-o" -o "$prev" = "-p" -o "$prev" = "-W" ] && return 0
+
+ COMPREPLY=( $( compgen -d $pkgdir$cur ) )
+ COMPREPLY=( ${COMPREPLY[@]#$pkgdir} )
+
+ return 0
+}
+complete -F _pkg_delete $dirnames pkg_delete pkg_info
+have pkg_deinstall && complete -F _pkg_delete $dirnames pkg_deinstall
+
+# FreeBSD kernel module commands
+#
+_kldload()
+{
+ local cur moddir
+
+ moddir=/modules/
+ [ -d $moddir ] || moddir=/boot/kernel/
+ cur=`_get_cword`
+
+ COMPREPLY=( $( compgen -f $moddir$cur ) )
+ COMPREPLY=( ${COMPREPLY[@]#$moddir} )
+ COMPREPLY=( ${COMPREPLY[@]%.ko} )
+
+ return 0
+}
+complete -F _kldload $filenames kldload
+
+_kldunload()
+{
+ local cur
+ cur=`_get_cword`
+ COMPREPLY=( $(kldstat | sed -ne "s/^.*[ \t]\+\($cur[a-z_]\+\).ko$/\1/p") )
+}
+complete -F _kldunload $filenames kldunload
+}
+
+# FreeBSD portupgrade completion
+#
+have portupgrade &&
+_portupgrade()
+{
+ local cur pkgdir prev
+
+ pkgdir=${PKG_DBDIR:-/var/db/pkg}/
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ [ "$prev" = "-l" -o "$prev" = "-L" -o "$prev" = "-o" ] && return 0
+
+ COMPREPLY=( $( compgen -d $pkgdir$cur ) )
+ COMPREPLY=( ${COMPREPLY[@]#$pkgdir} )
+ COMPREPLY=( ${COMPREPLY[@]%-*} )
+
+ return 0
+} &&
+complete -F _portupgrade $dirnames portupgrade
+
+# FreeBSD portinstall completion
+#
+have portinstall &&
+_portinstall()
+{
+ local cur portsdir prev indexfile
+ local -a COMPREPLY2
+
+ portsdir=${PORTSDIR:-/usr/ports}/
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ # First try INDEX-5
+ indexfile=$portsdir/INDEX-5
+ # Then INDEX if INDEX-5 does not exist or system is not FreeBSD 5.x
+ [ "${OSTYPE%.*}" = "freebsd5" -a -f $indexfile ] ||
+ indexfile=$portsdir/INDEX
+
+ [ "$prev" = "-l" -o "$prev" = "-L" -o "$prev" = "-o" ] && return 0
+
+ COMPREPLY=( $( egrep "^$cur" < $indexfile | cut -d'|' -f1 ) )
+ COMPREPLY2=( $( egrep "^[^\|]+\|$portsdir$cur" < $indexfile | \
+ cut -d'|' -f2 ) )
+ COMPREPLY2=( ${COMPREPLY2[@]#$portsdir} )
+ COMPREPLY=( "${COMPREPLY[@]}" "${COMPREPLY2[@]}" )
+
+ return 0
+} &&
+complete -F _portinstall $dirnames portinstall
+
+# Slackware Linux removepkg completion
+#
+have removepkg && [ -f /etc/slackware-version ] &&
+_removepkg()
+{
+ local packages cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ COMPREPLY=( $( (cd /var/log/packages; compgen -f -- "$cur") ) )
+} &&
+complete -F _removepkg $filenames removepkg &&
+ complete $dirnames -f -X '!*.tgz' installpkg upgradepkg explodepkg
+
+# look(1) completion
+#
+have look &&
+_look()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [ $COMP_CWORD = 1 ]; then
+ COMPREPLY=( $( compgen -W '$(look $cur)' ) )
+ fi
+} &&
+complete -F _look $default look
+
+# ypcat(1) and ypmatch(1) completion
+#
+have ypmatch &&
+_ypmatch()
+{
+ local cur map
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ [ $1 = ypcat ] && [ $COMP_CWORD -gt 1 ] && return 0
+ [ $1 = ypmatch ] && [ $COMP_CWORD -gt 2 ] && return 0
+
+ if [ $1 = ypmatch ] && [ $COMP_CWORD -eq 1 ] && \
+ [ ${#COMP_WORDS[@]} -eq 3 ]; then
+ map=${COMP_WORDS[2]}
+ COMPREPLY=( $( compgen -W '$( ypcat $map | \
+ cut -d':' -f 1 )' -- $cur) )
+ else
+ [ $1 = ypmatch ] && [ $COMP_CWORD -ne 2 ] && return 0
+ COMPREPLY=( $( compgen -W \
+ '$( echo $(ypcat -x | cut -d"\"" -f 2))' -- $cur))
+ fi
+
+ return 0
+} &&
+complete -F _ypmatch ypmatch ypcat
+
+# mplayer(1) completion
+#
+have mplayer && {
+_mplayer_options_list()
+{
+ cur=${cur%\\}
+ COMPREPLY=( $( $1 $2 help 2> /dev/null | \
+ sed -e '1,/^Available/d' | awk '{print $1}' | \
+ sed -e 's/:$//' -e 's/^'${2#-}'$//' -e 's/<.*//' | \
+ grep "^$cur" ) )
+}
+
+_mplayer()
+{
+ local cmd cur prev skinsdir IFS=$' \t\n' i j k=0
+
+ COMPREPLY=()
+ cmd=${COMP_WORDS[0]}
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(ac|afm|vc|vfm|ao|vo|vop|fstype))
+ _mplayer_options_list mplayer $prev
+ return 0
+ ;;
+ -@(oac|ovc|of))
+ _mplayer_options_list mencoder $prev
+ return 0
+ ;;
+ -audiofile)
+ _filedir '@(mp3|MP3|mpg|MPG|ogg|OGG|wav|WAV|mid|MID|flac|FLAC|mka|MKA)'
+ return 0
+ ;;
+ -font)
+ _filedir '@(desc|ttf)'
+ return 0
+ ;;
+ -sub)
+ _filedir '@(srt|SRT|sub|SUB|txt|TXT|utf|UTF|rar|RAR|mpsub|smi|js|ssa|SSA|aas|AAS)'
+ return 0
+ ;;
+ -vobsub)
+ _filedir '@(idx|IDX|ifo|IFO|sub|SUB)'
+ IFS=$'\t\n'
+ COMPREPLY=( $( for i in "${COMPREPLY[@]}"; do
+ if [ -f $i -a -r $i ]; then
+ echo ${i%.*}
+ else
+ echo $i
+ fi
+ done ) )
+ IFS=$' \t\n'
+ return 0
+ ;;
+ -ifo)
+ _filedir '@(ifo|IFO)'
+ return 0
+ ;;
+ -cuefile)
+ _filedir '@(bin|BIN|cue|CUE)'
+ return 0
+ ;;
+ -skin)
+ # if you don't have installed mplayer in /usr/local you
+ # may want to set the MPLAYER_SKINS_DIR global variable
+ if [ -n "$MPLAYER_SKINS_DIR" ]; then
+ skinsdir=$MPLAYER_SKINS_DIR
+ else
+ skinsdir=/usr/local/share/mplayer/Skin
+ fi
+
+ IFS=$'\t\n'
+ for i in ~/.mplayer/Skin $skinsdir; do
+ if [ -d $i -a -r $i ]; then
+ for j in $( compgen -d $i/$cur ); do
+ COMPREPLY[$k]=${j#$i/}
+ k=$((++k))
+ done
+ fi
+ done
+ IFS=$' \t\n'
+ return 0
+ ;;
+ -@(mixer|@(cdrom|dvd)-device|dvdauth|fb|zrdev))
+ cur=${cur:=/dev/}
+ _filedir
+ return 0
+ ;;
+ -@(edl?(out)|lircconf|menu-cfg|playlist|csslib|dumpfile)| \
+ -@(subfile|vobsub|aofile|fbmodeconfig|include|o|dvdkey)| \
+ -passlogfile)
+ _filedir
+ return 0
+ ;;
+ -@(auto@(q|sync)|loop|menu-root|speed|sstep|aid|alang)| \
+ -@(?(@(audio|sub)-)demuxer|bandwidth|cache|chapter)| \
+ -@(dvd?(angle)|fps|frames|mc|passwd|user|sb|srate|ss|vcd)| \
+ -@(vi?(d|vo)|ffactor|sid|slang|spu@(align|aa|gauss))| \
+ -@(vobsubid|delay|bpp|brightness|contrast|dfbopts|display)| \
+ -@(fbmode|geometry|guiwid|hue|icelayer|screen[wh]|wid)| \
+ -@(monitor@(aspect|-@(dotclock|[hv]freq))|panscan|saturation)| \
+ -@(xineramascreen|zr@(crop|norm|quality|[xy]doff|[vh]dec))| \
+ -@(aspect|pp|x|y|xy|z|stereo|audio-@(density|delay|preload))| \
+ -@(endpos|osdlevel|ffourcc|sws|channels|skiplimit|format)| \
+ -@(ofps|aa@(driver|@(osd|sub)color)|vobsubout?(i@(ndex|d)))| \
+ -sub@(-bg-@(alpha|color)|cp|delay|fps|pos|align|width)| \
+ -sub@(font-@(blur|outline|autoscale|encoding|@(osd|text)-scale)))
+ return 0
+ ;;
+ -lavdopts)
+ COMPREPLY=( $( compgen -W 'ec er= bug= idct= gray' \
+ -- $cur ) )
+ return 0
+ ;;
+ -lavcopts)
+ COMPREPLY=( $( compgen -W 'vcodec= vqmin= vqscale= \
+ vqmax= mbqmin= mbqmax= vqdiff= \
+ vmax_b_frames= vme= vhq v4mv \
+ keyint= vb_strategy= vpass= \
+ aspect= vbitrate= vratetol= \
+ vrc_maxrate= vrc_minrate= \
+ vrc_buf_size= vb_qfactor= vi_qfactor= \
+ vb_qoffset= vi_qoffset= vqblur= \
+ vqcomp= vrc_eq= vrc_override= \
+ vrc_init_cplx= vqsquish= vlelim= \
+ vcelim= vstrict= vdpart vpsize= gray \
+ vfdct= idct= lumi_mask= dark_mask= \
+ tcplx_mask= scplx_mask= naq ildct \
+ format= pred qpel precmp= cmp= \
+ subcmp= predia= dia= trell last_pred= \
+ preme= subq= psnr mpeg_quant aic umv' \
+ -- $cur ) )
+ return 0
+ ;;
+ -ssf)
+ COMPREPLY=( $( compgen -W 'lgb= cgb= ls= cs= chs= \
+ cvs=' -- $cur ) )
+ return 0
+ ;;
+ -jpeg)
+ COMPREPLY=( $( compgen -W 'noprogressive progressive \
+ nobaseline baseline optimize= \
+ smooth= quality= outdir=' -- $cur ) )
+ return 0
+ ;;
+ -xvidopts)
+ COMPREPLY=( $( compgen -W 'dr2 nodr2' -- $cur ) )
+ return 0
+ ;;
+ -xvidencopts)
+ COMPREPLY=( $( compgen -W 'pass= bitrate= \
+ fixed_quant= me_quality= 4mv \
+ rc_reaction_delay_factor= \
+ rc_averaging_period= rc_buffer= \
+ quant_range= min_key_interval= \
+ max_key_interval= mpeg_quant \
+ mod_quant lumi_mask hintedme \
+ hintfile debug keyframe_boost= \
+ kfthreshold= kfreduction=' -- $cur ) )
+ return 0
+ ;;
+ -divx4opts)
+ COMPREPLY=( $( compgen -W 'br= key= deinterlace q= \
+ min_quant= max_quant= rc_period= \
+ rc_reaction_period= crispness= \
+ rc_reaction_ratio= pass= vbrpass= \
+ help' -- $cur ) )
+ return 0
+ ;;
+ -info)
+ COMPREPLY=( $( compgen -W 'name= artist= genre= \
+ subject= copyright= srcform= \
+ comment= help' -- $cur ) )
+ return 0
+ ;;
+ -lameopts)
+ COMPREPLY=( $( compgen -W 'vbr= abr cbr br= q= aq= \
+ ratio= vol= mode= padding= fast \
+ preset= help' -- $cur ) )
+ return 0
+ ;;
+ -rawaudio)
+ COMPREPLY=( $( compgen -W 'on channels= rate= \
+ samplesize= format=' -- $cur ) )
+ return 0
+ ;;
+ -rawvideo)
+ COMPREPLY=( $( compgen -W 'on fps= sqcif qcif cif \
+ 4cif pal ntsc w= h= y420 yv12 yuy2 \
+ y8 format= size=' -- $cur ) )
+ return 0
+ ;;
+ -aop)
+ COMPREPLY=( $( compgen -W 'list= delay= format= fout= \
+ volume= mul= softclip' -- $cur ) )
+ return 0
+ ;;
+ -dxr2)
+ COMPREPLY=( $( compgen -W 'ar-mode= iec958-encoded \
+ iec958-decoded mute ucode= 75ire bw \
+ color interlaced macrovision= norm= \
+ square-pixel ccir601-pixel cr-left= \
+ cr-right= cr-top= cr-bot= ck-rmin= \
+ ck-gmin= ck-bmin= ck-rmax= ck-gmax= \
+ ck-bmax= ck-r= ck-g= ck-b= \
+ ignore-cache= ol-osd= olh-cor= \
+ olw-cor= olx-cor= oly-cor= overlay \
+ overlay-ratio= update-cache' -- $cur ))
+ return 0
+ ;;
+ -tv)
+ COMPREPLY=( $( compgen -W 'on noaudio driver= device= \
+ input= freq= outfmt= width= height= \
+ buffersize= norm= channel= chanlist= \
+ audiorate= forceaudio alsa amode= \
+ forcechan= adevice= audioid= volume= \
+ bass= treble= balance= fps= \
+ channels= immediatemode=' -- $cur ) )
+ return 0
+ ;;
+ -mf)
+ COMPREPLY=( $( compgen -W 'on w= h= fps= type=' \
+ -- $cur ) )
+ return 0
+ ;;
+ -cdda)
+ COMPREPLY=( $( compgen -W 'speed= paranoia= \
+ generic-dev= sector-size= overlap= \
+ toc-bias toc-offset= skip noskip' \
+ -- $cur ) )
+ return 0
+ ;;
+ -input)
+ COMPREPLY=( $( compgen -W 'conf= ar-delay ar-rate \
+ keylist cmdlist js-dev file' -- $cur ) )
+ return 0
+ ;;
+ -af)
+ COMPREPLY=( $( compgen -W 'resample resample= \
+ channels channels= format format= \
+ volume volume= delay delay= pan \
+ pan= sub sub= surround surround=' \
+ -- $cur ) )
+ return 0
+ ;;
+ -af-adv)
+ COMPREPLY=( $( compgen -W 'force= list=' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ case "$cur" in
+ -*)
+ COMPREPLY=( $( compgen -W '-aid -alang -audio-demuxer \
+ -audiofile -cdrom-device -cache -cdda \
+ -channels -chapter -csslib -demuxer \
+ -dvd -dvd-device -dvdangle -dvdauth \
+ -dvdkey -dvdnav -forceidx -fps -frames \
+ -hr-mp3-seek -idx -mc -mf -ni -nobps \
+ -passwd -rawaudio -rtsp-stream-over-tcp\
+ -skipopening -sb -srate -ss -tv -user \
+ -vcd -vid -vivo -ifo -ffactor -font \
+ -noautosub -nooverlapsub -sid -slang \
+ -sub -subcc -subcp -sub-demuxer \
+ -subdelay -subfont-autoscale \
+ -subfont-blur -subfont-encoding \
+ -subfont-osd-scale -subfont-outline \
+ -subfont-text-scale -subfps -subfile \
+ -subpos -unicode -utf8 -vobsub \
+ -vobsubid -ac -afm -aspect -flip \
+ -lavdopts -noaspect -nosound -pp -ssf \
+ -stereo -sws -vc -vfm -vop -xvidopts\
+ -xy -zoom -bandwidth -cuefile \
+ -noextbased -rawvideo -overlapsub \
+ -sub-bg-alpha -sub-bg-color -subalign \
+ -subwidth -sub-no-text-pp -spualign \
+ -spuaa -spugauss -pphelp -verbose -v \
+ -noni -noidx -nohr-mp3-seek -extbased \
+ -bps -oldpp -nozoom -noflip -nounicode \
+ -noutf8' -- $cur ) )
+ # add mplayer specific options
+ [[ "$cmd" == @(?(g)mplayer) ]] && COMPREPLY=( "${COMPREPLY[@]}" \
+ $(compgen -W '-autoq -autosync -benchmark \
+ -framedrop -h -help -hardframedrop \
+ -identify -input -lircconf -loop \
+ -nojoystick -nolirc -nortc -playlist \
+ -quiet -really-quiet -rnd -sdp -skin \
+ -slave -softsleep -speed -sstep \
+ -use-stdin -dumpaudio -dumpfile \
+ -dumpstream -dumpvideo -dumpmicrodvdsub\
+ -dumpmpsub -dumpsrtsub -dumpjacosub \
+ -dumpsami -dumpsub -osdlevel -af \
+ -af-adv -ao -aofile -aop -delay -mixer \
+ -nowaveheader -bpp -brightness \
+ -contrast -display -double -dr -dxr2 \
+ -fb -fbmode -fbmodeconfig -forcexv -fs \
+ -geometry -hue -icelayer -jpeg \
+ -monitor-dotclock -monitor-hfreq \
+ -monitor-vfreq -monitoraspect \
+ -nograbpointer -noslices -panscan \
+ -rootwin -saturation -screenw -screenh \
+ -stop-xscreensaver -vm -vo -vsync -wid \
+ -xineramascreen -z -zrbw -zrcrop \
+ -zrdev -zrfd -zrhelp -zrnorm -zrquality \
+ -zrvdec -zrhdec -zrxdoff -zrydoff -y \
+ -edl -edlout -enqueue -fixed-vo \
+ -menu -menu-root -menu-cfg -shuffle \
+ -format -aahelp -dfbopts -fstype \
+ -guiwid -nokeepaspect -x --help \
+ -aaosdcolor -aasubcolor -aadriver \
+ -aaextended -aaeight' -- $cur) )
+ # add mencoder specific options
+ [[ "$cmd" = mencoder ]] && COMPREPLY=( "${COMPREPLY[@]}" \
+ $(compgen -W '-audio-density -audio-delay \
+ -audio-preload -divx4opts -endpos \
+ -ffourcc -include -info -lameopts \
+ -lavcopts -noskip -o -oac -ofps -ovc \
+ -passlogfile -skiplimit -vobsubout \
+ -vobsuboutindex -vobsuboutid \
+ -xvidencopts -of --verbose' -- $cur) )
+ ;;
+ *)
+ _filedir '@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|ASF|vob|VOB|bin|BIN|dat|DAT|vcd|VCD|ps|PS|pes|PES|fli|FLI|flv|FLV|viv|VIV|rm?(j)|RM?(J)|ra?(m)|RA?(M)|yuv|YUV|mov|MOV|qt|QT|mp[34]|MP[34]|m4v|M4V|og[gm]|OG[GM]|wav|WAV|dump|DUMP|mk[av]|MK[AV]|m4a|M4A|aac|AAC|m2v|M2V|dv|DV|rmvb|RMVB|mid|MID|ts|TS|3gp|mpc|MPC|flac|FLAC|flv|FLV|divx|DIVX)'
+ ;;
+ esac
+
+ return 0
+}
+complete $filenames -F _mplayer mplayer mencoder gmplayer kplayer
+}
+
+# KDE dcop completion
+#
+have dcop &&
+_dcop()
+{
+ local cur compstr
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ if [ -z $cur ]; then
+ compstr=${COMP_WORDS[*]}
+ else
+ compstr=$( command echo ${COMP_WORDS[*]} | sed "s/ $cur$//" )
+ fi
+ COMPREPLY=( $( compgen -W '$( command $compstr | sed s/\(.*\)// )' -- $cur ) )
+} &&
+complete -F _dcop dcop
+
+# wvdial(1) completion
+#
+have wvdial &&
+_wvdial()
+{
+ local cur prev config i IFS=$'\t\n'
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ --config)
+ _filedir
+ return 0
+ ;;
+ esac
+
+ case $cur in
+ -*)
+ COMPREPLY=( $( compgen -W '--config --chat \
+ --remotename --help --version --no-syslog' \
+ -- $cur ) )
+ ;;
+ *)
+ # start with global and personal config files
+ config="/etc/wvdial.conf"$'\t'"$HOME/.wvdialrc"
+ # replace with command line config file if present
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" == "--config" ]]; then
+ config=${COMP_WORDS[i+1]}
+ break
+ fi
+ done
+ # parse config files for sections and
+ # remove default section
+ COMPREPLY=( $( sed -ne \
+ "s|^\[Dialer \($cur.*\)\]$|\1|p" \
+ $config 2>/dev/null |grep -v '^Defaults$'))
+ # escape spaces
+ COMPREPLY=${COMPREPLY// /\\ }
+ ;;
+ esac
+
+} &&
+complete -F _wvdial wvdial
+
+# gpg(1) completion
+#
+have gpg &&
+_gpg()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(s|-sign|-clearsign|-decrypt-files|-load-extension))
+ _filedir
+ return 0
+ ;;
+ --@(export|@(?(l|nr|nrl)sign|edit)-key))
+ # return list of public keys
+ COMPREPLY=( $( compgen -W "$( gpg --list-keys 2>/dev/null | sed -ne 's@^pub.*/\([^ ]*\).*\(<\([^>]*\)>\).*$@\1 \3@p')" -- "$cur" ))
+ return 0
+ ;;
+ -@(r|-recipient))
+ COMPREPLY=( $( compgen -W "$( gpg --list-keys 2>/dev/null | sed -ne 's@^pub.*<\([^>]*\)>.*$@\1@p')" -- "$cur" ))
+ if [ -e ~/.gnupg/gpg.conf ]; then
+ COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W "$( sed -ne 's@^[ \t]*group[ \t][ \t]*\([^=]*\).*$@\1@p' ~/.gnupg/gpg.conf )" -- "$cur") )
+ fi
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-s -b -e -f -c -d -a -r -u -Z -o -v\
+ -q -n -N $(gpg --dump-options)' -- $cur ) )
+ fi
+
+} &&
+complete -F _gpg $default gpg
+
+# iconv(1) completion
+#
+have iconv &&
+_iconv()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(f|t|-@(from|to)-code))
+ COMPREPLY=( $( compgen -W \
+ '$( iconv --list | sed -e "s@//@@;" )' -- "$cur" ) )
+ return 0
+ ;;
+ esac
+
+
+ if [[ "$cur" = -* ]]; then
+ COMPREPLY=( $( compgen -W '--from-code -f --to-code -t --list
+ --output -o --verbose' -- "$cur" ) )
+ return 0
+ fi
+} &&
+complete -F _iconv $default iconv
+
+# dict(1) completion
+#
+{ have dict || have rdict; } && {
+_dictdata()
+{
+ dict $host $port $1 2>/dev/null | sed -ne \
+ 's/^['$'\t '']['$'\t '']*\([^'$'\t '']*\).*$/\1/p'
+}
+
+_dict()
+{
+ local cur prev host port db dictfile
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ dictfile=/usr/share/dict/words
+
+ for (( i=1; i < COMP_CWORD; i++ )); do
+ case "${COMP_WORDS[i]}" in
+ -@(h|--host))
+ host=${COMP_WORDS[i+1]}
+ [ -n "$host" ] && host="-h $host"
+ i=$((++i))
+ ;;
+ -@(p|-port))
+ port=${COMP_WORDS[i+1]}
+ [ -n "$port" ] && port="-p $port"
+ i=$((++i))
+ ;;
+ -@(d|-database))
+ db=${COMP_WORDS[i+1]}
+ [ -n "$db" ] && host="-d $db"
+ i=$((++i))
+ ;;
+ *)
+ ;;
+ esac
+ done
+
+ if [[ "$cur" = -* ]]; then
+ COMPREPLY=( $( compgen -W '-h --host -p --port -d --database \
+ -m --match -s --strategy -c --config -C \
+ --nocorrect -D --dbs -S --strats -H \
+ --serverhelp -i --info -I --serverinfo \
+ -a --noauth -u --user -k --key -V --version \
+ -L --license --help -v --verbose -r --raw \
+ -P --pager --debug --html --pipesize --client' \
+ -- "$cur" ) )
+ return 0
+ fi
+
+ case "$prev" in
+ -@(d|-database|i|info))
+ COMPREPLY=( $( compgen -W '$( _dictdata -D )' -- "$cur" ) )
+ return 0
+ ;;
+ -@(s|-strategy))
+ COMPREPLY=( $( compgen -W '$( _dictdata -S )' -- "$cur" ) )
+ return 0
+ ;;
+ *)
+ ;;
+ esac
+
+ [ -r $dictfile ] && \
+ COMPREPLY=( $( compgen -W '$( cat $dictfile )' -- "$cur" ) )
+}
+complete -F _dict $default dict rdict
+}
+
+# cdrecord(1) completion
+#
+have cdrecord &&
+_cdrecord()
+{
+ local cur prev i generic_options track_options track_mode
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # foo=bar style option
+ if [[ "$cur" == *=* ]]; then
+ prev=${cur/=*/}
+ cur=${cur/*=/}
+ case "$prev" in
+ @(text|cue)file)
+ _filedir
+ return 0
+ ;;
+ blank)
+ COMPREPLY=( $( compgen -W 'help all fast \
+ track unreserve trtail unclose session' \
+ -- $cur ) )
+ return 0
+ ;;
+ driveropts)
+ COMPREPLY=( $( compgen -W 'burnfree noburnfree\
+ varirec= audiomaster forcespeed noforcespeed\
+ speedread nospeedread singlesession \
+ nosinglesession hidecdr nohidecdr tattooinfo\
+ tattoofile=' -- $cur ) )
+ return 0
+ ;;
+ esac
+ fi
+
+ generic_options=(-version -v -V -d -silent -s -force -immed -dummy \
+ -dao -raw -raw96r -raw96p -raw16 -multi -msinfo -toc \
+ -atip -fix -nofix -waiti -load -lock -eject -format \
+ -setdropts -checkdrive -prcap -inq -scanbus -reset \
+ -abort -overburn -ignsize -useinfo -packet -noclose \
+ -text debug= kdebug= kd= minbuf= speed= blank= fs= \
+ dev= gracetime= timeout= driver= driveropts= \
+ defpregap= pktsize= mcn= textfile= cuefile=)
+ track_options=(-audio -swab -data -mode2 -xa -xa1 -xa2 -xamix -cdi \
+ -isosize -pad padsize= -nopad -shorttrack -noshorttrack\
+ pregap= -preemp -nopreemp -copy -nocopy -scms tcsize= \
+ isrc= index=)
+ # look if previous was either a file or a track option
+ track_mode=0
+ if [ $COMP_CWORD -gt 1 ]; then
+ if [ -f "$prev" ]; then
+ track_mode=1
+ else
+ for (( i=0; i < ${#track_options[@]}; i++ )); do
+ if [[ "${track_options[i]}" == "$prev" ]]; then
+ track_mode=1
+ break
+ fi
+ done
+ fi
+ fi
+
+ # files are always eligible completion
+ _filedir
+ # track options are always available
+ COMPREPLY=( "${COMPREPLY[@]}" $( compgen -W '${track_options[@]}' -- $cur ) )
+ # general options are no more available after file or track option
+ if [ $track_mode -eq 0 ]; then
+ COMPREPLY=( "${COMPREPLY[@]}" \
+ $( compgen -W '${generic_options[@]}' -- $cur ) )
+ fi
+
+} &&
+complete -F _cdrecord $filenames cdrecord
+
+# mkisofs(8) completion
+#
+have mkisofs &&
+_mkisofs()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(o|abstract|biblio|check-session|copyright|log-file|root-info|prep-boot|*-list))
+ _filedir
+ return 0
+ ;;
+ -*-charset)
+ COMPREPLY=( $( mkisofs -input-charset help 2>&1 | \
+ tail +3 | grep "^$cur") )
+ return 0
+ ;;
+ -uid)
+ _uids
+ return 0
+ ;;
+ -gid)
+ _gids
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-abstract -A -allow-lowercase \
+ -allow-multidot -biblio -cache-inodes \
+ -no-cache-inodes -b -eltorito-alt-boot -B -G \
+ -hard-disk-boot -no-emul-boot -no-boot \
+ -boot-load-seg -boot-load-size \
+ -boot-info-table -C -c -check-oldname \
+ -check-session -copyright -d -D -dir-mode \
+ -dvd-video -f -file-mode -gid -gui \
+ -graft-points -hide -hide-list -hidden \
+ -hidden-list -hide-joliet -hide-joliet-list \
+ -hide-joliet-trans-tbl -hide-rr-moved \
+ -input-charset -output-charset -iso-level -J \
+ -joliet-long -jcharset -l -L -log-file -m \
+ -exclude-list -max-iso9660-filenames -M -N \
+ -new-dir-mode -nobak -no-bak -force-rr -no-rr \
+ -no-split-symlink-components \
+ -no-split-symlink-fields -o -pad -no-pad \
+ -path-list -P -p -print-size -quiet -R -r \
+ -relaxed-filenames -sort -split-output \
+ -stream-media-size -stream-file-name -sysid -T\
+ -table-name -ucs-level -udf -uid \
+ -use-fileversion -U -no-iso-translate -V \
+ -volset -volset-size -volset-seqno -v -x -z \
+ -hfs -apple -map -magic -hfs-creator \
+ -hfs-type -probe -no-desktop -mac-name \
+ -boot-hfs-file -part -auto -cluster-size \
+ -hide-hfs -hide-hfs-list -hfs-volid \
+ -icon-position -root-info -prep-boot \
+ -input-hfs-charset -output-hfs-charset \
+ -hfs-unlock -hfs-bless -hfs-parms --cap \
+ --netatalk --double --ethershare --ushare \
+ --exchange --sgi --xinet --macbin --single \
+ --dave --sfm --osx-double --osx-hfs' -- $cur ))
+ else
+ _filedir
+ fi
+
+} &&
+complete -F _mkisofs $filenames mkisofs
+
+# mc(1) completion
+#
+have mc &&
+_mc()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # -name value style option
+ case "$prev" in
+ -@(e|v|l|P))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ # --name=value style option
+ if [[ "$cur" == *=* ]]; then
+ prev=${cur/=*/}
+ cur=${cur/*=/}
+ case "$prev" in
+ --@(edit|view|ftplog|printwd))
+ _filedir
+ return 0
+ ;;
+ esac
+ fi
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a --stickchars -b --nocolor -c \
+ --color -C --colors= -d --nomouse -e --edit= -f \
+ --datadir -k --resetsoft -l --ftplog= -P --printwd= \
+ -s --slow -t --termcap -u --nosubshell -U --subshell \
+ -v --view= -V --version -x --xterm -h --help' -- $cur ) )
+ else
+ _filedir -d
+ fi
+} &&
+complete -F _mc $filenames mc
+
+# yum(8) completion
+#
+have yum && {
+_yum()
+{
+ local cur prev special
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do
+ if [[ ${COMP_WORDS[i]} == @(install|update|upgrade|remove|erase|deplist) ]]; then
+ special=${COMP_WORDS[i]}
+ fi
+ done
+
+ if [ -n "$special" ]; then
+ case $special in
+ install|deplist)
+ COMPREPLY=( $( compgen -W '$( yum -C list | cut -d" " -f1 )' -- $cur ) )
+ return 0
+ ;;
+ *)
+ _rpm_installed_packages
+ return 0
+ ;;
+ esac
+ fi
+
+ case $cur in
+ --*)
+ COMPREPLY=( $( compgen -W '--installroot --version --help --enablerepo --disablerepo --exclude --obsoletes --noplugins' -- $cur ) )
+ return 0
+ ;;
+ -*)
+ COMPREPLY=( $( compgen -W '-c -e -d -y -t -R -C -h' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ case $prev in
+ list)
+ COMPREPLY=( $( compgen -W 'all available updates installed extras obsoletes recent' -- $cur ) )
+ ;;
+ clean)
+ COMPREPLY=( $( compgen -W 'packages headers metadata cache dbcache all' -- $cur ) )
+ ;;
+ localinstall)
+ _filedir rpm
+ ;;
+ -c)
+ _filedir
+ ;;
+ --installroot)
+ _filedir -d
+ ;;
+ *)
+ COMPREPLY=( $( compgen -W 'install update check-update upgrade remove list \
+ search info provides clean groupinstall groupupdate \
+ grouplist deplist erase groupinfo groupremove \
+ localinstall localupdate makecache resolvedep \
+ shell whatprovides' -- $cur ) )
+ ;;
+ esac
+}
+complete -F _yum $filenames yum
+
+# yum-arch(8) completion
+#
+_yum_arch()
+{
+ local cur
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ case "$cur" in
+ -*)
+ COMPREPLY=( $( compgen -W '-d -v -vv -n -c -z -s -l -q' -- $cur ) )
+ ;;
+ *)
+ _filedir -d
+ ;;
+ esac
+
+ return 0
+
+}
+complete -F _yum_arch $filenames yum-arch
+}
+
+# ImageMagick completion
+#
+have convert && {
+_ImageMagick()
+{
+ local prev
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -channel)
+ COMPREPLY=( $( compgen -W 'Red Green Blue Opacity \
+ Matte Cyan Magenta Yellow Black' -- $cur ) )
+ return 0
+ ;;
+ -colormap)
+ COMPREPLY=( $( compgen -W 'shared private' -- $cur ) )
+ return 0
+ ;;
+ -colorspace)
+ COMPREPLY=( $( compgen -W 'GRAY OHTA RGB Transparent \
+ XYZ YCbCr YIQ YPbPr YUV CMYK' -- $cur ) )
+ return 0
+ ;;
+ -compose)
+ COMPREPLY=( $( compgen -W 'Over In Out Atop Xor Plus \
+ Minus Add Subtract Difference Multiply Bumpmap\
+ Copy CopyRed CopyGreen CopyBlue CopyOpacity' \
+ -- $cur ) )
+ return 0
+ ;;
+ -compress)
+ COMPREPLY=( $( compgen -W 'None BZip Fax Group4 JPEG \
+ Lossless LZW RLE Zip' -- $cur ) )
+ return 0
+ ;;
+ -dispose)
+ COMPREPLY=( $( compgen -W 'Undefined None Background \
+ Previous' -- $cur ) )
+ return 0
+ ;;
+ -encoding)
+ COMPREPLY=( $( compgen -W 'AdobeCustom AdobeExpert \
+ AdobeStandard AppleRoman BIG5 GB2312 Latin2 \
+ None SJIScode Symbol Unicode Wansung' -- $cur))
+ return 0
+ ;;
+ -endian)
+ COMPREPLY=( $( compgen -W 'MSB LSB' -- $cur ) )
+ return 0
+ ;;
+ -filter)
+ COMPREPLY=( $( compgen -W 'Point Box Triangle Hermite \
+ Hanning Hamming Blackman Gaussian Quadratic \
+ Cubic Catrom Mitchell Lanczos Bessel Sinc' \
+ -- $cur ) )
+ return 0
+ ;;
+ -format)
+ COMPREPLY=( $( convert -list format | \
+ awk '/ [r-][w-][+-] / {print $1}' | \
+ tr -d '*' | tr [:upper:] [:lower:] | \
+ grep "^$cur" ) )
+ return 0
+ ;;
+ -gravity)
+ COMPREPLY=( $( compgen -W 'Northwest North NorthEast \
+ West Center East SouthWest South SouthEast' \
+ -- $cur ) )
+ return 0
+ ;;
+ -intent)
+ COMPREPLY=( $( compgen -W 'Absolute Perceptual \
+ Relative Saturation' -- $cur ) )
+ return 0
+ ;;
+ -interlace)
+ COMPREPLY=( $( compgen -W 'None Line Plane Partition' \
+ -- $cur ) )
+ return 0
+ ;;
+ -limit)
+ COMPREPLY=( $( compgen -W 'Disk File Map Memory' \
+ -- $cur ) )
+ return 0
+ ;;
+ -list)
+ COMPREPLY=( $( compgen -W 'Delegate Format Magic \
+ Module Resource Type' -- $cur ) )
+ return 0
+ ;;
+ -map)
+ COMPREPLY=( $( compgen -W 'best default gray red \
+ green blue' -- $cur ) )
+ _filedir
+ return 0
+ ;;
+ -noise)
+ COMPREPLY=( $( compgen -W 'Uniform Gaussian \
+ Multiplicative \
+ Impulse Laplacian Poisson' -- $cur ) )
+ return 0
+ ;;
+ -preview)
+ COMPREPLY=( $( compgen -W 'Rotate Shear Roll Hue \
+ Saturation Brightness Gamma Spiff \
+ Dull Grayscale Quantize Despeckle \
+ ReduceNoise AddNoise Sharpen Blur \
+ Treshold EdgeDetect Spread Shade \
+ Raise Segment Solarize Swirl Implode \
+ Wave OilPaint CharcoalDrawing JPEG' \
+ -- $cur ) )
+ return 0
+ ;;
+ -@(mask|profile|texture|tile|write))
+ _filedir
+ return 0
+ ;;
+ -type)
+ COMPREPLY=( $( compgen -W 'Bilevel Grayscale Palette \
+ PaletteMatte TrueColor TrueColorMatte \
+ ColorSeparation ColorSeparationlMatte \
+ Optimize' -- $cur ) )
+ return 0
+ ;;
+ -units)
+ COMPREPLY=( $( compgen -W 'Undefined PixelsPerInch \
+ PixelsPerCentimeter' -- $cur ) )
+ return 0
+ ;;
+ -virtual-pixel)
+ COMPREPLY=( $( compgen -W 'Constant Edge mirror tile' \
+ -- $cur ) )
+ return 0
+ ;;
+ -visual)
+ COMPREPLY=( $( compgen -W 'StaticGray GrayScale \
+ StaticColor PseudoColor TrueColor \
+ DirectColor defaut visualid' -- $cur ))
+ return 0
+ ;;
+ esac
+}
+
+_convert()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ _ImageMagick
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-adjoin -affine -antialias -append \
+ -authenticate -average -background -black-threshold \
+ -blue-primary -blur -border -bordercolor -channel \
+ -charcoal -chop -clip -coalesce -colorize -colors \
+ -colorspace -comment -compress -contrast -convolve \
+ -crop -cycle -debug -deconstruct -delay -density \
+ -depth -despeckle -display -dispose -dither -draw \
+ -edge -emboss -encoding -endian -enhance -equalize \
+ -extract -fill -filter -flatten -flip -flop -font \
+ -frame -fuzz -gamma -gaussian -geometry \
+ -green-primary -gravity -help -implode -intent \
+ -interlace -label -lat -level -limit -list -log -loop \
+ -map -mask -matte -median -modulate -monochrome \
+ -morph -mosaic -negate -noop -noise -normalize \
+ -opaque -ordered-dither -page -paint -ping -pointsize \
+ -preview -profile -quality -raise -random-threshold \
+ -region -raise -red-primary -render -resize -resample \
+ -roll -rotate -sample -sampling-factor -scale -scene \
+ -seed -segment -shade -sharpen -shave -shear -size \
+ -solarize -spread -stroke -strokewidth -swirl \
+ -texture -threshold -thumbnail -tile -transform \
+ -transparent -treedepth -trim -type -undercolor \
+ -units -unsharp -verbose -version -view \
+ -virtual-pixel -wave -white-point -white-threshold \
+ -write' -- $cur ) )
+ elif [[ "$cur" == +* ]]; then
+ COMPREPLY=( $( compgen -W '+adjoin +append +compress \
+ +contrast +debug +dither +endian +gamma +label +map \
+ +mask +matte +negate +noise +page +raise +render \
+ +write' -- $cur ) )
+ else
+ _filedir
+ fi
+}
+complete -F _convert $filenames convert
+
+_mogrify()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ _ImageMagick
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-affine -antialias -authenticate \
+ -background -black-threshold -blue-primary -blur \
+ -border -bordercolor -channel -charcoal -chop \
+ -colorize -colors -colorspace -comment -compress \
+ -contrast -convolve -crop -cycle -debug -delay \
+ -density -depth -despeckle -display -dispose -dither \
+ -draw -edge -emboss -encoding -endian -enhance \
+ -equalize -extract -fill -filter -flip -flop -font \
+ -format -frame -fuzz -gamma -gaussian -geometry \
+ -green-primary -implode -interlace -help -label -lat \
+ -level -limit -list -log -loop -map -mask -matte \
+ -median -modulate -monochrome -negate -noop \
+ -normalize -opaque -page -paint -fill -ordered-dither \
+ -pointsize -profile -quality -raise -random-threshold \
+ -red-primary -region -resample -resize -roll -rotate \
+ -sample -sampling-factor -scale -scene -seed -segment \
+ -shade -sharpen -shear -size -solarize -spread \
+ -stroke -strokewidth -swirl -texture -threshold \
+ -thumbnail -tile -transform -transparent -treedepth \
+ -trim -type -undercolor -units -unsharp -verbose \
+ -version -view -virtual-pixel -wave -white-point \
+ -white-threshold' -- $cur ) )
+ elif [[ "$cur" == +* ]]; then
+ COMPREPLY=( $( compgen -W '+compress +contrast +debug +dither \
+ +endian +gamma +label +map +mask +matte +negate +page \
+ +raise' -- $cur ) )
+ else
+ _filedir
+ fi
+}
+complete -F _mogrify $filenames mogrify
+
+_display()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ _ImageMagick
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-authenticate -backdrop -border \
+ -colormap -colors -colorspace -comment -compress \
+ -contrast -crop -debug -delay -density -depth \
+ -despeckle -display -dispose -dither -edge -endian \
+ -enhance -extract -filter -flip -flop -frame -gamma \
+ -geometry -help -immutable -interlace -label -limit \
+ -log -map -matte -monochrome -negate -noop -page \
+ -quality -raise -remote -roll -rotate -sample \
+ -sampling-factor -scene -segment -sharpen -size \
+ -texture -treedepth -trim -update -verbose -version \
+ -virtual-pixel -window -window_group -write' -- $cur))
+ elif [[ "$cur" == +* ]]; then
+ COMPREPLY=( $( compgen -W '+compress +contrast +debug +dither \
+ +endian +gamma +label +map +matte +negate +page \
+ +raise +write' -- $cur ) )
+ else
+ _filedir
+ fi
+}
+complete -F _display $filenames display
+
+_animate()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ _ImageMagick
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-authenticate -backdrop -colormap \
+ -colors -colorspace -crop -debug -delay -density \
+ -depth -display -dither -extract -gamma -geometry \
+ -help -interlace -limit -log -matte -map -monochrome \
+ -noop -pause -remote -rotate -sampling-factor -scene \
+ -size -treedepth -trim -verbose -version -visual \
+ -virtual-pixel -window' -- $cur ) )
+ elif [[ "$cur" == +* ]]; then
+ COMPREPLY=( $( compgen -W '+debug +dither +gamma +map +matte' -- $cur ) )
+ else
+ _filedir
+ fi
+}
+complete -F _animate $filenames animate
+
+_identify()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ _ImageMagick
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-authenticate -debug -density \
+ -depth -extract -format -help -interlace -limit -list \
+ -log -size -sampling-factor -verbose -version \
+ -virtual-pixel' -- $cur ) )
+ elif [[ "$cur" == +* ]]; then
+ COMPREPLY=( $( compgen -W '+debug ' -- $cur ) )
+ else
+ _filedir
+ fi
+}
+complete -F _identify $filenames identify
+
+_montage()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ _ImageMagick
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-adjoin -affine -authenticate \
+ -blue-primary -blur -colors -colorspace -comment \
+ -compose -compress -crop -debug -density -depth \
+ -display -dispose -dither -draw -encoding -endian \
+ -extract -fill -filter -flip -flop -frame -gamma \
+ -geometry -gravity -green-primary -interlace -help \
+ -label -limit -log -matte -mode -monochrome -noop \
+ -page -pointsize -quality -red-primary -resize \
+ -rotate -sampling-factor -scene -shadow -size \
+ -stroke -texture -thumbnail -tile -transform \
+ -transparent -treedepth -trim -type -verbose \
+ -version -virtual-pixel -white-point' -- $cur ) )
+ elif [[ "$cur" == +* ]]; then
+ COMPREPLY=( $( compgen -W '+adjoin +compress +debug +dither \
+ +endian +gamma +label +matte +page' -- $cur ) )
+ else
+ _filedir
+ fi
+}
+complete -F _montage $filenames montage
+
+_composite()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ _ImageMagick
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-affine -authenticate \
+ -blue-primary -colors -colorspace -comment -compose \
+ -compress -debug -density -depth -displace -display \
+ -dispose -dissolve -dither -encoding -endian -extract \
+ -filter -font -geometry -gravity -green-primary -help \
+ -interlace -label -limit -log -matte -monochrome \
+ -negate -page -profile -quality -red-primary -rotate \
+ -resize -sampling-factor -scene -sharpen -size \
+ -stegano -stereo -thumbnail -tile -transform \
+ -treedepth -type -units -unsharp -verbose -version \
+ -virtual-pixel -watermark -white-point -write' \
+ -- $cur ) )
+ elif [[ "$cur" == +* ]]; then
+ COMPREPLY=( $( compgen -W '+compress +debug +dither +endian +label \
+ +matte +negate +page +write' -- $cur ) )
+ else
+ _filedir
+ fi
+}
+complete -F _composite $filenames composite
+}
+
+# dd(1) completion
+#
+have dd &&
+_dd()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ case "$cur" in
+ if=*|of=*)
+ cur=${cur#*=}
+ _filedir
+ return 0
+ ;;
+ conv=*)
+ cur=${cur#*=}
+ COMPREPLY=( $( compgen -W 'ascii ebcdic ibm block unblock \
+ lcase notrunc ucase swab noerror sync' \
+ -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ _expand || return 0
+
+ COMPREPLY=( $( compgen -W '--help --version' -- $cur ) \
+ $( compgen -W 'bs cbs conv count ibs if obs of seek skip'\
+ -S '=' -- $cur ) )
+} &&
+complete -F _dd $nospace $filenames dd
+
+# CUPS cancel(1) completion
+#
+have cancel &&
+_cancel()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ COMPREPLY=( $( lpstat | cut -d' ' -f1 | grep "^$cur" ) )
+} &&
+complete -F _cancel $filenames cancel
+
+# aspell(1) completion
+#
+have aspell && {
+_aspell_dictionary()
+{
+ local datadir
+ datadir=/usr/lib/aspell
+ COMPREPLY=( $( command ls $datadir/*.@(multi|alias) ) )
+ COMPREPLY=( ${COMPREPLY[@]%.@(multi|alias)} )
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]#$datadir/}' -- $cur ) )
+}
+
+_aspell()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # --name value style option
+ case "$prev" in
+ @(-c|-p|check))
+ _filedir
+ return 0
+ ;;
+ @(dump|create|merge))
+ COMPREPLY=( $( compgen -W 'master personal repl' -- $cur ) )
+ return 0
+ ;;
+ -d)
+ _aspell_dictionary
+ return 0
+ ;;
+ esac
+
+ # --name=value style option
+ if [[ "$cur" == *=* ]]; then
+ prev=${cur/=*/}
+ cur=${cur/*=/}
+ case "$prev" in
+ --@(conf|personal|repl|per-conf))
+ _filedir
+ return 0
+ ;;
+ --@(conf-dir|data-dir|dict-dir|home-dir|local-data-dir|prefix))
+ _filedir -d
+ return 0
+ ;;
+ --master)
+ _aspell_dictionary
+ return 0
+ ;;
+ --mode)
+ COMPREPLY=( $( compgen -W 'none url email sgml tex' -- $cur ) )
+ return 0
+ ;;
+ --sug-mode)
+ COMPREPLY=( $( compgen -W 'ultra fast normal bad-speller' -- $cur ) )
+ return 0
+ ;;
+ --keymapping)
+ COMPREPLY=( $( compgen -W 'aspell ispell' -- $cur ) )
+ return 0
+ ;;
+ esac
+ fi
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--conf= --conf-dir= --data-dir= --dict-dir= \
+ --encoding= --add-filter= --rem-filter= --mode= -e \
+ -H -t --add-extra-dicts= --rem-extra-dicts= \
+ --home-dir= -W --ignore= --ignore-accents \
+ --dont-ignore-accents --ignore-case --dont-ignore-case \
+ --ignore-repl --dont-ignore-repl --jargon= --keyboard= \
+ --lang= --language-tag= --local-data-dir= -d --master= \
+ --module= --add-module-search-order= \
+ --rem-module-search-order= --per-conf= -p --personal= \
+ --prefix= --repl= -C -B --run-together --dont-run-together \
+ --run-together-limit= --run-together-min= --save-repl \
+ --dont-save-repl --set-prefix --dont-set-prefix --size= \
+ --spelling= --strip-accents --dont-strip-accents \
+ --sug-mode= --add-word-list-path= --rem-word-list-path= \
+ -b -x --backup -b|-x --dont-backup --reverse --dont-reverse \
+ --time --dont-time --keymapping= --add-email-quote= \
+ --rem-email-quote= --email-margin= --add-tex-command= \
+ --rem-tex-command= --tex-check-comments \
+ --dont-tex-check-comments --add-tex-extension= \
+ --rem-tex-extension= --add-sgml-check= --rem-sgml-check= \
+ --add-sgml-extension= --rem-sgml-extension=' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W '-? help -c check -a pipe -l list \
+ config config soundslike filter -v version dump \
+ create merge' -- $cur ) )
+ fi
+
+}
+complete -F _aspell $filenames aspell
+}
+
+# xmms(1) completion
+#
+have xmms &&
+_xmms()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-h --help -r --rew -p --play \
+ -u --pause -s --stop -t --play-pause -f --fwd -e \
+ --enqueue -m --show-main-window -i --sm-client-id \
+ -v --version' -- $cur ) )
+ else
+ _filedir '@(mp[23]|MP[23]|ogg|OGG|wav|WAV|pls|m3u|xm|mod|s[3t]m|it|mtm|ult|flac)'
+
+ fi
+
+} &&
+complete -F _xmms $filenames xmms
+
+# info(1) completion
+#
+have info &&
+_info()
+{
+ local cur infopath UNAME
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ _expand || return 0
+
+ # default completion if parameter contains /
+ if [[ "$cur" == */* ]]; then
+ _filedir
+ return 0
+ fi
+
+ infopath='/usr/share/info'
+
+ if [ "${INFOPATH: -1:1}" == ':' ]; then
+ infopath=${INFOPATH}${infopath}
+ elif [ ${INFOPATH:+set} ]; then
+ infopath=$INFOPATH
+ fi
+
+ infopath=$infopath:
+ if [ -n "$cur" ]; then
+ infopath="${infopath//://$cur* }"
+ else
+ infopath="${infopath//:// }"
+ fi
+
+ # redirect stderr for when path doesn't exist
+ COMPREPLY=( $( eval command ls "$infopath" 2>/dev/null ) )
+ # weed out directory path names and paths to info pages
+ COMPREPLY=( ${COMPREPLY[@]##*/?(:)} )
+ # weed out info dir file
+ for (( i=0 ; i < ${#COMPREPLY[@]} ; ++i )); do
+ if [ "${COMPREPLY[$i]}" == 'dir' ]; then
+ unset COMPREPLY[$i];
+ fi;
+ done
+ # strip suffix from info pages
+ COMPREPLY=( ${COMPREPLY[@]%.@(gz|bz2)} )
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]%.*}' -- "${cur//\\\\/}" ) )
+
+ return 0
+} &&
+complete -F _info $filenames info
+
+# dhclient(1) completion
+#
+have dhclient && _dhclient()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(cf|lf|pf|sf))
+ _filedir
+ return 0
+ ;;
+ -s)
+ _known_hosts
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-p -d -q -1 -r -lf -pf \
+ -cf -sf -s -g -n -nw -w' -- $cur ) )
+ else
+ _available_interfaces
+ fi
+} &&
+complete -F _dhclient dhclient
+
+# lvm(8) completion
+#
+have lvm && {
+_volumegroups()
+{
+ COMPREPLY=( $(compgen -W "$( vgscan 2>/dev/null | \
+ sed -n -e 's|.*Found.*"\(.*\)".*$|\1|p' )" -- $cur ) )
+}
+
+_physicalvolumes()
+{
+ COMPREPLY=( $(compgen -W "$( pvscan 2>/dev/null | \
+ sed -n -e 's|^.*PV \(.*\) VG.*$|\1|p' )" -- $cur ) )
+}
+
+_logicalvolumes()
+{
+ COMPREPLY=( $(compgen -W "$( lvscan 2>/dev/null | \
+ sed -n -e "s|^.*'\(.*\)'.*$|\1|p" )" -- $cur ) )
+}
+
+_units()
+{
+ COMPREPLY=( $( compgen -W 'h s b k m g t H K M G T' -- $cur ) )
+}
+
+_sizes()
+{
+ COMPREPLY=( $( compgen -W 'k K m M g G t T' -- $cur ) )
+}
+
+_args()
+{
+ args=0
+ if [[ "${COMP_WORDS[0]}" == lvm ]]; then
+ offset=2
+ else
+ offset=1
+ fi
+ for (( i=$offset; i < COMP_CWORD; i++ )); do
+ if [[ "${COMP_WORDS[i]}" != -* ]]; then
+ args=$(($args + 1))
+ fi
+ done
+}
+
+_lvmdiskscan()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -h -? --help -l \
+ --lvmpartition -v --verbose --version' -- $cur ) )
+ fi
+}
+complete -F _lvmdiskscan lvmdiskscan
+
+_pvscan()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -e \
+ --exported -n --novolumegroup -h -? \
+ --help --ignorelockingfailure -P \
+ --partial -s --short -u --uuid -v \
+ --verbose --version' -- $cur ) )
+ fi
+}
+complete -F _pvscan pvscan
+
+_pvs()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(o|O|-options|-sort))
+ COMPREPLY=( $( compgen -W 'pv_fmt pv_uuid \
+ pv_size pv_free pv_used pv_name \
+ pv_attr pv_pe_count \
+ pv_pe_alloc_count' -- $cur ) )
+ return 0
+ ;;
+ --units)
+ _units
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--aligned -a --all -d --debug \
+ -h -? --help --ignorelockingfailure --noheadings \
+ --nosuffix -o --options -O --sort \
+ --separator --unbuffered --units \
+ -v --verbose --version' -- $cur ) )
+ else
+ _physicalvolumes
+ fi
+}
+complete -F _pvs pvs
+
+_pvdisplay()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ --units)
+ _units
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c --colon -C --columns --units \
+ -v --verbose -d --debug -h --help --version' -- $cur ) )
+ else
+ _physicalvolumes
+ fi
+}
+complete -F _pvdisplay pvdisplay
+
+_pvchange()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|x|-autobackup|--allocatable))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a --all -A --autobackup \
+ -d --debug -h --help -t --test -u --uuid -x \
+ --allocatable -v --verbose --addtag --deltag \
+ --version' -- $cur ) )
+ else
+ _physicalvolumes
+ fi
+}
+complete -F _pvchange pvchange
+
+_pvcreate()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ --restorefile)
+ _filedir
+ return 0
+ ;;
+ -@(M|-metadatatype))
+ COMPREPLY=( $( compgen -W '1 2' -- $cur ) )
+ return 0
+ ;;
+ --metadatacopies)
+ COMPREPLY=( $( compgen -W '0 1 2' -- $cur ) )
+ return 0
+ ;;
+ --@(metadatasize|setphysicalvolumesize))
+ _sizes
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--restorefile -d --debug -f \
+ --force -h -? --help --labelsector -M --metadatatype \
+ --metadatacopies --metadatasize \
+ --setphysicalvolumesize -t --test -u --uuid uuid -v \
+ --verbose -y --yes --version' -- $cur ) )
+ else
+ _physicalvolumes
+ fi
+}
+complete -F _pvcreate pvcreate
+
+_pvmove()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(n|-name))
+ _logicalvolumes
+ return 0
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--abort -A --autobackup \
+ -b --background -d --debug -f --force -h -? \
+ --help -i --interval -t --test -v --verbose \
+ --version -n --name' -- $cur ) )
+ else
+ _physicalvolumes
+ fi
+}
+complete -F _pvmove pvmove
+
+_pvremove()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -f --force -h -? \
+ --help -y --yes -t --test -v --verbose \
+ --version' -- $cur ) )
+ else
+ _physicalvolumes
+ fi
+}
+complete -F _pvremove pvremove
+
+_vgscan()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -h --help \
+ --ignorelockingfailure --mknodes -P \
+ --partial -v --verbose --version' -- $cur ) )
+ fi
+}
+complete -F _vgscan vgscan
+
+_vgs()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(o|O|-options|-sort))
+ COMPREPLY=( $( compgen -W 'vg_fmt vg_uuid vg_name \
+ vg_attr vg_size vg_free vg_sysid \
+ vg_extent_size vg_extent_count vg_free_count \
+ max_lv max_pv pv_count lv_count snap_count \
+ vg_seqno' -- $cur ) )
+ return 0
+ ;;
+ --units)
+ _units
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--aligned -d --debug \
+ -h --help --ignorelockingfailure --noheadings \
+ --nosuffix -o --options -O --sort -P --partial \
+ --separator --unbuffered --units \
+ -v --verbose --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgs vgs
+
+_vgdisplay()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ --units)
+ _units
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c --colon -C --columns --units \
+ -P --partial -A --activevolumegroups -v --verbose \
+ -d --debug -h --help --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgdisplay vgdisplay
+
+_vgchange()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(a|A|x|-available|-autobackup|-resizeable))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup --alloc -P \
+ --partial -d --debug -h --help --ignorelockingfailure \
+ -t --test -u --uuid -v --verbose --version -a \
+ --available -x --resizeable -l --logicalvolume \
+ --addtag --deltag' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgchange vgchange
+
+_vgcreate()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(M|-metadatatype))
+ COMPREPLY=( $( compgen -W '1 2' -- $cur ) )
+ return 0
+ ;;
+ -@(s|-physicalextentsize))
+ _sizes
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup --addtag \
+ --alloc -d --debug -h --help -l --maxlogicalvolumes \
+ -M --metadatatype -p --maxphysicalvolumes -s \
+ --physicalextentsize -t --test -v --verbose \
+ --version' -- $cur ) )
+ else
+ _args
+ if [ $args -eq 0 ]; then
+ _volumegroups
+ else
+ _physicalvolumes
+ fi
+ fi
+}
+complete -F _vgcreate vgcreate
+
+_vgremove()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -h --help -t --test \
+ -v --verbose --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgremove vgremove
+
+_vgrename()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -h \
+ -? --help -t --test -v --verbose --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgrename vgrename
+
+_vgreduce()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a --all -A --autobackup -d \
+ --debug -h --help --removemissing -t --test -v \
+ --verbose --version' -- $cur ) )
+
+ else
+ _args
+ if [ $args -eq 0 ]; then
+ _volumegroups
+ else
+ _physicalvolumes
+ fi
+ fi
+}
+complete -F _vgreduce vgreduce
+
+_vgextend()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(L|-size))
+ _sizes
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -h \
+ -? --help -t --test -v --verbose --version' -- $cur ) )
+ else
+ _args
+ if [ $args -eq 0 ]; then
+ _volumegroups
+ else
+ _physicalvolumes
+ fi
+ fi
+}
+complete -F _vgextend vgextend
+
+_vgport()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a --all -d --debug -h \
+ -? --help -v --verbose --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgport vgimport vgexport
+
+_vgck()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -h \
+ -? --help -v --verbose --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgck vgck
+
+_vgconvert()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(M|-metadatatype))
+ COMPREPLY=( $( compgen -W '1 2' -- $cur ) )
+ return 0
+ ;;
+ --metadatacopies)
+ COMPREPLY=( $( compgen -W '0 1 2' -- $cur ) )
+ return 0
+ ;;
+ --metadatasize)
+ _sizes
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -h --help --labelsector \
+ -M --metadatatype --metadatacopies --metadatasize \
+ -t --test -v --verbose --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgconvert vgconvert
+
+_vgcfgbackup()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(f|-file))
+ _filedir
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -f --file -h --help \
+ --ignorelockingfailure -P --partial -v --verbose \
+ --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgcfgbackup vgcfgbackup
+
+_vgcfgrestore()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(f|-file))
+ _filedir
+ return 0
+ ;;
+ -@(M|-metadatatype))
+ COMPREPLY=( $( compgen -W '1 2' -- $cur ) )
+ return 0
+ ;;
+ -@(n|-name))
+ _volumegroups
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -f --file -l --list \
+ -h --help -M --Metadatatype -n --name -t --test \
+ -v --verbose --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgcfgrestore vgcfgrestore
+
+_vgmerge()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug \
+ -h --help -l --list -t --test -v --verbose \
+ --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgmerge vgmerge
+
+_vgsplit()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(M|-metadatatype))
+ COMPREPLY=( $( compgen -W '1 2' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug \
+ -h --help -l --list -M --metadatatype -t --test \
+ -v --verbose --version' -- $cur ) )
+ else
+ _args
+ if [ $args -eq 0 -o $args -eq 1 ]; then
+ _volumegroups
+ else
+ _physicalvolumes
+ fi
+ fi
+}
+complete -F _vgsplit vgsplit
+
+_vgmknodes()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-d --debug -h --help -v --verbose \
+ --version' -- $cur ) )
+ else
+ _volumegroups
+ fi
+}
+complete -F _vgmknodes vgmknodes
+
+_lvscan()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-b --blockdevice -d --debug \
+ -h -? --help --ignorelockingfailure -P \
+ --partial -v --verbose --version' -- $cur ) )
+ fi
+}
+complete -F _lvscan lvscan
+
+_lvs()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(o|O|-options|-sort))
+ COMPREPLY=( $( compgen -W 'lv_uuid lv_name \
+ lv_attr lv_minor lv_size seg_count \
+ origin snap_percent segtype stripes \
+ stripesize chunksize seg_start \
+ seg_size' -- $cur ) )
+ return 0
+ ;;
+ --units)
+ _units
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--aligned -d --debug \
+ -h --help --ignorelockingfailure --noheadings \
+ --nosuffix -o --options -O --sort -P --partial \
+ --segments --separator --unbuffered --units \
+ -v --verbose --version' -- $cur ) )
+ else
+ _logicalvolumes
+ fi
+}
+complete -F _lvs lvs
+
+_lvdisplay()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ --units)
+ _units
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-c --colon -C --columns --units \
+ -P --partial -m --maps -v --verbose -d --debug -h \
+ --help --version' -- $cur ) )
+ else
+ _logicalvolumes
+ fi
+}
+complete -F _lvdisplay lvdisplay
+
+_lvchange()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(a|A|C|M|-available|-autobackup|-continguous|-persistent))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(p|-permission))
+ COMPREPLY=( $( compgen -W 'r rw' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup -a --available \
+ --addtag --alloc -C --contiguous -d --debug --deltag \
+ -f --force -h --help --ignorelockingfailure -M \
+ --persistent --major major --minor minor -P --partial \
+ -p --permission -r --readahead --refresh -t --test \
+ -v --verbose --version' -- $cur ) )
+ else
+ _logicalvolumes
+ fi
+}
+complete -F _lvchange lvchange
+
+_lvcreate()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|C|M|Z|-autobackup|-continguous|-persistent|-zero))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(L|-size))
+ _sizes
+ return 0
+ ;;
+ -@(p|-permission))
+ COMPREPLY=( $( compgen -W 'r rw' -- $cur ) )
+ return 0
+ ;;
+ -@(n|-name))
+ _logicalvolumes
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup --addtag --alloc \
+ -C --contiguous -d --debug -h -? --help -i --stripes \
+ -I --stripesize -l --extents -L --size -M --persistent \
+ --major --minor -n --name -p --permission -r \
+ --readahead -t --test --type -v --verbose -Z --zero \
+ --version' -- $cur ) )
+ else
+ _args
+ if [ $args -eq 0 ]; then
+ _volumegroups
+ else
+ _physicalvolumes
+ fi
+ fi
+}
+complete -F _lvcreate lvcreate
+
+_lvremove()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -f \
+ --force -h -? --help -t --test -v --verbose \
+ --version' -- $cur ) )
+ else
+ _logicalvolumes
+ fi
+}
+complete -F _lvremove lvremove
+
+_lvrename()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup -d --debug -h \
+ -? --help -t --test -v --verbose --version' -- $cur ) )
+ else
+ _logicalvolumes
+ fi
+}
+complete -F _lvrename lvrename
+
+_lvreduce()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(L|-size))
+ _sizes
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup -d \
+ --debug -f --force -h --help -l --extents \
+ -L --size -n --nofsck -r --resizefs -t --test \
+ -v --verbose --version' -- $cur ) )
+ else
+ _logicalvolumes
+ fi
+}
+complete -F _lvreduce lvreduce
+
+_lvresize()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(L|-size))
+ _sizes
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup --alloc -d \
+ --debug -h --help -i --stripes -I --stripesize \
+ -l --extents -L --size -n --nofsck -r --resizefs \
+ -t --test --type -v --verbose --version' -- $cur ) )
+ else
+ _args
+ if [ $args -eq 0 ]; then
+ _logicalvolumes
+ else
+ _physicalvolumes
+ fi
+ fi
+}
+complete -F _lvresize lvresize
+
+_lvextend()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(A|-autobackup))
+ COMPREPLY=( $( compgen -W 'y n' -- $cur ) )
+ return 0
+ ;;
+ -@(L|-size))
+ _sizes
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-A --autobackup --alloc -d \
+ --debug -h --help -i --stripes -I --stripesize \
+ -l --extents -L --size -n --nofsck -r --resizefs \
+ -t --test --type -v --verbose --version' -- $cur ) )
+ else
+ _args
+ if [ $args -eq 0 ]; then
+ _logicalvolumes
+ else
+ _physicalvolumes
+ fi
+ fi
+}
+complete -F _lvextend lvextend
+
+_lvm()
+{
+ local prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W 'dumpconfig help lvchange \
+ lvcreate lvdisplay lvextend lvmchange \
+ lvmdiskscan lvmsadc lvmsar lvreduce \
+ lvremove lvrename lvresize lvs lvscan \
+ pvchange pvcreate pvdata pvdisplay pvmove \
+ pvremove pvresize pvs pvscan vgcfgbackup \
+ vgcfgrestore vgchange vgck vgconvert \
+ vgcreate vgdisplay vgexport vgextend \
+ vgimport vgmerge vgmknodes vgreduce \
+ vgremove vgrename vgs vgscan vgsplit \
+ version' -- $cur ) )
+ else
+ case ${COMP_WORDS[1]} in
+ pvchange)
+ _pvchange
+ ;;
+ pvcreate)
+ _pvcreate
+ ;;
+ pvdisplay)
+ _pvdisplay
+ ;;
+ pvmove)
+ _pvmove
+ ;;
+ pvremove)
+ _pvremove
+ ;;
+ pvresize)
+ _pvresize
+ ;;
+ pvs)
+ _pvs
+ ;;
+ pvscan)
+ _pvscan
+ ;;
+ vgcfgbackup)
+ _vgcfgbackup
+ ;;
+ vgcfgrestore)
+ _vgcfgrestore
+ ;;
+ vgchange)
+ _vgchange
+ ;;
+ vgck)
+ _vgck
+ ;;
+ vgconvert)
+ _vgconvert
+ ;;
+ vgcreate)
+ _vgcreate
+ ;;
+ vgdisplay)
+ _vgdisplay
+ ;;
+ vgexport)
+ _vgexport
+ ;;
+ vgextend)
+ _vgextend
+ ;;
+ vgimport)
+ _vgimport
+ ;;
+ vgmerge)
+ _vgmerge
+ ;;
+ vgmknodes)
+ _vgmknodes
+ ;;
+ vgreduce)
+ _vgreduce
+ ;;
+ vgremove)
+ _vgremove
+ ;;
+ vgrename)
+ _vgrename
+ ;;
+ vgs)
+ _vgs
+ ;;
+ vgscan)
+ _vgscan
+ ;;
+ vgsplit)
+ _vgsplit
+ ;;
+ lvchange)
+ _lvchange
+ ;;
+ lvcreate)
+ _lvcreate
+ ;;
+ lvdisplay)
+ _lvdisplay
+ ;;
+ lvextend)
+ _lvextend
+ ;;
+ lvreduce)
+ _lvreduce
+ ;;
+ lvremove)
+ _lvremove
+ ;;
+ lvrename)
+ _lvrename
+ ;;
+ lvresize)
+ _lvresize
+ ;;
+ lvs)
+ _lvs
+ ;;
+ lvscan)
+ _lvscan
+ ;;
+ esac
+ fi
+}
+complete -F _lvm lvm
+}
+
+# mkinitrd(8) completion
+#
+have mkinitrd &&
+_mkinitrd()
+{
+ local cur args
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # --name value style option
+ case "$prev" in
+ --preload)
+ _modules
+ return 0
+ ;;
+ esac
+
+ # --name=value style option
+ if [[ "$cur" == *=* ]]; then
+ prev=${cur/=*/}
+ cur=${cur/*=/}
+ case "$prev" in
+ --@(with|builtin))
+ _modules
+ return 0
+ ;;
+ --@(fstab|dsdt))
+ _filedir
+ return 0
+ ;;
+ --tmpdir)
+ _filedir -d
+ return 0
+ ;;
+ esac
+ fi
+
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--version -v -f --preload \
+ --with= --omit-scsi-modules --omit-raid-modules \
+ --images-version --fstab= --nocompress --builtin= \
+ --nopivot --noudev --allow-missing --tmpdir= \
+ --initrdfs= --dsdt= --lvm-version= --froce-usb' \
+ -- $cur ) )
+ else
+ _count_args
+
+ case $args in
+ 1)
+ _filedir
+ ;;
+ 2)
+ COMPREPLY=( $( command ls /lib/modules | grep "^$cur" ) )
+ ;;
+ esac
+ fi
+
+} &&
+complete -F _mkinitrd mkinitrd
+
+# pkgconfig(1) completion
+#
+have pkg-config &&
+_pkg_config()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [[ "$cur" == -* ]]; then
+ # return list of available options
+ COMPREPLY=( $( compgen -W '-version --modversion \
+ --atleast-pkgconfig-version= --libs --libs-only-l \
+ --libs-only-other --libs-only-L --cflags \
+ --cflags-only-I --cflags-only-other --variable= \
+ --define-variable= --exists --uninstalled \
+ --atleast-version= --exact-version= --max-version= \
+ --list-all --debug --print-errors --silence-errors \
+ --errors-to-stdout -? --help --usage' -- $cur))
+ else
+ COMPREPLY=( $( pkg-config --list-all 2>/dev/null | \
+ awk '{print $1}' | grep "^$cur" ) )
+ fi
+} &&
+complete -F _pkg_config pkg-config
+
+
+# cpio(1) completion
+#
+have cpio && {
+_cpio_format()
+{
+ COMPREPLY=( $( compgen -W 'bin odc newc crc tar ustar hpbin hpodc' -- $cur ) )
+}
+
+_cpio()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # --name value style option
+ case $prev in
+ -H)
+ _cpio_format
+ return 0
+ ;;
+ -@(E|F|I))
+ _filedir
+ return 0
+ ;;
+ -R)
+ _usergroup
+ return 0
+ ;;
+ esac
+
+ # --name=value style option
+ if [[ "$cur" == *=* ]]; then
+ prev=${cur/=*/}
+ cur=${cur/*=/}
+ case $prev in
+ --format)
+ _cpio_format
+ return 0
+ ;;
+ --@(file|pattern-file))
+ _filedir
+ return 0
+ ;;
+ --owner)
+ _usergroup
+ return 0
+ ;;
+ --rsh-command)
+ COMPREPLY=( $( compgen -c -- $cur ) )
+ return 0
+ ;;
+ esac
+ fi
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W '-o --create -i --extract -p --pass-through' -- $cur) )
+ else
+ case ${COMP_WORDS[1]} in
+ -@(o|-create))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-0 -a -c -v -A -B\
+ -L -V -C -H -M -O -F --file= --format=\
+ --message= --null --reset-access-time\
+ --verbose --dot --append --block-size=\
+ --dereference --io-size= --quiet\
+ --force-local --rsh-command= --help\
+ --version' -- $cur ) )
+ fi
+ ;;
+ -@(i|-extract))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-b -c -d -f -m -n -r\
+ -t -s -u -v -B -S -V -C -E -H -M -R -I\
+ -F --file= --make-directories\
+ --nonmatching\
+ --preserve-modification-time\
+ --numeric-uid-gid --rename -t --list\
+ --swap-bytes --swap --dot\
+ --unconditional --verbose --block-size=\
+ --swap-halfwords --io-size=\
+ --pattern-file= --format= --owner=\
+ --no-preserve-owner --message=\
+ --force-local --no-absolute-filenames\
+ --sparse --only-verify-crc --quiet\
+ --rsh-command= --help\
+ --version' -- $cur ) )
+ fi
+ ;;
+ -@(p|-pass-through))
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-0 -a -d -l -m -u -v\
+ -L -V -R --null --reset-access-time\
+ --make-directories --link --quiet\
+ --preserve-modification-time\
+ --unconditional --verbose --dot\
+ --dereference --owner=\
+ --no-preserve-owner --sparse --help\
+ --version' -- $cur ) )
+ else
+ _filedir -d
+ fi
+ ;;
+ esac
+ fi
+}
+complete -F _cpio cpio
+}
+
+# id(1) completion
+#
+have id &&
+_id()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-a -g --group -G --groups -n --name\
+ -r --real -u --user --help --version' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -u $cur ) )
+ fi
+} &&
+complete -F _id id
+
+# getent(1) completion
+#
+have getent &&
+_getent()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ passwd)
+ COMPREPLY=( $( compgen -u $cur ) )
+ return 0
+ ;;
+ group)
+ COMPREPLY=( $( compgen -g $cur ) )
+ return 0
+ ;;
+ services)
+ COMPREPLY=( $( compgen -s $cur ) )
+ return 0
+ ;;
+ hosts)
+ COMPREPLY=( $( compgen -A hostname $cur ) )
+ return 0
+ ;;
+ protocols)
+ COMPREPLY=( $( getent protocols | awk '{print $1}' | grep "^$cur" ) )
+ return 0
+ ;;
+ networks)
+ COMPREPLY=( $( getent networks | awk '{print $1}' | grep "^$cur" ) )
+ return 0
+ ;;
+ esac
+
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W 'passwd group hosts services protocols networks' -- $cur ) )
+ fi
+} &&
+complete -F _getent getent
+
+# ntpdate(1) completion
+#
+have ntpdate &&
+_ntpdate()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ -k)
+ _filedir
+ return 0
+ ;;
+ -U)
+ COMPREPLY=( $( compgen -u $cur ) )
+ return 0
+ ;;
+ esac
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-4 -6 -b -B -d -Q -q -s -u -v -a\
+ -e -k -p -o -r -t' -- $cur ) )
+ else
+ _known_hosts
+ fi
+} &&
+complete -F _ntpdate ntpdate
+
+# smartctl(8) completion
+#
+have smartctl && {
+_smartctl_quietmode()
+{
+ COMPREPLY=( $( compgen -W 'errorsonly silent' -- $cur ) )
+}
+_smartctl_device()
+{
+ COMPREPLY=( $( compgen -W 'ata scsi 3ware' -- $cur ) )
+}
+_smartctl_tolerance()
+{
+ COMPREPLY=( $( compgen -W 'warn exit ignore' -- $cur ) )
+}
+_smartctl_badsum()
+{
+ COMPREPLY=( $( compgen -W 'normal conservative permissive verypermissive' -- $cur ) )
+}
+_smartctl_report()
+{
+ COMPREPLY=( $( compgen -W 'ioctl ataioctl scsiioctl' -- $cur ) )
+}
+_smartctl_feature()
+{
+ COMPREPLY=( $( compgen -W 'on off' -- $cur ) )
+}
+_smartctl_log()
+{
+ COMPREPLY=( $( compgen -W 'error selftest selective directory' -- $cur ) )
+}
+_smartctl_vendorattribute()
+{
+ COMPREPLY=( $( compgen -W 'help 9,minutes 9,seconds 9,halfminutes \
+ 9,temp 192,emergencyretractcyclect 193,loadunload \
+ 194,10xCelsius 194,unknown 198,offlinescanuncsectorct \
+ 200,writeerrorcount 201,detectedtacount 220,temp' -- $cur ) )
+}
+_smartctl_firmwarebug()
+{
+ COMPREPLY=( $( compgen -W 'none samsung samsung2' -- $cur ) )
+}
+_smartctl_presets()
+{
+ COMPREPLY=( $( compgen -W 'use ignore show showall' -- $cur ) )
+}
+_smartctl_test()
+{
+ COMPREPLY=( $( compgen -W 'offline short long conveyance select afterselect,on afterselect,off pending' -- $cur ) )
+}
+
+_smartctl()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # --name value style option
+ case "$prev" in
+ -q)
+ _smartctl_quietmode
+ ;;
+ -d)
+ _smartctl_device
+ return 0
+ ;;
+ -t)
+ _smartctl_tolerance
+ return 0
+ ;;
+ -b)
+ _smartctl_badsum
+ return 0
+ ;;
+ -r)
+ _smartctl_report
+ return 0
+ ;;
+ -s)
+ _smartctl_feature
+ return 0
+ ;;
+ -o)
+ _smartctl_feature
+ return 0
+ ;;
+ -S)
+ _smartctl_feature
+ return 0
+ ;;
+ -l)
+ _smartctl_log
+ return 0
+ ;;
+ -v)
+ _smartctl_vendorattribute
+ return 0
+ ;;
+ -F)
+ _smartctl_firmwarebug
+ return 0
+ ;;
+ -P)
+ _smartctl_presets
+ return 0
+ ;;
+ -t)
+ _smartctl_test
+ return 0
+ ;;
+ esac
+
+ # --name=value style option
+ if [[ "$cur" == *=* ]]; then
+ prev=${cur/=*/}
+ cur=${cur/*=/}
+ case "$prev" in
+ --quietmode)
+ _smartctl_quietmode
+ return 0
+ ;;
+ --device)
+ _smartctl_device
+ return 0
+ ;;
+ --tolerance)
+ _smartctl_tolerance
+ return 0
+ ;;
+ --badsum)
+ _smartctl_badsum
+ return 0
+ ;;
+ --report)
+ _smartctl_report
+ return 0
+ ;;
+ --smart)
+ _smartctl_feature
+ return 0
+ ;;
+ --offlineauto)
+ _smartctl_feature
+ return 0
+ ;;
+ --saveauto)
+ _smartctl_feature
+ return 0
+ ;;
+ --log)
+ _smartctl_log
+ return 0
+ ;;
+ --vendorattribute)
+ _smartctl_vendorattribute
+ return 0
+ ;;
+ --firmwarebug)
+ _smartctl_firmwarebug
+ return 0
+ ;;
+ --presets)
+ _smartctl_presets
+ return 0
+ ;;
+ --test)
+ _smartctl_test
+ return 0
+ ;;
+ esac
+ fi
+
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-h --help --usage -V --version \
+ --copyright --license-i --info -a --all -q \
+ --quietmode= -d --device= -T --tolerance= -b --badsum= \
+ -r --report= -s --smart= -o --offlineauto= -S \
+ --saveauto= -H --health -c --capabilities -A \
+ --attributes -l --log= -v --vendorattribute= -F \
+ --firmwarebug= -P --presets= -t --test= -C \
+ --captive -X --abort' -- $cur ) )
+ else
+ cur=${cur:=/dev/}
+ _filedir
+ fi
+}
+complete -F _smartctl smartctl
+}
+
+# vncviewer(1) completion
+#
+have vncviewer &&
+_vncviewer()
+{
+ local cur prev
+ local -a config
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -via)
+ _known_hosts -a
+ ;;
+ *)
+ # ssh into the the server, find and ping the broadcast address, then
+ # sort and show the results.
+ COMPREPLY=( $( ssh -o 'Batchmode yes' $prev \
+ "ping -bnc 4 255.255.255.255" 2>/dev/null | \
+ awk -F ' ' '{print $4}' | \
+ sort -n | uniq | egrep '[0-9]+\.[0-9]+\.' 2>/dev/null ) )
+ esac
+
+ return 0
+} &&
+complete -F _vncviewer vncviewer
+
+# sysctl(8) completion
+#
+have sysctl &&
+_sysctl()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ COMPREPLY=( $( compgen -W "$(sysctl -N -a 2>/dev/null)" -- $cur ) )
+
+ return 0
+} &&
+complete -F _sysctl sysctl
+
+# update-rc.d(8) completion
+#
+# Copyright (C) 2004 Servilio Afre Puentes <servilio@gmail.com>
+#
+have update-rc.d &&
+_update_rc_d()
+{
+ local cur prev sysvdir services options valid_options
+
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d \
+ || sysvdir=/etc/init.d
+
+ services=( $(echo $sysvdir/!(README*|*.sh|*.dpkg*|*.rpm*)) )
+ services=( ${services[@]#$sysvdir/} )
+ options=( -f -n )
+
+ if [[ $COMP_CWORD -eq 1 || "$prev" == -* ]]; then
+ valid_options=( $( \
+ echo "${COMP_WORDS[@]} ${options[@]}" \
+ | tr " " "\n" \
+ | sed -ne "/$( echo "${options[@]}" | sed "s/ /\\|/g" )/p" \
+ | sort | uniq -u \
+ ) )
+ COMPREPLY=( $( compgen -W '${options[@]} ${services[@]}' \
+ -X '$( echo ${COMP_WORDS[@]} | tr " " "|" )' -- $cur ) )
+ elif [[ "$prev" == ?($( echo ${services[@]} | tr " " "|" )) ]]; then
+ COMPREPLY=( $( compgen -W 'remove defaults start stop' -- $cur ) )
+ elif [[ "$prev" == defaults && "$cur" == [0-9] ]]; then
+ COMPREPLY=( 0 1 2 3 4 5 6 7 8 9 )
+ elif [[ "$prev" == defaults && "$cur" == [sk]?([0-9]) ]]; then
+ COMPREPLY=( 0 1 2 3 4 5 6 7 8 9 )
+ elif [[ "$prev" == defaults && -z "$cur" ]]; then
+ COMPREPLY=( 0 1 2 3 4 5 6 7 8 9 s k )
+ elif [[ "$prev" == ?(start|stop) ]]; then
+ if [[ "$cur" == [0-9] || -z "$cur" ]]; then
+ COMPREPLY=( 0 1 2 3 4 5 6 7 8 9 )
+ elif [[ "$cur" == [0-9][0-9] ]]; then
+ COMPREPLY=( $cur )
+ else
+ COMPREPLY=()
+ fi
+ elif [[ "$prev" == ?([0-9][0-9]|[0-6S]) ]]; then
+ if [[ -z "$cur" ]]; then
+ if [[ $prev == [0-9][0-9] ]]; then
+ COMPREPLY=( 0 1 2 3 4 5 6 S )
+ else
+ COMPREPLY=( 0 1 2 3 4 5 6 S . )
+ fi
+ elif [[ "$cur" == [0-6S.] ]]; then
+ COMPREPLY=( $cur )
+ else
+ COMPREPLY=()
+ fi
+ elif [[ "$prev" == "." ]]; then
+ COMPREPLY=( $(compgen -W "start stop" -- $cur) )
+ else
+ COMPREPLY=()
+ fi
+
+ return 0
+} &&
+complete -F _update_rc_d update-rc.d
+
+# invoke-rc.d(8) completion
+#
+# Copyright (C) 2004 Servilio Afre Puentes <servilio@gmail.com>
+#
+have invoke-rc.d &&
+_invoke_rc_d()
+{
+ local cur prev sysvdir services options valid_options
+
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ [ -d /etc/rc.d/init.d ] && sysvdir=/etc/rc.d/init.d \
+ || sysvdir=/etc/init.d
+
+ services=( $(echo $sysvdir/!(README*|*.sh|*.dpkg*|*.rpm*)) )
+ services=( ${services[@]#$sysvdir/} )
+ options=( --help --quiet --force --try-anyway --disclose-deny --query --no-fallback )
+
+ if [[ ($COMP_CWORD -eq 1) || ("$prev" == --* ) ]]; then
+ valid_options=( $( \
+ echo ${COMP_WORDS[@]} ${options[@]} \
+ | tr " " "\n" \
+ | sed -ne "/$( echo ${options[@]} | sed "s/ /\\\\|/g" )/p" \
+ | sort | uniq -u \
+ ) )
+ COMPREPLY=( $( compgen -W '${valid_options[@]} ${services[@]}' -- \
+ $cur ) )
+ elif [ -x $sysvdir/$prev ]; then
+ COMPREPLY=( $( compgen -W '`sed -ne "y/|/ /; \
+ s/^.*Usage:[ ]*[^ ]*[ ]*{*\([^}\"]*\).*$/\1/p" \
+ $sysvdir/$prev`' -- \
+ $cur ) )
+ else
+ COMPREPLY=()
+ fi
+
+ return 0
+} &&
+complete -F _invoke_rc_d invoke-rc.d
+
+# minicom(1) completion
+#
+have minicom &&
+_minicom()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=`_get_cword`
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case $prev in
+ -@(a|c))
+ COMPREPLY=( $( compgen -W 'on off' -- $cur ) )
+ return 0
+ ;;
+ -@(S|C))
+ _filedir
+ return 0
+ ;;
+ -P)
+ COMPREPLY=( $( command ls /dev/tty* ) )
+ COMPREPLY=( $( compgen -W '${COMPREPLY[@]} ${COMPREPLY[@]#/dev/}' -- $cur ) )
+ return 0
+ ;;
+ esac
+
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '-s -o -m -M -z -l -L -w -a -t \
+ -c -S -d -p -C -T -8' -- $cur ) )
+ else
+ COMPREPLY=( $( command ls /etc/minicom/minirc.* 2>/dev/null | sed -e 's|/etc/minicom/minirc.||' | grep "^$cur" ) )
+ fi
+} &&
+complete -F _minicom minicom
+
+# svn completion
+#
+have svn &&
+{
+_svn()
+{
+ local cur prev commands options command
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ commands='add blame praise annotate ann cat checkout co cleanup commit \
+ ci copy cp delete del remove rm diff di export help ? h import \
+ info list ls lock log merge mkdir move mv rename ren \
+ propdel pdel pd propedit pedit pe propget pget pg \
+ proplist plist pl propset pset ps resolved revert \
+ status stat st switch sw unlock update up'
+
+ if [[ $COMP_CWORD -eq 1 ]] ; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--version' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
+ fi
+ else
+
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ case $prev in
+ --config-dir)
+ _filedir -d
+ return 0;
+ ;;
+ -@(F|-file|-targets))
+ _filedir
+ return 0;
+ ;;
+ --encoding)
+ COMPREPLY=( $( compgen -W \
+ '$( iconv --list | sed -e "s@//@@;" )' \
+ -- "$cur" ) )
+ return 0;
+ ;;
+ --@(editor|diff|diff3)-cmd)
+ COMP_WORDS=(COMP_WORDS[0] $cur)
+ COMP_CWORD=1
+ _command
+ return 0;
+ ;;
+ esac
+
+ command=${COMP_WORDS[1]}
+
+ if [[ "$cur" == -* ]]; then
+ # possible options for the command
+ case $command in
+ add)
+ options='--auto-props --no-auto-props \
+ --force --targets --no-ignore \
+ --non-recursive -N -q --quiet'
+ ;;
+ @(blame|annotate|ann|praise))
+ options='-r --revisions --username \
+ --password --no-auth-cache \
+ --non-interactive -v \
+ --verbose --incremental --xml'
+ ;;
+ cat)
+ options='-r --revision --username \
+ --password --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(checkout|co))
+ options='-r --revision -q --quiet -N \
+ --non-recursive --username \
+ --password --no-auth-cache \
+ --non-interactive \
+ --ignore-externals'
+ ;;
+ cleanup)
+ options='--diff3-cmd'
+ ;;
+ @(commit|ci))
+ options='-m --message -F --file \
+ --encoding --force-log -q \
+ --quiet --non-recursive -N \
+ --targets --editor-cmd \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive --no-unlock'
+ ;;
+ @(copy|cp))
+ options='-m --message -F --file \
+ --encoding --force-log -r \
+ --revision -q --quiet \
+ --editor-cmd -username \
+ --password --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(delete|del|remove|rm))
+ options='--force -m --message -F \
+ --file --encoding --force-log \
+ -q --quiet --targets \
+ --editor-cmd -username \
+ --password --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(diff|di))
+ options='-r --revision -x --extensions \
+ --diff-cmd --no-diff-deleted \
+ -N --non-recursive --username \
+ --password --no-auth-cache \
+ --non-interactive --force \
+ --old --new --notice-ancestry'
+ ;;
+ export)
+ options='-r --revision -q --quiet \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive -N \
+ --non-recursive --force \
+ --native-eol --ignore-externals'
+ ;;
+ import)
+ options='--auto-props --no-auto-props \
+ -m --message -F --file \
+ --encoding --force-log -q \
+ --quiet --non-recursive \
+ --no-ignore --editor-cmd \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive'
+ ;;
+ info)
+ options='--username --password \
+ --no-auth-cache \
+ --non-interactive -r \
+ --revision --xml --targets \
+ -R --recursive --incremental'
+ ;;
+ @(list|ls))
+ options='-r --revision -v --verbose -R \
+ --recursive --username \
+ --password --no-auth-cache \
+ --non-interactive \
+ --incremental --xml'
+ ;;
+ lock)
+ options='-m --message -F --file \
+ --encoding --force-log \
+ --targets --force --username \
+ --password --no-auth-cache \
+ --non-interactive'
+ ;;
+ log)
+ options='-r --revision -v --verbose \
+ --targets --username \
+ --password --no-auth-cache \
+ --non-interactive \
+ --stop-on-copy --incremental \
+ --xml -q --quiet --limit'
+ ;;
+ merge)
+ options='-r --revision -N \
+ --non-recursive -q --quiet \
+ --force --dry-run --diff3-cmd \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive \
+ --ignore-ancestry'
+ ;;
+ mkdir)
+ options='-m --message -F --file \
+ --encoding --force-log -q \
+ --quiet --editor-cmd \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(move|mv|rename|ren))
+ options='-m --message -F --file \
+ --encoding --force-log -r \
+ --revision -q --quiet \
+ --force --editor-cmd \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(propdel|pdel|pd))
+ options='-q --quiet -R --recursive -r \
+ --revision --revprop \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(propedit|pedit|pe))
+ options='-r --revision --revprop \
+ --encoding --editor-cmd \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive --force'
+ ;;
+ @(propget|pget|pg))
+ options='-R --recursive -r --revision \
+ --revprop --strict --username \
+ --password --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(proplist|plist|pl))
+ options='-v --verbose -R --recursive \
+ -r --revision --revprop -q \
+ --quiet --username --password \
+ --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(propset|pset|ps))
+ options='-F --file -q --quiet \
+ --targets -R --recursive \
+ --revprop --encoding \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive -r \
+ --revision --force'
+ ;;
+ resolved)
+ options='--targets -R --recursive -q \
+ --quiet'
+ ;;
+ revert)
+ options='--targets -R --recursive -q \
+ --quiet'
+ ;;
+ @(status|stat|st))
+ options='-u --show-updates -v \
+ --verbose -N --non-recursive \
+ -q --quiet --username \
+ --password --no-auth-cache \
+ --non-interactive --no-ignore \
+ --ignore-externals \
+ --incremental --xml'
+ ;;
+ @(switch|sw))
+ options='--relocate -r --revision -N \
+ --non-recursive -q --quiet \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive --diff3-cmd'
+ ;;
+ unlock)
+ options='--targets --force --username \
+ --password --no-auth-cache \
+ --non-interactive'
+ ;;
+ @(update|up))
+ options='-r --revision -N \
+ --non-recursive -q --quiet \
+ --username --password \
+ --no-auth-cache \
+ --non-interactive \
+ --diff3-cmd --ignore-externals'
+ ;;
+ esac
+ options="$options --help -h --config-dir"
+
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ else
+ if [[ "$command" == @(help|h|\?) ]]; then
+ COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
+ else
+ _filedir
+ fi
+ fi
+ fi
+
+ return 0
+}
+complete -F _svn $default svn
+
+_svnadmin()
+{
+ local cur prev commands options mode
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ commands='create deltify dump help ? hotcopy list-dblogs \
+ list-unused-dblogs load lslocks lstxns recover rmlocks \
+ rmtxns setlog verify'
+
+ if [[ $COMP_CWORD -eq 1 ]] ; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--version' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
+ fi
+ else
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+ case $prev in
+ --config-dir)
+ _filedir -d
+ return 0;
+ ;;
+ --fs-type)
+ COMPREPLY=( $( compgen -W 'fsfs bdb' -- $cur ) )
+ return 0;
+ ;;
+ esac
+
+ command=${COMP_WORDS[1]}
+
+ if [[ "$cur" == -* ]]; then
+ # possible options for the command
+ case $command in
+ create)
+ options='--bdb-txn-nosync \
+ --bdb-log-keep --config-dir \
+ --fs-type'
+ ;;
+ deltify)
+ options='-r --revision -q --quiet'
+ ;;
+ dump)
+ options='-r --revision --incremental \
+ -q --quiet --deltas'
+ ;;
+ hotcopy)
+ options='--clean-logs'
+ ;;
+ load)
+ options='--ignore-uuid --force-uuid \
+ --parent-dir -q --quiet \
+ --use-pre-commit-hook \
+ --use-post-commit-hook'
+ ;;
+ rmtxns)
+ options='-q --quiet'
+ ;;
+ setlog)
+ options='-r --revision --bypass-hooks'
+ ;;
+ esac
+
+ options="$options --help -h"
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ else
+ if [[ "$command" == @(help|h|\?) ]]; then
+ COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
+ else
+ _filedir
+ fi
+ fi
+ fi
+
+ return 0
+}
+complete -F _svnadmin $default svnadmin
+
+_svnlook()
+{
+ local cur prev commands options mode
+
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ commands='author cat changed date diff dirs-changed help ? h history \
+ info lock log propget pget pg proplist plist pl tree uuid \
+ youngest'
+
+ if [[ $COMP_CWORD -eq 1 ]] ; then
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--version' -- $cur ) )
+ else
+ COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
+ fi
+ else
+ command=${COMP_WORDS[1]}
+
+ if [[ "$cur" == -* ]]; then
+ # possible options for the command
+ case $command in
+ @(author|cat|date|dirs-changed|info|log))
+ options='-r --revision -t \
+ --transaction'
+ ;;
+ changed)
+ options='-r --revision -t \
+ --transaction --copy-info'
+ ;;
+ diff)
+ options='-r --revision -t \
+ --transaction \
+ --no-diff-deleted \
+ --no-diff-added \
+ --diff-copy-from'
+ ;;
+ history)
+ options='-r --revision --show-ids'
+ ;;
+ prop@(get|list))
+ options='-r --revision -t \
+ --transaction --revprop'
+ ;;
+ tree)
+ options='-r --revision -t \
+ --transaction --show-ids \
+ --full-paths'
+ ;;
+ esac
+
+ options="$options --help -h"
+ COMPREPLY=( $( compgen -W "$options" -- $cur ) )
+ else
+ if [[ "$command" == @(help|h|\?) ]]; then
+ COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
+ else
+ _filedir
+ fi
+ fi
+ fi
+
+ return 0
+}
+complete -F _svnlook $default svnlook
+}
+
+_filedir_xspec()
+{
+ local IFS cur xspec
+
+ IFS=$'\t\n'
+ COMPREPLY=()
+ cur=`_get_cword`
+
+ _expand || return 0
+
+ # get first exclusion compspec that matches this command
+ xspec=$( sed -ne $'/^complete .*[ \t]'${1##*/}$'\([ \t]\|$\)/{p;q;}' \
+ $BASH_COMPLETION )
+ # prune to leave nothing but the -X spec
+ xspec=${xspec#*-X }
+ xspec=${xspec%% *}
+
+ local toks=( ) tmp
+
+ while read -r tmp; do
+ [[ -n $tmp ]] && toks[${#toks[@]}]=$tmp
+ done < <( compgen -d -- "$(quote_readline "$cur")" )
+
+ while read -r tmp; do
+ [[ -n $tmp ]] && toks[${#toks[@]}]=$tmp
+ done < <( eval compgen -f -X $xspec -- "\$(quote_readline "\$cur")" )
+
+ COMPREPLY=( "${toks[@]}" )
+}
+list=( $( sed -ne '/^# START exclude/,/^# FINISH exclude/p' \
+ $BASH_COMPLETION | \
+ # read exclusion compspecs
+ (
+ while read line
+ do
+ # ignore compspecs that are commented out
+ if [ "${line#\#}" != "$line" ]; then continue; fi
+ line=${line%# START exclude*}
+ line=${line%# FINISH exclude*}
+ line=${line##*\'}
+ list=( "${list[@]}" $line )
+ done
+ echo "${list[@]}"
+ )
+ ) )
+# remove previous compspecs
+if [ ${#list[@]} -gt 0 ]; then
+ eval complete -r ${list[@]}
+ # install new compspecs
+ eval complete -F _filedir_xspec $filenames "${list[@]}"
+fi
+unset list
+
+# source completion directory definitions
+if [ -d $BASH_COMPLETION_DIR -a -r $BASH_COMPLETION_DIR -a \
+ -x $BASH_COMPLETION_DIR ]; then
+ for i in $BASH_COMPLETION_DIR/*; do
+ [[ ${i##*/} != @(*~|*.bak|*.swp|\#*\#|*.dpkg*|.rpm*) ]] &&
+ [ \( -f $i -o -h $i \) -a -r $i ] && . $i
+ done
+fi
+unset i
+
+# source user completion file
+[ $BASH_COMPLETION != ~/.bash_completion -a -r ~/.bash_completion ] \
+ && . ~/.bash_completion
+unset -f have
+unset UNAME RELEASE default dirnames filenames have nospace bashdefault \
+ plusdirs
+
+set $BASH_COMPLETION_ORIGINAL_V_VALUE
+unset BASH_COMPLETION_ORIGINAL_V_VALUE
+
+### Local Variables:
+### mode: shell-script
+### End:
diff --git a/examples/complete/bashcc-1.0.1.tar.gz b/examples/complete/bashcc-1.0.1.tar.gz
new file mode 100644
index 0000000..d680435
--- /dev/null
+++ b/examples/complete/bashcc-1.0.1.tar.gz
Binary files differ
diff --git a/examples/complete/complete-examples b/examples/complete/complete-examples
new file mode 100644
index 0000000..baa97e3
--- /dev/null
+++ b/examples/complete/complete-examples
@@ -0,0 +1,495 @@
+#
+# Completion examples
+#
+
+#
+# This encapsulates the default bash completion code
+# call with the word to be completed as $1
+#
+# Since programmable completion does not use the bash default completions
+# or the readline default of filename completion when the compspec does
+# not generate any matches, this may be used as a `last resort' in a
+# completion function to mimic the default bash completion behavior.
+#
+_bash_def_completion ()
+{
+ local h t
+ COMPREPLY=()
+
+ # command substitution
+ if [[ "$1" == \$\(* ]]; then
+ t=${1#??}
+ COMPREPLY=( $(compgen -c -P '$(' $t) )
+ fi
+ # variables with a leading `${'
+ if [ ${#COMPREPLY[@]} -eq 0 ] && [[ "$1" == \$\{* ]]; then
+ t=${1#??}
+ COMPREPLY=( $(compgen -v -P '${' -S '}' $t) )
+ fi
+ # variables with a leading `$'
+ if [ ${#COMPREPLY[@]} -eq 0 ] && [[ "$1" == \$* ]]; then
+ t=${1#?}
+ COMPREPLY=( $(compgen -v -P '$' $t ) )
+ fi
+ # username expansion
+ if [ ${#COMPREPLY[@]} -eq 0 ] && [[ "$1" == ~* ]] && [[ "$1" != */* ]]; then
+ t=${1#?}
+ COMPREPLY=( $( compgen -u -P '~' $t ) )
+ fi
+ # hostname
+ if [ ${#COMPREPLY[@]} -eq 0 ] && [[ "$1" == *@* ]]; then
+ h=${1%%@*}
+ t=${1#*@}
+ COMPREPLY=( $( compgen -A hostname -P "${h}@" $t ) )
+ fi
+ # glob pattern
+ if [ ${#COMPREPLY[@]} -eq 0 ]; then
+ # sh-style glob pattern
+ if [[ $1 == *[*?[]* ]]; then
+ COMPREPLY=( $( compgen -G "$1" ) )
+ # ksh-style extended glob pattern - must be complete
+ elif shopt -q extglob && [[ $1 == *[?*+\!@]\(*\)* ]]; then
+ COMPREPLY=( $( compgen -G "$1" ) )
+ fi
+ fi
+
+ # final default is filename completion
+ if [ ${#COMPREPLY[@]} -eq 0 ]; then
+ COMPREPLY=( $(compgen -f "$1" ) )
+ fi
+}
+
+#
+# Return 1 if $1 appears to contain a redirection operator. Handles backslash
+# quoting (barely).
+#
+_redir_op()
+{
+ case "$1" in
+ *\\'[\<\>]'*) return 1;;
+ *[\<\>]*) return 0;;
+ *) return 1;;
+ esac
+}
+
+
+# _redir_test tests the current word ($1) and the previous word ($2) for
+# redirection operators and does filename completion on the current word
+# if either one contains a redirection operator
+_redir_test()
+{
+ if _redir_op "$1" ; then
+ COMPREPLY=( $( compgen -f "$1" ) )
+ return 0
+ elif _redir_op "$2" ; then
+ COMPREPLY=( $( compgen -f "$1" ) )
+ return 0
+ fi
+ return 1
+}
+
+# optional, but without this you can't use extended glob patterns
+shopt -s extglob
+
+#
+# Easy ones for the shell builtins
+#
+# nothing for: alias, break, continue, dirs, echo, eval, exit, getopts,
+# let, logout, popd, printf, pwd, return, shift, suspend, test, times,
+# umask
+#
+
+complete -f -- . source
+complete -A enabled builtin
+complete -d cd
+
+# this isn't exactly right yet -- needs to skip shell functions and
+# do $PATH lookup (or do compgen -c and filter out matches that also
+# appear in compgen -A function)
+complete -c command
+
+# could add -S '=', but that currently screws up because readline appends
+# a space unconditionally
+
+complete -v export local readonly
+complete -A helptopic help # currently same as builtins
+
+complete -d pushd
+
+complete -A shopt shopt
+
+complete -c type
+
+complete -a unalias
+complete -v unset
+
+#
+# Job control builtins: fg, bg, disown, kill, wait
+# kill not done yet
+#
+
+complete -A stopped -P '%' bg
+complete -j -P '%' fg jobs disown
+
+# this is not quite right at this point
+
+_wait_func ()
+{
+ local cur
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ case "$cur" in
+ %*) COMPREPLY=( $(compgen -A running -P '%' ${cur#?} ) ) ;;
+ [0-9]*) COMPREPLY=( $(jobs -p | grep ^${cur}) ) ;;
+ *) COMPREPLY=( $(compgen -A running -P '%') $(jobs -p) )
+ ;;
+ esac
+}
+complete -F _wait_func wait
+
+#
+# more complicated things, several as yet unimplemented
+#
+
+#complete -F _bind_func bind
+
+_declare_func()
+{
+ local cur prev nflag opts
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ COMPREPLY=()
+ if (( $COMP_CWORD <= 1 )) || [[ $cur == '-' ]]; then
+ COMPREPLY=(-a -f -F -i -p -r -t -x)
+ return 0;
+ fi
+ if [[ $cur == '+' ]]; then
+ COMPREPLY=(+i +t +x)
+ return 0;
+ fi
+ if [[ $prev == '-p' ]]; then
+ COMPREPLY=( $(compgen -v $cur) )
+ return 0;
+ fi
+ return 1
+}
+complete -F _declare_func declare typeset
+
+_enable_func()
+{
+ local cur prev nflag opts
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ COMPREPLY=()
+ if (( $COMP_CWORD <= 1 )) || [[ $cur == '-' ]]; then
+ COMPREPLY=(-a -d -f -n -p -s)
+ return 0;
+ fi
+ if [[ $prev == '-f' ]]; then
+ COMPREPLY=( $( compgen -f $cur ) )
+ return 0;
+ fi
+ for opts in "${COMP_WORDS[@]}" ; do
+ if [[ $opts == -*n* ]]; then nflag=1; fi
+ done
+
+ if [ -z "$nflag" ] ; then
+ COMPREPLY=( $( compgen -A enabled $cur ) )
+ else
+ COMPREPLY=( $( compgen -A disabled $cur ) )
+ fi
+ return 0;
+}
+complete -F _enable_func enable
+
+_exec_func()
+{
+ local cur prev
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if (( $COMP_CWORD <= 1 )) || [[ $cur == '-' ]]; then
+ COMPREPLY=(-a -c -l)
+ return 0;
+ fi
+ if [[ $prev != -*a* ]]; then
+ COMPREPLY=( $( compgen -c $cur ) )
+ return 0
+ fi
+ return 1;
+}
+complete -F _exec_func exec
+
+_fc_func()
+{
+ local cur prev
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if (( $COMP_CWORD <= 1 )) || [[ $cur == '-' ]]; then
+ COMPREPLY=(-e -n -l -r -s)
+ return 0;
+ fi
+ if [[ $prev == -*e ]]; then
+ COMPREPLY=( $(compgen -c $cur) )
+ return 0
+ fi
+ return 1
+}
+complete -F _fc_func fc
+
+_hash_func()
+{
+ local cur prev
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if (( $COMP_CWORD <= 1 )) || [[ $cur == '-' ]]; then
+ COMPREPLY=(-p -r -t)
+ return 0;
+ fi
+
+ if [[ $prev == '-p' ]]; then
+ COMPREPLY=( $( compgen -f $cur ) )
+ return 0;
+ fi
+ COMPREPLY=( $( compgen -c $cur ) )
+ return 0
+}
+complete -F _hash_func hash
+
+_history_func()
+{
+ local cur prev
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ COMPREPLY=()
+ if (( $COMP_CWORD <= 1 )) || [[ $cur == '-' ]]; then
+ COMPREPLY=(-a -c -d -n -r -w -p -s)
+ return 0;
+ fi
+ if [[ $prev == -[anrw] ]]; then
+ COMPREPLY=( $( compgen -f $cur ) )
+ fi
+ return 0
+}
+complete -F _history_func history
+
+#complete -F _read_func read
+
+_set_func ()
+{
+ local cur prev
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ COMPREPLY=()
+
+ _redir_test "$cur" "$prev" && return 0;
+
+ if (( $COMP_CWORD <= 1 )) || [[ $cur == '-' ]]; then
+ COMPREPLY=(-a -b -e -f -k -m -n -o -p -t -u -v -x -B -C -H -P --)
+ return 0;
+ fi
+ if [[ $cur == '+' ]]; then
+ COMPREPLY=(+a +b +e +f +k +m +n +o +p +t +u +v +x +B +C +H +P)
+ return 0;
+ fi
+ if [[ $prev == [+-]o ]]; then
+ COMPREPLY=( $(compgen -A setopt $cur) )
+ return 0;
+ fi
+ return 1;
+}
+complete -F _set_func set
+
+_trap_func ()
+{
+ local cur
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if (( $COMP_CWORD <= 1 )) || [[ $cur == '-' ]]; then
+ COMPREPLY=(-l -p)
+ return 0;
+ fi
+ COMPREPLY=( $( compgen -A signal ${cur}) )
+ return 0
+}
+complete -F _trap_func trap
+
+#
+# meta-completion (completion for complete/compgen)
+#
+_complete_meta_func()
+{
+ local cur prev cmd
+ COMPREPLY=()
+
+ cmd=$1
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ _redir_test "$cur" "$prev" && return 0;
+
+ if (( $COMP_CWORD <= 1 )) || [[ "$cur" == '-' ]]; then
+ case "$cmd" in
+ complete) COMPREPLY=(-a -b -c -d -e -f -j -k -s -v -u -r -p -A -G -W -P -S -X -F -C);;
+ compgen) COMPREPLY=(-a -b -c -d -e -f -j -k -s -v -u -A -G -W -P -S -X -F -C);;
+ esac
+ return 0
+ fi
+
+ if [[ $prev == -A ]]; then
+ COMPREPLY=(alias arrayvar binding builtin command directory \
+disabled enabled export file 'function' helptopic hostname job keyword \
+running service setopt shopt signal stopped variable)
+ return 0
+ elif [[ $prev == -F ]]; then
+ COMPREPLY=( $( compgen -A function $cur ) )
+ elif [[ $prev == -C ]]; then
+ COMPREPLY=( $( compgen -c $cur ) )
+ else
+ COMPREPLY=( $( compgen -c $cur ) )
+ fi
+ return 0
+}
+complete -F _complete_meta_func complete compgen
+
+#
+# some completions for shell reserved words
+#
+#complete -c -k time do if then else elif '{'
+
+#
+# external commands
+#
+
+complete -e printenv
+
+complete -c nohup exec nice eval trace truss strace sotruss gdb
+
+_make_targets ()
+{
+ local mdef makef gcmd cur prev i
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # if prev argument is -f, return possible filename completions.
+ # we could be a little smarter here and return matches against
+ # `makefile Makefile *.mk', whatever exists
+ case "$prev" in
+ -*f) COMPREPLY=( $(compgen -f $cur ) ); return 0;;
+ esac
+
+ # if we want an option, return the possible posix options
+ case "$cur" in
+ -) COMPREPLY=(-e -f -i -k -n -p -q -r -S -s -t); return 0;;
+ esac
+
+ # make reads `makefile' before `Makefile'
+ # GNU make reads `GNUmakefile' before all other makefiles, but we
+ # check that we're completing `gmake' before checking for it
+ if [ -f GNUmakefile ] && [ ${COMP_WORDS[0]} == gmake ]; then
+ mdef=GNUmakefile
+ elif [ -f makefile ]; then
+ mdef=makefile
+ elif [ -f Makefile ]; then
+ mdef=Makefile
+ else
+ mdef=*.mk # local convention
+ fi
+
+ # before we scan for targets, see if a makefile name was specified
+ # with -f
+ for (( i=0; i < ${#COMP_WORDS[@]}; i++ )); do
+ if [[ ${COMP_WORDS[i]} == -*f ]]; then
+ eval makef=${COMP_WORDS[i+1]} # eval for tilde expansion
+ break
+ fi
+ done
+
+ [ -z "$makef" ] && makef=$mdef
+
+ # if we have a partial word to complete, restrict completions to
+ # matches of that word
+ if [ -n "$2" ]; then gcmd='grep "^$2"' ; else gcmd=cat ; fi
+
+ # if we don't want to use *.mk, we can take out the cat and use
+ # test -f $makef and input redirection
+ COMPREPLY=( $(cat $makef 2>/dev/null | awk 'BEGIN {FS=":"} /^[^.# ][^=]*:/ {print $1}' | tr -s ' ' '\012' | sort -u | eval $gcmd ) )
+}
+complete -F _make_targets -X '+($*|*.[cho])' make gmake pmake
+
+_umount_func ()
+{
+ COMPREPLY=( $(mount | awk '{print $1}') )
+}
+complete -F _umount_func umount
+
+_configure_func ()
+{
+ case "$2" in
+ -*) ;;
+ *) return ;;
+ esac
+
+ case "$1" in
+ \~*) eval cmd=$1 ;;
+ *) cmd="$1" ;;
+ esac
+
+ COMPREPLY=( $("$cmd" --help | awk '{if ($1 ~ /--.*/) print $1}' | grep ^"$2" | sort -u) )
+}
+complete -F _configure_func configure
+
+complete -W '"${GROUPS[@]}"' newgrp
+
+complete -f chown ln more cat
+complete -d mkdir rmdir
+complete -f strip
+
+complete -f -X '*.gz' gzip
+complete -f -X '*.bz2' bzip2
+complete -f -X '*.Z' compress
+complete -f -X '!*.+(gz|tgz|Gz)' gunzip gzcat zcat zmore
+complete -f -X '!*.Z' uncompress zmore zcat
+complete -f -X '!*.bz2' bunzip2 bzcat
+complete -f -X '!*.zip' unzip
+complete -f -X '!*.+(gif|jpg|jpeg|GIF|JPG|JPEG|bmp)' xv
+
+complete -f -X '!*.pl' perl perl5
+
+complete -A hostname rsh telnet rlogin ftp ping xping host traceroute nslookup
+complete -A hostname rxterm rxterm3 rxvt2
+
+complete -u su
+complete -g newgrp groupdel groupmod
+
+complete -f -X '!*.+(ps|PS)' gs gv ghostview psselect pswrap
+complete -f -X '!*.+(dvi|DVI)' dvips xdvi dviselect dvitype catdvi
+complete -f -X '!*.+(pdf|PDF)' acroread4
+complete -f -X '!*.texi*' makeinfo texi2dvi texi2html
+complete -f -X '!*.+(tex|TEX)' tex latex slitex
+
+complete -f -X '!*.+(mp3|MP3)' mpg123
+complete -f -X '!*.+(htm|html)' links w3m lynx
+
+#
+# other possibilities, left as exercises
+#
+#complete -F _find_func find
+#complete -F _man_func man
+#complete -F _stty_func stty
diff --git a/examples/complete/complete.freebsd b/examples/complete/complete.freebsd
new file mode 100644
index 0000000..7f6f4c2
--- /dev/null
+++ b/examples/complete/complete.freebsd
@@ -0,0 +1,31 @@
+#Date: Wed, 31 Jan 2001 12:53:56 -0800
+#From: Aaron Smith <aaron@mutex.org>
+#To: freebsd-ports@freebsd.org
+#Subject: useful bash completion function for pkg commands
+#Message-ID: <20010131125356.G52003@gelatinous.com>
+
+#hi all. i just wanted to share this bash completion function i wrote that
+#completes package names for pkg_info and pkg_delete. i find this a great
+#help when dealing with port management. programmed completion requires
+#bash-2.04.
+
+_pkg_func ()
+{
+ local cur
+
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ if [[ $cur == '-' ]]; then
+ if [[ ${COMP_WORDS[0]} == 'pkg_info' ]]; then
+ COMPREPLY=(-a -c -d -D -i -k -r -R -p -L -q -I -m -v -e -l)
+ return 0;
+ elif [[ ${COMP_WORDS[0]} == 'pkg_delete' ]]; then
+ COMPREPLY=(-v -D -d -n -f -p)
+ return 0;
+ fi
+ fi
+
+ COMPREPLY=( $(compgen -d /var/db/pkg/$cur | sed sN/var/db/pkg/NNg) )
+ return 0
+}
+complete -F _pkg_func pkg_delete pkg_info
diff --git a/examples/complete/complete.gnu-longopt b/examples/complete/complete.gnu-longopt
new file mode 100644
index 0000000..c55b436
--- /dev/null
+++ b/examples/complete/complete.gnu-longopt
@@ -0,0 +1,43 @@
+#
+# Originally from:
+#
+#Message-ID: <3B13EC65.179451AE@wanadoo.fr>
+#Date: Tue, 29 May 2001 20:37:25 +0200
+#From: Manu Rouat <emmanuel.rouat@wanadoo.fr>
+#Subject: [bash] Universal command options completion?
+#
+#
+#In the recent versions of bash (after 2.04) programmable
+#completion is available. A useful completion function
+#is , for a particular command, to enumerate all flags
+#that can be used in the command. Now, most GNU unix
+#commands have so-called 'long options' for example:
+#
+#ls --color=always --no-group --size
+#
+#and these are all listed when you issue a '--help' flag.
+#So the idea is to use that, then parse the output of the
+#'--help' and reinject this to compgen. The basis of the
+#following 'universal' completion funtion was the _configure_func'
+#written by Ian McDonnald (or is it Chet Ramey ?)
+#A dedicated function will always be better, but this is quite
+#convenient. I chose to use 'long options' because they are
+#easy to parse and explicit too (it's the point I guess...)
+#Lots of room for improvement !
+
+_longopt_func ()
+{
+ case "$2" in
+ -*) ;;
+ *) return ;;
+ esac
+
+ case "$1" in
+ \~*) eval cmd=$1 ;;
+ *) cmd="$1" ;;
+ esac
+ COMPREPLY=( $("$cmd" --help | sed -e '/--/!d' -e 's/.*--\([^ ]*\).*/--\1/'| \
+grep ^"$2" |sort -u) )
+}
+
+complete -o default -F _longopt_func ldd wget bash id info # some examples that work
diff --git a/examples/complete/complete.ianmac b/examples/complete/complete.ianmac
new file mode 100644
index 0000000..2af9fc7
--- /dev/null
+++ b/examples/complete/complete.ianmac
@@ -0,0 +1,433 @@
+#####
+#To: chet@po.cwru.edu, sarahmckenna@lucent.com
+#Message-Id: <slrn8mqioc.msb.ian@lovelorn.linuxcare.com>
+#Posted-To: comp.unix.shell, gnu.bash.bug
+#Subject: bash 2.04 programmable completion examples
+#Reply-To: ian@linuxcare.com, ian@caliban.org
+#Summary: examples of programmable completion for bash 2.04
+#Date: Thu, 13 Jul 2000 00:52:33 -0400 (EDT)
+#From: ianmacd@linuxcare.com (Ian Macdonald)
+#####
+
+#########################################################################
+# Turn on extended globbing
+shopt -s extglob
+
+# A lot of the following one-liners were taken directly from the
+# completion examples provided with the bash 2.04 source distribution
+
+# Make directory commands see only directories
+complete -d cd mkdir rmdir pushd
+
+# Make file commands see only files
+complete -f cat less more chown ln strip
+complete -f -X '*.gz' gzip
+complete -f -X '*.Z' compress
+complete -f -X '!*.+(Z|gz|tgz|Gz)' gunzip zcat zmore
+complete -f -X '!*.Z' uncompress zmore zcat
+complete -f -X '!*.+(gif|jpg|jpeg|GIF|JPG|bmp)' ee xv
+complete -f -X '!*.+(ps|PS|ps.gz)' gv
+complete -f -X '!*.+(dvi|DVI)' dvips xdvi dviselect dvitype
+complete -f -X '!*.+(pdf|PDF)' acroread xpdf
+complete -f -X '!*.texi*' makeinfo texi2dvi texi2html
+complete -f -X '!*.+(tex|TEX)' tex latex slitex
+complete -f -X '!*.+(mp3|MP3)' mpg123
+
+# kill sees only signals
+complete -A signal kill -P '%'
+
+# user commands see only users
+complete -u finger su usermod userdel passwd
+
+# bg completes with stopped jobs
+complete -A stopped -P '%' bg
+
+# other job commands
+complete -j -P '%' fg jobs disown
+
+# network commands complete with hostname
+complete -A hostname ssh rsh telnet rlogin ftp ping fping host traceroute \
+ nslookup
+
+# export and others complete with shell variables
+complete -v export local readonly unset
+
+# set completes with set options
+complete -A setopt set
+
+# shopt completes with shopt options
+complete -A shopt shopt
+
+# helptopics
+complete -A helptopic help
+
+# unalias completes with aliases
+complete -a unalias
+
+# various commands complete with commands
+complete -c command type nohup exec nice eval strace gdb
+
+# bind completes with readline bindings (make this more intelligent)
+complete -A binding bind
+
+# Now we get to the meat of the file, the functions themselves. Some
+# of these are works in progress. Most assume GNU versions of the
+# tools in question and may require modifications for use on vanilla
+# UNIX systems.
+#
+# A couple of functions may have non-portable, Linux specific code in
+# them, but this will be noted where applicable
+
+
+# GNU chown(1) completion. This should be expanded to allow the use of
+# ':' as well as '.' as the user.group separator.
+#
+_chown ()
+{
+ local cur prev user group
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # do not attempt completion if we're specifying an option
+ if [ "${cur:0:1}" = "-" ]; then return 0; fi
+
+ # first parameter on line or first since an option?
+ if [ $COMP_CWORD -eq 1 ] || [ "${prev:0:1}" = "-" ]; then
+ case "$cur" in
+ [a-zA-Z]*.*)
+ user=${cur%.*}
+ group=${cur#*.}
+ COMPREPLY=( $( awk 'BEGIN {FS=":"} \
+ {if ($1 ~ /^'$group'/) print $1}' \
+ /etc/group ) )
+ for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do
+ COMPREPLY[i]=$user.${COMPREPLY[i]}
+ done
+ return 0
+ ;;
+ *)
+ COMPREPLY=( $( compgen -u $cur -S '.' ) )
+ return 0
+ ;;
+ esac
+ else
+ COMPREPLY=( $( compgen -f $cur ) )
+ fi
+
+ return 0
+}
+complete -F _chown chown
+
+# umount(8) completion. This relies on the mount point being the third
+# space-delimited field in the output of mount(8)
+#
+_umount ()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ # could rewrite the cut | grep to be a sed command, but this is
+ # clearer and doesn't result in much overhead
+ COMPREPLY=( $( mount | cut -d' ' -f 3 | grep ^$cur) )
+ return 0
+}
+complete -F _umount umount
+
+# GID completion. This will get a list of all valid group names from
+# /etc/group and should work anywhere.
+#
+_gid_func ()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ COMPREPLY=( $( awk 'BEGIN {FS=":"} {if ($1 ~ /^'$cur'/) print $1}' \
+ /etc/group ) )
+ return 0
+}
+complete -F _gid_func groupdel groupmod
+
+# mount(8) completion. This will pull a list of possible mounts out of
+# /etc/fstab, unless the word being completed contains a ':', which
+# would indicate the specification of an NFS server. In that case, we
+# query the server for a list of all available exports and complete on
+# that instead.
+#
+_mount ()
+
+{ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ case "$cur" in
+ *:*)
+ COMPREPLY=( $( /usr/sbin/showmount -e --no-headers ${cur%%:*} |\
+ grep ^${cur#*:} | awk '{print $1}'))
+ return 0
+ ;;
+ *)
+ COMPREPLY=( $( awk '{if ($2 ~ /\//) print $2}' /etc/fstab | \
+ grep ^$cur ))
+ return 0
+ ;;
+ esac
+}
+complete -F _mount mount
+
+# Linux rmmod(1) completion. This completes on a list of all currently
+# installed kernel modules.
+#
+_rmmod ()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ COMPREPLY=($( lsmod | awk '{if (NR != 1 && $1 ~ /^'$cur'/) print $1}'))
+ return 0
+}
+complete -F _rmmod rmmod
+
+# Linux insmod(1) completion. This completes on a list of all
+# available modules for the version of the kernel currently running.
+#
+_insmod ()
+{
+ local cur modpath
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ modpath=/lib/modules/`uname -r`
+
+ COMPREPLY=($( ls -R $modpath | sed -ne 's/^\('$cur'.*\)\.o$/\1/p'))
+ return 0
+}
+complete -F _insmod insmod depmod modprobe
+
+# man(1) completion. This relies on the security enhanced version of
+# GNU locate(1). UNIX variants having non-numeric man page sections
+# other than l, m and n should add the appropriate sections to the
+# first clause of the case statement.
+#
+# This is Linux specific, in that 'man <section> <page>' is the
+# expected syntax. This allows one to do something like
+# 'man 3 str<tab>' to obtain a list of all string handling syscalls on
+# the system.
+#
+_man ()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ [0-9lmn])
+ COMPREPLY=($( slocate -ql 0 -r '/man/man'$prev'/'$cur | \
+ sed -ne 's/^.*\/\('$cur'[^.\/]*\)\..*$/\1/p' ))
+ return 0
+ ;;
+ *)
+ COMPREPLY=($( slocate -ql 0 -r '/man/man./'$cur | \
+ sed -ne 's/^.*\/\('$cur'[^.\/]*\)\..*$/\1/p' ))
+ return 0
+ ;;
+ esac
+}
+complete -F _man man
+
+# Linux killall(1) completion. This wouldn't be much use on, say,
+# Solaris, where killall does exactly that: kills ALL processes.
+#
+# This could be improved. For example, it currently doesn't take
+# command line options into account
+#
+_killall ()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -[A-Z0-9]*)
+ # get a list of processes (the first sed evaluation
+ # takes care of swapped out processes, the second
+ # takes care of getting the basename of the process)
+ COMPREPLY=( $( ps ahx | awk '{if ($5 ~ /^'$cur'/) print $5}' | \
+ sed -e 's#[]\[]##g' -e 's#^.*/##' ))
+ return 0
+ ;;
+ esac
+
+ # first parameter can be either a signal or a process
+ if [ $COMP_CWORD -eq 1 ]; then
+ # standard signal completion is rather braindead, so we need
+ # to hack around to get what we want here, which is to
+ # complete on a dash, followed by the signal name minus
+ # the SIG prefix
+ COMPREPLY=( $( compgen -A signal SIG${cur#-} ))
+ for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do
+ COMPREPLY[i]=-${COMPREPLY[i]#SIG}
+ done
+ fi
+
+ # get processes, adding to signals if applicable
+ COMPREPLY=( ${COMPREPLY[*]} $( ps ahx | \
+ awk '{if ($5 ~ /^'$cur'/) print $5}' | \
+ sed -e 's#[]\[]##g' -e 's#^.*/##' ))
+ return 0
+}
+complete -F _killall killall
+
+# GNU find(1) completion. This makes heavy use of ksh style extended
+# globs and contains Linux specific code for completing the parameter
+# to the -fstype option.
+#
+_find ()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]#-}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ case "$prev" in
+ -@(max|min)depth)
+ COMPREPLY=( $( compgen -W '0 1 2 3 4 5 6 7 8 9' ) )
+ return 0
+ ;;
+ -?(a)newer|-fls|-fprint?(0|f))
+ COMPREPLY=( $( compgen -f $cur ) )
+ return 0
+ ;;
+ -fstype)
+ # this is highly non-portable (the option to -d is a tab)
+ COMPREPLY=( $( cut -d' ' -f 2 /proc/filesystems | grep ^$cur ) )
+ return 0
+ ;;
+ -gid)
+ COMPREPLY=( $( awk 'BEGIN {FS=":"} \
+ {if ($3 ~ /^'$cur'/) print $3}' /etc/group ) )
+ return 0
+ ;;
+ -group)
+ COMPREPLY=( $( awk 'BEGIN {FS=":"} \
+ {if ($1 ~ /^'$cur'/) print $1}' /etc/group ) )
+ return 0
+ ;;
+ -?(x)type)
+ COMPREPLY=( $( compgen -W 'b c d p f l s' $cur ) )
+ return 0
+ ;;
+ -uid)
+ COMPREPLY=( $( awk 'BEGIN {FS=":"} \
+ {if ($3 ~ /^'$cur'/) print $3}' /etc/passwd ) )
+ return 0
+ ;;
+ -user)
+ COMPREPLY=( $( compgen -u $cur ) )
+ return 0
+ ;;
+ -[acm]min|-[acm]time|-?(i)?(l)name|-inum|-?(i)path|-?(i)regex| \
+ -links|-perm|-size|-used|-exec|-ok|-printf)
+ # do nothing, just wait for a parameter to be given
+ return 0
+ ;;
+ esac
+
+ # complete using basic options ($cur has had its dash removed here,
+ # as otherwise compgen will bomb out with an error, since it thinks
+ # the dash is an option to itself)
+ COMPREPLY=( $( compgen -W 'daystart depth follow help maxdepth \
+ mindepth mount noleaf version xdev amin anewer atime \
+ cmin cnewer ctime empty false fstype gid group ilname \
+ iname inum ipath iregex links lname mmin mtime name \
+ newer nouser nogroup perm regex size true type uid \
+ used user xtype exec fls fprint fprint0 fprintf ok \
+ print print0 printf prune ls' $cur ) )
+
+ # this removes any options from the list of completions that have
+ # already been specified somewhere on the command line.
+ COMPREPLY=( $( echo "${COMP_WORDS[@]}-" | \
+ (while read -d '-' i; do
+ [ "$i" == "" ] && continue
+ # flatten array with spaces on either side,
+ # otherwise we cannot grep on word boundaries of
+ # first and last word
+ COMPREPLY=" ${COMPREPLY[@]} "
+ # remove word from list of completions
+ COMPREPLY=( ${COMPREPLY/ ${i%% *} / } )
+ done
+ echo ${COMPREPLY[@]})
+ ) )
+
+ # put dashes back
+ for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do
+ COMPREPLY[i]=-${COMPREPLY[i]}
+ done
+
+ return 0
+}
+complete -F _find find
+
+# Linux ifconfig(8) completion
+#
+_ifconfig ()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ case "${COMP_WORDS[1]}" in
+ -|*[0-9]*)
+ COMPREPLY=( $( compgen -W '-a up down arp promisc allmulti \
+ metric mtu dstaddr netmask add del \
+ tunnel irq io_addr mem_start media \
+ broadcast pointopoint hw multicast \
+ address txqueuelen' $cur ))
+ COMPREPLY=( $( echo " ${COMP_WORDS[@]}" | \
+ (while read -d ' ' i; do
+ [ "$i" == "" ] && continue
+ # flatten array with spaces on either side,
+ # otherwise we cannot grep on word
+ # boundaries of first and last word
+ COMPREPLY=" ${COMPREPLY[@]} "
+ # remove word from list of completions
+ COMPREPLY=( ${COMPREPLY/ $i / } )
+ done
+ echo ${COMPREPLY[@]})
+ ) )
+ return 0
+ ;;
+ esac
+
+ COMPREPLY=( $( ifconfig -a | sed -ne 's/^\('$cur'[^ ]*\).*$/\1/p' ))
+}
+complete -F _ifconfig ifconfig
+
+# Linux ipsec(8) completion (for FreeS/WAN). Very basic.
+#
+_ipsec ()
+{
+ local cur
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+
+ COMPREPLY=( $( compgen -W 'auto barf eroute klipsdebug look manual \
+ pluto ranbits rsasigkey setup showdefaults \
+ showhostkey spi spigrp tncfg whack' $cur ))
+}
+complete -F _ipsec ipsec
+#########################################################################
diff --git a/examples/complete/complete2.ianmac b/examples/complete/complete2.ianmac
new file mode 100644
index 0000000..6fb0a96
--- /dev/null
+++ b/examples/complete/complete2.ianmac
@@ -0,0 +1,271 @@
+#####
+#From: ian@linuxcare.com (Ian Macdonald)
+#Newsgroups: comp.unix.shell
+#Subject: More bash 2.04 completions
+#Date: 12 Aug 2000 09:53:40 GMT
+#Organization: Linuxcare, Inc.
+#Lines: 274
+#Message-ID: <slrn8pa7l2.jgm.ian@lovelorn.linuxcare.com>
+#Reply-To: ian@linuxcare.com
+#####
+
+# Turn on extended globbing
+shopt -s extglob
+
+# cvs(1) completion
+#
+_cvs ()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [ $COMP_CWORD -eq 1 ] || [ "${prev:0:1}" = "-" ]; then
+ COMPREPLY=( $( compgen -W 'add admin checkout commit diff \
+ export history import log rdiff release remove rtag status \
+ tag update' $cur ))
+ else
+ COMPREPLY=( $( compgen -f $cur ))
+ fi
+ return 0
+}
+complete -F _cvs cvs
+
+# rpm(8) completion. This isn't exhaustive yet, but still provides
+# quite a lot of functionality.
+#
+_rpm()
+{
+ dashify()
+ {
+ local i
+
+ for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do
+ if [ ${#COMPREPLY[i]} -le 2 ]; then
+ COMPREPLY[i]=-${COMPREPLY[i]}
+ else
+ COMPREPLY[i]=--${COMPREPLY[i]}
+ fi
+ done
+ }
+
+ local cur cur_nodash prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ cur_nodash=${cur#-}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [ $COMP_CWORD = 1 ]; then
+ # first parameter on line
+ case "$cur" in
+ -b*)
+ COMPREPLY=( $( compgen -W 'ba bb bc bi bl bp bs' \
+ $cur_nodash ) )
+ dashify
+ return 0
+ ;;
+ -t*)
+ COMPREPLY=( $( compgen -W 'ta tb tc ti tl tp ts' \
+ $cur_nodash ) )
+ dashify
+ return 0
+ ;;
+ --*)
+ COMPREPLY=( $( compgen -W 'help version initdb \
+ checksig recompile rebuild resign addsign rebuilddb \
+ showrc setperms setgids' ${cur_nodash#-} ) )
+ dashify;
+ return 0
+ ;;
+ *)
+ COMPREPLY=( $( compgen -W 'b e F i q t U V' \
+ $cur_nodash ) )
+ dashify
+ return 0
+ ;;
+ esac
+ fi
+
+ case "${COMP_WORDS[1]}" in
+ -[iFU]*)
+ # complete on list of relevant options
+ COMPREPLY=( $( compgen -W 'percent force test replacepkgs \
+ replacefiles root excludedocs includedocs noscripts rcfile \
+ ignorearch dbpath prefix ignoreos nodeps allfiles ftpproxy \
+ ftpport justdb httpproxy httpport noorder relocate badreloc \
+ notriggers excludepath ignoresize oldpackage' ${cur_nodash#-} ))
+ dashify;
+ # return if $cur is an option
+ [ "${cur:0:1}" = "-" ] && return 0
+ # add a list of RPMS to possible completions
+ COMPREPLY=( ${COMPREPLY[@]} $( compgen -G $cur\*.rpm ) )
+ return 0
+ ;;
+ -qp*)
+ # complete on list of relevant options
+ COMPREPLY=( $( compgen -W 'scripts root rcfile whatprovides \
+ whatrequires requires triggeredby ftpport ftpproxy httpproxy \
+ httpport provides triggers dump changelog dbpath filesbypkg' \
+ ${cur_nodash#-} ) )
+ dashify;
+ # return if $cur is an option
+ [ "${cur:0:1}" = "-" ] && return 0
+ # add a list of RPMS to possible completions
+ COMPREPLY=( ${COMPREPLY[@]} $( compgen -G $cur\*.rpm ) )
+ return 0
+ ;;
+ -*f)
+ # standard filename completion
+ COMPREPLY=( $( compgen -f $cur ) )
+ return 0
+ ;;
+ -e)
+ # complete on list of relevant options
+ COMPREPLY=( $( compgen -W 'allmatches noscripts notriggers \
+ nodeps test' ${cur_nodash#-} ) )
+ dashify;
+ # return if $cur is an option
+ [ "${cur:0:1}" = "-" ] && return 0
+ # complete on basename of installed RPMs
+ COMPREPLY=( $( rpm -qa | \
+ sed -ne 's/^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9.]\+$/\1/p' ) )
+ return 0
+ ;;
+ -qa*)
+ # complete on list of relevant options
+ COMPREPLY=( $( compgen -W 'scripts root rcfile whatprovides \
+ whatrequires requires triggeredby ftpport ftpproxy httpproxy \
+ httpport provides triggers dump changelog dbpath specfile \
+ querybynumber last filesbypkg' ${cur_nodash#-} ) )
+ dashify;
+ return 0
+ ;;
+ -q*)
+ # complete on list of relevant options
+ COMPREPLY=( $( compgen -W 'scripts root rcfile whatprovides \
+ whatrequires requires triggeredby ftpport ftpproxy httpproxy \
+ httpport provides triggers dump changelog dbpath specfile \
+ querybynumber last filesbypkg' ${cur_nodash#-} ) )
+ dashify;
+ # return if $cur is an option
+ [ "${cur:0:1}" = "-" ] && return 0
+ # add a list of RPMS to possible completions
+ COMPREPLY=( ${COMPREPLY[@]} $( rpm -qa | \
+ sed -ne 's/^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9.]\+$/\1/p' ) )
+ return 0
+ ;;
+ -[Vy]*)
+ # complete on list of relevant options
+ COMPREPLY=( $( compgen -W 'root rcfile dbpath nodeps nofiles \
+ noscripts nomd5 nopgp' ${cur_nodash#-} ) )
+ dashify;
+ # return if $cur is an option
+ [ "${cur:0:1}" = "-" ] && return 0
+ # add a list of RPMS to possible completions
+ COMPREPLY=( ${COMPREPLY[@]} $( rpm -qa | \
+ sed -ne 's/^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9.]\+$/\1/p' ) )
+ return 0
+ ;;
+ -b*)
+ # complete on list of relevant options
+ COMPREPLY=( $( compgen -W 'short-circuit timecheck clean \
+ rmsource test sign buildroot target buildarch buildos' \
+ ${cur_nodash#-} ) )
+ dashify;
+ # return if $cur is an option
+ [ "${cur:0:1}" = "-" ] && return 0
+ # complete on .spec files
+ COMPREPLY=( $( compgen -G $cur\*.spec ) )
+ return 0
+ ;;
+ -t*)
+ # complete on list of relevant options
+ COMPREPLY=( $( compgen -W 'short-circuit timecheck clean \
+ rmsource test sign buildroot target buildarch buildos' \
+ ${cur_nodash#-} ) )
+ dashify;
+ # return if $cur is an option
+ [ "${cur:0:1}" = "-" ] && return 0
+ # complete on .tar.gz files
+ COMPREPLY=( $( compgen -G $cur\*.tar.gz ) )
+ return 0
+ ;;
+ --re@(build|compile))
+ # complete on source RPMs
+ COMPREPLY=( $( compgen -G $cur\*.src.rpm ) )
+ return 0
+ ;;
+ --@(checksig|@(re|add)sign))
+ # complete on RPMs
+ COMPREPLY=( $( compgen -G $cur\*.rpm ) )
+ return 0
+ ;;
+ --set@(perms|gids))
+ # complete on installed RPMs
+ COMPREPLY=( ${COMPREPLY[@]} $( rpm -qa | \
+ sed -ne 's/^\('$cur'.*\)-[0-9a-zA-Z._]\+-[0-9.]\+$/\1/p' ) )
+ return 0
+ ;;
+ esac
+}
+complete -F _rpm rpm
+
+# chsh(1) completion
+#
+_chsh()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [ "$prev" = "-s" ]; then
+ COMPREPLY=( $( chsh -l | grep ^$cur ) )
+ else
+ COMPREPLY=( $( compgen -u $cur ) )
+ fi
+}
+complete -F _chsh chsh
+
+# chkconfig(8) completion
+#
+_chkconfig()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ cur_nodash=${cur#--}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ if [ $COMP_CWORD -eq 1 ]; then
+ COMPREPLY=( $( compgen -W 'list add del level' $cur_nodash ) )
+ for (( i=0; i < ${#COMPREPLY[@]}; i++ )); do
+ COMPREPLY[i]=--${COMPREPLY[i]}
+ done
+ return 0
+ fi
+
+ if [ $COMP_CWORD -eq 4 ]; then
+ COMPREPLY=( $( compgen -W 'on off reset' $cur ) )
+ return 0
+ fi
+
+ case "$prev" in
+ @([1-6]|--@(list|add|del)))
+ COMPREPLY=( $( compgen -W "`(cd /etc/rc.d/init.d; echo *)`" \
+ $cur) )
+ return 0
+ ;;
+ --level)
+ COMPREPLY=( $( compgen -W '1 2 3 4 5 6' $cur ) )
+ return 0
+ ;;
+ esac
+}
+complete -F _chkconfig chkconfig
+###
diff --git a/examples/functions/array-stuff b/examples/functions/array-stuff
new file mode 100644
index 0000000..97ed512
--- /dev/null
+++ b/examples/functions/array-stuff
@@ -0,0 +1,103 @@
+# usage: reverse arrayname
+reverse()
+{
+ local -a R
+ local -i i
+ local rlen temp
+
+ # make r a copy of the array whose name is passed as an arg
+ eval R=\( \"\$\{$1\[@\]\}\" \)
+
+ # reverse R
+ rlen=${#R[@]}
+
+ for ((i=0; i < rlen/2; i++ ))
+ do
+ temp=${R[i]}
+ R[i]=${R[rlen-i-1]}
+ R[rlen-i-1]=$temp
+ done
+
+ # and assign R back to array whose name is passed as an arg
+ eval $1=\( \"\$\{R\[@\]\}\" \)
+}
+
+A=(1 2 3 4 5 6 7)
+echo "${A[@]}"
+reverse A
+echo "${A[@]}"
+reverse A
+echo "${A[@]}"
+
+# unset last element of A
+alen=${#A[@]}
+unset A[$alen-1]
+echo "${A[@]}"
+
+# ashift -- like shift, but for arrays
+
+ashift()
+{
+ local -a R
+ local n
+
+ case $# in
+ 1) n=1 ;;
+ 2) n=$2 ;;
+ *) echo "$FUNCNAME: usage: $FUNCNAME array [count]" >&2
+ exit 2;;
+ esac
+
+ # make r a copy of the array whose name is passed as an arg
+ eval R=\( \"\$\{$1\[@\]\}\" \)
+
+ # shift R
+ R=( "${R[@]:$n}" )
+
+ # and assign R back to array whose name is passed as an arg
+ eval $1=\( \"\$\{R\[@\]\}\" \)
+}
+
+ashift A 2
+echo "${A[@]}"
+
+ashift A
+echo "${A[@]}"
+
+ashift A 7
+echo "${A[@]}"
+
+# Sort the members of the array whose name is passed as the first non-option
+# arg. If -u is the first arg, remove duplicate array members.
+array_sort()
+{
+ local -a R
+ local u
+
+ case "$1" in
+ -u) u=-u ; shift ;;
+ esac
+
+ if [ $# -eq 0 ]; then
+ echo "array_sort: argument expected" >&2
+ return 1
+ fi
+
+ # make r a copy of the array whose name is passed as an arg
+ eval R=\( \"\$\{$1\[@\]\}\" \)
+
+ # sort R
+ R=( $( printf "%s\n" "${A[@]}" | sort $u) )
+
+ # and assign R back to array whose name is passed as an arg
+ eval $1=\( \"\$\{R\[@\]\}\" \)
+ return 0
+}
+
+A=(3 1 4 1 5 9 2 6 5 3 2)
+array_sort A
+echo "${A[@]}"
+
+A=(3 1 4 1 5 9 2 6 5 3 2)
+array_sort -u A
+echo "${A[@]}"
diff --git a/examples/functions/array-to-string b/examples/functions/array-to-string
new file mode 100644
index 0000000..0d2fbe5
--- /dev/null
+++ b/examples/functions/array-to-string
@@ -0,0 +1,15 @@
+#! /bin/bash
+
+# Format: array_to_string vname_of_array vname_of_string separator
+array_to_string()
+{
+ (( ($# < 2) || ($# > 3) )) && {
+ "$FUNCNAME: usage: $FUNCNAME arrayname stringname [separator]"
+ return 2
+ }
+
+ local array=$1 string=$2
+ ((3==$#)) && [[ $3 = ? ]] && local IFS="${3}${IFS}"
+ eval $string="\"\${$array[*]}\""
+ return 0
+}
diff --git a/examples/functions/autoload b/examples/functions/autoload
new file mode 100644
index 0000000..a563a77
--- /dev/null
+++ b/examples/functions/autoload
@@ -0,0 +1,111 @@
+#
+# An almost ksh-compatible `autoload'. A function declared as `autoload' will
+# be read in from a file the same name as the function found by searching the
+# $FPATH (which works the same as $PATH), then that definition will be run.
+#
+# To do this without source support, we define a dummy function that, when
+# executed, will load the file (thereby re-defining the function), then
+# execute that newly-redefined function with the original arguments.
+#
+# It's not identical to ksh because ksh apparently does lazy evaluation
+# and looks for the file to load from only when the function is referenced.
+# This one requires that the file exist when the function is declared as
+# `autoload'.
+#
+# usage: autoload func [func...]
+#
+# The first cut of this was by Bill Trost, trost@reed.bitnet
+#
+# Chet Ramey
+# chet@ins.CWRU.Edu
+
+#
+# Declare a function ($1) to be autoloaded from a file ($2) when it is first
+# called. This defines a `temporary' function that will `.' the file
+# containg the real function definition, then execute that new definition with
+# the arguments given to this `fake' function. The autoload function defined
+# by the file and the file itself *must* be named identically.
+#
+
+aload()
+{
+ eval $1 '() { . '$2' ; '$1' "$@" ; return $? ; }'
+}
+
+#
+# Search $FPATH for a file the same name as the function given as $1, and
+# autoload the function from that file. There is no default $FPATH.
+#
+
+autoload()
+{
+ #
+ # Save the list of functions; we're going to blow away the arguments
+ # in a second. If any of the names contain white space, TFB.
+ #
+
+ local args="$*"
+
+ #
+ # This should, I think, list the functions marked as autoload and not
+ # yet defined, but we don't have enough information to do that here.
+ #
+ if [ $# -eq 0 ] ; then
+ echo "usage: autoload function [function...]" >&2
+ return 1
+ fi
+
+ #
+ # If there is no $FPATH, there is no work to be done
+ #
+
+ if [ -z "$FPATH" ] ; then
+ echo autoload: FPATH not set or null >&2
+ return 1
+ fi
+
+ #
+ # This treats FPATH exactly like PATH: a null field anywhere in the
+ # FPATH is treated the same as the current directory.
+ #
+ # The path splitting command is taken from Kernighan and Pike
+ #
+
+# fp=$(echo $FPATH | sed 's/^:/.:/
+# s/::/:.:/g
+# s/:$/:./
+# s/:/ /g')
+
+ # replaced with builtin mechanisms 2001 Oct 10
+
+ fp=${FPATH/#:/.:}
+ fp=${fp//::/:.:}
+ fp=${fp/%:/:.}
+ fp=${fp//:/ }
+
+ for FUNC in $args ; do
+ #
+ # We're blowing away the arguments to autoload here...
+ # We have to; there are no arrays (well, there are, but
+ # this doesn't use them yet).
+ #
+ set -- $fp
+
+ while [ $# -ne 0 ] ; do
+ if [ -f $1/$FUNC ] ; then
+ break # found it!
+ fi
+ shift
+ done
+
+ if [ $# -eq 0 ] ; then
+ echo "$FUNC: autoload function not found" >&2
+ continue
+ fi
+
+# echo auto-loading $FUNC from $1/$FUNC
+ aload $FUNC $1/$FUNC
+ done
+
+ return 0
+}
diff --git a/examples/functions/autoload.v2 b/examples/functions/autoload.v2
new file mode 100644
index 0000000..e8f3433
--- /dev/null
+++ b/examples/functions/autoload.v2
@@ -0,0 +1,192 @@
+#
+# An almost ksh-compatible `autoload'. A function declared as `autoload' will
+# be read in from a file the same name as the function found by searching the
+# $FPATH (which works the same as $PATH), then that definition will be run.
+#
+# To do this without source support, we define a dummy function that, when
+# executed, will load the file (thereby re-defining the function), then
+# execute that newly-redefined function with the original arguments.
+#
+# It's not identical to ksh because ksh apparently does lazy evaluation
+# and looks for the file to load from only when the function is referenced.
+# This one requires that the file exist when the function is declared as
+# `autoload'.
+#
+# usage: autoload [-pu] [func ...]
+#
+# options:
+# -p print in a format that can be reused as input
+# -u unset each function and remove it from the autoload list
+#
+# The first cut of this was by Bill Trost, trost@reed.edu
+#
+# Chet Ramey
+# chet@ins.CWRU.Edu
+
+unset _AUTOLOADS
+_aindex=0
+
+#
+# Declare a function ($1) to be autoloaded from a file ($2) when it is first
+# called. This defines a `temporary' function that will `.' the file
+# containg the real function definition, then execute that new definition with
+# the arguments given to this `fake' function. The autoload function defined
+# by the file and the file itself *must* be named identically.
+#
+
+_aload()
+{
+ eval $1 '() { . '$2' ; '$1' "$@" ; return $? ; }'
+ _autoload_addlist "$1"
+}
+
+_autoload_addlist()
+{
+ local i=0
+
+ while (( i < $_aindex )); do
+ case "${_AUTOLOADS[i]}" in
+ "$1") return 1 ;;
+ esac
+ (( i += 1 ))
+ done
+ _AUTOLOADS[_aindex]="$1"
+ (( _aindex += 1 ))
+ return 0
+}
+
+_autoload_dump()
+{
+ local func
+
+ for func in ${_AUTOLOADS[@]}; do
+ [ -n "$1" ] && echo -n "autoload "
+ echo "$func"
+ done
+}
+
+# Remove $1 from the list of autoloaded functions
+_autoload_remove_one()
+{
+ local i=0 nnl=0
+ local -a nlist
+
+ while (( i < _aindex )); do
+ case "${_AUTOLOADS[i]}" in
+ "$1") ;;
+ *) nlist[nnl]="${_AUTOLOADS[i]}" ; (( nnl += 1 ));;
+ esac
+ (( i += 1 ))
+ done
+ unset _AUTOLOADS _aindex
+ eval _AUTOLOADS=( ${nlist[@]} )
+ _aindex=$nnl
+}
+
+# Remove all function arguments from the list of autoloaded functions
+_autoload_remove()
+{
+ local func i es=0
+
+ # first unset the autoloaded functions
+ for func; do
+ i=0
+ while (( i < _aindex )); do
+ case "${_AUTOLOADS[i]}" in
+ "$func") unset -f $func ; break ;;
+ esac
+ (( i += 1 ))
+ done
+ if (( i == _aindex )); then
+ echo "autoload: $func: not an autoloaded function" >&2
+ es=1
+ fi
+ done
+
+ # then rebuild the list of autoloaded functions
+ for func ; do
+ _autoload_remove_one "$func"
+ done
+
+ return $es
+}
+
+#
+# Search $FPATH for a file the same name as the function given as $1, and
+# autoload the function from that file. There is no default $FPATH.
+#
+
+autoload()
+{
+ local -a fp
+ local _autoload_unset nfp i
+
+ if (( $# == 0 )) ; then
+ _autoload_dump
+ return 0
+ fi
+
+ OPTIND=1
+ while getopts pu opt
+ do
+ case "$opt" in
+ p) _autoload_dump printable; return 0;;
+ u) _autoload_unset=y ;;
+ *) echo "autoload: usage: autoload [-pu] [function ...]" >&2
+ return 1 ;;
+ esac
+ done
+
+ shift $(( $OPTIND - 1 ))
+
+ if [ -n "$_autoload_unset" ]; then
+ _autoload_remove "$@"
+ return $?
+ fi
+
+ #
+ # If there is no $FPATH, there is no work to be done
+ #
+
+ if [ -z "$FPATH" ] ; then
+ echo "autoload: FPATH not set or null" >&2
+ return 1
+ fi
+
+ #
+ # This treats FPATH exactly like PATH: a null field anywhere in the
+ # FPATH is treated the same as the current directory.
+ #
+ # This turns $FPATH into an array, substituting `.' for `'
+ #
+ eval fp=( $(
+ IFS=':'
+ set -- ${FPATH}
+ for p in "$@" ; do echo -n "${p:-.} "; done
+ )
+ )
+
+ nfp=${#fp[@]}
+
+ for FUNC ; do
+ i=0;
+ while (( i < nfp )) ; do
+ if [ -f ${fp[i]}/$FUNC ] ; then
+ break # found it!
+ fi
+ (( i += 1 ))
+ done
+
+ if (( i == nfp )) ; then
+ echo "autoload: $FUNC: autoload function not found" >&2
+ es=1
+ continue
+ fi
+
+# echo auto-loading $FUNC from ${fp[i]}/$FUNC
+ _aload $FUNC ${fp[i]}/$FUNC
+ es=0
+ done
+
+ return $es
+}
diff --git a/examples/functions/autoload.v3 b/examples/functions/autoload.v3
new file mode 100644
index 0000000..b1e5dfe
--- /dev/null
+++ b/examples/functions/autoload.v3
@@ -0,0 +1,125 @@
+#From: Mark Kennedy <mark.t.kennedy@gmail.com> (<mtk@ny.ubs.com>)
+#Message-ID: <35E2B899.63A02DF5@ny.ubs.com>
+#Date: Tue, 25 Aug 1998 09:14:01 -0400
+#To: chet@nike.ins.cwru.edu
+#Subject: a newer version of the ksh-style 'autoload'
+
+#enclosed you'll find 'autoload.v3', a version of the autoloader
+#that emulates the ksh semantics of delaying the resolution (and loading) of the function
+#until its first use. i took the liberty of simplifying the code a bit although it still uses the
+#same functional breakdown. i recently went through the exercise of converting
+#my ksh-based environment to bash (a very, very pleasant experience)
+#and this popped out.
+
+# the psuedo-ksh autoloader.
+
+# The first cut of this was by Bill Trost, trost@reed.bitnet.
+# The second cut came from Chet Ramey, chet@ins.CWRU.Edu
+# The third cut came from Mark Kennedy, mtk@ny.ubs.com. 1998/08/25
+
+unset _AUTOLOADS
+
+_aload()
+{
+ local func
+ for func; do
+ eval $func '()
+ {
+ local f=$(_autoload_resolve '$func')
+ if [[ $f ]]; then
+ . $f
+ '$func' "$@"
+ return $?
+ else
+ return 1
+ fi
+ }'
+ _autoload_addlist $func
+ done
+}
+
+_autoload_addlist()
+{
+ local func
+
+ for func in ${_AUTOLOADS[@]}; do
+ [[ $func = "$1" ]] && return
+ done
+
+ _AUTOLOADS[${#_AUTOLOADS[@]}]=$1
+}
+
+_autoload_dump()
+{
+ local func
+
+ for func in ${_AUTOLOADS[@]}; do
+ [[ $1 ]] && echo -n "autoload "
+ echo $func
+ done
+}
+
+_autoload_remove_one()
+{
+ local func
+ local -a NEW_AUTOLOADS
+
+ for func in ${_AUTOLOADS[@]}; do
+ [[ $func != "$1" ]] && NEW_AUTOLOADS[${#NEW_AUTOLOADS[@]}]=$func
+ done
+
+ _AUTOLOADS=( ${NEW_AUTOLOADS[@]} )
+}
+
+_autoload_remove()
+{
+ local victim func
+
+ for victim; do
+ for func in ${_AUTOLOADS[@]}; do
+ [[ $victim = "$func" ]] && unset -f $func && continue 2
+ done
+ echo "autoload: $func: not an autoloaded function" >&2
+ done
+
+ for func; do
+ _autoload_remove_one $func
+ done
+}
+
+_autoload_resolve()
+{
+ if [[ ! "$FPATH" ]]; then
+ echo "autoload: FPATH not set or null" >&2
+ return
+ fi
+
+ local p
+
+ for p in $( (IFS=':'; set -- ${FPATH}; echo "$@") ); do
+ p=${p:-.}
+ if [ -f $p/$1 ]; then echo $p/$1; return; fi
+ done
+
+ echo "autoload: $1: function source file not found" >&2
+}
+
+autoload()
+{
+ if (( $# == 0 )) ; then _autoload_dump; return; fi
+
+ local opt OPTIND
+
+ while getopts pu opt
+ do
+ case $opt in
+ p) _autoload_dump printable; return;;
+ u) shift $((OPTIND-1)); _autoload_remove "$@"; return;;
+ *) echo "autoload: usage: autoload [-pu] [function ...]" >&2; return;;
+ esac
+ done
+
+ shift $(($OPTIND-1))
+
+ _aload "$@"
+}
diff --git a/examples/functions/basename b/examples/functions/basename
new file mode 100644
index 0000000..a541349
--- /dev/null
+++ b/examples/functions/basename
@@ -0,0 +1,23 @@
+# Date: Fri, 11 Oct 91 11:22:36 edt
+# From: friedman@gnu.ai.mit.edu
+# To: bfox@gnu.ai.mit.edu
+
+# A replacement for basename(1). Not all the systems I use have this
+# program. Usage: basename [path] {extension}
+function basename ()
+{
+ local path="$1"
+ local suffix="$2"
+ local tpath="${path%/}"
+
+ # Strip trailing '/' characters from path (unusual that this should
+ # ever occur, but basename(1) seems to deal with it.)
+ while [ "${tpath}" != "${path}" ]; do
+ tpath="${path}"
+ path="${tpath%/}"
+ done
+
+ path="${path##*/}" # Strip off pathname
+ echo ${path%${suffix}} # Also strip off extension, if any.
+}
+
diff --git a/examples/functions/basename2 b/examples/functions/basename2
new file mode 100644
index 0000000..a42231c
--- /dev/null
+++ b/examples/functions/basename2
@@ -0,0 +1,43 @@
+#From: "Grigoriy Strokin" <grg@philol.msu.ru>
+#Newsgroups: comp.unix.shell
+#Subject: fast basename and dirname functions for BASH/SH
+#Date: Sat, 27 Dec 1997 21:18:40 +0300
+#
+#Please send your comments to grg@philol.msu.ru
+
+function basename()
+{
+ local name="${1##*/}"
+ echo "${name%$2}"
+}
+
+function dirname()
+{
+ local dir="${1%${1##*/}}"
+ [ "${dir:=./}" != "/" ] && dir="${dir%?}"
+ echo "$dir"
+}
+
+# Two additional functions:
+# 1) namename prints the basename without extension
+# 2) ext prints extension of a file, including "."
+
+function namename()
+{
+ local name=${1##*/}
+ local name0="${name%.*}"
+ echo "${name0:-$name}"
+}
+function ext()
+{
+ local name=${1##*/}
+ local name0="${name%.*}"
+ local ext=${name0:+${name#$name0}}
+ echo "${ext:-.}"
+}
+
+
+
+
+
+
diff --git a/examples/functions/coproc.bash b/examples/functions/coproc.bash
new file mode 100644
index 0000000..61dc8d7
--- /dev/null
+++ b/examples/functions/coproc.bash
@@ -0,0 +1,108 @@
+# coprocess.bash
+#
+# vi:set sts=2 sw=2 ai:
+#
+
+coprocess_pid=
+
+#
+# coprocess - Start, control, and end coprocesses.
+#
+function coprocess ()
+{
+ while (( $# > 0 )) ; do
+ case "$1" in
+ #
+ # coprocess close
+ #
+ c|cl|clo|clos|close)
+ shift
+ exec 61>&- 62<&-
+ coprocess_pid=
+ if [ "$1" = "-SIGPIPE" ] ; then
+ # Only print message in an interactive shell
+ case "$-" in
+ *i*)
+ echo 'SIGPIPE' >&2
+ ;;
+ esac
+ return 1
+ fi
+ return 0
+ ;;
+
+ #
+ # coprocess open
+ #
+ o|op|ope|open)
+ shift
+ local fifo="/var/tmp/coprocess.$$.$RANDOM"
+
+ local cmd="/bin/bash"
+ if (( $# > 0 )) ; then
+ cmd="$@"
+ fi
+
+ mkfifo "$fifo.in" || return $?
+ mkfifo "$fifo.out" || {
+ ret=$?
+ rm -f "$fifo.in"
+ return $?
+ }
+
+ ( "$@" <$fifo.in >$fifo.out ; rm -f "$fifo.in" "$fifo.out" ) &
+ coprocess_pid=$!
+ exec 61>$fifo.in 62<$fifo.out
+ return 0
+ ;;
+
+ #
+ # coprocess print - write to the coprocess
+ #
+ p|pr|pri|prin|print)
+ shift
+ local old_trap=$(trap -p SIGPIPE)
+ trap 'coprocess close -SIGPIPE' SIGPIPE
+ if [ $# -eq 1 ] && [ "$1" = "--stdin" ] ; then
+ cat >&61
+ else
+ echo "$@" >&61
+ fi
+ local ret=$?
+ eval "$old_trap"
+ return $ret
+ ;;
+
+ #
+ # coprocess read - read from the coprocess
+ #
+ r|re|rea|read)
+ shift
+ local old_trap=$(trap -p SIGPIPE)
+ trap '_coprocess_close -SIGPIPE' SIGPIPE
+ builtin read "$@" <&62
+ local ret=$?
+ eval "$old_trap"
+ return $ret
+ ;;
+
+ s|st|sta|stat|statu|status)
+ if [ -z "$coprocess_pid" ] ; then
+ echo 'no active coprocess'
+ return 1
+ else
+ echo " coprocess is active [$coprocess_pid]"
+ return 0
+ fi
+ ;;
+
+ *)
+ coprocess print "$@"
+ return $?
+ ;;
+ esac
+ shift
+ done
+ coprocess status
+ return $?
+}
diff --git a/examples/functions/coshell.README b/examples/functions/coshell.README
new file mode 100644
index 0000000..9675cda
--- /dev/null
+++ b/examples/functions/coshell.README
@@ -0,0 +1,53 @@
+Date: Fri, 21 Sep 2001 14:50:29 -0400
+From: "Jason M. Felice" <jfelice@cronosys.com>
+To: bash-maintainers@gnu.org, chet@po.cwru.edu
+Subject: Bash co-processes functions
+Message-ID: <20010921145029.A6093@argo.eraserhead.net>
+Mime-Version: 1.0
+
+Attached to this message you will find coprocess.bash and coshell.bash.
+Here's a brief synopsis of use:
+
+coprocess open telnet localhost
+while coprocess read il ; do
+ echo "$il"
+ case "$il" in
+ *ogin:*)
+ coprocess print 'user'
+ ;;
+ *ord:*)
+ echo 'pass' |coprocess print --stdin
+ ;;
+ *$ *)
+ coprocess print 'exit'
+ break
+ ;;
+ esac
+done
+coprocess close
+
+And here's an example of the coshell function:
+
+coshell open ssh -l root otherbox
+coshell eval hostname
+coshell ls -l
+if coshell test -d /tmp ; then echo 'otherbox has a /tmp!' ; fi
+
+coshell sendfile /var/lib/upgrade.rpm /tmp/test.rpm || exit $?
+coshell eval rpm -ivh /tmp/test.rpm || exit $?
+coshell eval rm -f /tmp/test.rpm || exit $?
+coshell close
+exit 0
+
+There are a few minor issues that I'd like to work out, but it works well
+enough for me ;-) The issues are:
+
+- Shell quoting issue with 'coshell eval' commands - need to somehow
+ re-quote words.
+- Interactive commands hang 'coshell eval', tried redirecting in </dev/null
+ to executed command, but it caused strange shell exit problems.
+- Some way to copy stdin from local coshell eval to remote shell. Probably
+ logically impossible, but would be wonderfully useful.
+
+I'm using it for writing scripts to publish websites and other scripts to
+co-located servers.
diff --git a/examples/functions/coshell.bash b/examples/functions/coshell.bash
new file mode 100644
index 0000000..dc177b3
--- /dev/null
+++ b/examples/functions/coshell.bash
@@ -0,0 +1,127 @@
+# vi:set sts=2 sw=2 ai:
+#
+# coshell.bash - Control shell coprocesses (see coprocess.bash).
+#
+
+function coshell ()
+{
+ while (( $# > 0 )) ; do
+ case "$1" in
+ #
+ # coshell open
+ #
+ o|op|ope|open)
+ shift
+ coprocess open "$@"
+ local ret=$?
+
+ # This should eat any ssh error messages or what not.
+ coshell eval : >/dev/null 2>&1
+ return $ret
+ ;;
+
+ #
+ # coshell close
+ #
+ c|cl|clo|close)
+ shift
+ coprocess close "$@"
+ return $?
+ ;;
+
+ #
+ # coshell eval
+ #
+ e|ev|eva|eval)
+ shift
+ local cookie=$RANDOM
+ if (( $# == 0 )) ; then
+ echo "coshell eval: no argumentsl" >&2
+ return 1
+ fi
+ if [ x$coprocess_pid = x ] ; then
+ echo "coshell eval: no active coshell" >&2
+ return 1
+ fi
+
+ coprocess print "$@"
+ coprocess print "coprocess_rc=\$?"
+ coprocess print "printf 'coprocess-$cookie----\n%d\n' \$coprocess_rc"
+ if [ x$coprocess_pid = x ] ; then
+ return 0
+ fi
+
+ local ol
+ while coprocess read ol ; do
+ case "$ol" in
+ *coprocess-$cookie----*)
+ ol="${ol%coprocess-$cookie----}"
+ echo -n "$ol"
+ break
+ ;;
+ esac
+ echo "$ol"
+ done
+ coprocess read ol
+ return $ol
+ ;;
+
+ #
+ # coshell sendfile
+ #
+ s|se|sen|send|sendf|sendfi|sendfil|sendfile)
+ shift
+ if (( $# != 2 )) ; then
+ echo "coshell sendfile: syntax is 'coshell sendfile SRC TARGET'" >&2
+ return 1
+ fi
+ if [ x$coprocess_pid = x ] ; then
+ echo "coshell sendfile: no active coshell" >&2
+ return 1
+ fi
+
+ local target=$2
+ if coshell test -d "$target" ; then
+ target="$target/${1##*/}"
+ fi
+
+ coprocess print "uudecode <<END_OF_FILE"
+ uuencode -m "$target" <$1 |coprocess print --stdin
+ coshell eval "END_OF_FILE"
+ return $?
+ ;;
+
+ #
+ # coshell getfile
+ #
+ g|ge|get|getf|getfi|getfil|getfile)
+ shift
+ if (( $# != 2 )) ; then
+ echo "coshell getfile: syntax is 'coshell getfile SRC TARGET'" >&2
+ return 1
+ fi
+ if [ x$coprocess_pid = x ] ; then
+ echo "coshell getfile: no active coshell" >&2
+ return 1
+ fi
+
+ local target=$2
+ if test -d "$target" ; then
+ target="$target/${1##*/}"
+ fi
+
+ coshell eval uuencode -m "$target" "<" "$1" |uudecode
+ return $?
+ ;;
+
+ *)
+ coshell eval "$@"
+ return $?
+ ;;
+ esac
+ shift
+ done
+ coprocess status
+ return $?
+}
+
diff --git a/examples/functions/csh-compat b/examples/functions/csh-compat
new file mode 100644
index 0000000..b8dcf8f
--- /dev/null
+++ b/examples/functions/csh-compat
@@ -0,0 +1,48 @@
+# C-shell compatabilty package.
+# setenv VAR VALUE
+function setenv ()
+{
+ export $1="$2"
+}
+
+function unsetenv ()
+{
+ unset $1
+}
+
+# Can't write foreach yet. Need pattern matching, and a few extras.
+function foreach () {
+echo 'Can'\''t do `foreach'\'' yet. Type "help for".'
+}
+
+# Make this work like csh's. Special case "term" and "path".
+#set () {
+#}
+
+chdir ()
+{
+ builtin cd "$@"
+}
+
+# alias - convert csh alias commands to bash functions
+# from Mohit Aron <aron@cs.rice.edu>
+# posted to usenet as <4i5p17$bnu@larry.rice.edu>
+function alias ()
+{
+ if [ "x$2" = "x" ]
+ then
+ declare -f $1
+ else
+ case $2 in
+ *[#\!]*)
+ comm=$(echo $2 | sed 's/\\!\*/\"$\@\"/g
+ s/\\!:\([1-9]\)/\"$\1\"/g
+ s/#/\\#/g')
+ ;;
+ *)
+ comm="$2 \"\$@\"" ;;
+ esac
+
+ eval function $1 \(\) "{" command "$comm" "; }"
+ fi
+}
diff --git a/examples/functions/dirfuncs b/examples/functions/dirfuncs
new file mode 100644
index 0000000..3958bbe
--- /dev/null
+++ b/examples/functions/dirfuncs
@@ -0,0 +1,142 @@
+#
+# Directory manipulation functions from the book 'The Korn Shell'
+# Modified for use with bash Mon Apr 18 08:37 1994 by
+# Ken Konecki (kenk@wfg.com)
+#
+# Modified by Chet Ramey
+#
+# This could stand to have calls to `select' added back in
+#
+
+alias integer="declare -i"
+
+integer _push_max=${CDSTACK-31} _push_top=${CDSTACK-31}
+
+unalias cd
+# alias cd=_cd
+
+# Display directory stack -- $HOME display as ~
+dirs()
+{
+ dir="${PWD#$HOME/}"
+ case $dir in
+ $HOME) dir=\~ ;;
+ /*) ;;
+ *) dir=\~/$dir ;;
+ esac
+
+ integer i=_push_top
+ integer n=1
+
+ echo "$n) $dir"
+ while let "i < $_push_max"
+ do
+ n=n+1
+ eval "echo \$n\) \$_push_stack_$i"
+ i=i+1
+ done
+}
+
+# Change directory and put directory on front of stack
+cd()
+{
+ typeset dir=
+ integer n=0 type=4 i
+ case $1 in
+ -|-1|2) # cd -
+ n=_push_top type=1
+ ;;
+ -[1-9]|-[1-9][0-9]) # cd -n
+ n=_push_top+${1#-}-1 type=2
+ ;;
+
+ 1) # keep present directory
+ echo "$PWD"
+ return
+ ;;
+
+ [2-9]|[1-9][0-9]) # cd n
+ n=_push_top+${1}-2 type=2
+ ;;
+
+ *)
+ if let "_push_top <= 0"; then
+ type=3 n=_push_max
+ fi
+ ;;
+ esac
+
+ if let "type < 3"; then
+ if let "n >= _push_max"; then
+ echo cd: Directory stack not that deep
+ return 1
+ else
+ eval dir=\${_push_stack_$n}
+ fi
+ fi
+
+ case $dir in
+ ~*) dir=$HOME${dir#\~} ;;
+ esac
+
+ cd2 ${dir:-$@} > /dev/null || return 1
+ dir=${OLDPWD#$HOME/}
+ case $dir in
+ $HOME) dir=\~ ;;
+ /*) ;;
+ *) dir=\~/$dir ;;
+ esac
+
+ case $type in
+ 1) # swap first two elements
+ eval _push_stack_$_push_top=\$dir ;;
+
+ 2|3) # put $dir on top and shift down by one until top
+ i=_push_top
+ unset _dirlist
+ while let "i < $_push_max" ; do
+ eval _dirlist=\"\$_dirlist \$_push_stack_$i\"
+ i=i+1
+ done
+
+ i=_push_top
+ for dir in "$dir" ${_dirlist} ; do
+ let "i > n" && break
+ eval _push_stack_$i=\$dir
+ i=i+1
+ done
+ ;;
+ 4) # push name
+ _push_top=_push_top-1;
+ eval _push_stack_$_push_top=\$dir
+ ;;
+ esac
+
+ echo "$PWD"
+
+}
+
+# Menu-driven change directory command
+function mcd
+{
+ dirs
+ echo -n "Select by number or enter a name: "
+ read
+ cd $REPLY
+}
+
+
+# Emulate ksh cd substitution
+cd2()
+{
+ case "$#" in
+ 0) builtin cd "$HOME" ;;
+ 1) builtin cd "$1" ;;
+ 2) newDir=$(echo $PWD | sed -e "s:$1:$2:g")
+ case "$newDir" in
+ $PWD) echo "bash:: cd: bad substitution" >&2 ; return 1 ;;
+ *) builtin cd "$newDir" ;;
+ esac ;;
+ *) echo "bash: cd: wrong arg count" 1>&2 ; return 1 ;;
+ esac
+}
diff --git a/examples/functions/dirname b/examples/functions/dirname
new file mode 100644
index 0000000..ccb8c84
--- /dev/null
+++ b/examples/functions/dirname
@@ -0,0 +1,21 @@
+# Date: Fri, 11 Oct 91 11:22:36 edt
+# From: friedman@gnu.ai.mit.edu
+# To: bfox@gnu.ai.mit.edu
+
+# A replacement for dirname(1). This one appears less often on some
+# systems I use than basename(1), and I really depend on it for some
+# things. Usage: dirname [path]
+function dirname ()
+{
+ local dir="$1"
+ local tdir="${dir%/}"
+
+ # Strip trailing '/' characters from dir (unusual that this should
+ # ever occur, but dirname(1) seems to deal with it.)
+ while [ "${tdir}" != "${dir}" ]; do
+ tdir="${dir}"
+ dir="${tdir%/}"
+ done
+
+ echo "${dir%/*}"
+}
diff --git a/examples/functions/emptydir b/examples/functions/emptydir
new file mode 100644
index 0000000..412af5b
--- /dev/null
+++ b/examples/functions/emptydir
@@ -0,0 +1,28 @@
+#! /bin/bash
+#
+#Derived from:
+#
+#From: damercer@mmm.com (Dan Mercer)
+#Newsgroups: comp.unix.admin,comp.unix.shell,comp.unix.programmer,comp.sys.sun.admin
+#Subject: Re: Command to find out if a directory is empty
+#Date: 17 Aug 2000 14:35:56 GMT
+#Message-ID: <8ngt8c$fmr$1@magnum.mmm.com>
+
+# usage: emptydir [dirname] ; default dirname is "."
+
+emptydir()
+{
+ typeset file dir=${1:-.}
+ [[ -d $dir ]] || {
+ echo "$FUNCNAME: $dir is not a directory" >&2
+ return 2
+ }
+ for file in $dir/.* $dir/*
+ do
+ case ${file#$dir/} in
+ .|..) ;;
+ \*) [[ -e $file ]];let $?;return;;
+ *) return 1;;
+ esac
+ done
+}
diff --git a/examples/functions/exitstat b/examples/functions/exitstat
new file mode 100644
index 0000000..f49ebf5
--- /dev/null
+++ b/examples/functions/exitstat
@@ -0,0 +1,22 @@
+# Contributed by Noah Friedman and Roland McGrath.
+
+# To be run by the PROMPT_COMMAND variable, so that one can see what
+# the exit status of processes are.
+
+function check_exit_status ()
+{
+ local status="$?"
+ local signal=""
+
+ if [ ${status} -ne 0 ] && [ ${status} != 128 ]; then
+ # If process exited by a signal, determine name of signal.
+ if [ ${status} -gt 128 ]; then
+ signal="$(builtin kill -l $((${status} - 128)) 2>/dev/null)"
+ if [ "$signal" ]; then signal="($signal)"; fi
+ fi
+ echo "[Exit ${status} ${signal}]" 1>&2
+ fi
+ return 0
+}
+
+PROMPT_COMMAND=check_exit_status
diff --git a/examples/functions/external b/examples/functions/external
new file mode 100644
index 0000000..c2e52cd
--- /dev/null
+++ b/examples/functions/external
@@ -0,0 +1,50 @@
+# Contributed by Noah Friedman.
+
+# To avoid using a function in bash, you can use the `builtin' or
+# `command' builtins, but neither guarantees that you use an external
+# program instead of a bash builtin if there's a builtin by that name. So
+# this function can be used like `command' except that it guarantees the
+# program is external by first disabling any builtin by that name. After
+# the command is done executing, the state of the builtin is restored.
+function external ()
+{
+ local state=""
+ local exit_status
+
+ if builtin_p "$1"; then
+ state="builtin"
+ enable -n "$1"
+ fi
+
+ command "$@"
+ exit_status=$?
+
+ if [ "$state" = "builtin" ]; then
+ enable "$1"
+ fi
+
+ return ${exit_status}
+}
+
+# What is does is tell you if a particular keyword is currently enabled as
+# a shell builtin. It does NOT tell you if invoking that keyword will
+# necessarily run the builtin. For that, do something like
+#
+# test "$(builtin type -type [keyword])" = "builtin"
+#
+# Note also, that disabling a builtin with "enable -n" will make builtin_p
+# return false, since the builtin is no longer available.
+function builtin_p ()
+{
+ local word
+
+ set $(builtin type -all -type "$1")
+
+ for word in "$@" ; do
+ if [ "${word}" = "builtin" ]; then
+ return 0
+ fi
+ done
+
+ return 1
+}
diff --git a/examples/functions/fact b/examples/functions/fact
new file mode 100644
index 0000000..97efd49
--- /dev/null
+++ b/examples/functions/fact
@@ -0,0 +1,13 @@
+# Who said shells can't use recursion? Here is a factorial function.
+# You call it with a number as an argument, and it returns the factorial
+# of that number.
+
+fact ()
+{
+ local num=$1;
+ if [ "$num" = 1 ] ; then
+ echo 1
+ return ;
+ fi;
+ echo $(( $num * $(fact $(( $num - 1 )) ) ))
+}
diff --git a/examples/functions/fstty b/examples/functions/fstty
new file mode 100644
index 0000000..a770d84
--- /dev/null
+++ b/examples/functions/fstty
@@ -0,0 +1,59 @@
+#
+# A function that works as a front end for both stty and the `bind'
+# builtin, so the tty driver and readline see the same changes
+#
+
+#
+# Convert between the stty ^H control character form and the readline \C-H
+# form
+#
+cvt()
+{
+ echo "$@" | cat -v | sed 's/\^/\\C-/'
+}
+
+#
+# stty front-end. Parses the argument list and creates two command strings,
+# one for stty, another for bind.
+#
+fstty()
+{
+ local cmd="" bargs=""
+ local e
+
+ while [ $# -gt 0 ]
+ do
+ case "$1" in
+ -a) cmd="$cmd everything"
+ ;;
+ erase) shift;
+ e=$(cvt "$1")
+ cmd="$cmd erase $1"
+ bargs="$bargs '\"$e\": backward-delete-char'"
+ ;;
+ kill) shift
+ e=$(cvt "$1")
+ cmd="$cmd kill $1"
+ bargs="$bargs '\"$e\": unix-line-discard'"
+ ;;
+ werase) shift;
+ e=$(cvt "$1")
+ cmd="$cmd erase $1"
+ bargs="$bargs '\"$e\": backward-kill-word'"
+ ;;
+ lnext) shift;
+ e=$(cvt "$1")
+ cmd="$cmd erase $1"
+ bargs="$bargs '\"$e\": quoted-insert'"
+ ;;
+ *) cmd="$cmd $1"
+ ;;
+ esac
+ shift
+ done
+
+ command stty $cmd
+ if [ -n "$bargs" ]; then
+ builtin bind $bargs
+ fi
+}
diff --git a/examples/functions/func b/examples/functions/func
new file mode 100644
index 0000000..710f643
--- /dev/null
+++ b/examples/functions/func
@@ -0,0 +1,27 @@
+#
+# func -- print out definitions for functions named by arguments
+#
+# usage: func name [name ...]
+#
+# Chet Ramey
+# chet@ins.CWRU.Edu
+func()
+{
+ local status=0
+
+ if [ $# -eq 0 ] ; then
+ echo "usage: func name [name...]" 1>&2
+ return 1
+ fi
+
+ for f
+ do
+ if [ "$(builtin type -type $f)" != "function" ] ; then
+ echo "func: $f: not a function" 1>&2
+ status=1 # one failed
+ continue
+ fi
+ builtin type $f | sed 1d
+ done
+ return $status
+}
diff --git a/examples/functions/gethtml b/examples/functions/gethtml
new file mode 100644
index 0000000..2eec1d8
--- /dev/null
+++ b/examples/functions/gethtml
@@ -0,0 +1,35 @@
+#
+# get_html -- get a web page from a remote server
+#
+# Original Author: Jeff Korn <jlk@cs.princeton.edu>
+# Modified for bash by Chet Ramey <chet@po.cwru.edu>
+#
+# Example: get_html cnswww.cns.cwru.edu /~chet/ | more
+
+get_html()
+{
+ local host port
+
+ (($# < 2)) && {
+ echo "usage: $FUNCNAME hostname path [port]" >&2
+ return 1
+ }
+
+ host="$1"
+ port="${3:-80}"
+
+ exec 3<> /dev/tcp/$host/$port || {
+ echo "$FUNCNAME: $host/$port: cannot connect" >&2
+ exit 1
+ }
+
+ echo -e "GET $2 HTTP/1.0\n" >&3
+
+ cat <&3
+
+ exec 3<&-
+
+ return 0
+}
+
+get_html "$@"
diff --git a/examples/functions/getoptx.bash b/examples/functions/getoptx.bash
new file mode 100644
index 0000000..d402c7d
--- /dev/null
+++ b/examples/functions/getoptx.bash
@@ -0,0 +1,301 @@
+#From: "Grigoriy Strokin" <grg@philol.msu.ru>
+#Newsgroups: comp.unix.shell
+#Subject: BASH: getopt function that parses long-named options
+#Date: Mon, 22 Dec 1997 20:35:18 +0300
+
+#Hi, I have written a BASH function named getoptex, that is like bash builtin
+#"getopts", but does parse long-named options and optional arguments. It only
+#uses builtin bash commands, so it is very fast. In order to use it in your
+#bash scripts, include a command ". getopt.sh" (<dot> getopt.sh) to the file
+#containing your script, and that will define functions getopt, getoptex, and
+#optlistex (the file getopt.sh with its detailed description is listed
+#below).
+
+#*** file getopt.sh ***
+
+#! /bin/bash
+#
+# getopt.sh:
+# functions like getopts but do long-named options parsing
+# and support optional arguments
+#
+# Version 1.0 1997 by Grigoriy Strokin (grg@philol.msu.ru), Public Domain
+# Date created: December 21, 1997
+# Date modified: December 21, 1997
+#
+# IMPORTANT FEATURES
+#
+# 1) Parses both short and long-named options
+# 2) Supports optional arguments
+# 3) Only uses bash builtins, thus no calls to external
+# utilities such as expr or sed is done. Therefore,
+# parsing speed is high enough
+#
+#
+# DESCRIPTION
+#
+# FUNCTION getopt
+# Usage: getopt OPTLIST {"$@"|ALTERNATIVE_PARAMETERS}
+#
+# like getopts, but parse options with both required and optional arguments,
+# Options with optional arguments must have "." instead of ":" after them.
+# Furthemore, a variable name to place option name cannot be specified
+# and is always placed in OPTOPT variable
+#
+# This function is provided for compatibility with getopts()
+# OPTLIST style, and it actually calls getoptex (see bellow)
+#
+# NOTE that a list of parameters is required and must be either "$@",
+# if processing command line arguments, or some alternative parameters.
+#
+# FUNCTION getoptex
+# Usage: getoptex OPTION_LIST {"$@"|ALTERNATIVE_PARAMETERS}
+#
+# like getopts, but parse long-named options.
+#
+# Both getopt and getoptex return 0 if an option has been parsed,
+# and 1 if all options are already parsed or an error occured
+#
+# Both getopt and getoptex set or test the following variables:
+#
+# OPTERR -- tested for whether error messages must be given for invalid
+options
+#
+# OPTOPT -- set to the name of an option parsed,
+# or to "?" if no more options or error
+# OPTARG -- set to the option argument, if any;
+# unset if ther is no argument;
+# on error, set to the erroneous option name
+#
+# OPTIND -- Initialized to 1.
+# Then set to the number of the next parameter to be parsed
+# when getopt or getoptex will be called next time.
+# When all options are parsed, contains a number of
+# the first non-option argument.
+#
+#
+# OPTOFS -- If a parameter number $OPTIND containg an option parsed
+# does not contain any more options, OPTOFS is unset;
+# otherwise, OPTOFS is set to such a number of "?" signs
+# which is equal to the number of options parsed
+#
+# You might not set variables OPTIND and OPTOFS yourself
+# unless you want to parse a list of parameters more than once.
+# Otherwise, you whould unset OPTIND (or set it to 1)
+# and unset OPTOFS each time you want to parse a new parameters
+list
+#
+# Option list format is DIFFERENT from one for getopts or getopt.
+getopts-style
+# option list can be converted to getoptex-style using a function optlistex
+# (see bellow)
+#
+# DESCRIPTION of option list used with getoptex:
+# Option names are separated by whitespace. Options consiting of
+# more than one character are treated as long-named (--option)
+#
+# Special characters can appear at the and of option names specifying
+# whether an argument is required (default is ";"):
+# ";" (default) -- no argument
+# ":" -- required argument
+# "," -- optional argument
+#
+# For example, an option list "a b c help version f: file: separator."
+# defines the following options:
+# -a, -b, -c, --help, --version -- no argument
+# -f, --file -- argument required
+# --separator -- optional argument
+#
+# FUNCTION optlistex
+# Usage new_style_optlist=`optlistex OLD_STYLE_OPTLIST`
+#
+# Converts getopts-style option list in a format suitable for use with getoptex
+# Namely, it inserts spaces after each option name.
+#
+#
+# HOW TO USE
+#
+# In order o use in your bash scripts the functions described,
+# include a command ". getopt.sh" to the file containing the script,
+# which will define functions getopt, getoptex, and optlistex
+#
+# EXAMPLES
+#
+# See files 'getopt1' and 'getopt2' that contain sample scripts that use
+# getopt and getoptex functions respectively
+#
+#
+# Please send your comments to grg@philol.msu.ru
+
+function getoptex()
+{
+ let $# || return 1
+ local optlist="${1#;}"
+ let OPTIND || OPTIND=1
+ [ $OPTIND -lt $# ] || return 1
+ shift $OPTIND
+ if [ "$1" != "-" ] && [ "$1" != "${1#-}" ]
+ then OPTIND=$[OPTIND+1]; if [ "$1" != "--" ]
+ then
+ local o
+ o="-${1#-$OPTOFS}"
+ for opt in ${optlist#;}
+ do
+ OPTOPT="${opt%[;.:]}"
+ unset OPTARG
+ local opttype="${opt##*[^;:.]}"
+ [ -z "$opttype" ] && opttype=";"
+ if [ ${#OPTOPT} -gt 1 ]
+ then # long-named option
+ case $o in
+ "--$OPTOPT")
+ if [ "$opttype" != ":" ]; then return 0; fi
+ OPTARG="$2"
+ if [ -z "$OPTARG" ];
+ then # error: must have an agrument
+ let OPTERR && echo "$0: error: $OPTOPT must have an argument" >&2
+ OPTARG="$OPTOPT";
+ OPTOPT="?"
+ return 1;
+ fi
+ OPTIND=$[OPTIND+1] # skip option's argument
+ return 0
+ ;;
+ "--$OPTOPT="*)
+ if [ "$opttype" = ";" ];
+ then # error: must not have arguments
+ let OPTERR && echo "$0: error: $OPTOPT must not have arguments" >&2
+ OPTARG="$OPTOPT"
+ OPTOPT="?"
+ return 1
+ fi
+ OPTARG=${o#"--$OPTOPT="}
+ return 0
+ ;;
+ esac
+ else # short-named option
+ case "$o" in
+ "-$OPTOPT")
+ unset OPTOFS
+ [ "$opttype" != ":" ] && return 0
+ OPTARG="$2"
+ if [ -z "$OPTARG" ]
+ then
+ echo "$0: error: -$OPTOPT must have an argument" >&2
+ OPTARG="$OPTOPT"
+ OPTOPT="?"
+ return 1
+ fi
+ OPTIND=$[OPTIND+1] # skip option's argument
+ return 0
+ ;;
+ "-$OPTOPT"*)
+ if [ $opttype = ";" ]
+ then # an option with no argument is in a chain of options
+ OPTOFS="$OPTOFS?" # move to the next option in the chain
+ OPTIND=$[OPTIND-1] # the chain still has other options
+ return 0
+ else
+ unset OPTOFS
+ OPTARG="${o#-$OPTOPT}"
+ return 0
+ fi
+ ;;
+ esac
+ fi
+ done
+ echo "$0: error: invalid option: $o"
+ fi; fi
+ OPTOPT="?"
+ unset OPTARG
+ return 1
+}
+function optlistex
+{
+ local l="$1"
+ local m # mask
+ local r # to store result
+ while [ ${#m} -lt $[${#l}-1] ]; do m="$m?"; done # create a "???..." mask
+ while [ -n "$l" ]
+ do
+ r="${r:+"$r "}${l%$m}" # append the first character of $l to $r
+ l="${l#?}" # cut the first charecter from $l
+ m="${m#?}" # cut one "?" sign from m
+ if [ -n "${l%%[^:.;]*}" ]
+ then # a special character (";", ".", or ":") was found
+ r="$r${l%$m}" # append it to $r
+ l="${l#?}" # cut the special character from l
+ m="${m#?}" # cut one more "?" sign
+ fi
+ done
+ echo $r
+}
+function getopt()
+{
+ local optlist=`optlistex "$1"`
+ shift
+ getoptex "$optlist" "$@"
+ return $?
+}
+
+#**************************************
+# cut here
+#**************************************
+#*** (end of getopt.sh) ***
+
+
+#*** file getopt1 ***
+
+#! /bin/bash
+# getopt1:
+# Sample script using the function getopt
+#
+# Type something like "getopt1 -ab -d 10 -e20 text1 text2"
+# on the command line to see how it works
+#
+# See getopt.sh for more information
+#. getopt.sh
+#echo Using getopt to parse arguments:
+#while getopt "abcd:e." "$@"
+#do
+# echo "Option <$OPTOPT> ${OPTARG:+has an arg <$OPTARG>}"
+#done
+#shift $[OPTIND-1]
+#for arg in "$@"
+#do
+# echo "Non option argument <$arg>"
+#done
+#
+#**************************************
+# cut here
+#**************************************
+#*** (end of getopt1) ***
+#
+#
+#*** file getopt2 ***
+#
+#! /bin/bash
+# getopt2:
+# Sample script using the function getoptex
+#
+# Type something like "getopt2 -ab -d 10 -e20 --opt1 --opt4=100 text1 text2"
+# to see how it works
+#
+# See getopt.sh for more information
+. getopt.sh
+#echo Using getoptex to parse arguments:
+#while getoptex "a; b; c; d: e. opt1 opt2 opt3 opt4: opt5." "$@"
+#do
+# echo "Option <$OPTOPT> ${OPTARG:+has an arg <$OPTARG>}"
+#done
+#shift $[OPTIND-1]
+#for arg in "$@"
+#do
+# echo "Non option argument <$arg>"
+#done
+#
+#**************************************
+# cut here
+#**************************************
+#*** (end of getopt2) ***
+
diff --git a/examples/functions/inetaddr b/examples/functions/inetaddr
new file mode 100644
index 0000000..f3e228f
--- /dev/null
+++ b/examples/functions/inetaddr
@@ -0,0 +1,60 @@
+#
+# inet2hex - Internet address conversion, dotted-decimal to hex
+#
+inet2hex ()
+{
+ local IFS
+
+ IFS=.
+ set -- $1
+
+ if (( $# != 4 )); then
+ echo "inet2hex: incorrect input format: $1" >&2
+ echo "inet2hex: usage: inet2hex XX.XX.XX.XX" >&2
+ return 2
+ fi
+
+ printf "0x%02x%02x%02x%02x\n" $1 $2 $3 $4
+}
+
+#
+# hex2inet - Internet address conversion, hex to dotted-decimal
+#
+hex2inet ()
+{
+ local x1 x2 x3 x4
+ local rev
+
+ OPTIND=1
+ while getopts "r" o
+ do
+ case "$o" in
+ r) rev=true;;
+ *) echo "hex2inet: usage: hex2inet [-r] [0x]XXXXXXXX" >&2 ; exit 2;;
+ esac
+ done
+ shift $(( $OPTIND - 1 ))
+
+ case "$1" in
+ 0x*) h=${1#??} ;;
+ *) h=$1 ;;
+ esac
+
+ if (( ${#h} != 8 )); then
+ echo "hex2inet: $h not in inet format" >&2
+ echo "hex2inet: usage: hex2inet [0x]XXXXXXXX" >&2
+ return 2
+ fi
+
+ x1=$(( 0x${h:0:2} ))
+ x2=$(( 0x${h:2:2} ))
+ x3=$(( 0x${h:4:2} ))
+ x4=$(( 0x${h:6:2} ))
+
+ if [ -z "$rev" ] ; then
+ printf "%d.%d.%d.%d\n" $x1 $x2 $x3 $x4
+ else
+ printf "%d.%d.%d.%d\n" $x4 $x3 $x2 $x1
+ fi
+ return 0
+}
diff --git a/examples/functions/inpath b/examples/functions/inpath
new file mode 100644
index 0000000..cb4c93d
--- /dev/null
+++ b/examples/functions/inpath
@@ -0,0 +1,14 @@
+inpath()
+{
+ local PROG
+ path=$(echo $PATH | sed 's/^:/.:/
+ s/::/:.:/g
+ s/:$/:./
+ s/:/ /g')
+
+ for x in $path
+ do
+ [ -x $x/$1 ] && { PROG=$x/$1; break; }
+ done
+ [ -n "$PROG" ]
+}
diff --git a/examples/functions/isnum.bash b/examples/functions/isnum.bash
new file mode 100644
index 0000000..b733965
--- /dev/null
+++ b/examples/functions/isnum.bash
@@ -0,0 +1,52 @@
+#From: jrmartin@rainey.blueneptune.com (James R. Martin)
+#Newsgroups: comp.unix.shell
+#Subject: Re: testing user input on numeric or character value
+#Date: 26 Nov 1997 01:28:43 GMT
+
+# isnum returns True if its argument is a valid number,
+# and False (retval=1) if it is any other string.
+# The first pattern requires a digit before the decimal
+# point, and the second after the decimal point.
+
+# BASH NOTE: make sure you have executed `shopt -s extglob' before
+# trying to use this function, or it will not work
+
+isnum() # string
+{
+ case $1 in
+ ?([-+])+([0-9])?(.)*([0-9])?([Ee]?([-+])+([0-9])) )
+ return 0;;
+ ?([-+])*([0-9])?(.)+([0-9])?([Ee]?([-+])+([0-9])) )
+ return 0;;
+ *) return 1;;
+ esac
+}
+
+isnum2() # string
+{
+ case $1 in
+ ?([-+])+([[:digit:]])?(.)*([[:digit:]])?([Ee]?([-+])+([[:digit:]])) )
+ return 0;;
+ ?([-+])*([[:digit:]])?(.)+([[:digit:]])?([Ee]?([-+])+([[:digit:]])) )
+ return 0;;
+ *) return 1;;
+ esac
+}
+
+isint() # string
+{
+ case $1 in
+ ?([-+])+([0-9]) )
+ return 0;;
+ *) return 1;;
+ esac
+}
+
+isint2() # string
+{
+ case $1 in
+ ?([-+])+([[:digit:]]) )
+ return 0;;
+ *) return 1;;
+ esac
+}
diff --git a/examples/functions/isnum2 b/examples/functions/isnum2
new file mode 100644
index 0000000..e2e7a5f
--- /dev/null
+++ b/examples/functions/isnum2
@@ -0,0 +1,22 @@
+isnum2()
+{
+ case "$1" in
+ '[-+]' | '') return 1;; # empty or bare `-' or `+'
+ [-+]*[!0-9]*) return 1;; # non-digit with leading sign
+ [-+]*) return 0;; # OK
+ *[!0-9]*) return 1;; # non-digit
+ *) return 0;; # OK
+ esac
+}
+
+# this one handles floating point
+isnum3()
+{
+ case "$1" in
+ '') return 1;; # empty
+ *[!0-9.+-]*) return 1;; # non-digit, +, -, or .
+ *?[-+]*) return 1;; # sign as second or later char
+ *.*.*) return 1;; # multiple decimal points
+ *) return 0;; # OK
+ esac
+}
diff --git a/examples/functions/isvalidip b/examples/functions/isvalidip
new file mode 100644
index 0000000..0b2dafe
--- /dev/null
+++ b/examples/functions/isvalidip
@@ -0,0 +1,14 @@
+# Thanks to Chris F. A. Johnson <c.f.a.johnson@rogers.com> for this one
+is_validip()
+{
+ case "$*" in
+ ""|*[!0-9.]*|*[!0-9]) return 1 ;;
+ esac
+
+ local IFS=.
+ set -- $*
+
+ [ $# -eq 4 ] &&
+ [ ${1:-666} -le 255 ] && [ ${2:-666} -le 255 ] &&
+ [ ${3:-666} -le 255 ] && [ ${4:-666} -le 254 ]
+}
diff --git a/examples/functions/jdate.bash b/examples/functions/jdate.bash
new file mode 100644
index 0000000..9488ed9
--- /dev/null
+++ b/examples/functions/jdate.bash
@@ -0,0 +1,78 @@
+#From: damatex@CAM.ORG (Mario Boudreault)
+#Newsgroups: comp.unix.shell
+#Subject: JULIAN DATE CONVERSION SUB
+#Date: 4 Aug 1995 10:23:28 -0400
+#Message-ID: <3vtah0$jb3@ocean.CAM.ORG>
+
+#For those using shells and who want to convert dates to a julian number
+#here is a shell script (wihtout validation) that can be used as a base
+#program for your shell scripts.
+
+#Special thanks to Ed Ferguson@ti.com who sent me the algorithm to compute
+#that date.
+
+#
+# MODIFIED BY CHET RAMEY TO CONVERT TO bash v2 SYNTAX
+#
+
+# cnvdate - Conversion de dates en julienne et vice et versa...
+#
+# Par : Mario Boudreault Damatex Inc Montreal, Canada
+# Date: 2 Aout 1995
+# Rev.: 2 Aout 1995
+#
+# Usage:
+# cvdate [-j] YYYMMDD pour convertir en nbre de jours
+# cvdate -d {julian number} pour convertir en AAAAMMJJ
+#
+
+jul_date()
+{
+ #
+ # Separe ANNEE, MOIS et JOUR...
+ #
+ YEAR=`echo $DATE | awk ' { print substr($0,1,4) } '`
+ MONTH=`echo $DATE | awk ' { print substr($0,5,2) } '`
+ DAY=`echo $DATE | awk ' { print substr($0,7,2) } '`
+ #
+ # Execute la formule magique...
+ #
+ A=$(( $DAY - 32075 + 1461 * ( $YEAR + 4800 - ( 14 - $MONTH ) / 12 ) \
+ / 4 + 367 * ( $MONTH - 2 + ( 14 - $MONTH ) / 12 * 12 ) / 12 - \
+ 3 * ( ( $YEAR + 4900 - ( 14 - $MONTH ) / 12 ) / 100 ) / 4 ))
+ echo $A
+}
+
+day_date()
+{
+ TEMP1=$(( $DATE + 68569 ))
+ TEMP2=$(( 4 * $TEMP1 / 146097 ))
+ TEMP1=$(( $TEMP1 - ( 146097 * $TEMP2 + 3 ) / 4 ))
+ Y=$(( 4000 * ( $TEMP1 + 1 ) / 1461001 ))
+ TEMP1=$(( $TEMP1 - 1461 * $Y / 4 + 31 ))
+ M=$(( 80 * $TEMP1 / 2447 ))
+ D=$(( $TEMP1 - 2447 * $M / 80 ))
+ TEMP1=$(( $M / 11 ))
+ M=$(( $M + 2 - 12 * $TEMP1 ))
+ Y=$(( 100 * ( $TEMP2 - 49 ) + $Y + $TEMP1 ))
+ M=`echo $M | awk ' { M=$0 ; if ( length($0) == 1 ) M="0"$0 } END { print M } '`
+ D=`echo $D | awk ' { D=$0 ; if ( length($0) == 1 ) D="0"$0 } END { print D } '`
+ echo $Y$M$D
+}
+
+# main()
+
+if [ $# -eq 1 ]; then
+ DATE=$1
+ jul_date
+elif [ "$1" = '-j' ]; then
+ DATE=$2
+ jul_date
+elif [ "$1" = '-d' ]; then
+ DATE=$2
+ day_date
+fi
+#
+# Termine
+#
+exit 0
diff --git a/examples/functions/jj.bash b/examples/functions/jj.bash
new file mode 100644
index 0000000..212c9ce
--- /dev/null
+++ b/examples/functions/jj.bash
@@ -0,0 +1,12 @@
+jj ()
+{
+ p=$(jobs $1);
+ echo $p
+
+ case "$p" in
+ [*) echo matches '[*'
+ ;;
+ *) echo not a match\?
+ ;;
+ esac
+}
diff --git a/examples/functions/keep b/examples/functions/keep
new file mode 100644
index 0000000..4433b35
--- /dev/null
+++ b/examples/functions/keep
@@ -0,0 +1,62 @@
+# From: Seth Chaiklin <psykseth@aau.dk>
+# To: chet@ins.CWRU.Edu
+# Subject: bash functions (sorta)
+
+#
+# keep:
+# usage: keep program
+# declare the a program should be "kept". i.e. try to fg a stopped one
+# and only when that fails start a fresh program.
+#
+
+keep()
+{
+ case $# in
+ 1|2) ;;
+ *) echo "usage: keep [alias] program" 1>&2 ; return 1;;
+ esac
+
+ # progname
+ pn=${1##*/}
+
+ # set up an alias for the kept program
+ if [ $# = 1 ]; then
+ alias "$pn=fg $1 2>/dev/null || $1"
+ else
+ alias "$1=fg $2 2>/dev/null || $2"
+ fi
+}
+
+#
+# unkeep:
+# usage: unkeep program
+# unset the alias set up by the keep function
+#
+
+unkeep()
+{
+ if [ $# != 1 ]; then
+ echo "usage: unkeep program"
+ return 2
+ fi
+
+ # unset the alias for the kept program
+ unalias "${1##*/}"
+}
+
+#
+# kept:
+# lists all kept programs in 'alias: program' form
+#
+
+kept()
+{
+ alias | grep "fg.*2>" | sed "s/alias \(.*\)='fg.*||\(.*\)'$/\1:\2/"
+}
+
+
+# some things that should be kept
+#keep /usr/local/bin/emacs
+#keep e ${EDITOR:-/usr/local/bin/emacs}
+#keep edit ${EDITOR:-/usr/local/bin/emacs}
+#keep /usr/local/bin/emm
diff --git a/examples/functions/ksh-cd b/examples/functions/ksh-cd
new file mode 100644
index 0000000..801a490
--- /dev/null
+++ b/examples/functions/ksh-cd
@@ -0,0 +1,35 @@
+#
+# ksh-like `cd': cd [-LP] [dir [change]]
+#
+cd()
+{
+ OPTIND=1
+ while getopts "LP" opt
+ do
+ case $opt in
+ L|P) CDOPTS="$CDOPTS -$opt" ;;
+ *) echo "$FUNCNAME: usage: $FUNCNAME [-LP] [dir] [change]" >&2
+ return 2;;
+ esac
+ done
+
+ shift $(( $OPTIND - 1 ))
+
+ case $# in
+ 0) builtin cd $CDOPTS "$HOME" ;;
+ 1) builtin cd $CDOPTS "$@" ;;
+ 2) old="$1" new="$2"
+ case "$PWD" in
+ *$old*) ;;
+ *) echo "${0##*/}: $FUNCNAME: bad substitution" >&2 ; return 1 ;;
+ esac
+
+ dir=${PWD//$old/$new}
+
+ builtin cd $CDOPTS "$dir" && echo "$PWD"
+
+ ;;
+ *) echo "${0##*/}: $FUNCNAME: usage: $FUNCNAME [-LP] [dir] [change]" >&2
+ return 2 ;;
+ esac
+}
diff --git a/examples/functions/ksh-compat-test b/examples/functions/ksh-compat-test
new file mode 100644
index 0000000..feee965
--- /dev/null
+++ b/examples/functions/ksh-compat-test
@@ -0,0 +1,40 @@
+#
+# replacements for test/[ that do arithmetic expansion on the operands to
+# the arithmetic operators, like ksh.
+#
+function test()
+{
+ local -i n1 n3
+ case "$#" in
+ 3) case "$2" in
+ -lt|-gt|-eq|-ne|-le|-ge) n1=$(( $1 ))
+ n3=$(( $3 ))
+ builtin test "$n1" $2 "$n3"
+ return $?;;
+ *) builtin test "$@" ;;
+ esac;;
+ *) builtin test "$@" ;;
+ esac
+}
+
+function [()
+{
+ local -i n1 n3
+ case "$#" in
+ 4) case "$2" in
+ -lt|-gt|-eq|-ne|-le|-ge) n1=$(( $1 ))
+ n3=$(( $3 ))
+ builtin [ "$n1" $2 "$n3" ]
+ return $?;;
+ *) builtin [ "$@" ;;
+ esac;;
+ *) builtin [ "$@" ;;
+ esac
+}
+
+q=7
+
+[ q -lt 10 ]
+echo $?
+[ $q -lt 10 ]
+echo $?
diff --git a/examples/functions/kshenv b/examples/functions/kshenv
new file mode 100644
index 0000000..7594f2d
--- /dev/null
+++ b/examples/functions/kshenv
@@ -0,0 +1,228 @@
+#
+# .kshenv -- functions and aliases to provide the beginnings of a ksh
+# environment for bash.
+#
+# Chet Ramey
+# chet@ins.CWRU.Edu
+#
+#
+# These are definitions for the ksh compiled-in `exported aliases'. There
+# are others, but we already have substitutes for them: "history", "type",
+# and "hash".
+#
+alias r="fc -s"
+alias functions="typeset -f"
+alias integer="typeset -i"
+alias nohup="nohup "
+alias command="command "
+alias stop="kill -s STOP"
+alias redirect="command exec"
+alias hist="fc"
+
+#
+# An almost-ksh compatible `whence' command. This is as hairy as it is
+# because of the desire to exactly mimic ksh (whose behavior was determined
+# empirically).
+#
+# This depends somewhat on knowing the format of the output of the bash
+# `builtin type' command.
+#
+
+whence()
+{
+ local vflag pflag fflag defarg c
+ local path
+
+ vflag= aflag= pflag= fflag=
+ path=
+ if [ "$#" = "0" ] ; then
+ echo "whence: usage: whence [-afpv] name..." >&2
+ return 2
+ fi
+
+ OPTIND=1
+ while getopts "avfp" c
+ do
+ case "$c" in
+ a) defarg=-a ;;
+ f) fflag=1 ;; # no-op
+ p) pflag=1 ;;
+ v) vflag=1 ;;
+ ?) echo "whence: $1: unknown option" >&2
+ echo "whence: usage: whence [-afpv] name..." >&2
+ return 2 ;;
+ esac
+ done
+
+ shift $(( $OPTIND - 1 ))
+
+ if [ "$#" = "0" ] ; then
+ echo "whence: usage: whence [-afpv] name..." >&2
+ return 2
+ fi
+
+ for cmd
+ do
+ if [ "$vflag" ] ; then
+ if [ -z "$defarg" ]; then
+ builtin type $cmd | sed 1q
+ else
+ if builtin type $defarg -t $cmd | grep 'function$' >/dev/null 2>&1; then
+ # HAIRY awk script to suppress
+ # printing of function body -- could
+ # do it with sed, but I don't have
+ # that kind of time
+ builtin type $defarg $cmd | awk '
+BEGIN {printit = 1;}
+$1 == "'$cmd'" && $2 == "()" {printit=0; next; }
+/^}$/ { if (printit == 0) printit=1 ; else print $0; next ; }
+/.*/ { if (printit) print $0; }'
+ else
+ builtin type $defarg $cmd
+ fi
+ fi
+ else
+ path=$(builtin type $defarg -p $cmd)
+ if [ "$path" ] ; then
+ echo $path
+ else
+ case "$cmd" in
+ /*) echo "" ;;
+ *) case "$(builtin type -t $cmd)" in
+ "") echo "" ;;
+ *) echo "$cmd" ;;
+ esac
+ ;;
+ esac
+ fi
+ fi
+ done
+ return 0
+}
+
+#
+# For real ksh homeboy fanatics, redefine the `type' builtin with a ksh
+# version.
+#
+#type()
+#{
+# whence -v "$*"
+#}
+
+#
+# ksh-like `cd': cd [-LP] [dir [change]]
+#
+cd()
+{
+ OPTIND=1
+ while getopts "LP" opt
+ do
+ case $opt in
+ L|P) CDOPTS="$CDOPTS -$opt" ;;
+ *) echo "$FUNCNAME: usage: $FUNCNAME [-LP] [dir] [change]" >&2
+ return 2;;
+ esac
+ done
+
+ shift $(( $OPTIND - 1 ))
+
+ case $# in
+ 0) builtin cd $CDOPTS "$HOME" ;;
+ 1) builtin cd $CDOPTS "$@" ;;
+ 2) old="$1" new="$2"
+ case "$PWD" in
+ *$old*) ;;
+ *) echo "${0##*/}: $FUNCNAME: bad substitution" >&2 ; return 1 ;;
+ esac
+
+ dir=${PWD//$old/$new}
+
+ builtin cd $CDOPTS "$dir" && echo "$PWD"
+
+ ;;
+ *) echo "${0##*/}: $FUNCNAME: usage: $FUNCNAME [-LP] [dir] [change]" >&2
+ return 2 ;;
+ esac
+}
+
+#
+# ksh print emulation
+#
+# print [-Rnprsu[n]] [-f format] [arg ...]
+#
+# - end of options
+# -R BSD-style -- only accept -n, no escapes
+# -n do not add trailing newline
+# -p no-op (no coprocesses)
+# -r no escapes
+# -s print to the history file
+# -u n redirect output to fd n
+# -f format printf "$format" "$@"
+#
+
+print()
+{
+ local eflag=-e
+ local nflag= fflag= c
+ local fd=1
+
+ OPTIND=1
+ while getopts "fRnprsu:" c
+ do
+ case $c in
+ R) eflag= ;;
+ r) eflag= ;;
+ n) nflag=-n ;;
+ s) sflag=y ;;
+ f) fflag=y ;;
+ u) fd=$OPTARG ;;
+ p) ;;
+ esac
+ done
+ shift $(( $OPTIND - 1 ))
+
+ if [ -n "$fflag" ]; then
+ builtin printf "$@" >&$fd
+ return
+ fi
+
+ case "$sflag" in
+ y) builtin history -s "$*" ;;
+ *) builtin echo $eflag $nflag "$@" >&$fd
+ esac
+}
+
+# substring function
+# this function should be equivalent to the substring built-in which was
+# eliminated after the 06/29/84 version
+substring ()
+{
+ local lpat flag str #local variables
+ set -f
+ case $1 in
+ -l|-L)
+ flag=$1
+ lpat=$2
+ shift 2
+ ;;
+ esac
+ # test for too few or too many arguments
+ if [ x"$1" = x ] || [ $# -gt 2 ]; then
+ print -u2 'substring: bad argument count'
+ return 1
+ fi
+ str=$1
+ if [ x"$flag" = x-l ]; then #substring -l lpat
+ str=${str#$lpat}
+ elif [ x"$flag" = x-L ]; then
+ str=${str##$lpat} #substring -L lpat
+ fi
+
+ if [ x"$2" != x ]; then
+ echo ${str%$2}
+ else
+ echo $str
+ fi
+
+ return 0
+}
diff --git a/examples/functions/login b/examples/functions/login
new file mode 100644
index 0000000..3d59683
--- /dev/null
+++ b/examples/functions/login
@@ -0,0 +1,11 @@
+# replace the `login' and `newgrp' builtins in old bourne shells
+
+login()
+{
+ exec login "$@"
+}
+
+newgrp()
+{
+ exec newgrp "$@"
+}
diff --git a/examples/functions/lowercase b/examples/functions/lowercase
new file mode 100644
index 0000000..3cf6bde
--- /dev/null
+++ b/examples/functions/lowercase
@@ -0,0 +1,27 @@
+#! /bin/bash
+#
+# original from
+# @(#) lowercase.ksh 1.0 92/10/08
+# 92/10/08 john h. dubois iii (john@armory.com)
+#
+# conversion to bash v2 syntax done by Chet Ramey
+
+lowercase()
+{
+ for file; do
+ [ -f "$file" ] || continue
+ filename=${file##*/}
+ case "$file" in
+ */*) dirname=${file%/*} ;;
+ *) dirname=.;;
+ esac
+ nf=$(echo $filename | tr A-Z a-z)
+ newname="${dirname}/${nf}"
+ if [ "$nf" != "$filename" ]; then
+ mv "$file" "$newname"
+ echo "lowercase: $file -> $newname"
+ else
+ echo "lowercase: $file not changed."
+ fi
+ done
+}
diff --git a/examples/functions/manpage b/examples/functions/manpage
new file mode 100644
index 0000000..60f9aed
--- /dev/null
+++ b/examples/functions/manpage
@@ -0,0 +1,129 @@
+# Written from scratch by Tom Tromey (tromey@cns.caltech.edu)
+#
+# manpage -- find and print a manual page.
+# usage: manpage section name [printing]
+#
+function manpage ()
+{
+ local i h cmd zot sec
+ local num="$1"
+ local page="$2"
+ local printing="$3"
+ local mp
+
+ mp="${MANPATH:-/usr/man}"
+ if [ "$#" -lt 2 ]; then return 1; fi # should print usage
+ if [ "$num" != "" ]; then
+ sec="${num%%[a-zA-Z]*}"
+ else
+ sec='[168234571lnpo]'
+ num="$sec"
+ fi
+ for i in $(echo "$mp" | tr : ' '); do
+ if [ ! -d "$i" ]; then continue; fi
+ file="$i"/man"$sec"/"$page"."$num"*
+ set $file
+ file="$1"
+ if [ -f "$file" ]; then
+ zot=$(sed 1q "$file")
+ cmd=${MANROFF:-"nroff -man - | col | cat -s"}
+ h=${zot##"'"'\"'}
+ if [ "$h" != "$zot" ]; then
+ while [ "$h" != "" ]; do
+ case "$h" in
+ *e) cmd="${MANEQN:-neqn} | $cmd";;
+ *r) cmd="refer | $cmd";;
+ *t) cmd="tbl | $cmd";;
+ *v) cmd="vgrind | $cmd";;
+ *) ;; # should print error
+ esac
+ h=${h%?}
+ done
+ fi
+ if [ "$printing" != "" ]; then
+ (cd "$i"; eval "$cmd") < "$file" | ${PAGER:-more}
+ else
+ (cd "$i"; eval "$cmd") < "$file" > /tmp/manpage-$$
+ ${PAGER:-more} /tmp/manpage-$$
+ rm -f /tmp/manpage-$$
+ fi
+ break
+ fi
+ done
+}
+
+function whatis_internal ()
+{
+ local j
+ for j in $(echo "$MANPATH" | tr : ' '); do
+ if [ -f "$j/whatis" ]; then
+ eval $2 -i -e "$1" $j/whatis
+ fi
+ done
+}
+
+function whatis ()
+{
+ local name=$(basename "$1")
+ whatis_internal "$name" "grep -w"
+}
+
+function apropos ()
+{
+ whatis_internal "$1" "grep -F"
+}
+
+# Note: "-" and "-t" together not supported. This man could be
+# made a lot better, but it does everything I want.
+function man ()
+{
+ local PAGER printing mpath MANROFF num
+ mpath="${MANPATH:-/usr/man}"
+ while true; do
+ case "$1" in
+ -) PAGER=cat
+ printing= ;;
+ -t)
+ MANROFF=${TROFF:-"ptroff -man -t"}
+ PAGER="${TCAT:-lpr}"
+ printing=yes ;;
+ -M)
+ mpath="$2"
+ shift;;
+ *) break;;
+ esac
+ shift
+ done
+ local MANPATH="$mpath"
+ case "$1" in
+ -f | -k)
+ local g a
+ if [ "$1" = "-f" ]; then
+ g="grep -w"
+ a=$(basename "$2")
+ else
+ g="grep -F"
+ a="$2"
+ fi
+ whatis_internal "$a" "$g"
+ ;;
+ [0-9npol] | [0-9][a-z]* | new | public | old | local)
+ if [ "$1" = "new" ]; then
+ num=n
+ elif [ "$1" = "public" ]; then
+ num=p
+ elif [ "$1" = "old" ]; then
+ num=o
+ elif [ "$1" = "local" ]; then
+ num=l
+ else
+ num="$1"
+ fi
+ shift
+ manpage "$num" "$1" "$printing"
+ ;;
+ *)
+ manpage "$num" "$1" "$printing"
+ ;;
+ esac
+}
diff --git a/examples/functions/mhfold b/examples/functions/mhfold
new file mode 100644
index 0000000..3c0c743
--- /dev/null
+++ b/examples/functions/mhfold
@@ -0,0 +1,16 @@
+# To: chet@ins.CWRU.Edu
+# Subject: Bash functions
+# From: Sandeep Mehta <sxm@philabs.Philips.Com>
+
+# print MH folders, useful only because folders(1) doesn't print
+# mod date/times
+
+mhfold()
+{
+ list=`folders | awk '{if (1 < NR) print $1}'`
+ /bin/ls -lag ~/Mail > /tmp/fold$$
+ for i in $list; do
+ grep $i /tmp/fold$$
+ done
+ /bin/rm -f /tmp/fold$$
+}
diff --git a/examples/functions/notify.bash b/examples/functions/notify.bash
new file mode 100644
index 0000000..dafbac5
--- /dev/null
+++ b/examples/functions/notify.bash
@@ -0,0 +1,58 @@
+trap _notify CHLD
+NOTIFY_ALL=false
+unset NOTIFY_LIST
+unalias false
+
+false()
+{
+ return 1
+}
+
+_notify ()
+{
+ local i j
+ local newlist=
+
+ if $NOTIFY_ALL
+ then
+ return # let bash take care of this itself
+ elif [ -z "$NOTIFY_LIST" ]; then
+ return
+ else
+ set -- $NOTIFY_LIST
+ for i in "$@"
+ do
+ j=$(jobs -n %$i)
+ if [ -n "$j" ]; then
+ echo "$j"
+ jobs -n %$i >/dev/null
+ else
+ newlist="newlist $i"
+ fi
+ done
+ NOTIFY_LIST="$newlist"
+ fi
+}
+
+notify ()
+{
+ local i j
+
+ if [ $# -eq 0 ]; then
+ NOTIFY_ALL=:
+ set -b
+ return
+ else
+ for i in "$@"
+ do
+ # turn a valid job spec into a job number
+ j=$(jobs $i)
+ case "$j" in
+ [*) j=${j%%]*}
+ j=${j#[}
+ NOTIFY_LIST="$NOTIFY_LIST $j"
+ ;;
+ esac
+ done
+ fi
+}
diff --git a/examples/functions/pathfuncs b/examples/functions/pathfuncs
new file mode 100644
index 0000000..56fdca3
--- /dev/null
+++ b/examples/functions/pathfuncs
@@ -0,0 +1,45 @@
+#From: "Simon J. Gerraty" <sjg@zen.void.oz.au>
+#Message-Id: <199510091130.VAA01188@zen.void.oz.au>
+#Subject: Re: a shell idea?
+#Date: Mon, 09 Oct 1995 21:30:20 +1000
+
+
+# NAME:
+# add_path.sh - add dir to path
+#
+# DESCRIPTION:
+# These functions originated in /etc/profile and ksh.kshrc, but
+# are more useful in a separate file.
+#
+# SEE ALSO:
+# /etc/profile
+#
+# AUTHOR:
+# Simon J. Gerraty <sjg@zen.void.oz.au>
+
+# @(#)Copyright (c) 1991 Simon J. Gerraty
+#
+# This file is provided in the hope that it will
+# be of use. There is absolutely NO WARRANTY.
+# Permission to copy, redistribute or otherwise
+# use this file is hereby granted provided that
+# the above copyright notice and this notice are
+# left intact.
+
+# is $1 missing from $2 (or PATH) ?
+no_path() {
+ eval "case :\$${2-PATH}: in *:$1:*) return 1;; *) return 0;; esac"
+}
+# if $1 exists and is not in path, append it
+add_path () {
+ [ -d ${1:-.} ] && no_path $* && eval ${2:-PATH}="\$${2:-PATH}:$1"
+}
+# if $1 exists and is not in path, prepend it
+pre_path () {
+ [ -d ${1:-.} ] && no_path $* && eval ${2:-PATH}="$1:\$${2:-PATH}"
+}
+# if $1 is in path, remove it
+del_path () {
+ no_path $* || eval ${2:-PATH}=`eval echo :'$'${2:-PATH}: |
+ sed -e "s;:$1:;:;g" -e "s;^:;;" -e "s;:\$;;"`
+}
diff --git a/examples/functions/recurse b/examples/functions/recurse
new file mode 100644
index 0000000..f69cd50
--- /dev/null
+++ b/examples/functions/recurse
@@ -0,0 +1,63 @@
+#!/bin/bash
+
+#From: kaz@ashi.footprints.net (Kaz Kylheku)
+#Newsgroups: comp.os.linux.misc
+#Subject: Re: bash question: subdirectories
+#Message-ID: <slrn8a0gu9.v5n.kaz@ashi.FootPrints.net>
+#Date: Tue, 08 Feb 2000 16:24:35 GMT
+
+#Actually it can be made to. That is to say, it is possible to code a recursive
+#descender function in the bash language. Here is an example.
+#
+#What is nice about this is that you can embed the function into your shell
+#script. The function changes the current working directory as it descends.
+#So it can handle arbitrarily deep paths. Whereas paths generated by the
+#find command can cause a problem when they get too long; the kernel has a
+#hard limit on the length of the string passed to the open() and other
+#system calls.
+
+#There are races; what if the directory tree is blown away during the traversal?
+#The function won't be able to crawl back up using the .. link and will just
+#bail.
+
+# Recursive Directory Traverser
+# Author: Kaz Kylheku
+# Date: Feb 27, 1999
+# Copyright 1999
+
+# Function parameter usage:
+# $1 directory to search
+# $2 pattern to search for
+# $3 command to execute
+# $4 secret argument for passing down path
+
+function recurse
+{
+ local file
+ local path
+
+ if [ "$4" = "" ] ; then
+ path="${1%/}/"
+ else
+ path="$4$1/"
+ fi
+
+ if cd "$1" ; then
+ for file in $2; do
+ if [ -f "$file" ] || [ -d "$file" ]; then
+ eval "$3"
+ fi
+ done
+ for file in .* * ; do
+ if [ "$file" = "." ] || [ "$file" = ".." ] ; then
+ continue
+ fi
+ if [ -d "$file" ] && [ ! -L "$file" ]; then
+ recurse "$file" "$2" "$3" "$path"
+ fi
+ done
+ cd ..
+ fi
+}
+
+recurse "$1" "$2" 'echo "$path$file"'
diff --git a/examples/functions/repeat2 b/examples/functions/repeat2
new file mode 100644
index 0000000..2e2dc7a
--- /dev/null
+++ b/examples/functions/repeat2
@@ -0,0 +1,43 @@
+# To: chet@ins.CWRU.Edu
+# Subject: Bash functions
+# From: Sandeep Mehta <sxm@philabs.Philips.Com>
+
+##########################################
+#
+# repeat - clone of C shell builtin `repeat'
+#
+# usage: repeat <count> <command>
+#
+# It has been tested inside other functions and in conditionals like
+# if [ "`repeat <count> <command>`" ]; then COMMANDS [ else COMMANDS ] fi
+# Please send me fixes/enhancements.
+#
+# Sandeep Mehta <sxm@philabs.Philips.Com>
+##########################################
+repeat()
+{
+ local rcount=$1
+
+ if [ $# -le 1 ] || [ -z "$rcount" ]; then
+ echo "usage: repeat <count> <command>" 1>&2
+ return 2
+ fi
+
+ shift
+
+ local acmd=("$@")
+
+ if [ $rcount -le 0 ]; then
+ echo "count must be greater than 0"
+ echo "usage: repeat <count> <command>" 1>&2
+ return 2
+ fi
+
+ st=0
+ while [ $rcount -gt 0 ]; do
+ eval "${acmd[@]}"
+ st=$?
+ rcount=$((rcount - 1))
+ done
+ return $st
+}
diff --git a/examples/functions/repeat3 b/examples/functions/repeat3
new file mode 100644
index 0000000..65048bf
--- /dev/null
+++ b/examples/functions/repeat3
@@ -0,0 +1,12 @@
+# From psamuels@jake.niar.twsu.edu (Peter Samuelson)
+# posted to usenet, Message-ID: <6rtp8j$2a0$1@jake.niar.twsu.edu>
+
+repeat ()
+{
+ local i max; # note that you can use \$i in the command string
+ max=$1; shift;
+
+ i=1; while ((i <= max)); do
+ eval "$@"; ((i = i + 1));
+ done;
+}
diff --git a/examples/functions/seq b/examples/functions/seq
new file mode 100644
index 0000000..87c8a2c
--- /dev/null
+++ b/examples/functions/seq
@@ -0,0 +1,29 @@
+# Generate a sequence from m to n, m defaults to 1.
+
+seq ()
+{
+ declare -i lo hi i # makes local
+ local _SEQ
+
+ case $# in
+ 1) seq 1 "$1" ; return $? ;;
+ 2) lo=$1 hi=$2
+ i=$lo _SEQ=""
+ while let "i <= hi"; do
+ _SEQ="${_SEQ}$i "
+ let i+=1
+ done
+ echo "${_SEQ# }"
+ return 0 ;;
+ *) echo seq: usage: seq [low] high 1>&2 ; return 2 ;;
+ esac
+}
+
+# like the APL `iota' function (or at least how I remember it :-)
+iota()
+{
+ case $# in
+ 1) seq 1 "$1"; return $?;;
+ *) echo "iota: usage: iota high" 1>&2; return 2;;
+ esac
+}
diff --git a/examples/functions/seq2 b/examples/functions/seq2
new file mode 100644
index 0000000..c3ad95c
--- /dev/null
+++ b/examples/functions/seq2
@@ -0,0 +1,37 @@
+# Generate a sequence from m to n, m defaults to 1.
+
+seq ()
+{
+ declare -i lo hi i # makes local
+ local _SEQ INIT COMPARE STEP
+
+ case "$1" in
+ -r) INIT='i=$hi _SEQ=""' COMPARE='let "i >= $lo"' STEP='let i-=1' ; shift ;;
+ *) INIT='i=$lo _SEQ=""' COMPARE='let "i <= $hi"' STEP='let i+=1' ;;
+ esac
+
+ case $# in
+ 1) lo=1 hi="$1" ;;
+ 2) lo=$1 hi=$2 ;;
+ *) echo seq: usage: seq [-r] [low] high 1>&2 ; return 2 ;;
+ esac
+
+ # equivalent to the as-yet-unimplemented
+ # for (( "$INIT" ; "$COMPARE" ; "$STEP" )); do _SEQ="${_SEQ}$i "; done
+ eval "$INIT"
+ while eval "$COMPARE"; do
+ _SEQ="${_SEQ}$i "
+ eval "$STEP"
+ done
+ echo "${_SEQ# }"
+ return 0
+}
+
+# like the APL `iota' function (or at least how I remember it :-)
+iota()
+{
+ case $# in
+ 1) seq 1 "$1"; return $?;;
+ *) echo "iota: usage: iota high" 1>&2; return 2;;
+ esac
+}
diff --git a/examples/functions/shcat b/examples/functions/shcat
new file mode 100644
index 0000000..c5d3d63
--- /dev/null
+++ b/examples/functions/shcat
@@ -0,0 +1,7 @@
+shcat()
+{
+ while read -r line
+ do
+ echo "$line"
+ done
+}
diff --git a/examples/functions/shcat2 b/examples/functions/shcat2
new file mode 100644
index 0000000..6fe90f4
--- /dev/null
+++ b/examples/functions/shcat2
@@ -0,0 +1,19 @@
+shcat()
+{
+ while read -r line
+ do
+ echo "$line"
+ done
+}
+
+shcat2()
+{
+ while [ $# -ge 1 ]; do
+ case "$1" in
+ -) shcat ;;
+ *) shcat < "$1" ;;
+ esac
+ shift
+ done
+ exit 0
+}
diff --git a/examples/functions/sort-pos-params b/examples/functions/sort-pos-params
new file mode 100644
index 0000000..0052b46
--- /dev/null
+++ b/examples/functions/sort-pos-params
@@ -0,0 +1,50 @@
+# Sort the positional paramters.
+# Make sure the positional parameters are passed as arguments to the function.
+# If -u is the first arg, remove duplicate array members.
+sort_posparams()
+{
+ local -a R
+ local u
+
+ case "$1" in
+ -u) u=-u ; shift ;;
+ esac
+
+ # if you want the case of no positional parameters to return success,
+ # remove the error message and return 0
+ if [ $# -eq 0 ]; then
+ echo "$FUNCNAME: argument expected" >&2
+ return 1
+ fi
+
+ # make R a copy of the positional parameters
+ R=( "${@}" )
+
+ # sort R.
+ R=( $( printf "%s\n" "${R[@]}" | sort $u) )
+
+ printf "%s\n" "${R[@]}"
+ return 0
+}
+
+# will print everything on separate lines
+set -- 3 1 4 1 5 9 2 6 5 3 2
+sort_posparams "$@"
+
+# sets without preserving quoted parameters
+set -- $( sort_posparams "$@" )
+echo "$@"
+echo $#
+
+# sets preserving quoted parameters, beware pos params with embedded newlines
+set -- 'a b' 'a c' 'x z'
+
+oifs=$IFS
+IFS=$'\n'
+set -- $( sort_posparams "$@" )
+IFS="$oifs"
+
+echo "$@"
+echo $#
+
+sort_posparams
diff --git a/examples/functions/substr b/examples/functions/substr
new file mode 100644
index 0000000..a80b3b4
--- /dev/null
+++ b/examples/functions/substr
@@ -0,0 +1,79 @@
+#
+# substr -- a function to emulate the ancient ksh builtin
+#
+
+#
+# -l == shortest from left
+# -L == longest from left
+# -r == shortest from right (the default)
+# -R == longest from right
+
+substr()
+{
+ local flag pat str
+ local usage="usage: substr -lLrR pat string or substr string pat"
+
+ case "$1" in
+ -l | -L | -r | -R)
+ flag="$1"
+ pat="$2"
+ shift 2
+ ;;
+ -*)
+ echo "substr: unknown option: $1"
+ echo "$usage"
+ return 1
+ ;;
+ *)
+ flag="-r"
+ pat="$2"
+ ;;
+ esac
+
+ if [ "$#" -eq 0 ] || [ "$#" -gt 2 ] ; then
+ echo "substr: bad argument count"
+ return 2
+ fi
+
+ str="$1"
+
+ #
+ # We don't want -f, but we don't want to turn it back on if
+ # we didn't have it already
+ #
+ case "$-" in
+ "*f*")
+ ;;
+ *)
+ fng=1
+ set -f
+ ;;
+ esac
+
+ case "$flag" in
+ -l)
+ str="${str#$pat}" # substr -l pat string
+ ;;
+ -L)
+ str="${str##$pat}" # substr -L pat string
+ ;;
+ -r)
+ str="${str%$pat}" # substr -r pat string
+ ;;
+ -R)
+ str="${str%%$pat}" # substr -R pat string
+ ;;
+ *)
+ str="${str%$2}" # substr string pat
+ ;;
+ esac
+
+ echo "$str"
+
+ #
+ # If we had file name generation when we started, re-enable it
+ #
+ if [ "$fng" = "1" ] ; then
+ set +f
+ fi
+}
diff --git a/examples/functions/substr2 b/examples/functions/substr2
new file mode 100644
index 0000000..2bb8d36
--- /dev/null
+++ b/examples/functions/substr2
@@ -0,0 +1,81 @@
+#
+# substr -- a function to emulate the ancient ksh builtin
+#
+
+# -l == remove shortest from left
+# -L == remove longest from left
+# -r == remove shortest from right (the default)
+# -R == remove longest from right
+
+substr()
+{
+ local flag pat str
+ local usage="usage: substr -lLrR pat string or substr string pat"
+ local options="l:L:r:R:"
+
+ OPTIND=1
+ while getopts "$options" c
+ do
+ case "$c" in
+ l | L | r | R)
+ flag="-$c"
+ pat="$OPTARG"
+ ;;
+ '?')
+ echo "$usage"
+ return 1
+ ;;
+ esac
+ done
+
+ if [ "$OPTIND" -gt 1 ] ; then
+ shift $[ $OPTIND -1 ]
+ fi
+
+ if [ "$#" -eq 0 ] || [ "$#" -gt 2 ] ; then
+ echo "substr: bad argument count"
+ return 2
+ fi
+
+ str="$1"
+
+ #
+ # We don't want -f, but we don't want to turn it back on if
+ # we didn't have it already
+ #
+ case "$-" in
+ "*f*")
+ ;;
+ *)
+ fng=1
+ set -f
+ ;;
+ esac
+
+ case "$flag" in
+ -l)
+ str="${str#$pat}" # substr -l pat string
+ ;;
+ -L)
+ str="${str##$pat}" # substr -L pat string
+ ;;
+ -r)
+ str="${str%$pat}" # substr -r pat string
+ ;;
+ -R)
+ str="${str%%$pat}" # substr -R pat string
+ ;;
+ *)
+ str="${str%$2}" # substr string pat
+ ;;
+ esac
+
+ echo "$str"
+
+ #
+ # If we had file name generation when we started, re-enable it
+ #
+ if [ "$fng" = "1" ] ; then
+ set +f
+ fi
+}
diff --git a/examples/functions/term b/examples/functions/term
new file mode 100644
index 0000000..fbe99f1
--- /dev/null
+++ b/examples/functions/term
@@ -0,0 +1,35 @@
+#
+# term -- a shell function to set the terminal type interactively or not.
+#
+
+term()
+{
+ local t
+
+ if [ $# != 0 ] ; then
+ eval $(tset -sQ $1)
+ else # interactive
+ if [ -z "$TERM" ] ; then
+ TERM="unknown"
+ fi
+
+ case "$TERM" in
+ network|dialup|unknown|lat)
+ TERM=unknown
+ ;;
+ *)
+ eval $(tset -sQ)
+ ;;
+ esac
+
+ while [ "$TERM" = "unknown" ] ; do
+ echo -n "Terminal type: "
+ read t
+ if [ -n "$t" ] ; then
+ eval $(tset -sQ $t)
+ fi
+ done
+ fi
+}
+
+
diff --git a/examples/functions/whatis b/examples/functions/whatis
new file mode 100644
index 0000000..56c5a58
--- /dev/null
+++ b/examples/functions/whatis
@@ -0,0 +1,52 @@
+#
+# whatis -- and implementation of the 10th Edition Unix sh builtin `whatis'
+# command.
+#
+# usage: whatis arg [...]
+#
+# For each argument, whatis prints the associated value as a parameter,
+# builtin, function, alias, or executable file as appropriate. In each
+# case, the value is printed in a form which would yield the same value
+# if typed as input to the shell itself.
+#
+
+whatis()
+{
+ local wusage='usage: whatis arg [arg...]'
+ local fail=0
+
+ if [ $# -eq 0 ] ; then
+ echo "$wusage"
+ return 1
+ fi
+
+ for arg
+ do
+ case $(builtin type -type $arg 2>/dev/null) in
+ "alias")
+ builtin alias "$arg"
+ ;;
+ "function")
+ builtin type "$arg" | sed 1d
+ ;;
+ "builtin")
+ echo builtin "$arg"
+ ;;
+ "file")
+ builtin type -path "$arg"
+ ;;
+ *)
+ # OK, we could have a variable, or we could have nada
+ if [ "$(eval echo \${$arg+set})" = "set" ] ; then
+ # It is a variable, and it is set
+ echo -n "$arg="
+ eval echo '\"'\$$arg'\"'
+ else
+ echo whatis: $arg: not found
+ fail=1
+ fi
+ ;;
+ esac
+ done
+ return $fail
+}
diff --git a/examples/functions/whence b/examples/functions/whence
new file mode 100644
index 0000000..70b2322
--- /dev/null
+++ b/examples/functions/whence
@@ -0,0 +1,59 @@
+#
+# An almost-ksh compatible `whence' command. This is as hairy as it is
+# because of the desire to exactly mimic ksh.
+#
+# This depends somewhat on knowing the format of the output of the bash
+# `builtin type' command.
+#
+# Chet Ramey
+# chet@ins.CWRU.Edu
+#
+whence()
+{
+ local vflag= path=
+
+ if [ "$#" = "0" ] ; then
+ echo "whence: argument expected"
+ return 1
+ fi
+ case "$1" in
+ -v) vflag=1
+ shift 1
+ ;;
+ -*) echo "whence: bad option: $1"
+ return 1
+ ;;
+ *) ;;
+ esac
+
+ if [ "$#" = "0" ] ; then
+ echo "whence: bad argument count"
+ return 1
+ fi
+
+ for cmd
+ do
+ if [ "$vflag" ] ; then
+ echo $(builtin type $cmd | sed 1q)
+ else
+ path=$(builtin type -path $cmd)
+ if [ "$path" ] ; then
+ echo $path
+ else
+ case "$cmd" in
+ /*) if [ -x "$cmd" ]; then
+ echo "$cmd"
+ fi
+ ;;
+ *) case "$(builtin type -type $cmd)" in
+ "") ;;
+ *) echo "$cmd"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ fi
+ done
+ return 0
+}
diff --git a/examples/functions/which b/examples/functions/which
new file mode 100644
index 0000000..ca33703
--- /dev/null
+++ b/examples/functions/which
@@ -0,0 +1,44 @@
+#
+# which - emulation of `which' as it appears in FreeBSD
+#
+# usage: which [-as] command [command...]
+#
+
+which()
+{
+ local aflag sflag ES a opt
+
+ OPTIND=1
+ while builtin getopts as opt ; do
+ case "$opt" in
+ a) aflag=-a ;;
+ s) sflag=1 ;;
+ ?) echo "which: usage: which [-as] command [command ...]" >&2
+ exit 2 ;;
+ esac
+ done
+
+ (( $OPTIND > 1 )) && shift $(( $OPTIND - 1 ))
+
+ # without command arguments, exit with status 1
+ ES=1
+
+ # exit status is 0 if all commands are found, 1 if any are not found
+ for command; do
+ # if $command is a function, make sure we add -a so type
+ # will look in $PATH after finding the function
+ a=$aflag
+ case "$(builtin type -t $command)" in
+ "function") a=-a;;
+ esac
+
+ if [ -n "$sflag" ]; then
+ builtin type -p $a $command >/dev/null 2>&1
+ else
+ builtin type -p $a $command
+ fi
+ ES=$?
+ done
+
+ return $ES
+}
diff --git a/examples/functions/xalias.bash b/examples/functions/xalias.bash
new file mode 100644
index 0000000..88a00dc
--- /dev/null
+++ b/examples/functions/xalias.bash
@@ -0,0 +1,22 @@
+# xalias - convert csh alias commands to bash functions
+# from Mohit Aron <aron@cs.rice.edu>
+# posted to usenet as <4i5p17$bnu@larry.rice.edu>
+function xalias ()
+{
+ if [ "x$2" = "x" ]
+ then
+ declare -f $1
+ else
+ case $2 in
+ *[#\!]*)
+ comm=$(echo $2 | sed 's/\\!\*/\"$\@\"/g
+ s/\\!:\([1-9]\)/\"$\1\"/g
+ s/#/\\#/g')
+ ;;
+ *)
+ comm="$2 \"\$@\"" ;;
+ esac
+
+ eval function $1 \(\) "{" command "$comm" "; }"
+ fi
+}
diff --git a/examples/functions/xfind.bash b/examples/functions/xfind.bash
new file mode 100644
index 0000000..6d29038
--- /dev/null
+++ b/examples/functions/xfind.bash
@@ -0,0 +1,52 @@
+#! /bin/bash
+#From: kaz@cafe.net (Kaz Kylheku)
+#Newsgroups: comp.unix.shell
+#Subject: Why not roll your own @#$% find! (was: splitting directory off from filename)
+#Message-ID: <6n1117$tp1@espresso.cafe.net>
+#Date: Fri, 26 Jun 1998 20:47:34 GMT
+
+# $1 = dirname, $2 = pattern, optional $3 = action
+xfind()
+{
+ local x
+ local dir="$1"
+
+ # descend into specified directory
+
+ builtin cd -L "$1" || {
+ echo "${FUNCNAME}: cannot change dir to $1" >&2
+ return 1
+ }
+
+ #
+ # default action is to print the filename
+ #
+ if [ -n "$3" ]; then
+ action="$3"
+ else
+ action='printf -- "%s\n"'
+ fi
+
+ # process ordinary files that match pattern
+
+ for x in $2 ; do
+ if [ -f "$x" ] ; then
+ eval "$action" "$x"
+ fi
+ done
+
+ # now descend into subdirectories, avoiding symbolic links
+ # and directories that start with a period.
+
+ for x in * ; do
+ if [ -d "$x" ] && [ ! -L "$x" ] ; then
+ $FUNCNAME "$x" "$2" "$action"
+ fi
+ done
+
+ # finally, pop back up
+
+ builtin cd -L ..
+}
+
+#xfind "$@"
diff --git a/examples/loadables/Makefile.in b/examples/loadables/Makefile.in
new file mode 100644
index 0000000..343beb0
--- /dev/null
+++ b/examples/loadables/Makefile.in
@@ -0,0 +1,244 @@
+#
+# Simple makefile for the sample loadable builtins
+#
+# Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+# Include some boilerplate Gnu makefile definitions.
+prefix = @prefix@
+
+exec_prefix = @exec_prefix@
+bindir = @bindir@
+libdir = @libdir@
+infodir = @infodir@
+includedir = @includedir@
+
+datarootdir = @datarootdir@
+
+topdir = @top_srcdir@
+BUILD_DIR = @BUILD_DIR@
+srcdir = @srcdir@
+VPATH = .:@srcdir@
+
+@SET_MAKE@
+CC = @CC@
+RM = rm -f
+
+SHELL = @MAKE_SHELL@
+
+host_os = @host_os@
+host_cpu = @host_cpu@
+host_vendor = @host_vendor@
+
+CFLAGS = @CFLAGS@
+LOCAL_CFLAGS = @LOCAL_CFLAGS@
+DEFS = @DEFS@
+LOCAL_DEFS = @LOCAL_DEFS@
+
+CPPFLAGS = @CPPFLAGS@
+
+BASHINCDIR = ${topdir}/include
+
+LIBBUILD = ${BUILD_DIR}/lib
+
+INTL_LIBSRC = ${topdir}/lib/intl
+INTL_BUILDDIR = ${LIBBUILD}/intl
+INTL_INC = @INTL_INC@
+LIBINTL_H = @LIBINTL_H@
+
+CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) $(CFLAGS)
+
+#
+# These values are generated for configure by ${topdir}/support/shobj-conf.
+# If your system is not supported by that script, but includes facilities for
+# dynamic loading of shared objects, please update the script and send the
+# changes to bash-maintainers@gnu.org.
+#
+SHOBJ_CC = @SHOBJ_CC@
+SHOBJ_CFLAGS = @SHOBJ_CFLAGS@
+SHOBJ_LD = @SHOBJ_LD@
+SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@ @LDFLAGS@
+SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@
+SHOBJ_LIBS = @SHOBJ_LIBS@
+SHOBJ_STATUS = @SHOBJ_STATUS@
+
+INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \
+ -I$(BASHINCDIR) -I$(BUILD_DIR) -I$(LIBBUILD) \
+ -I$(BUILD_DIR)/builtins $(INTL_INC)
+
+.c.o:
+ $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CCFLAGS) $(INC) -c -o $@ $<
+
+
+ALLPROG = print truefalse sleep pushd finfo logname basename dirname \
+ tty pathchk tee head mkdir rmdir printenv id whoami \
+ uname sync push ln unlink cut realpath getconf strftime mypid
+OTHERPROG = necho hello cat
+
+all: $(SHOBJ_STATUS)
+
+supported: $(ALLPROG)
+others: $(OTHERPROG)
+
+unsupported:
+ @echo "Your system (${host_os}) is not supported by the"
+ @echo "${topdir}/support/shobj-conf script."
+ @echo "If your operating system provides facilities for dynamic"
+ @echo "loading of shared objects using the dlopen(3) interface,"
+ @echo "please update the script and re-run configure.
+ @echo "Please send the changes you made to bash-maintainers@gnu.org"
+ @echo "for inclusion in future bash releases."
+
+everything: supported others
+
+print: print.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ print.o $(SHOBJ_LIBS)
+
+necho: necho.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ necho.o $(SHOBJ_LIBS)
+
+getconf: getconf.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ getconf.o $(SHOBJ_LIBS)
+
+hello: hello.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ hello.o $(SHOBJ_LIBS)
+
+truefalse: truefalse.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ truefalse.o $(SHOBJ_LIBS)
+
+sleep: sleep.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ sleep.o $(SHOBJ_LIBS)
+
+finfo: finfo.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ finfo.o $(SHOBJ_LIBS)
+
+cat: cat.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cat.o $(SHOBJ_LIBS)
+
+logname: logname.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ logname.o $(SHOBJ_LIBS)
+
+basename: basename.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ basename.o $(SHOBJ_LIBS)
+
+dirname: dirname.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ dirname.o $(SHOBJ_LIBS)
+
+tty: tty.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ tty.o $(SHOBJ_LIBS)
+
+pathchk: pathchk.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ pathchk.o $(SHOBJ_LIBS)
+
+tee: tee.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ tee.o $(SHOBJ_LIBS)
+
+mkdir: mkdir.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ mkdir.o $(SHOBJ_LIBS)
+
+rmdir: rmdir.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ rmdir.o $(SHOBJ_LIBS)
+
+head: head.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ head.o $(SHOBJ_LIBS)
+
+printenv: printenv.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ printenv.o $(SHOBJ_LIBS)
+
+id: id.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ id.o $(SHOBJ_LIBS)
+
+whoami: whoami.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ whoami.o $(SHOBJ_LIBS)
+
+uname: uname.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ uname.o $(SHOBJ_LIBS)
+
+sync: sync.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ sync.o $(SHOBJ_LIBS)
+
+push: push.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ push.o $(SHOBJ_LIBS)
+
+ln: ln.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ ln.o $(SHOBJ_LIBS)
+
+unlink: unlink.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ unlink.o $(SHOBJ_LIBS)
+
+cut: cut.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ cut.o $(SHOBJ_LIBS)
+
+realpath: realpath.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ realpath.o $(SHOBJ_LIBS)
+
+strftime: strftime.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ strftime.o $(SHOBJ_LIBS)
+
+mypid: mypid.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ mypid.o $(SHOBJ_LIBS)
+
+# pushd is a special case. We use the same source that the builtin version
+# uses, with special compilation options.
+#
+pushd.c: ${topdir}/builtins/pushd.def
+ $(RM) $@
+ ${BUILD_DIR}/builtins/mkbuiltins -D ${topdir}/builtins ${topdir}/builtins/pushd.def
+
+pushd.o: pushd.c
+ $(RM) $@
+ $(SHOBJ_CC) -DHAVE_CONFIG_H -DPUSHD_AND_POPD -DLOADABLE_BUILTIN $(SHOBJ_CFLAGS) $(CFLAGS) $(CPPFLAGS) $(INC) -c -o $@ $<
+
+pushd: pushd.o
+ $(SHOBJ_LD) $(SHOBJ_LDFLAGS) $(SHOBJ_XLDFLAGS) -o $@ pushd.o $(SHOBJ_LIBS)
+
+clean:
+ $(RM) $(ALLPROG) $(OTHERPROG) *.o
+ -( cd perl && ${MAKE} ${MFLAGS} $@ )
+
+mostlyclean: clean
+ -( cd perl && ${MAKE} ${MFLAGS} $@ )
+
+distclean maintainer-clean: clean
+ $(RM) Makefile pushd.c
+ -( cd perl && ${MAKE} ${MFLAGS} $@ )
+
+print.o: print.c
+truefalse.o: truefalse.c
+sleep.o: sleep.c
+finfo.o: finfo.c
+logname.o: logname.c
+basename.o: basename.c
+dirname.o: dirname.c
+tty.o: tty.c
+pathchk.o: pathchk.c
+tee.o: tee.c
+head.o: head.c
+rmdir.o: rmdir.c
+necho.o: necho.c
+getconf.o: getconf.c
+hello.o: hello.c
+cat.o: cat.c
+printenv.o: printenv.c
+id.o: id.c
+whoami.o: whoami.c
+uname.o: uname.c
+sync.o: sync.c
+push.o: push.c
+mkdir.o: mkdir.c
+realpath.o: realpath.c
+strftime.o: strftime.c
+mypid.o: mypid.c
diff --git a/examples/loadables/README b/examples/loadables/README
new file mode 100644
index 0000000..d29b43a
--- /dev/null
+++ b/examples/loadables/README
@@ -0,0 +1,66 @@
+Some examples of ready-to-dynamic-load builtins. Most of the
+examples given are reimplementations of standard commands whose
+execution time is dominated by process startup time. The
+exceptions are sleep, which allows you to sleep for fractions
+of a second, finfo, which provides access to the rest of the
+elements of the `stat' structure that `test' doesn't let you
+see, and pushd/popd/dirs, which allows you to compile them out
+of the shell.
+
+All of the new builtins in ksh93 that bash didn't already have
+are included here, as is the ksh `print' builtin.
+
+The configure script in the top-level source directory uses the
+support/shobj-conf script to set the right values in the Makefile,
+so you should not need to change the Makefile. If your system
+is not supported by support/shobj-conf, and it has the necessary
+facilities for building shared objects and support for the
+dlopen/dlsyn/dlclose/dlerror family of functions, please make
+the necessary changes to support/shobj-conf and send the changes
+to bash-maintainers@gnu.org.
+
+Loadable builtins are loaded into a running shell with
+
+ enable -f filename builtin-name
+
+enable uses a simple reference-counting scheme to avoid unloading a
+shared object that implements more than one loadable builtin before
+all loadable builtins implemented in the object are removed.
+
+Many of the details needed by builtin writers are found in hello.c,
+the canonical example. There is no real `builtin writers' programming
+guide'. The file template.c provides a template to use for creating
+new loadable builtins.
+
+basename.c Return non-directory portion of pathname.
+cat.c cat(1) replacement with no options - the way cat was intended.
+cut.c cut(1) replacement.
+dirname.c Return directory portion of pathname.
+finfo.c Print file info.
+getconf.c POSIX.2 getconf utility.
+getconf.h Replacement definitions for ones the system doesn't provide.
+head.c Copy first part of files.
+hello.c Obligatory "Hello World" / sample loadable.
+id.c POSIX.2 user identity.
+ln.c Make links.
+logname.c Print login name of current user.
+Makefile.in Simple makefile for the sample loadable builtins.
+mkdir.c Make directories.
+necho.c echo without options or argument interpretation.
+pathchk.c Check pathnames for validity and portability.
+print.c Loadable ksh-93 style print builtin.
+printenv.c Minimal builtin clone of BSD printenv(1).
+push.c Anyone remember TOPS-20?
+README README
+realpath.c Canonicalize pathnames, resolving symlinks.
+rmdir.c Remove directory.
+sleep.c sleep for fractions of a second.
+strftime.c Loadable builtin interface to strftime(3).
+sync.c Sync the disks by forcing pending filesystem writes to complete.
+tee.c Duplicate standard input.
+template.c Example template for loadable builtin.
+truefalse.c True and false builtins.
+tty.c Return terminal name.
+uname.c Print system information.
+unlink.c Remove a directory entry.
+whoami.c Print out username of current user.
diff --git a/examples/loadables/basename.c b/examples/loadables/basename.c
new file mode 100644
index 0000000..b5705cb
--- /dev/null
+++ b/examples/loadables/basename.c
@@ -0,0 +1,111 @@
+/* basename - return nondirectory portion of pathname */
+
+/* See Makefile for compilation details. */
+
+#include "config.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include "builtins.h"
+#include "shell.h"
+#include "common.h"
+
+basename_builtin (list)
+ WORD_LIST *list;
+{
+ int slen, sufflen, off;
+ char *string, *suffix, *fn;
+
+ if (list == 0)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ if (no_options (list))
+ return (EX_USAGE);
+
+ string = list->word->word;
+ suffix = (char *)NULL;
+ if (list->next)
+ {
+ list = list->next;
+ suffix = list->word->word;
+ }
+
+ if (list->next)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ slen = strlen (string);
+
+ /* Strip trailing slashes */
+ while (slen > 0 && string[slen - 1] == '/')
+ slen--;
+
+ /* (2) If string consists entirely of slash characters, string shall be
+ set to a single slash character. In this case, skip steps (3)
+ through (5). */
+ if (slen == 0)
+ {
+ fputs ("/\n", stdout);
+ return (EXECUTION_SUCCESS);
+ }
+
+ /* (3) If there are any trailing slash characters in string, they
+ shall be removed. */
+ string[slen] = '\0';
+
+ /* (4) If there are any slash characters remaining in string, the prefix
+ of string up to an including the last slash character in string
+ shall be removed. */
+ while (--slen >= 0)
+ if (string[slen] == '/')
+ break;
+
+ fn = string + slen + 1;
+
+ /* (5) If the suffix operand is present, is not identical to the
+ characters remaining in string, and is identical to a suffix
+ of the characters remaining in string, the suffix suffix
+ shall be removed from string. Otherwise, string shall not be
+ modified by this step. */
+ if (suffix)
+ {
+ sufflen = strlen (suffix);
+ slen = strlen (fn);
+ if (sufflen < slen)
+ {
+ off = slen - sufflen;
+ if (strcmp (fn + off, suffix) == 0)
+ fn[off] = '\0';
+ }
+ }
+ printf ("%s\n", fn);
+ return (EXECUTION_SUCCESS);
+}
+
+char *basename_doc[] = {
+ "Return non-directory portion of pathname.",
+ "",
+ "The STRING is converted to a filename corresponding to the last",
+ "pathname component in STRING. If the suffix string SUFFIX is",
+ "supplied, it is removed.",
+ (char *)NULL
+};
+
+/* The standard structure describing a builtin command. bash keeps an array
+ of these structures. */
+struct builtin basename_struct = {
+ "basename", /* builtin name */
+ basename_builtin, /* function implementing the builtin */
+ BUILTIN_ENABLED, /* initial flags for builtin */
+ basename_doc, /* array of long documentation strings. */
+ "basename string [suffix]", /* usage synopsis */
+ 0 /* reserved for internal use */
+};
diff --git a/examples/loadables/cat.c b/examples/loadables/cat.c
new file mode 100644
index 0000000..1ce2e2d
--- /dev/null
+++ b/examples/loadables/cat.c
@@ -0,0 +1,120 @@
+/*
+ * cat replacement
+ *
+ * no options - the way cat was intended
+ */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <fcntl.h>
+#include <errno.h>
+
+#include "builtins.h"
+#include "shell.h"
+
+#ifndef errno
+extern int errno;
+#endif
+
+extern char *strerror ();
+extern char **make_builtin_argv ();
+
+static int
+fcopy(fd)
+int fd;
+{
+ char buf[1024], *s;
+ int n, w, e;
+
+ while (n = read(fd, buf, sizeof (buf))) {
+ w = write(1, buf, n);
+ if (w != n) {
+ e = errno;
+ write(2, "cat: write error: ", 18);
+ s = strerror(e);
+ write(2, s, strlen(s));
+ write(2, "\n", 1);
+ return 1;
+ }
+ }
+ return 0;
+}
+
+cat_main (argc, argv)
+int argc;
+char **argv;
+{
+ int i, fd, r;
+ char *s;
+
+ if (argc == 1)
+ return (fcopy(0));
+
+ for (i = r = 1; i < argc; i++) {
+ if (argv[i][0] == '-' && argv[i][1] == '\0')
+ fd = 0;
+ else {
+ fd = open(argv[i], O_RDONLY, 0666);
+ if (fd < 0) {
+ s = strerror(errno);
+ write(2, "cat: cannot open ", 17);
+ write(2, argv[i], strlen(argv[i]));
+ write(2, ": ", 2);
+ write(2, s, strlen(s));
+ write(2, "\n", 1);
+ continue;
+ }
+ }
+ r = fcopy(fd);
+ if (fd != 0)
+ close(fd);
+ }
+ return (r);
+}
+
+cat_builtin(list)
+WORD_LIST *list;
+{
+ char **v;
+ int c, r;
+
+ v = make_builtin_argv(list, &c);
+ r = cat_main(c, v);
+ free(v);
+
+ return r;
+}
+
+char *cat_doc[] = {
+ "Display files.",
+ "",
+ "Read each FILE and display it on the standard output. If any",
+ "FILE is `-' or if no FILE argument is given, the standard input",
+ "is read.",
+ (char *)0
+};
+
+struct builtin cat_struct = {
+ "cat",
+ cat_builtin,
+ BUILTIN_ENABLED,
+ cat_doc,
+ "cat [-] [file ...]",
+ 0
+};
diff --git a/examples/loadables/cut.c b/examples/loadables/cut.c
new file mode 100644
index 0000000..47d7d3e
--- /dev/null
+++ b/examples/loadables/cut.c
@@ -0,0 +1,379 @@
+/*
+ * Copyright (c) 1989, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * This code is derived from software contributed to Berkeley by
+ * Adam S. Moskowitz of Menlo Consulting and Marciano Pitargue.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#ifndef lint
+static const char copyright[] =
+"@(#) Copyright (c) 1989, 1993\n\
+ The Regents of the University of California. All rights reserved.\n";
+#endif /* not lint */
+
+#ifndef lint
+static const char sccsid[] = "@(#)cut.c 8.3 (Berkeley) 5/4/95";
+#endif /* not lint */
+
+#include <config.h>
+
+#include <ctype.h>
+#include <stdio.h>
+#include <errno.h>
+
+#include "bashansi.h"
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "builtins.h"
+#include "shell.h"
+#include "bashgetopt.h"
+#include "common.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+#if !defined (_POSIX2_LINE_MAX)
+# define _POSIX2_LINE_MAX 2048
+#endif
+
+static int cflag;
+static char dchar;
+static int dflag;
+static int fflag;
+static int sflag;
+
+static int autostart, autostop, maxval;
+static char positions[_POSIX2_LINE_MAX + 1];
+
+static int c_cut __P((FILE *, char *));
+static int f_cut __P((FILE *, char *));
+static int get_list __P((char *));
+static char *_cut_strsep __P((char **, const char *));
+
+int
+cut_builtin(list)
+ WORD_LIST *list;
+{
+ FILE *fp;
+ int (*fcn) __P((FILE *, char *)) = NULL;
+ int ch;
+
+ fcn = NULL;
+ dchar = '\t'; /* default delimiter is \t */
+
+ /* Since we don't support multi-byte characters, the -c and -b
+ options are equivalent, and the -n option is meaningless. */
+ reset_internal_getopt ();
+ while ((ch = internal_getopt (list, "b:c:d:f:sn")) != -1)
+ switch(ch) {
+ case 'b':
+ case 'c':
+ fcn = c_cut;
+ if (get_list(list_optarg) < 0)
+ return (EXECUTION_FAILURE);
+ cflag = 1;
+ break;
+ case 'd':
+ dchar = *list_optarg;
+ dflag = 1;
+ break;
+ case 'f':
+ fcn = f_cut;
+ if (get_list(list_optarg) < 0)
+ return (EXECUTION_FAILURE);
+ fflag = 1;
+ break;
+ case 's':
+ sflag = 1;
+ break;
+ case 'n':
+ break;
+ case '?':
+ default:
+ builtin_usage();
+ return (EX_USAGE);
+ }
+
+ list = loptend;
+
+ if (fflag) {
+ if (cflag) {
+ builtin_usage();
+ return (EX_USAGE);
+ }
+ } else if (!cflag || dflag || sflag) {
+ builtin_usage();
+ return (EX_USAGE);
+ }
+
+ if (list) {
+ while (list) {
+ fp = fopen(list->word->word, "r");
+ if (fp == 0) {
+ builtin_error("%s", list->word->word);
+ return (EXECUTION_FAILURE);
+ }
+ ch = (*fcn)(fp, list->word->word);
+ (void)fclose(fp);
+ if (ch < 0)
+ return (EXECUTION_FAILURE);
+ list = list->next;
+ }
+ } else {
+ ch = (*fcn)(stdin, "stdin");
+ if (ch < 0)
+ return (EXECUTION_FAILURE);
+ }
+
+ return (EXECUTION_SUCCESS);
+}
+
+static int
+get_list(list)
+ char *list;
+{
+ int setautostart, start, stop;
+ char *pos;
+ char *p;
+
+ /*
+ * set a byte in the positions array to indicate if a field or
+ * column is to be selected; use +1, it's 1-based, not 0-based.
+ * This parser is less restrictive than the Draft 9 POSIX spec.
+ * POSIX doesn't allow lists that aren't in increasing order or
+ * overlapping lists. We also handle "-3-5" although there's no
+ * real reason too.
+ */
+ for (; (p = _cut_strsep(&list, ", \t")) != NULL;) {
+ setautostart = start = stop = 0;
+ if (*p == '-') {
+ ++p;
+ setautostart = 1;
+ }
+ if (isdigit((unsigned char)*p)) {
+ start = stop = strtol(p, &p, 10);
+ if (setautostart && start > autostart)
+ autostart = start;
+ }
+ if (*p == '-') {
+ if (isdigit((unsigned char)p[1]))
+ stop = strtol(p + 1, &p, 10);
+ if (*p == '-') {
+ ++p;
+ if (!autostop || autostop > stop)
+ autostop = stop;
+ }
+ }
+ if (*p) {
+ builtin_error("[-cf] list: illegal list value");
+ return -1;
+ }
+ if (!stop || !start) {
+ builtin_error("[-cf] list: values may not include zero");
+ return -1;
+ }
+ if (stop > _POSIX2_LINE_MAX) {
+ builtin_error("[-cf] list: %d too large (max %d)",
+ stop, _POSIX2_LINE_MAX);
+ return -1;
+ }
+ if (maxval < stop)
+ maxval = stop;
+ for (pos = positions + start; start++ <= stop; *pos++ = 1);
+ }
+
+ /* overlapping ranges */
+ if (autostop && maxval > autostop)
+ maxval = autostop;
+
+ /* set autostart */
+ if (autostart)
+ memset(positions + 1, '1', autostart);
+
+ return 0;
+}
+
+/* ARGSUSED */
+static int
+c_cut(fp, fname)
+ FILE *fp;
+ char *fname;
+{
+ int ch, col;
+ char *pos;
+
+ ch = 0;
+ for (;;) {
+ pos = positions + 1;
+ for (col = maxval; col; --col) {
+ if ((ch = getc(fp)) == EOF)
+ return;
+ if (ch == '\n')
+ break;
+ if (*pos++)
+ (void)putchar(ch);
+ }
+ if (ch != '\n') {
+ if (autostop)
+ while ((ch = getc(fp)) != EOF && ch != '\n')
+ (void)putchar(ch);
+ else
+ while ((ch = getc(fp)) != EOF && ch != '\n');
+ }
+ (void)putchar('\n');
+ }
+ return (0);
+}
+
+static int
+f_cut(fp, fname)
+ FILE *fp;
+ char *fname;
+{
+ int ch, field, isdelim;
+ char *pos, *p, sep;
+ int output;
+ char lbuf[_POSIX2_LINE_MAX + 1];
+
+ for (sep = dchar; fgets(lbuf, sizeof(lbuf), fp);) {
+ output = 0;
+ for (isdelim = 0, p = lbuf;; ++p) {
+ if (!(ch = *p)) {
+ builtin_error("%s: line too long.", fname);
+ return -1;
+ }
+ /* this should work if newline is delimiter */
+ if (ch == sep)
+ isdelim = 1;
+ if (ch == '\n') {
+ if (!isdelim && !sflag)
+ (void)printf("%s", lbuf);
+ break;
+ }
+ }
+ if (!isdelim)
+ continue;
+
+ pos = positions + 1;
+ for (field = maxval, p = lbuf; field; --field, ++pos) {
+ if (*pos) {
+ if (output++)
+ (void)putchar(sep);
+ while ((ch = *p++) != '\n' && ch != sep)
+ (void)putchar(ch);
+ } else {
+ while ((ch = *p++) != '\n' && ch != sep)
+ continue;
+ }
+ if (ch == '\n')
+ break;
+ }
+ if (ch != '\n') {
+ if (autostop) {
+ if (output)
+ (void)putchar(sep);
+ for (; (ch = *p) != '\n'; ++p)
+ (void)putchar(ch);
+ } else
+ for (; (ch = *p) != '\n'; ++p);
+ }
+ (void)putchar('\n');
+ }
+ return (0);
+}
+
+/*
+ * Get next token from string *stringp, where tokens are possibly-empty
+ * strings separated by characters from delim.
+ *
+ * Writes NULs into the string at *stringp to end tokens.
+ * delim need not remain constant from call to call.
+ * On return, *stringp points past the last NUL written (if there might
+ * be further tokens), or is NULL (if there are definitely no more tokens).
+ *
+ * If *stringp is NULL, strsep returns NULL.
+ */
+static char *
+_cut_strsep(stringp, delim)
+ register char **stringp;
+ register const char *delim;
+{
+ register char *s;
+ register const char *spanp;
+ register int c, sc;
+ char *tok;
+
+ if ((s = *stringp) == NULL)
+ return (NULL);
+ for (tok = s;;) {
+ c = *s++;
+ spanp = delim;
+ do {
+ if ((sc = *spanp++) == c) {
+ if (c == 0)
+ s = NULL;
+ else
+ s[-1] = 0;
+ *stringp = s;
+ return (tok);
+ }
+ } while (sc != 0);
+ }
+ /* NOTREACHED */
+}
+
+static char *cut_doc[] = {
+ "Select portions of lines.",
+ "",
+ "Select portions of each line (as specified by LIST) from each FILE",
+ "(by default, the standard input), and write them to the standard output.",
+ "Items specified by LIST are either column positions or fields delimited",
+ "by a special character. Column numbering starts at 1.",
+ (char *)0
+};
+
+struct builtin cut_struct = {
+ "cut",
+ cut_builtin,
+ BUILTIN_ENABLED,
+ cut_doc,
+ "cut -b list [-n] [file ...] OR cut -c list [file ...] OR cut -f list [-s] [-d delim] [file ...]",
+ 0
+};
diff --git a/examples/loadables/dirname.c b/examples/loadables/dirname.c
new file mode 100644
index 0000000..0f30286
--- /dev/null
+++ b/examples/loadables/dirname.c
@@ -0,0 +1,116 @@
+/* dirname - return directory portion of pathname */
+
+/* See Makefile for compilation details. */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include "builtins.h"
+#include "shell.h"
+#include "common.h"
+
+dirname_builtin (list)
+ WORD_LIST *list;
+{
+ int slen;
+ char *string;
+
+ if (list == 0 || list->next)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ if (no_options (list))
+ return (EX_USAGE);
+
+ string = list->word->word;
+ slen = strlen (string);
+
+ /* Strip trailing slashes */
+ while (slen > 0 && string[slen - 1] == '/')
+ slen--;
+
+ /* (2) If string consists entirely of slash characters, string shall be
+ set to a single slash character. In this case, skip steps (3)
+ through (8). */
+ if (slen == 0)
+ {
+ fputs ("/\n", stdout);
+ return (EXECUTION_SUCCESS);
+ }
+
+ /* (3) If there are any trailing slash characters in string, they
+ shall be removed. */
+ string[slen] = '\0';
+
+ /* (4) If there are no slash characters remaining in string, string
+ shall be set to a single period character. In this case, skip
+ steps (5) through (8).
+
+ (5) If there are any trailing nonslash characters in string,
+ they shall be removed. */
+
+ while (--slen >= 0)
+ if (string[slen] == '/')
+ break;
+
+ if (slen < 0)
+ {
+ fputs (".\n", stdout);
+ return (EXECUTION_SUCCESS);
+ }
+
+ /* (7) If there are any trailing slash characters in string, they
+ shall be removed. */
+ while (--slen >= 0)
+ if (string[slen] != '/')
+ break;
+ string[++slen] = '\0';
+
+ /* (8) If the remaining string is empty, string shall be set to a single
+ slash character. */
+ printf ("%s\n", (slen == 0) ? "/" : string);
+ return (EXECUTION_SUCCESS);
+}
+
+char *dirname_doc[] = {
+ "Display directory portion of pathname.",
+ "",
+ "The STRING is converted to the name of the directory containing",
+ "the filename corresponding to the last pathname component in STRING.",
+ (char *)NULL
+};
+
+/* The standard structure describing a builtin command. bash keeps an array
+ of these structures. */
+struct builtin dirname_struct = {
+ "dirname", /* builtin name */
+ dirname_builtin, /* function implementing the builtin */
+ BUILTIN_ENABLED, /* initial flags for builtin */
+ dirname_doc, /* array of long documentation strings. */
+ "dirname string", /* usage synopsis */
+ 0 /* reserved for internal use */
+};
diff --git a/examples/loadables/finfo.c b/examples/loadables/finfo.c
new file mode 100644
index 0000000..af7ffb6
--- /dev/null
+++ b/examples/loadables/finfo.c
@@ -0,0 +1,602 @@
+/*
+ * finfo - print file info
+ *
+ * Chet Ramey
+ * chet@po.cwru.edu
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#include "posixstat.h"
+#include <stdio.h>
+#include <pwd.h>
+#include <grp.h>
+#include <errno.h>
+#include "posixtime.h"
+
+#include "bashansi.h"
+#include "shell.h"
+#include "builtins.h"
+#include "common.h"
+
+#ifndef errno
+extern int errno;
+#endif
+
+extern char **make_builtin_argv ();
+
+static int printst();
+static int printsome();
+static int printfinfo();
+static int finfo_main();
+
+extern int sh_optind;
+extern char *sh_optarg;
+extern char *this_command_name;
+
+static char *prog;
+static int pmask;
+
+#define OPT_UID 0x00001
+#define OPT_GID 0x00002
+#define OPT_DEV 0x00004
+#define OPT_INO 0x00008
+#define OPT_PERM 0x00010
+#define OPT_LNKNAM 0x00020
+#define OPT_FID 0x00040
+#define OPT_NLINK 0x00080
+#define OPT_RDEV 0x00100
+#define OPT_SIZE 0x00200
+#define OPT_ATIME 0x00400
+#define OPT_MTIME 0x00800
+#define OPT_CTIME 0x01000
+#define OPT_BLKSIZE 0x02000
+#define OPT_BLKS 0x04000
+#define OPT_FTYPE 0x08000
+#define OPT_PMASK 0x10000
+#define OPT_OPERM 0x20000
+
+#define OPT_ASCII 0x1000000
+
+#define OPTIONS "acdgiflmnopsuACGMP:U"
+
+static int
+octal(s)
+char *s;
+{
+ int r;
+
+ r = *s - '0';
+ while (*++s >= '0' && *s <= '7')
+ r = (r * 8) + (*s - '0');
+ return r;
+}
+
+static int
+finfo_main(argc, argv)
+int argc;
+char **argv;
+{
+ register int i;
+ int mode, flags, opt;
+
+ sh_optind = 0; /* XXX */
+ prog = base_pathname(argv[0]);
+ if (argc == 1) {
+ builtin_usage();
+ return(1);
+ }
+ flags = 0;
+ while ((opt = sh_getopt(argc, argv, OPTIONS)) != EOF) {
+ switch(opt) {
+ case 'a': flags |= OPT_ATIME; break;
+ case 'A': flags |= OPT_ATIME|OPT_ASCII; break;
+ case 'c': flags |= OPT_CTIME; break;
+ case 'C': flags |= OPT_CTIME|OPT_ASCII; break;
+ case 'd': flags |= OPT_DEV; break;
+ case 'i': flags |= OPT_INO; break;
+ case 'f': flags |= OPT_FID; break;
+ case 'g': flags |= OPT_GID; break;
+ case 'G': flags |= OPT_GID|OPT_ASCII; break;
+ case 'l': flags |= OPT_LNKNAM; break;
+ case 'm': flags |= OPT_MTIME; break;
+ case 'M': flags |= OPT_MTIME|OPT_ASCII; break;
+ case 'n': flags |= OPT_NLINK; break;
+ case 'o': flags |= OPT_OPERM; break;
+ case 'p': flags |= OPT_PERM; break;
+ case 'P': flags |= OPT_PMASK; pmask = octal(sh_optarg); break;
+ case 's': flags |= OPT_SIZE; break;
+ case 'u': flags |= OPT_UID; break;
+ case 'U': flags |= OPT_UID|OPT_ASCII; break;
+ default: builtin_usage (); return(1);
+ }
+ }
+
+ argc -= sh_optind;
+ argv += sh_optind;
+
+ if (argc == 0) {
+ builtin_usage();
+ return(1);
+ }
+
+ for (i = 0; i < argc; i++)
+ opt = flags ? printsome (argv[i], flags) : printfinfo(argv[i]);
+
+ return(opt);
+}
+
+static struct stat *
+getstat(f)
+char *f;
+{
+ static struct stat st;
+ int fd, r;
+ intmax_t lfd;
+
+ if (strncmp(f, "/dev/fd/", 8) == 0) {
+ if ((legal_number(f + 8, &lfd) == 0) || (int)lfd != lfd) {
+ builtin_error("%s: invalid fd", f + 8);
+ return ((struct stat *)0);
+ }
+ fd = lfd;
+ r = fstat(fd, &st);
+ } else
+#ifdef HAVE_LSTAT
+ r = lstat(f, &st);
+#else
+ r = stat(f, &st);
+#endif
+ if (r < 0) {
+ builtin_error("%s: cannot stat: %s", f, strerror(errno));
+ return ((struct stat *)0);
+ }
+ return (&st);
+}
+
+static int
+printfinfo(f)
+char *f;
+{
+ struct stat *st;
+
+ st = getstat(f);
+ return (st ? printst(st) : 1);
+}
+
+static int
+getperm(m)
+int m;
+{
+ return (m & (S_IRWXU|S_IRWXG|S_IRWXO|S_ISUID|S_ISGID));
+}
+
+static int
+perms(m)
+int m;
+{
+ char ubits[4], gbits[4], obits[4]; /* u=rwx,g=rwx,o=rwx */
+ int i;
+
+ i = 0;
+ if (m & S_IRUSR)
+ ubits[i++] = 'r';
+ if (m & S_IWUSR)
+ ubits[i++] = 'w';
+ if (m & S_IXUSR)
+ ubits[i++] = 'x';
+ ubits[i] = '\0';
+
+ i = 0;
+ if (m & S_IRGRP)
+ gbits[i++] = 'r';
+ if (m & S_IWGRP)
+ gbits[i++] = 'w';
+ if (m & S_IXGRP)
+ gbits[i++] = 'x';
+ gbits[i] = '\0';
+
+ i = 0;
+ if (m & S_IROTH)
+ obits[i++] = 'r';
+ if (m & S_IWOTH)
+ obits[i++] = 'w';
+ if (m & S_IXOTH)
+ obits[i++] = 'x';
+ obits[i] = '\0';
+
+ if (m & S_ISUID)
+ ubits[2] = (m & S_IXUSR) ? 's' : 'S';
+ if (m & S_ISGID)
+ gbits[2] = (m & S_IXGRP) ? 's' : 'S';
+ if (m & S_ISVTX)
+ obits[2] = (m & S_IXOTH) ? 't' : 'T';
+
+ printf ("u=%s,g=%s,o=%s", ubits, gbits, obits);
+}
+
+static int
+printmode(mode)
+int mode;
+{
+ if (S_ISBLK(mode))
+ printf("S_IFBLK ");
+ if (S_ISCHR(mode))
+ printf("S_IFCHR ");
+ if (S_ISDIR(mode))
+ printf("S_IFDIR ");
+ if (S_ISREG(mode))
+ printf("S_IFREG ");
+ if (S_ISFIFO(mode))
+ printf("S_IFIFO ");
+ if (S_ISLNK(mode))
+ printf("S_IFLNK ");
+ if (S_ISSOCK(mode))
+ printf("S_IFSOCK ");
+#ifdef S_ISWHT
+ if (S_ISWHT(mode))
+ printf("S_ISWHT ");
+#endif
+ perms(getperm(mode));
+ printf("\n");
+}
+
+static int
+printst(st)
+struct stat *st;
+{
+ struct passwd *pw;
+ struct group *gr;
+ char *owner;
+ int ma, mi, d;
+
+ ma = major (st->st_rdev);
+ mi = minor (st->st_rdev);
+#if defined (makedev)
+ d = makedev (ma, mi);
+#else
+ d = st->st_rdev & 0xFF;
+#endif
+ printf("Device (major/minor): %d (%d/%d)\n", d, ma, mi);
+
+ printf("Inode: %d\n", (int) st->st_ino);
+ printf("Mode: (%o) ", (int) st->st_mode);
+ printmode((int) st->st_mode);
+ printf("Link count: %d\n", (int) st->st_nlink);
+ pw = getpwuid(st->st_uid);
+ owner = pw ? pw->pw_name : "unknown";
+ printf("Uid of owner: %d (%s)\n", (int) st->st_uid, owner);
+ gr = getgrgid(st->st_gid);
+ owner = gr ? gr->gr_name : "unknown";
+ printf("Gid of owner: %d (%s)\n", (int) st->st_gid, owner);
+ printf("Device type: %d\n", (int) st->st_rdev);
+ printf("File size: %ld\n", (long) st->st_size);
+ printf("File last access time: %s", ctime (&st->st_atime));
+ printf("File last modify time: %s", ctime (&st->st_mtime));
+ printf("File last status change time: %s", ctime (&st->st_ctime));
+ fflush(stdout);
+ return(0);
+}
+
+static int
+printsome(f, flags)
+char *f;
+int flags;
+{
+ struct stat *st;
+ struct passwd *pw;
+ struct group *gr;
+ int p;
+ char *b;
+
+ st = getstat(f);
+ if (st == NULL)
+ return (1);
+
+ /* Print requested info */
+ if (flags & OPT_ATIME) {
+ if (flags & OPT_ASCII)
+ printf("%s", ctime(&st->st_atime));
+ else
+ printf("%ld\n", st->st_atime);
+ } else if (flags & OPT_MTIME) {
+ if (flags & OPT_ASCII)
+ printf("%s", ctime(&st->st_mtime));
+ else
+ printf("%ld\n", st->st_mtime);
+ } else if (flags & OPT_CTIME) {
+ if (flags & OPT_ASCII)
+ printf("%s", ctime(&st->st_ctime));
+ else
+ printf("%ld\n", st->st_ctime);
+ } else if (flags & OPT_DEV)
+ printf("%d\n", st->st_dev);
+ else if (flags & OPT_INO)
+ printf("%d\n", st->st_ino);
+ else if (flags & OPT_FID)
+ printf("%d:%ld\n", st->st_dev, st->st_ino);
+ else if (flags & OPT_NLINK)
+ printf("%d\n", st->st_nlink);
+ else if (flags & OPT_LNKNAM) {
+#ifdef S_ISLNK
+ b = xmalloc(4096);
+ p = readlink(f, b, 4096);
+ if (p >= 0 && p < 4096)
+ b[p] = '\0';
+ else {
+ p = errno;
+ strcpy(b, prog);
+ strcat(b, ": ");
+ strcat(b, strerror(p));
+ }
+ printf("%s\n", b);
+ free(b);
+#else
+ printf("%s\n", f);
+#endif
+ } else if (flags & OPT_PERM) {
+ perms(st->st_mode);
+ printf("\n");
+ } else if (flags & OPT_OPERM)
+ printf("%o\n", getperm(st->st_mode));
+ else if (flags & OPT_PMASK)
+ printf("%o\n", getperm(st->st_mode) & pmask);
+ else if (flags & OPT_UID) {
+ pw = getpwuid(st->st_uid);
+ if (flags & OPT_ASCII)
+ printf("%s\n", pw ? pw->pw_name : "unknown");
+ else
+ printf("%d\n", st->st_uid);
+ } else if (flags & OPT_GID) {
+ gr = getgrgid(st->st_gid);
+ if (flags & OPT_ASCII)
+ printf("%s\n", gr ? gr->gr_name : "unknown");
+ else
+ printf("%d\n", st->st_gid);
+ } else if (flags & OPT_SIZE)
+ printf("%ld\n", (long) st->st_size);
+
+ return (0);
+}
+
+#ifndef NOBUILTIN
+int
+finfo_builtin(list)
+ WORD_LIST *list;
+{
+ int c, r;
+ char **v;
+ WORD_LIST *l;
+
+ v = make_builtin_argv (list, &c);
+ r = finfo_main (c, v);
+ free (v);
+
+ return r;
+}
+
+static char *finfo_doc[] = {
+ "Display information about file attributes.",
+ "",
+ "Display information about each FILE. Only single operators should",
+ "be supplied. If no options are supplied, a summary of the info",
+ "available about each FILE is printed. If FILE is of the form",
+ "/dev/fd/XX, file descriptor XX is described. Operators, if supplied,",
+ "have the following meanings:",
+ "",
+ " -a last file access time",
+ " -A last file access time in ctime format",
+ " -c last file status change time",
+ " -C last file status change time in ctime format",
+ " -m last file modification time",
+ " -M last file modification time in ctime format",
+ " -d device",
+ " -i inode",
+ " -f composite file identifier (device:inode)",
+ " -g gid of owner",
+ " -G group name of owner",
+ " -l name of file pointed to by symlink",
+ " -n link count",
+ " -o permissions in octal",
+ " -p permissions in ascii",
+ " -P mask permissions ANDed with MASK (like with umask)",
+ " -s file size in bytes",
+ " -u uid of owner",
+ " -U user name of owner",
+ (char *)0
+};
+
+struct builtin finfo_struct = {
+ "finfo",
+ finfo_builtin,
+ BUILTIN_ENABLED,
+ finfo_doc,
+ "finfo [-acdgiflmnopsuACGMPU] file [file...]",
+ 0
+};
+#endif
+
+#ifdef NOBUILTIN
+#if defined (PREFER_STDARG)
+# include <stdarg.h>
+#else
+# if defined (PREFER_VARARGS)
+# include <varargs.h>
+# endif
+#endif
+
+char *this_command_name;
+
+main(argc, argv)
+int argc;
+char **argv;
+{
+ this_command_name = argv[0];
+ exit(finfo_main(argc, argv));
+}
+
+void
+builtin_usage()
+{
+ fprintf(stderr, "%s: usage: %s [-%s] [file ...]\n", prog, OPTIONS);
+}
+
+#ifndef HAVE_STRERROR
+char *
+strerror(e)
+int e;
+{
+ static char ebuf[40];
+ extern int sys_nerr;
+ extern char *sys_errlist[];
+
+ if (e < 0 || e > sys_nerr) {
+ sprintf(ebuf,"Unknown error code %d", e);
+ return (&ebuf[0]);
+ }
+ return (sys_errlist[e]);
+}
+#endif
+
+char *
+xmalloc(s)
+size_t s;
+{
+ char *ret;
+ extern char *malloc();
+
+ ret = malloc(s);
+ if (ret)
+ return (ret);
+ fprintf(stderr, "%s: cannot malloc %d bytes\n", prog, s);
+ exit(1);
+}
+
+char *
+base_pathname(p)
+char *p;
+{
+ char *t;
+
+ if (t = strrchr(p, '/'))
+ return(++t);
+ return(p);
+}
+
+int
+legal_number (string, result)
+ char *string;
+ long *result;
+{
+ int sign;
+ long value;
+
+ sign = 1;
+ value = 0;
+
+ if (result)
+ *result = 0;
+
+ /* Skip leading whitespace characters. */
+ while (whitespace (*string))
+ string++;
+
+ if (!*string)
+ return (0);
+
+ /* We allow leading `-' or `+'. */
+ if (*string == '-' || *string == '+')
+ {
+ if (!digit (string[1]))
+ return (0);
+
+ if (*string == '-')
+ sign = -1;
+
+ string++;
+ }
+
+ while (digit (*string))
+ {
+ if (result)
+ value = (value * 10) + digit_value (*string);
+ string++;
+ }
+
+ /* Skip trailing whitespace, if any. */
+ while (whitespace (*string))
+ string++;
+
+ /* Error if not at end of string. */
+ if (*string)
+ return (0);
+
+ if (result)
+ *result = value * sign;
+
+ return (1);
+}
+
+int sh_optind;
+char *sh_optarg;
+int sh_opterr;
+
+extern int optind;
+extern char *optarg;
+
+int
+sh_getopt(c, v, o)
+int c;
+char **v, *o;
+{
+ int r;
+
+ r = getopt(c, v, o);
+ sh_optind = optind;
+ sh_optarg = optarg;
+ return r;
+}
+
+#if defined (USE_VARARGS)
+void
+#if defined (PREFER_STDARG)
+builtin_error (const char *format, ...)
+#else
+builtin_error (format, va_alist)
+ const char *format;
+ va_dcl
+#endif
+{
+ va_list args;
+
+ if (this_command_name && *this_command_name)
+ fprintf (stderr, "%s: ", this_command_name);
+
+#if defined (PREFER_STDARG)
+ va_start (args, format);
+#else
+ va_start (args);
+#endif
+
+ vfprintf (stderr, format, args);
+ va_end (args);
+ fprintf (stderr, "\n");
+}
+#else
+void
+builtin_error (format, arg1, arg2, arg3, arg4, arg5)
+ char *format, *arg1, *arg2, *arg3, *arg4, *arg5;
+{
+ if (this_command_name && *this_command_name)
+ fprintf (stderr, "%s: ", this_command_name);
+
+ fprintf (stderr, format, arg1, arg2, arg3, arg4, arg5);
+ fprintf (stderr, "\n");
+ fflush (stderr);
+}
+#endif /* !USE_VARARGS */
+
+#endif
diff --git a/examples/loadables/getconf.c b/examples/loadables/getconf.c
new file mode 100644
index 0000000..d3dec41
--- /dev/null
+++ b/examples/loadables/getconf.c
@@ -0,0 +1,1490 @@
+/*
+ * ORIGINAL COPYRIGHT STATEMENT:
+ *
+ * Copyright (c) 1994 Winning Strategies, Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by Winning Strategies, Inc.
+ * 4. The name of the author may not be used to endorse or promote products
+ * derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * POSIX.2 getconf utility
+ *
+ * Originally Written by:
+ * J.T. Conklin (jtc@wimsey.com), Winning Strategies, Inc.
+ *
+ * Heavily modified for inclusion in bash by
+ * Chet Ramey <chet@po.cwru.edu>
+ */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef HAVE_SYS_PARAM_H
+# include <sys/param.h>
+#endif
+
+#include <stdio.h>
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#ifdef HAVE_LOCALE_H
+#include <locale.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <errno.h>
+
+#include "typemax.h"
+
+#include "bashansi.h"
+#include "shell.h"
+#include "builtins.h"
+#include "stdc.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+#include "getconf.h"
+
+#ifndef errno
+extern int errno;
+#endif
+
+struct conf_variable
+{
+ const char *name;
+ enum { SYSCONF, CONFSTR, PATHCONF, CONSTANT, LLCONST, G_UNDEF } type;
+ long value;
+};
+
+#ifndef HAVE_CONFSTR
+static size_t confstr __P((int, char *, size_t));
+#endif
+
+#ifndef HAVE_SYSCONF
+static long sysconf __P((int));
+#endif
+
+#ifndef HAVE_PATHCONF
+static long pathconf __P((const char *, int));
+#endif
+
+/* Hack to `encode' values wider than long into a conf_variable */
+#define VAL_LLONG_MIN -1000
+#define VAL_LLONG_MAX -1001
+#define VAL_ULLONG_MAX -1002
+
+static const struct conf_variable conf_table[] =
+{
+ /* POSIX.2 Configurable Variable Values */
+ { "PATH", CONFSTR, _CS_PATH },
+ { "CS_PATH", CONFSTR, _CS_PATH },
+
+ /* POSIX.1 Configurable Variable Values (only Solaris?) */
+#if defined (_CS_LFS_CFLAGS)
+ { "LFS_CFLAGS", CONFSTR, _CS_LFS_CFLAGS },
+ { "LFS_LDFLAGS", CONFSTR, _CS_LFS_LDFLAGS },
+ { "LFS_LIBS", CONFSTR, _CS_LFS_LIBS },
+ { "LFS_LINTFLAGS", CONFSTR, _CS_LFS_LINTFLAGS },
+#endif
+#if defined (_CS_LFS64_CFLAGS)
+ { "LFS64_CFLAGS", CONFSTR, _CS_LFS64_CFLAGS },
+ { "LFS64_LDFLAGS", CONFSTR, _CS_LFS64_LDFLAGS },
+ { "LFS64_LIBS", CONFSTR, _CS_LFS64_LIBS },
+ { "LFS64_LINTFLAGS", CONFSTR, _CS_LFS64_LINTFLAGS },
+#endif
+
+ /* Single UNIX Specification version 2 Configurable Variable Values. The
+ SYSCONF variables say whether or not the appropriate CONFSTR variables
+ are available. */
+#if defined (_SC_XBS5_ILP32_OFF32)
+ { "XBS5_ILP32_OFF32", SYSCONF, _SC_XBS5_ILP32_OFF32 },
+ { "_XBS5_ILP32_OFF32", SYSCONF, _SC_XBS5_ILP32_OFF32 },
+#endif
+#if defined (_CS_XBS5_ILP32_OFF32_CFLAGS)
+ { "XBS5_ILP32_OFF32_CFLAGS", CONFSTR, _CS_XBS5_ILP32_OFF32_CFLAGS },
+ { "XBS5_ILP32_OFF32_LDFLAGS", CONFSTR, _CS_XBS5_ILP32_OFF32_LDFLAGS },
+ { "XBS5_ILP32_OFF32_LIBS", CONFSTR, _CS_XBS5_ILP32_OFF32_LIBS },
+ { "XBS5_ILP32_OFF32_LINTFLAGS", CONFSTR, _CS_XBS5_ILP32_OFF32_LINTFLAGS },
+#endif
+#if defined (_SC_XBS5_ILP32_OFFBIG)
+ { "XBS5_ILP32_OFFBIG", SYSCONF, _SC_XBS5_ILP32_OFFBIG },
+ { "_XBS5_ILP32_OFFBIG", SYSCONF, _SC_XBS5_ILP32_OFFBIG },
+#endif
+#if defined (_CS_XBS5_ILP32_OFFBIG_CFLAGS)
+ { "XBS5_ILP32_OFFBIG_CFLAGS", CONFSTR, _CS_XBS5_ILP32_OFFBIG_CFLAGS },
+ { "XBS5_ILP32_OFFBIG_LDFLAGS", CONFSTR, _CS_XBS5_ILP32_OFFBIG_LDFLAGS },
+ { "XBS5_ILP32_OFFBIG_LIBS", CONFSTR, _CS_XBS5_ILP32_OFFBIG_LIBS },
+ { "XBS5_ILP32_OFFBIG_LINTFLAGS", CONFSTR, _CS_XBS5_ILP32_OFFBIG_LINTFLAGS },
+#endif
+#if defined (_SC_XBS5_LP64_OFF64)
+ { "XBS5_LP64_OFF64", SYSCONF, _SC_XBS5_LP64_OFF64 },
+ { "_XBS5_LP64_OFF64", SYSCONF, _SC_XBS5_LP64_OFF64 },
+#endif
+#if defined (_CS_XBS5_LP64_OFF64_CFLAGS)
+ { "XBS5_LP64_OFF64_CFLAGS", CONFSTR, _CS_XBS5_LP64_OFF64_CFLAGS },
+ { "XBS5_LP64_OFF64_LDFLAGS", CONFSTR, _CS_XBS5_LP64_OFF64_LDFLAGS },
+ { "XBS5_LP64_OFF64_LIBS", CONFSTR, _CS_XBS5_LP64_OFF64_LIBS },
+ { "XBS5_LP64_OFF64_LINTFLAGS", CONFSTR, _CS_XBS5_LP64_OFF64_LINTFLAGS },
+#endif
+#if defined (_SC_XBS5_LPBIG_OFFBIG)
+ { "XBS5_LPBIG_OFFBIG", SYSCONF, _SC_XBS5_LPBIG_OFFBIG },
+ { "_XBS5_LPBIG_OFFBIG", SYSCONF, _SC_XBS5_LPBIG_OFFBIG },
+#endif
+#if defined (_CS_XBS5_LPBIG_OFFBIG_CFLAGS)
+ { "XBS5_LPBIG_OFFBIG_CFLAGS", CONFSTR, _CS_XBS5_LPBIG_OFFBIG_CFLAGS },
+ { "XBS5_LPBIG_OFFBIG_LDFLAGS", CONFSTR, _CS_XBS5_LPBIG_OFFBIG_LDFLAGS },
+ { "XBS5_LPBIG_OFFBIG_LIBS", CONFSTR, _CS_XBS5_LPBIG_OFFBIG_LIBS },
+ { "XBS5_LPBIG_OFFBIG_LINTFLAGS", CONFSTR, _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS },
+#endif
+
+ /* Single UNIX Specification version 3 (POSIX.1-200x) Configurable Variable
+ Values. The SYSCONF variables say whether or not the appropriate CONFSTR
+ variables are available. */
+
+#if defined (_SC_POSIX_V6_ILP32_OFF32)
+ { "_POSIX_V6_ILP32_OFF32", SYSCONF, _SC_POSIX_V6_ILP32_OFF32 },
+#endif
+#if defined (_CS_POSIX_V6_ILP32_OFF32_CFLAGS)
+ { "POSIX_V6_ILP32_OFF32_CFLAGS", CONFSTR, _CS_POSIX_V6_ILP32_OFF32_CFLAGS },
+ { "POSIX_V6_ILP32_OFF32_LDFLAGS", CONFSTR, _CS_POSIX_V6_ILP32_OFF32_LDFLAGS },
+ { "POSIX_V6_ILP32_OFF32_LIBS", CONFSTR, _CS_POSIX_V6_ILP32_OFF32_LIBS },
+#endif
+#if defined (_CS_POSIX_V6_ILP32_OFF32_LINTFLAGS)
+ { "POSIX_V6_ILP32_OFF32_LINTFLAGS", CONFSTR, _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS },
+#endif
+#if defined (_SC_POSIX_V6_ILP32_OFFBIG)
+ { "_POSIX_V6_ILP32_OFFBIG", SYSCONF, _SC_POSIX_V6_ILP32_OFFBIG },
+#endif
+#if defined (_CS_POSIX_V6_ILP32_OFFBIG_CFLAGS)
+ { "POSIX_V6_ILP32_OFFBIG_CFLAGS", CONFSTR, _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS },
+ { "POSIX_V6_ILP32_OFFBIG_LDFLAGS", CONFSTR, _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS },
+ { "POSIX_V6_ILP32_OFFBIG_LIBS", CONFSTR, _CS_POSIX_V6_ILP32_OFFBIG_LIBS },
+#endif
+#if defined (_CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS)
+ { "POSIX_V6_ILP32_OFFBIG_LINTFLAGS", CONFSTR, _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS },
+#endif
+#if defined (_SC_POSIX_V6_LP64_OFF64)
+ { "_POSIX_V6_LP64_OFF64", SYSCONF, _SC_POSIX_V6_LP64_OFF64 },
+#endif
+#if defined (_CS_POSIX_V6_LP64_OFF64_CFLAGS)
+ { "POSIX_V6_LP64_OFF64_CFLAGS", CONFSTR, _CS_POSIX_V6_LP64_OFF64_CFLAGS },
+ { "POSIX_V6_LP64_OFF64_LDFLAGS", CONFSTR, _CS_POSIX_V6_LP64_OFF64_LDFLAGS },
+ { "POSIX_V6_LP64_OFF64_LIBS", CONFSTR, _CS_POSIX_V6_LP64_OFF64_LIBS },
+#endif
+#if defined (CS_POSIX_V6_LP64_OFF64_LINTFLAGS)
+ { "POSIX_V6_LP64_OFF64_LINTFLAGS", CONFSTR, _CS_POSIX_V6_LP64_OFF64_LINTFLAGS },
+#endif
+#if defined (_SC_POSIX_V6_LPBIG_OFFBIG)
+ { "_POSIX_V6_LPBIG_OFFBIG", SYSCONF, _SC_POSIX_V6_LPBIG_OFFBIG },
+#endif
+#if defined (_CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS)
+ { "POSIX_V6_LPBIG_OFFBIG_CFLAGS", CONFSTR, _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS },
+ { "POSIX_V6_LPBIG_OFFBIG_LDFLAGS", CONFSTR, _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS },
+ { "POSIX_V6_LPBIG_OFFBIG_LIBS", CONFSTR, _CS_POSIX_V6_LPBIG_OFFBIG_LIBS },
+#endif
+#if defined (_CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS)
+ { "POSIX_V6_LPBIG_OFFBIG_LINTFLAGS", CONFSTR, _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS },
+#endif
+
+#if defined (_CS_POSIX_V6_WIDTH_RESTRICTED_ENVS)
+ { "POSIX_6_WIDTH_RESTRICTED_ENVS", CONFSTR, _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS },
+#endif
+
+ /* POSIX.2 Utility Limit Minimum Values */
+#ifdef _POSIX2_BC_BASE_MAX
+ { "POSIX2_BC_BASE_MAX", CONSTANT, _POSIX2_BC_BASE_MAX },
+#else
+ { "POSIX2_BC_BASE_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX2_BC_DIM_MAX
+ { "POSIX2_BC_DIM_MAX", CONSTANT, _POSIX2_BC_DIM_MAX },
+#else
+ { "POSIX2_BC_DIM_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX2_BC_SCALE_MAX
+ { "POSIX2_BC_SCALE_MAX", CONSTANT, _POSIX2_BC_SCALE_MAX },
+#else
+ { "POSIX2_BC_SCALE_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX2_BC_STRING_MAX
+ { "POSIX2_BC_STRING_MAX", CONSTANT, _POSIX2_BC_STRING_MAX },
+#else
+ { "POSIX2_BC_STRING_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX2_CHARCLASS_NAME_MAX
+ { "POSIX2_CHARCLASS_NAME_MAX", CONSTANT, _POSIX2_CHARCLASS_NAME_MAX },
+#else
+ { "POSIX2_CHARCLASS_NAME_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX2_COLL_WEIGHTS_MAX
+ { "POSIX2_COLL_WEIGHTS_MAX", CONSTANT, _POSIX2_COLL_WEIGHTS_MAX },
+#else
+ { "POSIX2_COLL_WEIGHTS_MAX", G_UNDEF, -1 },
+#endif
+#if defined (_POSIX2_EQUIV_CLASS_MAX)
+ { "POSIX2_EQUIV_CLASS_MAX", CONSTANT, _POSIX2_EQUIV_CLASS_MAX },
+#endif
+#ifdef _POSIX2_EXPR_NEST_MAX
+ { "POSIX2_EXPR_NEST_MAX", CONSTANT, _POSIX2_EXPR_NEST_MAX },
+#else
+ { "POSIX2_EXPR_NEST_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX2_LINE_MAX
+ { "POSIX2_LINE_MAX", CONSTANT, _POSIX2_LINE_MAX },
+#else
+ { "POSIX2_LINE_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX2_RE_DUP_MAX
+ { "POSIX2_RE_DUP_MAX", CONSTANT, _POSIX2_RE_DUP_MAX },
+#else
+ { "POSIX2_RE_DUP_MAX", G_UNDEF, -1 },
+#endif
+#if defined (_POSIX2_VERSION)
+ { "POSIX2_VERSION", CONSTANT, _POSIX2_VERSION },
+#else
+# if !defined (_SC_2_VERSION)
+ { "POSIX2_VERSION", G_UNDEF, -1 },
+# endif
+#endif
+
+#ifdef _POSIX2_BC_BASE_MAX
+ { "_POSIX2_BC_BASE_MAX", CONSTANT, _POSIX2_BC_BASE_MAX },
+#else
+ { "_POSIX2_BC_BASE_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX2_BC_DIM_MAX
+ { "_POSIX2_BC_DIM_MAX", CONSTANT, _POSIX2_BC_DIM_MAX },
+#else
+ { "_POSIX2_BC_DIM_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX2_BC_SCALE_MAX
+ { "_POSIX2_BC_SCALE_MAX", CONSTANT, _POSIX2_BC_SCALE_MAX },
+#else
+ { "_POSIX2_BC_SCALE_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX2_BC_STRING_MAX
+ { "_POSIX2_BC_STRING_MAX", CONSTANT, _POSIX2_BC_STRING_MAX },
+#else
+ { "_POSIX2_BC_STRING_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX2_CHARCLASS_NAME_MAX
+ { "_POSIX2_CHARCLASS_NAME_MAX", CONSTANT, _POSIX2_CHARCLASS_NAME_MAX },
+#else
+ { "_POSIX2_CHARCLASS_NAME_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX2_COLL_WEIGHTS_MAX
+ { "_POSIX2_COLL_WEIGHTS_MAX", CONSTANT, _POSIX2_COLL_WEIGHTS_MAX },
+#else
+ { "_POSIX2_COLL_WEIGHTS_MAX", G_UNDEF, -1 },
+#endif
+#if defined (_POSIX2_EQUIV_CLASS_MAX)
+ { "POSIX2_EQUIV_CLASS_MAX", CONSTANT, _POSIX2_EQUIV_CLASS_MAX },
+#endif
+#ifdef _POSIX2_EXPR_NEST_MAX
+ { "_POSIX2_EXPR_NEST_MAX", CONSTANT, _POSIX2_EXPR_NEST_MAX },
+#else
+ { "_POSIX2_EXPR_NEST_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX2_LINE_MAX
+ { "_POSIX2_LINE_MAX", CONSTANT, _POSIX2_LINE_MAX },
+#else
+ { "_POSIX2_LINE_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX2_RE_DUP_MAX
+ { "_POSIX2_RE_DUP_MAX", CONSTANT, _POSIX2_RE_DUP_MAX },
+#else
+ { "_POSIX2_RE_DUP_MAX", G_UNDEF, -1 },
+#endif
+
+ /* X/OPEN Maxmimum Values */
+#ifdef _XOPEN_IOV_MAX
+ { "_XOPEN_IOV_MAX", CONSTANT, _XOPEN_IOV_MAX },
+#else
+ { "_XOPEN_IOV_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _XOPEN_NAME_MAX
+ { "_XOPEN_NAME_MAX", CONSTANT, _XOPEN_NAME_MAX },
+#else
+ { "_XOPEN_NAME_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _XOPEN_PATH_MAX
+ { "_XOPEN_PATH_MAX", CONSTANT, _XOPEN_PATH_MAX },
+#else
+ { "_XOPEN_PATH_MAX", G_UNDEF, -1 },
+#endif
+
+ /* POSIX.1 Minimum Values */
+#ifdef _POSIX_AIO_LISTIO_MAX
+ { "_POSIX_AIO_LISTIO_MAX", CONSTANT, _POSIX_AIO_LISTIO_MAX },
+#else
+ { "_POSIX_AIO_LISTIO_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_AIO_MAX
+ { "_POSIX_AIO_MAX", CONSTANT, _POSIX_AIO_MAX },
+#else
+ { "_POSIX_AIO_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_ARG_MAX
+ { "_POSIX_ARG_MAX", CONSTANT, _POSIX_ARG_MAX },
+#else
+ { "_POSIX_ARG_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_CHILD_MAX
+ { "_POSIX_CHILD_MAX", CONSTANT, _POSIX_CHILD_MAX },
+#else
+ { "_POSIX_CHILD_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_DELAYTIMER_MAX
+ { "_POSIX_DELAYTIMER_MAX", CONSTANT, _POSIX_DELAYTIMER_MAX },
+#else
+ { "_POSIX_DELAYTIMER_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_HOST_NAME_MAX
+ { "_POSIX_HOST_NAME_MAX", CONSTANT, _POSIX_HOST_NAME_MAX },
+#else
+ { "_POSIX_HOST_NAME_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_LINK_MAX
+ { "_POSIX_LINK_MAX", CONSTANT, _POSIX_LINK_MAX },
+#else
+ { "_POSIX_LINK_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_LOGIN_NAME_MAX
+ { "_POSIX_LOGIN_NAME_MAX", CONSTANT, _POSIX_LOGIN_NAME_MAX },
+#else
+ { "_POSIX_LOGIN_NAME_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_MAX_CANON
+ { "_POSIX_MAX_CANON", CONSTANT, _POSIX_MAX_CANON },
+#else
+ { "_POSIX_MAX_CANON", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_MAX_INPUT
+ { "_POSIX_MAX_INPUT", CONSTANT, _POSIX_MAX_INPUT },
+#else
+ { "_POSIX_MAX_INPUT", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_MQ_OPEN_MAX
+ { "_POSIX_MQ_OPEN_MAX", CONSTANT, _POSIX_MQ_OPEN_MAX },
+#else
+ { "_POSIX_MQ_OPEN_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_MQ_PRIO_MAX
+ { "_POSIX_MQ_PRIO_MAX", CONSTANT, _POSIX_MQ_PRIO_MAX },
+#else
+ { "_POSIX_MQ_PRIO_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_NAME_MAX
+ { "_POSIX_NAME_MAX", CONSTANT, _POSIX_NAME_MAX },
+#else
+ { "_POSIX_NAME_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_NGROUPS_MAX
+ { "_POSIX_NGROUPS_MAX", CONSTANT, _POSIX_NGROUPS_MAX },
+#else
+ { "_POSIX_NGROUPS_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_OPEN_MAX
+ { "_POSIX_OPEN_MAX", CONSTANT, _POSIX_OPEN_MAX },
+#else
+ { "_POSIX_OPEN_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_PATH_MAX
+ { "_POSIX_PATH_MAX", CONSTANT, _POSIX_PATH_MAX },
+#else
+ { "_POSIX_PATH_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_PIPE_BUF
+ { "_POSIX_PIPE_BUF", CONSTANT, _POSIX_PIPE_BUF },
+#else
+ { "_POSIX_PIPE_BUF", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_RE_DUP_MAX
+ { "_POSIX_RE_DUP_MAX", CONSTANT, _POSIX_RE_DUP_MAX },
+#else
+ { "_POSIX_RE_DUP_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_RTSIG_MAX
+ { "_POSIX_RTSIG_MAX", CONSTANT, _POSIX_RTSIG_MAX },
+#else
+ { "_POSIX_RTSIG_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_SEM_NSEMS_MAX
+ { "_POSIX_SEM_NSEMS_MAX", CONSTANT, _POSIX_SEM_NSEMS_MAX },
+#else
+ { "_POSIX_SEM_NSEMS_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_SEM_VALUE_MAX
+ { "_POSIX_SEM_VALUE_MAX", CONSTANT, _POSIX_SEM_VALUE_MAX },
+#else
+ { "_POSIX_SEM_VALUE_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_SIGQUEUE_MAX
+ { "_POSIX_SIGQUEUE_MAX", CONSTANT, _POSIX_SIGQUEUE_MAX },
+#else
+ { "_POSIX_SIGQUEUE_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_SSIZE_MAX
+ { "_POSIX_SSIZE_MAX", CONSTANT, _POSIX_SSIZE_MAX },
+#else
+ { "_POSIX_SSIZE_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_SS_REPL_MAX
+ { "_POSIX_SS_REPL_MAX", CONSTANT, _POSIX_SS_REPL_MAX },
+#else
+ { "_POSIX_SS_REPL_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_STREAM_MAX
+ { "_POSIX_STREAM_MAX", CONSTANT, _POSIX_STREAM_MAX },
+#else
+ { "_POSIX_STREAM_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_SYMLINK_MAX
+ { "_POSIX_SYMLINK_MAX", CONSTANT, _POSIX_SYMLINK_MAX },
+#else
+ { "_POSIX_SYMLINK_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_SYMLOOP_MAX
+ { "_POSIX_SYMLOOP_MAX", CONSTANT, _POSIX_SYMLOOP_MAX },
+#else
+ { "_POSIX_SYMLOOP_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_THREAD_DESTRUCTOR_ITERATIONS
+ { "_POSIX_THREAD_DESTRUCTOR_ITERATIONS", CONSTANT, _POSIX_THREAD_DESTRUCTOR_ITERATIONS },
+#else
+ { "_POSIX_THREAD_DESTRUCTOR_ITERATIONS", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_THREAD_KEYS_MAX
+ { "_POSIX_THREAD_KEYS_MAX", CONSTANT, _POSIX_THREAD_KEYS_MAX },
+#else
+ { "_POSIX_THREAD_KEYS_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_THREAD_THREADS_MAX
+ { "_POSIX_THREAD_THREADS_MAX",CONSTANT, _POSIX_THREAD_THREADS_MAX },
+#else
+ { "_POSIX_THREAD_THREADS_MAX",G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_TIMER_MAX
+ { "_POSIX_TIMER_MAX", CONSTANT, _POSIX_TIMER_MAX },
+#else
+ { "_POSIX_TIMER_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_TRACE_EVENT_NAME_MAX
+ { "_POSIX_TRACE_EVENT_NAME_MAX", CONSTANT, _POSIX_TRACE_EVENT_NAME_MAX },
+#else
+ { "_POSIX_TRACE_EVENT_NAME_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_TRACE_NAME_MAX
+ { "_POSIX_TRACE_NAME_MAX", CONSTANT, _POSIX_TRACE_NAME_MAX },
+#else
+ { "_POSIX_TRACE_NAME_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_TRACE_SYS_MAX
+ { "_POSIX_TRACE_SYS_MAX", CONSTANT, _POSIX_TRACE_SYS_MAX },
+#else
+ { "_POSIX_TRACE_SYS_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_TRACE_USER_EVENT_MAX
+ { "_POSIX_TRACE_USER_EVENT_MAX", CONSTANT, _POSIX_TRACE_USER_EVENT_MAX },
+#else
+ { "_POSIX_TRACE_USER_EVENT_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_TTY_NAME_MAX
+ { "_POSIX_TTY_NAME_MAX", CONSTANT, _POSIX_TTY_NAME_MAX },
+#else
+ { "_POSIX_TTY_NAME_MAX", G_UNDEF, -1 },
+#endif
+#ifdef _POSIX_TZNAME_MAX
+ { "_POSIX_TZNAME_MAX", CONSTANT, _POSIX_TZNAME_MAX },
+#else
+ { "_POSIX_TZNAME_MAX", G_UNDEF, -1 },
+#endif
+
+ /* POSIX.1 Maximum Values */
+#ifdef _POSIX_CLOCKRES_MIN
+ { "_POSIX_CLOCKRES_MIN", CONSTANT, _POSIX_CLOCKRES_MIN },
+#else
+ { "_POSIX_CLOCKRES_MIN", G_UNDEF, -1 },
+#endif
+
+ /* POSIX.1-2001/XPG6 (and later) Runtime Invariants from <limits.h> */
+#ifdef _SC_SS_REPL_MAX
+ { "SS_REPL_MAX", SYSCONF, _SC_SS_REPL_MAX },
+#endif
+#ifdef _SC_TRACE_EVENT_NAME_MAX
+ { "TRACE_EVENT_NAME_MAX", SYSCONF, _SC_TRACE_EVENT_NAME_MAX },
+#endif
+#ifdef _SC_TRACE_NAME_MAX
+ { "TRACE_NAME_MAX", SYSCONF, _SC_TRACE_NAME_MAX },
+#endif
+#ifdef _SC_TRACE_SYS_MAX
+ { "TRACE_SYS_MAX", SYSCONF, _SC_TRACE_SYS_MAX },
+#endif
+#ifdef _SC_TRACE_USER_EVENT_MAX
+ { "TRACE_USER_EVENT_MAX", SYSCONF, _SC_TRACE_USER_EVENT_MAX },
+#endif
+
+ /* POSIX.2/XPG 4.2 (and later) Symbolic Utility Limits */
+#ifdef _SC_BC_BASE_MAX
+ { "BC_BASE_MAX", SYSCONF, _SC_BC_BASE_MAX },
+#endif
+#ifdef _SC_BC_DIM_MAX
+ { "BC_DIM_MAX", SYSCONF, _SC_BC_DIM_MAX },
+#endif
+#ifdef _SC_BC_SCALE_MAX
+ { "BC_SCALE_MAX", SYSCONF, _SC_BC_SCALE_MAX },
+#endif
+#ifdef _SC_BC_STRING_MAX
+ { "BC_STRING_MAX", SYSCONF, _SC_BC_STRING_MAX },
+#endif
+#ifdef CHARCLASS_NAME_MAX
+ { "CHARCLASS_NAME_MAX", CONSTANT, CHARCLASS_NAME_MAX },
+#endif
+#ifdef _SC_COLL_WEIGHTS_MAX
+ { "COLL_WEIGHTS_MAX", SYSCONF, _SC_COLL_WEIGHTS_MAX },
+#endif
+#ifdef _SC_EXPR_NEST_MAX
+ { "EXPR_NEST_MAX", SYSCONF, _SC_EXPR_NEST_MAX },
+#endif
+#ifdef _SC_LINE_MAX
+ { "LINE_MAX", SYSCONF, _SC_LINE_MAX },
+#endif
+# ifdef NL_ARGMAX
+ { "NL_ARGMAX", CONSTANT, NL_ARGMAX },
+#endif
+#ifdef NL_LANGMAX
+ { "NL_LANGMAX", CONSTANT, NL_LANGMAX },
+#endif
+#ifdef NL_MSGMAX
+ { "NL_MSGMAX", CONSTANT, NL_MSGMAX },
+#endif
+#ifdef NL_NMAX
+ { "NL_NMAX", CONSTANT, NL_NMAX },
+#endif
+#ifdef NL_SETMAX
+ { "NL_SETMAX", CONSTANT, NL_SETMAX },
+#endif
+#ifdef NL_TEXTMAX
+ { "NL_TEXTMAX", CONSTANT, NL_TEXTMAX },
+#endif
+#ifdef _SC_RAW_SOCKET
+ { "RAW_SOCKET", SYSCONF, _SC_RAW_SOCKET },
+#endif
+#ifdef _SC_RE_DUP_MAX
+ { "RE_DUP_MAX", SYSCONF, _SC_RE_DUP_MAX },
+#endif
+
+ /* POSIX.2 Optional Facility Configuration Values */
+#ifdef _SC_2_C_BIND
+ { "POSIX2_C_BIND", SYSCONF, _SC_2_C_BIND },
+#else
+ { "POSIX2_C_BIND", G_UNDEF, -1 },
+#endif
+#ifdef _SC_2_C_DEV
+ { "POSIX2_C_DEV", SYSCONF, _SC_2_C_DEV },
+#else
+ { "POSIX2_C_DEV", G_UNDEF, -1 },
+#endif
+#if defined (_SC_2_C_VERSION)
+ { "POSIX2_C_VERSION", SYSCONF, _SC_2_C_VERSION },
+#else
+ { "POSIX2_C_VERSION", G_UNDEF, -1 },
+#endif
+#if defined (_SC_2_CHAR_TERM)
+ { "POSIX2_CHAR_TERM", SYSCONF, _SC_2_CHAR_TERM },
+#else
+ { "POSIX2_CHAR_TERM", G_UNDEF, -1 },
+#endif
+#ifdef _SC_2_FORT_DEV
+ { "POSIX2_FORT_DEV", SYSCONF, _SC_2_FORT_DEV },
+#else
+ { "POSIX2_FORT_DEV", G_UNDEF, -1 },
+#endif
+#ifdef _SC_2_FORT_RUN
+ { "POSIX2_FORT_RUN", SYSCONF, _SC_2_FORT_RUN },
+#else
+ { "POSIX2_FORT_RUN", G_UNDEF, -1 },
+#endif
+#ifdef _SC_2_LOCALEDEF
+ { "POSIX2_LOCALEDEF", SYSCONF, _SC_2_LOCALEDEF },
+#else
+ { "POSIX2_LOCALEDEF", G_UNDEF, -1 },
+#endif
+#ifdef _SC_2_SW_DEV
+ { "POSIX2_SW_DEV", SYSCONF, _SC_2_SW_DEV },
+#else
+ { "POSIX2_SW_DEV", G_UNDEF, -1 },
+#endif
+#if defined (_SC2_UPE)
+ { "POSIX2_UPE", SYSCONF, _SC_2_UPE },
+#else
+ { "POSIX2_UPE", G_UNDEF, -1 },
+#endif
+#if !defined (_POSIX2_VERSION) && defined (_SC_2_VERSION)
+ { "_POSIX2_VERSION", SYSCONF, _SC_2_VERSION },
+#else
+ { "_POSIX2_VERSION", G_UNDEF, -1 },
+#endif
+#if defined (_SC_REGEX_VERSION)
+ { "REGEX_VERSION", SYSCONF, _SC_REGEX_VERSION },
+ { "_REGEX_VERSION", SYSCONF, _SC_REGEX_VERSION },
+#else
+ { "REGEX_VERSION", G_UNDEF, -1 },
+ { "_REGEX_VERSION", G_UNDEF, -1 },
+#endif
+
+#if defined (_SC_2_PBS)
+ { "_POSIX2_PBS", SYSCONF, _SC_2_PBS },
+ { "_POSIX2_PBS_ACCOUNTING", SYSCONF, _SC_2_PBS_ACCOUNTING },
+# if defined (_SC_2_PBS_CHECKPOINT)
+ { "_POSIX2_PBS_CHECKPOINT", SYSCONF, _SC_2_PBS_CHECKPOINT },
+# endif
+ { "_POSIX2_PBS_LOCATE", SYSCONF, _SC_2_PBS_LOCATE },
+ { "_POSIX2_PBS_MESSAGE", SYSCONF, _SC_2_PBS_MESSAGE },
+ { "_POSIX2_PBS_TRACK", SYSCONF, _SC_2_PBS_TRACK },
+#endif
+
+ /* POSIX.1 Configurable System Variables */
+#ifdef _SC_ARG_MAX
+ { "ARG_MAX", SYSCONF, _SC_ARG_MAX },
+#endif
+#ifdef _SC_CHILD_MAX
+ { "CHILD_MAX", SYSCONF, _SC_CHILD_MAX },
+#endif
+#ifdef _SC_CLK_TCK
+ { "CLK_TCK", SYSCONF, _SC_CLK_TCK },
+#endif
+#ifdef _SC_DELAYTIMER_MAX
+ { "DELAYTIMER_MAX", SYSCONF, _SC_DELAYTIMER_MAX },
+#endif
+#ifdef _SC_NGROUPS_MAX
+ { "NGROUPS_MAX", SYSCONF, _SC_NGROUPS_MAX },
+#endif
+#ifdef NZERO
+ { "NZERO", CONSTANT, NZERO },
+#endif
+#ifdef _SC_OPEN_MAX
+ { "OPEN_MAX", SYSCONF, _SC_OPEN_MAX },
+#endif
+#ifdef PASS_MAX
+ { "PASS_MAX", CONSTANT, PASS_MAX },
+#endif
+#ifdef _SC_STREAM_MAX
+ { "STREAM_MAX", SYSCONF, _SC_STREAM_MAX },
+#endif
+#ifdef TMP_MAX
+ { "TMP_MAX", CONSTANT, TMP_MAX },
+#endif
+#ifdef _SC_TZNAME_MAX
+ { "TZNAME_MAX", SYSCONF, _SC_TZNAME_MAX },
+#endif
+
+ /* POSIX.1 Optional Facility Configuration Values */
+#if defined (_SC_ADVISORY_INFO)
+ { "_POSIX_ADVISORY_INFO", SYSCONF, _SC_ADVISORY_INFO },
+#endif
+#if defined (_SC_ASYNCHRONOUS_IO)
+ { "_POSIX_ASYNCHRONOUS_IO", SYSCONF, _SC_ASYNCHRONOUS_IO },
+#endif
+#if defined (_SC_BARRIERS)
+ { "_POSIX_BARRIERS", SYSCONF, _SC_BARRIERS },
+#endif
+#if defined (_SC_BASE)
+ { "_POSIX_BASE", SYSCONF, _SC_BASE },
+#endif
+#if defined (_SC_C_LANG_SUPPORT)
+ { "_POSIX_C_LANG_SUPPORT", SYSCONF, _SC_C_LANG_SUPPORT },
+#endif
+#if defined (_SC_C_LANG_SUPPORT_R)
+ { "_POSIX_C_LANG_SUPPORT_R", SYSCONF, _SC_C_LANG_SUPPORT_R },
+#endif
+#if defined (_SC_CLOCK_SELECTION)
+ { "_POSIX_CLOCK_SELECTION", SYSCONF, _SC_CLOCK_SELECTION },
+#endif
+#if defined (_SC_CPUTIME)
+ { "_POSIX_CPUTIME", SYSCONF, _SC_CPUTIME },
+#endif
+#if defined (_SC_DEVICE_IO)
+ { "_POSIX_DEVICE_IO", SYSCONF, _SC_DEVICE_IO },
+#endif
+#if defined (_SC_DEVICE_SPECIFIC)
+ { "_POSIX_DEVICE_SPECIFIC", SYSCONF, _SC_DEVICE_SPECIFIC },
+#endif
+#if defined (_SC_DEVICE_SPECIFIC_R)
+ { "_POSIX_DEVICE_SPECIFIC_R", SYSCONF, _SC_DEVICE_SPECIFIC_R },
+#endif
+#if defined (_SC_FD_MGMT)
+ { "_POSIX_FD_MGMT", SYSCONF, _SC_FD_MGMT },
+#endif
+#if defined (_SC_FIFO)
+ { "_POSIX_FIFO", SYSCONF, _SC_FIFO },
+#endif
+#if defined (_SC_FILE_ATTRIBUTES)
+ { "_POSIX_FILE_ATTRIBUTES", SYSCONF, _SC_FILE_ATTRIBUTES },
+#endif
+#if defined (_SC_FILE_LOCKING)
+ { "_POSIX_FILE_LOCKING", SYSCONF, _SC_FILE_LOCKING },
+#endif
+#if defined (_SC_FILE_SYSTEM)
+ { "_POSIX_FILE_SYSTEM", SYSCONF, _SC_FILE_SYSTEM },
+#endif
+#if defined (_SC_FSYNC)
+ { "_POSIX_FSYNC", SYSCONF, _SC_FSYNC },
+#endif
+#if defined (_SC_IPV6)
+ { "_POSIX_IPV6", SYSCONF, _SC_IPV6 },
+#endif
+#if defined (_SC_JOB_CONTROL)
+ { "_POSIX_JOB_CONTROL", SYSCONF, _SC_JOB_CONTROL },
+#endif
+#if defined (_SC_MAPPED_FILES)
+ { "_POSIX_MAPPED_FILES", SYSCONF, _SC_MAPPED_FILES },
+#endif
+#if defined (_SC_MEMLOCK)
+ { "_POSIX_MEMLOCK", SYSCONF, _SC_MEMLOCK },
+#endif
+#if defined (_SC_MEMLOCK_RANGE)
+ { "_POSIX_MEMLOCK_RANGE", SYSCONF, _SC_MEMLOCK_RANGE },
+#endif
+#if defined (_SC_MEMORY_PROTECTION)
+ { "_POSIX_MEMORY_PROTECTION", SYSCONF, _SC_MEMORY_PROTECTION },
+#endif
+#if defined (_SC_MESSAGE_PASSING)
+ { "_POSIX_MESSAGE_PASSING", SYSCONF, _SC_MESSAGE_PASSING },
+#endif
+#if defined (_SC_MONOTONIC_CLOCK)
+ { "_POSIX_MONOTONIC_CLOCK", SYSCONF, _SC_MONOTONIC_CLOCK },
+#endif
+#if defined (_SC_MULTI_PROCESS)
+ { "_POSIX_MULTI_PROCESS", SYSCONF, _SC_MULTI_PROCESS },
+#endif
+#if defined (_SC_NETWORKING)
+ { "_POSIX_NETWORKING", SYSCONF, _SC_NETWORKING },
+#endif
+#if defined (_SC_PIPE)
+ { "_POSIX_PIPE", SYSCONF, _SC_PIPE },
+#endif
+#if defined (SC_PRIORITIZED_IO)
+ { "_POSIX_PRIORITIZED_IO", SYSCONF, _SC_PRIORITIZED_IO },
+#endif
+#if defined (_SC_PRIORITY_SCHEDULING)
+ { "_POSIX_PRIORITY_SCHEDULING", SYSCONF, _SC_PRIORITY_SCHEDULING },
+#endif
+#if defined (_SC_READER_WRITER_LOCKS)
+ { "_POSIX_READER_WRITER_LOCKS", SYSCONF, _SC_READER_WRITER_LOCKS },
+#endif
+#if defined (_SC_RAW_SOCKETS)
+ { "_POSIX_RAW_SOCKETS", SYSCONF, _SC_RAW_SOCKETS },
+#endif
+#if defined (_SC_REALTIME_SIGNALS)
+ { "_POSIX_REALTIME_SIGNALS", SYSCONF, _SC_REALTIME_SIGNALS },
+#endif
+#if defined (_SC_REGEXP)
+ { "_POSIX_REGEXP", SYSCONF, _SC_REGEXP },
+#endif
+#if defined (_SC_SAVED_IDS)
+ { "_POSIX_SAVED_IDS", SYSCONF, _SC_SAVED_IDS },
+#endif
+#if defined (_SC_SEMAPHORES)
+ { "_POSIX_SEMAPHORES", SYSCONF, _SC_SEMAPHORES },
+#endif
+#if defined (_SC_SHARED_MEMORY_OBJECTS)
+ { "_POSIX_SHARED_MEMORY_OBJECTS", SYSCONF, _SC_SHARED_MEMORY_OBJECTS },
+#endif
+ { "_POSIX_SHELL", CONSTANT, 1 },
+#if defined (_SC_SIGNALS)
+ { "_POSIX_SIGNALS", SYSCONF, _SC_SIGNALS },
+#endif
+#if defined (_SC_SINGLE_PROCESS)
+ { "_POSIX_SINGLE_PROCESS", SYSCONF, _SC_SINGLE_PROCESS },
+#endif
+#if defined (_SC_SPAWN)
+ { "_POSIX_SPAWN", SYSCONF, _SC_SPAWN },
+#endif
+#if defined (_SC_SPIN_LOCKS)
+ { "_POSIX_SPIN_LOCKS", SYSCONF, _SC_SPIN_LOCKS },
+#endif
+#if defined (_SC_SPORADIC_SERVER)
+ { "_POSIX_SPORADIC_SERVER", SYSCONF, _SC_SPORADIC_SERVER },
+#endif
+#if defined (_SC_SYMLOOP_MAX)
+ { "_POSIX_SYMLOOP_MAX", SYSCONF, _SC_SYMLOOP_MAX },
+#endif
+#if defined (_SC_SYNCHRONIZED_IO)
+ { "_POSIX_SYNCHRONIZED_IO", SYSCONF, _SC_SYNCHRONIZED_IO },
+#endif
+#if defined (_SC_SYSTEM_DATABASE)
+ { "_POSIX_SYSTEM_DATABASE", SYSCONF, _SC_SYSTEM_DATABASE },
+#endif
+#if defined (_SC_SYSTEM_DATABASE_R)
+ { "_POSIX_SYSTEM_DATABASE_R", SYSCONF, _SC_SYSTEM_DATABASE_R },
+#endif
+#if defined (_SC_THREAD_ATTR_STACKADDR)
+ { "_POSIX_THREAD_ATTR_STACKADDR", SYSCONF, _SC_THREAD_ATTR_STACKADDR },
+#endif
+#if defined (_SC_THREAD_ATTR_STACKSIZE)
+ { "_POSIX_THREAD_ATTR_STACKSIZE", SYSCONF, _SC_THREAD_ATTR_STACKSIZE },
+#endif
+#if defined (_SC_THREAD_CPUTIME)
+ { "_POSIX_THREAD_CPUTIME", SYSCONF, _SC_THREAD_CPUTIME },
+#endif
+#if defined (_SC_THREAD_PRIO_INHERIT)
+ { "_POSIX_THREAD_PRIO_INHERIT", SYSCONF, _SC_THREAD_PRIO_INHERIT },
+#endif
+#if defined (_SC_THREAD_PRIO_PROTECT)
+ { "_POSIX_THREAD_PRIO_PROTECT", SYSCONF, _SC_THREAD_PRIO_PROTECT },
+#endif
+#if defined (_SC_THREAD_PRIORITY_SCHEDULING)
+ { "_POSIX_THREAD_PRIORITY_SCHEDULING", SYSCONF, _SC_THREAD_PRIORITY_SCHEDULING },
+#endif
+#if defined (_SC_THREAD_PROCESS_SHARED)
+ { "_POSIX_THREAD_PROCESS_SHARED", SYSCONF, _SC_THREAD_PROCESS_SHARED },
+#endif
+#if defined (_SC_THREAD_SAFE_FUNCTIONS)
+ { "_POSIX_THREAD_SAFE_FUNCTIONS", SYSCONF, _SC_THREAD_SAFE_FUNCTIONS },
+#endif
+#if defined (_SC_THREAD_SPORADIC_SERVER)
+ { "_POSIX_THREAD_SPORADIC_SERVER", SYSCONF, _SC_THREAD_SPORADIC_SERVER },
+#endif
+#if defined (_SC_THREADS)
+ { "_POSIX_THREADS", SYSCONF, _SC_THREADS },
+#endif
+#if defined (_SC_TIMEOUTS)
+ { "_POSIX_TIMEOUTS", SYSCONF, _SC_TIMEOUTS },
+#endif
+#if defined (_SC_TIMERS)
+ { "_POSIX_TIMERS", SYSCONF, _SC_TIMERS },
+#endif
+#if defined (_SC_TRACE)
+ { "_POSIX_TRACE", SYSCONF, _SC_TRACE },
+#endif
+#if defined (_SC_TRACE)
+ { "_POSIX_TRACE_EVENT_FILTER",SYSCONF, _SC_TRACE_EVENT_FILTER },
+#endif
+#if defined (_SC_TRACE)
+ { "_POSIX_TRACE_INHERIT", SYSCONF, _SC_TRACE_INHERIT },
+#endif
+#if defined (_SC_TRACE)
+ { "_POSIX_TRACE_LOG", SYSCONF, _SC_TRACE_LOG },
+#endif
+#if defined (_SC_TYPED_MEMORY_OBJECTS)
+ { "_POSIX_TYPED_MEMORY_OBJECTS", SYSCONF, _SC_TYPED_MEMORY_OBJECTS },
+#endif
+#if defined (_SC_VERSION)
+ { "_POSIX_VERSION", SYSCONF, _SC_VERSION },
+#endif
+
+ /* XPG 4.2 Configurable System Variables. */
+#if defined (_SC_ATEXIT_MAX)
+ { "ATEXIT_MAX", SYSCONF, _SC_ATEXIT_MAX },
+#endif
+#if defined (_SC_GETGR_R_SIZE_MAX)
+ { "GETGR_R_SIZE_MAX", SYSCONF, _SC_GETGR_R_SIZE_MAX },
+#endif
+#if defined (_SC_GETPW_R_SIZE_MAX)
+ { "GETPW_R_SIZE_MAX", SYSCONF, _SC_GETPW_R_SIZE_MAX },
+#endif
+#if defined (_SC_HOST_NAME_MAX)
+ { "HOST_NAME_MAX", SYSCONF, _SC_HOST_NAME_MAX },
+#endif
+#if defined (_SC_IOV_MAX)
+ { "IOV_MAX", SYSCONF, _SC_IOV_MAX },
+#endif
+#if defined (_SC_LOGIN_NAME_MAX)
+ { "LOGIN_NAME_MAX", SYSCONF, _SC_LOGIN_NAME_MAX },
+#endif
+#if defined (_SC_LOGNAME_MAX)
+ { "LOGNAME_MAX", SYSCONF, _SC_LOGNAME_MAX },
+#endif
+#if defined (_SC_PAGESIZE)
+ { "PAGESIZE", SYSCONF, _SC_PAGESIZE },
+#endif
+#if defined (_SC_PAGE_SIZE)
+ { "PAGE_SIZE", SYSCONF, _SC_PAGE_SIZE },
+#endif
+#if defined (_SC_SYMLOOP_MAX)
+ { "SYMLOOP_MAX", SYSCONF, _SC_SYMLOOP_MAX },
+#endif
+#if defined (_SC_TTY_NAME_MAX)
+ { "TTY_NAME_MAX", SYSCONF, _SC_TTY_NAME_MAX },
+#endif
+#if defined (_SC_USER_GROUPS)
+ { "_POSIX_USER_GROUPS", SYSCONF, _SC_USER_GROUPS },
+#endif
+#if defined (_SC_USER_GROUPS_R)
+ { "_POSIX_USER_GROUPS_R", SYSCONF, _SC_USER_GROUPS_R },
+#endif
+
+#if defined (_SC_AIO_LISTIO_MAX)
+ { "AIO_LISTIO_MAX", SYSCONF, _SC_AIO_LISTIO_MAX },
+#endif
+#if defined (_SC_AIO_MAX)
+ { "AIO_MAX", SYSCONF, _SC_AIO_MAX },
+#endif
+#if defined (_SC_AIO_PRIO_DELTA_MAX)
+ { "AIO_PRIO_DELTA_MAX", SYSCONF, _SC_AIO_PRIO_DELTA_MAX },
+#endif
+#if defined (_SC_MQ_OPEN_MAX)
+ { "MQ_OPEN_MAX", SYSCONF, _SC_MQ_OPEN_MAX },
+#endif
+#if defined (_SC_MQ_PRIO_MAX)
+ { "MQ_PRIO_MAX", SYSCONF, _SC_MQ_PRIO_MAX },
+#endif
+#if defined (_SC_RTSIG_MAX)
+ { "RTSIG_MAX", SYSCONF, _SC_RTSIG_MAX },
+#endif
+#if defined (_SC_SEM_NSEMS_MAX)
+ { "SEM_NSEMS_MAX", SYSCONF, _SC_SEM_NSEMS_MAX },
+#endif
+#if defined (_SC_SEM_VALUE_MAX)
+ { "SEM_VALUE_MAX", SYSCONF, _SC_SEM_VALUE_MAX },
+#endif
+#if defined (_SC_SIGQUEUE_MAX)
+ { "SIGQUEUE_MAX", SYSCONF, _SC_SIGQUEUE_MAX },
+#endif
+#if defined (_SC_TIMER_MAX)
+ { "TIMER_MAX", SYSCONF, _SC_TIMER_MAX },
+#endif
+
+#if defined (_SC_THREAD_DESTRUCTOR_ITERATIONS)
+ { "PTHREAD_DESTRUCTOR_ITERATIONS", SYSCONF, _SC_THREAD_DESTRUCTOR_ITERATIONS },
+#endif
+#if defined (_SC_THREAD_KEYS_MAX)
+ { "PTHREAD_KEYS_MAX", SYSCONF, _SC_THREAD_KEYS_MAX },
+#endif
+#if defined (_SC_THREAD_STACK_MIN)
+ { "PTHREAD_STACK_MIN", SYSCONF, _SC_THREAD_STACK_MIN },
+#endif
+#if defined (_SC_THREAD_THREADS_MAX)
+ { "PTHREAD_THREADS_MAX", SYSCONF, _SC_THREAD_THREADS_MAX },
+#endif
+
+ /* XPG 4.2 (and later) Optional Facility Configuration Values */
+#if defined (_SC_XOPEN_CRYPT)
+ { "_XOPEN_CRYPT", SYSCONF, _SC_XOPEN_CRYPT },
+#endif
+#if defined (_SC_XOPEN_ENH_I18N)
+ { "_XOPEN_ENH_I18N", SYSCONF, _SC_XOPEN_ENH_I18N },
+#endif
+#if defined (_SC_XOPEN_LEGACY)
+ { "_XOPEN_LEGACY", SYSCONF, _SC_XOPEN_LEGACY },
+#endif /* _SC_XOPEN_LEGACY */
+#if defined (_SC_XOPEN_REALTIME)
+ { "_XOPEN_REALTIME", SYSCONF, _SC_XOPEN_REALTIME },
+#endif
+#if defined (_SC_XOPEN_REALTIME_THREADS)
+ { "_XOPEN_REALTIME_THREADS", SYSCONF, _SC_XOPEN_REALTIME_THREADS },
+#endif
+#if defined (_SC_XOPEN_SHM)
+ { "_XOPEN_SHM", SYSCONF, _SC_XOPEN_SHM },
+#endif
+#if defined (_SC_XOPEN_STREAMS)
+ { "_XOPEN_STREAMS", SYSCONF, _SC_XOPEN_STREAMS },
+#endif
+#if defined (_SC_XOPEN_UNIX)
+ { "_XOPEN_UNIX", SYSCONF, _SC_XOPEN_UNIX },
+#endif
+#if defined (_SC_XOPEN_VERSION)
+ { "_XOPEN_VERSION", SYSCONF, _SC_XOPEN_VERSION },
+#endif
+#if defined (_SC_XOPEN_XCU_VERSION)
+ { "_XOPEN_XCU_VERSION", SYSCONF, _SC_XOPEN_XCU_VERSION },
+#endif
+#if defined (_SC_XOPEN_XPG2)
+ { "_XOPEN_XPG2", SYSCONF, _SC_XOPEN_XPG2 },
+#endif
+#if defined (_SC_XOPEN_XPG3)
+ { "_XOPEN_XPG3", SYSCONF, _SC_XOPEN_XPG3 },
+#endif
+#if defined (_SC_XOPEN_XPG4)
+ { "_XOPEN_XPG4", SYSCONF, _SC_XOPEN_XPG4 },
+#endif
+#if defined (_SC_XOPEN_XPG5)
+ { "_XOPEN_XPG5", SYSCONF, _SC_XOPEN_XPG5 },
+#endif
+
+ /* POSIX.1 Configurable Pathname Values */
+#ifdef _PC_LINK_MAX
+ { "LINK_MAX", PATHCONF, _PC_LINK_MAX },
+#endif
+#ifdef _PC_MAX_CANON
+ { "MAX_CANON", PATHCONF, _PC_MAX_CANON },
+#endif
+#ifdef _PC_MAX_INPUT
+ { "MAX_INPUT", PATHCONF, _PC_MAX_INPUT },
+#endif
+#ifdef _PC_NAME_MAX
+ { "NAME_MAX", PATHCONF, _PC_NAME_MAX },
+#endif
+#ifdef _PC_PATH_MAX
+ { "PATH_MAX", PATHCONF, _PC_PATH_MAX },
+#endif
+#ifdef _PC_PIPE_BUF
+ { "PIPE_BUF", PATHCONF, _PC_PIPE_BUF },
+#endif
+#ifdef _PC_SYMLINK_MAX
+ { "SYMLINK_MAX", PATHCONF, _PC_SYMLINK_MAX },
+#endif
+#ifdef _PC_CHOWN_RESTRICTED
+ { "_POSIX_CHOWN_RESTRICTED", PATHCONF, _PC_CHOWN_RESTRICTED },
+#endif
+#ifdef _PC_NO_TRUNC
+ { "_POSIX_NO_TRUNC", PATHCONF, _PC_NO_TRUNC },
+#endif
+#ifdef _PC_VDISABLE
+ { "_POSIX_VDISABLE", PATHCONF, _PC_VDISABLE },
+#endif
+
+ /* XPG 4.2 Configurable Pathname Values */
+#if defined (_PC_FILESIZEBITS)
+ { "FILESIZEBITS", PATHCONF, _PC_FILESIZEBITS },
+#endif
+#if defined (_PC_ASYNC_IO)
+ { "_POSIX_ASYNC_IO", PATHCONF, _PC_ASYNC_IO },
+#endif
+#if defined (_PC_PRIO_IO)
+ { "_POSIX_PRIO_IO", PATHCONF, _PC_PRIO_IO },
+#endif
+#if defined (_PC_SYNC_IO)
+ { "_POSIX_SYNC_IO", PATHCONF, _PC_SYNC_IO },
+#endif
+
+ /* POSIX.1-200x configurable pathname values */
+#if defined (_PC_ALLOC_SIZE_MIN)
+ { "POSIX_ALLOC_SIZE_MIN", PATHCONF, _PC_ALLOC_SIZE_MIN },
+ { "POSIX_REC_INCR_XFER_SIZE", PATHCONF, _PC_REC_INCR_XFER_SIZE },
+ { "POSIX_REC_MAX_XFER_SIZE", PATHCONF, _PC_REC_MAX_XFER_SIZE },
+ { "POSIX_REC_MIN_XFER_SIZE", PATHCONF, _PC_REC_MIN_XFER_SIZE },
+ { "POSIX_REC_XFER_ALIGN", PATHCONF, _PC_REC_XFER_ALIGN },
+#endif
+
+ /* ANSI/ISO C, POSIX.1-200x, XPG 4.2 (and later) C language type limits. */
+ { "CHAR_BIT", CONSTANT, CHAR_BIT },
+ { "CHAR_MAX", CONSTANT, CHAR_MAX },
+ { "CHAR_MIN", CONSTANT, CHAR_MIN },
+ { "INT_BIT", CONSTANT, INT_BIT },
+ { "INT_MAX", CONSTANT, INT_MAX },
+ { "INT_MIN", CONSTANT, INT_MIN },
+#ifdef LLONG_MAX
+ { "LLONG_MAX", LLCONST, VAL_LLONG_MAX },
+ { "LLONG_MIN", LLCONST, VAL_LLONG_MIN },
+#endif
+ { "LONG_BIT", CONSTANT, LONG_BIT },
+ { "LONG_MAX", CONSTANT, LONG_MAX },
+ { "LONG_MIN", CONSTANT, LONG_MIN },
+#ifdef MB_LEN_MAX
+ { "MB_LEN_MAX", CONSTANT, MB_LEN_MAX },
+#endif
+ { "SCHAR_MAX", CONSTANT, SCHAR_MAX },
+ { "SCHAR_MIN", CONSTANT, SCHAR_MIN },
+ { "SHRT_MAX", CONSTANT, SHRT_MAX },
+ { "SHRT_MIN", CONSTANT, SHRT_MIN },
+ { "SIZE_MAX", CONSTANT, SIZE_MAX },
+ { "SSIZE_MAX", CONSTANT, SSIZE_MAX },
+ { "UCHAR_MAX", CONSTANT, UCHAR_MAX },
+ { "UINT_MAX", CONSTANT, UINT_MAX },
+#ifdef ULLONG_MAX
+ { "ULLONG_MAX", LLCONST, VAL_ULLONG_MAX },
+#endif
+ { "ULONG_MAX", CONSTANT, ULONG_MAX },
+ { "USHRT_MAX", CONSTANT, USHRT_MAX },
+ { "WORD_BIT", CONSTANT, WORD_BIT },
+
+ { NULL }
+};
+
+static int num_getconf_variables = sizeof(conf_table) / sizeof(struct conf_variable) - 1;
+
+extern char *this_command_name;
+extern char **make_builtin_argv ();
+
+static void getconf_help ();
+static int getconf_print ();
+static int getconf_one ();
+static int getconf_all ();
+
+int
+getconf_builtin (list)
+ WORD_LIST *list;
+{
+ int c, r, opt, aflag;
+ char **v;
+
+ aflag = 0;
+ reset_internal_getopt();
+ while ((opt = internal_getopt (list, "ahv:")) != -1) {
+ switch (opt) {
+ case 'a':
+ aflag = 1;
+ break;
+ case 'h':
+ getconf_help();
+ return(EXECUTION_SUCCESS);
+ case 'v':
+ break; /* ignored */
+ default:
+ builtin_usage();
+ return(EX_USAGE);
+ }
+ }
+
+ list = loptend;
+ if ((aflag == 0 && list == 0) || (aflag && list) || list_length(list) > 2) {
+ builtin_usage();
+ return(EX_USAGE);
+ }
+
+ r = aflag ? getconf_all() : getconf_one(list);
+
+ return r;
+}
+
+static void
+getconf_help()
+{
+ const struct conf_variable *cp;
+ register int i, column;
+
+ builtin_usage();
+ printf("Acceptable variable names are:\n");
+ for (cp = conf_table; cp->name != NULL; cp++) {
+ if (cp->type == PATHCONF)
+ printf("%s pathname\n", cp->name);
+ else
+ printf("%s\n", cp->name);
+ }
+}
+
+static int
+getconf_print(cp, vpath, all)
+struct conf_variable *cp;
+char *vpath;
+int all;
+{
+ long val;
+ char *sval;
+ size_t slen;
+
+ switch (cp->type) {
+ case G_UNDEF:
+ printf("undefined\n");
+ break;
+
+#ifdef LLONG_MAX
+ case LLCONST:
+ switch (cp->value) {
+ default:
+ case VAL_LLONG_MIN:
+ printf ("%lld\n", LLONG_MIN);
+ break;
+ case VAL_LLONG_MAX:
+ printf ("%lld\n", LLONG_MAX);
+ break;
+# if (ULLONG_MAX != LLONG_MAX)
+ case VAL_ULLONG_MAX:
+ printf ("%llu\n", ULLONG_MAX);
+ break;
+# endif
+ }
+ break;
+#endif
+ case CONSTANT:
+ switch (cp->value) {
+ case UCHAR_MAX:
+ case USHRT_MAX:
+ case UINT_MAX:
+#if (ULONG_MAX != UINT_MAX)
+ case ULONG_MAX:
+#endif
+#if (SIZE_MAX != UINT_MAX) && (SIZE_MAX != ULONG_MAX)
+ case SIZE_MAX:
+#endif
+
+ printf("%lu\n", cp->value);
+ break;
+ default:
+ printf("%ld\n", cp->value);
+ break;
+ }
+ break;
+
+ case CONFSTR:
+ errno = 0;
+ slen = confstr (cp->value, (char *) 0, (size_t) 0);
+ if (slen == 0) {
+ if (errno != 0) {
+ if (all)
+ printf ("getconf: %s\n", strerror(errno));
+ else
+ builtin_error ("%s", strerror(errno));
+ } else
+ printf ("undefined\n");
+ return (EXECUTION_FAILURE);
+ }
+ sval = xmalloc(slen);
+
+ confstr(cp->value, sval, slen);
+ printf("%s\n", sval);
+ free(sval);
+ break;
+
+ case SYSCONF:
+ errno = 0;
+ if ((val = sysconf(cp->value)) == -1) {
+ if (errno != 0) {
+ if (all)
+ printf("getconf: %s\n", strerror (errno));
+ else
+ builtin_error ("%s", strerror (errno));
+ return (EXECUTION_FAILURE);
+ }
+
+ printf ("undefined\n");
+ } else {
+ printf("%ld\n", val);
+ }
+ break;
+
+ case PATHCONF:
+ errno = 0;
+ if ((val = pathconf(vpath, cp->value)) == -1) {
+ if (errno != 0) {
+ if (all)
+ printf("getconf: %s: %s\n", vpath, strerror (errno));
+ else
+ builtin_error ("%s: %s", vpath, strerror (errno));
+ return (EXECUTION_FAILURE);
+ }
+
+ printf ("undefined\n");
+ } else {
+ printf ("%ld\n", val);
+ }
+ break;
+ }
+
+ return (ferror(stdout) ? EXECUTION_FAILURE : EXECUTION_SUCCESS);
+}
+
+static int
+getconf_all()
+{
+ const struct conf_variable *cp;
+ int ret;
+
+ ret = EXECUTION_SUCCESS;
+ for (cp = conf_table; cp->name != NULL; cp++) {
+ printf("%-35s", cp->name);
+ if (getconf_print(cp, "/", 1) == EXECUTION_FAILURE)
+ ret = EXECUTION_FAILURE;
+ }
+ return ret;
+}
+
+static int
+getconf_one(list)
+ WORD_LIST *list;
+{
+ const struct conf_variable *cp;
+ char *vname, *vpath;
+
+ vname = list->word->word;
+ vpath = (list->next && list->next->word) ? list->next->word->word
+ : (char *)NULL;
+
+ for (cp = conf_table; cp->name != NULL; cp++) {
+ if (strcmp(vname, cp->name) == 0)
+ break;
+ }
+ if (cp->name == NULL) {
+ builtin_error ("%s: unknown variable", vname);
+ return (EXECUTION_FAILURE);
+ }
+
+ if (cp->type == PATHCONF) {
+ if (list->next == 0) {
+ builtin_usage();
+ return(EX_USAGE);
+ }
+ } else {
+ if (list->next) {
+ builtin_usage();
+ return(EX_USAGE);
+ }
+ }
+
+ return (getconf_print(cp, vpath, 0));
+}
+
+static char *getconf_doc[] = {
+ "Display values of system limits and options.",
+ "",
+ "getconf writes the current value of a configurable system limit or",
+ "option variable to the standard output.",
+ (char *)NULL
+};
+
+struct builtin getconf_struct = {
+ "getconf",
+ getconf_builtin,
+ BUILTIN_ENABLED,
+ getconf_doc,
+ "getconf -[ah] or getconf [-v spec] sysvar or getconf [-v spec] pathvar pathname",
+ 0
+};
+
+#ifndef HAVE_CONFSTR
+static size_t
+confstr (name, buf, len)
+ int name;
+ char *buf;
+ size_t len;
+{
+ switch (name)
+ {
+ case _CS_PATH:
+ if (len > 0 && buf)
+ {
+ strncpy (buf, STANDARD_UTILS_PATH, len - 1);
+ buf[len - 1] = '\0';
+ }
+ return (sizeof (STANDARD_UTILS_PATH) + 1);
+ default:
+ errno = EINVAL;
+ return 0;
+ }
+}
+#endif
+
+#ifndef HAVE_SYSCONF
+extern long get_clk_tck __P((void));
+
+static long
+sysconf (name)
+ int name;
+{
+# if defined (_POSIX_VERSION)
+ switch (name)
+ {
+ case _SC_ARG_MAX:
+ return _POSIX_ARG_MAX;
+ case _SC_CHILD_MAX:
+ return _POSIX_CHILD_MAX;
+ case _SC_CLK_TCK:
+ return get_clk_tck();
+ case _SC_NGROUPS_MAX:
+ return _POSIX_NGROUPS_MAX;
+ case _SC_OPEN_MAX:
+ return _POSIX_OPEN_MAX;
+ case _SC_JOB_CONTROL:
+ return _POSIX_JOB_CONTROL;
+ case _SC_SAVED_IDS:
+ return _POSIX_SAVED_IDS;
+ case _SC_VERSION:
+ return _POSIX_VERSION;
+ case _SC_BC_BASE_MAX:
+ return _POSIX2_BC_BASE_MAX;
+ case _SC_BC_DIM_MAX:
+ return _POSIX2_BC_DIM_MAX;
+ case _SC_BC_SCALE_MAX:
+ return _POSIX2_BC_SCALE_MAX;
+ case _SC_BC_STRING_MAX:
+ return _POSIX2_BC_STRING_MAX;
+ case _SC_COLL_WEIGHTS_MAX:
+ return -1;
+ case _SC_EXPR_NEST_MAX:
+ return _POSIX2_EXPR_NEST_MAX;
+ case _SC_LINE_MAX:
+ return _POSIX2_LINE_MAX;
+ case _SC_RE_DUP_MAX:
+ return _POSIX2_RE_DUP_MAX;
+ case _SC_STREAM_MAX:
+ return _POSIX_STREAM_MAX;
+ case _SC_TZNAME_MAX:
+ return _POSIX_TZNAME_MAX;
+ default:
+ errno = EINVAL;
+ return -1;
+ }
+#else
+ errno = EINVAL;
+ return -1;
+#endif
+}
+#endif
+
+#ifndef HAVE_PATHCONF
+static long
+pathconf (path, name)
+ const char *path;
+ int name;
+{
+#if defined (_POSIX_VERSION)
+ switch (name)
+ {
+ case _PC_LINK_MAX:
+ return _POSIX_LINK_MAX;
+ case _PC_MAX_CANON:
+ return _POSIX_MAX_CANON;
+ case _PC_MAX_INPUT:
+ return _POSIX_MAX_INPUT;
+ case _PC_NAME_MAX:
+ return _POSIX_NAME_MAX;
+ case _PC_PATH_MAX:
+ return _POSIX_PATH_MAX;
+ case _PC_PIPE_BUF:
+ return _POSIX_PIPE_BUF;
+ case _PC_CHOWN_RESTRICTED:
+#ifdef _POSIX_CHOWN_RESTRICTED
+ return _POSIX_CHOWN_RESTRICTED;
+#else
+ return -1;
+#endif
+ case _PC_NO_TRUNC:
+#ifdef _POSIX_NO_TRUNC
+ return _POSIX_NO_TRUNC;
+#else
+ return -1;
+#endif
+ case _PC_VDISABLE:
+#ifdef _POSIX_VDISABLE
+ return _POSIX_VDISABLE;
+#else
+ return -1;
+#endif
+ default:
+ errno = EINVAL;
+ return -1;
+ }
+#else
+ errno = EINVAL;
+ return -1;
+#endif
+}
+#endif
diff --git a/examples/loadables/getconf.h b/examples/loadables/getconf.h
new file mode 100644
index 0000000..c84062d
--- /dev/null
+++ b/examples/loadables/getconf.h
@@ -0,0 +1,214 @@
+/* getconf.h -- replacement definitions for ones the system doesn't provide. */
+
+#ifndef _GETCONF_H
+#define _GETCONF_H
+
+/* Some systems do not define these; use POSIX.2 minimum recommended values. */
+#ifndef _POSIX2_COLL_WEIGHTS_MAX
+# define _POSIX2_COLL_WEIGHTS_MAX 2
+#endif
+
+/* If we're on a posix system, but the system doesn't define the necessary
+ constants, use posix.1 minimum values. */
+#if defined (_POSIX_VERSION)
+
+#ifndef _POSIX_ARG_MAX
+# define _POSIX_ARG_MAX 4096
+#endif
+#ifndef _POSIX_CHILD_MAX
+# define _POSIX_CHILD_MAX 6
+#endif
+#ifndef _POSIX_LINK_MAX
+# define _POSIX_LINK_MAX 8
+#endif
+#ifndef _POSIX_MAX_CANON
+# define _POSIX_MAX_CANON 255
+#endif
+#ifndef _POSIX_MAX_INPUT
+# define _POSIX_MAX_INPUT 255
+#endif
+#ifndef _POSIX_NAME_MAX
+# define _POSIX_NAME_MAX 14
+#endif
+#ifndef _POSIX_NGROUPS_MAX
+# define _POSIX_NGROUPS_MAX 0
+#endif
+#ifndef _POSIX_OPEN_MAX
+# define _POSIX_OPEN_MAX 16
+#endif
+#ifndef _POSIX_PATH_MAX
+# define _POSIX_PATH_MAX 255
+#endif
+#ifndef _POSIX_PIPE_BUF
+# define _POSIX_PIPE_BUF 512
+#endif
+#ifndef _POSIX_SSIZE_MAX
+# define _POSIX_SSIZE_MAX 32767
+#endif
+#ifndef _POSIX_STREAM_MAX
+# define _POSIX_STREAM_MAX 8
+#endif
+#ifndef _POSIX_TZNAME_MAX
+# define _POSIX_TZNAME_MAX 3
+#endif
+
+#ifndef _POSIX2_BC_BASE_MAX
+# define _POSIX2_BC_BASE_MAX 99
+#endif
+#ifndef _POSIX2_BC_DIM_MAX
+# define _POSIX2_BC_DIM_MAX 2048
+#endif
+#ifndef _POSIX2_BC_SCALE_MAX
+# define _POSIX2_BC_SCALE_MAX 99
+#endif
+#ifndef _POSIX2_BC_STRING_MAX
+# define _POSIX2_BC_STRING_MAX 1000
+#endif
+#ifndef _POSIX2_EQUIV_CLASS_MAX
+# define _POSIX2_EQUIV_CLASS_MAX 2
+#endif
+#ifndef _POSIX2_EXPR_NEST_MAX
+# define _POSIX2_EXPR_NEST_MAX 32
+#endif
+#ifndef _POSIX2_LINE_MAX
+# define _POSIX2_LINE_MAX 2048
+#endif
+#ifndef _POSIX2_RE_DUP_MAX
+# define _POSIX2_RE_DUP_MAX 255
+#endif
+
+/* configurable system variables */
+#if !defined (HAVE_SYSCONF)
+
+#ifndef _SC_ARG_MAX
+# define _SC_ARG_MAX 1
+# define _SC_CHILD_MAX 2
+# define _SC_CLK_TCK 3
+# define _SC_NGROUPS_MAX 4
+# define _SC_OPEN_MAX 5
+# define _SC_JOB_CONTROL 6
+# define _SC_SAVED_IDS 7
+# define _SC_VERSION 8
+# define _SC_BC_BASE_MAX 9
+# define _SC_BC_DIM_MAX 10
+# define _SC_BC_SCALE_MAX 11
+# define _SC_BC_STRING_MAX 12
+# define _SC_COLL_WEIGHTS_MAX 13
+# define _SC_EXPR_NEST_MAX 14
+# define _SC_LINE_MAX 15
+# define _SC_RE_DUP_MAX 16
+#if 0
+# define _SC_2_VERSION 17
+# define _SC_2_C_BIND 18
+# define _SC_2_C_DEV 19
+# define _SC_2_CHAR_TERM 20
+# define _SC_2_FORT_DEV 21
+# define _SC_2_FORT_RUN 22
+# define _SC_2_LOCALEDEF 23
+# define _SC_2_SW_DEV 24
+# define _SC_2_UPE 25
+#endif /* 0 */
+
+# define _SC_STREAM_MAX 26
+# define _SC_TZNAME_MAX 27
+#endif /* !_SC_ARG_MAX */
+
+#endif /* !HAVE_SYSCONF */
+
+/* configurable pathname variables */
+#if !defined (HAVE_PATHCONF)
+
+#ifndef _PC_LINK_MAX
+#define _PC_LINK_MAX 1
+#define _PC_MAX_CANON 2
+#define _PC_MAX_INPUT 3
+#define _PC_NAME_MAX 4
+#define _PC_PATH_MAX 5
+#define _PC_PIPE_BUF 6
+#define _PC_CHOWN_RESTRICTED 7
+#define _PC_NO_TRUNC 8
+#define _PC_VDISABLE 9
+#endif /* !_PC_LINK_MAX */
+
+#endif /* !HAVE_PATHCONF */
+
+#endif /* _POSIX_VERSION */
+
+#ifndef _CS_PATH
+# define _CS_PATH 1
+#endif
+
+/* ANSI/ISO C, POSIX.1-200x, XPG 4.2 (and later) C language type limits.
+ Defined only if the system include files don't. Assume a 32-bit
+ environment with signed 8-bit characters. */
+
+#ifndef CHAR_BIT
+# define CHAR_BIT 8
+#endif
+#ifndef CHAR_MAX
+# define CHAR_MAX 127
+#endif
+#ifndef CHAR_MIN
+# define CHAR_MIN -128
+#endif
+
+#ifndef INT_BIT
+# define INT_BIT (sizeof (int) * CHAR_BIT)
+#endif
+#ifndef INT_MAX
+# define INT_MAX 2147483647
+#endif
+#ifndef INT_MIN
+# define INT_MIN (-2147483647-1)
+#endif
+
+#ifndef LONG_BIT
+# define LONG_BIT (sizeof (long int) * CHAR_BIT)
+#endif
+#ifndef LONG_MAX
+# define LONG_MAX 2147483647L
+#endif
+#ifndef LONG_MIN
+# define LONG_MIN (-2147483647L-1L)
+#endif
+
+#ifndef SCHAR_MAX
+# define SCHAR_MAX CHAR_MAX
+#endif
+#ifndef SCHAR_MIN
+# define SCHAR_MIN CHAR_MIN
+#endif
+
+#ifndef SHRT_MAX
+# define SHRT_MAX 32767
+#endif
+#ifndef SHRT_MIN
+# define SHRT_MIN (-32768)
+#endif
+
+#ifndef UCHAR_MAX
+# define UCHAR_MAX 255
+#endif
+#ifndef UINT_MAX
+# define UINT_MAX 4294967295U
+#endif
+#ifndef ULONG_MAX
+# define ULONG_MAX 4294967295UL
+#endif
+#ifndef USHRT_MAX
+# define UCHAR_MAX 65535
+#endif
+
+/* assume size_t is `unsigned int'; ssize_t is `int' */
+#ifndef SIZE_MAX
+# define SIZE_MAX UINT_MAX
+#endif
+#ifndef SSIZE_MAX
+# define SSIZE_MAX INT_MAX
+#endif
+
+#ifndef WORD_BIT
+# define WORD_BIT (sizeof (int) * CHAR_BIT)
+#endif
+
+#endif /* _GETCONF_H */
diff --git a/examples/loadables/head.c b/examples/loadables/head.c
new file mode 100644
index 0000000..22cf6ab
--- /dev/null
+++ b/examples/loadables/head.c
@@ -0,0 +1,164 @@
+/* head - copy first part of files. */
+
+/* See Makefile for compilation details. */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+#include "posixstat.h"
+#include "filecntl.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+
+#include <stdio.h>
+#include <errno.h>
+#include "chartypes.h"
+
+#include "builtins.h"
+#include "shell.h"
+#include "bashgetopt.h"
+#include "common.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+static void
+munge_list (list)
+ WORD_LIST *list;
+{
+ WORD_LIST *l, *nl;
+ WORD_DESC *wd;
+ char *arg;
+
+ for (l = list; l; l = l->next)
+ {
+ arg = l->word->word;
+ if (arg[0] != '-' || arg[1] == '-' || (DIGIT(arg[1]) == 0))
+ return;
+ /* We have -[0-9]* */
+ wd = make_bare_word (arg+1);
+ nl = make_word_list (wd, l->next);
+ l->word->word[1] = 'n';
+ l->word->word[2] = '\0';
+ l->next = nl;
+ l = nl; /* skip over new argument */
+ }
+}
+
+static int
+file_head (fp, cnt)
+ FILE *fp;
+ int cnt;
+{
+ int ch;
+
+ while (cnt--)
+ {
+ while ((ch = getc (fp)) != EOF)
+ {
+ if (putchar (ch) == EOF)
+ {
+ builtin_error ("write error: %s", strerror (errno));
+ return EXECUTION_FAILURE;
+ }
+ if (ch == '\n')
+ break;
+ }
+ }
+}
+
+head_builtin (list)
+ WORD_LIST *list;
+{
+ int nline, opt, rval;
+ WORD_LIST *l;
+ FILE *fp;
+
+ char *t;
+
+ munge_list (list); /* change -num into -n num */
+
+ reset_internal_getopt ();
+ nline = 10;
+ while ((opt = internal_getopt (list, "n:")) != -1)
+ {
+ switch (opt)
+ {
+ case 'n':
+ nline = atoi (list_optarg);
+ if (nline <= 0)
+ {
+ builtin_error ("bad line count: %s", list_optarg);
+ return (EX_USAGE);
+ }
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ if (list == 0)
+ return (file_head (stdin, nline));
+
+ for (rval = EXECUTION_SUCCESS, opt = 1, l = list; l; l = l->next)
+ {
+ fp = fopen (l->word->word, "r");
+ if (fp == NULL)
+ {
+ builtin_error ("%s: %s", l->word->word, strerror (errno));
+ continue;
+ }
+ if (list->next) /* more than one file */
+ {
+ printf ("%s==> %s <==\n", opt ? "" : "\n", l->word->word);
+ opt = 0;
+ }
+ rval = file_head (fp, nline);
+ fclose (fp);
+ }
+
+ return (rval);
+}
+
+char *head_doc[] = {
+ "Display lines from beginning of file.",
+ "",
+ "Copy the first N lines from the input files to the standard output.",
+ "N is supplied as an argument to the `-n' option. If N is not given,",
+ "the first ten lines are copied.",
+ (char *)NULL
+};
+
+struct builtin head_struct = {
+ "head", /* builtin name */
+ head_builtin, /* function implementing the builtin */
+ BUILTIN_ENABLED, /* initial flags for builtin */
+ head_doc, /* array of long documentation strings. */
+ "head [-n num] [file ...]", /* usage synopsis; becomes short_doc */
+ 0 /* reserved for internal use */
+};
diff --git a/examples/loadables/hello.c b/examples/loadables/hello.c
new file mode 100644
index 0000000..bff6e76
--- /dev/null
+++ b/examples/loadables/hello.c
@@ -0,0 +1,64 @@
+/* Sample builtin to be dynamically loaded with enable -f and create a new
+ builtin. */
+
+/* See Makefile for compilation details. */
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+
+#include "builtins.h"
+#include "shell.h"
+#include "bashgetopt.h"
+
+/* A builtin `xxx' is normally implemented with an `xxx_builtin' function.
+ If you're converting a command that uses the normal Unix argc/argv
+ calling convention, use argv = make_builtin_argv (list, &argc) and call
+ the original `main' something like `xxx_main'. Look at cat.c for an
+ example.
+
+ Builtins should use internal_getopt to parse options. It is the same as
+ getopt(3), but it takes a WORD_LIST *. Look at print.c for an example
+ of its use.
+
+ If the builtin takes no options, call no_options(list) before doing
+ anything else. If it returns a non-zero value, your builtin should
+ immediately return EX_USAGE. Look at logname.c for an example.
+
+ A builtin command returns EXECUTION_SUCCESS for success and
+ EXECUTION_FAILURE to indicate failure. */
+int
+hello_builtin (list)
+ WORD_LIST *list;
+{
+ printf("hello world\n");
+ fflush (stdout);
+ return (EXECUTION_SUCCESS);
+}
+
+/* An array of strings forming the `long' documentation for a builtin xxx,
+ which is printed by `help xxx'. It must end with a NULL. By convention,
+ the first line is a short description. */
+char *hello_doc[] = {
+ "Sample builtin.",
+ "",
+ "this is the long doc for the sample hello builtin",
+ (char *)NULL
+};
+
+/* The standard structure describing a builtin command. bash keeps an array
+ of these structures. The flags must include BUILTIN_ENABLED so the
+ builtin can be used. */
+struct builtin hello_struct = {
+ "hello", /* builtin name */
+ hello_builtin, /* function implementing the builtin */
+ BUILTIN_ENABLED, /* initial flags for builtin */
+ hello_doc, /* array of long documentation strings. */
+ "hello", /* usage synopsis; becomes short_doc */
+ 0 /* reserved for internal use */
+};
+
diff --git a/examples/loadables/id.c b/examples/loadables/id.c
new file mode 100644
index 0000000..8773349
--- /dev/null
+++ b/examples/loadables/id.c
@@ -0,0 +1,328 @@
+/*
+ * id - POSIX.2 user identity
+ *
+ * (INCOMPLETE -- supplementary groups for other users not yet done)
+ *
+ * usage: id [-Ggu] [-nr] [user]
+ *
+ * The default output format looks something like:
+ * uid=xxx(chet) gid=xx groups=aa(aname), bb(bname), cc(cname)
+ */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+#include <stdio.h>
+#include "bashtypes.h"
+#include <pwd.h>
+#include <grp.h>
+#include "bashansi.h"
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#else
+# include <sys/param.h>
+#endif
+
+#if !defined (HAVE_GETPW_DECLS)
+extern struct passwd *getpwuid ();
+#endif
+extern struct group *getgrgid ();
+
+#include "shell.h"
+#include "builtins.h"
+#include "stdc.h"
+#include "common.h"
+#include "bashgetopt.h"
+
+#define ID_ALLGROUPS 0x001 /* -G */
+#define ID_GIDONLY 0x002 /* -g */
+#define ID_USENAME 0x004 /* -n */
+#define ID_USEREAL 0x008 /* -r */
+#define ID_USERONLY 0x010 /* -u */
+
+#define ID_FLAGSET(s) ((id_flags & (s)) != 0)
+
+static int id_flags;
+
+static uid_t ruid, euid;
+static gid_t rgid, egid;
+
+static char *id_user;
+
+static int inituser ();
+
+static int id_pruser ();
+static int id_prgrp ();
+static int id_prgroups ();
+static int id_prall ();
+
+int
+id_builtin (list)
+ WORD_LIST *list;
+{
+ int opt;
+ char *user;
+
+ id_flags = 0;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "Ggnru")) != -1)
+ {
+ switch (opt)
+ {
+ case 'G': id_flags |= ID_ALLGROUPS; break;
+ case 'g': id_flags |= ID_GIDONLY; break;
+ case 'n': id_flags |= ID_USENAME; break;
+ case 'r': id_flags |= ID_USEREAL; break;
+ case 'u': id_flags |= ID_USERONLY; break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ user = list ? list->word->word : (char *)NULL;
+
+ /* Check for some invalid option combinations */
+ opt = ID_FLAGSET (ID_ALLGROUPS) + ID_FLAGSET (ID_GIDONLY) + ID_FLAGSET (ID_USERONLY);
+ if (opt > 1 || (opt == 0 && ((id_flags & (ID_USEREAL|ID_USENAME)) != 0)))
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ if (list && list->next)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ if (inituser (user) < 0)
+ return (EXECUTION_FAILURE);
+
+ opt = 0;
+ if (id_flags & ID_USERONLY)
+ opt += id_pruser ((id_flags & ID_USEREAL) ? ruid : euid);
+ else if (id_flags & ID_GIDONLY)
+ opt += id_prgrp ((id_flags & ID_USEREAL) ? rgid : egid);
+ else if (id_flags & ID_ALLGROUPS)
+ opt += id_prgroups (user);
+ else
+ opt += id_prall (user);
+ putchar ('\n');
+ fflush (stdout);
+
+ return (opt == 0 ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
+}
+
+static int
+inituser (uname)
+ char *uname;
+{
+ struct passwd *pwd;
+
+ if (uname)
+ {
+ pwd = getpwnam (uname);
+ if (pwd == 0)
+ {
+ builtin_error ("%s: no such user", uname);
+ return -1;
+ }
+ ruid = euid = pwd->pw_uid;
+ rgid = egid = pwd->pw_gid;
+ }
+ else
+ {
+ ruid = current_user.uid;
+ euid = current_user.euid;
+ rgid = current_user.gid;
+ egid = current_user.egid;
+ }
+ return 0;
+}
+
+/* Print the name or value of user ID UID. */
+static int
+id_pruser (uid)
+ int uid;
+{
+ struct passwd *pwd = NULL;
+ int r;
+
+ r = 0;
+ if (id_flags & ID_USENAME)
+ {
+ pwd = getpwuid (uid);
+ if (pwd == NULL)
+ r = 1;
+ }
+ if (pwd)
+ printf ("%s", pwd->pw_name);
+ else
+ printf ("%u", (unsigned) uid);
+
+ return r;
+}
+
+/* Print the name or value of group ID GID. */
+
+static int
+id_prgrp (gid)
+ int gid;
+{
+ struct group *grp = NULL;
+ int r;
+
+ r = 0;
+ if (id_flags & ID_USENAME)
+ {
+ grp = getgrgid (gid);
+ if (grp == NULL)
+ r = 1;
+ }
+
+ if (grp)
+ printf ("%s", grp->gr_name);
+ else
+ printf ("%u", (unsigned) gid);
+
+ return r;
+}
+
+static int
+id_prgroups (uname)
+ char *uname;
+{
+ int *glist, ng, i, r;
+
+ r = 0;
+ id_prgrp (rgid);
+ if (egid != rgid)
+ {
+ putchar (' ');
+ id_prgrp (egid);
+ }
+
+ if (uname)
+ {
+ builtin_error ("supplementary groups for other users not yet implemented");
+ glist = (int *)NULL;
+ ng = 0;
+ r = 1;
+ }
+ else
+ glist = get_group_array (&ng);
+
+ for (i = 0; i < ng; i++)
+ if (glist[i] != rgid && glist[i] != egid)
+ {
+ putchar (' ');
+ id_prgrp (glist[i]);
+ }
+
+ return r;
+}
+
+static int
+id_prall (uname)
+ char *uname;
+{
+ int r, i, ng, *glist;
+ struct passwd *pwd;
+ struct group *grp;
+
+ r = 0;
+ printf ("uid=%u", (unsigned) ruid);
+ pwd = getpwuid (ruid);
+ if (pwd == NULL)
+ r = 1;
+ else
+ printf ("(%s)", pwd->pw_name);
+
+ printf (" gid=%u", (unsigned) rgid);
+ grp = getgrgid (rgid);
+ if (grp == NULL)
+ r = 1;
+ else
+ printf ("(%s)", grp->gr_name);
+
+ if (euid != ruid)
+ {
+ printf (" euid=%u", (unsigned) euid);
+ pwd = getpwuid (euid);
+ if (pwd == NULL)
+ r = 1;
+ else
+ printf ("(%s)", pwd->pw_name);
+ }
+
+ if (egid != rgid)
+ {
+ printf (" egid=%u", (unsigned) egid);
+ grp = getgrgid (egid);
+ if (grp == NULL)
+ r = 1;
+ else
+ printf ("(%s)", grp->gr_name);
+ }
+
+ if (uname)
+ {
+ builtin_error ("supplementary groups for other users not yet implemented");
+ glist = (int *)NULL;
+ ng = 0;
+ r = 1;
+ }
+ else
+ glist = get_group_array (&ng);
+
+ if (ng > 0)
+ printf (" groups=");
+ for (i = 0; i < ng; i++)
+ {
+ if (i > 0)
+ printf (", ");
+ printf ("%u", (unsigned) glist[i]);
+ grp = getgrgid (glist[i]);
+ if (grp == NULL)
+ r = 1;
+ else
+ printf ("(%s)", grp->gr_name);
+ }
+
+ return r;
+}
+
+char *id_doc[] = {
+ "Display information about user."
+ "",
+ "Return information about user identity",
+ (char *)NULL
+};
+
+struct builtin id_struct = {
+ "id",
+ id_builtin,
+ BUILTIN_ENABLED,
+ id_doc,
+ "id [user]\n\tid -G [-n] [user]\n\tid -g [-nr] [user]\n\tid -u [-nr] [user]",
+ 0
+};
diff --git a/examples/loadables/ln.c b/examples/loadables/ln.c
new file mode 100644
index 0000000..ec73636
--- /dev/null
+++ b/examples/loadables/ln.c
@@ -0,0 +1,226 @@
+/* ln - make links */
+
+/* See Makefile for compilation details. */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "posixstat.h"
+
+#include <stdio.h>
+#include <errno.h>
+
+#include "builtins.h"
+#include "shell.h"
+#include "bashgetopt.h"
+#include "common.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+typedef int unix_link_syscall_t __P((const char *, const char *));
+
+#define LN_SYMLINK 0x01
+#define LN_UNLINK 0x02
+
+static unix_link_syscall_t *linkfn;
+static int dolink ();
+
+ln_builtin (list)
+ WORD_LIST *list;
+{
+ int rval, opt, flags;
+ WORD_LIST *l;
+ char *sdir;
+ struct stat sb;
+
+ flags = 0;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "fs")) != -1)
+ {
+ switch (opt)
+ {
+ case 'f':
+ flags |= LN_UNLINK;
+ break;
+ case 's':
+ flags |= LN_SYMLINK;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ if (list == 0)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ linkfn = (flags & LN_SYMLINK) ? symlink : link;
+
+ if (list->next == 0) /* ln target, equivalent to ln target . */
+ return (dolink (list->word->word, ".", flags));
+
+ if (list->next->next == 0) /* ln target source */
+ return (dolink (list->word->word, list->next->word->word, flags));
+
+ /* ln target1 target2 ... directory */
+
+ /* find last argument: target directory, and make sure it's an existing
+ directory. */
+ for (l = list; l->next; l = l->next)
+ ;
+ sdir = l->word->word;
+
+ if (stat(sdir, &sb) < 0)
+ {
+ builtin_error ("%s", sdir);
+ return (EXECUTION_FAILURE);
+ }
+
+ if (S_ISDIR (sb.st_mode) == 0)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ for (rval = EXECUTION_SUCCESS; list != l; list = list->next)
+ rval += dolink (list->word->word, sdir, flags);
+
+ return rval;
+}
+
+static char *
+mkdirpath (dir, file)
+ char *dir, *file;
+{
+ int dlen, flen;
+ char *ret;
+
+ dlen = strlen (dir);
+ flen = strlen (file);
+
+ ret = xmalloc (2 + dlen + flen);
+
+ strcpy (ret, dir);
+ if (ret[dlen - 1] != '/')
+ ret[dlen++] = '/';
+ strcpy (ret + dlen, file);
+ return ret;
+}
+
+#if defined (HAVE_LSTAT)
+# define LSTAT lstat
+#else
+# define LSTAT stat
+#endif
+
+static int
+dolink (src, dst, flags)
+ char *src, *dst;
+ int flags;
+{
+ struct stat ssb, dsb;
+ int exists;
+ char *dst_path, *p;
+
+ /* If we're not doing symlinks, the source must exist and not be a
+ directory. */
+ if ((flags & LN_SYMLINK) == 0)
+ {
+ if (stat (src, &ssb) != 0)
+ {
+ builtin_error ("%s: %s", src, strerror (errno));
+ return (EXECUTION_FAILURE);
+ }
+ if (S_ISDIR (ssb.st_mode))
+ {
+ errno = EISDIR;
+ builtin_error ("%s: %s", src, strerror (errno));
+ return (EXECUTION_FAILURE);
+ }
+ }
+
+ /* If the destination is a directory, create the final filename by appending
+ the basename of the source to the destination. */
+ dst_path = 0;
+ if ((stat (dst, &dsb) == 0) && S_ISDIR (dsb.st_mode))
+ {
+ if ((p = strrchr (src, '/')) == 0)
+ p = src;
+ else
+ p++;
+
+ dst_path = mkdirpath (dst, p);
+ dst = dst_path;
+ }
+
+ exists = LSTAT (dst, &dsb) == 0;
+
+ /* If -f was specified, and the destination exists, unlink it. */
+ if ((flags & LN_UNLINK) && exists && unlink (dst) != 0)
+ {
+ builtin_error ("%s: cannot unlink: %s", dst, strerror (errno));
+ FREE (dst_path);
+ return (EXECUTION_FAILURE);
+ }
+
+ /* Perform the link. */
+ if ((*linkfn) (src, dst) != 0)
+ {
+ builtin_error ("cannot link %s to %s: %s", dst, src, strerror (errno));
+ FREE (dst_path);
+ return (EXECUTION_FAILURE);
+ }
+
+ FREE (dst_path);
+ return (EXECUTION_SUCCESS);
+}
+
+char *ln_doc[] = {
+ "Link files.",
+ "",
+ "Create a new directory entry with the same modes as the original",
+ "file. The -f option means to unlink any existing file, permitting",
+ "the link to occur. The -s option means to create a symbolic link.",
+ "By default, ln makes hard links.",
+ (char *)NULL
+};
+
+/* The standard structure describing a builtin command. bash keeps an array
+ of these structures. */
+struct builtin ln_struct = {
+ "ln", /* builtin name */
+ ln_builtin, /* function implementing the builtin */
+ BUILTIN_ENABLED, /* initial flags for builtin */
+ ln_doc, /* array of long documentation strings. */
+ "ln [-fs] file1 [file2] OR ln [-fs] file ... directory", /* usage synopsis; becomes short_doc */
+ 0 /* reserved for internal use */
+};
diff --git a/examples/loadables/logname.c b/examples/loadables/logname.c
new file mode 100644
index 0000000..95b7e21
--- /dev/null
+++ b/examples/loadables/logname.c
@@ -0,0 +1,73 @@
+/* logname - print login name of current user */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+
+#include "builtins.h"
+#include "shell.h"
+#include "common.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+logname_builtin (list)
+ WORD_LIST *list;
+{
+ char *np;
+
+ if (no_options (list))
+ return (EX_USAGE);
+
+ np = getlogin ();
+ if (np == 0)
+ {
+ builtin_error ("cannot find username: %s", strerror (errno));
+ return (EXECUTION_FAILURE);
+ }
+ printf ("%s\n", np);
+ return (EXECUTION_SUCCESS);
+}
+
+char *logname_doc[] = {
+ "Display user login name.",
+ "",
+ "Write the current user's login name to the standard output",
+ "and exit. logname ignores the LOGNAME and USER variables.",
+ "logname ignores any non-option arguments.",
+ (char *)NULL
+};
+
+struct builtin logname_struct = {
+ "logname",
+ logname_builtin,
+ BUILTIN_ENABLED,
+ logname_doc,
+ "logname",
+ 0
+};
+
diff --git a/examples/loadables/mkdir.c b/examples/loadables/mkdir.c
new file mode 100644
index 0000000..f41f171
--- /dev/null
+++ b/examples/loadables/mkdir.c
@@ -0,0 +1,237 @@
+/* mkdir - make directories */
+
+/* See Makefile for compilation details. */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include "bashtypes.h"
+#include "posixstat.h"
+#include <errno.h>
+#include <stdio.h>
+#include "bashansi.h"
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "builtins.h"
+#include "shell.h"
+#include "bashgetopt.h"
+#include "common.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+#define ISOCTAL(c) ((c) >= '0' && (c) <= '7')
+
+extern int parse_symbolic_mode ();
+
+static int make_path ();
+
+static int original_umask;
+
+int
+mkdir_builtin (list)
+ WORD_LIST *list;
+{
+ int opt, pflag, omode, rval, octal, nmode, parent_mode, um;
+ char *mode;
+ WORD_LIST *l;
+
+ reset_internal_getopt ();
+ pflag = 0;
+ mode = (char *)NULL;
+ while ((opt = internal_getopt(list, "m:p")) != -1)
+ switch (opt)
+ {
+ case 'p':
+ pflag = 1;
+ break;
+ case 'm':
+ mode = list_optarg;
+ break;
+ default:
+ builtin_usage();
+ return (EX_USAGE);
+ }
+ list = loptend;
+
+ if (list == 0)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ if (mode == NULL)
+ omode = S_IRWXU | S_IRWXG | S_IRWXO; /* a=rwx */
+ else if (ISOCTAL (*mode)) /* octal number */
+ {
+ omode = read_octal (mode);
+ if (omode < 0)
+ {
+ builtin_error ("invalid file mode: %s", mode);
+ return (EXECUTION_FAILURE);
+ }
+ octal = 1;
+ }
+ else if (mode)
+ {
+ /* initial bits are a=rwx; the mode argument modifies them */
+ omode = parse_symbolic_mode (mode, S_IRWXU | S_IRWXG | S_IRWXO);
+ if (omode < 0)
+ {
+ builtin_error ("invalid file mode: %s", mode);
+ return (EXECUTION_FAILURE);
+ }
+ octal = 0;
+ }
+
+ /* Make the new mode */
+ original_umask = umask (0);
+ umask (original_umask);
+
+ nmode = (S_IRWXU | S_IRWXG | S_IRWXO) & ~original_umask;
+ parent_mode = nmode | (S_IWRITE|S_IEXEC); /* u+wx */
+
+ /* Adjust new mode based on mode argument */
+ nmode &= omode;
+
+ for (rval = EXECUTION_SUCCESS, l = list; l; l = l->next)
+ {
+ if (pflag && make_path (l->word->word, nmode, parent_mode))
+ {
+ rval = EXECUTION_FAILURE;
+ continue;
+ }
+ else if (pflag == 0 && mkdir (l->word->word, nmode) < 0)
+ {
+ builtin_error ("cannot create directory `%s': %s", l->word->word, strerror (errno));
+ rval = EXECUTION_FAILURE;
+ }
+ }
+ return rval;
+}
+
+/* Make all the directories leading up to PATH, then create PATH. Note that
+ this changes the process's umask; make sure that all paths leading to a
+ return reset it to ORIGINAL_UMASK */
+static int
+make_path (path, nmode, parent_mode)
+ char *path;
+ int nmode, parent_mode;
+{
+ int oumask;
+ struct stat sb;
+ char *p, *npath;
+
+ if (stat (path, &sb) == 0)
+ {
+ if (S_ISDIR (sb.st_mode) == 0)
+ {
+ builtin_error ("`%s': file exists but is not a directory", path);
+ return 1;
+ }
+
+ if (chmod (path, nmode))
+ {
+ builtin_error ("%s: %s", path, strerror (errno));
+ return 1;
+ }
+
+ return 0;
+ }
+
+ oumask = umask (0);
+ npath = savestring (path); /* So we can write to it. */
+
+ /* Check whether or not we need to do anything with intermediate dirs. */
+
+ /* Skip leading slashes. */
+ p = npath;
+ while (*p == '/')
+ p++;
+
+ while (p = strchr (p, '/'))
+ {
+ *p = '\0';
+ if (stat (npath, &sb) != 0)
+ {
+ if (mkdir (npath, parent_mode))
+ {
+ builtin_error ("cannot create directory `%s': %s", npath, strerror (errno));
+ umask (original_umask);
+ free (npath);
+ return 1;
+ }
+ }
+ else if (S_ISDIR (sb.st_mode) == 0)
+ {
+ builtin_error ("`%s': file exists but is not a directory", npath);
+ umask (original_umask);
+ free (npath);
+ return 1;
+ }
+
+ *p++ = '/'; /* restore slash */
+ while (*p == '/')
+ p++;
+ }
+
+ /* Create the final directory component. */
+ if (stat (npath, &sb) && mkdir (npath, nmode))
+ {
+ builtin_error ("cannot create directory `%s': %s", npath, strerror (errno));
+ umask (original_umask);
+ free (npath);
+ return 1;
+ }
+
+ umask (original_umask);
+ free (npath);
+ return 0;
+}
+
+char *mkdir_doc[] = {
+ "Create directories.",
+ "",
+ "Make directories. Create the directories named as arguments, in",
+ "the order specified, using mode rwxrwxrwx as modified by the current",
+ "umask (see `help umask'). The -m option causes the file permission",
+ "bits of the final directory to be MODE. The MODE argument may be",
+ "an octal number or a symbolic mode like that used by chmod(1). If",
+ "a symbolic mode is used, the operations are interpreted relative to",
+ "an initial mode of \"a=rwx\". The -p option causes any required",
+ "intermediate directories in PATH to be created. The directories",
+ "are created with permssion bits of rwxrwxrwx as modified by the current",
+ "umask, plus write and search permissions for the owner. mkdir",
+ "returns 0 if the directories are created successfully, and non-zero",
+ "if an error occurs.",
+ (char *)NULL
+};
+
+struct builtin mkdir_struct = {
+ "mkdir",
+ mkdir_builtin,
+ BUILTIN_ENABLED,
+ mkdir_doc,
+ "mkdir [-p] [-m mode] directory [directory ...]",
+ 0
+};
diff --git a/examples/loadables/mypid.c b/examples/loadables/mypid.c
new file mode 100644
index 0000000..135cdb3
--- /dev/null
+++ b/examples/loadables/mypid.c
@@ -0,0 +1,74 @@
+/* This module should be dynamically loaded with enable -f
+ * which would create a new builtin named mypid. You'll need
+ * the source code for GNU bash to recompile this module.
+ *
+ * Then, from within bash, enable -f ./mypid enable_mypid, where ./mypid
+ * is the binary obtained from running make. Hereafter, `${MYPID}'
+ * is a shell builtin variable.
+ */
+
+#include <stdio.h>
+#include <errno.h>
+#include <string.h>
+
+#include "builtins.h"
+#include "shell.h"
+
+#define INIT_DYNAMIC_VAR(var, val, gfunc, afunc) \
+ do \
+ { SHELL_VAR *v = bind_variable (var, (val), 0); \
+ v->dynamic_value = gfunc; \
+ v->assign_func = afunc; \
+ } \
+ while (0)
+
+static SHELL_VAR *
+assign_mypid (
+ SHELL_VAR *self,
+ char *value,
+ arrayind_t unused,
+ char *key )
+{
+ return (self);
+}
+
+static SHELL_VAR *
+get_mypid (SHELL_VAR *var)
+{
+ int rv;
+ char *p;
+
+ rv = getpid();
+ p = itos (rv);
+
+ FREE (value_cell (var));
+
+ VSETATTR (var, att_integer);
+ var_setvalue (var, p);
+ return (var);
+}
+
+int
+enable_mypid_builtin(WORD_LIST *list)
+{
+ INIT_DYNAMIC_VAR ("MYPID", (char *)NULL, get_mypid, assign_mypid);
+
+ return 0;
+}
+
+char const *enable_mypid_doc[] = {
+ "Enable $MYPID.",
+ "",
+ "Enables use of the ${MYPID} dynamic variable. ",
+ "It will yield the current pid of a subshell.",
+ (char *)0
+};
+
+struct builtin enable_mypid_struct = {
+ "enable_mypid",
+ enable_mypid_builtin,
+ BUILTIN_ENABLED,
+ (char**)(void*)enable_mypid_doc,
+ "enable_mypid N",
+ 0
+};
diff --git a/examples/loadables/necho.c b/examples/loadables/necho.c
new file mode 100644
index 0000000..b567389
--- /dev/null
+++ b/examples/loadables/necho.c
@@ -0,0 +1,53 @@
+/* necho - echo without options or argument interpretation */
+
+/* Sample builtin to be dynamically loaded with enable -f and replace an
+ existing builtin. */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <stdio.h>
+#include "builtins.h"
+#include "shell.h"
+
+necho_builtin (list)
+WORD_LIST *list;
+{
+ print_word_list (list, " ");
+ printf("\n");
+ fflush (stdout);
+ return (EXECUTION_SUCCESS);
+}
+
+char *necho_doc[] = {
+ "Display arguments.",
+ "",
+ "Print the arguments to the standard ouput separated",
+ "by space characters and terminated with a newline.",
+ (char *)NULL
+};
+
+struct builtin necho_struct = {
+ "echo",
+ necho_builtin,
+ BUILTIN_ENABLED,
+ necho_doc,
+ "echo [args]",
+ 0
+};
+
diff --git a/examples/loadables/pathchk.c b/examples/loadables/pathchk.c
new file mode 100644
index 0000000..c5fd24a
--- /dev/null
+++ b/examples/loadables/pathchk.c
@@ -0,0 +1,379 @@
+/* pathchk - check pathnames for validity and portability */
+
+/* Usage: pathchk [-p] path ...
+
+ For each PATH, print a message if any of these conditions are false:
+ * all existing leading directories in PATH have search (execute) permission
+ * strlen (PATH) <= PATH_MAX
+ * strlen (each_directory_in_PATH) <= NAME_MAX
+
+ Exit status:
+ 0 All PATH names passed all of the tests.
+ 1 An error occurred.
+
+ Options:
+ -p Instead of performing length checks on the
+ underlying filesystem, test the length of the
+ pathname and its components against the POSIX.1
+ minimum limits for portability, _POSIX_NAME_MAX
+ and _POSIX_PATH_MAX in 2.9.2. Also check that
+ the pathname contains no character not in the
+ portable filename character set. */
+
+/* See Makefile for compilation details. */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <sys/types.h>
+#include "posixstat.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#if defined (HAVE_LIMITS_H)
+# include <limits.h>
+#endif
+
+#include "bashansi.h"
+
+#include <stdio.h>
+#include <errno.h>
+
+#include "builtins.h"
+#include "shell.h"
+#include "stdc.h"
+#include "bashgetopt.h"
+#include "maxpath.h"
+#include "common.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+#if !defined (_POSIX_PATH_MAX)
+# define _POSIX_PATH_MAX 255
+#endif
+#if !defined (_POSIX_NAME_MAX)
+# define _POSIX_NAME_MAX 14
+#endif
+
+/* How do we get PATH_MAX? */
+#if defined (_POSIX_VERSION) && !defined (PATH_MAX)
+# define PATH_MAX_FOR(p) pathconf ((p), _PC_PATH_MAX)
+#endif
+
+/* How do we get NAME_MAX? */
+#if defined (_POSIX_VERSION) && !defined (NAME_MAX)
+# define NAME_MAX_FOR(p) pathconf ((p), _PC_NAME_MAX)
+#endif
+
+#if !defined (PATH_MAX_FOR)
+# define PATH_MAX_FOR(p) PATH_MAX
+#endif
+
+#if !defined (NAME_MAX_FOR)
+# define NAME_MAX_FOR(p) NAME_MAX
+#endif
+
+extern char *strerror ();
+
+static int validate_path ();
+
+pathchk_builtin (list)
+ WORD_LIST *list;
+{
+ int retval, pflag, opt;
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "p")) != -1)
+ {
+ switch (opt)
+ {
+ case 'p':
+ pflag = 1;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ if (list == 0)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ for (retval = 0; list; list = list->next)
+ retval |= validate_path (list->word->word, pflag);
+
+ return (retval ? EXECUTION_FAILURE : EXECUTION_SUCCESS);
+}
+
+char *pathchk_doc[] = {
+ "Check pathnames for validity.",
+ "",
+ "Check each pathname argument for validity (i.e., it may be used to",
+ "create or access a file without casuing syntax errors) and portability",
+ "(i.e., no filename truncation will result). If the `-p' option is",
+ "supplied, more extensive portability checks are performed.",
+ (char *)NULL
+};
+
+/* The standard structure describing a builtin command. bash keeps an array
+ of these structures. */
+struct builtin pathchk_struct = {
+ "pathchk", /* builtin name */
+ pathchk_builtin, /* function implementing the builtin */
+ BUILTIN_ENABLED, /* initial flags for builtin */
+ pathchk_doc, /* array of long documentation strings. */
+ "pathchk [-p] pathname ...", /* usage synopsis */
+ 0 /* reserved for internal use */
+};
+
+/* The remainder of this file is stolen shamelessly from `pathchk.c' in
+ the sh-utils-1.12 distribution, by
+
+ David MacKenzie <djm@gnu.ai.mit.edu>
+ and Jim Meyering <meyering@cs.utexas.edu> */
+
+/* Each element is nonzero if the corresponding ASCII character is
+ in the POSIX portable character set, and zero if it is not.
+ In addition, the entry for `/' is nonzero to simplify checking. */
+static char const portable_chars[256] =
+{
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 0-15 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, /* 16-31 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, /* 32-47 */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, /* 48-63 */
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 64-79 */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, /* 80-95 */
+ 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, /* 96-111 */
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, /* 112-127 */
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+/* If PATH contains only portable characters, return 1, else 0. */
+
+static int
+portable_chars_only (path)
+ const char *path;
+{
+ const char *p;
+
+ for (p = path; *p; ++p)
+ if (portable_chars[(const unsigned char) *p] == 0)
+ {
+ builtin_error ("path `%s' contains nonportable character `%c'", path, *p);
+ return 0;
+ }
+ return 1;
+}
+
+/* On some systems, stat can return EINTR. */
+
+#ifndef EINTR
+# define SAFE_STAT(name, buf) stat (name, buf)
+#else
+# define SAFE_STAT(name, buf) safe_stat (name, buf)
+static inline int
+safe_stat (name, buf)
+ const char *name;
+ struct stat *buf;
+{
+ int ret;
+
+ do
+ ret = stat (name, buf);
+ while (ret < 0 && errno == EINTR);
+
+ return ret;
+}
+#endif
+
+/* Return 1 if PATH is a usable leading directory, 0 if not,
+ 2 if it doesn't exist. */
+
+static int
+dir_ok (path)
+ const char *path;
+{
+ struct stat stats;
+
+ if (SAFE_STAT (path, &stats))
+ return 2;
+
+ if (!S_ISDIR (stats.st_mode))
+ {
+ builtin_error ("`%s' is not a directory", path);
+ return 0;
+ }
+
+ /* Use access to test for search permission because
+ testing permission bits of st_mode can lose with new
+ access control mechanisms. Of course, access loses if you're
+ running setuid. */
+ if (access (path, X_OK) != 0)
+ {
+ if (errno == EACCES)
+ builtin_error ("directory `%s' is not searchable", path);
+ else
+ builtin_error ("%s: %s", path, strerror (errno));
+ return 0;
+ }
+
+ return 1;
+}
+
+static char *
+xstrdup (s)
+ char *s;
+{
+ return (savestring (s));
+}
+
+/* Make sure that
+ strlen (PATH) <= PATH_MAX
+ && strlen (each-existing-directory-in-PATH) <= NAME_MAX
+
+ If PORTABILITY is nonzero, compare against _POSIX_PATH_MAX and
+ _POSIX_NAME_MAX instead, and make sure that PATH contains no
+ characters not in the POSIX portable filename character set, which
+ consists of A-Z, a-z, 0-9, ., _, -.
+
+ Make sure that all leading directories along PATH that exist have
+ `x' permission.
+
+ Return 0 if all of these tests are successful, 1 if any fail. */
+
+static int
+validate_path (path, portability)
+ char *path;
+ int portability;
+{
+ int path_max;
+ int last_elem; /* Nonzero if checking last element of path. */
+ int exists; /* 2 if the path element exists. */
+ char *slash;
+ char *parent; /* Last existing leading directory so far. */
+
+ if (portability && !portable_chars_only (path))
+ return 1;
+
+ if (*path == '\0')
+ return 0;
+
+#ifdef lint
+ /* Suppress `used before initialized' warning. */
+ exists = 0;
+#endif
+
+ /* Figure out the parent of the first element in PATH. */
+ parent = xstrdup (*path == '/' ? "/" : ".");
+
+ slash = path;
+ last_elem = 0;
+ while (1)
+ {
+ int name_max;
+ int length; /* Length of partial path being checked. */
+ char *start; /* Start of path element being checked. */
+
+ /* Find the end of this element of the path.
+ Then chop off the rest of the path after this element. */
+ while (*slash == '/')
+ slash++;
+ start = slash;
+ slash = strchr (slash, '/');
+ if (slash != NULL)
+ *slash = '\0';
+ else
+ {
+ last_elem = 1;
+ slash = strchr (start, '\0');
+ }
+
+ if (!last_elem)
+ {
+ exists = dir_ok (path);
+ if (dir_ok == 0)
+ {
+ free (parent);
+ return 1;
+ }
+ }
+
+ length = slash - start;
+ /* Since we know that `parent' is a directory, it's ok to call
+ pathconf with it as the argument. (If `parent' isn't a directory
+ or doesn't exist, the behavior of pathconf is undefined.)
+ But if `parent' is a directory and is on a remote file system,
+ it's likely that pathconf can't give us a reasonable value
+ and will return -1. (NFS and tempfs are not POSIX . . .)
+ In that case, we have no choice but to assume the pessimal
+ POSIX minimums. */
+ name_max = portability ? _POSIX_NAME_MAX : NAME_MAX_FOR (parent);
+ if (name_max < 0)
+ name_max = _POSIX_NAME_MAX;
+ if (length > name_max)
+ {
+ builtin_error ("name `%s' has length %d; exceeds limit of %d",
+ start, length, name_max);
+ free (parent);
+ return 1;
+ }
+
+ if (last_elem)
+ break;
+
+ if (exists == 1)
+ {
+ free (parent);
+ parent = xstrdup (path);
+ }
+
+ *slash++ = '/';
+ }
+
+ /* `parent' is now the last existing leading directory in the whole path,
+ so it's ok to call pathconf with it as the argument. */
+ path_max = portability ? _POSIX_PATH_MAX : PATH_MAX_FOR (parent);
+ if (path_max < 0)
+ path_max = _POSIX_PATH_MAX;
+ free (parent);
+ if (strlen (path) > path_max)
+ {
+ builtin_error ("path `%s' has length %d; exceeds limit of %d",
+ path, strlen (path), path_max);
+ return 1;
+ }
+
+ return 0;
+}
diff --git a/examples/loadables/perl/Makefile.in b/examples/loadables/perl/Makefile.in
new file mode 100644
index 0000000..d8860bd
--- /dev/null
+++ b/examples/loadables/perl/Makefile.in
@@ -0,0 +1,99 @@
+#
+# Makefile for builtin perl interpreter
+#
+#
+# Copyright (C) 1998 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+# Include some boilerplate Gnu makefile definitions.
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+libdir = @libdir@
+infodir = @infodir@
+includedir = @includedir@
+
+datarootdir = @datarootdir@
+
+topdir = @top_srcdir@
+BUILD_DIR = @BUILD_DIR@
+srcdir = @srcdir@
+VPATH = .:@srcdir@
+
+@SET_MAKE@
+CC = @CC@
+RM = rm -f
+
+SHELL = @MAKE_SHELL@
+
+PERL5 = perl5
+
+CFLAGS = @CFLAGS@
+
+#
+# These values are generated for configure by ${topdir}/support/shobj-conf.
+# If your system is not supported by that script, but includes facilities for
+# dynamic loading of shared objects, please update the script and send the
+# changes to bash-maintainers@gnu.org.
+#
+SHOBJ_CC = @SHOBJ_CC@
+SHOBJ_CFLAGS = @SHOBJ_CFLAGS@
+SHOBJ_LD = @SHOBJ_LD@
+SHOBJ_LDFLAGS = @SHOBJ_LDFLAGS@
+SHOBJ_XLDFLAGS = @SHOBJ_XLDFLAGS@
+SHOBJ_LIBS = @SHOBJ_LIBS@
+SHOBJ_STATUS = @SHOBJ_STATUS@
+
+# Values used for compiling the perl files
+PERL_LDOPTS = `${PERL5} -MExtUtils::Embed -e ldopts`
+PERL_CFLAGS = ${CCFLAGS} `${PERL5} -MExtUtils::Embed -e ccopts`
+
+SRC = bperl.c iperl.c perlxsi.c
+OBJ = bperl.o iperl.o perlxsi.o
+
+BUILTIN = bperl5
+
+INC = -I. -I.. -I$(topdir) -I$(topdir)/lib -I$(topdir)/builtins \
+ -I$(topdir)/include -I$(BUILD_DIR) -I$(BUILD_DIR)/lib \
+ -I$(BUILD_DIR)/builtins
+
+
+${BUILTIN}: ${OBJ}
+ ${RM} $@
+ ${SHOBJ_LD} ${SHOBJ_LDFLAGS} ${SHOBJ_XLDFLAGS} -o $@ ${OBJ} ${PERL_LDOPTS} ${SHOBJ_LIBS}
+
+bperl.o: bperl.c
+ ${RM} $@
+ $(SHOBJ_CC) $(SHOBJ_CFLAGS) $(CFLAGS) $(INC) -c -o $@ ${srcdir}/bperl.c
+
+iperl.o: iperl.c
+ ${RM} $@
+ $(SHOBJ_CC) ${SHOBJ_CFLAGS} $(PERL_CFLAGS) -c -o $@ ${srcdir}/iperl.c
+
+perlxsi.c:
+ ${PERL5} -MExtUtils::Embed -e xsinit -- -o $@
+
+perlxsi.o: perlxsi.c
+ ${RM} $@
+ ${SHOBJ_CC} ${SHOBJ_CFLAGS} $(PERL_CFLAGS) -c -o $@ perlxsi.c
+
+clean mostlyclean:
+ ${RM} ${OBJ}
+ ${RM} ${BUILTIN}
+
+distclean maintainer-clean: clean
+ ${RM} perlxsi.c
diff --git a/examples/loadables/perl/README b/examples/loadables/perl/README
new file mode 100644
index 0000000..a70a99b
--- /dev/null
+++ b/examples/loadables/perl/README
@@ -0,0 +1,6 @@
+This illustrates how to build a perl interpreter into bash. It's not
+especially useful; more a proof of concept (it provides none of the
+bash internals to the perl interpreter, for example).
+
+This *may* require adding "-rpath /path/to/perl/CORE" and -lperl options
+when compiling bash itself.
diff --git a/examples/loadables/perl/bperl.c b/examples/loadables/perl/bperl.c
new file mode 100644
index 0000000..77e3f7c
--- /dev/null
+++ b/examples/loadables/perl/bperl.c
@@ -0,0 +1,46 @@
+/*
+ * perl builtin
+ */
+#include <config.h>
+
+#include <fcntl.h>
+#include <errno.h>
+
+#include "builtins.h"
+#include "shell.h"
+
+#ifndef errno
+extern int errno;
+#endif
+
+extern char **make_builtin_argv ();
+extern char **export_env;
+
+extern int perl_main();
+
+bperl_builtin(list)
+WORD_LIST *list;
+{
+ char **v;
+ int c, r;
+
+ v = make_builtin_argv(list, &c);
+ r = perl_main(c, v, export_env);
+ free(v);
+
+ return r;
+}
+
+char *bperl_doc[] = {
+ "An interface to a perl5 interpreter.",
+ (char *)0
+};
+
+struct builtin bperl_struct = {
+ "bperl",
+ bperl_builtin,
+ BUILTIN_ENABLED,
+ bperl_doc,
+ "bperl [perl options] [file ...]",
+ 0
+};
diff --git a/examples/loadables/perl/iperl.c b/examples/loadables/perl/iperl.c
new file mode 100644
index 0000000..92a6038
--- /dev/null
+++ b/examples/loadables/perl/iperl.c
@@ -0,0 +1,24 @@
+#include <EXTERN.h> /* from the Perl distribution */
+#include <perl.h> /* from the Perl distribution */
+
+extern void xs_init _((void));
+
+static PerlInterpreter *iperl; /*** The Perl interpreter ***/
+
+int
+perl_main(int argc, char **argv, char **env)
+{
+ int r;
+
+ iperl = perl_alloc();
+ perl_construct(iperl);
+ perl_parse(iperl, xs_init, argc, argv, (char **)NULL);
+ r = perl_run(iperl);
+
+PerlIO_flush(PerlIO_stdout());
+PerlIO_flush(PerlIO_stderr());
+
+ perl_destruct(iperl);
+ perl_free(iperl);
+ return (r);
+}
diff --git a/examples/loadables/print.c b/examples/loadables/print.c
new file mode 100644
index 0000000..e17597b
--- /dev/null
+++ b/examples/loadables/print.c
@@ -0,0 +1,191 @@
+/*
+ * print -- loadable ksh-93 style print builtin
+ */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "bashtypes.h"
+
+#include <errno.h>
+#include <limits.h>
+#include <stdio.h>
+
+#include "bashansi.h"
+#include "shell.h"
+#include "builtins.h"
+#include "stdc.h"
+#include "bashgetopt.h"
+#include "builtext.h"
+#include "common.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+int print_builtin ();
+static int printargs ();
+
+static FILE *ofp;
+
+extern char *this_command_name;
+
+static char *print_doc[] = {
+ "Display arguments.",
+ "",
+ "Output the arguments. The -f option means to use the argument as a",
+ "format string as would be supplied to printf(1). The rest of the",
+ "options are as in ksh.",
+ (char *)NULL
+};
+
+struct builtin print_struct = {
+ "print",
+ print_builtin,
+ BUILTIN_ENABLED,
+ print_doc,
+ "print [-Rnprs] [-u unit] [-f format] [arguments]",
+ (char *)0
+};
+
+#ifndef ISOPTION
+#define ISOPTION(s, c) (s[0] == '-' && s[2] == '\0' && s[1] == c)
+#endif
+
+int
+print_builtin (list)
+ WORD_LIST *list;
+{
+ int c, r, nflag, raw, ofd, sflag;
+ intmax_t lfd;
+ char **v, *pfmt, *arg;
+ WORD_LIST *l;
+
+ nflag = raw = sflag = 0;
+ ofd = 1;
+ pfmt = 0;
+
+ reset_internal_getopt ();
+ while ((c = internal_getopt (list, "Rnprsu:f:")) != -1)
+ {
+ switch (c)
+ {
+ case 'R':
+ raw = 2;
+ loptend = lcurrent;
+ if (loptend && ISOPTION (loptend->word->word, 'n'))
+ {
+ loptend = loptend->next;
+ nflag = 1;
+ }
+ goto opt_end;
+ case 'r':
+ raw = 1;
+ break;
+ case 'n':
+ nflag = 1;
+ break;
+ case 's':
+ sflag = 1;
+ break;
+ case 'p':
+ break; /* NOP */
+ case 'u':
+ if (all_digits (list_optarg) && legal_number (list_optarg, &lfd) && lfd == (int)lfd)
+ ofd = lfd;
+ else
+ {
+ for (l = list; l->next && l->next != lcurrent; l = l->next);
+ lcurrent = loptend = l;
+ goto opt_end;
+ }
+ break;
+ case 'f':
+ pfmt = list_optarg;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+
+opt_end:
+ list = loptend;
+
+ ofp = (ofd == 1) ? stdout : fdopen (dup (ofd), "w");
+
+ if (pfmt)
+ {
+ WORD_DESC *w;
+ WORD_LIST *nlist;
+
+ w = make_word (pfmt);
+ nlist = make_word_list (w, list);
+ r = printf_builtin (nlist);
+ nlist->next = (WORD_LIST *)NULL;
+ dispose_words (nlist);
+ return (r);
+ }
+
+ if (raw)
+ {
+ for (l = list; l; l = l->next)
+ {
+ fprintf (ofp, "%s", l->word->word);
+ if (l->next)
+ fprintf (ofp, " ");
+ }
+ if (nflag == 0)
+ fprintf (ofp, "\n");
+ fflush (ofp);
+ return (0);
+ }
+
+ r = printargs (list, ofp);
+ if (r && nflag == 0)
+ fprintf (ofp, "\n");
+ if (ofd != 1)
+ fclose (ofp);
+ return 0;
+}
+
+static int
+printargs (list, ofp)
+ WORD_LIST *list;
+ FILE *ofp;
+{
+ WORD_LIST *l;
+ char *ostr;
+ int sawc;
+
+ for (sawc = 0, l = list; l; l = l->next)
+ {
+ ostr = ansicstr (l->word->word, strlen (l->word->word), 0, &sawc, (int *)0);
+ fprintf (ofp, "%s", ostr);
+ free (ostr);
+ if (sawc)
+ return (0);
+ if (l->next)
+ fprintf (ofp, " ");
+ }
+ return (1);
+}
diff --git a/examples/loadables/printenv.c b/examples/loadables/printenv.c
new file mode 100644
index 0000000..8d3a05d
--- /dev/null
+++ b/examples/loadables/printenv.c
@@ -0,0 +1,93 @@
+/*
+ * printenv -- minimal builtin clone of BSD printenv(1).
+ *
+ * usage: printenv [varname]
+ *
+ */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+#include <stdio.h>
+
+#include "builtins.h"
+#include "shell.h"
+#include "bashgetopt.h"
+#include "common.h"
+
+extern char **export_env;
+
+int
+printenv_builtin (list)
+ WORD_LIST *list;
+{
+ register char **envp;
+ int opt;
+ SHELL_VAR *var;
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "")) != -1)
+ {
+ switch (opt)
+ {
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ /* printenv */
+ if (list == 0)
+ {
+ maybe_make_export_env (); /* this allows minimal code */
+ for (envp = export_env; *envp; envp++)
+ printf ("%s\n", *envp);
+ return (EXECUTION_SUCCESS);
+ }
+
+ /* printenv varname */
+ var = find_variable (list->word->word);
+ if (var == 0 || (exported_p (var) == 0))
+ return (EXECUTION_FAILURE);
+
+ if (function_p (var))
+ print_var_function (var);
+ else
+ print_var_value (var, 0);
+
+ printf("\n");
+ return (EXECUTION_SUCCESS);
+}
+
+char *printenv_doc[] = {
+ "Display environment.",
+ "",
+ "Print names and values of environment variables",
+ (char *)NULL
+};
+
+struct builtin printenv_struct = {
+ "printenv",
+ printenv_builtin,
+ BUILTIN_ENABLED,
+ printenv_doc,
+ "printenv [varname]",
+ 0
+};
diff --git a/examples/loadables/push.c b/examples/loadables/push.c
new file mode 100644
index 0000000..b076073
--- /dev/null
+++ b/examples/loadables/push.c
@@ -0,0 +1,116 @@
+/*
+ * push - anyone remember TOPS-20?
+ *
+ */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+#include <stdio.h>
+#include <errno.h>
+
+#include "builtins.h"
+#include "shell.h"
+#include "jobs.h"
+#include "bashgetopt.h"
+#include "common.h"
+
+#ifndef errno
+extern int errno;
+#endif
+
+extern int dollar_dollar_pid;
+extern int last_command_exit_value;
+
+int
+push_builtin (list)
+ WORD_LIST *list;
+{
+ pid_t pid;
+ int xstatus, opt;
+
+ xstatus = EXECUTION_SUCCESS;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "")) != -1)
+ {
+ switch (opt)
+ {
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ pid = make_child (savestring ("push"), 0);
+ if (pid == -1)
+ {
+ builtin_error ("cannot fork: %s", strerror (errno));
+ return (EXECUTION_FAILURE);
+ }
+ else if (pid == 0)
+ {
+ /* Shell variable adjustments: $SHLVL, $$, $PPID, $! */
+ adjust_shell_level (1);
+ dollar_dollar_pid = getpid ();
+ set_ppid ();
+
+ /* Clean up job control stuff. */
+ stop_making_children ();
+ cleanup_the_pipeline ();
+ delete_all_jobs (0);
+
+ last_asynchronous_pid = NO_PID;
+
+ /* Make sure the job control code has the right values for
+ the shell's process group and tty process group, and that
+ the signals are set correctly for job control. */
+ initialize_job_control (0);
+ initialize_job_signals ();
+
+ /* And read commands until exit. */
+ reader_loop ();
+ exit_shell (last_command_exit_value);
+ }
+ else
+ {
+ stop_pipeline (0, (COMMAND *)NULL);
+ xstatus = wait_for (pid);
+ return (xstatus);
+ }
+}
+
+char *push_doc[] = {
+ "Create child shell.",
+ "",
+ "Create a child that is an exact duplicate of the running shell",
+ "and wait for it to exit. The $SHLVL, $!, $$, and $PPID variables",
+ "are adjusted in the child. The return value is the exit status",
+ "of the child.",
+ (char *)NULL
+};
+
+struct builtin push_struct = {
+ "push",
+ push_builtin,
+ BUILTIN_ENABLED,
+ push_doc,
+ "push",
+ 0
+};
diff --git a/examples/loadables/realpath.c b/examples/loadables/realpath.c
new file mode 100644
index 0000000..ffcbef8
--- /dev/null
+++ b/examples/loadables/realpath.c
@@ -0,0 +1,140 @@
+/*
+ * realpath -- canonicalize pathnames, resolving symlinks
+ *
+ * usage: realpath [-csv] pathname [pathname...]
+ *
+ * options: -c check whether or not each resolved path exists
+ * -s no output, exit status determines whether path is valid
+ * -v produce verbose output
+ *
+ *
+ * exit status: 0 if all pathnames resolved
+ * 1 if any of the pathname arguments could not be resolved
+ *
+ *
+ * Bash loadable builtin version
+ *
+ * Chet Ramey
+ * chet@po.cwru.edu
+ */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include "bashansi.h"
+#include <maxpath.h>
+#include <errno.h>
+
+#include "builtins.h"
+#include "shell.h"
+#include "bashgetopt.h"
+#include "common.h"
+
+#ifndef errno
+extern int errno;
+#endif
+
+extern char *sh_realpath();
+
+realpath_builtin(list)
+WORD_LIST *list;
+{
+ int opt, cflag, vflag, sflag, es;
+ char *r, realbuf[PATH_MAX], *p;
+ struct stat sb;
+
+ if (list == 0) {
+ builtin_usage();
+ return (EX_USAGE);
+ }
+
+ vflag = cflag = sflag = 0;
+ reset_internal_getopt();
+ while ((opt = internal_getopt (list, "csv")) != -1) {
+ switch (opt) {
+ case 'c':
+ cflag = 1;
+ break;
+ case 's':
+ sflag = 1;
+ break;
+ case 'v':
+ vflag = 1;
+ break;
+ default:
+ builtin_usage();
+ }
+ }
+
+ list = loptend;
+
+ if (list == 0)
+ builtin_usage();
+
+ for (es = EXECUTION_SUCCESS; list; list = list->next) {
+ p = list->word->word;
+ r = sh_realpath(p, realbuf);
+ if (r == 0) {
+ es = EXECUTION_FAILURE;
+ if (sflag == 0)
+ builtin_error("%s: cannot resolve: %s", p, strerror(errno));
+ continue;
+ }
+ if (cflag && (stat(realbuf, &sb) < 0)) {
+ es = EXECUTION_FAILURE;
+ if (sflag == 0)
+ builtin_error("%s: %s", p, strerror(errno));
+ continue;
+ }
+ if (sflag == 0) {
+ if (vflag)
+ printf ("%s -> ", p);
+ printf("%s\n", realbuf);
+ }
+ }
+ return es;
+}
+
+char *realpath_doc[] = {
+ "Display pathname in canonical form.",
+ "",
+ "Display the canonicalized version of each PATHNAME argument, resolving",
+ "symbolic links. The -c option checks whether or not each resolved name",
+ "exists. The -s option produces no output; the exit status determines the",
+ "valididty of each PATHNAME. The -v option produces verbose output. The",
+ "exit status is 0 if each PATHNAME was resolved; non-zero otherwise.",
+ (char *)NULL
+};
+
+struct builtin realpath_struct = {
+ "realpath", /* builtin name */
+ realpath_builtin, /* function implementing the builtin */
+ BUILTIN_ENABLED, /* initial flags for builtin */
+ realpath_doc, /* array of long documentation strings */
+ "realpath [-csv] pathname [pathname...]", /* usage synopsis */
+ 0 /* reserved for internal use */
+};
diff --git a/examples/loadables/rmdir.c b/examples/loadables/rmdir.c
new file mode 100644
index 0000000..0cfe6c7
--- /dev/null
+++ b/examples/loadables/rmdir.c
@@ -0,0 +1,71 @@
+/* rmdir - remove directory */
+
+/* See Makefile for compilation details. */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include <stdio.h>
+#include <errno.h>
+#include "builtins.h"
+#include "shell.h"
+#include "common.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+rmdir_builtin (list)
+ WORD_LIST *list;
+{
+ int rval;
+ WORD_LIST *l;
+
+ if (no_options (list))
+ return (EX_USAGE);
+
+ for (rval = EXECUTION_SUCCESS, l = list; l; l = l->next)
+ if (rmdir (l->word->word) < 0)
+ {
+ builtin_error ("%s: %s", l->word->word, strerror (errno));
+ rval = EXECUTION_FAILURE;
+ }
+
+ return rval;
+}
+
+char *rmdir_doc[] = {
+ "Remove directory.",
+ "",
+ "rmdir removes the directory entry specified by each argument,",
+ "provided the directory is empty.",
+ (char *)NULL
+};
+
+/* The standard structure describing a builtin command. bash keeps an array
+ of these structures. */
+struct builtin rmdir_struct = {
+ "rmdir", /* builtin name */
+ rmdir_builtin, /* function implementing the builtin */
+ BUILTIN_ENABLED, /* initial flags for builtin */
+ rmdir_doc, /* array of long documentation strings. */
+ "rmdir directory ...", /* usage synopsis; becomes short_doc */
+ 0 /* reserved for internal use */
+};
diff --git a/examples/loadables/sleep.c b/examples/loadables/sleep.c
new file mode 100644
index 0000000..a9bd36f
--- /dev/null
+++ b/examples/loadables/sleep.c
@@ -0,0 +1,97 @@
+/*
+ * sleep -- sleep for fractions of a second
+ *
+ * usage: sleep seconds[.fraction]
+ */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+
+#if defined (TIME_WITH_SYS_TIME)
+# include <sys/time.h>
+# include <time.h>
+#else
+# if defined (HAVE_SYS_TIME_H)
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
+#if defined (HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include "chartypes.h"
+
+#include "shell.h"
+#include "builtins.h"
+#include "common.h"
+
+#define RETURN(x) \
+ do { \
+ if (sp) *sp = sec; \
+ if (usp) *usp = usec; \
+ return (x); \
+ } while (0)
+
+int
+sleep_builtin (list)
+WORD_LIST *list;
+{
+ long sec, usec;
+
+ if (list == 0) {
+ builtin_usage();
+ return(EX_USAGE);
+ }
+
+ if (*list->word->word == '-' || list->next) {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ if (uconvert(list->word->word, &sec, &usec)) {
+ fsleep(sec, usec);
+ return(EXECUTION_SUCCESS);
+ }
+
+ builtin_error("%s: bad sleep interval", list->word->word);
+ return (EXECUTION_FAILURE);
+}
+
+static char *sleep_doc[] = {
+ "Suspend execution for specified period.",
+ ""
+ "sleep suspends execution for a minimum of SECONDS[.FRACTION] seconds.",
+ (char *)NULL
+};
+
+struct builtin sleep_struct = {
+ "sleep",
+ sleep_builtin,
+ BUILTIN_ENABLED,
+ sleep_doc,
+ "sleep seconds[.fraction]",
+ 0
+};
diff --git a/examples/loadables/strftime.c b/examples/loadables/strftime.c
new file mode 100644
index 0000000..2de09e3
--- /dev/null
+++ b/examples/loadables/strftime.c
@@ -0,0 +1,125 @@
+/* strftime - loadable builtin interface to strftime(3) */
+
+/* See Makefile for compilation details. */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashtypes.h"
+#include "posixtime.h"
+
+#include <stdio.h>
+
+#include "builtins.h"
+#include "shell.h"
+#include "common.h"
+
+int
+strftime_builtin (list)
+ WORD_LIST *list;
+{
+ char *format, *tbuf;
+ size_t tbsize, tsize;
+ time_t secs;
+ struct tm *t;
+ int n;
+ intmax_t i;
+
+ if (list == 0)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ if (no_options (list))
+ return (EX_USAGE);
+
+ format = list->word->word;
+ if (format == 0 || *format == 0)
+ {
+ printf ("\n");
+ return (EXECUTION_SUCCESS);
+ }
+
+ list = list->next;
+
+ if (list && list->word->word)
+ {
+ n = legal_number (list->word->word, &i);
+ if (n == 0 || i < 0 || i != (time_t)i)
+ {
+ sh_invalidnum (list->word->word);
+ return (EXECUTION_FAILURE);
+ }
+ else
+ secs = i;
+ }
+ else
+ secs = NOW;
+
+ t = localtime (&secs);
+
+ tbsize = strlen (format) * 4;
+ tbuf = 0;
+
+ /* Now try to figure out how big the buffer should really be. strftime(3)
+ will return the number of bytes placed in the buffer unless it's greater
+ than MAXSIZE, in which case it returns 0. */
+ for (n = 1; n < 4; n++)
+ {
+ tbuf = xrealloc (tbuf, tbsize * n);
+ tsize = strftime (tbuf, tbsize * n, format, t);
+ if (tsize)
+ break;
+ }
+
+ printf ("%s\n", tbuf);
+ free (tbuf);
+
+ return (EXECUTION_SUCCESS);
+}
+
+/* An array of strings forming the `long' documentation for a builtin xxx,
+ which is printed by `help xxx'. It must end with a NULL. */
+char *strftime_doc[] = {
+ "Display formatted time.",
+ "",
+ "Converts date and time format to a string and displays it on the",
+ "standard output. If the optional second argument is supplied, it",
+ "is used as the number of seconds since the epoch to use in the",
+ "conversion, otherwise the current time is used.",
+ (char *)NULL
+};
+
+/* The standard structure describing a builtin command. bash keeps an array
+ of these structures. The flags must include BUILTIN_ENABLED so the
+ builtin can be used. */
+struct builtin strftime_struct = {
+ "strftime", /* builtin name */
+ strftime_builtin, /* function implementing the builtin */
+ BUILTIN_ENABLED, /* initial flags for builtin */
+ strftime_doc, /* array of long documentation strings. */
+ "strftime format [seconds]", /* usage synopsis; becomes short_doc */
+ 0 /* reserved for internal use */
+};
diff --git a/examples/loadables/sync.c b/examples/loadables/sync.c
new file mode 100644
index 0000000..d91852e
--- /dev/null
+++ b/examples/loadables/sync.c
@@ -0,0 +1,52 @@
+/* sync - sync the disks by forcing pending filesystem writes to complete */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "builtins.h"
+#include "shell.h"
+#include "bashgetopt.h"
+
+sync_builtin (list)
+ WORD_LIST *list;
+{
+ sync();
+ return (EXECUTION_SUCCESS);
+}
+
+char *sync_doc[] = {
+ "Sync disks.",
+ ""
+ "Force completion of pending disk writes",
+ (char *)NULL
+};
+
+struct builtin sync_struct = {
+ "sync", /* builtin name */
+ sync_builtin, /* function implementing the builtin */
+ BUILTIN_ENABLED, /* initial flags for builtin */
+ sync_doc, /* array of long documentation strings. */
+ "sync", /* usage synopsis; becomes short_doc */
+ 0 /* reserved for internal use */
+};
diff --git a/examples/loadables/tee.c b/examples/loadables/tee.c
new file mode 100644
index 0000000..8b5715f
--- /dev/null
+++ b/examples/loadables/tee.c
@@ -0,0 +1,178 @@
+/* tee - duplicate standard input */
+
+/* See Makefile for compilation details. */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+#include "posixstat.h"
+#include "filecntl.h"
+
+#include <signal.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+
+#include <stdio.h>
+#include <errno.h>
+
+#include "builtins.h"
+#include "shell.h"
+#include "bashgetopt.h"
+#include "common.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+typedef struct flist {
+ struct flist *next;
+ int fd;
+ char *fname;
+} FLIST;
+
+static FLIST *tee_flist;
+
+#define TEE_BUFSIZE 8192
+
+extern int interrupt_immediately;
+
+extern char *strerror ();
+
+tee_builtin (list)
+ WORD_LIST *list;
+{
+ int opt, append, nointr, rval, fd, fflags;
+ int n, nr, nw;
+ FLIST *fl;
+ char *buf, *bp;
+
+ char *t;
+
+ reset_internal_getopt ();
+ append = nointr = 0;
+ tee_flist = (FLIST *)NULL;
+ while ((opt = internal_getopt (list, "ai")) != -1)
+ {
+ switch (opt)
+ {
+ case 'a':
+ append = 1;
+ break;
+ case 'i':
+ nointr = 1;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ if (nointr == 0)
+ interrupt_immediately++;
+
+ buf = xmalloc (TEE_BUFSIZE);
+
+ /* Initialize output file list. */
+ fl = tee_flist = (FLIST *)xmalloc (sizeof(FLIST));
+ tee_flist->fd = 1;
+ tee_flist->fname = "stdout";
+ tee_flist->next = (FLIST *)NULL;
+
+ /* Add file arguments to list of output files. */
+ fflags = append ? O_WRONLY|O_CREAT|O_APPEND : O_WRONLY|O_CREAT|O_TRUNC;
+ for (rval = EXECUTION_SUCCESS; list; list = list->next)
+ {
+ fd = open (list->word->word, fflags, 0666);
+ if (fd < 0)
+ {
+ builtin_error ("%s: cannot open: %s", list->word->word, strerror (errno));
+ rval = EXECUTION_FAILURE;
+ }
+ else
+ {
+ fl->next = (FLIST *)xmalloc (sizeof(FLIST));
+ fl->next->fd = fd;
+ fl->next->fname = list->word->word;
+ fl = fl->next;
+ fl->next = (FLIST *)NULL;
+ }
+ }
+
+ while ((nr = read(0, buf, TEE_BUFSIZE)) > 0)
+ for (fl = tee_flist; fl; fl = fl->next)
+ {
+ n = nr;
+ bp = buf;
+ do
+ {
+ if ((nw = write (fl->fd, bp, n)) == -1)
+ {
+ builtin_error ("%s: write error: %s", fl->fname, strerror (errno));
+ rval = EXECUTION_FAILURE;
+ break;
+ }
+ bp += nw;
+ }
+ while (n -= nw);
+ }
+ if (nr < 0)
+ builtin_error ("read error: %s", strerror (errno));
+
+ /* Deallocate resources -- this is a builtin command. */
+ tee_flist = tee_flist->next; /* skip bogus close of stdout */
+ while (tee_flist)
+ {
+ fl = tee_flist;
+ if (close (fl->fd) < 0)
+ {
+ builtin_error ("%s: close_error: %s", fl->fname, strerror (errno));
+ rval = EXECUTION_FAILURE;
+ }
+ tee_flist = tee_flist->next;
+ free (fl);
+ }
+
+ return (rval);
+}
+
+char *tee_doc[] = {
+ "Duplicate standard output.",
+ "",
+ "Copy standard input to standard output, making a copy in each",
+ "filename argument. If the `-a' option is gived, the specified",
+ "files are appended to, otherwise they are overwritten. If the",
+ "`-i' option is supplied, tee ignores interrupts.",
+ (char *)NULL
+};
+
+struct builtin tee_struct = {
+ "tee", /* builtin name */
+ tee_builtin, /* function implementing the builtin */
+ BUILTIN_ENABLED, /* initial flags for builtin */
+ tee_doc, /* array of long documentation strings. */
+ "tee [-ai] [file ...]", /* usage synopsis; becomes short_doc */
+ 0 /* reserved for internal use */
+};
diff --git a/examples/loadables/template.c b/examples/loadables/template.c
new file mode 100644
index 0000000..3a5814f
--- /dev/null
+++ b/examples/loadables/template.c
@@ -0,0 +1,59 @@
+/* template - example template for loadable builtin */
+
+/* See Makefile for compilation details. */
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+#include "bashansi.h"
+#include <stdio.h>
+#include <errno.h>
+
+#include "builtins.h"
+#include "shell.h"
+#include "bashgetopt.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+extern char *strerror ();
+
+template_builtin (list)
+ WORD_LIST *list;
+{
+ int opt, rval;
+
+ rval = EXECUTION_SUCCESS;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "")) != -1)
+ {
+ switch (opt)
+ {
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ return (rval);
+}
+
+char *template_doc[] = {
+ "Short description.",
+ ""
+ "Longer description of builtin and usage.",
+ (char *)NULL
+};
+
+struct builtin template_struct = {
+ "template", /* builtin name */
+ template_builtin, /* function implementing the builtin */
+ BUILTIN_ENABLED, /* initial flags for builtin */
+ template_doc, /* array of long documentation strings. */
+ "template", /* usage synopsis; becomes short_doc */
+ 0 /* reserved for internal use */
+};
diff --git a/examples/loadables/truefalse.c b/examples/loadables/truefalse.c
new file mode 100644
index 0000000..113e88f
--- /dev/null
+++ b/examples/loadables/truefalse.c
@@ -0,0 +1,70 @@
+/* true and false builtins */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include "bashtypes.h"
+#include "shell.h"
+#include "builtins.h"
+#include "common.h"
+
+true_builtin (list)
+ WORD_LIST *list;
+{
+ return EXECUTION_SUCCESS;
+}
+
+false_builtin (list)
+ WORD_LIST *list;
+{
+ return EXECUTION_FAILURE;
+}
+
+static char *true_doc[] = {
+ "Exit successfully.",
+ "",
+ "Return a successful result.",
+ (char *)NULL
+};
+
+static char *false_doc[] = {
+ "Exit unsuccessfully.",
+ "",
+ "Return an unsuccessful result.",
+ (char *)NULL
+};
+
+struct builtin true_struct = {
+ "true",
+ true_builtin,
+ BUILTIN_ENABLED,
+ true_doc,
+ "true",
+ 0
+};
+
+struct builtin false_struct = {
+ "false",
+ false_builtin,
+ BUILTIN_ENABLED,
+ false_doc,
+ "false",
+ 0
+};
diff --git a/examples/loadables/tty.c b/examples/loadables/tty.c
new file mode 100644
index 0000000..1d88506
--- /dev/null
+++ b/examples/loadables/tty.c
@@ -0,0 +1,80 @@
+/* tty - return terminal name */
+
+/* See Makefile for compilation details. */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include <stdio.h>
+#include "builtins.h"
+#include "shell.h"
+#include "bashgetopt.h"
+#include "common.h"
+
+extern char *ttyname ();
+
+tty_builtin (list)
+ WORD_LIST *list;
+{
+ int opt, sflag;
+ char *t;
+
+ reset_internal_getopt ();
+ sflag = 0;
+ while ((opt = internal_getopt (list, "s")) != -1)
+ {
+ switch (opt)
+ {
+ case 's':
+ sflag = 1;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ t = ttyname (0);
+ if (sflag == 0)
+ puts (t ? t : "not a tty");
+ return (t ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
+}
+
+char *tty_doc[] = {
+ "Display terminal name.",
+ "",
+ "tty writes the name of the terminal that is opened for standard",
+ "input to standard output. If the `-s' option is supplied, nothing",
+ "is written; the exit status determines whether or not the standard",
+ "input is connected to a tty.",
+ (char *)NULL
+};
+
+/* The standard structure describing a builtin command. bash keeps an array
+ of these structures. */
+struct builtin tty_struct = {
+ "tty", /* builtin name */
+ tty_builtin, /* function implementing the builtin */
+ BUILTIN_ENABLED, /* initial flags for builtin */
+ tty_doc, /* array of long documentation strings. */
+ "tty [-s]", /* usage synopsis; becomes short_doc */
+ 0 /* reserved for internal use */
+};
diff --git a/examples/loadables/uname.c b/examples/loadables/uname.c
new file mode 100644
index 0000000..a1bddd5
--- /dev/null
+++ b/examples/loadables/uname.c
@@ -0,0 +1,160 @@
+/*
+ * uname - print system information
+ *
+ * usage: uname [-amnrsv]
+ *
+ */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+#include <stdio.h>
+
+#include "bashtypes.h"
+
+#if defined (HAVE_UNAME)
+# include <sys/utsname.h>
+#else
+struct utsname {
+ char sysname[32];
+ char nodename[32];
+ char release[32];
+ char version[32];
+ char machine[32];
+};
+#endif
+
+#include <errno.h>
+
+#include "builtins.h"
+#include "shell.h"
+#include "bashgetopt.h"
+#include "common.h"
+
+#define FLAG_SYSNAME 0x01 /* -s */
+#define FLAG_NODENAME 0x02 /* -n */
+#define FLAG_RELEASE 0x04 /* -r */
+#define FLAG_VERSION 0x08 /* -v */
+#define FLAG_MACHINE 0x10 /* -m, -p */
+
+#define FLAG_ALL 0x1f
+
+#ifndef errno
+extern int errno;
+#endif
+
+static void uprint();
+
+static int uname_flags;
+
+uname_builtin (list)
+ WORD_LIST *list;
+{
+ int opt, r;
+ struct utsname uninfo;
+
+ uname_flags = 0;
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "amnprsv")) != -1)
+ {
+ switch (opt)
+ {
+ case 'a':
+ uname_flags |= FLAG_ALL;
+ break;
+ case 'm':
+ case 'p':
+ uname_flags |= FLAG_MACHINE;
+ break;
+ case 'n':
+ uname_flags |= FLAG_NODENAME;
+ break;
+ case 'r':
+ uname_flags |= FLAG_RELEASE;
+ break;
+ case 's':
+ uname_flags |= FLAG_SYSNAME;
+ break;
+ case 'v':
+ uname_flags |= FLAG_VERSION;
+ break;
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+
+ if (list)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ if (uname_flags == 0)
+ uname_flags = FLAG_SYSNAME;
+
+ /* Only ancient systems will not have uname(2). */
+#ifdef HAVE_UNAME
+ if (uname (&uninfo) < 0)
+ {
+ builtin_error ("cannot get system name: %s", strerror (errno));
+ return (EXECUTION_FAILURE);
+ }
+#else
+ builtin_error ("cannot get system information: uname(2) not available");
+ return (EXECUTION_FAILURE);
+#endif
+
+ uprint (FLAG_SYSNAME, uninfo.sysname);
+ uprint (FLAG_NODENAME, uninfo.nodename);
+ uprint (FLAG_RELEASE, uninfo.release);
+ uprint (FLAG_VERSION, uninfo.version);
+ uprint (FLAG_MACHINE, uninfo.machine);
+
+ return (EXECUTION_SUCCESS);
+}
+
+static void
+uprint (flag, info)
+ int flag;
+ char *info;
+{
+ if (uname_flags & flag)
+ {
+ uname_flags &= ~flag;
+ printf ("%s%c", info, uname_flags ? ' ' : '\n');
+ }
+}
+
+char *uname_doc[] = {
+ "Display system information.",
+ "",
+ "Display information about the system hardware and OS.",
+ (char *)NULL
+};
+
+struct builtin uname_struct = {
+ "uname",
+ uname_builtin,
+ BUILTIN_ENABLED,
+ uname_doc,
+ "uname [-amnrsv]",
+ 0
+};
diff --git a/examples/loadables/unlink.c b/examples/loadables/unlink.c
new file mode 100644
index 0000000..07e3f3d
--- /dev/null
+++ b/examples/loadables/unlink.c
@@ -0,0 +1,73 @@
+/* unlink - remove a directory entry */
+
+/* Should only be used to remove directories by a superuser prepared to let
+ fsck clean up the file system. */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+
+#include "builtins.h"
+#include "shell.h"
+#include "common.h"
+
+#ifndef errno
+extern int errno;
+#endif
+
+unlink_builtin (list)
+ WORD_LIST *list;
+{
+ if (list == 0)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ if (unlink (list->word->word) != 0)
+ {
+ builtin_error ("%s: cannot unlink: %s", list->word->word, strerror (errno));
+ return (EXECUTION_FAILURE);
+ }
+
+ return (EXECUTION_SUCCESS);
+}
+
+char *unlink_doc[] = {
+ "Remove a directory entry.",
+ "",
+ "Forcibly remove a directory entry, even if it's a directory.",
+ (char *)NULL
+};
+
+struct builtin unlink_struct = {
+ "unlink", /* builtin name */
+ unlink_builtin, /* function implementing the builtin */
+ BUILTIN_ENABLED, /* initial flags for builtin */
+ unlink_doc, /* array of long documentation strings. */
+ "unlink name", /* usage synopsis; becomes short_doc */
+ 0 /* reserved for internal use */
+};
diff --git a/examples/loadables/whoami.c b/examples/loadables/whoami.c
new file mode 100644
index 0000000..6f8471a
--- /dev/null
+++ b/examples/loadables/whoami.c
@@ -0,0 +1,73 @@
+/*
+ * whoami - print out username of current user
+ */
+
+/*
+ Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+#include <stdio.h>
+
+#include "builtins.h"
+#include "shell.h"
+#include "bashgetopt.h"
+#include "common.h"
+
+whoami_builtin (list)
+ WORD_LIST *list;
+{
+ int opt;
+
+ reset_internal_getopt ();
+ while ((opt = internal_getopt (list, "")) != -1)
+ {
+ switch (opt)
+ {
+ default:
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+ }
+ list = loptend;
+ if (list)
+ {
+ builtin_usage ();
+ return (EX_USAGE);
+ }
+
+ if (current_user.user_name == 0)
+ get_current_user_info ();
+ printf ("%s\n", current_user.user_name);
+ return (EXECUTION_SUCCESS);
+}
+
+char *whoami_doc[] = {
+ "Print user name",
+ "",
+ "Display name of current user.",
+ (char *)NULL
+};
+
+struct builtin whoami_struct = {
+ "whoami",
+ whoami_builtin,
+ BUILTIN_ENABLED,
+ whoami_doc,
+ "whoami",
+ 0
+};
diff --git a/examples/misc/aliasconv.bash b/examples/misc/aliasconv.bash
new file mode 100755
index 0000000..22a0447
--- /dev/null
+++ b/examples/misc/aliasconv.bash
@@ -0,0 +1,44 @@
+#! /bin/bash
+#
+# aliasconv.bash - convert csh aliases to bash aliases and functions
+#
+# usage: aliasconv.bash
+#
+# Chet Ramey
+# chet@po.cwru.edu
+#
+trap 'rm -f $TMPFILE' 0 1 2 3 6 15
+
+TMPFILE=$(mktemp -t cb.XXXXXX) || exit 1
+
+T=$'\t'
+
+cat << \EOF >$TMPFILE
+mkalias ()
+{
+ case $2 in
+ '') echo alias ${1}="''" ;;
+ *[#\!]*)
+ comm=$(echo $2 | sed 's/\!\*/"$\@"/g
+ s/\!:\([1-9]\)/"$\1"/g
+ s/#/\#/g')
+ echo $1 \(\) "{" command "$comm" "; }"
+ ;;
+ *) echo alias ${1}=\'$(echo "${2}" | sed "s:':'\\\\'':g")\' ;;
+ esac
+}
+EOF
+
+# the first thing we want to do is to protect single quotes in the alias,
+# since they whole thing is going to be surrounded by single quotes when
+# passed to mkalias
+
+sed -e "s:':\\'\\\'\\':" -e "s/^\([a-zA-Z0-9_-]*\)$T\(.*\)$/mkalias \1 '\2'/" >>$TMPFILE
+
+$BASH $TMPFILE | sed -e 's/\$cwd/\$PWD/g' \
+ -e 's/\$term/\$TERM/g' \
+ -e 's/\$home/\$HOME/g' \
+ -e 's/\$user/\$USER/g' \
+ -e 's/\$prompt/\$PS1/g'
+
+exit 0
diff --git a/examples/misc/aliasconv.sh b/examples/misc/aliasconv.sh
new file mode 100755
index 0000000..fe975d6
--- /dev/null
+++ b/examples/misc/aliasconv.sh
@@ -0,0 +1,42 @@
+#! /bin/bash
+#
+# aliasconv.sh - convert csh aliases to bash aliases and functions
+#
+# usage: aliasconv.sh
+#
+# Chet Ramey
+# chet@po.cwru.edu
+#
+trap 'rm -f $TMPFILE' 0 1 2 3 6 15
+TMPFILE=$(mktemp -t cb.XXXXXX) || exit 1
+T=' '
+
+cat << \EOF >$TMPFILE
+mkalias ()
+{
+ case $2 in
+ '') echo alias ${1}="''" ;;
+ *[#\!]*)
+ comm=`echo $2 | sed 's/\\!\*/"$\@"/g
+ s/\\!:\([1-9]\)/"$\1"/g
+ s/#/\#/g'`
+ echo $1 \(\) "{" command "$comm" "; }"
+ ;;
+ *) echo alias ${1}=\'`echo "${2}" | sed "s:':'\\\\\\\\'':"`\' ;;
+ esac
+}
+EOF
+
+# the first thing we want to do is to protect single quotes in the alias,
+# since they whole thing is going to be surrounded by single quotes when
+# passed to mkalias
+
+sed -e "s:':\\'\\\'\\':" -e "s/^\([a-zA-Z0-9_-]*\)$T\(.*\)$/mkalias \1 '\2'/" >>$TMPFILE
+
+sh $TMPFILE | sed -e 's/\$cwd/\$PWD/g' \
+ -e 's/\$term/\$TERM/g' \
+ -e 's/\$home/\$HOME/g' \
+ -e 's/\$user/\$USER/g' \
+ -e 's/\$prompt/\$PS1/g'
+
+exit 0
diff --git a/examples/misc/cshtobash b/examples/misc/cshtobash
new file mode 100755
index 0000000..ce49bfc
--- /dev/null
+++ b/examples/misc/cshtobash
@@ -0,0 +1,139 @@
+#! /bin/bash
+#
+# cshtobash - convert csh aliases, environment variables, and variables to
+# bash equivalents
+#
+# usage: cshtobash [filename]
+#
+# If filename is given, that file is sourced. Note that csh always
+# sources .cshrc. To recreate your csh login environment, run
+# `cshtobash ~/.login'.
+#
+# Inspired by (and some borrowed from) a similar program distributed with
+# zsh-3.0.
+#
+# Chet Ramey
+# chet@po.cwru.edu
+#
+trap 'rm -f $TMPFILE1 $TMPFILEa $TMPFILEe $TMPFILEv $TMPFILEco $TMPFILEci' 0 1 2 3 6 15
+
+{ TMPFILE1=$(mktemp -t cb.1.XXXXXX) &&
+ TMPFILEa=$(mktemp -t cb.a.XXXXXX) &&
+ TMPFILEe=$(mktemp -t cb.e.XXXXXX) &&
+ TMPFILEv=$(mktemp -t cb.v.XXXXXX) &&
+ TMPFILEco=$(mktemp -t cshout.XXXXXX) &&
+ TMPFILEci=$(mktemp -t cshin.XXXXXX)
+} || exit 1
+
+
+T=$'\t'
+
+SOURCE="${1:+source $1}"
+
+cat << EOF >$TMPFILEci
+$SOURCE
+alias >! $TMPFILEa
+setenv >! $TMPFILEe
+set >! $TMPFILEv
+EOF
+
+# give csh a minimal environment, similar to what login would provide
+/usr/bin/env - USER=$USER HOME=$HOME PATH=/usr/bin:/bin:/usr/ucb:. TERM=$TERM SHELL=$SHELL /bin/csh -i < $TMPFILEci > $TMPFILEco 2>&1
+
+# First convert aliases
+
+cat << \EOF >$TMPFILE1
+mkalias ()
+{
+ case $2 in
+ '') echo alias ${1}="''" ;;
+ *[#\!]*)
+ comm=$(echo $2 | sed 's/\!\*/"$\@"/g
+ s/\!:\([1-9]\)/"$\1"/g
+ s/#/\#/g')
+ echo $1 \(\) "{" command "$comm" "; }"
+ ;;
+ *) echo alias ${1}=\'$(echo "${2}" | sed "s:':'\\\\'':")\' ;;
+ esac
+}
+EOF
+
+sed "s/^\([a-zA-Z0-9_]*\)$T\(.*\)$/mkalias \1 '\2'/" < $TMPFILEa >>$TMPFILE1
+
+echo '# csh aliases'
+echo
+
+$BASH $TMPFILE1 | sed -e 's/\$cwd/\$PWD/g' \
+ -e 's/\$term/\$TERM/g' \
+ -e 's/\$home/\$HOME/g' \
+ -e 's/\$user/\$USER/g' \
+ -e 's/\$prompt/\$PS1/g'
+
+# Next, convert environment variables
+echo
+echo '# csh environment variables'
+echo
+
+# Would be nice to deal with embedded newlines, e.g. in TERMCAP, but ...
+sed -e '/^SHLVL/d' \
+ -e '/^PWD/d' \
+ -e "s/'/'"\\\\"''"/g \
+ -e "s/^\([A-Za-z0-9_]*=\)/export \1'/" \
+ -e "s/$/'/" < $TMPFILEe
+
+# Finally, convert local variables
+echo
+echo '# csh variables'
+echo
+
+sed -e 's/'"$T"'/=/' \
+ -e "s/'/'"\\\\"''"/g \
+ -e '/^[A-Za-z0-9_]*=[^(]/{
+ s/=/='"'/"'
+ s/$/'"'/"'
+ }' < $TMPFILEv |
+sed -e '/^argv=/d' -e '/^cwd=/d' -e '/^filec=/d' -e '/^status=/d' \
+ -e '/^verbose=/d' \
+ -e '/^term=/d' \
+ -e '/^home=/d' \
+ -e '/^path=/d' \
+ -e '/^user=/d' \
+ -e '/^shell=/d' \
+ -e '/^cdpath=/d' \
+ -e '/^mail=/d' \
+ -e '/^home=/s//HOME=/' \
+ -e '/^prompt=/s//PS1=/' \
+ -e '/^histfile=/s//HISTFILE=/' \
+ -e '/^history=/s//HISTSIZE=/' \
+ -e '/^savehist=$/s//HISTFILESIZE=${HISTSIZE-500}/' \
+ -e '/^savehist=/s//HISTFILESIZE=/' \
+ -e '/^ignoreeof=$/s/^.*$/set -o ignoreeof # ignoreeof/' \
+ -e '/^ignoreeof=/s//IGNOREEOF=/' \
+ -e '/^noclobber=/s/^.*$/set -C # noclobber/' \
+ -e '/^notify=/s/^.*$/set -b # notify/' \
+ -e '/^noglob=/s/^.*$/set -f # noglob/' \
+
+
+# now some special csh variables converted to bash equivalents
+echo
+echo '# special csh variables converted to bash equivalents'
+echo
+
+sed -e 's/'"$T"'/=/' < $TMPFILEv |
+grep "^cdpath=" |
+sed 's/(//
+ s/ /:/g
+ s/)//
+ s/cdpath=/CDPATH=/'
+
+
+sed -e 's/'"$T"'/=/' < $TMPFILEv |
+grep "^mail=" |
+sed 's/(//
+ s/ /:/g
+ s/)//
+ s/mail=/MAILPATH=/' |
+sed -e 's/MAILPATH=\([0-9][0-9][^:]*\)$/MAILCHECK=\1/' \
+ -e 's/MAILPATH=\([0-9][0-9][^:]*\):\(.*\)/MAILCHECK=\1 MAILPATH=\2/'
+
+exit 0
diff --git a/examples/misc/suncmd.termcap b/examples/misc/suncmd.termcap
new file mode 100644
index 0000000..c3422fb
--- /dev/null
+++ b/examples/misc/suncmd.termcap
@@ -0,0 +1,30 @@
+#Posted-Date: Fri, 9 Mar 90 18:34:29 EST
+#Date: Fri, 9 Mar 90 18:34:29 EST
+#From: "Eirik Fuller" <wonton.tn.cornell.edu!eirik@ucsbcsl.UUCP>
+#To: bfox@ai.mit.edu (Brian Fox)
+#Subject: Patch to bash 1.05 for SunView
+#
+#I think this works:
+#
+Mu|sun-cmd:am:bs:km:pt:li#34:co#80:cl=^L:ce=\E[K:cd=\E[J:rs=\E[s:
+#
+#Another alternative is to send the ti string at startup time (and, I
+#guess, the te string at exit time); that is how vi works in a cmdtool.
+#The best reason to not do this is that this also disables scrolling
+#which, as I understand it, is why anyone would use cmdtool in the
+#first place. Sending the ti string at startup time would do strange
+#things on other systems too; in xterm it would use the alternate
+#screen.
+#
+#The problem with cmdtool, in case that is less than obvious, is that
+#almost none of the capabilities advertised in /etc/termcap are enabled
+#while scrolling is enabled. It has other problems too, like being
+#part of an outdated proprietary windowing system, but there's probably
+#no need to dwell on that. In a sense, though, the sun-cmd termcap
+#entry doesn't lie about the capabilities; I think the termcap man page
+#does warn about some terminals having cursor motion capabilities only
+#in the "ti/te window".
+#
+#A general solution to this problem would require a termcap capability
+#which somehow tells which features are available outside of the ti/te
+#window. There is no such capability in termcap now, of course.
diff --git a/examples/obashdb/PERMISSION b/examples/obashdb/PERMISSION
new file mode 100644
index 0000000..4e9460c
--- /dev/null
+++ b/examples/obashdb/PERMISSION
@@ -0,0 +1,27 @@
+From mikel@ora.com Tue Aug 1 12:13:20 1995
+Flags: 10
+Return-Path: mikel@ora.com
+Received: from ruby.ora.com (ruby.ora.com [198.112.208.25]) by odin.INS.CWRU.Edu with ESMTP (8.6.12+cwru/CWRU-2.1-ins)
+ id MAA01565; Tue, 1 Aug 1995 12:13:18 -0400 (from mikel@ora.com for <chet@odin.INS.CWRU.Edu>)
+Received: (from fax@localhost) by ruby.ora.com (8.6.12/8.6.11) with UUCP id MAA23251; Tue, 1 Aug 1995 12:07:51 -0400
+Received: by los.ora.com (4.1/Spike-2.1)
+ id AA00672; Tue, 1 Aug 95 08:57:32 EDT
+Date: Tue, 1 Aug 95 08:57:32 EDT
+From: mikel@ora.com (Michael Loukides)
+Message-Id: <9508011257.AA00672@los.ora.com>
+Subject: Re: Ksh debugger from Rosenblatt's book [for bash]
+To: Chet Ramey <chet@odin.INS.CWRU.Edu>
+Cc: cmarie@ora.com, cam@iinet.com.au, brosenblatt@tm.com
+In-Reply-To: Chet Ramey <chet@odin.INS.CWRU.Edu>, Mon, 31 Jul 1995 16:22:48 -0400
+
+ I've modified a (modified) version of Bill Rosenblatt's ksh debugger
+ to work with bash-2.0. Does ORA have any problem with me distributing
+ it with bash-2.0?
+
+That's great!
+
+Go ahead and circulate it; in fact, we should probably grab it and
+stick it in our ftp archive, and put a reference to it in the book.
+(Too late to actually discuss the thing, at least for this edition).
+-------
+
diff --git a/examples/obashdb/README b/examples/obashdb/README
new file mode 100644
index 0000000..2f643d1
--- /dev/null
+++ b/examples/obashdb/README
@@ -0,0 +1,3 @@
+This is a sample implementation of a bash debugger. It is not the same
+as the project available from http://bashdb.sourceforge.net, and has been
+deprecated in favor of that implementation.
diff --git a/examples/obashdb/bashdb b/examples/obashdb/bashdb
new file mode 100755
index 0000000..560cb7c
--- /dev/null
+++ b/examples/obashdb/bashdb
@@ -0,0 +1,581 @@
+#! /bin/bash
+# bashdb - Bash shell debugger
+#
+# Adapted from an idea in O'Reilly's `Learning the Korn Shell'
+# Copyright (C) 1993-1994 O'Reilly and Associates, Inc.
+# Copyright (C) 1998, 1999, 2001 Gary V. Vaughan <gvv@techie.com>>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# NOTE:
+#
+# This program requires bash 2.x.
+# If bash 2.x is installed as "bash2", you can invoke bashdb like this:
+#
+# DEBUG_SHELL=/bin/bash2 /bin/bash2 bashdb script.sh
+
+# TODO:
+#
+# break [regexp]
+# cond [break] [condition]
+# tbreak [regexp|+lines]
+# restart
+# Variable watchpoints
+# Instrument `source' and `.' files in $_potbelliedpig
+# be cleverer about lines we allow breakpoints to be set on
+# break [function_name]
+
+echo 'Bash Debugger version 1.2.4'
+
+export _dbname=${0##*/}
+
+if test $# -lt 1; then
+ echo "$_dbname: Usage: $_dbname filename" >&2
+ exit 1
+fi
+
+_guineapig=$1
+
+if test ! -r $1; then
+ echo "$_dbname: Cannot read file '$_guineapig'." >&2
+ exit 1
+fi
+
+shift
+
+__debug=${TMPDIR-/tmp}/bashdb.$$
+sed -e '/^# bashdb - Bash shell debugger/,/^# -- DO NOT DELETE THIS LINE -- /d' "$0" > $__debug
+cat $_guineapig >> $__debug
+exec ${DEBUG_SHELL-bash} $__debug $_guineapig "$@"
+
+exit 1
+
+# -- DO NOT DELETE THIS LINE -- The program depends on it
+
+#bashdb preamble
+# $1 name of the original guinea pig script
+
+__debug=$0
+_guineapig=$1
+__steptrap_calls=0
+
+shift
+
+shopt -s extglob # turn on extglob so we can parse the debugger funcs
+
+function _steptrap
+{
+ local i=0
+
+ _curline=$1
+
+ if (( ++__steptrap_calls > 1 && $_curline == 1 )); then
+ return
+ fi
+
+ if [ -n "$_disps" ]; then
+ while (( $i < ${#_disps[@]} ))
+ do
+ if [ -n "${_disps[$i]}" ]; then
+ _msg "${_disps[$i]}: \c"
+ eval _msg ${_disps[$i]}
+ fi
+ let i=$i+1
+ done
+ fi
+
+ if (( $_trace )); then
+ _showline $_curline
+ fi
+
+ if (( $_steps >= 0 )); then
+ let _steps="$_steps - 1"
+ fi
+
+ if _at_linenumbp ; then
+ _msg "Reached breakpoint at line $_curline"
+ _showline $_curline
+ _cmdloop
+ elif [ -n "$_brcond" ] && eval $_brcond; then
+ _msg "Break condition $_brcond true at line $_curline"
+ _showline $_curline
+ _cmdloop
+ elif (( $_steps == 0 )); then
+ # Assuming a real script will have the "#! /bin/sh" at line 1,
+ # assume that when $_curline == 1 we are inside backticks.
+ if (( ! $_trace )); then
+ _msg "Stopped at line $_curline"
+ _showline $_curline
+ fi
+ _cmdloop
+ fi
+}
+
+function _setbp
+{
+ local i f line _x
+
+ if [ -z "$1" ]; then
+ _listbp
+ return
+ fi
+
+ eval "$_seteglob"
+
+ if [[ $1 == *(\+)[1-9]*([0-9]) ]]; then
+ case $1 in
+ +*)
+ # normalize argument, then double it (+2 -> +2 + 2 = 4)
+ _x=${1##*([!1-9])} # cut off non-numeric prefix
+ _x=${x%%*([!0-9])} # cut off non-numeric suffix
+ f=$(( $1 + $_x ))
+ ;;
+ *)
+ f=$(( $1 ))
+ ;;
+ esac
+
+ # find the next valid line
+ line="${_lines[$f]}"
+ while _invalidbreakp $f
+ do
+ (( f++ ))
+ line="${_lines[$f]}"
+ done
+
+ if (( $f != $1 ))
+ then
+ _msg "Line $1 is not a valid breakpoint"
+ fi
+
+ if [ -n "${_lines[$f]}" ]; then
+ _linebp[$1]=$1;
+ _msg "Breakpoint set at line $f"
+ else
+ _msg "Breakpoints can only be set on executable lines"
+ fi
+ else
+ _msg "Please specify a numeric line number"
+ fi
+
+ eval "$_resteglob"
+}
+
+function _listbp
+{
+ local i
+
+ if [ -n "$_linebp" ]; then
+ _msg "Breakpoints:"
+ for i in ${_linebp[*]}; do
+ _showline $i
+ done
+ else
+ _msg "No breakpoints have been set"
+ fi
+}
+
+function _clearbp
+{
+ local i
+
+ if [ -z "$1" ]; then
+ read -e -p "Delete all breakpoints? "
+ case $REPLY in
+ [yY]*)
+ unset _linebp[*]
+ _msg "All breakpoints have been cleared"
+ ;;
+ esac
+ return 0
+ fi
+
+ eval "$_seteglob"
+
+ if [[ $1 == [1-9]*([0-9]) ]]; then
+ unset _linebp[$1]
+ _msg "Breakpoint cleared at line $1"
+ else
+ _msg "Please specify a numeric line number"
+ fi
+
+ eval "$_resteglob"
+}
+
+function _setbc
+{
+ if (( $# > 0 )); then
+ _brcond=$@
+ _msg "Break when true: $_brcond"
+ else
+ _brcond=
+ _msg "Break condition cleared"
+ fi
+}
+
+function _setdisp
+{
+ if [ -z "$1" ]; then
+ _listdisp
+ else
+ _disps[${#_disps[@]}]="$1"
+ if (( ${#_disps[@]} < 10 ))
+ then
+ _msg " ${#_disps[@]}: $1"
+ else
+ _msg "${#_disps[@]}: $1"
+ fi
+ fi
+}
+
+function _listdisp
+{
+ local i=0 j
+
+ if [ -n "$_disps" ]; then
+ while (( $i < ${#_disps[@]} ))
+ do
+ let j=$i+1
+ if (( ${#_disps[@]} < 10 ))
+ then
+ _msg " $j: ${_disps[$i]}"
+ else
+ _msg "$j: ${_disps[$i]}"
+ fi
+ let i=$j
+ done
+ else
+ _msg "No displays have been set"
+ fi
+}
+
+function _cleardisp
+{
+ if (( $# < 1 )) ; then
+ read -e -p "Delete all display expressions? "
+ case $REPLY in
+ [Yy]*)
+ unset _disps[*]
+ _msg "All breakpoints have been cleared"
+ ;;
+ esac
+ return 0
+ fi
+
+ eval "$_seteglob"
+
+ if [[ $1 == [1-9]*([0-9]) ]]; then
+ unset _disps[$1]
+ _msg "Display $i has been cleared"
+ else
+ _listdisp
+ _msg "Please specify a numeric display number"
+ fi
+
+ eval "$_resteglob"
+}
+
+# usage _ftrace -u funcname [funcname...]
+function _ftrace
+{
+ local _opt=-t _tmsg="enabled" _func
+ if [[ $1 == -u ]]; then
+ _opt=+t
+ _tmsg="disabled"
+ shift
+ fi
+ for _func; do
+ declare -f $_opt $_func
+ _msg "Tracing $_tmsg for function $_func"
+ done
+}
+
+function _cmdloop
+{
+ local cmd args
+
+ while read -e -p "bashdb> " cmd args; do
+ test -n "$cmd" && history -s "$cmd $args" # save on history list
+ test -n "$cmd" || { set $_lastcmd; cmd=$1; shift; args=$*; }
+ if [ -n "$cmd" ]
+ then
+ case $cmd in
+ b|br|bre|brea|break)
+ _setbp $args
+ _lastcmd="break $args"
+ ;;
+ co|con)
+ _msg "ambiguous command: '$cmd', condition, continue?"
+ ;;
+ cond|condi|condit|conditi|conditio|condition)
+ _setbc $args
+ _lastcmd="condition $args"
+ ;;
+ c|cont|conti|contin|continu|continue)
+ _lastcmd="continue"
+ return
+ ;;
+ d)
+ _msg "ambiguous command: '$cmd', delete, display?"
+ ;;
+ de|del|dele|delet|delete)
+ _clearbp $args
+ _lastcmd="delete $args"
+ ;;
+ di|dis|disp|displ|displa|display)
+ _setdisp $args
+ _lastcmd="display $args"
+ ;;
+ f|ft|ftr|ftra|ftrace)
+ _ftrace $args
+ _lastcmd="ftrace $args"
+ ;;
+ \?|h|he|hel|help)
+ _menu
+ _lastcmd="help"
+ ;;
+ l|li|lis|list)
+ _displayscript $args
+ # _lastcmd is set in the _displayscript function
+ ;;
+ p|pr|pri|prin|print)
+ _examine $args
+ _lastcmd="print $args"
+ ;;
+ q|qu|qui|quit)
+ exit
+ ;;
+ s|st|ste|step|n|ne|nex|next)
+ let _steps=${args:-1}
+ _lastcmd="next $args"
+ return
+ ;;
+ t|tr|tra|trac|trace)
+ _xtrace
+ ;;
+ u|un|und|undi|undis|undisp|undispl|undispla|undisplay)
+ _cleardisp $args
+ _lastcmd="undisplay $args"
+ ;;
+ !*)
+ eval ${cmd#!} $args
+ _lastcmd="$cmd $args"
+ ;;
+ *)
+ _msg "Invalid command: '$cmd'"
+ ;;
+ esac
+ fi
+ done
+}
+
+function _at_linenumbp
+{
+ [[ -n ${_linebp[$_curline]} ]]
+}
+
+function _invalidbreakp
+{
+ local line=${_lines[$1]}
+
+ # XXX - should use shell patterns
+ if test -z "$line" \
+ || expr "$line" : '[ \t]*#.*' > /dev/null \
+ || expr "$line" : '[ \t]*;;[ \t]*$' > /dev/null \
+ || expr "$line" : '[ \t]*[^)]*)[ \t]*$' > /dev/null \
+ || expr "$line" : '[ \t]*;;[ \t]*#.**$' > /dev/null \
+ || expr "$line" : '[ \t]*[^)]*)[ \t]*;;[ \t]*$' > /dev/null \
+ || expr "$line" : '[ \t]*[^)]*)[ \t]*;;*[ \t]*#.*$' > /dev/null
+ then
+ return 0
+ fi
+
+ return 1
+}
+
+function _examine
+{
+ if [ -n "$*" ]; then
+ _msg "$args: \c"
+ eval _msg $args
+ else
+ _msg "Nothing to print"
+ fi
+}
+
+function _displayscript
+{
+ local i j start end bp cl
+
+ if (( $# == 1 )); then # list 5 lines on either side of $1
+ if [ $1 = "%" ]; then
+ let start=1
+ let end=${#_lines[@]}
+ else
+ let start=$1-5
+ let end=$1+5
+ fi
+ elif (( $# > 1 )); then # list between start and end
+ if [ $1 = "^" ]; then
+ let start=1
+ else
+ let start=$1
+ fi
+
+ if [ $2 = "\$" ]; then
+ let end=${#_lines[@]}
+ else
+ let end=$2
+ fi
+ else # list 5 lines on either side of current line
+ let start=$_curline-5
+ let end=$_curline+5
+ fi
+
+ # normalize start and end
+ if (( $start < 1 )); then
+ start=1
+ fi
+ if (( $end > ${#_lines[@]} )); then
+ end=${#_lines[@]}
+ fi
+
+ cl=$(( $end - $start ))
+ if (( $cl > ${LINES-24} )); then
+ pager=${PAGER-more}
+ else
+ pager=cat
+ fi
+
+ i=$start
+ ( while (( $i <= $end )); do
+ _showline $i
+ let i=$i+1
+ done ) 2>&1 | $pager
+
+ # calculate the next block of lines
+ start=$(( $end + 1 ))
+ end=$(( $start + 11 ))
+ if (( $end > ${#_lines[@]} ))
+ then
+ end=${#_lines[@]}
+ fi
+
+ _lastcmd="list $start $end"
+}
+
+function _xtrace
+{
+ let _trace="! $_trace"
+ if (( $_trace )); then
+ _msg "Execution trace on"
+ else
+ _msg "Execution trace off"
+ fi
+}
+
+function _msg
+{
+ echo -e "$@" >&2
+}
+
+function _showline
+{
+ local i=0 bp=' ' line=$1 cl=' '
+
+ if [[ -n ${_linebp[$line]} ]]; then
+ bp='*'
+ fi
+
+ if (( $_curline == $line )); then
+ cl=">"
+ fi
+
+ if (( $line < 100 )); then
+ _msg "${_guineapig/*\//}:$line $bp $cl${_lines[$line]}"
+ elif (( $line < 10 )); then
+ _msg "${_guineapig/*\//}:$line $bp $cl${_lines[$line]}"
+ elif (( $line > 0 )); then
+ _msg "${_guineapig/*\//}:$line $bp $cl${_lines[$line]}"
+ fi
+}
+
+function _cleanup
+{
+ rm -f $__debug $_potbelliedpig 2> /dev/null
+}
+
+function _menu
+{
+ _msg 'bashdb commands:
+ break N set breakpoint at line N
+ break list breakpoints & break condition
+ condition foo set break condition to foo
+ condition clear break condition
+ delete N clear breakpoint at line N
+ delete clear all breakpoints
+ display EXP evaluate and display EXP for each debug step
+ display show a list of display expressions
+ undisplay N remove display expression N
+ list N M display all lines of script between N and M
+ list N display 5 lines of script either side of line N
+ list display 5 lines if script either side of current line
+ continue continue execution upto next breakpoint
+ next [N] execute [N] statements (default 1)
+ print expr prints the value of an expression
+ trace toggle execution trace on/off
+ ftrace [-u] func make the debugger step into function FUNC
+ (-u turns off tracing FUNC)
+ help print this menu
+ ! string passes string to a shell
+ quit quit'
+}
+
+shopt -u extglob
+
+HISTFILE=~/.bashdb_history
+set -o history
+set +H
+
+# strings to save and restore the setting of `extglob' in debugger functions
+# that need it
+_seteglob='local __eopt=-u ; shopt -q extglob && __eopt=-s ; shopt -s extglob'
+_resteglob='shopt $__eopt extglob'
+
+_linebp=()
+let _trace=0
+let _i=1
+
+# Be careful about quoted newlines
+_potbelliedpig=${TMPDIR-/tmp}/${_guineapig/*\//}.$$
+sed 's,\\$,\\\\,' $_guineapig > $_potbelliedpig
+
+_msg "Reading source from file: $_guineapig"
+while read; do
+ _lines[$_i]=$REPLY
+ let _i=$_i+1
+done < $_potbelliedpig
+
+trap _cleanup EXIT
+# Assuming a real script will have the "#! /bin/sh" at line 1,
+# don't stop at line 1 on the first run
+let _steps=1
+LINENO=-1
+trap '_steptrap $LINENO' DEBUG
diff --git a/examples/obashdb/bashdb.el b/examples/obashdb/bashdb.el
new file mode 100644
index 0000000..40584dd
--- /dev/null
+++ b/examples/obashdb/bashdb.el
@@ -0,0 +1,177 @@
+;;; bashdb.el --- Grand Unified Debugger mode for running bashdb
+;; Copyright (C) 2000, 2001 Masatake YAMATO
+
+;; Author: Masatake YAMATO <jet@gyve.org>
+
+;; This program is free software; you can redistribute it and/or modify it
+;; under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 2 of the License, or
+;; (at your option) any later version.
+
+;; This program is distributed in the hope that it will be useful, but
+;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program; if not, write to the Free Software Foundation,
+;; Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+;; Commentary:
+;; This program may run on Emacs 21.0.91 and XEmacs 21.1.
+;;
+;; Put
+;; (autoload 'bashdb "bashdb" "Run bashdb" t nil)
+;; to your .emacs.
+;; M-x bashdb
+;; Run bashdb (like this): bashdb target.sh
+;;
+;; About bashdb:
+;; You can get bashdb from
+;; http://www.oranda.demon.co.uk/development.html
+;;
+;; bashdb.el is based on perldb in gud.el in XEmacs 21.1.
+
+;; Revision:
+;; $Revision: 1.6 $
+;; $Log: bashdb.el,v $
+;; Revision 1.6 2001/01/06 12:18:06 masata-y
+;; Write note about XEmacs.
+;;
+;;
+
+
+;;; Code:
+(require 'gud)
+
+;; User customizable variable
+(defcustom gud-bashdb-command-name "bashdb"
+ "File name for executing Bashdb."
+ :type 'string
+ :group 'gud)
+
+;; History of argument lists passed to bashdb.
+(defvar gud-bashdb-history nil)
+
+(defun gud-bashdb-massage-args (file args)
+ (if xemacsp
+ (cons (file-name-nondirectory file) args)
+ args))
+
+;; There's no guarantee that Emacs will hand the filter the entire
+;; marker at once; it could be broken up across several strings. We
+;; might even receive a big chunk with several markers in it. If we
+;; receive a chunk of text which looks like it might contain the
+;; beginning of a marker, we save it here between calls to the
+;; filter.
+(if xemacsp
+ (defvar gud-bashdb-marker-acc ""))
+(defun gud-bashdb-marker-acc ()
+ (if xemacsp
+ gud-bashdb-marker-acc
+ gud-marker-acc))
+(defun gud-bashdb-marker-acc-quote ()
+ (if xemacsp
+ 'gud-bashdb-marker-acc
+ 'gud-marker-acc))
+
+(defun gud-bashdb-marker-filter (string)
+ (save-match-data
+ (set (gud-bashdb-marker-acc-quote)
+ (concat (gud-bashdb-marker-acc) string))
+ (let ((output ""))
+ ;; Process all the complete markers in this chunk.
+ (while (string-match "^\\([^:\n]+\\):\\([0-9]+\\)[ *]*>.*\n"
+ (gud-bashdb-marker-acc))
+ (setq
+ ;; Extract the frame position from the marker.
+ gud-last-frame (cons
+ (substring (gud-bashdb-marker-acc)
+ (match-beginning 1)
+ (match-end 1))
+ (string-to-int
+ (substring (gud-bashdb-marker-acc)
+ (match-beginning 2)
+ (match-end 2))))
+ ;; Append any text before the marker to the output we're going
+ ;; to return - we don't include the marker in this text.
+ output (concat output
+ (substring (gud-bashdb-marker-acc) 0 (match-beginning 0))))
+ ;; Set the accumulator to the remaining text.
+ (set
+ (gud-bashdb-marker-acc-quote) (substring
+ (gud-bashdb-marker-acc) (match-end 0))))
+
+ ;; Does the remaining text look like it might end with the
+ ;; beginning of another marker? If it does, then keep it in
+ ;; (gud-bashdb-marker-acc) until we receive the rest of it. Since we
+ ;; know the full marker regexp above failed, it's pretty simple to
+ ;; test for marker starts.
+ (if (string-match "^\\([^:\n]+\\):\\([0-9]+\\)[ *]*>" (gud-bashdb-marker-acc))
+ (progn
+ ;; Everything before the potential marker start can be output.
+ (setq output (concat output (substring (gud-bashdb-marker-acc)
+ 0 (match-beginning 0))))
+ ;; Everything after, we save, to combine with later input.
+ (set (gud-bashdb-marker-acc-quote)
+ (substring (gud-bashdb-marker-acc) (match-beginning 0))))
+
+ (setq output (concat output (gud-bashdb-marker-acc)))
+ (set (gud-bashdb-marker-acc-quote) ""))
+
+ output)))
+
+(defun gud-bashdb-find-file (f)
+ (find-file-noselect f))
+
+;;;###autoload
+(defun bashdb (command-line)
+ "Run bashdb on program FILE in buffer *gud-FILE*.
+The directory containing FILE becomes the initial working directory
+and source-file directory for your debugger."
+ (interactive
+ (if xemacsp
+ (list (read-from-minibuffer "Run bashdb (like this): "
+ (if (consp gud-bashdb-history)
+ (car gud-bashdb-history)
+ (format "%s " gud-bashdb-command-name))
+ nil nil
+ '(gud-bashdb-history . 1)))
+ (list (gud-query-cmdline 'bashdb))
+ ))
+
+ (if xemacsp
+ (progn
+ (gud-overload-functions '((gud-massage-args . gud-bashdb-massage-args)
+ (gud-marker-filter . gud-bashdb-marker-filter)
+ (gud-find-file . gud-bashdb-find-file)))
+ (gud-common-init command-line gud-bashdb-command-name))
+ (gud-common-init command-line 'gud-bashdb-massage-args
+ 'gud-bashdb-marker-filter 'gud-bashdb-find-file)
+ (set (make-local-variable 'gud-minor-mode) 'bashdb))
+
+;; Unsupported commands
+;; condition foo set break condition to foo
+;; condition clear break condition
+;; display EXP evaluate and display EXP for each debug step
+;; display show a list of display expressions
+;; undisplay N remove display expression N
+;; ! string passes string to a shell
+;; quit quit
+
+ (gud-def gud-break "break %l" "\C-b" "Set breakpoint at current line.")
+ (gud-def gud-list-break "break" "b" "List breakpoints & break condition.")
+ (gud-def gud-remove "delete %l" "\C-d" "Remove breakpoint at current line")
+ (gud-def gud-remove-all "delete" "d" "Clear all breakpoints")
+ (gud-def gud-cont "continue" "\C-r" "Continue with display.")
+ (gud-def gud-next "next" "\C-n" "Step one line (skip functions).")
+ (gud-def gud-print "print %e" "\C-p" "Evaluate bash expression at point.")
+ (gud-def gud-help "help" "h" "Show all commands.")
+ (gud-def gud-trace "trace" "t" "Toggle execution trace on/off")
+
+ (setq comint-prompt-regexp "^bashdb> ")
+ (setq paragraph-start comint-prompt-regexp)
+ (run-hooks 'bashdb-mode-hook))
+
+(provide 'bashdb)
+;; bashdb.el ends here
diff --git a/examples/scripts.noah/PERMISSION b/examples/scripts.noah/PERMISSION
new file mode 100644
index 0000000..f415c48
--- /dev/null
+++ b/examples/scripts.noah/PERMISSION
@@ -0,0 +1,29 @@
+From friedman@cli.com Thu May 25 12:19:06 1995
+Flags: 10
+Return-Path: friedman@cli.com
+Received: from po.cwru.edu (root@po.CWRU.Edu [129.22.4.2]) by odin.INS.CWRU.Edu with ESMTP (8.6.10+cwru/CWRU-2.1-ins)
+ id MAA08685; Thu, 25 May 1995 12:19:05 -0400 (from friedman@cli.com for <chet@odin.INS.CWRU.Edu>)
+Received: from cli.com (cli.com [192.31.85.1]) by po.cwru.edu with SMTP (8.6.10+cwru/CWRU-2.3)
+ id MAA11299; Thu, 25 May 1995 12:19:00 -0400 (from friedman@cli.com for <chet@po.cwru.edu>)
+Received: from tepui.cli.com by cli.com (4.1/SMI-4.1)
+ id AA27213; Thu, 25 May 95 11:18:25 CDT
+Received: by tepui.cli.com (4.1) id AA16031; Thu, 25 May 95 11:18:23 CDT
+Message-Id: <9505251618.AA16031@tepui.cli.com>
+From: friedman@gnu.ai.mit.edu (Noah Friedman)
+To: chet@po.cwru.edu
+Subject: Bash scripts
+Reply-To: friedman@gnu.ai.mit.edu
+In-Reply-To: <chet@odin.ins.cwru.edu> Thu, 25 May 1995 11:19:59 -0400
+References: <9505251519.AA06424.SM@odin.INS.CWRU.Edu>
+Date: Thu, 25 May 95 11:18:21 CST
+
+>Hi. I snagged some of your bash functions from your home directory on
+>the FSF machines (naughty, I know), and I was wondering if you'd let
+>me distribute them with bash-2.0. Thanks.
+
+Sure. I think there's a later copy in
+~ftp/friedman/shell-inits/init-4.89.tar.gz. There are also some elisp and
+es frobs in that file.
+
+It should serve as a pretty good example of how to get carried away. :-)
+
diff --git a/examples/scripts.noah/README b/examples/scripts.noah/README
new file mode 100644
index 0000000..95272d7
--- /dev/null
+++ b/examples/scripts.noah/README
@@ -0,0 +1,26 @@
+This collection of scripts was originally written for older versions
+of bash by Noah Friedman (friedman@gnu.ai.mit.edu). The conversion
+to bash v2 syntax was done by Chet Ramey.
+
+These scripts are as-is; there is no copyright associated with
+any of them. They exist simply as examples of bash scripting.
+
+Here's a description of what's in this directory:
+
+aref.bash Pseudo-arrays and substring indexing examples.
+bash.sub.bash Library functions used by require.bash.
+bash_version.bash A function to slice up $BASH_VERSION.
+meta.bash Enable and disable eight-bit readline input.
+mktmp.bash Make a temporary file with a unique name.
+number.bash A fun hack to translate numerals into English.
+PERMISSION Permissions to use the scripts in this directory.
+prompt.bash A way to set PS1 to some predefined strings.
+README README
+remap_keys.bash A front end to 'bind' to redo readline bindings.
+require.bash Lisp-like require/provide library functions for bash.
+send_mail.bash Replacement SMTP client written in bash.
+shcat.bash Bash replacement for 'cat(1)'.
+source.bash Replacement for source that uses current directory.
+string.bash The string(3) functions at the shell level.
+stty.bash Front-end to stty(1) that changes readline bindings too.
+y_or_n_p.bash Prompt for a yes/no/quit answer.
diff --git a/examples/scripts.noah/aref.bash b/examples/scripts.noah/aref.bash
new file mode 100644
index 0000000..9b221b8
--- /dev/null
+++ b/examples/scripts.noah/aref.bash
@@ -0,0 +1,44 @@
+# aref.bash --- pseudo-array manipulating routines
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created 1992-07-01
+# Last modified: 1993-02-03
+# Public domain
+
+# Conversion to bash v2 syntax done by Chet Ramey
+
+# Commentary:
+# Code:
+
+#:docstring aref:
+# Usage: aref NAME INDEX
+#
+# In array NAME, access element INDEX (0-origin)
+#:end docstring:
+
+###;;;autoload
+function aref ()
+{
+ local name="$1"
+ local index="$2"
+
+ set -- ${!name}
+ [ $index -ge 1 ] && shift $index
+ echo $1
+}
+
+#:docstring string_aref:
+# Usage: aref STRING INDEX
+#
+# Echo the INDEXth character in STRING (0-origin) on stdout.
+#:end docstring:
+
+###;;;autoload
+function string_aref ()
+{
+ local stuff=${1:$2}
+ echo ${stuff:0:1}
+}
+
+provide aref
+
+# aref.bash ends here
diff --git a/examples/scripts.noah/bash.sub.bash b/examples/scripts.noah/bash.sub.bash
new file mode 100644
index 0000000..2504459
--- /dev/null
+++ b/examples/scripts.noah/bash.sub.bash
@@ -0,0 +1,28 @@
+# bash.sub.bash --- stub for standalone shell scripts using bash library
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1992-07-13
+# Last modified: 1993-09-29
+# Public domain
+
+#:docstring bash.sub:
+# Standard subroutines for bash scripts wishing to use "require" to load
+# libraries.
+#
+# Usage: In each directory where a bash script that uses this script
+# exists, place a copy of this script. Then, at the top of such scripts,
+# put the command
+#
+# source ${0%/*}/bash.sub || exit 1
+#
+# Then you can use `require' to load packages.
+#
+#:end docstring:
+
+default_FPATH="~friedman/etc/init/bash/functions/lib"
+
+source "${default_FPATH}/feature"
+REQUIRE_FAILURE_FATAL=t
+
+FPATH="${FPATH-${default_FPATH}}"
+
+# bash.sub.bash ends here
diff --git a/examples/scripts.noah/bash_version.bash b/examples/scripts.noah/bash_version.bash
new file mode 100644
index 0000000..4ea737b
--- /dev/null
+++ b/examples/scripts.noah/bash_version.bash
@@ -0,0 +1,42 @@
+# bash_version.bash --- get major and minor components of bash version number
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-01-26
+# Last modified: 1993-01-26
+# Public domain
+
+# Converted to bash v2 syntax by Chet Ramey
+
+# Commentary:
+# Code:
+
+#:docstring bash_version:
+# Usage: bash_version {major|minor}
+#
+# Echo the major or minor number of this version of bash on stdout, or
+# just echo $BASH_VERSION if no argument is given.
+#:end docstring:
+
+###;;;autoload
+function bash_version ()
+{
+ local major minor
+
+ case "$1" in
+ major) echo "${BASH_VERSION/.*/}" ;;
+ minor) major="${BASH_VERSION/.*/}"
+ minor="${BASH_VERSION#${major}.}"
+ echo "${minor%%.*}" ;;
+ patchlevel) minor="${BASH_VERSION#*.*.}"
+ echo "${minor%(*}" ;;
+ version) minor=${BASH_VERSION/#*.*./}
+ echo ${BASH_VERSION/%.$minor/} ;;
+ release) echo ${BASH_VERSION%(*} ;;
+ build) minor="${BASH_VERSION#*.*.*(}"
+ echo ${minor%)} ;;
+ *) echo "${BASH_VERSION}" ;;
+ esac
+}
+
+provide bash_version
+
+# bash_version.bash ends here
diff --git a/examples/scripts.noah/meta.bash b/examples/scripts.noah/meta.bash
new file mode 100644
index 0000000..6121726
--- /dev/null
+++ b/examples/scripts.noah/meta.bash
@@ -0,0 +1,37 @@
+# meta.bash --- meta key frobnications
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1992-06-28
+# Last modified: 1993-01-26
+# Public domain
+
+# Commentary:
+# Code:
+
+#:docstring meta:
+# Usage: meta [on|off]
+#
+# An argument of "on" will make bash use the 8th bit of any input from
+# a terminal as a "meta" bit, i.e bash will be able to use a real meta
+# key.
+#
+# An argument of "off" causes bash to disregard the 8th bit, which is
+# assumed to be used for parity instead.
+#:end docstring:
+
+function meta ()
+{
+ case "$1" in
+ on) bind 'set input-meta On'
+ bind 'set output-meta on'
+ bind 'set convert-meta off' ;;
+ off) bind 'set input-meta Off'
+ bind 'set output-meta off'
+ bind 'set convert-meta on' ;;
+ *) echo "Usage: meta [on|off]" 1>&2 ; return 1 ;;
+ esac
+ return 0
+}
+
+provide meta
+
+# meta.bash ends here
diff --git a/examples/scripts.noah/mktmp.bash b/examples/scripts.noah/mktmp.bash
new file mode 100644
index 0000000..3ea43ad
--- /dev/null
+++ b/examples/scripts.noah/mktmp.bash
@@ -0,0 +1,66 @@
+# mktmp.bash
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-02-03
+# Last modified: 1993-02-03
+# Public domain
+
+# Conversion to bash v2 syntax done by Chet Ramey
+
+# Commentary:
+# Code:
+
+#:docstring mktmp:
+# Usage: mktmp [template] {createp}
+#
+# Generate a unique filename from TEMPLATE by appending a random number to
+# the end.
+#
+# If optional 2nd arg CREATEP is non-null, file will be created atomically
+# before returning. This is to avoid the race condition that in between
+# the time that the temporary name is returned and the caller uses it,
+# someone else creates the file.
+#:end docstring:
+
+###;;;autoload
+function mktmp ()
+{
+ local template="$1"
+ local tmpfile="${template}${RANDOM}"
+ local createp="$2"
+ local noclobber_status
+
+ case "$-" in
+ *C*) noclobber_status=set;;
+ esac
+
+ if [ "${createp:+set}" = "set" ]; then
+ # Version which creates file atomically through noclobber test.
+ set -o noclobber
+ (> "${tmpfile}") 2> /dev/null
+ while [ $? -ne 0 ] ; do
+ # Detect whether file really exists or creation lost because of
+ # some other permissions problem. If the latter, we don't want
+ # to loop forever.
+ if [ ! -e "${tmpfile}" ]; then
+ # Trying to create file again creates stderr message.
+ echo -n "mktmp: " 1>&2
+ > "${tmpfile}"
+ return 1
+ fi
+ tmpfile="${template}${RANDOM}"
+ (> "${tmpfile}") 2> /dev/null
+ done
+ test "${noclobber_status}" != "set" && set +o noclobber
+ else
+ # Doesn't create file, so it introduces race condition for caller.
+ while [ -e "${tmpfile}" ]; do
+ tmpfile="${template}${RANDOM}"
+ done
+ fi
+
+ echo "${tmpfile}"
+}
+
+provide mktmp
+
+# mktmp.bash ends here
diff --git a/examples/scripts.noah/number.bash b/examples/scripts.noah/number.bash
new file mode 100644
index 0000000..37b62b6
--- /dev/null
+++ b/examples/scripts.noah/number.bash
@@ -0,0 +1,185 @@
+# number.bash
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-02-22
+# Last modified: 1993-04-01
+# Public domain
+
+# Conversion to bash v2 syntax done by Chet Ramey
+
+# Commentary:
+# Code:
+
+#:docstring number:
+# Usage: number [number]
+#
+# Converts decimal integers to english notation. Spaces and commas are
+# optional. Numbers 67 digits and larger will overflow this script.
+#
+# E.g: number 99,000,000,000,000,454
+# => ninety-nine quadrillion four hundred fifty-four
+#
+#:end docstring:
+
+function number ()
+{
+ local result
+ local val1
+ local val2
+ local val3
+ local d1
+ local d2
+ local d3
+
+ case "$*" in
+ *[!0-9,.]* )
+ echo "number: invalid character in argument." 1>&2
+ return 1
+ ;;
+ *.* )
+ echo "number: fractions not supported (yet)." 1>&2
+ return 1
+ ;;
+ esac
+
+ result=''
+
+ eval set - "`echo ${1+\"$@\"} | sed -n -e '
+ s/[, ]//g;s/^00*/0/g;s/\(.\)\(.\)\(.\)$/\"\1 \2 \3\"/;
+ :l
+ /[0-9][0-9][0-9]/{
+ s/\([^\" ][^\" ]*\)\([^\" ]\)\([^\" ]\)\([^\" ]\)/\1\"\2 \3 \4\"/g;
+ t l
+ }
+ /^[0-9][0-9][0-9]/s/\([^\" ]\)\([^\" ]\)\([^\" ]\)/\"\1 \2 \3\"/;
+ /^[0-9][0-9]/s/\([^\" ]\)\([^\" ]\)/\"\1 \2\"/;
+ /^[0-9]/s/^\([^\" ][^\" ]*\)/\"\1\"/g;s/\"\"/\" \"/g;p;'`"
+
+ while test $# -ne 0 ; do
+ eval `set - $1;
+ d3='' d2='' d1=''
+ case $# in
+ 1 ) d1=$1 ;;
+ 2 ) d2=$1 d1=$2 ;;
+ 3 ) d3=$1 d2=$2 d1=$3 ;;
+ esac
+ echo "d3=\"${d3}\" d2=\"${d2}\" d1=\"${d1}\""`
+
+ val1='' val2='' val3=''
+
+ case "${d3}" in
+ '1' ) val3='one' ;;
+ '2' ) val3='two' ;;
+ '3' ) val3='three' ;;
+ '4' ) val3='four' ;;
+ '5' ) val3='five' ;;
+ '6' ) val3='six' ;;
+ '7' ) val3='seven' ;;
+ '8' ) val3='eight' ;;
+ '9' ) val3='nine' ;;
+ esac
+
+ case "${d2}" in
+ '1' ) val2='teen' ;;
+ '2' ) val2='twenty' ;;
+ '3' ) val2='thirty' ;;
+ '4' ) val2='forty' ;;
+ '5' ) val2='fifty' ;;
+ '6' ) val2='sixty' ;;
+ '7' ) val2='seventy' ;;
+ '8' ) val2='eighty' ;;
+ '9' ) val2='ninety' ;;
+ esac
+
+ case "${val2}" in
+ 'teen')
+ val2=''
+ case "${d1}" in
+ '0') val1='ten' ;;
+ '1') val1='eleven' ;;
+ '2') val1='twelve' ;;
+ '3') val1='thirteen' ;;
+ '4') val1='fourteen' ;;
+ '5') val1='fifteen' ;;
+ '6') val1='sixteen' ;;
+ '7') val1='seventeen' ;;
+ '8') val1='eighteen' ;;
+ '9') val1='nineteen' ;;
+ esac
+ ;;
+ 0 ) : ;;
+ * )
+ if test ".${val2}" != '.' && test ".${d1}" != '.0' ; then
+ val2="${val2}-"
+ fi
+ case "${d1}" in
+ '0') val2="${val2} " ;;
+ '1') val1='one' ;;
+ '2') val1='two' ;;
+ '3') val1='three' ;;
+ '4') val1='four' ;;
+ '5') val1='five' ;;
+ '6') val1='six' ;;
+ '7') val1='seven' ;;
+ '8') val1='eight' ;;
+ '9') val1='nine' ;;
+ esac
+ ;;
+ esac
+
+ if test ".${val3}" != '.' ; then
+ result="${result}${val3} hundred "
+ fi
+
+ if test ".${val2}" != '.' ; then
+ result="${result}${val2}"
+ fi
+
+ if test ".${val1}" != '.' ; then
+ result="${result}${val1} "
+ fi
+
+ if test ".${d1}${d2}${d3}" != '.000' ; then
+ case $# in
+ 0 | 1 ) ;;
+ 2 ) result="${result}thousand " ;;
+ 3 ) result="${result}million " ;;
+ 4 ) result="${result}billion " ;;
+ 5 ) result="${result}trillion " ;;
+ 6 ) result="${result}quadrillion " ;;
+ 7 ) result="${result}quintillion " ;;
+ 8 ) result="${result}sextillion " ;;
+ 9 ) result="${result}septillion " ;;
+ 10 ) result="${result}octillion " ;;
+ 11 ) result="${result}nonillion " ;;
+ 12 ) result="${result}decillion " ;;
+ 13 ) result="${result}undecillion " ;;
+ 14 ) result="${result}duodecillion " ;;
+ 15 ) result="${result}tredecillion " ;;
+ 16 ) result="${result}quattuordecillion " ;;
+ 17 ) result="${result}quindecillion " ;;
+ 18 ) result="${result}sexdecillion " ;;
+ 19 ) result="${result}septendecillion " ;;
+ 20 ) result="${result}octodecillion " ;;
+ 21 ) result="${result}novemdecillion " ;;
+ 22 ) result="${result}vigintillion " ;;
+ * )
+ echo "Error: number too large (66 digits max)." 1>&2
+ return 1
+ ;;
+ esac
+ fi
+
+ shift
+ done
+
+ set - ${result}
+ case "$*" in
+ '') set - 'zero' ;;
+ esac
+
+ echo ${1+"$@"}
+}
+
+provide number
+
+# number.bash ends here
diff --git a/examples/scripts.noah/prompt.bash b/examples/scripts.noah/prompt.bash
new file mode 100644
index 0000000..3dc25a9
--- /dev/null
+++ b/examples/scripts.noah/prompt.bash
@@ -0,0 +1,40 @@
+# prompt.bash
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1992-01-15
+# Public domain
+
+# $Id: prompt.bash,v 1.2 1994/10/18 16:34:35 friedman Exp $
+
+# Commentary:
+# Code:
+
+#:docstring prompt:
+# Usage: prompt [chars]
+#
+# Various preformatted prompt strings selected by argument. For a
+# list of available arguments and corresponding formats, do
+# `type prompt'.
+#:end docstring:
+
+###;;;autoload
+function prompt ()
+{
+ case "$1" in
+ d) PS1='$(dirs) \$ ' ;;
+ n) PS1='\$ ' ;;
+ hsw) PS1='\h[$SHLVL]: \w \$ ' ;;
+ hw) PS1='\h: \w \$ ' ;;
+ sh) PS1='[$SHLVL] \h\$ ' ;;
+ sw) PS1='[$SHLVL] \w \$ ' ;;
+ uh) PS1='\u@\h\$ ' ;;
+ uhsHw) PS1='\u@\h[$SHLVL]:\#: \w \$ ' ;;
+ uhsw) PS1='\u@\h[$SHLVL]: \w \$ ' ;;
+ uhw) PS1='\u@\h: \w \$ ' ;;
+ uw) PS1='(\u) \w \$ ' ;;
+ w) PS1='\w \$ ' ;;
+ esac
+}
+
+provide prompt
+
+# prompt.bash ends here
diff --git a/examples/scripts.noah/remap_keys.bash b/examples/scripts.noah/remap_keys.bash
new file mode 100644
index 0000000..aa7c463
--- /dev/null
+++ b/examples/scripts.noah/remap_keys.bash
@@ -0,0 +1,71 @@
+# remap_keybindings.bash
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1992-01-11
+# Last modified: 1993-02-03
+# Public domain
+
+# Conversion to bash v2 syntax done by Chet Ramey
+
+# Commentary:
+# Code:
+
+#:docstring remap_keybindings:
+# Usage: remap_keybindings old_function new_function
+#
+# Clear all readline keybindings associated with OLD_FUNCTION (a Readline
+# function) rebinding them to NEW_FUNCTION (`self-insert' by default)
+#
+# This requires bash version 1.10 or newer, since previous versions did not
+# implement the `bind' builtin.
+#:end docstring:
+
+###;;;autoload
+function remap_keybindings ()
+{
+ local unbind_function="$1"
+ local bind_function="${2:-'self-insert'}"
+ local bind_output
+ local arg
+
+ # If they're the same thing, the work has already been done. :-)
+ if [ "${unbind_function}" = "${bind_function}" ]; then
+ return 0
+ fi
+
+ while : ; do
+ bind_output="$(bind -q ${unbind_function} 2> /dev/null)"
+
+ case "${bind_output}" in
+ "${unbind_function} can be invoked via"* ) ;;
+ "" ) return 1 ;; # probably bad argument to bind
+ *) return 0 ;; # unbound
+ esac
+
+ # Format of bind_output is like:
+ # 'quoted-insert can be invoked via "\C-q", "\C-v".'
+ # 'self-insert can be invoked via " ", "!", """, "$", "%", ...'
+ set -- ${bind_output}
+ shift 5
+
+ for arg in "$@" ; do
+ # strip off trailing `.' or `,'
+ arg=${arg%.};
+ arg=${arg%,};
+
+ case ${arg} in
+ ..)
+ # bind -q didn't provide whole list of key bindings; jump
+ # to top loop to get more
+ continue 2 ;
+ ;;
+ *)
+ bind "${arg}: ${bind_function}"
+ ;;
+ esac
+ done
+ done
+}
+
+provide remap_keybindings
+
+# remap_keybindings.bash ends here
diff --git a/examples/scripts.noah/require.bash b/examples/scripts.noah/require.bash
new file mode 100644
index 0000000..f38040a
--- /dev/null
+++ b/examples/scripts.noah/require.bash
@@ -0,0 +1,182 @@
+# require.bash
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1992-07-08
+# Last modified: 1993-09-29
+# Public domain
+
+# Commentary:
+
+# These functions provide an interface based on the lisp implementation for
+# loading libraries when they are needed and eliminating redundant loading.
+# The basic idea is that each "package" (or set of routines, even if it is
+# only one function) registers itself with a symbol that marks a "feature"
+# as being "provided". If later you "require" a given feature, you save
+# yourself the trouble of explicitly loading it again.
+#
+# At the bottom of each package, put a "provide foobar", so when another
+# package has a "require foobar", it gets loaded and registered as a
+# "feature" that won't need to get loaded again. (See warning below for
+# reasons why provide should be put at the end.)
+#
+# The list of provided features are kept in the `FEATURES' variable, which
+# is not exported. Care should be taken not to munge this in the shell.
+# The search path comes from a colon-separated `FPATH' variable. It has no
+# default value and must be set by the user.
+#
+# Require uses `fpath_search', which works by scanning all of FPATH for a
+# file named the same as the required symbol but with a `.bash' appended to
+# the name. If that is found, it is loaded. If it is not, FPATH is
+# searched again for a file name the same as the feature (i.e. without any
+# extension). Fpath_search may be useful for doing library filename
+# lookups in other functions (such as a `load' or `autoload' function).
+#
+# Warning: Because require ultimately uses the builtin `source' command to
+# read in files, it has no way of undoing the commands contained in the
+# file if there is an error or if no provide statement appeared (this
+# differs from the lisp implementation of require, which normally undoes
+# most of the forms that were loaded if the require fails). Therefore, to
+# minize the number of problems caused by requiring a faulty package (such
+# as syntax errors in the source file) it is better to put the provide at
+# the end of the file, rather than at the beginning.
+
+# Code:
+
+# Exporting this variable would cause considerable lossage, since none of
+# the functions are exported (or at least, they're not guaranteed to be)
+export -n FEATURES
+
+#:docstring :
+# Null function. Provided only so that one can put page breaks in source
+# files without any ill effects.
+#:end docstring:
+#
+# (\\014 == C-l)
+eval "function $(echo -e \\014) () { : }"
+
+
+#:docstring featurep:
+# Usage: featurep argument
+#
+# Returns 0 (true) if argument is a provided feature. Returns 1 (false)
+# otherwise.
+#:end docstring:
+
+###;;;autoload
+function featurep ()
+{
+ local feature="$1"
+
+ case " ${FEATURES} " in
+ *" ${feature} "* ) return 0 ;;
+ esac
+
+ return 1
+}
+
+
+#:docstring provide:
+# Usage: provide symbol ...
+#
+# Register a list of symbols as provided features
+#:end docstring:
+
+###;;;autoload
+function provide ()
+{
+ local feature
+
+ for feature in "$@" ; do
+ if ! featurep "${feature}" ; then
+ FEATURES="${FEATURES} ${feature}"
+ fi
+ done
+
+ return 0
+}
+
+
+#:docstring require:
+# Usage: require feature {file}
+#
+# Load FEATURE if it is not already provided. Note that require does not
+# call `provide' to register features. The loaded file must do that
+# itself. If the package does not explicitly do a `provide' after being
+# loaded, require will complain about the feature not being provided on
+# stderr.
+#
+# Optional argument FILE means to try to load FEATURE from FILE. If no
+# file argument is given, require searches through FPATH (see fpath_search)
+# for the appropriate file.
+#
+# If the variable REQUIRE_FAILURE_FATAL is set, require will cause the
+# current shell invocation to exit, rather than merely return. This may be
+# useful for a shell script that vitally depends on a package.
+#
+#:end docstring:
+
+###;;;autoload
+function require ()
+{
+ local feature="$1"
+ local path="$2"
+ local file
+
+ if ! featurep "${feature}" ; then
+ file=$(fpath_search "${feature}" "${path}") && source "${file}"
+
+ if ! featurep "${feature}" ; then
+ echo "require: ${feature}: feature was not provided." 1>&2
+ if [ "${REQUIRE_FAILURE_FATAL+set}" = "set" ]; then
+ exit 1
+ fi
+ return 1
+ fi
+ fi
+
+ return 0
+}
+
+#:docstring fpath_search:
+# Usage: fpath_search filename {path ...}
+#
+# Search $FPATH for `filename' or, if `path' (a list) is specified, search
+# those directories instead of $FPATH. First the path is searched for an
+# occurrence of `filename.bash, then a second search is made for just
+# `filename'.
+#:end docstring:
+
+###;;;autoload
+function fpath_search ()
+{
+ local name="$1"
+ local path="$2"
+ local suffix=".bash"
+ local file
+
+ if [ -z "${path}" ]; then path="${FPATH}"; fi
+
+ for file in "${name}${suffix}" "${name}" ; do
+ set -- $(IFS=':'
+ set -- ${path}
+ for p in "$@" ; do
+ echo -n "${p:-.} "
+ done)
+
+ while [ $# -ne 0 ]; do
+ test -f "${1}/${file}" && { file="${1}/${file}"; break 2 }
+ shift
+ done
+ done
+
+ if [ $# -eq 0 ]; then
+ echo "fpath_search: ${name}: file not found in fpath" 1>&2
+ return 1
+ fi
+
+ echo "${file}"
+ return 0
+}
+
+provide require
+
+# require.bash ends here
diff --git a/examples/scripts.noah/send_mail.bash b/examples/scripts.noah/send_mail.bash
new file mode 100644
index 0000000..24a1220
--- /dev/null
+++ b/examples/scripts.noah/send_mail.bash
@@ -0,0 +1,140 @@
+# send_mail.bash
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1992-07-02
+# Public domain
+
+# Commentary:
+
+# TODO: implement Fcc headers (see emacs manual)
+
+# Code:
+
+#:docstring send_mail:
+# Usage: send_mail
+#
+# This function serves as a simple replacement for sendmail as a client
+# interface on those systems where it is not available. It does assume
+# that one can talk to an SMTP mailer on port 25 either on the local host
+# or on the host specified by the MAILHOST environment variable. If you
+# have access to sendmail, it's better to use 'sendmail -t' instead of this
+# script (which probably isn't as robust).
+#
+# Message is read from stdin, and headers are parsed to determine
+# recipients.
+#:end docstring:
+
+###;;;autoload
+function send_mail ()
+{
+ # Need gawk, since several extensions are taken advantage of (like
+ # IGNORECASE for regexps).
+ local awk="${GAWK_LOCATION:-gawk}"
+ local DefaultFrom="${USER:-${LOGNAME}}"
+ local From
+ local To
+ local Cc
+ local Bcc
+ local tmpfile="/tmp/send_mail$$"
+
+ while [ -e "${tmpfile}" ]; do
+ tmpfile="/tmp/send_mail${RANDOM}"
+ done
+
+ # Lines consisting only of dots need one more dot appended. SMTP
+ # servers eat one of the dots (and if only 1 dot appears, it signifies
+ # the end of the message).
+ sed '/^\.\.*/s/^\(\.\.*\)$/\1./' > "${tmpfile}"
+
+ # Parse mail headers in message to extract recipients list.
+ # This doesn't affect what the user sees---it's only used to generate
+ # the rcpt-to lines for SMTP.
+ eval $(${awk} -f - "${tmpfile}" <<- '__EOF__'
+ # Try to extract email address from amidst random data
+ function parse_address (data)
+ {
+ # From: "real name" <foobar@host>
+ # From: "" <foobar@host>
+ if (match(data, /^\"[^\"]*\"[ \t]*<.*>/)) {
+ data_idx = match(data, /^\"[^\"]*\"[ \t]*</)
+ data = substr(data, RSTART + RLENGTH);
+ if (data_idx = match(data, ">.*"))
+ data = substr(data, 1, RSTART - 1);
+ return data
+ }
+ # From: real name <foobar@host>
+ if (match(data, /<.*>/)) {
+ data_idx = match(data, /</)
+ data = substr(data, RSTART + RLENGTH);
+ if (data_idx = match(data, ">"))
+ data = substr(data, 1, RSTART - 1);
+ return data
+ }
+ # From: foobar@host (real name)
+ if (match(data, /\(.*\)/)) {
+ data_idx = match(data, /\(/);
+ data = substr(data, 1, RSTART - 1);
+ return data
+ }
+ # (hopefully) From: foobar@host
+ return data
+ }
+
+ BEGIN { IGNORECASE = 1; }
+
+ # Blank line signifies end of headers, so we can stop looking.
+ /^$/ { exit(0) }
+
+ /^from:|^to:|^cc:|^bcc:/ {
+ header_idx = match($0, /^[^:]*:/)
+ if (header_idx) {
+ # Capitalize header name
+ header_firstchar = toupper(substr($0, RSTART, 1));
+ header_rest = tolower(substr($0, RSTART + 1, RLENGTH - 2));
+ header = header_firstchar header_rest
+
+ $0 = substr($0, RSTART + RLENGTH + 1);
+ addresses = ""
+ # parse addresses
+ while ($0) {
+ # Strip leading whitespace
+ if (idx = match($0, /[ \t]*/))
+ $0 = substr($0, RSTART + RLENGTH);
+
+ # Find everything up to a nonquoted comma
+ # FIXME: doesnt handle quoting yet
+ if (idx = match($0, /,/)) {
+ data = substr($0, 1, RSTART);
+ $0 = substr($0, RSTART + 1);
+ } else {
+ data = $0
+ $0 = ""
+ }
+ addresses = addresses " " parse_address(data)
+ }
+
+ printf("%s='%s'\n", header, addresses);
+ }
+ }
+ __EOF__)
+
+ # Not sure if an address is *required* after the HELO.. every sendmail
+ # I tried talking to didn't seem to care. Some sendmails don't care
+ # if there's a HELO at all.
+ cat <<- __EOF__ | telnet ${MAILHOST:-localhost} 25 > /dev/null 2>&1
+ HELO
+ mail from: ${From:-${DefaultFrom}}
+ $(for name in ${To} ${Cc} ${Bcc} ; do
+ echo "rcpt to: ${name}"
+ done)
+ data
+ $(cat "${tmpfile}")
+ .
+ quit
+ __EOF__
+
+ rm -f "${tmpfile}"
+}
+
+provide send_mail
+
+# send_mail.bash ends here
diff --git a/examples/scripts.noah/shcat.bash b/examples/scripts.noah/shcat.bash
new file mode 100644
index 0000000..5d9e96d
--- /dev/null
+++ b/examples/scripts.noah/shcat.bash
@@ -0,0 +1,49 @@
+# shcat.bash
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1992-07-17
+# Last modified: 1993-09-29
+# Public domain
+
+# Conversion to bash v2 syntax done by Chet Ramey
+
+# Commentary:
+# Code:
+
+#:docstring shcat:
+# Usage: shcat {file1} {file2} {...}
+#
+# Like `cat', only this is all inline bash.
+#:end docstring:
+
+###;;;autoload
+function shcat ()
+{
+ local IFS=""
+ local line
+ local file
+ local exitstat=0
+
+ if [ $# -eq 0 ]; then
+ while read -r line; do
+ echo "${line}"
+ done
+ return 0
+ else
+ for file in "$@" ; do
+ if [ -r "${file}" ]; then
+ while read -r line; do
+ echo "${line}"
+ done < "${file}"
+ else
+ # This will cause the error to be printed on stderr
+ < "${file}"
+ exitstat=1
+ fi
+ done
+ return ${exitstat}
+ fi
+}
+
+provide shcat
+
+# shcat.bash ends here
diff --git a/examples/scripts.noah/source.bash b/examples/scripts.noah/source.bash
new file mode 100644
index 0000000..2b36489
--- /dev/null
+++ b/examples/scripts.noah/source.bash
@@ -0,0 +1,63 @@
+# source.bash
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1992-05-17
+# Last modified: 1993-09-29
+# Public domain
+
+# Commentary:
+# Code:
+
+#:docstring source:
+# Usage: source file ...
+#
+# Source forces file arguments to be considered in the current directory
+# only, unless there is an absolute path starting with `/'. I think it's
+# bad that the builtin "source" searches PATH, because PATH normally
+# contains directories with binary files that aren't useful for bash to
+# read and most people don't put "." first in their path.
+#
+# This "source" is capable of reading more than one file at a time. Return
+# value is number of failed source attempts.
+#:end docstring:
+
+# This function is not hygienic, but there's not much we can do about
+# variable name conflicts here.
+
+###;;;autoload
+function source ()
+{
+ local -i _source_failure_count=0
+ local _source_file
+
+ for _source_file ; do
+ # Check first part of each filename. If it's not `/', `./', or
+ # `../' then prepend "./" to the path to force the builtin `source'
+ # not to go searching through PATH to find the file.
+ case "${_source_file}" in
+ /*|./*|../* ) ;;
+ * ) _source_file="./${_source_file}" ;;
+ esac
+
+ builtin source "${_source_file}" ||
+ _source_failure_count="_source_failure_count + 1"
+
+ done
+
+ return ${_source_failure_count}
+}
+
+#:docstring .:
+# See "source"
+#:end docstring:
+
+# So that `.' will call function definition of `source' instead of builtin
+
+###;;;autoload
+function . ()
+{
+ source "$@"
+}
+
+provide source
+
+# source.bash ends here
diff --git a/examples/scripts.noah/string.bash b/examples/scripts.noah/string.bash
new file mode 100644
index 0000000..d80ebe8
--- /dev/null
+++ b/examples/scripts.noah/string.bash
@@ -0,0 +1,226 @@
+# string.bash --- bash emulation of string(3) library routines
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1992-07-01
+# Last modified: 1993-09-29
+# Public domain
+
+# Conversion to bash v2 syntax done by Chet Ramey
+
+# Commentary:
+# Code:
+
+#:docstring strcat:
+# Usage: strcat s1 s2
+#
+# Strcat appends the value of variable s2 to variable s1.
+#
+# Example:
+# a="foo"
+# b="bar"
+# strcat a b
+# echo $a
+# => foobar
+#
+#:end docstring:
+
+###;;;autoload
+function strcat ()
+{
+ local s1_val s2_val
+
+ s1_val=${!1} # indirect variable expansion
+ s2_val=${!2}
+ eval "$1"=\'"${s1_val}${s2_val}"\'
+}
+
+#:docstring strncat:
+# Usage: strncat s1 s2 $n
+#
+# Line strcat, but strncat appends a maximum of n characters from the value
+# of variable s2. It copies fewer if the value of variabl s2 is shorter
+# than n characters. Echoes result on stdout.
+#
+# Example:
+# a=foo
+# b=barbaz
+# strncat a b 3
+# echo $a
+# => foobar
+#
+#:end docstring:
+
+###;;;autoload
+function strncat ()
+{
+ local s1="$1"
+ local s2="$2"
+ local -i n="$3"
+ local s1_val s2_val
+
+ s1_val=${!s1} # indirect variable expansion
+ s2_val=${!s2}
+
+ if [ ${#s2_val} -gt ${n} ]; then
+ s2_val=${s2_val:0:$n} # substring extraction
+ fi
+
+ eval "$s1"=\'"${s1_val}${s2_val}"\'
+}
+
+#:docstring strcmp:
+# Usage: strcmp $s1 $s2
+#
+# Strcmp compares its arguments and returns an integer less than, equal to,
+# or greater than zero, depending on whether string s1 is lexicographically
+# less than, equal to, or greater than string s2.
+#:end docstring:
+
+###;;;autoload
+function strcmp ()
+{
+ [ "$1" = "$2" ] && return 0
+
+ [ "${1}" '<' "${2}" ] > /dev/null && return -1
+
+ return 1
+}
+
+#:docstring strncmp:
+# Usage: strncmp $s1 $s2 $n
+#
+# Like strcmp, but makes the comparison by examining a maximum of n
+# characters (n less than or equal to zero yields equality).
+#:end docstring:
+
+###;;;autoload
+function strncmp ()
+{
+ if [ -z "${3}" ] || [ "${3}" -le "0" ]; then
+ return 0
+ fi
+
+ if [ ${3} -ge ${#1} ] && [ ${3} -ge ${#2} ]; then
+ strcmp "$1" "$2"
+ return $?
+ else
+ s1=${1:0:$3}
+ s2=${2:0:$3}
+ strcmp $s1 $s2
+ return $?
+ fi
+}
+
+#:docstring strlen:
+# Usage: strlen s
+#
+# Strlen returns the number of characters in string literal s.
+#:end docstring:
+
+###;;;autoload
+function strlen ()
+{
+ eval echo "\${#${1}}"
+}
+
+#:docstring strspn:
+# Usage: strspn $s1 $s2
+#
+# Strspn returns the length of the maximum initial segment of string s1,
+# which consists entirely of characters from string s2.
+#:end docstring:
+
+###;;;autoload
+function strspn ()
+{
+ # Unsetting IFS allows whitespace to be handled as normal chars.
+ local IFS=
+ local result="${1%%[!${2}]*}"
+
+ echo ${#result}
+}
+
+#:docstring strcspn:
+# Usage: strcspn $s1 $s2
+#
+# Strcspn returns the length of the maximum initial segment of string s1,
+# which consists entirely of characters not from string s2.
+#:end docstring:
+
+###;;;autoload
+function strcspn ()
+{
+ # Unsetting IFS allows whitspace to be handled as normal chars.
+ local IFS=
+ local result="${1%%[${2}]*}"
+
+ echo ${#result}
+}
+
+#:docstring strstr:
+# Usage: strstr s1 s2
+#
+# Strstr echoes a substring starting at the first occurrence of string s2 in
+# string s1, or nothing if s2 does not occur in the string. If s2 points to
+# a string of zero length, strstr echoes s1.
+#:end docstring:
+
+###;;;autoload
+function strstr ()
+{
+ # if s2 points to a string of zero length, strstr echoes s1
+ [ ${#2} -eq 0 ] && { echo "$1" ; return 0; }
+
+ # strstr echoes nothing if s2 does not occur in s1
+ case "$1" in
+ *$2*) ;;
+ *) return 1;;
+ esac
+
+ # use the pattern matching code to strip off the match and everything
+ # following it
+ first=${1/$2*/}
+
+ # then strip off the first unmatched portion of the string
+ echo "${1##$first}"
+}
+
+#:docstring strtok:
+# Usage: strtok s1 s2
+#
+# Strtok considers the string s1 to consist of a sequence of zero or more
+# text tokens separated by spans of one or more characters from the
+# separator string s2. The first call (with a non-empty string s1
+# specified) echoes a string consisting of the first token on stdout. The
+# function keeps track of its position in the string s1 between separate
+# calls, so that subsequent calls made with the first argument an empty
+# string will work through the string immediately following that token. In
+# this way subsequent calls will work through the string s1 until no tokens
+# remain. The separator string s2 may be different from call to call.
+# When no token remains in s1, an empty value is echoed on stdout.
+#:end docstring:
+
+###;;;autoload
+function strtok ()
+{
+ :
+}
+
+#:docstring strtrunc:
+# Usage: strtrunc $n $s1 {$s2} {$...}
+#
+# Used by many functions like strncmp to truncate arguments for comparison.
+# Echoes the first n characters of each string s1 s2 ... on stdout.
+#:end docstring:
+
+###;;;autoload
+function strtrunc ()
+{
+ n=$1 ; shift
+ for z; do
+ echo "${z:0:$n}"
+ done
+}
+
+provide string
+
+# string.bash ends here
diff --git a/examples/scripts.noah/stty.bash b/examples/scripts.noah/stty.bash
new file mode 100644
index 0000000..611d970
--- /dev/null
+++ b/examples/scripts.noah/stty.bash
@@ -0,0 +1,64 @@
+# stty.bash
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1992-01-11
+# Last modified: 1993-09-29
+# Public domain
+
+# Conversion to bash v2 syntax done by Chet Ramey
+
+# Commentary:
+# Code:
+
+require remap_keybindings
+
+#:docstring stty:
+# Track changes to certain keybindings with stty, and make those changes
+# reflect in bash's readline bindings as well.
+#
+# This requires bash version 1.10 or newer, since previous versions did not
+# implement the `bind' builtin.
+#:end docstring:
+
+###;;;autoload
+function stty ()
+{
+ local erase="backward-delete-char"
+ local kill="unix-line-discard"
+ local werase="backward-kill-word"
+ local lnext="quoted-insert"
+ local readline_function=""
+ local key=""
+ local stty_command=""
+
+ while [ $# -gt 0 ]; do
+ case "$1" in
+ erase | kill | werase | lnext )
+ key=$(echo "${2}" | cat -v | sed 's/\^/\\C-/')
+ readline_function=$(eval echo \$${1})
+
+ # Get rid of any current bindings; the whole point of this
+ # function is to make the distinction between readline
+ # bindings and particular cbreak characters transparent; old
+ # readline keybindings shouldn't hang around.
+ # could use bind -r here instead of binding to self-insert
+ remap_keybindings "${readline_function}" "self-insert"
+
+ # Bind new key to appropriate readline function
+ bind "\"${key}\": ${readline_function}"
+
+ stty_command="${stty_command} ${1} ${2}"
+ shift 2
+ ;;
+ *)
+ stty_command="${stty_command} ${1}"
+ shift
+ ;;
+ esac
+ done
+
+ command stty ${stty_command}
+}
+
+provide stty
+
+# stty.bash ends here
diff --git a/examples/scripts.noah/y_or_n_p.bash b/examples/scripts.noah/y_or_n_p.bash
new file mode 100644
index 0000000..2674a29
--- /dev/null
+++ b/examples/scripts.noah/y_or_n_p.bash
@@ -0,0 +1,78 @@
+# y_or_n_p.bash
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1992-06-18
+# Last modified: 1993-03-01
+# Public domain
+
+# Conversion to bash v2 syntax done by Chet Ramey
+
+# Commentary:
+# Code:
+
+#:docstring y_or_n_p:
+# Usage: y_or_n_p QUERY
+#
+# Print QUERY on stderr, then read stdin for a y-or-n response. Actually,
+# user may type anything they like, but first character must be a `y', `n',
+# `q', or `!', otherwise the question is repeated until such an answer is
+# obtained.
+#
+# If user typed `y', y_or_n_p returns 0.
+#
+# If user typed `n', y_or_n_p returns 1.
+#
+# If user typed `!', y_or_n_p returns 2. This is an indication to the
+# caller that no more queries should be made. Assume `y' for all the rest.
+#
+# If user typed `q', y_or_n_p returns 3. This is an indication to the
+# caller that no more queries should be made. Assume `n' for all the rest.
+#
+#:end docstring:
+
+###;;;autoload
+function y_or_n_p ()
+{
+ local ans
+
+ [ ! -t 0 ] && return 1
+
+ while read -p "$*" -e ans ; do
+ case "${ans}" in
+ y* | Y* ) return 0 ;;
+ n* | N* ) return 1 ;;
+ \! ) return 2 ;;
+ q* | Q* ) return 3 ;;
+ *) echo "Please answer one of \`y', \`n', \`q', or \`"\!"'" 1>&2 ;;
+ esac
+ done
+}
+
+#:docstring yes_or_no_p:
+# Usage: yes_or_no_p QUERY
+#
+# Like y_or_n_p, but require a full `yes', `no', `yes!', or `quit' response.
+#:end docstring:
+
+###;;;autoload
+function yes_or_no_p ()
+{
+ local ans
+
+ [ ! -t 0 ] && return 3
+
+ while read -p "$*" -e ans; do
+ ans="$(echo ${ans} | tr '[A-Z]' '[a-z]')"
+
+ case "${ans}" in
+ yes ) return 0 ;;
+ no ) return 1 ;;
+ yes\! ) return 2 ;;
+ quit ) return 3 ;;
+ *) echo "Please answer \`yes', \`no', \`yes"\!"', or \`quit'" 1>&2 ;;
+ esac
+ done
+}
+
+provide y_or_n_p
+
+# y_or_n_p.bash ends here
diff --git a/examples/scripts.v2/PERMISSION b/examples/scripts.v2/PERMISSION
new file mode 100644
index 0000000..f65e848
--- /dev/null
+++ b/examples/scripts.v2/PERMISSION
@@ -0,0 +1,59 @@
+From spcecdt@armory.com Wed May 10 10:21:11 1995
+Flags: 10
+Return-Path: spcecdt@armory.com
+Received: from po.cwru.edu (root@po.CWRU.Edu [129.22.4.2]) by odin.INS.CWRU.Edu with ESMTP (8.6.10+cwru/CWRU-2.1-ins)
+ id KAA22876; Wed, 10 May 1995 10:21:10 -0400 (from spcecdt@armory.com for <chet@odin.INS.CWRU.Edu>)
+Received: from deepthought.armory.com (mmdf@deepthought.armory.com [192.122.209.42]) by po.cwru.edu with SMTP (8.6.10+cwru/CWRU-2.3)
+ id BAA16354; Wed, 10 May 1995 01:33:22 -0400 (from spcecdt@armory.com for <chet@po.cwru.edu>)
+From: John DuBois <spcecdt@armory.com>
+Date: Tue, 9 May 1995 22:33:12 -0700
+In-Reply-To: Chet Ramey <chet@odin.ins.cwru.edu>
+ "ksh scripts" (May 9, 1:36pm)
+X-Www: http://www.armory.com/~spcecdt/
+X-Mailer: Mail User's Shell (7.2.5 10/14/92)
+To: chet@po.cwru.edu
+Subject: Re: ksh scripts
+Message-ID: <9505092233.aa13001@deepthought.armory.com>
+
+ Sure. The canonical versions are available on ftp.armory.com; you might
+want to pick up the latest versions before modifying them.
+
+ John
+
+On May 9, 1:36pm, Chet Ramey wrote:
+} Subject: ksh scripts
+} From odin.ins.cwru.edu!chet Tue May 9 10:39:51 1995
+} Received: from odin.INS.CWRU.Edu by deepthought.armory.com id aa22336;
+} 9 May 95 10:39 PDT
+} Received: (chet@localhost) by odin.INS.CWRU.Edu (8.6.10+cwru/CWRU-2.1-ins)
+} id NAA20487; Tue, 9 May 1995 13:39:24 -0400 (from chet)
+} Date: Tue, 9 May 1995 13:36:54 -0400
+} From: Chet Ramey <chet@odin.ins.cwru.edu>
+} To: john@armory.com
+} Subject: ksh scripts
+} Cc: chet@odin.ins.cwru.edu
+} Reply-To: chet@po.cwru.edu
+} Message-ID: <9505091736.AA20411.SM@odin.INS.CWRU.Edu>
+} Read-Receipt-To: chet@po.CWRU.Edu
+} MIME-Version: 1.0
+} Content-Type: text/plain; charset=us-ascii
+} Status: OR
+}
+} Hi. I'm the maintainer of bash (the GNU `Bourne Again shell') for
+} the FSF.
+}
+} I picked up a tar file of ksh scripts you wrote from an anon FTP site
+} a while back. I'd like your permission to include modified versions
+} of some of them in the next major bash distribution (with proper credit
+} given, of course). Is it OK if I do that?
+}
+} Chet Ramey
+}
+} --
+} ``The lyf so short, the craft so long to lerne.'' - Chaucer
+}
+} Chet Ramey, Case Western Reserve University Internet: chet@po.CWRU.Edu
+}-- End of excerpt from Chet Ramey
+
+
+
diff --git a/examples/scripts.v2/README b/examples/scripts.v2/README
new file mode 100644
index 0000000..74f27c5
--- /dev/null
+++ b/examples/scripts.v2/README
@@ -0,0 +1,37 @@
+This collection of scripts was originally written for ksh-88 by
+John DuBois <spcecdt@armory.com>. The conversion to bash v2
+syntax was done by Chet Ramey.
+
+These scripts are as-is; there is no copyright associated with
+any of them. They exist simply as examples of bash scripting.
+
+Here's a description of what's in this directory:
+
+arc2tarz Convert an "arc" archive to a compressed tar archive.
+cal2day.bash Convert a day number to a name.
+corename Tell what produced a core file.
+fman Fast man(1) replacement.
+frcp Copy files using ftp(1) but with rcp-type command line syntax.
+lowercase Change filenames to lower case.
+ncp A nicer front end for cp(1) (has -i, etc.).
+newext Change the extension of a group of files.
+nmv A nicer front end for mv(1) (has -i, etc.).
+pages Print specified pages from files.
+PERMISSION Permissions to use the scripts in this directory.
+pf A pager front end that handles compressed files.
+README README
+ren Rename files by changing parts of filenames that match a pattern.
+rename Change the names of files that match a pattern.
+repeat Execute a command multiple times.
+untar Unarchive a (possibly compressed) tarfile into a directory.
+uudec Carefully uudecode(1) multiple files.
+uuenc uuencode(1) multiple files.
+vtree Print a visual display of a directory tree.
+where Show where commands that match a pattern are.
+
+The following scripts were written or converted by Chet Ramey:
+
+bashrand Random number generator with upper and lower bounds and optional seed.
+cdhist.bash cd replacement with a directory stack added.
+pmtop Poor man's 'top(1)' for SunOS 4.x and BSD/OS.
+shprof Line profiler for bash scripts.
diff --git a/examples/scripts.v2/arc2tarz b/examples/scripts.v2/arc2tarz
new file mode 100644
index 0000000..285bede
--- /dev/null
+++ b/examples/scripts.v2/arc2tarz
@@ -0,0 +1,85 @@
+#! /bin/bash
+#
+# original from:
+# arc2tarz: convert arced file to tarred, compressed form.
+# @(#) arc2tarz.ksh 1.0 92/02/16
+# 91/03/28 john h. dubois iii (john@armory.com)
+# 92/02/16 added -h option for help
+#
+# conversion to bash v2 syntax by Chet Ramey
+
+unset ENV
+Usage="Usage: $0 arcfile [-hcg] [ tarzfile ]"
+
+phelp()
+{
+echo "$Usage
+arcfile is the name of an arc file to convert to tarred, compressed form.
+The file must have a .arc extension, but only the base name needs to be
+given. If no output file name is given, it will be created in the current
+directory with the name being the arcfile basename followed by .tar.EXT.
+If the -c option is given, compress will be used, and EXT will be Z.
+The default (also available with -g) is to use gzip, in which case EXT
+is gz. If the basename is too long the extension may be truncated. All
+uppercase letters in the names of files in the archive are moved to lowercase."
+}
+
+compress=gzip
+ext=gz
+
+while getopts "hcg" opt; do
+ case "$opt" in
+ h) phelp; exit 0;;
+ c) compress=compress; ext=Z;;
+ g) compress=gzip ; ext=gz ;;
+ *) echo "$Usage" 1>&2 ; exit 2;;
+ esac
+done
+
+shift $((OPTIND - 1))
+
+if [ $# = 0 ]; then
+ phelp
+ exit 0
+fi
+
+[ -z "$TMP" ] && tmpdir=/tmp/arc2tarz.$$ || tmpdir=$TMP/arc2tarz.$$
+
+case "$1" in
+*.arc) arcfile=$1 ;;
+*) arcfile=$1.arc ;;
+esac
+
+if [ ! -f $arcfile ] || [ ! -r $arcfile ]; then
+ echo "Could not open arc file \"$arcfile\"."
+ exit 1
+fi
+
+case "$arcfile" in
+/*) ;;
+*) arcfile=$PWD/$arcfile ;;
+esac
+
+basename=${arcfile%.arc}
+basename=${basename##*/}
+[ $# -lt 2 ] && tarzname=$PWD/$basename.tar.$ext || tarzname=$2
+
+trap 'rm -rf $tmpdir $tarzname' 1 2 3 6 15
+
+mkdir $tmpdir
+cd $tmpdir
+echo "unarcing files..."
+arc -ie $arcfile
+
+# lowercase
+for f in *; do
+ new=$(echo $f | tr A-Z a-z)
+ if [ "$f" != "$new" ]; then
+ mv $f $new
+ fi
+done
+
+echo "tarring/compressing files..."
+tar cf - * | $compress > $tarzname
+cd -
+rm -rf $tmpdir
diff --git a/examples/scripts.v2/bashrand b/examples/scripts.v2/bashrand
new file mode 100644
index 0000000..54260c0
--- /dev/null
+++ b/examples/scripts.v2/bashrand
@@ -0,0 +1,76 @@
+#! /bin/bash
+# bashrand - generate a random number in a specified range with an
+# optionally specified ``seed'' value.
+#
+# Original Author: Peter Turnbull, May 1993
+
+usage()
+{
+ echo "$PROG: usage: $PROG [-s seed] lower-limit upper-limit" >&2
+}
+
+PROG=${0##*/}
+
+SEED=$$ # Initialize random-number seed value with PID
+
+while getopts s: opt
+do
+ case "$opt" in
+ s) SEED=$OPTARG ;;
+ *) usage ; exit 2 ;;
+ esac
+done
+
+shift $((OPTIND - 1))
+
+# Process command-line arguments:
+case $# in
+ 2) Lower=$1; Upper=$2 ;;
+ *) usage ; exit 2 ;;
+esac
+
+# Check that specified values are integers:
+expr "$Lower" + 0 >/dev/null 2>&1 || {
+ echo "$PROG: lower ($Lower) not an integer" >&2
+ exit 1
+}
+
+expr "$Upper" + 0 >/dev/null 2>&1 || {
+ echo "$PROG: upper ($Upper) not an integer" >&2
+ exit 1
+}
+
+expr "$SEED" + 0 >/dev/null 2>&1 || {
+ echo "$PROG: seed ($SEED) not an integer" >&2
+ exit 1
+}
+
+# Check that values are in the correct range:
+(( $Lower < 0 )) || [ `expr "$Lower" : '.*'` -gt 5 ] && {
+ echo "$PROG: Lower limit ($Lower) out of range" >&2
+ exit 1
+}
+
+(( $Upper > 32767 )) || [ `expr "$Upper" : '.*'` -gt 5 ] && {
+ echo "$PROG: Upper limit ($Upper) out of range" >&2;
+ exit 1
+}
+
+(( $SEED < 0 )) || (( $SEED > 32767 )) || [ `expr "$SEED" : '.*'` -gt 5 ] && {
+ echo "$PROG: Seed value ($SEED) out of range (0 to 32767)" >&2
+ exit 1
+}
+
+(( $Upper <= $Lower )) && {
+ echo "$PROG: upper ($Upper) <= lower value ($Lower)" >&2
+ exit 1
+}
+
+# Seed the random-number generator:
+RANDOM=$SEED
+
+# Compute value, scaled within range:
+let rand="$RANDOM % ($Upper - $Lower + 1) + $Lower"
+
+# Report result:
+echo $rand
diff --git a/examples/scripts.v2/cal2day.bash b/examples/scripts.v2/cal2day.bash
new file mode 100644
index 0000000..f26128b
--- /dev/null
+++ b/examples/scripts.v2/cal2day.bash
@@ -0,0 +1,49 @@
+#!/bin/bash
+# cal2day - "parse" appropriate calendar output to match date number
+# with day name.
+#
+# usage: cal2day month day [year]
+#
+# ORIGINAL *TAG:33239 3:Dec 9 1997:0755:sh.d/cal2day:
+#
+# Obtained from usenet
+#
+# Converted to bash v2 syntax by Chet Ramey <chet@po.cwru.edu>
+
+#1 PARSE OPTIONS
+while getopts :dls _inst
+do case $_inst in
+ (d) format='%1d%.0s\n' ;; # 0, 1, ..., 7
+ (l) format='%0.s%-s\n' ;; # Sunday, Monday, ..., Saturday
+ (s) format='%0.s%-.3s\n' ;; # Sun, Mon, ..., Sat
+ esac
+done
+shift $((OPTIND-1))
+
+#2 PARAMETER VALUES
+((!$#)) && set -- $(date '+%m %d')
+: ${format:='%0.s%-.3s\n'}
+: ${1:?missing month parameter [1-12]}
+: ${2:?missing day parameter [1-31]}
+
+#3 CALCULATE DAY-OF-WEEK FROM DATE
+cal $1 ${3:-$(date +%Y)} | gawk -FX '
+BEGIN { day="Sunday Monday Tuesday WednesdayThursday Friday Saturday"
+ sub(/^0/, "", daynum)
+ dayre="(^| )" daynum "( |$)"
+ }
+#NR==2 { print length($0) }
+NR==1 || NR==2 \
+ { next }
+dayre { if (match($0, dayre))
+ { #print RSTART, RLENGTH, substr($0, RSTART, RLENGTH)
+ if (daynum<=9 || RSTART==1) RSTART-=1
+ exit
+ }
+ }
+END { # 20/21 char width assumed
+ printf format, RSTART/3, substr(day, RSTART*3+1, 9)
+ }
+' daynum=$2 format=$format -
+
+exit 0
diff --git a/examples/scripts.v2/cdhist.bash b/examples/scripts.v2/cdhist.bash
new file mode 100644
index 0000000..df8aea7
--- /dev/null
+++ b/examples/scripts.v2/cdhist.bash
@@ -0,0 +1,176 @@
+#! /bin/bash
+#
+# cdhist - cd replacement with a directory stack like pushd/popd
+#
+# usage: cd [-l] [-n] [-] [dir]
+#
+# options:
+# -l print the cd directory stack, one entry per line
+# - equivalent to $OLDPWD
+# -n cd to nth directory in cd directory stack
+# -s cd to first directory in stack matching (substring) `s'
+#
+# arguments:
+# dir cd to dir and push dir onto the cd directory stack
+#
+# If the new directory is a directory in the stack and the options selected
+# it (-n, -s), the new working directory is printed
+#
+# If the variable CDHISTFILE is set, the cd directory stack is loaded from
+# and written to $CDHISTFILE every time `cd' is executed.
+#
+# Note: I got this off the net somewhere; I don't know the original author
+#
+# Chet Ramey
+# chet@po.cwru.edu
+
+_cd_print()
+{
+ echo -e "$@"
+}
+
+cd()
+{
+ typeset -i cdlen i
+ typeset t
+
+ if [ $# -eq 0 ]
+ then
+ set -- $HOME
+ fi
+
+ if [ "$CDHISTFILE" ] && [ -r "$CDHISTFILE" ] # if directory history exists
+ then
+ typeset CDHIST
+ i=-1
+ while read -r t # read directory history file
+ do
+ CDHIST[i=i+1]=$t
+ done <$CDHISTFILE
+ fi
+
+ if [ "${CDHIST[0]}" != "$PWD" ] && [ -n "$PWD" ]
+ then
+ _cdins # insert $PWD into cd history
+ fi
+
+ cdlen=${#CDHIST[*]} # number of elements in history
+
+ case "$@" in
+ -) # cd to new dir
+ if [ "$OLDPWD" = "" ] && ((cdlen>1))
+ then
+ '_cdprint' ${CDHIST[1]}
+ builtin cd ${CDHIST[1]}
+ pwd
+ else
+ builtin cd "$@"
+ # pwd
+ fi
+ ;;
+ -l) # _cdprint directory list
+ ((i=cdlen))
+ while (((i=i-1)>=0))
+ do
+ num=$i
+ '_cdprint' "$num ${CDHIST[i]}"
+ done
+ return
+ ;;
+ -[0-9]|-[0-9][0-9]) # cd to dir in list
+ if (((i=${1#-})<cdlen))
+ then
+ '_cdprint' ${CDHIST[i]}
+ builtin cd ${CDHIST[i]}
+ pwd
+ else
+ builtin cd $@
+ # pwd
+ fi
+ ;;
+ -*) # cd to matched dir in list
+ t=${1#-}
+ i=1
+ while ((i<cdlen))
+ do
+ case ${CDHIST[i]} in
+ *$t*)
+ '_cdprint' ${CDHIST[i]}
+ builtin cd ${CDHIST[i]}
+ pwd
+ break
+ ;;
+ esac
+ ((i=i+1))
+ done
+ if ((i>=cdlen))
+ then
+ builtin cd $@
+ # pwd
+ fi
+ ;;
+ *) # cd to new dir
+ builtin cd $@
+ # pwd
+ ;;
+ esac
+
+ _cdins # insert $PWD into cd history
+
+ if [ "$CDHISTFILE" ]
+ then
+ cdlen=${#CDHIST[*]} # number of elements in history
+
+ i=0
+ while ((i<cdlen))
+ do
+ echo ${CDHIST[i]} # update directory history
+ ((i=i+1))
+ done >$CDHISTFILE
+ fi
+}
+
+_cdins() # insert $PWD into cd history
+{ # meant to be called only by cd
+ typeset -i i
+
+ i=0
+
+ while (( i < ${#CDHIST[*]} )) # see if dir is already in list
+ do
+ if [ "${CDHIST[$i]}" = "$PWD" ]
+ then
+ break
+ fi
+ ((i=i+1))
+ done
+
+ if (( i>22 )) # limit max size of list
+ then
+ i=22
+ fi
+
+ while (((i=i-1)>=0)) # bump old dirs in list
+ do
+ CDHIST[i+1]=${CDHIST[i]}
+ done
+
+ CDHIST[0]=$PWD # insert new directory in list
+}
+
+# examples
+shopt -s expand_aliases
+
+# go to known place before doing anything
+cd /
+
+echo CDHIST: "${CDHIST[@]}"
+for dir in /tmp /bin - -2 -l
+do
+ cd $dir
+ echo CDHIST: "${CDHIST[@]}"
+ echo PWD: $PWD
+
+done
+
+exit 0
diff --git a/examples/scripts.v2/corename b/examples/scripts.v2/corename
new file mode 100644
index 0000000..2b51e5d
--- /dev/null
+++ b/examples/scripts.v2/corename
@@ -0,0 +1,43 @@
+#! /bin/bash
+#
+# original from:
+# @(#) corename.ksh 1.0 93/04/01
+# 92/11/11 john h. dubois iii (john@armory.com)
+# 92/02/16 Added help option.
+# 92/02/22 Added cd to origdir to fix prob w/multiple relative paths.
+# 93/04/01 Added check for whether file exists.
+#
+# conversion to bash v2 syntax done by Chet Ramey
+
+# inspired by belal's equivalent utility
+
+if [ "$1" = -h ]; then
+ echo \
+"$0: print the names of executables that dumped core.
+Usage: $0 [corename ...]
+If no corename is given, \"core\" is assumed."
+ exit 0
+fi
+
+[ $# = 0 ] && set core
+origdir=$PWD
+for i; do
+ cd $origdir
+ file=${i##*/}
+ dir=${i%$file}
+ [ -z "$dir" ] && dir=$origdir/
+ if [ ! -f $dir$file ]; then
+ echo "$dir$file: No such file."
+ continue
+ fi
+ if [ ! -r $dir$file ]; then
+ echo "$dir$file: Cannot open."
+ continue
+ fi
+ cd $dir
+
+ # the adb output syntax is highly variable. this works on SunOS 4.x
+ set -- $(adb $file < /dev/null 2>&1 | sed 1q)
+ name=${7#??}
+ echo "$i: ${name%??}"
+done
diff --git a/examples/scripts.v2/fman b/examples/scripts.v2/fman
new file mode 100644
index 0000000..1e94d21
--- /dev/null
+++ b/examples/scripts.v2/fman
@@ -0,0 +1,281 @@
+#! /bin/bash
+#
+# original from:
+# fman: new man program
+# @(#) fman.ksh 1.5 94/04/16
+# 91/07/03 john h. dubois iii (john@armory.com)
+# 91/07/11 made it unpack man pages if neccessary
+# 91/07/16 fixed test for whether man file pattern was expanded
+# 92/01/21 made it read /etc/default/man to get section order,
+# and only display the first section found.
+# 92/02/06 changed name to fman
+# 92/02/07 fixed bug in notfound
+# 92/02/13 incorporated changes from DOS version
+# 92/03/11 changed to use MANPATH from environment if set,
+# and search all directories given in MANPATH
+# 92/03/15 exec pager or man w/o forking
+# 92/05/31 try using index if one exists
+# 92/10/01 Added "See also <other sections>"
+# 92/10/18 If PAGER is less, search for name of man page to make it easier
+# to find information in man pages for multiple items
+# 92/11/11 Make it work for compressed files not listed in index;
+# deal with man pages listed in index that don't exist.
+# 93/03/30 Fixed bug in MANPATH processing
+# 93/06/17 Include paths in "See also:" message if they would be needed
+# to get to a man page. Allow MANPATH spec on command line.
+# 93/07/09 Added -h and -e options.
+# 94/04/16 Added x option.
+#
+# conversion to bash v2 syntax done by Chet Ramey
+
+istrue()
+{
+ test 0 -ne "$1"
+}
+
+isfalse()
+{
+ test 0 -eq "$1"
+}
+
+# Finds all sections that man page $1 is in and puts them in the the
+# global array Sections[].
+# The filename of each page is put in FileNames[] with the same index.
+# Global vars used:
+# patharr[] MANPATH directories.
+
+FindSectionsInIndex ()
+{
+ typeset index indexes section mpath page=$1
+ typeset -i i=0 NIndex=0
+
+ for mpath in "${patharr[@]}"; do
+ if [ -r $mpath/index ]; then
+ indexes="$indexes $mpath/index"
+ let NIndex+=1
+ fi
+ done
+ [ -z "$indexes" ] && return
+ # Make grep give filename
+ [ NIndex -lt 2 ] && indexes="$indexes /dev/null"
+ # set positional parameters to
+ # indexfile:searchname pagename section ...
+ # e.g.
+ # /usr/man/index:FP_OFF Routines DOS
+ set -- `grep "^$page[ ]" $indexes`
+ while [ $# -gt 2 ]; do
+ FileNames[i]=${1%%index*}cat$3/$2.$3
+ Sections[i]=$3
+ shift 3
+ let i+=1
+ done
+}
+
+# Finds all sections that man page $1 is in by searching each man directory
+# in the order given in patharr[],
+# and puts them in the the global array Sections[].
+# The filename of each page is put in FileNames[] with the same index.
+# Global vars used:
+# patharr[] MANPATH directories.
+FindSectionsInDirs ()
+{
+ local page=$1 mpath AllPaths Path
+ typeset -i i
+
+ for mpath in "${patharr[@]}"; do
+ AllPaths="$AllPaths $mpath/cat[0-9]*/$page.* $mpath/man[0-9]*/$page.*"
+ done
+
+ i=0
+ for Path in $AllPaths; do
+ istrue $debug && echo Path = $Path
+ case "$Path" in
+ *\*) ;;
+ *)
+ # Remove compressed-file suffix to make FileNames be the same
+ # as it is when built by FindSectionsInIndex()
+ FileNames[i]=${Path%.[zZ]}
+ Path=${Path%/*}
+ Sections[i]=${Path##*/*.}
+ let i+=1 ;;
+ esac
+ done
+}
+
+# FindSection: display man page.
+# Uses ordarr[] (built from $ORDER) to display the version of the man
+# page that occurs first in $ORDER.
+# Sections[] gives the sections that a man page was found in.
+# If the global variable "exist" is set to 1, nothing is displayed;
+# the function instead returns zero if a page is found, nonzero if not.
+# The filename of each page is in FileNames[] with the same index.
+# Global vars used:
+# Sections[], FileNames[], ordarr[]
+FindSection ()
+{
+ typeset -i NumPages i foundsec
+ local section OtherSec filename NPAGER=$PAGER POpt page=$1 Pat
+ local PageFile
+
+ NumPages=${#Sections[*]} # Number of versions of man page found.
+ isfalse $NumPages && return 1
+ case "$PAGER" in
+ *less) Popt="-p$page" ;;
+ esac
+
+ # For each section in ORDER, determine if any man page was found in
+ # that section
+ for section in "${ordarr[@]}"; do
+ i=0
+ foundsec=0
+ while [ $i -lt $NumPages ]; do
+ if [ "${Sections[i]}" = $section ]; then
+ # Found a man page from this section of ORDER
+ filename=${FileNames[i]}
+ if [ -z "$PageFile" ]; then
+ PageFile=$filename
+ else
+ if istrue $foundsec; then
+ OtherSec="$OtherSec$page(${filename%/*/*} $section) "
+ else
+ OtherSec="$OtherSec$page($section) "
+ fi
+ fi
+ foundsec=1
+ istrue $exist && return
+ fi
+ let i+=1
+ done
+ done
+ # No pages with the specified section found.
+ [ -z "$PageFile" ] && return 1
+ # Return if all we want to know is whether the man page exists.
+ [ "$exist" = 1 ] && return 0
+ if [ -z "$OtherSec" ]; then
+ NPAGER="exec $PAGER"
+ fi
+ if [ -r $PageFile ]; then
+ $NPAGER $POpt $PageFile
+ elif [ -r $PageFile.z ]; then
+ pcat $PageFile.z | $NPAGER $POpt
+ elif [ -r $PageFile.Z ]; then
+ zcat $PageFile.Z | $NPAGER $POpt
+ elif [ -f $PageFile.gz ]; then
+ gzip -dc $PageFile.gz | $NPAGER $POpt
+ else
+ echo "$PageFile: cannot open." 1>&2
+ OtherSec=
+ unset Sections[i]
+ let i+=1
+ continue
+ fi
+ echo "See also $OtherSec"
+ exit 0
+}
+
+phelp()
+{
+echo "$name: print man pages.
+$name locates and prints the specified manual pages from the online UNIX
+documentation.
+$Usage
+Options:
+-e: Determine whether the specified man page exists. Nothing is printed;
+ $0 exits with a zero status if the page exists and a nonzero status if
+ it does not.
+-h: Print this help."
+}
+
+# main program
+
+typeset -i exist=0 debug=0
+
+name=${0##*/}
+Usage="Usage: $name [-eh] [[manpath] section] command-name"
+
+while getopts :hex opt; do
+ case $opt in
+ h) phelp; exit 0;;
+ e) exist=1 ;;
+ x) debug=1 ;;
+ +?) echo "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
+ ?)
+ echo "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2 ;;
+ esac
+done
+
+# remove args that were options
+shift $((OPTIND-1))
+
+if [ $# -lt 1 ]; then
+ echo -e "$Usage\nUse -h for help." 1>&2
+ exit
+fi
+
+P=$PAGER
+O=1:n:l:6:8:2:3:4:5:7:p:o
+T=$TERM
+M=${MANPATH:-/usr/local/man:/usr/man}
+[ -f /etc/default/man ] && . /etc/default/man
+[ -n "$P" ] && PAGER=$P
+[ -n "$O" ] && ORDER=$O
+[ -n "$T" ] && TERM=$T
+[ -n "$M" ] && MANPATH=$M
+
+case $# in
+0) echo "No man page specified." ; exit 1;;
+1) page=$1;;
+2) ORDER=$(echo $1 | tr a-z A-Z) ; page=$2;;
+3) MANPATH=$1
+ [ -n "$2" ] && ORDER=$(echo $2 | tr a-z A-Z)
+ page=$3;;
+*) echo "Too many arguments."; exit 1;;
+esac
+
+aargs=("$@")
+[ ! -t 0 ] && PAGER=cat
+
+OIFS=$IFS
+IFS=:
+patharr=($MANPATH)
+i=0
+for d in $MANPATH; do
+ for sec in $ORDER; do
+ ordarr[i]=$d/cat${sec}
+ let i+=1
+ ordarr[i]=$d/man${sec}
+ let i+=1
+ done
+done
+IFS=$OIFS
+
+istrue $debug && echo patharr = "${patharr[@]}"
+
+# if less or more is being used, remove multiple blank lines
+export LESS="-s $LESS"
+export MORE="-s $MORE"
+
+# Try using index
+FindSectionsInIndex "$page"
+# Exit 0 if a page was found and we're just testing for existence.
+FindSection "$page" && exit 0
+
+# Try searching directories
+unset Sections[*]
+FindSectionsInDirs "$page"
+FindSection "$page" && exit 0
+
+istrue $exist && exit 1
+
+# Try using man
+# If using more or less, make man run faster by letting more or less compress
+# multiple blank lines instead of rmb
+#case "$PAGER" in
+#*more|*less) manopt=-b;;
+#esac
+
+#cmd=(man $manopt -p$PAGER "${aargs[@]}")
+export PAGER
+cmd=(man $manopt "${aargs[@]}")
+istrue $debug && echo "$name: running ${cmd[*]}" 1>&2
+exec "${cmd[@]}"
diff --git a/examples/scripts.v2/frcp b/examples/scripts.v2/frcp
new file mode 100755
index 0000000..572aa7b
--- /dev/null
+++ b/examples/scripts.v2/frcp
@@ -0,0 +1,288 @@
+#! /bin/bash
+#
+# original from:
+#
+# @(#) frcp.ksh 2.2 93/11/14
+# 92/06/29 john h. dubois iii (john@armory.com)
+# 92/10/14 Cleaned up, improved, added -d and -r options
+# 92/11/11 Made work with a dest of '.'
+# 93/07/09 Added -l and -n options, & login as anonymous if no .netrc entry
+# 93/11/14 Use either passwd or password in .netrc, since ftp does.
+#
+# conversion to bash v2 syntax by Chet Ramey
+#
+# frcp: ftp front end with rcp-like syntax.
+# Note: requires any machine names given to be listed with
+# user and password in .netrc. If not, anonymous FTP is
+# done.
+#
+# full path to ftp binary
+if [ -x /usr/bin/ftp ]; then
+ FTP=/usr/bin/ftp;
+elif [ -x /usr/ucb/ftp ]; then
+ FTP=/usr/ucb/ftp
+else
+ FTP=ftp
+fi
+
+istrue()
+{
+ test 0 -ne "$1"
+}
+isfalse()
+{
+ test 0 -eq "$1"
+}
+
+# For each filename given, put the filename in filename[n]
+# and the machine it is on in machine[n].
+function SplitNames {
+ typeset file
+ typeset -i i=1
+
+ unset filename[*] machine[*]
+ for file; do
+ case "$file" in
+ *:*) machine[i]=${file%%:*} ;;
+ *) machine[i]=$LocalMach ;;
+ esac
+ filename[i]=${file#*:}
+ let i+=1
+ done
+}
+
+function verboseprint {
+ echo "$@"
+ echo "$@" 1>&2
+}
+
+function MakeDir {
+ OFS=$IFS
+ local IFS=/ dir component
+
+ case "$1" in
+ /*) ;;
+ *) dir=.
+ esac
+ set -- $1
+ IFS=$OFS
+ for component; do
+ dir=$dir/$component
+ if [ ! -d "$dir" ]; then
+ if mkdir "$dir"; then :; else
+ echo "Could not make directory $dir." >&2
+ return 1
+ fi
+ fi
+ done
+ return 0
+}
+
+lastisdot ()
+{
+ case "$1" in
+ */.|*/..) return 0;;
+ *) return 1;;
+ esac
+}
+
+# CopyFiles: issue ftp(TC) commands to copy files.
+# Usage: CopyFiles [sourcemachine:]sourcepath ... [destmachine:]destpath
+# Global vars:
+# Uses LocalMach (should be name of local machine)
+# Sets global arrs machine[]/filename[]
+function CopyFiles {
+ unset machine[*] filename[*]
+
+ SplitNames "$@" # split names into filename[1..n] and machine[1..n]
+
+ local DestMach=${machine[$#]} # Machine to copy files to
+ local DestPath=${filename[$#]} # Destination file/dir
+
+ unset machine[$#] filename[$#]
+
+ [ -z "$DestPath" ] && DestPath=. # dest was given as machine:
+
+ # Try to determine if destination should be a directory
+ # so that it can be forced to be a directory.
+
+ case "$DestPath" in
+ */) ;; # don't add / if trailing / already present
+ *) if [ $# -gt 2 ] || # if more than two args given, last must be a dir
+ # If dest in on local machine, check whether it is a directory
+ [ $DestMach = $LocalMach ] && [ -d "$DestPath" ] ||
+ # If dest ends with . or .., it is a directory
+ lastisdot "$DestPath"
+ then
+ DestPath=$DestPath/
+ fi ;;
+ esac
+
+ # If one of the above tests made us think dest is a directory,
+ # but it isn't, complain
+ case "$DestPath" in
+ */) if [ "$DestMach" = "$LocalMach" ] && [ ! -d "$DestPath" ]; then
+ echo "Destination is not a directory." 1>&2
+ exit 1
+ fi ;;
+ esac
+
+ DoCopy "$DestMach" "$DestPath"
+}
+
+# Usage: OpenMachine machine-name
+# Emits login sequence or doesn't, depending on .netrc file and global
+# variables anon and noanon
+OpenMachine ()
+{
+ local machine=$1 netrc=$HOME/.netrc user= password=
+
+ if isfalse $anon && [ -r $netrc ]; then
+ set -- $(gawk '
+ /machine (.* )?'"$machine"'($| )/,/^ *$/ {
+ Fields[$1] = $2
+ if ("passwd" in Fields)
+ Fields["password"] = Fields["passwd"]
+ if ("login" in Fields && "password" in Fields) {
+ print Fields["login"] " " Fields["password"]
+ exit
+ }
+ }
+ ' $netrc )
+ user=$1
+ password=$2
+ fi
+ if [ -z "$password" ]; then
+ if istrue $noanon; then
+ echo "No .netrc entry for machine $machine" 1>&2
+ exit 1
+ fi
+ user=anonymous
+ password=$USER@$LocalMach
+ fi
+ verboseprint open $machine
+ echo user $user "*******" 1>&2
+ echo user $user $password
+}
+
+# Usage: DoCopy destination-machine destination-path
+# Copies the files in global arrs machine[]/filename[] to the given dest
+# Global vars:
+# Uses machine[], filename[], LocalMach, check
+DoCopy ()
+{
+ local DestMach=$1
+ local DestPath=$2
+ local OpenMach # Machine that connection is currently open to
+ local OWD=$PWD SourceMach SourceFile
+ local FileName
+ typeset -i i=1
+
+ while [ $i -le ${#machine[*]} ]; do
+ istrue $check && verboseprint "runique"
+
+ SourceMach=${machine[i]}
+ SourceFile=${filename[i]}
+
+ DestFile=$DestPath
+ # if DestPath is a dir,
+ # add source filename to it without source path
+ case "$DestFile" in
+ */) DestFile=$DestFile${SourceFile##*/} ;;
+ esac
+
+ if [ $SourceMach = $LocalMach ]; then
+ if [ $DestMach != "$OpenMach" ]; then
+ OpenMachine $DestMach
+ OpenMach=$DestMach
+ fi
+ verboseprint put $SourceFile $DestFile
+ elif [ $DestMach = $LocalMach ]; then
+ if istrue $check && [ -f "$DestFile" ]; then
+ echo "$DestFile already exists." 1>&2
+ continue
+ fi
+ # If destination is on local machine,
+ # the dest will be a full dir/filename
+ if istrue $createdirs; then
+ MakeDir "${DestFile%/*}" || continue
+ fi
+ if [ $SourceMach != "$OpenMach" ]; then
+ OpenMachine $SourceMach
+ OpenMach=$SourceMach
+ fi
+ # If source filename has wildcards ([, ], *, ?) do an mget
+ case "$SourceFile" in
+ \[*\]|*\**|*\?*)
+ verboseprint lcd "$DestFile"
+ verboseprint mget "$SourceFile"
+ verboseprint lcd $OWD ;;
+ *) verboseprint get "$SourceFile" "$DestFile" ;;
+ esac
+ else
+ echo "Neither source machine \"$SourceMach\" "\
+"nor destination machine \"$DestMach\" is local." 1>&2
+ fi
+ let i+=1
+ done
+}
+
+# Start of main program
+name=${0##*/}
+
+if [ "$1" = -h ]; then
+ echo \
+"$name: do ftp transfers using rcp-style parameters.
+Usage: $name <source> <destpath> or $name <source> [<source> ...] <destdir>
+At least one of <source> and <destpath> must be the local system.
+A remote filename is given as machinename:filename
+If remote filenames contain wildcards, they will be globbed on the remote
+machine. Make sure they are quoted when $name is invoked.
+If the invoking user's .netrc file (see ftp(TC)) contains an entry for the
+remote system with a login and password supplied, $name will log in using
+the given login and password. If not, $name will login in as user
+anonymous and with the user@localsystem as the password.
+Options:
+-c: check: do not overwrite files.
+-d: create directories as needed.
+-f: force: overwrite files (default).
+-h: print this help.
+-l: fail if there is no entry with login and password for the remote system,
+ instead of logging in as anonymous.
+-n: log in as anonymous even if there is an entry for the remote system in
+ the user's .netrc file.
+-r: read source/dest filename pairs from the standard input,
+ one pair per line, and copy files accordingly."
+ exit 0
+fi
+
+typeset -i check=0 createdirs=0 readinput=0 anon=0 noanon=0
+
+while getopts :cdflnr Option
+do
+ case "$Option" in
+ c) check=1;;
+ d) createdirs=1;;
+ f) check=0;;
+ l) noanon=1;;
+ n) anon=1;;
+ r) readinput=1;;
+ \?) echo "$OPTARG: invalid option."; exit 1;;
+ esac
+done
+
+shift $((OPTIND-1))
+
+LocalMach=`hostname`
+
+if istrue $readinput; then
+ while read line; do
+ CopyFiles $line
+ done | $FTP -nv
+else
+ if [ $# -lt 2 ]; then
+ echo "$name: Not enough arguments. Use -h for help." 1>&2
+ exit
+ fi
+ CopyFiles "$@" | $FTP -nv
+fi
diff --git a/examples/scripts.v2/lowercase b/examples/scripts.v2/lowercase
new file mode 100644
index 0000000..fd2ec5d
--- /dev/null
+++ b/examples/scripts.v2/lowercase
@@ -0,0 +1,44 @@
+#! /bin/bash
+#
+# original from
+# @(#) lowercase.ksh 1.0 92/10/08
+# 92/10/08 john h. dubois iii (john@armory.com)
+#
+# conversion to bash v2 syntax done by Chet Ramey
+
+Usage="Usage: $name file ..."
+phelp()
+{
+echo "$name: change filenames to lower case.
+$Usage
+Each file is moved to a name with the same directory component, if any,
+and with a filename component that is the same as the original but with
+any upper case letters changed to lower case."
+}
+
+name=${0##*/}
+
+while getopts "h" opt; do
+ case "$opt" in
+ h) phelp; exit 0;;
+ *) echo "$Usage" 1>&2; exit 2;;
+ esac
+done
+
+shift $((OPTIND - 1))
+
+for file; do
+ filename=${file##*/}
+ case "$file" in
+ */*) dirname=${file%/*} ;;
+ *) dirname=. ;;
+ esac
+ nf=$(echo $filename | tr A-Z a-z)
+ newname="${dirname}/${nf}"
+ if [ "$nf" != "$filename" ]; then
+ mv "$file" "$newname"
+ echo "$0: $file -> $newname"
+ else
+ echo "$0: $file not changed."
+ fi
+done
diff --git a/examples/scripts.v2/ncp b/examples/scripts.v2/ncp
new file mode 100644
index 0000000..c91ba64
--- /dev/null
+++ b/examples/scripts.v2/ncp
@@ -0,0 +1,187 @@
+#! /bin/bash
+#
+# original from:
+# @(#) ncp.ksh,nmv.ksh 1.1 94/07/23
+# 92/01/18 john h. dubois iii (john@armory.com)
+# 92/01/31 added check for no args left after shifts
+# 92/02/17 added help
+# 92/02/25 remove path component from filename before tacking it onto dest.
+# 92/03/15 exec mv or cp
+# 93/07/13 Added -i
+# 93/09/29 Made abort if file exists optional.
+# 93/11/19 Exit before invoking mv if no files to move
+# 94/01/03 Added o option
+# 94/04/13 Added x option.
+# Fixed appending of source filename, broken by earlier change.
+# 94/07/23 Append only the filename part of the source path.
+#
+# conversion to bash v2 syntax done by Chet Ramey
+
+false()
+{
+ return 1
+}
+
+true()
+{
+ return 0
+}
+
+phelp()
+{
+echo "$name: do a $cmd with extra checking and options.
+$Usage
+$name is used as a front end for $cmd to get the [icfo] options, and so
+that a trailing / will force the last component of the path to be
+interpreted as a directory, so that $name foo bar/ will fail if bar is
+not an existing directory, instead of changing the name of foo to bar.
+Effectively, $name foo bar/ is short for $name foo bar/foo
+Options:
+-h prints this help.
+-c checks first for the existence of each file, and fails if it exists.
+-i is like -c except that if the file exists and stdin and stdout are a
+ tty, a query is printed and a reply is read; a file is overwritten only
+ if the reply begins with 'y'.
+-f unsets -c and -i (in case $cmd is aliased to $name).
+-o (overwrite only) checks that the named file(s) exist and fails for any
+ that do not. It is the complement of the -c option.
+Whichever of [cifo] comes later on the command line determines the behaviour.
+Any of these options must come before any standard $cmd options."
+}
+
+# interactive: Attempt to overwrite file should result in interactive
+# query rather than automatic failure.
+# noover: Do not overwrite files (if interactive is true, query, else fail)
+# overwrite: Only overwriting is allowed, not creation of new files.
+# debug: Print debugging info.
+typeset interactive=false noover=false overwrite=false debug=false
+name=${0##*/}
+
+case "$name" in
+ncp|nmv) cmd=/bin/${name#?} ;;
+*) echo "$name: Must be invoked as ncp or nmv." 1>&2 ; exit 2;;
+esac
+
+Usage="Usage: $name [-cfhio] $cmd-cmd-line"
+
+while getopts :cfhiox opt; do
+ case $opt in
+ h) phelp; exit 0;;
+ x) debug=true ;;
+ c) noover=true ;;
+ i) noover=true ; interactive=true ;;
+ f) noover=false ; interactive=false ;;
+ o) overwrite=true ; noover=false ; interactive=false;;
+ +?) echo "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
+ ?) echo "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
+ esac
+done
+
+# remove args that were options
+shift $((OPTIND - 1))
+
+if [ $# -lt 2 ]; then
+ echo -e "$Usage\nUse -h for help."
+ exit
+fi
+
+Check()
+{
+ if [ ! -f "$1" ] && $overwrite; then
+ echo "$name: $1: File does not exist." 1>&2
+ return 1
+ elif [ -f "$1" ] && $noover; then
+ if [ $interactive = false ] || [ ! -t 0 ] || [ ! -t 1 ]; then
+ echo "$name: $1: File exists." 1>&2
+ return 1
+ else
+ while :; do
+ echo -n \
+"$name: $1: File exists. Overwrite? (y)es/(n)o/(a)bort/(Y)es for all: " 1>&2
+ read reply
+ case "$reply" in
+ y*)
+ echo "$name: Overwriting $1."
+ return 0
+ ;;
+ Y*)
+ echo "$name: Overwriting $1."
+ interactive=false
+ noover=false
+ return 0
+ ;;
+ [nN]*)
+ echo "$name: Skipping $2."
+ return 1
+ ;;
+ [aA]*)
+ echo "$name: Aborting."
+ exit 1
+ ;;
+ *)
+ echo "$name: Invalid response." 1>&2
+ ;;
+ esac
+ done
+ fi
+ else
+ return 0
+ fi
+}
+
+# i is the index of the filename being examined
+# lastarg is the index of the last filename before the dest directory name
+typeset -i i=0 lastarg=$(($#-1))
+
+# Sets argv[0..$#-1]
+argv=("$@")
+$debug && echo argv = "${argv[@]}" 1>&2
+dest=${argv[lastarg]}
+
+if $debug; then
+ echo \
+"interactive=$interactive noover=$noover overwrite=$overwrite debug=$debug
+lastarg=$lastarg dest=$dest name=$name cmd=$cmd
+files=$*" 1>&2
+fi
+
+if $noover || $overwrite; then
+ $debug && echo "checking for existance of directories..." 1>&2
+ # If the destination is not intended to be a directory...
+ if [ $# -eq 2 ] && [ ! -d "$dest" ]; then
+ Check "$dest" "$1" || exit 0 # No files to copy
+ else
+ while [ $i -lt $lastarg ]; do
+ Check "$dest/${argv[i]##*/}" "${argv[i]}" || unset argv[i]
+ let i+=1
+ done
+ fi
+fi
+
+[ ${#argv[@]} -lt 2 ] && exit 0
+
+# If only 2 args are given, mv/cp will not insist that the destination
+# be a directory, which we want if the destination ends in "/" or if
+# the original number of args was >2.
+# $# is still the original number of args.
+# Tack the file name onto the destination to force this behaviour.
+
+lastisslash()
+{
+ case "$1" in
+ */) return 0;;
+ *) return 1;;
+ esac
+}
+
+if [ ${#argv[@]} = 2 ] && { lastisslash "$2" || [ $# -gt 2 ]; }; then
+ $debug && echo "Appending filename." 1>&2
+ # Don't know which element of argv[] holds the source filename,
+ # since may have started with more than 1 source file & had some unset.
+ # So, compact args to make it easy to find the set one.
+ argv=("${argv[@]}")
+ argv[1]="${argv[1]}/${argv[0]##*/}"
+fi
+
+$debug && echo "Executing command: $cmd ${argv[@]}" 1>&2
+exec $cmd "${argv[@]}"
diff --git a/examples/scripts.v2/newext b/examples/scripts.v2/newext
new file mode 100644
index 0000000..37645bd
--- /dev/null
+++ b/examples/scripts.v2/newext
@@ -0,0 +1,64 @@
+#! /bin/bash
+#
+# original from:
+# newext: change filename extension
+# @(#) newext.sh 1.1 93/04/13
+# 90/06/06 john h. dubois iii (john@armory.com)
+# 90/11/14 changed ksh-specific code to hybrid: if running under Bourne,
+# uses expr instead of ksh builtin ops. Removed SYSV specific code.
+# 91/08/06 added -t option
+# 92/11/06 made earlier code actually work!
+# 93/04/13 If no filenames given, act on files in current dir
+#
+# conversion to bash v2 syntax by Chet Ramey
+
+usage="Usage: newext [-th] <oldext> <newext> [filename ...]"
+
+phelp()
+{
+echo "$usage
+Rename all given files that end in oldext with newext replacing oldext.
+If no filenames are given, all files in the current directory that end
+in oldext are acted on (no filename is equivalent to '*').
+Options:
+-h: Print this help.
+-t: Test: No action is taken except to print the mv commands that would
+be executed if -t was not given."
+}
+
+while getopts "th" opt; do
+ case "$opt" in
+ t) echo=echo;;
+ h) phelp; exit 0;;
+ *) echo "$usage" 1>&2; exit 2;;
+ esac
+done
+
+shift $((OPTIND - 1))
+
+oldext=$1
+newext=$2
+
+case $# in
+[01]) echo -e "$usage\nUse -h for help." 1>&2; exit 2;;
+2) shift ; shift; set -- *;;
+*) shift ; shift;;
+esac
+
+found=
+
+for file
+do
+ case "$file" in
+ *$oldext)
+ newname="${file%$oldext}$newext"
+ $echo mv "$file" "$newname"
+ found=true;;
+ esac
+done
+
+if [ -z "$found" ]; then
+ echo "No files ending in \"$oldext\"."
+ exit 1
+fi
+exit 0
diff --git a/examples/scripts.v2/nmv b/examples/scripts.v2/nmv
new file mode 100644
index 0000000..c91ba64
--- /dev/null
+++ b/examples/scripts.v2/nmv
@@ -0,0 +1,187 @@
+#! /bin/bash
+#
+# original from:
+# @(#) ncp.ksh,nmv.ksh 1.1 94/07/23
+# 92/01/18 john h. dubois iii (john@armory.com)
+# 92/01/31 added check for no args left after shifts
+# 92/02/17 added help
+# 92/02/25 remove path component from filename before tacking it onto dest.
+# 92/03/15 exec mv or cp
+# 93/07/13 Added -i
+# 93/09/29 Made abort if file exists optional.
+# 93/11/19 Exit before invoking mv if no files to move
+# 94/01/03 Added o option
+# 94/04/13 Added x option.
+# Fixed appending of source filename, broken by earlier change.
+# 94/07/23 Append only the filename part of the source path.
+#
+# conversion to bash v2 syntax done by Chet Ramey
+
+false()
+{
+ return 1
+}
+
+true()
+{
+ return 0
+}
+
+phelp()
+{
+echo "$name: do a $cmd with extra checking and options.
+$Usage
+$name is used as a front end for $cmd to get the [icfo] options, and so
+that a trailing / will force the last component of the path to be
+interpreted as a directory, so that $name foo bar/ will fail if bar is
+not an existing directory, instead of changing the name of foo to bar.
+Effectively, $name foo bar/ is short for $name foo bar/foo
+Options:
+-h prints this help.
+-c checks first for the existence of each file, and fails if it exists.
+-i is like -c except that if the file exists and stdin and stdout are a
+ tty, a query is printed and a reply is read; a file is overwritten only
+ if the reply begins with 'y'.
+-f unsets -c and -i (in case $cmd is aliased to $name).
+-o (overwrite only) checks that the named file(s) exist and fails for any
+ that do not. It is the complement of the -c option.
+Whichever of [cifo] comes later on the command line determines the behaviour.
+Any of these options must come before any standard $cmd options."
+}
+
+# interactive: Attempt to overwrite file should result in interactive
+# query rather than automatic failure.
+# noover: Do not overwrite files (if interactive is true, query, else fail)
+# overwrite: Only overwriting is allowed, not creation of new files.
+# debug: Print debugging info.
+typeset interactive=false noover=false overwrite=false debug=false
+name=${0##*/}
+
+case "$name" in
+ncp|nmv) cmd=/bin/${name#?} ;;
+*) echo "$name: Must be invoked as ncp or nmv." 1>&2 ; exit 2;;
+esac
+
+Usage="Usage: $name [-cfhio] $cmd-cmd-line"
+
+while getopts :cfhiox opt; do
+ case $opt in
+ h) phelp; exit 0;;
+ x) debug=true ;;
+ c) noover=true ;;
+ i) noover=true ; interactive=true ;;
+ f) noover=false ; interactive=false ;;
+ o) overwrite=true ; noover=false ; interactive=false;;
+ +?) echo "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
+ ?) echo "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
+ esac
+done
+
+# remove args that were options
+shift $((OPTIND - 1))
+
+if [ $# -lt 2 ]; then
+ echo -e "$Usage\nUse -h for help."
+ exit
+fi
+
+Check()
+{
+ if [ ! -f "$1" ] && $overwrite; then
+ echo "$name: $1: File does not exist." 1>&2
+ return 1
+ elif [ -f "$1" ] && $noover; then
+ if [ $interactive = false ] || [ ! -t 0 ] || [ ! -t 1 ]; then
+ echo "$name: $1: File exists." 1>&2
+ return 1
+ else
+ while :; do
+ echo -n \
+"$name: $1: File exists. Overwrite? (y)es/(n)o/(a)bort/(Y)es for all: " 1>&2
+ read reply
+ case "$reply" in
+ y*)
+ echo "$name: Overwriting $1."
+ return 0
+ ;;
+ Y*)
+ echo "$name: Overwriting $1."
+ interactive=false
+ noover=false
+ return 0
+ ;;
+ [nN]*)
+ echo "$name: Skipping $2."
+ return 1
+ ;;
+ [aA]*)
+ echo "$name: Aborting."
+ exit 1
+ ;;
+ *)
+ echo "$name: Invalid response." 1>&2
+ ;;
+ esac
+ done
+ fi
+ else
+ return 0
+ fi
+}
+
+# i is the index of the filename being examined
+# lastarg is the index of the last filename before the dest directory name
+typeset -i i=0 lastarg=$(($#-1))
+
+# Sets argv[0..$#-1]
+argv=("$@")
+$debug && echo argv = "${argv[@]}" 1>&2
+dest=${argv[lastarg]}
+
+if $debug; then
+ echo \
+"interactive=$interactive noover=$noover overwrite=$overwrite debug=$debug
+lastarg=$lastarg dest=$dest name=$name cmd=$cmd
+files=$*" 1>&2
+fi
+
+if $noover || $overwrite; then
+ $debug && echo "checking for existance of directories..." 1>&2
+ # If the destination is not intended to be a directory...
+ if [ $# -eq 2 ] && [ ! -d "$dest" ]; then
+ Check "$dest" "$1" || exit 0 # No files to copy
+ else
+ while [ $i -lt $lastarg ]; do
+ Check "$dest/${argv[i]##*/}" "${argv[i]}" || unset argv[i]
+ let i+=1
+ done
+ fi
+fi
+
+[ ${#argv[@]} -lt 2 ] && exit 0
+
+# If only 2 args are given, mv/cp will not insist that the destination
+# be a directory, which we want if the destination ends in "/" or if
+# the original number of args was >2.
+# $# is still the original number of args.
+# Tack the file name onto the destination to force this behaviour.
+
+lastisslash()
+{
+ case "$1" in
+ */) return 0;;
+ *) return 1;;
+ esac
+}
+
+if [ ${#argv[@]} = 2 ] && { lastisslash "$2" || [ $# -gt 2 ]; }; then
+ $debug && echo "Appending filename." 1>&2
+ # Don't know which element of argv[] holds the source filename,
+ # since may have started with more than 1 source file & had some unset.
+ # So, compact args to make it easy to find the set one.
+ argv=("${argv[@]}")
+ argv[1]="${argv[1]}/${argv[0]##*/}"
+fi
+
+$debug && echo "Executing command: $cmd ${argv[@]}" 1>&2
+exec $cmd "${argv[@]}"
diff --git a/examples/scripts.v2/pages b/examples/scripts.v2/pages
new file mode 100644
index 0000000..66ebc5f
--- /dev/null
+++ b/examples/scripts.v2/pages
@@ -0,0 +1,187 @@
+#! /bin/bash
+#
+# original from:
+# @(#) pages.sh 1.0 92/09/26
+# 92/09/05 John H. DuBois III (jhdiii@armory.com)
+# 92/09/26 Added help
+#
+# conversion to bash v2 syntax by Chet Ramey
+
+Usage="$0 [-h] [-n lines/page] page-ranges [file ...]"
+
+usage()
+{
+ echo "$Usage" 1>&2
+}
+
+phelp()
+{
+echo "$0: print selected pages.
+Usage: $Usage
+
+If no file names are given, the standard input is read.
+
+The input is grouped into pages and a selected subset of them is printed.
+Formfeeds are acted on correctly.
+
+If the output device does automatic line wrap, lines that longer than
+the width of the output device will result in incorrect output.
+The first non-option argument is a list of pages to print.
+
+Pages are given as a list of ranges separated by commas.
+A range is either one number, two numbers separted by a dash,
+or one number followed by a dash. A range consisting of one
+number followed by a dash extends to the end of the document.
+
+Options:
+-n sets the number of lines per page to n. The default is 66."
+}
+
+while getopts "n:h" opt; do
+ case "$opt" in
+ n) LinesPerPage=$OPTARG;;
+ h) phelp; exit 0;;
+ *) usage; exit 2;;
+ esac
+done
+
+shift $(($OPTIND - 1))
+
+if [ $# -eq 0 ]; then
+ echo $0: no page ranges given. 1>&2
+ usage
+ exit 1
+fi
+
+PageList=$1
+shift
+
+gawk "
+BEGIN {
+ PageList = \"$PageList\"; LinesPerPage = \"$LinesPerPage\""'
+ if (LinesPerPage == "")
+ LinesPerPage = 66
+ else
+ if (LinesPerPage !~ "[1-9][0-9]*")
+ ErrExit("Bad value for lines per page: " LinesPerPage)
+ LinesPerPage += 0
+ NumRanges = split(PageList,Ranges,",")
+ for (i = 1; i <= NumRanges; i++) {
+ if ((StartRange = EndRange = Ranges[i]) !~ "^[0-9]+(-([0-9]+)?)?$")
+ ErrExit("Bad range \"" StartRange "\"")
+ sub("-.*","",StartRange)
+ sub(".*-","",EndRange)
+ if (EndRange == "")
+ EndRange = 2 ^ 30
+ # Force StartRange and EndRange to be numeric values
+ if ((StartRange += 0) == 0 || (EndRange += 0) == 0)
+ ErrExit("Invalid page number \"0\" in range " Ranges[i])
+ if (StartRange > EndRange)
+ ErrExit("Start page comes after end page in range " Ranges[i])
+ TmpRangeStarts[i] = StartRange
+ TmpRangeEnds[i] = EndRange
+ }
+
+ # Sort ranges
+ qsort(TmpRangeStarts,k)
+ RangeEnds[0] = 0
+ for (i = 1; i <= NumRanges; i++) {
+ RangeEnds[i] = TmpRangeEnds[k[i]]
+ if ((RangeStarts[i] = TmpRangeStarts[k[i]]) <= RangeEnds[i - 1])
+ ErrExit("Overlapping ranges: " Ranges[k[i]] "," Ranges[k[i - 1]])
+ }
+
+ RangeNum = LineNum = PageNum = 1
+ InRange = In(PageNum,RangeStarts[RangeNum],RangeEnds[RangeNum])
+ FS = "\014"
+}
+
+{
+ if (LineNum > LinesPerPage)
+ NewPage()
+ if (InRange)
+ printf "%s",$1
+ # Deal with formfeeds
+ for (i = 2; i <= NF; i++) {
+ if (InRange)
+ printf "\014"
+ NewPage()
+ if (InRange)
+ printf "%s",$i
+ }
+ if (InRange)
+ print ""
+ LineNum++
+}
+
+function NewPage() {
+ PageNum++
+ LineNum = 1
+ # At the start of each page, check whether we are in a print range
+ WereInRange = InRange
+ InRange = In(PageNum,RangeStarts[RangeNum],RangeEnds[RangeNum])
+ # If last page was in range and we no longer are, move to next range
+ if (WereInRange && !InRange && ++RangeNum > NumRanges)
+ exit
+}
+
+function In(a,Min,Max) {
+ return (Min <= a && a <= Max)
+}
+
+function ErrExit(S) {
+ print S > "/dev/stderr"
+ Err = 1
+ exit 1
+}
+
+# Arr is an array of values with arbitrary indices.
+# Array k is returned with numeric indices 1..n.
+# The values in k are the indices of array arr,
+# ordered so that if array arr is stepped through
+# in the order arr[k[1]] .. arr[k[n]], it will be stepped
+# through in order of the values of its elements.
+# The return value is the number of elements in the array (n).
+function qsort(arr,k, ArrInd,end) {
+ end = 0
+ for (ArrInd in arr)
+ k[++end] = ArrInd;
+ qsortseg(arr,k,1,end);
+ return end
+}
+
+function qsortseg(arr,k,start,end, left,right,sepval,tmp,tmpe,tmps) {
+ # handle two-element case explicitely for a tiny speedup
+ if ((end - start) == 1) {
+ if (arr[tmps = k[start]] > arr[tmpe = k[end]]) {
+ k[start] = tmpe
+ k[end] = tmps
+ }
+ return
+ }
+ left = start;
+ right = end;
+ sepval = arr[k[int((left + right) / 2)]]
+ # Make every element <= sepval be to the left of every element > sepval
+ while (left < right) {
+ while (arr[k[left]] < sepval)
+ left++
+ while (arr[k[right]] > sepval)
+ right--
+ if (left < right) {
+ tmp = k[left]
+ k[left++] = k[right]
+ k[right--] = tmp
+ }
+ }
+ if (left == right)
+ if (arr[k[left]] < sepval)
+ left++
+ else
+ right--
+ if (start < right)
+ qsortseg(arr,k,start,right)
+ if (left < end)
+ qsortseg(arr,k,left,end)
+}
+' "$@"
diff --git a/examples/scripts.v2/pf b/examples/scripts.v2/pf
new file mode 100644
index 0000000..ab6cd2c
--- /dev/null
+++ b/examples/scripts.v2/pf
@@ -0,0 +1,127 @@
+#! /bin/bash
+#
+# original from:
+#
+# @(#) p.ksh 1.1 93/11/09
+# p: page compressed & plain files in the order given
+# 92/01/23 john h. dubois iii (john@armory.com)
+# 92/02/14 changed incorrect zpack to pcat
+# 92/02/16 added help
+# 92/10/11 search for file.Z and file.z if file not found
+# 92/10/18 pass options to pager
+# 93/11/09 Understand gzipped files too
+# Wait after printing message about unreadable files
+# Make less prompt include name of file being uncompressed
+#
+# conversion to bash v2 by Chet Ramey; renamed to pf
+#
+DefPager=/local/bin/less
+
+istrue()
+{
+ test 0 -ne "$1"
+}
+
+warn()
+{
+ echo "$@" 1>&2
+}
+
+if [ "$1" = -h ]; then
+ echo \
+"$0: page a file.
+Usage: $0 [pager-option ...] [filename ...]
+Files are paged by the program specified in the user's PAGER
+environment variable, or by $DefPager if PAGER is not set.
+If no filename is given, text to page is read from the standard input.
+If filenames are given, they are either paged directly, or unpacked/
+uncompressed and then paged. Files are assumed to be in packed, compressed,
+or gzipped format if the filename ends in .Z, .z, or .gz respectively.
+If a filename that does not end in .Z, .z, or .gz is not found, it is
+searched for with one of those extensions attached.
+Each group of plain files is paged by a single instance of the pager.
+Each packed or compressed file is paged by a separate instance of the
+pager.
+Initial arguments beginning with + or - are taken to be pager options and
+are passed to each instance of the pager.
+If a pager option takes a value it should be given with the option as a
+single argument (with no space between the option and the value)."
+ exit 0
+fi
+
+# Get pager options
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -*|+*) Opts="$Opts $1" ; shift;;
+ *) break;;
+ esac
+done
+
+[ -z "$PAGER" ] && PAGER=$DefPager
+
+# Read from stdin
+[ $# = 0 ] && exec $PAGER $Opts
+
+typeset -i filenum=0 badfile=0
+
+for file; do
+ if [ ! -r "$file" ]; then
+ case "$file" in
+ *.[Zz]|*.gz)
+ # Check if user specified a compressed file without giving its extension
+ for ext in Z z gz; do
+ if [ -r "$file.$ext" ]; then
+ file="$file.$ext"
+ break
+ fi
+ done;;
+ esac
+ fi
+ if [ ! -r "$file" ]; then
+ warn "$file: cannot read."
+ badfile=1
+ else
+ files[filenum]=$file
+ let filenum+=1
+ fi
+done
+
+if istrue $badfile && [ $filenum -gt 0 ]; then
+ echo -n "Press return to continue..." 1>&2
+ read
+fi
+
+unset plain
+
+for file in "${files[@]}"; do
+ case "$file" in
+ *.[zZ]|*.gz)
+ set -- Z zcat z pcat gz gzcat
+ # Find correct uncompression program
+ while [ $# -gt 0 ]; do
+ case "$file" in
+ *.$1)
+ # Page any uncompressed files so that they will be read
+ # in the correct order
+ [ ${#plain[@]} -gt 0 ] && $PAGER $Opts "${plain[@]}"
+ unset plain[*]
+ # If page is less, set the prompt to include the name of
+ # the file being uncompressed. Escape the . in the extension
+ # because less treats is specially in prompts (other dots
+ # in filenames will still be mucked with).
+ case "$PAGER" in
+ *less) Prompt="-P[${file%.$1}\\.$1] (%pb\\%)" ;;
+ *) unset Prompt ;;
+ esac
+ $2 "$file" | $PAGER "$Prompt" $Opts
+ break
+ esac
+ shift 2
+ done
+ ;;
+ *) plain[${#plain[@]}]=$file;;
+ esac
+done
+
+# Page any uncompressed files that haven't been paged yet
+[ ${#plain[@]} -gt 0 ] && exec $PAGER $Opts "${plain[@]}"
diff --git a/examples/scripts.v2/pmtop b/examples/scripts.v2/pmtop
new file mode 100644
index 0000000..cc419ac
--- /dev/null
+++ b/examples/scripts.v2/pmtop
@@ -0,0 +1,25 @@
+#! /bin/bash
+#
+# pmtop - poor man's `top' for SunOS 4.x
+#
+
+CLEAR=clear # could also be 'tput clear'
+HEADER="USER PID %CPU %MEM SZ RSS TT STAT START TIME COMMAND"
+
+if [ -n "$LINES" ]; then
+ SS=$(( $LINES - 2 ))
+else
+ SS=20
+fi
+
+while :
+do
+ $CLEAR
+ echo "$HEADER"
+ ps -aux | sort -nr -k 3 | sed ${SS}q
+ sleep 5
+done
+
+exit 0
+
+
diff --git a/examples/scripts.v2/ren b/examples/scripts.v2/ren
new file mode 100644
index 0000000..da76026
--- /dev/null
+++ b/examples/scripts.v2/ren
@@ -0,0 +1,585 @@
+#!/bin/bash
+#@ This program came from: ftp://ftp.armory.com/pub/scripts/ren
+#@ Look there for the latest version.
+#@ If you don't find it, look through http://www.armory.com/~ftp/
+#
+# @(#) ren 2.1.1 2002-03-17
+# 1990-06-01 John H. DuBois III (john@armory.com)
+# 1991-02-25 Improved help info
+# 1992-06-07 Remove quotes from around shell pattern as required by new ksh
+# 1994-05-10 Exit if no globbing chars given.
+# 1995-01-23 Allow filename set to be given on command line.
+# 1997-09-24 1.4 Let [] be used for globbing. Added x option.
+# 1997-11-26 1.4.1 Notice if the sequences of globbing chars aren't the same.
+# 1999-05-13 Changed name to ren to avoid conflict with /etc/rename
+# 2000-01-01 1.4.2 Let input patterns that contain whitespace be used.
+# 2001-02-14 1.5 Better test for whether old & new globbing seqs are identical.
+# 2001-02-20 1.6 Added pP options.
+# 2001-02-27 1.7 Added qf options. Improved interpretation of rename patterns.
+# 2001-05-10 1.8 Allow multiple pP options. Added Qr options.
+# 2001-07-25 2.0 Added mz options.
+# 2001-11-25 2.1 Allow segment ranges to be given with -m. Work under ksh93.
+# 2002-03-17 2.1.1 Fixed bug in test for legal expressions.
+
+# todo: It would be nice to be able to escape metacharacters with '\'
+# todo: Should enhance patterns to make ] in a pair of brackets work ([]])
+# todo: Allow use of all ksh globbing patterns.
+# todo: Allow use of extended regexps, with () to enumerate pieces and \num to
+# todo: select them.
+#
+# Modifications for bash made by Chet Ramey <chet@po.cwru.edu>
+
+name=${0##*/}
+Usage="Usage:
+$name [-fhqtv] [-m<segstart[:segend]=operation>] [-z<len>] [-[pP]<pattern>]
+ oldpattern [newpattern [filename ...]]
+or
+$name -r [same options as above] oldpattern newpattern directory ..."
+tell=false
+verbose=false
+warn=true
+warnNoFiles=true
+debug=false
+recurse=false
+inclPat=
+exclPat=
+declare -i inclCt=0 exclCt=0
+check=true
+declare -i j op_end_seg
+
+# Begin bash additions
+shopt -s extglob
+
+#
+# ksh print emulation
+#
+# print [-Rnprsu[n]] [-f format] [arg ...]
+#
+# - end of options
+# -R BSD-style -- only accept -n, no escapes
+# -n do not add trailing newline
+# -p no-op (no coprocesses)
+# -r no escapes
+# -s print to the history file
+# -u n redirect output to fd n
+# -f format printf "$format" "$@"
+#
+
+print()
+{
+ local eflag=-e
+ local nflag= fflag= c
+ local fd=1
+
+ OPTIND=1
+ while getopts "fRnprsu:" c
+ do
+ case $c in
+ R) eflag= ;;
+ r) eflag= ;;
+ n) nflag=-n ;;
+ s) sflag=y ;;
+ f) fflag=y ;;
+ u) fd=$OPTARG ;;
+ p) ;;
+ esac
+ done
+ shift $(( $OPTIND - 1 ))
+
+ if [ -n "$fflag" ]; then
+ builtin printf "$@" >&$fd
+ return
+ fi
+
+ case "$sflag" in
+ y) builtin history -s "$*" ;;
+ *) builtin echo $eflag $nflag "$@" >&$fd
+ esac
+}
+
+# End bash additions
+
+while getopts :htvxp:P:fqQrm:z: opt; do
+ case $opt in
+ h)
+ print -r -- \
+"$name: rename files by changing parts of filenames that match a pattern.
+$Usage
+oldpattern and newpattern are subsets of sh filename patterns; the only
+globbing operators (wildcards) allowed are ?, *, and []. All filenames that
+match oldpattern will be renamed with the filename characters that match the
+constant (non-globbing) characters of oldpattern changed to the corresponding
+constant characters of newpattern. The characters of the filename that match
+the globbing operators of oldpattern will be preserved. Globbing operators
+in oldpattern must occur in the same order in newpattern; for every globbing
+operators in newpattern there must be an identical globbing operators in
+oldpattern in the same sequence. Both arguments should be quoted since
+globbing operators are special to the shell. If filenames are given, only
+those named are acted on; if not, all filenames that match oldpattern are acted
+on. newpattern is required in all cases except when -m is given and no further
+arguments are given.
+If you are unsure whether a $name command will do what you intend, issue it
+with the -t option first to be sure.
+Examples:
+$name \"/tmp/foo*.ba.?\" \"/tmp/new*x?\"
+ All filenames in /tmp that match foo*.ba.? will have the \"foo\" part
+ replaced by \"new\" and the \".ba.\" part replaced by \"x\".
+ For example, /tmp/fooblah.ba.baz would be renamed to /tmp/newblahxbaz.
+$name \* \*- foo bar baz
+ foo, bar, and baz will be renamed to foo-, bar-, and baz-.
+$name '????????' '????-??-??'
+ All filenames that are 8 characters long will be changed such that dashes
+ are inserted after the 4th and 6th characters.
+Options:
+-h: Print this help.
+-r: Recursive operation. Filenames given on the command line after oldpattern
+ and newpattern are taken to be directories to traverse recursively. For
+ each subdirectory found, the specified renaming is applied to any matching
+ filenames. oldpattern and newpattern should not include any directory
+ components.
+-p<pattern>, -P<pattern>: Act only on filenames that do (if -p is given) or do
+ not (if -P is given) match the sh-style filename globbing pattern
+ <pattern>. This further restricts the filenames that are acted on, beyond
+ the filename selection produced by oldpattern and the filename list (if
+ any). <pattern> must be quoted to prevent it from being interpreted by the
+ shell. Multiple instances of these options may be given. In this case,
+ filenames are acted on only if they match at least one of the patterns
+ given with -p and do not match any of the patterns given with -P.
+-m<segstart[:segend]=operation>: For each file being renamed, perform a
+ mathematical operation on the string that results from concatenating
+ together the filename segments that matched globbing operator numbers
+ segstart through segend, where operators are numbered in order of
+ occurrence from the left. For example, in the pattern a?b*c[0-9]f, segment
+ 1 consists of the character that matched ?, segment 2 consists of the
+ character(s) that matched *, and segment 3 consists of the character that
+ matched [0-9]. The selected segments are replaced with the result of the
+ mathematical operation.
+ The concatenated string must consist of characters that can be interpreted
+ as a decimal integer; if it does not, the filename is not acted on. This
+ number is assigned to the variable 'i', which can be referenced by the
+ operation. The operations available are those understood by the ksh
+ interpreter, which includes most of the operators and syntax of the C
+ language. The original filename segment is replaced by the result of the
+ operation. If -m is used, newpattern may be an empty string or not given
+ at all (if no directory/file names are given). In this case, it is taken
+ to be the same as oldpattern.
+ If segend is given, any fixed text that occurs in the pattern between the
+ starting and ending globbing segments is discarded. If there are fewer
+ globbing segments than segend, no complaint is issued; the string is formed
+ from segment segstart through the last segment that does exist.
+ If segend is not given, the only segment acted on is startseg.
+ Examples:
+ $name -m3=i+6 '??*.ppm'
+ This is equivalent to:
+ $name -m3=i+6 '??*.ppm' '??*.ppm'
+ Since the old pattern and new pattern are identical, this would
+ normally be a no-op. But in this case, if a filename of ab079.ppm is
+ given, it is changed to ab85.ppm.
+ $name '-m1:2=i*2' 'foo??bar'
+ This will change a file named foo12bar to foo24bar
+ $name '-m1:2=i*2' 'foo?xyz?bar'
+ This will also change a file named foo1xyz2bar to foo24bar
+-z<len>: Set the size of the number fields that result when -m is used. The
+ field is truncated to the trailing <len> digits or filled out to <len>
+ digits with leading zeroes. In the above example, if -z3 is given, the
+ output filename will be ab085.ppm.
+-f: Force rename. By default, $name will not rename files if a file with the
+ new filename already exists. If -f is given, $name will carry out the
+ rename anyway.
+-q: Quiet operation. By default, if -f is given, $name will still notify the
+ user if a rename results in replacement of an already-existing filename.
+ If -q is given, no notification is issued.
+-Q: Suppress other warnings. By default, a warning is issued if no files are
+ selected for acting upon. If -Q is given, no warning is issued.
+-v: Show the rename commands being executed.
+-t: Show what rename commands would be done, but do not carry them out."
+ exit 0
+ ;;
+ f)
+ check=false
+ ;;
+ q)
+ warn=false
+ ;;
+ Q)
+ warnNoFiles=false
+ ;;
+ r)
+ warnNoFiles=false
+ recurse=true
+ ;;
+ t)
+ tell=true
+ ;;
+ v)
+ verbose=true
+ ;;
+ x)
+ verbose=true
+ debug=true
+ ;;
+ p)
+ inclPats[inclCt]=$OPTARG
+ ((inclCt+=1))
+ ;;
+ P)
+ exclPats[exclCt]=$OPTARG
+ ((exclCt+=1))
+ ;;
+ m)
+ # Store operation for each segment number in ops[num]
+ # Store ending segment number in op_end_seg[num]
+ range=${OPTARG%%=*}
+ op=${OPTARG#*=}
+ start=${range%%:*}
+ end=${range#*:}
+ if [[ "$start" != +([0-9]) || "$start" -eq 0 ]]; then
+ print -ru2 -- "$name: Bad starting segment number given with -m: $start"
+ exit 1
+ fi
+ if [[ "$end" != +([0-9]) || "$end" -eq 0 ]]; then
+ print -ru2 -- "$name: Bad ending segment number given with -m: $end"
+ exit 1
+ fi
+ if [[ start -gt end ]]; then
+ print -ru2 -- "$name: Ending segment ($end) is less than starting segment ($start)"
+ exit 1
+ fi
+ if [[ "$op" != @(|*[!_a-zA-Z0-9])i@(|[!_a-zA-Z0-9]*) ]]; then
+ print -ru2 -- \
+ "$name: Operation given with -m does not reference 'i': $op"
+ exit 1
+ fi
+ # Test whether operation is legal. let returns 1 both for error
+ # indication and when last expression evaluates to 0, so evaluate 1
+ # after test expression.
+ i=1
+ let "$op" 1 2>/dev/null || {
+ print -ru2 -- \
+ "$name: Bad operation given with -m: $op"
+ exit 1
+ }
+ ops[start]=$op
+ op_end_seg[start]=$end
+ ;;
+ z)
+ if [[ "$OPTARG" != +([0-9]) || "$OPTARG" -eq 0 ]]; then
+ print -ru2 -- "$name: Bad length given with -z: $OPTARG"
+ exit 1
+ fi
+ typeset -Z$OPTARG j || exit 1
+ ;;
+ +?) # no way to tell getopts to not treat +x as an option
+ print -r -u2 "$name: Do not prefix options with '+'."
+ exit 1
+ ;;
+ :)
+ print -r -u2 \
+"$name: Option -$OPTARG requires a value.
+$Usage
+Use -h for help."
+ exit 1
+ ;;
+ \?)
+ print -r -u2 \
+"$name: -$OPTARG: no such option.
+$Usage
+Use -h for help."
+ exit 1
+ ;;
+ esac
+done
+
+# remove args that were options
+let OPTIND=OPTIND-1
+shift $OPTIND
+
+oldpat=$1
+newpat=$2
+
+# If -m is given, a non-existant or null newpat should be set to oldpat
+if [ ${#ops[*]} -gt 0 ]; then
+ case $# in
+ 0)
+ ;;
+ 1)
+ set -- "$oldpat" "$oldpat"
+ newpat=$oldpat
+ $debug && print -ru2 -- "Set new pattern to: $newpat"
+ ;;
+ *)
+ if [ -z "$newpat" ]; then
+ shift 2
+ set -- "$oldpat" "$oldpat" "$@"
+ newpat=$oldpat
+ $debug && print -ru2 -- "Set new pattern to: $newpat"
+ fi
+ ;;
+ esac
+fi
+
+# Make sure input patterns that contain whitespace can be expanded properly
+IFS=
+
+origPat=$oldpat
+
+# Generate list of filenames to act on.
+case $# in
+[01])
+ print -u2 "$Usage\nUse -h for help."
+ exit 1
+ ;;
+2)
+ if $recurse; then
+ print -r -u2 "$name: No directory names given with -r. Use -h for help."
+ exit 1
+ fi
+ set -- $oldpat # Get list of all filenames that match 1st globbing pattern.
+ if [[ ! -a $1 ]]; then
+ $warnNoFiles && print -r -- "$name: No filenames match this pattern: $oldpat"
+ exit
+ fi
+ ;;
+*)
+ shift 2
+ ;;
+esac
+
+integer patSegNum=1 numPatSegs
+
+# For old ksh
+# while [[ "$oldpat" = *'[\*\?]'* ]]; do
+
+# Example oldpat: foo*.a
+# Example newpat: bar*.b
+
+# Build list of non-pattern segments and globbing segments found in arguments.
+# Note the patterns given are used to get the list of filenames to act on,
+# to delimit constant segments, and to determine which parts of filenames are
+# to be replaced.
+# Examples given for first iteration (in the example, the only iteration)
+# The || newpat is to ensure that new pattern does not have more globbing
+# segments than old pattern
+while [[ "$oldpat" = *@([\*\?]|\[+([!\]])\])* ||
+ "$newpat" = *@([\*\?]|\[+([!\]])\])* ]]; do
+ ## Get leftmost globbing pattern in oldpat
+
+ # Make r be oldpat with smallest left piece that includes a globbing
+ # pattern removed from it
+ r=${oldpat#*@([\*\?]|\[+([!\]])\])} # r=.a
+ # Make pat be oldpat with the above removed from it, leaving smallest
+ # left piece that includes a globbing pattern
+ pat=${oldpat%%"$r"} # pat=foo*
+ # Make l be pat with the globbing pattern removed from the right,
+ # leaving a constant string
+ l=${pat%@([\*\?]|\[+([!\]])\])} # l=foo
+ # Remove the constant part of pat from the left, leaving the globbing
+ # pattern
+ pat=${pat#"$l"} # pat=*
+
+ # Do the same thing for newpat, solely to provide a reliable test that
+ # both oldpat & newpat contain exactly the same sequence of globbing
+ # patterns.
+ r=${newpat#*@([\*\?]|\[+([!\]])\])} # r=.b
+ npat=${newpat%%"$r"} # pat=bar*
+ l=${npat%@([\*\?]|\[+([!\]])\])} # l=bar
+ npat=${npat#"$l"} # npat=*
+
+ if [[ "$pat" != "$npat" ]]; then
+ print -ru2 -- \
+"$name: Old-pattern and new-pattern do not have the same sequence of globbing chars.
+Pattern segment $patSegNum: Old pattern: $pat New pattern: $npat"
+ exit 1
+ fi
+
+ ## Find parts before & after pattern
+ # oldpre[] stores the old constant part before the pattern,
+ # so that it can be removed and replaced with the new constant part.
+ oldpre[patSegNum]=${oldpat%%"$pat"*} # oldpre[1]=foo
+ # oldsuf stores the part that follows the globbing pattern,
+ # so that it too can be removed.
+ # After oldpre[] & oldsuf[] have been removed from a filename, what remains
+ # is the part matched by the globbing pattern, which is to be retained.
+ oldsuf[patSegNum]=${oldpat#*"$pat"} # oldsuf[1]=.a
+ # newpre[] stores the new constant part before the pattern,
+ # so that it can be used to replace the old constant part.
+ newpre[patSegNum]=${newpat%%"$pat"*} # newpre[1]=bar
+ # Get rid of processed part of patterns
+ oldpat=${oldpat#${oldpre[patSegNum]}"$pat"} # oldpat=.a
+ newpat=${newpat#${newpre[patSegNum]}"$pat"} # newpat=.b
+ # Store either * or ? in pats[], depending on whether this segment matches 1
+ # or any number of characters.
+ [[ "$pat" = \[* ]] && pat=?
+ pats[patSegNum]=$pat
+ ((patSegNum+=1))
+done
+
+if [ patSegNum -eq 1 ]; then
+ print -u2 "No globbing chars in pattern."
+ exit 1
+fi
+
+oldpre[patSegNum]=${oldpat%%"$pat"*} # oldpre[2]=.a
+oldsuf[patSegNum]=${oldpat#*"$pat"} # oldsuf[2]=.a
+newpre[patSegNum]=${newpat%%"$pat"*} # newpre[2]=.b
+
+numPatSegs=patSegNum
+
+if $debug; then
+ patSegNum=1
+ while [[ patSegNum -le numPatSegs ]]; do
+ print -ru2 -- \
+"Old prefix: <${oldpre[patSegNum]}> Old suffix: <${oldsuf[patSegNum]}> New prefix: <${newpre[patSegNum]}> Pattern: <${pats[patSegNum]}>"
+ ((patSegNum+=1))
+ done
+fi
+
+# Example filename: foox.a
+# Example oldpat: foo*.a
+# Example newpat: bar*.b
+
+integer numFiles=0
+
+# Usage: renameFile filename [dirname]
+# [dirname] is a directory name to prefix filenames with when they are printed
+# for informational purposes.
+# Uses globals:
+# inclCt exclCt inclPats[] exclPats[] ops[]
+# numPatSegs oldpre[] oldsuf[] newpre[] pats[]
+# check warn tell verbose name
+# Modifies globals: numFiles
+function renameFile {
+ typeset file=$1 subdir=$2
+ integer patSegNum patnum
+ typeset origname porigname newfile matchtext pnewfile matchsegs
+ integer startseg endseg
+
+ origname=$file # origname=foox.a
+ porigname=$subdir$file
+ # Unfortunately, ksh88 does not do a good job of allowing for patterns
+ # stored in variables. Without the conditional expression being eval'ed,
+ # only sh patterns are recognized. If the expression is eval'ed, full
+ # ksh expressions can be used, but then expressions that contain whitespace
+ # break unless the user passed a pattern with the whitespace properly
+ # quoted, which is not intuititive. This is fixed in ksh93; full patterns
+ # work without being eval'ed.
+ if [ inclCt -gt 0 ]; then
+ patnum=0
+ while [ patnum -lt inclCt ]; do
+ [[ "$file" = ${inclPats[patnum]} ]] && break
+ ((patnum+=1))
+ done
+ if [ patnum -eq inclCt ]; then
+ $debug && print -ru2 -- "Skipping not-included filename '$porigname'"
+ return 1
+ fi
+ fi
+ patnum=0
+ while [ patnum -lt exclCt ]; do
+ if [[ "$file" = ${exclPats[patnum]} ]]; then
+ $debug && print -ru2 -- "Skipping excluded filename '$porigname'"
+ return 1
+ fi
+ ((patnum+=1))
+ done
+ # Extract matching segments from filename
+ ((numFiles+=1))
+ patSegNum=1
+ while [[ patSegNum -le numPatSegs ]]; do
+ # Remove a fixed prefix iteration: 1 2
+ file=${file#${oldpre[patSegNum]}} # file=x.a file=
+ # Save the part of this suffix that is to be retained. To do this, we
+ # need to know what part of the suffix matched the current globbing
+ # segment. If the globbing segment is a *, this is done by removing
+ # the minimum part of the suffix that matches oldsuf (since * matches
+ # the longest segment possible). If the globbing segment is ? or []
+ # (the latter has already been coverted to ?), it is done by taking the
+ # next character.
+ if [ "${pats[patSegNum]}" == \? ]; then
+ matchtext=${file#?}
+ matchtext=${file%$matchtext}
+ else
+ matchtext=${file%${oldsuf[patSegNum]}} # matchtext=x matchtext=
+ fi
+ $debug && print -ru2 -- "Matching segment $patSegNum: $matchtext"
+ file=${file#$matchtext} # file=.a file=.a
+
+ matchsegs[patSegNum]=$matchtext
+ ((patSegNum+=1))
+ done
+
+ # Paste fixed and matching segments together to form new filename.
+ patSegNum=0
+ newfile=
+ while [[ patSegNum -le numPatSegs ]]; do
+ matchtext=${matchsegs[patSegNum]}
+ startseg=patSegNum
+ if [ -n "${ops[startseg]}" ]; then
+ endseg=${op_end_seg[startseg]}
+ while [ patSegNum -lt endseg ]; do
+ ((patSegNum+=1))
+ matchtext=$matchtext${matchsegs[patSegNum]}
+ done
+ if [[ "$matchtext" != +([-0-9]) ]]; then
+ print -ru2 -- \
+"Segment(s) $startseg - $endseg ($matchtext) of file '$porigname' do not form an integer; skipping this file."
+ return 2
+ fi
+ i=$matchtext
+ let "j=${ops[startseg]}" || {
+ print -ru2 -- \
+"Operation failed on segment(s) $startseg - $endseg ($matchtext) of file '$file'; skipping this file."
+ return 2
+ }
+ $debug && print -ru2 -- "Converted $matchtext to $j"
+ matchtext=$j
+ fi
+ newfile=$newfile${newpre[startseg]}$matchtext # newfile=barx newfile=barx.b
+ ((patSegNum+=1))
+ done
+
+ pnewfile=$subdir$newfile
+ if $check && [ -e "$newfile" ]; then
+ $warn &&
+ print -ru2 -- "$name: Not renaming \"$porigname\"; destination filename \"$pnewfile\" already exists."
+ return 2
+ fi
+ if $tell; then
+ print -n -r -- "Would move: $porigname -> $pnewfile"
+ $warn && [ -e "$newfile" ] && print -n -r " (destination filename already exists; would replace it)"
+ print ""
+ else
+ if $verbose; then
+ print -n -r -- "Moving: $porigname -> $pnewfile"
+ $warn && [ -e "$newfile" ] && print -n -r -- " (replacing old destination filename \"$pnewfile\")"
+ print ""
+ elif $warn && [ -e "$newfile" ]; then
+ print -r -- "$name: Note: Replacing old file \"$pnewfile\""
+ fi
+ mv -f -- "$origname" "$newfile"
+ fi
+}
+
+if $recurse; then
+ oPWD=$PWD
+ find "$@" -depth -type d ! -name '*
+*' -print | while read dir; do
+ cd -- "$oPWD"
+ if cd -- "$dir"; then
+ for file in $origPat; do
+ renameFile "$file" "$dir/"
+ done
+ else
+ print -ru2 -- "$name: Could not access directory '$dir' - skipped."
+ fi
+ done
+else
+ for file; do
+ renameFile "$file"
+ done
+fi
+
+if [ numFiles -eq 0 ]; then
+ $warnNoFiles && print -ru2 -- \
+ "$name: All filenames were excluded by patterns given with -p or -P."
+fi
diff --git a/examples/scripts.v2/rename b/examples/scripts.v2/rename
new file mode 100644
index 0000000..96c46d6
--- /dev/null
+++ b/examples/scripts.v2/rename
@@ -0,0 +1,122 @@
+#! /bin/bash
+#
+# original from:
+# @(#) rename.ksh 1.1 94/05/10
+# 90/06/01 John DuBois (spcecdt@armory.com)
+# 91/02/25 Improved help info
+# 92/06/07 remove quotes from around shell pattern as required by new ksh
+# 94/05/10 Exit if no globbing chars given.
+#
+# conversion to bash v2 syntax by Chet Ramey
+
+phelp()
+{
+echo "$usage
+All files that match oldpattern will be renamed with the
+filename components that match the constant parts of oldpattern
+changed to the corresponding constant parts of newpattern.
+The components of the filename that match variable parts of
+oldpattern will be preserved. Variable parts in oldpattern
+must occur in the same order in newpattern. Variables parts
+can be '?' and '*'.
+Example:
+rename \"/tmp/foo*.ba.?\" \"/tmp/new*x?\"
+All files in /tmp that match foo*.ba.? will have the \"foo\" part
+replaced by \"new\" and the \".ba.\" part replaced by \"x\"."
+}
+
+usage="usage: $name [-htv] oldpattern newpattern"
+name=${0##/}
+
+while getopts "htv" opt; do
+ case "$opt" in
+ t) tell=true;;
+ v) verbose=true;;
+ h) phelp; exit 0;;
+ *) echo "$name: $usage" 1>&2; exit 2;;
+ esac
+done
+shift $((OPTIND - 1))
+
+if [ $# -lt 2 ]; then
+ phelp
+ exit 2
+fi
+
+oldpat=$1
+newpat=$2
+
+set -- $1
+if [ ! -e "$1" ]; then
+ echo "$name: no files match $oldpat."
+ exit 1
+fi
+
+typeset -i i=1 j
+
+# Example oldpat: foo*.a
+# Example newpat: bar*.b
+
+# Examples given for first iteration (in the example, the only interation)
+while :; do
+ case "$oldpat" in
+ *[\*\?]*) ;;
+ *) break;;
+ esac
+
+ # Get leftmost globbing pattern in oldpat
+ pat=${oldpat#*[\*\?]} # pat=.a
+ pat=${oldpat%%"$pat"} # pat=foo*
+ pat=${pat##*[!\?\*]} # pat=*
+ # Find parts before & after pattern
+ oldpre[i]=${oldpat%%"$pat"*} # oldpre[1]=foo
+ oldsuf[i]=${oldpat#*"$pat"} # oldsuf[1]=.a
+ newpre[i]=${newpat%%"$pat"*} # newpre[1]=bar
+ # Get rid of processed part of patterns
+ oldpat=${oldpat#${oldpre[i]}"$pat"} # oldpat=.a
+ newpat=${newpat#${newpre[i]}"$pat"} # newpat=.b
+ let i=i+1
+done
+
+if [ $i -eq 1 ]; then
+ echo "No globbing chars in pattern." 1>&2
+ exit 1
+fi
+
+oldpre[i]=${oldpat%%"$pat"*} # oldpre[2]=.a
+oldsuf[i]=${oldpat#*"$pat"} # oldsuf[2]=.a
+newpre[i]=${newpat%%"$pat"*} # newpre[2]=.b
+
+if [ -n "$verbose" ]; then
+ j=1
+ while let "j < i"; do
+ echo \
+"Old prefix: ${oldpre[j]} Old suffix: ${oldsuf[j]} New prefix: ${newpre[j]}"
+ let j=j+1
+ done
+fi
+
+# Example file: foox.a
+
+for file; do
+ j=1
+ origname=$file # origname=foox.a
+ newfile=
+ while let "j <= i"; do
+ # Peel off a prefix interation 1 2
+ file=${file#${oldpre[j]}} # file=x.a file=
+ # Save the part of this prefix that is to be retained
+ const=${file%${oldsuf[j]}} # const=x const=
+ newfile=$newfile${newpre[j]}$const # newfile=barx newfile=barx.b
+ file=${file#$const} # file=.a file=.a
+ let j=j+1
+ done
+ if [ -n "$tell" ]; then
+ echo "Would move \"$origname\" to \"$newfile\"."
+ else
+ if [ -n "$verbose" ]; then
+ echo "Moving \"$origname\" to \"$newfile\"."
+ fi
+ mv $origname $newfile
+ fi
+done
diff --git a/examples/scripts.v2/repeat b/examples/scripts.v2/repeat
new file mode 100644
index 0000000..b6fccac
--- /dev/null
+++ b/examples/scripts.v2/repeat
@@ -0,0 +1,121 @@
+#! /bin/bash
+#
+# original from:
+# repeat: repeat a command.
+# @(#) repeat.ksh 1.1 93/06/03
+# 90/05 john h. dubois iii (john@armory.com)
+# 90/11 added help
+# 93/06/03 Added s, h, p, and v options
+#
+# conversion to bash v2 syntax done by Chet Ramey
+
+istrue()
+{
+ test 0 -ne "$1"
+}
+
+isfalse()
+{
+ test 0 -eq "$1"
+}
+
+phelp()
+{
+echo "$name: repeatedly execute a command line.
+$Usage
+commandline is executed once for each integer from startcount through endcount
+inclusive. The default for startcount is 1 if a positive endcount or no
+endcount is given, and -1 if a negative endcount is given. A count
+parameter consisting of a single number is taken to be an endcount. If
+only an endcount is given and it is positive, commandline is executed
+endcount times. endcount may be less than startcount. If no endcount is
+given (e.g. a count parameter of \"10-\"), commandline execution repeats
+indefinitely with the iteration variable incrementing in a positive
+direction. A count parameter of consisting of \"-\" will repeat
+indefinitely starting with 1.
+
+Note that quoting and variables in commandline are interpreted twice, once
+when it is passed to the repeat command, and once when it is actually executed.
+
+The iteration variable is \"count\". If \$count is used in commandline, make
+sure it is quoted with ' or \.
+
+Options:
+-h: Print this help.
+-p: Print value of iteration variable on stderr before each iteration.
+-s <sec>: sleep for <sec> seconds after each iteration except the last.
+-v: Print start and end values before beginning."
+}
+
+name=${0##*/}
+Usage="Usage: repeat [-hpv] [-s <sec>] [[startcount]-][endcount] command [arg ...]"
+
+typeset -i count=1 forever=0 sleep=0 print=0 verbose=0
+
+while getopts :0123456789hpvs: opt; do
+ case $opt in
+ h) phelp; exit 0;;
+ s) sleep=$OPTARG || exit 1;;
+ p) print=1;;
+ v)verbose=1;;
+ [0-9]) break;;
+ +?) echo "$name: options should not be preceded by a '+'." 1>&2; exit 2;;
+ ?) echo "$name: $OPTARG: bad option. Use -h for help." 1>&2; exit 2;;
+ esac
+done
+
+# remove args that were options
+shift $((OPTIND-1))
+
+if [ $# -lt 2 ]; then
+ echo -e "$Usage\nUse -h for help." 1>&2
+ exit 2
+fi
+
+case "$1" in
+-[0-9]*-|[0-9]*-)
+ # Start value only
+ count=${1%-}
+ forever=1
+ end="-1";
+ ;;
+-[0-9]*-[0-9]*|[0-9]*-[0-9]*)
+ # Start and end value
+ s=${1%-}
+ end=${s##[0-9]*-}
+ count=${s%-$end}
+ ;;
+-[0-9]*|[0-9]*)
+ end=$1
+ case "$end" in
+ -\*) count=-1;;
+ esac
+ ;;
+-)
+ forever=1
+ end="-1";
+ ;;
+*)
+ echo "$name: bad count parameter: $1" 1>&2
+ exit 1
+ ;;
+esac
+
+shift
+
+[ -z "$end" ] && [ $count -le "$end" ] && increment=1 || increment=-1
+
+istrue $verbose && echo "start=$count end=$end" 1>&2
+
+# Need to do this here so that up to this point, -0 will keep the leading -
+# and end will not be 0 if no value assigned
+typeset -i end
+
+let end+=increment # make loop inclusive of original endcount
+
+while istrue $forever || [ $count -ne $end ]; do
+ istrue $print && echo $count 1>&2
+ eval "$@"
+ istrue $sleep && sleep $sleep
+ let count+=increment
+done
diff --git a/examples/scripts.v2/shprof b/examples/scripts.v2/shprof
new file mode 100644
index 0000000..73a1bb9
--- /dev/null
+++ b/examples/scripts.v2/shprof
@@ -0,0 +1,66 @@
+#! /bin/bash
+#
+# shprof - a line profiler for shell scripts
+#
+# adapted from a similar program included in `The New KornShell' by
+# Bolsky and Korn and posted to usenet by bsh20858@challenger.fhda.edu
+#
+# converted to bash v2 syntax by Chet Ramey
+#
+TMPFILE=${TMP:-/tmp}/shprof$$
+
+trap 'rm -f $TMPFILE' EXIT
+
+errexit()
+{
+ echo $0: "$@" >&2
+ exit 1
+}
+
+# create script with profiling enabled
+cat > $TMPFILE <<- \_EOF_
+ declare -a _line
+ _profend()
+ {
+ case "$1" in
+ /*|./*) file="$1" ;;
+ *) file=$(type -path "$1") ;;
+ esac
+
+ echo "*** line profile for $file ***"
+ i=1;
+ while read -r && [ $i -le $NLINE ]; do
+ count=${_line[$i]}
+ if [ "$count" -gt 0 ]; then
+ echo "[$count] $i: $REPLY"
+ fi
+ i=$((i + 1))
+ done <$file
+_EOF_
+# make the profiling script remove itself after printing line stats
+echo "rm -f $TMPFILE" >> $TMPFILE
+cat >> $TMPFILE <<- \_EOF_
+ }
+ _command=$1
+ shift
+ i=1
+ NLINE=$(wc -l < "$_command")
+ while [ $i -le $NLINE ]; do
+ _line[$i]=0
+ i=$((i + 1))
+ done
+ unset i
+ trap "_profend ${_command}" EXIT
+ trap '_line[$LINENO]=$((${_line[$LINENO]} + 1))' DEBUG
+ LINENO=0
+_EOF_
+
+case "$1" in
+/*|./*) file=$1 ;;
+*) file=$((type -path "$1")) ;;
+esac
+
+cat "${file-$1}" >> $TMPFILE || errexit "${1}: cannot open"
+chmod +x $TMPFILE
+
+exec -a "$file" $TMPFILE "$@"
diff --git a/examples/scripts.v2/untar b/examples/scripts.v2/untar
new file mode 100644
index 0000000..1ba6b6b
--- /dev/null
+++ b/examples/scripts.v2/untar
@@ -0,0 +1,80 @@
+#! /bin/bash
+#
+# original from:
+# @(#) untar.ksh 1.0 93/11/10
+# 92/10/08 john h. dubois iii (john@armory.com)
+# 92/10/31 make it actually work if archive isn't in current dir!
+# 93/11/10 Added pack and gzip archive support
+#
+# conversion to bash v2 syntax done by Chet Ramey
+
+phelp()
+{
+echo \
+"$name: extract tar archives into directories, uncompressing if neccessary.
+Usage: $name archive[.tar[.[Z|gz]]] ..
+If an archive name given does not end in .tar, .tar.Z, or .tar.gz, it is
+searched for first with .tar added, then .tar.Z, and then .tar.gz added.
+The real filename must end in either .tar, .tar.Z, or .tar.gz. A
+directory with the name of the archive is created in the current directory
+(not necessarily the directory that the archive is in) if it does not
+exist, and the the contents of the archive are extracted into it.
+Absolute pathnames in tarfiles are suppressed."
+}
+
+if [ $# -eq 0 ]; then
+ phelp
+ exit 1
+fi
+
+name=${0##/}
+OWD=$PWD
+
+for file; do
+ cd $OWD
+ case "$file" in
+ *.tar.Z) ArchiveName=${file%%.tar.Z} zcat=zcat;;
+ *.tar.z) ArchiveName=${file%%.tar.z} zcat=pcat;;
+ *.tar.gz) ArchiveName=${file%%.tar.gz} zcat=gzcat;;
+ *) ArchiveName=$file
+ for ext in "" .Z .z .gz; do
+ if [ -f "$file.tar$ext" ]; then
+ file="$file.tar$ext"
+ break
+ fi
+ done
+ if [ ! -f "$file" ]; then
+ echo "$file: cannot find archive." 1>&2
+ continue
+ fi
+ ;;
+ esac
+ if [ ! -r "$file" ]; then
+ echo "$file: cannot read." >&2
+ continue
+ fi
+ DirName=${ArchiveName##*/}
+ [ -d "$DirName" ] || {
+ mkdir "$DirName" || {
+ echo "$DirName: could not make archive directory." 1>&2
+ continue
+ }
+ }
+
+ cd $DirName || {
+ echo "$name: cannot cd to $DirName" 1>&2
+ continue
+ }
+
+ case "$file" in
+ /*) ;;
+ *) file=$OWD/$file ;;
+ esac
+
+ echo "Extracting archive $file into directory $DirName..."
+ case "$file" in
+ *.tar.Z|*.tar.z|*.tar.gz) $zcat $file | tar xvf -;;
+ *.tar) tar xvf $file;;
+ esac
+ echo "Done extracting archive $file into directory $DirName."
+done
diff --git a/examples/scripts.v2/uudec b/examples/scripts.v2/uudec
new file mode 100644
index 0000000..7984058
--- /dev/null
+++ b/examples/scripts.v2/uudec
@@ -0,0 +1,45 @@
+:
+# @(#) uudec.sh 1.0 93/11/22
+# 92/08/04 john@armory.com (John H. DuBois III)
+# 93/11/22 Added help.
+
+isfalse()
+{
+ test 0 -eq "$1"
+}
+
+phelp()
+{
+"$name: process uuencoded files.
+Usage: uudec [-h] filename ...
+Options:
+-h: Print this help."
+}
+
+name=${0##*/}
+
+typeset -i force=0
+
+while getopts "hf" opt; do
+ case "$opt" in
+ h) phelp; exit 0;;
+ f) force=1;;
+ *) echo "$Usage" 1>&2; exit 2;;
+ esac
+done
+
+shift $((OPTIND - 1))
+
+for file; do
+ echo "$file"
+ while read b mode filename && [ "$b" != begin ]; do :; done < "$file"
+ if [ "$b" = begin ]; then
+ if [ -f "$filename" ] && isfalse $force; then
+ echo "Output file \"$filename\" exists. Not written."
+ else
+ uudecode "$file"
+ fi
+ else
+ echo "No begin line."
+ fi
+done
diff --git a/examples/scripts.v2/uuenc b/examples/scripts.v2/uuenc
new file mode 100644
index 0000000..480aa48
--- /dev/null
+++ b/examples/scripts.v2/uuenc
@@ -0,0 +1,69 @@
+#! /bin/bash
+#
+# original from:
+# @(#) uuenc.ksh 1.0 93/09/18
+# 93/09/18 john h. dubois iii (john@armory.com)
+#
+# conversion to bash v2 syntax by Chet Ramey
+
+istrue()
+{
+ test 0 -ne "$1"
+}
+
+isfalse()
+{
+ test 0 -eq "$1"
+}
+
+phelp()
+{
+echo "$name: uuencode files.
+$Usage
+For each filename given, $name uuencodes the file, using the final
+component of the file's path as the stored filename in the uuencoded
+archive and, with a .${SUF} appended, as the name to store the archive in.
+Example:
+$name /tmp/foo
+The file /tmp/foo is uuencoded, with \"foo\" stored as the name to uudecode
+the file into, and the output is stored in a file in the current directory
+with the name \"foo.${SUF}\".
+Options:
+-f: Normally, if the file the output would be stored in already exists,
+ it is not overwritten and an error message is printed. If -f (force)
+ is given, it is silently overwritten.
+-h: Print this help."
+}
+
+name=${0##*/}
+Usage="Usage: $name [-hf] <filename> ..."
+typeset -i force=0
+
+SUF=uu
+
+while getopts :hf opt; do
+ case $opt in
+ h) phelp; exit 0;;
+ f) force=1;;
+ +?) echo "$name: options should not be preceded by a '+'." 1>&2 ; exit 2;;
+ ?) echo "$name: $OPTARG: bad option. Use -h for help." 1>&2 ; exit 2;;
+ esac
+done
+
+# remove args that were options
+shift $((OPTIND - 1))
+
+if [ $# -lt 1 ]; then
+ echo "$Usage\nUse -h for help." 1>&2
+ exit
+fi
+
+for file; do
+ tail=${file##*/}
+ out="$tail.${SUF}"
+ if isfalse $force && [ -a "$out" ]; then
+ echo "$name: $out: file exists. Use -f to overwrite." 1>&2
+ else
+ uuencode $file $tail > $out
+ fi
+done
diff --git a/examples/scripts.v2/vtree b/examples/scripts.v2/vtree
new file mode 100644
index 0000000..7523cc8
--- /dev/null
+++ b/examples/scripts.v2/vtree
@@ -0,0 +1,137 @@
+#! /bin/bash
+#
+# original from:
+# vtree: visual directory tree
+# @(#) vtree.sh 1.1 91/07/01
+# 90/04 john h. dubois iii (john@armory.com)
+# 91/07/01 fixed bug that caused problems when dir given on command line,
+# added some info to help, changed to 4-space indenting
+#
+# conversion to bash v2 syntax done by Chet Ramey
+#
+help=\
+"Syntax: vtree [startdir] [namelen=#] [linelen=#]
+If startdir is not specified, tree will start at current dir.
+
+namelen specifies the minimum number of characters of a directory name that
+are guaranteed to be printed.
+This is a tradeoff between the number of tree levels that can fit on a
+screen line and the number of chars of each dir name that can be printed.
+In most cases it will be possible to print more than namelen characters of
+the name (a name up to namelen+1 chars will always be printed in full),
+but in some cases truncation down to namelen chars will occur.
+If truncation occurs, a '>' is printed at the end of the name.
+namelen=8 (the default) typically causes about 5 dirs/1000 to be truncated.
+namelen=7 typically causes about 10 dirs/1000 to be truncated.
+namelen=8 will allow 6 full length dirs to be printed in 79 columns.
+namelen=7 will allow 7 full length dirs to be printed in 79 columns;
+
+linelen specifies the maximum number of characters to print on one screen
+line. All characters beyond this are truncated. The default is 1024.
+To avoid line wrap on an 80 column terminal with autowrap, use linelen=79.
+"
+
+for i in "$@"; do
+ case $i in
+ -h) echo "$help"; exit;;
+ *=*)
+ vars="$vars $i"
+ ;;
+ *)
+ if [ ! -x $i ] || [ ! -d $i ]; then # arg must be a dir and executable
+ echo "$i: directory not accessible."
+ exit
+ fi
+ cd $i
+ ;;
+ esac
+ shift
+done
+
+pwd # print path of root of tree
+
+# find all directories depth first; ignore permission errors
+find . -type d -print 2> /dev/null | \
+gawk -F/ '
+
+# Do this block for NR == 1 instead of BEGIN because command line var
+# assignments are not done until after BEGIN block is executed.
+NR == 1 {
+ if (namelen)
+ MaxLen = namelen;
+ else
+ MaxLen = 8;
+ if (!linelen)
+ linelen = 1024
+ HSpace = substr(" ",1,MaxLen); # used to indent tree
+ n = 0; # number of dirs found on one major branch
+}
+
+$0 != "." { # do for every line produced by find except tree root dir
+ if (NF == 2 && n > 0) # print major branch whenever a new one starts
+ list();
+ Depth[n] = NF - 1; # record depth and name of dir
+ Name[n++] = $NF;
+}
+
+END {
+ list() # print last major branch
+}
+
+function list() {
+ Line = Name[0]; # initialize first line of branch to be branch base
+ for (i = 1; i < n; i++) { # for each name in major branch
+ if (Depth[i] == Depth[i-1] + 1)
+ AddHLink(); # if moving deeper into branch, use same line
+ else {
+ print substr(Line,1,linelen); # last line is done; print it
+ Line = ""; # start new line
+ # print indentation, vert links, and vert/horiz links
+ for (d = 1; d < Depth[i] - 1; d++) # for each level of indentation
+ # if a vert. link has been established for this level
+ if (VLink[d])
+ Line = Line HSpace " | ";
+ else # print empty indentation
+ Line = Line HSpace " ";
+ # Print last part of vert. link
+ if (VLink[d] == i) {
+ VLink[d] = 0; # mark level for no vert link
+ Line = Line HSpace " \\--";
+ }
+ else
+ Line = Line HSpace " |--";
+ }
+ Line = Line Name[i]; # Add dir name to line
+ }
+ print substr(Line,1,linelen); # print last line of major branch
+ n = 0; # reset name counter
+}
+
+function AddHLink() {
+ NDepth = Depth[i]; # Depth of this name
+ VLink[NDepth - 1] = 0;
+ # search until a name found at a level less than this one
+ for (j = i + 1; j < n && Depth[j] >= NDepth; j++)
+ # keep track of last name that VLink should connect to
+ if (Depth[j] == NDepth)
+ VLink[NDepth - 1] = j;
+ if (VLink[NDepth - 1]) {
+ NLine = substr(Line,1,(NDepth - 2) * (MaxLen + 4) + MaxLen + 1);
+ if (length(NLine) < length(Line))
+ Line = substr(NLine,1,length(NLine) - 1) ">"
+ else
+ Line = NLine;
+ Line = Line substr("--------------+--",
+ 18 - ((NDepth - 1) * (MaxLen + 4) - length(Line)));
+ }
+ else {
+ NLine = substr(Line,1,(NDepth - 2) * (MaxLen + 4) + MaxLen + 3);
+ if (length(NLine) < length(Line))
+ Line = substr(NLine,1,length(NLine) - 1) ">"
+ else
+ Line = NLine;
+ Line = Line substr("-----------------",
+ 1,(NDepth - 1) * (MaxLen + 4) - length(Line));
+ }
+}
+' $vars
diff --git a/examples/scripts.v2/where b/examples/scripts.v2/where
new file mode 100644
index 0000000..7a1dbde
--- /dev/null
+++ b/examples/scripts.v2/where
@@ -0,0 +1,111 @@
+#! /bin/bash
+#
+# original from:
+# @(#) where.ksh 1.1 94/07/11
+# 91/01/12 john h. dubois iii (john@armory.com)
+# 92/08/10 Only print executable *files*.
+# 92/10/06 Print err msg if no match found.
+# 92/11/27 Added implicit *
+# 93/07/23 Print help only if -h is given.
+# 94/01/01 Added -x option
+# 94/07/11 Don't bother with eval
+#
+# conversion to bash v2 syntax done by Chet Ramey
+
+name=${0##*/}
+Usage="Usage: $name [-hx] 'pattern' ..."
+typeset -i exact=0
+
+phelp()
+{
+echo "$name: find executable files in PATH that match patterns.
+$Usage
+$name searches each directory specified in the PATH environment variable
+for executable files that match the specified patterns. Patterns are
+given as Korn shell filename patterns. They are surrounded by implicit
+'*' characters, so that \"foo\" will match any executble file whose name
+contains contains \"foo\". This can be overridden by using '^' and '$' to
+force a match to start at the beginning and end at the end of a filename
+respectively. Characters that are special to the shell must generally
+be protected from the shell by surrounding them with quotes.
+Examples:
+$name foo
+lists all executable files in PATH that contain foo.
+$name '^b*sh$'
+lists all executable files in PATH that start with b and end with sh.
+An error message is printed if a no matching file is found for a pattern.
+Options:
+-h: Print this help.
+-x: Find exact matches only; equivalent to putting ^ and $ at the start
+ and end of each pattern."
+}
+
+istrue()
+{
+ test 0 -ne "$1"
+}
+
+isfalse()
+{
+ test 0 -eq "$1"
+}
+
+while getopts "xh" opt; do
+ case "$opt" in
+ x) exact=1;;
+ h) phelp ; exit 0;;
+ *) echo -e "$Usage\nUse -h for help." 1>&2; exit 2;;
+ esac
+done
+
+shift $((OPTIND-1))
+
+set +f # make sure filename globbing is on
+Args=("$@") # save args
+
+OIFS=$IFS
+IFS=: # Make PATH be split on :
+Paths=($PATH)
+IFS=$OIFS
+
+for arg in "${Args[@]}"; do
+
+ # get rid of leading ^
+ if istrue $exact; then
+ arg=${arg}
+ else
+ case "$arg" in
+ ^*) arg=${arg#?};;
+ *) arg="*$arg" ;; # Pattern is not anchored at start
+ esac
+ fi
+
+ # get rid of trailing $
+ if istrue $exact; then
+ arg="$arg"
+ else
+ case "$arg" in
+ *\$) arg=${arg%?} ;;
+ *) arg="$arg*" ;;
+ esac
+ fi
+
+ found=0 # Pattern not found yet
+ Patterns=
+ # Make a pattern for each element of PATH
+ for PathElem in "${Paths[@]}"; do
+ [ -z "$PathElem" ] && PathElem=.
+ Patterns="$Patterns $PathElem/$arg"
+ done
+
+ # Find all pattern matches that are executable regular files.
+ for file in $Patterns; do
+ if [ -x "$file" ] && [ -f "$file" ]; then
+ echo "$file"
+ found=1
+ fi
+ done
+ if [ $found = 0 ]; then
+ echo "$arg: not found." 1>&2
+ fi
+done
diff --git a/examples/scripts/adventure.sh b/examples/scripts/adventure.sh
new file mode 100755
index 0000000..1694450
--- /dev/null
+++ b/examples/scripts/adventure.sh
@@ -0,0 +1,553 @@
+#!/bin/bash
+# ash -- "Adventure shell"
+# last edit: 86/04/21 D A Gwyn
+# SCCS ID: @(#)ash.sh 1.4
+
+OPATH=$PATH
+
+ask()
+{
+ echo -n "$@" '[y/n] '
+ read ans
+
+ case "$ans" in
+ y*|Y*)
+ return 0
+ ;;
+ *)
+ return 1
+ ;;
+ esac
+}
+
+CAT=${PAGER:-more}
+
+ash_inst()
+{
+ cat <<- EOF
+
+ Instructions for the Adventure shell
+
+ Welcome to the Adventure shell! In this exploration of the UNIX file
+ system, I will act as your eyes and hands. As you move around, I will
+ describe whatever is visible and will carry out your commands. The
+ general form of a command is
+ Verb Object Extra_stuff.
+ Most commands pay no attention to the "Extra_stuff", and many do not
+ need an "Object". A typical command is
+ get all
+ which picks up all files in the current "room" (directory). You can
+ find out what you are carrying by typing the command
+ inventory
+ The command "help" results in a full description of all commands that I
+ understand. To quit the Adventure shell, type
+ quit
+
+ There are UNIX monsters lurking in the background. These are also
+ known as "commands with arguments".
+
+ Good luck!
+ EOF
+}
+
+ash_help()
+{
+echo "I understand the following commands (synonyms in parentheses):"
+echo ""
+
+echo "change OBJECT to NEW_NAME changes the name of the object"
+echo "clone OBJECT as NEW_NAME duplicates the object"
+echo "drop OBJECTS leaves the objects in the room"
+echo "enter (go) PASSAGE takes the labeled passage"
+echo "examine OBJECTS describes the objects in detail"
+echo "feed OBJECT to MONSTER stuffs the object into a UNIX monster"
+echo "get (take) OBJECTS picks up the specified objects"
+echo "gripe (bug) report a problem with the Adventure shell"
+echo "help prints this summary"
+echo "inventory (i) tells what you are carrying"
+echo "kill (destroy) OBJECTS destroys the objects"
+echo "look (l) describes the room, including hidden objects"
+echo "open (read) OBJECT shows the contents of an object"
+echo "quit (exit) leaves the Adventure shell"
+echo "resurrect OBJECTS attempts to restore dead objects"
+echo "steal OBJECT from MONSTER obtains the object from a UNIX monster"
+echo "throw OBJECT at daemon feeds the object to the printer daemon"
+echo "up takes the overhead passage"
+echo "wake MONSTER awakens a UNIX monster"
+echo "where (w) tells you where you are"
+echo "xyzzy moves you to your home"
+}
+
+MAINT=chet@ins.cwru.edu
+
+PATH=/usr/ucb:/bin:/usr/bin:/usr/local/bin:.
+export PATH
+
+trap 'echo Ouch!' 2 3
+#trap '' 18 # disable Berkeley job control
+
+#ash_lk(){ echo " $1 " | fgrep " $2 " >&- 2>&-; }
+ash_lk(){ echo " $1 " | fgrep -q " $2 " >/dev/null 2>&1 ; }
+ash_pr(){ echo $* | tr ' ' '\012' | pr -5 -t -w75 -l$[ ( $# + 4 ) / 5 ]; }
+ash_rm(){ echo " $1 " | sed -e "s/ $2 / /" -e 's/^ //' -e 's/ $//'; }
+
+# enable history, bang history expansion, and emacs editing
+set -o history
+set -o histexpand
+set -o emacs
+
+cd
+LIM=.limbo # $HOME/$LIM contains "destroyed" objects
+mkdir $LIM || {
+ echo "ash: cannot mkdir $LIM: exiting"
+ exit 1
+}
+KNAP=.knapsack # $HOME/$KNAP contains objects being "carried"
+if [ ! -d $KNAP ]
+then mkdir $KNAP >/dev/null 2>&1
+ if [ $? = 0 ]
+ then echo 'You found a discarded empty knapsack.'
+ else echo 'You have no knapsack to carry things in.'
+ exit 1
+ fi
+else echo 'One moment while I peek in your old knapsack...'
+fi
+
+kn=`echo \`ls -a $KNAP | sed -e '/^\.$/d' -e '/^\.\.$/d'\``
+
+if ask 'Welcome to the Adventure shell! Do you need instructions?'
+then
+ ash_inst
+ echo -n 'Type a newline to continue: '
+ read
+fi
+
+wiz=false
+cha=false
+prev=$LIM
+while :
+do room=`pwd`
+ if [ $room != $prev ]
+ then if [ $room = $HOME ]
+ then echo 'You are in your own home.'
+ else echo "You have entered $room."
+ fi
+ exs=
+ obs=
+ hexs=
+ hobs=
+ f=false
+ for i in `ls -a`
+ do case $i in
+ .|..) ;;
+ .*) if [ -f $i ]
+ then hobs="$hobs $i"
+ elif [ -d $i ]
+ then hexs="$hexs $i"
+ else f=true
+ fi
+ ;;
+ *) if [ -f $i ]
+ then obs="$obs $i"
+ elif [ -d $i ]
+ then exs="$exs $i"
+ else f=true
+ fi
+ ;;
+ esac
+ done
+ if [ "$obs" ]
+ then echo 'This room contains:'
+ ash_pr $obs
+ else echo 'The room looks empty.'
+ fi
+ if [ "$exs" ]
+ then echo 'There are exits labeled:'
+ ash_pr $exs
+ echo 'as well as a passage overhead.'
+ else echo 'There is a passage overhead.'
+ fi
+ if sh -c $f
+ then echo 'There are shadowy figures in the corner.'
+ fi
+ prev=$room
+ fi
+
+ read -e -p '-advsh> ' verb obj x # prompt is '-advsh> '
+ if [ $? != 0 ]
+ then verb=quit # EOF
+ fi
+
+ case $verb in
+ change) if [ "$obj" ]
+ then if ash_lk "$obs $hobs" "$obj"
+ then set -- $x
+ case "$1" in
+ to) if [ "$2" ]
+ then if [ -f $2 ]
+ then echo "You must destroy $2 first."
+ set --
+ fi
+ if [ "$2" ]
+ then if mv $obj $2 # >&- 2>&-
+ then echo "The $obj shimmers and turns into $2."
+ obs=`ash_rm "$2 $obs" "$obj"`
+ else echo "There is a cloud of smoke but the $obj is unchanged."
+ fi
+ fi
+ else echo 'To what?'
+ fi
+ ;;
+ *) echo "Change $obj to what?"
+ ;;
+ esac
+ else if ash_lk "$kn" "$obj"
+ then echo 'You must drop it first.'
+ else echo "I see no $obj here."
+ fi
+ fi
+ else echo 'Change what?'
+ fi
+ ;;
+ clone) if [ "$obj" ]
+ then if ash_lk "$obs $hobs" "$obj"
+ then if [ ! -r $obj ]
+ then echo "The $obj does not wish to be cloned."
+ else set -- $x
+ case "$1" in
+ as) if [ "$2" ]
+ then if [ -f $2 ]
+ then echo "You must destroy $2 first."
+ else if cp $obj $2 # >&- 2>&-
+ then echo "Poof! When the smoke clears, you see the new $2."
+ obs="$obs $2"
+ else echo 'You hear a dull thud but no clone appears.'
+ fi
+ fi
+ else echo 'As what?'
+ fi
+ ;;
+ *) echo "Clone $obj as what?"
+ ;;
+ esac
+ fi
+ else if ash_lk "$kn" "$obj"
+ then echo 'You must drop it first.'
+ else echo "I see no $obj here."
+ fi
+ fi
+ else echo 'Clone what?'
+ fi
+ ;;
+ drop) if [ "$obj" ]
+ then for it in $obj $x
+ do if ash_lk "$kn" "$it"
+ then if [ -w $it ]
+ then echo "You must destroy $it first."
+ else if mv $HOME/$KNAP/$it $it # >&- 2>&-
+ then echo "$it: dropped."
+ kn=`ash_rm "$kn" "$it"`
+ obs=`echo $it $obs`
+ else echo "The $it is caught in your knapsack."
+ fi
+ fi
+ else echo "You're not carrying the $it!"
+ fi
+ done
+ else echo 'Drop what?'
+ fi
+ ;;
+ enter|go) if [ "$obj" ]
+ then if [ $obj != up ]
+ then if ash_lk "$exs $hexs" "$obj"
+ then if [ -x $obj ]
+ then if cd $obj
+ then echo 'You squeeze through the passage.'
+ else echo "You can't go that direction."
+ fi
+ else echo 'An invisible force blocks your way.'
+ fi
+ else echo 'I see no such passage.'
+ fi
+ else if cd ..
+ then echo 'You struggle upwards.'
+ else echo "You can't reach that high."
+ fi
+ fi
+ else echo 'Which passage?'
+ fi
+ ;;
+ examine) if [ "$obj" ]
+ then if [ $obj = all ]
+ then $obj=`echo $obs $exs`
+ x=
+ fi
+ for it in $obj $x
+ do if ash_lk "$obs $hobs $exs $hexs" "$it"
+ then echo "Upon close inspection of the $it, you see:"
+ ls -ld $it 2>/dev/null
+ if [ $? != 0 ]
+ then echo "-- when you look directly at the $it, it vanishes."
+ fi
+ else if ash_lk "$kn" "$it"
+ then echo 'You must drop it first.'
+ else echo "I see no $it here."
+ fi
+ fi
+ done
+ else echo 'Examine what?'
+ fi
+ ;;
+ feed) if [ "$obj" ]
+ then if ash_lk "$obs $hobs" "$obj"
+ then set -- $x
+ case "$1" in
+ to) if [ "$2" ]
+ then shift
+ if PATH=$OPATH $* <$obj 2>/dev/null
+ then echo "The $1 monster devours your $obj."
+ if rm -f $obj # >&- 2>&-
+ then obs=`ash_rm "$obs" "$obj"`
+ else echo 'But he spits it back up.'
+ fi
+ else echo "The $1 monster holds his nose in disdain."
+ fi
+ else echo 'To what?'
+ fi
+ ;;
+ *) echo "Feed $obj to what?"
+ ;;
+ esac
+ else if ash_lk "$kn" "$obj"
+ then echo 'You must drop it first.'
+ else echo "I see no $obj here."
+ fi
+ fi
+ else echo 'Feed what?'
+ fi
+ ;;
+ get|take) if [ "$obj" ]
+ then if [ $obj = all ]
+ then obj="$obs"
+ x=
+ fi
+ for it in $obj $x
+ do if ash_lk "$obs $hobs" "$it"
+ then if ash_lk "$kn" "$it"
+ then echo 'You already have one.'
+ else if mv $it $HOME/$KNAP/$it # >&- 2>&-
+ then echo "$it: taken."
+ kn="$it $kn"
+ obs=`ash_rm "$obs" "$it"`
+ else echo "The $it is too heavy."
+ fi
+ fi
+ else echo "I see no $it here."
+ fi
+ done
+ else echo 'Get what?'
+ fi
+ ;;
+ gripe|bug) echo 'Please describe the problem and your situation at the time it failed.\nEnd the bug report with a line containing just a Ctrl-D.'
+ cat | mail $MAINT -s 'ash bug'
+ echo 'Thank you!'
+ ;;
+ help) ash_help
+ ;;
+ inventory|i) if [ "$kn" ]
+ then echo 'Your knapsack contains:'
+ ash_pr $kn
+ else echo 'You are poverty-stricken.'
+ fi
+ ;;
+ kill|destroy) if [ "$obj" ]
+ then if [ $obj = all ]
+ then x=
+ if ask "Do you really want to attempt to $verb them all?"
+ then obj=`echo $obs`
+ else echo 'Chicken!'
+ obj=
+ fi
+ fi
+ for it in $obj $x
+ do if ash_lk "$obs $hobs" "$it"
+ then if mv $it $HOME/$LIM # <&- >&- 2>&-
+ then if [ $verb = kill ]
+ then echo "The $it cannot defend himself; he dies."
+ else echo "You have destroyed the $it; it vanishes."
+ fi
+ obs=`ash_rm "$obs" "$it"`
+ else if [ $verb = kill ]
+ then echo "Your feeble blows are no match for the $it."
+ else echo "The $it is indestructible."
+ fi
+ fi
+ else if ash_lk "$kn" "$it"
+ then echo "You must drop the $it first."
+ found=false
+ else echo "I see no $it here."
+ fi
+ fi
+ done
+ else echo 'Kill what?'
+ fi
+ ;;
+ look|l) obs=`echo $obs $hobs`
+ hobs=
+ if [ "$obs" ]
+ then echo 'The room contains:'
+ ash_pr $obs
+ else echo 'The room is empty.'
+ fi
+ exs=`echo $exs $hexs`
+ hexs=
+ if [ "$exs" ]
+ then echo 'There are exits plainly labeled:'
+ ash_pr $exs
+ echo 'and a passage directly overhead.'
+ else echo 'The only exit is directly overhead.'
+ fi
+ ;;
+ magic) if [ "$obj" = mode ]
+ then if sh -c $cha
+ then echo 'You had your chance and you blew it.'
+ else if ask 'Are you a wizard?'
+ then echo -n 'Prove it! Say the magic word: '
+ read obj
+ if [ "$obj" = armadillo ]
+ then echo 'Yes, master!!'
+ wiz=true
+ else echo "Homie says: I don't think so"
+ cha=true
+ fi
+ else echo "I didn't think so."
+ fi
+ fi
+ else echo 'Nice try.'
+ fi
+ ;;
+ open|read) if [ "$obj" ]
+ then if ash_lk "$obs $hobs" "$obj"
+ then if [ -r $obj ]
+ then if [ -s $obj ]
+ then echo "Opening the $obj reveals:"
+ $CAT < $obj
+ if [ $? != 0 ]
+ then echo '-- oops, you lost the contents!'
+ fi
+ else echo "There is nothing inside the $obj."
+ fi
+ else echo "You do not have the proper tools to open the $obj."
+ fi
+ else if ash_lk "$kn" "$obj"
+ then echo 'You must drop it first.'
+ found=false
+ else echo "I see no $obj here."
+ fi
+ fi
+ else echo 'Open what?'
+ fi
+ ;;
+ quit|exit) if ask 'Do you really want to quit now?'
+ then if [ "$kn" ]
+ then echo 'The contents of your knapsack will still be there next time.'
+ fi
+ rm -rf $HOME/$LIM
+ echo 'See you later!'
+ exit 0
+ fi
+ ;;
+ resurrect) if [ "$obj" ]
+ then for it in $obj $x
+ do if ash_lk "$obs $hobs" "$it"
+ then echo "The $it is already alive and well."
+ else if mv $HOME/$LIM/$it $it # <&- >&- 2>&-
+ then echo "The $it staggers to his feet."
+ obs=`echo $it $obs`
+ else echo "There are sparks but no $it appears."
+ fi
+ fi
+ done
+ else echo 'Resurrect what?'
+ fi
+ ;;
+ steal) if [ "$obj" ]
+ then if ash_lk "$obs $hobs" "$obj"
+ then echo 'There is already one here.'
+ else set -- $x
+ case "$1" in
+ from) if [ "$2" ]
+ then shift
+ if PATH=$OPATH $* >$obj 2>/dev/null
+ then echo "The $1 monster drops the $obj."
+ obs=`echo $obj $obs`
+ else echo "The $1 monster runs away as you approach."
+ rm -f $obj # >&- 2>&-
+ fi
+ else echo 'From what?'
+ fi
+ ;;
+ *) echo "Steal $obj from what?"
+ ;;
+ esac
+ fi
+ else echo 'Steal what?'
+ fi
+ ;;
+ throw) if [ "$obj" ]
+ then if ash_lk "$obs $hobs" "$obj"
+ then set -- $x
+ case "$1" in
+ at) case "$2" in
+ daemon) if sh -c "lpr -r $obj"
+ then echo "The daemon catches the $obj, turns it into paper,\nand leaves it in the basket."
+ obs=`ash_rm "$obs" "$obj"`
+ else echo "The daemon is nowhere to be found."
+ fi
+ ;;
+ *) echo 'At what?'
+ ;;
+ esac
+ ;;
+ *) echo "Throw $obj at what?"
+ ;;
+ esac
+ else if ash_lk "$kn" "$obj"
+ then echo 'It is in your knapsack.'
+ found=false
+ else echo "I see no $obj here."
+ fi
+ fi
+ else echo 'Throw what?'
+ fi
+ ;;
+ u|up) if cd ..
+ then echo 'You pull yourself up a level.'
+ else echo "You can't reach that high."
+ fi
+ ;;
+ wake) if [ "$obj" ]
+ then echo "You awaken the $obj monster:"
+ PATH=$OPATH $obj $x
+ echo 'The monster slithers back into the darkness.'
+ else echo 'Wake what?'
+ fi
+ ;;
+ w|where) echo "You are in $room."
+ ;;
+ xyzzy) if cd
+ then echo 'A strange feeling comes over you.'
+ else echo 'Your spell fizzles out.'
+ fi
+ ;;
+ *) if [ "$verb" ]
+ then if sh -c $wiz
+ then PATH=$OPATH $verb $obj $x
+ else echo "I don't know how to \"$verb\"."
+ echo 'Type "help" for assistance.'
+ fi
+ else echo 'Say something!'
+ fi
+ ;;
+ esac
+done
diff --git a/examples/scripts/bcsh.sh b/examples/scripts/bcsh.sh
new file mode 100755
index 0000000..b810cab
--- /dev/null
+++ b/examples/scripts/bcsh.sh
@@ -0,0 +1,1254 @@
+# 1-Feb-86 09:37:35-MST,30567;000000000001
+# Return-Path: <unix-sources-request@BRL.ARPA>
+# Received: from BRL-TGR.ARPA by SIMTEL20.ARPA with TCP; Sat 1 Feb 86 09:36:16-MST
+# Received: from usenet by TGR.BRL.ARPA id a002623; 1 Feb 86 9:33 EST
+# From: chris <chris@globetek.uucp>
+# Newsgroups: net.sources
+# Subject: Improved Bcsh (Bourne Shell Cshell-Emulator)
+# Message-ID: <219@globetek.UUCP>
+# Date: 30 Jan 86 17:34:26 GMT
+# To: unix-sources@BRL-TGR.ARPA
+#
+# This is a new, improved version of my Bourne shell cshell-emulator.
+# The code has been cleaned up quite a bit, and a couple of new features
+# added (now supports 'noclobber' and 'iclobber' variables). A bug with
+# 'eval' that caused "illegal I/O" error messages on vanilla V7 shells has
+# also been fixed.
+
+# I have posted the program in its entirety because a context diff of the
+# old and new versions was longer than the new version...
+
+# --Chris
+# Bcsh -- A Simple Cshell-Like Command Pre-Processor For The Bourne Shell
+#
+# "Copyright (c) Chris Robertson, December 1985"
+#
+# This software may be used for any purpose provided the original
+# copyright notice and this notice are affixed thereto. No warranties of
+# any kind whatsoever are provided with this software, and it is hereby
+# understood that the author is not liable for any damagages arising
+# from the use of this software.
+#
+# Features Which the Cshell Does Not Have:
+# ----------------------------------------
+#
+# + command history persists across bcsh sessions
+# + global last-command editing via 'g^string1^string2^' syntax
+# + edit any command via $EDITOR or $VISUAL editors
+# + history file name, .bcshrc file name, alias file name, and number
+# of commands saved on termination can be set by environment variables
+# + prompt may evaluate commands, such as `pwd`, `date`, etc.
+# + the whole text of interactive 'for' and 'while' loops and 'if'
+# statements goes into the history list and may be re-run or edited
+# + multiple copies of commands and requests to see command history
+# are not added to the history list
+# + the history mechanism actually stores all commands entered in a
+# current session, not just $history of them. This means that you
+# can increase $history on the fly and at once have a larger history.
+#
+#
+# Synonyms:
+# ---------
+#
+# logout, exit, bye write out history file and exit
+# h, history show current history list
+#
+#
+# Aliases:
+# --------
+#
+# alias NAME CMND create an alias called NAME to run CMND
+# unalias NAME remove the alias NAME
+#
+# There are no 'current-session only' aliases -- all alias and unalias
+# commands are permanent, and stored in the $aliasfile.
+#
+# If an alias contains positional variables -- $1, $2, $*, etc. -- any
+# arguments following the alias name are considered to be values for
+# those variables, and the alias is turned into a command of the form
+# 'set - arguments;alias'. Otherwise, a simple substitution is performed
+# for the alias and the rest of the command preserved. The cshell
+# convention of using '\!:n' in an alias to get bits of the current
+# command is mercifully abandoned.
+#
+# Quotes are not necessary around the commands comprising an alias;
+# in fact, any enclosing quotes are stripped when the alias is added
+# to the file.
+#
+# A couple of typical aliases might be:
+#
+# goto cd $1;pwd
+# l ls -F
+#
+# Note that aliasing something to "commands;logout" will not work -- if
+# you want something to happen routinely on logout put it in the file
+# specified by $logoutfile, default = $HOME/.blogout.
+#
+#
+# Command Substitutions:
+# ----------------------
+#
+# !! substitute last command from history list
+# !!:N substitute Nth element of last command from
+# history list -- 0 = command name, 1 = 1st arg
+# !!:$ substitute last element of last command from
+# history list
+# !!:* substitute all arguments to last command
+# from history list
+# !NUMBER substitute command NUMBER from the history list
+# !NUMBER:N as above, but substitute Nth element, where
+# 0 = command name, 1 = 1st arg, etc.
+# !NUMBER:$ as above, but substitute last element
+# !NUMBER:* as above, but substitute all arguments
+# !-NUMBER substitute the command NUMBER lines from the
+# end of the history list; 1 = last command
+# !-NUMBER:N as above, but substitute Nth element, where
+# 0 = command name, 1 = 1st arg, etc.
+# !-NUMBER:$ as above, but substitute last element
+# !-NUMBER:* as above, but substitute all arguments
+# !?STRING substitute most-recent command from history list
+# containing STRING -- STRING must be enclosed in
+# braces if followed by any other characters
+# !?STRING:N as above, but substitute Nth element, where
+# 0 = command name, 1 = 1st arg, etc.
+# !?STRING:$ as above, but substitute last element
+# !?STRING:* as above, but substitute all arguments
+#
+#
+# Command Editing:
+# ----------------
+#
+# CMND~e edit CMND using $EDITOR, where CMND may be found
+# using a history substitution
+# CMND~v edit CMND using $VISUAL, where CMND may be found
+# using a history substitution
+# " ^string1^string2^ substitute string2 for string1 in last command"
+# command and run it
+# " g^string1^string2^ globally substitute string2 for string1 in "
+# last command and run it
+# !NUMBER:s/string1/string2/
+# substitute string2 for string1 in
+# command NUMBER and run it
+# !NUMBER:gs/string1/string2/
+# globally substitute string2 for string1 in
+# command NUMBER and run it
+# !?STRING:s/string1/string2/
+# substitute string2 for string1 in last command
+# containing STRING and run it
+# !?STRING:gs/string1/string2/
+# globally substitute string2 for string1 in last
+# command containing STRING and run it
+#
+# Any command which ends in the string ":p" is treated as a normal
+# command until all substitutions have been completed. The trailing
+# ":p" is then stripped, and the command is simply echoed and added to
+# the history list instead of being executed.
+#
+# None of the other colon extensions of the cshell are supported.
+#
+#
+# Shell Environment Variables:
+# ----------------------------
+#
+# EDITOR editor used by ~e command, default = "ed"
+# VISUAL editor used by ~v command, default = "vi"
+# MAIL your system mailbox
+# PAGER paging program used by history command, default = "more"
+# PS1 primary prompt
+# PS2 secondary prompt
+# history number of commands in history list, default = 22
+# histfile file history list is saved in, default = $HOME/.bhistory
+# savehist number of commands remembered from last bcsh session
+# aliasfile file of aliased commands, default = $HOME/.baliases
+# logoutfile file of commands to be executed before termination
+# inc_cmdno yes/no -- keep track of command numbers or not
+# noclobber if set, existing files are not overwritten by '>'
+# iclobber if both noclobber and iclobber are set, the user is
+# prompted for confirmation before existing files are
+# overwritten by '>'
+#
+# Note: if you are setting either noclobber or iclobber mid-session,
+# set them to 'yes'
+#
+#
+# Regular Shell Variables:
+# ------------------------
+#
+# Shell variables may be set via Bourne or cshell syntax, e.g., both
+# "set foo=bar" and "foo=bar" set a variable called "foo" with the value
+# "bar". However, all variables are automatically set as environment
+# variables, so there is no need to export them. Conversely, there
+# are NO local variables. Sorry, folks.
+#
+# A cshell-style "setenv" command is turned into a regular "set" command.
+#
+#
+# The Prompt:
+# ----------
+#
+# You may, if you wish, have a command executed in your prompt. If
+# the variable PS1 contains a dollar sign or a backquote, it is
+# evaluated and the result used as the prompt, provided the evaluation
+# did not produce a "not found" error message. The two special cases
+# of PS1 consisting solely of "$" or "$ " are handled correctly. For
+# example, to have the prompt contain the current directory followed
+# by a space, enter:
+#
+# PS1=\'echo "`pwd` "\'
+#
+# You need the backslashed single quotes to prevent the command being
+# evaluated by the variable-setting mechanism and the shell before it
+# is assigned to PS1.
+#
+# To include the command number in your prompt, enter the command:
+#
+# PS1=\'echo "$cmdno "\'
+#
+#
+# Shell Control-Flow Syntax:
+# --------------------------
+#
+# 'While', 'for', 'case', and 'if' commands entered in Bourne shell
+# syntax are executed as normal.
+#
+# A valiant attempt is made to convert 'foreach' loops into 'for' loops,
+# cshell-syntax 'while' loops into Bourne shell syntax, and 'switch'
+# statements into 'case' statements. I cannot guarantee to always get it
+# right. If you forget the 'do' in a 'while' or 'for' loop, or finish
+# them with 'end' instead of 'done', this will be corrected.
+#
+# Note that cshell-to-Bourne control flow conversions do not take place
+# if control is nested -- e.g., a 'foreach' inside a 'while' will fail.
+#
+# The simple-case cshell "if (condition) command" is turned into Bourne
+# syntax. Other 'if' statements are left alone apart from making the
+# 'then' a separate statement, because constructing a valid interactive
+# cshell 'if' statement is essentially an exercise in frustration anyway.
+# The cshell and Bourne shell have sufficiently different ideas about
+# conditions that if is probably best to resign yourself to learning
+# the Bourne shell conventions.
+#
+# Note that since most of the testing built-ins of the cshell are
+# not available in the Bourne shell, a complex condition in a 'while'
+# loop or an 'if' statement will probably fail.
+#
+#
+# Bugs, Caveats, etc.:
+# --------------------
+#
+# This is not a super-speedy program. Be patient, especially on startup.
+#
+# To the best of my knowledge this program should work on ANY Bourne
+# shell -- note that if your shell does not understand 'echo -n' you
+# will have to re-set the values of '$n' and '$c'.
+#
+# This program may run out of stack space on a 16-bit machine where
+# /bin/sh is not split-space.
+#
+# Mail checking is done every 10 commands if $MAIL is set in your
+# environment. For anything fancier, you will have to hack the code.
+#
+# Because commands are stuffed in a file before sh is invoked on them,
+# error messages from failed commands are ugly.
+#
+# Failed history substitutions either give nothing at all, or a
+# "not found" style of error message.
+#
+# A command history is kept whether you want it or not. This may be
+# perceived as a bug or a feature, depending on which side of bed you
+# got out on.
+#
+# If you want a real backslash in a command, you will have to type two
+# of them because the shell swallows the first backslash in the initial
+# command pickup. This means that to include a non-history '!' in a
+# command you need '\\!' -- a real wart, especially for net mail,
+# but unavoidable.
+#
+# Commands containing an '@' will break all sorts of things.
+#
+# Very complex history substitutions may fail.
+#
+# File names containing numbers may break numeric history sustitutions.
+#
+# Commands containing bizzare sequences of characters may conflict
+# with internal kludges.
+#
+# Aliasing something to "commands;logout" will not work -- if you
+# want something to happen routinely on logout, put it in the file
+# specified by $logoutfile, default = $HOME/.blogout.
+#
+# Please send all bug reports to ihnp4!utzoo!globetek!chris.
+# Flames will be posted to net.general with 'Reply-to' set to your
+# ' path... :-) '
+#
+#
+#
+# ************* VERY IMPORTANT NOTICE *************
+#
+# If your shell supports # comments, then REPLACE all the colon 'comments'
+# with # comments. If it does not, then REMOVE all the 'comment' lines from the
+# working copy of the file, as it will run MUCH faster -- the shell evaluates
+# lines starting with a colon but does not actually execute them, so you will
+# save the read-and-evaluate time by removing them.
+
+case "`echo -n foo`" in
+ -n*)
+ n=
+ c="\c"
+ ;;
+ foo)
+ n=-n
+ c=
+ ;;
+ *)
+ echo "Your 'echo' command is broken."
+ exit 1
+ ;;
+esac
+history=${history-22}
+savehist=${savehist-22}
+histfile=${histfile-$HOME/.bhistory}
+logoutfile=${logoutfile-$HOME/.blogout}
+EDITOR=${EDITOR-ed}
+VISUAL=${VISUAL-vi}
+PAGER=${PAGER-more}
+
+aliasfile=${aliasfile-$HOME/.baliases}
+
+# the alias file may contain 1 blank line, so a test -s will not work
+
+case "`cat $aliasfile 2> /dev/null`" in
+ "")
+ doalias=no
+ ;;
+ *)
+ doalias=yes
+ ;;
+esac
+
+if test -s "${sourcefile-$HOME/.bcshrc}"
+ then
+ . ${sourcefile-$HOME/.bcshrc}
+fi
+
+if test -s "$histfile"
+ then
+ cmdno="`set - \`wc -l $histfile\`;echo $1`"
+ cmdno="`expr \"$cmdno\" + 1`"
+ lastcmd="`sed -n '$p' $histfile`"
+ copy=false
+ ohist=$histfile
+ while test ! -w "$histfile"
+ do
+ echo "Cannot write to history file '$histfile'."
+ echo $n "Please enter a new history filename: $c"
+ read histfile
+ copy=true
+ done
+ if $copy
+ then
+ cp $ohist $histfile
+ fi
+else
+ cat /dev/null > $histfile
+ cmdno=1
+ lastcmd=
+fi
+
+# keep track of command number as the default
+
+inc_cmdno=${inc_cmdo-yes}
+
+# default prompts -- PS1 and PS2 may be SET but EMPTY, so '${PS1-% }' syntax
+# is not used here
+
+case "$PS1" in
+ "")
+ PS1="% "
+ ;;
+esac
+case "$PS2" in
+ "")
+ PS2="> "
+ ;;
+esac
+
+export histfile savehist history aliasfile EDITOR VISUAL PAGER cmdno PS1 PS2
+
+case "$MAIL" in
+ "")
+ ;;
+ *)
+ if [ -f $MAIL ]; then
+ mailsize=`set - \`wc -c $MAIL\`;echo $1`
+ else
+ mailsize=0
+ fi
+ ;;
+esac
+
+trap ':' 2
+trap exit 3
+trap "tail -n $savehist $histfile>/tmp/hist$$;uniq /tmp/hist$$ > $histfile;\
+rm -f /tmp/*$$;exit 0" 15
+
+getcmd=yes
+mailcheck=
+exclaim=
+echoit=
+mailprompt=
+
+while :
+do
+
+ run=yes
+ case "$mailprompt" in
+ "")
+ ;;
+ *)
+ echo "$mailprompt"
+ ;;
+ esac
+ case "$getcmd" in
+ yes)
+ : guess if the prompt should be evaluated or not
+ case "$PS1" in
+ \$|\$\ )
+ echo $n "$PS1$c"
+ ;;
+ *\`*|*\$*)
+ tmp="`(eval $PS1) 2>&1`"
+ case "$tmp" in
+ *not\ found)
+ echo $n "$PS1$c"
+ ;;
+ *)
+ echo $n "$tmp$c"
+ ;;
+ esac
+ ;;
+ *)
+ echo $n "$PS1$c"
+ ;;
+ esac
+
+ read cmd || cmd="exit"
+ ;;
+ *) ;;
+ esac
+
+ case "$MAIL" in
+ "")
+ ;;
+ *)
+ : check for mail every 10 commands
+ case "$mailcheck" in
+ 1111111111)
+ mailcheck=
+ if [ -f $MAIL ]; then
+ newsize="`set - \`wc -c $MAIL\`;echo $1`"
+ else
+ newsize=0
+ fi
+ if test "$newsize" -gt "$mailsize"; then
+ mailprompt="You have new mail"
+ else
+ mailprompt=
+ fi
+ mailsize=$newsize
+ ;;
+ *)
+ mailcheck=1$mailcheck
+ ;;
+ esac
+ ;;
+ esac
+ hist=no
+
+ case "$cmd" in
+ "")
+ continue
+ ;;
+ sh)
+ sh
+ run=no
+ ;;
+ !!)
+ cmd=$lastcmd
+ echoit=yes
+ getcmd=no
+ continue
+ ;;
+ *:p)
+ cmd="`expr \"$cmd\" : '\(.*\):p'` +~+p"
+ getcmd=no
+ continue
+ ;;
+ foreach[\ \ ]*)
+ while test "$line" != "end"; do
+ echo $n "$PS2$c"
+ read line
+ cmd="${cmd};$line"
+ done
+ echo "$cmd" > /tmp/bcsh$$
+ ed - /tmp/bcsh$$ << ++++
+ s/end/done/
+ s/foreach[ ]\(.*\)(/for \1 in /
+ s/)//
+ s/;/;do /
+ w
+++++
+ ;;
+ for[\ \ ]*|while[\ \ ]*)
+ # try to catch the most common cshell-to-Bourne-shell
+ # mistakes
+
+ echo $n "$PS2$c"
+ read line
+ case "$line" in
+ *do)
+ line="do :"
+ ;;
+ *do*)
+ ;;
+ *)
+ line="do $line"
+ ;;
+ esac
+
+ cmd="${cmd};$line"
+ while test "$line" != "done" && test "$line" != "end"
+ do
+ echo $n "$PS2$c"
+ read line
+ case "$line" in
+ end)
+ line=done
+ ;;
+ esac
+ cmd="${cmd};$line"
+ done
+ echo "$cmd" > /tmp/bcsh$$
+ ;;
+ if[\ \ ]*)
+ while test "$line" != "fi" && test "$line" != "endif"
+ do
+ echo $n "$PS2$c"
+ read line
+ case "$line" in
+ *[a-z]*then)
+ line="`expr \"$line\" : '\(.*\)then'`;then"
+ ;;
+ endif)
+ line=fi
+ ;;
+ esac
+ cmd="${cmd};$line"
+ done
+ echo "$cmd" > /tmp/bcsh$$
+ case "`grep then /tmp/bcsh$$`" in
+ "")
+ # fix 'if foo bar' cases
+
+ ed - /tmp/bcsh$$ << ++++
+ s/)/);then/
+ s/.*/;fi/
+ w
+++++
+ ;;
+ esac
+ ;;
+ case[\ \ ]*)
+ while test "$line" != "esac"
+ do
+ echo $n "$PS2$c"
+ read line
+ cmd="${cmd}@$line"
+ done
+ cmd="`echo \"$cmd\" | tr '@' ' '`"
+ echo "$cmd" > /tmp/bcsh$$
+ ;;
+ switch[\ \ ]*)
+ while test "$line" != "endsw"
+ do
+ echo $n "$PS2$c"
+ read line
+ cmd="${cmd}@$line"
+ done
+ echo "$cmd" > /tmp/bcsh$$
+ ed - /tmp/bcsh$$ << '++++'
+ 1,$s/@/\
+/g
+ g/switch.*(/s//case "/
+ s/)/" in/
+ 1,$s/case[ ]\(.*\):$/;;\
+ \1)/
+ 2d
+ 1,$s/endsw/;;\
+esac/
+ g/breaksw/s///
+ 1,$s/default.*/;;\
+ *)/
+ w
+++++
+ cmd="`cat /tmp/bcsh$$`"
+ ;;
+ *!*)
+ hist=yes
+ ;;
+ esac
+
+ case "$hist" in
+ yes)
+ # deal with genuine exclamation marks, go back and parse again
+
+ case "$cmd" in
+ *\>![\ \ ]*|*\\!*)
+ cmd="`echo \"$cmd\" | sed -e 's@\\!@REALEXCLAMATIONMARK@g'`"
+ exclaim=yes
+ getcmd=no
+ continue
+ ;;
+ esac
+
+ # break command into elements, parse each one
+
+ tmp=
+ for i in $cmd
+ do
+ # find element with !, peel off stuff up to !
+
+ case "$i" in
+ !)
+ # most likely a typo for !!, so fix it
+ front=
+ $i=!!
+ ;;
+ !!*)
+ front=
+ i="`expr \"$i\" : '.*\(!!.*\)'`"
+ ;;
+ *!!*)
+ front="`expr \"$i\" : '\(.*\)!!.*'`"
+ i="`expr \"$i\" : '.*\(!!.*\)'`"
+ ;;
+ !*)
+ front=
+ i="`expr \"$i\" : '.*!\(.*\)'`"
+ ;;
+ *)
+ tmp="$tmp$i "
+ continue
+ ;;
+ esac
+ case "$i" in
+ !!*)
+ # want last command
+
+ rest="`expr \"$i\" : '!!\(.*\)'`"
+ i=$lastcmd
+ ;;
+ -*)
+ # we want to search back through the history list
+
+ case "$i" in
+ -)
+ rest="`expr \"$i\" : '-\(.*\)'`"
+ i=$lastcmd
+ ;;
+ -[0-9]*)
+ wanted="`expr \"$i\" : '-\([0-9][0-9]*\).*'`"
+ rest="`expr \"$i\" : '-[0-9][0-9]*\(.*\)'`"
+ i="`tail -n $wanted $histfile | sed -e "1q"`"
+ ;;
+ esac
+ ;;
+ [0-9]*)
+ # find which number command is wanted
+
+ wanted="`expr \"$i\" : '\([0-9][0-9]*\).*'`"
+ rest="`expr \"$i\" : '[0-9][0-9]*\(.*\)'`"
+ i="`grep -n . $histfile | grep \"^$wanted\"`"
+ i="`expr \"$i\" : \"${wanted}.\(.*\)\"`"
+ ;;
+ \?*)
+
+ # find which 'command-contains' match is wanted
+
+ case "$i" in
+ \?{*}*)
+ wanted="`expr \"$i\" : '?{\(.*\)}.*'`"
+ rest="`expr \"$i\" : '?.*}\(.*\)'`"
+ ;;
+ \?*:*)
+ wanted="`expr \"$i\" : '?\(.*\):.*'`"
+ rest="`expr \"$i\" : '?.*\(:.*\)'`"
+ ;;
+ \?*)
+ wanted="`expr \"$i\" : '?\(.*\)'`"
+ rest=
+ ;;
+ esac
+ i="`grep \"$wanted\" $histfile | sed -n '$p'`"
+ ;;
+ *)
+ # find which 'start-of-command' match is wanted
+
+ case "$i" in
+ {*}*)
+ wanted="`expr \"$i\" : '{\(.*\)}.*'`"
+ rest="`expr \"$i\" : '.*}\(.*\)'`"
+ ;;
+ *:*)
+ wanted="`expr \"$i\" : '\(.*\):.*'`"
+ rest="`expr \"$i\" : '.*\(:.*\)'`"
+ ;;
+ *)
+ wanted="$i"
+ rest=
+ ;;
+ esac
+ i="`grep \"^$wanted\" $histfile | sed -n '$p'`"
+ ;;
+ esac
+
+ # see if we actually found anything to substitute
+
+ case "$i" in
+ "")
+ badsub="Event not found"
+ break
+ ;;
+ *)
+ badsub=no
+ ;;
+ esac
+
+ case "$rest" in
+ "")
+ tmp="$front$tmp$i "
+ continue
+ ;;
+ :[0-9]*)
+ # find which element of $i is wanted
+
+ number="`expr \"$rest\" : ':\([0-9][0-9]*\).*'`"
+ rest="`expr \"$rest\" : ':[0-9][0-9]*\(.*\)'`"
+
+ # count through $i till we get to the
+ # right element
+
+ counter=0
+ for element in $i
+ do
+ case "$counter" in
+ $number)
+ break
+ ;;
+ *)
+ counter="`expr \"$counter\" + 1`"
+ # counter=$[ $counter + 1 ]
+ ;;
+ esac
+ done
+ case "$counter" in
+ $number)
+ badsub=no
+ ;;
+ *)
+ badsub="Bad command element"
+ break
+ ;;
+ esac
+ tmp="$tmp$front$element$rest "
+ continue
+ ;;
+ :\$*)
+ # spin through $i till we hit the last element
+
+ rest="`expr \"$rest\" : ':\$\(.*\)'`"
+ for element in $i
+ do
+ :
+ done
+ tmp="$tmp$front$element$rest "
+ continue
+ ;;
+ :\**)
+ # we want all elements except the command itself
+
+ rest="`expr \"$rest\" : ':\*\(.*\)'`"
+ save=$i
+ set - $i
+ shift
+ case "$*" in
+ "")
+ badsub="No arguments to command '$save'"
+ break
+ ;;
+ *)
+ badsub=no
+ ;;
+ esac
+ tmp="$tmp$front$*$rest "
+ continue
+ ;;
+ :s*|:gs*)
+ # we are doing a substitution
+ # put / on end if needed
+
+ case "$rest" in
+ :s/*/*/*|:gs/*/*/*)
+ ;;
+ :s/*/*|:gs/*/*)
+ rest="${rest}/"
+ ;;
+ esac
+
+ # find what substitution is wanted
+
+ first="`expr \"$rest\" : ':*s\/\(.*\)\/.*\/.*'`"
+ second="`expr \"$i\" : ':*s/.*/\(.*\)/.*'`"
+
+ # see if it is a global substitution
+
+ case "$rest" in
+ :gs*)
+ global=g
+ ;;
+ :s*)
+ global=
+ ;;
+ esac
+ rest="`expr \"$rest\" : '.*/.*/.*/\(.*\)'`"
+ i="`echo \"$i\" | sed -e \"s@$first@$second@$global\"`"
+
+ # see if subsitution worked
+
+ case "$i" in
+ "")
+ badsub="Substiution failed"
+ break
+ ;;
+ *)
+ badsub=no
+ ;;
+ esac
+ tmp="$tmp$front$i$rest "
+ continue
+ ;;
+ *)
+ tmp="$tmp$front$i$rest "
+ ;;
+ esac
+ done
+ case "$badsub" in
+ no)
+ ;;
+ *)
+ echo "$badsub"
+ badsub=no
+ continue
+ ;;
+ esac
+ cmd="$tmp"
+ echoit=yes
+ getcmd=no
+ continue
+ ;;
+ *)
+ run=yes
+ ;;
+ esac
+
+ case "$cmd" in
+ *\^*\^*\^*)
+ # see if the substitution is global
+ case "$cmd" in
+ g*)
+ global=g
+ ;;
+ *)
+ global=
+ ;;
+ esac
+
+ # put a '^' on the end if necessary
+ case "$cmd" in
+ *\^)
+ ;;
+ *)
+ cmd="${cmd}^"
+ ;;
+ esac
+
+ # find what substitution is wanted
+
+ first="`expr \"$cmd\" : '*\^\(.*\)\^.*\^.*'`"
+ second="`expr \"$cmd\" : '*\^.*\^\(.*\)\^.*'`"
+ rest="`expr \"$cmd\" : '*\^.*\^.*\^\(.*\)'`"
+ cmd="`echo \"$lastcmd\" | sed -e \"s@$first@$second@$global\"`$rest"
+
+ # see if the substitution worked
+
+ case "$cmd" in
+ "")
+ echo "Substitution failed"
+ continue
+ ;;
+ esac
+ echoit=yes
+ getcmd=no
+ continue
+ ;;
+ *~e)
+ echo "$cmd" | sed -e "s@~e@@" > /tmp/bcsh$$
+ $EDITOR /tmp/bcsh$$
+ cmd="`cat /tmp/bcsh$$`"
+ getcmd=no
+ continue
+ ;;
+ *~v)
+ echo "$cmd" | sed -e "s@~v@@" > /tmp/bcsh$$
+ echo "$lastcmd" > /tmp/bcsh$$
+ $VISUAL /tmp/bcsh$$
+ cmd="`cat /tmp/bcsh$$`"
+ getcmd=no
+ continue
+ ;;
+ exec[\ \ ]*)
+ tail -n $savehist $histfile>/tmp/hist$$
+ uniq /tmp/hist$$ > $histfile
+ rm -f /tmp/*$$
+ echo $cmd > /tmp/cmd$$
+ . /tmp/cmd$$
+ ;;
+ login[\ \ ]*|newgrp[\ \ ]*)
+ tail -n $savehist $histfile>/tmp/hist$$
+ uniq /tmp/hist$$ > $histfile
+ rm -f /tmp/*$$
+ echo $cmd > /tmp/cmd$$
+ . /tmp/cmd$$
+ ;;
+ logout|exit|bye)
+ if test -s "$logoutfile"
+ then
+ # sh $logoutfile
+ $SHELL $logoutfile
+ fi
+ tail -n $savehist $histfile > /tmp/hist$$
+ uniq /tmp/hist$$ > $histfile
+ rm -f /tmp/*$$
+ exit 0
+ ;;
+ h|history)
+ grep -n . $histfile | tail -n $history | sed -e 's@:@ @' | $PAGER
+ continue
+ ;;
+ h[\ \ ]\|*|h[\ \ ]\>*|h\|*|h\>*)
+ cmd="`echo \"$cmd\" | sed -e \"s@h@grep -n . $histfile | tail -n $history | sed -e 's@:@ @'@\"`"
+ getcmd=no
+ continue
+ ;;
+ history[\ \ ]*\|*|history[\ \ ]*\>*)
+ cmd="`echo \"$cmd\" | sed -e \"s@history@grep -n . $histfile | tail -n $history | sed -e 's@:@ @'@\"`"
+ getcmd=no
+ continue
+ ;;
+ source[\ \ ]*)
+ set - $cmd
+ shift
+ echo . $* > /tmp/cmd$$
+ . /tmp/cmd$$
+ run=no
+ ;;
+ wait)
+ wait
+ run=no
+ ;;
+ .[\ \ ]*)
+ echo $cmd > /tmp/cmd$$
+ . /tmp/cmd$$
+ run=no
+ ;;
+ cd|cd[\ \ ]*)
+ # check if it will work first, or else this shell will terminate
+ # if the cd dies. If you have a built-in test, you might want
+ # to replace the try-it-and-see below with a couple of tests,
+ # but it is probably just as fast like this.
+
+ echo $cmd > /tmp/cmd$$
+ if ($SHELL /tmp/cmd$$) ; then
+ . /tmp/cmd$$
+ fi
+ run=no
+ ;;
+ awk[\ \ ]*|dd[\ \ ]*|cc[\ \ ]*|make[\ \ ]*)
+ # these are the only commands I can think of whose syntax
+ # includes an equals sign. Add others as you find them.
+
+ echo "$cmd" > /tmp/bcsh$$
+ ;;
+ setenv*|*=*)
+ # handle setting shell variables, turning cshell syntax to Bourne
+ # syntax -- note all variables must be exported or they will not
+ # be usable in other commands
+
+ echo "$cmd" > /tmp/cmd$$
+ ed - /tmp/cmd$$ << ++++
+ g/^setenv[ ]/s/[ ]/@/
+ g/^setenv@/s/[ ]/=/
+ g/^setenv@/s///
+ g/^set/s///
+ .t.
+ \$s/=.*//
+ s/^/export /
+ w
+++++
+ . /tmp/cmd$$
+ rm -f /tmp/cmd$$
+ run=no
+ ;;
+ unset[\ \ ]*|umask[\ \ ]*|export[\ \ ]*|set[\ \ ]*)
+ # handle commands which twiddle current environment
+
+ $cmd
+ run=no
+ ;;
+ alias|alias[\ \ ])
+ if [ -f $aliasfile ]; then
+ $PAGER $aliasfile
+ fi
+ lastcmd=$cmd
+ run=no
+ continue
+ ;;
+ alias[\ \ ]*)
+ case "$cmd" in
+ alias[\ \ ]\|*|alias[\ \ ]\>*)
+ cmd="`echo \"$cmd\" | sed -e \"s@alias@cat $aliasfile@\"`"
+ getcmd=no
+ continue
+ ;;
+ alias[\ \ ]*[\ \ ]*)
+ ;;
+ *)
+ echo "Syntax: alias name command"
+ cmd=
+ continue
+ ;;
+ esac
+ set - $cmd
+ shift
+ cmd="$*"
+
+ # make sure there is always 1 blank line in file so
+ # unaliasing will always work -- ed normally refuses
+ # to write an empty file
+ echo "" >> $aliasfile
+ cat << ++++ >> $aliasfile
+$cmd
+++++
+
+# ed - $aliasfile << '++++'
+# g/alias[ ]/s///
+# g/^['"]\(.*\)['"]$/s//\1/
+# g/^/s//alias /
+# w
+#++++
+
+ sort -u -o $aliasfile $aliasfile
+ doalias=yes
+ cmd="alias $cmd"
+ run=no
+ ;;
+ unalias[\ \ ]*)
+ set - $cmd
+ case "$#" in
+ 2)
+ cmd=$2
+ ;;
+ *)
+ echo "Syntax: unalias alias_name"
+ continue
+ ;;
+ esac
+ ed - $aliasfile << ++++
+ /^$cmd[ ]/d
+ w
+++++
+ case "`set - \`wc -l $aliasfile\`;echo $1`" in
+ 1)
+ # just removed last alias
+ doalias=no
+ ;;
+ esac
+ run=no
+ ;;
+ *)
+ case "$doalias" in
+ yes)
+ set - $cmd
+ tmp="`grep \"^$1 \" $aliasfile`"
+ case "$tmp" in
+ $1[\ \ ]*)
+ shift
+ cmd=$*
+ set - $tmp
+ shift
+ tmp=$*
+ case "$tmp" in
+ *\$*)
+ # uses positional variables
+
+ cmd="set - $cmd ; $tmp"
+ getcmd=no
+ continue
+ ;;
+ *)
+ cmd="$tmp $cmd"
+ getcmd=no
+ continue
+ ;;
+ esac
+ ;;
+ *)
+ echo "$cmd" > /tmp/bcsh$$
+ ;;
+ esac
+ ;;
+ no)
+ echo "$cmd" > /tmp/bcsh$$
+ ;;
+ esac
+ ;;
+ esac
+
+ case "$cmd" in
+ *+~+p)
+ cmd="`expr \"$cmd\" : '\(.*\)+~+p'`"
+ echoit=yes
+ run=no
+ ;;
+ esac
+
+ case "$cmd" in
+ "")
+ continue
+ ;;
+ *)
+ case "$exclaim" in
+ yes)
+ cmd="`echo \"$cmd\" | sed -e 's@REALEXCLAMATIONMARK@!@g'`"
+ echo "$cmd" > /tmp/bcsh$$
+ ;;
+ esac
+ case "$echoit" in
+ yes)
+ echo $cmd
+ ;;
+ esac
+ case "$run" in
+ yes)
+ case "${noclobber+yes}" in
+ yes)
+ case "$cmd" in
+ *\>![\ \ ]*)
+ ed - /tmp/bcsh$$ << ++++
+ g/>!/s//>/
+ w
+++++
+ ;;
+ *\>\>*)
+ ;;
+ *\>*)
+ outfile="`expr \"$cmd\" : '.*>\(.*\)'`"
+ case "$outfile" in
+ \&*)
+ ;;
+ *)
+ set - $outfile
+ outfile="$1"
+ if test -s "$outfile"
+ then
+ case "${iclobber+yes}" in
+ yes)
+ echo $n "Overwrite ${outfile}? $c"
+ read answer
+ case "$answer" in
+ y*)
+ ;;
+ *)
+ echo ':' > /tmp/bcsh$$
+ ;;
+ esac
+ ;;
+ *)
+ echo "${outfile}: file exists"
+ echo ':' > /tmp/bcsh$$
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ *)
+ case "$cmd" in
+ *\>![\ \ ]*)
+ ed - /tmp/bcsh$$ << ++++
+ g/>!/s//>/g
+ w
+++++
+ ;;
+ esac
+ ;;
+ esac
+ (trap 'exit 1' 2 3; $BASH /tmp/bcsh$$)
+ ;;
+ esac
+ case "$cmd" in
+ $lastcmd)
+ ;;
+ *)
+ case "$exclaim" in
+ yes)
+ cmd="`echo \"$cmd\" | sed -e 's@!@\\\\!@g'`"
+ ;;
+ esac
+
+ cat << ++++ >> $histfile
+$cmd
+++++
+ lastcmd=$cmd
+
+ case "$inc_cmdno" in
+ yes)
+ cmdno="`expr \"$cmdno\" + 1`"
+ # cmdno=$[$cmdno + 1]
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+
+ # The next commented-out line sets the prompt to include the command
+ # number -- you should only un-comment this if it is the ONLY thing
+ # you ever want as your prompt, because it will override attempts
+ # to set PS1 from the command level. If you want the command number
+ # in your prompt without sacrificing the ability to change the prompt
+ # later, replace the default setting for PS1 before the beginning of
+ # the main loop with the following: PS1='echo -n "${cmdno}% "'
+ # Doing it this way is, however, slower than the simple version below.
+
+ PS1="${cmdno}% "
+
+ getcmd=yes
+ echoit=no
+ exclaim=no
+done
+exit 0
+
+# Christine Robertson {linus, ihnp4, decvax}!utzoo!globetek!chris
diff --git a/examples/scripts/cat.sh b/examples/scripts/cat.sh
new file mode 100644
index 0000000..3e65b3f
--- /dev/null
+++ b/examples/scripts/cat.sh
@@ -0,0 +1,12 @@
+shcat()
+{
+ while read -r ; do
+ printf "%s\n" "$REPLY"
+ done
+}
+
+if [ -n "$1" ]; then
+ shcat < "$1"
+else
+ shcat
+fi
diff --git a/examples/scripts/center b/examples/scripts/center
new file mode 100644
index 0000000..8d367d3
--- /dev/null
+++ b/examples/scripts/center
@@ -0,0 +1,24 @@
+#! /bin/bash
+#
+# center - center a group of lines
+#
+# tabs in the lines might cause this to look a little bit off
+#
+#
+
+width=${COLUMNS:-80}
+
+if [[ $# == 0 ]]
+then
+ set -- /dev/stdin
+fi
+
+for file
+do
+ while read -r
+ do
+ printf "%*s\n" $(( (width+${#REPLY})/2 )) "$REPLY"
+ done < $file
+done
+
+exit 0
diff --git a/examples/scripts/dd-ex.sh b/examples/scripts/dd-ex.sh
new file mode 100644
index 0000000..fafc83f
--- /dev/null
+++ b/examples/scripts/dd-ex.sh
@@ -0,0 +1,476 @@
+#!/bin/sh
+
+# this is a line editor using only /bin/sh, /bin/dd and /bin/rm
+
+# /bin/rm is not really required, but it is nice to clean up temporary files
+
+PATH=
+dd=/bin/dd
+rm=/bin/rm
+
+# temporary files we might need
+tmp=/tmp/silly.$$
+ed=/tmp/ed.$$
+trap "$rm -f $tmp $tmp.1 $tmp.2 $tmp.3 $tmp.4 $tmp.5 $tmp.6 $ed.a $ed.b $ed.c; exit" 0 1 2 3
+
+# from now on, no more rm - the above trap is enough
+unset rm
+
+# we do interesting things with IFS, but better save it...
+saveIFS="$IFS"
+
+# in case "echo" is not a shell builtin...
+
+Echo () {
+case "$1" in
+ -n) shift
+ $dd of=$tmp 2>/dev/null <<EOF
+$@
+EOF
+ IFS="+"
+ set `$dd if=$tmp bs=1 of=/dev/null skip=1 2>&1`
+ IFS="$saveIFS"
+ $dd if=$tmp bs=1 count=$1 2>/dev/null
+ ;;
+ *) $dd 2>/dev/null <<EOF
+$@
+EOF
+ ;;
+esac
+}
+
+# this is used to generate garbage files
+
+true () {
+ return 0
+}
+
+false () {
+ return 1
+}
+
+zero () {
+ ( trap 'go=false' 13
+ go=true
+ while $go
+ do
+ $dd "if=$0"
+ case "$?" in
+ 0) ;;
+ *) go=false ;;
+ esac
+ done
+ ) 2>/dev/null
+}
+
+# arithmetic using dd!
+
+# add variable n1 n2 n3...
+# assigns n1+n2+n3+... to variable
+
+add () {
+ result="$1"
+ shift
+ $dd if=/dev/null of=$tmp bs=1 2>/dev/null
+ for n in "$@"
+ do
+ case "$n" in
+ 0) ;;
+ *) zero | $dd of=$tmp.1 bs=1 "count=$n" 2>/dev/null
+ ( $dd if=$tmp; $dd if=$tmp.1 ) 2>/dev/null | $dd of=$tmp.2 2>/dev/null
+ $dd if=$tmp.2 of=$tmp 2>/dev/null
+ ;;
+ esac
+ done
+ IFS="+"
+ set `$dd if=$tmp bs=1 of=/dev/null 2>&1`
+ IFS="$saveIFS"
+ eval $result='$1'
+}
+
+# subtract variable n1 n2
+# subtracts n2 from n1, assigns result to variable
+
+subtract () {
+ result="$1"
+ zero | $dd of=$tmp bs=1 "count=$2" 2>/dev/null
+ IFS="+"
+ set `$dd if=$tmp bs=1 of=/dev/null "skip=$3" 2>&1`
+ IFS="$saveIFS"
+ case "$1" in
+ dd*) set 0 ;;
+ esac
+ eval $result='$1'
+}
+
+# multiply variable n1 n2
+# variable = n1 * n2
+
+multiply () {
+ result="$1"
+ zero | $dd "bs=$2" of=$tmp "count=$3" 2>/dev/null
+ IFS="+"
+ set `$dd if=$tmp bs=1 of=/dev/null 2>&1`
+ IFS="$saveIFS"
+ eval $result='$1'
+}
+
+# divide variable n1 n2
+# variable = int( n1 / n2 )
+
+divide () {
+ result="$1"
+ zero | $dd bs=1 of=$tmp "count=$2" 2>/dev/null
+ IFS="+"
+ set `$dd if=$tmp "bs=$3" of=/dev/null 2>&1`
+ IFS="$saveIFS"
+ eval $result='$1'
+}
+
+# compare variable n1 n2 sets variable to lt if n1<n2, gt if n1>n2, eq if n1==n2
+
+compare () {
+ res="$1"
+ n1="$2"
+ n2="$3"
+ subtract somename "$n1" "$n2"
+ case "$somename" in
+ 0) ;;
+ *) eval $res=gt; return;
+ esac
+ subtract somename "$n2" "$n1"
+ case "$somename" in
+ 0) ;;
+ *) eval $res=lt; return;
+ esac
+ eval $res=eq
+}
+
+# lt n1 n2 returns true if n1 < n2
+
+lt () {
+ n1="$1"
+ n2="$2"
+ subtract somename "$n2" "$n1"
+ case "$somename" in
+ 0) return 1 ;;
+ esac
+ return 0
+}
+
+# le n1 n2 returns true if n1 <= n2
+
+le () {
+ n1="$1"
+ n2="$2"
+ subtract somename "$n1" "$n2"
+ case "$somename" in
+ 0) return 0 ;;
+ esac
+ return 1
+}
+
+# gt n1 n2 returns true if n1 > n2
+
+gt () {
+ n1="$1"
+ n2="$2"
+ subtract somename "$n1" "$n2"
+ case "$somename" in
+ 0) return 1 ;;
+ esac
+ return 0
+}
+
+# ge n1 n2 returns true if n1 >= n2
+
+ge () {
+ n1="$1"
+ n2="$2"
+ subtract somename "$n2" "$n1"
+ case "$somename" in
+ 0) return 0 ;;
+ esac
+ return 1
+}
+
+# useful functions for the line editor
+
+# open a file - copy it to the buffers
+
+open () {
+ file="$1"
+ set `$dd "if=$file" of=/dev/null 2>&1`
+ case "$1" in
+ dd*) return 1
+ esac
+ # copy the first line to $ed.c
+ go=true
+ len=0
+ while $go
+ do
+ case "`$dd "if=$file" bs=1 skip=$len count=1 2>/dev/null`" in
+ ?*) go=true ;;
+ *) go=false ;;
+ esac
+ add len 1 $len
+ done
+ # now $len is the length of the first line (including newline)
+ $dd "if=$file" bs=1 count=$len of=$ed.c 2>/dev/null
+ $dd "if=$file" bs=1 skip=$len of=$ed.b 2>/dev/null
+ $dd if=/dev/null of=$ed.a 2>/dev/null
+ lineno=1
+}
+
+# save a file - copy the buffers to the file
+
+save () {
+ # make a backup copy of the original
+ $dd "if=$1" "of=$1.bak" 2>/dev/null
+ # and save
+ ( $dd if=$ed.a; $dd if=$ed.c; $dd if=$ed.b ) > "$1" 2>/dev/null
+}
+
+# replace n1 n2 bla replaces n2 chars of current line, starting n1-th
+
+replace () {
+ $dd if=$ed.c of=$tmp.1 bs=1 "count=$1" 2>/dev/null
+ ( $dd if=$ed.c "skip=$1" bs=1 | $dd of=$tmp.2 bs=1 "skip=$2" ) 2>/dev/null
+ shift
+ shift
+ ( $dd if=$tmp.1; Echo -n "$@"; $dd if=$tmp.2 ) > $tmp.3 2>/dev/null
+ $dd if=$tmp.3 of=$ed.c 2>/dev/null
+}
+
+# rstring n s bla
+# replace the n-th occurence of s with bla
+
+rstring () {
+ n="$1"
+ shift;
+ # first we have to find it - this is fun!
+ # we have $tmp.4 => text before string, $tmp.5 => text after
+ $dd if=/dev/null of=$tmp.4 2>/dev/null
+ $dd if=$ed.c of=$tmp.5 2>/dev/null
+ string="$1"
+ shift
+ $dd of=$tmp.6 2>/dev/null <<EOF
+$@
+EOF
+ while :
+ do
+ case "`$dd if=$tmp.5 2>/dev/null`" in
+ $string*)
+ if lt $n 2
+ then
+ # now we want to replace the string
+ Echo -n "$@" > $tmp.2
+ Echo -n "$string" > $tmp.1
+ IFS="+"
+ set `$dd bs=1 if=$tmp.1 of=/dev/null 2>&1`
+ IFS="$saveIFS"
+ slen=$1
+ IFS="+"
+ ( $dd if=$tmp.4; $dd if=$tmp.2; $dd if=$tmp.5 bs=1 skip=$slen ) \
+ 2>/dev/null > $tmp
+ $dd if=$tmp of=$ed.c 2>/dev/null
+ return 0
+ else
+ subtract n $n 1
+ ( $dd if=$tmp.4; $dd if=$tmp.5 bs=1 count=1 ) > $tmp 2>/dev/null
+ $dd if=$tmp of=$tmp.4 2>/dev/null
+ # and remove it from $tmp.5
+ $dd if=$tmp.5 of=$tmp bs=1 skip=1 2>/dev/null
+ $dd if=$tmp of=$tmp.5 2>/dev/null
+ fi
+ ;;
+ ?*) # add one more byte...
+ ( $dd if=$tmp.4; $dd if=$tmp.5 bs=1 count=1 ) > $tmp 2>/dev/null
+ $dd if=$tmp of=$tmp.4 2>/dev/null
+ # and remove it from $tmp.5
+ $dd if=$tmp.5 of=$tmp bs=1 skip=1 2>/dev/null
+ $dd if=$tmp of=$tmp.5 2>/dev/null
+ ;;
+ *) # not found
+ return 1
+ ;;
+ esac
+ done
+}
+
+# skip to next line
+next () {
+ add l $lineno 1
+ ( $dd if=$ed.a; $dd if=$ed.c ) 2>/dev/null > $tmp.3
+ $dd if=$ed.b of=$tmp.4 2>/dev/null
+ open $tmp.4
+ $dd if=$tmp.3 of=$ed.a 2>/dev/null
+ lineno=$l
+}
+
+# delete current line
+delete () {
+ l=$lineno
+ $dd if=$ed.a 2>/dev/null > $tmp.1
+ $dd if=$ed.b of=$tmp.2 2>/dev/null
+ open $tmp.2
+ $dd if=$tmp.1 of=$ed.a 2>/dev/null
+ lineno=$l
+}
+
+# insert before current line (without changing current)
+insert () {
+ ( $dd if=$ed.a; Echo "$@" ) 2>/dev/null > $tmp.1
+ $dd if=$tmp.1 of=$ed.a 2>/dev/null
+ add lineno $lineno 1
+}
+
+# previous line
+prev () {
+ case "$lineno" in
+ 1) ;;
+ *) subtract lineno $lineno 1
+ # read last line of $ed.a
+ IFS='+'
+ set `$dd if=$ed.a of=/dev/null bs=1 2>&1`
+ IFS="$saveIFS"
+ size=$1
+ # empty?
+ case "$size" in
+ 0) return ;;
+ esac
+ subtract size $size 1
+ # skip final newline
+ case "$size" in
+ 0) ;;
+ *) subtract size1 $size 1
+ case "`$dd if=$ed.a bs=1 skip=$size count=1 2>/dev/null`" in
+ ?*) ;;
+ *) size=$size1 ;;
+ esac
+ ;;
+ esac
+ go=true
+ while $go
+ do
+ case "$size" in
+ 0) go=false ;;
+ *) case "`$dd if=$ed.a bs=1 skip=$size count=1 2>/dev/null`" in
+ ?*) go=true; subtract size $size 1 ;;
+ *) go=false; add size $size 1 ;;
+ esac
+ ;;
+ esac
+ done
+ # now $size is the size of the first n-1 lines
+ # add $ed.c to $ed.b
+ ( $dd if=$ed.c; $dd if=$ed.b ) 2>/dev/null > $tmp.5
+ $dd if=$tmp.5 of=$ed.b 2>/dev/null
+ # move line to ed.c
+ case "$size" in
+ 0) $dd if=$ed.a of=$ed.c 2>/dev/null
+ $dd if=/dev/null of=$tmp.5 2>/dev/null
+ ;;
+ *) $dd if=$ed.a of=$ed.c bs=1 skip=$size 2>/dev/null
+ $dd if=$ed.a of=$tmp.5 bs=1 count=$size 2>/dev/null
+ ;;
+ esac
+ # move rest to ed.a
+ $dd if=$tmp.5 of=$ed.a 2>/dev/null
+ ;;
+ esac
+}
+
+# goes to a given line
+goto () {
+ rl="$1"
+ compare bla "$rl" $lineno
+ case "$bla" in
+ eq) return
+ ;;
+ gt) while gt "$rl" $lineno
+ do
+ next
+ done
+ ;;
+ lt) while lt "$rl" $lineno
+ do
+ prev
+ done
+ ;;
+ esac
+}
+
+lineout () {
+ Echo -n "$lineno: "
+ $dd if=$ed.c 2>/dev/null
+}
+
+state=closed
+name=
+autoprint=true
+
+while true
+do
+ Echo -n '> '
+ read cmd arg
+ case "$cmd:$state" in
+ open:open) Echo "There is a file open already" ;;
+ open:*) if open "$arg"
+ then state=open; name="$arg"; $autoprint
+ else Echo "Cannot open $arg"
+ fi
+ ;;
+ new:open) Echo "There is a file open already" ;;
+ new:*) open "$arg"
+ state=open
+ name="$arg"
+ $autoprint
+ ;;
+ close:changed) Echo "Use 'discard' or 'save'" ;;
+ close:closed) Echo "Closed already" ;;
+ close:*) state=closed ;;
+ save:closed) Echo "There isn't a file to save" ;;
+ save:*) case "$arg" in
+ ?*) save "$arg" ;;
+ *) save "$name" ;;
+ esac
+ state=open
+ ;;
+ discard:changed) Echo "Your problem!"; state=closed ;;
+ discard:*) state=closed ;;
+ print:closed) Echo "No current file" ;;
+ print:*) lineout ;;
+ goto:closed) Echo "No current file" ;;
+ goto:*) goto "$arg"; $autoprint ;;
+ next:closed) Echo "No current file" ;;
+ next:*) next; $autoprint ;;
+ prev:closed) Echo "No current file" ;;
+ prev:*) prev; $autoprint ;;
+ name:closed) Echo "No current file" ;;
+ name:*) name="$arg" ;;
+ replace:closed) Echo "No current file" ;;
+ replace:*) if rstring 1 $arg
+ then state=changed; $autoprint
+ else Echo "Not found"
+ fi
+ ;;
+ nreplace:closed) Echo "No current file" ;;
+ nreplace:*) if rstring $arg
+ then state=changed; $autoprint
+ else Echo "Not found"
+ fi
+ ;;
+ delete:closed) Echo "No current file" ;;
+ delete:*) delete; state=changed; $autoprint ;;
+ insert:closed) Echo "No current file" ;;
+ insert:*) insert "$arg"; prev; state=changed; $autoprint ;;
+ quit:changed) Echo "Use 'save' or 'discard'" ;;
+ quit:*) Echo "bye"; exit;;
+ autoprint:*) autoprint="lineout" ;;
+ noprint:*) autoprint="" ;;
+ :*) ;;
+ *) Echo "Command not understood" ;;
+ esac
+done
+
diff --git a/examples/scripts/fixfiles.bash b/examples/scripts/fixfiles.bash
new file mode 100644
index 0000000..15f3ba8
--- /dev/null
+++ b/examples/scripts/fixfiles.bash
@@ -0,0 +1,92 @@
+#! /bin/bash
+#
+# From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
+# Newsgroups: comp.unix.shell,comp.os.linux.misc
+# Subject: GNU Bash Script to fix filenames
+# Date: 28 Mar 1996 14:54:43 -0800
+# Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
+#
+#This is a script which takes a list of directories, descends through each one
+#and ``corrects'' filenames that:
+#
+# - contain filename globbing characters: * ? [ ]
+# - quote characters: ' "
+# - control characters: 0-31 (127 is not dealt with---oops)
+# - - or + as the first character
+#
+# The GNU version of 'tr' is required. Also requires 'sed'.
+#
+# Script to process a given list of directories recursively
+# and rename each file to something that is reasonable.
+#
+# The rules are:
+#
+# 1. replace each space, [, ], *, ", and ' character in the name with a
+# period.
+# 2. replace each control character 1..31 with a printable character obtained
+# by adding 64 to the ascii value. ^A becomes A, ^B becomes B and so on.
+# 3. replace a - or + occuring at the beginning of the name with a #
+#
+# 4. if the resulting name has been changed in any way, then
+# 5. if a file of the new name already exists, then
+# 6. add a . to the new name and goto step 5.
+# 7. rename the old name to the new name
+#
+# written by Kaz Kylheku <kaz@cafe.net>
+# March 1996
+# Vancouver, Canada
+#
+# requires GNU 'bash', GNU 'tr', and some sort of 'sed' program.
+#
+# minimal conversion to bash v2 syntax done by Chet Ramey
+
+processfile()
+{
+ new_name="`echo -n $1 | tr '\173\175\052\077\042\047 ' '.......' |
+ tr '[\000-\037]' '[\100-\137]' |
+ sed -e 's/^-/#/' -e 's/+/#/'`"
+ if [ "$new_name" != "$1" ] ; then
+ while [ -e "$new_name" ] ; do
+ new_name="${new_name}."
+ done
+ echo changing \"$1\" to \"$new_name\" in `pwd`
+ mv -- "$1" "$new_name"
+ fi
+}
+
+processdir()
+{
+ set -f
+ local savepwd="$PWD"
+ if cd "$1" ; then
+ set +f
+ for file in * ; do
+ set -f
+ if [ "$file" != "." ] && [ "$file" != ".." ] ; then
+ if [ -L "$file" ] ; then
+ echo "skipping symlink" $file in `pwd`
+ elif [ -d "$file" ] ; then
+ processdir "$file"
+ elif [ -f "$file" ] ; then
+ processfile "$file"
+ fi
+ fi
+ done
+ cd "$savepwd"
+ fi
+}
+
+shopt -s nullglob dotglob
+
+if [ $# = 0 ] ; then
+ echo "$0: must specify a list of directories" >&2
+ echo "$0: usage: $0 directory [directory ...]" >&2
+ exit 2
+fi
+
+while [ $# != 0 ] ; do
+ processdir "$1"
+ shift
+done
+
+exit 0
diff --git a/examples/scripts/hanoi.bash b/examples/scripts/hanoi.bash
new file mode 100644
index 0000000..c308125
--- /dev/null
+++ b/examples/scripts/hanoi.bash
@@ -0,0 +1,21 @@
+# Towers of Hanoi in bash
+#
+# cribbed from the ksh93 book, example from exercises on page 85
+#
+# Chet Ramey
+# chet@po.cwru.edu
+
+hanoi() # n from to spare
+{
+ typeset -i nm1=$1-1
+ ((nm1>0)) && hanoi $nm1 $2 $4 $3
+ echo "Move disc $2 to $3"
+ ((nm1>0)) && hanoi $nm1 $4 $3 $2
+}
+
+case $1 in
+[1-9])
+ hanoi $1 1 2 3;;
+*) echo "${0##*/}: Argument must be from 1 to 9"
+ exit 1;;
+esac
diff --git a/examples/scripts/inpath b/examples/scripts/inpath
new file mode 100755
index 0000000..95f28bc
--- /dev/null
+++ b/examples/scripts/inpath
@@ -0,0 +1,19 @@
+#! /bin/sh
+#
+# Search $PATH for a file the same name as $1; return TRUE if found.
+#
+
+command=$1
+[ -n "$command" ] || exit 1
+
+set `echo $PATH | sed 's/^:/.:/
+ s/::/:.:/g
+ s/:$/:./
+ s/:/ /g'`
+
+while [ $# -ne 0 ] ; do
+ [ -f $1/$command ] && exit 0 # test -x not universal
+ shift
+done
+
+exit 1
diff --git a/examples/scripts/krand.bash b/examples/scripts/krand.bash
new file mode 100755
index 0000000..dfdfd32
--- /dev/null
+++ b/examples/scripts/krand.bash
@@ -0,0 +1,74 @@
+# Originally
+#
+# From: bsh20858@news.fhda.edu (Brian S Hiles)
+# Newsgroups: comp.unix.shell
+# Subject: Re: getting random numbers
+# Date: 23 Jan 1997 23:27:30 GMT
+# Message-ID: <5c8s52$eif@tiptoe.fhda.edu>
+
+# @(#) krand Produces a random number within integer limits
+# "krand" Korn shell script generates a random number in a
+# specified range with an optionally specified ``seed'' value.
+# Author: Peter Turnbull, May 1993
+# Modified by: Becca Thomas, January 1994
+
+# changed the optional third argument to a -s option, converted to
+# bash v2 syntax -- chet@po.cwru.edu
+
+PROGNAME=${0##*/}
+USAGE="usage: $PROGNAME [-s seed] lower-limit upper-limit"
+
+Seed=$$ # Initialize random-number seed value with PID
+
+usage()
+{
+ echo ${PROGNAME}: "$USAGE" >&2
+}
+
+errexit()
+{
+ echo ${PROGNAME}: "$@" >&2
+ exit 1
+}
+
+# Process command-line arguments:
+while getopts "s:" opt; do
+ case "$opt" in
+ s) Seed=$OPTARG ;;
+ *) usage ; exit 2;;
+ esac
+done
+
+shift $(($OPTIND - 1))
+
+case $# in
+ 2) Lower=$1; Upper=$2 ;;
+ *) usage ; exit 2;;
+esac
+
+# Check that specified values are integers:
+expr "$Lower" + 0 >/dev/null 2>&1
+[ $? -eq 2 ] && { errexit "lower ($Lower) not an integer"; }
+expr "$Upper" + 0 >/dev/null 2>&1
+[ $? -eq 2 ] && { errexit "upper ($Upper) not an integer"; }
+expr "$Seed" + 0 >/dev/null 2>&1
+[ $? -eq 2 ] && { errexit "seed ($Seed) not an integer"; }
+
+# Check that values are in the correct range:
+if (( "$Lower" < 0 )) || [ ${#Lower} -gt 5 ]; then
+ errexit "lower limit ($Lower) less than zero"
+fi
+if (( "$Upper" > 32767 )) || [ ${#Upper} -gt 5 ]; then
+ errexit "upper limit ($Upper) greater than 32767"
+fi
+if (( "$Seed" < 0 )) || (( "$Seed" > 32767 )) || [ ${#Seed} -gt 5 ]; then
+ errexit "seed value ($Seed) out of range (0 to 32767)"
+fi
+(( "$Upper" <= "$Lower" )) && errexit "upper limit ($Upper) <= lower limit ($Lower)"
+
+# Seed the random-number generator:
+RANDOM=$Seed
+# Compute value, scaled within range:
+let rand="$RANDOM % ($Upper - $Lower + 1) + $Lower"
+# Report result:
+echo $rand
diff --git a/examples/scripts/line-input.bash b/examples/scripts/line-input.bash
new file mode 100644
index 0000000..3f2efae
--- /dev/null
+++ b/examples/scripts/line-input.bash
@@ -0,0 +1,184 @@
+#! /bin/bash
+#
+#From: kaz@cafe.net (Kaz Kylheku)
+#Newsgroups: comp.unix.shell
+#Subject: Funky little bash script
+#Message-ID: <6mspb9$ft2@espresso.cafe.net>
+#Date: Thu, 25 Jun 1998 06:11:39 GMT
+
+#Here is something I wrote a few years ago when I was bored one day.
+#Warning: this contains control characters.
+
+# Line input routine for GNU Bourne-Again Shell
+# plus terminal-control primitives.
+#
+# by Kaz Kylheku
+# June 1996, Vancouver, Canada
+
+
+#
+# Function to disable canonical input processing.
+# Terminal modes are saved into variable "savetty"
+#
+#
+
+function raw
+{
+ savetty=$(stty -g)
+ stty -icanon -isig -echo -echok -echonl inlcr
+}
+
+#
+# Function to restore terminal settings from savetty variable
+#
+
+function restore
+{
+ stty $savetty
+}
+
+#
+# Set terminal MIN and TIME values.
+# If the input argument is a zero, set up terminal to wait for
+# a keystroke indefinitely. If the argument is non-zero, set up
+# an absolute timeout of that many tenths of a second. The inter-keystroke
+# timer facility of the terminal driver is not exploited.
+#
+
+function settimeout
+# $1 = tenths of a second
+{
+ if [ "$1" = "0" ] ; then
+ min=1
+ timeout=0
+ else
+ min=0
+ timeout="$1"
+ fi
+
+ stty min $min time $timeout
+
+ unset min timeout
+}
+
+#
+# Input a single key using 'dd' and echo it to standard output.
+# Launching an external program to get a single keystroke is a bit
+# of a pig, but it's the best you can do! Maybe we could convince the
+# GNU guys to make 'dd' a bash builtin.
+#
+
+function getkey
+{
+ eval $1="\"\$(dd bs=1 count=1 2> /dev/null)\""
+}
+
+#
+# Input a line of text gracefully.
+# The first argument is the name of a variable where the input line is
+# to be stored. If this variable is not empty, its contents are printed
+# and treated as though the user had entered them.
+# The second argument gives the maximum length of the input line; if it
+# is zero, the input is unlimited (bad idea).
+# ^W is used to delete words
+# ^R redraws the line at any time by backspacing over it and reprinting it
+# ^U backspaces to the beginning
+# ^H or ^? (backspace or del) delete a single character
+# ^M (enter) terminates the input
+# all other control keys are ignored and cause a beep when pressed
+#
+#
+
+
+function getline
+{
+ settimeout 0 # No keystroke timeout.
+ save_IFS="$IFS" # Save word delimiter and set it to
+ IFS="" # to null so ${#line} works correctly.
+ eval line=\${$1} # Fetch line contents
+ echo -n "$line" # and print the existing line.
+ while [ 1 ] ; do
+ getkey key # fetch a single keystroke
+ case "$key" in
+  |  ) # BS or DEL
+ if [ ${#line} != 0 ] ; then # if line not empty
+ echo -n " " # print destructive BS
+ line="${line%%?}" # chop last character
+ else # else if line empty
+ echo -n  # beep the terminal
+ fi
+ ;;
+  ) # kill to line beg
+ while [ ${#line} != 0 ] ; do # while line not empty
+ echo -n " " # print BS, space, BS
+ line="${line%?}" # shorten line by 1
+ done
+ ;;
+  ) # redraw line
+ linesave="$line" # save the contents
+ while [ ${#line} != 0 ] ; do # kill to line beg
+ echo -n " "
+ line="${line%?}"
+ done
+ echo -n "$linesave" # reprint, restore
+ line="$linesave"
+ unset linesave # forget temp var
+ ;;
+  )
+ while [ "${line% }" != "$line" ] && [ ${#line} != 0 ] ; do
+ echo -n " "
+ line="${line%?}"
+ done
+ while [ "${line% }" = "$line" ] && [ ${#line} != 0 ] ; do
+ echo -n " "
+ line="${line%?}"
+ done
+ ;;
+  |  |  |  |  |  |  |  |  | | | )
+ echo -n  # ignore various control characters
+ ;; # with an annoying beep
+  |  |  |  |  |  |  |  |  |  |  |  |  )
+ echo -n 
+ ;;
+ ' ' |  |  |  |  |  )
+ echo -n 
+ ;;
+ '' ) # Break out of loop on carriage return.
+ echo # Send a newline to the terminal.
+ break # (Also triggered by NUL char!).
+ ;;
+ * ) # Append character to the end of the line.
+ # If length is restricted, and the line is too
+ # long, then beep...
+
+ if [ "$2" != 0 ] && [ $(( ${#line} >= $2 )) = 1 ] ; then
+ echo -n 
+ else # Otherwise add
+ line="$line$key" # the character.
+ echo -n "$key" # And echo it.
+ fi
+ ;;
+ esac
+ done
+ eval $1=\"\$line\"
+ IFS="$save_IFS"
+ unset line save_IFS
+}
+
+# uncomment the lines below to create a standalone test program
+#
+echo "Line input demo for the GNU Bourne-Again Shell."
+echo "Hacked by Kaz Kylheku"
+echo
+echo "Use ^H/Backspace/Del to erase, ^W to kill words, ^U to kill the"
+echo "whole line of input, ^R to redraw the line."
+echo "Pass an argument to this program to prime the buffer contents"
+raw
+echo -n "go: "
+if [ ${#1} != 0 ] ; then
+ LINE=$1
+fi
+getline LINE 50
+restore
+
+echo "<$LINE>"
diff --git a/examples/scripts/nohup.bash b/examples/scripts/nohup.bash
new file mode 100644
index 0000000..3781293
--- /dev/null
+++ b/examples/scripts/nohup.bash
@@ -0,0 +1,51 @@
+#
+# BASH VERSION OF nohup COMMAND
+#
+ctype()
+{
+ path=$(builtin type -p $cmd | sed 1q)
+ if [ -n "$path" ]; then
+ echo "$path"
+ return 0
+ else
+ case "$cmd" in
+ */*) [ -x "$cmd ] && { echo "$cmd" ; return 0; } ;;
+ *) case "$(builtin type -t $cmd)" in
+ "") return 1;;
+ *) echo "$cmd" ; return 0;;
+ esac ;;
+ esac
+ fi
+ return 1
+}
+
+trap '' HUP # ignore hangup
+command=$(ctype "$1")
+oldmask=$(umask)
+umask u=rw,og= # default mode for nohup.out
+exec 0< /dev/null # disconnect input
+if [ -t 1 ]; then # redirect output if necessary
+ if [ -w . ]; then
+ echo 'Sending output to nohup.out'
+ exec >> nohup.out
+ else echo "Sending output to $HOME/nohup.out"
+ exec >> $HOME/nohup.out
+ fi
+fi
+
+umask "$oldmask"
+
+# direct unit 2 to a file
+if [ -t 2 ]; then
+ exec 2>&1
+fi
+
+# run the command
+case $command in
+*/*) exec "$@"
+ ;;
+time) eval "$@"
+ ;;
+*) "$@"
+ ;;
+esac
diff --git a/examples/scripts/precedence b/examples/scripts/precedence
new file mode 100755
index 0000000..9bbdb97
--- /dev/null
+++ b/examples/scripts/precedence
@@ -0,0 +1,75 @@
+# @(#)precedence_test 1.0 91/07/24 Maarten Litmaath
+# test of relative precedences for `&&' and `||' operators
+
+echo "\`Say' echos its argument. Its return value is of no interest."
+case `echo -n` in
+ '') Say () { echo -n "$*" ; } ;;
+ *) Say () { echo "$*\c" ; } ;;
+esac
+
+echo "\`Truth' echos its argument and returns a TRUE result."
+Truth () {
+ Say $1;
+ return 0;
+}
+
+echo "\`False' echos its argument and returns a FALSE result."
+False () {
+ Say $1;
+ return 1;
+}
+
+echo ""
+
+cmd1='$open $test1 && $test2 $close || $test3'
+cmd2='$test1 || $open $test2 && $test3 $close'
+
+grouping_sh=
+grouping_C='( )'
+
+test3='Say 3'
+
+for i in 1 2
+do
+ eval proto=\$cmd$i
+
+ for test1 in 'Truth 1' 'False 1'
+ do
+ for test2 in 'Truth 2' 'False 2'
+ do
+ for precedence in sh C
+ do
+ eval set x \$grouping_$precedence
+ shift
+ open=${1-' '}
+ close=${2-' '}
+ eval cmd=\""$proto"\"
+ Say "$cmd output="
+ output=`eval "$cmd"`
+ Say "$output"
+ read correct || { echo 'Input fubar. Abort.' >&2; exit 1; }
+ test "X$output" = "X$correct" || echo " correct=$correct"
+ echo ''
+ done
+
+ echo ''
+ done
+ done
+done << EOF
+12
+12
+123
+123
+13
+13
+13
+13
+13
+1
+13
+1
+123
+123
+12
+12
+EOF
diff --git a/examples/scripts/randomcard.bash b/examples/scripts/randomcard.bash
new file mode 100644
index 0000000..9cb6b50
--- /dev/null
+++ b/examples/scripts/randomcard.bash
@@ -0,0 +1,18 @@
+# The following prints a random card from a card deck.
+#
+# cribbed from the ksh93 book, example from page 70
+#
+# chet@po.cwru.edu
+#
+declare -i i=0
+
+# load the deck
+for suit in clubs diamonds hearts spades; do
+ for n in ace 2 3 4 5 6 7 8 9 10 jack queen king; do
+ card[i]="$n of $suit"
+ i=i+1 # let is not required with integer variables
+ done
+done
+
+# and print a random card
+echo ${card[RANDOM%52]}
diff --git a/examples/scripts/scrollbar b/examples/scripts/scrollbar
new file mode 100755
index 0000000..388bea8
--- /dev/null
+++ b/examples/scripts/scrollbar
@@ -0,0 +1,25 @@
+#!/bin/bash
+#
+# scrollbar - display scrolling text
+#
+# usage: scrollbar args
+#
+# A cute hack originally from Heiner Steven <hs@bintec.de>
+#
+# converted from ksh syntax to bash v2 syntax by Chet Ramey
+
+WIDTH=${COLUMNS:-80}
+WMINUS=$(( $WIDTH - 1 ))
+
+[ $# -lt 1 ] && set -- TESTING
+
+# use the bash-2.02 printf builtin
+Text=$(printf "%-${WIDTH}s" "$*")
+Text=${Text// /_}
+
+while :
+do
+ printf "%-.${WIDTH}s\r" "$Text"
+ LastC=${Text:${WMINUS}:1}
+ Text="$LastC""${Text%?}"
+done
diff --git a/examples/scripts/scrollbar2 b/examples/scripts/scrollbar2
new file mode 100755
index 0000000..0e53634
--- /dev/null
+++ b/examples/scripts/scrollbar2
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# scrollbar - display scrolling text
+#
+# usage: scrollbar args
+#
+# A cute hack originally from Heiner Steven <hs@bintec.de>
+#
+# converted from ksh syntax to bash v2 syntax by Chet Ramey
+
+WIDTH=${COLUMNS:-80}
+WMINUS=$(( $WIDTH - 1 ))
+
+[ $# -lt 1 ] && set -- TESTING
+
+# use the bash-2.02 printf builtin
+Text=$(printf "%-${WIDTH}s" "$*")
+
+while :
+do
+ printf "%-.${WIDTH}s\r" "$Text"
+ LastC=${Text:${WMINUS}:1}
+ Text="$LastC""${Text%?}"
+done
diff --git a/examples/scripts/self-repro b/examples/scripts/self-repro
new file mode 100644
index 0000000..951d4e4
--- /dev/null
+++ b/examples/scripts/self-repro
@@ -0,0 +1,9 @@
+# self-reproducing script (except for these comment lines -- remove them)
+# i got this from the ksh93 faq:
+# http://www.kornshell.com/doc/faq.html
+#
+n="
+" q="'" x="cat <<-!" y=! z='n="$n" q="$q" x="$x" y=$y z=$q$z$q$n$x$n$z$n$y'
+cat <<-!
+n="$n" q="$q" x="$x" y=$y z=$q$z$q$n$x$n$z$n$yb
+!
diff --git a/examples/scripts/showperm.bash b/examples/scripts/showperm.bash
new file mode 100644
index 0000000..2e06c0b
--- /dev/null
+++ b/examples/scripts/showperm.bash
@@ -0,0 +1,53 @@
+#Newsgroups: comp.unix.shell
+#From: gwc@root.co.uk (Geoff Clare)
+#Subject: Re: Determining permissions on a file
+#Message-ID: <Dr79nw.DtL@root.co.uk>
+#Date: Fri, 10 May 1996 17:23:56 GMT
+
+#Here's a bit of Korn shell that converts the symbolic permissions produced
+#by "ls -l" into octal, using only shell builtins. How to create a script
+#combining this with an "ls -l" is left as an exercise...
+#
+#
+# Converted to Bash v2 syntax by Chet Ramey <chet@po.cwru.edu>
+#
+# usage: showperm modestring
+#
+# example: showperm '-rwsr-x--x'
+#
+
+[ -z "$1" ] && {
+ echo "showperm: usage: showperm modestring" >&2
+ exit 2
+}
+
+tmode="$1"
+
+typeset -i omode sbits
+typeset pmode
+
+# check for set-uid, etc. bits
+sbits=0
+case $tmode in
+???[sS]*) (( sbits += 8#4000 )) ;; # set-uid
+??????[sSl]*) (( sbits += 8#2000 )) ;; # set-gid or mand. lock
+?????????[tT]*) (( sbits += 8#1000 )) ;; # sticky
+esac
+
+omode=0
+while :
+do
+ tmode=${tmode#?}
+ case $tmode in
+ "") break ;;
+ [-STl]*) (( omode *= 2 )) ;;
+ [rwxst]*) (( omode = omode*2 + 1 )) ;;
+ *) echo "$0: first letter of \"$tmode\" is unrecognized" >&2
+ (( omode *= 2 ))
+ ;;
+ esac
+done
+
+(( omode += sbits ))
+
+printf "0%o\n" $omode
diff --git a/examples/scripts/shprompt b/examples/scripts/shprompt
new file mode 100755
index 0000000..ec8b997
--- /dev/null
+++ b/examples/scripts/shprompt
@@ -0,0 +1,137 @@
+#
+# shprompt -- give a prompt and get an answer satisfying certain criteria
+#
+# shprompt [-dDfFsy] prompt
+# s = prompt for string
+# f = prompt for filename
+# F = prompt for full pathname to a file or directory
+# d = prompt for a directory name
+# D = prompt for a full pathname to a directory
+# y = prompt for y or n answer
+#
+# Chet Ramey
+# chet@ins.CWRU.Edu
+
+type=file
+
+OPTS=dDfFsy
+
+succeed()
+{
+ echo "$1"
+ exit 0
+}
+
+while getopts "$OPTS" c
+do
+ case "$c" in
+ s) type=string
+ ;;
+ f) type=file
+ ;;
+ F) type=path
+ ;;
+ d) type=dir
+ ;;
+ D) type=dirpath
+ ;;
+ y) type=yesno
+ ;;
+ ?) echo "usage: $0 [-$OPTS] prompt" 1>&2
+ exit 2
+ ;;
+ esac
+done
+
+if [ "$OPTIND" -gt 1 ] ; then
+ shift $[$OPTIND - 1]
+fi
+
+while :
+do
+ case "$type" in
+ string)
+ echo -n "$1" 1>&2
+ read ans || exit 1
+ if [ -n "$ans" ] ; then
+ succeed "$ans"
+ fi
+ ;;
+ file|path)
+ echo -n "$1" 1>&2
+ read ans || exit 1
+ #
+ # use `fn' and eval so that bash will do tilde expansion for
+ # me
+ #
+ eval fn="$ans"
+ case "$fn" in
+ /*) if test -e "$fn" ; then
+ succeed "$fn"
+ else
+ echo "$0: '$fn' does not exist" 1>&2
+ fi
+ ;;
+ *) if [ "$type" = "path" ] ; then
+ echo "$0: must give full pathname to file" 1>&2
+ else
+ if test -e "$fn" ; then
+ succeed "$fn"
+ else
+ echo "$0: '$fn' does not exist" 1>&2
+ fi
+ fi
+ ;;
+ esac
+ ;;
+ dir|dirpath)
+ echo -n "$1" 1>&2
+ read ans || exit 1
+ #
+ # use `fn' and eval so that bash will do tilde expansion for
+ # me
+ #
+ eval fn="$ans"
+ case "$fn" in
+ /*) if test -d "$fn" ; then
+ succeed "$fn"
+ elif test -e "$fn" ; then
+ echo "$0 '$fn' is not a directory" 1>&2
+ else
+ echo "$0: '$fn' does not exist" 1>&2
+ fi
+ ;;
+ *) if [ "$type" = "dirpath" ] ; then
+ echo "$0: must give full pathname to directory" 1>&2
+ else
+ if test -d "$fn" ; then
+ succeed "$fn"
+ elif test -e "$fn" ; then
+ echo "$0 '$fn' is not a directory" 1>&2
+ else
+ echo "$0: '$fn' does not exist" 1>&2
+ fi
+ fi
+ ;;
+ esac
+ ;;
+ yesno)
+ echo -n "$1" 1>&2
+ read ans || exit 1
+ case "$ans" in
+ y|Y|[yY][eE][sS])
+ succeed "yes"
+ ;;
+ n|N|[nN][oO])
+ succeed "no"
+ exit 0
+ ;;
+ *)
+ echo "$0: yes or no required" 1>&2
+ ;;
+ esac
+ ;;
+ esac
+done
+
+exit 1
diff --git a/examples/scripts/spin.bash b/examples/scripts/spin.bash
new file mode 100644
index 0000000..dc6a66a
--- /dev/null
+++ b/examples/scripts/spin.bash
@@ -0,0 +1,21 @@
+#!/bin/bash
+#
+# spin.bash -- provide a `spinning wheel' to show progress
+#
+# Chet Ramey
+# chet@po.cwru.edu
+#
+bs=$'\b'
+
+chars="|${bs} \\${bs} -${bs} /${bs}"
+
+# Infinite loop for demo. purposes
+while :
+do
+ for letter in $chars
+ do
+ echo -n ${letter}
+ done
+done
+
+exit 0
diff --git a/examples/scripts/timeout b/examples/scripts/timeout
new file mode 100644
index 0000000..ac8d88f
--- /dev/null
+++ b/examples/scripts/timeout
@@ -0,0 +1,53 @@
+#Newsgroups: comp.unix.admin,comp.unix.solaris,comp.unix.shell
+#From: gwc@root.co.uk (Geoff Clare)
+#Subject: Re: timeout -t <sec> <unix command> (Re: How to give rsh a shorter timeout?)
+#Message-ID: <EoBxrs.223@root.co.uk>
+#Date: Fri, 13 Feb 1998 18:23:52 GMT
+
+#
+# Conversion to bash v2 syntax done by Chet Ramey <chet@po.cwru.edu
+# UNTESTED
+#
+
+prog=${0##*/}
+usage="usage: $prog [-signal] [timeout] [:interval] [+delay] [--] <command>"
+
+SIG=-TERM # default signal sent to the process when the timer expires
+timeout=60 # default timeout
+interval=15 # default interval between checks if the process is still alive
+delay=2 # default delay between posting the given signal and
+ # destroying the process (kill -KILL)
+
+while :
+do
+ case $1 in
+ --) shift; break ;;
+ -*) SIG=$1 ;;
+ [0-9]*) timeout=$1 ;;
+ :*) EXPR='..\(.*\)' ; interval=`expr x"$1" : "$EXPR"` ;;
+ +*) EXPR='..\(.*\)' ; delay=`expr x"$1" : "$EXPR"` ;;
+ *) break ;;
+ esac
+ shift
+done
+
+case $# in
+0) echo "$prog: $usage" >&2 ; exit 2 ;;
+esac
+
+(
+ for t in $timeout $delay
+ do
+ while (( $t > $interval ))
+ do
+ sleep $interval
+ kill -0 $$ || exit
+ t=$(( $t - $interval ))
+ done
+ sleep $t
+ kill $SIG $$ && kill -0 $$ || exit
+ SIG=-KILL
+ done
+) 2> /dev/null &
+
+exec "$@"
diff --git a/examples/scripts/timeout2 b/examples/scripts/timeout2
new file mode 100755
index 0000000..2c6fb77
--- /dev/null
+++ b/examples/scripts/timeout2
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# Author: P@draigBrady.com
+# V1.0 : Nov 3 2006
+#
+# Execute a command with a timeout.
+# If the timeout occurs the exit status is 128
+#
+# Note there is an asynchronous equivalent of this
+# script packaged with bash (under /usr/share/doc/ in my distro),
+# which I only noticed after writing this.
+
+if [ "$#" -lt "2" ]; then
+ echo "Usage: `basename $0` timeout_in_seconds command" >&2
+ echo "Example: `basename $0` 2 sleep 3 || echo timeout" >&2
+ exit 1
+fi
+
+cleanup()
+{
+ kill %1 2>/dev/null #kill sleep $timeout if running
+ kill %2 2>/dev/null && exit 128 #kill monitored job if running
+}
+
+set -m #enable job control
+trap "cleanup" 17 #cleanup after timeout or command
+timeout=$1 && shift #first param is timeout in seconds
+sleep $timeout& #start the timeout
+"$@" #start the job
diff --git a/examples/scripts/timeout3 b/examples/scripts/timeout3
new file mode 100644
index 0000000..5c19d2e
--- /dev/null
+++ b/examples/scripts/timeout3
@@ -0,0 +1,91 @@
+#!/bin/bash
+#
+# The Bash shell script executes a command with a time-out.
+# Upon time-out expiration SIGTERM (15) is sent to the process. If the signal
+# is blocked, then the subsequent SIGKILL (9) terminates it.
+#
+# Based on the Bash documentation example.
+
+# Hello Chet,
+# please find attached a "little easier" :-) to comprehend
+# time-out example. If you find it suitable, feel free to include
+# anywhere: the very same logic as in the original examples/scripts, a
+# little more transparent implementation to my taste.
+#
+# Dmitry V Golovashkin <Dmitry.Golovashkin@sas.com>
+
+scriptName="${0##*/}"
+
+declare -i DEFAULT_TIMEOUT=9
+declare -i DEFAULT_INTERVAL=1
+declare -i DEFAULT_DELAY=1
+
+# Timeout.
+declare -i timeout=DEFAULT_TIMEOUT
+# Interval between checks if the process is still alive.
+declare -i interval=DEFAULT_INTERVAL
+# Delay between posting the SIGTERM signal and destroying the process by SIGKILL.
+declare -i delay=DEFAULT_DELAY
+
+function printUsage() {
+ cat <<EOF
+
+Synopsis
+ $scriptName [-t timeout] [-i interval] [-d delay] command
+ Execute a command with a time-out.
+ Upon time-out expiration SIGTERM (15) is sent to the process. If SIGTERM
+ signal is blocked, then the subsequent SIGKILL (9) terminates it.
+
+ -t timeout
+ Number of seconds to wait for command completion.
+ Default value: $DEFAULT_TIMEOUT seconds.
+
+ -i interval
+ Interval between checks if the process is still alive.
+ Positive integer, default value: $DEFAULT_INTERVAL seconds.
+
+ -d delay
+ Delay between posting the SIGTERM signal and destroying the
+ process by SIGKILL. Default value: $DEFAULT_DELAY seconds.
+
+As of today, Bash does not support floating point arithmetic (sleep does),
+therefore all delay/time values must be integers.
+EOF
+}
+
+# Options.
+while getopts ":t:i:d:" option; do
+ case "$option" in
+ t) timeout=$OPTARG ;;
+ i) interval=$OPTARG ;;
+ d) delay=$OPTARG ;;
+ *) printUsage; exit 1 ;;
+ esac
+done
+shift $((OPTIND - 1))
+
+# $# should be at least 1 (the command to execute), however it may be strictly
+# greater than 1 if the command itself has options.
+if (($# == 0 || interval <= 0)); then
+ printUsage
+ exit 1
+fi
+
+# kill -0 pid Exit code indicates if a signal may be sent to $pid process.
+(
+ ((t = timeout))
+
+ while ((t > 0)); do
+ sleep $interval
+ kill -0 $$ || exit 0
+ ((t -= interval))
+ done
+
+ # Be nice, post SIGTERM first.
+ # The 'exit 0' below will be executed if any preceeding command fails.
+ kill -s SIGTERM $$ && kill -0 $$ || exit 0
+ sleep $delay
+ kill -s SIGKILL $$
+) 2> /dev/null &
+
+exec "$@"
diff --git a/examples/scripts/vtree2 b/examples/scripts/vtree2
new file mode 100755
index 0000000..878cbab
--- /dev/null
+++ b/examples/scripts/vtree2
@@ -0,0 +1,43 @@
+#!/bin/bash
+#
+# vtree - make a tree printout of the specified directory, with disk usage
+# in 1k blocks
+#
+# usage: vtree [-a] [dir]
+#
+# Original posted to Usenet sometime in February, 1996
+# I believe that the original author is Brian S. Hiles <bsh29256@atc.fhda.edu>
+#
+usage()
+{
+ echo "vtree: usage: vtree [-a] [dir]" >&2
+}
+
+while getopts a opt
+do
+ case "$opt" in
+ a) andfiles=-a ;;
+ *) usage ; exit 2 ;;
+ esac
+done
+
+shift $((OPTIND - 1))
+
+export BLOCKSIZE=1k # 4.4 BSD systems need this
+
+[ $# -eq 0 ] && set .
+
+while [ $# -gt 0 ]
+do
+ cd "$1" || { shift; [ $# -ge 1 ] && echo >&2; continue; }
+ echo -n "$PWD"
+
+ du $andfiles | sort -k 2f | sed \
+ -e 's/\([^ ]*\) \(.*\)/\2 (\1)/' \
+ -e "s#^$1##" \
+ -e 's#[^/]*/\([^/]*\)$#|____\1#' \
+ -e 's#[^/]*/#| #g'
+
+ [ $# -gt 1 ] && echo
+ shift
+done
diff --git a/examples/scripts/vtree3 b/examples/scripts/vtree3
new file mode 100644
index 0000000..2059b9f
--- /dev/null
+++ b/examples/scripts/vtree3
@@ -0,0 +1,99 @@
+#!/bin/ksh
+#
+# Name: dirtree
+# Programmer:
+# Hemant T. Shah
+# Life Insurance Data Processing
+# July 12 1994
+#
+# Description:
+# Print directory tree structure as follows:
+# |___Mail
+# |___scheduler
+# |___cics_scripts
+# |___tar_msdos
+# |___awk
+# |___attributes
+# |___tmp
+# |___News
+# |___dosscsi
+# |___FAQ_xterminal
+# |___shell_history.Z
+# |___FAQ_AIX
+# |___aix_ftp_site
+# |___hp_software
+# |___dnload
+# |___telnet.h
+# |___msdos
+# |___tnetd.tar.Z
+# |___aix
+# |___hp
+# |___xkey.c
+#
+# Conversion to bash v2 syntax done by Chet Ramey
+# - removed command substitutions calling `basename'
+#
+
+ProgramName=${0##*/}
+Path="."
+ShowAll=1
+ShowDir=0
+
+
+ExpandDirectory()
+{
+local object # Local variable
+
+cd "$1"
+
+for object in $PWD/.??* $PWD/*
+do
+ if [ -d $object ]; # It is a directory
+ then
+ echo "${indent}|___${object##*/}/"
+ indent="${indent}! " # Add to indentation
+ if [ -x $object ];
+ then
+ ExpandDirectory $object
+ fi
+ indent=${indent%????} # Remove from indentation
+ elif [ -e $object ]; then
+ if (( ShowAll == 1 ));
+ then
+ echo "${indent}|___${object##*/}"
+ fi
+ fi
+done
+
+}
+
+usage()
+{
+ echo -e "Usage: $ProgramName [-h] [-f] [-d] [path] "
+ echo -e "\t-h ... display this help message."
+ echo -e "\t-f path ... shows all files and directories below path (default)."
+ echo -e "\t-d path ... shows all directories only below path."
+}
+
+while getopts "fd" opt
+do
+ case $opt in
+ f) ShowAll=1 ;;
+ d) ShowDir=1 ;;
+ *) usage ; exit 2;;
+ esac
+done
+
+shift $(( $OPTIND - 1 ))
+
+Path=${1:-.}
+
+if [ ! -d "$Path" ]; then
+ echo "$0: error: specified path is not a directory." >&2
+ exit 1
+fi
+
+
+
+echo "!$Path/"
+ExpandDirectory $Path
diff --git a/examples/scripts/vtree3a b/examples/scripts/vtree3a
new file mode 100644
index 0000000..0678764
--- /dev/null
+++ b/examples/scripts/vtree3a
@@ -0,0 +1,100 @@
+#!/bin/bash
+#
+# Name: dirtree
+# Programmer:
+# Hemant T. Shah
+# Life Insurance Data Processing
+# July 12 1994
+#
+# Description:
+# Print directory tree structure as follows:
+# |___Mail
+# |___scheduler
+# |___cics_scripts
+# |___tar_msdos
+# |___awk
+# |___attributes
+# |___tmp
+# |___News
+# |___dosscsi
+# |___FAQ_xterminal
+# |___shell_history.Z
+# |___FAQ_AIX
+# |___aix_ftp_site
+# |___hp_software
+# |___dnload
+# |___telnet.h
+# |___msdos
+# |___tnetd.tar.Z
+# |___aix
+# |___hp
+# |___xkey.c
+#
+# Conversion to bash v2 syntax done by Chet Ramey
+# - removed command substitutions calling `basename'
+#
+
+ProgramName=${0##*/}
+Path="."
+ShowAll=1
+ShowDir=0
+
+
+ExpandDirectory()
+{
+local object # Local variable
+
+cd "$1"
+
+for object in $PWD/.??* $PWD/*
+do
+ if [ -d $object ]; # It is a directory
+ then
+ echo "${indent}|___${object##*/}/"
+ indent="${indent}! " # Add to indentation
+ if [ -x $object ];
+ then
+ ExpandDirectory $object
+ fi
+ indent=${indent%????} # Remove from indentation
+ elif [ -e $object ]; then
+ if (( ShowAll == 1 ));
+ then
+ echo "${indent}|___${object##*/}"
+ fi
+ fi
+done
+
+}
+
+usage()
+{
+ echo -e "Usage: $ProgramName [-h] [-f] [-d] [path] "
+ echo -e "\t-h ... display this help message."
+ echo -e "\t-f path ... shows all files and directories below path (default)."
+ echo -e "\t-d path ... shows all directories only below path."
+}
+
+while getopts "fd" opt
+do
+ case $opt in
+ f) ShowAll=1 ;;
+ #d) ShowDir=1 ;;
+ d) ShowAll=0 ;;
+ *) usage ; exit 2;;
+ esac
+done
+
+shift $(( $OPTIND - 1 ))
+
+Path=${1:-.}
+
+if [ ! -d "$Path" ]; then
+ echo "$0: error: specified path is not a directory." >&2
+ exit 1
+fi
+
+
+
+echo "!$Path/"
+ExpandDirectory $Path
diff --git a/examples/scripts/websrv.sh b/examples/scripts/websrv.sh
new file mode 100644
index 0000000..e07746b
--- /dev/null
+++ b/examples/scripts/websrv.sh
@@ -0,0 +1,230 @@
+#!/bin/sh
+#for instructions or updates go to:
+#<A HREF="http://math.ucr.edu:8889/">This script's home page</A>
+#email me questions or comments at:
+#<A HREF="mailto:insom@math.ucr.edu">insom@math.ucr.edu</A>
+#copyright chris ulrich; This software may be used or modified
+#in any way so long as this notice remains intact.
+#
+# WWW server in sh
+# Author: Chris Ulrich <chris@tinker.ucr.edu>
+#
+
+INDEX=index.html
+date=`date`
+DOCHOME=/home/insom/web-docs
+BINHOME=/home/insom/web-bin
+LOGHOME=/home/insom/web-logs
+LOGFILE=$LOGHOME/access_log
+#verbose=:
+verbose=echo
+exec 2>> $LOGHOME/error_log
+
+hheader() {
+echo "HTTP/1.0 200 OK
+Server: WebSH/2.00
+Connection: close
+Date: $date"
+}
+
+header() {
+echo "Content-type: $1
+"
+}
+
+no_url() {
+ header "text/plain"
+ echo "No such url $1"
+}
+
+send() {
+ #case "$#" in 2) ;; *) echo eep! | mailx insom@math.ucr.edu ; exit 3 ;; esac
+ if test -f "$DOCHOME/$2"
+ then
+ header "$1"
+ cat "$DOCHOME/$2"
+ else
+ no_url "$2"
+ fi
+}
+
+LsToHTML() {
+ if test -f "$DOCHOME/$url/.title"
+ then
+ header "text/html; charset=US-ASCII"
+ echo "<pre>"
+ cat "$DOCHOME/$url/.title"
+ echo "</pre>"
+ elif test -f "$DOCHOME/$url/.title.html"
+ then
+ header "text/html; charset=US-ASCII"
+ cat "$DOCHOME/$url/.title.html"
+ else
+ header "text/html; charset=US-ASCII"
+ fi
+
+ case "$url" in
+ /) ;;
+ *) url="$url/"
+ esac
+
+ while read link
+ do
+ case $link in
+ *.cgi) ;;
+ *)
+ echo "<A HREF=\"$url$link\">$link</A> <BR>"
+ ;;
+ esac
+ done
+}
+
+read method data
+
+$verbose "
+$date access from ${TCPREMOTEINFO:=NO-IDENT}@${TCPREMOTEHOST:=$TCPREMOTEIP}
+ on local machine $TCPLOCALHOST
+ $method $data " >> $LOGFILE
+
+for hopeurl in $data
+do
+ url="${url}${url:+ }$second"
+ second="$hopeurl"
+done
+
+case "$second" in
+ *[1-9].*)
+ read inheader
+ while
+ case "$inheader" in
+ ?|'') false
+ ;;
+ *)
+ read inheader
+ ;;
+ esac
+ do
+ :
+ done
+ hheader
+ ;;
+esac
+
+case "$url" in
+ *..*)
+ no_url "$url"
+ exit 1
+ ;;
+ *.txt|*.[ch])
+ send "text/plain; charset=US-ASCII" "$url"
+ ;;
+ *.html)
+ send "text/html; charset=US-ASCII" "$url"
+ ;;
+ *.cgi)
+ if test -x "$DOCHOME/$url"
+ then
+ read message
+ echo "$message" | "$DOCHOME/$url"
+ else
+ no_url "$url"
+ fi
+ ;;
+ *".cgi?"*)
+ oIFS="$IFS"
+ echo "$url" | {
+ IFS='?' read url QUERY_STRING
+ if test -x "$DOCHOME/$url"
+ then
+ IFS="$oIFS"
+ export QUERY_STRING
+ "$DOCHOME/$url"
+ else
+ no_url "$url"
+ fi
+ }
+ ;;
+ *.[Gg][Ii][Ff])
+ send "image/gif" "$url"
+ ;;
+ *.[Jj][Pp][Gg]|*.[Jj][Pp][Ee][Gg])
+ send "image/jpeg" "$url"
+ ;;
+ *.tbl)
+ header "text/html; charset=US-ASCII"
+ echo "<pre>"
+ test -f "$DOCHOME/$url" &&
+ tbl < "$DOCHOME/$url" | nroff ||
+ no_url "$url"
+ echo "</pre>"
+ ;;
+ *.nroff)
+ header "text/html; charset=US-ASCII"
+ echo "<pre>"
+ test -f "$DOCHOME/$url" &&
+ nroff < "$DOCHOME/$url" ||
+ no_url "$url"
+ echo "</pre>"
+ ;;
+ *mp[23])
+ if test -f "$DOCHOME/$url"
+ then
+ header "application/mpstream"
+ echo "+$TCPLOCALIP:${MPSERVPORT:=9001}/$url"
+ else
+ no_url "$url"
+ fi
+ ;;
+ *.[0-9]|*.[0-9][a-z])
+ header "text/html; charset=US-ASCII"
+ echo "<pre>"
+ if test -f "$DOCHOME/$url"
+ then
+ #nroff -man "$DOCHOME/$url" | $BINHOME/man2html
+ echo "perl at the moment is broken, so man2html doesn't work. Sorry."
+ echo "</pre>"
+ else
+ no_url "$url"
+ fi
+ ;;
+ *.???|*.??)
+ send "unknown/data" "$url"
+ ;;
+ */)
+ if test -d "$DOCHOME/$url"
+ then
+ ls "$DOCHOME/$url" | LsToHTML
+ fi
+ ;;
+ *)
+ if test -f "$DOCHOME/$url"
+ then
+ read filetype < "$DOCHOME/$url"
+ case "$filetype" in
+ \#!/*/*|\#!?/*/*)
+ header "text/plain; charset=US-ASCII"
+ cat "$DOCHOME/$url"
+ ;;
+ '<!*>')
+ header "text/html; charset=US-ASCII"
+ cat "$DOCHOME/$url"
+ ;;
+ *)
+ header "text/html; charset=US-ASCII"
+ echo "<pre>"
+ cat "$DOCHOME/$url"
+ echo "</pre>"
+ ;;
+ esac
+ elif test -f "$DOCHOME/$url/$INDEX"
+ then
+ header "text/html; charset=US-ASCII"
+ cat "$DOCHOME/$url/$INDEX"
+ elif test -d "$DOCHOME/$url"
+ then
+ ls "$DOCHOME/$url" | LsToHTML
+ else
+ no_url "$url"
+ fi
+ ;;
+esac
diff --git a/examples/scripts/xterm_title b/examples/scripts/xterm_title
new file mode 100755
index 0000000..72ba099
--- /dev/null
+++ b/examples/scripts/xterm_title
@@ -0,0 +1,27 @@
+#! /bin/bash
+#
+# xterm_title - print the contents of the xterm title bar
+#
+# Derived from http://www.clark.net/pub/dickey/xterm/xterm.faq.html#how2_title
+#
+P=${0##*/}
+[ -z "$DISPLAY" ] && {
+ echo "${P}: not running X" >&2
+ exit 1
+}
+
+if [ -z "$TERM" ] || [ "$TERM" != "xterm" ]; then
+ echo "${P}: not running in an xterm" >&2
+ exit 1
+fi
+
+exec </dev/tty
+old=$(stty -g)
+stty raw -echo min 0 time ${1-10}
+echo -e "\033[21t\c" > /dev/tty
+IFS='' read -r a
+stty $old
+b=${a#???}
+echo "${b%??}"
+
+exit 0
diff --git a/examples/scripts/zprintf b/examples/scripts/zprintf
new file mode 100755
index 0000000..5e2e3ad
--- /dev/null
+++ b/examples/scripts/zprintf
@@ -0,0 +1,26 @@
+#! /bin/bash
+#
+# zprintf - function that calls gawk to do printf for those systems that
+# don't have a printf executable
+#
+# The format and arguments can have trailing commas, just like gawk
+#
+# example:
+# zprintf 'Eat %x %x and suck %x!\n' 57005 48879 64206
+#
+# Chet Ramey
+# chet@po.cwru.edu
+
+[ $# -lt 1 ] && {
+ echo "zprintf: usage: zprintf format [args ...]" >&2
+ exit 2
+}
+
+fmt="${1%,}"
+shift
+
+for a in "$@"; do
+ args="$args,\"${a%,}\""
+done
+
+gawk "BEGIN { printf \"$fmt\" $args }"
diff --git a/examples/startup-files/Bash_aliases b/examples/startup-files/Bash_aliases
new file mode 100644
index 0000000..bb9c01e
--- /dev/null
+++ b/examples/startup-files/Bash_aliases
@@ -0,0 +1,63 @@
+# Some useful aliases.
+alias texclean='rm -f *.toc *.aux *.log *.cp *.fn *.tp *.vr *.pg *.ky'
+alias clean='echo -n "Really clean this directory?";
+ read yorn;
+ if test "$yorn" = "y"; then
+ rm -f \#* *~ .*~ *.bak .*.bak *.tmp .*.tmp core a.out;
+ echo "Cleaned.";
+ else
+ echo "Not cleaned.";
+ fi'
+alias h='history'
+alias j="jobs -l"
+alias l="ls -l "
+alias ll="ls -l"
+alias ls="ls -F"
+alias pu="pushd"
+alias po="popd"
+
+#
+# Csh compatability:
+#
+alias unsetenv=unset
+function setenv () {
+ export $1="$2"
+}
+
+# Function which adds an alias to the current shell and to
+# the ~/.bash_aliases file.
+add-alias ()
+{
+ local name=$1 value="$2"
+ echo alias $name=\'$value\' >>~/.bash_aliases
+ eval alias $name=\'$value\'
+ alias $name
+}
+
+# "repeat" command. Like:
+#
+# repeat 10 echo foo
+repeat ()
+{
+ local count="$1" i;
+ shift;
+ for i in $(seq 1 "$count");
+ do
+ eval "$@";
+ done
+}
+
+# Subfunction needed by `repeat'.
+seq ()
+{
+ local lower upper output;
+ lower=$1 upper=$2;
+
+ if [ $lower -ge $upper ]; then return; fi
+ while [ $lower -le $upper ];
+ do
+ echo -n "$lower "
+ lower=$(($lower + 1))
+ done
+ echo "$lower"
+}
diff --git a/examples/startup-files/Bash_profile b/examples/startup-files/Bash_profile
new file mode 100644
index 0000000..141e8df
--- /dev/null
+++ b/examples/startup-files/Bash_profile
@@ -0,0 +1,18 @@
+# Startup file for bash login shells.
+#
+default_dir=/usr/local/lib/
+
+if [ -n "$PS1" ]; then
+ PS1='\u@\h(\#)\$ '
+ IGNOREEOF=3
+fi
+
+LOGIN_SHELL=true
+
+# If the user has her own init file, then use that one, else use the
+# canonical one.
+if [ -f ~/.bashrc ]; then
+ . ~/.bashrc
+elif [ -f ${default_dir}Bashrc ]; then
+ . ${default_dir}Bashrc;
+fi
diff --git a/examples/startup-files/Bashrc.bfox b/examples/startup-files/Bashrc.bfox
new file mode 100644
index 0000000..efe7d88
--- /dev/null
+++ b/examples/startup-files/Bashrc.bfox
@@ -0,0 +1,70 @@
+# Bourne Again SHell init file.
+#
+# Files you make look like rw-rw-r
+umask 002
+
+# Don't make useless coredump files. If you want a coredump,
+# say "ulimit -c unlimited" and then cause a segmentation fault.
+ulimit -c 0
+
+# Sometimes, there are lots of places that one can find tex inputs.
+export TEXINPUTS=.:$HOME/bin:/usr/lib/tex/inputs:/usr/local/lib/tex/inputs
+
+# Where's the Gnu stuff at?
+GNU=/usr/gnu/bin
+X11=/usr/bin/X11
+
+UTIL_PATH=$GNU:$X11
+STANDARD_PATH=/usr/local/bin:/usr/ucb:/bin:/usr/bin:/usr/etc:/etc:/usr/games
+
+if [ -d $HOME/bin/$HOSTTYPE ]; then
+ MY_PATH=$HOME/bin/$HOSTTYPE
+fi
+
+if [ -d $HOME/bin ]; then
+ MY_PATH=$MY_PATH:$HOME/bin
+fi
+
+if [ -d /usr/hosts ]; then
+ STANDARD_PATH=$STANDARD_PATH:/usr/hosts
+fi
+
+PATH=.:$MY_PATH:$UTIL_PATH:$STANDARD_PATH
+
+# If not running interactively, then return
+if [ -z "$PS1" ]; then
+ return
+fi
+
+# Set ignoreeof if you don't want EOF as the sole input to the shell to
+# immediately signal a quit condition. This only happens at the start
+# of a line if the line is empty, and you haven't just deleted a character
+# with C-d. I turn this on in ~/.bash_profile so that only login shells
+# have the right to be obnoxious.
+# set -o ignoreeof
+
+# Set auto_resume if you want to resume on "emacs", as well as on
+# "%emacs".
+auto_resume=exact
+
+# Set notify if you want to be asynchronously notified about background
+# job completion.
+set -o notify
+
+# Make it so that failed `exec' commands don't flush this shell.
+shopt -s execfail
+
+if [ -z "$LOGIN_SHELL" ]; then
+ PS1="\u@\h\$ "
+fi
+
+HISTSIZE=256
+MAILCHECK=60
+
+# A couple of default aliases.
+alias j='jobs -l'
+alias po=popd
+alias pu=pushd
+alias ls='ls -F'
+
+[ -f ~/.bash_aliases ] && . ~/.bash_aliases
diff --git a/examples/startup-files/README b/examples/startup-files/README
new file mode 100644
index 0000000..92667a6
--- /dev/null
+++ b/examples/startup-files/README
@@ -0,0 +1,21 @@
+Some sample startup files. The ones starting with capital letters
+are originally from Brian Fox. The ones starting with lowercase
+letters are from Chet Ramey.
+
+They will require changes for your environment.
+
+Bash_aliases Some useful aliases (Fox).
+Bash_profile Sample startup file for bash login shells (Fox).
+bash-profile Sample startup file for bash login shells (Ramey).
+bashrc Sample Bourne Again SHell init file (Ramey).
+Bashrc.bfox Sample Bourne Again SHell init file (Fox).
+README README
+
+apple Example Start-up files for Mac OS X.
+apple/aliases Sample aliases for Mac OS X.
+apple/bash.defaults Sample User preferences file.
+apple/environment Sample Bourne Again Shell environment file.
+apple/login Sample login wrapper.
+apple/logout Sample logout wrapper.
+apple/rc Sample Bourne Again Shell config file.
+apple/README README
diff --git a/examples/startup-files/apple/README b/examples/startup-files/apple/README
new file mode 100644
index 0000000..67ad14a
--- /dev/null
+++ b/examples/startup-files/apple/README
@@ -0,0 +1,33 @@
+This directory contains some useful bash files.
+
+In order to use this configuration:
+
+ echo "source ~/.bashrc" > ~/.profile
+ echo "source /usr/share/init/bash/rc" > ~/.bashrc
+ echo "source /usr/share/init/bash/login" > ~/.login
+
+In order to customize this setup:
+
+ mkdir ~/Library/init/bash
+
+and create the following files there as necessary:
+
+ aliases.mine - shell aliases
+ completions.mine - completions
+ environment.mine - environment
+ rc.mine - run commands
+ path - command search path
+
+See the corresponding file in /usr/share/init/bash for more information about the role of each file. You can easily extend or override the configuration provided by the default file. For example, you can add more aliases by adding the appropriate commands in aliases.mine.
+
+ -Fred
+ tritan@mit.edu
+
+
+aliases Sample aliases for Mac OS X.
+bash.defaults Sample User preferences file.
+environment Sample Bourne Again Shell environment file.
+login Sample login wrapper.
+logout Sample logout wrapper.
+rc Sample Bourne Again Shell config file.
+README README
diff --git a/examples/startup-files/apple/aliases b/examples/startup-files/apple/aliases
new file mode 100644
index 0000000..23d3399
--- /dev/null
+++ b/examples/startup-files/apple/aliases
@@ -0,0 +1,34 @@
+##
+# Bash aliases file
+#
+# Wilfredo Sanchez Jr. | tritan@mit.edu
+##
+
+##
+# Aliases
+##
+
+alias .='cwd'
+alias ..='cd ..'
+alias cd..='cd ..'
+alias cdwd='cd $(/bin/pwd)'
+alias cwd='echo $PWD'
+alias l='ls -lg'
+
+##
+# Functions
+##
+
+files () { find ${1} -type f -print ; }
+ff () { find . -name ${1} -print ; }
+ll () { ls -lag "$@" | more ; }
+word () { fgrep -i "$*" /usr/dict/web2 ; }
+wordcount () { cat "${1}" | tr -s ' .,;:?\!()[]"' '\012' | \
+ awk 'END {print NR}' ; }
+
+##
+# Read user's aliases
+##
+if [ -r ${bash_initdir}/aliases.mine ]; then
+ source ${bash_initdir}/aliases.mine
+fi
diff --git a/examples/startup-files/apple/bash.defaults b/examples/startup-files/apple/bash.defaults
new file mode 100644
index 0000000..a80145b
--- /dev/null
+++ b/examples/startup-files/apple/bash.defaults
@@ -0,0 +1,22 @@
+##
+# Bash
+# User preferences file
+# Override these in rc.mine
+#
+# Wilfredo Sanchez Jr. | tritan@mit.edu
+# July 09, 1992
+#
+# MIT Project Athena
+##
+
+if [ -n "$PS1" ]; then
+
+ # Prompts
+ PS1='[\h:\w] \u\$ '
+ PS2=' -> '
+ #PS3=
+ #PS4=
+
+ set -o emacs
+
+fi
diff --git a/examples/startup-files/apple/environment b/examples/startup-files/apple/environment
new file mode 100644
index 0000000..fee218b
--- /dev/null
+++ b/examples/startup-files/apple/environment
@@ -0,0 +1,24 @@
+##
+# Bourne Again Shell environment file
+# Global environment setup
+#
+# Wilfredo Sanchez Jr. | tritan@mit.edu
+# July 09, 1992
+#
+# MIT Project Athena
+#
+# ORIGINAL SOURCES: /usr/athena/lib/init/cshrc (ATHENA REL 7.3P)
+##
+
+export ENV_SET="YES" # avoid repeat
+
+# File creation mask
+umask 022 # all files created are -rw-r--r--
+
+##
+# Load user environment
+##
+
+if [ -f ${bash_initdir}/environment.mine ]; then
+ source ${bash_initdir}/environment.mine
+fi
diff --git a/examples/startup-files/apple/login b/examples/startup-files/apple/login
new file mode 100644
index 0000000..b91f787
--- /dev/null
+++ b/examples/startup-files/apple/login
@@ -0,0 +1,15 @@
+##
+# Set path
+##
+
+export PATH="${HOME}/${MACHTYPE}/bin:${HOME}/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
+
+export MANPATH="${HOME}/man:/usr/local/share/man:/usr/share/man"
+
+##
+# Read user's login
+##
+
+if (-r ${bash_initdir}/login.mine) then
+ source ${bash_initdir}/login.mine
+fi
diff --git a/examples/startup-files/apple/logout b/examples/startup-files/apple/logout
new file mode 100644
index 0000000..812731c
--- /dev/null
+++ b/examples/startup-files/apple/logout
@@ -0,0 +1,10 @@
+##
+# Destroy credentials
+##
+
+if [ -z "${TERM_PROGRAM}" ]; then
+ # Don't run these commands if the shell is launched by Terminal,
+ # even if it's a login shell.
+
+ if klist -s; then kdestroy; fi
+fi
diff --git a/examples/startup-files/apple/rc b/examples/startup-files/apple/rc
new file mode 100644
index 0000000..2451b9f
--- /dev/null
+++ b/examples/startup-files/apple/rc
@@ -0,0 +1,63 @@
+##
+# Bourne Again Shell config file
+#
+# Wilfredo Sanchez Jr. | tritan@mit.edu
+# July 09, 1992
+#
+# MIT Project Athena
+#
+# ORIGINAL SOURCES: /usr/athena/lib/init/cshrc (ATHENA REL 7.3P)
+##
+
+ default_initdir=/usr/share/init
+default_bash_initdir=${default_initdir}/bash
+ user_initdir=~/Library/init
+ user_bash_initdir=${user_initdir}/bash
+
+if [ -r ${user_bash_initdir} ]; then
+ initdir=${user_initdir}
+ bash_initdir=${user_bash_initdir}
+else
+ initdir=${default_initdir}
+ bash_initdir=${default_bash_initdir}
+fi
+
+# SET UP HOST-DEPENDANT VARIABLES, ETC.
+
+host=$(echo $(hostname) | tr A-Z a-z)
+
+user=`whoami`
+
+export HOST=${host}
+export USER=${user}
+
+# User ID
+if [ -z "${uid}" ]; then uid=$(id | cut -d = -f 2 | cut -d \( -f 1); fi
+
+# SET COMMAND SEARCH PATH AND MAN PATH
+if [ -f ${bash_initdir}/path ]; then source ${bash_initdir}/path; fi
+
+# ENVIRONMENT SETUP
+
+if [ -n "${PS1}" ]; then interactive="YES"; fi
+
+if [ -z "${ENV_SET}" ]; then
+ if [ -f ${default_bash_initdir}/environment ]; then
+ #echo "Initializing environment..."
+ source ${default_bash_initdir}/environment
+ fi
+fi
+
+if [ -r ${default_bash_initdir}/bash.defaults ]; then
+ source ${default_bash_initdir}/bash.defaults
+fi
+
+# DEFAULT LOGIN SOURCES
+if [ -f ${bash_initdir}/rc.mine ]; then source ${bash_initdir}/rc.mine; fi
+
+if [ "${interactive}" = "YES" ]; then
+ # These aren't useful for non-interactive sessions
+ if [ -f ${default_bash_initdir}/aliases ]; then
+ source ${default_bash_initdir}/aliases
+ fi
+fi
diff --git a/examples/startup-files/bash-profile b/examples/startup-files/bash-profile
new file mode 100644
index 0000000..e811df8
--- /dev/null
+++ b/examples/startup-files/bash-profile
@@ -0,0 +1,39 @@
+# This is the filename where your incoming mail arrives.
+MAIL=~/mbox
+MAILCHECK=30
+
+HISTFILE=~/.history/history.$HOSTNAME
+
+PATH1=/usr/homes/chet/bin.$HOSTTYPE:/usr/local/bin/gnu:
+PATH2=/usr/local/bin:/usr/ucb:/bin:/usr/bin/X11:.
+PATH3=/usr/bin:/usr/new/bin:/usr/contrib/bin
+PATH=$PATH1:$PATH2:$PATH3
+
+EDITOR=/usr/local/bin/ce VISUAL=/usr/local/bin/ce FCEDIT=/usr/local/bin/ce
+
+SHELL=${SHELL:-${BASH:-/bin/bash}}
+
+PAGER=/usr/local/bin/less
+LESS='-i -e -M -P%t?f%f :stdin .?pb%pb\%:?lbLine %lb:?bbByte %bb:-...'
+#
+# Bogus 1003.2 variables. This should really be in /etc/profile
+#
+LOGNAME=${USER-$(whoami)}
+TZ=US/Eastern
+
+export HOME VISUAL EDITOR MAIL SHELL PATH TERM
+export PAGER LESS TERMCAP HISTSIZE HISTFILE MAIL MAILCHECK LOGNAME TZ
+
+PS1="${HOSTNAME}\$ "
+PS2='> '
+export PS1 PS2
+
+umask 022
+
+if [ -f /unix ] ; then
+ stty intr ^c # bogus
+fi
+
+if [ -f ~/.bashrc ] ; then
+ . ~/.bashrc
+fi
diff --git a/examples/startup-files/bashrc b/examples/startup-files/bashrc
new file mode 100644
index 0000000..069e8be
--- /dev/null
+++ b/examples/startup-files/bashrc
@@ -0,0 +1,132 @@
+if [ -z "$PS1" ]; then
+ return
+fi
+
+# bogus
+if [ -f /unix ] ; then
+ alias ls='/bin/ls -CF'
+else
+ alias ls='/bin/ls -F'
+fi
+alias ll='ls -l'
+alias dir='ls -ba'
+
+alias ss="ps -aux"
+alias dot='ls .[a-zA-Z0-9_]*'
+alias news="xterm -g 80x45 -e trn -e -S1 -N &"
+
+alias c="clear"
+alias m="more"
+alias j="jobs"
+
+# common misspellings
+alias mroe=more
+alias pdw=pwd
+
+hash -p /usr/bin/mail mail
+
+if [ -z "$HOST" ] ; then
+ export HOST=${HOSTNAME}
+fi
+
+HISTIGNORE="[ ]*:&:bg:fg"
+
+psgrep()
+{
+ ps -aux | grep $1 | grep -v grep
+}
+
+#
+# This is a little like `zap' from Kernighan and Pike
+#
+
+pskill()
+{
+ local pid
+
+ pid=$(ps -ax | grep $1 | grep -v grep | awk '{ print $1 }')
+ echo -n "killing $1 (process $pid)..."
+ kill -9 $pid
+ echo "slaughtered."
+}
+
+term()
+{
+ TERM=$1
+ export TERM
+ tset
+}
+
+xtitle ()
+{
+ echo -n -e "\033]0;$*\007"
+}
+
+cd()
+{
+ builtin cd "$@" && xtitle $HOST: $PWD
+}
+
+bold()
+{
+ tput smso
+}
+
+unbold()
+{
+ tput rmso
+}
+
+if [ -f /unix ] ; then
+clear()
+{
+ tput clear
+}
+fi
+
+rot13()
+{
+ if [ $# = 0 ] ; then
+ tr "[a-m][n-z][A-M][N-Z]" "[n-z][a-m][N-Z][A-M]"
+ else
+ tr "[a-m][n-z][A-M][N-Z]" "[n-z][a-m][N-Z][A-M]" < $1
+ fi
+}
+
+watch()
+{
+ if [ $# -ne 1 ] ; then
+ tail -f nohup.out
+ else
+ tail -f $1
+ fi
+}
+
+#
+# Remote login passing all 8 bits (so meta key will work)
+#
+rl()
+{
+ rlogin $* -8
+}
+
+function setenv()
+{
+ if [ $# -ne 2 ] ; then
+ echo "setenv: Too few arguments"
+ else
+ export $1="$2"
+ fi
+}
+
+function chmog()
+{
+ if [ $# -ne 4 ] ; then
+ echo "usage: chmog mode owner group file"
+ return 1
+ else
+ chmod $1 $4
+ chown $2 $4
+ chgrp $3 $4
+ fi
+}
diff --git a/execute_cmd.c b/execute_cmd.c
new file mode 100644
index 0000000..e65a03f
--- /dev/null
+++ b/execute_cmd.c
@@ -0,0 +1,5009 @@
+/* execute_cmd.c -- Execute a COMMAND structure. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#if !defined (__GNUC__) && !defined (HAVE_ALLOCA_H) && defined (_AIX)
+ #pragma alloca
+#endif /* _AIX && RISC6000 && !__GNUC__ */
+
+#include <stdio.h>
+#include "chartypes.h"
+#include "bashtypes.h"
+#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+#include "filecntl.h"
+#include "posixstat.h"
+#include <signal.h>
+#ifndef _MINIX
+# include <sys/param.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "posixtime.h"
+
+#if defined (HAVE_SYS_RESOURCE_H) && !defined (RLIMTYPE)
+# include <sys/resource.h>
+#endif
+
+#if defined (HAVE_SYS_TIMES_H) && defined (HAVE_TIMES)
+# include <sys/times.h>
+#endif
+
+#include <errno.h>
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+#define NEED_FPURGE_DECL
+
+#include "bashansi.h"
+#include "bashintl.h"
+
+#include "memalloc.h"
+#include "shell.h"
+#include <y.tab.h> /* use <...> so we pick it up from the build directory */
+#include "flags.h"
+#include "builtins.h"
+#include "hashlib.h"
+#include "jobs.h"
+#include "execute_cmd.h"
+#include "findcmd.h"
+#include "redir.h"
+#include "trap.h"
+#include "pathexp.h"
+#include "hashcmd.h"
+
+#if defined (COND_COMMAND)
+# include "test.h"
+#endif
+
+#include "builtins/common.h"
+#include "builtins/builtext.h" /* list of builtins */
+
+#include <glob/strmatch.h>
+#include <tilde/tilde.h>
+
+#if defined (BUFFERED_INPUT)
+# include "input.h"
+#endif
+
+#if defined (ALIAS)
+# include "alias.h"
+#endif
+
+#if defined (HISTORY)
+# include "bashhist.h"
+#endif
+
+extern int posixly_correct;
+extern int expand_aliases;
+extern int autocd;
+extern int breaking, continuing, loop_level;
+extern int parse_and_execute_level, running_trap, sourcelevel;
+extern int command_string_index, line_number;
+extern int dot_found_in_search;
+extern int already_making_children;
+extern int tempenv_assign_error;
+extern char *the_printed_command, *shell_name;
+extern pid_t last_command_subst_pid;
+extern sh_builtin_func_t *last_shell_builtin, *this_shell_builtin;
+extern char **subshell_argv, **subshell_envp;
+extern int subshell_argc;
+#if 0
+extern char *glob_argv_flags;
+#endif
+
+extern int close __P((int));
+
+/* Static functions defined and used in this file. */
+static void close_pipes __P((int, int));
+static void do_piping __P((int, int));
+static void bind_lastarg __P((char *));
+static int shell_control_structure __P((enum command_type));
+static void cleanup_redirects __P((REDIRECT *));
+
+#if defined (JOB_CONTROL)
+static int restore_signal_mask __P((sigset_t *));
+#endif
+
+static void async_redirect_stdin __P((void));
+
+static int builtin_status __P((int));
+
+static int execute_for_command __P((FOR_COM *));
+#if defined (SELECT_COMMAND)
+static int print_index_and_element __P((int, int, WORD_LIST *));
+static void indent __P((int, int));
+static void print_select_list __P((WORD_LIST *, int, int, int));
+static char *select_query __P((WORD_LIST *, int, char *, int));
+static int execute_select_command __P((SELECT_COM *));
+#endif
+#if defined (DPAREN_ARITHMETIC)
+static int execute_arith_command __P((ARITH_COM *));
+#endif
+#if defined (COND_COMMAND)
+static int execute_cond_node __P((COND_COM *));
+static int execute_cond_command __P((COND_COM *));
+#endif
+#if defined (COMMAND_TIMING)
+static int mkfmt __P((char *, int, int, time_t, int));
+static void print_formatted_time __P((FILE *, char *,
+ time_t, int, time_t, int,
+ time_t, int, int));
+static int time_command __P((COMMAND *, int, int, int, struct fd_bitmap *));
+#endif
+#if defined (ARITH_FOR_COMMAND)
+static intmax_t eval_arith_for_expr __P((WORD_LIST *, int *));
+static int execute_arith_for_command __P((ARITH_FOR_COM *));
+#endif
+static int execute_case_command __P((CASE_COM *));
+static int execute_while_command __P((WHILE_COM *));
+static int execute_until_command __P((WHILE_COM *));
+static int execute_while_or_until __P((WHILE_COM *, int));
+static int execute_if_command __P((IF_COM *));
+static int execute_null_command __P((REDIRECT *, int, int, int));
+static void fix_assignment_words __P((WORD_LIST *));
+static int execute_simple_command __P((SIMPLE_COM *, int, int, int, struct fd_bitmap *));
+static int execute_builtin __P((sh_builtin_func_t *, WORD_LIST *, int, int));
+static int execute_function __P((SHELL_VAR *, WORD_LIST *, int, struct fd_bitmap *, int, int));
+static int execute_builtin_or_function __P((WORD_LIST *, sh_builtin_func_t *,
+ SHELL_VAR *,
+ REDIRECT *, struct fd_bitmap *, int));
+static void execute_subshell_builtin_or_function __P((WORD_LIST *, REDIRECT *,
+ sh_builtin_func_t *,
+ SHELL_VAR *,
+ int, int, int,
+ struct fd_bitmap *,
+ int));
+static void execute_disk_command __P((WORD_LIST *, REDIRECT *, char *,
+ int, int, int, struct fd_bitmap *, int));
+
+static char *getinterp __P((char *, int, int *));
+static void initialize_subshell __P((void));
+static int execute_in_subshell __P((COMMAND *, int, int, int, struct fd_bitmap *));
+#if defined (COPROCESS_SUPPORT)
+static int execute_coproc __P((COMMAND *, int, int, struct fd_bitmap *));
+#endif
+
+static int execute_pipeline __P((COMMAND *, int, int, int, struct fd_bitmap *));
+
+static int execute_connection __P((COMMAND *, int, int, int, struct fd_bitmap *));
+
+static int execute_intern_function __P((WORD_DESC *, COMMAND *));
+
+/* 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;
+
+/* The name of the command that is currently being executed.
+ `test' needs this, for example. */
+char *this_command_name;
+
+/* The printed representation of the currently-executing command (same as
+ the_printed_command), except when a trap is being executed. Useful for
+ a debugger to know where exactly the program is currently executing. */
+char *the_printed_command_except_trap;
+
+/* For catching RETURN in a function. */
+int return_catch_flag;
+int return_catch_value;
+procenv_t return_catch;
+
+/* The value returned by the last synchronous command. */
+int last_command_exit_value;
+
+/* Whether or not the last command (corresponding to last_command_exit_value)
+ was terminated by a signal, and, if so, which one. */
+int last_command_exit_signal;
+
+/* The list of redirections to perform which will undo the redirections
+ that I made in the shell. */
+REDIRECT *redirection_undo_list = (REDIRECT *)NULL;
+
+/* The list of redirections to perform which will undo the internal
+ redirections performed by the `exec' builtin. These are redirections
+ that must be undone even when exec discards redirection_undo_list. */
+REDIRECT *exec_redirection_undo_list = (REDIRECT *)NULL;
+
+/* When greater than zero, value is the `level' of builtins we are
+ currently executing (e.g. `eval echo a' would have it set to 2). */
+int executing_builtin = 0;
+
+/* Non-zero if we are executing a command list (a;b;c, etc.) */
+int executing_list = 0;
+
+/* Non-zero if failing commands in a command substitution should not exit the
+ shell even if -e is set. Used to pass the CMD_IGNORE_RETURN flag down to
+ commands run in command substitutions by parse_and_execute. */
+int comsub_ignore_return = 0;
+
+/* Non-zero if we have just forked and are currently running in a subshell
+ environment. */
+int subshell_environment;
+
+/* Count of nested subshells, like SHLVL. Available via $BASH_SUBSHELL */
+int subshell_level = 0;
+
+/* Currently-executing shell function. */
+SHELL_VAR *this_shell_function;
+
+/* If non-zero, matches in case and [[ ... ]] are case-insensitive */
+int match_ignore_case = 0;
+
+struct stat SB; /* used for debugging */
+
+static int special_builtin_failed;
+
+static COMMAND *currently_executing_command;
+
+/* The line number that the currently executing function starts on. */
+static int function_line_number;
+
+/* XXX - set to 1 if we're running the DEBUG trap and we want to show the line
+ number containing the function name. Used by executing_line_number to
+ report the correct line number. Kind of a hack. */
+static int showing_function_line;
+
+static int line_number_for_err_trap;
+
+/* A sort of function nesting level counter */
+static int funcnest = 0;
+int funcnest_max = 0; /* XXX - for bash-4.2 */
+
+struct fd_bitmap *current_fds_to_close = (struct fd_bitmap *)NULL;
+
+#define FD_BITMAP_DEFAULT_SIZE 32
+
+/* Functions to allocate and deallocate the structures used to pass
+ information from the shell to its children about file descriptors
+ to close. */
+struct fd_bitmap *
+new_fd_bitmap (size)
+ int size;
+{
+ struct fd_bitmap *ret;
+
+ ret = (struct fd_bitmap *)xmalloc (sizeof (struct fd_bitmap));
+
+ ret->size = size;
+
+ if (size)
+ {
+ ret->bitmap = (char *)xmalloc (size);
+ memset (ret->bitmap, '\0', size);
+ }
+ else
+ ret->bitmap = (char *)NULL;
+ return (ret);
+}
+
+void
+dispose_fd_bitmap (fdbp)
+ struct fd_bitmap *fdbp;
+{
+ FREE (fdbp->bitmap);
+ free (fdbp);
+}
+
+void
+close_fd_bitmap (fdbp)
+ struct fd_bitmap *fdbp;
+{
+ register int i;
+
+ if (fdbp)
+ {
+ for (i = 0; i < fdbp->size; i++)
+ if (fdbp->bitmap[i])
+ {
+ close (i);
+ fdbp->bitmap[i] = 0;
+ }
+ }
+}
+
+/* Return the line number of the currently executing command. */
+int
+executing_line_number ()
+{
+ if (executing && showing_function_line == 0 &&
+ (variable_context == 0 || interactive_shell == 0) &&
+ currently_executing_command)
+ {
+#if defined (COND_COMMAND)
+ if (currently_executing_command->type == cm_cond)
+ return currently_executing_command->value.Cond->line;
+#endif
+#if defined (DPAREN_ARITHMETIC)
+ else if (currently_executing_command->type == cm_arith)
+ return currently_executing_command->value.Arith->line;
+#endif
+#if defined (ARITH_FOR_COMMAND)
+ else if (currently_executing_command->type == cm_arith_for)
+ return currently_executing_command->value.ArithFor->line;
+#endif
+
+ return line_number;
+ }
+ else
+ return line_number;
+}
+
+/* Execute the command passed in COMMAND. COMMAND is exactly what
+ read_command () places into GLOBAL_COMMAND. See "command.h" for the
+ details of the command structure.
+
+ EXECUTION_SUCCESS or EXECUTION_FAILURE are the only possible
+ return values. Executing a command with nothing in it returns
+ EXECUTION_SUCCESS. */
+int
+execute_command (command)
+ COMMAND *command;
+{
+ struct fd_bitmap *bitmap;
+ int result;
+
+ current_fds_to_close = (struct fd_bitmap *)NULL;
+ bitmap = new_fd_bitmap (FD_BITMAP_DEFAULT_SIZE);
+ begin_unwind_frame ("execute-command");
+ add_unwind_protect (dispose_fd_bitmap, (char *)bitmap);
+
+ /* Just do the command, but not asynchronously. */
+ result = execute_command_internal (command, 0, NO_PIPE, NO_PIPE, bitmap);
+
+ dispose_fd_bitmap (bitmap);
+ discard_unwind_frame ("execute-command");
+
+#if defined (PROCESS_SUBSTITUTION)
+ /* don't unlink fifos if we're in a shell function; wait until the function
+ returns. */
+ if (variable_context == 0)
+ unlink_fifo_list ();
+#endif /* PROCESS_SUBSTITUTION */
+
+ QUIT;
+ return (result);
+}
+
+/* Return 1 if TYPE is a shell control structure type. */
+static int
+shell_control_structure (type)
+ enum command_type type;
+{
+ switch (type)
+ {
+#if defined (ARITH_FOR_COMMAND)
+ case cm_arith_for:
+#endif
+#if defined (SELECT_COMMAND)
+ case cm_select:
+#endif
+#if defined (DPAREN_ARITHMETIC)
+ case cm_arith:
+#endif
+#if defined (COND_COMMAND)
+ case cm_cond:
+#endif
+ case cm_case:
+ case cm_while:
+ case cm_until:
+ case cm_if:
+ case cm_for:
+ case cm_group:
+ case cm_function_def:
+ return (1);
+
+ default:
+ return (0);
+ }
+}
+
+/* A function to use to unwind_protect the redirection undo list
+ for loops. */
+static void
+cleanup_redirects (list)
+ REDIRECT *list;
+{
+ do_redirections (list, RX_ACTIVE);
+ dispose_redirects (list);
+}
+
+#if 0
+/* Function to unwind_protect the redirections for functions and builtins. */
+static void
+cleanup_func_redirects (list)
+ REDIRECT *list;
+{
+ do_redirections (list, RX_ACTIVE);
+}
+#endif
+
+void
+dispose_exec_redirects ()
+{
+ if (exec_redirection_undo_list)
+ {
+ dispose_redirects (exec_redirection_undo_list);
+ exec_redirection_undo_list = (REDIRECT *)NULL;
+ }
+}
+
+#if defined (JOB_CONTROL)
+/* A function to restore the signal mask to its proper value when the shell
+ is interrupted or errors occur while creating a pipeline. */
+static int
+restore_signal_mask (set)
+ sigset_t *set;
+{
+ return (sigprocmask (SIG_SETMASK, set, (sigset_t *)NULL));
+}
+#endif /* JOB_CONTROL */
+
+#ifdef DEBUG
+/* A debugging function that can be called from gdb, for instance. */
+void
+open_files ()
+{
+ register int i;
+ int f, fd_table_size;
+
+ fd_table_size = getdtablesize ();
+
+ fprintf (stderr, "pid %ld open files:", (long)getpid ());
+ for (i = 3; i < fd_table_size; i++)
+ {
+ if ((f = fcntl (i, F_GETFD, 0)) != -1)
+ fprintf (stderr, " %d (%s)", i, f ? "close" : "open");
+ }
+ fprintf (stderr, "\n");
+}
+#endif
+
+static void
+async_redirect_stdin ()
+{
+ int fd;
+
+ fd = open ("/dev/null", O_RDONLY);
+ if (fd > 0)
+ {
+ dup2 (fd, 0);
+ close (fd);
+ }
+ else if (fd < 0)
+ internal_error (_("cannot redirect standard input from /dev/null: %s"), strerror (errno));
+}
+
+#define DESCRIBE_PID(pid) do { if (interactive) describe_pid (pid); } while (0)
+
+/* Execute the command passed in COMMAND, perhaps doing it asynchrounously.
+ COMMAND is exactly what read_command () places into GLOBAL_COMMAND.
+ ASYNCHROUNOUS, if non-zero, says to do this command in the background.
+ PIPE_IN and PIPE_OUT are file descriptors saying where input comes
+ from and where it goes. They can have the value of NO_PIPE, which means
+ I/O is stdin/stdout.
+ FDS_TO_CLOSE is a list of file descriptors to close once the child has
+ been forked. This list often contains the unusable sides of pipes, etc.
+
+ EXECUTION_SUCCESS or EXECUTION_FAILURE are the only possible
+ return values. Executing a command with nothing in it returns
+ EXECUTION_SUCCESS. */
+int
+execute_command_internal (command, asynchronous, pipe_in, pipe_out,
+ fds_to_close)
+ COMMAND *command;
+ int asynchronous;
+ int pipe_in, pipe_out;
+ struct fd_bitmap *fds_to_close;
+{
+ int exec_result, user_subshell, invert, ignore_return, was_error_trap;
+ REDIRECT *my_undo_list, *exec_undo_list;
+ volatile int last_pid;
+ volatile int save_line_number;
+
+#if 0
+ if (command == 0 || breaking || continuing || read_but_dont_execute)
+ return (EXECUTION_SUCCESS);
+#else
+ if (breaking || continuing)
+ return (last_command_exit_value);
+ if (command == 0 || read_but_dont_execute)
+ return (EXECUTION_SUCCESS);
+#endif
+
+ QUIT;
+ run_pending_traps ();
+
+#if 0
+ if (running_trap == 0)
+#endif
+ currently_executing_command = command;
+
+ invert = (command->flags & CMD_INVERT_RETURN) != 0;
+
+ /* If we're inverting the return value and `set -e' has been executed,
+ we don't want a failing command to inadvertently cause the shell
+ to exit. */
+ if (exit_immediately_on_error && invert) /* XXX */
+ command->flags |= CMD_IGNORE_RETURN; /* XXX */
+
+ exec_result = EXECUTION_SUCCESS;
+
+ /* If a command was being explicitly run in a subshell, or if it is
+ a shell control-structure, and it has a pipe, then we do the command
+ in a subshell. */
+ if (command->type == cm_subshell && (command->flags & CMD_NO_FORK))
+ return (execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close));
+
+#if defined (COPROCESS_SUPPORT)
+ if (command->type == cm_coproc)
+ return (execute_coproc (command, pipe_in, pipe_out, fds_to_close));
+#endif
+
+ user_subshell = command->type == cm_subshell || ((command->flags & CMD_WANT_SUBSHELL) != 0);
+
+ if (command->type == cm_subshell ||
+ (command->flags & (CMD_WANT_SUBSHELL|CMD_FORCE_SUBSHELL)) ||
+ (shell_control_structure (command->type) &&
+ (pipe_out != NO_PIPE || pipe_in != NO_PIPE || asynchronous)))
+ {
+ pid_t paren_pid;
+
+ /* Fork a subshell, turn off the subshell bit, turn off job
+ control and call execute_command () on the command again. */
+ line_number_for_err_trap = line_number;
+ paren_pid = make_child (savestring (make_command_string (command)),
+ asynchronous);
+ if (paren_pid == 0)
+ exit (execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close));
+ /* NOTREACHED */
+ else
+ {
+ close_pipes (pipe_in, pipe_out);
+
+#if defined (PROCESS_SUBSTITUTION) && defined (HAVE_DEV_FD)
+ unlink_fifo_list ();
+#endif
+ /* If we are part of a pipeline, and not the end of the pipeline,
+ then we should simply return and let the last command in the
+ pipe be waited for. If we are not in a pipeline, or are the
+ last command in the pipeline, then we wait for the subshell
+ and return its exit status as usual. */
+ if (pipe_out != NO_PIPE)
+ return (EXECUTION_SUCCESS);
+
+ stop_pipeline (asynchronous, (COMMAND *)NULL);
+
+ if (asynchronous == 0)
+ {
+ was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0;
+ invert = (command->flags & CMD_INVERT_RETURN) != 0;
+ ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0;
+
+ last_command_exit_value = wait_for (paren_pid);
+
+ /* If we have to, invert the return value. */
+ if (invert)
+ exec_result = ((last_command_exit_value == EXECUTION_SUCCESS)
+ ? EXECUTION_FAILURE
+ : EXECUTION_SUCCESS);
+ else
+ exec_result = last_command_exit_value;
+
+ if (user_subshell && was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS)
+ {
+ last_command_exit_value = exec_result;
+ save_line_number = line_number;
+ line_number = line_number_for_err_trap;
+ run_error_trap ();
+ line_number = save_line_number;
+ }
+
+ if (user_subshell && ignore_return == 0 && invert == 0 && exit_immediately_on_error && exec_result != EXECUTION_SUCCESS)
+ {
+ last_command_exit_value = exec_result;
+ run_pending_traps ();
+ jump_to_top_level (ERREXIT);
+ }
+
+ return (last_command_exit_value = exec_result);
+ }
+ else
+ {
+ DESCRIBE_PID (paren_pid);
+
+ run_pending_traps ();
+
+ return (EXECUTION_SUCCESS);
+ }
+ }
+ }
+
+#if defined (COMMAND_TIMING)
+ if (command->flags & CMD_TIME_PIPELINE)
+ {
+ if (asynchronous)
+ {
+ command->flags |= CMD_FORCE_SUBSHELL;
+ exec_result = execute_command_internal (command, 1, pipe_in, pipe_out, fds_to_close);
+ }
+ else
+ {
+ exec_result = time_command (command, asynchronous, pipe_in, pipe_out, fds_to_close);
+#if 0
+ if (running_trap == 0)
+#endif
+ currently_executing_command = (COMMAND *)NULL;
+ }
+ return (exec_result);
+ }
+#endif /* COMMAND_TIMING */
+
+ if (shell_control_structure (command->type) && command->redirects)
+ stdin_redir = stdin_redirects (command->redirects);
+
+ /* Handle WHILE FOR CASE etc. with redirections. (Also '&' input
+ redirection.) */
+ if (do_redirections (command->redirects, RX_ACTIVE|RX_UNDOABLE) != 0)
+ {
+ cleanup_redirects (redirection_undo_list);
+ redirection_undo_list = (REDIRECT *)NULL;
+ dispose_exec_redirects ();
+ return (last_command_exit_value = EXECUTION_FAILURE);
+ }
+
+ if (redirection_undo_list)
+ {
+ my_undo_list = (REDIRECT *)copy_redirects (redirection_undo_list);
+ dispose_redirects (redirection_undo_list);
+ redirection_undo_list = (REDIRECT *)NULL;
+ }
+ else
+ my_undo_list = (REDIRECT *)NULL;
+
+ if (exec_redirection_undo_list)
+ {
+ exec_undo_list = (REDIRECT *)copy_redirects (exec_redirection_undo_list);
+ dispose_redirects (exec_redirection_undo_list);
+ exec_redirection_undo_list = (REDIRECT *)NULL;
+ }
+ else
+ exec_undo_list = (REDIRECT *)NULL;
+
+ if (my_undo_list || exec_undo_list)
+ begin_unwind_frame ("loop_redirections");
+
+ if (my_undo_list)
+ add_unwind_protect ((Function *)cleanup_redirects, my_undo_list);
+
+ if (exec_undo_list)
+ add_unwind_protect ((Function *)dispose_redirects, exec_undo_list);
+
+ ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0;
+
+ QUIT;
+
+ switch (command->type)
+ {
+ case cm_simple:
+ {
+ save_line_number = line_number;
+ /* We can't rely on variables retaining their values across a
+ call to execute_simple_command if a longjmp occurs as the
+ result of a `return' builtin. This is true for sure with gcc. */
+#if defined (RECYCLES_PIDS)
+ last_made_pid = NO_PID;
+#endif
+ last_pid = last_made_pid;
+ was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0;
+
+ if (ignore_return && command->value.Simple)
+ command->value.Simple->flags |= CMD_IGNORE_RETURN;
+ if (command->flags & CMD_STDIN_REDIR)
+ command->value.Simple->flags |= CMD_STDIN_REDIR;
+
+ line_number_for_err_trap = line_number = command->value.Simple->line;
+ exec_result =
+ execute_simple_command (command->value.Simple, pipe_in, pipe_out,
+ asynchronous, fds_to_close);
+ line_number = save_line_number;
+
+ /* The temporary environment should be used for only the simple
+ command immediately following its definition. */
+ dispose_used_env_vars ();
+
+#if (defined (ultrix) && defined (mips)) || defined (C_ALLOCA)
+ /* Reclaim memory allocated with alloca () on machines which
+ may be using the alloca emulation code. */
+ (void) alloca (0);
+#endif /* (ultrix && mips) || C_ALLOCA */
+
+ /* If we forked to do the command, then we must wait_for ()
+ the child. */
+
+ /* XXX - this is something to watch out for if there are problems
+ when the shell is compiled without job control. */
+ if (already_making_children && pipe_out == NO_PIPE &&
+ last_made_pid != last_pid)
+ {
+ stop_pipeline (asynchronous, (COMMAND *)NULL);
+
+ if (asynchronous)
+ {
+ DESCRIBE_PID (last_made_pid);
+ }
+ else
+#if !defined (JOB_CONTROL)
+ /* Do not wait for asynchronous processes started from
+ startup files. */
+ if (last_made_pid != last_asynchronous_pid)
+#endif
+ /* When executing a shell function that executes other
+ commands, this causes the last simple command in
+ the function to be waited for twice. This also causes
+ subshells forked to execute builtin commands (e.g., in
+ pipelines) to be waited for twice. */
+ exec_result = wait_for (last_made_pid);
+ }
+ }
+
+ /* 2009/02/13 -- pipeline failure is processed elsewhere. This handles
+ only the failure of a simple command. */
+ if (was_error_trap && ignore_return == 0 && invert == 0 && pipe_in == NO_PIPE && pipe_out == NO_PIPE && exec_result != EXECUTION_SUCCESS)
+ {
+ last_command_exit_value = exec_result;
+ line_number = line_number_for_err_trap;
+ run_error_trap ();
+ line_number = save_line_number;
+ }
+
+ if (ignore_return == 0 && invert == 0 &&
+ ((posixly_correct && interactive == 0 && special_builtin_failed) ||
+ (exit_immediately_on_error && pipe_in == NO_PIPE && pipe_out == NO_PIPE && exec_result != EXECUTION_SUCCESS)))
+ {
+ last_command_exit_value = exec_result;
+ run_pending_traps ();
+ jump_to_top_level (ERREXIT);
+ }
+
+ break;
+
+ case cm_for:
+ if (ignore_return)
+ command->value.For->flags |= CMD_IGNORE_RETURN;
+ exec_result = execute_for_command (command->value.For);
+ break;
+
+#if defined (ARITH_FOR_COMMAND)
+ case cm_arith_for:
+ if (ignore_return)
+ command->value.ArithFor->flags |= CMD_IGNORE_RETURN;
+ exec_result = execute_arith_for_command (command->value.ArithFor);
+ break;
+#endif
+
+#if defined (SELECT_COMMAND)
+ case cm_select:
+ if (ignore_return)
+ command->value.Select->flags |= CMD_IGNORE_RETURN;
+ exec_result = execute_select_command (command->value.Select);
+ break;
+#endif
+
+ case cm_case:
+ if (ignore_return)
+ command->value.Case->flags |= CMD_IGNORE_RETURN;
+ exec_result = execute_case_command (command->value.Case);
+ break;
+
+ case cm_while:
+ if (ignore_return)
+ command->value.While->flags |= CMD_IGNORE_RETURN;
+ exec_result = execute_while_command (command->value.While);
+ break;
+
+ case cm_until:
+ if (ignore_return)
+ command->value.While->flags |= CMD_IGNORE_RETURN;
+ exec_result = execute_until_command (command->value.While);
+ break;
+
+ case cm_if:
+ if (ignore_return)
+ command->value.If->flags |= CMD_IGNORE_RETURN;
+ exec_result = execute_if_command (command->value.If);
+ break;
+
+ case cm_group:
+
+ /* This code can be executed from either of two paths: an explicit
+ '{}' command, or via a function call. If we are executed via a
+ function call, we have already taken care of the function being
+ executed in the background (down there in execute_simple_command ()),
+ and this command should *not* be marked as asynchronous. If we
+ are executing a regular '{}' group command, and asynchronous == 1,
+ we must want to execute the whole command in the background, so we
+ need a subshell, and we want the stuff executed in that subshell
+ (this group command) to be executed in the foreground of that
+ subshell (i.e. there will not be *another* subshell forked).
+
+ What we do is to force a subshell if asynchronous, and then call
+ execute_command_internal again with asynchronous still set to 1,
+ but with the original group command, so the printed command will
+ look right.
+
+ The code above that handles forking off subshells will note that
+ both subshell and async are on, and turn off async in the child
+ after forking the subshell (but leave async set in the parent, so
+ the normal call to describe_pid is made). This turning off
+ async is *crucial*; if it is not done, this will fall into an
+ infinite loop of executions through this spot in subshell after
+ subshell until the process limit is exhausted. */
+
+ if (asynchronous)
+ {
+ command->flags |= CMD_FORCE_SUBSHELL;
+ exec_result =
+ execute_command_internal (command, 1, pipe_in, pipe_out,
+ fds_to_close);
+ }
+ else
+ {
+ if (ignore_return && command->value.Group->command)
+ command->value.Group->command->flags |= CMD_IGNORE_RETURN;
+ exec_result =
+ execute_command_internal (command->value.Group->command,
+ asynchronous, pipe_in, pipe_out,
+ fds_to_close);
+ }
+ break;
+
+ case cm_connection:
+ exec_result = execute_connection (command, asynchronous,
+ pipe_in, pipe_out, fds_to_close);
+ break;
+
+#if defined (DPAREN_ARITHMETIC)
+ case cm_arith:
+ was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0;
+ if (ignore_return)
+ command->value.Arith->flags |= CMD_IGNORE_RETURN;
+ line_number_for_err_trap = save_line_number = line_number;
+ exec_result = execute_arith_command (command->value.Arith);
+ line_number = save_line_number;
+
+ if (was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS)
+ {
+ last_command_exit_value = exec_result;
+ save_line_number = line_number;
+ line_number = line_number_for_err_trap;
+ run_error_trap ();
+ line_number = save_line_number;
+ }
+
+ if (ignore_return == 0 && invert == 0 && exit_immediately_on_error && exec_result != EXECUTION_SUCCESS)
+ {
+ last_command_exit_value = exec_result;
+ run_pending_traps ();
+ jump_to_top_level (ERREXIT);
+ }
+
+ break;
+#endif
+
+#if defined (COND_COMMAND)
+ case cm_cond:
+ was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0;
+ if (ignore_return)
+ command->value.Cond->flags |= CMD_IGNORE_RETURN;
+
+ line_number_for_err_trap = save_line_number = line_number;
+ exec_result = execute_cond_command (command->value.Cond);
+ line_number = save_line_number;
+
+ if (was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS)
+ {
+ last_command_exit_value = exec_result;
+ save_line_number = line_number;
+ line_number = line_number_for_err_trap;
+ run_error_trap ();
+ line_number = save_line_number;
+ }
+
+ if (ignore_return == 0 && invert == 0 && exit_immediately_on_error && exec_result != EXECUTION_SUCCESS)
+ {
+ last_command_exit_value = exec_result;
+ run_pending_traps ();
+ jump_to_top_level (ERREXIT);
+ }
+
+ break;
+#endif
+
+ case cm_function_def:
+ exec_result = execute_intern_function (command->value.Function_def->name,
+ command->value.Function_def->command);
+ break;
+
+ default:
+ command_error ("execute_command", CMDERR_BADTYPE, command->type, 0);
+ }
+
+ if (my_undo_list)
+ {
+ do_redirections (my_undo_list, RX_ACTIVE);
+ dispose_redirects (my_undo_list);
+ }
+
+ if (exec_undo_list)
+ dispose_redirects (exec_undo_list);
+
+ if (my_undo_list || exec_undo_list)
+ discard_unwind_frame ("loop_redirections");
+
+ /* Invert the return value if we have to */
+ if (invert)
+ exec_result = (exec_result == EXECUTION_SUCCESS)
+ ? EXECUTION_FAILURE
+ : EXECUTION_SUCCESS;
+
+#if defined (DPAREN_ARITHMETIC) || defined (COND_COMMAND)
+ /* This is where we set PIPESTATUS from the exit status of the appropriate
+ compound commands (the ones that look enough like simple commands to
+ cause confusion). We might be able to optimize by not doing this if
+ subshell_environment != 0. */
+ switch (command->type)
+ {
+# if defined (DPAREN_ARITHMETIC)
+ case cm_arith:
+# endif
+# if defined (COND_COMMAND)
+ case cm_cond:
+# endif
+ set_pipestatus_from_exit (exec_result);
+ break;
+ }
+#endif
+
+ last_command_exit_value = exec_result;
+ run_pending_traps ();
+#if 0
+ if (running_trap == 0)
+#endif
+ currently_executing_command = (COMMAND *)NULL;
+ return (last_command_exit_value);
+}
+
+#if defined (COMMAND_TIMING)
+
+#if defined (HAVE_GETRUSAGE) && defined (HAVE_GETTIMEOFDAY)
+extern struct timeval *difftimeval __P((struct timeval *, struct timeval *, struct timeval *));
+extern struct timeval *addtimeval __P((struct timeval *, struct timeval *, struct timeval *));
+extern int timeval_to_cpu __P((struct timeval *, struct timeval *, struct timeval *));
+#endif
+
+#define POSIX_TIMEFORMAT "real %2R\nuser %2U\nsys %2S"
+#define BASH_TIMEFORMAT "\nreal\t%3lR\nuser\t%3lU\nsys\t%3lS"
+
+static const int precs[] = { 0, 100, 10, 1 };
+
+/* Expand one `%'-prefixed escape sequence from a time format string. */
+static int
+mkfmt (buf, prec, lng, sec, sec_fraction)
+ char *buf;
+ int prec, lng;
+ time_t sec;
+ int sec_fraction;
+{
+ time_t min;
+ char abuf[INT_STRLEN_BOUND(time_t) + 1];
+ int ind, aind;
+
+ ind = 0;
+ abuf[sizeof(abuf) - 1] = '\0';
+
+ /* If LNG is non-zero, we want to decompose SEC into minutes and seconds. */
+ if (lng)
+ {
+ min = sec / 60;
+ sec %= 60;
+ aind = sizeof(abuf) - 2;
+ do
+ abuf[aind--] = (min % 10) + '0';
+ while (min /= 10);
+ aind++;
+ while (abuf[aind])
+ buf[ind++] = abuf[aind++];
+ buf[ind++] = 'm';
+ }
+
+ /* Now add the seconds. */
+ aind = sizeof (abuf) - 2;
+ do
+ abuf[aind--] = (sec % 10) + '0';
+ while (sec /= 10);
+ aind++;
+ while (abuf[aind])
+ buf[ind++] = abuf[aind++];
+
+ /* We want to add a decimal point and PREC places after it if PREC is
+ nonzero. PREC is not greater than 3. SEC_FRACTION is between 0
+ and 999. */
+ if (prec != 0)
+ {
+ buf[ind++] = '.';
+ for (aind = 1; aind <= prec; aind++)
+ {
+ buf[ind++] = (sec_fraction / precs[aind]) + '0';
+ sec_fraction %= precs[aind];
+ }
+ }
+
+ if (lng)
+ buf[ind++] = 's';
+ buf[ind] = '\0';
+
+ return (ind);
+}
+
+/* Interpret the format string FORMAT, interpolating the following escape
+ sequences:
+ %[prec][l][RUS]
+
+ where the optional `prec' is a precision, meaning the number of
+ characters after the decimal point, the optional `l' means to format
+ using minutes and seconds (MMmNN[.FF]s), like the `times' builtin',
+ and the last character is one of
+
+ R number of seconds of `real' time
+ U number of seconds of `user' time
+ S number of seconds of `system' time
+
+ An occurrence of `%%' in the format string is translated to a `%'. The
+ result is printed to FP, a pointer to a FILE. The other variables are
+ the seconds and thousandths of a second of real, user, and system time,
+ resectively. */
+static void
+print_formatted_time (fp, format, rs, rsf, us, usf, ss, ssf, cpu)
+ FILE *fp;
+ char *format;
+ time_t rs;
+ int rsf;
+ time_t us;
+ int usf;
+ time_t ss;
+ int ssf, cpu;
+{
+ int prec, lng, len;
+ char *str, *s, ts[INT_STRLEN_BOUND (time_t) + sizeof ("mSS.FFFF")];
+ time_t sum;
+ int sum_frac;
+ int sindex, ssize;
+
+ len = strlen (format);
+ ssize = (len + 64) - (len % 64);
+ str = (char *)xmalloc (ssize);
+ sindex = 0;
+
+ for (s = format; *s; s++)
+ {
+ if (*s != '%' || s[1] == '\0')
+ {
+ RESIZE_MALLOCED_BUFFER (str, sindex, 1, ssize, 64);
+ str[sindex++] = *s;
+ }
+ else if (s[1] == '%')
+ {
+ s++;
+ RESIZE_MALLOCED_BUFFER (str, sindex, 1, ssize, 64);
+ str[sindex++] = *s;
+ }
+ else if (s[1] == 'P')
+ {
+ s++;
+#if 0
+ /* clamp CPU usage at 100% */
+ if (cpu > 10000)
+ cpu = 10000;
+#endif
+ sum = cpu / 100;
+ sum_frac = (cpu % 100) * 10;
+ len = mkfmt (ts, 2, 0, sum, sum_frac);
+ RESIZE_MALLOCED_BUFFER (str, sindex, len, ssize, 64);
+ strcpy (str + sindex, ts);
+ sindex += len;
+ }
+ else
+ {
+ prec = 3; /* default is three places past the decimal point. */
+ lng = 0; /* default is to not use minutes or append `s' */
+ s++;
+ if (DIGIT (*s)) /* `precision' */
+ {
+ prec = *s++ - '0';
+ if (prec > 3) prec = 3;
+ }
+ if (*s == 'l') /* `length extender' */
+ {
+ lng = 1;
+ s++;
+ }
+ if (*s == 'R' || *s == 'E')
+ len = mkfmt (ts, prec, lng, rs, rsf);
+ else if (*s == 'U')
+ len = mkfmt (ts, prec, lng, us, usf);
+ else if (*s == 'S')
+ len = mkfmt (ts, prec, lng, ss, ssf);
+ else
+ {
+ internal_error (_("TIMEFORMAT: `%c': invalid format character"), *s);
+ free (str);
+ return;
+ }
+ RESIZE_MALLOCED_BUFFER (str, sindex, len, ssize, 64);
+ strcpy (str + sindex, ts);
+ sindex += len;
+ }
+ }
+
+ str[sindex] = '\0';
+ fprintf (fp, "%s\n", str);
+ fflush (fp);
+
+ free (str);
+}
+
+static int
+time_command (command, asynchronous, pipe_in, pipe_out, fds_to_close)
+ COMMAND *command;
+ int asynchronous, pipe_in, pipe_out;
+ struct fd_bitmap *fds_to_close;
+{
+ int rv, posix_time, old_flags;
+ time_t rs, us, ss;
+ int rsf, usf, ssf;
+ int cpu;
+ char *time_format;
+
+#if defined (HAVE_GETRUSAGE) && defined (HAVE_GETTIMEOFDAY)
+ struct timeval real, user, sys;
+ struct timeval before, after;
+# if defined (HAVE_STRUCT_TIMEZONE)
+ struct timezone dtz; /* posix doesn't define this */
+# endif
+ struct rusage selfb, selfa, kidsb, kidsa; /* a = after, b = before */
+#else
+# if defined (HAVE_TIMES)
+ clock_t tbefore, tafter, real, user, sys;
+ struct tms before, after;
+# endif
+#endif
+
+#if defined (HAVE_GETRUSAGE) && defined (HAVE_GETTIMEOFDAY)
+# if defined (HAVE_STRUCT_TIMEZONE)
+ gettimeofday (&before, &dtz);
+# else
+ gettimeofday (&before, (void *)NULL);
+# endif /* !HAVE_STRUCT_TIMEZONE */
+ getrusage (RUSAGE_SELF, &selfb);
+ getrusage (RUSAGE_CHILDREN, &kidsb);
+#else
+# if defined (HAVE_TIMES)
+ tbefore = times (&before);
+# endif
+#endif
+
+ posix_time = (command->flags & CMD_TIME_POSIX);
+
+ old_flags = command->flags;
+ command->flags &= ~(CMD_TIME_PIPELINE|CMD_TIME_POSIX);
+ rv = execute_command_internal (command, asynchronous, pipe_in, pipe_out, fds_to_close);
+ command->flags = old_flags;
+
+ rs = us = ss = 0;
+ rsf = usf = ssf = cpu = 0;
+
+#if defined (HAVE_GETRUSAGE) && defined (HAVE_GETTIMEOFDAY)
+# if defined (HAVE_STRUCT_TIMEZONE)
+ gettimeofday (&after, &dtz);
+# else
+ gettimeofday (&after, (void *)NULL);
+# endif /* !HAVE_STRUCT_TIMEZONE */
+ getrusage (RUSAGE_SELF, &selfa);
+ getrusage (RUSAGE_CHILDREN, &kidsa);
+
+ difftimeval (&real, &before, &after);
+ timeval_to_secs (&real, &rs, &rsf);
+
+ addtimeval (&user, difftimeval(&after, &selfb.ru_utime, &selfa.ru_utime),
+ difftimeval(&before, &kidsb.ru_utime, &kidsa.ru_utime));
+ timeval_to_secs (&user, &us, &usf);
+
+ addtimeval (&sys, difftimeval(&after, &selfb.ru_stime, &selfa.ru_stime),
+ difftimeval(&before, &kidsb.ru_stime, &kidsa.ru_stime));
+ timeval_to_secs (&sys, &ss, &ssf);
+
+ cpu = timeval_to_cpu (&real, &user, &sys);
+#else
+# if defined (HAVE_TIMES)
+ tafter = times (&after);
+
+ real = tafter - tbefore;
+ clock_t_to_secs (real, &rs, &rsf);
+
+ user = (after.tms_utime - before.tms_utime) + (after.tms_cutime - before.tms_cutime);
+ clock_t_to_secs (user, &us, &usf);
+
+ sys = (after.tms_stime - before.tms_stime) + (after.tms_cstime - before.tms_cstime);
+ clock_t_to_secs (sys, &ss, &ssf);
+
+ cpu = (real == 0) ? 0 : ((user + sys) * 10000) / real;
+
+# else
+ rs = us = ss = 0;
+ rsf = usf = ssf = cpu = 0;
+# endif
+#endif
+
+ if (posix_time)
+ time_format = POSIX_TIMEFORMAT;
+ else if ((time_format = get_string_value ("TIMEFORMAT")) == 0)
+ time_format = BASH_TIMEFORMAT;
+
+ if (time_format && *time_format)
+ print_formatted_time (stderr, time_format, rs, rsf, us, usf, ss, ssf, cpu);
+
+ return rv;
+}
+#endif /* COMMAND_TIMING */
+
+/* Execute a command that's supposed to be in a subshell. This must be
+ called after make_child and we must be running in the child process.
+ The caller will return or exit() immediately with the value this returns. */
+static int
+execute_in_subshell (command, asynchronous, pipe_in, pipe_out, fds_to_close)
+ COMMAND *command;
+ int asynchronous;
+ int pipe_in, pipe_out;
+ struct fd_bitmap *fds_to_close;
+{
+ int user_subshell, return_code, function_value, should_redir_stdin, invert;
+ int ois, user_coproc;
+ int result;
+ COMMAND *tcom;
+
+ USE_VAR(user_subshell);
+ USE_VAR(user_coproc);
+ USE_VAR(invert);
+ USE_VAR(tcom);
+ USE_VAR(asynchronous);
+
+ subshell_level++;
+ should_redir_stdin = (asynchronous && (command->flags & CMD_STDIN_REDIR) &&
+ pipe_in == NO_PIPE &&
+ stdin_redirects (command->redirects) == 0);
+
+ invert = (command->flags & CMD_INVERT_RETURN) != 0;
+ user_subshell = command->type == cm_subshell || ((command->flags & CMD_WANT_SUBSHELL) != 0);
+ user_coproc = command->type == cm_coproc;
+
+ command->flags &= ~(CMD_FORCE_SUBSHELL | CMD_WANT_SUBSHELL | CMD_INVERT_RETURN);
+
+ /* If a command is asynchronous in a subshell (like ( foo ) & or
+ the special case of an asynchronous GROUP command where the
+ the subshell bit is turned on down in case cm_group: below),
+ turn off `asynchronous', so that two subshells aren't spawned.
+ XXX - asynchronous used to be set to 0 in this block, but that
+ means that setup_async_signals was never run. Now it's set to
+ 0 after subshell_environment is set appropriately and setup_async_signals
+ is run.
+
+ This seems semantically correct to me. For example,
+ ( foo ) & seems to say ``do the command `foo' in a subshell
+ environment, but don't wait for that subshell to finish'',
+ and "{ foo ; bar ; } &" seems to me to be like functions or
+ builtins in the background, which executed in a subshell
+ environment. I just don't see the need to fork two subshells. */
+
+ /* Don't fork again, we are already in a subshell. A `doubly
+ async' shell is not interactive, however. */
+ if (asynchronous)
+ {
+#if defined (JOB_CONTROL)
+ /* If a construct like ( exec xxx yyy ) & is given while job
+ control is active, we want to prevent exec from putting the
+ subshell back into the original process group, carefully
+ undoing all the work we just did in make_child. */
+ original_pgrp = -1;
+#endif /* JOB_CONTROL */
+ ois = interactive_shell;
+ interactive_shell = 0;
+ /* This test is to prevent alias expansion by interactive shells that
+ run `(command) &' but to allow scripts that have enabled alias
+ expansion with `shopt -s expand_alias' to continue to expand
+ aliases. */
+ if (ois != interactive_shell)
+ expand_aliases = 0;
+ }
+
+ /* Subshells are neither login nor interactive. */
+ login_shell = interactive = 0;
+
+ if (user_subshell)
+ subshell_environment = SUBSHELL_PAREN;
+ else
+ {
+ subshell_environment = 0; /* XXX */
+ if (asynchronous)
+ subshell_environment |= SUBSHELL_ASYNC;
+ if (pipe_in != NO_PIPE || pipe_out != NO_PIPE)
+ subshell_environment |= SUBSHELL_PIPE;
+ if (user_coproc)
+ subshell_environment |= SUBSHELL_COPROC;
+ }
+
+ reset_terminating_signals (); /* in sig.c */
+ /* Cancel traps, in trap.c. */
+ restore_original_signals ();
+
+ /* Make sure restore_original_signals doesn't undo the work done by
+ make_child to ensure that asynchronous children are immune to SIGINT
+ and SIGQUIT. Turn off asynchronous to make sure more subshells are
+ not spawned. */
+ if (asynchronous)
+ {
+ setup_async_signals ();
+ asynchronous = 0;
+ }
+
+#if defined (JOB_CONTROL)
+ set_sigchld_handler ();
+#endif /* JOB_CONTROL */
+
+ set_sigint_handler ();
+
+#if defined (JOB_CONTROL)
+ /* Delete all traces that there were any jobs running. This is
+ only for subshells. */
+ without_job_control ();
+#endif /* JOB_CONTROL */
+
+ if (fds_to_close)
+ close_fd_bitmap (fds_to_close);
+
+ do_piping (pipe_in, pipe_out);
+
+#if defined (COPROCESS_SUPPORT)
+ coproc_closeall ();
+#endif
+
+ /* If this is a user subshell, set a flag if stdin was redirected.
+ This is used later to decide whether to redirect fd 0 to
+ /dev/null for async commands in the subshell. This adds more
+ sh compatibility, but I'm not sure it's the right thing to do. */
+ if (user_subshell)
+ {
+ stdin_redir = stdin_redirects (command->redirects);
+ restore_default_signal (0);
+ }
+
+ /* If this is an asynchronous command (command &), we want to
+ redirect the standard input from /dev/null in the absence of
+ any specific redirection involving stdin. */
+ if (should_redir_stdin && stdin_redir == 0)
+ async_redirect_stdin ();
+
+ /* Do redirections, then dispose of them before recursive call. */
+ if (command->redirects)
+ {
+ if (do_redirections (command->redirects, RX_ACTIVE) != 0)
+ exit (invert ? EXECUTION_SUCCESS : EXECUTION_FAILURE);
+
+ dispose_redirects (command->redirects);
+ command->redirects = (REDIRECT *)NULL;
+ }
+
+ if (command->type == cm_subshell)
+ tcom = command->value.Subshell->command;
+ else if (user_coproc)
+ tcom = command->value.Coproc->command;
+ else
+ tcom = command;
+
+ if (command->flags & CMD_TIME_PIPELINE)
+ tcom->flags |= CMD_TIME_PIPELINE;
+ if (command->flags & CMD_TIME_POSIX)
+ tcom->flags |= CMD_TIME_POSIX;
+
+ /* Make sure the subshell inherits any CMD_IGNORE_RETURN flag. */
+ if ((command->flags & CMD_IGNORE_RETURN) && tcom != command)
+ tcom->flags |= CMD_IGNORE_RETURN;
+
+ /* If this is a simple command, tell execute_disk_command that it
+ might be able to get away without forking and simply exec.
+ This means things like ( sleep 10 ) will only cause one fork.
+ If we're timing the command or inverting its return value, however,
+ we cannot do this optimization. */
+ if ((user_subshell || user_coproc) && (tcom->type == cm_simple || tcom->type == cm_subshell) &&
+ ((tcom->flags & CMD_TIME_PIPELINE) == 0) &&
+ ((tcom->flags & CMD_INVERT_RETURN) == 0))
+ {
+ tcom->flags |= CMD_NO_FORK;
+ if (tcom->type == cm_simple)
+ tcom->value.Simple->flags |= CMD_NO_FORK;
+ }
+
+ invert = (tcom->flags & CMD_INVERT_RETURN) != 0;
+ tcom->flags &= ~CMD_INVERT_RETURN;
+
+ result = setjmp (top_level);
+
+ /* If we're inside a function while executing this subshell, we
+ need to handle a possible `return'. */
+ function_value = 0;
+ if (return_catch_flag)
+ function_value = setjmp (return_catch);
+
+ /* If we're going to exit the shell, we don't want to invert the return
+ status. */
+ if (result == EXITPROG)
+ invert = 0, return_code = last_command_exit_value;
+ else if (result)
+ return_code = EXECUTION_FAILURE;
+ else if (function_value)
+ return_code = return_catch_value;
+ else
+ return_code = execute_command_internal (tcom, asynchronous, NO_PIPE, NO_PIPE, fds_to_close);
+
+ /* If we are asked to, invert the return value. */
+ if (invert)
+ return_code = (return_code == EXECUTION_SUCCESS) ? EXECUTION_FAILURE
+ : EXECUTION_SUCCESS;
+
+ /* If we were explicitly placed in a subshell with (), we need
+ to do the `shell cleanup' things, such as running traps[0]. */
+ if (user_subshell && signal_is_trapped (0))
+ {
+ last_command_exit_value = return_code;
+ return_code = run_exit_trap ();
+ }
+
+ subshell_level--;
+ return (return_code);
+ /* NOTREACHED */
+}
+
+#if defined (COPROCESS_SUPPORT)
+#define COPROC_MAX 16
+
+typedef struct cpelement
+ {
+ struct cpelement *next;
+ struct coproc *coproc;
+ }
+cpelement_t;
+
+typedef struct cplist
+ {
+ struct cpelement *head;
+ struct cpelement *tail;
+ int ncoproc;
+ }
+cplist_t;
+
+static struct cpelement *cpe_alloc __P((struct coproc *));
+static void cpe_dispose __P((struct cpelement *));
+static struct cpelement *cpl_add __P((struct coproc *));
+static struct cpelement *cpl_delete __P((pid_t));
+static void cpl_reap __P((void));
+static void cpl_flush __P((void));
+static struct cpelement *cpl_search __P((pid_t));
+static struct cpelement *cpl_searchbyname __P((char *));
+static void cpl_prune __P((void));
+
+Coproc sh_coproc = { 0, NO_PID, -1, -1, 0, 0 };
+
+cplist_t coproc_list = {0, 0, 0};
+
+/* Functions to manage the list of coprocs */
+
+static struct cpelement *
+cpe_alloc (cp)
+ Coproc *cp;
+{
+ struct cpelement *cpe;
+
+ cpe = (struct cpelement *)xmalloc (sizeof (struct cpelement));
+ cpe->coproc = cp;
+ cpe->next = (struct cpelement *)0;
+ return cpe;
+}
+
+static void
+cpe_dispose (cpe)
+ struct cpelement *cpe;
+{
+ free (cpe);
+}
+
+static struct cpelement *
+cpl_add (cp)
+ Coproc *cp;
+{
+ struct cpelement *cpe;
+
+ cpe = cpe_alloc (cp);
+
+ if (coproc_list.head == 0)
+ {
+ coproc_list.head = coproc_list.tail = cpe;
+ coproc_list.ncoproc = 0; /* just to make sure */
+ }
+ else
+ {
+ coproc_list.tail->next = cpe;
+ coproc_list.tail = cpe;
+ }
+ coproc_list.ncoproc++;
+
+ return cpe;
+}
+
+static struct cpelement *
+cpl_delete (pid)
+ pid_t pid;
+{
+ struct cpelement *prev, *p;
+
+ for (prev = p = coproc_list.head; p; prev = p, p = p->next)
+ if (p->coproc->c_pid == pid)
+ {
+ prev->next = p->next; /* remove from list */
+ break;
+ }
+
+ if (p == 0)
+ return 0; /* not found */
+
+#if defined (DEBUG)
+ itrace("cpl_delete: deleting %d", pid);
+#endif
+
+ /* Housekeeping in the border cases. */
+ if (p == coproc_list.head)
+ coproc_list.head = coproc_list.head->next;
+ else if (p == coproc_list.tail)
+ coproc_list.tail = prev;
+
+ coproc_list.ncoproc--;
+ if (coproc_list.ncoproc == 0)
+ coproc_list.head = coproc_list.tail = 0;
+ else if (coproc_list.ncoproc == 1)
+ coproc_list.tail = coproc_list.head; /* just to make sure */
+
+ return (p);
+}
+
+static void
+cpl_reap ()
+{
+ struct cpelement *prev, *p;
+
+ for (prev = p = coproc_list.head; p; prev = p, p = p->next)
+ if (p->coproc->c_flags & COPROC_DEAD)
+ {
+ prev->next = p->next; /* remove from list */
+
+ /* Housekeeping in the border cases. */
+ if (p == coproc_list.head)
+ coproc_list.head = coproc_list.head->next;
+ else if (p == coproc_list.tail)
+ coproc_list.tail = prev;
+
+ coproc_list.ncoproc--;
+ if (coproc_list.ncoproc == 0)
+ coproc_list.head = coproc_list.tail = 0;
+ else if (coproc_list.ncoproc == 1)
+ coproc_list.tail = coproc_list.head; /* just to make sure */
+
+#if defined (DEBUG)
+ itrace("cpl_reap: deleting %d", p->coproc->c_pid);
+#endif
+
+ coproc_dispose (p->coproc);
+ cpe_dispose (p);
+ }
+}
+
+/* Clear out the list of saved statuses */
+static void
+cpl_flush ()
+{
+ struct cpelement *cpe, *p;
+
+ for (cpe = coproc_list.head; cpe; )
+ {
+ p = cpe;
+ cpe = cpe->next;
+
+ coproc_dispose (p->coproc);
+ cpe_dispose (p);
+ }
+
+ coproc_list.head = coproc_list.tail = 0;
+ coproc_list.ncoproc = 0;
+}
+
+/* Search for PID in the list of coprocs; return the cpelement struct if
+ found. If not found, return NULL. */
+static struct cpelement *
+cpl_search (pid)
+ pid_t pid;
+{
+ struct cpelement *cp;
+
+ for (cp = coproc_list.head ; cp; cp = cp->next)
+ if (cp->coproc->c_pid == pid)
+ return cp;
+ return (struct cpelement *)NULL;
+}
+
+/* Search for the coproc named NAME in the list of coprocs; return the
+ cpelement struct if found. If not found, return NULL. */
+static struct cpelement *
+cpl_searchbyname (name)
+ char *name;
+{
+ struct cpelement *cp;
+
+ for (cp = coproc_list.head ; cp; cp = cp->next)
+ if (STREQ (cp->coproc->c_name, name))
+ return cp;
+ return (struct cpelement *)NULL;
+}
+
+#if 0
+static void
+cpl_prune ()
+{
+ struct cpelement *cp;
+
+ while (coproc_list.head && coproc_list.ncoproc > COPROC_MAX)
+ {
+ cp = coproc_list.head;
+ coproc_list.head = coproc_list.head->next;
+ coproc_dispose (cp->coproc);
+ cpe_dispose (cp);
+ coproc_list.ncoproc--;
+ }
+}
+#endif
+
+/* These currently use a single global "shell coproc" but are written in a
+ way to not preclude additional coprocs later (using the list management
+ package above). */
+
+struct coproc *
+getcoprocbypid (pid)
+ pid_t pid;
+{
+ return (pid == sh_coproc.c_pid ? &sh_coproc : 0);
+}
+
+struct coproc *
+getcoprocbyname (name)
+ const char *name;
+{
+ return ((sh_coproc.c_name && STREQ (sh_coproc.c_name, name)) ? &sh_coproc : 0);
+}
+
+void
+coproc_init (cp)
+ struct coproc *cp;
+{
+ cp->c_name = 0;
+ cp->c_pid = NO_PID;
+ cp->c_rfd = cp->c_wfd = -1;
+ cp->c_rsave = cp->c_wsave = -1;
+ cp->c_flags = cp->c_status = 0;
+}
+
+struct coproc *
+coproc_alloc (name, pid)
+ char *name;
+ pid_t pid;
+{
+ struct coproc *cp;
+
+ cp = &sh_coproc; /* XXX */
+ coproc_init (cp);
+
+ cp->c_name = savestring (name);
+ cp->c_pid = pid;
+
+ return (cp);
+}
+
+void
+coproc_dispose (cp)
+ struct coproc *cp;
+{
+ if (cp == 0)
+ return;
+
+ coproc_unsetvars (cp);
+ FREE (cp->c_name);
+ coproc_close (cp);
+ coproc_init (cp);
+}
+
+/* Placeholder for now. */
+void
+coproc_flush ()
+{
+ coproc_dispose (&sh_coproc);
+}
+
+void
+coproc_close (cp)
+ struct coproc *cp;
+{
+ if (cp->c_rfd >= 0)
+ {
+ close (cp->c_rfd);
+ cp->c_rfd = -1;
+ }
+ if (cp->c_wfd >= 0)
+ {
+ close (cp->c_wfd);
+ cp->c_wfd = -1;
+ }
+ cp->c_rsave = cp->c_wsave = -1;
+}
+
+void
+coproc_closeall ()
+{
+ coproc_close (&sh_coproc);
+}
+
+void
+coproc_reap ()
+{
+ struct coproc *cp;
+
+ cp = &sh_coproc;
+ if (cp && (cp->c_flags & COPROC_DEAD))
+ coproc_dispose (cp);
+}
+
+void
+coproc_rclose (cp, fd)
+ struct coproc *cp;
+ int fd;
+{
+ if (cp->c_rfd >= 0 && cp->c_rfd == fd)
+ {
+ close (cp->c_rfd);
+ cp->c_rfd = -1;
+ }
+}
+
+void
+coproc_wclose (cp, fd)
+ struct coproc *cp;
+ int fd;
+{
+ if (cp->c_wfd >= 0 && cp->c_wfd == fd)
+ {
+ close (cp->c_wfd);
+ cp->c_wfd = -1;
+ }
+}
+
+void
+coproc_checkfd (cp, fd)
+ struct coproc *cp;
+ int fd;
+{
+ int update;
+
+ update = 0;
+ if (cp->c_rfd >= 0 && cp->c_rfd == fd)
+ update = cp->c_rfd = -1;
+ if (cp->c_wfd >= 0 && cp->c_wfd == fd)
+ update = cp->c_wfd = -1;
+ if (update)
+ coproc_setvars (cp);
+}
+
+void
+coproc_fdchk (fd)
+ int fd;
+{
+ coproc_checkfd (&sh_coproc, fd);
+}
+
+void
+coproc_fdclose (cp, fd)
+ struct coproc *cp;
+ int fd;
+{
+ coproc_rclose (cp, fd);
+ coproc_wclose (cp, fd);
+ coproc_setvars (cp);
+}
+
+void
+coproc_fdsave (cp)
+ struct coproc *cp;
+{
+ cp->c_rsave = cp->c_rfd;
+ cp->c_wsave = cp->c_wfd;
+}
+
+void
+coproc_fdrestore (cp)
+ struct coproc *cp;
+{
+ cp->c_rfd = cp->c_rsave;
+ cp->c_wfd = cp->c_wsave;
+}
+
+void
+coproc_pidchk (pid, status)
+ pid_t pid;
+{
+ struct coproc *cp;
+
+ cp = getcoprocbypid (pid);
+#if 0
+ if (cp)
+ itrace("coproc_pidchk: pid %d has died", pid);
+#endif
+ if (cp)
+ {
+ cp->c_status = status;
+ cp->c_flags |= COPROC_DEAD;
+ cp->c_flags &= ~COPROC_RUNNING;
+#if 0
+ coproc_dispose (cp);
+#endif
+ }
+}
+
+void
+coproc_setvars (cp)
+ struct coproc *cp;
+{
+ SHELL_VAR *v;
+ char *namevar, *t;
+ int l;
+#if defined (ARRAY_VARS)
+ arrayind_t ind;
+#endif
+
+ if (cp->c_name == 0)
+ return;
+
+ l = strlen (cp->c_name);
+ namevar = xmalloc (l + 16);
+
+#if defined (ARRAY_VARS)
+ v = find_variable (cp->c_name);
+ if (v == 0)
+ v = make_new_array_variable (cp->c_name);
+ if (array_p (v) == 0)
+ v = convert_var_to_array (v);
+
+ t = itos (cp->c_rfd);
+ ind = 0;
+ v = bind_array_variable (cp->c_name, ind, t, 0);
+ free (t);
+
+ t = itos (cp->c_wfd);
+ ind = 1;
+ bind_array_variable (cp->c_name, ind, t, 0);
+ free (t);
+#else
+ sprintf (namevar, "%s_READ", cp->c_name);
+ t = itos (cp->c_rfd);
+ bind_variable (namevar, t, 0);
+ free (t);
+ sprintf (namevar, "%s_WRITE", cp->c_name);
+ t = itos (cp->c_wfd);
+ bind_variable (namevar, t, 0);
+ free (t);
+#endif
+
+ sprintf (namevar, "%s_PID", cp->c_name);
+ t = itos (cp->c_pid);
+ bind_variable (namevar, t, 0);
+ free (t);
+
+ free (namevar);
+}
+
+void
+coproc_unsetvars (cp)
+ struct coproc *cp;
+{
+ int l;
+ char *namevar;
+
+ if (cp->c_name == 0)
+ return;
+
+ l = strlen (cp->c_name);
+ namevar = xmalloc (l + 16);
+
+ sprintf (namevar, "%s_PID", cp->c_name);
+ unbind_variable (namevar);
+
+#if defined (ARRAY_VARS)
+ unbind_variable (cp->c_name);
+#else
+ sprintf (namevar, "%s_READ", cp->c_name);
+ unbind_variable (namevar);
+ sprintf (namevar, "%s_WRITE", cp->c_name);
+ unbind_variable (namevar);
+#endif
+
+ free (namevar);
+}
+
+static int
+execute_coproc (command, pipe_in, pipe_out, fds_to_close)
+ COMMAND *command;
+ int pipe_in, pipe_out;
+ struct fd_bitmap *fds_to_close;
+{
+ int rpipe[2], wpipe[2], estat;
+ pid_t coproc_pid;
+ Coproc *cp;
+ char *tcmd;
+
+ /* XXX -- will require changes to handle multiple coprocs */
+ if (sh_coproc.c_pid != NO_PID)
+ {
+#if 0
+ internal_error ("execute_coproc: coproc [%d:%s] already exists", sh_coproc.c_pid, sh_coproc.c_name);
+ return (last_command_exit_value = EXECUTION_FAILURE);
+#else
+ internal_warning ("execute_coproc: coproc [%d:%s] still exists", sh_coproc.c_pid, sh_coproc.c_name);
+#endif
+ }
+ coproc_init (&sh_coproc);
+
+ command_string_index = 0;
+ tcmd = make_command_string (command);
+
+ sh_openpipe ((int *)&rpipe); /* 0 = parent read, 1 = child write */
+ sh_openpipe ((int *)&wpipe); /* 0 = child read, 1 = parent write */
+
+ coproc_pid = make_child (savestring (tcmd), 1);
+ if (coproc_pid == 0)
+ {
+ close (rpipe[0]);
+ close (wpipe[1]);
+
+ estat = execute_in_subshell (command, 1, wpipe[0], rpipe[1], fds_to_close);
+
+ fflush (stdout);
+ fflush (stderr);
+
+ exit (estat);
+ }
+
+ close (rpipe[1]);
+ close (wpipe[0]);
+
+ cp = coproc_alloc (command->value.Coproc->name, coproc_pid);
+ cp->c_rfd = rpipe[0];
+ cp->c_wfd = wpipe[1];
+
+ SET_CLOSE_ON_EXEC (cp->c_rfd);
+ SET_CLOSE_ON_EXEC (cp->c_wfd);
+
+ coproc_setvars (cp);
+
+#if 0
+ itrace ("execute_coproc: [%d] %s", coproc_pid, the_printed_command);
+#endif
+
+ close_pipes (pipe_in, pipe_out);
+#if defined (PROCESS_SUBSTITUTION) && defined (HAVE_DEV_FD)
+ unlink_fifo_list ();
+#endif
+ stop_pipeline (1, (COMMAND *)NULL);
+ DESCRIBE_PID (coproc_pid);
+ run_pending_traps ();
+
+ return (EXECUTION_SUCCESS);
+}
+#endif
+
+static int
+execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close)
+ COMMAND *command;
+ int asynchronous, pipe_in, pipe_out;
+ struct fd_bitmap *fds_to_close;
+{
+ int prev, fildes[2], new_bitmap_size, dummyfd, ignore_return, exec_result;
+ COMMAND *cmd;
+ struct fd_bitmap *fd_bitmap;
+
+#if defined (JOB_CONTROL)
+ sigset_t set, oset;
+ BLOCK_CHILD (set, oset);
+#endif /* JOB_CONTROL */
+
+ ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0;
+
+ prev = pipe_in;
+ cmd = command;
+
+ while (cmd && cmd->type == cm_connection &&
+ cmd->value.Connection && cmd->value.Connection->connector == '|')
+ {
+ /* Make a pipeline between the two commands. */
+ if (pipe (fildes) < 0)
+ {
+ sys_error (_("pipe error"));
+#if defined (JOB_CONTROL)
+ terminate_current_pipeline ();
+ kill_current_pipeline ();
+ UNBLOCK_CHILD (oset);
+#endif /* JOB_CONTROL */
+ last_command_exit_value = EXECUTION_FAILURE;
+ /* The unwind-protects installed below will take care
+ of closing all of the open file descriptors. */
+ throw_to_top_level ();
+ return (EXECUTION_FAILURE); /* XXX */
+ }
+
+ /* Here is a problem: with the new file close-on-exec
+ code, the read end of the pipe (fildes[0]) stays open
+ in the first process, so that process will never get a
+ SIGPIPE. There is no way to signal the first process
+ that it should close fildes[0] after forking, so it
+ remains open. No SIGPIPE is ever sent because there
+ is still a file descriptor open for reading connected
+ to the pipe. We take care of that here. This passes
+ around a bitmap of file descriptors that must be
+ closed after making a child process in execute_simple_command. */
+
+ /* We need fd_bitmap to be at least as big as fildes[0].
+ If fildes[0] is less than fds_to_close->size, then
+ use fds_to_close->size. */
+ new_bitmap_size = (fildes[0] < fds_to_close->size)
+ ? fds_to_close->size
+ : fildes[0] + 8;
+
+ fd_bitmap = new_fd_bitmap (new_bitmap_size);
+
+ /* Now copy the old information into the new bitmap. */
+ xbcopy ((char *)fds_to_close->bitmap, (char *)fd_bitmap->bitmap, fds_to_close->size);
+
+ /* And mark the pipe file descriptors to be closed. */
+ fd_bitmap->bitmap[fildes[0]] = 1;
+
+ /* In case there are pipe or out-of-processes errors, we
+ want all these file descriptors to be closed when
+ unwind-protects are run, and the storage used for the
+ bitmaps freed up. */
+ begin_unwind_frame ("pipe-file-descriptors");
+ add_unwind_protect (dispose_fd_bitmap, fd_bitmap);
+ add_unwind_protect (close_fd_bitmap, fd_bitmap);
+ if (prev >= 0)
+ add_unwind_protect (close, prev);
+ dummyfd = fildes[1];
+ add_unwind_protect (close, dummyfd);
+
+#if defined (JOB_CONTROL)
+ add_unwind_protect (restore_signal_mask, &oset);
+#endif /* JOB_CONTROL */
+
+ if (ignore_return && cmd->value.Connection->first)
+ cmd->value.Connection->first->flags |= CMD_IGNORE_RETURN;
+ execute_command_internal (cmd->value.Connection->first, asynchronous,
+ prev, fildes[1], fd_bitmap);
+
+ if (prev >= 0)
+ close (prev);
+
+ prev = fildes[0];
+ close (fildes[1]);
+
+ dispose_fd_bitmap (fd_bitmap);
+ discard_unwind_frame ("pipe-file-descriptors");
+
+ cmd = cmd->value.Connection->second;
+ }
+
+ /* Now execute the rightmost command in the pipeline. */
+ if (ignore_return && cmd)
+ cmd->flags |= CMD_IGNORE_RETURN;
+ exec_result = execute_command_internal (cmd, asynchronous, prev, pipe_out, fds_to_close);
+
+ if (prev >= 0)
+ close (prev);
+
+#if defined (JOB_CONTROL)
+ UNBLOCK_CHILD (oset);
+#endif
+
+ QUIT;
+ return (exec_result);
+}
+
+static int
+execute_connection (command, asynchronous, pipe_in, pipe_out, fds_to_close)
+ COMMAND *command;
+ int asynchronous, pipe_in, pipe_out;
+ struct fd_bitmap *fds_to_close;
+{
+ REDIRECT *rp;
+ COMMAND *tc, *second;
+ int ignore_return, exec_result, was_error_trap, invert;
+ volatile int save_line_number;
+
+ ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0;
+
+ switch (command->value.Connection->connector)
+ {
+ /* Do the first command asynchronously. */
+ case '&':
+ tc = command->value.Connection->first;
+ if (tc == 0)
+ return (EXECUTION_SUCCESS);
+
+ rp = tc->redirects;
+
+ if (ignore_return)
+ tc->flags |= CMD_IGNORE_RETURN;
+ tc->flags |= CMD_AMPERSAND;
+
+ /* If this shell was compiled without job control support,
+ if we are currently in a subshell via `( xxx )', or if job
+ control is not active then the standard input for an
+ asynchronous command is forced to /dev/null. */
+#if defined (JOB_CONTROL)
+ if ((subshell_environment || !job_control) && !stdin_redir)
+#else
+ if (!stdin_redir)
+#endif /* JOB_CONTROL */
+ tc->flags |= CMD_STDIN_REDIR;
+
+ exec_result = execute_command_internal (tc, 1, pipe_in, pipe_out, fds_to_close);
+ QUIT;
+
+ if (tc->flags & CMD_STDIN_REDIR)
+ tc->flags &= ~CMD_STDIN_REDIR;
+
+ second = command->value.Connection->second;
+ if (second)
+ {
+ if (ignore_return)
+ second->flags |= CMD_IGNORE_RETURN;
+
+ exec_result = execute_command_internal (second, asynchronous, pipe_in, pipe_out, fds_to_close);
+ }
+
+ break;
+
+ /* Just call execute command on both sides. */
+ case ';':
+ if (ignore_return)
+ {
+ if (command->value.Connection->first)
+ command->value.Connection->first->flags |= CMD_IGNORE_RETURN;
+ if (command->value.Connection->second)
+ command->value.Connection->second->flags |= CMD_IGNORE_RETURN;
+ }
+ executing_list++;
+ QUIT;
+ execute_command (command->value.Connection->first);
+ QUIT;
+ exec_result = execute_command_internal (command->value.Connection->second,
+ asynchronous, pipe_in, pipe_out,
+ fds_to_close);
+ executing_list--;
+ break;
+
+ case '|':
+ was_error_trap = signal_is_trapped (ERROR_TRAP) && signal_is_ignored (ERROR_TRAP) == 0;
+ invert = (command->flags & CMD_INVERT_RETURN) != 0;
+ ignore_return = (command->flags & CMD_IGNORE_RETURN) != 0;
+
+ line_number_for_err_trap = line_number;
+ exec_result = execute_pipeline (command, asynchronous, pipe_in, pipe_out, fds_to_close);
+
+ if (was_error_trap && ignore_return == 0 && invert == 0 && exec_result != EXECUTION_SUCCESS)
+ {
+ last_command_exit_value = exec_result;
+ save_line_number = line_number;
+ line_number = line_number_for_err_trap;
+ run_error_trap ();
+ line_number = save_line_number;
+ }
+
+ if (ignore_return == 0 && invert == 0 && exit_immediately_on_error && exec_result != EXECUTION_SUCCESS)
+ {
+ last_command_exit_value = exec_result;
+ run_pending_traps ();
+ jump_to_top_level (ERREXIT);
+ }
+
+ break;
+
+ case AND_AND:
+ case OR_OR:
+ if (asynchronous)
+ {
+ /* If we have something like `a && b &' or `a || b &', run the
+ && or || stuff in a subshell. Force a subshell and just call
+ execute_command_internal again. Leave asynchronous on
+ so that we get a report from the parent shell about the
+ background job. */
+ command->flags |= CMD_FORCE_SUBSHELL;
+ exec_result = execute_command_internal (command, 1, pipe_in, pipe_out, fds_to_close);
+ break;
+ }
+
+ /* Execute the first command. If the result of that is successful
+ and the connector is AND_AND, or the result is not successful
+ and the connector is OR_OR, then execute the second command,
+ otherwise return. */
+
+ executing_list++;
+ if (command->value.Connection->first)
+ command->value.Connection->first->flags |= CMD_IGNORE_RETURN;
+
+ exec_result = execute_command (command->value.Connection->first);
+ QUIT;
+ if (((command->value.Connection->connector == AND_AND) &&
+ (exec_result == EXECUTION_SUCCESS)) ||
+ ((command->value.Connection->connector == OR_OR) &&
+ (exec_result != EXECUTION_SUCCESS)))
+ {
+ if (ignore_return && command->value.Connection->second)
+ command->value.Connection->second->flags |= CMD_IGNORE_RETURN;
+
+ exec_result = execute_command (command->value.Connection->second);
+ }
+ executing_list--;
+ break;
+
+ default:
+ command_error ("execute_connection", CMDERR_BADCONN, command->value.Connection->connector, 0);
+ jump_to_top_level (DISCARD);
+ exec_result = EXECUTION_FAILURE;
+ }
+
+ return exec_result;
+}
+
+#define REAP() \
+ do \
+ { \
+ if (!interactive_shell) \
+ reap_dead_jobs (); \
+ } \
+ while (0)
+
+/* Execute a FOR command. The syntax is: FOR word_desc IN word_list;
+ DO command; DONE */
+static int
+execute_for_command (for_command)
+ FOR_COM *for_command;
+{
+ register WORD_LIST *releaser, *list;
+ SHELL_VAR *v;
+ char *identifier;
+ int retval, save_line_number;
+#if 0
+ SHELL_VAR *old_value = (SHELL_VAR *)NULL; /* Remember the old value of x. */
+#endif
+
+ save_line_number = line_number;
+ if (check_identifier (for_command->name, 1) == 0)
+ {
+ if (posixly_correct && interactive_shell == 0)
+ {
+ last_command_exit_value = EX_BADUSAGE;
+ jump_to_top_level (ERREXIT);
+ }
+ return (EXECUTION_FAILURE);
+ }
+
+ loop_level++;
+ identifier = for_command->name->word;
+
+ list = releaser = expand_words_no_vars (for_command->map_list);
+
+ begin_unwind_frame ("for");
+ add_unwind_protect (dispose_words, releaser);
+
+#if 0
+ if (lexical_scoping)
+ {
+ old_value = copy_variable (find_variable (identifier));
+ if (old_value)
+ add_unwind_protect (dispose_variable, old_value);
+ }
+#endif
+
+ if (for_command->flags & CMD_IGNORE_RETURN)
+ for_command->action->flags |= CMD_IGNORE_RETURN;
+
+ for (retval = EXECUTION_SUCCESS; list; list = list->next)
+ {
+ QUIT;
+
+ line_number = for_command->line;
+
+ /* Remember what this command looks like, for debugger. */
+ command_string_index = 0;
+ print_for_command_head (for_command);
+
+ if (echo_command_at_execute)
+ xtrace_print_for_command_head (for_command);
+
+ /* Save this command unless it's a trap command and we're not running
+ a debug trap. */
+#if 0
+ if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0)))
+#else
+ if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0)
+#endif
+ {
+ FREE (the_printed_command_except_trap);
+ the_printed_command_except_trap = savestring (the_printed_command);
+ }
+
+ retval = run_debug_trap ();
+#if defined (DEBUGGER)
+ /* In debugging mode, if the DEBUG trap returns a non-zero status, we
+ skip the command. */
+ if (debugging_mode && retval != EXECUTION_SUCCESS)
+ continue;
+#endif
+
+ this_command_name = (char *)NULL;
+ v = bind_variable (identifier, list->word->word, 0);
+ if (readonly_p (v) || noassign_p (v))
+ {
+ line_number = save_line_number;
+ if (readonly_p (v) && interactive_shell == 0 && posixly_correct)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ jump_to_top_level (FORCE_EOF);
+ }
+ else
+ {
+ dispose_words (releaser);
+ discard_unwind_frame ("for");
+ loop_level--;
+ return (EXECUTION_FAILURE);
+ }
+ }
+ retval = execute_command (for_command->action);
+ REAP ();
+ QUIT;
+
+ if (breaking)
+ {
+ breaking--;
+ break;
+ }
+
+ if (continuing)
+ {
+ continuing--;
+ if (continuing)
+ break;
+ }
+ }
+
+ loop_level--;
+ line_number = save_line_number;
+
+#if 0
+ if (lexical_scoping)
+ {
+ if (!old_value)
+ unbind_variable (identifier);
+ else
+ {
+ SHELL_VAR *new_value;
+
+ new_value = bind_variable (identifier, value_cell(old_value), 0);
+ new_value->attributes = old_value->attributes;
+ dispose_variable (old_value);
+ }
+ }
+#endif
+
+ dispose_words (releaser);
+ discard_unwind_frame ("for");
+ return (retval);
+}
+
+#if defined (ARITH_FOR_COMMAND)
+/* Execute an arithmetic for command. The syntax is
+
+ for (( init ; step ; test ))
+ do
+ body
+ done
+
+ The execution should be exactly equivalent to
+
+ eval \(\( init \)\)
+ while eval \(\( test \)\) ; do
+ body;
+ eval \(\( step \)\)
+ done
+*/
+static intmax_t
+eval_arith_for_expr (l, okp)
+ WORD_LIST *l;
+ int *okp;
+{
+ WORD_LIST *new;
+ intmax_t expresult;
+ int r;
+
+ new = expand_words_no_vars (l);
+ if (new)
+ {
+ if (echo_command_at_execute)
+ xtrace_print_arith_cmd (new);
+ this_command_name = "(("; /* )) for expression error messages */
+
+ command_string_index = 0;
+ print_arith_command (new);
+ if (signal_in_progress (DEBUG_TRAP) == 0)
+ {
+ FREE (the_printed_command_except_trap);
+ the_printed_command_except_trap = savestring (the_printed_command);
+ }
+
+ r = run_debug_trap ();
+ /* In debugging mode, if the DEBUG trap returns a non-zero status, we
+ skip the command. */
+#if defined (DEBUGGER)
+ if (debugging_mode == 0 || r == EXECUTION_SUCCESS)
+ expresult = evalexp (new->word->word, okp);
+ else
+ {
+ expresult = 0;
+ if (okp)
+ *okp = 1;
+ }
+#else
+ expresult = evalexp (new->word->word, okp);
+#endif
+ dispose_words (new);
+ }
+ else
+ {
+ expresult = 0;
+ if (okp)
+ *okp = 1;
+ }
+ return (expresult);
+}
+
+static int
+execute_arith_for_command (arith_for_command)
+ ARITH_FOR_COM *arith_for_command;
+{
+ intmax_t expresult;
+ int expok, body_status, arith_lineno, save_lineno;
+
+ body_status = EXECUTION_SUCCESS;
+ loop_level++;
+ save_lineno = line_number;
+
+ if (arith_for_command->flags & CMD_IGNORE_RETURN)
+ arith_for_command->action->flags |= CMD_IGNORE_RETURN;
+
+ this_command_name = "(("; /* )) for expression error messages */
+
+ /* save the starting line number of the command so we can reset
+ line_number before executing each expression -- for $LINENO
+ and the DEBUG trap. */
+ line_number = arith_lineno = arith_for_command->line;
+ if (variable_context && interactive_shell)
+ line_number -= function_line_number;
+
+ /* Evaluate the initialization expression. */
+ expresult = eval_arith_for_expr (arith_for_command->init, &expok);
+ if (expok == 0)
+ {
+ line_number = save_lineno;
+ return (EXECUTION_FAILURE);
+ }
+
+ while (1)
+ {
+ /* Evaluate the test expression. */
+ line_number = arith_lineno;
+ expresult = eval_arith_for_expr (arith_for_command->test, &expok);
+ line_number = save_lineno;
+
+ if (expok == 0)
+ {
+ body_status = EXECUTION_FAILURE;
+ break;
+ }
+ REAP ();
+ if (expresult == 0)
+ break;
+
+ /* Execute the body of the arithmetic for command. */
+ QUIT;
+ body_status = execute_command (arith_for_command->action);
+ QUIT;
+
+ /* Handle any `break' or `continue' commands executed by the body. */
+ if (breaking)
+ {
+ breaking--;
+ break;
+ }
+
+ if (continuing)
+ {
+ continuing--;
+ if (continuing)
+ break;
+ }
+
+ /* Evaluate the step expression. */
+ line_number = arith_lineno;
+ expresult = eval_arith_for_expr (arith_for_command->step, &expok);
+ line_number = save_lineno;
+
+ if (expok == 0)
+ {
+ body_status = EXECUTION_FAILURE;
+ break;
+ }
+ }
+
+ loop_level--;
+ line_number = save_lineno;
+
+ return (body_status);
+}
+#endif
+
+#if defined (SELECT_COMMAND)
+static int LINES, COLS, tabsize;
+
+#define RP_SPACE ") "
+#define RP_SPACE_LEN 2
+
+/* XXX - does not handle numbers > 1000000 at all. */
+#define NUMBER_LEN(s) \
+((s < 10) ? 1 \
+ : ((s < 100) ? 2 \
+ : ((s < 1000) ? 3 \
+ : ((s < 10000) ? 4 \
+ : ((s < 100000) ? 5 \
+ : 6)))))
+
+static int
+print_index_and_element (len, ind, list)
+ int len, ind;
+ WORD_LIST *list;
+{
+ register WORD_LIST *l;
+ register int i;
+
+ if (list == 0)
+ return (0);
+ for (i = ind, l = list; l && --i; l = l->next)
+ ;
+ fprintf (stderr, "%*d%s%s", len, ind, RP_SPACE, l->word->word);
+ return (STRLEN (l->word->word));
+}
+
+static void
+indent (from, to)
+ int from, to;
+{
+ while (from < to)
+ {
+ if ((to / tabsize) > (from / tabsize))
+ {
+ putc ('\t', stderr);
+ from += tabsize - from % tabsize;
+ }
+ else
+ {
+ putc (' ', stderr);
+ from++;
+ }
+ }
+}
+
+static void
+print_select_list (list, list_len, max_elem_len, indices_len)
+ WORD_LIST *list;
+ int list_len, max_elem_len, indices_len;
+{
+ int ind, row, elem_len, pos, cols, rows;
+ int first_column_indices_len, other_indices_len;
+
+ if (list == 0)
+ {
+ putc ('\n', stderr);
+ return;
+ }
+
+ cols = max_elem_len ? COLS / max_elem_len : 1;
+ if (cols == 0)
+ cols = 1;
+ rows = list_len ? list_len / cols + (list_len % cols != 0) : 1;
+ cols = list_len ? list_len / rows + (list_len % rows != 0) : 1;
+
+ if (rows == 1)
+ {
+ rows = cols;
+ cols = 1;
+ }
+
+ first_column_indices_len = NUMBER_LEN (rows);
+ other_indices_len = indices_len;
+
+ for (row = 0; row < rows; row++)
+ {
+ ind = row;
+ pos = 0;
+ while (1)
+ {
+ indices_len = (pos == 0) ? first_column_indices_len : other_indices_len;
+ elem_len = print_index_and_element (indices_len, ind + 1, list);
+ elem_len += indices_len + RP_SPACE_LEN;
+ ind += rows;
+ if (ind >= list_len)
+ break;
+ indent (pos + elem_len, pos + max_elem_len);
+ pos += max_elem_len;
+ }
+ putc ('\n', stderr);
+ }
+}
+
+/* Print the elements of LIST, one per line, preceded by an index from 1 to
+ LIST_LEN. Then display PROMPT and wait for the user to enter a number.
+ If the number is between 1 and LIST_LEN, return that selection. If EOF
+ is read, return a null string. If a blank line is entered, or an invalid
+ number is entered, the loop is executed again. */
+static char *
+select_query (list, list_len, prompt, print_menu)
+ WORD_LIST *list;
+ int list_len;
+ char *prompt;
+ int print_menu;
+{
+ int max_elem_len, indices_len, len;
+ intmax_t reply;
+ WORD_LIST *l;
+ char *repl_string, *t;
+
+ t = get_string_value ("LINES");
+ LINES = (t && *t) ? atoi (t) : 24;
+ t = get_string_value ("COLUMNS");
+ COLS = (t && *t) ? atoi (t) : 80;
+
+#if 0
+ t = get_string_value ("TABSIZE");
+ tabsize = (t && *t) ? atoi (t) : 8;
+ if (tabsize <= 0)
+ tabsize = 8;
+#else
+ tabsize = 8;
+#endif
+
+ max_elem_len = 0;
+ for (l = list; l; l = l->next)
+ {
+ len = STRLEN (l->word->word);
+ if (len > max_elem_len)
+ max_elem_len = len;
+ }
+ indices_len = NUMBER_LEN (list_len);
+ max_elem_len += indices_len + RP_SPACE_LEN + 2;
+
+ while (1)
+ {
+ if (print_menu)
+ print_select_list (list, list_len, max_elem_len, indices_len);
+ fprintf (stderr, "%s", prompt);
+ fflush (stderr);
+ QUIT;
+
+ if (read_builtin ((WORD_LIST *)NULL) == EXECUTION_FAILURE)
+ {
+ putchar ('\n');
+ return ((char *)NULL);
+ }
+ repl_string = get_string_value ("REPLY");
+ if (*repl_string == 0)
+ {
+ print_menu = 1;
+ continue;
+ }
+ if (legal_number (repl_string, &reply) == 0)
+ return "";
+ if (reply < 1 || reply > list_len)
+ return "";
+
+ for (l = list; l && --reply; l = l->next)
+ ;
+ return (l->word->word);
+ }
+}
+
+/* Execute a SELECT command. The syntax is:
+ SELECT word IN list DO command_list DONE
+ Only `break' or `return' in command_list will terminate
+ the command. */
+static int
+execute_select_command (select_command)
+ SELECT_COM *select_command;
+{
+ WORD_LIST *releaser, *list;
+ SHELL_VAR *v;
+ char *identifier, *ps3_prompt, *selection;
+ int retval, list_len, show_menu, save_line_number;
+
+ if (check_identifier (select_command->name, 1) == 0)
+ return (EXECUTION_FAILURE);
+
+ save_line_number = line_number;
+ line_number = select_command->line;
+
+ command_string_index = 0;
+ print_select_command_head (select_command);
+
+ if (echo_command_at_execute)
+ xtrace_print_select_command_head (select_command);
+
+#if 0
+ if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0)))
+#else
+ if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0)
+#endif
+ {
+ FREE (the_printed_command_except_trap);
+ the_printed_command_except_trap = savestring (the_printed_command);
+ }
+
+ retval = run_debug_trap ();
+#if defined (DEBUGGER)
+ /* In debugging mode, if the DEBUG trap returns a non-zero status, we
+ skip the command. */
+ if (debugging_mode && retval != EXECUTION_SUCCESS)
+ return (EXECUTION_SUCCESS);
+#endif
+
+ loop_level++;
+ identifier = select_command->name->word;
+
+ /* command and arithmetic substitution, parameter and variable expansion,
+ word splitting, pathname expansion, and quote removal. */
+ list = releaser = expand_words_no_vars (select_command->map_list);
+ list_len = list_length (list);
+ if (list == 0 || list_len == 0)
+ {
+ if (list)
+ dispose_words (list);
+ line_number = save_line_number;
+ return (EXECUTION_SUCCESS);
+ }
+
+ begin_unwind_frame ("select");
+ add_unwind_protect (dispose_words, releaser);
+
+ if (select_command->flags & CMD_IGNORE_RETURN)
+ select_command->action->flags |= CMD_IGNORE_RETURN;
+
+ retval = EXECUTION_SUCCESS;
+ show_menu = 1;
+
+ while (1)
+ {
+ line_number = select_command->line;
+ ps3_prompt = get_string_value ("PS3");
+ if (ps3_prompt == 0)
+ ps3_prompt = "#? ";
+
+ QUIT;
+ selection = select_query (list, list_len, ps3_prompt, show_menu);
+ QUIT;
+ if (selection == 0)
+ {
+ /* select_query returns EXECUTION_FAILURE if the read builtin
+ fails, so we want to return failure in this case. */
+ retval = EXECUTION_FAILURE;
+ break;
+ }
+
+ v = bind_variable (identifier, selection, 0);
+ if (readonly_p (v) || noassign_p (v))
+ {
+ if (readonly_p (v) && interactive_shell == 0 && posixly_correct)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ jump_to_top_level (FORCE_EOF);
+ }
+ else
+ {
+ dispose_words (releaser);
+ discard_unwind_frame ("select");
+ loop_level--;
+ line_number = save_line_number;
+ return (EXECUTION_FAILURE);
+ }
+ }
+
+ retval = execute_command (select_command->action);
+
+ REAP ();
+ QUIT;
+
+ if (breaking)
+ {
+ breaking--;
+ break;
+ }
+
+ if (continuing)
+ {
+ continuing--;
+ if (continuing)
+ break;
+ }
+
+#if defined (KSH_COMPATIBLE_SELECT)
+ show_menu = 0;
+ selection = get_string_value ("REPLY");
+ if (selection && *selection == '\0')
+ show_menu = 1;
+#endif
+ }
+
+ loop_level--;
+ line_number = save_line_number;
+
+ dispose_words (releaser);
+ discard_unwind_frame ("select");
+ return (retval);
+}
+#endif /* SELECT_COMMAND */
+
+/* Execute a CASE command. The syntax is: CASE word_desc IN pattern_list ESAC.
+ The pattern_list is a linked list of pattern clauses; each clause contains
+ some patterns to compare word_desc against, and an associated command to
+ execute. */
+static int
+execute_case_command (case_command)
+ CASE_COM *case_command;
+{
+ register WORD_LIST *list;
+ WORD_LIST *wlist, *es;
+ PATTERN_LIST *clauses;
+ char *word, *pattern;
+ int retval, match, ignore_return, save_line_number;
+
+ save_line_number = line_number;
+ line_number = case_command->line;
+
+ command_string_index = 0;
+ print_case_command_head (case_command);
+
+ if (echo_command_at_execute)
+ xtrace_print_case_command_head (case_command);
+
+#if 0
+ if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0)))
+#else
+ if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0)
+#endif
+ {
+ FREE (the_printed_command_except_trap);
+ the_printed_command_except_trap = savestring (the_printed_command);
+ }
+
+ retval = run_debug_trap();
+#if defined (DEBUGGER)
+ /* In debugging mode, if the DEBUG trap returns a non-zero status, we
+ skip the command. */
+ if (debugging_mode && retval != EXECUTION_SUCCESS)
+ {
+ line_number = save_line_number;
+ return (EXECUTION_SUCCESS);
+ }
+#endif
+
+ wlist = expand_word_unsplit (case_command->word, 0);
+ word = wlist ? string_list (wlist) : savestring ("");
+ dispose_words (wlist);
+
+ retval = EXECUTION_SUCCESS;
+ ignore_return = case_command->flags & CMD_IGNORE_RETURN;
+
+ begin_unwind_frame ("case");
+ add_unwind_protect ((Function *)xfree, word);
+
+#define EXIT_CASE() goto exit_case_command
+
+ for (clauses = case_command->clauses; clauses; clauses = clauses->next)
+ {
+ QUIT;
+ for (list = clauses->patterns; list; list = list->next)
+ {
+ es = expand_word_leave_quoted (list->word, 0);
+
+ if (es && es->word && es->word->word && *(es->word->word))
+ pattern = quote_string_for_globbing (es->word->word, QGLOB_CVTNULL);
+ else
+ {
+ pattern = (char *)xmalloc (1);
+ pattern[0] = '\0';
+ }
+
+ /* Since the pattern does not undergo quote removal (as per
+ Posix.2, section 3.9.4.3), the strmatch () call must be able
+ to recognize backslashes as escape characters. */
+ match = strmatch (pattern, word, FNMATCH_EXTFLAG|FNMATCH_IGNCASE) != FNM_NOMATCH;
+ free (pattern);
+
+ dispose_words (es);
+
+ if (match)
+ {
+ do
+ {
+ if (clauses->action && ignore_return)
+ clauses->action->flags |= CMD_IGNORE_RETURN;
+ retval = execute_command (clauses->action);
+ }
+ while ((clauses->flags & CASEPAT_FALLTHROUGH) && (clauses = clauses->next));
+ if (clauses == 0 || (clauses->flags & CASEPAT_TESTNEXT) == 0)
+ EXIT_CASE ();
+ else
+ break;
+ }
+
+ QUIT;
+ }
+ }
+
+exit_case_command:
+ free (word);
+ discard_unwind_frame ("case");
+ line_number = save_line_number;
+ return (retval);
+}
+
+#define CMD_WHILE 0
+#define CMD_UNTIL 1
+
+/* The WHILE command. Syntax: WHILE test DO action; DONE.
+ Repeatedly execute action while executing test produces
+ EXECUTION_SUCCESS. */
+static int
+execute_while_command (while_command)
+ WHILE_COM *while_command;
+{
+ return (execute_while_or_until (while_command, CMD_WHILE));
+}
+
+/* UNTIL is just like WHILE except that the test result is negated. */
+static int
+execute_until_command (while_command)
+ WHILE_COM *while_command;
+{
+ return (execute_while_or_until (while_command, CMD_UNTIL));
+}
+
+/* The body for both while and until. The only difference between the
+ two is that the test value is treated differently. TYPE is
+ CMD_WHILE or CMD_UNTIL. The return value for both commands should
+ be EXECUTION_SUCCESS if no commands in the body are executed, and
+ the status of the last command executed in the body otherwise. */
+static int
+execute_while_or_until (while_command, type)
+ WHILE_COM *while_command;
+ int type;
+{
+ int return_value, body_status;
+
+ body_status = EXECUTION_SUCCESS;
+ loop_level++;
+
+ while_command->test->flags |= CMD_IGNORE_RETURN;
+ if (while_command->flags & CMD_IGNORE_RETURN)
+ while_command->action->flags |= CMD_IGNORE_RETURN;
+
+ while (1)
+ {
+ return_value = execute_command (while_command->test);
+ REAP ();
+
+ /* Need to handle `break' in the test when we would break out of the
+ loop. The job control code will set `breaking' to loop_level
+ when a job in a loop is stopped with SIGTSTP. If the stopped job
+ is in the loop test, `breaking' will not be reset unless we do
+ this, and the shell will cease to execute commands. */
+ if (type == CMD_WHILE && return_value != EXECUTION_SUCCESS)
+ {
+ if (breaking)
+ breaking--;
+ break;
+ }
+ if (type == CMD_UNTIL && return_value == EXECUTION_SUCCESS)
+ {
+ if (breaking)
+ breaking--;
+ break;
+ }
+
+ QUIT;
+ body_status = execute_command (while_command->action);
+ QUIT;
+
+ if (breaking)
+ {
+ breaking--;
+ break;
+ }
+
+ if (continuing)
+ {
+ continuing--;
+ if (continuing)
+ break;
+ }
+ }
+ loop_level--;
+
+ return (body_status);
+}
+
+/* IF test THEN command [ELSE command].
+ IF also allows ELIF in the place of ELSE IF, but
+ the parser makes *that* stupidity transparent. */
+static int
+execute_if_command (if_command)
+ IF_COM *if_command;
+{
+ int return_value, save_line_number;
+
+ save_line_number = line_number;
+ if_command->test->flags |= CMD_IGNORE_RETURN;
+ return_value = execute_command (if_command->test);
+ line_number = save_line_number;
+
+ if (return_value == EXECUTION_SUCCESS)
+ {
+ QUIT;
+
+ if (if_command->true_case && (if_command->flags & CMD_IGNORE_RETURN))
+ if_command->true_case->flags |= CMD_IGNORE_RETURN;
+
+ return (execute_command (if_command->true_case));
+ }
+ else
+ {
+ QUIT;
+
+ if (if_command->false_case && (if_command->flags & CMD_IGNORE_RETURN))
+ if_command->false_case->flags |= CMD_IGNORE_RETURN;
+
+ return (execute_command (if_command->false_case));
+ }
+}
+
+#if defined (DPAREN_ARITHMETIC)
+static int
+execute_arith_command (arith_command)
+ ARITH_COM *arith_command;
+{
+ int expok, save_line_number, retval;
+ intmax_t expresult;
+ WORD_LIST *new;
+ char *exp;
+
+ expresult = 0;
+
+ save_line_number = line_number;
+ this_command_name = "(("; /* )) */
+ line_number = arith_command->line;
+ /* If we're in a function, update the line number information. */
+ if (variable_context && interactive_shell)
+ line_number -= function_line_number;
+
+ command_string_index = 0;
+ print_arith_command (arith_command->exp);
+
+ if (signal_in_progress (DEBUG_TRAP) == 0)
+ {
+ FREE (the_printed_command_except_trap);
+ the_printed_command_except_trap = savestring (the_printed_command);
+ }
+
+ /* Run the debug trap before each arithmetic command, but do it after we
+ update the line number information and before we expand the various
+ words in the expression. */
+ retval = run_debug_trap ();
+#if defined (DEBUGGER)
+ /* In debugging mode, if the DEBUG trap returns a non-zero status, we
+ skip the command. */
+ if (debugging_mode && retval != EXECUTION_SUCCESS)
+ {
+ line_number = save_line_number;
+ return (EXECUTION_SUCCESS);
+ }
+#endif
+
+ new = expand_words_no_vars (arith_command->exp);
+
+ /* If we're tracing, make a new word list with `((' at the front and `))'
+ at the back and print it. */
+ if (echo_command_at_execute)
+ xtrace_print_arith_cmd (new);
+
+ if (new)
+ {
+ exp = new->next ? string_list (new) : new->word->word;
+ expresult = evalexp (exp, &expok);
+ line_number = save_line_number;
+ if (exp != new->word->word)
+ free (exp);
+ dispose_words (new);
+ }
+ else
+ {
+ expresult = 0;
+ expok = 1;
+ }
+
+ if (expok == 0)
+ return (EXECUTION_FAILURE);
+
+ return (expresult == 0 ? EXECUTION_FAILURE : EXECUTION_SUCCESS);
+}
+#endif /* DPAREN_ARITHMETIC */
+
+#if defined (COND_COMMAND)
+
+static char * const nullstr = "";
+
+static int
+execute_cond_node (cond)
+ COND_COM *cond;
+{
+ int result, invert, patmatch, rmatch, mflags, ignore;
+ char *arg1, *arg2;
+
+ invert = (cond->flags & CMD_INVERT_RETURN);
+ ignore = (cond->flags & CMD_IGNORE_RETURN);
+ if (ignore)
+ {
+ if (cond->left)
+ cond->left->flags |= CMD_IGNORE_RETURN;
+ if (cond->right)
+ cond->right->flags |= CMD_IGNORE_RETURN;
+ }
+
+ if (cond->type == COND_EXPR)
+ result = execute_cond_node (cond->left);
+ else if (cond->type == COND_OR)
+ {
+ result = execute_cond_node (cond->left);
+ if (result != EXECUTION_SUCCESS)
+ result = execute_cond_node (cond->right);
+ }
+ else if (cond->type == COND_AND)
+ {
+ result = execute_cond_node (cond->left);
+ if (result == EXECUTION_SUCCESS)
+ result = execute_cond_node (cond->right);
+ }
+ else if (cond->type == COND_UNARY)
+ {
+ if (ignore)
+ comsub_ignore_return++;
+ arg1 = cond_expand_word (cond->left->op, 0);
+ if (ignore)
+ comsub_ignore_return--;
+ if (arg1 == 0)
+ arg1 = nullstr;
+ if (echo_command_at_execute)
+ xtrace_print_cond_term (cond->type, invert, cond->op, arg1, (char *)NULL);
+ result = unary_test (cond->op->word, arg1) ? EXECUTION_SUCCESS : EXECUTION_FAILURE;
+ if (arg1 != nullstr)
+ free (arg1);
+ }
+ else if (cond->type == COND_BINARY)
+ {
+ rmatch = 0;
+ patmatch = ((cond->op->word[1] == '=') && (cond->op->word[2] == '\0') &&
+ (cond->op->word[0] == '!' || cond->op->word[0] == '=') ||
+ (cond->op->word[0] == '=' && cond->op->word[1] == '\0'));
+#if defined (COND_REGEXP)
+ rmatch = (cond->op->word[0] == '=' && cond->op->word[1] == '~' &&
+ cond->op->word[2] == '\0');
+#endif
+
+ if (ignore)
+ comsub_ignore_return++;
+ arg1 = cond_expand_word (cond->left->op, 0);
+ if (ignore)
+ comsub_ignore_return--;
+ if (arg1 == 0)
+ arg1 = nullstr;
+ if (ignore)
+ comsub_ignore_return++;
+ arg2 = cond_expand_word (cond->right->op,
+ (rmatch && shell_compatibility_level > 31) ? 2 : (patmatch ? 1 : 0));
+ if (ignore)
+ comsub_ignore_return--;
+ if (arg2 == 0)
+ arg2 = nullstr;
+
+ if (echo_command_at_execute)
+ xtrace_print_cond_term (cond->type, invert, cond->op, arg1, arg2);
+
+#if defined (COND_REGEXP)
+ if (rmatch)
+ {
+ mflags = SHMAT_PWARN;
+#if defined (ARRAY_VARS)
+ mflags |= SHMAT_SUBEXP;
+#endif
+
+ result = sh_regmatch (arg1, arg2, mflags);
+ }
+ else
+#endif /* COND_REGEXP */
+ {
+ int oe;
+ oe = extended_glob;
+ extended_glob = 1;
+ result = binary_test (cond->op->word, arg1, arg2, TEST_PATMATCH|TEST_ARITHEXP|TEST_LOCALE)
+ ? EXECUTION_SUCCESS
+ : EXECUTION_FAILURE;
+ extended_glob = oe;
+ }
+ if (arg1 != nullstr)
+ free (arg1);
+ if (arg2 != nullstr)
+ free (arg2);
+ }
+ else
+ {
+ command_error ("execute_cond_node", CMDERR_BADTYPE, cond->type, 0);
+ jump_to_top_level (DISCARD);
+ result = EXECUTION_FAILURE;
+ }
+
+ if (invert)
+ result = (result == EXECUTION_SUCCESS) ? EXECUTION_FAILURE : EXECUTION_SUCCESS;
+
+ return result;
+}
+
+static int
+execute_cond_command (cond_command)
+ COND_COM *cond_command;
+{
+ int retval, save_line_number;
+
+ retval = EXECUTION_SUCCESS;
+ save_line_number = line_number;
+
+ this_command_name = "[[";
+ line_number = cond_command->line;
+ /* If we're in a function, update the line number information. */
+ if (variable_context && interactive_shell)
+ line_number -= function_line_number;
+ command_string_index = 0;
+ print_cond_command (cond_command);
+
+ if (signal_in_progress (DEBUG_TRAP) == 0)
+ {
+ FREE (the_printed_command_except_trap);
+ the_printed_command_except_trap = savestring (the_printed_command);
+ }
+
+ /* Run the debug trap before each conditional command, but do it after we
+ update the line number information. */
+ retval = run_debug_trap ();
+#if defined (DEBUGGER)
+ /* In debugging mode, if the DEBUG trap returns a non-zero status, we
+ skip the command. */
+ if (debugging_mode && retval != EXECUTION_SUCCESS)
+ {
+ line_number = save_line_number;
+ return (EXECUTION_SUCCESS);
+ }
+#endif
+
+#if 0
+ debug_print_cond_command (cond_command);
+#endif
+
+ last_command_exit_value = retval = execute_cond_node (cond_command);
+ line_number = save_line_number;
+ return (retval);
+}
+#endif /* COND_COMMAND */
+
+static void
+bind_lastarg (arg)
+ char *arg;
+{
+ SHELL_VAR *var;
+
+ if (arg == 0)
+ arg = "";
+ var = bind_variable ("_", arg, 0);
+ VUNSETATTR (var, att_exported);
+}
+
+/* Execute a null command. Fork a subshell if the command uses pipes or is
+ to be run asynchronously. This handles all the side effects that are
+ supposed to take place. */
+static int
+execute_null_command (redirects, pipe_in, pipe_out, async)
+ REDIRECT *redirects;
+ int pipe_in, pipe_out, async;
+{
+ int r;
+ int forcefork;
+ REDIRECT *rd;
+
+ for (forcefork = 0, rd = redirects; rd; rd = rd->next)
+ forcefork += rd->rflags & REDIR_VARASSIGN;
+
+ if (forcefork || pipe_in != NO_PIPE || pipe_out != NO_PIPE || async)
+ {
+ /* We have a null command, but we really want a subshell to take
+ care of it. Just fork, do piping and redirections, and exit. */
+ if (make_child ((char *)NULL, async) == 0)
+ {
+ /* Cancel traps, in trap.c. */
+ restore_original_signals (); /* XXX */
+
+ do_piping (pipe_in, pipe_out);
+
+#if defined (COPROCESS_SUPPORT)
+ coproc_closeall ();
+#endif
+
+ subshell_environment = 0;
+ if (async)
+ subshell_environment |= SUBSHELL_ASYNC;
+ if (pipe_in != NO_PIPE || pipe_out != NO_PIPE)
+ subshell_environment |= SUBSHELL_PIPE;
+
+ if (do_redirections (redirects, RX_ACTIVE) == 0)
+ exit (EXECUTION_SUCCESS);
+ else
+ exit (EXECUTION_FAILURE);
+ }
+ else
+ {
+ close_pipes (pipe_in, pipe_out);
+#if defined (PROCESS_SUBSTITUTION) && defined (HAVE_DEV_FD)
+ unlink_fifo_list ();
+#endif
+ return (EXECUTION_SUCCESS);
+ }
+ }
+ else
+ {
+ /* Even if there aren't any command names, pretend to do the
+ redirections that are specified. The user expects the side
+ effects to take place. If the redirections fail, then return
+ failure. Otherwise, if a command substitution took place while
+ expanding the command or a redirection, return the value of that
+ substitution. Otherwise, return EXECUTION_SUCCESS. */
+
+ r = do_redirections (redirects, RX_ACTIVE|RX_UNDOABLE);
+ cleanup_redirects (redirection_undo_list);
+ redirection_undo_list = (REDIRECT *)NULL;
+
+ if (r != 0)
+ return (EXECUTION_FAILURE);
+ else if (last_command_subst_pid != NO_PID)
+ return (last_command_exit_value);
+ else
+ return (EXECUTION_SUCCESS);
+ }
+}
+
+/* This is a hack to suppress word splitting for assignment statements
+ given as arguments to builtins with the ASSIGNMENT_BUILTIN flag set. */
+static void
+fix_assignment_words (words)
+ WORD_LIST *words;
+{
+ WORD_LIST *w;
+ struct builtin *b;
+ int assoc;
+
+ if (words == 0)
+ return;
+
+ b = 0;
+ assoc = 0;
+
+ for (w = words; w; w = w->next)
+ if (w->word->flags & W_ASSIGNMENT)
+ {
+ if (b == 0)
+ {
+ b = builtin_address_internal (words->word->word, 0);
+ if (b == 0 || (b->flags & ASSIGNMENT_BUILTIN) == 0)
+ return;
+ else if (b && (b->flags & ASSIGNMENT_BUILTIN))
+ words->word->flags |= W_ASSNBLTIN;
+ }
+ w->word->flags |= (W_NOSPLIT|W_NOGLOB|W_TILDEEXP|W_ASSIGNARG);
+#if defined (ARRAY_VARS)
+ if (assoc)
+ w->word->flags |= W_ASSIGNASSOC;
+#endif
+ }
+#if defined (ARRAY_VARS)
+ /* Note that we saw an associative array option to a builtin that takes
+ assignment statements. This is a bit of a kludge. */
+ else if (w->word->word[0] == '-' && strchr (w->word->word, 'A'))
+ {
+ if (b == 0)
+ {
+ b = builtin_address_internal (words->word->word, 0);
+ if (b == 0 || (b->flags & ASSIGNMENT_BUILTIN) == 0)
+ return;
+ else if (b && (b->flags & ASSIGNMENT_BUILTIN))
+ words->word->flags |= W_ASSNBLTIN;
+ }
+ if (words->word->flags & W_ASSNBLTIN)
+ assoc = 1;
+ }
+#endif
+}
+
+/* Return 1 if the file found by searching $PATH for PATHNAME, defaulting
+ to PATHNAME, is a directory. Used by the autocd code below. */
+static int
+is_dirname (pathname)
+ char *pathname;
+{
+ char *temp;
+ temp = search_for_command (pathname);
+ return (temp ? file_isdir (temp) : file_isdir (pathname));
+}
+
+/* The meaty part of all the executions. We have to start hacking the
+ real execution of commands here. Fork a process, set things up,
+ execute the command. */
+static int
+execute_simple_command (simple_command, pipe_in, pipe_out, async, fds_to_close)
+ SIMPLE_COM *simple_command;
+ int pipe_in, pipe_out, async;
+ struct fd_bitmap *fds_to_close;
+{
+ WORD_LIST *words, *lastword;
+ char *command_line, *lastarg, *temp;
+ int first_word_quoted, result, builtin_is_special, already_forked, dofork;
+ pid_t old_last_async_pid;
+ sh_builtin_func_t *builtin;
+ SHELL_VAR *func;
+
+ result = EXECUTION_SUCCESS;
+ special_builtin_failed = builtin_is_special = 0;
+ command_line = (char *)0;
+
+ /* If we're in a function, update the line number information. */
+ if (variable_context && interactive_shell && sourcelevel == 0)
+ line_number -= function_line_number;
+
+ /* Remember what this command line looks like at invocation. */
+ command_string_index = 0;
+ print_simple_command (simple_command);
+
+#if 0
+ if (signal_in_progress (DEBUG_TRAP) == 0 && (this_command_name == 0 || (STREQ (this_command_name, "trap") == 0)))
+#else
+ if (signal_in_progress (DEBUG_TRAP) == 0 && running_trap == 0)
+#endif
+ {
+ FREE (the_printed_command_except_trap);
+ the_printed_command_except_trap = the_printed_command ? savestring (the_printed_command) : (char *)0;
+ }
+
+ /* Run the debug trap before each simple command, but do it after we
+ update the line number information. */
+ result = run_debug_trap ();
+#if defined (DEBUGGER)
+ /* In debugging mode, if the DEBUG trap returns a non-zero status, we
+ skip the command. */
+ if (debugging_mode && result != EXECUTION_SUCCESS)
+ return (EXECUTION_SUCCESS);
+#endif
+
+ first_word_quoted =
+ simple_command->words ? (simple_command->words->word->flags & W_QUOTED) : 0;
+
+ last_command_subst_pid = NO_PID;
+ old_last_async_pid = last_asynchronous_pid;
+
+ already_forked = dofork = 0;
+
+ /* If we're in a pipeline or run in the background, set DOFORK so we
+ make the child early, before word expansion. This keeps assignment
+ statements from affecting the parent shell's environment when they
+ should not. */
+ dofork = pipe_in != NO_PIPE || pipe_out != NO_PIPE || async;
+
+ /* Something like `%2 &' should restart job 2 in the background, not cause
+ the shell to fork here. */
+ if (dofork && pipe_in == NO_PIPE && pipe_out == NO_PIPE &&
+ simple_command->words && simple_command->words->word &&
+ simple_command->words->word->word &&
+ (simple_command->words->word->word[0] == '%'))
+ dofork = 0;
+
+ if (dofork)
+ {
+ /* Do this now, because execute_disk_command will do it anyway in the
+ vast majority of cases. */
+ maybe_make_export_env ();
+
+ /* Don't let a DEBUG trap overwrite the command string to be saved with
+ the process/job associated with this child. */
+ if (make_child (savestring (the_printed_command_except_trap), async) == 0)
+ {
+ already_forked = 1;
+ simple_command->flags |= CMD_NO_FORK;
+
+ subshell_environment = SUBSHELL_FORK;
+ if (pipe_in != NO_PIPE || pipe_out != NO_PIPE)
+ subshell_environment |= SUBSHELL_PIPE;
+ if (async)
+ subshell_environment |= SUBSHELL_ASYNC;
+
+ /* We need to do this before piping to handle some really
+ pathological cases where one of the pipe file descriptors
+ is < 2. */
+ if (fds_to_close)
+ close_fd_bitmap (fds_to_close);
+
+ do_piping (pipe_in, pipe_out);
+ pipe_in = pipe_out = NO_PIPE;
+#if defined (COPROCESS_SUPPORT)
+ coproc_closeall ();
+#endif
+
+ last_asynchronous_pid = old_last_async_pid;
+ }
+ else
+ {
+ close_pipes (pipe_in, pipe_out);
+#if defined (PROCESS_SUBSTITUTION) && defined (HAVE_DEV_FD)
+ unlink_fifo_list ();
+#endif
+ command_line = (char *)NULL; /* don't free this. */
+ bind_lastarg ((char *)NULL);
+ return (result);
+ }
+ }
+
+ /* If we are re-running this as the result of executing the `command'
+ builtin, do not expand the command words a second time. */
+ if ((simple_command->flags & CMD_INHIBIT_EXPANSION) == 0)
+ {
+ current_fds_to_close = fds_to_close;
+ fix_assignment_words (simple_command->words);
+ /* Pass the ignore return flag down to command substitutions */
+ if (simple_command->flags & CMD_IGNORE_RETURN) /* XXX */
+ comsub_ignore_return++;
+ words = expand_words (simple_command->words);
+ if (simple_command->flags & CMD_IGNORE_RETURN)
+ comsub_ignore_return--;
+ current_fds_to_close = (struct fd_bitmap *)NULL;
+ }
+ else
+ words = copy_word_list (simple_command->words);
+
+ /* It is possible for WORDS not to have anything left in it.
+ Perhaps all the words consisted of `$foo', and there was
+ no variable `$foo'. */
+ if (words == 0)
+ {
+ this_command_name = 0;
+ result = execute_null_command (simple_command->redirects,
+ pipe_in, pipe_out,
+ already_forked ? 0 : async);
+ if (already_forked)
+ exit (result);
+ else
+ {
+ bind_lastarg ((char *)NULL);
+ set_pipestatus_from_exit (result);
+ return (result);
+ }
+ }
+
+ lastarg = (char *)NULL;
+
+ begin_unwind_frame ("simple-command");
+
+ if (echo_command_at_execute)
+ xtrace_print_word_list (words, 1);
+
+ builtin = (sh_builtin_func_t *)NULL;
+ func = (SHELL_VAR *)NULL;
+ if ((simple_command->flags & CMD_NO_FUNCTIONS) == 0)
+ {
+ /* Posix.2 says special builtins are found before functions. We
+ don't set builtin_is_special anywhere other than here, because
+ this path is followed only when the `command' builtin is *not*
+ being used, and we don't want to exit the shell if a special
+ builtin executed with `command builtin' fails. `command' is not
+ a special builtin. */
+ if (posixly_correct)
+ {
+ builtin = find_special_builtin (words->word->word);
+ if (builtin)
+ builtin_is_special = 1;
+ }
+ if (builtin == 0)
+ func = find_function (words->word->word);
+ }
+
+ /* In POSIX mode, assignment errors in the temporary environment cause a
+ non-interactive shell to exit. */
+ if (builtin_is_special && interactive_shell == 0 && tempenv_assign_error)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ jump_to_top_level (ERREXIT);
+ }
+
+ add_unwind_protect (dispose_words, words);
+ QUIT;
+
+ /* Bind the last word in this command to "$_" after execution. */
+ for (lastword = words; lastword->next; lastword = lastword->next)
+ ;
+ lastarg = lastword->word->word;
+
+#if defined (JOB_CONTROL)
+ /* Is this command a job control related thing? */
+ if (words->word->word[0] == '%' && already_forked == 0)
+ {
+ this_command_name = async ? "bg" : "fg";
+ last_shell_builtin = this_shell_builtin;
+ this_shell_builtin = builtin_address (this_command_name);
+ result = (*this_shell_builtin) (words);
+ goto return_result;
+ }
+
+ /* One other possiblilty. The user may want to resume an existing job.
+ If they do, find out whether this word is a candidate for a running
+ job. */
+ if (job_control && already_forked == 0 && async == 0 &&
+ !first_word_quoted &&
+ !words->next &&
+ words->word->word[0] &&
+ !simple_command->redirects &&
+ pipe_in == NO_PIPE &&
+ pipe_out == NO_PIPE &&
+ (temp = get_string_value ("auto_resume")))
+ {
+ int job, jflags, started_status;
+
+ jflags = JM_STOPPED|JM_FIRSTMATCH;
+ if (STREQ (temp, "exact"))
+ jflags |= JM_EXACT;
+ else if (STREQ (temp, "substring"))
+ jflags |= JM_SUBSTRING;
+ else
+ jflags |= JM_PREFIX;
+ job = get_job_by_name (words->word->word, jflags);
+ if (job != NO_JOB)
+ {
+ run_unwind_frame ("simple-command");
+ this_command_name = "fg";
+ last_shell_builtin = this_shell_builtin;
+ this_shell_builtin = builtin_address ("fg");
+
+ started_status = start_job (job, 1);
+ return ((started_status < 0) ? EXECUTION_FAILURE : started_status);
+ }
+ }
+#endif /* JOB_CONTROL */
+
+run_builtin:
+ /* Remember the name of this command globally. */
+ this_command_name = words->word->word;
+
+ QUIT;
+
+ /* This command could be a shell builtin or a user-defined function.
+ We have already found special builtins by this time, so we do not
+ set builtin_is_special. If this is a function or builtin, and we
+ have pipes, then fork a subshell in here. Otherwise, just execute
+ the command directly. */
+ if (func == 0 && builtin == 0)
+ builtin = find_shell_builtin (this_command_name);
+
+ last_shell_builtin = this_shell_builtin;
+ this_shell_builtin = builtin;
+
+ if (builtin || func)
+ {
+ if (builtin)
+ unwind_protect_int (executing_builtin); /* modified in execute_builtin */
+ if (already_forked)
+ {
+ /* reset_terminating_signals (); */ /* XXX */
+ /* Cancel traps, in trap.c. */
+ restore_original_signals ();
+
+ if (async)
+ {
+ if ((simple_command->flags & CMD_STDIN_REDIR) &&
+ pipe_in == NO_PIPE &&
+ (stdin_redirects (simple_command->redirects) == 0))
+ async_redirect_stdin ();
+ setup_async_signals ();
+ }
+
+ subshell_level++;
+ execute_subshell_builtin_or_function
+ (words, simple_command->redirects, builtin, func,
+ pipe_in, pipe_out, async, fds_to_close,
+ simple_command->flags);
+ subshell_level--;
+ }
+ else
+ {
+ result = execute_builtin_or_function
+ (words, builtin, func, simple_command->redirects, fds_to_close,
+ simple_command->flags);
+ if (builtin)
+ {
+ if (result > EX_SHERRBASE)
+ {
+ result = builtin_status (result);
+ if (builtin_is_special)
+ special_builtin_failed = 1;
+ }
+ /* In POSIX mode, if there are assignment statements preceding
+ a special builtin, they persist after the builtin
+ completes. */
+ if (posixly_correct && builtin_is_special && temporary_env)
+ merge_temporary_env ();
+ }
+ else /* function */
+ {
+ if (result == EX_USAGE)
+ result = EX_BADUSAGE;
+ else if (result > EX_SHERRBASE)
+ result = EXECUTION_FAILURE;
+ }
+
+ set_pipestatus_from_exit (result);
+
+ goto return_result;
+ }
+ }
+
+ if (autocd && interactive && words->word && is_dirname (words->word->word))
+ {
+ words = make_word_list (make_word ("cd"), words);
+ xtrace_print_word_list (words, 0);
+ goto run_builtin;
+ }
+
+ if (command_line == 0)
+ command_line = savestring (the_printed_command_except_trap);
+
+#if defined (PROCESS_SUBSTITUTION)
+ if ((subshell_environment & SUBSHELL_COMSUB) && (simple_command->flags & CMD_NO_FORK) && fifos_pending() > 0)
+ simple_command->flags &= ~CMD_NO_FORK;
+#endif
+
+ execute_disk_command (words, simple_command->redirects, command_line,
+ pipe_in, pipe_out, async, fds_to_close,
+ simple_command->flags);
+
+ return_result:
+ bind_lastarg (lastarg);
+ FREE (command_line);
+ dispose_words (words);
+ discard_unwind_frame ("simple-command");
+ this_command_name = (char *)NULL; /* points to freed memory now */
+ return (result);
+}
+
+/* Translate the special builtin exit statuses. We don't really need a
+ function for this; it's a placeholder for future work. */
+static int
+builtin_status (result)
+ int result;
+{
+ int r;
+
+ switch (result)
+ {
+ case EX_USAGE:
+ r = EX_BADUSAGE;
+ break;
+ case EX_REDIRFAIL:
+ case EX_BADSYNTAX:
+ case EX_BADASSIGN:
+ case EX_EXPFAIL:
+ r = EXECUTION_FAILURE;
+ break;
+ default:
+ r = EXECUTION_SUCCESS;
+ break;
+ }
+ return (r);
+}
+
+static int
+execute_builtin (builtin, words, flags, subshell)
+ sh_builtin_func_t *builtin;
+ WORD_LIST *words;
+ int flags, subshell;
+{
+ int old_e_flag, result, eval_unwind;
+ int isbltinenv;
+ char *error_trap;
+
+#if 0
+ /* XXX -- added 12/11 */
+ terminate_immediately++;
+#endif
+
+ error_trap = 0;
+ old_e_flag = exit_immediately_on_error;
+ /* The eval builtin calls parse_and_execute, which does not know about
+ the setting of flags, and always calls the execution functions with
+ flags that will exit the shell on an error if -e is set. If the
+ eval builtin is being called, and we're supposed to ignore the exit
+ value of the command, we turn the -e flag off ourselves and disable
+ the ERR trap, then restore them when the command completes. This is
+ also a problem (as below) for the command and source/. builtins. */
+ if (subshell == 0 && (flags & CMD_IGNORE_RETURN) &&
+ (builtin == eval_builtin || builtin == command_builtin || builtin == source_builtin))
+ {
+ begin_unwind_frame ("eval_builtin");
+ unwind_protect_int (exit_immediately_on_error);
+ error_trap = TRAP_STRING (ERROR_TRAP);
+ if (error_trap)
+ {
+ error_trap = savestring (error_trap);
+ add_unwind_protect (xfree, error_trap);
+ add_unwind_protect (set_error_trap, error_trap);
+ restore_default_signal (ERROR_TRAP);
+ }
+ exit_immediately_on_error = 0;
+ eval_unwind = 1;
+ }
+ else
+ eval_unwind = 0;
+
+ /* The temporary environment for a builtin is supposed to apply to
+ all commands executed by that builtin. Currently, this is a
+ problem only with the `unset', `source' and `eval' builtins. */
+
+ isbltinenv = (builtin == source_builtin || builtin == eval_builtin || builtin == unset_builtin);
+
+ if (isbltinenv)
+ {
+ if (subshell == 0)
+ begin_unwind_frame ("builtin_env");
+
+ if (temporary_env)
+ {
+ push_scope (VC_BLTNENV, temporary_env);
+ if (subshell == 0)
+ add_unwind_protect (pop_scope, (flags & CMD_COMMAND_BUILTIN) ? 0 : "1");
+ temporary_env = (HASH_TABLE *)NULL;
+ }
+ }
+
+ /* `return' does a longjmp() back to a saved environment in execute_function.
+ If a variable assignment list preceded the command, and the shell is
+ running in POSIX mode, we need to merge that into the shell_variables
+ table, since `return' is a POSIX special builtin. */
+ if (posixly_correct && subshell == 0 && builtin == return_builtin && temporary_env)
+ {
+ begin_unwind_frame ("return_temp_env");
+ add_unwind_protect (merge_temporary_env, (char *)NULL);
+ }
+
+ executing_builtin++;
+ result = ((*builtin) (words->next));
+
+ /* This shouldn't happen, but in case `return' comes back instead of
+ longjmp'ing, we need to unwind. */
+ if (posixly_correct && subshell == 0 && builtin == return_builtin && temporary_env)
+ discard_unwind_frame ("return_temp_env");
+
+ if (subshell == 0 && isbltinenv)
+ run_unwind_frame ("builtin_env");
+
+ if (eval_unwind)
+ {
+ exit_immediately_on_error += old_e_flag;
+ if (error_trap)
+ {
+ set_error_trap (error_trap);
+ xfree (error_trap);
+ }
+ discard_unwind_frame ("eval_builtin");
+ }
+
+#if 0
+ /* XXX -- added 12/11 */
+ terminate_immediately--;
+#endif
+
+ return (result);
+}
+
+static int
+execute_function (var, words, flags, fds_to_close, async, subshell)
+ SHELL_VAR *var;
+ WORD_LIST *words;
+ int flags;
+ struct fd_bitmap *fds_to_close;
+ int async, subshell;
+{
+ int return_val, result;
+ COMMAND *tc, *fc, *save_current;
+ char *debug_trap, *error_trap, *return_trap;
+#if defined (ARRAY_VARS)
+ SHELL_VAR *funcname_v, *nfv, *bash_source_v, *bash_lineno_v;
+ ARRAY *funcname_a, *bash_source_a, *bash_lineno_a;
+#endif
+ FUNCTION_DEF *shell_fn;
+ char *sfile, *t;
+
+ USE_VAR(fc);
+
+#if 0 /* for bash-4.2 */
+ if (funcnest_max > 0 && funcnest >= funcnest_max)
+ {
+ internal_error ("%s: maximum function nesting level exceeded (%d)", var->name, funcnest);
+ jump_to_top_level (DISCARD);
+ }
+#endif
+
+#if defined (ARRAY_VARS)
+ GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a);
+ GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a);
+ GET_ARRAY_FROM_VAR ("BASH_LINENO", bash_lineno_v, bash_lineno_a);
+#endif
+
+ tc = (COMMAND *)copy_command (function_cell (var));
+ if (tc && (flags & CMD_IGNORE_RETURN))
+ tc->flags |= CMD_IGNORE_RETURN;
+
+ if (subshell == 0)
+ {
+ begin_unwind_frame ("function_calling");
+ push_context (var->name, subshell, temporary_env);
+ add_unwind_protect (pop_context, (char *)NULL);
+ unwind_protect_int (line_number);
+ unwind_protect_int (return_catch_flag);
+ unwind_protect_jmp_buf (return_catch);
+ add_unwind_protect (dispose_command, (char *)tc);
+ unwind_protect_pointer (this_shell_function);
+ unwind_protect_int (loop_level);
+ unwind_protect_int (funcnest);
+ }
+ else
+ push_context (var->name, subshell, temporary_env); /* don't unwind-protect for subshells */
+
+ temporary_env = (HASH_TABLE *)NULL;
+
+ this_shell_function = var;
+ make_funcname_visible (1);
+
+ debug_trap = TRAP_STRING(DEBUG_TRAP);
+ error_trap = TRAP_STRING(ERROR_TRAP);
+ return_trap = TRAP_STRING(RETURN_TRAP);
+
+ /* The order of the unwind protects for debug_trap, error_trap and
+ return_trap is important here! unwind-protect commands are run
+ in reverse order of registration. If this causes problems, take
+ out the xfree unwind-protect calls and live with the small memory leak. */
+
+ /* function_trace_mode != 0 means that all functions inherit the DEBUG trap.
+ if the function has the trace attribute set, it inherits the DEBUG trap */
+ if (debug_trap && ((trace_p (var) == 0) && function_trace_mode == 0))
+ {
+ if (subshell == 0)
+ {
+ debug_trap = savestring (debug_trap);
+ add_unwind_protect (xfree, debug_trap);
+ add_unwind_protect (set_debug_trap, debug_trap);
+ }
+ restore_default_signal (DEBUG_TRAP);
+ }
+
+ /* error_trace_mode != 0 means that functions inherit the ERR trap. */
+ if (error_trap && error_trace_mode == 0)
+ {
+ if (subshell == 0)
+ {
+ error_trap = savestring (error_trap);
+ add_unwind_protect (xfree, error_trap);
+ add_unwind_protect (set_error_trap, error_trap);
+ }
+ restore_default_signal (ERROR_TRAP);
+ }
+
+ /* Shell functions inherit the RETURN trap if function tracing is on
+ globally or on individually for this function. */
+#if 0
+ if (return_trap && ((trace_p (var) == 0) && function_trace_mode == 0))
+#else
+ if (return_trap && (signal_in_progress (DEBUG_TRAP) || ((trace_p (var) == 0) && function_trace_mode == 0)))
+#endif
+ {
+ if (subshell == 0)
+ {
+ return_trap = savestring (return_trap);
+ add_unwind_protect (xfree, return_trap);
+ add_unwind_protect (set_return_trap, return_trap);
+ }
+ restore_default_signal (RETURN_TRAP);
+ }
+
+ funcnest++;
+#if defined (ARRAY_VARS)
+ /* This is quite similar to the code in shell.c and elsewhere. */
+ shell_fn = find_function_def (this_shell_function->name);
+ sfile = shell_fn ? shell_fn->source_file : "";
+ array_push (funcname_a, this_shell_function->name);
+
+ array_push (bash_source_a, sfile);
+ t = itos (executing_line_number ());
+ array_push (bash_lineno_a, t);
+ free (t);
+#endif
+
+ /* The temporary environment for a function is supposed to apply to
+ all commands executed within the function body. */
+
+ remember_args (words->next, 1);
+
+ /* Update BASH_ARGV and BASH_ARGC */
+ if (debugging_mode)
+ push_args (words->next);
+
+ /* Number of the line on which the function body starts. */
+ line_number = function_line_number = tc->line;
+
+#if defined (JOB_CONTROL)
+ if (subshell)
+ stop_pipeline (async, (COMMAND *)NULL);
+#endif
+
+ fc = tc;
+
+ return_catch_flag++;
+ return_val = setjmp (return_catch);
+
+ if (return_val)
+ {
+ result = return_catch_value;
+ /* Run the RETURN trap in the function's context. */
+ save_current = currently_executing_command;
+ run_return_trap ();
+ currently_executing_command = save_current;
+ }
+ else
+ {
+ /* Run the debug trap here so we can trap at the start of a function's
+ execution rather than the execution of the body's first command. */
+ showing_function_line = 1;
+ save_current = currently_executing_command;
+ result = run_debug_trap ();
+#if defined (DEBUGGER)
+ /* In debugging mode, if the DEBUG trap returns a non-zero status, we
+ skip the command. */
+ if (debugging_mode == 0 || result == EXECUTION_SUCCESS)
+ {
+ showing_function_line = 0;
+ currently_executing_command = save_current;
+ result = execute_command_internal (fc, 0, NO_PIPE, NO_PIPE, fds_to_close);
+
+ /* Run the RETURN trap in the function's context */
+ save_current = currently_executing_command;
+ run_return_trap ();
+ currently_executing_command = save_current;
+ }
+#else
+ result = execute_command_internal (fc, 0, NO_PIPE, NO_PIPE, fds_to_close);
+
+ save_current = currently_executing_command;
+ run_return_trap ();
+ currently_executing_command = save_current;
+#endif
+ showing_function_line = 0;
+ }
+
+ /* Restore BASH_ARGC and BASH_ARGV */
+ if (debugging_mode)
+ pop_args ();
+
+ if (subshell == 0)
+ run_unwind_frame ("function_calling");
+
+#if defined (ARRAY_VARS)
+ /* These two variables cannot be unset, and cannot be affected by the
+ function. */
+ array_pop (bash_source_a);
+ array_pop (bash_lineno_a);
+
+ /* FUNCNAME can be unset, and so can potentially be changed by the
+ function. */
+ GET_ARRAY_FROM_VAR ("FUNCNAME", nfv, funcname_a);
+ if (nfv == funcname_v)
+ array_pop (funcname_a);
+#endif
+
+ if (variable_context == 0 || this_shell_function == 0)
+ {
+ make_funcname_visible (0);
+#if defined (PROCESS_SUBSTITUTION)
+ unlink_fifo_list ();
+#endif
+ }
+
+ return (result);
+}
+
+/* A convenience routine for use by other parts of the shell to execute
+ a particular shell function. */
+int
+execute_shell_function (var, words)
+ SHELL_VAR *var;
+ WORD_LIST *words;
+{
+ int ret;
+ struct fd_bitmap *bitmap;
+
+ bitmap = new_fd_bitmap (FD_BITMAP_DEFAULT_SIZE);
+ begin_unwind_frame ("execute-shell-function");
+ add_unwind_protect (dispose_fd_bitmap, (char *)bitmap);
+
+ ret = execute_function (var, words, 0, bitmap, 0, 0);
+
+ dispose_fd_bitmap (bitmap);
+ discard_unwind_frame ("execute-shell-function");
+
+ return ret;
+}
+
+/* Execute a shell builtin or function in a subshell environment. This
+ routine does not return; it only calls exit(). If BUILTIN is non-null,
+ it points to a function to call to execute a shell builtin; otherwise
+ VAR points at the body of a function to execute. WORDS is the arguments
+ to the command, REDIRECTS specifies redirections to perform before the
+ command is executed. */
+static void
+execute_subshell_builtin_or_function (words, redirects, builtin, var,
+ pipe_in, pipe_out, async, fds_to_close,
+ flags)
+ WORD_LIST *words;
+ REDIRECT *redirects;
+ sh_builtin_func_t *builtin;
+ SHELL_VAR *var;
+ int pipe_in, pipe_out, async;
+ struct fd_bitmap *fds_to_close;
+ int flags;
+{
+ int result, r, funcvalue;
+#if defined (JOB_CONTROL)
+ int jobs_hack;
+
+ jobs_hack = (builtin == jobs_builtin) &&
+ ((subshell_environment & SUBSHELL_ASYNC) == 0 || pipe_out != NO_PIPE);
+#endif
+
+ /* A subshell is neither a login shell nor interactive. */
+ login_shell = interactive = 0;
+
+ if (async)
+ subshell_environment |= SUBSHELL_ASYNC;
+ if (pipe_in != NO_PIPE || pipe_out != NO_PIPE)
+ subshell_environment |= SUBSHELL_PIPE;
+
+ maybe_make_export_env (); /* XXX - is this needed? */
+
+#if defined (JOB_CONTROL)
+ /* Eradicate all traces of job control after we fork the subshell, so
+ all jobs begun by this subshell are in the same process group as
+ the shell itself. */
+
+ /* Allow the output of `jobs' to be piped. */
+ if (jobs_hack)
+ kill_current_pipeline ();
+ else
+ without_job_control ();
+
+ set_sigchld_handler ();
+#endif /* JOB_CONTROL */
+
+ set_sigint_handler ();
+
+ if (fds_to_close)
+ close_fd_bitmap (fds_to_close);
+
+ do_piping (pipe_in, pipe_out);
+
+ if (do_redirections (redirects, RX_ACTIVE) != 0)
+ exit (EXECUTION_FAILURE);
+
+ if (builtin)
+ {
+ /* Give builtins a place to jump back to on failure,
+ so we don't go back up to main(). */
+ result = setjmp (top_level);
+
+ /* Give the return builtin a place to jump to when executed in a subshell
+ or pipeline */
+ funcvalue = 0;
+ if (return_catch_flag && builtin == return_builtin)
+ funcvalue = setjmp (return_catch);
+
+ if (result == EXITPROG)
+ exit (last_command_exit_value);
+ else if (result)
+ exit (EXECUTION_FAILURE);
+ else if (funcvalue)
+ exit (return_catch_value);
+ else
+ {
+ r = execute_builtin (builtin, words, flags, 1);
+ fflush (stdout);
+ if (r == EX_USAGE)
+ r = EX_BADUSAGE;
+ exit (r);
+ }
+ }
+ else
+ {
+ r = execute_function (var, words, flags, fds_to_close, async, 1);
+ fflush (stdout);
+ exit (r);
+ }
+}
+
+/* Execute a builtin or function in the current shell context. If BUILTIN
+ is non-null, it is the builtin command to execute, otherwise VAR points
+ to the body of a function. WORDS are the command's arguments, REDIRECTS
+ are the redirections to perform. FDS_TO_CLOSE is the usual bitmap of
+ file descriptors to close.
+
+ If BUILTIN is exec_builtin, the redirections specified in REDIRECTS are
+ not undone before this function returns. */
+static int
+execute_builtin_or_function (words, builtin, var, redirects,
+ fds_to_close, flags)
+ WORD_LIST *words;
+ sh_builtin_func_t *builtin;
+ SHELL_VAR *var;
+ REDIRECT *redirects;
+ struct fd_bitmap *fds_to_close;
+ int flags;
+{
+ int result;
+ REDIRECT *saved_undo_list;
+ sh_builtin_func_t *saved_this_shell_builtin;
+
+ if (do_redirections (redirects, RX_ACTIVE|RX_UNDOABLE) != 0)
+ {
+ cleanup_redirects (redirection_undo_list);
+ redirection_undo_list = (REDIRECT *)NULL;
+ dispose_exec_redirects ();
+ return (EX_REDIRFAIL); /* was EXECUTION_FAILURE */
+ }
+
+ saved_this_shell_builtin = this_shell_builtin;
+ saved_undo_list = redirection_undo_list;
+
+ /* Calling the "exec" builtin changes redirections forever. */
+ if (builtin == exec_builtin)
+ {
+ dispose_redirects (saved_undo_list);
+ saved_undo_list = exec_redirection_undo_list;
+ exec_redirection_undo_list = (REDIRECT *)NULL;
+ }
+ else
+ dispose_exec_redirects ();
+
+ if (saved_undo_list)
+ {
+ begin_unwind_frame ("saved redirects");
+ add_unwind_protect (cleanup_redirects, (char *)saved_undo_list);
+ }
+
+ redirection_undo_list = (REDIRECT *)NULL;
+
+ if (builtin)
+ result = execute_builtin (builtin, words, flags, 0);
+ else
+ result = execute_function (var, words, flags, fds_to_close, 0, 0);
+
+ /* We do this before undoing the effects of any redirections. */
+ fflush (stdout);
+ fpurge (stdout);
+ if (ferror (stdout))
+ clearerr (stdout);
+
+ /* If we are executing the `command' builtin, but this_shell_builtin is
+ set to `exec_builtin', we know that we have something like
+ `command exec [redirection]', since otherwise `exec' would have
+ overwritten the shell and we wouldn't get here. In this case, we
+ want to behave as if the `command' builtin had not been specified
+ and preserve the redirections. */
+ if (builtin == command_builtin && this_shell_builtin == exec_builtin)
+ {
+ if (saved_undo_list)
+ dispose_redirects (saved_undo_list);
+ redirection_undo_list = exec_redirection_undo_list;
+ saved_undo_list = exec_redirection_undo_list = (REDIRECT *)NULL;
+ discard_unwind_frame ("saved_redirects");
+ }
+
+ if (saved_undo_list)
+ {
+ redirection_undo_list = saved_undo_list;
+ discard_unwind_frame ("saved redirects");
+ }
+
+ if (redirection_undo_list)
+ {
+ cleanup_redirects (redirection_undo_list);
+ redirection_undo_list = (REDIRECT *)NULL;
+ }
+
+ return (result);
+}
+
+void
+setup_async_signals ()
+{
+#if defined (__BEOS__)
+ set_signal_handler (SIGHUP, SIG_IGN); /* they want csh-like behavior */
+#endif
+
+#if defined (JOB_CONTROL)
+ if (job_control == 0)
+#endif
+ {
+ set_signal_handler (SIGINT, SIG_IGN);
+ set_signal_ignored (SIGINT);
+ set_signal_handler (SIGQUIT, SIG_IGN);
+ set_signal_ignored (SIGQUIT);
+ }
+}
+
+/* Execute a simple command that is hopefully defined in a disk file
+ somewhere.
+
+ 1) fork ()
+ 2) connect pipes
+ 3) look up the command
+ 4) do redirections
+ 5) execve ()
+ 6) If the execve failed, see if the file has executable mode set.
+ If so, and it isn't a directory, then execute its contents as
+ a shell script.
+
+ Note that the filename hashing stuff has to take place up here,
+ in the parent. This is probably why the Bourne style shells
+ don't handle it, since that would require them to go through
+ this gnarly hair, for no good reason.
+
+ NOTE: callers expect this to fork or exit(). */
+
+/* Name of a shell function to call when a command name is not found. */
+#ifndef NOTFOUND_HOOK
+# define NOTFOUND_HOOK "command_not_found_handle"
+#endif
+
+static void
+execute_disk_command (words, redirects, command_line, pipe_in, pipe_out,
+ async, fds_to_close, cmdflags)
+ WORD_LIST *words;
+ REDIRECT *redirects;
+ char *command_line;
+ int pipe_in, pipe_out, async;
+ struct fd_bitmap *fds_to_close;
+ int cmdflags;
+{
+ char *pathname, *command, **args;
+ int nofork;
+ pid_t pid;
+ SHELL_VAR *hookf;
+ WORD_LIST *wl;
+
+ nofork = (cmdflags & CMD_NO_FORK); /* Don't fork, just exec, if no pipes */
+ pathname = words->word->word;
+
+#if defined (RESTRICTED_SHELL)
+ command = (char *)NULL;
+ if (restricted && mbschr (pathname, '/'))
+ {
+ internal_error (_("%s: restricted: cannot specify `/' in command names"),
+ pathname);
+ last_command_exit_value = EXECUTION_FAILURE;
+
+ /* If we're not going to fork below, we must already be in a child
+ process or a context in which it's safe to call exit(2). */
+ if (nofork && pipe_in == NO_PIPE && pipe_out == NO_PIPE)
+ exit (last_command_exit_value);
+ else
+ goto parent_return;
+ }
+#endif /* RESTRICTED_SHELL */
+
+ command = search_for_command (pathname);
+
+ if (command)
+ {
+ maybe_make_export_env ();
+ put_command_name_into_env (command);
+ }
+
+ /* We have to make the child before we check for the non-existence
+ of COMMAND, since we want the error messages to be redirected. */
+ /* If we can get away without forking and there are no pipes to deal with,
+ don't bother to fork, just directly exec the command. */
+ if (nofork && pipe_in == NO_PIPE && pipe_out == NO_PIPE)
+ pid = 0;
+ else
+ pid = make_child (savestring (command_line), async);
+
+ if (pid == 0)
+ {
+ int old_interactive;
+
+#if 0
+ /* This has been disabled for the time being. */
+#if !defined (ARG_MAX) || ARG_MAX >= 10240
+ if (posixly_correct == 0)
+ put_gnu_argv_flags_into_env ((long)getpid (), glob_argv_flags);
+#endif
+#endif
+
+ /* Cancel traps, in trap.c. */
+ restore_original_signals ();
+
+ /* restore_original_signals may have undone the work done
+ by make_child to ensure that SIGINT and SIGQUIT are ignored
+ in asynchronous children. */
+ if (async)
+ {
+ if ((cmdflags & CMD_STDIN_REDIR) &&
+ pipe_in == NO_PIPE &&
+ (stdin_redirects (redirects) == 0))
+ async_redirect_stdin ();
+ setup_async_signals ();
+ }
+
+ /* This functionality is now provided by close-on-exec of the
+ file descriptors manipulated by redirection and piping.
+ Some file descriptors still need to be closed in all children
+ because of the way bash does pipes; fds_to_close is a
+ bitmap of all such file descriptors. */
+ if (fds_to_close)
+ close_fd_bitmap (fds_to_close);
+
+ do_piping (pipe_in, pipe_out);
+
+ old_interactive = interactive;
+ if (async)
+ interactive = 0;
+
+ subshell_environment = SUBSHELL_FORK;
+
+ if (redirects && (do_redirections (redirects, RX_ACTIVE) != 0))
+ {
+#if defined (PROCESS_SUBSTITUTION)
+ /* Try to remove named pipes that may have been created as the
+ result of redirections. */
+ unlink_fifo_list ();
+#endif /* PROCESS_SUBSTITUTION */
+ exit (EXECUTION_FAILURE);
+ }
+
+ if (async)
+ interactive = old_interactive;
+
+ if (command == 0)
+ {
+ hookf = find_function (NOTFOUND_HOOK);
+ if (hookf == 0)
+ {
+ internal_error (_("%s: command not found"), pathname);
+ exit (EX_NOTFOUND); /* Posix.2 says the exit status is 127 */
+ }
+
+ wl = make_word_list (make_word (NOTFOUND_HOOK), words);
+ exit (execute_shell_function (hookf, wl));
+ }
+
+ /* Execve expects the command name to be in args[0]. So we
+ leave it there, in the same format that the user used to
+ type it in. */
+ args = strvec_from_word_list (words, 0, 0, (int *)NULL);
+ exit (shell_execve (command, args, export_env));
+ }
+ else
+ {
+parent_return:
+ /* Make sure that the pipes are closed in the parent. */
+ close_pipes (pipe_in, pipe_out);
+#if defined (PROCESS_SUBSTITUTION) && defined (HAVE_DEV_FD)
+ if (variable_context == 0)
+ unlink_fifo_list ();
+#endif
+ FREE (command);
+ }
+}
+
+/* CPP defines to decide whether a particular index into the #! line
+ corresponds to a valid interpreter name or argument character, or
+ whitespace. The MSDOS define is to allow \r to be treated the same
+ as \n. */
+
+#if !defined (MSDOS)
+# define STRINGCHAR(ind) \
+ (ind < sample_len && !whitespace (sample[ind]) && sample[ind] != '\n')
+# define WHITECHAR(ind) \
+ (ind < sample_len && whitespace (sample[ind]))
+#else /* MSDOS */
+# define STRINGCHAR(ind) \
+ (ind < sample_len && !whitespace (sample[ind]) && sample[ind] != '\n' && sample[ind] != '\r')
+# define WHITECHAR(ind) \
+ (ind < sample_len && whitespace (sample[ind]))
+#endif /* MSDOS */
+
+static char *
+getinterp (sample, sample_len, endp)
+ char *sample;
+ int sample_len, *endp;
+{
+ register int i;
+ char *execname;
+ int start;
+
+ /* Find the name of the interpreter to exec. */
+ for (i = 2; i < sample_len && whitespace (sample[i]); i++)
+ ;
+
+ for (start = i; STRINGCHAR(i); i++)
+ ;
+
+ execname = substring (sample, start, i);
+
+ if (endp)
+ *endp = i;
+ return execname;
+}
+
+#if !defined (HAVE_HASH_BANG_EXEC)
+/* If the operating system on which we're running does not handle
+ the #! executable format, then help out. SAMPLE is the text read
+ from the file, SAMPLE_LEN characters. COMMAND is the name of
+ the script; it and ARGS, the arguments given by the user, will
+ become arguments to the specified interpreter. ENV is the environment
+ to pass to the interpreter.
+
+ The word immediately following the #! is the interpreter to execute.
+ A single argument to the interpreter is allowed. */
+
+static int
+execute_shell_script (sample, sample_len, command, args, env)
+ char *sample;
+ int sample_len;
+ char *command;
+ char **args, **env;
+{
+ char *execname, *firstarg;
+ int i, start, size_increment, larry;
+
+ /* Find the name of the interpreter to exec. */
+ execname = getinterp (sample, sample_len, &i);
+ size_increment = 1;
+
+ /* Now the argument, if any. */
+ for (firstarg = (char *)NULL, start = i; WHITECHAR(i); i++)
+ ;
+
+ /* If there is more text on the line, then it is an argument for the
+ interpreter. */
+
+ if (STRINGCHAR(i))
+ {
+ for (start = i; STRINGCHAR(i); i++)
+ ;
+ firstarg = substring ((char *)sample, start, i);
+ size_increment = 2;
+ }
+
+ larry = strvec_len (args) + size_increment;
+ args = strvec_resize (args, larry + 1);
+
+ for (i = larry - 1; i; i--)
+ args[i] = args[i - size_increment];
+
+ args[0] = execname;
+ if (firstarg)
+ {
+ args[1] = firstarg;
+ args[2] = command;
+ }
+ else
+ args[1] = command;
+
+ args[larry] = (char *)NULL;
+
+ return (shell_execve (execname, args, env));
+}
+#undef STRINGCHAR
+#undef WHITECHAR
+
+#endif /* !HAVE_HASH_BANG_EXEC */
+
+static void
+initialize_subshell ()
+{
+#if defined (ALIAS)
+ /* Forget about any aliases that we knew of. We are in a subshell. */
+ delete_all_aliases ();
+#endif /* ALIAS */
+
+#if defined (HISTORY)
+ /* Forget about the history lines we have read. This is a non-interactive
+ subshell. */
+ history_lines_this_session = 0;
+#endif
+
+#if defined (JOB_CONTROL)
+ /* Forget about the way job control was working. We are in a subshell. */
+ without_job_control ();
+ set_sigchld_handler ();
+ init_job_stats ();
+#endif /* JOB_CONTROL */
+
+ /* Reset the values of the shell flags and options. */
+ reset_shell_flags ();
+ reset_shell_options ();
+ reset_shopt_options ();
+
+ /* Zero out builtin_env, since this could be a shell script run from a
+ sourced file with a temporary environment supplied to the `source/.'
+ builtin. Such variables are not supposed to be exported (empirical
+ testing with sh and ksh). Just throw it away; don't worry about a
+ memory leak. */
+ if (vc_isbltnenv (shell_variables))
+ shell_variables = shell_variables->down;
+
+ clear_unwind_protect_list (0);
+ /* XXX -- are there other things we should be resetting here? */
+ parse_and_execute_level = 0; /* nothing left to restore it */
+
+ /* We're no longer inside a shell function. */
+ variable_context = return_catch_flag = funcnest = 0;
+
+ executing_list = 0; /* XXX */
+
+ /* If we're not interactive, close the file descriptor from which we're
+ reading the current shell script. */
+ if (interactive_shell == 0)
+ unset_bash_input (0);
+}
+
+#if defined (HAVE_SETOSTYPE) && defined (_POSIX_SOURCE)
+# define SETOSTYPE(x) __setostype(x)
+#else
+# define SETOSTYPE(x)
+#endif
+
+#define READ_SAMPLE_BUF(file, buf, len) \
+ do \
+ { \
+ fd = open(file, O_RDONLY); \
+ if (fd >= 0) \
+ { \
+ len = read (fd, buf, 80); \
+ close (fd); \
+ } \
+ else \
+ len = -1; \
+ } \
+ while (0)
+
+/* Call execve (), handling interpreting shell scripts, and handling
+ exec failures. */
+int
+shell_execve (command, args, env)
+ char *command;
+ char **args, **env;
+{
+ int larray, i, fd;
+ char sample[80];
+ int sample_len;
+
+ SETOSTYPE (0); /* Some systems use for USG/POSIX semantics */
+ execve (command, args, env);
+ i = errno; /* error from execve() */
+ CHECK_TERMSIG;
+ SETOSTYPE (1);
+
+ /* If we get to this point, then start checking out the file.
+ Maybe it is something we can hack ourselves. */
+ if (i != ENOEXEC)
+ {
+ if (file_isdir (command))
+ internal_error (_("%s: is a directory"), command);
+ else if (executable_file (command) == 0)
+ {
+ errno = i;
+ file_error (command);
+ }
+ /* errors not involving the path argument to execve. */
+ else if (i == E2BIG || i == ENOMEM)
+ {
+ errno = i;
+ file_error (command);
+ }
+ else
+ {
+ /* The file has the execute bits set, but the kernel refuses to
+ run it for some reason. See why. */
+#if defined (HAVE_HASH_BANG_EXEC)
+ READ_SAMPLE_BUF (command, sample, sample_len);
+ if (sample_len > 2 && sample[0] == '#' && sample[1] == '!')
+ {
+ char *interp;
+ int ilen;
+
+ interp = getinterp (sample, sample_len, (int *)NULL);
+ ilen = strlen (interp);
+ errno = i;
+ if (interp[ilen - 1] == '\r')
+ {
+ interp = xrealloc (interp, ilen + 2);
+ interp[ilen - 1] = '^';
+ interp[ilen] = 'M';
+ interp[ilen + 1] = '\0';
+ }
+ sys_error (_("%s: %s: bad interpreter"), command, interp ? interp : "");
+ FREE (interp);
+ return (EX_NOEXEC);
+ }
+#endif
+ errno = i;
+ file_error (command);
+ }
+ return ((i == ENOENT) ? EX_NOTFOUND : EX_NOEXEC); /* XXX Posix.2 says that exit status is 126 */
+ }
+
+ /* This file is executable.
+ If it begins with #!, then help out people with losing operating
+ systems. Otherwise, check to see if it is a binary file by seeing
+ if the contents of the first line (or up to 80 characters) are in the
+ ASCII set. If it's a text file, execute the contents as shell commands,
+ otherwise return 126 (EX_BINARY_FILE). */
+ READ_SAMPLE_BUF (command, sample, sample_len);
+
+ if (sample_len == 0)
+ return (EXECUTION_SUCCESS);
+
+ /* Is this supposed to be an executable script?
+ If so, the format of the line is "#! interpreter [argument]".
+ A single argument is allowed. The BSD kernel restricts
+ the length of the entire line to 32 characters (32 bytes
+ being the size of the BSD exec header), but we allow 80
+ characters. */
+ if (sample_len > 0)
+ {
+#if !defined (HAVE_HASH_BANG_EXEC)
+ if (sample_len > 2 && sample[0] == '#' && sample[1] == '!')
+ return (execute_shell_script (sample, sample_len, command, args, env));
+ else
+#endif
+ if (check_binary_file (sample, sample_len))
+ {
+ internal_error (_("%s: cannot execute binary file"), command);
+ return (EX_BINARY_FILE);
+ }
+ }
+
+ /* We have committed to attempting to execute the contents of this file
+ as shell commands. */
+
+ initialize_subshell ();
+
+ set_sigint_handler ();
+
+ /* Insert the name of this shell into the argument list. */
+ larray = strvec_len (args) + 1;
+ args = strvec_resize (args, larray + 1);
+
+ for (i = larray - 1; i; i--)
+ args[i] = args[i - 1];
+
+ args[0] = shell_name;
+ args[1] = command;
+ args[larray] = (char *)NULL;
+
+ if (args[0][0] == '-')
+ args[0]++;
+
+#if defined (RESTRICTED_SHELL)
+ if (restricted)
+ change_flag ('r', FLAG_OFF);
+#endif
+
+ if (subshell_argv)
+ {
+ /* Can't free subshell_argv[0]; that is shell_name. */
+ for (i = 1; i < subshell_argc; i++)
+ free (subshell_argv[i]);
+ free (subshell_argv);
+ }
+
+ dispose_command (currently_executing_command); /* XXX */
+ currently_executing_command = (COMMAND *)NULL;
+
+ subshell_argc = larray;
+ subshell_argv = args;
+ subshell_envp = env;
+
+ unbind_args (); /* remove the positional parameters */
+
+ longjmp (subshell_top_level, 1);
+ /*NOTREACHED*/
+}
+
+static int
+execute_intern_function (name, function)
+ WORD_DESC *name;
+ COMMAND *function;
+{
+ SHELL_VAR *var;
+
+ if (check_identifier (name, posixly_correct) == 0)
+ {
+ if (posixly_correct && interactive_shell == 0)
+ {
+ last_command_exit_value = EX_BADUSAGE;
+ jump_to_top_level (ERREXIT);
+ }
+ return (EXECUTION_FAILURE);
+ }
+
+ var = find_function (name->word);
+ if (var && (readonly_p (var) || noassign_p (var)))
+ {
+ if (readonly_p (var))
+ internal_error (_("%s: readonly function"), var->name);
+ return (EXECUTION_FAILURE);
+ }
+
+ bind_function (name->word, function);
+ return (EXECUTION_SUCCESS);
+}
+
+#if defined (INCLUDE_UNUSED)
+#if defined (PROCESS_SUBSTITUTION)
+void
+close_all_files ()
+{
+ register int i, fd_table_size;
+
+ fd_table_size = getdtablesize ();
+ if (fd_table_size > 256) /* clamp to a reasonable value */
+ fd_table_size = 256;
+
+ for (i = 3; i < fd_table_size; i++)
+ close (i);
+}
+#endif /* PROCESS_SUBSTITUTION */
+#endif
+
+static void
+close_pipes (in, out)
+ int in, out;
+{
+ if (in >= 0)
+ close (in);
+ if (out >= 0)
+ close (out);
+}
+
+static void
+dup_error (oldd, newd)
+ int oldd, newd;
+{
+ sys_error (_("cannot duplicate fd %d to fd %d"), oldd, newd);
+}
+
+/* Redirect input and output to be from and to the specified pipes.
+ NO_PIPE and REDIRECT_BOTH are handled correctly. */
+static void
+do_piping (pipe_in, pipe_out)
+ int pipe_in, pipe_out;
+{
+ if (pipe_in != NO_PIPE)
+ {
+ if (dup2 (pipe_in, 0) < 0)
+ dup_error (pipe_in, 0);
+ if (pipe_in > 0)
+ close (pipe_in);
+ }
+ if (pipe_out != NO_PIPE)
+ {
+ if (pipe_out != REDIRECT_BOTH)
+ {
+ if (dup2 (pipe_out, 1) < 0)
+ dup_error (pipe_out, 1);
+ if (pipe_out == 0 || pipe_out > 1)
+ close (pipe_out);
+ }
+ else
+ {
+ if (dup2 (1, 2) < 0)
+ dup_error (1, 2);
+ }
+ }
+}
diff --git a/execute_cmd.h b/execute_cmd.h
new file mode 100644
index 0000000..67ae93a
--- /dev/null
+++ b/execute_cmd.h
@@ -0,0 +1,68 @@
+/* execute_cmd.h - functions from execute_cmd.c. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_EXECUTE_CMD_H_)
+#define _EXECUTE_CMD_H_
+
+#include "stdc.h"
+
+extern struct fd_bitmap *new_fd_bitmap __P((int));
+extern void dispose_fd_bitmap __P((struct fd_bitmap *));
+extern void close_fd_bitmap __P((struct fd_bitmap *));
+extern int executing_line_number __P((void));
+extern int execute_command __P((COMMAND *));
+extern int execute_command_internal __P((COMMAND *, int, int, int, struct fd_bitmap *));
+extern int shell_execve __P((char *, char **, char **));
+extern void setup_async_signals __P((void));
+extern void dispose_exec_redirects __P ((void));
+
+extern int execute_shell_function __P((SHELL_VAR *, WORD_LIST *));
+
+extern struct coproc *getcoprocbypid __P((pid_t));
+extern struct coproc *getcoprocbyname __P((const char *));
+
+extern void coproc_init __P((struct coproc *));
+extern struct coproc *coproc_alloc __P((char *, pid_t));
+extern void coproc_dispose __P((struct coproc *));
+extern void coproc_flush __P((void));
+extern void coproc_close __P((struct coproc *));
+extern void coproc_closeall __P((void));
+extern void coproc_reap __P((void));
+
+extern void coproc_rclose __P((struct coproc *, int));
+extern void coproc_wclose __P((struct coproc *, int));
+extern void coproc_fdclose __P((struct coproc *, int));
+
+extern void coproc_checkfd __P((struct coproc *, int));
+extern void coproc_fdchk __P((int));
+
+extern void coproc_pidchk __P((pid_t, int));
+
+extern void coproc_fdsave __P((struct coproc *));
+extern void coproc_fdrestore __P((struct coproc *));
+
+extern void coproc_setvars __P((struct coproc *));
+extern void coproc_unsetvars __P((struct coproc *));
+
+#if defined (PROCESS_SUBSTITUTION)
+extern void close_all_files __P((void));
+#endif
+
+#endif /* _EXECUTE_CMD_H_ */
diff --git a/expr.c b/expr.c
new file mode 100644
index 0000000..446e678
--- /dev/null
+++ b/expr.c
@@ -0,0 +1,1353 @@
+/* expr.c -- arithmetic expression evaluation. */
+
+/* Copyright (C) 1990-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ All arithmetic is done as intmax_t integers with no checking for overflow
+ (though division by 0 is caught and flagged as an error).
+
+ The following operators are handled, grouped into a set of levels in
+ order of decreasing precedence.
+
+ "id++", "id--" [post-increment and post-decrement]
+ "++id", "--id" [pre-increment and pre-decrement]
+ "-", "+" [(unary operators)]
+ "!", "~"
+ "**" [(exponentiation)]
+ "*", "/", "%"
+ "+", "-"
+ "<<", ">>"
+ "<=", ">=", "<", ">"
+ "==", "!="
+ "&"
+ "^"
+ "|"
+ "&&"
+ "||"
+ "expr ? expr : expr"
+ "=", "*=", "/=", "%=", "+=", "-=", "<<=", ">>=", "&=", "^=", "|="
+ , [comma]
+
+ (Note that most of these operators have special meaning to bash, and an
+ entire expression should be quoted, e.g. "a=$a+1" or "a=a+1" to ensure
+ that it is passed intact to the evaluator when using `let'. When using
+ the $[] or $(( )) forms, the text between the `[' and `]' or `((' and `))'
+ is treated as if in double quotes.)
+
+ Sub-expressions within parentheses have a precedence level greater than
+ all of the above levels and are evaluated first. Within a single prece-
+ dence group, evaluation is left-to-right, except for the arithmetic
+ assignment operator (`='), which is evaluated right-to-left (as in C).
+
+ The expression evaluator returns the value of the expression (assignment
+ statements have as a value what is returned by the RHS). The `let'
+ builtin, on the other hand, returns 0 if the last expression evaluates to
+ a non-zero, and 1 otherwise.
+
+ Implementation is a recursive-descent parser.
+
+ Chet Ramey
+ chet@ins.CWRU.Edu
+*/
+
+#include "config.h"
+
+#include <stdio.h>
+#include "bashansi.h"
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "chartypes.h"
+#include "bashintl.h"
+
+#include "shell.h"
+
+/* Because of the $((...)) construct, expressions may include newlines.
+ Here is a macro which accepts newlines, tabs and spaces as whitespace. */
+#define cr_whitespace(c) (whitespace(c) || ((c) == '\n'))
+
+/* Size be which the expression stack grows when neccessary. */
+#define EXPR_STACK_GROW_SIZE 10
+
+/* Maximum amount of recursion allowed. This prevents a non-integer
+ variable such as "num=num+2" from infinitely adding to itself when
+ "let num=num+2" is given. */
+#define MAX_EXPR_RECURSION_LEVEL 1024
+
+/* The Tokens. Singing "The Lion Sleeps Tonight". */
+
+#define EQEQ 1 /* "==" */
+#define NEQ 2 /* "!=" */
+#define LEQ 3 /* "<=" */
+#define GEQ 4 /* ">=" */
+#define STR 5 /* string */
+#define NUM 6 /* number */
+#define LAND 7 /* "&&" Logical AND */
+#define LOR 8 /* "||" Logical OR */
+#define LSH 9 /* "<<" Left SHift */
+#define RSH 10 /* ">>" Right SHift */
+#define OP_ASSIGN 11 /* op= expassign as in Posix.2 */
+#define COND 12 /* exp1 ? exp2 : exp3 */
+#define POWER 13 /* exp1**exp2 */
+#define PREINC 14 /* ++var */
+#define PREDEC 15 /* --var */
+#define POSTINC 16 /* var++ */
+#define POSTDEC 17 /* var-- */
+#define EQ '='
+#define GT '>'
+#define LT '<'
+#define PLUS '+'
+#define MINUS '-'
+#define MUL '*'
+#define DIV '/'
+#define MOD '%'
+#define NOT '!'
+#define LPAR '('
+#define RPAR ')'
+#define BAND '&' /* Bitwise AND */
+#define BOR '|' /* Bitwise OR. */
+#define BXOR '^' /* Bitwise eXclusive OR. */
+#define BNOT '~' /* Bitwise NOT; Two's complement. */
+#define QUES '?'
+#define COL ':'
+#define COMMA ','
+
+/* This should be the function corresponding to the operator with the
+ highest precedence. */
+#define EXP_HIGHEST expcomma
+
+static char *expression; /* The current expression */
+static char *tp; /* token lexical position */
+static char *lasttp; /* pointer to last token position */
+static int curtok; /* the current token */
+static int lasttok; /* the previous token */
+static int assigntok; /* the OP in OP= */
+static char *tokstr; /* current token string */
+static intmax_t tokval; /* current token value */
+static int noeval; /* set to 1 if no assignment to be done */
+static procenv_t evalbuf;
+
+static int _is_arithop __P((int));
+static void readtok __P((void)); /* lexical analyzer */
+
+static intmax_t expr_streval __P((char *, int));
+static intmax_t strlong __P((char *));
+static void evalerror __P((const char *));
+
+static void pushexp __P((void));
+static void popexp __P((void));
+static void expr_unwind __P((void));
+static void expr_bind_variable __P((char *, char *));
+
+static intmax_t subexpr __P((char *));
+
+static intmax_t expcomma __P((void));
+static intmax_t expassign __P((void));
+static intmax_t expcond __P((void));
+static intmax_t explor __P((void));
+static intmax_t expland __P((void));
+static intmax_t expbor __P((void));
+static intmax_t expbxor __P((void));
+static intmax_t expband __P((void));
+static intmax_t exp5 __P((void));
+static intmax_t exp4 __P((void));
+static intmax_t expshift __P((void));
+static intmax_t exp3 __P((void));
+static intmax_t exp2 __P((void));
+static intmax_t exppower __P((void));
+static intmax_t exp1 __P((void));
+static intmax_t exp0 __P((void));
+
+/* A structure defining a single expression context. */
+typedef struct {
+ int curtok, lasttok;
+ char *expression, *tp, *lasttp;
+ intmax_t tokval;
+ char *tokstr;
+ int noeval;
+} EXPR_CONTEXT;
+
+#ifdef INCLUDE_UNUSED
+/* Not used yet. */
+typedef struct {
+ char *tokstr;
+ intmax_t tokval;
+} LVALUE;
+#endif
+
+/* Global var which contains the stack of expression contexts. */
+static EXPR_CONTEXT **expr_stack;
+static int expr_depth; /* Location in the stack. */
+static int expr_stack_size; /* Number of slots already allocated. */
+
+extern char *this_command_name;
+extern int unbound_vars_is_error, last_command_exit_value;
+
+#if defined (ARRAY_VARS)
+extern const char * const bash_badsub_errmsg;
+#endif
+
+#define SAVETOK(X) \
+ do { \
+ (X)->curtok = curtok; \
+ (X)->lasttok = lasttok; \
+ (X)->tp = tp; \
+ (X)->lasttp = lasttp; \
+ (X)->tokval = tokval; \
+ (X)->tokstr = tokstr; \
+ (X)->noeval = noeval; \
+ } while (0)
+
+#define RESTORETOK(X) \
+ do { \
+ curtok = (X)->curtok; \
+ lasttok = (X)->lasttok; \
+ tp = (X)->tp; \
+ lasttp = (X)->lasttp; \
+ tokval = (X)->tokval; \
+ tokstr = (X)->tokstr; \
+ noeval = (X)->noeval; \
+ } while (0)
+
+/* Push and save away the contents of the globals describing the
+ current expression context. */
+static void
+pushexp ()
+{
+ EXPR_CONTEXT *context;
+
+ if (expr_depth >= MAX_EXPR_RECURSION_LEVEL)
+ evalerror (_("expression recursion level exceeded"));
+
+ if (expr_depth >= expr_stack_size)
+ {
+ expr_stack_size += EXPR_STACK_GROW_SIZE;
+ expr_stack = (EXPR_CONTEXT **)xrealloc (expr_stack, expr_stack_size * sizeof (EXPR_CONTEXT *));
+ }
+
+ context = (EXPR_CONTEXT *)xmalloc (sizeof (EXPR_CONTEXT));
+
+ context->expression = expression;
+ SAVETOK(context);
+
+ expr_stack[expr_depth++] = context;
+}
+
+/* Pop the the contents of the expression context stack into the
+ globals describing the current expression context. */
+static void
+popexp ()
+{
+ EXPR_CONTEXT *context;
+
+ if (expr_depth == 0)
+ evalerror (_("recursion stack underflow"));
+
+ context = expr_stack[--expr_depth];
+
+ expression = context->expression;
+ RESTORETOK (context);
+
+ free (context);
+}
+
+static void
+expr_unwind ()
+{
+ while (--expr_depth > 0)
+ {
+ if (expr_stack[expr_depth]->tokstr)
+ free (expr_stack[expr_depth]->tokstr);
+
+ if (expr_stack[expr_depth]->expression)
+ free (expr_stack[expr_depth]->expression);
+
+ free (expr_stack[expr_depth]);
+ }
+ free (expr_stack[expr_depth]); /* free the allocated EXPR_CONTEXT */
+
+ noeval = 0; /* XXX */
+}
+
+static void
+expr_bind_variable (lhs, rhs)
+ char *lhs, *rhs;
+{
+ (void)bind_int_variable (lhs, rhs);
+ stupidly_hack_special_variables (lhs);
+}
+
+/* Evaluate EXPR, and return the arithmetic result. If VALIDP is
+ non-null, a zero is stored into the location to which it points
+ if the expression is invalid, non-zero otherwise. If a non-zero
+ value is returned in *VALIDP, the return value of evalexp() may
+ be used.
+
+ The `while' loop after the longjmp is caught relies on the above
+ implementation of pushexp and popexp leaving in expr_stack[0] the
+ values that the variables had when the program started. That is,
+ the first things saved are the initial values of the variables that
+ were assigned at program startup or by the compiler. Therefore, it is
+ safe to let the loop terminate when expr_depth == 0, without freeing up
+ any of the expr_depth[0] stuff. */
+intmax_t
+evalexp (expr, validp)
+ char *expr;
+ int *validp;
+{
+ intmax_t val;
+ int c;
+ procenv_t oevalbuf;
+
+ val = 0;
+ noeval = 0;
+
+ FASTCOPY (evalbuf, oevalbuf, sizeof (evalbuf));
+
+ c = setjmp (evalbuf);
+
+ if (c)
+ {
+ FREE (tokstr);
+ FREE (expression);
+ tokstr = expression = (char *)NULL;
+
+ expr_unwind ();
+
+ if (validp)
+ *validp = 0;
+ return (0);
+ }
+
+ val = subexpr (expr);
+
+ if (validp)
+ *validp = 1;
+
+ FASTCOPY (oevalbuf, evalbuf, sizeof (evalbuf));
+
+ return (val);
+}
+
+static intmax_t
+subexpr (expr)
+ char *expr;
+{
+ intmax_t val;
+ char *p;
+
+ for (p = expr; p && *p && cr_whitespace (*p); p++)
+ ;
+
+ if (p == NULL || *p == '\0')
+ return (0);
+
+ pushexp ();
+ curtok = lasttok = 0;
+ expression = savestring (expr);
+ tp = expression;
+
+ tokstr = (char *)NULL;
+ tokval = 0;
+
+ readtok ();
+
+ val = EXP_HIGHEST ();
+
+ if (curtok != 0)
+ evalerror (_("syntax error in expression"));
+
+ FREE (tokstr);
+ FREE (expression);
+
+ popexp ();
+
+ return val;
+}
+
+static intmax_t
+expcomma ()
+{
+ register intmax_t value;
+
+ value = expassign ();
+ while (curtok == COMMA)
+ {
+ readtok ();
+ value = expassign ();
+ }
+
+ return value;
+}
+
+static intmax_t
+expassign ()
+{
+ register intmax_t value;
+ char *lhs, *rhs;
+
+ value = expcond ();
+ if (curtok == EQ || curtok == OP_ASSIGN)
+ {
+ int special, op;
+ intmax_t lvalue;
+
+ special = curtok == OP_ASSIGN;
+
+ if (lasttok != STR)
+ evalerror (_("attempted assignment to non-variable"));
+
+ if (special)
+ {
+ op = assigntok; /* a OP= b */
+ lvalue = value;
+ }
+
+ lhs = savestring (tokstr);
+ readtok ();
+ value = expassign ();
+
+ if (special)
+ {
+ switch (op)
+ {
+ case MUL:
+ lvalue *= value;
+ break;
+ case DIV:
+ if (value == 0)
+ evalerror (_("division by 0"));
+ lvalue /= value;
+ break;
+ case MOD:
+ if (value == 0)
+ evalerror (_("division by 0"));
+ lvalue %= value;
+ break;
+ case PLUS:
+ lvalue += value;
+ break;
+ case MINUS:
+ lvalue -= value;
+ break;
+ case LSH:
+ lvalue <<= value;
+ break;
+ case RSH:
+ lvalue >>= value;
+ break;
+ case BAND:
+ lvalue &= value;
+ break;
+ case BOR:
+ lvalue |= value;
+ break;
+ case BXOR:
+ lvalue ^= value;
+ break;
+ default:
+ free (lhs);
+ evalerror (_("bug: bad expassign token"));
+ break;
+ }
+ value = lvalue;
+ }
+
+ rhs = itos (value);
+ if (noeval == 0)
+ expr_bind_variable (lhs, rhs);
+ free (rhs);
+ free (lhs);
+ FREE (tokstr);
+ tokstr = (char *)NULL; /* For freeing on errors. */
+ }
+ return (value);
+}
+
+/* Conditional expression (expr?expr:expr) */
+static intmax_t
+expcond ()
+{
+ intmax_t cval, val1, val2, rval;
+ int set_noeval;
+
+ set_noeval = 0;
+ rval = cval = explor ();
+ if (curtok == QUES) /* found conditional expr */
+ {
+ readtok ();
+ if (curtok == 0 || curtok == COL)
+ evalerror (_("expression expected"));
+ if (cval == 0)
+ {
+ set_noeval = 1;
+ noeval++;
+ }
+
+ val1 = EXP_HIGHEST ();
+
+ if (set_noeval)
+ noeval--;
+ if (curtok != COL)
+ evalerror (_("`:' expected for conditional expression"));
+ readtok ();
+ if (curtok == 0)
+ evalerror (_("expression expected"));
+ set_noeval = 0;
+ if (cval)
+ {
+ set_noeval = 1;
+ noeval++;
+ }
+
+ val2 = expcond ();
+ if (set_noeval)
+ noeval--;
+ rval = cval ? val1 : val2;
+ lasttok = COND;
+ }
+ return rval;
+}
+
+/* Logical OR. */
+static intmax_t
+explor ()
+{
+ register intmax_t val1, val2;
+ int set_noeval;
+
+ val1 = expland ();
+
+ while (curtok == LOR)
+ {
+ set_noeval = 0;
+ if (val1 != 0)
+ {
+ noeval++;
+ set_noeval = 1;
+ }
+ readtok ();
+ val2 = expland ();
+ if (set_noeval)
+ noeval--;
+ val1 = val1 || val2;
+ lasttok = LOR;
+ }
+
+ return (val1);
+}
+
+/* Logical AND. */
+static intmax_t
+expland ()
+{
+ register intmax_t val1, val2;
+ int set_noeval;
+
+ val1 = expbor ();
+
+ while (curtok == LAND)
+ {
+ set_noeval = 0;
+ if (val1 == 0)
+ {
+ set_noeval = 1;
+ noeval++;
+ }
+ readtok ();
+ val2 = expbor ();
+ if (set_noeval)
+ noeval--;
+ val1 = val1 && val2;
+ lasttok = LAND;
+ }
+
+ return (val1);
+}
+
+/* Bitwise OR. */
+static intmax_t
+expbor ()
+{
+ register intmax_t val1, val2;
+
+ val1 = expbxor ();
+
+ while (curtok == BOR)
+ {
+ readtok ();
+ val2 = expbxor ();
+ val1 = val1 | val2;
+ }
+
+ return (val1);
+}
+
+/* Bitwise XOR. */
+static intmax_t
+expbxor ()
+{
+ register intmax_t val1, val2;
+
+ val1 = expband ();
+
+ while (curtok == BXOR)
+ {
+ readtok ();
+ val2 = expband ();
+ val1 = val1 ^ val2;
+ }
+
+ return (val1);
+}
+
+/* Bitwise AND. */
+static intmax_t
+expband ()
+{
+ register intmax_t val1, val2;
+
+ val1 = exp5 ();
+
+ while (curtok == BAND)
+ {
+ readtok ();
+ val2 = exp5 ();
+ val1 = val1 & val2;
+ }
+
+ return (val1);
+}
+
+static intmax_t
+exp5 ()
+{
+ register intmax_t val1, val2;
+
+ val1 = exp4 ();
+
+ while ((curtok == EQEQ) || (curtok == NEQ))
+ {
+ int op = curtok;
+
+ readtok ();
+ val2 = exp4 ();
+ if (op == EQEQ)
+ val1 = (val1 == val2);
+ else if (op == NEQ)
+ val1 = (val1 != val2);
+ }
+ return (val1);
+}
+
+static intmax_t
+exp4 ()
+{
+ register intmax_t val1, val2;
+
+ val1 = expshift ();
+ while ((curtok == LEQ) ||
+ (curtok == GEQ) ||
+ (curtok == LT) ||
+ (curtok == GT))
+ {
+ int op = curtok;
+
+ readtok ();
+ val2 = expshift ();
+
+ if (op == LEQ)
+ val1 = val1 <= val2;
+ else if (op == GEQ)
+ val1 = val1 >= val2;
+ else if (op == LT)
+ val1 = val1 < val2;
+ else /* (op == GT) */
+ val1 = val1 > val2;
+ }
+ return (val1);
+}
+
+/* Left and right shifts. */
+static intmax_t
+expshift ()
+{
+ register intmax_t val1, val2;
+
+ val1 = exp3 ();
+
+ while ((curtok == LSH) || (curtok == RSH))
+ {
+ int op = curtok;
+
+ readtok ();
+ val2 = exp3 ();
+
+ if (op == LSH)
+ val1 = val1 << val2;
+ else
+ val1 = val1 >> val2;
+ }
+
+ return (val1);
+}
+
+static intmax_t
+exp3 ()
+{
+ register intmax_t val1, val2;
+
+ val1 = exp2 ();
+
+ while ((curtok == PLUS) || (curtok == MINUS))
+ {
+ int op = curtok;
+
+ readtok ();
+ val2 = exp2 ();
+
+ if (op == PLUS)
+ val1 += val2;
+ else if (op == MINUS)
+ val1 -= val2;
+ }
+ return (val1);
+}
+
+static intmax_t
+exp2 ()
+{
+ register intmax_t val1, val2;
+
+ val1 = exppower ();
+
+ while ((curtok == MUL) ||
+ (curtok == DIV) ||
+ (curtok == MOD))
+ {
+ int op = curtok;
+
+ readtok ();
+
+ val2 = exppower ();
+
+ if (((op == DIV) || (op == MOD)) && (val2 == 0))
+ evalerror (_("division by 0"));
+
+ if (op == MUL)
+ val1 *= val2;
+ else if (op == DIV)
+ val1 /= val2;
+ else if (op == MOD)
+ val1 %= val2;
+ }
+ return (val1);
+}
+
+static intmax_t
+exppower ()
+{
+ register intmax_t val1, val2, c;
+
+ val1 = exp1 ();
+ while (curtok == POWER)
+ {
+ readtok ();
+ val2 = exppower (); /* exponentiation is right-associative */
+ if (val2 == 0)
+ return (1);
+ if (val2 < 0)
+ evalerror (_("exponent less than 0"));
+ for (c = 1; val2--; c *= val1)
+ ;
+ val1 = c;
+ }
+ return (val1);
+}
+
+static intmax_t
+exp1 ()
+{
+ register intmax_t val;
+
+ if (curtok == NOT)
+ {
+ readtok ();
+ val = !exp1 ();
+ }
+ else if (curtok == BNOT)
+ {
+ readtok ();
+ val = ~exp1 ();
+ }
+ else
+ val = exp0 ();
+
+ return (val);
+}
+
+static intmax_t
+exp0 ()
+{
+ register intmax_t val = 0, v2;
+ char *vincdec;
+ int stok;
+ EXPR_CONTEXT ec;
+
+ /* XXX - might need additional logic here to decide whether or not
+ pre-increment or pre-decrement is legal at this point. */
+ if (curtok == PREINC || curtok == PREDEC)
+ {
+ stok = lasttok = curtok;
+ readtok ();
+ if (curtok != STR)
+ /* readtok() catches this */
+ evalerror (_("identifier expected after pre-increment or pre-decrement"));
+
+ v2 = tokval + ((stok == PREINC) ? 1 : -1);
+ vincdec = itos (v2);
+ if (noeval == 0)
+ expr_bind_variable (tokstr, vincdec);
+ free (vincdec);
+ val = v2;
+
+ curtok = NUM; /* make sure --x=7 is flagged as an error */
+ readtok ();
+ }
+ else if (curtok == MINUS)
+ {
+ readtok ();
+ val = - exp0 ();
+ }
+ else if (curtok == PLUS)
+ {
+ readtok ();
+ val = exp0 ();
+ }
+ else if (curtok == LPAR)
+ {
+ readtok ();
+ val = EXP_HIGHEST ();
+
+ if (curtok != RPAR) /* ( */
+ evalerror (_("missing `)'"));
+
+ /* Skip over closing paren. */
+ readtok ();
+ }
+ else if ((curtok == NUM) || (curtok == STR))
+ {
+ val = tokval;
+ if (curtok == STR)
+ {
+ SAVETOK (&ec);
+ tokstr = (char *)NULL; /* keep it from being freed */
+ noeval = 1;
+ readtok ();
+ stok = curtok;
+
+ /* post-increment or post-decrement */
+ if (stok == POSTINC || stok == POSTDEC)
+ {
+ /* restore certain portions of EC */
+ tokstr = ec.tokstr;
+ noeval = ec.noeval;
+ lasttok = STR; /* ec.curtok */
+
+ v2 = val + ((stok == POSTINC) ? 1 : -1);
+ vincdec = itos (v2);
+ if (noeval == 0)
+ expr_bind_variable (tokstr, vincdec);
+ free (vincdec);
+ curtok = NUM; /* make sure x++=7 is flagged as an error */
+ }
+ else
+ {
+ if (stok == STR) /* free new tokstr before old one is restored */
+ FREE (tokstr);
+ RESTORETOK (&ec);
+ }
+
+ }
+
+ readtok ();
+ }
+ else
+ evalerror (_("syntax error: operand expected"));
+
+ return (val);
+}
+
+static intmax_t
+expr_streval (tok, e)
+ char *tok;
+ int e;
+{
+ SHELL_VAR *v;
+ char *value;
+ intmax_t tval;
+
+ /* [[[[[ */
+#if defined (ARRAY_VARS)
+ v = (e == ']') ? array_variable_part (tok, (char **)0, (int *)0) : find_variable (tok);
+#else
+ v = find_variable (tok);
+#endif
+
+ if ((v == 0 || invisible_p (v)) && unbound_vars_is_error)
+ {
+#if defined (ARRAY_VARS)
+ value = (e == ']') ? array_variable_name (tok, (char **)0, (int *)0) : tok;
+#else
+ value = tok;
+#endif
+
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (value);
+
+#if defined (ARRAY_VARS)
+ if (e == ']')
+ FREE (value); /* array_variable_name returns new memory */
+#endif
+
+ if (interactive_shell)
+ {
+ expr_unwind ();
+ top_level_cleanup ();
+ jump_to_top_level (DISCARD);
+ }
+ else
+ jump_to_top_level (FORCE_EOF);
+ }
+
+#if defined (ARRAY_VARS)
+ /* Second argument of 0 to get_array_value means that we don't allow
+ references like array[@]. In this case, get_array_value is just
+ like get_variable_value in that it does not return newly-allocated
+ memory or quote the results. */
+ value = (e == ']') ? get_array_value (tok, 0, (int *)NULL) : get_variable_value (v);
+#else
+ value = get_variable_value (v);
+#endif
+
+ tval = (value && *value) ? subexpr (value) : 0;
+
+ return (tval);
+}
+
+static int
+_is_multiop (c)
+ int c;
+{
+ switch (c)
+ {
+ case EQEQ:
+ case NEQ:
+ case LEQ:
+ case GEQ:
+ case LAND:
+ case LOR:
+ case LSH:
+ case RSH:
+ case OP_ASSIGN:
+ case COND:
+ case POWER:
+ case PREINC:
+ case PREDEC:
+ case POSTINC:
+ case POSTDEC:
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+static int
+_is_arithop (c)
+ int c;
+{
+ switch (c)
+ {
+ case EQ:
+ case GT:
+ case LT:
+ case PLUS:
+ case MINUS:
+ case MUL:
+ case DIV:
+ case MOD:
+ case NOT:
+ case LPAR:
+ case RPAR:
+ case BAND:
+ case BOR:
+ case BXOR:
+ case BNOT:
+ return 1; /* operator tokens */
+ case QUES:
+ case COL:
+ case COMMA:
+ return 1; /* questionable */
+ default:
+ return 0; /* anything else is invalid */
+ }
+}
+
+/* Lexical analyzer/token reader for the expression evaluator. Reads the
+ next token and puts its value into curtok, while advancing past it.
+ Updates value of tp. May also set tokval (for number) or tokstr (for
+ string). */
+static void
+readtok ()
+{
+ register char *cp, *xp;
+ register unsigned char c, c1;
+ register int e;
+
+ /* Skip leading whitespace. */
+ cp = tp;
+ c = e = 0;
+ while (cp && (c = *cp) && (cr_whitespace (c)))
+ cp++;
+
+ if (c)
+ cp++;
+
+ if (c == '\0')
+ {
+ lasttok = curtok;
+ curtok = 0;
+ tp = cp;
+ return;
+ }
+ lasttp = tp = cp - 1;
+
+ if (legal_variable_starter (c))
+ {
+ /* variable names not preceded with a dollar sign are shell variables. */
+ char *savecp;
+ EXPR_CONTEXT ec;
+ int peektok;
+
+ while (legal_variable_char (c))
+ c = *cp++;
+
+ c = *--cp;
+
+#if defined (ARRAY_VARS)
+ if (c == '[')
+ {
+ e = skipsubscript (cp, 0, 0);
+ if (cp[e] == ']')
+ {
+ cp += e + 1;
+ c = *cp;
+ e = ']';
+ }
+ else
+ evalerror (bash_badsub_errmsg);
+ }
+#endif /* ARRAY_VARS */
+
+ *cp = '\0';
+ FREE (tokstr);
+ tokstr = savestring (tp);
+ *cp = c;
+
+ SAVETOK (&ec);
+ tokstr = (char *)NULL; /* keep it from being freed */
+ tp = savecp = cp;
+ noeval = 1;
+ curtok = STR;
+ readtok ();
+ peektok = curtok;
+ if (peektok == STR) /* free new tokstr before old one is restored */
+ FREE (tokstr);
+ RESTORETOK (&ec);
+ cp = savecp;
+
+ /* The tests for PREINC and PREDEC aren't strictly correct, but they
+ preserve old behavior if a construct like --x=9 is given. */
+ if (lasttok == PREINC || lasttok == PREDEC || peektok != EQ)
+ tokval = expr_streval (tokstr, e);
+ else
+ tokval = 0;
+
+ lasttok = curtok;
+ curtok = STR;
+ }
+ else if (DIGIT(c))
+ {
+ while (ISALNUM (c) || c == '#' || c == '@' || c == '_')
+ c = *cp++;
+
+ c = *--cp;
+ *cp = '\0';
+
+ tokval = strlong (tp);
+ *cp = c;
+ lasttok = curtok;
+ curtok = NUM;
+ }
+ else
+ {
+ c1 = *cp++;
+ if ((c == EQ) && (c1 == EQ))
+ c = EQEQ;
+ else if ((c == NOT) && (c1 == EQ))
+ c = NEQ;
+ else if ((c == GT) && (c1 == EQ))
+ c = GEQ;
+ else if ((c == LT) && (c1 == EQ))
+ c = LEQ;
+ else if ((c == LT) && (c1 == LT))
+ {
+ if (*cp == '=') /* a <<= b */
+ {
+ assigntok = LSH;
+ c = OP_ASSIGN;
+ cp++;
+ }
+ else
+ c = LSH;
+ }
+ else if ((c == GT) && (c1 == GT))
+ {
+ if (*cp == '=')
+ {
+ assigntok = RSH; /* a >>= b */
+ c = OP_ASSIGN;
+ cp++;
+ }
+ else
+ c = RSH;
+ }
+ else if ((c == BAND) && (c1 == BAND))
+ c = LAND;
+ else if ((c == BOR) && (c1 == BOR))
+ c = LOR;
+ else if ((c == '*') && (c1 == '*'))
+ c = POWER;
+ else if ((c == '-' || c == '+') && c1 == c && curtok == STR)
+ c = (c == '-') ? POSTDEC : POSTINC;
+ else if ((c == '-' || c == '+') && c1 == c)
+ {
+ /* Quickly scan forward to see if this is followed by optional
+ whitespace and an identifier. */
+ xp = cp;
+ while (xp && *xp && cr_whitespace (*xp))
+ xp++;
+ if (legal_variable_starter ((unsigned char)*xp))
+ c = (c == '-') ? PREDEC : PREINC;
+ else
+ cp--; /* not preinc or predec, so unget the character */
+ }
+ else if (c1 == EQ && member (c, "*/%+-&^|"))
+ {
+ assigntok = c; /* a OP= b */
+ c = OP_ASSIGN;
+ }
+ else if (_is_arithop (c) == 0)
+ {
+ cp--;
+ /* use curtok, since it hasn't been copied to lasttok yet */
+ if (curtok == 0 || _is_arithop (curtok) || _is_multiop (curtok))
+ evalerror (_("syntax error: operand expected"));
+ else
+ evalerror (_("syntax error: invalid arithmetic operator"));
+ }
+ else
+ cp--; /* `unget' the character */
+
+ /* Should check here to make sure that the current character is one
+ of the recognized operators and flag an error if not. Could create
+ a character map the first time through and check it on subsequent
+ calls. */
+ lasttok = curtok;
+ curtok = c;
+ }
+ tp = cp;
+}
+
+static void
+evalerror (msg)
+ const char *msg;
+{
+ char *name, *t;
+
+ name = this_command_name;
+ for (t = expression; whitespace (*t); t++)
+ ;
+ internal_error (_("%s%s%s: %s (error token is \"%s\")"),
+ name ? name : "", name ? ": " : "", t,
+ msg, (lasttp && *lasttp) ? lasttp : "");
+ longjmp (evalbuf, 1);
+}
+
+/* Convert a string to an intmax_t integer, with an arbitrary base.
+ 0nnn -> base 8
+ 0[Xx]nn -> base 16
+ Anything else: [base#]number (this is implemented to match ksh93)
+
+ Base may be >=2 and <=64. If base is <= 36, the numbers are drawn
+ from [0-9][a-zA-Z], and lowercase and uppercase letters may be used
+ interchangably. If base is > 36 and <= 64, the numbers are drawn
+ from [0-9][a-z][A-Z]_@ (a = 10, z = 35, A = 36, Z = 61, @ = 62, _ = 63 --
+ you get the picture). */
+
+static intmax_t
+strlong (num)
+ char *num;
+{
+ register char *s;
+ register unsigned char c;
+ int base, foundbase;
+ intmax_t val;
+
+ s = num;
+
+ base = 10;
+ foundbase = 0;
+ if (*s == '0')
+ {
+ s++;
+
+ if (*s == '\0')
+ return 0;
+
+ /* Base 16? */
+ if (*s == 'x' || *s == 'X')
+ {
+ base = 16;
+ s++;
+ }
+ else
+ base = 8;
+ foundbase++;
+ }
+
+ val = 0;
+ for (c = *s++; c; c = *s++)
+ {
+ if (c == '#')
+ {
+ if (foundbase)
+ evalerror (_("invalid number"));
+
+ /* Illegal base specifications raise an evaluation error. */
+ if (val < 2 || val > 64)
+ evalerror (_("invalid arithmetic base"));
+
+ base = val;
+ val = 0;
+ foundbase++;
+ }
+ else if (ISALNUM(c) || (c == '_') || (c == '@'))
+ {
+ if (DIGIT(c))
+ c = TODIGIT(c);
+ else if (c >= 'a' && c <= 'z')
+ c -= 'a' - 10;
+ else if (c >= 'A' && c <= 'Z')
+ c -= 'A' - ((base <= 36) ? 10 : 36);
+ else if (c == '@')
+ c = 62;
+ else if (c == '_')
+ c = 63;
+
+ if (c >= base)
+ evalerror (_("value too great for base"));
+
+ val = (val * base) + c;
+ }
+ else
+ break;
+ }
+
+ return (val);
+}
+
+#if defined (EXPR_TEST)
+void *
+xmalloc (n)
+ int n;
+{
+ return (malloc (n));
+}
+
+void *
+xrealloc (s, n)
+ char *s;
+ int n;
+{
+ return (realloc (s, n));
+}
+
+SHELL_VAR *find_variable () { return 0;}
+SHELL_VAR *bind_variable () { return 0; }
+
+char *get_string_value () { return 0; }
+
+procenv_t top_level;
+
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ register int i;
+ intmax_t v;
+ int expok;
+
+ if (setjmp (top_level))
+ exit (0);
+
+ for (i = 1; i < argc; i++)
+ {
+ v = evalexp (argv[i], &expok);
+ if (expok == 0)
+ fprintf (stderr, _("%s: expression error\n"), argv[i]);
+ else
+ printf ("'%s' -> %ld\n", argv[i], v);
+ }
+ exit (0);
+}
+
+int
+builtin_error (format, arg1, arg2, arg3, arg4, arg5)
+ char *format;
+{
+ fprintf (stderr, "expr: ");
+ fprintf (stderr, format, arg1, arg2, arg3, arg4, arg5);
+ fprintf (stderr, "\n");
+ return 0;
+}
+
+char *
+itos (n)
+ intmax_t n;
+{
+ return ("42");
+}
+
+#endif /* EXPR_TEST */
diff --git a/externs.h b/externs.h
new file mode 100644
index 0000000..c8aa862
--- /dev/null
+++ b/externs.h
@@ -0,0 +1,475 @@
+/* externs.h -- extern function declarations which do not appear in their
+ own header file. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Make sure that this is included *after* config.h! */
+
+#if !defined (_EXTERNS_H_)
+# define _EXTERNS_H_
+
+#include "stdc.h"
+
+/* Functions from expr.c. */
+extern intmax_t evalexp __P((char *, int *));
+
+/* Functions from print_cmd.c. */
+#define FUNC_MULTILINE 0x01
+#define FUNC_EXTERNAL 0x02
+
+extern char *make_command_string __P((COMMAND *));
+extern char *named_function_string __P((char *, COMMAND *, int));
+
+extern void print_command __P((COMMAND *));
+extern void print_simple_command __P((SIMPLE_COM *));
+extern void print_word_list __P((WORD_LIST *, char *));
+
+/* debugger support */
+extern void print_for_command_head __P((FOR_COM *));
+#if defined (SELECT_COMMAND)
+extern void print_select_command_head __P((SELECT_COM *));
+#endif
+extern void print_case_command_head __P((CASE_COM *));
+#if defined (DPAREN_ARITHMETIC)
+extern void print_arith_command __P((WORD_LIST *));
+#endif
+#if defined (COND_COMMAND)
+extern void print_cond_command __P((COND_COM *));
+#endif
+
+/* set -x support */
+extern void xtrace_init __P((void));
+#ifdef NEED_XTRACE_SET_DECL
+extern void xtrace_set __P((int, FILE *));
+#endif
+extern void xtrace_fdchk __P((int));
+extern void xtrace_reset __P((void));
+extern char *indirection_level_string __P((void));
+extern void xtrace_print_assignment __P((char *, char *, int, int));
+extern void xtrace_print_word_list __P((WORD_LIST *, int));
+extern void xtrace_print_for_command_head __P((FOR_COM *));
+#if defined (SELECT_COMMAND)
+extern void xtrace_print_select_command_head __P((SELECT_COM *));
+#endif
+extern void xtrace_print_case_command_head __P((CASE_COM *));
+#if defined (DPAREN_ARITHMETIC)
+extern void xtrace_print_arith_cmd __P((WORD_LIST *));
+#endif
+#if defined (COND_COMMAND)
+extern void xtrace_print_cond_term __P((int, int, WORD_DESC *, char *, char *));
+#endif
+
+/* Functions from shell.c. */
+extern void exit_shell __P((int)) __attribute__((__noreturn__));
+extern void sh_exit __P((int)) __attribute__((__noreturn__));
+extern void disable_priv_mode __P((void));
+extern void unbind_args __P((void));
+
+#if defined (RESTRICTED_SHELL)
+extern int shell_is_restricted __P((char *));
+extern int maybe_make_restricted __P((char *));
+#endif
+
+extern void unset_bash_input __P((int));
+extern void get_current_user_info __P((void));
+
+/* Functions from eval.c. */
+extern int reader_loop __P((void));
+extern int parse_command __P((void));
+extern int read_command __P((void));
+
+/* Functions from braces.c. */
+#if defined (BRACE_EXPANSION)
+extern char **brace_expand __P((char *));
+#endif
+
+/* Miscellaneous functions from parse.y */
+extern int yyparse __P((void));
+extern int return_EOF __P((void));
+extern char *xparse_dolparen __P((char *, char *, int *, int));
+extern void reset_parser __P((void));
+extern WORD_LIST *parse_string_to_word_list __P((char *, int, const char *));
+
+extern void free_pushed_string_input __P((void));
+
+extern char *decode_prompt_string __P((char *));
+
+extern int get_current_prompt_level __P((void));
+extern void set_current_prompt_level __P((int));
+
+#if defined (HISTORY)
+extern char *history_delimiting_chars __P((void));
+#endif
+
+/* Declarations for functions defined in locale.c */
+extern void set_default_locale __P((void));
+extern void set_default_locale_vars __P((void));
+extern int set_locale_var __P((char *, char *));
+extern int set_lang __P((char *, char *));
+extern void set_default_lang __P((void));
+extern char *get_locale_var __P((char *));
+extern char *localetrans __P((char *, int, int *));
+extern char *mk_msgstr __P((char *, int *));
+extern char *localeexpand __P((char *, int, int, int, int *));
+
+/* Declarations for functions defined in list.c. */
+extern void list_walk __P((GENERIC_LIST *, sh_glist_func_t *));
+extern void wlist_walk __P((WORD_LIST *, sh_icpfunc_t *));
+extern GENERIC_LIST *list_reverse ();
+extern int list_length ();
+extern GENERIC_LIST *list_append ();
+extern GENERIC_LIST *list_remove ();
+
+/* Declarations for functions defined in stringlib.c */
+extern int find_string_in_alist __P((char *, STRING_INT_ALIST *, int));
+extern char *find_token_in_alist __P((int, STRING_INT_ALIST *, int));
+extern int find_index_in_alist __P((char *, STRING_INT_ALIST *, int));
+
+extern char *substring __P((const char *, int, int));
+extern char *strsub __P((char *, char *, char *, int));
+extern char *strcreplace __P((char *, int, char *, int));
+extern void strip_leading __P((char *));
+extern void strip_trailing __P((char *, int, int));
+extern void xbcopy __P((char *, char *, int));
+
+/* Functions from version.c. */
+extern char *shell_version_string __P((void));
+extern void show_shell_version __P((int));
+
+/* Functions from the bash library, lib/sh/libsh.a. These should really
+ go into a separate include file. */
+
+/* declarations for functions defined in lib/sh/casemod.c */
+extern char *sh_modcase __P((const char *, char *, int));
+
+/* Defines for flags argument to sh_modcase. These need to agree with what's
+ in lib/sh/casemode.c */
+#define CASE_LOWER 0x0001
+#define CASE_UPPER 0x0002
+#define CASE_CAPITALIZE 0x0004
+#define CASE_UNCAP 0x0008
+#define CASE_TOGGLE 0x0010
+#define CASE_TOGGLEALL 0x0020
+#define CASE_UPFIRST 0x0040
+#define CASE_LOWFIRST 0x0080
+
+#define CASE_USEWORDS 0x1000
+
+/* declarations for functions defined in lib/sh/clktck.c */
+extern long get_clk_tck __P((void));
+
+/* declarations for functions defined in lib/sh/clock.c */
+extern void clock_t_to_secs ();
+extern void print_clock_t ();
+
+/* Declarations for functions defined in lib/sh/fdprintf.c */
+extern void fdprintf __P((int, const char *, ...)) __attribute__((__format__ (printf, 2, 3)));
+
+/* Declarations for functions defined in lib/sh/fmtulong.c */
+#define FL_PREFIX 0x01 /* add 0x, 0X, or 0 prefix as appropriate */
+#define FL_ADDBASE 0x02 /* add base# prefix to converted value */
+#define FL_HEXUPPER 0x04 /* use uppercase when converting to hex */
+#define FL_UNSIGNED 0x08 /* don't add any sign */
+
+extern char *fmtulong __P((unsigned long int, int, char *, size_t, int));
+
+/* Declarations for functions defined in lib/sh/fmtulong.c */
+#if defined (HAVE_LONG_LONG)
+extern char *fmtullong __P((unsigned long long int, int, char *, size_t, int));
+#endif
+
+/* Declarations for functions defined in lib/sh/fmtumax.c */
+extern char *fmtumax __P((uintmax_t, int, char *, size_t, int));
+
+/* Declarations for functions defined in lib/sh/fnxform.c */
+extern char *fnx_fromfs __P((char *, size_t));
+extern char *fnx_tofs __P((char *, size_t));
+
+/* Declarations for functions defined in lib/sh/fpurge.c */
+
+#if defined NEED_FPURGE_DECL
+#if !HAVE_DECL_FPURGE
+
+#if HAVE_FPURGE
+# define fpurge _bash_fpurge
+#endif
+extern int fpurge __P((FILE *stream));
+
+#endif /* HAVE_DECL_FPURGE */
+#endif /* NEED_FPURGE_DECL */
+
+/* Declarations for functions defined in lib/sh/getcwd.c */
+#if !defined (HAVE_GETCWD)
+extern char *getcwd __P((char *, size_t));
+#endif
+
+/* Declarations for functions defined in lib/sh/input_avail.c */
+extern int input_avail __P((int));
+
+/* Declarations for functions defined in lib/sh/itos.c */
+extern char *inttostr __P((intmax_t, char *, size_t));
+extern char *itos __P((intmax_t));
+extern char *uinttostr __P((uintmax_t, char *, size_t));
+extern char *uitos __P((uintmax_t));
+
+/* declarations for functions defined in lib/sh/makepath.c */
+#define MP_DOTILDE 0x01
+#define MP_DOCWD 0x02
+#define MP_RMDOT 0x04
+#define MP_IGNDOT 0x08
+
+extern char *sh_makepath __P((const char *, const char *, int));
+
+/* declarations for functions defined in lib/sh/mbscasecmp.c */
+#if !defined (HAVE_MBSCASECMP)
+extern char *mbscasecmp __P((const char *, const char *));
+#endif
+
+/* declarations for functions defined in lib/sh/mbschr.c */
+#if !defined (HAVE_MBSCHR)
+extern char *mbschr __P((const char *, int));
+#endif
+
+/* declarations for functions defined in lib/sh/mbscmp.c */
+#if !defined (HAVE_MBSCMP)
+extern char *mbscmp __P((const char *, const char *));
+#endif
+
+/* declarations for functions defined in lib/sh/netconn.c */
+extern int isnetconn __P((int));
+
+/* declarations for functions defined in lib/sh/netopen.c */
+extern int netopen __P((char *));
+
+/* Declarations for functions defined in lib/sh/oslib.c */
+
+#if !defined (HAVE_DUP2) || defined (DUP2_BROKEN)
+extern int dup2 __P((int, int));
+#endif
+
+#if !defined (HAVE_GETDTABLESIZE)
+extern int getdtablesize __P((void));
+#endif /* !HAVE_GETDTABLESIZE */
+
+#if !defined (HAVE_GETHOSTNAME)
+extern int gethostname __P((char *, int));
+#endif /* !HAVE_GETHOSTNAME */
+
+extern int getmaxgroups __P((void));
+extern long getmaxchild __P((void));
+
+/* declarations for functions defined in lib/sh/pathcanon.c */
+#define PATH_CHECKDOTDOT 0x0001
+#define PATH_CHECKEXISTS 0x0002
+#define PATH_HARDPATH 0x0004
+#define PATH_NOALLOC 0x0008
+
+extern char *sh_canonpath __P((char *, int));
+
+/* declarations for functions defined in lib/sh/pathphys.c */
+extern char *sh_physpath __P((char *, int));
+extern char *sh_realpath __P((const char *, char *));
+
+/* declarations for functions defined in lib/sh/setlinebuf.c */
+#ifdef NEED_SH_SETLINEBUF_DECL
+extern int sh_setlinebuf __P((FILE *));
+#endif
+
+/* declarations for functions defined in lib/sh/shaccess.c */
+extern int sh_eaccess __P((char *, int));
+
+/* declarations for functions defined in lib/sh/shmatch.c */
+extern int sh_regmatch __P((const char *, const char *, int));
+
+/* defines for flags argument to sh_regmatch. */
+#define SHMAT_SUBEXP 0x001 /* save subexpressions in SH_REMATCH */
+#define SHMAT_PWARN 0x002 /* print a warning message on invalid regexp */
+
+/* declarations for functions defined in lib/sh/shquote.c */
+extern char *sh_single_quote __P((char *));
+extern char *sh_double_quote __P((char *));
+extern char *sh_mkdoublequoted __P((const char *, int, int));
+extern char *sh_un_double_quote __P((char *));
+extern char *sh_backslash_quote __P((char *));
+extern char *sh_backslash_quote_for_double_quotes __P((char *));
+extern int sh_contains_shell_metas __P((char *));
+
+/* declarations for functions defined in lib/sh/spell.c */
+extern int spname __P((char *, char *));
+extern char *dirspell __P((char *));
+
+/* declarations for functions defined in lib/sh/strcasecmp.c */
+#if !defined (HAVE_STRCASECMP)
+extern int strncasecmp __P((const char *, const char *, int));
+extern int strcasecmp __P((const char *, const char *));
+#endif /* HAVE_STRCASECMP */
+
+/* declarations for functions defined in lib/sh/strcasestr.c */
+#if ! HAVE_STRCASESTR
+extern char *strcasestr __P((const char *, const char *));
+#endif
+
+/* declarations for functions defined in lib/sh/strerror.c */
+#if !defined (HAVE_STRERROR) && !defined (strerror)
+extern char *strerror __P((int));
+#endif
+
+/* declarations for functions defined in lib/sh/strftime.c */
+#if !defined (HAVE_STRFTIME) && defined (NEED_STRFTIME_DECL)
+extern size_t strftime __P((char *, size_t, const char *, const struct tm *));
+#endif
+
+/* declarations for functions and structures defined in lib/sh/stringlist.c */
+
+/* This is a general-purpose argv-style array struct. */
+typedef struct _list_of_strings {
+ char **list;
+ int list_size;
+ int list_len;
+} STRINGLIST;
+
+typedef int sh_strlist_map_func_t __P((char *));
+
+extern STRINGLIST *strlist_create __P((int));
+extern STRINGLIST *strlist_resize __P((STRINGLIST *, int));
+extern void strlist_flush __P((STRINGLIST *));
+extern void strlist_dispose __P((STRINGLIST *));
+extern int strlist_remove __P((STRINGLIST *, char *));
+extern STRINGLIST *strlist_copy __P((STRINGLIST *));
+extern STRINGLIST *strlist_merge __P((STRINGLIST *, STRINGLIST *));
+extern STRINGLIST *strlist_append __P((STRINGLIST *, STRINGLIST *));
+extern STRINGLIST *strlist_prefix_suffix __P((STRINGLIST *, char *, char *));
+extern void strlist_print __P((STRINGLIST *, char *));
+extern void strlist_walk __P((STRINGLIST *, sh_strlist_map_func_t *));
+extern void strlist_sort __P((STRINGLIST *));
+
+/* declarations for functions defined in lib/sh/stringvec.c */
+
+extern char **strvec_create __P((int));
+extern char **strvec_resize __P((char **, int));
+extern void strvec_flush __P((char **));
+extern void strvec_dispose __P((char **));
+extern int strvec_remove __P((char **, char *));
+extern int strvec_len __P((char **));
+extern int strvec_search __P((char **, char *));
+extern char **strvec_copy __P((char **));
+extern int strvec_strcmp __P((char **, char **));
+extern void strvec_sort __P((char **));
+
+extern char **strvec_from_word_list __P((WORD_LIST *, int, int, int *));
+extern WORD_LIST *strvec_to_word_list __P((char **, int, int));
+
+/* declarations for functions defined in lib/sh/strnlen.c */
+#if !defined (HAVE_STRNLEN)
+extern size_t strnlen __P((const char *, size_t));
+#endif
+
+/* declarations for functions defined in lib/sh/strpbrk.c */
+#if !defined (HAVE_STRPBRK)
+extern char *strpbrk __P((const char *, const char *));
+#endif
+
+/* declarations for functions defined in lib/sh/strtod.c */
+#if !defined (HAVE_STRTOD)
+extern double strtod __P((const char *, char **));
+#endif
+
+/* declarations for functions defined in lib/sh/strtol.c */
+#if !HAVE_DECL_STRTOL
+extern long strtol __P((const char *, char **, int));
+#endif
+
+/* declarations for functions defined in lib/sh/strtoll.c */
+#if defined (HAVE_LONG_LONG) && !HAVE_DECL_STRTOLL
+extern long long strtoll __P((const char *, char **, int));
+#endif
+
+/* declarations for functions defined in lib/sh/strtoul.c */
+#if !HAVE_DECL_STRTOUL
+extern unsigned long strtoul __P((const char *, char **, int));
+#endif
+
+/* declarations for functions defined in lib/sh/strtoull.c */
+#if defined (HAVE_LONG_LONG) && !HAVE_DECL_STRTOULL
+extern unsigned long long strtoull __P((const char *, char **, int));
+#endif
+
+/* declarations for functions defined in lib/sh/strimax.c */
+#if !HAVE_DECL_STRTOIMAX
+extern intmax_t strtoimax __P((const char *, char **, int));
+#endif
+
+/* declarations for functions defined in lib/sh/strumax.c */
+#if !HAVE_DECL_STRTOUMAX
+extern uintmax_t strtoumax __P((const char *, char **, int));
+#endif
+
+/* declarations for functions defined in lib/sh/strtrans.c */
+extern char *ansicstr __P((char *, int, int, int *, int *));
+extern char *ansic_quote __P((char *, int, int *));
+extern int ansic_shouldquote __P((const char *));
+extern char *ansiexpand __P((char *, int, int, int *));
+
+/* declarations for functions defined in lib/sh/timeval.c. No prototypes
+ so we don't have to count on having a definition of struct timeval in
+ scope when this file is included. */
+extern void timeval_to_secs ();
+extern void print_timeval ();
+
+/* declarations for functions defined in lib/sh/tmpfile.c */
+#define MT_USETMPDIR 0x0001
+#define MT_READWRITE 0x0002
+#define MT_USERANDOM 0x0004
+
+extern char *sh_mktmpname __P((char *, int));
+extern int sh_mktmpfd __P((char *, int, char **));
+/* extern FILE *sh_mktmpfp __P((char *, int, char **)); */
+
+/* declarations for functions defined in lib/sh/uconvert.c */
+extern int uconvert __P((char *, long *, long *));
+
+/* declarations for functions defined in lib/sh/ufuncs.c */
+extern unsigned int falarm __P((unsigned int, unsigned int));
+extern unsigned int fsleep __P((unsigned int, unsigned int));
+
+/* declarations for functions defined in lib/sh/winsize.c */
+extern void get_new_window_size __P((int, int *, int *));
+
+/* declarations for functions defined in lib/sh/zcatfd.c */
+extern int zcatfd __P((int, int, char *));
+
+/* declarations for functions defined in lib/sh/zgetline.c */
+extern ssize_t zgetline __P((int, char **, size_t *, int));
+
+/* declarations for functions defined in lib/sh/zmapfd.c */
+extern int zmapfd __P((int, char **, char *));
+
+/* declarations for functions defined in lib/sh/zread.c */
+extern ssize_t zread __P((int, char *, size_t));
+extern ssize_t zreadretry __P((int, char *, size_t));
+extern ssize_t zreadintr __P((int, char *, size_t));
+extern ssize_t zreadc __P((int, char *));
+extern ssize_t zreadcintr __P((int, char *));
+extern void zreset __P((void));
+extern void zsyncfd __P((int));
+
+/* declarations for functions defined in lib/sh/zwrite.c */
+extern int zwrite __P((int, char *, size_t));
+
+#endif /* _EXTERNS_H_ */
diff --git a/findcmd.c b/findcmd.c
new file mode 100644
index 0000000..557f8b5
--- /dev/null
+++ b/findcmd.c
@@ -0,0 +1,608 @@
+/* findcmd.c -- Functions to search for commands by name. */
+
+/* Copyright (C) 1997-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include <stdio.h>
+#include "chartypes.h"
+#include "bashtypes.h"
+#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+#include "filecntl.h"
+#include "posixstat.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+
+#include "memalloc.h"
+#include "shell.h"
+#include "flags.h"
+#include "hashlib.h"
+#include "pathexp.h"
+#include "hashcmd.h"
+#include "findcmd.h" /* matching prototypes and declarations */
+
+extern int posixly_correct;
+
+/* Static functions defined and used in this file. */
+static char *_find_user_command_internal __P((const char *, int));
+static char *find_user_command_internal __P((const char *, int));
+static char *find_user_command_in_path __P((const char *, char *, int));
+static char *find_in_path_element __P((const char *, char *, int, int, struct stat *));
+static char *find_absolute_program __P((const char *, int));
+
+static char *get_next_path_element __P((char *, int *));
+
+/* The file name which we would try to execute, except that it isn't
+ possible to execute it. This is the first file that matches the
+ name that we are looking for while we are searching $PATH for a
+ suitable one to execute. If we cannot find a suitable executable
+ file, then we use this one. */
+static char *file_to_lose_on;
+
+/* Non-zero if we should stat every command found in the hash table to
+ make sure it still exists. */
+int check_hashed_filenames;
+
+/* DOT_FOUND_IN_SEARCH becomes non-zero when find_user_command ()
+ encounters a `.' as the directory pathname while scanning the
+ list of possible pathnames; i.e., if `.' comes before the directory
+ containing the file of interest. */
+int dot_found_in_search = 0;
+
+/* Return some flags based on information about this file.
+ The EXISTS bit is non-zero if the file is found.
+ The EXECABLE bit is non-zero the file is executble.
+ Zero is returned if the file is not found. */
+int
+file_status (name)
+ const char *name;
+{
+ struct stat finfo;
+ int r;
+
+ /* Determine whether this file exists or not. */
+ if (stat (name, &finfo) < 0)
+ return (0);
+
+ /* If the file is a directory, then it is not "executable" in the
+ sense of the shell. */
+ if (S_ISDIR (finfo.st_mode))
+ return (FS_EXISTS|FS_DIRECTORY);
+
+ r = FS_EXISTS;
+
+#if defined (HAVE_EACCESS)
+ /* Use eaccess(2) if we have it to take things like ACLs and other
+ file access mechanisms into account. eaccess uses the effective
+ user and group IDs, not the real ones. We could use sh_eaccess,
+ but we don't want any special treatment for /dev/fd. */
+ if (eaccess (name, X_OK) == 0)
+ r |= FS_EXECABLE;
+ if (eaccess (name, R_OK) == 0)
+ r |= FS_READABLE;
+
+ return r;
+#elif defined (AFS)
+ /* We have to use access(2) to determine access because AFS does not
+ support Unix file system semantics. This may produce wrong
+ answers for non-AFS files when ruid != euid. I hate AFS. */
+ if (access (name, X_OK) == 0)
+ r |= FS_EXECABLE;
+ if (access (name, R_OK) == 0)
+ r |= FS_READABLE;
+
+ return r;
+#else /* !HAVE_EACCESS && !AFS */
+
+ /* Find out if the file is actually executable. By definition, the
+ only other criteria is that the file has an execute bit set that
+ we can use. The same with whether or not a file is readable. */
+
+ /* Root only requires execute permission for any of owner, group or
+ others to be able to exec a file, and can read any file. */
+ if (current_user.euid == (uid_t)0)
+ {
+ r |= FS_READABLE;
+ if (finfo.st_mode & S_IXUGO)
+ r |= FS_EXECABLE;
+ return r;
+ }
+
+ /* If we are the owner of the file, the owner bits apply. */
+ if (current_user.euid == finfo.st_uid)
+ {
+ if (finfo.st_mode & S_IXUSR)
+ r |= FS_EXECABLE;
+ if (finfo.st_mode & S_IRUSR)
+ r |= FS_READABLE;
+ }
+
+ /* If we are in the owning group, the group permissions apply. */
+ else if (group_member (finfo.st_gid))
+ {
+ if (finfo.st_mode & S_IXGRP)
+ r |= FS_EXECABLE;
+ if (finfo.st_mode & S_IRGRP)
+ r |= FS_READABLE;
+ }
+
+ /* Else we check whether `others' have permission to execute the file */
+ else
+ {
+ if (finfo.st_mode & S_IXOTH)
+ r |= FS_EXECABLE;
+ if (finfo.st_mode & S_IROTH)
+ r |= FS_READABLE;
+ }
+
+ return r;
+#endif /* !AFS */
+}
+
+/* Return non-zero if FILE exists and is executable.
+ Note that this function is the definition of what an
+ executable file is; do not change this unless YOU know
+ what an executable file is. */
+int
+executable_file (file)
+ const char *file;
+{
+ int s;
+
+ s = file_status (file);
+ return ((s & FS_EXECABLE) && ((s & FS_DIRECTORY) == 0));
+}
+
+int
+is_directory (file)
+ const char *file;
+{
+ return (file_status (file) & FS_DIRECTORY);
+}
+
+int
+executable_or_directory (file)
+ const char *file;
+{
+ int s;
+
+ s = file_status (file);
+ return ((s & FS_EXECABLE) || (s & FS_DIRECTORY));
+}
+
+/* Locate the executable file referenced by NAME, searching along
+ the contents of the shell PATH variable. Return a new string
+ which is the full pathname to the file, or NULL if the file
+ couldn't be found. If a file is found that isn't executable,
+ and that is the only match, then return that. */
+char *
+find_user_command (name)
+ const char *name;
+{
+ return (find_user_command_internal (name, FS_EXEC_PREFERRED|FS_NODIRS));
+}
+
+/* Locate the file referenced by NAME, searching along the contents
+ of the shell PATH variable. Return a new string which is the full
+ pathname to the file, or NULL if the file couldn't be found. This
+ returns the first readable file found; designed to be used to look
+ for shell scripts or files to source. */
+char *
+find_path_file (name)
+ const char *name;
+{
+ return (find_user_command_internal (name, FS_READABLE));
+}
+
+static char *
+_find_user_command_internal (name, flags)
+ const char *name;
+ int flags;
+{
+ char *path_list, *cmd;
+ SHELL_VAR *var;
+
+ /* Search for the value of PATH in both the temporary environments and
+ in the regular list of variables. */
+ if (var = find_variable_internal ("PATH", 1)) /* XXX could be array? */
+ path_list = value_cell (var);
+ else
+ path_list = (char *)NULL;
+
+ if (path_list == 0 || *path_list == '\0')
+ return (savestring (name));
+
+ cmd = find_user_command_in_path (name, path_list, flags);
+
+ return (cmd);
+}
+
+static char *
+find_user_command_internal (name, flags)
+ const char *name;
+ int flags;
+{
+#ifdef __WIN32__
+ char *res, *dotexe;
+
+ dotexe = (char *)xmalloc (strlen (name) + 5);
+ strcpy (dotexe, name);
+ strcat (dotexe, ".exe");
+ res = _find_user_command_internal (dotexe, flags);
+ free (dotexe);
+ if (res == 0)
+ res = _find_user_command_internal (name, flags);
+ return res;
+#else
+ return (_find_user_command_internal (name, flags));
+#endif
+}
+
+/* Return the next element from PATH_LIST, a colon separated list of
+ paths. PATH_INDEX_POINTER is the address of an index into PATH_LIST;
+ the index is modified by this function.
+ Return the next element of PATH_LIST or NULL if there are no more. */
+static char *
+get_next_path_element (path_list, path_index_pointer)
+ char *path_list;
+ int *path_index_pointer;
+{
+ char *path;
+
+ path = extract_colon_unit (path_list, path_index_pointer);
+
+ if (path == 0)
+ return (path);
+
+ if (*path == '\0')
+ {
+ free (path);
+ path = savestring (".");
+ }
+
+ return (path);
+}
+
+/* Look for PATHNAME in $PATH. Returns either the hashed command
+ corresponding to PATHNAME or the first instance of PATHNAME found
+ in $PATH. Returns a newly-allocated string. */
+char *
+search_for_command (pathname)
+ const char *pathname;
+{
+ char *hashed_file, *command;
+ int temp_path, st;
+ SHELL_VAR *path;
+
+ hashed_file = command = (char *)NULL;
+
+ /* If PATH is in the temporary environment for this command, don't use the
+ hash table to search for the full pathname. */
+ path = find_variable_internal ("PATH", 1);
+ temp_path = path && tempvar_p (path);
+ if (temp_path == 0 && path)
+ path = (SHELL_VAR *)NULL;
+
+ /* Don't waste time trying to find hashed data for a pathname
+ that is already completely specified or if we're using a command-
+ specific value for PATH. */
+ if (path == 0 && absolute_program (pathname) == 0)
+ hashed_file = phash_search (pathname);
+
+ /* If a command found in the hash table no longer exists, we need to
+ look for it in $PATH. Thank you Posix.2. This forces us to stat
+ every command found in the hash table. */
+
+ if (hashed_file && (posixly_correct || check_hashed_filenames))
+ {
+ st = file_status (hashed_file);
+ if ((st & (FS_EXISTS|FS_EXECABLE)) != (FS_EXISTS|FS_EXECABLE))
+ {
+ phash_remove (pathname);
+ free (hashed_file);
+ hashed_file = (char *)NULL;
+ }
+ }
+
+ if (hashed_file)
+ command = hashed_file;
+ else if (absolute_program (pathname))
+ /* A command containing a slash is not looked up in PATH or saved in
+ the hash table. */
+ command = savestring (pathname);
+ else
+ {
+ /* If $PATH is in the temporary environment, we've already retrieved
+ it, so don't bother trying again. */
+ if (temp_path)
+ {
+ command = find_user_command_in_path (pathname, value_cell (path),
+ FS_EXEC_PREFERRED|FS_NODIRS);
+ }
+ else
+ command = find_user_command (pathname);
+ if (command && hashing_enabled && temp_path == 0)
+ phash_insert ((char *)pathname, command, dot_found_in_search, 1); /* XXX fix const later */
+ }
+ return (command);
+}
+
+char *
+user_command_matches (name, flags, state)
+ const char *name;
+ int flags, state;
+{
+ register int i;
+ int path_index, name_len;
+ char *path_list, *path_element, *match;
+ struct stat dotinfo;
+ static char **match_list = NULL;
+ static int match_list_size = 0;
+ static int match_index = 0;
+
+ if (state == 0)
+ {
+ /* Create the list of matches. */
+ if (match_list == 0)
+ {
+ match_list_size = 5;
+ match_list = strvec_create (match_list_size);
+ }
+
+ /* Clear out the old match list. */
+ for (i = 0; i < match_list_size; i++)
+ match_list[i] = 0;
+
+ /* We haven't found any files yet. */
+ match_index = 0;
+
+ if (absolute_program (name))
+ {
+ match_list[0] = find_absolute_program (name, flags);
+ match_list[1] = (char *)NULL;
+ path_list = (char *)NULL;
+ }
+ else
+ {
+ name_len = strlen (name);
+ file_to_lose_on = (char *)NULL;
+ dot_found_in_search = 0;
+ stat (".", &dotinfo);
+ path_list = get_string_value ("PATH");
+ path_index = 0;
+ }
+
+ while (path_list && path_list[path_index])
+ {
+ path_element = get_next_path_element (path_list, &path_index);
+
+ if (path_element == 0)
+ break;
+
+ match = find_in_path_element (name, path_element, flags, name_len, &dotinfo);
+
+ free (path_element);
+
+ if (match == 0)
+ continue;
+
+ if (match_index + 1 == match_list_size)
+ {
+ match_list_size += 10;
+ match_list = strvec_resize (match_list, (match_list_size + 1));
+ }
+
+ match_list[match_index++] = match;
+ match_list[match_index] = (char *)NULL;
+ FREE (file_to_lose_on);
+ file_to_lose_on = (char *)NULL;
+ }
+
+ /* We haven't returned any strings yet. */
+ match_index = 0;
+ }
+
+ match = match_list[match_index];
+
+ if (match)
+ match_index++;
+
+ return (match);
+}
+
+static char *
+find_absolute_program (name, flags)
+ const char *name;
+ int flags;
+{
+ int st;
+
+ st = file_status (name);
+
+ /* If the file doesn't exist, quit now. */
+ if ((st & FS_EXISTS) == 0)
+ return ((char *)NULL);
+
+ /* If we only care about whether the file exists or not, return
+ this filename. Otherwise, maybe we care about whether this
+ file is executable. If it is, and that is what we want, return it. */
+ if ((flags & FS_EXISTS) || ((flags & FS_EXEC_ONLY) && (st & FS_EXECABLE)))
+ return (savestring (name));
+
+ return (NULL);
+}
+
+static char *
+find_in_path_element (name, path, flags, name_len, dotinfop)
+ const char *name;
+ char *path;
+ int flags, name_len;
+ struct stat *dotinfop;
+{
+ int status;
+ char *full_path, *xpath;
+
+ xpath = (*path == '~') ? bash_tilde_expand (path, 0) : path;
+
+ /* Remember the location of "." in the path, in all its forms
+ (as long as they begin with a `.', e.g. `./.') */
+ if (dot_found_in_search == 0 && *xpath == '.')
+ dot_found_in_search = same_file (".", xpath, dotinfop, (struct stat *)NULL);
+
+ full_path = sh_makepath (xpath, name, 0);
+
+ status = file_status (full_path);
+
+ if (xpath != path)
+ free (xpath);
+
+ if ((status & FS_EXISTS) == 0)
+ {
+ free (full_path);
+ return ((char *)NULL);
+ }
+
+ /* The file exists. If the caller simply wants the first file, here it is. */
+ if (flags & FS_EXISTS)
+ return (full_path);
+
+ /* If we have a readable file, and the caller wants a readable file, this
+ is it. */
+ if ((flags & FS_READABLE) && (status & FS_READABLE))
+ return (full_path);
+
+ /* If the file is executable, then it satisfies the cases of
+ EXEC_ONLY and EXEC_PREFERRED. Return this file unconditionally. */
+ if ((status & FS_EXECABLE) && (flags & (FS_EXEC_ONLY|FS_EXEC_PREFERRED)) &&
+ (((flags & FS_NODIRS) == 0) || ((status & FS_DIRECTORY) == 0)))
+ {
+ FREE (file_to_lose_on);
+ file_to_lose_on = (char *)NULL;
+ return (full_path);
+ }
+
+ /* The file is not executable, but it does exist. If we prefer
+ an executable, then remember this one if it is the first one
+ we have found. */
+ if ((flags & FS_EXEC_PREFERRED) && file_to_lose_on == 0)
+ file_to_lose_on = savestring (full_path);
+
+ /* If we want only executable files, or we don't want directories and
+ this file is a directory, or we want a readable file and this file
+ isn't readable, fail. */
+ if ((flags & (FS_EXEC_ONLY|FS_EXEC_PREFERRED)) ||
+ ((flags & FS_NODIRS) && (status & FS_DIRECTORY)) ||
+ ((flags & FS_READABLE) && (status & FS_READABLE) == 0))
+ {
+ free (full_path);
+ return ((char *)NULL);
+ }
+ else
+ return (full_path);
+}
+
+/* This does the dirty work for find_user_command_internal () and
+ user_command_matches ().
+ NAME is the name of the file to search for.
+ PATH_LIST is a colon separated list of directories to search.
+ FLAGS contains bit fields which control the files which are eligible.
+ Some values are:
+ FS_EXEC_ONLY: The file must be an executable to be found.
+ FS_EXEC_PREFERRED: If we can't find an executable, then the
+ the first file matching NAME will do.
+ FS_EXISTS: The first file found will do.
+ FS_NODIRS: Don't find any directories.
+*/
+static char *
+find_user_command_in_path (name, path_list, flags)
+ const char *name;
+ char *path_list;
+ int flags;
+{
+ char *full_path, *path;
+ int path_index, name_len;
+ struct stat dotinfo;
+
+ /* We haven't started looking, so we certainly haven't seen
+ a `.' as the directory path yet. */
+ dot_found_in_search = 0;
+
+ if (absolute_program (name))
+ {
+ full_path = find_absolute_program (name, flags);
+ return (full_path);
+ }
+
+ if (path_list == 0 || *path_list == '\0')
+ return (savestring (name)); /* XXX */
+
+ file_to_lose_on = (char *)NULL;
+ name_len = strlen (name);
+ stat (".", &dotinfo);
+ path_index = 0;
+
+ while (path_list[path_index])
+ {
+ /* Allow the user to interrupt out of a lengthy path search. */
+ QUIT;
+
+ path = get_next_path_element (path_list, &path_index);
+ if (path == 0)
+ break;
+
+ /* Side effects: sets dot_found_in_search, possibly sets
+ file_to_lose_on. */
+ full_path = find_in_path_element (name, path, flags, name_len, &dotinfo);
+ free (path);
+
+ /* This should really be in find_in_path_element, but there isn't the
+ right combination of flags. */
+ if (full_path && is_directory (full_path))
+ {
+ free (full_path);
+ continue;
+ }
+
+ if (full_path)
+ {
+ FREE (file_to_lose_on);
+ return (full_path);
+ }
+ }
+
+ /* We didn't find exactly what the user was looking for. Return
+ the contents of FILE_TO_LOSE_ON which is NULL when the search
+ required an executable, or non-NULL if a file was found and the
+ search would accept a non-executable as a last resort. If the
+ caller specified FS_NODIRS, and file_to_lose_on is a directory,
+ return NULL. */
+ if (file_to_lose_on && (flags & FS_NODIRS) && is_directory (file_to_lose_on))
+ {
+ free (file_to_lose_on);
+ file_to_lose_on = (char *)NULL;
+ }
+
+ return (file_to_lose_on);
+}
diff --git a/findcmd.h b/findcmd.h
new file mode 100644
index 0000000..db74c1c
--- /dev/null
+++ b/findcmd.h
@@ -0,0 +1,35 @@
+/* findcmd.h - functions from findcmd.c. */
+
+/* Copyright (C) 1997-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_FINDCMD_H_)
+#define _FINDCMD_H_
+
+#include "stdc.h"
+
+extern int file_status __P((const char *));
+extern int executable_file __P((const char *));
+extern int is_directory __P((const char *));
+extern int executable_or_directory __P((const char *));
+extern char *find_user_command __P((const char *));
+extern char *find_path_file __P((const char *));
+extern char *search_for_command __P((const char *));
+extern char *user_command_matches __P((const char *, int, int));
+
+#endif /* _FINDCMD_H_ */
diff --git a/flags.c b/flags.c
new file mode 100644
index 0000000..d3b38ad
--- /dev/null
+++ b/flags.c
@@ -0,0 +1,354 @@
+/* flags.c -- Everything about flags except the `set' command. That
+ is in builtins.c */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "shell.h"
+#include "flags.h"
+
+#if defined (BANG_HISTORY)
+# include "bashhist.h"
+#endif
+
+#if defined (JOB_CONTROL)
+extern int set_job_control __P((int));
+#endif
+
+#if defined (RESTRICTED_SHELL)
+extern char *shell_name;
+#endif
+
+extern int shell_initialized;
+
+/* -c, -s invocation options -- not really flags, but they show up in $- */
+extern int want_pending_command, read_from_stdin;
+
+/* **************************************************************** */
+/* */
+/* The Standard sh Flags. */
+/* */
+/* **************************************************************** */
+
+/* Non-zero means automatically mark variables which are modified or created
+ as auto export variables. */
+int mark_modified_vars = 0;
+
+/* Non-zero causes asynchronous job notification. Otherwise, job state
+ notification only takes place just before a primary prompt is printed. */
+int asynchronous_notification = 0;
+
+/* Non-zero means exit immediately if a command exits with a non-zero
+ exit status. */
+int exit_immediately_on_error = 0;
+
+/* Non-zero means disable filename globbing. */
+int disallow_filename_globbing = 0;
+
+/* Non-zero means that all keyword arguments are placed into the environment
+ for a command, not just those that appear on the line before the command
+ name. */
+int place_keywords_in_env = 0;
+
+/* Non-zero means read commands, but don't execute them. This is useful
+ for debugging shell scripts that should do something hairy and possibly
+ destructive. */
+int read_but_dont_execute = 0;
+
+/* Non-zero means end of file is after one command. */
+int just_one_command = 0;
+
+/* Non-zero means don't overwrite existing files while doing redirections. */
+int noclobber = 0;
+
+/* Non-zero means trying to get the value of $i where $i is undefined
+ causes an error, instead of a null substitution. */
+int unbound_vars_is_error = 0;
+
+/* Non-zero means type out input lines after you read them. */
+int echo_input_at_read = 0;
+
+/* Non-zero means type out the command definition after reading, but
+ before executing. */
+int echo_command_at_execute = 0;
+
+/* Non-zero means turn on the job control features. */
+int jobs_m_flag = 0;
+
+/* Non-zero means this shell is interactive, even if running under a
+ pipe. */
+int forced_interactive = 0;
+
+/* By default, follow the symbolic links as if they were real directories
+ while hacking the `cd' command. This means that `cd ..' moves up in
+ the string of symbolic links that make up the current directory, instead
+ of the absolute directory. The shell variable `nolinks' also controls
+ this flag. */
+int no_symbolic_links = 0;
+
+/* **************************************************************** */
+/* */
+/* Non-Standard Flags Follow Here. */
+/* */
+/* **************************************************************** */
+
+#if 0
+/* Non-zero means do lexical scoping in the body of a FOR command. */
+int lexical_scoping = 0;
+#endif
+
+/* Non-zero means no such thing as invisible variables. */
+int no_invisible_vars = 0;
+
+/* Non-zero means look up and remember command names in a hash table, */
+int hashing_enabled = 1;
+
+#if defined (BANG_HISTORY)
+/* Non-zero means that we are doing history expansion. The default.
+ This means !22 gets the 22nd line of history. */
+int history_expansion = 1;
+#endif /* BANG_HISTORY */
+
+/* Non-zero means that we allow comments to appear in interactive commands. */
+int interactive_comments = 1;
+
+#if defined (RESTRICTED_SHELL)
+/* Non-zero means that this shell is `restricted'. A restricted shell
+ disallows: changing directories, command or path names containing `/',
+ unsetting or resetting the values of $PATH and $SHELL, and any type of
+ output redirection. */
+int restricted = 0; /* currently restricted */
+int restricted_shell = 0; /* shell was started in restricted mode. */
+#endif /* RESTRICTED_SHELL */
+
+/* Non-zero means that this shell is running in `privileged' mode. This
+ is required if the shell is to run setuid. If the `-p' option is
+ not supplied at startup, and the real and effective uids or gids
+ differ, disable_priv_mode is called to relinquish setuid status. */
+int privileged_mode = 0;
+
+#if defined (BRACE_EXPANSION)
+/* Zero means to disable brace expansion: foo{a,b} -> fooa foob */
+int brace_expansion = 1;
+#endif
+
+/* Non-zero means that shell functions inherit the DEBUG trap. */
+int function_trace_mode = 0;
+
+/* Non-zero means that shell functions inherit the ERR trap. */
+int error_trace_mode = 0;
+
+/* Non-zero means that the rightmost non-zero exit status in a pipeline
+ is the exit status of the entire pipeline. If each processes exits
+ with a 0 status, the status of the pipeline is 0. */
+int pipefail_opt = 0;
+
+/* **************************************************************** */
+/* */
+/* The Flags ALIST. */
+/* */
+/* **************************************************************** */
+
+const struct flags_alist shell_flags[] = {
+ /* Standard sh flags. */
+ { 'a', &mark_modified_vars },
+#if defined (JOB_CONTROL)
+ { 'b', &asynchronous_notification },
+#endif /* JOB_CONTROL */
+ { 'e', &exit_immediately_on_error },
+ { 'f', &disallow_filename_globbing },
+ { 'h', &hashing_enabled },
+ { 'i', &forced_interactive },
+ { 'k', &place_keywords_in_env },
+#if defined (JOB_CONTROL)
+ { 'm', &jobs_m_flag },
+#endif /* JOB_CONTROL */
+ { 'n', &read_but_dont_execute },
+ { 'p', &privileged_mode },
+#if defined (RESTRICTED_SHELL)
+ { 'r', &restricted },
+#endif /* RESTRICTED_SHELL */
+ { 't', &just_one_command },
+ { 'u', &unbound_vars_is_error },
+ { 'v', &echo_input_at_read },
+ { 'x', &echo_command_at_execute },
+
+ /* New flags that control non-standard things. */
+#if 0
+ { 'l', &lexical_scoping },
+#endif
+#if defined (BRACE_EXPANSION)
+ { 'B', &brace_expansion },
+#endif
+ { 'C', &noclobber },
+ { 'E', &error_trace_mode },
+#if defined (BANG_HISTORY)
+ { 'H', &history_expansion },
+#endif /* BANG_HISTORY */
+ { 'I', &no_invisible_vars },
+ { 'P', &no_symbolic_links },
+ { 'T', &function_trace_mode },
+ {0, (int *)NULL}
+};
+
+#define NUM_SHELL_FLAGS (sizeof (shell_flags) / sizeof (struct flags_alist))
+
+char optflags[NUM_SHELL_FLAGS+4] = { '+' };
+
+int *
+find_flag (name)
+ int name;
+{
+ int i;
+ for (i = 0; shell_flags[i].name; i++)
+ {
+ if (shell_flags[i].name == name)
+ return (shell_flags[i].value);
+ }
+ return (FLAG_UNKNOWN);
+}
+
+/* Change the state of a flag, and return it's original value, or return
+ FLAG_ERROR if there is no flag FLAG. ON_OR_OFF must be either
+ FLAG_ON or FLAG_OFF. */
+int
+change_flag (flag, on_or_off)
+ int flag;
+ int on_or_off;
+{
+ int *value, old_value;
+
+#if defined (RESTRICTED_SHELL)
+ /* Don't allow "set +r" in a shell which is `restricted'. */
+ if (restricted && flag == 'r' && on_or_off == FLAG_OFF)
+ return (FLAG_ERROR);
+#endif /* RESTRICTED_SHELL */
+
+ value = find_flag (flag);
+
+ if ((value == (int *)FLAG_UNKNOWN) || (on_or_off != FLAG_ON && on_or_off != FLAG_OFF))
+ return (FLAG_ERROR);
+
+ old_value = *value;
+
+ *value = (on_or_off == FLAG_ON) ? 1 : 0;
+
+ /* Special cases for a few flags. */
+ switch (flag)
+ {
+#if defined (BANG_HISTORY)
+ case 'H':
+ if (on_or_off == FLAG_ON)
+ bash_initialize_history ();
+ break;
+#endif
+
+#if defined (JOB_CONTROL)
+ case 'm':
+ set_job_control (on_or_off == FLAG_ON);
+ break;
+#endif /* JOB_CONTROL */
+
+ case 'n':
+ if (interactive_shell)
+ read_but_dont_execute = 0;
+ break;
+
+ case 'p':
+ if (on_or_off == FLAG_OFF)
+ disable_priv_mode ();
+ break;
+
+#if defined (RESTRICTED_SHELL)
+ case 'r':
+ if (on_or_off == FLAG_ON && shell_initialized)
+ maybe_make_restricted (shell_name);
+ break;
+#endif
+
+ }
+
+ return (old_value);
+}
+
+/* Return a string which is the names of all the currently
+ set shell flags. */
+char *
+which_set_flags ()
+{
+ char *temp;
+ int i, string_index;
+
+ temp = (char *)xmalloc (1 + NUM_SHELL_FLAGS + read_from_stdin + want_pending_command);
+ for (i = string_index = 0; shell_flags[i].name; i++)
+ if (*(shell_flags[i].value))
+ temp[string_index++] = shell_flags[i].name;
+
+ if (want_pending_command)
+ temp[string_index++] = 'c';
+ if (read_from_stdin)
+ temp[string_index++] = 's';
+
+ temp[string_index] = '\0';
+ return (temp);
+}
+
+void
+reset_shell_flags ()
+{
+ mark_modified_vars = exit_immediately_on_error = disallow_filename_globbing = 0;
+ place_keywords_in_env = read_but_dont_execute = just_one_command = 0;
+ noclobber = unbound_vars_is_error = echo_input_at_read = 0;
+ echo_command_at_execute = jobs_m_flag = forced_interactive = 0;
+ no_symbolic_links = no_invisible_vars = privileged_mode = pipefail_opt = 0;
+
+ hashing_enabled = interactive_comments = 1;
+
+#if defined (JOB_CONTROL)
+ asynchronous_notification = 0;
+#endif
+
+#if defined (BANG_HISTORY)
+ history_expansion = 1;
+#endif
+
+#if defined (BRACE_EXPANSION)
+ brace_expansion = 1;
+#endif
+
+#if defined (RESTRICTED_SHELL)
+ restricted = 0;
+#endif
+}
+
+void
+initialize_flags ()
+{
+ register int i;
+
+ for (i = 0; shell_flags[i].name; i++)
+ optflags[i+1] = shell_flags[i].name;
+ optflags[++i] = 'o';
+ optflags[++i] = ';';
+ optflags[i+1] = '\0';
+}
diff --git a/flags.h b/flags.h
new file mode 100644
index 0000000..d8fa757
--- /dev/null
+++ b/flags.h
@@ -0,0 +1,79 @@
+/* flags.h -- a list of all the flags that the shell knows about. You add
+ a flag to this program by adding the name here, and in flags.c. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_FLAGS_H_)
+#define _FLAGS_H_
+
+#include "stdc.h"
+
+/* Welcome to the world of Un*x, where everything is slightly backwards. */
+#define FLAG_ON '-'
+#define FLAG_OFF '+'
+
+#define FLAG_ERROR -1
+#define FLAG_UNKNOWN (int *)0
+
+/* The thing that we build the array of flags out of. */
+struct flags_alist {
+ char name;
+ int *value;
+};
+
+extern const struct flags_alist shell_flags[];
+extern char optflags[];
+
+extern int
+ mark_modified_vars, exit_immediately_on_error, disallow_filename_globbing,
+ place_keywords_in_env, read_but_dont_execute,
+ just_one_command, unbound_vars_is_error, echo_input_at_read,
+ echo_command_at_execute, no_invisible_vars, noclobber,
+ hashing_enabled, forced_interactive, privileged_mode,
+ asynchronous_notification, interactive_comments, no_symbolic_links,
+ function_trace_mode, error_trace_mode, pipefail_opt;
+
+#if 0
+extern int lexical_scoping;
+#endif
+
+#if defined (BRACE_EXPANSION)
+extern int brace_expansion;
+#endif
+
+#if defined (BANG_HISTORY)
+extern int history_expansion;
+#endif /* BANG_HISTORY */
+
+#if defined (RESTRICTED_SHELL)
+extern int restricted;
+extern int restricted_shell;
+#endif /* RESTRICTED_SHELL */
+
+extern int *find_flag __P((int));
+extern int change_flag __P((int, int));
+extern char *which_set_flags __P((void));
+extern void reset_shell_flags __P((void));
+
+extern void initialize_flags __P((void));
+
+/* A macro for efficiency. */
+#define change_flag_char(flag, on_or_off) change_flag (flag, on_or_off)
+
+#endif /* _FLAGS_H_ */
diff --git a/general.c b/general.c
new file mode 100644
index 0000000..26c7d3d
--- /dev/null
+++ b/general.c
@@ -0,0 +1,1136 @@
+/* general.c -- Stuff that is used by all files. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+#ifndef _MINIX
+# include <sys/param.h>
+#endif
+#include "posixstat.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "filecntl.h"
+#include "bashansi.h"
+#include <stdio.h>
+#include "chartypes.h"
+#include <errno.h>
+
+#include "bashintl.h"
+
+#include "shell.h"
+#include "test.h"
+
+#include <tilde/tilde.h>
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+extern int expand_aliases;
+extern int interactive_comments;
+extern int check_hashed_filenames;
+extern int source_uses_path;
+extern int source_searches_cwd;
+
+static char *bash_special_tilde_expansions __P((char *));
+static int unquoted_tilde_word __P((const char *));
+static void initialize_group_array __P((void));
+
+/* A standard error message to use when getcwd() returns NULL. */
+const char * const bash_getcwd_errstr = N_("getcwd: cannot access parent directories");
+
+/* Do whatever is necessary to initialize `Posix mode'. */
+void
+posix_initialize (on)
+ int on;
+{
+ /* Things that should be turned on when posix mode is enabled. */
+ if (on != 0)
+ {
+ interactive_comments = source_uses_path = expand_aliases = 1;
+ source_searches_cwd = 0;
+ }
+
+ /* Things that should be turned on when posix mode is disabled. */
+ if (on == 0)
+ {
+ source_searches_cwd = 1;
+ expand_aliases = interactive_shell;
+ }
+}
+
+/* **************************************************************** */
+/* */
+/* Functions to convert to and from and display non-standard types */
+/* */
+/* **************************************************************** */
+
+#if defined (RLIMTYPE)
+RLIMTYPE
+string_to_rlimtype (s)
+ char *s;
+{
+ RLIMTYPE ret;
+ int neg;
+
+ ret = 0;
+ neg = 0;
+ while (s && *s && whitespace (*s))
+ s++;
+ if (s && (*s == '-' || *s == '+'))
+ {
+ neg = *s == '-';
+ s++;
+ }
+ for ( ; s && *s && DIGIT (*s); s++)
+ ret = (ret * 10) + TODIGIT (*s);
+ return (neg ? -ret : ret);
+}
+
+void
+print_rlimtype (n, addnl)
+ RLIMTYPE n;
+ int addnl;
+{
+ char s[INT_STRLEN_BOUND (RLIMTYPE) + 1], *p;
+
+ p = s + sizeof(s);
+ *--p = '\0';
+
+ if (n < 0)
+ {
+ do
+ *--p = '0' - n % 10;
+ while ((n /= 10) != 0);
+
+ *--p = '-';
+ }
+ else
+ {
+ do
+ *--p = '0' + n % 10;
+ while ((n /= 10) != 0);
+ }
+
+ printf ("%s%s", p, addnl ? "\n" : "");
+}
+#endif /* RLIMTYPE */
+
+/* **************************************************************** */
+/* */
+/* Input Validation Functions */
+/* */
+/* **************************************************************** */
+
+/* Return non-zero if all of the characters in STRING are digits. */
+int
+all_digits (string)
+ char *string;
+{
+ register char *s;
+
+ for (s = string; *s; s++)
+ if (DIGIT (*s) == 0)
+ return (0);
+
+ return (1);
+}
+
+/* Return non-zero if the characters pointed to by STRING constitute a
+ valid number. Stuff the converted number into RESULT if RESULT is
+ not null. */
+int
+legal_number (string, result)
+ const char *string;
+ intmax_t *result;
+{
+ intmax_t value;
+ char *ep;
+
+ if (result)
+ *result = 0;
+
+ errno = 0;
+ value = strtoimax (string, &ep, 10);
+ if (errno || ep == string)
+ return 0; /* errno is set on overflow or underflow */
+
+ /* Skip any trailing whitespace, since strtoimax does not. */
+ while (whitespace (*ep))
+ ep++;
+
+ /* If *string is not '\0' but *ep is '\0' on return, the entire string
+ is valid. */
+ if (string && *string && *ep == '\0')
+ {
+ if (result)
+ *result = value;
+ /* The SunOS4 implementation of strtol() will happily ignore
+ overflow conditions, so this cannot do overflow correctly
+ on those systems. */
+ return 1;
+ }
+
+ return (0);
+}
+
+/* Return 1 if this token is a legal shell `identifier'; that is, it consists
+ solely of letters, digits, and underscores, and does not begin with a
+ digit. */
+int
+legal_identifier (name)
+ char *name;
+{
+ register char *s;
+ unsigned char c;
+
+ if (!name || !(c = *name) || (legal_variable_starter (c) == 0))
+ return (0);
+
+ for (s = name + 1; (c = *s) != 0; s++)
+ {
+ if (legal_variable_char (c) == 0)
+ return (0);
+ }
+ return (1);
+}
+
+/* Make sure that WORD is a valid shell identifier, i.e.
+ does not contain a dollar sign, nor is quoted in any way. Nor
+ does it consist of all digits. If CHECK_WORD is non-zero,
+ the word is checked to ensure that it consists of only letters,
+ digits, and underscores. */
+int
+check_identifier (word, check_word)
+ WORD_DESC *word;
+ int check_word;
+{
+ if ((word->flags & (W_HASDOLLAR|W_QUOTED)) || all_digits (word->word))
+ {
+ internal_error (_("`%s': not a valid identifier"), word->word);
+ return (0);
+ }
+ else if (check_word && legal_identifier (word->word) == 0)
+ {
+ internal_error (_("`%s': not a valid identifier"), word->word);
+ return (0);
+ }
+ else
+ return (1);
+}
+
+/* Return 1 if STRING comprises a valid alias name. The shell accepts
+ essentially all characters except those which must be quoted to the
+ parser (which disqualifies them from alias expansion anyway) and `/'. */
+int
+legal_alias_name (string, flags)
+ char *string;
+ int flags;
+{
+ register char *s;
+
+ for (s = string; *s; s++)
+ if (shellbreak (*s) || shellxquote (*s) || shellexp (*s) || (*s == '/'))
+ return 0;
+ return 1;
+}
+
+/* Returns non-zero if STRING is an assignment statement. The returned value
+ is the index of the `=' sign. */
+int
+assignment (string, flags)
+ const char *string;
+ int flags;
+{
+ register unsigned char c;
+ register int newi, indx;
+
+ c = string[indx = 0];
+
+#if defined (ARRAY_VARS)
+ if ((legal_variable_starter (c) == 0) && (flags == 0 || c != '[')) /* ] */
+#else
+ if (legal_variable_starter (c) == 0)
+#endif
+ return (0);
+
+ while (c = string[indx])
+ {
+ /* The following is safe. Note that '=' at the start of a word
+ is not an assignment statement. */
+ if (c == '=')
+ return (indx);
+
+#if defined (ARRAY_VARS)
+ if (c == '[')
+ {
+ newi = skipsubscript (string, indx, 0);
+ if (string[newi++] != ']')
+ return (0);
+ if (string[newi] == '+' && string[newi+1] == '=')
+ return (newi + 1);
+ return ((string[newi] == '=') ? newi : 0);
+ }
+#endif /* ARRAY_VARS */
+
+ /* Check for `+=' */
+ if (c == '+' && string[indx+1] == '=')
+ return (indx + 1);
+
+ /* Variable names in assignment statements may contain only letters,
+ digits, and `_'. */
+ if (legal_variable_char (c) == 0)
+ return (0);
+
+ indx++;
+ }
+ return (0);
+}
+
+/* **************************************************************** */
+/* */
+/* Functions to manage files and file descriptors */
+/* */
+/* **************************************************************** */
+
+/* A function to unset no-delay mode on a file descriptor. Used in shell.c
+ to unset it on the fd passed as stdin. Should be called on stdin if
+ readline gets an EAGAIN or EWOULDBLOCK when trying to read input. */
+
+#if !defined (O_NDELAY)
+# if defined (FNDELAY)
+# define O_NDELAY FNDELAY
+# endif
+#endif /* O_NDELAY */
+
+/* Make sure no-delay mode is not set on file descriptor FD. */
+int
+sh_unset_nodelay_mode (fd)
+ int fd;
+{
+ int flags, bflags;
+
+ if ((flags = fcntl (fd, F_GETFL, 0)) < 0)
+ return -1;
+
+ bflags = 0;
+
+ /* This is defined to O_NDELAY in filecntl.h if O_NONBLOCK is not present
+ and O_NDELAY is defined. */
+#ifdef O_NONBLOCK
+ bflags |= O_NONBLOCK;
+#endif
+
+#ifdef O_NDELAY
+ bflags |= O_NDELAY;
+#endif
+
+ if (flags & bflags)
+ {
+ flags &= ~bflags;
+ return (fcntl (fd, F_SETFL, flags));
+ }
+
+ return 0;
+}
+
+/* Return 1 if file descriptor FD is valid; 0 otherwise. */
+int
+sh_validfd (fd)
+ int fd;
+{
+ return (fcntl (fd, F_GETFD, 0) >= 0);
+}
+
+/* There is a bug in the NeXT 2.1 rlogind that causes opens
+ of /dev/tty to fail. */
+
+#if defined (__BEOS__)
+/* On BeOS, opening in non-blocking mode exposes a bug in BeOS, so turn it
+ into a no-op. This should probably go away in the future. */
+# undef O_NONBLOCK
+# define O_NONBLOCK 0
+#endif /* __BEOS__ */
+
+void
+check_dev_tty ()
+{
+ int tty_fd;
+ char *tty;
+
+ tty_fd = open ("/dev/tty", O_RDWR|O_NONBLOCK);
+
+ if (tty_fd < 0)
+ {
+ tty = (char *)ttyname (fileno (stdin));
+ if (tty == 0)
+ return;
+ tty_fd = open (tty, O_RDWR|O_NONBLOCK);
+ }
+ close (tty_fd);
+}
+
+/* Return 1 if PATH1 and PATH2 are the same file. This is kind of
+ expensive. If non-NULL STP1 and STP2 point to stat structures
+ corresponding to PATH1 and PATH2, respectively. */
+int
+same_file (path1, path2, stp1, stp2)
+ char *path1, *path2;
+ struct stat *stp1, *stp2;
+{
+ struct stat st1, st2;
+
+ if (stp1 == NULL)
+ {
+ if (stat (path1, &st1) != 0)
+ return (0);
+ stp1 = &st1;
+ }
+
+ if (stp2 == NULL)
+ {
+ if (stat (path2, &st2) != 0)
+ return (0);
+ stp2 = &st2;
+ }
+
+ return ((stp1->st_dev == stp2->st_dev) && (stp1->st_ino == stp2->st_ino));
+}
+
+/* Move FD to a number close to the maximum number of file descriptors
+ allowed in the shell process, to avoid the user stepping on it with
+ redirection and causing us extra work. If CHECK_NEW is non-zero,
+ we check whether or not the file descriptors are in use before
+ duplicating FD onto them. MAXFD says where to start checking the
+ file descriptors. If it's less than 20, we get the maximum value
+ available from getdtablesize(2). */
+int
+move_to_high_fd (fd, check_new, maxfd)
+ int fd, check_new, maxfd;
+{
+ int script_fd, nfds, ignore;
+
+ if (maxfd < 20)
+ {
+ nfds = getdtablesize ();
+ if (nfds <= 0)
+ nfds = 20;
+ if (nfds > HIGH_FD_MAX)
+ nfds = HIGH_FD_MAX; /* reasonable maximum */
+ }
+ else
+ nfds = maxfd;
+
+ for (nfds--; check_new && nfds > 3; nfds--)
+ if (fcntl (nfds, F_GETFD, &ignore) == -1)
+ break;
+
+ if (nfds > 3 && fd != nfds && (script_fd = dup2 (fd, nfds)) != -1)
+ {
+ if (check_new == 0 || fd != fileno (stderr)) /* don't close stderr */
+ close (fd);
+ return (script_fd);
+ }
+
+ /* OK, we didn't find one less than our artificial maximum; return the
+ original file descriptor. */
+ return (fd);
+}
+
+/* Return non-zero if the characters from SAMPLE are not all valid
+ characters to be found in the first line of a shell script. We
+ check up to the first newline, or SAMPLE_LEN, whichever comes first.
+ All of the characters must be printable or whitespace. */
+
+int
+check_binary_file (sample, sample_len)
+ char *sample;
+ int sample_len;
+{
+ register int i;
+ unsigned char c;
+
+ for (i = 0; i < sample_len; i++)
+ {
+ c = sample[i];
+ if (c == '\n')
+ return (0);
+ if (c == '\0')
+ return (1);
+ }
+
+ return (0);
+}
+
+/* **************************************************************** */
+/* */
+/* Functions to manipulate pipes */
+/* */
+/* **************************************************************** */
+
+int
+sh_openpipe (pv)
+ int *pv;
+{
+ int r;
+
+ if ((r = pipe (pv)) < 0)
+ return r;
+
+ pv[0] = move_to_high_fd (pv[0], 1, 64);
+ pv[1] = move_to_high_fd (pv[1], 1, 64);
+
+ return 0;
+}
+
+int
+sh_closepipe (pv)
+ int *pv;
+{
+ if (pv[0] >= 0)
+ close (pv[0]);
+
+ if (pv[1] >= 0)
+ close (pv[1]);
+
+ pv[0] = pv[1] = -1;
+ return 0;
+}
+
+/* **************************************************************** */
+/* */
+/* Functions to inspect pathnames */
+/* */
+/* **************************************************************** */
+
+int
+file_exists (fn)
+ char *fn;
+{
+ struct stat sb;
+
+ return (stat (fn, &sb) == 0);
+}
+
+int
+file_isdir (fn)
+ char *fn;
+{
+ struct stat sb;
+
+ return ((stat (fn, &sb) == 0) && S_ISDIR (sb.st_mode));
+}
+
+int
+file_iswdir (fn)
+ char *fn;
+{
+ return (file_isdir (fn) && sh_eaccess (fn, W_OK) == 0);
+}
+
+/* Return 1 if STRING contains an absolute pathname, else 0. Used by `cd'
+ to decide whether or not to look up a directory name in $CDPATH. */
+int
+absolute_pathname (string)
+ const char *string;
+{
+ if (string == 0 || *string == '\0')
+ return (0);
+
+ if (ABSPATH(string))
+ return (1);
+
+ if (string[0] == '.' && PATHSEP(string[1])) /* . and ./ */
+ return (1);
+
+ if (string[0] == '.' && string[1] == '.' && PATHSEP(string[2])) /* .. and ../ */
+ return (1);
+
+ return (0);
+}
+
+/* Return 1 if STRING is an absolute program name; it is absolute if it
+ contains any slashes. This is used to decide whether or not to look
+ up through $PATH. */
+int
+absolute_program (string)
+ const char *string;
+{
+ return ((char *)mbschr (string, '/') != (char *)NULL);
+}
+
+/* **************************************************************** */
+/* */
+/* Functions to manipulate pathnames */
+/* */
+/* **************************************************************** */
+
+/* Turn STRING (a pathname) into an absolute pathname, assuming that
+ DOT_PATH contains the symbolic location of `.'. This always
+ returns a new string, even if STRING was an absolute pathname to
+ begin with. */
+char *
+make_absolute (string, dot_path)
+ char *string, *dot_path;
+{
+ char *result;
+
+ if (dot_path == 0 || ABSPATH(string))
+#ifdef __CYGWIN__
+ {
+ char pathbuf[PATH_MAX + 1];
+
+ cygwin_conv_to_full_posix_path (string, pathbuf);
+ result = savestring (pathbuf);
+ }
+#else
+ result = savestring (string);
+#endif
+ else
+ result = sh_makepath (dot_path, string, 0);
+
+ return (result);
+}
+
+/* Return the `basename' of the pathname in STRING (the stuff after the
+ last '/'). If STRING is `/', just return it. */
+char *
+base_pathname (string)
+ char *string;
+{
+ char *p;
+
+#if 0
+ if (absolute_pathname (string) == 0)
+ return (string);
+#endif
+
+ if (string[0] == '/' && string[1] == 0)
+ return (string);
+
+ p = (char *)strrchr (string, '/');
+ return (p ? ++p : string);
+}
+
+/* Return the full pathname of FILE. Easy. Filenames that begin
+ with a '/' are returned as themselves. Other filenames have
+ the current working directory prepended. A new string is
+ returned in either case. */
+char *
+full_pathname (file)
+ char *file;
+{
+ char *ret;
+
+ file = (*file == '~') ? bash_tilde_expand (file, 0) : savestring (file);
+
+ if (ABSPATH(file))
+ return (file);
+
+ ret = sh_makepath ((char *)NULL, file, (MP_DOCWD|MP_RMDOT));
+ free (file);
+
+ return (ret);
+}
+
+/* A slightly related function. Get the prettiest name of this
+ directory possible. */
+static char tdir[PATH_MAX];
+
+/* Return a pretty pathname. If the first part of the pathname is
+ the same as $HOME, then replace that with `~'. */
+char *
+polite_directory_format (name)
+ char *name;
+{
+ char *home;
+ int l;
+
+ home = get_string_value ("HOME");
+ l = home ? strlen (home) : 0;
+ if (l > 1 && strncmp (home, name, l) == 0 && (!name[l] || name[l] == '/'))
+ {
+ strncpy (tdir + 1, name + l, sizeof(tdir) - 2);
+ tdir[0] = '~';
+ tdir[sizeof(tdir) - 1] = '\0';
+ return (tdir);
+ }
+ else
+ return (name);
+}
+
+/* Trim NAME. If NAME begins with `~/', skip over tilde prefix. Trim to
+ keep any tilde prefix and PROMPT_DIRTRIM trailing directory components
+ and replace the intervening characters with `...' */
+char *
+trim_pathname (name, maxlen)
+ char *name;
+ int maxlen;
+{
+ int nlen, ndirs;
+ intmax_t nskip;
+ char *nbeg, *nend, *ntail, *v;
+
+ if (name == 0 || (nlen = strlen (name)) == 0)
+ return name;
+ nend = name + nlen;
+
+ v = get_string_value ("PROMPT_DIRTRIM");
+ if (v == 0 || *v == 0)
+ return name;
+ if (legal_number (v, &nskip) == 0 || nskip <= 0)
+ return name;
+
+ /* Skip over tilde prefix */
+ nbeg = name;
+ if (name[0] == '~')
+ for (nbeg = name; *nbeg; nbeg++)
+ if (*nbeg == '/')
+ {
+ nbeg++;
+ break;
+ }
+ if (*nbeg == 0)
+ return name;
+
+ for (ndirs = 0, ntail = nbeg; *ntail; ntail++)
+ if (*ntail == '/')
+ ndirs++;
+ if (ndirs < nskip)
+ return name;
+
+ for (ntail = (*nend == '/') ? nend : nend - 1; ntail > nbeg; ntail--)
+ {
+ if (*ntail == '/')
+ nskip--;
+ if (nskip == 0)
+ break;
+ }
+ if (ntail == nbeg)
+ return name;
+
+ /* Now we want to return name[0..nbeg]+"..."+ntail, modifying name in place */
+ nlen = ntail - nbeg;
+ if (nlen <= 3)
+ return name;
+
+ *nbeg++ = '.';
+ *nbeg++ = '.';
+ *nbeg++ = '.';
+
+ nlen = nend - ntail;
+ memcpy (nbeg, ntail, nlen);
+ nbeg[nlen] = '\0';
+
+ return name;
+}
+
+/* Given a string containing units of information separated by colons,
+ return the next one pointed to by (P_INDEX), or NULL if there are no more.
+ Advance (P_INDEX) to the character after the colon. */
+char *
+extract_colon_unit (string, p_index)
+ char *string;
+ int *p_index;
+{
+ int i, start, len;
+ char *value;
+
+ if (string == 0)
+ return (string);
+
+ len = strlen (string);
+ if (*p_index >= len)
+ return ((char *)NULL);
+
+ i = *p_index;
+
+ /* Each call to this routine leaves the index pointing at a colon if
+ there is more to the path. If I is > 0, then increment past the
+ `:'. If I is 0, then the path has a leading colon. Trailing colons
+ are handled OK by the `else' part of the if statement; an empty
+ string is returned in that case. */
+ if (i && string[i] == ':')
+ i++;
+
+ for (start = i; string[i] && string[i] != ':'; i++)
+ ;
+
+ *p_index = i;
+
+ if (i == start)
+ {
+ if (string[i])
+ (*p_index)++;
+ /* Return "" in the case of a trailing `:'. */
+ value = (char *)xmalloc (1);
+ value[0] = '\0';
+ }
+ else
+ value = substring (string, start, i);
+
+ return (value);
+}
+
+/* **************************************************************** */
+/* */
+/* Tilde Initialization and Expansion */
+/* */
+/* **************************************************************** */
+
+#if defined (PUSHD_AND_POPD)
+extern char *get_dirstack_from_string __P((char *));
+#endif
+
+static char **bash_tilde_prefixes;
+static char **bash_tilde_prefixes2;
+static char **bash_tilde_suffixes;
+static char **bash_tilde_suffixes2;
+
+/* If tilde_expand hasn't been able to expand the text, perhaps it
+ is a special shell expansion. This function is installed as the
+ tilde_expansion_preexpansion_hook. It knows how to expand ~- and ~+.
+ If PUSHD_AND_POPD is defined, ~[+-]N expands to directories from the
+ directory stack. */
+static char *
+bash_special_tilde_expansions (text)
+ char *text;
+{
+ char *result;
+
+ result = (char *)NULL;
+
+ if (text[0] == '+' && text[1] == '\0')
+ result = get_string_value ("PWD");
+ else if (text[0] == '-' && text[1] == '\0')
+ result = get_string_value ("OLDPWD");
+#if defined (PUSHD_AND_POPD)
+ else if (DIGIT (*text) || ((*text == '+' || *text == '-') && DIGIT (text[1])))
+ result = get_dirstack_from_string (text);
+#endif
+
+ return (result ? savestring (result) : (char *)NULL);
+}
+
+/* Initialize the tilde expander. In Bash, we handle `~-' and `~+', as
+ well as handling special tilde prefixes; `:~" and `=~' are indications
+ that we should do tilde expansion. */
+void
+tilde_initialize ()
+{
+ static int times_called = 0;
+
+ /* Tell the tilde expander that we want a crack first. */
+ tilde_expansion_preexpansion_hook = bash_special_tilde_expansions;
+
+ /* Tell the tilde expander about special strings which start a tilde
+ expansion, and the special strings that end one. Only do this once.
+ tilde_initialize () is called from within bashline_reinitialize (). */
+ if (times_called++ == 0)
+ {
+ bash_tilde_prefixes = strvec_create (3);
+ bash_tilde_prefixes[0] = "=~";
+ bash_tilde_prefixes[1] = ":~";
+ bash_tilde_prefixes[2] = (char *)NULL;
+
+ bash_tilde_prefixes2 = strvec_create (2);
+ bash_tilde_prefixes2[0] = ":~";
+ bash_tilde_prefixes2[1] = (char *)NULL;
+
+ tilde_additional_prefixes = bash_tilde_prefixes;
+
+ bash_tilde_suffixes = strvec_create (3);
+ bash_tilde_suffixes[0] = ":";
+ bash_tilde_suffixes[1] = "=~"; /* XXX - ?? */
+ bash_tilde_suffixes[2] = (char *)NULL;
+
+ tilde_additional_suffixes = bash_tilde_suffixes;
+
+ bash_tilde_suffixes2 = strvec_create (2);
+ bash_tilde_suffixes2[0] = ":";
+ bash_tilde_suffixes2[1] = (char *)NULL;
+ }
+}
+
+/* POSIX.2, 3.6.1: A tilde-prefix consists of an unquoted tilde character
+ at the beginning of the word, followed by all of the characters preceding
+ the first unquoted slash in the word, or all the characters in the word
+ if there is no slash...If none of the characters in the tilde-prefix are
+ quoted, the characters in the tilde-prefix following the tilde shell be
+ treated as a possible login name. */
+
+#define TILDE_END(c) ((c) == '\0' || (c) == '/' || (c) == ':')
+
+static int
+unquoted_tilde_word (s)
+ const char *s;
+{
+ const char *r;
+
+ for (r = s; TILDE_END(*r) == 0; r++)
+ {
+ switch (*r)
+ {
+ case '\\':
+ case '\'':
+ case '"':
+ return 0;
+ }
+ }
+ return 1;
+}
+
+/* Find the end of the tilde-prefix starting at S, and return the tilde
+ prefix in newly-allocated memory. Return the length of the string in
+ *LENP. FLAGS tells whether or not we're in an assignment context --
+ if so, `:' delimits the end of the tilde prefix as well. */
+char *
+bash_tilde_find_word (s, flags, lenp)
+ const char *s;
+ int flags, *lenp;
+{
+ const char *r;
+ char *ret;
+ int l;
+
+ for (r = s; *r && *r != '/'; r++)
+ {
+ /* Short-circuit immediately if we see a quote character. Even though
+ POSIX says that `the first unquoted slash' (or `:') terminates the
+ tilde-prefix, in practice, any quoted portion of the tilde prefix
+ will cause it to not be expanded. */
+ if (*r == '\\' || *r == '\'' || *r == '"')
+ {
+ ret = savestring (s);
+ if (lenp)
+ *lenp = 0;
+ return ret;
+ }
+ else if (flags && *r == ':')
+ break;
+ }
+ l = r - s;
+ ret = xmalloc (l + 1);
+ strncpy (ret, s, l);
+ ret[l] = '\0';
+ if (lenp)
+ *lenp = l;
+ return ret;
+}
+
+/* Tilde-expand S by running it through the tilde expansion library.
+ ASSIGN_P is 1 if this is a variable assignment, so the alternate
+ tilde prefixes should be enabled (`=~' and `:~', see above). If
+ ASSIGN_P is 2, we are expanding the rhs of an assignment statement,
+ so `=~' is not valid. */
+char *
+bash_tilde_expand (s, assign_p)
+ const char *s;
+ int assign_p;
+{
+ int old_immed, old_term, r;
+ char *ret;
+
+ old_immed = interrupt_immediately;
+ old_term = terminate_immediately;
+ interrupt_immediately = terminate_immediately = 1;
+
+ tilde_additional_prefixes = assign_p == 0 ? (char **)0
+ : (assign_p == 2 ? bash_tilde_prefixes2 : bash_tilde_prefixes);
+ if (assign_p == 2)
+ tilde_additional_suffixes = bash_tilde_suffixes2;
+
+ r = (*s == '~') ? unquoted_tilde_word (s) : 1;
+ ret = r ? tilde_expand (s) : savestring (s);
+ interrupt_immediately = old_immed;
+ terminate_immediately = old_term;
+ return (ret);
+}
+
+/* **************************************************************** */
+/* */
+/* Functions to manipulate and search the group list */
+/* */
+/* **************************************************************** */
+
+static int ngroups, maxgroups;
+
+/* The set of groups that this user is a member of. */
+static GETGROUPS_T *group_array = (GETGROUPS_T *)NULL;
+
+#if !defined (NOGROUP)
+# define NOGROUP (gid_t) -1
+#endif
+
+static void
+initialize_group_array ()
+{
+ register int i;
+
+ if (maxgroups == 0)
+ maxgroups = getmaxgroups ();
+
+ ngroups = 0;
+ group_array = (GETGROUPS_T *)xrealloc (group_array, maxgroups * sizeof (GETGROUPS_T));
+
+#if defined (HAVE_GETGROUPS)
+ ngroups = getgroups (maxgroups, group_array);
+#endif
+
+ /* If getgroups returns nothing, or the OS does not support getgroups(),
+ make sure the groups array includes at least the current gid. */
+ if (ngroups == 0)
+ {
+ group_array[0] = current_user.gid;
+ ngroups = 1;
+ }
+
+ /* If the primary group is not in the groups array, add it as group_array[0]
+ and shuffle everything else up 1, if there's room. */
+ for (i = 0; i < ngroups; i++)
+ if (current_user.gid == (gid_t)group_array[i])
+ break;
+ if (i == ngroups && ngroups < maxgroups)
+ {
+ for (i = ngroups; i > 0; i--)
+ group_array[i] = group_array[i - 1];
+ group_array[0] = current_user.gid;
+ ngroups++;
+ }
+
+ /* If the primary group is not group_array[0], swap group_array[0] and
+ whatever the current group is. The vast majority of systems should
+ not need this; a notable exception is Linux. */
+ if (group_array[0] != current_user.gid)
+ {
+ for (i = 0; i < ngroups; i++)
+ if (group_array[i] == current_user.gid)
+ break;
+ if (i < ngroups)
+ {
+ group_array[i] = group_array[0];
+ group_array[0] = current_user.gid;
+ }
+ }
+}
+
+/* Return non-zero if GID is one that we have in our groups list. */
+int
+#if defined (__STDC__) || defined ( _MINIX)
+group_member (gid_t gid)
+#else
+group_member (gid)
+ gid_t gid;
+#endif /* !__STDC__ && !_MINIX */
+{
+#if defined (HAVE_GETGROUPS)
+ register int i;
+#endif
+
+ /* Short-circuit if possible, maybe saving a call to getgroups(). */
+ if (gid == current_user.gid || gid == current_user.egid)
+ return (1);
+
+#if defined (HAVE_GETGROUPS)
+ if (ngroups == 0)
+ initialize_group_array ();
+
+ /* In case of error, the user loses. */
+ if (ngroups <= 0)
+ return (0);
+
+ /* Search through the list looking for GID. */
+ for (i = 0; i < ngroups; i++)
+ if (gid == (gid_t)group_array[i])
+ return (1);
+#endif
+
+ return (0);
+}
+
+char **
+get_group_list (ngp)
+ int *ngp;
+{
+ static char **group_vector = (char **)NULL;
+ register int i;
+
+ if (group_vector)
+ {
+ if (ngp)
+ *ngp = ngroups;
+ return group_vector;
+ }
+
+ if (ngroups == 0)
+ initialize_group_array ();
+
+ if (ngroups <= 0)
+ {
+ if (ngp)
+ *ngp = 0;
+ return (char **)NULL;
+ }
+
+ group_vector = strvec_create (ngroups);
+ for (i = 0; i < ngroups; i++)
+ group_vector[i] = itos (group_array[i]);
+
+ if (ngp)
+ *ngp = ngroups;
+ return group_vector;
+}
+
+int *
+get_group_array (ngp)
+ int *ngp;
+{
+ int i;
+ static int *group_iarray = (int *)NULL;
+
+ if (group_iarray)
+ {
+ if (ngp)
+ *ngp = ngroups;
+ return (group_iarray);
+ }
+
+ if (ngroups == 0)
+ initialize_group_array ();
+
+ if (ngroups <= 0)
+ {
+ if (ngp)
+ *ngp = 0;
+ return (int *)NULL;
+ }
+
+ group_iarray = (int *)xmalloc (ngroups * sizeof (int));
+ for (i = 0; i < ngroups; i++)
+ group_iarray[i] = (int)group_array[i];
+
+ if (ngp)
+ *ngp = ngroups;
+ return group_iarray;
+}
diff --git a/general.h b/general.h
new file mode 100644
index 0000000..1ec0d39
--- /dev/null
+++ b/general.h
@@ -0,0 +1,325 @@
+/* general.h -- defines that everybody likes to use. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_GENERAL_H_)
+#define _GENERAL_H_
+
+#include "stdc.h"
+
+#include "bashtypes.h"
+#include "chartypes.h"
+
+#if defined (HAVE_SYS_RESOURCE_H) && defined (RLIMTYPE)
+# if defined (HAVE_SYS_TIME_H)
+# include <sys/time.h>
+# endif
+# include <sys/resource.h>
+#endif
+
+#if defined (HAVE_STRING_H)
+# include <string.h>
+#else
+# include <strings.h>
+#endif /* !HAVE_STRING_H */
+
+#if defined (HAVE_LIMITS_H)
+# include <limits.h>
+#endif
+
+#include "xmalloc.h"
+
+/* NULL pointer type. */
+#if !defined (NULL)
+# if defined (__STDC__)
+# define NULL ((void *) 0)
+# else
+# define NULL 0x0
+# endif /* !__STDC__ */
+#endif /* !NULL */
+
+/* Hardly used anymore */
+#define pointer_to_int(x) (int)((char *)x - (char *)0)
+
+#if defined (alpha) && defined (__GNUC__) && !defined (strchr) && !defined (__STDC__)
+extern char *strchr (), *strrchr ();
+#endif
+
+#if !defined (strcpy) && (defined (HAVE_DECL_STRCPY) && !HAVE_DECL_STRCPY)
+extern char *strcpy __P((char *, const char *));
+#endif
+
+#if !defined (savestring)
+# define savestring(x) (char *)strcpy (xmalloc (1 + strlen (x)), (x))
+#endif
+
+#ifndef member
+# define member(c, s) ((c) ? ((char *)mbschr ((s), (c)) != (char *)NULL) : 0)
+#endif
+
+#ifndef whitespace
+#define whitespace(c) (((c) == ' ') || ((c) == '\t'))
+#endif
+
+#ifndef CHAR_MAX
+# ifdef __CHAR_UNSIGNED__
+# define CHAR_MAX 0xff
+# else
+# define CHAR_MAX 0x7f
+# endif
+#endif
+
+#ifndef CHAR_BIT
+# define CHAR_BIT 8
+#endif
+
+/* Nonzero if the integer type T is signed. */
+#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* Bound on length of the string representing an integer value of type T.
+ Subtract one for the sign bit if T is signed;
+ 302 / 1000 is log10 (2) rounded up;
+ add one for integer division truncation;
+ add one more for a minus sign if t is signed. */
+#define INT_STRLEN_BOUND(t) \
+ ((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 1000 \
+ + 1 + TYPE_SIGNED (t))
+
+
+/* Define exactly what a legal shell identifier consists of. */
+#define legal_variable_starter(c) (ISALPHA(c) || (c == '_'))
+#define legal_variable_char(c) (ISALNUM(c) || c == '_')
+
+/* Definitions used in subst.c and by the `read' builtin for field
+ splitting. */
+#define spctabnl(c) ((c) == ' ' || (c) == '\t' || (c) == '\n')
+
+/* All structs which contain a `next' field should have that field
+ as the first field in the struct. This means that functions
+ can be written to handle the general case for linked lists. */
+typedef struct g_list {
+ struct g_list *next;
+} GENERIC_LIST;
+
+/* Here is a generic structure for associating character strings
+ with integers. It is used in the parser for shell tokenization. */
+typedef struct {
+ char *word;
+ int token;
+} STRING_INT_ALIST;
+
+/* A macro to avoid making an uneccessary function call. */
+#define REVERSE_LIST(list, type) \
+ ((list && list->next) ? (type)list_reverse ((GENERIC_LIST *)list) \
+ : (type)(list))
+
+#if __GNUC__ > 1
+# define FASTCOPY(s, d, n) __builtin_memcpy ((d), (s), (n))
+#else /* !__GNUC__ */
+# if !defined (HAVE_BCOPY)
+# if !defined (HAVE_MEMMOVE)
+# define FASTCOPY(s, d, n) memcpy ((d), (s), (n))
+# else
+# define FASTCOPY(s, d, n) memmove ((d), (s), (n))
+# endif /* !HAVE_MEMMOVE */
+# else /* HAVE_BCOPY */
+# define FASTCOPY(s, d, n) bcopy ((s), (d), (n))
+# endif /* HAVE_BCOPY */
+#endif /* !__GNUC__ */
+
+/* String comparisons that possibly save a function call each. */
+#define STREQ(a, b) ((a)[0] == (b)[0] && strcmp(a, b) == 0)
+#define STREQN(a, b, n) ((n == 0) ? (1) \
+ : ((a)[0] == (b)[0] && strncmp(a, b, n) == 0))
+
+/* More convenience definitions that possibly save system or libc calls. */
+#define STRLEN(s) (((s) && (s)[0]) ? ((s)[1] ? ((s)[2] ? strlen(s) : 2) : 1) : 0)
+#define FREE(s) do { if (s) free (s); } while (0)
+#define MEMBER(c, s) (((c) && c == (s)[0] && !(s)[1]) || (member(c, s)))
+
+/* A fairly hairy macro to check whether an allocated string has more room,
+ and to resize it using xrealloc if it does not.
+ STR is the string (char *)
+ CIND is the current index into the string (int)
+ ROOM is the amount of additional room we need in the string (int)
+ CSIZE is the currently-allocated size of STR (int)
+ SINCR is how much to increment CSIZE before calling xrealloc (int) */
+
+#define RESIZE_MALLOCED_BUFFER(str, cind, room, csize, sincr) \
+ do { \
+ if ((cind) + (room) >= csize) \
+ { \
+ while ((cind) + (room) >= csize) \
+ csize += (sincr); \
+ str = xrealloc (str, csize); \
+ } \
+ } while (0)
+
+/* Function pointers can be declared as (Function *)foo. */
+#if !defined (_FUNCTION_DEF)
+# define _FUNCTION_DEF
+typedef int Function ();
+typedef void VFunction ();
+typedef char *CPFunction (); /* no longer used */
+typedef char **CPPFunction (); /* no longer used */
+#endif /* _FUNCTION_DEF */
+
+#ifndef SH_FUNCTION_TYPEDEF
+# define SH_FUNCTION_TYPEDEF
+
+/* Shell function typedefs with prototypes */
+/* `Generic' function pointer typedefs */
+
+typedef int sh_intfunc_t __P((int));
+typedef int sh_ivoidfunc_t __P((void));
+typedef int sh_icpfunc_t __P((char *));
+typedef int sh_icppfunc_t __P((char **));
+typedef int sh_iptrfunc_t __P((PTR_T));
+
+typedef void sh_voidfunc_t __P((void));
+typedef void sh_vintfunc_t __P((int));
+typedef void sh_vcpfunc_t __P((char *));
+typedef void sh_vcppfunc_t __P((char **));
+typedef void sh_vptrfunc_t __P((PTR_T));
+
+typedef int sh_wdesc_func_t __P((WORD_DESC *));
+typedef int sh_wlist_func_t __P((WORD_LIST *));
+
+typedef int sh_glist_func_t __P((GENERIC_LIST *));
+
+typedef char *sh_string_func_t __P((char *)); /* like savestring, et al. */
+
+typedef int sh_msg_func_t __P((const char *, ...)); /* printf(3)-like */
+typedef void sh_vmsg_func_t __P((const char *, ...)); /* printf(3)-like */
+
+/* Specific function pointer typedefs. Most of these could be done
+ with #defines. */
+typedef void sh_sv_func_t __P((char *)); /* sh_vcpfunc_t */
+typedef void sh_free_func_t __P((PTR_T)); /* sh_vptrfunc_t */
+typedef void sh_resetsig_func_t __P((int)); /* sh_vintfunc_t */
+
+typedef int sh_ignore_func_t __P((const char *)); /* sh_icpfunc_t */
+
+typedef int sh_assign_func_t __P((const char *)); /* sh_icpfunc_t */
+typedef int sh_wassign_func_t __P((WORD_DESC *));
+
+typedef int sh_builtin_func_t __P((WORD_LIST *)); /* sh_wlist_func_t */
+
+#endif /* SH_FUNCTION_TYPEDEF */
+
+#define NOW ((time_t) time ((time_t *) 0))
+
+/* Some defines for calling file status functions. */
+#define FS_EXISTS 0x1
+#define FS_EXECABLE 0x2
+#define FS_EXEC_PREFERRED 0x4
+#define FS_EXEC_ONLY 0x8
+#define FS_DIRECTORY 0x10
+#define FS_NODIRS 0x20
+#define FS_READABLE 0x40
+
+/* Default maximum for move_to_high_fd */
+#define HIGH_FD_MAX 256
+
+/* The type of function passed as the fourth argument to qsort(3). */
+#ifdef __STDC__
+typedef int QSFUNC (const void *, const void *);
+#else
+typedef int QSFUNC ();
+#endif
+
+/* Some useful definitions for Unix pathnames. Argument convention:
+ x == string, c == character */
+
+#if !defined (__CYGWIN__)
+# define ABSPATH(x) ((x)[0] == '/')
+# define RELPATH(x) ((x)[0] != '/')
+#else /* __CYGWIN__ */
+# define ABSPATH(x) (((x)[0] && ISALPHA((unsigned char)(x)[0]) && (x)[1] == ':') || ISDIRSEP((x)[0]))
+# define RELPATH(x) (ABSPATH(x) == 0)
+#endif /* __CYGWIN__ */
+
+#define ROOTEDPATH(x) (ABSPATH(x))
+
+#define DIRSEP '/'
+#if !defined (__CYGWIN__)
+# define ISDIRSEP(c) ((c) == '/')
+#else
+# define ISDIRSEP(c) ((c) == '/' || (c) == '\\')
+#endif /* __CYGWIN__ */
+#define PATHSEP(c) (ISDIRSEP(c) || (c) == 0)
+
+#if 0
+/* Declarations for functions defined in xmalloc.c */
+extern PTR_T xmalloc __P((size_t));
+extern PTR_T xrealloc __P((void *, size_t));
+extern void xfree __P((void *));
+#endif
+
+/* Declarations for functions defined in general.c */
+extern void posix_initialize __P((int));
+
+#if defined (RLIMTYPE)
+extern RLIMTYPE string_to_rlimtype __P((char *));
+extern void print_rlimtype __P((RLIMTYPE, int));
+#endif
+
+extern int all_digits __P((char *));
+extern int legal_number __P((const char *, intmax_t *));
+extern int legal_identifier __P((char *));
+extern int check_identifier __P((WORD_DESC *, int));
+extern int legal_alias_name __P((char *, int));
+extern int assignment __P((const char *, int));
+
+extern int sh_unset_nodelay_mode __P((int));
+extern int sh_validfd __P((int));
+extern void check_dev_tty __P((void));
+extern int move_to_high_fd __P((int, int, int));
+extern int check_binary_file __P((char *, int));
+
+#ifdef _POSIXSTAT_H_
+extern int same_file __P((char *, char *, struct stat *, struct stat *));
+#endif
+
+extern int sh_openpipe __P((int *));
+extern int sh_closepipe __P((int *));
+
+extern int file_exists __P((char *));
+extern int file_isdir __P((char *));
+extern int file_iswdir __P((char *));
+extern int absolute_pathname __P((const char *));
+extern int absolute_program __P((const char *));
+
+extern char *make_absolute __P((char *, char *));
+extern char *base_pathname __P((char *));
+extern char *full_pathname __P((char *));
+extern char *polite_directory_format __P((char *));
+extern char *trim_pathname __P((char *, int));
+
+extern char *extract_colon_unit __P((char *, int *));
+
+extern void tilde_initialize __P((void));
+extern char *bash_tilde_find_word __P((const char *, int, int *));
+extern char *bash_tilde_expand __P((const char *, int));
+
+extern int group_member __P((gid_t));
+extern char **get_group_list __P((int *));
+extern int *get_group_array __P((int *));
+
+#endif /* _GENERAL_H_ */
diff --git a/hashcmd.c b/hashcmd.c
new file mode 100644
index 0000000..fc0bfbe
--- /dev/null
+++ b/hashcmd.c
@@ -0,0 +1,196 @@
+/* hashcmd.c - functions for managing a hash table mapping command names to
+ full pathnames. */
+
+/* Copyright (C) 1997-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include "bashtypes.h"
+#include "posixstat.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+
+#include "shell.h"
+#include "findcmd.h"
+#include "hashcmd.h"
+
+extern int hashing_enabled;
+
+HASH_TABLE *hashed_filenames = (HASH_TABLE *)NULL;
+
+static void phash_freedata __P((PTR_T));
+
+void
+phash_create ()
+{
+ if (hashed_filenames == 0)
+ hashed_filenames = hash_create (FILENAME_HASH_BUCKETS);
+}
+
+static void
+phash_freedata (data)
+ PTR_T data;
+{
+ free (((PATH_DATA *)data)->path);
+ free (data);
+}
+
+void
+phash_flush ()
+{
+ if (hashed_filenames)
+ hash_flush (hashed_filenames, phash_freedata);
+}
+
+/* Remove FILENAME from the table of hashed commands. */
+int
+phash_remove (filename)
+ const char *filename;
+{
+ register BUCKET_CONTENTS *item;
+
+ if (hashing_enabled == 0 || hashed_filenames == 0)
+ return 0;
+
+ item = hash_remove (filename, hashed_filenames, 0);
+ if (item)
+ {
+ if (item->data)
+ phash_freedata (item->data);
+ free (item->key);
+ free (item);
+ return 0;
+ }
+ return 1;
+}
+
+/* Place FILENAME (key) and FULL_PATH (data->path) into the
+ hash table. CHECK_DOT if non-null is for future calls to
+ phash_search (); it means that this file was found
+ in a directory in $PATH that is not an absolute pathname.
+ FOUND is the initial value for times_found. */
+void
+phash_insert (filename, full_path, check_dot, found)
+ char *filename, *full_path;
+ int check_dot, found;
+{
+ register BUCKET_CONTENTS *item;
+
+ if (hashing_enabled == 0)
+ return;
+
+ if (hashed_filenames == 0)
+ phash_create ();
+
+ item = hash_insert (filename, hashed_filenames, 0);
+ if (item->data)
+ free (pathdata(item)->path);
+ else
+ {
+ item->key = savestring (filename);
+ item->data = xmalloc (sizeof (PATH_DATA));
+ }
+ pathdata(item)->path = savestring (full_path);
+ pathdata(item)->flags = 0;
+ if (check_dot)
+ pathdata(item)->flags |= HASH_CHKDOT;
+ if (*full_path != '/')
+ pathdata(item)->flags |= HASH_RELPATH;
+ item->times_found = found;
+}
+
+/* Return the full pathname that FILENAME hashes to. If FILENAME
+ is hashed, but (data->flags & HASH_CHKDOT) is non-zero, check
+ ./FILENAME and return that if it is executable. This always
+ returns a newly-allocated string; the caller is responsible
+ for freeing it. */
+char *
+phash_search (filename)
+ const char *filename;
+{
+ register BUCKET_CONTENTS *item;
+ char *path, *dotted_filename, *tail;
+ int same;
+
+ if (hashing_enabled == 0 || hashed_filenames == 0)
+ return ((char *)NULL);
+
+ item = hash_search (filename, hashed_filenames, 0);
+
+ if (item == NULL)
+ return ((char *)NULL);
+
+ /* If this filename is hashed, but `.' comes before it in the path,
+ see if ./filename is executable. If the hashed value is not an
+ absolute pathname, see if ./`hashed-value' exists. */
+ path = pathdata(item)->path;
+ if (pathdata(item)->flags & (HASH_CHKDOT|HASH_RELPATH))
+ {
+ tail = (pathdata(item)->flags & HASH_RELPATH) ? path : (char *)filename; /* XXX - fix const later */
+ /* If the pathname does not start with a `./', add a `./' to it. */
+ if (tail[0] != '.' || tail[1] != '/')
+ {
+ dotted_filename = (char *)xmalloc (3 + strlen (tail));
+ dotted_filename[0] = '.'; dotted_filename[1] = '/';
+ strcpy (dotted_filename + 2, tail);
+ }
+ else
+ dotted_filename = savestring (tail);
+
+ if (executable_file (dotted_filename))
+ return (dotted_filename);
+
+ free (dotted_filename);
+
+#if 0
+ if (pathdata(item)->flags & HASH_RELPATH)
+ return ((char *)NULL);
+#endif
+
+ /* Watch out. If this file was hashed to "./filename", and
+ "./filename" is not executable, then return NULL. */
+
+ /* Since we already know "./filename" is not executable, what
+ we're really interested in is whether or not the `path'
+ portion of the hashed filename is equivalent to the current
+ directory, but only if it starts with a `.'. (This catches
+ ./. and so on.) same_file () tests general Unix file
+ equivalence -- same device and inode. */
+ if (*path == '.')
+ {
+ same = 0;
+ tail = (char *)strrchr (path, '/');
+
+ if (tail)
+ {
+ *tail = '\0';
+ same = same_file (".", path, (struct stat *)NULL, (struct stat *)NULL);
+ *tail = '/';
+ }
+
+ return same ? (char *)NULL : savestring (path);
+ }
+ }
+
+ return (savestring (path));
+}
diff --git a/hashcmd.h b/hashcmd.h
new file mode 100644
index 0000000..758f5b4
--- /dev/null
+++ b/hashcmd.h
@@ -0,0 +1,43 @@
+/* hashcmd.h - Common defines for hashing filenames. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "stdc.h"
+#include "hashlib.h"
+
+#define FILENAME_HASH_BUCKETS 64 /* must be power of two */
+
+extern HASH_TABLE *hashed_filenames;
+
+typedef struct _pathdata {
+ char *path; /* The full pathname of the file. */
+ int flags;
+} PATH_DATA;
+
+#define HASH_RELPATH 0x01 /* this filename is a relative pathname. */
+#define HASH_CHKDOT 0x02 /* check `.' since it was earlier in $PATH */
+
+#define pathdata(x) ((PATH_DATA *)(x)->data)
+
+extern void phash_create __P((void));
+extern void phash_flush __P((void));
+
+extern void phash_insert __P((char *, char *, int, int));
+extern int phash_remove __P((const char *));
+extern char *phash_search __P((const char *));
diff --git a/hashlib.c b/hashlib.c
new file mode 100644
index 0000000..ea67dfc
--- /dev/null
+++ b/hashlib.c
@@ -0,0 +1,442 @@
+/* hashlib.c -- functions to manage and access hash tables for bash. */
+
+/* Copyright (C) 1987,1989,1991,1995,1998,2001,2003,2005,2006,2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include "bashansi.h"
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+
+#include "shell.h"
+#include "hashlib.h"
+
+/* Rely on properties of unsigned division (unsigned/int -> unsigned) and
+ don't discard the upper 32 bits of the value, if present. */
+#define HASH_BUCKET(s, t, h) (((h) = hash_string (s)) & ((t)->nbuckets - 1))
+
+static BUCKET_CONTENTS *copy_bucket_array __P((BUCKET_CONTENTS *, sh_string_func_t *));
+
+/* Make a new hash table with BUCKETS number of buckets. Initialize
+ each slot in the table to NULL. */
+HASH_TABLE *
+hash_create (buckets)
+ int buckets;
+{
+ HASH_TABLE *new_table;
+ register int i;
+
+ new_table = (HASH_TABLE *)xmalloc (sizeof (HASH_TABLE));
+ if (buckets == 0)
+ buckets = DEFAULT_HASH_BUCKETS;
+
+ new_table->bucket_array =
+ (BUCKET_CONTENTS **)xmalloc (buckets * sizeof (BUCKET_CONTENTS *));
+ new_table->nbuckets = buckets;
+ new_table->nentries = 0;
+
+ for (i = 0; i < buckets; i++)
+ new_table->bucket_array[i] = (BUCKET_CONTENTS *)NULL;
+
+ return (new_table);
+}
+
+int
+hash_size (table)
+ HASH_TABLE *table;
+{
+ return (HASH_ENTRIES(table));
+}
+
+static BUCKET_CONTENTS *
+copy_bucket_array (ba, cpdata)
+ BUCKET_CONTENTS *ba;
+ sh_string_func_t *cpdata; /* data copy function */
+{
+ BUCKET_CONTENTS *new_bucket, *n, *e;
+
+ if (ba == 0)
+ return ((BUCKET_CONTENTS *)0);
+
+ for (n = (BUCKET_CONTENTS *)0, e = ba; e; e = e->next)
+ {
+ if (n == 0)
+ {
+ new_bucket = (BUCKET_CONTENTS *)xmalloc (sizeof (BUCKET_CONTENTS));
+ n = new_bucket;
+ }
+ else
+ {
+ n->next = (BUCKET_CONTENTS *)xmalloc (sizeof (BUCKET_CONTENTS));
+ n = n->next;
+ }
+
+ n->key = savestring (e->key);
+ n->data = e->data ? (cpdata ? (*cpdata) (e->data) : savestring (e->data))
+ : NULL;
+ n->khash = e->khash;
+ n->times_found = e->times_found;
+ n->next = (BUCKET_CONTENTS *)NULL;
+ }
+
+ return new_bucket;
+}
+
+HASH_TABLE *
+hash_copy (table, cpdata)
+ HASH_TABLE *table;
+ sh_string_func_t *cpdata;
+{
+ HASH_TABLE *new_table;
+ int i;
+
+ if (table == 0)
+ return ((HASH_TABLE *)NULL);
+
+ new_table = hash_create (table->nbuckets);
+
+ for (i = 0; i < table->nbuckets; i++)
+ new_table->bucket_array[i] = copy_bucket_array (table->bucket_array[i], cpdata);
+
+ new_table->nentries = table->nentries;
+ return new_table;
+}
+
+/* The `khash' check below requires that strings that compare equally with
+ strcmp hash to the same value. */
+unsigned int
+hash_string (s)
+ const char *s;
+{
+ register unsigned int i;
+
+ /* This is the best string hash function I found.
+
+ The magic is in the interesting relationship between the special prime
+ 16777619 (2^24 + 403) and 2^32 and 2^8. */
+
+ for (i = 0; *s; s++)
+ {
+ i *= 16777619;
+ i ^= *s;
+ }
+
+ return i;
+}
+
+/* Return the location of the bucket which should contain the data
+ for STRING. TABLE is a pointer to a HASH_TABLE. */
+
+int
+hash_bucket (string, table)
+ const char *string;
+ HASH_TABLE *table;
+{
+ unsigned int h;
+
+ return (HASH_BUCKET (string, table, h));
+}
+
+/* Return a pointer to the hashed item. If the HASH_CREATE flag is passed,
+ create a new hash table entry for STRING, otherwise return NULL. */
+BUCKET_CONTENTS *
+hash_search (string, table, flags)
+ const char *string;
+ HASH_TABLE *table;
+ int flags;
+{
+ BUCKET_CONTENTS *list;
+ int bucket;
+ unsigned int hv;
+
+ if (table == 0 || ((flags & HASH_CREATE) == 0 && HASH_ENTRIES (table) == 0))
+ return (BUCKET_CONTENTS *)NULL;
+
+ bucket = HASH_BUCKET (string, table, hv);
+
+ for (list = table->bucket_array ? table->bucket_array[bucket] : 0; list; list = list->next)
+ {
+ if (hv == list->khash && STREQ (list->key, string))
+ {
+ list->times_found++;
+ return (list);
+ }
+ }
+
+ if (flags & HASH_CREATE)
+ {
+ list = (BUCKET_CONTENTS *)xmalloc (sizeof (BUCKET_CONTENTS));
+ list->next = table->bucket_array[bucket];
+ table->bucket_array[bucket] = list;
+
+ list->data = NULL;
+ list->key = (char *)string; /* XXX fix later */
+ list->khash = hv;
+ list->times_found = 0;
+
+ table->nentries++;
+ return (list);
+ }
+
+ return (BUCKET_CONTENTS *)NULL;
+}
+
+/* Remove the item specified by STRING from the hash table TABLE.
+ The item removed is returned, so you can free its contents. If
+ the item isn't in this table NULL is returned. */
+BUCKET_CONTENTS *
+hash_remove (string, table, flags)
+ const char *string;
+ HASH_TABLE *table;
+ int flags;
+{
+ int bucket;
+ BUCKET_CONTENTS *prev, *temp;
+ unsigned int hv;
+
+ if (table == 0 || HASH_ENTRIES (table) == 0)
+ return (BUCKET_CONTENTS *)NULL;
+
+ bucket = HASH_BUCKET (string, table, hv);
+ prev = (BUCKET_CONTENTS *)NULL;
+ for (temp = table->bucket_array[bucket]; temp; temp = temp->next)
+ {
+ if (hv == temp->khash && STREQ (temp->key, string))
+ {
+ if (prev)
+ prev->next = temp->next;
+ else
+ table->bucket_array[bucket] = temp->next;
+
+ table->nentries--;
+ return (temp);
+ }
+ prev = temp;
+ }
+ return ((BUCKET_CONTENTS *) NULL);
+}
+
+/* Create an entry for STRING, in TABLE. If the entry already
+ exists, then return it (unless the HASH_NOSRCH flag is set). */
+BUCKET_CONTENTS *
+hash_insert (string, table, flags)
+ char *string;
+ HASH_TABLE *table;
+ int flags;
+{
+ BUCKET_CONTENTS *item;
+ int bucket;
+ unsigned int hv;
+
+ if (table == 0)
+ table = hash_create (0);
+
+ item = (flags & HASH_NOSRCH) ? (BUCKET_CONTENTS *)NULL
+ : hash_search (string, table, 0);
+
+ if (item == 0)
+ {
+ bucket = HASH_BUCKET (string, table, hv);
+
+ item = (BUCKET_CONTENTS *)xmalloc (sizeof (BUCKET_CONTENTS));
+ item->next = table->bucket_array[bucket];
+ table->bucket_array[bucket] = item;
+
+ item->data = NULL;
+ item->key = string;
+ item->khash = hv;
+ item->times_found = 0;
+
+ table->nentries++;
+ }
+
+ return (item);
+}
+
+/* Remove and discard all entries in TABLE. If FREE_DATA is non-null, it
+ is a function to call to dispose of a hash item's data. Otherwise,
+ free() is called. */
+void
+hash_flush (table, free_data)
+ HASH_TABLE *table;
+ sh_free_func_t *free_data;
+{
+ int i;
+ register BUCKET_CONTENTS *bucket, *item;
+
+ if (table == 0 || HASH_ENTRIES (table) == 0)
+ return;
+
+ for (i = 0; i < table->nbuckets; i++)
+ {
+ bucket = table->bucket_array[i];
+
+ while (bucket)
+ {
+ item = bucket;
+ bucket = bucket->next;
+
+ if (free_data)
+ (*free_data) (item->data);
+ else
+ free (item->data);
+ free (item->key);
+ free (item);
+ }
+ table->bucket_array[i] = (BUCKET_CONTENTS *)NULL;
+ }
+
+ table->nentries = 0;
+}
+
+/* Free the hash table pointed to by TABLE. */
+void
+hash_dispose (table)
+ HASH_TABLE *table;
+{
+ free (table->bucket_array);
+ free (table);
+}
+
+void
+hash_walk (table, func)
+ HASH_TABLE *table;
+ hash_wfunc *func;
+{
+ register int i;
+ BUCKET_CONTENTS *item;
+
+ if (table == 0 || HASH_ENTRIES (table) == 0)
+ return;
+
+ for (i = 0; i < table->nbuckets; i++)
+ {
+ for (item = hash_items (i, table); item; item = item->next)
+ if ((*func) (item) < 0)
+ return;
+ }
+}
+
+#if defined (DEBUG) || defined (TEST_HASHING)
+void
+hash_pstats (table, name)
+ HASH_TABLE *table;
+ char *name;
+{
+ register int slot, bcount;
+ register BUCKET_CONTENTS *bc;
+
+ if (name == 0)
+ name = "unknown hash table";
+
+ fprintf (stderr, "%s: %d buckets; %d items\n", name, table->nbuckets, table->nentries);
+
+ /* Print out a count of how many strings hashed to each bucket, so we can
+ see how even the distribution is. */
+ for (slot = 0; slot < table->nbuckets; slot++)
+ {
+ bc = hash_items (slot, table);
+
+ fprintf (stderr, "\tslot %3d: ", slot);
+ for (bcount = 0; bc; bc = bc->next)
+ bcount++;
+
+ fprintf (stderr, "%d\n", bcount);
+ }
+}
+#endif
+
+#ifdef TEST_HASHING
+
+/* link with xmalloc.o and lib/malloc/libmalloc.a */
+#undef NULL
+#include <stdio.h>
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+HASH_TABLE *table, *ntable;
+
+int interrupt_immediately = 0;
+
+int
+signal_is_trapped (s)
+ int s;
+{
+ return (0);
+}
+
+void
+programming_error (const char *format, ...)
+{
+ abort();
+}
+
+void
+fatal_error (const char *format, ...)
+{
+ abort();
+}
+
+main ()
+{
+ char string[256];
+ int count = 0;
+ BUCKET_CONTENTS *tt;
+
+ table = hash_create (0);
+
+ for (;;)
+ {
+ char *temp_string;
+ if (fgets (string, sizeof (string), stdin) == 0)
+ break;
+ if (!*string)
+ break;
+ temp_string = savestring (string);
+ tt = hash_insert (temp_string, table, 0);
+ if (tt->times_found)
+ {
+ fprintf (stderr, "You have already added item `%s'\n", string);
+ free (temp_string);
+ }
+ else
+ {
+ count++;
+ }
+ }
+
+ hash_pstats (table, "hash test");
+
+ ntable = hash_copy (table, (sh_string_func_t *)NULL);
+ hash_flush (table, (sh_free_func_t *)NULL);
+ hash_pstats (ntable, "hash copy test");
+
+ exit (0);
+}
+
+#endif /* TEST_HASHING */
diff --git a/hashlib.h b/hashlib.h
new file mode 100644
index 0000000..4620e42
--- /dev/null
+++ b/hashlib.h
@@ -0,0 +1,92 @@
+/* hashlib.h -- the data structures used in hashing in Bash. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_HASHLIB_H_)
+#define _HASHLIB_H_
+
+#include "stdc.h"
+
+#ifndef PTR_T
+# ifdef __STDC__
+# define PTR_T void *
+# else
+# define PTR_T char *
+# endif
+#endif
+
+typedef struct bucket_contents {
+ struct bucket_contents *next; /* Link to next hashed key in this bucket. */
+ char *key; /* What we look up. */
+ PTR_T data; /* What we really want. */
+ unsigned int khash; /* What key hashes to */
+ int times_found; /* Number of times this item has been found. */
+} BUCKET_CONTENTS;
+
+typedef struct hash_table {
+ BUCKET_CONTENTS **bucket_array; /* Where the data is kept. */
+ int nbuckets; /* How many buckets does this table have. */
+ int nentries; /* How many entries does this table have. */
+} HASH_TABLE;
+
+typedef int hash_wfunc __P((BUCKET_CONTENTS *));
+
+/* Operations on tables as a whole */
+extern HASH_TABLE *hash_create __P((int));
+extern HASH_TABLE *hash_copy __P((HASH_TABLE *, sh_string_func_t *));
+extern void hash_flush __P((HASH_TABLE *, sh_free_func_t *));
+extern void hash_dispose __P((HASH_TABLE *));
+extern void hash_walk __P((HASH_TABLE *, hash_wfunc *));
+
+/* Operations to extract information from or pieces of tables */
+extern int hash_bucket __P((const char *, HASH_TABLE *));
+extern int hash_size __P((HASH_TABLE *));
+
+/* Operations on hash table entries */
+extern BUCKET_CONTENTS *hash_search __P((const char *, HASH_TABLE *, int));
+extern BUCKET_CONTENTS *hash_insert __P((char *, HASH_TABLE *, int));
+extern BUCKET_CONTENTS *hash_remove __P((const char *, HASH_TABLE *, int));
+
+/* Miscellaneous */
+extern unsigned int hash_string __P((const char *));
+
+/* Redefine the function as a macro for speed. */
+#define hash_items(bucket, table) \
+ ((table && (bucket < table->nbuckets)) ? \
+ table->bucket_array[bucket] : \
+ (BUCKET_CONTENTS *)NULL)
+
+/* Default number of buckets in the hash table. */
+#define DEFAULT_HASH_BUCKETS 64 /* was 107, then 53, must be power of two now */
+
+#define HASH_ENTRIES(ht) ((ht) ? (ht)->nentries : 0)
+
+/* flags for hash_search and hash_insert */
+#define HASH_NOSRCH 0x01
+#define HASH_CREATE 0x02
+
+#if !defined (NULL)
+# if defined (__STDC__)
+# define NULL ((void *) 0)
+# else
+# define NULL 0x0
+# endif /* !__STDC__ */
+#endif /* !NULL */
+
+#endif /* _HASHLIB_H */
diff --git a/include/ansi_stdlib.h b/include/ansi_stdlib.h
new file mode 100644
index 0000000..7dc2ee0
--- /dev/null
+++ b/include/ansi_stdlib.h
@@ -0,0 +1,54 @@
+/* ansi_stdlib.h -- An ANSI Standard stdlib.h. */
+/* A minimal stdlib.h containing extern declarations for those functions
+ that bash uses. */
+
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_STDLIB_H_)
+#define _STDLIB_H_ 1
+
+/* String conversion functions. */
+extern int atoi ();
+
+extern double atof ();
+extern double strtod ();
+
+/* Memory allocation functions. */
+/* Generic pointer type. */
+#ifndef PTR_T
+
+#if defined (__STDC__)
+# define PTR_T void *
+#else
+# define PTR_T char *
+#endif
+
+#endif /* PTR_T */
+
+extern PTR_T malloc ();
+extern PTR_T realloc ();
+extern void free ();
+
+/* Other miscellaneous functions. */
+extern void abort ();
+extern void exit ();
+extern char *getenv ();
+extern void qsort ();
+
+#endif /* _STDLIB_H */
diff --git a/include/chartypes.h b/include/chartypes.h
new file mode 100644
index 0000000..0560769
--- /dev/null
+++ b/include/chartypes.h
@@ -0,0 +1,113 @@
+/* chartypes.h -- extend ctype.h */
+
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _SH_CHARTYPES_H
+#define _SH_CHARTYPES_H
+
+#include <ctype.h>
+
+/* Jim Meyering writes:
+
+ "... Some ctype macros are valid only for character codes that
+ isascii says are ASCII (SGI's IRIX-4.0.5 is one such system --when
+ using /bin/cc or gcc but without giving an ansi option). So, all
+ ctype uses should be through macros like ISPRINT... If
+ STDC_HEADERS is defined, then autoconf has verified that the ctype
+ macros don't need to be guarded with references to isascii. ...
+ Defining IN_CTYPE_DOMAIN to 1 should let any compiler worth its salt
+ eliminate the && through constant folding."
+ Solaris defines some of these symbols so we must undefine them first. */
+
+#if defined STDC_HEADERS || (!defined isascii && !defined HAVE_ISASCII)
+# define IN_CTYPE_DOMAIN(c) 1
+#else
+# define IN_CTYPE_DOMAIN(c) isascii(c)
+#endif
+
+#if !defined (isspace) && !defined (HAVE_ISSPACE)
+# define isspace(c) ((c) == ' ' || (c) == '\t' || (c) == '\n' || (c) == '\f')
+#endif
+
+#if !defined (isprint) && !defined (HAVE_ISPRINT)
+# define isprint(c) (isalpha(c) || isdigit(c) || ispunct(c))
+#endif
+
+#if defined (isblank) || defined (HAVE_ISBLANK)
+# define ISBLANK(c) (IN_CTYPE_DOMAIN (c) && isblank (c))
+#else
+# define ISBLANK(c) ((c) == ' ' || (c) == '\t')
+#endif
+
+#if defined (isgraph) || defined (HAVE_ISGRAPH)
+# define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isgraph (c))
+#else
+# define ISGRAPH(c) (IN_CTYPE_DOMAIN (c) && isprint (c) && !isspace (c))
+#endif
+
+#if !defined (isxdigit) && !defined (HAVE_ISXDIGIT)
+# define isxdigit(c) (((c) >= '0' && (c) <= '9') || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
+#endif
+
+#undef ISPRINT
+
+#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c))
+#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))
+#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c))
+#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c))
+#define ISCNTRL(c) (IN_CTYPE_DOMAIN (c) && iscntrl (c))
+#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c))
+#define ISPUNCT(c) (IN_CTYPE_DOMAIN (c) && ispunct (c))
+#define ISSPACE(c) (IN_CTYPE_DOMAIN (c) && isspace (c))
+#define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c))
+#define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c))
+
+#define ISLETTER(c) (ISALPHA(c))
+
+#define DIGIT(c) ((c) >= '0' && (c) <= '9')
+
+#define ISWORD(c) (ISLETTER(c) || DIGIT(c) || ((c) == '_'))
+
+#define HEXVALUE(c) \
+ (((c) >= 'a' && (c) <= 'f') \
+ ? (c)-'a'+10 \
+ : (c) >= 'A' && (c) <= 'F' ? (c)-'A'+10 : (c)-'0')
+
+#ifndef ISOCTAL
+# define ISOCTAL(c) ((c) >= '0' && (c) <= '7')
+#endif
+#define OCTVALUE(c) ((c) - '0')
+
+#define TODIGIT(c) ((c) - '0')
+#define TOCHAR(c) ((c) + '0')
+
+#define TOLOWER(c) (ISUPPER(c) ? tolower(c) : (c))
+#define TOUPPER(c) (ISLOWER(c) ? toupper(c) : (c))
+
+#ifndef TOCTRL
+ /* letter to control char -- ASCII. The TOUPPER is in there so \ce and
+ \cE will map to the same character in $'...' expansions. */
+# define TOCTRL(x) (TOUPPER(x) & 037)
+#endif
+#ifndef UNCTRL
+ /* control char to letter -- ASCII */
+# define UNCTRL(x) (TOUPPER((x) | 0x40))
+#endif
+
+#endif /* _SH_CHARTYPES_H */
diff --git a/include/filecntl.h b/include/filecntl.h
new file mode 100644
index 0000000..31667a1
--- /dev/null
+++ b/include/filecntl.h
@@ -0,0 +1,45 @@
+/* filecntl.h - Definitions to set file descriptors to close-on-exec. */
+
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_FILECNTL_H_)
+#define _FILECNTL_H_
+
+#include <fcntl.h>
+
+/* Definitions to set file descriptors to close-on-exec, the Posix way. */
+#if !defined (FD_CLOEXEC)
+#define FD_CLOEXEC 1
+#endif
+
+#define FD_NCLOEXEC 0
+
+#define SET_CLOSE_ON_EXEC(fd) (fcntl ((fd), F_SETFD, FD_CLOEXEC))
+#define SET_OPEN_ON_EXEC(fd) (fcntl ((fd), F_SETFD, FD_NCLOEXEC))
+
+/* How to open a file in non-blocking mode, the Posix.1 way. */
+#if !defined (O_NONBLOCK)
+# if defined (O_NDELAY)
+# define O_NONBLOCK O_NDELAY
+# else
+# define O_NONBLOCK 0
+# endif
+#endif
+
+#endif /* ! _FILECNTL_H_ */
diff --git a/include/gettext.h b/include/gettext.h
new file mode 100644
index 0000000..97a1f36
--- /dev/null
+++ b/include/gettext.h
@@ -0,0 +1,70 @@
+/* Convenience header for conditional use of GNU <libintl.h>.
+ Copyright (C) 1995-1998, 2000-2002, 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne-Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _LIBGETTEXT_H
+#define _LIBGETTEXT_H 1
+
+/* NLS can be disabled through the configure --disable-nls option. */
+#if ENABLE_NLS
+
+/* Get declarations of GNU message catalog functions. */
+# include <libintl.h>
+
+#else
+
+/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
+ chokes if dcgettext is defined as a macro. So include it now, to make
+ later inclusions of <locale.h> a NOP. We don't include <libintl.h>
+ as well because people using "gettext.h" will not include <libintl.h>,
+ and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
+ is OK. */
+#if defined(__sun)
+# include <locale.h>
+#endif
+
+/* Disabled NLS.
+ The casts to 'const char *' serve the purpose of producing warnings
+ for invalid uses of the value returned from these functions.
+ On pre-ANSI systems without 'const', the config.h file is supposed to
+ contain "#define const". */
+# define gettext(Msgid) ((const char *) (Msgid))
+# define dgettext(Domainname, Msgid) ((const char *) (Msgid))
+# define dcgettext(Domainname, Msgid, Category) ((const char *) (Msgid))
+# define ngettext(Msgid1, Msgid2, N) \
+ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+# define dngettext(Domainname, Msgid1, Msgid2, N) \
+ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
+ ((N) == 1 ? (const char *) (Msgid1) : (const char *) (Msgid2))
+# define textdomain(Domainname) ((const char *) (Domainname))
+# define bindtextdomain(Domainname, Dirname) ((const char *) (Dirname))
+# define bind_textdomain_codeset(Domainname, Codeset) ((const char *) (Codeset))
+
+#endif
+
+/* A pseudo function call that serves as a marker for the automated
+ extraction of messages, but does not call gettext(). The run-time
+ translation is done at a different place in the code.
+ The argument, String, should be a literal string. Concatenated strings
+ and other string expressions won't work.
+ The macro's expansion is not parenthesized, so that it is suitable as
+ initializer for static 'char[]' or 'const char[]' variables. */
+#define gettext_noop(String) String
+
+#endif /* _LIBGETTEXT_H */
diff --git a/include/maxpath.h b/include/maxpath.h
new file mode 100644
index 0000000..db2e1fb
--- /dev/null
+++ b/include/maxpath.h
@@ -0,0 +1,75 @@
+/* maxpath.h - Find out what this system thinks PATH_MAX and NAME_MAX are. */
+
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_MAXPATH_H_)
+#define _MAXPATH_H_
+
+/* These values are supposed to be in <limits.h> or one of the files
+ it includes. */
+#if defined (HAVE_LIMITS_H)
+# include <limits.h>
+#endif /* !HAVE_LIMITS_H */
+
+/* If PATH_MAX is not defined, look for MAXPATHLEN */
+#if !defined (PATH_MAX)
+# if defined (HAVE_SYS_PARAM_H)
+# include <sys/param.h>
+# define maxpath_param_h
+# endif
+# if defined (MAXPATHLEN) && !defined (PATH_MAX)
+# define PATH_MAX MAXPATHLEN
+# endif /* MAXPATHLEN && !PATH_MAX */
+#endif /* !PATH_MAX */
+
+/* If NAME_MAX is not defined, look for MAXNAMLEN */
+#if !defined (NAME_MAX)
+# if defined (HAVE_SYS_PARAM_H) && !defined (maxpath_param_h)
+# include <sys/param.h>
+# endif
+# if defined (MAXNAMLEN) && !defined (NAME_MAX)
+# define NAME_MAX MAXNAMLEN
+# endif /* MAXNAMLEN && !NAME_MAX */
+#endif /* !NAME_MAX */
+
+/* Default POSIX values */
+#if !defined (PATH_MAX) && defined (_POSIX_PATH_MAX)
+# define PATH_MAX _POSIX_PATH_MAX
+#endif
+
+#if !defined (NAME_MAX) && defined (_POSIX_NAME_MAX)
+# define NAME_MAX _POSIX_NAME_MAX
+#endif
+
+
+/* Default values */
+#if !defined (PATH_MAX)
+# define PATH_MAX 1024
+#endif
+
+#if !defined (NAME_MAX)
+# define NAME_MAX 14
+#endif
+
+#if PATH_MAX < 1024
+# undef PATH_MAX
+# define PATH_MAX 1024
+#endif
+
+#endif /* _MAXPATH_H_ */
diff --git a/include/memalloc.h b/include/memalloc.h
new file mode 100644
index 0000000..57318b9
--- /dev/null
+++ b/include/memalloc.h
@@ -0,0 +1,62 @@
+/* memalloc.h -- consolidate code for including alloca.h or malloc.h and
+ defining alloca. */
+
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_MEMALLOC_H_)
+# define _MEMALLOC_H_
+
+#if defined (sparc) && defined (sun) && !defined (HAVE_ALLOCA_H)
+# define HAVE_ALLOCA_H
+#endif
+
+#if defined (__GNUC__) && !defined (HAVE_ALLOCA)
+# define HAVE_ALLOCA
+#endif
+
+#if defined (HAVE_ALLOCA_H) && !defined (HAVE_ALLOCA) && !defined (C_ALLOCA)
+# define HAVE_ALLOCA
+#endif /* HAVE_ALLOCA_H && !HAVE_ALLOCA */
+
+#if defined (__GNUC__) && !defined (C_ALLOCA)
+# undef alloca
+# define alloca __builtin_alloca
+#else /* !__GNUC__ || C_ALLOCA */
+# if defined (HAVE_ALLOCA_H) && !defined (C_ALLOCA)
+# if defined (IBMESA)
+# include <malloc.h>
+# else /* !IBMESA */
+# include <alloca.h>
+# endif /* !IBMESA */
+# else /* !HAVE_ALLOCA_H || C_ALLOCA */
+# if defined (__hpux) && defined (__STDC__) && !defined (alloca)
+extern void *alloca ();
+# else
+# if !defined (alloca)
+# if defined (__STDC__)
+extern void *alloca (size_t);
+# else
+extern char *alloca ();
+# endif /* !__STDC__ */
+# endif /* !alloca */
+# endif /* !__hpux || !__STDC__ && !alloca */
+# endif /* !HAVE_ALLOCA_H || C_ALLOCA */
+#endif /* !__GNUC__ || C_ALLOCA */
+
+#endif /* _MEMALLOC_H_ */
diff --git a/include/ocache.h b/include/ocache.h
new file mode 100644
index 0000000..c596c27
--- /dev/null
+++ b/include/ocache.h
@@ -0,0 +1,133 @@
+/* ocache.h -- a minimal object caching implementation. */
+
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_OCACHE_H_)
+#define _OCACHE_H_ 1
+
+#ifndef PTR_T
+
+#if defined (__STDC__)
+# define PTR_T void *
+#else
+# define PTR_T char *
+#endif
+
+#endif /* PTR_T */
+
+#define OC_MEMSET(memp, xch, nbytes) \
+do { \
+ if ((nbytes) <= 32) { \
+ register char * mzp = (char *)(memp); \
+ unsigned long mctmp = (nbytes); \
+ register long mcn; \
+ if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp &= 7; } \
+ switch (mctmp) { \
+ case 0: for(;;) { *mzp++ = xch; \
+ case 7: *mzp++ = xch; \
+ case 6: *mzp++ = xch; \
+ case 5: *mzp++ = xch; \
+ case 4: *mzp++ = xch; \
+ case 3: *mzp++ = xch; \
+ case 2: *mzp++ = xch; \
+ case 1: *mzp++ = xch; if(mcn <= 0) break; mcn--; } \
+ } \
+ } else \
+ memset ((memp), (xch), (nbytes)); \
+} while(0)
+
+typedef struct objcache {
+ PTR_T data;
+ int cs; /* cache size, number of objects */
+ int nc; /* number of cache entries */
+} sh_obj_cache_t;
+
+/* Create an object cache C of N pointers to OTYPE. */
+#define ocache_create(c, otype, n) \
+ do { \
+ (c).data = xmalloc((n) * sizeof (otype *)); \
+ (c).cs = (n); \
+ (c).nc = 0; \
+ } while (0)
+
+/* Destroy an object cache C. */
+#define ocache_destroy(c) \
+ do { \
+ if ((c).data) \
+ xfree ((c).data); \
+ (c).data = 0; \
+ (c).cs = (c).nc = 0; \
+ } while (0)
+
+/* Free all cached items, which are pointers to OTYPE, in object cache C. */
+#define ocache_flush(c, otype) \
+ do { \
+ while ((c).nc > 0) \
+ xfree (((otype **)((c).data))[--(c).nc]); \
+ } while (0)
+
+/*
+ * Allocate a new item of type pointer to OTYPE, using data from object
+ * cache C if any cached items exist, otherwise calling xmalloc. Return
+ * the object in R.
+ */
+#define ocache_alloc(c, otype, r) \
+ do { \
+ if ((c).nc > 0) { \
+ (r) = (otype *)((otype **)((c).data))[--(c).nc]; \
+ } else \
+ (r) = (otype *)xmalloc (sizeof (otype)); \
+ } while (0)
+
+/*
+ * Free an item R of type pointer to OTYPE, adding to object cache C if
+ * there is room and calling xfree if the cache is full. If R is added
+ * to the object cache, the contents are scrambled.
+ */
+#define ocache_free(c, otype, r) \
+ do { \
+ if ((c).nc < (c).cs) { \
+ OC_MEMSET ((r), 0xdf, sizeof(otype)); \
+ ((otype **)((c).data))[(c).nc++] = (r); \
+ } else \
+ xfree (r); \
+ } while (0)
+
+/*
+ * One may declare and use an object cache as (for instance):
+ *
+ * sh_obj_cache_t wdcache = {0, 0, 0};
+ * sh_obj_cache_t wlcache = {0, 0, 0};
+ *
+ * ocache_create(wdcache, WORD_DESC, 30);
+ * ocache_create(wlcache, WORD_LIST, 30);
+ *
+ * WORD_DESC *wd;
+ * ocache_alloc (wdcache, WORD_DESC, wd);
+ *
+ * WORD_LIST *wl;
+ * ocache_alloc (wlcache, WORD_LIST, wl);
+ *
+ * ocache_free(wdcache, WORD_DESC, wd);
+ * ocache_free(wlcache, WORD_LIST, wl);
+ *
+ * The use is almost arbitrary.
+ */
+
+#endif /* _OCACHE_H */
diff --git a/include/posixdir.h b/include/posixdir.h
new file mode 100644
index 0000000..bd33694
--- /dev/null
+++ b/include/posixdir.h
@@ -0,0 +1,61 @@
+/* posixdir.h -- Posix directory reading includes and defines. */
+
+/* Copyright (C) 1987,1991 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* This file should be included instead of <dirent.h> or <sys/dir.h>. */
+
+#if !defined (_POSIXDIR_H_)
+#define _POSIXDIR_H_
+
+#if defined (HAVE_DIRENT_H)
+# include <dirent.h>
+# if defined (HAVE_STRUCT_DIRENT_D_NAMLEN)
+# define D_NAMLEN(d) ((d)->d_namlen)
+# else
+# define D_NAMLEN(d) (strlen ((d)->d_name))
+# endif /* !HAVE_STRUCT_DIRENT_D_NAMLEN */
+#else
+# if defined (HAVE_SYS_NDIR_H)
+# include <sys/ndir.h>
+# endif
+# if defined (HAVE_SYS_DIR_H)
+# include <sys/dir.h>
+# endif
+# if defined (HAVE_NDIR_H)
+# include <ndir.h>
+# endif
+# if !defined (dirent)
+# define dirent direct
+# endif /* !dirent */
+# define D_NAMLEN(d) ((d)->d_namlen)
+#endif /* !HAVE_DIRENT_H */
+
+#if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (HAVE_STRUCT_DIRENT_D_FILENO)
+# define d_fileno d_ino
+#endif
+
+#if defined (_POSIX_SOURCE) && (!defined (HAVE_STRUCT_DIRENT_D_INO) || defined (BROKEN_DIRENT_D_INO))
+/* Posix does not require that the d_ino field be present, and some
+ systems do not provide it. */
+# define REAL_DIR_ENTRY(dp) 1
+#else
+# define REAL_DIR_ENTRY(dp) (dp->d_ino != 0)
+#endif /* _POSIX_SOURCE */
+
+#endif /* !_POSIXDIR_H_ */
diff --git a/include/posixjmp.h b/include/posixjmp.h
new file mode 100644
index 0000000..49bfecf
--- /dev/null
+++ b/include/posixjmp.h
@@ -0,0 +1,40 @@
+/* posixjmp.h -- wrapper for setjmp.h with changes for POSIX systems. */
+
+/* Copyright (C) 1987,1991 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _POSIXJMP_H_
+#define _POSIXJMP_H_
+
+#include <setjmp.h>
+
+/* This *must* be included *after* config.h */
+
+#if defined (HAVE_POSIX_SIGSETJMP)
+# define procenv_t sigjmp_buf
+# if !defined (__OPENNT)
+# undef setjmp
+# define setjmp(x) sigsetjmp((x), 1)
+# undef longjmp
+# define longjmp(x, n) siglongjmp((x), (n))
+# endif /* !__OPENNT */
+#else
+# define procenv_t jmp_buf
+#endif
+
+#endif /* _POSIXJMP_H_ */
diff --git a/include/posixselect.h b/include/posixselect.h
new file mode 100644
index 0000000..da6a1ac
--- /dev/null
+++ b/include/posixselect.h
@@ -0,0 +1,47 @@
+/* posixselect.h -- wrapper for select(2) includes and definitions */
+
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _POSIXSELECT_H_
+#define _POSIXSELECT_H_
+
+#if defined (FD_SET) && !defined (HAVE_SELECT)
+# define HAVE_SELECT 1
+#endif
+
+#if defined (HAVE_SELECT)
+# if !defined (HAVE_SYS_SELECT_H) || !defined (M_UNIX)
+# include <sys/time.h>
+# endif
+#endif /* HAVE_SELECT */
+#if defined (HAVE_SYS_SELECT_H)
+# include <sys/select.h>
+#endif
+
+#ifndef USEC_PER_SEC
+# define USEC_PER_SEC 1000000
+#endif
+
+#define USEC_TO_TIMEVAL(us, tv) \
+do { \
+ (tv).tv_sec = (us) / USEC_PER_SEC; \
+ (tv).tv_usec = (us) % USEC_PER_SEC; \
+} while (0)
+
+#endif /* _POSIXSELECT_H_ */
diff --git a/include/posixstat.h b/include/posixstat.h
new file mode 100644
index 0000000..3eb7f29
--- /dev/null
+++ b/include/posixstat.h
@@ -0,0 +1,142 @@
+/* posixstat.h -- Posix stat(2) definitions for systems that
+ don't have them. */
+
+/* Copyright (C) 1987,1991 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* This file should be included instead of <sys/stat.h>.
+ It relies on the local sys/stat.h to work though. */
+#if !defined (_POSIXSTAT_H_)
+#define _POSIXSTAT_H_
+
+#include <sys/stat.h>
+
+#if defined (STAT_MACROS_BROKEN)
+# undef S_ISBLK
+# undef S_ISCHR
+# undef S_ISDIR
+# undef S_ISFIFO
+# undef S_ISREG
+# undef S_ISLNK
+#endif /* STAT_MACROS_BROKEN */
+
+/* These are guaranteed to work only on isc386 */
+#if !defined (S_IFDIR) && !defined (S_ISDIR)
+# define S_IFDIR 0040000
+#endif /* !S_IFDIR && !S_ISDIR */
+#if !defined (S_IFMT)
+# define S_IFMT 0170000
+#endif /* !S_IFMT */
+
+/* Posix 1003.1 5.6.1.1 <sys/stat.h> file types */
+
+/* Some Posix-wannabe systems define _S_IF* macros instead of S_IF*, but
+ do not provide the S_IS* macros that Posix requires. */
+
+#if defined (_S_IFMT) && !defined (S_IFMT)
+#define S_IFMT _S_IFMT
+#endif
+#if defined (_S_IFIFO) && !defined (S_IFIFO)
+#define S_IFIFO _S_IFIFO
+#endif
+#if defined (_S_IFCHR) && !defined (S_IFCHR)
+#define S_IFCHR _S_IFCHR
+#endif
+#if defined (_S_IFDIR) && !defined (S_IFDIR)
+#define S_IFDIR _S_IFDIR
+#endif
+#if defined (_S_IFBLK) && !defined (S_IFBLK)
+#define S_IFBLK _S_IFBLK
+#endif
+#if defined (_S_IFREG) && !defined (S_IFREG)
+#define S_IFREG _S_IFREG
+#endif
+#if defined (_S_IFLNK) && !defined (S_IFLNK)
+#define S_IFLNK _S_IFLNK
+#endif
+#if defined (_S_IFSOCK) && !defined (S_IFSOCK)
+#define S_IFSOCK _S_IFSOCK
+#endif
+
+/* Test for each symbol individually and define the ones necessary (some
+ systems claiming Posix compatibility define some but not all). */
+
+#if defined (S_IFBLK) && !defined (S_ISBLK)
+#define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK) /* block device */
+#endif
+
+#if defined (S_IFCHR) && !defined (S_ISCHR)
+#define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR) /* character device */
+#endif
+
+#if defined (S_IFDIR) && !defined (S_ISDIR)
+#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) /* directory */
+#endif
+
+#if defined (S_IFREG) && !defined (S_ISREG)
+#define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) /* file */
+#endif
+
+#if defined (S_IFIFO) && !defined (S_ISFIFO)
+#define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO) /* fifo - named pipe */
+#endif
+
+#if defined (S_IFLNK) && !defined (S_ISLNK)
+#define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK) /* symbolic link */
+#endif
+
+#if defined (S_IFSOCK) && !defined (S_ISSOCK)
+#define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK) /* socket */
+#endif
+
+/*
+ * POSIX 1003.1 5.6.1.2 <sys/stat.h> File Modes
+ */
+
+#if !defined (S_IRWXU)
+# if !defined (S_IREAD)
+# define S_IREAD 00400
+# define S_IWRITE 00200
+# define S_IEXEC 00100
+# endif /* S_IREAD */
+
+# if !defined (S_IRUSR)
+# define S_IRUSR S_IREAD /* read, owner */
+# define S_IWUSR S_IWRITE /* write, owner */
+# define S_IXUSR S_IEXEC /* execute, owner */
+
+# define S_IRGRP (S_IREAD >> 3) /* read, group */
+# define S_IWGRP (S_IWRITE >> 3) /* write, group */
+# define S_IXGRP (S_IEXEC >> 3) /* execute, group */
+
+# define S_IROTH (S_IREAD >> 6) /* read, other */
+# define S_IWOTH (S_IWRITE >> 6) /* write, other */
+# define S_IXOTH (S_IEXEC >> 6) /* execute, other */
+# endif /* !S_IRUSR */
+
+# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
+# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
+# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
+#endif /* !S_IRWXU */
+
+/* These are non-standard, but are used in builtins.c$symbolic_umask() */
+#define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH)
+#define S_IWUGO (S_IWUSR | S_IWGRP | S_IWOTH)
+#define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
+
+#endif /* _POSIXSTAT_H_ */
diff --git a/include/posixtime.h b/include/posixtime.h
new file mode 100644
index 0000000..31bdddf
--- /dev/null
+++ b/include/posixtime.h
@@ -0,0 +1,49 @@
+/* posixtime.h -- wrapper for time.h, sys/times.h mess. */
+
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _POSIXTIME_H_
+#define _POSIXTIME_H_
+
+/* include this after config.h */
+/* Some systems require this, mostly for the definition of `struct timezone'.
+ For example, Dynix/ptx has that definition in <time.h> rather than
+ sys/time.h */
+#if defined (TIME_WITH_SYS_TIME)
+# include <sys/time.h>
+# include <time.h>
+#else
+# if defined (HAVE_SYS_TIME_H)
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
+#if !defined (HAVE_SYSCONF) || !defined (_SC_CLK_TCK)
+# if !defined (CLK_TCK)
+# if defined (HZ)
+# define CLK_TCK HZ
+# else
+# define CLK_TCK 60 /* 60HZ */
+# endif
+# endif /* !CLK_TCK */
+#endif /* !HAVE_SYSCONF && !_SC_CLK_TCK */
+
+#endif /* _POSIXTIME_H_ */
diff --git a/include/posixwait.h b/include/posixwait.h
new file mode 100644
index 0000000..815ea22
--- /dev/null
+++ b/include/posixwait.h
@@ -0,0 +1,103 @@
+/* posixwait.h -- job control definitions from POSIX 1003.1 */
+
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_POSIXWAIT_H_)
+# define _POSIXWAIT_H_
+
+/* If _POSIX_VERSION is not defined, we assume that <sys/wait.h> defines
+ a `union wait' and various macros used to manipulate it. Look in
+ unionwait.h for the things we expect to find. */
+#if defined (HAVE_SYS_WAIT_H)
+# include <sys/wait.h>
+#else /* !HAVE_SYS_WAIT_H */
+# if !defined (_POSIX_VERSION)
+# include "unionwait.h"
+# endif
+#endif /* !HAVE_SYS_WAIT_H */
+
+/* How to get the status of a job. For Posix, this is just an
+ int, but for other systems we have to crack the union wait. */
+#if !defined (_POSIX_VERSION)
+typedef union wait WAIT;
+# define WSTATUS(t) (t.w_status)
+#else /* _POSIX_VERSION */
+typedef int WAIT;
+# define WSTATUS(t) (t)
+#endif /* _POSIX_VERSION */
+
+/* Make sure that parameters to wait3 are defined. */
+#if !defined (WNOHANG)
+# define WNOHANG 1
+# define WUNTRACED 2
+#endif /* WNOHANG */
+
+/* More Posix P1003.1 definitions. In the POSIX versions, the parameter is
+ passed as an `int', in the non-POSIX version, as `union wait'. */
+#if defined (_POSIX_VERSION)
+
+# if !defined (WSTOPSIG)
+# define WSTOPSIG(s) ((s) >> 8)
+# endif /* !WSTOPSIG */
+
+# if !defined (WTERMSIG)
+# define WTERMSIG(s) ((s) & 0177)
+# endif /* !WTERMSIG */
+
+# if !defined (WEXITSTATUS)
+# define WEXITSTATUS(s) ((s) >> 8)
+# endif /* !WEXITSTATUS */
+
+# if !defined (WIFSTOPPED)
+# define WIFSTOPPED(s) (((s) & 0177) == 0177)
+# endif /* !WIFSTOPPED */
+
+# if !defined (WIFEXITED)
+# define WIFEXITED(s) (((s) & 0377) == 0)
+# endif /* !WIFEXITED */
+
+# if !defined (WIFSIGNALED)
+# define WIFSIGNALED(s) (!WIFSTOPPED(s) && !WIFEXITED(s))
+# endif /* !WIFSIGNALED */
+
+# if !defined (WIFCORED)
+# define WIFCORED(s) ((s) & 0200)
+# endif /* !WIFCORED */
+
+#else /* !_POSIX_VERSION */
+
+# if !defined (WSTOPSIG)
+# define WSTOPSIG(s) ((s).w_stopsig)
+# endif /* !WSTOPSIG */
+
+# if !defined (WTERMSIG)
+# define WTERMSIG(s) ((s).w_termsig)
+# endif /* !WTERMSIG */
+
+# if !defined (WEXITSTATUS)
+# define WEXITSTATUS(s) ((s).w_retcode)
+# endif /* !WEXITSTATUS */
+
+# if !defined (WIFCORED)
+# define WIFCORED(s) ((s).w_coredump)
+# endif /* !WIFCORED */
+
+#endif /* !_POSIX_VERSION */
+
+#endif /* !_POSIXWAIT_H_ */
diff --git a/include/shmbutil.h b/include/shmbutil.h
new file mode 100644
index 0000000..2b40804
--- /dev/null
+++ b/include/shmbutil.h
@@ -0,0 +1,449 @@
+/* shmbutil.h -- utility functions for multibyte characters. */
+
+/* Copyright (C) 2002-2004 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_SH_MBUTIL_H_)
+#define _SH_MBUTIL_H_
+
+#include "stdc.h"
+
+/* Include config.h for HANDLE_MULTIBYTE */
+#include <config.h>
+
+#if defined (HANDLE_MULTIBYTE)
+
+extern size_t xmbsrtowcs __P((wchar_t *, const char **, size_t, mbstate_t *));
+extern size_t xdupmbstowcs __P((wchar_t **, char ***, const char *));
+
+extern size_t mbstrlen __P((const char *));
+
+extern char *xstrchr __P((const char *, int));
+
+#ifndef MB_INVALIDCH
+#define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2)
+#define MB_NULLWCH(x) ((x) == 0)
+#endif
+
+#define MBSLEN(s) (((s) && (s)[0]) ? ((s)[1] ? mbstrlen (s) : 1) : 0)
+#define MB_STRLEN(s) ((MB_CUR_MAX > 1) ? MBSLEN (s) : STRLEN (s))
+
+#define MBLEN(s, n) ((MB_CUR_MAX > 1) ? mblen ((s), (n)) : 1)
+#define MBRLEN(s, n, p) ((MB_CUR_MAX > 1) ? mbrlen ((s), (n), (p)) : 1)
+
+#else /* !HANDLE_MULTIBYTE */
+
+#undef MB_LEN_MAX
+#undef MB_CUR_MAX
+
+#define MB_LEN_MAX 1
+#define MB_CUR_MAX 1
+
+#undef xstrchr
+#define xstrchr(s, c) strchr(s, c)
+
+#ifndef MB_INVALIDCH
+#define MB_INVALIDCH(x) (0)
+#define MB_NULLWCH(x) (0)
+#endif
+
+#define MB_STRLEN(s) (STRLEN(s))
+
+#define MBLEN(s, n) 1
+#define MBRLEN(s, n, p) 1
+
+#ifndef wchar_t
+# define wchar_t int
+#endif
+
+#endif /* !HANDLE_MULTIBYTE */
+
+/* Declare and initialize a multibyte state. Call must be terminated
+ with `;'. */
+#if defined (HANDLE_MULTIBYTE)
+# define DECLARE_MBSTATE \
+ mbstate_t state; \
+ memset (&state, '\0', sizeof (mbstate_t))
+#else
+# define DECLARE_MBSTATE
+#endif /* !HANDLE_MULTIBYTE */
+
+/* Initialize or reinitialize a multibyte state named `state'. Call must be
+ terminated with `;'. */
+#if defined (HANDLE_MULTIBYTE)
+# define INITIALIZE_MBSTATE memset (&state, '\0', sizeof (mbstate_t))
+#else
+# define INITIALIZE_MBSTATE
+#endif /* !HANDLE_MULTIBYTE */
+
+/* Advance one (possibly multi-byte) character in string _STR of length
+ _STRSIZE, starting at index _I. STATE must have already been declared. */
+#if defined (HANDLE_MULTIBYTE)
+# define ADVANCE_CHAR(_str, _strsize, _i) \
+ do \
+ { \
+ if (MB_CUR_MAX > 1) \
+ { \
+ mbstate_t state_bak; \
+ size_t mblength; \
+\
+ state_bak = state; \
+ mblength = mbrlen ((_str) + (_i), (_strsize) - (_i), &state); \
+\
+ if (mblength == (size_t)-2 || mblength == (size_t)-1) \
+ { \
+ state = state_bak; \
+ (_i)++; \
+ } \
+ else if (mblength == 0) \
+ (_i)++; \
+ else \
+ (_i) += mblength; \
+ } \
+ else \
+ (_i)++; \
+ } \
+ while (0)
+#else
+# define ADVANCE_CHAR(_str, _strsize, _i) (_i)++
+#endif /* !HANDLE_MULTIBYTE */
+
+/* Advance one (possibly multibyte) character in the string _STR of length
+ _STRSIZE.
+ SPECIAL: assume that _STR will be incremented by 1 after this call. */
+#if defined (HANDLE_MULTIBYTE)
+# define ADVANCE_CHAR_P(_str, _strsize) \
+ do \
+ { \
+ if (MB_CUR_MAX > 1) \
+ { \
+ mbstate_t state_bak; \
+ size_t mblength; \
+\
+ state_bak = state; \
+ mblength = mbrlen ((_str), (_strsize), &state); \
+\
+ if (mblength == (size_t)-2 || mblength == (size_t)-1) \
+ { \
+ state = state_bak; \
+ mblength = 1; \
+ } \
+ else \
+ (_str) += (mblength < 1) ? 0 : (mblength - 1); \
+ } \
+ } \
+ while (0)
+#else
+# define ADVANCE_CHAR_P(_str, _strsize)
+#endif /* !HANDLE_MULTIBYTE */
+
+/* Back up one (possibly multi-byte) character in string _STR of length
+ _STRSIZE, starting at index _I. STATE must have already been declared. */
+#if defined (HANDLE_MULTIBYTE)
+# define BACKUP_CHAR(_str, _strsize, _i) \
+ do \
+ { \
+ if (MB_CUR_MAX > 1) \
+ { \
+ mbstate_t state_bak; \
+ size_t mblength; \
+ int _x, _p; /* _x == temp index into string, _p == prev index */ \
+\
+ _x = _p = 0; \
+ while (_x < (_i)) \
+ { \
+ state_bak = state; \
+ mblength = mbrlen ((_str) + (_x), (_strsize) - (_x), &state); \
+\
+ if (mblength == (size_t)-2 || mblength == (size_t)-1) \
+ { \
+ state = state_bak; \
+ _x++; \
+ } \
+ else if (mblength == 0) \
+ _x++; \
+ else \
+ { \
+ _p = _x; /* _p == start of prev mbchar */ \
+ _x += mblength; \
+ } \
+ } \
+ (_i) = _p; \
+ } \
+ else \
+ (_i)--; \
+ } \
+ while (0)
+#else
+# define BACKUP_CHAR(_str, _strsize, _i) (_i)--
+#endif /* !HANDLE_MULTIBYTE */
+
+/* Back up one (possibly multibyte) character in the string _BASE of length
+ _STRSIZE starting at _STR (_BASE <= _STR <= (_BASE + _STRSIZE) ).
+ SPECIAL: DO NOT assume that _STR will be decremented by 1 after this call. */
+#if defined (HANDLE_MULTIBYTE)
+# define BACKUP_CHAR_P(_base, _strsize, _str) \
+ do \
+ { \
+ if (MB_CUR_MAX > 1) \
+ { \
+ mbstate_t state_bak; \
+ size_t mblength; \
+ char *_x, _p; /* _x == temp pointer into string, _p == prev pointer */ \
+\
+ _x = _p = _base; \
+ while (_x < (_str)) \
+ { \
+ state_bak = state; \
+ mblength = mbrlen (_x, (_strsize) - _x, &state); \
+\
+ if (mblength == (size_t)-2 || mblength == (size_t)-1) \
+ { \
+ state = state_bak; \
+ _x++; \
+ } \
+ else if (mblength == 0) \
+ _x++; \
+ else \
+ { \
+ _p = _x; /* _p == start of prev mbchar */ \
+ _x += mblength; \
+ } \
+ } \
+ (_str) = _p; \
+ } \
+ else \
+ (_str)--; \
+ } \
+ while (0)
+#else
+# define BACKUP_CHAR_P(_base, _strsize, _str) (_str)--
+#endif /* !HANDLE_MULTIBYTE */
+
+/* Copy a single character from the string _SRC to the string _DST.
+ _SRCEND is a pointer to the end of _SRC. */
+#if defined (HANDLE_MULTIBYTE)
+# define COPY_CHAR_P(_dst, _src, _srcend) \
+ do \
+ { \
+ if (MB_CUR_MAX > 1) \
+ { \
+ mbstate_t state_bak; \
+ size_t mblength; \
+ int _k; \
+\
+ state_bak = state; \
+ mblength = mbrlen ((_src), (_srcend) - (_src), &state); \
+ if (mblength == (size_t)-2 || mblength == (size_t)-1) \
+ { \
+ state = state_bak; \
+ mblength = 1; \
+ } \
+ else \
+ mblength = (mblength < 1) ? 1 : mblength; \
+\
+ for (_k = 0; _k < mblength; _k++) \
+ *(_dst)++ = *(_src)++; \
+ } \
+ else \
+ *(_dst)++ = *(_src)++; \
+ } \
+ while (0)
+#else
+# define COPY_CHAR_P(_dst, _src, _srcend) *(_dst)++ = *(_src)++
+#endif /* !HANDLE_MULTIBYTE */
+
+/* Copy a single character from the string _SRC at index _SI to the string
+ _DST at index _DI. _SRCEND is a pointer to the end of _SRC. */
+#if defined (HANDLE_MULTIBYTE)
+# define COPY_CHAR_I(_dst, _di, _src, _srcend, _si) \
+ do \
+ { \
+ if (MB_CUR_MAX > 1) \
+ { \
+ mbstate_t state_bak; \
+ size_t mblength; \
+ int _k; \
+\
+ state_bak = state; \
+ mblength = mbrlen ((_src) + (_si), (_srcend) - ((_src)+(_si)), &state); \
+ if (mblength == (size_t)-2 || mblength == (size_t)-1) \
+ { \
+ state = state_bak; \
+ mblength = 1; \
+ } \
+ else \
+ mblength = (mblength < 1) ? 1 : mblength; \
+\
+ for (_k = 0; _k < mblength; _k++) \
+ _dst[_di++] = _src[_si++]; \
+ } \
+ else \
+ _dst[_di++] = _src[_si++]; \
+ } \
+ while (0)
+#else
+# define COPY_CHAR_I(_dst, _di, _src, _srcend, _si) _dst[_di++] = _src[_si++]
+#endif /* !HANDLE_MULTIBYTE */
+
+/****************************************************************
+ * *
+ * The following are only guaranteed to work in subst.c *
+ * *
+ ****************************************************************/
+
+#if defined (HANDLE_MULTIBYTE)
+# define SCOPY_CHAR_I(_dst, _escchar, _sc, _src, _si, _slen) \
+ do \
+ { \
+ if (MB_CUR_MAX > 1) \
+ { \
+ mbstate_t state_bak; \
+ size_t mblength; \
+ int _i; \
+\
+ state_bak = state; \
+ mblength = mbrlen ((_src) + (_si), (_slen) - (_si), &state); \
+ if (mblength == (size_t)-2 || mblength == (size_t)-1) \
+ { \
+ state = state_bak; \
+ mblength = 1; \
+ } \
+ else \
+ mblength = (mblength < 1) ? 1 : mblength; \
+\
+ temp = xmalloc (mblength + 2); \
+ temp[0] = _escchar; \
+ for (_i = 0; _i < mblength; _i++) \
+ temp[_i + 1] = _src[_si++]; \
+ temp[mblength + 1] = '\0'; \
+\
+ goto add_string; \
+ } \
+ else \
+ { \
+ _dst[0] = _escchar; \
+ _dst[1] = _sc; \
+ } \
+ } \
+ while (0)
+#else
+# define SCOPY_CHAR_I(_dst, _escchar, _sc, _src, _si, _slen) \
+ _dst[0] = _escchar; \
+ _dst[1] = _sc
+#endif /* !HANDLE_MULTIBYTE */
+
+#if defined (HANDLE_MULTIBYTE)
+# define SCOPY_CHAR_M(_dst, _src, _srcend, _si) \
+ do \
+ { \
+ if (MB_CUR_MAX > 1) \
+ { \
+ mbstate_t state_bak; \
+ size_t mblength; \
+\
+ state_bak = state; \
+ mblength = mbrlen ((_src) + (_si), (_srcend) - ((_src) + (_si)), &state); \
+ if (mblength == (size_t)-2 || mblength == (size_t)-1) \
+ { \
+ state = state_bak; \
+ mblength = 1; \
+ } \
+ else \
+ mblength = (mblength < 1) ? 1 : mblength; \
+\
+ FASTCOPY(((_src) + (_si)), (_dst), mblength); \
+\
+ (_dst) += mblength; \
+ (_si) += mblength; \
+ } \
+ else \
+ { \
+ *(_dst)++ = _src[(_si)]; \
+ (_si)++; \
+ } \
+ } \
+ while (0)
+#else
+# define SCOPY_CHAR_M(_dst, _src, _srcend, _si) \
+ *(_dst)++ = _src[(_si)]; \
+ (_si)++
+#endif /* !HANDLE_MULTIBYTE */
+
+#if HANDLE_MULTIBYTE
+# define SADD_MBCHAR(_dst, _src, _si, _srcsize) \
+ do \
+ { \
+ if (MB_CUR_MAX > 1) \
+ { \
+ int i; \
+ mbstate_t state_bak; \
+ size_t mblength; \
+\
+ state_bak = state; \
+ mblength = mbrlen ((_src) + (_si), (_srcsize) - (_si), &state); \
+ if (mblength == (size_t)-1 || mblength == (size_t)-2) \
+ { \
+ state = state_bak; \
+ mblength = 1; \
+ } \
+ if (mblength < 1) \
+ mblength = 1; \
+\
+ _dst = (char *)xmalloc (mblength + 1); \
+ for (i = 0; i < mblength; i++) \
+ (_dst)[i] = (_src)[(_si)++]; \
+ (_dst)[mblength] = '\0'; \
+\
+ goto add_string; \
+ } \
+ } \
+ while (0)
+
+#else
+# define SADD_MBCHAR(_dst, _src, _si, _srcsize)
+#endif
+
+/* Watch out when using this -- it's just straight textual subsitution */
+#if defined (HANDLE_MULTIBYTE)
+# define SADD_MBQCHAR_BODY(_dst, _src, _si, _srcsize) \
+\
+ int i; \
+ mbstate_t state_bak; \
+ size_t mblength; \
+\
+ state_bak = state; \
+ mblength = mbrlen ((_src) + (_si), (_srcsize) - (_si), &state); \
+ if (mblength == (size_t)-1 || mblength == (size_t)-2) \
+ { \
+ state = state_bak; \
+ mblength = 1; \
+ } \
+ if (mblength < 1) \
+ mblength = 1; \
+\
+ (_dst) = (char *)xmalloc (mblength + 2); \
+ (_dst)[0] = CTLESC; \
+ for (i = 0; i < mblength; i++) \
+ (_dst)[i+1] = (_src)[(_si)++]; \
+ (_dst)[mblength+1] = '\0'; \
+\
+ goto add_string
+
+#endif /* HANDLE_MULTIBYTE */
+#endif /* _SH_MBUTIL_H_ */
diff --git a/include/shtty.h b/include/shtty.h
new file mode 100644
index 0000000..66500d9
--- /dev/null
+++ b/include/shtty.h
@@ -0,0 +1,112 @@
+/* Copyright (C) 1999 Free Software Foundation, Inc. */
+
+/* This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ * shtty.h -- include the correct system-dependent files to manipulate the
+ * tty
+ */
+
+#ifndef __SH_TTY_H_
+#define __SH_TTY_H_
+
+#include "stdc.h"
+
+#if defined (_POSIX_VERSION) && defined (HAVE_TERMIOS_H) && defined (HAVE_TCGETATTR) && !defined (TERMIOS_MISSING)
+# define TERMIOS_TTY_DRIVER
+#else
+# if defined (HAVE_TERMIO_H)
+# define TERMIO_TTY_DRIVER
+# else
+# define NEW_TTY_DRIVER
+# endif
+#endif
+
+/*
+ * The _POSIX_SOURCE define is to avoid multiple symbol definitions
+ * between sys/ioctl.h and termios.h. Ditto for the test against SunOS4
+ * and the undefining of several symbols.
+ */
+
+#ifdef TERMIOS_TTY_DRIVER
+# if (defined (SunOS4) || defined (SunOS5)) && !defined (_POSIX_SOURCE)
+# define _POSIX_SOURCE
+# endif
+# if defined (SunOS4)
+# undef ECHO
+# undef NOFLSH
+# undef TOSTOP
+# endif /* SunOS4 */
+# include <termios.h>
+# define TTYSTRUCT struct termios
+#else
+# ifdef TERMIO_TTY_DRIVER
+# include <termio.h>
+# define TTYSTRUCT struct termio
+# else /* NEW_TTY_DRIVER */
+# include <sgtty.h>
+# define TTYSTRUCT struct sgttyb
+# endif
+#endif
+
+/* Functions imported from lib/sh/shtty.c */
+
+/* Get and set terminal attributes for the file descriptor passed as
+ an argument. */
+extern int ttgetattr __P((int, TTYSTRUCT *));
+extern int ttsetattr __P((int, TTYSTRUCT *));
+
+/* Save and restore the terminal's attributes from static storage. */
+extern void ttsave __P((void));
+extern void ttrestore __P((void));
+
+/* Return the attributes corresponding to the file descriptor (0 or 1)
+ passed as an argument. */
+extern TTYSTRUCT *ttattr __P((int));
+
+/* These functions only operate on the passed TTYSTRUCT; they don't
+ actually change anything with the kernel's current tty settings. */
+extern int tt_setonechar __P((TTYSTRUCT *));
+extern int tt_setnoecho __P((TTYSTRUCT *));
+extern int tt_seteightbit __P((TTYSTRUCT *));
+extern int tt_setnocanon __P((TTYSTRUCT *));
+extern int tt_setcbreak __P((TTYSTRUCT *));
+
+/* These functions are all generally mutually exclusive. If you call
+ more than one (bracketed with calls to ttsave and ttrestore, of
+ course), the right thing will happen, but more system calls will be
+ executed than absolutely necessary. You can do all of this yourself
+ with the other functions; these are only conveniences. */
+
+/* These functions work with a given file descriptor and set terminal
+ attributes */
+extern int ttfd_onechar __P((int, TTYSTRUCT *));
+extern int ttfd_noecho __P((int, TTYSTRUCT *));
+extern int ttfd_eightbit __P((int, TTYSTRUCT *));
+extern int ttfd_nocanon __P((int, TTYSTRUCT *));
+
+extern int ttfd_cbreak __P((int, TTYSTRUCT *));
+
+/* These functions work with fd 0 and the TTYSTRUCT saved with ttsave () */
+extern int ttonechar __P((void));
+extern int ttnoecho __P((void));
+extern int tteightbit __P((void));
+extern int ttnocanon __P((void));
+
+extern int ttcbreak __P((void));
+
+#endif
diff --git a/include/stdc.h b/include/stdc.h
new file mode 100644
index 0000000..df01d81
--- /dev/null
+++ b/include/stdc.h
@@ -0,0 +1,88 @@
+/* stdc.h -- macros to make source compile on both ANSI C and K&R C
+ compilers. */
+
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_STDC_H_)
+#define _STDC_H_
+
+/* Adapted from BSD /usr/include/sys/cdefs.h. */
+
+/* A function can be defined using prototypes and compile on both ANSI C
+ and traditional C compilers with something like this:
+ extern char *func __P((char *, char *, int)); */
+
+#if !defined (__P)
+# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) || defined (PROTOTYPES)
+# define __P(protos) protos
+# else
+# define __P(protos) ()
+# endif
+#endif
+
+#if defined (HAVE_STRINGIZE)
+# define __STRING(x) #x
+#else
+# define __STRING(x) "x"
+#endif
+
+#if !defined (__STDC__)
+
+#if defined (__GNUC__) /* gcc with -traditional */
+# if !defined (signed)
+# define signed __signed
+# endif
+# if !defined (volatile)
+# define volatile __volatile
+# endif
+#else /* !__GNUC__ */
+# if !defined (inline)
+# define inline
+# endif
+# if !defined (signed)
+# define signed
+# endif
+# if !defined (volatile)
+# define volatile
+# endif
+#endif /* !__GNUC__ */
+
+#endif /* !__STDC__ */
+
+#ifndef __attribute__
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
+# define __attribute__(x)
+# endif
+#endif
+
+/* For those situations when gcc handles inlining a particular function but
+ other compilers complain. */
+#ifdef __GNUC__
+# define INLINE inline
+#else
+# define INLINE
+#endif
+
+#if defined (PREFER_STDARG)
+# define SH_VA_START(va, arg) va_start(va, arg)
+#else
+# define SH_VA_START(va, arg) va_start(va)
+#endif
+
+#endif /* !_STDC_H_ */
diff --git a/include/systimes.h b/include/systimes.h
new file mode 100644
index 0000000..9629d25
--- /dev/null
+++ b/include/systimes.h
@@ -0,0 +1,55 @@
+/* Copyright (C) 1991, 1992, 1996, 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ * POSIX Standard: 4.5.2 Process Times <sys/times.h>
+ */
+
+/*
+ * If we don't have a standard system clock_t type, this must be included
+ * after config.h
+ */
+
+#ifndef _BASH_SYSTIMES_H
+#define _BASH_SYSTIMES_H 1
+
+#if defined (HAVE_SYS_TIMES_H)
+# include <sys/times.h>
+#else /* !HAVE_SYS_TIMES_H */
+
+#include <stdc.h>
+
+/* Structure describing CPU time used by a process and its children. */
+struct tms
+ {
+ clock_t tms_utime; /* User CPU time. */
+ clock_t tms_stime; /* System CPU time. */
+
+ clock_t tms_cutime; /* User CPU time of dead children. */
+ clock_t tms_cstime; /* System CPU time of dead children. */
+ };
+
+/* Store the CPU time used by this process and all its
+ dead descendents in BUFFER.
+ Return the elapsed real time from an arbitrary point in the
+ past (the bash emulation uses the epoch), or (clock_t) -1 for
+ errors. All times are in CLK_TCKths of a second. */
+extern clock_t times __P((struct tms *buffer));
+
+#endif /* !HAVE_SYS_TIMES_H */
+#endif /* _BASH_SYSTIMES_H */
diff --git a/include/typemax.h b/include/typemax.h
new file mode 100644
index 0000000..32e7a89
--- /dev/null
+++ b/include/typemax.h
@@ -0,0 +1,84 @@
+/* typemax.h -- encapsulate max values for long, long long, etc. */
+
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ * NOTE: This should be included after config.h, limits.h, stdint.h, and
+ * inttypes.h
+ */
+
+#ifndef _SH_TYPEMAX_H
+#define _SH_TYPEMAX_H
+
+#ifndef CHAR_BIT
+# define CHAR_BIT 8
+#endif
+
+/* Nonzero if the integer type T is signed. */
+#ifndef TYPE_SIGNED
+# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+#endif
+
+#ifndef TYPE_MINIMUM
+# define TYPE_MINIMUM(t) ((t) (TYPE_SIGNED (t) \
+ ? ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1) \
+ : (t) 0))
+#endif
+
+#ifndef TYPE_MAXIMUM
+# define TYPE_MAXIMUM(t) ((t) (~ (t) 0 - TYPE_MINIMUM (t)))
+#endif
+
+#ifdef HAVE_LONG_LONG
+# ifndef LLONG_MAX
+# define LLONG_MAX TYPE_MAXIMUM(long long int)
+# define LLONG_MIN TYPE_MINIMUM(long long int)
+# endif
+# ifndef ULLONG_MAX
+# define ULLONG_MAX TYPE_MAXIMUM(unsigned long long int)
+# endif
+#endif
+
+#ifndef ULONG_MAX
+# define ULONG_MAX ((unsigned long) ~(unsigned long) 0)
+#endif
+
+#ifndef LONG_MAX
+# define LONG_MAX ((long int) (ULONG_MAX >> 1))
+# define LONG_MIN ((long int) (-LONG_MAX - 1L))
+#endif
+
+#ifndef INT_MAX /* ouch */
+# define INT_MAX TYPE_MAXIMUM(int)
+# define INT_MIN TYPE_MINIMUM(int)
+# define UINT_MAX ((unsigned int) ~(unsigned int)0)
+#endif
+
+/* workaround for gcc bug in versions < 2.7 */
+#if defined (HAVE_LONG_LONG) && __GNUC__ == 2 && __GNUC_MINOR__ < 7
+static const unsigned long long int maxquad = ULLONG_MAX;
+# undef ULLONG_MAX
+# define ULLONG_MAX maxquad
+#endif
+
+#ifndef SSIZE_MAX
+# define SSIZE_MAX 32767 /* POSIX minimum max */
+#endif
+
+#endif /* _SH_TYPEMAX_H */
diff --git a/include/unionwait.h b/include/unionwait.h
new file mode 100644
index 0000000..b1b4dfa
--- /dev/null
+++ b/include/unionwait.h
@@ -0,0 +1,98 @@
+/* unionwait.h -- definitions for using a `union wait' on systems without
+ one. */
+
+/* Copyright (C) 1996 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _UNIONWAIT_H
+#define _UNIONWAIT_H
+
+#if !defined (WORDS_BIGENDIAN)
+union wait
+ {
+ int w_status; /* used in syscall */
+
+ /* Terminated process status. */
+ struct
+ {
+ unsigned short
+ w_Termsig : 7, /* termination signal */
+ w_Coredump : 1, /* core dump indicator */
+ w_Retcode : 8, /* exit code if w_termsig==0 */
+ w_Fill1 : 16; /* high 16 bits unused */
+ } w_T;
+
+ /* Stopped process status. Returned
+ only for traced children unless requested
+ with the WUNTRACED option bit. */
+ struct
+ {
+ unsigned short
+ w_Stopval : 8, /* == W_STOPPED if stopped */
+ w_Stopsig : 8, /* actually zero on XENIX */
+ w_Fill2 : 16; /* high 16 bits unused */
+ } w_S;
+ };
+
+#else /* WORDS_BIGENDIAN */
+
+/* This is for big-endian machines like the IBM RT, HP 9000, or Sun-3 */
+
+union wait
+ {
+ int w_status; /* used in syscall */
+
+ /* Terminated process status. */
+ struct
+ {
+ unsigned short w_Fill1 : 16; /* high 16 bits unused */
+ unsigned w_Retcode : 8; /* exit code if w_termsig==0 */
+ unsigned w_Coredump : 1; /* core dump indicator */
+ unsigned w_Termsig : 7; /* termination signal */
+ } w_T;
+
+ /* Stopped process status. Returned
+ only for traced children unless requested
+ with the WUNTRACED option bit. */
+ struct
+ {
+ unsigned short w_Fill2 : 16; /* high 16 bits unused */
+ unsigned w_Stopsig : 8; /* signal that stopped us */
+ unsigned w_Stopval : 8; /* == W_STOPPED if stopped */
+ } w_S;
+ };
+
+#endif /* WORDS_BIGENDIAN */
+
+#define w_termsig w_T.w_Termsig
+#define w_coredump w_T.w_Coredump
+#define w_retcode w_T.w_Retcode
+#define w_stopval w_S.w_Stopval
+#define w_stopsig w_S.w_Stopsig
+
+#define WSTOPPED 0177
+#define WIFSTOPPED(x) ((x).w_stopval == WSTOPPED)
+#define WIFEXITED(x) ((x).w_stopval != WSTOPPED && (x).w_termsig == 0)
+#define WIFSIGNALED(x) ((x).w_stopval != WSTOPPED && (x).w_termsig != 0)
+
+#define WTERMSIG(x) ((x).w_termsig)
+#define WSTOPSIG(x) ((x).w_stopsig)
+#define WEXITSTATUS(x) ((x).w_retcode)
+#define WIFCORED(x) ((x).w_coredump)
+
+#endif /* _UNIONWAIT_H */
diff --git a/input.c b/input.c
new file mode 100644
index 0000000..fe21aef
--- /dev/null
+++ b/input.c
@@ -0,0 +1,648 @@
+/* input.c -- functions to perform buffered input with synchronization. */
+
+/* Copyright (C) 1992-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+#include "filecntl.h"
+#include "posixstat.h"
+#include <stdio.h>
+#include <errno.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+#include "bashintl.h"
+
+#include "command.h"
+#include "general.h"
+#include "input.h"
+#include "error.h"
+#include "externs.h"
+#include "quit.h"
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+#if defined (EAGAIN)
+# define X_EAGAIN EAGAIN
+#else
+# define X_EAGAIN -99
+#endif
+
+#if defined (EWOULDBLOCK)
+# define X_EWOULDBLOCK EWOULDBLOCK
+#else
+# define X_EWOULDBLOCK -99
+#endif
+
+extern void termsig_handler __P((int));
+
+/* Functions to handle reading input on systems that don't restart read(2)
+ if a signal is received. */
+
+static char localbuf[128];
+static int local_index = 0, local_bufused = 0;
+
+/* Posix and USG systems do not guarantee to restart read () if it is
+ interrupted by a signal. We do the read ourselves, and restart it
+ if it returns EINTR. */
+int
+getc_with_restart (stream)
+ FILE *stream;
+{
+ unsigned char uc;
+
+ CHECK_TERMSIG;
+
+ /* Try local buffering to reduce the number of read(2) calls. */
+ if (local_index == local_bufused || local_bufused == 0)
+ {
+ while (1)
+ {
+ CHECK_TERMSIG;
+ local_bufused = read (fileno (stream), localbuf, sizeof(localbuf));
+ if (local_bufused > 0)
+ break;
+ else if (errno == X_EAGAIN || errno == X_EWOULDBLOCK)
+ {
+ if (sh_unset_nodelay_mode (fileno (stream)) < 0)
+ {
+ sys_error (_("cannot reset nodelay mode for fd %d"), fileno (stream));
+ return EOF;
+ }
+ continue;
+ }
+ else if (local_bufused == 0 || errno != EINTR)
+ {
+ local_index = 0;
+ return EOF;
+ }
+ }
+ local_index = 0;
+ }
+ uc = localbuf[local_index++];
+ return uc;
+}
+
+int
+ungetc_with_restart (c, stream)
+ int c;
+ FILE *stream;
+{
+ if (local_index == 0 || c == EOF)
+ return EOF;
+ localbuf[--local_index] = c;
+ return c;
+}
+
+#if defined (BUFFERED_INPUT)
+
+/* A facility similar to stdio, but input-only. */
+
+#if defined (USING_BASH_MALLOC)
+# define MAX_INPUT_BUFFER_SIZE 8176
+#else
+# define MAX_INPUT_BUFFER_SIZE 8192
+#endif
+
+#if !defined (SEEK_CUR)
+# define SEEK_CUR 1
+#endif /* !SEEK_CUR */
+
+#ifdef max
+# undef max
+#endif
+#define max(a, b) (((a) > (b)) ? (a) : (b))
+#ifdef min
+# undef min
+#endif
+#define min(a, b) ((a) > (b) ? (b) : (a))
+
+extern int interactive_shell;
+
+int bash_input_fd_changed;
+
+/* This provides a way to map from a file descriptor to the buffer
+ associated with that file descriptor, rather than just the other
+ way around. This is needed so that buffers are managed properly
+ in constructs like 3<&4. buffers[x]->b_fd == x -- that is how the
+ correspondence is maintained. */
+static BUFFERED_STREAM **buffers = (BUFFERED_STREAM **)NULL;
+static int nbuffers;
+
+#define ALLOCATE_BUFFERS(n) \
+ do { if ((n) >= nbuffers) allocate_buffers (n); } while (0)
+
+/* Make sure `buffers' has at least N elements. */
+static void
+allocate_buffers (n)
+ int n;
+{
+ register int i, orig_nbuffers;
+
+ orig_nbuffers = nbuffers;
+ nbuffers = n + 20;
+ buffers = (BUFFERED_STREAM **)xrealloc
+ (buffers, nbuffers * sizeof (BUFFERED_STREAM *));
+
+ /* Zero out the new buffers. */
+ for (i = orig_nbuffers; i < nbuffers; i++)
+ buffers[i] = (BUFFERED_STREAM *)NULL;
+}
+
+/* Construct and return a BUFFERED_STREAM corresponding to file descriptor
+ FD, using BUFFER. */
+static BUFFERED_STREAM *
+make_buffered_stream (fd, buffer, bufsize)
+ int fd;
+ char *buffer;
+ size_t bufsize;
+{
+ BUFFERED_STREAM *bp;
+
+ bp = (BUFFERED_STREAM *)xmalloc (sizeof (BUFFERED_STREAM));
+ ALLOCATE_BUFFERS (fd);
+ buffers[fd] = bp;
+ bp->b_fd = fd;
+ bp->b_buffer = buffer;
+ bp->b_size = bufsize;
+ bp->b_used = bp->b_inputp = bp->b_flag = 0;
+ if (bufsize == 1)
+ bp->b_flag |= B_UNBUFF;
+ return (bp);
+}
+
+/* Allocate a new BUFFERED_STREAM, copy BP to it, and return the new copy. */
+static BUFFERED_STREAM *
+copy_buffered_stream (bp)
+ BUFFERED_STREAM *bp;
+{
+ BUFFERED_STREAM *nbp;
+
+ if (!bp)
+ return ((BUFFERED_STREAM *)NULL);
+
+ nbp = (BUFFERED_STREAM *)xmalloc (sizeof (BUFFERED_STREAM));
+ xbcopy ((char *)bp, (char *)nbp, sizeof (BUFFERED_STREAM));
+ return (nbp);
+}
+
+int
+set_bash_input_fd (fd)
+ int fd;
+{
+ if (bash_input.type == st_bstream)
+ bash_input.location.buffered_fd = fd;
+ else if (interactive_shell == 0)
+ default_buffered_input = fd;
+ return 0;
+}
+
+int
+fd_is_bash_input (fd)
+ int fd;
+{
+ if (bash_input.type == st_bstream && bash_input.location.buffered_fd == fd)
+ return 1;
+ else if (interactive_shell == 0 && default_buffered_input == fd)
+ return 1;
+ return 0;
+}
+
+/* Save the buffered stream corresponding to file descriptor FD (which bash
+ is using to read input) to a buffered stream associated with NEW_FD. If
+ NEW_FD is -1, a new file descriptor is allocated with fcntl. The new
+ file descriptor is returned on success, -1 on error. */
+int
+save_bash_input (fd, new_fd)
+ int fd, new_fd;
+{
+ int nfd;
+
+ /* Sync the stream so we can re-read from the new file descriptor. We
+ might be able to avoid this by copying the buffered stream verbatim
+ to the new file descriptor. */
+ if (buffers[fd])
+ sync_buffered_stream (fd);
+
+ /* Now take care of duplicating the file descriptor that bash is
+ using for input, so we can reinitialize it later. */
+ nfd = (new_fd == -1) ? fcntl (fd, F_DUPFD, 10) : new_fd;
+ if (nfd == -1)
+ {
+ if (fcntl (fd, F_GETFD, 0) == 0)
+ sys_error (_("cannot allocate new file descriptor for bash input from fd %d"), fd);
+ return -1;
+ }
+
+ if (buffers[nfd])
+ {
+ /* What's this? A stray buffer without an associated open file
+ descriptor? Free up the buffer and report the error. */
+ internal_error (_("save_bash_input: buffer already exists for new fd %d"), nfd);
+ free_buffered_stream (buffers[nfd]);
+ }
+
+ /* Reinitialize bash_input.location. */
+ if (bash_input.type == st_bstream)
+ {
+ bash_input.location.buffered_fd = nfd;
+ fd_to_buffered_stream (nfd);
+ close_buffered_fd (fd); /* XXX */
+ }
+ else
+ /* If the current input type is not a buffered stream, but the shell
+ is not interactive and therefore using a buffered stream to read
+ input (e.g. with an `eval exec 3>output' inside a script), note
+ that the input fd has been changed. pop_stream() looks at this
+ value and adjusts the input fd to the new value of
+ default_buffered_input accordingly. */
+ bash_input_fd_changed++;
+
+ if (default_buffered_input == fd)
+ default_buffered_input = nfd;
+
+ SET_CLOSE_ON_EXEC (nfd);
+ return nfd;
+}
+
+/* Check that file descriptor FD is not the one that bash is currently
+ using to read input from a script. FD is about to be duplicated onto,
+ which means that the kernel will close it for us. If FD is the bash
+ input file descriptor, we need to seek backwards in the script (if
+ possible and necessary -- scripts read from stdin are still unbuffered),
+ allocate a new file descriptor to use for bash input, and re-initialize
+ the buffered stream. Make sure the file descriptor used to save bash
+ input is set close-on-exec. Returns 0 on success, -1 on failure. This
+ works only if fd is > 0 -- if fd == 0 and bash is reading input from
+ fd 0, save_bash_input is used instead, to cooperate with input
+ redirection (look at redir.c:add_undo_redirect()). */
+int
+check_bash_input (fd)
+ int fd;
+{
+ if (fd_is_bash_input (fd))
+ {
+ if (fd > 0)
+ return ((save_bash_input (fd, -1) == -1) ? -1 : 0);
+ else if (fd == 0)
+ return ((sync_buffered_stream (fd) == -1) ? -1 : 0);
+ }
+ return 0;
+}
+
+/* This is the buffered stream analogue of dup2(fd1, fd2). The
+ BUFFERED_STREAM corresponding to fd2 is deallocated, if one exists.
+ BUFFERS[fd1] is copied to BUFFERS[fd2]. This is called by the
+ redirect code for constructs like 4<&0 and 3</etc/rc.local. */
+int
+duplicate_buffered_stream (fd1, fd2)
+ int fd1, fd2;
+{
+ int is_bash_input, m;
+
+ if (fd1 == fd2)
+ return 0;
+
+ m = max (fd1, fd2);
+ ALLOCATE_BUFFERS (m);
+
+ /* If FD2 is the file descriptor bash is currently using for shell input,
+ we need to do some extra work to make sure that the buffered stream
+ actually exists (it might not if fd1 was not active, and the copy
+ didn't actually do anything). */
+ is_bash_input = (bash_input.type == st_bstream) &&
+ (bash_input.location.buffered_fd == fd2);
+
+ if (buffers[fd2])
+ {
+ /* If the two objects share the same b_buffer, don't free it. */
+ if (buffers[fd1] && buffers[fd1]->b_buffer && buffers[fd1]->b_buffer == buffers[fd2]->b_buffer)
+ buffers[fd2] = (BUFFERED_STREAM *)NULL;
+ else
+ free_buffered_stream (buffers[fd2]);
+ }
+ buffers[fd2] = copy_buffered_stream (buffers[fd1]);
+ if (buffers[fd2])
+ buffers[fd2]->b_fd = fd2;
+
+ if (is_bash_input)
+ {
+ if (!buffers[fd2])
+ fd_to_buffered_stream (fd2);
+ buffers[fd2]->b_flag |= B_WASBASHINPUT;
+ }
+
+ return (fd2);
+}
+
+/* Return 1 if a seek on FD will succeed. */
+#ifndef __CYGWIN__
+# define fd_is_seekable(fd) (lseek ((fd), 0L, SEEK_CUR) >= 0)
+#else
+# define fd_is_seekable(fd) 0
+#endif /* __CYGWIN__ */
+
+/* Take FD, a file descriptor, and create and return a buffered stream
+ corresponding to it. If something is wrong and the file descriptor
+ is invalid, return a NULL stream. */
+BUFFERED_STREAM *
+fd_to_buffered_stream (fd)
+ int fd;
+{
+ char *buffer;
+ size_t size;
+ struct stat sb;
+
+ if (fstat (fd, &sb) < 0)
+ {
+ close (fd);
+ return ((BUFFERED_STREAM *)NULL);
+ }
+
+ size = (fd_is_seekable (fd)) ? min (sb.st_size, MAX_INPUT_BUFFER_SIZE) : 1;
+ if (size == 0)
+ size = 1;
+ buffer = (char *)xmalloc (size);
+
+ return (make_buffered_stream (fd, buffer, size));
+}
+
+/* Return a buffered stream corresponding to FILE, a file name. */
+BUFFERED_STREAM *
+open_buffered_stream (file)
+ char *file;
+{
+ int fd;
+
+ fd = open (file, O_RDONLY);
+ return ((fd >= 0) ? fd_to_buffered_stream (fd) : (BUFFERED_STREAM *)NULL);
+}
+
+/* Deallocate a buffered stream and free up its resources. Make sure we
+ zero out the slot in BUFFERS that points to BP. */
+void
+free_buffered_stream (bp)
+ BUFFERED_STREAM *bp;
+{
+ int n;
+
+ if (!bp)
+ return;
+
+ n = bp->b_fd;
+ if (bp->b_buffer)
+ free (bp->b_buffer);
+ free (bp);
+ buffers[n] = (BUFFERED_STREAM *)NULL;
+}
+
+/* Close the file descriptor associated with BP, a buffered stream, and free
+ up the stream. Return the status of closing BP's file descriptor. */
+int
+close_buffered_stream (bp)
+ BUFFERED_STREAM *bp;
+{
+ int fd;
+
+ if (!bp)
+ return (0);
+ fd = bp->b_fd;
+ free_buffered_stream (bp);
+ return (close (fd));
+}
+
+/* Deallocate the buffered stream associated with file descriptor FD, and
+ close FD. Return the status of the close on FD. */
+int
+close_buffered_fd (fd)
+ int fd;
+{
+ if (fd < 0)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ if (fd >= nbuffers || !buffers || !buffers[fd])
+ return (close (fd));
+ return (close_buffered_stream (buffers[fd]));
+}
+
+/* Make the BUFFERED_STREAM associcated with buffers[FD] be BP, and return
+ the old BUFFERED_STREAM. */
+BUFFERED_STREAM *
+set_buffered_stream (fd, bp)
+ int fd;
+ BUFFERED_STREAM *bp;
+{
+ BUFFERED_STREAM *ret;
+
+ ret = buffers[fd];
+ buffers[fd] = bp;
+ return ret;
+}
+
+/* Read a buffer full of characters from BP, a buffered stream. */
+static int
+b_fill_buffer (bp)
+ BUFFERED_STREAM *bp;
+{
+ ssize_t nr;
+
+ CHECK_TERMSIG;
+ nr = zread (bp->b_fd, bp->b_buffer, bp->b_size);
+ if (nr <= 0)
+ {
+ bp->b_used = 0;
+ bp->b_buffer[0] = 0;
+ if (nr == 0)
+ bp->b_flag |= B_EOF;
+ else
+ bp->b_flag |= B_ERROR;
+ return (EOF);
+ }
+
+#if defined (__CYGWIN__)
+ /* If on cygwin, translate \r\n to \n. */
+ if (nr >= 2 && bp->b_buffer[nr - 2] == '\r' && bp->b_buffer[nr - 1] == '\n')
+ {
+ bp->b_buffer[nr - 2] = '\n';
+ nr--;
+ }
+#endif
+
+ bp->b_used = nr;
+ bp->b_inputp = 0;
+ return (bp->b_buffer[bp->b_inputp++] & 0xFF);
+}
+
+/* Get a character from buffered stream BP. */
+#define bufstream_getc(bp) \
+ (bp->b_inputp == bp->b_used || !bp->b_used) \
+ ? b_fill_buffer (bp) \
+ : bp->b_buffer[bp->b_inputp++] & 0xFF
+
+/* Push C back onto buffered stream BP. */
+static int
+bufstream_ungetc(c, bp)
+ int c;
+ BUFFERED_STREAM *bp;
+{
+ if (c == EOF || bp->b_inputp == 0)
+ return (EOF);
+
+ bp->b_buffer[--bp->b_inputp] = c;
+ return (c);
+}
+
+/* Seek backwards on file BFD to synchronize what we've read so far
+ with the underlying file pointer. */
+int
+sync_buffered_stream (bfd)
+ int bfd;
+{
+ BUFFERED_STREAM *bp;
+ off_t chars_left;
+
+ if (buffers == 0 || (bp = buffers[bfd]) == 0)
+ return (-1);
+
+ chars_left = bp->b_used - bp->b_inputp;
+ if (chars_left)
+ lseek (bp->b_fd, -chars_left, SEEK_CUR);
+ bp->b_used = bp->b_inputp = 0;
+ return (0);
+}
+
+int
+buffered_getchar ()
+{
+ CHECK_TERMSIG;
+
+#if !defined (DJGPP)
+ return (bufstream_getc (buffers[bash_input.location.buffered_fd]));
+#else
+ /* On DJGPP, ignore \r. */
+ int ch;
+ while ((ch = bufstream_getc (buffers[bash_input.location.buffered_fd])) == '\r')
+ ;
+ return ch;
+#endif
+}
+
+int
+buffered_ungetchar (c)
+ int c;
+{
+ return (bufstream_ungetc (c, buffers[bash_input.location.buffered_fd]));
+}
+
+/* Make input come from file descriptor BFD through a buffered stream. */
+void
+with_input_from_buffered_stream (bfd, name)
+ int bfd;
+ char *name;
+{
+ INPUT_STREAM location;
+ BUFFERED_STREAM *bp;
+
+ location.buffered_fd = bfd;
+ /* Make sure the buffered stream exists. */
+ bp = fd_to_buffered_stream (bfd);
+ init_yy_io (bp == 0 ? return_EOF : buffered_getchar,
+ buffered_ungetchar, st_bstream, name, location);
+}
+
+#if defined (TEST)
+void *
+xmalloc(s)
+int s;
+{
+ return (malloc (s));
+}
+
+void *
+xrealloc(s, size)
+char *s;
+int size;
+{
+ if (!s)
+ return(malloc (size));
+ else
+ return(realloc (s, size));
+}
+
+void
+init_yy_io ()
+{
+}
+
+process(bp)
+BUFFERED_STREAM *bp;
+{
+ int c;
+
+ while ((c = bufstream_getc(bp)) != EOF)
+ putchar(c);
+}
+
+BASH_INPUT bash_input;
+
+struct stat dsb; /* can be used from gdb */
+
+/* imitate /bin/cat */
+main(argc, argv)
+int argc;
+char **argv;
+{
+ register int i;
+ BUFFERED_STREAM *bp;
+
+ if (argc == 1) {
+ bp = fd_to_buffered_stream (0);
+ process(bp);
+ exit(0);
+ }
+ for (i = 1; i < argc; i++) {
+ if (argv[i][0] == '-' && argv[i][1] == '\0') {
+ bp = fd_to_buffered_stream (0);
+ if (!bp)
+ continue;
+ process(bp);
+ free_buffered_stream (bp);
+ } else {
+ bp = open_buffered_stream (argv[i]);
+ if (!bp)
+ continue;
+ process(bp);
+ close_buffered_stream (bp);
+ }
+ }
+ exit(0);
+}
+#endif /* TEST */
+#endif /* BUFFERED_INPUT */
diff --git a/input.h b/input.h
new file mode 100644
index 0000000..834626a
--- /dev/null
+++ b/input.h
@@ -0,0 +1,132 @@
+/* input.h -- Structures and unions used for reading input. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_INPUT_H_)
+#define _INPUT_H_
+
+#include "stdc.h"
+
+/* Function pointers can be declared as (Function *)foo. */
+#if !defined (_FUNCTION_DEF)
+# define _FUNCTION_DEF
+typedef int Function ();
+typedef void VFunction ();
+typedef char *CPFunction (); /* no longer used */
+typedef char **CPPFunction (); /* no longer used */
+#endif /* _FUNCTION_DEF */
+
+typedef int sh_cget_func_t __P((void)); /* sh_ivoidfunc_t */
+typedef int sh_cunget_func_t __P((int)); /* sh_intfunc_t */
+
+enum stream_type {st_none, st_stdin, st_stream, st_string, st_bstream};
+
+#if defined (BUFFERED_INPUT)
+
+/* Possible values for b_flag. */
+#undef B_EOF
+#undef B_ERROR /* There are some systems with this define */
+#undef B_UNBUFF
+
+#define B_EOF 0x01
+#define B_ERROR 0x02
+#define B_UNBUFF 0x04
+#define B_WASBASHINPUT 0x08
+
+/* A buffered stream. Like a FILE *, but with our own buffering and
+ synchronization. Look in input.c for the implementation. */
+typedef struct BSTREAM
+{
+ int b_fd;
+ char *b_buffer; /* The buffer that holds characters read. */
+ size_t b_size; /* How big the buffer is. */
+ size_t b_used; /* How much of the buffer we're using, */
+ int b_flag; /* Flag values. */
+ size_t b_inputp; /* The input pointer, index into b_buffer. */
+} BUFFERED_STREAM;
+
+#if 0
+extern BUFFERED_STREAM **buffers;
+#endif
+
+extern int default_buffered_input;
+
+#endif /* BUFFERED_INPUT */
+
+typedef union {
+ FILE *file;
+ char *string;
+#if defined (BUFFERED_INPUT)
+ int buffered_fd;
+#endif
+} INPUT_STREAM;
+
+typedef struct {
+ enum stream_type type;
+ char *name;
+ INPUT_STREAM location;
+ sh_cget_func_t *getter;
+ sh_cunget_func_t *ungetter;
+} BASH_INPUT;
+
+extern BASH_INPUT bash_input;
+
+/* Functions from parse.y whose use directly or indirectly depends on the
+ definitions in this file. */
+extern void initialize_bash_input __P((void));
+extern void init_yy_io __P((sh_cget_func_t *, sh_cunget_func_t *, enum stream_type, const char *, INPUT_STREAM));
+extern char *yy_input_name __P((void));
+extern void with_input_from_stdin __P((void));
+extern void with_input_from_string __P((char *, const char *));
+extern void with_input_from_stream __P((FILE *, const char *));
+extern void push_stream __P((int));
+extern void pop_stream __P((void));
+extern int stream_on_stack __P((enum stream_type));
+extern char *read_secondary_line __P((int));
+extern int find_reserved_word __P((char *));
+extern void gather_here_documents __P((void));
+extern void execute_variable_command __P((char *, char *));
+
+extern int *save_token_state __P((void));
+extern void restore_token_state __P((int *));
+
+/* Functions from input.c */
+extern int getc_with_restart __P((FILE *));
+extern int ungetc_with_restart __P((int, FILE *));
+
+#if defined (BUFFERED_INPUT)
+/* Functions from input.c. */
+extern int fd_is_bash_input __P((int));
+extern int set_bash_input_fd __P((int));
+extern int save_bash_input __P((int, int));
+extern int check_bash_input __P((int));
+extern int duplicate_buffered_stream __P((int, int));
+extern BUFFERED_STREAM *fd_to_buffered_stream __P((int));
+extern BUFFERED_STREAM *set_buffered_stream __P((int, BUFFERED_STREAM *));
+extern BUFFERED_STREAM *open_buffered_stream __P((char *));
+extern void free_buffered_stream __P((BUFFERED_STREAM *));
+extern int close_buffered_stream __P((BUFFERED_STREAM *));
+extern int close_buffered_fd __P((int));
+extern int sync_buffered_stream __P((int));
+extern int buffered_getchar __P((void));
+extern int buffered_ungetchar __P((int));
+extern void with_input_from_buffered_stream __P((int, char *));
+#endif /* BUFFERED_INPUT */
+
+#endif /* _INPUT_H_ */
diff --git a/jobs.c b/jobs.c
new file mode 100644
index 0000000..df13ad9
--- /dev/null
+++ b/jobs.c
@@ -0,0 +1,4240 @@
+/* jobs.c - functions that make children, remember them, and handle their termination. */
+
+/* This file works with both POSIX and BSD systems. It implements job
+ control. */
+
+/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+#include "trap.h"
+#include <stdio.h>
+#include <signal.h>
+#include <errno.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "posixtime.h"
+
+#if defined (HAVE_SYS_RESOURCE_H) && defined (HAVE_WAIT3) && !defined (_POSIX_VERSION) && !defined (RLIMTYPE)
+# include <sys/resource.h>
+#endif /* !_POSIX_VERSION && HAVE_SYS_RESOURCE_H && HAVE_WAIT3 && !RLIMTYPE */
+
+#if defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+
+#include "filecntl.h"
+#include <sys/ioctl.h>
+#include <sys/param.h>
+
+#if defined (BUFFERED_INPUT)
+# include "input.h"
+#endif
+
+/* Need to include this up here for *_TTY_DRIVER definitions. */
+#include "shtty.h"
+
+/* Define this if your output is getting swallowed. It's a no-op on
+ machines with the termio or termios tty drivers. */
+/* #define DRAIN_OUTPUT */
+
+/* For the TIOCGPGRP and TIOCSPGRP ioctl parameters on HP-UX */
+#if defined (hpux) && !defined (TERMIOS_TTY_DRIVER)
+# include <bsdtty.h>
+#endif /* hpux && !TERMIOS_TTY_DRIVER */
+
+#include "bashansi.h"
+#include "bashintl.h"
+#include "shell.h"
+#include "jobs.h"
+#include "execute_cmd.h"
+#include "flags.h"
+
+#include "builtins/builtext.h"
+#include "builtins/common.h"
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+#define DEFAULT_CHILD_MAX 32
+#if !defined (DEBUG)
+#define MAX_JOBS_IN_ARRAY 4096 /* production */
+#else
+#define MAX_JOBS_IN_ARRAY 128 /* testing */
+#endif
+
+/* Flag values for second argument to delete_job */
+#define DEL_WARNSTOPPED 1 /* warn about deleting stopped jobs */
+#define DEL_NOBGPID 2 /* don't add pgrp leader to bgpids */
+
+/* Take care of system dependencies that must be handled when waiting for
+ children. The arguments to the WAITPID macro match those to the Posix.1
+ waitpid() function. */
+
+#if defined (ultrix) && defined (mips) && defined (_POSIX_VERSION)
+# define WAITPID(pid, statusp, options) \
+ wait3 ((union wait *)statusp, options, (struct rusage *)0)
+#else
+# if defined (_POSIX_VERSION) || defined (HAVE_WAITPID)
+# define WAITPID(pid, statusp, options) \
+ waitpid ((pid_t)pid, statusp, options)
+# else
+# if defined (HAVE_WAIT3)
+# define WAITPID(pid, statusp, options) \
+ wait3 (statusp, options, (struct rusage *)0)
+# else
+# define WAITPID(pid, statusp, options) \
+ wait3 (statusp, options, (int *)0)
+# endif /* HAVE_WAIT3 */
+# endif /* !_POSIX_VERSION && !HAVE_WAITPID*/
+#endif /* !(Ultrix && mips && _POSIX_VERSION) */
+
+/* getpgrp () varies between systems. Even systems that claim to be
+ Posix.1 compatible lie sometimes (Ultrix, SunOS4, apollo). */
+#if defined (GETPGRP_VOID)
+# define getpgid(p) getpgrp ()
+#else
+# define getpgid(p) getpgrp (p)
+#endif /* !GETPGRP_VOID */
+
+/* If the system needs it, REINSTALL_SIGCHLD_HANDLER will reinstall the
+ handler for SIGCHLD. */
+#if defined (MUST_REINSTALL_SIGHANDLERS)
+# define REINSTALL_SIGCHLD_HANDLER signal (SIGCHLD, sigchld_handler)
+#else
+# define REINSTALL_SIGCHLD_HANDLER
+#endif /* !MUST_REINSTALL_SIGHANDLERS */
+
+/* Some systems let waitpid(2) tell callers about stopped children. */
+#if !defined (WCONTINUED) || defined (WCONTINUED_BROKEN)
+# undef WCONTINUED
+# define WCONTINUED 0
+#endif
+#if !defined (WIFCONTINUED)
+# define WIFCONTINUED(s) (0)
+#endif
+
+/* The number of additional slots to allocate when we run out. */
+#define JOB_SLOTS 8
+
+typedef int sh_job_map_func_t __P((JOB *, int, int, int));
+
+/* Variables used here but defined in other files. */
+extern int subshell_environment, line_number;
+extern int posixly_correct, shell_level;
+extern int last_command_exit_value, last_command_exit_signal;
+extern int loop_level, breaking;
+extern int executing_list;
+extern int sourcelevel;
+extern int running_trap;
+extern sh_builtin_func_t *this_shell_builtin;
+extern char *shell_name, *this_command_name;
+extern sigset_t top_level_mask;
+extern procenv_t wait_intr_buf;
+extern int wait_signal_received;
+extern WORD_LIST *subst_assign_varlist;
+
+static struct jobstats zerojs = { -1L, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NO_JOB, NO_JOB, 0, 0 };
+struct jobstats js = { -1L, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NO_JOB, NO_JOB, 0, 0 };
+
+struct bgpids bgpids = { 0, 0, 0 };
+
+/* The array of known jobs. */
+JOB **jobs = (JOB **)NULL;
+
+#if 0
+/* The number of slots currently allocated to JOBS. */
+int job_slots = 0;
+#endif
+
+/* The controlling tty for this shell. */
+int shell_tty = -1;
+
+/* The shell's process group. */
+pid_t shell_pgrp = NO_PID;
+
+/* The terminal's process group. */
+pid_t terminal_pgrp = NO_PID;
+
+/* The process group of the shell's parent. */
+pid_t original_pgrp = NO_PID;
+
+/* The process group of the pipeline currently being made. */
+pid_t pipeline_pgrp = (pid_t)0;
+
+#if defined (PGRP_PIPE)
+/* Pipes which each shell uses to communicate with the process group leader
+ until all of the processes in a pipeline have been started. Then the
+ process leader is allowed to continue. */
+int pgrp_pipe[2] = { -1, -1 };
+#endif
+
+#if 0
+/* The job which is current; i.e. the one that `%+' stands for. */
+int current_job = NO_JOB;
+
+/* The previous job; i.e. the one that `%-' stands for. */
+int previous_job = NO_JOB;
+#endif
+
+/* Last child made by the shell. */
+pid_t last_made_pid = NO_PID;
+
+/* Pid of the last asynchronous child. */
+pid_t last_asynchronous_pid = NO_PID;
+
+/* The pipeline currently being built. */
+PROCESS *the_pipeline = (PROCESS *)NULL;
+
+/* If this is non-zero, do job control. */
+int job_control = 1;
+
+/* Call this when you start making children. */
+int already_making_children = 0;
+
+/* If this is non-zero, $LINES and $COLUMNS are reset after every process
+ exits from get_tty_state(). */
+int check_window_size;
+
+/* Functions local to this file. */
+
+static sighandler wait_sigint_handler __P((int));
+static sighandler sigchld_handler __P((int));
+static sighandler sigcont_sighandler __P((int));
+static sighandler sigstop_sighandler __P((int));
+
+static int waitchld __P((pid_t, int));
+
+static PROCESS *find_pipeline __P((pid_t, int, int *));
+static PROCESS *find_process __P((pid_t, int, int *));
+
+static char *current_working_directory __P((void));
+static char *job_working_directory __P((void));
+static char *j_strsignal __P((int));
+static char *printable_job_status __P((int, PROCESS *, int));
+
+static PROCESS *find_last_proc __P((int, int));
+static pid_t find_last_pid __P((int, int));
+
+static int set_new_line_discipline __P((int));
+static int map_over_jobs __P((sh_job_map_func_t *, int, int));
+static int job_last_stopped __P((int));
+static int job_last_running __P((int));
+static int most_recent_job_in_state __P((int, JOB_STATE));
+static int find_job __P((pid_t, int, PROCESS **));
+static int print_job __P((JOB *, int, int, int));
+static int process_exit_status __P((WAIT));
+static int process_exit_signal __P((WAIT));
+static int job_exit_status __P((int));
+static int job_exit_signal __P((int));
+static int set_job_status_and_cleanup __P((int));
+
+static WAIT job_signal_status __P((int));
+static WAIT raw_job_exit_status __P((int));
+
+static void notify_of_job_status __P((void));
+static void reset_job_indices __P((void));
+static void cleanup_dead_jobs __P((void));
+static int processes_in_job __P((int));
+static void realloc_jobs_list __P((void));
+static int compact_jobs_list __P((int));
+static int discard_pipeline __P((PROCESS *));
+static void add_process __P((char *, pid_t));
+static void print_pipeline __P((PROCESS *, int, int, FILE *));
+static void pretty_print_job __P((int, int, FILE *));
+static void set_current_job __P((int));
+static void reset_current __P((void));
+static void set_job_running __P((int));
+static void setjstatus __P((int));
+static int maybe_give_terminal_to __P((pid_t, pid_t, int));
+static void mark_all_jobs_as_dead __P((void));
+static void mark_dead_jobs_as_notified __P((int));
+static void restore_sigint_handler __P((void));
+#if defined (PGRP_PIPE)
+static void pipe_read __P((int *));
+#endif
+
+static struct pidstat *bgp_alloc __P((pid_t, int));
+static struct pidstat *bgp_add __P((pid_t, int));
+static int bgp_delete __P((pid_t));
+static void bgp_clear __P((void));
+static int bgp_search __P((pid_t));
+static void bgp_prune __P((void));
+
+#if defined (ARRAY_VARS)
+static int *pstatuses; /* list of pipeline statuses */
+static int statsize;
+#endif
+
+/* Used to synchronize between wait_for and other functions and the SIGCHLD
+ signal handler. */
+static int sigchld;
+static int queue_sigchld;
+
+#define QUEUE_SIGCHLD(os) (os) = sigchld, queue_sigchld++
+
+#define UNQUEUE_SIGCHLD(os) \
+ do { \
+ queue_sigchld--; \
+ if (queue_sigchld == 0 && os != sigchld) \
+ waitchld (-1, 0); \
+ } while (0)
+
+static SigHandler *old_tstp, *old_ttou, *old_ttin;
+static SigHandler *old_cont = (SigHandler *)SIG_DFL;
+
+/* A place to temporarily save the current pipeline. */
+static PROCESS *saved_pipeline;
+static int saved_already_making_children;
+
+/* Set this to non-zero whenever you don't want the jobs list to change at
+ all: no jobs deleted and no status change notifications. This is used,
+ for example, when executing SIGCHLD traps, which may run arbitrary
+ commands. */
+static int jobs_list_frozen;
+
+static char retcode_name_buffer[64];
+
+/* flags to detect pid wraparound */
+static pid_t first_pid = NO_PID;
+static int pid_wrap = -1;
+
+#if !defined (_POSIX_VERSION)
+
+/* These are definitions to map POSIX 1003.1 functions onto existing BSD
+ library functions and system calls. */
+#define setpgid(pid, pgrp) setpgrp (pid, pgrp)
+#define tcsetpgrp(fd, pgrp) ioctl ((fd), TIOCSPGRP, &(pgrp))
+
+pid_t
+tcgetpgrp (fd)
+ int fd;
+{
+ pid_t pgrp;
+
+ /* ioctl will handle setting errno correctly. */
+ if (ioctl (fd, TIOCGPGRP, &pgrp) < 0)
+ return (-1);
+ return (pgrp);
+}
+
+#endif /* !_POSIX_VERSION */
+
+/* Initialize the global job stats structure and other bookkeeping variables */
+void
+init_job_stats ()
+{
+ js = zerojs;
+ first_pid = NO_PID;
+ pid_wrap = -1;
+}
+
+/* Return the working directory for the current process. Unlike
+ job_working_directory, this does not call malloc (), nor do any
+ of the functions it calls. This is so that it can safely be called
+ from a signal handler. */
+static char *
+current_working_directory ()
+{
+ char *dir;
+ static char d[PATH_MAX];
+
+ dir = get_string_value ("PWD");
+
+ if (dir == 0 && the_current_working_directory && no_symbolic_links)
+ dir = the_current_working_directory;
+
+ if (dir == 0)
+ {
+ dir = getcwd (d, sizeof(d));
+ if (dir)
+ dir = d;
+ }
+
+ return (dir == 0) ? "<unknown>" : dir;
+}
+
+/* Return the working directory for the current process. */
+static char *
+job_working_directory ()
+{
+ char *dir;
+
+ dir = get_string_value ("PWD");
+ if (dir)
+ return (savestring (dir));
+
+ dir = get_working_directory ("job-working-directory");
+ if (dir)
+ return (dir);
+
+ return (savestring ("<unknown>"));
+}
+
+void
+making_children ()
+{
+ if (already_making_children)
+ return;
+
+ already_making_children = 1;
+ start_pipeline ();
+}
+
+void
+stop_making_children ()
+{
+ already_making_children = 0;
+}
+
+void
+cleanup_the_pipeline ()
+{
+ PROCESS *disposer;
+ sigset_t set, oset;
+
+ BLOCK_CHILD (set, oset);
+ disposer = the_pipeline;
+ the_pipeline = (PROCESS *)NULL;
+ UNBLOCK_CHILD (oset);
+
+ if (disposer)
+ discard_pipeline (disposer);
+}
+
+void
+save_pipeline (clear)
+ int clear;
+{
+ saved_pipeline = the_pipeline;
+ if (clear)
+ the_pipeline = (PROCESS *)NULL;
+ saved_already_making_children = already_making_children;
+}
+
+void
+restore_pipeline (discard)
+ int discard;
+{
+ PROCESS *old_pipeline;
+
+ old_pipeline = the_pipeline;
+ the_pipeline = saved_pipeline;
+ already_making_children = saved_already_making_children;
+ if (discard && old_pipeline)
+ discard_pipeline (old_pipeline);
+}
+
+/* Start building a pipeline. */
+void
+start_pipeline ()
+{
+ if (the_pipeline)
+ {
+ cleanup_the_pipeline ();
+ pipeline_pgrp = 0;
+#if defined (PGRP_PIPE)
+ sh_closepipe (pgrp_pipe);
+#endif
+ }
+
+#if defined (PGRP_PIPE)
+ if (job_control)
+ {
+ if (pipe (pgrp_pipe) == -1)
+ sys_error (_("start_pipeline: pgrp pipe"));
+ }
+#endif
+}
+
+/* Stop building a pipeline. Install the process list in the job array.
+ This returns the index of the newly installed job.
+ DEFERRED is a command structure to be executed upon satisfactory
+ execution exit of this pipeline. */
+int
+stop_pipeline (async, deferred)
+ int async;
+ COMMAND *deferred;
+{
+ register int i, j;
+ JOB *newjob;
+ sigset_t set, oset;
+
+ BLOCK_CHILD (set, oset);
+
+#if defined (PGRP_PIPE)
+ /* The parent closes the process group synchronization pipe. */
+ sh_closepipe (pgrp_pipe);
+#endif
+
+ cleanup_dead_jobs ();
+
+ if (js.j_jobslots == 0)
+ {
+ js.j_jobslots = JOB_SLOTS;
+ jobs = (JOB **)xmalloc (js.j_jobslots * sizeof (JOB *));
+
+ /* Now blank out these new entries. */
+ for (i = 0; i < js.j_jobslots; i++)
+ jobs[i] = (JOB *)NULL;
+
+ js.j_firstj = js.j_lastj = js.j_njobs = 0;
+ }
+
+ /* Scan from the last slot backward, looking for the next free one. */
+ /* XXX - revisit this interactive assumption */
+ /* XXX - this way for now */
+ if (interactive)
+ {
+ for (i = js.j_jobslots; i; i--)
+ if (jobs[i - 1])
+ break;
+ }
+ else
+ {
+#if 0
+ /* This wraps around, but makes it inconvenient to extend the array */
+ for (i = js.j_lastj+1; i != js.j_lastj; i++)
+ {
+ if (i >= js.j_jobslots)
+ i = 0;
+ if (jobs[i] == 0)
+ break;
+ }
+ if (i == js.j_lastj)
+ i = js.j_jobslots;
+#else
+ /* This doesn't wrap around yet. */
+ for (i = js.j_lastj ? js.j_lastj + 1 : js.j_lastj; i < js.j_jobslots; i++)
+ if (jobs[i] == 0)
+ break;
+#endif
+ }
+
+ /* Do we need more room? */
+
+ /* First try compaction */
+ if ((interactive_shell == 0 || subshell_environment) && i == js.j_jobslots && js.j_jobslots >= MAX_JOBS_IN_ARRAY)
+ i = compact_jobs_list (0);
+
+ /* If we can't compact, reallocate */
+ if (i == js.j_jobslots)
+ {
+ js.j_jobslots += JOB_SLOTS;
+ jobs = (JOB **)xrealloc (jobs, (js.j_jobslots * sizeof (JOB *)));
+
+ for (j = i; j < js.j_jobslots; j++)
+ jobs[j] = (JOB *)NULL;
+ }
+
+ /* Add the current pipeline to the job list. */
+ if (the_pipeline)
+ {
+ register PROCESS *p;
+ int any_running, any_stopped, n;
+
+ newjob = (JOB *)xmalloc (sizeof (JOB));
+
+ for (n = 1, p = the_pipeline; p->next != the_pipeline; n++, p = p->next)
+ ;
+ p->next = (PROCESS *)NULL;
+ newjob->pipe = REVERSE_LIST (the_pipeline, PROCESS *);
+ for (p = newjob->pipe; p->next; p = p->next)
+ ;
+ p->next = newjob->pipe;
+
+ the_pipeline = (PROCESS *)NULL;
+ newjob->pgrp = pipeline_pgrp;
+ pipeline_pgrp = 0;
+
+ newjob->flags = 0;
+
+ /* Flag to see if in another pgrp. */
+ if (job_control)
+ newjob->flags |= J_JOBCONTROL;
+
+ /* Set the state of this pipeline. */
+ p = newjob->pipe;
+ any_running = any_stopped = 0;
+ do
+ {
+ any_running |= PRUNNING (p);
+ any_stopped |= PSTOPPED (p);
+ p = p->next;
+ }
+ while (p != newjob->pipe);
+
+ newjob->state = any_running ? JRUNNING : (any_stopped ? JSTOPPED : JDEAD);
+ newjob->wd = job_working_directory ();
+ newjob->deferred = deferred;
+
+ newjob->j_cleanup = (sh_vptrfunc_t *)NULL;
+ newjob->cleanarg = (PTR_T) NULL;
+
+ jobs[i] = newjob;
+ if (newjob->state == JDEAD && (newjob->flags & J_FOREGROUND))
+ setjstatus (i);
+ if (newjob->state == JDEAD)
+ {
+ js.c_reaped += n; /* wouldn't have been done since this was not part of a job */
+ js.j_ndead++;
+ }
+ js.c_injobs += n;
+
+ js.j_lastj = i;
+ js.j_njobs++;
+ }
+ else
+ newjob = (JOB *)NULL;
+
+ if (newjob)
+ js.j_lastmade = newjob;
+
+ if (async)
+ {
+ if (newjob)
+ {
+ newjob->flags &= ~J_FOREGROUND;
+ newjob->flags |= J_ASYNC;
+ js.j_lastasync = newjob;
+ }
+ reset_current ();
+ }
+ else
+ {
+ if (newjob)
+ {
+ newjob->flags |= J_FOREGROUND;
+ /*
+ * !!!!! NOTE !!!!! (chet@ins.cwru.edu)
+ *
+ * The currently-accepted job control wisdom says to set the
+ * terminal's process group n+1 times in an n-step pipeline:
+ * once in the parent and once in each child. This is where
+ * the parent gives it away.
+ *
+ * Don't give the terminal away if this shell is an asynchronous
+ * subshell.
+ *
+ */
+ if (job_control && newjob->pgrp && (subshell_environment&SUBSHELL_ASYNC) == 0)
+ maybe_give_terminal_to (shell_pgrp, newjob->pgrp, 0);
+ }
+ }
+
+ stop_making_children ();
+ UNBLOCK_CHILD (oset);
+ return (js.j_current);
+}
+
+/* Functions to manage the list of exited background pids whose status has
+ been saved. */
+
+static struct pidstat *
+bgp_alloc (pid, status)
+ pid_t pid;
+ int status;
+{
+ struct pidstat *ps;
+
+ ps = (struct pidstat *)xmalloc (sizeof (struct pidstat));
+ ps->pid = pid;
+ ps->status = status;
+ ps->next = (struct pidstat *)0;
+ return ps;
+}
+
+static struct pidstat *
+bgp_add (pid, status)
+ pid_t pid;
+ int status;
+{
+ struct pidstat *ps;
+
+ ps = bgp_alloc (pid, status);
+
+ if (bgpids.list == 0)
+ {
+ bgpids.list = bgpids.end = ps;
+ bgpids.npid = 0; /* just to make sure */
+ }
+ else
+ {
+ bgpids.end->next = ps;
+ bgpids.end = ps;
+ }
+ bgpids.npid++;
+
+ if (bgpids.npid > js.c_childmax)
+ bgp_prune ();
+
+ return ps;
+}
+
+static int
+bgp_delete (pid)
+ pid_t pid;
+{
+ struct pidstat *prev, *p;
+
+ for (prev = p = bgpids.list; p; prev = p, p = p->next)
+ if (p->pid == pid)
+ {
+ prev->next = p->next; /* remove from list */
+ break;
+ }
+
+ if (p == 0)
+ return 0; /* not found */
+
+#if defined (DEBUG)
+ itrace("bgp_delete: deleting %d", pid);
+#endif
+
+ /* Housekeeping in the border cases. */
+ if (p == bgpids.list)
+ bgpids.list = bgpids.list->next;
+ else if (p == bgpids.end)
+ bgpids.end = prev;
+
+ bgpids.npid--;
+ if (bgpids.npid == 0)
+ bgpids.list = bgpids.end = 0;
+ else if (bgpids.npid == 1)
+ bgpids.end = bgpids.list; /* just to make sure */
+
+ free (p);
+ return 1;
+}
+
+/* Clear out the list of saved statuses */
+static void
+bgp_clear ()
+{
+ struct pidstat *ps, *p;
+
+ for (ps = bgpids.list; ps; )
+ {
+ p = ps;
+ ps = ps->next;
+ free (p);
+ }
+ bgpids.list = bgpids.end = 0;
+ bgpids.npid = 0;
+}
+
+/* Search for PID in the list of saved background pids; return its status if
+ found. If not found, return -1. */
+static int
+bgp_search (pid)
+ pid_t pid;
+{
+ struct pidstat *ps;
+
+ for (ps = bgpids.list ; ps; ps = ps->next)
+ if (ps->pid == pid)
+ return ps->status;
+ return -1;
+}
+
+static void
+bgp_prune ()
+{
+ struct pidstat *ps;
+
+ while (bgpids.npid > js.c_childmax)
+ {
+ ps = bgpids.list;
+ bgpids.list = bgpids.list->next;
+ free (ps);
+ bgpids.npid--;
+ }
+}
+
+/* Reset the values of js.j_lastj and js.j_firstj after one or both have
+ been deleted. The caller should check whether js.j_njobs is 0 before
+ calling this. This wraps around, but the rest of the code does not. At
+ this point, it should not matter. */
+static void
+reset_job_indices ()
+{
+ int old;
+
+ if (jobs[js.j_firstj] == 0)
+ {
+ old = js.j_firstj++;
+ if (old >= js.j_jobslots)
+ old = js.j_jobslots - 1;
+ while (js.j_firstj != old)
+ {
+ if (js.j_firstj >= js.j_jobslots)
+ js.j_firstj = 0;
+ if (jobs[js.j_firstj] || js.j_firstj == old) /* needed if old == 0 */
+ break;
+ js.j_firstj++;
+ }
+ if (js.j_firstj == old)
+ js.j_firstj = js.j_lastj = js.j_njobs = 0;
+ }
+ if (jobs[js.j_lastj] == 0)
+ {
+ old = js.j_lastj--;
+ if (old < 0)
+ old = 0;
+ while (js.j_lastj != old)
+ {
+ if (js.j_lastj < 0)
+ js.j_lastj = js.j_jobslots - 1;
+ if (jobs[js.j_lastj] || js.j_lastj == old) /* needed if old == js.j_jobslots */
+ break;
+ js.j_lastj--;
+ }
+ if (js.j_lastj == old)
+ js.j_firstj = js.j_lastj = js.j_njobs = 0;
+ }
+}
+
+/* Delete all DEAD jobs that the user had received notification about. */
+static void
+cleanup_dead_jobs ()
+{
+ register int i;
+ int os;
+
+ if (js.j_jobslots == 0 || jobs_list_frozen)
+ return;
+
+ QUEUE_SIGCHLD(os);
+
+ /* XXX could use js.j_firstj and js.j_lastj here */
+ for (i = 0; i < js.j_jobslots; i++)
+ {
+#if defined (DEBUG)
+ if (i < js.j_firstj && jobs[i])
+ itrace("cleanup_dead_jobs: job %d non-null before js.j_firstj (%d)", i, js.j_firstj);
+ if (i > js.j_lastj && jobs[i])
+ itrace("cleanup_dead_jobs: job %d non-null after js.j_lastj (%d)", i, js.j_lastj);
+#endif
+
+ if (jobs[i] && DEADJOB (i) && IS_NOTIFIED (i))
+ delete_job (i, 0);
+ }
+
+#if defined (COPROCESS_SUPPORT)
+ coproc_reap ();
+#endif
+
+ UNQUEUE_SIGCHLD(os);
+}
+
+static int
+processes_in_job (job)
+ int job;
+{
+ int nproc;
+ register PROCESS *p;
+
+ nproc = 0;
+ p = jobs[job]->pipe;
+ do
+ {
+ p = p->next;
+ nproc++;
+ }
+ while (p != jobs[job]->pipe);
+
+ return nproc;
+}
+
+static void
+delete_old_job (pid)
+ pid_t pid;
+{
+ PROCESS *p;
+ int job;
+
+ job = find_job (pid, 0, &p);
+ if (job != NO_JOB)
+ {
+#ifdef DEBUG
+ itrace ("delete_old_job: found pid %d in job %d with state %d", pid, job, jobs[job]->state);
+#endif
+ if (JOBSTATE (job) == JDEAD)
+ delete_job (job, DEL_NOBGPID);
+ else
+ {
+ internal_warning (_("forked pid %d appears in running job %d"), pid, job);
+ if (p)
+ p->pid = 0;
+ }
+ }
+}
+
+/* Reallocate and compress the jobs list. This returns with a jobs array
+ whose size is a multiple of JOB_SLOTS and can hold the current number of
+ jobs. Heuristics are used to minimize the number of new reallocs. */
+static void
+realloc_jobs_list ()
+{
+ sigset_t set, oset;
+ int nsize, i, j, ncur, nprev;
+ JOB **nlist;
+
+ ncur = nprev = NO_JOB;
+ nsize = ((js.j_njobs + JOB_SLOTS - 1) / JOB_SLOTS);
+ nsize *= JOB_SLOTS;
+ i = js.j_njobs % JOB_SLOTS;
+ if (i == 0 || i > (JOB_SLOTS >> 1))
+ nsize += JOB_SLOTS;
+
+ BLOCK_CHILD (set, oset);
+ nlist = (js.j_jobslots == nsize) ? jobs : (JOB **) xmalloc (nsize * sizeof (JOB *));
+
+ js.c_reaped = js.j_ndead = 0;
+ for (i = j = 0; i < js.j_jobslots; i++)
+ if (jobs[i])
+ {
+ if (i == js.j_current)
+ ncur = j;
+ if (i == js.j_previous)
+ nprev = j;
+ nlist[j++] = jobs[i];
+ if (jobs[i]->state == JDEAD)
+ {
+ js.j_ndead++;
+ js.c_reaped += processes_in_job (i);
+ }
+ }
+
+#if defined (DEBUG)
+ itrace ("realloc_jobs_list: resize jobs list from %d to %d", js.j_jobslots, nsize);
+ itrace ("realloc_jobs_list: j_lastj changed from %d to %d", js.j_lastj, (j > 0) ? j - 1 : 0);
+ itrace ("realloc_jobs_list: j_njobs changed from %d to %d", js.j_njobs, j);
+ itrace ("realloc_jobs_list: js.j_ndead %d js.c_reaped %d", js.j_ndead, js.c_reaped);
+#endif
+
+ js.j_firstj = 0;
+ js.j_lastj = (j > 0) ? j - 1 : 0;
+ js.j_njobs = j;
+ js.j_jobslots = nsize;
+
+ /* Zero out remaining slots in new jobs list */
+ for ( ; j < nsize; j++)
+ nlist[j] = (JOB *)NULL;
+
+ if (jobs != nlist)
+ {
+ free (jobs);
+ jobs = nlist;
+ }
+
+ if (ncur != NO_JOB)
+ js.j_current = ncur;
+ if (nprev != NO_JOB)
+ js.j_previous = nprev;
+
+ /* Need to reset these */
+ if (js.j_current == NO_JOB || js.j_previous == NO_JOB || js.j_current > js.j_lastj || js.j_previous > js.j_lastj)
+ reset_current ();
+
+#ifdef DEBUG
+ itrace ("realloc_jobs_list: reset js.j_current (%d) and js.j_previous (%d)", js.j_current, js.j_previous);
+#endif
+
+ UNBLOCK_CHILD (oset);
+}
+
+/* Compact the jobs list by removing dead jobs. Assumed that we have filled
+ the jobs array to some predefined maximum. Called when the shell is not
+ the foreground process (subshell_environment != 0). Returns the first
+ available slot in the compacted list. If that value is js.j_jobslots, then
+ the list needs to be reallocated. The jobs array may be in new memory if
+ this returns > 0 and < js.j_jobslots. FLAGS is reserved for future use. */
+static int
+compact_jobs_list (flags)
+ int flags;
+{
+ if (js.j_jobslots == 0 || jobs_list_frozen)
+ return js.j_jobslots;
+
+ reap_dead_jobs ();
+ realloc_jobs_list ();
+
+#ifdef DEBUG
+ itrace("compact_jobs_list: returning %d", (js.j_lastj || jobs[js.j_lastj]) ? js.j_lastj + 1 : 0);
+#endif
+
+ return ((js.j_lastj || jobs[js.j_lastj]) ? js.j_lastj + 1 : 0);
+}
+
+/* Delete the job at INDEX from the job list. Must be called
+ with SIGCHLD blocked. */
+void
+delete_job (job_index, dflags)
+ int job_index, dflags;
+{
+ register JOB *temp;
+ PROCESS *proc;
+ int ndel;
+
+ if (js.j_jobslots == 0 || jobs_list_frozen)
+ return;
+
+ if ((dflags & DEL_WARNSTOPPED) && subshell_environment == 0 && STOPPED (job_index))
+ internal_warning (_("deleting stopped job %d with process group %ld"), job_index+1, (long)jobs[job_index]->pgrp);
+ temp = jobs[job_index];
+ if (temp == 0)
+ return;
+
+ if ((dflags & DEL_NOBGPID) == 0)
+ {
+ proc = find_last_proc (job_index, 0);
+ /* Could do this just for J_ASYNC jobs, but we save all. */
+ if (proc)
+ bgp_add (proc->pid, process_exit_status (proc->status));
+ }
+
+ jobs[job_index] = (JOB *)NULL;
+ if (temp == js.j_lastmade)
+ js.j_lastmade = 0;
+ else if (temp == js.j_lastasync)
+ js.j_lastasync = 0;
+
+ free (temp->wd);
+ ndel = discard_pipeline (temp->pipe);
+
+ js.c_injobs -= ndel;
+ if (temp->state == JDEAD)
+ {
+ js.c_reaped -= ndel;
+ js.j_ndead--;
+ if (js.c_reaped < 0)
+ {
+#ifdef DEBUG
+ itrace("delete_job (%d pgrp %d): js.c_reaped (%d) < 0 ndel = %d js.j_ndead = %d", job_index, temp->pgrp, js.c_reaped, ndel, js.j_ndead);
+#endif
+ js.c_reaped = 0;
+ }
+ }
+
+ if (temp->deferred)
+ dispose_command (temp->deferred);
+
+ free (temp);
+
+ js.j_njobs--;
+ if (js.j_njobs == 0)
+ js.j_firstj = js.j_lastj = 0;
+ else if (jobs[js.j_firstj] == 0 || jobs[js.j_lastj] == 0)
+ reset_job_indices ();
+
+ if (job_index == js.j_current || job_index == js.j_previous)
+ reset_current ();
+}
+
+/* Must be called with SIGCHLD blocked. */
+void
+nohup_job (job_index)
+ int job_index;
+{
+ register JOB *temp;
+
+ if (js.j_jobslots == 0)
+ return;
+
+ if (temp = jobs[job_index])
+ temp->flags |= J_NOHUP;
+}
+
+/* Get rid of the data structure associated with a process chain. */
+static int
+discard_pipeline (chain)
+ register PROCESS *chain;
+{
+ register PROCESS *this, *next;
+ int n;
+
+ this = chain;
+ n = 0;
+ do
+ {
+ next = this->next;
+ FREE (this->command);
+ free (this);
+ n++;
+ this = next;
+ }
+ while (this != chain);
+
+ return n;
+}
+
+/* Add this process to the chain being built in the_pipeline.
+ NAME is the command string that will be exec'ed later.
+ PID is the process id of the child. */
+static void
+add_process (name, pid)
+ char *name;
+ pid_t pid;
+{
+ PROCESS *t, *p;
+
+#if defined (RECYCLES_PIDS)
+ int j;
+ p = find_process (pid, 0, &j);
+ if (p)
+ {
+# ifdef DEBUG
+ if (j == NO_JOB)
+ internal_warning (_("add_process: process %5ld (%s) in the_pipeline"), (long)p->pid, p->command);
+# endif
+ if (PALIVE (p))
+ internal_warning (_("add_process: pid %5ld (%s) marked as still alive"), (long)p->pid, p->command);
+ p->running = PS_RECYCLED; /* mark as recycled */
+ }
+#endif
+
+ t = (PROCESS *)xmalloc (sizeof (PROCESS));
+ t->next = the_pipeline;
+ t->pid = pid;
+ WSTATUS (t->status) = 0;
+ t->running = PS_RUNNING;
+ t->command = name;
+ the_pipeline = t;
+
+ if (t->next == 0)
+ t->next = t;
+ else
+ {
+ p = t->next;
+ while (p->next != t->next)
+ p = p->next;
+ p->next = t;
+ }
+}
+
+#if 0
+/* Take the last job and make it the first job. Must be called with
+ SIGCHLD blocked. */
+int
+rotate_the_pipeline ()
+{
+ PROCESS *p;
+
+ if (the_pipeline->next == the_pipeline)
+ return;
+ for (p = the_pipeline; p->next != the_pipeline; p = p->next)
+ ;
+ the_pipeline = p;
+}
+
+/* Reverse the order of the processes in the_pipeline. Must be called with
+ SIGCHLD blocked. */
+int
+reverse_the_pipeline ()
+{
+ PROCESS *p, *n;
+
+ if (the_pipeline->next == the_pipeline)
+ return;
+
+ for (p = the_pipeline; p->next != the_pipeline; p = p->next)
+ ;
+ p->next = (PROCESS *)NULL;
+
+ n = REVERSE_LIST (the_pipeline, PROCESS *);
+
+ the_pipeline = n;
+ for (p = the_pipeline; p->next; p = p->next)
+ ;
+ p->next = the_pipeline;
+}
+#endif
+
+/* Map FUNC over the list of jobs. If FUNC returns non-zero,
+ then it is time to stop mapping, and that is the return value
+ for map_over_jobs. FUNC is called with a JOB, arg1, arg2,
+ and INDEX. */
+static int
+map_over_jobs (func, arg1, arg2)
+ sh_job_map_func_t *func;
+ int arg1, arg2;
+{
+ register int i;
+ int result;
+ sigset_t set, oset;
+
+ if (js.j_jobslots == 0)
+ return 0;
+
+ BLOCK_CHILD (set, oset);
+
+ /* XXX could use js.j_firstj here */
+ for (i = result = 0; i < js.j_jobslots; i++)
+ {
+#if defined (DEBUG)
+ if (i < js.j_firstj && jobs[i])
+ itrace("map_over_jobs: job %d non-null before js.j_firstj (%d)", i, js.j_firstj);
+ if (i > js.j_lastj && jobs[i])
+ itrace("map_over_jobs: job %d non-null after js.j_lastj (%d)", i, js.j_lastj);
+#endif
+ if (jobs[i])
+ {
+ result = (*func)(jobs[i], arg1, arg2, i);
+ if (result)
+ break;
+ }
+ }
+
+ UNBLOCK_CHILD (oset);
+
+ return (result);
+}
+
+/* Cause all the jobs in the current pipeline to exit. */
+void
+terminate_current_pipeline ()
+{
+ if (pipeline_pgrp && pipeline_pgrp != shell_pgrp)
+ {
+ killpg (pipeline_pgrp, SIGTERM);
+ killpg (pipeline_pgrp, SIGCONT);
+ }
+}
+
+/* Cause all stopped jobs to exit. */
+void
+terminate_stopped_jobs ()
+{
+ register int i;
+
+ /* XXX could use js.j_firstj here */
+ for (i = 0; i < js.j_jobslots; i++)
+ {
+ if (jobs[i] && STOPPED (i))
+ {
+ killpg (jobs[i]->pgrp, SIGTERM);
+ killpg (jobs[i]->pgrp, SIGCONT);
+ }
+ }
+}
+
+/* Cause all jobs, running or stopped, to receive a hangup signal. If
+ a job is marked J_NOHUP, don't send the SIGHUP. */
+void
+hangup_all_jobs ()
+{
+ register int i;
+
+ /* XXX could use js.j_firstj here */
+ for (i = 0; i < js.j_jobslots; i++)
+ {
+ if (jobs[i])
+ {
+ if (jobs[i]->flags & J_NOHUP)
+ continue;
+ killpg (jobs[i]->pgrp, SIGHUP);
+ if (STOPPED (i))
+ killpg (jobs[i]->pgrp, SIGCONT);
+ }
+ }
+}
+
+void
+kill_current_pipeline ()
+{
+ stop_making_children ();
+ start_pipeline ();
+}
+
+/* Return the pipeline that PID belongs to. Note that the pipeline
+ doesn't have to belong to a job. Must be called with SIGCHLD blocked.
+ If JOBP is non-null, return the index of the job containing PID. */
+static PROCESS *
+find_pipeline (pid, alive_only, jobp)
+ pid_t pid;
+ int alive_only;
+ int *jobp; /* index into jobs list or NO_JOB */
+{
+ int job;
+ PROCESS *p;
+
+ /* See if this process is in the pipeline that we are building. */
+ if (jobp)
+ *jobp = NO_JOB;
+ if (the_pipeline)
+ {
+ p = the_pipeline;
+ do
+ {
+ /* Return it if we found it. Don't ever return a recycled pid. */
+ if (p->pid == pid && ((alive_only == 0 && PRECYCLED(p) == 0) || PALIVE(p)))
+ return (p);
+
+ p = p->next;
+ }
+ while (p != the_pipeline);
+ }
+
+ job = find_job (pid, alive_only, &p);
+ if (jobp)
+ *jobp = job;
+ return (job == NO_JOB) ? (PROCESS *)NULL : jobs[job]->pipe;
+}
+
+/* Return the PROCESS * describing PID. If JOBP is non-null return the index
+ into the jobs array of the job containing PID. Must be called with
+ SIGCHLD blocked. */
+static PROCESS *
+find_process (pid, alive_only, jobp)
+ pid_t pid;
+ int alive_only;
+ int *jobp; /* index into jobs list or NO_JOB */
+{
+ PROCESS *p;
+
+ p = find_pipeline (pid, alive_only, jobp);
+ while (p && p->pid != pid)
+ p = p->next;
+ return p;
+}
+
+/* Return the job index that PID belongs to, or NO_JOB if it doesn't
+ belong to any job. Must be called with SIGCHLD blocked. */
+static int
+find_job (pid, alive_only, procp)
+ pid_t pid;
+ int alive_only;
+ PROCESS **procp;
+{
+ register int i;
+ PROCESS *p;
+
+ /* XXX could use js.j_firstj here, and should check js.j_lastj */
+ for (i = 0; i < js.j_jobslots; i++)
+ {
+#if defined (DEBUG)
+ if (i < js.j_firstj && jobs[i])
+ itrace("find_job: job %d non-null before js.j_firstj (%d)", i, js.j_firstj);
+ if (i > js.j_lastj && jobs[i])
+ itrace("find_job: job %d non-null after js.j_lastj (%d)", i, js.j_lastj);
+#endif
+ if (jobs[i])
+ {
+ p = jobs[i]->pipe;
+
+ do
+ {
+ if (p->pid == pid && ((alive_only == 0 && PRECYCLED(p) == 0) || PALIVE(p)))
+ {
+ if (procp)
+ *procp = p;
+ return (i);
+ }
+
+ p = p->next;
+ }
+ while (p != jobs[i]->pipe);
+ }
+ }
+
+ return (NO_JOB);
+}
+
+/* Find a job given a PID. If BLOCK is non-zero, block SIGCHLD as
+ required by find_job. */
+int
+get_job_by_pid (pid, block)
+ pid_t pid;
+ int block;
+{
+ int job;
+ sigset_t set, oset;
+
+ if (block)
+ BLOCK_CHILD (set, oset);
+
+ job = find_job (pid, 0, NULL);
+
+ if (block)
+ UNBLOCK_CHILD (oset);
+
+ return job;
+}
+
+/* Print descriptive information about the job with leader pid PID. */
+void
+describe_pid (pid)
+ pid_t pid;
+{
+ int job;
+ sigset_t set, oset;
+
+ BLOCK_CHILD (set, oset);
+
+ job = find_job (pid, 0, NULL);
+
+ if (job != NO_JOB)
+ fprintf (stderr, "[%d] %ld\n", job + 1, (long)pid);
+ else
+ programming_error (_("describe_pid: %ld: no such pid"), (long)pid);
+
+ UNBLOCK_CHILD (oset);
+}
+
+static char *
+j_strsignal (s)
+ int s;
+{
+ char *x;
+
+ x = strsignal (s);
+ if (x == 0)
+ {
+ x = retcode_name_buffer;
+ sprintf (x, _("Signal %d"), s);
+ }
+ return x;
+}
+
+static char *
+printable_job_status (j, p, format)
+ int j;
+ PROCESS *p;
+ int format;
+{
+ static char *temp;
+ int es;
+
+ temp = _("Done");
+
+ if (STOPPED (j) && format == 0)
+ {
+ if (posixly_correct == 0 || p == 0 || (WIFSTOPPED (p->status) == 0))
+ temp = _("Stopped");
+ else
+ {
+ temp = retcode_name_buffer;
+ sprintf (temp, _("Stopped(%s)"), signal_name (WSTOPSIG (p->status)));
+ }
+ }
+ else if (RUNNING (j))
+ temp = _("Running");
+ else
+ {
+ if (WIFSTOPPED (p->status))
+ temp = j_strsignal (WSTOPSIG (p->status));
+ else if (WIFSIGNALED (p->status))
+ temp = j_strsignal (WTERMSIG (p->status));
+ else if (WIFEXITED (p->status))
+ {
+ temp = retcode_name_buffer;
+ es = WEXITSTATUS (p->status);
+ if (es == 0)
+ strcpy (temp, _("Done"));
+ else if (posixly_correct)
+ sprintf (temp, _("Done(%d)"), es);
+ else
+ sprintf (temp, _("Exit %d"), es);
+ }
+ else
+ temp = _("Unknown status");
+ }
+
+ return temp;
+}
+
+/* This is the way to print out information on a job if you
+ know the index. FORMAT is:
+
+ JLIST_NORMAL) [1]+ Running emacs
+ JLIST_LONG ) [1]+ 2378 Running emacs
+ -1 ) [1]+ 2378 emacs
+
+ JLIST_NORMAL) [1]+ Stopped ls | more
+ JLIST_LONG ) [1]+ 2369 Stopped ls
+ 2367 | more
+ JLIST_PID_ONLY)
+ Just list the pid of the process group leader (really
+ the process group).
+ JLIST_CHANGED_ONLY)
+ Use format JLIST_NORMAL, but list only jobs about which
+ the user has not been notified. */
+
+/* Print status for pipeline P. If JOB_INDEX is >= 0, it is the index into
+ the JOBS array corresponding to this pipeline. FORMAT is as described
+ above. Must be called with SIGCHLD blocked.
+
+ If you're printing a pipeline that's not in the jobs array, like the
+ current pipeline as it's being created, pass -1 for JOB_INDEX */
+static void
+print_pipeline (p, job_index, format, stream)
+ PROCESS *p;
+ int job_index, format;
+ FILE *stream;
+{
+ PROCESS *first, *last, *show;
+ int es, name_padding;
+ char *temp;
+
+ if (p == 0)
+ return;
+
+ first = last = p;
+ while (last->next != first)
+ last = last->next;
+
+ for (;;)
+ {
+ if (p != first)
+ fprintf (stream, format ? " " : " |");
+
+ if (format != JLIST_STANDARD)
+ fprintf (stream, "%5ld", (long)p->pid);
+
+ fprintf (stream, " ");
+
+ if (format > -1 && job_index >= 0)
+ {
+ show = format ? p : last;
+ temp = printable_job_status (job_index, show, format);
+
+ if (p != first)
+ {
+ if (format)
+ {
+ if (show->running == first->running &&
+ WSTATUS (show->status) == WSTATUS (first->status))
+ temp = "";
+ }
+ else
+ temp = (char *)NULL;
+ }
+
+ if (temp)
+ {
+ fprintf (stream, "%s", temp);
+
+ es = STRLEN (temp);
+ if (es == 0)
+ es = 2; /* strlen ("| ") */
+ name_padding = LONGEST_SIGNAL_DESC - es;
+
+ fprintf (stream, "%*s", name_padding, "");
+
+ if ((WIFSTOPPED (show->status) == 0) &&
+ (WIFCONTINUED (show->status) == 0) &&
+ WIFCORED (show->status))
+ fprintf (stream, _("(core dumped) "));
+ }
+ }
+
+ if (p != first && format)
+ fprintf (stream, "| ");
+
+ if (p->command)
+ fprintf (stream, "%s", p->command);
+
+ if (p == last && job_index >= 0)
+ {
+ temp = current_working_directory ();
+
+ if (RUNNING (job_index) && (IS_FOREGROUND (job_index) == 0))
+ fprintf (stream, " &");
+
+ if (strcmp (temp, jobs[job_index]->wd) != 0)
+ fprintf (stream,
+ _(" (wd: %s)"), polite_directory_format (jobs[job_index]->wd));
+ }
+
+ if (format || (p == last))
+ {
+ /* We need to add a CR only if this is an interactive shell, and
+ we're reporting the status of a completed job asynchronously.
+ We can't really check whether this particular job is being
+ reported asynchronously, so just add the CR if the shell is
+ currently interactive and asynchronous notification is enabled. */
+ if (asynchronous_notification && interactive)
+ fprintf (stream, "\r\n");
+ else
+ fprintf (stream, "\n");
+ }
+
+ if (p == last)
+ break;
+ p = p->next;
+ }
+ fflush (stream);
+}
+
+/* Print information to STREAM about jobs[JOB_INDEX] according to FORMAT.
+ Must be called with SIGCHLD blocked or queued with queue_sigchld */
+static void
+pretty_print_job (job_index, format, stream)
+ int job_index, format;
+ FILE *stream;
+{
+ register PROCESS *p;
+
+ /* Format only pid information about the process group leader? */
+ if (format == JLIST_PID_ONLY)
+ {
+ fprintf (stream, "%ld\n", (long)jobs[job_index]->pipe->pid);
+ return;
+ }
+
+ if (format == JLIST_CHANGED_ONLY)
+ {
+ if (IS_NOTIFIED (job_index))
+ return;
+ format = JLIST_STANDARD;
+ }
+
+ if (format != JLIST_NONINTERACTIVE)
+ fprintf (stream, "[%d]%c ", job_index + 1,
+ (job_index == js.j_current) ? '+':
+ (job_index == js.j_previous) ? '-' : ' ');
+
+ if (format == JLIST_NONINTERACTIVE)
+ format = JLIST_LONG;
+
+ p = jobs[job_index]->pipe;
+
+ print_pipeline (p, job_index, format, stream);
+
+ /* We have printed information about this job. When the job's
+ status changes, waitchld () sets the notification flag to 0. */
+ jobs[job_index]->flags |= J_NOTIFIED;
+}
+
+static int
+print_job (job, format, state, job_index)
+ JOB *job;
+ int format, state, job_index;
+{
+ if (state == -1 || (JOB_STATE)state == job->state)
+ pretty_print_job (job_index, format, stdout);
+ return (0);
+}
+
+void
+list_one_job (job, format, ignore, job_index)
+ JOB *job;
+ int format, ignore, job_index;
+{
+ pretty_print_job (job_index, format, stdout);
+}
+
+void
+list_stopped_jobs (format)
+ int format;
+{
+ cleanup_dead_jobs ();
+ map_over_jobs (print_job, format, (int)JSTOPPED);
+}
+
+void
+list_running_jobs (format)
+ int format;
+{
+ cleanup_dead_jobs ();
+ map_over_jobs (print_job, format, (int)JRUNNING);
+}
+
+/* List jobs. If FORMAT is non-zero, then the long form of the information
+ is printed, else just a short version. */
+void
+list_all_jobs (format)
+ int format;
+{
+ cleanup_dead_jobs ();
+ map_over_jobs (print_job, format, -1);
+}
+
+/* Fork, handling errors. Returns the pid of the newly made child, or 0.
+ COMMAND is just for remembering the name of the command; we don't do
+ anything else with it. ASYNC_P says what to do with the tty. If
+ non-zero, then don't give it away. */
+pid_t
+make_child (command, async_p)
+ char *command;
+ int async_p;
+{
+ int forksleep;
+ sigset_t set, oset;
+ pid_t pid;
+
+ sigemptyset (&set);
+ sigaddset (&set, SIGCHLD);
+ sigaddset (&set, SIGINT);
+ sigemptyset (&oset);
+ sigprocmask (SIG_BLOCK, &set, &oset);
+
+ making_children ();
+
+ forksleep = 1;
+
+#if defined (BUFFERED_INPUT)
+ /* If default_buffered_input is active, we are reading a script. If
+ the command is asynchronous, we have already duplicated /dev/null
+ as fd 0, but have not changed the buffered stream corresponding to
+ the old fd 0. We don't want to sync the stream in this case. */
+ if (default_buffered_input != -1 &&
+ (!async_p || default_buffered_input > 0))
+ sync_buffered_stream (default_buffered_input);
+#endif /* BUFFERED_INPUT */
+
+ /* Create the child, handle severe errors. Retry on EAGAIN. */
+ while ((pid = fork ()) < 0 && errno == EAGAIN && forksleep < FORKSLEEP_MAX)
+ {
+#if 0 /* for bash-4.2 */
+ /* If we can't create any children, try to reap some dead ones. */
+ waitchld (-1, 0);
+#endif
+ sys_error ("fork: retry");
+ if (sleep (forksleep) != 0)
+ break;
+ forksleep <<= 1;
+ }
+
+ if (pid < 0)
+ {
+ sys_error ("fork");
+
+ /* Kill all of the processes in the current pipeline. */
+ terminate_current_pipeline ();
+
+ /* Discard the current pipeline, if any. */
+ if (the_pipeline)
+ kill_current_pipeline ();
+
+ last_command_exit_value = EX_NOEXEC;
+ throw_to_top_level (); /* Reset signals, etc. */
+ }
+
+ if (pid == 0)
+ {
+ /* In the child. Give this child the right process group, set the
+ signals to the default state for a new process. */
+ pid_t mypid;
+
+ mypid = getpid ();
+#if defined (BUFFERED_INPUT)
+ /* Close default_buffered_input if it's > 0. We don't close it if it's
+ 0 because that's the file descriptor used when redirecting input,
+ and it's wrong to close the file in that case. */
+ unset_bash_input (0);
+#endif /* BUFFERED_INPUT */
+
+ /* Restore top-level signal mask. */
+ sigprocmask (SIG_SETMASK, &top_level_mask, (sigset_t *)NULL);
+
+ if (job_control)
+ {
+ /* All processes in this pipeline belong in the same
+ process group. */
+
+ if (pipeline_pgrp == 0) /* This is the first child. */
+ pipeline_pgrp = mypid;
+
+ /* Check for running command in backquotes. */
+ if (pipeline_pgrp == shell_pgrp)
+ ignore_tty_job_signals ();
+ else
+ default_tty_job_signals ();
+
+ /* Set the process group before trying to mess with the terminal's
+ process group. This is mandated by POSIX. */
+ /* This is in accordance with the Posix 1003.1 standard,
+ section B.7.2.4, which says that trying to set the terminal
+ process group with tcsetpgrp() to an unused pgrp value (like
+ this would have for the first child) is an error. Section
+ B.4.3.3, p. 237 also covers this, in the context of job control
+ shells. */
+ if (setpgid (mypid, pipeline_pgrp) < 0)
+ sys_error (_("child setpgid (%ld to %ld)"), (long)mypid, (long)pipeline_pgrp);
+
+ /* By convention (and assumption above), if
+ pipeline_pgrp == shell_pgrp, we are making a child for
+ command substitution.
+ In this case, we don't want to give the terminal to the
+ shell's process group (we could be in the middle of a
+ pipeline, for example). */
+ if (async_p == 0 && pipeline_pgrp != shell_pgrp && ((subshell_environment&SUBSHELL_ASYNC) == 0))
+ give_terminal_to (pipeline_pgrp, 0);
+
+#if defined (PGRP_PIPE)
+ if (pipeline_pgrp == mypid)
+ pipe_read (pgrp_pipe);
+#endif
+ }
+ else /* Without job control... */
+ {
+ if (pipeline_pgrp == 0)
+ pipeline_pgrp = shell_pgrp;
+
+ /* If these signals are set to SIG_DFL, we encounter the curious
+ situation of an interactive ^Z to a running process *working*
+ and stopping the process, but being unable to do anything with
+ that process to change its state. On the other hand, if they
+ are set to SIG_IGN, jobs started from scripts do not stop when
+ the shell running the script gets a SIGTSTP and stops. */
+
+ default_tty_job_signals ();
+ }
+
+#if defined (PGRP_PIPE)
+ /* Release the process group pipe, since our call to setpgid ()
+ is done. The last call to sh_closepipe is done in stop_pipeline. */
+ sh_closepipe (pgrp_pipe);
+#endif /* PGRP_PIPE */
+
+#if 0
+ /* Don't set last_asynchronous_pid in the child */
+ if (async_p)
+ last_asynchronous_pid = mypid; /* XXX */
+ else
+#endif
+#if defined (RECYCLES_PIDS)
+ if (last_asynchronous_pid == mypid)
+ /* Avoid pid aliasing. 1 seems like a safe, unusual pid value. */
+ last_asynchronous_pid = 1;
+#endif
+ }
+ else
+ {
+ /* In the parent. Remember the pid of the child just created
+ as the proper pgrp if this is the first child. */
+
+ if (first_pid == NO_PID)
+ first_pid = pid;
+ else if (pid_wrap == -1 && pid < first_pid)
+ pid_wrap = 0;
+ else if (pid_wrap == 0 && pid >= first_pid)
+ pid_wrap = 1;
+
+ if (job_control)
+ {
+ if (pipeline_pgrp == 0)
+ {
+ pipeline_pgrp = pid;
+ /* Don't twiddle terminal pgrps in the parent! This is the bug,
+ not the good thing of twiddling them in the child! */
+ /* give_terminal_to (pipeline_pgrp, 0); */
+ }
+ /* This is done on the recommendation of the Rationale section of
+ the POSIX 1003.1 standard, where it discusses job control and
+ shells. It is done to avoid possible race conditions. (Ref.
+ 1003.1 Rationale, section B.4.3.3, page 236). */
+ setpgid (pid, pipeline_pgrp);
+ }
+ else
+ {
+ if (pipeline_pgrp == 0)
+ pipeline_pgrp = shell_pgrp;
+ }
+
+ /* Place all processes into the jobs array regardless of the
+ state of job_control. */
+ add_process (command, pid);
+
+ if (async_p)
+ last_asynchronous_pid = pid;
+#if defined (RECYCLES_PIDS)
+ else if (last_asynchronous_pid == pid)
+ /* Avoid pid aliasing. 1 seems like a safe, unusual pid value. */
+ last_asynchronous_pid = 1;
+#endif
+
+ if (pid_wrap > 0)
+ delete_old_job (pid);
+
+#if !defined (RECYCLES_PIDS)
+ /* Only check for saved status if we've saved more than CHILD_MAX
+ statuses, unless the system recycles pids. */
+ if ((js.c_reaped + bgpids.npid) >= js.c_childmax)
+#endif
+ bgp_delete (pid); /* new process, discard any saved status */
+
+ last_made_pid = pid;
+
+ /* keep stats */
+ js.c_totforked++;
+ js.c_living++;
+
+ /* Unblock SIGINT and SIGCHLD unless creating a pipeline, in which case
+ SIGCHLD remains blocked until all commands in the pipeline have been
+ created. */
+ sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL);
+ }
+
+ return (pid);
+}
+
+/* These two functions are called only in child processes. */
+void
+ignore_tty_job_signals ()
+{
+ set_signal_handler (SIGTSTP, SIG_IGN);
+ set_signal_handler (SIGTTIN, SIG_IGN);
+ set_signal_handler (SIGTTOU, SIG_IGN);
+}
+
+void
+default_tty_job_signals ()
+{
+ set_signal_handler (SIGTSTP, SIG_DFL);
+ set_signal_handler (SIGTTIN, SIG_DFL);
+ set_signal_handler (SIGTTOU, SIG_DFL);
+}
+
+/* When we end a job abnormally, or if we stop a job, we set the tty to the
+ state kept in here. When a job ends normally, we set the state in here
+ to the state of the tty. */
+
+static TTYSTRUCT shell_tty_info;
+
+#if defined (NEW_TTY_DRIVER)
+static struct tchars shell_tchars;
+static struct ltchars shell_ltchars;
+#endif /* NEW_TTY_DRIVER */
+
+#if defined (NEW_TTY_DRIVER) && defined (DRAIN_OUTPUT)
+/* Since the BSD tty driver does not allow us to change the tty modes
+ while simultaneously waiting for output to drain and preserving
+ typeahead, we have to drain the output ourselves before calling
+ ioctl. We cheat by finding the length of the output queue, and
+ using select to wait for an appropriate length of time. This is
+ a hack, and should be labeled as such (it's a hastily-adapted
+ mutation of a `usleep' implementation). It's only reason for
+ existing is the flaw in the BSD tty driver. */
+
+static int ttspeeds[] =
+{
+ 0, 50, 75, 110, 134, 150, 200, 300, 600, 1200,
+ 1800, 2400, 4800, 9600, 19200, 38400
+};
+
+static void
+draino (fd, ospeed)
+ int fd, ospeed;
+{
+ register int delay = ttspeeds[ospeed];
+ int n;
+
+ if (!delay)
+ return;
+
+ while ((ioctl (fd, TIOCOUTQ, &n) == 0) && n)
+ {
+ if (n > (delay / 100))
+ {
+ struct timeval tv;
+
+ n *= 10; /* 2 bits more for conservativeness. */
+ tv.tv_sec = n / delay;
+ tv.tv_usec = ((n % delay) * 1000000) / delay;
+ select (fd, (fd_set *)0, (fd_set *)0, (fd_set *)0, &tv);
+ }
+ else
+ break;
+ }
+}
+#endif /* NEW_TTY_DRIVER && DRAIN_OUTPUT */
+
+/* Return the fd from which we are actually getting input. */
+#define input_tty() (shell_tty != -1) ? shell_tty : fileno (stderr)
+
+/* Fill the contents of shell_tty_info with the current tty info. */
+int
+get_tty_state ()
+{
+ int tty;
+
+ tty = input_tty ();
+ if (tty != -1)
+ {
+#if defined (NEW_TTY_DRIVER)
+ ioctl (tty, TIOCGETP, &shell_tty_info);
+ ioctl (tty, TIOCGETC, &shell_tchars);
+ ioctl (tty, TIOCGLTC, &shell_ltchars);
+#endif /* NEW_TTY_DRIVER */
+
+#if defined (TERMIO_TTY_DRIVER)
+ ioctl (tty, TCGETA, &shell_tty_info);
+#endif /* TERMIO_TTY_DRIVER */
+
+#if defined (TERMIOS_TTY_DRIVER)
+ if (tcgetattr (tty, &shell_tty_info) < 0)
+ {
+#if 0
+ /* Only print an error message if we're really interactive at
+ this time. */
+ if (interactive)
+ sys_error ("[%ld: %d (%d)] tcgetattr", (long)getpid (), shell_level, tty);
+#endif
+ return -1;
+ }
+#endif /* TERMIOS_TTY_DRIVER */
+ if (check_window_size)
+ get_new_window_size (0, (int *)0, (int *)0);
+ }
+ return 0;
+}
+
+/* Make the current tty use the state in shell_tty_info. */
+int
+set_tty_state ()
+{
+ int tty;
+
+ tty = input_tty ();
+ if (tty != -1)
+ {
+#if defined (NEW_TTY_DRIVER)
+# if defined (DRAIN_OUTPUT)
+ draino (tty, shell_tty_info.sg_ospeed);
+# endif /* DRAIN_OUTPUT */
+ ioctl (tty, TIOCSETN, &shell_tty_info);
+ ioctl (tty, TIOCSETC, &shell_tchars);
+ ioctl (tty, TIOCSLTC, &shell_ltchars);
+#endif /* NEW_TTY_DRIVER */
+
+#if defined (TERMIO_TTY_DRIVER)
+ ioctl (tty, TCSETAW, &shell_tty_info);
+#endif /* TERMIO_TTY_DRIVER */
+
+#if defined (TERMIOS_TTY_DRIVER)
+ if (tcsetattr (tty, TCSADRAIN, &shell_tty_info) < 0)
+ {
+ /* Only print an error message if we're really interactive at
+ this time. */
+ if (interactive)
+ sys_error ("[%ld: %d (%d)] tcsetattr", (long)getpid (), shell_level, tty);
+ return -1;
+ }
+#endif /* TERMIOS_TTY_DRIVER */
+ }
+ return 0;
+}
+
+/* Given an index into the jobs array JOB, return the PROCESS struct of the last
+ process in that job's pipeline. This is the one whose exit status
+ counts. Must be called with SIGCHLD blocked or queued. */
+static PROCESS *
+find_last_proc (job, block)
+ int job;
+ int block;
+{
+ register PROCESS *p;
+ sigset_t set, oset;
+
+ if (block)
+ BLOCK_CHILD (set, oset);
+
+ p = jobs[job]->pipe;
+ while (p && p->next != jobs[job]->pipe)
+ p = p->next;
+
+ if (block)
+ UNBLOCK_CHILD (oset);
+
+ return (p);
+}
+
+static pid_t
+find_last_pid (job, block)
+ int job;
+ int block;
+{
+ PROCESS *p;
+
+ p = find_last_proc (job, block);
+ /* Possible race condition here. */
+ return p->pid;
+}
+
+/* Wait for a particular child of the shell to finish executing.
+ This low-level function prints an error message if PID is not
+ a child of this shell. It returns -1 if it fails, or whatever
+ wait_for returns otherwise. If the child is not found in the
+ jobs table, it returns 127. */
+int
+wait_for_single_pid (pid)
+ pid_t pid;
+{
+ register PROCESS *child;
+ sigset_t set, oset;
+ int r, job;
+
+ BLOCK_CHILD (set, oset);
+ child = find_pipeline (pid, 0, (int *)NULL);
+ UNBLOCK_CHILD (oset);
+
+ if (child == 0)
+ {
+ r = bgp_search (pid);
+ if (r >= 0)
+ return r;
+ }
+
+ if (child == 0)
+ {
+ internal_error (_("wait: pid %ld is not a child of this shell"), (long)pid);
+ return (127);
+ }
+
+ r = wait_for (pid);
+
+ /* POSIX.2: if we just waited for a job, we can remove it from the jobs
+ table. */
+ BLOCK_CHILD (set, oset);
+ job = find_job (pid, 0, NULL);
+ if (job != NO_JOB && jobs[job] && DEADJOB (job))
+ jobs[job]->flags |= J_NOTIFIED;
+ UNBLOCK_CHILD (oset);
+
+ /* If running in posix mode, remove the job from the jobs table immediately */
+ if (posixly_correct)
+ {
+ cleanup_dead_jobs ();
+ bgp_delete (pid);
+ }
+
+ return r;
+}
+
+/* Wait for all of the backgrounds of this shell to finish. */
+void
+wait_for_background_pids ()
+{
+ register int i, r, waited_for;
+ sigset_t set, oset;
+ pid_t pid;
+
+ for (waited_for = 0;;)
+ {
+ BLOCK_CHILD (set, oset);
+
+ /* find first running job; if none running in foreground, break */
+ /* XXX could use js.j_firstj and js.j_lastj here */
+ for (i = 0; i < js.j_jobslots; i++)
+ {
+#if defined (DEBUG)
+ if (i < js.j_firstj && jobs[i])
+ itrace("wait_for_background_pids: job %d non-null before js.j_firstj (%d)", i, js.j_firstj);
+ if (i > js.j_lastj && jobs[i])
+ itrace("wait_for_background_pids: job %d non-null after js.j_lastj (%d)", i, js.j_lastj);
+#endif
+ if (jobs[i] && RUNNING (i) && IS_FOREGROUND (i) == 0)
+ break;
+ }
+ if (i == js.j_jobslots)
+ {
+ UNBLOCK_CHILD (oset);
+ break;
+ }
+
+ /* now wait for the last pid in that job. */
+ pid = find_last_pid (i, 0);
+ UNBLOCK_CHILD (oset);
+ QUIT;
+ errno = 0; /* XXX */
+ r = wait_for_single_pid (pid);
+ if (r == -1)
+ {
+ /* If we're mistaken about job state, compensate. */
+ if (errno == ECHILD)
+ mark_all_jobs_as_dead ();
+ }
+ else
+ waited_for++;
+ }
+
+ /* POSIX.2 says the shell can discard the statuses of all completed jobs if
+ `wait' is called with no arguments. */
+ mark_dead_jobs_as_notified (1);
+ cleanup_dead_jobs ();
+ bgp_clear ();
+}
+
+/* Make OLD_SIGINT_HANDLER the SIGINT signal handler. */
+#define INVALID_SIGNAL_HANDLER (SigHandler *)wait_for_background_pids
+static SigHandler *old_sigint_handler = INVALID_SIGNAL_HANDLER;
+
+static void
+restore_sigint_handler ()
+{
+ if (old_sigint_handler != INVALID_SIGNAL_HANDLER)
+ {
+ set_signal_handler (SIGINT, old_sigint_handler);
+ old_sigint_handler = INVALID_SIGNAL_HANDLER;
+ }
+}
+
+static int wait_sigint_received;
+
+/* Handle SIGINT while we are waiting for children in a script to exit.
+ The `wait' builtin should be interruptible, but all others should be
+ effectively ignored (i.e. not cause the shell to exit). */
+static sighandler
+wait_sigint_handler (sig)
+ int sig;
+{
+ SigHandler *sigint_handler;
+
+ if (interrupt_immediately ||
+ (this_shell_builtin && this_shell_builtin == wait_builtin))
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ restore_sigint_handler ();
+ /* If we got a SIGINT while in `wait', and SIGINT is trapped, do
+ what POSIX.2 says (see builtins/wait.def for more info). */
+ if (this_shell_builtin && this_shell_builtin == wait_builtin &&
+ signal_is_trapped (SIGINT) &&
+ ((sigint_handler = trap_to_sighandler (SIGINT)) == trap_handler))
+ {
+ interrupt_immediately = 0;
+ trap_handler (SIGINT); /* set pending_traps[SIGINT] */
+ wait_signal_received = SIGINT;
+ longjmp (wait_intr_buf, 1);
+ }
+
+ ADDINTERRUPT;
+ QUIT;
+ }
+
+ /* XXX - should this be interrupt_state? If it is, the shell will act
+ as if it got the SIGINT interrupt. */
+ wait_sigint_received = 1;
+
+ /* Otherwise effectively ignore the SIGINT and allow the running job to
+ be killed. */
+ SIGRETURN (0);
+}
+
+static int
+process_exit_signal (status)
+ WAIT status;
+{
+ return (WIFSIGNALED (status) ? WTERMSIG (status) : 0);
+}
+
+static int
+process_exit_status (status)
+ WAIT status;
+{
+ if (WIFSIGNALED (status))
+ return (128 + WTERMSIG (status));
+ else if (WIFSTOPPED (status) == 0)
+ return (WEXITSTATUS (status));
+ else
+ return (EXECUTION_SUCCESS);
+}
+
+static WAIT
+job_signal_status (job)
+ int job;
+{
+ register PROCESS *p;
+ WAIT s;
+
+ p = jobs[job]->pipe;
+ do
+ {
+ s = p->status;
+ if (WIFSIGNALED(s) || WIFSTOPPED(s))
+ break;
+ p = p->next;
+ }
+ while (p != jobs[job]->pipe);
+
+ return s;
+}
+
+/* Return the exit status of the last process in the pipeline for job JOB.
+ This is the exit status of the entire job. */
+static WAIT
+raw_job_exit_status (job)
+ int job;
+{
+ register PROCESS *p;
+ int fail;
+ WAIT ret;
+
+ if (pipefail_opt)
+ {
+ fail = 0;
+ p = jobs[job]->pipe;
+ do
+ {
+ if (WSTATUS (p->status) != EXECUTION_SUCCESS)
+ fail = WSTATUS(p->status);
+ p = p->next;
+ }
+ while (p != jobs[job]->pipe);
+ WSTATUS (ret) = fail;
+ return ret;
+ }
+
+ for (p = jobs[job]->pipe; p->next != jobs[job]->pipe; p = p->next)
+ ;
+ return (p->status);
+}
+
+/* Return the exit status of job JOB. This is the exit status of the last
+ (rightmost) process in the job's pipeline, modified if the job was killed
+ by a signal or stopped. */
+static int
+job_exit_status (job)
+ int job;
+{
+ return (process_exit_status (raw_job_exit_status (job)));
+}
+
+static int
+job_exit_signal (job)
+ int job;
+{
+ return (process_exit_signal (raw_job_exit_status (job)));
+}
+
+#define FIND_CHILD(pid, child) \
+ do \
+ { \
+ child = find_pipeline (pid, 0, (int *)NULL); \
+ if (child == 0) \
+ { \
+ give_terminal_to (shell_pgrp, 0); \
+ UNBLOCK_CHILD (oset); \
+ internal_error (_("wait_for: No record of process %ld"), (long)pid); \
+ restore_sigint_handler (); \
+ return (termination_state = 127); \
+ } \
+ } \
+ while (0)
+
+/* Wait for pid (one of our children) to terminate, then
+ return the termination state. Returns 127 if PID is not found in
+ the jobs table. Returns -1 if waitchld() returns -1, indicating
+ that there are no unwaited-for child processes. */
+int
+wait_for (pid)
+ pid_t pid;
+{
+ int job, termination_state, r;
+ WAIT s;
+ register PROCESS *child;
+ sigset_t set, oset;
+ register PROCESS *p;
+
+ /* In the case that this code is interrupted, and we longjmp () out of it,
+ we are relying on the code in throw_to_top_level () to restore the
+ top-level signal mask. */
+ BLOCK_CHILD (set, oset);
+
+ /* Ignore interrupts while waiting for a job run without job control
+ to finish. We don't want the shell to exit if an interrupt is
+ received, only if one of the jobs run is killed via SIGINT. If
+ job control is not set, the job will be run in the same pgrp as
+ the shell, and the shell will see any signals the job gets. In
+ fact, we want this set every time the waiting shell and the waited-
+ for process are in the same process group, including command
+ substitution. */
+
+ /* This is possibly a race condition -- should it go in stop_pipeline? */
+ wait_sigint_received = 0;
+ if (job_control == 0 || (subshell_environment&SUBSHELL_COMSUB))
+ {
+ old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler);
+ if (old_sigint_handler == SIG_IGN)
+ set_signal_handler (SIGINT, old_sigint_handler);
+ }
+
+ termination_state = last_command_exit_value;
+
+ if (interactive && job_control == 0)
+ QUIT;
+ /* Check for terminating signals and exit the shell if we receive one */
+ CHECK_TERMSIG;
+
+ /* If we say wait_for (), then we have a record of this child somewhere.
+ If it and none of its peers are running, don't call waitchld(). */
+
+ job = NO_JOB;
+ do
+ {
+ FIND_CHILD (pid, child);
+
+ /* If this child is part of a job, then we are really waiting for the
+ job to finish. Otherwise, we are waiting for the child to finish.
+ We check for JDEAD in case the job state has been set by waitchld
+ after receipt of a SIGCHLD. */
+ if (job == NO_JOB)
+ job = find_job (pid, 0, NULL);
+
+ /* waitchld() takes care of setting the state of the job. If the job
+ has already exited before this is called, sigchld_handler will have
+ called waitchld and the state will be set to JDEAD. */
+
+ if (PRUNNING(child) || (job != NO_JOB && RUNNING (job)))
+ {
+#if defined (WAITPID_BROKEN) /* SCOv4 */
+ sigset_t suspend_set;
+ sigemptyset (&suspend_set);
+ sigsuspend (&suspend_set);
+#else /* !WAITPID_BROKEN */
+# if defined (MUST_UNBLOCK_CHLD)
+ struct sigaction act, oact;
+ sigset_t nullset, chldset;
+
+ sigemptyset (&nullset);
+ sigemptyset (&chldset);
+ sigprocmask (SIG_SETMASK, &nullset, &chldset);
+ act.sa_handler = SIG_DFL;
+ sigemptyset (&act.sa_mask);
+ sigemptyset (&oact.sa_mask);
+ act.sa_flags = 0;
+ sigaction (SIGCHLD, &act, &oact);
+# endif
+ queue_sigchld = 1;
+ r = waitchld (pid, 1);
+# if defined (MUST_UNBLOCK_CHLD)
+ sigaction (SIGCHLD, &oact, (struct sigaction *)NULL);
+ sigprocmask (SIG_SETMASK, &chldset, (sigset_t *)NULL);
+# endif
+ queue_sigchld = 0;
+ if (r == -1 && errno == ECHILD && this_shell_builtin == wait_builtin)
+ {
+ termination_state = -1;
+ goto wait_for_return;
+ }
+
+ /* If child is marked as running, but waitpid() returns -1/ECHILD,
+ there is something wrong. Somewhere, wait should have returned
+ that child's pid. Mark the child as not running and the job,
+ if it exists, as JDEAD. */
+ if (r == -1 && errno == ECHILD)
+ {
+ child->running = PS_DONE;
+ WSTATUS (child->status) = 0; /* XXX -- can't find true status */
+ js.c_living = 0; /* no living child processes */
+ if (job != NO_JOB)
+ {
+ jobs[job]->state = JDEAD;
+ js.c_reaped++;
+ js.j_ndead++;
+ }
+ }
+#endif /* WAITPID_BROKEN */
+ }
+
+ /* If the shell is interactive, and job control is disabled, see
+ if the foreground process has died due to SIGINT and jump out
+ of the wait loop if it has. waitchld has already restored the
+ old SIGINT signal handler. */
+ if (interactive && job_control == 0)
+ QUIT;
+ /* Check for terminating signals and exit the shell if we receive one */
+ CHECK_TERMSIG;
+ }
+ while (PRUNNING (child) || (job != NO_JOB && RUNNING (job)));
+
+ /* The exit state of the command is either the termination state of the
+ child, or the termination state of the job. If a job, the status
+ of the last child in the pipeline is the significant one. If the command
+ or job was terminated by a signal, note that value also. */
+ termination_state = (job != NO_JOB) ? job_exit_status (job)
+ : process_exit_status (child->status);
+ last_command_exit_signal = (job != NO_JOB) ? job_exit_signal (job)
+ : process_exit_signal (child->status);
+
+ /* XXX */
+ if ((job != NO_JOB && JOBSTATE (job) == JSTOPPED) || WIFSTOPPED (child->status))
+ termination_state = 128 + WSTOPSIG (child->status);
+
+ if (job == NO_JOB || IS_JOBCONTROL (job))
+ {
+ /* XXX - under what circumstances is a job not present in the jobs
+ table (job == NO_JOB)?
+ 1. command substitution
+
+ In the case of command substitution, at least, it's probably not
+ the right thing to give the terminal to the shell's process group,
+ even though there is code in subst.c:command_substitute to work
+ around it.
+
+ Things that don't:
+ $PROMPT_COMMAND execution
+ process substitution
+ */
+#if 0
+if (job == NO_JOB)
+ itrace("wait_for: job == NO_JOB, giving the terminal to shell_pgrp (%ld)", (long)shell_pgrp);
+#endif
+ give_terminal_to (shell_pgrp, 0);
+ }
+
+ /* If the command did not exit cleanly, or the job is just
+ being stopped, then reset the tty state back to what it
+ was before this command. Reset the tty state and notify
+ the user of the job termination only if the shell is
+ interactive. Clean up any dead jobs in either case. */
+ if (job != NO_JOB)
+ {
+ if (interactive_shell && subshell_environment == 0)
+ {
+ /* This used to use `child->status'. That's wrong, however, for
+ pipelines. `child' is the first process in the pipeline. It's
+ likely that the process we want to check for abnormal termination
+ or stopping is the last process in the pipeline, especially if
+ it's long-lived and the first process is short-lived. Since we
+ know we have a job here, we can check all the processes in this
+ job's pipeline and see if one of them stopped or terminated due
+ to a signal. We might want to change this later to just check
+ the last process in the pipeline. If no process exits due to a
+ signal, S is left as the status of the last job in the pipeline. */
+ s = job_signal_status (job);
+
+ if (WIFSIGNALED (s) || WIFSTOPPED (s))
+ {
+ set_tty_state ();
+
+ /* If the current job was stopped or killed by a signal, and
+ the user has requested it, get a possibly new window size */
+ if (check_window_size && (job == js.j_current || IS_FOREGROUND (job)))
+ get_new_window_size (0, (int *)0, (int *)0);
+ }
+ else
+ get_tty_state ();
+
+ /* If job control is enabled, the job was started with job
+ control, the job was the foreground job, and it was killed
+ by SIGINT, then print a newline to compensate for the kernel
+ printing the ^C without a trailing newline. */
+ if (job_control && IS_JOBCONTROL (job) && IS_FOREGROUND (job) &&
+ WIFSIGNALED (s) && WTERMSIG (s) == SIGINT)
+ {
+ /* If SIGINT is not trapped and the shell is in a for, while,
+ or until loop, act as if the shell received SIGINT as
+ well, so the loop can be broken. This doesn't call the
+ SIGINT signal handler; maybe it should. */
+ if (signal_is_trapped (SIGINT) == 0 && (loop_level || (shell_compatibility_level > 32 && executing_list)))
+ ADDINTERRUPT;
+ else
+ {
+ putchar ('\n');
+ fflush (stdout);
+ }
+ }
+ }
+ else if ((subshell_environment & SUBSHELL_COMSUB) && wait_sigint_received)
+ {
+ /* If waiting for a job in a subshell started to do command
+ substitution, simulate getting and being killed by the SIGINT to
+ pass the status back to our parent. */
+ s = job_signal_status (job);
+
+ if (WIFSIGNALED (s) && WTERMSIG (s) == SIGINT && signal_is_trapped (SIGINT) == 0)
+ {
+ UNBLOCK_CHILD (oset);
+ restore_sigint_handler ();
+ old_sigint_handler = set_signal_handler (SIGINT, SIG_DFL);
+ if (old_sigint_handler == SIG_IGN)
+ restore_sigint_handler ();
+ else
+ kill (getpid (), SIGINT);
+ }
+ }
+
+ /* Moved here from set_job_status_and_cleanup, which is in the SIGCHLD
+ signal handler path */
+ if (DEADJOB (job) && IS_FOREGROUND (job) /*&& subshell_environment == 0*/)
+ setjstatus (job);
+
+ /* If this job is dead, notify the user of the status. If the shell
+ is interactive, this will display a message on the terminal. If
+ the shell is not interactive, make sure we turn on the notify bit
+ so we don't get an unwanted message about the job's termination,
+ and so delete_job really clears the slot in the jobs table. */
+ notify_and_cleanup ();
+ }
+
+wait_for_return:
+
+ UNBLOCK_CHILD (oset);
+
+ /* Restore the original SIGINT signal handler before we return. */
+ restore_sigint_handler ();
+
+ return (termination_state);
+}
+
+/* Wait for the last process in the pipeline for JOB. Returns whatever
+ wait_for returns: the last process's termination state or -1 if there
+ are no unwaited-for child processes or an error occurs. */
+int
+wait_for_job (job)
+ int job;
+{
+ pid_t pid;
+ int r;
+ sigset_t set, oset;
+
+ BLOCK_CHILD(set, oset);
+ if (JOBSTATE (job) == JSTOPPED)
+ internal_warning (_("wait_for_job: job %d is stopped"), job+1);
+
+ pid = find_last_pid (job, 0);
+ UNBLOCK_CHILD(oset);
+ r = wait_for (pid);
+
+ /* POSIX.2: we can remove the job from the jobs table if we just waited
+ for it. */
+ BLOCK_CHILD (set, oset);
+ if (job != NO_JOB && jobs[job] && DEADJOB (job))
+ jobs[job]->flags |= J_NOTIFIED;
+ UNBLOCK_CHILD (oset);
+
+ return r;
+}
+
+/* Print info about dead jobs, and then delete them from the list
+ of known jobs. This does not actually delete jobs when the
+ shell is not interactive, because the dead jobs are not marked
+ as notified. */
+void
+notify_and_cleanup ()
+{
+ if (jobs_list_frozen)
+ return;
+
+ if (interactive || interactive_shell == 0 || sourcelevel)
+ notify_of_job_status ();
+
+ cleanup_dead_jobs ();
+}
+
+/* Make dead jobs disappear from the jobs array without notification.
+ This is used when the shell is not interactive. */
+void
+reap_dead_jobs ()
+{
+ mark_dead_jobs_as_notified (0);
+ cleanup_dead_jobs ();
+}
+
+/* Return the next closest (chronologically) job to JOB which is in
+ STATE. STATE can be JSTOPPED, JRUNNING. NO_JOB is returned if
+ there is no next recent job. */
+static int
+most_recent_job_in_state (job, state)
+ int job;
+ JOB_STATE state;
+{
+ register int i, result;
+ sigset_t set, oset;
+
+ BLOCK_CHILD (set, oset);
+
+ for (result = NO_JOB, i = job - 1; i >= 0; i--)
+ {
+ if (jobs[i] && (JOBSTATE (i) == state))
+ {
+ result = i;
+ break;
+ }
+ }
+
+ UNBLOCK_CHILD (oset);
+
+ return (result);
+}
+
+/* Return the newest *stopped* job older than JOB, or NO_JOB if not
+ found. */
+static int
+job_last_stopped (job)
+ int job;
+{
+ return (most_recent_job_in_state (job, JSTOPPED));
+}
+
+/* Return the newest *running* job older than JOB, or NO_JOB if not
+ found. */
+static int
+job_last_running (job)
+ int job;
+{
+ return (most_recent_job_in_state (job, JRUNNING));
+}
+
+/* Make JOB be the current job, and make previous be useful. Must be
+ called with SIGCHLD blocked. */
+static void
+set_current_job (job)
+ int job;
+{
+ int candidate;
+
+ if (js.j_current != job)
+ {
+ js.j_previous = js.j_current;
+ js.j_current = job;
+ }
+
+ /* First choice for previous job is the old current job. */
+ if (js.j_previous != js.j_current &&
+ js.j_previous != NO_JOB &&
+ jobs[js.j_previous] &&
+ STOPPED (js.j_previous))
+ return;
+
+ /* Second choice: Newest stopped job that is older than
+ the current job. */
+ candidate = NO_JOB;
+ if (STOPPED (js.j_current))
+ {
+ candidate = job_last_stopped (js.j_current);
+
+ if (candidate != NO_JOB)
+ {
+ js.j_previous = candidate;
+ return;
+ }
+ }
+
+ /* If we get here, there is either only one stopped job, in which case it is
+ the current job and the previous job should be set to the newest running
+ job, or there are only running jobs and the previous job should be set to
+ the newest running job older than the current job. We decide on which
+ alternative to use based on whether or not JOBSTATE(js.j_current) is
+ JSTOPPED. */
+
+ candidate = RUNNING (js.j_current) ? job_last_running (js.j_current)
+ : job_last_running (js.j_jobslots);
+
+ if (candidate != NO_JOB)
+ {
+ js.j_previous = candidate;
+ return;
+ }
+
+ /* There is only a single job, and it is both `+' and `-'. */
+ js.j_previous = js.j_current;
+}
+
+/* Make current_job be something useful, if it isn't already. */
+
+/* Here's the deal: The newest non-running job should be `+', and the
+ next-newest non-running job should be `-'. If there is only a single
+ stopped job, the js.j_previous is the newest non-running job. If there
+ are only running jobs, the newest running job is `+' and the
+ next-newest running job is `-'. Must be called with SIGCHLD blocked. */
+
+static void
+reset_current ()
+{
+ int candidate;
+
+ if (js.j_jobslots && js.j_current != NO_JOB && jobs[js.j_current] && STOPPED (js.j_current))
+ candidate = js.j_current;
+ else
+ {
+ candidate = NO_JOB;
+
+ /* First choice: the previous job. */
+ if (js.j_previous != NO_JOB && jobs[js.j_previous] && STOPPED (js.j_previous))
+ candidate = js.j_previous;
+
+ /* Second choice: the most recently stopped job. */
+ if (candidate == NO_JOB)
+ candidate = job_last_stopped (js.j_jobslots);
+
+ /* Third choice: the newest running job. */
+ if (candidate == NO_JOB)
+ candidate = job_last_running (js.j_jobslots);
+ }
+
+ /* If we found a job to use, then use it. Otherwise, there
+ are no jobs period. */
+ if (candidate != NO_JOB)
+ set_current_job (candidate);
+ else
+ js.j_current = js.j_previous = NO_JOB;
+}
+
+/* Set up the job structures so we know the job and its processes are
+ all running. */
+static void
+set_job_running (job)
+ int job;
+{
+ register PROCESS *p;
+
+ /* Each member of the pipeline is now running. */
+ p = jobs[job]->pipe;
+
+ do
+ {
+ if (WIFSTOPPED (p->status))
+ p->running = PS_RUNNING; /* XXX - could be PS_STOPPED */
+ p = p->next;
+ }
+ while (p != jobs[job]->pipe);
+
+ /* This means that the job is running. */
+ JOBSTATE (job) = JRUNNING;
+}
+
+/* Start a job. FOREGROUND if non-zero says to do that. Otherwise,
+ start the job in the background. JOB is a zero-based index into
+ JOBS. Returns -1 if it is unable to start a job, and the return
+ status of the job otherwise. */
+int
+start_job (job, foreground)
+ int job, foreground;
+{
+ register PROCESS *p;
+ int already_running;
+ sigset_t set, oset;
+ char *wd, *s;
+ static TTYSTRUCT save_stty;
+
+ BLOCK_CHILD (set, oset);
+
+ if (DEADJOB (job))
+ {
+ internal_error (_("%s: job has terminated"), this_command_name);
+ UNBLOCK_CHILD (oset);
+ return (-1);
+ }
+
+ already_running = RUNNING (job);
+
+ if (foreground == 0 && already_running)
+ {
+ internal_error (_("%s: job %d already in background"), this_command_name, job + 1);
+ UNBLOCK_CHILD (oset);
+ return (0); /* XPG6/SUSv3 says this is not an error */
+ }
+
+ wd = current_working_directory ();
+
+ /* You don't know about the state of this job. Do you? */
+ jobs[job]->flags &= ~J_NOTIFIED;
+
+ if (foreground)
+ {
+ set_current_job (job);
+ jobs[job]->flags |= J_FOREGROUND;
+ }
+
+ /* Tell the outside world what we're doing. */
+ p = jobs[job]->pipe;
+
+ if (foreground == 0)
+ {
+ /* POSIX.2 says `bg' doesn't give any indication about current or
+ previous job. */
+ if (posixly_correct == 0)
+ s = (job == js.j_current) ? "+ ": ((job == js.j_previous) ? "- " : " ");
+ else
+ s = " ";
+ printf ("[%d]%s", job + 1, s);
+ }
+
+ do
+ {
+ printf ("%s%s",
+ p->command ? p->command : "",
+ p->next != jobs[job]->pipe? " | " : "");
+ p = p->next;
+ }
+ while (p != jobs[job]->pipe);
+
+ if (foreground == 0)
+ printf (" &");
+
+ if (strcmp (wd, jobs[job]->wd) != 0)
+ printf (" (wd: %s)", polite_directory_format (jobs[job]->wd));
+
+ printf ("\n");
+
+ /* Run the job. */
+ if (already_running == 0)
+ set_job_running (job);
+
+ /* Save the tty settings before we start the job in the foreground. */
+ if (foreground)
+ {
+ get_tty_state ();
+ save_stty = shell_tty_info;
+ /* Give the terminal to this job. */
+ if (IS_JOBCONTROL (job))
+ give_terminal_to (jobs[job]->pgrp, 0);
+ }
+ else
+ jobs[job]->flags &= ~J_FOREGROUND;
+
+ /* If the job is already running, then don't bother jump-starting it. */
+ if (already_running == 0)
+ {
+ jobs[job]->flags |= J_NOTIFIED;
+ killpg (jobs[job]->pgrp, SIGCONT);
+ }
+
+ if (foreground)
+ {
+ pid_t pid;
+ int st;
+
+ pid = find_last_pid (job, 0);
+ UNBLOCK_CHILD (oset);
+ st = wait_for (pid);
+ shell_tty_info = save_stty;
+ set_tty_state ();
+ return (st);
+ }
+ else
+ {
+ reset_current ();
+ UNBLOCK_CHILD (oset);
+ return (0);
+ }
+}
+
+/* Give PID SIGNAL. This determines what job the pid belongs to (if any).
+ If PID does belong to a job, and the job is stopped, then CONTinue the
+ job after giving it SIGNAL. Returns -1 on failure. If GROUP is non-null,
+ then kill the process group associated with PID. */
+int
+kill_pid (pid, sig, group)
+ pid_t pid;
+ int sig, group;
+{
+ register PROCESS *p;
+ int job, result, negative;
+ sigset_t set, oset;
+
+ if (pid < -1)
+ {
+ pid = -pid;
+ group = negative = 1;
+ }
+ else
+ negative = 0;
+
+ result = EXECUTION_SUCCESS;
+ if (group)
+ {
+ BLOCK_CHILD (set, oset);
+ p = find_pipeline (pid, 0, &job);
+
+ if (job != NO_JOB)
+ {
+ jobs[job]->flags &= ~J_NOTIFIED;
+
+ /* Kill process in backquotes or one started without job control? */
+
+ /* If we're passed a pid < -1, just call killpg and see what happens */
+ if (negative && jobs[job]->pgrp == shell_pgrp)
+ result = killpg (pid, sig);
+ /* If we're killing using job control notification, for example,
+ without job control active, we have to do things ourselves. */
+ else if (jobs[job]->pgrp == shell_pgrp)
+ {
+ p = jobs[job]->pipe;
+ do
+ {
+ if (PALIVE (p) == 0)
+ continue; /* avoid pid recycling problem */
+ kill (p->pid, sig);
+ if (PEXITED (p) && (sig == SIGTERM || sig == SIGHUP))
+ kill (p->pid, SIGCONT);
+ p = p->next;
+ }
+ while (p != jobs[job]->pipe);
+ }
+ else
+ {
+ result = killpg (jobs[job]->pgrp, sig);
+ if (p && STOPPED (job) && (sig == SIGTERM || sig == SIGHUP))
+ killpg (jobs[job]->pgrp, SIGCONT);
+ /* If we're continuing a stopped job via kill rather than bg or
+ fg, emulate the `bg' behavior. */
+ if (p && STOPPED (job) && (sig == SIGCONT))
+ {
+ set_job_running (job);
+ jobs[job]->flags &= ~J_FOREGROUND;
+ jobs[job]->flags |= J_NOTIFIED;
+ }
+ }
+ }
+ else
+ result = killpg (pid, sig);
+
+ UNBLOCK_CHILD (oset);
+ }
+ else
+ result = kill (pid, sig);
+
+ return (result);
+}
+
+/* sigchld_handler () flushes at least one of the children that we are
+ waiting for. It gets run when we have gotten a SIGCHLD signal. */
+static sighandler
+sigchld_handler (sig)
+ int sig;
+{
+ int n, oerrno;
+
+ oerrno = errno;
+ REINSTALL_SIGCHLD_HANDLER;
+ sigchld++;
+ n = 0;
+ if (queue_sigchld == 0)
+ n = waitchld (-1, 0);
+ errno = oerrno;
+ SIGRETURN (n);
+}
+
+/* waitchld() reaps dead or stopped children. It's called by wait_for and
+ sigchld_handler, and runs until there aren't any children terminating any
+ more.
+ If BLOCK is 1, this is to be a blocking wait for a single child, although
+ an arriving SIGCHLD could cause the wait to be non-blocking. It returns
+ the number of children reaped, or -1 if there are no unwaited-for child
+ processes. */
+static int
+waitchld (wpid, block)
+ pid_t wpid;
+ int block;
+{
+ WAIT status;
+ PROCESS *child;
+ pid_t pid;
+ int call_set_current, last_stopped_job, job, children_exited, waitpid_flags;
+ static int wcontinued = WCONTINUED; /* run-time fix for glibc problem */
+
+ call_set_current = children_exited = 0;
+ last_stopped_job = NO_JOB;
+
+ do
+ {
+ /* We don't want to be notified about jobs stopping if job control
+ is not active. XXX - was interactive_shell instead of job_control */
+ waitpid_flags = (job_control && subshell_environment == 0)
+ ? (WUNTRACED|wcontinued)
+ : 0;
+ if (sigchld || block == 0)
+ waitpid_flags |= WNOHANG;
+ /* Check for terminating signals and exit the shell if we receive one */
+ CHECK_TERMSIG;
+
+ if (block == 1 && queue_sigchld == 0 && (waitpid_flags & WNOHANG) == 0)
+ {
+ internal_warning (_("waitchld: turning on WNOHANG to avoid indefinite block"));
+ waitpid_flags |= WNOHANG;
+ }
+
+ pid = WAITPID (-1, &status, waitpid_flags);
+
+ /* WCONTINUED may be rejected by waitpid as invalid even when defined */
+ if (wcontinued && pid < 0 && errno == EINVAL)
+ {
+ wcontinued = 0;
+ continue; /* jump back to the test and retry without WCONTINUED */
+ }
+
+ /* The check for WNOHANG is to make sure we decrement sigchld only
+ if it was non-zero before we called waitpid. */
+ if (sigchld > 0 && (waitpid_flags & WNOHANG))
+ sigchld--;
+
+ /* If waitpid returns -1 with errno == ECHILD, there are no more
+ unwaited-for child processes of this shell. */
+ if (pid < 0 && errno == ECHILD)
+ {
+ if (children_exited == 0)
+ return -1;
+ else
+ break;
+ }
+
+ /* If waitpid returns 0, there are running children. If it returns -1,
+ the only other error POSIX says it can return is EINTR. */
+ CHECK_TERMSIG;
+ if (pid <= 0)
+ continue; /* jumps right to the test */
+
+ /* children_exited is used to run traps on SIGCHLD. We don't want to
+ run the trap if a process is just being continued. */
+ if (WIFCONTINUED(status) == 0)
+ {
+ children_exited++;
+ js.c_living--;
+ }
+
+ /* Locate our PROCESS for this pid. */
+ child = find_process (pid, 1, &job); /* want living procs only */
+
+#if defined (COPROCESS_SUPPORT)
+ coproc_pidchk (pid, status);
+#endif
+
+ /* It is not an error to have a child terminate that we did
+ not have a record of. This child could have been part of
+ a pipeline in backquote substitution. Even so, I'm not
+ sure child is ever non-zero. */
+ if (child == 0)
+ {
+ if (WIFEXITED (status) || WIFSIGNALED (status))
+ js.c_reaped++;
+ continue;
+ }
+
+ /* Remember status, and whether or not the process is running. */
+ child->status = status;
+ child->running = WIFCONTINUED(status) ? PS_RUNNING : PS_DONE;
+
+ if (PEXITED (child))
+ {
+ js.c_totreaped++;
+ if (job != NO_JOB)
+ js.c_reaped++;
+ }
+
+ if (job == NO_JOB)
+ continue;
+
+ call_set_current += set_job_status_and_cleanup (job);
+
+ if (STOPPED (job))
+ last_stopped_job = job;
+ else if (DEADJOB (job) && last_stopped_job == job)
+ last_stopped_job = NO_JOB;
+ }
+ while ((sigchld || block == 0) && pid > (pid_t)0);
+
+ /* If a job was running and became stopped, then set the current
+ job. Otherwise, don't change a thing. */
+ if (call_set_current)
+ {
+ if (last_stopped_job != NO_JOB)
+ set_current_job (last_stopped_job);
+ else
+ reset_current ();
+ }
+
+ /* Call a SIGCHLD trap handler for each child that exits, if one is set. */
+ if (job_control && signal_is_trapped (SIGCHLD) && children_exited &&
+ trap_list[SIGCHLD] != (char *)IGNORE_SIG)
+ {
+ if (posixly_correct && this_shell_builtin && this_shell_builtin == wait_builtin)
+ {
+ interrupt_immediately = 0;
+ trap_handler (SIGCHLD); /* set pending_traps[SIGCHLD] */
+ wait_signal_received = SIGCHLD;
+ longjmp (wait_intr_buf, 1);
+ }
+
+ run_sigchld_trap (children_exited);
+ }
+
+ /* We have successfully recorded the useful information about this process
+ that has just changed state. If we notify asynchronously, and the job
+ that this process belongs to is no longer running, then notify the user
+ of that fact now. */
+ if (asynchronous_notification && interactive)
+ notify_of_job_status ();
+
+ return (children_exited);
+}
+
+/* Set the status of JOB and perform any necessary cleanup if the job is
+ marked as JDEAD.
+
+ Currently, the cleanup activity is restricted to handling any SIGINT
+ received while waiting for a foreground job to finish. */
+static int
+set_job_status_and_cleanup (job)
+ int job;
+{
+ PROCESS *child;
+ int tstatus, job_state, any_stopped, any_tstped, call_set_current;
+ SigHandler *temp_handler;
+
+ child = jobs[job]->pipe;
+ jobs[job]->flags &= ~J_NOTIFIED;
+
+ call_set_current = 0;
+
+ /*
+ * COMPUTE JOB STATUS
+ */
+
+ /* If all children are not running, but any of them is stopped, then
+ the job is stopped, not dead. */
+ job_state = any_stopped = any_tstped = 0;
+ do
+ {
+ job_state |= PRUNNING (child);
+#if 0
+ if (PEXITED (child) && (WIFSTOPPED (child->status)))
+#else
+ /* Only checking for WIFSTOPPED now, not for PS_DONE */
+ if (PSTOPPED (child))
+#endif
+ {
+ any_stopped = 1;
+ any_tstped |= interactive && job_control &&
+ (WSTOPSIG (child->status) == SIGTSTP);
+ }
+ child = child->next;
+ }
+ while (child != jobs[job]->pipe);
+
+ /* If job_state != 0, the job is still running, so don't bother with
+ setting the process exit status and job state unless we're
+ transitioning from stopped to running. */
+ if (job_state != 0 && JOBSTATE(job) != JSTOPPED)
+ return 0;
+
+ /*
+ * SET JOB STATUS
+ */
+
+ /* The job is either stopped or dead. Set the state of the job accordingly. */
+ if (any_stopped)
+ {
+ jobs[job]->state = JSTOPPED;
+ jobs[job]->flags &= ~J_FOREGROUND;
+ call_set_current++;
+ /* Suspending a job with SIGTSTP breaks all active loops. */
+ if (any_tstped && loop_level)
+ breaking = loop_level;
+ }
+ else if (job_state != 0) /* was stopped, now running */
+ {
+ jobs[job]->state = JRUNNING;
+ call_set_current++;
+ }
+ else
+ {
+ jobs[job]->state = JDEAD;
+ js.j_ndead++;
+
+#if 0
+ if (IS_FOREGROUND (job))
+ setjstatus (job);
+#endif
+
+ /* If this job has a cleanup function associated with it, call it
+ with `cleanarg' as the single argument, then set the function
+ pointer to NULL so it is not inadvertently called twice. The
+ cleanup function is responsible for deallocating cleanarg. */
+ if (jobs[job]->j_cleanup)
+ {
+ (*jobs[job]->j_cleanup) (jobs[job]->cleanarg);
+ jobs[job]->j_cleanup = (sh_vptrfunc_t *)NULL;
+ }
+ }
+
+ /*
+ * CLEANUP
+ *
+ * Currently, we just do special things if we got a SIGINT while waiting
+ * for a foreground job to complete
+ */
+
+ if (JOBSTATE (job) == JDEAD)
+ {
+ /* If we're running a shell script and we get a SIGINT with a
+ SIGINT trap handler, but the foreground job handles it and
+ does not exit due to SIGINT, run the trap handler but do not
+ otherwise act as if we got the interrupt. */
+ if (wait_sigint_received && interactive_shell == 0 &&
+ WIFSIGNALED (child->status) == 0 && IS_FOREGROUND (job) &&
+ signal_is_trapped (SIGINT))
+ {
+ int old_frozen;
+ wait_sigint_received = 0;
+ last_command_exit_value = process_exit_status (child->status);
+
+ old_frozen = jobs_list_frozen;
+ jobs_list_frozen = 1;
+ tstatus = maybe_call_trap_handler (SIGINT);
+ jobs_list_frozen = old_frozen;
+ }
+
+ /* If the foreground job is killed by SIGINT when job control is not
+ active, we need to perform some special handling.
+
+ The check of wait_sigint_received is a way to determine if the
+ SIGINT came from the keyboard (in which case the shell has already
+ seen it, and wait_sigint_received is non-zero, because keyboard
+ signals are sent to process groups) or via kill(2) to the foreground
+ process by another process (or itself). If the shell did receive the
+ SIGINT, it needs to perform normal SIGINT processing. */
+ else if (wait_sigint_received && (WTERMSIG (child->status) == SIGINT) &&
+ IS_FOREGROUND (job) && IS_JOBCONTROL (job) == 0)
+ {
+ int old_frozen;
+
+ wait_sigint_received = 0;
+
+ /* If SIGINT is trapped, set the exit status so that the trap
+ handler can see it. */
+ if (signal_is_trapped (SIGINT))
+ last_command_exit_value = process_exit_status (child->status);
+
+ /* If the signal is trapped, let the trap handler get it no matter
+ what and simply return if the trap handler returns.
+ maybe_call_trap_handler() may cause dead jobs to be removed from
+ the job table because of a call to execute_command. We work
+ around this by setting JOBS_LIST_FROZEN. */
+ old_frozen = jobs_list_frozen;
+ jobs_list_frozen = 1;
+ tstatus = maybe_call_trap_handler (SIGINT);
+ jobs_list_frozen = old_frozen;
+ if (tstatus == 0 && old_sigint_handler != INVALID_SIGNAL_HANDLER)
+ {
+ /* wait_sigint_handler () has already seen SIGINT and
+ allowed the wait builtin to jump out. We need to
+ call the original SIGINT handler, if necessary. If
+ the original handler is SIG_DFL, we need to resend
+ the signal to ourselves. */
+
+ temp_handler = old_sigint_handler;
+
+ /* Bogus. If we've reset the signal handler as the result
+ of a trap caught on SIGINT, then old_sigint_handler
+ will point to trap_handler, which now knows nothing about
+ SIGINT (if we reset the sighandler to the default).
+ In this case, we have to fix things up. What a crock. */
+ if (temp_handler == trap_handler && signal_is_trapped (SIGINT) == 0)
+ temp_handler = trap_to_sighandler (SIGINT);
+ restore_sigint_handler ();
+ if (temp_handler == SIG_DFL)
+ termsig_handler (SIGINT);
+ else if (temp_handler != SIG_IGN)
+ (*temp_handler) (SIGINT);
+ }
+ }
+ }
+
+ return call_set_current;
+}
+
+/* Build the array of values for the $PIPESTATUS variable from the set of
+ exit statuses of all processes in the job J. */
+static void
+setjstatus (j)
+ int j;
+{
+#if defined (ARRAY_VARS)
+ register int i;
+ register PROCESS *p;
+
+ for (i = 1, p = jobs[j]->pipe; p->next != jobs[j]->pipe; p = p->next, i++)
+ ;
+ i++;
+ if (statsize < i)
+ {
+ pstatuses = (int *)xrealloc (pstatuses, i * sizeof (int));
+ statsize = i;
+ }
+ i = 0;
+ p = jobs[j]->pipe;
+ do
+ {
+ pstatuses[i++] = process_exit_status (p->status);
+ p = p->next;
+ }
+ while (p != jobs[j]->pipe);
+
+ pstatuses[i] = -1; /* sentinel */
+ set_pipestatus_array (pstatuses, i);
+#endif
+}
+
+void
+run_sigchld_trap (nchild)
+ int nchild;
+{
+ char *trap_command;
+ int i;
+
+ /* Turn off the trap list during the call to parse_and_execute ()
+ to avoid potentially infinite recursive calls. Preserve the
+ values of last_command_exit_value, last_made_pid, and the_pipeline
+ around the execution of the trap commands. */
+ trap_command = savestring (trap_list[SIGCHLD]);
+
+ begin_unwind_frame ("SIGCHLD trap");
+ unwind_protect_int (last_command_exit_value);
+ unwind_protect_int (last_command_exit_signal);
+ unwind_protect_var (last_made_pid);
+ unwind_protect_int (interrupt_immediately);
+ unwind_protect_int (jobs_list_frozen);
+ unwind_protect_pointer (the_pipeline);
+ unwind_protect_pointer (subst_assign_varlist);
+
+ /* We have to add the commands this way because they will be run
+ in reverse order of adding. We don't want maybe_set_sigchld_trap ()
+ to reference freed memory. */
+ add_unwind_protect (xfree, trap_command);
+ add_unwind_protect (maybe_set_sigchld_trap, trap_command);
+
+ subst_assign_varlist = (WORD_LIST *)NULL;
+ the_pipeline = (PROCESS *)NULL;
+
+ set_impossible_sigchld_trap ();
+ jobs_list_frozen = 1;
+ for (i = 0; i < nchild; i++)
+ {
+ interrupt_immediately = 1;
+ parse_and_execute (savestring (trap_command), "trap", SEVAL_NOHIST|SEVAL_RESETLINE);
+ }
+
+ run_unwind_frame ("SIGCHLD trap");
+}
+
+/* Function to call when you want to notify people of changes
+ in job status. This prints out all jobs which are pending
+ notification to stderr, and marks those printed as already
+ notified, thus making them candidates for cleanup. */
+static void
+notify_of_job_status ()
+{
+ register int job, termsig;
+ char *dir;
+ sigset_t set, oset;
+ WAIT s;
+
+ if (jobs == 0 || js.j_jobslots == 0)
+ return;
+
+ if (old_ttou != 0)
+ {
+ sigemptyset (&set);
+ sigaddset (&set, SIGCHLD);
+ sigaddset (&set, SIGTTOU);
+ sigemptyset (&oset);
+ sigprocmask (SIG_BLOCK, &set, &oset);
+ }
+ else
+ queue_sigchld++;
+
+ /* XXX could use js.j_firstj here */
+ for (job = 0, dir = (char *)NULL; job < js.j_jobslots; job++)
+ {
+ if (jobs[job] && IS_NOTIFIED (job) == 0)
+ {
+ s = raw_job_exit_status (job);
+ termsig = WTERMSIG (s);
+
+ /* POSIX.2 says we have to hang onto the statuses of at most the
+ last CHILD_MAX background processes if the shell is running a
+ script. If the shell is running a script, either from a file
+ or standard input, don't print anything unless the job was
+ killed by a signal. */
+ if (startup_state == 0 && WIFSIGNALED (s) == 0 &&
+ ((DEADJOB (job) && IS_FOREGROUND (job) == 0) || STOPPED (job)))
+ continue;
+
+#if 0
+ /* If job control is disabled, don't print the status messages.
+ Mark dead jobs as notified so that they get cleaned up. If
+ startup_state == 2, we were started to run `-c command', so
+ don't print anything. */
+ if ((job_control == 0 && interactive_shell) || startup_state == 2)
+#else
+ /* If job control is disabled, don't print the status messages.
+ Mark dead jobs as notified so that they get cleaned up. If
+ startup_state == 2 and subshell_environment has the
+ SUBSHELL_COMSUB bit turned on, we were started to run a command
+ substitution, so don't print anything. */
+ if ((job_control == 0 && interactive_shell) ||
+ (startup_state == 2 && (subshell_environment & SUBSHELL_COMSUB)))
+#endif
+ {
+ /* POSIX.2 compatibility: if the shell is not interactive,
+ hang onto the job corresponding to the last asynchronous
+ pid until the user has been notified of its status or does
+ a `wait'. */
+ if (DEADJOB (job) && (interactive_shell || (find_last_pid (job, 0) != last_asynchronous_pid)))
+ jobs[job]->flags |= J_NOTIFIED;
+ continue;
+ }
+
+ /* Print info on jobs that are running in the background,
+ and on foreground jobs that were killed by anything
+ except SIGINT (and possibly SIGPIPE). */
+ switch (JOBSTATE (job))
+ {
+ case JDEAD:
+ if (interactive_shell == 0 && termsig && WIFSIGNALED (s) &&
+ termsig != SIGINT &&
+#if defined (DONT_REPORT_SIGPIPE)
+ termsig != SIGPIPE &&
+#endif
+ signal_is_trapped (termsig) == 0)
+ {
+ /* Don't print `0' for a line number. */
+ fprintf (stderr, _("%s: line %d: "), get_name_for_error (), (line_number == 0) ? 1 : line_number);
+ pretty_print_job (job, JLIST_NONINTERACTIVE, stderr);
+ }
+ else if (IS_FOREGROUND (job))
+ {
+#if !defined (DONT_REPORT_SIGPIPE)
+ if (termsig && WIFSIGNALED (s) && termsig != SIGINT)
+#else
+ if (termsig && WIFSIGNALED (s) && termsig != SIGINT && termsig != SIGPIPE)
+#endif
+ {
+ fprintf (stderr, "%s", j_strsignal (termsig));
+
+ if (WIFCORED (s))
+ fprintf (stderr, _(" (core dumped)"));
+
+ fprintf (stderr, "\n");
+ }
+ }
+ else if (job_control) /* XXX job control test added */
+ {
+ if (dir == 0)
+ dir = current_working_directory ();
+ pretty_print_job (job, JLIST_STANDARD, stderr);
+ if (dir && strcmp (dir, jobs[job]->wd) != 0)
+ fprintf (stderr,
+ _("(wd now: %s)\n"), polite_directory_format (dir));
+ }
+
+ jobs[job]->flags |= J_NOTIFIED;
+ break;
+
+ case JSTOPPED:
+ fprintf (stderr, "\n");
+ if (dir == 0)
+ dir = current_working_directory ();
+ pretty_print_job (job, JLIST_STANDARD, stderr);
+ if (dir && (strcmp (dir, jobs[job]->wd) != 0))
+ fprintf (stderr,
+ _("(wd now: %s)\n"), polite_directory_format (dir));
+ jobs[job]->flags |= J_NOTIFIED;
+ break;
+
+ case JRUNNING:
+ case JMIXED:
+ break;
+
+ default:
+ programming_error ("notify_of_job_status");
+ }
+ }
+ }
+ if (old_ttou != 0)
+ sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL);
+ else
+ queue_sigchld--;
+}
+
+/* Initialize the job control mechanism, and set up the tty stuff. */
+int
+initialize_job_control (force)
+ int force;
+{
+ pid_t t;
+ int t_errno;
+
+ t_errno = -1;
+ shell_pgrp = getpgid (0);
+
+ if (shell_pgrp == -1)
+ {
+ sys_error (_("initialize_job_control: getpgrp failed"));
+ exit (1);
+ }
+
+ /* We can only have job control if we are interactive. */
+ if (interactive == 0)
+ {
+ job_control = 0;
+ original_pgrp = NO_PID;
+ shell_tty = fileno (stderr);
+ }
+ else
+ {
+ shell_tty = -1;
+
+ /* If forced_interactive is set, we skip the normal check that stderr
+ is attached to a tty, so we need to check here. If it's not, we
+ need to see whether we have a controlling tty by opening /dev/tty,
+ since trying to use job control tty pgrp manipulations on a non-tty
+ is going to fail. */
+ if (forced_interactive && isatty (fileno (stderr)) == 0)
+ shell_tty = open ("/dev/tty", O_RDWR|O_NONBLOCK);
+
+ /* Get our controlling terminal. If job_control is set, or
+ interactive is set, then this is an interactive shell no
+ matter where fd 2 is directed. */
+ if (shell_tty == -1)
+ shell_tty = dup (fileno (stderr)); /* fd 2 */
+
+ shell_tty = move_to_high_fd (shell_tty, 1, -1);
+
+ /* Compensate for a bug in systems that compiled the BSD
+ rlogind with DEBUG defined, like NeXT and Alliant. */
+ if (shell_pgrp == 0)
+ {
+ shell_pgrp = getpid ();
+ setpgid (0, shell_pgrp);
+ tcsetpgrp (shell_tty, shell_pgrp);
+ }
+
+ while ((terminal_pgrp = tcgetpgrp (shell_tty)) != -1)
+ {
+ if (shell_pgrp != terminal_pgrp)
+ {
+ SigHandler *ottin;
+
+ ottin = set_signal_handler(SIGTTIN, SIG_DFL);
+ kill (0, SIGTTIN);
+ set_signal_handler (SIGTTIN, ottin);
+ continue;
+ }
+ break;
+ }
+
+ if (terminal_pgrp == -1)
+ t_errno = errno;
+
+ /* Make sure that we are using the new line discipline. */
+ if (set_new_line_discipline (shell_tty) < 0)
+ {
+ sys_error (_("initialize_job_control: line discipline"));
+ job_control = 0;
+ }
+ else
+ {
+ original_pgrp = shell_pgrp;
+ shell_pgrp = getpid ();
+
+ if ((original_pgrp != shell_pgrp) && (setpgid (0, shell_pgrp) < 0))
+ {
+ sys_error (_("initialize_job_control: setpgid"));
+ shell_pgrp = original_pgrp;
+ }
+
+ job_control = 1;
+
+ /* If (and only if) we just set our process group to our pid,
+ thereby becoming a process group leader, and the terminal
+ is not in the same process group as our (new) process group,
+ then set the terminal's process group to our (new) process
+ group. If that fails, set our process group back to what it
+ was originally (so we can still read from the terminal) and
+ turn off job control. */
+ if (shell_pgrp != original_pgrp && shell_pgrp != terminal_pgrp)
+ {
+ if (give_terminal_to (shell_pgrp, 0) < 0)
+ {
+ t_errno = errno;
+ setpgid (0, original_pgrp);
+ shell_pgrp = original_pgrp;
+ job_control = 0;
+ }
+ }
+
+ if (job_control && ((t = tcgetpgrp (shell_tty)) == -1 || t != shell_pgrp))
+ {
+ if (t_errno != -1)
+ errno = t_errno;
+ sys_error (_("cannot set terminal process group (%d)"), t);
+ job_control = 0;
+ }
+ }
+ if (job_control == 0)
+ internal_error (_("no job control in this shell"));
+ }
+
+ if (shell_tty != fileno (stderr))
+ SET_CLOSE_ON_EXEC (shell_tty);
+
+ set_signal_handler (SIGCHLD, sigchld_handler);
+
+ change_flag ('m', job_control ? '-' : '+');
+
+ if (interactive)
+ get_tty_state ();
+
+ if (js.c_childmax < 0)
+ js.c_childmax = getmaxchild ();
+ if (js.c_childmax < 0)
+ js.c_childmax = DEFAULT_CHILD_MAX;
+
+ return job_control;
+}
+
+#ifdef DEBUG
+void
+debug_print_pgrps ()
+{
+ itrace("original_pgrp = %ld shell_pgrp = %ld terminal_pgrp = %ld",
+ (long)original_pgrp, (long)shell_pgrp, (long)terminal_pgrp);
+ itrace("tcgetpgrp(%d) -> %ld, getpgid(0) -> %ld",
+ shell_tty, (long)tcgetpgrp (shell_tty), (long)getpgid(0));
+}
+#endif
+
+/* Set the line discipline to the best this system has to offer.
+ Return -1 if this is not possible. */
+static int
+set_new_line_discipline (tty)
+ int tty;
+{
+#if defined (NEW_TTY_DRIVER)
+ int ldisc;
+
+ if (ioctl (tty, TIOCGETD, &ldisc) < 0)
+ return (-1);
+
+ if (ldisc != NTTYDISC)
+ {
+ ldisc = NTTYDISC;
+
+ if (ioctl (tty, TIOCSETD, &ldisc) < 0)
+ return (-1);
+ }
+ return (0);
+#endif /* NEW_TTY_DRIVER */
+
+#if defined (TERMIO_TTY_DRIVER)
+# if defined (TERMIO_LDISC) && (NTTYDISC)
+ if (ioctl (tty, TCGETA, &shell_tty_info) < 0)
+ return (-1);
+
+ if (shell_tty_info.c_line != NTTYDISC)
+ {
+ shell_tty_info.c_line = NTTYDISC;
+ if (ioctl (tty, TCSETAW, &shell_tty_info) < 0)
+ return (-1);
+ }
+# endif /* TERMIO_LDISC && NTTYDISC */
+ return (0);
+#endif /* TERMIO_TTY_DRIVER */
+
+#if defined (TERMIOS_TTY_DRIVER)
+# if defined (TERMIOS_LDISC) && defined (NTTYDISC)
+ if (tcgetattr (tty, &shell_tty_info) < 0)
+ return (-1);
+
+ if (shell_tty_info.c_line != NTTYDISC)
+ {
+ shell_tty_info.c_line = NTTYDISC;
+ if (tcsetattr (tty, TCSADRAIN, &shell_tty_info) < 0)
+ return (-1);
+ }
+# endif /* TERMIOS_LDISC && NTTYDISC */
+ return (0);
+#endif /* TERMIOS_TTY_DRIVER */
+
+#if !defined (NEW_TTY_DRIVER) && !defined (TERMIO_TTY_DRIVER) && !defined (TERMIOS_TTY_DRIVER)
+ return (-1);
+#endif
+}
+
+/* Setup this shell to handle C-C, etc. */
+void
+initialize_job_signals ()
+{
+ if (interactive)
+ {
+ set_signal_handler (SIGINT, sigint_sighandler);
+ set_signal_handler (SIGTSTP, SIG_IGN);
+ set_signal_handler (SIGTTOU, SIG_IGN);
+ set_signal_handler (SIGTTIN, SIG_IGN);
+ }
+ else if (job_control)
+ {
+ old_tstp = set_signal_handler (SIGTSTP, sigstop_sighandler);
+ old_ttin = set_signal_handler (SIGTTIN, sigstop_sighandler);
+ old_ttou = set_signal_handler (SIGTTOU, sigstop_sighandler);
+ }
+ /* Leave these things alone for non-interactive shells without job
+ control. */
+}
+
+/* Here we handle CONT signals. */
+static sighandler
+sigcont_sighandler (sig)
+ int sig;
+{
+ initialize_job_signals ();
+ set_signal_handler (SIGCONT, old_cont);
+ kill (getpid (), SIGCONT);
+
+ SIGRETURN (0);
+}
+
+/* Here we handle stop signals while we are running not as a login shell. */
+static sighandler
+sigstop_sighandler (sig)
+ int sig;
+{
+ set_signal_handler (SIGTSTP, old_tstp);
+ set_signal_handler (SIGTTOU, old_ttou);
+ set_signal_handler (SIGTTIN, old_ttin);
+
+ old_cont = set_signal_handler (SIGCONT, sigcont_sighandler);
+
+ give_terminal_to (shell_pgrp, 0);
+
+ kill (getpid (), sig);
+
+ SIGRETURN (0);
+}
+
+/* Give the terminal to PGRP. */
+int
+give_terminal_to (pgrp, force)
+ pid_t pgrp;
+ int force;
+{
+ sigset_t set, oset;
+ int r, e;
+
+ r = 0;
+ if (job_control || force)
+ {
+ sigemptyset (&set);
+ sigaddset (&set, SIGTTOU);
+ sigaddset (&set, SIGTTIN);
+ sigaddset (&set, SIGTSTP);
+ sigaddset (&set, SIGCHLD);
+ sigemptyset (&oset);
+ sigprocmask (SIG_BLOCK, &set, &oset);
+
+ if (tcsetpgrp (shell_tty, pgrp) < 0)
+ {
+ /* Maybe we should print an error message? */
+#if 0
+ sys_error ("tcsetpgrp(%d) failed: pid %ld to pgrp %ld",
+ shell_tty, (long)getpid(), (long)pgrp);
+#endif
+ r = -1;
+ e = errno;
+ }
+ else
+ terminal_pgrp = pgrp;
+ sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL);
+ }
+
+ if (r == -1)
+ errno = e;
+
+ return r;
+}
+
+/* Give terminal to NPGRP iff it's currently owned by OPGRP. FLAGS are the
+ flags to pass to give_terminal_to(). */
+static int
+maybe_give_terminal_to (opgrp, npgrp, flags)
+ pid_t opgrp, npgrp;
+ int flags;
+{
+ int tpgrp;
+
+ tpgrp = tcgetpgrp (shell_tty);
+ if (tpgrp < 0 && errno == ENOTTY)
+ return -1;
+ if (tpgrp == npgrp)
+ {
+ terminal_pgrp = npgrp;
+ return 0;
+ }
+ else if (tpgrp != opgrp)
+ {
+#if defined (DEBUG)
+ internal_warning ("maybe_give_terminal_to: terminal pgrp == %d shell pgrp = %d new pgrp = %d", tpgrp, opgrp, npgrp);
+#endif
+ return -1;
+ }
+ else
+ return (give_terminal_to (npgrp, flags));
+}
+
+/* Clear out any jobs in the job array. This is intended to be used by
+ children of the shell, who should not have any job structures as baggage
+ when they start executing (forking subshells for parenthesized execution
+ and functions with pipes are the two that spring to mind). If RUNNING_ONLY
+ is nonzero, only running jobs are removed from the table. */
+void
+delete_all_jobs (running_only)
+ int running_only;
+{
+ register int i;
+ sigset_t set, oset;
+
+ BLOCK_CHILD (set, oset);
+
+ /* XXX - need to set j_lastj, j_firstj appropriately if running_only != 0. */
+ if (js.j_jobslots)
+ {
+ js.j_current = js.j_previous = NO_JOB;
+
+ /* XXX could use js.j_firstj here */
+ for (i = 0; i < js.j_jobslots; i++)
+ {
+#if defined (DEBUG)
+ if (i < js.j_firstj && jobs[i])
+ itrace("delete_all_jobs: job %d non-null before js.j_firstj (%d)", i, js.j_firstj);
+ if (i > js.j_lastj && jobs[i])
+ itrace("delete_all_jobs: job %d non-null after js.j_lastj (%d)", i, js.j_lastj);
+#endif
+ if (jobs[i] && (running_only == 0 || (running_only && RUNNING(i))))
+ delete_job (i, DEL_WARNSTOPPED);
+ }
+ if (running_only == 0)
+ {
+ free ((char *)jobs);
+ js.j_jobslots = 0;
+ js.j_firstj = js.j_lastj = js.j_njobs = 0;
+ }
+ }
+
+ if (running_only == 0)
+ bgp_clear ();
+
+ UNBLOCK_CHILD (oset);
+}
+
+/* Mark all jobs in the job array so that they don't get a SIGHUP when the
+ shell gets one. If RUNNING_ONLY is nonzero, mark only running jobs. */
+void
+nohup_all_jobs (running_only)
+ int running_only;
+{
+ register int i;
+ sigset_t set, oset;
+
+ BLOCK_CHILD (set, oset);
+
+ if (js.j_jobslots)
+ {
+ /* XXX could use js.j_firstj here */
+ for (i = 0; i < js.j_jobslots; i++)
+ if (jobs[i] && (running_only == 0 || (running_only && RUNNING(i))))
+ nohup_job (i);
+ }
+
+ UNBLOCK_CHILD (oset);
+}
+
+int
+count_all_jobs ()
+{
+ int i, n;
+ sigset_t set, oset;
+
+ /* This really counts all non-dead jobs. */
+ BLOCK_CHILD (set, oset);
+ /* XXX could use js.j_firstj here */
+ for (i = n = 0; i < js.j_jobslots; i++)
+ {
+#if defined (DEBUG)
+ if (i < js.j_firstj && jobs[i])
+ itrace("count_all_jobs: job %d non-null before js.j_firstj (%d)", i, js.j_firstj);
+ if (i > js.j_lastj && jobs[i])
+ itrace("count_all_jobs: job %d non-null after js.j_lastj (%d)", i, js.j_lastj);
+#endif
+ if (jobs[i] && DEADJOB(i) == 0)
+ n++;
+ }
+ UNBLOCK_CHILD (oset);
+ return n;
+}
+
+static void
+mark_all_jobs_as_dead ()
+{
+ register int i;
+ sigset_t set, oset;
+
+ if (js.j_jobslots == 0)
+ return;
+
+ BLOCK_CHILD (set, oset);
+
+ /* XXX could use js.j_firstj here */
+ for (i = 0; i < js.j_jobslots; i++)
+ if (jobs[i])
+ {
+ jobs[i]->state = JDEAD;
+ js.j_ndead++;
+ }
+
+ UNBLOCK_CHILD (oset);
+}
+
+/* Mark all dead jobs as notified, so delete_job () cleans them out
+ of the job table properly. POSIX.2 says we need to save the
+ status of the last CHILD_MAX jobs, so we count the number of dead
+ jobs and mark only enough as notified to save CHILD_MAX statuses. */
+static void
+mark_dead_jobs_as_notified (force)
+ int force;
+{
+ register int i, ndead, ndeadproc;
+ sigset_t set, oset;
+
+ if (js.j_jobslots == 0)
+ return;
+
+ BLOCK_CHILD (set, oset);
+
+ /* If FORCE is non-zero, we don't have to keep CHILD_MAX statuses
+ around; just run through the array. */
+ if (force)
+ {
+ /* XXX could use js.j_firstj here */
+ for (i = 0; i < js.j_jobslots; i++)
+ {
+ if (jobs[i] && DEADJOB (i) && (interactive_shell || (find_last_pid (i, 0) != last_asynchronous_pid)))
+ jobs[i]->flags |= J_NOTIFIED;
+ }
+ UNBLOCK_CHILD (oset);
+ return;
+ }
+
+ /* Mark enough dead jobs as notified to keep CHILD_MAX processes left in the
+ array with the corresponding not marked as notified. This is a better
+ way to avoid pid aliasing and reuse problems than keeping the POSIX-
+ mandated CHILD_MAX jobs around. delete_job() takes care of keeping the
+ bgpids list regulated. */
+
+ /* Count the number of dead jobs */
+ /* XXX could use js.j_firstj here */
+ for (i = ndead = ndeadproc = 0; i < js.j_jobslots; i++)
+ {
+#if defined (DEBUG)
+ if (i < js.j_firstj && jobs[i])
+ itrace("mark_dead_jobs_as_notified: job %d non-null before js.j_firstj (%d)", i, js.j_firstj);
+ if (i > js.j_lastj && jobs[i])
+ itrace("mark_dead_jobs_as_notified: job %d non-null after js.j_lastj (%d)", i, js.j_lastj);
+#endif
+ if (jobs[i] && DEADJOB (i))
+ {
+ ndead++;
+ ndeadproc += processes_in_job (i);
+ }
+ }
+
+#ifdef DEBUG
+ if (ndeadproc != js.c_reaped)
+ itrace("mark_dead_jobs_as_notified: ndeadproc (%d) != js.c_reaped (%d)", ndeadproc, js.c_reaped);
+ if (ndead != js.j_ndead)
+ itrace("mark_dead_jobs_as_notified: ndead (%d) != js.j_ndead (%d)", ndead, js.j_ndead);
+#endif
+
+ if (js.c_childmax < 0)
+ js.c_childmax = getmaxchild ();
+ if (js.c_childmax < 0)
+ js.c_childmax = DEFAULT_CHILD_MAX;
+
+ /* Don't do anything if the number of dead processes is less than CHILD_MAX
+ and we're not forcing a cleanup. */
+ if (ndeadproc <= js.c_childmax)
+ {
+ UNBLOCK_CHILD (oset);
+ return;
+ }
+
+#if 0
+itrace("mark_dead_jobs_as_notified: child_max = %d ndead = %d ndeadproc = %d", js.c_childmax, ndead, ndeadproc);
+#endif
+
+ /* Mark enough dead jobs as notified that we keep CHILD_MAX jobs in
+ the list. This isn't exactly right yet; changes need to be made
+ to stop_pipeline so we don't mark the newer jobs after we've
+ created CHILD_MAX slots in the jobs array. This needs to be
+ integrated with a way to keep the jobs array from growing without
+ bound. Maybe we wrap back around to 0 after we reach some max
+ limit, and there are sufficient job slots free (keep track of total
+ size of jobs array (js.j_jobslots) and running count of number of jobs
+ in jobs array. Then keep a job index corresponding to the `oldest job'
+ and start this loop there, wrapping around as necessary. In effect,
+ we turn the list into a circular buffer. */
+ /* XXX could use js.j_firstj here */
+ for (i = 0; i < js.j_jobslots; i++)
+ {
+ if (jobs[i] && DEADJOB (i) && (interactive_shell || (find_last_pid (i, 0) != last_asynchronous_pid)))
+ {
+#if defined (DEBUG)
+ if (i < js.j_firstj && jobs[i])
+ itrace("mark_dead_jobs_as_notified: job %d non-null before js.j_firstj (%d)", i, js.j_firstj);
+ if (i > js.j_lastj && jobs[i])
+ itrace("mark_dead_jobs_as_notified: job %d non-null after js.j_lastj (%d)", i, js.j_lastj);
+#endif
+ /* If marking this job as notified would drop us down below
+ child_max, don't mark it so we can keep at least child_max
+ statuses. XXX -- need to check what Posix actually says
+ about keeping statuses. */
+ if ((ndeadproc -= processes_in_job (i)) <= js.c_childmax)
+ break;
+ jobs[i]->flags |= J_NOTIFIED;
+ }
+ }
+
+ UNBLOCK_CHILD (oset);
+}
+
+/* Here to allow other parts of the shell (like the trap stuff) to
+ unfreeze the jobs list. */
+void
+unfreeze_jobs_list ()
+{
+ jobs_list_frozen = 0;
+}
+
+/* Allow or disallow job control to take place. Returns the old value
+ of job_control. */
+int
+set_job_control (arg)
+ int arg;
+{
+ int old;
+
+ old = job_control;
+ job_control = arg;
+
+ /* If we're turning on job control, reset pipeline_pgrp so make_child will
+ put new child processes into the right pgrp */
+ if (job_control != old && job_control)
+ pipeline_pgrp = 0;
+
+ return (old);
+}
+
+/* Turn off all traces of job control. This is run by children of the shell
+ which are going to do shellsy things, like wait (), etc. */
+void
+without_job_control ()
+{
+ stop_making_children ();
+ start_pipeline ();
+#if defined (PGRP_PIPE)
+ sh_closepipe (pgrp_pipe);
+#endif
+ delete_all_jobs (0);
+ set_job_control (0);
+}
+
+/* If this shell is interactive, terminate all stopped jobs and
+ restore the original terminal process group. This is done
+ before the `exec' builtin calls shell_execve. */
+void
+end_job_control ()
+{
+ if (interactive_shell) /* XXX - should it be interactive? */
+ {
+ terminate_stopped_jobs ();
+
+ if (original_pgrp >= 0)
+ give_terminal_to (original_pgrp, 1);
+ }
+
+ if (original_pgrp >= 0)
+ setpgid (0, original_pgrp);
+}
+
+/* Restart job control by closing shell tty and reinitializing. This is
+ called after an exec fails in an interactive shell and we do not exit. */
+void
+restart_job_control ()
+{
+ if (shell_tty != -1)
+ close (shell_tty);
+ initialize_job_control (0);
+}
+
+/* Set the handler to run when the shell receives a SIGCHLD signal. */
+void
+set_sigchld_handler ()
+{
+ set_signal_handler (SIGCHLD, sigchld_handler);
+}
+
+#if defined (PGRP_PIPE)
+/* Read from the read end of a pipe. This is how the process group leader
+ blocks until all of the processes in a pipeline have been made. */
+static void
+pipe_read (pp)
+ int *pp;
+{
+ char ch;
+
+ if (pp[1] >= 0)
+ {
+ close (pp[1]);
+ pp[1] = -1;
+ }
+
+ if (pp[0] >= 0)
+ {
+ while (read (pp[0], &ch, 1) == -1 && errno == EINTR)
+ ;
+ }
+}
+
+/* Functional interface closes our local-to-job-control pipes. */
+void
+close_pgrp_pipe ()
+{
+ sh_closepipe (pgrp_pipe);
+}
+
+void
+save_pgrp_pipe (p, clear)
+ int *p;
+ int clear;
+{
+ p[0] = pgrp_pipe[0];
+ p[1] = pgrp_pipe[1];
+ if (clear)
+ pgrp_pipe[0] = pgrp_pipe[1] = -1;
+}
+
+void
+restore_pgrp_pipe (p)
+ int *p;
+{
+ pgrp_pipe[0] = p[0];
+ pgrp_pipe[1] = p[1];
+}
+
+#endif /* PGRP_PIPE */
diff --git a/jobs.h b/jobs.h
new file mode 100644
index 0000000..65de773
--- /dev/null
+++ b/jobs.h
@@ -0,0 +1,245 @@
+/* jobs.h -- structures and definitions used by the jobs.c file. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_JOBS_H_)
+# define _JOBS_H_
+
+#include "quit.h"
+#include "siglist.h"
+
+#include "stdc.h"
+
+#include "posixwait.h"
+
+/* Defines controlling the fashion in which jobs are listed. */
+#define JLIST_STANDARD 0
+#define JLIST_LONG 1
+#define JLIST_PID_ONLY 2
+#define JLIST_CHANGED_ONLY 3
+#define JLIST_NONINTERACTIVE 4
+
+/* I looked it up. For pretty_print_job (). The real answer is 24. */
+#define LONGEST_SIGNAL_DESC 24
+
+/* The max time to sleep while retrying fork() on EAGAIN failure */
+#define FORKSLEEP_MAX 16
+
+/* We keep an array of jobs. Each entry in the array is a linked list
+ of processes that are piped together. The first process encountered is
+ the group leader. */
+
+/* Values for the `running' field of a struct process. */
+#define PS_DONE 0
+#define PS_RUNNING 1
+#define PS_STOPPED 2
+#define PS_RECYCLED 4
+
+/* Each child of the shell is remembered in a STRUCT PROCESS. A circular
+ chain of such structures is a pipeline. */
+typedef struct process {
+ struct process *next; /* Next process in the pipeline. A circular chain. */
+ pid_t pid; /* Process ID. */
+ WAIT status; /* The status of this command as returned by wait. */
+ int running; /* Non-zero if this process is running. */
+ char *command; /* The particular program that is running. */
+} PROCESS;
+
+/* PALIVE really means `not exited' */
+#define PSTOPPED(p) (WIFSTOPPED((p)->status))
+#define PRUNNING(p) ((p)->running == PS_RUNNING)
+#define PALIVE(p) (PRUNNING(p) || PSTOPPED(p))
+
+#define PEXITED(p) ((p)->running == PS_DONE)
+#if defined (RECYCLES_PIDS)
+# define PRECYCLED(p) ((p)->running == PS_RECYCLED)
+#else
+# define PRECYCLED(p) (0)
+#endif
+#define PDEADPROC(p) (PEXITED(p) || PRECYCLED(p))
+
+#define get_job_by_jid(ind) (jobs[(ind)])
+
+/* A description of a pipeline's state. */
+typedef enum { JNONE = -1, JRUNNING = 1, JSTOPPED = 2, JDEAD = 4, JMIXED = 8 } JOB_STATE;
+#define JOBSTATE(job) (jobs[(job)]->state)
+#define J_JOBSTATE(j) ((j)->state)
+
+#define STOPPED(j) (jobs[(j)]->state == JSTOPPED)
+#define RUNNING(j) (jobs[(j)]->state == JRUNNING)
+#define DEADJOB(j) (jobs[(j)]->state == JDEAD)
+
+#define INVALID_JOB(j) ((j) < 0 || (j) >= js.j_jobslots || get_job_by_jid(j) == 0)
+
+/* Values for the FLAGS field in the JOB struct below. */
+#define J_FOREGROUND 0x01 /* Non-zero if this is running in the foreground. */
+#define J_NOTIFIED 0x02 /* Non-zero if already notified about job state. */
+#define J_JOBCONTROL 0x04 /* Non-zero if this job started under job control. */
+#define J_NOHUP 0x08 /* Don't send SIGHUP to job if shell gets SIGHUP. */
+#define J_STATSAVED 0x10 /* A process in this job had had status saved via $! */
+#define J_ASYNC 0x20 /* Job was started asynchronously */
+
+#define IS_FOREGROUND(j) ((jobs[j]->flags & J_FOREGROUND) != 0)
+#define IS_NOTIFIED(j) ((jobs[j]->flags & J_NOTIFIED) != 0)
+#define IS_JOBCONTROL(j) ((jobs[j]->flags & J_JOBCONTROL) != 0)
+#define IS_ASYNC(j) ((jobs[j]->flags & J_ASYNC) != 0)
+
+typedef struct job {
+ char *wd; /* The working directory at time of invocation. */
+ PROCESS *pipe; /* The pipeline of processes that make up this job. */
+ pid_t pgrp; /* The process ID of the process group (necessary). */
+ JOB_STATE state; /* The state that this job is in. */
+ int flags; /* Flags word: J_NOTIFIED, J_FOREGROUND, or J_JOBCONTROL. */
+#if defined (JOB_CONTROL)
+ COMMAND *deferred; /* Commands that will execute when this job is done. */
+ sh_vptrfunc_t *j_cleanup; /* Cleanup function to call when job marked JDEAD */
+ PTR_T cleanarg; /* Argument passed to (*j_cleanup)() */
+#endif /* JOB_CONTROL */
+} JOB;
+
+struct jobstats {
+ /* limits */
+ long c_childmax;
+ /* child process statistics */
+ int c_living; /* running or stopped child processes */
+ int c_reaped; /* exited child processes still in jobs list */
+ int c_injobs; /* total number of child processes in jobs list */
+ /* child process totals */
+ int c_totforked; /* total number of children this shell has forked */
+ int c_totreaped; /* total number of children this shell has reaped */
+ /* job counters and indices */
+ int j_jobslots; /* total size of jobs array */
+ int j_lastj; /* last (newest) job allocated */
+ int j_firstj; /* first (oldest) job allocated */
+ int j_njobs; /* number of non-NULL jobs in jobs array */
+ int j_ndead; /* number of JDEAD jobs in jobs array */
+ /* */
+ int j_current; /* current job */
+ int j_previous; /* previous job */
+ /* */
+ JOB *j_lastmade; /* last job allocated by stop_pipeline */
+ JOB *j_lastasync; /* last async job allocated by stop_pipeline */
+};
+
+struct pidstat {
+ struct pidstat *next;
+ pid_t pid;
+ int status;
+};
+
+struct bgpids {
+ struct pidstat *list;
+ struct pidstat *end;
+ int npid;
+};
+
+#define NO_JOB -1 /* An impossible job array index. */
+#define DUP_JOB -2 /* A possible return value for get_job_spec (). */
+#define BAD_JOBSPEC -3 /* Bad syntax for job spec. */
+
+/* A value which cannot be a process ID. */
+#define NO_PID (pid_t)-1
+
+/* System calls. */
+#if !defined (HAVE_UNISTD_H)
+extern pid_t fork (), getpid (), getpgrp ();
+#endif /* !HAVE_UNISTD_H */
+
+/* Stuff from the jobs.c file. */
+extern struct jobstats js;
+
+extern pid_t original_pgrp, shell_pgrp, pipeline_pgrp;
+extern pid_t last_made_pid, last_asynchronous_pid;
+extern int asynchronous_notification;
+
+extern JOB **jobs;
+
+extern void making_children __P((void));
+extern void stop_making_children __P((void));
+extern void cleanup_the_pipeline __P((void));
+extern void save_pipeline __P((int));
+extern void restore_pipeline __P((int));
+extern void start_pipeline __P((void));
+extern int stop_pipeline __P((int, COMMAND *));
+
+extern void delete_job __P((int, int));
+extern void nohup_job __P((int));
+extern void delete_all_jobs __P((int));
+extern void nohup_all_jobs __P((int));
+
+extern int count_all_jobs __P((void));
+
+extern void terminate_current_pipeline __P((void));
+extern void terminate_stopped_jobs __P((void));
+extern void hangup_all_jobs __P((void));
+extern void kill_current_pipeline __P((void));
+
+#if defined (__STDC__) && defined (pid_t)
+extern int get_job_by_pid __P((int, int));
+extern void describe_pid __P((int));
+#else
+extern int get_job_by_pid __P((pid_t, int));
+extern void describe_pid __P((pid_t));
+#endif
+
+extern void list_one_job __P((JOB *, int, int, int));
+extern void list_all_jobs __P((int));
+extern void list_stopped_jobs __P((int));
+extern void list_running_jobs __P((int));
+
+extern pid_t make_child __P((char *, int));
+
+extern int get_tty_state __P((void));
+extern int set_tty_state __P((void));
+
+extern int wait_for_single_pid __P((pid_t));
+extern void wait_for_background_pids __P((void));
+extern int wait_for __P((pid_t));
+extern int wait_for_job __P((int));
+
+extern void notify_and_cleanup __P((void));
+extern void reap_dead_jobs __P((void));
+extern int start_job __P((int, int));
+extern int kill_pid __P((pid_t, int, int));
+extern int initialize_job_control __P((int));
+extern void initialize_job_signals __P((void));
+extern int give_terminal_to __P((pid_t, int));
+
+extern void run_sigchld_trap __P((int));
+
+extern void unfreeze_jobs_list __P((void));
+extern int set_job_control __P((int));
+extern void without_job_control __P((void));
+extern void end_job_control __P((void));
+extern void restart_job_control __P((void));
+extern void set_sigchld_handler __P((void));
+extern void ignore_tty_job_signals __P((void));
+extern void default_tty_job_signals __P((void));
+
+extern void init_job_stats __P((void));
+
+extern void close_pgrp_pipe __P((void));
+extern void save_pgrp_pipe __P((int *, int));
+extern void restore_pgrp_pipe __P((int *));
+
+#if defined (JOB_CONTROL)
+extern int job_control;
+#endif
+
+#endif /* _JOBS_H_ */
diff --git a/lib/glob/Makefile.in b/lib/glob/Makefile.in
new file mode 100644
index 0000000..1ccae68
--- /dev/null
+++ b/lib/glob/Makefile.in
@@ -0,0 +1,158 @@
+## -*- text -*- ####################################################
+# #
+# Makefile for the GNU Glob Library. #
+# #
+####################################################################
+#
+# Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+srcdir = @srcdir@
+VPATH = .:@srcdir@
+topdir = @top_srcdir@
+BUILD_DIR = @BUILD_DIR@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+CC = @CC@
+RANLIB = @RANLIB@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+RM = rm -f
+CP = cp
+MV = mv
+
+SHELL = @MAKE_SHELL@
+
+PROFILE_FLAGS = @PROFILE_FLAGS@
+
+CFLAGS = @CFLAGS@
+LOCAL_CFLAGS = @LOCAL_CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@
+
+DEFS = @DEFS@
+LOCAL_DEFS = @LOCAL_DEFS@
+
+BASHINCDIR = ${topdir}/include
+
+INCLUDES = -I. -I../.. -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib
+
+CCFLAGS = $(PROFILE_FLAGS) $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) ${INCLUDES} \
+ $(LOCAL_CFLAGS) $(CFLAGS)
+
+# Here is a rule for making .o files from .c files that doesn't force
+# the type of the machine (like -sun3) into the flags.
+.c.o:
+ $(RM) $@
+ $(CC) -c $(CCFLAGS) $<
+
+# The name of the library target.
+LIBRARY_NAME = libglob.a
+
+# The C code source files for this library.
+CSOURCES = $(srcdir)/glob.c $(srcdir)/strmatch.c $(srcdir)/smatch.c \
+ $(srcdir)/xmbsrtowcs.c
+
+# The header files for this library.
+HSOURCES = $(srcdir)/strmatch.h
+
+OBJECTS = glob.o strmatch.o smatch.o xmbsrtowcs.o
+
+# The texinfo files which document this library.
+DOCSOURCE = doc/glob.texi
+DOCOBJECT = doc/glob.dvi
+DOCSUPPORT = doc/Makefile
+DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
+
+SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
+
+SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
+
+THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
+
+######################################################################
+
+all: $(LIBRARY_NAME)
+
+$(LIBRARY_NAME): $(OBJECTS)
+ $(RM) -f $@
+ $(AR) $(ARFLAGS) $@ $(OBJECTS)
+ -test -n "$(RANLIB)" && $(RANLIB) $@
+
+what-tar:
+ @for file in $(THINGS_TO_TAR); do \
+ echo $(selfdir)$$file; \
+ done
+
+documentation: force
+ -(cd doc; $(MAKE) $(MFLAGS))
+force:
+
+# The rule for 'includes' is written funny so that the if statement
+# always returns TRUE unless there really was an error installing the
+# include files.
+install:
+
+clean:
+ rm -f $(OBJECTS) $(LIBRARY_NAME)
+ -(cd doc && $(MAKE) $(MFLAGS) $@ )
+
+realclean distclean maintainer-clean: clean
+ -( cd doc && $(MAKE) $(MFLAGS) $@ )
+ $(RM) -f Makefile
+
+mostlyclean: clean
+ -( cd doc && $(MAKE) $(MFLAGS) $@ )
+
+######################################################################
+# #
+# Dependencies for the object files which make up this library. #
+# #
+######################################################################
+
+smatch.o: strmatch.h
+smatch.o: $(BUILD_DIR)/config.h
+smatch.o: $(BASHINCDIR)/chartypes.h
+smatch.o: $(BASHINCDIR)/ansi_stdlib.h $(topdir)/bashansi.h
+smatch.o: $(BASHINCDIR)/shmbutil.h
+smatch.o: $(topdir)/xmalloc.h
+
+strmatch.o: strmatch.h
+strmatch.o: $(BUILD_DIR)/config.h
+strmatch.o: $(BASHINCDIR)/stdc.h
+
+glob.o: $(BUILD_DIR)/config.h
+glob.o: $(topdir)/bashtypes.h $(BASHINCDIR)/ansi_stdlib.h $(topdir)/bashansi.h
+glob.o: $(BASHINCDIR)/posixstat.h $(BASHINCDIR)/memalloc.h
+glob.o: strmatch.h glob.h
+glob.o: $(BASHINCDIR)/shmbutil.h
+glob.o: $(topdir)/xmalloc.h
+
+xmbsrtowcs.o: ${BUILD_DIR}/config.h
+xmbsrtowcs.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+xmbsrtowcs.o: ${BASHINCDIR}/shmbutil.h
+
+# Rules for deficient makes, like SunOS and Solaris
+glob.o: glob.c
+strmatch.o: strmatch.c
+smatch.o: smatch.c
+xmbsrtowcs.o: xmbsrtowcs.c
+
+# dependencies for C files that include other C files
+glob.o: glob_loop.c
+smatch.o: sm_loop.c
diff --git a/lib/glob/collsyms.h b/lib/glob/collsyms.h
new file mode 100644
index 0000000..d56df61
--- /dev/null
+++ b/lib/glob/collsyms.h
@@ -0,0 +1,140 @@
+/* collsyms.h -- collating symbol names and their corresponding characters
+ (in ascii) as given by POSIX.2 in table 2.8. */
+
+/* Copyright (C) 1997-2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* The upper-case letters, lower-case letters, and digits are omitted from
+ this table. The digits are not included in the table in the POSIX.2
+ spec. The upper and lower case letters are translated by the code
+ in smatch.c:collsym(). */
+
+typedef struct _COLLSYM {
+ XCHAR *name;
+ CHAR code;
+} __COLLSYM;
+
+static __COLLSYM POSIXCOLL [] =
+{
+ { L("NUL"), L('\0') },
+ { L("SOH"), L('\001') },
+ { L("STX"), L('\002') },
+ { L("ETX"), L('\003') },
+ { L("EOT"), L('\004') },
+ { L("ENQ"), L('\005') },
+ { L("ACK"), L('\006') },
+#ifdef __STDC__
+ { L("alert"), L('\a') },
+#else
+ { L("alert"), L('\007') },
+#endif
+ { L("BS"), L('\010') },
+ { L("backspace"), L('\b') },
+ { L("HT"), L('\011') },
+ { L("tab"), L('\t') },
+ { L("LF"), L('\012') },
+ { L("newline"), L('\n') },
+ { L("VT"), L('\013') },
+ { L("vertical-tab"), L('\v') },
+ { L("FF"), L('\014') },
+ { L("form-feed"), L('\f') },
+ { L("CR"), L('\015') },
+ { L("carriage-return"), L('\r') },
+ { L("SO"), L('\016') },
+ { L("SI"), L('\017') },
+ { L("DLE"), L('\020') },
+ { L("DC1"), L('\021') },
+ { L("DC2"), L('\022') },
+ { L("DC3"), L('\023') },
+ { L("DC4"), L('\024') },
+ { L("NAK"), L('\025') },
+ { L("SYN"), L('\026') },
+ { L("ETB"), L('\027') },
+ { L("CAN"), L('\030') },
+ { L("EM"), L('\031') },
+ { L("SUB"), L('\032') },
+ { L("ESC"), L('\033') },
+ { L("IS4"), L('\034') },
+ { L("FS"), L('\034') },
+ { L("IS3"), L('\035') },
+ { L("GS"), L('\035') },
+ { L("IS2"), L('\036') },
+ { L("RS"), L('\036') },
+ { L("IS1"), L('\037') },
+ { L("US"), L('\037') },
+ { L("space"), L(' ') },
+ { L("exclamation-mark"), L('!') },
+ { L("quotation-mark"), L('"') },
+ { L("number-sign"), L('#') },
+ { L("dollar-sign"), L('$') },
+ { L("percent-sign"), L('%') },
+ { L("ampersand"), L('&') },
+ { L("apostrophe"), L('\'') },
+ { L("left-parenthesis"), L('(') },
+ { L("right-parenthesis"), L(')') },
+ { L("asterisk"), L('*') },
+ { L("plus-sign"), L('+') },
+ { L("comma"), L(',') },
+ { L("hyphen"), L('-') },
+ { L("hyphen-minus"), L('-') },
+ { L("minus"), L('-') }, /* extension from POSIX.2 */
+ { L("dash"), L('-') }, /* extension from POSIX.2 */
+ { L("period"), L('.') },
+ { L("full-stop"), L('.') },
+ { L("slash"), L('/') },
+ { L("solidus"), L('/') }, /* extension from POSIX.2 */
+ { L("zero"), L('0') },
+ { L("one"), L('1') },
+ { L("two"), L('2') },
+ { L("three"), L('3') },
+ { L("four"), L('4') },
+ { L("five"), L('5') },
+ { L("six"), L('6') },
+ { L("seven"), L('7') },
+ { L("eight"), L('8') },
+ { L("nine"), L('9') },
+ { L("colon"), L(':') },
+ { L("semicolon"), L(';') },
+ { L("less-than-sign"), L('<') },
+ { L("equals-sign"), L('=') },
+ { L("greater-than-sign"), L('>') },
+ { L("question-mark"), L('?') },
+ { L("commercial-at"), L('@') },
+ /* upper-case letters omitted */
+ { L("left-square-bracket"), L('[') },
+ { L("backslash"), L('\\') },
+ { L("reverse-solidus"), L('\\') },
+ { L("right-square-bracket"), L(']') },
+ { L("circumflex"), L('^') },
+ { L("circumflex-accent"), L('^') }, /* extension from POSIX.2 */
+ { L("underscore"), L('_') },
+ { L("grave-accent"), L('`') },
+ /* lower-case letters omitted */
+ { L("left-brace"), L('{') }, /* extension from POSIX.2 */
+ { L("left-curly-bracket"), L('{') },
+ { L("vertical-line"), L('|') },
+ { L("right-brace"), L('}') }, /* extension from POSIX.2 */
+ { L("right-curly-bracket"), L('}') },
+ { L("tilde"), L('~') },
+ { L("DEL"), L('\177') },
+ { 0, 0 },
+};
+
+#undef _COLLSYM
+#undef __COLLSYM
+#undef POSIXCOLL
diff --git a/lib/glob/doc/Makefile b/lib/glob/doc/Makefile
new file mode 100644
index 0000000..8dca606
--- /dev/null
+++ b/lib/glob/doc/Makefile
@@ -0,0 +1,5 @@
+all:
+ cp glob.texi glob.info
+
+clean distclean mostlyclean maintainer-clean:
+ rm -f glob.?? glob.info
diff --git a/lib/glob/doc/glob.texi b/lib/glob/doc/glob.texi
new file mode 100644
index 0000000..0262ef1
--- /dev/null
+++ b/lib/glob/doc/glob.texi
@@ -0,0 +1 @@
+Nothing happens here.
diff --git a/lib/glob/glob.c b/lib/glob/glob.c
new file mode 100644
index 0000000..c77618f
--- /dev/null
+++ b/lib/glob/glob.c
@@ -0,0 +1,1100 @@
+/* glob.c -- file-name wildcard pattern matching for Bash.
+
+ Copyright (C) 1985-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne-Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* To whomever it may concern: I have never seen the code which most
+ Unix programs use to perform this function. I wrote this from scratch
+ based on specifications for the pattern matching. --RMS. */
+
+#include <config.h>
+
+#if !defined (__GNUC__) && !defined (HAVE_ALLOCA_H) && defined (_AIX)
+ #pragma alloca
+#endif /* _AIX && RISC6000 && !__GNUC__ */
+
+#include "bashtypes.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+#include "posixdir.h"
+#include "posixstat.h"
+#include "shmbutil.h"
+#include "xmalloc.h"
+
+#include "filecntl.h"
+#if !defined (F_OK)
+# define F_OK 0
+#endif
+
+#include "stdc.h"
+#include "memalloc.h"
+
+#include "shell.h"
+
+#include "glob.h"
+#include "strmatch.h"
+
+#if !defined (HAVE_BCOPY) && !defined (bcopy)
+# define bcopy(s, d, n) ((void) memcpy ((d), (s), (n)))
+#endif /* !HAVE_BCOPY && !bcopy */
+
+#if !defined (NULL)
+# if defined (__STDC__)
+# define NULL ((void *) 0)
+# else
+# define NULL 0x0
+# endif /* __STDC__ */
+#endif /* !NULL */
+
+#if !defined (FREE)
+# define FREE(x) if (x) free (x)
+#endif
+
+/* Don't try to alloca() more than this much memory for `struct globval'
+ in glob_vector() */
+#ifndef ALLOCA_MAX
+# define ALLOCA_MAX 100000
+#endif
+
+struct globval
+ {
+ struct globval *next;
+ char *name;
+ };
+
+extern void throw_to_top_level __P((void));
+extern int sh_eaccess __P((char *, int));
+extern char *sh_makepath __P((const char *, const char *, int));
+
+extern int extended_glob;
+
+/* Global variable which controls whether or not * matches .*.
+ Non-zero means don't match .*. */
+int noglob_dot_filenames = 1;
+
+/* Global variable which controls whether or not filename globbing
+ is done without regard to case. */
+int glob_ignore_case = 0;
+
+/* Global variable to return to signify an error in globbing. */
+char *glob_error_return;
+
+static struct globval finddirs_error_return;
+
+/* Some forward declarations. */
+static int skipname __P((char *, char *, int));
+#if HANDLE_MULTIBYTE
+static int mbskipname __P((char *, char *, int));
+#endif
+#if HANDLE_MULTIBYTE
+static void udequote_pathname __P((char *));
+static void wdequote_pathname __P((char *));
+#else
+# define dequote_pathname udequote_pathname
+#endif
+static void dequote_pathname __P((char *));
+static int glob_testdir __P((char *));
+static char **glob_dir_to_array __P((char *, char **, int));
+
+/* Compile `glob_loop.c' for single-byte characters. */
+#define CHAR unsigned char
+#define INT int
+#define L(CS) CS
+#define INTERNAL_GLOB_PATTERN_P internal_glob_pattern_p
+#include "glob_loop.c"
+
+/* Compile `glob_loop.c' again for multibyte characters. */
+#if HANDLE_MULTIBYTE
+
+#define CHAR wchar_t
+#define INT wint_t
+#define L(CS) L##CS
+#define INTERNAL_GLOB_PATTERN_P internal_glob_wpattern_p
+#include "glob_loop.c"
+
+#endif /* HANDLE_MULTIBYTE */
+
+/* And now a function that calls either the single-byte or multibyte version
+ of internal_glob_pattern_p. */
+int
+glob_pattern_p (pattern)
+ const char *pattern;
+{
+#if HANDLE_MULTIBYTE
+ size_t n;
+ wchar_t *wpattern;
+ int r;
+
+ if (MB_CUR_MAX == 1)
+ return (internal_glob_pattern_p ((unsigned char *)pattern));
+
+ /* Convert strings to wide chars, and call the multibyte version. */
+ n = xdupmbstowcs (&wpattern, NULL, pattern);
+ if (n == (size_t)-1)
+ /* Oops. Invalid multibyte sequence. Try it as single-byte sequence. */
+ return (internal_glob_pattern_p ((unsigned char *)pattern));
+
+ r = internal_glob_wpattern_p (wpattern);
+ free (wpattern);
+
+ return r;
+#else
+ return (internal_glob_pattern_p (pattern));
+#endif
+}
+
+/* Return 1 if DNAME should be skipped according to PAT. Mostly concerned
+ with matching leading `.'. */
+
+static int
+skipname (pat, dname, flags)
+ char *pat;
+ char *dname;
+ int flags;
+{
+ /* If a leading dot need not be explicitly matched, and the pattern
+ doesn't start with a `.', don't match `.' or `..' */
+ if (noglob_dot_filenames == 0 && pat[0] != '.' &&
+ (pat[0] != '\\' || pat[1] != '.') &&
+ (dname[0] == '.' &&
+ (dname[1] == '\0' || (dname[1] == '.' && dname[2] == '\0'))))
+ return 1;
+
+ /* If a dot must be explicity matched, check to see if they do. */
+ else if (noglob_dot_filenames && dname[0] == '.' && pat[0] != '.' &&
+ (pat[0] != '\\' || pat[1] != '.'))
+ return 1;
+
+ return 0;
+}
+
+#if HANDLE_MULTIBYTE
+/* Return 1 if DNAME should be skipped according to PAT. Handles multibyte
+ characters in PAT and DNAME. Mostly concerned with matching leading `.'. */
+
+static int
+mbskipname (pat, dname, flags)
+ char *pat, *dname;
+ int flags;
+{
+ int ret;
+ wchar_t *pat_wc, *dn_wc;
+ size_t pat_n, dn_n;
+
+ pat_n = xdupmbstowcs (&pat_wc, NULL, pat);
+ dn_n = xdupmbstowcs (&dn_wc, NULL, dname);
+
+ ret = 0;
+ if (pat_n != (size_t)-1 && dn_n !=(size_t)-1)
+ {
+ /* If a leading dot need not be explicitly matched, and the
+ pattern doesn't start with a `.', don't match `.' or `..' */
+ if (noglob_dot_filenames == 0 && pat_wc[0] != L'.' &&
+ (pat_wc[0] != L'\\' || pat_wc[1] != L'.') &&
+ (dn_wc[0] == L'.' &&
+ (dn_wc[1] == L'\0' || (dn_wc[1] == L'.' && dn_wc[2] == L'\0'))))
+ ret = 1;
+
+ /* If a leading dot must be explicity matched, check to see if the
+ pattern and dirname both have one. */
+ else if (noglob_dot_filenames && dn_wc[0] == L'.' &&
+ pat_wc[0] != L'.' &&
+ (pat_wc[0] != L'\\' || pat_wc[1] != L'.'))
+ ret = 1;
+ }
+
+ FREE (pat_wc);
+ FREE (dn_wc);
+
+ return ret;
+}
+#endif /* HANDLE_MULTIBYTE */
+
+/* Remove backslashes quoting characters in PATHNAME by modifying PATHNAME. */
+static void
+udequote_pathname (pathname)
+ char *pathname;
+{
+ register int i, j;
+
+ for (i = j = 0; pathname && pathname[i]; )
+ {
+ if (pathname[i] == '\\')
+ i++;
+
+ pathname[j++] = pathname[i++];
+
+ if (pathname[i - 1] == 0)
+ break;
+ }
+ if (pathname)
+ pathname[j] = '\0';
+}
+
+#if HANDLE_MULTIBYTE
+/* Remove backslashes quoting characters in PATHNAME by modifying PATHNAME. */
+static void
+wdequote_pathname (pathname)
+ char *pathname;
+{
+ mbstate_t ps;
+ size_t len, n;
+ wchar_t *wpathname;
+ int i, j;
+ wchar_t *orig_wpathname;
+
+ len = strlen (pathname);
+ /* Convert the strings into wide characters. */
+ n = xdupmbstowcs (&wpathname, NULL, pathname);
+ if (n == (size_t) -1)
+ /* Something wrong. */
+ return;
+ orig_wpathname = wpathname;
+
+ for (i = j = 0; wpathname && wpathname[i]; )
+ {
+ if (wpathname[i] == L'\\')
+ i++;
+
+ wpathname[j++] = wpathname[i++];
+
+ if (wpathname[i - 1] == L'\0')
+ break;
+ }
+ if (wpathname)
+ wpathname[j] = L'\0';
+
+ /* Convert the wide character string into unibyte character set. */
+ memset (&ps, '\0', sizeof(mbstate_t));
+ n = wcsrtombs(pathname, (const wchar_t **)&wpathname, len, &ps);
+ pathname[len] = '\0';
+
+ /* Can't just free wpathname here; wcsrtombs changes it in many cases. */
+ free (orig_wpathname);
+}
+
+static void
+dequote_pathname (pathname)
+ char *pathname;
+{
+ if (MB_CUR_MAX > 1)
+ wdequote_pathname (pathname);
+ else
+ udequote_pathname (pathname);
+}
+#endif /* HANDLE_MULTIBYTE */
+
+/* Test whether NAME exists. */
+
+#if defined (HAVE_LSTAT)
+# define GLOB_TESTNAME(name) (lstat (name, &finfo))
+#else /* !HAVE_LSTAT */
+# if !defined (AFS)
+# define GLOB_TESTNAME(name) (sh_eaccess (name, F_OK))
+# else /* AFS */
+# define GLOB_TESTNAME(name) (access (name, F_OK))
+# endif /* AFS */
+#endif /* !HAVE_LSTAT */
+
+/* Return 0 if DIR is a directory, -1 otherwise. */
+static int
+glob_testdir (dir)
+ char *dir;
+{
+ struct stat finfo;
+
+/*itrace("glob_testdir: testing %s", dir);*/
+ if (stat (dir, &finfo) < 0)
+ return (-1);
+
+ if (S_ISDIR (finfo.st_mode) == 0)
+ return (-1);
+
+ return (0);
+}
+
+/* Recursively scan SDIR for directories matching PAT (PAT is always `**').
+ FLAGS is simply passed down to the recursive call to glob_vector. Returns
+ a list of matching directory names. EP, if non-null, is set to the last
+ element of the returned list. NP, if non-null, is set to the number of
+ directories in the returned list. These two variables exist for the
+ convenience of the caller (always glob_vector). */
+static struct globval *
+finddirs (pat, sdir, flags, ep, np)
+ char *pat;
+ char *sdir;
+ int flags;
+ struct globval **ep;
+ int *np;
+{
+ char **r, *n;
+ int ndirs;
+ struct globval *ret, *e, *g;
+
+/*itrace("finddirs: pat = `%s' sdir = `%s' flags = 0x%x", pat, sdir, flags);*/
+ e = ret = 0;
+ r = glob_vector (pat, sdir, flags);
+ if (r == 0 || r[0] == 0)
+ {
+ if (np)
+ *np = 0;
+ if (ep)
+ *ep = 0;
+ if (r && r != &glob_error_return)
+ free (r);
+ return (struct globval *)0;
+ }
+ for (ndirs = 0; r[ndirs] != 0; ndirs++)
+ {
+ g = (struct globval *) malloc (sizeof (struct globval));
+ if (g == 0)
+ {
+ while (ret) /* free list built so far */
+ {
+ g = ret->next;
+ free (ret);
+ ret = g;
+ }
+
+ free (r);
+ if (np)
+ *np = 0;
+ if (ep)
+ *ep = 0;
+ return (&finddirs_error_return);
+ }
+ if (e == 0)
+ e = g;
+
+ g->next = ret;
+ ret = g;
+
+ g->name = r[ndirs];
+ }
+
+ free (r);
+ if (ep)
+ *ep = e;
+ if (np)
+ *np = ndirs;
+
+ return ret;
+}
+
+
+/* Return a vector of names of files in directory DIR
+ whose names match glob pattern PAT.
+ The names are not in any particular order.
+ Wildcards at the beginning of PAT do not match an initial period.
+
+ The vector is terminated by an element that is a null pointer.
+
+ To free the space allocated, first free the vector's elements,
+ then free the vector.
+
+ Return 0 if cannot get enough memory to hold the pointer
+ and the names.
+
+ Return -1 if cannot access directory DIR.
+ Look in errno for more information. */
+
+char **
+glob_vector (pat, dir, flags)
+ char *pat;
+ char *dir;
+ int flags;
+{
+ DIR *d;
+ register struct dirent *dp;
+ struct globval *lastlink, *e, *dirlist;
+ register struct globval *nextlink;
+ register char *nextname, *npat, *subdir;
+ unsigned int count;
+ int lose, skip, ndirs, isdir, sdlen, add_current, patlen;
+ register char **name_vector;
+ register unsigned int i;
+ int mflags; /* Flags passed to strmatch (). */
+ int pflags; /* flags passed to sh_makepath () */
+ int nalloca;
+ struct globval *firstmalloc, *tmplink;
+ char *convfn;
+
+ lastlink = 0;
+ count = lose = skip = add_current = 0;
+
+ firstmalloc = 0;
+ nalloca = 0;
+
+/*itrace("glob_vector: pat = `%s' dir = `%s' flags = 0x%x", pat, dir, flags);*/
+ /* If PAT is empty, skip the loop, but return one (empty) filename. */
+ if (pat == 0 || *pat == '\0')
+ {
+ if (glob_testdir (dir) < 0)
+ return ((char **) &glob_error_return);
+
+ nextlink = (struct globval *)alloca (sizeof (struct globval));
+ if (nextlink == NULL)
+ return ((char **) NULL);
+
+ nextlink->next = (struct globval *)0;
+ nextname = (char *) malloc (1);
+ if (nextname == 0)
+ lose = 1;
+ else
+ {
+ lastlink = nextlink;
+ nextlink->name = nextname;
+ nextname[0] = '\0';
+ count = 1;
+ }
+
+ skip = 1;
+ }
+
+ patlen = strlen (pat);
+
+ /* If the filename pattern (PAT) does not contain any globbing characters,
+ we can dispense with reading the directory, and just see if there is
+ a filename `DIR/PAT'. If there is, and we can access it, just make the
+ vector to return and bail immediately. */
+ if (skip == 0 && glob_pattern_p (pat) == 0)
+ {
+ int dirlen;
+ struct stat finfo;
+
+ if (glob_testdir (dir) < 0)
+ return ((char **) &glob_error_return);
+
+ dirlen = strlen (dir);
+ nextname = (char *)malloc (dirlen + patlen + 2);
+ npat = (char *)malloc (patlen + 1);
+ if (nextname == 0 || npat == 0)
+ lose = 1;
+ else
+ {
+ strcpy (npat, pat);
+ dequote_pathname (npat);
+
+ strcpy (nextname, dir);
+ nextname[dirlen++] = '/';
+ strcpy (nextname + dirlen, npat);
+
+ if (GLOB_TESTNAME (nextname) >= 0)
+ {
+ free (nextname);
+ nextlink = (struct globval *)alloca (sizeof (struct globval));
+ if (nextlink)
+ {
+ nextlink->next = (struct globval *)0;
+ lastlink = nextlink;
+ nextlink->name = npat;
+ count = 1;
+ }
+ else
+ lose = 1;
+ }
+ else
+ {
+ free (nextname);
+ free (npat);
+ }
+ }
+
+ skip = 1;
+ }
+
+ if (skip == 0)
+ {
+ /* Open the directory, punting immediately if we cannot. If opendir
+ is not robust (i.e., it opens non-directories successfully), test
+ that DIR is a directory and punt if it's not. */
+#if defined (OPENDIR_NOT_ROBUST)
+ if (glob_testdir (dir) < 0)
+ return ((char **) &glob_error_return);
+#endif
+
+ d = opendir (dir);
+ if (d == NULL)
+ return ((char **) &glob_error_return);
+
+ /* Compute the flags that will be passed to strmatch(). We don't
+ need to do this every time through the loop. */
+ mflags = (noglob_dot_filenames ? FNM_PERIOD : 0) | FNM_PATHNAME;
+
+#ifdef FNM_CASEFOLD
+ if (glob_ignore_case)
+ mflags |= FNM_CASEFOLD;
+#endif
+
+ if (extended_glob)
+ mflags |= FNM_EXTMATCH;
+
+ add_current = ((flags & (GX_ALLDIRS|GX_ADDCURDIR)) == (GX_ALLDIRS|GX_ADDCURDIR));
+
+ /* Scan the directory, finding all names that match.
+ For each name that matches, allocate a struct globval
+ on the stack and store the name in it.
+ Chain those structs together; lastlink is the front of the chain. */
+ while (1)
+ {
+ /* Make globbing interruptible in the shell. */
+ if (interrupt_state || terminating_signal)
+ {
+ lose = 1;
+ break;
+ }
+
+ dp = readdir (d);
+ if (dp == NULL)
+ break;
+
+ /* If this directory entry is not to be used, try again. */
+ if (REAL_DIR_ENTRY (dp) == 0)
+ continue;
+
+#if 0
+ if (dp->d_name == 0 || *dp->d_name == 0)
+ continue;
+#endif
+
+#if HANDLE_MULTIBYTE
+ if (MB_CUR_MAX > 1 && mbskipname (pat, dp->d_name, flags))
+ continue;
+ else
+#endif
+ if (skipname (pat, dp->d_name, flags))
+ continue;
+
+ /* If we're only interested in directories, don't bother with files */
+ if (flags & (GX_MATCHDIRS|GX_ALLDIRS))
+ {
+ pflags = (flags & GX_ALLDIRS) ? MP_RMDOT : 0;
+ if (flags & GX_NULLDIR)
+ pflags |= MP_IGNDOT;
+ subdir = sh_makepath (dir, dp->d_name, pflags);
+ isdir = glob_testdir (subdir);
+ if (isdir < 0 && (flags & GX_MATCHDIRS))
+ {
+ free (subdir);
+ continue;
+ }
+ }
+
+ if (flags & GX_ALLDIRS)
+ {
+ if (isdir == 0)
+ {
+ dirlist = finddirs (pat, subdir, (flags & ~GX_ADDCURDIR), &e, &ndirs);
+ if (dirlist == &finddirs_error_return)
+ {
+ free (subdir);
+ lose = 1;
+ break;
+ }
+ if (ndirs) /* add recursive directories to list */
+ {
+ if (firstmalloc == 0)
+ firstmalloc = e;
+ e->next = lastlink;
+ lastlink = dirlist;
+ count += ndirs;
+ }
+ }
+
+ nextlink = (struct globval *) malloc (sizeof (struct globval));
+ if (firstmalloc == 0)
+ firstmalloc = nextlink;
+ sdlen = strlen (subdir);
+ nextname = (char *) malloc (sdlen + 1);
+ if (nextlink == 0 || nextname == 0)
+ {
+ free (subdir);
+ lose = 1;
+ break;
+ }
+ nextlink->next = lastlink;
+ lastlink = nextlink;
+ nextlink->name = nextname;
+ bcopy (subdir, nextname, sdlen + 1);
+ free (subdir);
+ ++count;
+ continue;
+ }
+
+ convfn = fnx_fromfs (dp->d_name, D_NAMLEN (dp));
+ if (strmatch (pat, convfn, mflags) != FNM_NOMATCH)
+ {
+ if (nalloca < ALLOCA_MAX)
+ {
+ nextlink = (struct globval *) alloca (sizeof (struct globval));
+ nalloca += sizeof (struct globval);
+ }
+ else
+ {
+ nextlink = (struct globval *) malloc (sizeof (struct globval));
+ if (firstmalloc == 0)
+ firstmalloc = nextlink;
+ }
+
+ nextname = (char *) malloc (D_NAMLEN (dp) + 1);
+ if (nextlink == 0 || nextname == 0)
+ {
+ lose = 1;
+ break;
+ }
+ nextlink->next = lastlink;
+ lastlink = nextlink;
+ nextlink->name = nextname;
+ bcopy (dp->d_name, nextname, D_NAMLEN (dp) + 1);
+ ++count;
+ }
+ }
+
+ (void) closedir (d);
+ }
+
+ /* compat: if GX_ADDCURDIR, add the passed directory also. Add an empty
+ directory name as a placeholder if GX_NULLDIR (in which case the passed
+ directory name is "."). */
+ if (add_current)
+ {
+ sdlen = strlen (dir);
+ nextname = (char *)malloc (sdlen + 1);
+ nextlink = (struct globval *) malloc (sizeof (struct globval));
+ if (nextlink == 0 || nextname == 0)
+ lose = 1;
+ else
+ {
+ nextlink->name = nextname;
+ nextlink->next = lastlink;
+ lastlink = nextlink;
+ if (flags & GX_NULLDIR)
+ nextname[0] = '\0';
+ else
+ bcopy (dir, nextname, sdlen + 1);
+ ++count;
+ }
+ }
+
+ if (lose == 0)
+ {
+ name_vector = (char **) malloc ((count + 1) * sizeof (char *));
+ lose |= name_vector == NULL;
+ }
+
+ /* Have we run out of memory? */
+ if (lose)
+ {
+ tmplink = 0;
+
+ /* Here free the strings we have got. */
+ while (lastlink)
+ {
+ /* Since we build the list in reverse order, the first N entries
+ will be allocated with malloc, if firstmalloc is set, from
+ lastlink to firstmalloc. */
+ if (firstmalloc)
+ {
+ if (lastlink == firstmalloc)
+ firstmalloc = 0;
+ tmplink = lastlink;
+ }
+ else
+ tmplink = 0;
+ free (lastlink->name);
+ lastlink = lastlink->next;
+ FREE (tmplink);
+ }
+
+ QUIT;
+
+ return ((char **)NULL);
+ }
+
+ /* Copy the name pointers from the linked list into the vector. */
+ for (tmplink = lastlink, i = 0; i < count; ++i)
+ {
+ name_vector[i] = tmplink->name;
+ tmplink = tmplink->next;
+ }
+
+ name_vector[count] = NULL;
+
+ /* If we allocated some of the struct globvals, free them now. */
+ if (firstmalloc)
+ {
+ tmplink = 0;
+ while (lastlink)
+ {
+ tmplink = lastlink;
+ if (lastlink == firstmalloc)
+ lastlink = firstmalloc = 0;
+ else
+ lastlink = lastlink->next;
+ free (tmplink);
+ }
+ }
+
+ return (name_vector);
+}
+
+/* Return a new array which is the concatenation of each string in ARRAY
+ to DIR. This function expects you to pass in an allocated ARRAY, and
+ it takes care of free()ing that array. Thus, you might think of this
+ function as side-effecting ARRAY. This should handle GX_MARKDIRS. */
+static char **
+glob_dir_to_array (dir, array, flags)
+ char *dir, **array;
+ int flags;
+{
+ register unsigned int i, l;
+ int add_slash;
+ char **result, *new;
+ struct stat sb;
+
+ l = strlen (dir);
+ if (l == 0)
+ {
+ if (flags & GX_MARKDIRS)
+ for (i = 0; array[i]; i++)
+ {
+ if ((stat (array[i], &sb) == 0) && S_ISDIR (sb.st_mode))
+ {
+ l = strlen (array[i]);
+ new = (char *)realloc (array[i], l + 2);
+ if (new == 0)
+ return NULL;
+ new[l] = '/';
+ new[l+1] = '\0';
+ array[i] = new;
+ }
+ }
+ return (array);
+ }
+
+ add_slash = dir[l - 1] != '/';
+
+ i = 0;
+ while (array[i] != NULL)
+ ++i;
+
+ result = (char **) malloc ((i + 1) * sizeof (char *));
+ if (result == NULL)
+ return (NULL);
+
+ for (i = 0; array[i] != NULL; i++)
+ {
+ /* 3 == 1 for NUL, 1 for slash at end of DIR, 1 for GX_MARKDIRS */
+ result[i] = (char *) malloc (l + strlen (array[i]) + 3);
+
+ if (result[i] == NULL)
+ return (NULL);
+
+ strcpy (result[i], dir);
+ if (add_slash)
+ result[i][l] = '/';
+ strcpy (result[i] + l + add_slash, array[i]);
+ if (flags & GX_MARKDIRS)
+ {
+ if ((stat (result[i], &sb) == 0) && S_ISDIR (sb.st_mode))
+ {
+ size_t rlen;
+ rlen = strlen (result[i]);
+ result[i][rlen] = '/';
+ result[i][rlen+1] = '\0';
+ }
+ }
+ }
+ result[i] = NULL;
+
+ /* Free the input array. */
+ for (i = 0; array[i] != NULL; i++)
+ free (array[i]);
+ free ((char *) array);
+
+ return (result);
+}
+
+/* Do globbing on PATHNAME. Return an array of pathnames that match,
+ marking the end of the array with a null-pointer as an element.
+ If no pathnames match, then the array is empty (first element is null).
+ If there isn't enough memory, then return NULL.
+ If a file system error occurs, return -1; `errno' has the error code. */
+char **
+glob_filename (pathname, flags)
+ char *pathname;
+ int flags;
+{
+ char **result;
+ unsigned int result_size;
+ char *directory_name, *filename, *dname;
+ unsigned int directory_len;
+ int free_dirname; /* flag */
+ int dflags;
+
+ result = (char **) malloc (sizeof (char *));
+ result_size = 1;
+ if (result == NULL)
+ return (NULL);
+
+ result[0] = NULL;
+
+ directory_name = NULL;
+
+ /* Find the filename. */
+ filename = strrchr (pathname, '/');
+ if (filename == NULL)
+ {
+ filename = pathname;
+ directory_name = "";
+ directory_len = 0;
+ free_dirname = 0;
+ }
+ else
+ {
+ directory_len = (filename - pathname) + 1;
+ directory_name = (char *) malloc (directory_len + 1);
+
+ if (directory_name == 0) /* allocation failed? */
+ return (NULL);
+
+ bcopy (pathname, directory_name, directory_len);
+ directory_name[directory_len] = '\0';
+ ++filename;
+ free_dirname = 1;
+ }
+
+ /* If directory_name contains globbing characters, then we
+ have to expand the previous levels. Just recurse. */
+ if (glob_pattern_p (directory_name))
+ {
+ char **directories;
+ register unsigned int i;
+
+ dflags = flags & ~GX_MARKDIRS;
+ if ((flags & GX_GLOBSTAR) && directory_name[0] == '*' && directory_name[1] == '*' && (directory_name[2] == '/' || directory_name[2] == '\0'))
+ dflags |= GX_ALLDIRS|GX_ADDCURDIR;
+
+ if (directory_name[directory_len - 1] == '/')
+ directory_name[directory_len - 1] = '\0';
+
+ directories = glob_filename (directory_name, dflags);
+
+ if (free_dirname)
+ {
+ free (directory_name);
+ directory_name = NULL;
+ }
+
+ if (directories == NULL)
+ goto memory_error;
+ else if (directories == (char **)&glob_error_return)
+ {
+ free ((char *) result);
+ return ((char **) &glob_error_return);
+ }
+ else if (*directories == NULL)
+ {
+ free ((char *) directories);
+ free ((char *) result);
+ return ((char **) &glob_error_return);
+ }
+
+ /* We have successfully globbed the preceding directory name.
+ For each name in DIRECTORIES, call glob_vector on it and
+ FILENAME. Concatenate the results together. */
+ for (i = 0; directories[i] != NULL; ++i)
+ {
+ char **temp_results;
+
+ /* XXX -- we've recursively scanned any directories resulting from
+ a `**', so turn off the flag. We turn it on again below if
+ filename is `**' */
+ /* Scan directory even on a NULL filename. That way, `*h/'
+ returns only directories ending in `h', instead of all
+ files ending in `h' with a `/' appended. */
+ dname = directories[i];
+ dflags = flags & ~(GX_MARKDIRS|GX_ALLDIRS|GX_ADDCURDIR);
+ if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
+ dflags |= GX_ALLDIRS|GX_ADDCURDIR;
+ if (dname[0] == '\0' && filename[0])
+ {
+ dflags |= GX_NULLDIR;
+ dname = "."; /* treat null directory name and non-null filename as current directory */
+ }
+ temp_results = glob_vector (filename, dname, dflags);
+
+ /* Handle error cases. */
+ if (temp_results == NULL)
+ goto memory_error;
+ else if (temp_results == (char **)&glob_error_return)
+ /* This filename is probably not a directory. Ignore it. */
+ ;
+ else
+ {
+ char **array;
+ register unsigned int l;
+
+ /* If we're expanding **, we don't need to glue the directory
+ name to the results; we've already done it in glob_vector */
+ if ((dflags & GX_ALLDIRS) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
+ array = temp_results;
+ else
+ array = glob_dir_to_array (directories[i], temp_results, flags);
+ l = 0;
+ while (array[l] != NULL)
+ ++l;
+
+ result =
+ (char **)realloc (result, (result_size + l) * sizeof (char *));
+
+ if (result == NULL)
+ goto memory_error;
+
+ for (l = 0; array[l] != NULL; ++l)
+ result[result_size++ - 1] = array[l];
+
+ result[result_size - 1] = NULL;
+
+ /* Note that the elements of ARRAY are not freed. */
+ if (array != temp_results)
+ free ((char *) array);
+ }
+ }
+ /* Free the directories. */
+ for (i = 0; directories[i]; i++)
+ free (directories[i]);
+
+ free ((char *) directories);
+
+ return (result);
+ }
+
+ /* If there is only a directory name, return it. */
+ if (*filename == '\0')
+ {
+ result = (char **) realloc ((char *) result, 2 * sizeof (char *));
+ if (result == NULL)
+ return (NULL);
+ /* Handle GX_MARKDIRS here. */
+ result[0] = (char *) malloc (directory_len + 1);
+ if (result[0] == NULL)
+ goto memory_error;
+ bcopy (directory_name, result[0], directory_len + 1);
+ if (free_dirname)
+ free (directory_name);
+ result[1] = NULL;
+ return (result);
+ }
+ else
+ {
+ char **temp_results;
+
+ /* There are no unquoted globbing characters in DIRECTORY_NAME.
+ Dequote it before we try to open the directory since there may
+ be quoted globbing characters which should be treated verbatim. */
+ if (directory_len > 0)
+ dequote_pathname (directory_name);
+
+ /* We allocated a small array called RESULT, which we won't be using.
+ Free that memory now. */
+ free (result);
+
+ /* Just return what glob_vector () returns appended to the
+ directory name. */
+ /* If flags & GX_ALLDIRS, we're called recursively */
+ dflags = flags & ~GX_MARKDIRS;
+ if (directory_len == 0)
+ dflags |= GX_NULLDIR;
+ if ((flags & GX_GLOBSTAR) && filename[0] == '*' && filename[1] == '*' && filename[2] == '\0')
+ {
+ dflags |= GX_ALLDIRS|GX_ADDCURDIR;
+#if 0
+ /* If we want all directories (dflags & GX_ALLDIRS) and we're not
+ being called recursively as something like `echo [star][star]/[star].o'
+ ((flags & GX_ALLDIRS) == 0), we want to prevent glob_vector from
+ adding a null directory name to the front of the temp_results
+ array. We turn off ADDCURDIR if not called recursively and
+ dlen == 0 */
+#endif
+ if (directory_len == 0 && (flags & GX_ALLDIRS) == 0)
+ dflags &= ~GX_ADDCURDIR;
+ }
+ temp_results = glob_vector (filename,
+ (directory_len == 0 ? "." : directory_name),
+ dflags);
+
+ if (temp_results == NULL || temp_results == (char **)&glob_error_return)
+ {
+ if (free_dirname)
+ free (directory_name);
+ return (temp_results);
+ }
+
+ result = glob_dir_to_array ((dflags & GX_ALLDIRS) ? "" : directory_name, temp_results, flags);
+ if (free_dirname)
+ free (directory_name);
+ return (result);
+ }
+
+ /* We get to memory_error if the program has run out of memory, or
+ if this is the shell, and we have been interrupted. */
+ memory_error:
+ if (result != NULL)
+ {
+ register unsigned int i;
+ for (i = 0; result[i] != NULL; ++i)
+ free (result[i]);
+ free ((char *) result);
+ }
+
+ if (free_dirname && directory_name)
+ free (directory_name);
+
+ QUIT;
+
+ return (NULL);
+}
+
+#if defined (TEST)
+
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ unsigned int i;
+
+ for (i = 1; i < argc; ++i)
+ {
+ char **value = glob_filename (argv[i], 0);
+ if (value == NULL)
+ puts ("Out of memory.");
+ else if (value == &glob_error_return)
+ perror (argv[i]);
+ else
+ for (i = 0; value[i] != NULL; i++)
+ puts (value[i]);
+ }
+
+ exit (0);
+}
+#endif /* TEST. */
diff --git a/lib/glob/glob.h b/lib/glob/glob.h
new file mode 100644
index 0000000..993ed70
--- /dev/null
+++ b/lib/glob/glob.h
@@ -0,0 +1,42 @@
+/* File-name wildcard pattern matching for GNU.
+ Copyright (C) 1985, 1988, 1989, 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne-Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _GLOB_H_
+#define _GLOB_H_
+
+#include "stdc.h"
+
+#define GX_MARKDIRS 0x001 /* mark directory names with trailing `/' */
+#define GX_NOCASE 0x002 /* ignore case */
+#define GX_MATCHDOT 0x004 /* match `.' literally */
+#define GX_MATCHDIRS 0x008 /* match only directory names */
+#define GX_ALLDIRS 0x010 /* match all directory names, no others */
+#define GX_NULLDIR 0x100 /* internal -- no directory preceding pattern */
+#define GX_ADDCURDIR 0x200 /* internal -- add passed directory name */
+#define GX_GLOBSTAR 0x400 /* turn on special handling of ** */
+
+extern int glob_pattern_p __P((const char *));
+extern char **glob_vector __P((char *, char *, int));
+extern char **glob_filename __P((char *, int));
+
+extern char *glob_error_return;
+extern int noglob_dot_filenames;
+extern int glob_ignore_case;
+
+#endif /* _GLOB_H_ */
diff --git a/lib/glob/glob_loop.c b/lib/glob/glob_loop.c
new file mode 100644
index 0000000..89e86af
--- /dev/null
+++ b/lib/glob/glob_loop.c
@@ -0,0 +1,67 @@
+/* Copyright (C) 1991-2005 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+static int INTERNAL_GLOB_PATTERN_P __P((const CHAR *));
+
+/* Return nonzero if PATTERN has any special globbing chars in it.
+ Compiled twice, once each for single-byte and multibyte characters. */
+static int
+INTERNAL_GLOB_PATTERN_P (pattern)
+ const CHAR *pattern;
+{
+ register const CHAR *p;
+ register CHAR c;
+ int bopen;
+
+ p = pattern;
+ bopen = 0;
+
+ while ((c = *p++) != L('\0'))
+ switch (c)
+ {
+ case L('?'):
+ case L('*'):
+ return 1;
+
+ case L('['): /* Only accept an open brace if there is a close */
+ bopen++; /* brace to match it. Bracket expressions must be */
+ continue; /* complete, according to Posix.2 */
+ case L(']'):
+ if (bopen)
+ return 1;
+ continue;
+
+ case L('+'): /* extended matching operators */
+ case L('@'):
+ case L('!'):
+ if (*p == L('(')) /*) */
+ return 1;
+ continue;
+
+ case L('\\'):
+ if (*p++ == L('\0'))
+ return 0;
+ }
+
+ return 0;
+}
+
+#undef INTERNAL_GLOB_PATTERN_P
+#undef L
+#undef INT
+#undef CHAR
diff --git a/lib/glob/ndir.h b/lib/glob/ndir.h
new file mode 100644
index 0000000..31261eb
--- /dev/null
+++ b/lib/glob/ndir.h
@@ -0,0 +1,50 @@
+/* <dir.h> -- definitions for 4.2BSD-compatible directory access.
+ last edit: 09-Jul-1983 D A Gwyn. */
+
+#if defined (VMS)
+# if !defined (FAB$C_BID)
+# include <fab.h>
+# endif
+# if !defined (NAM$C_BID)
+# include <nam.h>
+# endif
+# if !defined (RMS$_SUC)
+# include <rmsdef.h>
+# endif
+# include "dir.h"
+#endif /* VMS */
+
+/* Size of directory block. */
+#define DIRBLKSIZ 512
+
+/* NOTE: MAXNAMLEN must be one less than a multiple of 4 */
+
+#if defined (VMS)
+# define MAXNAMLEN (DIR$S_NAME + 7) /* 80 plus room for version #. */
+# define MAXFULLSPEC NAM$C_MAXRSS /* Maximum full spec */
+#else
+# define MAXNAMLEN 15 /* Maximum filename length. */
+#endif /* VMS */
+
+/* Data from readdir (). */
+struct direct {
+ long d_ino; /* Inode number of entry. */
+ unsigned short d_reclen; /* Length of this record. */
+ unsigned short d_namlen; /* Length of string in d_name. */
+ char d_name[MAXNAMLEN + 1]; /* Name of file. */
+};
+
+/* Stream data from opendir (). */
+typedef struct {
+ int dd_fd; /* File descriptor. */
+ int dd_loc; /* Offset in block. */
+ int dd_size; /* Amount of valid data. */
+ char dd_buf[DIRBLKSIZ]; /* Directory block. */
+} DIR;
+
+extern DIR *opendir ();
+extern struct direct *readdir ();
+extern long telldir ();
+extern void seekdir (), closedir ();
+
+#define rewinddir(dirp) seekdir (dirp, 0L)
diff --git a/lib/glob/sm_loop.c b/lib/glob/sm_loop.c
new file mode 100644
index 0000000..dfff06c
--- /dev/null
+++ b/lib/glob/sm_loop.c
@@ -0,0 +1,769 @@
+/* Copyright (C) 1991-2006 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+int FCT __P((CHAR *, CHAR *, int));
+
+static int GMATCH __P((CHAR *, CHAR *, CHAR *, CHAR *, int));
+static CHAR *PARSE_COLLSYM __P((CHAR *, INT *));
+static CHAR *BRACKMATCH __P((CHAR *, U_CHAR, int));
+static int EXTMATCH __P((INT, CHAR *, CHAR *, CHAR *, CHAR *, int));
+static CHAR *PATSCAN __P((CHAR *, CHAR *, INT));
+
+int
+FCT (pattern, string, flags)
+ CHAR *pattern;
+ CHAR *string;
+ int flags;
+{
+ CHAR *se, *pe;
+
+ if (string == 0 || pattern == 0)
+ return FNM_NOMATCH;
+
+ se = string + STRLEN ((XCHAR *)string);
+ pe = pattern + STRLEN ((XCHAR *)pattern);
+
+ return (GMATCH (string, se, pattern, pe, flags));
+}
+
+/* Match STRING against the filename pattern PATTERN, returning zero if
+ it matches, FNM_NOMATCH if not. */
+static int
+GMATCH (string, se, pattern, pe, flags)
+ CHAR *string, *se;
+ CHAR *pattern, *pe;
+ int flags;
+{
+ CHAR *p, *n; /* pattern, string */
+ INT c; /* current pattern character - XXX U_CHAR? */
+ INT sc; /* current string character - XXX U_CHAR? */
+
+ p = pattern;
+ n = string;
+
+ if (string == 0 || pattern == 0)
+ return FNM_NOMATCH;
+
+#if DEBUG_MATCHING
+fprintf(stderr, "gmatch: string = %s; se = %s\n", string, se);
+fprintf(stderr, "gmatch: pattern = %s; pe = %s\n", pattern, pe);
+#endif
+
+ while (p < pe)
+ {
+ c = *p++;
+ c = FOLD (c);
+
+ sc = n < se ? *n : '\0';
+
+#ifdef EXTENDED_GLOB
+ /* EXTMATCH () will handle recursively calling GMATCH, so we can
+ just return what EXTMATCH() returns. */
+ if ((flags & FNM_EXTMATCH) && *p == L('(') &&
+ (c == L('+') || c == L('*') || c == L('?') || c == L('@') || c == L('!'))) /* ) */
+ {
+ int lflags;
+ /* If we're not matching the start of the string, we're not
+ concerned about the special cases for matching `.' */
+ lflags = (n == string) ? flags : (flags & ~FNM_PERIOD);
+ return (EXTMATCH (c, n, se, p, pe, lflags));
+ }
+#endif /* EXTENDED_GLOB */
+
+ switch (c)
+ {
+ case L('?'): /* Match single character */
+ if (sc == '\0')
+ return FNM_NOMATCH;
+ else if ((flags & FNM_PATHNAME) && sc == L('/'))
+ /* If we are matching a pathname, `?' can never match a `/'. */
+ return FNM_NOMATCH;
+ else if ((flags & FNM_PERIOD) && sc == L('.') &&
+ (n == string || ((flags & FNM_PATHNAME) && n[-1] == L('/'))))
+ /* `?' cannot match a `.' if it is the first character of the
+ string or if it is the first character following a slash and
+ we are matching a pathname. */
+ return FNM_NOMATCH;
+ break;
+
+ case L('\\'): /* backslash escape removes special meaning */
+ if (p == pe)
+ return FNM_NOMATCH;
+
+ if ((flags & FNM_NOESCAPE) == 0)
+ {
+ c = *p++;
+ /* A trailing `\' cannot match. */
+ if (p > pe)
+ return FNM_NOMATCH;
+ c = FOLD (c);
+ }
+ if (FOLD (sc) != (U_CHAR)c)
+ return FNM_NOMATCH;
+ break;
+
+ case '*': /* Match zero or more characters */
+ if (p == pe)
+ return 0;
+
+ if ((flags & FNM_PERIOD) && sc == L('.') &&
+ (n == string || ((flags & FNM_PATHNAME) && n[-1] == L('/'))))
+ /* `*' cannot match a `.' if it is the first character of the
+ string or if it is the first character following a slash and
+ we are matching a pathname. */
+ return FNM_NOMATCH;
+
+ /* Collapse multiple consecutive `*' and `?', but make sure that
+ one character of the string is consumed for each `?'. */
+ for (c = *p++; (c == L('?') || c == L('*')); c = *p++)
+ {
+ if ((flags & FNM_PATHNAME) && sc == L('/'))
+ /* A slash does not match a wildcard under FNM_PATHNAME. */
+ return FNM_NOMATCH;
+#ifdef EXTENDED_GLOB
+ else if ((flags & FNM_EXTMATCH) && c == L('?') && *p == L('(')) /* ) */
+ {
+ CHAR *newn;
+ for (newn = n; newn < se; ++newn)
+ {
+ if (EXTMATCH (c, newn, se, p, pe, flags) == 0)
+ return (0);
+ }
+ /* We didn't match. If we have a `?(...)', that's failure. */
+ return FNM_NOMATCH;
+ }
+#endif
+ else if (c == L('?'))
+ {
+ if (sc == L('\0'))
+ return FNM_NOMATCH;
+ /* One character of the string is consumed in matching
+ this ? wildcard, so *??? won't match if there are
+ fewer than three characters. */
+ n++;
+ sc = n < se ? *n : '\0';
+ }
+
+#ifdef EXTENDED_GLOB
+ /* Handle ******(patlist) */
+ if ((flags & FNM_EXTMATCH) && c == L('*') && *p == L('(')) /*)*/
+ {
+ CHAR *newn;
+ /* We need to check whether or not the extended glob
+ pattern matches the remainder of the string.
+ If it does, we match the entire pattern. */
+ for (newn = n; newn < se; ++newn)
+ {
+ if (EXTMATCH (c, newn, se, p, pe, flags) == 0)
+ return (0);
+ }
+ /* We didn't match the extended glob pattern, but
+ that's OK, since we can match 0 or more occurrences.
+ We need to skip the glob pattern and see if we
+ match the rest of the string. */
+ newn = PATSCAN (p + 1, pe, 0);
+ /* If NEWN is 0, we have an ill-formed pattern. */
+ p = newn ? newn : pe;
+ }
+#endif
+ if (p == pe)
+ break;
+ }
+
+ /* If we've hit the end of the pattern and the last character of
+ the pattern was handled by the loop above, we've succeeded.
+ Otherwise, we need to match that last character. */
+ if (p == pe && (c == L('?') || c == L('*')))
+ return (0);
+
+ /* General case, use recursion. */
+ {
+ U_CHAR c1;
+
+ c1 = ((flags & FNM_NOESCAPE) == 0 && c == L('\\')) ? *p : c;
+ c1 = FOLD (c1);
+ for (--p; n < se; ++n)
+ {
+ /* Only call strmatch if the first character indicates a
+ possible match. We can check the first character if
+ we're not doing an extended glob match. */
+ if ((flags & FNM_EXTMATCH) == 0 && c != L('[') && FOLD (*n) != c1) /*]*/
+ continue;
+
+ /* If we're doing an extended glob match and the pattern is not
+ one of the extended glob patterns, we can check the first
+ character. */
+ if ((flags & FNM_EXTMATCH) && p[1] != L('(') && /*)*/
+ STRCHR (L("?*+@!"), *p) == 0 && c != L('[') && FOLD (*n) != c1) /*]*/
+ continue;
+
+ /* Otherwise, we just recurse. */
+ if (GMATCH (n, se, p, pe, flags & ~FNM_PERIOD) == 0)
+ return (0);
+ }
+ return FNM_NOMATCH;
+ }
+
+ case L('['):
+ {
+ if (sc == L('\0') || n == se)
+ return FNM_NOMATCH;
+
+ /* A character class cannot match a `.' if it is the first
+ character of the string or if it is the first character
+ following a slash and we are matching a pathname. */
+ if ((flags & FNM_PERIOD) && sc == L('.') &&
+ (n == string || ((flags & FNM_PATHNAME) && n[-1] == L('/'))))
+ return (FNM_NOMATCH);
+
+ p = BRACKMATCH (p, sc, flags);
+ if (p == 0)
+ return FNM_NOMATCH;
+ }
+ break;
+
+ default:
+ if ((U_CHAR)c != FOLD (sc))
+ return (FNM_NOMATCH);
+ }
+
+ ++n;
+ }
+
+ if (n == se)
+ return (0);
+
+ if ((flags & FNM_LEADING_DIR) && *n == L('/'))
+ /* The FNM_LEADING_DIR flag says that "foo*" matches "foobar/frobozz". */
+ return 0;
+
+ return (FNM_NOMATCH);
+}
+
+/* Parse a bracket expression collating symbol ([.sym.]) starting at P, find
+ the value of the symbol, and move P past the collating symbol expression.
+ The value is returned in *VP, if VP is not null. */
+static CHAR *
+PARSE_COLLSYM (p, vp)
+ CHAR *p;
+ INT *vp;
+{
+ register int pc;
+ INT val;
+
+ p++; /* move past the `.' */
+
+ for (pc = 0; p[pc]; pc++)
+ if (p[pc] == L('.') && p[pc+1] == L(']'))
+ break;
+ val = COLLSYM (p, pc);
+ if (vp)
+ *vp = val;
+ return (p + pc + 2);
+}
+
+/* Use prototype definition here because of type promotion. */
+static CHAR *
+#if defined (PROTOTYPES)
+BRACKMATCH (CHAR *p, U_CHAR test, int flags)
+#else
+BRACKMATCH (p, test, flags)
+ CHAR *p;
+ U_CHAR test;
+ int flags;
+#endif
+{
+ register CHAR cstart, cend, c;
+ register int not; /* Nonzero if the sense of the character class is inverted. */
+ int brcnt;
+ INT pc;
+ CHAR *savep;
+
+ test = FOLD (test);
+
+ savep = p;
+
+ /* POSIX.2 3.13.1 says that an exclamation mark (`!') shall replace the
+ circumflex (`^') in its role in a `nonmatching list'. A bracket
+ expression starting with an unquoted circumflex character produces
+ unspecified results. This implementation treats the two identically. */
+ if (not = (*p == L('!') || *p == L('^')))
+ ++p;
+
+ c = *p++;
+ for (;;)
+ {
+ /* Initialize cstart and cend in case `-' is the last
+ character of the pattern. */
+ cstart = cend = c;
+
+ /* POSIX.2 equivalence class: [=c=]. See POSIX.2 2.8.3.2. Find
+ the end of the equivalence class, move the pattern pointer past
+ it, and check for equivalence. XXX - this handles only
+ single-character equivalence classes, which is wrong, or at
+ least incomplete. */
+ if (c == L('[') && *p == L('=') && p[2] == L('=') && p[3] == L(']'))
+ {
+ pc = FOLD (p[1]);
+ p += 4;
+ if (COLLEQUIV (test, pc))
+ {
+/*[*/ /* Move past the closing `]', since the first thing we do at
+ the `matched:' label is back p up one. */
+ p++;
+ goto matched;
+ }
+ else
+ {
+ c = *p++;
+ if (c == L('\0'))
+ return ((test == L('[')) ? savep : (CHAR *)0); /*]*/
+ c = FOLD (c);
+ continue;
+ }
+ }
+
+ /* POSIX.2 character class expression. See POSIX.2 2.8.3.2. */
+ if (c == L('[') && *p == L(':'))
+ {
+ CHAR *close, *ccname;
+
+ pc = 0; /* make sure invalid char classes don't match. */
+ /* Find end of character class name */
+ for (close = p + 1; *close != '\0'; close++)
+ if (*close == L(':') && *(close+1) == L(']'))
+ break;
+
+ if (*close != L('\0'))
+ {
+ ccname = (CHAR *)malloc ((close - p) * sizeof (CHAR));
+ if (ccname == 0)
+ pc = 0;
+ else
+ {
+ bcopy (p + 1, ccname, (close - p - 1) * sizeof (CHAR));
+ *(ccname + (close - p - 1)) = L('\0');
+ pc = IS_CCLASS (test, (XCHAR *)ccname);
+ }
+ if (pc == -1)
+ pc = 0;
+ else
+ p = close + 2;
+
+ free (ccname);
+ }
+
+ if (pc)
+ {
+/*[*/ /* Move past the closing `]', since the first thing we do at
+ the `matched:' label is back p up one. */
+ p++;
+ goto matched;
+ }
+ else
+ {
+ /* continue the loop here, since this expression can't be
+ the first part of a range expression. */
+ c = *p++;
+ if (c == L('\0'))
+ return ((test == L('[')) ? savep : (CHAR *)0);
+ else if (c == L(']'))
+ break;
+ c = FOLD (c);
+ continue;
+ }
+ }
+
+ /* POSIX.2 collating symbols. See POSIX.2 2.8.3.2. Find the end of
+ the symbol name, make sure it is terminated by `.]', translate
+ the name to a character using the external table, and do the
+ comparison. */
+ if (c == L('[') && *p == L('.'))
+ {
+ p = PARSE_COLLSYM (p, &pc);
+ /* An invalid collating symbol cannot be the first point of a
+ range. If it is, we set cstart to one greater than `test',
+ so any comparisons later will fail. */
+ cstart = (pc == INVALID) ? test + 1 : pc;
+ }
+
+ if (!(flags & FNM_NOESCAPE) && c == L('\\'))
+ {
+ if (*p == '\0')
+ return (CHAR *)0;
+ cstart = cend = *p++;
+ }
+
+ cstart = cend = FOLD (cstart);
+
+ /* POSIX.2 2.8.3.1.2 says: `An expression containing a `[' that
+ is not preceded by a backslash and is not part of a bracket
+ expression produces undefined results.' This implementation
+ treats the `[' as just a character to be matched if there is
+ not a closing `]'. */
+ if (c == L('\0'))
+ return ((test == L('[')) ? savep : (CHAR *)0);
+
+ c = *p++;
+ c = FOLD (c);
+
+ if ((flags & FNM_PATHNAME) && c == L('/'))
+ /* [/] can never match when matching a pathname. */
+ return (CHAR *)0;
+
+ /* This introduces a range, unless the `-' is the last
+ character of the class. Find the end of the range
+ and move past it. */
+ if (c == L('-') && *p != L(']'))
+ {
+ cend = *p++;
+ if (!(flags & FNM_NOESCAPE) && cend == L('\\'))
+ cend = *p++;
+ if (cend == L('\0'))
+ return (CHAR *)0;
+ if (cend == L('[') && *p == L('.'))
+ {
+ p = PARSE_COLLSYM (p, &pc);
+ /* An invalid collating symbol cannot be the second part of a
+ range expression. If we get one, we set cend to one fewer
+ than the test character to make sure the range test fails. */
+ cend = (pc == INVALID) ? test - 1 : pc;
+ }
+ cend = FOLD (cend);
+
+ c = *p++;
+
+ /* POSIX.2 2.8.3.2: ``The ending range point shall collate
+ equal to or higher than the starting range point; otherwise
+ the expression shall be treated as invalid.'' Note that this
+ applies to only the range expression; the rest of the bracket
+ expression is still checked for matches. */
+ if (RANGECMP (cstart, cend) > 0)
+ {
+ if (c == L(']'))
+ break;
+ c = FOLD (c);
+ continue;
+ }
+ }
+
+ if (RANGECMP (test, cstart) >= 0 && RANGECMP (test, cend) <= 0)
+ goto matched;
+
+ if (c == L(']'))
+ break;
+ }
+ /* No match. */
+ return (!not ? (CHAR *)0 : p);
+
+matched:
+ /* Skip the rest of the [...] that already matched. */
+ c = *--p;
+ brcnt = 1;
+ while (brcnt > 0)
+ {
+ /* A `[' without a matching `]' is just another character to match. */
+ if (c == L('\0'))
+ return ((test == L('[')) ? savep : (CHAR *)0);
+
+ c = *p++;
+ if (c == L('[') && (*p == L('=') || *p == L(':') || *p == L('.')))
+ brcnt++;
+ else if (c == L(']'))
+ brcnt--;
+ else if (!(flags & FNM_NOESCAPE) && c == L('\\'))
+ {
+ if (*p == '\0')
+ return (CHAR *)0;
+ /* XXX 1003.2d11 is unclear if this is right. */
+ ++p;
+ }
+ }
+ return (not ? (CHAR *)0 : p);
+}
+
+#if defined (EXTENDED_GLOB)
+/* ksh-like extended pattern matching:
+
+ [?*+@!](pat-list)
+
+ where pat-list is a list of one or patterns separated by `|'. Operation
+ is as follows:
+
+ ?(patlist) match zero or one of the given patterns
+ *(patlist) match zero or more of the given patterns
+ +(patlist) match one or more of the given patterns
+ @(patlist) match exactly one of the given patterns
+ !(patlist) match anything except one of the given patterns
+*/
+
+/* Scan a pattern starting at STRING and ending at END, keeping track of
+ embedded () and []. If DELIM is 0, we scan until a matching `)'
+ because we're scanning a `patlist'. Otherwise, we scan until we see
+ DELIM. In all cases, we never scan past END. The return value is the
+ first character after the matching DELIM. */
+static CHAR *
+PATSCAN (string, end, delim)
+ CHAR *string, *end;
+ INT delim;
+{
+ int pnest, bnest, skip;
+ INT cchar;
+ CHAR *s, c, *bfirst;
+
+ pnest = bnest = skip = 0;
+ cchar = 0;
+ bfirst = NULL;
+
+ for (s = string; c = *s; s++)
+ {
+ if (s >= end)
+ return (s);
+ if (skip)
+ {
+ skip = 0;
+ continue;
+ }
+ switch (c)
+ {
+ case L('\\'):
+ skip = 1;
+ break;
+
+ case L('\0'):
+ return ((CHAR *)NULL);
+
+ /* `[' is not special inside a bracket expression, but it may
+ introduce one of the special POSIX bracket expressions
+ ([.SYM.], [=c=], [: ... :]) that needs special handling. */
+ case L('['):
+ if (bnest == 0)
+ {
+ bfirst = s + 1;
+ if (*bfirst == L('!') || *bfirst == L('^'))
+ bfirst++;
+ bnest++;
+ }
+ else if (s[1] == L(':') || s[1] == L('.') || s[1] == L('='))
+ cchar = s[1];
+ break;
+
+ /* `]' is not special if it's the first char (after a leading `!'
+ or `^') in a bracket expression or if it's part of one of the
+ special POSIX bracket expressions ([.SYM.], [=c=], [: ... :]) */
+ case L(']'):
+ if (bnest)
+ {
+ if (cchar && s[-1] == cchar)
+ cchar = 0;
+ else if (s != bfirst)
+ {
+ bnest--;
+ bfirst = 0;
+ }
+ }
+ break;
+
+ case L('('):
+ if (bnest == 0)
+ pnest++;
+ break;
+
+ case L(')'):
+ if (bnest == 0 && pnest-- <= 0)
+ return ++s;
+ break;
+
+ case L('|'):
+ if (bnest == 0 && pnest == 0 && delim == L('|'))
+ return ++s;
+ break;
+ }
+ }
+
+ return (NULL);
+}
+
+/* Return 0 if dequoted pattern matches S in the current locale. */
+static int
+STRCOMPARE (p, pe, s, se)
+ CHAR *p, *pe, *s, *se;
+{
+ int ret;
+ CHAR c1, c2;
+
+ c1 = *pe;
+ c2 = *se;
+
+ *pe = *se = '\0';
+#if HAVE_MULTIBYTE || defined (HAVE_STRCOLL)
+ ret = STRCOLL ((XCHAR *)p, (XCHAR *)s);
+#else
+ ret = STRCMP ((XCHAR *)p, (XCHAR *)s);
+#endif
+
+ *pe = c1;
+ *se = c2;
+
+ return (ret == 0 ? ret : FNM_NOMATCH);
+}
+
+/* Match a ksh extended pattern specifier. Return FNM_NOMATCH on failure or
+ 0 on success. This is handed the entire rest of the pattern and string
+ the first time an extended pattern specifier is encountered, so it calls
+ gmatch recursively. */
+static int
+EXTMATCH (xc, s, se, p, pe, flags)
+ INT xc; /* select which operation */
+ CHAR *s, *se;
+ CHAR *p, *pe;
+ int flags;
+{
+ CHAR *prest; /* pointer to rest of pattern */
+ CHAR *psub; /* pointer to sub-pattern */
+ CHAR *pnext; /* pointer to next sub-pattern */
+ CHAR *srest; /* pointer to rest of string */
+ int m1, m2, xflags; /* xflags = flags passed to recursive matches */
+
+#if DEBUG_MATCHING
+fprintf(stderr, "extmatch: xc = %c\n", xc);
+fprintf(stderr, "extmatch: s = %s; se = %s\n", s, se);
+fprintf(stderr, "extmatch: p = %s; pe = %s\n", p, pe);
+fprintf(stderr, "extmatch: flags = %d\n", flags);
+#endif
+
+ prest = PATSCAN (p + (*p == L('(')), pe, 0); /* ) */
+ if (prest == 0)
+ /* If PREST is 0, we failed to scan a valid pattern. In this
+ case, we just want to compare the two as strings. */
+ return (STRCOMPARE (p - 1, pe, s, se));
+
+ switch (xc)
+ {
+ case L('+'): /* match one or more occurrences */
+ case L('*'): /* match zero or more occurrences */
+ /* If we can get away with no matches, don't even bother. Just
+ call GMATCH on the rest of the pattern and return success if
+ it succeeds. */
+ if (xc == L('*') && (GMATCH (s, se, prest, pe, flags) == 0))
+ return 0;
+
+ /* OK, we have to do this the hard way. First, we make sure one of
+ the subpatterns matches, then we try to match the rest of the
+ string. */
+ for (psub = p + 1; ; psub = pnext)
+ {
+ pnext = PATSCAN (psub, pe, L('|'));
+ for (srest = s; srest <= se; srest++)
+ {
+ /* Match this substring (S -> SREST) against this
+ subpattern (psub -> pnext - 1) */
+ m1 = GMATCH (s, srest, psub, pnext - 1, flags) == 0;
+ /* OK, we matched a subpattern, so make sure the rest of the
+ string matches the rest of the pattern. Also handle
+ multiple matches of the pattern. */
+ if (m1)
+ {
+ /* if srest > s, we are not at start of string */
+ xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags;
+ m2 = (GMATCH (srest, se, prest, pe, xflags) == 0) ||
+ (s != srest && GMATCH (srest, se, p - 1, pe, xflags) == 0);
+ }
+ if (m1 && m2)
+ return (0);
+ }
+ if (pnext == prest)
+ break;
+ }
+ return (FNM_NOMATCH);
+
+ case L('?'): /* match zero or one of the patterns */
+ case L('@'): /* match one (or more) of the patterns */
+ /* If we can get away with no matches, don't even bother. Just
+ call gmatch on the rest of the pattern and return success if
+ it succeeds. */
+ if (xc == L('?') && (GMATCH (s, se, prest, pe, flags) == 0))
+ return 0;
+
+ /* OK, we have to do this the hard way. First, we see if one of
+ the subpatterns matches, then, if it does, we try to match the
+ rest of the string. */
+ for (psub = p + 1; ; psub = pnext)
+ {
+ pnext = PATSCAN (psub, pe, L('|'));
+ srest = (prest == pe) ? se : s;
+ for ( ; srest <= se; srest++)
+ {
+ /* if srest > s, we are not at start of string */
+ xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags;
+ if (GMATCH (s, srest, psub, pnext - 1, flags) == 0 &&
+ GMATCH (srest, se, prest, pe, xflags) == 0)
+ return (0);
+ }
+ if (pnext == prest)
+ break;
+ }
+ return (FNM_NOMATCH);
+
+ case '!': /* match anything *except* one of the patterns */
+ for (srest = s; srest <= se; srest++)
+ {
+ m1 = 0;
+ for (psub = p + 1; ; psub = pnext)
+ {
+ pnext = PATSCAN (psub, pe, L('|'));
+ /* If one of the patterns matches, just bail immediately. */
+ if (m1 = (GMATCH (s, srest, psub, pnext - 1, flags) == 0))
+ break;
+ if (pnext == prest)
+ break;
+ }
+ /* if srest > s, we are not at start of string */
+ xflags = (srest > s) ? (flags & ~FNM_PERIOD) : flags;
+ if (m1 == 0 && GMATCH (srest, se, prest, pe, xflags) == 0)
+ return (0);
+ }
+ return (FNM_NOMATCH);
+ }
+
+ return (FNM_NOMATCH);
+}
+#endif /* EXTENDED_GLOB */
+
+#undef IS_CCLASS
+#undef FOLD
+#undef CHAR
+#undef U_CHAR
+#undef XCHAR
+#undef INT
+#undef INVALID
+#undef FCT
+#undef GMATCH
+#undef COLLSYM
+#undef PARSE_COLLSYM
+#undef PATSCAN
+#undef STRCOMPARE
+#undef EXTMATCH
+#undef BRACKMATCH
+#undef STRCHR
+#undef STRCOLL
+#undef STRLEN
+#undef STRCMP
+#undef COLLEQUIV
+#undef RANGECMP
+#undef L
diff --git a/lib/glob/smatch.c b/lib/glob/smatch.c
new file mode 100644
index 0000000..11d86b0
--- /dev/null
+++ b/lib/glob/smatch.c
@@ -0,0 +1,392 @@
+/* strmatch.c -- ksh-like extended pattern matching for the shell and filename
+ globbing. */
+
+/* Copyright (C) 1991-2005 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <stdio.h> /* for debugging */
+
+#include "strmatch.h"
+#include <chartypes.h>
+
+#include "bashansi.h"
+#include "shmbutil.h"
+#include "xmalloc.h"
+
+/* First, compile `sm_loop.c' for single-byte characters. */
+#define CHAR unsigned char
+#define U_CHAR unsigned char
+#define XCHAR char
+#define INT int
+#define L(CS) CS
+#define INVALID -1
+
+#undef STREQ
+#undef STREQN
+#define STREQ(a, b) ((a)[0] == (b)[0] && strcmp(a, b) == 0)
+#define STREQN(a, b, n) ((a)[0] == (b)[0] && strncmp(a, b, n) == 0)
+
+/* We use strcoll(3) for range comparisons in bracket expressions,
+ even though it can have unwanted side effects in locales
+ other than POSIX or US. For instance, in the de locale, [A-Z] matches
+ all characters. */
+
+#if defined (HAVE_STRCOLL)
+/* Helper function for collating symbol equivalence. */
+static int rangecmp (c1, c2)
+ int c1, c2;
+{
+ static char s1[2] = { ' ', '\0' };
+ static char s2[2] = { ' ', '\0' };
+ int ret;
+
+ /* Eight bits only. Period. */
+ c1 &= 0xFF;
+ c2 &= 0xFF;
+
+ if (c1 == c2)
+ return (0);
+
+ s1[0] = c1;
+ s2[0] = c2;
+
+ if ((ret = strcoll (s1, s2)) != 0)
+ return ret;
+ return (c1 - c2);
+}
+#else /* !HAVE_STRCOLL */
+# define rangecmp(c1, c2) ((int)(c1) - (int)(c2))
+#endif /* !HAVE_STRCOLL */
+
+#if defined (HAVE_STRCOLL)
+static int
+collequiv (c1, c2)
+ int c1, c2;
+{
+ return (rangecmp (c1, c2) == 0);
+}
+#else
+# define collequiv(c1, c2) ((c1) == (c2))
+#endif
+
+#define _COLLSYM _collsym
+#define __COLLSYM __collsym
+#define POSIXCOLL posix_collsyms
+#include "collsyms.h"
+
+static int
+collsym (s, len)
+ CHAR *s;
+ int len;
+{
+ register struct _collsym *csp;
+ char *x;
+
+ x = (char *)s;
+ for (csp = posix_collsyms; csp->name; csp++)
+ {
+ if (STREQN(csp->name, x, len) && csp->name[len] == '\0')
+ return (csp->code);
+ }
+ if (len == 1)
+ return s[0];
+ return INVALID;
+}
+
+/* unibyte character classification */
+#if !defined (isascii) && !defined (HAVE_ISASCII)
+# define isascii(c) ((unsigned int)(c) <= 0177)
+#endif
+
+enum char_class
+ {
+ CC_NO_CLASS = 0,
+ CC_ASCII, CC_ALNUM, CC_ALPHA, CC_BLANK, CC_CNTRL, CC_DIGIT, CC_GRAPH,
+ CC_LOWER, CC_PRINT, CC_PUNCT, CC_SPACE, CC_UPPER, CC_WORD, CC_XDIGIT
+ };
+
+static char const *const cclass_name[] =
+ {
+ "",
+ "ascii", "alnum", "alpha", "blank", "cntrl", "digit", "graph",
+ "lower", "print", "punct", "space", "upper", "word", "xdigit"
+ };
+
+#define N_CHAR_CLASS (sizeof(cclass_name) / sizeof (cclass_name[0]))
+
+static int
+is_cclass (c, name)
+ int c;
+ const char *name;
+{
+ enum char_class char_class = CC_NO_CLASS;
+ int i, result;
+
+ for (i = 1; i < N_CHAR_CLASS; i++)
+ {
+ if (STREQ (name, cclass_name[i]))
+ {
+ char_class = (enum char_class)i;
+ break;
+ }
+ }
+
+ if (char_class == 0)
+ return -1;
+
+ switch (char_class)
+ {
+ case CC_ASCII:
+ result = isascii (c);
+ break;
+ case CC_ALNUM:
+ result = ISALNUM (c);
+ break;
+ case CC_ALPHA:
+ result = ISALPHA (c);
+ break;
+ case CC_BLANK:
+ result = ISBLANK (c);
+ break;
+ case CC_CNTRL:
+ result = ISCNTRL (c);
+ break;
+ case CC_DIGIT:
+ result = ISDIGIT (c);
+ break;
+ case CC_GRAPH:
+ result = ISGRAPH (c);
+ break;
+ case CC_LOWER:
+ result = ISLOWER (c);
+ break;
+ case CC_PRINT:
+ result = ISPRINT (c);
+ break;
+ case CC_PUNCT:
+ result = ISPUNCT (c);
+ break;
+ case CC_SPACE:
+ result = ISSPACE (c);
+ break;
+ case CC_UPPER:
+ result = ISUPPER (c);
+ break;
+ case CC_WORD:
+ result = (ISALNUM (c) || c == '_');
+ break;
+ case CC_XDIGIT:
+ result = ISXDIGIT (c);
+ break;
+ default:
+ result = -1;
+ break;
+ }
+
+ return result;
+}
+
+/* Now include `sm_loop.c' for single-byte characters. */
+/* The result of FOLD is an `unsigned char' */
+# define FOLD(c) ((flags & FNM_CASEFOLD) \
+ ? TOLOWER ((unsigned char)c) \
+ : ((unsigned char)c))
+
+#define FCT internal_strmatch
+#define GMATCH gmatch
+#define COLLSYM collsym
+#define PARSE_COLLSYM parse_collsym
+#define BRACKMATCH brackmatch
+#define PATSCAN patscan
+#define STRCOMPARE strcompare
+#define EXTMATCH extmatch
+#define STRCHR(S, C) strchr((S), (C))
+#define STRCOLL(S1, S2) strcoll((S1), (S2))
+#define STRLEN(S) strlen(S)
+#define STRCMP(S1, S2) strcmp((S1), (S2))
+#define RANGECMP(C1, C2) rangecmp((C1), (C2))
+#define COLLEQUIV(C1, C2) collequiv((C1), (C2))
+#define CTYPE_T enum char_class
+#define IS_CCLASS(C, S) is_cclass((C), (S))
+#include "sm_loop.c"
+
+#if HANDLE_MULTIBYTE
+
+# define CHAR wchar_t
+# define U_CHAR wint_t
+# define XCHAR wchar_t
+# define INT wint_t
+# define L(CS) L##CS
+# define INVALID WEOF
+
+# undef STREQ
+# undef STREQN
+# define STREQ(s1, s2) ((wcscmp (s1, s2) == 0))
+# define STREQN(a, b, n) ((a)[0] == (b)[0] && wcsncmp(a, b, n) == 0)
+
+static int
+rangecmp_wc (c1, c2)
+ wint_t c1, c2;
+{
+ static wchar_t s1[2] = { L' ', L'\0' };
+ static wchar_t s2[2] = { L' ', L'\0' };
+
+ if (c1 == c2)
+ return 0;
+
+ s1[0] = c1;
+ s2[0] = c2;
+
+ return (wcscoll (s1, s2));
+}
+
+static int
+collequiv_wc (c, equiv)
+ wint_t c, equiv;
+{
+ return (!(c - equiv));
+}
+
+/* Helper function for collating symbol. */
+# define _COLLSYM _collwcsym
+# define __COLLSYM __collwcsym
+# define POSIXCOLL posix_collwcsyms
+# include "collsyms.h"
+
+static wint_t
+collwcsym (s, len)
+ wchar_t *s;
+ int len;
+{
+ register struct _collwcsym *csp;
+
+ for (csp = posix_collwcsyms; csp->name; csp++)
+ {
+ if (STREQN(csp->name, s, len) && csp->name[len] == L'\0')
+ return (csp->code);
+ }
+ if (len == 1)
+ return s[0];
+ return INVALID;
+}
+
+static int
+is_wcclass (wc, name)
+ wint_t wc;
+ wchar_t *name;
+{
+ char *mbs;
+ mbstate_t state;
+ size_t mbslength;
+ wctype_t desc;
+ int want_word;
+
+ if ((wctype ("ascii") == (wctype_t)0) && (wcscmp (name, L"ascii") == 0))
+ {
+ int c;
+
+ if ((c = wctob (wc)) == EOF)
+ return 0;
+ else
+ return (c <= 0x7F);
+ }
+
+ want_word = (wcscmp (name, L"word") == 0);
+ if (want_word)
+ name = L"alnum";
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ mbs = (char *) malloc (wcslen(name) * MB_CUR_MAX + 1);
+ mbslength = wcsrtombs(mbs, (const wchar_t **)&name, (wcslen(name) * MB_CUR_MAX + 1), &state);
+
+ if (mbslength == (size_t)-1 || mbslength == (size_t)-2)
+ {
+ free (mbs);
+ return -1;
+ }
+ desc = wctype (mbs);
+ free (mbs);
+
+ if (desc == (wctype_t)0)
+ return -1;
+
+ if (want_word)
+ return (iswctype (wc, desc) || wc == L'_');
+ else
+ return (iswctype (wc, desc));
+}
+
+/* Now include `sm_loop.c' for multibyte characters. */
+#define FOLD(c) ((flags & FNM_CASEFOLD) && iswupper (c) ? towlower (c) : (c))
+#define FCT internal_wstrmatch
+#define GMATCH gmatch_wc
+#define COLLSYM collwcsym
+#define PARSE_COLLSYM parse_collwcsym
+#define BRACKMATCH brackmatch_wc
+#define PATSCAN patscan_wc
+#define STRCOMPARE wscompare
+#define EXTMATCH extmatch_wc
+#define STRCHR(S, C) wcschr((S), (C))
+#define STRCOLL(S1, S2) wcscoll((S1), (S2))
+#define STRLEN(S) wcslen(S)
+#define STRCMP(S1, S2) wcscmp((S1), (S2))
+#define RANGECMP(C1, C2) rangecmp_wc((C1), (C2))
+#define COLLEQUIV(C1, C2) collequiv_wc((C1), (C2))
+#define CTYPE_T enum char_class
+#define IS_CCLASS(C, S) is_wcclass((C), (S))
+#include "sm_loop.c"
+
+#endif /* HAVE_MULTIBYTE */
+
+int
+xstrmatch (pattern, string, flags)
+ char *pattern;
+ char *string;
+ int flags;
+{
+#if HANDLE_MULTIBYTE
+ int ret;
+ size_t n;
+ wchar_t *wpattern, *wstring;
+
+ if (MB_CUR_MAX == 1)
+ return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags));
+
+ n = xdupmbstowcs (&wpattern, NULL, pattern);
+ if (n == (size_t)-1 || n == (size_t)-2)
+ return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags));
+
+ n = xdupmbstowcs (&wstring, NULL, string);
+ if (n == (size_t)-1 || n == (size_t)-2)
+ {
+ free (wpattern);
+ return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags));
+ }
+
+ ret = internal_wstrmatch (wpattern, wstring, flags);
+
+ free (wpattern);
+ free (wstring);
+
+ return ret;
+#else
+ return (internal_strmatch ((unsigned char *)pattern, (unsigned char *)string, flags));
+#endif /* !HANDLE_MULTIBYTE */
+}
diff --git a/lib/glob/strmatch.c b/lib/glob/strmatch.c
new file mode 100644
index 0000000..cea9bd8
--- /dev/null
+++ b/lib/glob/strmatch.c
@@ -0,0 +1,79 @@
+/* strmatch.c -- ksh-like extended pattern matching for the shell and filename
+ globbing. */
+
+/* Copyright (C) 1991-2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include "stdc.h"
+#include "strmatch.h"
+
+extern int xstrmatch __P((char *, char *, int));
+#if defined (HANDLE_MULTIBYTE)
+extern int internal_wstrmatch __P((wchar_t *, wchar_t *, int));
+#endif
+
+int
+strmatch (pattern, string, flags)
+ char *pattern;
+ char *string;
+ int flags;
+{
+ if (string == 0 || pattern == 0)
+ return FNM_NOMATCH;
+
+ return (xstrmatch (pattern, string, flags));
+}
+
+#if defined (HANDLE_MULTIBYTE)
+int
+wcsmatch (wpattern, wstring, flags)
+ wchar_t *wpattern;
+ wchar_t *wstring;
+ int flags;
+{
+ if (wstring == 0 || wpattern == 0)
+ return (FNM_NOMATCH);
+
+ return (internal_wstrmatch (wpattern, wstring, flags));
+}
+#endif
+
+#ifdef TEST
+main (c, v)
+ int c;
+ char **v;
+{
+ char *string, *pat;
+
+ string = v[1];
+ pat = v[2];
+
+ if (strmatch (pat, string, 0) == 0)
+ {
+ printf ("%s matches %s\n", string, pat);
+ exit (0);
+ }
+ else
+ {
+ printf ("%s does not match %s\n", string, pat);
+ exit (1);
+ }
+}
+#endif
diff --git a/lib/glob/strmatch.h b/lib/glob/strmatch.h
new file mode 100644
index 0000000..5c99e0c
--- /dev/null
+++ b/lib/glob/strmatch.h
@@ -0,0 +1,62 @@
+/* Copyright (C) 1991-2004 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne-Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _STRMATCH_H
+#define _STRMATCH_H 1
+
+#include <config.h>
+
+#include "stdc.h"
+
+/* We #undef these before defining them because some losing systems
+ (HP-UX A.08.07 for example) define these in <unistd.h>. */
+#undef FNM_PATHNAME
+#undef FNM_NOESCAPE
+#undef FNM_PERIOD
+
+/* Bits set in the FLAGS argument to `strmatch'. */
+
+/* standard flags are like fnmatch(3). */
+#define FNM_PATHNAME (1 << 0) /* No wildcard can ever match `/'. */
+#define FNM_NOESCAPE (1 << 1) /* Backslashes don't quote special chars. */
+#define FNM_PERIOD (1 << 2) /* Leading `.' is matched only explicitly. */
+
+/* extended flags not available in most libc fnmatch versions, but we undef
+ them to avoid any possible warnings. */
+#undef FNM_LEADING_DIR
+#undef FNM_CASEFOLD
+#undef FNM_EXTMATCH
+
+#define FNM_LEADING_DIR (1 << 3) /* Ignore `/...' after a match. */
+#define FNM_CASEFOLD (1 << 4) /* Compare without regard to case. */
+#define FNM_EXTMATCH (1 << 5) /* Use ksh-like extended matching. */
+
+/* Value returned by `strmatch' if STRING does not match PATTERN. */
+#undef FNM_NOMATCH
+
+#define FNM_NOMATCH 1
+
+/* Match STRING against the filename pattern PATTERN,
+ returning zero if it matches, FNM_NOMATCH if not. */
+extern int strmatch __P((char *, char *, int));
+
+#if HANDLE_MULTIBYTE
+extern int wcsmatch __P((wchar_t *, wchar_t *, int));
+#endif
+
+#endif /* _STRMATCH_H */
diff --git a/lib/glob/xmbsrtowcs.c b/lib/glob/xmbsrtowcs.c
new file mode 100644
index 0000000..23fcd8e
--- /dev/null
+++ b/lib/glob/xmbsrtowcs.c
@@ -0,0 +1,262 @@
+/* xmbsrtowcs.c -- replacement function for mbsrtowcs */
+
+/* Copyright (C) 2002-2004 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <bashansi.h>
+
+/* <wchar.h>, <wctype.h> and <stdlib.h> are included in "shmbutil.h".
+ If <wchar.h>, <wctype.h>, mbsrtowcs(), exist, HANDLE_MULTIBYTE
+ is defined as 1. */
+#include <shmbutil.h>
+
+#if HANDLE_MULTIBYTE
+
+#ifndef FREE
+# define FREE(x) do { if (x) free (x); } while (0)
+#endif
+/* On some locales (ex. ja_JP.sjis), mbsrtowc doesn't convert 0x5c to U<0x5c>.
+ So, this function is made for converting 0x5c to U<0x5c>. */
+
+static mbstate_t local_state;
+static int local_state_use = 0;
+
+size_t
+xmbsrtowcs (dest, src, len, pstate)
+ wchar_t *dest;
+ const char **src;
+ size_t len;
+ mbstate_t *pstate;
+{
+ mbstate_t *ps;
+ size_t mblength, wclength, n;
+
+ ps = pstate;
+ if (pstate == NULL)
+ {
+ if (!local_state_use)
+ {
+ memset (&local_state, '\0', sizeof(mbstate_t));
+ local_state_use = 1;
+ }
+ ps = &local_state;
+ }
+
+ n = strlen (*src);
+
+ if (dest == NULL)
+ {
+ wchar_t *wsbuf;
+ const char *mbs;
+ mbstate_t psbuf;
+
+ /* It doesn't matter if malloc fails here, since mbsrtowcs should do
+ the right thing with a NULL first argument. */
+ wsbuf = (wchar_t *) malloc ((n + 1) * sizeof(wchar_t));
+ mbs = *src;
+ psbuf = *ps;
+
+ wclength = mbsrtowcs (wsbuf, &mbs, n, &psbuf);
+
+ if (wsbuf)
+ free (wsbuf);
+ return wclength;
+ }
+
+ for (wclength = 0; wclength < len; wclength++, dest++)
+ {
+ if (mbsinit(ps))
+ {
+ if (**src == '\0')
+ {
+ *dest = L'\0';
+ *src = NULL;
+ return (wclength);
+ }
+ else if (**src == '\\')
+ {
+ *dest = L'\\';
+ mblength = 1;
+ }
+ else
+ mblength = mbrtowc(dest, *src, n, ps);
+ }
+ else
+ mblength = mbrtowc(dest, *src, n, ps);
+
+ /* Cannot convert multibyte character to wide character. */
+ if (mblength == (size_t)-1 || mblength == (size_t)-2)
+ return (size_t)-1;
+
+ *src += mblength;
+ n -= mblength;
+
+ /* The multibyte string has been completely converted,
+ including the terminating '\0'. */
+ if (*dest == L'\0')
+ {
+ *src = NULL;
+ break;
+ }
+ }
+
+ return (wclength);
+}
+
+/* Convert a multibyte string to a wide character string. Memory for the
+ new wide character string is obtained with malloc.
+
+ The return value is the length of the wide character string. Returns a
+ pointer to the wide character string in DESTP. If INDICESP is not NULL,
+ INDICESP stores the pointer to the pointer array. Each pointer is to
+ the first byte of each multibyte character. Memory for the pointer array
+ is obtained with malloc, too.
+ If conversion is failed, the return value is (size_t)-1 and the values
+ of DESTP and INDICESP are NULL. */
+
+#define WSBUF_INC 32
+
+size_t
+xdupmbstowcs (destp, indicesp, src)
+ wchar_t **destp; /* Store the pointer to the wide character string */
+ char ***indicesp; /* Store the pointer to the pointer array. */
+ const char *src; /* Multibyte character string */
+{
+ const char *p; /* Conversion start position of src */
+ wchar_t wc; /* Created wide character by conversion */
+ wchar_t *wsbuf; /* Buffer for wide characters. */
+ char **indices; /* Buffer for indices. */
+ size_t wsbuf_size; /* Size of WSBUF */
+ size_t wcnum; /* Number of wide characters in WSBUF */
+ mbstate_t state; /* Conversion State */
+
+ /* In case SRC or DESP is NULL, conversion doesn't take place. */
+ if (src == NULL || destp == NULL)
+ {
+ if (destp)
+ *destp = NULL;
+ return (size_t)-1;
+ }
+
+ memset (&state, '\0', sizeof(mbstate_t));
+ wsbuf_size = WSBUF_INC;
+
+ wsbuf = (wchar_t *) malloc (wsbuf_size * sizeof(wchar_t));
+ if (wsbuf == NULL)
+ {
+ *destp = NULL;
+ return (size_t)-1;
+ }
+
+ indices = NULL;
+ if (indicesp)
+ {
+ indices = (char **) malloc (wsbuf_size * sizeof(char *));
+ if (indices == NULL)
+ {
+ free (wsbuf);
+ *destp = NULL;
+ return (size_t)-1;
+ }
+ }
+
+ p = src;
+ wcnum = 0;
+ do
+ {
+ size_t mblength; /* Byte length of one multibyte character. */
+
+ if (mbsinit (&state))
+ {
+ if (*p == '\0')
+ {
+ wc = L'\0';
+ mblength = 1;
+ }
+ else if (*p == '\\')
+ {
+ wc = L'\\';
+ mblength = 1;
+ }
+ else
+ mblength = mbrtowc(&wc, p, MB_LEN_MAX, &state);
+ }
+ else
+ mblength = mbrtowc(&wc, p, MB_LEN_MAX, &state);
+
+ /* Conversion failed. */
+ if (MB_INVALIDCH (mblength))
+ {
+ free (wsbuf);
+ FREE (indices);
+ *destp = NULL;
+ return (size_t)-1;
+ }
+
+ ++wcnum;
+
+ /* Resize buffers when they are not large enough. */
+ if (wsbuf_size < wcnum)
+ {
+ wchar_t *wstmp;
+ char **idxtmp;
+
+ wsbuf_size += WSBUF_INC;
+
+ wstmp = (wchar_t *) realloc (wsbuf, wsbuf_size * sizeof (wchar_t));
+ if (wstmp == NULL)
+ {
+ free (wsbuf);
+ FREE (indices);
+ *destp = NULL;
+ return (size_t)-1;
+ }
+ wsbuf = wstmp;
+
+ if (indicesp)
+ {
+ idxtmp = (char **) realloc (indices, wsbuf_size * sizeof (char **));
+ if (idxtmp == NULL)
+ {
+ free (wsbuf);
+ free (indices);
+ *destp = NULL;
+ return (size_t)-1;
+ }
+ indices = idxtmp;
+ }
+ }
+
+ wsbuf[wcnum - 1] = wc;
+ if (indices)
+ indices[wcnum - 1] = (char *)p;
+ p += mblength;
+ }
+ while (MB_NULLWCH (wc) == 0);
+
+ /* Return the length of the wide character string, not including `\0'. */
+ *destp = wsbuf;
+ if (indicesp != NULL)
+ *indicesp = indices;
+
+ return (wcnum - 1);
+}
+
+#endif /* HANDLE_MULTIBYTE */
diff --git a/lib/intl/ChangeLog b/lib/intl/ChangeLog
new file mode 100644
index 0000000..eed2d21
--- /dev/null
+++ b/lib/intl/ChangeLog
@@ -0,0 +1,4 @@
+2003-05-22 GNU <bug-gnu-gettext@gnu.org>
+
+ * Version 0.12.1 released.
+
diff --git a/lib/intl/Makefile.in b/lib/intl/Makefile.in
new file mode 100644
index 0000000..c5245d4
--- /dev/null
+++ b/lib/intl/Makefile.in
@@ -0,0 +1,470 @@
+# Makefile for directory with message catalog handling library of GNU gettext
+# Copyright (C) 1995-1998, 2000-2003, 2008,2009 Free Software Foundation, Inc.
+#
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+PACKAGE = @PACKAGE_NAME@
+VERSION = @PACKAGE_VERSION@
+
+SHELL = /bin/sh
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @BUILD_DIR@
+VPATH = $(srcdir)
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+transform = @program_transform_name@
+
+datarootdir = @datarootdir@
+
+libdir = @libdir@
+includedir = @includedir@
+datadir = @datadir@
+localedir = @localedir@
+
+gettextsrcdir = $(datadir)/gettext/intl
+aliaspath = $(localedir)
+subdir = intl
+
+@SET_MAKE@
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
+
+l = @INTL_LIBTOOL_SUFFIX_PREFIX@
+
+AR = ar
+CC = @CC@
+LIBTOOL = @LIBTOOL@
+RANLIB = @RANLIB@
+YACC = @INTLBISON@ -y -d
+YFLAGS = --name-prefix=__gettext
+
+LOCAL_DEFS = @LOCAL_DEFS@
+
+DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
+-DLIBDIR=\"$(prefix)/libdata\" -DIN_LIBINTL \
+-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
+-Dset_relocation_prefix=libintl_set_relocation_prefix \
+-Drelocate=libintl_relocate \
+-DDEPENDS_ON_LIBICONV=1 @DEFS@ ${LOCAL_DEFS}
+CPPFLAGS = @CPPFLAGS@
+CFLAGS = @CFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+
+COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
+
+HEADERS = \
+ gmo.h \
+ gettextP.h \
+ hash-string.h \
+ loadinfo.h \
+ plural-exp.h \
+ eval-plural.h \
+ localcharset.h \
+ relocatable.h \
+ os2compat.h \
+ libgnuintl.h.in
+SOURCES = \
+ bindtextdom.c \
+ dcgettext.c \
+ dgettext.c \
+ gettext.c \
+ finddomain.c \
+ loadmsgcat.c \
+ localealias.c \
+ textdomain.c \
+ l10nflist.c \
+ explodename.c \
+ dcigettext.c \
+ dcngettext.c \
+ dngettext.c \
+ ngettext.c \
+ plural.y \
+ plural-exp.c \
+ localcharset.c \
+ relocatable.c \
+ localename.c \
+ log.c \
+ osdep.c \
+ os2compat.c \
+ intl-compat.c
+OBJECTS = \
+ bindtextdom.$lo \
+ dcgettext.$lo \
+ dgettext.$lo \
+ gettext.$lo \
+ finddomain.$lo \
+ loadmsgcat.$lo \
+ localealias.$lo \
+ textdomain.$lo \
+ l10nflist.$lo \
+ explodename.$lo \
+ dcigettext.$lo \
+ dcngettext.$lo \
+ dngettext.$lo \
+ ngettext.$lo \
+ plural.$lo \
+ plural-exp.$lo \
+ localcharset.$lo \
+ relocatable.$lo \
+ localename.$lo \
+ log.$lo \
+ osdep.$lo \
+ intl-compat.$lo
+DISTFILES.common = Makefile.in \
+config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
+DISTFILES.generated = plural.c
+DISTFILES.normal = VERSION
+DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \
+Makefile.vms libgnuintl.h.msvc-shared README.woe32 Makefile.msvc
+DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
+COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h
+
+all: all-@USE_INCLUDED_LIBINTL@
+all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
+all-no: all-no-@BUILD_INCLUDED_LIBINTL@
+all-no-yes: libgnuintl.$la
+all-no-no:
+
+libintl.a libgnuintl.a: $(OBJECTS)
+ rm -f $@
+ $(AR) cru $@ $(OBJECTS)
+ $(RANLIB) $@
+
+libintl.la libgnuintl.la: $(OBJECTS)
+ $(LIBTOOL) --mode=link \
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
+ $(OBJECTS) @LTLIBICONV@ $(LIBS) \
+ -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
+ -rpath $(libdir) \
+ -no-undefined
+
+# Libtool's library version information for libintl.
+# Before making a gettext release, the gettext maintainer must change this
+# according to the libtool documentation, section "Library interface versions".
+# Maintainers of other packages that include the intl directory must *not*
+# change these values.
+LTV_CURRENT=5
+LTV_REVISION=0
+LTV_AGE=3
+
+.SUFFIXES:
+.SUFFIXES: .c .y .o .lo .sin .sed
+
+.c.o:
+ $(COMPILE) $<
+
+.y.c:
+ $(YACC) $(YFLAGS) --output $@ $<
+ rm -f $*.h
+
+bindtextdom.lo: $(srcdir)/bindtextdom.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c
+dcgettext.lo: $(srcdir)/dcgettext.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c
+dgettext.lo: $(srcdir)/dgettext.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c
+gettext.lo: $(srcdir)/gettext.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c
+finddomain.lo: $(srcdir)/finddomain.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c
+loadmsgcat.lo: $(srcdir)/loadmsgcat.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c
+localealias.lo: $(srcdir)/localealias.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c
+textdomain.lo: $(srcdir)/textdomain.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c
+l10nflist.lo: $(srcdir)/l10nflist.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c
+explodename.lo: $(srcdir)/explodename.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c
+dcigettext.lo: $(srcdir)/dcigettext.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c
+dcngettext.lo: $(srcdir)/dcngettext.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c
+dngettext.lo: $(srcdir)/dngettext.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c
+ngettext.lo: $(srcdir)/ngettext.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c
+plural.lo: $(srcdir)/plural.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c
+plural-exp.lo: $(srcdir)/plural-exp.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c
+localcharset.lo: $(srcdir)/localcharset.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c
+relocatable.lo: $(srcdir)/relocatable.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c
+localename.lo: $(srcdir)/localename.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c
+log.lo: $(srcdir)/log.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c
+osdep.lo: $(srcdir)/osdep.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c
+intl-compat.lo: $(srcdir)/intl-compat.c
+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c
+
+ref-add.sed: $(srcdir)/ref-add.sin
+ sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed
+ mv t-ref-add.sed ref-add.sed
+ref-del.sed: $(srcdir)/ref-del.sin
+ sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed
+ mv t-ref-del.sed ref-del.sed
+
+INCLUDES = -I. -I$(srcdir) -I${top_builddir} -I${top_srcdir}
+
+libgnuintl.h: $(srcdir)/libgnuintl.h.in
+ cp $(srcdir)/libgnuintl.h.in libgnuintl.h
+
+libintl.h: libgnuintl.h
+ cmp libgnuintl.h libintl.h || cp libgnuintl.h libintl.h
+
+charset.alias: $(srcdir)/config.charset
+ $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
+ mv t-$@ $@
+
+check: all
+
+# We must not install the libintl.h/libintl.a files if we are on a
+# system which has the GNU gettext() function in its C library or in a
+# separate library.
+# If you want to use the one which comes with this version of the
+# package, you have to use `configure --with-included-gettext'.
+install: install-exec install-data
+install-exec: all
+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \
+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
+ $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
+ $(LIBTOOL) --mode=install \
+ $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
+ if test "@RELOCATABLE@" = yes; then \
+ dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \
+ if test -n "$dependencies"; then \
+ rm -f $(DESTDIR)$(libdir)/libintl.la; \
+ fi; \
+ fi; \
+ else \
+ : ; \
+ fi
+ if test "$(PACKAGE)" = "gettext-tools" \
+ && test '@USE_INCLUDED_LIBINTL@' = no; then \
+ $(mkinstalldirs) $(DESTDIR)$(libdir); \
+ $(LIBTOOL) --mode=install \
+ $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \
+ rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
+ $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \
+ $(LIBTOOL) --mode=uninstall \
+ rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \
+ else \
+ : ; \
+ fi
+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+ $(mkinstalldirs) $(DESTDIR)$(localedir); \
+ test -f $(DESTDIR)$(localedir)/locale.alias \
+ && orig=$(DESTDIR)$(localedir)/locale.alias \
+ || orig=$(srcdir)/locale.alias; \
+ temp=$(DESTDIR)$(localedir)/t-locale.alias; \
+ dest=$(DESTDIR)$(localedir)/locale.alias; \
+ sed -f ref-add.sed $$orig > $$temp; \
+ $(INSTALL_DATA) $$temp $$dest; \
+ rm -f $$temp; \
+ else \
+ : ; \
+ fi
+install-data: all
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
+ $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
+ dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
+ for file in $$dists; do \
+ $(INSTALL_DATA) $(srcdir)/$$file \
+ $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
+ dists="$(DISTFILES.generated)"; \
+ for file in $$dists; do \
+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
+ $(INSTALL_DATA) $$dir/$$file \
+ $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ dists="$(DISTFILES.obsolete)"; \
+ for file in $$dists; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+
+install-strip: install
+
+installdirs:
+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \
+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
+ else \
+ : ; \
+ fi
+ if test "$(PACKAGE)" = "gettext-tools" \
+ && test '@USE_INCLUDED_LIBINTL@' = no; then \
+ $(mkinstalldirs) $(DESTDIR)$(libdir); \
+ else \
+ : ; \
+ fi
+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
+ $(mkinstalldirs) $(DESTDIR)$(localedir); \
+ else \
+ : ; \
+ fi
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ else \
+ : ; \
+ fi
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall:
+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \
+ rm -f $(DESTDIR)$(includedir)/libintl.h; \
+ $(LIBTOOL) --mode=uninstall \
+ rm -f $(DESTDIR)$(libdir)/libintl.$la; \
+ else \
+ : ; \
+ fi
+ if test "$(PACKAGE)" = "gettext-tools" \
+ && test '@USE_INCLUDED_LIBINTL@' = no; then \
+ rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
+ else \
+ : ; \
+ fi
+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
+ if test -f $(DESTDIR)$(prefix)/libdata/charset.alias; then \
+ temp=$(DESTDIR)$(prefix)/libdata/t-charset.alias; \
+ dest=$(DESTDIR)$(prefix)/libdata/charset.alias; \
+ sed -f ref-del.sed $$dest > $$temp; \
+ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
+ rm -f $$dest; \
+ else \
+ $(INSTALL_DATA) $$temp $$dest; \
+ fi; \
+ rm -f $$temp; \
+ fi; \
+ if test -f $(DESTDIR)$(localedir)/locale.alias; then \
+ temp=$(DESTDIR)$(localedir)/t-locale.alias; \
+ dest=$(DESTDIR)$(localedir)/locale.alias; \
+ sed -f ref-del.sed $$dest > $$temp; \
+ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
+ rm -f $$dest; \
+ else \
+ $(INSTALL_DATA) $$temp $$dest; \
+ fi; \
+ rm -f $$temp; \
+ fi; \
+ else \
+ : ; \
+ fi
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+
+info dvi ps pdf html:
+
+$(OBJECTS): ${top_builddir}/config.h libgnuintl.h
+bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h
+dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h
+explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h
+dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h
+dcigettext.$lo: $(srcdir)/eval-plural.h
+localcharset.$lo: $(srcdir)/localcharset.h
+localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h
+
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES)
+ here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
+
+ctags: CTAGS
+
+CTAGS: $(HEADERS) $(SOURCES)
+ here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES)
+
+id: ID
+
+ID: $(HEADERS) $(SOURCES)
+ here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
+
+
+mostlyclean:
+ rm -f *.a *.la *.o *.obj *.lo core core.*
+ rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed
+ rm -f -r .libs _libs
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile ID TAGS
+ if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \
+ rm -f ChangeLog.inst $(DISTFILES.normal); \
+ else \
+ : ; \
+ fi
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+
+
+# GNU gettext needs not contain the file `VERSION' but contains some
+# other files which should not be distributed in other packages.
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: Makefile
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ : ; \
+ else \
+ if test "$(PACKAGE)" = "gettext-runtime"; then \
+ additional="$(DISTFILES.gettext)"; \
+ else \
+ additional="$(DISTFILES.normal)"; \
+ fi; \
+ $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
+ for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
+ cp -p $$dir/$$file $(distdir); \
+ done; \
+ fi
+
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ cd $(top_builddir) && $(SHELL) ./config.status
+# This would be more efficient, but doesn't work any more with autoconf-2.57,
+# when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used.
+# cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/lib/intl/VERSION b/lib/intl/VERSION
new file mode 100644
index 0000000..1303183
--- /dev/null
+++ b/lib/intl/VERSION
@@ -0,0 +1 @@
+GNU gettext library from gettext-0.12.1
diff --git a/lib/intl/bindtextdom.c b/lib/intl/bindtextdom.c
new file mode 100644
index 0000000..ef5479e
--- /dev/null
+++ b/lib/intl/bindtextdom.c
@@ -0,0 +1,376 @@
+/* bindtextdom.c - Implementation of the bindtextdomain(3) function */
+
+/* Copyright (C) 1995-1998, 2000, 2001, 2002, 2005-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "gettextP.h"
+
+#ifdef _LIBC
+/* We have to handle multi-threaded applications. */
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc. */
+# define __libc_rwlock_define(CLASS, NAME)
+# define __libc_rwlock_wrlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* The internal variables in the standalone libintl.a must have different
+ names than the internal variables in GNU libc, otherwise programs
+ using libintl.a cannot be linked statically. */
+#if !defined _LIBC
+# define _nl_default_dirname libintl_nl_default_dirname
+# define _nl_domain_bindings libintl_nl_domain_bindings
+#endif
+
+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
+#ifndef offsetof
+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Contains the default location of the message catalogs. */
+extern const char _nl_default_dirname[];
+#ifdef _LIBC
+extern const char _nl_default_dirname_internal[] attribute_hidden;
+#else
+# define INTUSE(name) name
+#endif
+
+/* List with bindings of specific domains. */
+extern struct binding *_nl_domain_bindings;
+
+/* Lock variable to protect the global data in the gettext implementation. */
+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
+
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define BINDTEXTDOMAIN __bindtextdomain
+# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
+# ifndef strdup
+# define strdup(str) __strdup (str)
+# endif
+#else
+# define BINDTEXTDOMAIN libintl_bindtextdomain
+# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
+#endif
+
+/* Prototypes for local functions. */
+static void set_binding_values PARAMS ((const char *domainname,
+ const char **dirnamep,
+ const char **codesetp));
+
+/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
+ to be used for the DOMAINNAME message catalog.
+ If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
+ modified, only the current value is returned.
+ If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
+ modified nor returned. */
+static void
+set_binding_values (domainname, dirnamep, codesetp)
+ const char *domainname;
+ const char **dirnamep;
+ const char **codesetp;
+{
+ struct binding *binding;
+ int modified;
+
+ /* Some sanity checks. */
+ if (domainname == NULL || domainname[0] == '\0')
+ {
+ if (dirnamep)
+ *dirnamep = NULL;
+ if (codesetp)
+ *codesetp = NULL;
+ return;
+ }
+
+ __libc_rwlock_wrlock (_nl_state_lock);
+
+ modified = 0;
+
+ for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
+ {
+ int compare = strcmp (domainname, binding->domainname);
+ if (compare == 0)
+ /* We found it! */
+ break;
+ if (compare < 0)
+ {
+ /* It is not in the list. */
+ binding = NULL;
+ break;
+ }
+ }
+
+ if (binding != NULL)
+ {
+ if (dirnamep)
+ {
+ const char *dirname = *dirnamep;
+
+ if (dirname == NULL)
+ /* The current binding has be to returned. */
+ *dirnamep = binding->dirname;
+ else
+ {
+ /* The domain is already bound. If the new value and the old
+ one are equal we simply do nothing. Otherwise replace the
+ old binding. */
+ char *result = binding->dirname;
+ if (strcmp (dirname, result) != 0)
+ {
+ if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
+ result = (char *) INTUSE(_nl_default_dirname);
+ else
+ {
+#if defined _LIBC || defined HAVE_STRDUP
+ result = strdup (dirname);
+#else
+ size_t len = strlen (dirname) + 1;
+ result = (char *) malloc (len);
+ if (__builtin_expect (result != NULL, 1))
+ memcpy (result, dirname, len);
+#endif
+ }
+
+ if (__builtin_expect (result != NULL, 1))
+ {
+ if (binding->dirname != INTUSE(_nl_default_dirname))
+ free (binding->dirname);
+
+ binding->dirname = result;
+ modified = 1;
+ }
+ }
+ *dirnamep = result;
+ }
+ }
+
+ if (codesetp)
+ {
+ const char *codeset = *codesetp;
+
+ if (codeset == NULL)
+ /* The current binding has be to returned. */
+ *codesetp = binding->codeset;
+ else
+ {
+ /* The domain is already bound. If the new value and the old
+ one are equal we simply do nothing. Otherwise replace the
+ old binding. */
+ char *result = binding->codeset;
+ if (result == NULL || strcmp (codeset, result) != 0)
+ {
+#if defined _LIBC || defined HAVE_STRDUP
+ result = strdup (codeset);
+#else
+ size_t len = strlen (codeset) + 1;
+ result = (char *) malloc (len);
+ if (__builtin_expect (result != NULL, 1))
+ memcpy (result, codeset, len);
+#endif
+
+ if (__builtin_expect (result != NULL, 1))
+ {
+ if (binding->codeset != NULL)
+ free (binding->codeset);
+
+ binding->codeset = result;
+ binding->codeset_cntr++;
+ modified = 1;
+ }
+ }
+ *codesetp = result;
+ }
+ }
+ }
+ else if ((dirnamep == NULL || *dirnamep == NULL)
+ && (codesetp == NULL || *codesetp == NULL))
+ {
+ /* Simply return the default values. */
+ if (dirnamep)
+ *dirnamep = INTUSE(_nl_default_dirname);
+ if (codesetp)
+ *codesetp = NULL;
+ }
+ else
+ {
+ /* We have to create a new binding. */
+ size_t len = strlen (domainname) + 1;
+ struct binding *new_binding =
+ (struct binding *) malloc (offsetof (struct binding, domainname) + len);
+
+ if (__builtin_expect (new_binding == NULL, 0))
+ goto failed;
+
+ memcpy (new_binding->domainname, domainname, len);
+
+ if (dirnamep)
+ {
+ const char *dirname = *dirnamep;
+
+ if (dirname == NULL)
+ /* The default value. */
+ dirname = INTUSE(_nl_default_dirname);
+ else
+ {
+ if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
+ dirname = INTUSE(_nl_default_dirname);
+ else
+ {
+ char *result;
+#if defined _LIBC || defined HAVE_STRDUP
+ result = strdup (dirname);
+ if (__builtin_expect (result == NULL, 0))
+ goto failed_dirname;
+#else
+ size_t len = strlen (dirname) + 1;
+ result = (char *) malloc (len);
+ if (__builtin_expect (result == NULL, 0))
+ goto failed_dirname;
+ memcpy (result, dirname, len);
+#endif
+ dirname = result;
+ }
+ }
+ *dirnamep = dirname;
+ new_binding->dirname = (char *) dirname;
+ }
+ else
+ /* The default value. */
+ new_binding->dirname = (char *) INTUSE(_nl_default_dirname);
+
+ new_binding->codeset_cntr = 0;
+
+ if (codesetp)
+ {
+ const char *codeset = *codesetp;
+
+ if (codeset != NULL)
+ {
+ char *result;
+
+#if defined _LIBC || defined HAVE_STRDUP
+ result = strdup (codeset);
+ if (__builtin_expect (result == NULL, 0))
+ goto failed_codeset;
+#else
+ size_t len = strlen (codeset) + 1;
+ result = (char *) malloc (len);
+ if (__builtin_expect (result == NULL, 0))
+ goto failed_codeset;
+ memcpy (result, codeset, len);
+#endif
+ codeset = result;
+ new_binding->codeset_cntr++;
+ }
+ *codesetp = codeset;
+ new_binding->codeset = (char *) codeset;
+ }
+ else
+ new_binding->codeset = NULL;
+
+ /* Now enqueue it. */
+ if (_nl_domain_bindings == NULL
+ || strcmp (domainname, _nl_domain_bindings->domainname) < 0)
+ {
+ new_binding->next = _nl_domain_bindings;
+ _nl_domain_bindings = new_binding;
+ }
+ else
+ {
+ binding = _nl_domain_bindings;
+ while (binding->next != NULL
+ && strcmp (domainname, binding->next->domainname) > 0)
+ binding = binding->next;
+
+ new_binding->next = binding->next;
+ binding->next = new_binding;
+ }
+
+ modified = 1;
+
+ /* Here we deal with memory allocation failures. */
+ if (0)
+ {
+ failed_codeset:
+ if (new_binding->dirname != INTUSE(_nl_default_dirname))
+ free (new_binding->dirname);
+ failed_dirname:
+ free (new_binding);
+ failed:
+ if (dirnamep)
+ *dirnamep = NULL;
+ if (codesetp)
+ *codesetp = NULL;
+ }
+ }
+
+ /* If we modified any binding, we flush the caches. */
+ if (modified)
+ ++_nl_msg_cat_cntr;
+
+ __libc_rwlock_unlock (_nl_state_lock);
+}
+
+/* Specify that the DOMAINNAME message catalog will be found
+ in DIRNAME rather than in the system locale data base. */
+char *
+BINDTEXTDOMAIN (domainname, dirname)
+ const char *domainname;
+ const char *dirname;
+{
+ set_binding_values (domainname, &dirname, NULL);
+ return (char *) dirname;
+}
+
+/* Specify the character encoding in which the messages from the
+ DOMAINNAME message catalog will be returned. */
+char *
+BIND_TEXTDOMAIN_CODESET (domainname, codeset)
+ const char *domainname;
+ const char *codeset;
+{
+ set_binding_values (domainname, NULL, &codeset);
+ return (char *) codeset;
+}
+
+#ifdef _LIBC
+/* Aliases for function names in GNU C Library. */
+weak_alias (__bindtextdomain, bindtextdomain);
+weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
+#endif
diff --git a/lib/intl/config.charset b/lib/intl/config.charset
new file mode 100644
index 0000000..10c4439
--- /dev/null
+++ b/lib/intl/config.charset
@@ -0,0 +1,465 @@
+#! /bin/sh
+# Output a system dependent table of character encoding aliases.
+#
+# Copyright (C) 2000-2009 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# The table consists of lines of the form
+# ALIAS CANONICAL
+#
+# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
+# ALIAS is compared in a case sensitive way.
+#
+# CANONICAL is the GNU canonical name for this character encoding.
+# It must be an encoding supported by libiconv. Support by GNU libc is
+# also desirable. CANONICAL is case insensitive. Usually an upper case
+# MIME charset name is preferred.
+# The current list of GNU canonical charset names is as follows.
+#
+# name used by which systems a MIME name?
+# ASCII, ANSI_X3.4-1968 glibc solaris freebsd
+# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes
+# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes
+# ISO-8859-3 glibc solaris yes
+# ISO-8859-4 osf solaris freebsd yes
+# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes
+# ISO-8859-6 glibc aix hpux solaris yes
+# ISO-8859-7 glibc aix hpux irix osf solaris yes
+# ISO-8859-8 glibc aix hpux osf solaris yes
+# ISO-8859-9 glibc aix hpux irix osf solaris yes
+# ISO-8859-13 glibc
+# ISO-8859-14 glibc
+# ISO-8859-15 glibc aix osf solaris freebsd
+# KOI8-R glibc solaris freebsd yes
+# KOI8-U glibc freebsd yes
+# KOI8-T glibc
+# CP437 dos
+# CP775 dos
+# CP850 aix osf dos
+# CP852 dos
+# CP855 dos
+# CP856 aix
+# CP857 dos
+# CP861 dos
+# CP862 dos
+# CP864 dos
+# CP865 dos
+# CP866 freebsd dos
+# CP869 dos
+# CP874 woe32 dos
+# CP922 aix
+# CP932 aix woe32 dos
+# CP943 aix
+# CP949 osf woe32 dos
+# CP950 woe32 dos
+# CP1046 aix
+# CP1124 aix
+# CP1125 dos
+# CP1129 aix
+# CP1250 woe32
+# CP1251 glibc solaris woe32
+# CP1252 aix woe32
+# CP1253 woe32
+# CP1254 woe32
+# CP1255 glibc woe32
+# CP1256 woe32
+# CP1257 woe32
+# GB2312 glibc aix hpux irix solaris freebsd yes
+# EUC-JP glibc aix hpux irix osf solaris freebsd yes
+# EUC-KR glibc aix hpux irix osf solaris freebsd yes
+# EUC-TW glibc aix hpux irix osf solaris
+# BIG5 glibc aix hpux osf solaris freebsd yes
+# BIG5-HKSCS glibc solaris
+# GBK glibc aix osf solaris woe32 dos
+# GB18030 glibc solaris
+# SHIFT_JIS hpux osf solaris freebsd yes
+# JOHAB glibc solaris woe32
+# TIS-620 glibc aix hpux osf solaris
+# VISCII glibc yes
+# TCVN5712-1 glibc
+# GEORGIAN-PS glibc
+# HP-ROMAN8 hpux
+# HP-ARABIC8 hpux
+# HP-GREEK8 hpux
+# HP-HEBREW8 hpux
+# HP-TURKISH8 hpux
+# HP-KANA8 hpux
+# DEC-KANJI osf
+# DEC-HANYU osf
+# UTF-8 glibc aix hpux osf solaris yes
+#
+# Note: Names which are not marked as being a MIME name should not be used in
+# Internet protocols for information interchange (mail, news, etc.).
+#
+# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
+# must understand both names and treat them as equivalent.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+
+host="$1"
+os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
+echo "# This file contains a table of character encoding aliases,"
+echo "# suitable for operating system '${os}'."
+echo "# It was automatically generated from config.charset."
+# List of references, updated during installation:
+echo "# Packages using this file: "
+case "$os" in
+ linux* | *-gnu*)
+ # With glibc-2.1 or newer, we don't need any canonicalization,
+ # because glibc has iconv and both glibc and libiconv support all
+ # GNU canonical names directly. Therefore, the Makefile does not
+ # need to install the alias file at all.
+ # The following applies only to glibc-2.0.x and older libcs.
+ echo "ISO_646.IRV:1983 ASCII"
+ ;;
+ aix*)
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-6 ISO-8859-6"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-8 ISO-8859-8"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "IBM-850 CP850"
+ echo "IBM-856 CP856"
+ echo "IBM-921 ISO-8859-13"
+ echo "IBM-922 CP922"
+ echo "IBM-932 CP932"
+ echo "IBM-943 CP943"
+ echo "IBM-1046 CP1046"
+ echo "IBM-1124 CP1124"
+ echo "IBM-1129 CP1129"
+ echo "IBM-1252 CP1252"
+ echo "IBM-eucCN GB2312"
+ echo "IBM-eucJP EUC-JP"
+ echo "IBM-eucKR EUC-KR"
+ echo "IBM-eucTW EUC-TW"
+ echo "big5 BIG5"
+ echo "GBK GBK"
+ echo "TIS-620 TIS-620"
+ echo "UTF-8 UTF-8"
+ ;;
+ hpux*)
+ echo "iso88591 ISO-8859-1"
+ echo "iso88592 ISO-8859-2"
+ echo "iso88595 ISO-8859-5"
+ echo "iso88596 ISO-8859-6"
+ echo "iso88597 ISO-8859-7"
+ echo "iso88598 ISO-8859-8"
+ echo "iso88599 ISO-8859-9"
+ echo "iso885915 ISO-8859-15"
+ echo "roman8 HP-ROMAN8"
+ echo "arabic8 HP-ARABIC8"
+ echo "greek8 HP-GREEK8"
+ echo "hebrew8 HP-HEBREW8"
+ echo "turkish8 HP-TURKISH8"
+ echo "kana8 HP-KANA8"
+ echo "tis620 TIS-620"
+ echo "big5 BIG5"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ echo "hp15CN GB2312"
+ #echo "ccdc ?" # what is this?
+ echo "SJIS SHIFT_JIS"
+ echo "utf8 UTF-8"
+ ;;
+ irix*)
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "eucCN GB2312"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ ;;
+ osf*)
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-8 ISO-8859-8"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "cp850 CP850"
+ echo "big5 BIG5"
+ echo "dechanyu DEC-HANYU"
+ echo "dechanzi GB2312"
+ echo "deckanji DEC-KANJI"
+ echo "deckorean EUC-KR"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ echo "GBK GBK"
+ echo "KSC5601 CP949"
+ echo "sdeckanji EUC-JP"
+ echo "SJIS SHIFT_JIS"
+ echo "TACTIS TIS-620"
+ echo "UTF-8 UTF-8"
+ ;;
+ solaris*)
+ echo "646 ASCII"
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-3 ISO-8859-3"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-6 ISO-8859-6"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-8 ISO-8859-8"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "koi8-r KOI8-R"
+ echo "ansi-1251 CP1251"
+ echo "BIG5 BIG5"
+ echo "Big5-HKSCS BIG5-HKSCS"
+ echo "gb2312 GB2312"
+ echo "GBK GBK"
+ echo "GB18030 GB18030"
+ echo "cns11643 EUC-TW"
+ echo "5601 EUC-KR"
+ echo "ko_KR.johap92 JOHAB"
+ echo "eucJP EUC-JP"
+ echo "PCK SHIFT_JIS"
+ echo "TIS620.2533 TIS-620"
+ #echo "sun_eu_greek ?" # what is this?
+ echo "UTF-8 UTF-8"
+ ;;
+ freebsd* | os2*)
+ # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
+ # reuse FreeBSD's locale data for OS/2.
+ echo "C ASCII"
+ echo "US-ASCII ASCII"
+ for l in la_LN lt_LN; do
+ echo "$l.ASCII ASCII"
+ done
+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
+ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
+ echo "$l.ISO_8859-1 ISO-8859-1"
+ echo "$l.DIS_8859-15 ISO-8859-15"
+ done
+ for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
+ echo "$l.ISO_8859-2 ISO-8859-2"
+ done
+ for l in la_LN lt_LT; do
+ echo "$l.ISO_8859-4 ISO-8859-4"
+ done
+ for l in ru_RU ru_SU; do
+ echo "$l.KOI8-R KOI8-R"
+ echo "$l.ISO_8859-5 ISO-8859-5"
+ echo "$l.CP866 CP866"
+ done
+ echo "uk_UA.KOI8-U KOI8-U"
+ echo "zh_TW.BIG5 BIG5"
+ echo "zh_TW.Big5 BIG5"
+ echo "zh_CN.EUC GB2312"
+ echo "ja_JP.EUC EUC-JP"
+ echo "ja_JP.SJIS SHIFT_JIS"
+ echo "ja_JP.Shift_JIS SHIFT_JIS"
+ echo "ko_KR.EUC EUC-KR"
+ ;;
+ netbsd*)
+ echo "646 ASCII"
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "eucCN GB2312"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ echo "BIG5 BIG5"
+ echo "SJIS SHIFT_JIS"
+ ;;
+ beos*)
+ # BeOS has a single locale, and it has UTF-8 encoding.
+ echo "* UTF-8"
+ ;;
+ msdosdjgpp*)
+ # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ echo "#"
+ echo "# The encodings given here may not all be correct."
+ echo "# If you find that the encoding given for your language and"
+ echo "# country is not the one your DOS machine actually uses, just"
+ echo "# correct it in this file, and send a mail to"
+ echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
+ echo "# and Bruno Haible <bruno@clisp.org>."
+ echo "#"
+ echo "C ASCII"
+ # ISO-8859-1 languages
+ echo "ca CP850"
+ echo "ca_ES CP850"
+ echo "da CP865" # not CP850 ??
+ echo "da_DK CP865" # not CP850 ??
+ echo "de CP850"
+ echo "de_AT CP850"
+ echo "de_CH CP850"
+ echo "de_DE CP850"
+ echo "en CP850"
+ echo "en_AU CP850" # not CP437 ??
+ echo "en_CA CP850"
+ echo "en_GB CP850"
+ echo "en_NZ CP437"
+ echo "en_US CP437"
+ echo "en_ZA CP850" # not CP437 ??
+ echo "es CP850"
+ echo "es_AR CP850"
+ echo "es_BO CP850"
+ echo "es_CL CP850"
+ echo "es_CO CP850"
+ echo "es_CR CP850"
+ echo "es_CU CP850"
+ echo "es_DO CP850"
+ echo "es_EC CP850"
+ echo "es_ES CP850"
+ echo "es_GT CP850"
+ echo "es_HN CP850"
+ echo "es_MX CP850"
+ echo "es_NI CP850"
+ echo "es_PA CP850"
+ echo "es_PY CP850"
+ echo "es_PE CP850"
+ echo "es_SV CP850"
+ echo "es_UY CP850"
+ echo "es_VE CP850"
+ echo "et CP850"
+ echo "et_EE CP850"
+ echo "eu CP850"
+ echo "eu_ES CP850"
+ echo "fi CP850"
+ echo "fi_FI CP850"
+ echo "fr CP850"
+ echo "fr_BE CP850"
+ echo "fr_CA CP850"
+ echo "fr_CH CP850"
+ echo "fr_FR CP850"
+ echo "ga CP850"
+ echo "ga_IE CP850"
+ echo "gd CP850"
+ echo "gd_GB CP850"
+ echo "gl CP850"
+ echo "gl_ES CP850"
+ echo "id CP850" # not CP437 ??
+ echo "id_ID CP850" # not CP437 ??
+ echo "is CP861" # not CP850 ??
+ echo "is_IS CP861" # not CP850 ??
+ echo "it CP850"
+ echo "it_CH CP850"
+ echo "it_IT CP850"
+ echo "lt CP775"
+ echo "lt_LT CP775"
+ echo "lv CP775"
+ echo "lv_LV CP775"
+ echo "nb CP865" # not CP850 ??
+ echo "nb_NO CP865" # not CP850 ??
+ echo "nl CP850"
+ echo "nl_BE CP850"
+ echo "nl_NL CP850"
+ echo "nn CP865" # not CP850 ??
+ echo "nn_NO CP865" # not CP850 ??
+ echo "no CP865" # not CP850 ??
+ echo "no_NO CP865" # not CP850 ??
+ echo "pt CP850"
+ echo "pt_BR CP850"
+ echo "pt_PT CP850"
+ echo "sv CP850"
+ echo "sv_SE CP850"
+ # ISO-8859-2 languages
+ echo "cs CP852"
+ echo "cs_CZ CP852"
+ echo "hr CP852"
+ echo "hr_HR CP852"
+ echo "hu CP852"
+ echo "hu_HU CP852"
+ echo "pl CP852"
+ echo "pl_PL CP852"
+ echo "ro CP852"
+ echo "ro_RO CP852"
+ echo "sk CP852"
+ echo "sk_SK CP852"
+ echo "sl CP852"
+ echo "sl_SI CP852"
+ echo "sq CP852"
+ echo "sq_AL CP852"
+ echo "sr CP852" # CP852 or CP866 or CP855 ??
+ echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
+ # ISO-8859-3 languages
+ echo "mt CP850"
+ echo "mt_MT CP850"
+ # ISO-8859-5 languages
+ echo "be CP866"
+ echo "be_BE CP866"
+ echo "bg CP866" # not CP855 ??
+ echo "bg_BG CP866" # not CP855 ??
+ echo "mk CP866" # not CP855 ??
+ echo "mk_MK CP866" # not CP855 ??
+ echo "ru CP866"
+ echo "ru_RU CP866"
+ echo "uk CP1125"
+ echo "uk_UA CP1125"
+ # ISO-8859-6 languages
+ echo "ar CP864"
+ echo "ar_AE CP864"
+ echo "ar_DZ CP864"
+ echo "ar_EG CP864"
+ echo "ar_IQ CP864"
+ echo "ar_IR CP864"
+ echo "ar_JO CP864"
+ echo "ar_KW CP864"
+ echo "ar_MA CP864"
+ echo "ar_OM CP864"
+ echo "ar_QA CP864"
+ echo "ar_SA CP864"
+ echo "ar_SY CP864"
+ # ISO-8859-7 languages
+ echo "el CP869"
+ echo "el_GR CP869"
+ # ISO-8859-8 languages
+ echo "he CP862"
+ echo "he_IL CP862"
+ # ISO-8859-9 languages
+ echo "tr CP857"
+ echo "tr_TR CP857"
+ # Japanese
+ echo "ja CP932"
+ echo "ja_JP CP932"
+ # Chinese
+ echo "zh_CN GBK"
+ echo "zh_TW CP950" # not CP938 ??
+ # Korean
+ echo "kr CP949" # not CP934 ??
+ echo "kr_KR CP949" # not CP934 ??
+ # Thai
+ echo "th CP874"
+ echo "th_TH CP874"
+ # Other
+ echo "eo CP850"
+ echo "eo_EO CP850"
+ ;;
+esac
diff --git a/lib/intl/dcgettext.c b/lib/intl/dcgettext.c
new file mode 100644
index 0000000..c156ca2
--- /dev/null
+++ b/lib/intl/dcgettext.c
@@ -0,0 +1,61 @@
+/* dcgettext.c - Implementation of the dcgettext(3) function. */
+
+/* Copyright (C) 1995-1999, 2000, 2001, 2002, 2006-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DCGETTEXT __dcgettext
+# define DCIGETTEXT __dcigettext
+#else
+# define DCGETTEXT libintl_dcgettext
+# define DCIGETTEXT libintl_dcigettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+ locale. */
+char *
+DCGETTEXT (domainname, msgid, category)
+ const char *domainname;
+ const char *msgid;
+ int category;
+{
+ return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+INTDEF(__dcgettext)
+weak_alias (__dcgettext, dcgettext);
+#endif
diff --git a/lib/intl/dcigettext.c b/lib/intl/dcigettext.c
new file mode 100644
index 0000000..c0f347e
--- /dev/null
+++ b/lib/intl/dcigettext.c
@@ -0,0 +1,1248 @@
+/* dcigettext.c - Implementation of the internal dcigettext function. */
+
+/* Copyright (C) 1995-1999, 2000-2003, 2006-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# if defined HAVE_ALLOCA_H || defined _LIBC
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+#ifndef __set_errno
+# define __set_errno(val) errno = (val)
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#include <locale.h>
+
+#ifdef _LIBC
+ /* Guess whether integer division by zero raises signal SIGFPE.
+ Set to 1 only if you know for sure. In case of doubt, set to 0. */
+# if defined __alpha__ || defined __arm__ || defined __i386__ \
+ || defined __m68k__ || defined __s390__
+# define INTDIV0_RAISES_SIGFPE 1
+# else
+# define INTDIV0_RAISES_SIGFPE 0
+# endif
+#endif
+#if !INTDIV0_RAISES_SIGFPE
+# include <signal.h>
+#endif
+
+#if defined HAVE_SYS_PARAM_H || defined _LIBC
+# include <sys/param.h>
+#endif
+
+#include "gettextP.h"
+#include "plural-exp.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "hash-string.h"
+
+/* Thread safetyness. */
+#ifdef _LIBC
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc. */
+# define __libc_lock_define_initialized(CLASS, NAME)
+# define __libc_lock_lock(NAME)
+# define __libc_lock_unlock(NAME)
+# define __libc_rwlock_define_initialized(CLASS, NAME)
+# define __libc_rwlock_rdlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* Alignment of types. */
+#if defined __GNUC__ && __GNUC__ >= 2
+# define alignof(TYPE) __alignof__ (TYPE)
+#else
+# define alignof(TYPE) \
+ ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
+#endif
+
+/* The internal variables in the standalone libintl.a must have different
+ names than the internal variables in GNU libc, otherwise programs
+ using libintl.a cannot be linked statically. */
+#if !defined _LIBC
+# define _nl_default_default_domain libintl_nl_default_default_domain
+# define _nl_current_default_domain libintl_nl_current_default_domain
+# define _nl_default_dirname libintl_nl_default_dirname
+# define _nl_domain_bindings libintl_nl_domain_bindings
+#endif
+
+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
+#ifndef offsetof
+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
+#endif
+
+/* @@ end of prolog @@ */
+
+#if defined (SHELL) && !defined (HAVE_GETCWD)
+# define HAVE_GETCWD
+#endif
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions. This is required by the standard
+ because some ANSI C functions will require linking with this object
+ file and the name space must not be polluted. */
+# define getcwd __getcwd
+# ifndef stpcpy
+# define stpcpy __stpcpy
+# endif
+# define tfind __tfind
+#else
+# if !defined HAVE_GETCWD
+char *getwd ();
+# define getcwd(buf, max) getwd (buf)
+# else
+char *getcwd ();
+# endif
+# ifndef HAVE_STPCPY
+static char *stpcpy PARAMS ((char *dest, const char *src));
+# endif
+# ifndef HAVE_MEMPCPY
+static void *mempcpy PARAMS ((void *dest, const void *src, size_t n));
+# endif
+#endif
+
+/* Amount to increase buffer size by in each try. */
+#define PATH_INCR 32
+
+/* The following is from pathmax.h. */
+/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
+ PATH_MAX but might cause redefinition warnings when sys/param.h is
+ later included (as on MORE/BSD 4.3). */
+#if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__)
+# include <limits.h>
+#endif
+
+#ifndef _POSIX_PATH_MAX
+# define _POSIX_PATH_MAX 255
+#endif
+
+#if !defined PATH_MAX && defined _PC_PATH_MAX
+# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
+#endif
+
+/* Don't include sys/param.h if it already has been. */
+#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
+# include <sys/param.h>
+#endif
+
+#if !defined PATH_MAX && defined MAXPATHLEN
+# define PATH_MAX MAXPATHLEN
+#endif
+
+#ifndef PATH_MAX
+# define PATH_MAX _POSIX_PATH_MAX
+#endif
+
+/* Pathname support.
+ ISSLASH(C) tests whether C is a directory separator character.
+ IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
+ it may be concatenated to a directory pathname.
+ IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
+ */
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+# define HAS_DEVICE(P) \
+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
+ && (P)[1] == ':')
+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
+# define IS_PATH_WITH_DIR(P) \
+ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
+#else
+ /* Unix */
+# define ISSLASH(C) ((C) == '/')
+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
+#endif
+
+/* This is the type used for the search tree where known translations
+ are stored. */
+struct known_translation_t
+{
+ /* Domain in which to search. */
+ char *domainname;
+
+ /* The category. */
+ int category;
+
+ /* State of the catalog counter at the point the string was found. */
+ int counter;
+
+ /* Catalog where the string was found. */
+ struct loaded_l10nfile *domain;
+
+ /* And finally the translation. */
+ const char *translation;
+ size_t translation_length;
+
+ /* Pointer to the string in question. */
+ char msgid[ZERO];
+};
+
+/* Root of the search tree with known translations. We can use this
+ only if the system provides the `tsearch' function family. */
+#if defined HAVE_TSEARCH || defined _LIBC
+# include <search.h>
+
+static void *root;
+
+# ifdef _LIBC
+# define tsearch __tsearch
+# endif
+
+/* Function to compare two entries in the table of known translations. */
+static int transcmp PARAMS ((const void *p1, const void *p2));
+static int
+transcmp (p1, p2)
+ const void *p1;
+ const void *p2;
+{
+ const struct known_translation_t *s1;
+ const struct known_translation_t *s2;
+ int result;
+
+ s1 = (const struct known_translation_t *) p1;
+ s2 = (const struct known_translation_t *) p2;
+
+ result = strcmp (s1->msgid, s2->msgid);
+ if (result == 0)
+ {
+ result = strcmp (s1->domainname, s2->domainname);
+ if (result == 0)
+ /* We compare the category last (though this is the cheapest
+ operation) since it is hopefully always the same (namely
+ LC_MESSAGES). */
+ result = s1->category - s2->category;
+ }
+
+ return result;
+}
+#endif
+
+#ifndef INTVARDEF
+# define INTVARDEF(name)
+#endif
+#ifndef INTUSE
+# define INTUSE(name) name
+#endif
+
+/* Name of the default domain used for gettext(3) prior any call to
+ textdomain(3). The default value for this is "messages". */
+const char _nl_default_default_domain[] attribute_hidden = "messages";
+
+/* Value used as the default domain for gettext(3). */
+const char *_nl_current_default_domain attribute_hidden
+ = _nl_default_default_domain;
+
+/* Contains the default location of the message catalogs. */
+#if defined __EMX__
+extern const char _nl_default_dirname[];
+#else
+const char _nl_default_dirname[] = LOCALEDIR;
+INTVARDEF (_nl_default_dirname)
+#endif
+
+/* List with bindings of specific domains created by bindtextdomain()
+ calls. */
+struct binding *_nl_domain_bindings;
+
+/* Prototypes for local functions. */
+static char *plural_lookup PARAMS ((struct loaded_l10nfile *domain,
+ unsigned long int n,
+ const char *translation,
+ size_t translation_len))
+ internal_function;
+static const char *guess_category_value PARAMS ((int category,
+ const char *categoryname))
+ internal_function;
+#ifdef _LIBC
+# include "../locale/localeinfo.h"
+# define category_to_name(category) _nl_category_names[category]
+#else
+static const char *category_to_name PARAMS ((int category)) internal_function;
+#endif
+
+
+/* For those loosing systems which don't have `alloca' we have to add
+ some additional code emulating it. */
+#ifdef HAVE_ALLOCA
+/* Nothing has to be done. */
+# define freea(p) /* nothing */
+# define ADD_BLOCK(list, address) /* nothing */
+# define FREE_BLOCKS(list) /* nothing */
+#else
+struct block_list
+{
+ void *address;
+ struct block_list *next;
+};
+# define ADD_BLOCK(list, addr) \
+ do { \
+ struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
+ /* If we cannot get a free block we cannot add the new element to \
+ the list. */ \
+ if (newp != NULL) { \
+ newp->address = (addr); \
+ newp->next = (list); \
+ (list) = newp; \
+ } \
+ } while (0)
+# define FREE_BLOCKS(list) \
+ do { \
+ while (list != NULL) { \
+ struct block_list *old = list; \
+ list = list->next; \
+ free (old->address); \
+ free (old); \
+ } \
+ } while (0)
+# undef alloca
+# define alloca(size) (malloc (size))
+# define freea(p) free (p)
+#endif /* have alloca */
+
+
+#ifdef _LIBC
+/* List of blocks allocated for translations. */
+typedef struct transmem_list
+{
+ struct transmem_list *next;
+ char data[ZERO];
+} transmem_block_t;
+static struct transmem_list *transmem_list;
+#else
+typedef unsigned char transmem_block_t;
+#endif
+
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DCIGETTEXT __dcigettext
+#else
+# define DCIGETTEXT libintl_dcigettext
+#endif
+
+/* Lock variable to protect the global data in the gettext implementation. */
+#ifdef _LIBC
+__libc_rwlock_define_initialized (, _nl_state_lock attribute_hidden)
+#endif
+
+/* Checking whether the binaries runs SUID must be done and glibc provides
+ easier methods therefore we make a difference here. */
+#ifdef _LIBC
+# define ENABLE_SECURE __libc_enable_secure
+# define DETERMINE_SECURE
+#else
+# ifndef HAVE_GETUID
+# define getuid() 0
+# endif
+# ifndef HAVE_GETGID
+# define getgid() 0
+# endif
+# ifndef HAVE_GETEUID
+# define geteuid() getuid()
+# endif
+# ifndef HAVE_GETEGID
+# define getegid() getgid()
+# endif
+static int enable_secure;
+# define ENABLE_SECURE (enable_secure == 1)
+# define DETERMINE_SECURE \
+ if (enable_secure == 0) \
+ { \
+ if (getuid () != geteuid () || getgid () != getegid ()) \
+ enable_secure = 1; \
+ else \
+ enable_secure = -1; \
+ }
+#endif
+
+#ifndef HAVE_RAISE
+# define raise(x) kill (getpid (), (x))
+#endif
+
+/* Get the function to evaluate the plural expression. */
+#include "eval-plural.h"
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current
+ CATEGORY locale and, if PLURAL is nonzero, search over string
+ depending on the plural form determined by N. */
+char *
+DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
+ const char *domainname;
+ const char *msgid1;
+ const char *msgid2;
+ int plural;
+ unsigned long int n;
+ int category;
+{
+#ifndef HAVE_ALLOCA
+ struct block_list *block_list = NULL;
+#endif
+ struct loaded_l10nfile *domain;
+ struct binding *binding;
+ const char *categoryname;
+ const char *categoryvalue;
+ char *dirname, *xdomainname;
+ char *single_locale;
+ char *retval;
+ size_t retlen;
+ int saved_errno;
+#if defined HAVE_TSEARCH || defined _LIBC
+ struct known_translation_t *search;
+ struct known_translation_t **foundp = NULL;
+ size_t msgid_len;
+#endif
+ size_t domainname_len;
+
+ /* If no real MSGID is given return NULL. */
+ if (msgid1 == NULL)
+ return NULL;
+
+#ifdef _LIBC
+ if (category < 0 || category >= __LC_LAST || category == LC_ALL)
+ /* Bogus. */
+ return (plural == 0
+ ? (char *) msgid1
+ /* Use the Germanic plural rule. */
+ : n == 1 ? (char *) msgid1 : (char *) msgid2);
+#endif
+
+ __libc_rwlock_rdlock (_nl_state_lock);
+
+ /* If DOMAINNAME is NULL, we are interested in the default domain. If
+ CATEGORY is not LC_MESSAGES this might not make much sense but the
+ definition left this undefined. */
+ if (domainname == NULL)
+ domainname = _nl_current_default_domain;
+
+ /* OS/2 specific: backward compatibility with older libintl versions */
+#ifdef LC_MESSAGES_COMPAT
+ if (category == LC_MESSAGES_COMPAT)
+ category = LC_MESSAGES;
+#endif
+
+#if defined HAVE_TSEARCH || defined _LIBC
+ msgid_len = strlen (msgid1) + 1;
+
+ /* Try to find the translation among those which we found at
+ some time. */
+ search = (struct known_translation_t *)
+ alloca (offsetof (struct known_translation_t, msgid) + msgid_len);
+ memcpy (search->msgid, msgid1, msgid_len);
+ search->domainname = (char *) domainname;
+ search->category = category;
+
+ foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
+ freea (search);
+ if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
+ {
+ /* Now deal with plural. */
+ if (plural)
+ retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation,
+ (*foundp)->translation_length);
+ else
+ retval = (char *) (*foundp)->translation;
+
+ __libc_rwlock_unlock (_nl_state_lock);
+ return retval;
+ }
+#endif
+
+ /* Preserve the `errno' value. */
+ saved_errno = errno;
+
+ /* See whether this is a SUID binary or not. */
+ DETERMINE_SECURE;
+
+ /* First find matching binding. */
+ for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
+ {
+ int compare = strcmp (domainname, binding->domainname);
+ if (compare == 0)
+ /* We found it! */
+ break;
+ if (compare < 0)
+ {
+ /* It is not in the list. */
+ binding = NULL;
+ break;
+ }
+ }
+
+ if (binding == NULL)
+ dirname = (char *) INTUSE(_nl_default_dirname);
+ else if (IS_ABSOLUTE_PATH (binding->dirname))
+ dirname = binding->dirname;
+ else
+ {
+ /* We have a relative path. Make it absolute now. */
+ size_t dirname_len = strlen (binding->dirname) + 1;
+ size_t path_max;
+ char *ret;
+
+ path_max = (unsigned int) PATH_MAX;
+ path_max += 2; /* The getcwd docs say to do this. */
+
+ for (;;)
+ {
+ dirname = (char *) alloca (path_max + dirname_len);
+ ADD_BLOCK (block_list, dirname);
+
+ __set_errno (0);
+ ret = getcwd (dirname, path_max);
+ if (ret != NULL || errno != ERANGE)
+ break;
+
+ path_max += path_max / 2;
+ path_max += PATH_INCR;
+ }
+
+ if (ret == NULL)
+ /* We cannot get the current working directory. Don't signal an
+ error but simply return the default string. */
+ goto return_untranslated;
+
+ stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
+ }
+
+ /* Now determine the symbolic name of CATEGORY and its value. */
+ categoryname = category_to_name (category);
+ categoryvalue = guess_category_value (category, categoryname);
+
+ domainname_len = strlen (domainname);
+ xdomainname = (char *) alloca (strlen (categoryname)
+ + domainname_len + 5);
+ ADD_BLOCK (block_list, xdomainname);
+
+ stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
+ domainname, domainname_len),
+ ".mo");
+
+ /* Creating working area. */
+ single_locale = (char *) alloca (strlen (categoryvalue) + 1);
+ ADD_BLOCK (block_list, single_locale);
+
+
+ /* Search for the given string. This is a loop because we perhaps
+ got an ordered list of languages to consider for the translation. */
+ while (1)
+ {
+ /* Make CATEGORYVALUE point to the next element of the list. */
+ while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
+ ++categoryvalue;
+ if (categoryvalue[0] == '\0')
+ {
+ /* The whole contents of CATEGORYVALUE has been searched but
+ no valid entry has been found. We solve this situation
+ by implicitly appending a "C" entry, i.e. no translation
+ will take place. */
+ single_locale[0] = 'C';
+ single_locale[1] = '\0';
+ }
+ else
+ {
+ char *cp = single_locale;
+ while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
+ *cp++ = *categoryvalue++;
+ *cp = '\0';
+
+ /* When this is a SUID binary we must not allow accessing files
+ outside the dedicated directories. */
+ if (ENABLE_SECURE && IS_PATH_WITH_DIR (single_locale))
+ /* Ingore this entry. */
+ continue;
+ }
+
+ /* If the current locale value is C (or POSIX) we don't load a
+ domain. Return the MSGID. */
+ if (strcmp (single_locale, "C") == 0
+ || strcmp (single_locale, "POSIX") == 0)
+ break;
+
+ /* Find structure describing the message catalog matching the
+ DOMAINNAME and CATEGORY. */
+ domain = _nl_find_domain (dirname, single_locale, xdomainname, binding);
+
+ if (domain != NULL)
+ {
+ retval = _nl_find_msg (domain, binding, msgid1, &retlen);
+
+ if (retval == NULL)
+ {
+ int cnt;
+
+ for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
+ {
+ retval = _nl_find_msg (domain->successor[cnt], binding,
+ msgid1, &retlen);
+
+ if (retval != NULL)
+ {
+ domain = domain->successor[cnt];
+ break;
+ }
+ }
+ }
+
+ if (retval != NULL)
+ {
+ /* Found the translation of MSGID1 in domain DOMAIN:
+ starting at RETVAL, RETLEN bytes. */
+ FREE_BLOCKS (block_list);
+#if defined HAVE_TSEARCH || defined _LIBC
+ if (foundp == NULL)
+ {
+ /* Create a new entry and add it to the search tree. */
+ struct known_translation_t *newp;
+
+ newp = (struct known_translation_t *)
+ malloc (offsetof (struct known_translation_t, msgid)
+ + msgid_len + domainname_len + 1);
+ if (newp != NULL)
+ {
+ newp->domainname =
+ mempcpy (newp->msgid, msgid1, msgid_len);
+ memcpy (newp->domainname, domainname, domainname_len + 1);
+ newp->category = category;
+ newp->counter = _nl_msg_cat_cntr;
+ newp->domain = domain;
+ newp->translation = retval;
+ newp->translation_length = retlen;
+
+ /* Insert the entry in the search tree. */
+ foundp = (struct known_translation_t **)
+ tsearch (newp, &root, transcmp);
+ if (foundp == NULL
+ || __builtin_expect (*foundp != newp, 0))
+ /* The insert failed. */
+ free (newp);
+ }
+ }
+ else
+ {
+ /* We can update the existing entry. */
+ (*foundp)->counter = _nl_msg_cat_cntr;
+ (*foundp)->domain = domain;
+ (*foundp)->translation = retval;
+ (*foundp)->translation_length = retlen;
+ }
+#endif
+ __set_errno (saved_errno);
+
+ /* Now deal with plural. */
+ if (plural)
+ retval = plural_lookup (domain, n, retval, retlen);
+
+ __libc_rwlock_unlock (_nl_state_lock);
+ return retval;
+ }
+ }
+ }
+
+ return_untranslated:
+ /* Return the untranslated MSGID. */
+ FREE_BLOCKS (block_list);
+ __libc_rwlock_unlock (_nl_state_lock);
+#ifndef _LIBC
+ if (!ENABLE_SECURE)
+ {
+ extern void _nl_log_untranslated PARAMS ((const char *logfilename,
+ const char *domainname,
+ const char *msgid1,
+ const char *msgid2,
+ int plural));
+ const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED");
+
+ if (logfilename != NULL && logfilename[0] != '\0')
+ _nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural);
+ }
+#endif
+ __set_errno (saved_errno);
+ return (plural == 0
+ ? (char *) msgid1
+ /* Use the Germanic plural rule. */
+ : n == 1 ? (char *) msgid1 : (char *) msgid2);
+}
+
+
+char *
+internal_function
+_nl_find_msg (domain_file, domainbinding, msgid, lengthp)
+ struct loaded_l10nfile *domain_file;
+ struct binding *domainbinding;
+ const char *msgid;
+ size_t *lengthp;
+{
+ struct loaded_domain *domain;
+ nls_uint32 nstrings;
+ size_t act;
+ char *result;
+ size_t resultlen;
+
+ if (domain_file->decided == 0)
+ _nl_load_domain (domain_file, domainbinding);
+
+ if (domain_file->data == NULL)
+ return NULL;
+
+ domain = (struct loaded_domain *) domain_file->data;
+
+ nstrings = domain->nstrings;
+
+ /* Locate the MSGID and its translation. */
+ if (domain->hash_tab != NULL)
+ {
+ /* Use the hashing table. */
+ nls_uint32 len = strlen (msgid);
+ nls_uint32 hash_val = hash_string (msgid);
+ nls_uint32 idx = hash_val % domain->hash_size;
+ nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
+
+ while (1)
+ {
+ nls_uint32 nstr =
+ W (domain->must_swap_hash_tab, domain->hash_tab[idx]);
+
+ if (nstr == 0)
+ /* Hash table entry is empty. */
+ return NULL;
+
+ nstr--;
+
+ /* Compare msgid with the original string at index nstr.
+ We compare the lengths with >=, not ==, because plural entries
+ are represented by strings with an embedded NUL. */
+ if (nstr < nstrings
+ ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len
+ && (strcmp (msgid,
+ domain->data + W (domain->must_swap,
+ domain->orig_tab[nstr].offset))
+ == 0)
+ : domain->orig_sysdep_tab[nstr - nstrings].length > len
+ && (strcmp (msgid,
+ domain->orig_sysdep_tab[nstr - nstrings].pointer)
+ == 0))
+ {
+ act = nstr;
+ goto found;
+ }
+
+ if (idx >= domain->hash_size - incr)
+ idx -= domain->hash_size - incr;
+ else
+ idx += incr;
+ }
+ /* NOTREACHED */
+ }
+ else
+ {
+ /* Try the default method: binary search in the sorted array of
+ messages. */
+ size_t top, bottom;
+
+ bottom = 0;
+ top = nstrings;
+ while (bottom < top)
+ {
+ int cmp_val;
+
+ act = (bottom + top) / 2;
+ cmp_val = strcmp (msgid, (domain->data
+ + W (domain->must_swap,
+ domain->orig_tab[act].offset)));
+ if (cmp_val < 0)
+ top = act;
+ else if (cmp_val > 0)
+ bottom = act + 1;
+ else
+ goto found;
+ }
+ /* No translation was found. */
+ return NULL;
+ }
+
+ found:
+ /* The translation was found at index ACT. If we have to convert the
+ string to use a different character set, this is the time. */
+ if (act < nstrings)
+ {
+ result = (char *)
+ (domain->data + W (domain->must_swap, domain->trans_tab[act].offset));
+ resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1;
+ }
+ else
+ {
+ result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer;
+ resultlen = domain->trans_sysdep_tab[act - nstrings].length;
+ }
+
+#if defined _LIBC || HAVE_ICONV
+ if (domain->codeset_cntr
+ != (domainbinding != NULL ? domainbinding->codeset_cntr : 0))
+ {
+ /* The domain's codeset has changed through bind_textdomain_codeset()
+ since the message catalog was initialized or last accessed. We
+ have to reinitialize the converter. */
+ _nl_free_domain_conv (domain);
+ _nl_init_domain_conv (domain_file, domain, domainbinding);
+ }
+
+ if (
+# ifdef _LIBC
+ domain->conv != (__gconv_t) -1
+# else
+# if HAVE_ICONV
+ domain->conv != (iconv_t) -1
+# endif
+# endif
+ )
+ {
+ /* We are supposed to do a conversion. First allocate an
+ appropriate table with the same structure as the table
+ of translations in the file, where we can put the pointers
+ to the converted strings in.
+ There is a slight complication with plural entries. They
+ are represented by consecutive NUL terminated strings. We
+ handle this case by converting RESULTLEN bytes, including
+ NULs. */
+
+ if (domain->conv_tab == NULL
+ && ((domain->conv_tab =
+ (char **) calloc (nstrings + domain->n_sysdep_strings,
+ sizeof (char *)))
+ == NULL))
+ /* Mark that we didn't succeed allocating a table. */
+ domain->conv_tab = (char **) -1;
+
+ if (__builtin_expect (domain->conv_tab == (char **) -1, 0))
+ /* Nothing we can do, no more memory. */
+ goto converted;
+
+ if (domain->conv_tab[act] == NULL)
+ {
+ /* We haven't used this string so far, so it is not
+ translated yet. Do this now. */
+ /* We use a bit more efficient memory handling.
+ We allocate always larger blocks which get used over
+ time. This is faster than many small allocations. */
+ __libc_lock_define_initialized (static, lock)
+# define INITIAL_BLOCK_SIZE 4080
+ static unsigned char *freemem;
+ static size_t freemem_size;
+
+ const unsigned char *inbuf;
+ unsigned char *outbuf;
+ int malloc_count;
+# ifndef _LIBC
+ transmem_block_t *transmem_list = NULL;
+# endif
+
+ __libc_lock_lock (lock);
+
+ inbuf = (const unsigned char *) result;
+ outbuf = freemem + sizeof (size_t);
+
+ malloc_count = 0;
+ while (1)
+ {
+ transmem_block_t *newmem;
+# ifdef _LIBC
+ size_t non_reversible;
+ int res;
+
+ if (freemem_size < sizeof (size_t))
+ goto resize_freemem;
+
+ res = __gconv (domain->conv,
+ &inbuf, inbuf + resultlen,
+ &outbuf,
+ outbuf + freemem_size - sizeof (size_t),
+ &non_reversible);
+
+ if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT)
+ break;
+
+ if (res != __GCONV_FULL_OUTPUT)
+ {
+ __libc_lock_unlock (lock);
+ goto converted;
+ }
+
+ inbuf = result;
+# else
+# if HAVE_ICONV
+ const char *inptr = (const char *) inbuf;
+ size_t inleft = resultlen;
+ char *outptr = (char *) outbuf;
+ size_t outleft;
+
+ if (freemem_size < sizeof (size_t))
+ goto resize_freemem;
+
+ outleft = freemem_size - sizeof (size_t);
+ if (iconv (domain->conv,
+ (ICONV_CONST char **) &inptr, &inleft,
+ &outptr, &outleft)
+ != (size_t) (-1))
+ {
+ outbuf = (unsigned char *) outptr;
+ break;
+ }
+ if (errno != E2BIG)
+ {
+ __libc_lock_unlock (lock);
+ goto converted;
+ }
+# endif
+# endif
+
+ resize_freemem:
+ /* We must allocate a new buffer or resize the old one. */
+ if (malloc_count > 0)
+ {
+ ++malloc_count;
+ freemem_size = malloc_count * INITIAL_BLOCK_SIZE;
+ newmem = (transmem_block_t *) realloc (transmem_list,
+ freemem_size);
+# ifdef _LIBC
+ if (newmem != NULL)
+ transmem_list = transmem_list->next;
+ else
+ {
+ struct transmem_list *old = transmem_list;
+
+ transmem_list = transmem_list->next;
+ free (old);
+ }
+# endif
+ }
+ else
+ {
+ malloc_count = 1;
+ freemem_size = INITIAL_BLOCK_SIZE;
+ newmem = (transmem_block_t *) malloc (freemem_size);
+ }
+ if (__builtin_expect (newmem == NULL, 0))
+ {
+ freemem = NULL;
+ freemem_size = 0;
+ __libc_lock_unlock (lock);
+ goto converted;
+ }
+
+# ifdef _LIBC
+ /* Add the block to the list of blocks we have to free
+ at some point. */
+ newmem->next = transmem_list;
+ transmem_list = newmem;
+
+ freemem = newmem->data;
+ freemem_size -= offsetof (struct transmem_list, data);
+# else
+ transmem_list = newmem;
+ freemem = newmem;
+# endif
+
+ outbuf = freemem + sizeof (size_t);
+ }
+
+ /* We have now in our buffer a converted string. Put this
+ into the table of conversions. */
+ *(size_t *) freemem = outbuf - freemem - sizeof (size_t);
+ domain->conv_tab[act] = (char *) freemem;
+ /* Shrink freemem, but keep it aligned. */
+ freemem_size -= outbuf - freemem;
+ freemem = outbuf;
+ freemem += freemem_size & (alignof (size_t) - 1);
+ freemem_size = freemem_size & ~ (alignof (size_t) - 1);
+
+ __libc_lock_unlock (lock);
+ }
+
+ /* Now domain->conv_tab[act] contains the translation of all
+ the plural variants. */
+ result = domain->conv_tab[act] + sizeof (size_t);
+ resultlen = *(size_t *) domain->conv_tab[act];
+ }
+
+ converted:
+ /* The result string is converted. */
+
+#endif /* _LIBC || HAVE_ICONV */
+
+ *lengthp = resultlen;
+ return result;
+}
+
+
+/* Look up a plural variant. */
+static char *
+internal_function
+plural_lookup (domain, n, translation, translation_len)
+ struct loaded_l10nfile *domain;
+ unsigned long int n;
+ const char *translation;
+ size_t translation_len;
+{
+ struct loaded_domain *domaindata = (struct loaded_domain *) domain->data;
+ unsigned long int index;
+ const char *p;
+
+ index = plural_eval (domaindata->plural, n);
+ if (index >= domaindata->nplurals)
+ /* This should never happen. It means the plural expression and the
+ given maximum value do not match. */
+ index = 0;
+
+ /* Skip INDEX strings at TRANSLATION. */
+ p = translation;
+ while (index-- > 0)
+ {
+#ifdef _LIBC
+ p = __rawmemchr (p, '\0');
+#else
+ p = strchr (p, '\0');
+#endif
+ /* And skip over the NUL byte. */
+ p++;
+
+ if (p >= translation + translation_len)
+ /* This should never happen. It means the plural expression
+ evaluated to a value larger than the number of variants
+ available for MSGID1. */
+ return (char *) translation;
+ }
+ return (char *) p;
+}
+
+#ifndef _LIBC
+/* Return string representation of locale CATEGORY. */
+static const char *
+internal_function
+category_to_name (category)
+ int category;
+{
+ const char *retval;
+
+ switch (category)
+ {
+#ifdef LC_COLLATE
+ case LC_COLLATE:
+ retval = "LC_COLLATE";
+ break;
+#endif
+#ifdef LC_CTYPE
+ case LC_CTYPE:
+ retval = "LC_CTYPE";
+ break;
+#endif
+#ifdef LC_MONETARY
+ case LC_MONETARY:
+ retval = "LC_MONETARY";
+ break;
+#endif
+#ifdef LC_NUMERIC
+ case LC_NUMERIC:
+ retval = "LC_NUMERIC";
+ break;
+#endif
+#ifdef LC_TIME
+ case LC_TIME:
+ retval = "LC_TIME";
+ break;
+#endif
+#ifdef LC_MESSAGES
+ case LC_MESSAGES:
+ retval = "LC_MESSAGES";
+ break;
+#endif
+#ifdef LC_RESPONSE
+ case LC_RESPONSE:
+ retval = "LC_RESPONSE";
+ break;
+#endif
+#ifdef LC_ALL
+ case LC_ALL:
+ /* This might not make sense but is perhaps better than any other
+ value. */
+ retval = "LC_ALL";
+ break;
+#endif
+ default:
+ /* If you have a better idea for a default value let me know. */
+ retval = "LC_XXX";
+ }
+
+ return retval;
+}
+#endif
+
+/* Guess value of current locale from value of the environment variables. */
+static const char *
+internal_function
+guess_category_value (category, categoryname)
+ int category;
+ const char *categoryname;
+{
+ const char *language;
+ const char *retval;
+
+ /* The highest priority value is the `LANGUAGE' environment
+ variable. But we don't use the value if the currently selected
+ locale is the C locale. This is a GNU extension. */
+ language = getenv ("LANGUAGE");
+ if (language != NULL && language[0] == '\0')
+ language = NULL;
+
+ /* We have to proceed with the POSIX methods of looking to `LC_ALL',
+ `LC_xxx', and `LANG'. On some systems this can be done by the
+ `setlocale' function itself. */
+#ifdef _LIBC
+ retval = __current_locale_name (category);
+#else
+ retval = _nl_locale_name (category, categoryname);
+#endif
+
+ /* Ignore LANGUAGE if the locale is set to "C" because
+ 1. "C" locale usually uses the ASCII encoding, and most international
+ messages use non-ASCII characters. These characters get displayed
+ as question marks (if using glibc's iconv()) or as invalid 8-bit
+ characters (because other iconv()s refuse to convert most non-ASCII
+ characters to ASCII). In any case, the output is ugly.
+ 2. The precise output of some programs in the "C" locale is specified
+ by POSIX and should not depend on environment variables like
+ "LANGUAGE". We allow such programs to use gettext(). */
+ return language != NULL && strcmp (retval, "C") != 0 ? language : retval;
+}
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library. So we
+ avoid the non-standard function stpcpy. In GNU C Library this
+ function is available, though. Also allow the symbol HAVE_STPCPY
+ to be defined. */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (dest, src)
+ char *dest;
+ const char *src;
+{
+ while ((*dest++ = *src++) != '\0')
+ /* Do nothing. */ ;
+ return dest - 1;
+}
+#endif
+
+#if !_LIBC && !HAVE_MEMPCPY
+static void *
+mempcpy (dest, src, n)
+ void *dest;
+ const void *src;
+ size_t n;
+{
+ return (void *) ((char *) memcpy (dest, src, n) + n);
+}
+#endif
+
+
+#ifdef _LIBC
+/* If we want to free all resources we have to do some work at
+ program's end. */
+libc_freeres_fn (free_mem)
+{
+ void *old;
+
+ while (_nl_domain_bindings != NULL)
+ {
+ struct binding *oldp = _nl_domain_bindings;
+ _nl_domain_bindings = _nl_domain_bindings->next;
+ if (oldp->dirname != INTUSE(_nl_default_dirname))
+ /* Yes, this is a pointer comparison. */
+ free (oldp->dirname);
+ free (oldp->codeset);
+ free (oldp);
+ }
+
+ if (_nl_current_default_domain != _nl_default_default_domain)
+ /* Yes, again a pointer comparison. */
+ free ((char *) _nl_current_default_domain);
+
+ /* Remove the search tree with the known translations. */
+ __tdestroy (root, free);
+ root = NULL;
+
+ while (transmem_list != NULL)
+ {
+ old = transmem_list;
+ transmem_list = transmem_list->next;
+ free (old);
+ }
+}
+#endif
diff --git a/lib/intl/dcngettext.c b/lib/intl/dcngettext.c
new file mode 100644
index 0000000..3d70b18
--- /dev/null
+++ b/lib/intl/dcngettext.c
@@ -0,0 +1,62 @@
+/* dcngettext.c - Implementation of the dcngettext(3) function. */
+
+/* Copyright (C) 1995-1999, 2000, 2001, 2002, 2006-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DCNGETTEXT __dcngettext
+# define DCIGETTEXT __dcigettext
+#else
+# define DCNGETTEXT libintl_dcngettext
+# define DCIGETTEXT libintl_dcigettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+ locale. */
+char *
+DCNGETTEXT (domainname, msgid1, msgid2, n, category)
+ const char *domainname;
+ const char *msgid1;
+ const char *msgid2;
+ unsigned long int n;
+ int category;
+{
+ return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__dcngettext, dcngettext);
+#endif
diff --git a/lib/intl/dgettext.c b/lib/intl/dgettext.c
new file mode 100644
index 0000000..5351631
--- /dev/null
+++ b/lib/intl/dgettext.c
@@ -0,0 +1,61 @@
+/* dgettext.c - Implementation of the dgettext(3) function. */
+
+/* Copyright (C) 1995-1997, 2000, 2001, 2002, 2006-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <locale.h>
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DGETTEXT __dgettext
+# define DCGETTEXT INTUSE(__dcgettext)
+#else
+# define DGETTEXT libintl_dgettext
+# define DCGETTEXT libintl_dcgettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog of the current
+ LC_MESSAGES locale. */
+char *
+DGETTEXT (domainname, msgid)
+ const char *domainname;
+ const char *msgid;
+{
+ return DCGETTEXT (domainname, msgid, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__dgettext, dgettext);
+#endif
diff --git a/lib/intl/dngettext.c b/lib/intl/dngettext.c
new file mode 100644
index 0000000..4276f3b
--- /dev/null
+++ b/lib/intl/dngettext.c
@@ -0,0 +1,63 @@
+/* dngettext.c - Implementation of the dngettext(3) function. */
+
+/* Copyright (C) 1995-1997, 2000, 2001, 2002, 2005, 2006, 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <locale.h>
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define DNGETTEXT __dngettext
+# define DCNGETTEXT __dcngettext
+#else
+# define DNGETTEXT libintl_dngettext
+# define DCNGETTEXT libintl_dcngettext
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog of the current
+ LC_MESSAGES locale and skip message according to the plural form. */
+char *
+DNGETTEXT (domainname, msgid1, msgid2, n)
+ const char *domainname;
+ const char *msgid1;
+ const char *msgid2;
+ unsigned long int n;
+{
+ return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__dngettext, dngettext);
+#endif
diff --git a/lib/intl/eval-plural.h b/lib/intl/eval-plural.h
new file mode 100644
index 0000000..3441c74
--- /dev/null
+++ b/lib/intl/eval-plural.h
@@ -0,0 +1,116 @@
+/* eval-plural.c - Plural expression evaluation. */
+
+/* Copyright (C) 2000-2002, 2006-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef STATIC
+#define STATIC static
+#endif
+
+/* Evaluate the plural expression and return an index value. */
+STATIC unsigned long int plural_eval PARAMS ((struct expression *pexp,
+ unsigned long int n))
+ internal_function;
+
+STATIC
+unsigned long int
+internal_function
+plural_eval (pexp, n)
+ struct expression *pexp;
+ unsigned long int n;
+{
+ switch (pexp->nargs)
+ {
+ case 0:
+ switch (pexp->operation)
+ {
+ case var:
+ return n;
+ case num:
+ return pexp->val.num;
+ default:
+ break;
+ }
+ /* NOTREACHED */
+ break;
+ case 1:
+ {
+ /* pexp->operation must be lnot. */
+ unsigned long int arg = plural_eval (pexp->val.args[0], n);
+ return ! arg;
+ }
+ case 2:
+ {
+ unsigned long int leftarg = plural_eval (pexp->val.args[0], n);
+ if (pexp->operation == lor)
+ return leftarg || plural_eval (pexp->val.args[1], n);
+ else if (pexp->operation == land)
+ return leftarg && plural_eval (pexp->val.args[1], n);
+ else
+ {
+ unsigned long int rightarg = plural_eval (pexp->val.args[1], n);
+
+ switch (pexp->operation)
+ {
+ case mult:
+ return leftarg * rightarg;
+ case divide:
+#if !INTDIV0_RAISES_SIGFPE
+ if (rightarg == 0)
+ raise (SIGFPE);
+#endif
+ return leftarg / rightarg;
+ case module:
+#if !INTDIV0_RAISES_SIGFPE
+ if (rightarg == 0)
+ raise (SIGFPE);
+#endif
+ return leftarg % rightarg;
+ case plus:
+ return leftarg + rightarg;
+ case minus:
+ return leftarg - rightarg;
+ case less_than:
+ return leftarg < rightarg;
+ case greater_than:
+ return leftarg > rightarg;
+ case less_or_equal:
+ return leftarg <= rightarg;
+ case greater_or_equal:
+ return leftarg >= rightarg;
+ case equal:
+ return leftarg == rightarg;
+ case not_equal:
+ return leftarg != rightarg;
+ default:
+ break;
+ }
+ }
+ /* NOTREACHED */
+ break;
+ }
+ case 3:
+ {
+ /* pexp->operation must be qmop. */
+ unsigned long int boolarg = plural_eval (pexp->val.args[0], n);
+ return plural_eval (pexp->val.args[boolarg ? 1 : 2], n);
+ }
+ }
+ /* NOTREACHED */
+ return 0;
+}
diff --git a/lib/intl/explodename.c b/lib/intl/explodename.c
new file mode 100644
index 0000000..adc3640
--- /dev/null
+++ b/lib/intl/explodename.c
@@ -0,0 +1,195 @@
+/* explodename.c */
+
+/* Copyright (C) 1995-1998, 2000, 2001, 2005-2009 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/types.h>
+
+#include "loadinfo.h"
+
+/* On some strange systems still no definition of NULL is found. Sigh! */
+#ifndef NULL
+# if defined __STDC__ && __STDC__
+# define NULL ((void *) 0)
+# else
+# define NULL 0
+# endif
+#endif
+
+/* @@ end of prolog @@ */
+
+char *
+_nl_find_language (name)
+ const char *name;
+{
+ while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
+ && name[0] != '+' && name[0] != ',')
+ ++name;
+
+ return (char *) name;
+}
+
+
+int
+_nl_explode_name (name, language, modifier, territory, codeset,
+ normalized_codeset, special, sponsor, revision)
+ char *name;
+ const char **language;
+ const char **modifier;
+ const char **territory;
+ const char **codeset;
+ const char **normalized_codeset;
+ const char **special;
+ const char **sponsor;
+ const char **revision;
+{
+ enum { undecided, xpg, cen } syntax;
+ char *cp;
+ int mask;
+
+ *modifier = NULL;
+ *territory = NULL;
+ *codeset = NULL;
+ *normalized_codeset = NULL;
+ *special = NULL;
+ *sponsor = NULL;
+ *revision = NULL;
+
+ /* Now we determine the single parts of the locale name. First
+ look for the language. Termination symbols are `_' and `@' if
+ we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
+ mask = 0;
+ syntax = undecided;
+ *language = cp = name;
+ cp = _nl_find_language (*language);
+
+ if (*language == cp)
+ /* This does not make sense: language has to be specified. Use
+ this entry as it is without exploding. Perhaps it is an alias. */
+ cp = strchr (*language, '\0');
+ else if (cp[0] == '_')
+ {
+ /* Next is the territory. */
+ cp[0] = '\0';
+ *territory = ++cp;
+
+ while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
+ && cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
+ ++cp;
+
+ mask |= TERRITORY;
+
+ if (cp[0] == '.')
+ {
+ /* Next is the codeset. */
+ syntax = xpg;
+ cp[0] = '\0';
+ *codeset = ++cp;
+
+ while (cp[0] != '\0' && cp[0] != '@')
+ ++cp;
+
+ mask |= XPG_CODESET;
+
+ if (*codeset != cp && (*codeset)[0] != '\0')
+ {
+ *normalized_codeset = _nl_normalize_codeset (*codeset,
+ cp - *codeset);
+ if (strcmp (*codeset, *normalized_codeset) == 0)
+ free ((char *) *normalized_codeset);
+ else
+ mask |= XPG_NORM_CODESET;
+ }
+ }
+ }
+
+ if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
+ {
+ /* Next is the modifier. */
+ syntax = cp[0] == '@' ? xpg : cen;
+ cp[0] = '\0';
+ *modifier = ++cp;
+
+ while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
+ && cp[0] != ',' && cp[0] != '_')
+ ++cp;
+
+ mask |= XPG_MODIFIER | CEN_AUDIENCE;
+ }
+
+ if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
+ {
+ syntax = cen;
+
+ if (cp[0] == '+')
+ {
+ /* Next is special application (CEN syntax). */
+ cp[0] = '\0';
+ *special = ++cp;
+
+ while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
+ ++cp;
+
+ mask |= CEN_SPECIAL;
+ }
+
+ if (cp[0] == ',')
+ {
+ /* Next is sponsor (CEN syntax). */
+ cp[0] = '\0';
+ *sponsor = ++cp;
+
+ while (cp[0] != '\0' && cp[0] != '_')
+ ++cp;
+
+ mask |= CEN_SPONSOR;
+ }
+
+ if (cp[0] == '_')
+ {
+ /* Next is revision (CEN syntax). */
+ cp[0] = '\0';
+ *revision = ++cp;
+
+ mask |= CEN_REVISION;
+ }
+ }
+
+ /* For CEN syntax values it might be important to have the
+ separator character in the file name, not for XPG syntax. */
+ if (syntax == xpg)
+ {
+ if (*territory != NULL && (*territory)[0] == '\0')
+ mask &= ~TERRITORY;
+
+ if (*codeset != NULL && (*codeset)[0] == '\0')
+ mask &= ~XPG_CODESET;
+
+ if (*modifier != NULL && (*modifier)[0] == '\0')
+ mask &= ~XPG_MODIFIER;
+ }
+
+ return mask;
+}
diff --git a/lib/intl/finddomain.c b/lib/intl/finddomain.c
new file mode 100644
index 0000000..69a3586
--- /dev/null
+++ b/lib/intl/finddomain.c
@@ -0,0 +1,197 @@
+/* finddomain.c - Handle list of needed message catalogs */
+
+/* Copyright (C) 1995-1999, 2000, 2001, 2005-2009 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@gnu.org>, 1995.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+/* List of already loaded domains. */
+static struct loaded_l10nfile *_nl_loaded_domains;
+
+
+/* Return a data structure describing the message catalog described by
+ the DOMAINNAME and CATEGORY parameters with respect to the currently
+ established bindings. */
+struct loaded_l10nfile *
+internal_function
+_nl_find_domain (dirname, locale, domainname, domainbinding)
+ const char *dirname;
+ char *locale;
+ const char *domainname;
+ struct binding *domainbinding;
+{
+ struct loaded_l10nfile *retval;
+ const char *language;
+ const char *modifier;
+ const char *territory;
+ const char *codeset;
+ const char *normalized_codeset;
+ const char *special;
+ const char *sponsor;
+ const char *revision;
+ const char *alias_value;
+ int mask;
+
+ /* LOCALE can consist of up to four recognized parts for the XPG syntax:
+
+ language[_territory[.codeset]][@modifier]
+
+ and six parts for the CEN syntax:
+
+ language[_territory][+audience][+special][,[sponsor][_revision]]
+
+ Beside the first part all of them are allowed to be missing. If
+ the full specified locale is not found, the less specific one are
+ looked for. The various parts will be stripped off according to
+ the following order:
+ (1) revision
+ (2) sponsor
+ (3) special
+ (4) codeset
+ (5) normalized codeset
+ (6) territory
+ (7) audience/modifier
+ */
+
+ /* If we have already tested for this locale entry there has to
+ be one data set in the list of loaded domains. */
+ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
+ strlen (dirname) + 1, 0, locale, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, domainname, 0);
+ if (retval != NULL)
+ {
+ /* We know something about this locale. */
+ int cnt;
+
+ if (retval->decided == 0)
+ _nl_load_domain (retval, domainbinding);
+
+ if (retval->data != NULL)
+ return retval;
+
+ for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
+ {
+ if (retval->successor[cnt]->decided == 0)
+ _nl_load_domain (retval->successor[cnt], domainbinding);
+
+ if (retval->successor[cnt]->data != NULL)
+ break;
+ }
+ return cnt >= 0 ? retval : NULL;
+ /* NOTREACHED */
+ }
+
+ /* See whether the locale value is an alias. If yes its value
+ *overwrites* the alias name. No test for the original value is
+ done. */
+ alias_value = _nl_expand_alias (locale);
+ if (alias_value != NULL)
+ {
+#if defined _LIBC || defined HAVE_STRDUP
+ locale = strdup (alias_value);
+ if (locale == NULL)
+ return NULL;
+#else
+ size_t len = strlen (alias_value) + 1;
+ locale = (char *) malloc (len);
+ if (locale == NULL)
+ return NULL;
+
+ memcpy (locale, alias_value, len);
+#endif
+ }
+
+ /* Now we determine the single parts of the locale name. First
+ look for the language. Termination symbols are `_' and `@' if
+ we use XPG4 style, and `_', `+', and `,' if we use CEN syntax. */
+ mask = _nl_explode_name (locale, &language, &modifier, &territory,
+ &codeset, &normalized_codeset, &special,
+ &sponsor, &revision);
+
+ /* Create all possible locale entries which might be interested in
+ generalization. */
+ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
+ strlen (dirname) + 1, mask, language, territory,
+ codeset, normalized_codeset, modifier, special,
+ sponsor, revision, domainname, 1);
+ if (retval == NULL)
+ /* This means we are out of core. */
+ return NULL;
+
+ if (retval->decided == 0)
+ _nl_load_domain (retval, domainbinding);
+ if (retval->data == NULL)
+ {
+ int cnt;
+ for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
+ {
+ if (retval->successor[cnt]->decided == 0)
+ _nl_load_domain (retval->successor[cnt], domainbinding);
+ if (retval->successor[cnt]->data != NULL)
+ break;
+ }
+ }
+
+ /* The room for an alias was dynamically allocated. Free it now. */
+ if (alias_value != NULL)
+ free (locale);
+
+ /* The space for normalized_codeset is dynamically allocated. Free it. */
+ if (mask & XPG_NORM_CODESET)
+ free ((void *) normalized_codeset);
+
+ return retval;
+}
+
+
+#ifdef _LIBC
+libc_freeres_fn (free_mem)
+{
+ struct loaded_l10nfile *runp = _nl_loaded_domains;
+
+ while (runp != NULL)
+ {
+ struct loaded_l10nfile *here = runp;
+ if (runp->data != NULL)
+ _nl_unload_domain ((struct loaded_domain *) runp->data);
+ runp = runp->next;
+ free ((char *) here->filename);
+ free (here);
+ }
+}
+#endif
diff --git a/lib/intl/gettext.c b/lib/intl/gettext.c
new file mode 100644
index 0000000..fd3fa0f
--- /dev/null
+++ b/lib/intl/gettext.c
@@ -0,0 +1,66 @@
+/* gettext.c - Implementation of gettext(3) function. */
+
+/* Copyright (C) 1995, 1997, 2000, 2001, 2002, 2005-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _LIBC
+# define __need_NULL
+# include <stddef.h>
+#else
+# include <stdlib.h> /* Just for NULL. */
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define GETTEXT __gettext
+# define DCGETTEXT INTUSE(__dcgettext)
+#else
+# define GETTEXT libintl_gettext
+# define DCGETTEXT libintl_dcgettext
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
+ text). */
+char *
+GETTEXT (msgid)
+ const char *msgid;
+{
+ return DCGETTEXT (NULL, msgid, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__gettext, gettext);
+#endif
diff --git a/lib/intl/gettextP.h b/lib/intl/gettextP.h
new file mode 100644
index 0000000..5c137e5
--- /dev/null
+++ b/lib/intl/gettextP.h
@@ -0,0 +1,226 @@
+/* gettextP.h - Header describing internals of libintl library. */
+
+/* Copyright (C) 1995-1999, 2000-2003, 2005-2009 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _GETTEXTP_H
+#define _GETTEXTP_H
+
+#include <stddef.h> /* Get size_t. */
+
+#ifdef _LIBC
+# include "../iconv/gconv_int.h"
+#else
+# if HAVE_ICONV
+# include <iconv.h>
+# endif
+#endif
+
+#include "loadinfo.h"
+
+#include "gmo.h" /* Get nls_uint32. */
+
+/* @@ end of prolog @@ */
+
+#ifndef PARAMS
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+#ifndef attribute_hidden
+# define attribute_hidden
+#endif
+
+/* Tell the compiler when a conditional or integer expression is
+ almost always true or almost always false. */
+#ifndef HAVE_BUILTIN_EXPECT
+# define __builtin_expect(expr, val) (expr)
+#endif
+
+#ifndef W
+# define W(flag, data) ((flag) ? SWAP (data) : (data))
+#endif
+
+
+#ifdef _LIBC
+# include <byteswap.h>
+# define SWAP(i) bswap_32 (i)
+#else
+static inline nls_uint32
+SWAP (i)
+ nls_uint32 i;
+{
+ return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
+}
+#endif
+
+
+/* In-memory representation of system dependent string. */
+struct sysdep_string_desc
+{
+ /* Length of addressed string, including the trailing NUL. */
+ size_t length;
+ /* Pointer to addressed string. */
+ const char *pointer;
+};
+
+/* The representation of an opened message catalog. */
+struct loaded_domain
+{
+ /* Pointer to memory containing the .mo file. */
+ const char *data;
+ /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */
+ int use_mmap;
+ /* Size of mmap()ed memory. */
+ size_t mmap_size;
+ /* 1 if the .mo file uses a different endianness than this machine. */
+ int must_swap;
+ /* Pointer to additional malloc()ed memory. */
+ void *malloced;
+
+ /* Number of static strings pairs. */
+ nls_uint32 nstrings;
+ /* Pointer to descriptors of original strings in the file. */
+ const struct string_desc *orig_tab;
+ /* Pointer to descriptors of translated strings in the file. */
+ const struct string_desc *trans_tab;
+
+ /* Number of system dependent strings pairs. */
+ nls_uint32 n_sysdep_strings;
+ /* Pointer to descriptors of original sysdep strings. */
+ const struct sysdep_string_desc *orig_sysdep_tab;
+ /* Pointer to descriptors of translated sysdep strings. */
+ const struct sysdep_string_desc *trans_sysdep_tab;
+
+ /* Size of hash table. */
+ nls_uint32 hash_size;
+ /* Pointer to hash table. */
+ const nls_uint32 *hash_tab;
+ /* 1 if the hash table uses a different endianness than this machine. */
+ int must_swap_hash_tab;
+
+ int codeset_cntr;
+#ifdef _LIBC
+ __gconv_t conv;
+#else
+# if HAVE_ICONV
+ iconv_t conv;
+# endif
+#endif
+ char **conv_tab;
+
+ struct expression *plural;
+ unsigned long int nplurals;
+};
+
+/* We want to allocate a string at the end of the struct. But ISO C
+ doesn't allow zero sized arrays. */
+#ifdef __GNUC__
+# define ZERO 0
+#else
+# define ZERO 1
+#endif
+
+/* A set of settings bound to a message domain. Used to store settings
+ from bindtextdomain() and bind_textdomain_codeset(). */
+struct binding
+{
+ struct binding *next;
+ char *dirname;
+ int codeset_cntr; /* Incremented each time codeset changes. */
+ char *codeset;
+ char domainname[ZERO];
+};
+
+/* A counter which is incremented each time some previous translations
+ become invalid.
+ This variable is part of the external ABI of the GNU libintl. */
+extern int _nl_msg_cat_cntr;
+
+#ifndef _LIBC
+const char *_nl_locale_name PARAMS ((int category, const char *categoryname));
+#endif
+
+struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
+ char *__locale,
+ const char *__domainname,
+ struct binding *__domainbinding))
+ internal_function;
+void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain,
+ struct binding *__domainbinding))
+ internal_function;
+void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
+ internal_function;
+const char *_nl_init_domain_conv PARAMS ((struct loaded_l10nfile *__domain_file,
+ struct loaded_domain *__domain,
+ struct binding *__domainbinding))
+ internal_function;
+void _nl_free_domain_conv PARAMS ((struct loaded_domain *__domain))
+ internal_function;
+
+char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file,
+ struct binding *domainbinding,
+ const char *msgid, size_t *lengthp))
+ internal_function;
+
+#ifdef _LIBC
+extern char *__gettext PARAMS ((const char *__msgid));
+extern char *__dgettext PARAMS ((const char *__domainname,
+ const char *__msgid));
+extern char *__dcgettext PARAMS ((const char *__domainname,
+ const char *__msgid, int __category));
+extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
+ unsigned long int __n));
+extern char *__dngettext PARAMS ((const char *__domainname,
+ const char *__msgid1, const char *__msgid2,
+ unsigned long int n));
+extern char *__dcngettext PARAMS ((const char *__domainname,
+ const char *__msgid1, const char *__msgid2,
+ unsigned long int __n, int __category));
+extern char *__dcigettext PARAMS ((const char *__domainname,
+ const char *__msgid1, const char *__msgid2,
+ int __plural, unsigned long int __n,
+ int __category));
+extern char *__textdomain PARAMS ((const char *__domainname));
+extern char *__bindtextdomain PARAMS ((const char *__domainname,
+ const char *__dirname));
+extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname,
+ const char *__codeset));
+#else
+/* Declare the exported libintl_* functions, in a way that allows us to
+ call them under their real name. */
+# define _INTL_REDIRECT_MACROS
+# include "libgnuintl.h"
+extern char *libintl_dcigettext PARAMS ((const char *__domainname,
+ const char *__msgid1,
+ const char *__msgid2,
+ int __plural, unsigned long int __n,
+ int __category));
+#endif
+
+/* @@ begin of epilog @@ */
+
+#endif /* gettextP.h */
diff --git a/lib/intl/gmo.h b/lib/intl/gmo.h
new file mode 100644
index 0000000..2c57851
--- /dev/null
+++ b/lib/intl/gmo.h
@@ -0,0 +1,150 @@
+/* gmo.h - Description of GNU message catalog format: general file layout. */
+
+/* Copyright (C) 1995, 1997, 2000-2002, 2005-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _GETTEXT_H
+#define _GETTEXT_H 1
+
+#include <limits.h>
+
+/* @@ end of prolog @@ */
+
+/* The magic number of the GNU message catalog format. */
+#define _MAGIC 0x950412de
+#define _MAGIC_SWAPPED 0xde120495
+
+/* Revision number of the currently used .mo (binary) file format. */
+#define MO_REVISION_NUMBER 0
+
+/* The following contortions are an attempt to use the C preprocessor
+ to determine an unsigned integral type that is 32 bits wide. An
+ alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
+ as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
+ when cross-compiling. */
+
+#if __STDC__
+# define UINT_MAX_32_BITS 4294967295U
+#else
+# define UINT_MAX_32_BITS 0xFFFFFFFF
+#endif
+
+/* If UINT_MAX isn't defined, assume it's a 32-bit type.
+ This should be valid for all systems GNU cares about because
+ that doesn't include 16-bit systems, and only modern systems
+ (that certainly have <limits.h>) have 64+-bit integral types. */
+
+#ifndef UINT_MAX
+# define UINT_MAX UINT_MAX_32_BITS
+#endif
+
+#if UINT_MAX == UINT_MAX_32_BITS
+typedef unsigned nls_uint32;
+#else
+# if USHRT_MAX == UINT_MAX_32_BITS
+typedef unsigned short nls_uint32;
+# else
+# if ULONG_MAX == UINT_MAX_32_BITS
+typedef unsigned long nls_uint32;
+# else
+ /* The following line is intended to throw an error. Using #error is
+ not portable enough. */
+ "Cannot determine unsigned 32-bit data type."
+# endif
+# endif
+#endif
+
+
+/* Header for binary .mo file format. */
+struct mo_file_header
+{
+ /* The magic number. */
+ nls_uint32 magic;
+ /* The revision number of the file format. */
+ nls_uint32 revision;
+
+ /* The following are only used in .mo files with major revision 0. */
+
+ /* The number of strings pairs. */
+ nls_uint32 nstrings;
+ /* Offset of table with start offsets of original strings. */
+ nls_uint32 orig_tab_offset;
+ /* Offset of table with start offsets of translated strings. */
+ nls_uint32 trans_tab_offset;
+ /* Size of hash table. */
+ nls_uint32 hash_tab_size;
+ /* Offset of first hash table entry. */
+ nls_uint32 hash_tab_offset;
+
+ /* The following are only used in .mo files with minor revision >= 1. */
+
+ /* The number of system dependent segments. */
+ nls_uint32 n_sysdep_segments;
+ /* Offset of table describing system dependent segments. */
+ nls_uint32 sysdep_segments_offset;
+ /* The number of system dependent strings pairs. */
+ nls_uint32 n_sysdep_strings;
+ /* Offset of table with start offsets of original sysdep strings. */
+ nls_uint32 orig_sysdep_tab_offset;
+ /* Offset of table with start offsets of translated sysdep strings. */
+ nls_uint32 trans_sysdep_tab_offset;
+};
+
+/* Descriptor for static string contained in the binary .mo file. */
+struct string_desc
+{
+ /* Length of addressed string, not including the trailing NUL. */
+ nls_uint32 length;
+ /* Offset of string in file. */
+ nls_uint32 offset;
+};
+
+/* The following are only used in .mo files with minor revision >= 1. */
+
+/* Descriptor for system dependent string segment. */
+struct sysdep_segment
+{
+ /* Length of addressed string, including the trailing NUL. */
+ nls_uint32 length;
+ /* Offset of string in file. */
+ nls_uint32 offset;
+};
+
+/* Descriptor for system dependent string. */
+struct sysdep_string
+{
+ /* Offset of static string segments in file. */
+ nls_uint32 offset;
+ /* Alternating sequence of static and system dependent segments.
+ The last segment is a static segment, including the trailing NUL. */
+ struct segment_pair
+ {
+ /* Size of static segment. */
+ nls_uint32 segsize;
+ /* Reference to system dependent string segment, or ~0 at the end. */
+ nls_uint32 sysdepref;
+ } segments[1];
+};
+
+/* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF,
+ regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */
+#define SEGMENTS_END ((nls_uint32) ~0)
+
+/* @@ begin of epilog @@ */
+
+#endif /* gettext.h */
diff --git a/lib/intl/hash-string.h b/lib/intl/hash-string.h
new file mode 100644
index 0000000..b5a7d41
--- /dev/null
+++ b/lib/intl/hash-string.h
@@ -0,0 +1,61 @@
+/* hash-string.h - Description of GNU message catalog format: string hashing function. */
+
+/* Copyright (C) 1995, 1997, 1998, 2000, 2001, 2005-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* @@ end of prolog @@ */
+
+#ifndef PARAMS
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
+# define PARAMS(Args) Args
+# else
+# define PARAMS(Args) ()
+# endif
+#endif
+
+/* We assume to have `unsigned long int' value with at least 32 bits. */
+#define HASHWORDBITS 32
+
+
+/* Defines the so called `hashpjw' function by P.J. Weinberger
+ [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
+ 1986, 1987 Bell Telephone Laboratories, Inc.] */
+static unsigned long int hash_string PARAMS ((const char *__str_param));
+
+static inline unsigned long int
+hash_string (str_param)
+ const char *str_param;
+{
+ unsigned long int hval, g;
+ const char *str = str_param;
+
+ /* Compute the hash value for the given string. */
+ hval = 0;
+ while (*str != '\0')
+ {
+ hval <<= 4;
+ hval += (unsigned long int) *str++;
+ g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
+ if (g != 0)
+ {
+ hval ^= g >> (HASHWORDBITS - 8);
+ hval ^= g;
+ }
+ }
+ return hval;
+}
diff --git a/lib/intl/intl-compat.c b/lib/intl/intl-compat.c
new file mode 100644
index 0000000..7f32349
--- /dev/null
+++ b/lib/intl/intl-compat.c
@@ -0,0 +1,152 @@
+/* intl-compat.c - Stub functions to call gettext functions from GNU gettext library. */
+
+/* Copyright (C) 1995, 2000-2003, 2005-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "gettextP.h"
+
+/* @@ end of prolog @@ */
+
+/* This file redirects the gettext functions (without prefix) to those
+ defined in the included GNU libintl library (with "libintl_" prefix).
+ It is compiled into libintl in order to make the AM_GNU_GETTEXT test
+ of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
+ has the redirections primarily in the <libintl.h> include file.
+ It is also compiled into libgnuintl so that libgnuintl.so can be used
+ as LD_PRELOADable library on glibc systems, to provide the extra
+ features that the functions in the libc don't have (namely, logging). */
+
+
+#undef gettext
+#undef dgettext
+#undef dcgettext
+#undef ngettext
+#undef dngettext
+#undef dcngettext
+#undef textdomain
+#undef bindtextdomain
+#undef bind_textdomain_codeset
+
+
+/* When building a DLL, we must export some functions. Note that because
+ the functions are only defined for binary backward compatibility, we
+ don't need to use __declspec(dllimport) in any case. */
+#if defined _MSC_VER && BUILDING_DLL
+# define DLL_EXPORTED __declspec(dllexport)
+#else
+# define DLL_EXPORTED
+#endif
+
+
+DLL_EXPORTED
+char *
+gettext (msgid)
+ const char *msgid;
+{
+ return libintl_gettext (msgid);
+}
+
+
+DLL_EXPORTED
+char *
+dgettext (domainname, msgid)
+ const char *domainname;
+ const char *msgid;
+{
+ return libintl_dgettext (domainname, msgid);
+}
+
+
+DLL_EXPORTED
+char *
+dcgettext (domainname, msgid, category)
+ const char *domainname;
+ const char *msgid;
+ int category;
+{
+ return libintl_dcgettext (domainname, msgid, category);
+}
+
+
+DLL_EXPORTED
+char *
+ngettext (msgid1, msgid2, n)
+ const char *msgid1;
+ const char *msgid2;
+ unsigned long int n;
+{
+ return libintl_ngettext (msgid1, msgid2, n);
+}
+
+
+DLL_EXPORTED
+char *
+dngettext (domainname, msgid1, msgid2, n)
+ const char *domainname;
+ const char *msgid1;
+ const char *msgid2;
+ unsigned long int n;
+{
+ return libintl_dngettext (domainname, msgid1, msgid2, n);
+}
+
+
+DLL_EXPORTED
+char *
+dcngettext (domainname, msgid1, msgid2, n, category)
+ const char *domainname;
+ const char *msgid1;
+ const char *msgid2;
+ unsigned long int n;
+ int category;
+{
+ return libintl_dcngettext (domainname, msgid1, msgid2, n, category);
+}
+
+
+DLL_EXPORTED
+char *
+textdomain (domainname)
+ const char *domainname;
+{
+ return libintl_textdomain (domainname);
+}
+
+
+DLL_EXPORTED
+char *
+bindtextdomain (domainname, dirname)
+ const char *domainname;
+ const char *dirname;
+{
+ return libintl_bindtextdomain (domainname, dirname);
+}
+
+
+DLL_EXPORTED
+char *
+bind_textdomain_codeset (domainname, codeset)
+ const char *domainname;
+ const char *codeset;
+{
+ return libintl_bind_textdomain_codeset (domainname, codeset);
+}
diff --git a/lib/intl/l10nflist.c b/lib/intl/l10nflist.c
new file mode 100644
index 0000000..9f02487
--- /dev/null
+++ b/lib/intl/l10nflist.c
@@ -0,0 +1,456 @@
+/* l10nflist.c - make localization file list. */
+
+/* Copyright (C) 1995-1999, 2000, 2001, 2002, 2005-2009 Free Software Foundation, Inc.
+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Tell glibc's <string.h> to provide a prototype for stpcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <string.h>
+
+#if defined _LIBC || defined HAVE_ARGZ_H
+# include <argz.h>
+#endif
+#include <ctype.h>
+#include <sys/types.h>
+#include <stdlib.h>
+
+#include "loadinfo.h"
+
+/* On some strange systems still no definition of NULL is found. Sigh! */
+#ifndef NULL
+# if defined __STDC__ && __STDC__
+# define NULL ((void *) 0)
+# else
+# define NULL 0
+# endif
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions. This is required by the standard
+ because some ANSI C functions will require linking with this object
+ file and the name space must not be polluted. */
+# ifndef stpcpy
+# define stpcpy(dest, src) __stpcpy(dest, src)
+# endif
+#else
+# ifndef HAVE_STPCPY
+static char *stpcpy PARAMS ((char *dest, const char *src));
+# endif
+#endif
+
+/* Pathname support.
+ ISSLASH(C) tests whether C is a directory separator character.
+ IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
+ it may be concatenated to a directory pathname.
+ */
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+# define HAS_DEVICE(P) \
+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
+ && (P)[1] == ':')
+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
+#else
+ /* Unix */
+# define ISSLASH(C) ((C) == '/')
+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
+#endif
+
+/* Define function which are usually not available. */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
+/* Returns the number of strings in ARGZ. */
+static size_t argz_count__ PARAMS ((const char *argz, size_t len));
+
+static size_t
+argz_count__ (argz, len)
+ const char *argz;
+ size_t len;
+{
+ size_t count = 0;
+ while (len > 0)
+ {
+ size_t part_len = strlen (argz);
+ argz += part_len + 1;
+ len -= part_len + 1;
+ count++;
+ }
+ return count;
+}
+# undef __argz_count
+# define __argz_count(argz, len) argz_count__ (argz, len)
+#else
+# ifdef _LIBC
+# define __argz_count(argz, len) INTUSE(__argz_count) (argz, len)
+# endif
+#endif /* !_LIBC && !HAVE___ARGZ_COUNT */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
+/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
+ except the last into the character SEP. */
+static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
+
+static void
+argz_stringify__ (argz, len, sep)
+ char *argz;
+ size_t len;
+ int sep;
+{
+ while (len > 0)
+ {
+ size_t part_len = strlen (argz);
+ argz += part_len;
+ len -= part_len + 1;
+ if (len > 0)
+ *argz++ = sep;
+ }
+}
+# undef __argz_stringify
+# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
+#else
+# ifdef _LIBC
+# define __argz_stringify(argz, len, sep) \
+ INTUSE(__argz_stringify) (argz, len, sep)
+# endif
+#endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
+
+#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
+static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
+ const char *entry));
+
+static char *
+argz_next__ (argz, argz_len, entry)
+ char *argz;
+ size_t argz_len;
+ const char *entry;
+{
+ if (entry)
+ {
+ if (entry < argz + argz_len)
+ entry = strchr (entry, '\0') + 1;
+
+ return entry >= argz + argz_len ? NULL : (char *) entry;
+ }
+ else
+ if (argz_len > 0)
+ return argz;
+ else
+ return 0;
+}
+# undef __argz_next
+# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
+#endif /* !_LIBC && !HAVE___ARGZ_NEXT */
+
+
+/* Return number of bits set in X. */
+static int pop PARAMS ((int x));
+
+static inline int
+pop (x)
+ int x;
+{
+ /* We assume that no more than 16 bits are used. */
+ x = ((x & ~0x5555) >> 1) + (x & 0x5555);
+ x = ((x & ~0x3333) >> 2) + (x & 0x3333);
+ x = ((x >> 4) + x) & 0x0f0f;
+ x = ((x >> 8) + x) & 0xff;
+
+ return x;
+}
+
+
+struct loaded_l10nfile *
+_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
+ territory, codeset, normalized_codeset, modifier, special,
+ sponsor, revision, filename, do_allocate)
+ struct loaded_l10nfile **l10nfile_list;
+ const char *dirlist;
+ size_t dirlist_len;
+ int mask;
+ const char *language;
+ const char *territory;
+ const char *codeset;
+ const char *normalized_codeset;
+ const char *modifier;
+ const char *special;
+ const char *sponsor;
+ const char *revision;
+ const char *filename;
+ int do_allocate;
+{
+ char *abs_filename;
+ struct loaded_l10nfile **lastp;
+ struct loaded_l10nfile *retval;
+ char *cp;
+ size_t dirlist_count;
+ size_t entries;
+ int cnt;
+
+ /* If LANGUAGE contains an absolute directory specification, we ignore
+ DIRLIST. */
+ if (IS_ABSOLUTE_PATH (language))
+ dirlist_len = 0;
+
+ /* Allocate room for the full file name. */
+ abs_filename = (char *) malloc (dirlist_len
+ + strlen (language)
+ + ((mask & TERRITORY) != 0
+ ? strlen (territory) + 1 : 0)
+ + ((mask & XPG_CODESET) != 0
+ ? strlen (codeset) + 1 : 0)
+ + ((mask & XPG_NORM_CODESET) != 0
+ ? strlen (normalized_codeset) + 1 : 0)
+ + (((mask & XPG_MODIFIER) != 0
+ || (mask & CEN_AUDIENCE) != 0)
+ ? strlen (modifier) + 1 : 0)
+ + ((mask & CEN_SPECIAL) != 0
+ ? strlen (special) + 1 : 0)
+ + (((mask & CEN_SPONSOR) != 0
+ || (mask & CEN_REVISION) != 0)
+ ? (1 + ((mask & CEN_SPONSOR) != 0
+ ? strlen (sponsor) : 0)
+ + ((mask & CEN_REVISION) != 0
+ ? strlen (revision) + 1 : 0)) : 0)
+ + 1 + strlen (filename) + 1);
+
+ if (abs_filename == NULL)
+ return NULL;
+
+ /* Construct file name. */
+ cp = abs_filename;
+ if (dirlist_len > 0)
+ {
+ memcpy (cp, dirlist, dirlist_len);
+ __argz_stringify (cp, dirlist_len, PATH_SEPARATOR);
+ cp += dirlist_len;
+ cp[-1] = '/';
+ }
+
+ cp = stpcpy (cp, language);
+
+ if ((mask & TERRITORY) != 0)
+ {
+ *cp++ = '_';
+ cp = stpcpy (cp, territory);
+ }
+ if ((mask & XPG_CODESET) != 0)
+ {
+ *cp++ = '.';
+ cp = stpcpy (cp, codeset);
+ }
+ if ((mask & XPG_NORM_CODESET) != 0)
+ {
+ *cp++ = '.';
+ cp = stpcpy (cp, normalized_codeset);
+ }
+ if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
+ {
+ /* This component can be part of both syntaces but has different
+ leading characters. For CEN we use `+', else `@'. */
+ *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
+ cp = stpcpy (cp, modifier);
+ }
+ if ((mask & CEN_SPECIAL) != 0)
+ {
+ *cp++ = '+';
+ cp = stpcpy (cp, special);
+ }
+ if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
+ {
+ *cp++ = ',';
+ if ((mask & CEN_SPONSOR) != 0)
+ cp = stpcpy (cp, sponsor);
+ if ((mask & CEN_REVISION) != 0)
+ {
+ *cp++ = '_';
+ cp = stpcpy (cp, revision);
+ }
+ }
+
+ *cp++ = '/';
+ stpcpy (cp, filename);
+
+ /* Look in list of already loaded domains whether it is already
+ available. */
+ lastp = l10nfile_list;
+ for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
+ if (retval->filename != NULL)
+ {
+ int compare = strcmp (retval->filename, abs_filename);
+ if (compare == 0)
+ /* We found it! */
+ break;
+ if (compare < 0)
+ {
+ /* It's not in the list. */
+ retval = NULL;
+ break;
+ }
+
+ lastp = &retval->next;
+ }
+
+ if (retval != NULL || do_allocate == 0)
+ {
+ free (abs_filename);
+ return retval;
+ }
+
+ dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1);
+
+ /* Allocate a new loaded_l10nfile. */
+ retval =
+ (struct loaded_l10nfile *)
+ malloc (sizeof (*retval)
+ + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0))
+ * sizeof (struct loaded_l10nfile *)));
+ if (retval == NULL)
+ return NULL;
+
+ retval->filename = abs_filename;
+
+ /* We set retval->data to NULL here; it is filled in later.
+ Setting retval->decided to 1 here means that retval does not
+ correspond to a real file (dirlist_count > 1) or is not worth
+ looking up (if an unnormalized codeset was specified). */
+ retval->decided = (dirlist_count > 1
+ || ((mask & XPG_CODESET) != 0
+ && (mask & XPG_NORM_CODESET) != 0));
+ retval->data = NULL;
+
+ retval->next = *lastp;
+ *lastp = retval;
+
+ entries = 0;
+ /* Recurse to fill the inheritance list of RETVAL.
+ If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL
+ entry does not correspond to a real file; retval->filename contains
+ colons. In this case we loop across all elements of DIRLIST and
+ across all bit patterns dominated by MASK.
+ If the DIRLIST is a single directory or entirely redundant (i.e.
+ DIRLIST_COUNT == 1), we loop across all bit patterns dominated by
+ MASK, excluding MASK itself.
+ In either case, we loop down from MASK to 0. This has the effect
+ that the extra bits in the locale name are dropped in this order:
+ first the modifier, then the territory, then the codeset, then the
+ normalized_codeset. */
+ for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt)
+ if ((cnt & ~mask) == 0
+ && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
+ && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
+ {
+ if (dirlist_count > 1)
+ {
+ /* Iterate over all elements of the DIRLIST. */
+ char *dir = NULL;
+
+ while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
+ != NULL)
+ retval->successor[entries++]
+ = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1,
+ cnt, language, territory, codeset,
+ normalized_codeset, modifier, special,
+ sponsor, revision, filename, 1);
+ }
+ else
+ retval->successor[entries++]
+ = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len,
+ cnt, language, territory, codeset,
+ normalized_codeset, modifier, special,
+ sponsor, revision, filename, 1);
+ }
+ retval->successor[entries] = NULL;
+
+ return retval;
+}
+
+/* Normalize codeset name. There is no standard for the codeset
+ names. Normalization allows the user to use any of the common
+ names. The return value is dynamically allocated and has to be
+ freed by the caller. */
+const char *
+_nl_normalize_codeset (codeset, name_len)
+ const char *codeset;
+ size_t name_len;
+{
+ int len = 0;
+ int only_digit = 1;
+ char *retval;
+ char *wp;
+ size_t cnt;
+
+ for (cnt = 0; cnt < name_len; ++cnt)
+ if (isalnum ((unsigned char) codeset[cnt]))
+ {
+ ++len;
+
+ if (isalpha ((unsigned char) codeset[cnt]))
+ only_digit = 0;
+ }
+
+ retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
+
+ if (retval != NULL)
+ {
+ if (only_digit)
+ wp = stpcpy (retval, "iso");
+ else
+ wp = retval;
+
+ for (cnt = 0; cnt < name_len; ++cnt)
+ if (isalpha ((unsigned char) codeset[cnt]))
+ *wp++ = tolower ((unsigned char) codeset[cnt]);
+ else if (isdigit ((unsigned char) codeset[cnt]))
+ *wp++ = codeset[cnt];
+
+ *wp = '\0';
+ }
+
+ return (const char *) retval;
+}
+
+
+/* @@ begin of epilog @@ */
+
+/* We don't want libintl.a to depend on any other library. So we
+ avoid the non-standard function stpcpy. In GNU C Library this
+ function is available, though. Also allow the symbol HAVE_STPCPY
+ to be defined. */
+#if !_LIBC && !HAVE_STPCPY
+static char *
+stpcpy (dest, src)
+ char *dest;
+ const char *src;
+{
+ while ((*dest++ = *src++) != '\0')
+ /* Do nothing. */ ;
+ return dest - 1;
+}
+#endif
diff --git a/lib/intl/libgnuintl.h.in b/lib/intl/libgnuintl.h.in
new file mode 100644
index 0000000..14f9cf9
--- /dev/null
+++ b/lib/intl/libgnuintl.h.in
@@ -0,0 +1,311 @@
+/* libgnuintl.h - Message catalogs for internationalization. */
+
+/* Copyright (C) 1995-1997, 2000-2003, 2004-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _LIBINTL_H
+#define _LIBINTL_H 1
+
+#include <locale.h>
+
+/* The LC_MESSAGES locale category is the category used by the functions
+ gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
+ On systems that don't define it, use an arbitrary value instead.
+ On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
+ then includes <libintl.h> (i.e. this file!) and then only defines
+ LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
+ in this case. */
+#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
+# define LC_MESSAGES 1729
+#endif
+
+/* We define an additional symbol to signal that we use the GNU
+ implementation of gettext. */
+#define __USE_GNU_GETTEXT 1
+
+/* Provide information about the supported file formats. Returns the
+ maximum minor revision number supported for a given major revision. */
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
+ ((major) == 0 ? 1 : -1)
+
+/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
+ precedence over _conio_gettext. */
+#ifdef __DJGPP__
+# undef gettext
+#endif
+
+/* Use _INTL_PARAMS, not PARAMS, in order to avoid clashes with identifiers
+ used by programs. Similarly, test __PROTOTYPES, not PROTOTYPES. */
+#ifndef _INTL_PARAMS
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
+# define _INTL_PARAMS(args) args
+# else
+# define _INTL_PARAMS(args) ()
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* We redirect the functions to those prefixed with "libintl_". This is
+ necessary, because some systems define gettext/textdomain/... in the C
+ library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
+ If we used the unprefixed names, there would be cases where the
+ definition in the C library would override the one in the libintl.so
+ shared library. Recall that on ELF systems, the symbols are looked
+ up in the following order:
+ 1. in the executable,
+ 2. in the shared libraries specified on the link command line, in order,
+ 3. in the dependencies of the shared libraries specified on the link
+ command line,
+ 4. in the dlopen()ed shared libraries, in the order in which they were
+ dlopen()ed.
+ The definition in the C library would override the one in libintl.so if
+ either
+ * -lc is given on the link command line and -lintl isn't, or
+ * -lc is given on the link command line before -lintl, or
+ * libintl.so is a dependency of a dlopen()ed shared library but not
+ linked to the executable at link time.
+ Since Solaris gettext() behaves differently than GNU gettext(), this
+ would be unacceptable.
+
+ The redirection happens by default through macros in C, so that &gettext
+ is independent of the compilation unit, but through inline functions in
+ C++, in order not to interfere with the name mangling of class fields or
+ class methods called 'gettext'. */
+
+/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
+ If he doesn't, we choose the method. A third possible method is
+ _INTL_REDIRECT_ASM, supported only by GCC. */
+#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
+# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined __cplusplus)
+# define _INTL_REDIRECT_ASM
+# else
+# ifdef __cplusplus
+# define _INTL_REDIRECT_INLINE
+# else
+# define _INTL_REDIRECT_MACROS
+# endif
+# endif
+#endif
+/* Auxiliary macros. */
+#ifdef _INTL_REDIRECT_ASM
+# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
+# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
+# define _INTL_STRINGIFY(prefix) #prefix
+#else
+# define _INTL_ASM(cname)
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
+ text). */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_gettext (const char *__msgid);
+static inline char *gettext (const char *__msgid)
+{
+ return libintl_gettext (__msgid);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define gettext libintl_gettext
+#endif
+extern char *gettext _INTL_PARAMS ((const char *__msgid))
+ _INTL_ASM (libintl_gettext);
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current
+ LC_MESSAGES locale. */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dgettext (const char *__domainname, const char *__msgid);
+static inline char *dgettext (const char *__domainname, const char *__msgid)
+{
+ return libintl_dgettext (__domainname, __msgid);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dgettext libintl_dgettext
+#endif
+extern char *dgettext _INTL_PARAMS ((const char *__domainname,
+ const char *__msgid))
+ _INTL_ASM (libintl_dgettext);
+#endif
+
+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
+ locale. */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
+ int __category);
+static inline char *dcgettext (const char *__domainname, const char *__msgid,
+ int __category)
+{
+ return libintl_dcgettext (__domainname, __msgid, __category);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dcgettext libintl_dcgettext
+#endif
+extern char *dcgettext _INTL_PARAMS ((const char *__domainname,
+ const char *__msgid,
+ int __category))
+ _INTL_ASM (libintl_dcgettext);
+#endif
+
+
+/* Similar to `gettext' but select the plural form corresponding to the
+ number N. */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
+ unsigned long int __n);
+static inline char *ngettext (const char *__msgid1, const char *__msgid2,
+ unsigned long int __n)
+{
+ return libintl_ngettext (__msgid1, __msgid2, __n);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define ngettext libintl_ngettext
+#endif
+extern char *ngettext _INTL_PARAMS ((const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n))
+ _INTL_ASM (libintl_ngettext);
+#endif
+
+/* Similar to `dgettext' but select the plural form corresponding to the
+ number N. */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
+ const char *__msgid2, unsigned long int __n);
+static inline char *dngettext (const char *__domainname, const char *__msgid1,
+ const char *__msgid2, unsigned long int __n)
+{
+ return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dngettext libintl_dngettext
+#endif
+extern char *dngettext _INTL_PARAMS ((const char *__domainname,
+ const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n))
+ _INTL_ASM (libintl_dngettext);
+#endif
+
+/* Similar to `dcgettext' but select the plural form corresponding to the
+ number N. */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_dcngettext (const char *__domainname,
+ const char *__msgid1, const char *__msgid2,
+ unsigned long int __n, int __category);
+static inline char *dcngettext (const char *__domainname,
+ const char *__msgid1, const char *__msgid2,
+ unsigned long int __n, int __category)
+{
+ return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define dcngettext libintl_dcngettext
+#endif
+extern char *dcngettext _INTL_PARAMS ((const char *__domainname,
+ const char *__msgid1,
+ const char *__msgid2,
+ unsigned long int __n,
+ int __category))
+ _INTL_ASM (libintl_dcngettext);
+#endif
+
+
+/* Set the current default message catalog to DOMAINNAME.
+ If DOMAINNAME is null, return the current default.
+ If DOMAINNAME is "", reset to the default of "messages". */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_textdomain (const char *__domainname);
+static inline char *textdomain (const char *__domainname)
+{
+ return libintl_textdomain (__domainname);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define textdomain libintl_textdomain
+#endif
+extern char *textdomain _INTL_PARAMS ((const char *__domainname))
+ _INTL_ASM (libintl_textdomain);
+#endif
+
+/* Specify that the DOMAINNAME message catalog will be found
+ in DIRNAME rather than in the system locale data base. */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_bindtextdomain (const char *__domainname,
+ const char *__dirname);
+static inline char *bindtextdomain (const char *__domainname,
+ const char *__dirname)
+{
+ return libintl_bindtextdomain (__domainname, __dirname);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define bindtextdomain libintl_bindtextdomain
+#endif
+extern char *bindtextdomain _INTL_PARAMS ((const char *__domainname,
+ const char *__dirname))
+ _INTL_ASM (libintl_bindtextdomain);
+#endif
+
+/* Specify the character encoding in which the messages from the
+ DOMAINNAME message catalog will be returned. */
+#ifdef _INTL_REDIRECT_INLINE
+extern char *libintl_bind_textdomain_codeset (const char *__domainname,
+ const char *__codeset);
+static inline char *bind_textdomain_codeset (const char *__domainname,
+ const char *__codeset)
+{
+ return libintl_bind_textdomain_codeset (__domainname, __codeset);
+}
+#else
+#ifdef _INTL_REDIRECT_MACROS
+# define bind_textdomain_codeset libintl_bind_textdomain_codeset
+#endif
+extern char *bind_textdomain_codeset _INTL_PARAMS ((const char *__domainname,
+ const char *__codeset))
+ _INTL_ASM (libintl_bind_textdomain_codeset);
+#endif
+
+
+/* Support for relocatable packages. */
+
+/* Sets the original and the current installation prefix of the package.
+ Relocation simply replaces a pathname starting with the original prefix
+ by the corresponding pathname with the current prefix instead. Both
+ prefixes should be directory names without trailing slash (i.e. use ""
+ instead of "/"). */
+#define libintl_set_relocation_prefix libintl_set_relocation_prefix
+extern void
+ libintl_set_relocation_prefix _INTL_PARAMS ((const char *orig_prefix,
+ const char *curr_prefix));
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* libintl.h */
diff --git a/lib/intl/loadinfo.h b/lib/intl/loadinfo.h
new file mode 100644
index 0000000..d06a277
--- /dev/null
+++ b/lib/intl/loadinfo.h
@@ -0,0 +1,159 @@
+/* loadinfo.c */
+
+/* Copyright (C) 1996-1999, 2000-2002, 2005-2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _LOADINFO_H
+#define _LOADINFO_H 1
+
+/* Declarations of locale dependent catalog lookup functions.
+ Implemented in
+
+ localealias.c Possibly replace a locale name by another.
+ explodename.c Split a locale name into its various fields.
+ l10nflist.c Generate a list of filenames of possible message catalogs.
+ finddomain.c Find and open the relevant message catalogs.
+
+ The main function _nl_find_domain() in finddomain.c is declared
+ in gettextP.h.
+ */
+
+#ifndef PARAMS
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+/* Tell the compiler when a conditional or integer expression is
+ almost always true or almost always false. */
+#ifndef HAVE_BUILTIN_EXPECT
+# define __builtin_expect(expr, val) (expr)
+#endif
+
+/* Separator in PATH like lists of pathnames. */
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, OS/2, DOS */
+# define PATH_SEPARATOR ';'
+#else
+ /* Unix */
+# define PATH_SEPARATOR ':'
+#endif
+
+/* Encoding of locale name parts. */
+#define CEN_REVISION 1
+#define CEN_SPONSOR 2
+#define CEN_SPECIAL 4
+#define XPG_NORM_CODESET 8
+#define XPG_CODESET 16
+#define TERRITORY 32
+#define CEN_AUDIENCE 64
+#define XPG_MODIFIER 128
+
+#define CEN_SPECIFIC (CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
+#define XPG_SPECIFIC (XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
+
+
+struct loaded_l10nfile
+{
+ const char *filename;
+ int decided;
+
+ const void *data;
+
+ struct loaded_l10nfile *next;
+ struct loaded_l10nfile *successor[1];
+};
+
+
+/* Normalize codeset name. There is no standard for the codeset
+ names. Normalization allows the user to use any of the common
+ names. The return value is dynamically allocated and has to be
+ freed by the caller. */
+extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
+ size_t name_len));
+
+/* Lookup a locale dependent file.
+ *L10NFILE_LIST denotes a pool of lookup results of locale dependent
+ files of the same kind, sorted in decreasing order of ->filename.
+ DIRLIST and DIRLIST_LEN are an argz list of directories in which to
+ look, containing at least one directory (i.e. DIRLIST_LEN > 0).
+ MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER,
+ SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as
+ produced by _nl_explode_name(). FILENAME is the filename suffix.
+ The return value is the lookup result, either found in *L10NFILE_LIST,
+ or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
+ If the return value is non-NULL, it is added to *L10NFILE_LIST, and
+ its ->next field denotes the chaining inside *L10NFILE_LIST, and
+ furthermore its ->successor[] field contains a list of other lookup
+ results from which this lookup result inherits. */
+extern struct loaded_l10nfile *
+_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
+ const char *dirlist, size_t dirlist_len, int mask,
+ const char *language, const char *territory,
+ const char *codeset,
+ const char *normalized_codeset,
+ const char *modifier, const char *special,
+ const char *sponsor, const char *revision,
+ const char *filename, int do_allocate));
+
+/* Lookup the real locale name for a locale alias NAME, or NULL if
+ NAME is not a locale alias (but possibly a real locale name).
+ The return value is statically allocated and must not be freed. */
+extern const char *_nl_expand_alias PARAMS ((const char *name));
+
+/* Split a locale name NAME into its pieces: language, modifier,
+ territory, codeset, special, sponsor, revision.
+ NAME gets destructively modified: NUL bytes are inserted here and
+ there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY,
+ *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a
+ pointer into the old NAME string, or NULL. *NORMALIZED_CODESET
+ gets assigned the expanded *CODESET, if it is different from *CODESET;
+ this one is dynamically allocated and has to be freed by the caller.
+ The return value is a bitmask, where each bit corresponds to one
+ filled-in value:
+ XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER,
+ TERRITORY for *TERRITORY,
+ XPG_CODESET for *CODESET,
+ XPG_NORM_CODESET for *NORMALIZED_CODESET,
+ CEN_SPECIAL for *SPECIAL,
+ CEN_SPONSOR for *SPONSOR,
+ CEN_REVISION for *REVISION.
+ */
+extern int _nl_explode_name PARAMS ((char *name, const char **language,
+ const char **modifier,
+ const char **territory,
+ const char **codeset,
+ const char **normalized_codeset,
+ const char **special,
+ const char **sponsor,
+ const char **revision));
+
+/* Split a locale name NAME into a leading language part and all the
+ rest. Return a pointer to the first character after the language,
+ i.e. to the first byte of the rest. */
+extern char *_nl_find_language PARAMS ((const char *name));
+
+#endif /* loadinfo.h */
diff --git a/lib/intl/loadmsgcat.c b/lib/intl/loadmsgcat.c
new file mode 100644
index 0000000..83ca63f
--- /dev/null
+++ b/lib/intl/loadmsgcat.c
@@ -0,0 +1,1324 @@
+/* loadmsgcat.c - Load needed message catalogs. */
+
+/* Copyright (C) 1995-1999, 2000-2003, 2005-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#ifdef __GNUC__
+# undef alloca
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# if defined HAVE_ALLOCA_H || defined _LIBC
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#if defined HAVE_UNISTD_H || defined _LIBC
+# include <unistd.h>
+#endif
+
+#ifdef _LIBC
+# include <langinfo.h>
+# include <locale.h>
+#endif
+
+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
+ || (defined _LIBC && defined _POSIX_MAPPED_FILES)
+# include <sys/mman.h>
+# undef HAVE_MMAP
+# define HAVE_MMAP 1
+#else
+# undef HAVE_MMAP
+#endif
+
+#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC
+# include <stdint.h>
+#endif
+#if defined HAVE_INTTYPES_H || defined _LIBC
+# include <inttypes.h>
+#endif
+
+#include "gmo.h"
+#include "gettextP.h"
+#include "hash-string.h"
+#include "plural-exp.h"
+
+#ifdef _LIBC
+# include "../locale/localeinfo.h"
+#endif
+
+/* Provide fallback values for macros that ought to be defined in <inttypes.h>.
+ Note that our fallback values need not be literal strings, because we don't
+ use them with preprocessor string concatenation. */
+#if !defined PRId8 || PRI_MACROS_BROKEN
+# undef PRId8
+# define PRId8 "d"
+#endif
+#if !defined PRIi8 || PRI_MACROS_BROKEN
+# undef PRIi8
+# define PRIi8 "i"
+#endif
+#if !defined PRIo8 || PRI_MACROS_BROKEN
+# undef PRIo8
+# define PRIo8 "o"
+#endif
+#if !defined PRIu8 || PRI_MACROS_BROKEN
+# undef PRIu8
+# define PRIu8 "u"
+#endif
+#if !defined PRIx8 || PRI_MACROS_BROKEN
+# undef PRIx8
+# define PRIx8 "x"
+#endif
+#if !defined PRIX8 || PRI_MACROS_BROKEN
+# undef PRIX8
+# define PRIX8 "X"
+#endif
+#if !defined PRId16 || PRI_MACROS_BROKEN
+# undef PRId16
+# define PRId16 "d"
+#endif
+#if !defined PRIi16 || PRI_MACROS_BROKEN
+# undef PRIi16
+# define PRIi16 "i"
+#endif
+#if !defined PRIo16 || PRI_MACROS_BROKEN
+# undef PRIo16
+# define PRIo16 "o"
+#endif
+#if !defined PRIu16 || PRI_MACROS_BROKEN
+# undef PRIu16
+# define PRIu16 "u"
+#endif
+#if !defined PRIx16 || PRI_MACROS_BROKEN
+# undef PRIx16
+# define PRIx16 "x"
+#endif
+#if !defined PRIX16 || PRI_MACROS_BROKEN
+# undef PRIX16
+# define PRIX16 "X"
+#endif
+#if !defined PRId32 || PRI_MACROS_BROKEN
+# undef PRId32
+# define PRId32 "d"
+#endif
+#if !defined PRIi32 || PRI_MACROS_BROKEN
+# undef PRIi32
+# define PRIi32 "i"
+#endif
+#if !defined PRIo32 || PRI_MACROS_BROKEN
+# undef PRIo32
+# define PRIo32 "o"
+#endif
+#if !defined PRIu32 || PRI_MACROS_BROKEN
+# undef PRIu32
+# define PRIu32 "u"
+#endif
+#if !defined PRIx32 || PRI_MACROS_BROKEN
+# undef PRIx32
+# define PRIx32 "x"
+#endif
+#if !defined PRIX32 || PRI_MACROS_BROKEN
+# undef PRIX32
+# define PRIX32 "X"
+#endif
+#if !defined PRId64 || PRI_MACROS_BROKEN
+# undef PRId64
+# define PRId64 (sizeof (long) == 8 ? "ld" : "lld")
+#endif
+#if !defined PRIi64 || PRI_MACROS_BROKEN
+# undef PRIi64
+# define PRIi64 (sizeof (long) == 8 ? "li" : "lli")
+#endif
+#if !defined PRIo64 || PRI_MACROS_BROKEN
+# undef PRIo64
+# define PRIo64 (sizeof (long) == 8 ? "lo" : "llo")
+#endif
+#if !defined PRIu64 || PRI_MACROS_BROKEN
+# undef PRIu64
+# define PRIu64 (sizeof (long) == 8 ? "lu" : "llu")
+#endif
+#if !defined PRIx64 || PRI_MACROS_BROKEN
+# undef PRIx64
+# define PRIx64 (sizeof (long) == 8 ? "lx" : "llx")
+#endif
+#if !defined PRIX64 || PRI_MACROS_BROKEN
+# undef PRIX64
+# define PRIX64 (sizeof (long) == 8 ? "lX" : "llX")
+#endif
+#if !defined PRIdLEAST8 || PRI_MACROS_BROKEN
+# undef PRIdLEAST8
+# define PRIdLEAST8 "d"
+#endif
+#if !defined PRIiLEAST8 || PRI_MACROS_BROKEN
+# undef PRIiLEAST8
+# define PRIiLEAST8 "i"
+#endif
+#if !defined PRIoLEAST8 || PRI_MACROS_BROKEN
+# undef PRIoLEAST8
+# define PRIoLEAST8 "o"
+#endif
+#if !defined PRIuLEAST8 || PRI_MACROS_BROKEN
+# undef PRIuLEAST8
+# define PRIuLEAST8 "u"
+#endif
+#if !defined PRIxLEAST8 || PRI_MACROS_BROKEN
+# undef PRIxLEAST8
+# define PRIxLEAST8 "x"
+#endif
+#if !defined PRIXLEAST8 || PRI_MACROS_BROKEN
+# undef PRIXLEAST8
+# define PRIXLEAST8 "X"
+#endif
+#if !defined PRIdLEAST16 || PRI_MACROS_BROKEN
+# undef PRIdLEAST16
+# define PRIdLEAST16 "d"
+#endif
+#if !defined PRIiLEAST16 || PRI_MACROS_BROKEN
+# undef PRIiLEAST16
+# define PRIiLEAST16 "i"
+#endif
+#if !defined PRIoLEAST16 || PRI_MACROS_BROKEN
+# undef PRIoLEAST16
+# define PRIoLEAST16 "o"
+#endif
+#if !defined PRIuLEAST16 || PRI_MACROS_BROKEN
+# undef PRIuLEAST16
+# define PRIuLEAST16 "u"
+#endif
+#if !defined PRIxLEAST16 || PRI_MACROS_BROKEN
+# undef PRIxLEAST16
+# define PRIxLEAST16 "x"
+#endif
+#if !defined PRIXLEAST16 || PRI_MACROS_BROKEN
+# undef PRIXLEAST16
+# define PRIXLEAST16 "X"
+#endif
+#if !defined PRIdLEAST32 || PRI_MACROS_BROKEN
+# undef PRIdLEAST32
+# define PRIdLEAST32 "d"
+#endif
+#if !defined PRIiLEAST32 || PRI_MACROS_BROKEN
+# undef PRIiLEAST32
+# define PRIiLEAST32 "i"
+#endif
+#if !defined PRIoLEAST32 || PRI_MACROS_BROKEN
+# undef PRIoLEAST32
+# define PRIoLEAST32 "o"
+#endif
+#if !defined PRIuLEAST32 || PRI_MACROS_BROKEN
+# undef PRIuLEAST32
+# define PRIuLEAST32 "u"
+#endif
+#if !defined PRIxLEAST32 || PRI_MACROS_BROKEN
+# undef PRIxLEAST32
+# define PRIxLEAST32 "x"
+#endif
+#if !defined PRIXLEAST32 || PRI_MACROS_BROKEN
+# undef PRIXLEAST32
+# define PRIXLEAST32 "X"
+#endif
+#if !defined PRIdLEAST64 || PRI_MACROS_BROKEN
+# undef PRIdLEAST64
+# define PRIdLEAST64 PRId64
+#endif
+#if !defined PRIiLEAST64 || PRI_MACROS_BROKEN
+# undef PRIiLEAST64
+# define PRIiLEAST64 PRIi64
+#endif
+#if !defined PRIoLEAST64 || PRI_MACROS_BROKEN
+# undef PRIoLEAST64
+# define PRIoLEAST64 PRIo64
+#endif
+#if !defined PRIuLEAST64 || PRI_MACROS_BROKEN
+# undef PRIuLEAST64
+# define PRIuLEAST64 PRIu64
+#endif
+#if !defined PRIxLEAST64 || PRI_MACROS_BROKEN
+# undef PRIxLEAST64
+# define PRIxLEAST64 PRIx64
+#endif
+#if !defined PRIXLEAST64 || PRI_MACROS_BROKEN
+# undef PRIXLEAST64
+# define PRIXLEAST64 PRIX64
+#endif
+#if !defined PRIdFAST8 || PRI_MACROS_BROKEN
+# undef PRIdFAST8
+# define PRIdFAST8 "d"
+#endif
+#if !defined PRIiFAST8 || PRI_MACROS_BROKEN
+# undef PRIiFAST8
+# define PRIiFAST8 "i"
+#endif
+#if !defined PRIoFAST8 || PRI_MACROS_BROKEN
+# undef PRIoFAST8
+# define PRIoFAST8 "o"
+#endif
+#if !defined PRIuFAST8 || PRI_MACROS_BROKEN
+# undef PRIuFAST8
+# define PRIuFAST8 "u"
+#endif
+#if !defined PRIxFAST8 || PRI_MACROS_BROKEN
+# undef PRIxFAST8
+# define PRIxFAST8 "x"
+#endif
+#if !defined PRIXFAST8 || PRI_MACROS_BROKEN
+# undef PRIXFAST8
+# define PRIXFAST8 "X"
+#endif
+#if !defined PRIdFAST16 || PRI_MACROS_BROKEN
+# undef PRIdFAST16
+# define PRIdFAST16 "d"
+#endif
+#if !defined PRIiFAST16 || PRI_MACROS_BROKEN
+# undef PRIiFAST16
+# define PRIiFAST16 "i"
+#endif
+#if !defined PRIoFAST16 || PRI_MACROS_BROKEN
+# undef PRIoFAST16
+# define PRIoFAST16 "o"
+#endif
+#if !defined PRIuFAST16 || PRI_MACROS_BROKEN
+# undef PRIuFAST16
+# define PRIuFAST16 "u"
+#endif
+#if !defined PRIxFAST16 || PRI_MACROS_BROKEN
+# undef PRIxFAST16
+# define PRIxFAST16 "x"
+#endif
+#if !defined PRIXFAST16 || PRI_MACROS_BROKEN
+# undef PRIXFAST16
+# define PRIXFAST16 "X"
+#endif
+#if !defined PRIdFAST32 || PRI_MACROS_BROKEN
+# undef PRIdFAST32
+# define PRIdFAST32 "d"
+#endif
+#if !defined PRIiFAST32 || PRI_MACROS_BROKEN
+# undef PRIiFAST32
+# define PRIiFAST32 "i"
+#endif
+#if !defined PRIoFAST32 || PRI_MACROS_BROKEN
+# undef PRIoFAST32
+# define PRIoFAST32 "o"
+#endif
+#if !defined PRIuFAST32 || PRI_MACROS_BROKEN
+# undef PRIuFAST32
+# define PRIuFAST32 "u"
+#endif
+#if !defined PRIxFAST32 || PRI_MACROS_BROKEN
+# undef PRIxFAST32
+# define PRIxFAST32 "x"
+#endif
+#if !defined PRIXFAST32 || PRI_MACROS_BROKEN
+# undef PRIXFAST32
+# define PRIXFAST32 "X"
+#endif
+#if !defined PRIdFAST64 || PRI_MACROS_BROKEN
+# undef PRIdFAST64
+# define PRIdFAST64 PRId64
+#endif
+#if !defined PRIiFAST64 || PRI_MACROS_BROKEN
+# undef PRIiFAST64
+# define PRIiFAST64 PRIi64
+#endif
+#if !defined PRIoFAST64 || PRI_MACROS_BROKEN
+# undef PRIoFAST64
+# define PRIoFAST64 PRIo64
+#endif
+#if !defined PRIuFAST64 || PRI_MACROS_BROKEN
+# undef PRIuFAST64
+# define PRIuFAST64 PRIu64
+#endif
+#if !defined PRIxFAST64 || PRI_MACROS_BROKEN
+# undef PRIxFAST64
+# define PRIxFAST64 PRIx64
+#endif
+#if !defined PRIXFAST64 || PRI_MACROS_BROKEN
+# undef PRIXFAST64
+# define PRIXFAST64 PRIX64
+#endif
+#if !defined PRIdMAX || PRI_MACROS_BROKEN
+# undef PRIdMAX
+# define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld")
+#endif
+#if !defined PRIiMAX || PRI_MACROS_BROKEN
+# undef PRIiMAX
+# define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli")
+#endif
+#if !defined PRIoMAX || PRI_MACROS_BROKEN
+# undef PRIoMAX
+# define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo")
+#endif
+#if !defined PRIuMAX || PRI_MACROS_BROKEN
+# undef PRIuMAX
+# define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu")
+#endif
+#if !defined PRIxMAX || PRI_MACROS_BROKEN
+# undef PRIxMAX
+# define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx")
+#endif
+#if !defined PRIXMAX || PRI_MACROS_BROKEN
+# undef PRIXMAX
+# define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX")
+#endif
+#if !defined PRIdPTR || PRI_MACROS_BROKEN
+# undef PRIdPTR
+# define PRIdPTR \
+ (sizeof (void *) == sizeof (long) ? "ld" : \
+ sizeof (void *) == sizeof (int) ? "d" : \
+ "lld")
+#endif
+#if !defined PRIiPTR || PRI_MACROS_BROKEN
+# undef PRIiPTR
+# define PRIiPTR \
+ (sizeof (void *) == sizeof (long) ? "li" : \
+ sizeof (void *) == sizeof (int) ? "i" : \
+ "lli")
+#endif
+#if !defined PRIoPTR || PRI_MACROS_BROKEN
+# undef PRIoPTR
+# define PRIoPTR \
+ (sizeof (void *) == sizeof (long) ? "lo" : \
+ sizeof (void *) == sizeof (int) ? "o" : \
+ "llo")
+#endif
+#if !defined PRIuPTR || PRI_MACROS_BROKEN
+# undef PRIuPTR
+# define PRIuPTR \
+ (sizeof (void *) == sizeof (long) ? "lu" : \
+ sizeof (void *) == sizeof (int) ? "u" : \
+ "llu")
+#endif
+#if !defined PRIxPTR || PRI_MACROS_BROKEN
+# undef PRIxPTR
+# define PRIxPTR \
+ (sizeof (void *) == sizeof (long) ? "lx" : \
+ sizeof (void *) == sizeof (int) ? "x" : \
+ "llx")
+#endif
+#if !defined PRIXPTR || PRI_MACROS_BROKEN
+# undef PRIXPTR
+# define PRIXPTR \
+ (sizeof (void *) == sizeof (long) ? "lX" : \
+ sizeof (void *) == sizeof (int) ? "X" : \
+ "llX")
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ISO C functions. This is required by the standard
+ because some ISO C functions will require linking with this object
+ file and the name space must not be polluted. */
+# define open __open
+# define close __close
+# define read __read
+# define mmap __mmap
+# define munmap __munmap
+#endif
+
+/* For those losing systems which don't have `alloca' we have to add
+ some additional code emulating it. */
+#ifdef HAVE_ALLOCA
+# define freea(p) /* nothing */
+#else
+# define alloca(n) malloc (n)
+# define freea(p) free (p)
+#endif
+
+/* For systems that distinguish between text and binary I/O.
+ O_BINARY is usually declared in <fcntl.h>. */
+#if !defined O_BINARY && defined _O_BINARY
+ /* For MSC-compatible compilers. */
+# define O_BINARY _O_BINARY
+# define O_TEXT _O_TEXT
+#endif
+#ifdef __BEOS__
+ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
+# undef O_BINARY
+# undef O_TEXT
+#endif
+/* On reasonable systems, binary I/O is the default. */
+#ifndef O_BINARY
+# define O_BINARY 0
+#endif
+
+
+/* Prototypes for local functions. Needed to ensure compiler checking of
+ function argument counts despite of K&R C function definition syntax. */
+static const char *get_sysdep_segment_value PARAMS ((const char *name));
+
+
+/* We need a sign, whether a new catalog was loaded, which can be associated
+ with all translations. This is important if the translations are
+ cached by one of GCC's features. */
+int _nl_msg_cat_cntr;
+
+
+/* Expand a system dependent string segment. Return NULL if unsupported. */
+static const char *
+get_sysdep_segment_value (name)
+ const char *name;
+{
+ /* Test for an ISO C 99 section 7.8.1 format string directive.
+ Syntax:
+ P R I { d | i | o | u | x | X }
+ { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR } */
+ /* We don't use a table of 14 times 6 'const char *' strings here, because
+ data relocations cost startup time. */
+ if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I')
+ {
+ if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u'
+ || name[3] == 'x' || name[3] == 'X')
+ {
+ if (name[4] == '8' && name[5] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRId8;
+ if (name[3] == 'i')
+ return PRIi8;
+ if (name[3] == 'o')
+ return PRIo8;
+ if (name[3] == 'u')
+ return PRIu8;
+ if (name[3] == 'x')
+ return PRIx8;
+ if (name[3] == 'X')
+ return PRIX8;
+ abort ();
+ }
+ if (name[4] == '1' && name[5] == '6' && name[6] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRId16;
+ if (name[3] == 'i')
+ return PRIi16;
+ if (name[3] == 'o')
+ return PRIo16;
+ if (name[3] == 'u')
+ return PRIu16;
+ if (name[3] == 'x')
+ return PRIx16;
+ if (name[3] == 'X')
+ return PRIX16;
+ abort ();
+ }
+ if (name[4] == '3' && name[5] == '2' && name[6] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRId32;
+ if (name[3] == 'i')
+ return PRIi32;
+ if (name[3] == 'o')
+ return PRIo32;
+ if (name[3] == 'u')
+ return PRIu32;
+ if (name[3] == 'x')
+ return PRIx32;
+ if (name[3] == 'X')
+ return PRIX32;
+ abort ();
+ }
+ if (name[4] == '6' && name[5] == '4' && name[6] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRId64;
+ if (name[3] == 'i')
+ return PRIi64;
+ if (name[3] == 'o')
+ return PRIo64;
+ if (name[3] == 'u')
+ return PRIu64;
+ if (name[3] == 'x')
+ return PRIx64;
+ if (name[3] == 'X')
+ return PRIX64;
+ abort ();
+ }
+ if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A'
+ && name[7] == 'S' && name[8] == 'T')
+ {
+ if (name[9] == '8' && name[10] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdLEAST8;
+ if (name[3] == 'i')
+ return PRIiLEAST8;
+ if (name[3] == 'o')
+ return PRIoLEAST8;
+ if (name[3] == 'u')
+ return PRIuLEAST8;
+ if (name[3] == 'x')
+ return PRIxLEAST8;
+ if (name[3] == 'X')
+ return PRIXLEAST8;
+ abort ();
+ }
+ if (name[9] == '1' && name[10] == '6' && name[11] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdLEAST16;
+ if (name[3] == 'i')
+ return PRIiLEAST16;
+ if (name[3] == 'o')
+ return PRIoLEAST16;
+ if (name[3] == 'u')
+ return PRIuLEAST16;
+ if (name[3] == 'x')
+ return PRIxLEAST16;
+ if (name[3] == 'X')
+ return PRIXLEAST16;
+ abort ();
+ }
+ if (name[9] == '3' && name[10] == '2' && name[11] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdLEAST32;
+ if (name[3] == 'i')
+ return PRIiLEAST32;
+ if (name[3] == 'o')
+ return PRIoLEAST32;
+ if (name[3] == 'u')
+ return PRIuLEAST32;
+ if (name[3] == 'x')
+ return PRIxLEAST32;
+ if (name[3] == 'X')
+ return PRIXLEAST32;
+ abort ();
+ }
+ if (name[9] == '6' && name[10] == '4' && name[11] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdLEAST64;
+ if (name[3] == 'i')
+ return PRIiLEAST64;
+ if (name[3] == 'o')
+ return PRIoLEAST64;
+ if (name[3] == 'u')
+ return PRIuLEAST64;
+ if (name[3] == 'x')
+ return PRIxLEAST64;
+ if (name[3] == 'X')
+ return PRIXLEAST64;
+ abort ();
+ }
+ }
+ if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S'
+ && name[7] == 'T')
+ {
+ if (name[8] == '8' && name[9] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdFAST8;
+ if (name[3] == 'i')
+ return PRIiFAST8;
+ if (name[3] == 'o')
+ return PRIoFAST8;
+ if (name[3] == 'u')
+ return PRIuFAST8;
+ if (name[3] == 'x')
+ return PRIxFAST8;
+ if (name[3] == 'X')
+ return PRIXFAST8;
+ abort ();
+ }
+ if (name[8] == '1' && name[9] == '6' && name[10] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdFAST16;
+ if (name[3] == 'i')
+ return PRIiFAST16;
+ if (name[3] == 'o')
+ return PRIoFAST16;
+ if (name[3] == 'u')
+ return PRIuFAST16;
+ if (name[3] == 'x')
+ return PRIxFAST16;
+ if (name[3] == 'X')
+ return PRIXFAST16;
+ abort ();
+ }
+ if (name[8] == '3' && name[9] == '2' && name[10] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdFAST32;
+ if (name[3] == 'i')
+ return PRIiFAST32;
+ if (name[3] == 'o')
+ return PRIoFAST32;
+ if (name[3] == 'u')
+ return PRIuFAST32;
+ if (name[3] == 'x')
+ return PRIxFAST32;
+ if (name[3] == 'X')
+ return PRIXFAST32;
+ abort ();
+ }
+ if (name[8] == '6' && name[9] == '4' && name[10] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdFAST64;
+ if (name[3] == 'i')
+ return PRIiFAST64;
+ if (name[3] == 'o')
+ return PRIoFAST64;
+ if (name[3] == 'u')
+ return PRIuFAST64;
+ if (name[3] == 'x')
+ return PRIxFAST64;
+ if (name[3] == 'X')
+ return PRIXFAST64;
+ abort ();
+ }
+ }
+ if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X'
+ && name[7] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdMAX;
+ if (name[3] == 'i')
+ return PRIiMAX;
+ if (name[3] == 'o')
+ return PRIoMAX;
+ if (name[3] == 'u')
+ return PRIuMAX;
+ if (name[3] == 'x')
+ return PRIxMAX;
+ if (name[3] == 'X')
+ return PRIXMAX;
+ abort ();
+ }
+ if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R'
+ && name[7] == '\0')
+ {
+ if (name[3] == 'd')
+ return PRIdPTR;
+ if (name[3] == 'i')
+ return PRIiPTR;
+ if (name[3] == 'o')
+ return PRIoPTR;
+ if (name[3] == 'u')
+ return PRIuPTR;
+ if (name[3] == 'x')
+ return PRIxPTR;
+ if (name[3] == 'X')
+ return PRIXPTR;
+ abort ();
+ }
+ }
+ }
+ /* Other system dependent strings are not valid. */
+ return NULL;
+}
+
+/* Initialize the codeset dependent parts of an opened message catalog.
+ Return the header entry. */
+const char *
+internal_function
+_nl_init_domain_conv (domain_file, domain, domainbinding)
+ struct loaded_l10nfile *domain_file;
+ struct loaded_domain *domain;
+ struct binding *domainbinding;
+{
+ /* Find out about the character set the file is encoded with.
+ This can be found (in textual form) in the entry "". If this
+ entry does not exist or if this does not contain the `charset='
+ information, we will assume the charset matches the one the
+ current locale and we don't have to perform any conversion. */
+ char *nullentry;
+ size_t nullentrylen;
+
+ /* Preinitialize fields, to avoid recursion during _nl_find_msg. */
+ domain->codeset_cntr =
+ (domainbinding != NULL ? domainbinding->codeset_cntr : 0);
+#ifdef _LIBC
+ domain->conv = (__gconv_t) -1;
+#else
+# if HAVE_ICONV
+ domain->conv = (iconv_t) -1;
+# endif
+#endif
+ domain->conv_tab = NULL;
+
+ /* Get the header entry. */
+ nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
+
+ if (nullentry != NULL)
+ {
+#if defined _LIBC || HAVE_ICONV
+ const char *charsetstr;
+
+ charsetstr = strstr (nullentry, "charset=");
+ if (charsetstr != NULL)
+ {
+ size_t len;
+ char *charset;
+ const char *outcharset;
+
+ charsetstr += strlen ("charset=");
+ len = strcspn (charsetstr, " \t\n");
+
+ charset = (char *) alloca (len + 1);
+# if defined _LIBC || HAVE_MEMPCPY
+ *((char *) mempcpy (charset, charsetstr, len)) = '\0';
+# else
+ memcpy (charset, charsetstr, len);
+ charset[len] = '\0';
+# endif
+
+ /* The output charset should normally be determined by the
+ locale. But sometimes the locale is not used or not correctly
+ set up, so we provide a possibility for the user to override
+ this. Moreover, the value specified through
+ bind_textdomain_codeset overrides both. */
+ if (domainbinding != NULL && domainbinding->codeset != NULL)
+ outcharset = domainbinding->codeset;
+ else
+ {
+ outcharset = getenv ("OUTPUT_CHARSET");
+ if (outcharset == NULL || outcharset[0] == '\0')
+ {
+# ifdef _LIBC
+ outcharset = _NL_CURRENT (LC_CTYPE, CODESET);
+# else
+# if HAVE_ICONV
+ extern const char *locale_charset PARAMS ((void));
+ outcharset = locale_charset ();
+# endif
+# endif
+ }
+ }
+
+# ifdef _LIBC
+ /* We always want to use transliteration. */
+ outcharset = norm_add_slashes (outcharset, "TRANSLIT");
+ charset = norm_add_slashes (charset, NULL);
+ if (__gconv_open (outcharset, charset, &domain->conv,
+ GCONV_AVOID_NOCONV)
+ != __GCONV_OK)
+ domain->conv = (__gconv_t) -1;
+# else
+# if HAVE_ICONV
+ /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
+ we want to use transliteration. */
+# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
+ || _LIBICONV_VERSION >= 0x0105
+ if (strchr (outcharset, '/') == NULL)
+ {
+ char *tmp;
+
+ len = strlen (outcharset);
+ tmp = (char *) alloca (len + 10 + 1);
+ memcpy (tmp, outcharset, len);
+ memcpy (tmp + len, "//TRANSLIT", 10 + 1);
+ outcharset = tmp;
+
+ domain->conv = iconv_open (outcharset, charset);
+
+ freea (outcharset);
+ }
+ else
+# endif
+ domain->conv = iconv_open (outcharset, charset);
+# endif
+# endif
+
+ freea (charset);
+ }
+#endif /* _LIBC || HAVE_ICONV */
+ }
+
+ return nullentry;
+}
+
+/* Frees the codeset dependent parts of an opened message catalog. */
+void
+internal_function
+_nl_free_domain_conv (domain)
+ struct loaded_domain *domain;
+{
+ if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
+ free (domain->conv_tab);
+
+#ifdef _LIBC
+ if (domain->conv != (__gconv_t) -1)
+ __gconv_close (domain->conv);
+#else
+# if HAVE_ICONV
+ if (domain->conv != (iconv_t) -1)
+ iconv_close (domain->conv);
+# endif
+#endif
+}
+
+/* Load the message catalogs specified by FILENAME. If it is no valid
+ message catalog do nothing. */
+void
+internal_function
+_nl_load_domain (domain_file, domainbinding)
+ struct loaded_l10nfile *domain_file;
+ struct binding *domainbinding;
+{
+ int fd;
+ size_t size;
+#ifdef _LIBC
+ struct stat64 st;
+#else
+ struct stat st;
+#endif
+ struct mo_file_header *data = (struct mo_file_header *) -1;
+ int use_mmap = 0;
+ struct loaded_domain *domain;
+ int revision;
+ const char *nullentry;
+
+ domain_file->decided = 1;
+ domain_file->data = NULL;
+
+ /* Note that it would be useless to store domainbinding in domain_file
+ because domainbinding might be == NULL now but != NULL later (after
+ a call to bind_textdomain_codeset). */
+
+ /* If the record does not represent a valid locale the FILENAME
+ might be NULL. This can happen when according to the given
+ specification the locale file name is different for XPG and CEN
+ syntax. */
+ if (domain_file->filename == NULL)
+ return;
+
+ /* Try to open the addressed file. */
+ fd = open (domain_file->filename, O_RDONLY | O_BINARY);
+ if (fd == -1)
+ return;
+
+ /* We must know about the size of the file. */
+ if (
+#ifdef _LIBC
+ __builtin_expect (fstat64 (fd, &st) != 0, 0)
+#else
+ __builtin_expect (fstat (fd, &st) != 0, 0)
+#endif
+ || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
+ || __builtin_expect (size < sizeof (struct mo_file_header), 0))
+ {
+ /* Something went wrong. */
+ close (fd);
+ return;
+ }
+
+#ifdef HAVE_MMAP
+ /* Now we are ready to load the file. If mmap() is available we try
+ this first. If not available or it failed we try to load it. */
+ data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
+ MAP_PRIVATE, fd, 0);
+
+ if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
+ {
+ /* mmap() call was successful. */
+ close (fd);
+ use_mmap = 1;
+ }
+#endif
+
+ /* If the data is not yet available (i.e. mmap'ed) we try to load
+ it manually. */
+ if (data == (struct mo_file_header *) -1)
+ {
+ size_t to_read;
+ char *read_ptr;
+
+ data = (struct mo_file_header *) malloc (size);
+ if (data == NULL)
+ return;
+
+ to_read = size;
+ read_ptr = (char *) data;
+ do
+ {
+ long int nb = (long int) read (fd, read_ptr, to_read);
+ if (nb <= 0)
+ {
+#ifdef EINTR
+ if (nb == -1 && errno == EINTR)
+ continue;
+#endif
+ close (fd);
+ return;
+ }
+ read_ptr += nb;
+ to_read -= nb;
+ }
+ while (to_read > 0);
+
+ close (fd);
+ }
+
+ /* Using the magic number we can test whether it really is a message
+ catalog file. */
+ if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
+ 0))
+ {
+ /* The magic number is wrong: not a message catalog file. */
+#ifdef HAVE_MMAP
+ if (use_mmap)
+ munmap ((caddr_t) data, size);
+ else
+#endif
+ free (data);
+ return;
+ }
+
+ domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
+ if (domain == NULL)
+ return;
+ domain_file->data = domain;
+
+ domain->data = (char *) data;
+ domain->use_mmap = use_mmap;
+ domain->mmap_size = size;
+ domain->must_swap = data->magic != _MAGIC;
+ domain->malloced = NULL;
+
+ /* Fill in the information about the available tables. */
+ revision = W (domain->must_swap, data->revision);
+ /* We support only the major revision 0. */
+ switch (revision >> 16)
+ {
+ case 0:
+ domain->nstrings = W (domain->must_swap, data->nstrings);
+ domain->orig_tab = (const struct string_desc *)
+ ((char *) data + W (domain->must_swap, data->orig_tab_offset));
+ domain->trans_tab = (const struct string_desc *)
+ ((char *) data + W (domain->must_swap, data->trans_tab_offset));
+ domain->hash_size = W (domain->must_swap, data->hash_tab_size);
+ domain->hash_tab =
+ (domain->hash_size > 2
+ ? (const nls_uint32 *)
+ ((char *) data + W (domain->must_swap, data->hash_tab_offset))
+ : NULL);
+ domain->must_swap_hash_tab = domain->must_swap;
+
+ /* Now dispatch on the minor revision. */
+ switch (revision & 0xffff)
+ {
+ case 0:
+ domain->n_sysdep_strings = 0;
+ domain->orig_sysdep_tab = NULL;
+ domain->trans_sysdep_tab = NULL;
+ break;
+ case 1:
+ default:
+ {
+ nls_uint32 n_sysdep_strings;
+
+ if (domain->hash_tab == NULL)
+ /* This is invalid. These minor revisions need a hash table. */
+ goto invalid;
+
+ n_sysdep_strings =
+ W (domain->must_swap, data->n_sysdep_strings);
+ if (n_sysdep_strings > 0)
+ {
+ nls_uint32 n_sysdep_segments;
+ const struct sysdep_segment *sysdep_segments;
+ const char **sysdep_segment_values;
+ const nls_uint32 *orig_sysdep_tab;
+ const nls_uint32 *trans_sysdep_tab;
+ size_t memneed;
+ char *mem;
+ struct sysdep_string_desc *inmem_orig_sysdep_tab;
+ struct sysdep_string_desc *inmem_trans_sysdep_tab;
+ nls_uint32 *inmem_hash_tab;
+ unsigned int i;
+
+ /* Get the values of the system dependent segments. */
+ n_sysdep_segments =
+ W (domain->must_swap, data->n_sysdep_segments);
+ sysdep_segments = (const struct sysdep_segment *)
+ ((char *) data
+ + W (domain->must_swap, data->sysdep_segments_offset));
+ sysdep_segment_values =
+ alloca (n_sysdep_segments * sizeof (const char *));
+ for (i = 0; i < n_sysdep_segments; i++)
+ {
+ const char *name =
+ (char *) data
+ + W (domain->must_swap, sysdep_segments[i].offset);
+ nls_uint32 namelen =
+ W (domain->must_swap, sysdep_segments[i].length);
+
+ if (!(namelen > 0 && name[namelen - 1] == '\0'))
+ {
+ freea (sysdep_segment_values);
+ goto invalid;
+ }
+
+ sysdep_segment_values[i] = get_sysdep_segment_value (name);
+ }
+
+ orig_sysdep_tab = (const nls_uint32 *)
+ ((char *) data
+ + W (domain->must_swap, data->orig_sysdep_tab_offset));
+ trans_sysdep_tab = (const nls_uint32 *)
+ ((char *) data
+ + W (domain->must_swap, data->trans_sysdep_tab_offset));
+
+ /* Compute the amount of additional memory needed for the
+ system dependent strings and the augmented hash table. */
+ memneed = 2 * n_sysdep_strings
+ * sizeof (struct sysdep_string_desc)
+ + domain->hash_size * sizeof (nls_uint32);
+ for (i = 0; i < 2 * n_sysdep_strings; i++)
+ {
+ const struct sysdep_string *sysdep_string =
+ (const struct sysdep_string *)
+ ((char *) data
+ + W (domain->must_swap,
+ i < n_sysdep_strings
+ ? orig_sysdep_tab[i]
+ : trans_sysdep_tab[i - n_sysdep_strings]));
+ size_t need = 0;
+ const struct segment_pair *p = sysdep_string->segments;
+
+ if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END)
+ for (p = sysdep_string->segments;; p++)
+ {
+ nls_uint32 sysdepref;
+
+ need += W (domain->must_swap, p->segsize);
+
+ sysdepref = W (domain->must_swap, p->sysdepref);
+ if (sysdepref == SEGMENTS_END)
+ break;
+
+ if (sysdepref >= n_sysdep_segments)
+ {
+ /* Invalid. */
+ freea (sysdep_segment_values);
+ goto invalid;
+ }
+
+ need += strlen (sysdep_segment_values[sysdepref]);
+ }
+
+ memneed += need;
+ }
+
+ /* Allocate additional memory. */
+ mem = (char *) malloc (memneed);
+ if (mem == NULL)
+ goto invalid;
+
+ domain->malloced = mem;
+ inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem;
+ mem += n_sysdep_strings * sizeof (struct sysdep_string_desc);
+ inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem;
+ mem += n_sysdep_strings * sizeof (struct sysdep_string_desc);
+ inmem_hash_tab = (nls_uint32 *) mem;
+ mem += domain->hash_size * sizeof (nls_uint32);
+
+ /* Compute the system dependent strings. */
+ for (i = 0; i < 2 * n_sysdep_strings; i++)
+ {
+ const struct sysdep_string *sysdep_string =
+ (const struct sysdep_string *)
+ ((char *) data
+ + W (domain->must_swap,
+ i < n_sysdep_strings
+ ? orig_sysdep_tab[i]
+ : trans_sysdep_tab[i - n_sysdep_strings]));
+ const char *static_segments =
+ (char *) data
+ + W (domain->must_swap, sysdep_string->offset);
+ const struct segment_pair *p = sysdep_string->segments;
+
+ /* Concatenate the segments, and fill
+ inmem_orig_sysdep_tab[i] (for i < n_sysdep_strings) and
+ inmem_trans_sysdep_tab[i-n_sysdep_strings] (for
+ i >= n_sysdep_strings). */
+
+ if (W (domain->must_swap, p->sysdepref) == SEGMENTS_END)
+ {
+ /* Only one static segment. */
+ inmem_orig_sysdep_tab[i].length =
+ W (domain->must_swap, p->segsize);
+ inmem_orig_sysdep_tab[i].pointer = static_segments;
+ }
+ else
+ {
+ inmem_orig_sysdep_tab[i].pointer = mem;
+
+ for (p = sysdep_string->segments;; p++)
+ {
+ nls_uint32 segsize =
+ W (domain->must_swap, p->segsize);
+ nls_uint32 sysdepref =
+ W (domain->must_swap, p->sysdepref);
+ size_t n;
+
+ if (segsize > 0)
+ {
+ memcpy (mem, static_segments, segsize);
+ mem += segsize;
+ static_segments += segsize;
+ }
+
+ if (sysdepref == SEGMENTS_END)
+ break;
+
+ n = strlen (sysdep_segment_values[sysdepref]);
+ memcpy (mem, sysdep_segment_values[sysdepref], n);
+ mem += n;
+ }
+
+ inmem_orig_sysdep_tab[i].length =
+ mem - inmem_orig_sysdep_tab[i].pointer;
+ }
+ }
+
+ /* Compute the augmented hash table. */
+ for (i = 0; i < domain->hash_size; i++)
+ inmem_hash_tab[i] =
+ W (domain->must_swap_hash_tab, domain->hash_tab[i]);
+ for (i = 0; i < n_sysdep_strings; i++)
+ {
+ const char *msgid = inmem_orig_sysdep_tab[i].pointer;
+ nls_uint32 hash_val = hash_string (msgid);
+ nls_uint32 idx = hash_val % domain->hash_size;
+ nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
+
+ for (;;)
+ {
+ if (inmem_hash_tab[idx] == 0)
+ {
+ /* Hash table entry is empty. Use it. */
+ inmem_hash_tab[idx] = 1 + domain->nstrings + i;
+ break;
+ }
+
+ if (idx >= domain->hash_size - incr)
+ idx -= domain->hash_size - incr;
+ else
+ idx += incr;
+ }
+ }
+
+ freea (sysdep_segment_values);
+
+ domain->n_sysdep_strings = n_sysdep_strings;
+ domain->orig_sysdep_tab = inmem_orig_sysdep_tab;
+ domain->trans_sysdep_tab = inmem_trans_sysdep_tab;
+
+ domain->hash_tab = inmem_hash_tab;
+ domain->must_swap_hash_tab = 0;
+ }
+ else
+ {
+ domain->n_sysdep_strings = 0;
+ domain->orig_sysdep_tab = NULL;
+ domain->trans_sysdep_tab = NULL;
+ }
+ }
+ break;
+ }
+ break;
+ default:
+ /* This is an invalid revision. */
+ invalid:
+ /* This is an invalid .mo file. */
+ if (domain->malloced)
+ free (domain->malloced);
+#ifdef HAVE_MMAP
+ if (use_mmap)
+ munmap ((caddr_t) data, size);
+ else
+#endif
+ free (data);
+ free (domain);
+ domain_file->data = NULL;
+ return;
+ }
+
+ /* Now initialize the character set converter from the character set
+ the file is encoded with (found in the header entry) to the domain's
+ specified character set or the locale's character set. */
+ nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
+
+ /* Also look for a plural specification. */
+ EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
+}
+
+
+#ifdef _LIBC
+void
+internal_function
+_nl_unload_domain (domain)
+ struct loaded_domain *domain;
+{
+ if (domain->plural != &__gettext_germanic_plural)
+ __gettext_free_exp (domain->plural);
+
+ _nl_free_domain_conv (domain);
+
+ if (domain->malloced)
+ free (domain->malloced);
+
+# ifdef _POSIX_MAPPED_FILES
+ if (domain->use_mmap)
+ munmap ((caddr_t) domain->data, domain->mmap_size);
+ else
+# endif /* _POSIX_MAPPED_FILES */
+ free ((void *) domain->data);
+
+ free (domain);
+}
+#endif
diff --git a/lib/intl/localcharset.c b/lib/intl/localcharset.c
new file mode 100644
index 0000000..6983d0b
--- /dev/null
+++ b/lib/intl/localcharset.c
@@ -0,0 +1,399 @@
+/* localcharset.c - Determine a canonical name for the current locale's character encoding. */
+
+/* Copyright (C) 2000-2003, 2005-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Written by Bruno Haible <bruno@clisp.org>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* Specification. */
+#include "localcharset.h"
+
+#if HAVE_STDDEF_H
+# include <stddef.h>
+#endif
+
+#include <stdio.h>
+#if HAVE_STRING_H
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#if defined _WIN32 || defined __WIN32__
+# undef WIN32 /* avoid warning on mingw32 */
+# define WIN32
+#endif
+
+#if defined __EMX__
+/* Assume EMX program runs on OS/2, even if compiled under DOS. */
+# define OS2
+#endif
+
+#if !defined WIN32
+# if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+# else
+# if HAVE_SETLOCALE
+# include <locale.h>
+# endif
+# endif
+#elif defined WIN32
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+#if defined OS2
+# define INCL_DOS
+# include <os2.h>
+#endif
+
+#if ENABLE_RELOCATABLE
+# include "relocatable.h"
+#else
+# define relocate(pathname) (pathname)
+#endif
+
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#endif
+
+#ifndef DIRECTORY_SEPARATOR
+# define DIRECTORY_SEPARATOR '/'
+#endif
+
+#ifndef ISSLASH
+# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
+#endif
+
+#ifdef HAVE_GETC_UNLOCKED
+# undef getc
+# define getc getc_unlocked
+#endif
+
+/* The following static variable is declared 'volatile' to avoid a
+ possible multithread problem in the function get_charset_aliases. If we
+ are running in a threaded environment, and if two threads initialize
+ 'charset_aliases' simultaneously, both will produce the same value,
+ and everything will be ok if the two assignments to 'charset_aliases'
+ are atomic. But I don't know what will happen if the two assignments mix. */
+#if __STDC__ != 1
+# define volatile /* empty */
+#endif
+/* Pointer to the contents of the charset.alias file, if it has already been
+ read, else NULL. Its format is:
+ ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
+static const char * volatile charset_aliases;
+
+/* Return a pointer to the contents of the charset.alias file. */
+static const char *
+get_charset_aliases ()
+{
+ const char *cp;
+
+ cp = charset_aliases;
+ if (cp == NULL)
+ {
+#if !(defined VMS || defined WIN32)
+ FILE *fp;
+ const char *dir = relocate (LIBDIR);
+ const char *base = "charset.alias";
+ char *file_name;
+
+ /* Concatenate dir and base into freshly allocated file_name. */
+ {
+ size_t dir_len = strlen (dir);
+ size_t base_len = strlen (base);
+ int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
+ file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
+ if (file_name != NULL)
+ {
+ memcpy (file_name, dir, dir_len);
+ if (add_slash)
+ file_name[dir_len] = DIRECTORY_SEPARATOR;
+ memcpy (file_name + dir_len + add_slash, base, base_len + 1);
+ }
+ }
+
+ if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
+ /* Out of memory or file not found, treat it as empty. */
+ cp = "";
+ else
+ {
+ /* Parse the file's contents. */
+ int c;
+ char buf1[50+1];
+ char buf2[50+1];
+ char *res_ptr = NULL;
+ size_t res_size = 0;
+ size_t l1, l2;
+
+ for (;;)
+ {
+ c = getc (fp);
+ if (c == EOF)
+ break;
+ if (c == '\n' || c == ' ' || c == '\t')
+ continue;
+ if (c == '#')
+ {
+ /* Skip comment, to end of line. */
+ do
+ c = getc (fp);
+ while (!(c == EOF || c == '\n'));
+ if (c == EOF)
+ break;
+ continue;
+ }
+ ungetc (c, fp);
+ if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
+ break;
+ l1 = strlen (buf1);
+ l2 = strlen (buf2);
+ if (res_size == 0)
+ {
+ res_size = l1 + 1 + l2 + 1;
+ res_ptr = (char *) malloc (res_size + 1);
+ }
+ else
+ {
+ res_size += l1 + 1 + l2 + 1;
+ res_ptr = (char *) realloc (res_ptr, res_size + 1);
+ }
+ if (res_ptr == NULL)
+ {
+ /* Out of memory. */
+ res_size = 0;
+ break;
+ }
+ strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
+ strcpy (res_ptr + res_size - (l2 + 1), buf2);
+ }
+ fclose (fp);
+ if (res_size == 0)
+ cp = "";
+ else
+ {
+ *(res_ptr + res_size) = '\0';
+ cp = res_ptr;
+ }
+ }
+
+ if (file_name != NULL)
+ free (file_name);
+
+#else
+
+# if defined VMS
+ /* To avoid the troubles of an extra file charset.alias_vms in the
+ sources of many GNU packages, simply inline the aliases here. */
+ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation
+ "Compaq C Run-Time Library Reference Manual for OpenVMS systems"
+ section 10.7 "Handling Different Character Sets". */
+ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
+ "ISO8859-2" "\0" "ISO-8859-2" "\0"
+ "ISO8859-5" "\0" "ISO-8859-5" "\0"
+ "ISO8859-7" "\0" "ISO-8859-7" "\0"
+ "ISO8859-8" "\0" "ISO-8859-8" "\0"
+ "ISO8859-9" "\0" "ISO-8859-9" "\0"
+ /* Japanese */
+ "eucJP" "\0" "EUC-JP" "\0"
+ "SJIS" "\0" "SHIFT_JIS" "\0"
+ "DECKANJI" "\0" "DEC-KANJI" "\0"
+ "SDECKANJI" "\0" "EUC-JP" "\0"
+ /* Chinese */
+ "eucTW" "\0" "EUC-TW" "\0"
+ "DECHANYU" "\0" "DEC-HANYU" "\0"
+ "DECHANZI" "\0" "GB2312" "\0"
+ /* Korean */
+ "DECKOREAN" "\0" "EUC-KR" "\0";
+# endif
+
+# if defined WIN32
+ /* To avoid the troubles of installing a separate file in the same
+ directory as the DLL and of retrieving the DLL's directory at
+ runtime, simply inline the aliases here. */
+
+ cp = "CP936" "\0" "GBK" "\0"
+ "CP1361" "\0" "JOHAB" "\0"
+ "CP20127" "\0" "ASCII" "\0"
+ "CP20866" "\0" "KOI8-R" "\0"
+ "CP21866" "\0" "KOI8-RU" "\0"
+ "CP28591" "\0" "ISO-8859-1" "\0"
+ "CP28592" "\0" "ISO-8859-2" "\0"
+ "CP28593" "\0" "ISO-8859-3" "\0"
+ "CP28594" "\0" "ISO-8859-4" "\0"
+ "CP28595" "\0" "ISO-8859-5" "\0"
+ "CP28596" "\0" "ISO-8859-6" "\0"
+ "CP28597" "\0" "ISO-8859-7" "\0"
+ "CP28598" "\0" "ISO-8859-8" "\0"
+ "CP28599" "\0" "ISO-8859-9" "\0"
+ "CP28605" "\0" "ISO-8859-15" "\0";
+# endif
+#endif
+
+ charset_aliases = cp;
+ }
+
+ return cp;
+}
+
+/* Determine the current locale's character encoding, and canonicalize it
+ into one of the canonical names listed in config.charset.
+ The result must not be freed; it is statically allocated.
+ If the canonical name cannot be determined, the result is a non-canonical
+ name. */
+
+#ifdef STATIC
+STATIC
+#endif
+const char *
+locale_charset ()
+{
+ const char *codeset;
+ const char *aliases;
+
+#if !(defined WIN32 || defined OS2)
+
+# if HAVE_LANGINFO_CODESET
+
+ /* Most systems support nl_langinfo (CODESET) nowadays. */
+ codeset = nl_langinfo (CODESET);
+
+# else
+
+ /* On old systems which lack it, use setlocale or getenv. */
+ const char *locale = NULL;
+
+ /* But most old systems don't have a complete set of locales. Some
+ (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
+ use setlocale here; it would return "C" when it doesn't support the
+ locale name the user has set. */
+# if HAVE_SETLOCALE && 0
+ locale = setlocale (LC_CTYPE, NULL);
+# endif
+ if (locale == NULL || locale[0] == '\0')
+ {
+ locale = getenv ("LC_ALL");
+ if (locale == NULL || locale[0] == '\0')
+ {
+ locale = getenv ("LC_CTYPE");
+ if (locale == NULL || locale[0] == '\0')
+ locale = getenv ("LANG");
+ }
+ }
+
+ /* On some old systems, one used to set locale = "iso8859_1". On others,
+ you set it to "language_COUNTRY.charset". In any case, we resolve it
+ through the charset.alias file. */
+ codeset = locale;
+
+# endif
+
+#elif defined WIN32
+
+ static char buf[2 + 10 + 1];
+
+ /* Woe32 has a function returning the locale's codepage as a number. */
+ sprintf (buf, "CP%u", GetACP ());
+ codeset = buf;
+
+#elif defined OS2
+
+ const char *locale;
+ static char buf[2 + 10 + 1];
+ ULONG cp[3];
+ ULONG cplen;
+
+ /* Allow user to override the codeset, as set in the operating system,
+ with standard language environment variables. */
+ locale = getenv ("LC_ALL");
+ if (locale == NULL || locale[0] == '\0')
+ {
+ locale = getenv ("LC_CTYPE");
+ if (locale == NULL || locale[0] == '\0')
+ locale = getenv ("LANG");
+ }
+ if (locale != NULL && locale[0] != '\0')
+ {
+ /* If the locale name contains an encoding after the dot, return it. */
+ const char *dot = strchr (locale, '.');
+
+ if (dot != NULL)
+ {
+ const char *modifier;
+
+ dot++;
+ /* Look for the possible @... trailer and remove it, if any. */
+ modifier = strchr (dot, '@');
+ if (modifier == NULL)
+ return dot;
+ if (modifier - dot < sizeof (buf))
+ {
+ memcpy (buf, dot, modifier - dot);
+ buf [modifier - dot] = '\0';
+ return buf;
+ }
+ }
+
+ /* Resolve through the charset.alias file. */
+ codeset = locale;
+ }
+ else
+ {
+ /* OS/2 has a function returning the locale's codepage as a number. */
+ if (DosQueryCp (sizeof (cp), cp, &cplen))
+ codeset = "";
+ else
+ {
+ sprintf (buf, "CP%u", cp[0]);
+ codeset = buf;
+ }
+ }
+
+#endif
+
+ if (codeset == NULL)
+ /* The canonical name cannot be determined. */
+ codeset = "";
+
+ /* Resolve alias. */
+ for (aliases = get_charset_aliases ();
+ *aliases != '\0';
+ aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
+ if (strcmp (codeset, aliases) == 0
+ || (aliases[0] == '*' && aliases[1] == '\0'))
+ {
+ codeset = aliases + strlen (aliases) + 1;
+ break;
+ }
+
+ /* Don't return an empty string. GNU libc and GNU libiconv interpret
+ the empty string as denoting "the locale's character encoding",
+ thus GNU libiconv would call this function a second time. */
+ if (codeset[0] == '\0')
+ codeset = "ASCII";
+
+ return codeset;
+}
diff --git a/lib/intl/localcharset.h b/lib/intl/localcharset.h
new file mode 100644
index 0000000..e529958
--- /dev/null
+++ b/lib/intl/localcharset.h
@@ -0,0 +1,43 @@
+/* localcharset.h - Determine a canonical name for the current locale's character encoding. */
+
+/* Copyright (C) 2000-2003, 2005-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _LOCALCHARSET_H
+#define _LOCALCHARSET_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Determine the current locale's character encoding, and canonicalize it
+ into one of the canonical names listed in config.charset.
+ The result must not be freed; it is statically allocated.
+ If the canonical name cannot be determined, the result is a non-canonical
+ name. */
+extern const char * locale_charset (void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _LOCALCHARSET_H */
diff --git a/lib/intl/locale.alias b/lib/intl/locale.alias
new file mode 100644
index 0000000..51dd21e
--- /dev/null
+++ b/lib/intl/locale.alias
@@ -0,0 +1,78 @@
+# locale.alias - Locale name alias data base.
+#
+# Copyright (C) 1996,1997,1998,1999,2000,2001,2005-2009 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+# The format of this file is the same as for the corresponding file of
+# the X Window System, which normally can be found in
+# /usr/lib/X11/locale/locale.alias
+# A single line contains two fields: an alias and a substitution value.
+# All entries are case independent.
+
+# Note: This file is far from being complete. If you have a value for
+# your own site which you think might be useful for others too, share
+# it with the rest of us. Send it using the `glibcbug' script to
+# bugs@gnu.org.
+
+# Packages using this file:
+
+bokmal no_NO.ISO-8859-1
+bokmål no_NO.ISO-8859-1
+catalan ca_ES.ISO-8859-1
+croatian hr_HR.ISO-8859-2
+czech cs_CZ.ISO-8859-2
+danish da_DK.ISO-8859-1
+dansk da_DK.ISO-8859-1
+deutsch de_DE.ISO-8859-1
+dutch nl_NL.ISO-8859-1
+eesti et_EE.ISO-8859-1
+estonian et_EE.ISO-8859-1
+finnish fi_FI.ISO-8859-1
+français fr_FR.ISO-8859-1
+french fr_FR.ISO-8859-1
+galego gl_ES.ISO-8859-1
+galician gl_ES.ISO-8859-1
+german de_DE.ISO-8859-1
+greek el_GR.ISO-8859-7
+hebrew he_IL.ISO-8859-8
+hrvatski hr_HR.ISO-8859-2
+hungarian hu_HU.ISO-8859-2
+icelandic is_IS.ISO-8859-1
+italian it_IT.ISO-8859-1
+japanese ja_JP.eucJP
+japanese.euc ja_JP.eucJP
+ja_JP ja_JP.eucJP
+ja_JP.ujis ja_JP.eucJP
+japanese.sjis ja_JP.SJIS
+korean ko_KR.eucKR
+korean.euc ko_KR.eucKR
+ko_KR ko_KR.eucKR
+lithuanian lt_LT.ISO-8859-13
+nb_NO no_NO.ISO-8859-1
+nb_NO.ISO-8859-1 no_NO.ISO-8859-1
+norwegian no_NO.ISO-8859-1
+nynorsk nn_NO.ISO-8859-1
+polish pl_PL.ISO-8859-2
+portuguese pt_PT.ISO-8859-1
+romanian ro_RO.ISO-8859-2
+russian ru_RU.ISO-8859-5
+slovak sk_SK.ISO-8859-2
+slovene sl_SI.ISO-8859-2
+slovenian sl_SI.ISO-8859-2
+spanish es_ES.ISO-8859-1
+swedish sv_SE.ISO-8859-1
+thai th_TH.TIS-620
+turkish tr_TR.ISO-8859-9
diff --git a/lib/intl/localealias.c b/lib/intl/localealias.c
new file mode 100644
index 0000000..d99a48d
--- /dev/null
+++ b/lib/intl/localealias.c
@@ -0,0 +1,421 @@
+/* localealias.c - Handle aliases for locale names. */
+
+/* Copyright (C) 1995-1999, 2000-2001, 2003, 2005-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <stdio.h>
+#if defined _LIBC || defined HAVE___FSETLOCKING
+# include <stdio_ext.h>
+#endif
+#include <sys/types.h>
+
+#ifdef __GNUC__
+# undef alloca
+# define alloca __builtin_alloca
+# define HAVE_ALLOCA 1
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# if defined HAVE_ALLOCA_H || defined _LIBC
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "gettextP.h"
+
+#if ENABLE_RELOCATABLE
+# include "relocatable.h"
+#else
+# define relocate(pathname) (pathname)
+#endif
+
+/* @@ end of prolog @@ */
+
+#ifdef _LIBC
+/* Rename the non ANSI C functions. This is required by the standard
+ because some ANSI C functions will require linking with this object
+ file and the name space must not be polluted. */
+# define strcasecmp __strcasecmp
+
+# ifndef mempcpy
+# define mempcpy __mempcpy
+# endif
+# define HAVE_MEMPCPY 1
+# define HAVE___FSETLOCKING 1
+
+/* We need locking here since we can be called from different places. */
+# include <bits/libc-lock.h>
+
+__libc_lock_define_initialized (static, lock);
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+/* Some optimizations for glibc. */
+#ifdef _LIBC
+# define FEOF(fp) feof_unlocked (fp)
+# define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp)
+#else
+# define FEOF(fp) feof (fp)
+# define FGETS(buf, n, fp) fgets (buf, n, fp)
+#endif
+
+/* For those losing systems which don't have `alloca' we have to add
+ some additional code emulating it. */
+#ifdef HAVE_ALLOCA
+# define freea(p) /* nothing */
+#else
+# define alloca(n) malloc (n)
+# define freea(p) free (p)
+#endif
+
+#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED
+# undef fgets
+# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
+#endif
+#if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED
+# undef feof
+# define feof(s) feof_unlocked (s)
+#endif
+
+
+struct alias_map
+{
+ const char *alias;
+ const char *value;
+};
+
+
+#ifndef _LIBC
+# define libc_freeres_ptr(decl) decl
+#endif
+
+libc_freeres_ptr (static char *string_space);
+static size_t string_space_act;
+static size_t string_space_max;
+libc_freeres_ptr (static struct alias_map *map);
+static size_t nmap;
+static size_t maxmap;
+
+
+/* Prototypes for local functions. */
+static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
+ internal_function;
+static int extend_alias_table PARAMS ((void));
+static int alias_compare PARAMS ((const struct alias_map *map1,
+ const struct alias_map *map2));
+
+
+const char *
+_nl_expand_alias (name)
+ const char *name;
+{
+ static const char *locale_alias_path;
+ struct alias_map *retval;
+ const char *result = NULL;
+ size_t added;
+
+#ifdef _LIBC
+ __libc_lock_lock (lock);
+#endif
+
+ if (locale_alias_path == NULL)
+ locale_alias_path = LOCALE_ALIAS_PATH;
+
+ do
+ {
+ struct alias_map item;
+
+ item.alias = name;
+
+ if (nmap > 0)
+ retval = (struct alias_map *) bsearch (&item, map, nmap,
+ sizeof (struct alias_map),
+ (int (*) PARAMS ((const void *,
+ const void *))
+ ) alias_compare);
+ else
+ retval = NULL;
+
+ /* We really found an alias. Return the value. */
+ if (retval != NULL)
+ {
+ result = retval->value;
+ break;
+ }
+
+ /* Perhaps we can find another alias file. */
+ added = 0;
+ while (added == 0 && locale_alias_path[0] != '\0')
+ {
+ const char *start;
+
+ while (locale_alias_path[0] == PATH_SEPARATOR)
+ ++locale_alias_path;
+ start = locale_alias_path;
+
+ while (locale_alias_path[0] != '\0'
+ && locale_alias_path[0] != PATH_SEPARATOR)
+ ++locale_alias_path;
+
+ if (start < locale_alias_path)
+ added = read_alias_file (start, locale_alias_path - start);
+ }
+ }
+ while (added != 0);
+
+#ifdef _LIBC
+ __libc_lock_unlock (lock);
+#endif
+
+ return result;
+}
+
+
+static size_t
+internal_function
+read_alias_file (fname, fname_len)
+ const char *fname;
+ int fname_len;
+{
+ FILE *fp;
+ char *full_fname;
+ size_t added;
+ static const char aliasfile[] = "/locale.alias";
+
+ full_fname = (char *) alloca (fname_len + sizeof aliasfile);
+#ifdef HAVE_MEMPCPY
+ mempcpy (mempcpy (full_fname, fname, fname_len),
+ aliasfile, sizeof aliasfile);
+#else
+ memcpy (full_fname, fname, fname_len);
+ memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
+#endif
+
+ fp = fopen (relocate (full_fname), "r");
+ freea (full_fname);
+ if (fp == NULL)
+ return 0;
+
+#ifdef HAVE___FSETLOCKING
+ /* No threads present. */
+ __fsetlocking (fp, FSETLOCKING_BYCALLER);
+#endif
+
+ added = 0;
+ while (!FEOF (fp))
+ {
+ /* It is a reasonable approach to use a fix buffer here because
+ a) we are only interested in the first two fields
+ b) these fields must be usable as file names and so must not
+ be that long
+ We avoid a multi-kilobyte buffer here since this would use up
+ stack space which we might not have if the program ran out of
+ memory. */
+ char buf[400];
+ char *alias;
+ char *value;
+ char *cp;
+
+ if (FGETS (buf, sizeof buf, fp) == NULL)
+ /* EOF reached. */
+ break;
+
+ cp = buf;
+ /* Ignore leading white space. */
+ while (isspace ((unsigned char) cp[0]))
+ ++cp;
+
+ /* A leading '#' signals a comment line. */
+ if (cp[0] != '\0' && cp[0] != '#')
+ {
+ alias = cp++;
+ while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
+ ++cp;
+ /* Terminate alias name. */
+ if (cp[0] != '\0')
+ *cp++ = '\0';
+
+ /* Now look for the beginning of the value. */
+ while (isspace ((unsigned char) cp[0]))
+ ++cp;
+
+ if (cp[0] != '\0')
+ {
+ size_t alias_len;
+ size_t value_len;
+
+ value = cp++;
+ while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
+ ++cp;
+ /* Terminate value. */
+ if (cp[0] == '\n')
+ {
+ /* This has to be done to make the following test
+ for the end of line possible. We are looking for
+ the terminating '\n' which do not overwrite here. */
+ *cp++ = '\0';
+ *cp = '\n';
+ }
+ else if (cp[0] != '\0')
+ *cp++ = '\0';
+
+ if (nmap >= maxmap)
+ if (__builtin_expect (extend_alias_table (), 0))
+ return added;
+
+ alias_len = strlen (alias) + 1;
+ value_len = strlen (value) + 1;
+
+ if (string_space_act + alias_len + value_len > string_space_max)
+ {
+ /* Increase size of memory pool. */
+ size_t new_size = (string_space_max
+ + (alias_len + value_len > 1024
+ ? alias_len + value_len : 1024));
+ char *new_pool = (char *) realloc (string_space, new_size);
+ if (new_pool == NULL)
+ return added;
+
+ if (__builtin_expect (string_space != new_pool, 0))
+ {
+ size_t i;
+
+ for (i = 0; i < nmap; i++)
+ {
+ map[i].alias += new_pool - string_space;
+ map[i].value += new_pool - string_space;
+ }
+ }
+
+ string_space = new_pool;
+ string_space_max = new_size;
+ }
+
+ map[nmap].alias = memcpy (&string_space[string_space_act],
+ alias, alias_len);
+ string_space_act += alias_len;
+
+ map[nmap].value = memcpy (&string_space[string_space_act],
+ value, value_len);
+ string_space_act += value_len;
+
+ ++nmap;
+ ++added;
+ }
+ }
+
+ /* Possibly not the whole line fits into the buffer. Ignore
+ the rest of the line. */
+ while (strchr (buf, '\n') == NULL)
+ if (FGETS (buf, sizeof buf, fp) == NULL)
+ /* Make sure the inner loop will be left. The outer loop
+ will exit at the `feof' test. */
+ break;
+ }
+
+ /* Should we test for ferror()? I think we have to silently ignore
+ errors. --drepper */
+ fclose (fp);
+
+ if (added > 0)
+ qsort (map, nmap, sizeof (struct alias_map),
+ (int (*) PARAMS ((const void *, const void *))) alias_compare);
+
+ return added;
+}
+
+
+static int
+extend_alias_table ()
+{
+ size_t new_size;
+ struct alias_map *new_map;
+
+ new_size = maxmap == 0 ? 100 : 2 * maxmap;
+ new_map = (struct alias_map *) realloc (map, (new_size
+ * sizeof (struct alias_map)));
+ if (new_map == NULL)
+ /* Simply don't extend: we don't have any more core. */
+ return -1;
+
+ map = new_map;
+ maxmap = new_size;
+ return 0;
+}
+
+
+static int
+alias_compare (map1, map2)
+ const struct alias_map *map1;
+ const struct alias_map *map2;
+{
+#if defined _LIBC || defined HAVE_STRCASECMP
+ return strcasecmp (map1->alias, map2->alias);
+#else
+ const unsigned char *p1 = (const unsigned char *) map1->alias;
+ const unsigned char *p2 = (const unsigned char *) map2->alias;
+ unsigned char c1, c2;
+
+ if (p1 == p2)
+ return 0;
+
+ do
+ {
+ /* I know this seems to be odd but the tolower() function in
+ some systems libc cannot handle nonalpha characters. */
+ c1 = isupper (*p1) ? tolower (*p1) : *p1;
+ c2 = isupper (*p2) ? tolower (*p2) : *p2;
+ if (c1 == '\0')
+ break;
+ ++p1;
+ ++p2;
+ }
+ while (c1 == c2);
+
+ return c1 - c2;
+#endif
+}
diff --git a/lib/intl/localename.c b/lib/intl/localename.c
new file mode 100644
index 0000000..795a34f
--- /dev/null
+++ b/lib/intl/localename.c
@@ -0,0 +1,774 @@
+/* localename.c - Determine the current selected locale. */
+
+/* Copyright (C) 1995-1999, 2000-2002, 2005-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Written by Ulrich Drepper <drepper@gnu.org>, 1995. */
+/* Win32 code written by Tor Lillqvist <tml@iki.fi>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <locale.h>
+
+#if defined _WIN32 || defined __WIN32__
+# undef WIN32 /* avoid warning on mingw32 */
+# define WIN32
+#endif
+
+#ifdef WIN32
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+/* Mingw headers don't have latest language and sublanguage codes. */
+# ifndef LANG_AFRIKAANS
+# define LANG_AFRIKAANS 0x36
+# endif
+# ifndef LANG_ALBANIAN
+# define LANG_ALBANIAN 0x1c
+# endif
+# ifndef LANG_ARABIC
+# define LANG_ARABIC 0x01
+# endif
+# ifndef LANG_ARMENIAN
+# define LANG_ARMENIAN 0x2b
+# endif
+# ifndef LANG_ASSAMESE
+# define LANG_ASSAMESE 0x4d
+# endif
+# ifndef LANG_AZERI
+# define LANG_AZERI 0x2c
+# endif
+# ifndef LANG_BASQUE
+# define LANG_BASQUE 0x2d
+# endif
+# ifndef LANG_BELARUSIAN
+# define LANG_BELARUSIAN 0x23
+# endif
+# ifndef LANG_BENGALI
+# define LANG_BENGALI 0x45
+# endif
+# ifndef LANG_CATALAN
+# define LANG_CATALAN 0x03
+# endif
+# ifndef LANG_DIVEHI
+# define LANG_DIVEHI 0x65
+# endif
+# ifndef LANG_ESTONIAN
+# define LANG_ESTONIAN 0x25
+# endif
+# ifndef LANG_FAEROESE
+# define LANG_FAEROESE 0x38
+# endif
+# ifndef LANG_FARSI
+# define LANG_FARSI 0x29
+# endif
+# ifndef LANG_GALICIAN
+# define LANG_GALICIAN 0x56
+# endif
+# ifndef LANG_GEORGIAN
+# define LANG_GEORGIAN 0x37
+# endif
+# ifndef LANG_GUJARATI
+# define LANG_GUJARATI 0x47
+# endif
+# ifndef LANG_HEBREW
+# define LANG_HEBREW 0x0d
+# endif
+# ifndef LANG_HINDI
+# define LANG_HINDI 0x39
+# endif
+# ifndef LANG_INDONESIAN
+# define LANG_INDONESIAN 0x21
+# endif
+# ifndef LANG_KANNADA
+# define LANG_KANNADA 0x4b
+# endif
+# ifndef LANG_KASHMIRI
+# define LANG_KASHMIRI 0x60
+# endif
+# ifndef LANG_KAZAK
+# define LANG_KAZAK 0x3f
+# endif
+# ifndef LANG_KONKANI
+# define LANG_KONKANI 0x57
+# endif
+# ifndef LANG_KYRGYZ
+# define LANG_KYRGYZ 0x40
+# endif
+# ifndef LANG_LATVIAN
+# define LANG_LATVIAN 0x26
+# endif
+# ifndef LANG_LITHUANIAN
+# define LANG_LITHUANIAN 0x27
+# endif
+# ifndef LANG_MACEDONIAN
+# define LANG_MACEDONIAN 0x2f
+# endif
+# ifndef LANG_MALAY
+# define LANG_MALAY 0x3e
+# endif
+# ifndef LANG_MALAYALAM
+# define LANG_MALAYALAM 0x4c
+# endif
+# ifndef LANG_MANIPURI
+# define LANG_MANIPURI 0x58
+# endif
+# ifndef LANG_MARATHI
+# define LANG_MARATHI 0x4e
+# endif
+# ifndef LANG_MONGOLIAN
+# define LANG_MONGOLIAN 0x50
+# endif
+# ifndef LANG_NEPALI
+# define LANG_NEPALI 0x61
+# endif
+# ifndef LANG_ORIYA
+# define LANG_ORIYA 0x48
+# endif
+# ifndef LANG_PUNJABI
+# define LANG_PUNJABI 0x46
+# endif
+# ifndef LANG_SANSKRIT
+# define LANG_SANSKRIT 0x4f
+# endif
+# ifndef LANG_SERBIAN
+# define LANG_SERBIAN 0x1a
+# endif
+# ifndef LANG_SINDHI
+# define LANG_SINDHI 0x59
+# endif
+# ifndef LANG_SLOVAK
+# define LANG_SLOVAK 0x1b
+# endif
+# ifndef LANG_SORBIAN
+# define LANG_SORBIAN 0x2e
+# endif
+# ifndef LANG_SWAHILI
+# define LANG_SWAHILI 0x41
+# endif
+# ifndef LANG_SYRIAC
+# define LANG_SYRIAC 0x5a
+# endif
+# ifndef LANG_TAMIL
+# define LANG_TAMIL 0x49
+# endif
+# ifndef LANG_TATAR
+# define LANG_TATAR 0x44
+# endif
+# ifndef LANG_TELUGU
+# define LANG_TELUGU 0x4a
+# endif
+# ifndef LANG_THAI
+# define LANG_THAI 0x1e
+# endif
+# ifndef LANG_UKRAINIAN
+# define LANG_UKRAINIAN 0x22
+# endif
+# ifndef LANG_URDU
+# define LANG_URDU 0x20
+# endif
+# ifndef LANG_UZBEK
+# define LANG_UZBEK 0x43
+# endif
+# ifndef LANG_VIETNAMESE
+# define LANG_VIETNAMESE 0x2a
+# endif
+# ifndef SUBLANG_ARABIC_SAUDI_ARABIA
+# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
+# endif
+# ifndef SUBLANG_ARABIC_IRAQ
+# define SUBLANG_ARABIC_IRAQ 0x02
+# endif
+# ifndef SUBLANG_ARABIC_EGYPT
+# define SUBLANG_ARABIC_EGYPT 0x03
+# endif
+# ifndef SUBLANG_ARABIC_LIBYA
+# define SUBLANG_ARABIC_LIBYA 0x04
+# endif
+# ifndef SUBLANG_ARABIC_ALGERIA
+# define SUBLANG_ARABIC_ALGERIA 0x05
+# endif
+# ifndef SUBLANG_ARABIC_MOROCCO
+# define SUBLANG_ARABIC_MOROCCO 0x06
+# endif
+# ifndef SUBLANG_ARABIC_TUNISIA
+# define SUBLANG_ARABIC_TUNISIA 0x07
+# endif
+# ifndef SUBLANG_ARABIC_OMAN
+# define SUBLANG_ARABIC_OMAN 0x08
+# endif
+# ifndef SUBLANG_ARABIC_YEMEN
+# define SUBLANG_ARABIC_YEMEN 0x09
+# endif
+# ifndef SUBLANG_ARABIC_SYRIA
+# define SUBLANG_ARABIC_SYRIA 0x0a
+# endif
+# ifndef SUBLANG_ARABIC_JORDAN
+# define SUBLANG_ARABIC_JORDAN 0x0b
+# endif
+# ifndef SUBLANG_ARABIC_LEBANON
+# define SUBLANG_ARABIC_LEBANON 0x0c
+# endif
+# ifndef SUBLANG_ARABIC_KUWAIT
+# define SUBLANG_ARABIC_KUWAIT 0x0d
+# endif
+# ifndef SUBLANG_ARABIC_UAE
+# define SUBLANG_ARABIC_UAE 0x0e
+# endif
+# ifndef SUBLANG_ARABIC_BAHRAIN
+# define SUBLANG_ARABIC_BAHRAIN 0x0f
+# endif
+# ifndef SUBLANG_ARABIC_QATAR
+# define SUBLANG_ARABIC_QATAR 0x10
+# endif
+# ifndef SUBLANG_AZERI_LATIN
+# define SUBLANG_AZERI_LATIN 0x01
+# endif
+# ifndef SUBLANG_AZERI_CYRILLIC
+# define SUBLANG_AZERI_CYRILLIC 0x02
+# endif
+# ifndef SUBLANG_CHINESE_MACAU
+# define SUBLANG_CHINESE_MACAU 0x05
+# endif
+# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
+# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
+# endif
+# ifndef SUBLANG_ENGLISH_JAMAICA
+# define SUBLANG_ENGLISH_JAMAICA 0x08
+# endif
+# ifndef SUBLANG_ENGLISH_CARIBBEAN
+# define SUBLANG_ENGLISH_CARIBBEAN 0x09
+# endif
+# ifndef SUBLANG_ENGLISH_BELIZE
+# define SUBLANG_ENGLISH_BELIZE 0x0a
+# endif
+# ifndef SUBLANG_ENGLISH_TRINIDAD
+# define SUBLANG_ENGLISH_TRINIDAD 0x0b
+# endif
+# ifndef SUBLANG_ENGLISH_ZIMBABWE
+# define SUBLANG_ENGLISH_ZIMBABWE 0x0c
+# endif
+# ifndef SUBLANG_ENGLISH_PHILIPPINES
+# define SUBLANG_ENGLISH_PHILIPPINES 0x0d
+# endif
+# ifndef SUBLANG_FRENCH_LUXEMBOURG
+# define SUBLANG_FRENCH_LUXEMBOURG 0x05
+# endif
+# ifndef SUBLANG_FRENCH_MONACO
+# define SUBLANG_FRENCH_MONACO 0x06
+# endif
+# ifndef SUBLANG_GERMAN_LUXEMBOURG
+# define SUBLANG_GERMAN_LUXEMBOURG 0x04
+# endif
+# ifndef SUBLANG_GERMAN_LIECHTENSTEIN
+# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
+# endif
+# ifndef SUBLANG_KASHMIRI_INDIA
+# define SUBLANG_KASHMIRI_INDIA 0x02
+# endif
+# ifndef SUBLANG_MALAY_MALAYSIA
+# define SUBLANG_MALAY_MALAYSIA 0x01
+# endif
+# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
+# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
+# endif
+# ifndef SUBLANG_NEPALI_INDIA
+# define SUBLANG_NEPALI_INDIA 0x02
+# endif
+# ifndef SUBLANG_SERBIAN_LATIN
+# define SUBLANG_SERBIAN_LATIN 0x02
+# endif
+# ifndef SUBLANG_SERBIAN_CYRILLIC
+# define SUBLANG_SERBIAN_CYRILLIC 0x03
+# endif
+# ifndef SUBLANG_SPANISH_GUATEMALA
+# define SUBLANG_SPANISH_GUATEMALA 0x04
+# endif
+# ifndef SUBLANG_SPANISH_COSTA_RICA
+# define SUBLANG_SPANISH_COSTA_RICA 0x05
+# endif
+# ifndef SUBLANG_SPANISH_PANAMA
+# define SUBLANG_SPANISH_PANAMA 0x06
+# endif
+# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
+# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
+# endif
+# ifndef SUBLANG_SPANISH_VENEZUELA
+# define SUBLANG_SPANISH_VENEZUELA 0x08
+# endif
+# ifndef SUBLANG_SPANISH_COLOMBIA
+# define SUBLANG_SPANISH_COLOMBIA 0x09
+# endif
+# ifndef SUBLANG_SPANISH_PERU
+# define SUBLANG_SPANISH_PERU 0x0a
+# endif
+# ifndef SUBLANG_SPANISH_ARGENTINA
+# define SUBLANG_SPANISH_ARGENTINA 0x0b
+# endif
+# ifndef SUBLANG_SPANISH_ECUADOR
+# define SUBLANG_SPANISH_ECUADOR 0x0c
+# endif
+# ifndef SUBLANG_SPANISH_CHILE
+# define SUBLANG_SPANISH_CHILE 0x0d
+# endif
+# ifndef SUBLANG_SPANISH_URUGUAY
+# define SUBLANG_SPANISH_URUGUAY 0x0e
+# endif
+# ifndef SUBLANG_SPANISH_PARAGUAY
+# define SUBLANG_SPANISH_PARAGUAY 0x0f
+# endif
+# ifndef SUBLANG_SPANISH_BOLIVIA
+# define SUBLANG_SPANISH_BOLIVIA 0x10
+# endif
+# ifndef SUBLANG_SPANISH_EL_SALVADOR
+# define SUBLANG_SPANISH_EL_SALVADOR 0x11
+# endif
+# ifndef SUBLANG_SPANISH_HONDURAS
+# define SUBLANG_SPANISH_HONDURAS 0x12
+# endif
+# ifndef SUBLANG_SPANISH_NICARAGUA
+# define SUBLANG_SPANISH_NICARAGUA 0x13
+# endif
+# ifndef SUBLANG_SPANISH_PUERTO_RICO
+# define SUBLANG_SPANISH_PUERTO_RICO 0x14
+# endif
+# ifndef SUBLANG_SWEDISH_FINLAND
+# define SUBLANG_SWEDISH_FINLAND 0x02
+# endif
+# ifndef SUBLANG_URDU_PAKISTAN
+# define SUBLANG_URDU_PAKISTAN 0x01
+# endif
+# ifndef SUBLANG_URDU_INDIA
+# define SUBLANG_URDU_INDIA 0x02
+# endif
+# ifndef SUBLANG_UZBEK_LATIN
+# define SUBLANG_UZBEK_LATIN 0x01
+# endif
+# ifndef SUBLANG_UZBEK_CYRILLIC
+# define SUBLANG_UZBEK_CYRILLIC 0x02
+# endif
+#endif
+
+/* XPG3 defines the result of 'setlocale (category, NULL)' as:
+ "Directs 'setlocale()' to query 'category' and return the current
+ setting of 'local'."
+ However it does not specify the exact format. Neither do SUSV2 and
+ ISO C 99. So we can use this feature only on selected systems (e.g.
+ those using GNU C Library). */
+#if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2)
+# define HAVE_LOCALE_NULL
+#endif
+
+/* Determine the current locale's name, and canonicalize it into XPG syntax
+ language[_territory[.codeset]][@modifier]
+ The codeset part in the result is not reliable; the locale_charset()
+ should be used for codeset information instead.
+ The result must not be freed; it is statically allocated. */
+
+const char *
+_nl_locale_name (category, categoryname)
+ int category;
+ const char *categoryname;
+{
+ const char *retval;
+
+#ifndef WIN32
+
+ /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
+ On some systems this can be done by the 'setlocale' function itself. */
+# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
+ retval = setlocale (category, NULL);
+# else
+ /* Setting of LC_ALL overwrites all other. */
+ retval = getenv ("LC_ALL");
+ if (retval == NULL || retval[0] == '\0')
+ {
+ /* Next comes the name of the desired category. */
+ retval = getenv (categoryname);
+ if (retval == NULL || retval[0] == '\0')
+ {
+ /* Last possibility is the LANG environment variable. */
+ retval = getenv ("LANG");
+ if (retval == NULL || retval[0] == '\0')
+ /* We use C as the default domain. POSIX says this is
+ implementation defined. */
+ retval = "C";
+ }
+ }
+# endif
+
+ return retval;
+
+#else /* WIN32 */
+
+ /* Return an XPG style locale name language[_territory][@modifier].
+ Don't even bother determining the codeset; it's not useful in this
+ context, because message catalogs are not specific to a single
+ codeset. */
+
+ LCID lcid;
+ LANGID langid;
+ int primary, sub;
+
+ /* Let the user override the system settings through environment
+ variables, as on POSIX systems. */
+ retval = getenv ("LC_ALL");
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+ retval = getenv (categoryname);
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+ retval = getenv ("LANG");
+ if (retval != NULL && retval[0] != '\0')
+ return retval;
+
+ /* Use native Win32 API locale ID. */
+ lcid = GetThreadLocale ();
+
+ /* Strip off the sorting rules, keep only the language part. */
+ langid = LANGIDFROMLCID (lcid);
+
+ /* Split into language and territory part. */
+ primary = PRIMARYLANGID (langid);
+ sub = SUBLANGID (langid);
+
+ /* Dispatch on language.
+ See also http://www.unicode.org/unicode/onlinedat/languages.html .
+ For details about languages, see http://www.ethnologue.com/ . */
+ switch (primary)
+ {
+ case LANG_AFRIKAANS: return "af_ZA";
+ case LANG_ALBANIAN: return "sq_AL";
+ case 0x5e: /* AMHARIC */ return "am_ET";
+ case LANG_ARABIC:
+ switch (sub)
+ {
+ case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA";
+ case SUBLANG_ARABIC_IRAQ: return "ar_IQ";
+ case SUBLANG_ARABIC_EGYPT: return "ar_EG";
+ case SUBLANG_ARABIC_LIBYA: return "ar_LY";
+ case SUBLANG_ARABIC_ALGERIA: return "ar_DZ";
+ case SUBLANG_ARABIC_MOROCCO: return "ar_MA";
+ case SUBLANG_ARABIC_TUNISIA: return "ar_TN";
+ case SUBLANG_ARABIC_OMAN: return "ar_OM";
+ case SUBLANG_ARABIC_YEMEN: return "ar_YE";
+ case SUBLANG_ARABIC_SYRIA: return "ar_SY";
+ case SUBLANG_ARABIC_JORDAN: return "ar_JO";
+ case SUBLANG_ARABIC_LEBANON: return "ar_LB";
+ case SUBLANG_ARABIC_KUWAIT: return "ar_KW";
+ case SUBLANG_ARABIC_UAE: return "ar_AE";
+ case SUBLANG_ARABIC_BAHRAIN: return "ar_BH";
+ case SUBLANG_ARABIC_QATAR: return "ar_QA";
+ }
+ return "ar";
+ case LANG_ARMENIAN: return "hy_AM";
+ case LANG_ASSAMESE: return "as_IN";
+ case LANG_AZERI:
+ switch (sub)
+ {
+ /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */
+ case SUBLANG_AZERI_LATIN: return "az_AZ@latin";
+ case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic";
+ }
+ return "az";
+ case LANG_BASQUE:
+ return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */
+ case LANG_BELARUSIAN: return "be_BY";
+ case LANG_BENGALI: return "bn_IN";
+ case LANG_BULGARIAN: return "bg_BG";
+ case 0x55: /* BURMESE */ return "my_MM";
+ case 0x53: /* CAMBODIAN */ return "km_KH";
+ case LANG_CATALAN: return "ca_ES";
+ case 0x5c: /* CHEROKEE */ return "chr_US";
+ case LANG_CHINESE:
+ switch (sub)
+ {
+ case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW";
+ case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN";
+ case SUBLANG_CHINESE_HONGKONG: return "zh_HK";
+ case SUBLANG_CHINESE_SINGAPORE: return "zh_SG";
+ case SUBLANG_CHINESE_MACAU: return "zh_MO";
+ }
+ return "zh";
+ case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN
+ * What used to be called Serbo-Croatian
+ * should really now be two separate
+ * languages because of political reasons.
+ * (Says tml, who knows nothing about Serbian
+ * or Croatian.)
+ * (I can feel those flames coming already.)
+ */
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "hr_HR";
+ case SUBLANG_SERBIAN_LATIN: return "sr_YU";
+ case SUBLANG_SERBIAN_CYRILLIC: return "sr_YU@cyrillic";
+ }
+ return "hr";
+ case LANG_CZECH: return "cs_CZ";
+ case LANG_DANISH: return "da_DK";
+ case LANG_DIVEHI: return "div_MV";
+ case LANG_DUTCH:
+ switch (sub)
+ {
+ case SUBLANG_DUTCH: return "nl_NL";
+ case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE";
+ }
+ return "nl";
+ case 0x66: /* EDO */ return "bin_NG";
+ case LANG_ENGLISH:
+ switch (sub)
+ {
+ /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought
+ * English was the language spoken in England.
+ * Oh well.
+ */
+ case SUBLANG_ENGLISH_US: return "en_US";
+ case SUBLANG_ENGLISH_UK: return "en_GB";
+ case SUBLANG_ENGLISH_AUS: return "en_AU";
+ case SUBLANG_ENGLISH_CAN: return "en_CA";
+ case SUBLANG_ENGLISH_NZ: return "en_NZ";
+ case SUBLANG_ENGLISH_EIRE: return "en_IE";
+ case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA";
+ case SUBLANG_ENGLISH_JAMAICA: return "en_JM";
+ case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */
+ case SUBLANG_ENGLISH_BELIZE: return "en_BZ";
+ case SUBLANG_ENGLISH_TRINIDAD: return "en_TT";
+ case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW";
+ case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH";
+ }
+ return "en";
+ case LANG_ESTONIAN: return "et_EE";
+ case LANG_FAEROESE: return "fo_FO";
+ case LANG_FARSI: return "fa_IR";
+ case LANG_FINNISH: return "fi_FI";
+ case LANG_FRENCH:
+ switch (sub)
+ {
+ case SUBLANG_FRENCH: return "fr_FR";
+ case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE";
+ case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
+ case SUBLANG_FRENCH_SWISS: return "fr_CH";
+ case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU";
+ case SUBLANG_FRENCH_MONACO: return "fr_MC";
+ }
+ return "fr";
+ case 0x62: /* FRISIAN */ return "fy_NL";
+ case 0x67: /* FULFULDE */ return "ful_NG";
+ case 0x3c: /* GAELIC */
+ switch (sub)
+ {
+ case 0x01: /* SCOTTISH */ return "gd_GB";
+ case 0x02: /* IRISH */ return "ga_IE";
+ }
+ return "C";
+ case LANG_GALICIAN: return "gl_ES";
+ case LANG_GEORGIAN: return "ka_GE";
+ case LANG_GERMAN:
+ switch (sub)
+ {
+ case SUBLANG_GERMAN: return "de_DE";
+ case SUBLANG_GERMAN_SWISS: return "de_CH";
+ case SUBLANG_GERMAN_AUSTRIAN: return "de_AT";
+ case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU";
+ case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI";
+ }
+ return "de";
+ case LANG_GREEK: return "el_GR";
+ case 0x74: /* GUARANI */ return "gn_PY";
+ case LANG_GUJARATI: return "gu_IN";
+ case 0x68: /* HAUSA */ return "ha_NG";
+ case 0x75: /* HAWAIIAN */
+ /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
+ or Hawaii Creole English ("cpe_US", 600000 speakers)? */
+ return "cpe_US";
+ case LANG_HEBREW: return "he_IL";
+ case LANG_HINDI: return "hi_IN";
+ case LANG_HUNGARIAN: return "hu_HU";
+ case 0x69: /* IBIBIO */ return "nic_NG";
+ case LANG_ICELANDIC: return "is_IS";
+ case 0x70: /* IGBO */ return "ibo_NG";
+ case LANG_INDONESIAN: return "id_ID";
+ case 0x5d: /* INUKTITUT */ return "iu_CA";
+ case LANG_ITALIAN:
+ switch (sub)
+ {
+ case SUBLANG_ITALIAN: return "it_IT";
+ case SUBLANG_ITALIAN_SWISS: return "it_CH";
+ }
+ return "it";
+ case LANG_JAPANESE: return "ja_JP";
+ case LANG_KANNADA: return "kn_IN";
+ case 0x71: /* KANURI */ return "kau_NG";
+ case LANG_KASHMIRI:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "ks_PK";
+ case SUBLANG_KASHMIRI_INDIA: return "ks_IN";
+ }
+ return "ks";
+ case LANG_KAZAK: return "kk_KZ";
+ case LANG_KONKANI:
+ /* FIXME: Adjust this when such locales appear on Unix. */
+ return "kok_IN";
+ case LANG_KOREAN: return "ko_KR";
+ case LANG_KYRGYZ: return "ky_KG";
+ case 0x54: /* LAO */ return "lo_LA";
+ case 0x76: /* LATIN */ return "la_VA";
+ case LANG_LATVIAN: return "lv_LV";
+ case LANG_LITHUANIAN: return "lt_LT";
+ case LANG_MACEDONIAN: return "mk_MK";
+ case LANG_MALAY:
+ switch (sub)
+ {
+ case SUBLANG_MALAY_MALAYSIA: return "ms_MY";
+ case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN";
+ }
+ return "ms";
+ case LANG_MALAYALAM: return "ml_IN";
+ case 0x3a: /* MALTESE */ return "mt_MT";
+ case LANG_MANIPURI:
+ /* FIXME: Adjust this when such locales appear on Unix. */
+ return "mni_IN";
+ case LANG_MARATHI: return "mr_IN";
+ case LANG_MONGOLIAN:
+ return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */
+ case LANG_NEPALI:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "ne_NP";
+ case SUBLANG_NEPALI_INDIA: return "ne_IN";
+ }
+ return "ne";
+ case LANG_NORWEGIAN:
+ switch (sub)
+ {
+ case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO";
+ case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
+ }
+ return "no";
+ case LANG_ORIYA: return "or_IN";
+ case 0x72: /* OROMO */ return "om_ET";
+ case 0x79: /* PAPIAMENTU */ return "pap_AN";
+ case 0x63: /* PASHTO */
+ return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */
+ case LANG_POLISH: return "pl_PL";
+ case LANG_PORTUGUESE:
+ switch (sub)
+ {
+ case SUBLANG_PORTUGUESE: return "pt_PT";
+ /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
+ Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
+ case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR";
+ }
+ return "pt";
+ case LANG_PUNJABI: return "pa_IN";
+ case 0x17: /* RHAETO-ROMANCE */ return "rm_CH";
+ case LANG_ROMANIAN: return "ro_RO";
+ case LANG_RUSSIAN:
+ return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA". */
+ case 0x3b: /* SAMI */ return "se_NO";
+ case LANG_SANSKRIT: return "sa_IN";
+ case LANG_SINDHI: return "sd";
+ case 0x5b: /* SINHALESE */ return "si_LK";
+ case LANG_SLOVAK: return "sk_SK";
+ case LANG_SLOVENIAN: return "sl_SI";
+ case 0x77: /* SOMALI */ return "so_SO";
+ case LANG_SORBIAN:
+ /* FIXME: Adjust this when such locales appear on Unix. */
+ return "wen_DE";
+ case LANG_SPANISH:
+ switch (sub)
+ {
+ case SUBLANG_SPANISH: return "es_ES";
+ case SUBLANG_SPANISH_MEXICAN: return "es_MX";
+ case SUBLANG_SPANISH_MODERN:
+ return "es_ES@modern"; /* not seen on Unix */
+ case SUBLANG_SPANISH_GUATEMALA: return "es_GT";
+ case SUBLANG_SPANISH_COSTA_RICA: return "es_CR";
+ case SUBLANG_SPANISH_PANAMA: return "es_PA";
+ case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO";
+ case SUBLANG_SPANISH_VENEZUELA: return "es_VE";
+ case SUBLANG_SPANISH_COLOMBIA: return "es_CO";
+ case SUBLANG_SPANISH_PERU: return "es_PE";
+ case SUBLANG_SPANISH_ARGENTINA: return "es_AR";
+ case SUBLANG_SPANISH_ECUADOR: return "es_EC";
+ case SUBLANG_SPANISH_CHILE: return "es_CL";
+ case SUBLANG_SPANISH_URUGUAY: return "es_UY";
+ case SUBLANG_SPANISH_PARAGUAY: return "es_PY";
+ case SUBLANG_SPANISH_BOLIVIA: return "es_BO";
+ case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV";
+ case SUBLANG_SPANISH_HONDURAS: return "es_HN";
+ case SUBLANG_SPANISH_NICARAGUA: return "es_NI";
+ case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR";
+ }
+ return "es";
+ case 0x30: /* SUTU */ return "bnt_TZ";
+ case LANG_SWAHILI: return "sw_KE";
+ case LANG_SWEDISH:
+ switch (sub)
+ {
+ case SUBLANG_DEFAULT: return "sv_SE";
+ case SUBLANG_SWEDISH_FINLAND: return "sv_FI";
+ }
+ return "sv";
+ case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */
+ case 0x64: /* TAGALOG */ return "tl_PH";
+ case 0x28: /* TAJIK */ return "tg_TJ";
+ case 0x5f: /* TAMAZIGHT */ return "ber_MA";
+ case LANG_TAMIL:
+ return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */
+ case LANG_TATAR: return "tt_RU";
+ case LANG_TELUGU: return "te_IN";
+ case LANG_THAI: return "th_TH";
+ case 0x51: /* TIBETAN */ return "bo_CN";
+ case 0x73: /* TIGRINYA */ return "ti_ET";
+ case 0x31: /* TSONGA */ return "ts_ZA";
+ case LANG_TURKISH: return "tr_TR";
+ case 0x42: /* TURKMEN */ return "tk_TM";
+ case LANG_UKRAINIAN: return "uk_UA";
+ case LANG_URDU:
+ switch (sub)
+ {
+ case SUBLANG_URDU_PAKISTAN: return "ur_PK";
+ case SUBLANG_URDU_INDIA: return "ur_IN";
+ }
+ return "ur";
+ case LANG_UZBEK:
+ switch (sub)
+ {
+ /* FIXME: Adjust this when Uzbek locales appear on Unix. */
+ case SUBLANG_UZBEK_LATIN: return "uz_UZ@latin";
+ case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic";
+ }
+ return "uz";
+ case 0x33: /* VENDA */ return "ven_ZA";
+ case LANG_VIETNAMESE: return "vi_VN";
+ case 0x52: /* WELSH */ return "cy_GB";
+ case 0x34: /* XHOSA */ return "xh_ZA";
+ case 0x78: /* YI */ return "sit_CN";
+ case 0x3d: /* YIDDISH */ return "yi_IL";
+ case 0x6a: /* YORUBA */ return "yo_NG";
+ case 0x35: /* ZULU */ return "zu_ZA";
+ default: return "C";
+ }
+
+#endif
+}
diff --git a/lib/intl/log.c b/lib/intl/log.c
new file mode 100644
index 0000000..e527e87
--- /dev/null
+++ b/lib/intl/log.c
@@ -0,0 +1,106 @@
+/* log.c - Log file output. */
+
+/* Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Written by Bruno Haible <bruno@clisp.org>. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* Print an ASCII string with quotes and escape sequences where needed. */
+static void
+print_escaped (stream, str)
+ FILE *stream;
+ const char *str;
+{
+ putc ('"', stream);
+ for (; *str != '\0'; str++)
+ if (*str == '\n')
+ {
+ fputs ("\\n\"", stream);
+ if (str[1] == '\0')
+ return;
+ fputs ("\n\"", stream);
+ }
+ else
+ {
+ if (*str == '"' || *str == '\\')
+ putc ('\\', stream);
+ putc (*str, stream);
+ }
+ putc ('"', stream);
+}
+
+/* Add to the log file an entry denoting a failed translation. */
+void
+_nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural)
+ const char *logfilename;
+ const char *domainname;
+ const char *msgid1;
+ const char *msgid2;
+ int plural;
+{
+ static char *last_logfilename = NULL;
+ static FILE *last_logfile = NULL;
+ FILE *logfile;
+
+ /* Can we reuse the last opened logfile? */
+ if (last_logfilename == NULL || strcmp (logfilename, last_logfilename) != 0)
+ {
+ /* Close the last used logfile. */
+ if (last_logfilename != NULL)
+ {
+ if (last_logfile != NULL)
+ {
+ fclose (last_logfile);
+ last_logfile = NULL;
+ }
+ free (last_logfilename);
+ last_logfilename = NULL;
+ }
+ /* Open the logfile. */
+ last_logfilename = (char *) malloc (strlen (logfilename) + 1);
+ if (last_logfilename == NULL)
+ return;
+ strcpy (last_logfilename, logfilename);
+ last_logfile = fopen (logfilename, "a");
+ if (last_logfile == NULL)
+ return;
+ }
+ logfile = last_logfile;
+
+ fprintf (logfile, "domain ");
+ print_escaped (logfile, domainname);
+ fprintf (logfile, "\nmsgid ");
+ print_escaped (logfile, msgid1);
+ if (plural)
+ {
+ fprintf (logfile, "\nmsgid_plural ");
+ print_escaped (logfile, msgid2);
+ fprintf (logfile, "\nmsgstr[0] \"\"\n");
+ }
+ else
+ fprintf (logfile, "\nmsgstr \"\"\n");
+ putc ('\n', logfile);
+}
diff --git a/lib/intl/ngettext.c b/lib/intl/ngettext.c
new file mode 100644
index 0000000..95aafcc
--- /dev/null
+++ b/lib/intl/ngettext.c
@@ -0,0 +1,70 @@
+/* ngettext.c - Implementation of ngettext(3) function. */
+
+/* Copyright (C) 1995, 1997, 2000, 2001, 2002, 2005-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef _LIBC
+# define __need_NULL
+# include <stddef.h>
+#else
+# include <stdlib.h> /* Just for NULL. */
+#endif
+
+#include "gettextP.h"
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+
+#include <locale.h>
+
+/* @@ end of prolog @@ */
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define NGETTEXT __ngettext
+# define DCNGETTEXT __dcngettext
+#else
+# define NGETTEXT libintl_ngettext
+# define DCNGETTEXT libintl_dcngettext
+#endif
+
+/* Look up MSGID in the current default message catalog for the current
+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
+ text). */
+char *
+NGETTEXT (msgid1, msgid2, n)
+ const char *msgid1;
+ const char *msgid2;
+ unsigned long int n;
+{
+ return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__ngettext, ngettext);
+#endif
diff --git a/lib/intl/os2compat.c b/lib/intl/os2compat.c
new file mode 100644
index 0000000..1aa9dff
--- /dev/null
+++ b/lib/intl/os2compat.c
@@ -0,0 +1,100 @@
+/* os2compat.c - OS/2 compatibility functions. */
+
+/* Copyright (C) 2001-2002, 2005-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define OS2_AWARE
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+#include <sys/param.h>
+
+/* A version of getenv() that works from DLLs */
+extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue);
+
+char *
+_nl_getenv (const char *name)
+{
+ unsigned char *value;
+ if (DosScanEnv (name, &value))
+ return NULL;
+ else
+ return value;
+}
+
+/* A fixed size buffer. */
+char libintl_nl_default_dirname[MAXPATHLEN+1];
+
+char *_nlos2_libdir = NULL;
+char *_nlos2_localealiaspath = NULL;
+char *_nlos2_localedir = NULL;
+
+static __attribute__((constructor)) void
+nlos2_initialize ()
+{
+ char *root = getenv ("UNIXROOT");
+ char *gnulocaledir = getenv ("GNULOCALEDIR");
+
+ _nlos2_libdir = gnulocaledir;
+ if (!_nlos2_libdir)
+ {
+ if (root)
+ {
+ size_t sl = strlen (root);
+ _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1);
+ memcpy (_nlos2_libdir, root, sl);
+ memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1);
+ }
+ else
+ _nlos2_libdir = LIBDIR;
+ }
+
+ _nlos2_localealiaspath = gnulocaledir;
+ if (!_nlos2_localealiaspath)
+ {
+ if (root)
+ {
+ size_t sl = strlen (root);
+ _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1);
+ memcpy (_nlos2_localealiaspath, root, sl);
+ memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1);
+ }
+ else
+ _nlos2_localealiaspath = LOCALE_ALIAS_PATH;
+ }
+
+ _nlos2_localedir = gnulocaledir;
+ if (!_nlos2_localedir)
+ {
+ if (root)
+ {
+ size_t sl = strlen (root);
+ _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1);
+ memcpy (_nlos2_localedir, root, sl);
+ memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1);
+ }
+ else
+ _nlos2_localedir = LOCALEDIR;
+ }
+
+ if (strlen (_nlos2_localedir) <= MAXPATHLEN)
+ strcpy (libintl_nl_default_dirname, _nlos2_localedir);
+}
diff --git a/lib/intl/os2compat.h b/lib/intl/os2compat.h
new file mode 100644
index 0000000..8de3183
--- /dev/null
+++ b/lib/intl/os2compat.h
@@ -0,0 +1,48 @@
+/* os2compat.h - OS/2 compatibility defines. */
+
+/* This file is intended to be included from config.h
+ Copyright (C) 2001-2002, 2005-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* When included from os2compat.h we need all the original definitions */
+#ifndef OS2_AWARE
+
+#undef LIBDIR
+#define LIBDIR _nlos2_libdir
+extern char *_nlos2_libdir;
+
+#undef LOCALEDIR
+#define LOCALEDIR _nlos2_localedir
+extern char *_nlos2_localedir;
+
+#undef LOCALE_ALIAS_PATH
+#define LOCALE_ALIAS_PATH _nlos2_localealiaspath
+extern char *_nlos2_localealiaspath;
+
+#endif
+
+#undef HAVE_STRCASECMP
+#define HAVE_STRCASECMP 1
+#define strcasecmp stricmp
+#define strncasecmp strnicmp
+
+/* We have our own getenv() which works even if library is compiled as DLL */
+#define getenv _nl_getenv
+
+/* Older versions of gettext used -1 as the value of LC_MESSAGES */
+#define LC_MESSAGES_COMPAT (-1)
diff --git a/lib/intl/osdep.c b/lib/intl/osdep.c
new file mode 100644
index 0000000..b030022
--- /dev/null
+++ b/lib/intl/osdep.c
@@ -0,0 +1,26 @@
+/* osdep.c - OS dependent parts of libintl. */
+
+/* Copyright (C) 2001-2002, 2005-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined __EMX__
+# include "os2compat.c"
+#else
+/* Avoid AIX compiler warning. */
+typedef int dummy;
+#endif
diff --git a/lib/intl/plural-exp.c b/lib/intl/plural-exp.c
new file mode 100644
index 0000000..9ed3b16
--- /dev/null
+++ b/lib/intl/plural-exp.c
@@ -0,0 +1,158 @@
+/* plural-exp.c - Expression parsing for plural form selection. */
+
+/* Copyright (C) 2000, 2001, 2005-2009 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "plural-exp.h"
+
+#if (defined __GNUC__ && !defined __APPLE_CC__) \
+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
+
+/* These structs are the constant expression for the germanic plural
+ form determination. It represents the expression "n != 1". */
+static const struct expression plvar =
+{
+ .nargs = 0,
+ .operation = var,
+};
+static const struct expression plone =
+{
+ .nargs = 0,
+ .operation = num,
+ .val =
+ {
+ .num = 1
+ }
+};
+struct expression GERMANIC_PLURAL =
+{
+ .nargs = 2,
+ .operation = not_equal,
+ .val =
+ {
+ .args =
+ {
+ [0] = (struct expression *) &plvar,
+ [1] = (struct expression *) &plone
+ }
+ }
+};
+
+# define INIT_GERMANIC_PLURAL()
+
+#else
+
+/* For compilers without support for ISO C 99 struct/union initializers:
+ Initialization at run-time. */
+
+static struct expression plvar;
+static struct expression plone;
+struct expression GERMANIC_PLURAL;
+
+static void
+init_germanic_plural ()
+{
+ if (plone.val.num == 0)
+ {
+ plvar.nargs = 0;
+ plvar.operation = var;
+
+ plone.nargs = 0;
+ plone.operation = num;
+ plone.val.num = 1;
+
+ GERMANIC_PLURAL.nargs = 2;
+ GERMANIC_PLURAL.operation = not_equal;
+ GERMANIC_PLURAL.val.args[0] = &plvar;
+ GERMANIC_PLURAL.val.args[1] = &plone;
+ }
+}
+
+# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
+
+#endif
+
+void
+internal_function
+EXTRACT_PLURAL_EXPRESSION (nullentry, pluralp, npluralsp)
+ const char *nullentry;
+ struct expression **pluralp;
+ unsigned long int *npluralsp;
+{
+ if (nullentry != NULL)
+ {
+ const char *plural;
+ const char *nplurals;
+
+ plural = strstr (nullentry, "plural=");
+ nplurals = strstr (nullentry, "nplurals=");
+ if (plural == NULL || nplurals == NULL)
+ goto no_plural;
+ else
+ {
+ char *endp;
+ unsigned long int n;
+ struct parse_args args;
+
+ /* First get the number. */
+ nplurals += 9;
+ while (*nplurals != '\0' && isspace ((unsigned char) *nplurals))
+ ++nplurals;
+ if (!(*nplurals >= '0' && *nplurals <= '9'))
+ goto no_plural;
+#if defined HAVE_STRTOUL || defined _LIBC
+ n = strtoul (nplurals, &endp, 10);
+#else
+ for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
+ n = n * 10 + (*endp - '0');
+#endif
+ if (nplurals == endp)
+ goto no_plural;
+ *npluralsp = n;
+
+ /* Due to the restrictions bison imposes onto the interface of the
+ scanner function we have to put the input string and the result
+ passed up from the parser into the same structure which address
+ is passed down to the parser. */
+ plural += 7;
+ args.cp = plural;
+ if (PLURAL_PARSE (&args) != 0)
+ goto no_plural;
+ *pluralp = args.res;
+ }
+ }
+ else
+ {
+ /* By default we are using the Germanic form: singular form only
+ for `one', the plural form otherwise. Yes, this is also what
+ English is using since English is a Germanic language. */
+ no_plural:
+ INIT_GERMANIC_PLURAL ();
+ *pluralp = &GERMANIC_PLURAL;
+ *npluralsp = 2;
+ }
+}
diff --git a/lib/intl/plural-exp.h b/lib/intl/plural-exp.h
new file mode 100644
index 0000000..dcb0dae
--- /dev/null
+++ b/lib/intl/plural-exp.h
@@ -0,0 +1,128 @@
+/* plural-exp.h - defines for expression parsing and evaluation for plural form selection. */
+
+/* Copyright (C) 2000, 2001, 2002, 2005-2009 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _PLURAL_EXP_H
+#define _PLURAL_EXP_H
+
+#ifndef PARAMS
+# if __STDC__ || defined __GNUC__ || defined __SUNPRO_C || defined __cplusplus || __PROTOTYPES
+# define PARAMS(args) args
+# else
+# define PARAMS(args) ()
+# endif
+#endif
+
+#ifndef internal_function
+# define internal_function
+#endif
+
+#ifndef attribute_hidden
+# define attribute_hidden
+#endif
+
+
+/* This is the representation of the expressions to determine the
+ plural form. */
+struct expression
+{
+ int nargs; /* Number of arguments. */
+ enum operator
+ {
+ /* Without arguments: */
+ var, /* The variable "n". */
+ num, /* Decimal number. */
+ /* Unary operators: */
+ lnot, /* Logical NOT. */
+ /* Binary operators: */
+ mult, /* Multiplication. */
+ divide, /* Division. */
+ module, /* Modulo operation. */
+ plus, /* Addition. */
+ minus, /* Subtraction. */
+ less_than, /* Comparison. */
+ greater_than, /* Comparison. */
+ less_or_equal, /* Comparison. */
+ greater_or_equal, /* Comparison. */
+ equal, /* Comparison for equality. */
+ not_equal, /* Comparison for inequality. */
+ land, /* Logical AND. */
+ lor, /* Logical OR. */
+ /* Ternary operators: */
+ qmop /* Question mark operator. */
+ } operation;
+ union
+ {
+ unsigned long int num; /* Number value for `num'. */
+ struct expression *args[3]; /* Up to three arguments. */
+ } val;
+};
+
+/* This is the data structure to pass information to the parser and get
+ the result in a thread-safe way. */
+struct parse_args
+{
+ const char *cp;
+ struct expression *res;
+};
+
+
+/* Names for the libintl functions are a problem. This source code is used
+ 1. in the GNU C Library library,
+ 2. in the GNU libintl library,
+ 3. in the GNU gettext tools.
+ The function names in each situation must be different, to allow for
+ binary incompatible changes in 'struct expression'. Furthermore,
+ 1. in the GNU C Library library, the names have a __ prefix,
+ 2.+3. in the GNU libintl library and in the GNU gettext tools, the names
+ must follow ANSI C and not start with __.
+ So we have to distinguish the three cases. */
+#ifdef _LIBC
+# define FREE_EXPRESSION __gettext_free_exp
+# define PLURAL_PARSE __gettextparse
+# define GERMANIC_PLURAL __gettext_germanic_plural
+# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural
+#elif defined (IN_LIBINTL)
+# define FREE_EXPRESSION libintl_gettext_free_exp
+# define PLURAL_PARSE libintl_gettextparse
+# define GERMANIC_PLURAL libintl_gettext_germanic_plural
+# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural
+#else
+# define FREE_EXPRESSION free_plural_expression
+# define PLURAL_PARSE parse_plural_expression
+# define GERMANIC_PLURAL germanic_plural
+# define EXTRACT_PLURAL_EXPRESSION extract_plural_expression
+#endif
+
+extern void FREE_EXPRESSION PARAMS ((struct expression *exp))
+ internal_function;
+extern int PLURAL_PARSE PARAMS ((void *arg));
+extern struct expression GERMANIC_PLURAL attribute_hidden;
+extern void EXTRACT_PLURAL_EXPRESSION PARAMS ((const char *nullentry,
+ struct expression **pluralp,
+ unsigned long int *npluralsp))
+ internal_function;
+
+#if !defined (_LIBC) && !defined (IN_LIBINTL)
+extern unsigned long int plural_eval PARAMS ((struct expression *pexp,
+ unsigned long int n));
+#endif
+
+#endif /* _PLURAL_EXP_H */
diff --git a/lib/intl/plural.c b/lib/intl/plural.c
new file mode 100644
index 0000000..a003151
--- /dev/null
+++ b/lib/intl/plural.c
@@ -0,0 +1,1679 @@
+/* A Bison parser, made by GNU Bison 2.0. */
+
+/* Skeleton parser for Yacc-like parsing with Bison,
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* As a special exception, when this file is copied by Bison into a
+ Bison output file, you may use that output file without restriction.
+ This special exception was added by the Free Software Foundation
+ in version 1.24 of Bison. */
+
+/* Written by Richard Stallman by simplifying the original so called
+ ``semantic'' parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 1
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+/* Substitute the variable and function names. */
+#define yyparse __gettextparse
+#define yylex __gettextlex
+#define yyerror __gettexterror
+#define yylval __gettextlval
+#define yychar __gettextchar
+#define yydebug __gettextdebug
+#define yynerrs __gettextnerrs
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ EQUOP2 = 258,
+ CMPOP2 = 259,
+ ADDOP2 = 260,
+ MULOP2 = 261,
+ NUMBER = 262
+ };
+#endif
+#define EQUOP2 258
+#define CMPOP2 259
+#define ADDOP2 260
+#define MULOP2 261
+#define NUMBER 262
+
+
+
+
+/* Copy the first part of user declarations. */
+#line 1 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"
+
+/* plural.y - Expression parsing for plural form selection. */
+
+/* Copyright (C) 2000, 2001, 2005-2009 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* The bison generated parser uses alloca. AIX 3 forces us to put this
+ declaration at the beginning of the file. The declaration in bison's
+ skeleton file comes too late. This must come before <config.h>
+ because <config.h> may include arbitrary system headers. */
+#if defined _AIX && !defined __GNUC__
+ #pragma alloca
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include "plural-exp.h"
+
+/* The main function generated by the parser is called __gettextparse,
+ but we want it to be called PLURAL_PARSE. */
+#ifndef _LIBC
+# define __gettextparse PLURAL_PARSE
+#endif
+
+#define YYLEX_PARAM &((struct parse_args *) arg)->cp
+#define YYPARSE_PARAM arg
+
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+#if ! defined (YYSTYPE) && ! defined (YYSTYPE_IS_DECLARED)
+#line 51 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"
+typedef union YYSTYPE {
+ unsigned long int num;
+ enum operator op;
+ struct expression *exp;
+} YYSTYPE;
+/* Line 190 of yacc.c. */
+#line 152 "/usr/src/local/bash/bash-20080814/lib/intl/plural.c"
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations. */
+#line 57 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"
+
+/* Prototypes for local functions. */
+static struct expression *new_exp PARAMS ((int nargs, enum operator op,
+ struct expression * const *args));
+static inline struct expression *new_exp_0 PARAMS ((enum operator op));
+static inline struct expression *new_exp_1 PARAMS ((enum operator op,
+ struct expression *right));
+static struct expression *new_exp_2 PARAMS ((enum operator op,
+ struct expression *left,
+ struct expression *right));
+static inline struct expression *new_exp_3 PARAMS ((enum operator op,
+ struct expression *bexp,
+ struct expression *tbranch,
+ struct expression *fbranch));
+static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
+static void yyerror PARAMS ((const char *str));
+
+/* Allocation of expressions. */
+
+static struct expression *
+new_exp (nargs, op, args)
+ int nargs;
+ enum operator op;
+ struct expression * const *args;
+{
+ int i;
+ struct expression *newp;
+
+ /* If any of the argument could not be malloc'ed, just return NULL. */
+ for (i = nargs - 1; i >= 0; i--)
+ if (args[i] == NULL)
+ goto fail;
+
+ /* Allocate a new expression. */
+ newp = (struct expression *) malloc (sizeof (*newp));
+ if (newp != NULL)
+ {
+ newp->nargs = nargs;
+ newp->operation = op;
+ for (i = nargs - 1; i >= 0; i--)
+ newp->val.args[i] = args[i];
+ return newp;
+ }
+
+ fail:
+ for (i = nargs - 1; i >= 0; i--)
+ FREE_EXPRESSION (args[i]);
+
+ return NULL;
+}
+
+static inline struct expression *
+new_exp_0 (op)
+ enum operator op;
+{
+ return new_exp (0, op, NULL);
+}
+
+static inline struct expression *
+new_exp_1 (op, right)
+ enum operator op;
+ struct expression *right;
+{
+ struct expression *args[1];
+
+ args[0] = right;
+ return new_exp (1, op, args);
+}
+
+static struct expression *
+new_exp_2 (op, left, right)
+ enum operator op;
+ struct expression *left;
+ struct expression *right;
+{
+ struct expression *args[2];
+
+ args[0] = left;
+ args[1] = right;
+ return new_exp (2, op, args);
+}
+
+static inline struct expression *
+new_exp_3 (op, bexp, tbranch, fbranch)
+ enum operator op;
+ struct expression *bexp;
+ struct expression *tbranch;
+ struct expression *fbranch;
+{
+ struct expression *args[3];
+
+ args[0] = bexp;
+ args[1] = tbranch;
+ args[2] = fbranch;
+ return new_exp (3, op, args);
+}
+
+
+
+/* Line 213 of yacc.c. */
+#line 262 "/usr/src/local/bash/bash-20080814/lib/intl/plural.c"
+
+#if ! defined (yyoverflow) || YYERROR_VERBOSE
+
+# ifndef YYFREE
+# define YYFREE free
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# endif
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# else
+# define YYSTACK_ALLOC alloca
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
+# else
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# endif
+#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
+
+
+#if (! defined (yyoverflow) \
+ && (! defined (__cplusplus) \
+ || (defined (YYSTYPE_IS_TRIVIAL) && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ short int yyss;
+ YYSTYPE yyvs;
+ };
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (short int) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined (__GNUC__) && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ register YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (0)
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (0)
+
+#endif
+
+#if defined (__STDC__) || defined (__cplusplus)
+ typedef signed char yysigned_char;
+#else
+ typedef short int yysigned_char;
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 9
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 54
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 16
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 3
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 13
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 27
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 262
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const unsigned char yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 10, 2, 2, 2, 2, 5, 2,
+ 14, 15, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 12, 2,
+ 2, 2, 2, 3, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 13, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 4, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 6, 7,
+ 8, 9, 11
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const unsigned char yyprhs[] =
+{
+ 0, 0, 3, 5, 11, 15, 19, 23, 27, 31,
+ 35, 38, 40, 42
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yysigned_char yyrhs[] =
+{
+ 17, 0, -1, 18, -1, 18, 3, 18, 12, 18,
+ -1, 18, 4, 18, -1, 18, 5, 18, -1, 18,
+ 6, 18, -1, 18, 7, 18, -1, 18, 8, 18,
+ -1, 18, 9, 18, -1, 10, 18, -1, 13, -1,
+ 11, -1, 14, 18, 15, -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const unsigned char yyrline[] =
+{
+ 0, 176, 176, 184, 188, 192, 196, 200, 204, 208,
+ 212, 216, 220, 225
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE
+/* YYTNME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2",
+ "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'",
+ "$accept", "start", "exp", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const unsigned short int yytoknum[] =
+{
+ 0, 256, 257, 63, 124, 38, 258, 259, 260, 261,
+ 33, 262, 58, 110, 40, 41
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const unsigned char yyr1[] =
+{
+ 0, 16, 17, 18, 18, 18, 18, 18, 18, 18,
+ 18, 18, 18, 18
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const unsigned char yyr2[] =
+{
+ 0, 2, 1, 5, 3, 3, 3, 3, 3, 3,
+ 2, 1, 1, 3
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const unsigned char yydefact[] =
+{
+ 0, 0, 12, 11, 0, 0, 2, 10, 0, 1,
+ 0, 0, 0, 0, 0, 0, 0, 13, 0, 4,
+ 5, 6, 7, 8, 9, 0, 3
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yysigned_char yydefgoto[] =
+{
+ -1, 5, 6
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -10
+static const yysigned_char yypact[] =
+{
+ -9, -9, -10, -10, -9, 8, 36, -10, 13, -10,
+ -9, -9, -9, -9, -9, -9, -9, -10, 26, 41,
+ 45, 18, -2, 14, -10, -9, 36
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const yysigned_char yypgoto[] =
+{
+ -10, -10, -1
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -1
+static const unsigned char yytable[] =
+{
+ 7, 1, 2, 8, 3, 4, 15, 16, 9, 18,
+ 19, 20, 21, 22, 23, 24, 10, 11, 12, 13,
+ 14, 15, 16, 16, 26, 14, 15, 16, 17, 10,
+ 11, 12, 13, 14, 15, 16, 0, 0, 25, 10,
+ 11, 12, 13, 14, 15, 16, 12, 13, 14, 15,
+ 16, 13, 14, 15, 16
+};
+
+static const yysigned_char yycheck[] =
+{
+ 1, 10, 11, 4, 13, 14, 8, 9, 0, 10,
+ 11, 12, 13, 14, 15, 16, 3, 4, 5, 6,
+ 7, 8, 9, 9, 25, 7, 8, 9, 15, 3,
+ 4, 5, 6, 7, 8, 9, -1, -1, 12, 3,
+ 4, 5, 6, 7, 8, 9, 5, 6, 7, 8,
+ 9, 6, 7, 8, 9
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const unsigned char yystos[] =
+{
+ 0, 10, 11, 13, 14, 17, 18, 18, 18, 0,
+ 3, 4, 5, 6, 7, 8, 9, 15, 18, 18,
+ 18, 18, 18, 18, 18, 12, 18
+};
+
+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
+# define YYSIZE_T __SIZE_TYPE__
+#endif
+#if ! defined (YYSIZE_T) && defined (size_t)
+# define YYSIZE_T size_t
+#endif
+#if ! defined (YYSIZE_T)
+# if defined (__STDC__) || defined (__cplusplus)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# endif
+#endif
+#if ! defined (YYSIZE_T)
+# define YYSIZE_T unsigned int
+#endif
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+
+#define YYFAIL goto yyerrlab
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK; \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror ("syntax error: cannot back up");\
+ YYERROR; \
+ } \
+while (0)
+
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (N) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (0)
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (&yylval, YYLEX_PARAM)
+#else
+# define YYLEX yylex (&yylval)
+#endif
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (0)
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yysymprint (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (0)
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_stack_print (short int *bottom, short int *top)
+#else
+static void
+yy_stack_print (bottom, top)
+ short int *bottom;
+ short int *top;
+#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (/* Nothing. */; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (0)
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yy_reduce_print (int yyrule)
+#else
+static void
+yy_reduce_print (yyrule)
+ int yyrule;
+#endif
+{
+ int yyi;
+ unsigned int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %u), ",
+ yyrule - 1, yylno);
+ /* Print the symbols being reduced, and their result. */
+ for (yyi = yyprhs[yyrule]; 0 <= yyrhs[yyi]; yyi++)
+ YYFPRINTF (stderr, "%s ", yytname [yyrhs[yyi]]);
+ YYFPRINTF (stderr, "-> %s\n", yytname [yyr1[yyrule]]);
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (Rule); \
+} while (0)
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined (__GLIBC__) && defined (_STRING_H)
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+static YYSIZE_T
+# if defined (__STDC__) || defined (__cplusplus)
+yystrlen (const char *yystr)
+# else
+yystrlen (yystr)
+ const char *yystr;
+# endif
+{
+ register const char *yys = yystr;
+
+ while (*yys++ != '\0')
+ continue;
+
+ return yys - yystr - 1;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+static char *
+# if defined (__STDC__) || defined (__cplusplus)
+yystpcpy (char *yydest, const char *yysrc)
+# else
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+# endif
+{
+ register char *yyd = yydest;
+ register const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+#endif /* !YYERROR_VERBOSE */
+
+
+
+#if YYDEBUG
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yysymprint (FILE *yyoutput, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yysymprint (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+ YYFPRINTF (yyoutput, ")");
+}
+
+#endif /* ! YYDEBUG */
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+#if defined (__STDC__) || defined (__cplusplus)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ /* Pacify ``unused variable'' warnings. */
+ (void) yyvaluep;
+
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
+
+
+/* Prevent warnings from -Wmissing-prototypes. */
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM);
+# else
+int yyparse ();
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+# if defined (__STDC__) || defined (__cplusplus)
+int yyparse (void *YYPARSE_PARAM)
+# else
+int yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+# endif
+#else /* ! YYPARSE_PARAM */
+#if defined (__STDC__) || defined (__cplusplus)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+ /* The look-ahead symbol. */
+int yychar;
+
+/* The semantic value of the look-ahead symbol. */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far. */
+int yynerrs;
+
+ register int yystate;
+ register int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Look-ahead token as an internal (translated) token number. */
+ int yytoken = 0;
+
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ short int yyssa[YYINITDEPTH];
+ short int *yyss = yyssa;
+ register short int *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ register YYSTYPE *yyvsp;
+
+
+
+#define YYPOPSTACK (yyvsp--, yyssp--)
+
+ YYSIZE_T yystacksize = YYINITDEPTH;
+
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
+ /* When reducing, the number of symbols on the RHS of the reduced
+ rule. */
+ int yylen;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss;
+ yyvsp = yyvs;
+
+
+ yyvsp[0] = yylval;
+
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. so pushing a state here evens the stacks.
+ */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ short int *yyss1 = yyss;
+
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow ("parser stack overflow",
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyoverflowlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyoverflowlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ short int *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyoverflowlab;
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+/* Do appropriate processing given the current state. */
+/* Read a look-ahead token if we need one and don't already have one. */
+/* yyresume: */
+
+ /* First try to decide what to do without reference to look-ahead token. */
+
+ yyn = yypact[yystate];
+ if (yyn == YYPACT_NINF)
+ goto yydefault;
+
+ /* Not known => get a look-ahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ /* Shift the look-ahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the token being shifted unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
+ *++yyvsp = yylval;
+
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 2:
+#line 177 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"
+ {
+ if ((yyvsp[0].exp) == NULL)
+ YYABORT;
+ ((struct parse_args *) arg)->res = (yyvsp[0].exp);
+ }
+ break;
+
+ case 3:
+#line 185 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"
+ {
+ (yyval.exp) = new_exp_3 (qmop, (yyvsp[-4].exp), (yyvsp[-2].exp), (yyvsp[0].exp));
+ }
+ break;
+
+ case 4:
+#line 189 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"
+ {
+ (yyval.exp) = new_exp_2 (lor, (yyvsp[-2].exp), (yyvsp[0].exp));
+ }
+ break;
+
+ case 5:
+#line 193 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"
+ {
+ (yyval.exp) = new_exp_2 (land, (yyvsp[-2].exp), (yyvsp[0].exp));
+ }
+ break;
+
+ case 6:
+#line 197 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"
+ {
+ (yyval.exp) = new_exp_2 ((yyvsp[-1].op), (yyvsp[-2].exp), (yyvsp[0].exp));
+ }
+ break;
+
+ case 7:
+#line 201 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"
+ {
+ (yyval.exp) = new_exp_2 ((yyvsp[-1].op), (yyvsp[-2].exp), (yyvsp[0].exp));
+ }
+ break;
+
+ case 8:
+#line 205 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"
+ {
+ (yyval.exp) = new_exp_2 ((yyvsp[-1].op), (yyvsp[-2].exp), (yyvsp[0].exp));
+ }
+ break;
+
+ case 9:
+#line 209 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"
+ {
+ (yyval.exp) = new_exp_2 ((yyvsp[-1].op), (yyvsp[-2].exp), (yyvsp[0].exp));
+ }
+ break;
+
+ case 10:
+#line 213 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"
+ {
+ (yyval.exp) = new_exp_1 (lnot, (yyvsp[0].exp));
+ }
+ break;
+
+ case 11:
+#line 217 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"
+ {
+ (yyval.exp) = new_exp_0 (var);
+ }
+ break;
+
+ case 12:
+#line 221 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"
+ {
+ if (((yyval.exp) = new_exp_0 (num)) != NULL)
+ (yyval.exp)->val.num = (yyvsp[0].num);
+ }
+ break;
+
+ case 13:
+#line 226 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"
+ {
+ (yyval.exp) = (yyvsp[-1].exp);
+ }
+ break;
+
+
+ }
+
+/* Line 1037 of yacc.c. */
+#line 1270 "/usr/src/local/bash/bash-20080814/lib/intl/plural.c"
+
+ yyvsp -= yylen;
+ yyssp -= yylen;
+
+
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if YYERROR_VERBOSE
+ yyn = yypact[yystate];
+
+ if (YYPACT_NINF < yyn && yyn < YYLAST)
+ {
+ YYSIZE_T yysize = 0;
+ int yytype = YYTRANSLATE (yychar);
+ const char* yyprefix;
+ char *yymsg;
+ int yyx;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 0;
+
+ yyprefix = ", expecting ";
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ yysize += yystrlen (yyprefix) + yystrlen (yytname [yyx]);
+ yycount += 1;
+ if (yycount == 5)
+ {
+ yysize = 0;
+ break;
+ }
+ }
+ yysize += (sizeof ("syntax error, unexpected ")
+ + yystrlen (yytname[yytype]));
+ yymsg = (char *) YYSTACK_ALLOC (yysize);
+ if (yymsg != 0)
+ {
+ char *yyp = yystpcpy (yymsg, "syntax error, unexpected ");
+ yyp = yystpcpy (yyp, yytname[yytype]);
+
+ if (yycount < 5)
+ {
+ yyprefix = ", expecting ";
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ yyp = yystpcpy (yyp, yyprefix);
+ yyp = yystpcpy (yyp, yytname[yyx]);
+ yyprefix = " or ";
+ }
+ }
+ yyerror (yymsg);
+ YYSTACK_FREE (yymsg);
+ }
+ else
+ yyerror ("syntax error; also virtual memory exhausted");
+ }
+ else
+#endif /* YYERROR_VERBOSE */
+ yyerror ("syntax error");
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse look-ahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* If at end of input, pop the error token,
+ then the rest of the stack, then return failure. */
+ if (yychar == YYEOF)
+ for (;;)
+ {
+
+ YYPOPSTACK;
+ if (yyssp == yyss)
+ YYABORT;
+ yydestruct ("Error: popping",
+ yystos[*yyssp], yyvsp);
+ }
+ }
+ else
+ {
+ yydestruct ("Error: discarding", yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse look-ahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+#ifdef __GNUC__
+ /* Pacify GCC when the user code never invokes YYERROR and the label
+ yyerrorlab therefore never appears in user code. */
+ if (0)
+ goto yyerrorlab;
+#endif
+
+yyvsp -= yylen;
+ yyssp -= yylen;
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping", yystos[yystate], yyvsp);
+ YYPOPSTACK;
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ *++yyvsp = yylval;
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yydestruct ("Error: discarding lookahead",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ yyresult = 1;
+ goto yyreturn;
+
+#ifndef yyoverflow
+/*----------------------------------------------.
+| yyoverflowlab -- parser overflow comes here. |
+`----------------------------------------------*/
+yyoverflowlab:
+ yyerror ("parser stack overflow");
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+ return yyresult;
+}
+
+
+#line 231 "/usr/src/local/bash/bash-20080814/lib/intl/plural.y"
+
+
+void
+internal_function
+FREE_EXPRESSION (exp)
+ struct expression *exp;
+{
+ if (exp == NULL)
+ return;
+
+ /* Handle the recursive case. */
+ switch (exp->nargs)
+ {
+ case 3:
+ FREE_EXPRESSION (exp->val.args[2]);
+ /* FALLTHROUGH */
+ case 2:
+ FREE_EXPRESSION (exp->val.args[1]);
+ /* FALLTHROUGH */
+ case 1:
+ FREE_EXPRESSION (exp->val.args[0]);
+ /* FALLTHROUGH */
+ default:
+ break;
+ }
+
+ free (exp);
+}
+
+
+static int
+yylex (lval, pexp)
+ YYSTYPE *lval;
+ const char **pexp;
+{
+ const char *exp = *pexp;
+ int result;
+
+ while (1)
+ {
+ if (exp[0] == '\0')
+ {
+ *pexp = exp;
+ return YYEOF;
+ }
+
+ if (exp[0] != ' ' && exp[0] != '\t')
+ break;
+
+ ++exp;
+ }
+
+ result = *exp++;
+ switch (result)
+ {
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ {
+ unsigned long int n = result - '0';
+ while (exp[0] >= '0' && exp[0] <= '9')
+ {
+ n *= 10;
+ n += exp[0] - '0';
+ ++exp;
+ }
+ lval->num = n;
+ result = NUMBER;
+ }
+ break;
+
+ case '=':
+ if (exp[0] == '=')
+ {
+ ++exp;
+ lval->op = equal;
+ result = EQUOP2;
+ }
+ else
+ result = YYERRCODE;
+ break;
+
+ case '!':
+ if (exp[0] == '=')
+ {
+ ++exp;
+ lval->op = not_equal;
+ result = EQUOP2;
+ }
+ break;
+
+ case '&':
+ case '|':
+ if (exp[0] == result)
+ ++exp;
+ else
+ result = YYERRCODE;
+ break;
+
+ case '<':
+ if (exp[0] == '=')
+ {
+ ++exp;
+ lval->op = less_or_equal;
+ }
+ else
+ lval->op = less_than;
+ result = CMPOP2;
+ break;
+
+ case '>':
+ if (exp[0] == '=')
+ {
+ ++exp;
+ lval->op = greater_or_equal;
+ }
+ else
+ lval->op = greater_than;
+ result = CMPOP2;
+ break;
+
+ case '*':
+ lval->op = mult;
+ result = MULOP2;
+ break;
+
+ case '/':
+ lval->op = divide;
+ result = MULOP2;
+ break;
+
+ case '%':
+ lval->op = module;
+ result = MULOP2;
+ break;
+
+ case '+':
+ lval->op = plus;
+ result = ADDOP2;
+ break;
+
+ case '-':
+ lval->op = minus;
+ result = ADDOP2;
+ break;
+
+ case 'n':
+ case '?':
+ case ':':
+ case '(':
+ case ')':
+ /* Nothing, just return the character. */
+ break;
+
+ case ';':
+ case '\n':
+ case '\0':
+ /* Be safe and let the user call this function again. */
+ --exp;
+ result = YYEOF;
+ break;
+
+ default:
+ result = YYERRCODE;
+#if YYDEBUG != 0
+ --exp;
+#endif
+ break;
+ }
+
+ *pexp = exp;
+
+ return result;
+}
+
+
+static void
+yyerror (str)
+ const char *str;
+{
+ /* Do nothing. We don't print error messages here. */
+}
diff --git a/lib/intl/plural.y b/lib/intl/plural.y
new file mode 100644
index 0000000..8b8cec7
--- /dev/null
+++ b/lib/intl/plural.y
@@ -0,0 +1,411 @@
+%{
+/* plural.y - Expression parsing for plural form selection. */
+
+/* Copyright (C) 2000, 2001, 2005-2009 Free Software Foundation, Inc.
+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* The bison generated parser uses alloca. AIX 3 forces us to put this
+ declaration at the beginning of the file. The declaration in bison's
+ skeleton file comes too late. This must come before <config.h>
+ because <config.h> may include arbitrary system headers. */
+#if defined _AIX && !defined __GNUC__
+ #pragma alloca
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include "plural-exp.h"
+
+/* The main function generated by the parser is called __gettextparse,
+ but we want it to be called PLURAL_PARSE. */
+#ifndef _LIBC
+# define __gettextparse PLURAL_PARSE
+#endif
+
+#define YYLEX_PARAM &((struct parse_args *) arg)->cp
+#define YYPARSE_PARAM arg
+%}
+%pure_parser
+%expect 7
+
+%union {
+ unsigned long int num;
+ enum operator op;
+ struct expression *exp;
+}
+
+%{
+/* Prototypes for local functions. */
+static struct expression *new_exp PARAMS ((int nargs, enum operator op,
+ struct expression * const *args));
+static inline struct expression *new_exp_0 PARAMS ((enum operator op));
+static inline struct expression *new_exp_1 PARAMS ((enum operator op,
+ struct expression *right));
+static struct expression *new_exp_2 PARAMS ((enum operator op,
+ struct expression *left,
+ struct expression *right));
+static inline struct expression *new_exp_3 PARAMS ((enum operator op,
+ struct expression *bexp,
+ struct expression *tbranch,
+ struct expression *fbranch));
+static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
+static void yyerror PARAMS ((const char *str));
+
+/* Allocation of expressions. */
+
+static struct expression *
+new_exp (nargs, op, args)
+ int nargs;
+ enum operator op;
+ struct expression * const *args;
+{
+ int i;
+ struct expression *newp;
+
+ /* If any of the argument could not be malloc'ed, just return NULL. */
+ for (i = nargs - 1; i >= 0; i--)
+ if (args[i] == NULL)
+ goto fail;
+
+ /* Allocate a new expression. */
+ newp = (struct expression *) malloc (sizeof (*newp));
+ if (newp != NULL)
+ {
+ newp->nargs = nargs;
+ newp->operation = op;
+ for (i = nargs - 1; i >= 0; i--)
+ newp->val.args[i] = args[i];
+ return newp;
+ }
+
+ fail:
+ for (i = nargs - 1; i >= 0; i--)
+ FREE_EXPRESSION (args[i]);
+
+ return NULL;
+}
+
+static inline struct expression *
+new_exp_0 (op)
+ enum operator op;
+{
+ return new_exp (0, op, NULL);
+}
+
+static inline struct expression *
+new_exp_1 (op, right)
+ enum operator op;
+ struct expression *right;
+{
+ struct expression *args[1];
+
+ args[0] = right;
+ return new_exp (1, op, args);
+}
+
+static struct expression *
+new_exp_2 (op, left, right)
+ enum operator op;
+ struct expression *left;
+ struct expression *right;
+{
+ struct expression *args[2];
+
+ args[0] = left;
+ args[1] = right;
+ return new_exp (2, op, args);
+}
+
+static inline struct expression *
+new_exp_3 (op, bexp, tbranch, fbranch)
+ enum operator op;
+ struct expression *bexp;
+ struct expression *tbranch;
+ struct expression *fbranch;
+{
+ struct expression *args[3];
+
+ args[0] = bexp;
+ args[1] = tbranch;
+ args[2] = fbranch;
+ return new_exp (3, op, args);
+}
+
+%}
+
+/* This declares that all operators have the same associativity and the
+ precedence order as in C. See [Harbison, Steele: C, A Reference Manual].
+ There is no unary minus and no bitwise operators.
+ Operators with the same syntactic behaviour have been merged into a single
+ token, to save space in the array generated by bison. */
+%right '?' /* ? */
+%left '|' /* || */
+%left '&' /* && */
+%left EQUOP2 /* == != */
+%left CMPOP2 /* < > <= >= */
+%left ADDOP2 /* + - */
+%left MULOP2 /* * / % */
+%right '!' /* ! */
+
+%token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
+%token <num> NUMBER
+%type <exp> exp
+
+%%
+
+start: exp
+ {
+ if ($1 == NULL)
+ YYABORT;
+ ((struct parse_args *) arg)->res = $1;
+ }
+ ;
+
+exp: exp '?' exp ':' exp
+ {
+ $$ = new_exp_3 (qmop, $1, $3, $5);
+ }
+ | exp '|' exp
+ {
+ $$ = new_exp_2 (lor, $1, $3);
+ }
+ | exp '&' exp
+ {
+ $$ = new_exp_2 (land, $1, $3);
+ }
+ | exp EQUOP2 exp
+ {
+ $$ = new_exp_2 ($2, $1, $3);
+ }
+ | exp CMPOP2 exp
+ {
+ $$ = new_exp_2 ($2, $1, $3);
+ }
+ | exp ADDOP2 exp
+ {
+ $$ = new_exp_2 ($2, $1, $3);
+ }
+ | exp MULOP2 exp
+ {
+ $$ = new_exp_2 ($2, $1, $3);
+ }
+ | '!' exp
+ {
+ $$ = new_exp_1 (lnot, $2);
+ }
+ | 'n'
+ {
+ $$ = new_exp_0 (var);
+ }
+ | NUMBER
+ {
+ if (($$ = new_exp_0 (num)) != NULL)
+ $$->val.num = $1;
+ }
+ | '(' exp ')'
+ {
+ $$ = $2;
+ }
+ ;
+
+%%
+
+void
+internal_function
+FREE_EXPRESSION (exp)
+ struct expression *exp;
+{
+ if (exp == NULL)
+ return;
+
+ /* Handle the recursive case. */
+ switch (exp->nargs)
+ {
+ case 3:
+ FREE_EXPRESSION (exp->val.args[2]);
+ /* FALLTHROUGH */
+ case 2:
+ FREE_EXPRESSION (exp->val.args[1]);
+ /* FALLTHROUGH */
+ case 1:
+ FREE_EXPRESSION (exp->val.args[0]);
+ /* FALLTHROUGH */
+ default:
+ break;
+ }
+
+ free (exp);
+}
+
+
+static int
+yylex (lval, pexp)
+ YYSTYPE *lval;
+ const char **pexp;
+{
+ const char *exp = *pexp;
+ int result;
+
+ while (1)
+ {
+ if (exp[0] == '\0')
+ {
+ *pexp = exp;
+ return YYEOF;
+ }
+
+ if (exp[0] != ' ' && exp[0] != '\t')
+ break;
+
+ ++exp;
+ }
+
+ result = *exp++;
+ switch (result)
+ {
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ {
+ unsigned long int n = result - '0';
+ while (exp[0] >= '0' && exp[0] <= '9')
+ {
+ n *= 10;
+ n += exp[0] - '0';
+ ++exp;
+ }
+ lval->num = n;
+ result = NUMBER;
+ }
+ break;
+
+ case '=':
+ if (exp[0] == '=')
+ {
+ ++exp;
+ lval->op = equal;
+ result = EQUOP2;
+ }
+ else
+ result = YYERRCODE;
+ break;
+
+ case '!':
+ if (exp[0] == '=')
+ {
+ ++exp;
+ lval->op = not_equal;
+ result = EQUOP2;
+ }
+ break;
+
+ case '&':
+ case '|':
+ if (exp[0] == result)
+ ++exp;
+ else
+ result = YYERRCODE;
+ break;
+
+ case '<':
+ if (exp[0] == '=')
+ {
+ ++exp;
+ lval->op = less_or_equal;
+ }
+ else
+ lval->op = less_than;
+ result = CMPOP2;
+ break;
+
+ case '>':
+ if (exp[0] == '=')
+ {
+ ++exp;
+ lval->op = greater_or_equal;
+ }
+ else
+ lval->op = greater_than;
+ result = CMPOP2;
+ break;
+
+ case '*':
+ lval->op = mult;
+ result = MULOP2;
+ break;
+
+ case '/':
+ lval->op = divide;
+ result = MULOP2;
+ break;
+
+ case '%':
+ lval->op = module;
+ result = MULOP2;
+ break;
+
+ case '+':
+ lval->op = plus;
+ result = ADDOP2;
+ break;
+
+ case '-':
+ lval->op = minus;
+ result = ADDOP2;
+ break;
+
+ case 'n':
+ case '?':
+ case ':':
+ case '(':
+ case ')':
+ /* Nothing, just return the character. */
+ break;
+
+ case ';':
+ case '\n':
+ case '\0':
+ /* Be safe and let the user call this function again. */
+ --exp;
+ result = YYEOF;
+ break;
+
+ default:
+ result = YYERRCODE;
+#if YYDEBUG != 0
+ --exp;
+#endif
+ break;
+ }
+
+ *pexp = exp;
+
+ return result;
+}
+
+
+static void
+yyerror (str)
+ const char *str;
+{
+ /* Do nothing. We don't print error messages here. */
+}
diff --git a/lib/intl/ref-add.sin b/lib/intl/ref-add.sin
new file mode 100755
index 0000000..6fd32ed
--- /dev/null
+++ b/lib/intl/ref-add.sin
@@ -0,0 +1,29 @@
+# Add this package to a list of references stored in a text file.
+#
+# Copyright (C) 2000 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Written by Bruno Haible <haible@clisp.cons.org>.
+#
+/^# Packages using this file: / {
+ s/# Packages using this file://
+ ta
+ :a
+ s/ @PACKAGE@ / @PACKAGE@ /
+ tb
+ s/ $/ @PACKAGE@ /
+ :b
+ s/^/# Packages using this file:/
+}
diff --git a/lib/intl/ref-del.sin b/lib/intl/ref-del.sin
new file mode 100755
index 0000000..65ce9af
--- /dev/null
+++ b/lib/intl/ref-del.sin
@@ -0,0 +1,24 @@
+# Remove this package from a list of references stored in a text file.
+#
+# Copyright (C) 2000 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Written by Bruno Haible <haible@clisp.cons.org>.
+#
+/^# Packages using this file: / {
+ s/# Packages using this file://
+ s/ @PACKAGE@ / /
+ s/^/# Packages using this file:/
+}
diff --git a/lib/intl/relocatable.c b/lib/intl/relocatable.c
new file mode 100644
index 0000000..34b2b18
--- /dev/null
+++ b/lib/intl/relocatable.c
@@ -0,0 +1,440 @@
+/* relocatable.c - Provide relocatable packages. */
+
+/* Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Tell glibc's <stdio.h> to provide a prototype for getline().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
+/* Specification. */
+#include "relocatable.h"
+
+#if ENABLE_RELOCATABLE
+
+#include <stddef.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef NO_XMALLOC
+# define xmalloc malloc
+#else
+# include "xmalloc.h"
+#endif
+
+#if DEPENDS_ON_LIBCHARSET
+# include <libcharset.h>
+#endif
+#if DEPENDS_ON_LIBICONV && HAVE_ICONV
+# include <iconv.h>
+#endif
+#if DEPENDS_ON_LIBINTL && ENABLE_NLS
+# include <libintl.h>
+#endif
+
+/* Faked cheap 'bool'. */
+#undef bool
+#undef false
+#undef true
+#define bool int
+#define false 0
+#define true 1
+
+/* Pathname support.
+ ISSLASH(C) tests whether C is a directory separator character.
+ IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
+ */
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+# define HAS_DEVICE(P) \
+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
+ && (P)[1] == ':')
+# define IS_PATH_WITH_DIR(P) \
+ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
+# define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
+#else
+ /* Unix */
+# define ISSLASH(C) ((C) == '/')
+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
+# define FILESYSTEM_PREFIX_LEN(P) 0
+#endif
+
+/* Original installation prefix. */
+static char *orig_prefix;
+static size_t orig_prefix_len;
+/* Current installation prefix. */
+static char *curr_prefix;
+static size_t curr_prefix_len;
+/* These prefixes do not end in a slash. Anything that will be concatenated
+ to them must start with a slash. */
+
+/* Sets the original and the current installation prefix of this module.
+ Relocation simply replaces a pathname starting with the original prefix
+ by the corresponding pathname with the current prefix instead. Both
+ prefixes should be directory names without trailing slash (i.e. use ""
+ instead of "/"). */
+static void
+set_this_relocation_prefix (const char *orig_prefix_arg,
+ const char *curr_prefix_arg)
+{
+ if (orig_prefix_arg != NULL && curr_prefix_arg != NULL
+ /* Optimization: if orig_prefix and curr_prefix are equal, the
+ relocation is a nop. */
+ && strcmp (orig_prefix_arg, curr_prefix_arg) != 0)
+ {
+ /* Duplicate the argument strings. */
+ char *memory;
+
+ orig_prefix_len = strlen (orig_prefix_arg);
+ curr_prefix_len = strlen (curr_prefix_arg);
+ memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1);
+#ifdef NO_XMALLOC
+ if (memory != NULL)
+#endif
+ {
+ memcpy (memory, orig_prefix_arg, orig_prefix_len + 1);
+ orig_prefix = memory;
+ memory += orig_prefix_len + 1;
+ memcpy (memory, curr_prefix_arg, curr_prefix_len + 1);
+ curr_prefix = memory;
+ return;
+ }
+ }
+ orig_prefix = NULL;
+ curr_prefix = NULL;
+ /* Don't worry about wasted memory here - this function is usually only
+ called once. */
+}
+
+/* Sets the original and the current installation prefix of the package.
+ Relocation simply replaces a pathname starting with the original prefix
+ by the corresponding pathname with the current prefix instead. Both
+ prefixes should be directory names without trailing slash (i.e. use ""
+ instead of "/"). */
+void
+set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg)
+{
+ set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
+
+ /* Now notify all dependent libraries. */
+#if DEPENDS_ON_LIBCHARSET
+ libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
+#endif
+#if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109
+ libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
+#endif
+#if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix
+ libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
+#endif
+}
+
+/* Convenience function:
+ Computes the current installation prefix, based on the original
+ installation prefix, the original installation directory of a particular
+ file, and the current pathname of this file. Returns NULL upon failure. */
+#ifdef IN_LIBRARY
+#define compute_curr_prefix local_compute_curr_prefix
+static
+#endif
+const char *
+compute_curr_prefix (const char *orig_installprefix,
+ const char *orig_installdir,
+ const char *curr_pathname)
+{
+ const char *curr_installdir;
+ const char *rel_installdir;
+
+ if (curr_pathname == NULL)
+ return NULL;
+
+ /* Determine the relative installation directory, relative to the prefix.
+ This is simply the difference between orig_installprefix and
+ orig_installdir. */
+ if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix))
+ != 0)
+ /* Shouldn't happen - nothing should be installed outside $(prefix). */
+ return NULL;
+ rel_installdir = orig_installdir + strlen (orig_installprefix);
+
+ /* Determine the current installation directory. */
+ {
+ const char *p_base = curr_pathname + FILESYSTEM_PREFIX_LEN (curr_pathname);
+ const char *p = curr_pathname + strlen (curr_pathname);
+ char *q;
+
+ while (p > p_base)
+ {
+ p--;
+ if (ISSLASH (*p))
+ break;
+ }
+
+ q = (char *) xmalloc (p - curr_pathname + 1);
+#ifdef NO_XMALLOC
+ if (q == NULL)
+ return NULL;
+#endif
+ memcpy (q, curr_pathname, p - curr_pathname);
+ q[p - curr_pathname] = '\0';
+ curr_installdir = q;
+ }
+
+ /* Compute the current installation prefix by removing the trailing
+ rel_installdir from it. */
+ {
+ const char *rp = rel_installdir + strlen (rel_installdir);
+ const char *cp = curr_installdir + strlen (curr_installdir);
+ const char *cp_base =
+ curr_installdir + FILESYSTEM_PREFIX_LEN (curr_installdir);
+
+ while (rp > rel_installdir && cp > cp_base)
+ {
+ bool same = false;
+ const char *rpi = rp;
+ const char *cpi = cp;
+
+ while (rpi > rel_installdir && cpi > cp_base)
+ {
+ rpi--;
+ cpi--;
+ if (ISSLASH (*rpi) || ISSLASH (*cpi))
+ {
+ if (ISSLASH (*rpi) && ISSLASH (*cpi))
+ same = true;
+ break;
+ }
+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, OS/2, DOS - case insignificant filesystem */
+ if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi)
+ != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi))
+ break;
+#else
+ if (*rpi != *cpi)
+ break;
+#endif
+ }
+ if (!same)
+ break;
+ /* The last pathname component was the same. opi and cpi now point
+ to the slash before it. */
+ rp = rpi;
+ cp = cpi;
+ }
+
+ if (rp > rel_installdir)
+ /* Unexpected: The curr_installdir does not end with rel_installdir. */
+ return NULL;
+
+ {
+ size_t curr_prefix_len = cp - curr_installdir;
+ char *curr_prefix;
+
+ curr_prefix = (char *) xmalloc (curr_prefix_len + 1);
+#ifdef NO_XMALLOC
+ if (curr_prefix == NULL)
+ return NULL;
+#endif
+ memcpy (curr_prefix, curr_installdir, curr_prefix_len);
+ curr_prefix[curr_prefix_len] = '\0';
+
+ return curr_prefix;
+ }
+ }
+}
+
+#if defined PIC && defined INSTALLDIR
+
+/* Full pathname of shared library, or NULL. */
+static char *shared_library_fullname;
+
+#if defined _WIN32 || defined __WIN32__
+
+/* Determine the full pathname of the shared library when it is loaded. */
+
+BOOL WINAPI
+DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved)
+{
+ (void) reserved;
+
+ if (event == DLL_PROCESS_ATTACH)
+ {
+ /* The DLL is being loaded into an application's address range. */
+ static char location[MAX_PATH];
+
+ if (!GetModuleFileName (module_handle, location, sizeof (location)))
+ /* Shouldn't happen. */
+ return FALSE;
+
+ if (!IS_PATH_WITH_DIR (location))
+ /* Shouldn't happen. */
+ return FALSE;
+
+ shared_library_fullname = strdup (location);
+ }
+
+ return TRUE;
+}
+
+#else /* Unix */
+
+static void
+find_shared_library_fullname ()
+{
+#ifdef __linux__
+ FILE *fp;
+
+ /* Open the current process' maps file. It describes one VMA per line. */
+ fp = fopen ("/proc/self/maps", "r");
+ if (fp)
+ {
+ unsigned long address = (unsigned long) &find_shared_library_fullname;
+ for (;;)
+ {
+ unsigned long start, end;
+ int c;
+
+ if (fscanf (fp, "%lx-%lx", &start, &end) != 2)
+ break;
+ if (address >= start && address <= end - 1)
+ {
+ /* Found it. Now see if this line contains a filename. */
+ while (c = getc (fp), c != EOF && c != '\n' && c != '/')
+ continue;
+ if (c == '/')
+ {
+ size_t size;
+ int len;
+
+ ungetc (c, fp);
+ shared_library_fullname = NULL; size = 0;
+ len = getline (&shared_library_fullname, &size, fp);
+ if (len >= 0)
+ {
+ /* Success: filled shared_library_fullname. */
+ if (len > 0 && shared_library_fullname[len - 1] == '\n')
+ shared_library_fullname[len - 1] = '\0';
+ }
+ }
+ break;
+ }
+ while (c = getc (fp), c != EOF && c != '\n')
+ continue;
+ }
+ fclose (fp);
+ }
+#endif
+}
+
+#endif /* WIN32 / Unix */
+
+/* Return the full pathname of the current shared library.
+ Return NULL if unknown.
+ Guaranteed to work only on Linux and Woe32. */
+static char *
+get_shared_library_fullname ()
+{
+#if !(defined _WIN32 || defined __WIN32__)
+ static bool tried_find_shared_library_fullname;
+ if (!tried_find_shared_library_fullname)
+ {
+ find_shared_library_fullname ();
+ tried_find_shared_library_fullname = true;
+ }
+#endif
+ return shared_library_fullname;
+}
+
+#endif /* PIC */
+
+/* Returns the pathname, relocated according to the current installation
+ directory. */
+const char *
+relocate (const char *pathname)
+{
+#if defined PIC && defined INSTALLDIR
+ static int initialized;
+
+ /* Initialization code for a shared library. */
+ if (!initialized)
+ {
+ /* At this point, orig_prefix and curr_prefix likely have already been
+ set through the main program's set_program_name_and_installdir
+ function. This is sufficient in the case that the library has
+ initially been installed in the same orig_prefix. But we can do
+ better, to also cover the cases that 1. it has been installed
+ in a different prefix before being moved to orig_prefix and (later)
+ to curr_prefix, 2. unlike the program, it has not moved away from
+ orig_prefix. */
+ const char *orig_installprefix = INSTALLPREFIX;
+ const char *orig_installdir = INSTALLDIR;
+ const char *curr_prefix_better;
+
+ curr_prefix_better =
+ compute_curr_prefix (orig_installprefix, orig_installdir,
+ get_shared_library_fullname ());
+ if (curr_prefix_better == NULL)
+ curr_prefix_better = curr_prefix;
+
+ set_relocation_prefix (orig_installprefix, curr_prefix_better);
+
+ initialized = 1;
+ }
+#endif
+
+ /* Note: It is not necessary to perform case insensitive comparison here,
+ even for DOS-like filesystems, because the pathname argument was
+ typically created from the same Makefile variable as orig_prefix came
+ from. */
+ if (orig_prefix != NULL && curr_prefix != NULL
+ && strncmp (pathname, orig_prefix, orig_prefix_len) == 0)
+ {
+ if (pathname[orig_prefix_len] == '\0')
+ /* pathname equals orig_prefix. */
+ return curr_prefix;
+ if (ISSLASH (pathname[orig_prefix_len]))
+ {
+ /* pathname starts with orig_prefix. */
+ const char *pathname_tail = &pathname[orig_prefix_len];
+ char *result =
+ (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1);
+
+#ifdef NO_XMALLOC
+ if (result != NULL)
+#endif
+ {
+ memcpy (result, curr_prefix, curr_prefix_len);
+ strcpy (result + curr_prefix_len, pathname_tail);
+ return result;
+ }
+ }
+ }
+ /* Nothing to relocate. */
+ return pathname;
+}
+
+#endif
diff --git a/lib/intl/relocatable.h b/lib/intl/relocatable.h
new file mode 100644
index 0000000..de57f44
--- /dev/null
+++ b/lib/intl/relocatable.h
@@ -0,0 +1,69 @@
+/* relocatable.h - Provide relocatable packages. */
+
+/* Copyright (C) 2003, 2005-2009 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _RELOCATABLE_H
+#define _RELOCATABLE_H
+
+/* This can be enabled through the configure --enable-relocatable option. */
+#if ENABLE_RELOCATABLE
+
+/* When building a DLL, we must export some functions. Note that because
+ this is a private .h file, we don't need to use __declspec(dllimport)
+ in any case. */
+#if defined _MSC_VER && BUILDING_DLL
+# define RELOCATABLE_DLL_EXPORTED __declspec(dllexport)
+#else
+# define RELOCATABLE_DLL_EXPORTED
+#endif
+
+/* Sets the original and the current installation prefix of the package.
+ Relocation simply replaces a pathname starting with the original prefix
+ by the corresponding pathname with the current prefix instead. Both
+ prefixes should be directory names without trailing slash (i.e. use ""
+ instead of "/"). */
+extern RELOCATABLE_DLL_EXPORTED void
+ set_relocation_prefix (const char *orig_prefix,
+ const char *curr_prefix);
+
+/* Returns the pathname, relocated according to the current installation
+ directory. */
+extern const char * relocate (const char *pathname);
+
+/* Memory management: relocate() leaks memory, because it has to construct
+ a fresh pathname. If this is a problem because your program calls
+ relocate() frequently, think about caching the result. */
+
+/* Convenience function:
+ Computes the current installation prefix, based on the original
+ installation prefix, the original installation directory of a particular
+ file, and the current pathname of this file. Returns NULL upon failure. */
+extern const char * compute_curr_prefix (const char *orig_installprefix,
+ const char *orig_installdir,
+ const char *curr_pathname);
+
+#else
+
+/* By default, we use the hardwired pathnames. */
+#define relocate(pathname) (pathname)
+
+#endif
+
+#endif /* _RELOCATABLE_H */
diff --git a/lib/intl/textdomain.c b/lib/intl/textdomain.c
new file mode 100644
index 0000000..4bb0e80
--- /dev/null
+++ b/lib/intl/textdomain.c
@@ -0,0 +1,144 @@
+/* textdomain.c - Implementation of the textdomain(3) function. */
+
+/* Copyright (C) 1995-1998, 2000, 2001, 2002, 2005-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "libgnuintl.h"
+#endif
+#include "gettextP.h"
+
+#ifdef _LIBC
+/* We have to handle multi-threaded applications. */
+# include <bits/libc-lock.h>
+#else
+/* Provide dummy implementation if this is outside glibc. */
+# define __libc_rwlock_define(CLASS, NAME)
+# define __libc_rwlock_wrlock(NAME)
+# define __libc_rwlock_unlock(NAME)
+#endif
+
+/* The internal variables in the standalone libintl.a must have different
+ names than the internal variables in GNU libc, otherwise programs
+ using libintl.a cannot be linked statically. */
+#if !defined _LIBC
+# define _nl_default_default_domain libintl_nl_default_default_domain
+# define _nl_current_default_domain libintl_nl_current_default_domain
+#endif
+
+/* @@ end of prolog @@ */
+
+/* Name of the default text domain. */
+extern const char _nl_default_default_domain[] attribute_hidden;
+
+/* Default text domain in which entries for gettext(3) are to be found. */
+extern const char *_nl_current_default_domain attribute_hidden;
+
+
+/* Names for the libintl functions are a problem. They must not clash
+ with existing names and they should follow ANSI C. But this source
+ code is also used in GNU C Library where the names have a __
+ prefix. So we have to make a difference here. */
+#ifdef _LIBC
+# define TEXTDOMAIN __textdomain
+# ifndef strdup
+# define strdup(str) __strdup (str)
+# endif
+#else
+# define TEXTDOMAIN libintl_textdomain
+#endif
+
+/* Lock variable to protect the global data in the gettext implementation. */
+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
+
+/* Set the current default message catalog to DOMAINNAME.
+ If DOMAINNAME is null, return the current default.
+ If DOMAINNAME is "", reset to the default of "messages". */
+char *
+TEXTDOMAIN (domainname)
+ const char *domainname;
+{
+ char *new_domain;
+ char *old_domain;
+
+ /* A NULL pointer requests the current setting. */
+ if (domainname == NULL)
+ return (char *) _nl_current_default_domain;
+
+ __libc_rwlock_wrlock (_nl_state_lock);
+
+ old_domain = (char *) _nl_current_default_domain;
+
+ /* If domain name is the null string set to default domain "messages". */
+ if (domainname[0] == '\0'
+ || strcmp (domainname, _nl_default_default_domain) == 0)
+ {
+ _nl_current_default_domain = _nl_default_default_domain;
+ new_domain = (char *) _nl_current_default_domain;
+ }
+ else if (strcmp (domainname, old_domain) == 0)
+ /* This can happen and people will use it to signal that some
+ environment variable changed. */
+ new_domain = old_domain;
+ else
+ {
+ /* If the following malloc fails `_nl_current_default_domain'
+ will be NULL. This value will be returned and so signals we
+ are out of core. */
+#if defined _LIBC || defined HAVE_STRDUP
+ new_domain = strdup (domainname);
+#else
+ size_t len = strlen (domainname) + 1;
+ new_domain = (char *) malloc (len);
+ if (new_domain != NULL)
+ memcpy (new_domain, domainname, len);
+#endif
+
+ if (new_domain != NULL)
+ _nl_current_default_domain = new_domain;
+ }
+
+ /* We use this possibility to signal a change of the loaded catalogs
+ since this is most likely the case and there is no other easy we
+ to do it. Do it only when the call was successful. */
+ if (new_domain != NULL)
+ {
+ ++_nl_msg_cat_cntr;
+
+ if (old_domain != new_domain && old_domain != _nl_default_default_domain)
+ free (old_domain);
+ }
+
+ __libc_rwlock_unlock (_nl_state_lock);
+
+ return new_domain;
+}
+
+#ifdef _LIBC
+/* Alias for function name in GNU C Library. */
+weak_alias (__textdomain, textdomain);
+#endif
diff --git a/lib/malloc/Makefile.in b/lib/malloc/Makefile.in
new file mode 100644
index 0000000..e40f00a
--- /dev/null
+++ b/lib/malloc/Makefile.in
@@ -0,0 +1,137 @@
+# Skeleton Makefile for the GNU malloc code
+#
+# Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+srcdir = @srcdir@
+VPATH = .:@srcdir@
+topdir = @top_srcdir@
+BUILD_DIR = @BUILD_DIR@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+CC = @CC@
+RANLIB = @RANLIB@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+RM = rm -f
+CP = cp
+MV = mv
+
+SHELL = @MAKE_SHELL@
+
+PROFILE_FLAGS = @PROFILE_FLAGS@
+
+CFLAGS = @CFLAGS@
+LOCAL_CFLAGS = @LOCAL_CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+
+DEFS = @DEFS@
+LOCAL_DEFS = @LOCAL_DEFS@
+
+LIBBUILD = ${BUILD_DIR}/lib
+
+BASHINCDIR = ${topdir}/include
+
+INTL_LIBSRC = ${topdir}/lib/intl
+INTL_BUILDDIR = ${LIBBUILD}/intl
+INTL_INC = @INTL_INC@
+LIBINTL_H = @LIBINTL_H@
+
+INCLUDES = -I. -I../.. -I$(topdir) -I$(BASHINCDIR) -I$(topdir)/lib $(INTL_INC)
+
+CCFLAGS = ${PROFILE_FLAGS} ${INCLUDES} $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) \
+ $(CFLAGS) $(MALLOC_CFLAGS) $(CPPFLAGS)
+
+.c.o:
+ $(CC) $(CCFLAGS) -c $<
+
+.s.o:
+ $(CC) $(CCFLAGS) -c $<
+
+MALLOC_SOURCE = malloc.c
+STUB_SOURCE = stub.c
+
+ALLOCA_SOURCE = alloca.c
+ALLOCA_OBJECT = alloca.o
+
+MALLOC_SRC = @MALLOC_SRC@
+MALLOC = @MALLOC@
+ALLOCA = @ALLOCA@
+
+MALLOC_OBJS = malloc.o $(ALLOCA) trace.o stats.o table.o watch.o
+STUB_OBJS = $(ALLOCA) stub.o
+
+.PHONY: malloc stubmalloc
+
+all: malloc
+
+malloc: ${MALLOC_OBJS}
+ ${RM} libmalloc.a
+ ${AR} ${ARFLAGS} libmalloc.a ${MALLOC_OBJS}
+ -test -n "$(RANLIB)" && $(RANLIB) libmalloc.a
+
+stubmalloc: ${STUB_OBJS}
+ ${RM} libmalloc.a
+ ${AR} ${ARFLAGS} libmalloc.a ${STUB_OBJS}
+ -test -n "$(RANLIB)" && $(RANLIB) libmalloc.a
+
+alloca: ${ALLOCA}
+ ${RM} libmalloc.a
+ ${AR} ${ARFLAGS} libmalloc.a ${ALLOCA}
+ -test -n "$(RANLIB)" && $(RANLIB) libmalloc.a
+
+alloca.o: $(srcdir)/$(ALLOCA_SOURCE)
+ $(CC) $(CCFLAGS) -c $(srcdir)/$(ALLOCA_SOURCE)
+ @- if test "$(ALLOCA_OBJECT)" != alloca.o ; then \
+ mv $(ALLOCA_OBJECT) alloca.o >/dev/null 2>&1 ; \
+ fi
+
+mostlyclean clean:
+ $(RM) *.o libmalloc.a
+
+distclean realclean maintainer-clean: clean
+ $(RM) Makefile
+
+alloca.o: $(BUILD_DIR)/config.h
+malloc.o: $(BUILD_DIR)/config.h $(topdir)/bashtypes.h getpagesize.h
+xmalloc.o: $(BUILD_DIR)/config.h $(BASHINCDIR)/ansi_stdlib.h
+trace.o: ${BUILD_DIR}/config.h
+table.o: ${BUILD_DIR}/config.h
+watch.o: ${BUILD_DIR}/config.h
+
+malloc.o: ${srcdir}/imalloc.h ${srcdir}/mstats.h
+malloc.o: ${srcdir}/table.h ${srcdir}/watch.h
+stats.o: ${srcdir}/imalloc.h ${srcdir}/mstats.h
+trace.o: ${srcdir}/imalloc.h
+table.o: ${srcdir}/imalloc.h ${srcdir}/table.h
+watch.o: ${srcdir}/imalloc.h ${srcdir}/watch.h
+
+malloc.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h
+stats.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h
+trace.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h
+table.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h
+watch.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h
+
+# Rules for deficient makes, like SunOS and Solaris
+stub.o: stub.c
+malloc.o: malloc.c
+table.o: table.c
+trace.o: trace.c
+stats.o: stats.c
+watch.o: watch.c
diff --git a/lib/malloc/alloca.c b/lib/malloc/alloca.c
new file mode 100644
index 0000000..26319c2
--- /dev/null
+++ b/lib/malloc/alloca.c
@@ -0,0 +1,482 @@
+/* alloca.c -- allocate automatically reclaimed memory
+ (Mostly) portable public-domain implementation -- D A Gwyn
+
+ This implementation of the PWB library alloca function,
+ which is used to allocate space off the run-time stack so
+ that it is automatically reclaimed upon procedure exit,
+ was inspired by discussions with J. Q. Johnson of Cornell.
+ J.Otto Tennant <jot@cray.com> contributed the Cray support.
+
+ There are some preprocessor constants that can
+ be defined when compiling for your specific system, for
+ improved efficiency; however, the defaults should be okay.
+
+ The general concept of this implementation is to keep
+ track of all alloca-allocated blocks, and reclaim any
+ that are found to be deeper in the stack than the current
+ invocation. This heuristic does not reclaim storage as
+ soon as it becomes invalid, but it will do so eventually.
+
+ As a special case, alloca(0) reclaims storage without
+ allocating any. It is a good idea to use alloca(0) in
+ your main control loop, etc. to force garbage collection. */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+/* If compiling with GCC 2, this file's not needed. */
+#if !defined (__GNUC__) || __GNUC__ < 2
+
+#include <bashtypes.h> /* for size_t */
+
+/* If alloca is defined somewhere, this file is not needed. */
+#ifndef alloca
+
+#ifdef emacs
+#ifdef static
+/* actually, only want this if static is defined as ""
+ -- this is for usg, in which emacs must undefine static
+ in order to make unexec workable
+ */
+#ifndef STACK_DIRECTION
+you
+lose
+-- must know STACK_DIRECTION at compile-time
+#endif /* STACK_DIRECTION undefined */
+#endif /* static */
+#endif /* emacs */
+
+/* If your stack is a linked list of frames, you have to
+ provide an "address metric" ADDRESS_FUNCTION macro. */
+
+#if defined (CRAY) && defined (CRAY_STACKSEG_END)
+long i00afunc ();
+#define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
+#else
+#define ADDRESS_FUNCTION(arg) &(arg)
+#endif /* CRAY && CRAY_STACKSEG_END */
+
+#if __STDC__
+typedef void *pointer;
+#else
+typedef char *pointer;
+#endif
+
+#define NULL 0
+
+/* Different portions of Emacs need to call different versions of
+ malloc. The Emacs executable needs alloca to call xmalloc, because
+ ordinary malloc isn't protected from input signals. On the other
+ hand, the utilities in lib-src need alloca to call malloc; some of
+ them are very simple, and don't have an xmalloc routine.
+
+ Non-Emacs programs expect this to call use xmalloc.
+
+ Callers below should use malloc. */
+
+#ifndef emacs
+#define malloc xmalloc
+extern pointer xmalloc ();
+#endif
+
+/* Define STACK_DIRECTION if you know the direction of stack
+ growth for your system; otherwise it will be automatically
+ deduced at run-time.
+
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+
+#ifndef STACK_DIRECTION
+#define STACK_DIRECTION 0 /* Direction unknown. */
+#endif
+
+#if STACK_DIRECTION != 0
+
+#define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
+
+#else /* STACK_DIRECTION == 0; need run-time code. */
+
+static int stack_dir; /* 1 or -1 once known. */
+#define STACK_DIR stack_dir
+
+static void
+find_stack_direction ()
+{
+ static char *addr = NULL; /* Address of first `dummy', once known. */
+ auto char dummy; /* To get stack address. */
+
+ if (addr == NULL)
+ { /* Initial entry. */
+ addr = ADDRESS_FUNCTION (dummy);
+
+ find_stack_direction (); /* Recurse once. */
+ }
+ else
+ {
+ /* Second entry. */
+ if (ADDRESS_FUNCTION (dummy) > addr)
+ stack_dir = 1; /* Stack grew upward. */
+ else
+ stack_dir = -1; /* Stack grew downward. */
+ }
+}
+
+#endif /* STACK_DIRECTION == 0 */
+
+/* An "alloca header" is used to:
+ (a) chain together all alloca'ed blocks;
+ (b) keep track of stack depth.
+
+ It is very important that sizeof(header) agree with malloc
+ alignment chunk size. The following default should work okay. */
+
+#ifndef ALIGN_SIZE
+#define ALIGN_SIZE sizeof(double)
+#endif
+
+typedef union hdr
+{
+ char align[ALIGN_SIZE]; /* To force sizeof(header). */
+ struct
+ {
+ union hdr *next; /* For chaining headers. */
+ char *deep; /* For stack depth measure. */
+ } h;
+} header;
+
+static header *last_alloca_header = NULL; /* -> last alloca header. */
+
+/* Return a pointer to at least SIZE bytes of storage,
+ which will be automatically reclaimed upon exit from
+ the procedure that called alloca. Originally, this space
+ was supposed to be taken from the current stack frame of the
+ caller, but that method cannot be made to work for some
+ implementations of C, for example under Gould's UTX/32. */
+
+pointer
+alloca (size)
+ size_t size;
+{
+ auto char probe; /* Probes stack depth: */
+ register char *depth = ADDRESS_FUNCTION (probe);
+
+#if STACK_DIRECTION == 0
+ if (STACK_DIR == 0) /* Unknown growth direction. */
+ find_stack_direction ();
+#endif
+
+ /* Reclaim garbage, defined as all alloca'd storage that
+ was allocated from deeper in the stack than currently. */
+
+ {
+ register header *hp; /* Traverses linked list. */
+
+ for (hp = last_alloca_header; hp != NULL;)
+ if ((STACK_DIR > 0 && hp->h.deep > depth)
+ || (STACK_DIR < 0 && hp->h.deep < depth))
+ {
+ register header *np = hp->h.next;
+
+ free ((pointer) hp); /* Collect garbage. */
+
+ hp = np; /* -> next header. */
+ }
+ else
+ break; /* Rest are not deeper. */
+
+ last_alloca_header = hp; /* -> last valid storage. */
+ }
+
+ if (size == 0)
+ return NULL; /* No allocation required. */
+
+ /* Allocate combined header + user data storage. */
+
+ {
+ register pointer new = malloc (sizeof (header) + size);
+ /* Address of header. */
+
+ ((header *) new)->h.next = last_alloca_header;
+ ((header *) new)->h.deep = depth;
+
+ last_alloca_header = (header *) new;
+
+ /* User storage begins just after header. */
+
+ return (pointer) ((char *) new + sizeof (header));
+ }
+}
+
+#if defined (CRAY) && defined (CRAY_STACKSEG_END)
+
+#ifdef DEBUG_I00AFUNC
+#include <stdio.h>
+#endif
+
+#ifndef CRAY_STACK
+#define CRAY_STACK
+#ifndef CRAY2
+/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
+struct stack_control_header
+ {
+ long shgrow:32; /* Number of times stack has grown. */
+ long shaseg:32; /* Size of increments to stack. */
+ long shhwm:32; /* High water mark of stack. */
+ long shsize:32; /* Current size of stack (all segments). */
+ };
+
+/* The stack segment linkage control information occurs at
+ the high-address end of a stack segment. (The stack
+ grows from low addresses to high addresses.) The initial
+ part of the stack segment linkage control information is
+ 0200 (octal) words. This provides for register storage
+ for the routine which overflows the stack. */
+
+struct stack_segment_linkage
+ {
+ long ss[0200]; /* 0200 overflow words. */
+ long sssize:32; /* Number of words in this segment. */
+ long ssbase:32; /* Offset to stack base. */
+ long:32;
+ long sspseg:32; /* Offset to linkage control of previous
+ segment of stack. */
+ long:32;
+ long sstcpt:32; /* Pointer to task common address block. */
+ long sscsnm; /* Private control structure number for
+ microtasking. */
+ long ssusr1; /* Reserved for user. */
+ long ssusr2; /* Reserved for user. */
+ long sstpid; /* Process ID for pid based multi-tasking. */
+ long ssgvup; /* Pointer to multitasking thread giveup. */
+ long sscray[7]; /* Reserved for Cray Research. */
+ long ssa0;
+ long ssa1;
+ long ssa2;
+ long ssa3;
+ long ssa4;
+ long ssa5;
+ long ssa6;
+ long ssa7;
+ long sss0;
+ long sss1;
+ long sss2;
+ long sss3;
+ long sss4;
+ long sss5;
+ long sss6;
+ long sss7;
+ };
+
+#else /* CRAY2 */
+/* The following structure defines the vector of words
+ returned by the STKSTAT library routine. */
+struct stk_stat
+ {
+ long now; /* Current total stack size. */
+ long maxc; /* Amount of contiguous space which would
+ be required to satisfy the maximum
+ stack demand to date. */
+ long high_water; /* Stack high-water mark. */
+ long overflows; /* Number of stack overflow ($STKOFEN) calls. */
+ long hits; /* Number of internal buffer hits. */
+ long extends; /* Number of block extensions. */
+ long stko_mallocs; /* Block allocations by $STKOFEN. */
+ long underflows; /* Number of stack underflow calls ($STKRETN). */
+ long stko_free; /* Number of deallocations by $STKRETN. */
+ long stkm_free; /* Number of deallocations by $STKMRET. */
+ long segments; /* Current number of stack segments. */
+ long maxs; /* Maximum number of stack segments so far. */
+ long pad_size; /* Stack pad size. */
+ long current_address; /* Current stack segment address. */
+ long current_size; /* Current stack segment size. This
+ number is actually corrupted by STKSTAT to
+ include the fifteen word trailer area. */
+ long initial_address; /* Address of initial segment. */
+ long initial_size; /* Size of initial segment. */
+ };
+
+/* The following structure describes the data structure which trails
+ any stack segment. I think that the description in 'asdef' is
+ out of date. I only describe the parts that I am sure about. */
+
+struct stk_trailer
+ {
+ long this_address; /* Address of this block. */
+ long this_size; /* Size of this block (does not include
+ this trailer). */
+ long unknown2;
+ long unknown3;
+ long link; /* Address of trailer block of previous
+ segment. */
+ long unknown5;
+ long unknown6;
+ long unknown7;
+ long unknown8;
+ long unknown9;
+ long unknown10;
+ long unknown11;
+ long unknown12;
+ long unknown13;
+ long unknown14;
+ };
+
+#endif /* CRAY2 */
+#endif /* not CRAY_STACK */
+
+#ifdef CRAY2
+/* Determine a "stack measure" for an arbitrary ADDRESS.
+ I doubt that "lint" will like this much. */
+
+static long
+i00afunc (long *address)
+{
+ struct stk_stat status;
+ struct stk_trailer *trailer;
+ long *block, size;
+ long result = 0;
+
+ /* We want to iterate through all of the segments. The first
+ step is to get the stack status structure. We could do this
+ more quickly and more directly, perhaps, by referencing the
+ $LM00 common block, but I know that this works. */
+
+ STKSTAT (&status);
+
+ /* Set up the iteration. */
+
+ trailer = (struct stk_trailer *) (status.current_address
+ + status.current_size
+ - 15);
+
+ /* There must be at least one stack segment. Therefore it is
+ a fatal error if "trailer" is null. */
+
+ if (trailer == 0)
+ abort ();
+
+ /* Discard segments that do not contain our argument address. */
+
+ while (trailer != 0)
+ {
+ block = (long *) trailer->this_address;
+ size = trailer->this_size;
+ if (block == 0 || size == 0)
+ abort ();
+ trailer = (struct stk_trailer *) trailer->link;
+ if ((block <= address) && (address < (block + size)))
+ break;
+ }
+
+ /* Set the result to the offset in this segment and add the sizes
+ of all predecessor segments. */
+
+ result = address - block;
+
+ if (trailer == 0)
+ {
+ return result;
+ }
+
+ do
+ {
+ if (trailer->this_size <= 0)
+ abort ();
+ result += trailer->this_size;
+ trailer = (struct stk_trailer *) trailer->link;
+ }
+ while (trailer != 0);
+
+ /* We are done. Note that if you present a bogus address (one
+ not in any segment), you will get a different number back, formed
+ from subtracting the address of the first block. This is probably
+ not what you want. */
+
+ return (result);
+}
+
+#else /* not CRAY2 */
+/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
+ Determine the number of the cell within the stack,
+ given the address of the cell. The purpose of this
+ routine is to linearize, in some sense, stack addresses
+ for alloca. */
+
+static long
+i00afunc (long address)
+{
+ long stkl = 0;
+
+ long size, pseg, this_segment, stack;
+ long result = 0;
+
+ struct stack_segment_linkage *ssptr;
+
+ /* Register B67 contains the address of the end of the
+ current stack segment. If you (as a subprogram) store
+ your registers on the stack and find that you are past
+ the contents of B67, you have overflowed the segment.
+
+ B67 also points to the stack segment linkage control
+ area, which is what we are really interested in. */
+
+ /* This might be _getb67() or GETB67 () or getb67 () */
+ stkl = CRAY_STACKSEG_END ();
+ ssptr = (struct stack_segment_linkage *) stkl;
+
+ /* If one subtracts 'size' from the end of the segment,
+ one has the address of the first word of the segment.
+
+ If this is not the first segment, 'pseg' will be
+ nonzero. */
+
+ pseg = ssptr->sspseg;
+ size = ssptr->sssize;
+
+ this_segment = stkl - size;
+
+ /* It is possible that calling this routine itself caused
+ a stack overflow. Discard stack segments which do not
+ contain the target address. */
+
+ while (!(this_segment <= address && address <= stkl))
+ {
+#ifdef DEBUG_I00AFUNC
+ fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
+#endif
+ if (pseg == 0)
+ break;
+ stkl = stkl - pseg;
+ ssptr = (struct stack_segment_linkage *) stkl;
+ size = ssptr->sssize;
+ pseg = ssptr->sspseg;
+ this_segment = stkl - size;
+ }
+
+ result = address - this_segment;
+
+ /* If you subtract pseg from the current end of the stack,
+ you get the address of the previous stack segment's end.
+ This seems a little convoluted to me, but I'll bet you save
+ a cycle somewhere. */
+
+ while (pseg != 0)
+ {
+#ifdef DEBUG_I00AFUNC
+ fprintf (stderr, "%011o %011o\n", pseg, size);
+#endif
+ stkl = stkl - pseg;
+ ssptr = (struct stack_segment_linkage *) stkl;
+ size = ssptr->sssize;
+ pseg = ssptr->sspseg;
+ result += size;
+ }
+ return (result);
+}
+
+#endif /* not CRAY2 */
+#endif /* CRAY && CRAY_STACKSEG_END */
+
+#endif /* no alloca */
+#endif /* !__GNUC__ || __GNUC__ < 2 */
diff --git a/lib/malloc/getpagesize.h b/lib/malloc/getpagesize.h
new file mode 100644
index 0000000..7f32340
--- /dev/null
+++ b/lib/malloc/getpagesize.h
@@ -0,0 +1,60 @@
+/* Emulation of getpagesize() for systems that need it.
+ Copyright (C) 1991-2003 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne-Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+# if defined (_SC_PAGESIZE)
+# define getpagesize() sysconf(_SC_PAGESIZE)
+# else
+# if defined (_SC_PAGE_SIZE)
+# define getpagesize() sysconf(_SC_PAGE_SIZE)
+# endif /* _SC_PAGE_SIZE */
+# endif /* _SC_PAGESIZE */
+#endif
+
+#if !defined (getpagesize)
+# ifndef _MINIX
+# include <sys/param.h>
+# endif
+# if defined (PAGESIZE)
+# define getpagesize() PAGESIZE
+# else /* !PAGESIZE */
+# if defined (EXEC_PAGESIZE)
+# define getpagesize() EXEC_PAGESIZE
+# else /* !EXEC_PAGESIZE */
+# if defined (NBPG)
+# if !defined (CLSIZE)
+# define CLSIZE 1
+# endif /* !CLSIZE */
+# define getpagesize() (NBPG * CLSIZE)
+# else /* !NBPG */
+# if defined (NBPC)
+# define getpagesize() NBPC
+# endif /* NBPC */
+# endif /* !NBPG */
+# endif /* !EXEC_PAGESIZE */
+# endif /* !PAGESIZE */
+#endif /* !getpagesize */
+
+#if !defined (getpagesize)
+# define getpagesize() 4096 /* Just punt and use reasonable value */
+#endif
diff --git a/lib/malloc/i386-alloca.s b/lib/malloc/i386-alloca.s
new file mode 100644
index 0000000..01b2cfe
--- /dev/null
+++ b/lib/malloc/i386-alloca.s
@@ -0,0 +1,16 @@
+ .file "alloca.s"
+ .text
+ .align 4
+ .def alloca; .val alloca; .scl 2; .type 044; .endef
+ .globl alloca
+alloca:
+ popl %edx
+ popl %eax
+ addl $3,%eax
+ andl $0xfffffffc,%eax
+ subl %eax,%esp
+ movl %esp,%eax
+ pushl %eax
+ pushl %edx
+ ret
+ .def alloca; .val .; .scl -1; .endef
diff --git a/lib/malloc/imalloc.h b/lib/malloc/imalloc.h
new file mode 100644
index 0000000..34df10a
--- /dev/null
+++ b/lib/malloc/imalloc.h
@@ -0,0 +1,168 @@
+/* imalloc.h -- internal malloc definitions shared by source files. */
+
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Must be included *after* config.h */
+
+#ifndef _IMALLOC_H
+#define _IMALLOC_H
+
+#ifdef MALLOC_DEBUG
+#define MALLOC_STATS
+#define MALLOC_TRACE
+#define MALLOC_REGISTER
+#define MALLOC_WATCH
+#endif
+
+#define MALLOC_WRAPFUNCS
+
+/* Generic pointer type. */
+#ifndef PTR_T
+# if defined (__STDC__)
+# define PTR_T void *
+# else
+# define PTR_T char *
+# endif
+#endif
+
+#if !defined (NULL)
+# define NULL 0
+#endif
+
+#if !defined (__STRING)
+# if defined (HAVE_STRINGIZE)
+# define __STRING(x) #x
+# else
+# define __STRING(x) "x"
+# endif /* !HAVE_STRINGIZE */
+#endif /* !__STRING */
+
+#if __GNUC__ > 1
+# define FASTCOPY(s, d, n) __builtin_memcpy (d, s, n)
+#else /* !__GNUC__ */
+# if !defined (HAVE_BCOPY)
+# if !defined (HAVE_MEMMOVE)
+# define FASTCOPY(s, d, n) memcpy (d, s, n)
+# else
+# define FASTCOPY(s, d, n) memmove (d, s, n)
+# endif /* !HAVE_MEMMOVE */
+# else /* HAVE_BCOPY */
+# define FASTCOPY(s, d, n) bcopy (s, d, n)
+# endif /* HAVE_BCOPY */
+#endif /* !__GNUC__ */
+
+#if !defined (__P)
+# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus) || defined (PROTOTYPES)
+# define __P(protos) protos
+# else
+# define __P(protos) ()
+# endif
+#endif
+
+/* Use Duff's device for good zeroing/copying performance. DO NOT call the
+ Duff's device macros with NBYTES == 0. */
+
+#define MALLOC_BZERO(charp, nbytes) \
+do { \
+ if ((nbytes) <= 32) { \
+ size_t * mzp = (size_t *)(charp); \
+ unsigned long mctmp = (nbytes)/sizeof(size_t); \
+ long mcn; \
+ if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp &= 7; } \
+ switch (mctmp) { \
+ case 0: for(;;) { *mzp++ = 0; \
+ case 7: *mzp++ = 0; \
+ case 6: *mzp++ = 0; \
+ case 5: *mzp++ = 0; \
+ case 4: *mzp++ = 0; \
+ case 3: *mzp++ = 0; \
+ case 2: *mzp++ = 0; \
+ case 1: *mzp++ = 0; if(mcn <= 0) break; mcn--; } \
+ } \
+ else \
+ memset ((charp), 0, (nbytes)); \
+} while(0)
+
+#define MALLOC_ZERO(charp, nbytes) \
+do { \
+ size_t mzsz = (nbytes); \
+ if (mzsz <= 9 * sizeof(mzsz) { \
+ size_t *mz = (size_t *)(charp); \
+ if(mzsz >= 5*sizeof(mzsz)) { *mz++ = 0; \
+ *mz++ = 0; \
+ if(mzsz >= 7*sizeof(mzsz)) { *mz++ = 0; \
+ *mz++ = 0; \
+ if(mzsz >= 9*sizeof(mzsz)) { *mz++ = 0; \
+ *mz++ = 0; }}} \
+ *mz++ = 0; \
+ *mz++ = 0; \
+ *mz = 0; \
+ } else \
+ memset ((charp), 0, mzsz); \
+} while (0)
+
+#define MALLOC_MEMSET(charp, xch, nbytes) \
+do { \
+ if ((nbytes) <= 32) { \
+ register char * mzp = (charp); \
+ unsigned long mctmp = (nbytes); \
+ register long mcn; \
+ if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp &= 7; } \
+ switch (mctmp) { \
+ case 0: for(;;) { *mzp++ = xch; \
+ case 7: *mzp++ = xch; \
+ case 6: *mzp++ = xch; \
+ case 5: *mzp++ = xch; \
+ case 4: *mzp++ = xch; \
+ case 3: *mzp++ = xch; \
+ case 2: *mzp++ = xch; \
+ case 1: *mzp++ = xch; if(mcn <= 0) break; mcn--; } \
+ } \
+ } else \
+ memset ((charp), (xch), (nbytes)); \
+} while(0)
+
+#define MALLOC_MEMCPY(dest,src,nbytes) \
+do { \
+ if ((nbytes) <= 32) { \
+ size_t* mcsrc = (size_t*) src; \
+ size_t* mcdst = (size_t*) dest; \
+ unsigned long mctmp = (nbytes)/sizeof(size_t); \
+ long mcn; \
+ if (mctmp < 8) mcn = 0; else { mcn = (mctmp-1)/8; mctmp &= 7; } \
+ switch (mctmp) { \
+ case 0: for(;;) { *mcdst++ = *mcsrc++; \
+ case 7: *mcdst++ = *mcsrc++; \
+ case 6: *mcdst++ = *mcsrc++; \
+ case 5: *mcdst++ = *mcsrc++; \
+ case 4: *mcdst++ = *mcsrc++; \
+ case 3: *mcdst++ = *mcsrc++; \
+ case 2: *mcdst++ = *mcsrc++; \
+ case 1: *mcdst++ = *mcsrc++; if(mcn <= 0) break; mcn--; } \
+ } else \
+ memcpy ((dest), (src), (nbytes)) \
+} while(0)
+
+#if defined (SHELL)
+# include "bashintl.h"
+#else
+# define _(x) x
+#endif
+
+#endif /* _IMALLOC_H */
diff --git a/lib/malloc/malloc.c b/lib/malloc/malloc.c
new file mode 100644
index 0000000..bca68e8
--- /dev/null
+++ b/lib/malloc/malloc.c
@@ -0,0 +1,1303 @@
+/* malloc.c - dynamic memory allocation for bash. */
+
+/* Copyright (C) 1985-2005 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne-Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ * @(#)nmalloc.c 1 (Caltech) 2/21/82
+ *
+ * U of M Modified: 20 Jun 1983 ACT: strange hacks for Emacs
+ *
+ * Nov 1983, Mike@BRL, Added support for 4.1C/4.2 BSD.
+ *
+ * This is a very fast storage allocator. It allocates blocks of a small
+ * number of different sizes, and keeps free lists of each size. Blocks
+ * that don't exactly fit are passed up to the next larger size. In this
+ * implementation, the available sizes are (2^n)-4 (or -16) bytes long.
+ * This is designed for use in a program that uses vast quantities of
+ * memory, but bombs when it runs out. To make it a little better, it
+ * warns the user when he starts to get near the end.
+ *
+ * June 84, ACT: modified rcheck code to check the range given to malloc,
+ * rather than the range determined by the 2-power used.
+ *
+ * Jan 85, RMS: calls malloc_warning to issue warning on nearly full.
+ * No longer Emacs-specific; can serve as all-purpose malloc for GNU.
+ * You should call malloc_init to reinitialize after loading dumped Emacs.
+ * Call malloc_stats to get info on memory stats if MALLOC_STATS turned on.
+ * realloc knows how to return same block given, just changing its size,
+ * if the power of 2 is correct.
+ */
+
+/*
+ * nextf[i] is the pointer to the next free block of size 2^(i+3). The
+ * smallest allocatable block is 8 bytes. The overhead information will
+ * go in the first int of the block, and the returned pointer will point
+ * to the second.
+ */
+
+/* Define MEMSCRAMBLE to have free() write 0xcf into memory as it's freed, to
+ uncover callers that refer to freed memory, and to have malloc() write 0xdf
+ into memory as it's allocated to avoid referring to previous contents. */
+
+/* SCO 3.2v4 getcwd and possibly other libc routines fail with MEMSCRAMBLE;
+ handled by configure. */
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif /* HAVE_CONFIG_H */
+
+#if defined (SHELL)
+# include "bashtypes.h"
+# include "stdc.h"
+#else
+# include <sys/types.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+/* Determine which kind of system this is. */
+#include <signal.h>
+
+#if defined (HAVE_STRING_H)
+# include <string.h>
+#else
+# include <strings.h>
+#endif
+
+#include <stdio.h>
+
+/* Define getpagesize () if the system does not. */
+#ifndef HAVE_GETPAGESIZE
+# include "getpagesize.h"
+#endif
+
+#include "imalloc.h"
+#ifdef MALLOC_STATS
+# include "mstats.h"
+#endif
+#ifdef MALLOC_REGISTER
+# include "table.h"
+#endif
+#ifdef MALLOC_WATCH
+# include "watch.h"
+#endif
+
+/* System-specific omissions. */
+#ifdef HPUX
+# define NO_VALLOC
+#endif
+
+#define NBUCKETS 30
+
+#define ISALLOC ((char) 0xf7) /* magic byte that implies allocation */
+#define ISFREE ((char) 0x54) /* magic byte that implies free block */
+ /* this is for error checking only */
+#define ISMEMALIGN ((char) 0xd6) /* Stored before the value returned by
+ memalign, with the rest of the word
+ being the distance to the true
+ beginning of the block. */
+
+
+/* We have a flag indicating whether memory is allocated, an index in
+ nextf[], a size field, and a sentinel value to determine whether or
+ not a caller wrote before the start of allocated memory; to realloc()
+ memory we either copy mh_nbytes or just change mh_nbytes if there is
+ enough room in the block for the new size. Range checking is always
+ done. */
+union mhead {
+ bits64_t mh_align; /* 8 */
+ struct {
+ char mi_alloc; /* ISALLOC or ISFREE */ /* 1 */
+ char mi_index; /* index in nextf[] */ /* 1 */
+ /* Remainder are valid only when block is allocated */
+ u_bits16_t mi_magic2; /* should be == MAGIC2 */ /* 2 */
+ u_bits32_t mi_nbytes; /* # of bytes allocated */ /* 4 */
+ } minfo;
+};
+#define mh_alloc minfo.mi_alloc
+#define mh_index minfo.mi_index
+#define mh_nbytes minfo.mi_nbytes
+#define mh_magic2 minfo.mi_magic2
+
+#define MOVERHEAD sizeof(union mhead)
+#define MALIGN_MASK 7 /* one less than desired alignment */
+
+typedef union _malloc_guard {
+ char s[4];
+ u_bits32_t i;
+} mguard_t;
+
+/* Access free-list pointer of a block.
+ It is stored at block + sizeof (char *).
+ This is not a field in the minfo structure member of union mhead
+ because we want sizeof (union mhead)
+ to describe the overhead for when the block is in use,
+ and we do not want the free-list pointer to count in that. */
+
+#define CHAIN(a) \
+ (*(union mhead **) (sizeof (char *) + (char *) (a)))
+
+/* To implement range checking, we write magic values in at the beginning
+ and end of each allocated block, and make sure they are undisturbed
+ whenever a free or a realloc occurs. */
+
+/* Written in the 2 bytes before the block's real space (-4 bytes) */
+#define MAGIC2 0x5555
+#define MSLOP 4 /* 4 bytes extra for u_bits32_t size */
+
+/* How many bytes are actually allocated for a request of size N --
+ rounded up to nearest multiple of 8 after accounting for malloc
+ overhead. */
+#define ALLOCATED_BYTES(n) \
+ (((n) + MOVERHEAD + MSLOP + MALIGN_MASK) & ~MALIGN_MASK)
+
+#define ASSERT(p) \
+ do \
+ { \
+ if (!(p)) xbotch((PTR_T)0, ERR_ASSERT_FAILED, __STRING(p), file, line); \
+ } \
+ while (0)
+
+/* Minimum and maximum bucket indices for block splitting (and to bound
+ the search for a block to split). */
+#define SPLIT_MIN 2 /* XXX - was 3 */
+#define SPLIT_MID 11
+#define SPLIT_MAX 14
+
+/* Minimum and maximum bucket indices for block coalescing. */
+#define COMBINE_MIN 2
+#define COMBINE_MAX (pagebucket - 1) /* XXX */
+
+#define LESSCORE_MIN 10
+#define LESSCORE_FRC 13
+
+#define STARTBUCK 1
+
+/* Flags for the internal functions. */
+#define MALLOC_WRAPPER 0x01 /* wrapper function */
+#define MALLOC_INTERNAL 0x02 /* internal function calling another */
+#define MALLOC_NOTRACE 0x04 /* don't trace this allocation or free */
+#define MALLOC_NOREG 0x08 /* don't register this allocation or free */
+
+/* Future use. */
+#define ERR_DUPFREE 0x01
+#define ERR_UNALLOC 0x02
+#define ERR_UNDERFLOW 0x04
+#define ERR_ASSERT_FAILED 0x08
+
+/* Evaluates to true if NB is appropriate for bucket NU. NB is adjusted
+ appropriately by the caller to account for malloc overhead. This only
+ checks that the recorded size is not too big for the bucket. We
+ can't check whether or not it's in between NU and NU-1 because we
+ might have encountered a busy bucket when allocating and moved up to
+ the next size. */
+#define IN_BUCKET(nb, nu) ((nb) <= binsizes[(nu)])
+
+/* Use this when we want to be sure that NB is in bucket NU. */
+#define RIGHT_BUCKET(nb, nu) \
+ (((nb) > binsizes[(nu)-1]) && ((nb) <= binsizes[(nu)]))
+
+/* nextf[i] is free list of blocks of size 2**(i + 3) */
+
+static union mhead *nextf[NBUCKETS];
+
+/* busy[i] is nonzero while allocation or free of block size i is in progress. */
+
+static char busy[NBUCKETS];
+
+static int pagesz; /* system page size. */
+static int pagebucket; /* bucket for requests a page in size */
+static int maxbuck; /* highest bucket receiving allocation request. */
+
+static char *memtop; /* top of heap */
+
+static const unsigned long binsizes[NBUCKETS] = {
+ 8UL, 16UL, 32UL, 64UL, 128UL, 256UL, 512UL, 1024UL, 2048UL, 4096UL,
+ 8192UL, 16384UL, 32768UL, 65536UL, 131072UL, 262144UL, 524288UL,
+ 1048576UL, 2097152UL, 4194304UL, 8388608UL, 16777216UL, 33554432UL,
+ 67108864UL, 134217728UL, 268435456UL, 536870912UL, 1073741824UL,
+ 2147483648UL, 4294967295UL
+};
+
+/* binsizes[x] == (1 << ((x) + 3)) */
+#define binsize(x) binsizes[(x)]
+
+/* Declarations for internal functions */
+static PTR_T internal_malloc __P((size_t, const char *, int, int));
+static PTR_T internal_realloc __P((PTR_T, size_t, const char *, int, int));
+static void internal_free __P((PTR_T, const char *, int, int));
+static PTR_T internal_memalign __P((size_t, size_t, const char *, int, int));
+#ifndef NO_CALLOC
+static PTR_T internal_calloc __P((size_t, size_t, const char *, int, int));
+static void internal_cfree __P((PTR_T, const char *, int, int));
+#endif
+#ifndef NO_VALLOC
+static PTR_T internal_valloc __P((size_t, const char *, int, int));
+#endif
+
+#if defined (botch)
+extern void botch ();
+#else
+static void botch __P((const char *, const char *, int));
+#endif
+static void xbotch __P((PTR_T, int, const char *, const char *, int));
+
+#if !HAVE_DECL_SBRK
+extern char *sbrk ();
+#endif /* !HAVE_DECL_SBRK */
+
+#ifdef SHELL
+extern int interrupt_immediately;
+extern int signal_is_trapped __P((int));
+#endif
+
+#ifdef MALLOC_STATS
+struct _malstats _mstats;
+#endif /* MALLOC_STATS */
+
+/* Debugging variables available to applications. */
+int malloc_flags = 0; /* future use */
+int malloc_trace = 0; /* trace allocations and frees to stderr */
+int malloc_register = 0; /* future use */
+
+#ifdef MALLOC_TRACE
+char _malloc_trace_buckets[NBUCKETS];
+
+/* These should really go into a header file. */
+extern void mtrace_alloc __P((const char *, PTR_T, size_t, const char *, int));
+extern void mtrace_free __P((PTR_T, int, const char *, int));
+#endif
+
+#if !defined (botch)
+static void
+botch (s, file, line)
+ const char *s;
+ const char *file;
+ int line;
+{
+ fprintf (stderr, _("malloc: failed assertion: %s\n"), s);
+ (void)fflush (stderr);
+ abort ();
+}
+#endif
+
+/* print the file and line number that caused the assertion failure and
+ call botch() to do whatever the application wants with the information */
+static void
+xbotch (mem, e, s, file, line)
+ PTR_T mem;
+ int e;
+ const char *s;
+ const char *file;
+ int line;
+{
+ fprintf (stderr, _("\r\nmalloc: %s:%d: assertion botched\r\n"),
+ file ? file : _("unknown"), line);
+#ifdef MALLOC_REGISTER
+ if (mem != NULL && malloc_register)
+ mregister_describe_mem (mem, stderr);
+#endif
+ (void)fflush (stderr);
+ botch(s, file, line);
+}
+
+/* Coalesce two adjacent free blocks off the free list for size NU - 1,
+ as long as we can find two adjacent free blocks. nextf[NU -1] is
+ assumed to not be busy; the caller (morecore()) checks for this.
+ BUSY[NU] must be set to 1. */
+static void
+bcoalesce (nu)
+ register int nu;
+{
+ register union mhead *mp, *mp1, *mp2;
+ register int nbuck;
+ unsigned long siz;
+
+ nbuck = nu - 1;
+ if (nextf[nbuck] == 0 || busy[nbuck])
+ return;
+
+ busy[nbuck] = 1;
+ siz = binsize (nbuck);
+
+ mp2 = mp1 = nextf[nbuck];
+ mp = CHAIN (mp1);
+ while (mp && mp != (union mhead *)((char *)mp1 + siz))
+ {
+ mp2 = mp1;
+ mp1 = mp;
+ mp = CHAIN (mp);
+ }
+
+ if (mp == 0)
+ {
+ busy[nbuck] = 0;
+ return;
+ }
+
+ /* OK, now we have mp1 pointing to the block we want to add to nextf[NU].
+ CHAIN(mp2) must equal mp1. Check that mp1 and mp are adjacent. */
+ if (mp2 != mp1 && CHAIN(mp2) != mp1)
+ {
+ busy[nbuck] = 0;
+ xbotch ((PTR_T)0, 0, "bcoalesce: CHAIN(mp2) != mp1", (char *)NULL, 0);
+ }
+
+#ifdef MALLOC_DEBUG
+ if (CHAIN (mp1) != (union mhead *)((char *)mp1 + siz))
+ {
+ busy[nbuck] = 0;
+ return; /* not adjacent */
+ }
+#endif
+
+ /* Since they are adjacent, remove them from the free list */
+ if (mp1 == nextf[nbuck])
+ nextf[nbuck] = CHAIN (mp);
+ else
+ CHAIN (mp2) = CHAIN (mp);
+ busy[nbuck] = 0;
+
+#ifdef MALLOC_STATS
+ _mstats.tbcoalesce++;
+ _mstats.ncoalesce[nbuck]++;
+#endif
+
+ /* And add the combined two blocks to nextf[NU]. */
+ mp1->mh_alloc = ISFREE;
+ mp1->mh_index = nu;
+ CHAIN (mp1) = nextf[nu];
+ nextf[nu] = mp1;
+}
+
+/* Split a block at index > NU (but less than SPLIT_MAX) into a set of
+ blocks of the correct size, and attach them to nextf[NU]. nextf[NU]
+ is assumed to be empty. Must be called with signals blocked (e.g.,
+ by morecore()). BUSY[NU] must be set to 1. */
+static void
+bsplit (nu)
+ register int nu;
+{
+ register union mhead *mp;
+ int nbuck, nblks, split_max;
+ unsigned long siz;
+
+ split_max = (maxbuck > SPLIT_MAX) ? maxbuck : SPLIT_MAX;
+
+ if (nu >= SPLIT_MID)
+ {
+ for (nbuck = split_max; nbuck > nu; nbuck--)
+ {
+ if (busy[nbuck] || nextf[nbuck] == 0)
+ continue;
+ break;
+ }
+ }
+ else
+ {
+ for (nbuck = nu + 1; nbuck <= split_max; nbuck++)
+ {
+ if (busy[nbuck] || nextf[nbuck] == 0)
+ continue;
+ break;
+ }
+ }
+
+ if (nbuck > split_max || nbuck <= nu)
+ return;
+
+ /* XXX might want to split only if nextf[nbuck] has >= 2 blocks free
+ and nbuck is below some threshold. */
+
+ /* Remove the block from the chain of larger blocks. */
+ busy[nbuck] = 1;
+ mp = nextf[nbuck];
+ nextf[nbuck] = CHAIN (mp);
+ busy[nbuck] = 0;
+
+#ifdef MALLOC_STATS
+ _mstats.tbsplit++;
+ _mstats.nsplit[nbuck]++;
+#endif
+
+ /* Figure out how many blocks we'll get. */
+ siz = binsize (nu);
+ nblks = binsize (nbuck) / siz;
+
+ /* Split the block and put it on the requested chain. */
+ nextf[nu] = mp;
+ while (1)
+ {
+ mp->mh_alloc = ISFREE;
+ mp->mh_index = nu;
+ if (--nblks <= 0) break;
+ CHAIN (mp) = (union mhead *)((char *)mp + siz);
+ mp = (union mhead *)((char *)mp + siz);
+ }
+ CHAIN (mp) = 0;
+}
+
+/* Take the memory block MP and add it to a chain < NU. NU is the right bucket,
+ but is busy. This avoids memory orphaning. */
+static void
+xsplit (mp, nu)
+ union mhead *mp;
+ int nu;
+{
+ union mhead *nh;
+ int nbuck, nblks, split_max;
+ unsigned long siz;
+
+ nbuck = nu - 1;
+ while (nbuck >= SPLIT_MIN && busy[nbuck])
+ nbuck--;
+ if (nbuck < SPLIT_MIN)
+ return;
+
+#ifdef MALLOC_STATS
+ _mstats.tbsplit++;
+ _mstats.nsplit[nu]++;
+#endif
+
+ /* Figure out how many blocks we'll get. */
+ siz = binsize (nu); /* original block size */
+ nblks = siz / binsize (nbuck); /* should be 2 most of the time */
+
+ /* And add it to nextf[nbuck] */
+ siz = binsize (nbuck); /* XXX - resetting here */
+ nh = mp;
+ while (1)
+ {
+ mp->mh_alloc = ISFREE;
+ mp->mh_index = nbuck;
+ if (--nblks <= 0) break;
+ CHAIN (mp) = (union mhead *)((char *)mp + siz);
+ mp = (union mhead *)((char *)mp + siz);
+ }
+ busy[nbuck] = 1;
+ CHAIN (mp) = nextf[nbuck];
+ nextf[nbuck] = nh;
+ busy[nbuck] = 0;
+}
+
+static void
+block_signals (setp, osetp)
+ sigset_t *setp, *osetp;
+{
+#ifdef HAVE_POSIX_SIGNALS
+ sigfillset (setp);
+ sigemptyset (osetp);
+ sigprocmask (SIG_BLOCK, setp, osetp);
+#else
+# if defined (HAVE_BSD_SIGNALS)
+ *osetp = sigsetmask (-1);
+# endif
+#endif
+}
+
+static void
+unblock_signals (setp, osetp)
+ sigset_t *setp, *osetp;
+{
+#ifdef HAVE_POSIX_SIGNALS
+ sigprocmask (SIG_SETMASK, osetp, (sigset_t *)NULL);
+#else
+# if defined (HAVE_BSD_SIGNALS)
+ sigsetmask (*osetp);
+# endif
+#endif
+}
+
+/* Return some memory to the system by reducing the break. This is only
+ called with NU > pagebucket, so we're always assured of giving back
+ more than one page of memory. */
+static void
+lesscore (nu) /* give system back some memory */
+ register int nu; /* size index we're discarding */
+{
+ long siz;
+
+ siz = binsize (nu);
+ /* Should check for errors here, I guess. */
+ sbrk (-siz);
+ memtop -= siz;
+
+#ifdef MALLOC_STATS
+ _mstats.nsbrk++;
+ _mstats.tsbrk -= siz;
+ _mstats.nlesscore[nu]++;
+#endif
+}
+
+/* Ask system for more memory; add to NEXTF[NU]. BUSY[NU] must be set to 1. */
+static void
+morecore (nu)
+ register int nu; /* size index to get more of */
+{
+ register union mhead *mp;
+ register int nblks;
+ register long siz;
+ long sbrk_amt; /* amount to get via sbrk() */
+ sigset_t set, oset;
+ int blocked_sigs;
+
+ /* Block all signals in case we are executed from a signal handler. */
+ blocked_sigs = 0;
+#ifdef SHELL
+ if (interrupt_immediately || signal_is_trapped (SIGINT) || signal_is_trapped (SIGCHLD))
+#endif
+ {
+ block_signals (&set, &oset);
+ blocked_sigs = 1;
+ }
+
+ siz = binsize (nu); /* size of desired block for nextf[nu] */
+
+ if (siz < 0)
+ goto morecore_done; /* oops */
+
+#ifdef MALLOC_STATS
+ _mstats.nmorecore[nu]++;
+#endif
+
+ /* Try to split a larger block here, if we're within the range of sizes
+ to split. */
+ if (nu >= SPLIT_MIN)
+ {
+ bsplit (nu);
+ if (nextf[nu] != 0)
+ goto morecore_done;
+ }
+
+ /* Try to coalesce two adjacent blocks from the free list on nextf[nu - 1],
+ if we can, and we're within the range of the block coalescing limits. */
+ if (nu >= COMBINE_MIN && nu < COMBINE_MAX && busy[nu - 1] == 0 && nextf[nu - 1])
+ {
+ bcoalesce (nu);
+ if (nextf[nu] != 0)
+ goto morecore_done;
+ }
+
+ /* Take at least a page, and figure out how many blocks of the requested
+ size we're getting. */
+ if (siz <= pagesz)
+ {
+ sbrk_amt = pagesz;
+ nblks = sbrk_amt / siz;
+ }
+ else
+ {
+ /* We always want to request an integral multiple of the page size
+ from the kernel, so let's compute whether or not `siz' is such
+ an amount. If it is, we can just request it. If not, we want
+ the smallest integral multiple of pagesize that is larger than
+ `siz' and will satisfy the request. */
+ sbrk_amt = siz & (pagesz - 1);
+ if (sbrk_amt == 0)
+ sbrk_amt = siz;
+ else
+ sbrk_amt = siz + pagesz - sbrk_amt;
+ nblks = 1;
+ }
+
+#ifdef MALLOC_STATS
+ _mstats.nsbrk++;
+ _mstats.tsbrk += sbrk_amt;
+#endif
+
+ mp = (union mhead *) sbrk (sbrk_amt);
+
+ /* Totally out of memory. */
+ if ((long)mp == -1)
+ goto morecore_done;
+
+ memtop += sbrk_amt;
+
+ /* shouldn't happen, but just in case -- require 8-byte alignment */
+ if ((long)mp & MALIGN_MASK)
+ {
+ mp = (union mhead *) (((long)mp + MALIGN_MASK) & ~MALIGN_MASK);
+ nblks--;
+ }
+
+ /* save new header and link the nblks blocks together */
+ nextf[nu] = mp;
+ while (1)
+ {
+ mp->mh_alloc = ISFREE;
+ mp->mh_index = nu;
+ if (--nblks <= 0) break;
+ CHAIN (mp) = (union mhead *)((char *)mp + siz);
+ mp = (union mhead *)((char *)mp + siz);
+ }
+ CHAIN (mp) = 0;
+
+morecore_done:
+ if (blocked_sigs)
+ unblock_signals (&set, &oset);
+}
+
+static void
+malloc_debug_dummy ()
+{
+ write (1, "malloc_debug_dummy\n", 19);
+}
+
+#define PREPOP_BIN 2
+#define PREPOP_SIZE 32
+
+static int
+pagealign ()
+{
+ register int nunits;
+ register union mhead *mp;
+ long sbrk_needed;
+ char *curbrk;
+
+ pagesz = getpagesize ();
+ if (pagesz < 1024)
+ pagesz = 1024;
+
+ /* OK, how much do we need to allocate to make things page-aligned?
+ Some of this partial page will be wasted space, but we'll use as
+ much as we can. Once we figure out how much to advance the break
+ pointer, go ahead and do it. */
+ memtop = curbrk = sbrk (0);
+ sbrk_needed = pagesz - ((long)curbrk & (pagesz - 1)); /* sbrk(0) % pagesz */
+ if (sbrk_needed < 0)
+ sbrk_needed += pagesz;
+
+ /* Now allocate the wasted space. */
+ if (sbrk_needed)
+ {
+#ifdef MALLOC_STATS
+ _mstats.nsbrk++;
+ _mstats.tsbrk += sbrk_needed;
+#endif
+ curbrk = sbrk (sbrk_needed);
+ if ((long)curbrk == -1)
+ return -1;
+ memtop += sbrk_needed;
+
+ /* Take the memory which would otherwise be wasted and populate the most
+ popular bin (2 == 32 bytes) with it. Add whatever we need to curbrk
+ to make things 32-byte aligned, compute how many 32-byte chunks we're
+ going to get, and set up the bin. */
+ curbrk += sbrk_needed & (PREPOP_SIZE - 1);
+ sbrk_needed -= sbrk_needed & (PREPOP_SIZE - 1);
+ nunits = sbrk_needed / PREPOP_SIZE;
+
+ if (nunits > 0)
+ {
+ mp = (union mhead *)curbrk;
+
+ nextf[PREPOP_BIN] = mp;
+ while (1)
+ {
+ mp->mh_alloc = ISFREE;
+ mp->mh_index = PREPOP_BIN;
+ if (--nunits <= 0) break;
+ CHAIN(mp) = (union mhead *)((char *)mp + PREPOP_SIZE);
+ mp = (union mhead *)((char *)mp + PREPOP_SIZE);
+ }
+ CHAIN(mp) = 0;
+ }
+ }
+
+ /* compute which bin corresponds to the page size. */
+ for (nunits = 7; nunits < NBUCKETS; nunits++)
+ if (pagesz <= binsize(nunits))
+ break;
+ pagebucket = nunits;
+
+ return 0;
+}
+
+static PTR_T
+internal_malloc (n, file, line, flags) /* get a block */
+ size_t n;
+ const char *file;
+ int line, flags;
+{
+ register union mhead *p;
+ register int nunits;
+ register char *m, *z;
+ long nbytes;
+ mguard_t mg;
+
+ /* Get the system page size and align break pointer so future sbrks will
+ be page-aligned. The page size must be at least 1K -- anything
+ smaller is increased. */
+ if (pagesz == 0)
+ if (pagealign () < 0)
+ return ((PTR_T)NULL);
+
+ /* Figure out how many bytes are required, rounding up to the nearest
+ multiple of 8, then figure out which nextf[] area to use. Try to
+ be smart about where to start searching -- if the number of bytes
+ needed is greater than the page size, we can start at pagebucket. */
+ nbytes = ALLOCATED_BYTES(n);
+ nunits = (nbytes <= (pagesz >> 1)) ? STARTBUCK : pagebucket;
+ for ( ; nunits < NBUCKETS; nunits++)
+ if (nbytes <= binsize(nunits))
+ break;
+
+ /* Silently reject too-large requests. */
+ if (nunits >= NBUCKETS)
+ return ((PTR_T) NULL);
+
+ /* In case this is reentrant use of malloc from signal handler,
+ pick a block size that no other malloc level is currently
+ trying to allocate. That's the easiest harmless way not to
+ interfere with the other level of execution. */
+#ifdef MALLOC_STATS
+ if (busy[nunits]) _mstats.nrecurse++;
+#endif
+ while (busy[nunits]) nunits++;
+ busy[nunits] = 1;
+
+ if (nunits > maxbuck)
+ maxbuck = nunits;
+
+ /* If there are no blocks of the appropriate size, go get some */
+ if (nextf[nunits] == 0)
+ morecore (nunits);
+
+ /* Get one block off the list, and set the new list head */
+ if ((p = nextf[nunits]) == NULL)
+ {
+ busy[nunits] = 0;
+ return NULL;
+ }
+ nextf[nunits] = CHAIN (p);
+ busy[nunits] = 0;
+
+ /* Check for free block clobbered */
+ /* If not for this check, we would gobble a clobbered free chain ptr
+ and bomb out on the NEXT allocate of this size block */
+ if (p->mh_alloc != ISFREE || p->mh_index != nunits)
+ xbotch ((PTR_T)(p+1), 0, _("malloc: block on free list clobbered"), file, line);
+
+ /* Fill in the info, and set up the magic numbers for range checking. */
+ p->mh_alloc = ISALLOC;
+ p->mh_magic2 = MAGIC2;
+ p->mh_nbytes = n;
+
+ /* End guard */
+ mg.i = n;
+ z = mg.s;
+ m = (char *) (p + 1) + n;
+ *m++ = *z++, *m++ = *z++, *m++ = *z++, *m++ = *z++;
+
+#ifdef MEMSCRAMBLE
+ if (n)
+ MALLOC_MEMSET ((char *)(p + 1), 0xdf, n); /* scramble previous contents */
+#endif
+#ifdef MALLOC_STATS
+ _mstats.nmalloc[nunits]++;
+ _mstats.tmalloc[nunits]++;
+ _mstats.nmal++;
+ _mstats.bytesreq += n;
+#endif /* MALLOC_STATS */
+
+#ifdef MALLOC_TRACE
+ if (malloc_trace && (flags & MALLOC_NOTRACE) == 0)
+ mtrace_alloc ("malloc", p + 1, n, file, line);
+ else if (_malloc_trace_buckets[nunits])
+ mtrace_alloc ("malloc", p + 1, n, file, line);
+#endif
+
+#ifdef MALLOC_REGISTER
+ if (malloc_register && (flags & MALLOC_NOREG) == 0)
+ mregister_alloc ("malloc", p + 1, n, file, line);
+#endif
+
+#ifdef MALLOC_WATCH
+ if (_malloc_nwatch > 0)
+ _malloc_ckwatch (p + 1, file, line, W_ALLOC, n);
+#endif
+
+ return (PTR_T) (p + 1);
+}
+
+static void
+internal_free (mem, file, line, flags)
+ PTR_T mem;
+ const char *file;
+ int line, flags;
+{
+ register union mhead *p;
+ register char *ap, *z;
+ register int nunits;
+ register unsigned int nbytes;
+ int ubytes; /* caller-requested size */
+ mguard_t mg;
+
+ if ((ap = (char *)mem) == 0)
+ return;
+
+ p = (union mhead *) ap - 1;
+
+ if (p->mh_alloc == ISMEMALIGN)
+ {
+ ap -= p->mh_nbytes;
+ p = (union mhead *) ap - 1;
+ }
+
+#if defined (MALLOC_TRACE) || defined (MALLOC_REGISTER)
+ if (malloc_trace || malloc_register)
+ ubytes = p->mh_nbytes;
+#endif
+
+ if (p->mh_alloc != ISALLOC)
+ {
+ if (p->mh_alloc == ISFREE)
+ xbotch (mem, ERR_DUPFREE,
+ _("free: called with already freed block argument"), file, line);
+ else
+ xbotch (mem, ERR_UNALLOC,
+ _("free: called with unallocated block argument"), file, line);
+ }
+
+ ASSERT (p->mh_magic2 == MAGIC2);
+
+ nunits = p->mh_index;
+ nbytes = ALLOCATED_BYTES(p->mh_nbytes);
+ /* Since the sizeof(u_bits32_t) bytes before the memory handed to the user
+ are now used for the number of bytes allocated, a simple check of
+ mh_magic2 is no longer sufficient to catch things like p[-1] = 'x'.
+ We sanity-check the value of mh_nbytes against the size of the blocks
+ in the appropriate bucket before we use it. This can still cause problems
+ and obscure errors if mh_nbytes is wrong but still within range; the
+ checks against the size recorded at the end of the chunk will probably
+ fail then. Using MALLOC_REGISTER will help here, since it saves the
+ original number of bytes requested. */
+
+ if (IN_BUCKET(nbytes, nunits) == 0)
+ xbotch (mem, ERR_UNDERFLOW,
+ _("free: underflow detected; mh_nbytes out of range"), file, line);
+
+ ap += p->mh_nbytes;
+ z = mg.s;
+ *z++ = *ap++, *z++ = *ap++, *z++ = *ap++, *z++ = *ap++;
+ if (mg.i != p->mh_nbytes)
+ xbotch (mem, ERR_ASSERT_FAILED, _("free: start and end chunk sizes differ"), file, line);
+
+#if 1
+ if (nunits >= LESSCORE_MIN && ((char *)p + binsize(nunits) == memtop))
+#else
+ if (((char *)p + binsize(nunits) == memtop) && nunits >= LESSCORE_MIN)
+#endif
+ {
+ /* If above LESSCORE_FRC, give back unconditionally. This should be set
+ high enough to be infrequently encountered. If between LESSCORE_MIN
+ and LESSCORE_FRC, call lesscore if the bucket is marked as busy or if
+ there's already a block on the free list. */
+ if ((nunits >= LESSCORE_FRC) || busy[nunits] || nextf[nunits] != 0)
+ {
+ lesscore (nunits);
+ /* keeps the tracing and registering code in one place */
+ goto free_return;
+ }
+ }
+
+#ifdef MEMSCRAMBLE
+ if (p->mh_nbytes)
+ MALLOC_MEMSET (mem, 0xcf, p->mh_nbytes);
+#endif
+
+ ASSERT (nunits < NBUCKETS);
+
+ if (busy[nunits] == 1)
+ {
+ xsplit (p, nunits); /* split block and add to different chain */
+ goto free_return;
+ }
+
+ p->mh_alloc = ISFREE;
+ /* Protect against signal handlers calling malloc. */
+ busy[nunits] = 1;
+ /* Put this block on the free list. */
+ CHAIN (p) = nextf[nunits];
+ nextf[nunits] = p;
+ busy[nunits] = 0;
+
+free_return:
+ ; /* Empty statement in case this is the end of the function */
+
+#ifdef MALLOC_STATS
+ _mstats.nmalloc[nunits]--;
+ _mstats.nfre++;
+#endif /* MALLOC_STATS */
+
+#ifdef MALLOC_TRACE
+ if (malloc_trace && (flags & MALLOC_NOTRACE) == 0)
+ mtrace_free (mem, ubytes, file, line);
+ else if (_malloc_trace_buckets[nunits])
+ mtrace_free (mem, ubytes, file, line);
+#endif
+
+#ifdef MALLOC_REGISTER
+ if (malloc_register && (flags & MALLOC_NOREG) == 0)
+ mregister_free (mem, ubytes, file, line);
+#endif
+
+#ifdef MALLOC_WATCH
+ if (_malloc_nwatch > 0)
+ _malloc_ckwatch (mem, file, line, W_FREE, ubytes);
+#endif
+}
+
+static PTR_T
+internal_realloc (mem, n, file, line, flags)
+ PTR_T mem;
+ register size_t n;
+ const char *file;
+ int line, flags;
+{
+ register union mhead *p;
+ register u_bits32_t tocopy;
+ register unsigned int nbytes;
+ register int nunits;
+ register char *m, *z;
+ mguard_t mg;
+
+#ifdef MALLOC_STATS
+ _mstats.nrealloc++;
+#endif
+
+ if (n == 0)
+ {
+ internal_free (mem, file, line, MALLOC_INTERNAL);
+ return (NULL);
+ }
+ if ((p = (union mhead *) mem) == 0)
+ return internal_malloc (n, file, line, MALLOC_INTERNAL);
+
+ p--;
+ nunits = p->mh_index;
+ ASSERT (nunits < NBUCKETS);
+
+ if (p->mh_alloc != ISALLOC)
+ xbotch (mem, ERR_UNALLOC,
+ _("realloc: called with unallocated block argument"), file, line);
+
+ ASSERT (p->mh_magic2 == MAGIC2);
+ nbytes = ALLOCATED_BYTES(p->mh_nbytes);
+ /* Since the sizeof(u_bits32_t) bytes before the memory handed to the user
+ are now used for the number of bytes allocated, a simple check of
+ mh_magic2 is no longer sufficient to catch things like p[-1] = 'x'.
+ We sanity-check the value of mh_nbytes against the size of the blocks
+ in the appropriate bucket before we use it. This can still cause problems
+ and obscure errors if mh_nbytes is wrong but still within range; the
+ checks against the size recorded at the end of the chunk will probably
+ fail then. Using MALLOC_REGISTER will help here, since it saves the
+ original number of bytes requested. */
+ if (IN_BUCKET(nbytes, nunits) == 0)
+ xbotch (mem, ERR_UNDERFLOW,
+ _("realloc: underflow detected; mh_nbytes out of range"), file, line);
+
+ m = (char *)mem + (tocopy = p->mh_nbytes);
+ z = mg.s;
+ *z++ = *m++, *z++ = *m++, *z++ = *m++, *z++ = *m++;
+ if (mg.i != p->mh_nbytes)
+ xbotch (mem, ERR_ASSERT_FAILED, _("realloc: start and end chunk sizes differ"), file, line);
+
+#ifdef MALLOC_WATCH
+ if (_malloc_nwatch > 0)
+ _malloc_ckwatch (p + 1, file, line, W_REALLOC, n);
+#endif
+#ifdef MALLOC_STATS
+ _mstats.bytesreq += (n < tocopy) ? 0 : n - tocopy;
+#endif
+
+ /* See if desired size rounds to same power of 2 as actual size. */
+ nbytes = ALLOCATED_BYTES(n);
+
+ /* If ok, use the same block, just marking its size as changed. */
+ if (RIGHT_BUCKET(nbytes, nunits))
+ {
+#if 0
+ m = (char *)mem + p->mh_nbytes;
+#else
+ /* Compensate for increment above. */
+ m -= 4;
+#endif
+ *m++ = 0; *m++ = 0; *m++ = 0; *m++ = 0;
+ m = (char *)mem + (p->mh_nbytes = n);
+
+ mg.i = n;
+ z = mg.s;
+ *m++ = *z++, *m++ = *z++, *m++ = *z++, *m++ = *z++;
+
+ return mem;
+ }
+
+ if (n < tocopy)
+ tocopy = n;
+
+#ifdef MALLOC_STATS
+ _mstats.nrcopy++;
+#endif
+
+ if ((m = internal_malloc (n, file, line, MALLOC_INTERNAL|MALLOC_NOTRACE|MALLOC_NOREG)) == 0)
+ return 0;
+ FASTCOPY (mem, m, tocopy);
+ internal_free (mem, file, line, MALLOC_INTERNAL);
+
+#ifdef MALLOC_TRACE
+ if (malloc_trace && (flags & MALLOC_NOTRACE) == 0)
+ mtrace_alloc ("realloc", m, n, file, line);
+ else if (_malloc_trace_buckets[nunits])
+ mtrace_alloc ("realloc", m, n, file, line);
+#endif
+
+#ifdef MALLOC_REGISTER
+ if (malloc_register && (flags & MALLOC_NOREG) == 0)
+ mregister_alloc ("realloc", m, n, file, line);
+#endif
+
+#ifdef MALLOC_WATCH
+ if (_malloc_nwatch > 0)
+ _malloc_ckwatch (m, file, line, W_RESIZED, n);
+#endif
+
+ return m;
+}
+
+static PTR_T
+internal_memalign (alignment, size, file, line, flags)
+ size_t alignment;
+ size_t size;
+ const char *file;
+ int line, flags;
+{
+ register char *ptr;
+ register char *aligned;
+ register union mhead *p;
+
+ ptr = internal_malloc (size + alignment, file, line, MALLOC_INTERNAL);
+
+ if (ptr == 0)
+ return 0;
+ /* If entire block has the desired alignment, just accept it. */
+ if (((long) ptr & (alignment - 1)) == 0)
+ return ptr;
+ /* Otherwise, get address of byte in the block that has that alignment. */
+#if 0
+ aligned = (char *) (((long) ptr + alignment - 1) & -alignment);
+#else
+ aligned = (char *) (((long) ptr + alignment - 1) & (~alignment + 1));
+#endif
+
+ /* Store a suitable indication of how to free the block,
+ so that free can find the true beginning of it. */
+ p = (union mhead *) aligned - 1;
+ p->mh_nbytes = aligned - ptr;
+ p->mh_alloc = ISMEMALIGN;
+
+ return aligned;
+}
+
+#if !defined (NO_VALLOC)
+/* This runs into trouble with getpagesize on HPUX, and Multimax machines.
+ Patching out seems cleaner than the ugly fix needed. */
+static PTR_T
+internal_valloc (size, file, line, flags)
+ size_t size;
+ const char *file;
+ int line, flags;
+{
+ return internal_memalign (getpagesize (), size, file, line, flags|MALLOC_INTERNAL);
+}
+#endif /* !NO_VALLOC */
+
+#ifndef NO_CALLOC
+static PTR_T
+internal_calloc (n, s, file, line, flags)
+ size_t n, s;
+ const char *file;
+ int line, flags;
+{
+ size_t total;
+ PTR_T result;
+
+ total = n * s;
+ result = internal_malloc (total, file, line, flags|MALLOC_INTERNAL);
+ if (result)
+ memset (result, 0, total);
+ return result;
+}
+
+static void
+internal_cfree (p, file, line, flags)
+ PTR_T p;
+ const char *file;
+ int line, flags;
+{
+ internal_free (p, file, line, flags|MALLOC_INTERNAL);
+}
+#endif /* !NO_CALLOC */
+
+#ifdef MALLOC_STATS
+int
+malloc_free_blocks (size)
+ int size;
+{
+ int nfree;
+ register union mhead *p;
+
+ nfree = 0;
+ for (p = nextf[size]; p; p = CHAIN (p))
+ nfree++;
+
+ return nfree;
+}
+#endif
+
+#if defined (MALLOC_WRAPFUNCS)
+PTR_T
+sh_malloc (bytes, file, line)
+ size_t bytes;
+ const char *file;
+ int line;
+{
+ return internal_malloc (bytes, file, line, MALLOC_WRAPPER);
+}
+
+PTR_T
+sh_realloc (ptr, size, file, line)
+ PTR_T ptr;
+ size_t size;
+ const char *file;
+ int line;
+{
+ return internal_realloc (ptr, size, file, line, MALLOC_WRAPPER);
+}
+
+void
+sh_free (mem, file, line)
+ PTR_T mem;
+ const char *file;
+ int line;
+{
+ internal_free (mem, file, line, MALLOC_WRAPPER);
+}
+
+PTR_T
+sh_memalign (alignment, size, file, line)
+ size_t alignment;
+ size_t size;
+ const char *file;
+ int line;
+{
+ return internal_memalign (alignment, size, file, line, MALLOC_WRAPPER);
+}
+
+#ifndef NO_CALLOC
+PTR_T
+sh_calloc (n, s, file, line)
+ size_t n, s;
+ const char *file;
+ int line;
+{
+ return internal_calloc (n, s, file, line, MALLOC_WRAPPER);
+}
+
+void
+sh_cfree (mem, file, line)
+ PTR_T mem;
+ const char *file;
+ int line;
+{
+ internal_cfree (mem, file, line, MALLOC_WRAPPER);
+}
+#endif
+
+#ifndef NO_VALLOC
+PTR_T
+sh_valloc (size, file, line)
+ size_t size;
+ const char *file;
+ int line;
+{
+ return internal_valloc (size, file, line, MALLOC_WRAPPER);
+}
+#endif /* !NO_VALLOC */
+
+#endif /* MALLOC_WRAPFUNCS */
+
+/* Externally-available functions that call their internal counterparts. */
+
+PTR_T
+malloc (size)
+ size_t size;
+{
+ return internal_malloc (size, (char *)NULL, 0, 0);
+}
+
+PTR_T
+realloc (mem, nbytes)
+ PTR_T mem;
+ size_t nbytes;
+{
+ return internal_realloc (mem, nbytes, (char *)NULL, 0, 0);
+}
+
+void
+free (mem)
+ PTR_T mem;
+{
+ internal_free (mem, (char *)NULL, 0, 0);
+}
+
+PTR_T
+memalign (alignment, size)
+ size_t alignment;
+ size_t size;
+{
+ return internal_memalign (alignment, size, (char *)NULL, 0, 0);
+}
+
+#ifndef NO_VALLOC
+PTR_T
+valloc (size)
+ size_t size;
+{
+ return internal_valloc (size, (char *)NULL, 0, 0);
+}
+#endif
+
+#ifndef NO_CALLOC
+PTR_T
+calloc (n, s)
+ size_t n, s;
+{
+ return internal_calloc (n, s, (char *)NULL, 0, 0);
+}
+
+void
+cfree (mem)
+ PTR_T mem;
+{
+ internal_cfree (mem, (char *)NULL, 0, 0);
+}
+#endif
diff --git a/lib/malloc/mstats.h b/lib/malloc/mstats.h
new file mode 100644
index 0000000..11389ff
--- /dev/null
+++ b/lib/malloc/mstats.h
@@ -0,0 +1,110 @@
+/* mstats.h - definitions for malloc statistics */
+
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne-Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _MSTATS_H
+#define _MSTATS_H
+
+#include "imalloc.h"
+
+#ifdef MALLOC_STATS
+
+#ifndef NBUCKETS
+# define NBUCKETS 30
+#endif
+
+/*
+ * NMALLOC[i] is the difference between the number of mallocs and frees
+ * for a given block size. TMALLOC[i] is the total number of mallocs for
+ * a given block size. NMORECORE[i] is the total number of calls to
+ * morecore(i). NLESSCORE[i] is the total number of calls to lesscore(i).
+ *
+ * NMAL and NFRE are counts of the number of calls to malloc() and free(),
+ * respectively. NREALLOC is the total number of calls to realloc();
+ * NRCOPY is the number of times realloc() had to allocate new memory and
+ * copy to it. NRECURSE is a count of the number of recursive calls to
+ * malloc() for the same bucket size, which can be caused by calls to
+ * malloc() from a signal handler.
+ *
+ * NSBRK is the number of calls to sbrk() (whether by morecore() or for
+ * alignment); TSBRK is the total number of bytes requested from the kernel
+ * with sbrk().
+ *
+ * BYTESUSED is the total number of bytes consumed by blocks currently in
+ * use; BYTESFREE is the total number of bytes currently on all of the free
+ * lists. BYTESREQ is the total number of bytes requested by the caller
+ * via calls to malloc() and realloc().
+ *
+ * TBSPLIT is the number of times a larger block was split to satisfy a
+ * smaller request. NSPLIT[i] is the number of times a block of size I was
+ * split.
+ *
+ * TBCOALESCE is the number of times two adjacent smaller blocks off the free
+ * list were combined to satisfy a larger request.
+ */
+struct _malstats {
+ int nmalloc[NBUCKETS];
+ int tmalloc[NBUCKETS];
+ int nmorecore[NBUCKETS];
+ int nlesscore[NBUCKETS];
+ int nmal;
+ int nfre;
+ int nrealloc;
+ int nrcopy;
+ int nrecurse;
+ int nsbrk;
+ bits32_t tsbrk;
+ bits32_t bytesused;
+ bits32_t bytesfree;
+ u_bits32_t bytesreq;
+ int tbsplit;
+ int nsplit[NBUCKETS];
+ int tbcoalesce;
+ int ncoalesce[NBUCKETS];
+};
+
+/* Return statistics describing allocation of blocks of size BLOCKSIZE.
+ NFREE is the number of free blocks for this allocation size. NUSED
+ is the number of blocks in use. NMAL is the number of requests for
+ blocks of size BLOCKSIZE. NMORECORE is the number of times we had
+ to call MORECORE to repopulate the free list for this bucket.
+ NLESSCORE is the number of times we gave memory back to the system
+ from this bucket. NSPLIT is the number of times a block of this size
+ was split to satisfy a smaller request. NCOALESCE is the number of
+ times two blocks of this size were combined to satisfy a larger
+ request. */
+struct bucket_stats {
+ u_bits32_t blocksize;
+ int nfree;
+ int nused;
+ int nmal;
+ int nmorecore;
+ int nlesscore;
+ int nsplit;
+ int ncoalesce;
+};
+
+extern struct bucket_stats malloc_bucket_stats __P((int));
+extern struct _malstats malloc_stats __P((void));
+extern void print_malloc_stats __P((char *));
+extern void trace_malloc_stats __P((char *, char *));
+
+#endif /* MALLOC_STATS */
+
+#endif /* _MSTATS_H */
diff --git a/lib/malloc/shmalloc.h b/lib/malloc/shmalloc.h
new file mode 100644
index 0000000..2dac615
--- /dev/null
+++ b/lib/malloc/shmalloc.h
@@ -0,0 +1,70 @@
+/* Functions (currently) for use by the shell to do malloc debugging and
+ tracking. */
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne-Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _SH_MALLOC_H
+#define _SH_MALLOC_H
+
+#ifndef __P
+# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus)
+# define __P(protos) protos
+# else
+# define __P(protos) ()
+# endif
+#endif
+
+/* Generic pointer type. */
+#ifndef PTR_T
+
+#if defined (__STDC__)
+# define PTR_T void *
+#else
+# define PTR_T char *
+#endif
+
+#endif /* PTR_T */
+
+
+extern PTR_T sh_malloc __P((size_t, const char *, int));
+extern PTR_T sh_realloc __P((PTR_T, size_t, const char *, int));
+extern void sh_free __P((PTR_T, const char *, int));
+
+extern PTR_T sh_memalign __P((size_t, size_t, const char *, int));
+
+extern PTR_T sh_calloc __P((size_t, size_t, const char *, int));
+extern void sh_cfree __P((PTR_T, const char *, int));
+
+extern PTR_T sh_valloc __P((size_t, const char *, int));
+
+/* trace.c */
+extern int malloc_set_trace __P((int));
+extern void malloc_set_tracefp (); /* full prototype requires stdio.h */
+extern void malloc_set_tracefn __P((char *, char *));
+
+/* table.c */
+extern void mregister_dump_table __P((void));
+extern void mregister_table_init __P((void));
+extern int malloc_set_register __P((int));
+
+/* stats.c */
+extern void print_malloc_stats __P((char *));
+extern void fprint_malloc_stats (); /* full prototype requires stdio.h */
+extern void trace_malloc_stats __P((char *, char *));
+
+#endif
diff --git a/lib/malloc/stats.c b/lib/malloc/stats.c
new file mode 100644
index 0000000..8665918
--- /dev/null
+++ b/lib/malloc/stats.c
@@ -0,0 +1,205 @@
+/* stats.c - malloc statistics */
+
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne-Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include "imalloc.h"
+
+#ifdef MALLOC_STATS
+
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#include <string.h>
+
+#include "mstats.h"
+
+extern int malloc_free_blocks __P((int));
+
+extern struct _malstats _mstats;
+
+extern FILE *_imalloc_fopen __P((char *, char *, char *, char *, size_t));
+
+struct bucket_stats
+malloc_bucket_stats (size)
+ int size;
+{
+ struct bucket_stats v;
+
+ v.nfree = 0;
+
+ if (size < 0 || size >= NBUCKETS)
+ {
+ v.blocksize = 0;
+ v.nused = v.nmal = v.nmorecore = v.nlesscore = v.nsplit = 0;
+ return v;
+ }
+
+ v.blocksize = 1 << (size + 3);
+ v.nused = _mstats.nmalloc[size];
+ v.nmal = _mstats.tmalloc[size];
+ v.nmorecore = _mstats.nmorecore[size];
+ v.nlesscore = _mstats.nlesscore[size];
+ v.nsplit = _mstats.nsplit[size];
+ v.ncoalesce = _mstats.ncoalesce[size];
+
+ v.nfree = malloc_free_blocks (size); /* call back to malloc.c */
+
+ return v;
+}
+
+/* Return a copy of _MSTATS, with two additional fields filled in:
+ BYTESFREE is the total number of bytes on free lists. BYTESUSED
+ is the total number of bytes in use. These two fields are fairly
+ expensive to compute, so we do it only when asked to. */
+struct _malstats
+malloc_stats ()
+{
+ struct _malstats result;
+ struct bucket_stats v;
+ register int i;
+
+ result = _mstats;
+ result.bytesused = result.bytesfree = 0;
+ for (i = 0; i < NBUCKETS; i++)
+ {
+ v = malloc_bucket_stats (i);
+ result.bytesfree += v.nfree * v.blocksize;
+ result.bytesused += v.nused * v.blocksize;
+ }
+ return (result);
+}
+
+static void
+_print_malloc_stats (s, fp)
+ char *s;
+ FILE *fp;
+{
+ register int i;
+ unsigned long totused, totfree;
+ struct bucket_stats v;
+
+ fprintf (fp, "Memory allocation statistics: %s\n size\tfree\tin use\ttotal\tmorecore lesscore split\tcoalesce\n", s ? s : "");
+ for (i = totused = totfree = 0; i < NBUCKETS; i++)
+ {
+ v = malloc_bucket_stats (i);
+ if (v.nmal > 0)
+ fprintf (fp, "%8lu\t%4d\t%6d\t%5d\t%8d\t%d %5d %8d\n", (unsigned long)v.blocksize, v.nfree, v.nused, v.nmal, v.nmorecore, v.nlesscore, v.nsplit, v.ncoalesce);
+ totfree += v.nfree * v.blocksize;
+ totused += v.nused * v.blocksize;
+ }
+ fprintf (fp, "\nTotal bytes in use: %lu, total bytes free: %lu\n",
+ totused, totfree);
+ fprintf (fp, "\nTotal bytes requested by application: %lu\n", _mstats.bytesreq);
+ fprintf (fp, "Total mallocs: %d, total frees: %d, total reallocs: %d (%d copies)\n",
+ _mstats.nmal, _mstats.nfre, _mstats.nrealloc, _mstats.nrcopy);
+ fprintf (fp, "Total sbrks: %d, total bytes via sbrk: %d\n",
+ _mstats.nsbrk, _mstats.tsbrk);
+ fprintf (fp, "Total blocks split: %d, total block coalesces: %d\n",
+ _mstats.tbsplit, _mstats.tbcoalesce);
+}
+
+void
+print_malloc_stats (s)
+ char *s;
+{
+ _print_malloc_stats (s, stderr);
+}
+
+void
+fprint_malloc_stats (s, fp)
+ char *s;
+ FILE *fp;
+{
+ _print_malloc_stats (s, fp);
+}
+
+#define TRACEROOT "/var/tmp/maltrace/stats."
+
+void
+trace_malloc_stats (s, fn)
+ char *s, *fn;
+{
+ FILE *fp;
+ char defname[sizeof (TRACEROOT) + 64];
+ static char mallbuf[1024];
+
+ fp = _imalloc_fopen (s, fn, TRACEROOT, defname, sizeof (defname));
+ if (fp)
+ {
+ setvbuf (fp, mallbuf, _IOFBF, sizeof (mallbuf));
+ _print_malloc_stats (s, fp);
+ fflush(fp);
+ fclose(fp);
+ }
+}
+
+#endif /* MALLOC_STATS */
+
+#if defined (MALLOC_STATS) || defined (MALLOC_TRACE)
+FILE *
+_imalloc_fopen (s, fn, def, defbuf, defsiz)
+ char *s;
+ char *fn;
+ char *def;
+ char *defbuf;
+ size_t defsiz;
+{
+ char fname[1024];
+ long l;
+ FILE *fp;
+
+ l = (long)getpid ();
+ if (fn == 0)
+ {
+ sprintf (defbuf, "%s%ld", def, l);
+ fp = fopen(defbuf, "w");
+ }
+ else
+ {
+ char *p, *q, *r;
+ char pidbuf[32];
+ int sp;
+
+ sprintf (pidbuf, "%ld", l);
+ if ((strlen (pidbuf) + strlen (fn) + 2) >= sizeof (fname))
+ return ((FILE *)0);
+ for (sp = 0, p = fname, q = fn; *q; )
+ {
+ if (sp == 0 && *q == '%' && q[1] == 'p')
+ {
+ sp = 1;
+ for (r = pidbuf; *r; )
+ *p++ = *r++;
+ q += 2;
+ }
+ else
+ *p++ = *q++;
+ }
+ *p = '\0';
+ fp = fopen (fname, "w");
+ }
+
+ return fp;
+}
+#endif /* MALLOC_STATS || MALLOC_TRACE */
diff --git a/lib/malloc/stub.c b/lib/malloc/stub.c
new file mode 100644
index 0000000..a60a624
--- /dev/null
+++ b/lib/malloc/stub.c
@@ -0,0 +1,22 @@
+/* Copyright (C) 1993-2003 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+void
+bash_malloc_stub()
+{
+}
diff --git a/lib/malloc/table.c b/lib/malloc/table.c
new file mode 100644
index 0000000..cf89b3c
--- /dev/null
+++ b/lib/malloc/table.c
@@ -0,0 +1,292 @@
+/* table.c - bookkeeping functions for allocated memory */
+
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <string.h>
+
+#include "imalloc.h"
+#include "table.h"
+
+extern int malloc_register;
+
+#ifdef MALLOC_REGISTER
+
+#define FIND_ALLOC 0x01 /* allocate new entry or find existing */
+#define FIND_EXIST 0x02 /* find existing entry */
+
+static int table_count = 0;
+static int table_allocated = 0;
+static mr_table_t mem_table[REG_TABLE_SIZE];
+static mr_table_t mem_overflow;
+
+/*
+ * NOTE: taken from dmalloc (http://dmalloc.com) and modified.
+ */
+static unsigned int
+mt_hash (key)
+ const PTR_T key;
+{
+ unsigned int a, b, c;
+ unsigned long x;
+
+ /* set up the internal state */
+ a = 0x9e3779b9; /* the golden ratio; an arbitrary value */
+ x = (unsigned long)key; /* truncation is OK */
+ b = x >> 8;
+ c = x >> 3; /* XXX - was >> 4 */
+
+ HASH_MIX(a, b, c);
+ return c;
+}
+
+#if 0
+static unsigned int
+which_bucket (mem)
+ PTR_T mem;
+{
+ return (mt_hash ((unsigned char *)mem) & (REG_TABLE_SIZE-1));
+}
+#else
+#define which_bucket(mem) (mt_hash ((unsigned char *)(mem)) & (REG_TABLE_SIZE-1));
+#endif
+
+static mr_table_t *
+find_entry (mem, flags)
+ PTR_T mem;
+ int flags;
+{
+ unsigned int bucket;
+ register mr_table_t *tp;
+ mr_table_t *endp, *lastp;
+
+ if (mem_overflow.mem == mem)
+ return (&mem_overflow);
+
+ bucket = which_bucket (mem); /* get initial hash */
+ tp = endp = mem_table + bucket;
+ lastp = mem_table + REG_TABLE_SIZE;
+
+ while (1)
+ {
+ if (tp->mem == mem)
+ return (tp);
+ if (tp->mem == 0 && (flags & FIND_ALLOC))
+ {
+ table_count++;
+ return (tp);
+ }
+
+ tp++;
+
+ if (tp == lastp) /* wrap around */
+ tp = mem_table;
+
+ if (tp == endp && (flags & FIND_EXIST))
+ return ((mr_table_t *)NULL);
+
+ if (tp == endp && (flags & FIND_ALLOC))
+ break;
+ }
+
+ /* oops. table is full. replace an existing free entry. */
+ do
+ {
+ /* If there are no free entries, punt right away without searching. */
+ if (table_allocated == REG_TABLE_SIZE)
+ break;
+
+ if (tp->flags & MT_FREE)
+ {
+ memset(tp, 0, sizeof (mr_table_t));
+ return (tp);
+ }
+ tp++;
+
+ if (tp == lastp)
+ tp = mem_table;
+ }
+ while (tp != endp);
+
+ /* wow. entirely full. return mem_overflow dummy entry. */
+ tp = &mem_overflow;
+ memset (tp, 0, sizeof (mr_table_t));
+ return tp;
+}
+
+mr_table_t *
+mr_table_entry (mem)
+ PTR_T mem;
+{
+ return (find_entry (mem, FIND_EXIST));
+}
+
+void
+mregister_describe_mem (mem, fp)
+ PTR_T mem;
+ FILE *fp;
+{
+ mr_table_t *entry;
+
+ entry = find_entry (mem, FIND_EXIST);
+ if (entry == 0)
+ return;
+ fprintf (fp, "malloc: %p: %s: last %s from %s:%d\n",
+ mem,
+ (entry->flags & MT_ALLOC) ? "allocated" : "free",
+ (entry->flags & MT_ALLOC) ? "allocated" : "freed",
+ entry->file ? entry->file : "unknown",
+ entry->line);
+}
+
+void
+mregister_alloc (tag, mem, size, file, line)
+ const char *tag;
+ PTR_T mem;
+ size_t size;
+ const char *file;
+ int line;
+{
+ mr_table_t *tentry;
+
+ tentry = find_entry (mem, FIND_ALLOC);
+
+ if (tentry == 0)
+ {
+ /* oops. table is full. punt. */
+ fprintf (stderr, _("register_alloc: alloc table is full with FIND_ALLOC?\n"));
+ return;
+ }
+
+ if (tentry->flags & MT_ALLOC)
+ {
+ /* oops. bad bookkeeping. ignore for now */
+ fprintf (stderr, _("register_alloc: %p already in table as allocated?\n"), mem);
+ }
+
+ tentry->mem = mem;
+ tentry->size = size;
+ tentry->func = tag;
+ tentry->flags = MT_ALLOC;
+ tentry->file = file;
+ tentry->line = line;
+ tentry->nalloc++;
+
+ if (tentry != &mem_overflow)
+ table_allocated++;
+}
+
+void
+mregister_free (mem, size, file, line)
+ PTR_T mem;
+ int size;
+ const char *file;
+ int line;
+{
+ mr_table_t *tentry;
+
+ tentry = find_entry (mem, FIND_EXIST);
+ if (tentry == 0)
+ {
+ /* oops. not found. */
+#if 0
+ fprintf (stderr, "register_free: %p not in allocation table?\n", mem);
+#endif
+ return;
+ }
+ if (tentry->flags & MT_FREE)
+ {
+ /* oops. bad bookkeeping. ignore for now */
+ fprintf (stderr, _("register_free: %p already in table as free?\n"), mem);
+ }
+
+ tentry->flags = MT_FREE;
+ tentry->func = "free";
+ tentry->file = file;
+ tentry->line = line;
+ tentry->nfree++;
+
+ if (tentry != &mem_overflow)
+ table_allocated--;
+}
+
+/* If we ever add more flags, this will require changes. */
+static char *
+_entry_flags(x)
+ int x;
+{
+ if (x & MT_FREE)
+ return "free";
+ else if (x & MT_ALLOC)
+ return "allocated";
+ else
+ return "undetermined?";
+}
+
+static void
+_register_dump_table(fp)
+ FILE *fp;
+{
+ register int i;
+ mr_table_t entry;
+
+ for (i = 0; i < REG_TABLE_SIZE; i++)
+ {
+ entry = mem_table[i];
+ if (entry.mem)
+ fprintf (fp, "[%d] %p:%d:%s:%s:%s:%d:%d:%d\n", i,
+ entry.mem, entry.size,
+ _entry_flags(entry.flags),
+ entry.func ? entry.func : "unknown",
+ entry.file ? entry.file : "unknown",
+ entry.line,
+ entry.nalloc, entry.nfree);
+ }
+}
+
+void
+mregister_dump_table()
+{
+ _register_dump_table (stderr);
+}
+
+void
+mregister_table_init ()
+{
+ memset (mem_table, 0, sizeof(mr_table_t) * REG_TABLE_SIZE);
+ memset (&mem_overflow, 0, sizeof (mr_table_t));
+ table_count = 0;
+}
+
+#endif /* MALLOC_REGISTER */
+
+int
+malloc_set_register(n)
+ int n;
+{
+ int old;
+
+ old = malloc_register;
+ malloc_register = n;
+ return old;
+}
diff --git a/lib/malloc/table.h b/lib/malloc/table.h
new file mode 100644
index 0000000..41ce9f7
--- /dev/null
+++ b/lib/malloc/table.h
@@ -0,0 +1,105 @@
+/* table.h - definitions for tables for keeping track of allocated memory */
+
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne-Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _MTABLE_H
+#define _MTABLE_H
+
+#include "imalloc.h"
+
+#ifdef MALLOC_REGISTER
+
+/* values for flags byte. */
+#define MT_ALLOC 0x01
+#define MT_FREE 0x02
+
+/*
+ * Memory table entry.
+ *
+ * MEM is the address of the allocated pointer.
+ * SIZE is the requested allocation size.
+ * FLAGS includes either MT_ALLOC (MEM is allocated) or MT_FREE (MEM is
+ * not allocated). Other flags later.
+ * FUNC is set to the name of the function doing the allocation (from the
+ * `tag' argument to register_alloc().
+ * FILE and LINE are the filename and line number of the last allocation
+ * and free (depending on STATUS) of MEM.
+ * NALLOC and NFREE are incremented on each allocation that returns MEM or
+ * each free of MEM, respectively (way to keep track of memory reuse
+ * and how well the free lists are working).
+ *
+ */
+typedef struct mr_table {
+ PTR_T mem;
+ size_t size;
+ char flags;
+ const char *func;
+ const char *file;
+ int line;
+ int nalloc, nfree;
+} mr_table_t;
+
+#define REG_TABLE_SIZE 8192
+
+extern mr_table_t *mr_table_entry __P((PTR_T));
+extern void mregister_alloc __P((const char *, PTR_T, size_t, const char *, int));
+extern void mregister_free __P((PTR_T, int, const char *, int));
+extern void mregister_describe_mem ();
+extern void mregister_dump_table __P((void));
+extern void mregister_table_init __P((void));
+
+/* NOTE: HASH_MIX taken from dmalloc (http://dmalloc.com) */
+
+/*
+ * void HASH_MIX
+ *
+ * DESCRIPTION:
+ *
+ * Mix 3 32-bit values reversibly. For every delta with one or two
+ * bits set, and the deltas of all three high bits or all three low
+ * bits, whether the original value of a,b,c is almost all zero or is
+ * uniformly distributed.
+ *
+ * If HASH_MIX() is run forward or backward, at least 32 bits in a,b,c
+ * have at least 1/4 probability of changing. If mix() is run
+ * forward, every bit of c will change between 1/3 and 2/3 of the
+ * time. (Well, 22/100 and 78/100 for some 2-bit deltas.)
+ *
+ * HASH_MIX() takes 36 machine instructions, but only 18 cycles on a
+ * superscalar machine (like a Pentium or a Sparc). No faster mixer
+ * seems to work, that's the result of my brute-force search. There
+ * were about 2^68 hashes to choose from. I only tested about a
+ * billion of those.
+ */
+#define HASH_MIX(a, b, c) \
+ do { \
+ a -= b; a -= c; a ^= (c >> 13); \
+ b -= c; b -= a; b ^= (a << 8); \
+ c -= a; c -= b; c ^= (b >> 13); \
+ a -= b; a -= c; a ^= (c >> 12); \
+ b -= c; b -= a; b ^= (a << 16); \
+ c -= a; c -= b; c ^= (b >> 5); \
+ a -= b; a -= c; a ^= (c >> 3); \
+ b -= c; b -= a; b ^= (a << 10); \
+ c -= a; c -= b; c ^= (b >> 15); \
+ } while(0)
+
+#endif /* MALLOC_REGISTER */
+
+#endif /* _MTABLE_H */
diff --git a/lib/malloc/trace.c b/lib/malloc/trace.c
new file mode 100644
index 0000000..6d93f99
--- /dev/null
+++ b/lib/malloc/trace.c
@@ -0,0 +1,126 @@
+/* trace.c - tracing functions for malloc */
+
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "imalloc.h"
+
+extern int malloc_trace;
+
+static int _mtrace_verbose = 0;
+
+#ifdef MALLOC_TRACE
+
+extern FILE *_imalloc_fopen __P((char *, char *, char *, char *, size_t));
+
+FILE *_mtrace_fp = NULL;
+extern char _malloc_trace_buckets[];
+
+void
+mtrace_alloc (tag, mem, size, file, line)
+ const char *tag;
+ PTR_T mem;
+ size_t size;
+ const char *file;
+ int line;
+{
+ if (_mtrace_fp == NULL)
+ _mtrace_fp = stderr;
+
+ if (_mtrace_verbose)
+ fprintf (_mtrace_fp, "alloc: %s: %p (%d bytes) from '%s:%d'\n",
+ tag, mem, size, file ? file : "unknown", line);
+ else
+ fprintf (_mtrace_fp, "alloc:%p:%d:%s:%d\n",
+ mem, size, file ? file : "unknown", line);
+}
+
+void
+mtrace_free (mem, size, file, line)
+ PTR_T mem;
+ int size;
+ const char *file;
+ int line;
+{
+ if (_mtrace_fp == NULL)
+ _mtrace_fp = stderr;
+
+ if (_mtrace_verbose)
+ fprintf (_mtrace_fp, "free: %p (%d bytes) from '%s:%d'\n",
+ mem, size, file ? file : "unknown", line);
+ else
+ fprintf (_mtrace_fp, "free:%p:%d:%s:%d\n",
+ mem, size, file ? file : "unknown", line);
+}
+#endif /* MALLOC_TRACE */
+
+int
+malloc_set_trace (n)
+ int n;
+{
+ int old;
+
+ old = malloc_trace;
+ malloc_trace = n;
+ _mtrace_verbose = (n > 1);
+ return old;
+}
+
+void
+malloc_set_tracefp (fp)
+ FILE *fp;
+{
+#ifdef MALLOC_TRACE
+ _mtrace_fp = fp ? fp : stderr;
+#endif
+}
+
+void
+malloc_trace_bin (n)
+ int n;
+{
+#ifdef MALLOC_TRACE
+ _malloc_trace_buckets[n] = 1;
+#endif
+}
+
+#define TRACEROOT "/var/tmp/maltrace/trace."
+
+void
+malloc_set_tracefn (s, fn)
+ char *s;
+ char *fn;
+{
+#ifdef MALLOC_TRACE
+ FILE *fp;
+ char defname[sizeof (TRACEROOT) + 64];
+
+ fp = _imalloc_fopen (s, fn, TRACEROOT, defname, sizeof (defname));
+ if (fp)
+ malloc_set_tracefp (fp);
+#endif
+}
diff --git a/lib/malloc/watch.c b/lib/malloc/watch.c
new file mode 100644
index 0000000..00c8a82
--- /dev/null
+++ b/lib/malloc/watch.c
@@ -0,0 +1,151 @@
+/* watch.c - watchpoint functions for malloc */
+
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include "imalloc.h"
+
+#ifdef MALLOC_WATCH
+#include "watch.h"
+
+#define WATCH_MAX 32
+
+int _malloc_nwatch;
+static PTR_T _malloc_watch_list[WATCH_MAX];
+
+static void
+watch_warn (addr, file, line, type, data)
+ PTR_T addr;
+ const char *file;
+ int line, type;
+ unsigned long data;
+{
+ char *tag;
+
+ if (type == W_ALLOC)
+ tag = "allocated";
+ else if (type == W_FREE)
+ tag = "freed";
+ else if (type == W_REALLOC)
+ tag = "requesting resize";
+ else if (type == W_RESIZED)
+ tag = "just resized";
+ else
+ tag = "bug: unknown operation";
+
+ fprintf (stderr, "malloc: watch alert: %p %s ", addr, tag);
+ if (data != (unsigned long)-1)
+ fprintf (stderr, "(size %lu) ", data);
+ fprintf (stderr, "from '%s:%d'\n", file ? file : "unknown", line);
+}
+
+void
+_malloc_ckwatch (addr, file, line, type, data)
+ PTR_T addr;
+ const char *file;
+ int line, type;
+ unsigned long data;
+{
+ register int i;
+
+ for (i = _malloc_nwatch - 1; i >= 0; i--)
+ {
+ if (_malloc_watch_list[i] == addr)
+ {
+ watch_warn (addr, file, line, type, data);
+ return;
+ }
+ }
+}
+#endif /* MALLOC_WATCH */
+
+PTR_T
+malloc_watch (addr)
+ PTR_T addr;
+{
+ register int i;
+ PTR_T ret;
+
+ if (addr == 0)
+ return addr;
+ ret = (PTR_T)0;
+
+#ifdef MALLOC_WATCH
+ for (i = _malloc_nwatch - 1; i >= 0; i--)
+ {
+ if (_malloc_watch_list[i] == addr)
+ break;
+ }
+ if (i < 0)
+ {
+ if (_malloc_nwatch == WATCH_MAX) /* full, take out first */
+ {
+ ret = _malloc_watch_list[0];
+ _malloc_nwatch--;
+ for (i = 0; i < _malloc_nwatch; i++)
+ _malloc_watch_list[i] = _malloc_watch_list[i+1];
+ }
+ _malloc_watch_list[_malloc_nwatch++] = addr;
+ }
+#endif
+
+ return ret;
+}
+
+/* Remove a watchpoint set on ADDR. If ADDR is NULL, remove all
+ watchpoints. Returns ADDR if everything went OK, NULL if ADDR was
+ not being watched. */
+PTR_T
+malloc_unwatch (addr)
+ PTR_T addr;
+{
+#ifdef MALLOC_WATCH
+ register int i;
+
+ if (addr == 0)
+ {
+ for (i = 0; i < _malloc_nwatch; i++)
+ _malloc_watch_list[i] = (PTR_T)0;
+ _malloc_nwatch = 0;
+ return ((PTR_T)0);
+ }
+ else
+ {
+ for (i = 0; i < _malloc_nwatch; i++)
+ {
+ if (_malloc_watch_list[i] == addr)
+ break;
+ }
+ if (i == _malloc_nwatch)
+ return ((PTR_T)0); /* not found */
+ /* shuffle everything from i+1 to end down 1 */
+ _malloc_nwatch--;
+ for ( ; i < _malloc_nwatch; i++)
+ _malloc_watch_list[i] = _malloc_watch_list[i+1];
+ return addr;
+ }
+#else
+ return ((PTR_T)0);
+#endif
+}
diff --git a/lib/malloc/watch.h b/lib/malloc/watch.h
new file mode 100644
index 0000000..6782acc
--- /dev/null
+++ b/lib/malloc/watch.h
@@ -0,0 +1,41 @@
+/* watch.h - definitions for tables for keeping track of allocated memory */
+
+/* Copyright (C) 2001-2003 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne-Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _MWATCH_H
+#define _MWATCH_H
+
+#include "imalloc.h"
+
+#ifdef MALLOC_WATCH
+
+/* `Events' for watchpoints */
+
+#define W_ALLOC 0x01
+#define W_FREE 0x02
+#define W_REALLOC 0x04
+#define W_RESIZED 0x08
+
+extern int _malloc_nwatch;
+
+extern void _malloc_ckwatch __P((PTR_T, const char *, int, int, unsigned long));
+
+#endif /* MALLOC_WATCH */
+
+#endif /* _MWATCH_H */
diff --git a/lib/malloc/x386-alloca.s b/lib/malloc/x386-alloca.s
new file mode 100644
index 0000000..112d33c
--- /dev/null
+++ b/lib/malloc/x386-alloca.s
@@ -0,0 +1,63 @@
+;; alloca386.s 1.2
+;; GNU-compatible stack allocation function for Xenix/386.
+;; Written by Chip Salzenberg at ComDev.
+;; Last modified 90/01/11
+;;> Is your alloca clearly better than the one in i386-alloca.s? I haven't
+;;> looked at either.
+;;
+;;They're different because Xenix/386 has a different assembler. SCO
+;;Xenix has the Microsoft C compiler and the Microsoft macro assembler,
+;;called "masm". MASM's assembler syntax is quite different from AT&T's
+;;in all sorts of ways. Xenix people can't use the AT&T version.
+;;--
+;;Chip Salzenberg at ComDev/TCT <chip@tct.uucp>, <uunet!ateng!tct!chip>
+
+ TITLE $alloca386
+
+ .386
+DGROUP GROUP CONST, _BSS, _DATA
+_DATA SEGMENT DWORD USE32 PUBLIC 'DATA'
+_DATA ENDS
+_BSS SEGMENT DWORD USE32 PUBLIC 'BSS'
+_BSS ENDS
+CONST SEGMENT DWORD USE32 PUBLIC 'CONST'
+CONST ENDS
+_TEXT SEGMENT DWORD USE32 PUBLIC 'CODE'
+ ASSUME CS: _TEXT, DS: DGROUP, SS: DGROUP, ES: DGROUP
+
+ PUBLIC _alloca
+_alloca PROC NEAR
+
+; Get argument.
+ pop edx ; edx -> return address
+ pop eax ; eax = amount to allocate
+
+; Validate allocation amount.
+ add eax,3
+ and eax,not 3
+ cmp eax,0
+ jg aa_size_ok
+ mov eax,4
+aa_size_ok:
+
+; Allocate stack space.
+ mov ecx,esp ; ecx -> old stack pointer
+ sub esp,eax ; perform allocation
+ mov eax,esp ; eax -> new stack pointer
+
+; Copy the three saved register variables from old stack top to new stack top.
+; They may not be there. So we waste twelve bytes. Big fat hairy deal.
+ push DWORD PTR 8[ecx]
+ push DWORD PTR 4[ecx]
+ push DWORD PTR 0[ecx]
+
+; Push something so the caller can pop it off.
+ push eax
+
+; Return to caller.
+ jmp edx
+
+_alloca ENDP
+
+_TEXT ENDS
+ END
diff --git a/lib/malloc/xleaktrace b/lib/malloc/xleaktrace
new file mode 100755
index 0000000..d7e3cd5
--- /dev/null
+++ b/lib/malloc/xleaktrace
@@ -0,0 +1,47 @@
+#! /usr/bin/awk -f
+#
+# xleaktrace - print unfreed memory using input generated by compact malloc
+# tracing (malloc_set_trace(1))
+#
+# NOTE: we ignore `realloc' tags because they're just extra information
+#
+# Copyright (c) 2001 Chester Ramey
+# Permission is hereby granted to deal in this Software without restriction.
+# THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
+#
+# Chet Ramey
+# chet@po.cwru.edu
+#
+BEGIN {
+ FS=":";
+}
+
+$1 == "alloc" {
+ alloc[$2] = 1;
+
+ size[$2] = $3;
+ file[$2] = $4;
+ line[$2] = $5;
+
+# printf "allocated: %s %d %d %s %d\n", $2, alloc[$2], size[$2], file[$2], line[$2];
+ }
+
+$1 == "free" {
+ if ($2 in alloc) {
+ alloc[$2] = 0;
+# printf "freed: %s %d\n", $2, alloc[$2];
+ } else
+ printf "freeing unallocated pointer: %s\n", $2;
+
+ }
+
+END {
+ printf "unfreed memory\n";
+ for (ptr in alloc) {
+ if (alloc[ptr] == 1) {
+ printf "%s (%d) from %s:%d\n", ptr, size[ptr], file[ptr], line[ptr];
+ }
+ }
+}
+
+
diff --git a/lib/malloc/xmalloc.c b/lib/malloc/xmalloc.c
new file mode 100644
index 0000000..f6dec67
--- /dev/null
+++ b/lib/malloc/xmalloc.c
@@ -0,0 +1,94 @@
+/* xmalloc.c -- safe versions of malloc and realloc */
+
+/* Copyright (C) 1991-2003 Free Software Foundation, Inc.
+
+ This file is part of GNU Readline, a library for reading lines
+ of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined (HAVE_CONFIG_H)
+#include <config.h>
+#endif
+
+#include <stdio.h>
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+/* Generic pointer type. */
+#ifndef PTR_T
+
+#if defined (__STDC__)
+# define PTR_T void *
+#else
+# define PTR_T char *
+#endif
+
+#endif /* PTR_T */
+
+/* **************************************************************** */
+/* */
+/* Memory Allocation and Deallocation. */
+/* */
+/* **************************************************************** */
+
+static void
+memory_error_and_abort (fname)
+ char *fname;
+{
+ fprintf (stderr, "%s: out of virtual memory\n", fname);
+ exit (2);
+}
+
+/* Return a pointer to free()able block of memory large enough
+ to hold BYTES number of bytes. If the memory cannot be allocated,
+ print an error message and abort. */
+PTR_T
+xmalloc (bytes)
+ size_t bytes;
+{
+ PTR_T temp;
+
+ temp = malloc (bytes);
+ if (temp == 0)
+ memory_error_and_abort ("xmalloc");
+ return (temp);
+}
+
+PTR_T
+xrealloc (pointer, bytes)
+ PTR_T pointer;
+ size_t bytes;
+{
+ PTR_T temp;
+
+ temp = pointer ? realloc (pointer, bytes) : malloc (bytes);
+
+ if (temp == 0)
+ memory_error_and_abort ("xrealloc");
+ return (temp);
+}
+
+void
+xfree (string)
+ PTR_T string;
+{
+ if (string)
+ free (string);
+}
diff --git a/lib/readline/COPYING b/lib/readline/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/lib/readline/COPYING
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/lib/readline/ChangeLog b/lib/readline/ChangeLog
new file mode 100644
index 0000000..1cf0c00
--- /dev/null
+++ b/lib/readline/ChangeLog
@@ -0,0 +1,403 @@
+Tue Mar 23 14:36:51 1993 Brian Fox (bfox@eos.crseo.ucsb.edu)
+
+ * readline.c (rl_copy): Changed name to rl_copy_text.
+
+Mon Mar 22 19:16:05 1993 Brian Fox (bfox@eos.crseo.ucsb.edu)
+
+ * dispose_cmd.c, several other files. Declare dispose_xxx () as
+ "void".
+
+ * builtins/hashcom.h: Make declarations of hashed_filenames be
+ "extern" to keep the SGI compiler happy.
+
+ * readline.c (rl_initialize_everything): Assign values to
+ out_stream and in_stream immediately, since
+ output_character_function () can be called before
+ readline_internal () is called.
+
+Tue Dec 8 09:30:56 1992 Brian Fox (bfox@cubit)
+
+ * readline.c (rl_init_terminal) Set PC from BC, not from *buffer.
+
+Mon Nov 30 09:35:47 1992 Brian Fox (bfox@cubit)
+
+ * readline.c (invoking_keyseqs_in_map, rl_parse_and_bind) Allow
+ backslash to quote characters, such as backslash, double quote,
+ and space. Backslash quotes all character indiscriminately.
+
+ * funmap.c (vi_keymap) Fix type in "vi-replace" declaration.
+
+Fri Nov 20 10:55:05 1992 Brian Fox (bfox@cubit)
+
+ * readline.c (init_terminal_io, rl_prep_terminal): FINALLY!
+ Declare and use termcap variable `ospeed' when setting up terminal
+ parameters.
+
+Thu Oct 8 08:53:07 1992 Brian J. Fox (bfox@helios)
+
+ * Makefile, this directory: Include (as links to the canonical
+ sources), tilde.c, tilde.h, posixstat.h and xmalloc.c.
+
+Tue Sep 29 13:07:21 1992 Brian J. Fox (bfox@helios)
+
+ * readline.c (init_terminal_io) Don't set arrow keys if the key
+ sequences that represent them are already set.
+
+ * readline.c (rl_function_of_keyseq) New function returns the first
+ function (or macro) found while searching a key sequence.
+
+Mon Sep 28 00:34:04 1992 Brian J. Fox (bfox@helios)
+
+ * readline.c (LibraryVersion) New static char * contains current
+ version number. Version is at 2.0.
+
+ * readline.c (rl_complete_internal): Incorporated clean changes
+ from gilmore (gnu@cygnus.com) to support quoted substrings within
+ completion functions.
+
+ * readline.c (many locations) Added support for the _GO32_,
+ whatever that is. Patches supplied by Cygnus, typed in by hand,
+ with cleanups.
+
+Sun Aug 16 12:46:24 1992 Brian Fox (bfox@cubit)
+
+ * readline.c (init_terminal_io): Find out the values of the keypad
+ arrows and bind them to appropriate RL functions if present.
+
+Mon Aug 10 18:13:24 1992 Brian Fox (bfox@cubit)
+
+ * history.c (stifle_history): A negative argument to stifle
+ becomes zero.
+
+Tue Jul 28 09:28:41 1992 Brian Fox (bfox@cubit)
+
+ * readline.c (rl_variable_bind): New local structure describes
+ booleans by name and address; code in rl_variable_bind () looks at
+ structure to set simple variables.
+
+ * parens.c (rl_insert_close): New variable rl_blink_matching_paren
+ is non-zero if we want to blink the matching open when a close is
+ inserted. If FD_SET is defined, rl_blink_matching_paren defaults
+ to 1, else 0. If FD_SET is not defined, and
+ rl_blink_matching_paren is non-zero, the close character(s) are/is
+ simply inserted.
+
+Wed Jul 22 20:03:59 1992 Brian Fox (bfox@cubit)
+
+ * history.c, readline.c, vi_mode.c: Cause the functions strchr ()
+ and strrchr () to be used instead of index () and rindex ()
+ throughout the source.
+
+Mon Jul 13 11:34:07 1992 Brian Fox (bfox@cubit)
+
+ * readline.c: (rl_variable_bind) New variable "meta-flag" if "on"
+ means force the use of the 8th bit as Meta bit. Internal variable
+ is called meta_flag.
+
+Thu Jul 9 10:37:56 1992 Brian Fox (bfox@cubit)
+
+ * history.c (get_history_event) Change INDEX to LOCAL_INDEX. If
+ compiling for the shell, allow shell metacharacters to separate
+ history tokens as they would for shell tokens.
+
+Sat Jul 4 19:29:12 1992 Brian Fox (bfox@cubit)
+
+ * vi_keymap.c: According to Posix, TAB self-inserts instead of
+ doing completion.
+
+ * vi_mode.c: (rl_vi_yank_arg) Enter VI insert mode after yanking
+ an arg from the previous line.
+
+ * search.c: New file takes over vi style searching and implements
+ non-incremental searching the history.
+
+ Makefile: Add search.c and search.o.
+
+ funmap.c: Add names for non-incremental-forward-search-history and
+ non-incremental-reverse-search-history.
+
+ readline.h: Add extern definitions for non-incremental searching.
+
+ vi_mode.c: Remove old search code; add calls to code in search.c.
+
+Fri Jul 3 10:36:33 1992 Brian Fox (bfox@cubit)
+
+ * readline.c (rl_delete_horizontal_space); New function deletes
+ all whitespace surrounding point.
+
+ funmap.c: Add "delete-horizontal-space".
+ emacs_keymap.c: Put rl_delete_horizontal_space () on M-\.
+
+ * readline.c (rl_set_signals, rl_clear_signals); New function
+ rl_set_sighandler () is either defined in a Posix way (if
+ HAVE_POSIX_SIGNALS is defined) or in a BSD way. Function is
+ called from rl_set_signals () and rl_clear_signals ().
+
+Fri May 8 12:50:15 1992 Brian Fox (bfox@cubit)
+
+ * readline.c: (readline_default_bindings) Do comparisons with
+ _POSIX_VDISABLE casted to `unsigned char'. Change tty characters
+ to be unsigned char.
+
+Thu Apr 30 12:36:35 1992 Brian Fox (bfox@cubit)
+
+ * readline.c: (rl_getc) Handle "read would block" error on
+ non-blocking IO streams.
+
+ * readline.c: (rl_signal_handler): Unblock only the signal that we
+ have caught, not all signals.
+
+Sun Feb 23 03:33:09 1992 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c: Many functions. Use only the macros META_CHAR and
+ UNMETA to deal with meta characters. Prior to this, we used
+ numeric values and tests.
+
+ * readline.c (rl_complete_internal) Report exactly the number of
+ possible completions, not the number + 1.
+
+ * vi_mode.c (rl_do_move) Do not change the cursor position when
+ using `cw' or `cW'.
+
+ * vi_mode.c (rl_vi_complete) Enter insert mode after completing
+ with `*' or `\'.
+
+Fri Feb 21 05:58:18 1992 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c (rl_dispatch) Increment rl_key_sequence_length for
+ meta characters that map onto ESC map.
+
+Mon Feb 10 01:41:35 1992 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * history.c (history_do_write) Build a buffer of all of the lines
+ to write and write them in one fell swoop (lower overhead than
+ calling write () for each line). Suggested by Peter Ho.
+
+ * readline.c: Include hbullx20 as well as hpux for determining
+ USGr3ness.
+
+ * readline.c (rl_unix_word_rubout) As per the "Now REMEMBER"
+ comment, pass arguments to rl_kill_text () in the correct order to
+ preserve prepending and appending of killed text.
+
+ * readline.c (rl_search_history) malloc (), realloc (), and free
+ () SEARCH_STRING so that there are no static limits on searching.
+
+ * vi_mode.c (rl_vi_subst) Don't forget to end the undo group.
+
+Fri Jan 31 14:51:02 1992 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c (rl_signal_handler): Zero the current history entry's
+ pointer after freeing the undo_list when SIGINT received.
+ Reformat a couple of functions.
+
+Sat Jan 25 13:47:35 1992 Brian Fox (bfox at bears)
+
+ * readline.c (parser_if): free () TNAME after use.
+
+Tue Jan 21 01:01:35 1992 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c (rl_redisplay) and (rl_character_len): Display
+ Control characters as "^c" and Meta characters as "\234", instead
+ of "C-C" and "M-C".
+
+Sun Dec 29 10:59:00 1991 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c (init_terminal_io) Default to environment variables
+ LINES and COLUMNS before termcap entry values. If all else fails,
+ then assume 80x24 terminal.
+
+Sat Dec 28 16:33:11 1991 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c: If this machine is USG and it is hpux, then define
+ USGr3.
+
+ * history.c: Cosmetic fixes.
+
+Thu Nov 21 00:10:12 1991 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * vi_mode.c: (rl_do_move) Place cursor at end of line, never at
+ next to last character.
+
+Thu Nov 14 05:08:01 1991 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * history.c (get_history_event) Non-anchored searches can have a
+ return index of greater than zero from get_history_event ().
+
+Fri Nov 1 07:02:13 1991 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c (rl_translate_keyseq) Make C-? translate to RUBOUT
+ unconditionally.
+
+Mon Oct 28 11:34:52 1991 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c; Use Posix directory routines and macros.
+
+ * funmap.c; Add entry for call-last-kbd-macro.
+
+ * readline.c (rl_prep_term); Use system EOF character on POSIX
+ systems also.
+
+Thu Oct 3 16:19:53 1991 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c; Make a distinction between having a TERMIOS tty
+ driver, and having POSIX signal handling. You might one without
+ the other. New defines used HAVE_POSIX_SIGNALS, and
+ TERMIOS_TTY_DRIVER.
+
+Tue Jul 30 22:37:26 1991 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c: rl_getc () If a call to read () returns without an
+ error, but with zero characters, the file is empty, so return EOF.
+
+Thu Jul 11 20:58:38 1991 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c: (rl_get_next_history, rl_get_previous_history)
+ Reallocate the buffer space if the line being moved to is longer
+ the the current space allocated. Amazing that no one has found
+ this bug until now.
+
+Sun Jul 7 02:37:05 1991 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c:(rl_parse_and_bind) Allow leading whitespace.
+ Make sure TERMIO and TERMIOS systems treat CR and NL
+ disctinctly.
+
+Tue Jun 25 04:09:27 1991 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c: Rework parsing conditionals to pay attention to the
+ prior states of the conditional stack. This makes $if statements
+ work correctly.
+
+Mon Jun 24 20:45:59 1991 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c: support for displaying key binding information
+ includes the functions rl_list_funmap_names (),
+ invoking_keyseqs_in_map (), rl_invoking_keyseqs (),
+ rl_dump_functions (), and rl_function_dumper ().
+
+ funmap.c: support for same includes rl_funmap_names ().
+
+ readline.c, funmap.c: no longer define STATIC_MALLOC. However,
+ update both version of xrealloc () to handle a null pointer.
+
+Thu Apr 25 12:03:49 1991 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * vi_mode.c (rl_vi_fword, fWord, etc. All functions use
+ the macro `isident()'. Fixed movement bug which prevents
+ continious movement through the text.
+
+Fri Jul 27 16:47:01 1990 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c (parser_if) Allow "$if term=foo" construct.
+
+Wed May 23 16:10:33 1990 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c (rl_dispatch) Correctly remember the last command
+ executed. Fixed typo in username_completion_function ().
+
+Mon Apr 9 19:55:48 1990 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c: username_completion_function (); For text passed in
+ with a leading `~', remember that this could be a filename (after
+ it is completed).
+
+Thu Apr 5 13:44:24 1990 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c: rl_search_history (): Correctly handle case of an
+ unfound search string, but a graceful exit (as with ESC).
+
+ * readline.c: rl_restart_output (); The Apollo passes the address
+ of the file descriptor to TIOCSTART, not the descriptor itself.
+
+Tue Mar 20 05:38:55 1990 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * readline.c: rl_complete (); second call in a row causes possible
+ completions to be listed.
+
+ * readline.c: rl_redisplay (), added prompt_this_line variable
+ which is the first character character following \n in prompt.
+
+Sun Mar 11 04:32:03 1990 Brian Fox (bfox at gnuwest.fsf.org)
+
+ * Signals are now supposedly handled inside of SYSV compilation.
+
+Wed Jan 17 19:24:09 1990 Brian Fox (bfox at sbphy.ucsb.edu)
+
+ * history.c: history_expand (); fixed overwriting memory error,
+ added needed argument to call to get_history_event ().
+
+Thu Jan 11 10:54:04 1990 Brian Fox (bfox at sbphy.ucsb.edu)
+
+ * readline.c: added mark_modified_lines to control the
+ display of an asterisk on modified history lines. Also
+ added a user variable called mark-modified-lines to the
+ `set' command.
+
+Thu Jan 4 10:38:05 1990 Brian Fox (bfox at sbphy.ucsb.edu)
+
+ * readline.c: start_insert (). Only use IC if we don't have an im
+ capability.
+
+Fri Sep 8 09:00:45 1989 Brian Fox (bfox at aurel)
+
+ * readline.c: rl_prep_terminal (). Only turn on 8th bit
+ as meta-bit iff the terminal is not using parity.
+
+Sun Sep 3 08:57:40 1989 Brian Fox (bfox at aurel)
+
+ * readline.c: start_insert (). Uses multiple
+ insertion call in cases where that makes sense.
+
+ rl_insert (). Read type-ahead buffer for additional
+ keys that are bound to rl_insert, and insert them
+ all at once. Make insertion of single keys given
+ with an argument much more efficient.
+
+Tue Aug 8 18:13:57 1989 Brian Fox (bfox at aurel)
+
+ * readline.c: Changed handling of EOF. readline () returns
+ (char *)EOF or consed string. The EOF character is read from the
+ tty, or if the tty doesn't have one, defaults to C-d.
+
+ * readline.c: Added support for event driven programs.
+ rl_event_hook is the address of a function you want called
+ while Readline is waiting for input.
+
+ * readline.c: Cleanup time. Functions without type declarations
+ do not use return with a value.
+
+ * history.c: history_expand () has new variable which is the
+ characters to ignore immediately following history_expansion_char.
+
+Sun Jul 16 08:14:00 1989 Brian Fox (bfox at aurel)
+
+ * rl_prep_terminal ()
+ BSD version turns off C-s, C-q, C-y, C-v.
+
+ * readline.c -- rl_prep_terminal ()
+ SYSV version hacks readline_echoing_p.
+ BSD version turns on passing of the 8th bit for the duration
+ of reading the line.
+
+Tue Jul 11 06:25:01 1989 Brian Fox (bfox at aurel)
+
+ * readline.c: new variable rl_tilde_expander.
+ If non-null, this contains the address of a function to call if
+ the standard meaning for expanding a tilde fails. The function is
+ called with the text sans tilde (as in "foo"), and returns a
+ malloc()'ed string which is the expansion, or a NULL pointer if
+ there is no expansion.
+
+ * readline.h - new file chardefs.h
+ Separates things that only readline.c needs from the standard
+ header file publishing interesting things about readline.
+
+ * readline.c:
+ readline_default_bindings () now looks at terminal chararacters
+ and binds those as well.
+
+Wed Jun 28 20:20:51 1989 Brian Fox (bfox at aurel)
+
+ * Made readline and history into independent libraries.
+
diff --git a/lib/readline/Makefile.in b/lib/readline/Makefile.in
new file mode 100644
index 0000000..2204628
--- /dev/null
+++ b/lib/readline/Makefile.in
@@ -0,0 +1,367 @@
+## -*- text -*- #############################################################
+# #
+# Makefile for the Bash versions of the GNU Readline and History Libraries. #
+# #
+#############################################################################
+
+# Copyright (C) 1994-2009 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+PACKAGE = @PACKAGE_NAME@
+VERSION = @PACKAGE_VERSION@
+
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+
+srcdir = @srcdir@
+VPATH = .:@srcdir@
+topdir = @top_srcdir@
+BUILD_DIR = @BUILD_DIR@
+
+datarootdir = @datarootdir@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+CC = @CC@
+RANLIB = @RANLIB@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+RM = rm -f
+CP = cp
+MV = mv
+
+SHELL = @MAKE_SHELL@
+
+# Programs to make tags files.
+ETAGS = etags -tw
+CTAGS = ctags -tw
+
+CFLAGS = @CFLAGS@
+LOCAL_CFLAGS = @LOCAL_CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+
+DEFS = @DEFS@
+LOCAL_DEFS = @LOCAL_DEFS@
+
+INCLUDES = -I. -I$(BUILD_DIR) -I$(topdir) -I$(topdir)/lib
+
+CCFLAGS = $(DEFS) $(LOCAL_DEFS) $(APP_CFLAGS) $(CPPFLAGS) ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS)
+
+.c.o:
+ ${RM} $@
+ $(CC) -c $(CCFLAGS) $<
+
+# The name of the main library target.
+LIBRARY_NAME = libreadline.a
+
+# The C code source files for this library.
+CSOURCES = $(srcdir)/readline.c $(srcdir)/funmap.c $(srcdir)/keymaps.c \
+ $(srcdir)/vi_mode.c $(srcdir)/parens.c $(srcdir)/rltty.c \
+ $(srcdir)/complete.c $(srcdir)/bind.c $(srcdir)/isearch.c \
+ $(srcdir)/display.c $(srcdir)/signals.c $(srcdir)/emacs_keymap.c \
+ $(srcdir)/vi_keymap.c $(srcdir)/util.c $(srcdir)/kill.c \
+ $(srcdir)/undo.c $(srcdir)/macro.c $(srcdir)/input.c \
+ $(srcdir)/callback.c $(srcdir)/terminal.c $(srcdir)/xmalloc.c \
+ $(srcdir)/history.c $(srcdir)/histsearch.c $(srcdir)/histexpand.c \
+ $(srcdir)/histfile.c $(srcdir)/nls.c $(srcdir)/search.c \
+ $(srcdir)/shell.c $(srcdir)/tilde.c $(srcdir)/savestring.c \
+ $(srcdir)/text.c $(srcdir)/misc.c $(srcdir)/compat.c \
+ $(srcdir)/mbutil.c
+
+# The header files for this library.
+HSOURCES = readline.h rldefs.h chardefs.h keymaps.h history.h histlib.h \
+ posixstat.h posixdir.h posixjmp.h tilde.h rlconf.h rltty.h \
+ ansi_stdlib.h rlstdc.h tcap.h xmalloc.h rlprivate.h rlshell.h \
+ rltypedefs.h rlmbutil.h
+
+HISTOBJ = history.o histexpand.o histfile.o histsearch.o shell.o savestring.o \
+ mbutil.o
+TILDEOBJ = tilde.o
+OBJECTS = readline.o vi_mode.o funmap.o keymaps.o parens.o search.o \
+ rltty.o complete.o bind.o isearch.o display.o signals.o \
+ util.o kill.o undo.o macro.o input.o callback.o terminal.o \
+ text.o nls.o misc.o $(HISTOBJ) $(TILDEOBJ) xmalloc.o compat.o
+
+# The texinfo files which document this library.
+DOCSOURCE = doc/rlman.texinfo doc/rltech.texinfo doc/rluser.texinfo
+DOCOBJECT = doc/readline.dvi
+DOCSUPPORT = doc/Makefile
+DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
+
+SUPPORT = Makefile ChangeLog $(DOCSUPPORT) examples/[-a-z.]*
+
+SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
+
+THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
+
+INSTALLED_HEADERS = readline.h chardefs.h keymaps.h history.h tilde.h \
+ rlstdc.h rlconf.h rltypedefs.h
+
+##########################################################################
+
+all: libreadline.a libhistory.a
+
+libreadline.a: $(OBJECTS)
+ $(RM) $@
+ $(AR) $(ARFLAGS) $@ $(OBJECTS)
+ -test -n "$(RANLIB)" && $(RANLIB) $@
+
+libhistory.a: $(HISTOBJ) xmalloc.o
+ $(RM) $@
+ $(AR) $(ARFLAGS) $@ $(HISTOBJ) xmalloc.o
+ -test -n "$(RANLIB)" && $(RANLIB) $@
+
+documentation: force
+ test -d doc || mkdir doc
+ -( cd doc && $(MAKE) $(MFLAGS) )
+
+# Since tilde.c is shared between readline and bash, make sure we compile
+# it with the right flags when it's built as part of readline
+tilde.o: tilde.c
+ rm -f $@
+ $(CC) $(CCFLAGS) -DREADLINE_LIBRARY -c $(srcdir)/tilde.c
+
+force:
+
+install:
+ @echo "This version of the readline library should not be installed."
+
+uninstall:
+ @echo "This version of the readline library should not be installed."
+
+TAGS: force
+ $(ETAGS) $(CSOURCES) $(HSOURCES)
+
+tags: force
+ $(CTAGS) $(CSOURCES) $(HSOURCES)
+
+clean: force
+ $(RM) $(OBJECTS) *.a
+ -( cd doc && $(MAKE) $(MFLAGS) $@ )
+
+mostlyclean: clean
+ -( cd doc && $(MAKE) $(MFLAGS) $@ )
+
+distclean maintainer-clean: clean
+ -( cd doc && $(MAKE) $(MFLAGS) $@ )
+ $(RM) Makefile
+ $(RM) TAGS tags
+
+# Dependencies
+bind.o: ansi_stdlib.h posixstat.h
+bind.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+bind.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
+bind.o: history.h rlstdc.h
+callback.o: rlconf.h ansi_stdlib.h
+callback.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+callback.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
+compat.o: rlstdc.h
+complete.o: ansi_stdlib.h posixdir.h posixstat.h
+complete.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+complete.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
+display.o: ansi_stdlib.h posixstat.h
+display.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+display.o: tcap.h
+display.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
+display.o: history.h rlstdc.h
+funmap.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
+funmap.o: rlconf.h ansi_stdlib.h rlstdc.h
+funmap.o: ${BUILD_DIR}/config.h
+histexpand.o: ansi_stdlib.h
+histexpand.o: history.h histlib.h rlstdc.h
+histexpand.o: ${BUILD_DIR}/config.h
+histfile.o: ansi_stdlib.h
+histfile.o: history.h histlib.h rlstdc.h
+histfile.o: ${BUILD_DIR}/config.h
+history.o: ansi_stdlib.h
+history.o: history.h histlib.h rlstdc.h
+history.o: ${BUILD_DIR}/config.h
+histsearch.o: ansi_stdlib.h
+histsearch.o: history.h histlib.h rlstdc.h
+histsearch.o: ${BUILD_DIR}/config.h
+input.o: ansi_stdlib.h
+input.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+input.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
+isearch.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+isearch.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
+isearch.o: ansi_stdlib.h history.h rlstdc.h
+keymaps.o: emacs_keymap.c vi_keymap.c
+keymaps.o: keymaps.h rltypedefs.h chardefs.h rlconf.h ansi_stdlib.h
+keymaps.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
+keymaps.o: ${BUILD_DIR}/config.h rlstdc.h
+kill.o: ansi_stdlib.h
+kill.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+kill.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
+kill.o: history.h rlstdc.h
+macro.o: ansi_stdlib.h
+macro.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+macro.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
+macro.o: history.h rlstdc.h
+mbutil.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h rlmbutil.h
+mbutil.o: readline.h keymaps.h rltypedefs.h chardefs.h rlstdc.h
+misc.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
+misc.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+misc.o: history.h rlstdc.h ansi_stdlib.h
+nls.o: ansi_stdlib.h
+nls.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+nls.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
+nls.o: history.h rlstdc.h
+parens.o: rlconf.h
+parens.o: ${BUILD_DIR}/config.h
+parens.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
+readline.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
+readline.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+readline.o: history.h rlstdc.h
+readline.o: posixstat.h ansi_stdlib.h posixjmp.h
+rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+rltty.o: rltty.h
+rltty.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
+search.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+search.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
+search.o: ansi_stdlib.h history.h rlstdc.h
+shell.o: ${BUILD_DIR}/config.h ansi_stdlib.h
+signals.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+signals.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
+signals.o: history.h rlstdc.h
+terminal.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+terminal.o: tcap.h
+terminal.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
+terminal.o: history.h rlstdc.h
+text.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
+text.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+text.o: history.h rlstdc.h ansi_stdlib.h
+rltty.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+tilde.o: ansi_stdlib.h
+tilde.o: ${BUILD_DIR}/config.h
+tilde.o: tilde.h
+undo.o: ansi_stdlib.h
+undo.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+undo.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
+undo.o: history.h rlstdc.h xmalloc.h
+util.o: posixjmp.h ansi_stdlib.h
+util.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+util.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h rlstdc.h
+vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h
+vi_mode.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h
+vi_mode.o: history.h ansi_stdlib.h rlstdc.h
+xmalloc.o: ${BUILD_DIR}/config.h ansi_stdlib.h
+
+bind.o: rlshell.h
+histfile.o: rlshell.h
+nls.o: rlshell.h
+readline.o: rlshell.h
+shell.o: rlshell.h
+terminal.o: rlshell.h
+histexpand.o: rlshell.h
+
+bind.o: rlprivate.h
+callback.o: rlprivate.h
+complete.o: rlprivate.h
+display.o: rlprivate.h
+input.o: rlprivate.h
+isearch.o: rlprivate.h
+kill.o: rlprivate.h
+macro.o: rlprivate.h
+mbutil.o: rlprivate.h
+misc.o: rlprivate.h
+nls.o: rlprivate.h
+parens.o: rlprivate.h
+readline.o: rlprivate.h
+rltty.o: rlprivate.h
+search.o: rlprivate.h
+signals.o: rlprivate.h
+terminal.o: rlprivate.h
+text.o: rlprivate.h
+undo.o: rlprivate.h
+util.o: rlprivate.h
+vi_mode.o: rlprivate.h
+
+bind.o: xmalloc.h
+complete.o: xmalloc.h
+display.o: xmalloc.h
+funmap.o: xmalloc.h
+histexpand.o: xmalloc.h
+histfile.o: xmalloc.h
+history.o: xmalloc.h
+input.o: xmalloc.h
+isearch.o: xmalloc.h
+keymaps.o: xmalloc.h
+kill.o: xmalloc.h
+macro.o: xmalloc.h
+mbutil.o: xmalloc.h
+misc.o: xmalloc.h
+readline.o: xmalloc.h
+savestring.o: xmalloc.h
+search.o: xmalloc.h
+shell.o: xmalloc.h
+terminal.o: xmalloc.h
+text.o: xmalloc.h
+tilde.o: xmalloc.h
+undo.o: xmalloc.h
+util.o: xmalloc.h
+vi_mode.o: xmalloc.h
+xmalloc.o: xmalloc.h
+
+complete.o: rlmbutil.h
+display.o: rlmbutil.h
+histexpand.o: rlmbutil.h
+input.o: rlmbutil.h
+isearch.o: rlmbutil.h
+mbutil.o: rlmbutil.h
+misc.o: rlmbutil.h
+readline.o: rlmbutil.h
+search.o: rlmbutil.h
+text.o: rlmbutil.h
+vi_mode.o: rlmbutil.h
+
+# Rules for deficient makes, like SunOS and Solaris
+bind.o: bind.c
+callback.o: callback.c
+compat.o: compat.c
+complete.o: complete.c
+display.o: display.c
+funmap.o: funmap.c
+input.o: input.c
+isearch.o: isearch.c
+keymaps.o: keymaps.c emacs_keymap.c vi_keymap.c
+kill.o: kill.c
+macro.o: macro.c
+mbutil.o: mbutil.c
+misc.o: misc.c
+nls.o: nls.c
+parens.o: parens.c
+readline.o: readline.c
+rltty.o: rltty.c
+savestring.o: savestring.c
+search.o: search.c
+shell.o: shell.c
+signals.o: signals.c
+terminal.o: terminal.c
+text.o: text.c
+tilde.o: tilde.c
+undo.o: undo.c
+util.o: util.c
+vi_mode.o: vi_mode.c
+xmalloc.o: xmalloc.c
+
+histexpand.o: histexpand.c
+histfile.o: histfile.c
+history.o: history.c
+histsearch.o: histsearch.c
diff --git a/lib/readline/README b/lib/readline/README
new file mode 100644
index 0000000..131471c
--- /dev/null
+++ b/lib/readline/README
@@ -0,0 +1,6 @@
+This is the distribution of the Gnu Readline library. See the file
+STANDALONE for a description of the #defines that can be passed via
+the makefile to build readline on different systems.
+
+The file rlconf.h contains defines that enable and disable certain
+readline features.
diff --git a/lib/readline/STANDALONE b/lib/readline/STANDALONE
new file mode 100644
index 0000000..c6b5cbd
--- /dev/null
+++ b/lib/readline/STANDALONE
@@ -0,0 +1,2 @@
+This is not to be built as a standalone library to be installed in some
+public place; get the full readline distribution instead.
diff --git a/lib/readline/ansi_stdlib.h b/lib/readline/ansi_stdlib.h
new file mode 100644
index 0000000..7dc2ee0
--- /dev/null
+++ b/lib/readline/ansi_stdlib.h
@@ -0,0 +1,54 @@
+/* ansi_stdlib.h -- An ANSI Standard stdlib.h. */
+/* A minimal stdlib.h containing extern declarations for those functions
+ that bash uses. */
+
+/* Copyright (C) 1993 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_STDLIB_H_)
+#define _STDLIB_H_ 1
+
+/* String conversion functions. */
+extern int atoi ();
+
+extern double atof ();
+extern double strtod ();
+
+/* Memory allocation functions. */
+/* Generic pointer type. */
+#ifndef PTR_T
+
+#if defined (__STDC__)
+# define PTR_T void *
+#else
+# define PTR_T char *
+#endif
+
+#endif /* PTR_T */
+
+extern PTR_T malloc ();
+extern PTR_T realloc ();
+extern void free ();
+
+/* Other miscellaneous functions. */
+extern void abort ();
+extern void exit ();
+extern char *getenv ();
+extern void qsort ();
+
+#endif /* _STDLIB_H */
diff --git a/lib/readline/bind.c b/lib/readline/bind.c
new file mode 100644
index 0000000..fc8c2a2
--- /dev/null
+++ b/lib/readline/bind.c
@@ -0,0 +1,2370 @@
+/* bind.c -- key binding and startup file support for the readline library. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (__TANDEM)
+# include <floss.h>
+#endif
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <fcntl.h>
+#if defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif /* HAVE_SYS_FILE_H */
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#include <errno.h>
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+#include "posixstat.h"
+
+/* System-specific feature definitions and include files. */
+#include "rldefs.h"
+
+/* Some standard library routines. */
+#include "readline.h"
+#include "history.h"
+
+#include "rlprivate.h"
+#include "rlshell.h"
+#include "xmalloc.h"
+
+#if !defined (strchr) && !defined (__STDC__)
+extern char *strchr (), *strrchr ();
+#endif /* !strchr && !__STDC__ */
+
+/* Variables exported by this file. */
+Keymap rl_binding_keymap;
+
+static char *_rl_read_file PARAMS((char *, size_t *));
+static void _rl_init_file_error PARAMS((const char *));
+static int _rl_read_init_file PARAMS((const char *, int));
+static int glean_key_from_name PARAMS((char *));
+static int find_boolean_var PARAMS((const char *));
+
+static char *_rl_get_string_variable_value PARAMS((const char *));
+static int substring_member_of_array PARAMS((const char *, const char * const *));
+
+static int currently_reading_init_file;
+
+/* used only in this file */
+static int _rl_prefer_visible_bell = 1;
+
+/* **************************************************************** */
+/* */
+/* Binding keys */
+/* */
+/* **************************************************************** */
+
+/* rl_add_defun (char *name, rl_command_func_t *function, int key)
+ Add NAME to the list of named functions. Make FUNCTION be the function
+ that gets called. If KEY is not -1, then bind it. */
+int
+rl_add_defun (name, function, key)
+ const char *name;
+ rl_command_func_t *function;
+ int key;
+{
+ if (key != -1)
+ rl_bind_key (key, function);
+ rl_add_funmap_entry (name, function);
+ return 0;
+}
+
+/* Bind KEY to FUNCTION. Returns non-zero if KEY is out of range. */
+int
+rl_bind_key (key, function)
+ int key;
+ rl_command_func_t *function;
+{
+ if (key < 0)
+ return (key);
+
+ if (META_CHAR (key) && _rl_convert_meta_chars_to_ascii)
+ {
+ if (_rl_keymap[ESC].type == ISKMAP)
+ {
+ Keymap escmap;
+
+ escmap = FUNCTION_TO_KEYMAP (_rl_keymap, ESC);
+ key = UNMETA (key);
+ escmap[key].type = ISFUNC;
+ escmap[key].function = function;
+ return (0);
+ }
+ return (key);
+ }
+
+ _rl_keymap[key].type = ISFUNC;
+ _rl_keymap[key].function = function;
+ rl_binding_keymap = _rl_keymap;
+ return (0);
+}
+
+/* Bind KEY to FUNCTION in MAP. Returns non-zero in case of invalid
+ KEY. */
+int
+rl_bind_key_in_map (key, function, map)
+ int key;
+ rl_command_func_t *function;
+ Keymap map;
+{
+ int result;
+ Keymap oldmap;
+
+ oldmap = _rl_keymap;
+ _rl_keymap = map;
+ result = rl_bind_key (key, function);
+ _rl_keymap = oldmap;
+ return (result);
+}
+
+/* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right
+ now, this is always used to attempt to bind the arrow keys, hence the
+ check for rl_vi_movement_mode. */
+int
+rl_bind_key_if_unbound_in_map (key, default_func, kmap)
+ int key;
+ rl_command_func_t *default_func;
+ Keymap kmap;
+{
+ char keyseq[2];
+
+ keyseq[0] = (unsigned char)key;
+ keyseq[1] = '\0';
+ return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, kmap));
+}
+
+int
+rl_bind_key_if_unbound (key, default_func)
+ int key;
+ rl_command_func_t *default_func;
+{
+ char keyseq[2];
+
+ keyseq[0] = (unsigned char)key;
+ keyseq[1] = '\0';
+ return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, _rl_keymap));
+}
+
+/* Make KEY do nothing in the currently selected keymap.
+ Returns non-zero in case of error. */
+int
+rl_unbind_key (key)
+ int key;
+{
+ return (rl_bind_key (key, (rl_command_func_t *)NULL));
+}
+
+/* Make KEY do nothing in MAP.
+ Returns non-zero in case of error. */
+int
+rl_unbind_key_in_map (key, map)
+ int key;
+ Keymap map;
+{
+ return (rl_bind_key_in_map (key, (rl_command_func_t *)NULL, map));
+}
+
+/* Unbind all keys bound to FUNCTION in MAP. */
+int
+rl_unbind_function_in_map (func, map)
+ rl_command_func_t *func;
+ Keymap map;
+{
+ register int i, rval;
+
+ for (i = rval = 0; i < KEYMAP_SIZE; i++)
+ {
+ if (map[i].type == ISFUNC && map[i].function == func)
+ {
+ map[i].function = (rl_command_func_t *)NULL;
+ rval = 1;
+ }
+ }
+ return rval;
+}
+
+int
+rl_unbind_command_in_map (command, map)
+ const char *command;
+ Keymap map;
+{
+ rl_command_func_t *func;
+
+ func = rl_named_function (command);
+ if (func == 0)
+ return 0;
+ return (rl_unbind_function_in_map (func, map));
+}
+
+/* Bind the key sequence represented by the string KEYSEQ to
+ FUNCTION, starting in the current keymap. This makes new
+ keymaps as necessary. */
+int
+rl_bind_keyseq (keyseq, function)
+ const char *keyseq;
+ rl_command_func_t *function;
+{
+ return (rl_generic_bind (ISFUNC, keyseq, (char *)function, _rl_keymap));
+}
+
+/* Bind the key sequence represented by the string KEYSEQ to
+ FUNCTION. This makes new keymaps as necessary. The initial
+ place to do bindings is in MAP. */
+int
+rl_bind_keyseq_in_map (keyseq, function, map)
+ const char *keyseq;
+ rl_command_func_t *function;
+ Keymap map;
+{
+ return (rl_generic_bind (ISFUNC, keyseq, (char *)function, map));
+}
+
+/* Backwards compatibility; equivalent to rl_bind_keyseq_in_map() */
+int
+rl_set_key (keyseq, function, map)
+ const char *keyseq;
+ rl_command_func_t *function;
+ Keymap map;
+{
+ return (rl_generic_bind (ISFUNC, keyseq, (char *)function, map));
+}
+
+/* Bind key sequence KEYSEQ to DEFAULT_FUNC if KEYSEQ is unbound. Right
+ now, this is always used to attempt to bind the arrow keys, hence the
+ check for rl_vi_movement_mode. */
+int
+rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, kmap)
+ const char *keyseq;
+ rl_command_func_t *default_func;
+ Keymap kmap;
+{
+ rl_command_func_t *func;
+
+ if (keyseq)
+ {
+ func = rl_function_of_keyseq (keyseq, kmap, (int *)NULL);
+#if defined (VI_MODE)
+ if (!func || func == rl_do_lowercase_version || func == rl_vi_movement_mode)
+#else
+ if (!func || func == rl_do_lowercase_version)
+#endif
+ return (rl_bind_keyseq_in_map (keyseq, default_func, kmap));
+ else
+ return 1;
+ }
+ return 0;
+}
+
+int
+rl_bind_keyseq_if_unbound (keyseq, default_func)
+ const char *keyseq;
+ rl_command_func_t *default_func;
+{
+ return (rl_bind_keyseq_if_unbound_in_map (keyseq, default_func, _rl_keymap));
+}
+
+/* Bind the key sequence represented by the string KEYSEQ to
+ the string of characters MACRO. This makes new keymaps as
+ necessary. The initial place to do bindings is in MAP. */
+int
+rl_macro_bind (keyseq, macro, map)
+ const char *keyseq, *macro;
+ Keymap map;
+{
+ char *macro_keys;
+ int macro_keys_len;
+
+ macro_keys = (char *)xmalloc ((2 * strlen (macro)) + 1);
+
+ if (rl_translate_keyseq (macro, macro_keys, &macro_keys_len))
+ {
+ xfree (macro_keys);
+ return -1;
+ }
+ rl_generic_bind (ISMACR, keyseq, macro_keys, map);
+ return 0;
+}
+
+/* Bind the key sequence represented by the string KEYSEQ to
+ the arbitrary pointer DATA. TYPE says what kind of data is
+ pointed to by DATA, right now this can be a function (ISFUNC),
+ a macro (ISMACR), or a keymap (ISKMAP). This makes new keymaps
+ as necessary. The initial place to do bindings is in MAP. */
+int
+rl_generic_bind (type, keyseq, data, map)
+ int type;
+ const char *keyseq;
+ char *data;
+ Keymap map;
+{
+ char *keys;
+ int keys_len;
+ register int i;
+ KEYMAP_ENTRY k;
+
+ k.function = 0;
+
+ /* If no keys to bind to, exit right away. */
+ if (keyseq == 0 || *keyseq == 0)
+ {
+ if (type == ISMACR)
+ xfree (data);
+ return -1;
+ }
+
+ keys = (char *)xmalloc (1 + (2 * strlen (keyseq)));
+
+ /* Translate the ASCII representation of KEYSEQ into an array of
+ characters. Stuff the characters into KEYS, and the length of
+ KEYS into KEYS_LEN. */
+ if (rl_translate_keyseq (keyseq, keys, &keys_len))
+ {
+ xfree (keys);
+ return -1;
+ }
+
+ /* Bind keys, making new keymaps as necessary. */
+ for (i = 0; i < keys_len; i++)
+ {
+ unsigned char uc = keys[i];
+ int ic;
+
+ ic = uc;
+ if (ic < 0 || ic >= KEYMAP_SIZE)
+ {
+ xfree (keys);
+ return -1;
+ }
+
+ if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii)
+ {
+ ic = UNMETA (ic);
+ if (map[ESC].type == ISKMAP)
+ map = FUNCTION_TO_KEYMAP (map, ESC);
+ }
+
+ if ((i + 1) < keys_len)
+ {
+ if (map[ic].type != ISKMAP)
+ {
+ /* We allow subsequences of keys. If a keymap is being
+ created that will `shadow' an existing function or macro
+ key binding, we save that keybinding into the ANYOTHERKEY
+ index in the new map. The dispatch code will look there
+ to find the function to execute if the subsequence is not
+ matched. ANYOTHERKEY was chosen to be greater than
+ UCHAR_MAX. */
+ k = map[ic];
+
+ map[ic].type = ISKMAP;
+ map[ic].function = KEYMAP_TO_FUNCTION (rl_make_bare_keymap());
+ }
+ map = FUNCTION_TO_KEYMAP (map, ic);
+ /* The dispatch code will return this function if no matching
+ key sequence is found in the keymap. This (with a little
+ help from the dispatch code in readline.c) allows `a' to be
+ mapped to something, `abc' to be mapped to something else,
+ and the function bound to `a' to be executed when the user
+ types `abx', leaving `bx' in the input queue. */
+ if (k.function && ((k.type == ISFUNC && k.function != rl_do_lowercase_version) || k.type == ISMACR))
+ {
+ map[ANYOTHERKEY] = k;
+ k.function = 0;
+ }
+ }
+ else
+ {
+ if (map[ic].type == ISMACR)
+ xfree ((char *)map[ic].function);
+ else if (map[ic].type == ISKMAP)
+ {
+ map = FUNCTION_TO_KEYMAP (map, ic);
+ ic = ANYOTHERKEY;
+ /* If we're trying to override a keymap with a null function
+ (e.g., trying to unbind it), we can't use a null pointer
+ here because that's indistinguishable from having not been
+ overridden. We use a special bindable function that does
+ nothing. */
+ if (type == ISFUNC && data == 0)
+ data = (char *)_rl_null_function;
+ }
+
+ map[ic].function = KEYMAP_TO_FUNCTION (data);
+ map[ic].type = type;
+ }
+
+ rl_binding_keymap = map;
+ }
+ xfree (keys);
+ return 0;
+}
+
+/* Translate the ASCII representation of SEQ, stuffing the values into ARRAY,
+ an array of characters. LEN gets the final length of ARRAY. Return
+ non-zero if there was an error parsing SEQ. */
+int
+rl_translate_keyseq (seq, array, len)
+ const char *seq;
+ char *array;
+ int *len;
+{
+ register int i, c, l, temp;
+
+ for (i = l = 0; c = seq[i]; i++)
+ {
+ if (c == '\\')
+ {
+ c = seq[++i];
+
+ if (c == 0)
+ break;
+
+ /* Handle \C- and \M- prefixes. */
+ if ((c == 'C' || c == 'M') && seq[i + 1] == '-')
+ {
+ /* Handle special case of backwards define. */
+ if (strncmp (&seq[i], "C-\\M-", 5) == 0)
+ {
+ array[l++] = ESC; /* ESC is meta-prefix */
+ i += 5;
+ array[l++] = CTRL (_rl_to_upper (seq[i]));
+ if (seq[i] == '\0')
+ i--;
+ }
+ else if (c == 'M')
+ {
+ i++; /* seq[i] == '-' */
+ /* XXX - obey convert-meta setting */
+ if (_rl_convert_meta_chars_to_ascii && _rl_keymap[ESC].type == ISKMAP)
+ array[l++] = ESC; /* ESC is meta-prefix */
+ else if (seq[i+1] == '\\' && seq[i+2] == 'C' && seq[i+3] == '-')
+ {
+ i += 4;
+ temp = (seq[i] == '?') ? RUBOUT : CTRL (_rl_to_upper (seq[i]));
+ array[l++] = META (temp);
+ }
+ else
+ {
+ /* This doesn't yet handle things like \M-\a, which may
+ or may not have any reasonable meaning. You're
+ probably better off using straight octal or hex. */
+ i++;
+ array[l++] = META (seq[i]);
+ }
+ }
+ else if (c == 'C')
+ {
+ i += 2;
+ /* Special hack for C-?... */
+ array[l++] = (seq[i] == '?') ? RUBOUT : CTRL (_rl_to_upper (seq[i]));
+ }
+ continue;
+ }
+
+ /* Translate other backslash-escaped characters. These are the
+ same escape sequences that bash's `echo' and `printf' builtins
+ handle, with the addition of \d -> RUBOUT. A backslash
+ preceding a character that is not special is stripped. */
+ switch (c)
+ {
+ case 'a':
+ array[l++] = '\007';
+ break;
+ case 'b':
+ array[l++] = '\b';
+ break;
+ case 'd':
+ array[l++] = RUBOUT; /* readline-specific */
+ break;
+ case 'e':
+ array[l++] = ESC;
+ break;
+ case 'f':
+ array[l++] = '\f';
+ break;
+ case 'n':
+ array[l++] = NEWLINE;
+ break;
+ case 'r':
+ array[l++] = RETURN;
+ break;
+ case 't':
+ array[l++] = TAB;
+ break;
+ case 'v':
+ array[l++] = 0x0B;
+ break;
+ case '\\':
+ array[l++] = '\\';
+ break;
+ case '0': case '1': case '2': case '3':
+ case '4': case '5': case '6': case '7':
+ i++;
+ for (temp = 2, c -= '0'; ISOCTAL (seq[i]) && temp--; i++)
+ c = (c * 8) + OCTVALUE (seq[i]);
+ i--; /* auto-increment in for loop */
+ array[l++] = c & largest_char;
+ break;
+ case 'x':
+ i++;
+ for (temp = 2, c = 0; ISXDIGIT ((unsigned char)seq[i]) && temp--; i++)
+ c = (c * 16) + HEXVALUE (seq[i]);
+ if (temp == 2)
+ c = 'x';
+ i--; /* auto-increment in for loop */
+ array[l++] = c & largest_char;
+ break;
+ default: /* backslashes before non-special chars just add the char */
+ array[l++] = c;
+ break; /* the backslash is stripped */
+ }
+ continue;
+ }
+
+ array[l++] = c;
+ }
+
+ *len = l;
+ array[l] = '\0';
+ return (0);
+}
+
+char *
+rl_untranslate_keyseq (seq)
+ int seq;
+{
+ static char kseq[16];
+ int i, c;
+
+ i = 0;
+ c = seq;
+ if (META_CHAR (c))
+ {
+ kseq[i++] = '\\';
+ kseq[i++] = 'M';
+ kseq[i++] = '-';
+ c = UNMETA (c);
+ }
+ else if (c == ESC)
+ {
+ kseq[i++] = '\\';
+ c = 'e';
+ }
+ else if (CTRL_CHAR (c))
+ {
+ kseq[i++] = '\\';
+ kseq[i++] = 'C';
+ kseq[i++] = '-';
+ c = _rl_to_lower (UNCTRL (c));
+ }
+ else if (c == RUBOUT)
+ {
+ kseq[i++] = '\\';
+ kseq[i++] = 'C';
+ kseq[i++] = '-';
+ c = '?';
+ }
+
+ if (c == ESC)
+ {
+ kseq[i++] = '\\';
+ c = 'e';
+ }
+ else if (c == '\\' || c == '"')
+ {
+ kseq[i++] = '\\';
+ }
+
+ kseq[i++] = (unsigned char) c;
+ kseq[i] = '\0';
+ return kseq;
+}
+
+static char *
+_rl_untranslate_macro_value (seq)
+ char *seq;
+{
+ char *ret, *r, *s;
+ int c;
+
+ r = ret = (char *)xmalloc (7 * strlen (seq) + 1);
+ for (s = seq; *s; s++)
+ {
+ c = *s;
+ if (META_CHAR (c))
+ {
+ *r++ = '\\';
+ *r++ = 'M';
+ *r++ = '-';
+ c = UNMETA (c);
+ }
+ else if (c == ESC)
+ {
+ *r++ = '\\';
+ c = 'e';
+ }
+ else if (CTRL_CHAR (c))
+ {
+ *r++ = '\\';
+ *r++ = 'C';
+ *r++ = '-';
+ c = _rl_to_lower (UNCTRL (c));
+ }
+ else if (c == RUBOUT)
+ {
+ *r++ = '\\';
+ *r++ = 'C';
+ *r++ = '-';
+ c = '?';
+ }
+
+ if (c == ESC)
+ {
+ *r++ = '\\';
+ c = 'e';
+ }
+ else if (c == '\\' || c == '"')
+ *r++ = '\\';
+
+ *r++ = (unsigned char)c;
+ }
+ *r = '\0';
+ return ret;
+}
+
+/* Return a pointer to the function that STRING represents.
+ If STRING doesn't have a matching function, then a NULL pointer
+ is returned. */
+rl_command_func_t *
+rl_named_function (string)
+ const char *string;
+{
+ register int i;
+
+ rl_initialize_funmap ();
+
+ for (i = 0; funmap[i]; i++)
+ if (_rl_stricmp (funmap[i]->name, string) == 0)
+ return (funmap[i]->function);
+ return ((rl_command_func_t *)NULL);
+}
+
+/* Return the function (or macro) definition which would be invoked via
+ KEYSEQ if executed in MAP. If MAP is NULL, then the current keymap is
+ used. TYPE, if non-NULL, is a pointer to an int which will receive the
+ type of the object pointed to. One of ISFUNC (function), ISKMAP (keymap),
+ or ISMACR (macro). */
+rl_command_func_t *
+rl_function_of_keyseq (keyseq, map, type)
+ const char *keyseq;
+ Keymap map;
+ int *type;
+{
+ register int i;
+
+ if (map == 0)
+ map = _rl_keymap;
+
+ for (i = 0; keyseq && keyseq[i]; i++)
+ {
+ unsigned char ic = keyseq[i];
+
+ if (META_CHAR (ic) && _rl_convert_meta_chars_to_ascii)
+ {
+ if (map[ESC].type == ISKMAP)
+ {
+ map = FUNCTION_TO_KEYMAP (map, ESC);
+ ic = UNMETA (ic);
+ }
+ /* XXX - should we just return NULL here, since this obviously
+ doesn't match? */
+ else
+ {
+ if (type)
+ *type = map[ESC].type;
+
+ return (map[ESC].function);
+ }
+ }
+
+ if (map[ic].type == ISKMAP)
+ {
+ /* If this is the last key in the key sequence, return the
+ map. */
+ if (keyseq[i + 1] == '\0')
+ {
+ if (type)
+ *type = ISKMAP;
+
+ return (map[ic].function);
+ }
+ else
+ map = FUNCTION_TO_KEYMAP (map, ic);
+ }
+ /* If we're not at the end of the key sequence, and the current key
+ is bound to something other than a keymap, then the entire key
+ sequence is not bound. */
+ else if (map[ic].type != ISKMAP && keyseq[i+1])
+ return ((rl_command_func_t *)NULL);
+ else /* map[ic].type != ISKMAP && keyseq[i+1] == 0 */
+ {
+ if (type)
+ *type = map[ic].type;
+
+ return (map[ic].function);
+ }
+ }
+ return ((rl_command_func_t *) NULL);
+}
+
+/* The last key bindings file read. */
+static char *last_readline_init_file = (char *)NULL;
+
+/* The file we're currently reading key bindings from. */
+static const char *current_readline_init_file;
+static int current_readline_init_include_level;
+static int current_readline_init_lineno;
+
+/* Read FILENAME into a locally-allocated buffer and return the buffer.
+ The size of the buffer is returned in *SIZEP. Returns NULL if any
+ errors were encountered. */
+static char *
+_rl_read_file (filename, sizep)
+ char *filename;
+ size_t *sizep;
+{
+ struct stat finfo;
+ size_t file_size;
+ char *buffer;
+ int i, file;
+
+ if ((stat (filename, &finfo) < 0) || (file = open (filename, O_RDONLY, 0666)) < 0)
+ return ((char *)NULL);
+
+ file_size = (size_t)finfo.st_size;
+
+ /* check for overflow on very large files */
+ if (file_size != finfo.st_size || file_size + 1 < file_size)
+ {
+ if (file >= 0)
+ close (file);
+#if defined (EFBIG)
+ errno = EFBIG;
+#endif
+ return ((char *)NULL);
+ }
+
+ /* Read the file into BUFFER. */
+ buffer = (char *)xmalloc (file_size + 1);
+ i = read (file, buffer, file_size);
+ close (file);
+
+ if (i < 0)
+ {
+ xfree (buffer);
+ return ((char *)NULL);
+ }
+
+ RL_CHECK_SIGNALS ();
+
+ buffer[i] = '\0';
+ if (sizep)
+ *sizep = i;
+
+ return (buffer);
+}
+
+/* Re-read the current keybindings file. */
+int
+rl_re_read_init_file (count, ignore)
+ int count, ignore;
+{
+ int r;
+ r = rl_read_init_file ((const char *)NULL);
+ rl_set_keymap_from_edit_mode ();
+ return r;
+}
+
+/* Do key bindings from a file. If FILENAME is NULL it defaults
+ to the first non-null filename from this list:
+ 1. the filename used for the previous call
+ 2. the value of the shell variable `INPUTRC'
+ 3. ~/.inputrc
+ 4. /etc/inputrc
+ If the file existed and could be opened and read, 0 is returned,
+ otherwise errno is returned. */
+int
+rl_read_init_file (filename)
+ const char *filename;
+{
+ /* Default the filename. */
+ if (filename == 0)
+ filename = last_readline_init_file;
+ if (filename == 0)
+ filename = sh_get_env_value ("INPUTRC");
+ if (filename == 0 || *filename == 0)
+ {
+ filename = DEFAULT_INPUTRC;
+ /* Try to read DEFAULT_INPUTRC; fall back to SYS_INPUTRC on failure */
+ if (_rl_read_init_file (filename, 0) == 0)
+ return 0;
+ filename = SYS_INPUTRC;
+ }
+
+#if defined (__MSDOS__)
+ if (_rl_read_init_file (filename, 0) == 0)
+ return 0;
+ filename = "~/_inputrc";
+#endif
+ return (_rl_read_init_file (filename, 0));
+}
+
+static int
+_rl_read_init_file (filename, include_level)
+ const char *filename;
+ int include_level;
+{
+ register int i;
+ char *buffer, *openname, *line, *end;
+ size_t file_size;
+
+ current_readline_init_file = filename;
+ current_readline_init_include_level = include_level;
+
+ openname = tilde_expand (filename);
+ buffer = _rl_read_file (openname, &file_size);
+ xfree (openname);
+
+ RL_CHECK_SIGNALS ();
+ if (buffer == 0)
+ return (errno);
+
+ if (include_level == 0 && filename != last_readline_init_file)
+ {
+ FREE (last_readline_init_file);
+ last_readline_init_file = savestring (filename);
+ }
+
+ currently_reading_init_file = 1;
+
+ /* Loop over the lines in the file. Lines that start with `#' are
+ comments; all other lines are commands for readline initialization. */
+ current_readline_init_lineno = 1;
+ line = buffer;
+ end = buffer + file_size;
+ while (line < end)
+ {
+ /* Find the end of this line. */
+ for (i = 0; line + i != end && line[i] != '\n'; i++);
+
+#if defined (__CYGWIN__)
+ /* ``Be liberal in what you accept.'' */
+ if (line[i] == '\n' && line[i-1] == '\r')
+ line[i - 1] = '\0';
+#endif
+
+ /* Mark end of line. */
+ line[i] = '\0';
+
+ /* Skip leading whitespace. */
+ while (*line && whitespace (*line))
+ {
+ line++;
+ i--;
+ }
+
+ /* If the line is not a comment, then parse it. */
+ if (*line && *line != '#')
+ rl_parse_and_bind (line);
+
+ /* Move to the next line. */
+ line += i + 1;
+ current_readline_init_lineno++;
+ }
+
+ xfree (buffer);
+ currently_reading_init_file = 0;
+ return (0);
+}
+
+static void
+_rl_init_file_error (msg)
+ const char *msg;
+{
+ if (currently_reading_init_file)
+ _rl_errmsg ("%s: line %d: %s\n", current_readline_init_file,
+ current_readline_init_lineno, msg);
+ else
+ _rl_errmsg ("%s", msg);
+}
+
+/* **************************************************************** */
+/* */
+/* Parser Directives */
+/* */
+/* **************************************************************** */
+
+typedef int _rl_parser_func_t PARAMS((char *));
+
+/* Things that mean `Control'. */
+const char * const _rl_possible_control_prefixes[] = {
+ "Control-", "C-", "CTRL-", (const char *)NULL
+};
+
+const char * const _rl_possible_meta_prefixes[] = {
+ "Meta", "M-", (const char *)NULL
+};
+
+/* Conditionals. */
+
+/* Calling programs set this to have their argv[0]. */
+const char *rl_readline_name = "other";
+
+/* Stack of previous values of parsing_conditionalized_out. */
+static unsigned char *if_stack = (unsigned char *)NULL;
+static int if_stack_depth;
+static int if_stack_size;
+
+/* Push _rl_parsing_conditionalized_out, and set parser state based
+ on ARGS. */
+static int
+parser_if (args)
+ char *args;
+{
+ register int i;
+
+ /* Push parser state. */
+ if (if_stack_depth + 1 >= if_stack_size)
+ {
+ if (!if_stack)
+ if_stack = (unsigned char *)xmalloc (if_stack_size = 20);
+ else
+ if_stack = (unsigned char *)xrealloc (if_stack, if_stack_size += 20);
+ }
+ if_stack[if_stack_depth++] = _rl_parsing_conditionalized_out;
+
+ /* If parsing is turned off, then nothing can turn it back on except
+ for finding the matching endif. In that case, return right now. */
+ if (_rl_parsing_conditionalized_out)
+ return 0;
+
+ /* Isolate first argument. */
+ for (i = 0; args[i] && !whitespace (args[i]); i++);
+
+ if (args[i])
+ args[i++] = '\0';
+
+ /* Handle "$if term=foo" and "$if mode=emacs" constructs. If this
+ isn't term=foo, or mode=emacs, then check to see if the first
+ word in ARGS is the same as the value stored in rl_readline_name. */
+ if (rl_terminal_name && _rl_strnicmp (args, "term=", 5) == 0)
+ {
+ char *tem, *tname;
+
+ /* Terminals like "aaa-60" are equivalent to "aaa". */
+ tname = savestring (rl_terminal_name);
+ tem = strchr (tname, '-');
+ if (tem)
+ *tem = '\0';
+
+ /* Test the `long' and `short' forms of the terminal name so that
+ if someone has a `sun-cmd' and does not want to have bindings
+ that will be executed if the terminal is a `sun', they can put
+ `$if term=sun-cmd' into their .inputrc. */
+ _rl_parsing_conditionalized_out = _rl_stricmp (args + 5, tname) &&
+ _rl_stricmp (args + 5, rl_terminal_name);
+ xfree (tname);
+ }
+#if defined (VI_MODE)
+ else if (_rl_strnicmp (args, "mode=", 5) == 0)
+ {
+ int mode;
+
+ if (_rl_stricmp (args + 5, "emacs") == 0)
+ mode = emacs_mode;
+ else if (_rl_stricmp (args + 5, "vi") == 0)
+ mode = vi_mode;
+ else
+ mode = no_mode;
+
+ _rl_parsing_conditionalized_out = mode != rl_editing_mode;
+ }
+#endif /* VI_MODE */
+ /* Check to see if the first word in ARGS is the same as the
+ value stored in rl_readline_name. */
+ else if (_rl_stricmp (args, rl_readline_name) == 0)
+ _rl_parsing_conditionalized_out = 0;
+ else
+ _rl_parsing_conditionalized_out = 1;
+ return 0;
+}
+
+/* Invert the current parser state if there is anything on the stack. */
+static int
+parser_else (args)
+ char *args;
+{
+ register int i;
+
+ if (if_stack_depth == 0)
+ {
+ _rl_init_file_error ("$else found without matching $if");
+ return 0;
+ }
+
+#if 0
+ /* Check the previous (n - 1) levels of the stack to make sure that
+ we haven't previously turned off parsing. */
+ for (i = 0; i < if_stack_depth - 1; i++)
+#else
+ /* Check the previous (n) levels of the stack to make sure that
+ we haven't previously turned off parsing. */
+ for (i = 0; i < if_stack_depth; i++)
+#endif
+ if (if_stack[i] == 1)
+ return 0;
+
+ /* Invert the state of parsing if at top level. */
+ _rl_parsing_conditionalized_out = !_rl_parsing_conditionalized_out;
+ return 0;
+}
+
+/* Terminate a conditional, popping the value of
+ _rl_parsing_conditionalized_out from the stack. */
+static int
+parser_endif (args)
+ char *args;
+{
+ if (if_stack_depth)
+ _rl_parsing_conditionalized_out = if_stack[--if_stack_depth];
+ else
+ _rl_init_file_error ("$endif without matching $if");
+ return 0;
+}
+
+static int
+parser_include (args)
+ char *args;
+{
+ const char *old_init_file;
+ char *e;
+ int old_line_number, old_include_level, r;
+
+ if (_rl_parsing_conditionalized_out)
+ return (0);
+
+ old_init_file = current_readline_init_file;
+ old_line_number = current_readline_init_lineno;
+ old_include_level = current_readline_init_include_level;
+
+ e = strchr (args, '\n');
+ if (e)
+ *e = '\0';
+ r = _rl_read_init_file ((const char *)args, old_include_level + 1);
+
+ current_readline_init_file = old_init_file;
+ current_readline_init_lineno = old_line_number;
+ current_readline_init_include_level = old_include_level;
+
+ return r;
+}
+
+/* Associate textual names with actual functions. */
+static const struct {
+ const char * const name;
+ _rl_parser_func_t *function;
+} parser_directives [] = {
+ { "if", parser_if },
+ { "endif", parser_endif },
+ { "else", parser_else },
+ { "include", parser_include },
+ { (char *)0x0, (_rl_parser_func_t *)0x0 }
+};
+
+/* Handle a parser directive. STATEMENT is the line of the directive
+ without any leading `$'. */
+static int
+handle_parser_directive (statement)
+ char *statement;
+{
+ register int i;
+ char *directive, *args;
+
+ /* Isolate the actual directive. */
+
+ /* Skip whitespace. */
+ for (i = 0; whitespace (statement[i]); i++);
+
+ directive = &statement[i];
+
+ for (; statement[i] && !whitespace (statement[i]); i++);
+
+ if (statement[i])
+ statement[i++] = '\0';
+
+ for (; statement[i] && whitespace (statement[i]); i++);
+
+ args = &statement[i];
+
+ /* Lookup the command, and act on it. */
+ for (i = 0; parser_directives[i].name; i++)
+ if (_rl_stricmp (directive, parser_directives[i].name) == 0)
+ {
+ (*parser_directives[i].function) (args);
+ return (0);
+ }
+
+ /* display an error message about the unknown parser directive */
+ _rl_init_file_error ("unknown parser directive");
+ return (1);
+}
+
+/* Read the binding command from STRING and perform it.
+ A key binding command looks like: Keyname: function-name\0,
+ a variable binding command looks like: set variable value.
+ A new-style keybinding looks like "\C-x\C-x": exchange-point-and-mark. */
+int
+rl_parse_and_bind (string)
+ char *string;
+{
+ char *funname, *kname;
+ register int c, i;
+ int key, equivalency;
+
+ while (string && whitespace (*string))
+ string++;
+
+ if (!string || !*string || *string == '#')
+ return 0;
+
+ /* If this is a parser directive, act on it. */
+ if (*string == '$')
+ {
+ handle_parser_directive (&string[1]);
+ return 0;
+ }
+
+ /* If we aren't supposed to be parsing right now, then we're done. */
+ if (_rl_parsing_conditionalized_out)
+ return 0;
+
+ i = 0;
+ /* If this keyname is a complex key expression surrounded by quotes,
+ advance to after the matching close quote. This code allows the
+ backslash to quote characters in the key expression. */
+ if (*string == '"')
+ {
+ int passc = 0;
+
+ for (i = 1; c = string[i]; i++)
+ {
+ if (passc)
+ {
+ passc = 0;
+ continue;
+ }
+
+ if (c == '\\')
+ {
+ passc++;
+ continue;
+ }
+
+ if (c == '"')
+ break;
+ }
+ /* If we didn't find a closing quote, abort the line. */
+ if (string[i] == '\0')
+ {
+ _rl_init_file_error ("no closing `\"' in key binding");
+ return 1;
+ }
+ }
+
+ /* Advance to the colon (:) or whitespace which separates the two objects. */
+ for (; (c = string[i]) && c != ':' && c != ' ' && c != '\t'; i++ );
+
+ equivalency = (c == ':' && string[i + 1] == '=');
+
+ /* Mark the end of the command (or keyname). */
+ if (string[i])
+ string[i++] = '\0';
+
+ /* If doing assignment, skip the '=' sign as well. */
+ if (equivalency)
+ string[i++] = '\0';
+
+ /* If this is a command to set a variable, then do that. */
+ if (_rl_stricmp (string, "set") == 0)
+ {
+ char *var, *value, *e;
+
+ var = string + i;
+ /* Make VAR point to start of variable name. */
+ while (*var && whitespace (*var)) var++;
+
+ /* Make VALUE point to start of value string. */
+ value = var;
+ while (*value && !whitespace (*value)) value++;
+ if (*value)
+ *value++ = '\0';
+ while (*value && whitespace (*value)) value++;
+
+ /* Strip trailing whitespace from values to boolean variables. Temp
+ fix until I get a real quoted-string parser here. */
+ i = find_boolean_var (var);
+ if (i >= 0)
+ {
+ /* remove trailing whitespace */
+ e = value + strlen (value) - 1;
+ while (e >= value && whitespace (*e))
+ e--;
+ e++; /* skip back to whitespace or EOS */
+ if (*e && e >= value)
+ *e = '\0';
+ }
+
+ rl_variable_bind (var, value);
+ return 0;
+ }
+
+ /* Skip any whitespace between keyname and funname. */
+ for (; string[i] && whitespace (string[i]); i++);
+ funname = &string[i];
+
+ /* Now isolate funname.
+ For straight function names just look for whitespace, since
+ that will signify the end of the string. But this could be a
+ macro definition. In that case, the string is quoted, so skip
+ to the matching delimiter. We allow the backslash to quote the
+ delimiter characters in the macro body. */
+ /* This code exists to allow whitespace in macro expansions, which
+ would otherwise be gobbled up by the next `for' loop.*/
+ /* XXX - it may be desirable to allow backslash quoting only if " is
+ the quoted string delimiter, like the shell. */
+ if (*funname == '\'' || *funname == '"')
+ {
+ int delimiter, passc;
+
+ delimiter = string[i++];
+ for (passc = 0; c = string[i]; i++)
+ {
+ if (passc)
+ {
+ passc = 0;
+ continue;
+ }
+
+ if (c == '\\')
+ {
+ passc = 1;
+ continue;
+ }
+
+ if (c == delimiter)
+ break;
+ }
+ if (c)
+ i++;
+ }
+
+ /* Advance to the end of the string. */
+ for (; string[i] && !whitespace (string[i]); i++);
+
+ /* No extra whitespace at the end of the string. */
+ string[i] = '\0';
+
+ /* Handle equivalency bindings here. Make the left-hand side be exactly
+ whatever the right-hand evaluates to, including keymaps. */
+ if (equivalency)
+ {
+ return 0;
+ }
+
+ /* If this is a new-style key-binding, then do the binding with
+ rl_bind_keyseq (). Otherwise, let the older code deal with it. */
+ if (*string == '"')
+ {
+ char *seq;
+ register int j, k, passc;
+
+ seq = (char *)xmalloc (1 + strlen (string));
+ for (j = 1, k = passc = 0; string[j]; j++)
+ {
+ /* Allow backslash to quote characters, but leave them in place.
+ This allows a string to end with a backslash quoting another
+ backslash, or with a backslash quoting a double quote. The
+ backslashes are left in place for rl_translate_keyseq (). */
+ if (passc || (string[j] == '\\'))
+ {
+ seq[k++] = string[j];
+ passc = !passc;
+ continue;
+ }
+
+ if (string[j] == '"')
+ break;
+
+ seq[k++] = string[j];
+ }
+ seq[k] = '\0';
+
+ /* Binding macro? */
+ if (*funname == '\'' || *funname == '"')
+ {
+ j = strlen (funname);
+
+ /* Remove the delimiting quotes from each end of FUNNAME. */
+ if (j && funname[j - 1] == *funname)
+ funname[j - 1] = '\0';
+
+ rl_macro_bind (seq, &funname[1], _rl_keymap);
+ }
+ else
+ rl_bind_keyseq (seq, rl_named_function (funname));
+
+ xfree (seq);
+ return 0;
+ }
+
+ /* Get the actual character we want to deal with. */
+ kname = strrchr (string, '-');
+ if (!kname)
+ kname = string;
+ else
+ kname++;
+
+ key = glean_key_from_name (kname);
+
+ /* Add in control and meta bits. */
+ if (substring_member_of_array (string, _rl_possible_control_prefixes))
+ key = CTRL (_rl_to_upper (key));
+
+ if (substring_member_of_array (string, _rl_possible_meta_prefixes))
+ key = META (key);
+
+ /* Temporary. Handle old-style keyname with macro-binding. */
+ if (*funname == '\'' || *funname == '"')
+ {
+ char useq[2];
+ int fl = strlen (funname);
+
+ useq[0] = key; useq[1] = '\0';
+ if (fl && funname[fl - 1] == *funname)
+ funname[fl - 1] = '\0';
+
+ rl_macro_bind (useq, &funname[1], _rl_keymap);
+ }
+#if defined (PREFIX_META_HACK)
+ /* Ugly, but working hack to keep prefix-meta around. */
+ else if (_rl_stricmp (funname, "prefix-meta") == 0)
+ {
+ char seq[2];
+
+ seq[0] = key;
+ seq[1] = '\0';
+ rl_generic_bind (ISKMAP, seq, (char *)emacs_meta_keymap, _rl_keymap);
+ }
+#endif /* PREFIX_META_HACK */
+ else
+ rl_bind_key (key, rl_named_function (funname));
+ return 0;
+}
+
+/* Simple structure for boolean readline variables (i.e., those that can
+ have one of two values; either "On" or 1 for truth, or "Off" or 0 for
+ false. */
+
+#define V_SPECIAL 0x1
+
+static const struct {
+ const char * const name;
+ int *value;
+ int flags;
+} boolean_varlist [] = {
+ { "bind-tty-special-chars", &_rl_bind_stty_chars, 0 },
+ { "blink-matching-paren", &rl_blink_matching_paren, V_SPECIAL },
+ { "byte-oriented", &rl_byte_oriented, 0 },
+ { "completion-ignore-case", &_rl_completion_case_fold, 0 },
+ { "convert-meta", &_rl_convert_meta_chars_to_ascii, 0 },
+ { "disable-completion", &rl_inhibit_completion, 0 },
+ { "echo-control-characters", &_rl_echo_control_chars, 0 },
+ { "enable-keypad", &_rl_enable_keypad, 0 },
+ { "enable-meta-key", &_rl_enable_meta, 0 },
+ { "expand-tilde", &rl_complete_with_tilde_expansion, 0 },
+ { "history-preserve-point", &_rl_history_preserve_point, 0 },
+ { "horizontal-scroll-mode", &_rl_horizontal_scroll_mode, 0 },
+ { "input-meta", &_rl_meta_flag, 0 },
+ { "mark-directories", &_rl_complete_mark_directories, 0 },
+ { "mark-modified-lines", &_rl_mark_modified_lines, 0 },
+ { "mark-symlinked-directories", &_rl_complete_mark_symlink_dirs, 0 },
+ { "match-hidden-files", &_rl_match_hidden_files, 0 },
+ { "meta-flag", &_rl_meta_flag, 0 },
+ { "output-meta", &_rl_output_meta_chars, 0 },
+ { "page-completions", &_rl_page_completions, 0 },
+ { "prefer-visible-bell", &_rl_prefer_visible_bell, V_SPECIAL },
+ { "print-completions-horizontally", &_rl_print_completions_horizontally, 0 },
+ { "revert-all-at-newline", &_rl_revert_all_at_newline, 0 },
+ { "show-all-if-ambiguous", &_rl_complete_show_all, 0 },
+ { "show-all-if-unmodified", &_rl_complete_show_unmodified, 0 },
+ { "skip-completed-text", &_rl_skip_completed_text, 0 },
+#if defined (VISIBLE_STATS)
+ { "visible-stats", &rl_visible_stats, 0 },
+#endif /* VISIBLE_STATS */
+ { (char *)NULL, (int *)NULL }
+};
+
+static int
+find_boolean_var (name)
+ const char *name;
+{
+ register int i;
+
+ for (i = 0; boolean_varlist[i].name; i++)
+ if (_rl_stricmp (name, boolean_varlist[i].name) == 0)
+ return i;
+ return -1;
+}
+
+/* Hooks for handling special boolean variables, where a
+ function needs to be called or another variable needs
+ to be changed when they're changed. */
+static void
+hack_special_boolean_var (i)
+ int i;
+{
+ const char *name;
+
+ name = boolean_varlist[i].name;
+
+ if (_rl_stricmp (name, "blink-matching-paren") == 0)
+ _rl_enable_paren_matching (rl_blink_matching_paren);
+ else if (_rl_stricmp (name, "prefer-visible-bell") == 0)
+ {
+ if (_rl_prefer_visible_bell)
+ _rl_bell_preference = VISIBLE_BELL;
+ else
+ _rl_bell_preference = AUDIBLE_BELL;
+ }
+}
+
+typedef int _rl_sv_func_t PARAMS((const char *));
+
+/* These *must* correspond to the array indices for the appropriate
+ string variable. (Though they're not used right now.) */
+#define V_BELLSTYLE 0
+#define V_COMBEGIN 1
+#define V_EDITMODE 2
+#define V_ISRCHTERM 3
+#define V_KEYMAP 4
+
+#define V_STRING 1
+#define V_INT 2
+
+/* Forward declarations */
+static int sv_bell_style PARAMS((const char *));
+static int sv_combegin PARAMS((const char *));
+static int sv_dispprefix PARAMS((const char *));
+static int sv_compquery PARAMS((const char *));
+static int sv_editmode PARAMS((const char *));
+static int sv_histsize PARAMS((const char *));
+static int sv_isrchterm PARAMS((const char *));
+static int sv_keymap PARAMS((const char *));
+
+static const struct {
+ const char * const name;
+ int flags;
+ _rl_sv_func_t *set_func;
+} string_varlist[] = {
+ { "bell-style", V_STRING, sv_bell_style },
+ { "comment-begin", V_STRING, sv_combegin },
+ { "completion-prefix-display-length", V_INT, sv_dispprefix },
+ { "completion-query-items", V_INT, sv_compquery },
+ { "editing-mode", V_STRING, sv_editmode },
+ { "history-size", V_INT, sv_histsize },
+ { "isearch-terminators", V_STRING, sv_isrchterm },
+ { "keymap", V_STRING, sv_keymap },
+ { (char *)NULL, 0 }
+};
+
+static int
+find_string_var (name)
+ const char *name;
+{
+ register int i;
+
+ for (i = 0; string_varlist[i].name; i++)
+ if (_rl_stricmp (name, string_varlist[i].name) == 0)
+ return i;
+ return -1;
+}
+
+/* A boolean value that can appear in a `set variable' command is true if
+ the value is null or empty, `on' (case-insenstive), or "1". Any other
+ values result in 0 (false). */
+static int
+bool_to_int (value)
+ const char *value;
+{
+ return (value == 0 || *value == '\0' ||
+ (_rl_stricmp (value, "on") == 0) ||
+ (value[0] == '1' && value[1] == '\0'));
+}
+
+char *
+rl_variable_value (name)
+ const char *name;
+{
+ register int i;
+
+ /* Check for simple variables first. */
+ i = find_boolean_var (name);
+ if (i >= 0)
+ return (*boolean_varlist[i].value ? "on" : "off");
+
+ i = find_string_var (name);
+ if (i >= 0)
+ return (_rl_get_string_variable_value (string_varlist[i].name));
+
+ /* Unknown variable names return NULL. */
+ return 0;
+}
+
+int
+rl_variable_bind (name, value)
+ const char *name, *value;
+{
+ register int i;
+ int v;
+
+ /* Check for simple variables first. */
+ i = find_boolean_var (name);
+ if (i >= 0)
+ {
+ *boolean_varlist[i].value = bool_to_int (value);
+ if (boolean_varlist[i].flags & V_SPECIAL)
+ hack_special_boolean_var (i);
+ return 0;
+ }
+
+ i = find_string_var (name);
+
+ /* For the time being, unknown variable names or string names without a
+ handler function are simply ignored. */
+ if (i < 0 || string_varlist[i].set_func == 0)
+ return 0;
+
+ v = (*string_varlist[i].set_func) (value);
+ return v;
+}
+
+static int
+sv_editmode (value)
+ const char *value;
+{
+ if (_rl_strnicmp (value, "vi", 2) == 0)
+ {
+#if defined (VI_MODE)
+ _rl_keymap = vi_insertion_keymap;
+ rl_editing_mode = vi_mode;
+#endif /* VI_MODE */
+ return 0;
+ }
+ else if (_rl_strnicmp (value, "emacs", 5) == 0)
+ {
+ _rl_keymap = emacs_standard_keymap;
+ rl_editing_mode = emacs_mode;
+ return 0;
+ }
+ return 1;
+}
+
+static int
+sv_combegin (value)
+ const char *value;
+{
+ if (value && *value)
+ {
+ FREE (_rl_comment_begin);
+ _rl_comment_begin = savestring (value);
+ return 0;
+ }
+ return 1;
+}
+
+static int
+sv_dispprefix (value)
+ const char *value;
+{
+ int nval = 0;
+
+ if (value && *value)
+ {
+ nval = atoi (value);
+ if (nval < 0)
+ nval = 0;
+ }
+ _rl_completion_prefix_display_length = nval;
+ return 0;
+}
+
+static int
+sv_compquery (value)
+ const char *value;
+{
+ int nval = 100;
+
+ if (value && *value)
+ {
+ nval = atoi (value);
+ if (nval < 0)
+ nval = 0;
+ }
+ rl_completion_query_items = nval;
+ return 0;
+}
+
+static int
+sv_histsize (value)
+ const char *value;
+{
+ int nval = 500;
+
+ if (value && *value)
+ {
+ nval = atoi (value);
+ if (nval < 0)
+ return 1;
+ }
+ stifle_history (nval);
+ return 0;
+}
+
+static int
+sv_keymap (value)
+ const char *value;
+{
+ Keymap kmap;
+
+ kmap = rl_get_keymap_by_name (value);
+ if (kmap)
+ {
+ rl_set_keymap (kmap);
+ return 0;
+ }
+ return 1;
+}
+
+static int
+sv_bell_style (value)
+ const char *value;
+{
+ if (value == 0 || *value == '\0')
+ _rl_bell_preference = AUDIBLE_BELL;
+ else if (_rl_stricmp (value, "none") == 0 || _rl_stricmp (value, "off") == 0)
+ _rl_bell_preference = NO_BELL;
+ else if (_rl_stricmp (value, "audible") == 0 || _rl_stricmp (value, "on") == 0)
+ _rl_bell_preference = AUDIBLE_BELL;
+ else if (_rl_stricmp (value, "visible") == 0)
+ _rl_bell_preference = VISIBLE_BELL;
+ else
+ return 1;
+ return 0;
+}
+
+static int
+sv_isrchterm (value)
+ const char *value;
+{
+ int beg, end, delim;
+ char *v;
+
+ if (value == 0)
+ return 1;
+
+ /* Isolate the value and translate it into a character string. */
+ v = savestring (value);
+ FREE (_rl_isearch_terminators);
+ if (v[0] == '"' || v[0] == '\'')
+ {
+ delim = v[0];
+ for (beg = end = 1; v[end] && v[end] != delim; end++)
+ ;
+ }
+ else
+ {
+ for (beg = end = 0; whitespace (v[end]) == 0; end++)
+ ;
+ }
+
+ v[end] = '\0';
+
+ /* The value starts at v + beg. Translate it into a character string. */
+ _rl_isearch_terminators = (char *)xmalloc (2 * strlen (v) + 1);
+ rl_translate_keyseq (v + beg, _rl_isearch_terminators, &end);
+ _rl_isearch_terminators[end] = '\0';
+
+ xfree (v);
+ return 0;
+}
+
+/* Return the character which matches NAME.
+ For example, `Space' returns ' '. */
+
+typedef struct {
+ const char * const name;
+ int value;
+} assoc_list;
+
+static const assoc_list name_key_alist[] = {
+ { "DEL", 0x7f },
+ { "ESC", '\033' },
+ { "Escape", '\033' },
+ { "LFD", '\n' },
+ { "Newline", '\n' },
+ { "RET", '\r' },
+ { "Return", '\r' },
+ { "Rubout", 0x7f },
+ { "SPC", ' ' },
+ { "Space", ' ' },
+ { "Tab", 0x09 },
+ { (char *)0x0, 0 }
+};
+
+static int
+glean_key_from_name (name)
+ char *name;
+{
+ register int i;
+
+ for (i = 0; name_key_alist[i].name; i++)
+ if (_rl_stricmp (name, name_key_alist[i].name) == 0)
+ return (name_key_alist[i].value);
+
+ return (*(unsigned char *)name); /* XXX was return (*name) */
+}
+
+/* Auxiliary functions to manage keymaps. */
+static const struct {
+ const char * const name;
+ Keymap map;
+} keymap_names[] = {
+ { "emacs", emacs_standard_keymap },
+ { "emacs-standard", emacs_standard_keymap },
+ { "emacs-meta", emacs_meta_keymap },
+ { "emacs-ctlx", emacs_ctlx_keymap },
+#if defined (VI_MODE)
+ { "vi", vi_movement_keymap },
+ { "vi-move", vi_movement_keymap },
+ { "vi-command", vi_movement_keymap },
+ { "vi-insert", vi_insertion_keymap },
+#endif /* VI_MODE */
+ { (char *)0x0, (Keymap)0x0 }
+};
+
+Keymap
+rl_get_keymap_by_name (name)
+ const char *name;
+{
+ register int i;
+
+ for (i = 0; keymap_names[i].name; i++)
+ if (_rl_stricmp (name, keymap_names[i].name) == 0)
+ return (keymap_names[i].map);
+ return ((Keymap) NULL);
+}
+
+char *
+rl_get_keymap_name (map)
+ Keymap map;
+{
+ register int i;
+ for (i = 0; keymap_names[i].name; i++)
+ if (map == keymap_names[i].map)
+ return ((char *)keymap_names[i].name);
+ return ((char *)NULL);
+}
+
+void
+rl_set_keymap (map)
+ Keymap map;
+{
+ if (map)
+ _rl_keymap = map;
+}
+
+Keymap
+rl_get_keymap ()
+{
+ return (_rl_keymap);
+}
+
+void
+rl_set_keymap_from_edit_mode ()
+{
+ if (rl_editing_mode == emacs_mode)
+ _rl_keymap = emacs_standard_keymap;
+#if defined (VI_MODE)
+ else if (rl_editing_mode == vi_mode)
+ _rl_keymap = vi_insertion_keymap;
+#endif /* VI_MODE */
+}
+
+char *
+rl_get_keymap_name_from_edit_mode ()
+{
+ if (rl_editing_mode == emacs_mode)
+ return "emacs";
+#if defined (VI_MODE)
+ else if (rl_editing_mode == vi_mode)
+ return "vi";
+#endif /* VI_MODE */
+ else
+ return "none";
+}
+
+/* **************************************************************** */
+/* */
+/* Key Binding and Function Information */
+/* */
+/* **************************************************************** */
+
+/* Each of the following functions produces information about the
+ state of keybindings and functions known to Readline. The info
+ is always printed to rl_outstream, and in such a way that it can
+ be read back in (i.e., passed to rl_parse_and_bind ()). */
+
+/* Print the names of functions known to Readline. */
+void
+rl_list_funmap_names ()
+{
+ register int i;
+ const char **funmap_names;
+
+ funmap_names = rl_funmap_names ();
+
+ if (!funmap_names)
+ return;
+
+ for (i = 0; funmap_names[i]; i++)
+ fprintf (rl_outstream, "%s\n", funmap_names[i]);
+
+ xfree (funmap_names);
+}
+
+static char *
+_rl_get_keyname (key)
+ int key;
+{
+ char *keyname;
+ int i, c;
+
+ keyname = (char *)xmalloc (8);
+
+ c = key;
+ /* Since this is going to be used to write out keysequence-function
+ pairs for possible inclusion in an inputrc file, we don't want to
+ do any special meta processing on KEY. */
+
+#if 1
+ /* XXX - Experimental */
+ /* We might want to do this, but the old version of the code did not. */
+
+ /* If this is an escape character, we don't want to do any more processing.
+ Just add the special ESC key sequence and return. */
+ if (c == ESC)
+ {
+ keyname[0] = '\\';
+ keyname[1] = 'e';
+ keyname[2] = '\0';
+ return keyname;
+ }
+#endif
+
+ /* RUBOUT is translated directly into \C-? */
+ if (key == RUBOUT)
+ {
+ keyname[0] = '\\';
+ keyname[1] = 'C';
+ keyname[2] = '-';
+ keyname[3] = '?';
+ keyname[4] = '\0';
+ return keyname;
+ }
+
+ i = 0;
+ /* Now add special prefixes needed for control characters. This can
+ potentially change C. */
+ if (CTRL_CHAR (c))
+ {
+ keyname[i++] = '\\';
+ keyname[i++] = 'C';
+ keyname[i++] = '-';
+ c = _rl_to_lower (UNCTRL (c));
+ }
+
+ /* XXX experimental code. Turn the characters that are not ASCII or
+ ISO Latin 1 (128 - 159) into octal escape sequences (\200 - \237).
+ This changes C. */
+ if (c >= 128 && c <= 159)
+ {
+ keyname[i++] = '\\';
+ keyname[i++] = '2';
+ c -= 128;
+ keyname[i++] = (c / 8) + '0';
+ c = (c % 8) + '0';
+ }
+
+ /* Now, if the character needs to be quoted with a backslash, do that. */
+ if (c == '\\' || c == '"')
+ keyname[i++] = '\\';
+
+ /* Now add the key, terminate the string, and return it. */
+ keyname[i++] = (char) c;
+ keyname[i] = '\0';
+
+ return keyname;
+}
+
+/* Return a NULL terminated array of strings which represent the key
+ sequences that are used to invoke FUNCTION in MAP. */
+char **
+rl_invoking_keyseqs_in_map (function, map)
+ rl_command_func_t *function;
+ Keymap map;
+{
+ register int key;
+ char **result;
+ int result_index, result_size;
+
+ result = (char **)NULL;
+ result_index = result_size = 0;
+
+ for (key = 0; key < KEYMAP_SIZE; key++)
+ {
+ switch (map[key].type)
+ {
+ case ISMACR:
+ /* Macros match, if, and only if, the pointers are identical.
+ Thus, they are treated exactly like functions in here. */
+ case ISFUNC:
+ /* If the function in the keymap is the one we are looking for,
+ then add the current KEY to the list of invoking keys. */
+ if (map[key].function == function)
+ {
+ char *keyname;
+
+ keyname = _rl_get_keyname (key);
+
+ if (result_index + 2 > result_size)
+ {
+ result_size += 10;
+ result = (char **)xrealloc (result, result_size * sizeof (char *));
+ }
+
+ result[result_index++] = keyname;
+ result[result_index] = (char *)NULL;
+ }
+ break;
+
+ case ISKMAP:
+ {
+ char **seqs;
+ register int i;
+
+ /* Find the list of keyseqs in this map which have FUNCTION as
+ their target. Add the key sequences found to RESULT. */
+ if (map[key].function)
+ seqs =
+ rl_invoking_keyseqs_in_map (function, FUNCTION_TO_KEYMAP (map, key));
+ else
+ break;
+
+ if (seqs == 0)
+ break;
+
+ for (i = 0; seqs[i]; i++)
+ {
+ char *keyname = (char *)xmalloc (6 + strlen (seqs[i]));
+
+ if (key == ESC)
+ {
+ /* If ESC is the meta prefix and we're converting chars
+ with the eighth bit set to ESC-prefixed sequences, then
+ we can use \M-. Otherwise we need to use the sequence
+ for ESC. */
+ if (_rl_convert_meta_chars_to_ascii && map[ESC].type == ISKMAP)
+ sprintf (keyname, "\\M-");
+ else
+ sprintf (keyname, "\\e");
+ }
+ else if (CTRL_CHAR (key))
+ sprintf (keyname, "\\C-%c", _rl_to_lower (UNCTRL (key)));
+ else if (key == RUBOUT)
+ sprintf (keyname, "\\C-?");
+ else if (key == '\\' || key == '"')
+ {
+ keyname[0] = '\\';
+ keyname[1] = (char) key;
+ keyname[2] = '\0';
+ }
+ else
+ {
+ keyname[0] = (char) key;
+ keyname[1] = '\0';
+ }
+
+ strcat (keyname, seqs[i]);
+ xfree (seqs[i]);
+
+ if (result_index + 2 > result_size)
+ {
+ result_size += 10;
+ result = (char **)xrealloc (result, result_size * sizeof (char *));
+ }
+
+ result[result_index++] = keyname;
+ result[result_index] = (char *)NULL;
+ }
+
+ xfree (seqs);
+ }
+ break;
+ }
+ }
+ return (result);
+}
+
+/* Return a NULL terminated array of strings which represent the key
+ sequences that can be used to invoke FUNCTION using the current keymap. */
+char **
+rl_invoking_keyseqs (function)
+ rl_command_func_t *function;
+{
+ return (rl_invoking_keyseqs_in_map (function, _rl_keymap));
+}
+
+/* Print all of the functions and their bindings to rl_outstream. If
+ PRINT_READABLY is non-zero, then print the output in such a way
+ that it can be read back in. */
+void
+rl_function_dumper (print_readably)
+ int print_readably;
+{
+ register int i;
+ const char **names;
+ const char *name;
+
+ names = rl_funmap_names ();
+
+ fprintf (rl_outstream, "\n");
+
+ for (i = 0; name = names[i]; i++)
+ {
+ rl_command_func_t *function;
+ char **invokers;
+
+ function = rl_named_function (name);
+ invokers = rl_invoking_keyseqs_in_map (function, _rl_keymap);
+
+ if (print_readably)
+ {
+ if (!invokers)
+ fprintf (rl_outstream, "# %s (not bound)\n", name);
+ else
+ {
+ register int j;
+
+ for (j = 0; invokers[j]; j++)
+ {
+ fprintf (rl_outstream, "\"%s\": %s\n",
+ invokers[j], name);
+ xfree (invokers[j]);
+ }
+
+ xfree (invokers);
+ }
+ }
+ else
+ {
+ if (!invokers)
+ fprintf (rl_outstream, "%s is not bound to any keys\n",
+ name);
+ else
+ {
+ register int j;
+
+ fprintf (rl_outstream, "%s can be found on ", name);
+
+ for (j = 0; invokers[j] && j < 5; j++)
+ {
+ fprintf (rl_outstream, "\"%s\"%s", invokers[j],
+ invokers[j + 1] ? ", " : ".\n");
+ }
+
+ if (j == 5 && invokers[j])
+ fprintf (rl_outstream, "...\n");
+
+ for (j = 0; invokers[j]; j++)
+ xfree (invokers[j]);
+
+ xfree (invokers);
+ }
+ }
+ }
+}
+
+/* Print all of the current functions and their bindings to
+ rl_outstream. If an explicit argument is given, then print
+ the output in such a way that it can be read back in. */
+int
+rl_dump_functions (count, key)
+ int count, key;
+{
+ if (rl_dispatching)
+ fprintf (rl_outstream, "\r\n");
+ rl_function_dumper (rl_explicit_arg);
+ rl_on_new_line ();
+ return (0);
+}
+
+static void
+_rl_macro_dumper_internal (print_readably, map, prefix)
+ int print_readably;
+ Keymap map;
+ char *prefix;
+{
+ register int key;
+ char *keyname, *out;
+ int prefix_len;
+
+ for (key = 0; key < KEYMAP_SIZE; key++)
+ {
+ switch (map[key].type)
+ {
+ case ISMACR:
+ keyname = _rl_get_keyname (key);
+ out = _rl_untranslate_macro_value ((char *)map[key].function);
+
+ if (print_readably)
+ fprintf (rl_outstream, "\"%s%s\": \"%s\"\n", prefix ? prefix : "",
+ keyname,
+ out ? out : "");
+ else
+ fprintf (rl_outstream, "%s%s outputs %s\n", prefix ? prefix : "",
+ keyname,
+ out ? out : "");
+ xfree (keyname);
+ xfree (out);
+ break;
+ case ISFUNC:
+ break;
+ case ISKMAP:
+ prefix_len = prefix ? strlen (prefix) : 0;
+ if (key == ESC)
+ {
+ keyname = (char *)xmalloc (3 + prefix_len);
+ if (prefix)
+ strcpy (keyname, prefix);
+ keyname[prefix_len] = '\\';
+ keyname[prefix_len + 1] = 'e';
+ keyname[prefix_len + 2] = '\0';
+ }
+ else
+ {
+ keyname = _rl_get_keyname (key);
+ if (prefix)
+ {
+ out = (char *)xmalloc (strlen (keyname) + prefix_len + 1);
+ strcpy (out, prefix);
+ strcpy (out + prefix_len, keyname);
+ xfree (keyname);
+ keyname = out;
+ }
+ }
+
+ _rl_macro_dumper_internal (print_readably, FUNCTION_TO_KEYMAP (map, key), keyname);
+ xfree (keyname);
+ break;
+ }
+ }
+}
+
+void
+rl_macro_dumper (print_readably)
+ int print_readably;
+{
+ _rl_macro_dumper_internal (print_readably, _rl_keymap, (char *)NULL);
+}
+
+int
+rl_dump_macros (count, key)
+ int count, key;
+{
+ if (rl_dispatching)
+ fprintf (rl_outstream, "\r\n");
+ rl_macro_dumper (rl_explicit_arg);
+ rl_on_new_line ();
+ return (0);
+}
+
+static char *
+_rl_get_string_variable_value (name)
+ const char *name;
+{
+ static char numbuf[32];
+ char *ret;
+
+ if (_rl_stricmp (name, "bell-style") == 0)
+ {
+ switch (_rl_bell_preference)
+ {
+ case NO_BELL:
+ return "none";
+ case VISIBLE_BELL:
+ return "visible";
+ case AUDIBLE_BELL:
+ default:
+ return "audible";
+ }
+ }
+ else if (_rl_stricmp (name, "comment-begin") == 0)
+ return (_rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT);
+ else if (_rl_stricmp (name, "completion-prefix-display-length") == 0)
+ {
+ sprintf (numbuf, "%d", _rl_completion_prefix_display_length);
+ return (numbuf);
+ }
+ else if (_rl_stricmp (name, "completion-query-items") == 0)
+ {
+ sprintf (numbuf, "%d", rl_completion_query_items);
+ return (numbuf);
+ }
+ else if (_rl_stricmp (name, "editing-mode") == 0)
+ return (rl_get_keymap_name_from_edit_mode ());
+ else if (_rl_stricmp (name, "history-size") == 0)
+ {
+ sprintf (numbuf, "%d", history_is_stifled() ? history_max_entries : 0);
+ return (numbuf);
+ }
+ else if (_rl_stricmp (name, "isearch-terminators") == 0)
+ {
+ if (_rl_isearch_terminators == 0)
+ return 0;
+ ret = _rl_untranslate_macro_value (_rl_isearch_terminators);
+ if (ret)
+ {
+ strncpy (numbuf, ret, sizeof (numbuf) - 1);
+ xfree (ret);
+ numbuf[sizeof(numbuf) - 1] = '\0';
+ }
+ else
+ numbuf[0] = '\0';
+ return numbuf;
+ }
+ else if (_rl_stricmp (name, "keymap") == 0)
+ {
+ ret = rl_get_keymap_name (_rl_keymap);
+ if (ret == 0)
+ ret = rl_get_keymap_name_from_edit_mode ();
+ return (ret ? ret : "none");
+ }
+ else
+ return (0);
+}
+
+void
+rl_variable_dumper (print_readably)
+ int print_readably;
+{
+ int i;
+ char *v;
+
+ for (i = 0; boolean_varlist[i].name; i++)
+ {
+ if (print_readably)
+ fprintf (rl_outstream, "set %s %s\n", boolean_varlist[i].name,
+ *boolean_varlist[i].value ? "on" : "off");
+ else
+ fprintf (rl_outstream, "%s is set to `%s'\n", boolean_varlist[i].name,
+ *boolean_varlist[i].value ? "on" : "off");
+ }
+
+ for (i = 0; string_varlist[i].name; i++)
+ {
+ v = _rl_get_string_variable_value (string_varlist[i].name);
+ if (v == 0) /* _rl_isearch_terminators can be NULL */
+ continue;
+ if (print_readably)
+ fprintf (rl_outstream, "set %s %s\n", string_varlist[i].name, v);
+ else
+ fprintf (rl_outstream, "%s is set to `%s'\n", string_varlist[i].name, v);
+ }
+}
+
+/* Print all of the current variables and their values to
+ rl_outstream. If an explicit argument is given, then print
+ the output in such a way that it can be read back in. */
+int
+rl_dump_variables (count, key)
+ int count, key;
+{
+ if (rl_dispatching)
+ fprintf (rl_outstream, "\r\n");
+ rl_variable_dumper (rl_explicit_arg);
+ rl_on_new_line ();
+ return (0);
+}
+
+/* Return non-zero if any members of ARRAY are a substring in STRING. */
+static int
+substring_member_of_array (string, array)
+ const char *string;
+ const char * const *array;
+{
+ while (*array)
+ {
+ if (_rl_strindex (string, *array))
+ return (1);
+ array++;
+ }
+ return (0);
+}
diff --git a/lib/readline/callback.c b/lib/readline/callback.c
new file mode 100644
index 0000000..6c52ac0
--- /dev/null
+++ b/lib/readline/callback.c
@@ -0,0 +1,261 @@
+/* callback.c -- functions to use readline as an X `callback' mechanism. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include "rlconf.h"
+
+#if defined (READLINE_CALLBACKS)
+
+#include <sys/types.h>
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif
+
+#include <stdio.h>
+
+/* System-specific feature definitions and include files. */
+#include "rldefs.h"
+#include "readline.h"
+#include "rlprivate.h"
+#include "xmalloc.h"
+
+/* Private data for callback registration functions. See comments in
+ rl_callback_read_char for more details. */
+_rl_callback_func_t *_rl_callback_func = 0;
+_rl_callback_generic_arg *_rl_callback_data = 0;
+
+/* **************************************************************** */
+/* */
+/* Callback Readline Functions */
+/* */
+/* **************************************************************** */
+
+/* Allow using readline in situations where a program may have multiple
+ things to handle at once, and dispatches them via select(). Call
+ rl_callback_handler_install() with the prompt and a function to call
+ whenever a complete line of input is ready. The user must then
+ call rl_callback_read_char() every time some input is available, and
+ rl_callback_read_char() will call the user's function with the complete
+ text read in at each end of line. The terminal is kept prepped and
+ signals handled all the time, except during calls to the user's function. */
+
+rl_vcpfunc_t *rl_linefunc; /* user callback function */
+static int in_handler; /* terminal_prepped and signals set? */
+
+/* Make sure the terminal is set up, initialize readline, and prompt. */
+static void
+_rl_callback_newline ()
+{
+ rl_initialize ();
+
+ if (in_handler == 0)
+ {
+ in_handler = 1;
+
+ if (rl_prep_term_function)
+ (*rl_prep_term_function) (_rl_meta_flag);
+
+#if defined (HANDLE_SIGNALS)
+ rl_set_signals ();
+#endif
+ }
+
+ readline_internal_setup ();
+ RL_CHECK_SIGNALS ();
+}
+
+/* Install a readline handler, set up the terminal, and issue the prompt. */
+void
+rl_callback_handler_install (prompt, linefunc)
+ const char *prompt;
+ rl_vcpfunc_t *linefunc;
+{
+ rl_set_prompt (prompt);
+ RL_SETSTATE (RL_STATE_CALLBACK);
+ rl_linefunc = linefunc;
+ _rl_callback_newline ();
+}
+
+/* Read one character, and dispatch to the handler if it ends the line. */
+void
+rl_callback_read_char ()
+{
+ char *line;
+ int eof, jcode;
+ static procenv_t olevel;
+
+ if (rl_linefunc == NULL)
+ {
+ _rl_errmsg ("readline_callback_read_char() called with no handler!");
+ abort ();
+ }
+
+ memcpy ((void *)olevel, (void *)_rl_top_level, sizeof (procenv_t));
+ jcode = setjmp (_rl_top_level);
+ if (jcode)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ memcpy ((void *)_rl_top_level, (void *)olevel, sizeof (procenv_t));
+ return;
+ }
+
+ do
+ {
+ RL_CHECK_SIGNALS ();
+ if (RL_ISSTATE (RL_STATE_ISEARCH))
+ {
+ eof = _rl_isearch_callback (_rl_iscxt);
+ if (eof == 0 && (RL_ISSTATE (RL_STATE_ISEARCH) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING))
+ rl_callback_read_char ();
+
+ return;
+ }
+ else if (RL_ISSTATE (RL_STATE_NSEARCH))
+ {
+ eof = _rl_nsearch_callback (_rl_nscxt);
+ return;
+ }
+ else if (RL_ISSTATE (RL_STATE_NUMERICARG))
+ {
+ eof = _rl_arg_callback (_rl_argcxt);
+ if (eof == 0 && (RL_ISSTATE (RL_STATE_NUMERICARG) == 0) && RL_ISSTATE (RL_STATE_INPUTPENDING))
+ rl_callback_read_char ();
+ /* XXX - this should handle _rl_last_command_was_kill better */
+ else if (RL_ISSTATE (RL_STATE_NUMERICARG) == 0)
+ _rl_internal_char_cleanup ();
+
+ return;
+ }
+ else if (RL_ISSTATE (RL_STATE_MULTIKEY))
+ {
+ eof = _rl_dispatch_callback (_rl_kscxt); /* For now */
+ while ((eof == -1 || eof == -2) && RL_ISSTATE (RL_STATE_MULTIKEY) && _rl_kscxt && (_rl_kscxt->flags & KSEQ_DISPATCHED))
+ eof = _rl_dispatch_callback (_rl_kscxt);
+ if (RL_ISSTATE (RL_STATE_MULTIKEY) == 0)
+ {
+ _rl_internal_char_cleanup ();
+ _rl_want_redisplay = 1;
+ }
+ }
+ else if (_rl_callback_func)
+ {
+ /* This allows functions that simply need to read an additional
+ character (like quoted-insert) to register a function to be
+ called when input is available. _rl_callback_data is simply a
+ pointer to a struct that has the argument count originally
+ passed to the registering function and space for any additional
+ parameters. */
+ eof = (*_rl_callback_func) (_rl_callback_data);
+ /* If the function `deregisters' itself, make sure the data is
+ cleaned up. */
+ if (_rl_callback_func == 0)
+ {
+ if (_rl_callback_data)
+ {
+ _rl_callback_data_dispose (_rl_callback_data);
+ _rl_callback_data = 0;
+ }
+ _rl_internal_char_cleanup ();
+ }
+ }
+ else
+ eof = readline_internal_char ();
+
+ RL_CHECK_SIGNALS ();
+ if (rl_done == 0 && _rl_want_redisplay)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ }
+
+ if (rl_done)
+ {
+ line = readline_internal_teardown (eof);
+
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
+#if defined (HANDLE_SIGNALS)
+ rl_clear_signals ();
+#endif
+ in_handler = 0;
+ (*rl_linefunc) (line);
+
+ /* If the user did not clear out the line, do it for him. */
+ if (rl_line_buffer[0])
+ _rl_init_line_state ();
+
+ /* Redisplay the prompt if readline_handler_{install,remove}
+ not called. */
+ if (in_handler == 0 && rl_linefunc)
+ _rl_callback_newline ();
+ }
+ }
+ while (rl_pending_input || _rl_pushed_input_available () || RL_ISSTATE (RL_STATE_MACROINPUT));
+}
+
+/* Remove the handler, and make sure the terminal is in its normal state. */
+void
+rl_callback_handler_remove ()
+{
+ rl_linefunc = NULL;
+ RL_UNSETSTATE (RL_STATE_CALLBACK);
+ RL_CHECK_SIGNALS ();
+ if (in_handler)
+ {
+ in_handler = 0;
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
+#if defined (HANDLE_SIGNALS)
+ rl_clear_signals ();
+#endif
+ }
+}
+
+_rl_callback_generic_arg *
+_rl_callback_data_alloc (count)
+ int count;
+{
+ _rl_callback_generic_arg *arg;
+
+ arg = (_rl_callback_generic_arg *)xmalloc (sizeof (_rl_callback_generic_arg));
+ arg->count = count;
+
+ arg->i1 = arg->i2 = 0;
+
+ return arg;
+}
+
+void _rl_callback_data_dispose (arg)
+ _rl_callback_generic_arg *arg;
+{
+ xfree (arg);
+}
+
+#endif
diff --git a/lib/readline/chardefs.h b/lib/readline/chardefs.h
new file mode 100644
index 0000000..e76c34b
--- /dev/null
+++ b/lib/readline/chardefs.h
@@ -0,0 +1,164 @@
+/* chardefs.h -- Character definitions for readline. */
+
+/* Copyright (C) 1994-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _CHARDEFS_H_
+#define _CHARDEFS_H_
+
+#include <ctype.h>
+
+#if defined (HAVE_CONFIG_H)
+# if defined (HAVE_STRING_H)
+# if ! defined (STDC_HEADERS) && defined (HAVE_MEMORY_H)
+# include <memory.h>
+# endif
+# include <string.h>
+# endif /* HAVE_STRING_H */
+# if defined (HAVE_STRINGS_H)
+# include <strings.h>
+# endif /* HAVE_STRINGS_H */
+#else
+# include <string.h>
+#endif /* !HAVE_CONFIG_H */
+
+#ifndef whitespace
+#define whitespace(c) (((c) == ' ') || ((c) == '\t'))
+#endif
+
+#ifdef CTRL
+# undef CTRL
+#endif
+#ifdef UNCTRL
+# undef UNCTRL
+#endif
+
+/* Some character stuff. */
+#define control_character_threshold 0x020 /* Smaller than this is control. */
+#define control_character_mask 0x1f /* 0x20 - 1 */
+#define meta_character_threshold 0x07f /* Larger than this is Meta. */
+#define control_character_bit 0x40 /* 0x000000, must be off. */
+#define meta_character_bit 0x080 /* x0000000, must be on. */
+#define largest_char 255 /* Largest character value. */
+
+#define CTRL_CHAR(c) ((c) < control_character_threshold && (((c) & 0x80) == 0))
+#define META_CHAR(c) ((c) > meta_character_threshold && (c) <= largest_char)
+
+#define CTRL(c) ((c) & control_character_mask)
+#define META(c) ((c) | meta_character_bit)
+
+#define UNMETA(c) ((c) & (~meta_character_bit))
+#define UNCTRL(c) _rl_to_upper(((c)|control_character_bit))
+
+#if defined STDC_HEADERS || (!defined (isascii) && !defined (HAVE_ISASCII))
+# define IN_CTYPE_DOMAIN(c) 1
+#else
+# define IN_CTYPE_DOMAIN(c) isascii(c)
+#endif
+
+#if !defined (isxdigit) && !defined (HAVE_ISXDIGIT)
+# define isxdigit(c) (isdigit((c)) || ((c) >= 'a' && (c) <= 'f') || ((c) >= 'A' && (c) <= 'F'))
+#endif
+
+#if defined (CTYPE_NON_ASCII)
+# define NON_NEGATIVE(c) 1
+#else
+# define NON_NEGATIVE(c) ((unsigned char)(c) == (c))
+#endif
+
+/* Some systems define these; we want our definitions. */
+#undef ISPRINT
+
+/* Beware: these only work with single-byte ASCII characters. */
+
+#define ISALNUM(c) (IN_CTYPE_DOMAIN (c) && isalnum (c))
+#define ISALPHA(c) (IN_CTYPE_DOMAIN (c) && isalpha (c))
+#define ISDIGIT(c) (IN_CTYPE_DOMAIN (c) && isdigit (c))
+#define ISLOWER(c) (IN_CTYPE_DOMAIN (c) && islower (c))
+#define ISPRINT(c) (IN_CTYPE_DOMAIN (c) && isprint (c))
+#define ISUPPER(c) (IN_CTYPE_DOMAIN (c) && isupper (c))
+#define ISXDIGIT(c) (IN_CTYPE_DOMAIN (c) && isxdigit (c))
+
+#define _rl_lowercase_p(c) (NON_NEGATIVE(c) && ISLOWER(c))
+#define _rl_uppercase_p(c) (NON_NEGATIVE(c) && ISUPPER(c))
+#define _rl_digit_p(c) ((c) >= '0' && (c) <= '9')
+
+#define _rl_pure_alphabetic(c) (NON_NEGATIVE(c) && ISALPHA(c))
+#define ALPHABETIC(c) (NON_NEGATIVE(c) && ISALNUM(c))
+
+#ifndef _rl_to_upper
+# define _rl_to_upper(c) (_rl_lowercase_p(c) ? toupper((unsigned char)c) : (c))
+# define _rl_to_lower(c) (_rl_uppercase_p(c) ? tolower((unsigned char)c) : (c))
+#endif
+
+#ifndef _rl_digit_value
+# define _rl_digit_value(x) ((x) - '0')
+#endif
+
+#ifndef _rl_isident
+# define _rl_isident(c) (ISALNUM(c) || (c) == '_')
+#endif
+
+#ifndef ISOCTAL
+# define ISOCTAL(c) ((c) >= '0' && (c) <= '7')
+#endif
+#define OCTVALUE(c) ((c) - '0')
+
+#define HEXVALUE(c) \
+ (((c) >= 'a' && (c) <= 'f') \
+ ? (c)-'a'+10 \
+ : (c) >= 'A' && (c) <= 'F' ? (c)-'A'+10 : (c)-'0')
+
+#ifndef NEWLINE
+#define NEWLINE '\n'
+#endif
+
+#ifndef RETURN
+#define RETURN CTRL('M')
+#endif
+
+#ifndef RUBOUT
+#define RUBOUT 0x7f
+#endif
+
+#ifndef TAB
+#define TAB '\t'
+#endif
+
+#ifdef ABORT_CHAR
+#undef ABORT_CHAR
+#endif
+#define ABORT_CHAR CTRL('G')
+
+#ifdef PAGE
+#undef PAGE
+#endif
+#define PAGE CTRL('L')
+
+#ifdef SPACE
+#undef SPACE
+#endif
+#define SPACE ' ' /* XXX - was 0x20 */
+
+#ifdef ESC
+#undef ESC
+#endif
+#define ESC CTRL('[')
+
+#endif /* _CHARDEFS_H_ */
diff --git a/lib/readline/compat.c b/lib/readline/compat.c
new file mode 100644
index 0000000..2af5120
--- /dev/null
+++ b/lib/readline/compat.c
@@ -0,0 +1,113 @@
+/* compat.c -- backwards compatibility functions. */
+
+/* Copyright (C) 2000-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include "rlstdc.h"
+#include "rltypedefs.h"
+
+extern void rl_free_undo_list PARAMS((void));
+extern int rl_maybe_save_line PARAMS((void));
+extern int rl_maybe_unsave_line PARAMS((void));
+extern int rl_maybe_replace_line PARAMS((void));
+
+extern int rl_crlf PARAMS((void));
+extern int rl_ding PARAMS((void));
+extern int rl_alphabetic PARAMS((int));
+
+extern char **rl_completion_matches PARAMS((const char *, rl_compentry_func_t *));
+extern char *rl_username_completion_function PARAMS((const char *, int));
+extern char *rl_filename_completion_function PARAMS((const char *, int));
+
+/* Provide backwards-compatible entry points for old function names. */
+
+void
+free_undo_list ()
+{
+ rl_free_undo_list ();
+}
+
+int
+maybe_replace_line ()
+{
+ return rl_maybe_replace_line ();
+}
+
+int
+maybe_save_line ()
+{
+ return rl_maybe_save_line ();
+}
+
+int
+maybe_unsave_line ()
+{
+ return rl_maybe_unsave_line ();
+}
+
+int
+ding ()
+{
+ return rl_ding ();
+}
+
+int
+crlf ()
+{
+ return rl_crlf ();
+}
+
+int
+alphabetic (c)
+ int c;
+{
+ return rl_alphabetic (c);
+}
+
+char **
+completion_matches (s, f)
+ const char *s;
+ rl_compentry_func_t *f;
+{
+ return rl_completion_matches (s, f);
+}
+
+char *
+username_completion_function (s, i)
+ const char *s;
+ int i;
+{
+ return rl_username_completion_function (s, i);
+}
+
+char *
+filename_completion_function (s, i)
+ const char *s;
+ int i;
+{
+ return rl_filename_completion_function (s, i);
+}
diff --git a/lib/readline/complete.c b/lib/readline/complete.c
new file mode 100644
index 0000000..bda2204
--- /dev/null
+++ b/lib/readline/complete.c
@@ -0,0 +1,2530 @@
+/* complete.c -- filename completion for readline. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <fcntl.h>
+#if defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#include <stdio.h>
+
+#include <errno.h>
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+#if defined (HAVE_PWD_H)
+#include <pwd.h>
+#endif
+
+#include "posixdir.h"
+#include "posixstat.h"
+
+/* System-specific feature definitions and include files. */
+#include "rldefs.h"
+#include "rlmbutil.h"
+
+/* Some standard library routines. */
+#include "readline.h"
+#include "xmalloc.h"
+#include "rlprivate.h"
+
+#ifdef __STDC__
+typedef int QSFUNC (const void *, const void *);
+#else
+typedef int QSFUNC ();
+#endif
+
+#ifdef HAVE_LSTAT
+# define LSTAT lstat
+#else
+# define LSTAT stat
+#endif
+
+/* Unix version of a hidden file. Could be different on other systems. */
+#define HIDDEN_FILE(fname) ((fname)[0] == '.')
+
+/* Most systems don't declare getpwent in <pwd.h> if _POSIX_SOURCE is
+ defined. */
+#if defined (HAVE_GETPWENT) && (!defined (HAVE_GETPW_DECLS) || defined (_POSIX_SOURCE))
+extern struct passwd *getpwent PARAMS((void));
+#endif /* HAVE_GETPWENT && (!HAVE_GETPW_DECLS || _POSIX_SOURCE) */
+
+/* If non-zero, then this is the address of a function to call when
+ completing a word would normally display the list of possible matches.
+ This function is called instead of actually doing the display.
+ It takes three arguments: (char **matches, int num_matches, int max_length)
+ where MATCHES is the array of strings that matched, NUM_MATCHES is the
+ number of strings in that array, and MAX_LENGTH is the length of the
+ longest string in that array. */
+rl_compdisp_func_t *rl_completion_display_matches_hook = (rl_compdisp_func_t *)NULL;
+
+#if defined (VISIBLE_STATS)
+# if !defined (X_OK)
+# define X_OK 1
+# endif
+static int stat_char PARAMS((char *));
+#endif
+
+static int path_isdir PARAMS((const char *));
+
+static char *rl_quote_filename PARAMS((char *, int, char *));
+
+static void set_completion_defaults PARAMS((int));
+static int get_y_or_n PARAMS((int));
+static int _rl_internal_pager PARAMS((int));
+static char *printable_part PARAMS((char *));
+static int fnwidth PARAMS((const char *));
+static int fnprint PARAMS((const char *, int));
+static int print_filename PARAMS((char *, char *, int));
+
+static char **gen_completion_matches PARAMS((char *, int, int, rl_compentry_func_t *, int, int));
+
+static char **remove_duplicate_matches PARAMS((char **));
+static void insert_match PARAMS((char *, int, int, char *));
+static int append_to_match PARAMS((char *, int, int, int));
+static void insert_all_matches PARAMS((char **, int, char *));
+static void display_matches PARAMS((char **));
+static int compute_lcd_of_matches PARAMS((char **, int, const char *));
+static int postprocess_matches PARAMS((char ***, int));
+
+static char *make_quoted_replacement PARAMS((char *, int, char *));
+
+/* **************************************************************** */
+/* */
+/* Completion matching, from readline's point of view. */
+/* */
+/* **************************************************************** */
+
+/* Variables known only to the readline library. */
+
+/* If non-zero, non-unique completions always show the list of matches. */
+int _rl_complete_show_all = 0;
+
+/* If non-zero, non-unique completions show the list of matches, unless it
+ is not possible to do partial completion and modify the line. */
+int _rl_complete_show_unmodified = 0;
+
+/* If non-zero, completed directory names have a slash appended. */
+int _rl_complete_mark_directories = 1;
+
+/* If non-zero, the symlinked directory completion behavior introduced in
+ readline-4.2a is disabled, and symlinks that point to directories have
+ a slash appended (subject to the value of _rl_complete_mark_directories).
+ This is user-settable via the mark-symlinked-directories variable. */
+int _rl_complete_mark_symlink_dirs = 0;
+
+/* If non-zero, completions are printed horizontally in alphabetical order,
+ like `ls -x'. */
+int _rl_print_completions_horizontally;
+
+/* Non-zero means that case is not significant in filename completion. */
+#if defined (__MSDOS__) && !defined (__DJGPP__)
+int _rl_completion_case_fold = 1;
+#else
+int _rl_completion_case_fold;
+#endif
+
+/* If non-zero, don't match hidden files (filenames beginning with a `.' on
+ Unix) when doing filename completion. */
+int _rl_match_hidden_files = 1;
+
+/* Length in characters of a common prefix replaced with an ellipsis (`...')
+ when displaying completion matches. Matches whose printable portion has
+ more than this number of displaying characters in common will have the common
+ display prefix replaced with an ellipsis. */
+int _rl_completion_prefix_display_length = 0;
+
+/* Global variables available to applications using readline. */
+
+#if defined (VISIBLE_STATS)
+/* Non-zero means add an additional character to each filename displayed
+ during listing completion iff rl_filename_completion_desired which helps
+ to indicate the type of file being listed. */
+int rl_visible_stats = 0;
+#endif /* VISIBLE_STATS */
+
+/* If non-zero, when completing in the middle of a word, don't insert
+ characters from the match that match characters following point in
+ the word. This means, for instance, completing when the cursor is
+ after the `e' in `Makefile' won't result in `Makefilefile'. */
+int _rl_skip_completed_text = 0;
+
+/* If non-zero, then this is the address of a function to call when
+ completing on a directory name. The function is called with
+ the address of a string (the current directory name) as an arg. */
+rl_icppfunc_t *rl_directory_completion_hook = (rl_icppfunc_t *)NULL;
+
+rl_icppfunc_t *rl_directory_rewrite_hook = (rl_icppfunc_t *)NULL;
+
+/* If non-zero, this is the address of a function to call when reading
+ directory entries from the filesystem for completion and comparing
+ them to the partial word to be completed. The function should
+ either return its first argument (if no conversion takes place) or
+ newly-allocated memory. This can, for instance, convert filenames
+ between character sets for comparison against what's typed at the
+ keyboard. The returned value is what is added to the list of
+ matches. The second argument is the length of the filename to be
+ converted. */
+rl_dequote_func_t *rl_filename_rewrite_hook = (rl_dequote_func_t *)NULL;
+
+/* Non-zero means readline completion functions perform tilde expansion. */
+int rl_complete_with_tilde_expansion = 0;
+
+/* Pointer to the generator function for completion_matches ().
+ NULL means to use rl_filename_completion_function (), the default filename
+ completer. */
+rl_compentry_func_t *rl_completion_entry_function = (rl_compentry_func_t *)NULL;
+
+/* Pointer to generator function for rl_menu_complete (). NULL means to use
+ *rl_completion_entry_function (see above). */
+rl_compentry_func_t *rl_menu_completion_entry_function = (rl_compentry_func_t *)NULL;
+
+/* Pointer to alternative function to create matches.
+ Function is called with TEXT, START, and END.
+ START and END are indices in RL_LINE_BUFFER saying what the boundaries
+ of TEXT are.
+ If this function exists and returns NULL then call the value of
+ rl_completion_entry_function to try to match, otherwise use the
+ array of strings returned. */
+rl_completion_func_t *rl_attempted_completion_function = (rl_completion_func_t *)NULL;
+
+/* Non-zero means to suppress normal filename completion after the
+ user-specified completion function has been called. */
+int rl_attempted_completion_over = 0;
+
+/* Set to a character indicating the type of completion being performed
+ by rl_complete_internal, available for use by application completion
+ functions. */
+int rl_completion_type = 0;
+
+/* Up to this many items will be displayed in response to a
+ possible-completions call. After that, we ask the user if
+ she is sure she wants to see them all. A negative value means
+ don't ask. */
+int rl_completion_query_items = 100;
+
+int _rl_page_completions = 1;
+
+/* The basic list of characters that signal a break between words for the
+ completer routine. The contents of this variable is what breaks words
+ in the shell, i.e. " \t\n\"\\'`@$><=" */
+const char *rl_basic_word_break_characters = " \t\n\"\\'`@$><=;|&{("; /* }) */
+
+/* List of basic quoting characters. */
+const char *rl_basic_quote_characters = "\"'";
+
+/* The list of characters that signal a break between words for
+ rl_complete_internal. The default list is the contents of
+ rl_basic_word_break_characters. */
+/*const*/ char *rl_completer_word_break_characters = (/*const*/ char *)NULL;
+
+/* Hook function to allow an application to set the completion word
+ break characters before readline breaks up the line. Allows
+ position-dependent word break characters. */
+rl_cpvfunc_t *rl_completion_word_break_hook = (rl_cpvfunc_t *)NULL;
+
+/* List of characters which can be used to quote a substring of the line.
+ Completion occurs on the entire substring, and within the substring
+ rl_completer_word_break_characters are treated as any other character,
+ unless they also appear within this list. */
+const char *rl_completer_quote_characters = (const char *)NULL;
+
+/* List of characters that should be quoted in filenames by the completer. */
+const char *rl_filename_quote_characters = (const char *)NULL;
+
+/* List of characters that are word break characters, but should be left
+ in TEXT when it is passed to the completion function. The shell uses
+ this to help determine what kind of completing to do. */
+const char *rl_special_prefixes = (const char *)NULL;
+
+/* If non-zero, then disallow duplicates in the matches. */
+int rl_ignore_completion_duplicates = 1;
+
+/* Non-zero means that the results of the matches are to be treated
+ as filenames. This is ALWAYS zero on entry, and can only be changed
+ within a completion entry finder function. */
+int rl_filename_completion_desired = 0;
+
+/* Non-zero means that the results of the matches are to be quoted using
+ double quotes (or an application-specific quoting mechanism) if the
+ filename contains any characters in rl_filename_quote_chars. This is
+ ALWAYS non-zero on entry, and can only be changed within a completion
+ entry finder function. */
+int rl_filename_quoting_desired = 1;
+
+/* This function, if defined, is called by the completer when real
+ filename completion is done, after all the matching names have been
+ generated. It is passed a (char**) known as matches in the code below.
+ It consists of a NULL-terminated array of pointers to potential
+ matching strings. The 1st element (matches[0]) is the maximal
+ substring that is common to all matches. This function can re-arrange
+ the list of matches as required, but all elements of the array must be
+ free()'d if they are deleted. The main intent of this function is
+ to implement FIGNORE a la SunOS csh. */
+rl_compignore_func_t *rl_ignore_some_completions_function = (rl_compignore_func_t *)NULL;
+
+/* Set to a function to quote a filename in an application-specific fashion.
+ Called with the text to quote, the type of match found (single or multiple)
+ and a pointer to the quoting character to be used, which the function can
+ reset if desired. */
+rl_quote_func_t *rl_filename_quoting_function = rl_quote_filename;
+
+/* Function to call to remove quoting characters from a filename. Called
+ before completion is attempted, so the embedded quotes do not interfere
+ with matching names in the file system. Readline doesn't do anything
+ with this; it's set only by applications. */
+rl_dequote_func_t *rl_filename_dequoting_function = (rl_dequote_func_t *)NULL;
+
+/* Function to call to decide whether or not a word break character is
+ quoted. If a character is quoted, it does not break words for the
+ completer. */
+rl_linebuf_func_t *rl_char_is_quoted_p = (rl_linebuf_func_t *)NULL;
+
+/* If non-zero, the completion functions don't append anything except a
+ possible closing quote. This is set to 0 by rl_complete_internal and
+ may be changed by an application-specific completion function. */
+int rl_completion_suppress_append = 0;
+
+/* Character appended to completed words when at the end of the line. The
+ default is a space. */
+int rl_completion_append_character = ' ';
+
+/* If non-zero, the completion functions don't append any closing quote.
+ This is set to 0 by rl_complete_internal and may be changed by an
+ application-specific completion function. */
+int rl_completion_suppress_quote = 0;
+
+/* Set to any quote character readline thinks it finds before any application
+ completion function is called. */
+int rl_completion_quote_character;
+
+/* Set to a non-zero value if readline found quoting anywhere in the word to
+ be completed; set before any application completion function is called. */
+int rl_completion_found_quote;
+
+/* If non-zero, a slash will be appended to completed filenames that are
+ symbolic links to directory names, subject to the value of the
+ mark-directories variable (which is user-settable). This exists so
+ that application completion functions can override the user's preference
+ (set via the mark-symlinked-directories variable) if appropriate.
+ It's set to the value of _rl_complete_mark_symlink_dirs in
+ rl_complete_internal before any application-specific completion
+ function is called, so without that function doing anything, the user's
+ preferences are honored. */
+int rl_completion_mark_symlink_dirs;
+
+/* If non-zero, inhibit completion (temporarily). */
+int rl_inhibit_completion;
+
+/* Set to the last key used to invoke one of the completion functions */
+int rl_completion_invoking_key;
+
+/* If non-zero, sort the completion matches. On by default. */
+int rl_sort_completion_matches = 1;
+
+/* Variables local to this file. */
+
+/* Local variable states what happened during the last completion attempt. */
+static int completion_changed_buffer;
+
+/* The result of the query to the user about displaying completion matches */
+static int completion_y_or_n;
+
+/*************************************/
+/* */
+/* Bindable completion functions */
+/* */
+/*************************************/
+
+/* Complete the word at or before point. You have supplied the function
+ that does the initial simple matching selection algorithm (see
+ rl_completion_matches ()). The default is to do filename completion. */
+int
+rl_complete (ignore, invoking_key)
+ int ignore, invoking_key;
+{
+ rl_completion_invoking_key = invoking_key;
+
+ if (rl_inhibit_completion)
+ return (_rl_insert_char (ignore, invoking_key));
+ else if (rl_last_func == rl_complete && !completion_changed_buffer)
+ return (rl_complete_internal ('?'));
+ else if (_rl_complete_show_all)
+ return (rl_complete_internal ('!'));
+ else if (_rl_complete_show_unmodified)
+ return (rl_complete_internal ('@'));
+ else
+ return (rl_complete_internal (TAB));
+}
+
+/* List the possible completions. See description of rl_complete (). */
+int
+rl_possible_completions (ignore, invoking_key)
+ int ignore, invoking_key;
+{
+ rl_completion_invoking_key = invoking_key;
+ return (rl_complete_internal ('?'));
+}
+
+int
+rl_insert_completions (ignore, invoking_key)
+ int ignore, invoking_key;
+{
+ rl_completion_invoking_key = invoking_key;
+ return (rl_complete_internal ('*'));
+}
+
+/* Return the correct value to pass to rl_complete_internal performing
+ the same tests as rl_complete. This allows consecutive calls to an
+ application's completion function to list possible completions and for
+ an application-specific completion function to honor the
+ show-all-if-ambiguous readline variable. */
+int
+rl_completion_mode (cfunc)
+ rl_command_func_t *cfunc;
+{
+ if (rl_last_func == cfunc && !completion_changed_buffer)
+ return '?';
+ else if (_rl_complete_show_all)
+ return '!';
+ else if (_rl_complete_show_unmodified)
+ return '@';
+ else
+ return TAB;
+}
+
+/************************************/
+/* */
+/* Completion utility functions */
+/* */
+/************************************/
+
+/* Reset readline state on a signal or other event. */
+void
+_rl_reset_completion_state ()
+{
+ rl_completion_found_quote = 0;
+ rl_completion_quote_character = 0;
+}
+
+/* Set default values for readline word completion. These are the variables
+ that application completion functions can change or inspect. */
+static void
+set_completion_defaults (what_to_do)
+ int what_to_do;
+{
+ /* Only the completion entry function can change these. */
+ rl_filename_completion_desired = 0;
+ rl_filename_quoting_desired = 1;
+ rl_completion_type = what_to_do;
+ rl_completion_suppress_append = rl_completion_suppress_quote = 0;
+ rl_completion_append_character = ' ';
+
+ /* The completion entry function may optionally change this. */
+ rl_completion_mark_symlink_dirs = _rl_complete_mark_symlink_dirs;
+}
+
+/* The user must press "y" or "n". Non-zero return means "y" pressed. */
+static int
+get_y_or_n (for_pager)
+ int for_pager;
+{
+ int c;
+
+ for (;;)
+ {
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
+ if (c == 'y' || c == 'Y' || c == ' ')
+ return (1);
+ if (c == 'n' || c == 'N' || c == RUBOUT)
+ return (0);
+ if (c == ABORT_CHAR || c < 0)
+ _rl_abort_internal ();
+ if (for_pager && (c == NEWLINE || c == RETURN))
+ return (2);
+ if (for_pager && (c == 'q' || c == 'Q'))
+ return (0);
+ rl_ding ();
+ }
+}
+
+static int
+_rl_internal_pager (lines)
+ int lines;
+{
+ int i;
+
+ fprintf (rl_outstream, "--More--");
+ fflush (rl_outstream);
+ i = get_y_or_n (1);
+ _rl_erase_entire_line ();
+ if (i == 0)
+ return -1;
+ else if (i == 2)
+ return (lines - 1);
+ else
+ return 0;
+}
+
+static int
+path_isdir (filename)
+ const char *filename;
+{
+ struct stat finfo;
+
+ return (stat (filename, &finfo) == 0 && S_ISDIR (finfo.st_mode));
+}
+
+#if defined (VISIBLE_STATS)
+/* Return the character which best describes FILENAME.
+ `@' for symbolic links
+ `/' for directories
+ `*' for executables
+ `=' for sockets
+ `|' for FIFOs
+ `%' for character special devices
+ `#' for block special devices */
+static int
+stat_char (filename)
+ char *filename;
+{
+ struct stat finfo;
+ int character, r;
+
+ /* Short-circuit a //server on cygwin, since that will always behave as
+ a directory. */
+#if __CYGWIN__
+ if (filename[0] == '/' && filename[1] == '/' && strchr (filename+2, '/') == 0)
+ return '/';
+#endif
+
+#if defined (HAVE_LSTAT) && defined (S_ISLNK)
+ r = lstat (filename, &finfo);
+#else
+ r = stat (filename, &finfo);
+#endif
+
+ if (r == -1)
+ return (0);
+
+ character = 0;
+ if (S_ISDIR (finfo.st_mode))
+ character = '/';
+#if defined (S_ISCHR)
+ else if (S_ISCHR (finfo.st_mode))
+ character = '%';
+#endif /* S_ISCHR */
+#if defined (S_ISBLK)
+ else if (S_ISBLK (finfo.st_mode))
+ character = '#';
+#endif /* S_ISBLK */
+#if defined (S_ISLNK)
+ else if (S_ISLNK (finfo.st_mode))
+ character = '@';
+#endif /* S_ISLNK */
+#if defined (S_ISSOCK)
+ else if (S_ISSOCK (finfo.st_mode))
+ character = '=';
+#endif /* S_ISSOCK */
+#if defined (S_ISFIFO)
+ else if (S_ISFIFO (finfo.st_mode))
+ character = '|';
+#endif
+ else if (S_ISREG (finfo.st_mode))
+ {
+ if (access (filename, X_OK) == 0)
+ character = '*';
+ }
+ return (character);
+}
+#endif /* VISIBLE_STATS */
+
+/* Return the portion of PATHNAME that should be output when listing
+ possible completions. If we are hacking filename completion, we
+ are only interested in the basename, the portion following the
+ final slash. Otherwise, we return what we were passed. Since
+ printing empty strings is not very informative, if we're doing
+ filename completion, and the basename is the empty string, we look
+ for the previous slash and return the portion following that. If
+ there's no previous slash, we just return what we were passed. */
+static char *
+printable_part (pathname)
+ char *pathname;
+{
+ char *temp, *x;
+
+ if (rl_filename_completion_desired == 0) /* don't need to do anything */
+ return (pathname);
+
+ temp = strrchr (pathname, '/');
+#if defined (__MSDOS__)
+ if (temp == 0 && ISALPHA ((unsigned char)pathname[0]) && pathname[1] == ':')
+ temp = pathname + 1;
+#endif
+
+ if (temp == 0 || *temp == '\0')
+ return (pathname);
+ /* If the basename is NULL, we might have a pathname like '/usr/src/'.
+ Look for a previous slash and, if one is found, return the portion
+ following that slash. If there's no previous slash, just return the
+ pathname we were passed. */
+ else if (temp[1] == '\0')
+ {
+ for (x = temp - 1; x > pathname; x--)
+ if (*x == '/')
+ break;
+ return ((*x == '/') ? x + 1 : pathname);
+ }
+ else
+ return ++temp;
+}
+
+/* Compute width of STRING when displayed on screen by print_filename */
+static int
+fnwidth (string)
+ const char *string;
+{
+ int width, pos;
+#if defined (HANDLE_MULTIBYTE)
+ mbstate_t ps;
+ int left, w;
+ size_t clen;
+ wchar_t wc;
+
+ left = strlen (string) + 1;
+ memset (&ps, 0, sizeof (mbstate_t));
+#endif
+
+ width = pos = 0;
+ while (string[pos])
+ {
+ if (CTRL_CHAR (string[pos]) || string[pos] == RUBOUT)
+ {
+ width += 2;
+ pos++;
+ }
+ else
+ {
+#if defined (HANDLE_MULTIBYTE)
+ clen = mbrtowc (&wc, string + pos, left - pos, &ps);
+ if (MB_INVALIDCH (clen))
+ {
+ width++;
+ pos++;
+ memset (&ps, 0, sizeof (mbstate_t));
+ }
+ else if (MB_NULLWCH (clen))
+ break;
+ else
+ {
+ pos += clen;
+ w = wcwidth (wc);
+ width += (w >= 0) ? w : 1;
+ }
+#else
+ width++;
+ pos++;
+#endif
+ }
+ }
+
+ return width;
+}
+
+#define ELLIPSIS_LEN 3
+
+static int
+fnprint (to_print, prefix_bytes)
+ const char *to_print;
+ int prefix_bytes;
+{
+ int printed_len, w;
+ const char *s;
+#if defined (HANDLE_MULTIBYTE)
+ mbstate_t ps;
+ const char *end;
+ size_t tlen;
+ int width;
+ wchar_t wc;
+
+ end = to_print + strlen (to_print) + 1;
+ memset (&ps, 0, sizeof (mbstate_t));
+#endif
+
+ printed_len = 0;
+
+ /* Don't print only the ellipsis if the common prefix is one of the
+ possible completions */
+ if (to_print[prefix_bytes] == '\0')
+ prefix_bytes = 0;
+
+ if (prefix_bytes)
+ {
+ char ellipsis;
+
+ ellipsis = (to_print[prefix_bytes] == '.') ? '_' : '.';
+ for (w = 0; w < ELLIPSIS_LEN; w++)
+ putc (ellipsis, rl_outstream);
+ printed_len = ELLIPSIS_LEN;
+ }
+
+ s = to_print + prefix_bytes;
+ while (*s)
+ {
+ if (CTRL_CHAR (*s))
+ {
+ putc ('^', rl_outstream);
+ putc (UNCTRL (*s), rl_outstream);
+ printed_len += 2;
+ s++;
+#if defined (HANDLE_MULTIBYTE)
+ memset (&ps, 0, sizeof (mbstate_t));
+#endif
+ }
+ else if (*s == RUBOUT)
+ {
+ putc ('^', rl_outstream);
+ putc ('?', rl_outstream);
+ printed_len += 2;
+ s++;
+#if defined (HANDLE_MULTIBYTE)
+ memset (&ps, 0, sizeof (mbstate_t));
+#endif
+ }
+ else
+ {
+#if defined (HANDLE_MULTIBYTE)
+ tlen = mbrtowc (&wc, s, end - s, &ps);
+ if (MB_INVALIDCH (tlen))
+ {
+ tlen = 1;
+ width = 1;
+ memset (&ps, 0, sizeof (mbstate_t));
+ }
+ else if (MB_NULLWCH (tlen))
+ break;
+ else
+ {
+ w = wcwidth (wc);
+ width = (w >= 0) ? w : 1;
+ }
+ fwrite (s, 1, tlen, rl_outstream);
+ s += tlen;
+ printed_len += width;
+#else
+ putc (*s, rl_outstream);
+ s++;
+ printed_len++;
+#endif
+ }
+ }
+
+ return printed_len;
+}
+
+/* Output TO_PRINT to rl_outstream. If VISIBLE_STATS is defined and we
+ are using it, check for and output a single character for `special'
+ filenames. Return the number of characters we output. */
+
+static int
+print_filename (to_print, full_pathname, prefix_bytes)
+ char *to_print, *full_pathname;
+ int prefix_bytes;
+{
+ int printed_len, extension_char, slen, tlen;
+ char *s, c, *new_full_pathname, *dn;
+
+ extension_char = 0;
+ printed_len = fnprint (to_print, prefix_bytes);
+
+#if defined (VISIBLE_STATS)
+ if (rl_filename_completion_desired && (rl_visible_stats || _rl_complete_mark_directories))
+#else
+ if (rl_filename_completion_desired && _rl_complete_mark_directories)
+#endif
+ {
+ /* If to_print != full_pathname, to_print is the basename of the
+ path passed. In this case, we try to expand the directory
+ name before checking for the stat character. */
+ if (to_print != full_pathname)
+ {
+ /* Terminate the directory name. */
+ c = to_print[-1];
+ to_print[-1] = '\0';
+
+ /* If setting the last slash in full_pathname to a NUL results in
+ full_pathname being the empty string, we are trying to complete
+ files in the root directory. If we pass a null string to the
+ bash directory completion hook, for example, it will expand it
+ to the current directory. We just want the `/'. */
+ if (full_pathname == 0 || *full_pathname == 0)
+ dn = "/";
+ else if (full_pathname[0] != '/')
+ dn = full_pathname;
+ else if (full_pathname[1] == 0)
+ dn = "//"; /* restore trailing slash to `//' */
+ else if (full_pathname[1] == '/' && full_pathname[2] == 0)
+ dn = "/"; /* don't turn /// into // */
+ else
+ dn = full_pathname;
+ s = tilde_expand (dn);
+ if (rl_directory_completion_hook)
+ (*rl_directory_completion_hook) (&s);
+
+ slen = strlen (s);
+ tlen = strlen (to_print);
+ new_full_pathname = (char *)xmalloc (slen + tlen + 2);
+ strcpy (new_full_pathname, s);
+ if (s[slen - 1] == '/')
+ slen--;
+ else
+ new_full_pathname[slen] = '/';
+ new_full_pathname[slen] = '/';
+ strcpy (new_full_pathname + slen + 1, to_print);
+
+#if defined (VISIBLE_STATS)
+ if (rl_visible_stats)
+ extension_char = stat_char (new_full_pathname);
+ else
+#endif
+ if (path_isdir (new_full_pathname))
+ extension_char = '/';
+
+ free (new_full_pathname);
+ to_print[-1] = c;
+ }
+ else
+ {
+ s = tilde_expand (full_pathname);
+#if defined (VISIBLE_STATS)
+ if (rl_visible_stats)
+ extension_char = stat_char (s);
+ else
+#endif
+ if (path_isdir (s))
+ extension_char = '/';
+ }
+
+ free (s);
+ if (extension_char)
+ {
+ putc (extension_char, rl_outstream);
+ printed_len++;
+ }
+ }
+
+ return printed_len;
+}
+
+static char *
+rl_quote_filename (s, rtype, qcp)
+ char *s;
+ int rtype;
+ char *qcp;
+{
+ char *r;
+
+ r = (char *)xmalloc (strlen (s) + 2);
+ *r = *rl_completer_quote_characters;
+ strcpy (r + 1, s);
+ if (qcp)
+ *qcp = *rl_completer_quote_characters;
+ return r;
+}
+
+/* Find the bounds of the current word for completion purposes, and leave
+ rl_point set to the end of the word. This function skips quoted
+ substrings (characters between matched pairs of characters in
+ rl_completer_quote_characters). First we try to find an unclosed
+ quoted substring on which to do matching. If one is not found, we use
+ the word break characters to find the boundaries of the current word.
+ We call an application-specific function to decide whether or not a
+ particular word break character is quoted; if that function returns a
+ non-zero result, the character does not break a word. This function
+ returns the opening quote character if we found an unclosed quoted
+ substring, '\0' otherwise. FP, if non-null, is set to a value saying
+ which (shell-like) quote characters we found (single quote, double
+ quote, or backslash) anywhere in the string. DP, if non-null, is set to
+ the value of the delimiter character that caused a word break. */
+
+char
+_rl_find_completion_word (fp, dp)
+ int *fp, *dp;
+{
+ int scan, end, found_quote, delimiter, pass_next, isbrk;
+ char quote_char, *brkchars;
+
+ end = rl_point;
+ found_quote = delimiter = 0;
+ quote_char = '\0';
+
+ brkchars = 0;
+ if (rl_completion_word_break_hook)
+ brkchars = (*rl_completion_word_break_hook) ();
+ if (brkchars == 0)
+ brkchars = rl_completer_word_break_characters;
+
+ if (rl_completer_quote_characters)
+ {
+ /* We have a list of characters which can be used in pairs to
+ quote substrings for the completer. Try to find the start
+ of an unclosed quoted substring. */
+ /* FOUND_QUOTE is set so we know what kind of quotes we found. */
+ for (scan = pass_next = 0; scan < end; scan = MB_NEXTCHAR (rl_line_buffer, scan, 1, MB_FIND_ANY))
+ {
+ if (pass_next)
+ {
+ pass_next = 0;
+ continue;
+ }
+
+ /* Shell-like semantics for single quotes -- don't allow backslash
+ to quote anything in single quotes, especially not the closing
+ quote. If you don't like this, take out the check on the value
+ of quote_char. */
+ if (quote_char != '\'' && rl_line_buffer[scan] == '\\')
+ {
+ pass_next = 1;
+ found_quote |= RL_QF_BACKSLASH;
+ continue;
+ }
+
+ if (quote_char != '\0')
+ {
+ /* Ignore everything until the matching close quote char. */
+ if (rl_line_buffer[scan] == quote_char)
+ {
+ /* Found matching close. Abandon this substring. */
+ quote_char = '\0';
+ rl_point = end;
+ }
+ }
+ else if (strchr (rl_completer_quote_characters, rl_line_buffer[scan]))
+ {
+ /* Found start of a quoted substring. */
+ quote_char = rl_line_buffer[scan];
+ rl_point = scan + 1;
+ /* Shell-like quoting conventions. */
+ if (quote_char == '\'')
+ found_quote |= RL_QF_SINGLE_QUOTE;
+ else if (quote_char == '"')
+ found_quote |= RL_QF_DOUBLE_QUOTE;
+ else
+ found_quote |= RL_QF_OTHER_QUOTE;
+ }
+ }
+ }
+
+ if (rl_point == end && quote_char == '\0')
+ {
+ /* We didn't find an unclosed quoted substring upon which to do
+ completion, so use the word break characters to find the
+ substring on which to complete. */
+ while (rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_ANY))
+ {
+ scan = rl_line_buffer[rl_point];
+
+ if (strchr (brkchars, scan) == 0)
+ continue;
+
+ /* Call the application-specific function to tell us whether
+ this word break character is quoted and should be skipped. */
+ if (rl_char_is_quoted_p && found_quote &&
+ (*rl_char_is_quoted_p) (rl_line_buffer, rl_point))
+ continue;
+
+ /* Convoluted code, but it avoids an n^2 algorithm with calls
+ to char_is_quoted. */
+ break;
+ }
+ }
+
+ /* If we are at an unquoted word break, then advance past it. */
+ scan = rl_line_buffer[rl_point];
+
+ /* If there is an application-specific function to say whether or not
+ a character is quoted and we found a quote character, let that
+ function decide whether or not a character is a word break, even
+ if it is found in rl_completer_word_break_characters. Don't bother
+ if we're at the end of the line, though. */
+ if (scan)
+ {
+ if (rl_char_is_quoted_p)
+ isbrk = (found_quote == 0 ||
+ (*rl_char_is_quoted_p) (rl_line_buffer, rl_point) == 0) &&
+ strchr (brkchars, scan) != 0;
+ else
+ isbrk = strchr (brkchars, scan) != 0;
+
+ if (isbrk)
+ {
+ /* If the character that caused the word break was a quoting
+ character, then remember it as the delimiter. */
+ if (rl_basic_quote_characters &&
+ strchr (rl_basic_quote_characters, scan) &&
+ (end - rl_point) > 1)
+ delimiter = scan;
+
+ /* If the character isn't needed to determine something special
+ about what kind of completion to perform, then advance past it. */
+ if (rl_special_prefixes == 0 || strchr (rl_special_prefixes, scan) == 0)
+ rl_point++;
+ }
+ }
+
+ if (fp)
+ *fp = found_quote;
+ if (dp)
+ *dp = delimiter;
+
+ return (quote_char);
+}
+
+static char **
+gen_completion_matches (text, start, end, our_func, found_quote, quote_char)
+ char *text;
+ int start, end;
+ rl_compentry_func_t *our_func;
+ int found_quote, quote_char;
+{
+ char **matches;
+
+ rl_completion_found_quote = found_quote;
+ rl_completion_quote_character = quote_char;
+
+ /* If the user wants to TRY to complete, but then wants to give
+ up and use the default completion function, they set the
+ variable rl_attempted_completion_function. */
+ if (rl_attempted_completion_function)
+ {
+ _rl_interrupt_immediately++;
+ matches = (*rl_attempted_completion_function) (text, start, end);
+ if (_rl_interrupt_immediately > 0)
+ _rl_interrupt_immediately--;
+
+ if (matches || rl_attempted_completion_over)
+ {
+ rl_attempted_completion_over = 0;
+ return (matches);
+ }
+ }
+
+ /* XXX -- filename dequoting moved into rl_filename_completion_function */
+
+ matches = rl_completion_matches (text, our_func);
+ return matches;
+}
+
+/* Filter out duplicates in MATCHES. This frees up the strings in
+ MATCHES. */
+static char **
+remove_duplicate_matches (matches)
+ char **matches;
+{
+ char *lowest_common;
+ int i, j, newlen;
+ char dead_slot;
+ char **temp_array;
+
+ /* Sort the items. */
+ for (i = 0; matches[i]; i++)
+ ;
+
+ /* Sort the array without matches[0], since we need it to
+ stay in place no matter what. */
+ if (i && rl_sort_completion_matches)
+ qsort (matches+1, i-1, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare);
+
+ /* Remember the lowest common denominator for it may be unique. */
+ lowest_common = savestring (matches[0]);
+
+ for (i = newlen = 0; matches[i + 1]; i++)
+ {
+ if (strcmp (matches[i], matches[i + 1]) == 0)
+ {
+ free (matches[i]);
+ matches[i] = (char *)&dead_slot;
+ }
+ else
+ newlen++;
+ }
+
+ /* We have marked all the dead slots with (char *)&dead_slot.
+ Copy all the non-dead entries into a new array. */
+ temp_array = (char **)xmalloc ((3 + newlen) * sizeof (char *));
+ for (i = j = 1; matches[i]; i++)
+ {
+ if (matches[i] != (char *)&dead_slot)
+ temp_array[j++] = matches[i];
+ }
+ temp_array[j] = (char *)NULL;
+
+ if (matches[0] != (char *)&dead_slot)
+ free (matches[0]);
+
+ /* Place the lowest common denominator back in [0]. */
+ temp_array[0] = lowest_common;
+
+ /* If there is one string left, and it is identical to the
+ lowest common denominator, then the LCD is the string to
+ insert. */
+ if (j == 2 && strcmp (temp_array[0], temp_array[1]) == 0)
+ {
+ free (temp_array[1]);
+ temp_array[1] = (char *)NULL;
+ }
+ return (temp_array);
+}
+
+/* Find the common prefix of the list of matches, and put it into
+ matches[0]. */
+static int
+compute_lcd_of_matches (match_list, matches, text)
+ char **match_list;
+ int matches;
+ const char *text;
+{
+ register int i, c1, c2, si;
+ int low; /* Count of max-matched characters. */
+ char *dtext; /* dequoted TEXT, if needed */
+#if defined (HANDLE_MULTIBYTE)
+ int v;
+ mbstate_t ps1, ps2;
+ wchar_t wc1, wc2;
+#endif
+
+ /* If only one match, just use that. Otherwise, compare each
+ member of the list with the next, finding out where they
+ stop matching. */
+ if (matches == 1)
+ {
+ match_list[0] = match_list[1];
+ match_list[1] = (char *)NULL;
+ return 1;
+ }
+
+ for (i = 1, low = 100000; i < matches; i++)
+ {
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ memset (&ps1, 0, sizeof (mbstate_t));
+ memset (&ps2, 0, sizeof (mbstate_t));
+ }
+#endif
+ if (_rl_completion_case_fold)
+ {
+ for (si = 0;
+ (c1 = _rl_to_lower(match_list[i][si])) &&
+ (c2 = _rl_to_lower(match_list[i + 1][si]));
+ si++)
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ v = mbrtowc (&wc1, match_list[i]+si, strlen (match_list[i]+si), &ps1);
+ mbrtowc (&wc2, match_list[i+1]+si, strlen (match_list[i+1]+si), &ps2);
+ wc1 = towlower (wc1);
+ wc2 = towlower (wc2);
+ if (wc1 != wc2)
+ break;
+ else if (v > 1)
+ si += v - 1;
+ }
+ else
+#endif
+ if (c1 != c2)
+ break;
+ }
+ else
+ {
+ for (si = 0;
+ (c1 = match_list[i][si]) &&
+ (c2 = match_list[i + 1][si]);
+ si++)
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ mbstate_t ps_back;
+ ps_back = ps1;
+ if (!_rl_compare_chars (match_list[i], si, &ps1, match_list[i+1], si, &ps2))
+ break;
+ else if ((v = _rl_get_char_len (&match_list[i][si], &ps_back)) > 1)
+ si += v - 1;
+ }
+ else
+#endif
+ if (c1 != c2)
+ break;
+ }
+
+ if (low > si)
+ low = si;
+ }
+
+ /* If there were multiple matches, but none matched up to even the
+ first character, and the user typed something, use that as the
+ value of matches[0]. */
+ if (low == 0 && text && *text)
+ {
+ match_list[0] = (char *)xmalloc (strlen (text) + 1);
+ strcpy (match_list[0], text);
+ }
+ else
+ {
+ match_list[0] = (char *)xmalloc (low + 1);
+
+ /* XXX - this might need changes in the presence of multibyte chars */
+
+ /* If we are ignoring case, try to preserve the case of the string
+ the user typed in the face of multiple matches differing in case. */
+ if (_rl_completion_case_fold)
+ {
+ /* We're making an assumption here:
+ IF we're completing filenames AND
+ the application has defined a filename dequoting function AND
+ we found a quote character AND
+ the application has requested filename quoting
+ THEN
+ we assume that TEXT was dequoted before checking against
+ the file system and needs to be dequoted here before we
+ check against the list of matches
+ FI */
+ dtext = (char *)NULL;
+ if (rl_filename_completion_desired &&
+ rl_filename_dequoting_function &&
+ rl_completion_found_quote &&
+ rl_filename_quoting_desired)
+ {
+ dtext = (*rl_filename_dequoting_function) ((char *)text, rl_completion_quote_character);
+ text = dtext;
+ }
+
+ /* sort the list to get consistent answers. */
+ qsort (match_list+1, matches, sizeof(char *), (QSFUNC *)_rl_qsort_string_compare);
+
+ si = strlen (text);
+ if (si <= low)
+ {
+ for (i = 1; i <= matches; i++)
+ if (strncmp (match_list[i], text, si) == 0)
+ {
+ strncpy (match_list[0], match_list[i], low);
+ break;
+ }
+ /* no casematch, use first entry */
+ if (i > matches)
+ strncpy (match_list[0], match_list[1], low);
+ }
+ else
+ /* otherwise, just use the text the user typed. */
+ strncpy (match_list[0], text, low);
+
+ FREE (dtext);
+ }
+ else
+ strncpy (match_list[0], match_list[1], low);
+
+ match_list[0][low] = '\0';
+ }
+
+ return matches;
+}
+
+static int
+postprocess_matches (matchesp, matching_filenames)
+ char ***matchesp;
+ int matching_filenames;
+{
+ char *t, **matches, **temp_matches;
+ int nmatch, i;
+
+ matches = *matchesp;
+
+ if (matches == 0)
+ return 0;
+
+ /* It seems to me that in all the cases we handle we would like
+ to ignore duplicate possiblilities. Scan for the text to
+ insert being identical to the other completions. */
+ if (rl_ignore_completion_duplicates)
+ {
+ temp_matches = remove_duplicate_matches (matches);
+ free (matches);
+ matches = temp_matches;
+ }
+
+ /* If we are matching filenames, then here is our chance to
+ do clever processing by re-examining the list. Call the
+ ignore function with the array as a parameter. It can
+ munge the array, deleting matches as it desires. */
+ if (rl_ignore_some_completions_function && matching_filenames)
+ {
+ for (nmatch = 1; matches[nmatch]; nmatch++)
+ ;
+ (void)(*rl_ignore_some_completions_function) (matches);
+ if (matches == 0 || matches[0] == 0)
+ {
+ FREE (matches);
+ *matchesp = (char **)0;
+ return 0;
+ }
+ else
+ {
+ /* If we removed some matches, recompute the common prefix. */
+ for (i = 1; matches[i]; i++)
+ ;
+ if (i > 1 && i < nmatch)
+ {
+ t = matches[0];
+ compute_lcd_of_matches (matches, i - 1, t);
+ FREE (t);
+ }
+ }
+ }
+
+ *matchesp = matches;
+ return (1);
+}
+
+/* A convenience function for displaying a list of strings in
+ columnar format on readline's output stream. MATCHES is the list
+ of strings, in argv format, LEN is the number of strings in MATCHES,
+ and MAX is the length of the longest string in MATCHES. */
+void
+rl_display_match_list (matches, len, max)
+ char **matches;
+ int len, max;
+{
+ int count, limit, printed_len, lines;
+ int i, j, k, l, common_length, sind;
+ char *temp, *t;
+
+ /* Find the length of the prefix common to all items: length as displayed
+ characters (common_length) and as a byte index into the matches (sind) */
+ common_length = sind = 0;
+ if (_rl_completion_prefix_display_length > 0)
+ {
+ t = printable_part (matches[0]);
+ temp = strrchr (t, '/');
+ common_length = temp ? fnwidth (temp) : fnwidth (t);
+ sind = temp ? strlen (temp) : strlen (t);
+
+ if (common_length > _rl_completion_prefix_display_length && common_length > ELLIPSIS_LEN)
+ max -= common_length - ELLIPSIS_LEN;
+ else
+ common_length = sind = 0;
+ }
+
+ /* How many items of MAX length can we fit in the screen window? */
+ max += 2;
+ limit = _rl_screenwidth / max;
+ if (limit != 1 && (limit * max == _rl_screenwidth))
+ limit--;
+
+ /* Avoid a possible floating exception. If max > _rl_screenwidth,
+ limit will be 0 and a divide-by-zero fault will result. */
+ if (limit == 0)
+ limit = 1;
+
+ /* How many iterations of the printing loop? */
+ count = (len + (limit - 1)) / limit;
+
+ /* Watch out for special case. If LEN is less than LIMIT, then
+ just do the inner printing loop.
+ 0 < len <= limit implies count = 1. */
+
+ /* Sort the items if they are not already sorted. */
+ if (rl_ignore_completion_duplicates == 0 && rl_sort_completion_matches)
+ qsort (matches + 1, len, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare);
+
+ rl_crlf ();
+
+ lines = 0;
+ if (_rl_print_completions_horizontally == 0)
+ {
+ /* Print the sorted items, up-and-down alphabetically, like ls. */
+ for (i = 1; i <= count; i++)
+ {
+ for (j = 0, l = i; j < limit; j++)
+ {
+ if (l > len || matches[l] == 0)
+ break;
+ else
+ {
+ temp = printable_part (matches[l]);
+ printed_len = print_filename (temp, matches[l], sind);
+
+ if (j + 1 < limit)
+ for (k = 0; k < max - printed_len; k++)
+ putc (' ', rl_outstream);
+ }
+ l += count;
+ }
+ rl_crlf ();
+ lines++;
+ if (_rl_page_completions && lines >= (_rl_screenheight - 1) && i < count)
+ {
+ lines = _rl_internal_pager (lines);
+ if (lines < 0)
+ return;
+ }
+ }
+ }
+ else
+ {
+ /* Print the sorted items, across alphabetically, like ls -x. */
+ for (i = 1; matches[i]; i++)
+ {
+ temp = printable_part (matches[i]);
+ printed_len = print_filename (temp, matches[i], sind);
+ /* Have we reached the end of this line? */
+ if (matches[i+1])
+ {
+ if (i && (limit > 1) && (i % limit) == 0)
+ {
+ rl_crlf ();
+ lines++;
+ if (_rl_page_completions && lines >= _rl_screenheight - 1)
+ {
+ lines = _rl_internal_pager (lines);
+ if (lines < 0)
+ return;
+ }
+ }
+ else
+ for (k = 0; k < max - printed_len; k++)
+ putc (' ', rl_outstream);
+ }
+ }
+ rl_crlf ();
+ }
+}
+
+/* Display MATCHES, a list of matching filenames in argv format. This
+ handles the simple case -- a single match -- first. If there is more
+ than one match, we compute the number of strings in the list and the
+ length of the longest string, which will be needed by the display
+ function. If the application wants to handle displaying the list of
+ matches itself, it sets RL_COMPLETION_DISPLAY_MATCHES_HOOK to the
+ address of a function, and we just call it. If we're handling the
+ display ourselves, we just call rl_display_match_list. We also check
+ that the list of matches doesn't exceed the user-settable threshold,
+ and ask the user if he wants to see the list if there are more matches
+ than RL_COMPLETION_QUERY_ITEMS. */
+static void
+display_matches (matches)
+ char **matches;
+{
+ int len, max, i;
+ char *temp;
+
+ /* Move to the last visible line of a possibly-multiple-line command. */
+ _rl_move_vert (_rl_vis_botlin);
+
+ /* Handle simple case first. What if there is only one answer? */
+ if (matches[1] == 0)
+ {
+ temp = printable_part (matches[0]);
+ rl_crlf ();
+ print_filename (temp, matches[0], 0);
+ rl_crlf ();
+
+ rl_forced_update_display ();
+ rl_display_fixed = 1;
+
+ return;
+ }
+
+ /* There is more than one answer. Find out how many there are,
+ and find the maximum printed length of a single entry. */
+ for (max = 0, i = 1; matches[i]; i++)
+ {
+ temp = printable_part (matches[i]);
+ len = fnwidth (temp);
+
+ if (len > max)
+ max = len;
+ }
+
+ len = i - 1;
+
+ /* If the caller has defined a display hook, then call that now. */
+ if (rl_completion_display_matches_hook)
+ {
+ (*rl_completion_display_matches_hook) (matches, len, max);
+ return;
+ }
+
+ /* If there are many items, then ask the user if she really wants to
+ see them all. */
+ if (rl_completion_query_items > 0 && len >= rl_completion_query_items)
+ {
+ rl_crlf ();
+ fprintf (rl_outstream, "Display all %d possibilities? (y or n)", len);
+ fflush (rl_outstream);
+ if ((completion_y_or_n = get_y_or_n (0)) == 0)
+ {
+ rl_crlf ();
+
+ rl_forced_update_display ();
+ rl_display_fixed = 1;
+
+ return;
+ }
+ }
+
+ rl_display_match_list (matches, len, max);
+
+ rl_forced_update_display ();
+ rl_display_fixed = 1;
+}
+
+static char *
+make_quoted_replacement (match, mtype, qc)
+ char *match;
+ int mtype;
+ char *qc; /* Pointer to quoting character, if any */
+{
+ int should_quote, do_replace;
+ char *replacement;
+
+ /* If we are doing completion on quoted substrings, and any matches
+ contain any of the completer_word_break_characters, then auto-
+ matically prepend the substring with a quote character (just pick
+ the first one from the list of such) if it does not already begin
+ with a quote string. FIXME: Need to remove any such automatically
+ inserted quote character when it no longer is necessary, such as
+ if we change the string we are completing on and the new set of
+ matches don't require a quoted substring. */
+ replacement = match;
+
+ should_quote = match && rl_completer_quote_characters &&
+ rl_filename_completion_desired &&
+ rl_filename_quoting_desired;
+
+ if (should_quote)
+ should_quote = should_quote && (!qc || !*qc ||
+ (rl_completer_quote_characters && strchr (rl_completer_quote_characters, *qc)));
+
+ if (should_quote)
+ {
+ /* If there is a single match, see if we need to quote it.
+ This also checks whether the common prefix of several
+ matches needs to be quoted. */
+ should_quote = rl_filename_quote_characters
+ ? (_rl_strpbrk (match, rl_filename_quote_characters) != 0)
+ : 0;
+
+ do_replace = should_quote ? mtype : NO_MATCH;
+ /* Quote the replacement, since we found an embedded
+ word break character in a potential match. */
+ if (do_replace != NO_MATCH && rl_filename_quoting_function)
+ replacement = (*rl_filename_quoting_function) (match, do_replace, qc);
+ }
+ return (replacement);
+}
+
+static void
+insert_match (match, start, mtype, qc)
+ char *match;
+ int start, mtype;
+ char *qc;
+{
+ char *replacement, *r;
+ char oqc;
+ int end, rlen;
+
+ oqc = qc ? *qc : '\0';
+ replacement = make_quoted_replacement (match, mtype, qc);
+
+ /* Now insert the match. */
+ if (replacement)
+ {
+ rlen = strlen (replacement);
+ /* Don't double an opening quote character. */
+ if (qc && *qc && start && rl_line_buffer[start - 1] == *qc &&
+ replacement[0] == *qc)
+ start--;
+ /* If make_quoted_replacement changed the quoting character, remove
+ the opening quote and insert the (fully-quoted) replacement. */
+ else if (qc && (*qc != oqc) && start && rl_line_buffer[start - 1] == oqc &&
+ replacement[0] != oqc)
+ start--;
+ end = rl_point - 1;
+ /* Don't double a closing quote character */
+ if (qc && *qc && end && rl_line_buffer[rl_point] == *qc && replacement[rlen - 1] == *qc)
+ end++;
+ if (_rl_skip_completed_text)
+ {
+ r = replacement;
+ while (start < rl_end && *r && rl_line_buffer[start] == *r)
+ {
+ start++;
+ r++;
+ }
+ if (start <= end || *r)
+ _rl_replace_text (r, start, end);
+ rl_point = start + strlen (r);
+ }
+ else
+ _rl_replace_text (replacement, start, end);
+ if (replacement != match)
+ free (replacement);
+ }
+}
+
+/* Append any necessary closing quote and a separator character to the
+ just-inserted match. If the user has specified that directories
+ should be marked by a trailing `/', append one of those instead. The
+ default trailing character is a space. Returns the number of characters
+ appended. If NONTRIVIAL_MATCH is set, we test for a symlink (if the OS
+ has them) and don't add a suffix for a symlink to a directory. A
+ nontrivial match is one that actually adds to the word being completed.
+ The variable rl_completion_mark_symlink_dirs controls this behavior
+ (it's initially set to the what the user has chosen, indicated by the
+ value of _rl_complete_mark_symlink_dirs, but may be modified by an
+ application's completion function). */
+static int
+append_to_match (text, delimiter, quote_char, nontrivial_match)
+ char *text;
+ int delimiter, quote_char, nontrivial_match;
+{
+ char temp_string[4], *filename;
+ int temp_string_index, s;
+ struct stat finfo;
+
+ temp_string_index = 0;
+ if (quote_char && rl_point && rl_completion_suppress_quote == 0 &&
+ rl_line_buffer[rl_point - 1] != quote_char)
+ temp_string[temp_string_index++] = quote_char;
+
+ if (delimiter)
+ temp_string[temp_string_index++] = delimiter;
+ else if (rl_completion_suppress_append == 0 && rl_completion_append_character)
+ temp_string[temp_string_index++] = rl_completion_append_character;
+
+ temp_string[temp_string_index++] = '\0';
+
+ if (rl_filename_completion_desired)
+ {
+ filename = tilde_expand (text);
+ s = (nontrivial_match && rl_completion_mark_symlink_dirs == 0)
+ ? LSTAT (filename, &finfo)
+ : stat (filename, &finfo);
+ if (s == 0 && S_ISDIR (finfo.st_mode))
+ {
+ if (_rl_complete_mark_directories /* && rl_completion_suppress_append == 0 */)
+ {
+ /* This is clumsy. Avoid putting in a double slash if point
+ is at the end of the line and the previous character is a
+ slash. */
+ if (rl_point && rl_line_buffer[rl_point] == '\0' && rl_line_buffer[rl_point - 1] == '/')
+ ;
+ else if (rl_line_buffer[rl_point] != '/')
+ rl_insert_text ("/");
+ }
+ }
+#ifdef S_ISLNK
+ /* Don't add anything if the filename is a symlink and resolves to a
+ directory. */
+ else if (s == 0 && S_ISLNK (finfo.st_mode) &&
+ stat (filename, &finfo) == 0 && S_ISDIR (finfo.st_mode))
+ ;
+#endif
+ else
+ {
+ if (rl_point == rl_end && temp_string_index)
+ rl_insert_text (temp_string);
+ }
+ free (filename);
+ }
+ else
+ {
+ if (rl_point == rl_end && temp_string_index)
+ rl_insert_text (temp_string);
+ }
+
+ return (temp_string_index);
+}
+
+static void
+insert_all_matches (matches, point, qc)
+ char **matches;
+ int point;
+ char *qc;
+{
+ int i;
+ char *rp;
+
+ rl_begin_undo_group ();
+ /* remove any opening quote character; make_quoted_replacement will add
+ it back. */
+ if (qc && *qc && point && rl_line_buffer[point - 1] == *qc)
+ point--;
+ rl_delete_text (point, rl_point);
+ rl_point = point;
+
+ if (matches[1])
+ {
+ for (i = 1; matches[i]; i++)
+ {
+ rp = make_quoted_replacement (matches[i], SINGLE_MATCH, qc);
+ rl_insert_text (rp);
+ rl_insert_text (" ");
+ if (rp != matches[i])
+ free (rp);
+ }
+ }
+ else
+ {
+ rp = make_quoted_replacement (matches[0], SINGLE_MATCH, qc);
+ rl_insert_text (rp);
+ rl_insert_text (" ");
+ if (rp != matches[0])
+ free (rp);
+ }
+ rl_end_undo_group ();
+}
+
+void
+_rl_free_match_list (matches)
+ char **matches;
+{
+ register int i;
+
+ if (matches == 0)
+ return;
+
+ for (i = 0; matches[i]; i++)
+ free (matches[i]);
+ free (matches);
+}
+
+/* Complete the word at or before point.
+ WHAT_TO_DO says what to do with the completion.
+ `?' means list the possible completions.
+ TAB means do standard completion.
+ `*' means insert all of the possible completions.
+ `!' means to do standard completion, and list all possible completions if
+ there is more than one.
+ `@' means to do standard completion, and list all possible completions if
+ there is more than one and partial completion is not possible. */
+int
+rl_complete_internal (what_to_do)
+ int what_to_do;
+{
+ char **matches;
+ rl_compentry_func_t *our_func;
+ int start, end, delimiter, found_quote, i, nontrivial_lcd;
+ char *text, *saved_line_buffer;
+ char quote_char;
+
+ RL_SETSTATE(RL_STATE_COMPLETING);
+
+ set_completion_defaults (what_to_do);
+
+ saved_line_buffer = rl_line_buffer ? savestring (rl_line_buffer) : (char *)NULL;
+ our_func = rl_completion_entry_function
+ ? rl_completion_entry_function
+ : rl_filename_completion_function;
+ /* We now look backwards for the start of a filename/variable word. */
+ end = rl_point;
+ found_quote = delimiter = 0;
+ quote_char = '\0';
+
+ if (rl_point)
+ /* This (possibly) changes rl_point. If it returns a non-zero char,
+ we know we have an open quote. */
+ quote_char = _rl_find_completion_word (&found_quote, &delimiter);
+
+ start = rl_point;
+ rl_point = end;
+
+ text = rl_copy_text (start, end);
+ matches = gen_completion_matches (text, start, end, our_func, found_quote, quote_char);
+ /* nontrivial_lcd is set if the common prefix adds something to the word
+ being completed. */
+ nontrivial_lcd = matches && strcmp (text, matches[0]) != 0;
+ free (text);
+
+ if (matches == 0)
+ {
+ rl_ding ();
+ FREE (saved_line_buffer);
+ completion_changed_buffer = 0;
+ RL_UNSETSTATE(RL_STATE_COMPLETING);
+ _rl_reset_completion_state ();
+ return (0);
+ }
+
+ /* If we are matching filenames, the attempted completion function will
+ have set rl_filename_completion_desired to a non-zero value. The basic
+ rl_filename_completion_function does this. */
+ i = rl_filename_completion_desired;
+
+ if (postprocess_matches (&matches, i) == 0)
+ {
+ rl_ding ();
+ FREE (saved_line_buffer);
+ completion_changed_buffer = 0;
+ RL_UNSETSTATE(RL_STATE_COMPLETING);
+ _rl_reset_completion_state ();
+ return (0);
+ }
+
+ switch (what_to_do)
+ {
+ case TAB:
+ case '!':
+ case '@':
+ /* Insert the first match with proper quoting. */
+ if (*matches[0])
+ insert_match (matches[0], start, matches[1] ? MULT_MATCH : SINGLE_MATCH, &quote_char);
+
+ /* If there are more matches, ring the bell to indicate.
+ If we are in vi mode, Posix.2 says to not ring the bell.
+ If the `show-all-if-ambiguous' variable is set, display
+ all the matches immediately. Otherwise, if this was the
+ only match, and we are hacking files, check the file to
+ see if it was a directory. If so, and the `mark-directories'
+ variable is set, add a '/' to the name. If not, and we
+ are at the end of the line, then add a space. */
+ if (matches[1])
+ {
+ if (what_to_do == '!')
+ {
+ display_matches (matches);
+ break;
+ }
+ else if (what_to_do == '@')
+ {
+ if (nontrivial_lcd == 0)
+ display_matches (matches);
+ break;
+ }
+ else if (rl_editing_mode != vi_mode)
+ rl_ding (); /* There are other matches remaining. */
+ }
+ else
+ append_to_match (matches[0], delimiter, quote_char, nontrivial_lcd);
+
+ break;
+
+ case '*':
+ insert_all_matches (matches, start, &quote_char);
+ break;
+
+ case '?':
+ display_matches (matches);
+ break;
+
+ default:
+ _rl_ttymsg ("bad value %d for what_to_do in rl_complete", what_to_do);
+ rl_ding ();
+ FREE (saved_line_buffer);
+ RL_UNSETSTATE(RL_STATE_COMPLETING);
+ _rl_reset_completion_state ();
+ return 1;
+ }
+
+ _rl_free_match_list (matches);
+
+ /* Check to see if the line has changed through all of this manipulation. */
+ if (saved_line_buffer)
+ {
+ completion_changed_buffer = strcmp (rl_line_buffer, saved_line_buffer) != 0;
+ free (saved_line_buffer);
+ }
+
+ RL_UNSETSTATE(RL_STATE_COMPLETING);
+ _rl_reset_completion_state ();
+ return 0;
+}
+
+/***************************************************************/
+/* */
+/* Application-callable completion match generator functions */
+/* */
+/***************************************************************/
+
+/* Return an array of (char *) which is a list of completions for TEXT.
+ If there are no completions, return a NULL pointer.
+ The first entry in the returned array is the substitution for TEXT.
+ The remaining entries are the possible completions.
+ The array is terminated with a NULL pointer.
+
+ ENTRY_FUNCTION is a function of two args, and returns a (char *).
+ The first argument is TEXT.
+ The second is a state argument; it should be zero on the first call, and
+ non-zero on subsequent calls. It returns a NULL pointer to the caller
+ when there are no more matches.
+ */
+char **
+rl_completion_matches (text, entry_function)
+ const char *text;
+ rl_compentry_func_t *entry_function;
+{
+ /* Number of slots in match_list. */
+ int match_list_size;
+
+ /* The list of matches. */
+ char **match_list;
+
+ /* Number of matches actually found. */
+ int matches;
+
+ /* Temporary string binder. */
+ char *string;
+
+ matches = 0;
+ match_list_size = 10;
+ match_list = (char **)xmalloc ((match_list_size + 1) * sizeof (char *));
+ match_list[1] = (char *)NULL;
+
+ _rl_interrupt_immediately++;
+ while (string = (*entry_function) (text, matches))
+ {
+ if (matches + 1 == match_list_size)
+ match_list = (char **)xrealloc
+ (match_list, ((match_list_size += 10) + 1) * sizeof (char *));
+
+ match_list[++matches] = string;
+ match_list[matches + 1] = (char *)NULL;
+ }
+ if (_rl_interrupt_immediately > 0)
+ _rl_interrupt_immediately--;
+
+ /* If there were any matches, then look through them finding out the
+ lowest common denominator. That then becomes match_list[0]. */
+ if (matches)
+ compute_lcd_of_matches (match_list, matches, text);
+ else /* There were no matches. */
+ {
+ free (match_list);
+ match_list = (char **)NULL;
+ }
+ return (match_list);
+}
+
+/* A completion function for usernames.
+ TEXT contains a partial username preceded by a random
+ character (usually `~'). */
+char *
+rl_username_completion_function (text, state)
+ const char *text;
+ int state;
+{
+#if defined (__WIN32__) || defined (__OPENNT)
+ return (char *)NULL;
+#else /* !__WIN32__ && !__OPENNT) */
+ static char *username = (char *)NULL;
+ static struct passwd *entry;
+ static int namelen, first_char, first_char_loc;
+ char *value;
+
+ if (state == 0)
+ {
+ FREE (username);
+
+ first_char = *text;
+ first_char_loc = first_char == '~';
+
+ username = savestring (&text[first_char_loc]);
+ namelen = strlen (username);
+ setpwent ();
+ }
+
+#if defined (HAVE_GETPWENT)
+ while (entry = getpwent ())
+ {
+ /* Null usernames should result in all users as possible completions. */
+ if (namelen == 0 || (STREQN (username, entry->pw_name, namelen)))
+ break;
+ }
+#endif
+
+ if (entry == 0)
+ {
+#if defined (HAVE_GETPWENT)
+ endpwent ();
+#endif
+ return ((char *)NULL);
+ }
+ else
+ {
+ value = (char *)xmalloc (2 + strlen (entry->pw_name));
+
+ *value = *text;
+
+ strcpy (value + first_char_loc, entry->pw_name);
+
+ if (first_char == '~')
+ rl_filename_completion_desired = 1;
+
+ return (value);
+ }
+#endif /* !__WIN32__ && !__OPENNT */
+}
+
+/* Okay, now we write the entry_function for filename completion. In the
+ general case. Note that completion in the shell is a little different
+ because of all the pathnames that must be followed when looking up the
+ completion for a command. */
+char *
+rl_filename_completion_function (text, state)
+ const char *text;
+ int state;
+{
+ static DIR *directory = (DIR *)NULL;
+ static char *filename = (char *)NULL;
+ static char *dirname = (char *)NULL;
+ static char *users_dirname = (char *)NULL;
+ static int filename_len;
+ char *temp, *dentry, *convfn;
+ int dirlen, dentlen, convlen;
+ struct dirent *entry;
+
+ /* If we don't have any state, then do some initialization. */
+ if (state == 0)
+ {
+ /* If we were interrupted before closing the directory or reading
+ all of its contents, close it. */
+ if (directory)
+ {
+ closedir (directory);
+ directory = (DIR *)NULL;
+ }
+ FREE (dirname);
+ FREE (filename);
+ FREE (users_dirname);
+
+ filename = savestring (text);
+ if (*text == 0)
+ text = ".";
+ dirname = savestring (text);
+
+ temp = strrchr (dirname, '/');
+
+#if defined (__MSDOS__)
+ /* special hack for //X/... */
+ if (dirname[0] == '/' && dirname[1] == '/' && ISALPHA ((unsigned char)dirname[2]) && dirname[3] == '/')
+ temp = strrchr (dirname + 3, '/');
+#endif
+
+ if (temp)
+ {
+ strcpy (filename, ++temp);
+ *temp = '\0';
+ }
+#if defined (__MSDOS__)
+ /* searches from current directory on the drive */
+ else if (ISALPHA ((unsigned char)dirname[0]) && dirname[1] == ':')
+ {
+ strcpy (filename, dirname + 2);
+ dirname[2] = '\0';
+ }
+#endif
+ else
+ {
+ dirname[0] = '.';
+ dirname[1] = '\0';
+ }
+
+ /* We aren't done yet. We also support the "~user" syntax. */
+
+ /* Save the version of the directory that the user typed. */
+ users_dirname = savestring (dirname);
+
+ if (*dirname == '~')
+ {
+ temp = tilde_expand (dirname);
+ free (dirname);
+ dirname = temp;
+ }
+
+ if (rl_directory_rewrite_hook)
+ (*rl_directory_rewrite_hook) (&dirname);
+
+ /* The directory completion hook should perform any necessary
+ dequoting. */
+ if (rl_directory_completion_hook && (*rl_directory_completion_hook) (&dirname))
+ {
+ free (users_dirname);
+ users_dirname = savestring (dirname);
+ }
+ else if (rl_completion_found_quote && rl_filename_dequoting_function)
+ {
+ /* delete single and double quotes */
+ temp = (*rl_filename_dequoting_function) (users_dirname, rl_completion_quote_character);
+ free (users_dirname);
+ users_dirname = temp;
+ }
+ directory = opendir (dirname);
+
+ /* Now dequote a non-null filename. */
+ if (filename && *filename && rl_completion_found_quote && rl_filename_dequoting_function)
+ {
+ /* delete single and double quotes */
+ temp = (*rl_filename_dequoting_function) (filename, rl_completion_quote_character);
+ free (filename);
+ filename = temp;
+ }
+ filename_len = strlen (filename);
+
+ rl_filename_completion_desired = 1;
+ }
+
+ /* At this point we should entertain the possibility of hacking wildcarded
+ filenames, like /usr/man/man<WILD>/te<TAB>. If the directory name
+ contains globbing characters, then build an array of directories, and
+ then map over that list while completing. */
+ /* *** UNIMPLEMENTED *** */
+
+ /* Now that we have some state, we can read the directory. */
+
+ entry = (struct dirent *)NULL;
+ while (directory && (entry = readdir (directory)))
+ {
+ convfn = dentry = entry->d_name;
+ convlen = dentlen = D_NAMLEN (entry);
+
+ if (rl_filename_rewrite_hook)
+ {
+ convfn = (*rl_filename_rewrite_hook) (dentry, dentlen);
+ convlen = (convfn == dentry) ? dentlen : strlen (convfn);
+ }
+
+ /* Special case for no filename. If the user has disabled the
+ `match-hidden-files' variable, skip filenames beginning with `.'.
+ All other entries except "." and ".." match. */
+ if (filename_len == 0)
+ {
+ if (_rl_match_hidden_files == 0 && HIDDEN_FILE (convfn))
+ continue;
+
+ if (convfn[0] != '.' ||
+ (convfn[1] && (convfn[1] != '.' || convfn[2])))
+ break;
+ }
+ else
+ {
+ /* Otherwise, if these match up to the length of filename, then
+ it is a match. */
+ if (_rl_completion_case_fold)
+ {
+ if ((_rl_to_lower (convfn[0]) == _rl_to_lower (filename[0])) &&
+ (convlen >= filename_len) &&
+ (_rl_strnicmp (filename, convfn, filename_len) == 0))
+ break;
+ }
+ else
+ {
+ if ((convfn[0] == filename[0]) &&
+ (convlen >= filename_len) &&
+ (strncmp (filename, convfn, filename_len) == 0))
+ break;
+ }
+ }
+ }
+
+ if (entry == 0)
+ {
+ if (directory)
+ {
+ closedir (directory);
+ directory = (DIR *)NULL;
+ }
+ if (dirname)
+ {
+ free (dirname);
+ dirname = (char *)NULL;
+ }
+ if (filename)
+ {
+ free (filename);
+ filename = (char *)NULL;
+ }
+ if (users_dirname)
+ {
+ free (users_dirname);
+ users_dirname = (char *)NULL;
+ }
+
+ return (char *)NULL;
+ }
+ else
+ {
+ /* dirname && (strcmp (dirname, ".") != 0) */
+ if (dirname && (dirname[0] != '.' || dirname[1]))
+ {
+ if (rl_complete_with_tilde_expansion && *users_dirname == '~')
+ {
+ dirlen = strlen (dirname);
+ temp = (char *)xmalloc (2 + dirlen + D_NAMLEN (entry));
+ strcpy (temp, dirname);
+ /* Canonicalization cuts off any final slash present. We
+ may need to add it back. */
+ if (dirname[dirlen - 1] != '/')
+ {
+ temp[dirlen++] = '/';
+ temp[dirlen] = '\0';
+ }
+ }
+ else
+ {
+ dirlen = strlen (users_dirname);
+ temp = (char *)xmalloc (2 + dirlen + D_NAMLEN (entry));
+ strcpy (temp, users_dirname);
+ /* Make sure that temp has a trailing slash here. */
+ if (users_dirname[dirlen - 1] != '/')
+ temp[dirlen++] = '/';
+ }
+
+ strcpy (temp + dirlen, convfn);
+ }
+ else
+ temp = savestring (convfn);
+
+ if (convfn != dentry)
+ free (convfn);
+
+ return (temp);
+ }
+}
+
+/* An initial implementation of a menu completion function a la tcsh. The
+ first time (if the last readline command was not rl_old_menu_complete), we
+ generate the list of matches. This code is very similar to the code in
+ rl_complete_internal -- there should be a way to combine the two. Then,
+ for each item in the list of matches, we insert the match in an undoable
+ fashion, with the appropriate character appended (this happens on the
+ second and subsequent consecutive calls to rl_old_menu_complete). When we
+ hit the end of the match list, we restore the original unmatched text,
+ ring the bell, and reset the counter to zero. */
+int
+rl_old_menu_complete (count, invoking_key)
+ int count, invoking_key;
+{
+ rl_compentry_func_t *our_func;
+ int matching_filenames, found_quote;
+
+ static char *orig_text;
+ static char **matches = (char **)0;
+ static int match_list_index = 0;
+ static int match_list_size = 0;
+ static int orig_start, orig_end;
+ static char quote_char;
+ static int delimiter;
+
+ /* The first time through, we generate the list of matches and set things
+ up to insert them. */
+ if (rl_last_func != rl_old_menu_complete)
+ {
+ /* Clean up from previous call, if any. */
+ FREE (orig_text);
+ if (matches)
+ _rl_free_match_list (matches);
+
+ match_list_index = match_list_size = 0;
+ matches = (char **)NULL;
+
+ rl_completion_invoking_key = invoking_key;
+
+ RL_SETSTATE(RL_STATE_COMPLETING);
+
+ /* Only the completion entry function can change these. */
+ set_completion_defaults ('%');
+
+ our_func = rl_menu_completion_entry_function;
+ if (our_func == 0)
+ our_func = rl_completion_entry_function
+ ? rl_completion_entry_function
+ : rl_filename_completion_function;
+
+ /* We now look backwards for the start of a filename/variable word. */
+ orig_end = rl_point;
+ found_quote = delimiter = 0;
+ quote_char = '\0';
+
+ if (rl_point)
+ /* This (possibly) changes rl_point. If it returns a non-zero char,
+ we know we have an open quote. */
+ quote_char = _rl_find_completion_word (&found_quote, &delimiter);
+
+ orig_start = rl_point;
+ rl_point = orig_end;
+
+ orig_text = rl_copy_text (orig_start, orig_end);
+ matches = gen_completion_matches (orig_text, orig_start, orig_end,
+ our_func, found_quote, quote_char);
+
+ /* If we are matching filenames, the attempted completion function will
+ have set rl_filename_completion_desired to a non-zero value. The basic
+ rl_filename_completion_function does this. */
+ matching_filenames = rl_filename_completion_desired;
+
+ if (matches == 0 || postprocess_matches (&matches, matching_filenames) == 0)
+ {
+ rl_ding ();
+ FREE (matches);
+ matches = (char **)0;
+ FREE (orig_text);
+ orig_text = (char *)0;
+ completion_changed_buffer = 0;
+ RL_UNSETSTATE(RL_STATE_COMPLETING);
+ return (0);
+ }
+
+ RL_UNSETSTATE(RL_STATE_COMPLETING);
+
+ for (match_list_size = 0; matches[match_list_size]; match_list_size++)
+ ;
+ /* matches[0] is lcd if match_list_size > 1, but the circular buffer
+ code below should take care of it. */
+
+ if (match_list_size > 1 && _rl_complete_show_all)
+ display_matches (matches);
+ }
+
+ /* Now we have the list of matches. Replace the text between
+ rl_line_buffer[orig_start] and rl_line_buffer[rl_point] with
+ matches[match_list_index], and add any necessary closing char. */
+
+ if (matches == 0 || match_list_size == 0)
+ {
+ rl_ding ();
+ FREE (matches);
+ matches = (char **)0;
+ completion_changed_buffer = 0;
+ return (0);
+ }
+
+ match_list_index += count;
+ if (match_list_index < 0)
+ match_list_index += match_list_size;
+ else
+ match_list_index %= match_list_size;
+
+ if (match_list_index == 0 && match_list_size > 1)
+ {
+ rl_ding ();
+ insert_match (orig_text, orig_start, MULT_MATCH, &quote_char);
+ }
+ else
+ {
+ insert_match (matches[match_list_index], orig_start, SINGLE_MATCH, &quote_char);
+ append_to_match (matches[match_list_index], delimiter, quote_char,
+ strcmp (orig_text, matches[match_list_index]));
+ }
+
+ completion_changed_buffer = 1;
+ return (0);
+}
+
+int
+rl_menu_complete (count, ignore)
+ int count, ignore;
+{
+ rl_compentry_func_t *our_func;
+ int matching_filenames, found_quote;
+
+ static char *orig_text;
+ static char **matches = (char **)0;
+ static int match_list_index = 0;
+ static int match_list_size = 0;
+ static int nontrivial_lcd = 0;
+ static int full_completion = 0; /* set to 1 if menu completion should reinitialize on next call */
+ static int orig_start, orig_end;
+ static char quote_char;
+ static int delimiter;
+
+ /* The first time through, we generate the list of matches and set things
+ up to insert them. */
+ if ((rl_last_func != rl_menu_complete && rl_last_func != rl_backward_menu_complete) || full_completion)
+ {
+ /* Clean up from previous call, if any. */
+ FREE (orig_text);
+ if (matches)
+ _rl_free_match_list (matches);
+
+ match_list_index = match_list_size = 0;
+ matches = (char **)NULL;
+
+ full_completion = 0;
+
+ RL_SETSTATE(RL_STATE_COMPLETING);
+
+ /* Only the completion entry function can change these. */
+ set_completion_defaults ('%');
+
+ our_func = rl_menu_completion_entry_function;
+ if (our_func == 0)
+ our_func = rl_completion_entry_function
+ ? rl_completion_entry_function
+ : rl_filename_completion_function;
+
+ /* We now look backwards for the start of a filename/variable word. */
+ orig_end = rl_point;
+ found_quote = delimiter = 0;
+ quote_char = '\0';
+
+ if (rl_point)
+ /* This (possibly) changes rl_point. If it returns a non-zero char,
+ we know we have an open quote. */
+ quote_char = _rl_find_completion_word (&found_quote, &delimiter);
+
+ orig_start = rl_point;
+ rl_point = orig_end;
+
+ orig_text = rl_copy_text (orig_start, orig_end);
+ matches = gen_completion_matches (orig_text, orig_start, orig_end,
+ our_func, found_quote, quote_char);
+
+ nontrivial_lcd = matches && strcmp (orig_text, matches[0]) != 0;
+
+ /* If we are matching filenames, the attempted completion function will
+ have set rl_filename_completion_desired to a non-zero value. The basic
+ rl_filename_completion_function does this. */
+ matching_filenames = rl_filename_completion_desired;
+
+ if (matches == 0 || postprocess_matches (&matches, matching_filenames) == 0)
+ {
+ rl_ding ();
+ FREE (matches);
+ matches = (char **)0;
+ FREE (orig_text);
+ orig_text = (char *)0;
+ completion_changed_buffer = 0;
+ RL_UNSETSTATE(RL_STATE_COMPLETING);
+ return (0);
+ }
+
+ RL_UNSETSTATE(RL_STATE_COMPLETING);
+
+ for (match_list_size = 0; matches[match_list_size]; match_list_size++)
+ ;
+
+ if (match_list_size == 0)
+ {
+ rl_ding ();
+ FREE (matches);
+ matches = (char **)0;
+ match_list_index = 0;
+ completion_changed_buffer = 0;
+ return (0);
+ }
+
+ /* matches[0] is lcd if match_list_size > 1, but the circular buffer
+ code below should take care of it. */
+ if (*matches[0])
+ {
+ insert_match (matches[0], orig_start, matches[1] ? MULT_MATCH : SINGLE_MATCH, &quote_char);
+ orig_end = orig_start + strlen (matches[0]);
+ completion_changed_buffer = STREQ (orig_text, matches[0]) == 0;
+ }
+
+ if (match_list_size > 1 && _rl_complete_show_all)
+ {
+ display_matches (matches);
+ /* If there are so many matches that the user has to be asked
+ whether or not he wants to see the matches, menu completion
+ is unwieldy. */
+ if (rl_completion_query_items > 0 && match_list_size >= rl_completion_query_items)
+ {
+ rl_ding ();
+ FREE (matches);
+ matches = (char **)0;
+ full_completion = 1;
+ return (0);
+ }
+ }
+ else if (match_list_size <= 1)
+ {
+ append_to_match (matches[0], delimiter, quote_char, nontrivial_lcd);
+ full_completion = 1;
+ return (0);
+ }
+ }
+
+ /* Now we have the list of matches. Replace the text between
+ rl_line_buffer[orig_start] and rl_line_buffer[rl_point] with
+ matches[match_list_index], and add any necessary closing char. */
+
+ if (matches == 0 || match_list_size == 0)
+ {
+ rl_ding ();
+ FREE (matches);
+ matches = (char **)0;
+ completion_changed_buffer = 0;
+ return (0);
+ }
+
+ match_list_index += count;
+ if (match_list_index < 0)
+ match_list_index += match_list_size;
+ else
+ match_list_index %= match_list_size;
+
+ if (match_list_index == 0 && match_list_size > 1)
+ {
+ rl_ding ();
+ insert_match (matches[0], orig_start, MULT_MATCH, &quote_char);
+ }
+ else
+ {
+ insert_match (matches[match_list_index], orig_start, SINGLE_MATCH, &quote_char);
+ append_to_match (matches[match_list_index], delimiter, quote_char,
+ strcmp (orig_text, matches[match_list_index]));
+ }
+
+ completion_changed_buffer = 1;
+ return (0);
+}
+
+int
+rl_backward_menu_complete (count, key)
+ int count, key;
+{
+ /* Positive arguments to backward-menu-complete translate into negative
+ arguments for menu-complete, and vice versa. */
+ return (rl_menu_complete (-count, key));
+}
diff --git a/lib/readline/display.c b/lib/readline/display.c
new file mode 100644
index 0000000..e4105ee
--- /dev/null
+++ b/lib/readline/display.c
@@ -0,0 +1,2688 @@
+/* display.c -- readline redisplay facility. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#include "posixstat.h"
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#include <stdio.h>
+
+/* System-specific feature definitions and include files. */
+#include "rldefs.h"
+#include "rlmbutil.h"
+
+/* Termcap library stuff. */
+#include "tcap.h"
+
+/* Some standard library routines. */
+#include "readline.h"
+#include "history.h"
+
+#include "rlprivate.h"
+#include "xmalloc.h"
+
+#if !defined (strchr) && !defined (__STDC__)
+extern char *strchr (), *strrchr ();
+#endif /* !strchr && !__STDC__ */
+
+static void update_line PARAMS((char *, char *, int, int, int, int));
+static void space_to_eol PARAMS((int));
+static void delete_chars PARAMS((int));
+static void insert_some_chars PARAMS((char *, int, int));
+static void cr PARAMS((void));
+
+/* State of visible and invisible lines. */
+struct line_state
+ {
+ char *line;
+ int *lbreaks;
+ int lbsize;
+#if defined (HANDLE_MULTIBYTE)
+ int *wrapped_line;
+ int wbsize;
+#endif
+ };
+
+/* The line display buffers. One is the line currently displayed on
+ the screen. The other is the line about to be displayed. */
+static struct line_state line_state_array[2];
+static struct line_state *line_state_visible = &line_state_array[0];
+static struct line_state *line_state_invisible = &line_state_array[1];
+static int line_structures_initialized = 0;
+
+/* Backwards-compatible names. */
+#define inv_lbreaks (line_state_invisible->lbreaks)
+#define inv_lbsize (line_state_invisible->lbsize)
+#define vis_lbreaks (line_state_visible->lbreaks)
+#define vis_lbsize (line_state_visible->lbsize)
+
+#define visible_line (line_state_visible->line)
+#define invisible_line (line_state_invisible->line)
+
+#if defined (HANDLE_MULTIBYTE)
+static int _rl_col_width PARAMS((const char *, int, int, int));
+#else
+# define _rl_col_width(l, s, e, f) (((e) <= (s)) ? 0 : (e) - (s))
+#endif
+
+/* Heuristic used to decide whether it is faster to move from CUR to NEW
+ by backing up or outputting a carriage return and moving forward. CUR
+ and NEW are either both buffer positions or absolute screen positions. */
+#define CR_FASTER(new, cur) (((new) + 1) < ((cur) - (new)))
+
+/* _rl_last_c_pos is an absolute cursor position in multibyte locales and a
+ buffer index in others. This macro is used when deciding whether the
+ current cursor position is in the middle of a prompt string containing
+ invisible characters. XXX - might need to take `modmark' into account. */
+#define PROMPT_ENDING_INDEX \
+ ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) ? prompt_physical_chars : prompt_last_invisible+1)
+
+
+/* **************************************************************** */
+/* */
+/* Display stuff */
+/* */
+/* **************************************************************** */
+
+/* This is the stuff that is hard for me. I never seem to write good
+ display routines in C. Let's see how I do this time. */
+
+/* (PWP) Well... Good for a simple line updater, but totally ignores
+ the problems of input lines longer than the screen width.
+
+ update_line and the code that calls it makes a multiple line,
+ automatically wrapping line update. Careful attention needs
+ to be paid to the vertical position variables. */
+
+/* Keep two buffers; one which reflects the current contents of the
+ screen, and the other to draw what we think the new contents should
+ be. Then compare the buffers, and make whatever changes to the
+ screen itself that we should. Finally, make the buffer that we
+ just drew into be the one which reflects the current contents of the
+ screen, and place the cursor where it belongs.
+
+ Commands that want to can fix the display themselves, and then let
+ this function know that the display has been fixed by setting the
+ RL_DISPLAY_FIXED variable. This is good for efficiency. */
+
+/* Application-specific redisplay function. */
+rl_voidfunc_t *rl_redisplay_function = rl_redisplay;
+
+/* Global variables declared here. */
+/* What YOU turn on when you have handled all redisplay yourself. */
+int rl_display_fixed = 0;
+
+int _rl_suppress_redisplay = 0;
+int _rl_want_redisplay = 0;
+
+/* The stuff that gets printed out before the actual text of the line.
+ This is usually pointing to rl_prompt. */
+char *rl_display_prompt = (char *)NULL;
+
+/* Pseudo-global variables declared here. */
+
+/* The visible cursor position. If you print some text, adjust this. */
+/* NOTE: _rl_last_c_pos is used as a buffer index when not in a locale
+ supporting multibyte characters, and an absolute cursor position when
+ in such a locale. This is an artifact of the donated multibyte support.
+ Care must be taken when modifying its value. */
+int _rl_last_c_pos = 0;
+int _rl_last_v_pos = 0;
+
+static int cpos_adjusted;
+static int cpos_buffer_position;
+static int prompt_multibyte_chars;
+
+/* Number of lines currently on screen minus 1. */
+int _rl_vis_botlin = 0;
+
+/* Variables used only in this file. */
+/* The last left edge of text that was displayed. This is used when
+ doing horizontal scrolling. It shifts in thirds of a screenwidth. */
+static int last_lmargin;
+
+/* A buffer for `modeline' messages. */
+static char msg_buf[128];
+
+/* Non-zero forces the redisplay even if we thought it was unnecessary. */
+static int forced_display;
+
+/* Default and initial buffer size. Can grow. */
+static int line_size = 1024;
+
+/* Variables to keep track of the expanded prompt string, which may
+ include invisible characters. */
+
+static char *local_prompt, *local_prompt_prefix;
+static int local_prompt_len;
+static int prompt_visible_length, prompt_prefix_length;
+
+/* The number of invisible characters in the line currently being
+ displayed on the screen. */
+static int visible_wrap_offset;
+
+/* The number of invisible characters in the prompt string. Static so it
+ can be shared between rl_redisplay and update_line */
+static int wrap_offset;
+
+/* The index of the last invisible character in the prompt string. */
+static int prompt_last_invisible;
+
+/* The length (buffer offset) of the first line of the last (possibly
+ multi-line) buffer displayed on the screen. */
+static int visible_first_line_len;
+
+/* Number of invisible characters on the first physical line of the prompt.
+ Only valid when the number of physical characters in the prompt exceeds
+ (or is equal to) _rl_screenwidth. */
+static int prompt_invis_chars_first_line;
+
+static int prompt_last_screen_line;
+
+static int prompt_physical_chars;
+
+/* set to a non-zero value by rl_redisplay if we are marking modified history
+ lines and the current line is so marked. */
+static int modmark;
+
+/* Variables to save and restore prompt and display information. */
+
+/* These are getting numerous enough that it's time to create a struct. */
+
+static char *saved_local_prompt;
+static char *saved_local_prefix;
+static int saved_last_invisible;
+static int saved_visible_length;
+static int saved_prefix_length;
+static int saved_local_length;
+static int saved_invis_chars_first_line;
+static int saved_physical_chars;
+
+/* Expand the prompt string S and return the number of visible
+ characters in *LP, if LP is not null. This is currently more-or-less
+ a placeholder for expansion. LIP, if non-null is a place to store the
+ index of the last invisible character in the returned string. NIFLP,
+ if non-zero, is a place to store the number of invisible characters in
+ the first prompt line. The previous are used as byte counts -- indexes
+ into a character buffer. */
+
+/* Current implementation:
+ \001 (^A) start non-visible characters
+ \002 (^B) end non-visible characters
+ all characters except \001 and \002 (following a \001) are copied to
+ the returned string; all characters except those between \001 and
+ \002 are assumed to be `visible'. */
+
+static char *
+expand_prompt (pmt, lp, lip, niflp, vlp)
+ char *pmt;
+ int *lp, *lip, *niflp, *vlp;
+{
+ char *r, *ret, *p, *igstart;
+ int l, rl, last, ignoring, ninvis, invfl, invflset, ind, pind, physchars;
+
+ /* Short-circuit if we can. */
+ if ((MB_CUR_MAX <= 1 || rl_byte_oriented) && strchr (pmt, RL_PROMPT_START_IGNORE) == 0)
+ {
+ r = savestring (pmt);
+ if (lp)
+ *lp = strlen (r);
+ if (lip)
+ *lip = 0;
+ if (niflp)
+ *niflp = 0;
+ if (vlp)
+ *vlp = lp ? *lp : strlen (r);
+ return r;
+ }
+
+ l = strlen (pmt);
+ r = ret = (char *)xmalloc (l + 1);
+
+ invfl = 0; /* invisible chars in first line of prompt */
+ invflset = 0; /* we only want to set invfl once */
+
+ igstart = 0;
+ for (rl = ignoring = last = ninvis = physchars = 0, p = pmt; p && *p; p++)
+ {
+ /* This code strips the invisible character string markers
+ RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE */
+ if (ignoring == 0 && *p == RL_PROMPT_START_IGNORE) /* XXX - check ignoring? */
+ {
+ ignoring = 1;
+ igstart = p;
+ continue;
+ }
+ else if (ignoring && *p == RL_PROMPT_END_IGNORE)
+ {
+ ignoring = 0;
+ if (p != (igstart + 1))
+ last = r - ret - 1;
+ continue;
+ }
+ else
+ {
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ pind = p - pmt;
+ ind = _rl_find_next_mbchar (pmt, pind, 1, MB_FIND_NONZERO);
+ l = ind - pind;
+ while (l--)
+ *r++ = *p++;
+ if (!ignoring)
+ {
+ /* rl ends up being assigned to prompt_visible_length,
+ which is the number of characters in the buffer that
+ contribute to characters on the screen, which might
+ not be the same as the number of physical characters
+ on the screen in the presence of multibyte characters */
+ rl += ind - pind;
+ physchars += _rl_col_width (pmt, pind, ind, 0);
+ }
+ else
+ ninvis += ind - pind;
+ p--; /* compensate for later increment */
+ }
+ else
+#endif
+ {
+ *r++ = *p;
+ if (!ignoring)
+ {
+ rl++; /* visible length byte counter */
+ physchars++;
+ }
+ else
+ ninvis++; /* invisible chars byte counter */
+ }
+
+ if (invflset == 0 && rl >= _rl_screenwidth)
+ {
+ invfl = ninvis;
+ invflset = 1;
+ }
+ }
+ }
+
+ if (rl < _rl_screenwidth)
+ invfl = ninvis;
+
+ *r = '\0';
+ if (lp)
+ *lp = rl;
+ if (lip)
+ *lip = last;
+ if (niflp)
+ *niflp = invfl;
+ if (vlp)
+ *vlp = physchars;
+ return ret;
+}
+
+/* Just strip out RL_PROMPT_START_IGNORE and RL_PROMPT_END_IGNORE from
+ PMT and return the rest of PMT. */
+char *
+_rl_strip_prompt (pmt)
+ char *pmt;
+{
+ char *ret;
+
+ ret = expand_prompt (pmt, (int *)NULL, (int *)NULL, (int *)NULL, (int *)NULL);
+ return ret;
+}
+
+/*
+ * Expand the prompt string into the various display components, if
+ * necessary.
+ *
+ * local_prompt = expanded last line of string in rl_display_prompt
+ * (portion after the final newline)
+ * local_prompt_prefix = portion before last newline of rl_display_prompt,
+ * expanded via expand_prompt
+ * prompt_visible_length = number of visible characters in local_prompt
+ * prompt_prefix_length = number of visible characters in local_prompt_prefix
+ *
+ * This function is called once per call to readline(). It may also be
+ * called arbitrarily to expand the primary prompt.
+ *
+ * The return value is the number of visible characters on the last line
+ * of the (possibly multi-line) prompt.
+ */
+int
+rl_expand_prompt (prompt)
+ char *prompt;
+{
+ char *p, *t;
+ int c;
+
+ /* Clear out any saved values. */
+ FREE (local_prompt);
+ FREE (local_prompt_prefix);
+
+ local_prompt = local_prompt_prefix = (char *)0;
+ local_prompt_len = 0;
+ prompt_last_invisible = prompt_invis_chars_first_line = 0;
+ prompt_visible_length = prompt_physical_chars = 0;
+
+ if (prompt == 0 || *prompt == 0)
+ return (0);
+
+ p = strrchr (prompt, '\n');
+ if (!p)
+ {
+ /* The prompt is only one logical line, though it might wrap. */
+ local_prompt = expand_prompt (prompt, &prompt_visible_length,
+ &prompt_last_invisible,
+ &prompt_invis_chars_first_line,
+ &prompt_physical_chars);
+ local_prompt_prefix = (char *)0;
+ local_prompt_len = local_prompt ? strlen (local_prompt) : 0;
+ return (prompt_visible_length);
+ }
+ else
+ {
+ /* The prompt spans multiple lines. */
+ t = ++p;
+ local_prompt = expand_prompt (p, &prompt_visible_length,
+ &prompt_last_invisible,
+ &prompt_invis_chars_first_line,
+ &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,
+ (int *)NULL,
+ (int *)NULL);
+ *t = c;
+ local_prompt_len = local_prompt ? strlen (local_prompt) : 0;
+ return (prompt_prefix_length);
+ }
+}
+
+/* Initialize the VISIBLE_LINE and INVISIBLE_LINE arrays, and their associated
+ arrays of line break markers. MINSIZE is the minimum size of VISIBLE_LINE
+ and INVISIBLE_LINE; if it is greater than LINE_SIZE, LINE_SIZE is
+ increased. If the lines have already been allocated, this ensures that
+ they can hold at least MINSIZE characters. */
+static void
+init_line_structures (minsize)
+ int minsize;
+{
+ register int n;
+
+ if (invisible_line == 0) /* initialize it */
+ {
+ if (line_size < minsize)
+ line_size = minsize;
+ visible_line = (char *)xmalloc (line_size);
+ invisible_line = (char *)xmalloc (line_size);
+ }
+ else if (line_size < minsize) /* ensure it can hold MINSIZE chars */
+ {
+ line_size *= 2;
+ if (line_size < minsize)
+ line_size = minsize;
+ visible_line = (char *)xrealloc (visible_line, line_size);
+ invisible_line = (char *)xrealloc (invisible_line, line_size);
+ }
+
+ for (n = minsize; n < line_size; n++)
+ {
+ visible_line[n] = 0;
+ invisible_line[n] = 1;
+ }
+
+ if (vis_lbreaks == 0)
+ {
+ /* should be enough. */
+ inv_lbsize = vis_lbsize = 256;
+
+#if defined (HANDLE_MULTIBYTE)
+ line_state_visible->wbsize = vis_lbsize;
+ line_state_visible->wrapped_line = (int *)xmalloc (line_state_visible->wbsize * sizeof (int));
+
+ line_state_invisible->wbsize = inv_lbsize;
+ line_state_invisible->wrapped_line = (int *)xmalloc (line_state_invisible->wbsize * sizeof (int));
+#endif
+
+ inv_lbreaks = (int *)xmalloc (inv_lbsize * sizeof (int));
+ vis_lbreaks = (int *)xmalloc (vis_lbsize * sizeof (int));
+ inv_lbreaks[0] = vis_lbreaks[0] = 0;
+ }
+
+ line_structures_initialized = 1;
+}
+
+/* Basic redisplay algorithm. */
+void
+rl_redisplay ()
+{
+ register int in, out, c, linenum, cursor_linenum;
+ register char *line;
+ int inv_botlin, lb_botlin, lb_linenum, o_cpos;
+ int newlines, lpos, temp, n0, num, prompt_lines_estimate;
+ char *prompt_this_line;
+#if defined (HANDLE_MULTIBYTE)
+ wchar_t wc;
+ size_t wc_bytes;
+ int wc_width;
+ mbstate_t ps;
+ int _rl_wrapped_multicolumn = 0;
+#endif
+
+ if (_rl_echoing_p == 0)
+ return;
+
+ /* Block keyboard interrupts because this function manipulates global
+ data structures. */
+ _rl_block_sigint ();
+ RL_SETSTATE (RL_STATE_REDISPLAYING);
+
+ if (!rl_display_prompt)
+ rl_display_prompt = "";
+
+ if (line_structures_initialized == 0)
+ {
+ init_line_structures (0);
+ rl_on_new_line ();
+ }
+
+ /* Draw the line into the buffer. */
+ cpos_buffer_position = -1;
+
+ prompt_multibyte_chars = prompt_visible_length - prompt_physical_chars;
+
+ line = invisible_line;
+ out = inv_botlin = 0;
+
+ /* Mark the line as modified or not. We only do this for history
+ lines. */
+ modmark = 0;
+ if (_rl_mark_modified_lines && current_history () && rl_undo_list)
+ {
+ line[out++] = '*';
+ line[out] = '\0';
+ modmark = 1;
+ }
+
+ /* If someone thought that the redisplay was handled, but the currently
+ visible line has a different modification state than the one about
+ to become visible, then correct the caller's misconception. */
+ if (visible_line[0] != invisible_line[0])
+ rl_display_fixed = 0;
+
+ /* If the prompt to be displayed is the `primary' readline prompt (the
+ one passed to readline()), use the values we have already expanded.
+ If not, use what's already in rl_display_prompt. WRAP_OFFSET is the
+ number of non-visible characters in the prompt string. */
+ if (rl_display_prompt == rl_prompt || local_prompt)
+ {
+ if (local_prompt_prefix && forced_display)
+ _rl_output_some_chars (local_prompt_prefix, strlen (local_prompt_prefix));
+
+ if (local_prompt_len > 0)
+ {
+ temp = local_prompt_len + out + 2;
+ if (temp >= line_size)
+ {
+ line_size = (temp + 1024) - (temp % 1024);
+ visible_line = (char *)xrealloc (visible_line, line_size);
+ line = invisible_line = (char *)xrealloc (invisible_line, line_size);
+ }
+ strncpy (line + out, local_prompt, local_prompt_len);
+ out += local_prompt_len;
+ }
+ line[out] = '\0';
+ wrap_offset = local_prompt_len - prompt_visible_length;
+ }
+ else
+ {
+ int pmtlen;
+ prompt_this_line = strrchr (rl_display_prompt, '\n');
+ if (!prompt_this_line)
+ prompt_this_line = rl_display_prompt;
+ else
+ {
+ prompt_this_line++;
+ pmtlen = prompt_this_line - rl_display_prompt; /* temp var */
+ if (forced_display)
+ {
+ _rl_output_some_chars (rl_display_prompt, pmtlen);
+ /* Make sure we are at column zero even after a newline,
+ regardless of the state of terminal output processing. */
+ if (pmtlen < 2 || prompt_this_line[-2] != '\r')
+ cr ();
+ }
+ }
+
+ prompt_physical_chars = pmtlen = strlen (prompt_this_line);
+ temp = pmtlen + out + 2;
+ if (temp >= line_size)
+ {
+ line_size = (temp + 1024) - (temp % 1024);
+ visible_line = (char *)xrealloc (visible_line, line_size);
+ line = invisible_line = (char *)xrealloc (invisible_line, line_size);
+ }
+ strncpy (line + out, prompt_this_line, pmtlen);
+ out += pmtlen;
+ line[out] = '\0';
+ wrap_offset = prompt_invis_chars_first_line = 0;
+ }
+
+#define CHECK_INV_LBREAKS() \
+ do { \
+ if (newlines >= (inv_lbsize - 2)) \
+ { \
+ inv_lbsize *= 2; \
+ inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
+ } \
+ } while (0)
+
+#if defined (HANDLE_MULTIBYTE)
+#define CHECK_LPOS() \
+ do { \
+ lpos++; \
+ if (lpos >= _rl_screenwidth) \
+ { \
+ if (newlines >= (inv_lbsize - 2)) \
+ { \
+ inv_lbsize *= 2; \
+ inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
+ } \
+ inv_lbreaks[++newlines] = out; \
+ if (newlines >= (line_state_invisible->wbsize - 1)) \
+ { \
+ line_state_invisible->wbsize *= 2; \
+ line_state_invisible->wrapped_line = (int *)xrealloc (line_state_invisible->wrapped_line, line_state_invisible->wbsize * sizeof(int)); \
+ } \
+ line_state_invisible->wrapped_line[newlines] = _rl_wrapped_multicolumn; \
+ lpos = 0; \
+ } \
+ } while (0)
+#else
+#define CHECK_LPOS() \
+ do { \
+ lpos++; \
+ if (lpos >= _rl_screenwidth) \
+ { \
+ if (newlines >= (inv_lbsize - 2)) \
+ { \
+ inv_lbsize *= 2; \
+ inv_lbreaks = (int *)xrealloc (inv_lbreaks, inv_lbsize * sizeof (int)); \
+ } \
+ inv_lbreaks[++newlines] = out; \
+ lpos = 0; \
+ } \
+ } while (0)
+#endif
+
+ /* inv_lbreaks[i] is where line i starts in the buffer. */
+ inv_lbreaks[newlines = 0] = 0;
+ lpos = prompt_physical_chars + modmark;
+
+#if defined (HANDLE_MULTIBYTE)
+ memset (line_state_invisible->wrapped_line, 0, line_state_invisible->wbsize * sizeof (int));
+ num = 0;
+#endif
+
+ /* prompt_invis_chars_first_line is the number of invisible characters in
+ the first physical line of the prompt.
+ wrap_offset - prompt_invis_chars_first_line is the number of invis
+ chars on the second (or, more generally, last) line. */
+
+ /* This is zero-based, used to set the newlines */
+ prompt_lines_estimate = lpos / _rl_screenwidth;
+
+ /* what if lpos is already >= _rl_screenwidth before we start drawing the
+ contents of the command line? */
+ while (lpos >= _rl_screenwidth)
+ {
+ int z;
+ /* fix from Darin Johnson <darin@acuson.com> for prompt string with
+ invisible characters that is longer than the screen width. The
+ prompt_invis_chars_first_line variable could be made into an array
+ saying how many invisible characters there are per line, but that's
+ probably too much work for the benefit gained. How many people have
+ prompts that exceed two physical lines?
+ Additional logic fix from Edward Catmur <ed@catmur.co.uk> */
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0 && prompt_multibyte_chars > 0)
+ {
+ n0 = num;
+ temp = local_prompt_len;
+ while (num < temp)
+ {
+ z = _rl_col_width (local_prompt, n0, num, 1);
+ if (z > _rl_screenwidth)
+ {
+ num = _rl_find_prev_mbchar (local_prompt, num, MB_FIND_ANY);
+ break;
+ }
+ else if (z == _rl_screenwidth)
+ break;
+ num++;
+ }
+ temp = num;
+ }
+ else
+#endif /* !HANDLE_MULTIBYTE */
+ temp = ((newlines + 1) * _rl_screenwidth);
+
+ /* Now account for invisible characters in the current line. */
+ /* XXX - this assumes that the invisible characters may be split, but only
+ between the first and the last lines. */
+ temp += ((local_prompt_prefix == 0) ? ((newlines == 0) ? prompt_invis_chars_first_line
+ : ((newlines == prompt_lines_estimate) ? wrap_offset : prompt_invis_chars_first_line))
+ : ((newlines == 0) ? wrap_offset : 0));
+
+ inv_lbreaks[++newlines] = temp;
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0 && prompt_multibyte_chars > 0)
+ lpos -= _rl_col_width (local_prompt, n0, num, 1);
+ else
+#endif
+ lpos -= _rl_screenwidth;
+ }
+
+ prompt_last_screen_line = newlines;
+
+ /* Draw the rest of the line (after the prompt) into invisible_line, keeping
+ track of where the cursor is (cpos_buffer_position), the number of the line containing
+ the cursor (lb_linenum), the last line number (lb_botlin and inv_botlin).
+ It maintains an array of line breaks for display (inv_lbreaks).
+ This handles expanding tabs for display and displaying meta characters. */
+ lb_linenum = 0;
+#if defined (HANDLE_MULTIBYTE)
+ in = 0;
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ memset (&ps, 0, sizeof (mbstate_t));
+ /* XXX - what if wc_bytes ends up <= 0? check for MB_INVALIDCH */
+ wc_bytes = mbrtowc (&wc, rl_line_buffer, rl_end, &ps);
+ }
+ else
+ wc_bytes = 1;
+ while (in < rl_end)
+#else
+ for (in = 0; in < rl_end; in++)
+#endif
+ {
+ c = (unsigned char)rl_line_buffer[in];
+
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ if (MB_INVALIDCH (wc_bytes))
+ {
+ /* Byte sequence is invalid or shortened. Assume that the
+ first byte represents a character. */
+ wc_bytes = 1;
+ /* Assume that a character occupies a single column. */
+ wc_width = 1;
+ memset (&ps, 0, sizeof (mbstate_t));
+ }
+ else if (MB_NULLWCH (wc_bytes))
+ break; /* Found '\0' */
+ else
+ {
+ temp = wcwidth (wc);
+ wc_width = (temp >= 0) ? temp : 1;
+ }
+ }
+#endif
+
+ if (out + 8 >= line_size) /* XXX - 8 for \t */
+ {
+ line_size *= 2;
+ visible_line = (char *)xrealloc (visible_line, line_size);
+ invisible_line = (char *)xrealloc (invisible_line, line_size);
+ line = invisible_line;
+ }
+
+ if (in == rl_point)
+ {
+ cpos_buffer_position = out;
+ lb_linenum = newlines;
+ }
+
+#if defined (HANDLE_MULTIBYTE)
+ if (META_CHAR (c) && _rl_output_meta_chars == 0) /* XXX - clean up */
+#else
+ if (META_CHAR (c))
+#endif
+ {
+ if (_rl_output_meta_chars == 0)
+ {
+ sprintf (line + out, "\\%o", c);
+
+ if (lpos + 4 >= _rl_screenwidth)
+ {
+ temp = _rl_screenwidth - lpos;
+ CHECK_INV_LBREAKS ();
+ inv_lbreaks[++newlines] = out + temp;
+ lpos = 4 - temp;
+ }
+ else
+ lpos += 4;
+
+ out += 4;
+ }
+ else
+ {
+ line[out++] = c;
+ CHECK_LPOS();
+ }
+ }
+#if defined (DISPLAY_TABS)
+ else if (c == '\t')
+ {
+ register int newout;
+
+#if 0
+ newout = (out | (int)7) + 1;
+#else
+ newout = out + 8 - lpos % 8;
+#endif
+ temp = newout - out;
+ if (lpos + temp >= _rl_screenwidth)
+ {
+ register int temp2;
+ temp2 = _rl_screenwidth - lpos;
+ CHECK_INV_LBREAKS ();
+ inv_lbreaks[++newlines] = out + temp2;
+ lpos = temp - temp2;
+ while (out < newout)
+ line[out++] = ' ';
+ }
+ else
+ {
+ while (out < newout)
+ line[out++] = ' ';
+ lpos += temp;
+ }
+ }
+#endif
+ else if (c == '\n' && _rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up)
+ {
+ line[out++] = '\0'; /* XXX - sentinel */
+ CHECK_INV_LBREAKS ();
+ inv_lbreaks[++newlines] = out;
+ lpos = 0;
+ }
+ else if (CTRL_CHAR (c) || c == RUBOUT)
+ {
+ line[out++] = '^';
+ CHECK_LPOS();
+ line[out++] = CTRL_CHAR (c) ? UNCTRL (c) : '?';
+ CHECK_LPOS();
+ }
+ else
+ {
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ register int i;
+
+ _rl_wrapped_multicolumn = 0;
+
+ if (_rl_screenwidth < lpos + wc_width)
+ for (i = lpos; i < _rl_screenwidth; i++)
+ {
+ /* The space will be removed in update_line() */
+ line[out++] = ' ';
+ _rl_wrapped_multicolumn++;
+ CHECK_LPOS();
+ }
+ if (in == rl_point)
+ {
+ cpos_buffer_position = out;
+ lb_linenum = newlines;
+ }
+ for (i = in; i < in+wc_bytes; i++)
+ line[out++] = rl_line_buffer[i];
+ for (i = 0; i < wc_width; i++)
+ CHECK_LPOS();
+ }
+ else
+ {
+ line[out++] = c;
+ CHECK_LPOS();
+ }
+#else
+ line[out++] = c;
+ CHECK_LPOS();
+#endif
+ }
+
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ in += wc_bytes;
+ /* XXX - what if wc_bytes ends up <= 0? check for MB_INVALIDCH */
+ wc_bytes = mbrtowc (&wc, rl_line_buffer + in, rl_end - in, &ps);
+ }
+ else
+ in++;
+#endif
+
+ }
+ line[out] = '\0';
+ if (cpos_buffer_position < 0)
+ {
+ cpos_buffer_position = out;
+ lb_linenum = newlines;
+ }
+
+ inv_botlin = lb_botlin = newlines;
+ CHECK_INV_LBREAKS ();
+ inv_lbreaks[newlines+1] = out;
+ cursor_linenum = lb_linenum;
+
+ /* CPOS_BUFFER_POSITION == position in buffer where cursor should be placed.
+ CURSOR_LINENUM == line number where the cursor should be placed. */
+
+ /* PWP: now is when things get a bit hairy. The visible and invisible
+ line buffers are really multiple lines, which would wrap every
+ (screenwidth - 1) characters. Go through each in turn, finding
+ the changed region and updating it. The line order is top to bottom. */
+
+ /* If we can move the cursor up and down, then use multiple lines,
+ otherwise, let long lines display in a single terminal line, and
+ horizontally scroll it. */
+
+ if (_rl_horizontal_scroll_mode == 0 && _rl_term_up && *_rl_term_up)
+ {
+ int nleft, pos, changed_screen_line, tx;
+
+ if (!rl_display_fixed || forced_display)
+ {
+ forced_display = 0;
+
+ /* If we have more than a screenful of material to display, then
+ only display a screenful. We should display the last screen,
+ not the first. */
+ if (out >= _rl_screenchars)
+ {
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ out = _rl_find_prev_mbchar (line, _rl_screenchars, MB_FIND_ANY);
+ else
+ out = _rl_screenchars - 1;
+ }
+
+ /* The first line is at character position 0 in the buffer. The
+ second and subsequent lines start at inv_lbreaks[N], offset by
+ OFFSET (which has already been calculated above). */
+
+#define INVIS_FIRST() (prompt_physical_chars > _rl_screenwidth ? prompt_invis_chars_first_line : wrap_offset)
+#define WRAP_OFFSET(line, offset) ((line == 0) \
+ ? (offset ? INVIS_FIRST() : 0) \
+ : ((line == prompt_last_screen_line) ? wrap_offset-prompt_invis_chars_first_line : 0))
+#define W_OFFSET(line, offset) ((line) == 0 ? offset : 0)
+#define VIS_LLEN(l) ((l) > _rl_vis_botlin ? 0 : (vis_lbreaks[l+1] - vis_lbreaks[l]))
+#define INV_LLEN(l) (inv_lbreaks[l+1] - inv_lbreaks[l])
+#define VIS_CHARS(line) (visible_line + vis_lbreaks[line])
+#define VIS_LINE(line) ((line) > _rl_vis_botlin) ? "" : VIS_CHARS(line)
+#define INV_LINE(line) (invisible_line + inv_lbreaks[line])
+
+#define OLD_CPOS_IN_PROMPT() (cpos_adjusted == 0 && \
+ _rl_last_c_pos != o_cpos && \
+ _rl_last_c_pos > wrap_offset && \
+ o_cpos < prompt_last_invisible)
+
+ /* For each line in the buffer, do the updating display. */
+ for (linenum = 0; linenum <= inv_botlin; linenum++)
+ {
+ /* This can lead us astray if we execute a program that changes
+ the locale from a non-multibyte to a multibyte one. */
+ o_cpos = _rl_last_c_pos;
+ cpos_adjusted = 0;
+ update_line (VIS_LINE(linenum), INV_LINE(linenum), linenum,
+ VIS_LLEN(linenum), INV_LLEN(linenum), inv_botlin);
+
+ /* update_line potentially changes _rl_last_c_pos, but doesn't
+ take invisible characters into account, since _rl_last_c_pos
+ is an absolute cursor position in a multibyte locale. See
+ if compensating here is the right thing, or if we have to
+ change update_line itself. There are several cases in which
+ update_line adjusts _rl_last_c_pos itself (so it can pass
+ _rl_move_cursor_relative accurate values); it communicates
+ this back by setting cpos_adjusted. If we assume that
+ _rl_last_c_pos is correct (an absolute cursor position) each
+ time update_line is called, then we can assume in our
+ calculations that o_cpos does not need to be adjusted by
+ wrap_offset. */
+ if (linenum == 0 && (MB_CUR_MAX > 1 && rl_byte_oriented == 0) && OLD_CPOS_IN_PROMPT())
+ _rl_last_c_pos -= prompt_invis_chars_first_line; /* XXX - was wrap_offset */
+ else if (linenum == prompt_last_screen_line && prompt_physical_chars > _rl_screenwidth &&
+ (MB_CUR_MAX > 1 && rl_byte_oriented == 0) &&
+ cpos_adjusted == 0 &&
+ _rl_last_c_pos != o_cpos &&
+ _rl_last_c_pos > (prompt_last_invisible - _rl_screenwidth - prompt_invis_chars_first_line))
+ _rl_last_c_pos -= (wrap_offset-prompt_invis_chars_first_line);
+
+ /* If this is the line with the prompt, we might need to
+ compensate for invisible characters in the new line. Do
+ this only if there is not more than one new line (which
+ implies that we completely overwrite the old visible line)
+ and the new line is shorter than the old. Make sure we are
+ at the end of the new line before clearing. */
+ if (linenum == 0 &&
+ inv_botlin == 0 && _rl_last_c_pos == out &&
+ (wrap_offset > visible_wrap_offset) &&
+ (_rl_last_c_pos < visible_first_line_len))
+ {
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ nleft = _rl_screenwidth - _rl_last_c_pos;
+ else
+ nleft = _rl_screenwidth + wrap_offset - _rl_last_c_pos;
+ if (nleft)
+ _rl_clear_to_eol (nleft);
+ }
+#if 0
+ /* This segment is intended to handle the case where the prompt
+ has invisible characters on the second line and the new line
+ to be displayed needs to clear the rest of the old characters
+ out (e.g., when printing the i-search prompt). In general,
+ the case of the new line being shorter than the old.
+ Incomplete */
+ else if (linenum == prompt_last_screen_line &&
+ prompt_physical_chars > _rl_screenwidth &&
+ wrap_offset != prompt_invis_chars_first_line &&
+ _rl_last_c_pos == out &&
+#endif
+
+
+ /* Since the new first line is now visible, save its length. */
+ if (linenum == 0)
+ visible_first_line_len = (inv_botlin > 0) ? inv_lbreaks[1] : out - wrap_offset;
+ }
+
+ /* We may have deleted some lines. If so, clear the left over
+ blank ones at the bottom out. */
+ if (_rl_vis_botlin > inv_botlin)
+ {
+ char *tt;
+ for (; linenum <= _rl_vis_botlin; linenum++)
+ {
+ tt = VIS_CHARS (linenum);
+ _rl_move_vert (linenum);
+ _rl_move_cursor_relative (0, tt);
+ _rl_clear_to_eol
+ ((linenum == _rl_vis_botlin) ? strlen (tt) : _rl_screenwidth);
+ }
+ }
+ _rl_vis_botlin = inv_botlin;
+
+ /* CHANGED_SCREEN_LINE is set to 1 if we have moved to a
+ different screen line during this redisplay. */
+ changed_screen_line = _rl_last_v_pos != cursor_linenum;
+ if (changed_screen_line)
+ {
+ _rl_move_vert (cursor_linenum);
+ /* If we moved up to the line with the prompt using _rl_term_up,
+ the physical cursor position on the screen stays the same,
+ but the buffer position needs to be adjusted to account
+ for invisible characters. */
+ if ((MB_CUR_MAX == 1 || rl_byte_oriented) && cursor_linenum == 0 && wrap_offset)
+ _rl_last_c_pos += wrap_offset;
+ }
+
+ /* We have to reprint the prompt if it contains invisible
+ characters, since it's not generally OK to just reprint
+ the characters from the current cursor position. But we
+ only need to reprint it if the cursor is before the last
+ invisible character in the prompt string. */
+ nleft = prompt_visible_length + wrap_offset;
+ if (cursor_linenum == 0 && wrap_offset > 0 && _rl_last_c_pos > 0 &&
+#if 0
+ _rl_last_c_pos <= PROMPT_ENDING_INDEX && local_prompt)
+#else
+ _rl_last_c_pos < PROMPT_ENDING_INDEX && local_prompt)
+#endif
+ {
+#if defined (__MSDOS__)
+ putc ('\r', rl_outstream);
+#else
+ if (_rl_term_cr)
+ tputs (_rl_term_cr, 1, _rl_output_character_function);
+#endif
+ if (modmark)
+ _rl_output_some_chars ("*", 1);
+
+ _rl_output_some_chars (local_prompt, nleft);
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ _rl_last_c_pos = _rl_col_width (local_prompt, 0, nleft, 1) - wrap_offset + modmark;
+ else
+ _rl_last_c_pos = nleft + modmark;
+ }
+
+ /* Where on that line? And where does that line start
+ in the buffer? */
+ pos = inv_lbreaks[cursor_linenum];
+ /* nleft == number of characters in the line buffer between the
+ start of the line and the desired cursor position. */
+ nleft = cpos_buffer_position - pos;
+
+ /* NLEFT is now a number of characters in a buffer. When in a
+ multibyte locale, however, _rl_last_c_pos is an absolute cursor
+ position that doesn't take invisible characters in the prompt
+ into account. We use a fudge factor to compensate. */
+
+ /* Since _rl_backspace() doesn't know about invisible characters in the
+ prompt, and there's no good way to tell it, we compensate for
+ those characters here and call _rl_backspace() directly. */
+ if (wrap_offset && cursor_linenum == 0 && nleft < _rl_last_c_pos)
+ {
+ /* TX == new physical cursor position in multibyte locale. */
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ tx = _rl_col_width (&visible_line[pos], 0, nleft, 1) - visible_wrap_offset;
+ else
+ tx = nleft;
+ if (tx >= 0 && _rl_last_c_pos > tx)
+ {
+ _rl_backspace (_rl_last_c_pos - tx); /* XXX */
+ _rl_last_c_pos = tx;
+ }
+ }
+
+ /* We need to note that in a multibyte locale we are dealing with
+ _rl_last_c_pos as an absolute cursor position, but moving to a
+ point specified by a buffer position (NLEFT) that doesn't take
+ invisible characters into account. */
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ _rl_move_cursor_relative (nleft, &invisible_line[pos]);
+ else if (nleft != _rl_last_c_pos)
+ _rl_move_cursor_relative (nleft, &invisible_line[pos]);
+ }
+ }
+ else /* Do horizontal scrolling. */
+ {
+#define M_OFFSET(margin, offset) ((margin) == 0 ? offset : 0)
+ int lmargin, ndisp, nleft, phys_c_pos, t;
+
+ /* Always at top line. */
+ _rl_last_v_pos = 0;
+
+ /* Compute where in the buffer the displayed line should start. This
+ will be LMARGIN. */
+
+ /* The number of characters that will be displayed before the cursor. */
+ ndisp = cpos_buffer_position - wrap_offset;
+ nleft = prompt_visible_length + wrap_offset;
+ /* Where the new cursor position will be on the screen. This can be
+ longer than SCREENWIDTH; if it is, lmargin will be adjusted. */
+ phys_c_pos = cpos_buffer_position - (last_lmargin ? last_lmargin : wrap_offset);
+ t = _rl_screenwidth / 3;
+
+ /* If the number of characters had already exceeded the screenwidth,
+ last_lmargin will be > 0. */
+
+ /* If the number of characters to be displayed is more than the screen
+ width, compute the starting offset so that the cursor is about
+ two-thirds of the way across the screen. */
+ if (phys_c_pos > _rl_screenwidth - 2)
+ {
+ lmargin = cpos_buffer_position - (2 * t);
+ if (lmargin < 0)
+ lmargin = 0;
+ /* If the left margin would be in the middle of a prompt with
+ invisible characters, don't display the prompt at all. */
+ if (wrap_offset && lmargin > 0 && lmargin < nleft)
+ lmargin = nleft;
+ }
+ else if (ndisp < _rl_screenwidth - 2) /* XXX - was -1 */
+ lmargin = 0;
+ else if (phys_c_pos < 1)
+ {
+ /* If we are moving back towards the beginning of the line and
+ the last margin is no longer correct, compute a new one. */
+ lmargin = ((cpos_buffer_position - 1) / t) * t; /* XXX */
+ if (wrap_offset && lmargin > 0 && lmargin < nleft)
+ lmargin = nleft;
+ }
+ else
+ lmargin = last_lmargin;
+
+ /* If the first character on the screen isn't the first character
+ in the display line, indicate this with a special character. */
+ if (lmargin > 0)
+ line[lmargin] = '<';
+
+ /* If SCREENWIDTH characters starting at LMARGIN do not encompass
+ the whole line, indicate that with a special character at the
+ right edge of the screen. If LMARGIN is 0, we need to take the
+ wrap offset into account. */
+ t = lmargin + M_OFFSET (lmargin, wrap_offset) + _rl_screenwidth;
+ if (t < out)
+ line[t - 1] = '>';
+
+ if (rl_display_fixed == 0 || forced_display || lmargin != last_lmargin)
+ {
+ forced_display = 0;
+ o_cpos = _rl_last_c_pos;
+ cpos_adjusted = 0;
+ update_line (&visible_line[last_lmargin],
+ &invisible_line[lmargin],
+ 0,
+ _rl_screenwidth + visible_wrap_offset,
+ _rl_screenwidth + (lmargin ? 0 : wrap_offset),
+ 0);
+
+ if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) && OLD_CPOS_IN_PROMPT())
+ _rl_last_c_pos -= prompt_invis_chars_first_line; /* XXX - was wrap_offset */
+
+ /* If the visible new line is shorter than the old, but the number
+ of invisible characters is greater, and we are at the end of
+ the new line, we need to clear to eol. */
+ t = _rl_last_c_pos - M_OFFSET (lmargin, wrap_offset);
+ if ((M_OFFSET (lmargin, wrap_offset) > visible_wrap_offset) &&
+ (_rl_last_c_pos == out) &&
+ t < visible_first_line_len)
+ {
+ nleft = _rl_screenwidth - t;
+ _rl_clear_to_eol (nleft);
+ }
+ visible_first_line_len = out - lmargin - M_OFFSET (lmargin, wrap_offset);
+ if (visible_first_line_len > _rl_screenwidth)
+ visible_first_line_len = _rl_screenwidth;
+
+ _rl_move_cursor_relative (cpos_buffer_position - lmargin, &invisible_line[lmargin]);
+ last_lmargin = lmargin;
+ }
+ }
+ fflush (rl_outstream);
+
+ /* Swap visible and non-visible lines. */
+ {
+ struct line_state *vtemp = line_state_visible;
+
+ line_state_visible = line_state_invisible;
+ line_state_invisible = vtemp;
+
+ rl_display_fixed = 0;
+ /* If we are displaying on a single line, and last_lmargin is > 0, we
+ are not displaying any invisible characters, so set visible_wrap_offset
+ to 0. */
+ if (_rl_horizontal_scroll_mode && last_lmargin)
+ visible_wrap_offset = 0;
+ else
+ visible_wrap_offset = wrap_offset;
+ }
+
+ RL_UNSETSTATE (RL_STATE_REDISPLAYING);
+ _rl_release_sigint ();
+}
+
+/* PWP: update_line() is based on finding the middle difference of each
+ line on the screen; vis:
+
+ /old first difference
+ /beginning of line | /old last same /old EOL
+ v v v v
+old: eddie> Oh, my little gruntle-buggy is to me, as lurgid as
+new: eddie> Oh, my little buggy says to me, as lurgid as
+ ^ ^ ^ ^
+ \beginning of line | \new last same \new end of line
+ \new first difference
+
+ All are character pointers for the sake of speed. Special cases for
+ no differences, as well as for end of line additions must be handled.
+
+ Could be made even smarter, but this works well enough */
+static void
+update_line (old, new, current_line, omax, nmax, inv_botlin)
+ register char *old, *new;
+ int current_line, omax, nmax, inv_botlin;
+{
+ register char *ofd, *ols, *oe, *nfd, *nls, *ne;
+ int temp, lendiff, wsatend, od, nd, twidth, o_cpos;
+ int current_invis_chars;
+ int col_lendiff, col_temp;
+#if defined (HANDLE_MULTIBYTE)
+ mbstate_t ps_new, ps_old;
+ int new_offset, old_offset;
+#endif
+
+ /* If we're at the right edge of a terminal that supports xn, we're
+ ready to wrap around, so do so. This fixes problems with knowing
+ the exact cursor position and cut-and-paste with certain terminal
+ emulators. In this calculation, TEMP is the physical screen
+ position of the cursor. */
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ temp = _rl_last_c_pos;
+ else
+ temp = _rl_last_c_pos - WRAP_OFFSET (_rl_last_v_pos, visible_wrap_offset);
+ if (temp == _rl_screenwidth && _rl_term_autowrap && !_rl_horizontal_scroll_mode
+ && _rl_last_v_pos == current_line - 1)
+ {
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ wchar_t wc;
+ mbstate_t ps;
+ int tempwidth, bytes;
+ size_t ret;
+
+ /* This fixes only double-column characters, but if the wrapped
+ character comsumes more than three columns, spaces will be
+ inserted in the string buffer. */
+ if (current_line < line_state_visible->wbsize && line_state_visible->wrapped_line[current_line] > 0)
+ _rl_clear_to_eol (line_state_visible->wrapped_line[current_line]);
+
+ memset (&ps, 0, sizeof (mbstate_t));
+ ret = mbrtowc (&wc, new, MB_CUR_MAX, &ps);
+ if (MB_INVALIDCH (ret))
+ {
+ tempwidth = 1;
+ ret = 1;
+ }
+ else if (MB_NULLWCH (ret))
+ tempwidth = 0;
+ else
+ tempwidth = wcwidth (wc);
+
+ if (tempwidth > 0)
+ {
+ int count, i;
+ bytes = ret;
+ for (count = 0; count < bytes; count++)
+ putc (new[count], rl_outstream);
+ _rl_last_c_pos = tempwidth;
+ _rl_last_v_pos++;
+ memset (&ps, 0, sizeof (mbstate_t));
+ ret = mbrtowc (&wc, old, MB_CUR_MAX, &ps);
+ if (ret != 0 && bytes != 0)
+ {
+ if (MB_INVALIDCH (ret))
+ ret = 1;
+ memmove (old+bytes, old+ret, strlen (old+ret));
+ memcpy (old, new, bytes);
+ /* Fix up indices if we copy data from one line to another */
+ omax += bytes - ret;
+ for (i = current_line+1; i < inv_botlin+1; i++)
+ vis_lbreaks[i] += bytes - ret;
+ }
+ }
+ else
+ {
+ putc (' ', rl_outstream);
+ _rl_last_c_pos = 1;
+ _rl_last_v_pos++;
+ if (old[0] && new[0])
+ old[0] = new[0];
+ }
+ }
+ else
+#endif
+ {
+ if (new[0])
+ putc (new[0], rl_outstream);
+ else
+ putc (' ', rl_outstream);
+ _rl_last_c_pos = 1;
+ _rl_last_v_pos++;
+ if (old[0] && new[0])
+ old[0] = new[0];
+ }
+ }
+
+
+ /* Find first difference. */
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ /* See if the old line is a subset of the new line, so that the
+ only change is adding characters. */
+ temp = (omax < nmax) ? omax : nmax;
+ if (memcmp (old, new, temp) == 0) /* adding at the end */
+ {
+ ofd = old + temp;
+ nfd = new + temp;
+ }
+ else
+ {
+ memset (&ps_new, 0, sizeof(mbstate_t));
+ memset (&ps_old, 0, sizeof(mbstate_t));
+
+ if (omax == nmax && STREQN (new, old, omax))
+ {
+ ofd = old + omax;
+ nfd = new + nmax;
+ }
+ else
+ {
+ new_offset = old_offset = 0;
+ for (ofd = old, nfd = new;
+ (ofd - old < omax) && *ofd &&
+ _rl_compare_chars(old, old_offset, &ps_old, new, new_offset, &ps_new); )
+ {
+ old_offset = _rl_find_next_mbchar (old, old_offset, 1, MB_FIND_ANY);
+ new_offset = _rl_find_next_mbchar (new, new_offset, 1, MB_FIND_ANY);
+ ofd = old + old_offset;
+ nfd = new + new_offset;
+ }
+ }
+ }
+ }
+ else
+#endif
+ for (ofd = old, nfd = new;
+ (ofd - old < omax) && *ofd && (*ofd == *nfd);
+ ofd++, nfd++)
+ ;
+
+ /* Move to the end of the screen line. ND and OD are used to keep track
+ of the distance between ne and new and oe and old, respectively, to
+ move a subtraction out of each loop. */
+ for (od = ofd - old, oe = ofd; od < omax && *oe; oe++, od++);
+ for (nd = nfd - new, ne = nfd; nd < nmax && *ne; ne++, nd++);
+
+ /* If no difference, continue to next line. */
+ if (ofd == oe && nfd == ne)
+ return;
+
+ wsatend = 1; /* flag for trailing whitespace */
+
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ ols = old + _rl_find_prev_mbchar (old, oe - old, MB_FIND_ANY);
+ nls = new + _rl_find_prev_mbchar (new, ne - new, MB_FIND_ANY);
+ while ((ols > ofd) && (nls > nfd))
+ {
+ memset (&ps_old, 0, sizeof (mbstate_t));
+ memset (&ps_new, 0, sizeof (mbstate_t));
+
+#if 0
+ /* On advice from jir@yamato.ibm.com */
+ _rl_adjust_point (old, ols - old, &ps_old);
+ _rl_adjust_point (new, nls - new, &ps_new);
+#endif
+
+ if (_rl_compare_chars (old, ols - old, &ps_old, new, nls - new, &ps_new) == 0)
+ break;
+
+ if (*ols == ' ')
+ wsatend = 0;
+
+ ols = old + _rl_find_prev_mbchar (old, ols - old, MB_FIND_ANY);
+ nls = new + _rl_find_prev_mbchar (new, nls - new, MB_FIND_ANY);
+ }
+ }
+ else
+ {
+#endif /* HANDLE_MULTIBYTE */
+ ols = oe - 1; /* find last same */
+ nls = ne - 1;
+ while ((ols > ofd) && (nls > nfd) && (*ols == *nls))
+ {
+ if (*ols != ' ')
+ wsatend = 0;
+ ols--;
+ nls--;
+ }
+#if defined (HANDLE_MULTIBYTE)
+ }
+#endif
+
+ if (wsatend)
+ {
+ ols = oe;
+ nls = ne;
+ }
+#if defined (HANDLE_MULTIBYTE)
+ /* This may not work for stateful encoding, but who cares? To handle
+ stateful encoding properly, we have to scan each string from the
+ beginning and compare. */
+ else if (_rl_compare_chars (ols, 0, NULL, nls, 0, NULL) == 0)
+#else
+ else if (*ols != *nls)
+#endif
+ {
+ if (*ols) /* don't step past the NUL */
+ {
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ ols = old + _rl_find_next_mbchar (old, ols - old, 1, MB_FIND_ANY);
+ else
+ ols++;
+ }
+ if (*nls)
+ {
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ nls = new + _rl_find_next_mbchar (new, nls - new, 1, MB_FIND_ANY);
+ else
+ nls++;
+ }
+ }
+
+ /* count of invisible characters in the current invisible line. */
+ current_invis_chars = W_OFFSET (current_line, wrap_offset);
+ if (_rl_last_v_pos != current_line)
+ {
+ _rl_move_vert (current_line);
+ if ((MB_CUR_MAX == 1 || rl_byte_oriented) && current_line == 0 && visible_wrap_offset)
+ _rl_last_c_pos += visible_wrap_offset;
+ }
+
+ /* If this is the first line and there are invisible characters in the
+ prompt string, and the prompt string has not changed, and the current
+ cursor position is before the last invisible character in the prompt,
+ and the index of the character to move to is past the end of the prompt
+ string, then redraw the entire prompt string. We can only do this
+ reliably if the terminal supports a `cr' capability.
+
+ This is not an efficiency hack -- there is a problem with redrawing
+ portions of the prompt string if they contain terminal escape
+ sequences (like drawing the `unbold' sequence without a corresponding
+ `bold') that manifests itself on certain terminals. */
+
+ lendiff = local_prompt_len;
+ od = ofd - old; /* index of first difference in visible line */
+ if (current_line == 0 && !_rl_horizontal_scroll_mode &&
+ _rl_term_cr && lendiff > prompt_visible_length && _rl_last_c_pos > 0 &&
+ od >= lendiff && _rl_last_c_pos < PROMPT_ENDING_INDEX)
+ {
+#if defined (__MSDOS__)
+ putc ('\r', rl_outstream);
+#else
+ tputs (_rl_term_cr, 1, _rl_output_character_function);
+#endif
+ if (modmark)
+ _rl_output_some_chars ("*", 1);
+ _rl_output_some_chars (local_prompt, lendiff);
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ /* We take wrap_offset into account here so we can pass correct
+ information to _rl_move_cursor_relative. */
+ _rl_last_c_pos = _rl_col_width (local_prompt, 0, lendiff, 1) - wrap_offset + modmark;
+ cpos_adjusted = 1;
+ }
+ else
+ _rl_last_c_pos = lendiff + modmark;
+ }
+
+ o_cpos = _rl_last_c_pos;
+
+ /* When this function returns, _rl_last_c_pos is correct, and an absolute
+ cursor postion in multibyte mode, but a buffer index when not in a
+ multibyte locale. */
+ _rl_move_cursor_relative (od, old);
+#if 1
+#if defined (HANDLE_MULTIBYTE)
+ /* We need to indicate that the cursor position is correct in the presence of
+ invisible characters in the prompt string. Let's see if setting this when
+ we make sure we're at the end of the drawn prompt string works. */
+ if (current_line == 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0 &&
+ (_rl_last_c_pos > 0 || o_cpos > 0) &&
+ _rl_last_c_pos == prompt_physical_chars)
+ cpos_adjusted = 1;
+#endif
+#endif
+
+ /* if (len (new) > len (old))
+ lendiff == difference in buffer
+ col_lendiff == difference on screen
+ When not using multibyte characters, these are equal */
+ lendiff = (nls - nfd) - (ols - ofd);
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ col_lendiff = _rl_col_width (new, nfd - new, nls - new, 1) - _rl_col_width (old, ofd - old, ols - old, 1);
+ else
+ col_lendiff = lendiff;
+
+ /* If we are changing the number of invisible characters in a line, and
+ the spot of first difference is before the end of the invisible chars,
+ lendiff needs to be adjusted. */
+ if (current_line == 0 && !_rl_horizontal_scroll_mode &&
+ current_invis_chars != visible_wrap_offset)
+ {
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ lendiff += visible_wrap_offset - current_invis_chars;
+ col_lendiff += visible_wrap_offset - current_invis_chars;
+ }
+ else
+ {
+ lendiff += visible_wrap_offset - current_invis_chars;
+ col_lendiff = lendiff;
+ }
+ }
+
+ /* Insert (diff (len (old), len (new)) ch. */
+ temp = ne - nfd;
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ col_temp = _rl_col_width (new, nfd - new, ne - new, 1);
+ else
+ col_temp = temp;
+
+ if (col_lendiff > 0) /* XXX - was lendiff */
+ {
+ /* Non-zero if we're increasing the number of lines. */
+ int gl = current_line >= _rl_vis_botlin && inv_botlin > _rl_vis_botlin;
+ /* If col_lendiff is > 0, implying that the new string takes up more
+ screen real estate than the old, but lendiff is < 0, meaning that it
+ takes fewer bytes, we need to just output the characters starting
+ from the first difference. These will overwrite what is on the
+ display, so there's no reason to do a smart update. This can really
+ only happen in a multibyte environment. */
+ if (lendiff < 0)
+ {
+ _rl_output_some_chars (nfd, temp);
+ _rl_last_c_pos += _rl_col_width (nfd, 0, temp, 1);
+ /* If nfd begins before any invisible characters in the prompt,
+ adjust _rl_last_c_pos to account for wrap_offset and set
+ cpos_adjusted to let the caller know. */
+ if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible))
+ {
+ _rl_last_c_pos -= wrap_offset;
+ cpos_adjusted = 1;
+ }
+ return;
+ }
+ /* Sometimes it is cheaper to print the characters rather than
+ use the terminal's capabilities. If we're growing the number
+ of lines, make sure we actually cause the new line to wrap
+ around on auto-wrapping terminals. */
+ else if (_rl_terminal_can_insert && ((2 * col_temp) >= col_lendiff || _rl_term_IC) && (!_rl_term_autowrap || !gl))
+ {
+ /* If lendiff > prompt_visible_length and _rl_last_c_pos == 0 and
+ _rl_horizontal_scroll_mode == 1, inserting the characters with
+ _rl_term_IC or _rl_term_ic will screw up the screen because of the
+ invisible characters. We need to just draw them. */
+ /* The same thing happens if we're trying to draw before the last
+ invisible character in the prompt string or we're increasing the
+ number of invisible characters in the line and we're not drawing
+ the entire prompt string. */
+ if (*ols && ((_rl_horizontal_scroll_mode &&
+ _rl_last_c_pos == 0 &&
+ lendiff > prompt_visible_length &&
+ current_invis_chars > 0) == 0) &&
+ (((MB_CUR_MAX > 1 && rl_byte_oriented == 0) &&
+ current_line == 0 && wrap_offset &&
+ ((nfd - new) <= prompt_last_invisible) &&
+ (col_lendiff < prompt_visible_length)) == 0) &&
+ (visible_wrap_offset >= current_invis_chars))
+ {
+ insert_some_chars (nfd, lendiff, col_lendiff);
+ _rl_last_c_pos += col_lendiff;
+ }
+#if 0 /* XXX - for now */
+ else if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) && _rl_last_c_pos == 0 && wrap_offset && (nfd-new) <= prompt_last_invisible && col_lendiff < prompt_visible_length && visible_wrap_offset >= current_invis_chars)
+ {
+ _rl_output_some_chars (nfd, lendiff);
+ _rl_last_c_pos += col_lendiff;
+ }
+#endif
+ else if ((MB_CUR_MAX == 1 || rl_byte_oriented != 0) && *ols == 0 && lendiff > 0)
+ {
+ /* At the end of a line the characters do not have to
+ be "inserted". They can just be placed on the screen. */
+ /* However, this screws up the rest of this block, which
+ assumes you've done the insert because you can. */
+ _rl_output_some_chars (nfd, lendiff);
+ _rl_last_c_pos += col_lendiff;
+ }
+ else
+ {
+ _rl_output_some_chars (nfd, temp);
+ _rl_last_c_pos += col_temp;
+ /* If nfd begins before the last invisible character in the
+ prompt, adjust _rl_last_c_pos to account for wrap_offset
+ and set cpos_adjusted to let the caller know. */
+ if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) && current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible))
+ {
+ _rl_last_c_pos -= wrap_offset;
+ cpos_adjusted = 1;
+ }
+ return;
+ }
+ /* Copy (new) chars to screen from first diff to last match. */
+ temp = nls - nfd;
+ if ((temp - lendiff) > 0)
+ {
+ _rl_output_some_chars (nfd + lendiff, temp - lendiff);
+ /* XXX -- this bears closer inspection. Fixes a redisplay bug
+ reported against bash-3.0-alpha by Andreas Schwab involving
+ multibyte characters and prompt strings with invisible
+ characters, but was previously disabled. */
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ twidth = _rl_col_width (nfd+lendiff, 0, temp-col_lendiff, 1);
+ else
+ twidth = temp - lendiff;
+ _rl_last_c_pos += twidth;
+ /* If nfd begins before the last invisible character in the
+ prompt, adjust _rl_last_c_pos to account for wrap_offset
+ and set cpos_adjusted to let the caller know. */
+ if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) && current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible))
+ {
+ _rl_last_c_pos -= wrap_offset;
+ cpos_adjusted = 1;
+ }
+ }
+ }
+ else
+ {
+ /* cannot insert chars, write to EOL */
+ _rl_output_some_chars (nfd, temp);
+ _rl_last_c_pos += col_temp;
+ /* If we're in a multibyte locale and were before the last invisible
+ char in the current line (which implies we just output some invisible
+ characters) we need to adjust _rl_last_c_pos, since it represents
+ a physical character position. */
+ if ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) &&
+ current_line == prompt_last_screen_line && wrap_offset &&
+ wrap_offset != prompt_invis_chars_first_line &&
+ ((nfd-new) < (prompt_last_invisible-(current_line*_rl_screenwidth))))
+ {
+ _rl_last_c_pos -= wrap_offset - prompt_invis_chars_first_line;
+ cpos_adjusted = 1;
+ }
+ }
+ }
+ else /* Delete characters from line. */
+ {
+ /* If possible and inexpensive to use terminal deletion, then do so. */
+ if (_rl_term_dc && (2 * col_temp) >= -col_lendiff)
+ {
+ /* If all we're doing is erasing the invisible characters in the
+ prompt string, don't bother. It screws up the assumptions
+ about what's on the screen. */
+ if (_rl_horizontal_scroll_mode && _rl_last_c_pos == 0 &&
+ -lendiff == visible_wrap_offset)
+ col_lendiff = 0;
+
+ if (col_lendiff)
+ delete_chars (-col_lendiff); /* delete (diff) characters */
+
+ /* Copy (new) chars to screen from first diff to last match */
+ temp = nls - nfd;
+ if (temp > 0)
+ {
+ /* If nfd begins at the prompt, or before the invisible
+ characters in the prompt, we need to adjust _rl_last_c_pos
+ in a multibyte locale to account for the wrap offset and
+ set cpos_adjusted accordingly. */
+ _rl_output_some_chars (nfd, temp);
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ _rl_last_c_pos += _rl_col_width (nfd, 0, temp, 1);
+ if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible))
+ {
+ _rl_last_c_pos -= wrap_offset;
+ cpos_adjusted = 1;
+ }
+ }
+ else
+ _rl_last_c_pos += temp;
+ }
+ }
+ /* Otherwise, print over the existing material. */
+ else
+ {
+ if (temp > 0)
+ {
+ /* If nfd begins at the prompt, or before the invisible
+ characters in the prompt, we need to adjust _rl_last_c_pos
+ in a multibyte locale to account for the wrap offset and
+ set cpos_adjusted accordingly. */
+ _rl_output_some_chars (nfd, temp);
+ _rl_last_c_pos += col_temp; /* XXX */
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ if (current_line == 0 && wrap_offset && ((nfd - new) <= prompt_last_invisible))
+ {
+ _rl_last_c_pos -= wrap_offset;
+ cpos_adjusted = 1;
+ }
+ }
+ }
+ lendiff = (oe - old) - (ne - new);
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ col_lendiff = _rl_col_width (old, 0, oe - old, 1) - _rl_col_width (new, 0, ne - new, 1);
+ else
+ col_lendiff = lendiff;
+
+#if 0
+ if (col_lendiff)
+#else
+ /* If we've already printed over the entire width of the screen,
+ including the old material, then col_lendiff doesn't matter and
+ space_to_eol will insert too many spaces. XXX - maybe we should
+ adjust col_lendiff based on the difference between _rl_last_c_pos
+ and _rl_screenwidth */
+ if (col_lendiff && ((MB_CUR_MAX == 1 || rl_byte_oriented) || (_rl_last_c_pos < _rl_screenwidth)))
+#endif
+ {
+ if (_rl_term_autowrap && current_line < inv_botlin)
+ space_to_eol (col_lendiff);
+ else
+ _rl_clear_to_eol (col_lendiff);
+ }
+ }
+ }
+}
+
+/* Tell the update routines that we have moved onto a new (empty) line. */
+int
+rl_on_new_line ()
+{
+ if (visible_line)
+ visible_line[0] = '\0';
+
+ _rl_last_c_pos = _rl_last_v_pos = 0;
+ _rl_vis_botlin = last_lmargin = 0;
+ if (vis_lbreaks)
+ vis_lbreaks[0] = vis_lbreaks[1] = 0;
+ visible_wrap_offset = 0;
+ return 0;
+}
+
+/* Tell the update routines that we have moved onto a new line with the
+ prompt already displayed. Code originally from the version of readline
+ distributed with CLISP. rl_expand_prompt must have already been called
+ (explicitly or implicitly). This still doesn't work exactly right. */
+int
+rl_on_new_line_with_prompt ()
+{
+ int prompt_size, i, l, real_screenwidth, newlines;
+ char *prompt_last_line, *lprompt;
+
+ /* Initialize visible_line and invisible_line to ensure that they can hold
+ the already-displayed prompt. */
+ prompt_size = strlen (rl_prompt) + 1;
+ init_line_structures (prompt_size);
+
+ /* Make sure the line structures hold the already-displayed prompt for
+ redisplay. */
+ lprompt = local_prompt ? local_prompt : rl_prompt;
+ strcpy (visible_line, lprompt);
+ strcpy (invisible_line, lprompt);
+
+ /* If the prompt contains newlines, take the last tail. */
+ prompt_last_line = strrchr (rl_prompt, '\n');
+ if (!prompt_last_line)
+ prompt_last_line = rl_prompt;
+
+ l = strlen (prompt_last_line);
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ _rl_last_c_pos = _rl_col_width (prompt_last_line, 0, l, 1); /* XXX */
+ else
+ _rl_last_c_pos = l;
+
+ /* Dissect prompt_last_line into screen lines. Note that here we have
+ to use the real screenwidth. Readline's notion of screenwidth might be
+ one less, see terminal.c. */
+ real_screenwidth = _rl_screenwidth + (_rl_term_autowrap ? 0 : 1);
+ _rl_last_v_pos = l / real_screenwidth;
+ /* If the prompt length is a multiple of real_screenwidth, we don't know
+ whether the cursor is at the end of the last line, or already at the
+ beginning of the next line. Output a newline just to be safe. */
+ if (l > 0 && (l % real_screenwidth) == 0)
+ _rl_output_some_chars ("\n", 1);
+ last_lmargin = 0;
+
+ newlines = 0; i = 0;
+ while (i <= l)
+ {
+ _rl_vis_botlin = newlines;
+ vis_lbreaks[newlines++] = i;
+ i += real_screenwidth;
+ }
+ vis_lbreaks[newlines] = l;
+ visible_wrap_offset = 0;
+
+ rl_display_prompt = rl_prompt; /* XXX - make sure it's set */
+
+ return 0;
+}
+
+/* Actually update the display, period. */
+int
+rl_forced_update_display ()
+{
+ register char *temp;
+
+ if (visible_line)
+ {
+ temp = visible_line;
+ while (*temp)
+ *temp++ = '\0';
+ }
+ rl_on_new_line ();
+ forced_display++;
+ (*rl_redisplay_function) ();
+ return 0;
+}
+
+/* Move the cursor from _rl_last_c_pos to NEW, which are buffer indices.
+ (Well, when we don't have multibyte characters, _rl_last_c_pos is a
+ buffer index.)
+ DATA is the contents of the screen line of interest; i.e., where
+ the movement is being done. */
+void
+_rl_move_cursor_relative (new, data)
+ int new;
+ const char *data;
+{
+ register int i;
+ int woff; /* number of invisible chars on current line */
+ int cpos, dpos; /* current and desired cursor positions */
+ int adjust;
+
+ woff = WRAP_OFFSET (_rl_last_v_pos, wrap_offset);
+ cpos = _rl_last_c_pos;
+
+ if (cpos == 0 && cpos == new)
+ return;
+
+#if defined (HANDLE_MULTIBYTE)
+ /* If we have multibyte characters, NEW is indexed by the buffer point in
+ a multibyte string, but _rl_last_c_pos is the display position. In
+ this case, NEW's display position is not obvious and must be
+ calculated. We need to account for invisible characters in this line,
+ as long as we are past them and they are counted by _rl_col_width. */
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ adjust = 1;
+ /* Try to short-circuit common cases and eliminate a bunch of multibyte
+ character function calls. */
+ /* 1. prompt string */
+ if (new == local_prompt_len && memcmp (data, local_prompt, new) == 0)
+ {
+ dpos = prompt_physical_chars;
+ cpos_adjusted = 1;
+ adjust = 0;
+ }
+ /* 2. prompt_string + line contents */
+ else if (new > local_prompt_len && local_prompt && memcmp (data, local_prompt, local_prompt_len) == 0)
+ {
+ dpos = prompt_physical_chars + _rl_col_width (data, local_prompt_len, new, 1);
+ cpos_adjusted = 1;
+ adjust = 0;
+ }
+ else
+ dpos = _rl_col_width (data, 0, new, 1);
+
+ /* Use NEW when comparing against the last invisible character in the
+ prompt string, since they're both buffer indices and DPOS is a
+ desired display position. */
+ if (adjust && ((new > prompt_last_invisible) || /* XXX - don't use woff here */
+ (prompt_physical_chars >= _rl_screenwidth &&
+ _rl_last_v_pos == prompt_last_screen_line &&
+ wrap_offset >= woff && dpos >= woff &&
+ new > (prompt_last_invisible-(_rl_screenwidth*_rl_last_v_pos)-wrap_offset))))
+ /* XXX last comparison might need to be >= */
+ {
+ dpos -= woff;
+ /* Since this will be assigned to _rl_last_c_pos at the end (more
+ precisely, _rl_last_c_pos == dpos when this function returns),
+ let the caller know. */
+ cpos_adjusted = 1;
+ }
+ }
+ else
+#endif
+ dpos = new;
+
+ /* If we don't have to do anything, then return. */
+ if (cpos == dpos)
+ return;
+
+ /* It may be faster to output a CR, and then move forwards instead
+ of moving backwards. */
+ /* i == current physical cursor position. */
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ i = _rl_last_c_pos;
+ else
+#endif
+ i = _rl_last_c_pos - woff;
+ if (dpos == 0 || CR_FASTER (dpos, _rl_last_c_pos) ||
+ (_rl_term_autowrap && i == _rl_screenwidth))
+ {
+#if defined (__MSDOS__)
+ putc ('\r', rl_outstream);
+#else
+ tputs (_rl_term_cr, 1, _rl_output_character_function);
+#endif /* !__MSDOS__ */
+ cpos = _rl_last_c_pos = 0;
+ }
+
+ if (cpos < dpos)
+ {
+ /* Move the cursor forward. We do it by printing the command
+ to move the cursor forward if there is one, else print that
+ portion of the output buffer again. Which is cheaper? */
+
+ /* The above comment is left here for posterity. It is faster
+ to print one character (non-control) than to print a control
+ sequence telling the terminal to move forward one character.
+ That kind of control is for people who don't know what the
+ data is underneath the cursor. */
+
+ /* However, we need a handle on where the current display position is
+ in the buffer for the immediately preceding comment to be true.
+ In multibyte locales, we don't currently have that info available.
+ Without it, we don't know where the data we have to display begins
+ in the buffer and we have to go back to the beginning of the screen
+ line. In this case, we can use the terminal sequence to move forward
+ if it's available. */
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ if (_rl_term_forward_char)
+ {
+ for (i = cpos; i < dpos; i++)
+ tputs (_rl_term_forward_char, 1, _rl_output_character_function);
+ }
+ else
+ {
+ tputs (_rl_term_cr, 1, _rl_output_character_function);
+ for (i = 0; i < new; i++)
+ putc (data[i], rl_outstream);
+ }
+ }
+ else
+ for (i = cpos; i < new; i++)
+ putc (data[i], rl_outstream);
+ }
+
+#if defined (HANDLE_MULTIBYTE)
+ /* NEW points to the buffer point, but _rl_last_c_pos is the display point.
+ The byte length of the string is probably bigger than the column width
+ of the string, which means that if NEW == _rl_last_c_pos, then NEW's
+ display point is less than _rl_last_c_pos. */
+#endif
+ else if (cpos > dpos)
+ _rl_backspace (cpos - dpos);
+
+ _rl_last_c_pos = dpos;
+}
+
+/* PWP: move the cursor up or down. */
+void
+_rl_move_vert (to)
+ int to;
+{
+ register int delta, i;
+
+ if (_rl_last_v_pos == to || to > _rl_screenheight)
+ return;
+
+ if ((delta = to - _rl_last_v_pos) > 0)
+ {
+ for (i = 0; i < delta; i++)
+ putc ('\n', rl_outstream);
+#if defined (__MSDOS__)
+ putc ('\r', rl_outstream);
+#else
+ tputs (_rl_term_cr, 1, _rl_output_character_function);
+#endif
+ _rl_last_c_pos = 0;
+ }
+ else
+ { /* delta < 0 */
+ if (_rl_term_up && *_rl_term_up)
+ for (i = 0; i < -delta; i++)
+ tputs (_rl_term_up, 1, _rl_output_character_function);
+ }
+
+ _rl_last_v_pos = to; /* Now TO is here */
+}
+
+/* Physically print C on rl_outstream. This is for functions which know
+ how to optimize the display. Return the number of characters output. */
+int
+rl_show_char (c)
+ int c;
+{
+ int n = 1;
+ if (META_CHAR (c) && (_rl_output_meta_chars == 0))
+ {
+ fprintf (rl_outstream, "M-");
+ n += 2;
+ c = UNMETA (c);
+ }
+
+#if defined (DISPLAY_TABS)
+ if ((CTRL_CHAR (c) && c != '\t') || c == RUBOUT)
+#else
+ if (CTRL_CHAR (c) || c == RUBOUT)
+#endif /* !DISPLAY_TABS */
+ {
+ fprintf (rl_outstream, "C-");
+ n += 2;
+ c = CTRL_CHAR (c) ? UNCTRL (c) : '?';
+ }
+
+ putc (c, rl_outstream);
+ fflush (rl_outstream);
+ return n;
+}
+
+int
+rl_character_len (c, pos)
+ register int c, pos;
+{
+ unsigned char uc;
+
+ uc = (unsigned char)c;
+
+ if (META_CHAR (uc))
+ return ((_rl_output_meta_chars == 0) ? 4 : 1);
+
+ if (uc == '\t')
+ {
+#if defined (DISPLAY_TABS)
+ return (((pos | 7) + 1) - pos);
+#else
+ return (2);
+#endif /* !DISPLAY_TABS */
+ }
+
+ if (CTRL_CHAR (c) || c == RUBOUT)
+ return (2);
+
+ return ((ISPRINT (uc)) ? 1 : 2);
+}
+/* How to print things in the "echo-area". The prompt is treated as a
+ mini-modeline. */
+static int msg_saved_prompt = 0;
+
+#if defined (USE_VARARGS)
+int
+#if defined (PREFER_STDARG)
+rl_message (const char *format, ...)
+#else
+rl_message (va_alist)
+ va_dcl
+#endif
+{
+ va_list args;
+#if defined (PREFER_VARARGS)
+ char *format;
+#endif
+
+#if defined (PREFER_STDARG)
+ va_start (args, format);
+#else
+ va_start (args);
+ format = va_arg (args, char *);
+#endif
+
+#if defined (HAVE_VSNPRINTF)
+ vsnprintf (msg_buf, sizeof (msg_buf) - 1, format, args);
+#else
+ vsprintf (msg_buf, format, args);
+ msg_buf[sizeof(msg_buf) - 1] = '\0'; /* overflow? */
+#endif
+ va_end (args);
+
+ if (saved_local_prompt == 0)
+ {
+ rl_save_prompt ();
+ msg_saved_prompt = 1;
+ }
+ rl_display_prompt = msg_buf;
+ local_prompt = expand_prompt (msg_buf, &prompt_visible_length,
+ &prompt_last_invisible,
+ &prompt_invis_chars_first_line,
+ &prompt_physical_chars);
+ local_prompt_prefix = (char *)NULL;
+ local_prompt_len = local_prompt ? strlen (local_prompt) : 0;
+ (*rl_redisplay_function) ();
+
+ return 0;
+}
+#else /* !USE_VARARGS */
+int
+rl_message (format, arg1, arg2)
+ char *format;
+{
+ sprintf (msg_buf, format, arg1, arg2);
+ msg_buf[sizeof(msg_buf) - 1] = '\0'; /* overflow? */
+
+ rl_display_prompt = msg_buf;
+ if (saved_local_prompt == 0)
+ {
+ rl_save_prompt ();
+ msg_saved_prompt = 1;
+ }
+ local_prompt = expand_prompt (msg_buf, &prompt_visible_length,
+ &prompt_last_invisible,
+ &prompt_invis_chars_first_line,
+ &prompt_physical_chars);
+ local_prompt_prefix = (char *)NULL;
+ local_prompt_len = local_prompt ? strlen (local_prompt) : 0;
+ (*rl_redisplay_function) ();
+
+ return 0;
+}
+#endif /* !USE_VARARGS */
+
+/* How to clear things from the "echo-area". */
+int
+rl_clear_message ()
+{
+ rl_display_prompt = rl_prompt;
+ if (msg_saved_prompt)
+ {
+ rl_restore_prompt ();
+ msg_saved_prompt = 0;
+ }
+ (*rl_redisplay_function) ();
+ return 0;
+}
+
+int
+rl_reset_line_state ()
+{
+ rl_on_new_line ();
+
+ rl_display_prompt = rl_prompt ? rl_prompt : "";
+ forced_display = 1;
+ return 0;
+}
+
+void
+rl_save_prompt ()
+{
+ saved_local_prompt = local_prompt;
+ saved_local_prefix = local_prompt_prefix;
+ saved_prefix_length = prompt_prefix_length;
+ saved_local_length = local_prompt_len;
+ saved_last_invisible = prompt_last_invisible;
+ saved_visible_length = prompt_visible_length;
+ saved_invis_chars_first_line = prompt_invis_chars_first_line;
+ saved_physical_chars = prompt_physical_chars;
+
+ local_prompt = local_prompt_prefix = (char *)0;
+ local_prompt_len = 0;
+ prompt_last_invisible = prompt_visible_length = prompt_prefix_length = 0;
+ prompt_invis_chars_first_line = prompt_physical_chars = 0;
+}
+
+void
+rl_restore_prompt ()
+{
+ FREE (local_prompt);
+ FREE (local_prompt_prefix);
+
+ local_prompt = saved_local_prompt;
+ local_prompt_prefix = saved_local_prefix;
+ local_prompt_len = saved_local_length;
+ prompt_prefix_length = saved_prefix_length;
+ prompt_last_invisible = saved_last_invisible;
+ prompt_visible_length = saved_visible_length;
+ prompt_invis_chars_first_line = saved_invis_chars_first_line;
+ prompt_physical_chars = saved_physical_chars;
+
+ /* can test saved_local_prompt to see if prompt info has been saved. */
+ saved_local_prompt = saved_local_prefix = (char *)0;
+ saved_local_length = 0;
+ saved_last_invisible = saved_visible_length = saved_prefix_length = 0;
+ saved_invis_chars_first_line = saved_physical_chars = 0;
+}
+
+char *
+_rl_make_prompt_for_search (pchar)
+ int pchar;
+{
+ int len;
+ char *pmt, *p;
+
+ rl_save_prompt ();
+
+ /* We've saved the prompt, and can do anything with the various prompt
+ strings we need before they're restored. We want the unexpanded
+ portion of the prompt string after any final newline. */
+ p = rl_prompt ? strrchr (rl_prompt, '\n') : 0;
+ if (p == 0)
+ {
+ len = (rl_prompt && *rl_prompt) ? strlen (rl_prompt) : 0;
+ pmt = (char *)xmalloc (len + 2);
+ if (len)
+ strcpy (pmt, rl_prompt);
+ pmt[len] = pchar;
+ pmt[len+1] = '\0';
+ }
+ else
+ {
+ p++;
+ len = strlen (p);
+ pmt = (char *)xmalloc (len + 2);
+ if (len)
+ strcpy (pmt, p);
+ pmt[len] = pchar;
+ pmt[len+1] = '\0';
+ }
+
+ /* will be overwritten by expand_prompt, called from rl_message */
+ prompt_physical_chars = saved_physical_chars + 1;
+ return pmt;
+}
+
+/* Quick redisplay hack when erasing characters at the end of the line. */
+void
+_rl_erase_at_end_of_line (l)
+ int l;
+{
+ register int i;
+
+ _rl_backspace (l);
+ for (i = 0; i < l; i++)
+ putc (' ', rl_outstream);
+ _rl_backspace (l);
+ for (i = 0; i < l; i++)
+ visible_line[--_rl_last_c_pos] = '\0';
+ rl_display_fixed++;
+}
+
+/* Clear to the end of the line. COUNT is the minimum
+ number of character spaces to clear, */
+void
+_rl_clear_to_eol (count)
+ int count;
+{
+ if (_rl_term_clreol)
+ tputs (_rl_term_clreol, 1, _rl_output_character_function);
+ else if (count)
+ space_to_eol (count);
+}
+
+/* Clear to the end of the line using spaces. COUNT is the minimum
+ number of character spaces to clear, */
+static void
+space_to_eol (count)
+ int count;
+{
+ register int i;
+
+ for (i = 0; i < count; i++)
+ putc (' ', rl_outstream);
+
+ _rl_last_c_pos += count;
+}
+
+void
+_rl_clear_screen ()
+{
+ if (_rl_term_clrpag)
+ tputs (_rl_term_clrpag, 1, _rl_output_character_function);
+ else
+ rl_crlf ();
+}
+
+/* Insert COUNT characters from STRING to the output stream at column COL. */
+static void
+insert_some_chars (string, count, col)
+ char *string;
+ int count, col;
+{
+#if defined (__MSDOS__) || defined (__MINGW32__)
+ _rl_output_some_chars (string, count);
+#else
+ /* DEBUGGING */
+ if (MB_CUR_MAX == 1 || rl_byte_oriented)
+ if (count != col)
+ _rl_ttymsg ("debug: insert_some_chars: count (%d) != col (%d)", count, col);
+
+ /* If IC is defined, then we do not have to "enter" insert mode. */
+ if (_rl_term_IC)
+ {
+ char *buffer;
+
+ buffer = tgoto (_rl_term_IC, 0, col);
+ tputs (buffer, 1, _rl_output_character_function);
+ _rl_output_some_chars (string, count);
+ }
+ else
+ {
+ register int i;
+
+ /* If we have to turn on insert-mode, then do so. */
+ if (_rl_term_im && *_rl_term_im)
+ tputs (_rl_term_im, 1, _rl_output_character_function);
+
+ /* If there is a special command for inserting characters, then
+ use that first to open up the space. */
+ if (_rl_term_ic && *_rl_term_ic)
+ {
+ for (i = col; i--; )
+ tputs (_rl_term_ic, 1, _rl_output_character_function);
+ }
+
+ /* Print the text. */
+ _rl_output_some_chars (string, count);
+
+ /* If there is a string to turn off insert mode, we had best use
+ it now. */
+ if (_rl_term_ei && *_rl_term_ei)
+ tputs (_rl_term_ei, 1, _rl_output_character_function);
+ }
+#endif /* __MSDOS__ || __MINGW32__ */
+}
+
+/* Delete COUNT characters from the display line. */
+static void
+delete_chars (count)
+ int count;
+{
+ if (count > _rl_screenwidth) /* XXX */
+ return;
+
+#if !defined (__MSDOS__) && !defined (__MINGW32__)
+ if (_rl_term_DC && *_rl_term_DC)
+ {
+ char *buffer;
+ buffer = tgoto (_rl_term_DC, count, count);
+ tputs (buffer, count, _rl_output_character_function);
+ }
+ else
+ {
+ if (_rl_term_dc && *_rl_term_dc)
+ while (count--)
+ tputs (_rl_term_dc, 1, _rl_output_character_function);
+ }
+#endif /* !__MSDOS__ && !__MINGW32__ */
+}
+
+void
+_rl_update_final ()
+{
+ int full_lines;
+
+ full_lines = 0;
+ /* If the cursor is the only thing on an otherwise-blank last line,
+ compensate so we don't print an extra CRLF. */
+ if (_rl_vis_botlin && _rl_last_c_pos == 0 &&
+ visible_line[vis_lbreaks[_rl_vis_botlin]] == 0)
+ {
+ _rl_vis_botlin--;
+ full_lines = 1;
+ }
+ _rl_move_vert (_rl_vis_botlin);
+ /* If we've wrapped lines, remove the final xterm line-wrap flag. */
+ if (full_lines && _rl_term_autowrap && (VIS_LLEN(_rl_vis_botlin) == _rl_screenwidth))
+ {
+ char *last_line;
+
+ last_line = &visible_line[vis_lbreaks[_rl_vis_botlin]];
+ cpos_buffer_position = -1; /* don't know where we are in buffer */
+ _rl_move_cursor_relative (_rl_screenwidth - 1, last_line); /* XXX */
+ _rl_clear_to_eol (0);
+ putc (last_line[_rl_screenwidth - 1], rl_outstream);
+ }
+ _rl_vis_botlin = 0;
+ rl_crlf ();
+ fflush (rl_outstream);
+ rl_display_fixed++;
+}
+
+/* Move to the start of the current line. */
+static void
+cr ()
+{
+ if (_rl_term_cr)
+ {
+#if defined (__MSDOS__)
+ putc ('\r', rl_outstream);
+#else
+ tputs (_rl_term_cr, 1, _rl_output_character_function);
+#endif
+ _rl_last_c_pos = 0;
+ }
+}
+
+/* Redraw the last line of a multi-line prompt that may possibly contain
+ terminal escape sequences. Called with the cursor at column 0 of the
+ line to draw the prompt on. */
+static void
+redraw_prompt (t)
+ char *t;
+{
+ char *oldp;
+
+ oldp = rl_display_prompt;
+ rl_save_prompt ();
+
+ rl_display_prompt = t;
+ local_prompt = expand_prompt (t, &prompt_visible_length,
+ &prompt_last_invisible,
+ &prompt_invis_chars_first_line,
+ &prompt_physical_chars);
+ local_prompt_prefix = (char *)NULL;
+ local_prompt_len = local_prompt ? strlen (local_prompt) : 0;
+
+ rl_forced_update_display ();
+
+ rl_display_prompt = oldp;
+ rl_restore_prompt();
+}
+
+/* Redisplay the current line after a SIGWINCH is received. */
+void
+_rl_redisplay_after_sigwinch ()
+{
+ char *t;
+
+ /* Clear the last line (assuming that the screen size change will result in
+ either more or fewer characters on that line only) and put the cursor at
+ column 0. Make sure the right thing happens if we have wrapped to a new
+ screen line. */
+ if (_rl_term_cr)
+ {
+ _rl_move_vert (_rl_vis_botlin);
+
+#if defined (__MSDOS__)
+ putc ('\r', rl_outstream);
+#else
+ tputs (_rl_term_cr, 1, _rl_output_character_function);
+#endif
+ _rl_last_c_pos = 0;
+#if defined (__MSDOS__)
+ space_to_eol (_rl_screenwidth);
+ putc ('\r', rl_outstream);
+#else
+ if (_rl_term_clreol)
+ tputs (_rl_term_clreol, 1, _rl_output_character_function);
+ else
+ {
+ space_to_eol (_rl_screenwidth);
+ tputs (_rl_term_cr, 1, _rl_output_character_function);
+ }
+#endif
+ if (_rl_last_v_pos > 0)
+ _rl_move_vert (0);
+ }
+ else
+ rl_crlf ();
+
+ /* Redraw only the last line of a multi-line prompt. */
+ t = strrchr (rl_display_prompt, '\n');
+ if (t)
+ redraw_prompt (++t);
+ else
+ rl_forced_update_display ();
+}
+
+void
+_rl_clean_up_for_exit ()
+{
+ if (_rl_echoing_p)
+ {
+ _rl_move_vert (_rl_vis_botlin);
+ _rl_vis_botlin = 0;
+ fflush (rl_outstream);
+ rl_restart_output (1, 0);
+ }
+}
+
+void
+_rl_erase_entire_line ()
+{
+ cr ();
+ _rl_clear_to_eol (0);
+ cr ();
+ fflush (rl_outstream);
+}
+
+/* return the `current display line' of the cursor -- the number of lines to
+ move up to get to the first screen line of the current readline line. */
+int
+_rl_current_display_line ()
+{
+ int ret, nleft;
+
+ /* Find out whether or not there might be invisible characters in the
+ editing buffer. */
+ if (rl_display_prompt == rl_prompt)
+ nleft = _rl_last_c_pos - _rl_screenwidth - rl_visible_prompt_length;
+ else
+ nleft = _rl_last_c_pos - _rl_screenwidth;
+
+ if (nleft > 0)
+ ret = 1 + nleft / _rl_screenwidth;
+ else
+ ret = 0;
+
+ return ret;
+}
+
+#if defined (HANDLE_MULTIBYTE)
+/* Calculate the number of screen columns occupied by STR from START to END.
+ In the case of multibyte characters with stateful encoding, we have to
+ scan from the beginning of the string to take the state into account. */
+static int
+_rl_col_width (str, start, end, flags)
+ const char *str;
+ int start, end, flags;
+{
+ wchar_t wc;
+ mbstate_t ps;
+ int tmp, point, width, max;
+
+ if (end <= start)
+ return 0;
+ if (MB_CUR_MAX == 1 || rl_byte_oriented)
+{
+_rl_ttymsg ("_rl_col_width: called with MB_CUR_MAX == 1");
+ return (end - start);
+}
+
+ memset (&ps, 0, sizeof (mbstate_t));
+
+ point = 0;
+ max = end;
+
+ /* Try to short-circuit common cases. The adjustment to remove wrap_offset
+ is done by the caller. */
+ /* 1. prompt string */
+ if (flags && start == 0 && end == local_prompt_len && memcmp (str, local_prompt, local_prompt_len) == 0)
+ return (prompt_physical_chars + wrap_offset);
+ /* 2. prompt string + line contents */
+ else if (flags && start == 0 && local_prompt_len > 0 && end > local_prompt_len && local_prompt && memcmp (str, local_prompt, local_prompt_len) == 0)
+ {
+ tmp = prompt_physical_chars + wrap_offset;
+ /* XXX - try to call ourselves recursively with non-prompt portion */
+ tmp += _rl_col_width (str, local_prompt_len, end, flags);
+ return (tmp);
+ }
+
+ while (point < start)
+ {
+ tmp = mbrlen (str + point, max, &ps);
+ if (MB_INVALIDCH ((size_t)tmp))
+ {
+ /* In this case, the bytes are invalid or too short to compose a
+ multibyte character, so we assume that the first byte represents
+ a single character. */
+ point++;
+ max--;
+
+ /* Clear the state of the byte sequence, because in this case the
+ effect of mbstate is undefined. */
+ memset (&ps, 0, sizeof (mbstate_t));
+ }
+ else if (MB_NULLWCH (tmp))
+ break; /* Found '\0' */
+ else
+ {
+ point += tmp;
+ max -= tmp;
+ }
+ }
+
+ /* If START is not a byte that starts a character, then POINT will be
+ greater than START. In this case, assume that (POINT - START) gives
+ a byte count that is the number of columns of difference. */
+ width = point - start;
+
+ while (point < end)
+ {
+ tmp = mbrtowc (&wc, str + point, max, &ps);
+ if (MB_INVALIDCH ((size_t)tmp))
+ {
+ /* In this case, the bytes are invalid or too short to compose a
+ multibyte character, so we assume that the first byte represents
+ a single character. */
+ point++;
+ max--;
+
+ /* and assume that the byte occupies a single column. */
+ width++;
+
+ /* Clear the state of the byte sequence, because in this case the
+ effect of mbstate is undefined. */
+ memset (&ps, 0, sizeof (mbstate_t));
+ }
+ else if (MB_NULLWCH (tmp))
+ break; /* Found '\0' */
+ else
+ {
+ point += tmp;
+ max -= tmp;
+ tmp = wcwidth(wc);
+ width += (tmp >= 0) ? tmp : 1;
+ }
+ }
+
+ width += point - end;
+
+ return width;
+}
+#endif /* HANDLE_MULTIBYTE */
diff --git a/lib/readline/doc/._fdl.texi b/lib/readline/doc/._fdl.texi
new file mode 100644
index 0000000..3dd8e43
--- /dev/null
+++ b/lib/readline/doc/._fdl.texi
Binary files differ
diff --git a/lib/readline/doc/Makefile b/lib/readline/doc/Makefile
new file mode 100644
index 0000000..af5ee3e
--- /dev/null
+++ b/lib/readline/doc/Makefile
@@ -0,0 +1,145 @@
+# Derived by hand from the generated readline-src/doc/Makefile
+# This makefile for Readline library documentation is in -*- text -*- mode.
+# Emacs likes it that way.
+
+# Copyright (C) 1996-2002 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+
+topdir = .
+srcdir = .
+VPATH = .
+
+prefix = /usr/local
+infodir = ${prefix}/info
+
+mandir = ${prefix}/man
+manpfx = man
+
+man1ext = 1
+man1dir = $(mandir)/$(manpfx)$(man1ext)
+man3ext = 3
+man3dir = $(mandir)/$(manpfx)$(man3ext)
+
+SHELL = /bin/sh
+RM = rm -f
+
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+
+BUILD_DIR = .
+TEXINPUTDIR = $(srcdir)
+
+MAKEINFO = LANGUAGE= makeinfo
+TEXI2DVI = $(srcdir)/texi2dvi
+TEXI2HTML = $(srcdir)/texi2html
+QUIETPS = #set this to -q to shut up dvips
+PSDPI = 300 # I don't have any 600-dpi printers
+DVIPS = dvips -D ${PSDPI} $(QUIETPS) -o $@ # tricky
+
+RLSRC = $(srcdir)/rlman.texi $(srcdir)/rluser.texi \
+ $(srcdir)/rltech.texi $(srcdir)/version.texi \
+ $(srcdir)/rluserman.texi
+HISTSRC = $(srcdir)/history.texi $(srcdir)/hsuser.texi \
+ $(srcdir)/hstech.texi $(srcdir)/version.texi
+
+# This should be a program that converts troff to an ascii-readable format
+NROFF = groff -Tascii
+
+# This should be a program that converts troff to postscript
+GROFF = groff
+
+DVIOBJ = readline.dvi history.dvi rluserman.dvi
+INFOOBJ = readline.info history.info rluserman.info
+PSOBJ = readline.ps history.ps rluserman.ps
+HTMLOBJ = readline.html history.html rluserman.html
+
+INTERMEDIATE_OBJ = rlman.dvi
+
+CREATED_DOCS = $(DVIOBJ) $(INFOOBJ) $(PSOBJ) $(HTMLOBJ)
+
+.SUFFIXES: .ps .txt .dvi
+
+all: info dvi html ps
+nodvi: info html
+
+readline.dvi: $(RLSRC)
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rlman.texi
+ mv rlman.dvi readline.dvi
+
+readline.info: $(RLSRC)
+ $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rlman.texi
+
+rluserman.dvi: $(RLSRC)
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/rluserman.texi
+
+rluserman.info: $(RLSRC)
+ $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/rluserman.texi
+
+history.dvi: ${HISTSRC}
+ TEXINPUTS=.:$(TEXINPUTDIR):$$TEXINPUTS $(TEXI2DVI) $(srcdir)/history.texi
+
+history.info: ${HISTSRC}
+ $(MAKEINFO) --no-split -I $(TEXINPUTDIR) -o $@ $(srcdir)/history.texi
+
+readline.ps: readline.dvi
+ $(RM) $@
+ $(DVIPS) readline.dvi
+
+rluserman.ps: rluserman.dvi
+ $(RM) $@
+ $(DVIPS) rluserman.dvi
+
+history.ps: history.dvi
+ $(RM) $@
+ $(DVIPS) history.dvi
+
+readline.html: ${RLSRC}
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rlman.texi
+ sed -e 's:rlman.html:readline.html:' rlman.html > readline.html
+ $(RM) rlman.html
+
+rluserman.html: ${RLSRC}
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/rluserman.texi
+
+history.html: ${HISTSRC}
+ $(TEXI2HTML) -menu -monolithic -I $(TEXINPUTDIR) $(srcdir)/history.texi
+
+info: $(INFOOBJ)
+dvi: $(DVIOBJ)
+ps: $(PSOBJ)
+html: $(HTMLOBJ)
+
+clean:
+ $(RM) *.aux *.cp *.fn *.ky *.log *.pg *.toc *.tp *.vr *.cps *.pgs \
+ *.fns *.kys *.tps *.vrs *.o core
+
+distclean: clean
+ $(RM) $(CREATED_DOCS)
+ $(RM) $(INTERMEDIATE_OBJ)
+ $(RM) Makefile
+
+mostlyclean: clean
+
+maintainer-clean: clean
+ $(RM) $(CREATED_DOCS)
+ $(RM) $(INTERMEDIATE_OBJ)
+ $(RM) Makefile
+
+install:
+ @echo "This documentation should not be installed."
+
+uninstall:
diff --git a/lib/readline/doc/fdl.texi b/lib/readline/doc/fdl.texi
new file mode 100644
index 0000000..8805f1a
--- /dev/null
+++ b/lib/readline/doc/fdl.texi
@@ -0,0 +1,506 @@
+@c The GNU Free Documentation License.
+@center Version 1.3, 3 November 2008
+
+@c This file is intended to be included within another document,
+@c hence no sectioning command or @node.
+
+@display
+Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+@uref{http://fsf.org/}
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@end display
+
+@enumerate 0
+@item
+PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document @dfn{free} in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of ``copyleft'', which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+@item
+APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The ``Document'', below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as ``you''. You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A ``Modified Version'' of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A ``Secondary Section'' is a named appendix or a front-matter section
+of the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject. (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The ``Invariant Sections'' are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
+
+The ``Cover Texts'' are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A ``Transparent'' copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not ``Transparent'' is called ``Opaque''.
+
+Examples of suitable formats for Transparent copies include plain
+@sc{ascii} without markup, Texinfo input format, La@TeX{} input
+format, @acronym{SGML} or @acronym{XML} using a publicly available
+@acronym{DTD}, and standard-conforming simple @acronym{HTML},
+PostScript or @acronym{PDF} designed for human modification. Examples
+of transparent image formats include @acronym{PNG}, @acronym{XCF} and
+@acronym{JPG}. Opaque formats include proprietary formats that can be
+read and edited only by proprietary word processors, @acronym{SGML} or
+@acronym{XML} for which the @acronym{DTD} and/or processing tools are
+not generally available, and the machine-generated @acronym{HTML},
+PostScript or @acronym{PDF} produced by some word processors for
+output purposes only.
+
+The ``Title Page'' means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, ``Title Page'' means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+The ``publisher'' means any person or entity that distributes copies
+of the Document to the public.
+
+A section ``Entitled XYZ'' means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as ``Acknowledgements'',
+``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
+of such a section when you modify the Document means that it remains a
+section ``Entitled XYZ'' according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+@item
+VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+@item
+COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+@item
+MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+@enumerate A
+@item
+Use in the Title Page (and on the covers, if any) a title distinct
+from that of the Document, and from those of previous versions
+(which should, if there were any, be listed in the History section
+of the Document). You may use the same title as a previous version
+if the original publisher of that version gives permission.
+
+@item
+List on the Title Page, as authors, one or more persons or entities
+responsible for authorship of the modifications in the Modified
+Version, together with at least five of the principal authors of the
+Document (all of its principal authors, if it has fewer than five),
+unless they release you from this requirement.
+
+@item
+State on the Title page the name of the publisher of the
+Modified Version, as the publisher.
+
+@item
+Preserve all the copyright notices of the Document.
+
+@item
+Add an appropriate copyright notice for your modifications
+adjacent to the other copyright notices.
+
+@item
+Include, immediately after the copyright notices, a license notice
+giving the public permission to use the Modified Version under the
+terms of this License, in the form shown in the Addendum below.
+
+@item
+Preserve in that license notice the full lists of Invariant Sections
+and required Cover Texts given in the Document's license notice.
+
+@item
+Include an unaltered copy of this License.
+
+@item
+Preserve the section Entitled ``History'', Preserve its Title, and add
+to it an item stating at least the title, year, new authors, and
+publisher of the Modified Version as given on the Title Page. If
+there is no section Entitled ``History'' in the Document, create one
+stating the title, year, authors, and publisher of the Document as
+given on its Title Page, then add an item describing the Modified
+Version as stated in the previous sentence.
+
+@item
+Preserve the network location, if any, given in the Document for
+public access to a Transparent copy of the Document, and likewise
+the network locations given in the Document for previous versions
+it was based on. These may be placed in the ``History'' section.
+You may omit a network location for a work that was published at
+least four years before the Document itself, or if the original
+publisher of the version it refers to gives permission.
+
+@item
+For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
+the Title of the section, and preserve in the section all the
+substance and tone of each of the contributor acknowledgements and/or
+dedications given therein.
+
+@item
+Preserve all the Invariant Sections of the Document,
+unaltered in their text and in their titles. Section numbers
+or the equivalent are not considered part of the section titles.
+
+@item
+Delete any section Entitled ``Endorsements''. Such a section
+may not be included in the Modified Version.
+
+@item
+Do not retitle any existing section to be Entitled ``Endorsements'' or
+to conflict in title with any Invariant Section.
+
+@item
+Preserve any Warranty Disclaimers.
+@end enumerate
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled ``Endorsements'', provided it contains
+nothing but endorsements of your Modified Version by various
+parties---for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+@item
+COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled ``History''
+in the various original documents, forming one section Entitled
+``History''; likewise combine any sections Entitled ``Acknowledgements'',
+and any sections Entitled ``Dedications''. You must delete all
+sections Entitled ``Endorsements.''
+
+@item
+COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+@item
+AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an ``aggregate'' if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+@item
+TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled ``Acknowledgements'',
+``Dedications'', or ``History'', the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+@item
+TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
+
+@item
+FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+@uref{http://www.gnu.org/copyleft/}.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License ``or any later version'' applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation. If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
+@item
+RELICENSING
+
+``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works. A
+public wiki that anybody can edit is an example of such a server. A
+``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
+site means any set of copyrightable works thus published on the MMC
+site.
+
+``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+
+``Incorporate'' means to publish or republish a Document, in whole or
+in part, as part of another Document.
+
+An MMC is ``eligible for relicensing'' if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole
+or in part into the MMC, (1) had no cover texts or invariant sections,
+and (2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+
+@end enumerate
+
+@page
+@heading ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+@group
+ Copyright (C) @var{year} @var{your name}.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
+ Texts. A copy of the license is included in the section entitled ``GNU
+ Free Documentation License''.
+@end group
+@end smallexample
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the ``with@dots{}Texts.'' line with this:
+
+@smallexample
+@group
+ with the Invariant Sections being @var{list their titles}, with
+ the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
+ being @var{list}.
+@end group
+@end smallexample
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
+@c Local Variables:
+@c ispell-local-pdict: "ispell-dict"
+@c End:
+
diff --git a/lib/readline/doc/history.texi b/lib/readline/doc/history.texi
new file mode 100644
index 0000000..afdb901
--- /dev/null
+++ b/lib/readline/doc/history.texi
@@ -0,0 +1,99 @@
+\input texinfo @c -*-texinfo-*-
+@c %**start of header (This is for running Texinfo on a region.)
+@setfilename history.info
+@settitle GNU History Library
+@c %**end of header (This is for running Texinfo on a region.)
+
+@include version.texi
+
+@copying
+This document describes the GNU History library
+(version @value{VERSION}, @value{UPDATED}),
+a programming tool that provides a consistent user interface for
+recalling lines of previously typed input.
+
+Copyright @copyright{} 1988--2009 Free Software Foundation, Inc.
+
+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.
+
+@quotation
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
+and with the Back-Cover Texts as in (a) below. A copy of the license is
+included in the section entitled ``GNU Free Documentation License''.
+
+(a) The FSF's Back-Cover Text is: You are free to copy and modify
+this GNU manual. Buying copies from GNU Press supports the FSF in
+developing GNU and promoting software freedom.''
+
+@end quotation
+@end copying
+
+@dircategory Libraries
+@direntry
+* History: (history). The GNU history library API.
+@end direntry
+
+@titlepage
+@title GNU History Library
+@subtitle Edition @value{EDITION}, for @code{History Library} Version @value{VERSION}.
+@subtitle @value{UPDATED-MONTH}
+@author Chet Ramey, Case Western Reserve University
+@author Brian Fox, Free Software Foundation
+
+@page
+
+@vskip 0pt plus 1filll
+@insertcopying
+
+@sp 1
+Published by the Free Software Foundation @*
+59 Temple Place, Suite 330, @*
+Boston, MA 02111-1307 @*
+USA @*
+
+@end titlepage
+
+@contents
+
+@ifnottex
+@node Top
+@top GNU History Library
+
+This document describes the GNU History library, a programming tool that
+provides a consistent user interface for recalling lines of previously
+typed input.
+
+@menu
+* Using History Interactively:: GNU History User's Manual.
+* Programming with GNU History:: GNU History Programmer's Manual.
+* GNU Free Documentation License:: License for copying this manual.
+* Concept Index:: Index of concepts described in this manual.
+* Function and Variable Index:: Index of externally visible functions
+ and variables.
+@end menu
+@end ifnottex
+
+@syncodeindex fn vr
+
+@include hsuser.texi
+@include hstech.texi
+
+@node GNU Free Documentation License
+@appendix GNU Free Documentation License
+
+@include fdl.texi
+
+@node Concept Index
+@appendix Concept Index
+@printindex cp
+
+@node Function and Variable Index
+@appendix Function and Variable Index
+@printindex vr
+
+@bye
diff --git a/lib/readline/doc/hstech.texi b/lib/readline/doc/hstech.texi
new file mode 100644
index 0000000..c4e5a75
--- /dev/null
+++ b/lib/readline/doc/hstech.texi
@@ -0,0 +1,573 @@
+@ignore
+This file documents the user interface to the GNU History library.
+
+Copyright (C) 1988-2007 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 Programming with GNU History
+@chapter Programming with GNU History
+
+This chapter describes how to interface programs that you write
+with the @sc{gnu} History Library.
+It should be considered a technical guide.
+For information on the interactive use of @sc{gnu} History, @pxref{Using
+History Interactively}.
+
+@menu
+* Introduction to History:: What is the GNU History library for?
+* History Storage:: How information is stored.
+* History Functions:: Functions that you can use.
+* History Variables:: Variables that control behaviour.
+* History Programming Example:: Example of using the GNU History Library.
+@end menu
+
+@node Introduction to History
+@section Introduction to History
+
+Many programs read input from the user a line at a time. The @sc{gnu}
+History library is able to keep track of those lines, associate arbitrary
+data with each line, and utilize information from previous lines in
+composing new ones.
+
+The programmer using the History library has available functions
+for remembering lines on a history list, associating arbitrary data
+with a line, removing lines from the list, searching through the list
+for a line containing an arbitrary text string, and referencing any line
+in the list directly. In addition, a history @dfn{expansion} function
+is available which provides for a consistent user interface across
+different programs.
+
+The user using programs written with the History library has the
+benefit of a consistent user interface with a set of well-known
+commands for manipulating the text of previous lines and using that text
+in new commands. The basic history manipulation commands are similar to
+the history substitution provided by @code{csh}.
+
+If the programmer desires, he can use the Readline library, which
+includes some history manipulation by default, and has the added
+advantage of command line editing.
+
+Before declaring any functions using any functionality the History
+library provides in other code, an application writer should include
+the file @code{<readline/history.h>} in any file that uses the
+History library's features. It supplies extern declarations for all
+of the library's public functions and variables, and declares all of
+the public data structures.
+
+@node History Storage
+@section History Storage
+
+The history list is an array of history entries. A history entry is
+declared as follows:
+
+@example
+typedef void *histdata_t;
+
+typedef struct _hist_entry @{
+ char *line;
+ char *timestamp;
+ histdata_t data;
+@} HIST_ENTRY;
+@end example
+
+The history list itself might therefore be declared as
+
+@example
+HIST_ENTRY **the_history_list;
+@end example
+
+The state of the History library is encapsulated into a single structure:
+
+@example
+/*
+ * A structure used to pass around the current state of the history.
+ */
+typedef struct _hist_state @{
+ HIST_ENTRY **entries; /* Pointer to the entries themselves. */
+ int offset; /* The location pointer within this array. */
+ int length; /* Number of elements within this array. */
+ int size; /* Number of slots allocated to this array. */
+ int flags;
+@} HISTORY_STATE;
+@end example
+
+If the flags member includes @code{HS_STIFLED}, the history has been
+stifled.
+
+@node History Functions
+@section History Functions
+
+This section describes the calling sequence for the various functions
+exported by the @sc{gnu} History library.
+
+@menu
+* Initializing History and State Management:: Functions to call when you
+ want to use history in a
+ program.
+* History List Management:: Functions used to manage the list
+ of history entries.
+* Information About the History List:: Functions returning information about
+ the history list.
+* Moving Around the History List:: Functions used to change the position
+ in the history list.
+* Searching the History List:: Functions to search the history list
+ for entries containing a string.
+* Managing the History File:: Functions that read and write a file
+ containing the history list.
+* History Expansion:: Functions to perform csh-like history
+ expansion.
+@end menu
+
+@node Initializing History and State Management
+@subsection Initializing History and State Management
+
+This section describes functions used to initialize and manage
+the state of the History library when you want to use the history
+functions in your program.
+
+@deftypefun void using_history (void)
+Begin a session in which the history functions might be used. This
+initializes the interactive variables.
+@end deftypefun
+
+@deftypefun {HISTORY_STATE *} history_get_history_state (void)
+Return a structure describing the current state of the input history.
+@end deftypefun
+
+@deftypefun void history_set_history_state (HISTORY_STATE *state)
+Set the state of the history list according to @var{state}.
+@end deftypefun
+
+@node History List Management
+@subsection History List Management
+
+These functions manage individual entries on the history list, or set
+parameters managing the list itself.
+
+@deftypefun void add_history (const char *string)
+Place @var{string} at the end of the history list. The associated data
+field (if any) is set to @code{NULL}.
+@end deftypefun
+
+@deftypefun void add_history_time (const char *string)
+Change the time stamp associated with the most recent history entry to
+@var{string}.
+@end deftypefun
+
+@deftypefun {HIST_ENTRY *} remove_history (int which)
+Remove history entry at offset @var{which} from the history. The
+removed element is returned so you can free the line, data,
+and containing structure.
+@end deftypefun
+
+@deftypefun {histdata_t} free_history_entry (HIST_ENTRY *histent)
+Free the history entry @var{histent} and any history library private
+data associated with it. Returns the application-specific data
+so the caller can dispose of it.
+@end deftypefun
+
+@deftypefun {HIST_ENTRY *} replace_history_entry (int which, const char *line, histdata_t data)
+Make the history entry at offset @var{which} have @var{line} and @var{data}.
+This returns the old entry so the caller can dispose of any
+application-specific data. In the case
+of an invalid @var{which}, a @code{NULL} pointer is returned.
+@end deftypefun
+
+@deftypefun void clear_history (void)
+Clear the history list by deleting all the entries.
+@end deftypefun
+
+@deftypefun void stifle_history (int max)
+Stifle the history list, remembering only the last @var{max} entries.
+@end deftypefun
+
+@deftypefun int unstifle_history (void)
+Stop stifling the history. This returns the previously-set
+maximum number of history entries (as set by @code{stifle_history()}).
+The value is positive if the history was
+stifled, negative if it wasn't.
+@end deftypefun
+
+@deftypefun int history_is_stifled (void)
+Returns non-zero if the history is stifled, zero if it is not.
+@end deftypefun
+
+@node Information About the History List
+@subsection Information About the History List
+
+These functions return information about the entire history list or
+individual list entries.
+
+@deftypefun {HIST_ENTRY **} history_list (void)
+Return a @code{NULL} terminated array of @code{HIST_ENTRY *} which is the
+current input history. Element 0 of this list is the beginning of time.
+If there is no history, return @code{NULL}.
+@end deftypefun
+
+@deftypefun int where_history (void)
+Returns the offset of the current history element.
+@end deftypefun
+
+@deftypefun {HIST_ENTRY *} current_history (void)
+Return the history entry at the current position, as determined by
+@code{where_history()}. If there is no entry there, return a @code{NULL}
+pointer.
+@end deftypefun
+
+@deftypefun {HIST_ENTRY *} history_get (int offset)
+Return the history entry at position @var{offset}, starting from
+@code{history_base} (@pxref{History Variables}).
+If there is no entry there, or if @var{offset}
+is greater than the history length, return a @code{NULL} pointer.
+@end deftypefun
+
+@deftypefun time_t history_get_time (HIST_ENTRY *entry)
+Return the time stamp associated with the history entry @var{entry}.
+@end deftypefun
+
+@deftypefun int history_total_bytes (void)
+Return the number of bytes that the primary history entries are using.
+This function returns the sum of the lengths of all the lines in the
+history.
+@end deftypefun
+
+@node Moving Around the History List
+@subsection Moving Around the History List
+
+These functions allow the current index into the history list to be
+set or changed.
+
+@deftypefun int history_set_pos (int pos)
+Set the current history offset to @var{pos}, an absolute index
+into the list.
+Returns 1 on success, 0 if @var{pos} is less than zero or greater
+than the number of history entries.
+@end deftypefun
+
+@deftypefun {HIST_ENTRY *} previous_history (void)
+Back up the current history offset to the previous history entry, and
+return a pointer to that entry. If there is no previous entry, return
+a @code{NULL} pointer.
+@end deftypefun
+
+@deftypefun {HIST_ENTRY *} next_history (void)
+Move the current history offset forward to the next history entry, and
+return the a pointer to that entry. If there is no next entry, return
+a @code{NULL} pointer.
+@end deftypefun
+
+@node Searching the History List
+@subsection Searching the History List
+@cindex History Searching
+
+These functions allow searching of the history list for entries containing
+a specific string. Searching may be performed both forward and backward
+from the current history position. The search may be @dfn{anchored},
+meaning that the string must match at the beginning of the history entry.
+@cindex anchored search
+
+@deftypefun int history_search (const char *string, int direction)
+Search the history for @var{string}, starting at the current history offset.
+If @var{direction} is less than 0, then the search is through
+previous entries, otherwise through subsequent entries.
+If @var{string} is found, then
+the current history index is set to that history entry, and the value
+returned is the offset in the line of the entry where
+@var{string} was found. Otherwise, nothing is changed, and a -1 is
+returned.
+@end deftypefun
+
+@deftypefun int history_search_prefix (const char *string, int direction)
+Search the history for @var{string}, starting at the current history
+offset. The search is anchored: matching lines must begin with
+@var{string}. If @var{direction} is less than 0, then the search is
+through previous entries, otherwise through subsequent entries.
+If @var{string} is found, then the
+current history index is set to that entry, and the return value is 0.
+Otherwise, nothing is changed, and a -1 is returned.
+@end deftypefun
+
+@deftypefun int history_search_pos (const char *string, int direction, int pos)
+Search for @var{string} in the history list, starting at @var{pos}, an
+absolute index into the list. If @var{direction} is negative, the search
+proceeds backward from @var{pos}, otherwise forward. Returns the absolute
+index of the history element where @var{string} was found, or -1 otherwise.
+@end deftypefun
+
+@node Managing the History File
+@subsection Managing the History File
+
+The History library can read the history from and write it to a file.
+This section documents the functions for managing a history file.
+
+@deftypefun int read_history (const char *filename)
+Add the contents of @var{filename} to the history list, a line at a time.
+If @var{filename} is @code{NULL}, then read from @file{~/.history}.
+Returns 0 if successful, or @code{errno} if not.
+@end deftypefun
+
+@deftypefun int read_history_range (const char *filename, int from, int to)
+Read a range of lines from @var{filename}, adding them to the history list.
+Start reading at line @var{from} and end at @var{to}.
+If @var{from} is zero, start at the beginning. If @var{to} is less than
+@var{from}, then read until the end of the file. If @var{filename} is
+@code{NULL}, then read from @file{~/.history}. Returns 0 if successful,
+or @code{errno} if not.
+@end deftypefun
+
+@deftypefun int write_history (const char *filename)
+Write the current history to @var{filename}, overwriting @var{filename}
+if necessary.
+If @var{filename} is @code{NULL}, then write the history list to
+@file{~/.history}.
+Returns 0 on success, or @code{errno} on a read or write error.
+@end deftypefun
+
+@deftypefun int append_history (int nelements, const char *filename)
+Append the last @var{nelements} of the history list to @var{filename}.
+If @var{filename} is @code{NULL}, then append to @file{~/.history}.
+Returns 0 on success, or @code{errno} on a read or write error.
+@end deftypefun
+
+@deftypefun int history_truncate_file (const char *filename, int nlines)
+Truncate the history file @var{filename}, leaving only the last
+@var{nlines} lines.
+If @var{filename} is @code{NULL}, then @file{~/.history} is truncated.
+Returns 0 on success, or @code{errno} on failure.
+@end deftypefun
+
+@node History Expansion
+@subsection History Expansion
+
+These functions implement history expansion.
+
+@deftypefun int history_expand (char *string, char **output)
+Expand @var{string}, placing the result into @var{output}, a pointer
+to a string (@pxref{History Interaction}). Returns:
+@table @code
+@item 0
+If no expansions took place (or, if the only change in
+the text was the removal of escape characters preceding the history expansion
+character);
+@item 1
+if expansions did take place;
+@item -1
+if there was an error in expansion;
+@item 2
+if the returned line should be displayed, but not executed,
+as with the @code{:p} modifier (@pxref{Modifiers}).
+@end table
+
+If an error ocurred in expansion, then @var{output} contains a descriptive
+error message.
+@end deftypefun
+
+@deftypefun {char *} get_history_event (const char *string, int *cindex, int qchar)
+Returns the text of the history event beginning at @var{string} +
+@var{*cindex}. @var{*cindex} is modified to point to after the event
+specifier. At function entry, @var{cindex} points to the index into
+@var{string} where the history event specification begins. @var{qchar}
+is a character that is allowed to end the event specification in addition
+to the ``normal'' terminating characters.
+@end deftypefun
+
+@deftypefun {char **} history_tokenize (const char *string)
+Return an array of tokens parsed out of @var{string}, much as the
+shell might. The tokens are split on the characters in the
+@var{history_word_delimiters} variable,
+and shell quoting conventions are obeyed.
+@end deftypefun
+
+@deftypefun {char *} history_arg_extract (int first, int last, const char *string)
+Extract a string segment consisting of the @var{first} through @var{last}
+arguments present in @var{string}. Arguments are split using
+@code{history_tokenize}.
+@end deftypefun
+
+@node History Variables
+@section History Variables
+
+This section describes the externally-visible variables exported by
+the @sc{gnu} History Library.
+
+@deftypevar int history_base
+The logical offset of the first entry in the history list.
+@end deftypevar
+
+@deftypevar int history_length
+The number of entries currently stored in the history list.
+@end deftypevar
+
+@deftypevar int history_max_entries
+The maximum number of history entries. This must be changed using
+@code{stifle_history()}.
+@end deftypevar
+
+@deftypevar int history_write_timestamps
+If non-zero, timestamps are written to the history file, so they can be
+preserved between sessions. The default value is 0, meaning that
+timestamps are not saved.
+@end deftypevar
+
+@deftypevar char history_expansion_char
+The character that introduces a history event. The default is @samp{!}.
+Setting this to 0 inhibits history expansion.
+@end deftypevar
+
+@deftypevar char history_subst_char
+The character that invokes word substitution if found at the start of
+a line. The default is @samp{^}.
+@end deftypevar
+
+@deftypevar char history_comment_char
+During tokenization, if this character is seen as the first character
+of a word, then it and all subsequent characters up to a newline are
+ignored, suppressing history expansion for the remainder of the line.
+This is disabled by default.
+@end deftypevar
+
+@deftypevar {char *} history_word_delimiters
+The characters that separate tokens for @code{history_tokenize()}.
+The default value is @code{" \t\n()<>;&|"}.
+@end deftypevar
+
+@deftypevar {char *} history_search_delimiter_chars
+The list of additional characters which can delimit a history search
+string, in addition to space, TAB, @samp{:} and @samp{?} in the case of
+a substring search. The default is empty.
+@end deftypevar
+
+@deftypevar {char *} history_no_expand_chars
+The list of characters which inhibit history expansion if found immediately
+following @var{history_expansion_char}. The default is space, tab, newline,
+carriage return, and @samp{=}.
+@end deftypevar
+
+@deftypevar int history_quotes_inhibit_expansion
+If non-zero, single-quoted words are not scanned for the history expansion
+character. The default value is 0.
+@end deftypevar
+
+@deftypevar {rl_linebuf_func_t *} history_inhibit_expansion_function
+This should be set to the address of a function that takes two arguments:
+a @code{char *} (@var{string})
+and an @code{int} index into that string (@var{i}).
+It should return a non-zero value if the history expansion starting at
+@var{string[i]} should not be performed; zero if the expansion should
+be done.
+It is intended for use by applications like Bash that use the history
+expansion character for additional purposes.
+By default, this variable is set to @code{NULL}.
+@end deftypevar
+
+@node History Programming Example
+@section History Programming Example
+
+The following program demonstrates simple use of the @sc{gnu} History Library.
+
+@smallexample
+#include <stdio.h>
+#include <readline/history.h>
+
+main (argc, argv)
+ int argc;
+ char **argv;
+@{
+ char line[1024], *t;
+ int len, done = 0;
+
+ line[0] = 0;
+
+ using_history ();
+ while (!done)
+ @{
+ printf ("history$ ");
+ fflush (stdout);
+ t = fgets (line, sizeof (line) - 1, stdin);
+ if (t && *t)
+ @{
+ len = strlen (t);
+ if (t[len - 1] == '\n')
+ t[len - 1] = '\0';
+ @}
+
+ if (!t)
+ strcpy (line, "quit");
+
+ if (line[0])
+ @{
+ char *expansion;
+ int result;
+
+ result = history_expand (line, &expansion);
+ if (result)
+ fprintf (stderr, "%s\n", expansion);
+
+ if (result < 0 || result == 2)
+ @{
+ free (expansion);
+ continue;
+ @}
+
+ add_history (expansion);
+ strncpy (line, expansion, sizeof (line) - 1);
+ free (expansion);
+ @}
+
+ if (strcmp (line, "quit") == 0)
+ done = 1;
+ else if (strcmp (line, "save") == 0)
+ write_history ("history_file");
+ else if (strcmp (line, "read") == 0)
+ read_history ("history_file");
+ else if (strcmp (line, "list") == 0)
+ @{
+ register HIST_ENTRY **the_list;
+ register int i;
+
+ the_list = history_list ();
+ if (the_list)
+ for (i = 0; the_list[i]; i++)
+ printf ("%d: %s\n", i + history_base, the_list[i]->line);
+ @}
+ else if (strncmp (line, "delete", 6) == 0)
+ @{
+ int which;
+ if ((sscanf (line + 6, "%d", &which)) == 1)
+ @{
+ HIST_ENTRY *entry = remove_history (which);
+ if (!entry)
+ fprintf (stderr, "No such entry %d\n", which);
+ else
+ @{
+ free (entry->line);
+ free (entry);
+ @}
+ @}
+ else
+ @{
+ fprintf (stderr, "non-numeric arg given to `delete'\n");
+ @}
+ @}
+ @}
+@}
+@end smallexample
diff --git a/lib/readline/doc/hsuser.texi b/lib/readline/doc/hsuser.texi
new file mode 100644
index 0000000..87b3541
--- /dev/null
+++ b/lib/readline/doc/hsuser.texi
@@ -0,0 +1,464 @@
+@ignore
+This file documents the user interface to the GNU History library.
+
+Copyright (C) 1988-2007 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, no truncation is performed.
+
+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
+
+Fix Command. In the first form, a range of commands from @var{first} to
+@var{last} is selected from the history list. 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}.
+
+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 current history file and append its contents to
+the history list.
+
+@item -w
+Write out the current history 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.
+@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 starting with @var{string}.
+
+@item @code{!?@var{string}[?]}
+Refer to the most recent command 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
diff --git a/lib/readline/doc/rlman.texi b/lib/readline/doc/rlman.texi
new file mode 100644
index 0000000..be24709
--- /dev/null
+++ b/lib/readline/doc/rlman.texi
@@ -0,0 +1,97 @@
+\input texinfo @c -*-texinfo-*-
+@comment %**start of header (This is for running Texinfo on a region.)
+@setfilename readline.info
+@settitle GNU Readline Library
+@comment %**end of header (This is for running Texinfo on a region.)
+@synindex vr fn
+
+@include version.texi
+
+@copying
+This manual describes the GNU Readline Library
+(version @value{VERSION}, @value{UPDATED}), a library which aids in the
+consistency of user interface across discrete programs which provide
+a command line interface.
+
+Copyright @copyright{} 1988--2009 Free Software Foundation, Inc.
+
+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.
+
+@quotation
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
+and with the Back-Cover Texts as in (a) below. A copy of the license is
+included in the section entitled ``GNU Free Documentation License''.
+
+(a) The FSF's Back-Cover Text is: You are free to copy and modify
+this GNU manual. Buying copies from GNU Press supports the FSF in
+developing GNU and promoting software freedom.''
+
+@end quotation
+@end copying
+
+@dircategory Libraries
+@direntry
+* Readline: (readline). The GNU readline library API.
+@end direntry
+
+@titlepage
+@title GNU Readline Library
+@subtitle Edition @value{EDITION}, for @code{Readline Library} Version @value{VERSION}.
+@subtitle @value{UPDATED-MONTH}
+@author Chet Ramey, Case Western Reserve University
+@author Brian Fox, Free Software Foundation
+
+@page
+@vskip 0pt plus 1filll
+@insertcopying
+
+@sp 1
+Published by the Free Software Foundation @*
+59 Temple Place, Suite 330, @*
+Boston, MA 02111-1307 @*
+USA @*
+
+@end titlepage
+
+@contents
+
+@ifnottex
+@node Top
+@top GNU Readline Library
+
+This document describes the GNU Readline Library, a utility which aids
+in the consistency of user interface across discrete programs which
+provide a command line interface.
+
+@menu
+* Command Line Editing:: GNU Readline User's Manual.
+* Programming with GNU Readline:: GNU Readline Programmer's Manual.
+* GNU Free Documentation License:: License for copying this manual.
+* Concept Index:: Index of concepts described in this manual.
+* Function and Variable Index:: Index of externally visible functions
+ and variables.
+@end menu
+@end ifnottex
+
+@include rluser.texi
+@include rltech.texi
+
+@node GNU Free Documentation License
+@appendix GNU Free Documentation License
+
+@include fdl.texi
+
+@node Concept Index
+@unnumbered Concept Index
+@printindex cp
+
+@node Function and Variable Index
+@unnumbered Function and Variable Index
+@printindex fn
+
+@bye
diff --git a/lib/readline/doc/rltech.texi b/lib/readline/doc/rltech.texi
new file mode 100644
index 0000000..04c8489
--- /dev/null
+++ b/lib/readline/doc/rltech.texi
@@ -0,0 +1,2415 @@
+@comment %**start of header (This is for running Texinfo on a region.)
+@setfilename rltech.info
+@comment %**end of header (This is for running Texinfo on a region.)
+
+@ifinfo
+This document describes the GNU Readline Library, a utility for aiding
+in the consistency of user interface across discrete programs that need
+to provide a command line interface.
+
+Copyright (C) 1988-2007 Free Software Foundation, Inc.
+
+Permission is granted to make and distribute verbatim copies of
+this manual provided the copyright notice and this permission notice
+pare preserved on all copies.
+
+@ignore
+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).
+@end ignore
+
+Permission is granted to copy and distribute modified versions of this
+manual under the conditions for verbatim copying, 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,
+except that this permission notice may be stated in a translation approved
+by the Foundation.
+@end ifinfo
+
+@node Programming with GNU Readline
+@chapter Programming with GNU Readline
+
+This chapter describes the interface between the @sc{gnu} Readline Library and
+other programs. If you are a programmer, and you wish to include the
+features found in @sc{gnu} Readline
+such as completion, line editing, and interactive history manipulation
+in your own programs, this section is for you.
+
+@menu
+* Basic Behavior:: Using the default behavior of Readline.
+* Custom Functions:: Adding your own functions to Readline.
+* Readline Variables:: Variables accessible to custom
+ functions.
+* Readline Convenience Functions:: Functions which Readline supplies to
+ aid in writing your own custom
+ functions.
+* Readline Signal Handling:: How Readline behaves when it receives signals.
+* Custom Completers:: Supplanting or supplementing Readline's
+ completion functions.
+@end menu
+
+@node Basic Behavior
+@section Basic Behavior
+
+Many programs provide a command line interface, such as @code{mail},
+@code{ftp}, and @code{sh}. For such programs, the default behaviour of
+Readline is sufficient. This section describes how to use Readline in
+the simplest way possible, perhaps to replace calls in your code to
+@code{gets()} or @code{fgets()}.
+
+@findex readline
+@cindex readline, function
+
+The function @code{readline()} prints a prompt @var{prompt}
+and then reads and returns a single line of text from the user.
+If @var{prompt} is @code{NULL} or the empty string, no prompt is displayed.
+The line @code{readline} returns is allocated with @code{malloc()};
+the caller should @code{free()} the line when it has finished with it.
+The declaration for @code{readline} in ANSI C is
+
+@example
+@code{char *readline (const char *@var{prompt});}
+@end example
+
+@noindent
+So, one might say
+@example
+@code{char *line = readline ("Enter a line: ");}
+@end example
+@noindent
+in order to read a line of text from the user.
+The line returned has the final newline removed, so only the
+text remains.
+
+If @code{readline} encounters an @code{EOF} while reading the line, and the
+line is empty at that point, then @code{(char *)NULL} is returned.
+Otherwise, the line is ended just as if a newline had been typed.
+
+If you want the user to be able to get at the line later, (with
+@key{C-p} for example), you must call @code{add_history()} to save the
+line away in a @dfn{history} list of such lines.
+
+@example
+@code{add_history (line)};
+@end example
+
+@noindent
+For full details on the GNU History Library, see the associated manual.
+
+It is preferable to avoid saving empty lines on the history list, since
+users rarely have a burning need to reuse a blank line. Here is
+a function which usefully replaces the standard @code{gets()} library
+function, and has the advantage of no static buffer to overflow:
+
+@example
+/* A static variable for holding the line. */
+static char *line_read = (char *)NULL;
+
+/* Read a string, and return a pointer to it.
+ Returns NULL on EOF. */
+char *
+rl_gets ()
+@{
+ /* If the buffer has already been allocated,
+ return the memory to the free pool. */
+ if (line_read)
+ @{
+ free (line_read);
+ line_read = (char *)NULL;
+ @}
+
+ /* Get a line from the user. */
+ line_read = readline ("");
+
+ /* If the line has any text in it,
+ save it on the history. */
+ if (line_read && *line_read)
+ add_history (line_read);
+
+ return (line_read);
+@}
+@end example
+
+This function gives the user the default behaviour of @key{TAB}
+completion: completion on file names. If you do not want Readline to
+complete on filenames, you can change the binding of the @key{TAB} key
+with @code{rl_bind_key()}.
+
+@example
+@code{int rl_bind_key (int @var{key}, rl_command_func_t *@var{function});}
+@end example
+
+@code{rl_bind_key()} takes two arguments: @var{key} is the character that
+you want to bind, and @var{function} is the address of the function to
+call when @var{key} is pressed. Binding @key{TAB} to @code{rl_insert()}
+makes @key{TAB} insert itself.
+@code{rl_bind_key()} returns non-zero if @var{key} is not a valid
+ASCII character code (between 0 and 255).
+
+Thus, to disable the default @key{TAB} behavior, the following suffices:
+@example
+@code{rl_bind_key ('\t', rl_insert);}
+@end example
+
+This code should be executed once at the start of your program; you
+might write a function called @code{initialize_readline()} which
+performs this and other desired initializations, such as installing
+custom completers (@pxref{Custom Completers}).
+
+@node Custom Functions
+@section Custom Functions
+
+Readline provides many functions for manipulating the text of
+the line, but it isn't possible to anticipate the needs of all
+programs. This section describes the various functions and variables
+defined within the Readline library which allow a user program to add
+customized functionality to Readline.
+
+Before declaring any functions that customize Readline's behavior, or
+using any functionality Readline provides in other code, an
+application writer should include the file @code{<readline/readline.h>}
+in any file that uses Readline's features. Since some of the definitions
+in @code{readline.h} use the @code{stdio} library, the file
+@code{<stdio.h>} should be included before @code{readline.h}.
+
+@code{readline.h} defines a C preprocessor variable that should
+be treated as an integer, @code{RL_READLINE_VERSION}, which may
+be used to conditionally compile application code depending on
+the installed Readline version. The value is a hexadecimal
+encoding of the major and minor version numbers of the library,
+of the form 0x@var{MMmm}. @var{MM} is the two-digit major
+version number; @var{mm} is the two-digit minor version number.
+For Readline 4.2, for example, the value of
+@code{RL_READLINE_VERSION} would be @code{0x0402}.
+
+@menu
+* Readline Typedefs:: C declarations to make code readable.
+* Function Writing:: Variables and calling conventions.
+@end menu
+
+@node Readline Typedefs
+@subsection Readline Typedefs
+
+For readabilty, we declare a number of new object types, all pointers
+to functions.
+
+The reason for declaring these new types is to make it easier to write
+code describing pointers to C functions with appropriately prototyped
+arguments and return values.
+
+For instance, say we want to declare a variable @var{func} as a pointer
+to a function which takes two @code{int} arguments and returns an
+@code{int} (this is the type of all of the Readline bindable functions).
+Instead of the classic C declaration
+
+@code{int (*func)();}
+
+@noindent
+or the ANSI-C style declaration
+
+@code{int (*func)(int, int);}
+
+@noindent
+we may write
+
+@code{rl_command_func_t *func;}
+
+The full list of function pointer types available is
+
+@table @code
+@item typedef int rl_command_func_t (int, int);
+
+@item typedef char *rl_compentry_func_t (const char *, int);
+
+@item typedef char **rl_completion_func_t (const char *, int, int);
+
+@item typedef char *rl_quote_func_t (char *, int, char *);
+
+@item typedef char *rl_dequote_func_t (char *, int);
+
+@item typedef int rl_compignore_func_t (char **);
+
+@item typedef void rl_compdisp_func_t (char **, int, int);
+
+@item typedef int rl_hook_func_t (void);
+
+@item typedef int rl_getc_func_t (FILE *);
+
+@item typedef int rl_linebuf_func_t (char *, int);
+
+@item typedef int rl_intfunc_t (int);
+@item #define rl_ivoidfunc_t rl_hook_func_t
+@item typedef int rl_icpfunc_t (char *);
+@item typedef int rl_icppfunc_t (char **);
+
+@item typedef void rl_voidfunc_t (void);
+@item typedef void rl_vintfunc_t (int);
+@item typedef void rl_vcpfunc_t (char *);
+@item typedef void rl_vcppfunc_t (char **);
+
+@end table
+
+@node Function Writing
+@subsection Writing a New Function
+
+In order to write new functions for Readline, you need to know the
+calling conventions for keyboard-invoked functions, and the names of the
+variables that describe the current state of the line read so far.
+
+The calling sequence for a command @code{foo} looks like
+
+@example
+@code{int foo (int count, int key)}
+@end example
+
+@noindent
+where @var{count} is the numeric argument (or 1 if defaulted) and
+@var{key} is the key that invoked this function.
+
+It is completely up to the function as to what should be done with the
+numeric argument. Some functions use it as a repeat count, some
+as a flag, and others to choose alternate behavior (refreshing the current
+line as opposed to refreshing the screen, for example). Some choose to
+ignore it. In general, if a
+function uses the numeric argument as a repeat count, it should be able
+to do something useful with both negative and positive arguments.
+At the very least, it should be aware that it can be passed a
+negative argument.
+
+A command function should return 0 if its action completes successfully,
+and a non-zero value if some error occurs.
+This is the convention obeyed by all of the builtin Readline bindable
+command functions.
+
+@node Readline Variables
+@section Readline Variables
+
+These variables are available to function writers.
+
+@deftypevar {char *} rl_line_buffer
+This is the line gathered so far. You are welcome to modify the
+contents of the line, but see @ref{Allowing Undoing}. The
+function @code{rl_extend_line_buffer} is available to increase
+the memory allocated to @code{rl_line_buffer}.
+@end deftypevar
+
+@deftypevar int rl_point
+The offset of the current cursor position in @code{rl_line_buffer}
+(the @emph{point}).
+@end deftypevar
+
+@deftypevar int rl_end
+The number of characters present in @code{rl_line_buffer}. When
+@code{rl_point} is at the end of the line, @code{rl_point} and
+@code{rl_end} are equal.
+@end deftypevar
+
+@deftypevar int rl_mark
+The @var{mark} (saved position) in the current line. If set, the mark
+and point define a @emph{region}.
+@end deftypevar
+
+@deftypevar int rl_done
+Setting this to a non-zero value causes Readline to return the current
+line immediately.
+@end deftypevar
+
+@deftypevar int rl_num_chars_to_read
+Setting this to a positive value before calling @code{readline()} causes
+Readline to return after accepting that many characters, rather
+than reading up to a character bound to @code{accept-line}.
+@end deftypevar
+
+@deftypevar int rl_pending_input
+Setting this to a value makes it the next keystroke read. This is a
+way to stuff a single character into the input stream.
+@end deftypevar
+
+@deftypevar int rl_dispatching
+Set to a non-zero value if a function is being called from a key binding;
+zero otherwise. Application functions can test this to discover whether
+they were called directly or by Readline's dispatching mechanism.
+@end deftypevar
+
+@deftypevar int rl_erase_empty_line
+Setting this to a non-zero value causes Readline to completely erase
+the current line, including any prompt, any time a newline is typed as
+the only character on an otherwise-empty line. The cursor is moved to
+the beginning of the newly-blank line.
+@end deftypevar
+
+@deftypevar {char *} rl_prompt
+The prompt Readline uses. This is set from the argument to
+@code{readline()}, and should not be assigned to directly.
+The @code{rl_set_prompt()} function (@pxref{Redisplay}) may
+be used to modify the prompt string after calling @code{readline()}.
+@end deftypevar
+
+@deftypevar {char *} rl_display_prompt
+The string displayed as the prompt. This is usually identical to
+@var{rl_prompt}, but may be changed temporarily by functions that
+use the prompt string as a message area, such as incremental search.
+@end deftypevar
+
+@deftypevar int rl_already_prompted
+If an application wishes to display the prompt itself, rather than have
+Readline do it the first time @code{readline()} is called, it should set
+this variable to a non-zero value after displaying the prompt.
+The prompt must also be passed as the argument to @code{readline()} so
+the redisplay functions can update the display properly.
+The calling application is responsible for managing the value; Readline
+never sets it.
+@end deftypevar
+
+@deftypevar {const char *} rl_library_version
+The version number of this revision of the library.
+@end deftypevar
+
+@deftypevar int rl_readline_version
+An integer encoding the current version of the library. The encoding is
+of the form 0x@var{MMmm}, where @var{MM} is the two-digit major version
+number, and @var{mm} is the two-digit minor version number.
+For example, for Readline-4.2, @code{rl_readline_version} would have the
+value 0x0402.
+@end deftypevar
+
+@deftypevar {int} rl_gnu_readline_p
+Always set to 1, denoting that this is @sc{gnu} readline rather than some
+emulation.
+@end deftypevar
+
+@deftypevar {const char *} rl_terminal_name
+The terminal type, used for initialization. If not set by the application,
+Readline sets this to the value of the @env{TERM} environment variable
+the first time it is called.
+@end deftypevar
+
+@deftypevar {const char *} rl_readline_name
+This variable is set to a unique name by each application using Readline.
+The value allows conditional parsing of the inputrc file
+(@pxref{Conditional Init Constructs}).
+@end deftypevar
+
+@deftypevar {FILE *} rl_instream
+The stdio stream from which Readline reads input.
+If @code{NULL}, Readline defaults to @var{stdin}.
+@end deftypevar
+
+@deftypevar {FILE *} rl_outstream
+The stdio stream to which Readline performs output.
+If @code{NULL}, Readline defaults to @var{stdout}.
+@end deftypevar
+
+@deftypevar int rl_prefer_env_winsize
+If non-zero, Readline gives values found in the @env{LINES} and
+@env{COLUMNS} environment variables greater precedence than values fetched
+from the kernel when computing the screen dimensions.
+@end deftypevar
+
+@deftypevar {rl_command_func_t *} rl_last_func
+The address of the last command function Readline executed. May be used to
+test whether or not a function is being executed twice in succession, for
+example.
+@end deftypevar
+
+@deftypevar {rl_hook_func_t *} rl_startup_hook
+If non-zero, this is the address of a function to call just
+before @code{readline} prints the first prompt.
+@end deftypevar
+
+@deftypevar {rl_hook_func_t *} rl_pre_input_hook
+If non-zero, this is the address of a function to call after
+the first prompt has been printed and just before @code{readline}
+starts reading input characters.
+@end deftypevar
+
+@deftypevar {rl_hook_func_t *} rl_event_hook
+If non-zero, this is the address of a function to call periodically
+when Readline is waiting for terminal input.
+By default, this will be called at most ten times a second if there
+is no keyboard input.
+@end deftypevar
+
+@deftypevar {rl_getc_func_t *} rl_getc_function
+If non-zero, Readline will call indirectly through this pointer
+to get a character from the input stream. By default, it is set to
+@code{rl_getc}, the default Readline character input function
+(@pxref{Character Input}).
+@end deftypevar
+
+@deftypevar {rl_voidfunc_t *} rl_redisplay_function
+If non-zero, Readline will call indirectly through this pointer
+to update the display with the current contents of the editing buffer.
+By default, it is set to @code{rl_redisplay}, the default Readline
+redisplay function (@pxref{Redisplay}).
+@end deftypevar
+
+@deftypevar {rl_vintfunc_t *} rl_prep_term_function
+If non-zero, Readline will call indirectly through this pointer
+to initialize the terminal. The function takes a single argument, an
+@code{int} flag that says whether or not to use eight-bit characters.
+By default, this is set to @code{rl_prep_terminal}
+(@pxref{Terminal Management}).
+@end deftypevar
+
+@deftypevar {rl_voidfunc_t *} rl_deprep_term_function
+If non-zero, Readline will call indirectly through this pointer
+to reset the terminal. This function should undo the effects of
+@code{rl_prep_term_function}.
+By default, this is set to @code{rl_deprep_terminal}
+(@pxref{Terminal Management}).
+@end deftypevar
+
+@deftypevar {Keymap} rl_executing_keymap
+This variable is set to the keymap (@pxref{Keymaps}) in which the
+currently executing readline function was found.
+@end deftypevar
+
+@deftypevar {Keymap} rl_binding_keymap
+This variable is set to the keymap (@pxref{Keymaps}) in which the
+last key binding occurred.
+@end deftypevar
+
+@deftypevar {char *} rl_executing_macro
+This variable is set to the text of any currently-executing macro.
+@end deftypevar
+
+@deftypevar {int} rl_readline_state
+A variable with bit values that encapsulate the current Readline state.
+A bit is set with the @code{RL_SETSTATE} macro, and unset with the
+@code{RL_UNSETSTATE} macro. Use the @code{RL_ISSTATE} macro to test
+whether a particular state bit is set. Current state bits include:
+
+@table @code
+@item RL_STATE_NONE
+Readline has not yet been called, nor has it begun to intialize.
+@item RL_STATE_INITIALIZING
+Readline is initializing its internal data structures.
+@item RL_STATE_INITIALIZED
+Readline has completed its initialization.
+@item RL_STATE_TERMPREPPED
+Readline has modified the terminal modes to do its own input and redisplay.
+@item RL_STATE_READCMD
+Readline is reading a command from the keyboard.
+@item RL_STATE_METANEXT
+Readline is reading more input after reading the meta-prefix character.
+@item RL_STATE_DISPATCHING
+Readline is dispatching to a command.
+@item RL_STATE_MOREINPUT
+Readline is reading more input while executing an editing command.
+@item RL_STATE_ISEARCH
+Readline is performing an incremental history search.
+@item RL_STATE_NSEARCH
+Readline is performing a non-incremental history search.
+@item RL_STATE_SEARCH
+Readline is searching backward or forward through the history for a string.
+@item RL_STATE_NUMERICARG
+Readline is reading a numeric argument.
+@item RL_STATE_MACROINPUT
+Readline is currently getting its input from a previously-defined keyboard
+macro.
+@item RL_STATE_MACRODEF
+Readline is currently reading characters defining a keyboard macro.
+@item RL_STATE_OVERWRITE
+Readline is in overwrite mode.
+@item RL_STATE_COMPLETING
+Readline is performing word completion.
+@item RL_STATE_SIGHANDLER
+Readline is currently executing the readline signal handler.
+@item RL_STATE_UNDOING
+Readline is performing an undo.
+@item RL_STATE_INPUTPENDING
+Readline has input pending due to a call to @code{rl_execute_next()}.
+@item RL_STATE_TTYCSAVED
+Readline has saved the values of the terminal's special characters.
+@item RL_STATE_CALLBACK
+Readline is currently using the alternate (callback) interface
+(@pxref{Alternate Interface}).
+@item RL_STATE_VIMOTION
+Readline is reading the argument to a vi-mode "motion" command.
+@item RL_STATE_MULTIKEY
+Readline is reading a multiple-keystroke command.
+@item RL_STATE_VICMDONCE
+Readline has entered vi command (movement) mode at least one time during
+the current call to @code{readline()}.
+@item RL_STATE_DONE
+Readline has read a key sequence bound to @code{accept-line}
+and is about to return the line to the caller.
+@end table
+
+@end deftypevar
+
+@deftypevar {int} rl_explicit_arg
+Set to a non-zero value if an explicit numeric argument was specified by
+the user. Only valid in a bindable command function.
+@end deftypevar
+
+@deftypevar {int} rl_numeric_arg
+Set to the value of any numeric argument explicitly specified by the user
+before executing the current Readline function. Only valid in a bindable
+command function.
+@end deftypevar
+
+@deftypevar {int} rl_editing_mode
+Set to a value denoting Readline's current editing mode. A value of
+@var{1} means Readline is currently in emacs mode; @var{0}
+means that vi mode is active.
+@end deftypevar
+
+
+@node Readline Convenience Functions
+@section Readline Convenience Functions
+
+@menu
+* Function Naming:: How to give a function you write a name.
+* Keymaps:: Making keymaps.
+* Binding Keys:: Changing Keymaps.
+* Associating Function Names and Bindings:: Translate function names to
+ key sequences.
+* Allowing Undoing:: How to make your functions undoable.
+* Redisplay:: Functions to control line display.
+* Modifying Text:: Functions to modify @code{rl_line_buffer}.
+* Character Input:: Functions to read keyboard input.
+* Terminal Management:: Functions to manage terminal settings.
+* Utility Functions:: Generally useful functions and hooks.
+* Miscellaneous Functions:: Functions that don't fall into any category.
+* Alternate Interface:: Using Readline in a `callback' fashion.
+* A Readline Example:: An example Readline function.
+@end menu
+
+@node Function Naming
+@subsection Naming a Function
+
+The user can dynamically change the bindings of keys while using
+Readline. This is done by representing the function with a descriptive
+name. The user is able to type the descriptive name when referring to
+the function. Thus, in an init file, one might find
+
+@example
+Meta-Rubout: backward-kill-word
+@end example
+
+This binds the keystroke @key{Meta-Rubout} to the function
+@emph{descriptively} named @code{backward-kill-word}. You, as the
+programmer, should bind the functions you write to descriptive names as
+well. Readline provides a function for doing that:
+
+@deftypefun int rl_add_defun (const char *name, rl_command_func_t *function, int key)
+Add @var{name} to the list of named functions. Make @var{function} be
+the function that gets called. If @var{key} is not -1, then bind it to
+@var{function} using @code{rl_bind_key()}.
+@end deftypefun
+
+Using this function alone is sufficient for most applications.
+It is the recommended way to add a few functions to the default
+functions that Readline has built in.
+If you need to do something other than adding a function to Readline,
+you may need to use the underlying functions described below.
+
+@node Keymaps
+@subsection Selecting a Keymap
+
+Key bindings take place on a @dfn{keymap}. The keymap is the
+association between the keys that the user types and the functions that
+get run. You can make your own keymaps, copy existing keymaps, and tell
+Readline which keymap to use.
+
+@deftypefun Keymap rl_make_bare_keymap (void)
+Returns a new, empty keymap. The space for the keymap is allocated with
+@code{malloc()}; the caller should free it by calling
+@code{rl_free_keymap()} when done.
+@end deftypefun
+
+@deftypefun Keymap rl_copy_keymap (Keymap map)
+Return a new keymap which is a copy of @var{map}.
+@end deftypefun
+
+@deftypefun Keymap rl_make_keymap (void)
+Return a new keymap with the printing characters bound to rl_insert,
+the lowercase Meta characters bound to run their equivalents, and
+the Meta digits bound to produce numeric arguments.
+@end deftypefun
+
+@deftypefun void rl_discard_keymap (Keymap keymap)
+Free the storage associated with the data in @var{keymap}.
+The caller should free @var{keymap}.
+@end deftypefun
+
+@deftypefun void rl_free_keymap (Keymap keymap)
+Free all storage associated with @var{keymap}. This calls
+@code{rl_discard_keymap} to free subordindate keymaps and macros.
+@end deftypefun
+
+Readline has several internal keymaps. These functions allow you to
+change which keymap is active.
+
+@deftypefun Keymap rl_get_keymap (void)
+Returns the currently active keymap.
+@end deftypefun
+
+@deftypefun void rl_set_keymap (Keymap keymap)
+Makes @var{keymap} the currently active keymap.
+@end deftypefun
+
+@deftypefun Keymap rl_get_keymap_by_name (const char *name)
+Return the keymap matching @var{name}. @var{name} is one which would
+be supplied in a @code{set keymap} inputrc line (@pxref{Readline Init File}).
+@end deftypefun
+
+@deftypefun {char *} rl_get_keymap_name (Keymap keymap)
+Return the name matching @var{keymap}. @var{name} is one which would
+be supplied in a @code{set keymap} inputrc line (@pxref{Readline Init File}).
+@end deftypefun
+
+@node Binding Keys
+@subsection Binding Keys
+
+Key sequences are associate with functions through the keymap.
+Readline has several internal keymaps: @code{emacs_standard_keymap},
+@code{emacs_meta_keymap}, @code{emacs_ctlx_keymap},
+@code{vi_movement_keymap}, and @code{vi_insertion_keymap}.
+@code{emacs_standard_keymap} is the default, and the examples in
+this manual assume that.
+
+Since @code{readline()} installs a set of default key bindings the first
+time it is called, there is always the danger that a custom binding
+installed before the first call to @code{readline()} will be overridden.
+An alternate mechanism is to install custom key bindings in an
+initialization function assigned to the @code{rl_startup_hook} variable
+(@pxref{Readline Variables}).
+
+These functions manage key bindings.
+
+@deftypefun int rl_bind_key (int key, rl_command_func_t *function)
+Binds @var{key} to @var{function} in the currently active keymap.
+Returns non-zero in the case of an invalid @var{key}.
+@end deftypefun
+
+@deftypefun int rl_bind_key_in_map (int key, rl_command_func_t *function, Keymap map)
+Bind @var{key} to @var{function} in @var{map}.
+Returns non-zero in the case of an invalid @var{key}.
+@end deftypefun
+
+@deftypefun int rl_bind_key_if_unbound (int key, rl_command_func_t *function)
+Binds @var{key} to @var{function} if it is not already bound in the
+currently active keymap.
+Returns non-zero in the case of an invalid @var{key} or if @var{key} is
+already bound.
+@end deftypefun
+
+@deftypefun int rl_bind_key_if_unbound_in_map (int key, rl_command_func_t *function, Keymap map)
+Binds @var{key} to @var{function} if it is not already bound in @var{map}.
+Returns non-zero in the case of an invalid @var{key} or if @var{key} is
+already bound.
+@end deftypefun
+
+@deftypefun int rl_unbind_key (int key)
+Bind @var{key} to the null function in the currently active keymap.
+Returns non-zero in case of error.
+@end deftypefun
+
+@deftypefun int rl_unbind_key_in_map (int key, Keymap map)
+Bind @var{key} to the null function in @var{map}.
+Returns non-zero in case of error.
+@end deftypefun
+
+@deftypefun int rl_unbind_function_in_map (rl_command_func_t *function, Keymap map)
+Unbind all keys that execute @var{function} in @var{map}.
+@end deftypefun
+
+@deftypefun int rl_unbind_command_in_map (const char *command, Keymap map)
+Unbind all keys that are bound to @var{command} in @var{map}.
+@end deftypefun
+
+@deftypefun int rl_bind_keyseq (const char *keyseq, rl_command_func_t *function)
+Bind the key sequence represented by the string @var{keyseq} to the function
+@var{function}, beginning in the current keymap.
+This makes new keymaps as necessary.
+The return value is non-zero if @var{keyseq} is invalid.
+@end deftypefun
+
+@deftypefun int rl_bind_keyseq_in_map (const char *keyseq, rl_command_func_t *function, Keymap map)
+Bind the key sequence represented by the string @var{keyseq} to the function
+@var{function}. This makes new keymaps as necessary.
+Initial bindings are performed in @var{map}.
+The return value is non-zero if @var{keyseq} is invalid.
+@end deftypefun
+
+@deftypefun int rl_set_key (const char *keyseq, rl_command_func_t *function, Keymap map)
+Equivalent to @code{rl_bind_keyseq_in_map}.
+@end deftypefun
+
+@deftypefun int rl_bind_keyseq_if_unbound (const char *keyseq, rl_command_func_t *function)
+Binds @var{keyseq} to @var{function} if it is not already bound in the
+currently active keymap.
+Returns non-zero in the case of an invalid @var{keyseq} or if @var{keyseq} is
+already bound.
+@end deftypefun
+
+@deftypefun int rl_bind_keyseq_if_unbound_in_map (const char *keyseq, rl_command_func_t *function, Keymap map)
+Binds @var{keyseq} to @var{function} if it is not already bound in @var{map}.
+Returns non-zero in the case of an invalid @var{keyseq} or if @var{keyseq} is
+already bound.
+@end deftypefun
+
+@deftypefun int rl_generic_bind (int type, const char *keyseq, char *data, Keymap map)
+Bind the key sequence represented by the string @var{keyseq} to the arbitrary
+pointer @var{data}. @var{type} says what kind of data is pointed to by
+@var{data}; this can be a function (@code{ISFUNC}), a macro
+(@code{ISMACR}), or a keymap (@code{ISKMAP}). This makes new keymaps as
+necessary. The initial keymap in which to do bindings is @var{map}.
+@end deftypefun
+
+@deftypefun int rl_parse_and_bind (char *line)
+Parse @var{line} as if it had been read from the @code{inputrc} file and
+perform any key bindings and variable assignments found
+(@pxref{Readline Init File}).
+@end deftypefun
+
+@deftypefun int rl_read_init_file (const char *filename)
+Read keybindings and variable assignments from @var{filename}
+(@pxref{Readline Init File}).
+@end deftypefun
+
+@node Associating Function Names and Bindings
+@subsection Associating Function Names and Bindings
+
+These functions allow you to find out what keys invoke named functions
+and the functions invoked by a particular key sequence. You may also
+associate a new function name with an arbitrary function.
+
+@deftypefun {rl_command_func_t *} rl_named_function (const char *name)
+Return the function with name @var{name}.
+@end deftypefun
+
+@deftypefun {rl_command_func_t *} rl_function_of_keyseq (const char *keyseq, Keymap map, int *type)
+Return the function invoked by @var{keyseq} in keymap @var{map}.
+If @var{map} is @code{NULL}, the current keymap is used. If @var{type} is
+not @code{NULL}, the type of the object is returned in the @code{int} variable
+it points to (one of @code{ISFUNC}, @code{ISKMAP}, or @code{ISMACR}).
+@end deftypefun
+
+@deftypefun {char **} rl_invoking_keyseqs (rl_command_func_t *function)
+Return an array of strings representing the key sequences used to
+invoke @var{function} in the current keymap.
+@end deftypefun
+
+@deftypefun {char **} rl_invoking_keyseqs_in_map (rl_command_func_t *function, Keymap map)
+Return an array of strings representing the key sequences used to
+invoke @var{function} in the keymap @var{map}.
+@end deftypefun
+
+@deftypefun void rl_function_dumper (int readable)
+Print the readline function names and the key sequences currently
+bound to them to @code{rl_outstream}. If @var{readable} is non-zero,
+the list is formatted in such a way that it can be made part of an
+@code{inputrc} file and re-read.
+@end deftypefun
+
+@deftypefun void rl_list_funmap_names (void)
+Print the names of all bindable Readline functions to @code{rl_outstream}.
+@end deftypefun
+
+@deftypefun {const char **} rl_funmap_names (void)
+Return a NULL terminated array of known function names. The array is
+sorted. The array itself is allocated, but not the strings inside. You
+should free the array, but not the pointers, using @code{free} or
+@code{rl_free} when you are done.
+@end deftypefun
+
+@deftypefun int rl_add_funmap_entry (const char *name, rl_command_func_t *function)
+Add @var{name} to the list of bindable Readline command names, and make
+@var{function} the function to be called when @var{name} is invoked.
+@end deftypefun
+
+@node Allowing Undoing
+@subsection Allowing Undoing
+
+Supporting the undo command is a painless thing, and makes your
+functions much more useful. It is certainly easy to try
+something if you know you can undo it.
+
+If your function simply inserts text once, or deletes text once, and
+uses @code{rl_insert_text()} or @code{rl_delete_text()} to do it, then
+undoing is already done for you automatically.
+
+If you do multiple insertions or multiple deletions, or any combination
+of these operations, you should group them together into one operation.
+This is done with @code{rl_begin_undo_group()} and
+@code{rl_end_undo_group()}.
+
+The types of events that can be undone are:
+
+@smallexample
+enum undo_code @{ UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END @};
+@end smallexample
+
+Notice that @code{UNDO_DELETE} means to insert some text, and
+@code{UNDO_INSERT} means to delete some text. That is, the undo code
+tells what to undo, not how to undo it. @code{UNDO_BEGIN} and
+@code{UNDO_END} are tags added by @code{rl_begin_undo_group()} and
+@code{rl_end_undo_group()}.
+
+@deftypefun int rl_begin_undo_group (void)
+Begins saving undo information in a group construct. The undo
+information usually comes from calls to @code{rl_insert_text()} and
+@code{rl_delete_text()}, but could be the result of calls to
+@code{rl_add_undo()}.
+@end deftypefun
+
+@deftypefun int rl_end_undo_group (void)
+Closes the current undo group started with @code{rl_begin_undo_group
+()}. There should be one call to @code{rl_end_undo_group()}
+for each call to @code{rl_begin_undo_group()}.
+@end deftypefun
+
+@deftypefun void rl_add_undo (enum undo_code what, int start, int end, char *text)
+Remember how to undo an event (according to @var{what}). The affected
+text runs from @var{start} to @var{end}, and encompasses @var{text}.
+@end deftypefun
+
+@deftypefun void rl_free_undo_list (void)
+Free the existing undo list.
+@end deftypefun
+
+@deftypefun int rl_do_undo (void)
+Undo the first thing on the undo list. Returns @code{0} if there was
+nothing to undo, non-zero if something was undone.
+@end deftypefun
+
+Finally, if you neither insert nor delete text, but directly modify the
+existing text (e.g., change its case), call @code{rl_modifying()}
+once, just before you modify the text. You must supply the indices of
+the text range that you are going to modify.
+
+@deftypefun int rl_modifying (int start, int end)
+Tell Readline to save the text between @var{start} and @var{end} as a
+single undo unit. It is assumed that you will subsequently modify
+that text.
+@end deftypefun
+
+@node Redisplay
+@subsection Redisplay
+
+@deftypefun void rl_redisplay (void)
+Change what's displayed on the screen to reflect the current contents
+of @code{rl_line_buffer}.
+@end deftypefun
+
+@deftypefun int rl_forced_update_display (void)
+Force the line to be updated and redisplayed, whether or not
+Readline thinks the screen display is correct.
+@end deftypefun
+
+@deftypefun int rl_on_new_line (void)
+Tell the update functions that we have moved onto a new (empty) line,
+usually after ouputting a newline.
+@end deftypefun
+
+@deftypefun int rl_on_new_line_with_prompt (void)
+Tell the update functions that we have moved onto a new line, with
+@var{rl_prompt} already displayed.
+This could be used by applications that want to output the prompt string
+themselves, but still need Readline to know the prompt string length for
+redisplay.
+It should be used after setting @var{rl_already_prompted}.
+@end deftypefun
+
+@deftypefun int rl_reset_line_state (void)
+Reset the display state to a clean state and redisplay the current line
+starting on a new line.
+@end deftypefun
+
+@deftypefun int rl_crlf (void)
+Move the cursor to the start of the next screen line.
+@end deftypefun
+
+@deftypefun int rl_show_char (int c)
+Display character @var{c} on @code{rl_outstream}.
+If Readline has not been set to display meta characters directly, this
+will convert meta characters to a meta-prefixed key sequence.
+This is intended for use by applications which wish to do their own
+redisplay.
+@end deftypefun
+
+@deftypefun int rl_message (const char *, @dots{})
+The arguments are a format string as would be supplied to @code{printf},
+possibly containing conversion specifications such as @samp{%d}, and
+any additional arguments necessary to satisfy the conversion specifications.
+The resulting string is displayed in the @dfn{echo area}. The echo area
+is also used to display numeric arguments and search strings.
+You should call @code{rl_save_prompt} to save the prompt information
+before calling this function.
+@end deftypefun
+
+@deftypefun int rl_clear_message (void)
+Clear the message in the echo area. If the prompt was saved with a call to
+@code{rl_save_prompt} before the last call to @code{rl_message},
+call @code{rl_restore_prompt} before calling this function.
+@end deftypefun
+
+@deftypefun void rl_save_prompt (void)
+Save the local Readline prompt display state in preparation for
+displaying a new message in the message area with @code{rl_message()}.
+@end deftypefun
+
+@deftypefun void rl_restore_prompt (void)
+Restore the local Readline prompt display state saved by the most
+recent call to @code{rl_save_prompt}.
+if @code{rl_save_prompt} was called to save the prompt before a call
+to @code{rl_message}, this function should be called before the
+corresponding call to @code{rl_clear_message}.
+@end deftypefun
+
+@deftypefun int rl_expand_prompt (char *prompt)
+Expand any special character sequences in @var{prompt} and set up the
+local Readline prompt redisplay variables.
+This function is called by @code{readline()}. It may also be called to
+expand the primary prompt if the @code{rl_on_new_line_with_prompt()}
+function or @code{rl_already_prompted} variable is used.
+It returns the number of visible characters on the last line of the
+(possibly multi-line) prompt.
+Applications may indicate that the prompt contains characters that take
+up no physical screen space when displayed by bracketing a sequence of
+such characters with the special markers @code{RL_PROMPT_START_IGNORE}
+and @code{RL_PROMPT_END_IGNORE} (declared in @file{readline.h}. This may
+be used to embed terminal-specific escape sequences in prompts.
+@end deftypefun
+
+@deftypefun int rl_set_prompt (const char *prompt)
+Make Readline use @var{prompt} for subsequent redisplay. This calls
+@code{rl_expand_prompt()} to expand the prompt and sets @code{rl_prompt}
+to the result.
+@end deftypefun
+
+@node Modifying Text
+@subsection Modifying Text
+
+@deftypefun int rl_insert_text (const char *text)
+Insert @var{text} into the line at the current cursor position.
+Returns the number of characters inserted.
+@end deftypefun
+
+@deftypefun int rl_delete_text (int start, int end)
+Delete the text between @var{start} and @var{end} in the current line.
+Returns the number of characters deleted.
+@end deftypefun
+
+@deftypefun {char *} rl_copy_text (int start, int end)
+Return a copy of the text between @var{start} and @var{end} in
+the current line.
+@end deftypefun
+
+@deftypefun int rl_kill_text (int start, int end)
+Copy the text between @var{start} and @var{end} in the current line
+to the kill ring, appending or prepending to the last kill if the
+last command was a kill command. The text is deleted.
+If @var{start} is less than @var{end},
+the text is appended, otherwise prepended. If the last command was
+not a kill, a new kill ring slot is used.
+@end deftypefun
+
+@deftypefun int rl_push_macro_input (char *macro)
+Cause @var{macro} to be inserted into the line, as if it had been invoked
+by a key bound to a macro. Not especially useful; use
+@code{rl_insert_text()} instead.
+@end deftypefun
+
+@node Character Input
+@subsection Character Input
+
+@deftypefun int rl_read_key (void)
+Return the next character available from Readline's current input stream.
+This handles input inserted into
+the input stream via @var{rl_pending_input} (@pxref{Readline Variables})
+and @code{rl_stuff_char()}, macros, and characters read from the keyboard.
+While waiting for input, this function will call any function assigned to
+the @code{rl_event_hook} variable.
+@end deftypefun
+
+@deftypefun int rl_getc (FILE *stream)
+Return the next character available from @var{stream}, which is assumed to
+be the keyboard.
+@end deftypefun
+
+@deftypefun int rl_stuff_char (int c)
+Insert @var{c} into the Readline input stream. It will be "read"
+before Readline attempts to read characters from the terminal with
+@code{rl_read_key()}. Up to 512 characters may be pushed back.
+@code{rl_stuff_char} returns 1 if the character was successfully inserted;
+0 otherwise.
+@end deftypefun
+
+@deftypefun int rl_execute_next (int c)
+Make @var{c} be the next command to be executed when @code{rl_read_key()}
+is called. This sets @var{rl_pending_input}.
+@end deftypefun
+
+@deftypefun int rl_clear_pending_input (void)
+Unset @var{rl_pending_input}, effectively negating the effect of any
+previous call to @code{rl_execute_next()}. This works only if the
+pending input has not already been read with @code{rl_read_key()}.
+@end deftypefun
+
+@deftypefun int rl_set_keyboard_input_timeout (int u)
+While waiting for keyboard input in @code{rl_read_key()}, Readline will
+wait for @var{u} microseconds for input before calling any function
+assigned to @code{rl_event_hook}. @var{u} must be greater than or equal
+to zero (a zero-length timeout is equivalent to a poll).
+The default waiting period is one-tenth of a second.
+Returns the old timeout value.
+@end deftypefun
+
+@node Terminal Management
+@subsection Terminal Management
+
+@deftypefun void rl_prep_terminal (int meta_flag)
+Modify the terminal settings for Readline's use, so @code{readline()}
+can read a single character at a time from the keyboard.
+The @var{meta_flag} argument should be non-zero if Readline should
+read eight-bit input.
+@end deftypefun
+
+@deftypefun void rl_deprep_terminal (void)
+Undo the effects of @code{rl_prep_terminal()}, leaving the terminal in
+the state in which it was before the most recent call to
+@code{rl_prep_terminal()}.
+@end deftypefun
+
+@deftypefun void rl_tty_set_default_bindings (Keymap kmap)
+Read the operating system's terminal editing characters (as would be
+displayed by @code{stty}) to their Readline equivalents.
+The bindings are performed in @var{kmap}.
+@end deftypefun
+
+@deftypefun void rl_tty_unset_default_bindings (Keymap kmap)
+Reset the bindings manipulated by @code{rl_tty_set_default_bindings} so
+that the terminal editing characters are bound to @code{rl_insert}.
+The bindings are performed in @var{kmap}.
+@end deftypefun
+
+@deftypefun int rl_reset_terminal (const char *terminal_name)
+Reinitialize Readline's idea of the terminal settings using
+@var{terminal_name} as the terminal type (e.g., @code{vt100}).
+If @var{terminal_name} is @code{NULL}, the value of the @code{TERM}
+environment variable is used.
+@end deftypefun
+
+@node Utility Functions
+@subsection Utility Functions
+
+@deftypefun int rl_save_state (struct readline_state *sp)
+Save a snapshot of Readline's internal state to @var{sp}.
+The contents of the @var{readline_state} structure are documented
+in @file{readline.h}.
+The caller is responsible for allocating the structure.
+@end deftypefun
+
+@deftypefun int rl_restore_state (struct readline_state *sp)
+Restore Readline's internal state to that stored in @var{sp}, which must
+have been saved by a call to @code{rl_save_state}.
+The contents of the @var{readline_state} structure are documented
+in @file{readline.h}.
+The caller is responsible for freeing the structure.
+@end deftypefun
+
+@deftypefun void rl_free (void *mem)
+Deallocate the memory pointed to by @var{mem}. @var{mem} must have been
+allocated by @code{malloc}.
+@end deftypefun
+
+@deftypefun void rl_replace_line (const char *text, int clear_undo)
+Replace the contents of @code{rl_line_buffer} with @var{text}.
+The point and mark are preserved, if possible.
+If @var{clear_undo} is non-zero, the undo list associated with the
+current line is cleared.
+@end deftypefun
+
+@deftypefun void rl_extend_line_buffer (int len)
+Ensure that @code{rl_line_buffer} has enough space to hold @var{len}
+characters, possibly reallocating it if necessary.
+@end deftypefun
+
+@deftypefun int rl_initialize (void)
+Initialize or re-initialize Readline's internal state.
+It's not strictly necessary to call this; @code{readline()} calls it before
+reading any input.
+@end deftypefun
+
+@deftypefun int rl_ding (void)
+Ring the terminal bell, obeying the setting of @code{bell-style}.
+@end deftypefun
+
+@deftypefun int rl_alphabetic (int c)
+Return 1 if @var{c} is an alphabetic character.
+@end deftypefun
+
+@deftypefun void rl_display_match_list (char **matches, int len, int max)
+A convenience function for displaying a list of strings in
+columnar format on Readline's output stream. @code{matches} is the list
+of strings, in argv format, such as a list of completion matches.
+@code{len} is the number of strings in @code{matches}, and @code{max}
+is the length of the longest string in @code{matches}. This function uses
+the setting of @code{print-completions-horizontally} to select how the
+matches are displayed (@pxref{Readline Init File Syntax}).
+@end deftypefun
+
+The following are implemented as macros, defined in @code{chardefs.h}.
+Applications should refrain from using them.
+
+@deftypefun int _rl_uppercase_p (int c)
+Return 1 if @var{c} is an uppercase alphabetic character.
+@end deftypefun
+
+@deftypefun int _rl_lowercase_p (int c)
+Return 1 if @var{c} is a lowercase alphabetic character.
+@end deftypefun
+
+@deftypefun int _rl_digit_p (int c)
+Return 1 if @var{c} is a numeric character.
+@end deftypefun
+
+@deftypefun int _rl_to_upper (int c)
+If @var{c} is a lowercase alphabetic character, return the corresponding
+uppercase character.
+@end deftypefun
+
+@deftypefun int _rl_to_lower (int c)
+If @var{c} is an uppercase alphabetic character, return the corresponding
+lowercase character.
+@end deftypefun
+
+@deftypefun int _rl_digit_value (int c)
+If @var{c} is a number, return the value it represents.
+@end deftypefun
+
+@node Miscellaneous Functions
+@subsection Miscellaneous Functions
+
+@deftypefun int rl_macro_bind (const char *keyseq, const char *macro, Keymap map)
+Bind the key sequence @var{keyseq} to invoke the macro @var{macro}.
+The binding is performed in @var{map}. When @var{keyseq} is invoked, the
+@var{macro} will be inserted into the line. This function is deprecated;
+use @code{rl_generic_bind()} instead.
+@end deftypefun
+
+@deftypefun void rl_macro_dumper (int readable)
+Print the key sequences bound to macros and their values, using
+the current keymap, to @code{rl_outstream}.
+If @var{readable} is non-zero, the list is formatted in such a way
+that it can be made part of an @code{inputrc} file and re-read.
+@end deftypefun
+
+@deftypefun int rl_variable_bind (const char *variable, const char *value)
+Make the Readline variable @var{variable} have @var{value}.
+This behaves as if the readline command
+@samp{set @var{variable} @var{value}} had been executed in an @code{inputrc}
+file (@pxref{Readline Init File Syntax}).
+@end deftypefun
+
+@deftypefun {char *} rl_variable_value (const char *variable)
+Return a string representing the value of the Readline variable @var{variable}.
+For boolean variables, this string is either @samp{on} or @samp{off}.
+@end deftypefun
+
+@deftypefun void rl_variable_dumper (int readable)
+Print the readline variable names and their current values
+to @code{rl_outstream}.
+If @var{readable} is non-zero, the list is formatted in such a way
+that it can be made part of an @code{inputrc} file and re-read.
+@end deftypefun
+
+@deftypefun int rl_set_paren_blink_timeout (int u)
+Set the time interval (in microseconds) that Readline waits when showing
+a balancing character when @code{blink-matching-paren} has been enabled.
+@end deftypefun
+
+@deftypefun {char *} rl_get_termcap (const char *cap)
+Retrieve the string value of the termcap capability @var{cap}.
+Readline fetches the termcap entry for the current terminal name and
+uses those capabilities to move around the screen line and perform other
+terminal-specific operations, like erasing a line. Readline does not
+use all of a terminal's capabilities, and this function will return
+values for only those capabilities Readline uses.
+@end deftypefun
+
+@node Alternate Interface
+@subsection Alternate Interface
+
+An alternate interface is available to plain @code{readline()}. Some
+applications need to interleave keyboard I/O with file, device, or
+window system I/O, typically by using a main loop to @code{select()}
+on various file descriptors. To accomodate this need, readline can
+also be invoked as a `callback' function from an event loop. There
+are functions available to make this easy.
+
+@deftypefun void rl_callback_handler_install (const char *prompt, rl_vcpfunc_t *lhandler)
+Set up the terminal for readline I/O and display the initial
+expanded value of @var{prompt}. Save the value of @var{lhandler} to
+use as a function to call when a complete line of input has been entered.
+The function takes the text of the line as an argument.
+@end deftypefun
+
+@deftypefun void rl_callback_read_char (void)
+Whenever an application determines that keyboard input is available, it
+should call @code{rl_callback_read_char()}, which will read the next
+character from the current input source.
+If that character completes the line, @code{rl_callback_read_char} will
+invoke the @var{lhandler} function saved by @code{rl_callback_handler_install}
+to process the line.
+Before calling the @var{lhandler} function, the terminal settings are
+reset to the values they had before calling
+@code{rl_callback_handler_install}.
+If the @var{lhandler} function returns,
+the terminal settings are modified for Readline's use again.
+@code{EOF} is indicated by calling @var{lhandler} with a
+@code{NULL} line.
+@end deftypefun
+
+@deftypefun void rl_callback_handler_remove (void)
+Restore the terminal to its initial state and remove the line handler.
+This may be called from within a callback as well as independently.
+If the @var{lhandler} installed by @code{rl_callback_handler_install}
+does not exit the program, either this function or the function referred
+to by the value of @code{rl_deprep_term_function} should be called before
+the program exits to reset the terminal settings.
+@end deftypefun
+
+@node A Readline Example
+@subsection A Readline Example
+
+Here is a function which changes lowercase characters to their uppercase
+equivalents, and uppercase characters to lowercase. If
+this function was bound to @samp{M-c}, then typing @samp{M-c} would
+change the case of the character under point. Typing @samp{M-1 0 M-c}
+would change the case of the following 10 characters, leaving the cursor on
+the last character changed.
+
+@example
+/* Invert the case of the COUNT following characters. */
+int
+invert_case_line (count, key)
+ int count, key;
+@{
+ register int start, end, i;
+
+ start = rl_point;
+
+ if (rl_point >= rl_end)
+ return (0);
+
+ if (count < 0)
+ @{
+ direction = -1;
+ count = -count;
+ @}
+ else
+ direction = 1;
+
+ /* Find the end of the range to modify. */
+ end = start + (count * direction);
+
+ /* Force it to be within range. */
+ if (end > rl_end)
+ end = rl_end;
+ else if (end < 0)
+ end = 0;
+
+ if (start == end)
+ return (0);
+
+ if (start > end)
+ @{
+ int temp = start;
+ start = end;
+ end = temp;
+ @}
+
+ /* Tell readline that we are modifying the line,
+ so it will save the undo information. */
+ rl_modifying (start, end);
+
+ for (i = start; i != end; i++)
+ @{
+ if (_rl_uppercase_p (rl_line_buffer[i]))
+ rl_line_buffer[i] = _rl_to_lower (rl_line_buffer[i]);
+ else if (_rl_lowercase_p (rl_line_buffer[i]))
+ rl_line_buffer[i] = _rl_to_upper (rl_line_buffer[i]);
+ @}
+ /* Move point to on top of the last character changed. */
+ rl_point = (direction == 1) ? end - 1 : start;
+ return (0);
+@}
+@end example
+
+@node Readline Signal Handling
+@section Readline Signal Handling
+
+Signals are asynchronous events sent to a process by the Unix kernel,
+sometimes on behalf of another process. They are intended to indicate
+exceptional events, like a user pressing the interrupt key on his terminal,
+or a network connection being broken. There is a class of signals that can
+be sent to the process currently reading input from the keyboard. Since
+Readline changes the terminal attributes when it is called, it needs to
+perform special processing when such a signal is received in order to
+restore the terminal to a sane state, or provide application writers with
+functions to do so manually.
+
+Readline contains an internal signal handler that is installed for a
+number of signals (@code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM},
+@code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN}, and @code{SIGTTOU}).
+When one of these signals is received, the signal handler
+will reset the terminal attributes to those that were in effect before
+@code{readline()} was called, reset the signal handling to what it was
+before @code{readline()} was called, and resend the signal to the calling
+application.
+If and when the calling application's signal handler returns, Readline
+will reinitialize the terminal and continue to accept input.
+When a @code{SIGINT} is received, the Readline signal handler performs
+some additional work, which will cause any partially-entered line to be
+aborted (see the description of @code{rl_free_line_state()} below).
+
+There is an additional Readline signal handler, for @code{SIGWINCH}, which
+the kernel sends to a process whenever the terminal's size changes (for
+example, if a user resizes an @code{xterm}). The Readline @code{SIGWINCH}
+handler updates Readline's internal screen size information, and then calls
+any @code{SIGWINCH} signal handler the calling application has installed.
+Readline calls the application's @code{SIGWINCH} signal handler without
+resetting the terminal to its original state. If the application's signal
+handler does more than update its idea of the terminal size and return (for
+example, a @code{longjmp} back to a main processing loop), it @emph{must}
+call @code{rl_cleanup_after_signal()} (described below), to restore the
+terminal state.
+
+Readline provides two variables that allow application writers to
+control whether or not it will catch certain signals and act on them
+when they are received. It is important that applications change the
+values of these variables only when calling @code{readline()}, not in
+a signal handler, so Readline's internal signal state is not corrupted.
+
+@deftypevar int rl_catch_signals
+If this variable is non-zero, Readline will install signal handlers for
+@code{SIGINT}, @code{SIGQUIT}, @code{SIGTERM}, @code{SIGALRM},
+@code{SIGTSTP}, @code{SIGTTIN}, and @code{SIGTTOU}.
+
+The default value of @code{rl_catch_signals} is 1.
+@end deftypevar
+
+@deftypevar int rl_catch_sigwinch
+If this variable is non-zero, Readline will install a signal handler for
+@code{SIGWINCH}.
+
+The default value of @code{rl_catch_sigwinch} is 1.
+@end deftypevar
+
+If an application does not wish to have Readline catch any signals, or
+to handle signals other than those Readline catches (@code{SIGHUP},
+for example),
+Readline provides convenience functions to do the necessary terminal
+and internal state cleanup upon receipt of a signal.
+
+@deftypefun void rl_cleanup_after_signal (void)
+This function will reset the state of the terminal to what it was before
+@code{readline()} was called, and remove the Readline signal handlers for
+all signals, depending on the values of @code{rl_catch_signals} and
+@code{rl_catch_sigwinch}.
+@end deftypefun
+
+@deftypefun void rl_free_line_state (void)
+This will free any partial state associated with the current input line
+(undo information, any partial history entry, any partially-entered
+keyboard macro, and any partially-entered numeric argument). This
+should be called before @code{rl_cleanup_after_signal()}. The
+Readline signal handler for @code{SIGINT} calls this to abort the
+current input line.
+@end deftypefun
+
+@deftypefun void rl_reset_after_signal (void)
+This will reinitialize the terminal and reinstall any Readline signal
+handlers, depending on the values of @code{rl_catch_signals} and
+@code{rl_catch_sigwinch}.
+@end deftypefun
+
+If an application does not wish Readline to catch @code{SIGWINCH}, it may
+call @code{rl_resize_terminal()} or @code{rl_set_screen_size()} to force
+Readline to update its idea of the terminal size when a @code{SIGWINCH}
+is received.
+
+@deftypefun void rl_echo_signal_char (int sig)
+If an application wishes to install its own signal handlers, but still
+have readline display characters that generate signals, calling this
+function with @var{sig} set to @code{SIGINT}, @code{SIGQUIT}, or
+@code{SIGTSTP} will display the character generating that signal.
+@end deftypefun
+
+@deftypefun void rl_resize_terminal (void)
+Update Readline's internal screen size by reading values from the kernel.
+@end deftypefun
+
+@deftypefun void rl_set_screen_size (int rows, int cols)
+Set Readline's idea of the terminal size to @var{rows} rows and
+@var{cols} columns. If either @var{rows} or @var{columns} is less than
+or equal to 0, Readline's idea of that terminal dimension is unchanged.
+@end deftypefun
+
+If an application does not want to install a @code{SIGWINCH} handler, but
+is still interested in the screen dimensions, Readline's idea of the screen
+size may be queried.
+
+@deftypefun void rl_get_screen_size (int *rows, int *cols)
+Return Readline's idea of the terminal's size in the
+variables pointed to by the arguments.
+@end deftypefun
+
+@deftypefun void rl_reset_screen_size (void)
+Cause Readline to reobtain the screen size and recalculate its dimensions.
+@end deftypefun
+
+The following functions install and remove Readline's signal handlers.
+
+@deftypefun int rl_set_signals (void)
+Install Readline's signal handler for @code{SIGINT}, @code{SIGQUIT},
+@code{SIGTERM}, @code{SIGALRM}, @code{SIGTSTP}, @code{SIGTTIN},
+@code{SIGTTOU}, and @code{SIGWINCH}, depending on the values of
+@code{rl_catch_signals} and @code{rl_catch_sigwinch}.
+@end deftypefun
+
+@deftypefun int rl_clear_signals (void)
+Remove all of the Readline signal handlers installed by
+@code{rl_set_signals()}.
+@end deftypefun
+
+@node Custom Completers
+@section Custom Completers
+@cindex application-specific completion functions
+
+Typically, a program that reads commands from the user has a way of
+disambiguating commands and data. If your program is one of these, then
+it can provide completion for commands, data, or both.
+The following sections describe how your program and Readline
+cooperate to provide this service.
+
+@menu
+* How Completing Works:: The logic used to do completion.
+* Completion Functions:: Functions provided by Readline.
+* Completion Variables:: Variables which control completion.
+* A Short Completion Example:: An example of writing completer subroutines.
+@end menu
+
+@node How Completing Works
+@subsection How Completing Works
+
+In order to complete some text, the full list of possible completions
+must be available. That is, it is not possible to accurately
+expand a partial word without knowing all of the possible words
+which make sense in that context. The Readline library provides
+the user interface to completion, and two of the most common
+completion functions: filename and username. For completing other types
+of text, you must write your own completion function. This section
+describes exactly what such functions must do, and provides an example.
+
+There are three major functions used to perform completion:
+
+@enumerate
+@item
+The user-interface function @code{rl_complete()}. This function is
+called with the same arguments as other bindable Readline functions:
+@var{count} and @var{invoking_key}.
+It isolates the word to be completed and calls
+@code{rl_completion_matches()} to generate a list of possible completions.
+It then either lists the possible completions, inserts the possible
+completions, or actually performs the
+completion, depending on which behavior is desired.
+
+@item
+The internal function @code{rl_completion_matches()} uses an
+application-supplied @dfn{generator} function to generate the list of
+possible matches, and then returns the array of these matches.
+The caller should place the address of its generator function in
+@code{rl_completion_entry_function}.
+
+@item
+The generator function is called repeatedly from
+@code{rl_completion_matches()}, returning a string each time. The
+arguments to the generator function are @var{text} and @var{state}.
+@var{text} is the partial word to be completed. @var{state} is zero the
+first time the function is called, allowing the generator to perform
+any necessary initialization, and a positive non-zero integer for
+each subsequent call. The generator function returns
+@code{(char *)NULL} to inform @code{rl_completion_matches()} that there are
+no more possibilities left. Usually the generator function computes the
+list of possible completions when @var{state} is zero, and returns them
+one at a time on subsequent calls. Each string the generator function
+returns as a match must be allocated with @code{malloc()}; Readline
+frees the strings when it has finished with them.
+Such a generator function is referred to as an
+@dfn{application-specific completion function}.
+
+@end enumerate
+
+@deftypefun int rl_complete (int ignore, int invoking_key)
+Complete the word at or before point. You have supplied the function
+that does the initial simple matching selection algorithm (see
+@code{rl_completion_matches()}). The default is to do filename completion.
+@end deftypefun
+
+@deftypevar {rl_compentry_func_t *} rl_completion_entry_function
+This is a pointer to the generator function for
+@code{rl_completion_matches()}.
+If the value of @code{rl_completion_entry_function} is
+@code{NULL} then the default filename generator
+function, @code{rl_filename_completion_function()}, is used.
+An @dfn{application-specific completion function} is a function whose
+address is assigned to @code{rl_completion_entry_function} and whose
+return values are used to generate possible completions.
+@end deftypevar
+
+@node Completion Functions
+@subsection Completion Functions
+
+Here is the complete list of callable completion functions present in
+Readline.
+
+@deftypefun int rl_complete_internal (int what_to_do)
+Complete the word at or before point. @var{what_to_do} says what to do
+with the completion. A value of @samp{?} means list the possible
+completions. @samp{TAB} means do standard completion. @samp{*} means
+insert all of the possible completions. @samp{!} means to display
+all of the possible completions, if there is more than one, as well as
+performing partial completion. @samp{@@} is similar to @samp{!}, but
+possible completions are not listed if the possible completions share
+a common prefix.
+@end deftypefun
+
+@deftypefun int rl_complete (int ignore, int invoking_key)
+Complete the word at or before point. You have supplied the function
+that does the initial simple matching selection algorithm (see
+@code{rl_completion_matches()} and @code{rl_completion_entry_function}).
+The default is to do filename
+completion. This calls @code{rl_complete_internal()} with an
+argument depending on @var{invoking_key}.
+@end deftypefun
+
+@deftypefun int rl_possible_completions (int count, int invoking_key)
+List the possible completions. See description of @code{rl_complete
+()}. This calls @code{rl_complete_internal()} with an argument of
+@samp{?}.
+@end deftypefun
+
+@deftypefun int rl_insert_completions (int count, int invoking_key)
+Insert the list of possible completions into the line, deleting the
+partially-completed word. See description of @code{rl_complete()}.
+This calls @code{rl_complete_internal()} with an argument of @samp{*}.
+@end deftypefun
+
+@deftypefun int rl_completion_mode (rl_command_func_t *cfunc)
+Returns the apppriate value to pass to @code{rl_complete_internal()}
+depending on whether @var{cfunc} was called twice in succession and
+the values of the @code{show-all-if-ambiguous} and
+@code{show-all-if-unmodified} variables.
+Application-specific completion functions may use this function to present
+the same interface as @code{rl_complete()}.
+@end deftypefun
+
+@deftypefun {char **} rl_completion_matches (const char *text, rl_compentry_func_t *entry_func)
+Returns an array of strings which is a list of completions for
+@var{text}. If there are no completions, returns @code{NULL}.
+The first entry in the returned array is the substitution for @var{text}.
+The remaining entries are the possible completions. The array is
+terminated with a @code{NULL} pointer.
+
+@var{entry_func} is a function of two args, and returns a
+@code{char *}. The first argument is @var{text}. The second is a
+state argument; it is zero on the first call, and non-zero on subsequent
+calls. @var{entry_func} returns a @code{NULL} pointer to the caller
+when there are no more matches.
+@end deftypefun
+
+@deftypefun {char *} rl_filename_completion_function (const char *text, int state)
+A generator function for filename completion in the general case.
+@var{text} is a partial filename.
+The Bash source is a useful reference for writing application-specific
+completion functions (the Bash completion functions call this and other
+Readline functions).
+@end deftypefun
+
+@deftypefun {char *} rl_username_completion_function (const char *text, int state)
+A completion generator for usernames. @var{text} contains a partial
+username preceded by a random character (usually @samp{~}). As with all
+completion generators, @var{state} is zero on the first call and non-zero
+for subsequent calls.
+@end deftypefun
+
+@node Completion Variables
+@subsection Completion Variables
+
+@deftypevar {rl_compentry_func_t *} rl_completion_entry_function
+A pointer to the generator function for @code{rl_completion_matches()}.
+@code{NULL} means to use @code{rl_filename_completion_function()},
+the default filename completer.
+@end deftypevar
+
+@deftypevar {rl_completion_func_t *} rl_attempted_completion_function
+A pointer to an alternative function to create matches.
+The function is called with @var{text}, @var{start}, and @var{end}.
+@var{start} and @var{end} are indices in @code{rl_line_buffer} defining
+the boundaries of @var{text}, which is a character string.
+If this function exists and returns @code{NULL}, or if this variable is
+set to @code{NULL}, then @code{rl_complete()} will call the value of
+@code{rl_completion_entry_function} to generate matches, otherwise the
+array of strings returned will be used.
+If this function sets the @code{rl_attempted_completion_over}
+variable to a non-zero value, Readline will not perform its default
+completion even if this function returns no matches.
+@end deftypevar
+
+@deftypevar {rl_quote_func_t *} rl_filename_quoting_function
+A pointer to a function that will quote a filename in an
+application-specific fashion. This is called if filename completion is being
+attempted and one of the characters in @code{rl_filename_quote_characters}
+appears in a completed filename. The function is called with
+@var{text}, @var{match_type}, and @var{quote_pointer}. The @var{text}
+is the filename to be quoted. The @var{match_type} is either
+@code{SINGLE_MATCH}, if there is only one completion match, or
+@code{MULT_MATCH}. Some functions use this to decide whether or not to
+insert a closing quote character. The @var{quote_pointer} is a pointer
+to any opening quote character the user typed. Some functions choose
+to reset this character.
+@end deftypevar
+
+@deftypevar {rl_dequote_func_t *} rl_filename_dequoting_function
+A pointer to a function that will remove application-specific quoting
+characters from a filename before completion is attempted, so those
+characters do not interfere with matching the text against names in
+the filesystem. It is called with @var{text}, the text of the word
+to be dequoted, and @var{quote_char}, which is the quoting character
+that delimits the filename (usually @samp{'} or @samp{"}). If
+@var{quote_char} is zero, the filename was not in an embedded string.
+@end deftypevar
+
+@deftypevar {rl_linebuf_func_t *} rl_char_is_quoted_p
+A pointer to a function to call that determines whether or not a specific
+character in the line buffer is quoted, according to whatever quoting
+mechanism the program calling Readline uses. The function is called with
+two arguments: @var{text}, the text of the line, and @var{index}, the
+index of the character in the line. It is used to decide whether a
+character found in @code{rl_completer_word_break_characters} should be
+used to break words for the completer.
+@end deftypevar
+
+@deftypevar {rl_compignore_func_t *} rl_ignore_some_completions_function
+This function, if defined, is called by the completer when real filename
+completion is done, after all the matching names have been generated.
+It is passed a @code{NULL} terminated array of matches.
+The first element (@code{matches[0]}) is the
+maximal substring common to all matches. This function can
+re-arrange the list of matches as required, but each element deleted
+from the array must be freed.
+@end deftypevar
+
+@deftypevar {rl_icppfunc_t *} rl_directory_completion_hook
+This function, if defined, is allowed to modify the directory portion
+of filenames Readline completes. It is called with the address of a
+string (the current directory name) as an argument, and may modify that string.
+If the string is replaced with a new string, the old value should be freed.
+Any modified directory name should have a trailing slash.
+The modified value will be displayed as part of the completion, replacing
+the directory portion of the pathname the user typed.
+It returns an integer that should be non-zero if the function modifies
+its directory argument.
+It could be used to expand symbolic links or shell variables in pathnames.
+At the least, even if no other expansion is performed, this function should
+remove any quote characters from the directory name, because its result will
+be passed directly to @code{opendir()}.
+@end deftypevar
+
+@ignore
+@deftypevar extern rl_icppfunc_t *rl_directory_rewrite_hook;
+If non-zero, this is the address of a function to call when completing
+a directory name. This function takes the address of the directory name
+to be modified as an argument. Unlike @code{rl_directory_completion_hook},
+it only modifies the directory name used in @code{opendir}, not what is
+displayed when the possible completions are printed or inserted. It is
+called before rl_directory_completion_hook.
+
+I'm not happy with how this worksyet, so it's undocumented.
+@end deftypevar
+@end ignore
+
+@deftypevar {rl_dequote_func_t *} rl_filename_rewrite_hook
+If non-zero, this is the address of a function called when reading
+directory entries from the filesystem for completion and comparing
+them to the partial word to be completed. The function should
+perform any necesary application or system-specific conversion on
+the filename, such as converting between character sets or converting
+from a filesystem format to a character input format.
+The function takes two arguments: @var{fname}, the filename to be converted,
+and @var{fnlen}, its length in bytes.
+It must either return its first argument (if no conversion takes place)
+or the converted filename in newly-allocated memory. The converted
+form is used to compare against the word to be completed, and, if it
+matches, is added to the list of matches. Readline will free the
+allocated string.
+@end deftypevar
+
+@deftypevar {rl_compdisp_func_t *} rl_completion_display_matches_hook
+If non-zero, then this is the address of a function to call when
+completing a word would normally display the list of possible matches.
+This function is called in lieu of Readline displaying the list.
+It takes three arguments:
+(@code{char **}@var{matches}, @code{int} @var{num_matches}, @code{int} @var{max_length})
+where @var{matches} is the array of matching strings,
+@var{num_matches} is the number of strings in that array, and
+@var{max_length} is the length of the longest string in that array.
+Readline provides a convenience function, @code{rl_display_match_list},
+that takes care of doing the display to Readline's output stream. That
+function may be called from this hook.
+@end deftypevar
+
+@deftypevar {const char *} rl_basic_word_break_characters
+The basic list of characters that signal a break between words for the
+completer routine. The default value of this variable is the characters
+which break words for completion in Bash:
+@code{" \t\n\"\\'`@@$><=;|&@{("}.
+@end deftypevar
+
+@deftypevar {const char *} rl_basic_quote_characters
+A list of quote characters which can cause a word break.
+@end deftypevar
+
+@deftypevar {const char *} rl_completer_word_break_characters
+The list of characters that signal a break between words for
+@code{rl_complete_internal()}. The default list is the value of
+@code{rl_basic_word_break_characters}.
+@end deftypevar
+
+@deftypevar {rl_cpvfunc_t *} rl_completion_word_break_hook
+If non-zero, this is the address of a function to call when Readline is
+deciding where to separate words for word completion. It should return
+a character string like @code{rl_completer_word_break_characters} to be
+used to perform the current completion. The function may choose to set
+@code{rl_completer_word_break_characters} itself. If the function
+returns @code{NULL}, @code{rl_completer_word_break_characters} is used.
+@end deftypevar
+
+@deftypevar {const char *} rl_completer_quote_characters
+A list of characters which can be used to quote a substring of the line.
+Completion occurs on the entire substring, and within the substring
+@code{rl_completer_word_break_characters} are treated as any other character,
+unless they also appear within this list.
+@end deftypevar
+
+@deftypevar {const char *} rl_filename_quote_characters
+A list of characters that cause a filename to be quoted by the completer
+when they appear in a completed filename. The default is the null string.
+@end deftypevar
+
+@deftypevar {const char *} rl_special_prefixes
+The list of characters that are word break characters, but should be
+left in @var{text} when it is passed to the completion function.
+Programs can use this to help determine what kind of completing to do.
+For instance, Bash sets this variable to "$@@" so that it can complete
+shell variables and hostnames.
+@end deftypevar
+
+@deftypevar int rl_completion_query_items
+Up to this many items will be displayed in response to a
+possible-completions call. After that, readline asks the user if she is sure
+she wants to see them all. The default value is 100. A negative value
+indicates that Readline should never ask the user.
+@end deftypevar
+
+@deftypevar {int} rl_completion_append_character
+When a single completion alternative matches at the end of the command
+line, this character is appended to the inserted completion text. The
+default is a space character (@samp{ }). Setting this to the null
+character (@samp{\0}) prevents anything being appended automatically.
+This can be changed in application-specific completion functions to
+provide the ``most sensible word separator character'' according to
+an application-specific command line syntax specification.
+@end deftypevar
+
+@deftypevar int rl_completion_suppress_append
+If non-zero, @var{rl_completion_append_character} is not appended to
+matches at the end of the command line, as described above.
+It is set to 0 before any application-specific completion function
+is called, and may only be changed within such a function.
+@end deftypevar
+
+@deftypevar int rl_completion_quote_character
+When Readline is completing quoted text, as delimited by one of the
+characters in @var{rl_completer_quote_characters}, it sets this variable
+to the quoting character found.
+This is set before any application-specific completion function is called.
+@end deftypevar
+
+@deftypevar int rl_completion_suppress_quote
+If non-zero, Readline does not append a matching quote character when
+performing completion on a quoted string.
+It is set to 0 before any application-specific completion function
+is called, and may only be changed within such a function.
+@end deftypevar
+
+@deftypevar int rl_completion_found_quote
+When Readline is completing quoted text, it sets this variable
+to a non-zero value if the word being completed contains or is delimited
+by any quoting characters, including backslashes.
+This is set before any application-specific completion function is called.
+@end deftypevar
+
+@deftypevar int rl_completion_mark_symlink_dirs
+If non-zero, a slash will be appended to completed filenames that are
+symbolic links to directory names, subject to the value of the
+user-settable @var{mark-directories} variable.
+This variable exists so that application-specific completion functions
+can override the user's global preference (set via the
+@var{mark-symlinked-directories} Readline variable) if appropriate.
+This variable is set to the user's preference before any
+application-specific completion function is called, so unless that
+function modifies the value, the user's preferences are honored.
+@end deftypevar
+
+@deftypevar int rl_ignore_completion_duplicates
+If non-zero, then duplicates in the matches are removed.
+The default is 1.
+@end deftypevar
+
+@deftypevar int rl_filename_completion_desired
+Non-zero means that the results of the matches are to be treated as
+filenames. This is @emph{always} zero when completion is attempted,
+and can only be changed
+within an application-specific completion function. If it is set to a
+non-zero value by such a function, directory names have a slash appended
+and Readline attempts to quote completed filenames if they contain any
+characters in @code{rl_filename_quote_characters} and
+@code{rl_filename_quoting_desired} is set to a non-zero value.
+@end deftypevar
+
+@deftypevar int rl_filename_quoting_desired
+Non-zero means that the results of the matches are to be quoted using
+double quotes (or an application-specific quoting mechanism) if the
+completed filename contains any characters in
+@code{rl_filename_quote_chars}. This is @emph{always} non-zero
+when completion is attempted, and can only be changed within an
+application-specific completion function.
+The quoting is effected via a call to the function pointed to
+by @code{rl_filename_quoting_function}.
+@end deftypevar
+
+@deftypevar int rl_attempted_completion_over
+If an application-specific completion function assigned to
+@code{rl_attempted_completion_function} sets this variable to a non-zero
+value, Readline will not perform its default filename completion even
+if the application's completion function returns no matches.
+It should be set only by an application's completion function.
+@end deftypevar
+
+@deftypevar int rl_sort_completion_matches
+If an application sets this variable to 0, Readline will not sort the
+list of completions (which implies that it cannot remove any duplicate
+completions). The default value is 1, which means that Readline will
+sort the completions and, depending on the value of
+@code{rl_ignore_completion_duplicates}, will attempt to remove duplicate
+matches.
+@end deftypevar
+
+@deftypevar int rl_completion_type
+Set to a character describing the type of completion Readline is currently
+attempting; see the description of @code{rl_complete_internal()}
+(@pxref{Completion Functions}) for the list of characters.
+This is set to the appropriate value before any application-specific
+completion function is called, allowing such functions to present
+the same interface as @code{rl_complete()}.
+@end deftypevar
+
+@deftypevar int rl_completion_invoking_key
+Set to the final character in the key sequence that invoked one of the
+completion functions that call @code{rl_complete_internal()}. This is
+set to the appropriate value before any application-specific completion
+function is called.
+@end deftypevar
+
+@deftypevar int rl_inhibit_completion
+If this variable is non-zero, completion is inhibited. The completion
+character will be inserted as any other bound to @code{self-insert}.
+@end deftypevar
+
+@node A Short Completion Example
+@subsection A Short Completion Example
+
+Here is a small application demonstrating the use of the GNU Readline
+library. It is called @code{fileman}, and the source code resides in
+@file{examples/fileman.c}. This sample application provides
+completion of command names, line editing features, and access to the
+history list.
+
+@page
+@smallexample
+/* fileman.c -- A tiny application which demonstrates how to use the
+ GNU Readline library. This application interactively allows users
+ to manipulate files and their modes. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#ifdef HAVE_SYS_FILE_H
+# include <sys/file.h>
+#endif
+#include <sys/stat.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <errno.h>
+
+#if defined (HAVE_STRING_H)
+# include <string.h>
+#else /* !HAVE_STRING_H */
+# include <strings.h>
+#endif /* !HAVE_STRING_H */
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#include <time.h>
+
+#include <readline/readline.h>
+#include <readline/history.h>
+
+extern char *xmalloc PARAMS((size_t));
+
+/* The names of functions that actually do the manipulation. */
+int com_list PARAMS((char *));
+int com_view PARAMS((char *));
+int com_rename PARAMS((char *));
+int com_stat PARAMS((char *));
+int com_pwd PARAMS((char *));
+int com_delete PARAMS((char *));
+int com_help PARAMS((char *));
+int com_cd PARAMS((char *));
+int com_quit PARAMS((char *));
+
+/* A structure which contains information on the commands this program
+ can understand. */
+
+typedef struct @{
+ char *name; /* User printable name of the function. */
+ rl_icpfunc_t *func; /* Function to call to do the job. */
+ char *doc; /* Documentation for this function. */
+@} COMMAND;
+
+COMMAND commands[] = @{
+ @{ "cd", com_cd, "Change to directory DIR" @},
+ @{ "delete", com_delete, "Delete FILE" @},
+ @{ "help", com_help, "Display this text" @},
+ @{ "?", com_help, "Synonym for `help'" @},
+ @{ "list", com_list, "List files in DIR" @},
+ @{ "ls", com_list, "Synonym for `list'" @},
+ @{ "pwd", com_pwd, "Print the current working directory" @},
+ @{ "quit", com_quit, "Quit using Fileman" @},
+ @{ "rename", com_rename, "Rename FILE to NEWNAME" @},
+ @{ "stat", com_stat, "Print out statistics on FILE" @},
+ @{ "view", com_view, "View the contents of FILE" @},
+ @{ (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL @}
+@};
+
+/* Forward declarations. */
+char *stripwhite ();
+COMMAND *find_command ();
+
+/* The name of this program, as taken from argv[0]. */
+char *progname;
+
+/* When non-zero, this global means the user is done using this program. */
+int done;
+
+char *
+dupstr (s)
+ char *s;
+@{
+ char *r;
+
+ r = xmalloc (strlen (s) + 1);
+ strcpy (r, s);
+ return (r);
+@}
+
+main (argc, argv)
+ int argc;
+ char **argv;
+@{
+ char *line, *s;
+
+ progname = argv[0];
+
+ initialize_readline (); /* Bind our completer. */
+
+ /* Loop reading and executing lines until the user quits. */
+ for ( ; done == 0; )
+ @{
+ line = readline ("FileMan: ");
+
+ if (!line)
+ break;
+
+ /* Remove leading and trailing whitespace from the line.
+ Then, if there is anything left, add it to the history list
+ and execute it. */
+ s = stripwhite (line);
+
+ if (*s)
+ @{
+ add_history (s);
+ execute_line (s);
+ @}
+
+ free (line);
+ @}
+ exit (0);
+@}
+
+/* Execute a command line. */
+int
+execute_line (line)
+ char *line;
+@{
+ register int i;
+ COMMAND *command;
+ char *word;
+
+ /* Isolate the command word. */
+ i = 0;
+ while (line[i] && whitespace (line[i]))
+ i++;
+ word = line + i;
+
+ while (line[i] && !whitespace (line[i]))
+ i++;
+
+ if (line[i])
+ line[i++] = '\0';
+
+ command = find_command (word);
+
+ if (!command)
+ @{
+ fprintf (stderr, "%s: No such command for FileMan.\n", word);
+ return (-1);
+ @}
+
+ /* Get argument to command, if any. */
+ while (whitespace (line[i]))
+ i++;
+
+ word = line + i;
+
+ /* Call the function. */
+ return ((*(command->func)) (word));
+@}
+
+/* Look up NAME as the name of a command, and return a pointer to that
+ command. Return a NULL pointer if NAME isn't a command name. */
+COMMAND *
+find_command (name)
+ char *name;
+@{
+ register int i;
+
+ for (i = 0; commands[i].name; i++)
+ if (strcmp (name, commands[i].name) == 0)
+ return (&commands[i]);
+
+ return ((COMMAND *)NULL);
+@}
+
+/* Strip whitespace from the start and end of STRING. Return a pointer
+ into STRING. */
+char *
+stripwhite (string)
+ char *string;
+@{
+ register char *s, *t;
+
+ for (s = string; whitespace (*s); s++)
+ ;
+
+ if (*s == 0)
+ return (s);
+
+ t = s + strlen (s) - 1;
+ while (t > s && whitespace (*t))
+ t--;
+ *++t = '\0';
+
+ return s;
+@}
+
+/* **************************************************************** */
+/* */
+/* Interface to Readline Completion */
+/* */
+/* **************************************************************** */
+
+char *command_generator PARAMS((const char *, int));
+char **fileman_completion PARAMS((const char *, int, int));
+
+/* Tell the GNU Readline library how to complete. We want to try to complete
+ on command names if this is the first word in the line, or on filenames
+ if not. */
+initialize_readline ()
+@{
+ /* Allow conditional parsing of the ~/.inputrc file. */
+ rl_readline_name = "FileMan";
+
+ /* Tell the completer that we want a crack first. */
+ rl_attempted_completion_function = fileman_completion;
+@}
+
+/* Attempt to complete on the contents of TEXT. START and END bound the
+ region of rl_line_buffer that contains the word to complete. TEXT is
+ the word to complete. We can use the entire contents of rl_line_buffer
+ in case we want to do some simple parsing. Return the array of matches,
+ or NULL if there aren't any. */
+char **
+fileman_completion (text, start, end)
+ const char *text;
+ int start, end;
+@{
+ char **matches;
+
+ matches = (char **)NULL;
+
+ /* If this word is at the start of the line, then it is a command
+ to complete. Otherwise it is the name of a file in the current
+ directory. */
+ if (start == 0)
+ matches = rl_completion_matches (text, command_generator);
+
+ return (matches);
+@}
+
+/* Generator function for command completion. STATE lets us know whether
+ to start from scratch; without any state (i.e. STATE == 0), then we
+ start at the top of the list. */
+char *
+command_generator (text, state)
+ const char *text;
+ int state;
+@{
+ static int list_index, len;
+ char *name;
+
+ /* If this is a new word to complete, initialize now. This includes
+ saving the length of TEXT for efficiency, and initializing the index
+ variable to 0. */
+ if (!state)
+ @{
+ list_index = 0;
+ len = strlen (text);
+ @}
+
+ /* Return the next name which partially matches from the command list. */
+ while (name = commands[list_index].name)
+ @{
+ list_index++;
+
+ if (strncmp (name, text, len) == 0)
+ return (dupstr(name));
+ @}
+
+ /* If no names matched, then return NULL. */
+ return ((char *)NULL);
+@}
+
+/* **************************************************************** */
+/* */
+/* FileMan Commands */
+/* */
+/* **************************************************************** */
+
+/* String to pass to system (). This is for the LIST, VIEW and RENAME
+ commands. */
+static char syscom[1024];
+
+/* List the file(s) named in arg. */
+com_list (arg)
+ char *arg;
+@{
+ if (!arg)
+ arg = "";
+
+ sprintf (syscom, "ls -FClg %s", arg);
+ return (system (syscom));
+@}
+
+com_view (arg)
+ char *arg;
+@{
+ if (!valid_argument ("view", arg))
+ return 1;
+
+#if defined (__MSDOS__)
+ /* more.com doesn't grok slashes in pathnames */
+ sprintf (syscom, "less %s", arg);
+#else
+ sprintf (syscom, "more %s", arg);
+#endif
+ return (system (syscom));
+@}
+
+com_rename (arg)
+ char *arg;
+@{
+ too_dangerous ("rename");
+ return (1);
+@}
+
+com_stat (arg)
+ char *arg;
+@{
+ struct stat finfo;
+
+ if (!valid_argument ("stat", arg))
+ return (1);
+
+ if (stat (arg, &finfo) == -1)
+ @{
+ perror (arg);
+ return (1);
+ @}
+
+ printf ("Statistics for `%s':\n", arg);
+
+ printf ("%s has %d link%s, and is %d byte%s in length.\n",
+ arg,
+ finfo.st_nlink,
+ (finfo.st_nlink == 1) ? "" : "s",
+ finfo.st_size,
+ (finfo.st_size == 1) ? "" : "s");
+ printf ("Inode Last Change at: %s", ctime (&finfo.st_ctime));
+ printf (" Last access at: %s", ctime (&finfo.st_atime));
+ printf (" Last modified at: %s", ctime (&finfo.st_mtime));
+ return (0);
+@}
+
+com_delete (arg)
+ char *arg;
+@{
+ too_dangerous ("delete");
+ return (1);
+@}
+
+/* Print out help for ARG, or for all of the commands if ARG is
+ not present. */
+com_help (arg)
+ char *arg;
+@{
+ register int i;
+ int printed = 0;
+
+ for (i = 0; commands[i].name; i++)
+ @{
+ if (!*arg || (strcmp (arg, commands[i].name) == 0))
+ @{
+ printf ("%s\t\t%s.\n", commands[i].name, commands[i].doc);
+ printed++;
+ @}
+ @}
+
+ if (!printed)
+ @{
+ printf ("No commands match `%s'. Possibilties are:\n", arg);
+
+ for (i = 0; commands[i].name; i++)
+ @{
+ /* Print in six columns. */
+ if (printed == 6)
+ @{
+ printed = 0;
+ printf ("\n");
+ @}
+
+ printf ("%s\t", commands[i].name);
+ printed++;
+ @}
+
+ if (printed)
+ printf ("\n");
+ @}
+ return (0);
+@}
+
+/* Change to the directory ARG. */
+com_cd (arg)
+ char *arg;
+@{
+ if (chdir (arg) == -1)
+ @{
+ perror (arg);
+ return 1;
+ @}
+
+ com_pwd ("");
+ return (0);
+@}
+
+/* Print out the current working directory. */
+com_pwd (ignore)
+ char *ignore;
+@{
+ char dir[1024], *s;
+
+ s = getcwd (dir, sizeof(dir) - 1);
+ if (s == 0)
+ @{
+ printf ("Error getting pwd: %s\n", dir);
+ return 1;
+ @}
+
+ printf ("Current directory is %s\n", dir);
+ return 0;
+@}
+
+/* The user wishes to quit using this program. Just set DONE non-zero. */
+com_quit (arg)
+ char *arg;
+@{
+ done = 1;
+ return (0);
+@}
+
+/* Function which tells you that you can't do this. */
+too_dangerous (caller)
+ char *caller;
+@{
+ fprintf (stderr,
+ "%s: Too dangerous for me to distribute. Write it yourself.\n",
+ caller);
+@}
+
+/* Return non-zero if ARG is a valid argument for CALLER, else print
+ an error message and return zero. */
+int
+valid_argument (caller, arg)
+ char *caller, *arg;
+@{
+ if (!arg || !*arg)
+ @{
+ fprintf (stderr, "%s: Argument required.\n", caller);
+ return (0);
+ @}
+
+ return (1);
+@}
+@end smallexample
diff --git a/lib/readline/doc/rluser.texi b/lib/readline/doc/rluser.texi
new file mode 100644
index 0000000..519c0de
--- /dev/null
+++ b/lib/readline/doc/rluser.texi
@@ -0,0 +1,2007 @@
+@comment %**start of header (This is for running Texinfo on a region.)
+@setfilename rluser.info
+@comment %**end of header (This is for running Texinfo on a region.)
+
+@ignore
+This file documents the end user interface to the GNU command line
+editing features. It is to be an appendix to manuals for programs which
+use these features. There is a document entitled "readline.texinfo"
+which contains both end-user and programmer documentation for the
+GNU Readline Library.
+
+Copyright (C) 1988--2009 Free Software Foundation, Inc.
+
+Authored by Brian Fox and Chet Ramey.
+
+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 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 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
+
+@comment If you are including this manual as an appendix, then set the
+@comment variable readline-appendix.
+
+@ifclear BashFeatures
+@defcodeindex bt
+@end ifclear
+
+@node Command Line Editing
+@chapter Command Line Editing
+
+This chapter describes the basic features of the @sc{gnu}
+command line editing interface.
+@ifset BashFeatures
+Command line editing is provided by the Readline library, which is
+used by several different programs, including Bash.
+Command line editing is enabled by default when using an interactive shell,
+unless the @option{--noediting} option is supplied at shell invocation.
+Line editing is also used when using the @option{-e} option to the
+@code{read} builtin command (@pxref{Bash Builtins}).
+By default, the line editing commands are similar to those of emacs.
+A vi-style line editing interface is also available.
+Line editing can be enabled at any time using the @option{-o emacs} or
+@option{-o vi} options to the @code{set} builtin command
+(@pxref{The Set Builtin}), or disabled using the @option{+o emacs} or
+@option{+o vi} options to @code{set}.
+@end ifset
+
+@menu
+* Introduction and Notation:: Notation used in this text.
+* Readline Interaction:: The minimum set of commands for editing a line.
+* Readline Init File:: Customizing Readline from a user's view.
+* Bindable Readline Commands:: A description of most of the Readline commands
+ available for binding
+* Readline vi Mode:: A short description of how to make Readline
+ behave like the vi editor.
+@ifset BashFeatures
+* Programmable Completion:: How to specify the possible completions for
+ a specific command.
+* Programmable Completion Builtins:: Builtin commands to specify how to
+ complete arguments for a particular command.
+@end ifset
+@end menu
+
+@node Introduction and Notation
+@section Introduction to Line Editing
+
+The following paragraphs describe the notation used to represent
+keystrokes.
+
+The text @kbd{C-k} is read as `Control-K' and describes the character
+produced when the @key{k} key is pressed while the Control key
+is depressed.
+
+The text @kbd{M-k} is read as `Meta-K' and describes the character
+produced when the Meta key (if you have one) is depressed, and the @key{k}
+key is pressed.
+The Meta key is labeled @key{ALT} on many keyboards.
+On keyboards with two keys labeled @key{ALT} (usually to either side of
+the space bar), the @key{ALT} on the left side is generally set to
+work as a Meta key.
+The @key{ALT} key on the right may also be configured to work as a
+Meta key or may be configured as some other modifier, such as a
+Compose key for typing accented characters.
+
+If you do not have a Meta or @key{ALT} key, or another key working as
+a Meta key, the identical keystroke can be generated by typing @key{ESC}
+@emph{first}, and then typing @key{k}.
+Either process is known as @dfn{metafying} the @key{k} key.
+
+The text @kbd{M-C-k} is read as `Meta-Control-k' and describes the
+character produced by @dfn{metafying} @kbd{C-k}.
+
+In addition, several keys have their own names. Specifically,
+@key{DEL}, @key{ESC}, @key{LFD}, @key{SPC}, @key{RET}, and @key{TAB} all
+stand for themselves when seen in this text, or in an init file
+(@pxref{Readline Init File}).
+If your keyboard lacks a @key{LFD} key, typing @key{C-j} will
+produce the desired character.
+The @key{RET} key may be labeled @key{Return} or @key{Enter} on
+some keyboards.
+
+@node Readline Interaction
+@section Readline Interaction
+@cindex interaction, readline
+
+Often during an interactive session you type in a long line of text,
+only to notice that the first word on the line is misspelled. The
+Readline library gives you a set of commands for manipulating the text
+as you type it in, allowing you to just fix your typo, and not forcing
+you to retype the majority of the line. Using these editing commands,
+you move the cursor to the place that needs correction, and delete or
+insert the text of the corrections. Then, when you are satisfied with
+the line, you simply press @key{RET}. You do not have to be at the
+end of the line to press @key{RET}; the entire line is accepted
+regardless of the location of the cursor within the line.
+
+@menu
+* Readline Bare Essentials:: The least you need to know about Readline.
+* Readline Movement Commands:: Moving about the input line.
+* Readline Killing Commands:: How to delete text, and how to get it back!
+* Readline Arguments:: Giving numeric arguments to commands.
+* Searching:: Searching through previous lines.
+@end menu
+
+@node Readline Bare Essentials
+@subsection Readline Bare Essentials
+@cindex notation, readline
+@cindex command editing
+@cindex editing command lines
+
+In order to enter characters into the line, simply type them. The typed
+character appears where the cursor was, and then the cursor moves one
+space to the right. If you mistype a character, you can use your
+erase character to back up and delete the mistyped character.
+
+Sometimes you may mistype a character, and
+not notice the error until you have typed several other characters. In
+that case, you can type @kbd{C-b} to move the cursor to the left, and then
+correct your mistake. Afterwards, you can move the cursor to the right
+with @kbd{C-f}.
+
+When you add text in the middle of a line, you will notice that characters
+to the right of the cursor are `pushed over' to make room for the text
+that you have inserted. Likewise, when you delete text behind the cursor,
+characters to the right of the cursor are `pulled back' to fill in the
+blank space created by the removal of the text. A list of the bare
+essentials for editing the text of an input line follows.
+
+@table @asis
+@item @kbd{C-b}
+Move back one character.
+@item @kbd{C-f}
+Move forward one character.
+@item @key{DEL} or @key{Backspace}
+Delete the character to the left of the cursor.
+@item @kbd{C-d}
+Delete the character underneath the cursor.
+@item @w{Printing characters}
+Insert the character into the line at the cursor.
+@item @kbd{C-_} or @kbd{C-x C-u}
+Undo the last editing command. You can undo all the way back to an
+empty line.
+@end table
+
+@noindent
+(Depending on your configuration, the @key{Backspace} key be set to
+delete the character to the left of the cursor and the @key{DEL} key set
+to delete the character underneath the cursor, like @kbd{C-d}, rather
+than the character to the left of the cursor.)
+
+@node Readline Movement Commands
+@subsection Readline Movement Commands
+
+
+The above table describes the most basic keystrokes that you need
+in order to do editing of the input line. For your convenience, many
+other commands have been added in addition to @kbd{C-b}, @kbd{C-f},
+@kbd{C-d}, and @key{DEL}. Here are some commands for moving more rapidly
+about the line.
+
+@table @kbd
+@item C-a
+Move to the start of the line.
+@item C-e
+Move to the end of the line.
+@item M-f
+Move forward a word, where a word is composed of letters and digits.
+@item M-b
+Move backward a word.
+@item C-l
+Clear the screen, reprinting the current line at the top.
+@end table
+
+Notice how @kbd{C-f} moves forward a character, while @kbd{M-f} moves
+forward a word. It is a loose convention that control keystrokes
+operate on characters while meta keystrokes operate on words.
+
+@node Readline Killing Commands
+@subsection Readline Killing Commands
+
+@cindex killing text
+@cindex yanking text
+
+@dfn{Killing} text means to delete the text from the line, but to save
+it away for later use, usually by @dfn{yanking} (re-inserting)
+it back into the line.
+(`Cut' and `paste' are more recent jargon for `kill' and `yank'.)
+
+If the description for a command says that it `kills' text, then you can
+be sure that you can get the text back in a different (or the same)
+place later.
+
+When you use a kill command, the text is saved in a @dfn{kill-ring}.
+Any number of consecutive kills save all of the killed text together, so
+that when you yank it back, you get it all. The kill
+ring is not line specific; the text that you killed on a previously
+typed line is available to be yanked back later, when you are typing
+another line.
+@cindex kill ring
+
+Here is the list of commands for killing text.
+
+@table @kbd
+@item C-k
+Kill the text from the current cursor position to the end of the line.
+
+@item M-d
+Kill from the cursor to the end of the current word, or, if between
+words, to the end of the next word.
+Word boundaries are the same as those used by @kbd{M-f}.
+
+@item M-@key{DEL}
+Kill from the cursor the start of the current word, or, if between
+words, to the start of the previous word.
+Word boundaries are the same as those used by @kbd{M-b}.
+
+@item C-w
+Kill from the cursor to the previous whitespace. This is different than
+@kbd{M-@key{DEL}} because the word boundaries differ.
+
+@end table
+
+Here is how to @dfn{yank} the text back into the line. Yanking
+means to copy the most-recently-killed text from the kill buffer.
+
+@table @kbd
+@item C-y
+Yank the most recently killed text back into the buffer at the cursor.
+
+@item M-y
+Rotate the kill-ring, and yank the new top. You can only do this if
+the prior command is @kbd{C-y} or @kbd{M-y}.
+@end table
+
+@node Readline Arguments
+@subsection Readline Arguments
+
+You can pass numeric arguments to Readline commands. Sometimes the
+argument acts as a repeat count, other times it is the @i{sign} of the
+argument that is significant. If you pass a negative argument to a
+command which normally acts in a forward direction, that command will
+act in a backward direction. For example, to kill text back to the
+start of the line, you might type @samp{M-- C-k}.
+
+The general way to pass numeric arguments to a command is to type meta
+digits before the command. If the first `digit' typed is a minus
+sign (@samp{-}), then the sign of the argument will be negative. Once
+you have typed one meta digit to get the argument started, you can type
+the remainder of the digits, and then the command. For example, to give
+the @kbd{C-d} command an argument of 10, you could type @samp{M-1 0 C-d},
+which will delete the next ten characters on the input line.
+
+@node Searching
+@subsection Searching for Commands in the History
+
+Readline provides commands for searching through the command history
+@ifset BashFeatures
+(@pxref{Bash History Facilities})
+@end ifset
+for lines containing a specified string.
+There are two search modes: @dfn{incremental} and @dfn{non-incremental}.
+
+Incremental searches begin before the user has finished typing the
+search string.
+As each character of the search string is typed, Readline displays
+the next entry from the history matching the string typed so far.
+An incremental search requires only as many characters as needed to
+find the desired history entry.
+To search backward in the history for a particular string, type
+@kbd{C-r}. Typing @kbd{C-s} searches forward through the history.
+The characters present in the value of the @code{isearch-terminators} variable
+are used to terminate an incremental search.
+If that variable has not been assigned a value, the @key{ESC} and
+@kbd{C-J} characters will terminate an incremental search.
+@kbd{C-g} will abort an incremental search and restore the original line.
+When the search is terminated, the history entry containing the
+search string becomes the current line.
+
+To find other matching entries in the history list, type @kbd{C-r} or
+@kbd{C-s} as appropriate.
+This will search backward or forward in the history for the next
+entry matching the search string typed so far.
+Any other key sequence bound to a Readline command will terminate
+the search and execute that command.
+For instance, a @key{RET} will terminate the search and accept
+the line, thereby executing the command from the history list.
+A movement command will terminate the search, make the last line found
+the current line, and begin editing.
+
+Readline remembers the last incremental search string. If two
+@kbd{C-r}s are typed without any intervening characters defining a new
+search string, any remembered search string is used.
+
+Non-incremental searches read the entire search string before starting
+to search for matching history lines. The search string may be
+typed by the user or be part of the contents of the current line.
+
+@node Readline Init File
+@section Readline Init File
+@cindex initialization file, readline
+
+Although the Readline library comes with a set of Emacs-like
+keybindings installed by default, it is possible to use a different set
+of keybindings.
+Any user can customize programs that use Readline by putting
+commands in an @dfn{inputrc} file, conventionally in his home directory.
+The name of this
+@ifset BashFeatures
+file is taken from the value of the shell variable @env{INPUTRC}. If
+@end ifset
+@ifclear BashFeatures
+file is taken from the value of the environment variable @env{INPUTRC}. If
+@end ifclear
+that variable is unset, the default is @file{~/.inputrc}. If that
+file does not exist or cannot be read, the ultimate default is
+@file{/etc/inputrc}.
+
+When a program which uses the Readline library starts up, the
+init file is read, and the key bindings are set.
+
+In addition, the @code{C-x C-r} command re-reads this init file, thus
+incorporating any changes that you might have made to it.
+
+@menu
+* Readline Init File Syntax:: Syntax for the commands in the inputrc file.
+
+* Conditional Init Constructs:: Conditional key bindings in the inputrc file.
+
+* Sample Init File:: An example inputrc file.
+@end menu
+
+@node Readline Init File Syntax
+@subsection Readline Init File Syntax
+
+There are only a few basic constructs allowed in the
+Readline init file. Blank lines are ignored.
+Lines beginning with a @samp{#} are comments.
+Lines beginning with a @samp{$} indicate conditional
+constructs (@pxref{Conditional Init Constructs}). Other lines
+denote variable settings and key bindings.
+
+@table @asis
+@item Variable Settings
+You can modify the run-time behavior of Readline by
+altering the values of variables in Readline
+using the @code{set} command within the init file.
+The syntax is simple:
+
+@example
+set @var{variable} @var{value}
+@end example
+
+@noindent
+Here, for example, is how to
+change from the default Emacs-like key binding to use
+@code{vi} line editing commands:
+
+@example
+set editing-mode vi
+@end example
+
+Variable names and values, where appropriate, are recognized without regard
+to case. Unrecognized variable names are ignored.
+
+Boolean variables (those that can be set to on or off) are set to on if
+the value is null or empty, @var{on} (case-insensitive), or 1. Any other
+value results in the variable being set to off.
+
+@ifset BashFeatures
+The @w{@code{bind -V}} command lists the current Readline variable names
+and values. @xref{Bash Builtins}.
+@end ifset
+
+A great deal of run-time behavior is changeable with the following
+variables.
+
+@cindex variables, readline
+@table @code
+
+@item bell-style
+@vindex bell-style
+Controls what happens when Readline wants to ring the terminal bell.
+If set to @samp{none}, Readline never rings the bell. If set to
+@samp{visible}, Readline uses a visible bell if one is available.
+If set to @samp{audible} (the default), Readline attempts to ring
+the terminal's bell.
+
+@item bind-tty-special-chars
+@vindex bind-tty-special-chars
+If set to @samp{on}, Readline attempts to bind the control characters
+treated specially by the kernel's terminal driver to their Readline
+equivalents.
+
+@item comment-begin
+@vindex comment-begin
+The string to insert at the beginning of the line when the
+@code{insert-comment} command is executed. The default value
+is @code{"#"}.
+
+@item completion-ignore-case
+If set to @samp{on}, Readline performs filename matching and completion
+in a case-insensitive fashion.
+The default value is @samp{off}.
+
+@item completion-prefix-display-length
+@vindex completion-prefix-display-length
+The length in characters of the common prefix of a list of possible
+completions that is displayed without modification. When set to a
+value greater than zero, common prefixes longer than this value are
+replaced with an ellipsis when displaying possible completions.
+
+@item completion-query-items
+@vindex completion-query-items
+The number of possible completions that determines when the user is
+asked whether the list of possibilities should be displayed.
+If the number of possible completions is greater than this value,
+Readline will ask the user whether or not he wishes to view
+them; otherwise, they are simply listed.
+This variable must be set to an integer value greater than or equal to 0.
+A negative value means Readline should never ask.
+The default limit is @code{100}.
+
+@item convert-meta
+@vindex convert-meta
+If set to @samp{on}, Readline will convert characters with the
+eighth bit set to an @sc{ascii} key sequence by stripping the eighth
+bit and prefixing an @key{ESC} character, converting them to a
+meta-prefixed key sequence. The default value is @samp{on}.
+
+@item disable-completion
+@vindex disable-completion
+If set to @samp{On}, Readline will inhibit word completion.
+Completion characters will be inserted into the line as if they had
+been mapped to @code{self-insert}. The default is @samp{off}.
+
+@item editing-mode
+@vindex editing-mode
+The @code{editing-mode} variable controls which default set of
+key bindings is used. By default, Readline starts up in Emacs editing
+mode, where the keystrokes are most similar to Emacs. This variable can be
+set to either @samp{emacs} or @samp{vi}.
+
+@item echo-control-characters
+When set to @samp{on}, on operating systems that indicate they support it,
+readline echoes a character corresponding to a signal generated from the
+keyboard. The default is @samp{on}.
+
+@item enable-keypad
+@vindex enable-keypad
+When set to @samp{on}, Readline will try to enable the application
+keypad when it is called. Some systems need this to enable the
+arrow keys. The default is @samp{off}.
+
+@item enable-meta-key
+When set to @samp{on}, Readline will try to enable any meta modifier
+key the terminal claims to support when it is called. On many terminals,
+the meta key is used to send eight-bit characters.
+The default is @samp{on}.
+
+@item expand-tilde
+@vindex expand-tilde
+If set to @samp{on}, tilde expansion is performed when Readline
+attempts word completion. The default is @samp{off}.
+
+@item history-preserve-point
+@vindex history-preserve-point
+If set to @samp{on}, the history code attempts to place the point (the
+current cursor position) at the
+same location on each history line retrieved with @code{previous-history}
+or @code{next-history}. The default is @samp{off}.
+
+@item history-size
+@vindex history-size
+Set the maximum number of history entries saved in the history list. If
+set to zero, the number of entries in the history list is not limited.
+
+@item horizontal-scroll-mode
+@vindex horizontal-scroll-mode
+This variable can be set to either @samp{on} or @samp{off}. Setting it
+to @samp{on} means that the text of the lines being edited will scroll
+horizontally on a single screen line when they are longer than the width
+of the screen, instead of wrapping onto a new screen line. By default,
+this variable is set to @samp{off}.
+
+@item input-meta
+@vindex input-meta
+@vindex meta-flag
+If set to @samp{on}, Readline will enable eight-bit input (it
+will not clear the eighth bit in the characters it reads),
+regardless of what the terminal claims it can support. The
+default value is @samp{off}. The name @code{meta-flag} is a
+synonym for this variable.
+
+@item isearch-terminators
+@vindex isearch-terminators
+The string of characters that should terminate an incremental search without
+subsequently executing the character as a command (@pxref{Searching}).
+If this variable has not been given a value, the characters @key{ESC} and
+@kbd{C-J} will terminate an incremental search.
+
+@item keymap
+@vindex keymap
+Sets Readline's idea of the current keymap for key binding commands.
+Acceptable @code{keymap} names are
+@code{emacs},
+@code{emacs-standard},
+@code{emacs-meta},
+@code{emacs-ctlx},
+@code{vi},
+@code{vi-move},
+@code{vi-command}, and
+@code{vi-insert}.
+@code{vi} is equivalent to @code{vi-command}; @code{emacs} is
+equivalent to @code{emacs-standard}. The default value is @code{emacs}.
+The value of the @code{editing-mode} variable also affects the
+default keymap.
+
+@item mark-directories
+If set to @samp{on}, completed directory names have a slash
+appended. The default is @samp{on}.
+
+@item mark-modified-lines
+@vindex mark-modified-lines
+This variable, when set to @samp{on}, causes Readline to display an
+asterisk (@samp{*}) at the start of history lines which have been modified.
+This variable is @samp{off} by default.
+
+@item mark-symlinked-directories
+@vindex mark-symlinked-directories
+If set to @samp{on}, completed names which are symbolic links
+to directories have a slash appended (subject to the value of
+@code{mark-directories}).
+The default is @samp{off}.
+
+@item match-hidden-files
+@vindex match-hidden-files
+This variable, when set to @samp{on}, causes Readline to match files whose
+names begin with a @samp{.} (hidden files) when performing filename
+completion, unless the leading @samp{.} is
+supplied by the user in the filename to be completed.
+This variable is @samp{on} by default.
+
+@item output-meta
+@vindex output-meta
+If set to @samp{on}, Readline will display characters with the
+eighth bit set directly rather than as a meta-prefixed escape
+sequence. The default is @samp{off}.
+
+@item page-completions
+@vindex page-completions
+If set to @samp{on}, Readline uses an internal @code{more}-like pager
+to display a screenful of possible completions at a time.
+This variable is @samp{on} by default.
+
+@item print-completions-horizontally
+If set to @samp{on}, Readline will display completions with matches
+sorted horizontally in alphabetical order, rather than down the screen.
+The default is @samp{off}.
+
+@item revert-all-at-newline
+@vindex revert-all-at-newline
+If set to @samp{on}, Readline will undo all changes to history lines
+before returning when @code{accept-line} is executed. By default,
+history lines may be modified and retain individual undo lists across
+calls to @code{readline}. The default is @samp{off}.
+
+@item show-all-if-ambiguous
+@vindex show-all-if-ambiguous
+This alters the default behavior of the completion functions. If
+set to @samp{on},
+words which have more than one possible completion cause the
+matches to be listed immediately instead of ringing the bell.
+The default value is @samp{off}.
+
+@item show-all-if-unmodified
+@vindex show-all-if-unmodified
+This alters the default behavior of the completion functions in
+a fashion similar to @var{show-all-if-ambiguous}.
+If set to @samp{on},
+words which have more than one possible completion without any
+possible partial completion (the possible completions don't share
+a common prefix) cause the matches to be listed immediately instead
+of ringing the bell.
+The default value is @samp{off}.
+
+@item skip-completed-text
+@vindex skip-completed-text
+If set to @samp{on}, this alters the default completion behavior when
+inserting a single match into the line. It's only active when
+performing completion in the middle of a word. If enabled, readline
+does not insert characters from the completion that match characters
+after point in the word being completed, so portions of the word
+following the cursor are not duplicated.
+For instance, if this is enabled, attempting completion when the cursor
+is after the @samp{e} in @samp{Makefile} will result in @samp{Makefile}
+rather than @samp{Makefilefile}, assuming there is a single possible
+completion.
+The default value is @samp{off}.
+
+@item visible-stats
+@vindex visible-stats
+If set to @samp{on}, a character denoting a file's type
+is appended to the filename when listing possible
+completions. The default is @samp{off}.
+
+@end table
+
+@item Key Bindings
+The syntax for controlling key bindings in the init file is
+simple. First you need to find the name of the command that you
+want to change. The following sections contain tables of the command
+name, the default keybinding, if any, and a short description of what
+the command does.
+
+Once you know the name of the command, simply place on a line
+in the init file the name of the key
+you wish to bind the command to, a colon, and then the name of the
+command.
+There can be no space between the key name and the colon -- that will be
+interpreted as part of the key name.
+The name of the key can be expressed in different ways, depending on
+what you find most comfortable.
+
+In addition to command names, readline allows keys to be bound
+to a string that is inserted when the key is pressed (a @var{macro}).
+
+@ifset BashFeatures
+The @w{@code{bind -p}} command displays Readline function names and
+bindings in a format that can put directly into an initialization file.
+@xref{Bash Builtins}.
+@end ifset
+
+@table @asis
+@item @w{@var{keyname}: @var{function-name} or @var{macro}}
+@var{keyname} is the name of a key spelled out in English. For example:
+@example
+Control-u: universal-argument
+Meta-Rubout: backward-kill-word
+Control-o: "> output"
+@end example
+
+In the above example, @kbd{C-u} is bound to the function
+@code{universal-argument},
+@kbd{M-DEL} is bound to the function @code{backward-kill-word}, and
+@kbd{C-o} is bound to run the macro
+expressed on the right hand side (that is, to insert the text
+@samp{> output} into the line).
+
+A number of symbolic character names are recognized while
+processing this key binding syntax:
+@var{DEL},
+@var{ESC},
+@var{ESCAPE},
+@var{LFD},
+@var{NEWLINE},
+@var{RET},
+@var{RETURN},
+@var{RUBOUT},
+@var{SPACE},
+@var{SPC},
+and
+@var{TAB}.
+
+@item @w{"@var{keyseq}": @var{function-name} or @var{macro}}
+@var{keyseq} differs from @var{keyname} above in that strings
+denoting an entire key sequence can be specified, by placing
+the key sequence in double quotes. Some @sc{gnu} Emacs style key
+escapes can be used, as in the following example, but the
+special character names are not recognized.
+
+@example
+"\C-u": universal-argument
+"\C-x\C-r": re-read-init-file
+"\e[11~": "Function Key 1"
+@end example
+
+In the above example, @kbd{C-u} is again bound to the function
+@code{universal-argument} (just as it was in the first example),
+@samp{@kbd{C-x} @kbd{C-r}} is bound to the function @code{re-read-init-file},
+and @samp{@key{ESC} @key{[} @key{1} @key{1} @key{~}} is bound to insert
+the text @samp{Function Key 1}.
+
+@end table
+
+The following @sc{gnu} Emacs style escape sequences are available when
+specifying key sequences:
+
+@table @code
+@item @kbd{\C-}
+control prefix
+@item @kbd{\M-}
+meta prefix
+@item @kbd{\e}
+an escape character
+@item @kbd{\\}
+backslash
+@item @kbd{\"}
+@key{"}, a double quotation mark
+@item @kbd{\'}
+@key{'}, a single quote or apostrophe
+@end table
+
+In addition to the @sc{gnu} Emacs style escape sequences, a second
+set of backslash escapes is available:
+
+@table @code
+@item \a
+alert (bell)
+@item \b
+backspace
+@item \d
+delete
+@item \f
+form feed
+@item \n
+newline
+@item \r
+carriage return
+@item \t
+horizontal tab
+@item \v
+vertical tab
+@item \@var{nnn}
+the eight-bit character whose value is the octal value @var{nnn}
+(one to three digits)
+@item \x@var{HH}
+the eight-bit character whose value is the hexadecimal value @var{HH}
+(one or two hex digits)
+@end table
+
+When entering the text of a macro, single or double quotes must
+be used to indicate a macro definition.
+Unquoted text is assumed to be a function name.
+In the macro body, the backslash escapes described above are expanded.
+Backslash will quote any other character in the macro text,
+including @samp{"} and @samp{'}.
+For example, the following binding will make @samp{@kbd{C-x} \}
+insert a single @samp{\} into the line:
+@example
+"\C-x\\": "\\"
+@end example
+
+@end table
+
+@node Conditional Init Constructs
+@subsection Conditional Init Constructs
+
+Readline implements a facility similar in spirit to the conditional
+compilation features of the C preprocessor which allows key
+bindings and variable settings to be performed as the result
+of tests. There are four parser directives used.
+
+@table @code
+@item $if
+The @code{$if} construct allows bindings to be made based on the
+editing mode, the terminal being used, or the application using
+Readline. The text of the test extends to the end of the line;
+no characters are required to isolate it.
+
+@table @code
+@item mode
+The @code{mode=} form of the @code{$if} directive is used to test
+whether Readline is in @code{emacs} or @code{vi} mode.
+This may be used in conjunction
+with the @samp{set keymap} command, for instance, to set bindings in
+the @code{emacs-standard} and @code{emacs-ctlx} keymaps only if
+Readline is starting out in @code{emacs} mode.
+
+@item term
+The @code{term=} form may be used to include terminal-specific
+key bindings, perhaps to bind the key sequences output by the
+terminal's function keys. The word on the right side of the
+@samp{=} is tested against both the full name of the terminal and
+the portion of the terminal name before the first @samp{-}. This
+allows @code{sun} to match both @code{sun} and @code{sun-cmd},
+for instance.
+
+@item application
+The @var{application} construct is used to include
+application-specific settings. Each program using the Readline
+library sets the @var{application name}, and you can test for
+a particular value.
+This could be used to bind key sequences to functions useful for
+a specific program. For instance, the following command adds a
+key sequence that quotes the current or previous word in Bash:
+@example
+$if Bash
+# Quote the current or previous word
+"\C-xq": "\eb\"\ef\""
+$endif
+@end example
+@end table
+
+@item $endif
+This command, as seen in the previous example, terminates an
+@code{$if} command.
+
+@item $else
+Commands in this branch of the @code{$if} directive are executed if
+the test fails.
+
+@item $include
+This directive takes a single filename as an argument and reads commands
+and bindings from that file.
+For example, the following directive reads from @file{/etc/inputrc}:
+@example
+$include /etc/inputrc
+@end example
+@end table
+
+@node Sample Init File
+@subsection Sample Init File
+
+Here is an example of an @var{inputrc} file. This illustrates key
+binding, variable assignment, and conditional syntax.
+
+@example
+@page
+# This file controls the behaviour of line input editing for
+# programs that use the GNU Readline library. Existing
+# programs include FTP, Bash, and GDB.
+#
+# You can re-read the inputrc file with C-x C-r.
+# Lines beginning with '#' are comments.
+#
+# First, include any systemwide bindings and variable
+# assignments from /etc/Inputrc
+$include /etc/Inputrc
+
+#
+# Set various bindings for emacs mode.
+
+set editing-mode emacs
+
+$if mode=emacs
+
+Meta-Control-h: backward-kill-word Text after the function name is ignored
+
+#
+# Arrow keys in keypad mode
+#
+#"\M-OD": backward-char
+#"\M-OC": forward-char
+#"\M-OA": previous-history
+#"\M-OB": next-history
+#
+# Arrow keys in ANSI mode
+#
+"\M-[D": backward-char
+"\M-[C": forward-char
+"\M-[A": previous-history
+"\M-[B": next-history
+#
+# Arrow keys in 8 bit keypad mode
+#
+#"\M-\C-OD": backward-char
+#"\M-\C-OC": forward-char
+#"\M-\C-OA": previous-history
+#"\M-\C-OB": next-history
+#
+# Arrow keys in 8 bit ANSI mode
+#
+#"\M-\C-[D": backward-char
+#"\M-\C-[C": forward-char
+#"\M-\C-[A": previous-history
+#"\M-\C-[B": next-history
+
+C-q: quoted-insert
+
+$endif
+
+# An old-style binding. This happens to be the default.
+TAB: complete
+
+# Macros that are convenient for shell interaction
+$if Bash
+# edit the path
+"\C-xp": "PATH=$@{PATH@}\e\C-e\C-a\ef\C-f"
+# prepare to type a quoted word --
+# insert open and close double quotes
+# and move to just after the open quote
+"\C-x\"": "\"\"\C-b"
+# insert a backslash (testing backslash escapes
+# in sequences and macros)
+"\C-x\\": "\\"
+# Quote the current or previous word
+"\C-xq": "\eb\"\ef\""
+# Add a binding to refresh the line, which is unbound
+"\C-xr": redraw-current-line
+# Edit variable on current line.
+"\M-\C-v": "\C-a\C-k$\C-y\M-\C-e\C-a\C-y="
+$endif
+
+# use a visible bell if one is available
+set bell-style visible
+
+# don't strip characters to 7 bits when reading
+set input-meta on
+
+# allow iso-latin1 characters to be inserted rather
+# than converted to prefix-meta sequences
+set convert-meta off
+
+# display characters with the eighth bit set directly
+# rather than as meta-prefixed characters
+set output-meta on
+
+# if there are more than 150 possible completions for
+# a word, ask the user if he wants to see all of them
+set completion-query-items 150
+
+# For FTP
+$if Ftp
+"\C-xg": "get \M-?"
+"\C-xt": "put \M-?"
+"\M-.": yank-last-arg
+$endif
+@end example
+
+@node Bindable Readline Commands
+@section Bindable Readline Commands
+
+@menu
+* Commands For Moving:: Moving about the line.
+* Commands For History:: Getting at previous lines.
+* Commands For Text:: Commands for changing text.
+* Commands For Killing:: Commands for killing and yanking.
+* Numeric Arguments:: Specifying numeric arguments, repeat counts.
+* Commands For Completion:: Getting Readline to do the typing for you.
+* Keyboard Macros:: Saving and re-executing typed characters
+* Miscellaneous Commands:: Other miscellaneous commands.
+@end menu
+
+This section describes Readline commands that may be bound to key
+sequences.
+@ifset BashFeatures
+You can list your key bindings by executing
+@w{@code{bind -P}} or, for a more terse format, suitable for an
+@var{inputrc} file, @w{@code{bind -p}}. (@xref{Bash Builtins}.)
+@end ifset
+Command names without an accompanying key sequence are unbound by default.
+
+In the following descriptions, @dfn{point} refers to the current cursor
+position, and @dfn{mark} refers to a cursor position saved by the
+@code{set-mark} command.
+The text between the point and mark is referred to as the @dfn{region}.
+
+@node Commands For Moving
+@subsection Commands For Moving
+@ftable @code
+@item beginning-of-line (C-a)
+Move to the start of the current line.
+
+@item end-of-line (C-e)
+Move to the end of the line.
+
+@item forward-char (C-f)
+Move forward a character.
+
+@item backward-char (C-b)
+Move back a character.
+
+@item forward-word (M-f)
+Move forward to the end of the next word.
+Words are composed of letters and digits.
+
+@item backward-word (M-b)
+Move back to the start of the current or previous word.
+Words are composed of letters and digits.
+
+@ifset BashFeatures
+@item shell-forward-word ()
+Move forward to the end of the next word.
+Words are delimited by non-quoted shell metacharacters.
+
+@item shell-backward-word ()
+Move back to the start of the current or previous word.
+Words are delimited by non-quoted shell metacharacters.
+@end ifset
+
+@item clear-screen (C-l)
+Clear the screen and redraw the current line,
+leaving the current line at the top of the screen.
+
+@item redraw-current-line ()
+Refresh the current line. By default, this is unbound.
+
+@end ftable
+
+@node Commands For History
+@subsection Commands For Manipulating The History
+
+@ftable @code
+@item accept-line (Newline or Return)
+@ifset BashFeatures
+Accept the line regardless of where the cursor is.
+If this line is
+non-empty, add it to the history list according to the setting of
+the @env{HISTCONTROL} and @env{HISTIGNORE} variables.
+If this line is a modified history line, then restore the history line
+to its original state.
+@end ifset
+@ifclear BashFeatures
+Accept the line regardless of where the cursor is.
+If this line is
+non-empty, it may be added to the history list for future recall with
+@code{add_history()}.
+If this line is a modified history line, the history line is restored
+to its original state.
+@end ifclear
+
+@item previous-history (C-p)
+Move `back' through the history list, fetching the previous command.
+
+@item next-history (C-n)
+Move `forward' through the history list, fetching the next command.
+
+@item beginning-of-history (M-<)
+Move to the first line in the history.
+
+@item end-of-history (M->)
+Move to the end of the input history, i.e., the line currently
+being entered.
+
+@item reverse-search-history (C-r)
+Search backward starting at the current line and moving `up' through
+the history as necessary. This is an incremental search.
+
+@item forward-search-history (C-s)
+Search forward starting at the current line and moving `down' through
+the the history as necessary. This is an incremental search.
+
+@item non-incremental-reverse-search-history (M-p)
+Search backward starting at the current line and moving `up'
+through the history as necessary using a non-incremental search
+for a string supplied by the user.
+
+@item non-incremental-forward-search-history (M-n)
+Search forward starting at the current line and moving `down'
+through the the history as necessary using a non-incremental search
+for a string supplied by the user.
+
+@item history-search-forward ()
+Search forward through the history for the string of characters
+between the start of the current line and the point.
+This is a non-incremental search.
+By default, this command is unbound.
+
+@item history-search-backward ()
+Search backward through the history for the string of characters
+between the start of the current line and the point. This
+is a non-incremental search. By default, this command is unbound.
+
+@item yank-nth-arg (M-C-y)
+Insert the first argument to the previous command (usually
+the second word on the previous line) at point.
+With an argument @var{n},
+insert the @var{n}th word from the previous command (the words
+in the previous command begin with word 0). A negative argument
+inserts the @var{n}th word from the end of the previous command.
+Once the argument @var{n} is computed, the argument is extracted
+as if the @samp{!@var{n}} history expansion had been specified.
+
+@item yank-last-arg (M-. or M-_)
+Insert last argument to the previous command (the last word of the
+previous history entry). With an
+argument, behave exactly like @code{yank-nth-arg}.
+Successive calls to @code{yank-last-arg} move back through the history
+list, inserting the last argument of each line in turn.
+The history expansion facilities are used to extract the last argument,
+as if the @samp{!$} history expansion had been specified.
+
+@end ftable
+
+@node Commands For Text
+@subsection Commands For Changing Text
+
+@ftable @code
+@item delete-char (C-d)
+Delete the character at point. If point is at the
+beginning of the line, there are no characters in the line, and
+the last character typed was not bound to @code{delete-char}, then
+return @sc{eof}.
+
+@item backward-delete-char (Rubout)
+Delete the character behind the cursor. A numeric argument means
+to kill the characters instead of deleting them.
+
+@item forward-backward-delete-char ()
+Delete the character under the cursor, unless the cursor is at the
+end of the line, in which case the character behind the cursor is
+deleted. By default, this is not bound to a key.
+
+@item quoted-insert (C-q or C-v)
+Add the next character typed to the line verbatim. This is
+how to insert key sequences like @kbd{C-q}, for example.
+
+@ifclear BashFeatures
+@item tab-insert (M-@key{TAB})
+Insert a tab character.
+@end ifclear
+
+@item self-insert (a, b, A, 1, !, @dots{})
+Insert yourself.
+
+@item transpose-chars (C-t)
+Drag the character before the cursor forward over
+the character at the cursor, moving the
+cursor forward as well. If the insertion point
+is at the end of the line, then this
+transposes the last two characters of the line.
+Negative arguments have no effect.
+
+@item transpose-words (M-t)
+Drag the word before point past the word after point,
+moving point past that word as well.
+If the insertion point is at the end of the line, this transposes
+the last two words on the line.
+
+@item upcase-word (M-u)
+Uppercase the current (or following) word. With a negative argument,
+uppercase the previous word, but do not move the cursor.
+
+@item downcase-word (M-l)
+Lowercase the current (or following) word. With a negative argument,
+lowercase the previous word, but do not move the cursor.
+
+@item capitalize-word (M-c)
+Capitalize the current (or following) word. With a negative argument,
+capitalize the previous word, but do not move the cursor.
+
+@item overwrite-mode ()
+Toggle overwrite mode. With an explicit positive numeric argument,
+switches to overwrite mode. With an explicit non-positive numeric
+argument, switches to insert mode. This command affects only
+@code{emacs} mode; @code{vi} mode does overwrite differently.
+Each call to @code{readline()} starts in insert mode.
+
+In overwrite mode, characters bound to @code{self-insert} replace
+the text at point rather than pushing the text to the right.
+Characters bound to @code{backward-delete-char} replace the character
+before point with a space.
+
+By default, this command is unbound.
+
+@end ftable
+
+@node Commands For Killing
+@subsection Killing And Yanking
+
+@ftable @code
+
+@item kill-line (C-k)
+Kill the text from point to the end of the line.
+
+@item backward-kill-line (C-x Rubout)
+Kill backward to the beginning of the line.
+
+@item unix-line-discard (C-u)
+Kill backward from the cursor to the beginning of the current line.
+
+@item kill-whole-line ()
+Kill all characters on the current line, no matter where point is.
+By default, this is unbound.
+
+@item kill-word (M-d)
+Kill from point to the end of the current word, or if between
+words, to the end of the next word.
+Word boundaries are the same as @code{forward-word}.
+
+@item backward-kill-word (M-@key{DEL})
+Kill the word behind point.
+Word boundaries are the same as @code{backward-word}.
+
+@ifset BashFeatures
+@item shell-kill-word ()
+Kill from point to the end of the current word, or if between
+words, to the end of the next word.
+Word boundaries are the same as @code{shell-forward-word}.
+
+@item backward-kill-word ()
+Kill the word behind point.
+Word boundaries are the same as @code{shell-backward-word}.
+@end ifset
+
+@item unix-word-rubout (C-w)
+Kill the word behind point, using white space as a word boundary.
+The killed text is saved on the kill-ring.
+
+@item unix-filename-rubout ()
+Kill the word behind point, using white space and the slash character
+as the word boundaries.
+The killed text is saved on the kill-ring.
+
+@item delete-horizontal-space ()
+Delete all spaces and tabs around point. By default, this is unbound.
+
+@item kill-region ()
+Kill the text in the current region.
+By default, this command is unbound.
+
+@item copy-region-as-kill ()
+Copy the text in the region to the kill buffer, so it can be yanked
+right away. By default, this command is unbound.
+
+@item copy-backward-word ()
+Copy the word before point to the kill buffer.
+The word boundaries are the same as @code{backward-word}.
+By default, this command is unbound.
+
+@item copy-forward-word ()
+Copy the word following point to the kill buffer.
+The word boundaries are the same as @code{forward-word}.
+By default, this command is unbound.
+
+@item yank (C-y)
+Yank the top of the kill ring into the buffer at point.
+
+@item yank-pop (M-y)
+Rotate the kill-ring, and yank the new top. You can only do this if
+the prior command is @code{yank} or @code{yank-pop}.
+@end ftable
+
+@node Numeric Arguments
+@subsection Specifying Numeric Arguments
+@ftable @code
+
+@item digit-argument (@kbd{M-0}, @kbd{M-1}, @dots{} @kbd{M--})
+Add this digit to the argument already accumulating, or start a new
+argument. @kbd{M--} starts a negative argument.
+
+@item universal-argument ()
+This is another way to specify an argument.
+If this command is followed by one or more digits, optionally with a
+leading minus sign, those digits define the argument.
+If the command is followed by digits, executing @code{universal-argument}
+again ends the numeric argument, but is otherwise ignored.
+As a special case, if this command is immediately followed by a
+character that is neither a digit or minus sign, the argument count
+for the next command is multiplied by four.
+The argument count is initially one, so executing this function the
+first time makes the argument count four, a second time makes the
+argument count sixteen, and so on.
+By default, this is not bound to a key.
+@end ftable
+
+@node Commands For Completion
+@subsection Letting Readline Type For You
+
+@ftable @code
+@item complete (@key{TAB})
+Attempt to perform completion on the text before point.
+The actual completion performed is application-specific.
+@ifset BashFeatures
+Bash attempts completion treating the text as a variable (if the
+text begins with @samp{$}), username (if the text begins with
+@samp{~}), hostname (if the text begins with @samp{@@}), or
+command (including aliases and functions) in turn. If none
+of these produces a match, filename completion is attempted.
+@end ifset
+@ifclear BashFeatures
+The default is filename completion.
+@end ifclear
+
+@item possible-completions (M-?)
+List the possible completions of the text before point.
+
+@item insert-completions (M-*)
+Insert all completions of the text before point that would have
+been generated by @code{possible-completions}.
+
+@item menu-complete ()
+Similar to @code{complete}, but replaces the word to be completed
+with a single match from the list of possible completions.
+Repeated execution of @code{menu-complete} steps through the list
+of possible completions, inserting each match in turn.
+At the end of the list of completions, the bell is rung
+(subject to the setting of @code{bell-style})
+and the original text is restored.
+An argument of @var{n} moves @var{n} positions forward in the list
+of matches; a negative argument may be used to move backward
+through the list.
+This command is intended to be bound to @key{TAB}, but is unbound
+by default.
+
+@item menu-complete-backward ()
+Identical to @code{menu-complete}, but moves backward through the list
+of possible completions, as if @code{menu-complete} had been given a
+negative argument.
+
+@item delete-char-or-list ()
+Deletes the character under the cursor if not at the beginning or
+end of the line (like @code{delete-char}).
+If at the end of the line, behaves identically to
+@code{possible-completions}.
+This command is unbound by default.
+
+@ifset BashFeatures
+@item complete-filename (M-/)
+Attempt filename completion on the text before point.
+
+@item possible-filename-completions (C-x /)
+List the possible completions of the text before point,
+treating it as a filename.
+
+@item complete-username (M-~)
+Attempt completion on the text before point, treating
+it as a username.
+
+@item possible-username-completions (C-x ~)
+List the possible completions of the text before point,
+treating it as a username.
+
+@item complete-variable (M-$)
+Attempt completion on the text before point, treating
+it as a shell variable.
+
+@item possible-variable-completions (C-x $)
+List the possible completions of the text before point,
+treating it as a shell variable.
+
+@item complete-hostname (M-@@)
+Attempt completion on the text before point, treating
+it as a hostname.
+
+@item possible-hostname-completions (C-x @@)
+List the possible completions of the text before point,
+treating it as a hostname.
+
+@item complete-command (M-!)
+Attempt completion on the text before point, treating
+it as a command name. Command completion attempts to
+match the text against aliases, reserved words, shell
+functions, shell builtins, and finally executable filenames,
+in that order.
+
+@item possible-command-completions (C-x !)
+List the possible completions of the text before point,
+treating it as a command name.
+
+@item dynamic-complete-history (M-@key{TAB})
+Attempt completion on the text before point, comparing
+the text against lines from the history list for possible
+completion matches.
+
+@item dabbrev-expand ()
+Attempt menu completion on the text before point, comparing
+the text against lines from the history list for possible
+completion matches.
+
+@item complete-into-braces (M-@{)
+Perform filename completion and insert the list of possible completions
+enclosed within braces so the list is available to the shell
+(@pxref{Brace Expansion}).
+
+@end ifset
+@end ftable
+
+@node Keyboard Macros
+@subsection Keyboard Macros
+@ftable @code
+
+@item start-kbd-macro (C-x ()
+Begin saving the characters typed into the current keyboard macro.
+
+@item end-kbd-macro (C-x ))
+Stop saving the characters typed into the current keyboard macro
+and save the definition.
+
+@item call-last-kbd-macro (C-x e)
+Re-execute the last keyboard macro defined, by making the characters
+in the macro appear as if typed at the keyboard.
+
+@end ftable
+
+@node Miscellaneous Commands
+@subsection Some Miscellaneous Commands
+@ftable @code
+
+@item re-read-init-file (C-x C-r)
+Read in the contents of the @var{inputrc} file, and incorporate
+any bindings or variable assignments found there.
+
+@item abort (C-g)
+Abort the current editing command and
+ring the terminal's bell (subject to the setting of
+@code{bell-style}).
+
+@item do-uppercase-version (M-a, M-b, M-@var{x}, @dots{})
+If the metafied character @var{x} is lowercase, run the command
+that is bound to the corresponding uppercase character.
+
+@item prefix-meta (@key{ESC})
+Metafy the next character typed. This is for keyboards
+without a meta key. Typing @samp{@key{ESC} f} is equivalent to typing
+@kbd{M-f}.
+
+@item undo (C-_ or C-x C-u)
+Incremental undo, separately remembered for each line.
+
+@item revert-line (M-r)
+Undo all changes made to this line. This is like executing the @code{undo}
+command enough times to get back to the beginning.
+
+@ifset BashFeatures
+@item tilde-expand (M-&)
+@end ifset
+@ifclear BashFeatures
+@item tilde-expand (M-~)
+@end ifclear
+Perform tilde expansion on the current word.
+
+@item set-mark (C-@@)
+Set the mark to the point. If a
+numeric argument is supplied, the mark is set to that position.
+
+@item exchange-point-and-mark (C-x C-x)
+Swap the point with the mark. The current cursor position is set to
+the saved position, and the old cursor position is saved as the mark.
+
+@item character-search (C-])
+A character is read and point is moved to the next occurrence of that
+character. A negative count searches for previous occurrences.
+
+@item character-search-backward (M-C-])
+A character is read and point is moved to the previous occurrence
+of that character. A negative count searches for subsequent
+occurrences.
+
+@item skip-csi-sequence ()
+Read enough characters to consume a multi-key sequence such as those
+defined for keys like Home and End. Such sequences begin with a
+Control Sequence Indicator (CSI), usually ESC-[. If this sequence is
+bound to "\e[", keys producing such sequences will have no effect
+unless explicitly bound to a readline command, instead of inserting
+stray characters into the editing buffer. This is unbound by default,
+but usually bound to ESC-[.
+
+@item insert-comment (M-#)
+Without a numeric argument, the value of the @code{comment-begin}
+variable is inserted at the beginning of the current line.
+If a numeric argument is supplied, this command acts as a toggle: if
+the characters at the beginning of the line do not match the value
+of @code{comment-begin}, the value is inserted, otherwise
+the characters in @code{comment-begin} are deleted from the beginning of
+the line.
+In either case, the line is accepted as if a newline had been typed.
+@ifset BashFeatures
+The default value of @code{comment-begin} causes this command
+to make the current line a shell comment.
+If a numeric argument causes the comment character to be removed, the line
+will be executed by the shell.
+@end ifset
+
+@item dump-functions ()
+Print all of the functions and their key bindings to the
+Readline output stream. If a numeric argument is supplied,
+the output is formatted in such a way that it can be made part
+of an @var{inputrc} file. This command is unbound by default.
+
+@item dump-variables ()
+Print all of the settable variables and their values to the
+Readline output stream. If a numeric argument is supplied,
+the output is formatted in such a way that it can be made part
+of an @var{inputrc} file. This command is unbound by default.
+
+@item dump-macros ()
+Print all of the Readline key sequences bound to macros and the
+strings they output. If a numeric argument is supplied,
+the output is formatted in such a way that it can be made part
+of an @var{inputrc} file. This command is unbound by default.
+
+@ifset BashFeatures
+@item glob-complete-word (M-g)
+The word before point is treated as a pattern for pathname expansion,
+with an asterisk implicitly appended. This pattern is used to
+generate a list of matching file names for possible completions.
+
+@item glob-expand-word (C-x *)
+The word before point is treated as a pattern for pathname expansion,
+and the list of matching file names is inserted, replacing the word.
+If a numeric argument is supplied, a @samp{*} is appended before
+pathname expansion.
+
+@item glob-list-expansions (C-x g)
+The list of expansions that would have been generated by
+@code{glob-expand-word} is displayed, and the line is redrawn.
+If a numeric argument is supplied, a @samp{*} is appended before
+pathname expansion.
+
+@item display-shell-version (C-x C-v)
+Display version information about the current instance of Bash.
+
+@item shell-expand-line (M-C-e)
+Expand the line as the shell does.
+This performs alias and history expansion as well as all of the shell
+word expansions (@pxref{Shell Expansions}).
+
+@item history-expand-line (M-^)
+Perform history expansion on the current line.
+
+@item magic-space ()
+Perform history expansion on the current line and insert a space
+(@pxref{History Interaction}).
+
+@item alias-expand-line ()
+Perform alias expansion on the current line (@pxref{Aliases}).
+
+@item history-and-alias-expand-line ()
+Perform history and alias expansion on the current line.
+
+@item insert-last-argument (M-. or M-_)
+A synonym for @code{yank-last-arg}.
+
+@item operate-and-get-next (C-o)
+Accept the current line for execution and fetch the next line
+relative to the current line from the history for editing. Any
+argument is ignored.
+
+@item edit-and-execute-command (C-xC-e)
+Invoke an editor on the current command line, and execute the result as shell
+commands.
+Bash attempts to invoke
+@code{$VISUAL}, @code{$EDITOR}, and @code{emacs}
+as the editor, in that order.
+
+@end ifset
+
+@ifclear BashFeatures
+@item emacs-editing-mode (C-e)
+When in @code{vi} command mode, this causes a switch to @code{emacs}
+editing mode.
+
+@item vi-editing-mode (M-C-j)
+When in @code{emacs} editing mode, this causes a switch to @code{vi}
+editing mode.
+
+@end ifclear
+
+@end ftable
+
+@node Readline vi Mode
+@section Readline vi Mode
+
+While the Readline library does not have a full set of @code{vi}
+editing functions, it does contain enough to allow simple editing
+of the line. The Readline @code{vi} mode behaves as specified in
+the @sc{posix} 1003.2 standard.
+
+@ifset BashFeatures
+In order to switch interactively between @code{emacs} and @code{vi}
+editing modes, use the @samp{set -o emacs} and @samp{set -o vi}
+commands (@pxref{The Set Builtin}).
+@end ifset
+@ifclear BashFeatures
+In order to switch interactively between @code{emacs} and @code{vi}
+editing modes, use the command @kbd{M-C-j} (bound to emacs-editing-mode
+when in @code{vi} mode and to vi-editing-mode in @code{emacs} mode).
+@end ifclear
+The Readline default is @code{emacs} mode.
+
+When you enter a line in @code{vi} mode, you are already placed in
+`insertion' mode, as if you had typed an @samp{i}. Pressing @key{ESC}
+switches you into `command' mode, where you can edit the text of the
+line with the standard @code{vi} movement keys, move to previous
+history lines with @samp{k} and subsequent lines with @samp{j}, and
+so forth.
+
+@ifset BashFeatures
+@node Programmable Completion
+@section Programmable Completion
+@cindex programmable completion
+
+When word completion is attempted for an argument to a command for
+which a completion specification (a @var{compspec}) has been defined
+using the @code{complete} builtin (@pxref{Programmable Completion Builtins}),
+the programmable completion facilities are invoked.
+
+First, the command name is identified.
+If a compspec has been defined for that command, the
+compspec is used to generate the list of possible completions for the word.
+If the command word is the empty string (completion attempted at the
+beginning of an empty line), any compspec defined with
+the @option{-E} option to @code{complete} is used.
+If the command word is a full pathname, a compspec for the full
+pathname is searched for first.
+If no compspec is found for the full pathname, an attempt is made to
+find a compspec for the portion following the final slash.
+If those searches do not result in a compspec, any compspec defined with
+the @option{-D} option to @code{complete} is used as the default.
+
+Once a compspec has been found, it is used to generate the list of
+matching words.
+If a compspec is not found, the default Bash completion
+described above (@pxref{Commands For Completion}) is performed.
+
+First, the actions specified by the compspec are used.
+Only matches which are prefixed by the word being completed are
+returned.
+When the @option{-f} or @option{-d} option is used for filename or
+directory name completion, the shell variable @env{FIGNORE} is
+used to filter the matches.
+@xref{Bash Variables}, for a description of @env{FIGNORE}.
+
+Any completions specified by a filename expansion pattern to the
+@option{-G} option are generated next.
+The words generated by the pattern need not match the word being completed.
+The @env{GLOBIGNORE} shell variable is not used to filter the matches,
+but the @env{FIGNORE} shell variable is used.
+
+Next, the string specified as the argument to the @option{-W} option
+is considered.
+The string is first split using the characters in the @env{IFS}
+special variable as delimiters.
+Shell quoting is honored.
+Each word is then expanded using
+brace expansion, tilde expansion, parameter and variable expansion,
+command substitution, and arithmetic expansion,
+as described above (@pxref{Shell Expansions}).
+The results are split using the rules described above
+(@pxref{Word Splitting}).
+The results of the expansion are prefix-matched against the word being
+completed, and the matching words become the possible completions.
+
+After these matches have been generated, any shell function or command
+specified with the @option{-F} and @option{-C} options is invoked.
+When the command or function is invoked, the @env{COMP_LINE},
+@env{COMP_POINT}, @env{COMP_KEY}, and @env{COMP_TYPE} variables are
+assigned values as described above (@pxref{Bash Variables}).
+If a shell function is being invoked, the @env{COMP_WORDS} and
+@env{COMP_CWORD} variables are also set.
+When the function or command is invoked, the first argument is the
+name of the command whose arguments are being completed, the
+second argument is the word being completed, and the third argument
+is the word preceding the word being completed on the current command line.
+No filtering of the generated completions against the word being completed
+is performed; the function or command has complete freedom in generating
+the matches.
+
+Any function specified with @option{-F} is invoked first.
+The function may use any of the shell facilities, including the
+@code{compgen} and @code{compopt} builtins described below
+(@pxref{Programmable Completion Builtins}), to generate the matches.
+It must put the possible completions in the @env{COMPREPLY} array
+variable.
+
+Next, any command specified with the @option{-C} option is invoked
+in an environment equivalent to command substitution.
+It should print a list of completions, one per line, to
+the standard output.
+Backslash may be used to escape a newline, if necessary.
+
+After all of the possible completions are generated, any filter
+specified with the @option{-X} option is applied to the list.
+The filter is a pattern as used for pathname expansion; a @samp{&}
+in the pattern is replaced with the text of the word being completed.
+A literal @samp{&} may be escaped with a backslash; the backslash
+is removed before attempting a match.
+Any completion that matches the pattern will be removed from the list.
+A leading @samp{!} negates the pattern; in this case any completion
+not matching the pattern will be removed.
+
+Finally, any prefix and suffix specified with the @option{-P} and @option{-S}
+options are added to each member of the completion list, and the result is
+returned to the Readline completion code as the list of possible
+completions.
+
+If the previously-applied actions do not generate any matches, and the
+@option{-o dirnames} option was supplied to @code{complete} when the
+compspec was defined, directory name completion is attempted.
+
+If the @option{-o plusdirs} option was supplied to @code{complete} when
+the compspec was defined, directory name completion is attempted and any
+matches are added to the results of the other actions.
+
+By default, if a compspec is found, whatever it generates is returned to
+the completion code as the full set of possible completions.
+The default Bash completions are not attempted, and the Readline default
+of filename completion is disabled.
+If the @option{-o bashdefault} option was supplied to @code{complete} when
+the compspec was defined, the default Bash completions are attempted
+if the compspec generates no matches.
+If the @option{-o default} option was supplied to @code{complete} when the
+compspec was defined, Readline's default completion will be performed
+if the compspec (and, if attempted, the default Bash completions)
+generate no matches.
+
+When a compspec indicates that directory name completion is desired,
+the programmable completion functions force Readline to append a slash
+to completed names which are symbolic links to directories, subject to
+the value of the @var{mark-directories} Readline variable, regardless
+of the setting of the @var{mark-symlinked-directories} Readline variable.
+
+There is some support for dynamically modifying completions. This is
+most useful when used in combination with a default completion specified
+with @option{-D}. It's possible for shell functions executed as completion
+handlers to indicate that completion should be retried by returning an
+exit status of 124. If a shell function returns 124, and changes
+the compspec associated with the command on which completion is being
+attempted (supplied as the first argument when the function is executed),
+programmable completion restarts from the beginning, with an
+attempt to find a compspec for that command. This allows a set of
+completions to be built dynamically as completion is attempted, rather than
+being loaded all at once.
+
+For instance, assuming that there is a library of compspecs, each kept in a
+file corresponding to the name of the command, the following default
+completion function would load completions dynamically:
+
+@example
+_completion_loader()
+@{
+ . "/etc/bash_completion.d/$1.sh" >/dev/null 2>&1 && return 124
+@}
+complete -D -F _completion_loader
+@end example
+
+@node Programmable Completion Builtins
+@section Programmable Completion Builtins
+@cindex completion builtins
+
+Two builtin commands are available to manipulate the programmable completion
+facilities.
+
+@table @code
+@item compgen
+@btindex compgen
+@example
+@code{compgen [@var{option}] [@var{word}]}
+@end example
+
+Generate possible completion matches for @var{word} according to
+the @var{option}s, which may be any option accepted by the
+@code{complete}
+builtin with the exception of @option{-p} and @option{-r}, and write
+the matches to the standard output.
+When using the @option{-F} or @option{-C} options, the various shell variables
+set by the programmable completion facilities, while available, will not
+have useful values.
+
+The matches will be generated in the same way as if the programmable
+completion code had generated them directly from a completion specification
+with the same flags.
+If @var{word} is specified, only those completions matching @var{word}
+will be displayed.
+
+The return value is true unless an invalid option is supplied, or no
+matches were generated.
+
+@item complete
+@btindex complete
+@example
+@code{complete [-abcdefgjksuv] [-o @var{comp-option}] [-DE] [-A @var{action}] [-G @var{globpat}] [-W @var{wordlist}]
+[-F @var{function}] [-C @var{command}] [-X @var{filterpat}]
+[-P @var{prefix}] [-S @var{suffix}] @var{name} [@var{name} @dots{}]}
+@code{complete -pr [-DE] [@var{name} @dots{}]}
+@end example
+
+Specify how arguments to each @var{name} should be completed.
+If the @option{-p} option is supplied, or if no options are supplied, existing
+completion specifications are printed in a way that allows them to be
+reused as input.
+The @option{-r} option removes a completion specification for
+each @var{name}, or, if no @var{name}s are supplied, all
+completion specifications.
+The @option{-D} option indicates that the remaining options and actions should
+apply to the ``default'' command completion; that is, completion attempted
+on a command for which no completion has previously been defined.
+The @option{-E} option indicates that the remaining options and actions should
+apply to ``empty'' command completion; that is, completion attempted on a
+blank line.
+
+The process of applying these completion specifications when word completion
+is attempted is described above (@pxref{Programmable Completion}). The
+@option{-D} option takes precedence over @option{-E}.
+
+Other options, if specified, have the following meanings.
+The arguments to the @option{-G}, @option{-W}, and @option{-X} options
+(and, if necessary, the @option{-P} and @option{-S} options)
+should be quoted to protect them from expansion before the
+@code{complete} builtin is invoked.
+
+
+@table @code
+@item -o @var{comp-option}
+The @var{comp-option} controls several aspects of the compspec's behavior
+beyond the simple generation of completions.
+@var{comp-option} may be one of:
+
+@table @code
+
+@item bashdefault
+Perform the rest of the default Bash completions if the compspec
+generates no matches.
+
+@item default
+Use Readline's default filename completion if the compspec generates
+no matches.
+
+@item dirnames
+Perform directory name completion if the compspec generates no matches.
+
+@item filenames
+Tell Readline that the compspec generates filenames, so it can perform any
+filename-specific processing (like adding a slash to directory names
+quoting special characters, or suppressing trailing spaces).
+This option is intended to be used with shell functions specified
+with @option{-F}.
+
+@item nospace
+Tell Readline not to append a space (the default) to words completed at
+the end of the line.
+
+@item plusdirs
+After any matches defined by the compspec are generated,
+directory name completion is attempted and any
+matches are added to the results of the other actions.
+
+@end table
+
+@item -A @var{action}
+The @var{action} may be one of the following to generate a list of possible
+completions:
+
+@table @code
+@item alias
+Alias names. May also be specified as @option{-a}.
+
+@item arrayvar
+Array variable names.
+
+@item binding
+Readline key binding names (@pxref{Bindable Readline Commands}).
+
+@item builtin
+Names of shell builtin commands. May also be specified as @option{-b}.
+
+@item command
+Command names. May also be specified as @option{-c}.
+
+@item directory
+Directory names. May also be specified as @option{-d}.
+
+@item disabled
+Names of disabled shell builtins.
+
+@item enabled
+Names of enabled shell builtins.
+
+@item export
+Names of exported shell variables. May also be specified as @option{-e}.
+
+@item file
+File names. May also be specified as @option{-f}.
+
+@item function
+Names of shell functions.
+
+@item group
+Group names. May also be specified as @option{-g}.
+
+@item helptopic
+Help topics as accepted by the @code{help} builtin (@pxref{Bash Builtins}).
+
+@item hostname
+Hostnames, as taken from the file specified by the
+@env{HOSTFILE} shell variable (@pxref{Bash Variables}).
+
+@item job
+Job names, if job control is active. May also be specified as @option{-j}.
+
+@item keyword
+Shell reserved words. May also be specified as @option{-k}.
+
+@item running
+Names of running jobs, if job control is active.
+
+@item service
+Service names. May also be specified as @option{-s}.
+
+@item setopt
+Valid arguments for the @option{-o} option to the @code{set} builtin
+(@pxref{The Set Builtin}).
+
+@item shopt
+Shell option names as accepted by the @code{shopt} builtin
+(@pxref{Bash Builtins}).
+
+@item signal
+Signal names.
+
+@item stopped
+Names of stopped jobs, if job control is active.
+
+@item user
+User names. May also be specified as @option{-u}.
+
+@item variable
+Names of all shell variables. May also be specified as @option{-v}.
+@end table
+
+@item -G @var{globpat}
+The filename expansion pattern @var{globpat} is expanded to generate
+the possible completions.
+
+@item -W @var{wordlist}
+The @var{wordlist} is split using the characters in the
+@env{IFS} special variable as delimiters, and each resultant word
+is expanded.
+The possible completions are the members of the resultant list which
+match the word being completed.
+
+@item -C @var{command}
+@var{command} is executed in a subshell environment, and its output is
+used as the possible completions.
+
+@item -F @var{function}
+The shell function @var{function} is executed in the current shell
+environment.
+When it finishes, the possible completions are retrieved from the value
+of the @env{COMPREPLY} array variable.
+
+@item -X @var{filterpat}
+@var{filterpat} is a pattern as used for filename expansion.
+It is applied to the list of possible completions generated by the
+preceding options and arguments, and each completion matching
+@var{filterpat} is removed from the list.
+A leading @samp{!} in @var{filterpat} negates the pattern; in this
+case, any completion not matching @var{filterpat} is removed.
+
+@item -P @var{prefix}
+@var{prefix} is added at the beginning of each possible completion
+after all other options have been applied.
+
+@item -S @var{suffix}
+@var{suffix} is appended to each possible completion
+after all other options have been applied.
+@end table
+
+The return value is true unless an invalid option is supplied, an option
+other than @option{-p} or @option{-r} is supplied without a @var{name}
+argument, an attempt is made to remove a completion specification for
+a @var{name} for which no specification exists, or
+an error occurs adding a completion specification.
+
+@item compopt
+@btindex compopt
+@example
+@code{compopt} [-o @var{option}] [-DE] [+o @var{option}] [@var{name}]
+@end example
+Modify completion options for each @var{name} according to the
+@var{option}s, or for the currently-execution completion if no @var{name}s
+are supplied.
+If no @var{option}s are given, display the completion options for each
+@var{name} or the current completion.
+The possible values of @var{option} are those valid for the @code{complete}
+builtin described above.
+The @option{-D} option indicates that the remaining options should
+apply to the ``default'' command completion; that is, completion attempted
+on a command for which no completion has previously been defined.
+The @option{-E} option indicates that the remaining options should
+apply to ``empty'' command completion; that is, completion attempted on a
+blank line.
+
+The @option{-D} option takes precedence over @option{-E}.
+
+The return value is true unless an invalid option is supplied, an attempt
+is made to modify the options for a @var{name} for which no completion
+specification exists, or an output error occurs.
+
+@end table
+
+@end ifset
diff --git a/lib/readline/doc/rluserman.texi b/lib/readline/doc/rluserman.texi
new file mode 100644
index 0000000..49d9a2c
--- /dev/null
+++ b/lib/readline/doc/rluserman.texi
@@ -0,0 +1,83 @@
+\input texinfo @c -*-texinfo-*-
+@comment %**start of header (This is for running Texinfo on a region.)
+@setfilename rluserman.info
+@settitle GNU Readline Library
+@comment %**end of header (This is for running Texinfo on a region.)
+
+@include version.texi
+
+@copying
+This manual describes the end user interface of the GNU Readline Library
+(version @value{VERSION}, @value{UPDATED}), a library which aids in the
+consistency of user interface across discrete programs which provide
+a command line interface.
+
+Copyright @copyright{} 1988--2009 Free Software Foundation, Inc.
+
+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.
+
+@quotation
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.3 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
+and with the Back-Cover Texts as in (a) below. A copy of the license is
+included in the section entitled ``GNU Free Documentation License''.
+
+(a) The FSF's Back-Cover Text is: You are free to copy and modify
+this GNU manual. Buying copies from GNU Press supports the FSF in
+developing GNU and promoting software freedom.''
+
+@end quotation
+@end copying
+
+@dircategory Libraries
+@direntry
+* RLuserman: (rluserman). The GNU readline library User's Manual.
+@end direntry
+
+@titlepage
+@title GNU Readline Library User Interface
+@subtitle Edition @value{EDITION}, for @code{Readline Library} Version @value{VERSION}.
+@subtitle @value{UPDATED-MONTH}
+@author Chet Ramey, Case Western Reserve University
+@author Brian Fox, Free Software Foundation
+
+@page
+@vskip 0pt plus 1filll
+@insertcopying
+
+@sp 1
+Published by the Free Software Foundation @*
+59 Temple Place, Suite 330, @*
+Boston, MA 02111-1307 @*
+USA @*
+
+@end titlepage
+
+@contents
+
+@ifnottex
+@node Top
+@top GNU Readline Library
+
+This document describes the end user interface of the GNU Readline Library,
+a utility which aids in the consistency of user interface across discrete
+programs which provide a command line interface.
+
+@menu
+* Command Line Editing:: GNU Readline User's Manual.
+* GNU Free Documentation License:: License for copying this manual.
+@end menu
+@end ifnottex
+
+@include rluser.texi
+
+@node GNU Free Documentation License
+@appendix GNU Free Documentation License
+
+@include fdl.texi
+
+@bye
diff --git a/lib/readline/doc/version.texi b/lib/readline/doc/version.texi
new file mode 100644
index 0000000..823b3ba
--- /dev/null
+++ b/lib/readline/doc/version.texi
@@ -0,0 +1,10 @@
+@ignore
+Copyright (C) 1988-2009 Free Software Foundation, Inc.
+@end ignore
+
+@set EDITION 6.1
+@set VERSION 6.1
+@set UPDATED 9 October 2009
+@set UPDATED-MONTH October 2009
+
+@set LASTCHANGE Fri Oct 9 12:57:58 EDT 2009
diff --git a/lib/readline/emacs_keymap.c b/lib/readline/emacs_keymap.c
new file mode 100644
index 0000000..cb6e140
--- /dev/null
+++ b/lib/readline/emacs_keymap.c
@@ -0,0 +1,872 @@
+/* emacs_keymap.c -- the keymap for emacs_mode in readline (). */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (BUFSIZ)
+#include <stdio.h>
+#endif /* !BUFSIZ */
+
+#include "readline.h"
+
+/* An array of function pointers, one for each possible key.
+ If the type byte is ISKMAP, then the pointer is the address of
+ a keymap. */
+
+KEYMAP_ENTRY_ARRAY emacs_standard_keymap = {
+
+ /* Control keys. */
+ { ISFUNC, rl_set_mark }, /* Control-@ */
+ { ISFUNC, rl_beg_of_line }, /* Control-a */
+ { ISFUNC, rl_backward_char }, /* Control-b */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */
+ { ISFUNC, rl_delete }, /* Control-d */
+ { ISFUNC, rl_end_of_line }, /* Control-e */
+ { ISFUNC, rl_forward_char }, /* Control-f */
+ { ISFUNC, rl_abort }, /* Control-g */
+ { ISFUNC, rl_rubout }, /* Control-h */
+ { ISFUNC, rl_complete }, /* Control-i */
+ { ISFUNC, rl_newline }, /* Control-j */
+ { ISFUNC, rl_kill_line }, /* Control-k */
+ { ISFUNC, rl_clear_screen }, /* Control-l */
+ { ISFUNC, rl_newline }, /* Control-m */
+ { ISFUNC, rl_get_next_history }, /* Control-n */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */
+ { ISFUNC, rl_get_previous_history }, /* Control-p */
+ { ISFUNC, rl_quoted_insert }, /* Control-q */
+ { ISFUNC, rl_reverse_search_history }, /* Control-r */
+ { ISFUNC, rl_forward_search_history }, /* Control-s */
+ { ISFUNC, rl_transpose_chars }, /* Control-t */
+ { ISFUNC, rl_unix_line_discard }, /* Control-u */
+ { ISFUNC, rl_quoted_insert }, /* Control-v */
+ { ISFUNC, rl_unix_word_rubout }, /* Control-w */
+ { ISKMAP, (rl_command_func_t *)emacs_ctlx_keymap }, /* Control-x */
+ { ISFUNC, rl_yank }, /* Control-y */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */
+ { ISKMAP, (rl_command_func_t *)emacs_meta_keymap }, /* Control-[ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */
+ { ISFUNC, rl_char_search }, /* Control-] */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */
+ { ISFUNC, rl_undo_command }, /* Control-_ */
+
+ /* The start of printing characters. */
+ { ISFUNC, rl_insert }, /* SPACE */
+ { ISFUNC, rl_insert }, /* ! */
+ { ISFUNC, rl_insert }, /* " */
+ { ISFUNC, rl_insert }, /* # */
+ { ISFUNC, rl_insert }, /* $ */
+ { ISFUNC, rl_insert }, /* % */
+ { ISFUNC, rl_insert }, /* & */
+ { ISFUNC, rl_insert }, /* ' */
+ { ISFUNC, rl_insert }, /* ( */
+ { ISFUNC, rl_insert }, /* ) */
+ { ISFUNC, rl_insert }, /* * */
+ { ISFUNC, rl_insert }, /* + */
+ { ISFUNC, rl_insert }, /* , */
+ { ISFUNC, rl_insert }, /* - */
+ { ISFUNC, rl_insert }, /* . */
+ { ISFUNC, rl_insert }, /* / */
+
+ /* Regular digits. */
+ { ISFUNC, rl_insert }, /* 0 */
+ { ISFUNC, rl_insert }, /* 1 */
+ { ISFUNC, rl_insert }, /* 2 */
+ { ISFUNC, rl_insert }, /* 3 */
+ { ISFUNC, rl_insert }, /* 4 */
+ { ISFUNC, rl_insert }, /* 5 */
+ { ISFUNC, rl_insert }, /* 6 */
+ { ISFUNC, rl_insert }, /* 7 */
+ { ISFUNC, rl_insert }, /* 8 */
+ { ISFUNC, rl_insert }, /* 9 */
+
+ /* A little more punctuation. */
+ { ISFUNC, rl_insert }, /* : */
+ { ISFUNC, rl_insert }, /* ; */
+ { ISFUNC, rl_insert }, /* < */
+ { ISFUNC, rl_insert }, /* = */
+ { ISFUNC, rl_insert }, /* > */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* @ */
+
+ /* Uppercase alphabet. */
+ { ISFUNC, rl_insert }, /* A */
+ { ISFUNC, rl_insert }, /* B */
+ { ISFUNC, rl_insert }, /* C */
+ { ISFUNC, rl_insert }, /* D */
+ { ISFUNC, rl_insert }, /* E */
+ { ISFUNC, rl_insert }, /* F */
+ { ISFUNC, rl_insert }, /* G */
+ { ISFUNC, rl_insert }, /* H */
+ { ISFUNC, rl_insert }, /* I */
+ { ISFUNC, rl_insert }, /* J */
+ { ISFUNC, rl_insert }, /* K */
+ { ISFUNC, rl_insert }, /* L */
+ { ISFUNC, rl_insert }, /* M */
+ { ISFUNC, rl_insert }, /* N */
+ { ISFUNC, rl_insert }, /* O */
+ { ISFUNC, rl_insert }, /* P */
+ { ISFUNC, rl_insert }, /* Q */
+ { ISFUNC, rl_insert }, /* R */
+ { ISFUNC, rl_insert }, /* S */
+ { ISFUNC, rl_insert }, /* T */
+ { ISFUNC, rl_insert }, /* U */
+ { ISFUNC, rl_insert }, /* V */
+ { ISFUNC, rl_insert }, /* W */
+ { ISFUNC, rl_insert }, /* X */
+ { ISFUNC, rl_insert }, /* Y */
+ { ISFUNC, rl_insert }, /* Z */
+
+ /* Some more punctuation. */
+ { ISFUNC, rl_insert }, /* [ */
+ { ISFUNC, rl_insert }, /* \ */
+ { ISFUNC, rl_insert }, /* ] */
+ { ISFUNC, rl_insert }, /* ^ */
+ { ISFUNC, rl_insert }, /* _ */
+ { ISFUNC, rl_insert }, /* ` */
+
+ /* Lowercase alphabet. */
+ { ISFUNC, rl_insert }, /* a */
+ { ISFUNC, rl_insert }, /* b */
+ { ISFUNC, rl_insert }, /* c */
+ { ISFUNC, rl_insert }, /* d */
+ { ISFUNC, rl_insert }, /* e */
+ { ISFUNC, rl_insert }, /* f */
+ { ISFUNC, rl_insert }, /* g */
+ { ISFUNC, rl_insert }, /* h */
+ { ISFUNC, rl_insert }, /* i */
+ { ISFUNC, rl_insert }, /* j */
+ { ISFUNC, rl_insert }, /* k */
+ { ISFUNC, rl_insert }, /* l */
+ { ISFUNC, rl_insert }, /* m */
+ { ISFUNC, rl_insert }, /* n */
+ { ISFUNC, rl_insert }, /* o */
+ { ISFUNC, rl_insert }, /* p */
+ { ISFUNC, rl_insert }, /* q */
+ { ISFUNC, rl_insert }, /* r */
+ { ISFUNC, rl_insert }, /* s */
+ { ISFUNC, rl_insert }, /* t */
+ { ISFUNC, rl_insert }, /* u */
+ { ISFUNC, rl_insert }, /* v */
+ { ISFUNC, rl_insert }, /* w */
+ { ISFUNC, rl_insert }, /* x */
+ { ISFUNC, rl_insert }, /* y */
+ { ISFUNC, rl_insert }, /* z */
+
+ /* Final punctuation. */
+ { ISFUNC, rl_insert }, /* { */
+ { ISFUNC, rl_insert }, /* | */
+ { ISFUNC, rl_insert }, /* } */
+ { ISFUNC, rl_insert }, /* ~ */
+ { ISFUNC, rl_rubout }, /* RUBOUT */
+
+#if KEYMAP_SIZE > 128
+ /* Pure 8-bit characters (128 - 159).
+ These might be used in some
+ character sets. */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+
+ /* ISO Latin-1 characters (160 - 255) */
+ { ISFUNC, rl_insert }, /* No-break space */
+ { ISFUNC, rl_insert }, /* Inverted exclamation mark */
+ { ISFUNC, rl_insert }, /* Cent sign */
+ { ISFUNC, rl_insert }, /* Pound sign */
+ { ISFUNC, rl_insert }, /* Currency sign */
+ { ISFUNC, rl_insert }, /* Yen sign */
+ { ISFUNC, rl_insert }, /* Broken bar */
+ { ISFUNC, rl_insert }, /* Section sign */
+ { ISFUNC, rl_insert }, /* Diaeresis */
+ { ISFUNC, rl_insert }, /* Copyright sign */
+ { ISFUNC, rl_insert }, /* Feminine ordinal indicator */
+ { ISFUNC, rl_insert }, /* Left pointing double angle quotation mark */
+ { ISFUNC, rl_insert }, /* Not sign */
+ { ISFUNC, rl_insert }, /* Soft hyphen */
+ { ISFUNC, rl_insert }, /* Registered sign */
+ { ISFUNC, rl_insert }, /* Macron */
+ { ISFUNC, rl_insert }, /* Degree sign */
+ { ISFUNC, rl_insert }, /* Plus-minus sign */
+ { ISFUNC, rl_insert }, /* Superscript two */
+ { ISFUNC, rl_insert }, /* Superscript three */
+ { ISFUNC, rl_insert }, /* Acute accent */
+ { ISFUNC, rl_insert }, /* Micro sign */
+ { ISFUNC, rl_insert }, /* Pilcrow sign */
+ { ISFUNC, rl_insert }, /* Middle dot */
+ { ISFUNC, rl_insert }, /* Cedilla */
+ { ISFUNC, rl_insert }, /* Superscript one */
+ { ISFUNC, rl_insert }, /* Masculine ordinal indicator */
+ { ISFUNC, rl_insert }, /* Right pointing double angle quotation mark */
+ { ISFUNC, rl_insert }, /* Vulgar fraction one quarter */
+ { ISFUNC, rl_insert }, /* Vulgar fraction one half */
+ { ISFUNC, rl_insert }, /* Vulgar fraction three quarters */
+ { ISFUNC, rl_insert }, /* Inverted questionk mark */
+ { ISFUNC, rl_insert }, /* Latin capital letter a with grave */
+ { ISFUNC, rl_insert }, /* Latin capital letter a with acute */
+ { ISFUNC, rl_insert }, /* Latin capital letter a with circumflex */
+ { ISFUNC, rl_insert }, /* Latin capital letter a with tilde */
+ { ISFUNC, rl_insert }, /* Latin capital letter a with diaeresis */
+ { ISFUNC, rl_insert }, /* Latin capital letter a with ring above */
+ { ISFUNC, rl_insert }, /* Latin capital letter ae */
+ { ISFUNC, rl_insert }, /* Latin capital letter c with cedilla */
+ { ISFUNC, rl_insert }, /* Latin capital letter e with grave */
+ { ISFUNC, rl_insert }, /* Latin capital letter e with acute */
+ { ISFUNC, rl_insert }, /* Latin capital letter e with circumflex */
+ { ISFUNC, rl_insert }, /* Latin capital letter e with diaeresis */
+ { ISFUNC, rl_insert }, /* Latin capital letter i with grave */
+ { ISFUNC, rl_insert }, /* Latin capital letter i with acute */
+ { ISFUNC, rl_insert }, /* Latin capital letter i with circumflex */
+ { ISFUNC, rl_insert }, /* Latin capital letter i with diaeresis */
+ { ISFUNC, rl_insert }, /* Latin capital letter eth (Icelandic) */
+ { ISFUNC, rl_insert }, /* Latin capital letter n with tilde */
+ { ISFUNC, rl_insert }, /* Latin capital letter o with grave */
+ { ISFUNC, rl_insert }, /* Latin capital letter o with acute */
+ { ISFUNC, rl_insert }, /* Latin capital letter o with circumflex */
+ { ISFUNC, rl_insert }, /* Latin capital letter o with tilde */
+ { ISFUNC, rl_insert }, /* Latin capital letter o with diaeresis */
+ { ISFUNC, rl_insert }, /* Multiplication sign */
+ { ISFUNC, rl_insert }, /* Latin capital letter o with stroke */
+ { ISFUNC, rl_insert }, /* Latin capital letter u with grave */
+ { ISFUNC, rl_insert }, /* Latin capital letter u with acute */
+ { ISFUNC, rl_insert }, /* Latin capital letter u with circumflex */
+ { ISFUNC, rl_insert }, /* Latin capital letter u with diaeresis */
+ { ISFUNC, rl_insert }, /* Latin capital letter Y with acute */
+ { ISFUNC, rl_insert }, /* Latin capital letter thorn (Icelandic) */
+ { ISFUNC, rl_insert }, /* Latin small letter sharp s (German) */
+ { ISFUNC, rl_insert }, /* Latin small letter a with grave */
+ { ISFUNC, rl_insert }, /* Latin small letter a with acute */
+ { ISFUNC, rl_insert }, /* Latin small letter a with circumflex */
+ { ISFUNC, rl_insert }, /* Latin small letter a with tilde */
+ { ISFUNC, rl_insert }, /* Latin small letter a with diaeresis */
+ { ISFUNC, rl_insert }, /* Latin small letter a with ring above */
+ { ISFUNC, rl_insert }, /* Latin small letter ae */
+ { ISFUNC, rl_insert }, /* Latin small letter c with cedilla */
+ { ISFUNC, rl_insert }, /* Latin small letter e with grave */
+ { ISFUNC, rl_insert }, /* Latin small letter e with acute */
+ { ISFUNC, rl_insert }, /* Latin small letter e with circumflex */
+ { ISFUNC, rl_insert }, /* Latin small letter e with diaeresis */
+ { ISFUNC, rl_insert }, /* Latin small letter i with grave */
+ { ISFUNC, rl_insert }, /* Latin small letter i with acute */
+ { ISFUNC, rl_insert }, /* Latin small letter i with circumflex */
+ { ISFUNC, rl_insert }, /* Latin small letter i with diaeresis */
+ { ISFUNC, rl_insert }, /* Latin small letter eth (Icelandic) */
+ { ISFUNC, rl_insert }, /* Latin small letter n with tilde */
+ { ISFUNC, rl_insert }, /* Latin small letter o with grave */
+ { ISFUNC, rl_insert }, /* Latin small letter o with acute */
+ { ISFUNC, rl_insert }, /* Latin small letter o with circumflex */
+ { ISFUNC, rl_insert }, /* Latin small letter o with tilde */
+ { ISFUNC, rl_insert }, /* Latin small letter o with diaeresis */
+ { ISFUNC, rl_insert }, /* Division sign */
+ { ISFUNC, rl_insert }, /* Latin small letter o with stroke */
+ { ISFUNC, rl_insert }, /* Latin small letter u with grave */
+ { ISFUNC, rl_insert }, /* Latin small letter u with acute */
+ { ISFUNC, rl_insert }, /* Latin small letter u with circumflex */
+ { ISFUNC, rl_insert }, /* Latin small letter u with diaeresis */
+ { ISFUNC, rl_insert }, /* Latin small letter y with acute */
+ { ISFUNC, rl_insert }, /* Latin small letter thorn (Icelandic) */
+ { ISFUNC, rl_insert } /* Latin small letter y with diaeresis */
+#endif /* KEYMAP_SIZE > 128 */
+};
+
+KEYMAP_ENTRY_ARRAY emacs_meta_keymap = {
+
+ /* Meta keys. Just like above, but the high bit is set. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-@ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-a */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-b */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-c */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-d */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-e */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-f */
+ { ISFUNC, rl_abort }, /* Meta-Control-g */
+ { ISFUNC, rl_backward_kill_word }, /* Meta-Control-h */
+ { ISFUNC, rl_tab_insert }, /* Meta-Control-i */
+ { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-j */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-k */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-l */
+ { ISFUNC, rl_vi_editing_mode }, /* Meta-Control-m */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-n */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-o */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-p */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-q */
+ { ISFUNC, rl_revert_line }, /* Meta-Control-r */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-s */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-t */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-u */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-v */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-w */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-x */
+ { ISFUNC, rl_yank_nth_arg }, /* Meta-Control-y */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-z */
+
+ { ISFUNC, rl_complete }, /* Meta-Control-[ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-\ */
+ { ISFUNC, rl_backward_char_search }, /* Meta-Control-] */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-^ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-Control-_ */
+
+ /* The start of printing characters. */
+ { ISFUNC, rl_set_mark }, /* Meta-SPACE */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-! */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-" */
+ { ISFUNC, rl_insert_comment }, /* Meta-# */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-$ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-% */
+ { ISFUNC, rl_tilde_expand }, /* Meta-& */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-' */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-( */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-) */
+ { ISFUNC, rl_insert_completions }, /* Meta-* */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-+ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-, */
+ { ISFUNC, rl_digit_argument }, /* Meta-- */
+ { ISFUNC, rl_yank_last_arg}, /* Meta-. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-/ */
+
+ /* Regular digits. */
+ { ISFUNC, rl_digit_argument }, /* Meta-0 */
+ { ISFUNC, rl_digit_argument }, /* Meta-1 */
+ { ISFUNC, rl_digit_argument }, /* Meta-2 */
+ { ISFUNC, rl_digit_argument }, /* Meta-3 */
+ { ISFUNC, rl_digit_argument }, /* Meta-4 */
+ { ISFUNC, rl_digit_argument }, /* Meta-5 */
+ { ISFUNC, rl_digit_argument }, /* Meta-6 */
+ { ISFUNC, rl_digit_argument }, /* Meta-7 */
+ { ISFUNC, rl_digit_argument }, /* Meta-8 */
+ { ISFUNC, rl_digit_argument }, /* Meta-9 */
+
+ /* A little more punctuation. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-: */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-; */
+ { ISFUNC, rl_beginning_of_history }, /* Meta-< */
+ { ISFUNC, rl_possible_completions }, /* Meta-= */
+ { ISFUNC, rl_end_of_history }, /* Meta-> */
+ { ISFUNC, rl_possible_completions }, /* Meta-? */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-@ */
+
+ /* Uppercase alphabet. */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-A */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-B */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-C */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-D */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-E */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-F */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-G */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-H */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-I */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-J */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-K */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-L */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-M */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-N */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-O */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-P */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-Q */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-R */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-S */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-T */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-U */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-V */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-W */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-X */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-Y */
+ { ISFUNC, rl_do_lowercase_version }, /* Meta-Z */
+
+ /* Some more punctuation. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-[ */ /* was rl_arrow_keys */
+ { ISFUNC, rl_delete_horizontal_space }, /* Meta-\ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-] */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-^ */
+ { ISFUNC, rl_yank_last_arg }, /* Meta-_ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-` */
+
+ /* Lowercase alphabet. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-a */
+ { ISFUNC, rl_backward_word }, /* Meta-b */
+ { ISFUNC, rl_capitalize_word }, /* Meta-c */
+ { ISFUNC, rl_kill_word }, /* Meta-d */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-e */
+ { ISFUNC, rl_forward_word }, /* Meta-f */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-g */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-h */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-i */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-j */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-k */
+ { ISFUNC, rl_downcase_word }, /* Meta-l */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-m */
+ { ISFUNC, rl_noninc_forward_search }, /* Meta-n */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-o */ /* was rl_arrow_keys */
+ { ISFUNC, rl_noninc_reverse_search }, /* Meta-p */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-q */
+ { ISFUNC, rl_revert_line }, /* Meta-r */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-s */
+ { ISFUNC, rl_transpose_words }, /* Meta-t */
+ { ISFUNC, rl_upcase_word }, /* Meta-u */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-v */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-w */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-x */
+ { ISFUNC, rl_yank_pop }, /* Meta-y */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-z */
+
+ /* Final punctuation. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-{ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-| */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Meta-} */
+ { ISFUNC, rl_tilde_expand }, /* Meta-~ */
+ { ISFUNC, rl_backward_kill_word }, /* Meta-rubout */
+
+#if KEYMAP_SIZE > 128
+ /* Undefined keys. */
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 }
+#endif /* KEYMAP_SIZE > 128 */
+};
+
+KEYMAP_ENTRY_ARRAY emacs_ctlx_keymap = {
+
+ /* Control keys. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-a */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-b */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-d */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-e */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-f */
+ { ISFUNC, rl_abort }, /* Control-g */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-h */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-i */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-j */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-k */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-l */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-m */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-n */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-p */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-q */
+ { ISFUNC, rl_re_read_init_file }, /* Control-r */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-s */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-t */
+ { ISFUNC, rl_undo_command }, /* Control-u */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-v */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-w */
+ { ISFUNC, rl_exchange_point_and_mark }, /* Control-x */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-y */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-[ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-] */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-_ */
+
+ /* The start of printing characters. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* SPACE */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ! */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* " */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* # */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* $ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* % */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* & */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ' */
+ { ISFUNC, rl_start_kbd_macro }, /* ( */
+ { ISFUNC, rl_end_kbd_macro }, /* ) */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* * */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* + */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* , */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* - */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* . */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* / */
+
+ /* Regular digits. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* 0 */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* 1 */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* 2 */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* 3 */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* 4 */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* 5 */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* 6 */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* 7 */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* 8 */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* 9 */
+
+ /* A little more punctuation. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* : */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ; */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* < */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* = */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* > */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ? */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* @ */
+
+ /* Uppercase alphabet. */
+ { ISFUNC, rl_do_lowercase_version }, /* A */
+ { ISFUNC, rl_do_lowercase_version }, /* B */
+ { ISFUNC, rl_do_lowercase_version }, /* C */
+ { ISFUNC, rl_do_lowercase_version }, /* D */
+ { ISFUNC, rl_do_lowercase_version }, /* E */
+ { ISFUNC, rl_do_lowercase_version }, /* F */
+ { ISFUNC, rl_do_lowercase_version }, /* G */
+ { ISFUNC, rl_do_lowercase_version }, /* H */
+ { ISFUNC, rl_do_lowercase_version }, /* I */
+ { ISFUNC, rl_do_lowercase_version }, /* J */
+ { ISFUNC, rl_do_lowercase_version }, /* K */
+ { ISFUNC, rl_do_lowercase_version }, /* L */
+ { ISFUNC, rl_do_lowercase_version }, /* M */
+ { ISFUNC, rl_do_lowercase_version }, /* N */
+ { ISFUNC, rl_do_lowercase_version }, /* O */
+ { ISFUNC, rl_do_lowercase_version }, /* P */
+ { ISFUNC, rl_do_lowercase_version }, /* Q */
+ { ISFUNC, rl_do_lowercase_version }, /* R */
+ { ISFUNC, rl_do_lowercase_version }, /* S */
+ { ISFUNC, rl_do_lowercase_version }, /* T */
+ { ISFUNC, rl_do_lowercase_version }, /* U */
+ { ISFUNC, rl_do_lowercase_version }, /* V */
+ { ISFUNC, rl_do_lowercase_version }, /* W */
+ { ISFUNC, rl_do_lowercase_version }, /* X */
+ { ISFUNC, rl_do_lowercase_version }, /* Y */
+ { ISFUNC, rl_do_lowercase_version }, /* Z */
+
+ /* Some more punctuation. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* [ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* \ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ] */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ^ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* _ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ` */
+
+ /* Lowercase alphabet. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* a */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* b */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* c */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* d */
+ { ISFUNC, rl_call_last_kbd_macro }, /* e */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* f */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* g */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* h */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* i */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* j */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* k */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* l */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* m */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* n */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* o */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* p */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* q */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* r */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* s */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* t */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* u */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* v */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* w */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* x */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* y */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* z */
+
+ /* Final punctuation. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* { */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* | */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* } */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ~ */
+ { ISFUNC, rl_backward_kill_line }, /* RUBOUT */
+
+#if KEYMAP_SIZE > 128
+ /* Undefined keys. */
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 }
+#endif /* KEYMAP_SIZE > 128 */
+};
diff --git a/lib/readline/examples/Inputrc b/lib/readline/examples/Inputrc
new file mode 100644
index 0000000..a358bc4
--- /dev/null
+++ b/lib/readline/examples/Inputrc
@@ -0,0 +1,81 @@
+# My ~/.inputrc file is in -*- text -*- for easy editing with Emacs.
+#
+# Notice the various bindings which are conditionalized depending
+# on which program is running, or what terminal is active.
+#
+
+# Copyright (C) 1989-2009 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+# In all programs, all terminals, make sure this is bound.
+"\C-x\C-r": re-read-init-file
+
+# Hp terminals (and some others) have ugly default behaviour for C-h.
+"\C-h": backward-delete-char
+"\e\C-h": backward-kill-word
+"\C-xd": dump-functions
+
+# In xterm windows, make the arrow keys do the right thing.
+$if TERM=xterm
+"\e[A": previous-history
+"\e[B": next-history
+"\e[C": forward-char
+"\e[D": backward-char
+
+# alternate arrow key prefix
+"\eOA": previous-history
+"\eOB": next-history
+"\eOC": forward-char
+"\eOD": backward-char
+
+# Under Xterm in Bash, we bind local Function keys to do something useful.
+$if Bash
+"\e[11~": "Function Key 1"
+"\e[12~": "Function Key 2"
+"\e[13~": "Function Key 3"
+"\e[14~": "Function Key 4"
+"\e[15~": "Function Key 5"
+
+# I know the following escape sequence numbers are 1 greater than
+# the function key. Don't ask me why, I didn't design the xterm terminal.
+"\e[17~": "Function Key 6"
+"\e[18~": "Function Key 7"
+"\e[19~": "Function Key 8"
+"\e[20~": "Function Key 9"
+"\e[21~": "Function Key 10"
+$endif
+$endif
+
+# For Bash, all terminals, add some Bash specific hacks.
+$if Bash
+"\C-xv": show-bash-version
+"\C-x\C-e": shell-expand-line
+
+# Here is one for editing my path.
+"\C-xp": "$PATH\C-x\C-e\C-e\"\C-aPATH=\":\C-b"
+
+# Make C-x r read my mail in emacs.
+# "\C-xr": "emacs -f rmail\C-j"
+$endif
+
+# For FTP, different hacks:
+$if Ftp
+"\C-xg": "get \M-?"
+"\C-xt": "put \M-?"
+"\M-.": yank-last-arg
+$endif
+
+" ": self-insert
diff --git a/lib/readline/examples/Makefile b/lib/readline/examples/Makefile
new file mode 100644
index 0000000..2df2240
--- /dev/null
+++ b/lib/readline/examples/Makefile
@@ -0,0 +1,44 @@
+# This is the Makefile for the examples subdirectory of readline. -*- text -*-
+#
+# Copyright (C) 1994 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+EXECUTABLES = fileman rltest rl
+CFLAGS = -g -I../.. -I.. -DREADLINE_LIBRARY
+LDFLAGS = -g -L..
+
+.c.o:
+ $(CC) $(CFLAGS) -c $<
+
+all: $(EXECUTABLES)
+
+
+rl: rl.o
+ $(CC) $(LDFLAGS) -o $@ rl.o -lreadline -ltermcap
+
+fileman: fileman.o
+ $(CC) $(LDFLAGS) -o $@ fileman.o -lreadline -ltermcap
+
+rltest: rltest.o
+ $(CC) $(LDFLAGS) -o $@ rltest.o -lreadline -ltermcap
+
+rlcat: rlcat.o
+ $(CC) $(LDFLAGS) -o $@ rlcat.o -lreadline -ltermcap
+
+fileman.o: fileman.c
+rltest.o: rltest.c
+rl.o: rl.c
+rlcat.o: rlcat.c
diff --git a/lib/readline/examples/excallback.c b/lib/readline/examples/excallback.c
new file mode 100644
index 0000000..385492b
--- /dev/null
+++ b/lib/readline/examples/excallback.c
@@ -0,0 +1,191 @@
+/*
+From: Jeff Solomon <jsolomon@stanford.edu>
+Date: Fri, 9 Apr 1999 10:13:27 -0700 (PDT)
+To: chet@po.cwru.edu
+Subject: new readline example
+Message-ID: <14094.12094.527305.199695@mrclean.Stanford.EDU>
+
+Chet,
+
+I've been using readline 4.0. Specifically, I've been using the perl
+version Term::ReadLine::Gnu. It works great.
+
+Anyway, I've been playing around the alternate interface and I wanted
+to contribute a little C program, callback.c, to you that you could
+use as an example of the alternate interface in the /examples
+directory of the readline distribution.
+
+My example shows how, using the alternate interface, you can
+interactively change the prompt (which is very nice imo). Also, I
+point out that you must roll your own terminal setting when using the
+alternate interface because readline depreps (using your parlance) the
+terminal while in the user callback. I try to demostrate what I mean
+with an example. I've included the program below.
+
+To compile, I just put the program in the examples directory and made
+the appropriate changes to the EXECUTABLES and OBJECTS line and added
+an additional target 'callback'.
+
+I compiled on my Sun Solaris2.6 box using Sun's cc.
+
+Let me know what you think.
+
+Jeff
+*/
+/*
+Copyright (C) 1999 Jeff Solomon
+*/
+
+#if defined (HAVE_CONFIG_H)
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include <termios.h> /* xxx - should make this more general */
+
+#ifdef READLINE_LIBRARY
+# include "readline.h"
+#else
+# include <readline/readline.h>
+#endif
+
+/* This little examples demonstrates the alternate interface to using readline.
+ * In the alternate interface, the user maintains control over program flow and
+ * only calls readline when STDIN is readable. Using the alternate interface,
+ * you can do anything else while still using readline (like talking to a
+ * network or another program) without blocking.
+ *
+ * Specifically, this program highlights two importants features of the
+ * alternate interface. The first is the ability to interactively change the
+ * prompt, which can't be done using the regular interface since rl_prompt is
+ * read-only.
+ *
+ * The second feature really highlights a subtle point when using the alternate
+ * interface. That is, readline will not alter the terminal when inside your
+ * callback handler. So let's so, your callback executes a user command that
+ * takes a non-trivial amount of time to complete (seconds). While your
+ * executing the command, the user continues to type keystrokes and expects them
+ * to be re-echoed on the new prompt when it returns. Unfortunately, the default
+ * terminal configuration doesn't do this. After the prompt returns, the user
+ * must hit one additional keystroke and then will see all of his previous
+ * keystrokes. To illustrate this, compile and run this program. Type "sleep" at
+ * the prompt and then type "bar" before the prompt returns (you have 3
+ * seconds). Notice how "bar" is re-echoed on the prompt after the prompt
+ * returns? This is what you expect to happen. Now comment out the 4 lines below
+ * the line that says COMMENT LINE BELOW. Recompile and rerun the program and do
+ * the same thing. When the prompt returns, you should not see "bar". Now type
+ * "f", see how "barf" magically appears? This behavior is un-expected and not
+ * desired.
+ */
+
+void process_line(char *line);
+int change_prompt(void);
+char *get_prompt(void);
+
+int prompt = 1;
+char prompt_buf[40], line_buf[256];
+tcflag_t old_lflag;
+cc_t old_vtime;
+struct termios term;
+
+int
+main()
+{
+ fd_set fds;
+
+ /* Adjust the terminal slightly before the handler is installed. Disable
+ * canonical mode processing and set the input character time flag to be
+ * non-blocking.
+ */
+ if( tcgetattr(STDIN_FILENO, &term) < 0 ) {
+ perror("tcgetattr");
+ exit(1);
+ }
+ old_lflag = term.c_lflag;
+ old_vtime = term.c_cc[VTIME];
+ term.c_lflag &= ~ICANON;
+ term.c_cc[VTIME] = 1;
+ /* COMMENT LINE BELOW - see above */
+ if( tcsetattr(STDIN_FILENO, TCSANOW, &term) < 0 ) {
+ perror("tcsetattr");
+ exit(1);
+ }
+
+ rl_add_defun("change-prompt", change_prompt, CTRL('t'));
+ rl_callback_handler_install(get_prompt(), process_line);
+
+ while(1) {
+ FD_ZERO(&fds);
+ FD_SET(fileno(stdin), &fds);
+
+ if( select(FD_SETSIZE, &fds, NULL, NULL, NULL) < 0) {
+ perror("select");
+ exit(1);
+ }
+
+ if( FD_ISSET(fileno(stdin), &fds) ) {
+ rl_callback_read_char();
+ }
+ }
+}
+
+void
+process_line(char *line)
+{
+ if( line == NULL ) {
+ fprintf(stderr, "\n", line);
+
+ /* reset the old terminal setting before exiting */
+ term.c_lflag = old_lflag;
+ term.c_cc[VTIME] = old_vtime;
+ if( tcsetattr(STDIN_FILENO, TCSANOW, &term) < 0 ) {
+ perror("tcsetattr");
+ exit(1);
+ }
+ exit(0);
+ }
+
+ if( strcmp(line, "sleep") == 0 ) {
+ sleep(3);
+ } else {
+ fprintf(stderr, "|%s|\n", line);
+ }
+
+ free (line);
+}
+
+int
+change_prompt(void)
+{
+ /* toggle the prompt variable */
+ prompt = !prompt;
+
+ /* save away the current contents of the line */
+ strcpy(line_buf, rl_line_buffer);
+
+ /* install a new handler which will change the prompt and erase the current line */
+ rl_callback_handler_install(get_prompt(), process_line);
+
+ /* insert the old text on the new line */
+ rl_insert_text(line_buf);
+
+ /* redraw the current line - this is an undocumented function. It invokes the
+ * redraw-current-line command.
+ */
+ rl_refresh_line(0, 0);
+}
+
+char *
+get_prompt(void)
+{
+ /* The prompts can even be different lengths! */
+ sprintf(prompt_buf, "%s",
+ prompt ? "Hit ctrl-t to toggle prompt> " : "Pretty cool huh?> ");
+ return prompt_buf;
+}
diff --git a/lib/readline/examples/fileman.c b/lib/readline/examples/fileman.c
new file mode 100644
index 0000000..f7eed8a
--- /dev/null
+++ b/lib/readline/examples/fileman.c
@@ -0,0 +1,488 @@
+/* fileman.c - file manager example for readline library. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library for
+ reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* fileman.c -- A tiny application which demonstrates how to use the
+ GNU Readline library. This application interactively allows users
+ to manipulate files and their modes. */
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#ifdef HAVE_SYS_FILE_H
+# include <sys/file.h>
+#endif
+#include <sys/stat.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <errno.h>
+
+#if defined (HAVE_STRING_H)
+# include <string.h>
+#else /* !HAVE_STRING_H */
+# include <strings.h>
+#endif /* !HAVE_STRING_H */
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#include <time.h>
+
+#ifdef READLINE_LIBRARY
+# include "readline.h"
+# include "history.h"
+#else
+# include <readline/readline.h>
+# include <readline/history.h>
+#endif
+
+extern char *xmalloc PARAMS((size_t));
+
+/* The names of functions that actually do the manipulation. */
+int com_list PARAMS((char *));
+int com_view PARAMS((char *));
+int com_rename PARAMS((char *));
+int com_stat PARAMS((char *));
+int com_pwd PARAMS((char *));
+int com_delete PARAMS((char *));
+int com_help PARAMS((char *));
+int com_cd PARAMS((char *));
+int com_quit PARAMS((char *));
+
+/* A structure which contains information on the commands this program
+ can understand. */
+
+typedef struct {
+ char *name; /* User printable name of the function. */
+ rl_icpfunc_t *func; /* Function to call to do the job. */
+ char *doc; /* Documentation for this function. */
+} COMMAND;
+
+COMMAND commands[] = {
+ { "cd", com_cd, "Change to directory DIR" },
+ { "delete", com_delete, "Delete FILE" },
+ { "help", com_help, "Display this text" },
+ { "?", com_help, "Synonym for `help'" },
+ { "list", com_list, "List files in DIR" },
+ { "ls", com_list, "Synonym for `list'" },
+ { "pwd", com_pwd, "Print the current working directory" },
+ { "quit", com_quit, "Quit using Fileman" },
+ { "rename", com_rename, "Rename FILE to NEWNAME" },
+ { "stat", com_stat, "Print out statistics on FILE" },
+ { "view", com_view, "View the contents of FILE" },
+ { (char *)NULL, (rl_icpfunc_t *)NULL, (char *)NULL }
+};
+
+/* Forward declarations. */
+char *stripwhite ();
+COMMAND *find_command ();
+
+/* The name of this program, as taken from argv[0]. */
+char *progname;
+
+/* When non-zero, this global means the user is done using this program. */
+int done;
+
+char *
+dupstr (s)
+ char *s;
+{
+ char *r;
+
+ r = xmalloc (strlen (s) + 1);
+ strcpy (r, s);
+ return (r);
+}
+
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ char *line, *s;
+
+ progname = argv[0];
+
+ initialize_readline (); /* Bind our completer. */
+
+ /* Loop reading and executing lines until the user quits. */
+ for ( ; done == 0; )
+ {
+ line = readline ("FileMan: ");
+
+ if (!line)
+ break;
+
+ /* Remove leading and trailing whitespace from the line.
+ Then, if there is anything left, add it to the history list
+ and execute it. */
+ s = stripwhite (line);
+
+ if (*s)
+ {
+ add_history (s);
+ execute_line (s);
+ }
+
+ free (line);
+ }
+ exit (0);
+}
+
+/* Execute a command line. */
+int
+execute_line (line)
+ char *line;
+{
+ register int i;
+ COMMAND *command;
+ char *word;
+
+ /* Isolate the command word. */
+ i = 0;
+ while (line[i] && whitespace (line[i]))
+ i++;
+ word = line + i;
+
+ while (line[i] && !whitespace (line[i]))
+ i++;
+
+ if (line[i])
+ line[i++] = '\0';
+
+ command = find_command (word);
+
+ if (!command)
+ {
+ fprintf (stderr, "%s: No such command for FileMan.\n", word);
+ return (-1);
+ }
+
+ /* Get argument to command, if any. */
+ while (whitespace (line[i]))
+ i++;
+
+ word = line + i;
+
+ /* Call the function. */
+ return ((*(command->func)) (word));
+}
+
+/* Look up NAME as the name of a command, and return a pointer to that
+ command. Return a NULL pointer if NAME isn't a command name. */
+COMMAND *
+find_command (name)
+ char *name;
+{
+ register int i;
+
+ for (i = 0; commands[i].name; i++)
+ if (strcmp (name, commands[i].name) == 0)
+ return (&commands[i]);
+
+ return ((COMMAND *)NULL);
+}
+
+/* Strip whitespace from the start and end of STRING. Return a pointer
+ into STRING. */
+char *
+stripwhite (string)
+ char *string;
+{
+ register char *s, *t;
+
+ for (s = string; whitespace (*s); s++)
+ ;
+
+ if (*s == 0)
+ return (s);
+
+ t = s + strlen (s) - 1;
+ while (t > s && whitespace (*t))
+ t--;
+ *++t = '\0';
+
+ return s;
+}
+
+/* **************************************************************** */
+/* */
+/* Interface to Readline Completion */
+/* */
+/* **************************************************************** */
+
+char *command_generator PARAMS((const char *, int));
+char **fileman_completion PARAMS((const char *, int, int));
+
+/* Tell the GNU Readline library how to complete. We want to try to complete
+ on command names if this is the first word in the line, or on filenames
+ if not. */
+initialize_readline ()
+{
+ /* Allow conditional parsing of the ~/.inputrc file. */
+ rl_readline_name = "FileMan";
+
+ /* Tell the completer that we want a crack first. */
+ rl_attempted_completion_function = fileman_completion;
+}
+
+/* Attempt to complete on the contents of TEXT. START and END bound the
+ region of rl_line_buffer that contains the word to complete. TEXT is
+ the word to complete. We can use the entire contents of rl_line_buffer
+ in case we want to do some simple parsing. Return the array of matches,
+ or NULL if there aren't any. */
+char **
+fileman_completion (text, start, end)
+ const char *text;
+ int start, end;
+{
+ char **matches;
+
+ matches = (char **)NULL;
+
+ /* If this word is at the start of the line, then it is a command
+ to complete. Otherwise it is the name of a file in the current
+ directory. */
+ if (start == 0)
+ matches = rl_completion_matches (text, command_generator);
+
+ return (matches);
+}
+
+/* Generator function for command completion. STATE lets us know whether
+ to start from scratch; without any state (i.e. STATE == 0), then we
+ start at the top of the list. */
+char *
+command_generator (text, state)
+ const char *text;
+ int state;
+{
+ static int list_index, len;
+ char *name;
+
+ /* If this is a new word to complete, initialize now. This includes
+ saving the length of TEXT for efficiency, and initializing the index
+ variable to 0. */
+ if (!state)
+ {
+ list_index = 0;
+ len = strlen (text);
+ }
+
+ /* Return the next name which partially matches from the command list. */
+ while (name = commands[list_index].name)
+ {
+ list_index++;
+
+ if (strncmp (name, text, len) == 0)
+ return (dupstr(name));
+ }
+
+ /* If no names matched, then return NULL. */
+ return ((char *)NULL);
+}
+
+/* **************************************************************** */
+/* */
+/* FileMan Commands */
+/* */
+/* **************************************************************** */
+
+/* String to pass to system (). This is for the LIST, VIEW and RENAME
+ commands. */
+static char syscom[1024];
+
+/* List the file(s) named in arg. */
+com_list (arg)
+ char *arg;
+{
+ if (!arg)
+ arg = "";
+
+ sprintf (syscom, "ls -FClg %s", arg);
+ return (system (syscom));
+}
+
+com_view (arg)
+ char *arg;
+{
+ if (!valid_argument ("view", arg))
+ return 1;
+
+#if defined (__MSDOS__)
+ /* more.com doesn't grok slashes in pathnames */
+ sprintf (syscom, "less %s", arg);
+#else
+ sprintf (syscom, "more %s", arg);
+#endif
+ return (system (syscom));
+}
+
+com_rename (arg)
+ char *arg;
+{
+ too_dangerous ("rename");
+ return (1);
+}
+
+com_stat (arg)
+ char *arg;
+{
+ struct stat finfo;
+
+ if (!valid_argument ("stat", arg))
+ return (1);
+
+ if (stat (arg, &finfo) == -1)
+ {
+ perror (arg);
+ return (1);
+ }
+
+ printf ("Statistics for `%s':\n", arg);
+
+ printf ("%s has %d link%s, and is %d byte%s in length.\n",
+ arg,
+ finfo.st_nlink,
+ (finfo.st_nlink == 1) ? "" : "s",
+ finfo.st_size,
+ (finfo.st_size == 1) ? "" : "s");
+ printf ("Inode Last Change at: %s", ctime (&finfo.st_ctime));
+ printf (" Last access at: %s", ctime (&finfo.st_atime));
+ printf (" Last modified at: %s", ctime (&finfo.st_mtime));
+ return (0);
+}
+
+com_delete (arg)
+ char *arg;
+{
+ too_dangerous ("delete");
+ return (1);
+}
+
+/* Print out help for ARG, or for all of the commands if ARG is
+ not present. */
+com_help (arg)
+ char *arg;
+{
+ register int i;
+ int printed = 0;
+
+ for (i = 0; commands[i].name; i++)
+ {
+ if (!*arg || (strcmp (arg, commands[i].name) == 0))
+ {
+ printf ("%s\t\t%s.\n", commands[i].name, commands[i].doc);
+ printed++;
+ }
+ }
+
+ if (!printed)
+ {
+ printf ("No commands match `%s'. Possibilties are:\n", arg);
+
+ for (i = 0; commands[i].name; i++)
+ {
+ /* Print in six columns. */
+ if (printed == 6)
+ {
+ printed = 0;
+ printf ("\n");
+ }
+
+ printf ("%s\t", commands[i].name);
+ printed++;
+ }
+
+ if (printed)
+ printf ("\n");
+ }
+ return (0);
+}
+
+/* Change to the directory ARG. */
+com_cd (arg)
+ char *arg;
+{
+ if (chdir (arg) == -1)
+ {
+ perror (arg);
+ return 1;
+ }
+
+ com_pwd ("");
+ return (0);
+}
+
+/* Print out the current working directory. */
+com_pwd (ignore)
+ char *ignore;
+{
+ char dir[1024], *s;
+
+ s = getcwd (dir, sizeof(dir) - 1);
+ if (s == 0)
+ {
+ printf ("Error getting pwd: %s\n", dir);
+ return 1;
+ }
+
+ printf ("Current directory is %s\n", dir);
+ return 0;
+}
+
+/* The user wishes to quit using this program. Just set DONE non-zero. */
+com_quit (arg)
+ char *arg;
+{
+ done = 1;
+ return (0);
+}
+
+/* Function which tells you that you can't do this. */
+too_dangerous (caller)
+ char *caller;
+{
+ fprintf (stderr,
+ "%s: Too dangerous for me to distribute. Write it yourself.\n",
+ caller);
+}
+
+/* Return non-zero if ARG is a valid argument for CALLER, else print
+ an error message and return zero. */
+int
+valid_argument (caller, arg)
+ char *caller, *arg;
+{
+ if (!arg || !*arg)
+ {
+ fprintf (stderr, "%s: Argument required.\n", caller);
+ return (0);
+ }
+
+ return (1);
+}
diff --git a/lib/readline/examples/histexamp.c b/lib/readline/examples/histexamp.c
new file mode 100644
index 0000000..3b43674
--- /dev/null
+++ b/lib/readline/examples/histexamp.c
@@ -0,0 +1,125 @@
+/* histexamp.c - history library example program. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library for
+ reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <stdio.h>
+
+#ifdef READLINE_LIBRARY
+# include "history.h"
+#else
+# include <readline/history.h>
+#endif
+
+#include <string.h>
+
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ char line[1024], *t;
+ int len, done;
+
+ line[0] = 0;
+ done = 0;
+
+ using_history ();
+ while (!done)
+ {
+ printf ("history$ ");
+ fflush (stdout);
+ t = fgets (line, sizeof (line) - 1, stdin);
+ if (t && *t)
+ {
+ len = strlen (t);
+ if (t[len - 1] == '\n')
+ t[len - 1] = '\0';
+ }
+
+ if (!t)
+ strcpy (line, "quit");
+
+ if (line[0])
+ {
+ char *expansion;
+ int result;
+
+ using_history ();
+
+ result = history_expand (line, &expansion);
+ if (result)
+ fprintf (stderr, "%s\n", expansion);
+
+ if (result < 0 || result == 2)
+ {
+ free (expansion);
+ continue;
+ }
+
+ add_history (expansion);
+ strncpy (line, expansion, sizeof (line) - 1);
+ free (expansion);
+ }
+
+ if (strcmp (line, "quit") == 0)
+ done = 1;
+ else if (strcmp (line, "save") == 0)
+ write_history ("history_file");
+ else if (strcmp (line, "read") == 0)
+ read_history ("history_file");
+ else if (strcmp (line, "list") == 0)
+ {
+ register HIST_ENTRY **the_list;
+ register int i;
+ time_t tt;
+ char timestr[128];
+
+ the_list = history_list ();
+ if (the_list)
+ for (i = 0; the_list[i]; i++)
+ {
+ tt = history_get_time (the_list[i]);
+ if (tt)
+ strftime (timestr, sizeof (timestr), "%a %R", localtime(&tt));
+ else
+ strcpy (timestr, "??");
+ printf ("%d: %s: %s\n", i + history_base, timestr, the_list[i]->line);
+ }
+ }
+ else if (strncmp (line, "delete", 6) == 0)
+ {
+ int which;
+ if ((sscanf (line + 6, "%d", &which)) == 1)
+ {
+ HIST_ENTRY *entry = remove_history (which);
+ if (!entry)
+ fprintf (stderr, "No such entry %d\n", which);
+ else
+ {
+ free (entry->line);
+ free (entry);
+ }
+ }
+ else
+ {
+ fprintf (stderr, "non-numeric arg given to `delete'\n");
+ }
+ }
+ }
+}
diff --git a/lib/readline/examples/manexamp.c b/lib/readline/examples/manexamp.c
new file mode 100644
index 0000000..351c628
--- /dev/null
+++ b/lib/readline/examples/manexamp.c
@@ -0,0 +1,111 @@
+/* manexamp.c -- The examples which appear in the documentation are here. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library for
+ reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <stdio.h>
+#include <readline/readline.h>
+
+/* **************************************************************** */
+/* */
+/* How to Emulate gets () */
+/* */
+/* **************************************************************** */
+
+/* A static variable for holding the line. */
+static char *line_read = (char *)NULL;
+
+/* Read a string, and return a pointer to it. Returns NULL on EOF. */
+char *
+rl_gets ()
+{
+ /* If the buffer has already been allocated, return the memory
+ to the free pool. */
+ if (line_read)
+ {
+ free (line_read);
+ line_read = (char *)NULL;
+ }
+
+ /* Get a line from the user. */
+ line_read = readline ("");
+
+ /* If the line has any text in it, save it on the history. */
+ if (line_read && *line_read)
+ add_history (line_read);
+
+ return (line_read);
+}
+
+/* **************************************************************** */
+/* */
+/* Writing a Function to be Called by Readline. */
+/* */
+/* **************************************************************** */
+
+/* Invert the case of the COUNT following characters. */
+invert_case_line (count, key)
+ int count, key;
+{
+ register int start, end;
+
+ start = rl_point;
+
+ if (count < 0)
+ {
+ direction = -1;
+ count = -count;
+ }
+ else
+ direction = 1;
+
+ /* Find the end of the range to modify. */
+ end = start + (count * direction);
+
+ /* Force it to be within range. */
+ if (end > rl_end)
+ end = rl_end;
+ else if (end < 0)
+ end = -1;
+
+ if (start > end)
+ {
+ int temp = start;
+ start = end;
+ end = temp;
+ }
+
+ if (start == end)
+ return;
+
+ /* Tell readline that we are modifying the line, so save the undo
+ information. */
+ rl_modifying (start, end);
+
+ for (; start != end; start += direction)
+ {
+ if (_rl_uppercase_p (rl_line_buffer[start]))
+ rl_line_buffer[start] = _rl_to_lower (rl_line_buffer[start]);
+ else if (_rl_lowercase_p (rl_line_buffer[start]))
+ rl_line_buffer[start] = _rl_to_upper (rl_line_buffer[start]);
+ }
+
+ /* Move point to on top of the last character changed. */
+ rl_point = end - direction;
+}
diff --git a/lib/readline/examples/rl.c b/lib/readline/examples/rl.c
new file mode 100644
index 0000000..845a4b1
--- /dev/null
+++ b/lib/readline/examples/rl.c
@@ -0,0 +1,157 @@
+/*
+ * rl - command-line interface to read a line from the standard input
+ * (or another fd) using readline.
+ *
+ * usage: rl [-p prompt] [-u unit] [-d default] [-n nchars]
+ */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library for
+ reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern void exit();
+#endif
+
+#if defined (READLINE_LIBRARY)
+# include "posixstat.h"
+# include "readline.h"
+# include "history.h"
+#else
+# include <sys/stat.h>
+# include <readline/readline.h>
+# include <readline/history.h>
+#endif
+
+extern int optind;
+extern char *optarg;
+
+#if !defined (strchr) && !defined (__STDC__)
+extern char *strrchr();
+#endif
+
+static char *progname;
+static char *deftext;
+
+static int
+set_deftext ()
+{
+ if (deftext)
+ {
+ rl_insert_text (deftext);
+ deftext = (char *)NULL;
+ rl_startup_hook = (rl_hook_func_t *)NULL;
+ }
+ return 0;
+}
+
+static void
+usage()
+{
+ fprintf (stderr, "%s: usage: %s [-p prompt] [-u unit] [-d default] [-n nchars]\n",
+ progname, progname);
+}
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ char *temp, *prompt;
+ struct stat sb;
+ int opt, fd, nch;
+ FILE *ifp;
+
+ progname = strrchr(argv[0], '/');
+ if (progname == 0)
+ progname = argv[0];
+ else
+ progname++;
+
+ /* defaults */
+ prompt = "readline$ ";
+ fd = nch = 0;
+ deftext = (char *)0;
+
+ while ((opt = getopt(argc, argv, "p:u:d:n:")) != EOF)
+ {
+ switch (opt)
+ {
+ case 'p':
+ prompt = optarg;
+ break;
+ case 'u':
+ fd = atoi(optarg);
+ if (fd < 0)
+ {
+ fprintf (stderr, "%s: bad file descriptor `%s'\n", progname, optarg);
+ exit (2);
+ }
+ break;
+ case 'd':
+ deftext = optarg;
+ break;
+ case 'n':
+ nch = atoi(optarg);
+ if (nch < 0)
+ {
+ fprintf (stderr, "%s: bad value for -n: `%s'\n", progname, optarg);
+ exit (2);
+ }
+ break;
+ default:
+ usage ();
+ exit (2);
+ }
+ }
+
+ if (fd != 0)
+ {
+ if (fstat (fd, &sb) < 0)
+ {
+ fprintf (stderr, "%s: %d: bad file descriptor\n", progname, fd);
+ exit (1);
+ }
+ ifp = fdopen (fd, "r");
+ rl_instream = ifp;
+ }
+
+ if (deftext && *deftext)
+ rl_startup_hook = set_deftext;
+
+ if (nch > 0)
+ rl_num_chars_to_read = nch;
+
+ temp = readline (prompt);
+
+ /* Test for EOF. */
+ if (temp == 0)
+ exit (1);
+
+ printf ("%s\n", temp);
+ exit (0);
+}
diff --git a/lib/readline/examples/rlcat.c b/lib/readline/examples/rlcat.c
new file mode 100644
index 0000000..fa9e06f
--- /dev/null
+++ b/lib/readline/examples/rlcat.c
@@ -0,0 +1,179 @@
+/*
+ * rlcat - cat(1) using readline
+ *
+ * usage: rlcat
+ */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library for
+ reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include <sys/types.h>
+#include "posixstat.h"
+
+#include <stdio.h>
+#include <ctype.h>
+#include <string.h>
+#include <errno.h>
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern void exit();
+#endif
+
+#ifndef errno
+extern int errno;
+#endif
+
+#if defined (READLINE_LIBRARY)
+# include "readline.h"
+# include "history.h"
+#else
+# include <readline/readline.h>
+# include <readline/history.h>
+#endif
+
+extern int optind;
+extern char *optarg;
+
+static int stdcat();
+
+static char *progname;
+static int vflag;
+
+static void
+usage()
+{
+ fprintf (stderr, "%s: usage: %s [-vEVN] [filename]\n", progname, progname);
+}
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ char *temp;
+ int opt, Vflag, Nflag;
+
+ progname = strrchr(argv[0], '/');
+ if (progname == 0)
+ progname = argv[0];
+ else
+ progname++;
+
+ vflag = Vflag = Nflag = 0;
+ while ((opt = getopt(argc, argv, "vEVN")) != EOF)
+ {
+ switch (opt)
+ {
+ case 'v':
+ vflag = 1;
+ break;
+ case 'V':
+ Vflag = 1;
+ break;
+ case 'E':
+ Vflag = 0;
+ break;
+ case 'N':
+ Nflag = 1;
+ break;
+ default:
+ usage ();
+ exit (2);
+ }
+ }
+
+ argc -= optind;
+ argv += optind;
+
+ if (isatty(0) == 0 || argc || Nflag)
+ return stdcat(argc, argv);
+
+ rl_variable_bind ("editing-mode", Vflag ? "vi" : "emacs");
+ while (temp = readline (""))
+ {
+ if (*temp)
+ add_history (temp);
+ printf ("%s\n", temp);
+ }
+
+ return (ferror (stdout));
+}
+
+static int
+fcopy(fp)
+ FILE *fp;
+{
+ int c;
+ char *x;
+
+ while ((c = getc(fp)) != EOF)
+ {
+ if (vflag && isascii ((unsigned char)c) && isprint((unsigned char)c) == 0)
+ {
+ x = rl_untranslate_keyseq (c);
+ if (fputs (x, stdout) != 0)
+ return 1;
+ }
+ else if (putchar (c) == EOF)
+ return 1;
+ }
+ return (ferror (stdout));
+}
+
+int
+stdcat (argc, argv)
+ int argc;
+ char **argv;
+{
+ int i, fd, r;
+ char *s;
+ FILE *fp;
+
+ if (argc == 0)
+ return (fcopy(stdin));
+
+ for (i = 0, r = 1; i < argc; i++)
+ {
+ if (*argv[i] == '-' && argv[i][1] == 0)
+ fp = stdin;
+ else
+ {
+ fp = fopen (argv[i], "r");
+ if (fp == 0)
+ {
+ fprintf (stderr, "%s: %s: cannot open: %s\n", progname, argv[i], strerror(errno));
+ continue;
+ }
+ }
+ r = fcopy (fp);
+ if (fp != stdin)
+ fclose(fp);
+ }
+ return r;
+}
diff --git a/lib/readline/examples/rltest.c b/lib/readline/examples/rltest.c
new file mode 100644
index 0000000..78e2608
--- /dev/null
+++ b/lib/readline/examples/rltest.c
@@ -0,0 +1,92 @@
+/* **************************************************************** */
+/* */
+/* Testing Readline */
+/* */
+/* **************************************************************** */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library for
+ reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined (HAVE_CONFIG_H)
+#include <config.h>
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern void exit();
+#endif
+
+#ifdef READLINE_LIBRARY
+# include "readline.h"
+# include "history.h"
+#else
+# include <readline/readline.h>
+# include <readline/history.h>
+#endif
+
+extern HIST_ENTRY **history_list ();
+
+main ()
+{
+ char *temp, *prompt;
+ int done;
+
+ temp = (char *)NULL;
+ prompt = "readline$ ";
+ done = 0;
+
+ while (!done)
+ {
+ temp = readline (prompt);
+
+ /* Test for EOF. */
+ if (!temp)
+ exit (1);
+
+ /* If there is anything on the line, print it and remember it. */
+ if (*temp)
+ {
+ fprintf (stderr, "%s\r\n", temp);
+ add_history (temp);
+ }
+
+ /* Check for `command' that we handle. */
+ if (strcmp (temp, "quit") == 0)
+ done = 1;
+
+ if (strcmp (temp, "list") == 0)
+ {
+ HIST_ENTRY **list;
+ register int i;
+
+ list = history_list ();
+ if (list)
+ {
+ for (i = 0; list[i]; i++)
+ fprintf (stderr, "%d: %s\r\n", i, list[i]->line);
+ }
+ }
+ free (temp);
+ }
+ exit (0);
+}
diff --git a/lib/readline/funmap.c b/lib/readline/funmap.c
new file mode 100644
index 0000000..cccddb6
--- /dev/null
+++ b/lib/readline/funmap.c
@@ -0,0 +1,258 @@
+/* funmap.c -- attach names to functions. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#if !defined (BUFSIZ)
+#include <stdio.h>
+#endif /* BUFSIZ */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#include "rlconf.h"
+#include "readline.h"
+
+#include "xmalloc.h"
+
+#ifdef __STDC__
+typedef int QSFUNC (const void *, const void *);
+#else
+typedef int QSFUNC ();
+#endif
+
+extern int _rl_qsort_string_compare PARAMS((char **, char **));
+
+FUNMAP **funmap;
+static int funmap_size;
+static int funmap_entry;
+
+/* After initializing the function map, this is the index of the first
+ program specific function. */
+int funmap_program_specific_entry_start;
+
+static const FUNMAP default_funmap[] = {
+ { "abort", rl_abort },
+ { "accept-line", rl_newline },
+ { "arrow-key-prefix", rl_arrow_keys },
+ { "backward-byte", rl_backward_byte },
+ { "backward-char", rl_backward_char },
+ { "backward-delete-char", rl_rubout },
+ { "backward-kill-line", rl_backward_kill_line },
+ { "backward-kill-word", rl_backward_kill_word },
+ { "backward-word", rl_backward_word },
+ { "beginning-of-history", rl_beginning_of_history },
+ { "beginning-of-line", rl_beg_of_line },
+ { "call-last-kbd-macro", rl_call_last_kbd_macro },
+ { "capitalize-word", rl_capitalize_word },
+ { "character-search", rl_char_search },
+ { "character-search-backward", rl_backward_char_search },
+ { "clear-screen", rl_clear_screen },
+ { "complete", rl_complete },
+ { "copy-backward-word", rl_copy_backward_word },
+ { "copy-forward-word", rl_copy_forward_word },
+ { "copy-region-as-kill", rl_copy_region_to_kill },
+ { "delete-char", rl_delete },
+ { "delete-char-or-list", rl_delete_or_show_completions },
+ { "delete-horizontal-space", rl_delete_horizontal_space },
+ { "digit-argument", rl_digit_argument },
+ { "do-lowercase-version", rl_do_lowercase_version },
+ { "downcase-word", rl_downcase_word },
+ { "dump-functions", rl_dump_functions },
+ { "dump-macros", rl_dump_macros },
+ { "dump-variables", rl_dump_variables },
+ { "emacs-editing-mode", rl_emacs_editing_mode },
+ { "end-kbd-macro", rl_end_kbd_macro },
+ { "end-of-history", rl_end_of_history },
+ { "end-of-line", rl_end_of_line },
+ { "exchange-point-and-mark", rl_exchange_point_and_mark },
+ { "forward-backward-delete-char", rl_rubout_or_delete },
+ { "forward-byte", rl_forward_byte },
+ { "forward-char", rl_forward_char },
+ { "forward-search-history", rl_forward_search_history },
+ { "forward-word", rl_forward_word },
+ { "history-search-backward", rl_history_search_backward },
+ { "history-search-forward", rl_history_search_forward },
+ { "insert-comment", rl_insert_comment },
+ { "insert-completions", rl_insert_completions },
+ { "kill-whole-line", rl_kill_full_line },
+ { "kill-line", rl_kill_line },
+ { "kill-region", rl_kill_region },
+ { "kill-word", rl_kill_word },
+ { "menu-complete", rl_menu_complete },
+ { "menu-complete-backward", rl_backward_menu_complete },
+ { "next-history", rl_get_next_history },
+ { "non-incremental-forward-search-history", rl_noninc_forward_search },
+ { "non-incremental-reverse-search-history", rl_noninc_reverse_search },
+ { "non-incremental-forward-search-history-again", rl_noninc_forward_search_again },
+ { "non-incremental-reverse-search-history-again", rl_noninc_reverse_search_again },
+ { "old-menu-complete", rl_old_menu_complete },
+ { "overwrite-mode", rl_overwrite_mode },
+#ifdef __CYGWIN__
+ { "paste-from-clipboard", rl_paste_from_clipboard },
+#endif
+ { "possible-completions", rl_possible_completions },
+ { "previous-history", rl_get_previous_history },
+ { "quoted-insert", rl_quoted_insert },
+ { "re-read-init-file", rl_re_read_init_file },
+ { "redraw-current-line", rl_refresh_line},
+ { "reverse-search-history", rl_reverse_search_history },
+ { "revert-line", rl_revert_line },
+ { "self-insert", rl_insert },
+ { "set-mark", rl_set_mark },
+ { "skip-csi-sequence", rl_skip_csi_sequence },
+ { "start-kbd-macro", rl_start_kbd_macro },
+ { "tab-insert", rl_tab_insert },
+ { "tilde-expand", rl_tilde_expand },
+ { "transpose-chars", rl_transpose_chars },
+ { "transpose-words", rl_transpose_words },
+ { "tty-status", rl_tty_status },
+ { "undo", rl_undo_command },
+ { "universal-argument", rl_universal_argument },
+ { "unix-filename-rubout", rl_unix_filename_rubout },
+ { "unix-line-discard", rl_unix_line_discard },
+ { "unix-word-rubout", rl_unix_word_rubout },
+ { "upcase-word", rl_upcase_word },
+ { "yank", rl_yank },
+ { "yank-last-arg", rl_yank_last_arg },
+ { "yank-nth-arg", rl_yank_nth_arg },
+ { "yank-pop", rl_yank_pop },
+
+#if defined (VI_MODE)
+ { "vi-append-eol", rl_vi_append_eol },
+ { "vi-append-mode", rl_vi_append_mode },
+ { "vi-arg-digit", rl_vi_arg_digit },
+ { "vi-back-to-indent", rl_vi_back_to_indent },
+ { "vi-bWord", rl_vi_bWord },
+ { "vi-bword", rl_vi_bword },
+ { "vi-change-case", rl_vi_change_case },
+ { "vi-change-char", rl_vi_change_char },
+ { "vi-change-to", rl_vi_change_to },
+ { "vi-char-search", rl_vi_char_search },
+ { "vi-column", rl_vi_column },
+ { "vi-complete", rl_vi_complete },
+ { "vi-delete", rl_vi_delete },
+ { "vi-delete-to", rl_vi_delete_to },
+ { "vi-eWord", rl_vi_eWord },
+ { "vi-editing-mode", rl_vi_editing_mode },
+ { "vi-end-word", rl_vi_end_word },
+ { "vi-eof-maybe", rl_vi_eof_maybe },
+ { "vi-eword", rl_vi_eword },
+ { "vi-fWord", rl_vi_fWord },
+ { "vi-fetch-history", rl_vi_fetch_history },
+ { "vi-first-print", rl_vi_first_print },
+ { "vi-fword", rl_vi_fword },
+ { "vi-goto-mark", rl_vi_goto_mark },
+ { "vi-insert-beg", rl_vi_insert_beg },
+ { "vi-insertion-mode", rl_vi_insertion_mode },
+ { "vi-match", rl_vi_match },
+ { "vi-movement-mode", rl_vi_movement_mode },
+ { "vi-next-word", rl_vi_next_word },
+ { "vi-overstrike", rl_vi_overstrike },
+ { "vi-overstrike-delete", rl_vi_overstrike_delete },
+ { "vi-prev-word", rl_vi_prev_word },
+ { "vi-put", rl_vi_put },
+ { "vi-redo", rl_vi_redo },
+ { "vi-replace", rl_vi_replace },
+ { "vi-rubout", rl_vi_rubout },
+ { "vi-search", rl_vi_search },
+ { "vi-search-again", rl_vi_search_again },
+ { "vi-set-mark", rl_vi_set_mark },
+ { "vi-subst", rl_vi_subst },
+ { "vi-tilde-expand", rl_vi_tilde_expand },
+ { "vi-yank-arg", rl_vi_yank_arg },
+ { "vi-yank-to", rl_vi_yank_to },
+#endif /* VI_MODE */
+
+ {(char *)NULL, (rl_command_func_t *)NULL }
+};
+
+int
+rl_add_funmap_entry (name, function)
+ const char *name;
+ rl_command_func_t *function;
+{
+ if (funmap_entry + 2 >= funmap_size)
+ {
+ funmap_size += 64;
+ funmap = (FUNMAP **)xrealloc (funmap, funmap_size * sizeof (FUNMAP *));
+ }
+
+ funmap[funmap_entry] = (FUNMAP *)xmalloc (sizeof (FUNMAP));
+ funmap[funmap_entry]->name = name;
+ funmap[funmap_entry]->function = function;
+
+ funmap[++funmap_entry] = (FUNMAP *)NULL;
+ return funmap_entry;
+}
+
+static int funmap_initialized;
+
+/* Make the funmap contain all of the default entries. */
+void
+rl_initialize_funmap ()
+{
+ register int i;
+
+ if (funmap_initialized)
+ return;
+
+ for (i = 0; default_funmap[i].name; i++)
+ rl_add_funmap_entry (default_funmap[i].name, default_funmap[i].function);
+
+ funmap_initialized = 1;
+ funmap_program_specific_entry_start = i;
+}
+
+/* Produce a NULL terminated array of known function names. The array
+ is sorted. The array itself is allocated, but not the strings inside.
+ You should free () the array when you done, but not the pointrs. */
+const char **
+rl_funmap_names ()
+{
+ const char **result;
+ int result_size, result_index;
+
+ /* Make sure that the function map has been initialized. */
+ rl_initialize_funmap ();
+
+ for (result_index = result_size = 0, result = (const char **)NULL; funmap[result_index]; result_index++)
+ {
+ if (result_index + 2 > result_size)
+ {
+ result_size += 20;
+ result = (const char **)xrealloc (result, result_size * sizeof (char *));
+ }
+
+ result[result_index] = funmap[result_index]->name;
+ result[result_index + 1] = (char *)NULL;
+ }
+
+ qsort (result, result_index, sizeof (char *), (QSFUNC *)_rl_qsort_string_compare);
+ return (result);
+}
diff --git a/lib/readline/histexpand.c b/lib/readline/histexpand.c
new file mode 100644
index 0000000..42498d2
--- /dev/null
+++ b/lib/readline/histexpand.c
@@ -0,0 +1,1621 @@
+/* histexpand.c -- history expansion. */
+
+/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
+
+ This file contains the GNU History Library (History), a set of
+ routines for managing the text of previously typed lines.
+
+ History is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ History is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with History. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <stdio.h>
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#if defined (HAVE_UNISTD_H)
+# ifndef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "rlmbutil.h"
+
+#include "history.h"
+#include "histlib.h"
+
+#include "rlshell.h"
+#include "xmalloc.h"
+
+#define HISTORY_WORD_DELIMITERS " \t\n;&()|<>"
+#define HISTORY_QUOTE_CHARACTERS "\"'`"
+
+#define slashify_in_quotes "\\`\"$"
+
+typedef int _hist_search_func_t PARAMS((const char *, int));
+
+static char error_pointer;
+
+static char *subst_lhs;
+static char *subst_rhs;
+static int subst_lhs_len;
+static int subst_rhs_len;
+
+static char *get_history_word_specifier PARAMS((char *, char *, int *));
+static int history_tokenize_word PARAMS((const char *, int));
+static char **history_tokenize_internal PARAMS((const char *, int, int *));
+static char *history_substring PARAMS((const char *, int, int));
+static void freewords PARAMS((char **, int));
+static char *history_find_word PARAMS((char *, int));
+
+static char *quote_breaks PARAMS((char *));
+
+/* Variables exported by this file. */
+/* The character that represents the start of a history expansion
+ request. This is usually `!'. */
+char history_expansion_char = '!';
+
+/* The character that invokes word substitution if found at the start of
+ a line. This is usually `^'. */
+char history_subst_char = '^';
+
+/* During tokenization, if this character is seen as the first character
+ of a word, then it, and all subsequent characters upto a newline are
+ ignored. For a Bourne shell, this should be '#'. Bash special cases
+ the interactive comment character to not be a comment delimiter. */
+char history_comment_char = '\0';
+
+/* The list of characters which inhibit the expansion of text if found
+ immediately following history_expansion_char. */
+char *history_no_expand_chars = " \t\n\r=";
+
+/* If set to a non-zero value, single quotes inhibit history expansion.
+ The default is 0. */
+int history_quotes_inhibit_expansion = 0;
+
+/* Used to split words by history_tokenize_internal. */
+char *history_word_delimiters = HISTORY_WORD_DELIMITERS;
+
+/* If set, this points to a function that is called to verify that a
+ particular history expansion should be performed. */
+rl_linebuf_func_t *history_inhibit_expansion_function;
+
+/* **************************************************************** */
+/* */
+/* History Expansion */
+/* */
+/* **************************************************************** */
+
+/* Hairy history expansion on text, not tokens. This is of general
+ use, and thus belongs in this library. */
+
+/* The last string searched for by a !?string? search. */
+static char *search_string;
+
+/* The last string matched by a !?string? search. */
+static char *search_match;
+
+/* Return the event specified at TEXT + OFFSET modifying OFFSET to
+ point to after the event specifier. Just a pointer to the history
+ line is returned; NULL is returned in the event of a bad specifier.
+ You pass STRING with *INDEX equal to the history_expansion_char that
+ begins this specification.
+ DELIMITING_QUOTE is a character that is allowed to end the string
+ specification for what to search for in addition to the normal
+ characters `:', ` ', `\t', `\n', and sometimes `?'.
+ So you might call this function like:
+ line = get_history_event ("!echo:p", &index, 0); */
+char *
+get_history_event (string, caller_index, delimiting_quote)
+ const char *string;
+ int *caller_index;
+ int delimiting_quote;
+{
+ register int i;
+ register char c;
+ HIST_ENTRY *entry;
+ int which, sign, local_index, substring_okay;
+ _hist_search_func_t *search_func;
+ char *temp;
+
+ /* The event can be specified in a number of ways.
+
+ !! the previous command
+ !n command line N
+ !-n current command-line minus N
+ !str the most recent command starting with STR
+ !?str[?]
+ the most recent command containing STR
+
+ All values N are determined via HISTORY_BASE. */
+
+ i = *caller_index;
+
+ if (string[i] != history_expansion_char)
+ return ((char *)NULL);
+
+ /* Move on to the specification. */
+ i++;
+
+ sign = 1;
+ substring_okay = 0;
+
+#define RETURN_ENTRY(e, w) \
+ return ((e = history_get (w)) ? e->line : (char *)NULL)
+
+ /* Handle !! case. */
+ if (string[i] == history_expansion_char)
+ {
+ i++;
+ which = history_base + (history_length - 1);
+ *caller_index = i;
+ RETURN_ENTRY (entry, which);
+ }
+
+ /* Hack case of numeric line specification. */
+ if (string[i] == '-')
+ {
+ sign = -1;
+ i++;
+ }
+
+ if (_rl_digit_p (string[i]))
+ {
+ /* Get the extent of the digits and compute the value. */
+ for (which = 0; _rl_digit_p (string[i]); i++)
+ which = (which * 10) + _rl_digit_value (string[i]);
+
+ *caller_index = i;
+
+ if (sign < 0)
+ which = (history_length + history_base) - which;
+
+ RETURN_ENTRY (entry, which);
+ }
+
+ /* This must be something to search for. If the spec begins with
+ a '?', then the string may be anywhere on the line. Otherwise,
+ the string must be found at the start of a line. */
+ if (string[i] == '?')
+ {
+ substring_okay++;
+ i++;
+ }
+
+ /* Only a closing `?' or a newline delimit a substring search string. */
+ for (local_index = i; c = string[i]; i++)
+ {
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ int v;
+ mbstate_t ps;
+
+ memset (&ps, 0, sizeof (mbstate_t));
+ /* These produce warnings because we're passing a const string to a
+ function that takes a non-const string. */
+ _rl_adjust_point ((char *)string, i, &ps);
+ if ((v = _rl_get_char_len ((char *)string + i, &ps)) > 1)
+ {
+ i += v - 1;
+ continue;
+ }
+ }
+
+#endif /* HANDLE_MULTIBYTE */
+ if ((!substring_okay && (whitespace (c) || c == ':' ||
+ (history_search_delimiter_chars && member (c, history_search_delimiter_chars)) ||
+ string[i] == delimiting_quote)) ||
+ string[i] == '\n' ||
+ (substring_okay && string[i] == '?'))
+ break;
+ }
+
+ which = i - local_index;
+ temp = (char *)xmalloc (1 + which);
+ if (which)
+ strncpy (temp, string + local_index, which);
+ temp[which] = '\0';
+
+ if (substring_okay && string[i] == '?')
+ i++;
+
+ *caller_index = i;
+
+#define FAIL_SEARCH() \
+ do { \
+ history_offset = history_length; free (temp) ; return (char *)NULL; \
+ } while (0)
+
+ /* If there is no search string, try to use the previous search string,
+ if one exists. If not, fail immediately. */
+ if (*temp == '\0' && substring_okay)
+ {
+ if (search_string)
+ {
+ free (temp);
+ temp = savestring (search_string);
+ }
+ else
+ FAIL_SEARCH ();
+ }
+
+ search_func = substring_okay ? history_search : history_search_prefix;
+ while (1)
+ {
+ local_index = (*search_func) (temp, -1);
+
+ if (local_index < 0)
+ FAIL_SEARCH ();
+
+ if (local_index == 0 || substring_okay)
+ {
+ entry = current_history ();
+ history_offset = history_length;
+
+ /* If this was a substring search, then remember the
+ string that we matched for word substitution. */
+ if (substring_okay)
+ {
+ FREE (search_string);
+ search_string = temp;
+
+ FREE (search_match);
+ search_match = history_find_word (entry->line, local_index);
+ }
+ else
+ free (temp);
+
+ return (entry->line);
+ }
+
+ if (history_offset)
+ history_offset--;
+ else
+ FAIL_SEARCH ();
+ }
+#undef FAIL_SEARCH
+#undef RETURN_ENTRY
+}
+
+/* Function for extracting single-quoted strings. Used for inhibiting
+ history expansion within single quotes. */
+
+/* Extract the contents of STRING as if it is enclosed in single quotes.
+ SINDEX, when passed in, is the offset of the character immediately
+ following the opening single quote; on exit, SINDEX is left pointing
+ to the closing single quote. FLAGS currently used to allow backslash
+ to escape a single quote (e.g., for bash $'...'). */
+static void
+hist_string_extract_single_quoted (string, sindex, flags)
+ char *string;
+ int *sindex, flags;
+{
+ register int i;
+
+ for (i = *sindex; string[i] && string[i] != '\''; i++)
+ {
+ if ((flags & 1) && string[i] == '\\' && string[i+1])
+ i++;
+ }
+
+ *sindex = i;
+}
+
+static char *
+quote_breaks (s)
+ char *s;
+{
+ register char *p, *r;
+ char *ret;
+ int len = 3;
+
+ for (p = s; p && *p; p++, len++)
+ {
+ if (*p == '\'')
+ len += 3;
+ else if (whitespace (*p) || *p == '\n')
+ len += 2;
+ }
+
+ r = ret = (char *)xmalloc (len);
+ *r++ = '\'';
+ for (p = s; p && *p; )
+ {
+ if (*p == '\'')
+ {
+ *r++ = '\'';
+ *r++ = '\\';
+ *r++ = '\'';
+ *r++ = '\'';
+ p++;
+ }
+ else if (whitespace (*p) || *p == '\n')
+ {
+ *r++ = '\'';
+ *r++ = *p++;
+ *r++ = '\'';
+ }
+ else
+ *r++ = *p++;
+ }
+ *r++ = '\'';
+ *r = '\0';
+ return ret;
+}
+
+static char *
+hist_error(s, start, current, errtype)
+ char *s;
+ int start, current, errtype;
+{
+ char *temp;
+ const char *emsg;
+ int ll, elen;
+
+ ll = current - start;
+
+ switch (errtype)
+ {
+ case EVENT_NOT_FOUND:
+ emsg = "event not found";
+ elen = 15;
+ break;
+ case BAD_WORD_SPEC:
+ emsg = "bad word specifier";
+ elen = 18;
+ break;
+ case SUBST_FAILED:
+ emsg = "substitution failed";
+ elen = 19;
+ break;
+ case BAD_MODIFIER:
+ emsg = "unrecognized history modifier";
+ elen = 29;
+ break;
+ case NO_PREV_SUBST:
+ emsg = "no previous substitution";
+ elen = 24;
+ break;
+ default:
+ emsg = "unknown expansion error";
+ elen = 23;
+ break;
+ }
+
+ temp = (char *)xmalloc (ll + elen + 3);
+ strncpy (temp, s + start, ll);
+ temp[ll] = ':';
+ temp[ll + 1] = ' ';
+ strcpy (temp + ll + 2, emsg);
+ return (temp);
+}
+
+/* Get a history substitution string from STR starting at *IPTR
+ and return it. The length is returned in LENPTR.
+
+ A backslash can quote the delimiter. If the string is the
+ empty string, the previous pattern is used. If there is
+ no previous pattern for the lhs, the last history search
+ string is used.
+
+ If IS_RHS is 1, we ignore empty strings and set the pattern
+ to "" anyway. subst_lhs is not changed if the lhs is empty;
+ subst_rhs is allowed to be set to the empty string. */
+
+static char *
+get_subst_pattern (str, iptr, delimiter, is_rhs, lenptr)
+ char *str;
+ int *iptr, delimiter, is_rhs, *lenptr;
+{
+ register int si, i, j, k;
+ char *s;
+#if defined (HANDLE_MULTIBYTE)
+ mbstate_t ps;
+#endif
+
+ s = (char *)NULL;
+ i = *iptr;
+
+#if defined (HANDLE_MULTIBYTE)
+ memset (&ps, 0, sizeof (mbstate_t));
+ _rl_adjust_point (str, i, &ps);
+#endif
+
+ for (si = i; str[si] && str[si] != delimiter; si++)
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ int v;
+ if ((v = _rl_get_char_len (str + si, &ps)) > 1)
+ si += v - 1;
+ else if (str[si] == '\\' && str[si + 1] == delimiter)
+ si++;
+ }
+ else
+#endif /* HANDLE_MULTIBYTE */
+ if (str[si] == '\\' && str[si + 1] == delimiter)
+ si++;
+
+ if (si > i || is_rhs)
+ {
+ s = (char *)xmalloc (si - i + 1);
+ for (j = 0, k = i; k < si; j++, k++)
+ {
+ /* Remove a backslash quoting the search string delimiter. */
+ if (str[k] == '\\' && str[k + 1] == delimiter)
+ k++;
+ s[j] = str[k];
+ }
+ s[j] = '\0';
+ if (lenptr)
+ *lenptr = j;
+ }
+
+ i = si;
+ if (str[i])
+ i++;
+ *iptr = i;
+
+ return s;
+}
+
+static void
+postproc_subst_rhs ()
+{
+ char *new;
+ int i, j, new_size;
+
+ new = (char *)xmalloc (new_size = subst_rhs_len + subst_lhs_len);
+ for (i = j = 0; i < subst_rhs_len; i++)
+ {
+ if (subst_rhs[i] == '&')
+ {
+ if (j + subst_lhs_len >= new_size)
+ new = (char *)xrealloc (new, (new_size = new_size * 2 + subst_lhs_len));
+ strcpy (new + j, subst_lhs);
+ j += subst_lhs_len;
+ }
+ else
+ {
+ /* a single backslash protects the `&' from lhs interpolation */
+ if (subst_rhs[i] == '\\' && subst_rhs[i + 1] == '&')
+ i++;
+ if (j >= new_size)
+ new = (char *)xrealloc (new, new_size *= 2);
+ new[j++] = subst_rhs[i];
+ }
+ }
+ new[j] = '\0';
+ free (subst_rhs);
+ subst_rhs = new;
+ subst_rhs_len = j;
+}
+
+/* Expand the bulk of a history specifier starting at STRING[START].
+ Returns 0 if everything is OK, -1 if an error occurred, and 1
+ if the `p' modifier was supplied and the caller should just print
+ the returned string. Returns the new index into string in
+ *END_INDEX_PTR, and the expanded specifier in *RET_STRING. */
+static int
+history_expand_internal (string, start, end_index_ptr, ret_string, current_line)
+ char *string;
+ int start, *end_index_ptr;
+ char **ret_string;
+ char *current_line; /* for !# */
+{
+ int i, n, starting_index;
+ int substitute_globally, subst_bywords, want_quotes, print_only;
+ char *event, *temp, *result, *tstr, *t, c, *word_spec;
+ int result_len;
+#if defined (HANDLE_MULTIBYTE)
+ mbstate_t ps;
+
+ memset (&ps, 0, sizeof (mbstate_t));
+#endif
+
+ result = (char *)xmalloc (result_len = 128);
+
+ i = start;
+
+ /* If it is followed by something that starts a word specifier,
+ then !! is implied as the event specifier. */
+
+ if (member (string[i + 1], ":$*%^"))
+ {
+ char fake_s[3];
+ int fake_i = 0;
+ i++;
+ fake_s[0] = fake_s[1] = history_expansion_char;
+ fake_s[2] = '\0';
+ event = get_history_event (fake_s, &fake_i, 0);
+ }
+ else if (string[i + 1] == '#')
+ {
+ i += 2;
+ event = current_line;
+ }
+ else
+ {
+ int quoted_search_delimiter = 0;
+
+ /* If the character before this `!' is a double or single
+ quote, then this expansion takes place inside of the
+ quoted string. If we have to search for some text ("!foo"),
+ allow the delimiter to end the search string. */
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ int ch, l;
+ l = _rl_find_prev_mbchar (string, i, MB_FIND_ANY);
+ ch = string[l];
+ /* XXX - original patch had i - 1 ??? If i == 0 it would fail. */
+ if (i && (ch == '\'' || ch == '"'))
+ quoted_search_delimiter = ch;
+ }
+ else
+#endif /* HANDLE_MULTIBYTE */
+ if (i && (string[i - 1] == '\'' || string[i - 1] == '"'))
+ quoted_search_delimiter = string[i - 1];
+
+ event = get_history_event (string, &i, quoted_search_delimiter);
+ }
+
+ if (event == 0)
+ {
+ *ret_string = hist_error (string, start, i, EVENT_NOT_FOUND);
+ free (result);
+ return (-1);
+ }
+
+ /* If a word specifier is found, then do what that requires. */
+ starting_index = i;
+ word_spec = get_history_word_specifier (string, event, &i);
+
+ /* There is no such thing as a `malformed word specifier'. However,
+ it is possible for a specifier that has no match. In that case,
+ we complain. */
+ if (word_spec == (char *)&error_pointer)
+ {
+ *ret_string = hist_error (string, starting_index, i, BAD_WORD_SPEC);
+ free (result);
+ return (-1);
+ }
+
+ /* If no word specifier, than the thing of interest was the event. */
+ temp = word_spec ? savestring (word_spec) : savestring (event);
+ FREE (word_spec);
+
+ /* Perhaps there are other modifiers involved. Do what they say. */
+ want_quotes = substitute_globally = subst_bywords = print_only = 0;
+ starting_index = i;
+
+ while (string[i] == ':')
+ {
+ c = string[i + 1];
+
+ if (c == 'g' || c == 'a')
+ {
+ substitute_globally = 1;
+ i++;
+ c = string[i + 1];
+ }
+ else if (c == 'G')
+ {
+ subst_bywords = 1;
+ i++;
+ c = string[i + 1];
+ }
+
+ switch (c)
+ {
+ default:
+ *ret_string = hist_error (string, i+1, i+2, BAD_MODIFIER);
+ free (result);
+ free (temp);
+ return -1;
+
+ case 'q':
+ want_quotes = 'q';
+ break;
+
+ case 'x':
+ want_quotes = 'x';
+ break;
+
+ /* :p means make this the last executed line. So we
+ return an error state after adding this line to the
+ history. */
+ case 'p':
+ print_only++;
+ break;
+
+ /* :t discards all but the last part of the pathname. */
+ case 't':
+ tstr = strrchr (temp, '/');
+ if (tstr)
+ {
+ tstr++;
+ t = savestring (tstr);
+ free (temp);
+ temp = t;
+ }
+ break;
+
+ /* :h discards the last part of a pathname. */
+ case 'h':
+ tstr = strrchr (temp, '/');
+ if (tstr)
+ *tstr = '\0';
+ break;
+
+ /* :r discards the suffix. */
+ case 'r':
+ tstr = strrchr (temp, '.');
+ if (tstr)
+ *tstr = '\0';
+ break;
+
+ /* :e discards everything but the suffix. */
+ case 'e':
+ tstr = strrchr (temp, '.');
+ if (tstr)
+ {
+ t = savestring (tstr);
+ free (temp);
+ temp = t;
+ }
+ break;
+
+ /* :s/this/that substitutes `that' for the first
+ occurrence of `this'. :gs/this/that substitutes `that'
+ for each occurrence of `this'. :& repeats the last
+ substitution. :g& repeats the last substitution
+ globally. */
+
+ case '&':
+ case 's':
+ {
+ char *new_event;
+ int delimiter, failed, si, l_temp, ws, we;
+
+ if (c == 's')
+ {
+ if (i + 2 < (int)strlen (string))
+ {
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ _rl_adjust_point (string, i + 2, &ps);
+ if (_rl_get_char_len (string + i + 2, &ps) > 1)
+ delimiter = 0;
+ else
+ delimiter = string[i + 2];
+ }
+ else
+#endif /* HANDLE_MULTIBYTE */
+ delimiter = string[i + 2];
+ }
+ else
+ break; /* no search delimiter */
+
+ i += 3;
+
+ t = get_subst_pattern (string, &i, delimiter, 0, &subst_lhs_len);
+ /* An empty substitution lhs with no previous substitution
+ uses the last search string as the lhs. */
+ if (t)
+ {
+ FREE (subst_lhs);
+ subst_lhs = t;
+ }
+ else if (!subst_lhs)
+ {
+ if (search_string && *search_string)
+ {
+ subst_lhs = savestring (search_string);
+ subst_lhs_len = strlen (subst_lhs);
+ }
+ else
+ {
+ subst_lhs = (char *) NULL;
+ subst_lhs_len = 0;
+ }
+ }
+
+ FREE (subst_rhs);
+ subst_rhs = get_subst_pattern (string, &i, delimiter, 1, &subst_rhs_len);
+
+ /* If `&' appears in the rhs, it's supposed to be replaced
+ with the lhs. */
+ if (member ('&', subst_rhs))
+ postproc_subst_rhs ();
+ }
+ else
+ i += 2;
+
+ /* If there is no lhs, the substitution can't succeed. */
+ if (subst_lhs_len == 0)
+ {
+ *ret_string = hist_error (string, starting_index, i, NO_PREV_SUBST);
+ free (result);
+ free (temp);
+ return -1;
+ }
+
+ l_temp = strlen (temp);
+ /* Ignore impossible cases. */
+ if (subst_lhs_len > l_temp)
+ {
+ *ret_string = hist_error (string, starting_index, i, SUBST_FAILED);
+ free (result);
+ free (temp);
+ return (-1);
+ }
+
+ /* Find the first occurrence of THIS in TEMP. */
+ /* Substitute SUBST_RHS for SUBST_LHS in TEMP. There are three
+ cases to consider:
+
+ 1. substitute_globally == subst_bywords == 0
+ 2. substitute_globally == 1 && subst_bywords == 0
+ 3. substitute_globally == 0 && subst_bywords == 1
+
+ In the first case, we substitute for the first occurrence only.
+ In the second case, we substitute for every occurrence.
+ In the third case, we tokenize into words and substitute the
+ first occurrence of each word. */
+
+ si = we = 0;
+ for (failed = 1; (si + subst_lhs_len) <= l_temp; si++)
+ {
+ /* First skip whitespace and find word boundaries if
+ we're past the end of the word boundary we found
+ the last time. */
+ if (subst_bywords && si > we)
+ {
+ for (; temp[si] && whitespace (temp[si]); si++)
+ ;
+ ws = si;
+ we = history_tokenize_word (temp, si);
+ }
+
+ if (STREQN (temp+si, subst_lhs, subst_lhs_len))
+ {
+ int len = subst_rhs_len - subst_lhs_len + l_temp;
+ new_event = (char *)xmalloc (1 + len);
+ strncpy (new_event, temp, si);
+ strncpy (new_event + si, subst_rhs, subst_rhs_len);
+ strncpy (new_event + si + subst_rhs_len,
+ temp + si + subst_lhs_len,
+ l_temp - (si + subst_lhs_len));
+ new_event[len] = '\0';
+ free (temp);
+ temp = new_event;
+
+ failed = 0;
+
+ if (substitute_globally)
+ {
+ /* Reported to fix a bug that causes it to skip every
+ other match when matching a single character. Was
+ si += subst_rhs_len previously. */
+ si += subst_rhs_len - 1;
+ l_temp = strlen (temp);
+ substitute_globally++;
+ continue;
+ }
+ else if (subst_bywords)
+ {
+ si = we;
+ l_temp = strlen (temp);
+ continue;
+ }
+ else
+ break;
+ }
+ }
+
+ if (substitute_globally > 1)
+ {
+ substitute_globally = 0;
+ continue; /* don't want to increment i */
+ }
+
+ if (failed == 0)
+ continue; /* don't want to increment i */
+
+ *ret_string = hist_error (string, starting_index, i, SUBST_FAILED);
+ free (result);
+ free (temp);
+ return (-1);
+ }
+ }
+ i += 2;
+ }
+ /* Done with modfiers. */
+ /* Believe it or not, we have to back the pointer up by one. */
+ --i;
+
+ if (want_quotes)
+ {
+ char *x;
+
+ if (want_quotes == 'q')
+ x = sh_single_quote (temp);
+ else if (want_quotes == 'x')
+ x = quote_breaks (temp);
+ else
+ x = savestring (temp);
+
+ free (temp);
+ temp = x;
+ }
+
+ n = strlen (temp);
+ if (n >= result_len)
+ result = (char *)xrealloc (result, n + 2);
+ strcpy (result, temp);
+ free (temp);
+
+ *end_index_ptr = i;
+ *ret_string = result;
+ return (print_only);
+}
+
+/* Expand the string STRING, placing the result into OUTPUT, a pointer
+ to a string. Returns:
+
+ -1) If there was an error in expansion.
+ 0) If no expansions took place (or, if the only change in
+ the text was the de-slashifying of the history expansion
+ character)
+ 1) If expansions did take place
+ 2) If the `p' modifier was given and the caller should print the result
+
+ If an error ocurred in expansion, then OUTPUT contains a descriptive
+ error message. */
+
+#define ADD_STRING(s) \
+ do \
+ { \
+ int sl = strlen (s); \
+ j += sl; \
+ if (j >= result_len) \
+ { \
+ while (j >= result_len) \
+ result_len += 128; \
+ result = (char *)xrealloc (result, result_len); \
+ } \
+ strcpy (result + j - sl, s); \
+ } \
+ while (0)
+
+#define ADD_CHAR(c) \
+ do \
+ { \
+ if (j >= result_len - 1) \
+ result = (char *)xrealloc (result, result_len += 64); \
+ result[j++] = c; \
+ result[j] = '\0'; \
+ } \
+ while (0)
+
+int
+history_expand (hstring, output)
+ char *hstring;
+ char **output;
+{
+ register int j;
+ int i, r, l, passc, cc, modified, eindex, only_printing, dquote, flag;
+ char *string;
+
+ /* The output string, and its length. */
+ int result_len;
+ char *result;
+
+#if defined (HANDLE_MULTIBYTE)
+ char mb[MB_LEN_MAX];
+ mbstate_t ps;
+#endif
+
+ /* Used when adding the string. */
+ char *temp;
+
+ if (output == 0)
+ return 0;
+
+ /* Setting the history expansion character to 0 inhibits all
+ history expansion. */
+ if (history_expansion_char == 0)
+ {
+ *output = savestring (hstring);
+ return (0);
+ }
+
+ /* Prepare the buffer for printing error messages. */
+ result = (char *)xmalloc (result_len = 256);
+ result[0] = '\0';
+
+ only_printing = modified = 0;
+ l = strlen (hstring);
+
+ /* Grovel the string. Only backslash and single quotes can quote the
+ history escape character. We also handle arg specifiers. */
+
+ /* Before we grovel forever, see if the history_expansion_char appears
+ anywhere within the text. */
+
+ /* The quick substitution character is a history expansion all right. That
+ is to say, "^this^that^" is equivalent to "!!:s^this^that^", and in fact,
+ that is the substitution that we do. */
+ if (hstring[0] == history_subst_char)
+ {
+ string = (char *)xmalloc (l + 5);
+
+ string[0] = string[1] = history_expansion_char;
+ string[2] = ':';
+ string[3] = 's';
+ strcpy (string + 4, hstring);
+ l += 4;
+ }
+ else
+ {
+#if defined (HANDLE_MULTIBYTE)
+ memset (&ps, 0, sizeof (mbstate_t));
+#endif
+
+ string = hstring;
+ /* If not quick substitution, still maybe have to do expansion. */
+
+ /* `!' followed by one of the characters in history_no_expand_chars
+ is NOT an expansion. */
+ for (i = dquote = 0; string[i]; i++)
+ {
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ int v;
+ v = _rl_get_char_len (string + i, &ps);
+ if (v > 1)
+ {
+ i += v - 1;
+ continue;
+ }
+ }
+#endif /* HANDLE_MULTIBYTE */
+
+ cc = string[i + 1];
+ /* The history_comment_char, if set, appearing at the beginning
+ of a word signifies that the rest of the line should not have
+ history expansion performed on it.
+ Skip the rest of the line and break out of the loop. */
+ if (history_comment_char && string[i] == history_comment_char &&
+ (i == 0 || member (string[i - 1], history_word_delimiters)))
+ {
+ while (string[i])
+ i++;
+ break;
+ }
+ else if (string[i] == history_expansion_char)
+ {
+ if (cc == 0 || member (cc, history_no_expand_chars))
+ continue;
+ /* If the calling application has set
+ history_inhibit_expansion_function to a function that checks
+ for special cases that should not be history expanded,
+ call the function and skip the expansion if it returns a
+ non-zero value. */
+ else if (history_inhibit_expansion_function &&
+ (*history_inhibit_expansion_function) (string, i))
+ continue;
+ else
+ break;
+ }
+ /* Shell-like quoting: allow backslashes to quote double quotes
+ inside a double-quoted string. */
+ else if (dquote && string[i] == '\\' && cc == '"')
+ i++;
+ /* More shell-like quoting: if we're paying attention to single
+ quotes and letting them quote the history expansion character,
+ then we need to pay attention to double quotes, because single
+ quotes are not special inside double-quoted strings. */
+ else if (history_quotes_inhibit_expansion && string[i] == '"')
+ {
+ dquote = 1 - dquote;
+ }
+ else if (dquote == 0 && history_quotes_inhibit_expansion && string[i] == '\'')
+ {
+ /* If this is bash, single quotes inhibit history expansion. */
+ flag = (i > 0 && string[i - 1] == '$');
+ i++;
+ hist_string_extract_single_quoted (string, &i, flag);
+ }
+ else if (history_quotes_inhibit_expansion && string[i] == '\\')
+ {
+ /* If this is bash, allow backslashes to quote single
+ quotes and the history expansion character. */
+ if (cc == '\'' || cc == history_expansion_char)
+ i++;
+ }
+
+ }
+
+ if (string[i] != history_expansion_char)
+ {
+ free (result);
+ *output = savestring (string);
+ return (0);
+ }
+ }
+
+ /* Extract and perform the substitution. */
+ for (passc = dquote = i = j = 0; i < l; i++)
+ {
+ int tchar = string[i];
+
+ if (passc)
+ {
+ passc = 0;
+ ADD_CHAR (tchar);
+ continue;
+ }
+
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ int k, c;
+
+ c = tchar;
+ memset (mb, 0, sizeof (mb));
+ for (k = 0; k < MB_LEN_MAX; k++)
+ {
+ mb[k] = (char)c;
+ memset (&ps, 0, sizeof (mbstate_t));
+ if (_rl_get_char_len (mb, &ps) == -2)
+ c = string[++i];
+ else
+ break;
+ }
+ if (strlen (mb) > 1)
+ {
+ ADD_STRING (mb);
+ continue;
+ }
+ }
+#endif /* HANDLE_MULTIBYTE */
+
+ if (tchar == history_expansion_char)
+ tchar = -3;
+ else if (tchar == history_comment_char)
+ tchar = -2;
+
+ switch (tchar)
+ {
+ default:
+ ADD_CHAR (string[i]);
+ break;
+
+ case '\\':
+ passc++;
+ ADD_CHAR (tchar);
+ break;
+
+ case '"':
+ dquote = 1 - dquote;
+ ADD_CHAR (tchar);
+ break;
+
+ case '\'':
+ {
+ /* If history_quotes_inhibit_expansion is set, single quotes
+ inhibit history expansion. */
+ if (dquote == 0 && history_quotes_inhibit_expansion)
+ {
+ int quote, slen;
+
+ flag = (i > 0 && string[i - 1] == '$');
+ quote = i++;
+ hist_string_extract_single_quoted (string, &i, flag);
+
+ slen = i - quote + 2;
+ temp = (char *)xmalloc (slen);
+ strncpy (temp, string + quote, slen);
+ temp[slen - 1] = '\0';
+ ADD_STRING (temp);
+ free (temp);
+ }
+ else
+ ADD_CHAR (string[i]);
+ break;
+ }
+
+ case -2: /* history_comment_char */
+ if (i == 0 || member (string[i - 1], history_word_delimiters))
+ {
+ temp = (char *)xmalloc (l - i + 1);
+ strcpy (temp, string + i);
+ ADD_STRING (temp);
+ free (temp);
+ i = l;
+ }
+ else
+ ADD_CHAR (string[i]);
+ break;
+
+ case -3: /* history_expansion_char */
+ cc = string[i + 1];
+
+ /* If the history_expansion_char is followed by one of the
+ characters in history_no_expand_chars, then it is not a
+ candidate for expansion of any kind. */
+ if (cc == 0 || member (cc, history_no_expand_chars) ||
+ (history_inhibit_expansion_function && (*history_inhibit_expansion_function) (string, i)))
+ {
+ ADD_CHAR (string[i]);
+ break;
+ }
+
+#if defined (NO_BANG_HASH_MODIFIERS)
+ /* There is something that is listed as a `word specifier' in csh
+ documentation which means `the expanded text to this point'.
+ That is not a word specifier, it is an event specifier. If we
+ don't want to allow modifiers with `!#', just stick the current
+ output line in again. */
+ if (cc == '#')
+ {
+ if (result)
+ {
+ temp = (char *)xmalloc (1 + strlen (result));
+ strcpy (temp, result);
+ ADD_STRING (temp);
+ free (temp);
+ }
+ i++;
+ break;
+ }
+#endif
+
+ r = history_expand_internal (string, i, &eindex, &temp, result);
+ if (r < 0)
+ {
+ *output = temp;
+ free (result);
+ if (string != hstring)
+ free (string);
+ return -1;
+ }
+ else
+ {
+ if (temp)
+ {
+ modified++;
+ if (*temp)
+ ADD_STRING (temp);
+ free (temp);
+ }
+ only_printing = r == 1;
+ i = eindex;
+ }
+ break;
+ }
+ }
+
+ *output = result;
+ if (string != hstring)
+ free (string);
+
+ if (only_printing)
+ {
+#if 0
+ add_history (result);
+#endif
+ return (2);
+ }
+
+ return (modified != 0);
+}
+
+/* Return a consed string which is the word specified in SPEC, and found
+ in FROM. NULL is returned if there is no spec. The address of
+ ERROR_POINTER is returned if the word specified cannot be found.
+ CALLER_INDEX is the offset in SPEC to start looking; it is updated
+ to point to just after the last character parsed. */
+static char *
+get_history_word_specifier (spec, from, caller_index)
+ char *spec, *from;
+ int *caller_index;
+{
+ register int i = *caller_index;
+ int first, last;
+ int expecting_word_spec = 0;
+ char *result;
+
+ /* The range of words to return doesn't exist yet. */
+ first = last = 0;
+ result = (char *)NULL;
+
+ /* If we found a colon, then this *must* be a word specification. If
+ it isn't, then it is an error. */
+ if (spec[i] == ':')
+ {
+ i++;
+ expecting_word_spec++;
+ }
+
+ /* Handle special cases first. */
+
+ /* `%' is the word last searched for. */
+ if (spec[i] == '%')
+ {
+ *caller_index = i + 1;
+ return (search_match ? savestring (search_match) : savestring (""));
+ }
+
+ /* `*' matches all of the arguments, but not the command. */
+ if (spec[i] == '*')
+ {
+ *caller_index = i + 1;
+ result = history_arg_extract (1, '$', from);
+ return (result ? result : savestring (""));
+ }
+
+ /* `$' is last arg. */
+ if (spec[i] == '$')
+ {
+ *caller_index = i + 1;
+ return (history_arg_extract ('$', '$', from));
+ }
+
+ /* Try to get FIRST and LAST figured out. */
+
+ if (spec[i] == '-')
+ first = 0;
+ else if (spec[i] == '^')
+ {
+ first = 1;
+ i++;
+ }
+ else if (_rl_digit_p (spec[i]) && expecting_word_spec)
+ {
+ for (first = 0; _rl_digit_p (spec[i]); i++)
+ first = (first * 10) + _rl_digit_value (spec[i]);
+ }
+ else
+ return ((char *)NULL); /* no valid `first' for word specifier */
+
+ if (spec[i] == '^' || spec[i] == '*')
+ {
+ last = (spec[i] == '^') ? 1 : '$'; /* x* abbreviates x-$ */
+ i++;
+ }
+ else if (spec[i] != '-')
+ last = first;
+ else
+ {
+ i++;
+
+ if (_rl_digit_p (spec[i]))
+ {
+ for (last = 0; _rl_digit_p (spec[i]); i++)
+ last = (last * 10) + _rl_digit_value (spec[i]);
+ }
+ else if (spec[i] == '$')
+ {
+ i++;
+ last = '$';
+ }
+#if 0
+ else if (!spec[i] || spec[i] == ':')
+ /* check against `:' because there could be a modifier separator */
+#else
+ else
+ /* csh seems to allow anything to terminate the word spec here,
+ leaving it as an abbreviation. */
+#endif
+ last = -1; /* x- abbreviates x-$ omitting word `$' */
+ }
+
+ *caller_index = i;
+
+ if (last >= first || last == '$' || last < 0)
+ result = history_arg_extract (first, last, from);
+
+ return (result ? result : (char *)&error_pointer);
+}
+
+/* Extract the args specified, starting at FIRST, and ending at LAST.
+ The args are taken from STRING. If either FIRST or LAST is < 0,
+ then make that arg count from the right (subtract from the number of
+ tokens, so that FIRST = -1 means the next to last token on the line).
+ If LAST is `$' the last arg from STRING is used. */
+char *
+history_arg_extract (first, last, string)
+ int first, last;
+ const char *string;
+{
+ register int i, len;
+ char *result;
+ int size, offset;
+ char **list;
+
+ /* XXX - think about making history_tokenize return a struct array,
+ each struct in array being a string and a length to avoid the
+ calls to strlen below. */
+ if ((list = history_tokenize (string)) == NULL)
+ return ((char *)NULL);
+
+ for (len = 0; list[len]; len++)
+ ;
+
+ if (last < 0)
+ last = len + last - 1;
+
+ if (first < 0)
+ first = len + first - 1;
+
+ if (last == '$')
+ last = len - 1;
+
+ if (first == '$')
+ first = len - 1;
+
+ last++;
+
+ if (first >= len || last > len || first < 0 || last < 0 || first > last)
+ result = ((char *)NULL);
+ else
+ {
+ for (size = 0, i = first; i < last; i++)
+ size += strlen (list[i]) + 1;
+ result = (char *)xmalloc (size + 1);
+ result[0] = '\0';
+
+ for (i = first, offset = 0; i < last; i++)
+ {
+ strcpy (result + offset, list[i]);
+ offset += strlen (list[i]);
+ if (i + 1 < last)
+ {
+ result[offset++] = ' ';
+ result[offset] = 0;
+ }
+ }
+ }
+
+ for (i = 0; i < len; i++)
+ free (list[i]);
+ free (list);
+
+ return (result);
+}
+
+static int
+history_tokenize_word (string, ind)
+ const char *string;
+ int ind;
+{
+ register int i;
+ int delimiter;
+
+ i = ind;
+ delimiter = 0;
+
+ if (member (string[i], "()\n"))
+ {
+ i++;
+ return i;
+ }
+
+ if (member (string[i], "<>;&|$"))
+ {
+ int peek = string[i + 1];
+
+ if (peek == string[i] && peek != '$')
+ {
+ if (peek == '<' && string[i + 2] == '-')
+ i++;
+ else if (peek == '<' && string[i + 2] == '<')
+ i++;
+ i += 2;
+ return i;
+ }
+ else if ((peek == '&' && (string[i] == '>' || string[i] == '<')) ||
+ (peek == '>' && string[i] == '&') ||
+ (peek == '(' && (string[i] == '>' || string[i] == '<')) || /* ) */
+ (peek == '(' && string[i] == '$')) /* ) */
+ {
+ i += 2;
+ return i;
+ }
+#if 0
+ else if (peek == '\'' && string[i] == '$')
+ {
+ i += 2; /* XXX */
+ return i;
+ }
+#endif
+
+ if (string[i] != '$')
+ {
+ i++;
+ return i;
+ }
+ }
+
+ /* Get word from string + i; */
+
+ if (member (string[i], HISTORY_QUOTE_CHARACTERS))
+ delimiter = string[i++];
+
+ for (; string[i]; i++)
+ {
+ if (string[i] == '\\' && string[i + 1] == '\n')
+ {
+ i++;
+ continue;
+ }
+
+ if (string[i] == '\\' && delimiter != '\'' &&
+ (delimiter != '"' || member (string[i], slashify_in_quotes)))
+ {
+ i++;
+ continue;
+ }
+
+ if (delimiter && string[i] == delimiter)
+ {
+ delimiter = 0;
+ continue;
+ }
+
+ if (!delimiter && (member (string[i], history_word_delimiters)))
+ break;
+
+ if (!delimiter && member (string[i], HISTORY_QUOTE_CHARACTERS))
+ delimiter = string[i];
+ }
+
+ return i;
+}
+
+static char *
+history_substring (string, start, end)
+ const char *string;
+ int start, end;
+{
+ register int len;
+ register char *result;
+
+ len = end - start;
+ result = (char *)xmalloc (len + 1);
+ strncpy (result, string + start, len);
+ result[len] = '\0';
+ return result;
+}
+
+/* Parse STRING into tokens and return an array of strings. If WIND is
+ not -1 and INDP is not null, we also want the word surrounding index
+ WIND. The position in the returned array of strings is returned in
+ *INDP. */
+static char **
+history_tokenize_internal (string, wind, indp)
+ const char *string;
+ int wind, *indp;
+{
+ char **result;
+ register int i, start, result_index, size;
+
+ /* If we're searching for a string that's not part of a word (e.g., " "),
+ make sure we set *INDP to a reasonable value. */
+ if (indp && wind != -1)
+ *indp = -1;
+
+ /* Get a token, and stuff it into RESULT. The tokens are split
+ exactly where the shell would split them. */
+ for (i = result_index = size = 0, result = (char **)NULL; string[i]; )
+ {
+ /* Skip leading whitespace. */
+ for (; string[i] && whitespace (string[i]); i++)
+ ;
+ if (string[i] == 0 || string[i] == history_comment_char)
+ return (result);
+
+ start = i;
+
+ i = history_tokenize_word (string, start);
+
+ /* If we have a non-whitespace delimiter character (which would not be
+ skipped by the loop above), use it and any adjacent delimiters to
+ make a separate field. Any adjacent white space will be skipped the
+ next time through the loop. */
+ if (i == start && history_word_delimiters)
+ {
+ i++;
+ while (string[i] && member (string[i], history_word_delimiters))
+ i++;
+ }
+
+ /* If we are looking for the word in which the character at a
+ particular index falls, remember it. */
+ if (indp && wind != -1 && wind >= start && wind < i)
+ *indp = result_index;
+
+ if (result_index + 2 >= size)
+ result = (char **)xrealloc (result, ((size += 10) * sizeof (char *)));
+
+ result[result_index++] = history_substring (string, start, i);
+ result[result_index] = (char *)NULL;
+ }
+
+ return (result);
+}
+
+/* Return an array of tokens, much as the shell might. The tokens are
+ parsed out of STRING. */
+char **
+history_tokenize (string)
+ const char *string;
+{
+ return (history_tokenize_internal (string, -1, (int *)NULL));
+}
+
+/* Free members of WORDS from START to an empty string */
+static void
+freewords (words, start)
+ char **words;
+ int start;
+{
+ register int i;
+
+ for (i = start; words[i]; i++)
+ free (words[i]);
+}
+
+/* Find and return the word which contains the character at index IND
+ in the history line LINE. Used to save the word matched by the
+ last history !?string? search. */
+static char *
+history_find_word (line, ind)
+ char *line;
+ int ind;
+{
+ char **words, *s;
+ int i, wind;
+
+ words = history_tokenize_internal (line, ind, &wind);
+ if (wind == -1 || words == 0)
+ {
+ if (words)
+ freewords (words, 0);
+ FREE (words);
+ return ((char *)NULL);
+ }
+ s = words[wind];
+ for (i = 0; i < wind; i++)
+ free (words[i]);
+ freewords (words, wind + 1);
+ free (words);
+ return s;
+}
diff --git a/lib/readline/histfile.c b/lib/readline/histfile.c
new file mode 100644
index 0000000..a75fc16
--- /dev/null
+++ b/lib/readline/histfile.c
@@ -0,0 +1,547 @@
+/* histfile.c - functions to manipulate the history file. */
+
+/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
+
+ This file contains the GNU History Library (History), a set of
+ routines for managing the text of previously typed lines.
+
+ History is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ History is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with History. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* The goal is to make the implementation transparent, so that you
+ don't have to know what data types are used, just what functions
+ you can call. I think I have done that. */
+
+#define READLINE_LIBRARY
+
+#if defined (__TANDEM)
+# include <floss.h>
+#endif
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include <sys/types.h>
+#if ! defined (_MINIX) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+#include "posixstat.h"
+#include <fcntl.h>
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <ctype.h>
+
+#if defined (__EMX__)
+# undef HAVE_MMAP
+#endif
+
+#ifdef HISTORY_USE_MMAP
+# include <sys/mman.h>
+
+# ifdef MAP_FILE
+# define MAP_RFLAGS (MAP_FILE|MAP_PRIVATE)
+# define MAP_WFLAGS (MAP_FILE|MAP_SHARED)
+# else
+# define MAP_RFLAGS MAP_PRIVATE
+# define MAP_WFLAGS MAP_SHARED
+# endif
+
+# ifndef MAP_FAILED
+# define MAP_FAILED ((void *)-1)
+# endif
+
+#endif /* HISTORY_USE_MMAP */
+
+/* If we're compiling for __EMX__ (OS/2) or __CYGWIN__ (cygwin32 environment
+ on win 95/98/nt), we want to open files with O_BINARY mode so that there
+ is no \n -> \r\n conversion performed. On other systems, we don't want to
+ mess around with O_BINARY at all, so we ensure that it's defined to 0. */
+#if defined (__EMX__) || defined (__CYGWIN__)
+# ifndef O_BINARY
+# define O_BINARY 0
+# endif
+#else /* !__EMX__ && !__CYGWIN__ */
+# undef O_BINARY
+# define O_BINARY 0
+#endif /* !__EMX__ && !__CYGWIN__ */
+
+#include <errno.h>
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+#include "history.h"
+#include "histlib.h"
+
+#include "rlshell.h"
+#include "xmalloc.h"
+
+/* If non-zero, we write timestamps to the history file in history_do_write() */
+int history_write_timestamps = 0;
+
+/* Does S look like the beginning of a history timestamp entry? Placeholder
+ for more extensive tests. */
+#define HIST_TIMESTAMP_START(s) (*(s) == history_comment_char && isdigit ((s)[1]) )
+
+/* Return the string that should be used in the place of this
+ filename. This only matters when you don't specify the
+ filename to read_history (), or write_history (). */
+static char *
+history_filename (filename)
+ const char *filename;
+{
+ char *return_val;
+ const char *home;
+ int home_len;
+
+ return_val = filename ? savestring (filename) : (char *)NULL;
+
+ if (return_val)
+ return (return_val);
+
+ home = sh_get_env_value ("HOME");
+
+ if (home == 0)
+ {
+ home = ".";
+ home_len = 1;
+ }
+ else
+ home_len = strlen (home);
+
+ return_val = (char *)xmalloc (2 + home_len + 8); /* strlen(".history") == 8 */
+ strcpy (return_val, home);
+ return_val[home_len] = '/';
+#if defined (__MSDOS__)
+ strcpy (return_val + home_len + 1, "_history");
+#else
+ strcpy (return_val + home_len + 1, ".history");
+#endif
+
+ return (return_val);
+}
+
+/* Add the contents of FILENAME to the history list, a line at a time.
+ If FILENAME is NULL, then read from ~/.history. Returns 0 if
+ successful, or errno if not. */
+int
+read_history (filename)
+ const char *filename;
+{
+ return (read_history_range (filename, 0, -1));
+}
+
+/* Read a range of lines from FILENAME, adding them to the history list.
+ Start reading at the FROM'th line and end at the TO'th. If FROM
+ is zero, start at the beginning. If TO is less than FROM, read
+ until the end of the file. If FILENAME is NULL, then read from
+ ~/.history. Returns 0 if successful, or errno if not. */
+int
+read_history_range (filename, from, to)
+ const char *filename;
+ int from, to;
+{
+ register char *line_start, *line_end, *p;
+ char *input, *buffer, *bufend, *last_ts;
+ int file, current_line, chars_read;
+ struct stat finfo;
+ size_t file_size;
+#if defined (EFBIG)
+ int overflow_errno = EFBIG;
+#elif defined (EOVERFLOW)
+ int overflow_errno = EOVERFLOW;
+#else
+ int overflow_errno = EIO;
+#endif
+
+ buffer = last_ts = (char *)NULL;
+ input = history_filename (filename);
+ file = open (input, O_RDONLY|O_BINARY, 0666);
+
+ if ((file < 0) || (fstat (file, &finfo) == -1))
+ goto error_and_exit;
+
+ file_size = (size_t)finfo.st_size;
+
+ /* check for overflow on very large files */
+ if (file_size != finfo.st_size || file_size + 1 < file_size)
+ {
+ errno = overflow_errno;
+ goto error_and_exit;
+ }
+
+#ifdef HISTORY_USE_MMAP
+ /* We map read/write and private so we can change newlines to NULs without
+ affecting the underlying object. */
+ buffer = (char *)mmap (0, file_size, PROT_READ|PROT_WRITE, MAP_RFLAGS, file, 0);
+ if ((void *)buffer == MAP_FAILED)
+ {
+ errno = overflow_errno;
+ goto error_and_exit;
+ }
+ chars_read = file_size;
+#else
+ buffer = (char *)malloc (file_size + 1);
+ if (buffer == 0)
+ {
+ errno = overflow_errno;
+ goto error_and_exit;
+ }
+
+ chars_read = read (file, buffer, file_size);
+#endif
+ if (chars_read < 0)
+ {
+ error_and_exit:
+ if (errno != 0)
+ chars_read = errno;
+ else
+ chars_read = EIO;
+ if (file >= 0)
+ close (file);
+
+ FREE (input);
+#ifndef HISTORY_USE_MMAP
+ FREE (buffer);
+#endif
+
+ return (chars_read);
+ }
+
+ close (file);
+
+ /* Set TO to larger than end of file if negative. */
+ if (to < 0)
+ to = chars_read;
+
+ /* Start at beginning of file, work to end. */
+ bufend = buffer + chars_read;
+ current_line = 0;
+
+ /* Skip lines until we are at FROM. */
+ for (line_start = line_end = buffer; line_end < bufend && current_line < from; line_end++)
+ if (*line_end == '\n')
+ {
+ p = line_end + 1;
+ /* If we see something we think is a timestamp, continue with this
+ line. We should check more extensively here... */
+ if (HIST_TIMESTAMP_START(p) == 0)
+ current_line++;
+ line_start = p;
+ }
+
+ /* If there are lines left to gobble, then gobble them now. */
+ for (line_end = line_start; line_end < bufend; line_end++)
+ if (*line_end == '\n')
+ {
+ /* Change to allow Windows-like \r\n end of line delimiter. */
+ if (line_end > line_start && line_end[-1] == '\r')
+ line_end[-1] = '\0';
+ else
+ *line_end = '\0';
+
+ if (*line_start)
+ {
+ if (HIST_TIMESTAMP_START(line_start) == 0)
+ {
+ add_history (line_start);
+ if (last_ts)
+ {
+ add_history_time (last_ts);
+ last_ts = NULL;
+ }
+ }
+ else
+ {
+ last_ts = line_start;
+ current_line--;
+ }
+ }
+
+ current_line++;
+
+ if (current_line >= to)
+ break;
+
+ line_start = line_end + 1;
+ }
+
+ FREE (input);
+#ifndef HISTORY_USE_MMAP
+ FREE (buffer);
+#else
+ munmap (buffer, file_size);
+#endif
+
+ return (0);
+}
+
+/* Truncate the history file FNAME, leaving only LINES trailing lines.
+ If FNAME is NULL, then use ~/.history. Returns 0 on success, errno
+ on failure. */
+int
+history_truncate_file (fname, lines)
+ const char *fname;
+ int lines;
+{
+ char *buffer, *filename, *bp, *bp1; /* bp1 == bp+1 */
+ int file, chars_read, rv;
+ struct stat finfo;
+ size_t file_size;
+
+ buffer = (char *)NULL;
+ filename = history_filename (fname);
+ file = open (filename, O_RDONLY|O_BINARY, 0666);
+ rv = 0;
+
+ /* Don't try to truncate non-regular files. */
+ if (file == -1 || fstat (file, &finfo) == -1)
+ {
+ rv = errno;
+ if (file != -1)
+ close (file);
+ goto truncate_exit;
+ }
+
+ if (S_ISREG (finfo.st_mode) == 0)
+ {
+ close (file);
+#ifdef EFTYPE
+ rv = EFTYPE;
+#else
+ rv = EINVAL;
+#endif
+ goto truncate_exit;
+ }
+
+ file_size = (size_t)finfo.st_size;
+
+ /* check for overflow on very large files */
+ if (file_size != finfo.st_size || file_size + 1 < file_size)
+ {
+ close (file);
+#if defined (EFBIG)
+ rv = errno = EFBIG;
+#elif defined (EOVERFLOW)
+ rv = errno = EOVERFLOW;
+#else
+ rv = errno = EINVAL;
+#endif
+ goto truncate_exit;
+ }
+
+ buffer = (char *)malloc (file_size + 1);
+ if (buffer == 0)
+ {
+ close (file);
+ goto truncate_exit;
+ }
+
+ chars_read = read (file, buffer, file_size);
+ close (file);
+
+ if (chars_read <= 0)
+ {
+ rv = (chars_read < 0) ? errno : 0;
+ goto truncate_exit;
+ }
+
+ /* Count backwards from the end of buffer until we have passed
+ LINES lines. bp1 is set funny initially. But since bp[1] can't
+ be a comment character (since it's off the end) and *bp can't be
+ both a newline and the history comment character, it should be OK. */
+ for (bp1 = bp = buffer + chars_read - 1; lines && bp > buffer; bp--)
+ {
+ if (*bp == '\n' && HIST_TIMESTAMP_START(bp1) == 0)
+ lines--;
+ bp1 = bp;
+ }
+
+ /* If this is the first line, then the file contains exactly the
+ number of lines we want to truncate to, so we don't need to do
+ anything. It's the first line if we don't find a newline between
+ the current value of i and 0. Otherwise, write from the start of
+ this line until the end of the buffer. */
+ for ( ; bp > buffer; bp--)
+ {
+ if (*bp == '\n' && HIST_TIMESTAMP_START(bp1) == 0)
+ {
+ bp++;
+ break;
+ }
+ bp1 = bp;
+ }
+
+ /* Write only if there are more lines in the file than we want to
+ truncate to. */
+ if (bp > buffer && ((file = open (filename, O_WRONLY|O_TRUNC|O_BINARY, 0600)) != -1))
+ {
+ write (file, bp, chars_read - (bp - buffer));
+
+#if defined (__BEOS__)
+ /* BeOS ignores O_TRUNC. */
+ ftruncate (file, chars_read - (bp - buffer));
+#endif
+
+ close (file);
+ }
+
+ truncate_exit:
+
+ FREE (buffer);
+
+ free (filename);
+ return rv;
+}
+
+/* Workhorse function for writing history. Writes NELEMENT entries
+ from the history list to FILENAME. OVERWRITE is non-zero if you
+ wish to replace FILENAME with the entries. */
+static int
+history_do_write (filename, nelements, overwrite)
+ const char *filename;
+ int nelements, overwrite;
+{
+ register int i;
+ char *output;
+ int file, mode, rv;
+#ifdef HISTORY_USE_MMAP
+ size_t cursize;
+
+ mode = overwrite ? O_RDWR|O_CREAT|O_TRUNC|O_BINARY : O_RDWR|O_APPEND|O_BINARY;
+#else
+ mode = overwrite ? O_WRONLY|O_CREAT|O_TRUNC|O_BINARY : O_WRONLY|O_APPEND|O_BINARY;
+#endif
+ output = history_filename (filename);
+ rv = 0;
+
+ if ((file = open (output, mode, 0600)) == -1)
+ {
+ FREE (output);
+ return (errno);
+ }
+
+#ifdef HISTORY_USE_MMAP
+ cursize = overwrite ? 0 : lseek (file, 0, SEEK_END);
+#endif
+
+ if (nelements > history_length)
+ nelements = history_length;
+
+ /* Build a buffer of all the lines to write, and write them in one syscall.
+ Suggested by Peter Ho (peter@robosts.oxford.ac.uk). */
+ {
+ HIST_ENTRY **the_history; /* local */
+ register int j;
+ int buffer_size;
+ char *buffer;
+
+ the_history = history_list ();
+ /* Calculate the total number of bytes to write. */
+ for (buffer_size = 0, i = history_length - nelements; i < history_length; i++)
+#if 0
+ buffer_size += 2 + HISTENT_BYTES (the_history[i]);
+#else
+ {
+ if (history_write_timestamps && the_history[i]->timestamp && the_history[i]->timestamp[0])
+ buffer_size += strlen (the_history[i]->timestamp) + 1;
+ buffer_size += strlen (the_history[i]->line) + 1;
+ }
+#endif
+
+ /* Allocate the buffer, and fill it. */
+#ifdef HISTORY_USE_MMAP
+ if (ftruncate (file, buffer_size+cursize) == -1)
+ goto mmap_error;
+ buffer = (char *)mmap (0, buffer_size, PROT_READ|PROT_WRITE, MAP_WFLAGS, file, cursize);
+ if ((void *)buffer == MAP_FAILED)
+ {
+mmap_error:
+ rv = errno;
+ FREE (output);
+ close (file);
+ return rv;
+ }
+#else
+ buffer = (char *)malloc (buffer_size);
+ if (buffer == 0)
+ {
+ rv = errno;
+ FREE (output);
+ close (file);
+ return rv;
+ }
+#endif
+
+ for (j = 0, i = history_length - nelements; i < history_length; i++)
+ {
+ if (history_write_timestamps && the_history[i]->timestamp && the_history[i]->timestamp[0])
+ {
+ strcpy (buffer + j, the_history[i]->timestamp);
+ j += strlen (the_history[i]->timestamp);
+ buffer[j++] = '\n';
+ }
+ strcpy (buffer + j, the_history[i]->line);
+ j += strlen (the_history[i]->line);
+ buffer[j++] = '\n';
+ }
+
+#ifdef HISTORY_USE_MMAP
+ if (msync (buffer, buffer_size, 0) != 0 || munmap (buffer, buffer_size) != 0)
+ rv = errno;
+#else
+ if (write (file, buffer, buffer_size) < 0)
+ rv = errno;
+ free (buffer);
+#endif
+ }
+
+ close (file);
+
+ FREE (output);
+
+ return (rv);
+}
+
+/* Append NELEMENT entries to FILENAME. The entries appended are from
+ the end of the list minus NELEMENTs up to the end of the list. */
+int
+append_history (nelements, filename)
+ int nelements;
+ const char *filename;
+{
+ return (history_do_write (filename, nelements, HISTORY_APPEND));
+}
+
+/* Overwrite FILENAME with the current history. If FILENAME is NULL,
+ then write the history list to ~/.history. Values returned
+ are as in read_history ().*/
+int
+write_history (filename)
+ const char *filename;
+{
+ return (history_do_write (filename, history_length, HISTORY_OVERWRITE));
+}
diff --git a/lib/readline/histlib.h b/lib/readline/histlib.h
new file mode 100644
index 0000000..c938a10
--- /dev/null
+++ b/lib/readline/histlib.h
@@ -0,0 +1,82 @@
+/* histlib.h -- internal definitions for the history library. */
+
+/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
+
+ This file contains the GNU History Library (History), a set of
+ routines for managing the text of previously typed lines.
+
+ History is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ History is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with History. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_HISTLIB_H_)
+#define _HISTLIB_H_
+
+#if defined (HAVE_STRING_H)
+# include <string.h>
+#else
+# include <strings.h>
+#endif /* !HAVE_STRING_H */
+
+#if !defined (STREQ)
+#define STREQ(a, b) (((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0))
+#define STREQN(a, b, n) (((n) == 0) ? (1) \
+ : ((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0))
+#endif
+
+#ifndef savestring
+#define savestring(x) strcpy (xmalloc (1 + strlen (x)), (x))
+#endif
+
+#ifndef whitespace
+#define whitespace(c) (((c) == ' ') || ((c) == '\t'))
+#endif
+
+#ifndef _rl_digit_p
+#define _rl_digit_p(c) ((c) >= '0' && (c) <= '9')
+#endif
+
+#ifndef _rl_digit_value
+#define _rl_digit_value(c) ((c) - '0')
+#endif
+
+#ifndef member
+# ifndef strchr
+extern char *strchr ();
+# endif
+#define member(c, s) ((c) ? ((char *)strchr ((s), (c)) != (char *)NULL) : 0)
+#endif
+
+#ifndef FREE
+# define FREE(x) if (x) free (x)
+#endif
+
+/* Possible history errors passed to hist_error. */
+#define EVENT_NOT_FOUND 0
+#define BAD_WORD_SPEC 1
+#define SUBST_FAILED 2
+#define BAD_MODIFIER 3
+#define NO_PREV_SUBST 4
+
+/* Possible definitions for history starting point specification. */
+#define ANCHORED_SEARCH 1
+#define NON_ANCHORED_SEARCH 0
+
+/* Possible definitions for what style of writing the history file we want. */
+#define HISTORY_APPEND 0
+#define HISTORY_OVERWRITE 1
+
+/* Some variable definitions shared across history source files. */
+extern int history_offset;
+
+#endif /* !_HISTLIB_H_ */
diff --git a/lib/readline/history.c b/lib/readline/history.c
new file mode 100644
index 0000000..8e613bb
--- /dev/null
+++ b/lib/readline/history.c
@@ -0,0 +1,519 @@
+/* history.c -- standalone history library */
+
+/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
+
+ This file contains the GNU History Library (History), a set of
+ routines for managing the text of previously typed lines.
+
+ History is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ History is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with History. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* The goal is to make the implementation transparent, so that you
+ don't have to know what data types are used, just what functions
+ you can call. I think I have done that. */
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <stdio.h>
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "history.h"
+#include "histlib.h"
+
+#include "xmalloc.h"
+
+/* The number of slots to increase the_history by. */
+#define DEFAULT_HISTORY_GROW_SIZE 50
+
+static char *hist_inittime PARAMS((void));
+
+/* **************************************************************** */
+/* */
+/* History Functions */
+/* */
+/* **************************************************************** */
+
+/* An array of HIST_ENTRY. This is where we store the history. */
+static HIST_ENTRY **the_history = (HIST_ENTRY **)NULL;
+
+/* Non-zero means that we have enforced a limit on the amount of
+ history that we save. */
+static int history_stifled;
+
+/* The current number of slots allocated to the input_history. */
+static int history_size;
+
+/* If HISTORY_STIFLED is non-zero, then this is the maximum number of
+ entries to remember. */
+int history_max_entries;
+int max_input_history; /* backwards compatibility */
+
+/* The current location of the interactive history pointer. Just makes
+ life easier for outside callers. */
+int history_offset;
+
+/* The number of strings currently stored in the history list. */
+int history_length;
+
+/* The logical `base' of the history array. It defaults to 1. */
+int history_base = 1;
+
+/* Return the current HISTORY_STATE of the history. */
+HISTORY_STATE *
+history_get_history_state ()
+{
+ HISTORY_STATE *state;
+
+ state = (HISTORY_STATE *)xmalloc (sizeof (HISTORY_STATE));
+ state->entries = the_history;
+ state->offset = history_offset;
+ state->length = history_length;
+ state->size = history_size;
+ state->flags = 0;
+ if (history_stifled)
+ state->flags |= HS_STIFLED;
+
+ return (state);
+}
+
+/* Set the state of the current history array to STATE. */
+void
+history_set_history_state (state)
+ HISTORY_STATE *state;
+{
+ the_history = state->entries;
+ history_offset = state->offset;
+ history_length = state->length;
+ history_size = state->size;
+ if (state->flags & HS_STIFLED)
+ history_stifled = 1;
+}
+
+/* Begin a session in which the history functions might be used. This
+ initializes interactive variables. */
+void
+using_history ()
+{
+ history_offset = history_length;
+}
+
+/* Return the number of bytes that the primary history entries are using.
+ This just adds up the lengths of the_history->lines and the associated
+ timestamps. */
+int
+history_total_bytes ()
+{
+ register int i, result;
+
+ for (i = result = 0; the_history && the_history[i]; i++)
+ result += HISTENT_BYTES (the_history[i]);
+
+ return (result);
+}
+
+/* Returns the magic number which says what history element we are
+ looking at now. In this implementation, it returns history_offset. */
+int
+where_history ()
+{
+ return (history_offset);
+}
+
+/* Make the current history item be the one at POS, an absolute index.
+ Returns zero if POS is out of range, else non-zero. */
+int
+history_set_pos (pos)
+ int pos;
+{
+ if (pos > history_length || pos < 0 || !the_history)
+ return (0);
+ history_offset = pos;
+ return (1);
+}
+
+/* Return the current history array. The caller has to be careful, since this
+ is the actual array of data, and could be bashed or made corrupt easily.
+ The array is terminated with a NULL pointer. */
+HIST_ENTRY **
+history_list ()
+{
+ return (the_history);
+}
+
+/* Return the history entry at the current position, as determined by
+ history_offset. If there is no entry there, return a NULL pointer. */
+HIST_ENTRY *
+current_history ()
+{
+ return ((history_offset == history_length) || the_history == 0)
+ ? (HIST_ENTRY *)NULL
+ : the_history[history_offset];
+}
+
+/* Back up history_offset to the previous history entry, and return
+ a pointer to that entry. If there is no previous entry then return
+ a NULL pointer. */
+HIST_ENTRY *
+previous_history ()
+{
+ return history_offset ? the_history[--history_offset] : (HIST_ENTRY *)NULL;
+}
+
+/* Move history_offset forward to the next history entry, and return
+ a pointer to that entry. If there is no next entry then return a
+ NULL pointer. */
+HIST_ENTRY *
+next_history ()
+{
+ return (history_offset == history_length) ? (HIST_ENTRY *)NULL : the_history[++history_offset];
+}
+
+/* Return the history entry which is logically at OFFSET in the history array.
+ OFFSET is relative to history_base. */
+HIST_ENTRY *
+history_get (offset)
+ int offset;
+{
+ int local_index;
+
+ local_index = offset - history_base;
+ return (local_index >= history_length || local_index < 0 || the_history == 0)
+ ? (HIST_ENTRY *)NULL
+ : the_history[local_index];
+}
+
+HIST_ENTRY *
+alloc_history_entry (string, ts)
+ char *string;
+ char *ts;
+{
+ HIST_ENTRY *temp;
+
+ temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY));
+
+ temp->line = string ? savestring (string) : string;
+ temp->data = (char *)NULL;
+ temp->timestamp = ts;
+
+ return temp;
+}
+
+time_t
+history_get_time (hist)
+ HIST_ENTRY *hist;
+{
+ char *ts;
+ time_t t;
+
+ if (hist == 0 || hist->timestamp == 0)
+ return 0;
+ ts = hist->timestamp;
+ if (ts[0] != history_comment_char)
+ return 0;
+ t = (time_t) atol (ts + 1); /* XXX - should use strtol() here */
+ return t;
+}
+
+static char *
+hist_inittime ()
+{
+ time_t t;
+ char ts[64], *ret;
+
+ t = (time_t) time ((time_t *)0);
+#if defined (HAVE_VSNPRINTF) /* assume snprintf if vsnprintf exists */
+ snprintf (ts, sizeof (ts) - 1, "X%lu", (unsigned long) t);
+#else
+ sprintf (ts, "X%lu", (unsigned long) t);
+#endif
+ ret = savestring (ts);
+ ret[0] = history_comment_char;
+
+ return ret;
+}
+
+/* Place STRING at the end of the history list. The data field
+ is set to NULL. */
+void
+add_history (string)
+ const char *string;
+{
+ HIST_ENTRY *temp;
+
+ if (history_stifled && (history_length == history_max_entries))
+ {
+ register int i;
+
+ /* If the history is stifled, and history_length is zero,
+ and it equals history_max_entries, we don't save items. */
+ if (history_length == 0)
+ return;
+
+ /* If there is something in the slot, then remove it. */
+ if (the_history[0])
+ (void) free_history_entry (the_history[0]);
+
+ /* Copy the rest of the entries, moving down one slot. */
+ for (i = 0; i < history_length; i++)
+ the_history[i] = the_history[i + 1];
+
+ history_base++;
+ }
+ else
+ {
+ if (history_size == 0)
+ {
+ history_size = DEFAULT_HISTORY_GROW_SIZE;
+ the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
+ history_length = 1;
+ }
+ else
+ {
+ if (history_length == (history_size - 1))
+ {
+ history_size += DEFAULT_HISTORY_GROW_SIZE;
+ the_history = (HIST_ENTRY **)
+ xrealloc (the_history, history_size * sizeof (HIST_ENTRY *));
+ }
+ history_length++;
+ }
+ }
+
+ temp = alloc_history_entry (string, hist_inittime ());
+
+ the_history[history_length] = (HIST_ENTRY *)NULL;
+ the_history[history_length - 1] = temp;
+}
+
+/* Change the time stamp of the most recent history entry to STRING. */
+void
+add_history_time (string)
+ const char *string;
+{
+ HIST_ENTRY *hs;
+
+ if (string == 0)
+ return;
+ hs = the_history[history_length - 1];
+ FREE (hs->timestamp);
+ hs->timestamp = savestring (string);
+}
+
+/* Free HIST and return the data so the calling application can free it
+ if necessary and desired. */
+histdata_t
+free_history_entry (hist)
+ HIST_ENTRY *hist;
+{
+ histdata_t x;
+
+ if (hist == 0)
+ return ((histdata_t) 0);
+ FREE (hist->line);
+ FREE (hist->timestamp);
+ x = hist->data;
+ free (hist);
+ return (x);
+}
+
+HIST_ENTRY *
+copy_history_entry (hist)
+ HIST_ENTRY *hist;
+{
+ HIST_ENTRY *ret;
+ char *ts;
+
+ if (hist == 0)
+ return hist;
+
+ ret = alloc_history_entry (hist->line, (char *)NULL);
+
+ ts = hist->timestamp ? savestring (hist->timestamp) : hist->timestamp;
+ ret->timestamp = ts;
+
+ ret->data = hist->data;
+
+ return ret;
+}
+
+/* Make the history entry at WHICH have LINE and DATA. This returns
+ the old entry so you can dispose of the data. In the case of an
+ invalid WHICH, a NULL pointer is returned. */
+HIST_ENTRY *
+replace_history_entry (which, line, data)
+ int which;
+ const char *line;
+ histdata_t data;
+{
+ HIST_ENTRY *temp, *old_value;
+
+ if (which < 0 || which >= history_length)
+ return ((HIST_ENTRY *)NULL);
+
+ temp = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY));
+ old_value = the_history[which];
+
+ temp->line = savestring (line);
+ temp->data = data;
+ temp->timestamp = savestring (old_value->timestamp);
+ the_history[which] = temp;
+
+ return (old_value);
+}
+
+/* Replace the DATA in the specified history entries, replacing OLD with
+ NEW. WHICH says which one(s) to replace: WHICH == -1 means to replace
+ all of the history entries where entry->data == OLD; WHICH == -2 means
+ to replace the `newest' history entry where entry->data == OLD; and
+ WHICH >= 0 means to replace that particular history entry's data, as
+ long as it matches OLD. */
+void
+replace_history_data (which,old, new)
+ int which;
+ histdata_t *old, *new;
+{
+ HIST_ENTRY *entry;
+ register int i, last;
+
+ if (which < -2 || which >= history_length || history_length == 0 || the_history == 0)
+ return;
+
+ if (which >= 0)
+ {
+ entry = the_history[which];
+ if (entry && entry->data == old)
+ entry->data = new;
+ return;
+ }
+
+ last = -1;
+ for (i = 0; i < history_length; i++)
+ {
+ entry = the_history[i];
+ if (entry == 0)
+ continue;
+ if (entry->data == old)
+ {
+ last = i;
+ if (which == -1)
+ entry->data = new;
+ }
+ }
+ if (which == -2 && last >= 0)
+ {
+ entry = the_history[last];
+ entry->data = new; /* XXX - we don't check entry->old */
+ }
+}
+
+/* Remove history element WHICH from the history. The removed
+ element is returned to you so you can free the line, data,
+ and containing structure. */
+HIST_ENTRY *
+remove_history (which)
+ int which;
+{
+ HIST_ENTRY *return_value;
+ register int i;
+
+ if (which < 0 || which >= history_length || history_length == 0 || the_history == 0)
+ return ((HIST_ENTRY *)NULL);
+
+ return_value = the_history[which];
+
+ for (i = which; i < history_length; i++)
+ the_history[i] = the_history[i + 1];
+
+ history_length--;
+
+ return (return_value);
+}
+
+/* Stifle the history list, remembering only MAX number of lines. */
+void
+stifle_history (max)
+ int max;
+{
+ register int i, j;
+
+ if (max < 0)
+ max = 0;
+
+ if (history_length > max)
+ {
+ /* This loses because we cannot free the data. */
+ for (i = 0, j = history_length - max; i < j; i++)
+ free_history_entry (the_history[i]);
+
+ history_base = i;
+ for (j = 0, i = history_length - max; j < max; i++, j++)
+ the_history[j] = the_history[i];
+ the_history[j] = (HIST_ENTRY *)NULL;
+ history_length = j;
+ }
+
+ history_stifled = 1;
+ max_input_history = history_max_entries = max;
+}
+
+/* Stop stifling the history. This returns the previous maximum
+ number of history entries. The value is positive if the history
+ was stifled, negative if it wasn't. */
+int
+unstifle_history ()
+{
+ if (history_stifled)
+ {
+ history_stifled = 0;
+ return (history_max_entries);
+ }
+ else
+ return (-history_max_entries);
+}
+
+int
+history_is_stifled ()
+{
+ return (history_stifled);
+}
+
+void
+clear_history ()
+{
+ register int i;
+
+ /* This loses because we cannot free the data. */
+ for (i = 0; i < history_length; i++)
+ {
+ free_history_entry (the_history[i]);
+ the_history[i] = (HIST_ENTRY *)NULL;
+ }
+
+ history_offset = history_length = 0;
+}
diff --git a/lib/readline/history.h b/lib/readline/history.h
new file mode 100644
index 0000000..1257e66
--- /dev/null
+++ b/lib/readline/history.h
@@ -0,0 +1,266 @@
+/* history.h -- the names of functions that you can call in history. */
+
+/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
+
+ This file contains the GNU History Library (History), a set of
+ routines for managing the text of previously typed lines.
+
+ History is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ History is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with History. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _HISTORY_H_
+#define _HISTORY_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <time.h> /* XXX - for history timestamp code */
+
+#if defined READLINE_LIBRARY
+# include "rlstdc.h"
+# include "rltypedefs.h"
+#else
+# include <readline/rlstdc.h>
+# include <readline/rltypedefs.h>
+#endif
+
+#ifdef __STDC__
+typedef void *histdata_t;
+#else
+typedef char *histdata_t;
+#endif
+
+/* The structure used to store a history entry. */
+typedef struct _hist_entry {
+ char *line;
+ char *timestamp; /* char * rather than time_t for read/write */
+ histdata_t data;
+} HIST_ENTRY;
+
+/* Size of the history-library-managed space in history entry HS. */
+#define HISTENT_BYTES(hs) (strlen ((hs)->line) + strlen ((hs)->timestamp))
+
+/* A structure used to pass the current state of the history stuff around. */
+typedef struct _hist_state {
+ HIST_ENTRY **entries; /* Pointer to the entries themselves. */
+ int offset; /* The location pointer within this array. */
+ int length; /* Number of elements within this array. */
+ int size; /* Number of slots allocated to this array. */
+ int flags;
+} HISTORY_STATE;
+
+/* Flag values for the `flags' member of HISTORY_STATE. */
+#define HS_STIFLED 0x01
+
+/* Initialization and state management. */
+
+/* Begin a session in which the history functions might be used. This
+ just initializes the interactive variables. */
+extern void using_history PARAMS((void));
+
+/* Return the current HISTORY_STATE of the history. */
+extern HISTORY_STATE *history_get_history_state PARAMS((void));
+
+/* Set the state of the current history array to STATE. */
+extern void history_set_history_state PARAMS((HISTORY_STATE *));
+
+/* Manage the history list. */
+
+/* Place STRING at the end of the history list.
+ The associated data field (if any) is set to NULL. */
+extern void add_history PARAMS((const char *));
+
+/* Change the timestamp associated with the most recent history entry to
+ STRING. */
+extern void add_history_time PARAMS((const char *));
+
+/* A reasonably useless function, only here for completeness. WHICH
+ is the magic number that tells us which element to delete. The
+ elements are numbered from 0. */
+extern HIST_ENTRY *remove_history PARAMS((int));
+
+/* Free the history entry H and return any application-specific data
+ associated with it. */
+extern histdata_t free_history_entry PARAMS((HIST_ENTRY *));
+
+/* Make the history entry at WHICH have LINE and DATA. This returns
+ the old entry so you can dispose of the data. In the case of an
+ invalid WHICH, a NULL pointer is returned. */
+extern HIST_ENTRY *replace_history_entry PARAMS((int, const char *, histdata_t));
+
+/* Clear the history list and start over. */
+extern void clear_history PARAMS((void));
+
+/* Stifle the history list, remembering only MAX number of entries. */
+extern void stifle_history PARAMS((int));
+
+/* Stop stifling the history. This returns the previous amount the
+ history was stifled by. The value is positive if the history was
+ stifled, negative if it wasn't. */
+extern int unstifle_history PARAMS((void));
+
+/* Return 1 if the history is stifled, 0 if it is not. */
+extern int history_is_stifled PARAMS((void));
+
+/* Information about the history list. */
+
+/* Return a NULL terminated array of HIST_ENTRY which is the current input
+ history. Element 0 of this list is the beginning of time. If there
+ is no history, return NULL. */
+extern HIST_ENTRY **history_list PARAMS((void));
+
+/* Returns the number which says what history element we are now
+ looking at. */
+extern int where_history PARAMS((void));
+
+/* Return the history entry at the current position, as determined by
+ history_offset. If there is no entry there, return a NULL pointer. */
+extern HIST_ENTRY *current_history PARAMS((void));
+
+/* Return the history entry which is logically at OFFSET in the history
+ array. OFFSET is relative to history_base. */
+extern HIST_ENTRY *history_get PARAMS((int));
+
+/* Return the timestamp associated with the HIST_ENTRY * passed as an
+ argument */
+extern time_t history_get_time PARAMS((HIST_ENTRY *));
+
+/* Return the number of bytes that the primary history entries are using.
+ This just adds up the lengths of the_history->lines. */
+extern int history_total_bytes PARAMS((void));
+
+/* Moving around the history list. */
+
+/* Set the position in the history list to POS. */
+extern int history_set_pos PARAMS((int));
+
+/* Back up history_offset to the previous history entry, and return
+ a pointer to that entry. If there is no previous entry, return
+ a NULL pointer. */
+extern HIST_ENTRY *previous_history PARAMS((void));
+
+/* Move history_offset forward to the next item in the input_history,
+ and return the a pointer to that entry. If there is no next entry,
+ return a NULL pointer. */
+extern HIST_ENTRY *next_history PARAMS((void));
+
+/* Searching the history list. */
+
+/* Search the history for STRING, starting at history_offset.
+ If DIRECTION < 0, then the search is through previous entries,
+ else through subsequent. If the string is found, then
+ current_history () is the history entry, and the value of this function
+ is the offset in the line of that history entry that the string was
+ found in. Otherwise, nothing is changed, and a -1 is returned. */
+extern int history_search PARAMS((const char *, int));
+
+/* Search the history for STRING, starting at history_offset.
+ The search is anchored: matching lines must begin with string.
+ DIRECTION is as in history_search(). */
+extern int history_search_prefix PARAMS((const char *, int));
+
+/* Search for STRING in the history list, starting at POS, an
+ absolute index into the list. DIR, if negative, says to search
+ backwards from POS, else forwards.
+ Returns the absolute index of the history element where STRING
+ was found, or -1 otherwise. */
+extern int history_search_pos PARAMS((const char *, int, int));
+
+/* Managing the history file. */
+
+/* Add the contents of FILENAME to the history list, a line at a time.
+ If FILENAME is NULL, then read from ~/.history. Returns 0 if
+ successful, or errno if not. */
+extern int read_history PARAMS((const char *));
+
+/* Read a range of lines from FILENAME, adding them to the history list.
+ Start reading at the FROM'th line and end at the TO'th. If FROM
+ is zero, start at the beginning. If TO is less than FROM, read
+ until the end of the file. If FILENAME is NULL, then read from
+ ~/.history. Returns 0 if successful, or errno if not. */
+extern int read_history_range PARAMS((const char *, int, int));
+
+/* Write the current history to FILENAME. If FILENAME is NULL,
+ then write the history list to ~/.history. Values returned
+ are as in read_history (). */
+extern int write_history PARAMS((const char *));
+
+/* Append NELEMENT entries to FILENAME. The entries appended are from
+ the end of the list minus NELEMENTs up to the end of the list. */
+extern int append_history PARAMS((int, const char *));
+
+/* Truncate the history file, leaving only the last NLINES lines. */
+extern int history_truncate_file PARAMS((const char *, int));
+
+/* History expansion. */
+
+/* Expand the string STRING, placing the result into OUTPUT, a pointer
+ to a string. Returns:
+
+ 0) If no expansions took place (or, if the only change in
+ the text was the de-slashifying of the history expansion
+ character)
+ 1) If expansions did take place
+ -1) If there was an error in expansion.
+ 2) If the returned line should just be printed.
+
+ If an error ocurred in expansion, then OUTPUT contains a descriptive
+ error message. */
+extern int history_expand PARAMS((char *, char **));
+
+/* Extract a string segment consisting of the FIRST through LAST
+ arguments present in STRING. Arguments are broken up as in
+ the shell. */
+extern char *history_arg_extract PARAMS((int, int, const char *));
+
+/* Return the text of the history event beginning at the current
+ offset into STRING. Pass STRING with *INDEX equal to the
+ history_expansion_char that begins this specification.
+ DELIMITING_QUOTE is a character that is allowed to end the string
+ specification for what to search for in addition to the normal
+ characters `:', ` ', `\t', `\n', and sometimes `?'. */
+extern char *get_history_event PARAMS((const char *, int *, int));
+
+/* Return an array of tokens, much as the shell might. The tokens are
+ parsed out of STRING. */
+extern char **history_tokenize PARAMS((const char *));
+
+/* Exported history variables. */
+extern int history_base;
+extern int history_length;
+extern int history_max_entries;
+extern char history_expansion_char;
+extern char history_subst_char;
+extern char *history_word_delimiters;
+extern char history_comment_char;
+extern char *history_no_expand_chars;
+extern char *history_search_delimiter_chars;
+extern int history_quotes_inhibit_expansion;
+
+extern int history_write_timestamps;
+
+/* Backwards compatibility */
+extern int max_input_history;
+
+/* If set, this function is called to decide whether or not a particular
+ history expansion should be treated as a special case for the calling
+ application and not expanded. */
+extern rl_linebuf_func_t *history_inhibit_expansion_function;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !_HISTORY_H_ */
diff --git a/lib/readline/histsearch.c b/lib/readline/histsearch.c
new file mode 100644
index 0000000..1ad55d2
--- /dev/null
+++ b/lib/readline/histsearch.c
@@ -0,0 +1,194 @@
+/* histsearch.c -- searching the history list. */
+
+/* Copyright (C) 1989, 1992-2009 Free Software Foundation, Inc.
+
+ This file contains the GNU History Library (History), a set of
+ routines for managing the text of previously typed lines.
+
+ History is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ History is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with History. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "history.h"
+#include "histlib.h"
+
+/* The list of alternate characters that can delimit a history search
+ string. */
+char *history_search_delimiter_chars = (char *)NULL;
+
+static int history_search_internal PARAMS((const char *, int, int));
+
+/* Search the history for STRING, starting at history_offset.
+ If DIRECTION < 0, then the search is through previous entries, else
+ through subsequent. If ANCHORED is non-zero, the string must
+ appear at the beginning of a history line, otherwise, the string
+ may appear anywhere in the line. If the string is found, then
+ current_history () is the history entry, and the value of this
+ function is the offset in the line of that history entry that the
+ string was found in. Otherwise, nothing is changed, and a -1 is
+ returned. */
+
+static int
+history_search_internal (string, direction, anchored)
+ const char *string;
+ int direction, anchored;
+{
+ register int i, reverse;
+ register char *line;
+ register int line_index;
+ int string_len;
+ HIST_ENTRY **the_history; /* local */
+
+ i = history_offset;
+ reverse = (direction < 0);
+
+ /* Take care of trivial cases first. */
+ if (string == 0 || *string == '\0')
+ return (-1);
+
+ if (!history_length || ((i >= history_length) && !reverse))
+ return (-1);
+
+ if (reverse && (i >= history_length))
+ i = history_length - 1;
+
+#define NEXT_LINE() do { if (reverse) i--; else i++; } while (0)
+
+ the_history = history_list ();
+ string_len = strlen (string);
+ while (1)
+ {
+ /* Search each line in the history list for STRING. */
+
+ /* At limit for direction? */
+ if ((reverse && i < 0) || (!reverse && i == history_length))
+ return (-1);
+
+ line = the_history[i]->line;
+ line_index = strlen (line);
+
+ /* If STRING is longer than line, no match. */
+ if (string_len > line_index)
+ {
+ NEXT_LINE ();
+ continue;
+ }
+
+ /* Handle anchored searches first. */
+ if (anchored == ANCHORED_SEARCH)
+ {
+ if (STREQN (string, line, string_len))
+ {
+ history_offset = i;
+ return (0);
+ }
+
+ NEXT_LINE ();
+ continue;
+ }
+
+ /* Do substring search. */
+ if (reverse)
+ {
+ line_index -= string_len;
+
+ while (line_index >= 0)
+ {
+ if (STREQN (string, line + line_index, string_len))
+ {
+ history_offset = i;
+ return (line_index);
+ }
+ line_index--;
+ }
+ }
+ else
+ {
+ register int limit;
+
+ limit = line_index - string_len + 1;
+ line_index = 0;
+
+ while (line_index < limit)
+ {
+ if (STREQN (string, line + line_index, string_len))
+ {
+ history_offset = i;
+ return (line_index);
+ }
+ line_index++;
+ }
+ }
+ NEXT_LINE ();
+ }
+}
+
+/* Do a non-anchored search for STRING through the history in DIRECTION. */
+int
+history_search (string, direction)
+ const char *string;
+ int direction;
+{
+ return (history_search_internal (string, direction, NON_ANCHORED_SEARCH));
+}
+
+/* Do an anchored search for string through the history in DIRECTION. */
+int
+history_search_prefix (string, direction)
+ const char *string;
+ int direction;
+{
+ return (history_search_internal (string, direction, ANCHORED_SEARCH));
+}
+
+/* Search for STRING in the history list. DIR is < 0 for searching
+ backwards. POS is an absolute index into the history list at
+ which point to begin searching. */
+int
+history_search_pos (string, dir, pos)
+ const char *string;
+ int dir, pos;
+{
+ int ret, old;
+
+ old = where_history ();
+ history_set_pos (pos);
+ if (history_search (string, dir) == -1)
+ {
+ history_set_pos (old);
+ return (-1);
+ }
+ ret = where_history ();
+ history_set_pos (old);
+ return ret;
+}
diff --git a/lib/readline/input.c b/lib/readline/input.c
new file mode 100644
index 0000000..b5876da
--- /dev/null
+++ b/lib/readline/input.c
@@ -0,0 +1,594 @@
+/* input.c -- character input functions for readline. */
+
+/* Copyright (C) 1994-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (__TANDEM)
+# include <floss.h>
+#endif
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <fcntl.h>
+#if defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif /* HAVE_SYS_FILE_H */
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#include "posixselect.h"
+
+#if defined (FIONREAD_IN_SYS_IOCTL)
+# include <sys/ioctl.h>
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+/* System-specific feature definitions and include files. */
+#include "rldefs.h"
+#include "rlmbutil.h"
+
+/* Some standard library routines. */
+#include "readline.h"
+
+#include "rlprivate.h"
+#include "rlshell.h"
+#include "xmalloc.h"
+
+/* What kind of non-blocking I/O do we have? */
+#if !defined (O_NDELAY) && defined (O_NONBLOCK)
+# define O_NDELAY O_NONBLOCK /* Posix style */
+#endif
+
+/* Non-null means it is a pointer to a function to run while waiting for
+ character input. */
+rl_hook_func_t *rl_event_hook = (rl_hook_func_t *)NULL;
+
+rl_getc_func_t *rl_getc_function = rl_getc;
+
+static int _keyboard_input_timeout = 100000; /* 0.1 seconds; it's in usec */
+
+static int ibuffer_space PARAMS((void));
+static int rl_get_char PARAMS((int *));
+static int rl_gather_tyi PARAMS((void));
+
+/* **************************************************************** */
+/* */
+/* Character Input Buffering */
+/* */
+/* **************************************************************** */
+
+static int pop_index, push_index;
+static unsigned char ibuffer[512];
+static int ibuffer_len = sizeof (ibuffer) - 1;
+
+#define any_typein (push_index != pop_index)
+
+int
+_rl_any_typein ()
+{
+ return any_typein;
+}
+
+/* Return the amount of space available in the buffer for stuffing
+ characters. */
+static int
+ibuffer_space ()
+{
+ if (pop_index > push_index)
+ return (pop_index - push_index - 1);
+ else
+ return (ibuffer_len - (push_index - pop_index));
+}
+
+/* Get a key from the buffer of characters to be read.
+ Return the key in KEY.
+ Result is KEY if there was a key, or 0 if there wasn't. */
+static int
+rl_get_char (key)
+ int *key;
+{
+ if (push_index == pop_index)
+ return (0);
+
+ *key = ibuffer[pop_index++];
+#if 0
+ if (pop_index >= ibuffer_len)
+#else
+ if (pop_index > ibuffer_len)
+#endif
+ pop_index = 0;
+
+ return (1);
+}
+
+/* Stuff KEY into the *front* of the input buffer.
+ Returns non-zero if successful, zero if there is
+ no space left in the buffer. */
+int
+_rl_unget_char (key)
+ int key;
+{
+ if (ibuffer_space ())
+ {
+ pop_index--;
+ if (pop_index < 0)
+ pop_index = ibuffer_len;
+ ibuffer[pop_index] = key;
+ return (1);
+ }
+ return (0);
+}
+
+int
+_rl_pushed_input_available ()
+{
+ return (push_index != pop_index);
+}
+
+/* If a character is available to be read, then read it and stuff it into
+ IBUFFER. Otherwise, just return. Returns number of characters read
+ (0 if none available) and -1 on error (EIO). */
+static int
+rl_gather_tyi ()
+{
+ int tty;
+ register int tem, result;
+ int chars_avail, k;
+ char input;
+#if defined(HAVE_SELECT)
+ fd_set readfds, exceptfds;
+ struct timeval timeout;
+#endif
+
+ chars_avail = 0;
+ tty = fileno (rl_instream);
+
+#if defined (HAVE_SELECT)
+ FD_ZERO (&readfds);
+ FD_ZERO (&exceptfds);
+ FD_SET (tty, &readfds);
+ FD_SET (tty, &exceptfds);
+ USEC_TO_TIMEVAL (_keyboard_input_timeout, timeout);
+ result = select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout);
+ if (result <= 0)
+ return 0; /* Nothing to read. */
+#endif
+
+ result = -1;
+#if defined (FIONREAD)
+ errno = 0;
+ result = ioctl (tty, FIONREAD, &chars_avail);
+ if (result == -1 && errno == EIO)
+ return -1;
+#endif
+
+#if defined (O_NDELAY)
+ if (result == -1)
+ {
+ tem = fcntl (tty, F_GETFL, 0);
+
+ fcntl (tty, F_SETFL, (tem | O_NDELAY));
+ chars_avail = read (tty, &input, 1);
+
+ fcntl (tty, F_SETFL, tem);
+ if (chars_avail == -1 && errno == EAGAIN)
+ return 0;
+ if (chars_avail == 0) /* EOF */
+ {
+ rl_stuff_char (EOF);
+ return (0);
+ }
+ }
+#endif /* O_NDELAY */
+
+#if defined (__MINGW32__)
+ /* Use getch/_kbhit to check for available console input, in the same way
+ that we read it normally. */
+ chars_avail = isatty (tty) ? _kbhit () : 0;
+ result = 0;
+#endif
+
+ /* If there's nothing available, don't waste time trying to read
+ something. */
+ if (chars_avail <= 0)
+ return 0;
+
+ tem = ibuffer_space ();
+
+ if (chars_avail > tem)
+ chars_avail = tem;
+
+ /* One cannot read all of the available input. I can only read a single
+ character at a time, or else programs which require input can be
+ thwarted. If the buffer is larger than one character, I lose.
+ Damn! */
+ if (tem < ibuffer_len)
+ chars_avail = 0;
+
+ if (result != -1)
+ {
+ while (chars_avail--)
+ {
+ RL_CHECK_SIGNALS ();
+ k = (*rl_getc_function) (rl_instream);
+ if (rl_stuff_char (k) == 0)
+ break; /* some problem; no more room */
+ if (k == NEWLINE || k == RETURN)
+ break;
+ }
+ }
+ else
+ {
+ if (chars_avail)
+ rl_stuff_char (input);
+ }
+
+ return 1;
+}
+
+int
+rl_set_keyboard_input_timeout (u)
+ int u;
+{
+ int o;
+
+ o = _keyboard_input_timeout;
+ if (u >= 0)
+ _keyboard_input_timeout = u;
+ return (o);
+}
+
+/* Is there input available to be read on the readline input file
+ descriptor? Only works if the system has select(2) or FIONREAD.
+ Uses the value of _keyboard_input_timeout as the timeout; if another
+ readline function wants to specify a timeout and not leave it up to
+ the user, it should use _rl_input_queued(timeout_value_in_microseconds)
+ instead. */
+int
+_rl_input_available ()
+{
+#if defined(HAVE_SELECT)
+ fd_set readfds, exceptfds;
+ struct timeval timeout;
+#endif
+#if !defined (HAVE_SELECT) && defined(FIONREAD)
+ int chars_avail;
+#endif
+ int tty;
+
+ tty = fileno (rl_instream);
+
+#if defined (HAVE_SELECT)
+ FD_ZERO (&readfds);
+ FD_ZERO (&exceptfds);
+ FD_SET (tty, &readfds);
+ FD_SET (tty, &exceptfds);
+ timeout.tv_sec = 0;
+ timeout.tv_usec = _keyboard_input_timeout;
+ return (select (tty + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout) > 0);
+#else
+
+#if defined (FIONREAD)
+ if (ioctl (tty, FIONREAD, &chars_avail) == 0)
+ return (chars_avail);
+#endif
+
+#endif
+
+#if defined (__MINGW32__)
+ if (isatty (tty))
+ return (_kbhit ());
+#endif
+
+ return 0;
+}
+
+int
+_rl_input_queued (t)
+ int t;
+{
+ int old_timeout, r;
+
+ old_timeout = rl_set_keyboard_input_timeout (t);
+ r = _rl_input_available ();
+ rl_set_keyboard_input_timeout (old_timeout);
+ return r;
+}
+
+void
+_rl_insert_typein (c)
+ int c;
+{
+ int key, t, i;
+ char *string;
+
+ i = key = 0;
+ string = (char *)xmalloc (ibuffer_len + 1);
+ string[i++] = (char) c;
+
+ while ((t = rl_get_char (&key)) &&
+ _rl_keymap[key].type == ISFUNC &&
+ _rl_keymap[key].function == rl_insert)
+ string[i++] = key;
+
+ if (t)
+ _rl_unget_char (key);
+
+ string[i] = '\0';
+ rl_insert_text (string);
+ xfree (string);
+}
+
+/* Add KEY to the buffer of characters to be read. Returns 1 if the
+ character was stuffed correctly; 0 otherwise. */
+int
+rl_stuff_char (key)
+ int key;
+{
+ if (ibuffer_space () == 0)
+ return 0;
+
+ if (key == EOF)
+ {
+ key = NEWLINE;
+ rl_pending_input = EOF;
+ RL_SETSTATE (RL_STATE_INPUTPENDING);
+ }
+ ibuffer[push_index++] = key;
+#if 0
+ if (push_index >= ibuffer_len)
+#else
+ if (push_index > ibuffer_len)
+#endif
+ push_index = 0;
+
+ return 1;
+}
+
+/* Make C be the next command to be executed. */
+int
+rl_execute_next (c)
+ int c;
+{
+ rl_pending_input = c;
+ RL_SETSTATE (RL_STATE_INPUTPENDING);
+ return 0;
+}
+
+/* Clear any pending input pushed with rl_execute_next() */
+int
+rl_clear_pending_input ()
+{
+ rl_pending_input = 0;
+ RL_UNSETSTATE (RL_STATE_INPUTPENDING);
+ return 0;
+}
+
+/* **************************************************************** */
+/* */
+/* Character Input */
+/* */
+/* **************************************************************** */
+
+/* Read a key, including pending input. */
+int
+rl_read_key ()
+{
+ int c;
+
+ rl_key_sequence_length++;
+
+ if (rl_pending_input)
+ {
+ c = rl_pending_input;
+ rl_clear_pending_input ();
+ }
+ else
+ {
+ /* If input is coming from a macro, then use that. */
+ if (c = _rl_next_macro_key ())
+ return (c);
+
+ /* If the user has an event function, then call it periodically. */
+ if (rl_event_hook)
+ {
+ while (rl_event_hook && rl_get_char (&c) == 0)
+ {
+ (*rl_event_hook) ();
+ RL_CHECK_SIGNALS ();
+ if (rl_done) /* XXX - experimental */
+ return ('\n');
+ if (rl_gather_tyi () < 0) /* XXX - EIO */
+ {
+ rl_done = 1;
+ return ('\n');
+ }
+ }
+ }
+ else
+ {
+ if (rl_get_char (&c) == 0)
+ c = (*rl_getc_function) (rl_instream);
+ RL_CHECK_SIGNALS ();
+ }
+ }
+
+ return (c);
+}
+
+int
+rl_getc (stream)
+ FILE *stream;
+{
+ int result;
+ unsigned char c;
+
+ while (1)
+ {
+ RL_CHECK_SIGNALS ();
+
+#if defined (__MINGW32__)
+ if (isatty (fileno (stream)))
+ return (getch ());
+#endif
+ result = read (fileno (stream), &c, sizeof (unsigned char));
+
+ if (result == sizeof (unsigned char))
+ return (c);
+
+ /* If zero characters are returned, then the file that we are
+ reading from is empty! Return EOF in that case. */
+ if (result == 0)
+ return (EOF);
+
+#if defined (__BEOS__)
+ if (errno == EINTR)
+ continue;
+#endif
+
+#if defined (EWOULDBLOCK)
+# define X_EWOULDBLOCK EWOULDBLOCK
+#else
+# define X_EWOULDBLOCK -99
+#endif
+
+#if defined (EAGAIN)
+# define X_EAGAIN EAGAIN
+#else
+# define X_EAGAIN -99
+#endif
+
+ if (errno == X_EWOULDBLOCK || errno == X_EAGAIN)
+ {
+ if (sh_unset_nodelay_mode (fileno (stream)) < 0)
+ return (EOF);
+ continue;
+ }
+
+#undef X_EWOULDBLOCK
+#undef X_EAGAIN
+
+ /* If the error that we received was SIGINT, then try again,
+ this is simply an interrupted system call to read ().
+ Otherwise, some error ocurred, also signifying EOF. */
+ if (errno != EINTR)
+ return (RL_ISSTATE (RL_STATE_READCMD) ? READERR : EOF);
+ }
+}
+
+#if defined (HANDLE_MULTIBYTE)
+/* read multibyte char */
+int
+_rl_read_mbchar (mbchar, size)
+ char *mbchar;
+ int size;
+{
+ int mb_len, c;
+ size_t mbchar_bytes_length;
+ wchar_t wc;
+ mbstate_t ps, ps_back;
+
+ memset(&ps, 0, sizeof (mbstate_t));
+ memset(&ps_back, 0, sizeof (mbstate_t));
+
+ mb_len = 0;
+ while (mb_len < size)
+ {
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
+ if (c < 0)
+ break;
+
+ mbchar[mb_len++] = c;
+
+ mbchar_bytes_length = mbrtowc (&wc, mbchar, mb_len, &ps);
+ if (mbchar_bytes_length == (size_t)(-1))
+ break; /* invalid byte sequence for the current locale */
+ else if (mbchar_bytes_length == (size_t)(-2))
+ {
+ /* shorted bytes */
+ ps = ps_back;
+ continue;
+ }
+ else if (mbchar_bytes_length == 0)
+ {
+ mbchar[0] = '\0'; /* null wide character */
+ mb_len = 1;
+ break;
+ }
+ else if (mbchar_bytes_length > (size_t)(0))
+ break;
+ }
+
+ return mb_len;
+}
+
+/* Read a multibyte-character string whose first character is FIRST into
+ the buffer MB of length MLEN. Returns the last character read, which
+ may be FIRST. Used by the search functions, among others. Very similar
+ to _rl_read_mbchar. */
+int
+_rl_read_mbstring (first, mb, mlen)
+ int first;
+ char *mb;
+ int mlen;
+{
+ int i, c;
+ mbstate_t ps;
+
+ c = first;
+ memset (mb, 0, mlen);
+ for (i = 0; c >= 0 && i < mlen; i++)
+ {
+ mb[i] = (char)c;
+ memset (&ps, 0, sizeof (mbstate_t));
+ if (_rl_get_char_len (mb, &ps) == -2)
+ {
+ /* Read more for multibyte character */
+ RL_SETSTATE (RL_STATE_MOREINPUT);
+ c = rl_read_key ();
+ RL_UNSETSTATE (RL_STATE_MOREINPUT);
+ }
+ else
+ break;
+ }
+ return c;
+}
+#endif /* HANDLE_MULTIBYTE */
diff --git a/lib/readline/isearch.c b/lib/readline/isearch.c
new file mode 100644
index 0000000..f3f46a7
--- /dev/null
+++ b/lib/readline/isearch.c
@@ -0,0 +1,674 @@
+/* isearch.c - incremental searching */
+
+/* **************************************************************** */
+/* */
+/* I-Search and Searching */
+/* */
+/* **************************************************************** */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#include <stdio.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif
+
+#include "rldefs.h"
+#include "rlmbutil.h"
+
+#include "readline.h"
+#include "history.h"
+
+#include "rlprivate.h"
+#include "xmalloc.h"
+
+/* Variables exported to other files in the readline library. */
+char *_rl_isearch_terminators = (char *)NULL;
+
+_rl_search_cxt *_rl_iscxt = 0;
+
+/* Variables imported from other files in the readline library. */
+extern HIST_ENTRY *_rl_saved_line_for_history;
+
+static int rl_search_history PARAMS((int, int));
+
+static _rl_search_cxt *_rl_isearch_init PARAMS((int));
+static void _rl_isearch_fini PARAMS((_rl_search_cxt *));
+static int _rl_isearch_cleanup PARAMS((_rl_search_cxt *, int));
+
+/* Last line found by the current incremental search, so we don't `find'
+ identical lines many times in a row. Now part of isearch context. */
+/* static char *prev_line_found; */
+
+/* Last search string and its length. */
+static char *last_isearch_string;
+static int last_isearch_string_len;
+
+static char * const default_isearch_terminators = "\033\012";
+
+_rl_search_cxt *
+_rl_scxt_alloc (type, flags)
+ int type, flags;
+{
+ _rl_search_cxt *cxt;
+
+ cxt = (_rl_search_cxt *)xmalloc (sizeof (_rl_search_cxt));
+
+ cxt->type = type;
+ cxt->sflags = flags;
+
+ cxt->search_string = 0;
+ cxt->search_string_size = cxt->search_string_index = 0;
+
+ cxt->lines = 0;
+ cxt->allocated_line = 0;
+ cxt->hlen = cxt->hindex = 0;
+
+ cxt->save_point = rl_point;
+ cxt->save_mark = rl_mark;
+ cxt->save_line = where_history ();
+ cxt->last_found_line = cxt->save_line;
+ cxt->prev_line_found = 0;
+
+ cxt->save_undo_list = 0;
+
+ cxt->history_pos = 0;
+ cxt->direction = 0;
+
+ cxt->lastc = 0;
+
+ cxt->sline = 0;
+ cxt->sline_len = cxt->sline_index = 0;
+
+ cxt->search_terminators = 0;
+
+ return cxt;
+}
+
+void
+_rl_scxt_dispose (cxt, flags)
+ _rl_search_cxt *cxt;
+ int flags;
+{
+ FREE (cxt->search_string);
+ FREE (cxt->allocated_line);
+ FREE (cxt->lines);
+
+ xfree (cxt);
+}
+
+/* Search backwards through the history looking for a string which is typed
+ interactively. Start with the current line. */
+int
+rl_reverse_search_history (sign, key)
+ int sign, key;
+{
+ return (rl_search_history (-sign, key));
+}
+
+/* Search forwards through the history looking for a string which is typed
+ interactively. Start with the current line. */
+int
+rl_forward_search_history (sign, key)
+ int sign, key;
+{
+ return (rl_search_history (sign, key));
+}
+
+/* Display the current state of the search in the echo-area.
+ SEARCH_STRING contains the string that is being searched for,
+ DIRECTION is zero for forward, or non-zero for reverse,
+ WHERE is the history list number of the current line. If it is
+ -1, then this line is the starting one. */
+static void
+rl_display_search (search_string, reverse_p, where)
+ char *search_string;
+ int reverse_p, where;
+{
+ char *message;
+ int msglen, searchlen;
+
+ searchlen = (search_string && *search_string) ? strlen (search_string) : 0;
+
+ message = (char *)xmalloc (searchlen + 33);
+ msglen = 0;
+
+#if defined (NOTDEF)
+ if (where != -1)
+ {
+ sprintf (message, "[%d]", where + history_base);
+ msglen = strlen (message);
+ }
+#endif /* NOTDEF */
+
+ message[msglen++] = '(';
+
+ if (reverse_p)
+ {
+ strcpy (message + msglen, "reverse-");
+ msglen += 8;
+ }
+
+ strcpy (message + msglen, "i-search)`");
+ msglen += 10;
+
+ if (search_string)
+ {
+ strcpy (message + msglen, search_string);
+ msglen += searchlen;
+ }
+
+ strcpy (message + msglen, "': ");
+
+ rl_message ("%s", message);
+ xfree (message);
+ (*rl_redisplay_function) ();
+}
+
+static _rl_search_cxt *
+_rl_isearch_init (direction)
+ int direction;
+{
+ _rl_search_cxt *cxt;
+ register int i;
+ HIST_ENTRY **hlist;
+
+ cxt = _rl_scxt_alloc (RL_SEARCH_ISEARCH, 0);
+ if (direction < 0)
+ cxt->sflags |= SF_REVERSE;
+
+ cxt->search_terminators = _rl_isearch_terminators ? _rl_isearch_terminators
+ : default_isearch_terminators;
+
+ /* Create an arrary of pointers to the lines that we want to search. */
+ hlist = history_list ();
+ rl_maybe_replace_line ();
+ i = 0;
+ if (hlist)
+ for (i = 0; hlist[i]; i++);
+
+ /* Allocate space for this many lines, +1 for the current input line,
+ and remember those lines. */
+ cxt->lines = (char **)xmalloc ((1 + (cxt->hlen = i)) * sizeof (char *));
+ for (i = 0; i < cxt->hlen; i++)
+ cxt->lines[i] = hlist[i]->line;
+
+ if (_rl_saved_line_for_history)
+ cxt->lines[i] = _rl_saved_line_for_history->line;
+ else
+ {
+ /* Keep track of this so we can free it. */
+ cxt->allocated_line = (char *)xmalloc (1 + strlen (rl_line_buffer));
+ strcpy (cxt->allocated_line, &rl_line_buffer[0]);
+ cxt->lines[i] = cxt->allocated_line;
+ }
+
+ cxt->hlen++;
+
+ /* The line where we start the search. */
+ cxt->history_pos = cxt->save_line;
+
+ rl_save_prompt ();
+
+ /* Initialize search parameters. */
+ cxt->search_string = (char *)xmalloc (cxt->search_string_size = 128);
+ cxt->search_string[cxt->search_string_index = 0] = '\0';
+
+ /* Normalize DIRECTION into 1 or -1. */
+ cxt->direction = (direction >= 0) ? 1 : -1;
+
+ cxt->sline = rl_line_buffer;
+ cxt->sline_len = strlen (cxt->sline);
+ cxt->sline_index = rl_point;
+
+ _rl_iscxt = cxt; /* save globally */
+
+ return cxt;
+}
+
+static void
+_rl_isearch_fini (cxt)
+ _rl_search_cxt *cxt;
+{
+ /* First put back the original state. */
+ strcpy (rl_line_buffer, cxt->lines[cxt->save_line]);
+
+ rl_restore_prompt ();
+
+ /* Save the search string for possible later use. */
+ FREE (last_isearch_string);
+ last_isearch_string = cxt->search_string;
+ last_isearch_string_len = cxt->search_string_index;
+ cxt->search_string = 0;
+
+ if (cxt->last_found_line < cxt->save_line)
+ rl_get_previous_history (cxt->save_line - cxt->last_found_line, 0);
+ else
+ rl_get_next_history (cxt->last_found_line - cxt->save_line, 0);
+
+ /* If the string was not found, put point at the end of the last matching
+ line. If last_found_line == orig_line, we didn't find any matching
+ history lines at all, so put point back in its original position. */
+ if (cxt->sline_index < 0)
+ {
+ if (cxt->last_found_line == cxt->save_line)
+ cxt->sline_index = cxt->save_point;
+ else
+ cxt->sline_index = strlen (rl_line_buffer);
+ rl_mark = cxt->save_mark;
+ }
+
+ rl_point = cxt->sline_index;
+ /* Don't worry about where to put the mark here; rl_get_previous_history
+ and rl_get_next_history take care of it. */
+
+ rl_clear_message ();
+}
+
+int
+_rl_search_getchar (cxt)
+ _rl_search_cxt *cxt;
+{
+ int c;
+
+ /* Read a key and decide how to proceed. */
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = cxt->lastc = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ c = cxt->lastc = _rl_read_mbstring (cxt->lastc, cxt->mb, MB_LEN_MAX);
+#endif
+
+ return c;
+}
+
+/* Process just-read character C according to isearch context CXT. Return
+ -1 if the caller should just free the context and return, 0 if we should
+ break out of the loop, and 1 if we should continue to read characters. */
+int
+_rl_isearch_dispatch (cxt, c)
+ _rl_search_cxt *cxt;
+ int c;
+{
+ int n, wstart, wlen, limit, cval;
+ rl_command_func_t *f;
+
+ f = (rl_command_func_t *)NULL;
+
+ if (c < 0)
+ {
+ cxt->sflags |= SF_FAILED;
+ cxt->history_pos = cxt->last_found_line;
+ return -1;
+ }
+
+ /* Translate the keys we do something with to opcodes. */
+ if (c >= 0 && _rl_keymap[c].type == ISFUNC)
+ {
+ f = _rl_keymap[c].function;
+
+ if (f == rl_reverse_search_history)
+ cxt->lastc = (cxt->sflags & SF_REVERSE) ? -1 : -2;
+ else if (f == rl_forward_search_history)
+ cxt->lastc = (cxt->sflags & SF_REVERSE) ? -2 : -1;
+ else if (f == rl_rubout)
+ cxt->lastc = -3;
+ else if (c == CTRL ('G'))
+ cxt->lastc = -4;
+ else if (c == CTRL ('W')) /* XXX */
+ cxt->lastc = -5;
+ else if (c == CTRL ('Y')) /* XXX */
+ cxt->lastc = -6;
+ }
+
+ /* The characters in isearch_terminators (set from the user-settable
+ variable isearch-terminators) are used to terminate the search but
+ not subsequently execute the character as a command. The default
+ value is "\033\012" (ESC and C-J). */
+ if (strchr (cxt->search_terminators, cxt->lastc))
+ {
+ /* ESC still terminates the search, but if there is pending
+ input or if input arrives within 0.1 seconds (on systems
+ with select(2)) it is used as a prefix character
+ with rl_execute_next. WATCH OUT FOR THIS! This is intended
+ to allow the arrow keys to be used like ^F and ^B are used
+ to terminate the search and execute the movement command.
+ XXX - since _rl_input_available depends on the application-
+ settable keyboard timeout value, this could alternatively
+ use _rl_input_queued(100000) */
+ if (cxt->lastc == ESC && _rl_input_available ())
+ rl_execute_next (ESC);
+ return (0);
+ }
+
+#define ENDSRCH_CHAR(c) \
+ ((CTRL_CHAR (c) || META_CHAR (c) || (c) == RUBOUT) && ((c) != CTRL ('G')))
+
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ if (cxt->lastc >= 0 && (cxt->mb[0] && cxt->mb[1] == '\0') && ENDSRCH_CHAR (cxt->lastc))
+ {
+ /* This sets rl_pending_input to LASTC; it will be picked up the next
+ time rl_read_key is called. */
+ rl_execute_next (cxt->lastc);
+ return (0);
+ }
+ }
+ else
+#endif
+ if (cxt->lastc >= 0 && ENDSRCH_CHAR (cxt->lastc))
+ {
+ /* This sets rl_pending_input to LASTC; it will be picked up the next
+ time rl_read_key is called. */
+ rl_execute_next (cxt->lastc);
+ return (0);
+ }
+
+ /* Now dispatch on the character. `Opcodes' affect the search string or
+ state. Other characters are added to the string. */
+ switch (cxt->lastc)
+ {
+ /* search again */
+ case -1:
+ if (cxt->search_string_index == 0)
+ {
+ if (last_isearch_string)
+ {
+ cxt->search_string_size = 64 + last_isearch_string_len;
+ cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size);
+ strcpy (cxt->search_string, last_isearch_string);
+ cxt->search_string_index = last_isearch_string_len;
+ rl_display_search (cxt->search_string, (cxt->sflags & SF_REVERSE), -1);
+ break;
+ }
+ return (1);
+ }
+ else if (cxt->sflags & SF_REVERSE)
+ cxt->sline_index--;
+ else if (cxt->sline_index != cxt->sline_len)
+ cxt->sline_index++;
+ else
+ rl_ding ();
+ break;
+
+ /* switch directions */
+ case -2:
+ cxt->direction = -cxt->direction;
+ if (cxt->direction < 0)
+ cxt->sflags |= SF_REVERSE;
+ else
+ cxt->sflags &= ~SF_REVERSE;
+ break;
+
+ /* delete character from search string. */
+ case -3: /* C-H, DEL */
+ /* This is tricky. To do this right, we need to keep a
+ stack of search positions for the current search, with
+ sentinels marking the beginning and end. But this will
+ do until we have a real isearch-undo. */
+ if (cxt->search_string_index == 0)
+ rl_ding ();
+ else
+ cxt->search_string[--cxt->search_string_index] = '\0';
+ break;
+
+ case -4: /* C-G, abort */
+ rl_replace_line (cxt->lines[cxt->save_line], 0);
+ rl_point = cxt->save_point;
+ rl_mark = cxt->save_mark;
+ rl_restore_prompt();
+ rl_clear_message ();
+
+ return -1;
+
+ case -5: /* C-W */
+ /* skip over portion of line we already matched and yank word */
+ wstart = rl_point + cxt->search_string_index;
+ if (wstart >= rl_end)
+ {
+ rl_ding ();
+ break;
+ }
+
+ /* if not in a word, move to one. */
+ cval = _rl_char_value (rl_line_buffer, wstart);
+ if (_rl_walphabetic (cval) == 0)
+ {
+ rl_ding ();
+ break;
+ }
+ n = MB_NEXTCHAR (rl_line_buffer, wstart, 1, MB_FIND_NONZERO);;
+ while (n < rl_end)
+ {
+ cval = _rl_char_value (rl_line_buffer, n);
+ if (_rl_walphabetic (cval) == 0)
+ break;
+ n = MB_NEXTCHAR (rl_line_buffer, n, 1, MB_FIND_NONZERO);;
+ }
+ wlen = n - wstart + 1;
+ if (cxt->search_string_index + wlen + 1 >= cxt->search_string_size)
+ {
+ cxt->search_string_size += wlen + 1;
+ cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size);
+ }
+ for (; wstart < n; wstart++)
+ cxt->search_string[cxt->search_string_index++] = rl_line_buffer[wstart];
+ cxt->search_string[cxt->search_string_index] = '\0';
+ break;
+
+ case -6: /* C-Y */
+ /* skip over portion of line we already matched and yank rest */
+ wstart = rl_point + cxt->search_string_index;
+ if (wstart >= rl_end)
+ {
+ rl_ding ();
+ break;
+ }
+ n = rl_end - wstart + 1;
+ if (cxt->search_string_index + n + 1 >= cxt->search_string_size)
+ {
+ cxt->search_string_size += n + 1;
+ cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size);
+ }
+ for (n = wstart; n < rl_end; n++)
+ cxt->search_string[cxt->search_string_index++] = rl_line_buffer[n];
+ cxt->search_string[cxt->search_string_index] = '\0';
+ break;
+
+ /* Add character to search string and continue search. */
+ default:
+ if (cxt->search_string_index + 2 >= cxt->search_string_size)
+ {
+ cxt->search_string_size += 128;
+ cxt->search_string = (char *)xrealloc (cxt->search_string, cxt->search_string_size);
+ }
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ int j, l;
+ for (j = 0, l = strlen (cxt->mb); j < l; )
+ cxt->search_string[cxt->search_string_index++] = cxt->mb[j++];
+ }
+ else
+#endif
+ cxt->search_string[cxt->search_string_index++] = c;
+ cxt->search_string[cxt->search_string_index] = '\0';
+ break;
+ }
+
+ for (cxt->sflags &= ~(SF_FOUND|SF_FAILED);; )
+ {
+ limit = cxt->sline_len - cxt->search_string_index + 1;
+
+ /* Search the current line. */
+ while ((cxt->sflags & SF_REVERSE) ? (cxt->sline_index >= 0) : (cxt->sline_index < limit))
+ {
+ if (STREQN (cxt->search_string, cxt->sline + cxt->sline_index, cxt->search_string_index))
+ {
+ cxt->sflags |= SF_FOUND;
+ break;
+ }
+ else
+ cxt->sline_index += cxt->direction;
+ }
+ if (cxt->sflags & SF_FOUND)
+ break;
+
+ /* Move to the next line, but skip new copies of the line
+ we just found and lines shorter than the string we're
+ searching for. */
+ do
+ {
+ /* Move to the next line. */
+ cxt->history_pos += cxt->direction;
+
+ /* At limit for direction? */
+ if ((cxt->sflags & SF_REVERSE) ? (cxt->history_pos < 0) : (cxt->history_pos == cxt->hlen))
+ {
+ cxt->sflags |= SF_FAILED;
+ break;
+ }
+
+ /* We will need these later. */
+ cxt->sline = cxt->lines[cxt->history_pos];
+ cxt->sline_len = strlen (cxt->sline);
+ }
+ while ((cxt->prev_line_found && STREQ (cxt->prev_line_found, cxt->lines[cxt->history_pos])) ||
+ (cxt->search_string_index > cxt->sline_len));
+
+ if (cxt->sflags & SF_FAILED)
+ break;
+
+ /* Now set up the line for searching... */
+ cxt->sline_index = (cxt->sflags & SF_REVERSE) ? cxt->sline_len - cxt->search_string_index : 0;
+ }
+
+ if (cxt->sflags & SF_FAILED)
+ {
+ /* We cannot find the search string. Ding the bell. */
+ rl_ding ();
+ cxt->history_pos = cxt->last_found_line;
+ return 1;
+ }
+
+ /* We have found the search string. Just display it. But don't
+ actually move there in the history list until the user accepts
+ the location. */
+ if (cxt->sflags & SF_FOUND)
+ {
+ cxt->prev_line_found = cxt->lines[cxt->history_pos];
+ rl_replace_line (cxt->lines[cxt->history_pos], 0);
+ rl_point = cxt->sline_index;
+ cxt->last_found_line = cxt->history_pos;
+ rl_display_search (cxt->search_string, (cxt->sflags & SF_REVERSE), (cxt->history_pos == cxt->save_line) ? -1 : cxt->history_pos);
+ }
+
+ return 1;
+}
+
+static int
+_rl_isearch_cleanup (cxt, r)
+ _rl_search_cxt *cxt;
+ int r;
+{
+ if (r >= 0)
+ _rl_isearch_fini (cxt);
+ _rl_scxt_dispose (cxt, 0);
+ _rl_iscxt = 0;
+
+ RL_UNSETSTATE(RL_STATE_ISEARCH);
+
+ return (r != 0);
+}
+
+/* Search through the history looking for an interactively typed string.
+ This is analogous to i-search. We start the search in the current line.
+ DIRECTION is which direction to search; >= 0 means forward, < 0 means
+ backwards. */
+static int
+rl_search_history (direction, invoking_key)
+ int direction, invoking_key;
+{
+ _rl_search_cxt *cxt; /* local for now, but saved globally */
+ int c, r;
+
+ RL_SETSTATE(RL_STATE_ISEARCH);
+ cxt = _rl_isearch_init (direction);
+
+ rl_display_search (cxt->search_string, (cxt->sflags & SF_REVERSE), -1);
+
+ /* If we are using the callback interface, all we do is set up here and
+ return. The key is that we leave RL_STATE_ISEARCH set. */
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ return (0);
+
+ r = -1;
+ for (;;)
+ {
+ c = _rl_search_getchar (cxt);
+ /* We might want to handle EOF here (c == 0) */
+ r = _rl_isearch_dispatch (cxt, cxt->lastc);
+ if (r <= 0)
+ break;
+ }
+
+ /* The searching is over. The user may have found the string that she
+ was looking for, or else she may have exited a failing search. If
+ LINE_INDEX is -1, then that shows that the string searched for was
+ not found. We use this to determine where to place rl_point. */
+ return (_rl_isearch_cleanup (cxt, r));
+}
+
+#if defined (READLINE_CALLBACKS)
+/* Called from the callback functions when we are ready to read a key. The
+ callback functions know to call this because RL_ISSTATE(RL_STATE_ISEARCH).
+ If _rl_isearch_dispatch finishes searching, this function is responsible
+ for turning off RL_STATE_ISEARCH, which it does using _rl_isearch_cleanup. */
+int
+_rl_isearch_callback (cxt)
+ _rl_search_cxt *cxt;
+{
+ int c, r;
+
+ c = _rl_search_getchar (cxt);
+ /* We might want to handle EOF here */
+ r = _rl_isearch_dispatch (cxt, cxt->lastc);
+
+ return (r <= 0) ? _rl_isearch_cleanup (cxt, r) : 0;
+}
+#endif
diff --git a/lib/readline/keymaps.c b/lib/readline/keymaps.c
new file mode 100644
index 0000000..9379dec
--- /dev/null
+++ b/lib/readline/keymaps.c
@@ -0,0 +1,162 @@
+/* keymaps.c -- Functions and keymaps for the GNU Readline library. */
+
+/* Copyright (C) 1988,1989-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#include <stdio.h> /* for FILE * definition for readline.h */
+
+#include "readline.h"
+#include "rlconf.h"
+
+#include "emacs_keymap.c"
+
+#if defined (VI_MODE)
+#include "vi_keymap.c"
+#endif
+
+#include "xmalloc.h"
+
+/* **************************************************************** */
+/* */
+/* Functions for manipulating Keymaps. */
+/* */
+/* **************************************************************** */
+
+
+/* Return a new, empty keymap.
+ Free it with free() when you are done. */
+Keymap
+rl_make_bare_keymap ()
+{
+ register int i;
+ Keymap keymap;
+
+ keymap = (Keymap)xmalloc (KEYMAP_SIZE * sizeof (KEYMAP_ENTRY));
+ for (i = 0; i < KEYMAP_SIZE; i++)
+ {
+ keymap[i].type = ISFUNC;
+ keymap[i].function = (rl_command_func_t *)NULL;
+ }
+
+#if 0
+ for (i = 'A'; i < ('Z' + 1); i++)
+ {
+ keymap[i].type = ISFUNC;
+ keymap[i].function = rl_do_lowercase_version;
+ }
+#endif
+
+ return (keymap);
+}
+
+/* Return a new keymap which is a copy of MAP. Just copies pointers, does
+ not copy text of macros or descend into child keymaps. */
+Keymap
+rl_copy_keymap (map)
+ Keymap map;
+{
+ register int i;
+ Keymap temp;
+
+ temp = rl_make_bare_keymap ();
+ for (i = 0; i < KEYMAP_SIZE; i++)
+ {
+ temp[i].type = map[i].type;
+ temp[i].function = map[i].function;
+ }
+ return (temp);
+}
+
+/* Return a new keymap with the printing characters bound to rl_insert,
+ the uppercase Meta characters bound to run their lowercase equivalents,
+ and the Meta digits bound to produce numeric arguments. */
+Keymap
+rl_make_keymap ()
+{
+ register int i;
+ Keymap newmap;
+
+ newmap = rl_make_bare_keymap ();
+
+ /* All ASCII printing characters are self-inserting. */
+ for (i = ' '; i < 127; i++)
+ newmap[i].function = rl_insert;
+
+ newmap[TAB].function = rl_insert;
+ newmap[RUBOUT].function = rl_rubout; /* RUBOUT == 127 */
+ newmap[CTRL('H')].function = rl_rubout;
+
+#if KEYMAP_SIZE > 128
+ /* Printing characters in ISO Latin-1 and some 8-bit character sets. */
+ for (i = 128; i < 256; i++)
+ newmap[i].function = rl_insert;
+#endif /* KEYMAP_SIZE > 128 */
+
+ return (newmap);
+}
+
+/* Free the storage associated with MAP. */
+void
+rl_discard_keymap (map)
+ Keymap map;
+{
+ int i;
+
+ if (map == 0)
+ return;
+
+ for (i = 0; i < KEYMAP_SIZE; i++)
+ {
+ switch (map[i].type)
+ {
+ case ISFUNC:
+ break;
+
+ case ISKMAP:
+ rl_discard_keymap ((Keymap)map[i].function);
+ free ((char *)map[i].function);
+ break;
+
+ case ISMACR:
+ free ((char *)map[i].function);
+ break;
+ }
+ }
+}
+
+/* Convenience function that discards, then frees, MAP. */
+void
+rl_free_keymap (map)
+ Keymap map;
+{
+ rl_discard_keymap (map);
+ free ((char *)map);
+}
diff --git a/lib/readline/keymaps.h b/lib/readline/keymaps.h
new file mode 100644
index 0000000..6c4611d
--- /dev/null
+++ b/lib/readline/keymaps.h
@@ -0,0 +1,102 @@
+/* keymaps.h -- Manipulation of readline keymaps. */
+
+/* Copyright (C) 1987, 1989, 1992 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _KEYMAPS_H_
+#define _KEYMAPS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined (READLINE_LIBRARY)
+# include "rlstdc.h"
+# include "chardefs.h"
+# include "rltypedefs.h"
+#else
+# include <readline/rlstdc.h>
+# include <readline/chardefs.h>
+# include <readline/rltypedefs.h>
+#endif
+
+/* A keymap contains one entry for each key in the ASCII set.
+ Each entry consists of a type and a pointer.
+ FUNCTION is the address of a function to run, or the
+ address of a keymap to indirect through.
+ TYPE says which kind of thing FUNCTION is. */
+typedef struct _keymap_entry {
+ char type;
+ rl_command_func_t *function;
+} KEYMAP_ENTRY;
+
+/* This must be large enough to hold bindings for all of the characters
+ in a desired character set (e.g, 128 for ASCII, 256 for ISO Latin-x,
+ and so on) plus one for subsequence matching. */
+#define KEYMAP_SIZE 257
+#define ANYOTHERKEY KEYMAP_SIZE-1
+
+/* I wanted to make the above structure contain a union of:
+ union { rl_command_func_t *function; struct _keymap_entry *keymap; } value;
+ but this made it impossible for me to create a static array.
+ Maybe I need C lessons. */
+
+typedef KEYMAP_ENTRY KEYMAP_ENTRY_ARRAY[KEYMAP_SIZE];
+typedef KEYMAP_ENTRY *Keymap;
+
+/* The values that TYPE can have in a keymap entry. */
+#define ISFUNC 0
+#define ISKMAP 1
+#define ISMACR 2
+
+extern KEYMAP_ENTRY_ARRAY emacs_standard_keymap, emacs_meta_keymap, emacs_ctlx_keymap;
+extern KEYMAP_ENTRY_ARRAY vi_insertion_keymap, vi_movement_keymap;
+
+/* Return a new, empty keymap.
+ Free it with free() when you are done. */
+extern Keymap rl_make_bare_keymap PARAMS((void));
+
+/* Return a new keymap which is a copy of MAP. */
+extern Keymap rl_copy_keymap PARAMS((Keymap));
+
+/* Return a new keymap with the printing characters bound to rl_insert,
+ the lowercase Meta characters bound to run their equivalents, and
+ the Meta digits bound to produce numeric arguments. */
+extern Keymap rl_make_keymap PARAMS((void));
+
+/* Free the storage associated with a keymap. */
+extern void rl_discard_keymap PARAMS((Keymap));
+
+/* These functions actually appear in bind.c */
+
+/* Return the keymap corresponding to a given name. Names look like
+ `emacs' or `emacs-meta' or `vi-insert'. */
+extern Keymap rl_get_keymap_by_name PARAMS((const char *));
+
+/* Return the current keymap. */
+extern Keymap rl_get_keymap PARAMS((void));
+
+/* Set the current keymap to MAP. */
+extern void rl_set_keymap PARAMS((Keymap));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _KEYMAPS_H_ */
diff --git a/lib/readline/kill.c b/lib/readline/kill.c
new file mode 100644
index 0000000..a4d6d14
--- /dev/null
+++ b/lib/readline/kill.c
@@ -0,0 +1,694 @@
+/* kill.c -- kill ring management. */
+
+/* Copyright (C) 1994 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h> /* for _POSIX_VERSION */
+#endif /* HAVE_UNISTD_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#include <stdio.h>
+
+/* System-specific feature definitions and include files. */
+#include "rldefs.h"
+
+/* Some standard library routines. */
+#include "readline.h"
+#include "history.h"
+
+#include "rlprivate.h"
+#include "xmalloc.h"
+
+/* **************************************************************** */
+/* */
+/* Killing Mechanism */
+/* */
+/* **************************************************************** */
+
+/* What we assume for a max number of kills. */
+#define DEFAULT_MAX_KILLS 10
+
+/* The real variable to look at to find out when to flush kills. */
+static int rl_max_kills = DEFAULT_MAX_KILLS;
+
+/* Where to store killed text. */
+static char **rl_kill_ring = (char **)NULL;
+
+/* Where we are in the kill ring. */
+static int rl_kill_index;
+
+/* How many slots we have in the kill ring. */
+static int rl_kill_ring_length;
+
+static int _rl_copy_to_kill_ring PARAMS((char *, int));
+static int region_kill_internal PARAMS((int));
+static int _rl_copy_word_as_kill PARAMS((int, int));
+static int rl_yank_nth_arg_internal PARAMS((int, int, int));
+
+/* How to say that you only want to save a certain amount
+ of kill material. */
+int
+rl_set_retained_kills (num)
+ int num;
+{
+ return 0;
+}
+
+/* Add TEXT to the kill ring, allocating a new kill ring slot as necessary.
+ This uses TEXT directly, so the caller must not free it. If APPEND is
+ non-zero, and the last command was a kill, the text is appended to the
+ current kill ring slot, otherwise prepended. */
+static int
+_rl_copy_to_kill_ring (text, append)
+ char *text;
+ int append;
+{
+ char *old, *new;
+ int slot;
+
+ /* First, find the slot to work with. */
+ if (_rl_last_command_was_kill == 0)
+ {
+ /* Get a new slot. */
+ if (rl_kill_ring == 0)
+ {
+ /* If we don't have any defined, then make one. */
+ rl_kill_ring = (char **)
+ xmalloc (((rl_kill_ring_length = 1) + 1) * sizeof (char *));
+ rl_kill_ring[slot = 0] = (char *)NULL;
+ }
+ else
+ {
+ /* We have to add a new slot on the end, unless we have
+ exceeded the max limit for remembering kills. */
+ slot = rl_kill_ring_length;
+ if (slot == rl_max_kills)
+ {
+ register int i;
+ xfree (rl_kill_ring[0]);
+ for (i = 0; i < slot; i++)
+ rl_kill_ring[i] = rl_kill_ring[i + 1];
+ }
+ else
+ {
+ slot = rl_kill_ring_length += 1;
+ rl_kill_ring = (char **)xrealloc (rl_kill_ring, slot * sizeof (char *));
+ }
+ rl_kill_ring[--slot] = (char *)NULL;
+ }
+ }
+ else
+ slot = rl_kill_ring_length - 1;
+
+ /* If the last command was a kill, prepend or append. */
+ if (_rl_last_command_was_kill && rl_editing_mode != vi_mode)
+ {
+ old = rl_kill_ring[slot];
+ new = (char *)xmalloc (1 + strlen (old) + strlen (text));
+
+ if (append)
+ {
+ strcpy (new, old);
+ strcat (new, text);
+ }
+ else
+ {
+ strcpy (new, text);
+ strcat (new, old);
+ }
+ xfree (old);
+ free (text);
+ rl_kill_ring[slot] = new;
+ }
+ else
+ rl_kill_ring[slot] = text;
+
+ rl_kill_index = slot;
+ return 0;
+}
+
+/* The way to kill something. This appends or prepends to the last
+ kill, if the last command was a kill command. if FROM is less
+ than TO, then the text is appended, otherwise prepended. If the
+ last command was not a kill command, then a new slot is made for
+ this kill. */
+int
+rl_kill_text (from, to)
+ int from, to;
+{
+ char *text;
+
+ /* Is there anything to kill? */
+ if (from == to)
+ {
+ _rl_last_command_was_kill++;
+ return 0;
+ }
+
+ text = rl_copy_text (from, to);
+
+ /* Delete the copied text from the line. */
+ rl_delete_text (from, to);
+
+ _rl_copy_to_kill_ring (text, from < to);
+
+ _rl_last_command_was_kill++;
+ return 0;
+}
+
+/* Now REMEMBER! In order to do prepending or appending correctly, kill
+ commands always make rl_point's original position be the FROM argument,
+ and rl_point's extent be the TO argument. */
+
+/* **************************************************************** */
+/* */
+/* Killing Commands */
+/* */
+/* **************************************************************** */
+
+/* Delete the word at point, saving the text in the kill ring. */
+int
+rl_kill_word (count, key)
+ int count, key;
+{
+ int orig_point;
+
+ if (count < 0)
+ return (rl_backward_kill_word (-count, key));
+ else
+ {
+ orig_point = rl_point;
+ rl_forward_word (count, key);
+
+ if (rl_point != orig_point)
+ rl_kill_text (orig_point, rl_point);
+
+ rl_point = orig_point;
+ if (rl_editing_mode == emacs_mode)
+ rl_mark = rl_point;
+ }
+ return 0;
+}
+
+/* Rubout the word before point, placing it on the kill ring. */
+int
+rl_backward_kill_word (count, ignore)
+ int count, ignore;
+{
+ int orig_point;
+
+ if (count < 0)
+ return (rl_kill_word (-count, ignore));
+ else
+ {
+ orig_point = rl_point;
+ rl_backward_word (count, ignore);
+
+ if (rl_point != orig_point)
+ rl_kill_text (orig_point, rl_point);
+
+ if (rl_editing_mode == emacs_mode)
+ rl_mark = rl_point;
+ }
+ return 0;
+}
+
+/* Kill from here to the end of the line. If DIRECTION is negative, kill
+ back to the line start instead. */
+int
+rl_kill_line (direction, ignore)
+ int direction, ignore;
+{
+ int orig_point;
+
+ if (direction < 0)
+ return (rl_backward_kill_line (1, ignore));
+ else
+ {
+ orig_point = rl_point;
+ rl_end_of_line (1, ignore);
+ if (orig_point != rl_point)
+ rl_kill_text (orig_point, rl_point);
+ rl_point = orig_point;
+ if (rl_editing_mode == emacs_mode)
+ rl_mark = rl_point;
+ }
+ return 0;
+}
+
+/* Kill backwards to the start of the line. If DIRECTION is negative, kill
+ forwards to the line end instead. */
+int
+rl_backward_kill_line (direction, ignore)
+ int direction, ignore;
+{
+ int orig_point;
+
+ if (direction < 0)
+ return (rl_kill_line (1, ignore));
+ else
+ {
+ if (!rl_point)
+ rl_ding ();
+ else
+ {
+ orig_point = rl_point;
+ rl_beg_of_line (1, ignore);
+ if (rl_point != orig_point)
+ rl_kill_text (orig_point, rl_point);
+ if (rl_editing_mode == emacs_mode)
+ rl_mark = rl_point;
+ }
+ }
+ return 0;
+}
+
+/* Kill the whole line, no matter where point is. */
+int
+rl_kill_full_line (count, ignore)
+ int count, ignore;
+{
+ rl_begin_undo_group ();
+ rl_point = 0;
+ rl_kill_text (rl_point, rl_end);
+ rl_mark = 0;
+ rl_end_undo_group ();
+ return 0;
+}
+
+/* The next two functions mimic unix line editing behaviour, except they
+ save the deleted text on the kill ring. This is safer than not saving
+ it, and since we have a ring, nobody should get screwed. */
+
+/* This does what C-w does in Unix. We can't prevent people from
+ using behaviour that they expect. */
+int
+rl_unix_word_rubout (count, key)
+ int count, key;
+{
+ int orig_point;
+
+ if (rl_point == 0)
+ rl_ding ();
+ else
+ {
+ orig_point = rl_point;
+ if (count <= 0)
+ count = 1;
+
+ while (count--)
+ {
+ while (rl_point && whitespace (rl_line_buffer[rl_point - 1]))
+ rl_point--;
+
+ while (rl_point && (whitespace (rl_line_buffer[rl_point - 1]) == 0))
+ rl_point--;
+ }
+
+ rl_kill_text (orig_point, rl_point);
+ if (rl_editing_mode == emacs_mode)
+ rl_mark = rl_point;
+ }
+
+ return 0;
+}
+
+/* This deletes one filename component in a Unix pathname. That is, it
+ deletes backward to directory separator (`/') or whitespace. */
+int
+rl_unix_filename_rubout (count, key)
+ int count, key;
+{
+ int orig_point, c;
+
+ if (rl_point == 0)
+ rl_ding ();
+ else
+ {
+ orig_point = rl_point;
+ if (count <= 0)
+ count = 1;
+
+ while (count--)
+ {
+ c = rl_line_buffer[rl_point - 1];
+ while (rl_point && (whitespace (c) || c == '/'))
+ {
+ rl_point--;
+ c = rl_line_buffer[rl_point - 1];
+ }
+
+ while (rl_point && (whitespace (c) == 0) && c != '/')
+ {
+ rl_point--;
+ c = rl_line_buffer[rl_point - 1];
+ }
+ }
+
+ rl_kill_text (orig_point, rl_point);
+ if (rl_editing_mode == emacs_mode)
+ rl_mark = rl_point;
+ }
+
+ return 0;
+}
+
+/* Here is C-u doing what Unix does. You don't *have* to use these
+ key-bindings. We have a choice of killing the entire line, or
+ killing from where we are to the start of the line. We choose the
+ latter, because if you are a Unix weenie, then you haven't backspaced
+ into the line at all, and if you aren't, then you know what you are
+ doing. */
+int
+rl_unix_line_discard (count, key)
+ int count, key;
+{
+ if (rl_point == 0)
+ rl_ding ();
+ else
+ {
+ rl_kill_text (rl_point, 0);
+ rl_point = 0;
+ if (rl_editing_mode == emacs_mode)
+ rl_mark = rl_point;
+ }
+ return 0;
+}
+
+/* Copy the text in the `region' to the kill ring. If DELETE is non-zero,
+ delete the text from the line as well. */
+static int
+region_kill_internal (delete)
+ int delete;
+{
+ char *text;
+
+ if (rl_mark != rl_point)
+ {
+ text = rl_copy_text (rl_point, rl_mark);
+ if (delete)
+ rl_delete_text (rl_point, rl_mark);
+ _rl_copy_to_kill_ring (text, rl_point < rl_mark);
+ }
+
+ _rl_last_command_was_kill++;
+ return 0;
+}
+
+/* Copy the text in the region to the kill ring. */
+int
+rl_copy_region_to_kill (count, ignore)
+ int count, ignore;
+{
+ return (region_kill_internal (0));
+}
+
+/* Kill the text between the point and mark. */
+int
+rl_kill_region (count, ignore)
+ int count, ignore;
+{
+ int r, npoint;
+
+ npoint = (rl_point < rl_mark) ? rl_point : rl_mark;
+ r = region_kill_internal (1);
+ _rl_fix_point (1);
+ rl_point = npoint;
+ return r;
+}
+
+/* Copy COUNT words to the kill ring. DIR says which direction we look
+ to find the words. */
+static int
+_rl_copy_word_as_kill (count, dir)
+ int count, dir;
+{
+ int om, op, r;
+
+ om = rl_mark;
+ op = rl_point;
+
+ if (dir > 0)
+ rl_forward_word (count, 0);
+ else
+ rl_backward_word (count, 0);
+
+ rl_mark = rl_point;
+
+ if (dir > 0)
+ rl_backward_word (count, 0);
+ else
+ rl_forward_word (count, 0);
+
+ r = region_kill_internal (0);
+
+ rl_mark = om;
+ rl_point = op;
+
+ return r;
+}
+
+int
+rl_copy_forward_word (count, key)
+ int count, key;
+{
+ if (count < 0)
+ return (rl_copy_backward_word (-count, key));
+
+ return (_rl_copy_word_as_kill (count, 1));
+}
+
+int
+rl_copy_backward_word (count, key)
+ int count, key;
+{
+ if (count < 0)
+ return (rl_copy_forward_word (-count, key));
+
+ return (_rl_copy_word_as_kill (count, -1));
+}
+
+/* Yank back the last killed text. This ignores arguments. */
+int
+rl_yank (count, ignore)
+ int count, ignore;
+{
+ if (rl_kill_ring == 0)
+ {
+ _rl_abort_internal ();
+ return -1;
+ }
+
+ _rl_set_mark_at_pos (rl_point);
+ rl_insert_text (rl_kill_ring[rl_kill_index]);
+ return 0;
+}
+
+/* If the last command was yank, or yank_pop, and the text just
+ before point is identical to the current kill item, then
+ delete that text from the line, rotate the index down, and
+ yank back some other text. */
+int
+rl_yank_pop (count, key)
+ int count, key;
+{
+ int l, n;
+
+ if (((rl_last_func != rl_yank_pop) && (rl_last_func != rl_yank)) ||
+ !rl_kill_ring)
+ {
+ _rl_abort_internal ();
+ return -1;
+ }
+
+ l = strlen (rl_kill_ring[rl_kill_index]);
+ n = rl_point - l;
+ if (n >= 0 && STREQN (rl_line_buffer + n, rl_kill_ring[rl_kill_index], l))
+ {
+ rl_delete_text (n, rl_point);
+ rl_point = n;
+ rl_kill_index--;
+ if (rl_kill_index < 0)
+ rl_kill_index = rl_kill_ring_length - 1;
+ rl_yank (1, 0);
+ return 0;
+ }
+ else
+ {
+ _rl_abort_internal ();
+ return -1;
+ }
+}
+
+/* Yank the COUNTh argument from the previous history line, skipping
+ HISTORY_SKIP lines before looking for the `previous line'. */
+static int
+rl_yank_nth_arg_internal (count, ignore, history_skip)
+ int count, ignore, history_skip;
+{
+ register HIST_ENTRY *entry;
+ char *arg;
+ int i, pos;
+
+ pos = where_history ();
+
+ if (history_skip)
+ {
+ for (i = 0; i < history_skip; i++)
+ entry = previous_history ();
+ }
+
+ entry = previous_history ();
+
+ history_set_pos (pos);
+
+ if (entry == 0)
+ {
+ rl_ding ();
+ return -1;
+ }
+
+ arg = history_arg_extract (count, count, entry->line);
+ if (!arg || !*arg)
+ {
+ rl_ding ();
+ FREE (arg);
+ return -1;
+ }
+
+ rl_begin_undo_group ();
+
+ _rl_set_mark_at_pos (rl_point);
+
+#if defined (VI_MODE)
+ /* Vi mode always inserts a space before yanking the argument, and it
+ inserts it right *after* rl_point. */
+ if (rl_editing_mode == vi_mode)
+ {
+ rl_vi_append_mode (1, ignore);
+ rl_insert_text (" ");
+ }
+#endif /* VI_MODE */
+
+ rl_insert_text (arg);
+ free (arg);
+
+ rl_end_undo_group ();
+ return 0;
+}
+
+/* Yank the COUNTth argument from the previous history line. */
+int
+rl_yank_nth_arg (count, ignore)
+ int count, ignore;
+{
+ return (rl_yank_nth_arg_internal (count, ignore, 0));
+}
+
+/* Yank the last argument from the previous history line. This `knows'
+ how rl_yank_nth_arg treats a count of `$'. With an argument, this
+ behaves the same as rl_yank_nth_arg. */
+int
+rl_yank_last_arg (count, key)
+ int count, key;
+{
+ static int history_skip = 0;
+ static int explicit_arg_p = 0;
+ static int count_passed = 1;
+ static int direction = 1;
+ static int undo_needed = 0;
+ int retval;
+
+ if (rl_last_func != rl_yank_last_arg)
+ {
+ history_skip = 0;
+ explicit_arg_p = rl_explicit_arg;
+ count_passed = count;
+ direction = 1;
+ }
+ else
+ {
+ if (undo_needed)
+ rl_do_undo ();
+ if (count < 1)
+ direction = -direction;
+ history_skip += direction;
+ if (history_skip < 0)
+ history_skip = 0;
+ }
+
+ if (explicit_arg_p)
+ retval = rl_yank_nth_arg_internal (count_passed, key, history_skip);
+ else
+ retval = rl_yank_nth_arg_internal ('$', key, history_skip);
+
+ undo_needed = retval == 0;
+ return retval;
+}
+
+/* A special paste command for users of Cygnus's cygwin32. */
+#if defined (__CYGWIN__)
+#include <windows.h>
+
+int
+rl_paste_from_clipboard (count, key)
+ int count, key;
+{
+ char *data, *ptr;
+ int len;
+
+ if (OpenClipboard (NULL) == 0)
+ return (0);
+
+ data = (char *)GetClipboardData (CF_TEXT);
+ if (data)
+ {
+ ptr = strchr (data, '\r');
+ if (ptr)
+ {
+ len = ptr - data;
+ ptr = (char *)xmalloc (len + 1);
+ ptr[len] = '\0';
+ strncpy (ptr, data, len);
+ }
+ else
+ ptr = data;
+ _rl_set_mark_at_pos (rl_point);
+ rl_insert_text (ptr);
+ if (ptr != data)
+ xfree (ptr);
+ CloseClipboard ();
+ }
+ return (0);
+}
+#endif /* __CYGWIN__ */
diff --git a/lib/readline/macro.c b/lib/readline/macro.c
new file mode 100644
index 0000000..c2fac8a
--- /dev/null
+++ b/lib/readline/macro.c
@@ -0,0 +1,271 @@
+/* macro.c -- keyboard macros for readline. */
+
+/* Copyright (C) 1994-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h> /* for _POSIX_VERSION */
+#endif /* HAVE_UNISTD_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#include <stdio.h>
+
+/* System-specific feature definitions and include files. */
+#include "rldefs.h"
+
+/* Some standard library routines. */
+#include "readline.h"
+#include "history.h"
+
+#include "rlprivate.h"
+#include "xmalloc.h"
+
+/* **************************************************************** */
+/* */
+/* Hacking Keyboard Macros */
+/* */
+/* **************************************************************** */
+
+/* The currently executing macro string. If this is non-zero,
+ then it is a malloc ()'ed string where input is coming from. */
+char *rl_executing_macro = (char *)NULL;
+
+/* The offset in the above string to the next character to be read. */
+static int executing_macro_index;
+
+/* The current macro string being built. Characters get stuffed
+ in here by add_macro_char (). */
+static char *current_macro = (char *)NULL;
+
+/* The size of the buffer allocated to current_macro. */
+static int current_macro_size;
+
+/* The index at which characters are being added to current_macro. */
+static int current_macro_index;
+
+/* A structure used to save nested macro strings.
+ It is a linked list of string/index for each saved macro. */
+struct saved_macro {
+ struct saved_macro *next;
+ char *string;
+ int sindex;
+};
+
+/* The list of saved macros. */
+static struct saved_macro *macro_list = (struct saved_macro *)NULL;
+
+/* Set up to read subsequent input from STRING.
+ STRING is free ()'ed when we are done with it. */
+void
+_rl_with_macro_input (string)
+ char *string;
+{
+ _rl_push_executing_macro ();
+ rl_executing_macro = string;
+ executing_macro_index = 0;
+ RL_SETSTATE(RL_STATE_MACROINPUT);
+}
+
+/* Return the next character available from a macro, or 0 if
+ there are no macro characters. */
+int
+_rl_next_macro_key ()
+{
+ int c;
+
+ if (rl_executing_macro == 0)
+ return (0);
+
+ if (rl_executing_macro[executing_macro_index] == 0)
+ {
+ _rl_pop_executing_macro ();
+ return (_rl_next_macro_key ());
+ }
+
+#if defined (READLINE_CALLBACKS)
+ c = rl_executing_macro[executing_macro_index++];
+ if (RL_ISSTATE (RL_STATE_CALLBACK) && RL_ISSTATE (RL_STATE_READCMD|RL_STATE_MOREINPUT) && rl_executing_macro[executing_macro_index] == 0)
+ _rl_pop_executing_macro ();
+ return c;
+#else
+ return (rl_executing_macro[executing_macro_index++]);
+#endif
+}
+
+/* Save the currently executing macro on a stack of saved macros. */
+void
+_rl_push_executing_macro ()
+{
+ struct saved_macro *saver;
+
+ saver = (struct saved_macro *)xmalloc (sizeof (struct saved_macro));
+ saver->next = macro_list;
+ saver->sindex = executing_macro_index;
+ saver->string = rl_executing_macro;
+
+ macro_list = saver;
+}
+
+/* Discard the current macro, replacing it with the one
+ on the top of the stack of saved macros. */
+void
+_rl_pop_executing_macro ()
+{
+ struct saved_macro *macro;
+
+ FREE (rl_executing_macro);
+ rl_executing_macro = (char *)NULL;
+ executing_macro_index = 0;
+
+ if (macro_list)
+ {
+ macro = macro_list;
+ rl_executing_macro = macro_list->string;
+ executing_macro_index = macro_list->sindex;
+ macro_list = macro_list->next;
+ xfree (macro);
+ }
+
+ if (rl_executing_macro == 0)
+ RL_UNSETSTATE(RL_STATE_MACROINPUT);
+}
+
+/* Add a character to the macro being built. */
+void
+_rl_add_macro_char (c)
+ int c;
+{
+ if (current_macro_index + 1 >= current_macro_size)
+ {
+ if (current_macro == 0)
+ current_macro = (char *)xmalloc (current_macro_size = 25);
+ else
+ current_macro = (char *)xrealloc (current_macro, current_macro_size += 25);
+ }
+
+ current_macro[current_macro_index++] = c;
+ current_macro[current_macro_index] = '\0';
+}
+
+void
+_rl_kill_kbd_macro ()
+{
+ if (current_macro)
+ {
+ xfree (current_macro);
+ current_macro = (char *) NULL;
+ }
+ current_macro_size = current_macro_index = 0;
+
+ FREE (rl_executing_macro);
+ rl_executing_macro = (char *) NULL;
+ executing_macro_index = 0;
+
+ RL_UNSETSTATE(RL_STATE_MACRODEF);
+}
+
+/* Begin defining a keyboard macro.
+ Keystrokes are recorded as they are executed.
+ End the definition with rl_end_kbd_macro ().
+ If a numeric argument was explicitly typed, then append this
+ definition to the end of the existing macro, and start by
+ re-executing the existing macro. */
+int
+rl_start_kbd_macro (ignore1, ignore2)
+ int ignore1, ignore2;
+{
+ if (RL_ISSTATE (RL_STATE_MACRODEF))
+ {
+ _rl_abort_internal ();
+ return -1;
+ }
+
+ if (rl_explicit_arg)
+ {
+ if (current_macro)
+ _rl_with_macro_input (savestring (current_macro));
+ }
+ else
+ current_macro_index = 0;
+
+ RL_SETSTATE(RL_STATE_MACRODEF);
+ return 0;
+}
+
+/* Stop defining a keyboard macro.
+ A numeric argument says to execute the macro right now,
+ that many times, counting the definition as the first time. */
+int
+rl_end_kbd_macro (count, ignore)
+ int count, ignore;
+{
+ if (RL_ISSTATE (RL_STATE_MACRODEF) == 0)
+ {
+ _rl_abort_internal ();
+ return -1;
+ }
+
+ current_macro_index -= rl_key_sequence_length - 1;
+ current_macro[current_macro_index] = '\0';
+
+ RL_UNSETSTATE(RL_STATE_MACRODEF);
+
+ return (rl_call_last_kbd_macro (--count, 0));
+}
+
+/* Execute the most recently defined keyboard macro.
+ COUNT says how many times to execute it. */
+int
+rl_call_last_kbd_macro (count, ignore)
+ int count, ignore;
+{
+ if (current_macro == 0)
+ _rl_abort_internal ();
+
+ if (RL_ISSTATE (RL_STATE_MACRODEF))
+ {
+ rl_ding (); /* no recursive macros */
+ current_macro[--current_macro_index] = '\0'; /* erase this char */
+ return 0;
+ }
+
+ while (count--)
+ _rl_with_macro_input (savestring (current_macro));
+ return 0;
+}
+
+void
+rl_push_macro_input (macro)
+ char *macro;
+{
+ _rl_with_macro_input (macro);
+}
diff --git a/lib/readline/mbutil.c b/lib/readline/mbutil.c
new file mode 100644
index 0000000..eeb7e55
--- /dev/null
+++ b/lib/readline/mbutil.c
@@ -0,0 +1,375 @@
+/* mbutil.c -- readline multibyte character utility functions */
+
+/* Copyright (C) 2001-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <fcntl.h>
+#include "posixjmp.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h> /* for _POSIX_VERSION */
+#endif /* HAVE_UNISTD_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#include <stdio.h>
+#include <ctype.h>
+
+/* System-specific feature definitions and include files. */
+#include "rldefs.h"
+#include "rlmbutil.h"
+
+#if defined (TIOCSTAT_IN_SYS_IOCTL)
+# include <sys/ioctl.h>
+#endif /* TIOCSTAT_IN_SYS_IOCTL */
+
+/* Some standard library routines. */
+#include "readline.h"
+
+#include "rlprivate.h"
+#include "xmalloc.h"
+
+/* Declared here so it can be shared between the readline and history
+ libraries. */
+#if defined (HANDLE_MULTIBYTE)
+int rl_byte_oriented = 0;
+#else
+int rl_byte_oriented = 1;
+#endif
+
+/* **************************************************************** */
+/* */
+/* Multibyte Character Utility Functions */
+/* */
+/* **************************************************************** */
+
+#if defined(HANDLE_MULTIBYTE)
+
+static int
+_rl_find_next_mbchar_internal (string, seed, count, find_non_zero)
+ char *string;
+ int seed, count, find_non_zero;
+{
+ size_t tmp, len;
+ mbstate_t ps;
+ int point;
+ wchar_t wc;
+
+ tmp = 0;
+
+ memset(&ps, 0, sizeof (mbstate_t));
+ if (seed < 0)
+ seed = 0;
+ if (count <= 0)
+ return seed;
+
+ point = seed + _rl_adjust_point (string, seed, &ps);
+ /* if this is true, means that seed was not pointing to a byte indicating
+ the beginning of a multibyte character. Correct the point and consume
+ one char. */
+ if (seed < point)
+ count--;
+
+ while (count > 0)
+ {
+ len = strlen (string + point);
+ if (len == 0)
+ break;
+ tmp = mbrtowc (&wc, string+point, len, &ps);
+ if (MB_INVALIDCH ((size_t)tmp))
+ {
+ /* invalid bytes. assume a byte represents a character */
+ point++;
+ count--;
+ /* reset states. */
+ memset(&ps, 0, sizeof(mbstate_t));
+ }
+ else if (MB_NULLWCH (tmp))
+ break; /* found wide '\0' */
+ else
+ {
+ /* valid bytes */
+ point += tmp;
+ if (find_non_zero)
+ {
+ if (wcwidth (wc) == 0)
+ continue;
+ else
+ count--;
+ }
+ else
+ count--;
+ }
+ }
+
+ if (find_non_zero)
+ {
+ tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps);
+ while (MB_NULLWCH (tmp) == 0 && MB_INVALIDCH (tmp) == 0 && wcwidth (wc) == 0)
+ {
+ point += tmp;
+ tmp = mbrtowc (&wc, string + point, strlen (string + point), &ps);
+ }
+ }
+
+ return point;
+}
+
+static int
+_rl_find_prev_mbchar_internal (string, seed, find_non_zero)
+ char *string;
+ int seed, find_non_zero;
+{
+ mbstate_t ps;
+ int prev, non_zero_prev, point, length;
+ size_t tmp;
+ wchar_t wc;
+
+ memset(&ps, 0, sizeof(mbstate_t));
+ length = strlen(string);
+
+ if (seed < 0)
+ return 0;
+ else if (length < seed)
+ return length;
+
+ prev = non_zero_prev = point = 0;
+ while (point < seed)
+ {
+ tmp = mbrtowc (&wc, string + point, length - point, &ps);
+ if (MB_INVALIDCH ((size_t)tmp))
+ {
+ /* in this case, bytes are invalid or shorted to compose
+ multibyte char, so assume that the first byte represents
+ a single character anyway. */
+ tmp = 1;
+ /* clear the state of the byte sequence, because
+ in this case effect of mbstate is undefined */
+ memset(&ps, 0, sizeof (mbstate_t));
+
+ /* Since we're assuming that this byte represents a single
+ non-zero-width character, don't forget about it. */
+ prev = point;
+ }
+ else if (MB_NULLWCH (tmp))
+ break; /* Found '\0' char. Can this happen? */
+ else
+ {
+ if (find_non_zero)
+ {
+ if (wcwidth (wc) != 0)
+ prev = point;
+ }
+ else
+ prev = point;
+ }
+
+ point += tmp;
+ }
+
+ return prev;
+}
+
+/* return the number of bytes parsed from the multibyte sequence starting
+ at src, if a non-L'\0' wide character was recognized. It returns 0,
+ if a L'\0' wide character was recognized. It returns (size_t)(-1),
+ if an invalid multibyte sequence was encountered. It returns (size_t)(-2)
+ if it couldn't parse a complete multibyte character. */
+int
+_rl_get_char_len (src, ps)
+ char *src;
+ mbstate_t *ps;
+{
+ size_t tmp;
+
+ tmp = mbrlen((const char *)src, (size_t)strlen (src), ps);
+ if (tmp == (size_t)(-2))
+ {
+ /* shorted to compose multibyte char */
+ if (ps)
+ memset (ps, 0, sizeof(mbstate_t));
+ return -2;
+ }
+ else if (tmp == (size_t)(-1))
+ {
+ /* invalid to compose multibyte char */
+ /* initialize the conversion state */
+ if (ps)
+ memset (ps, 0, sizeof(mbstate_t));
+ return -1;
+ }
+ else if (tmp == (size_t)0)
+ return 0;
+ else
+ return (int)tmp;
+}
+
+/* compare the specified two characters. If the characters matched,
+ return 1. Otherwise return 0. */
+int
+_rl_compare_chars (buf1, pos1, ps1, buf2, pos2, ps2)
+ char *buf1;
+ int pos1;
+ mbstate_t *ps1;
+ char *buf2;
+ int pos2;
+ mbstate_t *ps2;
+{
+ int i, w1, w2;
+
+ if ((w1 = _rl_get_char_len (&buf1[pos1], ps1)) <= 0 ||
+ (w2 = _rl_get_char_len (&buf2[pos2], ps2)) <= 0 ||
+ (w1 != w2) ||
+ (buf1[pos1] != buf2[pos2]))
+ return 0;
+
+ for (i = 1; i < w1; i++)
+ if (buf1[pos1+i] != buf2[pos2+i])
+ return 0;
+
+ return 1;
+}
+
+/* adjust pointed byte and find mbstate of the point of string.
+ adjusted point will be point <= adjusted_point, and returns
+ differences of the byte(adjusted_point - point).
+ if point is invalied (point < 0 || more than string length),
+ it returns -1 */
+int
+_rl_adjust_point(string, point, ps)
+ char *string;
+ int point;
+ mbstate_t *ps;
+{
+ size_t tmp = 0;
+ int length;
+ int pos = 0;
+
+ length = strlen(string);
+ if (point < 0)
+ return -1;
+ if (length < point)
+ return -1;
+
+ while (pos < point)
+ {
+ tmp = mbrlen (string + pos, length - pos, ps);
+ if (MB_INVALIDCH ((size_t)tmp))
+ {
+ /* in this case, bytes are invalid or shorted to compose
+ multibyte char, so assume that the first byte represents
+ a single character anyway. */
+ pos++;
+ /* clear the state of the byte sequence, because
+ in this case effect of mbstate is undefined */
+ if (ps)
+ memset (ps, 0, sizeof (mbstate_t));
+ }
+ else if (MB_NULLWCH (tmp))
+ pos++;
+ else
+ pos += tmp;
+ }
+
+ return (pos - point);
+}
+
+int
+_rl_is_mbchar_matched (string, seed, end, mbchar, length)
+ char *string;
+ int seed, end;
+ char *mbchar;
+ int length;
+{
+ int i;
+
+ if ((end - seed) < length)
+ return 0;
+
+ for (i = 0; i < length; i++)
+ if (string[seed + i] != mbchar[i])
+ return 0;
+ return 1;
+}
+
+wchar_t
+_rl_char_value (buf, ind)
+ char *buf;
+ int ind;
+{
+ size_t tmp;
+ wchar_t wc;
+ mbstate_t ps;
+ int l;
+
+ if (MB_LEN_MAX == 1 || rl_byte_oriented)
+ return ((wchar_t) buf[ind]);
+ l = strlen (buf);
+ if (ind >= l - 1)
+ return ((wchar_t) buf[ind]);
+ memset (&ps, 0, sizeof (mbstate_t));
+ tmp = mbrtowc (&wc, buf + ind, l - ind, &ps);
+ if (MB_INVALIDCH (tmp) || MB_NULLWCH (tmp))
+ return ((wchar_t) buf[ind]);
+ return wc;
+}
+#endif /* HANDLE_MULTIBYTE */
+
+/* Find next `count' characters started byte point of the specified seed.
+ If flags is MB_FIND_NONZERO, we look for non-zero-width multibyte
+ characters. */
+#undef _rl_find_next_mbchar
+int
+_rl_find_next_mbchar (string, seed, count, flags)
+ char *string;
+ int seed, count, flags;
+{
+#if defined (HANDLE_MULTIBYTE)
+ return _rl_find_next_mbchar_internal (string, seed, count, flags);
+#else
+ return (seed + count);
+#endif
+}
+
+/* Find previous character started byte point of the specified seed.
+ Returned point will be point <= seed. If flags is MB_FIND_NONZERO,
+ we look for non-zero-width multibyte characters. */
+#undef _rl_find_prev_mbchar
+int
+_rl_find_prev_mbchar (string, seed, flags)
+ char *string;
+ int seed, flags;
+{
+#if defined (HANDLE_MULTIBYTE)
+ return _rl_find_prev_mbchar_internal (string, seed, flags);
+#else
+ return ((seed == 0) ? seed : seed - 1);
+#endif
+}
diff --git a/lib/readline/misc.c b/lib/readline/misc.c
new file mode 100644
index 0000000..12ae4a5
--- /dev/null
+++ b/lib/readline/misc.c
@@ -0,0 +1,655 @@
+/* misc.c -- miscellaneous bindable readline functions. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#if defined (HAVE_LOCALE_H)
+# include <locale.h>
+#endif
+
+#include <stdio.h>
+
+/* System-specific feature definitions and include files. */
+#include "rldefs.h"
+#include "rlmbutil.h"
+
+/* Some standard library routines. */
+#include "readline.h"
+#include "history.h"
+
+#include "rlprivate.h"
+#include "rlshell.h"
+#include "xmalloc.h"
+
+static int rl_digit_loop PARAMS((void));
+static void _rl_history_set_point PARAMS((void));
+
+/* Forward declarations used in this file */
+void _rl_free_history_entry PARAMS((HIST_ENTRY *));
+
+/* If non-zero, rl_get_previous_history and rl_get_next_history attempt
+ to preserve the value of rl_point from line to line. */
+int _rl_history_preserve_point = 0;
+
+_rl_arg_cxt _rl_argcxt;
+
+/* Saved target point for when _rl_history_preserve_point is set. Special
+ value of -1 means that point is at the end of the line. */
+int _rl_history_saved_point = -1;
+
+/* **************************************************************** */
+/* */
+/* Numeric Arguments */
+/* */
+/* **************************************************************** */
+
+int
+_rl_arg_overflow ()
+{
+ if (rl_numeric_arg > 1000000)
+ {
+ _rl_argcxt = 0;
+ rl_explicit_arg = rl_numeric_arg = 0;
+ rl_ding ();
+ rl_restore_prompt ();
+ rl_clear_message ();
+ RL_UNSETSTATE(RL_STATE_NUMERICARG);
+ return 1;
+ }
+ return 0;
+}
+
+void
+_rl_arg_init ()
+{
+ rl_save_prompt ();
+ _rl_argcxt = 0;
+ RL_SETSTATE(RL_STATE_NUMERICARG);
+}
+
+int
+_rl_arg_getchar ()
+{
+ int c;
+
+ rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
+ return c;
+}
+
+/* Process C as part of the current numeric argument. Return -1 if the
+ argument should be aborted, 0 if we should not read any more chars, and
+ 1 if we should continue to read chars. */
+int
+_rl_arg_dispatch (cxt, c)
+ _rl_arg_cxt cxt;
+ int c;
+{
+ int key, r;
+
+ key = c;
+
+ /* If we see a key bound to `universal-argument' after seeing digits,
+ it ends the argument but is otherwise ignored. */
+ if (_rl_keymap[c].type == ISFUNC && _rl_keymap[c].function == rl_universal_argument)
+ {
+ if ((cxt & NUM_SAWDIGITS) == 0)
+ {
+ rl_numeric_arg *= 4;
+ return 1;
+ }
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_argcxt |= NUM_READONE;
+ return 0; /* XXX */
+ }
+ else
+ {
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ key = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ rl_restore_prompt ();
+ rl_clear_message ();
+ RL_UNSETSTATE(RL_STATE_NUMERICARG);
+ if (key < 0)
+ return -1;
+ return (_rl_dispatch (key, _rl_keymap));
+ }
+ }
+
+ c = UNMETA (c);
+
+ if (_rl_digit_p (c))
+ {
+ r = _rl_digit_value (c);
+ rl_numeric_arg = rl_explicit_arg ? (rl_numeric_arg * 10) + r : r;
+ rl_explicit_arg = 1;
+ _rl_argcxt |= NUM_SAWDIGITS;
+ }
+ else if (c == '-' && rl_explicit_arg == 0)
+ {
+ rl_numeric_arg = 1;
+ _rl_argcxt |= NUM_SAWMINUS;
+ rl_arg_sign = -1;
+ }
+ else
+ {
+ /* Make M-- command equivalent to M--1 command. */
+ if ((_rl_argcxt & NUM_SAWMINUS) && rl_numeric_arg == 1 && rl_explicit_arg == 0)
+ rl_explicit_arg = 1;
+ rl_restore_prompt ();
+ rl_clear_message ();
+ RL_UNSETSTATE(RL_STATE_NUMERICARG);
+
+ r = _rl_dispatch (key, _rl_keymap);
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ /* At worst, this will cause an extra redisplay. Otherwise,
+ we have to wait until the next character comes in. */
+ if (rl_done == 0)
+ (*rl_redisplay_function) ();
+ r = 0;
+ }
+ return r;
+ }
+
+ return 1;
+}
+
+/* Handle C-u style numeric args, as well as M--, and M-digits. */
+static int
+rl_digit_loop ()
+{
+ int c, r;
+
+ while (1)
+ {
+ if (_rl_arg_overflow ())
+ return 1;
+
+ c = _rl_arg_getchar ();
+
+ if (c < 0)
+ {
+ _rl_abort_internal ();
+ return -1;
+ }
+
+ r = _rl_arg_dispatch (_rl_argcxt, c);
+ if (r <= 0 || (RL_ISSTATE (RL_STATE_NUMERICARG) == 0))
+ break;
+ }
+
+ return r;
+}
+
+/* Create a default argument. */
+void
+_rl_reset_argument ()
+{
+ rl_numeric_arg = rl_arg_sign = 1;
+ rl_explicit_arg = 0;
+ _rl_argcxt = 0;
+}
+
+/* Start a numeric argument with initial value KEY */
+int
+rl_digit_argument (ignore, key)
+ int ignore, key;
+{
+ _rl_arg_init ();
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_arg_dispatch (_rl_argcxt, key);
+ rl_message ("(arg: %d) ", rl_arg_sign * rl_numeric_arg);
+ return 0;
+ }
+ else
+ {
+ rl_execute_next (key);
+ return (rl_digit_loop ());
+ }
+}
+
+/* C-u, universal argument. Multiply the current argument by 4.
+ Read a key. If the key has nothing to do with arguments, then
+ dispatch on it. If the key is the abort character then abort. */
+int
+rl_universal_argument (count, key)
+ int count, key;
+{
+ _rl_arg_init ();
+ rl_numeric_arg *= 4;
+
+ return (RL_ISSTATE (RL_STATE_CALLBACK) ? 0 : rl_digit_loop ());
+}
+
+int
+_rl_arg_callback (cxt)
+ _rl_arg_cxt cxt;
+{
+ int c, r;
+
+ c = _rl_arg_getchar ();
+
+ if (_rl_argcxt & NUM_READONE)
+ {
+ _rl_argcxt &= ~NUM_READONE;
+ rl_restore_prompt ();
+ rl_clear_message ();
+ RL_UNSETSTATE(RL_STATE_NUMERICARG);
+ rl_execute_next (c);
+ return 0;
+ }
+
+ r = _rl_arg_dispatch (cxt, c);
+ return (r != 1);
+}
+
+/* What to do when you abort reading an argument. */
+int
+rl_discard_argument ()
+{
+ rl_ding ();
+ rl_clear_message ();
+ _rl_reset_argument ();
+
+ return 0;
+}
+
+/* **************************************************************** */
+/* */
+/* History Utilities */
+/* */
+/* **************************************************************** */
+
+/* We already have a history library, and that is what we use to control
+ the history features of readline. This is our local interface to
+ the history mechanism. */
+
+/* While we are editing the history, this is the saved
+ version of the original line. */
+HIST_ENTRY *_rl_saved_line_for_history = (HIST_ENTRY *)NULL;
+
+/* Set the history pointer back to the last entry in the history. */
+void
+_rl_start_using_history ()
+{
+ using_history ();
+ if (_rl_saved_line_for_history)
+ _rl_free_history_entry (_rl_saved_line_for_history);
+
+ _rl_saved_line_for_history = (HIST_ENTRY *)NULL;
+}
+
+/* Free the contents (and containing structure) of a HIST_ENTRY. */
+void
+_rl_free_history_entry (entry)
+ HIST_ENTRY *entry;
+{
+ if (entry == 0)
+ return;
+
+ FREE (entry->line);
+ FREE (entry->timestamp);
+
+ free (entry);
+}
+
+/* Perhaps put back the current line if it has changed. */
+int
+rl_maybe_replace_line ()
+{
+ HIST_ENTRY *temp;
+
+ temp = current_history ();
+ /* If the current line has changed, save the changes. */
+ if (temp && ((UNDO_LIST *)(temp->data) != rl_undo_list))
+ {
+ temp = replace_history_entry (where_history (), rl_line_buffer, (histdata_t)rl_undo_list);
+ free (temp->line);
+ FREE (temp->timestamp);
+ free (temp);
+ }
+ return 0;
+}
+
+/* Restore the _rl_saved_line_for_history if there is one. */
+int
+rl_maybe_unsave_line ()
+{
+ if (_rl_saved_line_for_history)
+ {
+ /* Can't call with `1' because rl_undo_list might point to an undo
+ list from a history entry, as in rl_replace_from_history() below. */
+ rl_replace_line (_rl_saved_line_for_history->line, 0);
+ rl_undo_list = (UNDO_LIST *)_rl_saved_line_for_history->data;
+ _rl_free_history_entry (_rl_saved_line_for_history);
+ _rl_saved_line_for_history = (HIST_ENTRY *)NULL;
+ rl_point = rl_end; /* rl_replace_line sets rl_end */
+ }
+ else
+ rl_ding ();
+ return 0;
+}
+
+/* Save the current line in _rl_saved_line_for_history. */
+int
+rl_maybe_save_line ()
+{
+ if (_rl_saved_line_for_history == 0)
+ {
+ _rl_saved_line_for_history = (HIST_ENTRY *)xmalloc (sizeof (HIST_ENTRY));
+ _rl_saved_line_for_history->line = savestring (rl_line_buffer);
+ _rl_saved_line_for_history->timestamp = (char *)NULL;
+ _rl_saved_line_for_history->data = (char *)rl_undo_list;
+ }
+
+ return 0;
+}
+
+int
+_rl_free_saved_history_line ()
+{
+ if (_rl_saved_line_for_history)
+ {
+ _rl_free_history_entry (_rl_saved_line_for_history);
+ _rl_saved_line_for_history = (HIST_ENTRY *)NULL;
+ }
+ return 0;
+}
+
+static void
+_rl_history_set_point ()
+{
+ rl_point = (_rl_history_preserve_point && _rl_history_saved_point != -1)
+ ? _rl_history_saved_point
+ : rl_end;
+ if (rl_point > rl_end)
+ rl_point = rl_end;
+
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode && _rl_keymap != vi_insertion_keymap)
+ rl_point = 0;
+#endif /* VI_MODE */
+
+ if (rl_editing_mode == emacs_mode)
+ rl_mark = (rl_point == rl_end ? 0 : rl_end);
+}
+
+void
+rl_replace_from_history (entry, flags)
+ HIST_ENTRY *entry;
+ int flags; /* currently unused */
+{
+ /* Can't call with `1' because rl_undo_list might point to an undo list
+ from a history entry, just like we're setting up here. */
+ rl_replace_line (entry->line, 0);
+ rl_undo_list = (UNDO_LIST *)entry->data;
+ rl_point = rl_end;
+ rl_mark = 0;
+
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode)
+ {
+ rl_point = 0;
+ rl_mark = rl_end;
+ }
+#endif
+}
+
+/* Process and free undo lists attached to each history entry prior to the
+ current entry, inclusive, reverting each line to its saved state. This
+ is destructive, and state about the current line is lost. This is not
+ intended to be called while actively editing, and the current line is
+ not assumed to have been added to the history list. */
+void
+_rl_revert_all_lines ()
+{
+ int hpos;
+ HIST_ENTRY *entry;
+ UNDO_LIST *ul, *saved_undo_list;
+ char *lbuf;
+
+ lbuf = savestring (rl_line_buffer);
+ saved_undo_list = rl_undo_list;
+ hpos = where_history ();
+
+ entry = (hpos == history_length) ? previous_history () : current_history ();
+ while (entry)
+ {
+ if (ul = (UNDO_LIST *)entry->data)
+ {
+ if (ul == saved_undo_list)
+ saved_undo_list = 0;
+ /* Set up rl_line_buffer and other variables from history entry */
+ rl_replace_from_history (entry, 0); /* entry->line is now current */
+ /* Undo all changes to this history entry */
+ while (rl_undo_list)
+ rl_do_undo ();
+ /* And copy the reverted line back to the history entry, preserving
+ the timestamp. */
+ FREE (entry->line);
+ entry->line = savestring (rl_line_buffer);
+ entry->data = 0;
+ }
+ entry = previous_history ();
+ }
+
+ /* Restore history state */
+ rl_undo_list = saved_undo_list; /* may have been set to null */
+ history_set_pos (hpos);
+
+ /* reset the line buffer */
+ rl_replace_line (lbuf, 0);
+ _rl_set_the_line ();
+
+ /* and clean up */
+ free (lbuf);
+}
+
+/* **************************************************************** */
+/* */
+/* History Commands */
+/* */
+/* **************************************************************** */
+
+/* Meta-< goes to the start of the history. */
+int
+rl_beginning_of_history (count, key)
+ int count, key;
+{
+ return (rl_get_previous_history (1 + where_history (), key));
+}
+
+/* Meta-> goes to the end of the history. (The current line). */
+int
+rl_end_of_history (count, key)
+ int count, key;
+{
+ rl_maybe_replace_line ();
+ using_history ();
+ rl_maybe_unsave_line ();
+ return 0;
+}
+
+/* Move down to the next history line. */
+int
+rl_get_next_history (count, key)
+ int count, key;
+{
+ HIST_ENTRY *temp;
+
+ if (count < 0)
+ return (rl_get_previous_history (-count, key));
+
+ if (count == 0)
+ return 0;
+
+ rl_maybe_replace_line ();
+
+ /* either not saved by rl_newline or at end of line, so set appropriately. */
+ if (_rl_history_saved_point == -1 && (rl_point || rl_end))
+ _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point;
+
+ temp = (HIST_ENTRY *)NULL;
+ while (count)
+ {
+ temp = next_history ();
+ if (!temp)
+ break;
+ --count;
+ }
+
+ if (temp == 0)
+ rl_maybe_unsave_line ();
+ else
+ {
+ rl_replace_from_history (temp, 0);
+ _rl_history_set_point ();
+ }
+ return 0;
+}
+
+/* Get the previous item out of our interactive history, making it the current
+ line. If there is no previous history, just ding. */
+int
+rl_get_previous_history (count, key)
+ int count, key;
+{
+ HIST_ENTRY *old_temp, *temp;
+
+ if (count < 0)
+ return (rl_get_next_history (-count, key));
+
+ if (count == 0)
+ return 0;
+
+ /* either not saved by rl_newline or at end of line, so set appropriately. */
+ if (_rl_history_saved_point == -1 && (rl_point || rl_end))
+ _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point;
+
+ /* If we don't have a line saved, then save this one. */
+ rl_maybe_save_line ();
+
+ /* If the current line has changed, save the changes. */
+ rl_maybe_replace_line ();
+
+ temp = old_temp = (HIST_ENTRY *)NULL;
+ while (count)
+ {
+ temp = previous_history ();
+ if (temp == 0)
+ break;
+
+ old_temp = temp;
+ --count;
+ }
+
+ /* If there was a large argument, and we moved back to the start of the
+ history, that is not an error. So use the last value found. */
+ if (!temp && old_temp)
+ temp = old_temp;
+
+ if (temp == 0)
+ rl_ding ();
+ else
+ {
+ rl_replace_from_history (temp, 0);
+ _rl_history_set_point ();
+ }
+
+ return 0;
+}
+
+/* **************************************************************** */
+/* */
+/* Editing Modes */
+/* */
+/* **************************************************************** */
+/* How to toggle back and forth between editing modes. */
+int
+rl_vi_editing_mode (count, key)
+ int count, key;
+{
+#if defined (VI_MODE)
+ _rl_set_insert_mode (RL_IM_INSERT, 1); /* vi mode ignores insert mode */
+ rl_editing_mode = vi_mode;
+ rl_vi_insert_mode (1, key);
+#endif /* VI_MODE */
+
+ return 0;
+}
+
+int
+rl_emacs_editing_mode (count, key)
+ int count, key;
+{
+ rl_editing_mode = emacs_mode;
+ _rl_set_insert_mode (RL_IM_INSERT, 1); /* emacs mode default is insert mode */
+ _rl_keymap = emacs_standard_keymap;
+ return 0;
+}
+
+/* Function for the rest of the library to use to set insert/overwrite mode. */
+void
+_rl_set_insert_mode (im, force)
+ int im, force;
+{
+#ifdef CURSOR_MODE
+ _rl_set_cursor (im, force);
+#endif
+
+ rl_insert_mode = im;
+}
+
+/* Toggle overwrite mode. A positive explicit argument selects overwrite
+ mode. A negative or zero explicit argument selects insert mode. */
+int
+rl_overwrite_mode (count, key)
+ int count, key;
+{
+ if (rl_explicit_arg == 0)
+ _rl_set_insert_mode (rl_insert_mode ^ 1, 0);
+ else if (count > 0)
+ _rl_set_insert_mode (RL_IM_OVERWRITE, 0);
+ else
+ _rl_set_insert_mode (RL_IM_INSERT, 0);
+
+ return 0;
+}
diff --git a/lib/readline/nls.c b/lib/readline/nls.c
new file mode 100644
index 0000000..7f10f01
--- /dev/null
+++ b/lib/readline/nls.c
@@ -0,0 +1,252 @@
+/* nls.c -- skeletal internationalization code. */
+
+/* Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#include <stdio.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#if defined (HAVE_LOCALE_H)
+# include <locale.h>
+#endif
+
+#include <ctype.h>
+
+#include "rldefs.h"
+#include "readline.h"
+#include "rlshell.h"
+#include "rlprivate.h"
+
+#if !defined (HAVE_SETLOCALE)
+/* A list of legal values for the LANG or LC_CTYPE environment variables.
+ If a locale name in this list is the value for the LC_ALL, LC_CTYPE,
+ or LANG environment variable (using the first of those with a value),
+ readline eight-bit mode is enabled. */
+static char *legal_lang_values[] =
+{
+ "iso88591",
+ "iso88592",
+ "iso88593",
+ "iso88594",
+ "iso88595",
+ "iso88596",
+ "iso88597",
+ "iso88598",
+ "iso88599",
+ "iso885910",
+ "koi8r",
+ 0
+};
+
+static char *normalize_codeset PARAMS((char *));
+static char *find_codeset PARAMS((char *, size_t *));
+#endif /* !HAVE_SETLOCALE */
+
+static char *_rl_get_locale_var PARAMS((const char *));
+
+static char *
+_rl_get_locale_var (v)
+ const char *v;
+{
+ char *lspec;
+
+ lspec = sh_get_env_value ("LC_ALL");
+ if (lspec == 0 || *lspec == 0)
+ lspec = sh_get_env_value (v);
+ if (lspec == 0 || *lspec == 0)
+ lspec = sh_get_env_value ("LANG");
+
+ return lspec;
+}
+
+/* Check for LC_ALL, LC_CTYPE, and LANG and use the first with a value
+ to decide the defaults for 8-bit character input and output. Returns
+ 1 if we set eight-bit mode. */
+int
+_rl_init_eightbit ()
+{
+/* If we have setlocale(3), just check the current LC_CTYPE category
+ value, and go into eight-bit mode if it's not C or POSIX. */
+#if defined (HAVE_SETLOCALE)
+ char *lspec, *t;
+
+ /* Set the LC_CTYPE locale category from environment variables. */
+ lspec = _rl_get_locale_var ("LC_CTYPE");
+ /* Since _rl_get_locale_var queries the right environment variables,
+ we query the current locale settings with setlocale(), and, if
+ that doesn't return anything, we set lspec to the empty string to
+ force the subsequent call to setlocale() to define the `native'
+ environment. */
+ if (lspec == 0 || *lspec == 0)
+ lspec = setlocale (LC_CTYPE, (char *)NULL);
+ if (lspec == 0)
+ lspec = "";
+ t = setlocale (LC_CTYPE, lspec);
+
+ if (t && *t && (t[0] != 'C' || t[1]) && (STREQ (t, "POSIX") == 0))
+ {
+ _rl_meta_flag = 1;
+ _rl_convert_meta_chars_to_ascii = 0;
+ _rl_output_meta_chars = 1;
+ return (1);
+ }
+ else
+ return (0);
+
+#else /* !HAVE_SETLOCALE */
+ char *lspec, *t;
+ int i;
+
+ /* We don't have setlocale. Finesse it. Check the environment for the
+ appropriate variables and set eight-bit mode if they have the right
+ values. */
+ lspec = _rl_get_locale_var ("LC_CTYPE");
+
+ if (lspec == 0 || (t = normalize_codeset (lspec)) == 0)
+ return (0);
+ for (i = 0; t && legal_lang_values[i]; i++)
+ if (STREQ (t, legal_lang_values[i]))
+ {
+ _rl_meta_flag = 1;
+ _rl_convert_meta_chars_to_ascii = 0;
+ _rl_output_meta_chars = 1;
+ break;
+ }
+ free (t);
+ return (legal_lang_values[i] ? 1 : 0);
+
+#endif /* !HAVE_SETLOCALE */
+}
+
+#if !defined (HAVE_SETLOCALE)
+static char *
+normalize_codeset (codeset)
+ char *codeset;
+{
+ size_t namelen, i;
+ int len, all_digits;
+ char *wp, *retval;
+
+ codeset = find_codeset (codeset, &namelen);
+
+ if (codeset == 0)
+ return (codeset);
+
+ all_digits = 1;
+ for (len = 0, i = 0; i < namelen; i++)
+ {
+ if (ISALNUM ((unsigned char)codeset[i]))
+ {
+ len++;
+ all_digits &= _rl_digit_p (codeset[i]);
+ }
+ }
+
+ retval = (char *)malloc ((all_digits ? 3 : 0) + len + 1);
+ if (retval == 0)
+ return ((char *)0);
+
+ wp = retval;
+ /* Add `iso' to beginning of an all-digit codeset */
+ if (all_digits)
+ {
+ *wp++ = 'i';
+ *wp++ = 's';
+ *wp++ = 'o';
+ }
+
+ for (i = 0; i < namelen; i++)
+ if (ISALPHA ((unsigned char)codeset[i]))
+ *wp++ = _rl_to_lower (codeset[i]);
+ else if (_rl_digit_p (codeset[i]))
+ *wp++ = codeset[i];
+ *wp = '\0';
+
+ return retval;
+}
+
+/* Isolate codeset portion of locale specification. */
+static char *
+find_codeset (name, lenp)
+ char *name;
+ size_t *lenp;
+{
+ char *cp, *language, *result;
+
+ cp = language = name;
+ result = (char *)0;
+
+ while (*cp && *cp != '_' && *cp != '@' && *cp != '+' && *cp != ',')
+ cp++;
+
+ /* This does not make sense: language has to be specified. As
+ an exception we allow the variable to contain only the codeset
+ name. Perhaps there are funny codeset names. */
+ if (language == cp)
+ {
+ *lenp = strlen (language);
+ result = language;
+ }
+ else
+ {
+ /* Next is the territory. */
+ if (*cp == '_')
+ do
+ ++cp;
+ while (*cp && *cp != '.' && *cp != '@' && *cp != '+' && *cp != ',' && *cp != '_');
+
+ /* Now, finally, is the codeset. */
+ result = cp;
+ if (*cp == '.')
+ do
+ ++cp;
+ while (*cp && *cp != '@');
+
+ if (cp - result > 2)
+ {
+ result++;
+ *lenp = cp - result;
+ }
+ else
+ {
+ *lenp = strlen (language);
+ result = language;
+ }
+ }
+
+ return result;
+}
+#endif /* !HAVE_SETLOCALE */
diff --git a/lib/readline/parens.c b/lib/readline/parens.c
new file mode 100644
index 0000000..9c98488
--- /dev/null
+++ b/lib/readline/parens.c
@@ -0,0 +1,173 @@
+/* parens.c -- implementation of matching parentheses feature. */
+
+/* Copyright (C) 1987, 1989, 1992-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (__TANDEM)
+# include <floss.h>
+#endif
+
+#include "rlconf.h"
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "posixselect.h"
+
+#if defined (HAVE_STRING_H)
+# include <string.h>
+#else /* !HAVE_STRING_H */
+# include <strings.h>
+#endif /* !HAVE_STRING_H */
+
+#if !defined (strchr) && !defined (__STDC__)
+extern char *strchr (), *strrchr ();
+#endif /* !strchr && !__STDC__ */
+
+#include "readline.h"
+#include "rlprivate.h"
+
+static int find_matching_open PARAMS((char *, int, int));
+
+/* Non-zero means try to blink the matching open parenthesis when the
+ close parenthesis is inserted. */
+#if defined (HAVE_SELECT)
+int rl_blink_matching_paren = 1;
+#else /* !HAVE_SELECT */
+int rl_blink_matching_paren = 0;
+#endif /* !HAVE_SELECT */
+
+static int _paren_blink_usec = 500000;
+
+/* Change emacs_standard_keymap to have bindings for paren matching when
+ ON_OR_OFF is 1, change them back to self_insert when ON_OR_OFF == 0. */
+void
+_rl_enable_paren_matching (on_or_off)
+ int on_or_off;
+{
+ if (on_or_off)
+ { /* ([{ */
+ rl_bind_key_in_map (')', rl_insert_close, emacs_standard_keymap);
+ rl_bind_key_in_map (']', rl_insert_close, emacs_standard_keymap);
+ rl_bind_key_in_map ('}', rl_insert_close, emacs_standard_keymap);
+ }
+ else
+ { /* ([{ */
+ rl_bind_key_in_map (')', rl_insert, emacs_standard_keymap);
+ rl_bind_key_in_map (']', rl_insert, emacs_standard_keymap);
+ rl_bind_key_in_map ('}', rl_insert, emacs_standard_keymap);
+ }
+}
+
+int
+rl_set_paren_blink_timeout (u)
+ int u;
+{
+ int o;
+
+ o = _paren_blink_usec;
+ if (u > 0)
+ _paren_blink_usec = u;
+ return (o);
+}
+
+int
+rl_insert_close (count, invoking_key)
+ int count, invoking_key;
+{
+ if (rl_explicit_arg || !rl_blink_matching_paren)
+ _rl_insert_char (count, invoking_key);
+ else
+ {
+#if defined (HAVE_SELECT)
+ int orig_point, match_point, ready;
+ struct timeval timer;
+ fd_set readfds;
+
+ _rl_insert_char (1, invoking_key);
+ (*rl_redisplay_function) ();
+ match_point =
+ find_matching_open (rl_line_buffer, rl_point - 2, invoking_key);
+
+ /* Emacs might message or ring the bell here, but I don't. */
+ if (match_point < 0)
+ return -1;
+
+ FD_ZERO (&readfds);
+ FD_SET (fileno (rl_instream), &readfds);
+ USEC_TO_TIMEVAL (_paren_blink_usec, timer);
+
+ orig_point = rl_point;
+ rl_point = match_point;
+ (*rl_redisplay_function) ();
+ ready = select (1, &readfds, (fd_set *)NULL, (fd_set *)NULL, &timer);
+ rl_point = orig_point;
+#else /* !HAVE_SELECT */
+ _rl_insert_char (count, invoking_key);
+#endif /* !HAVE_SELECT */
+ }
+ return 0;
+}
+
+static int
+find_matching_open (string, from, closer)
+ char *string;
+ int from, closer;
+{
+ register int i;
+ int opener, level, delimiter;
+
+ switch (closer)
+ {
+ case ']': opener = '['; break;
+ case '}': opener = '{'; break;
+ case ')': opener = '('; break;
+ default:
+ return (-1);
+ }
+
+ level = 1; /* The closer passed in counts as 1. */
+ delimiter = 0; /* Delimited state unknown. */
+
+ for (i = from; i > -1; i--)
+ {
+ if (delimiter && (string[i] == delimiter))
+ delimiter = 0;
+ else if (rl_basic_quote_characters && strchr (rl_basic_quote_characters, string[i]))
+ delimiter = string[i];
+ else if (!delimiter && (string[i] == closer))
+ level++;
+ else if (!delimiter && (string[i] == opener))
+ level--;
+
+ if (!level)
+ break;
+ }
+ return (i);
+}
diff --git a/lib/readline/posixdir.h b/lib/readline/posixdir.h
new file mode 100644
index 0000000..bd33694
--- /dev/null
+++ b/lib/readline/posixdir.h
@@ -0,0 +1,61 @@
+/* posixdir.h -- Posix directory reading includes and defines. */
+
+/* Copyright (C) 1987,1991 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* This file should be included instead of <dirent.h> or <sys/dir.h>. */
+
+#if !defined (_POSIXDIR_H_)
+#define _POSIXDIR_H_
+
+#if defined (HAVE_DIRENT_H)
+# include <dirent.h>
+# if defined (HAVE_STRUCT_DIRENT_D_NAMLEN)
+# define D_NAMLEN(d) ((d)->d_namlen)
+# else
+# define D_NAMLEN(d) (strlen ((d)->d_name))
+# endif /* !HAVE_STRUCT_DIRENT_D_NAMLEN */
+#else
+# if defined (HAVE_SYS_NDIR_H)
+# include <sys/ndir.h>
+# endif
+# if defined (HAVE_SYS_DIR_H)
+# include <sys/dir.h>
+# endif
+# if defined (HAVE_NDIR_H)
+# include <ndir.h>
+# endif
+# if !defined (dirent)
+# define dirent direct
+# endif /* !dirent */
+# define D_NAMLEN(d) ((d)->d_namlen)
+#endif /* !HAVE_DIRENT_H */
+
+#if defined (HAVE_STRUCT_DIRENT_D_INO) && !defined (HAVE_STRUCT_DIRENT_D_FILENO)
+# define d_fileno d_ino
+#endif
+
+#if defined (_POSIX_SOURCE) && (!defined (HAVE_STRUCT_DIRENT_D_INO) || defined (BROKEN_DIRENT_D_INO))
+/* Posix does not require that the d_ino field be present, and some
+ systems do not provide it. */
+# define REAL_DIR_ENTRY(dp) 1
+#else
+# define REAL_DIR_ENTRY(dp) (dp->d_ino != 0)
+#endif /* _POSIX_SOURCE */
+
+#endif /* !_POSIXDIR_H_ */
diff --git a/lib/readline/posixjmp.h b/lib/readline/posixjmp.h
new file mode 100644
index 0000000..49bfecf
--- /dev/null
+++ b/lib/readline/posixjmp.h
@@ -0,0 +1,40 @@
+/* posixjmp.h -- wrapper for setjmp.h with changes for POSIX systems. */
+
+/* Copyright (C) 1987,1991 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _POSIXJMP_H_
+#define _POSIXJMP_H_
+
+#include <setjmp.h>
+
+/* This *must* be included *after* config.h */
+
+#if defined (HAVE_POSIX_SIGSETJMP)
+# define procenv_t sigjmp_buf
+# if !defined (__OPENNT)
+# undef setjmp
+# define setjmp(x) sigsetjmp((x), 1)
+# undef longjmp
+# define longjmp(x, n) siglongjmp((x), (n))
+# endif /* !__OPENNT */
+#else
+# define procenv_t jmp_buf
+#endif
+
+#endif /* _POSIXJMP_H_ */
diff --git a/lib/readline/posixselect.h b/lib/readline/posixselect.h
new file mode 100644
index 0000000..da6a1ac
--- /dev/null
+++ b/lib/readline/posixselect.h
@@ -0,0 +1,47 @@
+/* posixselect.h -- wrapper for select(2) includes and definitions */
+
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _POSIXSELECT_H_
+#define _POSIXSELECT_H_
+
+#if defined (FD_SET) && !defined (HAVE_SELECT)
+# define HAVE_SELECT 1
+#endif
+
+#if defined (HAVE_SELECT)
+# if !defined (HAVE_SYS_SELECT_H) || !defined (M_UNIX)
+# include <sys/time.h>
+# endif
+#endif /* HAVE_SELECT */
+#if defined (HAVE_SYS_SELECT_H)
+# include <sys/select.h>
+#endif
+
+#ifndef USEC_PER_SEC
+# define USEC_PER_SEC 1000000
+#endif
+
+#define USEC_TO_TIMEVAL(us, tv) \
+do { \
+ (tv).tv_sec = (us) / USEC_PER_SEC; \
+ (tv).tv_usec = (us) % USEC_PER_SEC; \
+} while (0)
+
+#endif /* _POSIXSELECT_H_ */
diff --git a/lib/readline/posixstat.h b/lib/readline/posixstat.h
new file mode 100644
index 0000000..3eb7f29
--- /dev/null
+++ b/lib/readline/posixstat.h
@@ -0,0 +1,142 @@
+/* posixstat.h -- Posix stat(2) definitions for systems that
+ don't have them. */
+
+/* Copyright (C) 1987,1991 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* This file should be included instead of <sys/stat.h>.
+ It relies on the local sys/stat.h to work though. */
+#if !defined (_POSIXSTAT_H_)
+#define _POSIXSTAT_H_
+
+#include <sys/stat.h>
+
+#if defined (STAT_MACROS_BROKEN)
+# undef S_ISBLK
+# undef S_ISCHR
+# undef S_ISDIR
+# undef S_ISFIFO
+# undef S_ISREG
+# undef S_ISLNK
+#endif /* STAT_MACROS_BROKEN */
+
+/* These are guaranteed to work only on isc386 */
+#if !defined (S_IFDIR) && !defined (S_ISDIR)
+# define S_IFDIR 0040000
+#endif /* !S_IFDIR && !S_ISDIR */
+#if !defined (S_IFMT)
+# define S_IFMT 0170000
+#endif /* !S_IFMT */
+
+/* Posix 1003.1 5.6.1.1 <sys/stat.h> file types */
+
+/* Some Posix-wannabe systems define _S_IF* macros instead of S_IF*, but
+ do not provide the S_IS* macros that Posix requires. */
+
+#if defined (_S_IFMT) && !defined (S_IFMT)
+#define S_IFMT _S_IFMT
+#endif
+#if defined (_S_IFIFO) && !defined (S_IFIFO)
+#define S_IFIFO _S_IFIFO
+#endif
+#if defined (_S_IFCHR) && !defined (S_IFCHR)
+#define S_IFCHR _S_IFCHR
+#endif
+#if defined (_S_IFDIR) && !defined (S_IFDIR)
+#define S_IFDIR _S_IFDIR
+#endif
+#if defined (_S_IFBLK) && !defined (S_IFBLK)
+#define S_IFBLK _S_IFBLK
+#endif
+#if defined (_S_IFREG) && !defined (S_IFREG)
+#define S_IFREG _S_IFREG
+#endif
+#if defined (_S_IFLNK) && !defined (S_IFLNK)
+#define S_IFLNK _S_IFLNK
+#endif
+#if defined (_S_IFSOCK) && !defined (S_IFSOCK)
+#define S_IFSOCK _S_IFSOCK
+#endif
+
+/* Test for each symbol individually and define the ones necessary (some
+ systems claiming Posix compatibility define some but not all). */
+
+#if defined (S_IFBLK) && !defined (S_ISBLK)
+#define S_ISBLK(m) (((m)&S_IFMT) == S_IFBLK) /* block device */
+#endif
+
+#if defined (S_IFCHR) && !defined (S_ISCHR)
+#define S_ISCHR(m) (((m)&S_IFMT) == S_IFCHR) /* character device */
+#endif
+
+#if defined (S_IFDIR) && !defined (S_ISDIR)
+#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) /* directory */
+#endif
+
+#if defined (S_IFREG) && !defined (S_ISREG)
+#define S_ISREG(m) (((m)&S_IFMT) == S_IFREG) /* file */
+#endif
+
+#if defined (S_IFIFO) && !defined (S_ISFIFO)
+#define S_ISFIFO(m) (((m)&S_IFMT) == S_IFIFO) /* fifo - named pipe */
+#endif
+
+#if defined (S_IFLNK) && !defined (S_ISLNK)
+#define S_ISLNK(m) (((m)&S_IFMT) == S_IFLNK) /* symbolic link */
+#endif
+
+#if defined (S_IFSOCK) && !defined (S_ISSOCK)
+#define S_ISSOCK(m) (((m)&S_IFMT) == S_IFSOCK) /* socket */
+#endif
+
+/*
+ * POSIX 1003.1 5.6.1.2 <sys/stat.h> File Modes
+ */
+
+#if !defined (S_IRWXU)
+# if !defined (S_IREAD)
+# define S_IREAD 00400
+# define S_IWRITE 00200
+# define S_IEXEC 00100
+# endif /* S_IREAD */
+
+# if !defined (S_IRUSR)
+# define S_IRUSR S_IREAD /* read, owner */
+# define S_IWUSR S_IWRITE /* write, owner */
+# define S_IXUSR S_IEXEC /* execute, owner */
+
+# define S_IRGRP (S_IREAD >> 3) /* read, group */
+# define S_IWGRP (S_IWRITE >> 3) /* write, group */
+# define S_IXGRP (S_IEXEC >> 3) /* execute, group */
+
+# define S_IROTH (S_IREAD >> 6) /* read, other */
+# define S_IWOTH (S_IWRITE >> 6) /* write, other */
+# define S_IXOTH (S_IEXEC >> 6) /* execute, other */
+# endif /* !S_IRUSR */
+
+# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
+# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
+# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
+#endif /* !S_IRWXU */
+
+/* These are non-standard, but are used in builtins.c$symbolic_umask() */
+#define S_IRUGO (S_IRUSR | S_IRGRP | S_IROTH)
+#define S_IWUGO (S_IWUSR | S_IWGRP | S_IWOTH)
+#define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
+
+#endif /* _POSIXSTAT_H_ */
diff --git a/lib/readline/readline.c b/lib/readline/readline.c
new file mode 100644
index 0000000..c0e78d4
--- /dev/null
+++ b/lib/readline/readline.c
@@ -0,0 +1,1257 @@
+/* readline.c -- a general facility for reading lines of input
+ with emacs style editing and completion. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#include "posixstat.h"
+#include <fcntl.h>
+#if defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif /* HAVE_SYS_FILE_H */
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#if defined (HAVE_LOCALE_H)
+# include <locale.h>
+#endif
+
+#include <stdio.h>
+#include "posixjmp.h"
+#include <errno.h>
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+/* System-specific feature definitions and include files. */
+#include "rldefs.h"
+#include "rlmbutil.h"
+
+#if defined (__EMX__)
+# define INCL_DOSPROCESS
+# include <os2.h>
+#endif /* __EMX__ */
+
+/* Some standard library routines. */
+#include "readline.h"
+#include "history.h"
+
+#include "rlprivate.h"
+#include "rlshell.h"
+#include "xmalloc.h"
+
+#ifndef RL_LIBRARY_VERSION
+# define RL_LIBRARY_VERSION "5.1"
+#endif
+
+#ifndef RL_READLINE_VERSION
+# define RL_READLINE_VERSION 0x0501
+#endif
+
+extern void _rl_free_history_entry PARAMS((HIST_ENTRY *));
+
+/* Forward declarations used in this file. */
+static char *readline_internal PARAMS((void));
+static void readline_initialize_everything PARAMS((void));
+
+static void bind_arrow_keys_internal PARAMS((Keymap));
+static void bind_arrow_keys PARAMS((void));
+
+static void readline_default_bindings PARAMS((void));
+static void reset_default_bindings PARAMS((void));
+
+static int _rl_subseq_result PARAMS((int, Keymap, int, int));
+static int _rl_subseq_getchar PARAMS((int));
+
+/* **************************************************************** */
+/* */
+/* Line editing input utility */
+/* */
+/* **************************************************************** */
+
+const char *rl_library_version = RL_LIBRARY_VERSION;
+
+int rl_readline_version = RL_READLINE_VERSION;
+
+/* True if this is `real' readline as opposed to some stub substitute. */
+int rl_gnu_readline_p = 1;
+
+/* A pointer to the keymap that is currently in use.
+ By default, it is the standard emacs keymap. */
+Keymap _rl_keymap = emacs_standard_keymap;
+
+
+/* The current style of editing. */
+int rl_editing_mode = emacs_mode;
+
+/* The current insert mode: input (the default) or overwrite */
+int rl_insert_mode = RL_IM_DEFAULT;
+
+/* Non-zero if we called this function from _rl_dispatch(). It's present
+ so functions can find out whether they were called from a key binding
+ or directly from an application. */
+int rl_dispatching;
+
+/* Non-zero if the previous command was a kill command. */
+int _rl_last_command_was_kill = 0;
+
+/* The current value of the numeric argument specified by the user. */
+int rl_numeric_arg = 1;
+
+/* Non-zero if an argument was typed. */
+int rl_explicit_arg = 0;
+
+/* Temporary value used while generating the argument. */
+int rl_arg_sign = 1;
+
+/* Non-zero means we have been called at least once before. */
+static int rl_initialized;
+
+#if 0
+/* If non-zero, this program is running in an EMACS buffer. */
+static int running_in_emacs;
+#endif
+
+/* Flags word encapsulating the current readline state. */
+int rl_readline_state = RL_STATE_NONE;
+
+/* The current offset in the current input line. */
+int rl_point;
+
+/* Mark in the current input line. */
+int rl_mark;
+
+/* Length of the current input line. */
+int rl_end;
+
+/* Make this non-zero to return the current input_line. */
+int rl_done;
+
+/* The last function executed by readline. */
+rl_command_func_t *rl_last_func = (rl_command_func_t *)NULL;
+
+/* Top level environment for readline_internal (). */
+procenv_t _rl_top_level;
+
+/* The streams we interact with. */
+FILE *_rl_in_stream, *_rl_out_stream;
+
+/* The names of the streams that we do input and output to. */
+FILE *rl_instream = (FILE *)NULL;
+FILE *rl_outstream = (FILE *)NULL;
+
+/* Non-zero means echo characters as they are read. Defaults to no echo;
+ set to 1 if there is a controlling terminal, we can get its attributes,
+ and the attributes include `echo'. Look at rltty.c:prepare_terminal_settings
+ for the code that sets it. */
+int _rl_echoing_p = 0;
+
+/* Current prompt. */
+char *rl_prompt = (char *)NULL;
+int rl_visible_prompt_length = 0;
+
+/* Set to non-zero by calling application if it has already printed rl_prompt
+ and does not want readline to do it the first time. */
+int rl_already_prompted = 0;
+
+/* The number of characters read in order to type this complete command. */
+int rl_key_sequence_length = 0;
+
+/* If non-zero, then this is the address of a function to call just
+ before readline_internal_setup () prints the first prompt. */
+rl_hook_func_t *rl_startup_hook = (rl_hook_func_t *)NULL;
+
+/* If non-zero, this is the address of a function to call just before
+ readline_internal_setup () returns and readline_internal starts
+ reading input characters. */
+rl_hook_func_t *rl_pre_input_hook = (rl_hook_func_t *)NULL;
+
+/* What we use internally. You should always refer to RL_LINE_BUFFER. */
+static char *the_line;
+
+/* The character that can generate an EOF. Really read from
+ the terminal driver... just defaulted here. */
+int _rl_eof_char = CTRL ('D');
+
+/* Non-zero makes this the next keystroke to read. */
+int rl_pending_input = 0;
+
+/* Pointer to a useful terminal name. */
+const char *rl_terminal_name = (const char *)NULL;
+
+/* Non-zero means to always use horizontal scrolling in line display. */
+int _rl_horizontal_scroll_mode = 0;
+
+/* Non-zero means to display an asterisk at the starts of history lines
+ which have been modified. */
+int _rl_mark_modified_lines = 0;
+
+/* The style of `bell' notification preferred. This can be set to NO_BELL,
+ AUDIBLE_BELL, or VISIBLE_BELL. */
+int _rl_bell_preference = AUDIBLE_BELL;
+
+/* String inserted into the line by rl_insert_comment (). */
+char *_rl_comment_begin;
+
+/* Keymap holding the function currently being executed. */
+Keymap rl_executing_keymap;
+
+/* Keymap we're currently using to dispatch. */
+Keymap _rl_dispatching_keymap;
+
+/* Non-zero means to erase entire line, including prompt, on empty input lines. */
+int rl_erase_empty_line = 0;
+
+/* Non-zero means to read only this many characters rather than up to a
+ character bound to accept-line. */
+int rl_num_chars_to_read;
+
+/* Line buffer and maintenence. */
+char *rl_line_buffer = (char *)NULL;
+int rl_line_buffer_len = 0;
+
+/* Key sequence `contexts' */
+_rl_keyseq_cxt *_rl_kscxt = 0;
+
+/* Forward declarations used by the display, termcap, and history code. */
+
+/* **************************************************************** */
+/* */
+/* `Forward' declarations */
+/* */
+/* **************************************************************** */
+
+/* Non-zero means do not parse any lines other than comments and
+ parser directives. */
+unsigned char _rl_parsing_conditionalized_out = 0;
+
+/* Non-zero means to convert characters with the meta bit set to
+ escape-prefixed characters so we can indirect through
+ emacs_meta_keymap or vi_escape_keymap. */
+int _rl_convert_meta_chars_to_ascii = 1;
+
+/* Non-zero means to output characters with the meta bit set directly
+ rather than as a meta-prefixed escape sequence. */
+int _rl_output_meta_chars = 0;
+
+/* Non-zero means to look at the termios special characters and bind
+ them to equivalent readline functions at startup. */
+int _rl_bind_stty_chars = 1;
+
+/* Non-zero means to go through the history list at every newline (or
+ whenever rl_done is set and readline returns) and revert each line to
+ its initial state. */
+int _rl_revert_all_at_newline = 0;
+
+/* Non-zero means to honor the termios ECHOCTL bit and echo control
+ characters corresponding to keyboard-generated signals. */
+int _rl_echo_control_chars = 1;
+
+/* **************************************************************** */
+/* */
+/* Top Level Functions */
+/* */
+/* **************************************************************** */
+
+/* Non-zero means treat 0200 bit in terminal input as Meta bit. */
+int _rl_meta_flag = 0; /* Forward declaration */
+
+/* Set up the prompt and expand it. Called from readline() and
+ rl_callback_handler_install (). */
+int
+rl_set_prompt (prompt)
+ const char *prompt;
+{
+ FREE (rl_prompt);
+ rl_prompt = prompt ? savestring (prompt) : (char *)NULL;
+ rl_display_prompt = rl_prompt ? rl_prompt : "";
+
+ rl_visible_prompt_length = rl_expand_prompt (rl_prompt);
+ return 0;
+}
+
+/* Read a line of input. Prompt with PROMPT. An empty PROMPT means
+ none. A return value of NULL means that EOF was encountered. */
+char *
+readline (prompt)
+ const char *prompt;
+{
+ char *value;
+#if 0
+ int in_callback;
+#endif
+
+ /* If we are at EOF return a NULL string. */
+ if (rl_pending_input == EOF)
+ {
+ rl_clear_pending_input ();
+ return ((char *)NULL);
+ }
+
+#if 0
+ /* If readline() is called after installing a callback handler, temporarily
+ turn off the callback state to avoid ensuing messiness. Patch supplied
+ by the gdb folks. XXX -- disabled. This can be fooled and readline
+ left in a strange state by a poorly-timed longjmp. */
+ if (in_callback = RL_ISSTATE (RL_STATE_CALLBACK))
+ RL_UNSETSTATE (RL_STATE_CALLBACK);
+#endif
+
+ rl_set_prompt (prompt);
+
+ rl_initialize ();
+ if (rl_prep_term_function)
+ (*rl_prep_term_function) (_rl_meta_flag);
+
+#if defined (HANDLE_SIGNALS)
+ rl_set_signals ();
+#endif
+
+ value = readline_internal ();
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
+
+#if defined (HANDLE_SIGNALS)
+ rl_clear_signals ();
+#endif
+
+#if 0
+ if (in_callback)
+ RL_SETSTATE (RL_STATE_CALLBACK);
+#endif
+
+ return (value);
+}
+
+#if defined (READLINE_CALLBACKS)
+# define STATIC_CALLBACK
+#else
+# define STATIC_CALLBACK static
+#endif
+
+STATIC_CALLBACK void
+readline_internal_setup ()
+{
+ char *nprompt;
+
+ _rl_in_stream = rl_instream;
+ _rl_out_stream = rl_outstream;
+
+ if (rl_startup_hook)
+ (*rl_startup_hook) ();
+
+ /* If we're not echoing, we still want to at least print a prompt, because
+ rl_redisplay will not do it for us. If the calling application has a
+ custom redisplay function, though, let that function handle it. */
+ if (_rl_echoing_p == 0 && rl_redisplay_function == rl_redisplay)
+ {
+ if (rl_prompt && rl_already_prompted == 0)
+ {
+ nprompt = _rl_strip_prompt (rl_prompt);
+ fprintf (_rl_out_stream, "%s", nprompt);
+ fflush (_rl_out_stream);
+ free (nprompt);
+ }
+ }
+ else
+ {
+ if (rl_prompt && rl_already_prompted)
+ rl_on_new_line_with_prompt ();
+ else
+ rl_on_new_line ();
+ (*rl_redisplay_function) ();
+ }
+
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode)
+ rl_vi_insert_mode (1, 'i');
+#endif /* VI_MODE */
+
+ if (rl_pre_input_hook)
+ (*rl_pre_input_hook) ();
+
+ RL_CHECK_SIGNALS ();
+}
+
+STATIC_CALLBACK char *
+readline_internal_teardown (eof)
+ int eof;
+{
+ char *temp;
+ HIST_ENTRY *entry;
+
+ RL_CHECK_SIGNALS ();
+
+ /* Restore the original of this history line, iff the line that we
+ are editing was originally in the history, AND the line has changed. */
+ entry = current_history ();
+
+ if (entry && rl_undo_list)
+ {
+ temp = savestring (the_line);
+ rl_revert_line (1, 0);
+ entry = replace_history_entry (where_history (), the_line, (histdata_t)NULL);
+ _rl_free_history_entry (entry);
+
+ strcpy (the_line, temp);
+ free (temp);
+ }
+
+ if (_rl_revert_all_at_newline)
+ _rl_revert_all_lines ();
+
+ /* At any rate, it is highly likely that this line has an undo list. Get
+ rid of it now. */
+ if (rl_undo_list)
+ rl_free_undo_list ();
+
+ /* Restore normal cursor, if available. */
+ _rl_set_insert_mode (RL_IM_INSERT, 0);
+
+ return (eof ? (char *)NULL : savestring (the_line));
+}
+
+void
+_rl_internal_char_cleanup ()
+{
+#if defined (VI_MODE)
+ /* In vi mode, when you exit insert mode, the cursor moves back
+ over the previous character. We explicitly check for that here. */
+ if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap)
+ rl_vi_check ();
+#endif /* VI_MODE */
+
+ if (rl_num_chars_to_read && rl_end >= rl_num_chars_to_read)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ rl_newline (1, '\n');
+ }
+
+ if (rl_done == 0)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ }
+
+ /* If the application writer has told us to erase the entire line if
+ the only character typed was something bound to rl_newline, do so. */
+ if (rl_erase_empty_line && rl_done && rl_last_func == rl_newline &&
+ rl_point == 0 && rl_end == 0)
+ _rl_erase_entire_line ();
+}
+
+STATIC_CALLBACK int
+#if defined (READLINE_CALLBACKS)
+readline_internal_char ()
+#else
+readline_internal_charloop ()
+#endif
+{
+ static int lastc, eof_found;
+ int c, code, lk;
+
+ lastc = -1;
+ eof_found = 0;
+
+#if !defined (READLINE_CALLBACKS)
+ while (rl_done == 0)
+ {
+#endif
+ lk = _rl_last_command_was_kill;
+
+ code = setjmp (_rl_top_level);
+
+ if (code)
+ {
+ (*rl_redisplay_function) ();
+ _rl_want_redisplay = 0;
+ /* If we get here, we're not being called from something dispatched
+ from _rl_callback_read_char(), which sets up its own value of
+ _rl_top_level (saving and restoring the old, of course), so
+ we can just return here. */
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ return (0);
+ }
+
+ if (rl_pending_input == 0)
+ {
+ /* Then initialize the argument and number of keys read. */
+ _rl_reset_argument ();
+ rl_key_sequence_length = 0;
+ }
+
+ RL_SETSTATE(RL_STATE_READCMD);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_READCMD);
+
+ /* look at input.c:rl_getc() for the circumstances under which this will
+ be returned; punt immediately on read error without converting it to
+ a newline. */
+ if (c == READERR)
+ {
+#if defined (READLINE_CALLBACKS)
+ RL_SETSTATE(RL_STATE_DONE);
+ return (rl_done = 1);
+#else
+ eof_found = 1;
+ break;
+#endif
+ }
+
+ /* EOF typed to a non-blank line is a <NL>. */
+ if (c == EOF && rl_end)
+ c = NEWLINE;
+
+ /* The character _rl_eof_char typed to blank line, and not as the
+ previous character is interpreted as EOF. */
+ if (((c == _rl_eof_char && lastc != c) || c == EOF) && !rl_end)
+ {
+#if defined (READLINE_CALLBACKS)
+ RL_SETSTATE(RL_STATE_DONE);
+ return (rl_done = 1);
+#else
+ eof_found = 1;
+ break;
+#endif
+ }
+
+ lastc = c;
+ _rl_dispatch ((unsigned char)c, _rl_keymap);
+ RL_CHECK_SIGNALS ();
+
+ /* If there was no change in _rl_last_command_was_kill, then no kill
+ has taken place. Note that if input is pending we are reading
+ a prefix command, so nothing has changed yet. */
+ if (rl_pending_input == 0 && lk == _rl_last_command_was_kill)
+ _rl_last_command_was_kill = 0;
+
+ _rl_internal_char_cleanup ();
+
+#if defined (READLINE_CALLBACKS)
+ return 0;
+#else
+ }
+
+ return (eof_found);
+#endif
+}
+
+#if defined (READLINE_CALLBACKS)
+static int
+readline_internal_charloop ()
+{
+ int eof = 1;
+
+ while (rl_done == 0)
+ eof = readline_internal_char ();
+ return (eof);
+}
+#endif /* READLINE_CALLBACKS */
+
+/* Read a line of input from the global rl_instream, doing output on
+ the global rl_outstream.
+ If rl_prompt is non-null, then that is our prompt. */
+static char *
+readline_internal ()
+{
+ int eof;
+
+ readline_internal_setup ();
+ eof = readline_internal_charloop ();
+ return (readline_internal_teardown (eof));
+}
+
+void
+_rl_init_line_state ()
+{
+ rl_point = rl_end = rl_mark = 0;
+ the_line = rl_line_buffer;
+ the_line[0] = 0;
+}
+
+void
+_rl_set_the_line ()
+{
+ the_line = rl_line_buffer;
+}
+
+#if defined (READLINE_CALLBACKS)
+_rl_keyseq_cxt *
+_rl_keyseq_cxt_alloc ()
+{
+ _rl_keyseq_cxt *cxt;
+
+ cxt = (_rl_keyseq_cxt *)xmalloc (sizeof (_rl_keyseq_cxt));
+
+ cxt->flags = cxt->subseq_arg = cxt->subseq_retval = 0;
+
+ cxt->okey = 0;
+ cxt->ocxt = _rl_kscxt;
+ cxt->childval = 42; /* sentinel value */
+
+ return cxt;
+}
+
+void
+_rl_keyseq_cxt_dispose (cxt)
+ _rl_keyseq_cxt *cxt;
+{
+ free (cxt);
+}
+
+void
+_rl_keyseq_chain_dispose ()
+{
+ _rl_keyseq_cxt *cxt;
+
+ while (_rl_kscxt)
+ {
+ cxt = _rl_kscxt;
+ _rl_kscxt = _rl_kscxt->ocxt;
+ _rl_keyseq_cxt_dispose (cxt);
+ }
+}
+#endif
+
+static int
+_rl_subseq_getchar (key)
+ int key;
+{
+ int k;
+
+ if (key == ESC)
+ RL_SETSTATE(RL_STATE_METANEXT);
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ k = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ if (key == ESC)
+ RL_UNSETSTATE(RL_STATE_METANEXT);
+
+ return k;
+}
+
+#if defined (READLINE_CALLBACKS)
+int
+_rl_dispatch_callback (cxt)
+ _rl_keyseq_cxt *cxt;
+{
+ int nkey, r;
+
+ /* For now */
+ /* The first time this context is used, we want to read input and dispatch
+ on it. When traversing the chain of contexts back `up', we want to use
+ the value from the next context down. We're simulating recursion using
+ a chain of contexts. */
+ if ((cxt->flags & KSEQ_DISPATCHED) == 0)
+ {
+ nkey = _rl_subseq_getchar (cxt->okey);
+ if (nkey < 0)
+ {
+ _rl_abort_internal ();
+ return -1;
+ }
+ r = _rl_dispatch_subseq (nkey, cxt->dmap, cxt->subseq_arg);
+ cxt->flags |= KSEQ_DISPATCHED;
+ }
+ else
+ r = cxt->childval;
+
+ /* For now */
+ if (r != -3) /* don't do this if we indicate there will be other matches */
+ r = _rl_subseq_result (r, cxt->oldmap, cxt->okey, (cxt->flags & KSEQ_SUBSEQ));
+
+ RL_CHECK_SIGNALS ();
+ if (r == 0) /* success! */
+ {
+ _rl_keyseq_chain_dispose ();
+ RL_UNSETSTATE (RL_STATE_MULTIKEY);
+ return r;
+ }
+
+ if (r != -3) /* magic value that says we added to the chain */
+ _rl_kscxt = cxt->ocxt;
+ if (_rl_kscxt)
+ _rl_kscxt->childval = r;
+ if (r != -3)
+ _rl_keyseq_cxt_dispose (cxt);
+
+ return r;
+}
+#endif /* READLINE_CALLBACKS */
+
+/* Do the command associated with KEY in MAP.
+ If the associated command is really a keymap, then read
+ another key, and dispatch into that map. */
+int
+_rl_dispatch (key, map)
+ register int key;
+ Keymap map;
+{
+ _rl_dispatching_keymap = map;
+ return _rl_dispatch_subseq (key, map, 0);
+}
+
+int
+_rl_dispatch_subseq (key, map, got_subseq)
+ register int key;
+ Keymap map;
+ int got_subseq;
+{
+ int r, newkey;
+ char *macro;
+ rl_command_func_t *func;
+#if defined (READLINE_CALLBACKS)
+ _rl_keyseq_cxt *cxt;
+#endif
+
+ if (META_CHAR (key) && _rl_convert_meta_chars_to_ascii)
+ {
+ if (map[ESC].type == ISKMAP)
+ {
+ if (RL_ISSTATE (RL_STATE_MACRODEF))
+ _rl_add_macro_char (ESC);
+ map = FUNCTION_TO_KEYMAP (map, ESC);
+ key = UNMETA (key);
+ rl_key_sequence_length += 2;
+ return (_rl_dispatch (key, map));
+ }
+ else
+ rl_ding ();
+ return 0;
+ }
+
+ if (RL_ISSTATE (RL_STATE_MACRODEF))
+ _rl_add_macro_char (key);
+
+ r = 0;
+ switch (map[key].type)
+ {
+ case ISFUNC:
+ func = map[key].function;
+ if (func)
+ {
+ /* Special case rl_do_lowercase_version (). */
+ if (func == rl_do_lowercase_version)
+ return (_rl_dispatch (_rl_to_lower (key), map));
+
+ rl_executing_keymap = map;
+
+ rl_dispatching = 1;
+ RL_SETSTATE(RL_STATE_DISPATCHING);
+ (*map[key].function)(rl_numeric_arg * rl_arg_sign, key);
+ RL_UNSETSTATE(RL_STATE_DISPATCHING);
+ rl_dispatching = 0;
+
+ /* If we have input pending, then the last command was a prefix
+ command. Don't change the state of rl_last_func. Otherwise,
+ remember the last command executed in this variable. */
+ if (rl_pending_input == 0 && map[key].function != rl_digit_argument)
+ rl_last_func = map[key].function;
+
+ RL_CHECK_SIGNALS ();
+ }
+ else if (map[ANYOTHERKEY].function)
+ {
+ /* OK, there's no function bound in this map, but there is a
+ shadow function that was overridden when the current keymap
+ was created. Return -2 to note that. */
+ _rl_unget_char (key);
+ return -2;
+ }
+ else if (got_subseq)
+ {
+ /* Return -1 to note that we're in a subsequence, but we don't
+ have a matching key, nor was one overridden. This means
+ we need to back up the recursion chain and find the last
+ subsequence that is bound to a function. */
+ _rl_unget_char (key);
+ return -1;
+ }
+ else
+ {
+#if defined (READLINE_CALLBACKS)
+ RL_UNSETSTATE (RL_STATE_MULTIKEY);
+ _rl_keyseq_chain_dispose ();
+#endif
+ _rl_abort_internal ();
+ return -1;
+ }
+ break;
+
+ case ISKMAP:
+ if (map[key].function != 0)
+ {
+#if defined (VI_MODE)
+ /* The only way this test will be true is if a subsequence has been
+ bound starting with ESC, generally the arrow keys. What we do is
+ check whether there's input in the queue, which there generally
+ will be if an arrow key has been pressed, and, if there's not,
+ just dispatch to (what we assume is) rl_vi_movement_mode right
+ away. This is essentially an input test with a zero timeout. */
+ if (rl_editing_mode == vi_mode && key == ESC && map == vi_insertion_keymap
+ && _rl_input_queued (0) == 0)
+ return (_rl_dispatch (ANYOTHERKEY, FUNCTION_TO_KEYMAP (map, key)));
+#endif
+
+ rl_key_sequence_length++;
+ _rl_dispatching_keymap = FUNCTION_TO_KEYMAP (map, key);
+
+ /* Allocate new context here. Use linked contexts (linked through
+ cxt->ocxt) to simulate recursion */
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ /* Return 0 only the first time, to indicate success to
+ _rl_callback_read_char. The rest of the time, we're called
+ from _rl_dispatch_callback, so we return -3 to indicate
+ special handling is necessary. */
+ r = RL_ISSTATE (RL_STATE_MULTIKEY) ? -3 : 0;
+ cxt = _rl_keyseq_cxt_alloc ();
+
+ if (got_subseq)
+ cxt->flags |= KSEQ_SUBSEQ;
+ cxt->okey = key;
+ cxt->oldmap = map;
+ cxt->dmap = _rl_dispatching_keymap;
+ cxt->subseq_arg = got_subseq || cxt->dmap[ANYOTHERKEY].function;
+
+ RL_SETSTATE (RL_STATE_MULTIKEY);
+ _rl_kscxt = cxt;
+
+ return r; /* don't indicate immediate success */
+ }
+#endif
+
+ newkey = _rl_subseq_getchar (key);
+ if (newkey < 0)
+ {
+ _rl_abort_internal ();
+ return -1;
+ }
+
+ r = _rl_dispatch_subseq (newkey, _rl_dispatching_keymap, got_subseq || map[ANYOTHERKEY].function);
+ return _rl_subseq_result (r, map, key, got_subseq);
+ }
+ else
+ {
+ _rl_abort_internal ();
+ return -1;
+ }
+ break;
+
+ case ISMACR:
+ if (map[key].function != 0)
+ {
+ macro = savestring ((char *)map[key].function);
+ _rl_with_macro_input (macro);
+ return 0;
+ }
+ break;
+ }
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap &&
+ key != ANYOTHERKEY &&
+ _rl_vi_textmod_command (key))
+ _rl_vi_set_last (key, rl_numeric_arg, rl_arg_sign);
+#endif
+
+ return (r);
+}
+
+static int
+_rl_subseq_result (r, map, key, got_subseq)
+ int r;
+ Keymap map;
+ int key, got_subseq;
+{
+ Keymap m;
+ int type, nt;
+ rl_command_func_t *func, *nf;
+
+ if (r == -2)
+ /* We didn't match anything, and the keymap we're indexed into
+ shadowed a function previously bound to that prefix. Call
+ the function. The recursive call to _rl_dispatch_subseq has
+ already taken care of pushing any necessary input back onto
+ the input queue with _rl_unget_char. */
+ {
+ m = _rl_dispatching_keymap;
+ type = m[ANYOTHERKEY].type;
+ func = m[ANYOTHERKEY].function;
+ if (type == ISFUNC && func == rl_do_lowercase_version)
+ r = _rl_dispatch (_rl_to_lower (key), map);
+ else if (type == ISFUNC && func == rl_insert)
+ {
+ /* If the function that was shadowed was self-insert, we
+ somehow need a keymap with map[key].func == self-insert.
+ Let's use this one. */
+ nt = m[key].type;
+ nf = m[key].function;
+
+ m[key].type = type;
+ m[key].function = func;
+ r = _rl_dispatch (key, m);
+ m[key].type = nt;
+ m[key].function = nf;
+ }
+ else
+ r = _rl_dispatch (ANYOTHERKEY, m);
+ }
+ else if (r && map[ANYOTHERKEY].function)
+ {
+ /* We didn't match (r is probably -1), so return something to
+ tell the caller that it should try ANYOTHERKEY for an
+ overridden function. */
+ _rl_unget_char (key);
+ _rl_dispatching_keymap = map;
+ return -2;
+ }
+ else if (r && got_subseq)
+ {
+ /* OK, back up the chain. */
+ _rl_unget_char (key);
+ _rl_dispatching_keymap = map;
+ return -1;
+ }
+
+ return r;
+}
+
+/* **************************************************************** */
+/* */
+/* Initializations */
+/* */
+/* **************************************************************** */
+
+/* Initialize readline (and terminal if not already). */
+int
+rl_initialize ()
+{
+ /* If we have never been called before, initialize the
+ terminal and data structures. */
+ if (!rl_initialized)
+ {
+ RL_SETSTATE(RL_STATE_INITIALIZING);
+ readline_initialize_everything ();
+ RL_UNSETSTATE(RL_STATE_INITIALIZING);
+ rl_initialized++;
+ RL_SETSTATE(RL_STATE_INITIALIZED);
+ }
+
+ /* Initalize the current line information. */
+ _rl_init_line_state ();
+
+ /* We aren't done yet. We haven't even gotten started yet! */
+ rl_done = 0;
+ RL_UNSETSTATE(RL_STATE_DONE);
+
+ /* Tell the history routines what is going on. */
+ _rl_start_using_history ();
+
+ /* Make the display buffer match the state of the line. */
+ rl_reset_line_state ();
+
+ /* No such function typed yet. */
+ rl_last_func = (rl_command_func_t *)NULL;
+
+ /* Parsing of key-bindings begins in an enabled state. */
+ _rl_parsing_conditionalized_out = 0;
+
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode)
+ _rl_vi_initialize_line ();
+#endif
+
+ /* Each line starts in insert mode (the default). */
+ _rl_set_insert_mode (RL_IM_DEFAULT, 1);
+
+ return 0;
+}
+
+#if 0
+#if defined (__EMX__)
+static void
+_emx_build_environ ()
+{
+ TIB *tibp;
+ PIB *pibp;
+ char *t, **tp;
+ int c;
+
+ DosGetInfoBlocks (&tibp, &pibp);
+ t = pibp->pib_pchenv;
+ for (c = 1; *t; c++)
+ t += strlen (t) + 1;
+ tp = environ = (char **)xmalloc ((c + 1) * sizeof (char *));
+ t = pibp->pib_pchenv;
+ while (*t)
+ {
+ *tp++ = t;
+ t += strlen (t) + 1;
+ }
+ *tp = 0;
+}
+#endif /* __EMX__ */
+#endif
+
+/* Initialize the entire state of the world. */
+static void
+readline_initialize_everything ()
+{
+#if 0
+#if defined (__EMX__)
+ if (environ == 0)
+ _emx_build_environ ();
+#endif
+#endif
+
+#if 0
+ /* Find out if we are running in Emacs -- UNUSED. */
+ running_in_emacs = sh_get_env_value ("EMACS") != (char *)0;
+#endif
+
+ /* Set up input and output if they are not already set up. */
+ if (!rl_instream)
+ rl_instream = stdin;
+
+ if (!rl_outstream)
+ rl_outstream = stdout;
+
+ /* Bind _rl_in_stream and _rl_out_stream immediately. These values
+ may change, but they may also be used before readline_internal ()
+ is called. */
+ _rl_in_stream = rl_instream;
+ _rl_out_stream = rl_outstream;
+
+ /* Allocate data structures. */
+ if (rl_line_buffer == 0)
+ rl_line_buffer = (char *)xmalloc (rl_line_buffer_len = DEFAULT_BUFFER_SIZE);
+
+ /* Initialize the terminal interface. */
+ if (rl_terminal_name == 0)
+ rl_terminal_name = sh_get_env_value ("TERM");
+ _rl_init_terminal_io (rl_terminal_name);
+
+ /* Bind tty characters to readline functions. */
+ readline_default_bindings ();
+
+ /* Initialize the function names. */
+ rl_initialize_funmap ();
+
+ /* Decide whether we should automatically go into eight-bit mode. */
+ _rl_init_eightbit ();
+
+ /* Read in the init file. */
+ rl_read_init_file ((char *)NULL);
+
+ /* XXX */
+ if (_rl_horizontal_scroll_mode && _rl_term_autowrap)
+ {
+ _rl_screenwidth--;
+ _rl_screenchars -= _rl_screenheight;
+ }
+
+ /* Override the effect of any `set keymap' assignments in the
+ inputrc file. */
+ rl_set_keymap_from_edit_mode ();
+
+ /* Try to bind a common arrow key prefix, if not already bound. */
+ bind_arrow_keys ();
+
+ /* Enable the meta key, if this terminal has one. */
+ if (_rl_enable_meta)
+ _rl_enable_meta_key ();
+
+ /* If the completion parser's default word break characters haven't
+ been set yet, then do so now. */
+ if (rl_completer_word_break_characters == (char *)NULL)
+ rl_completer_word_break_characters = (char *)rl_basic_word_break_characters;
+}
+
+/* If this system allows us to look at the values of the regular
+ input editing characters, then bind them to their readline
+ equivalents, iff the characters are not bound to keymaps. */
+static void
+readline_default_bindings ()
+{
+ if (_rl_bind_stty_chars)
+ rl_tty_set_default_bindings (_rl_keymap);
+}
+
+/* Reset the default bindings for the terminal special characters we're
+ interested in back to rl_insert and read the new ones. */
+static void
+reset_default_bindings ()
+{
+ if (_rl_bind_stty_chars)
+ {
+ rl_tty_unset_default_bindings (_rl_keymap);
+ rl_tty_set_default_bindings (_rl_keymap);
+ }
+}
+
+/* Bind some common arrow key sequences in MAP. */
+static void
+bind_arrow_keys_internal (map)
+ Keymap map;
+{
+ Keymap xkeymap;
+
+ xkeymap = _rl_keymap;
+ _rl_keymap = map;
+
+#if defined (__MSDOS__)
+ rl_bind_keyseq_if_unbound ("\033[0A", rl_get_previous_history);
+ rl_bind_keyseq_if_unbound ("\033[0B", rl_backward_char);
+ rl_bind_keyseq_if_unbound ("\033[0C", rl_forward_char);
+ rl_bind_keyseq_if_unbound ("\033[0D", rl_get_next_history);
+#endif
+
+ rl_bind_keyseq_if_unbound ("\033[A", rl_get_previous_history);
+ rl_bind_keyseq_if_unbound ("\033[B", rl_get_next_history);
+ rl_bind_keyseq_if_unbound ("\033[C", rl_forward_char);
+ rl_bind_keyseq_if_unbound ("\033[D", rl_backward_char);
+ rl_bind_keyseq_if_unbound ("\033[H", rl_beg_of_line);
+ rl_bind_keyseq_if_unbound ("\033[F", rl_end_of_line);
+
+ rl_bind_keyseq_if_unbound ("\033OA", rl_get_previous_history);
+ rl_bind_keyseq_if_unbound ("\033OB", rl_get_next_history);
+ rl_bind_keyseq_if_unbound ("\033OC", rl_forward_char);
+ rl_bind_keyseq_if_unbound ("\033OD", rl_backward_char);
+ rl_bind_keyseq_if_unbound ("\033OH", rl_beg_of_line);
+ rl_bind_keyseq_if_unbound ("\033OF", rl_end_of_line);
+
+#if defined (__MINGW32__)
+ rl_bind_keyseq_if_unbound ("\340H", rl_get_previous_history);
+ rl_bind_keyseq_if_unbound ("\340P", rl_get_next_history);
+ rl_bind_keyseq_if_unbound ("\340M", rl_forward_char);
+ rl_bind_keyseq_if_unbound ("\340K", rl_backward_char);
+#endif
+
+ _rl_keymap = xkeymap;
+}
+
+/* Try and bind the common arrow key prefixes after giving termcap and
+ the inputrc file a chance to bind them and create `real' keymaps
+ for the arrow key prefix. */
+static void
+bind_arrow_keys ()
+{
+ bind_arrow_keys_internal (emacs_standard_keymap);
+
+#if defined (VI_MODE)
+ bind_arrow_keys_internal (vi_movement_keymap);
+ /* Unbind vi_movement_keymap[ESC] to allow users to repeatedly hit ESC
+ in vi command mode while still allowing the arrow keys to work. */
+ if (vi_movement_keymap[ESC].type == ISKMAP)
+ rl_bind_keyseq_in_map ("\033", (rl_command_func_t *)NULL, vi_movement_keymap);
+ bind_arrow_keys_internal (vi_insertion_keymap);
+#endif
+}
+
+/* **************************************************************** */
+/* */
+/* Saving and Restoring Readline's state */
+/* */
+/* **************************************************************** */
+
+int
+rl_save_state (sp)
+ struct readline_state *sp;
+{
+ if (sp == 0)
+ return -1;
+
+ sp->point = rl_point;
+ sp->end = rl_end;
+ sp->mark = rl_mark;
+ sp->buffer = rl_line_buffer;
+ sp->buflen = rl_line_buffer_len;
+ sp->ul = rl_undo_list;
+ sp->prompt = rl_prompt;
+
+ sp->rlstate = rl_readline_state;
+ sp->done = rl_done;
+ sp->kmap = _rl_keymap;
+
+ sp->lastfunc = rl_last_func;
+ sp->insmode = rl_insert_mode;
+ sp->edmode = rl_editing_mode;
+ sp->kseqlen = rl_key_sequence_length;
+ sp->inf = rl_instream;
+ sp->outf = rl_outstream;
+ sp->pendingin = rl_pending_input;
+ sp->macro = rl_executing_macro;
+
+ sp->catchsigs = rl_catch_signals;
+ sp->catchsigwinch = rl_catch_sigwinch;
+
+ return (0);
+}
+
+int
+rl_restore_state (sp)
+ struct readline_state *sp;
+{
+ if (sp == 0)
+ return -1;
+
+ rl_point = sp->point;
+ rl_end = sp->end;
+ rl_mark = sp->mark;
+ the_line = rl_line_buffer = sp->buffer;
+ rl_line_buffer_len = sp->buflen;
+ rl_undo_list = sp->ul;
+ rl_prompt = sp->prompt;
+
+ rl_readline_state = sp->rlstate;
+ rl_done = sp->done;
+ _rl_keymap = sp->kmap;
+
+ rl_last_func = sp->lastfunc;
+ rl_insert_mode = sp->insmode;
+ rl_editing_mode = sp->edmode;
+ rl_key_sequence_length = sp->kseqlen;
+ rl_instream = sp->inf;
+ rl_outstream = sp->outf;
+ rl_pending_input = sp->pendingin;
+ rl_executing_macro = sp->macro;
+
+ rl_catch_signals = sp->catchsigs;
+ rl_catch_sigwinch = sp->catchsigwinch;
+
+ return (0);
+}
diff --git a/lib/readline/readline.h b/lib/readline/readline.h
new file mode 100644
index 0000000..7a4ffaa
--- /dev/null
+++ b/lib/readline/readline.h
@@ -0,0 +1,885 @@
+/* Readline.h -- the names of functions callable from within readline. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_READLINE_H_)
+#define _READLINE_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if defined (READLINE_LIBRARY)
+# include "rlstdc.h"
+# include "rltypedefs.h"
+# include "keymaps.h"
+# include "tilde.h"
+#else
+# include <readline/rlstdc.h>
+# include <readline/rltypedefs.h>
+# include <readline/keymaps.h>
+# include <readline/tilde.h>
+#endif
+
+/* Hex-encoded Readline version number. */
+#define RL_READLINE_VERSION 0x0600 /* Readline 6.0 */
+#define RL_VERSION_MAJOR 6
+#define RL_VERSION_MINOR 0
+
+/* Readline data structures. */
+
+/* Maintaining the state of undo. We remember individual deletes and inserts
+ on a chain of things to do. */
+
+/* The actions that undo knows how to undo. Notice that UNDO_DELETE means
+ to insert some text, and UNDO_INSERT means to delete some text. I.e.,
+ the code tells undo what to undo, not how to undo it. */
+enum undo_code { UNDO_DELETE, UNDO_INSERT, UNDO_BEGIN, UNDO_END };
+
+/* What an element of THE_UNDO_LIST looks like. */
+typedef struct undo_list {
+ struct undo_list *next;
+ int start, end; /* Where the change took place. */
+ char *text; /* The text to insert, if undoing a delete. */
+ enum undo_code what; /* Delete, Insert, Begin, End. */
+} UNDO_LIST;
+
+/* The current undo list for RL_LINE_BUFFER. */
+extern UNDO_LIST *rl_undo_list;
+
+/* The data structure for mapping textual names to code addresses. */
+typedef struct _funmap {
+ const char *name;
+ rl_command_func_t *function;
+} FUNMAP;
+
+extern FUNMAP **funmap;
+
+/* **************************************************************** */
+/* */
+/* Functions available to bind to key sequences */
+/* */
+/* **************************************************************** */
+
+/* Bindable commands for numeric arguments. */
+extern int rl_digit_argument PARAMS((int, int));
+extern int rl_universal_argument PARAMS((int, int));
+
+/* Bindable commands for moving the cursor. */
+extern int rl_forward_byte PARAMS((int, int));
+extern int rl_forward_char PARAMS((int, int));
+extern int rl_forward PARAMS((int, int));
+extern int rl_backward_byte PARAMS((int, int));
+extern int rl_backward_char PARAMS((int, int));
+extern int rl_backward PARAMS((int, int));
+extern int rl_beg_of_line PARAMS((int, int));
+extern int rl_end_of_line PARAMS((int, int));
+extern int rl_forward_word PARAMS((int, int));
+extern int rl_backward_word PARAMS((int, int));
+extern int rl_refresh_line PARAMS((int, int));
+extern int rl_clear_screen PARAMS((int, int));
+extern int rl_skip_csi_sequence PARAMS((int, int));
+extern int rl_arrow_keys PARAMS((int, int));
+
+/* Bindable commands for inserting and deleting text. */
+extern int rl_insert PARAMS((int, int));
+extern int rl_quoted_insert PARAMS((int, int));
+extern int rl_tab_insert PARAMS((int, int));
+extern int rl_newline PARAMS((int, int));
+extern int rl_do_lowercase_version PARAMS((int, int));
+extern int rl_rubout PARAMS((int, int));
+extern int rl_delete PARAMS((int, int));
+extern int rl_rubout_or_delete PARAMS((int, int));
+extern int rl_delete_horizontal_space PARAMS((int, int));
+extern int rl_delete_or_show_completions PARAMS((int, int));
+extern int rl_insert_comment PARAMS((int, int));
+
+/* Bindable commands for changing case. */
+extern int rl_upcase_word PARAMS((int, int));
+extern int rl_downcase_word PARAMS((int, int));
+extern int rl_capitalize_word PARAMS((int, int));
+
+/* Bindable commands for transposing characters and words. */
+extern int rl_transpose_words PARAMS((int, int));
+extern int rl_transpose_chars PARAMS((int, int));
+
+/* Bindable commands for searching within a line. */
+extern int rl_char_search PARAMS((int, int));
+extern int rl_backward_char_search PARAMS((int, int));
+
+/* Bindable commands for readline's interface to the command history. */
+extern int rl_beginning_of_history PARAMS((int, int));
+extern int rl_end_of_history PARAMS((int, int));
+extern int rl_get_next_history PARAMS((int, int));
+extern int rl_get_previous_history PARAMS((int, int));
+
+/* Bindable commands for managing the mark and region. */
+extern int rl_set_mark PARAMS((int, int));
+extern int rl_exchange_point_and_mark PARAMS((int, int));
+
+/* Bindable commands to set the editing mode (emacs or vi). */
+extern int rl_vi_editing_mode PARAMS((int, int));
+extern int rl_emacs_editing_mode PARAMS((int, int));
+
+/* Bindable commands to change the insert mode (insert or overwrite) */
+extern int rl_overwrite_mode PARAMS((int, int));
+
+/* Bindable commands for managing key bindings. */
+extern int rl_re_read_init_file PARAMS((int, int));
+extern int rl_dump_functions PARAMS((int, int));
+extern int rl_dump_macros PARAMS((int, int));
+extern int rl_dump_variables PARAMS((int, int));
+
+/* Bindable commands for word completion. */
+extern int rl_complete PARAMS((int, int));
+extern int rl_possible_completions PARAMS((int, int));
+extern int rl_insert_completions PARAMS((int, int));
+extern int rl_old_menu_complete PARAMS((int, int));
+extern int rl_menu_complete PARAMS((int, int));
+extern int rl_backward_menu_complete PARAMS((int, int));
+
+/* Bindable commands for killing and yanking text, and managing the kill ring. */
+extern int rl_kill_word PARAMS((int, int));
+extern int rl_backward_kill_word PARAMS((int, int));
+extern int rl_kill_line PARAMS((int, int));
+extern int rl_backward_kill_line PARAMS((int, int));
+extern int rl_kill_full_line PARAMS((int, int));
+extern int rl_unix_word_rubout PARAMS((int, int));
+extern int rl_unix_filename_rubout PARAMS((int, int));
+extern int rl_unix_line_discard PARAMS((int, int));
+extern int rl_copy_region_to_kill PARAMS((int, int));
+extern int rl_kill_region PARAMS((int, int));
+extern int rl_copy_forward_word PARAMS((int, int));
+extern int rl_copy_backward_word PARAMS((int, int));
+extern int rl_yank PARAMS((int, int));
+extern int rl_yank_pop PARAMS((int, int));
+extern int rl_yank_nth_arg PARAMS((int, int));
+extern int rl_yank_last_arg PARAMS((int, int));
+/* Not available unless __CYGWIN__ is defined. */
+#ifdef __CYGWIN__
+extern int rl_paste_from_clipboard PARAMS((int, int));
+#endif
+
+/* Bindable commands for incremental searching. */
+extern int rl_reverse_search_history PARAMS((int, int));
+extern int rl_forward_search_history PARAMS((int, int));
+
+/* Bindable keyboard macro commands. */
+extern int rl_start_kbd_macro PARAMS((int, int));
+extern int rl_end_kbd_macro PARAMS((int, int));
+extern int rl_call_last_kbd_macro PARAMS((int, int));
+
+/* Bindable undo commands. */
+extern int rl_revert_line PARAMS((int, int));
+extern int rl_undo_command PARAMS((int, int));
+
+/* Bindable tilde expansion commands. */
+extern int rl_tilde_expand PARAMS((int, int));
+
+/* Bindable terminal control commands. */
+extern int rl_restart_output PARAMS((int, int));
+extern int rl_stop_output PARAMS((int, int));
+
+/* Miscellaneous bindable commands. */
+extern int rl_abort PARAMS((int, int));
+extern int rl_tty_status PARAMS((int, int));
+
+/* Bindable commands for incremental and non-incremental history searching. */
+extern int rl_history_search_forward PARAMS((int, int));
+extern int rl_history_search_backward PARAMS((int, int));
+extern int rl_noninc_forward_search PARAMS((int, int));
+extern int rl_noninc_reverse_search PARAMS((int, int));
+extern int rl_noninc_forward_search_again PARAMS((int, int));
+extern int rl_noninc_reverse_search_again PARAMS((int, int));
+
+/* Bindable command used when inserting a matching close character. */
+extern int rl_insert_close PARAMS((int, int));
+
+/* Not available unless READLINE_CALLBACKS is defined. */
+extern void rl_callback_handler_install PARAMS((const char *, rl_vcpfunc_t *));
+extern void rl_callback_read_char PARAMS((void));
+extern void rl_callback_handler_remove PARAMS((void));
+
+/* Things for vi mode. Not available unless readline is compiled -DVI_MODE. */
+/* VI-mode bindable commands. */
+extern int rl_vi_redo PARAMS((int, int));
+extern int rl_vi_undo PARAMS((int, int));
+extern int rl_vi_yank_arg PARAMS((int, int));
+extern int rl_vi_fetch_history PARAMS((int, int));
+extern int rl_vi_search_again PARAMS((int, int));
+extern int rl_vi_search PARAMS((int, int));
+extern int rl_vi_complete PARAMS((int, int));
+extern int rl_vi_tilde_expand PARAMS((int, int));
+extern int rl_vi_prev_word PARAMS((int, int));
+extern int rl_vi_next_word PARAMS((int, int));
+extern int rl_vi_end_word PARAMS((int, int));
+extern int rl_vi_insert_beg PARAMS((int, int));
+extern int rl_vi_append_mode PARAMS((int, int));
+extern int rl_vi_append_eol PARAMS((int, int));
+extern int rl_vi_eof_maybe PARAMS((int, int));
+extern int rl_vi_insertion_mode PARAMS((int, int));
+extern int rl_vi_insert_mode PARAMS((int, int));
+extern int rl_vi_movement_mode PARAMS((int, int));
+extern int rl_vi_arg_digit PARAMS((int, int));
+extern int rl_vi_change_case PARAMS((int, int));
+extern int rl_vi_put PARAMS((int, int));
+extern int rl_vi_column PARAMS((int, int));
+extern int rl_vi_delete_to PARAMS((int, int));
+extern int rl_vi_change_to PARAMS((int, int));
+extern int rl_vi_yank_to PARAMS((int, int));
+extern int rl_vi_rubout PARAMS((int, int));
+extern int rl_vi_delete PARAMS((int, int));
+extern int rl_vi_back_to_indent PARAMS((int, int));
+extern int rl_vi_first_print PARAMS((int, int));
+extern int rl_vi_char_search PARAMS((int, int));
+extern int rl_vi_match PARAMS((int, int));
+extern int rl_vi_change_char PARAMS((int, int));
+extern int rl_vi_subst PARAMS((int, int));
+extern int rl_vi_overstrike PARAMS((int, int));
+extern int rl_vi_overstrike_delete PARAMS((int, int));
+extern int rl_vi_replace PARAMS((int, int));
+extern int rl_vi_set_mark PARAMS((int, int));
+extern int rl_vi_goto_mark PARAMS((int, int));
+
+/* VI-mode utility functions. */
+extern int rl_vi_check PARAMS((void));
+extern int rl_vi_domove PARAMS((int, int *));
+extern int rl_vi_bracktype PARAMS((int));
+
+extern void rl_vi_start_inserting PARAMS((int, int, int));
+
+/* VI-mode pseudo-bindable commands, used as utility functions. */
+extern int rl_vi_fWord PARAMS((int, int));
+extern int rl_vi_bWord PARAMS((int, int));
+extern int rl_vi_eWord PARAMS((int, int));
+extern int rl_vi_fword PARAMS((int, int));
+extern int rl_vi_bword PARAMS((int, int));
+extern int rl_vi_eword PARAMS((int, int));
+
+/* **************************************************************** */
+/* */
+/* Well Published Functions */
+/* */
+/* **************************************************************** */
+
+/* Readline functions. */
+/* Read a line of input. Prompt with PROMPT. A NULL PROMPT means none. */
+extern char *readline PARAMS((const char *));
+
+extern int rl_set_prompt PARAMS((const char *));
+extern int rl_expand_prompt PARAMS((char *));
+
+extern int rl_initialize PARAMS((void));
+
+/* Undocumented; unused by readline */
+extern int rl_discard_argument PARAMS((void));
+
+/* Utility functions to bind keys to readline commands. */
+extern int rl_add_defun PARAMS((const char *, rl_command_func_t *, int));
+extern int rl_bind_key PARAMS((int, rl_command_func_t *));
+extern int rl_bind_key_in_map PARAMS((int, rl_command_func_t *, Keymap));
+extern int rl_unbind_key PARAMS((int));
+extern int rl_unbind_key_in_map PARAMS((int, Keymap));
+extern int rl_bind_key_if_unbound PARAMS((int, rl_command_func_t *));
+extern int rl_bind_key_if_unbound_in_map PARAMS((int, rl_command_func_t *, Keymap));
+extern int rl_unbind_function_in_map PARAMS((rl_command_func_t *, Keymap));
+extern int rl_unbind_command_in_map PARAMS((const char *, Keymap));
+extern int rl_bind_keyseq PARAMS((const char *, rl_command_func_t *));
+extern int rl_bind_keyseq_in_map PARAMS((const char *, rl_command_func_t *, Keymap));
+extern int rl_bind_keyseq_if_unbound PARAMS((const char *, rl_command_func_t *));
+extern int rl_bind_keyseq_if_unbound_in_map PARAMS((const char *, rl_command_func_t *, Keymap));
+extern int rl_generic_bind PARAMS((int, const char *, char *, Keymap));
+
+extern char *rl_variable_value PARAMS((const char *));
+extern int rl_variable_bind PARAMS((const char *, const char *));
+
+/* Backwards compatibility, use rl_bind_keyseq_in_map instead. */
+extern int rl_set_key PARAMS((const char *, rl_command_func_t *, Keymap));
+
+/* Backwards compatibility, use rl_generic_bind instead. */
+extern int rl_macro_bind PARAMS((const char *, const char *, Keymap));
+
+/* Undocumented in the texinfo manual; not really useful to programs. */
+extern int rl_translate_keyseq PARAMS((const char *, char *, int *));
+extern char *rl_untranslate_keyseq PARAMS((int));
+
+extern rl_command_func_t *rl_named_function PARAMS((const char *));
+extern rl_command_func_t *rl_function_of_keyseq PARAMS((const char *, Keymap, int *));
+
+extern void rl_list_funmap_names PARAMS((void));
+extern char **rl_invoking_keyseqs_in_map PARAMS((rl_command_func_t *, Keymap));
+extern char **rl_invoking_keyseqs PARAMS((rl_command_func_t *));
+
+extern void rl_function_dumper PARAMS((int));
+extern void rl_macro_dumper PARAMS((int));
+extern void rl_variable_dumper PARAMS((int));
+
+extern int rl_read_init_file PARAMS((const char *));
+extern int rl_parse_and_bind PARAMS((char *));
+
+/* Functions for manipulating keymaps. */
+extern Keymap rl_make_bare_keymap PARAMS((void));
+extern Keymap rl_copy_keymap PARAMS((Keymap));
+extern Keymap rl_make_keymap PARAMS((void));
+extern void rl_discard_keymap PARAMS((Keymap));
+
+extern Keymap rl_get_keymap_by_name PARAMS((const char *));
+extern char *rl_get_keymap_name PARAMS((Keymap));
+extern void rl_set_keymap PARAMS((Keymap));
+extern Keymap rl_get_keymap PARAMS((void));
+/* Undocumented; used internally only. */
+extern void rl_set_keymap_from_edit_mode PARAMS((void));
+extern char *rl_get_keymap_name_from_edit_mode PARAMS((void));
+
+/* Functions for manipulating the funmap, which maps command names to functions. */
+extern int rl_add_funmap_entry PARAMS((const char *, rl_command_func_t *));
+extern const char **rl_funmap_names PARAMS((void));
+/* Undocumented, only used internally -- there is only one funmap, and this
+ function may be called only once. */
+extern void rl_initialize_funmap PARAMS((void));
+
+/* Utility functions for managing keyboard macros. */
+extern void rl_push_macro_input PARAMS((char *));
+
+/* Functions for undoing, from undo.c */
+extern void rl_add_undo PARAMS((enum undo_code, int, int, char *));
+extern void rl_free_undo_list PARAMS((void));
+extern int rl_do_undo PARAMS((void));
+extern int rl_begin_undo_group PARAMS((void));
+extern int rl_end_undo_group PARAMS((void));
+extern int rl_modifying PARAMS((int, int));
+
+/* Functions for redisplay. */
+extern void rl_redisplay PARAMS((void));
+extern int rl_on_new_line PARAMS((void));
+extern int rl_on_new_line_with_prompt PARAMS((void));
+extern int rl_forced_update_display PARAMS((void));
+extern int rl_clear_message PARAMS((void));
+extern int rl_reset_line_state PARAMS((void));
+extern int rl_crlf PARAMS((void));
+
+#if defined (USE_VARARGS) && defined (PREFER_STDARG)
+extern int rl_message (const char *, ...) __attribute__((__format__ (printf, 1, 2)));
+#else
+extern int rl_message ();
+#endif
+
+extern int rl_show_char PARAMS((int));
+
+/* Undocumented in texinfo manual. */
+extern int rl_character_len PARAMS((int, int));
+
+/* Save and restore internal prompt redisplay information. */
+extern void rl_save_prompt PARAMS((void));
+extern void rl_restore_prompt PARAMS((void));
+
+/* Modifying text. */
+extern void rl_replace_line PARAMS((const char *, int));
+extern int rl_insert_text PARAMS((const char *));
+extern int rl_delete_text PARAMS((int, int));
+extern int rl_kill_text PARAMS((int, int));
+extern char *rl_copy_text PARAMS((int, int));
+
+/* Terminal and tty mode management. */
+extern void rl_prep_terminal PARAMS((int));
+extern void rl_deprep_terminal PARAMS((void));
+extern void rl_tty_set_default_bindings PARAMS((Keymap));
+extern void rl_tty_unset_default_bindings PARAMS((Keymap));
+
+extern int rl_reset_terminal PARAMS((const char *));
+extern void rl_resize_terminal PARAMS((void));
+extern void rl_set_screen_size PARAMS((int, int));
+extern void rl_get_screen_size PARAMS((int *, int *));
+extern void rl_reset_screen_size PARAMS((void));
+
+extern char *rl_get_termcap PARAMS((const char *));
+
+/* Functions for character input. */
+extern int rl_stuff_char PARAMS((int));
+extern int rl_execute_next PARAMS((int));
+extern int rl_clear_pending_input PARAMS((void));
+extern int rl_read_key PARAMS((void));
+extern int rl_getc PARAMS((FILE *));
+extern int rl_set_keyboard_input_timeout PARAMS((int));
+
+/* `Public' utility functions . */
+extern void rl_extend_line_buffer PARAMS((int));
+extern int rl_ding PARAMS((void));
+extern int rl_alphabetic PARAMS((int));
+extern void rl_free PARAMS((void *));
+
+/* Readline signal handling, from signals.c */
+extern int rl_set_signals PARAMS((void));
+extern int rl_clear_signals PARAMS((void));
+extern void rl_cleanup_after_signal PARAMS((void));
+extern void rl_reset_after_signal PARAMS((void));
+extern void rl_free_line_state PARAMS((void));
+
+extern void rl_echo_signal_char PARAMS((int));
+
+extern int rl_set_paren_blink_timeout PARAMS((int));
+
+/* Undocumented. */
+extern int rl_maybe_save_line PARAMS((void));
+extern int rl_maybe_unsave_line PARAMS((void));
+extern int rl_maybe_replace_line PARAMS((void));
+
+/* Completion functions. */
+extern int rl_complete_internal PARAMS((int));
+extern void rl_display_match_list PARAMS((char **, int, int));
+
+extern char **rl_completion_matches PARAMS((const char *, rl_compentry_func_t *));
+extern char *rl_username_completion_function PARAMS((const char *, int));
+extern char *rl_filename_completion_function PARAMS((const char *, int));
+
+extern int rl_completion_mode PARAMS((rl_command_func_t *));
+
+#if 0
+/* Backwards compatibility (compat.c). These will go away sometime. */
+extern void free_undo_list PARAMS((void));
+extern int maybe_save_line PARAMS((void));
+extern int maybe_unsave_line PARAMS((void));
+extern int maybe_replace_line PARAMS((void));
+
+extern int ding PARAMS((void));
+extern int alphabetic PARAMS((int));
+extern int crlf PARAMS((void));
+
+extern char **completion_matches PARAMS((char *, rl_compentry_func_t *));
+extern char *username_completion_function PARAMS((const char *, int));
+extern char *filename_completion_function PARAMS((const char *, int));
+#endif
+
+/* **************************************************************** */
+/* */
+/* Well Published Variables */
+/* */
+/* **************************************************************** */
+
+/* The version of this incarnation of the readline library. */
+extern const char *rl_library_version; /* e.g., "4.2" */
+extern int rl_readline_version; /* e.g., 0x0402 */
+
+/* True if this is real GNU readline. */
+extern int rl_gnu_readline_p;
+
+/* Flags word encapsulating the current readline state. */
+extern int rl_readline_state;
+
+/* Says which editing mode readline is currently using. 1 means emacs mode;
+ 0 means vi mode. */
+extern int rl_editing_mode;
+
+/* Insert or overwrite mode for emacs mode. 1 means insert mode; 0 means
+ overwrite mode. Reset to insert mode on each input line. */
+extern int rl_insert_mode;
+
+/* The name of the calling program. You should initialize this to
+ whatever was in argv[0]. It is used when parsing conditionals. */
+extern const char *rl_readline_name;
+
+/* The prompt readline uses. This is set from the argument to
+ readline (), and should not be assigned to directly. */
+extern char *rl_prompt;
+
+/* The prompt string that is actually displayed by rl_redisplay. Public so
+ applications can more easily supply their own redisplay functions. */
+extern char *rl_display_prompt;
+
+/* The line buffer that is in use. */
+extern char *rl_line_buffer;
+
+/* The location of point, and end. */
+extern int rl_point;
+extern int rl_end;
+
+/* The mark, or saved cursor position. */
+extern int rl_mark;
+
+/* Flag to indicate that readline has finished with the current input
+ line and should return it. */
+extern int rl_done;
+
+/* If set to a character value, that will be the next keystroke read. */
+extern int rl_pending_input;
+
+/* Non-zero if we called this function from _rl_dispatch(). It's present
+ so functions can find out whether they were called from a key binding
+ or directly from an application. */
+extern int rl_dispatching;
+
+/* Non-zero if the user typed a numeric argument before executing the
+ current function. */
+extern int rl_explicit_arg;
+
+/* The current value of the numeric argument specified by the user. */
+extern int rl_numeric_arg;
+
+/* The address of the last command function Readline executed. */
+extern rl_command_func_t *rl_last_func;
+
+/* The name of the terminal to use. */
+extern const char *rl_terminal_name;
+
+/* The input and output streams. */
+extern FILE *rl_instream;
+extern FILE *rl_outstream;
+
+/* If non-zero, Readline gives values of LINES and COLUMNS from the environment
+ greater precedence than values fetched from the kernel when computing the
+ screen dimensions. */
+extern int rl_prefer_env_winsize;
+
+/* If non-zero, then this is the address of a function to call just
+ before readline_internal () prints the first prompt. */
+extern rl_hook_func_t *rl_startup_hook;
+
+/* If non-zero, this is the address of a function to call just before
+ readline_internal_setup () returns and readline_internal starts
+ reading input characters. */
+extern rl_hook_func_t *rl_pre_input_hook;
+
+/* The address of a function to call periodically while Readline is
+ awaiting character input, or NULL, for no event handling. */
+extern rl_hook_func_t *rl_event_hook;
+
+/* The address of the function to call to fetch a character from the current
+ Readline input stream */
+extern rl_getc_func_t *rl_getc_function;
+
+extern rl_voidfunc_t *rl_redisplay_function;
+
+extern rl_vintfunc_t *rl_prep_term_function;
+extern rl_voidfunc_t *rl_deprep_term_function;
+
+/* Dispatch variables. */
+extern Keymap rl_executing_keymap;
+extern Keymap rl_binding_keymap;
+
+/* Display variables. */
+/* If non-zero, readline will erase the entire line, including any prompt,
+ if the only thing typed on an otherwise-blank line is something bound to
+ rl_newline. */
+extern int rl_erase_empty_line;
+
+/* If non-zero, the application has already printed the prompt (rl_prompt)
+ before calling readline, so readline should not output it the first time
+ redisplay is done. */
+extern int rl_already_prompted;
+
+/* A non-zero value means to read only this many characters rather than
+ up to a character bound to accept-line. */
+extern int rl_num_chars_to_read;
+
+/* The text of a currently-executing keyboard macro. */
+extern char *rl_executing_macro;
+
+/* Variables to control readline signal handling. */
+/* If non-zero, readline will install its own signal handlers for
+ SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP, SIGTTIN, and SIGTTOU. */
+extern int rl_catch_signals;
+
+/* If non-zero, readline will install a signal handler for SIGWINCH
+ that also attempts to call any calling application's SIGWINCH signal
+ handler. Note that the terminal is not cleaned up before the
+ application's signal handler is called; use rl_cleanup_after_signal()
+ to do that. */
+extern int rl_catch_sigwinch;
+
+/* Completion variables. */
+/* Pointer to the generator function for completion_matches ().
+ NULL means to use rl_filename_completion_function (), the default
+ filename completer. */
+extern rl_compentry_func_t *rl_completion_entry_function;
+
+/* Optional generator for menu completion. Default is
+ rl_completion_entry_function (rl_filename_completion_function). */
+ extern rl_compentry_func_t *rl_menu_completion_entry_function;
+
+/* If rl_ignore_some_completions_function is non-NULL it is the address
+ of a function to call after all of the possible matches have been
+ generated, but before the actual completion is done to the input line.
+ The function is called with one argument; a NULL terminated array
+ of (char *). If your function removes any of the elements, they
+ must be free()'ed. */
+extern rl_compignore_func_t *rl_ignore_some_completions_function;
+
+/* Pointer to alternative function to create matches.
+ Function is called with TEXT, START, and END.
+ START and END are indices in RL_LINE_BUFFER saying what the boundaries
+ of TEXT are.
+ If this function exists and returns NULL then call the value of
+ rl_completion_entry_function to try to match, otherwise use the
+ array of strings returned. */
+extern rl_completion_func_t *rl_attempted_completion_function;
+
+/* The basic list of characters that signal a break between words for the
+ completer routine. The initial contents of this variable is what
+ breaks words in the shell, i.e. "n\"\\'`@$>". */
+extern const char *rl_basic_word_break_characters;
+
+/* The list of characters that signal a break between words for
+ rl_complete_internal. The default list is the contents of
+ rl_basic_word_break_characters. */
+extern /*const*/ char *rl_completer_word_break_characters;
+
+/* Hook function to allow an application to set the completion word
+ break characters before readline breaks up the line. Allows
+ position-dependent word break characters. */
+extern rl_cpvfunc_t *rl_completion_word_break_hook;
+
+/* List of characters which can be used to quote a substring of the line.
+ Completion occurs on the entire substring, and within the substring
+ rl_completer_word_break_characters are treated as any other character,
+ unless they also appear within this list. */
+extern const char *rl_completer_quote_characters;
+
+/* List of quote characters which cause a word break. */
+extern const char *rl_basic_quote_characters;
+
+/* List of characters that need to be quoted in filenames by the completer. */
+extern const char *rl_filename_quote_characters;
+
+/* List of characters that are word break characters, but should be left
+ in TEXT when it is passed to the completion function. The shell uses
+ this to help determine what kind of completing to do. */
+extern const char *rl_special_prefixes;
+
+/* If non-zero, then this is the address of a function to call when
+ completing on a directory name. The function is called with
+ the address of a string (the current directory name) as an arg. It
+ changes what is displayed when the possible completions are printed
+ or inserted. */
+extern rl_icppfunc_t *rl_directory_completion_hook;
+
+/* If non-zero, this is the address of a function to call when completing
+ a directory name. This function takes the address of the directory name
+ to be modified as an argument. Unlike rl_directory_completion_hook, it
+ only modifies the directory name used in opendir(2), not what is displayed
+ when the possible completions are printed or inserted. It is called
+ before rl_directory_completion_hook. I'm not happy with how this works
+ yet, so it's undocumented. */
+extern rl_icppfunc_t *rl_directory_rewrite_hook;
+
+/* If non-zero, this is the address of a function to call when reading
+ directory entries from the filesystem for completion and comparing
+ them to the partial word to be completed. The function should
+ either return its first argument (if no conversion takes place) or
+ newly-allocated memory. This can, for instance, convert filenames
+ between character sets for comparison against what's typed at the
+ keyboard. The returned value is what is added to the list of
+ matches. The second argument is the length of the filename to be
+ converted. */
+extern rl_dequote_func_t *rl_filename_rewrite_hook;
+
+/* Backwards compatibility with previous versions of readline. */
+#define rl_symbolic_link_hook rl_directory_completion_hook
+
+/* If non-zero, then this is the address of a function to call when
+ completing a word would normally display the list of possible matches.
+ This function is called instead of actually doing the display.
+ It takes three arguments: (char **matches, int num_matches, int max_length)
+ where MATCHES is the array of strings that matched, NUM_MATCHES is the
+ number of strings in that array, and MAX_LENGTH is the length of the
+ longest string in that array. */
+extern rl_compdisp_func_t *rl_completion_display_matches_hook;
+
+/* Non-zero means that the results of the matches are to be treated
+ as filenames. This is ALWAYS zero on entry, and can only be changed
+ within a completion entry finder function. */
+extern int rl_filename_completion_desired;
+
+/* Non-zero means that the results of the matches are to be quoted using
+ double quotes (or an application-specific quoting mechanism) if the
+ filename contains any characters in rl_word_break_chars. This is
+ ALWAYS non-zero on entry, and can only be changed within a completion
+ entry finder function. */
+extern int rl_filename_quoting_desired;
+
+/* Set to a function to quote a filename in an application-specific fashion.
+ Called with the text to quote, the type of match found (single or multiple)
+ and a pointer to the quoting character to be used, which the function can
+ reset if desired. */
+extern rl_quote_func_t *rl_filename_quoting_function;
+
+/* Function to call to remove quoting characters from a filename. Called
+ before completion is attempted, so the embedded quotes do not interfere
+ with matching names in the file system. */
+extern rl_dequote_func_t *rl_filename_dequoting_function;
+
+/* Function to call to decide whether or not a word break character is
+ quoted. If a character is quoted, it does not break words for the
+ completer. */
+extern rl_linebuf_func_t *rl_char_is_quoted_p;
+
+/* Non-zero means to suppress normal filename completion after the
+ user-specified completion function has been called. */
+extern int rl_attempted_completion_over;
+
+/* Set to a character describing the type of completion being attempted by
+ rl_complete_internal; available for use by application completion
+ functions. */
+extern int rl_completion_type;
+
+/* Set to the last key used to invoke one of the completion functions */
+extern int rl_completion_invoking_key;
+
+/* Up to this many items will be displayed in response to a
+ possible-completions call. After that, we ask the user if she
+ is sure she wants to see them all. The default value is 100. */
+extern int rl_completion_query_items;
+
+/* Character appended to completed words when at the end of the line. The
+ default is a space. Nothing is added if this is '\0'. */
+extern int rl_completion_append_character;
+
+/* If set to non-zero by an application completion function,
+ rl_completion_append_character will not be appended. */
+extern int rl_completion_suppress_append;
+
+/* Set to any quote character readline thinks it finds before any application
+ completion function is called. */
+extern int rl_completion_quote_character;
+
+/* Set to a non-zero value if readline found quoting anywhere in the word to
+ be completed; set before any application completion function is called. */
+extern int rl_completion_found_quote;
+
+/* If non-zero, the completion functions don't append any closing quote.
+ This is set to 0 by rl_complete_internal and may be changed by an
+ application-specific completion function. */
+extern int rl_completion_suppress_quote;
+
+/* If non-zero, readline will sort the completion matches. On by default. */
+extern int rl_sort_completion_matches;
+
+/* If non-zero, a slash will be appended to completed filenames that are
+ symbolic links to directory names, subject to the value of the
+ mark-directories variable (which is user-settable). This exists so
+ that application completion functions can override the user's preference
+ (set via the mark-symlinked-directories variable) if appropriate.
+ It's set to the value of _rl_complete_mark_symlink_dirs in
+ rl_complete_internal before any application-specific completion
+ function is called, so without that function doing anything, the user's
+ preferences are honored. */
+extern int rl_completion_mark_symlink_dirs;
+
+/* If non-zero, then disallow duplicates in the matches. */
+extern int rl_ignore_completion_duplicates;
+
+/* If this is non-zero, completion is (temporarily) inhibited, and the
+ completion character will be inserted as any other. */
+extern int rl_inhibit_completion;
+
+/* Input error; can be returned by (*rl_getc_function) if readline is reading
+ a top-level command (RL_ISSTATE (RL_STATE_READCMD)). */
+#define READERR (-2)
+
+/* Definitions available for use by readline clients. */
+#define RL_PROMPT_START_IGNORE '\001'
+#define RL_PROMPT_END_IGNORE '\002'
+
+/* Possible values for do_replace argument to rl_filename_quoting_function,
+ called by rl_complete_internal. */
+#define NO_MATCH 0
+#define SINGLE_MATCH 1
+#define MULT_MATCH 2
+
+/* Possible state values for rl_readline_state */
+#define RL_STATE_NONE 0x000000 /* no state; before first call */
+
+#define RL_STATE_INITIALIZING 0x000001 /* initializing */
+#define RL_STATE_INITIALIZED 0x000002 /* initialization done */
+#define RL_STATE_TERMPREPPED 0x000004 /* terminal is prepped */
+#define RL_STATE_READCMD 0x000008 /* reading a command key */
+#define RL_STATE_METANEXT 0x000010 /* reading input after ESC */
+#define RL_STATE_DISPATCHING 0x000020 /* dispatching to a command */
+#define RL_STATE_MOREINPUT 0x000040 /* reading more input in a command function */
+#define RL_STATE_ISEARCH 0x000080 /* doing incremental search */
+#define RL_STATE_NSEARCH 0x000100 /* doing non-inc search */
+#define RL_STATE_SEARCH 0x000200 /* doing a history search */
+#define RL_STATE_NUMERICARG 0x000400 /* reading numeric argument */
+#define RL_STATE_MACROINPUT 0x000800 /* getting input from a macro */
+#define RL_STATE_MACRODEF 0x001000 /* defining keyboard macro */
+#define RL_STATE_OVERWRITE 0x002000 /* overwrite mode */
+#define RL_STATE_COMPLETING 0x004000 /* doing completion */
+#define RL_STATE_SIGHANDLER 0x008000 /* in readline sighandler */
+#define RL_STATE_UNDOING 0x010000 /* doing an undo */
+#define RL_STATE_INPUTPENDING 0x020000 /* rl_execute_next called */
+#define RL_STATE_TTYCSAVED 0x040000 /* tty special chars saved */
+#define RL_STATE_CALLBACK 0x080000 /* using the callback interface */
+#define RL_STATE_VIMOTION 0x100000 /* reading vi motion arg */
+#define RL_STATE_MULTIKEY 0x200000 /* reading multiple-key command */
+#define RL_STATE_VICMDONCE 0x400000 /* entered vi command mode at least once */
+#define RL_STATE_REDISPLAYING 0x800000 /* updating terminal display */
+
+#define RL_STATE_DONE 0x1000000 /* done; accepted line */
+
+#define RL_SETSTATE(x) (rl_readline_state |= (x))
+#define RL_UNSETSTATE(x) (rl_readline_state &= ~(x))
+#define RL_ISSTATE(x) (rl_readline_state & (x))
+
+struct readline_state {
+ /* line state */
+ int point;
+ int end;
+ int mark;
+ char *buffer;
+ int buflen;
+ UNDO_LIST *ul;
+ char *prompt;
+
+ /* global state */
+ int rlstate;
+ int done;
+ Keymap kmap;
+
+ /* input state */
+ rl_command_func_t *lastfunc;
+ int insmode;
+ int edmode;
+ int kseqlen;
+ FILE *inf;
+ FILE *outf;
+ int pendingin;
+ char *macro;
+
+ /* signal state */
+ int catchsigs;
+ int catchsigwinch;
+
+ /* search state */
+
+ /* completion state */
+
+ /* options state */
+
+ /* reserved for future expansion, so the struct size doesn't change */
+ char reserved[64];
+};
+
+extern int rl_save_state PARAMS((struct readline_state *));
+extern int rl_restore_state PARAMS((struct readline_state *));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _READLINE_H_ */
diff --git a/lib/readline/rlconf.h b/lib/readline/rlconf.h
new file mode 100644
index 0000000..39f94db
--- /dev/null
+++ b/lib/readline/rlconf.h
@@ -0,0 +1,61 @@
+/* rlconf.h -- readline configuration definitions */
+
+/* Copyright (C) 1992-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_RLCONF_H_)
+#define _RLCONF_H_
+
+/* Define this if you want the vi-mode editing available. */
+#define VI_MODE
+
+/* Define this to get an indication of file type when listing completions. */
+#define VISIBLE_STATS
+
+/* This definition is needed by readline.c, rltty.c, and signals.c. */
+/* If on, then readline handles signals in a way that doesn't screw. */
+#define HANDLE_SIGNALS
+
+/* Ugly but working hack for binding prefix meta. */
+#define PREFIX_META_HACK
+
+/* The next-to-last-ditch effort file name for a user-specific init file. */
+#define DEFAULT_INPUTRC "~/.inputrc"
+
+/* The ultimate last-ditch filenname for an init file -- system-wide. */
+#define SYS_INPUTRC "/etc/inputrc"
+
+/* If defined, expand tabs to spaces. */
+#define DISPLAY_TABS
+
+/* If defined, use the terminal escape sequence to move the cursor forward
+ over a character when updating the line rather than rewriting it. */
+/* #define HACK_TERMCAP_MOTION */
+
+/* The string inserted by the `insert comment' command. */
+#define RL_COMMENT_BEGIN_DEFAULT "#"
+
+/* Define this if you want code that allows readline to be used in an
+ X `callback' style. */
+#define READLINE_CALLBACKS
+
+/* Define this if you want the cursor to indicate insert or overwrite mode. */
+/* #define CURSOR_MODE */
+
+#endif /* _RLCONF_H_ */
diff --git a/lib/readline/rldefs.h b/lib/readline/rldefs.h
new file mode 100644
index 0000000..0257754
--- /dev/null
+++ b/lib/readline/rldefs.h
@@ -0,0 +1,162 @@
+/* rldefs.h -- an attempt to isolate some of the system-specific defines
+ for readline. This should be included after any files that define
+ system-specific constants like _POSIX_VERSION or USG. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_RLDEFS_H_)
+#define _RLDEFS_H_
+
+#if defined (HAVE_CONFIG_H)
+# include "config.h"
+#endif
+
+#include "rlstdc.h"
+
+#if defined (STRCOLL_BROKEN)
+# undef HAVE_STRCOLL
+#endif
+
+#if defined (_POSIX_VERSION) && !defined (TERMIOS_MISSING)
+# define TERMIOS_TTY_DRIVER
+#else
+# if defined (HAVE_TERMIO_H)
+# define TERMIO_TTY_DRIVER
+# else
+# if !defined (__MINGW32__)
+# define NEW_TTY_DRIVER
+# else
+# define NO_TTY_DRIVER
+# endif
+# endif
+#endif
+
+/* Posix macro to check file in statbuf for directory-ness.
+ This requires that <sys/stat.h> be included before this test. */
+#if defined (S_IFDIR) && !defined (S_ISDIR)
+# define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
+#endif
+
+/* Decide which flavor of the header file describing the C library
+ string functions to include and include it. */
+
+#if defined (HAVE_STRING_H)
+# include <string.h>
+#else /* !HAVE_STRING_H */
+# include <strings.h>
+#endif /* !HAVE_STRING_H */
+
+#if !defined (strchr) && !defined (__STDC__)
+extern char *strchr (), *strrchr ();
+#endif /* !strchr && !__STDC__ */
+
+#if defined (PREFER_STDARG)
+# include <stdarg.h>
+#else
+# if defined (PREFER_VARARGS)
+# include <varargs.h>
+# endif
+#endif
+
+#if defined (HAVE_STRCASECMP)
+#define _rl_stricmp strcasecmp
+#define _rl_strnicmp strncasecmp
+#else
+extern int _rl_stricmp PARAMS((char *, char *));
+extern int _rl_strnicmp PARAMS((char *, char *, int));
+#endif
+
+#if defined (HAVE_STRPBRK) && !defined (HAVE_MULTIBYTE)
+# define _rl_strpbrk(a,b) strpbrk((a),(b))
+#else
+extern char *_rl_strpbrk PARAMS((const char *, const char *));
+#endif
+
+#if !defined (emacs_mode)
+# define no_mode -1
+# define vi_mode 0
+# define emacs_mode 1
+#endif
+
+#if !defined (RL_IM_INSERT)
+# define RL_IM_INSERT 1
+# define RL_IM_OVERWRITE 0
+#
+# define RL_IM_DEFAULT RL_IM_INSERT
+#endif
+
+/* If you cast map[key].function to type (Keymap) on a Cray,
+ the compiler takes the value of map[key].function and
+ divides it by 4 to convert between pointer types (pointers
+ to functions and pointers to structs are different sizes).
+ This is not what is wanted. */
+#if defined (CRAY)
+# define FUNCTION_TO_KEYMAP(map, key) (Keymap)((int)map[key].function)
+# define KEYMAP_TO_FUNCTION(data) (rl_command_func_t *)((int)(data))
+#else
+# define FUNCTION_TO_KEYMAP(map, key) (Keymap)(map[key].function)
+# define KEYMAP_TO_FUNCTION(data) (rl_command_func_t *)(data)
+#endif
+
+#ifndef savestring
+#define savestring(x) strcpy ((char *)xmalloc (1 + strlen (x)), (x))
+#endif
+
+/* Possible values for _rl_bell_preference. */
+#define NO_BELL 0
+#define AUDIBLE_BELL 1
+#define VISIBLE_BELL 2
+
+/* Definitions used when searching the line for characters. */
+/* NOTE: it is necessary that opposite directions are inverses */
+#define FTO 1 /* forward to */
+#define BTO -1 /* backward to */
+#define FFIND 2 /* forward find */
+#define BFIND -2 /* backward find */
+
+/* Possible values for the found_quote flags word used by the completion
+ functions. It says what kind of (shell-like) quoting we found anywhere
+ in the line. */
+#define RL_QF_SINGLE_QUOTE 0x01
+#define RL_QF_DOUBLE_QUOTE 0x02
+#define RL_QF_BACKSLASH 0x04
+#define RL_QF_OTHER_QUOTE 0x08
+
+/* Default readline line buffer length. */
+#define DEFAULT_BUFFER_SIZE 256
+
+#if !defined (STREQ)
+#define STREQ(a, b) (((a)[0] == (b)[0]) && (strcmp ((a), (b)) == 0))
+#define STREQN(a, b, n) (((n) == 0) ? (1) \
+ : ((a)[0] == (b)[0]) && (strncmp ((a), (b), (n)) == 0))
+#endif
+
+#if !defined (FREE)
+# define FREE(x) if (x) free (x)
+#endif
+
+#if !defined (SWAP)
+# define SWAP(s, e) do { int t; t = s; s = e; e = t; } while (0)
+#endif
+
+/* CONFIGURATION SECTION */
+#include "rlconf.h"
+
+#endif /* !_RLDEFS_H_ */
diff --git a/lib/readline/rlmbutil.h b/lib/readline/rlmbutil.h
new file mode 100644
index 0000000..7716a70
--- /dev/null
+++ b/lib/readline/rlmbutil.h
@@ -0,0 +1,154 @@
+/* rlmbutil.h -- utility functions for multibyte characters. */
+
+/* Copyright (C) 2001-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_RL_MBUTIL_H_)
+#define _RL_MBUTIL_H_
+
+#include "rlstdc.h"
+
+/************************************************/
+/* check multibyte capability for I18N code */
+/************************************************/
+
+/* For platforms which support the ISO C amendement 1 functionality we
+ support user defined character classes. */
+ /* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>. */
+#if defined (HAVE_WCTYPE_H) && defined (HAVE_WCHAR_H) && defined (HAVE_LOCALE_H)
+# include <wchar.h>
+# include <wctype.h>
+# if defined (HAVE_ISWCTYPE) && \
+ defined (HAVE_ISWLOWER) && \
+ defined (HAVE_ISWUPPER) && \
+ defined (HAVE_MBSRTOWCS) && \
+ defined (HAVE_MBRTOWC) && \
+ defined (HAVE_MBRLEN) && \
+ defined (HAVE_TOWLOWER) && \
+ defined (HAVE_TOWUPPER) && \
+ defined (HAVE_WCHAR_T) && \
+ defined (HAVE_WCWIDTH)
+ /* system is supposed to support XPG5 */
+# define HANDLE_MULTIBYTE 1
+# endif
+#endif
+
+/* If we don't want multibyte chars even on a system that supports them, let
+ the configuring user turn multibyte support off. */
+#if defined (NO_MULTIBYTE_SUPPORT)
+# undef HANDLE_MULTIBYTE
+#endif
+
+/* Some systems, like BeOS, have multibyte encodings but lack mbstate_t. */
+#if HANDLE_MULTIBYTE && !defined (HAVE_MBSTATE_T)
+# define wcsrtombs(dest, src, len, ps) (wcsrtombs) (dest, src, len, 0)
+# define mbsrtowcs(dest, src, len, ps) (mbsrtowcs) (dest, src, len, 0)
+# define wcrtomb(s, wc, ps) (wcrtomb) (s, wc, 0)
+# define mbrtowc(pwc, s, n, ps) (mbrtowc) (pwc, s, n, 0)
+# define mbrlen(s, n, ps) (mbrlen) (s, n, 0)
+# define mbstate_t int
+#endif
+
+/* Make sure MB_LEN_MAX is at least 16 on systems that claim to be able to
+ handle multibyte chars (some systems define MB_LEN_MAX as 1) */
+#ifdef HANDLE_MULTIBYTE
+# include <limits.h>
+# if defined(MB_LEN_MAX) && (MB_LEN_MAX < 16)
+# undef MB_LEN_MAX
+# endif
+# if !defined (MB_LEN_MAX)
+# define MB_LEN_MAX 16
+# endif
+#endif
+
+/************************************************/
+/* end of multibyte capability checks for I18N */
+/************************************************/
+
+/*
+ * Flags for _rl_find_prev_mbchar and _rl_find_next_mbchar:
+ *
+ * MB_FIND_ANY find any multibyte character
+ * MB_FIND_NONZERO find a non-zero-width multibyte character
+ */
+
+#define MB_FIND_ANY 0x00
+#define MB_FIND_NONZERO 0x01
+
+extern int _rl_find_prev_mbchar PARAMS((char *, int, int));
+extern int _rl_find_next_mbchar PARAMS((char *, int, int, int));
+
+#ifdef HANDLE_MULTIBYTE
+
+extern int _rl_compare_chars PARAMS((char *, int, mbstate_t *, char *, int, mbstate_t *));
+extern int _rl_get_char_len PARAMS((char *, mbstate_t *));
+extern int _rl_adjust_point PARAMS((char *, int, mbstate_t *));
+
+extern int _rl_read_mbchar PARAMS((char *, int));
+extern int _rl_read_mbstring PARAMS((int, char *, int));
+
+extern int _rl_is_mbchar_matched PARAMS((char *, int, int, char *, int));
+
+extern wchar_t _rl_char_value PARAMS((char *, int));
+extern int _rl_walphabetic PARAMS((wchar_t));
+
+#define _rl_to_wupper(wc) (iswlower (wc) ? towupper (wc) : (wc))
+#define _rl_to_wlower(wc) (iswupper (wc) ? towlower (wc) : (wc))
+
+#define MB_NEXTCHAR(b,s,c,f) \
+ ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \
+ ? _rl_find_next_mbchar ((b), (s), (c), (f)) \
+ : ((s) + (c)))
+#define MB_PREVCHAR(b,s,f) \
+ ((MB_CUR_MAX > 1 && rl_byte_oriented == 0) \
+ ? _rl_find_prev_mbchar ((b), (s), (f)) \
+ : ((s) - 1))
+
+#define MB_INVALIDCH(x) ((x) == (size_t)-1 || (x) == (size_t)-2)
+#define MB_NULLWCH(x) ((x) == 0)
+
+#else /* !HANDLE_MULTIBYTE */
+
+#undef MB_LEN_MAX
+#undef MB_CUR_MAX
+
+#define MB_LEN_MAX 1
+#define MB_CUR_MAX 1
+
+#define _rl_find_prev_mbchar(b, i, f) (((i) == 0) ? (i) : ((i) - 1))
+#define _rl_find_next_mbchar(b, i1, i2, f) ((i1) + (i2))
+
+#define _rl_char_value(buf,ind) ((buf)[(ind)])
+
+#define _rl_walphabetic(c) (rl_alphabetic (c))
+
+#define _rl_to_wupper(c) (_rl_to_upper (c))
+#define _rl_to_wlower(c) (_rl_to_lower (c))
+
+#define MB_NEXTCHAR(b,s,c,f) ((s) + (c))
+#define MB_PREVCHAR(b,s,f) ((s) - 1)
+
+#define MB_INVALIDCH(x) (0)
+#define MB_NULLWCH(x) (0)
+
+#endif /* !HANDLE_MULTIBYTE */
+
+extern int rl_byte_oriented;
+
+#endif /* _RL_MBUTIL_H_ */
diff --git a/lib/readline/rlprivate.h b/lib/readline/rlprivate.h
new file mode 100644
index 0000000..819f127
--- /dev/null
+++ b/lib/readline/rlprivate.h
@@ -0,0 +1,475 @@
+/* rlprivate.h -- functions and variables global to the readline library,
+ but not intended for use by applications. */
+
+/* Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_RL_PRIVATE_H_)
+#define _RL_PRIVATE_H_
+
+#include "rlconf.h" /* for VISIBLE_STATS */
+#include "rlstdc.h"
+#include "posixjmp.h" /* defines procenv_t */
+
+/*************************************************************************
+ * *
+ * Convenience definitions *
+ * *
+ *************************************************************************/
+
+#define EMACS_MODE() (rl_editing_mode == emacs_mode)
+#define VI_COMMAND_MODE() (rl_editing_mode == vi_mode && _rl_keymap == vi_movement_keymap)
+#define VI_INSERT_MODE() (rl_editing_mode == vi_mode && _rl_keymap == vi_insertion_keymap)
+
+#define RL_CHECK_SIGNALS() \
+ do { \
+ if (_rl_caught_signal) _rl_signal_handler (_rl_caught_signal); \
+ } while (0)
+
+/*************************************************************************
+ * *
+ * Global structs undocumented in texinfo manual and not in readline.h *
+ * *
+ *************************************************************************/
+/* search types */
+#define RL_SEARCH_ISEARCH 0x01 /* incremental search */
+#define RL_SEARCH_NSEARCH 0x02 /* non-incremental search */
+#define RL_SEARCH_CSEARCH 0x04 /* intra-line char search */
+
+/* search flags */
+#define SF_REVERSE 0x01
+#define SF_FOUND 0x02
+#define SF_FAILED 0x04
+
+typedef struct __rl_search_context
+{
+ int type;
+ int sflags;
+
+ char *search_string;
+ int search_string_index;
+ int search_string_size;
+
+ char **lines;
+ char *allocated_line;
+ int hlen;
+ int hindex;
+
+ int save_point;
+ int save_mark;
+ int save_line;
+ int last_found_line;
+ char *prev_line_found;
+
+ UNDO_LIST *save_undo_list;
+
+ int history_pos;
+ int direction;
+
+ int lastc;
+#if defined (HANDLE_MULTIBYTE)
+ char mb[MB_LEN_MAX];
+#endif
+
+ char *sline;
+ int sline_len;
+ int sline_index;
+
+ char *search_terminators;
+} _rl_search_cxt;
+
+/* Callback data for reading numeric arguments */
+#define NUM_SAWMINUS 0x01
+#define NUM_SAWDIGITS 0x02
+#define NUM_READONE 0x04
+
+typedef int _rl_arg_cxt;
+
+/* A context for reading key sequences longer than a single character when
+ using the callback interface. */
+#define KSEQ_DISPATCHED 0x01
+#define KSEQ_SUBSEQ 0x02
+#define KSEQ_RECURSIVE 0x04
+
+typedef struct __rl_keyseq_context
+{
+ int flags;
+ int subseq_arg;
+ int subseq_retval; /* XXX */
+ Keymap dmap;
+
+ Keymap oldmap;
+ int okey;
+ struct __rl_keyseq_context *ocxt;
+ int childval;
+} _rl_keyseq_cxt;
+
+ /* fill in more as needed */
+/* `Generic' callback data and functions */
+typedef struct __rl_callback_generic_arg
+{
+ int count;
+ int i1, i2;
+ /* add here as needed */
+} _rl_callback_generic_arg;
+
+typedef int _rl_callback_func_t PARAMS((_rl_callback_generic_arg *));
+
+/*************************************************************************
+ * *
+ * Global functions undocumented in texinfo manual and not in readline.h *
+ * *
+ *************************************************************************/
+
+/*************************************************************************
+ * *
+ * Global variables undocumented in texinfo manual and not in readline.h *
+ * *
+ *************************************************************************/
+
+/* complete.c */
+extern int rl_complete_with_tilde_expansion;
+#if defined (VISIBLE_STATS)
+extern int rl_visible_stats;
+#endif /* VISIBLE_STATS */
+
+/* readline.c */
+extern int rl_line_buffer_len;
+extern int rl_arg_sign;
+extern int rl_visible_prompt_length;
+extern int rl_key_sequence_length;
+extern int rl_byte_oriented;
+
+/* display.c */
+extern int rl_display_fixed;
+
+/* parens.c */
+extern int rl_blink_matching_paren;
+
+/*************************************************************************
+ * *
+ * Global functions and variables unsed and undocumented *
+ * *
+ *************************************************************************/
+
+/* kill.c */
+extern int rl_set_retained_kills PARAMS((int));
+
+/* terminal.c */
+extern void _rl_set_screen_size PARAMS((int, int));
+
+/* undo.c */
+extern int _rl_fix_last_undo_of_type PARAMS((int, int, int));
+
+/* util.c */
+extern char *_rl_savestring PARAMS((const char *));
+
+/*************************************************************************
+ * *
+ * Functions and variables private to the readline library *
+ * *
+ *************************************************************************/
+
+/* NOTE: Functions and variables prefixed with `_rl_' are
+ pseudo-global: they are global so they can be shared
+ between files in the readline library, but are not intended
+ to be visible to readline callers. */
+
+/*************************************************************************
+ * Undocumented private functions *
+ *************************************************************************/
+
+#if defined(READLINE_CALLBACKS)
+
+/* readline.c */
+extern void readline_internal_setup PARAMS((void));
+extern char *readline_internal_teardown PARAMS((int));
+extern int readline_internal_char PARAMS((void));
+
+extern _rl_keyseq_cxt *_rl_keyseq_cxt_alloc PARAMS((void));
+extern void _rl_keyseq_cxt_dispose PARAMS((_rl_keyseq_cxt *));
+extern void _rl_keyseq_chain_dispose PARAMS((void));
+
+extern int _rl_dispatch_callback PARAMS((_rl_keyseq_cxt *));
+
+/* callback.c */
+extern _rl_callback_generic_arg *_rl_callback_data_alloc PARAMS((int));
+extern void _rl_callback_data_dispose PARAMS((_rl_callback_generic_arg *));
+
+#endif /* READLINE_CALLBACKS */
+
+/* bind.c */
+
+/* complete.c */
+extern void _rl_reset_completion_state PARAMS((void));
+extern char _rl_find_completion_word PARAMS((int *, int *));
+extern void _rl_free_match_list PARAMS((char **));
+
+/* display.c */
+extern char *_rl_strip_prompt PARAMS((char *));
+extern void _rl_move_cursor_relative PARAMS((int, const char *));
+extern void _rl_move_vert PARAMS((int));
+extern void _rl_save_prompt PARAMS((void));
+extern void _rl_restore_prompt PARAMS((void));
+extern char *_rl_make_prompt_for_search PARAMS((int));
+extern void _rl_erase_at_end_of_line PARAMS((int));
+extern void _rl_clear_to_eol PARAMS((int));
+extern void _rl_clear_screen PARAMS((void));
+extern void _rl_update_final PARAMS((void));
+extern void _rl_redisplay_after_sigwinch PARAMS((void));
+extern void _rl_clean_up_for_exit PARAMS((void));
+extern void _rl_erase_entire_line PARAMS((void));
+extern int _rl_current_display_line PARAMS((void));
+
+/* input.c */
+extern int _rl_any_typein PARAMS((void));
+extern int _rl_input_available PARAMS((void));
+extern int _rl_input_queued PARAMS((int));
+extern void _rl_insert_typein PARAMS((int));
+extern int _rl_unget_char PARAMS((int));
+extern int _rl_pushed_input_available PARAMS((void));
+
+/* isearch.c */
+extern _rl_search_cxt *_rl_scxt_alloc PARAMS((int, int));
+extern void _rl_scxt_dispose PARAMS((_rl_search_cxt *, int));
+
+extern int _rl_isearch_dispatch PARAMS((_rl_search_cxt *, int));
+extern int _rl_isearch_callback PARAMS((_rl_search_cxt *));
+
+extern int _rl_search_getchar PARAMS((_rl_search_cxt *));
+
+/* macro.c */
+extern void _rl_with_macro_input PARAMS((char *));
+extern int _rl_next_macro_key PARAMS((void));
+extern void _rl_push_executing_macro PARAMS((void));
+extern void _rl_pop_executing_macro PARAMS((void));
+extern void _rl_add_macro_char PARAMS((int));
+extern void _rl_kill_kbd_macro PARAMS((void));
+
+/* misc.c */
+extern int _rl_arg_overflow PARAMS((void));
+extern void _rl_arg_init PARAMS((void));
+extern int _rl_arg_getchar PARAMS((void));
+extern int _rl_arg_callback PARAMS((_rl_arg_cxt));
+extern void _rl_reset_argument PARAMS((void));
+
+extern void _rl_start_using_history PARAMS((void));
+extern int _rl_free_saved_history_line PARAMS((void));
+extern void _rl_set_insert_mode PARAMS((int, int));
+
+extern void _rl_revert_all_lines PARAMS((void));
+
+/* nls.c */
+extern int _rl_init_eightbit PARAMS((void));
+
+/* parens.c */
+extern void _rl_enable_paren_matching PARAMS((int));
+
+/* readline.c */
+extern void _rl_init_line_state PARAMS((void));
+extern void _rl_set_the_line PARAMS((void));
+extern int _rl_dispatch PARAMS((int, Keymap));
+extern int _rl_dispatch_subseq PARAMS((int, Keymap, int));
+extern void _rl_internal_char_cleanup PARAMS((void));
+
+/* rltty.c */
+extern int _rl_disable_tty_signals PARAMS((void));
+extern int _rl_restore_tty_signals PARAMS((void));
+
+/* search.c */
+extern int _rl_nsearch_callback PARAMS((_rl_search_cxt *));
+
+/* signals.c */
+extern void _rl_signal_handler PARAMS((int));
+
+extern void _rl_block_sigint PARAMS((void));
+extern void _rl_release_sigint PARAMS((void));
+extern void _rl_block_sigwinch PARAMS((void));
+extern void _rl_release_sigwinch PARAMS((void));
+
+/* terminal.c */
+extern void _rl_get_screen_size PARAMS((int, int));
+extern int _rl_init_terminal_io PARAMS((const char *));
+#ifdef _MINIX
+extern void _rl_output_character_function PARAMS((int));
+#else
+extern int _rl_output_character_function PARAMS((int));
+#endif
+extern void _rl_output_some_chars PARAMS((const char *, int));
+extern int _rl_backspace PARAMS((int));
+extern void _rl_enable_meta_key PARAMS((void));
+extern void _rl_control_keypad PARAMS((int));
+extern void _rl_set_cursor PARAMS((int, int));
+
+/* text.c */
+extern void _rl_fix_point PARAMS((int));
+extern int _rl_replace_text PARAMS((const char *, int, int));
+extern int _rl_insert_char PARAMS((int, int));
+extern int _rl_overwrite_char PARAMS((int, int));
+extern int _rl_overwrite_rubout PARAMS((int, int));
+extern int _rl_rubout_char PARAMS((int, int));
+#if defined (HANDLE_MULTIBYTE)
+extern int _rl_char_search_internal PARAMS((int, int, char *, int));
+#else
+extern int _rl_char_search_internal PARAMS((int, int, int));
+#endif
+extern int _rl_set_mark_at_pos PARAMS((int));
+
+/* undo.c */
+extern UNDO_LIST *_rl_copy_undo_entry PARAMS((UNDO_LIST *));
+extern UNDO_LIST *_rl_copy_undo_list PARAMS((UNDO_LIST *));
+
+/* util.c */
+#if defined (USE_VARARGS) && defined (PREFER_STDARG)
+extern void _rl_ttymsg (const char *, ...) __attribute__((__format__ (printf, 1, 2)));
+extern void _rl_errmsg (const char *, ...) __attribute__((__format__ (printf, 1, 2)));
+extern void _rl_trace (const char *, ...) __attribute__((__format__ (printf, 1, 2)));
+#else
+extern void _rl_ttymsg ();
+extern void _rl_errmsg ();
+extern void _rl_trace ();
+#endif
+
+extern int _rl_tropen PARAMS((void));
+
+extern int _rl_abort_internal PARAMS((void));
+extern int _rl_null_function PARAMS((int, int));
+extern char *_rl_strindex PARAMS((const char *, const char *));
+extern int _rl_qsort_string_compare PARAMS((char **, char **));
+extern int (_rl_uppercase_p) PARAMS((int));
+extern int (_rl_lowercase_p) PARAMS((int));
+extern int (_rl_pure_alphabetic) PARAMS((int));
+extern int (_rl_digit_p) PARAMS((int));
+extern int (_rl_to_lower) PARAMS((int));
+extern int (_rl_to_upper) PARAMS((int));
+extern int (_rl_digit_value) PARAMS((int));
+
+/* vi_mode.c */
+extern void _rl_vi_initialize_line PARAMS((void));
+extern void _rl_vi_reset_last PARAMS((void));
+extern void _rl_vi_set_last PARAMS((int, int, int));
+extern int _rl_vi_textmod_command PARAMS((int));
+extern void _rl_vi_done_inserting PARAMS((void));
+
+/*************************************************************************
+ * Undocumented private variables *
+ *************************************************************************/
+
+/* bind.c */
+extern const char * const _rl_possible_control_prefixes[];
+extern const char * const _rl_possible_meta_prefixes[];
+
+/* callback.c */
+extern _rl_callback_func_t *_rl_callback_func;
+extern _rl_callback_generic_arg *_rl_callback_data;
+
+/* complete.c */
+extern int _rl_complete_show_all;
+extern int _rl_complete_show_unmodified;
+extern int _rl_complete_mark_directories;
+extern int _rl_complete_mark_symlink_dirs;
+extern int _rl_completion_prefix_display_length;
+extern int _rl_print_completions_horizontally;
+extern int _rl_completion_case_fold;
+extern int _rl_match_hidden_files;
+extern int _rl_page_completions;
+extern int _rl_skip_completed_text;
+
+/* display.c */
+extern int _rl_vis_botlin;
+extern int _rl_last_c_pos;
+extern int _rl_suppress_redisplay;
+extern int _rl_want_redisplay;
+
+/* isearch.c */
+extern char *_rl_isearch_terminators;
+
+extern _rl_search_cxt *_rl_iscxt;
+
+/* macro.c */
+extern char *_rl_executing_macro;
+
+/* misc.c */
+extern int _rl_history_preserve_point;
+extern int _rl_history_saved_point;
+
+extern _rl_arg_cxt _rl_argcxt;
+
+/* readline.c */
+extern int _rl_echoing_p;
+extern int _rl_horizontal_scroll_mode;
+extern int _rl_mark_modified_lines;
+extern int _rl_bell_preference;
+extern int _rl_meta_flag;
+extern int _rl_convert_meta_chars_to_ascii;
+extern int _rl_output_meta_chars;
+extern int _rl_bind_stty_chars;
+extern int _rl_revert_all_at_newline;
+extern int _rl_echo_control_chars;
+extern char *_rl_comment_begin;
+extern unsigned char _rl_parsing_conditionalized_out;
+extern Keymap _rl_keymap;
+extern FILE *_rl_in_stream;
+extern FILE *_rl_out_stream;
+extern int _rl_last_command_was_kill;
+extern int _rl_eof_char;
+extern procenv_t _rl_top_level;
+extern _rl_keyseq_cxt *_rl_kscxt;
+
+/* search.c */
+extern _rl_search_cxt *_rl_nscxt;
+
+/* signals.c */
+extern int _rl_interrupt_immediately;
+extern int volatile _rl_caught_signal;
+
+extern int _rl_echoctl;
+
+extern int _rl_intr_char;
+extern int _rl_quit_char;
+extern int _rl_susp_char;
+
+/* terminal.c */
+extern int _rl_enable_keypad;
+extern int _rl_enable_meta;
+extern char *_rl_term_clreol;
+extern char *_rl_term_clrpag;
+extern char *_rl_term_im;
+extern char *_rl_term_ic;
+extern char *_rl_term_ei;
+extern char *_rl_term_DC;
+extern char *_rl_term_up;
+extern char *_rl_term_dc;
+extern char *_rl_term_cr;
+extern char *_rl_term_IC;
+extern char *_rl_term_forward_char;
+extern int _rl_screenheight;
+extern int _rl_screenwidth;
+extern int _rl_screenchars;
+extern int _rl_terminal_can_insert;
+extern int _rl_term_autowrap;
+
+/* undo.c */
+extern int _rl_doing_an_undo;
+extern int _rl_undo_group_level;
+
+/* vi_mode.c */
+extern int _rl_vi_last_command;
+
+#endif /* _RL_PRIVATE_H_ */
diff --git a/lib/readline/rlshell.h b/lib/readline/rlshell.h
new file mode 100644
index 0000000..3e17d8b
--- /dev/null
+++ b/lib/readline/rlshell.h
@@ -0,0 +1,33 @@
+/* rlshell.h -- utility functions normally provided by bash. */
+
+/* Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_RL_SHELL_H_)
+#define _RL_SHELL_H_
+
+#include "rlstdc.h"
+
+extern char *sh_single_quote PARAMS((char *));
+extern void sh_set_lines_and_columns PARAMS((int, int));
+extern char *sh_get_env_value PARAMS((const char *));
+extern char *sh_get_home_dir PARAMS((void));
+extern int sh_unset_nodelay_mode PARAMS((int));
+
+#endif /* _RL_SHELL_H_ */
diff --git a/lib/readline/rlstdc.h b/lib/readline/rlstdc.h
new file mode 100644
index 0000000..a6d2394
--- /dev/null
+++ b/lib/readline/rlstdc.h
@@ -0,0 +1,45 @@
+/* stdc.h -- macros to make source compile on both ANSI C and K&R C compilers. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_RL_STDC_H_)
+#define _RL_STDC_H_
+
+/* Adapted from BSD /usr/include/sys/cdefs.h. */
+
+/* A function can be defined using prototypes and compile on both ANSI C
+ and traditional C compilers with something like this:
+ extern char *func PARAMS((char *, char *, int)); */
+
+#if !defined (PARAMS)
+# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus)
+# define PARAMS(protos) protos
+# else
+# define PARAMS(protos) ()
+# endif
+#endif
+
+#ifndef __attribute__
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
+# define __attribute__(x)
+# endif
+#endif
+
+#endif /* !_RL_STDC_H_ */
diff --git a/lib/readline/rltty.c b/lib/readline/rltty.c
new file mode 100644
index 0000000..0dd5d10
--- /dev/null
+++ b/lib/readline/rltty.c
@@ -0,0 +1,975 @@
+/* rltty.c -- functions to prepare and restore the terminal for readline's
+ use. */
+
+/* Copyright (C) 1992-2005 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <signal.h>
+#include <errno.h>
+#include <stdio.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#include "rldefs.h"
+
+#if defined (GWINSZ_IN_SYS_IOCTL)
+# include <sys/ioctl.h>
+#endif /* GWINSZ_IN_SYS_IOCTL */
+
+#include "rltty.h"
+#include "readline.h"
+#include "rlprivate.h"
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+rl_vintfunc_t *rl_prep_term_function = rl_prep_terminal;
+rl_voidfunc_t *rl_deprep_term_function = rl_deprep_terminal;
+
+static void set_winsize PARAMS((int));
+
+/* **************************************************************** */
+/* */
+/* Saving and Restoring the TTY */
+/* */
+/* **************************************************************** */
+
+/* Non-zero means that the terminal is in a prepped state. */
+static int terminal_prepped;
+
+static _RL_TTY_CHARS _rl_tty_chars, _rl_last_tty_chars;
+
+/* If non-zero, means that this process has called tcflow(fd, TCOOFF)
+ and output is suspended. */
+#if defined (__ksr1__)
+static int ksrflow;
+#endif
+
+/* Dummy call to force a backgrounded readline to stop before it tries
+ to get the tty settings. */
+static void
+set_winsize (tty)
+ int tty;
+{
+#if defined (TIOCGWINSZ)
+ struct winsize w;
+
+ if (ioctl (tty, TIOCGWINSZ, &w) == 0)
+ (void) ioctl (tty, TIOCSWINSZ, &w);
+#endif /* TIOCGWINSZ */
+}
+
+#if defined (NO_TTY_DRIVER)
+/* Nothing */
+#elif defined (NEW_TTY_DRIVER)
+
+/* Values for the `flags' field of a struct bsdtty. This tells which
+ elements of the struct bsdtty have been fetched from the system and
+ are valid. */
+#define SGTTY_SET 0x01
+#define LFLAG_SET 0x02
+#define TCHARS_SET 0x04
+#define LTCHARS_SET 0x08
+
+struct bsdtty {
+ struct sgttyb sgttyb; /* Basic BSD tty driver information. */
+ int lflag; /* Local mode flags, like LPASS8. */
+#if defined (TIOCGETC)
+ struct tchars tchars; /* Terminal special characters, including ^S and ^Q. */
+#endif
+#if defined (TIOCGLTC)
+ struct ltchars ltchars; /* 4.2 BSD editing characters */
+#endif
+ int flags; /* Bitmap saying which parts of the struct are valid. */
+};
+
+#define TIOTYPE struct bsdtty
+
+static TIOTYPE otio;
+
+static void save_tty_chars PARAMS((TIOTYPE *));
+static int _get_tty_settings PARAMS((int, TIOTYPE *));
+static int get_tty_settings PARAMS((int, TIOTYPE *));
+static int _set_tty_settings PARAMS((int, TIOTYPE *));
+static int set_tty_settings PARAMS((int, TIOTYPE *));
+
+static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *));
+
+static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t));
+
+static void
+save_tty_chars (tiop)
+ TIOTYPE *tiop;
+{
+ _rl_last_tty_chars = _rl_tty_chars;
+
+ if (tiop->flags & SGTTY_SET)
+ {
+ _rl_tty_chars.t_erase = tiop->sgttyb.sg_erase;
+ _rl_tty_chars.t_kill = tiop->sgttyb.sg_kill;
+ }
+
+ if (tiop->flags & TCHARS_SET)
+ {
+ _rl_intr_char = _rl_tty_chars.t_intr = tiop->tchars.t_intrc;
+ _rl_quit_char = _rl_tty_chars.t_quit = tiop->tchars.t_quitc;
+
+ _rl_tty_chars.t_start = tiop->tchars.t_startc;
+ _rl_tty_chars.t_stop = tiop->tchars.t_stopc;
+ _rl_tty_chars.t_eof = tiop->tchars.t_eofc;
+ _rl_tty_chars.t_eol = '\n';
+ _rl_tty_chars.t_eol2 = tiop->tchars.t_brkc;
+ }
+
+ if (tiop->flags & LTCHARS_SET)
+ {
+ _rl_susp_char = _rl_tty_chars.t_susp = tiop->ltchars.t_suspc;
+
+ _rl_tty_chars.t_dsusp = tiop->ltchars.t_dsuspc;
+ _rl_tty_chars.t_reprint = tiop->ltchars.t_rprntc;
+ _rl_tty_chars.t_flush = tiop->ltchars.t_flushc;
+ _rl_tty_chars.t_werase = tiop->ltchars.t_werasc;
+ _rl_tty_chars.t_lnext = tiop->ltchars.t_lnextc;
+ }
+
+ _rl_tty_chars.t_status = -1;
+}
+
+static int
+get_tty_settings (tty, tiop)
+ int tty;
+ TIOTYPE *tiop;
+{
+ set_winsize (tty);
+
+ tiop->flags = tiop->lflag = 0;
+
+ errno = 0;
+ if (ioctl (tty, TIOCGETP, &(tiop->sgttyb)) < 0)
+ return -1;
+ tiop->flags |= SGTTY_SET;
+
+#if defined (TIOCLGET)
+ if (ioctl (tty, TIOCLGET, &(tiop->lflag)) == 0)
+ tiop->flags |= LFLAG_SET;
+#endif
+
+#if defined (TIOCGETC)
+ if (ioctl (tty, TIOCGETC, &(tiop->tchars)) == 0)
+ tiop->flags |= TCHARS_SET;
+#endif
+
+#if defined (TIOCGLTC)
+ if (ioctl (tty, TIOCGLTC, &(tiop->ltchars)) == 0)
+ tiop->flags |= LTCHARS_SET;
+#endif
+
+ return 0;
+}
+
+static int
+set_tty_settings (tty, tiop)
+ int tty;
+ TIOTYPE *tiop;
+{
+ if (tiop->flags & SGTTY_SET)
+ {
+ ioctl (tty, TIOCSETN, &(tiop->sgttyb));
+ tiop->flags &= ~SGTTY_SET;
+ }
+ _rl_echoing_p = 1;
+
+#if defined (TIOCLSET)
+ if (tiop->flags & LFLAG_SET)
+ {
+ ioctl (tty, TIOCLSET, &(tiop->lflag));
+ tiop->flags &= ~LFLAG_SET;
+ }
+#endif
+
+#if defined (TIOCSETC)
+ if (tiop->flags & TCHARS_SET)
+ {
+ ioctl (tty, TIOCSETC, &(tiop->tchars));
+ tiop->flags &= ~TCHARS_SET;
+ }
+#endif
+
+#if defined (TIOCSLTC)
+ if (tiop->flags & LTCHARS_SET)
+ {
+ ioctl (tty, TIOCSLTC, &(tiop->ltchars));
+ tiop->flags &= ~LTCHARS_SET;
+ }
+#endif
+
+ return 0;
+}
+
+static void
+prepare_terminal_settings (meta_flag, oldtio, tiop)
+ int meta_flag;
+ TIOTYPE oldtio, *tiop;
+{
+ _rl_echoing_p = (oldtio.sgttyb.sg_flags & ECHO);
+ _rl_echoctl = (oldtio.sgttyb.sg_flags & ECHOCTL);
+
+ /* Copy the original settings to the structure we're going to use for
+ our settings. */
+ tiop->sgttyb = oldtio.sgttyb;
+ tiop->lflag = oldtio.lflag;
+#if defined (TIOCGETC)
+ tiop->tchars = oldtio.tchars;
+#endif
+#if defined (TIOCGLTC)
+ tiop->ltchars = oldtio.ltchars;
+#endif
+ tiop->flags = oldtio.flags;
+
+ /* First, the basic settings to put us into character-at-a-time, no-echo
+ input mode. */
+ tiop->sgttyb.sg_flags &= ~(ECHO | CRMOD);
+ tiop->sgttyb.sg_flags |= CBREAK;
+
+ /* If this terminal doesn't care how the 8th bit is used, then we can
+ use it for the meta-key. If only one of even or odd parity is
+ specified, then the terminal is using parity, and we cannot. */
+#if !defined (ANYP)
+# define ANYP (EVENP | ODDP)
+#endif
+ if (((oldtio.sgttyb.sg_flags & ANYP) == ANYP) ||
+ ((oldtio.sgttyb.sg_flags & ANYP) == 0))
+ {
+ tiop->sgttyb.sg_flags |= ANYP;
+
+ /* Hack on local mode flags if we can. */
+#if defined (TIOCLGET)
+# if defined (LPASS8)
+ tiop->lflag |= LPASS8;
+# endif /* LPASS8 */
+#endif /* TIOCLGET */
+ }
+
+#if defined (TIOCGETC)
+# if defined (USE_XON_XOFF)
+ /* Get rid of terminal output start and stop characters. */
+ tiop->tchars.t_stopc = -1; /* C-s */
+ tiop->tchars.t_startc = -1; /* C-q */
+
+ /* If there is an XON character, bind it to restart the output. */
+ if (oldtio.tchars.t_startc != -1)
+ rl_bind_key (oldtio.tchars.t_startc, rl_restart_output);
+# endif /* USE_XON_XOFF */
+
+ /* If there is an EOF char, bind _rl_eof_char to it. */
+ if (oldtio.tchars.t_eofc != -1)
+ _rl_eof_char = oldtio.tchars.t_eofc;
+
+# if defined (NO_KILL_INTR)
+ /* Get rid of terminal-generated SIGQUIT and SIGINT. */
+ tiop->tchars.t_quitc = -1; /* C-\ */
+ tiop->tchars.t_intrc = -1; /* C-c */
+# endif /* NO_KILL_INTR */
+#endif /* TIOCGETC */
+
+#if defined (TIOCGLTC)
+ /* Make the interrupt keys go away. Just enough to make people happy. */
+ tiop->ltchars.t_dsuspc = -1; /* C-y */
+ tiop->ltchars.t_lnextc = -1; /* C-v */
+#endif /* TIOCGLTC */
+}
+
+#else /* !defined (NEW_TTY_DRIVER) */
+
+#if !defined (VMIN)
+# define VMIN VEOF
+#endif
+
+#if !defined (VTIME)
+# define VTIME VEOL
+#endif
+
+#if defined (TERMIOS_TTY_DRIVER)
+# define TIOTYPE struct termios
+# define DRAIN_OUTPUT(fd) tcdrain (fd)
+# define GETATTR(tty, tiop) (tcgetattr (tty, tiop))
+# ifdef M_UNIX
+# define SETATTR(tty, tiop) (tcsetattr (tty, TCSANOW, tiop))
+# else
+# define SETATTR(tty, tiop) (tcsetattr (tty, TCSADRAIN, tiop))
+# endif /* !M_UNIX */
+#else
+# define TIOTYPE struct termio
+# define DRAIN_OUTPUT(fd)
+# define GETATTR(tty, tiop) (ioctl (tty, TCGETA, tiop))
+# define SETATTR(tty, tiop) (ioctl (tty, TCSETAW, tiop))
+#endif /* !TERMIOS_TTY_DRIVER */
+
+static TIOTYPE otio;
+
+static void save_tty_chars PARAMS((TIOTYPE *));
+static int _get_tty_settings PARAMS((int, TIOTYPE *));
+static int get_tty_settings PARAMS((int, TIOTYPE *));
+static int _set_tty_settings PARAMS((int, TIOTYPE *));
+static int set_tty_settings PARAMS((int, TIOTYPE *));
+
+static void prepare_terminal_settings PARAMS((int, TIOTYPE, TIOTYPE *));
+
+static void set_special_char PARAMS((Keymap, TIOTYPE *, int, rl_command_func_t));
+static void _rl_bind_tty_special_chars PARAMS((Keymap, TIOTYPE));
+
+#if defined (FLUSHO)
+# define OUTPUT_BEING_FLUSHED(tp) (tp->c_lflag & FLUSHO)
+#else
+# define OUTPUT_BEING_FLUSHED(tp) 0
+#endif
+
+static void
+save_tty_chars (tiop)
+ TIOTYPE *tiop;
+{
+ _rl_last_tty_chars = _rl_tty_chars;
+
+ _rl_tty_chars.t_eof = tiop->c_cc[VEOF];
+ _rl_tty_chars.t_eol = tiop->c_cc[VEOL];
+#ifdef VEOL2
+ _rl_tty_chars.t_eol2 = tiop->c_cc[VEOL2];
+#endif
+ _rl_tty_chars.t_erase = tiop->c_cc[VERASE];
+#ifdef VWERASE
+ _rl_tty_chars.t_werase = tiop->c_cc[VWERASE];
+#endif
+ _rl_tty_chars.t_kill = tiop->c_cc[VKILL];
+#ifdef VREPRINT
+ _rl_tty_chars.t_reprint = tiop->c_cc[VREPRINT];
+#endif
+ _rl_intr_char = _rl_tty_chars.t_intr = tiop->c_cc[VINTR];
+ _rl_quit_char = _rl_tty_chars.t_quit = tiop->c_cc[VQUIT];
+#ifdef VSUSP
+ _rl_susp_char = _rl_tty_chars.t_susp = tiop->c_cc[VSUSP];
+#endif
+#ifdef VDSUSP
+ _rl_tty_chars.t_dsusp = tiop->c_cc[VDSUSP];
+#endif
+#ifdef VSTART
+ _rl_tty_chars.t_start = tiop->c_cc[VSTART];
+#endif
+#ifdef VSTOP
+ _rl_tty_chars.t_stop = tiop->c_cc[VSTOP];
+#endif
+#ifdef VLNEXT
+ _rl_tty_chars.t_lnext = tiop->c_cc[VLNEXT];
+#endif
+#ifdef VDISCARD
+ _rl_tty_chars.t_flush = tiop->c_cc[VDISCARD];
+#endif
+#ifdef VSTATUS
+ _rl_tty_chars.t_status = tiop->c_cc[VSTATUS];
+#endif
+}
+
+#if defined (_AIX) || defined (_AIX41)
+/* Currently this is only used on AIX */
+static void
+rltty_warning (msg)
+ char *msg;
+{
+ _rl_errmsg ("warning: %s", msg);
+}
+#endif
+
+#if defined (_AIX)
+void
+setopost(tp)
+TIOTYPE *tp;
+{
+ if ((tp->c_oflag & OPOST) == 0)
+ {
+ _rl_errmsg ("warning: turning on OPOST for terminal\r");
+ tp->c_oflag |= OPOST|ONLCR;
+ }
+}
+#endif
+
+static int
+_get_tty_settings (tty, tiop)
+ int tty;
+ TIOTYPE *tiop;
+{
+ int ioctl_ret;
+
+ while (1)
+ {
+ ioctl_ret = GETATTR (tty, tiop);
+ if (ioctl_ret < 0)
+ {
+ if (errno != EINTR)
+ return -1;
+ else
+ continue;
+ }
+ if (OUTPUT_BEING_FLUSHED (tiop))
+ {
+#if defined (FLUSHO)
+ _rl_errmsg ("warning: turning off output flushing");
+ tiop->c_lflag &= ~FLUSHO;
+ break;
+#else
+ continue;
+#endif
+ }
+ break;
+ }
+
+ return 0;
+}
+
+static int
+get_tty_settings (tty, tiop)
+ int tty;
+ TIOTYPE *tiop;
+{
+ set_winsize (tty);
+
+ errno = 0;
+ if (_get_tty_settings (tty, tiop) < 0)
+ return -1;
+
+#if defined (_AIX)
+ setopost(tiop);
+#endif
+
+ return 0;
+}
+
+static int
+_set_tty_settings (tty, tiop)
+ int tty;
+ TIOTYPE *tiop;
+{
+ while (SETATTR (tty, tiop) < 0)
+ {
+ if (errno != EINTR)
+ return -1;
+ errno = 0;
+ }
+ return 0;
+}
+
+static int
+set_tty_settings (tty, tiop)
+ int tty;
+ TIOTYPE *tiop;
+{
+ if (_set_tty_settings (tty, tiop) < 0)
+ return -1;
+
+#if 0
+
+#if defined (TERMIOS_TTY_DRIVER)
+# if defined (__ksr1__)
+ if (ksrflow)
+ {
+ ksrflow = 0;
+ tcflow (tty, TCOON);
+ }
+# else /* !ksr1 */
+ tcflow (tty, TCOON); /* Simulate a ^Q. */
+# endif /* !ksr1 */
+#else
+ ioctl (tty, TCXONC, 1); /* Simulate a ^Q. */
+#endif /* !TERMIOS_TTY_DRIVER */
+
+#endif /* 0 */
+
+ return 0;
+}
+
+static void
+prepare_terminal_settings (meta_flag, oldtio, tiop)
+ int meta_flag;
+ TIOTYPE oldtio, *tiop;
+{
+ _rl_echoing_p = (oldtio.c_lflag & ECHO);
+#if defined (ECHOCTL)
+ _rl_echoctl = (oldtio.c_lflag & ECHOCTL);
+#endif
+
+ tiop->c_lflag &= ~(ICANON | ECHO);
+
+ if ((unsigned char) oldtio.c_cc[VEOF] != (unsigned char) _POSIX_VDISABLE)
+ _rl_eof_char = oldtio.c_cc[VEOF];
+
+#if defined (USE_XON_XOFF)
+#if defined (IXANY)
+ tiop->c_iflag &= ~(IXON | IXOFF | IXANY);
+#else
+ /* `strict' Posix systems do not define IXANY. */
+ tiop->c_iflag &= ~(IXON | IXOFF);
+#endif /* IXANY */
+#endif /* USE_XON_XOFF */
+
+ /* Only turn this off if we are using all 8 bits. */
+ if (((tiop->c_cflag & CSIZE) == CS8) || meta_flag)
+ tiop->c_iflag &= ~(ISTRIP | INPCK);
+
+ /* Make sure we differentiate between CR and NL on input. */
+ tiop->c_iflag &= ~(ICRNL | INLCR);
+
+#if !defined (HANDLE_SIGNALS)
+ tiop->c_lflag &= ~ISIG;
+#else
+ tiop->c_lflag |= ISIG;
+#endif
+
+ tiop->c_cc[VMIN] = 1;
+ tiop->c_cc[VTIME] = 0;
+
+#if defined (FLUSHO)
+ if (OUTPUT_BEING_FLUSHED (tiop))
+ {
+ tiop->c_lflag &= ~FLUSHO;
+ oldtio.c_lflag &= ~FLUSHO;
+ }
+#endif
+
+ /* Turn off characters that we need on Posix systems with job control,
+ just to be sure. This includes ^Y and ^V. This should not really
+ be necessary. */
+#if defined (TERMIOS_TTY_DRIVER) && defined (_POSIX_VDISABLE)
+
+#if defined (VLNEXT)
+ tiop->c_cc[VLNEXT] = _POSIX_VDISABLE;
+#endif
+
+#if defined (VDSUSP)
+ tiop->c_cc[VDSUSP] = _POSIX_VDISABLE;
+#endif
+
+#endif /* TERMIOS_TTY_DRIVER && _POSIX_VDISABLE */
+}
+#endif /* !NEW_TTY_DRIVER */
+
+/* Put the terminal in CBREAK mode so that we can detect key presses. */
+#if defined (NO_TTY_DRIVER)
+void
+rl_prep_terminal (meta_flag)
+ int meta_flag;
+{
+ _rl_echoing_p = 1;
+}
+
+void
+rl_deprep_terminal ()
+{
+}
+
+#else /* ! NO_TTY_DRIVER */
+void
+rl_prep_terminal (meta_flag)
+ int meta_flag;
+{
+ int tty;
+ TIOTYPE tio;
+
+ if (terminal_prepped)
+ return;
+
+ /* Try to keep this function from being INTerrupted. */
+ _rl_block_sigint ();
+
+ tty = fileno (rl_instream);
+
+ if (get_tty_settings (tty, &tio) < 0)
+ {
+#if defined (ENOTSUP)
+ /* MacOS X and Linux, at least, lie about the value of errno if
+ tcgetattr fails. */
+ if (errno == ENOTTY || errno == EINVAL || errno == ENOTSUP)
+#else
+ if (errno == ENOTTY || errno == EINVAL)
+#endif
+ _rl_echoing_p = 1; /* XXX */
+
+ _rl_release_sigint ();
+ return;
+ }
+
+ otio = tio;
+
+ if (_rl_bind_stty_chars)
+ {
+#if defined (VI_MODE)
+ /* If editing in vi mode, make sure we restore the bindings in the
+ insertion keymap no matter what keymap we ended up in. */
+ if (rl_editing_mode == vi_mode)
+ rl_tty_unset_default_bindings (vi_insertion_keymap);
+ else
+#endif
+ rl_tty_unset_default_bindings (_rl_keymap);
+ }
+ save_tty_chars (&otio);
+ RL_SETSTATE(RL_STATE_TTYCSAVED);
+ if (_rl_bind_stty_chars)
+ {
+#if defined (VI_MODE)
+ /* If editing in vi mode, make sure we set the bindings in the
+ insertion keymap no matter what keymap we ended up in. */
+ if (rl_editing_mode == vi_mode)
+ _rl_bind_tty_special_chars (vi_insertion_keymap, tio);
+ else
+#endif
+ _rl_bind_tty_special_chars (_rl_keymap, tio);
+ }
+
+ prepare_terminal_settings (meta_flag, otio, &tio);
+
+ if (set_tty_settings (tty, &tio) < 0)
+ {
+ _rl_release_sigint ();
+ return;
+ }
+
+ if (_rl_enable_keypad)
+ _rl_control_keypad (1);
+
+ fflush (rl_outstream);
+ terminal_prepped = 1;
+ RL_SETSTATE(RL_STATE_TERMPREPPED);
+
+ _rl_release_sigint ();
+}
+
+/* Restore the terminal's normal settings and modes. */
+void
+rl_deprep_terminal ()
+{
+ int tty;
+
+ if (!terminal_prepped)
+ return;
+
+ /* Try to keep this function from being interrupted. */
+ _rl_block_sigint ();
+
+ tty = fileno (rl_instream);
+
+ if (_rl_enable_keypad)
+ _rl_control_keypad (0);
+
+ fflush (rl_outstream);
+
+ if (set_tty_settings (tty, &otio) < 0)
+ {
+ _rl_release_sigint ();
+ return;
+ }
+
+ terminal_prepped = 0;
+ RL_UNSETSTATE(RL_STATE_TERMPREPPED);
+
+ _rl_release_sigint ();
+}
+#endif /* !NO_TTY_DRIVER */
+
+/* **************************************************************** */
+/* */
+/* Bogus Flow Control */
+/* */
+/* **************************************************************** */
+
+int
+rl_restart_output (count, key)
+ int count, key;
+{
+#if defined (__MINGW32__)
+ return 0;
+#else /* !__MING32__ */
+
+ int fildes = fileno (rl_outstream);
+#if defined (TIOCSTART)
+#if defined (apollo)
+ ioctl (&fildes, TIOCSTART, 0);
+#else
+ ioctl (fildes, TIOCSTART, 0);
+#endif /* apollo */
+
+#else /* !TIOCSTART */
+# if defined (TERMIOS_TTY_DRIVER)
+# if defined (__ksr1__)
+ if (ksrflow)
+ {
+ ksrflow = 0;
+ tcflow (fildes, TCOON);
+ }
+# else /* !ksr1 */
+ tcflow (fildes, TCOON); /* Simulate a ^Q. */
+# endif /* !ksr1 */
+# else /* !TERMIOS_TTY_DRIVER */
+# if defined (TCXONC)
+ ioctl (fildes, TCXONC, TCOON);
+# endif /* TCXONC */
+# endif /* !TERMIOS_TTY_DRIVER */
+#endif /* !TIOCSTART */
+
+ return 0;
+#endif /* !__MINGW32__ */
+}
+
+int
+rl_stop_output (count, key)
+ int count, key;
+{
+#if defined (__MINGW32__)
+ return 0;
+#else
+
+ int fildes = fileno (rl_instream);
+
+#if defined (TIOCSTOP)
+# if defined (apollo)
+ ioctl (&fildes, TIOCSTOP, 0);
+# else
+ ioctl (fildes, TIOCSTOP, 0);
+# endif /* apollo */
+#else /* !TIOCSTOP */
+# if defined (TERMIOS_TTY_DRIVER)
+# if defined (__ksr1__)
+ ksrflow = 1;
+# endif /* ksr1 */
+ tcflow (fildes, TCOOFF);
+# else
+# if defined (TCXONC)
+ ioctl (fildes, TCXONC, TCOON);
+# endif /* TCXONC */
+# endif /* !TERMIOS_TTY_DRIVER */
+#endif /* !TIOCSTOP */
+
+ return 0;
+#endif /* !__MINGW32__ */
+}
+
+/* **************************************************************** */
+/* */
+/* Default Key Bindings */
+/* */
+/* **************************************************************** */
+
+#if !defined (NO_TTY_DRIVER)
+#define SET_SPECIAL(sc, func) set_special_char(kmap, &ttybuff, sc, func)
+#endif
+
+#if defined (NO_TTY_DRIVER)
+
+#define SET_SPECIAL(sc, func)
+#define RESET_SPECIAL(c)
+
+#elif defined (NEW_TTY_DRIVER)
+static void
+set_special_char (kmap, tiop, sc, func)
+ Keymap kmap;
+ TIOTYPE *tiop;
+ int sc;
+ rl_command_func_t *func;
+{
+ if (sc != -1 && kmap[(unsigned char)sc].type == ISFUNC)
+ kmap[(unsigned char)sc].function = func;
+}
+
+#define RESET_SPECIAL(c) \
+ if (c != -1 && kmap[(unsigned char)c].type == ISFUNC) \
+ kmap[(unsigned char)c].function = rl_insert;
+
+static void
+_rl_bind_tty_special_chars (kmap, ttybuff)
+ Keymap kmap;
+ TIOTYPE ttybuff;
+{
+ if (ttybuff.flags & SGTTY_SET)
+ {
+ SET_SPECIAL (ttybuff.sgttyb.sg_erase, rl_rubout);
+ SET_SPECIAL (ttybuff.sgttyb.sg_kill, rl_unix_line_discard);
+ }
+
+# if defined (TIOCGLTC)
+ if (ttybuff.flags & LTCHARS_SET)
+ {
+ SET_SPECIAL (ttybuff.ltchars.t_werasc, rl_unix_word_rubout);
+ SET_SPECIAL (ttybuff.ltchars.t_lnextc, rl_quoted_insert);
+ }
+# endif /* TIOCGLTC */
+}
+
+#else /* !NEW_TTY_DRIVER */
+static void
+set_special_char (kmap, tiop, sc, func)
+ Keymap kmap;
+ TIOTYPE *tiop;
+ int sc;
+ rl_command_func_t *func;
+{
+ unsigned char uc;
+
+ uc = tiop->c_cc[sc];
+ if (uc != (unsigned char)_POSIX_VDISABLE && kmap[uc].type == ISFUNC)
+ kmap[uc].function = func;
+}
+
+/* used later */
+#define RESET_SPECIAL(uc) \
+ if (uc != (unsigned char)_POSIX_VDISABLE && kmap[uc].type == ISFUNC) \
+ kmap[uc].function = rl_insert;
+
+static void
+_rl_bind_tty_special_chars (kmap, ttybuff)
+ Keymap kmap;
+ TIOTYPE ttybuff;
+{
+ SET_SPECIAL (VERASE, rl_rubout);
+ SET_SPECIAL (VKILL, rl_unix_line_discard);
+
+# if defined (VLNEXT) && defined (TERMIOS_TTY_DRIVER)
+ SET_SPECIAL (VLNEXT, rl_quoted_insert);
+# endif /* VLNEXT && TERMIOS_TTY_DRIVER */
+
+# if defined (VWERASE) && defined (TERMIOS_TTY_DRIVER)
+ SET_SPECIAL (VWERASE, rl_unix_word_rubout);
+# endif /* VWERASE && TERMIOS_TTY_DRIVER */
+}
+
+#endif /* !NEW_TTY_DRIVER */
+
+/* Set the system's default editing characters to their readline equivalents
+ in KMAP. Should be static, now that we have rl_tty_set_default_bindings. */
+void
+rltty_set_default_bindings (kmap)
+ Keymap kmap;
+{
+#if !defined (NO_TTY_DRIVER)
+ TIOTYPE ttybuff;
+ int tty;
+
+ tty = fileno (rl_instream);
+
+ if (get_tty_settings (tty, &ttybuff) == 0)
+ _rl_bind_tty_special_chars (kmap, ttybuff);
+#endif
+}
+
+/* New public way to set the system default editing chars to their readline
+ equivalents. */
+void
+rl_tty_set_default_bindings (kmap)
+ Keymap kmap;
+{
+ rltty_set_default_bindings (kmap);
+}
+
+/* Rebind all of the tty special chars that readline worries about back
+ to self-insert. Call this before saving the current terminal special
+ chars with save_tty_chars(). This only works on POSIX termios or termio
+ systems. */
+void
+rl_tty_unset_default_bindings (kmap)
+ Keymap kmap;
+{
+ /* Don't bother before we've saved the tty special chars at least once. */
+ if (RL_ISSTATE(RL_STATE_TTYCSAVED) == 0)
+ return;
+
+ RESET_SPECIAL (_rl_tty_chars.t_erase);
+ RESET_SPECIAL (_rl_tty_chars.t_kill);
+
+# if defined (VLNEXT) && defined (TERMIOS_TTY_DRIVER)
+ RESET_SPECIAL (_rl_tty_chars.t_lnext);
+# endif /* VLNEXT && TERMIOS_TTY_DRIVER */
+
+# if defined (VWERASE) && defined (TERMIOS_TTY_DRIVER)
+ RESET_SPECIAL (_rl_tty_chars.t_werase);
+# endif /* VWERASE && TERMIOS_TTY_DRIVER */
+}
+
+#if defined (HANDLE_SIGNALS)
+
+#if defined (NEW_TTY_DRIVER) || defined (NO_TTY_DRIVER)
+int
+_rl_disable_tty_signals ()
+{
+ return 0;
+}
+
+int
+_rl_restore_tty_signals ()
+{
+ return 0;
+}
+#else
+
+static TIOTYPE sigstty, nosigstty;
+static int tty_sigs_disabled = 0;
+
+int
+_rl_disable_tty_signals ()
+{
+ if (tty_sigs_disabled)
+ return 0;
+
+ if (_get_tty_settings (fileno (rl_instream), &sigstty) < 0)
+ return -1;
+
+ nosigstty = sigstty;
+
+ nosigstty.c_lflag &= ~ISIG;
+ nosigstty.c_iflag &= ~IXON;
+
+ if (_set_tty_settings (fileno (rl_instream), &nosigstty) < 0)
+ return (_set_tty_settings (fileno (rl_instream), &sigstty));
+
+ tty_sigs_disabled = 1;
+ return 0;
+}
+
+int
+_rl_restore_tty_signals ()
+{
+ int r;
+
+ if (tty_sigs_disabled == 0)
+ return 0;
+
+ r = _set_tty_settings (fileno (rl_instream), &sigstty);
+
+ if (r == 0)
+ tty_sigs_disabled = 0;
+
+ return r;
+}
+#endif /* !NEW_TTY_DRIVER */
+
+#endif /* HANDLE_SIGNALS */
diff --git a/lib/readline/rltty.h b/lib/readline/rltty.h
new file mode 100644
index 0000000..5bcc946
--- /dev/null
+++ b/lib/readline/rltty.h
@@ -0,0 +1,80 @@
+/* rltty.h - tty driver-related definitions used by some library files. */
+
+/* Copyright (C) 1995-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_RLTTY_H_)
+#define _RLTTY_H_
+
+/* Posix systems use termios and the Posix signal functions. */
+#if defined (TERMIOS_TTY_DRIVER)
+# include <termios.h>
+#endif /* TERMIOS_TTY_DRIVER */
+
+/* System V machines use termio. */
+#if defined (TERMIO_TTY_DRIVER)
+# include <termio.h>
+# if !defined (TCOON)
+# define TCOON 1
+# endif
+#endif /* TERMIO_TTY_DRIVER */
+
+/* Other (BSD) machines use sgtty. */
+#if defined (NEW_TTY_DRIVER)
+# include <sgtty.h>
+#endif
+
+#include "rlwinsize.h"
+
+/* Define _POSIX_VDISABLE if we are not using the `new' tty driver and
+ it is not already defined. It is used both to determine if a
+ special character is disabled and to disable certain special
+ characters. Posix systems should set to 0, USG systems to -1. */
+#if !defined (NEW_TTY_DRIVER) && !defined (_POSIX_VDISABLE)
+# if defined (_SVR4_VDISABLE)
+# define _POSIX_VDISABLE _SVR4_VDISABLE
+# else
+# if defined (_POSIX_VERSION)
+# define _POSIX_VDISABLE 0
+# else /* !_POSIX_VERSION */
+# define _POSIX_VDISABLE -1
+# endif /* !_POSIX_VERSION */
+# endif /* !_SVR4_DISABLE */
+#endif /* !NEW_TTY_DRIVER && !_POSIX_VDISABLE */
+
+typedef struct _rl_tty_chars {
+ unsigned char t_eof;
+ unsigned char t_eol;
+ unsigned char t_eol2;
+ unsigned char t_erase;
+ unsigned char t_werase;
+ unsigned char t_kill;
+ unsigned char t_reprint;
+ unsigned char t_intr;
+ unsigned char t_quit;
+ unsigned char t_susp;
+ unsigned char t_dsusp;
+ unsigned char t_start;
+ unsigned char t_stop;
+ unsigned char t_lnext;
+ unsigned char t_flush;
+ unsigned char t_status;
+} _RL_TTY_CHARS;
+
+#endif /* _RLTTY_H_ */
diff --git a/lib/readline/rltypedefs.h b/lib/readline/rltypedefs.h
new file mode 100644
index 0000000..60f29a1
--- /dev/null
+++ b/lib/readline/rltypedefs.h
@@ -0,0 +1,93 @@
+/* rltypedefs.h -- Type declarations for readline functions. */
+
+/* Copyright (C) 2000-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _RL_TYPEDEFS_H_
+#define _RL_TYPEDEFS_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Old-style */
+
+#if !defined (_FUNCTION_DEF)
+# define _FUNCTION_DEF
+
+typedef int Function ();
+typedef void VFunction ();
+typedef char *CPFunction ();
+typedef char **CPPFunction ();
+
+#endif /* _FUNCTION_DEF */
+
+/* New style. */
+
+#if !defined (_RL_FUNCTION_TYPEDEF)
+# define _RL_FUNCTION_TYPEDEF
+
+/* Bindable functions */
+typedef int rl_command_func_t PARAMS((int, int));
+
+/* Typedefs for the completion system */
+typedef char *rl_compentry_func_t PARAMS((const char *, int));
+typedef char **rl_completion_func_t PARAMS((const char *, int, int));
+
+typedef char *rl_quote_func_t PARAMS((char *, int, char *));
+typedef char *rl_dequote_func_t PARAMS((char *, int));
+
+typedef int rl_compignore_func_t PARAMS((char **));
+
+typedef void rl_compdisp_func_t PARAMS((char **, int, int));
+
+/* Type for input and pre-read hook functions like rl_event_hook */
+typedef int rl_hook_func_t PARAMS((void));
+
+/* Input function type */
+typedef int rl_getc_func_t PARAMS((FILE *));
+
+/* Generic function that takes a character buffer (which could be the readline
+ line buffer) and an index into it (which could be rl_point) and returns
+ an int. */
+typedef int rl_linebuf_func_t PARAMS((char *, int));
+
+/* `Generic' function pointer typedefs */
+typedef int rl_intfunc_t PARAMS((int));
+#define rl_ivoidfunc_t rl_hook_func_t
+typedef int rl_icpfunc_t PARAMS((char *));
+typedef int rl_icppfunc_t PARAMS((char **));
+
+typedef void rl_voidfunc_t PARAMS((void));
+typedef void rl_vintfunc_t PARAMS((int));
+typedef void rl_vcpfunc_t PARAMS((char *));
+typedef void rl_vcppfunc_t PARAMS((char **));
+
+typedef char *rl_cpvfunc_t PARAMS((void));
+typedef char *rl_cpifunc_t PARAMS((int));
+typedef char *rl_cpcpfunc_t PARAMS((char *));
+typedef char *rl_cpcppfunc_t PARAMS((char **));
+
+#endif /* _RL_FUNCTION_TYPEDEF */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _RL_TYPEDEFS_H_ */
diff --git a/lib/readline/rlwinsize.h b/lib/readline/rlwinsize.h
new file mode 100644
index 0000000..d198fcf
--- /dev/null
+++ b/lib/readline/rlwinsize.h
@@ -0,0 +1,58 @@
+/* rlwinsize.h -- an attempt to isolate some of the system-specific defines
+ for `struct winsize' and TIOCGWINSZ. */
+
+/* Copyright (C) 1997-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_RLWINSIZE_H_)
+#define _RLWINSIZE_H_
+
+#if defined (HAVE_CONFIG_H)
+# include "config.h"
+#endif
+
+/* Try to find the definitions of `struct winsize' and TIOGCWINSZ */
+
+#if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ)
+# include <sys/ioctl.h>
+#endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */
+
+#if defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL)
+# include <termios.h>
+#endif /* STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */
+
+/* Not in either of the standard places, look around. */
+#if !defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL)
+# if defined (HAVE_SYS_STREAM_H)
+# include <sys/stream.h>
+# endif /* HAVE_SYS_STREAM_H */
+# if defined (HAVE_SYS_PTEM_H) /* SVR4.2, at least, has it here */
+# include <sys/ptem.h>
+# define _IO_PTEM_H /* work around SVR4.2 1.1.4 bug */
+# endif /* HAVE_SYS_PTEM_H */
+# if defined (HAVE_SYS_PTE_H) /* ??? */
+# include <sys/pte.h>
+# endif /* HAVE_SYS_PTE_H */
+#endif /* !STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */
+
+#if defined (M_UNIX) && !defined (_SCO_DS) && !defined (tcflow)
+# define tcflow(fd, action) ioctl(fd, TCXONC, action)
+#endif
+
+#endif /* _RL_WINSIZE_H */
diff --git a/lib/readline/savestring.c b/lib/readline/savestring.c
new file mode 100644
index 0000000..63f467a
--- /dev/null
+++ b/lib/readline/savestring.c
@@ -0,0 +1,37 @@
+/* savestring.c - function version of savestring for backwards compatibility */
+
+/* Copyright (C) 1998,2003 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#include <config.h>
+#ifdef HAVE_STRING_H
+# include <string.h>
+#endif
+#include "xmalloc.h"
+
+/* Backwards compatibility, now that savestring has been removed from
+ all `public' readline header files. */
+char *
+savestring (s)
+ const char *s;
+{
+ return ((char *)strcpy ((char *)xmalloc (1 + strlen (s)), (s)));
+}
diff --git a/lib/readline/search.c b/lib/readline/search.c
new file mode 100644
index 0000000..82984f1
--- /dev/null
+++ b/lib/readline/search.c
@@ -0,0 +1,570 @@
+/* search.c - code for non-incremental searching in emacs and vi modes. */
+
+/* Copyright (C) 1992-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <stdio.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif
+
+#include "rldefs.h"
+#include "rlmbutil.h"
+
+#include "readline.h"
+#include "history.h"
+
+#include "rlprivate.h"
+#include "xmalloc.h"
+
+#ifdef abs
+# undef abs
+#endif
+#define abs(x) (((x) >= 0) ? (x) : -(x))
+
+_rl_search_cxt *_rl_nscxt = 0;
+
+extern HIST_ENTRY *_rl_saved_line_for_history;
+
+/* Functions imported from the rest of the library. */
+extern int _rl_free_history_entry PARAMS((HIST_ENTRY *));
+
+static char *noninc_search_string = (char *) NULL;
+static int noninc_history_pos;
+
+static char *prev_line_found = (char *) NULL;
+
+static int rl_history_search_len;
+static int rl_history_search_pos;
+static char *history_search_string;
+static int history_string_size;
+
+static void make_history_line_current PARAMS((HIST_ENTRY *));
+static int noninc_search_from_pos PARAMS((char *, int, int));
+static int noninc_dosearch PARAMS((char *, int));
+static int noninc_search PARAMS((int, int));
+static int rl_history_search_internal PARAMS((int, int));
+static void rl_history_search_reinit PARAMS((void));
+
+static _rl_search_cxt *_rl_nsearch_init PARAMS((int, int));
+static int _rl_nsearch_cleanup PARAMS((_rl_search_cxt *, int));
+static void _rl_nsearch_abort PARAMS((_rl_search_cxt *));
+static int _rl_nsearch_dispatch PARAMS((_rl_search_cxt *, int));
+
+/* Make the data from the history entry ENTRY be the contents of the
+ current line. This doesn't do anything with rl_point; the caller
+ must set it. */
+static void
+make_history_line_current (entry)
+ HIST_ENTRY *entry;
+{
+ _rl_replace_text (entry->line, 0, rl_end);
+ _rl_fix_point (1);
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode)
+ /* POSIX.2 says that the `U' command doesn't affect the copy of any
+ command lines to the edit line. We're going to implement that by
+ making the undo list start after the matching line is copied to the
+ current editing buffer. */
+ rl_free_undo_list ();
+#endif
+
+ if (_rl_saved_line_for_history)
+ _rl_free_history_entry (_rl_saved_line_for_history);
+ _rl_saved_line_for_history = (HIST_ENTRY *)NULL;
+}
+
+/* Search the history list for STRING starting at absolute history position
+ POS. If STRING begins with `^', the search must match STRING at the
+ beginning of a history line, otherwise a full substring match is performed
+ for STRING. DIR < 0 means to search backwards through the history list,
+ DIR >= 0 means to search forward. */
+static int
+noninc_search_from_pos (string, pos, dir)
+ char *string;
+ int pos, dir;
+{
+ int ret, old;
+
+ if (pos < 0)
+ return -1;
+
+ old = where_history ();
+ if (history_set_pos (pos) == 0)
+ return -1;
+
+ RL_SETSTATE(RL_STATE_SEARCH);
+ if (*string == '^')
+ ret = history_search_prefix (string + 1, dir);
+ else
+ ret = history_search (string, dir);
+ RL_UNSETSTATE(RL_STATE_SEARCH);
+
+ if (ret != -1)
+ ret = where_history ();
+
+ history_set_pos (old);
+ return (ret);
+}
+
+/* Search for a line in the history containing STRING. If DIR is < 0, the
+ search is backwards through previous entries, else through subsequent
+ entries. Returns 1 if the search was successful, 0 otherwise. */
+static int
+noninc_dosearch (string, dir)
+ char *string;
+ int dir;
+{
+ int oldpos, pos;
+ HIST_ENTRY *entry;
+
+ if (string == 0 || *string == '\0' || noninc_history_pos < 0)
+ {
+ rl_ding ();
+ return 0;
+ }
+
+ pos = noninc_search_from_pos (string, noninc_history_pos + dir, dir);
+ if (pos == -1)
+ {
+ /* Search failed, current history position unchanged. */
+ rl_maybe_unsave_line ();
+ rl_clear_message ();
+ rl_point = 0;
+ rl_ding ();
+ return 0;
+ }
+
+ noninc_history_pos = pos;
+
+ oldpos = where_history ();
+ history_set_pos (noninc_history_pos);
+ entry = current_history ();
+#if defined (VI_MODE)
+ if (rl_editing_mode != vi_mode)
+#endif
+ history_set_pos (oldpos);
+
+ make_history_line_current (entry);
+
+ rl_point = 0;
+ rl_mark = rl_end;
+
+ rl_clear_message ();
+ return 1;
+}
+
+static _rl_search_cxt *
+_rl_nsearch_init (dir, pchar)
+ int dir, pchar;
+{
+ _rl_search_cxt *cxt;
+ char *p;
+
+ cxt = _rl_scxt_alloc (RL_SEARCH_NSEARCH, 0);
+ if (dir < 0)
+ cxt->sflags |= SF_REVERSE; /* not strictly needed */
+
+ cxt->direction = dir;
+ cxt->history_pos = cxt->save_line;
+
+ rl_maybe_save_line ();
+
+ /* Clear the undo list, since reading the search string should create its
+ own undo list, and the whole list will end up being freed when we
+ finish reading the search string. */
+ rl_undo_list = 0;
+
+ /* Use the line buffer to read the search string. */
+ rl_line_buffer[0] = 0;
+ rl_end = rl_point = 0;
+
+ p = _rl_make_prompt_for_search (pchar ? pchar : ':');
+ rl_message ("%s", p, 0);
+ free (p);
+
+ RL_SETSTATE(RL_STATE_NSEARCH);
+
+ _rl_nscxt = cxt;
+
+ return cxt;
+}
+
+static int
+_rl_nsearch_cleanup (cxt, r)
+ _rl_search_cxt *cxt;
+ int r;
+{
+ _rl_scxt_dispose (cxt, 0);
+ _rl_nscxt = 0;
+
+ RL_UNSETSTATE(RL_STATE_NSEARCH);
+
+ return (r != 1);
+}
+
+static void
+_rl_nsearch_abort (cxt)
+ _rl_search_cxt *cxt;
+{
+ rl_maybe_unsave_line ();
+ rl_clear_message ();
+ rl_point = cxt->save_point;
+ rl_mark = cxt->save_mark;
+ rl_restore_prompt ();
+
+ RL_UNSETSTATE (RL_STATE_NSEARCH);
+}
+
+/* Process just-read character C according to search context CXT. Return -1
+ if the caller should abort the search, 0 if we should break out of the
+ loop, and 1 if we should continue to read characters. */
+static int
+_rl_nsearch_dispatch (cxt, c)
+ _rl_search_cxt *cxt;
+ int c;
+{
+ switch (c)
+ {
+ case CTRL('W'):
+ rl_unix_word_rubout (1, c);
+ break;
+
+ case CTRL('U'):
+ rl_unix_line_discard (1, c);
+ break;
+
+ case RETURN:
+ case NEWLINE:
+ return 0;
+
+ case CTRL('H'):
+ case RUBOUT:
+ if (rl_point == 0)
+ {
+ _rl_nsearch_abort (cxt);
+ return -1;
+ }
+ _rl_rubout_char (1, c);
+ break;
+
+ case CTRL('C'):
+ case CTRL('G'):
+ rl_ding ();
+ _rl_nsearch_abort (cxt);
+ return -1;
+
+ default:
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_insert_text (cxt->mb);
+ else
+#endif
+ _rl_insert_char (1, c);
+ break;
+ }
+
+ (*rl_redisplay_function) ();
+ return 1;
+}
+
+/* Perform one search according to CXT, using NONINC_SEARCH_STRING. Return
+ -1 if the search should be aborted, any other value means to clean up
+ using _rl_nsearch_cleanup (). Returns 1 if the search was successful,
+ 0 otherwise. */
+static int
+_rl_nsearch_dosearch (cxt)
+ _rl_search_cxt *cxt;
+{
+ rl_mark = cxt->save_mark;
+
+ /* If rl_point == 0, we want to re-use the previous search string and
+ start from the saved history position. If there's no previous search
+ string, punt. */
+ if (rl_point == 0)
+ {
+ if (noninc_search_string == 0)
+ {
+ rl_ding ();
+ rl_restore_prompt ();
+ RL_UNSETSTATE (RL_STATE_NSEARCH);
+ return -1;
+ }
+ }
+ else
+ {
+ /* We want to start the search from the current history position. */
+ noninc_history_pos = cxt->save_line;
+ FREE (noninc_search_string);
+ noninc_search_string = savestring (rl_line_buffer);
+
+ /* If we don't want the subsequent undo list generated by the search
+ matching a history line to include the contents of the search string,
+ we need to clear rl_line_buffer here. For now, we just clear the
+ undo list generated by reading the search string. (If the search
+ fails, the old undo list will be restored by rl_maybe_unsave_line.) */
+ rl_free_undo_list ();
+ }
+
+ rl_restore_prompt ();
+ return (noninc_dosearch (noninc_search_string, cxt->direction));
+}
+
+/* Search non-interactively through the history list. DIR < 0 means to
+ search backwards through the history of previous commands; otherwise
+ the search is for commands subsequent to the current position in the
+ history list. PCHAR is the character to use for prompting when reading
+ the search string; if not specified (0), it defaults to `:'. */
+static int
+noninc_search (dir, pchar)
+ int dir;
+ int pchar;
+{
+ _rl_search_cxt *cxt;
+ int c, r;
+
+ cxt = _rl_nsearch_init (dir, pchar);
+
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ return (0);
+
+ /* Read the search string. */
+ r = 0;
+ while (1)
+ {
+ c = _rl_search_getchar (cxt);
+
+ if (c == 0)
+ break;
+
+ r = _rl_nsearch_dispatch (cxt, c);
+ if (r < 0)
+ return 1;
+ else if (r == 0)
+ break;
+ }
+
+ r = _rl_nsearch_dosearch (cxt);
+ return ((r >= 0) ? _rl_nsearch_cleanup (cxt, r) : (r != 1));
+}
+
+/* Search forward through the history list for a string. If the vi-mode
+ code calls this, KEY will be `?'. */
+int
+rl_noninc_forward_search (count, key)
+ int count, key;
+{
+ return noninc_search (1, (key == '?') ? '?' : 0);
+}
+
+/* Reverse search the history list for a string. If the vi-mode code
+ calls this, KEY will be `/'. */
+int
+rl_noninc_reverse_search (count, key)
+ int count, key;
+{
+ return noninc_search (-1, (key == '/') ? '/' : 0);
+}
+
+/* Search forward through the history list for the last string searched
+ for. If there is no saved search string, abort. */
+int
+rl_noninc_forward_search_again (count, key)
+ int count, key;
+{
+ int r;
+
+ if (!noninc_search_string)
+ {
+ rl_ding ();
+ return (-1);
+ }
+ r = noninc_dosearch (noninc_search_string, 1);
+ return (r != 1);
+}
+
+/* Reverse search in the history list for the last string searched
+ for. If there is no saved search string, abort. */
+int
+rl_noninc_reverse_search_again (count, key)
+ int count, key;
+{
+ int r;
+
+ if (!noninc_search_string)
+ {
+ rl_ding ();
+ return (-1);
+ }
+ r = noninc_dosearch (noninc_search_string, -1);
+ return (r != 1);
+}
+
+#if defined (READLINE_CALLBACKS)
+int
+_rl_nsearch_callback (cxt)
+ _rl_search_cxt *cxt;
+{
+ int c, r;
+
+ c = _rl_search_getchar (cxt);
+ r = _rl_nsearch_dispatch (cxt, c);
+ if (r != 0)
+ return 1;
+
+ r = _rl_nsearch_dosearch (cxt);
+ return ((r >= 0) ? _rl_nsearch_cleanup (cxt, r) : (r != 1));
+}
+#endif
+
+static int
+rl_history_search_internal (count, dir)
+ int count, dir;
+{
+ HIST_ENTRY *temp;
+ int ret, oldpos;
+
+ rl_maybe_save_line ();
+ temp = (HIST_ENTRY *)NULL;
+
+ /* Search COUNT times through the history for a line whose prefix
+ matches history_search_string. When this loop finishes, TEMP,
+ if non-null, is the history line to copy into the line buffer. */
+ while (count)
+ {
+ ret = noninc_search_from_pos (history_search_string, rl_history_search_pos + dir, dir);
+ if (ret == -1)
+ break;
+
+ /* Get the history entry we found. */
+ rl_history_search_pos = ret;
+ oldpos = where_history ();
+ history_set_pos (rl_history_search_pos);
+ temp = current_history ();
+ history_set_pos (oldpos);
+
+ /* Don't find multiple instances of the same line. */
+ if (prev_line_found && STREQ (prev_line_found, temp->line))
+ continue;
+ prev_line_found = temp->line;
+ count--;
+ }
+
+ /* If we didn't find anything at all, return. */
+ if (temp == 0)
+ {
+ rl_maybe_unsave_line ();
+ rl_ding ();
+ /* If you don't want the saved history line (last match) to show up
+ in the line buffer after the search fails, change the #if 0 to
+ #if 1 */
+#if 0
+ if (rl_point > rl_history_search_len)
+ {
+ rl_point = rl_end = rl_history_search_len;
+ rl_line_buffer[rl_end] = '\0';
+ rl_mark = 0;
+ }
+#else
+ rl_point = rl_history_search_len; /* rl_maybe_unsave_line changes it */
+ rl_mark = rl_end;
+#endif
+ return 1;
+ }
+
+ /* Copy the line we found into the current line buffer. */
+ make_history_line_current (temp);
+
+ rl_point = rl_history_search_len;
+ rl_mark = rl_end;
+
+ return 0;
+}
+
+static void
+rl_history_search_reinit ()
+{
+ rl_history_search_pos = where_history ();
+ rl_history_search_len = rl_point;
+ prev_line_found = (char *)NULL;
+ if (rl_point)
+ {
+ if (rl_history_search_len >= history_string_size - 2)
+ {
+ history_string_size = rl_history_search_len + 2;
+ history_search_string = (char *)xrealloc (history_search_string, history_string_size);
+ }
+ history_search_string[0] = '^';
+ strncpy (history_search_string + 1, rl_line_buffer, rl_point);
+ history_search_string[rl_point + 1] = '\0';
+ }
+ _rl_free_saved_history_line ();
+}
+
+/* Search forward in the history for the string of characters
+ from the start of the line to rl_point. This is a non-incremental
+ search. */
+int
+rl_history_search_forward (count, ignore)
+ int count, ignore;
+{
+ if (count == 0)
+ return (0);
+
+ if (rl_last_func != rl_history_search_forward &&
+ rl_last_func != rl_history_search_backward)
+ rl_history_search_reinit ();
+
+ if (rl_history_search_len == 0)
+ return (rl_get_next_history (count, ignore));
+ return (rl_history_search_internal (abs (count), (count > 0) ? 1 : -1));
+}
+
+/* Search backward through the history for the string of characters
+ from the start of the line to rl_point. This is a non-incremental
+ search. */
+int
+rl_history_search_backward (count, ignore)
+ int count, ignore;
+{
+ if (count == 0)
+ return (0);
+
+ if (rl_last_func != rl_history_search_forward &&
+ rl_last_func != rl_history_search_backward)
+ rl_history_search_reinit ();
+
+ if (rl_history_search_len == 0)
+ return (rl_get_previous_history (count, ignore));
+ return (rl_history_search_internal (abs (count), (count > 0) ? -1 : 1));
+}
diff --git a/lib/readline/shell.c b/lib/readline/shell.c
new file mode 100644
index 0000000..18b4f03
--- /dev/null
+++ b/lib/readline/shell.c
@@ -0,0 +1,208 @@
+/* shell.c -- readline utility functions that are normally provided by
+ bash when readline is linked as part of the shell. */
+
+/* Copyright (C) 1997-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#if defined (HAVE_STRING_H)
+# include <string.h>
+#else
+# include <strings.h>
+#endif /* !HAVE_STRING_H */
+
+#if defined (HAVE_LIMITS_H)
+# include <limits.h>
+#endif
+
+#if defined (HAVE_FCNTL_H)
+#include <fcntl.h>
+#endif
+#if defined (HAVE_PWD_H)
+#include <pwd.h>
+#endif
+
+#include <stdio.h>
+
+#include "rlstdc.h"
+#include "rlshell.h"
+#include "xmalloc.h"
+
+#if defined (HAVE_GETPWUID) && !defined (HAVE_GETPW_DECLS)
+extern struct passwd *getpwuid PARAMS((uid_t));
+#endif /* HAVE_GETPWUID && !HAVE_GETPW_DECLS */
+
+#ifndef NULL
+# define NULL 0
+#endif
+
+#ifndef CHAR_BIT
+# define CHAR_BIT 8
+#endif
+
+/* Nonzero if the integer type T is signed. */
+#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* Bound on length of the string representing an integer value of type T.
+ Subtract one for the sign bit if T is signed;
+ 302 / 1000 is log10 (2) rounded up;
+ add one for integer division truncation;
+ add one more for a minus sign if t is signed. */
+#define INT_STRLEN_BOUND(t) \
+ ((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 1000 \
+ + 1 + TYPE_SIGNED (t))
+
+/* All of these functions are resolved from bash if we are linking readline
+ as part of bash. */
+
+/* Does shell-like quoting using single quotes. */
+char *
+sh_single_quote (string)
+ char *string;
+{
+ register int c;
+ char *result, *r, *s;
+
+ result = (char *)xmalloc (3 + (4 * strlen (string)));
+ r = result;
+ *r++ = '\'';
+
+ for (s = string; s && (c = *s); s++)
+ {
+ *r++ = c;
+
+ if (c == '\'')
+ {
+ *r++ = '\\'; /* insert escaped single quote */
+ *r++ = '\'';
+ *r++ = '\''; /* start new quoted string */
+ }
+ }
+
+ *r++ = '\'';
+ *r = '\0';
+
+ return (result);
+}
+
+/* Set the environment variables LINES and COLUMNS to lines and cols,
+ respectively. */
+void
+sh_set_lines_and_columns (lines, cols)
+ int lines, cols;
+{
+ char *b;
+
+#if defined (HAVE_SETENV)
+ b = (char *)xmalloc (INT_STRLEN_BOUND (int) + 1);
+ sprintf (b, "%d", lines);
+ setenv ("LINES", b, 1);
+ free (b);
+
+ b = (char *)xmalloc (INT_STRLEN_BOUND (int) + 1);
+ sprintf (b, "%d", cols);
+ setenv ("COLUMNS", b, 1);
+ free (b);
+#else /* !HAVE_SETENV */
+# if defined (HAVE_PUTENV)
+ b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("LINES=") + 1);
+ sprintf (b, "LINES=%d", lines);
+ putenv (b);
+
+ b = (char *)xmalloc (INT_STRLEN_BOUND (int) + sizeof ("COLUMNS=") + 1);
+ sprintf (b, "COLUMNS=%d", cols);
+ putenv (b);
+# endif /* HAVE_PUTENV */
+#endif /* !HAVE_SETENV */
+}
+
+char *
+sh_get_env_value (varname)
+ const char *varname;
+{
+ return ((char *)getenv (varname));
+}
+
+char *
+sh_get_home_dir ()
+{
+ char *home_dir;
+ struct passwd *entry;
+
+ home_dir = (char *)NULL;
+#if defined (HAVE_GETPWUID)
+ entry = getpwuid (getuid ());
+ if (entry)
+ home_dir = entry->pw_dir;
+#endif
+ return (home_dir);
+}
+
+#if !defined (O_NDELAY)
+# if defined (FNDELAY)
+# define O_NDELAY FNDELAY
+# endif
+#endif
+
+int
+sh_unset_nodelay_mode (fd)
+ int fd;
+{
+#if defined (HAVE_FCNTL)
+ int flags, bflags;
+
+ if ((flags = fcntl (fd, F_GETFL, 0)) < 0)
+ return -1;
+
+ bflags = 0;
+
+#ifdef O_NONBLOCK
+ bflags |= O_NONBLOCK;
+#endif
+
+#ifdef O_NDELAY
+ bflags |= O_NDELAY;
+#endif
+
+ if (flags & bflags)
+ {
+ flags &= ~bflags;
+ return (fcntl (fd, F_SETFL, flags));
+ }
+#endif
+
+ return 0;
+}
diff --git a/lib/readline/signals.c b/lib/readline/signals.c
new file mode 100644
index 0000000..4fbc019
--- /dev/null
+++ b/lib/readline/signals.c
@@ -0,0 +1,670 @@
+/* signals.c -- signal handling support for readline. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <stdio.h> /* Just for NULL. Yuck. */
+#include <sys/types.h>
+#include <signal.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+/* System-specific feature definitions and include files. */
+#include "rldefs.h"
+
+#if defined (GWINSZ_IN_SYS_IOCTL)
+# include <sys/ioctl.h>
+#endif /* GWINSZ_IN_SYS_IOCTL */
+
+/* Some standard library routines. */
+#include "readline.h"
+#include "history.h"
+
+#include "rlprivate.h"
+
+#if defined (HANDLE_SIGNALS)
+
+#if !defined (RETSIGTYPE)
+# if defined (VOID_SIGHANDLER)
+# define RETSIGTYPE void
+# else
+# define RETSIGTYPE int
+# endif /* !VOID_SIGHANDLER */
+#endif /* !RETSIGTYPE */
+
+#if defined (VOID_SIGHANDLER)
+# define SIGHANDLER_RETURN return
+#else
+# define SIGHANDLER_RETURN return (0)
+#endif
+
+/* This typedef is equivalent to the one for Function; it allows us
+ to say SigHandler *foo = signal (SIGKILL, SIG_IGN); */
+typedef RETSIGTYPE SigHandler ();
+
+#if defined (HAVE_POSIX_SIGNALS)
+typedef struct sigaction sighandler_cxt;
+# define rl_sigaction(s, nh, oh) sigaction(s, nh, oh)
+#else
+typedef struct { SigHandler *sa_handler; int sa_mask, sa_flags; } sighandler_cxt;
+# define sigemptyset(m)
+#endif /* !HAVE_POSIX_SIGNALS */
+
+#ifndef SA_RESTART
+# define SA_RESTART 0
+#endif
+
+static SigHandler *rl_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *));
+static void rl_maybe_set_sighandler PARAMS((int, SigHandler *, sighandler_cxt *));
+
+static RETSIGTYPE rl_signal_handler PARAMS((int));
+static RETSIGTYPE _rl_handle_signal PARAMS((int));
+
+/* Exported variables for use by applications. */
+
+/* If non-zero, readline will install its own signal handlers for
+ SIGINT, SIGTERM, SIGQUIT, SIGALRM, SIGTSTP, SIGTTIN, and SIGTTOU. */
+int rl_catch_signals = 1;
+
+/* If non-zero, readline will install a signal handler for SIGWINCH. */
+#ifdef SIGWINCH
+int rl_catch_sigwinch = 1;
+#else
+int rl_catch_sigwinch = 0; /* for the readline state struct in readline.c */
+#endif
+
+/* Private variables. */
+int _rl_interrupt_immediately = 0;
+int volatile _rl_caught_signal = 0; /* should be sig_atomic_t, but that requires including <signal.h> everywhere */
+
+/* If non-zero, print characters corresponding to received signals as long as
+ the user has indicated his desire to do so (_rl_echo_control_chars). */
+int _rl_echoctl = 0;
+
+int _rl_intr_char = 0;
+int _rl_quit_char = 0;
+int _rl_susp_char = 0;
+
+static int signals_set_flag;
+static int sigwinch_set_flag;
+
+/* **************************************************************** */
+/* */
+/* Signal Handling */
+/* */
+/* **************************************************************** */
+
+static sighandler_cxt old_int, old_term, old_alrm, old_quit;
+#if defined (SIGTSTP)
+static sighandler_cxt old_tstp, old_ttou, old_ttin;
+#endif
+#if defined (SIGWINCH)
+static sighandler_cxt old_winch;
+#endif
+
+/* Readline signal handler functions. */
+
+/* Called from RL_CHECK_SIGNALS() macro */
+RETSIGTYPE
+_rl_signal_handler (sig)
+{
+ _rl_caught_signal = 0; /* XXX */
+
+ _rl_handle_signal (sig);
+ SIGHANDLER_RETURN;
+}
+
+static RETSIGTYPE
+rl_signal_handler (sig)
+ int sig;
+{
+ if (_rl_interrupt_immediately || RL_ISSTATE(RL_STATE_CALLBACK))
+ {
+ _rl_interrupt_immediately = 0;
+ _rl_handle_signal (sig);
+ }
+ else
+ _rl_caught_signal = sig;
+
+ SIGHANDLER_RETURN;
+}
+
+static RETSIGTYPE
+_rl_handle_signal (sig)
+ int sig;
+{
+#if defined (HAVE_POSIX_SIGNALS)
+ sigset_t set;
+#else /* !HAVE_POSIX_SIGNALS */
+# if defined (HAVE_BSD_SIGNALS)
+ long omask;
+# else /* !HAVE_BSD_SIGNALS */
+ sighandler_cxt dummy_cxt; /* needed for rl_set_sighandler call */
+# endif /* !HAVE_BSD_SIGNALS */
+#endif /* !HAVE_POSIX_SIGNALS */
+
+ RL_SETSTATE(RL_STATE_SIGHANDLER);
+
+#if !defined (HAVE_BSD_SIGNALS) && !defined (HAVE_POSIX_SIGNALS)
+ /* Since the signal will not be blocked while we are in the signal
+ handler, ignore it until rl_clear_signals resets the catcher. */
+# if defined (SIGALRM)
+ if (sig == SIGINT || sig == SIGALRM)
+# else
+ if (sig == SIGINT)
+# endif
+ rl_set_sighandler (sig, SIG_IGN, &dummy_cxt);
+#endif /* !HAVE_BSD_SIGNALS && !HAVE_POSIX_SIGNALS */
+
+ switch (sig)
+ {
+ case SIGINT:
+ _rl_reset_completion_state ();
+ rl_free_line_state ();
+ /* FALLTHROUGH */
+
+ case SIGTERM:
+#if defined (SIGTSTP)
+ case SIGTSTP:
+ case SIGTTOU:
+ case SIGTTIN:
+#endif /* SIGTSTP */
+#if defined (SIGALRM)
+ case SIGALRM:
+#endif
+#if defined (SIGQUIT)
+ case SIGQUIT:
+#endif
+ rl_echo_signal_char (sig);
+ rl_cleanup_after_signal ();
+
+#if defined (HAVE_POSIX_SIGNALS)
+ sigemptyset (&set);
+ sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &set);
+ sigdelset (&set, sig);
+#else /* !HAVE_POSIX_SIGNALS */
+# if defined (HAVE_BSD_SIGNALS)
+ omask = sigblock (0);
+# endif /* HAVE_BSD_SIGNALS */
+#endif /* !HAVE_POSIX_SIGNALS */
+
+#if defined (__EMX__)
+ signal (sig, SIG_ACK);
+#endif
+
+#if defined (HAVE_KILL)
+ kill (getpid (), sig);
+#else
+ raise (sig); /* assume we have raise */
+#endif
+
+ /* Let the signal that we just sent through. */
+#if defined (HAVE_POSIX_SIGNALS)
+ sigprocmask (SIG_SETMASK, &set, (sigset_t *)NULL);
+#else /* !HAVE_POSIX_SIGNALS */
+# if defined (HAVE_BSD_SIGNALS)
+ sigsetmask (omask & ~(sigmask (sig)));
+# endif /* HAVE_BSD_SIGNALS */
+#endif /* !HAVE_POSIX_SIGNALS */
+
+ rl_reset_after_signal ();
+ }
+
+ RL_UNSETSTATE(RL_STATE_SIGHANDLER);
+ SIGHANDLER_RETURN;
+}
+
+#if defined (SIGWINCH)
+static RETSIGTYPE
+rl_sigwinch_handler (sig)
+ int sig;
+{
+ SigHandler *oh;
+
+#if defined (MUST_REINSTALL_SIGHANDLERS)
+ sighandler_cxt dummy_winch;
+
+ /* We don't want to change old_winch -- it holds the state of SIGWINCH
+ disposition set by the calling application. We need this state
+ because we call the application's SIGWINCH handler after updating
+ our own idea of the screen size. */
+ rl_set_sighandler (SIGWINCH, rl_sigwinch_handler, &dummy_winch);
+#endif
+
+ RL_SETSTATE(RL_STATE_SIGHANDLER);
+ rl_resize_terminal ();
+
+ /* If another sigwinch handler has been installed, call it. */
+ oh = (SigHandler *)old_winch.sa_handler;
+ if (oh && oh != (SigHandler *)SIG_IGN && oh != (SigHandler *)SIG_DFL)
+ (*oh) (sig);
+
+ RL_UNSETSTATE(RL_STATE_SIGHANDLER);
+ SIGHANDLER_RETURN;
+}
+#endif /* SIGWINCH */
+
+/* Functions to manage signal handling. */
+
+#if !defined (HAVE_POSIX_SIGNALS)
+static int
+rl_sigaction (sig, nh, oh)
+ int sig;
+ sighandler_cxt *nh, *oh;
+{
+ oh->sa_handler = signal (sig, nh->sa_handler);
+ return 0;
+}
+#endif /* !HAVE_POSIX_SIGNALS */
+
+/* Set up a readline-specific signal handler, saving the old signal
+ information in OHANDLER. Return the old signal handler, like
+ signal(). */
+static SigHandler *
+rl_set_sighandler (sig, handler, ohandler)
+ int sig;
+ SigHandler *handler;
+ sighandler_cxt *ohandler;
+{
+ sighandler_cxt old_handler;
+#if defined (HAVE_POSIX_SIGNALS)
+ struct sigaction act;
+
+ act.sa_handler = handler;
+# if defined (SIGWINCH)
+ act.sa_flags = (sig == SIGWINCH) ? SA_RESTART : 0;
+# else
+ act.sa_flags = 0;
+# endif /* SIGWINCH */
+ sigemptyset (&act.sa_mask);
+ sigemptyset (&ohandler->sa_mask);
+ sigaction (sig, &act, &old_handler);
+#else
+ old_handler.sa_handler = (SigHandler *)signal (sig, handler);
+#endif /* !HAVE_POSIX_SIGNALS */
+
+ /* XXX -- assume we have memcpy */
+ /* If rl_set_signals is called twice in a row, don't set the old handler to
+ rl_signal_handler, because that would cause infinite recursion. */
+ if (handler != rl_signal_handler || old_handler.sa_handler != rl_signal_handler)
+ memcpy (ohandler, &old_handler, sizeof (sighandler_cxt));
+
+ return (ohandler->sa_handler);
+}
+
+static void
+rl_maybe_set_sighandler (sig, handler, ohandler)
+ int sig;
+ SigHandler *handler;
+ sighandler_cxt *ohandler;
+{
+ sighandler_cxt dummy;
+ SigHandler *oh;
+
+ sigemptyset (&dummy.sa_mask);
+ oh = rl_set_sighandler (sig, handler, ohandler);
+ if (oh == (SigHandler *)SIG_IGN)
+ rl_sigaction (sig, ohandler, &dummy);
+}
+
+int
+rl_set_signals ()
+{
+ sighandler_cxt dummy;
+ SigHandler *oh;
+#if defined (HAVE_POSIX_SIGNALS)
+ static int sigmask_set = 0;
+ static sigset_t bset, oset;
+#endif
+
+#if defined (HAVE_POSIX_SIGNALS)
+ if (rl_catch_signals && sigmask_set == 0)
+ {
+ sigemptyset (&bset);
+
+ sigaddset (&bset, SIGINT);
+ sigaddset (&bset, SIGTERM);
+#if defined (SIGQUIT)
+ sigaddset (&bset, SIGQUIT);
+#endif
+#if defined (SIGALRM)
+ sigaddset (&bset, SIGALRM);
+#endif
+#if defined (SIGTSTP)
+ sigaddset (&bset, SIGTSTP);
+#endif
+#if defined (SIGTTIN)
+ sigaddset (&bset, SIGTTIN);
+#endif
+#if defined (SIGTTOU)
+ sigaddset (&bset, SIGTTOU);
+#endif
+ sigmask_set = 1;
+ }
+#endif /* HAVE_POSIX_SIGNALS */
+
+ if (rl_catch_signals && signals_set_flag == 0)
+ {
+#if defined (HAVE_POSIX_SIGNALS)
+ sigemptyset (&oset);
+ sigprocmask (SIG_BLOCK, &bset, &oset);
+#endif
+
+ rl_maybe_set_sighandler (SIGINT, rl_signal_handler, &old_int);
+ rl_maybe_set_sighandler (SIGTERM, rl_signal_handler, &old_term);
+#if defined (SIGQUIT)
+ rl_maybe_set_sighandler (SIGQUIT, rl_signal_handler, &old_quit);
+#endif
+
+#if defined (SIGALRM)
+ oh = rl_set_sighandler (SIGALRM, rl_signal_handler, &old_alrm);
+ if (oh == (SigHandler *)SIG_IGN)
+ rl_sigaction (SIGALRM, &old_alrm, &dummy);
+#if defined (HAVE_POSIX_SIGNALS) && defined (SA_RESTART)
+ /* If the application using readline has already installed a signal
+ handler with SA_RESTART, SIGALRM will cause reads to be restarted
+ automatically, so readline should just get out of the way. Since
+ we tested for SIG_IGN above, we can just test for SIG_DFL here. */
+ if (oh != (SigHandler *)SIG_DFL && (old_alrm.sa_flags & SA_RESTART))
+ rl_sigaction (SIGALRM, &old_alrm, &dummy);
+#endif /* HAVE_POSIX_SIGNALS */
+#endif /* SIGALRM */
+
+#if defined (SIGTSTP)
+ rl_maybe_set_sighandler (SIGTSTP, rl_signal_handler, &old_tstp);
+#endif /* SIGTSTP */
+
+#if defined (SIGTTOU)
+ rl_maybe_set_sighandler (SIGTTOU, rl_signal_handler, &old_ttou);
+#endif /* SIGTTOU */
+
+#if defined (SIGTTIN)
+ rl_maybe_set_sighandler (SIGTTIN, rl_signal_handler, &old_ttin);
+#endif /* SIGTTIN */
+
+ signals_set_flag = 1;
+
+#if defined (HAVE_POSIX_SIGNALS)
+ sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL);
+#endif
+ }
+
+#if defined (SIGWINCH)
+ if (rl_catch_sigwinch && sigwinch_set_flag == 0)
+ {
+ rl_maybe_set_sighandler (SIGWINCH, rl_sigwinch_handler, &old_winch);
+ sigwinch_set_flag = 1;
+ }
+#endif /* SIGWINCH */
+
+ return 0;
+}
+
+int
+rl_clear_signals ()
+{
+ sighandler_cxt dummy;
+
+ if (rl_catch_signals && signals_set_flag == 1)
+ {
+ sigemptyset (&dummy.sa_mask);
+
+ rl_sigaction (SIGINT, &old_int, &dummy);
+ rl_sigaction (SIGTERM, &old_term, &dummy);
+#if defined (SIGQUIT)
+ rl_sigaction (SIGQUIT, &old_quit, &dummy);
+#endif
+#if defined (SIGALRM)
+ rl_sigaction (SIGALRM, &old_alrm, &dummy);
+#endif
+
+#if defined (SIGTSTP)
+ rl_sigaction (SIGTSTP, &old_tstp, &dummy);
+#endif /* SIGTSTP */
+
+#if defined (SIGTTOU)
+ rl_sigaction (SIGTTOU, &old_ttou, &dummy);
+#endif /* SIGTTOU */
+
+#if defined (SIGTTIN)
+ rl_sigaction (SIGTTIN, &old_ttin, &dummy);
+#endif /* SIGTTIN */
+
+ signals_set_flag = 0;
+ }
+
+#if defined (SIGWINCH)
+ if (rl_catch_sigwinch && sigwinch_set_flag == 1)
+ {
+ sigemptyset (&dummy.sa_mask);
+ rl_sigaction (SIGWINCH, &old_winch, &dummy);
+ sigwinch_set_flag = 0;
+ }
+#endif
+
+ return 0;
+}
+
+/* Clean up the terminal and readline state after catching a signal, before
+ resending it to the calling application. */
+void
+rl_cleanup_after_signal ()
+{
+ _rl_clean_up_for_exit ();
+ if (rl_deprep_term_function)
+ (*rl_deprep_term_function) ();
+ rl_clear_pending_input ();
+ rl_clear_signals ();
+}
+
+/* Reset the terminal and readline state after a signal handler returns. */
+void
+rl_reset_after_signal ()
+{
+ if (rl_prep_term_function)
+ (*rl_prep_term_function) (_rl_meta_flag);
+ rl_set_signals ();
+}
+
+/* Free up the readline variable line state for the current line (undo list,
+ any partial history entry, any keyboard macros in progress, and any
+ numeric arguments in process) after catching a signal, before calling
+ rl_cleanup_after_signal(). */
+void
+rl_free_line_state ()
+{
+ register HIST_ENTRY *entry;
+
+ rl_free_undo_list ();
+
+ entry = current_history ();
+ if (entry)
+ entry->data = (char *)NULL;
+
+ _rl_kill_kbd_macro ();
+ rl_clear_message ();
+ _rl_reset_argument ();
+}
+
+#endif /* HANDLE_SIGNALS */
+
+/* **************************************************************** */
+/* */
+/* SIGINT Management */
+/* */
+/* **************************************************************** */
+
+#if defined (HAVE_POSIX_SIGNALS)
+static sigset_t sigint_set, sigint_oset;
+static sigset_t sigwinch_set, sigwinch_oset;
+#else /* !HAVE_POSIX_SIGNALS */
+# if defined (HAVE_BSD_SIGNALS)
+static int sigint_oldmask;
+static int sigwinch_oldmask;
+# endif /* HAVE_BSD_SIGNALS */
+#endif /* !HAVE_POSIX_SIGNALS */
+
+static int sigint_blocked;
+static int sigwinch_blocked;
+
+/* Cause SIGINT to not be delivered until the corresponding call to
+ release_sigint(). */
+void
+_rl_block_sigint ()
+{
+ if (sigint_blocked)
+ return;
+
+#if defined (HAVE_POSIX_SIGNALS)
+ sigemptyset (&sigint_set);
+ sigemptyset (&sigint_oset);
+ sigaddset (&sigint_set, SIGINT);
+ sigprocmask (SIG_BLOCK, &sigint_set, &sigint_oset);
+#else /* !HAVE_POSIX_SIGNALS */
+# if defined (HAVE_BSD_SIGNALS)
+ sigint_oldmask = sigblock (sigmask (SIGINT));
+# else /* !HAVE_BSD_SIGNALS */
+# if defined (HAVE_USG_SIGHOLD)
+ sighold (SIGINT);
+# endif /* HAVE_USG_SIGHOLD */
+# endif /* !HAVE_BSD_SIGNALS */
+#endif /* !HAVE_POSIX_SIGNALS */
+
+ sigint_blocked = 1;
+}
+
+/* Allow SIGINT to be delivered. */
+void
+_rl_release_sigint ()
+{
+ if (sigint_blocked == 0)
+ return;
+
+#if defined (HAVE_POSIX_SIGNALS)
+ sigprocmask (SIG_SETMASK, &sigint_oset, (sigset_t *)NULL);
+#else
+# if defined (HAVE_BSD_SIGNALS)
+ sigsetmask (sigint_oldmask);
+# else /* !HAVE_BSD_SIGNALS */
+# if defined (HAVE_USG_SIGHOLD)
+ sigrelse (SIGINT);
+# endif /* HAVE_USG_SIGHOLD */
+# endif /* !HAVE_BSD_SIGNALS */
+#endif /* !HAVE_POSIX_SIGNALS */
+
+ sigint_blocked = 0;
+}
+
+/* Cause SIGWINCH to not be delivered until the corresponding call to
+ release_sigwinch(). */
+void
+_rl_block_sigwinch ()
+{
+ if (sigwinch_blocked)
+ return;
+
+#if defined (HAVE_POSIX_SIGNALS)
+ sigemptyset (&sigwinch_set);
+ sigemptyset (&sigwinch_oset);
+ sigaddset (&sigwinch_set, SIGWINCH);
+ sigprocmask (SIG_BLOCK, &sigwinch_set, &sigwinch_oset);
+#else /* !HAVE_POSIX_SIGNALS */
+# if defined (HAVE_BSD_SIGNALS)
+ sigwinch_oldmask = sigblock (sigmask (SIGWINCH));
+# else /* !HAVE_BSD_SIGNALS */
+# if defined (HAVE_USG_SIGHOLD)
+ sighold (SIGWINCH);
+# endif /* HAVE_USG_SIGHOLD */
+# endif /* !HAVE_BSD_SIGNALS */
+#endif /* !HAVE_POSIX_SIGNALS */
+
+ sigwinch_blocked = 1;
+}
+
+/* Allow SIGWINCH to be delivered. */
+void
+_rl_release_sigwinch ()
+{
+ if (sigwinch_blocked == 0)
+ return;
+
+#if defined (HAVE_POSIX_SIGNALS)
+ sigprocmask (SIG_SETMASK, &sigwinch_oset, (sigset_t *)NULL);
+#else
+# if defined (HAVE_BSD_SIGNALS)
+ sigsetmask (sigwinch_oldmask);
+# else /* !HAVE_BSD_SIGNALS */
+# if defined (HAVE_USG_SIGHOLD)
+ sigrelse (SIGWINCH);
+# endif /* HAVE_USG_SIGHOLD */
+# endif /* !HAVE_BSD_SIGNALS */
+#endif /* !HAVE_POSIX_SIGNALS */
+
+ sigwinch_blocked = 0;
+}
+
+/* **************************************************************** */
+/* */
+/* Echoing special control characters */
+/* */
+/* **************************************************************** */
+void
+rl_echo_signal_char (sig)
+ int sig;
+{
+ char cstr[3];
+ int cslen, c;
+
+ if (_rl_echoctl == 0 || _rl_echo_control_chars == 0)
+ return;
+
+ switch (sig)
+ {
+ case SIGINT: c = _rl_intr_char; break;
+#if defined (SIGQUIT)
+ case SIGQUIT: c = _rl_quit_char; break;
+#endif
+#if defined (SIGTSTP)
+ case SIGTSTP: c = _rl_susp_char; break;
+#endif
+ default: return;
+ }
+
+ if (CTRL_CHAR (c) || c == RUBOUT)
+ {
+ cstr[0] = '^';
+ cstr[1] = CTRL_CHAR (c) ? UNCTRL (c) : '?';
+ cstr[cslen = 2] = '\0';
+ }
+ else
+ {
+ cstr[0] = c;
+ cstr[cslen = 1] = '\0';
+ }
+
+ _rl_output_some_chars (cstr, cslen);
+}
diff --git a/lib/readline/tcap.h b/lib/readline/tcap.h
new file mode 100644
index 0000000..9d09b7a
--- /dev/null
+++ b/lib/readline/tcap.h
@@ -0,0 +1,58 @@
+/* tcap.h -- termcap library functions and variables. */
+
+/* Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_RLTCAP_H_)
+#define _RLTCAP_H_
+
+#if defined (HAVE_CONFIG_H)
+# include "config.h"
+#endif
+
+#if defined (HAVE_TERMCAP_H)
+# if defined (__linux__) && !defined (SPEED_T_IN_SYS_TYPES)
+# include "rltty.h"
+# endif
+# include <termcap.h>
+#else
+
+/* On Solaris2, sys/types.h #includes sys/reg.h, which #defines PC.
+ Unfortunately, PC is a global variable used by the termcap library. */
+#ifdef PC
+# undef PC
+#endif
+
+extern char PC;
+extern char *UP, *BC;
+
+extern short ospeed;
+
+extern int tgetent ();
+extern int tgetflag ();
+extern int tgetnum ();
+extern char *tgetstr ();
+
+extern int tputs ();
+
+extern char *tgoto ();
+
+#endif /* HAVE_TERMCAP_H */
+
+#endif /* !_RLTCAP_H_ */
diff --git a/lib/readline/terminal.c b/lib/readline/terminal.c
new file mode 100644
index 0000000..ee13092
--- /dev/null
+++ b/lib/readline/terminal.c
@@ -0,0 +1,731 @@
+/* terminal.c -- controlling the terminal with termcap. */
+
+/* Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#include "posixstat.h"
+#include <fcntl.h>
+#if defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif /* HAVE_SYS_FILE_H */
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#if defined (HAVE_LOCALE_H)
+# include <locale.h>
+#endif
+
+#include <stdio.h>
+
+/* System-specific feature definitions and include files. */
+#include "rldefs.h"
+
+#if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ)
+# include <sys/ioctl.h>
+#endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */
+
+#include "rltty.h"
+#include "tcap.h"
+
+/* Some standard library routines. */
+#include "readline.h"
+#include "history.h"
+
+#include "rlprivate.h"
+#include "rlshell.h"
+#include "xmalloc.h"
+
+#if defined (__MINGW32__)
+# include <windows.h>
+# include <wincon.h>
+
+static void _win_get_screensize PARAMS((int *, int *));
+#endif
+
+#if defined (__EMX__)
+static void _emx_get_screensize PARAMS((int *, int *));
+#endif
+
+#define CUSTOM_REDISPLAY_FUNC() (rl_redisplay_function != rl_redisplay)
+#define CUSTOM_INPUT_FUNC() (rl_getc_function != rl_getc)
+
+/* If the calling application sets this to a non-zero value, readline will
+ use the $LINES and $COLUMNS environment variables to set its idea of the
+ window size before interrogating the kernel. */
+int rl_prefer_env_winsize = 0;
+
+/* **************************************************************** */
+/* */
+/* Terminal and Termcap */
+/* */
+/* **************************************************************** */
+
+static char *term_buffer = (char *)NULL;
+static char *term_string_buffer = (char *)NULL;
+
+static int tcap_initialized;
+
+#if !defined (__linux__)
+# if defined (__EMX__) || defined (NEED_EXTERN_PC)
+extern
+# endif /* __EMX__ || NEED_EXTERN_PC */
+char PC, *BC, *UP;
+#endif /* __linux__ */
+
+/* Some strings to control terminal actions. These are output by tputs (). */
+char *_rl_term_clreol;
+char *_rl_term_clrpag;
+char *_rl_term_cr;
+char *_rl_term_backspace;
+char *_rl_term_goto;
+char *_rl_term_pc;
+
+/* Non-zero if we determine that the terminal can do character insertion. */
+int _rl_terminal_can_insert = 0;
+
+/* How to insert characters. */
+char *_rl_term_im;
+char *_rl_term_ei;
+char *_rl_term_ic;
+char *_rl_term_ip;
+char *_rl_term_IC;
+
+/* How to delete characters. */
+char *_rl_term_dc;
+char *_rl_term_DC;
+
+char *_rl_term_forward_char;
+
+/* How to go up a line. */
+char *_rl_term_up;
+
+/* A visible bell; char if the terminal can be made to flash the screen. */
+static char *_rl_visible_bell;
+
+/* Non-zero means the terminal can auto-wrap lines. */
+int _rl_term_autowrap = -1;
+
+/* Non-zero means that this terminal has a meta key. */
+static int term_has_meta;
+
+/* The sequences to write to turn on and off the meta key, if this
+ terminal has one. */
+static char *_rl_term_mm;
+static char *_rl_term_mo;
+
+/* The key sequences output by the arrow keys, if this terminal has any. */
+static char *_rl_term_ku;
+static char *_rl_term_kd;
+static char *_rl_term_kr;
+static char *_rl_term_kl;
+
+/* How to initialize and reset the arrow keys, if this terminal has any. */
+static char *_rl_term_ks;
+static char *_rl_term_ke;
+
+/* The key sequences sent by the Home and End keys, if any. */
+static char *_rl_term_kh;
+static char *_rl_term_kH;
+static char *_rl_term_at7; /* @7 */
+
+/* Delete key */
+static char *_rl_term_kD;
+
+/* Insert key */
+static char *_rl_term_kI;
+
+/* Cursor control */
+static char *_rl_term_vs; /* very visible */
+static char *_rl_term_ve; /* normal */
+
+static void bind_termcap_arrow_keys PARAMS((Keymap));
+
+/* Variables that hold the screen dimensions, used by the display code. */
+int _rl_screenwidth, _rl_screenheight, _rl_screenchars;
+
+/* Non-zero means the user wants to enable the keypad. */
+int _rl_enable_keypad;
+
+/* Non-zero means the user wants to enable a meta key. */
+int _rl_enable_meta = 1;
+
+#if defined (__EMX__)
+static void
+_emx_get_screensize (swp, shp)
+ int *swp, *shp;
+{
+ int sz[2];
+
+ _scrsize (sz);
+
+ if (swp)
+ *swp = sz[0];
+ if (shp)
+ *shp = sz[1];
+}
+#endif
+
+#if defined (__MINGW32__)
+static void
+_win_get_screensize (swp, shp)
+ int *swp, *shp;
+{
+ HANDLE hConOut;
+ CONSOLE_SCREEN_BUFFER_INFO scr;
+
+ hConOut = GetStdHandle (STD_OUTPUT_HANDLE);
+ if (hConOut != INVALID_HANDLE_VALUE)
+ {
+ if (GetConsoleScreenBufferInfo (hConOut, &scr))
+ {
+ *swp = scr.dwSize.X;
+ *shp = scr.srWindow.Bottom - scr.srWindow.Top + 1;
+ }
+ }
+}
+#endif
+
+/* Get readline's idea of the screen size. TTY is a file descriptor open
+ to the terminal. If IGNORE_ENV is true, we do not pay attention to the
+ values of $LINES and $COLUMNS. The tests for TERM_STRING_BUFFER being
+ non-null serve to check whether or not we have initialized termcap. */
+void
+_rl_get_screen_size (tty, ignore_env)
+ int tty, ignore_env;
+{
+ char *ss;
+#if defined (TIOCGWINSZ)
+ struct winsize window_size;
+#endif /* TIOCGWINSZ */
+ int wr, wc;
+
+ wr = wc = -1;
+#if defined (TIOCGWINSZ)
+ if (ioctl (tty, TIOCGWINSZ, &window_size) == 0)
+ {
+ wc = (int) window_size.ws_col;
+ wr = (int) window_size.ws_row;
+ }
+#endif /* TIOCGWINSZ */
+
+#if defined (__EMX__)
+ _emx_get_screensize (&wc, &wr);
+#elif defined (__MINGW32__)
+ _win_get_screensize (&wc, &wr);
+#endif
+
+ if (ignore_env || rl_prefer_env_winsize == 0)
+ {
+ _rl_screenwidth = wc;
+ _rl_screenheight = wr;
+ }
+ else
+ _rl_screenwidth = _rl_screenheight = -1;
+
+ /* Environment variable COLUMNS overrides setting of "co" if IGNORE_ENV
+ is unset. If we prefer the environment, check it first before
+ assigning the value returned by the kernel. */
+ if (_rl_screenwidth <= 0)
+ {
+ if (ignore_env == 0 && (ss = sh_get_env_value ("COLUMNS")))
+ _rl_screenwidth = atoi (ss);
+
+ if (_rl_screenwidth <= 0)
+ _rl_screenwidth = wc;
+
+#if !defined (__DJGPP__)
+ if (_rl_screenwidth <= 0 && term_string_buffer)
+ _rl_screenwidth = tgetnum ("co");
+#endif
+ }
+
+ /* Environment variable LINES overrides setting of "li" if IGNORE_ENV
+ is unset. */
+ if (_rl_screenheight <= 0)
+ {
+ if (ignore_env == 0 && (ss = sh_get_env_value ("LINES")))
+ _rl_screenheight = atoi (ss);
+
+ if (_rl_screenheight <= 0)
+ _rl_screenheight = wr;
+
+#if !defined (__DJGPP__)
+ if (_rl_screenheight <= 0 && term_string_buffer)
+ _rl_screenheight = tgetnum ("li");
+#endif
+ }
+
+ /* If all else fails, default to 80x24 terminal. */
+ if (_rl_screenwidth <= 1)
+ _rl_screenwidth = 80;
+
+ if (_rl_screenheight <= 0)
+ _rl_screenheight = 24;
+
+ /* If we're being compiled as part of bash, set the environment
+ variables $LINES and $COLUMNS to new values. Otherwise, just
+ do a pair of putenv () or setenv () calls. */
+ sh_set_lines_and_columns (_rl_screenheight, _rl_screenwidth);
+
+ if (_rl_term_autowrap == 0)
+ _rl_screenwidth--;
+
+ _rl_screenchars = _rl_screenwidth * _rl_screenheight;
+}
+
+void
+_rl_set_screen_size (rows, cols)
+ int rows, cols;
+{
+ if (_rl_term_autowrap == -1)
+ _rl_init_terminal_io (rl_terminal_name);
+
+ if (rows > 0)
+ _rl_screenheight = rows;
+ if (cols > 0)
+ {
+ _rl_screenwidth = cols;
+ if (_rl_term_autowrap == 0)
+ _rl_screenwidth--;
+ }
+
+ if (rows > 0 || cols > 0)
+ _rl_screenchars = _rl_screenwidth * _rl_screenheight;
+}
+
+void
+rl_set_screen_size (rows, cols)
+ int rows, cols;
+{
+ _rl_set_screen_size (rows, cols);
+}
+
+void
+rl_get_screen_size (rows, cols)
+ int *rows, *cols;
+{
+ if (rows)
+ *rows = _rl_screenheight;
+ if (cols)
+ *cols = _rl_screenwidth;
+}
+
+void
+rl_reset_screen_size ()
+{
+ _rl_get_screen_size (fileno (rl_instream), 0);
+}
+
+void
+rl_resize_terminal ()
+{
+ if (_rl_echoing_p)
+ {
+ _rl_get_screen_size (fileno (rl_instream), 1);
+ if (CUSTOM_REDISPLAY_FUNC ())
+ rl_forced_update_display ();
+ else if (RL_ISSTATE(RL_STATE_REDISPLAYING) == 0)
+ _rl_redisplay_after_sigwinch ();
+ }
+}
+
+struct _tc_string {
+ const char * const tc_var;
+ char **tc_value;
+};
+
+/* This should be kept sorted, just in case we decide to change the
+ search algorithm to something smarter. */
+static const struct _tc_string tc_strings[] =
+{
+ { "@7", &_rl_term_at7 },
+ { "DC", &_rl_term_DC },
+ { "IC", &_rl_term_IC },
+ { "ce", &_rl_term_clreol },
+ { "cl", &_rl_term_clrpag },
+ { "cr", &_rl_term_cr },
+ { "dc", &_rl_term_dc },
+ { "ei", &_rl_term_ei },
+ { "ic", &_rl_term_ic },
+ { "im", &_rl_term_im },
+ { "kD", &_rl_term_kD }, /* delete */
+ { "kH", &_rl_term_kH }, /* home down ?? */
+ { "kI", &_rl_term_kI }, /* insert */
+ { "kd", &_rl_term_kd },
+ { "ke", &_rl_term_ke }, /* end keypad mode */
+ { "kh", &_rl_term_kh }, /* home */
+ { "kl", &_rl_term_kl },
+ { "kr", &_rl_term_kr },
+ { "ks", &_rl_term_ks }, /* start keypad mode */
+ { "ku", &_rl_term_ku },
+ { "le", &_rl_term_backspace },
+ { "mm", &_rl_term_mm },
+ { "mo", &_rl_term_mo },
+ { "nd", &_rl_term_forward_char },
+ { "pc", &_rl_term_pc },
+ { "up", &_rl_term_up },
+ { "vb", &_rl_visible_bell },
+ { "vs", &_rl_term_vs },
+ { "ve", &_rl_term_ve },
+};
+
+#define NUM_TC_STRINGS (sizeof (tc_strings) / sizeof (struct _tc_string))
+
+/* Read the desired terminal capability strings into BP. The capabilities
+ are described in the TC_STRINGS table. */
+static void
+get_term_capabilities (bp)
+ char **bp;
+{
+#if !defined (__DJGPP__) /* XXX - doesn't DJGPP have a termcap library? */
+ register int i;
+
+ for (i = 0; i < NUM_TC_STRINGS; i++)
+ *(tc_strings[i].tc_value) = tgetstr ((char *)tc_strings[i].tc_var, bp);
+#endif
+ tcap_initialized = 1;
+}
+
+int
+_rl_init_terminal_io (terminal_name)
+ const char *terminal_name;
+{
+ const char *term;
+ char *buffer;
+ int tty, tgetent_ret;
+
+ term = terminal_name ? terminal_name : sh_get_env_value ("TERM");
+ _rl_term_clrpag = _rl_term_cr = _rl_term_clreol = (char *)NULL;
+ tty = rl_instream ? fileno (rl_instream) : 0;
+
+ if (term == 0)
+ term = "dumb";
+
+ /* I've separated this out for later work on not calling tgetent at all
+ if the calling application has supplied a custom redisplay function,
+ (and possibly if the application has supplied a custom input function). */
+ if (CUSTOM_REDISPLAY_FUNC())
+ {
+ tgetent_ret = -1;
+ }
+ else
+ {
+ if (term_string_buffer == 0)
+ term_string_buffer = (char *)xmalloc(2032);
+
+ if (term_buffer == 0)
+ term_buffer = (char *)xmalloc(4080);
+
+ buffer = term_string_buffer;
+
+ tgetent_ret = tgetent (term_buffer, term);
+ }
+
+ if (tgetent_ret <= 0)
+ {
+ FREE (term_string_buffer);
+ FREE (term_buffer);
+ buffer = term_buffer = term_string_buffer = (char *)NULL;
+
+ _rl_term_autowrap = 0; /* used by _rl_get_screen_size */
+
+ /* Allow calling application to set default height and width, using
+ rl_set_screen_size */
+ if (_rl_screenwidth <= 0 || _rl_screenheight <= 0)
+ {
+#if defined (__EMX__)
+ _emx_get_screensize (&_rl_screenwidth, &_rl_screenheight);
+ _rl_screenwidth--;
+#else /* !__EMX__ */
+ _rl_get_screen_size (tty, 0);
+#endif /* !__EMX__ */
+ }
+
+ /* Defaults. */
+ if (_rl_screenwidth <= 0 || _rl_screenheight <= 0)
+ {
+ _rl_screenwidth = 79;
+ _rl_screenheight = 24;
+ }
+
+ /* Everything below here is used by the redisplay code (tputs). */
+ _rl_screenchars = _rl_screenwidth * _rl_screenheight;
+ _rl_term_cr = "\r";
+ _rl_term_im = _rl_term_ei = _rl_term_ic = _rl_term_IC = (char *)NULL;
+ _rl_term_up = _rl_term_dc = _rl_term_DC = _rl_visible_bell = (char *)NULL;
+ _rl_term_ku = _rl_term_kd = _rl_term_kl = _rl_term_kr = (char *)NULL;
+ _rl_term_kh = _rl_term_kH = _rl_term_kI = _rl_term_kD = (char *)NULL;
+ _rl_term_ks = _rl_term_ke = _rl_term_at7 = (char *)NULL;
+ _rl_term_mm = _rl_term_mo = (char *)NULL;
+ _rl_term_ve = _rl_term_vs = (char *)NULL;
+ _rl_term_forward_char = (char *)NULL;
+ _rl_terminal_can_insert = term_has_meta = 0;
+
+ /* Reasonable defaults for tgoto(). Readline currently only uses
+ tgoto if _rl_term_IC or _rl_term_DC is defined, but just in case we
+ change that later... */
+ PC = '\0';
+ BC = _rl_term_backspace = "\b";
+ UP = _rl_term_up;
+
+ return 0;
+ }
+
+ get_term_capabilities (&buffer);
+
+ /* Set up the variables that the termcap library expects the application
+ to provide. */
+ PC = _rl_term_pc ? *_rl_term_pc : 0;
+ BC = _rl_term_backspace;
+ UP = _rl_term_up;
+
+ if (!_rl_term_cr)
+ _rl_term_cr = "\r";
+
+ _rl_term_autowrap = tgetflag ("am") && tgetflag ("xn");
+
+ /* Allow calling application to set default height and width, using
+ rl_set_screen_size */
+ if (_rl_screenwidth <= 0 || _rl_screenheight <= 0)
+ _rl_get_screen_size (tty, 0);
+
+ /* "An application program can assume that the terminal can do
+ character insertion if *any one of* the capabilities `IC',
+ `im', `ic' or `ip' is provided." But we can't do anything if
+ only `ip' is provided, so... */
+ _rl_terminal_can_insert = (_rl_term_IC || _rl_term_im || _rl_term_ic);
+
+ /* Check to see if this terminal has a meta key and clear the capability
+ variables if there is none. */
+ term_has_meta = tgetflag ("km") != 0;
+ if (term_has_meta == 0)
+ _rl_term_mm = _rl_term_mo = (char *)NULL;
+
+ /* Attempt to find and bind the arrow keys. Do not override already
+ bound keys in an overzealous attempt, however. */
+
+ bind_termcap_arrow_keys (emacs_standard_keymap);
+
+#if defined (VI_MODE)
+ bind_termcap_arrow_keys (vi_movement_keymap);
+ bind_termcap_arrow_keys (vi_insertion_keymap);
+#endif /* VI_MODE */
+
+ return 0;
+}
+
+/* Bind the arrow key sequences from the termcap description in MAP. */
+static void
+bind_termcap_arrow_keys (map)
+ Keymap map;
+{
+ Keymap xkeymap;
+
+ xkeymap = _rl_keymap;
+ _rl_keymap = map;
+
+ rl_bind_keyseq_if_unbound (_rl_term_ku, rl_get_previous_history);
+ rl_bind_keyseq_if_unbound (_rl_term_kd, rl_get_next_history);
+ rl_bind_keyseq_if_unbound (_rl_term_kr, rl_forward_char);
+ rl_bind_keyseq_if_unbound (_rl_term_kl, rl_backward_char);
+
+ rl_bind_keyseq_if_unbound (_rl_term_kh, rl_beg_of_line); /* Home */
+ rl_bind_keyseq_if_unbound (_rl_term_at7, rl_end_of_line); /* End */
+
+ rl_bind_keyseq_if_unbound (_rl_term_kD, rl_delete);
+
+ _rl_keymap = xkeymap;
+}
+
+char *
+rl_get_termcap (cap)
+ const char *cap;
+{
+ register int i;
+
+ if (tcap_initialized == 0)
+ return ((char *)NULL);
+ for (i = 0; i < NUM_TC_STRINGS; i++)
+ {
+ if (tc_strings[i].tc_var[0] == cap[0] && strcmp (tc_strings[i].tc_var, cap) == 0)
+ return *(tc_strings[i].tc_value);
+ }
+ return ((char *)NULL);
+}
+
+/* Re-initialize the terminal considering that the TERM/TERMCAP variable
+ has changed. */
+int
+rl_reset_terminal (terminal_name)
+ const char *terminal_name;
+{
+ _rl_screenwidth = _rl_screenheight = 0;
+ _rl_init_terminal_io (terminal_name);
+ return 0;
+}
+
+/* A function for the use of tputs () */
+#ifdef _MINIX
+void
+_rl_output_character_function (c)
+ int c;
+{
+ putc (c, _rl_out_stream);
+}
+#else /* !_MINIX */
+int
+_rl_output_character_function (c)
+ int c;
+{
+ return putc (c, _rl_out_stream);
+}
+#endif /* !_MINIX */
+
+/* Write COUNT characters from STRING to the output stream. */
+void
+_rl_output_some_chars (string, count)
+ const char *string;
+ int count;
+{
+ fwrite (string, 1, count, _rl_out_stream);
+}
+
+/* Move the cursor back. */
+int
+_rl_backspace (count)
+ int count;
+{
+ register int i;
+
+ if (_rl_term_backspace)
+ for (i = 0; i < count; i++)
+ tputs (_rl_term_backspace, 1, _rl_output_character_function);
+ else
+ for (i = 0; i < count; i++)
+ putc ('\b', _rl_out_stream);
+ return 0;
+}
+
+/* Move to the start of the next line. */
+int
+rl_crlf ()
+{
+#if defined (NEW_TTY_DRIVER) || defined (__MINT__)
+ if (_rl_term_cr)
+ tputs (_rl_term_cr, 1, _rl_output_character_function);
+#endif /* NEW_TTY_DRIVER || __MINT__ */
+ putc ('\n', _rl_out_stream);
+ return 0;
+}
+
+/* Ring the terminal bell. */
+int
+rl_ding ()
+{
+ if (_rl_echoing_p)
+ {
+ switch (_rl_bell_preference)
+ {
+ case NO_BELL:
+ default:
+ break;
+ case VISIBLE_BELL:
+ if (_rl_visible_bell)
+ {
+ tputs (_rl_visible_bell, 1, _rl_output_character_function);
+ break;
+ }
+ /* FALLTHROUGH */
+ case AUDIBLE_BELL:
+ fprintf (stderr, "\007");
+ fflush (stderr);
+ break;
+ }
+ return (0);
+ }
+ return (-1);
+}
+
+/* **************************************************************** */
+/* */
+/* Controlling the Meta Key and Keypad */
+/* */
+/* **************************************************************** */
+
+void
+_rl_enable_meta_key ()
+{
+#if !defined (__DJGPP__)
+ if (term_has_meta && _rl_term_mm)
+ tputs (_rl_term_mm, 1, _rl_output_character_function);
+#endif
+}
+
+void
+_rl_control_keypad (on)
+ int on;
+{
+#if !defined (__DJGPP__)
+ if (on && _rl_term_ks)
+ tputs (_rl_term_ks, 1, _rl_output_character_function);
+ else if (!on && _rl_term_ke)
+ tputs (_rl_term_ke, 1, _rl_output_character_function);
+#endif
+}
+
+/* **************************************************************** */
+/* */
+/* Controlling the Cursor */
+/* */
+/* **************************************************************** */
+
+/* Set the cursor appropriately depending on IM, which is one of the
+ insert modes (insert or overwrite). Insert mode gets the normal
+ cursor. Overwrite mode gets a very visible cursor. Only does
+ anything if we have both capabilities. */
+void
+_rl_set_cursor (im, force)
+ int im, force;
+{
+ if (_rl_term_ve && _rl_term_vs)
+ {
+ if (force || im != rl_insert_mode)
+ {
+ if (im == RL_IM_OVERWRITE)
+ tputs (_rl_term_vs, 1, _rl_output_character_function);
+ else
+ tputs (_rl_term_ve, 1, _rl_output_character_function);
+ }
+ }
+}
diff --git a/lib/readline/text.c b/lib/readline/text.c
new file mode 100644
index 0000000..fc39189
--- /dev/null
+++ b/lib/readline/text.c
@@ -0,0 +1,1679 @@
+/* text.c -- text handling commands for readline. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#if defined (HAVE_LOCALE_H)
+# include <locale.h>
+#endif
+
+#include <stdio.h>
+
+/* System-specific feature definitions and include files. */
+#include "rldefs.h"
+#include "rlmbutil.h"
+
+#if defined (__EMX__)
+# define INCL_DOSPROCESS
+# include <os2.h>
+#endif /* __EMX__ */
+
+/* Some standard library routines. */
+#include "readline.h"
+#include "history.h"
+
+#include "rlprivate.h"
+#include "rlshell.h"
+#include "xmalloc.h"
+
+/* Forward declarations. */
+static int rl_change_case PARAMS((int, int));
+static int _rl_char_search PARAMS((int, int, int));
+
+#if defined (READLINE_CALLBACKS)
+static int _rl_insert_next_callback PARAMS((_rl_callback_generic_arg *));
+static int _rl_char_search_callback PARAMS((_rl_callback_generic_arg *));
+#endif
+
+/* The largest chunk of text that can be inserted in one call to
+ rl_insert_text. Text blocks larger than this are divided. */
+#define TEXT_COUNT_MAX 1024
+
+/* **************************************************************** */
+/* */
+/* Insert and Delete */
+/* */
+/* **************************************************************** */
+
+/* Insert a string of text into the line at point. This is the only
+ way that you should do insertion. _rl_insert_char () calls this
+ function. Returns the number of characters inserted. */
+int
+rl_insert_text (string)
+ const char *string;
+{
+ register int i, l;
+
+ l = (string && *string) ? strlen (string) : 0;
+ if (l == 0)
+ return 0;
+
+ if (rl_end + l >= rl_line_buffer_len)
+ rl_extend_line_buffer (rl_end + l);
+
+ for (i = rl_end; i >= rl_point; i--)
+ rl_line_buffer[i + l] = rl_line_buffer[i];
+ strncpy (rl_line_buffer + rl_point, string, l);
+
+ /* Remember how to undo this if we aren't undoing something. */
+ if (_rl_doing_an_undo == 0)
+ {
+ /* If possible and desirable, concatenate the undos. */
+ if ((l == 1) &&
+ rl_undo_list &&
+ (rl_undo_list->what == UNDO_INSERT) &&
+ (rl_undo_list->end == rl_point) &&
+ (rl_undo_list->end - rl_undo_list->start < 20))
+ rl_undo_list->end++;
+ else
+ rl_add_undo (UNDO_INSERT, rl_point, rl_point + l, (char *)NULL);
+ }
+ rl_point += l;
+ rl_end += l;
+ rl_line_buffer[rl_end] = '\0';
+ return l;
+}
+
+/* Delete the string between FROM and TO. FROM is inclusive, TO is not.
+ Returns the number of characters deleted. */
+int
+rl_delete_text (from, to)
+ int from, to;
+{
+ register char *text;
+ register int diff, i;
+
+ /* Fix it if the caller is confused. */
+ if (from > to)
+ SWAP (from, to);
+
+ /* fix boundaries */
+ if (to > rl_end)
+ {
+ to = rl_end;
+ if (from > to)
+ from = to;
+ }
+ if (from < 0)
+ from = 0;
+
+ text = rl_copy_text (from, to);
+
+ /* Some versions of strncpy() can't handle overlapping arguments. */
+ diff = to - from;
+ for (i = from; i < rl_end - diff; i++)
+ rl_line_buffer[i] = rl_line_buffer[i + diff];
+
+ /* Remember how to undo this delete. */
+ if (_rl_doing_an_undo == 0)
+ rl_add_undo (UNDO_DELETE, from, to, text);
+ else
+ free (text);
+
+ rl_end -= diff;
+ rl_line_buffer[rl_end] = '\0';
+ return (diff);
+}
+
+/* Fix up point so that it is within the line boundaries after killing
+ text. If FIX_MARK_TOO is non-zero, the mark is forced within line
+ boundaries also. */
+
+#define _RL_FIX_POINT(x) \
+ do { \
+ if (x > rl_end) \
+ x = rl_end; \
+ else if (x < 0) \
+ x = 0; \
+ } while (0)
+
+void
+_rl_fix_point (fix_mark_too)
+ int fix_mark_too;
+{
+ _RL_FIX_POINT (rl_point);
+ if (fix_mark_too)
+ _RL_FIX_POINT (rl_mark);
+}
+#undef _RL_FIX_POINT
+
+/* Replace the contents of the line buffer between START and END with
+ TEXT. The operation is undoable. To replace the entire line in an
+ undoable mode, use _rl_replace_text(text, 0, rl_end); */
+int
+_rl_replace_text (text, start, end)
+ const char *text;
+ int start, end;
+{
+ int n;
+
+ n = 0;
+ rl_begin_undo_group ();
+ if (start <= end)
+ rl_delete_text (start, end + 1);
+ rl_point = start;
+ if (*text)
+ n = rl_insert_text (text);
+ rl_end_undo_group ();
+
+ return n;
+}
+
+/* Replace the current line buffer contents with TEXT. If CLEAR_UNDO is
+ non-zero, we free the current undo list. */
+void
+rl_replace_line (text, clear_undo)
+ const char *text;
+ int clear_undo;
+{
+ int len;
+
+ len = strlen (text);
+ if (len >= rl_line_buffer_len)
+ rl_extend_line_buffer (len);
+ strcpy (rl_line_buffer, text);
+ rl_end = len;
+
+ if (clear_undo)
+ rl_free_undo_list ();
+
+ _rl_fix_point (1);
+}
+
+/* **************************************************************** */
+/* */
+/* Readline character functions */
+/* */
+/* **************************************************************** */
+
+/* This is not a gap editor, just a stupid line input routine. No hair
+ is involved in writing any of the functions, and none should be. */
+
+/* Note that:
+
+ rl_end is the place in the string that we would place '\0';
+ i.e., it is always safe to place '\0' there.
+
+ rl_point is the place in the string where the cursor is. Sometimes
+ this is the same as rl_end.
+
+ Any command that is called interactively receives two arguments.
+ The first is a count: the numeric arg pased to this command.
+ The second is the key which invoked this command.
+*/
+
+/* **************************************************************** */
+/* */
+/* Movement Commands */
+/* */
+/* **************************************************************** */
+
+/* Note that if you `optimize' the display for these functions, you cannot
+ use said functions in other functions which do not do optimizing display.
+ I.e., you will have to update the data base for rl_redisplay, and you
+ might as well let rl_redisplay do that job. */
+
+/* Move forward COUNT bytes. */
+int
+rl_forward_byte (count, key)
+ int count, key;
+{
+ if (count < 0)
+ return (rl_backward_byte (-count, key));
+
+ if (count > 0)
+ {
+ int end = rl_point + count;
+#if defined (VI_MODE)
+ int lend = rl_end > 0 ? rl_end - (VI_COMMAND_MODE()) : rl_end;
+#else
+ int lend = rl_end;
+#endif
+
+ if (end > lend)
+ {
+ rl_point = lend;
+ rl_ding ();
+ }
+ else
+ rl_point = end;
+ }
+
+ if (rl_end < 0)
+ rl_end = 0;
+
+ return 0;
+}
+
+#if defined (HANDLE_MULTIBYTE)
+/* Move forward COUNT characters. */
+int
+rl_forward_char (count, key)
+ int count, key;
+{
+ int point;
+
+ if (MB_CUR_MAX == 1 || rl_byte_oriented)
+ return (rl_forward_byte (count, key));
+
+ if (count < 0)
+ return (rl_backward_char (-count, key));
+
+ if (count > 0)
+ {
+ if (rl_point == rl_end && EMACS_MODE())
+ {
+ rl_ding ();
+ return 0;
+ }
+
+ point = _rl_find_next_mbchar (rl_line_buffer, rl_point, count, MB_FIND_NONZERO);
+
+#if defined (VI_MODE)
+ if (point >= rl_end && VI_COMMAND_MODE())
+ point = _rl_find_prev_mbchar (rl_line_buffer, rl_end, MB_FIND_NONZERO);
+#endif
+
+ if (rl_point == point)
+ rl_ding ();
+
+ rl_point = point;
+
+ if (rl_end < 0)
+ rl_end = 0;
+ }
+
+ return 0;
+}
+#else /* !HANDLE_MULTIBYTE */
+int
+rl_forward_char (count, key)
+ int count, key;
+{
+ return (rl_forward_byte (count, key));
+}
+#endif /* !HANDLE_MULTIBYTE */
+
+/* Backwards compatibility. */
+int
+rl_forward (count, key)
+ int count, key;
+{
+ return (rl_forward_char (count, key));
+}
+
+/* Move backward COUNT bytes. */
+int
+rl_backward_byte (count, key)
+ int count, key;
+{
+ if (count < 0)
+ return (rl_forward_byte (-count, key));
+
+ if (count > 0)
+ {
+ if (rl_point < count)
+ {
+ rl_point = 0;
+ rl_ding ();
+ }
+ else
+ rl_point -= count;
+ }
+
+ if (rl_point < 0)
+ rl_point = 0;
+
+ return 0;
+}
+
+#if defined (HANDLE_MULTIBYTE)
+/* Move backward COUNT characters. */
+int
+rl_backward_char (count, key)
+ int count, key;
+{
+ int point;
+
+ if (MB_CUR_MAX == 1 || rl_byte_oriented)
+ return (rl_backward_byte (count, key));
+
+ if (count < 0)
+ return (rl_forward_char (-count, key));
+
+ if (count > 0)
+ {
+ point = rl_point;
+
+ while (count > 0 && point > 0)
+ {
+ point = _rl_find_prev_mbchar (rl_line_buffer, point, MB_FIND_NONZERO);
+ count--;
+ }
+ if (count > 0)
+ {
+ rl_point = 0;
+ rl_ding ();
+ }
+ else
+ rl_point = point;
+ }
+
+ return 0;
+}
+#else
+int
+rl_backward_char (count, key)
+ int count, key;
+{
+ return (rl_backward_byte (count, key));
+}
+#endif
+
+/* Backwards compatibility. */
+int
+rl_backward (count, key)
+ int count, key;
+{
+ return (rl_backward_char (count, key));
+}
+
+/* Move to the beginning of the line. */
+int
+rl_beg_of_line (count, key)
+ int count, key;
+{
+ rl_point = 0;
+ return 0;
+}
+
+/* Move to the end of the line. */
+int
+rl_end_of_line (count, key)
+ int count, key;
+{
+ rl_point = rl_end;
+ return 0;
+}
+
+/* Move forward a word. We do what Emacs does. Handles multibyte chars. */
+int
+rl_forward_word (count, key)
+ int count, key;
+{
+ int c;
+
+ if (count < 0)
+ return (rl_backward_word (-count, key));
+
+ while (count)
+ {
+ if (rl_point == rl_end)
+ return 0;
+
+ /* If we are not in a word, move forward until we are in one.
+ Then, move forward until we hit a non-alphabetic character. */
+ c = _rl_char_value (rl_line_buffer, rl_point);
+
+ if (_rl_walphabetic (c) == 0)
+ {
+ rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+ while (rl_point < rl_end)
+ {
+ c = _rl_char_value (rl_line_buffer, rl_point);
+ if (_rl_walphabetic (c))
+ break;
+ rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+ }
+ }
+
+ if (rl_point == rl_end)
+ return 0;
+
+ rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+ while (rl_point < rl_end)
+ {
+ c = _rl_char_value (rl_line_buffer, rl_point);
+ if (_rl_walphabetic (c) == 0)
+ break;
+ rl_point = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+ }
+
+ --count;
+ }
+
+ return 0;
+}
+
+/* Move backward a word. We do what Emacs does. Handles multibyte chars. */
+int
+rl_backward_word (count, key)
+ int count, key;
+{
+ int c, p;
+
+ if (count < 0)
+ return (rl_forward_word (-count, key));
+
+ while (count)
+ {
+ if (rl_point == 0)
+ return 0;
+
+ /* Like rl_forward_word (), except that we look at the characters
+ just before point. */
+
+ p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ c = _rl_char_value (rl_line_buffer, p);
+
+ if (_rl_walphabetic (c) == 0)
+ {
+ rl_point = p;
+ while (rl_point > 0)
+ {
+ p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ c = _rl_char_value (rl_line_buffer, p);
+ if (_rl_walphabetic (c))
+ break;
+ rl_point = p;
+ }
+ }
+
+ while (rl_point)
+ {
+ p = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ c = _rl_char_value (rl_line_buffer, p);
+ if (_rl_walphabetic (c) == 0)
+ break;
+ else
+ rl_point = p;
+ }
+
+ --count;
+ }
+
+ return 0;
+}
+
+/* Clear the current line. Numeric argument to C-l does this. */
+int
+rl_refresh_line (ignore1, ignore2)
+ int ignore1, ignore2;
+{
+ int curr_line;
+
+ curr_line = _rl_current_display_line ();
+
+ _rl_move_vert (curr_line);
+ _rl_move_cursor_relative (0, rl_line_buffer); /* XXX is this right */
+
+ _rl_clear_to_eol (0); /* arg of 0 means to not use spaces */
+
+ rl_forced_update_display ();
+ rl_display_fixed = 1;
+
+ return 0;
+}
+
+/* C-l typed to a line without quoting clears the screen, and then reprints
+ the prompt and the current input line. Given a numeric arg, redraw only
+ the current line. */
+int
+rl_clear_screen (count, key)
+ int count, key;
+{
+ if (rl_explicit_arg)
+ {
+ rl_refresh_line (count, key);
+ return 0;
+ }
+
+ _rl_clear_screen (); /* calls termcap function to clear screen */
+ rl_forced_update_display ();
+ rl_display_fixed = 1;
+
+ return 0;
+}
+
+int
+rl_skip_csi_sequence (count, key)
+ int count, key;
+{
+ int ch;
+
+ RL_SETSTATE (RL_STATE_MOREINPUT);
+ do
+ ch = rl_read_key ();
+ while (ch >= 0x20 && ch < 0x40);
+ RL_UNSETSTATE (RL_STATE_MOREINPUT);
+
+ return 0;
+}
+
+int
+rl_arrow_keys (count, c)
+ int count, c;
+{
+ int ch;
+
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ ch = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
+ switch (_rl_to_upper (ch))
+ {
+ case 'A':
+ rl_get_previous_history (count, ch);
+ break;
+
+ case 'B':
+ rl_get_next_history (count, ch);
+ break;
+
+ case 'C':
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_forward_char (count, ch);
+ else
+ rl_forward_byte (count, ch);
+ break;
+
+ case 'D':
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_backward_char (count, ch);
+ else
+ rl_backward_byte (count, ch);
+ break;
+
+ default:
+ rl_ding ();
+ }
+
+ return 0;
+}
+
+/* **************************************************************** */
+/* */
+/* Text commands */
+/* */
+/* **************************************************************** */
+
+#ifdef HANDLE_MULTIBYTE
+static char pending_bytes[MB_LEN_MAX];
+static int pending_bytes_length = 0;
+static mbstate_t ps = {0};
+#endif
+
+/* Insert the character C at the current location, moving point forward.
+ If C introduces a multibyte sequence, we read the whole sequence and
+ then insert the multibyte char into the line buffer. */
+int
+_rl_insert_char (count, c)
+ int count, c;
+{
+ register int i;
+ char *string;
+#ifdef HANDLE_MULTIBYTE
+ int string_size;
+ char incoming[MB_LEN_MAX + 1];
+ int incoming_length = 0;
+ mbstate_t ps_back;
+ static int stored_count = 0;
+#endif
+
+ if (count <= 0)
+ return 0;
+
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX == 1 || rl_byte_oriented)
+ {
+ incoming[0] = c;
+ incoming[1] = '\0';
+ incoming_length = 1;
+ }
+ else
+ {
+ wchar_t wc;
+ size_t ret;
+
+ if (stored_count <= 0)
+ stored_count = count;
+ else
+ count = stored_count;
+
+ ps_back = ps;
+ pending_bytes[pending_bytes_length++] = c;
+ ret = mbrtowc (&wc, pending_bytes, pending_bytes_length, &ps);
+
+ if (ret == (size_t)-2)
+ {
+ /* Bytes too short to compose character, try to wait for next byte.
+ Restore the state of the byte sequence, because in this case the
+ effect of mbstate is undefined. */
+ ps = ps_back;
+ return 1;
+ }
+ else if (ret == (size_t)-1)
+ {
+ /* Invalid byte sequence for the current locale. Treat first byte
+ as a single character. */
+ incoming[0] = pending_bytes[0];
+ incoming[1] = '\0';
+ incoming_length = 1;
+ pending_bytes_length--;
+ memmove (pending_bytes, pending_bytes + 1, pending_bytes_length);
+ /* Clear the state of the byte sequence, because in this case the
+ effect of mbstate is undefined. */
+ memset (&ps, 0, sizeof (mbstate_t));
+ }
+ else if (ret == (size_t)0)
+ {
+ incoming[0] = '\0';
+ incoming_length = 0;
+ pending_bytes_length--;
+ /* Clear the state of the byte sequence, because in this case the
+ effect of mbstate is undefined. */
+ memset (&ps, 0, sizeof (mbstate_t));
+ }
+ else
+ {
+ /* We successfully read a single multibyte character. */
+ memcpy (incoming, pending_bytes, pending_bytes_length);
+ incoming[pending_bytes_length] = '\0';
+ incoming_length = pending_bytes_length;
+ pending_bytes_length = 0;
+ }
+ }
+#endif /* HANDLE_MULTIBYTE */
+
+ /* If we can optimize, then do it. But don't let people crash
+ readline because of extra large arguments. */
+ if (count > 1 && count <= TEXT_COUNT_MAX)
+ {
+#if defined (HANDLE_MULTIBYTE)
+ string_size = count * incoming_length;
+ string = (char *)xmalloc (1 + string_size);
+
+ i = 0;
+ while (i < string_size)
+ {
+ strncpy (string + i, incoming, incoming_length);
+ i += incoming_length;
+ }
+ incoming_length = 0;
+ stored_count = 0;
+#else /* !HANDLE_MULTIBYTE */
+ string = (char *)xmalloc (1 + count);
+
+ for (i = 0; i < count; i++)
+ string[i] = c;
+#endif /* !HANDLE_MULTIBYTE */
+
+ string[i] = '\0';
+ rl_insert_text (string);
+ free (string);
+
+ return 0;
+ }
+
+ if (count > TEXT_COUNT_MAX)
+ {
+ int decreaser;
+#if defined (HANDLE_MULTIBYTE)
+ string_size = incoming_length * TEXT_COUNT_MAX;
+ string = (char *)xmalloc (1 + string_size);
+
+ i = 0;
+ while (i < string_size)
+ {
+ strncpy (string + i, incoming, incoming_length);
+ i += incoming_length;
+ }
+
+ while (count)
+ {
+ decreaser = (count > TEXT_COUNT_MAX) ? TEXT_COUNT_MAX : count;
+ string[decreaser*incoming_length] = '\0';
+ rl_insert_text (string);
+ count -= decreaser;
+ }
+
+ free (string);
+ incoming_length = 0;
+ stored_count = 0;
+#else /* !HANDLE_MULTIBYTE */
+ char str[TEXT_COUNT_MAX+1];
+
+ for (i = 0; i < TEXT_COUNT_MAX; i++)
+ str[i] = c;
+
+ while (count)
+ {
+ decreaser = (count > TEXT_COUNT_MAX ? TEXT_COUNT_MAX : count);
+ str[decreaser] = '\0';
+ rl_insert_text (str);
+ count -= decreaser;
+ }
+#endif /* !HANDLE_MULTIBYTE */
+
+ return 0;
+ }
+
+ if (MB_CUR_MAX == 1 || rl_byte_oriented)
+ {
+ /* We are inserting a single character.
+ If there is pending input, then make a string of all of the
+ pending characters that are bound to rl_insert, and insert
+ them all. */
+ if (_rl_any_typein ())
+ _rl_insert_typein (c);
+ else
+ {
+ /* Inserting a single character. */
+ char str[2];
+
+ str[1] = '\0';
+ str[0] = c;
+ rl_insert_text (str);
+ }
+ }
+#if defined (HANDLE_MULTIBYTE)
+ else
+ {
+ rl_insert_text (incoming);
+ stored_count = 0;
+ }
+#endif
+
+ return 0;
+}
+
+/* Overwrite the character at point (or next COUNT characters) with C.
+ If C introduces a multibyte character sequence, read the entire sequence
+ before starting the overwrite loop. */
+int
+_rl_overwrite_char (count, c)
+ int count, c;
+{
+ int i;
+#if defined (HANDLE_MULTIBYTE)
+ char mbkey[MB_LEN_MAX];
+ int k;
+
+ /* Read an entire multibyte character sequence to insert COUNT times. */
+ if (count > 0 && MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ k = _rl_read_mbstring (c, mbkey, MB_LEN_MAX);
+#endif
+
+ rl_begin_undo_group ();
+
+ for (i = 0; i < count; i++)
+ {
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_insert_text (mbkey);
+ else
+#endif
+ _rl_insert_char (1, c);
+
+ if (rl_point < rl_end)
+ rl_delete (1, c);
+ }
+
+ rl_end_undo_group ();
+
+ return 0;
+}
+
+int
+rl_insert (count, c)
+ int count, c;
+{
+ return (rl_insert_mode == RL_IM_INSERT ? _rl_insert_char (count, c)
+ : _rl_overwrite_char (count, c));
+}
+
+/* Insert the next typed character verbatim. */
+static int
+_rl_insert_next (count)
+ int count;
+{
+ int c;
+
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
+ if (c < 0)
+ return -1;
+
+#if defined (HANDLE_SIGNALS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK) == 0)
+ _rl_restore_tty_signals ();
+#endif
+
+ return (_rl_insert_char (count, c));
+}
+
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_insert_next_callback (data)
+ _rl_callback_generic_arg *data;
+{
+ int count;
+
+ count = data->count;
+
+ /* Deregister function, let rl_callback_read_char deallocate data */
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return _rl_insert_next (count);
+}
+#endif
+
+int
+rl_quoted_insert (count, key)
+ int count, key;
+{
+ /* Let's see...should the callback interface futz with signal handling? */
+#if defined (HANDLE_SIGNALS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK) == 0)
+ _rl_disable_tty_signals ();
+#endif
+
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_func = _rl_insert_next_callback;
+ return (0);
+ }
+#endif
+
+ return _rl_insert_next (count);
+}
+
+/* Insert a tab character. */
+int
+rl_tab_insert (count, key)
+ int count, key;
+{
+ return (_rl_insert_char (count, '\t'));
+}
+
+/* What to do when a NEWLINE is pressed. We accept the whole line.
+ KEY is the key that invoked this command. I guess it could have
+ meaning in the future. */
+int
+rl_newline (count, key)
+ int count, key;
+{
+ rl_done = 1;
+
+ if (_rl_history_preserve_point)
+ _rl_history_saved_point = (rl_point == rl_end) ? -1 : rl_point;
+
+ RL_SETSTATE(RL_STATE_DONE);
+
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode)
+ {
+ _rl_vi_done_inserting ();
+ if (_rl_vi_textmod_command (_rl_vi_last_command) == 0) /* XXX */
+ _rl_vi_reset_last ();
+ }
+#endif /* VI_MODE */
+
+ /* If we've been asked to erase empty lines, suppress the final update,
+ since _rl_update_final calls rl_crlf(). */
+ if (rl_erase_empty_line && rl_point == 0 && rl_end == 0)
+ return 0;
+
+ if (_rl_echoing_p)
+ _rl_update_final ();
+ return 0;
+}
+
+/* What to do for some uppercase characters, like meta characters,
+ and some characters appearing in emacs_ctlx_keymap. This function
+ is just a stub, you bind keys to it and the code in _rl_dispatch ()
+ is special cased. */
+int
+rl_do_lowercase_version (ignore1, ignore2)
+ int ignore1, ignore2;
+{
+ return 0;
+}
+
+/* This is different from what vi does, so the code's not shared. Emacs
+ rubout in overwrite mode has one oddity: it replaces a control
+ character that's displayed as two characters (^X) with two spaces. */
+int
+_rl_overwrite_rubout (count, key)
+ int count, key;
+{
+ int opoint;
+ int i, l;
+
+ if (rl_point == 0)
+ {
+ rl_ding ();
+ return 1;
+ }
+
+ opoint = rl_point;
+
+ /* L == number of spaces to insert */
+ for (i = l = 0; i < count; i++)
+ {
+ rl_backward_char (1, key);
+ l += rl_character_len (rl_line_buffer[rl_point], rl_point); /* not exactly right */
+ }
+
+ rl_begin_undo_group ();
+
+ if (count > 1 || rl_explicit_arg)
+ rl_kill_text (opoint, rl_point);
+ else
+ rl_delete_text (opoint, rl_point);
+
+ /* Emacs puts point at the beginning of the sequence of spaces. */
+ if (rl_point < rl_end)
+ {
+ opoint = rl_point;
+ _rl_insert_char (l, ' ');
+ rl_point = opoint;
+ }
+
+ rl_end_undo_group ();
+
+ return 0;
+}
+
+/* Rubout the character behind point. */
+int
+rl_rubout (count, key)
+ int count, key;
+{
+ if (count < 0)
+ return (rl_delete (-count, key));
+
+ if (!rl_point)
+ {
+ rl_ding ();
+ return -1;
+ }
+
+ if (rl_insert_mode == RL_IM_OVERWRITE)
+ return (_rl_overwrite_rubout (count, key));
+
+ return (_rl_rubout_char (count, key));
+}
+
+int
+_rl_rubout_char (count, key)
+ int count, key;
+{
+ int orig_point;
+ unsigned char c;
+
+ /* Duplicated code because this is called from other parts of the library. */
+ if (count < 0)
+ return (rl_delete (-count, key));
+
+ if (rl_point == 0)
+ {
+ rl_ding ();
+ return -1;
+ }
+
+ orig_point = rl_point;
+ if (count > 1 || rl_explicit_arg)
+ {
+ rl_backward_char (count, key);
+ rl_kill_text (orig_point, rl_point);
+ }
+ else if (MB_CUR_MAX == 1 || rl_byte_oriented)
+ {
+ c = rl_line_buffer[--rl_point];
+ rl_delete_text (rl_point, orig_point);
+ /* The erase-at-end-of-line hack is of questionable merit now. */
+ if (rl_point == rl_end && ISPRINT (c) && _rl_last_c_pos)
+ {
+ int l;
+ l = rl_character_len (c, rl_point);
+ _rl_erase_at_end_of_line (l);
+ }
+ }
+ else
+ {
+ rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ rl_delete_text (rl_point, orig_point);
+ }
+
+ return 0;
+}
+
+/* Delete the character under the cursor. Given a numeric argument,
+ kill that many characters instead. */
+int
+rl_delete (count, key)
+ int count, key;
+{
+ int xpoint;
+
+ if (count < 0)
+ return (_rl_rubout_char (-count, key));
+
+ if (rl_point == rl_end)
+ {
+ rl_ding ();
+ return -1;
+ }
+
+ if (count > 1 || rl_explicit_arg)
+ {
+ xpoint = rl_point;
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_forward_char (count, key);
+ else
+ rl_forward_byte (count, key);
+
+ rl_kill_text (xpoint, rl_point);
+ rl_point = xpoint;
+ }
+ else
+ {
+ xpoint = MB_NEXTCHAR (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+ rl_delete_text (rl_point, xpoint);
+ }
+ return 0;
+}
+
+/* Delete the character under the cursor, unless the insertion
+ point is at the end of the line, in which case the character
+ behind the cursor is deleted. COUNT is obeyed and may be used
+ to delete forward or backward that many characters. */
+int
+rl_rubout_or_delete (count, key)
+ int count, key;
+{
+ if (rl_end != 0 && rl_point == rl_end)
+ return (_rl_rubout_char (count, key));
+ else
+ return (rl_delete (count, key));
+}
+
+/* Delete all spaces and tabs around point. */
+int
+rl_delete_horizontal_space (count, ignore)
+ int count, ignore;
+{
+ int start;
+
+ while (rl_point && whitespace (rl_line_buffer[rl_point - 1]))
+ rl_point--;
+
+ start = rl_point;
+
+ while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point]))
+ rl_point++;
+
+ if (start != rl_point)
+ {
+ rl_delete_text (start, rl_point);
+ rl_point = start;
+ }
+
+ if (rl_point < 0)
+ rl_point = 0;
+
+ return 0;
+}
+
+/* Like the tcsh editing function delete-char-or-list. The eof character
+ is caught before this is invoked, so this really does the same thing as
+ delete-char-or-list-or-eof, as long as it's bound to the eof character. */
+int
+rl_delete_or_show_completions (count, key)
+ int count, key;
+{
+ if (rl_end != 0 && rl_point == rl_end)
+ return (rl_possible_completions (count, key));
+ else
+ return (rl_delete (count, key));
+}
+
+#ifndef RL_COMMENT_BEGIN_DEFAULT
+#define RL_COMMENT_BEGIN_DEFAULT "#"
+#endif
+
+/* Turn the current line into a comment in shell history.
+ A K*rn shell style function. */
+int
+rl_insert_comment (count, key)
+ int count, key;
+{
+ char *rl_comment_text;
+ int rl_comment_len;
+
+ rl_beg_of_line (1, key);
+ rl_comment_text = _rl_comment_begin ? _rl_comment_begin : RL_COMMENT_BEGIN_DEFAULT;
+
+ if (rl_explicit_arg == 0)
+ rl_insert_text (rl_comment_text);
+ else
+ {
+ rl_comment_len = strlen (rl_comment_text);
+ if (STREQN (rl_comment_text, rl_line_buffer, rl_comment_len))
+ rl_delete_text (rl_point, rl_point + rl_comment_len);
+ else
+ rl_insert_text (rl_comment_text);
+ }
+
+ (*rl_redisplay_function) ();
+ rl_newline (1, '\n');
+
+ return (0);
+}
+
+/* **************************************************************** */
+/* */
+/* Changing Case */
+/* */
+/* **************************************************************** */
+
+/* The three kinds of things that we know how to do. */
+#define UpCase 1
+#define DownCase 2
+#define CapCase 3
+
+/* Uppercase the word at point. */
+int
+rl_upcase_word (count, key)
+ int count, key;
+{
+ return (rl_change_case (count, UpCase));
+}
+
+/* Lowercase the word at point. */
+int
+rl_downcase_word (count, key)
+ int count, key;
+{
+ return (rl_change_case (count, DownCase));
+}
+
+/* Upcase the first letter, downcase the rest. */
+int
+rl_capitalize_word (count, key)
+ int count, key;
+{
+ return (rl_change_case (count, CapCase));
+}
+
+/* The meaty function.
+ Change the case of COUNT words, performing OP on them.
+ OP is one of UpCase, DownCase, or CapCase.
+ If a negative argument is given, leave point where it started,
+ otherwise, leave it where it moves to. */
+static int
+rl_change_case (count, op)
+ int count, op;
+{
+ int start, next, end;
+ int inword, c, nc, nop;
+#if defined (HANDLE_MULTIBYTE)
+ wchar_t wc, nwc;
+ char mb[MB_LEN_MAX+1];
+ int mlen;
+ size_t m;
+ mbstate_t mps;
+#endif
+
+ start = rl_point;
+ rl_forward_word (count, 0);
+ end = rl_point;
+
+ if (op != UpCase && op != DownCase && op != CapCase)
+ {
+ rl_ding ();
+ return -1;
+ }
+
+ if (count < 0)
+ SWAP (start, end);
+
+#if defined (HANDLE_MULTIBYTE)
+ memset (&mps, 0, sizeof (mbstate_t));
+#endif
+
+ /* We are going to modify some text, so let's prepare to undo it. */
+ rl_modifying (start, end);
+
+ inword = 0;
+ while (start < end)
+ {
+ c = _rl_char_value (rl_line_buffer, start);
+ /* This assumes that the upper and lower case versions are the same width. */
+ next = MB_NEXTCHAR (rl_line_buffer, start, 1, MB_FIND_NONZERO);
+
+ if (_rl_walphabetic (c) == 0)
+ {
+ inword = 0;
+ start = next;
+ continue;
+ }
+
+ if (op == CapCase)
+ {
+ nop = inword ? DownCase : UpCase;
+ inword = 1;
+ }
+ else
+ nop = op;
+ if (MB_CUR_MAX == 1 || rl_byte_oriented || isascii (c))
+ {
+ nc = (nop == UpCase) ? _rl_to_upper (c) : _rl_to_lower (c);
+ rl_line_buffer[start] = nc;
+ }
+#if defined (HANDLE_MULTIBYTE)
+ else
+ {
+ m = mbrtowc (&wc, rl_line_buffer + start, end - start, &mps);
+ if (MB_INVALIDCH (m))
+ wc = (wchar_t)rl_line_buffer[start];
+ else if (MB_NULLWCH (m))
+ wc = L'\0';
+ nwc = (nop == UpCase) ? _rl_to_wupper (wc) : _rl_to_wlower (wc);
+ if (nwc != wc) /* just skip unchanged characters */
+ {
+ mlen = wcrtomb (mb, nwc, &mps);
+ if (mlen > 0)
+ mb[mlen] = '\0';
+ /* Assume the same width */
+ strncpy (rl_line_buffer + start, mb, mlen);
+ }
+ }
+#endif
+
+ start = next;
+ }
+
+ rl_point = end;
+ return 0;
+}
+
+/* **************************************************************** */
+/* */
+/* Transposition */
+/* */
+/* **************************************************************** */
+
+/* Transpose the words at point. If point is at the end of the line,
+ transpose the two words before point. */
+int
+rl_transpose_words (count, key)
+ int count, key;
+{
+ char *word1, *word2;
+ int w1_beg, w1_end, w2_beg, w2_end;
+ int orig_point = rl_point;
+
+ if (!count)
+ return 0;
+
+ /* Find the two words. */
+ rl_forward_word (count, key);
+ w2_end = rl_point;
+ rl_backward_word (1, key);
+ w2_beg = rl_point;
+ rl_backward_word (count, key);
+ w1_beg = rl_point;
+ rl_forward_word (1, key);
+ w1_end = rl_point;
+
+ /* Do some check to make sure that there really are two words. */
+ if ((w1_beg == w2_beg) || (w2_beg < w1_end))
+ {
+ rl_ding ();
+ rl_point = orig_point;
+ return -1;
+ }
+
+ /* Get the text of the words. */
+ word1 = rl_copy_text (w1_beg, w1_end);
+ word2 = rl_copy_text (w2_beg, w2_end);
+
+ /* We are about to do many insertions and deletions. Remember them
+ as one operation. */
+ rl_begin_undo_group ();
+
+ /* Do the stuff at word2 first, so that we don't have to worry
+ about word1 moving. */
+ rl_point = w2_beg;
+ rl_delete_text (w2_beg, w2_end);
+ rl_insert_text (word1);
+
+ rl_point = w1_beg;
+ rl_delete_text (w1_beg, w1_end);
+ rl_insert_text (word2);
+
+ /* This is exactly correct since the text before this point has not
+ changed in length. */
+ rl_point = w2_end;
+
+ /* I think that does it. */
+ rl_end_undo_group ();
+ free (word1);
+ free (word2);
+
+ return 0;
+}
+
+/* Transpose the characters at point. If point is at the end of the line,
+ then transpose the characters before point. */
+int
+rl_transpose_chars (count, key)
+ int count, key;
+{
+#if defined (HANDLE_MULTIBYTE)
+ char *dummy;
+ int i;
+#else
+ char dummy[2];
+#endif
+ int char_length, prev_point;
+
+ if (count == 0)
+ return 0;
+
+ if (!rl_point || rl_end < 2)
+ {
+ rl_ding ();
+ return -1;
+ }
+
+ rl_begin_undo_group ();
+
+ if (rl_point == rl_end)
+ {
+ rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ count = 1;
+ }
+
+ prev_point = rl_point;
+ rl_point = MB_PREVCHAR (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+
+#if defined (HANDLE_MULTIBYTE)
+ char_length = prev_point - rl_point;
+ dummy = (char *)xmalloc (char_length + 1);
+ for (i = 0; i < char_length; i++)
+ dummy[i] = rl_line_buffer[rl_point + i];
+ dummy[i] = '\0';
+#else
+ dummy[0] = rl_line_buffer[rl_point];
+ dummy[char_length = 1] = '\0';
+#endif
+
+ rl_delete_text (rl_point, rl_point + char_length);
+
+ rl_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, count, MB_FIND_NONZERO);
+
+ _rl_fix_point (0);
+ rl_insert_text (dummy);
+ rl_end_undo_group ();
+
+#if defined (HANDLE_MULTIBYTE)
+ free (dummy);
+#endif
+
+ return 0;
+}
+
+/* **************************************************************** */
+/* */
+/* Character Searching */
+/* */
+/* **************************************************************** */
+
+int
+#if defined (HANDLE_MULTIBYTE)
+_rl_char_search_internal (count, dir, smbchar, len)
+ int count, dir;
+ char *smbchar;
+ int len;
+#else
+_rl_char_search_internal (count, dir, schar)
+ int count, dir, schar;
+#endif
+{
+ int pos, inc;
+#if defined (HANDLE_MULTIBYTE)
+ int prepos;
+#endif
+
+ pos = rl_point;
+ inc = (dir < 0) ? -1 : 1;
+ while (count)
+ {
+ if ((dir < 0 && pos <= 0) || (dir > 0 && pos >= rl_end))
+ {
+ rl_ding ();
+ return -1;
+ }
+
+#if defined (HANDLE_MULTIBYTE)
+ pos = (inc > 0) ? _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY)
+ : _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY);
+#else
+ pos += inc;
+#endif
+ do
+ {
+#if defined (HANDLE_MULTIBYTE)
+ if (_rl_is_mbchar_matched (rl_line_buffer, pos, rl_end, smbchar, len))
+#else
+ if (rl_line_buffer[pos] == schar)
+#endif
+ {
+ count--;
+ if (dir < 0)
+ rl_point = (dir == BTO) ? _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY)
+ : pos;
+ else
+ rl_point = (dir == FTO) ? _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY)
+ : pos;
+ break;
+ }
+#if defined (HANDLE_MULTIBYTE)
+ prepos = pos;
+#endif
+ }
+#if defined (HANDLE_MULTIBYTE)
+ while ((dir < 0) ? (pos = _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY)) != prepos
+ : (pos = _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY)) != prepos);
+#else
+ while ((dir < 0) ? pos-- : ++pos < rl_end);
+#endif
+ }
+ return (0);
+}
+
+/* Search COUNT times for a character read from the current input stream.
+ FDIR is the direction to search if COUNT is non-negative; otherwise
+ the search goes in BDIR. So much is dependent on HANDLE_MULTIBYTE
+ that there are two separate versions of this function. */
+#if defined (HANDLE_MULTIBYTE)
+static int
+_rl_char_search (count, fdir, bdir)
+ int count, fdir, bdir;
+{
+ char mbchar[MB_LEN_MAX];
+ int mb_len;
+
+ mb_len = _rl_read_mbchar (mbchar, MB_LEN_MAX);
+
+ if (mb_len <= 0)
+ return -1;
+
+ if (count < 0)
+ return (_rl_char_search_internal (-count, bdir, mbchar, mb_len));
+ else
+ return (_rl_char_search_internal (count, fdir, mbchar, mb_len));
+}
+#else /* !HANDLE_MULTIBYTE */
+static int
+_rl_char_search (count, fdir, bdir)
+ int count, fdir, bdir;
+{
+ int c;
+
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
+ if (c < 0)
+ return -1;
+
+ if (count < 0)
+ return (_rl_char_search_internal (-count, bdir, c));
+ else
+ return (_rl_char_search_internal (count, fdir, c));
+}
+#endif /* !HANDLE_MULTIBYTE */
+
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_char_search_callback (data)
+ _rl_callback_generic_arg *data;
+{
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return (_rl_char_search (data->count, data->i1, data->i2));
+}
+#endif
+
+int
+rl_char_search (count, key)
+ int count, key;
+{
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_data->i1 = FFIND;
+ _rl_callback_data->i2 = BFIND;
+ _rl_callback_func = _rl_char_search_callback;
+ return (0);
+ }
+#endif
+
+ return (_rl_char_search (count, FFIND, BFIND));
+}
+
+int
+rl_backward_char_search (count, key)
+ int count, key;
+{
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_data->i1 = BFIND;
+ _rl_callback_data->i2 = FFIND;
+ _rl_callback_func = _rl_char_search_callback;
+ return (0);
+ }
+#endif
+
+ return (_rl_char_search (count, BFIND, FFIND));
+}
+
+/* **************************************************************** */
+/* */
+/* The Mark and the Region. */
+/* */
+/* **************************************************************** */
+
+/* Set the mark at POSITION. */
+int
+_rl_set_mark_at_pos (position)
+ int position;
+{
+ if (position > rl_end)
+ return -1;
+
+ rl_mark = position;
+ return 0;
+}
+
+/* A bindable command to set the mark. */
+int
+rl_set_mark (count, key)
+ int count, key;
+{
+ return (_rl_set_mark_at_pos (rl_explicit_arg ? count : rl_point));
+}
+
+/* Exchange the position of mark and point. */
+int
+rl_exchange_point_and_mark (count, key)
+ int count, key;
+{
+ if (rl_mark > rl_end)
+ rl_mark = -1;
+
+ if (rl_mark == -1)
+ {
+ rl_ding ();
+ return -1;
+ }
+ else
+ SWAP (rl_point, rl_mark);
+
+ return 0;
+}
diff --git a/lib/readline/tilde.c b/lib/readline/tilde.c
new file mode 100644
index 0000000..088ff15
--- /dev/null
+++ b/lib/readline/tilde.c
@@ -0,0 +1,502 @@
+/* tilde.c -- Tilde expansion code (~/foo := $HOME/foo). */
+
+/* Copyright (C) 1988-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#if defined (HAVE_STRING_H)
+# include <string.h>
+#else /* !HAVE_STRING_H */
+# include <strings.h>
+#endif /* !HAVE_STRING_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#include <sys/types.h>
+#if defined (HAVE_PWD_H)
+#include <pwd.h>
+#endif
+
+#include "tilde.h"
+
+#if defined (TEST) || defined (STATIC_MALLOC)
+static void *xmalloc (), *xrealloc ();
+#else
+# include "xmalloc.h"
+#endif /* TEST || STATIC_MALLOC */
+
+#if !defined (HAVE_GETPW_DECLS)
+# if defined (HAVE_GETPWUID)
+extern struct passwd *getpwuid PARAMS((uid_t));
+# endif
+# if defined (HAVE_GETPWNAM)
+extern struct passwd *getpwnam PARAMS((const char *));
+# endif
+#endif /* !HAVE_GETPW_DECLS */
+
+#if !defined (savestring)
+#define savestring(x) strcpy ((char *)xmalloc (1 + strlen (x)), (x))
+#endif /* !savestring */
+
+#if !defined (NULL)
+# if defined (__STDC__)
+# define NULL ((void *) 0)
+# else
+# define NULL 0x0
+# endif /* !__STDC__ */
+#endif /* !NULL */
+
+/* If being compiled as part of bash, these will be satisfied from
+ variables.o. If being compiled as part of readline, they will
+ be satisfied from shell.o. */
+extern char *sh_get_home_dir PARAMS((void));
+extern char *sh_get_env_value PARAMS((const char *));
+
+/* The default value of tilde_additional_prefixes. This is set to
+ whitespace preceding a tilde so that simple programs which do not
+ perform any word separation get desired behaviour. */
+static const char *default_prefixes[] =
+ { " ~", "\t~", (const char *)NULL };
+
+/* The default value of tilde_additional_suffixes. This is set to
+ whitespace or newline so that simple programs which do not
+ perform any word separation get desired behaviour. */
+static const char *default_suffixes[] =
+ { " ", "\n", (const char *)NULL };
+
+/* If non-null, this contains the address of a function that the application
+ wants called before trying the standard tilde expansions. The function
+ is called with the text sans tilde, and returns a malloc()'ed string
+ which is the expansion, or a NULL pointer if the expansion fails. */
+tilde_hook_func_t *tilde_expansion_preexpansion_hook = (tilde_hook_func_t *)NULL;
+
+/* If non-null, this contains the address of a function to call if the
+ standard meaning for expanding a tilde fails. The function is called
+ with the text (sans tilde, as in "foo"), and returns a malloc()'ed string
+ which is the expansion, or a NULL pointer if there is no expansion. */
+tilde_hook_func_t *tilde_expansion_failure_hook = (tilde_hook_func_t *)NULL;
+
+/* When non-null, this is a NULL terminated array of strings which
+ are duplicates for a tilde prefix. Bash uses this to expand
+ `=~' and `:~'. */
+char **tilde_additional_prefixes = (char **)default_prefixes;
+
+/* When non-null, this is a NULL terminated array of strings which match
+ the end of a username, instead of just "/". Bash sets this to
+ `:' and `=~'. */
+char **tilde_additional_suffixes = (char **)default_suffixes;
+
+static int tilde_find_prefix PARAMS((const char *, int *));
+static int tilde_find_suffix PARAMS((const char *));
+static char *isolate_tilde_prefix PARAMS((const char *, int *));
+static char *glue_prefix_and_suffix PARAMS((char *, const char *, int));
+
+/* Find the start of a tilde expansion in STRING, and return the index of
+ the tilde which starts the expansion. Place the length of the text
+ which identified this tilde starter in LEN, excluding the tilde itself. */
+static int
+tilde_find_prefix (string, len)
+ const char *string;
+ int *len;
+{
+ register int i, j, string_len;
+ register char **prefixes;
+
+ prefixes = tilde_additional_prefixes;
+
+ string_len = strlen (string);
+ *len = 0;
+
+ if (*string == '\0' || *string == '~')
+ return (0);
+
+ if (prefixes)
+ {
+ for (i = 0; i < string_len; i++)
+ {
+ for (j = 0; prefixes[j]; j++)
+ {
+ if (strncmp (string + i, prefixes[j], strlen (prefixes[j])) == 0)
+ {
+ *len = strlen (prefixes[j]) - 1;
+ return (i + *len);
+ }
+ }
+ }
+ }
+ return (string_len);
+}
+
+/* Find the end of a tilde expansion in STRING, and return the index of
+ the character which ends the tilde definition. */
+static int
+tilde_find_suffix (string)
+ const char *string;
+{
+ register int i, j, string_len;
+ register char **suffixes;
+
+ suffixes = tilde_additional_suffixes;
+ string_len = strlen (string);
+
+ for (i = 0; i < string_len; i++)
+ {
+#if defined (__MSDOS__)
+ if (string[i] == '/' || string[i] == '\\' /* || !string[i] */)
+#else
+ if (string[i] == '/' /* || !string[i] */)
+#endif
+ break;
+
+ for (j = 0; suffixes && suffixes[j]; j++)
+ {
+ if (strncmp (string + i, suffixes[j], strlen (suffixes[j])) == 0)
+ return (i);
+ }
+ }
+ return (i);
+}
+
+/* Return a new string which is the result of tilde expanding STRING. */
+char *
+tilde_expand (string)
+ const char *string;
+{
+ char *result;
+ int result_size, result_index;
+
+ result_index = result_size = 0;
+ if (result = strchr (string, '~'))
+ result = (char *)xmalloc (result_size = (strlen (string) + 16));
+ else
+ result = (char *)xmalloc (result_size = (strlen (string) + 1));
+
+ /* Scan through STRING expanding tildes as we come to them. */
+ while (1)
+ {
+ register int start, end;
+ char *tilde_word, *expansion;
+ int len;
+
+ /* Make START point to the tilde which starts the expansion. */
+ start = tilde_find_prefix (string, &len);
+
+ /* Copy the skipped text into the result. */
+ if ((result_index + start + 1) > result_size)
+ result = (char *)xrealloc (result, 1 + (result_size += (start + 20)));
+
+ strncpy (result + result_index, string, start);
+ result_index += start;
+
+ /* Advance STRING to the starting tilde. */
+ string += start;
+
+ /* Make END be the index of one after the last character of the
+ username. */
+ end = tilde_find_suffix (string);
+
+ /* If both START and END are zero, we are all done. */
+ if (!start && !end)
+ break;
+
+ /* Expand the entire tilde word, and copy it into RESULT. */
+ tilde_word = (char *)xmalloc (1 + end);
+ strncpy (tilde_word, string, end);
+ tilde_word[end] = '\0';
+ string += end;
+
+ expansion = tilde_expand_word (tilde_word);
+ xfree (tilde_word);
+
+ len = strlen (expansion);
+#ifdef __CYGWIN__
+ /* Fix for Cygwin to prevent ~user/xxx from expanding to //xxx when
+ $HOME for `user' is /. On cygwin, // denotes a network drive. */
+ if (len > 1 || *expansion != '/' || *string != '/')
+#endif
+ {
+ if ((result_index + len + 1) > result_size)
+ result = (char *)xrealloc (result, 1 + (result_size += (len + 20)));
+
+ strcpy (result + result_index, expansion);
+ result_index += len;
+ }
+ xfree (expansion);
+ }
+
+ result[result_index] = '\0';
+
+ return (result);
+}
+
+/* Take FNAME and return the tilde prefix we want expanded. If LENP is
+ non-null, the index of the end of the prefix into FNAME is returned in
+ the location it points to. */
+static char *
+isolate_tilde_prefix (fname, lenp)
+ const char *fname;
+ int *lenp;
+{
+ char *ret;
+ int i;
+
+ ret = (char *)xmalloc (strlen (fname));
+#if defined (__MSDOS__)
+ for (i = 1; fname[i] && fname[i] != '/' && fname[i] != '\\'; i++)
+#else
+ for (i = 1; fname[i] && fname[i] != '/'; i++)
+#endif
+ ret[i - 1] = fname[i];
+ ret[i - 1] = '\0';
+ if (lenp)
+ *lenp = i;
+ return ret;
+}
+
+#if 0
+/* Public function to scan a string (FNAME) beginning with a tilde and find
+ the portion of the string that should be passed to the tilde expansion
+ function. Right now, it just calls tilde_find_suffix and allocates new
+ memory, but it can be expanded to do different things later. */
+char *
+tilde_find_word (fname, flags, lenp)
+ const char *fname;
+ int flags, *lenp;
+{
+ int x;
+ char *r;
+
+ x = tilde_find_suffix (fname);
+ if (x == 0)
+ {
+ r = savestring (fname);
+ if (lenp)
+ *lenp = 0;
+ }
+ else
+ {
+ r = (char *)xmalloc (1 + x);
+ strncpy (r, fname, x);
+ r[x] = '\0';
+ if (lenp)
+ *lenp = x;
+ }
+
+ return r;
+}
+#endif
+
+/* Return a string that is PREFIX concatenated with SUFFIX starting at
+ SUFFIND. */
+static char *
+glue_prefix_and_suffix (prefix, suffix, suffind)
+ char *prefix;
+ const char *suffix;
+ int suffind;
+{
+ char *ret;
+ int plen, slen;
+
+ plen = (prefix && *prefix) ? strlen (prefix) : 0;
+ slen = strlen (suffix + suffind);
+ ret = (char *)xmalloc (plen + slen + 1);
+ if (plen)
+ strcpy (ret, prefix);
+ strcpy (ret + plen, suffix + suffind);
+ return ret;
+}
+
+/* Do the work of tilde expansion on FILENAME. FILENAME starts with a
+ tilde. If there is no expansion, call tilde_expansion_failure_hook.
+ This always returns a newly-allocated string, never static storage. */
+char *
+tilde_expand_word (filename)
+ const char *filename;
+{
+ char *dirname, *expansion, *username;
+ int user_len;
+ struct passwd *user_entry;
+
+ if (filename == 0)
+ return ((char *)NULL);
+
+ if (*filename != '~')
+ return (savestring (filename));
+
+ /* A leading `~/' or a bare `~' is *always* translated to the value of
+ $HOME or the home directory of the current user, regardless of any
+ preexpansion hook. */
+ if (filename[1] == '\0' || filename[1] == '/')
+ {
+ /* Prefix $HOME to the rest of the string. */
+ expansion = sh_get_env_value ("HOME");
+
+ /* If there is no HOME variable, look up the directory in
+ the password database. */
+ if (expansion == 0)
+ expansion = sh_get_home_dir ();
+
+ return (glue_prefix_and_suffix (expansion, filename, 1));
+ }
+
+ username = isolate_tilde_prefix (filename, &user_len);
+
+ if (tilde_expansion_preexpansion_hook)
+ {
+ expansion = (*tilde_expansion_preexpansion_hook) (username);
+ if (expansion)
+ {
+ dirname = glue_prefix_and_suffix (expansion, filename, user_len);
+ xfree (username);
+ free (expansion);
+ return (dirname);
+ }
+ }
+
+ /* No preexpansion hook, or the preexpansion hook failed. Look in the
+ password database. */
+ dirname = (char *)NULL;
+#if defined (HAVE_GETPWNAM)
+ user_entry = getpwnam (username);
+#else
+ user_entry = 0;
+#endif
+ if (user_entry == 0)
+ {
+ /* If the calling program has a special syntax for expanding tildes,
+ and we couldn't find a standard expansion, then let them try. */
+ if (tilde_expansion_failure_hook)
+ {
+ expansion = (*tilde_expansion_failure_hook) (username);
+ if (expansion)
+ {
+ dirname = glue_prefix_and_suffix (expansion, filename, user_len);
+ free (expansion);
+ }
+ }
+ /* If we don't have a failure hook, or if the failure hook did not
+ expand the tilde, return a copy of what we were passed. */
+ if (dirname == 0)
+ dirname = savestring (filename);
+ }
+#if defined (HAVE_GETPWENT)
+ else
+ dirname = glue_prefix_and_suffix (user_entry->pw_dir, filename, user_len);
+#endif
+
+ xfree (username);
+#if defined (HAVE_GETPWENT)
+ endpwent ();
+#endif
+ return (dirname);
+}
+
+
+#if defined (TEST)
+#undef NULL
+#include <stdio.h>
+
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ char *result, line[512];
+ int done = 0;
+
+ while (!done)
+ {
+ printf ("~expand: ");
+ fflush (stdout);
+
+ if (!gets (line))
+ strcpy (line, "done");
+
+ if ((strcmp (line, "done") == 0) ||
+ (strcmp (line, "quit") == 0) ||
+ (strcmp (line, "exit") == 0))
+ {
+ done = 1;
+ break;
+ }
+
+ result = tilde_expand (line);
+ printf (" --> %s\n", result);
+ free (result);
+ }
+ exit (0);
+}
+
+static void memory_error_and_abort ();
+
+static void *
+xmalloc (bytes)
+ size_t bytes;
+{
+ void *temp = (char *)malloc (bytes);
+
+ if (!temp)
+ memory_error_and_abort ();
+ return (temp);
+}
+
+static void *
+xrealloc (pointer, bytes)
+ void *pointer;
+ int bytes;
+{
+ void *temp;
+
+ if (!pointer)
+ temp = malloc (bytes);
+ else
+ temp = realloc (pointer, bytes);
+
+ if (!temp)
+ memory_error_and_abort ();
+
+ return (temp);
+}
+
+static void
+memory_error_and_abort ()
+{
+ fprintf (stderr, "readline: out of virtual memory\n");
+ abort ();
+}
+
+/*
+ * Local variables:
+ * compile-command: "gcc -g -DTEST -o tilde tilde.c"
+ * end:
+ */
+#endif /* TEST */
diff --git a/lib/readline/tilde.h b/lib/readline/tilde.h
new file mode 100644
index 0000000..e26dd04
--- /dev/null
+++ b/lib/readline/tilde.h
@@ -0,0 +1,80 @@
+/* tilde.h: Externally available variables and function in libtilde.a. */
+
+/* Copyright (C) 1992-2009 Free Software Foundation, Inc.
+
+ This file contains the Readline Library (Readline), a set of
+ routines for providing Emacs style line input to programs that ask
+ for it.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_TILDE_H_)
+# define _TILDE_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* A function can be defined using prototypes and compile on both ANSI C
+ and traditional C compilers with something like this:
+ extern char *func PARAMS((char *, char *, int)); */
+
+#if !defined (PARAMS)
+# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus)
+# define PARAMS(protos) protos
+# else
+# define PARAMS(protos) ()
+# endif
+#endif
+
+typedef char *tilde_hook_func_t PARAMS((char *));
+
+/* If non-null, this contains the address of a function that the application
+ wants called before trying the standard tilde expansions. The function
+ is called with the text sans tilde, and returns a malloc()'ed string
+ which is the expansion, or a NULL pointer if the expansion fails. */
+extern tilde_hook_func_t *tilde_expansion_preexpansion_hook;
+
+/* If non-null, this contains the address of a function to call if the
+ standard meaning for expanding a tilde fails. The function is called
+ with the text (sans tilde, as in "foo"), and returns a malloc()'ed string
+ which is the expansion, or a NULL pointer if there is no expansion. */
+extern tilde_hook_func_t *tilde_expansion_failure_hook;
+
+/* When non-null, this is a NULL terminated array of strings which
+ are duplicates for a tilde prefix. Bash uses this to expand
+ `=~' and `:~'. */
+extern char **tilde_additional_prefixes;
+
+/* When non-null, this is a NULL terminated array of strings which match
+ the end of a username, instead of just "/". Bash sets this to
+ `:' and `=~'. */
+extern char **tilde_additional_suffixes;
+
+/* Return a new string which is the result of tilde expanding STRING. */
+extern char *tilde_expand PARAMS((const char *));
+
+/* Do the work of tilde expansion on FILENAME. FILENAME starts with a
+ tilde. If there is no expansion, call tilde_expansion_failure_hook. */
+extern char *tilde_expand_word PARAMS((const char *));
+
+/* Find the portion of the string beginning with ~ that should be expanded. */
+extern char *tilde_find_word PARAMS((const char *, int, int *));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TILDE_H_ */
diff --git a/lib/readline/undo.c b/lib/readline/undo.c
new file mode 100644
index 0000000..eb042b2
--- /dev/null
+++ b/lib/readline/undo.c
@@ -0,0 +1,331 @@
+/* readline.c -- a general facility for reading lines of input
+ with emacs style editing and completion. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h> /* for _POSIX_VERSION */
+#endif /* HAVE_UNISTD_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#include <stdio.h>
+
+/* System-specific feature definitions and include files. */
+#include "rldefs.h"
+
+/* Some standard library routines. */
+#include "readline.h"
+#include "history.h"
+
+#include "rlprivate.h"
+#include "xmalloc.h"
+
+extern void replace_history_data PARAMS((int, histdata_t *, histdata_t *));
+
+/* Non-zero tells rl_delete_text and rl_insert_text to not add to
+ the undo list. */
+int _rl_doing_an_undo = 0;
+
+/* How many unclosed undo groups we currently have. */
+int _rl_undo_group_level = 0;
+
+/* The current undo list for THE_LINE. */
+UNDO_LIST *rl_undo_list = (UNDO_LIST *)NULL;
+
+/* **************************************************************** */
+/* */
+/* Undo, and Undoing */
+/* */
+/* **************************************************************** */
+
+static UNDO_LIST *
+alloc_undo_entry (what, start, end, text)
+ enum undo_code what;
+ int start, end;
+ char *text;
+{
+ UNDO_LIST *temp;
+
+ temp = (UNDO_LIST *)xmalloc (sizeof (UNDO_LIST));
+ temp->what = what;
+ temp->start = start;
+ temp->end = end;
+ temp->text = text;
+
+ temp->next = (UNDO_LIST *)NULL;
+ return temp;
+}
+
+/* Remember how to undo something. Concatenate some undos if that
+ seems right. */
+void
+rl_add_undo (what, start, end, text)
+ enum undo_code what;
+ int start, end;
+ char *text;
+{
+ UNDO_LIST *temp;
+
+ temp = alloc_undo_entry (what, start, end, text);
+ temp->next = rl_undo_list;
+ rl_undo_list = temp;
+}
+
+/* Free the existing undo list. */
+void
+rl_free_undo_list ()
+{
+ UNDO_LIST *release, *orig_list;
+
+ orig_list = rl_undo_list;
+ while (rl_undo_list)
+ {
+ release = rl_undo_list;
+ rl_undo_list = rl_undo_list->next;
+
+ if (release->what == UNDO_DELETE)
+ xfree (release->text);
+
+ xfree (release);
+ }
+ rl_undo_list = (UNDO_LIST *)NULL;
+ replace_history_data (-1, (histdata_t *)orig_list, (histdata_t *)NULL);
+}
+
+UNDO_LIST *
+_rl_copy_undo_entry (entry)
+ UNDO_LIST *entry;
+{
+ UNDO_LIST *new;
+
+ new = alloc_undo_entry (entry->what, entry->start, entry->end, (char *)NULL);
+ new->text = entry->text ? savestring (entry->text) : 0;
+ return new;
+}
+
+UNDO_LIST *
+_rl_copy_undo_list (head)
+ UNDO_LIST *head;
+{
+ UNDO_LIST *list, *new, *roving, *c;
+
+ if (head == 0)
+ return head;
+
+ list = head;
+ new = 0;
+ while (list)
+ {
+ c = _rl_copy_undo_entry (list);
+ if (new == 0)
+ roving = new = c;
+ else
+ {
+ roving->next = c;
+ roving = roving->next;
+ }
+ list = list->next;
+ }
+
+ roving->next = 0;
+ return new;
+}
+
+/* Undo the next thing in the list. Return 0 if there
+ is nothing to undo, or non-zero if there was. */
+int
+rl_do_undo ()
+{
+ UNDO_LIST *release;
+ int waiting_for_begin, start, end;
+
+#define TRANS(i) ((i) == -1 ? rl_point : ((i) == -2 ? rl_end : (i)))
+
+ start = end = waiting_for_begin = 0;
+ do
+ {
+ if (rl_undo_list == 0)
+ return (0);
+
+ _rl_doing_an_undo = 1;
+ RL_SETSTATE(RL_STATE_UNDOING);
+
+ /* To better support vi-mode, a start or end value of -1 means
+ rl_point, and a value of -2 means rl_end. */
+ if (rl_undo_list->what == UNDO_DELETE || rl_undo_list->what == UNDO_INSERT)
+ {
+ start = TRANS (rl_undo_list->start);
+ end = TRANS (rl_undo_list->end);
+ }
+
+ switch (rl_undo_list->what)
+ {
+ /* Undoing deletes means inserting some text. */
+ case UNDO_DELETE:
+ rl_point = start;
+ rl_insert_text (rl_undo_list->text);
+ xfree (rl_undo_list->text);
+ break;
+
+ /* Undoing inserts means deleting some text. */
+ case UNDO_INSERT:
+ rl_delete_text (start, end);
+ rl_point = start;
+ break;
+
+ /* Undoing an END means undoing everything 'til we get to a BEGIN. */
+ case UNDO_END:
+ waiting_for_begin++;
+ break;
+
+ /* Undoing a BEGIN means that we are done with this group. */
+ case UNDO_BEGIN:
+ if (waiting_for_begin)
+ waiting_for_begin--;
+ else
+ rl_ding ();
+ break;
+ }
+
+ _rl_doing_an_undo = 0;
+ RL_UNSETSTATE(RL_STATE_UNDOING);
+
+ release = rl_undo_list;
+ rl_undo_list = rl_undo_list->next;
+ replace_history_data (-1, (histdata_t *)release, (histdata_t *)rl_undo_list);
+
+ xfree (release);
+ }
+ while (waiting_for_begin);
+
+ return (1);
+}
+#undef TRANS
+
+int
+_rl_fix_last_undo_of_type (type, start, end)
+ int type, start, end;
+{
+ UNDO_LIST *rl;
+
+ for (rl = rl_undo_list; rl; rl = rl->next)
+ {
+ if (rl->what == type)
+ {
+ rl->start = start;
+ rl->end = end;
+ return 0;
+ }
+ }
+ return 1;
+}
+
+/* Begin a group. Subsequent undos are undone as an atomic operation. */
+int
+rl_begin_undo_group ()
+{
+ rl_add_undo (UNDO_BEGIN, 0, 0, 0);
+ _rl_undo_group_level++;
+ return 0;
+}
+
+/* End an undo group started with rl_begin_undo_group (). */
+int
+rl_end_undo_group ()
+{
+ rl_add_undo (UNDO_END, 0, 0, 0);
+ _rl_undo_group_level--;
+ return 0;
+}
+
+/* Save an undo entry for the text from START to END. */
+int
+rl_modifying (start, end)
+ int start, end;
+{
+ if (start > end)
+ {
+ SWAP (start, end);
+ }
+
+ if (start != end)
+ {
+ char *temp = rl_copy_text (start, end);
+ rl_begin_undo_group ();
+ rl_add_undo (UNDO_DELETE, start, end, temp);
+ rl_add_undo (UNDO_INSERT, start, end, (char *)NULL);
+ rl_end_undo_group ();
+ }
+ return 0;
+}
+
+/* Revert the current line to its previous state. */
+int
+rl_revert_line (count, key)
+ int count, key;
+{
+ if (rl_undo_list == 0)
+ rl_ding ();
+ else
+ {
+ while (rl_undo_list)
+ rl_do_undo ();
+#if defined (VI_MODE)
+ if (rl_editing_mode == vi_mode)
+ rl_point = rl_mark = 0; /* rl_end should be set correctly */
+#endif
+ }
+
+ return 0;
+}
+
+/* Do some undoing of things that were done. */
+int
+rl_undo_command (count, key)
+ int count, key;
+{
+ if (count < 0)
+ return 0; /* Nothing to do. */
+
+ while (count)
+ {
+ if (rl_do_undo ())
+ count--;
+ else
+ {
+ rl_ding ();
+ break;
+ }
+ }
+ return 0;
+}
diff --git a/lib/readline/util.c b/lib/readline/util.c
new file mode 100644
index 0000000..6bb64c2
--- /dev/null
+++ b/lib/readline/util.c
@@ -0,0 +1,511 @@
+/* util.c -- readline utility functions */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <fcntl.h>
+#include "posixjmp.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h> /* for _POSIX_VERSION */
+#endif /* HAVE_UNISTD_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#include <stdio.h>
+#include <ctype.h>
+
+/* System-specific feature definitions and include files. */
+#include "rldefs.h"
+#include "rlmbutil.h"
+
+#if defined (TIOCSTAT_IN_SYS_IOCTL)
+# include <sys/ioctl.h>
+#endif /* TIOCSTAT_IN_SYS_IOCTL */
+
+/* Some standard library routines. */
+#include "readline.h"
+
+#include "rlprivate.h"
+#include "xmalloc.h"
+
+/* **************************************************************** */
+/* */
+/* Utility Functions */
+/* */
+/* **************************************************************** */
+
+/* Return 0 if C is not a member of the class of characters that belong
+ in words, or 1 if it is. */
+
+int _rl_allow_pathname_alphabetic_chars = 0;
+static const char * const pathname_alphabetic_chars = "/-_=~.#$";
+
+int
+rl_alphabetic (c)
+ int c;
+{
+ if (ALPHABETIC (c))
+ return (1);
+
+ return (_rl_allow_pathname_alphabetic_chars &&
+ strchr (pathname_alphabetic_chars, c) != NULL);
+}
+
+#if defined (HANDLE_MULTIBYTE)
+int
+_rl_walphabetic (wchar_t wc)
+{
+ int c;
+
+ if (iswalnum (wc))
+ return (1);
+
+ c = wc & 0177;
+ return (_rl_allow_pathname_alphabetic_chars &&
+ strchr (pathname_alphabetic_chars, c) != NULL);
+}
+#endif
+
+/* How to abort things. */
+int
+_rl_abort_internal ()
+{
+ rl_ding ();
+ rl_clear_message ();
+ _rl_reset_argument ();
+ rl_clear_pending_input ();
+
+ RL_UNSETSTATE (RL_STATE_MACRODEF);
+ while (rl_executing_macro)
+ _rl_pop_executing_macro ();
+
+ rl_last_func = (rl_command_func_t *)NULL;
+ longjmp (_rl_top_level, 1);
+ return (0);
+}
+
+int
+rl_abort (count, key)
+ int count, key;
+{
+ return (_rl_abort_internal ());
+}
+
+int
+_rl_null_function (count, key)
+ int count, key;
+{
+ return 0;
+}
+
+int
+rl_tty_status (count, key)
+ int count, key;
+{
+#if defined (TIOCSTAT)
+ ioctl (1, TIOCSTAT, (char *)0);
+ rl_refresh_line (count, key);
+#else
+ rl_ding ();
+#endif
+ return 0;
+}
+
+/* Return a copy of the string between FROM and TO.
+ FROM is inclusive, TO is not. */
+char *
+rl_copy_text (from, to)
+ int from, to;
+{
+ register int length;
+ char *copy;
+
+ /* Fix it if the caller is confused. */
+ if (from > to)
+ SWAP (from, to);
+
+ length = to - from;
+ copy = (char *)xmalloc (1 + length);
+ strncpy (copy, rl_line_buffer + from, length);
+ copy[length] = '\0';
+ return (copy);
+}
+
+/* Increase the size of RL_LINE_BUFFER until it has enough space to hold
+ LEN characters. */
+void
+rl_extend_line_buffer (len)
+ int len;
+{
+ while (len >= rl_line_buffer_len)
+ {
+ rl_line_buffer_len += DEFAULT_BUFFER_SIZE;
+ rl_line_buffer = (char *)xrealloc (rl_line_buffer, rl_line_buffer_len);
+ }
+
+ _rl_set_the_line ();
+}
+
+
+/* A function for simple tilde expansion. */
+int
+rl_tilde_expand (ignore, key)
+ int ignore, key;
+{
+ register int start, end;
+ char *homedir, *temp;
+ int len;
+
+ end = rl_point;
+ start = end - 1;
+
+ if (rl_point == rl_end && rl_line_buffer[rl_point] == '~')
+ {
+ homedir = tilde_expand ("~");
+ _rl_replace_text (homedir, start, end);
+ xfree (homedir);
+ return (0);
+ }
+ else if (rl_line_buffer[start] != '~')
+ {
+ for (; !whitespace (rl_line_buffer[start]) && start >= 0; start--)
+ ;
+ start++;
+ }
+
+ end = start;
+ do
+ end++;
+ while (whitespace (rl_line_buffer[end]) == 0 && end < rl_end);
+
+ if (whitespace (rl_line_buffer[end]) || end >= rl_end)
+ end--;
+
+ /* If the first character of the current word is a tilde, perform
+ tilde expansion and insert the result. If not a tilde, do
+ nothing. */
+ if (rl_line_buffer[start] == '~')
+ {
+ len = end - start + 1;
+ temp = (char *)xmalloc (len + 1);
+ strncpy (temp, rl_line_buffer + start, len);
+ temp[len] = '\0';
+ homedir = tilde_expand (temp);
+ xfree (temp);
+
+ _rl_replace_text (homedir, start, end);
+ xfree (homedir);
+ }
+
+ return (0);
+}
+
+#if defined (USE_VARARGS)
+void
+#if defined (PREFER_STDARG)
+_rl_ttymsg (const char *format, ...)
+#else
+_rl_ttymsg (va_alist)
+ va_dcl
+#endif
+{
+ va_list args;
+#if defined (PREFER_VARARGS)
+ char *format;
+#endif
+
+#if defined (PREFER_STDARG)
+ va_start (args, format);
+#else
+ va_start (args);
+ format = va_arg (args, char *);
+#endif
+
+ fprintf (stderr, "readline: ");
+ vfprintf (stderr, format, args);
+ fprintf (stderr, "\n");
+ fflush (stderr);
+
+ va_end (args);
+
+ rl_forced_update_display ();
+}
+
+void
+#if defined (PREFER_STDARG)
+_rl_errmsg (const char *format, ...)
+#else
+_rl_errmsg (va_alist)
+ va_dcl
+#endif
+{
+ va_list args;
+#if defined (PREFER_VARARGS)
+ char *format;
+#endif
+
+#if defined (PREFER_STDARG)
+ va_start (args, format);
+#else
+ va_start (args);
+ format = va_arg (args, char *);
+#endif
+
+ fprintf (stderr, "readline: ");
+ vfprintf (stderr, format, args);
+ fprintf (stderr, "\n");
+ fflush (stderr);
+
+ va_end (args);
+}
+
+#else /* !USE_VARARGS */
+void
+_rl_ttymsg (format, arg1, arg2)
+ char *format;
+{
+ fprintf (stderr, "readline: ");
+ fprintf (stderr, format, arg1, arg2);
+ fprintf (stderr, "\n");
+
+ rl_forced_update_display ();
+}
+
+void
+_rl_errmsg (format, arg1, arg2)
+ char *format;
+{
+ fprintf (stderr, "readline: ");
+ fprintf (stderr, format, arg1, arg2);
+ fprintf (stderr, "\n");
+}
+#endif /* !USE_VARARGS */
+
+/* **************************************************************** */
+/* */
+/* String Utility Functions */
+/* */
+/* **************************************************************** */
+
+/* Determine if s2 occurs in s1. If so, return a pointer to the
+ match in s1. The compare is case insensitive. */
+char *
+_rl_strindex (s1, s2)
+ register const char *s1, *s2;
+{
+ register int i, l, len;
+
+ for (i = 0, l = strlen (s2), len = strlen (s1); (len - i) >= l; i++)
+ if (_rl_strnicmp (s1 + i, s2, l) == 0)
+ return ((char *) (s1 + i));
+ return ((char *)NULL);
+}
+
+#ifndef HAVE_STRPBRK
+/* Find the first occurrence in STRING1 of any character from STRING2.
+ Return a pointer to the character in STRING1. */
+char *
+_rl_strpbrk (string1, string2)
+ const char *string1, *string2;
+{
+ register const char *scan;
+#if defined (HANDLE_MULTIBYTE)
+ mbstate_t ps;
+ register int i, v;
+
+ memset (&ps, 0, sizeof (mbstate_t));
+#endif
+
+ for (; *string1; string1++)
+ {
+ for (scan = string2; *scan; scan++)
+ {
+ if (*string1 == *scan)
+ return ((char *)string1);
+ }
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ v = _rl_get_char_len (string1, &ps);
+ if (v > 1)
+ string1 += v - 1; /* -1 to account for auto-increment in loop */
+ }
+#endif
+ }
+ return ((char *)NULL);
+}
+#endif
+
+#if !defined (HAVE_STRCASECMP)
+/* Compare at most COUNT characters from string1 to string2. Case
+ doesn't matter. */
+int
+_rl_strnicmp (string1, string2, count)
+ char *string1, *string2;
+ int count;
+{
+ register char ch1, ch2;
+
+ while (count)
+ {
+ ch1 = *string1++;
+ ch2 = *string2++;
+ if (_rl_to_upper(ch1) == _rl_to_upper(ch2))
+ count--;
+ else
+ break;
+ }
+ return (count);
+}
+
+/* strcmp (), but caseless. */
+int
+_rl_stricmp (string1, string2)
+ char *string1, *string2;
+{
+ register char ch1, ch2;
+
+ while (*string1 && *string2)
+ {
+ ch1 = *string1++;
+ ch2 = *string2++;
+ if (_rl_to_upper(ch1) != _rl_to_upper(ch2))
+ return (1);
+ }
+ return (*string1 - *string2);
+}
+#endif /* !HAVE_STRCASECMP */
+
+/* Stupid comparison routine for qsort () ing strings. */
+int
+_rl_qsort_string_compare (s1, s2)
+ char **s1, **s2;
+{
+#if defined (HAVE_STRCOLL)
+ return (strcoll (*s1, *s2));
+#else
+ int result;
+
+ result = **s1 - **s2;
+ if (result == 0)
+ result = strcmp (*s1, *s2);
+
+ return result;
+#endif
+}
+
+/* Function equivalents for the macros defined in chardefs.h. */
+#define FUNCTION_FOR_MACRO(f) int (f) (c) int c; { return f (c); }
+
+FUNCTION_FOR_MACRO (_rl_digit_p)
+FUNCTION_FOR_MACRO (_rl_digit_value)
+FUNCTION_FOR_MACRO (_rl_lowercase_p)
+FUNCTION_FOR_MACRO (_rl_pure_alphabetic)
+FUNCTION_FOR_MACRO (_rl_to_lower)
+FUNCTION_FOR_MACRO (_rl_to_upper)
+FUNCTION_FOR_MACRO (_rl_uppercase_p)
+
+/* A convenience function, to force memory deallocation to be performed
+ by readline. DLLs on Windows apparently require this. */
+void
+rl_free (mem)
+ void *mem;
+{
+ if (mem)
+ free (mem);
+}
+
+/* Backwards compatibility, now that savestring has been removed from
+ all `public' readline header files. */
+#undef _rl_savestring
+char *
+_rl_savestring (s)
+ const char *s;
+{
+ return (strcpy ((char *)xmalloc (1 + (int)strlen (s)), (s)));
+}
+
+#if defined (USE_VARARGS)
+static FILE *_rl_tracefp;
+
+void
+#if defined (PREFER_STDARG)
+_rl_trace (const char *format, ...)
+#else
+_rl_trace (va_alist)
+ va_dcl
+#endif
+{
+ va_list args;
+#if defined (PREFER_VARARGS)
+ char *format;
+#endif
+
+#if defined (PREFER_STDARG)
+ va_start (args, format);
+#else
+ va_start (args);
+ format = va_arg (args, char *);
+#endif
+
+ if (_rl_tracefp == 0)
+ _rl_tropen ();
+ vfprintf (_rl_tracefp, format, args);
+ fprintf (_rl_tracefp, "\n");
+ fflush (_rl_tracefp);
+
+ va_end (args);
+}
+
+int
+_rl_tropen ()
+{
+ char fnbuf[128];
+
+ if (_rl_tracefp)
+ fclose (_rl_tracefp);
+ sprintf (fnbuf, "/var/tmp/rltrace.%ld", getpid());
+ unlink(fnbuf);
+ _rl_tracefp = fopen (fnbuf, "w+");
+ return _rl_tracefp != 0;
+}
+
+int
+_rl_trclose ()
+{
+ int r;
+
+ r = fclose (_rl_tracefp);
+ _rl_tracefp = 0;
+ return r;
+}
+
+#endif
diff --git a/lib/readline/vi_keymap.c b/lib/readline/vi_keymap.c
new file mode 100644
index 0000000..ba5a27b
--- /dev/null
+++ b/lib/readline/vi_keymap.c
@@ -0,0 +1,876 @@
+/* vi_keymap.c -- the keymap for vi_mode in readline (). */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (BUFSIZ)
+#include <stdio.h>
+#endif /* !BUFSIZ */
+
+#include "readline.h"
+
+#if 0
+extern KEYMAP_ENTRY_ARRAY vi_escape_keymap;
+#endif
+
+/* The keymap arrays for handling vi mode. */
+KEYMAP_ENTRY_ARRAY vi_movement_keymap = {
+ /* The regular control keys come first. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-a */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-b */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */
+ { ISFUNC, rl_vi_eof_maybe }, /* Control-d */
+ { ISFUNC, rl_emacs_editing_mode }, /* Control-e */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-f */
+ { ISFUNC, rl_abort }, /* Control-g */
+ { ISFUNC, rl_backward_char }, /* Control-h */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-i */
+ { ISFUNC, rl_newline }, /* Control-j */
+ { ISFUNC, rl_kill_line }, /* Control-k */
+ { ISFUNC, rl_clear_screen }, /* Control-l */
+ { ISFUNC, rl_newline }, /* Control-m */
+ { ISFUNC, rl_get_next_history }, /* Control-n */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */
+ { ISFUNC, rl_get_previous_history }, /* Control-p */
+ { ISFUNC, rl_quoted_insert }, /* Control-q */
+ { ISFUNC, rl_reverse_search_history }, /* Control-r */
+ { ISFUNC, rl_forward_search_history }, /* Control-s */
+ { ISFUNC, rl_transpose_chars }, /* Control-t */
+ { ISFUNC, rl_unix_line_discard }, /* Control-u */
+ { ISFUNC, rl_quoted_insert }, /* Control-v */
+ { ISFUNC, rl_unix_word_rubout }, /* Control-w */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-x */
+ { ISFUNC, rl_yank }, /* Control-y */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */
+
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-[ */ /* vi_escape_keymap */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-] */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */
+ { ISFUNC, rl_vi_undo }, /* Control-_ */
+
+ /* The start of printing characters. */
+ { ISFUNC, rl_forward_char }, /* SPACE */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ! */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* " */
+ { ISFUNC, rl_insert_comment }, /* # */
+ { ISFUNC, rl_end_of_line }, /* $ */
+ { ISFUNC, rl_vi_match }, /* % */
+ { ISFUNC, rl_vi_tilde_expand }, /* & */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ' */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ( */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ) */
+ { ISFUNC, rl_vi_complete }, /* * */
+ { ISFUNC, rl_get_next_history}, /* + */
+ { ISFUNC, rl_vi_char_search }, /* , */
+ { ISFUNC, rl_get_previous_history }, /* - */
+ { ISFUNC, rl_vi_redo }, /* . */
+ { ISFUNC, rl_vi_search }, /* / */
+
+ /* Regular digits. */
+ { ISFUNC, rl_beg_of_line }, /* 0 */
+ { ISFUNC, rl_vi_arg_digit }, /* 1 */
+ { ISFUNC, rl_vi_arg_digit }, /* 2 */
+ { ISFUNC, rl_vi_arg_digit }, /* 3 */
+ { ISFUNC, rl_vi_arg_digit }, /* 4 */
+ { ISFUNC, rl_vi_arg_digit }, /* 5 */
+ { ISFUNC, rl_vi_arg_digit }, /* 6 */
+ { ISFUNC, rl_vi_arg_digit }, /* 7 */
+ { ISFUNC, rl_vi_arg_digit }, /* 8 */
+ { ISFUNC, rl_vi_arg_digit }, /* 9 */
+
+ /* A little more punctuation. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* : */
+ { ISFUNC, rl_vi_char_search }, /* ; */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* < */
+ { ISFUNC, rl_vi_complete }, /* = */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* > */
+ { ISFUNC, rl_vi_search }, /* ? */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* @ */
+
+ /* Uppercase alphabet. */
+ { ISFUNC, rl_vi_append_eol }, /* A */
+ { ISFUNC, rl_vi_prev_word}, /* B */
+ { ISFUNC, rl_vi_change_to }, /* C */
+ { ISFUNC, rl_vi_delete_to }, /* D */
+ { ISFUNC, rl_vi_end_word }, /* E */
+ { ISFUNC, rl_vi_char_search }, /* F */
+ { ISFUNC, rl_vi_fetch_history }, /* G */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* H */
+ { ISFUNC, rl_vi_insert_beg }, /* I */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* J */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* K */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* L */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* M */
+ { ISFUNC, rl_vi_search_again }, /* N */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* O */
+ { ISFUNC, rl_vi_put }, /* P */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Q */
+ { ISFUNC, rl_vi_replace }, /* R */
+ { ISFUNC, rl_vi_subst }, /* S */
+ { ISFUNC, rl_vi_char_search }, /* T */
+ { ISFUNC, rl_revert_line }, /* U */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* V */
+ { ISFUNC, rl_vi_next_word }, /* W */
+ { ISFUNC, rl_vi_rubout }, /* X */
+ { ISFUNC, rl_vi_yank_to }, /* Y */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Z */
+
+ /* Some more punctuation. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* [ */
+ { ISFUNC, rl_vi_complete }, /* \ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ] */
+ { ISFUNC, rl_vi_first_print }, /* ^ */
+ { ISFUNC, rl_vi_yank_arg }, /* _ */
+ { ISFUNC, rl_vi_goto_mark }, /* ` */
+
+ /* Lowercase alphabet. */
+ { ISFUNC, rl_vi_append_mode }, /* a */
+ { ISFUNC, rl_vi_prev_word }, /* b */
+ { ISFUNC, rl_vi_change_to }, /* c */
+ { ISFUNC, rl_vi_delete_to }, /* d */
+ { ISFUNC, rl_vi_end_word }, /* e */
+ { ISFUNC, rl_vi_char_search }, /* f */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* g */
+ { ISFUNC, rl_backward_char }, /* h */
+ { ISFUNC, rl_vi_insert_mode }, /* i */
+ { ISFUNC, rl_get_next_history }, /* j */
+ { ISFUNC, rl_get_previous_history }, /* k */
+ { ISFUNC, rl_forward_char }, /* l */
+ { ISFUNC, rl_vi_set_mark }, /* m */
+ { ISFUNC, rl_vi_search_again }, /* n */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* o */
+ { ISFUNC, rl_vi_put }, /* p */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* q */
+ { ISFUNC, rl_vi_change_char }, /* r */
+ { ISFUNC, rl_vi_subst }, /* s */
+ { ISFUNC, rl_vi_char_search }, /* t */
+ { ISFUNC, rl_vi_undo }, /* u */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* v */
+ { ISFUNC, rl_vi_next_word }, /* w */
+ { ISFUNC, rl_vi_delete }, /* x */
+ { ISFUNC, rl_vi_yank_to }, /* y */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* z */
+
+ /* Final punctuation. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* { */
+ { ISFUNC, rl_vi_column }, /* | */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* } */
+ { ISFUNC, rl_vi_change_case }, /* ~ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* RUBOUT */
+
+#if KEYMAP_SIZE > 128
+ /* Undefined keys. */
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 }
+#endif /* KEYMAP_SIZE > 128 */
+};
+
+
+KEYMAP_ENTRY_ARRAY vi_insertion_keymap = {
+ /* The regular control keys come first. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */
+ { ISFUNC, rl_insert }, /* Control-a */
+ { ISFUNC, rl_insert }, /* Control-b */
+ { ISFUNC, rl_insert }, /* Control-c */
+ { ISFUNC, rl_vi_eof_maybe }, /* Control-d */
+ { ISFUNC, rl_insert }, /* Control-e */
+ { ISFUNC, rl_insert }, /* Control-f */
+ { ISFUNC, rl_insert }, /* Control-g */
+ { ISFUNC, rl_rubout }, /* Control-h */
+ { ISFUNC, rl_complete }, /* Control-i */
+ { ISFUNC, rl_newline }, /* Control-j */
+ { ISFUNC, rl_insert }, /* Control-k */
+ { ISFUNC, rl_insert }, /* Control-l */
+ { ISFUNC, rl_newline }, /* Control-m */
+ { ISFUNC, rl_menu_complete}, /* Control-n */
+ { ISFUNC, rl_insert }, /* Control-o */
+ { ISFUNC, rl_backward_menu_complete }, /* Control-p */
+ { ISFUNC, rl_insert }, /* Control-q */
+ { ISFUNC, rl_reverse_search_history }, /* Control-r */
+ { ISFUNC, rl_forward_search_history }, /* Control-s */
+ { ISFUNC, rl_transpose_chars }, /* Control-t */
+ { ISFUNC, rl_unix_line_discard }, /* Control-u */
+ { ISFUNC, rl_quoted_insert }, /* Control-v */
+ { ISFUNC, rl_unix_word_rubout }, /* Control-w */
+ { ISFUNC, rl_insert }, /* Control-x */
+ { ISFUNC, rl_yank }, /* Control-y */
+ { ISFUNC, rl_insert }, /* Control-z */
+
+ { ISFUNC, rl_vi_movement_mode }, /* Control-[ */
+ { ISFUNC, rl_insert }, /* Control-\ */
+ { ISFUNC, rl_insert }, /* Control-] */
+ { ISFUNC, rl_insert }, /* Control-^ */
+ { ISFUNC, rl_vi_undo }, /* Control-_ */
+
+ /* The start of printing characters. */
+ { ISFUNC, rl_insert }, /* SPACE */
+ { ISFUNC, rl_insert }, /* ! */
+ { ISFUNC, rl_insert }, /* " */
+ { ISFUNC, rl_insert }, /* # */
+ { ISFUNC, rl_insert }, /* $ */
+ { ISFUNC, rl_insert }, /* % */
+ { ISFUNC, rl_insert }, /* & */
+ { ISFUNC, rl_insert }, /* ' */
+ { ISFUNC, rl_insert }, /* ( */
+ { ISFUNC, rl_insert }, /* ) */
+ { ISFUNC, rl_insert }, /* * */
+ { ISFUNC, rl_insert }, /* + */
+ { ISFUNC, rl_insert }, /* , */
+ { ISFUNC, rl_insert }, /* - */
+ { ISFUNC, rl_insert }, /* . */
+ { ISFUNC, rl_insert }, /* / */
+
+ /* Regular digits. */
+ { ISFUNC, rl_insert }, /* 0 */
+ { ISFUNC, rl_insert }, /* 1 */
+ { ISFUNC, rl_insert }, /* 2 */
+ { ISFUNC, rl_insert }, /* 3 */
+ { ISFUNC, rl_insert }, /* 4 */
+ { ISFUNC, rl_insert }, /* 5 */
+ { ISFUNC, rl_insert }, /* 6 */
+ { ISFUNC, rl_insert }, /* 7 */
+ { ISFUNC, rl_insert }, /* 8 */
+ { ISFUNC, rl_insert }, /* 9 */
+
+ /* A little more punctuation. */
+ { ISFUNC, rl_insert }, /* : */
+ { ISFUNC, rl_insert }, /* ; */
+ { ISFUNC, rl_insert }, /* < */
+ { ISFUNC, rl_insert }, /* = */
+ { ISFUNC, rl_insert }, /* > */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* @ */
+
+ /* Uppercase alphabet. */
+ { ISFUNC, rl_insert }, /* A */
+ { ISFUNC, rl_insert }, /* B */
+ { ISFUNC, rl_insert }, /* C */
+ { ISFUNC, rl_insert }, /* D */
+ { ISFUNC, rl_insert }, /* E */
+ { ISFUNC, rl_insert }, /* F */
+ { ISFUNC, rl_insert }, /* G */
+ { ISFUNC, rl_insert }, /* H */
+ { ISFUNC, rl_insert }, /* I */
+ { ISFUNC, rl_insert }, /* J */
+ { ISFUNC, rl_insert }, /* K */
+ { ISFUNC, rl_insert }, /* L */
+ { ISFUNC, rl_insert }, /* M */
+ { ISFUNC, rl_insert }, /* N */
+ { ISFUNC, rl_insert }, /* O */
+ { ISFUNC, rl_insert }, /* P */
+ { ISFUNC, rl_insert }, /* Q */
+ { ISFUNC, rl_insert }, /* R */
+ { ISFUNC, rl_insert }, /* S */
+ { ISFUNC, rl_insert }, /* T */
+ { ISFUNC, rl_insert }, /* U */
+ { ISFUNC, rl_insert }, /* V */
+ { ISFUNC, rl_insert }, /* W */
+ { ISFUNC, rl_insert }, /* X */
+ { ISFUNC, rl_insert }, /* Y */
+ { ISFUNC, rl_insert }, /* Z */
+
+ /* Some more punctuation. */
+ { ISFUNC, rl_insert }, /* [ */
+ { ISFUNC, rl_insert }, /* \ */
+ { ISFUNC, rl_insert }, /* ] */
+ { ISFUNC, rl_insert }, /* ^ */
+ { ISFUNC, rl_insert }, /* _ */
+ { ISFUNC, rl_insert }, /* ` */
+
+ /* Lowercase alphabet. */
+ { ISFUNC, rl_insert }, /* a */
+ { ISFUNC, rl_insert }, /* b */
+ { ISFUNC, rl_insert }, /* c */
+ { ISFUNC, rl_insert }, /* d */
+ { ISFUNC, rl_insert }, /* e */
+ { ISFUNC, rl_insert }, /* f */
+ { ISFUNC, rl_insert }, /* g */
+ { ISFUNC, rl_insert }, /* h */
+ { ISFUNC, rl_insert }, /* i */
+ { ISFUNC, rl_insert }, /* j */
+ { ISFUNC, rl_insert }, /* k */
+ { ISFUNC, rl_insert }, /* l */
+ { ISFUNC, rl_insert }, /* m */
+ { ISFUNC, rl_insert }, /* n */
+ { ISFUNC, rl_insert }, /* o */
+ { ISFUNC, rl_insert }, /* p */
+ { ISFUNC, rl_insert }, /* q */
+ { ISFUNC, rl_insert }, /* r */
+ { ISFUNC, rl_insert }, /* s */
+ { ISFUNC, rl_insert }, /* t */
+ { ISFUNC, rl_insert }, /* u */
+ { ISFUNC, rl_insert }, /* v */
+ { ISFUNC, rl_insert }, /* w */
+ { ISFUNC, rl_insert }, /* x */
+ { ISFUNC, rl_insert }, /* y */
+ { ISFUNC, rl_insert }, /* z */
+
+ /* Final punctuation. */
+ { ISFUNC, rl_insert }, /* { */
+ { ISFUNC, rl_insert }, /* | */
+ { ISFUNC, rl_insert }, /* } */
+ { ISFUNC, rl_insert }, /* ~ */
+ { ISFUNC, rl_rubout }, /* RUBOUT */
+
+#if KEYMAP_SIZE > 128
+ /* Pure 8-bit characters (128 - 159).
+ These might be used in some
+ character sets. */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+ { ISFUNC, rl_insert }, /* ? */
+
+ /* ISO Latin-1 characters (160 - 255) */
+ { ISFUNC, rl_insert }, /* No-break space */
+ { ISFUNC, rl_insert }, /* Inverted exclamation mark */
+ { ISFUNC, rl_insert }, /* Cent sign */
+ { ISFUNC, rl_insert }, /* Pound sign */
+ { ISFUNC, rl_insert }, /* Currency sign */
+ { ISFUNC, rl_insert }, /* Yen sign */
+ { ISFUNC, rl_insert }, /* Broken bar */
+ { ISFUNC, rl_insert }, /* Section sign */
+ { ISFUNC, rl_insert }, /* Diaeresis */
+ { ISFUNC, rl_insert }, /* Copyright sign */
+ { ISFUNC, rl_insert }, /* Feminine ordinal indicator */
+ { ISFUNC, rl_insert }, /* Left pointing double angle quotation mark */
+ { ISFUNC, rl_insert }, /* Not sign */
+ { ISFUNC, rl_insert }, /* Soft hyphen */
+ { ISFUNC, rl_insert }, /* Registered sign */
+ { ISFUNC, rl_insert }, /* Macron */
+ { ISFUNC, rl_insert }, /* Degree sign */
+ { ISFUNC, rl_insert }, /* Plus-minus sign */
+ { ISFUNC, rl_insert }, /* Superscript two */
+ { ISFUNC, rl_insert }, /* Superscript three */
+ { ISFUNC, rl_insert }, /* Acute accent */
+ { ISFUNC, rl_insert }, /* Micro sign */
+ { ISFUNC, rl_insert }, /* Pilcrow sign */
+ { ISFUNC, rl_insert }, /* Middle dot */
+ { ISFUNC, rl_insert }, /* Cedilla */
+ { ISFUNC, rl_insert }, /* Superscript one */
+ { ISFUNC, rl_insert }, /* Masculine ordinal indicator */
+ { ISFUNC, rl_insert }, /* Right pointing double angle quotation mark */
+ { ISFUNC, rl_insert }, /* Vulgar fraction one quarter */
+ { ISFUNC, rl_insert }, /* Vulgar fraction one half */
+ { ISFUNC, rl_insert }, /* Vulgar fraction three quarters */
+ { ISFUNC, rl_insert }, /* Inverted questionk mark */
+ { ISFUNC, rl_insert }, /* Latin capital letter a with grave */
+ { ISFUNC, rl_insert }, /* Latin capital letter a with acute */
+ { ISFUNC, rl_insert }, /* Latin capital letter a with circumflex */
+ { ISFUNC, rl_insert }, /* Latin capital letter a with tilde */
+ { ISFUNC, rl_insert }, /* Latin capital letter a with diaeresis */
+ { ISFUNC, rl_insert }, /* Latin capital letter a with ring above */
+ { ISFUNC, rl_insert }, /* Latin capital letter ae */
+ { ISFUNC, rl_insert }, /* Latin capital letter c with cedilla */
+ { ISFUNC, rl_insert }, /* Latin capital letter e with grave */
+ { ISFUNC, rl_insert }, /* Latin capital letter e with acute */
+ { ISFUNC, rl_insert }, /* Latin capital letter e with circumflex */
+ { ISFUNC, rl_insert }, /* Latin capital letter e with diaeresis */
+ { ISFUNC, rl_insert }, /* Latin capital letter i with grave */
+ { ISFUNC, rl_insert }, /* Latin capital letter i with acute */
+ { ISFUNC, rl_insert }, /* Latin capital letter i with circumflex */
+ { ISFUNC, rl_insert }, /* Latin capital letter i with diaeresis */
+ { ISFUNC, rl_insert }, /* Latin capital letter eth (Icelandic) */
+ { ISFUNC, rl_insert }, /* Latin capital letter n with tilde */
+ { ISFUNC, rl_insert }, /* Latin capital letter o with grave */
+ { ISFUNC, rl_insert }, /* Latin capital letter o with acute */
+ { ISFUNC, rl_insert }, /* Latin capital letter o with circumflex */
+ { ISFUNC, rl_insert }, /* Latin capital letter o with tilde */
+ { ISFUNC, rl_insert }, /* Latin capital letter o with diaeresis */
+ { ISFUNC, rl_insert }, /* Multiplication sign */
+ { ISFUNC, rl_insert }, /* Latin capital letter o with stroke */
+ { ISFUNC, rl_insert }, /* Latin capital letter u with grave */
+ { ISFUNC, rl_insert }, /* Latin capital letter u with acute */
+ { ISFUNC, rl_insert }, /* Latin capital letter u with circumflex */
+ { ISFUNC, rl_insert }, /* Latin capital letter u with diaeresis */
+ { ISFUNC, rl_insert }, /* Latin capital letter Y with acute */
+ { ISFUNC, rl_insert }, /* Latin capital letter thorn (Icelandic) */
+ { ISFUNC, rl_insert }, /* Latin small letter sharp s (German) */
+ { ISFUNC, rl_insert }, /* Latin small letter a with grave */
+ { ISFUNC, rl_insert }, /* Latin small letter a with acute */
+ { ISFUNC, rl_insert }, /* Latin small letter a with circumflex */
+ { ISFUNC, rl_insert }, /* Latin small letter a with tilde */
+ { ISFUNC, rl_insert }, /* Latin small letter a with diaeresis */
+ { ISFUNC, rl_insert }, /* Latin small letter a with ring above */
+ { ISFUNC, rl_insert }, /* Latin small letter ae */
+ { ISFUNC, rl_insert }, /* Latin small letter c with cedilla */
+ { ISFUNC, rl_insert }, /* Latin small letter e with grave */
+ { ISFUNC, rl_insert }, /* Latin small letter e with acute */
+ { ISFUNC, rl_insert }, /* Latin small letter e with circumflex */
+ { ISFUNC, rl_insert }, /* Latin small letter e with diaeresis */
+ { ISFUNC, rl_insert }, /* Latin small letter i with grave */
+ { ISFUNC, rl_insert }, /* Latin small letter i with acute */
+ { ISFUNC, rl_insert }, /* Latin small letter i with circumflex */
+ { ISFUNC, rl_insert }, /* Latin small letter i with diaeresis */
+ { ISFUNC, rl_insert }, /* Latin small letter eth (Icelandic) */
+ { ISFUNC, rl_insert }, /* Latin small letter n with tilde */
+ { ISFUNC, rl_insert }, /* Latin small letter o with grave */
+ { ISFUNC, rl_insert }, /* Latin small letter o with acute */
+ { ISFUNC, rl_insert }, /* Latin small letter o with circumflex */
+ { ISFUNC, rl_insert }, /* Latin small letter o with tilde */
+ { ISFUNC, rl_insert }, /* Latin small letter o with diaeresis */
+ { ISFUNC, rl_insert }, /* Division sign */
+ { ISFUNC, rl_insert }, /* Latin small letter o with stroke */
+ { ISFUNC, rl_insert }, /* Latin small letter u with grave */
+ { ISFUNC, rl_insert }, /* Latin small letter u with acute */
+ { ISFUNC, rl_insert }, /* Latin small letter u with circumflex */
+ { ISFUNC, rl_insert }, /* Latin small letter u with diaeresis */
+ { ISFUNC, rl_insert }, /* Latin small letter y with acute */
+ { ISFUNC, rl_insert }, /* Latin small letter thorn (Icelandic) */
+ { ISFUNC, rl_insert } /* Latin small letter y with diaeresis */
+#endif /* KEYMAP_SIZE > 128 */
+};
+
+/* Unused for the time being. */
+#if 0
+KEYMAP_ENTRY_ARRAY vi_escape_keymap = {
+ /* The regular control keys come first. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-@ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-a */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-b */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-c */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-d */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-e */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-f */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-g */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-h */
+ { ISFUNC, rl_tab_insert}, /* Control-i */
+ { ISFUNC, rl_emacs_editing_mode}, /* Control-j */
+ { ISFUNC, rl_kill_line }, /* Control-k */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-l */
+ { ISFUNC, rl_emacs_editing_mode}, /* Control-m */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-n */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-o */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-p */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-q */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-r */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-s */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-t */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-u */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-v */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-w */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-x */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-y */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-z */
+
+ { ISFUNC, rl_vi_movement_mode }, /* Control-[ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-\ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-] */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* Control-^ */
+ { ISFUNC, rl_vi_undo }, /* Control-_ */
+
+ /* The start of printing characters. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* SPACE */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ! */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* " */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* # */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* $ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* % */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* & */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ' */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ( */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ) */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* * */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* + */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* , */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* - */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* . */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* / */
+
+ /* Regular digits. */
+ { ISFUNC, rl_vi_arg_digit }, /* 0 */
+ { ISFUNC, rl_vi_arg_digit }, /* 1 */
+ { ISFUNC, rl_vi_arg_digit }, /* 2 */
+ { ISFUNC, rl_vi_arg_digit }, /* 3 */
+ { ISFUNC, rl_vi_arg_digit }, /* 4 */
+ { ISFUNC, rl_vi_arg_digit }, /* 5 */
+ { ISFUNC, rl_vi_arg_digit }, /* 6 */
+ { ISFUNC, rl_vi_arg_digit }, /* 7 */
+ { ISFUNC, rl_vi_arg_digit }, /* 8 */
+ { ISFUNC, rl_vi_arg_digit }, /* 9 */
+
+ /* A little more punctuation. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* : */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ; */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* < */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* = */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* > */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ? */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* @ */
+
+ /* Uppercase alphabet. */
+ { ISFUNC, rl_do_lowercase_version }, /* A */
+ { ISFUNC, rl_do_lowercase_version }, /* B */
+ { ISFUNC, rl_do_lowercase_version }, /* C */
+ { ISFUNC, rl_do_lowercase_version }, /* D */
+ { ISFUNC, rl_do_lowercase_version }, /* E */
+ { ISFUNC, rl_do_lowercase_version }, /* F */
+ { ISFUNC, rl_do_lowercase_version }, /* G */
+ { ISFUNC, rl_do_lowercase_version }, /* H */
+ { ISFUNC, rl_do_lowercase_version }, /* I */
+ { ISFUNC, rl_do_lowercase_version }, /* J */
+ { ISFUNC, rl_do_lowercase_version }, /* K */
+ { ISFUNC, rl_do_lowercase_version }, /* L */
+ { ISFUNC, rl_do_lowercase_version }, /* M */
+ { ISFUNC, rl_do_lowercase_version }, /* N */
+ { ISFUNC, rl_do_lowercase_version }, /* O */
+ { ISFUNC, rl_do_lowercase_version }, /* P */
+ { ISFUNC, rl_do_lowercase_version }, /* Q */
+ { ISFUNC, rl_do_lowercase_version }, /* R */
+ { ISFUNC, rl_do_lowercase_version }, /* S */
+ { ISFUNC, rl_do_lowercase_version }, /* T */
+ { ISFUNC, rl_do_lowercase_version }, /* U */
+ { ISFUNC, rl_do_lowercase_version }, /* V */
+ { ISFUNC, rl_do_lowercase_version }, /* W */
+ { ISFUNC, rl_do_lowercase_version }, /* X */
+ { ISFUNC, rl_do_lowercase_version }, /* Y */
+ { ISFUNC, rl_do_lowercase_version }, /* Z */
+
+ /* Some more punctuation. */
+ { ISFUNC, rl_arrow_keys }, /* [ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* \ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ] */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ^ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* _ */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ` */
+
+ /* Lowercase alphabet. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* a */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* b */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* c */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* d */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* e */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* f */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* g */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* h */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* i */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* j */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* k */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* l */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* m */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* n */
+ { ISFUNC, rl_arrow_keys }, /* o */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* p */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* q */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* r */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* s */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* t */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* u */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* v */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* w */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* x */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* y */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* z */
+
+ /* Final punctuation. */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* { */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* | */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* } */
+ { ISFUNC, (rl_command_func_t *)0x0 }, /* ~ */
+ { ISFUNC, rl_backward_kill_word }, /* RUBOUT */
+
+#if KEYMAP_SIZE > 128
+ /* Undefined keys. */
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 },
+ { ISFUNC, (rl_command_func_t *)0x0 }
+#endif /* KEYMAP_SIZE > 128 */
+};
+#endif
diff --git a/lib/readline/vi_mode.c b/lib/readline/vi_mode.c
new file mode 100644
index 0000000..2a120c0
--- /dev/null
+++ b/lib/readline/vi_mode.c
@@ -0,0 +1,1825 @@
+/* vi_mode.c -- A vi emulation mode for Bash.
+ Derived from code written by Jeff Sparkes (jsparkes@bnr.ca). */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+/* **************************************************************** */
+/* */
+/* VI Emulation Mode */
+/* */
+/* **************************************************************** */
+#include "rlconf.h"
+
+#if defined (VI_MODE)
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+
+/* Some standard library routines. */
+#include "rldefs.h"
+#include "rlmbutil.h"
+
+#include "readline.h"
+#include "history.h"
+
+#include "rlprivate.h"
+#include "xmalloc.h"
+
+#ifndef member
+#define member(c, s) ((c) ? (char *)strchr ((s), (c)) != (char *)NULL : 0)
+#endif
+
+int _rl_vi_last_command = 'i'; /* default `.' puts you in insert mode */
+
+/* Non-zero means enter insertion mode. */
+static int _rl_vi_doing_insert;
+
+/* Command keys which do movement for xxx_to commands. */
+static const char * const vi_motion = " hl^$0ftFT;,%wbeWBE|`";
+
+/* Keymap used for vi replace characters. Created dynamically since
+ rarely used. */
+static Keymap vi_replace_map;
+
+/* The number of characters inserted in the last replace operation. */
+static int vi_replace_count;
+
+/* If non-zero, we have text inserted after a c[motion] command that put
+ us implicitly into insert mode. Some people want this text to be
+ attached to the command so that it is `redoable' with `.'. */
+static int vi_continued_command;
+static char *vi_insert_buffer;
+static int vi_insert_buffer_size;
+
+static int _rl_vi_last_repeat = 1;
+static int _rl_vi_last_arg_sign = 1;
+static int _rl_vi_last_motion;
+#if defined (HANDLE_MULTIBYTE)
+static char _rl_vi_last_search_mbchar[MB_LEN_MAX];
+static int _rl_vi_last_search_mblen;
+#else
+static int _rl_vi_last_search_char;
+#endif
+static int _rl_vi_last_replacement;
+
+static int _rl_vi_last_key_before_insert;
+
+static int vi_redoing;
+
+/* Text modification commands. These are the `redoable' commands. */
+static const char * const vi_textmod = "_*\\AaIiCcDdPpYyRrSsXx~";
+
+/* Arrays for the saved marks. */
+static int vi_mark_chars['z' - 'a' + 1];
+
+static void _rl_vi_stuff_insert PARAMS((int));
+static void _rl_vi_save_insert PARAMS((UNDO_LIST *));
+
+static void _rl_vi_backup PARAMS((void));
+
+static int _rl_vi_arg_dispatch PARAMS((int));
+static int rl_digit_loop1 PARAMS((void));
+
+static int _rl_vi_set_mark PARAMS((void));
+static int _rl_vi_goto_mark PARAMS((void));
+
+static void _rl_vi_append_forward PARAMS((int));
+
+static int _rl_vi_callback_getchar PARAMS((char *, int));
+
+#if defined (READLINE_CALLBACKS)
+static int _rl_vi_callback_set_mark PARAMS((_rl_callback_generic_arg *));
+static int _rl_vi_callback_goto_mark PARAMS((_rl_callback_generic_arg *));
+static int _rl_vi_callback_change_char PARAMS((_rl_callback_generic_arg *));
+static int _rl_vi_callback_char_search PARAMS((_rl_callback_generic_arg *));
+#endif
+
+void
+_rl_vi_initialize_line ()
+{
+ register int i, n;
+
+ n = sizeof (vi_mark_chars) / sizeof (vi_mark_chars[0]);
+ for (i = 0; i < n; i++)
+ vi_mark_chars[i] = -1;
+
+ RL_UNSETSTATE(RL_STATE_VICMDONCE);
+}
+
+void
+_rl_vi_reset_last ()
+{
+ _rl_vi_last_command = 'i';
+ _rl_vi_last_repeat = 1;
+ _rl_vi_last_arg_sign = 1;
+ _rl_vi_last_motion = 0;
+}
+
+void
+_rl_vi_set_last (key, repeat, sign)
+ int key, repeat, sign;
+{
+ _rl_vi_last_command = key;
+ _rl_vi_last_repeat = repeat;
+ _rl_vi_last_arg_sign = sign;
+}
+
+/* A convenience function that calls _rl_vi_set_last to save the last command
+ information and enters insertion mode. */
+void
+rl_vi_start_inserting (key, repeat, sign)
+ int key, repeat, sign;
+{
+ _rl_vi_set_last (key, repeat, sign);
+ rl_vi_insertion_mode (1, key);
+}
+
+/* Is the command C a VI mode text modification command? */
+int
+_rl_vi_textmod_command (c)
+ int c;
+{
+ return (member (c, vi_textmod));
+}
+
+static void
+_rl_vi_stuff_insert (count)
+ int count;
+{
+ rl_begin_undo_group ();
+ while (count--)
+ rl_insert_text (vi_insert_buffer);
+ rl_end_undo_group ();
+}
+
+/* Bound to `.'. Called from command mode, so we know that we have to
+ redo a text modification command. The default for _rl_vi_last_command
+ puts you back into insert mode. */
+int
+rl_vi_redo (count, c)
+ int count, c;
+{
+ int r;
+
+ if (!rl_explicit_arg)
+ {
+ rl_numeric_arg = _rl_vi_last_repeat;
+ rl_arg_sign = _rl_vi_last_arg_sign;
+ }
+
+ r = 0;
+ vi_redoing = 1;
+ /* If we're redoing an insert with `i', stuff in the inserted text
+ and do not go into insertion mode. */
+ if (_rl_vi_last_command == 'i' && vi_insert_buffer && *vi_insert_buffer)
+ {
+ _rl_vi_stuff_insert (count);
+ /* And back up point over the last character inserted. */
+ if (rl_point > 0)
+ _rl_vi_backup ();
+ }
+ /* Ditto for redoing an insert with `I', but move to the beginning of the
+ line like the `I' command does. */
+ else if (_rl_vi_last_command == 'I' && vi_insert_buffer && *vi_insert_buffer)
+ {
+ rl_beg_of_line (1, 'I');
+ _rl_vi_stuff_insert (count);
+ if (rl_point > 0)
+ _rl_vi_backup ();
+ }
+ /* Ditto for redoing an insert with `a', but move forward a character first
+ like the `a' command does. */
+ else if (_rl_vi_last_command == 'a' && vi_insert_buffer && *vi_insert_buffer)
+ {
+ _rl_vi_append_forward ('a');
+ _rl_vi_stuff_insert (count);
+ if (rl_point > 0)
+ _rl_vi_backup ();
+ }
+ /* Ditto for redoing an insert with `A', but move to the end of the line
+ like the `A' command does. */
+ else if (_rl_vi_last_command == 'A' && vi_insert_buffer && *vi_insert_buffer)
+ {
+ rl_end_of_line (1, 'A');
+ _rl_vi_stuff_insert (count);
+ if (rl_point > 0)
+ _rl_vi_backup ();
+ }
+ else
+ r = _rl_dispatch (_rl_vi_last_command, _rl_keymap);
+ vi_redoing = 0;
+
+ return (r);
+}
+
+/* A placeholder for further expansion. */
+int
+rl_vi_undo (count, key)
+ int count, key;
+{
+ return (rl_undo_command (count, key));
+}
+
+/* Yank the nth arg from the previous line into this line at point. */
+int
+rl_vi_yank_arg (count, key)
+ int count, key;
+{
+ /* Readline thinks that the first word on a line is the 0th, while vi
+ thinks the first word on a line is the 1st. Compensate. */
+ if (rl_explicit_arg)
+ rl_yank_nth_arg (count - 1, 0);
+ else
+ rl_yank_nth_arg ('$', 0);
+
+ return (0);
+}
+
+/* With an argument, move back that many history lines, else move to the
+ beginning of history. */
+int
+rl_vi_fetch_history (count, c)
+ int count, c;
+{
+ int wanted;
+
+ /* Giving an argument of n means we want the nth command in the history
+ file. The command number is interpreted the same way that the bash
+ `history' command does it -- that is, giving an argument count of 450
+ to this command would get the command listed as number 450 in the
+ output of `history'. */
+ if (rl_explicit_arg)
+ {
+ wanted = history_base + where_history () - count;
+ if (wanted <= 0)
+ rl_beginning_of_history (0, 0);
+ else
+ rl_get_previous_history (wanted, c);
+ }
+ else
+ rl_beginning_of_history (count, 0);
+ return (0);
+}
+
+/* Search again for the last thing searched for. */
+int
+rl_vi_search_again (count, key)
+ int count, key;
+{
+ switch (key)
+ {
+ case 'n':
+ rl_noninc_reverse_search_again (count, key);
+ break;
+
+ case 'N':
+ rl_noninc_forward_search_again (count, key);
+ break;
+ }
+ return (0);
+}
+
+/* Do a vi style search. */
+int
+rl_vi_search (count, key)
+ int count, key;
+{
+ switch (key)
+ {
+ case '?':
+ _rl_free_saved_history_line ();
+ rl_noninc_forward_search (count, key);
+ break;
+
+ case '/':
+ _rl_free_saved_history_line ();
+ rl_noninc_reverse_search (count, key);
+ break;
+
+ default:
+ rl_ding ();
+ break;
+ }
+ return (0);
+}
+
+/* Completion, from vi's point of view. */
+int
+rl_vi_complete (ignore, key)
+ int ignore, key;
+{
+ if ((rl_point < rl_end) && (!whitespace (rl_line_buffer[rl_point])))
+ {
+ if (!whitespace (rl_line_buffer[rl_point + 1]))
+ rl_vi_end_word (1, 'E');
+ rl_point++;
+ }
+
+ if (key == '*')
+ rl_complete_internal ('*'); /* Expansion and replacement. */
+ else if (key == '=')
+ rl_complete_internal ('?'); /* List possible completions. */
+ else if (key == '\\')
+ rl_complete_internal (TAB); /* Standard Readline completion. */
+ else
+ rl_complete (0, key);
+
+ if (key == '*' || key == '\\')
+ rl_vi_start_inserting (key, 1, rl_arg_sign);
+
+ return (0);
+}
+
+/* Tilde expansion for vi mode. */
+int
+rl_vi_tilde_expand (ignore, key)
+ int ignore, key;
+{
+ rl_tilde_expand (0, key);
+ rl_vi_start_inserting (key, 1, rl_arg_sign);
+ return (0);
+}
+
+/* Previous word in vi mode. */
+int
+rl_vi_prev_word (count, key)
+ int count, key;
+{
+ if (count < 0)
+ return (rl_vi_next_word (-count, key));
+
+ if (rl_point == 0)
+ {
+ rl_ding ();
+ return (0);
+ }
+
+ if (_rl_uppercase_p (key))
+ rl_vi_bWord (count, key);
+ else
+ rl_vi_bword (count, key);
+
+ return (0);
+}
+
+/* Next word in vi mode. */
+int
+rl_vi_next_word (count, key)
+ int count, key;
+{
+ if (count < 0)
+ return (rl_vi_prev_word (-count, key));
+
+ if (rl_point >= (rl_end - 1))
+ {
+ rl_ding ();
+ return (0);
+ }
+
+ if (_rl_uppercase_p (key))
+ rl_vi_fWord (count, key);
+ else
+ rl_vi_fword (count, key);
+ return (0);
+}
+
+/* Move to the end of the ?next? word. */
+int
+rl_vi_end_word (count, key)
+ int count, key;
+{
+ if (count < 0)
+ {
+ rl_ding ();
+ return -1;
+ }
+
+ if (_rl_uppercase_p (key))
+ rl_vi_eWord (count, key);
+ else
+ rl_vi_eword (count, key);
+ return (0);
+}
+
+/* Move forward a word the way that 'W' does. */
+int
+rl_vi_fWord (count, ignore)
+ int count, ignore;
+{
+ while (count-- && rl_point < (rl_end - 1))
+ {
+ /* Skip until whitespace. */
+ while (!whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end)
+ rl_point++;
+
+ /* Now skip whitespace. */
+ while (whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end)
+ rl_point++;
+ }
+ return (0);
+}
+
+int
+rl_vi_bWord (count, ignore)
+ int count, ignore;
+{
+ while (count-- && rl_point > 0)
+ {
+ /* If we are at the start of a word, move back to whitespace so
+ we will go back to the start of the previous word. */
+ if (!whitespace (rl_line_buffer[rl_point]) &&
+ whitespace (rl_line_buffer[rl_point - 1]))
+ rl_point--;
+
+ while (rl_point > 0 && whitespace (rl_line_buffer[rl_point]))
+ rl_point--;
+
+ if (rl_point > 0)
+ {
+ while (--rl_point >= 0 && !whitespace (rl_line_buffer[rl_point]));
+ rl_point++;
+ }
+ }
+ return (0);
+}
+
+int
+rl_vi_eWord (count, ignore)
+ int count, ignore;
+{
+ while (count-- && rl_point < (rl_end - 1))
+ {
+ if (!whitespace (rl_line_buffer[rl_point]))
+ rl_point++;
+
+ /* Move to the next non-whitespace character (to the start of the
+ next word). */
+ while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point]))
+ rl_point++;
+
+ if (rl_point && rl_point < rl_end)
+ {
+ /* Skip whitespace. */
+ while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point]))
+ rl_point++;
+
+ /* Skip until whitespace. */
+ while (rl_point < rl_end && !whitespace (rl_line_buffer[rl_point]))
+ rl_point++;
+
+ /* Move back to the last character of the word. */
+ rl_point--;
+ }
+ }
+ return (0);
+}
+
+int
+rl_vi_fword (count, ignore)
+ int count, ignore;
+{
+ while (count-- && rl_point < (rl_end - 1))
+ {
+ /* Move to white space (really non-identifer). */
+ if (_rl_isident (rl_line_buffer[rl_point]))
+ {
+ while (_rl_isident (rl_line_buffer[rl_point]) && rl_point < rl_end)
+ rl_point++;
+ }
+ else /* if (!whitespace (rl_line_buffer[rl_point])) */
+ {
+ while (!_rl_isident (rl_line_buffer[rl_point]) &&
+ !whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end)
+ rl_point++;
+ }
+
+ /* Move past whitespace. */
+ while (whitespace (rl_line_buffer[rl_point]) && rl_point < rl_end)
+ rl_point++;
+ }
+ return (0);
+}
+
+int
+rl_vi_bword (count, ignore)
+ int count, ignore;
+{
+ while (count-- && rl_point > 0)
+ {
+ int last_is_ident;
+
+ /* If we are at the start of a word, move back to whitespace
+ so we will go back to the start of the previous word. */
+ if (!whitespace (rl_line_buffer[rl_point]) &&
+ whitespace (rl_line_buffer[rl_point - 1]))
+ rl_point--;
+
+ /* If this character and the previous character are `opposite', move
+ back so we don't get messed up by the rl_point++ down there in
+ the while loop. Without this code, words like `l;' screw up the
+ function. */
+ last_is_ident = _rl_isident (rl_line_buffer[rl_point - 1]);
+ if ((_rl_isident (rl_line_buffer[rl_point]) && !last_is_ident) ||
+ (!_rl_isident (rl_line_buffer[rl_point]) && last_is_ident))
+ rl_point--;
+
+ while (rl_point > 0 && whitespace (rl_line_buffer[rl_point]))
+ rl_point--;
+
+ if (rl_point > 0)
+ {
+ if (_rl_isident (rl_line_buffer[rl_point]))
+ while (--rl_point >= 0 && _rl_isident (rl_line_buffer[rl_point]));
+ else
+ while (--rl_point >= 0 && !_rl_isident (rl_line_buffer[rl_point]) &&
+ !whitespace (rl_line_buffer[rl_point]));
+ rl_point++;
+ }
+ }
+ return (0);
+}
+
+int
+rl_vi_eword (count, ignore)
+ int count, ignore;
+{
+ while (count-- && rl_point < rl_end - 1)
+ {
+ if (!whitespace (rl_line_buffer[rl_point]))
+ rl_point++;
+
+ while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point]))
+ rl_point++;
+
+ if (rl_point < rl_end)
+ {
+ if (_rl_isident (rl_line_buffer[rl_point]))
+ while (++rl_point < rl_end && _rl_isident (rl_line_buffer[rl_point]));
+ else
+ while (++rl_point < rl_end && !_rl_isident (rl_line_buffer[rl_point])
+ && !whitespace (rl_line_buffer[rl_point]));
+ }
+ rl_point--;
+ }
+ return (0);
+}
+
+int
+rl_vi_insert_beg (count, key)
+ int count, key;
+{
+ rl_beg_of_line (1, key);
+ rl_vi_insert_mode (1, key);
+ return (0);
+}
+
+static void
+_rl_vi_append_forward (key)
+ int key;
+{
+ int point;
+
+ if (rl_point < rl_end)
+ {
+ if (MB_CUR_MAX == 1 || rl_byte_oriented)
+ rl_point++;
+ else
+ {
+ point = rl_point;
+ rl_forward_char (1, key);
+ if (point == rl_point)
+ rl_point = rl_end;
+ }
+ }
+}
+
+int
+rl_vi_append_mode (count, key)
+ int count, key;
+{
+ _rl_vi_append_forward (key);
+ rl_vi_start_inserting (key, 1, rl_arg_sign);
+ return (0);
+}
+
+int
+rl_vi_append_eol (count, key)
+ int count, key;
+{
+ rl_end_of_line (1, key);
+ rl_vi_append_mode (1, key);
+ return (0);
+}
+
+/* What to do in the case of C-d. */
+int
+rl_vi_eof_maybe (count, c)
+ int count, c;
+{
+ return (rl_newline (1, '\n'));
+}
+
+/* Insertion mode stuff. */
+
+/* Switching from one mode to the other really just involves
+ switching keymaps. */
+int
+rl_vi_insertion_mode (count, key)
+ int count, key;
+{
+ _rl_keymap = vi_insertion_keymap;
+ _rl_vi_last_key_before_insert = key;
+ return (0);
+}
+
+int
+rl_vi_insert_mode (count, key)
+ int count, key;
+{
+ rl_vi_start_inserting (key, 1, rl_arg_sign);
+ return (0);
+}
+
+static void
+_rl_vi_save_insert (up)
+ UNDO_LIST *up;
+{
+ int len, start, end;
+
+ if (up == 0 || up->what != UNDO_INSERT)
+ {
+ if (vi_insert_buffer_size >= 1)
+ vi_insert_buffer[0] = '\0';
+ return;
+ }
+
+ start = up->start;
+ end = up->end;
+ len = end - start + 1;
+ if (len >= vi_insert_buffer_size)
+ {
+ vi_insert_buffer_size += (len + 32) - (len % 32);
+ vi_insert_buffer = (char *)xrealloc (vi_insert_buffer, vi_insert_buffer_size);
+ }
+ strncpy (vi_insert_buffer, rl_line_buffer + start, len - 1);
+ vi_insert_buffer[len-1] = '\0';
+}
+
+void
+_rl_vi_done_inserting ()
+{
+ if (_rl_vi_doing_insert)
+ {
+ /* The `C', `s', and `S' commands set this. */
+ rl_end_undo_group ();
+ /* Now, the text between rl_undo_list->next->start and
+ rl_undo_list->next->end is what was inserted while in insert
+ mode. It gets copied to VI_INSERT_BUFFER because it depends
+ on absolute indices into the line which may change (though they
+ probably will not). */
+ _rl_vi_doing_insert = 0;
+ _rl_vi_save_insert (rl_undo_list->next);
+ vi_continued_command = 1;
+ }
+ else
+ {
+ if (rl_undo_list && (_rl_vi_last_key_before_insert == 'i' ||
+ _rl_vi_last_key_before_insert == 'a' ||
+ _rl_vi_last_key_before_insert == 'I' ||
+ _rl_vi_last_key_before_insert == 'A'))
+ _rl_vi_save_insert (rl_undo_list);
+ /* XXX - Other keys probably need to be checked. */
+ else if (_rl_vi_last_key_before_insert == 'C')
+ rl_end_undo_group ();
+ while (_rl_undo_group_level > 0)
+ rl_end_undo_group ();
+ vi_continued_command = 0;
+ }
+}
+
+int
+rl_vi_movement_mode (count, key)
+ int count, key;
+{
+ if (rl_point > 0)
+ rl_backward_char (1, key);
+
+ _rl_keymap = vi_movement_keymap;
+ _rl_vi_done_inserting ();
+
+ /* This is how POSIX.2 says `U' should behave -- everything up until the
+ first time you go into command mode should not be undone. */
+ if (RL_ISSTATE (RL_STATE_VICMDONCE) == 0)
+ rl_free_undo_list ();
+
+ RL_SETSTATE (RL_STATE_VICMDONCE);
+ return (0);
+}
+
+int
+rl_vi_arg_digit (count, c)
+ int count, c;
+{
+ if (c == '0' && rl_numeric_arg == 1 && !rl_explicit_arg)
+ return (rl_beg_of_line (1, c));
+ else
+ return (rl_digit_argument (count, c));
+}
+
+/* Change the case of the next COUNT characters. */
+#if defined (HANDLE_MULTIBYTE)
+static int
+_rl_vi_change_mbchar_case (count)
+ int count;
+{
+ wchar_t wc;
+ char mb[MB_LEN_MAX+1];
+ int mlen, p;
+ size_t m;
+ mbstate_t ps;
+
+ memset (&ps, 0, sizeof (mbstate_t));
+ if (_rl_adjust_point (rl_line_buffer, rl_point, &ps) > 0)
+ count--;
+ while (count-- && rl_point < rl_end)
+ {
+ m = mbrtowc (&wc, rl_line_buffer + rl_point, rl_end - rl_point, &ps);
+ if (MB_INVALIDCH (m))
+ wc = (wchar_t)rl_line_buffer[rl_point];
+ else if (MB_NULLWCH (m))
+ wc = L'\0';
+ if (iswupper (wc))
+ wc = towlower (wc);
+ else if (iswlower (wc))
+ wc = towupper (wc);
+ else
+ {
+ /* Just skip over chars neither upper nor lower case */
+ rl_forward_char (1, 0);
+ continue;
+ }
+
+ /* Vi is kind of strange here. */
+ if (wc)
+ {
+ p = rl_point;
+ mlen = wcrtomb (mb, wc, &ps);
+ if (mlen >= 0)
+ mb[mlen] = '\0';
+ rl_begin_undo_group ();
+ rl_vi_delete (1, 0);
+ if (rl_point < p) /* Did we retreat at EOL? */
+ rl_point++; /* XXX - should we advance more than 1 for mbchar? */
+ rl_insert_text (mb);
+ rl_end_undo_group ();
+ rl_vi_check ();
+ }
+ else
+ rl_forward_char (1, 0);
+ }
+
+ return 0;
+}
+#endif
+
+int
+rl_vi_change_case (count, ignore)
+ int count, ignore;
+{
+ int c, p;
+
+ /* Don't try this on an empty line. */
+ if (rl_point >= rl_end)
+ return (0);
+
+ c = 0;
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ return (_rl_vi_change_mbchar_case (count));
+#endif
+
+ while (count-- && rl_point < rl_end)
+ {
+ if (_rl_uppercase_p (rl_line_buffer[rl_point]))
+ c = _rl_to_lower (rl_line_buffer[rl_point]);
+ else if (_rl_lowercase_p (rl_line_buffer[rl_point]))
+ c = _rl_to_upper (rl_line_buffer[rl_point]);
+ else
+ {
+ /* Just skip over characters neither upper nor lower case. */
+ rl_forward_char (1, c);
+ continue;
+ }
+
+ /* Vi is kind of strange here. */
+ if (c)
+ {
+ p = rl_point;
+ rl_begin_undo_group ();
+ rl_vi_delete (1, c);
+ if (rl_point < p) /* Did we retreat at EOL? */
+ rl_point++;
+ _rl_insert_char (1, c);
+ rl_end_undo_group ();
+ rl_vi_check ();
+ }
+ else
+ rl_forward_char (1, c);
+ }
+ return (0);
+}
+
+int
+rl_vi_put (count, key)
+ int count, key;
+{
+ if (!_rl_uppercase_p (key) && (rl_point + 1 <= rl_end))
+ rl_point = _rl_find_next_mbchar (rl_line_buffer, rl_point, 1, MB_FIND_NONZERO);
+
+ while (count--)
+ rl_yank (1, key);
+
+ rl_backward_char (1, key);
+ return (0);
+}
+
+static void
+_rl_vi_backup ()
+{
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ else
+ rl_point--;
+}
+
+int
+rl_vi_check ()
+{
+ if (rl_point && rl_point == rl_end)
+ {
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ else
+ rl_point--;
+ }
+ return (0);
+}
+
+int
+rl_vi_column (count, key)
+ int count, key;
+{
+ if (count > rl_end)
+ rl_end_of_line (1, key);
+ else
+ rl_point = count - 1;
+ return (0);
+}
+
+int
+rl_vi_domove (key, nextkey)
+ int key, *nextkey;
+{
+ int c, save;
+ int old_end;
+
+ rl_mark = rl_point;
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
+ if (c < 0)
+ {
+ *nextkey = 0;
+ return -1;
+ }
+
+ *nextkey = c;
+
+ if (!member (c, vi_motion))
+ {
+ if (_rl_digit_p (c))
+ {
+ save = rl_numeric_arg;
+ rl_numeric_arg = _rl_digit_value (c);
+ rl_explicit_arg = 1;
+ RL_SETSTATE (RL_STATE_NUMERICARG|RL_STATE_VIMOTION);
+ rl_digit_loop1 ();
+ RL_UNSETSTATE (RL_STATE_VIMOTION);
+ rl_numeric_arg *= save;
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = rl_read_key (); /* real command */
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ if (c < 0)
+ {
+ *nextkey = 0;
+ return -1;
+ }
+ *nextkey = c;
+ }
+ else if (key == c && (key == 'd' || key == 'y' || key == 'c'))
+ {
+ rl_mark = rl_end;
+ rl_beg_of_line (1, c);
+ _rl_vi_last_motion = c;
+ return (0);
+ }
+ else
+ return (-1);
+ }
+
+ _rl_vi_last_motion = c;
+
+ /* Append a blank character temporarily so that the motion routines
+ work right at the end of the line. */
+ old_end = rl_end;
+ rl_line_buffer[rl_end++] = ' ';
+ rl_line_buffer[rl_end] = '\0';
+
+ _rl_dispatch (c, _rl_keymap);
+
+ /* Remove the blank that we added. */
+ rl_end = old_end;
+ rl_line_buffer[rl_end] = '\0';
+ if (rl_point > rl_end)
+ rl_point = rl_end;
+
+ /* No change in position means the command failed. */
+ if (rl_mark == rl_point)
+ return (-1);
+
+ /* rl_vi_f[wW]ord () leaves the cursor on the first character of the next
+ word. If we are not at the end of the line, and we are on a
+ non-whitespace character, move back one (presumably to whitespace). */
+ if ((_rl_to_upper (c) == 'W') && rl_point < rl_end && rl_point > rl_mark &&
+ !whitespace (rl_line_buffer[rl_point]))
+ rl_point--;
+
+ /* If cw or cW, back up to the end of a word, so the behaviour of ce
+ or cE is the actual result. Brute-force, no subtlety. */
+ if (key == 'c' && rl_point >= rl_mark && (_rl_to_upper (c) == 'W'))
+ {
+ /* Don't move farther back than where we started. */
+ while (rl_point > rl_mark && whitespace (rl_line_buffer[rl_point]))
+ rl_point--;
+
+ /* Posix.2 says that if cw or cW moves the cursor towards the end of
+ the line, the character under the cursor should be deleted. */
+ if (rl_point == rl_mark)
+ rl_point++;
+ else
+ {
+ /* Move past the end of the word so that the kill doesn't
+ remove the last letter of the previous word. Only do this
+ if we are not at the end of the line. */
+ if (rl_point >= 0 && rl_point < (rl_end - 1) && !whitespace (rl_line_buffer[rl_point]))
+ rl_point++;
+ }
+ }
+
+ if (rl_mark < rl_point)
+ SWAP (rl_point, rl_mark);
+
+ return (0);
+}
+
+/* Process C as part of the current numeric argument. Return -1 if the
+ argument should be aborted, 0 if we should not read any more chars, and
+ 1 if we should continue to read chars. */
+static int
+_rl_vi_arg_dispatch (c)
+ int c;
+{
+ int key;
+
+ key = c;
+ if (c >= 0 && _rl_keymap[c].type == ISFUNC && _rl_keymap[c].function == rl_universal_argument)
+ {
+ rl_numeric_arg *= 4;
+ return 1;
+ }
+
+ c = UNMETA (c);
+
+ if (_rl_digit_p (c))
+ {
+ if (rl_explicit_arg)
+ rl_numeric_arg = (rl_numeric_arg * 10) + _rl_digit_value (c);
+ else
+ rl_numeric_arg = _rl_digit_value (c);
+ rl_explicit_arg = 1;
+ return 1;
+ }
+ else
+ {
+ rl_clear_message ();
+ rl_stuff_char (key);
+ return 0;
+ }
+}
+
+/* A simplified loop for vi. Don't dispatch key at end.
+ Don't recognize minus sign?
+ Should this do rl_save_prompt/rl_restore_prompt? */
+static int
+rl_digit_loop1 ()
+{
+ int c, r;
+
+ while (1)
+ {
+ if (_rl_arg_overflow ())
+ return 1;
+
+ c = _rl_arg_getchar ();
+
+ r = _rl_vi_arg_dispatch (c);
+ if (r <= 0)
+ break;
+ }
+
+ RL_UNSETSTATE(RL_STATE_NUMERICARG);
+ return (0);
+}
+
+int
+rl_vi_delete_to (count, key)
+ int count, key;
+{
+ int c, start_pos;
+
+ if (_rl_uppercase_p (key))
+ rl_stuff_char ('$');
+ else if (vi_redoing)
+ rl_stuff_char (_rl_vi_last_motion);
+
+ start_pos = rl_point;
+
+ if (rl_vi_domove (key, &c))
+ {
+ rl_ding ();
+ return -1;
+ }
+
+ /* These are the motion commands that do not require adjusting the
+ mark. */
+ if (((strchr (" l|h^0bBFT`", c) == 0) && (rl_point >= start_pos)) &&
+ (rl_mark < rl_end))
+ rl_mark++;
+
+ rl_kill_text (rl_point, rl_mark);
+ return (0);
+}
+
+int
+rl_vi_change_to (count, key)
+ int count, key;
+{
+ int c, start_pos;
+
+ if (_rl_uppercase_p (key))
+ rl_stuff_char ('$');
+ else if (vi_redoing)
+ rl_stuff_char (_rl_vi_last_motion);
+
+ start_pos = rl_point;
+
+ if (rl_vi_domove (key, &c))
+ {
+ rl_ding ();
+ return -1;
+ }
+
+ /* These are the motion commands that do not require adjusting the
+ mark. c[wW] are handled by special-case code in rl_vi_domove(),
+ and already leave the mark at the correct location. */
+ if (((strchr (" l|hwW^0bBFT`", c) == 0) && (rl_point >= start_pos)) &&
+ (rl_mark < rl_end))
+ rl_mark++;
+
+ /* The cursor never moves with c[wW]. */
+ if ((_rl_to_upper (c) == 'W') && rl_point < start_pos)
+ rl_point = start_pos;
+
+ if (vi_redoing)
+ {
+ if (vi_insert_buffer && *vi_insert_buffer)
+ rl_begin_undo_group ();
+ rl_delete_text (rl_point, rl_mark);
+ if (vi_insert_buffer && *vi_insert_buffer)
+ {
+ rl_insert_text (vi_insert_buffer);
+ rl_end_undo_group ();
+ }
+ }
+ else
+ {
+ rl_begin_undo_group (); /* to make the `u' command work */
+ rl_kill_text (rl_point, rl_mark);
+ /* `C' does not save the text inserted for undoing or redoing. */
+ if (_rl_uppercase_p (key) == 0)
+ _rl_vi_doing_insert = 1;
+ rl_vi_start_inserting (key, rl_numeric_arg, rl_arg_sign);
+ }
+
+ return (0);
+}
+
+int
+rl_vi_yank_to (count, key)
+ int count, key;
+{
+ int c, start_pos;
+
+ if (_rl_uppercase_p (key))
+ rl_stuff_char ('$');
+
+ start_pos = rl_point;
+
+ if (rl_vi_domove (key, &c))
+ {
+ rl_ding ();
+ return -1;
+ }
+
+ /* These are the motion commands that do not require adjusting the
+ mark. */
+ if (((strchr (" l|h^0%bBFT`", c) == 0) && (rl_point >= start_pos)) &&
+ (rl_mark < rl_end))
+ rl_mark++;
+
+ rl_begin_undo_group ();
+ rl_kill_text (rl_point, rl_mark);
+ rl_end_undo_group ();
+ rl_do_undo ();
+ rl_point = start_pos;
+
+ return (0);
+}
+
+int
+rl_vi_rubout (count, key)
+ int count, key;
+{
+ int opoint;
+
+ if (count < 0)
+ return (rl_vi_delete (-count, key));
+
+ if (rl_point == 0)
+ {
+ rl_ding ();
+ return -1;
+ }
+
+ opoint = rl_point;
+ if (count > 1 && MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_backward_char (count, key);
+ else if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_point = _rl_find_prev_mbchar (rl_line_buffer, rl_point, MB_FIND_NONZERO);
+ else
+ rl_point -= count;
+
+ if (rl_point < 0)
+ rl_point = 0;
+
+ rl_kill_text (rl_point, opoint);
+
+ return (0);
+}
+
+int
+rl_vi_delete (count, key)
+ int count, key;
+{
+ int end;
+
+ if (count < 0)
+ return (rl_vi_rubout (-count, key));
+
+ if (rl_end == 0)
+ {
+ rl_ding ();
+ return -1;
+ }
+
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ end = _rl_find_next_mbchar (rl_line_buffer, rl_point, count, MB_FIND_NONZERO);
+ else
+ end = rl_point + count;
+
+ if (end >= rl_end)
+ end = rl_end;
+
+ rl_kill_text (rl_point, end);
+
+ if (rl_point > 0 && rl_point == rl_end)
+ rl_backward_char (1, key);
+
+ return (0);
+}
+
+int
+rl_vi_back_to_indent (count, key)
+ int count, key;
+{
+ rl_beg_of_line (1, key);
+ while (rl_point < rl_end && whitespace (rl_line_buffer[rl_point]))
+ rl_point++;
+ return (0);
+}
+
+int
+rl_vi_first_print (count, key)
+ int count, key;
+{
+ return (rl_vi_back_to_indent (1, key));
+}
+
+static int _rl_cs_dir, _rl_cs_orig_dir;
+
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_vi_callback_char_search (data)
+ _rl_callback_generic_arg *data;
+{
+ int c;
+#if defined (HANDLE_MULTIBYTE)
+ c = _rl_vi_last_search_mblen = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX);
+#else
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+#endif
+
+ if (c <= 0)
+ return -1;
+
+#if !defined (HANDLE_MULTIBYTE)
+ _rl_vi_last_search_char = c;
+#endif
+
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+#if defined (HANDLE_MULTIBYTE)
+ return (_rl_char_search_internal (data->count, _rl_cs_dir, _rl_vi_last_search_mbchar, _rl_vi_last_search_mblen));
+#else
+ return (_rl_char_search_internal (data->count, _rl_cs_dir, _rl_vi_last_search_char));
+#endif
+}
+#endif
+
+int
+rl_vi_char_search (count, key)
+ int count, key;
+{
+ int c;
+#if defined (HANDLE_MULTIBYTE)
+ static char *target;
+ static int tlen;
+#else
+ static char target;
+#endif
+
+ if (key == ';' || key == ',')
+ _rl_cs_dir = (key == ';') ? _rl_cs_orig_dir : -_rl_cs_orig_dir;
+ else
+ {
+ switch (key)
+ {
+ case 't':
+ _rl_cs_orig_dir = _rl_cs_dir = FTO;
+ break;
+
+ case 'T':
+ _rl_cs_orig_dir = _rl_cs_dir = BTO;
+ break;
+
+ case 'f':
+ _rl_cs_orig_dir = _rl_cs_dir = FFIND;
+ break;
+
+ case 'F':
+ _rl_cs_orig_dir = _rl_cs_dir = BFIND;
+ break;
+ }
+
+ if (vi_redoing)
+ {
+ /* set target and tlen below */
+ }
+#if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_data->i1 = _rl_cs_dir;
+ _rl_callback_func = _rl_vi_callback_char_search;
+ return (0);
+ }
+#endif
+ else
+ {
+#if defined (HANDLE_MULTIBYTE)
+ c = _rl_read_mbchar (_rl_vi_last_search_mbchar, MB_LEN_MAX);
+ if (c <= 0)
+ return -1;
+ _rl_vi_last_search_mblen = c;
+#else
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+ if (c < 0)
+ return -1;
+ _rl_vi_last_search_char = c;
+#endif
+ }
+ }
+
+#if defined (HANDLE_MULTIBYTE)
+ target = _rl_vi_last_search_mbchar;
+ tlen = _rl_vi_last_search_mblen;
+#else
+ target = _rl_vi_last_search_char;
+#endif
+
+#if defined (HANDLE_MULTIBYTE)
+ return (_rl_char_search_internal (count, _rl_cs_dir, target, tlen));
+#else
+ return (_rl_char_search_internal (count, _rl_cs_dir, target));
+#endif
+}
+
+/* Match brackets */
+int
+rl_vi_match (ignore, key)
+ int ignore, key;
+{
+ int count = 1, brack, pos, tmp, pre;
+
+ pos = rl_point;
+ if ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0)
+ {
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ {
+ while ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0)
+ {
+ pre = rl_point;
+ rl_forward_char (1, key);
+ if (pre == rl_point)
+ break;
+ }
+ }
+ else
+ while ((brack = rl_vi_bracktype (rl_line_buffer[rl_point])) == 0 &&
+ rl_point < rl_end - 1)
+ rl_forward_char (1, key);
+
+ if (brack <= 0)
+ {
+ rl_point = pos;
+ rl_ding ();
+ return -1;
+ }
+ }
+
+ pos = rl_point;
+
+ if (brack < 0)
+ {
+ while (count)
+ {
+ tmp = pos;
+ if (MB_CUR_MAX == 1 || rl_byte_oriented)
+ pos--;
+ else
+ {
+ pos = _rl_find_prev_mbchar (rl_line_buffer, pos, MB_FIND_ANY);
+ if (tmp == pos)
+ pos--;
+ }
+ if (pos >= 0)
+ {
+ int b = rl_vi_bracktype (rl_line_buffer[pos]);
+ if (b == -brack)
+ count--;
+ else if (b == brack)
+ count++;
+ }
+ else
+ {
+ rl_ding ();
+ return -1;
+ }
+ }
+ }
+ else
+ { /* brack > 0 */
+ while (count)
+ {
+ if (MB_CUR_MAX == 1 || rl_byte_oriented)
+ pos++;
+ else
+ pos = _rl_find_next_mbchar (rl_line_buffer, pos, 1, MB_FIND_ANY);
+
+ if (pos < rl_end)
+ {
+ int b = rl_vi_bracktype (rl_line_buffer[pos]);
+ if (b == -brack)
+ count--;
+ else if (b == brack)
+ count++;
+ }
+ else
+ {
+ rl_ding ();
+ return -1;
+ }
+ }
+ }
+ rl_point = pos;
+ return (0);
+}
+
+int
+rl_vi_bracktype (c)
+ int c;
+{
+ switch (c)
+ {
+ case '(': return 1;
+ case ')': return -1;
+ case '[': return 2;
+ case ']': return -2;
+ case '{': return 3;
+ case '}': return -3;
+ default: return 0;
+ }
+}
+
+static int
+_rl_vi_change_char (count, c, mb)
+ int count, c;
+ char *mb;
+{
+ int p;
+
+ if (c == '\033' || c == CTRL ('C'))
+ return -1;
+
+ rl_begin_undo_group ();
+ while (count-- && rl_point < rl_end)
+ {
+ p = rl_point;
+ rl_vi_delete (1, c);
+ if (rl_point < p) /* Did we retreat at EOL? */
+ rl_point++;
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ rl_insert_text (mb);
+ else
+#endif
+ _rl_insert_char (1, c);
+ }
+
+ /* The cursor shall be left on the last character changed. */
+ rl_backward_char (1, c);
+
+ rl_end_undo_group ();
+
+ return (0);
+}
+
+static int
+_rl_vi_callback_getchar (mb, mlen)
+ char *mb;
+ int mlen;
+{
+ int c;
+
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ c = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
+ if (c < 0)
+ return -1;
+
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1 && rl_byte_oriented == 0)
+ c = _rl_read_mbstring (c, mb, mlen);
+#endif
+
+ return c;
+}
+
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_vi_callback_change_char (data)
+ _rl_callback_generic_arg *data;
+{
+ int c;
+ char mb[MB_LEN_MAX];
+
+ _rl_vi_last_replacement = c = _rl_vi_callback_getchar (mb, MB_LEN_MAX);
+
+ if (c < 0)
+ return -1;
+
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return (_rl_vi_change_char (data->count, c, mb));
+}
+#endif
+
+int
+rl_vi_change_char (count, key)
+ int count, key;
+{
+ int c;
+ char mb[MB_LEN_MAX];
+
+ if (vi_redoing)
+ {
+ c = _rl_vi_last_replacement;
+ mb[0] = c;
+ mb[1] = '\0';
+ }
+#if defined (READLINE_CALLBACKS)
+ else if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = _rl_callback_data_alloc (count);
+ _rl_callback_func = _rl_vi_callback_change_char;
+ return (0);
+ }
+#endif
+ else
+ _rl_vi_last_replacement = c = _rl_vi_callback_getchar (mb, MB_LEN_MAX);
+
+ if (c < 0)
+ return -1;
+
+ return (_rl_vi_change_char (count, c, mb));
+}
+
+int
+rl_vi_subst (count, key)
+ int count, key;
+{
+ /* If we are redoing, rl_vi_change_to will stuff the last motion char */
+ if (vi_redoing == 0)
+ rl_stuff_char ((key == 'S') ? 'c' : 'l'); /* `S' == `cc', `s' == `cl' */
+
+ return (rl_vi_change_to (count, 'c'));
+}
+
+int
+rl_vi_overstrike (count, key)
+ int count, key;
+{
+ if (_rl_vi_doing_insert == 0)
+ {
+ _rl_vi_doing_insert = 1;
+ rl_begin_undo_group ();
+ }
+
+ if (count > 0)
+ {
+ _rl_overwrite_char (count, key);
+ vi_replace_count += count;
+ }
+
+ return (0);
+}
+
+int
+rl_vi_overstrike_delete (count, key)
+ int count, key;
+{
+ int i, s;
+
+ for (i = 0; i < count; i++)
+ {
+ if (vi_replace_count == 0)
+ {
+ rl_ding ();
+ break;
+ }
+ s = rl_point;
+
+ if (rl_do_undo ())
+ vi_replace_count--;
+
+ if (rl_point == s)
+ rl_backward_char (1, key);
+ }
+
+ if (vi_replace_count == 0 && _rl_vi_doing_insert)
+ {
+ rl_end_undo_group ();
+ rl_do_undo ();
+ _rl_vi_doing_insert = 0;
+ }
+ return (0);
+}
+
+int
+rl_vi_replace (count, key)
+ int count, key;
+{
+ int i;
+
+ vi_replace_count = 0;
+
+ if (!vi_replace_map)
+ {
+ vi_replace_map = rl_make_bare_keymap ();
+
+ for (i = ' '; i < KEYMAP_SIZE; i++)
+ vi_replace_map[i].function = rl_vi_overstrike;
+
+ vi_replace_map[RUBOUT].function = rl_vi_overstrike_delete;
+ vi_replace_map[ESC].function = rl_vi_movement_mode;
+ vi_replace_map[RETURN].function = rl_newline;
+ vi_replace_map[NEWLINE].function = rl_newline;
+
+ /* If the normal vi insertion keymap has ^H bound to erase, do the
+ same here. Probably should remove the assignment to RUBOUT up
+ there, but I don't think it will make a difference in real life. */
+ if (vi_insertion_keymap[CTRL ('H')].type == ISFUNC &&
+ vi_insertion_keymap[CTRL ('H')].function == rl_rubout)
+ vi_replace_map[CTRL ('H')].function = rl_vi_overstrike_delete;
+
+ }
+ _rl_keymap = vi_replace_map;
+ return (0);
+}
+
+#if 0
+/* Try to complete the word we are standing on or the word that ends with
+ the previous character. A space matches everything. Word delimiters are
+ space and ;. */
+int
+rl_vi_possible_completions()
+{
+ int save_pos = rl_point;
+
+ if (rl_line_buffer[rl_point] != ' ' && rl_line_buffer[rl_point] != ';')
+ {
+ while (rl_point < rl_end && rl_line_buffer[rl_point] != ' ' &&
+ rl_line_buffer[rl_point] != ';')
+ rl_point++;
+ }
+ else if (rl_line_buffer[rl_point - 1] == ';')
+ {
+ rl_ding ();
+ return (0);
+ }
+
+ rl_possible_completions ();
+ rl_point = save_pos;
+
+ return (0);
+}
+#endif
+
+/* Functions to save and restore marks. */
+static int
+_rl_vi_set_mark ()
+{
+ int ch;
+
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ ch = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
+ if (ch < 0 || ch < 'a' || ch > 'z') /* make test against 0 explicit */
+ {
+ rl_ding ();
+ return -1;
+ }
+ ch -= 'a';
+ vi_mark_chars[ch] = rl_point;
+ return 0;
+}
+
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_vi_callback_set_mark (data)
+ _rl_callback_generic_arg *data;
+{
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return (_rl_vi_set_mark ());
+}
+#endif
+
+int
+rl_vi_set_mark (count, key)
+ int count, key;
+{
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = 0;
+ _rl_callback_func = _rl_vi_callback_set_mark;
+ return (0);
+ }
+#endif
+
+ return (_rl_vi_set_mark ());
+}
+
+static int
+_rl_vi_goto_mark ()
+{
+ int ch;
+
+ RL_SETSTATE(RL_STATE_MOREINPUT);
+ ch = rl_read_key ();
+ RL_UNSETSTATE(RL_STATE_MOREINPUT);
+
+ if (ch == '`')
+ {
+ rl_point = rl_mark;
+ return 0;
+ }
+ else if (ch < 0 || ch < 'a' || ch > 'z') /* make test against 0 explicit */
+ {
+ rl_ding ();
+ return -1;
+ }
+
+ ch -= 'a';
+ if (vi_mark_chars[ch] == -1)
+ {
+ rl_ding ();
+ return -1;
+ }
+ rl_point = vi_mark_chars[ch];
+ return 0;
+}
+
+#if defined (READLINE_CALLBACKS)
+static int
+_rl_vi_callback_goto_mark (data)
+ _rl_callback_generic_arg *data;
+{
+ _rl_callback_func = 0;
+ _rl_want_redisplay = 1;
+
+ return (_rl_vi_goto_mark ());
+}
+#endif
+
+int
+rl_vi_goto_mark (count, key)
+ int count, key;
+{
+#if defined (READLINE_CALLBACKS)
+ if (RL_ISSTATE (RL_STATE_CALLBACK))
+ {
+ _rl_callback_data = 0;
+ _rl_callback_func = _rl_vi_callback_goto_mark;
+ return (0);
+ }
+#endif
+
+ return (_rl_vi_goto_mark ());
+}
+#endif /* VI_MODE */
diff --git a/lib/readline/xmalloc.c b/lib/readline/xmalloc.c
new file mode 100644
index 0000000..97d8f2e
--- /dev/null
+++ b/lib/readline/xmalloc.c
@@ -0,0 +1,89 @@
+/* xmalloc.c -- safe versions of malloc and realloc */
+
+/* Copyright (C) 1991-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#define READLINE_LIBRARY
+
+#if defined (HAVE_CONFIG_H)
+#include <config.h>
+#endif
+
+#include <stdio.h>
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#include "xmalloc.h"
+
+/* **************************************************************** */
+/* */
+/* Memory Allocation and Deallocation. */
+/* */
+/* **************************************************************** */
+
+static void
+memory_error_and_abort (fname)
+ char *fname;
+{
+ fprintf (stderr, "%s: out of virtual memory\n", fname);
+ exit (2);
+}
+
+/* Return a pointer to free()able block of memory large enough
+ to hold BYTES number of bytes. If the memory cannot be allocated,
+ print an error message and abort. */
+PTR_T
+xmalloc (bytes)
+ size_t bytes;
+{
+ PTR_T temp;
+
+ temp = malloc (bytes);
+ if (temp == 0)
+ memory_error_and_abort ("xmalloc");
+ return (temp);
+}
+
+PTR_T
+xrealloc (pointer, bytes)
+ PTR_T pointer;
+ size_t bytes;
+{
+ PTR_T temp;
+
+ temp = pointer ? realloc (pointer, bytes) : malloc (bytes);
+
+ if (temp == 0)
+ memory_error_and_abort ("xrealloc");
+ return (temp);
+}
+
+/* Use this as the function to call when adding unwind protects so we
+ don't need to know what free() returns. */
+void
+xfree (string)
+ PTR_T string;
+{
+ if (string)
+ free (string);
+}
diff --git a/lib/readline/xmalloc.h b/lib/readline/xmalloc.h
new file mode 100644
index 0000000..f40d7a5
--- /dev/null
+++ b/lib/readline/xmalloc.h
@@ -0,0 +1,45 @@
+/* xmalloc.h -- memory allocation that aborts on errors. */
+
+/* Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_XMALLOC_H_)
+#define _XMALLOC_H_
+
+#if defined (READLINE_LIBRARY)
+# include "rlstdc.h"
+#else
+# include <readline/rlstdc.h>
+#endif
+
+#ifndef PTR_T
+
+#ifdef __STDC__
+# define PTR_T void *
+#else
+# define PTR_T char *
+#endif
+
+#endif /* !PTR_T */
+
+extern PTR_T xmalloc PARAMS((size_t));
+extern PTR_T xrealloc PARAMS((void *, size_t));
+extern void xfree PARAMS((void *));
+
+#endif /* _XMALLOC_H_ */
diff --git a/lib/sh/Makefile.in b/lib/sh/Makefile.in
new file mode 100644
index 0000000..80f6cc5
--- /dev/null
+++ b/lib/sh/Makefile.in
@@ -0,0 +1,544 @@
+#
+# Makefile for the Bash library
+#
+#
+# Copyright (C) 1998-2009 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+PACKAGE = @PACKAGE_NAME@
+VERSION = @PACKAGE_VERSION@
+
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+
+srcdir = @srcdir@
+VPATH = .:@srcdir@
+topdir = @top_srcdir@
+BUILD_DIR = @BUILD_DIR@
+
+LIBBUILD = ${BUILD_DIR}/lib
+
+BASHINCDIR = ${topdir}/include
+
+INTL_LIBSRC = ${topdir}/lib/intl
+INTL_BUILDDIR = ${LIBBUILD}/intl
+INTL_INC = @INTL_INC@
+LIBINTL_H = @LIBINTL_H@
+
+datarootdir = @datarootdir@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+CC = @CC@
+RANLIB = @RANLIB@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+RM = rm -f
+CP = cp
+MV = mv
+
+SHELL = @MAKE_SHELL@
+
+CFLAGS = @CFLAGS@
+LOCAL_CFLAGS = @LOCAL_CFLAGS@ ${DEBUG}
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@
+
+PROFILE_FLAGS = @PROFILE_FLAGS@
+
+DEFS = @DEFS@
+LOCAL_DEFS = @LOCAL_DEFS@
+
+INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib -I$(BASHINCDIR) -I$(srcdir) $(INTL_INC)
+
+CCFLAGS = ${PROFILE_FLAGS} ${INCLUDES} $(DEFS) $(LOCAL_DEFS) $(LOCAL_CFLAGS) \
+ $(CFLAGS) $(CPPFLAGS)
+
+GCC_LINT_FLAGS = -Wall -Wshadow -Wpointer-arith -Wcast-qual \
+ -Wcast-align -Wstrict-prototypes -Wconversion \
+ -Wmissing-prototypes -Wtraditional -Wredundant-decls -pedantic
+
+.c.o:
+ $(CC) -c $(CCFLAGS) $<
+
+# The name of the library target.
+LIBRARY_NAME = libsh.a
+
+# The C code source files for this library.
+CSOURCES = clktck.c clock.c getcwd.c getenv.c oslib.c setlinebuf.c \
+ strcasecmp.c strerror.c strtod.c strtol.c strtoul.c \
+ vprint.c itos.c rename.c zread.c zwrite.c shtty.c \
+ inet_aton.c netconn.c netopen.c strpbrk.c timeval.c makepath.c \
+ pathcanon.c pathphys.c tmpfile.c stringlist.c stringvec.c spell.c \
+ shquote.c strtrans.c strcasestr.c snprintf.c mailstat.c \
+ fmtulong.c fmtullong.c fmtumax.c shmatch.c strnlen.c \
+ strtoll.c strtoull.c strtoimax.c strtoumax.c memset.c strstr.c \
+ mktime.c strftime.c mbschr.c zcatfd.c zmapfd.c winsize.c eaccess.c \
+ wcsdup.c fpurge.c zgetline.c mbscmp.c uconvert.c ufuncs.c \
+ casemod.c fdprintf.c input_avail.c mbscasecmp.c fnxform.c
+
+# The header files for this library.
+HSOURCES =
+
+# The object files contained in $(LIBRARY_NAME)
+LIBOBJS = @LIBOBJS@
+OBJECTS = clktck.o clock.o getenv.o oslib.o setlinebuf.o strnlen.o \
+ itos.o zread.o zwrite.o shtty.o shmatch.o eaccess.o \
+ netconn.o netopen.o timeval.o makepath.o pathcanon.o \
+ pathphys.o tmpfile.o stringlist.o stringvec.o spell.o shquote.o \
+ strtrans.o snprintf.o mailstat.o fmtulong.o \
+ fmtullong.o fmtumax.o zcatfd.o zmapfd.o winsize.o wcsdup.o \
+ fpurge.o zgetline.o mbscmp.o uconvert.o ufuncs.o casemod.o \
+ fdprintf.o input_avail.o mbscasecmp.o fnxform.o ${LIBOBJS}
+
+SUPPORT = Makefile
+
+all: $(LIBRARY_NAME)
+
+$(LIBRARY_NAME): $(OBJECTS)
+ $(RM) $@
+ $(AR) $(ARFLAGS) $@ $(OBJECTS)
+ -test -n "$(RANLIB)" && $(RANLIB) $@
+
+force:
+
+# The rule for 'includes' is written funny so that the if statement
+# always returns TRUE unless there really was an error installing the
+# include files.
+install:
+
+clean:
+ $(RM) $(OBJECTS) $(LIBRARY_NAME)
+
+realclean distclean maintainer-clean: clean
+ $(RM) Makefile
+
+mostlyclean: clean
+
+# Dependencies
+
+${BUILD_DIR}/version.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile
+ -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} version.h )
+
+${BUILD_DIR}/pathnames.h: ${BUILD_DIR}/config.h ${BUILD_DIR}/Makefile Makefile
+ -( cd ${BUILD_DIR} && ${MAKE} ${MFLAGS} pathnames.h )
+
+# rules for losing makes, like SunOS
+casemod.o: casemod.c
+clktck.o: clktck.c
+clock.o: clock.c
+eaccess.o: eaccess.c
+fdprintf.o: fdprintf.c
+fmtullong.o: fmtullong.c
+fmtulong.o: fmtulong.c
+fmtumax.o: fmtumax.c
+fnxform.o: fnxform.c
+fpurge.o: fpurge.c
+getcwd.o: getcwd.c
+getenv.o: getenv.c
+inet_aton.o: inet_aton.c
+input_avail.o: input_avail.c
+itos.o: itos.c
+mailstat.o: mailstat.c
+makepath.o: makepath.c
+mbscasecmp.o: mbscasecmp.c
+mbscmp.o: mbscmp.c
+memset.o: memset.c
+mktime.o: mktime.c
+netconn.o: netconn.c
+netopen.o: netopen.c
+oslib.o: oslib.c
+pathcanon.o: pathcanon.c
+pathphys.o: pathphys.c
+rename.o: rename.c
+setlinebuf.o: setlinebuf.c
+shquote.o: shquote.c
+shtty.o: shtty.c
+snprintf.o: snprintf.c
+spell.o: spell.c
+strcasecmp.o: strcasecmp.c
+strerror.o: strerror.c
+strftime.o: strftime.c
+strcasestr.o: strcasestr.c
+stringlist.o: stringlist.c
+stringvec.o: stringvec.c
+strnlen.o: strnlen.c
+strpbrk.o: strpbrk.c
+strtod.o: strtod.c
+strtoimax.o: strtoimax.c
+strtol.o: strtol.c
+strtoll.o: strtoll.c
+strtoul.o: strtoul.c
+strtoull.o: strtoull.c
+strtoumax.o: strtoumax.c
+strtrans.o: strtrans.c
+times.o: times.c
+timeval.o: timeval.c
+tmpfile.o: tmpfile.c
+uconvert.o: uconvert.c
+ufuncs.o: ufuncs.c
+vprint.o: vprint.c
+wcsdup.o: wcsdup.c
+mbschr.o: mbschr.c
+zcatfd.o: zcatfd.c
+zmapfd.o: zmapfd.c
+zgetline.o: zgetline.c
+zread.o: zread.c
+zwrite.o: zwrite.c
+
+# dependencies for c files that include other c files
+fmtullong.o: fmtulong.c
+fmtumax.o: fmtulong.c
+strtoll.o: strtol.c
+strtoul.o: strtol.c
+strtoull.o: strtol.c
+
+# all files in the library depend on config.h
+casemod.o: ${BUILD_DIR}/config.h
+clktck.o: ${BUILD_DIR}/config.h
+clock.o: ${BUILD_DIR}/config.h
+eaccess.o: ${BUILD_DIR}/config.h
+fdprintf.o: ${BUILD_DIR}/config.h
+fmtullong.o: ${BUILD_DIR}/config.h
+fmtulong.o: ${BUILD_DIR}/config.h
+fmtumax.o: ${BUILD_DIR}/config.h
+fnxform.o: ${BUILD_DIR}/config.h
+fpurge.o: ${BUILD_DIR}/config.h
+getcwd.o: ${BUILD_DIR}/config.h
+getenv.o: ${BUILD_DIR}/config.h
+inet_aton.o: ${BUILD_DIR}/config.h
+input_avail.o: ${BUILD_DIR}/config.h
+itos.o: ${BUILD_DIR}/config.h
+mailstat.o: ${BUILD_DIR}/config.h
+makepath.o: ${BUILD_DIR}/config.h
+mbscasecmp.o: ${BUILD_DIR}/config.h
+mbscmp.o: ${BUILD_DIR}/config.h
+memset.o: ${BUILD_DIR}/config.h
+mktime.o: ${BUILD_DIR}/config.h
+netconn.o: ${BUILD_DIR}/config.h
+netopen.o: ${BUILD_DIR}/config.h
+oslib.o: ${BUILD_DIR}/config.h
+pathcanon.o: ${BUILD_DIR}/config.h
+pathphys.o: ${BUILD_DIR}/config.h
+rename.o: ${BUILD_DIR}/config.h
+setlinebuf.o: ${BUILD_DIR}/config.h
+shquote.o: ${BUILD_DIR}/config.h
+shtty.o: ${BUILD_DIR}/config.h
+snprintf.o: ${BUILD_DIR}/config.h
+spell.o: ${BUILD_DIR}/config.h
+strcasecmp.o: ${BUILD_DIR}/config.h
+strerror.o: ${BUILD_DIR}/config.h
+strftime.o: ${BUILD_DIR}/config.h
+strcasestr.o: ${BUILD_DIR}/config.h
+stringlist.o: ${BUILD_DIR}/config.h
+stringvec.o: ${BUILD_DIR}/config.h
+strnlen.o: ${BUILD_DIR}/config.h
+strpbrk.o: ${BUILD_DIR}/config.h
+strtod.o: ${BUILD_DIR}/config.h
+strtoimax.o: ${BUILD_DIR}/config.h
+strtol.o: ${BUILD_DIR}/config.h
+strtoll.o: ${BUILD_DIR}/config.h
+strtoul.o: ${BUILD_DIR}/config.h
+strtoull.o: ${BUILD_DIR}/config.h
+strtoumax.o: ${BUILD_DIR}/config.h
+strtrans.o: ${BUILD_DIR}/config.h
+times.o: ${BUILD_DIR}/config.h
+timeval.o: ${BUILD_DIR}/config.h
+tmpfile.o: ${BUILD_DIR}/config.h
+uconvert.o: ${BUILD_DIR}/config.h
+ufuncs.o: ${BUILD_DIR}/config.h
+vprint.o: ${BUILD_DIR}/config.h
+wcsdup.o: ${BUILD_DIR}/config.h
+mbschr.o: ${BUILD_DIR}/config.h
+zcatfd.o: ${BUILD_DIR}/config.h
+zgetline.o: ${BUILD_DIR}/config.h
+zmapfd.o: ${BUILD_DIR}/config.h
+zread.o: ${BUILD_DIR}/config.h
+zwrite.o: ${BUILD_DIR}/config.h
+
+clktck.o: ${topdir}/bashtypes.h
+
+getcwd.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h
+getcwd.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/posixdir.h
+getcwd.o: ${BASHINCDIR}/memalloc.h ${BASHINCDIR}/ansi_stdlib.h
+
+getenv.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+getenv.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
+getenv.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
+getenv.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
+getenv.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
+getenv.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
+getenv.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
+getenv.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h
+getenv.o: ${BUILD_DIR}/version.h
+
+inet_aton.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+inet_aton.o: ${BASHINCDIR}/stdc.h
+
+itos.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+itos.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
+itos.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
+itos.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
+itos.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
+itos.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
+itos.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
+itos.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
+
+makepath.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+makepath.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
+makepath.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
+makepath.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
+makepath.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
+makepath.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
+makepath.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
+makepath.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
+
+netconn.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h
+netconn.o: ${topdir}/bashtypes.h
+
+netopen.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h ${topdir}/xmalloc.h
+netopen.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
+netopen.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
+netopen.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
+netopen.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
+netopen.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
+netopen.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
+netopen.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
+netopen.o: ${topdir}/bashintl.h ${LIBINTL_H} $(BASHINCDIR)/gettext.h
+
+oslib.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h
+oslib.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
+oslib.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
+oslib.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
+oslib.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
+oslib.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
+oslib.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
+oslib.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
+oslib.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h
+oslib.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
+
+pathcanon.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h
+pathcanon.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
+pathcanon.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
+pathcanon.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
+pathcanon.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
+pathcanon.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
+pathcanon.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
+pathcanon.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
+pathcanon.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h
+pathcanon.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
+
+pathphys.o: ${topdir}/bashtypes.h ${topdir}/bashansi.h ${BASHINCDIR}/maxpath.h
+pathphys.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
+pathphys.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
+pathphys.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
+pathphys.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
+pathphys.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
+pathphys.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
+pathphys.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
+pathphys.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/filecntl.h
+pathphys.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
+
+rename.o: ${topdir}/bashtypes.h ${BASHINCDIR}/stdc.h
+rename.o: ${BASHINCDIR}/posixstat.h
+
+setlinebuf.o: ${topdir}/xmalloc.h ${topdir}/bashansi.h
+setlinebuf.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/stdc.h
+
+eaccess.o: ${topdir}/bashtypes.h
+eaccess.o: ${BASHINCDIR}/posixstat.h
+eaccess.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+eaccess.o: ${BASHINCDIR}/filecntl.h
+eaccess.o: ${BASHINCDIR}/stdc.h
+eaccess.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
+eaccess.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
+eaccess.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
+eaccess.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
+eaccess.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
+eaccess.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
+eaccess.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
+
+shquote.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h
+shquote.o: ${BASHINCDIR}/ansi_stdlib.h ${topdir}/xmalloc.h
+
+shtty.o: ${BASHINCDIR}/shtty.h
+shtty.o: ${BASHINCDIR}/stdc.h
+
+snprintf.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h ${topdir}/xmalloc.h
+snprintf.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
+snprintf.o: ${BASHINCDIR}/typemax.h
+
+spell.o: ${topdir}/bashtypes.h
+spell.o: ${BASHINCDIR}/posixstat.h ${BASHINCDIR}/posixdir.h
+spell.o: ${BASHINCDIR}/ansi_stdlib.h
+
+strcasecmp.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h
+strcasecmp.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
+
+strerror.o: ${topdir}/bashtypes.h
+strerror.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
+strerror.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
+strerror.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
+strerror.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
+strerror.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
+strerror.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
+strerror.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
+
+strcasestr.o: ${BASHINCDIR}/stdc.h ${topdir}/bashansi.h
+strcasestr.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
+
+stringlist.o: ${topdir}/bashansi.h
+stringlist.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
+stringlist.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
+stringlist.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
+stringlist.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
+stringlist.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
+stringlist.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
+stringlist.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
+
+stringvec.o: ${topdir}/bashansi.h ${BASHINCDIR}/chartypes.h
+stringvec.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
+stringvec.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
+stringvec.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
+stringvec.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
+stringvec.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
+stringvec.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
+stringvec.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
+
+strnlen.o: ${BASHINCDIR}/stdc.h
+
+strpbrk.o: ${BASHINCDIR}/stdc.h
+
+strtod.o: ${topdir}/bashansi.h
+strtod.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
+
+strtoimax.o: ${BASHINCDIR}/stdc.h
+
+strtol.o: ${topdir}/bashansi.h
+strtol.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
+strtol.o: ${BASHINCDIR}/typemax.h
+
+strtoll.o: ${topdir}/bashansi.h
+strtoll.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
+strtoll.o: ${BASHINCDIR}/typemax.h
+
+strtoul.o: ${topdir}/bashansi.h
+strtoul.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
+strtoul.o: ${BASHINCDIR}/typemax.h
+
+strtoull.o: ${topdir}/bashansi.h
+strtoull.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
+strtoull.o: ${BASHINCDIR}/typemax.h
+
+strtoumax.o: ${BASHINCDIR}/stdc.h
+
+strtrans.o: ${topdir}/bashansi.h
+strtrans.o: ${BASHINCDIR}/ansi_stdlib.h ${BASHINCDIR}/chartypes.h
+strtrans.o: ${topdir}/shell.h ${topdir}/syntax.h ${topdir}/bashjmp.h ${BASHINCDIR}/posixjmp.h
+strtrans.o: ${topdir}/command.h ${BASHINCDIR}/stdc.h ${topdir}/error.h
+strtrans.o: ${topdir}/general.h ${topdir}/bashtypes.h ${topdir}/variables.h ${topdir}/conftypes.h
+strtrans.o: ${topdir}/array.h ${topdir}/hashlib.h ${topdir}/quit.h
+strtrans.o: ${topdir}/unwind_prot.h ${topdir}/dispose_cmd.h
+strtrans.o: ${topdir}/make_cmd.h ${topdir}/subst.h ${topdir}/sig.h
+strtrans.o: ${BUILD_DIR}/pathnames.h ${topdir}/externs.h ${BUILD_DIR}/version.h
+
+times.o: ${BASHINCDIR}/systimes.h
+times.o: ${BASHINCDIR}/posixtime.h
+
+timeval.o: ${BASHINCDIR}/posixtime.h
+
+tmpfile.o: ${topdir}/bashtypes.h
+tmpfile.o: ${BASHINCDIR}/posixstat.h
+tmpfile.o: ${BASHINCDIR}/filecntl.h
+
+uconvert.o: ${topdir}/bashtypes.h
+
+ufuncs.o: ${topdir}/bashtypes.h
+
+clock.o: ${BASHINCDIR}/posixtime.h
+
+mailstat.o: ${topdir}/bashansi.h
+mailstat.o: ${topdir}/bashtypes.h
+mailstat.o: ${BASHINCDIR}/ansi_stdlib.h
+mailstat.o: ${BASHINCDIR}/posixstat.h
+mailstat.o: ${BASHINCDIR}/posixdir.h
+mailstat.o: ${BASHINCDIR}/maxpath.h
+
+fmtulong.o: ${topdir}/bashansi.h
+fmtulong.o: ${BASHINCDIR}/ansi_stdlib.h
+fmtulong.o: ${BASHINCDIR}/chartypes.h
+fmtulong.o: ${BASHINCDIR}/stdc.h
+fmtulong.o: ${BASHINCDIR}/typemax.h
+fmtulong.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h
+
+fmtullong.o: ${topdir}/bashansi.h
+fmtullong.o: ${BASHINCDIR}/ansi_stdlib.h
+fmtullong.o: ${BASHINCDIR}/chartypes.h
+fmtullong.o: ${BASHINCDIR}/stdc.h
+fmtullong.o: ${BASHINCDIR}/typemax.h
+fmtullong.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h
+
+fmtumax.o: ${topdir}/bashansi.h
+fmtumax.o: ${BASHINCDIR}/ansi_stdlib.h
+fmtumax.o: ${BASHINCDIR}/chartypes.h
+fmtumax.o: ${BASHINCDIR}/stdc.h
+fmtumax.o: ${BASHINCDIR}/typemax.h
+fmtumax.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h
+
+wcsdup.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+wcsdup.o: ${BASHINCDIR}/stdc.h
+wcsdup.o: ${topdir}/xmalloc.h
+
+mbschr.o: ${topdir}/bashansi.h
+mbschr.o: ${BASHINCDIR}/ansi_stdlib.h
+mbschr.o: ${BASHINCDIR}/shmbutil.h
+
+zgetline.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+zgetline.o: ${BASHINCDIR}/stdc.h
+zgetline.o: ${topdir}/xmalloc.h
+zgetline.o: ${topdir}/bashtypes.h
+
+mbscasecmp.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+mbscasecmp.o: ${BASHINCDIR}/stdc.h
+mbscasecmp.o: ${topdir}/xmalloc.h
+
+mbscmp.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+mbscmp.o: ${BASHINCDIR}/stdc.h
+mbscmp.o: ${topdir}/xmalloc.h
+
+casemod.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+casemod.o: ${BASHINCDIR}/stdc.h
+casemod.o: ${topdir}/xmalloc.h
+casemod.o: ${topdir}/bashtypes.h
+casemod.o: ${BASHINCDIR}/shmbutil.h
+casemod.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h
+
+fdprintf.o: ${BASHINCDIR}/stdc.h
+
+input_avail.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+input_avail.o: ${BASHINCDIR}/stdc.h
+input_avail.o: ${topdir}/xmalloc.h ${BASHINCDIR}/posixselect.h
+
+mktime.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+mktime.o: ${BASHINCDIR}/stdc.h
+
+fnxform.o: ${topdir}/bashansi.h ${BASHINCDIR}/ansi_stdlib.h
+fnxform.o: ${BASHINCDIR}/stdc.h
+fnxform.o: ${topdir}/bashtypes.h
+fnxform.o: ${topdir}/bashintl.h ${LIBINTL_H} ${BASHINCDIR}/gettext.h
diff --git a/lib/sh/casemod.c b/lib/sh/casemod.c
new file mode 100644
index 0000000..d85549a
--- /dev/null
+++ b/lib/sh/casemod.c
@@ -0,0 +1,244 @@
+/* casemod.c -- functions to change case of strings */
+
+/* Copyright (C) 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#include <stdc.h>
+
+#include <bashansi.h>
+#include <bashintl.h>
+#include <bashtypes.h>
+
+#include <stdio.h>
+#include <ctype.h>
+#include <xmalloc.h>
+
+#include <shmbutil.h>
+#include <chartypes.h>
+
+#include <glob/strmatch.h>
+
+#define _to_wupper(wc) (iswlower (wc) ? towupper (wc) : (wc))
+#define _to_wlower(wc) (iswupper (wc) ? towlower (wc) : (wc))
+
+#if !defined (HANDLE_MULTIBYTE)
+# define cval(s, i) ((s)[(i)])
+# define iswalnum(c) (isalnum(c))
+# define TOGGLE(x) (ISUPPER (x) ? tolower (x) : (TOUPPER (x)))
+#else
+# define TOGGLE(x) (iswupper (x) ? towlower (x) : (_to_wupper(x)))
+#endif
+
+/* These must agree with the defines in externs.h */
+#define CASE_NOOP 0x0000
+#define CASE_LOWER 0x0001
+#define CASE_UPPER 0x0002
+#define CASE_CAPITALIZE 0x0004
+#define CASE_UNCAP 0x0008
+#define CASE_TOGGLE 0x0010
+#define CASE_TOGGLEALL 0x0020
+#define CASE_UPFIRST 0x0040
+#define CASE_LOWFIRST 0x0080
+
+#define CASE_USEWORDS 0x1000 /* modify behavior to act on words in passed string */
+
+extern char *substring __P((char *, int, int));
+
+#if defined (HANDLE_MULTIBYTE)
+static wchar_t
+cval (s, i)
+ char *s;
+ int i;
+{
+ size_t tmp;
+ wchar_t wc;
+ int l;
+ mbstate_t mps;
+
+ if (MB_CUR_MAX == 1)
+ return ((wchar_t)s[i]);
+ l = strlen (s);
+ if (i >= (l - 1))
+ return ((wchar_t)s[i]);
+ memset (&mps, 0, sizeof (mbstate_t));
+ tmp = mbrtowc (&wc, s + i, l - i, &mps);
+ if (MB_INVALIDCH (tmp) || MB_NULLWCH (tmp))
+ return ((wchar_t)s[i]);
+ return wc;
+}
+#endif
+
+/* Modify the case of characters in STRING matching PAT based on the value of
+ FLAGS. If PAT is null, modify the case of each character */
+char *
+sh_modcase (string, pat, flags)
+ const char *string;
+ char *pat;
+ int flags;
+{
+ int start, next, end;
+ int inword, c, nc, nop, match, usewords;
+ char *ret, *s;
+ wchar_t wc;
+#if defined (HANDLE_MULTIBYTE)
+ wchar_t nwc;
+ char mb[MB_LEN_MAX+1];
+ int mlen;
+ size_t m;
+ mbstate_t state;
+#endif
+
+#if defined (HANDLE_MULTIBYTE)
+ memset (&state, 0, sizeof (mbstate_t));
+#endif
+
+ start = 0;
+ end = strlen (string);
+
+ ret = (char *)xmalloc (end + 1);
+ strcpy (ret, string);
+
+ /* See if we are supposed to split on alphanumerics and operate on each word */
+ usewords = (flags & CASE_USEWORDS);
+ flags &= ~CASE_USEWORDS;
+
+ inword = 0;
+ while (start < end)
+ {
+ wc = cval (ret, start);
+
+ if (iswalnum (wc) == 0)
+ {
+ inword = 0;
+ ADVANCE_CHAR (ret, end, start);
+ continue;
+ }
+
+ if (pat)
+ {
+ next = start;
+ ADVANCE_CHAR (ret, end, next);
+ s = substring (ret, start, next);
+ match = strmatch (pat, s, FNM_EXTMATCH) != FNM_NOMATCH;
+ free (s);
+ if (match == 0)
+ {
+ start = next;
+ inword = 1;
+ continue;
+ }
+ }
+
+ /* XXX - for now, the toggling operators work on the individual
+ words in the string, breaking on alphanumerics. Should I
+ leave the capitalization operators to do that also? */
+ if (flags == CASE_CAPITALIZE)
+ {
+ if (usewords)
+ nop = inword ? CASE_LOWER : CASE_UPPER;
+ else
+ nop = (start > 0) ? CASE_LOWER : CASE_UPPER;
+ inword = 1;
+ }
+ else if (flags == CASE_UNCAP)
+ {
+ if (usewords)
+ nop = inword ? CASE_UPPER : CASE_LOWER;
+ else
+ nop = (start > 0) ? CASE_UPPER : CASE_LOWER;
+ inword = 1;
+ }
+ else if (flags == CASE_UPFIRST)
+ {
+ if (usewords)
+ nop = inword ? CASE_NOOP : CASE_UPPER;
+ else
+ nop = (start > 0) ? CASE_NOOP : CASE_UPPER;
+ inword = 1;
+ }
+ else if (flags == CASE_LOWFIRST)
+ {
+ if (usewords)
+ nop = inword ? CASE_NOOP : CASE_LOWER;
+ else
+ nop = (start > 0) ? CASE_NOOP : CASE_LOWER;
+ inword = 1;
+ }
+ else if (flags == CASE_TOGGLE)
+ {
+ nop = inword ? CASE_NOOP : CASE_TOGGLE;
+ inword = 1;
+ }
+ else
+ nop = flags;
+
+ if (MB_CUR_MAX == 1 || isascii (wc))
+ {
+ switch (nop)
+ {
+ default:
+ case CASE_NOOP: nc = wc; break;
+ case CASE_UPPER: nc = TOUPPER (wc); break;
+ case CASE_LOWER: nc = TOLOWER (wc); break;
+ case CASE_TOGGLEALL:
+ case CASE_TOGGLE: nc = TOGGLE (wc); break;
+ }
+ ret[start] = nc;
+ }
+#if defined (HANDLE_MULTIBYTE)
+ else
+ {
+ m = mbrtowc (&wc, string + start, end - start, &state);
+ if (MB_INVALIDCH (m))
+ wc = (wchar_t)string[start];
+ else if (MB_NULLWCH (m))
+ wc = L'\0';
+ switch (nop)
+ {
+ default:
+ case CASE_NOOP: nwc = wc; break;
+ case CASE_UPPER: nwc = TOUPPER (wc); break;
+ case CASE_LOWER: nwc = TOLOWER (wc); break;
+ case CASE_TOGGLEALL:
+ case CASE_TOGGLE: nwc = TOGGLE (wc); break;
+ }
+ if (nwc != wc) /* just skip unchanged characters */
+ {
+ mlen = wcrtomb (mb, nwc, &state);
+ if (mlen > 0)
+ mb[mlen] = '\0';
+ /* Assume the same width */
+ strncpy (ret + start, mb, mlen);
+ }
+ }
+#endif
+
+ /* This assumes that the upper and lower case versions are the same width. */
+ ADVANCE_CHAR (ret, end, start);
+ }
+
+ return ret;
+}
diff --git a/lib/sh/clktck.c b/lib/sh/clktck.c
new file mode 100644
index 0000000..096ce06
--- /dev/null
+++ b/lib/sh/clktck.c
@@ -0,0 +1,59 @@
+/* clktck.c - get the value of CLK_TCK. */
+
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <bashtypes.h>
+#include <sys/param.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#if defined (HAVE_LIMITS_H)
+# include <limits.h>
+#endif
+
+#if !defined (HAVE_SYSCONF) || !defined (_SC_CLK_TCK)
+# if !defined (CLK_TCK)
+# if defined (HZ)
+# define CLK_TCK HZ
+# else
+# define CLK_TCK 60
+# endif
+# endif /* !CLK_TCK */
+#endif /* !HAVE_SYSCONF && !_SC_CLK_TCK */
+
+long
+get_clk_tck ()
+{
+ static long retval = 0;
+
+ if (retval != 0)
+ return (retval);
+
+#if defined (HAVE_SYSCONF) && defined (_SC_CLK_TCK)
+ retval = sysconf (_SC_CLK_TCK);
+#else /* !SYSCONF || !_SC_CLK_TCK */
+ retval = CLK_TCK;
+#endif /* !SYSCONF || !_SC_CLK_TCK */
+
+ return (retval);
+}
diff --git a/lib/sh/clock.c b/lib/sh/clock.c
new file mode 100644
index 0000000..84cdbc5
--- /dev/null
+++ b/lib/sh/clock.c
@@ -0,0 +1,81 @@
+/* clock.c - operations on struct tms and clock_t's */
+
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_TIMES)
+
+#include <sys/types.h>
+#include <posixtime.h>
+
+#if defined (HAVE_SYS_TIMES_H)
+# include <sys/times.h>
+#endif
+
+#include <stdio.h>
+#include <stdc.h>
+
+extern long get_clk_tck __P((void));
+
+void
+clock_t_to_secs (t, sp, sfp)
+ clock_t t;
+ time_t *sp;
+ int *sfp;
+{
+ static long clk_tck = -1;
+
+ if (clk_tck == -1)
+ clk_tck = get_clk_tck ();
+
+ *sfp = t % clk_tck;
+ *sfp = (*sfp * 1000) / clk_tck;
+
+ *sp = t / clk_tck;
+
+ /* Sanity check */
+ if (*sfp >= 1000)
+ {
+ *sp += 1;
+ *sfp -= 1000;
+ }
+}
+
+/* Print the time defined by a clock_t (returned by the `times' and `time'
+ system calls) in a standard way to stdio stream FP. This is scaled in
+ terms of the value of CLK_TCK, which is what is returned by the
+ `times' call. */
+void
+print_clock_t (fp, t)
+ FILE *fp;
+ clock_t t;
+{
+ time_t timestamp;
+ long minutes;
+ int seconds, seconds_fraction;
+
+ clock_t_to_secs (t, &timestamp, &seconds_fraction);
+
+ minutes = timestamp / 60;
+ seconds = timestamp % 60;
+
+ fprintf (fp, "%ldm%d.%03ds", minutes, seconds, seconds_fraction);
+}
+#endif /* HAVE_TIMES */
diff --git a/lib/sh/eaccess.c b/lib/sh/eaccess.c
new file mode 100644
index 0000000..989bc22
--- /dev/null
+++ b/lib/sh/eaccess.c
@@ -0,0 +1,222 @@
+/* eaccess.c - eaccess replacement for the shell, plus other access functions. */
+
+/* Copyright (C) 2006 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include "bashtypes.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+
+#include <errno.h>
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+#if !defined (_POSIX_VERSION) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif /* !_POSIX_VERSION */
+#include "posixstat.h"
+#include "filecntl.h"
+
+#include "shell.h"
+
+#if !defined (R_OK)
+#define R_OK 4
+#define W_OK 2
+#define X_OK 1
+#define F_OK 0
+#endif /* R_OK */
+
+static int path_is_devfd __P((const char *));
+static int sh_stataccess __P((char *, int));
+#if HAVE_DECL_SETREGID
+static int sh_euidaccess __P((char *, int));
+#endif
+
+static int
+path_is_devfd (path)
+ const char *path;
+{
+ if (path[0] == '/' && path[1] == 'd' && strncmp (path, "/dev/fd/", 8) == 0)
+ return 1;
+ else if (STREQN (path, "/dev/std", 8))
+ {
+ if (STREQ (path+8, "in") || STREQ (path+8, "out") || STREQ (path+8, "err"))
+ return 1;
+ else
+ return 0;
+ }
+ else
+ return 0;
+}
+
+/* A wrapper for stat () which disallows pathnames that are empty strings
+ and handles /dev/fd emulation on systems that don't have it. */
+int
+sh_stat (path, finfo)
+ const char *path;
+ struct stat *finfo;
+{
+ if (*path == '\0')
+ {
+ errno = ENOENT;
+ return (-1);
+ }
+ if (path[0] == '/' && path[1] == 'd' && strncmp (path, "/dev/fd/", 8) == 0)
+ {
+#if !defined (HAVE_DEV_FD)
+ intmax_t fd;
+ int r;
+
+ if (legal_number (path + 8, &fd) && fd == (int)fd)
+ {
+ r = fstat ((int)fd, finfo);
+ if (r == 0 || errno != EBADF)
+ return (r);
+ }
+ errno = ENOENT;
+ return (-1);
+#else
+ /* If HAVE_DEV_FD is defined, DEV_FD_PREFIX is defined also, and has a
+ trailing slash. Make sure /dev/fd/xx really uses DEV_FD_PREFIX/xx.
+ On most systems, with the notable exception of linux, this is
+ effectively a no-op. */
+ char pbuf[32];
+ strcpy (pbuf, DEV_FD_PREFIX);
+ strcat (pbuf, path + 8);
+ return (stat (pbuf, finfo));
+#endif /* !HAVE_DEV_FD */
+ }
+#if !defined (HAVE_DEV_STDIN)
+ else if (STREQN (path, "/dev/std", 8))
+ {
+ if (STREQ (path+8, "in"))
+ return (fstat (0, finfo));
+ else if (STREQ (path+8, "out"))
+ return (fstat (1, finfo));
+ else if (STREQ (path+8, "err"))
+ return (fstat (2, finfo));
+ else
+ return (stat (path, finfo));
+ }
+#endif /* !HAVE_DEV_STDIN */
+ return (stat (path, finfo));
+}
+
+/* Do the same thing access(2) does, but use the effective uid and gid,
+ and don't make the mistake of telling root that any file is
+ executable. This version uses stat(2). */
+static int
+sh_stataccess (path, mode)
+ char *path;
+ int mode;
+{
+ struct stat st;
+
+ if (sh_stat (path, &st) < 0)
+ return (-1);
+
+ if (current_user.euid == 0)
+ {
+ /* Root can read or write any file. */
+ if ((mode & X_OK) == 0)
+ return (0);
+
+ /* Root can execute any file that has any one of the execute
+ bits set. */
+ if (st.st_mode & S_IXUGO)
+ return (0);
+ }
+
+ if (st.st_uid == current_user.euid) /* owner */
+ mode <<= 6;
+ else if (group_member (st.st_gid))
+ mode <<= 3;
+
+ if (st.st_mode & mode)
+ return (0);
+
+ errno = EACCES;
+ return (-1);
+}
+
+#if HAVE_DECL_SETREGID
+/* Version to call when uid != euid or gid != egid. We temporarily swap
+ the effective and real uid and gid as appropriate. */
+static int
+sh_euidaccess (path, mode)
+ char *path;
+ int mode;
+{
+ int r, e;
+
+ if (current_user.uid != current_user.euid)
+ setreuid (current_user.euid, current_user.uid);
+ if (current_user.gid != current_user.egid)
+ setregid (current_user.egid, current_user.gid);
+
+ r = access (path, mode);
+ e = errno;
+
+ if (current_user.uid != current_user.euid)
+ setreuid (current_user.uid, current_user.euid);
+ if (current_user.gid != current_user.egid)
+ setregid (current_user.gid, current_user.egid);
+
+ errno = e;
+ return r;
+}
+#endif
+
+int
+sh_eaccess (path, mode)
+ char *path;
+ int mode;
+{
+ if (path_is_devfd (path))
+ return (sh_stataccess (path, mode));
+
+#if defined (HAVE_EACCESS) /* FreeBSD */
+ return (eaccess (path, mode));
+#elif defined (EFF_ONLY_OK) /* SVR4(?), SVR4.2 */
+ return access (path, mode|EFF_ONLY_OK);
+#else
+ if (mode == F_OK)
+ return (sh_stataccess (path, mode));
+
+# if HAVE_DECL_SETREGID
+ if (current_user.uid != current_user.euid || current_user.gid != current_user.egid)
+ return (sh_euidaccess (path, mode));
+# endif
+
+ if (current_user.uid == current_user.euid && current_user.gid == current_user.egid)
+ return (access (path, mode));
+
+ return (sh_stataccess (path, mode));
+#endif
+}
diff --git a/lib/sh/fdprintf.c b/lib/sh/fdprintf.c
new file mode 100644
index 0000000..27d3a4b
--- /dev/null
+++ b/lib/sh/fdprintf.c
@@ -0,0 +1,70 @@
+/* fdprintf -- printf to a file descriptor */
+
+/* Copyright (C) 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#include <stdc.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#if defined (PREFER_STDARG)
+# include <stdarg.h>
+#else
+# include <varargs.h>
+#endif
+
+#include <stdio.h>
+
+int
+#if defined (PREFER_STDARG)
+fdprintf(int fd, const char *format, ...)
+#else
+fdprintf(fd, format, va_alist)
+ int fd;
+ const char *format;
+ va_dcl
+#endif
+{
+ FILE *fp;
+ int fd2, rc, r2;
+ va_list args;
+
+ if ((fd2 = dup(fd)) < 0)
+ return -1;
+ fp = fdopen (fd2, "w");
+ if (fp == 0)
+ {
+ close (fd2);
+ return -1;
+ }
+
+ SH_VA_START (args, format);
+ rc = vfprintf (fp, format, args);
+ fflush (fp);
+ va_end (args);
+
+ r2 = fclose (fp); /* check here */
+
+ return rc;
+}
diff --git a/lib/sh/fmtullong.c b/lib/sh/fmtullong.c
new file mode 100644
index 0000000..97a1dc1
--- /dev/null
+++ b/lib/sh/fmtullong.c
@@ -0,0 +1,31 @@
+/* fmtullong.c - convert `long long int' to string */
+
+/* Copyright (C) 2001-2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#ifdef HAVE_LONG_LONG
+
+#define LONG long long
+#define UNSIGNED_LONG unsigned long long
+#define fmtulong fmtullong
+
+#include "fmtulong.c"
+
+#endif
diff --git a/lib/sh/fmtulong.c b/lib/sh/fmtulong.c
new file mode 100644
index 0000000..214b146
--- /dev/null
+++ b/lib/sh/fmtulong.c
@@ -0,0 +1,190 @@
+/* fmtulong.c -- Convert unsigned long int to string. */
+
+/* Copyright (C) 1998-2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#if defined (HAVE_LIMITS_H)
+# include <limits.h>
+#endif
+
+#include <bashansi.h>
+#ifdef HAVE_STDDEF_H
+# include <stddef.h>
+#endif
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#include <chartypes.h>
+#include <errno.h>
+
+#include <bashintl.h>
+
+#include "stdc.h"
+
+#include <typemax.h>
+
+#ifndef errno
+extern int errno;
+#endif
+
+#define x_digs "0123456789abcdef"
+#define X_digs "0123456789ABCDEF"
+
+/* XXX -- assumes uppercase letters, lowercase letters, and digits are
+ contiguous */
+#define FMTCHAR(x) \
+ ((x) < 10) ? (x) + '0' \
+ : (((x) < 36) ? (x) - 10 + 'a' \
+ : (((x) < 62) ? (x) - 36 + 'A' \
+ : (((x) == 62) ? '@' : '_')))
+
+#ifndef FL_PREFIX
+# define FL_PREFIX 0x01 /* add 0x, 0X, or 0 prefix as appropriate */
+# define FL_ADDBASE 0x02 /* add base# prefix to converted value */
+# define FL_HEXUPPER 0x04 /* use uppercase when converting to hex */
+# define FL_UNSIGNED 0x08 /* don't add any sign */
+#endif
+
+#ifndef LONG
+# define LONG long
+# define UNSIGNED_LONG unsigned long
+#endif
+
+/* `unsigned long' (or unsigned long long) to string conversion for a given
+ base. The caller passes the output buffer and the size. This should
+ check for buffer underflow, but currently does not. */
+char *
+fmtulong (ui, base, buf, len, flags)
+ UNSIGNED_LONG ui;
+ int base;
+ char *buf;
+ size_t len;
+ int flags;
+{
+ char *p;
+ int sign;
+ LONG si;
+
+ if (base == 0)
+ base = 10;
+
+ if (base < 2 || base > 64)
+ {
+#if 1
+ strncpy (buf, _("invalid base"), len - 1);
+ buf[len] = '\0';
+ errno = EINVAL;
+ return (p = buf);
+#else
+ base = 10;
+#endif
+ }
+
+ sign = 0;
+ if ((flags & FL_UNSIGNED) == 0 && (LONG)ui < 0)
+ {
+ ui = -ui;
+ sign = '-';
+ }
+
+ p = buf + len - 2;
+ p[1] = '\0';
+
+ /* handle common cases explicitly */
+ switch (base)
+ {
+ case 10:
+ if (ui < 10)
+ {
+ *p-- = TOCHAR (ui);
+ break;
+ }
+ /* Favor signed arithmetic over unsigned arithmetic; it is faster on
+ many machines. */
+ if ((LONG)ui < 0)
+ {
+ *p-- = TOCHAR (ui % 10);
+ si = ui / 10;
+ }
+ else
+ si = ui;
+ do
+ *p-- = TOCHAR (si % 10);
+ while (si /= 10);
+ break;
+
+ case 8:
+ do
+ *p-- = TOCHAR (ui & 7);
+ while (ui >>= 3);
+ break;
+
+ case 16:
+ do
+ *p-- = (flags & FL_HEXUPPER) ? X_digs[ui & 15] : x_digs[ui & 15];
+ while (ui >>= 4);
+ break;
+
+ case 2:
+ do
+ *p-- = TOCHAR (ui & 1);
+ while (ui >>= 1);
+ break;
+
+ default:
+ do
+ *p-- = FMTCHAR (ui % base);
+ while (ui /= base);
+ break;
+ }
+
+ if ((flags & FL_PREFIX) && (base == 8 || base == 16))
+ {
+ if (base == 16)
+ {
+ *p-- = (flags & FL_HEXUPPER) ? 'X' : 'x';
+ *p-- = '0';
+ }
+ else if (p[1] != '0')
+ *p-- = '0';
+ }
+ else if ((flags & FL_ADDBASE) && base != 10)
+ {
+ *p-- = '#';
+ *p-- = TOCHAR (base % 10);
+ if (base > 10)
+ *p-- = TOCHAR (base / 10);
+ }
+
+ if (sign)
+ *p-- = '-';
+
+ return (p + 1);
+}
diff --git a/lib/sh/fmtumax.c b/lib/sh/fmtumax.c
new file mode 100644
index 0000000..f2786b5
--- /dev/null
+++ b/lib/sh/fmtumax.c
@@ -0,0 +1,27 @@
+/* fmtumax.c -- Convert uintmax_t to string. */
+
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#define LONG intmax_t
+#define UNSIGNED_LONG uintmax_t
+#define fmtulong fmtumax
+
+#include "fmtulong.c"
diff --git a/lib/sh/fnxform.c b/lib/sh/fnxform.c
new file mode 100644
index 0000000..d95274f
--- /dev/null
+++ b/lib/sh/fnxform.c
@@ -0,0 +1,199 @@
+/* fnxform - use iconv(3) to transform strings to and from "filename" format */
+
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+#include "bashansi.h"
+#include <stdio.h>
+#include "bashtypes.h"
+
+#include "stdc.h"
+#include "bashintl.h"
+#include <xmalloc.h>
+
+#if defined (HAVE_ICONV)
+# include <iconv.h>
+#endif
+
+#if defined (HAVE_LOCALE_CHARSET)
+extern const char *locale_charset __P((void));
+#else
+extern char *get_locale_var __P((char *));
+#endif
+
+#if defined (HAVE_ICONV)
+static iconv_t conv_fromfs = (iconv_t)-1;
+static iconv_t conv_tofs = (iconv_t)-1;
+
+#define OUTLEN_MAX 4096
+
+static char *outbuf = 0;
+static size_t outlen = 0;
+
+static char *curencoding __P((void));
+static void init_tofs __P((void));
+static void init_fromfs __P((void));
+
+static char *
+curencoding ()
+{
+ char *loc;
+#if defined (HAVE_LOCALE_CHARSET)
+ loc = (char *)locale_charset ();
+ return loc;
+#else
+ char *dot, *mod;
+
+ loc = get_locale_var ("LC_CTYPE");
+ if (loc == 0 || *loc == 0)
+ return "";
+ dot = strchr (loc, '.');
+ if (dot == 0)
+ return loc;
+ mod = strchr (dot, '@');
+ if (mod)
+ *mod = '\0';
+ return dot;
+#endif
+}
+
+static void
+init_tofs ()
+{
+ char *cur;
+
+ cur = curencoding ();
+ conv_tofs = iconv_open ("UTF-8-MAC", cur);
+}
+
+static void
+init_fromfs ()
+{
+ char *cur;
+
+ cur = curencoding ();
+ conv_fromfs = iconv_open (cur, "UTF-8-MAC");
+}
+
+char *
+fnx_tofs (string, len)
+ char *string;
+ size_t len;
+{
+#ifdef MACOSX
+ ICONV_CONST char *inbuf;
+ char *tempbuf;
+ size_t templen;
+
+ if (conv_tofs == (iconv_t)-1)
+ init_tofs ();
+ if (conv_tofs == (iconv_t)-1)
+ return string;
+
+ /* Free and reallocate outbuf if it's *too* big */
+ if (outlen >= OUTLEN_MAX && len < OUTLEN_MAX - 8)
+ {
+ free (outbuf);
+ outbuf = 0;
+ outlen = 0;
+ }
+
+ inbuf = string;
+ if (outbuf == 0 || outlen < len + 8)
+ {
+ outlen = len + 8;
+ outbuf = outbuf ? xrealloc (outbuf, outlen + 1) : xmalloc (outlen + 1);
+ }
+ tempbuf = outbuf;
+ templen = outlen;
+
+ iconv (conv_tofs, NULL, NULL, NULL, NULL);
+
+ if (iconv (conv_tofs, &inbuf, &len, &tempbuf, &templen) == (size_t)-1)
+ return string;
+
+ *tempbuf = '\0';
+ return outbuf;
+#else
+ return string;
+#endif
+}
+
+char *
+fnx_fromfs (string, len)
+ char *string;
+ size_t len;
+{
+#ifdef MACOSX
+ ICONV_CONST char *inbuf;
+ char *tempbuf;
+ size_t templen;
+
+ if (conv_fromfs == (iconv_t)-1)
+ init_fromfs ();
+ if (conv_fromfs == (iconv_t)-1)
+ return string;
+
+ /* Free and reallocate outbuf if it's *too* big */
+ if (outlen >= OUTLEN_MAX && len < OUTLEN_MAX - 8)
+ {
+ free (outbuf);
+ outbuf = 0;
+ outlen = 0;
+ }
+
+ inbuf = string;
+ if (outbuf == 0 || outlen < (len + 8))
+ {
+ outlen = len + 8;
+ outbuf = outbuf ? xrealloc (outbuf, outlen + 1) : xmalloc (outlen + 1);
+ }
+ tempbuf = outbuf;
+ templen = outlen;
+
+ iconv (conv_fromfs, NULL, NULL, NULL, NULL);
+
+ if (iconv (conv_fromfs, &inbuf, &len, &tempbuf, &templen) == (size_t)-1)
+ return string;
+
+ *tempbuf = '\0';
+ return outbuf;
+#else
+ return string;
+#endif
+}
+
+#else
+char *
+fnx_tofs (string)
+ char *string;
+{
+ return string;
+}
+
+char *
+fnx_fromfs (string)
+ char *string;
+{
+ return string;
+}
+#endif
diff --git a/lib/sh/fpurge.c b/lib/sh/fpurge.c
new file mode 100644
index 0000000..f9e1b9d
--- /dev/null
+++ b/lib/sh/fpurge.c
@@ -0,0 +1,148 @@
+/* fpurge - Flushing buffers of a FILE stream. */
+
+/* Copyright (C) 2007 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include "stdc.h"
+
+#include <stdio.h>
+
+/* Specification. Same as in ../../externs.h. */
+#define NEED_FPURGE_DECL
+#if HAVE_FPURGE
+# define fpurge _bash_fpurge
+#endif
+extern int fpurge __P((FILE *stream));
+
+#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */
+# include <stdio_ext.h>
+#endif
+#include <stdlib.h>
+
+int
+fpurge (FILE *fp)
+{
+#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */
+
+ __fpurge (fp);
+ /* The __fpurge function does not have a return value. */
+ return 0;
+
+#elif HAVE_FPURGE /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X */
+
+ /* Call the system's fpurge function. */
+# undef fpurge
+# if !HAVE_DECL_FPURGE
+ extern int fpurge (FILE *);
+# endif
+ int result = fpurge (fp);
+# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+ if (result == 0)
+ /* Correct the invariants that fpurge broke.
+ <stdio.h> on BSD systems says:
+ "The following always hold: if _flags & __SRD, _w is 0."
+ If this invariant is not fulfilled and the stream is read-write but
+ currently writing, subsequent putc or fputc calls will write directly
+ into the buffer, although they shouldn't be allowed to. */
+ if ((fp->_flags & __SRD) != 0)
+ fp->_w = 0;
+# endif
+ return result;
+
+#else
+
+ /* Most systems provide FILE as a struct and the necessary bitmask in
+ <stdio.h>, because they need it for implementing getc() and putc() as
+ fast macros. */
+# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ fp->_IO_read_end = fp->_IO_read_ptr;
+ fp->_IO_write_ptr = fp->_IO_write_base;
+ /* Avoid memory leak when there is an active ungetc buffer. */
+ if (fp->_IO_save_base != NULL)
+ {
+ free (fp->_IO_save_base);
+ fp->_IO_save_base = NULL;
+ }
+ return 0;
+# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+ fp_->_p = fp_->_bf._base;
+ fp_->_r = 0;
+ fp_->_w = ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */
+ ? fp_->_bf._size
+ : 0);
+ /* Avoid memory leak when there is an active ungetc buffer. */
+ if (fp_ub._base != NULL)
+ {
+ if (fp_ub._base != fp_->_ubuf)
+ free (fp_ub._base);
+ fp_ub._base = NULL;
+ }
+ return 0;
+# elif defined __EMX__ /* emx+gcc */
+ fp->_ptr = fp->_buffer;
+ fp->_rcount = 0;
+ fp->_wcount = 0;
+ fp->_ungetc_count = 0;
+ return 0;
+# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */
+ fp->_ptr = fp->_base;
+ if (fp->_ptr != NULL)
+ fp->_cnt = 0;
+ return 0;
+# elif defined __UCLIBC__ /* uClibc */
+# ifdef __STDIO_BUFFERS
+ if (fp->__modeflags & __FLAG_WRITING)
+ fp->__bufpos = fp->__bufstart;
+ else if (fp->__modeflags & (__FLAG_READONLY | __FLAG_READING))
+ fp->__bufpos = fp->__bufread;
+# endif
+ return 0;
+# elif defined __QNX__ /* QNX */
+ fp->_Rback = fp->_Back + sizeof (fp->_Back);
+ fp->_Rsave = NULL;
+ if (fp->_Mode & 0x2000 /* _MWRITE */)
+ /* fp->_Buf <= fp->_Next <= fp->_Wend */
+ fp->_Next = fp->_Buf;
+ else
+ /* fp->_Buf <= fp->_Next <= fp->_Rend */
+ fp->_Rend = fp->_Next;
+ return 0;
+# elif defined __MINT__ /* Atari FreeMiNT */
+ if (fp->__pushed_back)
+ {
+ fp->__bufp = fp->__pushback_bufp;
+ fp->__pushed_back = 0;
+ }
+ /* Preserve the current file position. */
+ if (fp->__target != -1)
+ fp->__target += fp->__bufp - fp->__buffer;
+ fp->__bufp = fp->__buffer;
+ /* Nothing in the buffer, next getc is nontrivial. */
+ fp->__get_limit = fp->__bufp;
+ /* Nothing in the buffer, next putc is nontrivial. */
+ fp->__put_limit = fp->__buffer;
+ return 0;
+# else
+# warning "Please port gnulib fpurge.c to your platform! Look at the definitions of fflush, setvbuf and ungetc on your system, then report this to bug-gnulib."
+ return 0;
+# endif
+
+#endif
+}
diff --git a/lib/sh/getcwd.c b/lib/sh/getcwd.c
new file mode 100644
index 0000000..07eb817
--- /dev/null
+++ b/lib/sh/getcwd.c
@@ -0,0 +1,356 @@
+/* getcwd.c -- get pathname of current directory */
+
+/* Copyright (C) 1991 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if !defined (HAVE_GETCWD)
+
+#if !defined (__GNUC__) && !defined (HAVE_ALLOCA_H) && defined (_AIX)
+ #pragma alloca
+#endif /* _AIX && RISC6000 && !__GNUC__ */
+
+#if defined (__QNX__)
+# undef HAVE_LSTAT
+#endif
+
+#include <bashtypes.h>
+#include <errno.h>
+
+#if defined (HAVE_LIMITS_H)
+# include <limits.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <posixdir.h>
+#include <posixstat.h>
+#include <maxpath.h>
+#include <memalloc.h>
+
+#include <bashansi.h>
+
+#if defined (BROKEN_DIRENT_D_INO)
+# include "command.h"
+# include "general.h"
+# include "externs.h"
+#endif
+
+#include <xmalloc.h>
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+#if !defined (HAVE_LSTAT)
+# define lstat stat
+#endif
+
+#if !defined (NULL)
+# define NULL 0
+#endif
+
+/* If the d_fileno member of a struct dirent doesn't return anything useful,
+ we need to check inode number equivalence the hard way. Return 1 if
+ the inode corresponding to PATH/DIR is identical to THISINO. */
+#if defined (BROKEN_DIRENT_D_INO)
+static int
+_path_checkino (dotp, name, thisino)
+ char *dotp;
+ char *name;
+ ino_t thisino;
+{
+ char *fullpath;
+ int r, e;
+ struct stat st;
+
+ e = errno;
+ fullpath = sh_makepath (dotp, name, MP_RMDOT);
+ if (stat (fullpath, &st) < 0)
+ {
+ errno = e;
+ return 0;
+ }
+ free (fullpath);
+ errno = e;
+ return (st.st_ino == thisino);
+}
+#endif
+
+/* Get the pathname of the current working directory,
+ and put it in SIZE bytes of BUF. Returns NULL if the
+ directory couldn't be determined or SIZE was too small.
+ If successful, returns BUF. In GNU, if BUF is NULL,
+ an array is allocated with `malloc'; the array is SIZE
+ bytes long, unless SIZE <= 0, in which case it is as
+ big as necessary. */
+#if defined (__STDC__)
+char *
+getcwd (char *buf, size_t size)
+#else /* !__STDC__ */
+char *
+getcwd (buf, size)
+ char *buf;
+ size_t size;
+#endif /* !__STDC__ */
+{
+ static const char dots[]
+ = "../../../../../../../../../../../../../../../../../../../../../../../\
+../../../../../../../../../../../../../../../../../../../../../../../../../../\
+../../../../../../../../../../../../../../../../../../../../../../../../../..";
+ const char *dotp, *dotlist;
+ size_t dotsize;
+ dev_t rootdev, thisdev;
+ ino_t rootino, thisino;
+ char path[PATH_MAX + 1];
+ register char *pathp;
+ char *pathbuf;
+ size_t pathsize;
+ struct stat st;
+ int saved_errno;
+
+ if (buf != NULL && size == 0)
+ {
+ errno = EINVAL;
+ return ((char *)NULL);
+ }
+
+ pathsize = sizeof (path);
+ pathp = &path[pathsize];
+ *--pathp = '\0';
+ pathbuf = path;
+
+ if (stat (".", &st) < 0)
+ return ((char *)NULL);
+ thisdev = st.st_dev;
+ thisino = st.st_ino;
+
+ if (stat ("/", &st) < 0)
+ return ((char *)NULL);
+ rootdev = st.st_dev;
+ rootino = st.st_ino;
+
+ saved_errno = 0;
+
+ dotsize = sizeof (dots) - 1;
+ dotp = &dots[sizeof (dots)];
+ dotlist = dots;
+ while (!(thisdev == rootdev && thisino == rootino))
+ {
+ register DIR *dirstream;
+ register struct dirent *d;
+ dev_t dotdev;
+ ino_t dotino;
+ char mount_point;
+ int namlen;
+
+ /* Look at the parent directory. */
+ if (dotp == dotlist)
+ {
+ /* My, what a deep directory tree you have, Grandma. */
+ char *new;
+ if (dotlist == dots)
+ {
+ new = (char *)malloc (dotsize * 2 + 1);
+ if (new == NULL)
+ goto lose;
+ memcpy (new, dots, dotsize);
+ }
+ else
+ {
+ new = (char *)realloc ((PTR_T) dotlist, dotsize * 2 + 1);
+ if (new == NULL)
+ goto lose;
+ }
+ memcpy (&new[dotsize], new, dotsize);
+ dotp = &new[dotsize];
+ dotsize *= 2;
+ new[dotsize] = '\0';
+ dotlist = new;
+ }
+
+ dotp -= 3;
+
+ /* Figure out if this directory is a mount point. */
+ if (stat (dotp, &st) < 0)
+ goto lose;
+ dotdev = st.st_dev;
+ dotino = st.st_ino;
+ mount_point = dotdev != thisdev;
+
+ /* Search for the last directory. */
+ dirstream = opendir (dotp);
+ if (dirstream == NULL)
+ goto lose;
+ while ((d = readdir (dirstream)) != NULL)
+ {
+ if (d->d_name[0] == '.' &&
+ (d->d_name[1] == '\0' ||
+ (d->d_name[1] == '.' && d->d_name[2] == '\0')))
+ continue;
+#if !defined (BROKEN_DIRENT_D_INO)
+ if (mount_point || d->d_fileno == thisino)
+#else
+ if (mount_point || _path_checkino (dotp, d->d_name, thisino))
+#endif
+ {
+ char *name;
+
+ namlen = D_NAMLEN(d);
+ name = (char *)
+ alloca (dotlist + dotsize - dotp + 1 + namlen + 1);
+ memcpy (name, dotp, dotlist + dotsize - dotp);
+ name[dotlist + dotsize - dotp] = '/';
+ memcpy (&name[dotlist + dotsize - dotp + 1],
+ d->d_name, namlen + 1);
+ if (lstat (name, &st) < 0)
+ {
+#if 0
+ int save = errno;
+ (void) closedir (dirstream);
+ errno = save;
+ goto lose;
+#else
+ saved_errno = errno;
+#endif
+ }
+ if (st.st_dev == thisdev && st.st_ino == thisino)
+ break;
+ }
+ }
+ if (d == NULL)
+ {
+#if 0
+ int save = errno;
+#else
+ int save = errno ? errno : saved_errno;
+#endif
+ (void) closedir (dirstream);
+ errno = save;
+ goto lose;
+ }
+ else
+ {
+ size_t space;
+
+ while ((space = pathp - pathbuf) <= namlen)
+ {
+ char *new;
+
+ if (pathbuf == path)
+ {
+ new = (char *)malloc (pathsize * 2);
+ if (!new)
+ goto lose;
+ }
+ else
+ {
+ new = (char *)realloc ((PTR_T) pathbuf, (pathsize * 2));
+ if (!new)
+ goto lose;
+ pathp = new + space;
+ }
+ (void) memcpy (new + pathsize + space, pathp, pathsize - space);
+ pathp = new + pathsize + space;
+ pathbuf = new;
+ pathsize *= 2;
+ }
+
+ pathp -= namlen;
+ (void) memcpy (pathp, d->d_name, namlen);
+ *--pathp = '/';
+ (void) closedir (dirstream);
+ }
+
+ thisdev = dotdev;
+ thisino = dotino;
+ }
+
+ if (pathp == &path[sizeof(path) - 1])
+ *--pathp = '/';
+
+ if (dotlist != dots)
+ free ((PTR_T) dotlist);
+
+ {
+ size_t len = pathbuf + pathsize - pathp;
+ if (buf == NULL && size <= 0)
+ size = len;
+
+ if ((size_t) size < len)
+ {
+ errno = ERANGE;
+ goto lose2;
+ }
+ if (buf == NULL)
+ {
+ buf = (char *) malloc (size);
+ if (buf == NULL)
+ goto lose2;
+ }
+
+ (void) memcpy((PTR_T) buf, (PTR_T) pathp, len);
+ }
+
+ if (pathbuf != path)
+ free (pathbuf);
+
+ return (buf);
+
+ lose:
+ if ((dotlist != dots) && dotlist)
+ {
+ int e = errno;
+ free ((PTR_T) dotlist);
+ errno = e;
+ }
+
+ lose2:
+ if ((pathbuf != path) && pathbuf)
+ {
+ int e = errno;
+ free ((PTR_T) pathbuf);
+ errno = e;
+ }
+ return ((char *)NULL);
+}
+
+#if defined (TEST)
+# include <stdio.h>
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ char b[PATH_MAX];
+
+ if (getcwd(b, sizeof(b)))
+ {
+ printf ("%s\n", b);
+ exit (0);
+ }
+ else
+ {
+ perror ("cwd: getcwd");
+ exit (1);
+ }
+}
+#endif /* TEST */
+#endif /* !HAVE_GETCWD */
diff --git a/lib/sh/getenv.c b/lib/sh/getenv.c
new file mode 100644
index 0000000..8b5e340
--- /dev/null
+++ b/lib/sh/getenv.c
@@ -0,0 +1,233 @@
+/* getenv.c - get environment variable value from the shell's variable
+ list. */
+
+/* Copyright (C) 1997-2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (CAN_REDEFINE_GETENV)
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <bashansi.h>
+#include <errno.h>
+#include <shell.h>
+
+#ifndef errno
+extern int errno;
+#endif
+
+extern char **environ;
+
+/* We supply our own version of getenv () because we want library
+ routines to get the changed values of exported variables. */
+
+/* The NeXT C library has getenv () defined and used in the same file.
+ This screws our scheme. However, Bash will run on the NeXT using
+ the C library getenv (), since right now the only environment variable
+ that we care about is HOME, and that is already defined. */
+static char *last_tempenv_value = (char *)NULL;
+
+char *
+getenv (name)
+ const char *name;
+{
+ SHELL_VAR *var;
+
+ if (name == 0 || *name == '\0')
+ return ((char *)NULL);
+
+ var = find_tempenv_variable ((char *)name);
+ if (var)
+ {
+ FREE (last_tempenv_value);
+
+ last_tempenv_value = value_cell (var) ? savestring (value_cell (var)) : (char *)NULL;
+ return (last_tempenv_value);
+ }
+ else if (shell_variables)
+ {
+ var = find_variable ((char *)name);
+ if (var && exported_p (var))
+ return (value_cell (var));
+ }
+ else
+ {
+ register int i, len;
+
+ /* In some cases, s5r3 invokes getenv() before main(); BSD systems
+ using gprof also exhibit this behavior. This means that
+ shell_variables will be 0 when this is invoked. We look up the
+ variable in the real environment in that case. */
+
+ for (i = 0, len = strlen (name); environ[i]; i++)
+ {
+ if ((STREQN (environ[i], name, len)) && (environ[i][len] == '='))
+ return (environ[i] + len + 1);
+ }
+ }
+
+ return ((char *)NULL);
+}
+
+/* Some versions of Unix use _getenv instead. */
+char *
+_getenv (name)
+ const char *name;
+{
+ return (getenv (name));
+}
+
+/* SUSv3 says argument is a `char *'; BSD implementations disagree */
+int
+putenv (str)
+#ifndef HAVE_STD_PUTENV
+ const char *str;
+#else
+ char *str;
+#endif
+{
+ SHELL_VAR *var;
+ char *name, *value;
+ int offset;
+
+ if (str == 0 || *str == '\0')
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ offset = assignment (str, 0);
+ if (str[offset] != '=')
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ name = savestring (str);
+ name[offset] = 0;
+
+ value = name + offset + 1;
+
+ /* XXX - should we worry about readonly here? */
+ var = bind_variable (name, value, 0);
+ if (var == 0)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ VUNSETATTR (var, att_invisible);
+ VSETATTR (var, att_exported);
+
+ return 0;
+}
+
+#if 0
+int
+_putenv (name)
+#ifndef HAVE_STD_PUTENV
+ const char *name;
+#else
+ char *name;
+#endif
+{
+ return putenv (name);
+}
+#endif
+
+int
+setenv (name, value, rewrite)
+ const char *name;
+ const char *value;
+ int rewrite;
+{
+ SHELL_VAR *var;
+ char *v;
+
+ if (name == 0 || *name == '\0' || strchr (name, '=') != 0)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ var = 0;
+ v = (char *)value; /* some compilers need explicit cast */
+ /* XXX - should we worry about readonly here? */
+ if (rewrite == 0)
+ var = find_variable (name);
+
+ if (var == 0)
+ var = bind_variable (name, v, 0);
+
+ if (var == 0)
+ return -1;
+
+ VUNSETATTR (var, att_invisible);
+ VSETATTR (var, att_exported);
+
+ return 0;
+}
+
+#if 0
+int
+_setenv (name, value, rewrite)
+ const char *name;
+ const char *value;
+ int rewrite;
+{
+ return setenv (name, value, rewrite);
+}
+#endif
+
+/* SUSv3 says unsetenv returns int; existing implementations (BSD) disagree. */
+
+#ifdef HAVE_STD_UNSETENV
+#define UNSETENV_RETURN(N) return(N)
+#define UNSETENV_RETTYPE int
+#else
+#define UNSETENV_RETURN(N) return
+#define UNSETENV_RETTYPE void
+#endif
+
+UNSETENV_RETTYPE
+unsetenv (name)
+ const char *name;
+{
+ if (name == 0 || *name == '\0' || strchr (name, '=') != 0)
+ {
+ errno = EINVAL;
+ UNSETENV_RETURN(-1);
+ }
+
+ /* XXX - should we just remove the export attribute here? */
+#if 1
+ unbind_variable (name);
+#else
+ SHELL_VAR *v;
+
+ v = find_variable (name);
+ if (v)
+ VUNSETATTR (v, att_exported);
+#endif
+
+ UNSETENV_RETURN(0);
+}
+#endif /* CAN_REDEFINE_GETENV */
diff --git a/lib/sh/inet_aton.c b/lib/sh/inet_aton.c
new file mode 100644
index 0000000..4b48456
--- /dev/null
+++ b/lib/sh/inet_aton.c
@@ -0,0 +1,212 @@
+/* inet_aton - convert string to numeric IP address */
+
+/* Snagged from GNU C library, version 2.0.3. */
+
+/*
+ * ++Copyright++ 1983, 1990, 1993
+ * -
+ * Copyright (c) 1983, 1990, 1993
+ * The Regents of the University of California. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. All advertising materials mentioning features or use of this software
+ * must display the following acknowledgement:
+ * This product includes software developed by the University of
+ * California, Berkeley and its contributors.
+ * 4. Neither the name of the University nor the names of its contributors
+ * may be used to endorse or promote products derived from this software
+ * without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * -
+ * Portions Copyright (c) 1993 by Digital Equipment Corporation.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies, and that
+ * the name of Digital Equipment Corporation not be used in advertising or
+ * publicity pertaining to distribution of the document or software without
+ * specific, written prior permission.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
+ * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL DIGITAL EQUIPMENT
+ * CORPORATION BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ * -
+ * --Copyright--
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93";
+static char rcsid[] = "$Id: inet_addr.c,v 1.5 1996/08/14 03:48:37 drepper Exp $";
+#endif /* LIBC_SCCS and not lint */
+
+#include <config.h>
+
+#if !defined (HAVE_INET_ATON) && defined (HAVE_NETWORK) && defined (HAVE_NETINET_IN_H) && defined (HAVE_ARPA_INET_H)
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include <bashansi.h>
+#include <ctype.h>
+#include <stdc.h>
+
+#ifndef INADDR_NONE
+# define INADDR_NONE 0xffffffff
+#endif
+
+/* these are compatibility routines, not needed on recent BSD releases */
+
+#if 0
+/* Not used, not needed. */
+/*
+ * Ascii internet address interpretation routine.
+ * The value returned is in network order.
+ */
+u_long
+inet_addr(cp)
+ register const char *cp;
+{
+ struct in_addr val;
+
+ if (inet_aton(cp, &val))
+ return (val.s_addr);
+ return (INADDR_NONE);
+}
+#endif
+
+/*
+ * Check whether "cp" is a valid ascii representation
+ * of an Internet address and convert to a binary address.
+ * Returns 1 if the address is valid, 0 if not.
+ * This replaces inet_addr, the return value from which
+ * cannot distinguish between failure and a local broadcast address.
+ */
+int
+inet_aton(cp, addr)
+ register const char *cp;
+ struct in_addr *addr;
+{
+ register u_bits32_t val;
+ register int base, n;
+ register unsigned char c;
+ u_int parts[4];
+ register u_int *pp = parts;
+
+ c = *cp;
+ for (;;) {
+ /*
+ * Collect number up to ``.''.
+ * Values are specified as for C:
+ * 0x=hex, 0=octal, isdigit=decimal.
+ */
+#if 0
+ if (!isdigit(c))
+#else
+ if (c != '0' && c != '1' && c != '2' && c != '3' && c != '4' &&
+ c != '5' && c != '6' && c != '7' && c != '8' && c != '9')
+#endif
+ return (0);
+ val = 0; base = 10;
+ if (c == '0') {
+ c = *++cp;
+ if (c == 'x' || c == 'X')
+ base = 16, c = *++cp;
+ else
+ base = 8;
+ }
+ for (;;) {
+ if (isascii(c) && isdigit(c)) {
+ val = (val * base) + (c - '0');
+ c = *++cp;
+ } else if (base == 16 && isascii(c) && isxdigit(c)) {
+ val = (val << 4) |
+ (c + 10 - (islower(c) ? 'a' : 'A'));
+ c = *++cp;
+ } else
+ break;
+ }
+ if (c == '.') {
+ /*
+ * Internet format:
+ * a.b.c.d
+ * a.b.c (with c treated as 16 bits)
+ * a.b (with b treated as 24 bits)
+ */
+ if (pp >= parts + 3)
+ return (0);
+ *pp++ = val;
+ c = *++cp;
+ } else
+ break;
+ }
+ /*
+ * Check for trailing characters.
+ */
+ if (c != '\0' && (!isascii(c) || !isspace(c)))
+ return (0);
+ /*
+ * Concoct the address according to
+ * the number of parts specified.
+ */
+ n = pp - parts + 1;
+ switch (n) {
+
+ case 0:
+ return (0); /* initial nondigit */
+
+ case 1: /* a -- 32 bits */
+ break;
+
+ case 2: /* a.b -- 8.24 bits */
+ if (val > 0xffffff)
+ return (0);
+ val |= parts[0] << 24;
+ break;
+
+ case 3: /* a.b.c -- 8.8.16 bits */
+ if (val > 0xffff)
+ return (0);
+ val |= (parts[0] << 24) | (parts[1] << 16);
+ break;
+
+ case 4: /* a.b.c.d -- 8.8.8.8 bits */
+ if (val > 0xff)
+ return (0);
+ val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8);
+ break;
+ }
+ if (addr)
+ addr->s_addr = htonl(val);
+ return (1);
+}
+
+#endif /* !HAVE_INET_ATON */
diff --git a/lib/sh/input_avail.c b/lib/sh/input_avail.c
new file mode 100644
index 0000000..ac157a9
--- /dev/null
+++ b/lib/sh/input_avail.c
@@ -0,0 +1,98 @@
+/* input_avail.c -- check whether or not data is available for reading on a
+ specified file descriptor. */
+
+/* Copyright (C) 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined (__TANDEM)
+# include <floss.h>
+#endif
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <fcntl.h>
+#if defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif /* HAVE_SYS_FILE_H */
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#include "bashansi.h"
+
+#include "posixselect.h"
+
+#if defined (FIONREAD_IN_SYS_IOCTL)
+# include <sys/ioctl.h>
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+#if !defined (O_NDELAY) && defined (O_NONBLOCK)
+# define O_NDELAY O_NONBLOCK /* Posix style */
+#endif
+
+/* Return >= 1 if select/FIONREAD indicates data available for reading on
+ file descriptor FD; 0 if no data available. Return -1 on error. */
+int
+input_avail (fd)
+ int fd;
+{
+ int result, chars_avail;
+#if defined(HAVE_SELECT)
+ fd_set readfds, exceptfds;
+ struct timeval timeout;
+#endif
+
+ if (fd < 0)
+ return -1;
+
+ chars_avail = 0;
+
+#if defined (HAVE_SELECT)
+ FD_ZERO (&readfds);
+ FD_ZERO (&exceptfds);
+ FD_SET (fd, &readfds);
+ FD_SET (fd, &exceptfds);
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 0;
+ result = select (fd + 1, &readfds, (fd_set *)NULL, &exceptfds, &timeout);
+ return ((result <= 0) ? 0 : 1);
+
+#endif
+
+ result = -1;
+#if defined (FIONREAD)
+ errno = 0;
+ result = ioctl (fd, FIONREAD, &chars_avail);
+ if (result == -1 && errno == EIO)
+ return -1;
+ return (chars_avail);
+#endif
+
+ return 0;
+}
diff --git a/lib/sh/itos.c b/lib/sh/itos.c
new file mode 100644
index 0000000..12e9398
--- /dev/null
+++ b/lib/sh/itos.c
@@ -0,0 +1,72 @@
+/* itos.c -- Convert integer to string. */
+
+/* Copyright (C) 1998-2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <bashansi.h>
+#include "shell.h"
+
+char *
+inttostr (i, buf, len)
+ intmax_t i;
+ char *buf;
+ size_t len;
+{
+ return (fmtumax (i, 10, buf, len, 0));
+}
+
+/* Integer to string conversion. This conses the string; the
+ caller should free it. */
+char *
+itos (i)
+ intmax_t i;
+{
+ char *p, lbuf[INT_STRLEN_BOUND(intmax_t) + 1];
+
+ p = fmtumax (i, 10, lbuf, sizeof(lbuf), 0);
+ return (savestring (p));
+}
+
+char *
+uinttostr (i, buf, len)
+ uintmax_t i;
+ char *buf;
+ size_t len;
+{
+ return (fmtumax (i, 10, buf, len, FL_UNSIGNED));
+}
+
+/* Integer to string conversion. This conses the string; the
+ caller should free it. */
+char *
+uitos (i)
+ uintmax_t i;
+{
+ char *p, lbuf[INT_STRLEN_BOUND(uintmax_t) + 1];
+
+ p = fmtumax (i, 10, lbuf, sizeof(lbuf), FL_UNSIGNED);
+ return (savestring (p));
+}
diff --git a/lib/sh/mailstat.c b/lib/sh/mailstat.c
new file mode 100644
index 0000000..2b2ac0e
--- /dev/null
+++ b/lib/sh/mailstat.c
@@ -0,0 +1,159 @@
+/* mailstat.c -- stat a mailbox file, handling maildir-type mail directories */
+
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <stdio.h>
+#include <errno.h>
+
+#include <bashtypes.h>
+#include <posixstat.h>
+#include <posixdir.h>
+#include <bashansi.h>
+
+#ifndef _MINIX
+# include <sys/param.h>
+#endif
+
+#include <maxpath.h>
+
+/*
+ * Stat a file. If it's a maildir, check all messages
+ * in the maildir and present the grand total as a file.
+ * The fields in the 'struct stat' are from the mail directory.
+ * The following fields are emulated:
+ *
+ * st_nlink always 1, unless st_blocks is not present, in which case it's
+ * the total number of messages
+ * st_size total number of bytes in all files
+ * st_blocks total number of messages, if present in struct stat
+ * st_atime access time of newest file in maildir
+ * st_mtime modify time of newest file in maildir
+ * st_mode S_IFDIR changed to S_IFREG
+ *
+ * This is good enough for most mail-checking applications.
+ */
+
+int
+mailstat(path, st)
+ const char *path;
+ struct stat *st;
+{
+ static struct stat st_new_last, st_ret_last;
+ struct stat st_ret, st_tmp;
+ DIR *dd;
+ struct dirent *fn;
+ char dir[PATH_MAX * 2], file[PATH_MAX * 2];
+ int i, l;
+ time_t atime, mtime;
+
+ atime = mtime = 0;
+
+ /* First see if it's a directory. */
+ if ((i = stat(path, st)) != 0 || S_ISDIR(st->st_mode) == 0)
+ return i;
+
+ if (strlen(path) > sizeof(dir) - 5)
+ {
+#ifdef ENAMETOOLONG
+ errno = ENAMETOOLONG;
+#else
+ errno = EINVAL;
+#endif
+ return -1;
+ }
+
+ st_ret = *st;
+ st_ret.st_nlink = 1;
+ st_ret.st_size = 0;
+#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
+ st_ret.st_blocks = 0;
+#else
+ st_ret.st_nlink = 0;
+#endif
+ st_ret.st_mode &= ~S_IFDIR;
+ st_ret.st_mode |= S_IFREG;
+
+ /* See if cur/ is present */
+ sprintf(dir, "%s/cur", path);
+ if (stat(dir, &st_tmp) || S_ISDIR(st_tmp.st_mode) == 0)
+ return 0;
+ st_ret.st_atime = st_tmp.st_atime;
+
+ /* See if tmp/ is present */
+ sprintf(dir, "%s/tmp", path);
+ if (stat(dir, &st_tmp) || S_ISDIR(st_tmp.st_mode) == 0)
+ return 0;
+ st_ret.st_mtime = st_tmp.st_mtime;
+
+ /* And new/ */
+ sprintf(dir, "%s/new", path);
+ if (stat(dir, &st_tmp) || S_ISDIR(st_tmp.st_mode) == 0)
+ return 0;
+ st_ret.st_mtime = st_tmp.st_mtime;
+
+ /* Optimization - if new/ didn't change, nothing else did. */
+ if (st_tmp.st_dev == st_new_last.st_dev &&
+ st_tmp.st_ino == st_new_last.st_ino &&
+ st_tmp.st_atime == st_new_last.st_atime &&
+ st_tmp.st_mtime == st_new_last.st_mtime)
+ {
+ *st = st_ret_last;
+ return 0;
+ }
+ st_new_last = st_tmp;
+
+ /* Loop over new/ and cur/ */
+ for (i = 0; i < 2; i++)
+ {
+ sprintf(dir, "%s/%s", path, i ? "cur" : "new");
+ sprintf(file, "%s/", dir);
+ l = strlen(file);
+ if ((dd = opendir(dir)) == NULL)
+ return 0;
+ while ((fn = readdir(dd)) != NULL)
+ {
+ if (fn->d_name[0] == '.' || strlen(fn->d_name) + l >= sizeof(file))
+ continue;
+ strcpy(file + l, fn->d_name);
+ if (stat(file, &st_tmp) != 0)
+ continue;
+ st_ret.st_size += st_tmp.st_size;
+#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
+ st_ret.st_blocks++;
+#else
+ st_ret.st_nlink++;
+#endif
+ if (st_tmp.st_atime != st_tmp.st_mtime && st_tmp.st_atime > atime)
+ atime = st_tmp.st_atime;
+ if (st_tmp.st_mtime > mtime)
+ mtime = st_tmp.st_mtime;
+ }
+ closedir(dd);
+ }
+
+/* if (atime) */ /* Set atime even if cur/ is empty */
+ st_ret.st_atime = atime;
+ if (mtime)
+ st_ret.st_mtime = mtime;
+
+ *st = st_ret_last = st_ret;
+ return 0;
+}
diff --git a/lib/sh/makepath.c b/lib/sh/makepath.c
new file mode 100644
index 0000000..43dbab2
--- /dev/null
+++ b/lib/sh/makepath.c
@@ -0,0 +1,128 @@
+/* makepath.c - glue PATH and DIR together into a full pathname. */
+
+/* Copyright (C) 1987, 1989, 1991 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <bashansi.h>
+#include "shell.h"
+
+#include <tilde/tilde.h>
+
+#ifndef NULL
+# define NULL 0
+#endif
+
+/* MAKE SURE THESE AGREE WITH ../../externs.h. */
+
+#ifndef MP_DOTILDE
+# define MP_DOTILDE 0x01
+# define MP_DOCWD 0x02
+# define MP_RMDOT 0x04
+# define MP_IGNDOT 0x08
+#endif
+
+extern char *get_working_directory __P((char *));
+
+static char *nullpath = "";
+
+/* Take PATH, an element from, e.g., $CDPATH, and DIR, a directory name,
+ and paste them together into PATH/DIR. Tilde expansion is performed on
+ PATH if (flags & MP_DOTILDE) is non-zero. If PATH is NULL or the empty
+ string, it is converted to the current directory. A full pathname is
+ used if (flags & MP_DOCWD) is non-zero, otherwise `./' is used. If
+ (flags & MP_RMDOT) is non-zero, any `./' is removed from the beginning
+ of DIR. If (flags & MP_IGNDOT) is non-zero, a PATH that is "." or "./"
+ is ignored. */
+
+#define MAKEDOT() \
+ do { \
+ xpath = (char *)xmalloc (2); \
+ xpath[0] = '.'; \
+ xpath[1] = '\0'; \
+ pathlen = 1; \
+ } while (0)
+
+char *
+sh_makepath (path, dir, flags)
+ const char *path, *dir;
+ int flags;
+{
+ int dirlen, pathlen;
+ char *ret, *xpath, *xdir, *r, *s;
+
+ if (path == 0 || *path == '\0')
+ {
+ if (flags & MP_DOCWD)
+ {
+ xpath = get_working_directory ("sh_makepath");
+ if (xpath == 0)
+ {
+ ret = get_string_value ("PWD");
+ if (ret)
+ xpath = savestring (ret);
+ }
+ if (xpath == 0)
+ MAKEDOT();
+ else
+ pathlen = strlen (xpath);
+ }
+ else
+ MAKEDOT();
+ }
+ else if ((flags & MP_IGNDOT) && path[0] == '.' && (path[1] == '\0' ||
+ path[1] == '/' && path[2] == '\0'))
+ {
+ xpath = nullpath;
+ pathlen = 0;
+ }
+ else
+ {
+ xpath = ((flags & MP_DOTILDE) && *path == '~') ? bash_tilde_expand (path, 0) : (char *)path;
+ pathlen = strlen (xpath);
+ }
+
+ xdir = (char *)dir;
+ dirlen = strlen (xdir);
+ if ((flags & MP_RMDOT) && dir[0] == '.' && dir[1] == '/')
+ {
+ xdir += 2;
+ dirlen -= 2;
+ }
+
+ r = ret = (char *)xmalloc (2 + dirlen + pathlen);
+ s = xpath;
+ while (*s)
+ *r++ = *s++;
+ if (s > xpath && s[-1] != '/')
+ *r++ = '/';
+ s = xdir;
+ while (*r++ = *s++)
+ ;
+ if (xpath != path && xpath != nullpath)
+ free (xpath);
+ return (ret);
+}
diff --git a/lib/sh/mbscasecmp.c b/lib/sh/mbscasecmp.c
new file mode 100644
index 0000000..3828164
--- /dev/null
+++ b/lib/sh/mbscasecmp.c
@@ -0,0 +1,78 @@
+/* mbscasecmp - case-insensitive multibyte string comparison. */
+
+/* Copyright (C) 2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if !defined (HAVE_MBSCASECMP) && defined (HANDLE_MULTIBYTE)
+
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+
+#include <wchar.h>
+#include <wctype.h>
+
+/* Compare MBS1 and MBS2 without regard to case. */
+int
+mbscasecmp (mbs1, mbs2)
+ const char *mbs1;
+ const char *mbs2;
+{
+ int len1, len2;
+ wchar_t c1, c2, l1, l2;
+
+ len1 = len2 = 0;
+ /* Reset multibyte characters to their initial state. */
+ (void) mblen ((char *) NULL, 0);
+
+ do
+ {
+ len1 = mbtowc (&c1, mbs1, MB_CUR_MAX);
+ len2 = mbtowc (&c2, mbs2, MB_CUR_MAX);
+
+ if (len1 == 0)
+ return len2 == 0 ? 0 : -1;
+ else if (len2 == 0)
+ return 1;
+ else if (len1 > 0 && len2 < 0)
+ return -1;
+ else if (len1 < 0 && len2 > 0)
+ return 1;
+ else if (len1 < 0 && len2 < 0)
+ {
+ len1 = strlen (mbs1);
+ len2 = strlen (mbs2);
+ return (len1 == len2 ? memcmp (mbs1, mbs2, len1)
+ : ((len1 < len2) ? (memcmp (mbs1, mbs2, len1) > 0 ? 1 : -1)
+ : (memcmp (mbs1, mbs2, len2) >= 0 ? 1 : -1)));
+ }
+
+ l1 = towlower (c1);
+ l2 = towlower (c2);
+
+ mbs1 += len1;
+ mbs2 += len2;
+ }
+ while (l1 == l2);
+
+ return l1 - l2;
+}
+
+#endif
diff --git a/lib/sh/mbschr.c b/lib/sh/mbschr.c
new file mode 100644
index 0000000..5143d64
--- /dev/null
+++ b/lib/sh/mbschr.c
@@ -0,0 +1,78 @@
+/* mbschr.c - strchr(3) that handles multibyte characters. */
+
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#include "bashansi.h"
+#include "shmbutil.h"
+
+#undef mbschr
+
+/* In some locales, the non-first byte of some multibyte characters have
+ the same value as some ascii character. Faced with these strings, a
+ legacy strchr() might return the wrong value. */
+
+char *
+#if defined (PROTOTYPES)
+mbschr (const char *s, int c)
+#else
+mbschr (s, c)
+ const char *s;
+ int c;
+#endif
+{
+#if HANDLE_MULTIBYTE
+ char *pos;
+ mbstate_t state;
+ size_t strlength, mblength;
+
+ /* The locale encodings with said weird property are BIG5, BIG5-HKSCS,
+ GBK, GB18030, SHIFT_JIS, and JOHAB. They exhibit the problem only
+ when c >= 0x30. We can therefore use the faster bytewise search if
+ c <= 0x30. */
+ if ((unsigned char)c >= '0' && MB_CUR_MAX > 1)
+ {
+ pos = (char *)s;
+ memset (&state, '\0', sizeof(mbstate_t));
+ strlength = strlen (s);
+
+ while (strlength > 0)
+ {
+ mblength = mbrlen (pos, strlength, &state);
+ if (mblength == (size_t)-2 || mblength == (size_t)-1 || mblength == (size_t)0)
+ mblength = 1;
+
+ if (mblength == 1 && c == (unsigned char)*pos)
+ return pos;
+
+ strlength -= mblength;
+ pos += mblength;
+ }
+
+ return ((char *)NULL);
+ }
+ else
+#endif
+ return (strchr (s, c));
+}
diff --git a/lib/sh/mbscmp.c b/lib/sh/mbscmp.c
new file mode 100644
index 0000000..e0eae5d
--- /dev/null
+++ b/lib/sh/mbscmp.c
@@ -0,0 +1,72 @@
+/* mbscmp - multibyte string comparison. */
+
+/* Copyright (C) 1995 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if !defined (HAVE_MBSCMP) && defined (HANDLE_MULTIBYTE)
+
+#include <stdlib.h>
+#include <stddef.h>
+#include <string.h>
+
+/* Compare MBS1 and MBS2. */
+int
+mbscmp (mbs1, mbs2)
+ const char *mbs1;
+ const char *mbs2;
+{
+ int len1, len2;
+ wchar_t c1, c2;
+
+ len1 = len2 = 0;
+ /* Reset multibyte characters to their initial state. */
+ (void) mblen ((char *) NULL, 0);
+
+ do
+ {
+ len1 = mbtowc (&c1, mbs1, MB_CUR_MAX);
+ len2 = mbtowc (&c2, mbs2, MB_CUR_MAX);
+
+ if (len1 == 0)
+ return len2 == 0 ? 0 : -1;
+ else if (len2 == 0)
+ return 1;
+ else if (len1 > 0 && len2 < 0)
+ return -1;
+ else if (len1 < 0 && len2 > 0)
+ return 1;
+ else if (len1 < 0 && len2 < 0)
+ {
+ len1 = strlen (mbs1);
+ len2 = strlen (mbs2);
+ return (len1 == len2 ? memcmp (mbs1, mbs2, len1)
+ : ((len1 < len2) ? (memcmp (mbs1, mbs2, len1) > 0 ? 1 : -1)
+ : (memcmp (mbs1, mbs2, len2) >= 0 ? 1 : -1)));
+ }
+
+ mbs1 += len1;
+ mbs2 += len2;
+ }
+ while (c1 == c2);
+
+ return c1 - c2;
+}
+
+#endif
diff --git a/lib/sh/memset.c b/lib/sh/memset.c
new file mode 100644
index 0000000..4ebc418
--- /dev/null
+++ b/lib/sh/memset.c
@@ -0,0 +1,29 @@
+/* memset.c -- set an area of memory to a given value */
+
+/* Copyright (C) 1991-2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+char *
+memset (char *str, int c, unsigned int len)
+{
+ register char *st = str;
+
+ while (len-- > 0)
+ *st++ = c;
+ return str;
+}
diff --git a/lib/sh/mktime.c b/lib/sh/mktime.c
new file mode 100644
index 0000000..7257400
--- /dev/null
+++ b/lib/sh/mktime.c
@@ -0,0 +1,425 @@
+/* mktime - convert struct tm to a time_t value */
+
+/* Copyright (C) 1993-2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+ Contributed by Paul Eggert (eggert@twinsun.com).
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+/* Define this to have a standalone program to test this implementation of
+ mktime. */
+/* #define DEBUG 1 */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#ifdef _LIBC
+# define HAVE_LIMITS_H 1
+# define HAVE_LOCALTIME_R 1
+# define STDC_HEADERS 1
+#endif
+
+/* Assume that leap seconds are possible, unless told otherwise.
+ If the host has a `zic' command with a `-L leapsecondfilename' option,
+ then it supports leap seconds; otherwise it probably doesn't. */
+#ifndef LEAP_SECONDS_POSSIBLE
+#define LEAP_SECONDS_POSSIBLE 1
+#endif
+
+#ifndef VMS
+#include <sys/types.h> /* Some systems define `time_t' here. */
+#else
+#include <stddef.h>
+#endif
+#include <time.h>
+
+#if HAVE_LIMITS_H
+#include <limits.h>
+#endif
+
+#include "bashansi.h"
+
+#if DEBUG
+#include <stdio.h>
+/* Make it work even if the system's libc has its own mktime routine. */
+#define mktime my_mktime
+#endif /* DEBUG */
+
+#ifndef __P
+#if defined (__GNUC__) || (defined (__STDC__) && __STDC__)
+#define __P(args) args
+#else
+#define __P(args) ()
+#endif /* GCC. */
+#endif /* Not __P. */
+
+#ifndef CHAR_BIT
+#define CHAR_BIT 8
+#endif
+
+#ifndef INT_MIN
+#define INT_MIN (~0 << (sizeof (int) * CHAR_BIT - 1))
+#endif
+#ifndef INT_MAX
+#define INT_MAX (~0 - INT_MIN)
+#endif
+
+#ifndef TIME_T_MIN
+#define TIME_T_MIN (0 < (time_t) -1 ? (time_t) 0 \
+ : ~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1))
+#endif
+#ifndef TIME_T_MAX
+#define TIME_T_MAX (~ (time_t) 0 - TIME_T_MIN)
+#endif
+
+#define TM_YEAR_BASE 1900
+#define EPOCH_YEAR 1970
+
+#ifndef __isleap
+/* Nonzero if YEAR is a leap year (every 4 years,
+ except every 100th isn't, and every 400th is). */
+#define __isleap(year) \
+ ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 400 == 0))
+#endif
+
+/* How many days come before each month (0-12). */
+const unsigned short int __mon_yday[2][13] =
+ {
+ /* Normal years. */
+ { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 },
+ /* Leap years. */
+ { 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 }
+ };
+
+static time_t ydhms_tm_diff __P ((int, int, int, int, int, const struct tm *));
+time_t __mktime_internal __P ((struct tm *,
+ struct tm *(*) (const time_t *, struct tm *),
+ time_t *));
+
+
+static struct tm *my_localtime_r __P ((const time_t *, struct tm *));
+static struct tm *
+my_localtime_r (t, tp)
+ const time_t *t;
+ struct tm *tp;
+{
+ struct tm *l = localtime (t);
+ if (! l)
+ return 0;
+ *tp = *l;
+ return tp;
+}
+
+
+/* Yield the difference between (YEAR-YDAY HOUR:MIN:SEC) and (*TP),
+ measured in seconds, ignoring leap seconds.
+ YEAR uses the same numbering as TM->tm_year.
+ All values are in range, except possibly YEAR.
+ If overflow occurs, yield the low order bits of the correct answer. */
+static time_t
+ydhms_tm_diff (year, yday, hour, min, sec, tp)
+ int year, yday, hour, min, sec;
+ const struct tm *tp;
+{
+ /* Compute intervening leap days correctly even if year is negative.
+ Take care to avoid int overflow. time_t overflow is OK, since
+ only the low order bits of the correct time_t answer are needed.
+ Don't convert to time_t until after all divisions are done, since
+ time_t might be unsigned. */
+ int a4 = (year >> 2) + (TM_YEAR_BASE >> 2) - ! (year & 3);
+ int b4 = (tp->tm_year >> 2) + (TM_YEAR_BASE >> 2) - ! (tp->tm_year & 3);
+ int a100 = a4 / 25 - (a4 % 25 < 0);
+ int b100 = b4 / 25 - (b4 % 25 < 0);
+ int a400 = a100 >> 2;
+ int b400 = b100 >> 2;
+ int intervening_leap_days = (a4 - b4) - (a100 - b100) + (a400 - b400);
+ time_t years = year - (time_t) tp->tm_year;
+ time_t days = (365 * years + intervening_leap_days
+ + (yday - tp->tm_yday));
+ return (60 * (60 * (24 * days + (hour - tp->tm_hour))
+ + (min - tp->tm_min))
+ + (sec - tp->tm_sec));
+}
+
+
+static time_t localtime_offset;
+
+/* Convert *TP to a time_t value. */
+time_t
+mktime (tp)
+ struct tm *tp;
+{
+#ifdef _LIBC
+ /* POSIX.1 8.1.1 requires that whenever mktime() is called, the
+ time zone names contained in the external variable `tzname' shall
+ be set as if the tzset() function had been called. */
+ __tzset ();
+#endif
+
+ return __mktime_internal (tp, my_localtime_r, &localtime_offset);
+}
+
+/* Convert *TP to a time_t value, inverting
+ the monotonic and mostly-unit-linear conversion function CONVERT.
+ Use *OFFSET to keep track of a guess at the offset of the result,
+ compared to what the result would be for UTC without leap seconds.
+ If *OFFSET's guess is correct, only one CONVERT call is needed. */
+time_t
+__mktime_internal (tp, convert, offset)
+ struct tm *tp;
+ struct tm *(*convert) __P ((const time_t *, struct tm *));
+ time_t *offset;
+{
+ time_t t, dt, t0;
+ struct tm tm;
+
+ /* The maximum number of probes (calls to CONVERT) should be enough
+ to handle any combinations of time zone rule changes, solar time,
+ and leap seconds. Posix.1 prohibits leap seconds, but some hosts
+ have them anyway. */
+ int remaining_probes = 4;
+
+ /* Time requested. Copy it in case CONVERT modifies *TP; this can
+ occur if TP is localtime's returned value and CONVERT is localtime. */
+ int sec = tp->tm_sec;
+ int min = tp->tm_min;
+ int hour = tp->tm_hour;
+ int mday = tp->tm_mday;
+ int mon = tp->tm_mon;
+ int year_requested = tp->tm_year;
+ int isdst = tp->tm_isdst;
+
+ /* Ensure that mon is in range, and set year accordingly. */
+ int mon_remainder = mon % 12;
+ int negative_mon_remainder = mon_remainder < 0;
+ int mon_years = mon / 12 - negative_mon_remainder;
+ int year = year_requested + mon_years;
+
+ /* The other values need not be in range:
+ the remaining code handles minor overflows correctly,
+ assuming int and time_t arithmetic wraps around.
+ Major overflows are caught at the end. */
+
+ /* Calculate day of year from year, month, and day of month.
+ The result need not be in range. */
+ int yday = ((__mon_yday[__isleap (year + TM_YEAR_BASE)]
+ [mon_remainder + 12 * negative_mon_remainder])
+ + mday - 1);
+
+#if LEAP_SECONDS_POSSIBLE
+ /* Handle out-of-range seconds specially,
+ since ydhms_tm_diff assumes every minute has 60 seconds. */
+ int sec_requested = sec;
+ if (sec < 0)
+ sec = 0;
+ if (59 < sec)
+ sec = 59;
+#endif
+
+ /* Invert CONVERT by probing. First assume the same offset as last time.
+ Then repeatedly use the error to improve the guess. */
+
+ tm.tm_year = EPOCH_YEAR - TM_YEAR_BASE;
+ tm.tm_yday = tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
+ t0 = ydhms_tm_diff (year, yday, hour, min, sec, &tm);
+
+ for (t = t0 + *offset;
+ (dt = ydhms_tm_diff (year, yday, hour, min, sec, (*convert) (&t, &tm)));
+ t += dt)
+ if (--remaining_probes == 0)
+ return -1;
+
+ /* Check whether tm.tm_isdst has the requested value, if any. */
+ if (0 <= isdst && 0 <= tm.tm_isdst)
+ {
+ int dst_diff = (isdst != 0) - (tm.tm_isdst != 0);
+ if (dst_diff)
+ {
+ /* Move two hours in the direction indicated by the disagreement,
+ probe some more, and switch to a new time if found.
+ The largest known fallback due to daylight savings is two hours:
+ once, in Newfoundland, 1988-10-30 02:00 -> 00:00. */
+ time_t ot = t - 2 * 60 * 60 * dst_diff;
+ while (--remaining_probes != 0)
+ {
+ struct tm otm;
+ if (! (dt = ydhms_tm_diff (year, yday, hour, min, sec,
+ (*convert) (&ot, &otm))))
+ {
+ t = ot;
+ tm = otm;
+ break;
+ }
+ if ((ot += dt) == t)
+ break; /* Avoid a redundant probe. */
+ }
+ }
+ }
+
+ *offset = t - t0;
+
+#if LEAP_SECONDS_POSSIBLE
+ if (sec_requested != tm.tm_sec)
+ {
+ /* Adjust time to reflect the tm_sec requested, not the normalized value.
+ Also, repair any damage from a false match due to a leap second. */
+ t += sec_requested - sec + (sec == 0 && tm.tm_sec == 60);
+ (*convert) (&t, &tm);
+ }
+#endif
+
+ if (TIME_T_MAX / INT_MAX / 366 / 24 / 60 / 60 < 3)
+ {
+ /* time_t isn't large enough to rule out overflows in ydhms_tm_diff,
+ so check for major overflows. A gross check suffices,
+ since if t has overflowed, it is off by a multiple of
+ TIME_T_MAX - TIME_T_MIN + 1. So ignore any component of
+ the difference that is bounded by a small value. */
+
+ double dyear = (double) year_requested + mon_years - tm.tm_year;
+ double dday = 366 * dyear + mday;
+ double dsec = 60 * (60 * (24 * dday + hour) + min) + sec_requested;
+
+ if (TIME_T_MAX / 3 - TIME_T_MIN / 3 < (dsec < 0 ? - dsec : dsec))
+ return -1;
+ }
+
+ *tp = tm;
+ return t;
+}
+
+#ifdef weak_alias
+weak_alias (mktime, timelocal)
+#endif
+
+#if DEBUG
+
+static int
+not_equal_tm (a, b)
+ struct tm *a;
+ struct tm *b;
+{
+ return ((a->tm_sec ^ b->tm_sec)
+ | (a->tm_min ^ b->tm_min)
+ | (a->tm_hour ^ b->tm_hour)
+ | (a->tm_mday ^ b->tm_mday)
+ | (a->tm_mon ^ b->tm_mon)
+ | (a->tm_year ^ b->tm_year)
+ | (a->tm_mday ^ b->tm_mday)
+ | (a->tm_yday ^ b->tm_yday)
+ | (a->tm_isdst ^ b->tm_isdst));
+}
+
+static void
+print_tm (tp)
+ struct tm *tp;
+{
+ printf ("%04d-%02d-%02d %02d:%02d:%02d yday %03d wday %d isdst %d",
+ tp->tm_year + TM_YEAR_BASE, tp->tm_mon + 1, tp->tm_mday,
+ tp->tm_hour, tp->tm_min, tp->tm_sec,
+ tp->tm_yday, tp->tm_wday, tp->tm_isdst);
+}
+
+static int
+check_result (tk, tmk, tl, tml)
+ time_t tk;
+ struct tm tmk;
+ time_t tl;
+ struct tm tml;
+{
+ if (tk != tl || not_equal_tm (&tmk, &tml))
+ {
+ printf ("mktime (");
+ print_tm (&tmk);
+ printf (")\nyields (");
+ print_tm (&tml);
+ printf (") == %ld, should be %ld\n", (long) tl, (long) tk);
+ return 1;
+ }
+
+ return 0;
+}
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ int status = 0;
+ struct tm tm, tmk, tml;
+ time_t tk, tl;
+ char trailer;
+
+ if ((argc == 3 || argc == 4)
+ && (sscanf (argv[1], "%d-%d-%d%c",
+ &tm.tm_year, &tm.tm_mon, &tm.tm_mday, &trailer)
+ == 3)
+ && (sscanf (argv[2], "%d:%d:%d%c",
+ &tm.tm_hour, &tm.tm_min, &tm.tm_sec, &trailer)
+ == 3))
+ {
+ tm.tm_year -= TM_YEAR_BASE;
+ tm.tm_mon--;
+ tm.tm_isdst = argc == 3 ? -1 : atoi (argv[3]);
+ tmk = tm;
+ tl = mktime (&tmk);
+ tml = *localtime (&tl);
+ printf ("mktime returns %ld == ", (long) tl);
+ print_tm (&tmk);
+ printf ("\n");
+ status = check_result (tl, tmk, tl, tml);
+ }
+ else if (argc == 4 || (argc == 5 && strcmp (argv[4], "-") == 0))
+ {
+ time_t from = atol (argv[1]);
+ time_t by = atol (argv[2]);
+ time_t to = atol (argv[3]);
+
+ if (argc == 4)
+ for (tl = from; tl <= to; tl += by)
+ {
+ tml = *localtime (&tl);
+ tmk = tml;
+ tk = mktime (&tmk);
+ status |= check_result (tk, tmk, tl, tml);
+ }
+ else
+ for (tl = from; tl <= to; tl += by)
+ {
+ /* Null benchmark. */
+ tml = *localtime (&tl);
+ tmk = tml;
+ tk = tl;
+ status |= check_result (tk, tmk, tl, tml);
+ }
+ }
+ else
+ printf ("Usage:\
+\t%s YYYY-MM-DD HH:MM:SS [ISDST] # Test given time.\n\
+\t%s FROM BY TO # Test values FROM, FROM+BY, ..., TO.\n\
+\t%s FROM BY TO - # Do not test those values (for benchmark).\n",
+ argv[0], argv[0], argv[0]);
+
+ return status;
+}
+
+#endif /* DEBUG */
+
+/*
+Local Variables:
+compile-command: "gcc -DDEBUG=1 -Wall -O -g mktime.c -o mktime"
+End:
+*/
diff --git a/lib/sh/netconn.c b/lib/sh/netconn.c
new file mode 100644
index 0000000..36e5bf5
--- /dev/null
+++ b/lib/sh/netconn.c
@@ -0,0 +1,82 @@
+/* netconn.c -- is a particular file descriptor a network connection?. */
+
+/* Copyright (C) 2002-2005 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <bashtypes.h>
+#if ! defined(_MINIX) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+#include <posixstat.h>
+#include <filecntl.h>
+
+#include <errno.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+/* The second and subsequent conditions must match those used to decide
+ whether or not to call getpeername() in isnetconn(). */
+#if defined (HAVE_SYS_SOCKET_H) && defined (HAVE_GETPEERNAME) && !defined (SVR4_2)
+# include <sys/socket.h>
+#endif
+
+/* Is FD a socket or network connection? */
+int
+isnetconn (fd)
+ int fd;
+{
+#if defined (HAVE_GETPEERNAME) && !defined (SVR4_2) && !defined (__BEOS__)
+ int rv;
+ socklen_t l;
+ struct sockaddr sa;
+
+ l = sizeof(sa);
+ rv = getpeername(fd, &sa, &l);
+ /* Posix.2 says getpeername can return these errors. */
+ return ((rv < 0 && (errno == ENOTSOCK || errno == ENOTCONN || errno == EINVAL)) ? 0 : 1);
+#else /* !HAVE_GETPEERNAME || SVR4_2 || __BEOS__ */
+# if defined (SVR4) || defined (SVR4_2)
+ /* Sockets on SVR4 and SVR4.2 are character special (streams) devices. */
+ struct stat sb;
+
+ if (isatty (fd))
+ return (0);
+ if (fstat (fd, &sb) < 0)
+ return (0);
+# if defined (S_ISFIFO)
+ if (S_ISFIFO (sb.st_mode))
+ return (0);
+# endif /* S_ISFIFO */
+ return (S_ISCHR (sb.st_mode));
+# else /* !SVR4 && !SVR4_2 */
+# if defined (S_ISSOCK) && !defined (__BEOS__)
+ struct stat sb;
+
+ if (fstat (fd, &sb) < 0)
+ return (0);
+ return (S_ISSOCK (sb.st_mode));
+# else /* !S_ISSOCK || __BEOS__ */
+ return (0);
+# endif /* !S_ISSOCK || __BEOS__ */
+# endif /* !SVR4 && !SVR4_2 */
+#endif /* !HAVE_GETPEERNAME || SVR4_2 || __BEOS__ */
+}
diff --git a/lib/sh/netopen.c b/lib/sh/netopen.c
new file mode 100644
index 0000000..736d413
--- /dev/null
+++ b/lib/sh/netopen.c
@@ -0,0 +1,350 @@
+/*
+ * netopen.c -- functions to make tcp/udp connections
+ *
+ * Chet Ramey
+ * chet@ins.CWRU.Edu
+ */
+
+/* Copyright (C) 1987-2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_NETWORK)
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+
+#if defined (HAVE_SYS_SOCKET_H)
+# include <sys/socket.h>
+#endif
+
+#if defined (HAVE_NETINET_IN_H)
+# include <netinet/in.h>
+#endif
+
+#if defined (HAVE_NETDB_H)
+# include <netdb.h>
+#endif
+
+#if defined (HAVE_ARPA_INET_H)
+# include <arpa/inet.h>
+#endif
+
+#include <bashansi.h>
+#include <bashintl.h>
+
+#include <errno.h>
+
+#include <shell.h>
+#include <xmalloc.h>
+
+#ifndef errno
+extern int errno;
+#endif
+
+#if !defined (HAVE_INET_ATON)
+extern int inet_aton __P((const char *, struct in_addr *));
+#endif
+
+#ifndef HAVE_GETADDRINFO
+static int _getaddr __P((char *, struct in_addr *));
+static int _getserv __P((char *, int, unsigned short *));
+static int _netopen4 __P((char *, char *, int));
+#else /* HAVE_GETADDRINFO */
+static int _netopen6 __P((char *, char *, int));
+#endif
+
+static int _netopen __P((char *, char *, int));
+
+#ifndef HAVE_GETADDRINFO
+/* Stuff the internet address corresponding to HOST into AP, in network
+ byte order. Return 1 on success, 0 on failure. */
+
+static int
+_getaddr (host, ap)
+ char *host;
+ struct in_addr *ap;
+{
+ struct hostent *h;
+ int r;
+
+ r = 0;
+ if (host[0] >= '0' && host[0] <= '9')
+ {
+ /* If the first character is a digit, guess that it's an
+ Internet address and return immediately if inet_aton succeeds. */
+ r = inet_aton (host, ap);
+ if (r)
+ return r;
+ }
+#if !defined (HAVE_GETHOSTBYNAME)
+ return 0;
+#else
+ h = gethostbyname (host);
+ if (h && h->h_addr)
+ {
+ bcopy(h->h_addr, (char *)ap, h->h_length);
+ return 1;
+ }
+#endif
+ return 0;
+
+}
+
+/* Return 1 if SERV is a valid port number and stuff the converted value into
+ PP in network byte order. */
+static int
+_getserv (serv, proto, pp)
+ char *serv;
+ int proto;
+ unsigned short *pp;
+{
+ intmax_t l;
+ unsigned short s;
+
+ if (legal_number (serv, &l))
+ {
+ s = (unsigned short)(l & 0xFFFF);
+ if (s != l)
+ return (0);
+ s = htons (s);
+ if (pp)
+ *pp = s;
+ return 1;
+ }
+ else
+#if defined (HAVE_GETSERVBYNAME)
+ {
+ struct servent *se;
+
+ se = getservbyname (serv, (proto == 't') ? "tcp" : "udp");
+ if (se == 0)
+ return 0;
+ if (pp)
+ *pp = se->s_port; /* ports returned in network byte order */
+ return 1;
+ }
+#else /* !HAVE_GETSERVBYNAME */
+ return 0;
+#endif /* !HAVE_GETSERVBYNAME */
+}
+
+/*
+ * Open a TCP or UDP connection to HOST on port SERV. Uses the
+ * traditional BSD mechanisms. Returns the connected socket or -1 on error.
+ */
+static int
+_netopen4(host, serv, typ)
+ char *host, *serv;
+ int typ;
+{
+ struct in_addr ina;
+ struct sockaddr_in sin;
+ unsigned short p;
+ int s, e;
+
+ if (_getaddr(host, &ina) == 0)
+ {
+ internal_error (_("%s: host unknown"), host);
+ errno = EINVAL;
+ return -1;
+ }
+
+ if (_getserv(serv, typ, &p) == 0)
+ {
+ internal_error(_("%s: invalid service"), serv);
+ errno = EINVAL;
+ return -1;
+ }
+
+ memset ((char *)&sin, 0, sizeof(sin));
+ sin.sin_family = AF_INET;
+ sin.sin_port = p;
+ sin.sin_addr = ina;
+
+ s = socket(AF_INET, (typ == 't') ? SOCK_STREAM : SOCK_DGRAM, 0);
+ if (s < 0)
+ {
+ sys_error ("socket");
+ return (-1);
+ }
+
+ if (connect (s, (struct sockaddr *)&sin, sizeof (sin)) < 0)
+ {
+ e = errno;
+ sys_error("connect");
+ close(s);
+ errno = e;
+ return (-1);
+ }
+
+ return(s);
+}
+#endif /* ! HAVE_GETADDRINFO */
+
+#ifdef HAVE_GETADDRINFO
+/*
+ * Open a TCP or UDP connection to HOST on port SERV. Uses getaddrinfo(3)
+ * which provides support for IPv6. Returns the connected socket or -1
+ * on error.
+ */
+static int
+_netopen6 (host, serv, typ)
+ char *host, *serv;
+ int typ;
+{
+ int s, e;
+ struct addrinfo hints, *res, *res0;
+ int gerr;
+
+ memset ((char *)&hints, 0, sizeof (hints));
+ /* XXX -- if problems with IPv6, set to PF_INET for IPv4 only */
+#ifdef DEBUG /* PF_INET is the one that works for me */
+ hints.ai_family = PF_INET;
+#else
+ hints.ai_family = PF_UNSPEC;
+#endif
+ hints.ai_socktype = (typ == 't') ? SOCK_STREAM : SOCK_DGRAM;
+
+ gerr = getaddrinfo (host, serv, &hints, &res0);
+ if (gerr)
+ {
+ if (gerr == EAI_SERVICE)
+ internal_error ("%s: %s", serv, gai_strerror (gerr));
+ else
+ internal_error ("%s: %s", host, gai_strerror (gerr));
+ errno = EINVAL;
+ return -1;
+ }
+
+ for (res = res0; res; res = res->ai_next)
+ {
+ if ((s = socket (res->ai_family, res->ai_socktype, res->ai_protocol)) < 0)
+ {
+ if (res->ai_next)
+ continue;
+ sys_error ("socket");
+ freeaddrinfo (res0);
+ return -1;
+ }
+ if (connect (s, res->ai_addr, res->ai_addrlen) < 0)
+ {
+ if (res->ai_next)
+ {
+ close (s);
+ continue;
+ }
+ e = errno;
+ sys_error ("connect");
+ close (s);
+ freeaddrinfo (res0);
+ errno = e;
+ return -1;
+ }
+ freeaddrinfo (res0);
+ break;
+ }
+ return s;
+}
+#endif /* HAVE_GETADDRINFO */
+
+/*
+ * Open a TCP or UDP connection to HOST on port SERV. Uses getaddrinfo(3)
+ * if available, falling back to the traditional BSD mechanisms otherwise.
+ * Returns the connected socket or -1 on error.
+ */
+static int
+_netopen(host, serv, typ)
+ char *host, *serv;
+ int typ;
+{
+#ifdef HAVE_GETADDRINFO
+ return (_netopen6 (host, serv, typ));
+#else
+ return (_netopen4 (host, serv, typ));
+#endif
+}
+
+/*
+ * Open a TCP or UDP connection given a path like `/dev/tcp/host/port' to
+ * host `host' on port `port' and return the connected socket.
+ */
+int
+netopen (path)
+ char *path;
+{
+ char *np, *s, *t;
+ int fd;
+
+ np = (char *)xmalloc (strlen (path) + 1);
+ strcpy (np, path);
+
+ s = np + 9;
+ t = strchr (s, '/');
+ if (t == 0)
+ {
+ internal_error (_("%s: bad network path specification"), path);
+ return -1;
+ }
+ *t++ = '\0';
+ fd = _netopen (s, t, path[5]);
+ free (np);
+
+ return fd;
+}
+
+#if 0
+/*
+ * Open a TCP connection to host `host' on the port defined for service
+ * `serv' and return the connected socket.
+ */
+int
+tcpopen (host, serv)
+ char *host, *serv;
+{
+ return (_netopen (host, serv, 't'));
+}
+
+/*
+ * Open a UDP connection to host `host' on the port defined for service
+ * `serv' and return the connected socket.
+ */
+int
+udpopen (host, serv)
+ char *host, *serv;
+{
+ return _netopen (host, serv, 'u');
+}
+#endif
+
+#else /* !HAVE_NETWORK */
+
+int
+netopen (path)
+ char *path;
+{
+ internal_error (_("network operations not supported"));
+ return -1;
+}
+
+#endif /* !HAVE_NETWORK */
diff --git a/lib/sh/oslib.c b/lib/sh/oslib.c
new file mode 100644
index 0000000..d47f9dc
--- /dev/null
+++ b/lib/sh/oslib.c
@@ -0,0 +1,296 @@
+/* oslib.c - functions present only in some unix versions. */
+
+/* Copyright (C) 1995 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <bashtypes.h>
+#ifndef _MINIX
+# include <sys/param.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#if defined (HAVE_LIMITS_H)
+# include <limits.h>
+#endif
+
+#include <posixstat.h>
+#include <filecntl.h>
+#include <bashansi.h>
+
+#include <stdio.h>
+#include <errno.h>
+#include <chartypes.h>
+
+#include <shell.h>
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+/* Make the functions strchr and strrchr if they do not exist. */
+#if !defined (HAVE_STRCHR)
+char *
+strchr (string, c)
+ char *string;
+ int c;
+{
+ register char *s;
+
+ for (s = string; s && *s; s++)
+ if (*s == c)
+ return (s);
+
+ return ((char *) NULL);
+}
+
+char *
+strrchr (string, c)
+ char *string;
+ int c;
+{
+ register char *s, *t;
+
+ for (s = string, t = (char *)NULL; s && *s; s++)
+ if (*s == c)
+ t = s;
+ return (t);
+}
+#endif /* !HAVE_STRCHR */
+
+#if !defined (HAVE_DUP2) || defined (DUP2_BROKEN)
+/* Replacement for dup2 (), for those systems which either don't have it,
+ or supply one with broken behaviour. */
+int
+dup2 (fd1, fd2)
+ int fd1, fd2;
+{
+ int saved_errno, r;
+
+ /* If FD1 is not a valid file descriptor, then return immediately with
+ an error. */
+ if (fcntl (fd1, F_GETFL, 0) == -1)
+ return (-1);
+
+ if (fd2 < 0 || fd2 >= getdtablesize ())
+ {
+ errno = EBADF;
+ return (-1);
+ }
+
+ if (fd1 == fd2)
+ return (0);
+
+ saved_errno = errno;
+
+ (void) close (fd2);
+ r = fcntl (fd1, F_DUPFD, fd2);
+
+ if (r >= 0)
+ errno = saved_errno;
+ else
+ if (errno == EINVAL)
+ errno = EBADF;
+
+ /* Force the new file descriptor to remain open across exec () calls. */
+ SET_OPEN_ON_EXEC (fd2);
+ return (r);
+}
+#endif /* !HAVE_DUP2 */
+
+/*
+ * Return the total number of available file descriptors.
+ *
+ * On some systems, like 4.2BSD and its descendents, there is a system call
+ * that returns the size of the descriptor table: getdtablesize(). There are
+ * lots of ways to emulate this on non-BSD systems.
+ *
+ * On System V.3, this can be obtained via a call to ulimit:
+ * return (ulimit(4, 0L));
+ *
+ * On other System V systems, NOFILE is defined in /usr/include/sys/param.h
+ * (this is what we assume below), so we can simply use it:
+ * return (NOFILE);
+ *
+ * On POSIX systems, there are specific functions for retrieving various
+ * configuration parameters:
+ * return (sysconf(_SC_OPEN_MAX));
+ *
+ */
+
+#if !defined (HAVE_GETDTABLESIZE)
+int
+getdtablesize ()
+{
+# if defined (_POSIX_VERSION) && defined (HAVE_SYSCONF) && defined (_SC_OPEN_MAX)
+ return (sysconf(_SC_OPEN_MAX)); /* Posix systems use sysconf */
+# else /* ! (_POSIX_VERSION && HAVE_SYSCONF && _SC_OPEN_MAX) */
+# if defined (ULIMIT_MAXFDS)
+ return (ulimit (4, 0L)); /* System V.3 systems use ulimit(4, 0L) */
+# else /* !ULIMIT_MAXFDS */
+# if defined (NOFILE) /* Other systems use NOFILE */
+ return (NOFILE);
+# else /* !NOFILE */
+ return (20); /* XXX - traditional value is 20 */
+# endif /* !NOFILE */
+# endif /* !ULIMIT_MAXFDS */
+# endif /* ! (_POSIX_VERSION && _SC_OPEN_MAX) */
+}
+#endif /* !HAVE_GETDTABLESIZE */
+
+#if !defined (HAVE_BCOPY)
+# if defined (bcopy)
+# undef bcopy
+# endif
+void
+bcopy (s,d,n)
+ char *d, *s;
+ int n;
+{
+ FASTCOPY (s, d, n);
+}
+#endif /* !HAVE_BCOPY */
+
+#if !defined (HAVE_BZERO)
+# if defined (bzero)
+# undef bzero
+# endif
+void
+bzero (s, n)
+ char *s;
+ int n;
+{
+ register int i;
+ register char *r;
+
+ for (i = 0, r = s; i < n; i++)
+ *r++ = '\0';
+}
+#endif
+
+#if !defined (HAVE_GETHOSTNAME)
+# if defined (HAVE_UNAME)
+# include <sys/utsname.h>
+int
+gethostname (name, namelen)
+ char *name;
+ int namelen;
+{
+ int i;
+ struct utsname ut;
+
+ --namelen;
+
+ uname (&ut);
+ i = strlen (ut.nodename) + 1;
+ strncpy (name, ut.nodename, i < namelen ? i : namelen);
+ name[namelen] = '\0';
+ return (0);
+}
+# else /* !HAVE_UNAME */
+int
+gethostname (name, namelen)
+ int name, namelen;
+{
+ strncpy (name, "unknown", namelen);
+ name[namelen] = '\0';
+ return 0;
+}
+# endif /* !HAVE_UNAME */
+#endif /* !HAVE_GETHOSTNAME */
+
+#if !defined (HAVE_KILLPG)
+int
+killpg (pgrp, sig)
+ pid_t pgrp;
+ int sig;
+{
+ return (kill (-pgrp, sig));
+}
+#endif /* !HAVE_KILLPG */
+
+#if !defined (HAVE_MKFIFO) && defined (PROCESS_SUBSTITUTION)
+int
+mkfifo (path, mode)
+ char *path;
+ int mode;
+{
+#if defined (S_IFIFO)
+ return (mknod (path, (mode | S_IFIFO), 0));
+#else /* !S_IFIFO */
+ return (-1);
+#endif /* !S_IFIFO */
+}
+#endif /* !HAVE_MKFIFO && PROCESS_SUBSTITUTION */
+
+#define DEFAULT_MAXGROUPS 64
+
+int
+getmaxgroups ()
+{
+ static int maxgroups = -1;
+
+ if (maxgroups > 0)
+ return maxgroups;
+
+#if defined (HAVE_SYSCONF) && defined (_SC_NGROUPS_MAX)
+ maxgroups = sysconf (_SC_NGROUPS_MAX);
+#else
+# if defined (NGROUPS_MAX)
+ maxgroups = NGROUPS_MAX;
+# else /* !NGROUPS_MAX */
+# if defined (NGROUPS)
+ maxgroups = NGROUPS;
+# else /* !NGROUPS */
+ maxgroups = DEFAULT_MAXGROUPS;
+# endif /* !NGROUPS */
+# endif /* !NGROUPS_MAX */
+#endif /* !HAVE_SYSCONF || !SC_NGROUPS_MAX */
+
+ if (maxgroups <= 0)
+ maxgroups = DEFAULT_MAXGROUPS;
+
+ return maxgroups;
+}
+
+long
+getmaxchild ()
+{
+ static long maxchild = -1L;
+
+ if (maxchild > 0)
+ return maxchild;
+
+#if defined (HAVE_SYSCONF) && defined (_SC_CHILD_MAX)
+ maxchild = sysconf (_SC_CHILD_MAX);
+#else
+# if defined (CHILD_MAX)
+ maxchild = CHILD_MAX;
+# else
+# if defined (MAXUPRC)
+ maxchild = MAXUPRC;
+# endif /* MAXUPRC */
+# endif /* CHILD_MAX */
+#endif /* !HAVE_SYSCONF || !_SC_CHILD_MAX */
+
+ return (maxchild);
+}
diff --git a/lib/sh/pathcanon.c b/lib/sh/pathcanon.c
new file mode 100644
index 0000000..98e41ce
--- /dev/null
+++ b/lib/sh/pathcanon.c
@@ -0,0 +1,234 @@
+/* pathcanon.c -- canonicalize and manipulate pathnames. */
+
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <bashtypes.h>
+#ifndef _MINIX
+# include <sys/param.h>
+#endif
+#include <posixstat.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <filecntl.h>
+#include <bashansi.h>
+#include <stdio.h>
+#include <chartypes.h>
+#include <errno.h>
+
+#include "shell.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+#if defined (__CYGWIN__)
+#include <sys/cygwin.h>
+
+static int
+_is_cygdrive (path)
+ char *path;
+{
+ static char user[MAXPATHLEN];
+ static char system[MAXPATHLEN];
+ static int first_time = 1;
+
+ /* If the path is the first part of a network path, treat it as
+ existing. */
+ if (path[0] == '/' && path[1] == '/' && !strchr (path + 2, '/'))
+ return 1;
+ /* Otherwise check for /cygdrive prefix. */
+ if (first_time)
+ {
+ char user_flags[MAXPATHLEN];
+ char system_flags[MAXPATHLEN];
+ /* Get the cygdrive info */
+ cygwin_internal (CW_GET_CYGDRIVE_INFO, user, system, user_flags, system_flags);
+ first_time = 0;
+ }
+ return !strcasecmp (path, user) || !strcasecmp (path, system);
+}
+#endif /* __CYGWIN__ */
+
+/* Return 1 if PATH corresponds to a directory. A function for debugging. */
+static int
+_path_isdir (path)
+ char *path;
+{
+ int l;
+ struct stat sb;
+
+ /* This should leave errno set to the correct value. */
+ errno = 0;
+ l = stat (path, &sb) == 0 && S_ISDIR (sb.st_mode);
+#if defined (__CYGWIN__)
+ if (l == 0)
+ l = _is_cygdrive (path);
+#endif
+ return l;
+}
+
+/* Canonicalize PATH, and return a new path. The new path differs from PATH
+ in that:
+ Multple `/'s are collapsed to a single `/'.
+ Leading `./'s and trailing `/.'s are removed.
+ Trailing `/'s are removed.
+ Non-leading `../'s and trailing `..'s are handled by removing
+ portions of the path. */
+
+/* Look for ROOTEDPATH, PATHSEP, DIRSEP, and ISDIRSEP in ../../general.h */
+
+#define DOUBLE_SLASH(p) ((p[0] == '/') && (p[1] == '/') && p[2] != '/')
+
+char *
+sh_canonpath (path, flags)
+ char *path;
+ int flags;
+{
+ char stub_char;
+ char *result, *p, *q, *base, *dotdot;
+ int rooted, double_slash_path;
+
+ /* The result cannot be larger than the input PATH. */
+ result = (flags & PATH_NOALLOC) ? path : savestring (path);
+
+ /* POSIX.2 says to leave a leading `//' alone. On cygwin, we skip over any
+ leading `x:' (dos drive name). */
+ if (rooted = ROOTEDPATH(path))
+ {
+ stub_char = DIRSEP;
+#if defined (__CYGWIN__)
+ base = (ISALPHA((unsigned char)result[0]) && result[1] == ':') ? result + 3 : result + 1;
+#else
+ base = result + 1;
+#endif
+ double_slash_path = DOUBLE_SLASH (path);
+ base += double_slash_path;
+ }
+ else
+ {
+ stub_char = '.';
+#if defined (__CYGWIN__)
+ base = (ISALPHA((unsigned char)result[0]) && result[1] == ':') ? result + 2 : result;
+#else
+ base = result;
+#endif
+ double_slash_path = 0;
+ }
+
+ /*
+ * invariants:
+ * base points to the portion of the path we want to modify
+ * p points at beginning of path element we're considering.
+ * q points just past the last path element we wrote (no slash).
+ * dotdot points just past the point where .. cannot backtrack
+ * any further (no slash).
+ */
+ p = q = dotdot = base;
+
+ while (*p)
+ {
+ if (ISDIRSEP(p[0])) /* null element */
+ p++;
+ else if(p[0] == '.' && PATHSEP(p[1])) /* . and ./ */
+ p += 1; /* don't count the separator in case it is nul */
+ else if (p[0] == '.' && p[1] == '.' && PATHSEP(p[2])) /* .. and ../ */
+ {
+ p += 2; /* skip `..' */
+ if (q > dotdot) /* can backtrack */
+ {
+ if (flags & PATH_CHECKDOTDOT)
+ {
+ char c;
+
+ /* Make sure what we have so far corresponds to a valid
+ path before we chop some of it off. */
+ c = *q;
+ *q = '\0';
+ if (_path_isdir (result) == 0)
+ {
+ if ((flags & PATH_NOALLOC) == 0)
+ free (result);
+ return ((char *)NULL);
+ }
+ *q = c;
+ }
+
+ while (--q > dotdot && ISDIRSEP(*q) == 0)
+ ;
+ }
+ else if (rooted == 0)
+ {
+ /* /.. is / but ./../ is .. */
+ if (q != base)
+ *q++ = DIRSEP;
+ *q++ = '.';
+ *q++ = '.';
+ dotdot = q;
+ }
+ }
+ else /* real path element */
+ {
+ /* add separator if not at start of work portion of result */
+ if (q != base)
+ *q++ = DIRSEP;
+ while (*p && (ISDIRSEP(*p) == 0))
+ *q++ = *p++;
+ /* Check here for a valid directory with _path_isdir. */
+ if (flags & PATH_CHECKEXISTS)
+ {
+ char c;
+
+ /* Make sure what we have so far corresponds to a valid
+ path before we chop some of it off. */
+ c = *q;
+ *q = '\0';
+ if (_path_isdir (result) == 0)
+ {
+ if ((flags & PATH_NOALLOC) == 0)
+ free (result);
+ return ((char *)NULL);
+ }
+ *q = c;
+ }
+ }
+ }
+
+ /* Empty string is really ``.'' or `/', depending on what we started with. */
+ if (q == result)
+ *q++ = stub_char;
+ *q = '\0';
+
+ /* If the result starts with `//', but the original path does not, we
+ can turn the // into /. Because of how we set `base', this should never
+ be true, but it's a sanity check. */
+ if (DOUBLE_SLASH(result) && double_slash_path == 0)
+ {
+ if (result[2] == '\0') /* short-circuit for bare `//' */
+ result[1] = '\0';
+ else
+ strcpy (result, result + 1);
+ }
+
+ return (result);
+}
diff --git a/lib/sh/pathphys.c b/lib/sh/pathphys.c
new file mode 100644
index 0000000..15fcd25
--- /dev/null
+++ b/lib/sh/pathphys.c
@@ -0,0 +1,296 @@
+/* pathphys.c -- return pathname with all symlinks expanded. */
+
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <bashtypes.h>
+#ifndef _MINIX
+# include <sys/param.h>
+#endif
+#include <posixstat.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <filecntl.h>
+#include <bashansi.h>
+#include <stdio.h>
+#include <chartypes.h>
+#include <errno.h>
+
+#include "shell.h"
+
+#if !defined (MAXSYMLINKS)
+# define MAXSYMLINKS 32
+#endif
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+extern char *get_working_directory __P((char *));
+
+static int
+_path_readlink (path, buf, bufsiz)
+ char *path;
+ char *buf;
+ int bufsiz;
+{
+#ifdef HAVE_READLINK
+ return readlink (path, buf, bufsiz);
+#else
+ errno = EINVAL;
+ return -1;
+#endif
+}
+
+/* Look for ROOTEDPATH, PATHSEP, DIRSEP, and ISDIRSEP in ../../general.h */
+
+#define DOUBLE_SLASH(p) ((p[0] == '/') && (p[1] == '/') && p[2] != '/')
+
+/*
+ * Return PATH with all symlinks expanded in newly-allocated memory.
+ * This always gets an absolute pathname.
+ */
+
+char *
+sh_physpath (path, flags)
+ char *path;
+ int flags;
+{
+ char tbuf[PATH_MAX+1], linkbuf[PATH_MAX+1];
+ char *result, *p, *q, *qsave, *qbase, *workpath;
+ int double_slash_path, linklen, nlink;
+
+ linklen = strlen (path);
+
+#if 0
+ /* First sanity check -- punt immediately if the name is too long. */
+ if (linklen >= PATH_MAX)
+ return (savestring (path));
+#endif
+
+ nlink = 0;
+ q = result = (char *)xmalloc (PATH_MAX + 1);
+
+ /* Even if we get something longer than PATH_MAX, we might be able to
+ shorten it, so we try. */
+ if (linklen >= PATH_MAX)
+ workpath = savestring (path);
+ else
+ {
+ workpath = (char *)xmalloc (PATH_MAX + 1);
+ strcpy (workpath, path);
+ }
+
+ /* This always gets an absolute pathname. */
+
+ /* POSIX.2 says to leave a leading `//' alone. On cygwin, we skip over any
+ leading `x:' (dos drive name). */
+#if defined (__CYGWIN__)
+ qbase = (ISALPHA((unsigned char)workpath[0]) && workpath[1] == ':') ? workpath + 3 : workpath + 1;
+#else
+ qbase = workpath + 1;
+#endif
+ double_slash_path = DOUBLE_SLASH (workpath);
+ qbase += double_slash_path;
+
+ for (p = workpath; p < qbase; )
+ *q++ = *p++;
+ qbase = q;
+
+ /*
+ * invariants:
+ * qbase points to the portion of the result path we want to modify
+ * p points at beginning of path element we're considering.
+ * q points just past the last path element we wrote (no slash).
+ *
+ * XXX -- need to fix error checking for too-long pathnames
+ */
+
+ while (*p)
+ {
+ if (ISDIRSEP(p[0])) /* null element */
+ p++;
+ else if(p[0] == '.' && PATHSEP(p[1])) /* . and ./ */
+ p += 1; /* don't count the separator in case it is nul */
+ else if (p[0] == '.' && p[1] == '.' && PATHSEP(p[2])) /* .. and ../ */
+ {
+ p += 2; /* skip `..' */
+ if (q > qbase)
+ {
+ while (--q > qbase && ISDIRSEP(*q) == 0)
+ ;
+ }
+ }
+ else /* real path element */
+ {
+ /* add separator if not at start of work portion of result */
+ qsave = q;
+ if (q != qbase)
+ *q++ = DIRSEP;
+ while (*p && (ISDIRSEP(*p) == 0))
+ {
+ if (q - result >= PATH_MAX)
+ {
+#ifdef ENAMETOOLONG
+ errno = ENAMETOOLONG;
+#else
+ errno = EINVAL;
+#endif
+ goto error;
+ }
+
+ *q++ = *p++;
+ }
+
+ *q = '\0';
+
+ linklen = _path_readlink (result, linkbuf, PATH_MAX);
+ if (linklen < 0) /* if errno == EINVAL, it's not a symlink */
+ {
+ if (errno != EINVAL)
+ goto error;
+ continue;
+ }
+
+ /* It's a symlink, and the value is in LINKBUF. */
+ nlink++;
+ if (nlink > MAXSYMLINKS)
+ {
+#ifdef ELOOP
+ errno = ELOOP;
+#else
+ errno = EINVAL;
+#endif
+error:
+ free (result);
+ free (workpath);
+ return ((char *)NULL);
+ }
+
+ linkbuf[linklen] = '\0';
+
+ /* If the new path length would overrun PATH_MAX, punt now. */
+ if ((strlen (p) + linklen + 2) >= PATH_MAX)
+ {
+#ifdef ENAMETOOLONG
+ errno = ENAMETOOLONG;
+#else
+ errno = EINVAL;
+#endif
+ goto error;
+ }
+
+ /* Form the new pathname by copying the link value to a temporary
+ buffer and appending the rest of `workpath'. Reset p to point
+ to the start of the rest of the path. If the link value is an
+ absolute pathname, reset p, q, and qbase. If not, reset p
+ and q. */
+ strcpy (tbuf, linkbuf);
+ tbuf[linklen] = '/';
+ strcpy (tbuf + linklen, p);
+ strcpy (workpath, tbuf);
+
+ if (ABSPATH(linkbuf))
+ {
+ q = result;
+ /* Duplicating some code here... */
+#if defined (__CYGWIN__)
+ qbase = (ISALPHA((unsigned char)workpath[0]) && workpath[1] == ':') ? workpath + 3 : workpath + 1;
+#else
+ qbase = workpath + 1;
+#endif
+ double_slash_path = DOUBLE_SLASH (workpath);
+ qbase += double_slash_path;
+
+ for (p = workpath; p < qbase; )
+ *q++ = *p++;
+ qbase = q;
+ }
+ else
+ {
+ p = workpath;
+ q = qsave;
+ }
+ }
+ }
+
+ *q = '\0';
+ free (workpath);
+
+ /* If the result starts with `//', but the original path does not, we
+ can turn the // into /. Because of how we set `qbase', this should never
+ be true, but it's a sanity check. */
+ if (DOUBLE_SLASH(result) && double_slash_path == 0)
+ {
+ if (result[2] == '\0') /* short-circuit for bare `//' */
+ result[1] = '\0';
+ else
+ strcpy (result, result + 1);
+ }
+
+ return (result);
+}
+
+char *
+sh_realpath (pathname, resolved)
+ const char *pathname;
+ char *resolved;
+{
+ char *tdir, *wd;
+
+ if (pathname == 0 || *pathname == '\0')
+ {
+ errno = (pathname == 0) ? EINVAL : ENOENT;
+ return ((char *)NULL);
+ }
+
+ if (ABSPATH (pathname) == 0)
+ {
+ wd = get_working_directory ("sh_realpath");
+ if (wd == 0)
+ return ((char *)NULL);
+ tdir = sh_makepath ((char *)pathname, wd, 0);
+ free (wd);
+ }
+ else
+ tdir = savestring (pathname);
+
+ wd = sh_physpath (tdir, 0);
+ free (tdir);
+
+ if (resolved == 0)
+ return (wd);
+
+ if (wd)
+ {
+ strncpy (resolved, wd, PATH_MAX - 1);
+ resolved[PATH_MAX - 1] = '\0';
+ free (wd);
+ return resolved;
+ }
+ else
+ {
+ resolved[0] = '\0';
+ return wd;
+ }
+}
diff --git a/lib/sh/rename.c b/lib/sh/rename.c
new file mode 100644
index 0000000..e410b5e
--- /dev/null
+++ b/lib/sh/rename.c
@@ -0,0 +1,76 @@
+/*
+ * rename - rename a file
+ */
+
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if !defined (HAVE_RENAME)
+
+#include <bashtypes.h>
+#include <posixstat.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+#include <errno.h>
+
+#include <stdc.h>
+
+#ifndef errno
+extern int errno;
+#endif
+
+int
+rename (from, to)
+ const char *from, *to;
+{
+ struct stat fb, tb;
+
+ if (stat (from, &fb) < 0)
+ return -1;
+
+ if (stat (to, &tb) < 0)
+ {
+ if (errno != ENOENT)
+ return -1;
+ }
+ else
+ {
+ if (fb.st_dev == tb.st_dev && fb.st_ino == tb.st_ino)
+ return 0; /* same file */
+ if (unlink (to) < 0 && errno != ENOENT)
+ return -1;
+ }
+
+ if (link (from, to) < 0)
+ return (-1);
+
+ if (unlink (from) < 0 && errno != ENOENT)
+ {
+ int e = errno;
+ unlink (to);
+ errno = e;
+ return (-1);
+ }
+
+ return (0);
+}
+#endif /* !HAVE_RENAME */
diff --git a/lib/sh/setlinebuf.c b/lib/sh/setlinebuf.c
new file mode 100644
index 0000000..6473ddf
--- /dev/null
+++ b/lib/sh/setlinebuf.c
@@ -0,0 +1,63 @@
+/* setlinebuf.c - line-buffer a stdio stream. */
+
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include <xmalloc.h>
+
+#if defined (USING_BASH_MALLOC)
+# define LBUF_BUFSIZE 1008
+#else
+# define LBUF_BUFSIZE BUFSIZ
+#endif
+
+/* Cause STREAM to buffer lines as opposed to characters or blocks. */
+int
+sh_setlinebuf (stream)
+ FILE *stream;
+{
+ char *local_linebuf;
+
+#if !defined (HAVE_SETLINEBUF) && !defined (HAVE_SETVBUF)
+ return (0);
+#endif
+
+#if defined (USING_BASH_MALLOC)
+ local_linebuf = (char *)xmalloc (LBUF_BUFSIZE);
+#else
+ local_linebuf = (char *)NULL;
+#endif
+
+#if defined (HAVE_SETVBUF)
+
+# if defined (SETVBUF_REVERSED)
+ return (setvbuf (stream, _IOLBF, local_linebuf, LBUF_BUFSIZE));
+# else /* !SETVBUF_REVERSED */
+ return (setvbuf (stream, local_linebuf, _IOLBF, LBUF_BUFSIZE));
+# endif /* !SETVBUF_REVERSED */
+# else /* !HAVE_SETVBUF */
+
+ setlinebuf (stream);
+ return (0);
+
+#endif /* !HAVE_SETVBUF */
+}
diff --git a/lib/sh/shmatch.c b/lib/sh/shmatch.c
new file mode 100644
index 0000000..6de1dc1
--- /dev/null
+++ b/lib/sh/shmatch.c
@@ -0,0 +1,120 @@
+/*
+ * shmatch.c -- shell interface to posix regular expression matching.
+ */
+
+/* Copyright (C) 2003 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined (HAVE_POSIX_REGEXP)
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+
+#include <stdio.h>
+#include <regex.h>
+
+#include "shell.h"
+#include "variables.h"
+#include "externs.h"
+
+extern int glob_ignore_case, match_ignore_case;
+
+int
+sh_regmatch (string, pattern, flags)
+ const char *string;
+ const char *pattern;
+ int flags;
+{
+ regex_t regex = { 0 };
+ regmatch_t *matches;
+ int rflags;
+#if defined (ARRAY_VARS)
+ SHELL_VAR *rematch;
+ ARRAY *amatch;
+ int subexp_ind;
+ char *subexp_str;
+ int subexp_len;
+#endif
+ int result;
+
+#if defined (ARRAY_VARS)
+ rematch = (SHELL_VAR *)NULL;
+#endif
+
+ rflags = REG_EXTENDED;
+ if (glob_ignore_case || match_ignore_case)
+ rflags |= REG_ICASE;
+#if !defined (ARRAY_VARS)
+ rflags |= REG_NOSUB;
+#endif
+
+ if (regcomp (&regex, pattern, rflags))
+ return 2; /* flag for printing a warning here. */
+
+#if defined (ARRAY_VARS)
+ matches = (regmatch_t *)malloc (sizeof (regmatch_t) * (regex.re_nsub + 1));
+#else
+ matches = NULL;
+#endif
+
+ if (regexec (&regex, string, regex.re_nsub + 1, matches, 0))
+ result = EXECUTION_FAILURE;
+ else
+ result = EXECUTION_SUCCESS; /* match */
+
+#if defined (ARRAY_VARS)
+ subexp_len = strlen (string) + 10;
+ subexp_str = malloc (subexp_len + 1);
+
+ /* Store the parenthesized subexpressions in the array BASH_REMATCH.
+ Element 0 is the portion that matched the entire regexp. Element 1
+ is the part that matched the first subexpression, and so on. */
+ unbind_variable ("BASH_REMATCH");
+ rematch = make_new_array_variable ("BASH_REMATCH");
+ amatch = array_cell (rematch);
+
+ if ((flags & SHMAT_SUBEXP) && result == EXECUTION_SUCCESS && subexp_str)
+ {
+ for (subexp_ind = 0; subexp_ind <= regex.re_nsub; subexp_ind++)
+ {
+ memset (subexp_str, 0, subexp_len);
+ strncpy (subexp_str, string + matches[subexp_ind].rm_so,
+ matches[subexp_ind].rm_eo - matches[subexp_ind].rm_so);
+ array_insert (amatch, subexp_ind, subexp_str);
+ }
+ }
+
+ VSETATTR (rematch, att_readonly);
+
+ free (subexp_str);
+ free (matches);
+#endif /* ARRAY_VARS */
+
+ regfree (&regex);
+
+ return result;
+}
+
+#endif /* HAVE_POSIX_REGEXP */
diff --git a/lib/sh/shquote.c b/lib/sh/shquote.c
new file mode 100644
index 0000000..a267d38
--- /dev/null
+++ b/lib/sh/shquote.c
@@ -0,0 +1,278 @@
+/* shquote - functions to quote and dequote strings */
+
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+
+#include "syntax.h"
+#include <xmalloc.h>
+
+/* **************************************************************** */
+/* */
+/* Functions for quoting strings to be re-read as input */
+/* */
+/* **************************************************************** */
+
+/* Return a new string which is the single-quoted version of STRING.
+ Used by alias and trap, among others. */
+char *
+sh_single_quote (string)
+ char *string;
+{
+ register int c;
+ char *result, *r, *s;
+
+ result = (char *)xmalloc (3 + (4 * strlen (string)));
+ r = result;
+ *r++ = '\'';
+
+ for (s = string; s && (c = *s); s++)
+ {
+ *r++ = c;
+
+ if (c == '\'')
+ {
+ *r++ = '\\'; /* insert escaped single quote */
+ *r++ = '\'';
+ *r++ = '\''; /* start new quoted string */
+ }
+ }
+
+ *r++ = '\'';
+ *r = '\0';
+
+ return (result);
+}
+
+/* Quote STRING using double quotes. Return a new string. */
+char *
+sh_double_quote (string)
+ char *string;
+{
+ register unsigned char c;
+ char *result, *r, *s;
+
+ result = (char *)xmalloc (3 + (2 * strlen (string)));
+ r = result;
+ *r++ = '"';
+
+ for (s = string; s && (c = *s); s++)
+ {
+ /* Backslash-newline disappears within double quotes, so don't add one. */
+ if ((sh_syntaxtab[c] & CBSDQUOTE) && c != '\n')
+ *r++ = '\\';
+ else if (c == CTLESC || c == CTLNUL)
+ *r++ = CTLESC; /* could be '\\'? */
+
+ *r++ = c;
+ }
+
+ *r++ = '"';
+ *r = '\0';
+
+ return (result);
+}
+
+/* Turn S into a simple double-quoted string. If FLAGS is non-zero, quote
+ double quote characters in S with backslashes. */
+char *
+sh_mkdoublequoted (s, slen, flags)
+ const char *s;
+ int slen, flags;
+{
+ char *r, *ret;
+ int rlen;
+
+ rlen = (flags == 0) ? slen + 3 : (2 * slen) + 1;
+ ret = r = (char *)xmalloc (rlen);
+
+ *r++ = '"';
+ while (*s)
+ {
+ if (flags && *s == '"')
+ *r++ = '\\';
+ *r++ = *s++;
+ }
+ *r++ = '"';
+ *r = '\0';
+
+ return ret;
+}
+
+/* Remove backslashes that are quoting characters that are special between
+ double quotes. Return a new string. XXX - should this handle CTLESC
+ and CTLNUL? */
+char *
+sh_un_double_quote (string)
+ char *string;
+{
+ register int c, pass_next;
+ char *result, *r, *s;
+
+ r = result = (char *)xmalloc (strlen (string) + 1);
+
+ for (pass_next = 0, s = string; s && (c = *s); s++)
+ {
+ if (pass_next)
+ {
+ *r++ = c;
+ pass_next = 0;
+ continue;
+ }
+ if (c == '\\' && (sh_syntaxtab[(unsigned char) s[1]] & CBSDQUOTE))
+ {
+ pass_next = 1;
+ continue;
+ }
+ *r++ = c;
+ }
+
+ *r = '\0';
+ return result;
+}
+
+/* Quote special characters in STRING using backslashes. Return a new
+ string. NOTE: if the string is to be further expanded, we need a
+ way to protect the CTLESC and CTLNUL characters. As I write this,
+ the current callers will never cause the string to be expanded without
+ going through the shell parser, which will protect the internal
+ quoting characters. */
+char *
+sh_backslash_quote (string)
+ char *string;
+{
+ int c;
+ char *result, *r, *s;
+
+ result = (char *)xmalloc (2 * strlen (string) + 1);
+
+ for (r = result, s = string; s && (c = *s); s++)
+ {
+ switch (c)
+ {
+ case ' ': case '\t': case '\n': /* IFS white space */
+ case '\'': case '"': case '\\': /* quoting chars */
+ case '|': case '&': case ';': /* shell metacharacters */
+ case '(': case ')': case '<': case '>':
+ case '!': case '{': case '}': /* reserved words */
+ case '*': case '[': case '?': case ']': /* globbing chars */
+ case '^':
+ case '$': case '`': /* expansion chars */
+ case ',': /* brace expansion */
+ *r++ = '\\';
+ *r++ = c;
+ break;
+#if 0
+ case '~': /* tilde expansion */
+ if (s == string || s[-1] == '=' || s[-1] == ':')
+ *r++ = '\\';
+ *r++ = c;
+ break;
+
+ case CTLESC: case CTLNUL: /* internal quoting characters */
+ *r++ = CTLESC; /* could be '\\'? */
+ *r++ = c;
+ break;
+#endif
+
+ case '#': /* comment char */
+ if (s == string)
+ *r++ = '\\';
+ /* FALLTHROUGH */
+ default:
+ *r++ = c;
+ break;
+ }
+ }
+
+ *r = '\0';
+ return (result);
+}
+
+#if defined (PROMPT_STRING_DECODE)
+/* Quote characters that get special treatment when in double quotes in STRING
+ using backslashes. Return a new string. */
+char *
+sh_backslash_quote_for_double_quotes (string)
+ char *string;
+{
+ unsigned char c;
+ char *result, *r, *s;
+
+ result = (char *)xmalloc (2 * strlen (string) + 1);
+
+ for (r = result, s = string; s && (c = *s); s++)
+ {
+ if (sh_syntaxtab[c] & CBSDQUOTE)
+ *r++ = '\\';
+ /* I should probably add flags for these to sh_syntaxtab[] */
+ else if (c == CTLESC || c == CTLNUL)
+ *r++ = CTLESC; /* could be '\\'? */
+
+ *r++ = c;
+ }
+
+ *r = '\0';
+ return (result);
+}
+#endif /* PROMPT_STRING_DECODE */
+
+int
+sh_contains_shell_metas (string)
+ char *string;
+{
+ char *s;
+
+ for (s = string; s && *s; s++)
+ {
+ switch (*s)
+ {
+ case ' ': case '\t': case '\n': /* IFS white space */
+ case '\'': case '"': case '\\': /* quoting chars */
+ case '|': case '&': case ';': /* shell metacharacters */
+ case '(': case ')': case '<': case '>':
+ case '!': case '{': case '}': /* reserved words */
+ case '*': case '[': case '?': case ']': /* globbing chars */
+ case '^':
+ case '$': case '`': /* expansion chars */
+ return (1);
+ case '~': /* tilde expansion */
+ if (s == string || s[-1] == '=' || s[-1] == ':')
+ return (1);
+ break;
+ case '#':
+ if (s == string) /* comment char */
+ return (1);
+ /* FALLTHROUGH */
+ default:
+ break;
+ }
+ }
+
+ return (0);
+}
diff --git a/lib/sh/shtty.c b/lib/sh/shtty.c
new file mode 100644
index 0000000..0433f5e
--- /dev/null
+++ b/lib/sh/shtty.c
@@ -0,0 +1,330 @@
+/*
+ * shtty.c -- abstract interface to the terminal, focusing on capabilities.
+ */
+
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include <shtty.h>
+
+static TTYSTRUCT ttin, ttout;
+static int ttsaved = 0;
+
+int
+ttgetattr(fd, ttp)
+int fd;
+TTYSTRUCT *ttp;
+{
+#ifdef TERMIOS_TTY_DRIVER
+ return tcgetattr(fd, ttp);
+#else
+# ifdef TERMIO_TTY_DRIVER
+ return ioctl(fd, TCGETA, ttp);
+# else
+ return ioctl(fd, TIOCGETP, ttp);
+# endif
+#endif
+}
+
+int
+ttsetattr(fd, ttp)
+int fd;
+TTYSTRUCT *ttp;
+{
+#ifdef TERMIOS_TTY_DRIVER
+ return tcsetattr(fd, TCSADRAIN, ttp);
+#else
+# ifdef TERMIO_TTY_DRIVER
+ return ioctl(fd, TCSETAW, ttp);
+# else
+ return ioctl(fd, TIOCSETN, ttp);
+# endif
+#endif
+}
+
+void
+ttsave()
+{
+ if (ttsaved)
+ return;
+ ttgetattr (0, &ttin);
+ ttgetattr (1, &ttout);
+ ttsaved = 1;
+}
+
+void
+ttrestore()
+{
+ if (ttsaved == 0)
+ return;
+ ttsetattr (0, &ttin);
+ ttsetattr (1, &ttout);
+ ttsaved = 0;
+}
+
+/* Retrieve the internally-saved attributes associated with tty fd FD. */
+TTYSTRUCT *
+ttattr (fd)
+ int fd;
+{
+ if (ttsaved == 0)
+ return ((TTYSTRUCT *)0);
+ if (fd == 0)
+ return &ttin;
+ else if (fd == 1)
+ return &ttout;
+ else
+ return ((TTYSTRUCT *)0);
+}
+
+/*
+ * Change attributes in ttp so that when it is installed using
+ * ttsetattr, the terminal will be in one-char-at-a-time mode.
+ */
+int
+tt_setonechar(ttp)
+ TTYSTRUCT *ttp;
+{
+#if defined (TERMIOS_TTY_DRIVER) || defined (TERMIO_TTY_DRIVER)
+
+ /* XXX - might not want this -- it disables erase and kill processing. */
+ ttp->c_lflag &= ~ICANON;
+
+ ttp->c_lflag |= ISIG;
+# ifdef IEXTEN
+ ttp->c_lflag |= IEXTEN;
+# endif
+
+ ttp->c_iflag |= ICRNL; /* make sure we get CR->NL on input */
+ ttp->c_iflag &= ~INLCR; /* but no NL->CR */
+
+# ifdef OPOST
+ ttp->c_oflag |= OPOST;
+# endif
+# ifdef ONLCR
+ ttp->c_oflag |= ONLCR;
+# endif
+# ifdef OCRNL
+ ttp->c_oflag &= ~OCRNL;
+# endif
+# ifdef ONOCR
+ ttp->c_oflag &= ~ONOCR;
+# endif
+# ifdef ONLRET
+ ttp->c_oflag &= ~ONLRET;
+# endif
+
+ ttp->c_cc[VMIN] = 1;
+ ttp->c_cc[VTIME] = 0;
+
+#else
+
+ ttp->sg_flags |= CBREAK;
+
+#endif
+
+ return 0;
+}
+
+/* Set the tty associated with FD and TTP into one-character-at-a-time mode */
+int
+ttfd_onechar (fd, ttp)
+ int fd;
+ TTYSTRUCT *ttp;
+{
+ if (tt_setonechar(ttp) < 0)
+ return -1;
+ return (ttsetattr (fd, ttp));
+}
+
+/* Set the terminal into one-character-at-a-time mode */
+int
+ttonechar ()
+{
+ TTYSTRUCT tt;
+
+ if (ttsaved == 0)
+ return -1;
+ tt = ttin;
+ return (ttfd_onechar (0, &tt));
+}
+
+/*
+ * Change attributes in ttp so that when it is installed using
+ * ttsetattr, the terminal will be in no-echo mode.
+ */
+int
+tt_setnoecho(ttp)
+ TTYSTRUCT *ttp;
+{
+#if defined (TERMIOS_TTY_DRIVER) || defined (TERMIO_TTY_DRIVER)
+ ttp->c_lflag &= ~(ECHO|ECHOK|ECHONL);
+#else
+ ttp->sg_flags &= ~ECHO;
+#endif
+
+ return 0;
+}
+
+/* Set the tty associated with FD and TTP into no-echo mode */
+int
+ttfd_noecho (fd, ttp)
+ int fd;
+ TTYSTRUCT *ttp;
+{
+ if (tt_setnoecho (ttp) < 0)
+ return -1;
+ return (ttsetattr (fd, ttp));
+}
+
+/* Set the terminal into no-echo mode */
+int
+ttnoecho ()
+{
+ TTYSTRUCT tt;
+
+ if (ttsaved == 0)
+ return -1;
+ tt = ttin;
+ return (ttfd_noecho (0, &tt));
+}
+
+/*
+ * Change attributes in ttp so that when it is installed using
+ * ttsetattr, the terminal will be in eight-bit mode (pass8).
+ */
+int
+tt_seteightbit (ttp)
+ TTYSTRUCT *ttp;
+{
+#if defined (TERMIOS_TTY_DRIVER) || defined (TERMIO_TTY_DRIVER)
+ ttp->c_iflag &= ~ISTRIP;
+ ttp->c_cflag |= CS8;
+ ttp->c_cflag &= ~PARENB;
+#else
+ ttp->sg_flags |= ANYP;
+#endif
+
+ return 0;
+}
+
+/* Set the tty associated with FD and TTP into eight-bit mode */
+int
+ttfd_eightbit (fd, ttp)
+ int fd;
+ TTYSTRUCT *ttp;
+{
+ if (tt_seteightbit (ttp) < 0)
+ return -1;
+ return (ttsetattr (fd, ttp));
+}
+
+/* Set the terminal into eight-bit mode */
+int
+tteightbit ()
+{
+ TTYSTRUCT tt;
+
+ if (ttsaved == 0)
+ return -1;
+ tt = ttin;
+ return (ttfd_eightbit (0, &tt));
+}
+
+/*
+ * Change attributes in ttp so that when it is installed using
+ * ttsetattr, the terminal will be in non-canonical input mode.
+ */
+int
+tt_setnocanon (ttp)
+ TTYSTRUCT *ttp;
+{
+#if defined (TERMIOS_TTY_DRIVER) || defined (TERMIO_TTY_DRIVER)
+ ttp->c_lflag &= ~ICANON;
+#endif
+
+ return 0;
+}
+
+/* Set the tty associated with FD and TTP into non-canonical mode */
+int
+ttfd_nocanon (fd, ttp)
+ int fd;
+ TTYSTRUCT *ttp;
+{
+ if (tt_setnocanon (ttp) < 0)
+ return -1;
+ return (ttsetattr (fd, ttp));
+}
+
+/* Set the terminal into non-canonical mode */
+int
+ttnocanon ()
+{
+ TTYSTRUCT tt;
+
+ if (ttsaved == 0)
+ return -1;
+ tt = ttin;
+ return (ttfd_nocanon (0, &tt));
+}
+
+/*
+ * Change attributes in ttp so that when it is installed using
+ * ttsetattr, the terminal will be in cbreak, no-echo mode.
+ */
+int
+tt_setcbreak(ttp)
+ TTYSTRUCT *ttp;
+{
+ if (tt_setonechar (ttp) < 0)
+ return -1;
+ return (tt_setnoecho (ttp));
+}
+
+/* Set the tty associated with FD and TTP into cbreak (no-echo,
+ one-character-at-a-time) mode */
+int
+ttfd_cbreak (fd, ttp)
+ int fd;
+ TTYSTRUCT *ttp;
+{
+ if (tt_setcbreak (ttp) < 0)
+ return -1;
+ return (ttsetattr (fd, ttp));
+}
+
+/* Set the terminal into cbreak (no-echo, one-character-at-a-time) mode */
+int
+ttcbreak ()
+{
+ TTYSTRUCT tt;
+
+ if (ttsaved == 0)
+ return -1;
+ tt = ttin;
+ return (ttfd_cbreak (0, &tt));
+}
diff --git a/lib/sh/snprintf.c b/lib/sh/snprintf.c
new file mode 100644
index 0000000..d681b16
--- /dev/null
+++ b/lib/sh/snprintf.c
@@ -0,0 +1,2173 @@
+/* snprintf - formatted output to strings, with bounds checking and allocation */
+
+/*
+ build a test version with
+ gcc -g -DDRIVER -I../.. -I../../include -o test-snprintf snprintf.c fmtu*long.o
+*/
+
+/*
+ Unix snprintf implementation.
+ derived from inetutils/libinetutils/snprintf.c Version 1.1
+
+ Copyright (C) 2001,2006 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+
+ Revision History:
+
+ 1.1:
+ * added changes from Miles Bader
+ * corrected a bug with %f
+ * added support for %#g
+ * added more comments :-)
+ 1.0:
+ * supporting must ANSI syntaxic_sugars
+ 0.0:
+ * support %s %c %d
+
+ THANKS(for the patches and ideas):
+ Miles Bader
+ Cyrille Rustom
+ Jacek Slabocewiz
+ Mike Parker(mouse)
+
+*/
+
+/*
+ * Currently doesn't handle (and bash/readline doesn't use):
+ * * *M$ width, precision specifications
+ * * %N$ numbered argument conversions
+ * * inf, nan floating values imperfect (if isinf(), isnan() not in libc)
+ * * support for `F' is imperfect with ldfallback(), since underlying
+ * printf may not handle it -- should ideally have another autoconf test
+ */
+
+#define FLOATING_POINT
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+/* GCC 4.2 on Snow Leopard doesn't like the snprintf prototype */
+#if defined(DEBUG) && !defined (MACOSX)
+# undef HAVE_SNPRINTF
+# undef HAVE_ASPRINTF
+
+# define HAVE_SNPRINTF 0
+# define HAVE_ASPRINTF 0
+#endif
+
+#if defined(DRIVER) && !defined(HAVE_CONFIG_H)
+#define HAVE_LONG_LONG
+#define HAVE_LONG_DOUBLE
+#ifdef __linux__
+#define HAVE_PRINTF_A_FORMAT
+#endif
+#define HAVE_ISINF_IN_LIBC
+#define HAVE_ISNAN_IN_LIBC
+#define PREFER_STDARG
+#define HAVE_STRINGIZE
+#define HAVE_LIMITS_H
+#define HAVE_STDDEF_H
+#define HAVE_LOCALE_H
+#define intmax_t long
+#endif
+
+#if !HAVE_SNPRINTF || !HAVE_ASPRINTF
+
+#include <bashtypes.h>
+
+#if defined(PREFER_STDARG)
+# include <stdarg.h>
+#else
+# include <varargs.h>
+#endif
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
+#include <bashansi.h>
+#ifdef HAVE_STDDEF_H
+# include <stddef.h>
+#endif
+#include <chartypes.h>
+
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#ifdef FLOATING_POINT
+# include <float.h> /* for manifest constants */
+# include <stdio.h> /* for sprintf */
+#endif
+
+#include <typemax.h>
+
+#ifdef HAVE_LOCALE_H
+# include <locale.h>
+#endif
+
+#include "stdc.h"
+#include <shmbutil.h>
+
+#ifndef DRIVER
+# include "shell.h"
+#else
+# define FL_PREFIX 0x01 /* add 0x, 0X, or 0 prefix as appropriate */
+# define FL_ADDBASE 0x02 /* add base# prefix to converted value */
+# define FL_HEXUPPER 0x04 /* use uppercase when converting to hex */
+# define FL_UNSIGNED 0x08 /* don't add any sign */
+extern char *fmtulong __P((unsigned long int, int, char *, size_t, int));
+extern char *fmtullong __P((unsigned long long int, int, char *, size_t, int));
+#endif
+
+#ifndef FREE
+# define FREE(x) if (x) free (x)
+#endif
+
+/* Bound on length of the string representing an integer value of type T.
+ Subtract one for the sign bit if T is signed;
+ 302 / 1000 is log10 (2) rounded up;
+ add one for integer division truncation;
+ add one more for a minus sign if t is signed. */
+#define INT_STRLEN_BOUND(t) \
+ ((sizeof (t) * CHAR_BIT - TYPE_SIGNED (t)) * 302 / 1000 \
+ + 1 + TYPE_SIGNED (t))
+
+/* conversion flags */
+#define PF_ALTFORM 0x00001 /* # */
+#define PF_HEXPREFIX 0x00002 /* 0[Xx] */
+#define PF_LADJUST 0x00004 /* - */
+#define PF_ZEROPAD 0x00008 /* 0 */
+#define PF_PLUS 0x00010 /* + */
+#define PF_SPACE 0x00020 /* ' ' */
+#define PF_THOUSANDS 0x00040 /* ' */
+
+#define PF_DOT 0x00080 /* `.precision' */
+#define PF_STAR_P 0x00100 /* `*' after precision */
+#define PF_STAR_W 0x00200 /* `*' before or without precision */
+
+/* length modifiers */
+#define PF_SIGNEDCHAR 0x00400 /* hh */
+#define PF_SHORTINT 0x00800 /* h */
+#define PF_LONGINT 0x01000 /* l */
+#define PF_LONGLONG 0x02000 /* ll */
+#define PF_LONGDBL 0x04000 /* L */
+#define PF_INTMAX_T 0x08000 /* j */
+#define PF_SIZE_T 0x10000 /* z */
+#define PF_PTRDIFF_T 0x20000 /* t */
+
+#define PF_ALLOCBUF 0x40000 /* for asprintf, vasprintf */
+
+#define PFM_SN 0x01 /* snprintf, vsnprintf */
+#define PFM_AS 0x02 /* asprintf, vasprintf */
+
+#define ASBUFSIZE 128
+
+#define x_digs "0123456789abcdef"
+#define X_digs "0123456789ABCDEF"
+
+static char intbuf[INT_STRLEN_BOUND(unsigned long) + 1];
+
+static int decpoint;
+static int thoussep;
+static char *grouping;
+
+/*
+ * For the FLOATING POINT FORMAT :
+ * the challenge was finding a way to
+ * manipulate the Real numbers without having
+ * to resort to mathematical function(it
+ * would require to link with -lm) and not
+ * going down to the bit pattern(not portable)
+ *
+ * so a number, a real is:
+
+ real = integral + fraction
+
+ integral = ... + a(2)*10^2 + a(1)*10^1 + a(0)*10^0
+ fraction = b(1)*10^-1 + b(2)*10^-2 + ...
+
+ where:
+ 0 <= a(i) => 9
+ 0 <= b(i) => 9
+
+ from then it was simple math
+ */
+
+/*
+ * size of the buffer for the integral part
+ * and the fraction part
+ */
+#define MAX_INT 99 + 1 /* 1 for the null */
+#define MAX_FRACT 307 + 1
+
+/*
+ * These functions use static buffers to store the results,
+ * and so are not reentrant
+ */
+#define itoa(n) fmtulong(n, 10, intbuf, sizeof(intbuf), 0);
+#define dtoa(n, p, f) numtoa(n, 10, p, f)
+
+#define SWAP_INT(a,b) {int t; t = (a); (a) = (b); (b) = t;}
+
+#define GETARG(type) (va_arg(args, type))
+
+/* Macros that do proper sign extension and handle length modifiers. Used
+ for the integer conversion specifiers. */
+#define GETSIGNED(p) \
+ (((p)->flags & PF_LONGINT) \
+ ? GETARG (long) \
+ : (((p)->flags & PF_SHORTINT) ? (long)(short)GETARG (int) \
+ : (long)GETARG (int)))
+
+#define GETUNSIGNED(p) \
+ (((p)->flags & PF_LONGINT) \
+ ? GETARG (unsigned long) \
+ : (((p)->flags & PF_SHORTINT) ? (unsigned long)(unsigned short)GETARG (int) \
+ : (unsigned long)GETARG (unsigned int)))
+
+
+#ifdef HAVE_LONG_DOUBLE
+#define GETLDOUBLE(p) GETARG (long double)
+#endif
+#define GETDOUBLE(p) GETARG (double)
+
+#define SET_SIZE_FLAGS(p, type) \
+ if (sizeof (type) > sizeof (int)) \
+ (p)->flags |= PF_LONGINT; \
+ if (sizeof (type) > sizeof (long)) \
+ (p)->flags |= PF_LONGLONG;
+
+/* this struct holds everything we need */
+struct DATA
+{
+ int length;
+ char *base; /* needed for [v]asprintf */
+ char *holder;
+ int counter;
+ const char *pf;
+
+/* FLAGS */
+ int flags;
+ int justify;
+ int width, precision;
+ char pad;
+};
+
+/* the floating point stuff */
+#ifdef FLOATING_POINT
+static double pow_10 __P((int));
+static int log_10 __P((double));
+static double integral __P((double, double *));
+static char *numtoa __P((double, int, int, char **));
+#endif
+
+static void init_data __P((struct DATA *, char *, size_t, const char *, int));
+static void init_conv_flag __P((struct DATA *));
+
+/* for the format */
+#ifdef FLOATING_POINT
+static void floating __P((struct DATA *, double));
+static void exponent __P((struct DATA *, double));
+#endif
+static void number __P((struct DATA *, unsigned long, int));
+#ifdef HAVE_LONG_LONG
+static void lnumber __P((struct DATA *, unsigned long long, int));
+#endif
+static void pointer __P((struct DATA *, unsigned long));
+static void strings __P((struct DATA *, char *));
+
+#ifdef FLOATING_POINT
+# define FALLBACK_FMTSIZE 32
+# define FALLBACK_BASE 4096
+# define LFALLBACK_BASE 5120
+# ifdef HAVE_LONG_DOUBLE
+static void ldfallback __P((struct DATA *, const char *, const char *, long double));
+# endif
+static void dfallback __P((struct DATA *, const char *, const char *, double));
+#endif
+
+static char *groupnum __P((char *));
+
+#ifndef HAVE_ISINF_IN_LIBC
+static int isinf __P((double));
+#endif
+#ifndef HAVE_ISNAN_IN_LIBC
+static int isnan __P((double));
+#endif
+
+#ifdef DRIVER
+static void memory_error_and_abort ();
+static void *xmalloc __P((size_t));
+static void *xrealloc __P((void *, size_t));
+static void xfree __P((void *));
+#else
+# include <xmalloc.h>
+#endif
+
+/* those are defines specific to snprintf to hopefully
+ * make the code clearer :-)
+ */
+#define RIGHT 1
+#define LEFT 0
+#define NOT_FOUND -1
+#define FOUND 1
+#define MAX_FIELD 15
+
+/* round off to the precision */
+#define ROUND(d, p) \
+ (d < 0.) ? \
+ d - pow_10(-(p)->precision) * 0.5 : \
+ d + pow_10(-(p)->precision) * 0.5
+
+/* set default precision */
+#define DEF_PREC(p) \
+ if ((p)->precision == NOT_FOUND) \
+ (p)->precision = 6
+
+/* put a char. increment the number of chars written even if we've exceeded
+ the vsnprintf/snprintf buffer size (for the return value) */
+#define PUT_CHAR(c, p) \
+ do \
+ { \
+ if (((p)->flags & PF_ALLOCBUF) && ((p)->counter >= (p)->length - 1)) \
+ { \
+ (p)->length += ASBUFSIZE; \
+ (p)->base = (char *)xrealloc((p)->base, (p)->length); \
+ (p)->holder = (p)->base + (p)->counter; /* in case reallocated */ \
+ } \
+ if ((p)->counter < (p)->length) \
+ *(p)->holder++ = (c); \
+ (p)->counter++; \
+ } \
+ while (0)
+
+/* Output a string. P->WIDTH has already been adjusted for padding. */
+#define PUT_STRING(string, len, p) \
+ do \
+ { \
+ PAD_RIGHT (p); \
+ while ((len)-- > 0) \
+ { \
+ PUT_CHAR (*(string), (p)); \
+ (string)++; \
+ } \
+ PAD_LEFT (p); \
+ } \
+ while (0)
+
+#define PUT_PLUS(d, p, zero) \
+ if ((d) > zero && (p)->justify == RIGHT) \
+ PUT_CHAR('+', p)
+
+#define PUT_SPACE(d, p, zero) \
+ if (((p)->flags & PF_SPACE) && (d) > zero) \
+ PUT_CHAR(' ', p)
+
+/* pad right */
+#define PAD_RIGHT(p) \
+ if ((p)->width > 0 && (p)->justify != LEFT) \
+ for (; (p)->width > 0; (p)->width--) \
+ PUT_CHAR((p)->pad, p)
+
+/* pad left */
+#define PAD_LEFT(p) \
+ if ((p)->width > 0 && (p)->justify == LEFT) \
+ for (; (p)->width > 0; (p)->width--) \
+ PUT_CHAR((p)->pad, p)
+
+/* pad with zeros from decimal precision */
+#define PAD_ZERO(p) \
+ if ((p)->precision > 0) \
+ for (; (p)->precision > 0; (p)->precision--) \
+ PUT_CHAR('0', p)
+
+/* if width and prec. in the args */
+#define STAR_ARGS(p) \
+ do { \
+ if ((p)->flags & PF_STAR_W) \
+ { \
+ (p)->width = GETARG (int); \
+ if ((p)->width < 0) \
+ { \
+ (p)->flags |= PF_LADJUST; \
+ (p)->justify = LEFT; \
+ (p)->width = -(p)->width; \
+ } \
+ } \
+ if ((p)->flags & PF_STAR_P) \
+ { \
+ (p)->precision = GETARG (int); \
+ if ((p)->precision < 0) \
+ { \
+ (p)->flags &= ~PF_STAR_P; \
+ (p)->precision = NOT_FOUND; \
+ } \
+ } \
+ } while (0)
+
+#if defined (HAVE_LOCALE_H) && defined (HAVE_LOCALECONV)
+# define GETLOCALEDATA(d, t, g) \
+ do \
+ { \
+ struct lconv *lv; \
+ if ((d) == 0) { \
+ (d) = '.'; (t) = -1; (g) = 0; /* defaults */ \
+ lv = localeconv(); \
+ if (lv) \
+ { \
+ if (lv->decimal_point && lv->decimal_point[0]) \
+ (d) = lv->decimal_point[0]; \
+ if (lv->thousands_sep && lv->thousands_sep[0]) \
+ (t) = lv->thousands_sep[0]; \
+ (g) = lv->grouping ? lv->grouping : ""; \
+ if (*(g) == '\0' || *(g) == CHAR_MAX || (t) == -1) (g) = 0; \
+ } \
+ } \
+ } \
+ while (0);
+#else
+# define GETLOCALEDATA(d, t, g) \
+ ( (d) = '.', (t) = ',', g = "\003" )
+#endif
+
+#ifdef FLOATING_POINT
+/*
+ * Find the nth power of 10
+ */
+static double
+pow_10(n)
+ int n;
+{
+ double P;
+
+ /* handle common cases with fast switch statement. */
+ switch (n)
+ {
+ case -3: return .001;
+ case -2: return .01;
+ case -1: return .1;
+ case 0: return 1.;
+ case 1: return 10.;
+ case 2: return 100.;
+ case 3: return 1000.;
+ }
+
+ if (n < 0)
+ {
+ P = .0001;
+ for (n += 4; n < 0; n++)
+ P /= 10.;
+ }
+ else
+ {
+ P = 10000.;
+ for (n -= 4; n > 0; n--)
+ P *= 10.;
+ }
+
+ return P;
+}
+
+/*
+ * Find the integral part of the log in base 10
+ * Note: this not a real log10()
+ I just need and approximation(integerpart) of x in:
+ 10^x ~= r
+ * log_10(200) = 2;
+ * log_10(250) = 2;
+ *
+ * NOTE: do not call this with r == 0 -- an infinite loop results.
+ */
+static int
+log_10(r)
+ double r;
+{
+ int i = 0;
+ double result = 1.;
+
+ if (r < 0.)
+ r = -r;
+
+ if (r < 1.)
+ {
+ while (result >= r)
+ {
+ result /= 10.;
+ i++;
+ }
+ return (-i);
+ }
+ else
+ {
+ while (result <= r)
+ {
+ result *= 10.;
+ i++;
+ }
+ return (i - 1);
+ }
+}
+
+/*
+ * This function return the fraction part of a double
+ * and set in ip the integral part.
+ * In many ways it resemble the modf() found on most Un*x
+ */
+static double
+integral(real, ip)
+ double real;
+ double *ip;
+{
+ int j;
+ double i, s, p;
+ double real_integral = 0.;
+
+ /* take care of the obvious */
+ /* equal to zero ? */
+ if (real == 0.)
+ {
+ *ip = 0.;
+ return (0.);
+ }
+
+ /* negative number ? */
+ if (real < 0.)
+ real = -real;
+
+ /* a fraction ? */
+ if ( real < 1.)
+ {
+ *ip = 0.;
+ return real;
+ }
+
+ /* the real work :-) */
+ for (j = log_10(real); j >= 0; j--)
+ {
+ p = pow_10(j);
+ s = (real - real_integral)/p;
+ i = 0.;
+ while (i + 1. <= s)
+ i++;
+ real_integral += i*p;
+ }
+ *ip = real_integral;
+ return (real - real_integral);
+}
+
+#define PRECISION 1.e-6
+/*
+ * return an ascii representation of the integral part of the number
+ * and set fract to be an ascii representation of the fraction part
+ * the container for the fraction and the integral part or staticly
+ * declare with fix size
+ */
+static char *
+numtoa(number, base, precision, fract)
+ double number;
+ int base, precision;
+ char **fract;
+{
+ register int i, j;
+ double ip, fp; /* integer and fraction part */
+ double fraction;
+ int digits = MAX_INT - 1;
+ static char integral_part[MAX_INT];
+ static char fraction_part[MAX_FRACT];
+ double sign;
+ int ch;
+
+ /* taking care of the obvious case: 0.0 */
+ if (number == 0.)
+ {
+ integral_part[0] = '0';
+ integral_part[1] = '\0';
+ /* The fractional part has to take the precision into account */
+ for (ch = 0; ch < precision-1; ch++)
+ fraction_part[ch] = '0';
+ fraction_part[ch] = '0';
+ fraction_part[ch+1] = '\0';
+ if (fract)
+ *fract = fraction_part;
+ return integral_part;
+ }
+
+ /* for negative numbers */
+ if ((sign = number) < 0.)
+ {
+ number = -number;
+ digits--; /* sign consume one digit */
+ }
+
+ fraction = integral(number, &ip);
+ number = ip;
+
+ /* do the integral part */
+ if (ip == 0.)
+ {
+ integral_part[0] = '0';
+ i = 1;
+ }
+ else
+ {
+ for ( i = 0; i < digits && number != 0.; ++i)
+ {
+ number /= base;
+ fp = integral(number, &ip);
+ ch = (int)((fp + PRECISION)*base); /* force to round */
+ integral_part[i] = (ch <= 9) ? ch + '0' : ch + 'a' - 10;
+ if (! ISXDIGIT((unsigned char)integral_part[i]))
+ break; /* bail out overflow !! */
+ number = ip;
+ }
+ }
+
+ /* Oh No !! out of bound, ho well fill it up ! */
+ if (number != 0.)
+ for (i = 0; i < digits; ++i)
+ integral_part[i] = '9';
+
+ /* put the sign ? */
+ if (sign < 0.)
+ integral_part[i++] = '-';
+
+ integral_part[i] = '\0';
+
+ /* reverse every thing */
+ for ( i--, j = 0; j < i; j++, i--)
+ SWAP_INT(integral_part[i], integral_part[j]);
+
+ /* the fractional part */
+ for (i=0, fp=fraction; precision > 0 && i < MAX_FRACT ; i++, precision--)
+ {
+ fraction_part[i] = (int)((fp + PRECISION)*10. + '0');
+ if (! DIGIT(fraction_part[i])) /* underflow ? */
+ break;
+ fp = (fp*10.0) - (double)(long)((fp + PRECISION)*10.);
+ }
+ fraction_part[i] = '\0';
+
+ if (fract != (char **)0)
+ *fract = fraction_part;
+
+ return integral_part;
+}
+#endif
+
+/* for %d and friends, it puts in holder
+ * the representation with the right padding
+ */
+static void
+number(p, d, base)
+ struct DATA *p;
+ unsigned long d;
+ int base;
+{
+ char *tmp, *t;
+ long sd;
+ int flags;
+
+ /* An explicit precision turns off the zero-padding flag. */
+ if ((p->flags & PF_ZEROPAD) && p->precision >= 0 && (p->flags & PF_DOT))
+ p->flags &= ~PF_ZEROPAD;
+
+ sd = d; /* signed for ' ' padding in base 10 */
+ flags = 0;
+ flags = (*p->pf == 'x' || *p->pf == 'X' || *p->pf == 'o' || *p->pf == 'u' || *p->pf == 'U') ? FL_UNSIGNED : 0;
+ if (*p->pf == 'X')
+ flags |= FL_HEXUPPER;
+
+ tmp = fmtulong (d, base, intbuf, sizeof(intbuf), flags);
+ t = 0;
+ if ((p->flags & PF_THOUSANDS))
+ {
+ GETLOCALEDATA(decpoint, thoussep, grouping);
+ if (grouping && (t = groupnum (tmp)))
+ tmp = t;
+ }
+
+ p->width -= strlen(tmp);
+ PAD_RIGHT(p);
+
+ if ((p->flags & PF_DOT) && p->precision > 0)
+ {
+ p->precision -= strlen(tmp);
+ PAD_ZERO(p);
+ }
+
+ switch (base)
+ {
+ case 10:
+ PUT_PLUS(sd, p, 0);
+ PUT_SPACE(sd, p, 0);
+ break;
+ case 8:
+ if (p->flags & PF_ALTFORM)
+ PUT_CHAR('0', p);
+ break;
+ case 16:
+ if (p->flags & PF_ALTFORM)
+ {
+ PUT_CHAR('0', p);
+ PUT_CHAR(*p->pf, p);
+ }
+ break;
+ }
+
+ while (*tmp)
+ {
+ PUT_CHAR(*tmp, p);
+ tmp++;
+ }
+
+ PAD_LEFT(p);
+ FREE (t);
+}
+
+#ifdef HAVE_LONG_LONG
+/*
+ * identical to number() but works for `long long'
+ */
+static void
+lnumber(p, d, base)
+ struct DATA *p;
+ unsigned long long d;
+ int base;
+{
+ char *tmp, *t;
+ long long sd;
+ int flags;
+
+ /* An explicit precision turns off the zero-padding flag. */
+ if ((p->flags & PF_ZEROPAD) && p->precision >= 0 && (p->flags & PF_DOT))
+ p->flags &= ~PF_ZEROPAD;
+
+ sd = d; /* signed for ' ' padding in base 10 */
+ flags = (*p->pf == 'x' || *p->pf == 'X' || *p->pf == 'o' || *p->pf == 'u' || *p->pf == 'U') ? FL_UNSIGNED : 0;
+ if (*p->pf == 'X')
+ flags |= FL_HEXUPPER;
+
+ tmp = fmtullong (d, base, intbuf, sizeof(intbuf), flags);
+ t = 0;
+ if ((p->flags & PF_THOUSANDS))
+ {
+ GETLOCALEDATA(decpoint, thoussep, grouping);
+ if (grouping && (t = groupnum (tmp)))
+ tmp = t;
+ }
+
+ p->width -= strlen(tmp);
+ PAD_RIGHT(p);
+
+ if ((p->flags & PF_DOT) && p->precision > 0)
+ {
+ p->precision -= strlen(tmp);
+ PAD_ZERO(p);
+ }
+
+ switch (base)
+ {
+ case 10:
+ PUT_PLUS(sd, p, 0);
+ PUT_SPACE(sd, p, 0);
+ break;
+ case 8:
+ if (p->flags & PF_ALTFORM)
+ PUT_CHAR('0', p);
+ break;
+ case 16:
+ if (p->flags & PF_ALTFORM)
+ {
+ PUT_CHAR('0', p);
+ PUT_CHAR(*p->pf, p);
+ }
+ break;
+ }
+
+ while (*tmp)
+ {
+ PUT_CHAR(*tmp, p);
+ tmp++;
+ }
+
+ PAD_LEFT(p);
+ FREE (t);
+}
+#endif
+
+static void
+pointer(p, d)
+ struct DATA *p;
+ unsigned long d;
+{
+ char *tmp;
+
+ tmp = fmtulong(d, 16, intbuf, sizeof(intbuf), 0);
+ p->width -= strlen(tmp);
+ PAD_RIGHT(p);
+
+ /* prefix '0x' for pointers */
+ PUT_CHAR('0', p);
+ PUT_CHAR('x', p);
+
+ while (*tmp)
+ {
+ PUT_CHAR(*tmp, p);
+ tmp++;
+ }
+
+ PAD_LEFT(p);
+}
+
+/* %s strings */
+static void
+strings(p, tmp)
+ struct DATA *p;
+ char *tmp;
+{
+ size_t len;
+
+ len = strlen(tmp);
+ if (p->precision != NOT_FOUND) /* the smallest number */
+ len = (len < p->precision ? len : p->precision);
+ p->width -= len;
+
+ PUT_STRING (tmp, len, p);
+}
+
+#if HANDLE_MULTIBYTE
+/* %ls wide-character strings */
+static void
+wstrings(p, tmp)
+ struct DATA *p;
+ wchar_t *tmp;
+{
+ size_t len;
+ mbstate_t mbs;
+ char *os;
+ const wchar_t *ws;
+
+ memset (&mbs, '\0', sizeof (mbstate_t));
+ ws = (const wchar_t *)tmp;
+
+ os = (char *)NULL;
+ if (p->precision != NOT_FOUND)
+ {
+ os = (char *)xmalloc (p->precision + 1);
+ len = wcsrtombs (os, &ws, p->precision, &mbs);
+ }
+ else
+ {
+ len = wcsrtombs (NULL, &ws, 0, &mbs);
+ if (len != (size_t)-1)
+ {
+ memset (&mbs, '\0', sizeof (mbstate_t));
+ os = (char *)xmalloc (len + 1);
+ (void)wcsrtombs (os, &ws, len + 1, &mbs);
+ }
+ }
+ if (len == (size_t)-1)
+ {
+ /* invalid multibyte sequence; bail now. */
+ FREE (os);
+ return;
+ }
+
+ p->width -= len;
+ PUT_STRING (os, len, p);
+ free (os);
+}
+
+static void
+wchars (p, wc)
+ struct DATA *p;
+ wint_t wc;
+{
+ char *lbuf, *l;
+ mbstate_t mbs;
+ size_t len;
+
+ lbuf = (char *)malloc (MB_CUR_MAX+1);
+ if (lbuf == 0)
+ return;
+ memset (&mbs, '\0', sizeof (mbstate_t));
+ len = wcrtomb (lbuf, wc, &mbs);
+ if (len == (size_t)-1)
+ /* conversion failed; bail now. */
+ return;
+ p->width -= len;
+ l = lbuf;
+ PUT_STRING (l, len, p);
+ free (lbuf);
+}
+#endif /* HANDLE_MULTIBYTE */
+
+#ifdef FLOATING_POINT
+
+#ifndef HAVE_ISINF_IN_LIBC
+/* Half-assed versions, since we don't want to link with libm. */
+static int
+isinf(d)
+ double d;
+{
+#ifdef DBL_MAX
+ if (d < DBL_MIN)
+ return -1;
+ else if (d > DBL_MAX)
+ return 1;
+ else
+#endif
+ return 0;
+}
+#endif
+
+#ifndef HAVE_ISNAN_IN_LIBC
+static int
+isnan(d)
+ double d;
+{
+ return 0;
+}
+#endif
+
+/* Check for [+-]infinity and NaN. If MODE == 1, we check for Infinity, else
+ (mode == 2) we check for NaN. This does the necessary printing. Returns
+ 1 if Inf or Nan, 0 if not. */
+static int
+chkinfnan(p, d, mode)
+ struct DATA *p;
+ double d;
+ int mode; /* == 1 for inf, == 2 for nan */
+{
+ int i;
+ char *tmp;
+ char *big, *small;
+
+ i = (mode == 1) ? isinf(d) : isnan(d);
+ if (i == 0)
+ return 0;
+ big = (mode == 1) ? "INF" : "NAN";
+ small = (mode == 1) ? "inf" : "nan";
+
+ tmp = (*p->pf == 'F' || *p->pf == 'G' || *p->pf == 'E') ? big : small;
+
+ if (i < 0)
+ PUT_CHAR('-', p);
+
+ while (*tmp)
+ {
+ PUT_CHAR (*tmp, p);
+ tmp++;
+ }
+
+ return 1;
+}
+
+/* %f %F %g %G floating point representation */
+static void
+floating(p, d)
+ struct DATA *p;
+ double d;
+{
+ char *tmp, *tmp2, *t;
+ int i;
+
+ if (d != 0 && (chkinfnan(p, d, 1) || chkinfnan(p, d, 2)))
+ return; /* already printed nan or inf */
+
+ GETLOCALEDATA(decpoint, thoussep, grouping);
+ DEF_PREC(p);
+ d = ROUND(d, p);
+ tmp = dtoa(d, p->precision, &tmp2);
+ t = 0;
+ if ((p->flags & PF_THOUSANDS) && grouping && (t = groupnum (tmp)))
+ tmp = t;
+
+ if ((*p->pf == 'g' || *p->pf == 'G') && (p->flags & PF_ALTFORM) == 0)
+ {
+ /* smash the trailing zeros unless altform */
+ for (i = strlen(tmp2) - 1; i >= 0 && tmp2[i] == '0'; i--)
+ tmp2[i] = '\0';
+ if (tmp2[0] == '\0')
+ p->precision = 0;
+ }
+
+ /* calculate the padding. 1 for the dot */
+ p->width = p->width -
+ ((d > 0. && p->justify == RIGHT) ? 1:0) -
+ ((p->flags & PF_SPACE) ? 1:0) -
+ strlen(tmp) - p->precision -
+ ((p->precision != 0 || (p->flags & PF_ALTFORM)) ? 1 : 0); /* radix char */
+ PAD_RIGHT(p);
+ PUT_PLUS(d, p, 0.);
+ PUT_SPACE(d, p, 0.);
+
+ while (*tmp)
+ {
+ PUT_CHAR(*tmp, p); /* the integral */
+ tmp++;
+ }
+ FREE (t);
+
+ if (p->precision != 0 || (p->flags & PF_ALTFORM))
+ PUT_CHAR(decpoint, p); /* put the '.' */
+
+ for (; *tmp2; tmp2++)
+ PUT_CHAR(*tmp2, p); /* the fraction */
+
+ PAD_LEFT(p);
+}
+
+/* %e %E %g %G exponent representation */
+static void
+exponent(p, d)
+ struct DATA *p;
+ double d;
+{
+ char *tmp, *tmp2;
+ int j, i;
+
+ if (d != 0 && (chkinfnan(p, d, 1) || chkinfnan(p, d, 2)))
+ return; /* already printed nan or inf */
+
+ GETLOCALEDATA(decpoint, thoussep, grouping);
+ DEF_PREC(p);
+ if (d == 0.)
+ j = 0;
+ else
+ {
+ j = log_10(d);
+ d = d / pow_10(j); /* get the Mantissa */
+ d = ROUND(d, p);
+ }
+ tmp = dtoa(d, p->precision, &tmp2);
+
+ /* 1 for unit, 1 for the '.', 1 for 'e|E',
+ * 1 for '+|-', 2 for 'exp' */
+ /* calculate how much padding need */
+ p->width = p->width -
+ ((d > 0. && p->justify == RIGHT) ? 1:0) -
+ ((p->flags & PF_SPACE) ? 1:0) - p->precision - 6;
+
+ PAD_RIGHT(p);
+ PUT_PLUS(d, p, 0.);
+ PUT_SPACE(d, p, 0.);
+
+ while (*tmp)
+ {
+ PUT_CHAR(*tmp, p);
+ tmp++;
+ }
+
+ if (p->precision != 0 || (p->flags & PF_ALTFORM))
+ PUT_CHAR(decpoint, p); /* the '.' */
+
+ if ((*p->pf == 'g' || *p->pf == 'G') && (p->flags & PF_ALTFORM) == 0)
+ /* smash the trailing zeros unless altform */
+ for (i = strlen(tmp2) - 1; i >= 0 && tmp2[i] == '0'; i--)
+ tmp2[i] = '\0';
+
+ for (; *tmp2; tmp2++)
+ PUT_CHAR(*tmp2, p); /* the fraction */
+
+ /* the exponent put the 'e|E' */
+ if (*p->pf == 'g' || *p->pf == 'e')
+ PUT_CHAR('e', p);
+ else
+ PUT_CHAR('E', p);
+
+ /* the sign of the exp */
+ if (j >= 0)
+ PUT_CHAR('+', p);
+ else
+ {
+ PUT_CHAR('-', p);
+ j = -j;
+ }
+
+ tmp = itoa(j);
+ /* pad out to at least two spaces. pad with `0' if the exponent is a
+ single digit. */
+ if (j <= 9)
+ PUT_CHAR('0', p);
+
+ /* the exponent */
+ while (*tmp)
+ {
+ PUT_CHAR(*tmp, p);
+ tmp++;
+ }
+
+ PAD_LEFT(p);
+}
+#endif
+
+/* Return a new string with the digits in S grouped according to the locale's
+ grouping info and thousands separator. If no grouping should be performed,
+ this returns NULL; the caller needs to check for it. */
+static char *
+groupnum (s)
+ char *s;
+{
+ char *se, *ret, *re, *g;
+ int len, slen;
+
+ if (grouping == 0 || *grouping <= 0 || *grouping == CHAR_MAX)
+ return ((char *)NULL);
+
+ /* find min grouping to size returned string */
+ for (len = *grouping, g = grouping; *g; g++)
+ if (*g > 0 && *g < len)
+ len = *g;
+
+ slen = strlen (s);
+ len = slen / len + 1;
+ ret = (char *)xmalloc (slen + len + 1);
+ re = ret + slen + len;
+ *re = '\0';
+
+ g = grouping;
+ se = s + slen;
+ len = *g;
+
+ while (se > s)
+ {
+ *--re = *--se;
+
+ /* handle `-' inserted by numtoa() and the fmtu* family here. */
+ if (se > s && se[-1] == '-')
+ continue;
+
+ /* begin new group. */
+ if (--len == 0 && se > s)
+ {
+ *--re = thoussep;
+ len = *++g; /* was g++, but that uses first char twice (glibc bug, too) */
+ if (*g == '\0')
+ len = *--g; /* use previous grouping */
+ else if (*g == CHAR_MAX)
+ {
+ do
+ *--re = *--se;
+ while (se > s);
+ break;
+ }
+ }
+ }
+
+ if (re > ret)
+#ifdef HAVE_MEMMOVE
+ memmove (ret, re, strlen (re) + 1);
+#else
+ strcpy (ret, re);
+#endif
+
+ return ret;
+}
+
+/* initialize the conversion specifiers */
+static void
+init_conv_flag (p)
+ struct DATA *p;
+{
+ p->flags &= PF_ALLOCBUF; /* preserve PF_ALLOCBUF flag */
+ p->precision = p->width = NOT_FOUND;
+ p->justify = NOT_FOUND;
+ p->pad = ' ';
+}
+
+static void
+init_data (p, string, length, format, mode)
+ struct DATA *p;
+ char *string;
+ size_t length;
+ const char *format;
+ int mode;
+{
+ p->length = length - 1; /* leave room for '\0' */
+ p->holder = p->base = string;
+ p->pf = format;
+ p->counter = 0;
+ p->flags = (mode == PFM_AS) ? PF_ALLOCBUF : 0;
+}
+
+static int
+#if defined (__STDC__)
+vsnprintf_internal(struct DATA *data, char *string, size_t length, const char *format, va_list args)
+#else
+vsnprintf_internal(data, string, length, format, args)
+ struct DATA *data;
+ char *string;
+ size_t length;
+ const char *format;
+ va_list args;
+#endif
+{
+ double d; /* temporary holder */
+#ifdef HAVE_LONG_DOUBLE
+ long double ld; /* for later */
+#endif
+ unsigned long ul;
+#ifdef HAVE_LONG_LONG
+ unsigned long long ull;
+#endif
+ int state, i, c, n;
+ char *s;
+#if HANDLE_MULTIBYTE
+ wchar_t *ws;
+ wint_t wc;
+#endif
+ const char *convstart;
+ int negprec;
+
+ /* Sanity check, the string length must be >= 0. C99 actually says that
+ LENGTH can be zero here, in the case of snprintf/vsnprintf (it's never
+ 0 in the case of asprintf/vasprintf), and the return value is the number
+ of characters that would have been written. */
+ if (length < 0)
+ return -1;
+
+ if (format == 0)
+ return 0;
+
+ /* Reset these for each call because the locale might have changed. */
+ decpoint = thoussep = 0;
+ grouping = 0;
+
+ negprec = 0;
+ for (; c = *(data->pf); data->pf++)
+ {
+ if (c != '%')
+ {
+ PUT_CHAR (c, data);
+ continue;
+ }
+
+ convstart = data->pf;
+ init_conv_flag (data); /* initialise format flags */
+
+ state = 1;
+ for (state = 1; state && *data->pf; )
+ {
+ c = *(++data->pf);
+ /* fmtend = data->pf */
+#if defined (FLOATING_POINT) && defined (HAVE_LONG_DOUBLE)
+ if (data->flags & PF_LONGDBL)
+ {
+ switch (c)
+ {
+ case 'f': case 'F':
+ case 'e': case 'E':
+ case 'g': case 'G':
+# ifdef HAVE_PRINTF_A_FORMAT
+ case 'a': case 'A':
+# endif
+ STAR_ARGS (data);
+ ld = GETLDOUBLE (data);
+ ldfallback (data, convstart, data->pf, ld);
+ goto conv_break;
+ }
+ }
+#endif /* FLOATING_POINT && HAVE_LONG_DOUBLE */
+
+ switch (c)
+ {
+ /* Parse format flags */
+ case '\0': /* a NULL here ? ? bail out */
+ *data->holder = '\0';
+ return data->counter;
+ break;
+ case '#':
+ data->flags |= PF_ALTFORM;
+ continue;
+ case '0':
+ data->flags |= PF_ZEROPAD;
+ data->pad = '0';
+ continue;
+ case '*':
+ if (data->flags & PF_DOT)
+ data->flags |= PF_STAR_P;
+ else
+ data->flags |= PF_STAR_W;
+ continue;
+ case '-':
+ if ((data->flags & PF_DOT) == 0)
+ {
+ data->flags |= PF_LADJUST;
+ data->justify = LEFT;
+ }
+ else
+ negprec = 1;
+ continue;
+ case ' ':
+ if ((data->flags & PF_PLUS) == 0)
+ data->flags |= PF_SPACE;
+ continue;
+ case '+':
+ if ((data->flags & PF_DOT) == 0)
+ {
+ data->flags |= PF_PLUS;
+ data->justify = RIGHT;
+ }
+ continue;
+ case '\'':
+ data->flags |= PF_THOUSANDS;
+ continue;
+
+ case '1': case '2': case '3':
+ case '4': case '5': case '6':
+ case '7': case '8': case '9':
+ n = 0;
+ do
+ {
+ n = n * 10 + TODIGIT(c);
+ c = *(++data->pf);
+ }
+ while (DIGIT(c));
+ data->pf--; /* went too far */
+ if (n < 0)
+ n = 0;
+ if (data->flags & PF_DOT)
+ data->precision = negprec ? NOT_FOUND : n;
+ else
+ data->width = n;
+ continue;
+
+ /* optional precision */
+ case '.':
+ data->flags |= PF_DOT;
+ data->precision = 0;
+ continue;
+
+ /* length modifiers */
+ case 'h':
+ data->flags |= (data->flags & PF_SHORTINT) ? PF_SIGNEDCHAR : PF_SHORTINT;
+ continue;
+ case 'l':
+ data->flags |= (data->flags & PF_LONGINT) ? PF_LONGLONG : PF_LONGINT;
+ continue;
+ case 'L':
+ data->flags |= PF_LONGDBL;
+ continue;
+ case 'q':
+ data->flags |= PF_LONGLONG;
+ continue;
+ case 'j':
+ data->flags |= PF_INTMAX_T;
+ SET_SIZE_FLAGS(data, intmax_t);
+ continue;
+ case 'z':
+ data->flags |= PF_SIZE_T;
+ SET_SIZE_FLAGS(data, size_t);
+ continue;
+ case 't':
+ data->flags |= PF_PTRDIFF_T;
+ SET_SIZE_FLAGS(data, ptrdiff_t);
+ continue;
+
+ /* Conversion specifiers */
+#ifdef FLOATING_POINT
+ case 'f': /* float, double */
+ case 'F':
+ STAR_ARGS(data);
+ d = GETDOUBLE(data);
+ floating(data, d);
+conv_break:
+ state = 0;
+ break;
+ case 'g':
+ case 'G':
+ STAR_ARGS(data);
+ DEF_PREC(data);
+ d = GETDOUBLE(data);
+ i = (d != 0.) ? log_10(d) : -1;
+ /*
+ * for '%g|%G' ANSI: use f if exponent
+ * is in the range or [-4,p] exclusively
+ * else use %e|%E
+ */
+ if (-4 < i && i < data->precision)
+ {
+ /* reset precision */
+ data->precision -= i + 1;
+ floating(data, d);
+ }
+ else
+ {
+ /* reduce precision by 1 because of leading digit before
+ decimal point in e format. */
+ data->precision--;
+ exponent(data, d);
+ }
+ state = 0;
+ break;
+ case 'e':
+ case 'E': /* Exponent double */
+ STAR_ARGS(data);
+ d = GETDOUBLE(data);
+ exponent(data, d);
+ state = 0;
+ break;
+# ifdef HAVE_PRINTF_A_FORMAT
+ case 'a':
+ case 'A':
+ STAR_ARGS(data);
+ d = GETDOUBLE(data);
+ dfallback(data, convstart, data->pf, d);
+ state = 0;
+ break;
+# endif /* HAVE_PRINTF_A_FORMAT */
+#endif /* FLOATING_POINT */
+ case 'U':
+ data->flags |= PF_LONGINT;
+ /* FALLTHROUGH */
+ case 'u':
+ STAR_ARGS(data);
+#ifdef HAVE_LONG_LONG
+ if (data->flags & PF_LONGLONG)
+ {
+ ull = GETARG (unsigned long long);
+ lnumber(data, ull, 10);
+ }
+ else
+#endif
+ {
+ ul = GETUNSIGNED(data);
+ number(data, ul, 10);
+ }
+ state = 0;
+ break;
+ case 'D':
+ data->flags |= PF_LONGINT;
+ /* FALLTHROUGH */
+ case 'd': /* decimal */
+ case 'i':
+ STAR_ARGS(data);
+#ifdef HAVE_LONG_LONG
+ if (data->flags & PF_LONGLONG)
+ {
+ ull = GETARG (long long);
+ lnumber(data, ull, 10);
+ }
+ else
+#endif
+ {
+ ul = GETSIGNED(data);
+ number(data, ul, 10);
+ }
+ state = 0;
+ break;
+ case 'o': /* octal */
+ STAR_ARGS(data);
+#ifdef HAVE_LONG_LONG
+ if (data->flags & PF_LONGLONG)
+ {
+ ull = GETARG (unsigned long long);
+ lnumber(data, ull, 8);
+ }
+ else
+#endif
+ {
+ ul = GETUNSIGNED(data);
+ number(data, ul, 8);
+ }
+ state = 0;
+ break;
+ case 'x':
+ case 'X': /* hexadecimal */
+ STAR_ARGS(data);
+#ifdef HAVE_LONG_LONG
+ if (data->flags & PF_LONGLONG)
+ {
+ ull = GETARG (unsigned long long);
+ lnumber(data, ull, 16);
+ }
+ else
+#endif
+ {
+ ul = GETUNSIGNED(data);
+ number(data, ul, 16);
+ }
+ state = 0;
+ break;
+ case 'p':
+ STAR_ARGS(data);
+ ul = (unsigned long)GETARG (void *);
+ pointer(data, ul);
+ state = 0;
+ break;
+#if HANDLE_MULTIBYTE
+ case 'C':
+ data->flags |= PF_LONGINT;
+ /* FALLTHROUGH */
+#endif
+ case 'c': /* character */
+ STAR_ARGS(data);
+#if HANDLE_MULTIBYTE
+ if (data->flags & PF_LONGINT)
+ {
+ wc = GETARG (wint_t);
+ wchars (data, wc);
+ }
+ else
+#endif
+ {
+ ul = GETARG (int);
+ PUT_CHAR(ul, data);
+ }
+ state = 0;
+ break;
+#if HANDLE_MULTIBYTE
+ case 'S':
+ data->flags |= PF_LONGINT;
+ /* FALLTHROUGH */
+#endif
+ case 's': /* string */
+ STAR_ARGS(data);
+#if HANDLE_MULTIBYTE
+ if (data->flags & PF_LONGINT)
+ {
+ ws = GETARG (wchar_t *);
+ wstrings (data, ws);
+ }
+ else
+#endif
+ {
+ s = GETARG (char *);
+ strings(data, s);
+ }
+ state = 0;
+ break;
+ case 'n':
+#ifdef HAVE_LONG_LONG
+ if (data->flags & PF_LONGLONG)
+ *(GETARG (long long *)) = data->counter;
+ else
+#endif
+ if (data->flags & PF_LONGINT)
+ *(GETARG (long *)) = data->counter;
+ else if (data->flags & PF_SHORTINT)
+ *(GETARG (short *)) = data->counter;
+ else
+ *(GETARG (int *)) = data->counter;
+ state = 0;
+ break;
+ case '%': /* nothing just % */
+ PUT_CHAR('%', data);
+ state = 0;
+ break;
+ default:
+ /* is this an error ? maybe bail out */
+ state = 0;
+ break;
+ } /* end switch */
+ } /* end of `%' for loop */
+ } /* end of format string for loop */
+
+ if (data->length >= 0)
+ *data->holder = '\0'; /* the end ye ! */
+
+ return data->counter;
+}
+
+#if defined (FLOATING_POINT) && defined (HAVE_LONG_DOUBLE)
+/*
+ * Printing floating point numbers accurately is an art. I'm not good
+ * at it. Fall back to sprintf for long double formats.
+ */
+static void
+ldfallback (data, fs, fe, ld)
+ struct DATA *data;
+ const char *fs, *fe;
+ long double ld;
+{
+ register char *x;
+ char fmtbuf[FALLBACK_FMTSIZE], *obuf;
+ int fl;
+
+ fl = LFALLBACK_BASE + (data->precision < 6 ? 6 : data->precision) + 2;
+ obuf = (char *)xmalloc (fl);
+ fl = fe - fs + 1;
+ strncpy (fmtbuf, fs, fl);
+ fmtbuf[fl] = '\0';
+
+ if ((data->flags & PF_STAR_W) && (data->flags & PF_STAR_P))
+ sprintf (obuf, fmtbuf, data->width, data->precision, ld);
+ else if (data->flags & PF_STAR_W)
+ sprintf (obuf, fmtbuf, data->width, ld);
+ else if (data->flags & PF_STAR_P)
+ sprintf (obuf, fmtbuf, data->precision, ld);
+ else
+ sprintf (obuf, fmtbuf, ld);
+
+ for (x = obuf; *x; x++)
+ PUT_CHAR (*x, data);
+ xfree (obuf);
+}
+#endif /* FLOATING_POINT && HAVE_LONG_DOUBLE */
+
+#ifdef FLOATING_POINT
+/* Used for %a, %A if the libc printf supports them. */
+static void
+dfallback (data, fs, fe, d)
+ struct DATA *data;
+ const char *fs, *fe;
+ double d;
+{
+ register char *x;
+ char fmtbuf[FALLBACK_FMTSIZE], obuf[FALLBACK_BASE];
+ int fl;
+
+ fl = fe - fs + 1;
+ strncpy (fmtbuf, fs, fl);
+ fmtbuf[fl] = '\0';
+
+ if ((data->flags & PF_STAR_W) && (data->flags & PF_STAR_P))
+ sprintf (obuf, fmtbuf, data->width, data->precision, d);
+ else if (data->flags & PF_STAR_W)
+ sprintf (obuf, fmtbuf, data->width, d);
+ else if (data->flags & PF_STAR_P)
+ sprintf (obuf, fmtbuf, data->precision, d);
+ else
+ sprintf (obuf, fmtbuf, d);
+
+ for (x = obuf; *x; x++)
+ PUT_CHAR (*x, data);
+}
+#endif /* FLOATING_POINT */
+
+#if !HAVE_SNPRINTF
+
+int
+#if defined (__STDC__)
+vsnprintf(char *string, size_t length, const char *format, va_list args)
+#else
+vsnprintf(string, length, format, args)
+ char *string;
+ size_t length;
+ const char *format;
+ va_list args;
+#endif
+{
+ struct DATA data;
+
+ if (string == 0 && length != 0)
+ return 0;
+ init_data (&data, string, length, format, PFM_SN);
+ return (vsnprintf_internal(&data, string, length, format, args));
+}
+
+int
+#if defined(PREFER_STDARG)
+snprintf(char *string, size_t length, const char * format, ...)
+#else
+snprintf(string, length, format, va_alist)
+ char *string;
+ size_t length;
+ const char *format;
+ va_dcl
+#endif
+{
+ struct DATA data;
+ int rval;
+ va_list args;
+
+ SH_VA_START(args, format);
+
+ if (string == 0 && length != 0)
+ return 0;
+ init_data (&data, string, length, format, PFM_SN);
+ rval = vsnprintf_internal (&data, string, length, format, args);
+
+ va_end(args);
+
+ return rval;
+}
+
+#endif /* HAVE_SNPRINTF */
+
+#if !HAVE_ASPRINTF
+
+int
+#if defined (__STDC__)
+vasprintf(char **stringp, const char *format, va_list args)
+#else
+vasprintf(stringp, format, args)
+ char **stringp;
+ const char *format;
+ va_list args;
+#endif
+{
+ struct DATA data;
+ char *string;
+ int r;
+
+ string = (char *)xmalloc(ASBUFSIZE);
+ init_data (&data, string, ASBUFSIZE, format, PFM_AS);
+ r = vsnprintf_internal(&data, string, ASBUFSIZE, format, args);
+ *stringp = data.base; /* not string in case reallocated */
+ return r;
+}
+
+int
+#if defined(PREFER_STDARG)
+asprintf(char **stringp, const char * format, ...)
+#else
+asprintf(stringp, format, va_alist)
+ char **stringp;
+ const char *format;
+ va_dcl
+#endif
+{
+ int rval;
+ va_list args;
+
+ SH_VA_START(args, format);
+
+ rval = vasprintf (stringp, format, args);
+
+ va_end(args);
+
+ return rval;
+}
+
+#endif /* !HAVE_ASPRINTF */
+
+#endif /* !HAVE_SNPRINTF || !HAVE_ASPRINTF */
+
+#ifdef DRIVER
+
+static void
+memory_error_and_abort ()
+{
+ write (2, "out of virtual memory\n", 22);
+ abort ();
+}
+
+static void *
+xmalloc(bytes)
+ size_t bytes;
+{
+ void *ret;
+
+ ret = malloc(bytes);
+ if (ret == 0)
+ memory_error_and_abort ();
+ return ret;
+}
+
+static void *
+xrealloc (pointer, bytes)
+ void *pointer;
+ size_t bytes;
+{
+ void *ret;
+
+ ret = pointer ? realloc(pointer, bytes) : malloc(bytes);
+ if (ret == 0)
+ memory_error_and_abort ();
+ return ret;
+}
+
+static void
+xfree(x)
+ void *x;
+{
+ if (x)
+ free (x);
+}
+
+/* set of small tests for snprintf() */
+main()
+{
+ char holder[100];
+ char *h;
+ int i, si, ai;
+
+#ifdef HAVE_LOCALE_H
+ setlocale(LC_ALL, "");
+#endif
+
+#if 1
+ si = snprintf((char *)NULL, 0, "abcde\n");
+ printf("snprintf returns %d with NULL first argument and size of 0\n", si);
+ si = snprintf(holder, 0, "abcde\n");
+ printf("snprintf returns %d with non-NULL first argument and size of 0\n", si);
+ si = snprintf((char *)NULL, 16, "abcde\n");
+ printf("snprintf returns %d with NULL first argument and non-zero size\n", si);
+
+/*
+ printf("Suite of test for snprintf:\n");
+ printf("a_format\n");
+ printf("printf() format\n");
+ printf("snprintf() format\n\n");
+*/
+/* Checking the field widths */
+
+ printf("/%%ld %%ld/, 336, 336\n");
+ snprintf(holder, sizeof holder, "/%ld %ld/\n", 336, 336);
+ asprintf(&h, "/%ld %ld/\n", 336, 336);
+ printf("/%ld %ld/\n", 336, 336);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%d/, 336\n");
+ snprintf(holder, sizeof holder, "/%d/\n", 336);
+ asprintf(&h, "/%d/\n", 336);
+ printf("/%d/\n", 336);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%2d/, 336\n");
+ snprintf(holder, sizeof holder, "/%2d/\n", 336);
+ asprintf(&h, "/%2d/\n", 336);
+ printf("/%2d/\n", 336);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%10d/, 336\n");
+ snprintf(holder, sizeof holder, "/%10d/\n", 336);
+ asprintf(&h, "/%10d/\n", 336);
+ printf("/%10d/\n", 336);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%-10d/, 336\n");
+ snprintf(holder, sizeof holder, "/%-10d/\n", 336);
+ asprintf(&h, "/%-10d/\n", 336);
+ printf("/%-10d/\n", 336);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+
+/* floating points */
+
+ printf("/%%f/, 1234.56\n");
+ snprintf(holder, sizeof holder, "/%f/\n", 1234.56);
+ asprintf(&h, "/%f/\n", 1234.56);
+ printf("/%f/\n", 1234.56);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%e/, 1234.56\n");
+ snprintf(holder, sizeof holder, "/%e/\n", 1234.56);
+ asprintf(&h, "/%e/\n", 1234.56);
+ printf("/%e/\n", 1234.56);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%4.2f/, 1234.56\n");
+ snprintf(holder, sizeof holder, "/%4.2f/\n", 1234.56);
+ asprintf(&h, "/%4.2f/\n", 1234.56);
+ printf("/%4.2f/\n", 1234.56);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%3.1f/, 1234.56\n");
+ snprintf(holder, sizeof holder, "/%3.1f/\n", 1234.56);
+ asprintf(&h, "/%3.1f/\n", 1234.56);
+ printf("/%3.1f/\n", 1234.56);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%10.3f/, 1234.56\n");
+ snprintf(holder, sizeof holder, "/%10.3f/\n", 1234.56);
+ asprintf(&h, "/%10.3f/\n", 1234.56);
+ printf("/%10.3f/\n", 1234.56);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%10.3e/, 1234.56\n");
+ snprintf(holder, sizeof holder, "/%10.3e/\n", 1234.56);
+ asprintf(&h, "/%10.3e/\n", 1234.56);
+ printf("/%10.3e/\n", 1234.56);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%+4.2f/, 1234.56\n");
+ snprintf(holder, sizeof holder, "/%+4.2f/\n", 1234.56);
+ asprintf(&h, "/%+4.2f/\n", 1234.56);
+ printf("/%+4.2f/\n", 1234.56);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%010.2f/, 1234.56\n");
+ snprintf(holder, sizeof holder, "/%010.2f/\n", 1234.56);
+ asprintf(&h, "/%010.2f/\n", 1234.56);
+ printf("/%010.2f/\n", 1234.56);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+#define BLURB "Outstanding acting !"
+/* strings precisions */
+
+ printf("/%%2s/, \"%s\"\n", BLURB);
+ snprintf(holder, sizeof holder, "/%2s/\n", BLURB);
+ asprintf(&h, "/%2s/\n", BLURB);
+ printf("/%2s/\n", BLURB);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%22s/ %s\n", BLURB);
+ snprintf(holder, sizeof holder, "/%22s/\n", BLURB);
+ asprintf(&h, "/%22s/\n", BLURB);
+ printf("/%22s/\n", BLURB);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%22.5s/ %s\n", BLURB);
+ snprintf(holder, sizeof holder, "/%22.5s/\n", BLURB);
+ asprintf(&h, "/%22.5s/\n", BLURB);
+ printf("/%22.5s/\n", BLURB);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%-22.5s/ %s\n", BLURB);
+ snprintf(holder, sizeof holder, "/%-22.5s/\n", BLURB);
+ asprintf(&h, "/%-22.5s/\n", BLURB);
+ printf("/%-22.5s/\n", BLURB);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+/* see some flags */
+
+ printf("%%x %%X %%#x, 31, 31, 31\n");
+ snprintf(holder, sizeof holder, "%x %X %#x\n", 31, 31, 31);
+ asprintf(&h, "%x %X %#x\n", 31, 31, 31);
+ printf("%x %X %#x\n", 31, 31, 31);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("**%%d**%% d**%% d**, 42, 42, -42\n");
+ snprintf(holder, sizeof holder, "**%d**% d**% d**\n", 42, 42, -42);
+ asprintf(&h, "**%d**% d**% d**\n", 42, 42, -42);
+ printf("**%d**% d**% d**\n", 42, 42, -42);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+/* other flags */
+
+ printf("/%%g/, 31.4\n");
+ snprintf(holder, sizeof holder, "/%g/\n", 31.4);
+ asprintf(&h, "/%g/\n", 31.4);
+ printf("/%g/\n", 31.4);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%.6g/, 31.4\n");
+ snprintf(holder, sizeof holder, "/%.6g/\n", 31.4);
+ asprintf(&h, "/%.6g/\n", 31.4);
+ printf("/%.6g/\n", 31.4);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%.1G/, 31.4\n");
+ snprintf(holder, sizeof holder, "/%.1G/\n", 31.4);
+ asprintf(&h, "/%.1G/\n", 31.4);
+ printf("/%.1G/\n", 31.4);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%.1G/, 3100000000.4\n");
+ snprintf(holder, sizeof holder, "/%.1G/\n", 3100000000.4);
+ asprintf(&h, "/%.1G/\n", 3100000000.4);
+ printf("/%.1G/\n", 3100000000.4);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("abc%%n\n");
+ printf("abc%n", &i); printf("%d\n", i);
+ snprintf(holder, sizeof holder, "abc%n", &i);
+ printf("%s", holder); printf("%d\n\n", i);
+ asprintf(&h, "abc%n", &i);
+ printf("%s", h); printf("%d\n\n", i);
+
+ printf("%%*.*s --> 10.10\n");
+ snprintf(holder, sizeof holder, "%*.*s\n", 10, 10, BLURB);
+ asprintf(&h, "%*.*s\n", 10, 10, BLURB);
+ printf("%*.*s\n", 10, 10, BLURB);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("%%%%%%%%\n");
+ snprintf(holder, sizeof holder, "%%%%\n");
+ asprintf(&h, "%%%%\n");
+ printf("%%%%\n");
+ printf("%s", holder);
+ printf("%s\n", h);
+
+#define BIG "Hello this is a too big string for the buffer"
+/* printf("A buffer to small of 10, trying to put this:\n");*/
+ printf("<%%>, %s\n", BIG);
+ i = snprintf(holder, 10, "%s\n", BIG);
+ i = asprintf(&h, "%s", BIG);
+ printf("<%s>\n", BIG);
+ printf("<%s>\n", holder);
+ printf("<%s>\n\n", h);
+
+ printf ("<%%p> vsnprintf\n");
+ i = snprintf(holder, 100, "%p", vsnprintf);
+ i = asprintf(&h, "%p", vsnprintf);
+ printf("<%p>\n", vsnprintf);
+ printf("<%s>\n", holder);
+ printf("<%s>\n\n", h);
+
+ printf ("<%%lu> LONG_MAX+1\n");
+ i = snprintf(holder, 100, "%lu", (unsigned long)(LONG_MAX)+1);
+ i = asprintf(&h, "%lu", (unsigned long)(LONG_MAX)+1);
+ printf("<%lu>\n", (unsigned long)(LONG_MAX)+1);
+ printf("<%s>\n", holder);
+ printf("<%s>\n\n", h);
+
+#ifdef HAVE_LONG_LONG
+ printf ("<%%llu> LLONG_MAX+1\n");
+ i = snprintf(holder, 100, "%llu", (unsigned long long)(LLONG_MAX)+1);
+ i = asprintf(&h, "%llu", (unsigned long long)(LLONG_MAX)+1);
+ printf("<%llu>\n", (unsigned long long)(LLONG_MAX)+1);
+ printf("<%s>\n", holder);
+ printf("<%s>\n\n", h);
+#endif
+
+#ifdef HAVE_LONG_DOUBLE
+ printf ("<%%6.2LE> 42.42\n");
+ i = snprintf(holder, 100, "%6.2LE", (long double)42.42);
+ i = asprintf(&h, "%6.2LE", (long double)42.42);
+ printf ("<%6.2LE>\n", (long double)42.42);
+ printf ("<%s>\n", holder);
+ printf ("<%s>\n\n", h);
+#endif
+
+#ifdef HAVE_PRINTF_A_FORMAT
+ printf ("<%%6.2A> 42.42\n");
+ i = snprintf(holder, 100, "%6.2A", 42.42);
+ i = asprintf(&h, "%6.2A", 42.42);
+ printf ("<%6.2A>\n", 42.42);
+ printf ("<%s>\n", holder);
+ printf ("<%s>\n\n", h);
+
+ printf ("<%%6.2LA> 42.42\n");
+ i = snprintf(holder, 100, "%6.2LA", (long double)42.42);
+ i = asprintf(&h, "%6.2LA", (long double)42.42);
+ printf ("<%6.2LA>\n", (long double)42.42);
+ printf ("<%s>\n", holder);
+ printf ("<%s>\n\n", h);
+#endif
+
+ printf ("<%%.10240f> DBL_MAX\n");
+ si = snprintf(holder, 100, "%.10240f", DBL_MAX);
+ ai = asprintf(&h, "%.10240f", DBL_MAX);
+ printf ("<%.10240f>\n", DBL_MAX);
+ printf ("<%d> <%s>\n", si, holder);
+ printf ("<%d> <%s>\n\n", ai, h);
+
+ printf ("<%%.10240Lf> LDBL_MAX\n");
+ si = snprintf(holder, 100, "%.10240Lf", (long double)LDBL_MAX);
+ ai = asprintf(&h, "%.10240Lf", (long double)LDBL_MAX);
+ printf ("<%.10240Lf>\n", (long double)LDBL_MAX);
+ printf ("<%d> <%s>\n", si, holder);
+ printf ("<%d> <%s>\n\n", ai, h);
+
+ /* huh? */
+ printf("/%%g/, 421.2345\n");
+ snprintf(holder, sizeof holder, "/%g/\n", 421.2345);
+ asprintf(&h, "/%g/\n", 421.2345);
+ printf("/%g/\n", 421.2345);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%g/, 4214.2345\n");
+ snprintf(holder, sizeof holder, "/%g/\n", 4214.2345);
+ asprintf(&h, "/%g/\n", 4214.2345);
+ printf("/%g/\n", 4214.2345);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%.5g/, 4214.2345\n");
+ snprintf(holder, sizeof holder, "/%.5g/\n", 4214.2345);
+ asprintf(&h, "/%.5g/\n", 4214.2345);
+ printf("/%.5g/\n", 4214.2345);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%.4g/, 4214.2345\n");
+ snprintf(holder, sizeof holder, "/%.4g/\n", 4214.2345);
+ asprintf(&h, "/%.4g/\n", 4214.2345);
+ printf("/%.4g/\n", 4214.2345);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%'ld %%'ld/, 12345, 1234567\n");
+ snprintf(holder, sizeof holder, "/%'ld %'ld/\n", 12345, 1234567);
+ asprintf(&h, "/%'ld %'ld/\n", 12345, 1234567);
+ printf("/%'ld %'ld/\n", 12345, 1234567);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%'ld %%'ld/, 336, 3336\n");
+ snprintf(holder, sizeof holder, "/%'ld %'ld/\n", 336, 3336);
+ asprintf(&h, "/%'ld %'ld/\n", 336, 3336);
+ printf("/%'ld %'ld/\n", 336, 3336);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%'ld %%'ld/, -42786, -142786\n");
+ snprintf(holder, sizeof holder, "/%'ld %'ld/\n", -42786, -142786);
+ asprintf(&h, "/%'ld %'ld/\n", -42786, -142786);
+ printf("/%'ld %'ld/\n", -42786, -142786);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%'f %%'f/, 421.2345, 421234.56789\n");
+ snprintf(holder, sizeof holder, "/%'f %'f/\n", 421.2345, 421234.56789);
+ asprintf(&h, "/%'f %'f/\n", 421.2345, 421234.56789);
+ printf("/%'f %'f/\n", 421.2345, 421234.56789);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%'f %%'f/, -421.2345, -421234.56789\n");
+ snprintf(holder, sizeof holder, "/%'f %'f/\n", -421.2345, -421234.56789);
+ asprintf(&h, "/%'f %'f/\n", -421.2345, -421234.56789);
+ printf("/%'f %'f/\n", -421.2345, -421234.56789);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%'g %%'g/, 421.2345, 421234.56789\n");
+ snprintf(holder, sizeof holder, "/%'g %'g/\n", 421.2345, 421234.56789);
+ asprintf(&h, "/%'g %'g/\n", 421.2345, 421234.56789);
+ printf("/%'g %'g/\n", 421.2345, 421234.56789);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ printf("/%%'g %%'g/, -421.2345, -421234.56789\n");
+ snprintf(holder, sizeof holder, "/%'g %'g/\n", -421.2345, -421234.56789);
+ asprintf(&h, "/%'g %'g/\n", -421.2345, -421234.56789);
+ printf("/%'g %'g/\n", -421.2345, -421234.56789);
+ printf("%s", holder);
+ printf("%s\n", h);
+#endif
+
+ printf("/%%'g/, 4213455.8392\n");
+ snprintf(holder, sizeof holder, "/%'g/\n", 4213455.8392);
+ asprintf(&h, "/%'g/\n", 4213455.8392);
+ printf("/%'g/\n", 4213455.8392);
+ printf("%s", holder);
+ printf("%s\n", h);
+
+ exit (0);
+}
+#endif
diff --git a/lib/sh/spell.c b/lib/sh/spell.c
new file mode 100644
index 0000000..d0394c2
--- /dev/null
+++ b/lib/sh/spell.c
@@ -0,0 +1,212 @@
+/* spell.c -- spelling correction for pathnames. */
+
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <bashtypes.h>
+#include <posixdir.h>
+#include <posixstat.h>
+#ifndef _MINIX
+#include <sys/param.h>
+#endif
+
+#include <stdio.h>
+
+#include <bashansi.h>
+#include <maxpath.h>
+#include <stdc.h>
+
+static int mindist __P((char *, char *, char *));
+static int spdist __P((char *, char *));
+
+/*
+ * `spname' and its helpers are inspired by the code in "The UNIX
+ * Programming Environment", Kernighan & Pike, Prentice-Hall 1984,
+ * pages 209 - 213.
+ */
+
+/*
+ * `spname' -- return a correctly spelled filename
+ *
+ * int spname(char * oldname, char * newname)
+ * Returns: -1 if no reasonable match found
+ * 0 if exact match found
+ * 1 if corrected
+ * Stores corrected name in `newname'.
+ */
+int
+spname(oldname, newname)
+ char *oldname;
+ char *newname;
+{
+ char *op, *np, *p;
+ char guess[PATH_MAX + 1], best[PATH_MAX + 1];
+
+ op = oldname;
+ np = newname;
+ for (;;)
+ {
+ while (*op == '/') /* Skip slashes */
+ *np++ = *op++;
+ *np = '\0';
+
+ if (*op == '\0') /* Exact or corrected */
+ {
+ /* `.' is rarely the right thing. */
+ if (oldname[1] == '\0' && newname[1] == '\0' &&
+ oldname[0] != '.' && newname[0] == '.')
+ return -1;
+ return strcmp(oldname, newname) != 0;
+ }
+
+ /* Copy next component into guess */
+ for (p = guess; *op != '/' && *op != '\0'; op++)
+ if (p < guess + PATH_MAX)
+ *p++ = *op;
+ *p = '\0';
+
+ if (mindist(newname, guess, best) >= 3)
+ return -1; /* Hopeless */
+
+ /*
+ * Add to end of newname
+ */
+ for (p = best; *np = *p++; np++)
+ ;
+ }
+}
+
+/*
+ * Search directory for a guess
+ */
+static int
+mindist(dir, guess, best)
+ char *dir;
+ char *guess;
+ char *best;
+{
+ DIR *fd;
+ struct dirent *dp;
+ int dist, x;
+
+ dist = 3; /* Worst distance */
+ if (*dir == '\0')
+ dir = ".";
+
+ if ((fd = opendir(dir)) == NULL)
+ return dist;
+
+ while ((dp = readdir(fd)) != NULL)
+ {
+ /*
+ * Look for a better guess. If the new guess is as
+ * good as the current one, we take it. This way,
+ * any single character match will be a better match
+ * than ".".
+ */
+ x = spdist(dp->d_name, guess);
+ if (x <= dist && x != 3)
+ {
+ strcpy(best, dp->d_name);
+ dist = x;
+ if (dist == 0) /* Exact match */
+ break;
+ }
+ }
+ (void)closedir(fd);
+
+ /* Don't return `.' */
+ if (best[0] == '.' && best[1] == '\0')
+ dist = 3;
+ return dist;
+}
+
+/*
+ * `spdist' -- return the "distance" between two names.
+ *
+ * int spname(char * oldname, char * newname)
+ * Returns: 0 if strings are identical
+ * 1 if two characters are transposed
+ * 2 if one character is wrong, added or deleted
+ * 3 otherwise
+ */
+static int
+spdist(cur, new)
+ char *cur, *new;
+{
+ while (*cur == *new)
+ {
+ if (*cur == '\0')
+ return 0; /* Exact match */
+ cur++;
+ new++;
+ }
+
+ if (*cur)
+ {
+ if (*new)
+ {
+ if (cur[1] && new[1] && cur[0] == new[1] && cur[1] == new[0] && strcmp (cur + 2, new + 2) == 0)
+ return 1; /* Transposition */
+
+ if (strcmp (cur + 1, new + 1) == 0)
+ return 2; /* One character mismatch */
+ }
+
+ if (strcmp(&cur[1], &new[0]) == 0)
+ return 2; /* Extra character */
+ }
+
+ if (*new && strcmp(cur, new + 1) == 0)
+ return 2; /* Missing character */
+
+ return 3;
+}
+
+char *
+dirspell (dirname)
+ char *dirname;
+{
+ int n;
+ char *guess;
+
+ n = (strlen (dirname) * 3 + 1) / 2 + 1;
+ guess = (char *)malloc (n);
+ if (guess == 0)
+ return 0;
+
+ switch (spname (dirname, guess))
+ {
+ case -1:
+ default:
+ free (guess);
+ return (char *)NULL;
+ case 0:
+ case 1:
+ return guess;
+ }
+}
diff --git a/lib/sh/strcasecmp.c b/lib/sh/strcasecmp.c
new file mode 100644
index 0000000..5542f71
--- /dev/null
+++ b/lib/sh/strcasecmp.c
@@ -0,0 +1,84 @@
+/* strcasecmp.c - functions for case-insensitive string comparison. */
+
+/* Copyright (C) 1995 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if !defined (HAVE_STRCASECMP)
+
+#include <stdc.h>
+#include <bashansi.h>
+#include <chartypes.h>
+
+/* Compare at most COUNT characters from string1 to string2. Case
+ doesn't matter. */
+int
+strncasecmp (string1, string2, count)
+ const char *string1;
+ const char *string2;
+ int count;
+{
+ register const char *s1;
+ register const char *s2;
+ register int r;
+
+ if (count <= 0 || (string1 == string2))
+ return 0;
+
+ s1 = string1;
+ s2 = string2;
+ do
+ {
+ if ((r = TOLOWER ((unsigned char) *s1) - TOLOWER ((unsigned char) *s2)) != 0)
+ return r;
+ if (*s1++ == '\0')
+ break;
+ s2++;
+ }
+ while (--count != 0);
+
+ return (0);
+}
+
+/* strcmp (), but caseless. */
+int
+strcasecmp (string1, string2)
+ const char *string1;
+ const char *string2;
+{
+ register const char *s1;
+ register const char *s2;
+ register int r;
+
+ s1 = string1;
+ s2 = string2;
+
+ if (s1 == s2)
+ return (0);
+
+ while ((r = TOLOWER ((unsigned char)*s1) - TOLOWER ((unsigned char)*s2)) == 0)
+ {
+ if (*s1++ == '\0')
+ return 0;
+ s2++;
+ }
+
+ return (r);
+}
+#endif /* !HAVE_STRCASECMP */
diff --git a/lib/sh/strcasestr.c b/lib/sh/strcasestr.c
new file mode 100644
index 0000000..c819b3e
--- /dev/null
+++ b/lib/sh/strcasestr.c
@@ -0,0 +1,46 @@
+/* strcasestr.c - Find if one string appears as a substring of another string,
+ without regard to case. */
+
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <bashansi.h>
+#include <chartypes.h>
+
+#include <stdc.h>
+
+/* Determine if s2 occurs in s1. If so, return a pointer to the
+ match in s1. The compare is case insensitive. This is a
+ case-insensitive strstr(3). */
+char *
+strcasestr (s1, s2)
+ const char *s1;
+ const char *s2;
+{
+ register int i, l, len, c;
+
+ c = TOLOWER ((unsigned char)s2[0]);
+ len = strlen (s1);
+ l = strlen (s2);
+ for (i = 0; (len - i) >= l; i++)
+ if ((TOLOWER ((unsigned char)s1[i]) == c) && (strncasecmp (s1 + i, s2, l) == 0))
+ return ((char *)s1 + i);
+ return ((char *)0);
+}
diff --git a/lib/sh/strerror.c b/lib/sh/strerror.c
new file mode 100644
index 0000000..4081e9c
--- /dev/null
+++ b/lib/sh/strerror.c
@@ -0,0 +1,74 @@
+/* strerror.c - string corresponding to a particular value of errno. */
+
+/* Copyright (C) 1995 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if !defined (HAVE_STRERROR)
+
+#include <bashtypes.h>
+#ifndef _MINIX
+# include <sys/param.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+
+#include <shell.h>
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+/* Return a string corresponding to the error number E. From
+ the ANSI C spec. */
+#if defined (strerror)
+# undef strerror
+#endif
+
+static char *errbase = "Unknown system error ";
+
+char *
+strerror (e)
+ int e;
+{
+ static char emsg[40];
+#if defined (HAVE_SYS_ERRLIST)
+ extern int sys_nerr;
+ extern char *sys_errlist[];
+
+ if (e > 0 && e < sys_nerr)
+ return (sys_errlist[e]);
+ else
+#endif /* HAVE_SYS_ERRLIST */
+ {
+ char *z;
+
+ z = itos (e);
+ strcpy (emsg, errbase);
+ strcat (emsg, z);
+ free (z);
+ return (&emsg[0]);
+ }
+}
+#endif /* HAVE_STRERROR */
diff --git a/lib/sh/strftime.c b/lib/sh/strftime.c
new file mode 100644
index 0000000..572baae
--- /dev/null
+++ b/lib/sh/strftime.c
@@ -0,0 +1,876 @@
+/* strftime - formatted time and date to a string */
+/*
+ * Modified slightly by Chet Ramey for inclusion in Bash
+ */
+/*
+ * strftime.c
+ *
+ * Public-domain implementation of ISO C library routine.
+ *
+ * If you can't do prototypes, get GCC.
+ *
+ * The C99 standard now specifies just about all of the formats
+ * that were additional in the earlier versions of this file.
+ *
+ * For extensions from SunOS, add SUNOS_EXT.
+ * For extensions from HP/UX, add HPUX_EXT.
+ * For VMS dates, add VMS_EXT.
+ * For complete POSIX semantics, add POSIX_SEMANTICS.
+ *
+ * The code for %c, %x, and %X follows the C99 specification for
+ * the "C" locale.
+ *
+ * This version ignores LOCALE information.
+ * It also doesn't worry about multi-byte characters.
+ * So there.
+ *
+ * This file is also shipped with GAWK (GNU Awk), gawk specific bits of
+ * code are included if GAWK is defined.
+ *
+ * Arnold Robbins
+ * January, February, March, 1991
+ * Updated March, April 1992
+ * Updated April, 1993
+ * Updated February, 1994
+ * Updated May, 1994
+ * Updated January, 1995
+ * Updated September, 1995
+ * Updated January, 1996
+ * Updated July, 1997
+ * Updated October, 1999
+ * Updated September, 2000
+ *
+ * Fixes from ado@elsie.nci.nih.gov,
+ * February 1991, May 1992
+ * Fixes from Tor Lillqvist tml@tik.vtt.fi,
+ * May 1993
+ * Further fixes from ado@elsie.nci.nih.gov,
+ * February 1994
+ * %z code from chip@chinacat.unicom.com,
+ * Applied September 1995
+ * %V code fixed (again) and %G, %g added,
+ * January 1996
+ * %v code fixed, better configuration,
+ * July 1997
+ * Moved to C99 specification.
+ * September 2000
+ */
+#include <config.h>
+
+#ifndef GAWK
+#include <stdio.h>
+#include <ctype.h>
+#include <time.h>
+#endif
+#if defined(TM_IN_SYS_TIME)
+#include <sys/types.h>
+#include <sys/time.h>
+#endif
+
+#include <stdlib.h>
+#include <string.h>
+
+/* defaults: season to taste */
+#define SUNOS_EXT 1 /* stuff in SunOS strftime routine */
+#define VMS_EXT 1 /* include %v for VMS date format */
+#define HPUX_EXT 1 /* non-conflicting stuff in HP-UX date */
+#ifndef GAWK
+#define POSIX_SEMANTICS 1 /* call tzset() if TZ changes */
+#endif
+
+#undef strchr /* avoid AIX weirdness */
+
+#if defined (SHELL)
+extern char *get_string_value (const char *);
+#endif
+
+extern void tzset(void);
+static int weeknumber(const struct tm *timeptr, int firstweekday);
+static int iso8601wknum(const struct tm *timeptr);
+
+#ifndef inline
+#ifdef __GNUC__
+#define inline __inline__
+#else
+#define inline /**/
+#endif
+#endif
+
+#define range(low, item, hi) max(low, min(item, hi))
+
+#if !defined(OS2) && !defined(MSDOS) && defined(HAVE_TZNAME)
+extern char *tzname[2];
+extern int daylight;
+#if defined(SOLARIS) || defined(mips) || defined (M_UNIX)
+extern long int timezone, altzone;
+#else
+# if defined (HPUX)
+extern long int timezone;
+# else
+extern int timezone, altzone;
+# endif /* !HPUX */
+#endif /* !SOLARIS && !mips && !M_UNIX */
+#endif
+
+#undef min /* just in case */
+
+/* min --- return minimum of two numbers */
+
+static inline int
+min(int a, int b)
+{
+ return (a < b ? a : b);
+}
+
+#undef max /* also, just in case */
+
+/* max --- return maximum of two numbers */
+
+static inline int
+max(int a, int b)
+{
+ return (a > b ? a : b);
+}
+
+/* strftime --- produce formatted time */
+
+size_t
+strftime(char *s, size_t maxsize, const char *format, const struct tm *timeptr)
+{
+ char *endp = s + maxsize;
+ char *start = s;
+ auto char tbuf[100];
+ long off;
+ int i, w, y;
+ static short first = 1;
+#ifdef POSIX_SEMANTICS
+ static char *savetz = NULL;
+ static int savetzlen = 0;
+ char *tz;
+#endif /* POSIX_SEMANTICS */
+#ifndef HAVE_TM_ZONE
+#ifndef HAVE_TM_NAME
+#ifndef HAVE_TZNAME
+ extern char *timezone();
+ struct timeval tv;
+ struct timezone zone;
+#endif /* HAVE_TZNAME */
+#endif /* HAVE_TM_NAME */
+#endif /* HAVE_TM_ZONE */
+
+ /* various tables, useful in North America */
+ static const char *days_a[] = {
+ "Sun", "Mon", "Tue", "Wed",
+ "Thu", "Fri", "Sat",
+ };
+ static const char *days_l[] = {
+ "Sunday", "Monday", "Tuesday", "Wednesday",
+ "Thursday", "Friday", "Saturday",
+ };
+ static const char *months_a[] = {
+ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
+ "Jul", "Aug", "Sep", "Oct", "Nov", "Dec",
+ };
+ static const char *months_l[] = {
+ "January", "February", "March", "April",
+ "May", "June", "July", "August", "September",
+ "October", "November", "December",
+ };
+ static const char *ampm[] = { "AM", "PM", };
+
+ if (s == NULL || format == NULL || timeptr == NULL || maxsize == 0)
+ return 0;
+
+ /* quick check if we even need to bother */
+ if (strchr(format, '%') == NULL && strlen(format) + 1 >= maxsize)
+ return 0;
+
+#ifndef POSIX_SEMANTICS
+ if (first) {
+ tzset();
+ first = 0;
+ }
+#else /* POSIX_SEMANTICS */
+#if defined (SHELL)
+ tz = get_string_value ("TZ");
+#else
+ tz = getenv("TZ");
+#endif
+ if (first) {
+ if (tz != NULL) {
+ int tzlen = strlen(tz);
+
+ savetz = (char *) malloc(tzlen + 1);
+ if (savetz != NULL) {
+ savetzlen = tzlen + 1;
+ strcpy(savetz, tz);
+ }
+ }
+ tzset();
+ first = 0;
+ }
+ /* if we have a saved TZ, and it is different, recapture and reset */
+ if (tz && savetz && (tz[0] != savetz[0] || strcmp(tz, savetz) != 0)) {
+ i = strlen(tz) + 1;
+ if (i > savetzlen) {
+ savetz = (char *) realloc(savetz, i);
+ if (savetz) {
+ savetzlen = i;
+ strcpy(savetz, tz);
+ }
+ } else
+ strcpy(savetz, tz);
+ tzset();
+ }
+#endif /* POSIX_SEMANTICS */
+
+ for (; *format && s < endp - 1; format++) {
+ tbuf[0] = '\0';
+ if (*format != '%') {
+ *s++ = *format;
+ continue;
+ }
+ again:
+ switch (*++format) {
+ case '\0':
+ *s++ = '%';
+ goto out;
+
+ case '%':
+ *s++ = '%';
+ continue;
+
+ case 'a': /* abbreviated weekday name */
+ if (timeptr->tm_wday < 0 || timeptr->tm_wday > 6)
+ strcpy(tbuf, "?");
+ else
+ strcpy(tbuf, days_a[timeptr->tm_wday]);
+ break;
+
+ case 'A': /* full weekday name */
+ if (timeptr->tm_wday < 0 || timeptr->tm_wday > 6)
+ strcpy(tbuf, "?");
+ else
+ strcpy(tbuf, days_l[timeptr->tm_wday]);
+ break;
+
+ case 'b': /* abbreviated month name */
+ short_month:
+ if (timeptr->tm_mon < 0 || timeptr->tm_mon > 11)
+ strcpy(tbuf, "?");
+ else
+ strcpy(tbuf, months_a[timeptr->tm_mon]);
+ break;
+
+ case 'B': /* full month name */
+ if (timeptr->tm_mon < 0 || timeptr->tm_mon > 11)
+ strcpy(tbuf, "?");
+ else
+ strcpy(tbuf, months_l[timeptr->tm_mon]);
+ break;
+
+ case 'c': /* appropriate date and time representation */
+ /*
+ * This used to be:
+ *
+ * strftime(tbuf, sizeof tbuf, "%a %b %e %H:%M:%S %Y", timeptr);
+ *
+ * Now, per the ISO 1999 C standard, it this:
+ */
+ strftime(tbuf, sizeof tbuf, "%A %B %d %T %Y", timeptr);
+ break;
+
+ case 'C':
+ century:
+ sprintf(tbuf, "%02d", (timeptr->tm_year + 1900) / 100);
+ break;
+
+ case 'd': /* day of the month, 01 - 31 */
+ i = range(1, timeptr->tm_mday, 31);
+ sprintf(tbuf, "%02d", i);
+ break;
+
+ case 'D': /* date as %m/%d/%y */
+ strftime(tbuf, sizeof tbuf, "%m/%d/%y", timeptr);
+ break;
+
+ case 'e': /* day of month, blank padded */
+ sprintf(tbuf, "%2d", range(1, timeptr->tm_mday, 31));
+ break;
+
+ case 'E':
+ /* POSIX (now C99) locale extensions, ignored for now */
+ goto again;
+
+ case 'F': /* ISO 8601 date representation */
+ strftime(tbuf, sizeof tbuf, "%Y-%m-%d", timeptr);
+ break;
+
+ case 'g':
+ case 'G':
+ /*
+ * Year of ISO week.
+ *
+ * If it's December but the ISO week number is one,
+ * that week is in next year.
+ * If it's January but the ISO week number is 52 or
+ * 53, that week is in last year.
+ * Otherwise, it's this year.
+ */
+ w = iso8601wknum(timeptr);
+ if (timeptr->tm_mon == 11 && w == 1)
+ y = 1900 + timeptr->tm_year + 1;
+ else if (timeptr->tm_mon == 0 && w >= 52)
+ y = 1900 + timeptr->tm_year - 1;
+ else
+ y = 1900 + timeptr->tm_year;
+
+ if (*format == 'G')
+ sprintf(tbuf, "%d", y);
+ else
+ sprintf(tbuf, "%02d", y % 100);
+ break;
+
+ case 'h': /* abbreviated month name */
+ goto short_month;
+
+ case 'H': /* hour, 24-hour clock, 00 - 23 */
+ i = range(0, timeptr->tm_hour, 23);
+ sprintf(tbuf, "%02d", i);
+ break;
+
+ case 'I': /* hour, 12-hour clock, 01 - 12 */
+ i = range(0, timeptr->tm_hour, 23);
+ if (i == 0)
+ i = 12;
+ else if (i > 12)
+ i -= 12;
+ sprintf(tbuf, "%02d", i);
+ break;
+
+ case 'j': /* day of the year, 001 - 366 */
+ sprintf(tbuf, "%03d", timeptr->tm_yday + 1);
+ break;
+
+ case 'm': /* month, 01 - 12 */
+ i = range(0, timeptr->tm_mon, 11);
+ sprintf(tbuf, "%02d", i + 1);
+ break;
+
+ case 'M': /* minute, 00 - 59 */
+ i = range(0, timeptr->tm_min, 59);
+ sprintf(tbuf, "%02d", i);
+ break;
+
+ case 'n': /* same as \n */
+ tbuf[0] = '\n';
+ tbuf[1] = '\0';
+ break;
+
+ case 'O':
+ /* POSIX (now C99) locale extensions, ignored for now */
+ goto again;
+
+ case 'p': /* am or pm based on 12-hour clock */
+ i = range(0, timeptr->tm_hour, 23);
+ if (i < 12)
+ strcpy(tbuf, ampm[0]);
+ else
+ strcpy(tbuf, ampm[1]);
+ break;
+
+ case 'r': /* time as %I:%M:%S %p */
+ strftime(tbuf, sizeof tbuf, "%I:%M:%S %p", timeptr);
+ break;
+
+ case 'R': /* time as %H:%M */
+ strftime(tbuf, sizeof tbuf, "%H:%M", timeptr);
+ break;
+
+#if defined(HAVE_MKTIME) || defined(GAWK)
+ case 's': /* time as seconds since the Epoch */
+ {
+ struct tm non_const_timeptr;
+
+ non_const_timeptr = *timeptr;
+ sprintf(tbuf, "%ld", mktime(& non_const_timeptr));
+ break;
+ }
+#endif /* defined(HAVE_MKTIME) || defined(GAWK) */
+
+ case 'S': /* second, 00 - 60 */
+ i = range(0, timeptr->tm_sec, 60);
+ sprintf(tbuf, "%02d", i);
+ break;
+
+ case 't': /* same as \t */
+ tbuf[0] = '\t';
+ tbuf[1] = '\0';
+ break;
+
+ case 'T': /* time as %H:%M:%S */
+ the_time:
+ strftime(tbuf, sizeof tbuf, "%H:%M:%S", timeptr);
+ break;
+
+ case 'u':
+ /* ISO 8601: Weekday as a decimal number [1 (Monday) - 7] */
+ sprintf(tbuf, "%d", timeptr->tm_wday == 0 ? 7 :
+ timeptr->tm_wday);
+ break;
+
+ case 'U': /* week of year, Sunday is first day of week */
+ sprintf(tbuf, "%02d", weeknumber(timeptr, 0));
+ break;
+
+ case 'V': /* week of year according ISO 8601 */
+ sprintf(tbuf, "%02d", iso8601wknum(timeptr));
+ break;
+
+ case 'w': /* weekday, Sunday == 0, 0 - 6 */
+ i = range(0, timeptr->tm_wday, 6);
+ sprintf(tbuf, "%d", i);
+ break;
+
+ case 'W': /* week of year, Monday is first day of week */
+ sprintf(tbuf, "%02d", weeknumber(timeptr, 1));
+ break;
+
+ case 'x': /* appropriate date representation */
+ strftime(tbuf, sizeof tbuf, "%A %B %d %Y", timeptr);
+ break;
+
+ case 'X': /* appropriate time representation */
+ goto the_time;
+ break;
+
+ case 'y': /* year without a century, 00 - 99 */
+ year:
+ i = timeptr->tm_year % 100;
+ sprintf(tbuf, "%02d", i);
+ break;
+
+ case 'Y': /* year with century */
+ fullyear:
+ sprintf(tbuf, "%d", 1900 + timeptr->tm_year);
+ break;
+
+ /*
+ * From: Chip Rosenthal <chip@chinacat.unicom.com>
+ * Date: Sun, 19 Mar 1995 00:33:29 -0600 (CST)
+ *
+ * Warning: the %z [code] is implemented by inspecting the
+ * timezone name conditional compile settings, and
+ * inferring a method to get timezone offsets. I've tried
+ * this code on a couple of machines, but I don't doubt
+ * there is some system out there that won't like it.
+ * Maybe the easiest thing to do would be to bracket this
+ * with an #ifdef that can turn it off. The %z feature
+ * would be an admittedly obscure one that most folks can
+ * live without, but it would be a great help to those of
+ * us that muck around with various message processors.
+ */
+ case 'z': /* time zone offset east of GMT e.g. -0600 */
+ if (timeptr->tm_isdst < 0)
+ break;
+#ifdef HAVE_TM_NAME
+ /*
+ * Systems with tm_name probably have tm_tzadj as
+ * secs west of GMT. Convert to mins east of GMT.
+ */
+ off = -timeptr->tm_tzadj / 60;
+#else /* !HAVE_TM_NAME */
+#ifdef HAVE_TM_ZONE
+ /*
+ * Systems with tm_zone probably have tm_gmtoff as
+ * secs east of GMT. Convert to mins east of GMT.
+ */
+ off = timeptr->tm_gmtoff / 60;
+#else /* !HAVE_TM_ZONE */
+#if HAVE_TZNAME
+ /*
+ * Systems with tzname[] probably have timezone as
+ * secs west of GMT. Convert to mins east of GMT.
+ */
+# ifdef HPUX
+ off = -timezone / 60;
+# else
+ off = -(daylight ? altzone : timezone) / 60;
+# endif /* !HPUX */
+#else /* !HAVE_TZNAME */
+ gettimeofday(& tv, & zone);
+ off = -zone.tz_minuteswest;
+#endif /* !HAVE_TZNAME */
+#endif /* !HAVE_TM_ZONE */
+#endif /* !HAVE_TM_NAME */
+ if (off < 0) {
+ tbuf[0] = '-';
+ off = -off;
+ } else {
+ tbuf[0] = '+';
+ }
+ sprintf(tbuf+1, "%02d%02d", off/60, off%60);
+ break;
+
+ case 'Z': /* time zone name or abbrevation */
+#ifdef HAVE_TZNAME
+ i = (daylight && timeptr->tm_isdst > 0); /* 0 or 1 */
+ strcpy(tbuf, tzname[i]);
+#else
+#ifdef HAVE_TM_ZONE
+ strcpy(tbuf, timeptr->tm_zone);
+#else
+#ifdef HAVE_TM_NAME
+ strcpy(tbuf, timeptr->tm_name);
+#else
+ gettimeofday(& tv, & zone);
+ strcpy(tbuf, timezone(zone.tz_minuteswest,
+ timeptr->tm_isdst > 0));
+#endif /* HAVE_TM_NAME */
+#endif /* HAVE_TM_ZONE */
+#endif /* HAVE_TZNAME */
+ break;
+
+#ifdef SUNOS_EXT
+ case 'k': /* hour, 24-hour clock, blank pad */
+ sprintf(tbuf, "%2d", range(0, timeptr->tm_hour, 23));
+ break;
+
+ case 'l': /* hour, 12-hour clock, 1 - 12, blank pad */
+ i = range(0, timeptr->tm_hour, 23);
+ if (i == 0)
+ i = 12;
+ else if (i > 12)
+ i -= 12;
+ sprintf(tbuf, "%2d", i);
+ break;
+#endif
+
+#ifdef HPUX_EXT
+ case 'N': /* Emperor/Era name */
+ /* this is essentially the same as the century */
+ goto century; /* %C */
+
+ case 'o': /* Emperor/Era year */
+ goto year; /* %y */
+#endif /* HPUX_EXT */
+
+
+#ifdef VMS_EXT
+ case 'v': /* date as dd-bbb-YYYY */
+ sprintf(tbuf, "%2d-%3.3s-%4d",
+ range(1, timeptr->tm_mday, 31),
+ months_a[range(0, timeptr->tm_mon, 11)],
+ timeptr->tm_year + 1900);
+ for (i = 3; i < 6; i++)
+ if (islower(tbuf[i]))
+ tbuf[i] = toupper(tbuf[i]);
+ break;
+#endif
+
+ default:
+ tbuf[0] = '%';
+ tbuf[1] = *format;
+ tbuf[2] = '\0';
+ break;
+ }
+ i = strlen(tbuf);
+ if (i) {
+ if (s + i < endp - 1) {
+ strcpy(s, tbuf);
+ s += i;
+ } else
+ return 0;
+ }
+ }
+out:
+ if (s < endp && *format == '\0') {
+ *s = '\0';
+ return (s - start);
+ } else
+ return 0;
+}
+
+/* isleap --- is a year a leap year? */
+
+static int
+isleap(int year)
+{
+ return ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0);
+}
+
+
+/* iso8601wknum --- compute week number according to ISO 8601 */
+
+static int
+iso8601wknum(const struct tm *timeptr)
+{
+ /*
+ * From 1003.2:
+ * If the week (Monday to Sunday) containing January 1
+ * has four or more days in the new year, then it is week 1;
+ * otherwise it is the highest numbered week of the previous
+ * year (52 or 53), and the next week is week 1.
+ *
+ * ADR: This means if Jan 1 was Monday through Thursday,
+ * it was week 1, otherwise week 52 or 53.
+ *
+ * XPG4 erroneously included POSIX.2 rationale text in the
+ * main body of the standard. Thus it requires week 53.
+ */
+
+ int weeknum, jan1day, diff;
+
+ /* get week number, Monday as first day of the week */
+ weeknum = weeknumber(timeptr, 1);
+
+ /*
+ * With thanks and tip of the hatlo to tml@tik.vtt.fi
+ *
+ * What day of the week does January 1 fall on?
+ * We know that
+ * (timeptr->tm_yday - jan1.tm_yday) MOD 7 ==
+ * (timeptr->tm_wday - jan1.tm_wday) MOD 7
+ * and that
+ * jan1.tm_yday == 0
+ * and that
+ * timeptr->tm_wday MOD 7 == timeptr->tm_wday
+ * from which it follows that. . .
+ */
+ jan1day = timeptr->tm_wday - (timeptr->tm_yday % 7);
+ if (jan1day < 0)
+ jan1day += 7;
+
+ /*
+ * If Jan 1 was a Monday through Thursday, it was in
+ * week 1. Otherwise it was last year's highest week, which is
+ * this year's week 0.
+ *
+ * What does that mean?
+ * If Jan 1 was Monday, the week number is exactly right, it can
+ * never be 0.
+ * If it was Tuesday through Thursday, the weeknumber is one
+ * less than it should be, so we add one.
+ * Otherwise, Friday, Saturday or Sunday, the week number is
+ * OK, but if it is 0, it needs to be 52 or 53.
+ */
+ switch (jan1day) {
+ case 1: /* Monday */
+ break;
+ case 2: /* Tuesday */
+ case 3: /* Wednesday */
+ case 4: /* Thursday */
+ weeknum++;
+ break;
+ case 5: /* Friday */
+ case 6: /* Saturday */
+ case 0: /* Sunday */
+ if (weeknum == 0) {
+#ifdef USE_BROKEN_XPG4
+ /* XPG4 (as of March 1994) says 53 unconditionally */
+ weeknum = 53;
+#else
+ /* get week number of last week of last year */
+ struct tm dec31ly; /* 12/31 last year */
+ dec31ly = *timeptr;
+ dec31ly.tm_year--;
+ dec31ly.tm_mon = 11;
+ dec31ly.tm_mday = 31;
+ dec31ly.tm_wday = (jan1day == 0) ? 6 : jan1day - 1;
+ dec31ly.tm_yday = 364 + isleap(dec31ly.tm_year + 1900);
+ weeknum = iso8601wknum(& dec31ly);
+#endif
+ }
+ break;
+ }
+
+ if (timeptr->tm_mon == 11) {
+ /*
+ * The last week of the year
+ * can be in week 1 of next year.
+ * Sigh.
+ *
+ * This can only happen if
+ * M T W
+ * 29 30 31
+ * 30 31
+ * 31
+ */
+ int wday, mday;
+
+ wday = timeptr->tm_wday;
+ mday = timeptr->tm_mday;
+ if ( (wday == 1 && (mday >= 29 && mday <= 31))
+ || (wday == 2 && (mday == 30 || mday == 31))
+ || (wday == 3 && mday == 31))
+ weeknum = 1;
+ }
+
+ return weeknum;
+}
+
+/* weeknumber --- figure how many weeks into the year */
+
+/* With thanks and tip of the hatlo to ado@elsie.nci.nih.gov */
+
+static int
+weeknumber(const struct tm *timeptr, int firstweekday)
+{
+ int wday = timeptr->tm_wday;
+ int ret;
+
+ if (firstweekday == 1) {
+ if (wday == 0) /* sunday */
+ wday = 6;
+ else
+ wday--;
+ }
+ ret = ((timeptr->tm_yday + 7 - wday) / 7);
+ if (ret < 0)
+ ret = 0;
+ return ret;
+}
+
+#if 0
+/* ADR --- I'm loathe to mess with ado's code ... */
+
+Date: Wed, 24 Apr 91 20:54:08 MDT
+From: Michal Jaegermann <audfax!emory!vm.ucs.UAlberta.CA!NTOMCZAK>
+To: arnold@audiofax.com
+
+Hi Arnold,
+in a process of fixing of strftime() in libraries on Atari ST I grabbed
+some pieces of code from your own strftime. When doing that it came
+to mind that your weeknumber() function compiles a little bit nicer
+in the following form:
+/*
+ * firstweekday is 0 if starting in Sunday, non-zero if in Monday
+ */
+{
+ return (timeptr->tm_yday - timeptr->tm_wday +
+ (firstweekday ? (timeptr->tm_wday ? 8 : 1) : 7)) / 7;
+}
+How nicer it depends on a compiler, of course, but always a tiny bit.
+
+ Cheers,
+ Michal
+ ntomczak@vm.ucs.ualberta.ca
+#endif
+
+#ifdef TEST_STRFTIME
+
+/*
+ * NAME:
+ * tst
+ *
+ * SYNOPSIS:
+ * tst
+ *
+ * DESCRIPTION:
+ * "tst" is a test driver for the function "strftime".
+ *
+ * OPTIONS:
+ * None.
+ *
+ * AUTHOR:
+ * Karl Vogel
+ * Control Data Systems, Inc.
+ * vogelke@c-17igp.wpafb.af.mil
+ *
+ * BUGS:
+ * None noticed yet.
+ *
+ * COMPILE:
+ * cc -o tst -DTEST_STRFTIME strftime.c
+ */
+
+/* ADR: I reformatted this to my liking, and deleted some unneeded code. */
+
+#ifndef NULL
+#include <stdio.h>
+#endif
+#include <sys/time.h>
+#include <string.h>
+
+#define MAXTIME 132
+
+/*
+ * Array of time formats.
+ */
+
+static char *array[] =
+{
+ "(%%A) full weekday name, var length (Sunday..Saturday) %A",
+ "(%%B) full month name, var length (January..December) %B",
+ "(%%C) Century %C",
+ "(%%D) date (%%m/%%d/%%y) %D",
+ "(%%E) Locale extensions (ignored) %E",
+ "(%%F) full month name, var length (January..December) %F",
+ "(%%H) hour (24-hour clock, 00..23) %H",
+ "(%%I) hour (12-hour clock, 01..12) %I",
+ "(%%M) minute (00..59) %M",
+ "(%%N) Emporer/Era Name %N",
+ "(%%O) Locale extensions (ignored) %O",
+ "(%%R) time, 24-hour (%%H:%%M) %R",
+ "(%%S) second (00..60) %S",
+ "(%%T) time, 24-hour (%%H:%%M:%%S) %T",
+ "(%%U) week of year, Sunday as first day of week (00..53) %U",
+ "(%%V) week of year according to ISO 8601 %V",
+ "(%%W) week of year, Monday as first day of week (00..53) %W",
+ "(%%X) appropriate locale time representation (%H:%M:%S) %X",
+ "(%%Y) year with century (1970...) %Y",
+ "(%%Z) timezone (EDT), or blank if timezone not determinable %Z",
+ "(%%a) locale's abbreviated weekday name (Sun..Sat) %a",
+ "(%%b) locale's abbreviated month name (Jan..Dec) %b",
+ "(%%c) full date (Sat Nov 4 12:02:33 1989)%n%t%t%t %c",
+ "(%%d) day of the month (01..31) %d",
+ "(%%e) day of the month, blank-padded ( 1..31) %e",
+ "(%%h) should be same as (%%b) %h",
+ "(%%j) day of the year (001..366) %j",
+ "(%%k) hour, 24-hour clock, blank pad ( 0..23) %k",
+ "(%%l) hour, 12-hour clock, blank pad ( 0..12) %l",
+ "(%%m) month (01..12) %m",
+ "(%%o) Emporer/Era Year %o",
+ "(%%p) locale's AM or PM based on 12-hour clock %p",
+ "(%%r) time, 12-hour (same as %%I:%%M:%%S %%p) %r",
+ "(%%u) ISO 8601: Weekday as decimal number [1 (Monday) - 7] %u",
+ "(%%v) VMS date (dd-bbb-YYYY) %v",
+ "(%%w) day of week (0..6, Sunday == 0) %w",
+ "(%%x) appropriate locale date representation %x",
+ "(%%y) last two digits of year (00..99) %y",
+ "(%%z) timezone offset east of GMT as HHMM (e.g. -0500) %z",
+ (char *) NULL
+};
+
+/* main routine. */
+
+int
+main(argc, argv)
+int argc;
+char **argv;
+{
+ long time();
+
+ char *next;
+ char string[MAXTIME];
+
+ int k;
+ int length;
+
+ struct tm *tm;
+
+ long clock;
+
+ /* Call the function. */
+
+ clock = time((long *) 0);
+ tm = localtime(&clock);
+
+ for (k = 0; next = array[k]; k++) {
+ length = strftime(string, MAXTIME, next, tm);
+ printf("%s\n", string);
+ }
+
+ exit(0);
+}
+#endif /* TEST_STRFTIME */
diff --git a/lib/sh/stringlist.c b/lib/sh/stringlist.c
new file mode 100644
index 0000000..b0c272a
--- /dev/null
+++ b/lib/sh/stringlist.c
@@ -0,0 +1,297 @@
+/* stringlist.c - functions to handle a generic `list of strings' structure */
+
+/* Copyright (C) 2000-2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <bashansi.h>
+
+#include "shell.h"
+
+#ifdef STRDUP
+# undef STRDUP
+#endif
+#define STRDUP(x) ((x) ? savestring (x) : (char *)NULL)
+
+/* Allocate a new STRINGLIST, with room for N strings. */
+
+STRINGLIST *
+strlist_create (n)
+ int n;
+{
+ STRINGLIST *ret;
+ register int i;
+
+ ret = (STRINGLIST *)xmalloc (sizeof (STRINGLIST));
+ if (n)
+ {
+ ret->list = strvec_create (n+1);
+ ret->list_size = n;
+ for (i = 0; i < n; i++)
+ ret->list[i] = (char *)NULL;
+ }
+ else
+ {
+ ret->list = (char **)NULL;
+ ret->list_size = 0;
+ }
+ ret->list_len = 0;
+ return ret;
+}
+
+STRINGLIST *
+strlist_resize (sl, n)
+ STRINGLIST *sl;
+ int n;
+{
+ register int i;
+
+ if (sl == 0)
+ return (sl = strlist_create (n));
+
+ if (n > sl->list_size)
+ {
+ sl->list = strvec_resize (sl->list, n + 1);
+ for (i = sl->list_size; i <= n; i++)
+ sl->list[i] = (char *)NULL;
+ sl->list_size = n;
+ }
+ return sl;
+}
+
+void
+strlist_flush (sl)
+ STRINGLIST *sl;
+{
+ if (sl == 0 || sl->list == 0)
+ return;
+ strvec_flush (sl->list);
+ sl->list_len = 0;
+}
+
+void
+strlist_dispose (sl)
+ STRINGLIST *sl;
+{
+ if (sl == 0)
+ return;
+ if (sl->list)
+ strvec_dispose (sl->list);
+ free (sl);
+}
+
+int
+strlist_remove (sl, s)
+ STRINGLIST *sl;
+ char *s;
+{
+ int r;
+
+ if (sl == 0 || sl->list == 0 || sl->list_len == 0)
+ return 0;
+
+ r = strvec_remove (sl->list, s);
+ if (r)
+ sl->list_len--;
+ return r;
+}
+
+STRINGLIST *
+strlist_copy (sl)
+ STRINGLIST *sl;
+{
+ STRINGLIST *new;
+ register int i;
+
+ if (sl == 0)
+ return ((STRINGLIST *)0);
+ new = strlist_create (sl->list_size);
+ /* I'd like to use strvec_copy, but that doesn't copy everything. */
+ if (sl->list)
+ {
+ for (i = 0; i < sl->list_size; i++)
+ new->list[i] = STRDUP (sl->list[i]);
+ }
+ new->list_size = sl->list_size;
+ new->list_len = sl->list_len;
+ /* just being careful */
+ if (new->list)
+ new->list[new->list_len] = (char *)NULL;
+ return new;
+}
+
+/* Return a new STRINGLIST with everything from M1 and M2. */
+
+STRINGLIST *
+strlist_merge (m1, m2)
+ STRINGLIST *m1, *m2;
+{
+ STRINGLIST *sl;
+ int i, n, l1, l2;
+
+ l1 = m1 ? m1->list_len : 0;
+ l2 = m2 ? m2->list_len : 0;
+
+ sl = strlist_create (l1 + l2 + 1);
+ for (i = n = 0; i < l1; i++, n++)
+ sl->list[n] = STRDUP (m1->list[i]);
+ for (i = 0; i < l2; i++, n++)
+ sl->list[n] = STRDUP (m2->list[i]);
+ sl->list_len = n;
+ sl->list[n] = (char *)NULL;
+ return (sl);
+}
+
+/* Make STRINGLIST M1 contain everything in M1 and M2. */
+STRINGLIST *
+strlist_append (m1, m2)
+ STRINGLIST *m1, *m2;
+{
+ register int i, n, len1, len2;
+
+ if (m1 == 0)
+ return (m2 ? strlist_copy (m2) : (STRINGLIST *)0);
+
+ len1 = m1->list_len;
+ len2 = m2 ? m2->list_len : 0;
+
+ if (len2)
+ {
+ m1 = strlist_resize (m1, len1 + len2 + 1);
+ for (i = 0, n = len1; i < len2; i++, n++)
+ m1->list[n] = STRDUP (m2->list[i]);
+ m1->list[n] = (char *)NULL;
+ m1->list_len = n;
+ }
+
+ return m1;
+}
+
+STRINGLIST *
+strlist_prefix_suffix (sl, prefix, suffix)
+ STRINGLIST *sl;
+ char *prefix, *suffix;
+{
+ int plen, slen, tlen, llen, i;
+ char *t;
+
+ if (sl == 0 || sl->list == 0 || sl->list_len == 0)
+ return sl;
+
+ plen = STRLEN (prefix);
+ slen = STRLEN (suffix);
+
+ if (plen == 0 && slen == 0)
+ return (sl);
+
+ for (i = 0; i < sl->list_len; i++)
+ {
+ llen = STRLEN (sl->list[i]);
+ tlen = plen + llen + slen + 1;
+ t = (char *)xmalloc (tlen + 1);
+ if (plen)
+ strcpy (t, prefix);
+ strcpy (t + plen, sl->list[i]);
+ if (slen)
+ strcpy (t + plen + llen, suffix);
+ free (sl->list[i]);
+ sl->list[i] = t;
+ }
+
+ return (sl);
+}
+
+void
+strlist_print (sl, prefix)
+ STRINGLIST *sl;
+ char *prefix;
+{
+ register int i;
+
+ if (sl == 0)
+ return;
+ for (i = 0; i < sl->list_len; i++)
+ printf ("%s%s\n", prefix ? prefix : "", sl->list[i]);
+}
+
+void
+strlist_walk (sl, func)
+ STRINGLIST *sl;
+ sh_strlist_map_func_t *func;
+{
+ register int i;
+
+ if (sl == 0)
+ return;
+ for (i = 0; i < sl->list_len; i++)
+ if ((*func)(sl->list[i]) < 0)
+ break;
+}
+
+void
+strlist_sort (sl)
+ STRINGLIST *sl;
+{
+ if (sl == 0 || sl->list_len == 0 || sl->list == 0)
+ return;
+ strvec_sort (sl->list);
+}
+
+STRINGLIST *
+strlist_from_word_list (list, alloc, starting_index, ip)
+ WORD_LIST *list;
+ int alloc, starting_index, *ip;
+{
+ STRINGLIST *ret;
+ int slen, len;
+
+ if (list == 0)
+ {
+ if (ip)
+ *ip = 0;
+ return ((STRINGLIST *)0);
+ }
+ slen = list_length (list);
+ ret = (STRINGLIST *)xmalloc (sizeof (STRINGLIST));
+ ret->list = strvec_from_word_list (list, alloc, starting_index, &len);
+ ret->list_size = slen + starting_index;
+ ret->list_len = len;
+ if (ip)
+ *ip = len;
+ return ret;
+}
+
+WORD_LIST *
+strlist_to_word_list (sl, alloc, starting_index)
+ STRINGLIST *sl;
+ int alloc, starting_index;
+{
+ WORD_LIST *list;
+
+ if (sl == 0 || sl->list == 0)
+ return ((WORD_LIST *)NULL);
+
+ list = strvec_to_word_list (sl->list, alloc, starting_index);
+ return list;
+}
diff --git a/lib/sh/stringvec.c b/lib/sh/stringvec.c
new file mode 100644
index 0000000..b0ed416
--- /dev/null
+++ b/lib/sh/stringvec.c
@@ -0,0 +1,232 @@
+/* stringvec.c - functions for managing arrays of strings. */
+
+/* Copyright (C) 2000-2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <bashtypes.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <bashansi.h>
+#include <stdio.h>
+#include <chartypes.h>
+
+#include "shell.h"
+
+/* Allocate an array of strings with room for N members. */
+char **
+strvec_create (n)
+ int n;
+{
+ return ((char **)xmalloc ((n) * sizeof (char *)));
+}
+
+char **
+strvec_resize (array, nsize)
+ char **array;
+ int nsize;
+{
+ return ((char **)xrealloc (array, nsize * sizeof (char *)));
+}
+
+/* Return the length of ARRAY, a NULL terminated array of char *. */
+int
+strvec_len (array)
+ char **array;
+{
+ register int i;
+
+ for (i = 0; array[i]; i++);
+ return (i);
+}
+
+/* Free the contents of ARRAY, a NULL terminated array of char *. */
+void
+strvec_flush (array)
+ char **array;
+{
+ register int i;
+
+ if (array == 0)
+ return;
+
+ for (i = 0; array[i]; i++)
+ free (array[i]);
+}
+
+void
+strvec_dispose (array)
+ char **array;
+{
+ if (array == 0)
+ return;
+
+ strvec_flush (array);
+ free (array);
+}
+
+int
+strvec_remove (array, name)
+ char **array, *name;
+{
+ register int i, j;
+ char *x;
+
+ if (array == 0)
+ return 0;
+
+ for (i = 0; array[i]; i++)
+ if (STREQ (name, array[i]))
+ {
+ x = array[i];
+ for (j = i; array[j]; j++)
+ array[j] = array[j + 1];
+ free (x);
+ return 1;
+ }
+ return 0;
+}
+
+#ifdef INCLUDE_UNUSED
+/* Find NAME in ARRAY. Return the index of NAME, or -1 if not present.
+ ARRAY should be NULL terminated. */
+int
+strvec_search (array, name)
+ char **array, *name;
+{
+ int i;
+
+ for (i = 0; array[i]; i++)
+ if (STREQ (name, array[i]))
+ return (i);
+
+ return (-1);
+}
+#endif
+
+/* Allocate and return a new copy of ARRAY and its contents. */
+char **
+strvec_copy (array)
+ char **array;
+{
+ register int i;
+ int len;
+ char **ret;
+
+ len = strvec_len (array);
+
+ ret = (char **)xmalloc ((len + 1) * sizeof (char *));
+ for (i = 0; array[i]; i++)
+ ret[i] = savestring (array[i]);
+ ret[i] = (char *)NULL;
+
+ return (ret);
+}
+
+/* Comparison routine for use with qsort() on arrays of strings. Uses
+ strcoll(3) if available, otherwise it uses strcmp(3). */
+int
+strvec_strcmp (s1, s2)
+ register char **s1, **s2;
+{
+#if defined (HAVE_STRCOLL)
+ return (strcoll (*s1, *s2));
+#else /* !HAVE_STRCOLL */
+ int result;
+
+ if ((result = **s1 - **s2) == 0)
+ result = strcmp (*s1, *s2);
+
+ return (result);
+#endif /* !HAVE_STRCOLL */
+}
+
+/* Sort ARRAY, a null terminated array of pointers to strings. */
+void
+strvec_sort (array)
+ char **array;
+{
+ qsort (array, strvec_len (array), sizeof (char *), (QSFUNC *)strvec_strcmp);
+}
+
+/* Cons up a new array of words. The words are taken from LIST,
+ which is a WORD_LIST *. If ALLOC is true, everything is malloc'ed,
+ so you should free everything in this array when you are done.
+ The array is NULL terminated. If IP is non-null, it gets the
+ number of words in the returned array. STARTING_INDEX says where
+ to start filling in the returned array; it can be used to reserve
+ space at the beginning of the array. */
+
+char **
+strvec_from_word_list (list, alloc, starting_index, ip)
+ WORD_LIST *list;
+ int alloc, starting_index, *ip;
+{
+ int count;
+ char **array;
+
+ count = list_length (list);
+ array = (char **)xmalloc ((1 + count + starting_index) * sizeof (char *));
+
+ for (count = 0; count < starting_index; count++)
+ array[count] = (char *)NULL;
+ for (count = starting_index; list; count++, list = list->next)
+ array[count] = alloc ? savestring (list->word->word) : list->word->word;
+ array[count] = (char *)NULL;
+
+ if (ip)
+ *ip = count;
+ return (array);
+}
+
+/* Convert an array of strings into the form used internally by the shell.
+ ALLOC means to allocate new storage for each WORD_DESC in the returned
+ list rather than copy the values in ARRAY. STARTING_INDEX says where
+ in ARRAY to begin. */
+
+WORD_LIST *
+strvec_to_word_list (array, alloc, starting_index)
+ char **array;
+ int alloc, starting_index;
+{
+ WORD_LIST *list;
+ WORD_DESC *w;
+ int i, count;
+
+ if (array == 0 || array[0] == 0)
+ return (WORD_LIST *)NULL;
+
+ for (count = 0; array[count]; count++)
+ ;
+
+ for (i = starting_index, list = (WORD_LIST *)NULL; i < count; i++)
+ {
+ w = make_bare_word (alloc ? array[i] : "");
+ if (alloc == 0)
+ {
+ free (w->word);
+ w->word = array[i];
+ }
+ list = make_word_list (w, list);
+ }
+ return (REVERSE_LIST (list, WORD_LIST *));
+}
diff --git a/lib/sh/strnlen.c b/lib/sh/strnlen.c
new file mode 100644
index 0000000..10414d3
--- /dev/null
+++ b/lib/sh/strnlen.c
@@ -0,0 +1,49 @@
+/* strnlen - return length of passed string, with length limit */
+
+/* Copyright (C) 2004 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if !defined (HAVE_STRNLEN)
+
+#include <sys/types.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdc.h>
+
+/* Find the length of S, but scan at most MAXLEN characters. If no '\0'
+ terminator is found within the first MAXLEN characters, return MAXLEN. */
+size_t
+strnlen (s, maxlen)
+ register const char *s;
+ size_t maxlen;
+{
+ register const char *e;
+ size_t n;
+
+ for (e = s, n = 0; *e && n < maxlen; e++, n++)
+ ;
+ return n;
+}
+#endif
diff --git a/lib/sh/strpbrk.c b/lib/sh/strpbrk.c
new file mode 100644
index 0000000..4439986
--- /dev/null
+++ b/lib/sh/strpbrk.c
@@ -0,0 +1,49 @@
+/* strpbrk.c - locate multiple characters in a string */
+
+/* Copyright (C) 1991, 1994 Free Software Foundation, Inc.
+
+ NOTE: The canonical source of this file is maintained with the GNU C Library.
+ Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if !defined (HAVE_STRPBRK)
+
+#include <stdc.h>
+
+/* Find the first ocurrence in S of any character in ACCEPT. */
+char *
+strpbrk (s, accept)
+ register const char *s;
+ register const char *accept;
+{
+ while (*s != '\0')
+ {
+ const char *a = accept;
+ while (*a != '\0')
+ if (*a++ == *s)
+ return (char *) s;
+ ++s;
+ }
+
+ return 0;
+}
+#endif
diff --git a/lib/sh/strstr.c b/lib/sh/strstr.c
new file mode 100644
index 0000000..c43b05e
--- /dev/null
+++ b/lib/sh/strstr.c
@@ -0,0 +1,125 @@
+/* strstr - find a substring within a string */
+
+/* Copyright (C) 1994, 1999 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ * My personal strstr() implementation that beats most other algorithms.
+ * Until someone tells me otherwise, I assume that this is the
+ * fastest implementation of strstr() in C.
+ * I deliberately chose not to comment it. You should have at least
+ * as much fun trying to understand it, as I had to write it :-).
+ *
+ * Stephen R. van den Berg, berg@pool.informatik.rwth-aachen.de */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if defined _LIBC || defined HAVE_STRING_H
+# include <string.h>
+#endif
+#include <sys/types.h>
+
+typedef unsigned chartype;
+
+#undef strstr
+
+char *
+strstr (const char *phaystack, const char *pneedle)
+{
+ register const unsigned char *haystack, *needle;
+ register chartype b, c;
+
+ haystack = (const unsigned char *) phaystack;
+ needle = (const unsigned char *) pneedle;
+
+ b = *needle;
+ if (b != '\0')
+ {
+ haystack--; /* possible ANSI violation */
+ do
+ {
+ c = *++haystack;
+ if (c == '\0')
+ goto ret0;
+ }
+ while (c != b);
+
+ c = *++needle;
+ if (c == '\0')
+ goto foundneedle;
+ ++needle;
+ goto jin;
+
+ for (;;)
+ {
+ register chartype a;
+ register const unsigned char *rhaystack, *rneedle;
+
+ do
+ {
+ a = *++haystack;
+ if (a == '\0')
+ goto ret0;
+ if (a == b)
+ break;
+ a = *++haystack;
+ if (a == '\0')
+ goto ret0;
+shloop:; }
+ while (a != b);
+
+jin: a = *++haystack;
+ if (a == '\0')
+ goto ret0;
+
+ if (a != c)
+ goto shloop;
+
+ rhaystack = haystack-- + 1;
+ rneedle = needle;
+ a = *rneedle;
+
+ if (*rhaystack == a)
+ do
+ {
+ if (a == '\0')
+ goto foundneedle;
+ ++rhaystack;
+ a = *++needle;
+ if (*rhaystack != a)
+ break;
+ if (a == '\0')
+ goto foundneedle;
+ ++rhaystack;
+ a = *++needle;
+ }
+ while (*rhaystack == a);
+
+ needle = rneedle; /* took the register-poor approach */
+
+ if (a == '\0')
+ break;
+ }
+ }
+foundneedle:
+ return (char*) haystack;
+ret0:
+ return 0;
+}
diff --git a/lib/sh/strtod.c b/lib/sh/strtod.c
new file mode 100644
index 0000000..851d99b
--- /dev/null
+++ b/lib/sh/strtod.c
@@ -0,0 +1,201 @@
+/* strtod.c - convert string to double-precision floating-point value. */
+
+/* Copyright (C) 1991, 1992 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#ifndef HAVE_STRTOD
+
+#include <errno.h>
+#ifndef errno
+extern int errno;
+#endif
+
+#include <chartypes.h>
+#include <math.h>
+
+#if HAVE_FLOAT_H
+# include <float.h>
+#else
+# define DBL_MAX 1.7976931348623159e+308
+# define DBL_MIN 2.2250738585072010e-308
+#endif
+
+#include <bashansi.h>
+
+#ifndef NULL
+# define NULL 0
+#endif
+
+#ifndef HUGE_VAL
+# define HUGE_VAL HUGE
+#endif
+
+/* Convert NPTR to a double. If ENDPTR is not NULL, a pointer to the
+ character after the last one used in the number is put in *ENDPTR. */
+double
+strtod (nptr, endptr)
+ const char *nptr;
+ char **endptr;
+{
+ register const char *s;
+ short sign;
+
+ /* The number so far. */
+ double num;
+
+ int got_dot; /* Found a decimal point. */
+ int got_digit; /* Seen any digits. */
+
+ /* The exponent of the number. */
+ long int exponent;
+
+ if (nptr == NULL)
+ {
+ errno = EINVAL;
+ goto noconv;
+ }
+
+ s = nptr;
+
+ /* Eat whitespace. */
+ while (ISSPACE ((unsigned char)*s))
+ ++s;
+
+ /* Get the sign. */
+ sign = *s == '-' ? -1 : 1;
+ if (*s == '-' || *s == '+')
+ ++s;
+
+ num = 0.0;
+ got_dot = 0;
+ got_digit = 0;
+ exponent = 0;
+ for (;; ++s)
+ {
+ if (DIGIT (*s))
+ {
+ got_digit = 1;
+
+ /* Make sure that multiplication by 10 will not overflow. */
+ if (num > DBL_MAX * 0.1)
+ /* The value of the digit doesn't matter, since we have already
+ gotten as many digits as can be represented in a `double'.
+ This doesn't necessarily mean the result will overflow.
+ The exponent may reduce it to within range.
+
+ We just need to record that there was another
+ digit so that we can multiply by 10 later. */
+ ++exponent;
+ else
+ num = (num * 10.0) + (*s - '0');
+
+ /* Keep track of the number of digits after the decimal point.
+ If we just divided by 10 here, we would lose precision. */
+ if (got_dot)
+ --exponent;
+ }
+ else if (!got_dot && *s == '.')
+ /* Record that we have found the decimal point. */
+ got_dot = 1;
+ else
+ /* Any other character terminates the number. */
+ break;
+ }
+
+ if (!got_digit)
+ goto noconv;
+
+ if (TOLOWER ((unsigned char)*s) == 'e')
+ {
+ /* Get the exponent specified after the `e' or `E'. */
+ int save = errno;
+ char *end;
+ long int exp;
+
+ errno = 0;
+ ++s;
+ exp = strtol (s, &end, 10);
+ if (errno == ERANGE)
+ {
+ /* The exponent overflowed a `long int'. It is probably a safe
+ assumption that an exponent that cannot be represented by
+ a `long int' exceeds the limits of a `double'. */
+ if (endptr != NULL)
+ *endptr = end;
+ if (exp < 0)
+ goto underflow;
+ else
+ goto overflow;
+ }
+ else if (end == s)
+ /* There was no exponent. Reset END to point to
+ the 'e' or 'E', so *ENDPTR will be set there. */
+ end = (char *) s - 1;
+ errno = save;
+ s = end;
+ exponent += exp;
+ }
+
+ if (endptr != NULL)
+ *endptr = (char *) s;
+
+ if (num == 0.0)
+ return 0.0;
+
+ /* Multiply NUM by 10 to the EXPONENT power,
+ checking for overflow and underflow. */
+
+ if (exponent < 0)
+ {
+ if (num < DBL_MIN * pow (10.0, (double) -exponent))
+ goto underflow;
+ }
+ else if (exponent > 0)
+ {
+ if (num > DBL_MAX * pow (10.0, (double) -exponent))
+ goto overflow;
+ }
+
+ num *= pow (10.0, (double) exponent);
+
+ return num * sign;
+
+overflow:
+ /* Return an overflow error. */
+ errno = ERANGE;
+ return HUGE_VAL * sign;
+
+underflow:
+ /* Return an underflow error. */
+ if (endptr != NULL)
+ *endptr = (char *) nptr;
+ errno = ERANGE;
+ return 0.0;
+
+noconv:
+ /* There was no number. */
+ if (endptr != NULL)
+ *endptr = (char *) nptr;
+ return 0.0;
+}
+
+#endif /* !HAVE_STRTOD */
diff --git a/lib/sh/strtoimax.c b/lib/sh/strtoimax.c
new file mode 100644
index 0000000..a4170f0
--- /dev/null
+++ b/lib/sh/strtoimax.c
@@ -0,0 +1,113 @@
+/* strtoimax - convert string representation of a number into an intmax_t value. */
+
+/* Copyright 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Written by Paul Eggert. Modified by Chet Ramey for Bash. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#include <stdc.h>
+
+/* Verify a requirement at compile-time (unlike assert, which is runtime). */
+#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; }
+
+#ifndef HAVE_DECL_STRTOL
+"this configure-time declaration test was not run"
+#endif
+#if !HAVE_DECL_STRTOL
+extern long strtol __P((const char *, char **, int));
+#endif
+
+#ifndef HAVE_DECL_STRTOLL
+"this configure-time declaration test was not run"
+#endif
+#if !HAVE_DECL_STRTOLL && HAVE_LONG_LONG
+extern long long strtoll __P((const char *, char **, int));
+#endif
+
+#ifdef strtoimax
+#undef strtoimax
+#endif
+
+intmax_t
+strtoimax (ptr, endptr, base)
+ const char *ptr;
+ char **endptr;
+ int base;
+{
+#if HAVE_LONG_LONG
+ verify(size_is_that_of_long_or_long_long,
+ (sizeof (intmax_t) == sizeof (long) ||
+ sizeof (intmax_t) == sizeof (long long)));
+
+ if (sizeof (intmax_t) != sizeof (long))
+ return (strtoll (ptr, endptr, base));
+#else
+ verify (size_is_that_of_long, sizeof (intmax_t) == sizeof (long));
+#endif
+
+ return (strtol (ptr, endptr, base));
+}
+
+#ifdef TESTING
+# include <stdio.h>
+int
+main ()
+{
+ char *p, *endptr;
+ intmax_t x;
+#if HAVE_LONG_LONG
+ long long y;
+#endif
+ long z;
+
+ printf ("sizeof intmax_t: %d\n", sizeof (intmax_t));
+
+#if HAVE_LONG_LONG
+ printf ("sizeof long long: %d\n", sizeof (long long));
+#endif
+ printf ("sizeof long: %d\n", sizeof (long));
+
+ x = strtoimax("42", &endptr, 10);
+#if HAVE_LONG_LONG
+ y = strtoll("42", &endptr, 10);
+#else
+ y = -1;
+#endif
+ z = strtol("42", &endptr, 10);
+
+ printf ("%lld %lld %ld\n", x, y, z);
+
+ exit (0);
+}
+#endif
diff --git a/lib/sh/strtol.c b/lib/sh/strtol.c
new file mode 100644
index 0000000..8aa7478
--- /dev/null
+++ b/lib/sh/strtol.c
@@ -0,0 +1,259 @@
+/* strtol - convert string representation of a number into a long integer value. */
+
+/* Copyright (C) 1991,92,94,95,96,97,98,99,2000,2001 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if !defined (HAVE_STRTOL)
+
+#include <chartypes.h>
+#include <errno.h>
+
+#ifndef errno
+extern int errno;
+#endif
+
+#ifndef __set_errno
+# define __set_errno(Val) errno = (Val)
+#endif
+
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
+
+#include <typemax.h>
+
+#include <stdc.h>
+#include <bashansi.h>
+
+#ifndef NULL
+# define NULL 0
+#endif
+
+/* Nonzero if we are defining `strtoul' or `strtoull', operating on
+ unsigned integers. */
+#ifndef UNSIGNED
+# define UNSIGNED 0
+# define INT LONG int
+#else
+# define INT unsigned LONG int
+#endif
+
+#if UNSIGNED
+# ifdef QUAD
+# define strtol strtoull
+# else
+# define strtol strtoul
+# endif
+#else
+# ifdef QUAD
+# define strtol strtoll
+# endif
+#endif
+
+/* If QUAD is defined, we are defining `strtoll' or `strtoull',
+ operating on `long long ints. */
+
+#ifdef QUAD
+# define LONG long long
+# define STRTOL_LONG_MIN LLONG_MIN
+# define STRTOL_LONG_MAX LLONG_MAX
+# define STRTOL_ULONG_MAX ULLONG_MAX
+#else /* !QUAD */
+# define LONG long
+# define STRTOL_LONG_MIN LONG_MIN
+# define STRTOL_LONG_MAX LONG_MAX
+# define STRTOL_ULONG_MAX ULONG_MAX
+#endif
+
+/* Convert NPTR to an `unsigned long int' or `long int' in base BASE.
+ If BASE is 0 the base is determined by the presence of a leading
+ zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal.
+ If BASE is < 2 or > 36, it is no longer reset to 10; EINVAL is returned.
+ If ENDPTR is not NULL, a pointer to the character after the last
+ one converted is stored in *ENDPTR. */
+
+INT
+strtol (nptr, endptr, base)
+ const char *nptr;
+ char **endptr;
+ int base;
+{
+ int negative;
+ register unsigned LONG int cutoff;
+ register unsigned int cutlim;
+ register unsigned LONG int i;
+ register const char *s;
+ register unsigned char c;
+ const char *save, *end;
+ int overflow;
+
+ if (base < 0 || base == 1 || base > 36)
+ {
+ __set_errno (EINVAL);
+ return 0;
+ }
+
+ save = s = nptr;
+
+ /* Skip white space. */
+ while (ISSPACE ((unsigned char)*s))
+ ++s;
+ if (*s == '\0')
+ goto noconv;
+
+ /* Check for a sign. */
+ if (*s == '-' || *s == '+')
+ {
+ negative = (*s == '-');
+ ++s;
+ }
+ else
+ negative = 0;
+
+ /* Recognize number prefix and if BASE is zero, figure it out ourselves. */
+ if (*s == '0')
+ {
+ if ((base == 0 || base == 16) && TOUPPER ((unsigned char) s[1]) == 'X')
+ {
+ s += 2;
+ base = 16;
+ }
+ else if (base == 0)
+ base = 8;
+ }
+ else if (base == 0)
+ base = 10;
+
+ /* Save the pointer so we can check later if anything happened. */
+ save = s;
+
+ end = NULL;
+
+ cutoff = STRTOL_ULONG_MAX / (unsigned LONG int) base;
+ cutlim = STRTOL_ULONG_MAX % (unsigned LONG int) base;
+
+ overflow = 0;
+ i = 0;
+ c = *s;
+ if (sizeof (long int) != sizeof (LONG int))
+ {
+ unsigned long int j = 0;
+ unsigned long int jmax = ULONG_MAX / base;
+
+ for (;c != '\0'; c = *++s)
+ {
+ if (s == end)
+ break;
+ if (DIGIT (c))
+ c -= '0';
+ else if (ISALPHA (c))
+ c = TOUPPER (c) - 'A' + 10;
+ else
+ break;
+
+ if ((int) c >= base)
+ break;
+ /* Note that we never can have an overflow. */
+ else if (j >= jmax)
+ {
+ /* We have an overflow. Now use the long representation. */
+ i = (unsigned LONG int) j;
+ goto use_long;
+ }
+ else
+ j = j * (unsigned long int) base + c;
+ }
+
+ i = (unsigned LONG int) j;
+ }
+ else
+ for (;c != '\0'; c = *++s)
+ {
+ if (s == end)
+ break;
+ if (DIGIT (c))
+ c -= '0';
+ else if (ISALPHA (c))
+ c = TOUPPER (c) - 'A' + 10;
+ else
+ break;
+ if ((int) c >= base)
+ break;
+ /* Check for overflow. */
+ if (i > cutoff || (i == cutoff && c > cutlim))
+ overflow = 1;
+ else
+ {
+ use_long:
+ i *= (unsigned LONG int) base;
+ i += c;
+ }
+ }
+
+ /* Check if anything actually happened. */
+ if (s == save)
+ goto noconv;
+
+ /* Store in ENDPTR the address of one character
+ past the last character we converted. */
+ if (endptr != NULL)
+ *endptr = (char *) s;
+
+#if !UNSIGNED
+ /* Check for a value that is within the range of
+ `unsigned LONG int', but outside the range of `LONG int'. */
+ if (overflow == 0
+ && i > (negative
+ ? -((unsigned LONG int) (STRTOL_LONG_MIN + 1)) + 1
+ : (unsigned LONG int) STRTOL_LONG_MAX))
+ overflow = 1;
+#endif
+
+ if (overflow)
+ {
+ __set_errno (ERANGE);
+#if UNSIGNED
+ return STRTOL_ULONG_MAX;
+#else
+ return negative ? STRTOL_LONG_MIN : STRTOL_LONG_MAX;
+#endif
+ }
+
+ /* Return the result of the appropriate sign. */
+ return negative ? -i : i;
+
+noconv:
+ /* We must handle a special case here: the base is 0 or 16 and the
+ first two characters are '0' and 'x', but the rest are no
+ hexadecimal digits. This is no error case. We return 0 and
+ ENDPTR points to the `x`. */
+ if (endptr != NULL)
+ {
+ if (save - nptr >= 2 && TOUPPER ((unsigned char) save[-1]) == 'X' && save[-2] == '0')
+ *endptr = (char *) &save[-1];
+ else
+ /* There was no number to convert. */
+ *endptr = (char *) nptr;
+ }
+
+ return 0L;
+}
+
+#endif /* !HAVE_STRTOL */
diff --git a/lib/sh/strtoll.c b/lib/sh/strtoll.c
new file mode 100644
index 0000000..f6060ee
--- /dev/null
+++ b/lib/sh/strtoll.c
@@ -0,0 +1,30 @@
+/* strtoll - convert string representation of a number into a long long value. */
+
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_LONG_LONG) && !defined (HAVE_STRTOLL)
+
+#define QUAD 1
+#undef HAVE_STRTOL
+
+#include "strtol.c"
+
+#endif /* HAVE_LONG_LONG && !HAVE_STRTOLL */
diff --git a/lib/sh/strtoul.c b/lib/sh/strtoul.c
new file mode 100644
index 0000000..cbaa484
--- /dev/null
+++ b/lib/sh/strtoul.c
@@ -0,0 +1,30 @@
+/* strtoul - convert string representation of a number into an unsigned long value. */
+
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#ifndef HAVE_STRTOUL
+
+#define UNSIGNED 1
+#undef HAVE_STRTOL
+
+#include <strtol.c>
+
+#endif /* !HAVE_STRTOUL */
diff --git a/lib/sh/strtoull.c b/lib/sh/strtoull.c
new file mode 100644
index 0000000..02ddebb
--- /dev/null
+++ b/lib/sh/strtoull.c
@@ -0,0 +1,31 @@
+/* strtoull - convert string representation of a number into an unsigned long long value. */
+
+/* Copyright (C) 1997 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_LONG_LONG) && !defined (HAVE_STRTOULL)
+
+#define QUAD 1
+#define UNSIGNED 1
+#undef HAVE_STRTOL
+
+#include "strtol.c"
+
+#endif /* HAVE_LONG_LONG && !HAVE_STRTOULL */
diff --git a/lib/sh/strtoumax.c b/lib/sh/strtoumax.c
new file mode 100644
index 0000000..09423ad
--- /dev/null
+++ b/lib/sh/strtoumax.c
@@ -0,0 +1,113 @@
+/* strtoumax - convert string representation of a number into an uintmax_t value. */
+
+/* Copyright 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Written by Paul Eggert. Modified by Chet Ramey for Bash. */
+
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+
+#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+
+#include <stdc.h>
+
+/* Verify a requirement at compile-time (unlike assert, which is runtime). */
+#define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; }
+
+#ifndef HAVE_DECL_STRTOUL
+"this configure-time declaration test was not run"
+#endif
+#if !HAVE_DECL_STRTOUL
+extern unsigned long strtoul __P((const char *, char **, int));
+#endif
+
+#ifndef HAVE_DECL_STRTOULL
+"this configure-time declaration test was not run"
+#endif
+#if !HAVE_DECL_STRTOULL && HAVE_UNSIGNED_LONG_LONG
+extern unsigned long long strtoull __P((const char *, char **, int));
+#endif
+
+#ifdef strtoumax
+#undef strtoumax
+#endif
+
+uintmax_t
+strtoumax (ptr, endptr, base)
+ const char *ptr;
+ char **endptr;
+ int base;
+{
+#if HAVE_UNSIGNED_LONG_LONG
+ verify (size_is_that_of_unsigned_long_or_unsigned_long_long,
+ (sizeof (uintmax_t) == sizeof (unsigned long) ||
+ sizeof (uintmax_t) == sizeof (unsigned long long)));
+
+ if (sizeof (uintmax_t) != sizeof (unsigned long))
+ return (strtoull (ptr, endptr, base));
+#else
+ verify (size_is_that_of_unsigned_long, sizeof (uintmax_t) == sizeof (unsigned long));
+#endif
+
+ return (strtoul (ptr, endptr, base));
+}
+
+#ifdef TESTING
+# include <stdio.h>
+int
+main ()
+{
+ char *p, *endptr;
+ uintmax_t x;
+#if HAVE_UNSIGNED_LONG_LONG
+ unsigned long long y;
+#endif
+ unsigned long z;
+
+ printf ("sizeof uintmax_t: %d\n", sizeof (uintmax_t));
+
+#if HAVE_UNSIGNED_LONG_LONG
+ printf ("sizeof unsigned long long: %d\n", sizeof (unsigned long long));
+#endif
+ printf ("sizeof unsigned long: %d\n", sizeof (unsigned long));
+
+ x = strtoumax("42", &endptr, 10);
+#if HAVE_LONG_LONG
+ y = strtoull("42", &endptr, 10);
+#else
+ y = 0;
+#endif
+ z = strtoul("42", &endptr, 10);
+
+ printf ("%llu %llu %lu\n", x, y, z);
+
+ exit (0);
+}
+#endif
diff --git a/lib/sh/strtrans.c b/lib/sh/strtrans.c
new file mode 100644
index 0000000..355a306
--- /dev/null
+++ b/lib/sh/strtrans.c
@@ -0,0 +1,282 @@
+/* strtrans.c - Translate and untranslate strings with ANSI-C escape sequences. */
+
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <bashansi.h>
+#include <stdio.h>
+#include <chartypes.h>
+
+#include "shell.h"
+
+#ifdef ESC
+#undef ESC
+#endif
+#define ESC '\033' /* ASCII */
+
+/* Convert STRING by expanding the escape sequences specified by the
+ ANSI C standard. If SAWC is non-null, recognize `\c' and use that
+ as a string terminator. If we see \c, set *SAWC to 1 before
+ returning. LEN is the length of STRING. If (FLAGS&1) is non-zero,
+ that we're translating a string for `echo -e', and therefore should not
+ treat a single quote as a character that may be escaped with a backslash.
+ If (FLAGS&2) is non-zero, we're expanding for the parser and want to
+ quote CTLESC and CTLNUL with CTLESC. If (flags&4) is non-zero, we want
+ to remove the backslash before any unrecognized escape sequence. */
+char *
+ansicstr (string, len, flags, sawc, rlen)
+ char *string;
+ int len, flags, *sawc, *rlen;
+{
+ int c, temp;
+ char *ret, *r, *s;
+
+ if (string == 0 || *string == '\0')
+ return ((char *)NULL);
+
+ ret = (char *)xmalloc (2*len + 1); /* 2*len for possible CTLESC */
+ for (r = ret, s = string; s && *s; )
+ {
+ c = *s++;
+ if (c != '\\' || *s == '\0')
+ *r++ = c;
+ else
+ {
+ switch (c = *s++)
+ {
+#if defined (__STDC__)
+ case 'a': c = '\a'; break;
+ case 'v': c = '\v'; break;
+#else
+ case 'a': c = '\007'; break;
+ case 'v': c = (int) 0x0B; break;
+#endif
+ case 'b': c = '\b'; break;
+ case 'e': case 'E': /* ESC -- non-ANSI */
+ c = ESC; break;
+ case 'f': c = '\f'; break;
+ case 'n': c = '\n'; break;
+ case 'r': c = '\r'; break;
+ case 't': c = '\t'; break;
+ case '1': case '2': case '3':
+ case '4': case '5': case '6':
+ case '7':
+#if 1
+ if (flags & 1)
+ {
+ *r++ = '\\';
+ break;
+ }
+ /*FALLTHROUGH*/
+#endif
+ case '0':
+ /* If (FLAGS & 1), we're translating a string for echo -e (or
+ the equivalent xpg_echo option), so we obey the SUSv3/
+ POSIX-2001 requirement and accept 0-3 octal digits after
+ a leading `0'. */
+ temp = 2 + ((flags & 1) && (c == '0'));
+ for (c -= '0'; ISOCTAL (*s) && temp--; s++)
+ c = (c * 8) + OCTVALUE (*s);
+ c &= 0xFF;
+ break;
+ case 'x': /* Hex digit -- non-ANSI */
+ if ((flags & 2) && *s == '{')
+ {
+ flags |= 16; /* internal flag value */
+ s++;
+ }
+ /* Consume at least two hex characters */
+ for (temp = 2, c = 0; ISXDIGIT ((unsigned char)*s) && temp--; s++)
+ c = (c * 16) + HEXVALUE (*s);
+ /* DGK says that after a `\x{' ksh93 consumes ISXDIGIT chars
+ until a non-xdigit or `}', so potentially more than two
+ chars are consumed. */
+ if (flags & 16)
+ {
+ for ( ; ISXDIGIT ((unsigned char)*s); s++)
+ c = (c * 16) + HEXVALUE (*s);
+ flags &= ~16;
+ if (*s == '}')
+ s++;
+ }
+ /* \x followed by non-hex digits is passed through unchanged */
+ else if (temp == 2)
+ {
+ *r++ = '\\';
+ c = 'x';
+ }
+ c &= 0xFF;
+ break;
+ case '\\':
+ break;
+ case '\'': case '"': case '?':
+ if (flags & 1)
+ *r++ = '\\';
+ break;
+ case 'c':
+ if (sawc)
+ {
+ *sawc = 1;
+ *r = '\0';
+ if (rlen)
+ *rlen = r - ret;
+ return ret;
+ }
+ else if ((flags & 1) == 0 && (c = *s))
+ {
+ s++;
+ c = TOCTRL(c);
+ break;
+ }
+ /*FALLTHROUGH*/
+ default:
+ if ((flags & 4) == 0)
+ *r++ = '\\';
+ break;
+ }
+ if ((flags & 2) && (c == CTLESC || c == CTLNUL))
+ *r++ = CTLESC;
+ *r++ = c;
+ }
+ }
+ *r = '\0';
+ if (rlen)
+ *rlen = r - ret;
+ return ret;
+}
+
+/* Take a string STR, possibly containing non-printing characters, and turn it
+ into a $'...' ANSI-C style quoted string. Returns a new string. */
+char *
+ansic_quote (str, flags, rlen)
+ char *str;
+ int flags, *rlen;
+{
+ char *r, *ret, *s;
+ int l, rsize;
+ unsigned char c;
+
+ if (str == 0 || *str == 0)
+ return ((char *)0);
+
+ l = strlen (str);
+ rsize = 4 * l + 4;
+ r = ret = (char *)xmalloc (rsize);
+
+ *r++ = '$';
+ *r++ = '\'';
+
+ for (s = str, l = 0; *s; s++)
+ {
+ c = *s;
+ l = 1; /* 1 == add backslash; 0 == no backslash */
+ switch (c)
+ {
+ case ESC: c = 'E'; break;
+#ifdef __STDC__
+ case '\a': c = 'a'; break;
+ case '\v': c = 'v'; break;
+#else
+ case '\007': c = 'a'; break;
+ case 0x0b: c = 'v'; break;
+#endif
+
+ case '\b': c = 'b'; break;
+ case '\f': c = 'f'; break;
+ case '\n': c = 'n'; break;
+ case '\r': c = 'r'; break;
+ case '\t': c = 't'; break;
+ case '\\':
+ case '\'':
+ break;
+ default:
+ if (ISPRINT (c) == 0)
+ {
+ *r++ = '\\';
+ *r++ = TOCHAR ((c >> 6) & 07);
+ *r++ = TOCHAR ((c >> 3) & 07);
+ *r++ = TOCHAR (c & 07);
+ continue;
+ }
+ l = 0;
+ break;
+ }
+ if (l)
+ *r++ = '\\';
+ *r++ = c;
+ }
+
+ *r++ = '\'';
+ *r = '\0';
+ if (rlen)
+ *rlen = r - ret;
+ return ret;
+}
+
+/* return 1 if we need to quote with $'...' because of non-printing chars. */
+int
+ansic_shouldquote (string)
+ const char *string;
+{
+ const char *s;
+ unsigned char c;
+
+ if (string == 0)
+ return 0;
+
+ for (s = string; c = *s; s++)
+ if (ISPRINT (c) == 0)
+ return 1;
+
+ return 0;
+}
+
+/* $'...' ANSI-C expand the portion of STRING between START and END and
+ return the result. The result cannot be longer than the input string. */
+char *
+ansiexpand (string, start, end, lenp)
+ char *string;
+ int start, end, *lenp;
+{
+ char *temp, *t;
+ int len, tlen;
+
+ temp = (char *)xmalloc (end - start + 1);
+ for (tlen = 0, len = start; len < end; )
+ temp[tlen++] = string[len++];
+ temp[tlen] = '\0';
+
+ if (*temp)
+ {
+ t = ansicstr (temp, tlen, 2, (int *)NULL, lenp);
+ free (temp);
+ return (t);
+ }
+ else
+ {
+ if (lenp)
+ *lenp = 0;
+ return (temp);
+ }
+}
diff --git a/lib/sh/times.c b/lib/sh/times.c
new file mode 100644
index 0000000..47ddf57
--- /dev/null
+++ b/lib/sh/times.c
@@ -0,0 +1,77 @@
+/* times.c - times(3) library function */
+
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if !defined (HAVE_TIMES)
+
+#include <sys/types.h>
+#include <posixtime.h>
+#include <systimes.h>
+
+#if defined (HAVE_SYS_RESOURCE_H) && defined (HAVE_GETRUSAGE)
+# include <sys/resource.h>
+#endif /* HAVE_SYS_RESOURCE_H && HAVE_GETRUSAGE */
+
+extern long get_clk_tck __P((void));
+
+#define CONVTCK(r) (r.tv_sec * clk_tck + r.tv_usec / (1000000 / clk_tck))
+
+clock_t
+times(tms)
+ struct tms *tms;
+{
+ clock_t rv;
+ static long clk_tck = -1;
+
+#if defined (HAVE_GETRUSAGE)
+ struct timeval tv;
+ struct rusage ru;
+
+ if (clk_tck == -1)
+ clk_tck = get_clk_tck();
+
+ if (getrusage(RUSAGE_SELF, &ru) < 0)
+ return ((clock_t)-1);
+ tms->tms_utime = CONVTCK(ru.ru_utime);
+ tms->tms_stime = CONVTCK(ru.ru_stime);
+
+ if (getrusage(RUSAGE_CHILDREN, &ru) < 0)
+ return ((clock_t)-1);
+ tms->tms_cutime = CONVTCK(ru.ru_utime);
+ tms->tms_cstime = CONVTCK(ru.ru_stime);
+
+ if (gettimeofday(&tv, (struct timezone *) 0) < 0)
+ return ((clock_t)-1);
+ rv = (clock_t)(CONVTCK(tv));
+#else /* !HAVE_GETRUSAGE */
+ if (clk_tck == -1)
+ clk_tck = get_clk_tck();
+
+ /* We can't do anything. */
+ tms->tms_utime = tms->tms_stime = (clock_t)0;
+ tms->tms_cutime = tms->tms_cstime = (clock_t)0;
+
+ rv = (clock_t)time((time_t *)0) * clk_tck;
+# endif /* HAVE_GETRUSAGE */
+
+ return rv;
+}
+#endif /* !HAVE_TIMES */
diff --git a/lib/sh/timeval.c b/lib/sh/timeval.c
new file mode 100644
index 0000000..7bd9df8
--- /dev/null
+++ b/lib/sh/timeval.c
@@ -0,0 +1,145 @@
+/* timeval.c - functions to perform operations on struct timevals */
+
+/* Copyright (C) 1999 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (HAVE_TIMEVAL)
+
+#include <sys/types.h>
+#include <posixtime.h>
+
+#include <stdio.h>
+
+struct timeval *
+difftimeval (d, t1, t2)
+ struct timeval *d, *t1, *t2;
+{
+ d->tv_sec = t2->tv_sec - t1->tv_sec;
+ d->tv_usec = t2->tv_usec - t1->tv_usec;
+ if (d->tv_usec < 0)
+ {
+ d->tv_usec += 1000000;
+ d->tv_sec -= 1;
+ if (d->tv_sec < 0) /* ??? -- BSD/OS does this */
+ {
+ d->tv_sec = 0;
+ d->tv_usec = 0;
+ }
+ }
+ return d;
+}
+
+struct timeval *
+addtimeval (d, t1, t2)
+ struct timeval *d, *t1, *t2;
+{
+ d->tv_sec = t1->tv_sec + t2->tv_sec;
+ d->tv_usec = t1->tv_usec + t2->tv_usec;
+ if (d->tv_usec >= 1000000)
+ {
+ d->tv_usec -= 1000000;
+ d->tv_sec += 1;
+ }
+ return d;
+}
+
+/* Do "cpu = ((user + sys) * 10000) / real;" with timevals.
+ Barely-tested code from Deven T. Corzine <deven@ties.org>. */
+int
+timeval_to_cpu (rt, ut, st)
+ struct timeval *rt, *ut, *st; /* real, user, sys */
+{
+ struct timeval t1, t2;
+ register int i;
+
+ addtimeval (&t1, ut, st);
+ t2.tv_sec = rt->tv_sec;
+ t2.tv_usec = rt->tv_usec;
+
+ for (i = 0; i < 6; i++)
+ {
+ if ((t1.tv_sec > 99999999) || (t2.tv_sec > 99999999))
+ break;
+ t1.tv_sec *= 10;
+ t1.tv_sec += t1.tv_usec / 100000;
+ t1.tv_usec *= 10;
+ t1.tv_usec %= 1000000;
+ t2.tv_sec *= 10;
+ t2.tv_sec += t2.tv_usec / 100000;
+ t2.tv_usec *= 10;
+ t2.tv_usec %= 1000000;
+ }
+ for (i = 0; i < 4; i++)
+ {
+ if (t1.tv_sec < 100000000)
+ t1.tv_sec *= 10;
+ else
+ t2.tv_sec /= 10;
+ }
+
+ return ((t2.tv_sec == 0) ? 0 : t1.tv_sec / t2.tv_sec);
+}
+
+/* Convert a pointer to a struct timeval to seconds and thousandths of a
+ second, returning the values in *SP and *SFP, respectively. This does
+ rounding on the fractional part, not just truncation to three places. */
+void
+timeval_to_secs (tvp, sp, sfp)
+ struct timeval *tvp;
+ time_t *sp;
+ int *sfp;
+{
+ int rest;
+
+ *sp = tvp->tv_sec;
+
+ *sfp = tvp->tv_usec % 1000000; /* pretty much a no-op */
+ rest = *sfp % 1000;
+ *sfp = (*sfp * 1000) / 1000000;
+ if (rest >= 500)
+ *sfp += 1;
+
+ /* Sanity check */
+ if (*sfp >= 1000)
+ {
+ *sp += 1;
+ *sfp -= 1000;
+ }
+}
+
+/* Print the contents of a struct timeval * in a standard way to stdio
+ stream FP. */
+void
+print_timeval (fp, tvp)
+ FILE *fp;
+ struct timeval *tvp;
+{
+ time_t timestamp;
+ long minutes;
+ int seconds, seconds_fraction;
+
+ timeval_to_secs (tvp, &timestamp, &seconds_fraction);
+
+ minutes = timestamp / 60;
+ seconds = timestamp % 60;
+
+ fprintf (fp, "%ldm%d.%03ds", minutes, seconds, seconds_fraction);
+}
+#endif /* HAVE_TIMEVAL */
diff --git a/lib/sh/tmpfile.c b/lib/sh/tmpfile.c
new file mode 100644
index 0000000..a87c254
--- /dev/null
+++ b/lib/sh/tmpfile.c
@@ -0,0 +1,220 @@
+/*
+ * tmpfile.c - functions to create and safely open temp files for the shell.
+ */
+
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <bashtypes.h>
+#include <posixstat.h>
+#include <posixtime.h>
+#include <filecntl.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <errno.h>
+
+#include <shell.h>
+
+#ifndef errno
+extern int errno;
+#endif
+
+#define BASEOPENFLAGS (O_CREAT | O_TRUNC | O_EXCL)
+
+#define DEFAULT_TMPDIR "." /* bogus default, should be changed */
+#define DEFAULT_NAMEROOT "shtmp"
+
+extern pid_t dollar_dollar_pid;
+
+static char *get_sys_tmpdir __P((void));
+static char *get_tmpdir __P((int));
+
+static char *sys_tmpdir = (char *)NULL;
+static int ntmpfiles;
+static int tmpnamelen = -1;
+static unsigned long filenum = 1L;
+
+static char *
+get_sys_tmpdir ()
+{
+ if (sys_tmpdir)
+ return sys_tmpdir;
+
+#ifdef P_tmpdir
+ sys_tmpdir = P_tmpdir;
+ if (file_iswdir (sys_tmpdir))
+ return sys_tmpdir;
+#endif
+
+ sys_tmpdir = "/tmp";
+ if (file_iswdir (sys_tmpdir))
+ return sys_tmpdir;
+
+ sys_tmpdir = "/var/tmp";
+ if (file_iswdir (sys_tmpdir))
+ return sys_tmpdir;
+
+ sys_tmpdir = "/usr/tmp";
+ if (file_iswdir (sys_tmpdir))
+ return sys_tmpdir;
+
+ sys_tmpdir = DEFAULT_TMPDIR;
+
+ return sys_tmpdir;
+}
+
+static char *
+get_tmpdir (flags)
+ int flags;
+{
+ char *tdir;
+
+ tdir = (flags & MT_USETMPDIR) ? get_string_value ("TMPDIR") : (char *)NULL;
+ if (tdir && (file_iswdir (tdir) == 0 || strlen (tdir) > PATH_MAX))
+ tdir = 0;
+
+ if (tdir == 0)
+ tdir = get_sys_tmpdir ();
+
+#if defined (HAVE_PATHCONF) && defined (_PC_NAME_MAX)
+ if (tmpnamelen == -1)
+ tmpnamelen = pathconf (tdir, _PC_NAME_MAX);
+#else
+ tmpnamelen = 0;
+#endif
+
+ return tdir;
+}
+
+char *
+sh_mktmpname (nameroot, flags)
+ char *nameroot;
+ int flags;
+{
+ char *filename, *tdir, *lroot;
+ struct stat sb;
+ int r, tdlen;
+
+ filename = (char *)xmalloc (PATH_MAX + 1);
+ tdir = get_tmpdir (flags);
+ tdlen = strlen (tdir);
+
+ lroot = nameroot ? nameroot : DEFAULT_NAMEROOT;
+
+#ifdef USE_MKTEMP
+ sprintf (filename, "%s/%s.XXXXXX", tdir, lroot);
+ if (mktemp (filename) == 0)
+ {
+ free (filename);
+ filename = NULL;
+ }
+#else /* !USE_MKTEMP */
+ while (1)
+ {
+ filenum = (filenum << 1) ^
+ (unsigned long) time ((time_t *)0) ^
+ (unsigned long) dollar_dollar_pid ^
+ (unsigned long) ((flags & MT_USERANDOM) ? get_random_number () : ntmpfiles++);
+ sprintf (filename, "%s/%s-%lu", tdir, lroot, filenum);
+ if (tmpnamelen > 0 && tmpnamelen < 32)
+ filename[tdlen + 1 + tmpnamelen] = '\0';
+# ifdef HAVE_LSTAT
+ r = lstat (filename, &sb);
+# else
+ r = stat (filename, &sb);
+# endif
+ if (r < 0 && errno == ENOENT)
+ break;
+ }
+#endif /* !USE_MKTEMP */
+
+ return filename;
+}
+
+int
+sh_mktmpfd (nameroot, flags, namep)
+ char *nameroot;
+ int flags;
+ char **namep;
+{
+ char *filename, *tdir, *lroot;
+ int fd, tdlen;
+
+ filename = (char *)xmalloc (PATH_MAX + 1);
+ tdir = get_tmpdir (flags);
+ tdlen = strlen (tdir);
+
+ lroot = nameroot ? nameroot : DEFAULT_NAMEROOT;
+
+#ifdef USE_MKSTEMP
+ sprintf (filename, "%s/%s.XXXXXX", tdir, lroot);
+ fd = mkstemp (filename);
+ if (fd < 0 || namep == 0)
+ {
+ free (filename);
+ filename = NULL;
+ }
+ if (namep)
+ *namep = filename;
+ return fd;
+#else /* !USE_MKSTEMP */
+ do
+ {
+ filenum = (filenum << 1) ^
+ (unsigned long) time ((time_t *)0) ^
+ (unsigned long) dollar_dollar_pid ^
+ (unsigned long) ((flags & MT_USERANDOM) ? get_random_number () : ntmpfiles++);
+ sprintf (filename, "%s/%s-%lu", tdir, lroot, filenum);
+ if (tmpnamelen > 0 && tmpnamelen < 32)
+ filename[tdlen + 1 + tmpnamelen] = '\0';
+ fd = open (filename, BASEOPENFLAGS | ((flags & MT_READWRITE) ? O_RDWR : O_WRONLY), 0600);
+ }
+ while (fd < 0 && errno == EEXIST);
+
+ if (namep)
+ *namep = filename;
+ else
+ free (filename);
+
+ return fd;
+#endif /* !USE_MKSTEMP */
+}
+
+FILE *
+sh_mktmpfp (nameroot, flags, namep)
+ char *nameroot;
+ int flags;
+ char **namep;
+{
+ int fd;
+ FILE *fp;
+
+ fd = sh_mktmpfd (nameroot, flags, namep);
+ if (fd < 0)
+ return ((FILE *)NULL);
+ fp = fdopen (fd, (flags & MT_READWRITE) ? "w+" : "w");
+ if (fp == 0)
+ close (fd);
+ return fp;
+}
diff --git a/lib/sh/uconvert.c b/lib/sh/uconvert.c
new file mode 100644
index 0000000..3d656df
--- /dev/null
+++ b/lib/sh/uconvert.c
@@ -0,0 +1,116 @@
+/* uconvert - convert string representations of decimal numbers into whole
+ number/fractional value pairs. */
+
+/* Copyright (C) 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+
+#if defined (TIME_WITH_SYS_TIME)
+# include <sys/time.h>
+# include <time.h>
+#else
+# if defined (HAVE_SYS_TIME_H)
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
+#if defined (HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include "chartypes.h"
+
+#include "shell.h"
+#include "builtins.h"
+
+#define DECIMAL '.' /* XXX - should use locale */
+
+#define RETURN(x) \
+do { \
+ if (ip) *ip = ipart * mult; \
+ if (up) *up = upart; \
+ return (x); \
+} while (0)
+
+/*
+ * An incredibly simplistic floating point converter.
+ */
+static int multiplier[7] = { 1, 100000, 10000, 1000, 100, 10, 1 };
+
+/* Take a decimal number int-part[.[micro-part]] and convert it to the whole
+ and fractional portions. The fractional portion is returned in
+ millionths (micro); callers are responsible for multiplying appropriately.
+ Return 1 if value converted; 0 if invalid integer for either whole or
+ fractional parts. */
+int
+uconvert(s, ip, up)
+ char *s;
+ long *ip, *up;
+{
+ int n, mult;
+ long ipart, upart;
+ char *p;
+
+ ipart = upart = 0;
+ mult = 1;
+
+ if (s && (*s == '-' || *s == '+'))
+ {
+ mult = (*s == '-') ? -1 : 1;
+ p = s + 1;
+ }
+ else
+ p = s;
+
+ for ( ; p && *p; p++)
+ {
+ if (*p == DECIMAL) /* decimal point */
+ break;
+ if (DIGIT(*p) == 0)
+ RETURN(0);
+ ipart = (ipart * 10) + (*p - '0');
+ }
+
+ if (p == 0 || *p == 0) /* callers ensure p can never be 0; this is to shut up clang */
+ RETURN(1);
+
+ if (*p == DECIMAL)
+ p++;
+
+ /* Look for up to six digits past a decimal point. */
+ for (n = 0; n < 6 && p[n]; n++)
+ {
+ if (DIGIT(p[n]) == 0)
+ RETURN(0);
+ upart = (upart * 10) + (p[n] - '0');
+ }
+
+ /* Now convert to millionths */
+ upart *= multiplier[n];
+
+ if (n == 6 && p[6] >= '5' && p[6] <= '9')
+ upart++; /* round up 1 */
+
+ RETURN(1);
+}
diff --git a/lib/sh/ufuncs.c b/lib/sh/ufuncs.c
new file mode 100644
index 0000000..ed526fe
--- /dev/null
+++ b/lib/sh/ufuncs.c
@@ -0,0 +1,104 @@
+/* ufuncs - sleep and alarm functions that understand fractional values */
+
+/* Copyright (C) 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+
+#if defined (TIME_WITH_SYS_TIME)
+# include <sys/time.h>
+# include <time.h>
+#else
+# if defined (HAVE_SYS_TIME_H)
+# include <sys/time.h>
+# else
+# include <time.h>
+# endif
+#endif
+
+#if defined (HAVE_UNISTD_H)
+#include <unistd.h>
+#endif
+
+/* A version of `alarm' using setitimer if it's available. */
+
+#if defined (HAVE_SETITIMER)
+unsigned int
+falarm(secs, usecs)
+ unsigned int secs, usecs;
+{
+ struct itimerval it, oit;
+
+ it.it_interval.tv_sec = 0;
+ it.it_interval.tv_usec = 0;
+
+ it.it_value.tv_sec = secs;
+ it.it_value.tv_usec = usecs;
+
+ if (setitimer(ITIMER_REAL, &it, &oit) < 0)
+ return (-1); /* XXX will be converted to unsigned */
+
+ /* Backwards compatibility with alarm(3) */
+ if (oit.it_value.tv_usec)
+ oit.it_value.tv_sec++;
+ return (oit.it_value.tv_sec);
+}
+#else
+int
+falarm (secs, usecs)
+ unsigned int secs, usecs;
+{
+ if (secs == 0 && usecs == 0)
+ return (alarm (0));
+
+ if (secs == 0 || usecs >= 500000)
+ {
+ secs++;
+ usecs = 0;
+ }
+ return (alarm (secs));
+}
+#endif /* !HAVE_SETITIMER */
+
+/* A version of sleep using fractional seconds and select. I'd like to use
+ `usleep', but it's already taken */
+
+#if defined (HAVE_TIMEVAL) && defined (HAVE_SELECT)
+int
+fsleep(sec, usec)
+ unsigned int sec, usec;
+{
+ struct timeval tv;
+
+ tv.tv_sec = sec;
+ tv.tv_usec = usec;
+
+ return select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &tv);
+}
+#else /* !HAVE_TIMEVAL || !HAVE_SELECT */
+int
+fsleep(sec, usec)
+ long sec, usec;
+{
+ if (usec >= 500000) /* round */
+ sec++;
+ return (sleep(sec));
+}
+#endif /* !HAVE_TIMEVAL || !HAVE_SELECT */
diff --git a/lib/sh/vprint.c b/lib/sh/vprint.c
new file mode 100644
index 0000000..567fba3
--- /dev/null
+++ b/lib/sh/vprint.c
@@ -0,0 +1,85 @@
+/* vprint.c -- v[fs]printf() for 4.[23] BSD systems. */
+
+/* Copyright (C) 1987,1989 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (USE_VFPRINTF_EMULATION)
+
+#include <stdio.h>
+
+#if !defined (NULL)
+# if defined (__STDC__)
+# define NULL ((void *)0)
+# else
+# define NULL 0x0
+# endif /* __STDC__ */
+#endif /* !NULL */
+
+/*
+ * Beware! Don't trust the value returned by either of these functions; it
+ * seems that pre-4.3-tahoe implementations of _doprnt () return the first
+ * argument, i.e. a char *.
+ */
+#include <varargs.h>
+
+int
+vfprintf (iop, fmt, ap)
+ FILE *iop;
+ char *fmt;
+ va_list ap;
+{
+ int len;
+ char localbuf[BUFSIZ];
+
+ if (iop->_flag & _IONBF)
+ {
+ iop->_flag &= ~_IONBF;
+ iop->_ptr = iop->_base = localbuf;
+ len = _doprnt (fmt, ap, iop);
+ (void) fflush (iop);
+ iop->_flag |= _IONBF;
+ iop->_base = NULL;
+ iop->_bufsiz = 0;
+ iop->_cnt = 0;
+ }
+ else
+ len = _doprnt (fmt, ap, iop);
+ return (ferror (iop) ? EOF : len);
+}
+
+/*
+ * Ditto for vsprintf
+ */
+int
+vsprintf (str, fmt, ap)
+ char *str, *fmt;
+ va_list ap;
+{
+ FILE f;
+ int len;
+
+ f._flag = _IOWRT|_IOSTRG;
+ f._ptr = str;
+ f._cnt = 32767;
+ len = _doprnt (fmt, ap, &f);
+ *f._ptr = 0;
+ return (len);
+}
+#endif /* USE_VFPRINTF_EMULATION */
diff --git a/lib/sh/wcsdup.c b/lib/sh/wcsdup.c
new file mode 100644
index 0000000..62a3c86
--- /dev/null
+++ b/lib/sh/wcsdup.c
@@ -0,0 +1,44 @@
+/* wcsdup.c - duplicate wide character string */
+
+/* Copyright (C) 2006 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if !defined (HAVE_WCSDUP) && defined (HANDLE_MULTIBYTE)
+
+#include <stdc.h>
+#include <wchar.h>
+#include <bashansi.h>
+#include <xmalloc.h>
+
+wchar_t *
+wcsdup (ws)
+ const wchar_t *ws;
+{
+ wchar_t *ret;
+ size_t len;
+
+ len = wcslen (ws);
+ ret = xmalloc ((len + 1) * sizeof (wchar_t));
+ if (ret == 0)
+ return ret;
+
+ return (wcscpy (ret, ws));
+}
+#endif /* !HAVE_WCSDUP && HANDLE_MULTIBYTE */
diff --git a/lib/sh/winsize.c b/lib/sh/winsize.c
new file mode 100644
index 0000000..64a9858
--- /dev/null
+++ b/lib/sh/winsize.c
@@ -0,0 +1,96 @@
+/* winsize.c - handle window size changes and information. */
+
+/* Copyright (C) 2005 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include <stdc.h>
+
+#include "bashtypes.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <sys/ioctl.h>
+
+/* Try to find the definitions of `struct winsize' and TIOGCWINSZ */
+
+#if defined (GWINSZ_IN_SYS_IOCTL) && !defined (TIOCGWINSZ)
+# include <sys/ioctl.h>
+#endif /* GWINSZ_IN_SYS_IOCTL && !TIOCGWINSZ */
+
+#if defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL)
+# include <termios.h>
+#endif /* STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */
+
+/* Not in either of the standard places, look around. */
+#if !defined (STRUCT_WINSIZE_IN_TERMIOS) && !defined (STRUCT_WINSIZE_IN_SYS_IOCTL)
+# if defined (HAVE_SYS_STREAM_H)
+# include <sys/stream.h>
+# endif /* HAVE_SYS_STREAM_H */
+# if defined (HAVE_SYS_PTEM_H) /* SVR4.2, at least, has it here */
+# include <sys/ptem.h>
+# define _IO_PTEM_H /* work around SVR4.2 1.1.4 bug */
+# endif /* HAVE_SYS_PTEM_H */
+# if defined (HAVE_SYS_PTE_H) /* ??? */
+# include <sys/pte.h>
+# endif /* HAVE_SYS_PTE_H */
+#endif /* !STRUCT_WINSIZE_IN_TERMIOS && !STRUCT_WINSIZE_IN_SYS_IOCTL */
+
+#include <stdio.h>
+
+/* Return the fd from which we are actually getting input. */
+#define input_tty() (shell_tty != -1) ? shell_tty : fileno (stderr)
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+extern int shell_tty;
+
+#if defined (READLINE)
+extern void rl_set_screen_size __P((int, int));
+#endif
+extern void sh_set_lines_and_columns __P((int, int));
+
+void
+get_new_window_size (from_sig, rp, cp)
+ int from_sig;
+ int *rp, *cp;
+{
+#if defined (TIOCGWINSZ)
+ struct winsize win;
+ int tty;
+
+ tty = input_tty ();
+ if (tty >= 0 && (ioctl (tty, TIOCGWINSZ, &win) == 0) &&
+ win.ws_row > 0 && win.ws_col > 0)
+ {
+ sh_set_lines_and_columns (win.ws_row, win.ws_col);
+#if defined (READLINE)
+ rl_set_screen_size (win.ws_row, win.ws_col);
+ if (rp)
+ *rp = win.ws_row;
+ if (cp)
+ *cp = win.ws_col;
+#endif
+ }
+#endif
+}
diff --git a/lib/sh/zcatfd.c b/lib/sh/zcatfd.c
new file mode 100644
index 0000000..bdbcd91
--- /dev/null
+++ b/lib/sh/zcatfd.c
@@ -0,0 +1,70 @@
+/* zcatfd - copy contents of file descriptor to another */
+
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <sys/types.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <errno.h>
+
+#include <stdc.h>
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+extern ssize_t zread __P((int, char *, size_t));
+extern int zwrite __P((int, char *, ssize_t));
+
+/* Dump contents of file descriptor FD to OFD. FN is the filename for
+ error messages (not used right now). */
+int
+zcatfd (fd, ofd, fn)
+ int fd, ofd;
+ char *fn;
+{
+ ssize_t nr;
+ int rval;
+ char lbuf[128];
+
+ rval = 0;
+ while (1)
+ {
+ nr = zread (fd, lbuf, sizeof (lbuf));
+ if (nr == 0)
+ break;
+ else if (nr < 0)
+ {
+ rval = -1;
+ break;
+ }
+ else if (zwrite (ofd, lbuf, nr) < 0)
+ {
+ rval = -1;
+ break;
+ }
+ }
+
+ return rval;
+}
diff --git a/lib/sh/zgetline.c b/lib/sh/zgetline.c
new file mode 100644
index 0000000..33ac830
--- /dev/null
+++ b/lib/sh/zgetline.c
@@ -0,0 +1,121 @@
+/* zgetline - read a line of input from a specified file descriptor and return
+ a pointer to a newly-allocated buffer containing the data. */
+
+/* Copyright (C) 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <sys/types.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <errno.h>
+#include "xmalloc.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+extern ssize_t zread __P((int, char *, size_t));
+extern ssize_t zreadc __P((int, char *));
+extern ssize_t zreadintr __P((int, char *, size_t));
+extern ssize_t zreadcintr __P((int, char *));
+
+typedef ssize_t breadfunc_t __P((int, char *, size_t));
+typedef ssize_t creadfunc_t __P((int, char *));
+
+/* Initial memory allocation for automatic growing buffer in zreadlinec */
+#define GET_LINE_INITIAL_ALLOCATION 16
+
+/* Derived from GNU libc's getline.
+ The behavior is almost the same as getline. See man getline.
+ The differences are
+ (1) using file descriptor instead of FILE *,
+ (2) the order of arguments; the file descriptor comes the first, and
+ (3) the addtion of thired argument, UNBUFFERED_READ; this argument
+ controls whether get_line uses buffering or not to get a byte data
+ from FD. get_line uses zreadc if UNBUFFERED_READ is zero; and
+ uses zread if UNBUFFERED_READ is non-zero.
+
+ Returns number of bytes read or -1 on error. */
+
+ssize_t
+zgetline (fd, lineptr, n, unbuffered_read)
+ int fd;
+ char **lineptr;
+ size_t *n;
+ int unbuffered_read;
+{
+ int nr, retval;
+ char *line, c;
+
+ if (lineptr == 0 || n == 0 || (*lineptr == 0 && *n != 0))
+ return -1;
+
+ nr = 0;
+ line = *lineptr;
+
+ while (1)
+ {
+ retval = unbuffered_read ? zread (fd, &c, 1) : zreadc(fd, &c);
+
+ if (retval <= 0)
+ {
+ if (line && nr > 0)
+ line[nr] = '\0';
+ break;
+ }
+
+ if (nr + 2 >= *n)
+ {
+ size_t new_size;
+
+ new_size = (*n == 0) ? GET_LINE_INITIAL_ALLOCATION : *n * 2;
+ line = (*n >= new_size) ? NULL : xrealloc (*lineptr, new_size);
+
+ if (line)
+ {
+ *lineptr = line;
+ *n = new_size;
+ }
+ else
+ {
+ if (*n > 0)
+ {
+ (*lineptr)[*n - 1] = '\0';
+ nr = *n - 2;
+ }
+ break;
+ }
+ }
+
+ line[nr] = c;
+ nr++;
+
+ if (c == '\n')
+ {
+ line[nr] = '\0';
+ break;
+ }
+ }
+
+ return nr - 1;
+}
diff --git a/lib/sh/zmapfd.c b/lib/sh/zmapfd.c
new file mode 100644
index 0000000..4000c4a
--- /dev/null
+++ b/lib/sh/zmapfd.c
@@ -0,0 +1,90 @@
+/* zmapfd - read contents of file descriptor into a newly-allocated buffer */
+
+/* Copyright (C) 2006 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <sys/types.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <errno.h>
+
+#include "bashansi.h"
+#include "command.h"
+#include "general.h"
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+extern ssize_t zread __P((int, char *, size_t));
+
+/* Dump contents of file descriptor FD to *OSTR. FN is the filename for
+ error messages (not used right now). */
+int
+zmapfd (fd, ostr, fn)
+ int fd;
+ char **ostr;
+ char *fn;
+{
+ ssize_t nr;
+ int rval;
+ char lbuf[128];
+ char *result;
+ int rsize, rind;
+
+ rval = 0;
+ result = (char *)xmalloc (rsize = 64);
+ rind = 0;
+
+ while (1)
+ {
+ nr = zread (fd, lbuf, sizeof (lbuf));
+ if (nr == 0)
+ {
+ rval = rind;
+ break;
+ }
+ else if (nr < 0)
+ {
+ rval = -1;
+ free (result);
+ if (ostr)
+ *ostr = (char *)NULL;
+ break;
+ }
+
+ RESIZE_MALLOCED_BUFFER (result, rind, nr, rsize, 128);
+ memcpy (result+rind, lbuf, nr);
+ rind += nr;
+ }
+
+ RESIZE_MALLOCED_BUFFER (result, rind, 1, rsize, 128);
+ result[rind] = '\0';
+
+ if (ostr)
+ *ostr = result;
+ else
+ free (result);
+
+ return rval;
+}
diff --git a/lib/sh/zread.c b/lib/sh/zread.c
new file mode 100644
index 0000000..0fd1199
--- /dev/null
+++ b/lib/sh/zread.c
@@ -0,0 +1,173 @@
+/* zread - read data from file descriptor into buffer with retries */
+
+/* Copyright (C) 1999-2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <sys/types.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <errno.h>
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+#ifndef SEEK_CUR
+# define SEEK_CUR 1
+#endif
+
+/* Read LEN bytes from FD into BUF. Retry the read on EINTR. Any other
+ error causes the loop to break. */
+ssize_t
+zread (fd, buf, len)
+ int fd;
+ char *buf;
+ size_t len;
+{
+ ssize_t r;
+
+ while ((r = read (fd, buf, len)) < 0 && errno == EINTR)
+ ;
+ return r;
+}
+
+/* Read LEN bytes from FD into BUF. Retry the read on EINTR, up to three
+ interrupts. Any other error causes the loop to break. */
+
+#ifdef NUM_INTR
+# undef NUM_INTR
+#endif
+#define NUM_INTR 3
+
+ssize_t
+zreadretry (fd, buf, len)
+ int fd;
+ char *buf;
+ size_t len;
+{
+ ssize_t r;
+ int nintr;
+
+ for (nintr = 0; ; )
+ {
+ r = read (fd, buf, len);
+ if (r >= 0)
+ return r;
+ if (r == -1 && errno == EINTR)
+ {
+ if (++nintr >= NUM_INTR)
+ return -1;
+ continue;
+ }
+ return r;
+ }
+}
+
+/* Call read(2) and allow it to be interrupted. Just a stub for now. */
+ssize_t
+zreadintr (fd, buf, len)
+ int fd;
+ char *buf;
+ size_t len;
+{
+ return (read (fd, buf, len));
+}
+
+/* Read one character from FD and return it in CP. Return values are as
+ in read(2). This does some local buffering to avoid many one-character
+ calls to read(2), like those the `read' builtin performs. */
+
+static char lbuf[128];
+static size_t lind, lused;
+
+ssize_t
+zreadc (fd, cp)
+ int fd;
+ char *cp;
+{
+ ssize_t nr;
+
+ if (lind == lused || lused == 0)
+ {
+ nr = zread (fd, lbuf, sizeof (lbuf));
+ lind = 0;
+ if (nr <= 0)
+ {
+ lused = 0;
+ return nr;
+ }
+ lused = nr;
+ }
+ if (cp)
+ *cp = lbuf[lind++];
+ return 1;
+}
+
+/* Don't mix calls to zreadc and zreadcintr in the same function, since they
+ use the same local buffer. */
+ssize_t
+zreadcintr (fd, cp)
+ int fd;
+ char *cp;
+{
+ ssize_t nr;
+
+ if (lind == lused || lused == 0)
+ {
+ nr = zreadintr (fd, lbuf, sizeof (lbuf));
+ lind = 0;
+ if (nr <= 0)
+ {
+ lused = 0;
+ return nr;
+ }
+ lused = nr;
+ }
+ if (cp)
+ *cp = lbuf[lind++];
+ return 1;
+}
+
+void
+zreset ()
+{
+ lind = lused = 0;
+}
+
+/* Sync the seek pointer for FD so that the kernel's idea of the last char
+ read is the last char returned by zreadc. */
+void
+zsyncfd (fd)
+ int fd;
+{
+ off_t off;
+ int r;
+
+ off = lused - lind;
+ r = 0;
+ if (off > 0)
+ r = lseek (fd, -off, SEEK_CUR);
+
+ if (r >= 0)
+ lused = lind = 0;
+}
diff --git a/lib/sh/zwrite.c b/lib/sh/zwrite.c
new file mode 100644
index 0000000..3240f4f
--- /dev/null
+++ b/lib/sh/zwrite.c
@@ -0,0 +1,64 @@
+/* zwrite - write contents of buffer to file descriptor, retrying on error */
+
+/* Copyright (C) 1999-2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <sys/types.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <errno.h>
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+/* Write NB bytes from BUF to file descriptor FD, retrying the write if
+ it is interrupted. We retry three times if we get a zero-length
+ write. Any other signal causes this function to return prematurely. */
+int
+zwrite (fd, buf, nb)
+ int fd;
+ char *buf;
+ size_t nb;
+{
+ int n, i, nt;
+
+ for (n = nb, nt = 0;;)
+ {
+ i = write (fd, buf, n);
+ if (i > 0)
+ {
+ n -= i;
+ if (n <= 0)
+ return nb;
+ buf += i;
+ }
+ else if (i == 0)
+ {
+ if (++nt > 3)
+ return (nb - n);
+ }
+ else if (errno != EINTR)
+ return -1;
+ }
+}
diff --git a/lib/termcap/Makefile.in b/lib/termcap/Makefile.in
new file mode 100644
index 0000000..aeee47f
--- /dev/null
+++ b/lib/termcap/Makefile.in
@@ -0,0 +1,90 @@
+## -*- text -*- ####################################################
+# #
+# Makefile for termcap replacement libbrary. #
+# #
+####################################################################
+
+# Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+srcdir = @srcdir@
+VPATH = .:@srcdir@
+topdir = @top_srcdir@
+BUILD_DIR = @BUILD_DIR@
+
+libdir = @libdir@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+CC = @CC@
+RANLIB = @RANLIB@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+RM = rm -f
+CP = cp
+MV = mv
+
+SHELL = @MAKE_SHELL@
+
+CFLAGS = @CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+
+DEFS = @DEFS@
+
+INCLUDES = -I. -I../.. -I$(topdir) -I$(topdir)/lib -I$(srcdir)
+
+CCFLAGS = $(CFLAGS) $(DEFS) $(CPPFLAGS) ${INCLUDES}
+
+# Here is a rule for making .o files from .c files that doesn't force
+# the type of the machine (like -sun3) into the flags.
+.c.o:
+ $(CC) -c $(CCFLAGS) $<
+
+SOURCES = termcap.c tparam.c
+OBJECTS = termcap.o tparam.o
+
+DOCUMENTATION = termcap.texinfo
+
+THINGS_TO_TAR = $(SOURCES) $(DOCUMENTATION)
+
+##########################################################################
+
+all: libtermcap.a
+
+libtermcap.a: $(OBJECTS)
+ $(RM) -f $@
+ $(AR) $(ARFLAGS) $@ $(OBJECTS)
+ -test -n "$(RANLIB)" && $(RANLIB) $@
+
+install:
+
+clean:
+ $(RM) *.o *.a *.log *.cp *.tp *.vr *.fn *.aux *.pg *.toc
+
+mostlyclean: clean
+
+distclean maintainer-clean: clean
+ $(RM) Makefile
+
+$(DESTDIR)$(libdir)/libtermcap.a: libtermcap.a
+ ${INSTALL_DATA} -c -m 644 libtermcap.a $@
+ -test -n "$(RANLIB)" && $(RANLIB) -t $@
+
+termcap.o: $(BUILD_DIR)/config.h
+tparam.o: $(BUILD_DIR)/config.h
+version.o: $(BUILD_DIR)/config.h
diff --git a/lib/termcap/ltcap.h b/lib/termcap/ltcap.h
new file mode 100644
index 0000000..a97f0d8
--- /dev/null
+++ b/lib/termcap/ltcap.h
@@ -0,0 +1,30 @@
+/* ltcap.h - Local declarations for termcap library. */
+
+/* Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _LTCAP_H_
+#define _LTCAP_H_ 1
+
+#if !defined (__APPLE__)
+# define __private_extern__
+#endif
+
+#ifndef MAX_TGETENT_BUFSIZ
+# define MAX_TGETENT_BUFSIZ 2048
+#endif
+
+#endif /* _LTCAP_H_ */
diff --git a/lib/termcap/termcap.c b/lib/termcap/termcap.c
new file mode 100644
index 0000000..7311349
--- /dev/null
+++ b/lib/termcap/termcap.c
@@ -0,0 +1,815 @@
+/* termcap.c - Work-alike for termcap, plus extra features. */
+
+/* Copyright (C) 1985, 1986, 1993,1994, 1995, 1998, 2001,2003,2005,2006,2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Emacs config.h may rename various library functions such as malloc. */
+#ifdef HAVE_CONFIG_H
+
+#include <config.h>
+
+/* Get the O_* definitions for open et al. */
+#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+
+#include <fcntl.h>
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern char *getenv ();
+extern char *malloc ();
+extern char *realloc ();
+#endif
+
+#if defined (HAVE_STRING_H)
+#include <string.h>
+#endif
+
+#if !defined (HAVE_BCOPY) && (defined (HAVE_STRING_H) || defined (STDC_HEADERS))
+# define bcopy(s, d, n) memcpy ((d), (s), (n))
+#endif
+
+#else /* not HAVE_CONFIG_H */
+
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#include <string.h>
+#else
+char *getenv ();
+char *malloc ();
+char *realloc ();
+#endif
+
+/* Do this after the include, in case string.h prototypes bcopy. */
+#if (defined(HAVE_STRING_H) || defined(STDC_HEADERS)) && !defined(bcopy)
+#define bcopy(s, d, n) memcpy ((d), (s), (n))
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#ifdef _POSIX_VERSION
+#include <fcntl.h>
+#endif
+
+#endif /* not HAVE_CONFIG_H */
+
+#ifndef NULL
+#define NULL (char *) 0
+#endif
+
+#ifndef O_RDONLY
+#define O_RDONLY 0
+#endif
+
+/* BUFSIZE is the initial size allocated for the buffer
+ for reading the termcap file.
+ It is not a limit.
+ Make it large normally for speed.
+ Make it variable when debugging, so can exercise
+ increasing the space dynamically. */
+
+#ifndef BUFSIZE
+#ifdef DEBUG
+#define BUFSIZE bufsize
+
+int bufsize = 128;
+#else
+#define BUFSIZE 2048
+#endif
+#endif
+
+#include "ltcap.h"
+
+#ifndef TERMCAP_FILE
+#define TERMCAP_FILE "/etc/termcap"
+#endif
+
+#ifndef emacs
+static void
+memory_out ()
+{
+ write (2, "virtual memory exhausted\n", 25);
+ exit (1);
+}
+
+static char *
+xmalloc (size)
+ unsigned size;
+{
+ register char *tem = malloc (size);
+
+ if (!tem)
+ memory_out ();
+ return tem;
+}
+
+static char *
+xrealloc (ptr, size)
+ char *ptr;
+ unsigned size;
+{
+ register char *tem = realloc (ptr, size);
+
+ if (!tem)
+ memory_out ();
+ return tem;
+}
+#endif /* not emacs */
+
+/* Looking up capabilities in the entry already found. */
+
+/* The pointer to the data made by tgetent is left here
+ for tgetnum, tgetflag and tgetstr to find. */
+static char *term_entry;
+
+static char *tgetst1 ();
+
+/* Search entry BP for capability CAP.
+ Return a pointer to the capability (in BP) if found,
+ 0 if not found. */
+
+static char *
+find_capability (bp, cap)
+ register char *bp, *cap;
+{
+ for (; *bp; bp++)
+ if (bp[0] == ':'
+ && bp[1] == cap[0]
+ && bp[2] == cap[1])
+ return &bp[4];
+ return NULL;
+}
+
+__private_extern__
+int
+tgetnum (cap)
+ char *cap;
+{
+ register char *ptr = find_capability (term_entry, cap);
+ if (!ptr || ptr[-1] != '#')
+ return -1;
+ return atoi (ptr);
+}
+
+__private_extern__
+int
+tgetflag (cap)
+ char *cap;
+{
+ register char *ptr = find_capability (term_entry, cap);
+ return ptr && ptr[-1] == ':';
+}
+
+/* Look up a string-valued capability CAP.
+ If AREA is non-null, it points to a pointer to a block in which
+ to store the string. That pointer is advanced over the space used.
+ If AREA is null, space is allocated with `malloc'. */
+
+__private_extern__
+char *
+tgetstr (cap, area)
+ char *cap;
+ char **area;
+{
+ register char *ptr = find_capability (term_entry, cap);
+ if (!ptr || (ptr[-1] != '=' && ptr[-1] != '~'))
+ return NULL;
+ return tgetst1 (ptr, area);
+}
+
+/* Table, indexed by a character in range 0100 to 0140 with 0100 subtracted,
+ gives meaning of character following \, or a space if no special meaning.
+ Eight characters per line within the string. */
+
+static char esctab[]
+ = " \007\010 \033\014 \
+ \012 \
+ \015 \011 \013 \
+ ";
+
+/* PTR points to a string value inside a termcap entry.
+ Copy that value, processing \ and ^ abbreviations,
+ into the block that *AREA points to,
+ or to newly allocated storage if AREA is NULL.
+ Return the address to which we copied the value,
+ or NULL if PTR is NULL. */
+
+static char *
+tgetst1 (ptr, area)
+ char *ptr;
+ char **area;
+{
+ register char *p, *r;
+ register int c;
+ register int size;
+ char *ret;
+ register int c1;
+
+ if (!ptr)
+ return NULL;
+
+ /* `ret' gets address of where to store the string. */
+ if (!area)
+ {
+ /* Compute size of block needed (may overestimate). */
+ p = ptr;
+ while ((c = *p++) && c != ':' && c != '\n')
+ ;
+ ret = (char *) xmalloc (p - ptr + 1);
+ }
+ else
+ ret = *area;
+
+ /* Copy the string value, stopping at null or colon.
+ Also process ^ and \ abbreviations. */
+ p = ptr;
+ r = ret;
+ while ((c = *p++) && c != ':' && c != '\n')
+ {
+ if (c == '^')
+ {
+ c = *p++;
+ if (c == '?')
+ c = 0177;
+ else
+ c &= 037;
+ }
+ else if (c == '\\')
+ {
+ c = *p++;
+ if (c >= '0' && c <= '7')
+ {
+ c -= '0';
+ size = 0;
+
+ while (++size < 3 && (c1 = *p) >= '0' && c1 <= '7')
+ {
+ c *= 8;
+ c += c1 - '0';
+ p++;
+ }
+ }
+ else if (c >= 0100 && c < 0200)
+ {
+ c1 = esctab[(c & ~040) - 0100];
+ if (c1 != ' ')
+ c = c1;
+ }
+ }
+ *r++ = c;
+ }
+ *r = '\0';
+ /* Update *AREA. */
+ if (area)
+ *area = r + 1;
+ return ret;
+}
+
+/* Outputting a string with padding. */
+
+short ospeed;
+/* If OSPEED is 0, we use this as the actual baud rate. */
+int tputs_baud_rate;
+__private_extern__ char PC = '\0';
+
+/* Actual baud rate if positive;
+ - baud rate / 100 if negative. */
+
+static int speeds[] =
+ {
+#ifdef VMS
+ 0, 50, 75, 110, 134, 150, -3, -6, -12, -18,
+ -20, -24, -36, -48, -72, -96, -192
+#else /* not VMS */
+ 0, 50, 75, 110, 135, 150, -2, -3, -6, -12,
+ -18, -24, -48, -96, -192, -288, -384, -576, -1152
+#endif /* not VMS */
+ };
+
+__private_extern__
+void
+tputs (str, nlines, outfun)
+ register char *str;
+ int nlines;
+ register int (*outfun) ();
+{
+ register int padcount = 0;
+ register int speed;
+
+#ifdef emacs
+ extern baud_rate;
+ speed = baud_rate;
+ /* For quite high speeds, convert to the smaller
+ units to avoid overflow. */
+ if (speed > 10000)
+ speed = - speed / 100;
+#else
+ if (ospeed == 0)
+ speed = tputs_baud_rate;
+ else if (ospeed > 0 && ospeed < (sizeof speeds / sizeof speeds[0]))
+ speed = speeds[ospeed];
+ else
+ speed = 0;
+#endif
+
+ if (!str)
+ return;
+
+ while (*str >= '0' && *str <= '9')
+ {
+ padcount += *str++ - '0';
+ padcount *= 10;
+ }
+ if (*str == '.')
+ {
+ str++;
+ padcount += *str++ - '0';
+ }
+ if (*str == '*')
+ {
+ str++;
+ padcount *= nlines;
+ }
+ while (*str)
+ (*outfun) (*str++);
+
+ /* PADCOUNT is now in units of tenths of msec.
+ SPEED is measured in characters per 10 seconds
+ or in characters per .1 seconds (if negative).
+ We use the smaller units for larger speeds to avoid overflow. */
+ padcount *= speed;
+ padcount += 500;
+ padcount /= 1000;
+ if (speed < 0)
+ padcount = -padcount;
+ else
+ {
+ padcount += 50;
+ padcount /= 100;
+ }
+
+ while (padcount-- > 0)
+ (*outfun) (PC);
+}
+
+/* Finding the termcap entry in the termcap data base. */
+
+struct buffer
+ {
+ char *beg;
+ int size;
+ char *ptr;
+ int ateof;
+ int full;
+ };
+
+/* Forward declarations of static functions. */
+
+static int scan_file ();
+static char *gobble_line ();
+static int compare_contin ();
+static int name_match ();
+
+#ifdef VMS
+
+#include <rmsdef.h>
+#include <fab.h>
+#include <nam.h>
+
+static int
+valid_filename_p (fn)
+ char *fn;
+{
+ struct FAB fab = cc$rms_fab;
+ struct NAM nam = cc$rms_nam;
+ char esa[NAM$C_MAXRSS];
+
+ fab.fab$l_fna = fn;
+ fab.fab$b_fns = strlen(fn);
+ fab.fab$l_nam = &nam;
+ fab.fab$l_fop = FAB$M_NAM;
+
+ nam.nam$l_esa = esa;
+ nam.nam$b_ess = sizeof esa;
+
+ return SYS$PARSE(&fab, 0, 0) == RMS$_NORMAL;
+}
+
+#else /* !VMS */
+
+#ifdef MSDOS /* MW, May 1993 */
+static int
+valid_filename_p (fn)
+ char *fn;
+{
+ return *fn == '\\' || *fn == '/' ||
+ (*fn >= 'A' && *fn <= 'z' && fn[1] == ':');
+}
+#else
+#define valid_filename_p(fn) (*(fn) == '/')
+#endif
+
+#endif /* !VMS */
+
+/* Find the termcap entry data for terminal type NAME
+ and store it in the block that BP points to.
+ Record its address for future use.
+
+ If BP is null, space is dynamically allocated.
+
+ Return -1 if there is some difficulty accessing the data base
+ of terminal types,
+ 0 if the data base is accessible but the type NAME is not defined
+ in it, and some other value otherwise. */
+
+__private_extern__
+int
+tgetent (bp, name)
+ char *bp, *name;
+{
+ register char *termcap_name;
+ register int fd;
+ struct buffer buf;
+ register char *bp1;
+ char *bp2;
+ char *term;
+ int malloc_size = 0;
+ register int c;
+ char *tcenv; /* TERMCAP value, if it contains :tc=. */
+ char *indirect = NULL; /* Terminal type in :tc= in TERMCAP value. */
+ int filep;
+
+#ifdef INTERNAL_TERMINAL
+ /* For the internal terminal we don't want to read any termcap file,
+ so fake it. */
+ if (!strcmp (name, "internal"))
+ {
+ term = INTERNAL_TERMINAL;
+ if (!bp)
+ {
+ malloc_size = 1 + strlen (term);
+ bp = (char *) xmalloc (malloc_size);
+ }
+ strcpy (bp, term);
+ goto ret;
+ }
+#endif /* INTERNAL_TERMINAL */
+
+ /* For compatibility with programs like `less' that want to
+ put data in the termcap buffer themselves as a fallback. */
+ if (bp)
+ term_entry = bp;
+
+ termcap_name = getenv ("TERMCAP");
+ if (termcap_name && *termcap_name == '\0')
+ termcap_name = NULL;
+#if 0
+#if defined (MSDOS) && !defined (TEST)
+ if (termcap_name && (*termcap_name == '\\'
+ || *termcap_name == '/'
+ || termcap_name[1] == ':'))
+ dostounix_filename(termcap_name);
+#endif
+#endif
+
+ filep = termcap_name && valid_filename_p (termcap_name);
+
+ /* If termcap_name is non-null and starts with / (in the un*x case, that is),
+ it is a file name to use instead of /etc/termcap.
+ If it is non-null and does not start with /,
+ it is the entry itself, but only if
+ the name the caller requested matches the TERM variable. */
+
+ if (termcap_name && !filep && !strcmp (name, getenv ("TERM")))
+ {
+ indirect = tgetst1 (find_capability (termcap_name, "tc"), (char **) 0);
+ if (!indirect)
+ {
+ if (!bp)
+ bp = termcap_name;
+ else
+ strcpy (bp, termcap_name);
+ goto ret;
+ }
+ else
+ { /* It has tc=. Need to read /etc/termcap. */
+ tcenv = termcap_name;
+ termcap_name = NULL;
+ }
+ }
+
+ if (!termcap_name || !filep)
+ termcap_name = TERMCAP_FILE;
+
+ /* Here we know we must search a file and termcap_name has its name. */
+
+#ifdef MSDOS
+ fd = open (termcap_name, O_RDONLY|O_TEXT, 0);
+#else
+ fd = open (termcap_name, O_RDONLY, 0);
+#endif
+ if (fd < 0)
+ return -1;
+
+ buf.size = BUFSIZE;
+ /* Add 1 to size to ensure room for terminating null. */
+ buf.beg = (char *) xmalloc (buf.size + 1);
+ term = indirect ? indirect : name;
+
+ if (!bp)
+ {
+ malloc_size = indirect ? strlen (tcenv) + 1 : buf.size;
+ bp = (char *) xmalloc (malloc_size);
+ }
+ bp1 = bp;
+
+ if (indirect)
+ /* Copy the data from the environment variable. */
+ {
+ strcpy (bp, tcenv);
+ bp1 += strlen (tcenv);
+ }
+
+ while (term)
+ {
+ /* Scan the file, reading it via buf, till find start of main entry. */
+ if (scan_file (term, fd, &buf) == 0)
+ {
+ close (fd);
+ free (buf.beg);
+ if (malloc_size)
+ free (bp);
+ return 0;
+ }
+
+ /* Free old `term' if appropriate. */
+ if (term != name)
+ free (term);
+
+ /* If BP is malloc'd by us, make sure it is big enough. */
+ if (malloc_size)
+ {
+ malloc_size = bp1 - bp + buf.size;
+ termcap_name = (char *) xrealloc (bp, malloc_size);
+ bp1 += termcap_name - bp;
+ bp = termcap_name;
+ }
+
+ bp2 = bp1;
+
+ /* Copy the line of the entry from buf into bp. */
+ termcap_name = buf.ptr;
+ while ((*bp1++ = c = *termcap_name++) && c != '\n')
+ /* Drop out any \ newline sequence. */
+ if (c == '\\' && *termcap_name == '\n')
+ {
+ bp1--;
+ termcap_name++;
+ }
+ *bp1 = '\0';
+
+ /* Does this entry refer to another terminal type's entry?
+ If something is found, copy it into heap and null-terminate it. */
+ term = tgetst1 (find_capability (bp2, "tc"), (char **) 0);
+ }
+
+ close (fd);
+ free (buf.beg);
+
+ if (malloc_size)
+ bp = (char *) xrealloc (bp, bp1 - bp + 1);
+
+ ret:
+ term_entry = bp;
+ return 1;
+}
+
+/* Given file open on FD and buffer BUFP,
+ scan the file from the beginning until a line is found
+ that starts the entry for terminal type STR.
+ Return 1 if successful, with that line in BUFP,
+ or 0 if no entry is found in the file. */
+
+static int
+scan_file (str, fd, bufp)
+ char *str;
+ int fd;
+ register struct buffer *bufp;
+{
+ register char *end;
+
+ bufp->ptr = bufp->beg;
+ bufp->full = 0;
+ bufp->ateof = 0;
+ *bufp->ptr = '\0';
+
+ lseek (fd, 0L, 0);
+
+ while (!bufp->ateof)
+ {
+ /* Read a line into the buffer. */
+ end = NULL;
+ do
+ {
+ /* if it is continued, append another line to it,
+ until a non-continued line ends. */
+ end = gobble_line (fd, bufp, end);
+ }
+ while (!bufp->ateof && end[-2] == '\\');
+
+ if (*bufp->ptr != '#'
+ && name_match (bufp->ptr, str))
+ return 1;
+
+ /* Discard the line just processed. */
+ bufp->ptr = end;
+ }
+ return 0;
+}
+
+/* Return nonzero if NAME is one of the names specified
+ by termcap entry LINE. */
+
+static int
+name_match (line, name)
+ char *line, *name;
+{
+ register char *tem;
+
+ if (!compare_contin (line, name))
+ return 1;
+ /* This line starts an entry. Is it the right one? */
+ for (tem = line; *tem && *tem != '\n' && *tem != ':'; tem++)
+ if (*tem == '|' && !compare_contin (tem + 1, name))
+ return 1;
+
+ return 0;
+}
+
+static int
+compare_contin (str1, str2)
+ register char *str1, *str2;
+{
+ register int c1, c2;
+ while (1)
+ {
+ c1 = *str1++;
+ c2 = *str2++;
+ while (c1 == '\\' && *str1 == '\n')
+ {
+ str1++;
+ while ((c1 = *str1++) == ' ' || c1 == '\t');
+ }
+ if (c2 == '\0')
+ {
+ /* End of type being looked up. */
+ if (c1 == '|' || c1 == ':')
+ /* If end of name in data base, we win. */
+ return 0;
+ else
+ return 1;
+ }
+ else if (c1 != c2)
+ return 1;
+ }
+}
+
+/* Make sure that the buffer <- BUFP contains a full line
+ of the file open on FD, starting at the place BUFP->ptr
+ points to. Can read more of the file, discard stuff before
+ BUFP->ptr, or make the buffer bigger.
+
+ Return the pointer to after the newline ending the line,
+ or to the end of the file, if there is no newline to end it.
+
+ Can also merge on continuation lines. If APPEND_END is
+ non-null, it points past the newline of a line that is
+ continued; we add another line onto it and regard the whole
+ thing as one line. The caller decides when a line is continued. */
+
+static char *
+gobble_line (fd, bufp, append_end)
+ int fd;
+ register struct buffer *bufp;
+ char *append_end;
+{
+ register char *end;
+ register int nread;
+ register char *buf = bufp->beg;
+ register char *tem;
+
+ if (!append_end)
+ append_end = bufp->ptr;
+
+ while (1)
+ {
+ end = append_end;
+ while (*end && *end != '\n') end++;
+ if (*end)
+ break;
+ if (bufp->ateof)
+ return buf + bufp->full;
+ if (bufp->ptr == buf)
+ {
+ if (bufp->full == bufp->size)
+ {
+ bufp->size *= 2;
+ /* Add 1 to size to ensure room for terminating null. */
+ tem = (char *) xrealloc (buf, bufp->size + 1);
+ bufp->ptr = (bufp->ptr - buf) + tem;
+ append_end = (append_end - buf) + tem;
+ bufp->beg = buf = tem;
+ }
+ }
+ else
+ {
+ append_end -= bufp->ptr - buf;
+ bcopy (bufp->ptr, buf, bufp->full -= bufp->ptr - buf);
+ bufp->ptr = buf;
+ }
+ if (!(nread = read (fd, buf + bufp->full, bufp->size - bufp->full)))
+ bufp->ateof = 1;
+ bufp->full += nread;
+ buf[bufp->full] = '\0';
+ }
+ return end + 1;
+}
+
+#ifdef TEST
+
+#ifdef NULL
+#undef NULL
+#endif
+
+#include <stdio.h>
+
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ char *term;
+ char *buf;
+
+ term = argv[1];
+ printf ("TERM: %s\n", term);
+
+ buf = (char *) tgetent (0, term);
+ if ((int) buf <= 0)
+ {
+ printf ("No entry.\n");
+ return 0;
+ }
+
+ printf ("Entry: %s\n", buf);
+
+ tprint ("cm");
+ tprint ("AL");
+
+ printf ("co: %d\n", tgetnum ("co"));
+ printf ("am: %d\n", tgetflag ("am"));
+}
+
+tprint (cap)
+ char *cap;
+{
+ char *x = tgetstr (cap, 0);
+ register char *y;
+
+ printf ("%s: ", cap);
+ if (x)
+ {
+ for (y = x; *y; y++)
+ if (*y <= ' ' || *y == 0177)
+ printf ("\\%0o", *y);
+ else
+ putchar (*y);
+ free (x);
+ }
+ else
+ printf ("none");
+ putchar ('\n');
+}
+
+#endif /* TEST */
diff --git a/lib/termcap/termcap.h b/lib/termcap/termcap.h
new file mode 100644
index 0000000..5d71595
--- /dev/null
+++ b/lib/termcap/termcap.h
@@ -0,0 +1,63 @@
+/* termcap.h - public declarations for termcap library. */
+
+/* Copyright (C) 1991, 1992, 1995, 2001, 2005, 2006, 2008,2009 Free Software Foundation, Inc.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _TERMCAP_H
+#define _TERMCAP_H 1
+
+#if __STDC__
+
+extern int tgetent (char *buffer, const char *termtype);
+
+extern int tgetnum (const char *name);
+extern int tgetflag (const char *name);
+extern char *tgetstr (const char *name, char **area);
+
+extern char PC;
+extern short ospeed;
+extern void tputs (const char *string, int nlines, int (*outfun) (int));
+
+extern char *tparam (const char *ctlstring, char *buffer, int size, ...);
+
+extern char *UP;
+extern char *BC;
+
+extern char *tgoto (const char *cstring, int hpos, int vpos);
+
+#else /* not __STDC__ */
+
+extern int tgetent ();
+
+extern int tgetnum ();
+extern int tgetflag ();
+extern char *tgetstr ();
+
+extern char PC;
+extern short ospeed;
+
+extern void tputs ();
+
+extern char *tparam ();
+
+extern char *UP;
+extern char *BC;
+
+extern char *tgoto ();
+
+#endif /* not __STDC__ */
+
+#endif /* not _TERMCAP_H */
diff --git a/lib/termcap/tparam.c b/lib/termcap/tparam.c
new file mode 100644
index 0000000..c4bff08
--- /dev/null
+++ b/lib/termcap/tparam.c
@@ -0,0 +1,345 @@
+/* tparam.c - merge parameters into a termcap entry string. */
+
+/* Copyright (C) 1985, 1986, 1993,1994, 1995, 1998, 2001,2003,2005,2006,2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Emacs config.h may rename various library functions such as malloc. */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+
+#ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+extern char *getenv ();
+extern char *malloc ();
+extern char *realloc ();
+#endif
+
+#if defined (HAVE_STRING_H)
+#include <string.h>
+#endif
+
+#if !defined (HAVE_BCOPY) && (defined (HAVE_STRING_H) || defined (STDC_HEADERS))
+# define bcopy(s, d, n) memcpy ((d), (s), (n))
+#endif
+
+#else /* not HAVE_CONFIG_H */
+
+#if defined(HAVE_STRING_H) || defined(STDC_HEADERS)
+#define bcopy(s, d, n) memcpy ((d), (s), (n))
+#endif
+
+#ifdef STDC_HEADERS
+#include <stdlib.h>
+#include <string.h>
+#else
+char *malloc ();
+char *realloc ();
+#endif
+
+#endif /* not HAVE_CONFIG_H */
+
+#include "ltcap.h"
+
+#ifndef NULL
+#define NULL (char *) 0
+#endif
+
+#ifndef emacs
+static void
+memory_out ()
+{
+ write (2, "virtual memory exhausted\n", 25);
+ exit (1);
+}
+
+static char *
+xmalloc (size)
+ unsigned size;
+{
+ register char *tem = malloc (size);
+
+ if (!tem)
+ memory_out ();
+ return tem;
+}
+
+static char *
+xrealloc (ptr, size)
+ char *ptr;
+ unsigned size;
+{
+ register char *tem = realloc (ptr, size);
+
+ if (!tem)
+ memory_out ();
+ return tem;
+}
+#endif /* not emacs */
+
+/* Assuming STRING is the value of a termcap string entry
+ containing `%' constructs to expand parameters,
+ merge in parameter values and store result in block OUTSTRING points to.
+ LEN is the length of OUTSTRING. If more space is needed,
+ a block is allocated with `malloc'.
+
+ The value returned is the address of the resulting string.
+ This may be OUTSTRING or may be the address of a block got with `malloc'.
+ In the latter case, the caller must free the block.
+
+ The fourth and following args to tparam serve as the parameter values. */
+
+static char *tparam1 ();
+
+/* VARARGS 2 */
+char *
+tparam (string, outstring, len, arg0, arg1, arg2, arg3)
+ char *string;
+ char *outstring;
+ int len;
+ int arg0, arg1, arg2, arg3;
+{
+ int arg[4];
+
+ arg[0] = arg0;
+ arg[1] = arg1;
+ arg[2] = arg2;
+ arg[3] = arg3;
+ return tparam1 (string, outstring, len, NULL, NULL, arg);
+}
+
+__private_extern__ char *BC;
+__private_extern__ char *UP;
+
+static char tgoto_buf[50];
+
+__private_extern__
+char *
+tgoto (cm, hpos, vpos)
+ char *cm;
+ int hpos, vpos;
+{
+ int args[2];
+ if (!cm)
+ return NULL;
+ args[0] = vpos;
+ args[1] = hpos;
+ return tparam1 (cm, tgoto_buf, 50, UP, BC, args);
+}
+
+static char *
+tparam1 (string, outstring, len, up, left, argp)
+ char *string;
+ char *outstring;
+ int len;
+ char *up, *left;
+ register int *argp;
+{
+ register int c;
+ register char *p = string;
+ register char *op = outstring;
+ char *outend;
+ int outlen = 0;
+
+ register int tem;
+ int *old_argp = argp;
+ int doleft = 0;
+ int doup = 0;
+
+ outend = outstring + len;
+
+ while (1)
+ {
+ /* If the buffer might be too short, make it bigger. */
+ if (op + 5 >= outend)
+ {
+ register char *new;
+ if (outlen == 0)
+ {
+ outlen = len + 40;
+ new = (char *) xmalloc (outlen);
+ outend += 40;
+ bcopy (outstring, new, op - outstring);
+ }
+ else
+ {
+ outend += outlen;
+ outlen *= 2;
+ new = (char *) xrealloc (outstring, outlen);
+ }
+ op += new - outstring;
+ outend += new - outstring;
+ outstring = new;
+ }
+ c = *p++;
+ if (!c)
+ break;
+ if (c == '%')
+ {
+ c = *p++;
+ tem = *argp;
+ switch (c)
+ {
+ case 'd': /* %d means output in decimal. */
+ if (tem < 10)
+ goto onedigit;
+ if (tem < 100)
+ goto twodigit;
+ case '3': /* %3 means output in decimal, 3 digits. */
+ if (tem > 999)
+ {
+ *op++ = tem / 1000 + '0';
+ tem %= 1000;
+ }
+ *op++ = tem / 100 + '0';
+ case '2': /* %2 means output in decimal, 2 digits. */
+ twodigit:
+ tem %= 100;
+ *op++ = tem / 10 + '0';
+ onedigit:
+ *op++ = tem % 10 + '0';
+ argp++;
+ break;
+
+ case 'C':
+ /* For c-100: print quotient of value by 96, if nonzero,
+ then do like %+. */
+ if (tem >= 96)
+ {
+ *op++ = tem / 96;
+ tem %= 96;
+ }
+ case '+': /* %+x means add character code of char x. */
+ tem += *p++;
+ case '.': /* %. means output as character. */
+ if (left)
+ {
+ /* If want to forbid output of 0 and \n and \t,
+ and this is one of them, increment it. */
+ while (tem == 0 || tem == '\n' || tem == '\t')
+ {
+ tem++;
+ if (argp == old_argp)
+ doup++, outend -= strlen (up);
+ else
+ doleft++, outend -= strlen (left);
+ }
+ }
+ *op++ = tem ? tem : 0200;
+ case 'f': /* %f means discard next arg. */
+ argp++;
+ break;
+
+ case 'b': /* %b means back up one arg (and re-use it). */
+ argp--;
+ break;
+
+ case 'r': /* %r means interchange following two args. */
+ argp[0] = argp[1];
+ argp[1] = tem;
+ old_argp++;
+ break;
+
+ case '>': /* %>xy means if arg is > char code of x, */
+ if (argp[0] > *p++) /* then add char code of y to the arg, */
+ argp[0] += *p; /* and in any case don't output. */
+ p++; /* Leave the arg to be output later. */
+ break;
+
+ case 'a': /* %a means arithmetic. */
+ /* Next character says what operation.
+ Add or subtract either a constant or some other arg. */
+ /* First following character is + to add or - to subtract
+ or = to assign. */
+ /* Next following char is 'p' and an arg spec
+ (0100 plus position of that arg relative to this one)
+ or 'c' and a constant stored in a character. */
+ tem = p[2] & 0177;
+ if (p[1] == 'p')
+ tem = argp[tem - 0100];
+ if (p[0] == '-')
+ argp[0] -= tem;
+ else if (p[0] == '+')
+ argp[0] += tem;
+ else if (p[0] == '*')
+ argp[0] *= tem;
+ else if (p[0] == '/')
+ argp[0] /= tem;
+ else
+ argp[0] = tem;
+
+ p += 3;
+ break;
+
+ case 'i': /* %i means add one to arg, */
+ argp[0] ++; /* and leave it to be output later. */
+ argp[1] ++; /* Increment the following arg, too! */
+ break;
+
+ case '%': /* %% means output %; no arg. */
+ goto ordinary;
+
+ case 'n': /* %n means xor each of next two args with 140. */
+ argp[0] ^= 0140;
+ argp[1] ^= 0140;
+ break;
+
+ case 'm': /* %m means xor each of next two args with 177. */
+ argp[0] ^= 0177;
+ argp[1] ^= 0177;
+ break;
+
+ case 'B': /* %B means express arg as BCD char code. */
+ argp[0] += 6 * (tem / 10);
+ break;
+
+ case 'D': /* %D means weird Delta Data transformation. */
+ argp[0] -= 2 * (tem % 16);
+ break;
+ }
+ }
+ else
+ /* Ordinary character in the argument string. */
+ ordinary:
+ *op++ = c;
+ }
+ *op = 0;
+ while (doup-- > 0)
+ strcat (op, up);
+ while (doleft-- > 0)
+ strcat (op, left);
+ return outstring;
+}
+
+#ifdef DEBUG
+
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ char buf[50];
+ int args[3];
+ args[0] = atoi (argv[2]);
+ args[1] = atoi (argv[3]);
+ args[2] = atoi (argv[4]);
+ tparam1 (argv[1], buf, "LEFT", "UP", args);
+ printf ("%s\n", buf);
+ return 0;
+}
+
+#endif /* DEBUG */
diff --git a/lib/termcap/version.c b/lib/termcap/version.c
new file mode 100644
index 0000000..cad57be
--- /dev/null
+++ b/lib/termcap/version.c
@@ -0,0 +1,22 @@
+/* version.c - termcap library version information. */
+
+/* Copyright (C) 1985-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Make the library identifiable with the RCS ident command. */
+static char *termcap_version_string = "\n$Version: GNU termcap 1.3 $\n";
diff --git a/lib/tilde/Makefile.in b/lib/tilde/Makefile.in
new file mode 100644
index 0000000..d5506c5
--- /dev/null
+++ b/lib/tilde/Makefile.in
@@ -0,0 +1,126 @@
+## -*- text -*- ####################################################
+# #
+# Makefile for the GNU Tilde Library. #
+# #
+####################################################################
+
+# Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+srcdir = @srcdir@
+VPATH = .:@srcdir@
+topdir = @top_srcdir@
+BUILD_DIR = @BUILD_DIR@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_DATA = @INSTALL_DATA@
+
+CC = @CC@
+RANLIB = @RANLIB@
+AR = @AR@
+ARFLAGS = @ARFLAGS@
+RM = rm
+CP = cp
+MV = mv
+
+SHELL = @MAKE_SHELL@
+
+PROFILE_FLAGS = @PROFILE_FLAGS@
+
+CFLAGS = @CFLAGS@
+LOCAL_CFLAGS = @LOCAL_CFLAGS@
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@ @LOCAL_LDFLAGS@
+
+DEFS = @DEFS@
+LOCAL_DEFS = @LOCAL_DEFS@
+
+BASHINCDIR = ${topdir}/include
+
+INCLUDES = -I. -I../.. -I$(topdir) -I${BASHINCDIR} -I$(topdir)/lib
+
+CCFLAGS = $(PROFILE_FLAGS) $(DEFS) $(LOCAL_DEFS) $(CPPFLAGS) \
+ ${INCLUDES} $(LOCAL_CFLAGS) $(CFLAGS)
+
+.c.o:
+ $(CC) -c $(CCFLAGS) $<
+
+# The name of the library target.
+LIBRARY_NAME = libtilde.a
+
+# The C code source files for this library.
+CSOURCES = $(srcdir)/tilde.c
+
+# The header files for this library.
+HSOURCES = $(srcdir)/tilde.h
+
+OBJECTS = tilde.o
+
+# The texinfo files which document this library.
+DOCSOURCE = doc/tilde.texi
+DOCOBJECT = doc/tilde.dvi
+DOCSUPPORT = doc/Makefile
+DOCUMENTATION = $(DOCSOURCE) $(DOCOBJECT) $(DOCSUPPORT)
+
+SUPPORT = Makefile ChangeLog $(DOCSUPPORT)
+
+SOURCES = $(CSOURCES) $(HSOURCES) $(DOCSOURCE)
+
+THINGS_TO_TAR = $(SOURCES) $(SUPPORT)
+
+######################################################################
+
+all: $(LIBRARY_NAME)
+
+$(LIBRARY_NAME): $(OBJECTS)
+ $(RM) -f $@
+ $(AR) $(ARFLAGS) $@ $(OBJECTS)
+ -test -n "$(RANLIB)" && $(RANLIB) $@
+
+documentation: force
+ -(cd doc; $(MAKE) $(MFLAGS))
+
+force:
+
+# The rule for 'includes' is written funny so that the if statement
+# always returns TRUE unless there really was an error installing the
+# include files.
+install:
+ $(INSTALL_DATA) -c -m 644 $(LIBRARY_NAME) $(libdir)/$(LIBRARY_NAME)
+ -test -n "$(RANLIB)" && $(RANLIB) -t $(libdir)/$(LIBRARY_NAME)
+
+clean:
+ $(RM) -f $(OBJECTS) $(LIBRARY_NAME)
+ -( cd doc && $(MAKE) $(MFLAGS) $@ )
+
+realclean distclean maintainer-clean: clean
+ -( cd doc && $(MAKE) $(MFLAGS) $@ )
+ $(RM) -f Makefile
+
+mostlyclean: clean
+ -( cd doc && $(MAKE) $(MFLAGS) $@ )
+
+######################################################################
+# #
+# Dependencies for the object files which make up this library. #
+# #
+######################################################################
+
+tilde.o: tilde.h $(BASHINCDIR)/ansi_stdlib.h
+tilde.o: $(BUILD_DIR)/config.h
+
+# Rules for deficient makes, like SunOS and Solaris
+tilde.o: tilde.c
diff --git a/lib/tilde/README b/lib/tilde/README
new file mode 100644
index 0000000..a8772f3
--- /dev/null
+++ b/lib/tilde/README
@@ -0,0 +1,5 @@
+If you're building this separately from bash or the readline library, add
+$(srcdir)/shell.c to the CSOURCES variable and shell.o to the OBJECTS
+variable in Makefile.in. (Not that this is very useful without readline
+or bash.)
+
diff --git a/lib/tilde/shell.c b/lib/tilde/shell.c
new file mode 100644
index 0000000..40a95b6
--- /dev/null
+++ b/lib/tilde/shell.c
@@ -0,0 +1,69 @@
+/* shell.c -- tilde utility functions that are normally provided by
+ bash when readline is linked as part of the shell. */
+
+/* Copyright (C) 1998-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Tilde Library.
+
+ The GNU Tilde Library is free software: you can redistribute it and/or
+ modify it under the terms of the GNU General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ The GNU Tilde Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with the GNU Tilde Library. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#if defined (HAVE_STRING_H)
+# include <string.h>
+#else
+# include <strings.h>
+#endif /* !HAVE_STRING_H */
+
+#include <pwd.h>
+
+#if !defined (HAVE_GETPW_DECLS)
+extern struct passwd *getpwuid ();
+#endif /* !HAVE_GETPW_DECLS */
+
+char *
+get_env_value (varname)
+ char *varname;
+{
+ return ((char *)getenv (varname));
+}
+
+char *
+get_home_dir ()
+{
+ char *home_dir;
+ struct passwd *entry;
+
+ home_dir = (char *)NULL;
+ entry = getpwuid (getuid ());
+ if (entry)
+ home_dir = entry->pw_dir;
+ return (home_dir);
+}
diff --git a/lib/tilde/tilde.c b/lib/tilde/tilde.c
new file mode 100644
index 0000000..088ff15
--- /dev/null
+++ b/lib/tilde/tilde.c
@@ -0,0 +1,502 @@
+/* tilde.c -- Tilde expansion code (~/foo := $HOME/foo). */
+
+/* Copyright (C) 1988-2009 Free Software Foundation, Inc.
+
+ This file is part of the GNU Readline Library (Readline), a library
+ for reading lines of text with interactive input and history editing.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#if defined (HAVE_STRING_H)
+# include <string.h>
+#else /* !HAVE_STRING_H */
+# include <strings.h>
+#endif /* !HAVE_STRING_H */
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#include <sys/types.h>
+#if defined (HAVE_PWD_H)
+#include <pwd.h>
+#endif
+
+#include "tilde.h"
+
+#if defined (TEST) || defined (STATIC_MALLOC)
+static void *xmalloc (), *xrealloc ();
+#else
+# include "xmalloc.h"
+#endif /* TEST || STATIC_MALLOC */
+
+#if !defined (HAVE_GETPW_DECLS)
+# if defined (HAVE_GETPWUID)
+extern struct passwd *getpwuid PARAMS((uid_t));
+# endif
+# if defined (HAVE_GETPWNAM)
+extern struct passwd *getpwnam PARAMS((const char *));
+# endif
+#endif /* !HAVE_GETPW_DECLS */
+
+#if !defined (savestring)
+#define savestring(x) strcpy ((char *)xmalloc (1 + strlen (x)), (x))
+#endif /* !savestring */
+
+#if !defined (NULL)
+# if defined (__STDC__)
+# define NULL ((void *) 0)
+# else
+# define NULL 0x0
+# endif /* !__STDC__ */
+#endif /* !NULL */
+
+/* If being compiled as part of bash, these will be satisfied from
+ variables.o. If being compiled as part of readline, they will
+ be satisfied from shell.o. */
+extern char *sh_get_home_dir PARAMS((void));
+extern char *sh_get_env_value PARAMS((const char *));
+
+/* The default value of tilde_additional_prefixes. This is set to
+ whitespace preceding a tilde so that simple programs which do not
+ perform any word separation get desired behaviour. */
+static const char *default_prefixes[] =
+ { " ~", "\t~", (const char *)NULL };
+
+/* The default value of tilde_additional_suffixes. This is set to
+ whitespace or newline so that simple programs which do not
+ perform any word separation get desired behaviour. */
+static const char *default_suffixes[] =
+ { " ", "\n", (const char *)NULL };
+
+/* If non-null, this contains the address of a function that the application
+ wants called before trying the standard tilde expansions. The function
+ is called with the text sans tilde, and returns a malloc()'ed string
+ which is the expansion, or a NULL pointer if the expansion fails. */
+tilde_hook_func_t *tilde_expansion_preexpansion_hook = (tilde_hook_func_t *)NULL;
+
+/* If non-null, this contains the address of a function to call if the
+ standard meaning for expanding a tilde fails. The function is called
+ with the text (sans tilde, as in "foo"), and returns a malloc()'ed string
+ which is the expansion, or a NULL pointer if there is no expansion. */
+tilde_hook_func_t *tilde_expansion_failure_hook = (tilde_hook_func_t *)NULL;
+
+/* When non-null, this is a NULL terminated array of strings which
+ are duplicates for a tilde prefix. Bash uses this to expand
+ `=~' and `:~'. */
+char **tilde_additional_prefixes = (char **)default_prefixes;
+
+/* When non-null, this is a NULL terminated array of strings which match
+ the end of a username, instead of just "/". Bash sets this to
+ `:' and `=~'. */
+char **tilde_additional_suffixes = (char **)default_suffixes;
+
+static int tilde_find_prefix PARAMS((const char *, int *));
+static int tilde_find_suffix PARAMS((const char *));
+static char *isolate_tilde_prefix PARAMS((const char *, int *));
+static char *glue_prefix_and_suffix PARAMS((char *, const char *, int));
+
+/* Find the start of a tilde expansion in STRING, and return the index of
+ the tilde which starts the expansion. Place the length of the text
+ which identified this tilde starter in LEN, excluding the tilde itself. */
+static int
+tilde_find_prefix (string, len)
+ const char *string;
+ int *len;
+{
+ register int i, j, string_len;
+ register char **prefixes;
+
+ prefixes = tilde_additional_prefixes;
+
+ string_len = strlen (string);
+ *len = 0;
+
+ if (*string == '\0' || *string == '~')
+ return (0);
+
+ if (prefixes)
+ {
+ for (i = 0; i < string_len; i++)
+ {
+ for (j = 0; prefixes[j]; j++)
+ {
+ if (strncmp (string + i, prefixes[j], strlen (prefixes[j])) == 0)
+ {
+ *len = strlen (prefixes[j]) - 1;
+ return (i + *len);
+ }
+ }
+ }
+ }
+ return (string_len);
+}
+
+/* Find the end of a tilde expansion in STRING, and return the index of
+ the character which ends the tilde definition. */
+static int
+tilde_find_suffix (string)
+ const char *string;
+{
+ register int i, j, string_len;
+ register char **suffixes;
+
+ suffixes = tilde_additional_suffixes;
+ string_len = strlen (string);
+
+ for (i = 0; i < string_len; i++)
+ {
+#if defined (__MSDOS__)
+ if (string[i] == '/' || string[i] == '\\' /* || !string[i] */)
+#else
+ if (string[i] == '/' /* || !string[i] */)
+#endif
+ break;
+
+ for (j = 0; suffixes && suffixes[j]; j++)
+ {
+ if (strncmp (string + i, suffixes[j], strlen (suffixes[j])) == 0)
+ return (i);
+ }
+ }
+ return (i);
+}
+
+/* Return a new string which is the result of tilde expanding STRING. */
+char *
+tilde_expand (string)
+ const char *string;
+{
+ char *result;
+ int result_size, result_index;
+
+ result_index = result_size = 0;
+ if (result = strchr (string, '~'))
+ result = (char *)xmalloc (result_size = (strlen (string) + 16));
+ else
+ result = (char *)xmalloc (result_size = (strlen (string) + 1));
+
+ /* Scan through STRING expanding tildes as we come to them. */
+ while (1)
+ {
+ register int start, end;
+ char *tilde_word, *expansion;
+ int len;
+
+ /* Make START point to the tilde which starts the expansion. */
+ start = tilde_find_prefix (string, &len);
+
+ /* Copy the skipped text into the result. */
+ if ((result_index + start + 1) > result_size)
+ result = (char *)xrealloc (result, 1 + (result_size += (start + 20)));
+
+ strncpy (result + result_index, string, start);
+ result_index += start;
+
+ /* Advance STRING to the starting tilde. */
+ string += start;
+
+ /* Make END be the index of one after the last character of the
+ username. */
+ end = tilde_find_suffix (string);
+
+ /* If both START and END are zero, we are all done. */
+ if (!start && !end)
+ break;
+
+ /* Expand the entire tilde word, and copy it into RESULT. */
+ tilde_word = (char *)xmalloc (1 + end);
+ strncpy (tilde_word, string, end);
+ tilde_word[end] = '\0';
+ string += end;
+
+ expansion = tilde_expand_word (tilde_word);
+ xfree (tilde_word);
+
+ len = strlen (expansion);
+#ifdef __CYGWIN__
+ /* Fix for Cygwin to prevent ~user/xxx from expanding to //xxx when
+ $HOME for `user' is /. On cygwin, // denotes a network drive. */
+ if (len > 1 || *expansion != '/' || *string != '/')
+#endif
+ {
+ if ((result_index + len + 1) > result_size)
+ result = (char *)xrealloc (result, 1 + (result_size += (len + 20)));
+
+ strcpy (result + result_index, expansion);
+ result_index += len;
+ }
+ xfree (expansion);
+ }
+
+ result[result_index] = '\0';
+
+ return (result);
+}
+
+/* Take FNAME and return the tilde prefix we want expanded. If LENP is
+ non-null, the index of the end of the prefix into FNAME is returned in
+ the location it points to. */
+static char *
+isolate_tilde_prefix (fname, lenp)
+ const char *fname;
+ int *lenp;
+{
+ char *ret;
+ int i;
+
+ ret = (char *)xmalloc (strlen (fname));
+#if defined (__MSDOS__)
+ for (i = 1; fname[i] && fname[i] != '/' && fname[i] != '\\'; i++)
+#else
+ for (i = 1; fname[i] && fname[i] != '/'; i++)
+#endif
+ ret[i - 1] = fname[i];
+ ret[i - 1] = '\0';
+ if (lenp)
+ *lenp = i;
+ return ret;
+}
+
+#if 0
+/* Public function to scan a string (FNAME) beginning with a tilde and find
+ the portion of the string that should be passed to the tilde expansion
+ function. Right now, it just calls tilde_find_suffix and allocates new
+ memory, but it can be expanded to do different things later. */
+char *
+tilde_find_word (fname, flags, lenp)
+ const char *fname;
+ int flags, *lenp;
+{
+ int x;
+ char *r;
+
+ x = tilde_find_suffix (fname);
+ if (x == 0)
+ {
+ r = savestring (fname);
+ if (lenp)
+ *lenp = 0;
+ }
+ else
+ {
+ r = (char *)xmalloc (1 + x);
+ strncpy (r, fname, x);
+ r[x] = '\0';
+ if (lenp)
+ *lenp = x;
+ }
+
+ return r;
+}
+#endif
+
+/* Return a string that is PREFIX concatenated with SUFFIX starting at
+ SUFFIND. */
+static char *
+glue_prefix_and_suffix (prefix, suffix, suffind)
+ char *prefix;
+ const char *suffix;
+ int suffind;
+{
+ char *ret;
+ int plen, slen;
+
+ plen = (prefix && *prefix) ? strlen (prefix) : 0;
+ slen = strlen (suffix + suffind);
+ ret = (char *)xmalloc (plen + slen + 1);
+ if (plen)
+ strcpy (ret, prefix);
+ strcpy (ret + plen, suffix + suffind);
+ return ret;
+}
+
+/* Do the work of tilde expansion on FILENAME. FILENAME starts with a
+ tilde. If there is no expansion, call tilde_expansion_failure_hook.
+ This always returns a newly-allocated string, never static storage. */
+char *
+tilde_expand_word (filename)
+ const char *filename;
+{
+ char *dirname, *expansion, *username;
+ int user_len;
+ struct passwd *user_entry;
+
+ if (filename == 0)
+ return ((char *)NULL);
+
+ if (*filename != '~')
+ return (savestring (filename));
+
+ /* A leading `~/' or a bare `~' is *always* translated to the value of
+ $HOME or the home directory of the current user, regardless of any
+ preexpansion hook. */
+ if (filename[1] == '\0' || filename[1] == '/')
+ {
+ /* Prefix $HOME to the rest of the string. */
+ expansion = sh_get_env_value ("HOME");
+
+ /* If there is no HOME variable, look up the directory in
+ the password database. */
+ if (expansion == 0)
+ expansion = sh_get_home_dir ();
+
+ return (glue_prefix_and_suffix (expansion, filename, 1));
+ }
+
+ username = isolate_tilde_prefix (filename, &user_len);
+
+ if (tilde_expansion_preexpansion_hook)
+ {
+ expansion = (*tilde_expansion_preexpansion_hook) (username);
+ if (expansion)
+ {
+ dirname = glue_prefix_and_suffix (expansion, filename, user_len);
+ xfree (username);
+ free (expansion);
+ return (dirname);
+ }
+ }
+
+ /* No preexpansion hook, or the preexpansion hook failed. Look in the
+ password database. */
+ dirname = (char *)NULL;
+#if defined (HAVE_GETPWNAM)
+ user_entry = getpwnam (username);
+#else
+ user_entry = 0;
+#endif
+ if (user_entry == 0)
+ {
+ /* If the calling program has a special syntax for expanding tildes,
+ and we couldn't find a standard expansion, then let them try. */
+ if (tilde_expansion_failure_hook)
+ {
+ expansion = (*tilde_expansion_failure_hook) (username);
+ if (expansion)
+ {
+ dirname = glue_prefix_and_suffix (expansion, filename, user_len);
+ free (expansion);
+ }
+ }
+ /* If we don't have a failure hook, or if the failure hook did not
+ expand the tilde, return a copy of what we were passed. */
+ if (dirname == 0)
+ dirname = savestring (filename);
+ }
+#if defined (HAVE_GETPWENT)
+ else
+ dirname = glue_prefix_and_suffix (user_entry->pw_dir, filename, user_len);
+#endif
+
+ xfree (username);
+#if defined (HAVE_GETPWENT)
+ endpwent ();
+#endif
+ return (dirname);
+}
+
+
+#if defined (TEST)
+#undef NULL
+#include <stdio.h>
+
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ char *result, line[512];
+ int done = 0;
+
+ while (!done)
+ {
+ printf ("~expand: ");
+ fflush (stdout);
+
+ if (!gets (line))
+ strcpy (line, "done");
+
+ if ((strcmp (line, "done") == 0) ||
+ (strcmp (line, "quit") == 0) ||
+ (strcmp (line, "exit") == 0))
+ {
+ done = 1;
+ break;
+ }
+
+ result = tilde_expand (line);
+ printf (" --> %s\n", result);
+ free (result);
+ }
+ exit (0);
+}
+
+static void memory_error_and_abort ();
+
+static void *
+xmalloc (bytes)
+ size_t bytes;
+{
+ void *temp = (char *)malloc (bytes);
+
+ if (!temp)
+ memory_error_and_abort ();
+ return (temp);
+}
+
+static void *
+xrealloc (pointer, bytes)
+ void *pointer;
+ int bytes;
+{
+ void *temp;
+
+ if (!pointer)
+ temp = malloc (bytes);
+ else
+ temp = realloc (pointer, bytes);
+
+ if (!temp)
+ memory_error_and_abort ();
+
+ return (temp);
+}
+
+static void
+memory_error_and_abort ()
+{
+ fprintf (stderr, "readline: out of virtual memory\n");
+ abort ();
+}
+
+/*
+ * Local variables:
+ * compile-command: "gcc -g -DTEST -o tilde tilde.c"
+ * end:
+ */
+#endif /* TEST */
diff --git a/lib/tilde/tilde.h b/lib/tilde/tilde.h
new file mode 100644
index 0000000..e26dd04
--- /dev/null
+++ b/lib/tilde/tilde.h
@@ -0,0 +1,80 @@
+/* tilde.h: Externally available variables and function in libtilde.a. */
+
+/* Copyright (C) 1992-2009 Free Software Foundation, Inc.
+
+ This file contains the Readline Library (Readline), a set of
+ routines for providing Emacs style line input to programs that ask
+ for it.
+
+ Readline is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Readline is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Readline. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_TILDE_H_)
+# define _TILDE_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* A function can be defined using prototypes and compile on both ANSI C
+ and traditional C compilers with something like this:
+ extern char *func PARAMS((char *, char *, int)); */
+
+#if !defined (PARAMS)
+# if defined (__STDC__) || defined (__GNUC__) || defined (__cplusplus)
+# define PARAMS(protos) protos
+# else
+# define PARAMS(protos) ()
+# endif
+#endif
+
+typedef char *tilde_hook_func_t PARAMS((char *));
+
+/* If non-null, this contains the address of a function that the application
+ wants called before trying the standard tilde expansions. The function
+ is called with the text sans tilde, and returns a malloc()'ed string
+ which is the expansion, or a NULL pointer if the expansion fails. */
+extern tilde_hook_func_t *tilde_expansion_preexpansion_hook;
+
+/* If non-null, this contains the address of a function to call if the
+ standard meaning for expanding a tilde fails. The function is called
+ with the text (sans tilde, as in "foo"), and returns a malloc()'ed string
+ which is the expansion, or a NULL pointer if there is no expansion. */
+extern tilde_hook_func_t *tilde_expansion_failure_hook;
+
+/* When non-null, this is a NULL terminated array of strings which
+ are duplicates for a tilde prefix. Bash uses this to expand
+ `=~' and `:~'. */
+extern char **tilde_additional_prefixes;
+
+/* When non-null, this is a NULL terminated array of strings which match
+ the end of a username, instead of just "/". Bash sets this to
+ `:' and `=~'. */
+extern char **tilde_additional_suffixes;
+
+/* Return a new string which is the result of tilde expanding STRING. */
+extern char *tilde_expand PARAMS((const char *));
+
+/* Do the work of tilde expansion on FILENAME. FILENAME starts with a
+ tilde. If there is no expansion, call tilde_expansion_failure_hook. */
+extern char *tilde_expand_word PARAMS((const char *));
+
+/* Find the portion of the string beginning with ~ that should be expanded. */
+extern char *tilde_find_word PARAMS((const char *, int, int *));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _TILDE_H_ */
diff --git a/list.c b/list.c
new file mode 100644
index 0000000..88835f5
--- /dev/null
+++ b/list.c
@@ -0,0 +1,136 @@
+/* list.c - Functions for manipulating linked lists of objects. */
+
+/* Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "shell.h"
+
+/* A global variable which acts as a sentinel for an `error' list return. */
+GENERIC_LIST global_error_list;
+
+#ifdef INCLUDE_UNUSED
+/* Call FUNCTION on every member of LIST, a generic list. */
+void
+list_walk (list, function)
+ GENERIC_LIST *list;
+ sh_glist_func_t *function;
+{
+ for ( ; list; list = list->next)
+ if ((*function) (list) < 0)
+ return;
+}
+
+/* Call FUNCTION on every string in WORDS. */
+void
+wlist_walk (words, function)
+ WORD_LIST *words;
+ sh_icpfunc_t *function;
+{
+ for ( ; words; words = words->next)
+ if ((*function) (words->word->word) < 0)
+ return;
+}
+#endif /* INCLUDE_UNUSED */
+
+/* Reverse the chain of structures in LIST. Output the new head
+ of the chain. You should always assign the output value of this
+ function to something, or you will lose the chain. */
+GENERIC_LIST *
+list_reverse (list)
+ GENERIC_LIST *list;
+{
+ register GENERIC_LIST *next, *prev;
+
+ for (prev = (GENERIC_LIST *)NULL; list; )
+ {
+ next = list->next;
+ list->next = prev;
+ prev = list;
+ list = next;
+ }
+ return (prev);
+}
+
+/* Return the number of elements in LIST, a generic list. */
+int
+list_length (list)
+ GENERIC_LIST *list;
+{
+ register int i;
+
+ for (i = 0; list; list = list->next, i++);
+ return (i);
+}
+
+/* Append TAIL to HEAD. Return the header of the list. */
+GENERIC_LIST *
+list_append (head, tail)
+ GENERIC_LIST *head, *tail;
+{
+ register GENERIC_LIST *t_head;
+
+ if (head == 0)
+ return (tail);
+
+ for (t_head = head; t_head->next; t_head = t_head->next)
+ ;
+ t_head->next = tail;
+ return (head);
+}
+
+#ifdef INCLUDE_UNUSED
+/* Delete the element of LIST which satisfies the predicate function COMPARER.
+ Returns the element that was deleted, so you can dispose of it, or -1 if
+ the element wasn't found. COMPARER is called with the list element and
+ then ARG. Note that LIST contains the address of a variable which points
+ to the list. You might call this function like this:
+
+ SHELL_VAR *elt = list_remove (&variable_list, check_var_has_name, "foo");
+ dispose_variable (elt);
+*/
+GENERIC_LIST *
+list_remove (list, comparer, arg)
+ GENERIC_LIST **list;
+ Function *comparer;
+ char *arg;
+{
+ register GENERIC_LIST *prev, *temp;
+
+ for (prev = (GENERIC_LIST *)NULL, temp = *list; temp; prev = temp, temp = temp->next)
+ {
+ if ((*comparer) (temp, arg))
+ {
+ if (prev)
+ prev->next = temp->next;
+ else
+ *list = temp->next;
+ return (temp);
+ }
+ }
+ return ((GENERIC_LIST *)&global_error_list);
+}
+#endif
diff --git a/locale.c b/locale.c
new file mode 100644
index 0000000..2f2e9fc
--- /dev/null
+++ b/locale.c
@@ -0,0 +1,534 @@
+/* locale.c - Miscellaneous internationalization functions. */
+
+/* Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashintl.h"
+#include "bashansi.h"
+#include <stdio.h>
+#include "chartypes.h"
+#include <errno.h>
+
+#include "shell.h"
+#include "input.h" /* For bash_input */
+
+#ifndef errno
+extern int errno;
+#endif
+
+extern int dump_translatable_strings, dump_po_strings;
+
+/* The current locale when the program begins */
+static char *default_locale;
+
+/* The current domain for textdomain(3). */
+static char *default_domain;
+static char *default_dir;
+
+/* tracks the value of LC_ALL; used to override values for other locale
+ categories */
+static char *lc_all;
+
+/* tracks the value of LC_ALL; used to provide defaults for locale
+ categories */
+static char *lang;
+
+/* Called to reset all of the locale variables to their appropriate values
+ if (and only if) LC_ALL has not been assigned a value. */
+static int reset_locale_vars __P((void));
+
+static void locale_setblanks __P((void));
+
+/* Set the value of default_locale and make the current locale the
+ system default locale. This should be called very early in main(). */
+void
+set_default_locale ()
+{
+#if defined (HAVE_SETLOCALE)
+ default_locale = setlocale (LC_ALL, "");
+ if (default_locale)
+ default_locale = savestring (default_locale);
+#endif /* HAVE_SETLOCALE */
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
+}
+
+/* Set default values for LC_CTYPE, LC_COLLATE, LC_MESSAGES, LC_NUMERIC and
+ LC_TIME if they are not specified in the environment, but LC_ALL is. This
+ should be called from main() after parsing the environment. */
+void
+set_default_locale_vars ()
+{
+ char *val;
+
+#if defined (HAVE_SETLOCALE)
+
+# if defined (LC_CTYPE)
+ val = get_string_value ("LC_CTYPE");
+ if (val == 0 && lc_all && *lc_all)
+ {
+ setlocale (LC_CTYPE, lc_all);
+ locale_setblanks ();
+ }
+# endif
+
+# if defined (LC_COLLATE)
+ val = get_string_value ("LC_COLLATE");
+ if (val == 0 && lc_all && *lc_all)
+ setlocale (LC_COLLATE, lc_all);
+# endif /* LC_COLLATE */
+
+# if defined (LC_MESSAGES)
+ val = get_string_value ("LC_MESSAGES");
+ if (val == 0 && lc_all && *lc_all)
+ setlocale (LC_MESSAGES, lc_all);
+# endif /* LC_MESSAGES */
+
+# if defined (LC_NUMERIC)
+ val = get_string_value ("LC_NUMERIC");
+ if (val == 0 && lc_all && *lc_all)
+ setlocale (LC_NUMERIC, lc_all);
+# endif /* LC_NUMERIC */
+
+# if defined (LC_TIME)
+ val = get_string_value ("LC_TIME");
+ if (val == 0 && lc_all && *lc_all)
+ setlocale (LC_TIME, lc_all);
+# endif /* LC_TIME */
+
+#endif /* HAVE_SETLOCALE */
+
+ val = get_string_value ("TEXTDOMAIN");
+ if (val && *val)
+ {
+ FREE (default_domain);
+ default_domain = savestring (val);
+#if 0
+ /* Don't want to override the shell's textdomain as the default */
+ textdomain (default_domain);
+#endif
+ }
+
+ val = get_string_value ("TEXTDOMAINDIR");
+ if (val && *val)
+ {
+ FREE (default_dir);
+ default_dir = savestring (val);
+ if (default_domain && *default_domain)
+ bindtextdomain (default_domain, default_dir);
+ }
+}
+
+/* Set one of the locale categories (specified by VAR) to VALUE. Returns 1
+ if successful, 0 otherwise. */
+int
+set_locale_var (var, value)
+ char *var, *value;
+{
+ int r;
+ char *x;
+
+ x = "";
+ errno = 0;
+ if (var[0] == 'T' && var[10] == 0) /* TEXTDOMAIN */
+ {
+ FREE (default_domain);
+ default_domain = value ? savestring (value) : (char *)NULL;
+#if 0
+ /* Don't want to override the shell's textdomain as the default */
+ textdomain (default_domain);
+#endif
+ return (1);
+ }
+ else if (var[0] == 'T') /* TEXTDOMAINDIR */
+ {
+ FREE (default_dir);
+ default_dir = value ? savestring (value) : (char *)NULL;
+ if (default_domain && *default_domain)
+ bindtextdomain (default_domain, default_dir);
+ return (1);
+ }
+
+ /* var[0] == 'L' && var[1] == 'C' && var[2] == '_' */
+
+ else if (var[3] == 'A') /* LC_ALL */
+ {
+ FREE (lc_all);
+ if (value)
+ lc_all = savestring (value);
+ else
+ {
+ lc_all = (char *)xmalloc (1);
+ lc_all[0] = '\0';
+ }
+#if defined (HAVE_SETLOCALE)
+ r = *lc_all ? ((x = setlocale (LC_ALL, lc_all)) != 0) : reset_locale_vars ();
+ if (x == 0)
+ {
+ if (errno == 0)
+ internal_warning(_("setlocale: LC_ALL: cannot change locale (%s)"), lc_all);
+ else
+ internal_warning(_("setlocale: LC_ALL: cannot change locale (%s): %s"), lc_all, strerror (errno));
+ }
+ locale_setblanks ();
+ return r;
+#else
+ return (1);
+#endif
+ }
+
+#if defined (HAVE_SETLOCALE)
+ else if (var[3] == 'C' && var[4] == 'T') /* LC_CTYPE */
+ {
+# if defined (LC_CTYPE)
+ if (lc_all == 0 || *lc_all == '\0')
+ {
+ x = setlocale (LC_CTYPE, get_locale_var ("LC_CTYPE"));
+ locale_setblanks ();
+ }
+# endif
+ }
+ else if (var[3] == 'C' && var[4] == 'O') /* LC_COLLATE */
+ {
+# if defined (LC_COLLATE)
+ if (lc_all == 0 || *lc_all == '\0')
+ x = setlocale (LC_COLLATE, get_locale_var ("LC_COLLATE"));
+# endif /* LC_COLLATE */
+ }
+ else if (var[3] == 'M' && var[4] == 'E') /* LC_MESSAGES */
+ {
+# if defined (LC_MESSAGES)
+ if (lc_all == 0 || *lc_all == '\0')
+ x = setlocale (LC_MESSAGES, get_locale_var ("LC_MESSAGES"));
+# endif /* LC_MESSAGES */
+ }
+ else if (var[3] == 'N' && var[4] == 'U') /* LC_NUMERIC */
+ {
+# if defined (LC_NUMERIC)
+ if (lc_all == 0 || *lc_all == '\0')
+ x = setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC"));
+# endif /* LC_NUMERIC */
+ }
+ else if (var[3] == 'T' && var[4] == 'I') /* LC_TIME */
+ {
+# if defined (LC_TIME)
+ if (lc_all == 0 || *lc_all == '\0')
+ x = setlocale (LC_TIME, get_locale_var ("LC_TIME"));
+# endif /* LC_TIME */
+ }
+#endif /* HAVE_SETLOCALE */
+
+ if (x == 0)
+ {
+ if (errno == 0)
+ internal_warning(_("setlocale: %s: cannot change locale (%s)"), var, get_locale_var (var));
+ else
+ internal_warning(_("setlocale: %s: cannot change locale (%s): %s"), var, get_locale_var (var), strerror (errno));
+ }
+
+ return (x != 0);
+}
+
+/* Called when LANG is assigned a value. Tracks value in `lang'. Calls
+ reset_locale_vars() to reset any default values if LC_ALL is unset or
+ null. */
+int
+set_lang (var, value)
+ char *var, *value;
+{
+ FREE (lang);
+ if (value)
+ lang = savestring (value);
+ else
+ {
+ lang = (char *)xmalloc (1);
+ lang[0] = '\0';
+ }
+
+ return ((lc_all == 0 || *lc_all == 0) ? reset_locale_vars () : 0);
+}
+
+/* Set default values for LANG and LC_ALL. Default values for all other
+ locale-related variables depend on these. */
+void
+set_default_lang ()
+{
+ char *v;
+
+ v = get_string_value ("LC_ALL");
+ set_locale_var ("LC_ALL", v);
+
+ v = get_string_value ("LANG");
+ set_lang ("LANG", v);
+}
+
+/* Get the value of one of the locale variables (LC_MESSAGES, LC_CTYPE).
+ The precedence is as POSIX.2 specifies: LC_ALL has precedence over
+ the specific locale variables, and LANG, if set, is used as the default. */
+char *
+get_locale_var (var)
+ char *var;
+{
+ char *locale;
+
+ locale = lc_all;
+
+ if (locale == 0 || *locale == 0)
+ locale = get_string_value (var);
+ if (locale == 0 || *locale == 0)
+ locale = lang;
+ if (locale == 0 || *locale == 0)
+#if 0
+ locale = default_locale; /* system-dependent; not really portable. should it be "C"? */
+#else
+ locale = "";
+#endif
+ return (locale);
+}
+
+/* Called to reset all of the locale variables to their appropriate values
+ if (and only if) LC_ALL has not been assigned a value. DO NOT CALL THIS
+ IF LC_ALL HAS BEEN ASSIGNED A VALUE. */
+static int
+reset_locale_vars ()
+{
+ char *t;
+#if defined (HAVE_SETLOCALE)
+ if (lang == 0 || *lang == '\0')
+ maybe_make_export_env (); /* trust that this will change environment for setlocale */
+ if (setlocale (LC_ALL, lang ? lang : "") == 0)
+ return 0;
+
+# if defined (LC_CTYPE)
+ t = setlocale (LC_CTYPE, get_locale_var ("LC_CTYPE"));
+# endif
+# if defined (LC_COLLATE)
+ t = setlocale (LC_COLLATE, get_locale_var ("LC_COLLATE"));
+# endif
+# if defined (LC_MESSAGES)
+ t = setlocale (LC_MESSAGES, get_locale_var ("LC_MESSAGES"));
+# endif
+# if defined (LC_NUMERIC)
+ t = setlocale (LC_NUMERIC, get_locale_var ("LC_NUMERIC"));
+# endif
+# if defined (LC_TIME)
+ t = setlocale (LC_TIME, get_locale_var ("LC_TIME"));
+# endif
+
+ locale_setblanks ();
+
+#endif
+ return 1;
+}
+
+/* Translate the contents of STRING, a $"..." quoted string, according
+ to the current locale. In the `C' or `POSIX' locale, or if gettext()
+ is not available, the passed string is returned unchanged. The
+ length of the translated string is returned in LENP, if non-null. */
+char *
+localetrans (string, len, lenp)
+ char *string;
+ int len, *lenp;
+{
+ char *locale, *t;
+ char *translated;
+ int tlen;
+
+ /* Don't try to translate null strings. */
+ if (string == 0 || *string == 0)
+ {
+ if (lenp)
+ *lenp = 0;
+ return ((char *)NULL);
+ }
+
+ locale = get_locale_var ("LC_MESSAGES");
+
+ /* If we don't have setlocale() or the current locale is `C' or `POSIX',
+ just return the string. If we don't have gettext(), there's no use
+ doing anything else. */
+ if (locale == 0 || locale[0] == '\0' ||
+ (locale[0] == 'C' && locale[1] == '\0') || STREQ (locale, "POSIX"))
+ {
+ t = (char *)xmalloc (len + 1);
+ strcpy (t, string);
+ if (lenp)
+ *lenp = len;
+ return (t);
+ }
+
+ /* Now try to translate it. */
+ if (default_domain && *default_domain)
+ translated = dgettext (default_domain, string);
+ else
+ translated = string;
+
+ if (translated == string) /* gettext returns its argument if untranslatable */
+ {
+ t = (char *)xmalloc (len + 1);
+ strcpy (t, string);
+ if (lenp)
+ *lenp = len;
+ }
+ else
+ {
+ tlen = strlen (translated);
+ t = (char *)xmalloc (tlen + 1);
+ strcpy (t, translated);
+ if (lenp)
+ *lenp = tlen;
+ }
+ return (t);
+}
+
+/* Change a bash string into a string suitable for inclusion in a `po' file.
+ This backslash-escapes `"' and `\' and changes newlines into \\\n"\n". */
+char *
+mk_msgstr (string, foundnlp)
+ char *string;
+ int *foundnlp;
+{
+ register int c, len;
+ char *result, *r, *s;
+
+ for (len = 0, s = string; s && *s; s++)
+ {
+ len++;
+ if (*s == '"' || *s == '\\')
+ len++;
+ else if (*s == '\n')
+ len += 5;
+ }
+
+ r = result = (char *)xmalloc (len + 3);
+ *r++ = '"';
+
+ for (s = string; s && (c = *s); s++)
+ {
+ if (c == '\n') /* <NL> -> \n"<NL>" */
+ {
+ *r++ = '\\';
+ *r++ = 'n';
+ *r++ = '"';
+ *r++ = '\n';
+ *r++ = '"';
+ if (foundnlp)
+ *foundnlp = 1;
+ continue;
+ }
+ if (c == '"' || c == '\\')
+ *r++ = '\\';
+ *r++ = c;
+ }
+
+ *r++ = '"';
+ *r++ = '\0';
+
+ return result;
+}
+
+/* $"..." -- Translate the portion of STRING between START and END
+ according to current locale using gettext (if available) and return
+ the result. The caller will take care of leaving the quotes intact.
+ The string will be left without the leading `$' by the caller.
+ If translation is performed, the translated string will be double-quoted
+ by the caller. The length of the translated string is returned in LENP,
+ if non-null. */
+char *
+localeexpand (string, start, end, lineno, lenp)
+ char *string;
+ int start, end, lineno, *lenp;
+{
+ int len, tlen, foundnl;
+ char *temp, *t, *t2;
+
+ temp = (char *)xmalloc (end - start + 1);
+ for (tlen = 0, len = start; len < end; )
+ temp[tlen++] = string[len++];
+ temp[tlen] = '\0';
+
+ /* If we're just dumping translatable strings, don't do anything with the
+ string itself, but if we're dumping in `po' file format, convert it into
+ a form more palatable to gettext(3) and friends by quoting `"' and `\'
+ with backslashes and converting <NL> into `\n"<NL>"'. If we find a
+ newline in TEMP, we first output a `msgid ""' line and then the
+ translated string; otherwise we output the `msgid' and translated
+ string all on one line. */
+ if (dump_translatable_strings)
+ {
+ if (dump_po_strings)
+ {
+ foundnl = 0;
+ t = mk_msgstr (temp, &foundnl);
+ t2 = foundnl ? "\"\"\n" : "";
+
+ printf ("#: %s:%d\nmsgid %s%s\nmsgstr \"\"\n",
+ yy_input_name (), lineno, t2, t);
+ free (t);
+ }
+ else
+ printf ("\"%s\"\n", temp);
+
+ if (lenp)
+ *lenp = tlen;
+ return (temp);
+ }
+ else if (*temp)
+ {
+ t = localetrans (temp, tlen, &len);
+ free (temp);
+ if (lenp)
+ *lenp = len;
+ return (t);
+ }
+ else
+ {
+ if (lenp)
+ *lenp = 0;
+ return (temp);
+ }
+}
+
+/* Set every character in the <blank> character class to be a shell break
+ character for the lexical analyzer when the locale changes. */
+static void
+locale_setblanks ()
+{
+ int x;
+
+ for (x = 0; x < sh_syntabsiz; x++)
+ {
+ if (isblank (x))
+ sh_syntaxtab[x] |= CSHBRK|CBLANK;
+ else if (member (x, shell_break_chars))
+ {
+ sh_syntaxtab[x] |= CSHBRK;
+ sh_syntaxtab[x] &= ~CBLANK;
+ }
+ else
+ sh_syntaxtab[x] &= ~(CSHBRK|CBLANK);
+ }
+}
diff --git a/mailcheck.c b/mailcheck.c
new file mode 100644
index 0000000..bd95f0d
--- /dev/null
+++ b/mailcheck.c
@@ -0,0 +1,485 @@
+/* mailcheck.c -- The check is in the mail... */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include <stdio.h>
+#include "bashtypes.h"
+#include "posixstat.h"
+#ifndef _MINIX
+# include <sys/param.h>
+#endif
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+#include "posixtime.h"
+#include "bashansi.h"
+#include "bashintl.h"
+
+#include "shell.h"
+#include "execute_cmd.h"
+#include "mailcheck.h"
+#include <tilde/tilde.h>
+
+/* Values for flags word in struct _fileinfo */
+#define MBOX_INITIALIZED 0x01
+
+extern time_t shell_start_time;
+
+extern int mailstat __P((const char *, struct stat *));
+
+typedef struct _fileinfo {
+ char *name;
+ char *msg;
+ time_t access_time;
+ time_t mod_time;
+ off_t file_size;
+ int flags;
+} FILEINFO;
+
+/* The list of remembered mail files. */
+static FILEINFO **mailfiles = (FILEINFO **)NULL;
+
+/* Number of mail files that we have. */
+static int mailfiles_count;
+
+/* The last known time that mail was checked. */
+static time_t last_time_mail_checked = 0;
+
+/* Non-zero means warn if a mail file has been read since last checked. */
+int mail_warning;
+
+static int find_mail_file __P((char *));
+static void init_mail_file __P((int));
+static void update_mail_file __P((int));
+static int add_mail_file __P((char *, char *));
+
+static FILEINFO *alloc_mail_file __P((char *, char *));
+static void dispose_mail_file __P((FILEINFO *));
+
+static int file_mod_date_changed __P((int));
+static int file_access_date_changed __P((int));
+static int file_has_grown __P((int));
+
+static char *parse_mailpath_spec __P((char *));
+
+/* Returns non-zero if it is time to check mail. */
+int
+time_to_check_mail ()
+{
+ char *temp;
+ time_t now;
+ intmax_t seconds;
+
+ temp = get_string_value ("MAILCHECK");
+
+ /* Negative number, or non-numbers (such as empty string) cause no
+ checking to take place. */
+ if (temp == 0 || legal_number (temp, &seconds) == 0 || seconds < 0)
+ return (0);
+
+ now = NOW;
+ /* Time to check if MAILCHECK is explicitly set to zero, or if enough
+ time has passed since the last check. */
+ return (seconds == 0 || ((now - last_time_mail_checked) >= seconds));
+}
+
+/* Okay, we have checked the mail. Perhaps I should make this function
+ go away. */
+void
+reset_mail_timer ()
+{
+ last_time_mail_checked = NOW;
+}
+
+/* Locate a file in the list. Return index of
+ entry, or -1 if not found. */
+static int
+find_mail_file (file)
+ char *file;
+{
+ register int i;
+
+ for (i = 0; i < mailfiles_count; i++)
+ if (STREQ (mailfiles[i]->name, file))
+ return i;
+
+ return -1;
+}
+
+#define RESET_MAIL_FILE(i) \
+ do \
+ { \
+ mailfiles[i]->access_time = mailfiles[i]->mod_time = 0; \
+ mailfiles[i]->file_size = 0; \
+ mailfiles[i]->flags = 0; \
+ } \
+ while (0)
+
+#define UPDATE_MAIL_FILE(i, finfo) \
+ do \
+ { \
+ mailfiles[i]->access_time = finfo.st_atime; \
+ mailfiles[i]->mod_time = finfo.st_mtime; \
+ mailfiles[i]->file_size = finfo.st_size; \
+ mailfiles[i]->flags |= MBOX_INITIALIZED; \
+ } \
+ while (0)
+
+static void
+init_mail_file (i)
+ int i;
+{
+ mailfiles[i]->access_time = mailfiles[i]->mod_time = last_time_mail_checked ? last_time_mail_checked : shell_start_time;
+ mailfiles[i]->file_size = 0;
+ mailfiles[i]->flags = 0;
+}
+
+static void
+update_mail_file (i)
+ int i;
+{
+ char *file;
+ struct stat finfo;
+
+ file = mailfiles[i]->name;
+ if (mailstat (file, &finfo) == 0)
+ UPDATE_MAIL_FILE (i, finfo);
+ else
+ RESET_MAIL_FILE (i);
+}
+
+/* Add this file to the list of remembered files and return its index
+ in the list of mail files. */
+static int
+add_mail_file (file, msg)
+ char *file, *msg;
+{
+ struct stat finfo;
+ char *filename;
+ int i;
+
+ filename = full_pathname (file);
+ i = find_mail_file (filename);
+ if (i >= 0)
+ {
+ if (mailstat (filename, &finfo) == 0)
+ UPDATE_MAIL_FILE (i, finfo);
+
+ free (filename);
+ return i;
+ }
+
+ i = mailfiles_count++;
+ mailfiles = (FILEINFO **)xrealloc
+ (mailfiles, mailfiles_count * sizeof (FILEINFO *));
+
+ mailfiles[i] = alloc_mail_file (filename, msg);
+ init_mail_file (i);
+
+ return i;
+}
+
+/* Reset the existing mail files access and modification times to zero. */
+void
+reset_mail_files ()
+{
+ register int i;
+
+ for (i = 0; i < mailfiles_count; i++)
+ RESET_MAIL_FILE (i);
+}
+
+static FILEINFO *
+alloc_mail_file (filename, msg)
+ char *filename, *msg;
+{
+ FILEINFO *mf;
+
+ mf = (FILEINFO *)xmalloc (sizeof (FILEINFO));
+ mf->name = filename;
+ mf->msg = msg ? savestring (msg) : (char *)NULL;
+ mf->flags = 0;
+
+ return mf;
+}
+
+static void
+dispose_mail_file (mf)
+ FILEINFO *mf;
+{
+ free (mf->name);
+ FREE (mf->msg);
+ free (mf);
+}
+
+/* Free the information that we have about the remembered mail files. */
+void
+free_mail_files ()
+{
+ register int i;
+
+ for (i = 0; i < mailfiles_count; i++)
+ dispose_mail_file (mailfiles[i]);
+
+ if (mailfiles)
+ free (mailfiles);
+
+ mailfiles_count = 0;
+ mailfiles = (FILEINFO **)NULL;
+}
+
+void
+init_mail_dates ()
+{
+ if (mailfiles == 0)
+ remember_mail_dates ();
+}
+
+/* Return non-zero if FILE's mod date has changed and it has not been
+ accessed since modified. If the size has dropped to zero, reset
+ the cached mail file info. */
+static int
+file_mod_date_changed (i)
+ int i;
+{
+ time_t mtime;
+ struct stat finfo;
+ char *file;
+
+ file = mailfiles[i]->name;
+ mtime = mailfiles[i]->mod_time;
+
+ if ((mailstat (file, &finfo) == 0) && (finfo.st_size > 0))
+ return (mtime < finfo.st_mtime);
+
+ if (finfo.st_size == 0 && mailfiles[i]->file_size > 0)
+ UPDATE_MAIL_FILE (i, finfo);
+
+ return (0);
+}
+
+/* Return non-zero if FILE's access date has changed. */
+static int
+file_access_date_changed (i)
+ int i;
+{
+ time_t atime;
+ struct stat finfo;
+ char *file;
+
+ file = mailfiles[i]->name;
+ atime = mailfiles[i]->access_time;
+
+ if ((mailstat (file, &finfo) == 0) && (finfo.st_size > 0))
+ return (atime < finfo.st_atime);
+
+ return (0);
+}
+
+/* Return non-zero if FILE's size has increased. */
+static int
+file_has_grown (i)
+ int i;
+{
+ off_t size;
+ struct stat finfo;
+ char *file;
+
+ file = mailfiles[i]->name;
+ size = mailfiles[i]->file_size;
+
+ return ((mailstat (file, &finfo) == 0) && (finfo.st_size > size));
+}
+
+/* Take an element from $MAILPATH and return the portion from
+ the first unquoted `?' or `%' to the end of the string. This is the
+ message to be printed when the file contents change. */
+static char *
+parse_mailpath_spec (str)
+ char *str;
+{
+ char *s;
+ int pass_next;
+
+ for (s = str, pass_next = 0; s && *s; s++)
+ {
+ if (pass_next)
+ {
+ pass_next = 0;
+ continue;
+ }
+ if (*s == '\\')
+ {
+ pass_next++;
+ continue;
+ }
+ if (*s == '?' || *s == '%')
+ return s;
+ }
+ return ((char *)NULL);
+}
+
+char *
+make_default_mailpath ()
+{
+#if defined (DEFAULT_MAIL_DIRECTORY)
+ char *mp;
+
+ get_current_user_info ();
+ mp = (char *)xmalloc (2 + sizeof (DEFAULT_MAIL_DIRECTORY) + strlen (current_user.user_name));
+ strcpy (mp, DEFAULT_MAIL_DIRECTORY);
+ mp[sizeof(DEFAULT_MAIL_DIRECTORY) - 1] = '/';
+ strcpy (mp + sizeof (DEFAULT_MAIL_DIRECTORY), current_user.user_name);
+ return (mp);
+#else
+ return ((char *)NULL);
+#endif
+}
+
+/* Remember the dates of the files specified by MAILPATH, or if there is
+ no MAILPATH, by the file specified in MAIL. If neither exists, use a
+ default value, which we randomly concoct from using Unix. */
+
+void
+remember_mail_dates ()
+{
+ char *mailpaths;
+ char *mailfile, *mp;
+ int i = 0;
+
+ mailpaths = get_string_value ("MAILPATH");
+
+ /* If no $MAILPATH, but $MAIL, use that as a single filename to check. */
+ if (mailpaths == 0 && (mailpaths = get_string_value ("MAIL")))
+ {
+ add_mail_file (mailpaths, (char *)NULL);
+ return;
+ }
+
+ if (mailpaths == 0)
+ {
+ mailpaths = make_default_mailpath ();
+ if (mailpaths)
+ {
+ add_mail_file (mailpaths, (char *)NULL);
+ free (mailpaths);
+ }
+ return;
+ }
+
+ while (mailfile = extract_colon_unit (mailpaths, &i))
+ {
+ mp = parse_mailpath_spec (mailfile);
+ if (mp && *mp)
+ *mp++ = '\0';
+ add_mail_file (mailfile, mp);
+ free (mailfile);
+ }
+}
+
+/* check_mail () is useful for more than just checking mail. Since it has
+ the paranoids dream ability of telling you when someone has read your
+ mail, it can just as easily be used to tell you when someones .profile
+ file has been read, thus letting one know when someone else has logged
+ in. Pretty good, huh? */
+
+/* Check for mail in some files. If the modification date of any
+ of the files in MAILPATH has changed since we last did a
+ remember_mail_dates () then mention that the user has mail.
+ Special hack: If the variable MAIL_WARNING is non-zero and the
+ mail file has been accessed since the last time we remembered, then
+ the message "The mail in <mailfile> has been read" is printed. */
+void
+check_mail ()
+{
+ char *current_mail_file, *message;
+ int i, use_user_notification;
+ char *dollar_underscore, *temp;
+
+ dollar_underscore = get_string_value ("_");
+ if (dollar_underscore)
+ dollar_underscore = savestring (dollar_underscore);
+
+ for (i = 0; i < mailfiles_count; i++)
+ {
+ current_mail_file = mailfiles[i]->name;
+
+ if (*current_mail_file == '\0')
+ continue;
+
+ if (file_mod_date_changed (i))
+ {
+ int file_is_bigger;
+
+ use_user_notification = mailfiles[i]->msg != (char *)NULL;
+ message = mailfiles[i]->msg ? mailfiles[i]->msg : _("You have mail in $_");
+
+ bind_variable ("_", current_mail_file, 0);
+
+#define atime mailfiles[i]->access_time
+#define mtime mailfiles[i]->mod_time
+
+ /* Have to compute this before the call to update_mail_file, which
+ resets all the information. */
+ file_is_bigger = file_has_grown (i);
+
+ update_mail_file (i);
+
+ /* If the user has just run a program which manipulates the
+ mail file, then don't bother explaining that the mail
+ file has been manipulated. Since some systems don't change
+ the access time to be equal to the modification time when
+ the mail in the file is manipulated, check the size also. If
+ the file has not grown, continue. */
+ if ((atime >= mtime) && !file_is_bigger)
+ continue;
+
+ /* If the mod time is later than the access time and the file
+ has grown, note the fact that this is *new* mail. */
+ if (use_user_notification == 0 && (atime < mtime) && file_is_bigger)
+ message = _("You have new mail in $_");
+#undef atime
+#undef mtime
+
+ if (temp = expand_string_to_string (message, Q_DOUBLE_QUOTES))
+ {
+ puts (temp);
+ free (temp);
+ }
+ else
+ putchar ('\n');
+ }
+
+ if (mail_warning && file_access_date_changed (i))
+ {
+ update_mail_file (i);
+ printf (_("The mail in %s has been read\n"), current_mail_file);
+ }
+ }
+
+ if (dollar_underscore)
+ {
+ bind_variable ("_", dollar_underscore, 0);
+ free (dollar_underscore);
+ }
+ else
+ unbind_variable ("_");
+}
diff --git a/mailcheck.h b/mailcheck.h
new file mode 100644
index 0000000..3ca8440
--- /dev/null
+++ b/mailcheck.h
@@ -0,0 +1,34 @@
+/* mailcheck.h -- variables and function declarations for mail checking. */
+
+/* Copyright (C) 1987,1991,2001,2003,2005,2006,2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_MAILCHECK_H_)
+#define _MAILCHECK_H_
+
+/* Functions from mailcheck.c */
+extern int time_to_check_mail __P((void));
+extern void reset_mail_timer __P((void));
+extern void reset_mail_files __P((void));
+extern void free_mail_files __P((void));
+extern char *make_default_mailpath __P((void));
+extern void remember_mail_dates __P((void));
+extern void init_mail_dates __P((void));
+extern void check_mail __P((void));
+
+#endif /* _MAILCHECK_H */
diff --git a/make_cmd.c b/make_cmd.c
new file mode 100644
index 0000000..2eb4fda
--- /dev/null
+++ b/make_cmd.c
@@ -0,0 +1,888 @@
+/* make_cmd.c -- Functions for making instances of the various
+ parser constructs. */
+
+/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include <stdio.h>
+#include "bashtypes.h"
+#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+#include "filecntl.h"
+#include "bashansi.h"
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashintl.h"
+
+#include "parser.h"
+#include "syntax.h"
+#include "command.h"
+#include "general.h"
+#include "error.h"
+#include "flags.h"
+#include "make_cmd.h"
+#include "dispose_cmd.h"
+#include "variables.h"
+#include "subst.h"
+#include "input.h"
+#include "ocache.h"
+#include "externs.h"
+
+#if defined (JOB_CONTROL)
+#include "jobs.h"
+#endif
+
+#include "shmbutil.h"
+
+extern int line_number, current_command_line_count, parser_state;
+extern int last_command_exit_value;
+
+/* Object caching */
+sh_obj_cache_t wdcache = {0, 0, 0};
+sh_obj_cache_t wlcache = {0, 0, 0};
+
+#define WDCACHESIZE 60
+#define WLCACHESIZE 60
+
+static COMMAND *make_for_or_select __P((enum command_type, WORD_DESC *, WORD_LIST *, COMMAND *, int));
+#if defined (ARITH_FOR_COMMAND)
+static WORD_LIST *make_arith_for_expr __P((char *));
+#endif
+static COMMAND *make_until_or_while __P((enum command_type, COMMAND *, COMMAND *));
+
+void
+cmd_init ()
+{
+ ocache_create (wdcache, WORD_DESC, WDCACHESIZE);
+ ocache_create (wlcache, WORD_LIST, WLCACHESIZE);
+}
+
+WORD_DESC *
+alloc_word_desc ()
+{
+ WORD_DESC *temp;
+
+ ocache_alloc (wdcache, WORD_DESC, temp);
+ temp->flags = 0;
+ temp->word = 0;
+ return temp;
+}
+
+WORD_DESC *
+make_bare_word (string)
+ const char *string;
+{
+ WORD_DESC *temp;
+
+ temp = alloc_word_desc ();
+
+ if (*string)
+ temp->word = savestring (string);
+ else
+ {
+ temp->word = (char *)xmalloc (1);
+ temp->word[0] = '\0';
+ }
+
+ return (temp);
+}
+
+WORD_DESC *
+make_word_flags (w, string)
+ WORD_DESC *w;
+ const char *string;
+{
+ register int i;
+ size_t slen;
+ DECLARE_MBSTATE;
+
+ i = 0;
+ slen = strlen (string);
+ while (i < slen)
+ {
+ switch (string[i])
+ {
+ case '$':
+ w->flags |= W_HASDOLLAR;
+ break;
+ case '\\':
+ break; /* continue the loop */
+ case '\'':
+ case '`':
+ case '"':
+ w->flags |= W_QUOTED;
+ break;
+ }
+
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+ return (w);
+}
+
+WORD_DESC *
+make_word (string)
+ const char *string;
+{
+ WORD_DESC *temp;
+
+ temp = make_bare_word (string);
+ return (make_word_flags (temp, string));
+}
+
+WORD_DESC *
+make_word_from_token (token)
+ int token;
+{
+ char tokenizer[2];
+
+ tokenizer[0] = token;
+ tokenizer[1] = '\0';
+
+ return (make_word (tokenizer));
+}
+
+WORD_LIST *
+make_word_list (word, wlink)
+ WORD_DESC *word;
+ WORD_LIST *wlink;
+{
+ WORD_LIST *temp;
+
+ ocache_alloc (wlcache, WORD_LIST, temp);
+
+ temp->word = word;
+ temp->next = wlink;
+ return (temp);
+}
+
+COMMAND *
+make_command (type, pointer)
+ enum command_type type;
+ SIMPLE_COM *pointer;
+{
+ COMMAND *temp;
+
+ temp = (COMMAND *)xmalloc (sizeof (COMMAND));
+ temp->type = type;
+ temp->value.Simple = pointer;
+ temp->value.Simple->flags = temp->flags = 0;
+ temp->redirects = (REDIRECT *)NULL;
+ return (temp);
+}
+
+COMMAND *
+command_connect (com1, com2, connector)
+ COMMAND *com1, *com2;
+ int connector;
+{
+ CONNECTION *temp;
+
+ temp = (CONNECTION *)xmalloc (sizeof (CONNECTION));
+ temp->connector = connector;
+ temp->first = com1;
+ temp->second = com2;
+ return (make_command (cm_connection, (SIMPLE_COM *)temp));
+}
+
+static COMMAND *
+make_for_or_select (type, name, map_list, action, lineno)
+ enum command_type type;
+ WORD_DESC *name;
+ WORD_LIST *map_list;
+ COMMAND *action;
+ int lineno;
+{
+ FOR_COM *temp;
+
+ temp = (FOR_COM *)xmalloc (sizeof (FOR_COM));
+ temp->flags = 0;
+ temp->name = name;
+ temp->line = lineno;
+ temp->map_list = map_list;
+ temp->action = action;
+ return (make_command (type, (SIMPLE_COM *)temp));
+}
+
+COMMAND *
+make_for_command (name, map_list, action, lineno)
+ WORD_DESC *name;
+ WORD_LIST *map_list;
+ COMMAND *action;
+ int lineno;
+{
+ return (make_for_or_select (cm_for, name, map_list, action, lineno));
+}
+
+COMMAND *
+make_select_command (name, map_list, action, lineno)
+ WORD_DESC *name;
+ WORD_LIST *map_list;
+ COMMAND *action;
+ int lineno;
+{
+#if defined (SELECT_COMMAND)
+ return (make_for_or_select (cm_select, name, map_list, action, lineno));
+#else
+ last_command_exit_value = 2;
+ return ((COMMAND *)NULL);
+#endif
+}
+
+#if defined (ARITH_FOR_COMMAND)
+static WORD_LIST *
+make_arith_for_expr (s)
+ char *s;
+{
+ WORD_LIST *result;
+ WORD_DESC *wd;
+
+ if (s == 0 || *s == '\0')
+ return ((WORD_LIST *)NULL);
+ wd = make_word (s);
+ wd->flags |= W_NOGLOB|W_NOSPLIT|W_QUOTED|W_DQUOTE; /* no word splitting or globbing */
+ result = make_word_list (wd, (WORD_LIST *)NULL);
+ return result;
+}
+#endif
+
+/* Note that this function calls dispose_words on EXPRS, since it doesn't
+ use the word list directly. We free it here rather than at the caller
+ because no other function in this file requires that the caller free
+ any arguments. */
+COMMAND *
+make_arith_for_command (exprs, action, lineno)
+ WORD_LIST *exprs;
+ COMMAND *action;
+ int lineno;
+{
+#if defined (ARITH_FOR_COMMAND)
+ ARITH_FOR_COM *temp;
+ WORD_LIST *init, *test, *step;
+ char *s, *t, *start;
+ int nsemi;
+
+ init = test = step = (WORD_LIST *)NULL;
+ /* Parse the string into the three component sub-expressions. */
+ start = t = s = exprs->word->word;
+ for (nsemi = 0; ;)
+ {
+ /* skip whitespace at the start of each sub-expression. */
+ while (whitespace (*s))
+ s++;
+ start = s;
+ /* skip to the semicolon or EOS */
+ while (*s && *s != ';')
+ s++;
+
+ t = (s > start) ? substring (start, 0, s - start) : (char *)NULL;
+
+ nsemi++;
+ switch (nsemi)
+ {
+ case 1:
+ init = make_arith_for_expr (t);
+ break;
+ case 2:
+ test = make_arith_for_expr (t);
+ break;
+ case 3:
+ step = make_arith_for_expr (t);
+ break;
+ }
+
+ FREE (t);
+ if (*s == '\0')
+ break;
+ s++; /* skip over semicolon */
+ }
+
+ if (nsemi != 3)
+ {
+ if (nsemi < 3)
+ parser_error (lineno, _("syntax error: arithmetic expression required"));
+ else
+ parser_error (lineno, _("syntax error: `;' unexpected"));
+ parser_error (lineno, _("syntax error: `((%s))'"), exprs->word->word);
+ last_command_exit_value = 2;
+ return ((COMMAND *)NULL);
+ }
+
+ temp = (ARITH_FOR_COM *)xmalloc (sizeof (ARITH_FOR_COM));
+ temp->flags = 0;
+ temp->line = lineno;
+ temp->init = init ? init : make_arith_for_expr ("1");
+ temp->test = test ? test : make_arith_for_expr ("1");
+ temp->step = step ? step : make_arith_for_expr ("1");
+ temp->action = action;
+
+ dispose_words (exprs);
+ return (make_command (cm_arith_for, (SIMPLE_COM *)temp));
+#else
+ dispose_words (exprs);
+ last_command_exit_value = 2;
+ return ((COMMAND *)NULL);
+#endif /* ARITH_FOR_COMMAND */
+}
+
+COMMAND *
+make_group_command (command)
+ COMMAND *command;
+{
+ GROUP_COM *temp;
+
+ temp = (GROUP_COM *)xmalloc (sizeof (GROUP_COM));
+ temp->command = command;
+ return (make_command (cm_group, (SIMPLE_COM *)temp));
+}
+
+COMMAND *
+make_case_command (word, clauses, lineno)
+ WORD_DESC *word;
+ PATTERN_LIST *clauses;
+ int lineno;
+{
+ CASE_COM *temp;
+
+ temp = (CASE_COM *)xmalloc (sizeof (CASE_COM));
+ temp->flags = 0;
+ temp->line = lineno;
+ temp->word = word;
+ temp->clauses = REVERSE_LIST (clauses, PATTERN_LIST *);
+ return (make_command (cm_case, (SIMPLE_COM *)temp));
+}
+
+PATTERN_LIST *
+make_pattern_list (patterns, action)
+ WORD_LIST *patterns;
+ COMMAND *action;
+{
+ PATTERN_LIST *temp;
+
+ temp = (PATTERN_LIST *)xmalloc (sizeof (PATTERN_LIST));
+ temp->patterns = REVERSE_LIST (patterns, WORD_LIST *);
+ temp->action = action;
+ temp->next = NULL;
+ temp->flags = 0;
+ return (temp);
+}
+
+COMMAND *
+make_if_command (test, true_case, false_case)
+ COMMAND *test, *true_case, *false_case;
+{
+ IF_COM *temp;
+
+ temp = (IF_COM *)xmalloc (sizeof (IF_COM));
+ temp->flags = 0;
+ temp->test = test;
+ temp->true_case = true_case;
+ temp->false_case = false_case;
+ return (make_command (cm_if, (SIMPLE_COM *)temp));
+}
+
+static COMMAND *
+make_until_or_while (which, test, action)
+ enum command_type which;
+ COMMAND *test, *action;
+{
+ WHILE_COM *temp;
+
+ temp = (WHILE_COM *)xmalloc (sizeof (WHILE_COM));
+ temp->flags = 0;
+ temp->test = test;
+ temp->action = action;
+ return (make_command (which, (SIMPLE_COM *)temp));
+}
+
+COMMAND *
+make_while_command (test, action)
+ COMMAND *test, *action;
+{
+ return (make_until_or_while (cm_while, test, action));
+}
+
+COMMAND *
+make_until_command (test, action)
+ COMMAND *test, *action;
+{
+ return (make_until_or_while (cm_until, test, action));
+}
+
+COMMAND *
+make_arith_command (exp)
+ WORD_LIST *exp;
+{
+#if defined (DPAREN_ARITHMETIC)
+ COMMAND *command;
+ ARITH_COM *temp;
+
+ command = (COMMAND *)xmalloc (sizeof (COMMAND));
+ command->value.Arith = temp = (ARITH_COM *)xmalloc (sizeof (ARITH_COM));
+
+ temp->flags = 0;
+ temp->line = line_number;
+ temp->exp = exp;
+
+ command->type = cm_arith;
+ command->redirects = (REDIRECT *)NULL;
+ command->flags = 0;
+
+ return (command);
+#else
+ last_command_exit_value = 2;
+ return ((COMMAND *)NULL);
+#endif
+}
+
+#if defined (COND_COMMAND)
+struct cond_com *
+make_cond_node (type, op, left, right)
+ int type;
+ WORD_DESC *op;
+ struct cond_com *left, *right;
+{
+ COND_COM *temp;
+
+ temp = (COND_COM *)xmalloc (sizeof (COND_COM));
+ temp->flags = 0;
+ temp->line = line_number;
+ temp->type = type;
+ temp->op = op;
+ temp->left = left;
+ temp->right = right;
+
+ return (temp);
+}
+#endif
+
+COMMAND *
+make_cond_command (cond_node)
+ COND_COM *cond_node;
+{
+#if defined (COND_COMMAND)
+ COMMAND *command;
+
+ command = (COMMAND *)xmalloc (sizeof (COMMAND));
+ command->value.Cond = cond_node;
+
+ command->type = cm_cond;
+ command->redirects = (REDIRECT *)NULL;
+ command->flags = 0;
+ command->line = cond_node ? cond_node->line : 0;
+
+ return (command);
+#else
+ last_command_exit_value = 2;
+ return ((COMMAND *)NULL);
+#endif
+}
+
+COMMAND *
+make_bare_simple_command ()
+{
+ COMMAND *command;
+ SIMPLE_COM *temp;
+
+ command = (COMMAND *)xmalloc (sizeof (COMMAND));
+ command->value.Simple = temp = (SIMPLE_COM *)xmalloc (sizeof (SIMPLE_COM));
+
+ temp->flags = 0;
+ temp->line = line_number;
+ temp->words = (WORD_LIST *)NULL;
+ temp->redirects = (REDIRECT *)NULL;
+
+ command->type = cm_simple;
+ command->redirects = (REDIRECT *)NULL;
+ command->flags = 0;
+
+ return (command);
+}
+
+/* Return a command which is the connection of the word or redirection
+ in ELEMENT, and the command * or NULL in COMMAND. */
+COMMAND *
+make_simple_command (element, command)
+ ELEMENT element;
+ COMMAND *command;
+{
+ /* If we are starting from scratch, then make the initial command
+ structure. Also note that we have to fill in all the slots, since
+ malloc doesn't return zeroed space. */
+ if (command == 0)
+ {
+ command = make_bare_simple_command ();
+ parser_state |= PST_REDIRLIST;
+ }
+
+ if (element.word)
+ {
+ command->value.Simple->words = make_word_list (element.word, command->value.Simple->words);
+ parser_state &= ~PST_REDIRLIST;
+ }
+ else if (element.redirect)
+ {
+ REDIRECT *r = element.redirect;
+ /* Due to the way <> is implemented, there may be more than a single
+ redirection in element.redirect. We just follow the chain as far
+ as it goes, and hook onto the end. */
+ while (r->next)
+ r = r->next;
+ r->next = command->value.Simple->redirects;
+ command->value.Simple->redirects = element.redirect;
+ }
+
+ return (command);
+}
+
+/* Because we are Bourne compatible, we read the input for this
+ << or <<- redirection now, from wherever input is coming from.
+ We store the input read into a WORD_DESC. Replace the text of
+ the redirectee.word with the new input text. If <<- is on,
+ then remove leading TABS from each line. */
+void
+make_here_document (temp, lineno)
+ REDIRECT *temp;
+ int lineno;
+{
+ int kill_leading, redir_len;
+ char *redir_word, *document, *full_line;
+ int document_index, document_size, delim_unquoted;
+
+ if (temp->instruction != r_deblank_reading_until &&
+ temp->instruction != r_reading_until)
+ {
+ internal_error (_("make_here_document: bad instruction type %d"), temp->instruction);
+ return;
+ }
+
+ kill_leading = temp->instruction == r_deblank_reading_until;
+
+ document = (char *)NULL;
+ document_index = document_size = 0;
+
+ /* Quote removal is the only expansion performed on the delimiter
+ for here documents, making it an extremely special case. */
+ redir_word = string_quote_removal (temp->redirectee.filename->word, 0);
+
+ /* redirection_expand will return NULL if the expansion results in
+ multiple words or no words. Check for that here, and just abort
+ this here document if it does. */
+ if (redir_word)
+ redir_len = strlen (redir_word);
+ else
+ {
+ temp->here_doc_eof = (char *)xmalloc (1);
+ temp->here_doc_eof[0] = '\0';
+ goto document_done;
+ }
+
+ free (temp->redirectee.filename->word);
+ temp->here_doc_eof = redir_word;
+
+ /* Read lines from wherever lines are coming from.
+ For each line read, if kill_leading, then kill the
+ leading tab characters.
+ If the line matches redir_word exactly, then we have
+ manufactured the document. Otherwise, add the line to the
+ list of lines in the document. */
+
+ /* If the here-document delimiter was quoted, the lines should
+ be read verbatim from the input. If it was not quoted, we
+ need to perform backslash-quoted newline removal. */
+ delim_unquoted = (temp->redirectee.filename->flags & W_QUOTED) == 0;
+ while (full_line = read_secondary_line (delim_unquoted))
+ {
+ register char *line;
+ int len;
+
+ line = full_line;
+ line_number++;
+
+ /* If set -v is in effect, echo the line read. read_secondary_line/
+ read_a_line leaves the newline at the end, so don't print another. */
+ if (echo_input_at_read)
+ fprintf (stderr, "%s", line);
+
+ if (kill_leading && *line)
+ {
+ /* Hack: To be compatible with some Bourne shells, we
+ check the word before stripping the whitespace. This
+ is a hack, though. */
+ if (STREQN (line, redir_word, redir_len) && line[redir_len] == '\n')
+ goto document_done;
+
+ while (*line == '\t')
+ line++;
+ }
+
+ if (*line == 0)
+ continue;
+
+ if (STREQN (line, redir_word, redir_len) && line[redir_len] == '\n')
+ goto document_done;
+
+ len = strlen (line);
+ if (len + document_index >= document_size)
+ {
+ document_size = document_size ? 2 * (document_size + len) : len + 2;
+ document = (char *)xrealloc (document, document_size);
+ }
+
+ /* len is guaranteed to be > 0 because of the check for line
+ being an empty string before the call to strlen. */
+ FASTCOPY (line, document + document_index, len);
+ document_index += len;
+ }
+
+ if (full_line == 0)
+ internal_warning (_("here-document at line %d delimited by end-of-file (wanted `%s')"), lineno, redir_word);
+
+document_done:
+ if (document)
+ document[document_index] = '\0';
+ else
+ {
+ document = (char *)xmalloc (1);
+ document[0] = '\0';
+ }
+ temp->redirectee.filename->word = document;
+}
+
+/* Generate a REDIRECT from SOURCE, DEST, and INSTRUCTION.
+ INSTRUCTION is the instruction type, SOURCE is a file descriptor,
+ and DEST is a file descriptor or a WORD_DESC *. */
+REDIRECT *
+make_redirection (source, instruction, dest_and_filename, flags)
+ REDIRECTEE source;
+ enum r_instruction instruction;
+ REDIRECTEE dest_and_filename;
+ int flags;
+{
+ REDIRECT *temp;
+ WORD_DESC *w;
+ int wlen;
+ intmax_t lfd;
+
+ temp = (REDIRECT *)xmalloc (sizeof (REDIRECT));
+
+ /* First do the common cases. */
+ temp->redirector = source;
+ temp->redirectee = dest_and_filename;
+ temp->instruction = instruction;
+ temp->flags = 0;
+ temp->rflags = flags;
+ temp->next = (REDIRECT *)NULL;
+
+ switch (instruction)
+ {
+
+ case r_output_direction: /* >foo */
+ case r_output_force: /* >| foo */
+ case r_err_and_out: /* &>filename */
+ temp->flags = O_TRUNC | O_WRONLY | O_CREAT;
+ break;
+
+ case r_appending_to: /* >>foo */
+ case r_append_err_and_out: /* &>> filename */
+ temp->flags = O_APPEND | O_WRONLY | O_CREAT;
+ break;
+
+ case r_input_direction: /* <foo */
+ case r_inputa_direction: /* foo & makes this. */
+ temp->flags = O_RDONLY;
+ break;
+
+ case r_input_output: /* <>foo */
+ temp->flags = O_RDWR | O_CREAT;
+ break;
+
+ case r_deblank_reading_until: /* <<-foo */
+ case r_reading_until: /* << foo */
+ case r_reading_string: /* <<< foo */
+ case r_close_this: /* <&- */
+ case r_duplicating_input: /* 1<&2 */
+ case r_duplicating_output: /* 1>&2 */
+ break;
+
+ /* the parser doesn't pass these. */
+ case r_move_input: /* 1<&2- */
+ case r_move_output: /* 1>&2- */
+ case r_move_input_word: /* 1<&$foo- */
+ case r_move_output_word: /* 1>&$foo- */
+ break;
+
+ /* The way the lexer works we have to do this here. */
+ case r_duplicating_input_word: /* 1<&$foo */
+ case r_duplicating_output_word: /* 1>&$foo */
+ w = dest_and_filename.filename;
+ wlen = strlen (w->word) - 1;
+ if (w->word[wlen] == '-') /* Yuck */
+ {
+ w->word[wlen] = '\0';
+ if (all_digits (w->word) && legal_number (w->word, &lfd) && lfd == (int)lfd)
+ {
+ dispose_word (w);
+ temp->instruction = (instruction == r_duplicating_input_word) ? r_move_input : r_move_output;
+ temp->redirectee.dest = lfd;
+ }
+ else
+ temp->instruction = (instruction == r_duplicating_input_word) ? r_move_input_word : r_move_output_word;
+ }
+
+ break;
+
+ default:
+ programming_error (_("make_redirection: redirection instruction `%d' out of range"), instruction);
+ abort ();
+ break;
+ }
+ return (temp);
+}
+
+COMMAND *
+make_function_def (name, command, lineno, lstart)
+ WORD_DESC *name;
+ COMMAND *command;
+ int lineno, lstart;
+{
+ FUNCTION_DEF *temp;
+#if defined (ARRAY_VARS)
+ SHELL_VAR *bash_source_v;
+ ARRAY *bash_source_a;
+#endif
+
+ temp = (FUNCTION_DEF *)xmalloc (sizeof (FUNCTION_DEF));
+ temp->command = command;
+ temp->name = name;
+ temp->line = lineno;
+ temp->flags = 0;
+ command->line = lstart;
+
+ /* Information used primarily for debugging. */
+ temp->source_file = 0;
+#if defined (ARRAY_VARS)
+ GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a);
+ if (bash_source_a && array_num_elements (bash_source_a) > 0)
+ temp->source_file = array_reference (bash_source_a, 0);
+#endif
+#if defined (DEBUGGER)
+ bind_function_def (name->word, temp);
+#endif
+
+ temp->source_file = 0;
+ return (make_command (cm_function_def, (SIMPLE_COM *)temp));
+}
+
+COMMAND *
+make_subshell_command (command)
+ COMMAND *command;
+{
+ SUBSHELL_COM *temp;
+
+ temp = (SUBSHELL_COM *)xmalloc (sizeof (SUBSHELL_COM));
+ temp->command = command;
+ temp->flags = CMD_WANT_SUBSHELL;
+ return (make_command (cm_subshell, (SIMPLE_COM *)temp));
+}
+
+COMMAND *
+make_coproc_command (name, command)
+ char *name;
+ COMMAND *command;
+{
+ COPROC_COM *temp;
+
+ temp = (COPROC_COM *)xmalloc (sizeof (COPROC_COM));
+ temp->name = savestring (name);
+ temp->command = command;
+ temp->flags = CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ return (make_command (cm_coproc, (SIMPLE_COM *)temp));
+}
+
+/* Reverse the word list and redirection list in the simple command
+ has just been parsed. It seems simpler to do this here the one
+ time then by any other method that I can think of. */
+COMMAND *
+clean_simple_command (command)
+ COMMAND *command;
+{
+ if (command->type != cm_simple)
+ command_error ("clean_simple_command", CMDERR_BADTYPE, command->type, 0);
+ else
+ {
+ command->value.Simple->words =
+ REVERSE_LIST (command->value.Simple->words, WORD_LIST *);
+ command->value.Simple->redirects =
+ REVERSE_LIST (command->value.Simple->redirects, REDIRECT *);
+ }
+
+ parser_state &= ~PST_REDIRLIST;
+ return (command);
+}
+
+/* The Yacc grammar productions have a problem, in that they take a
+ list followed by an ampersand (`&') and do a simple command connection,
+ making the entire list effectively asynchronous, instead of just
+ the last command. This means that when the list is executed, all
+ the commands have stdin set to /dev/null when job control is not
+ active, instead of just the last. This is wrong, and needs fixing
+ up. This function takes the `&' and applies it to the last command
+ in the list. This is done only for lists connected by `;'; it makes
+ `;' bind `tighter' than `&'. */
+COMMAND *
+connect_async_list (command, command2, connector)
+ COMMAND *command, *command2;
+ int connector;
+{
+ COMMAND *t, *t1, *t2;
+
+ t1 = command;
+ t = command->value.Connection->second;
+
+ if (!t || (command->flags & CMD_WANT_SUBSHELL) ||
+ command->value.Connection->connector != ';')
+ {
+ t = command_connect (command, command2, connector);
+ return t;
+ }
+
+ /* This is just defensive programming. The Yacc precedence rules
+ will generally hand this function a command where t points directly
+ to the command we want (e.g. given a ; b ; c ; d &, t1 will point
+ to the `a ; b ; c' list and t will be the `d'). We only want to do
+ this if the list is not being executed as a unit in the background
+ with `( ... )', so we have to check for CMD_WANT_SUBSHELL. That's
+ the only way to tell. */
+ while (((t->flags & CMD_WANT_SUBSHELL) == 0) && t->type == cm_connection &&
+ t->value.Connection->connector == ';')
+ {
+ t1 = t;
+ t = t->value.Connection->second;
+ }
+ /* Now we have t pointing to the last command in the list, and
+ t1->value.Connection->second == t. */
+ t2 = command_connect (t, command2, connector);
+ t1->value.Connection->second = t2;
+ return command;
+}
diff --git a/make_cmd.h b/make_cmd.h
new file mode 100644
index 0000000..f17774d
--- /dev/null
+++ b/make_cmd.h
@@ -0,0 +1,70 @@
+/* make_cmd.h -- Declarations of functions found in make_cmd.c */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_MAKE_CMD_H_)
+#define _MAKE_CMD_H_
+
+#include "stdc.h"
+
+extern void cmd_init __P((void));
+
+extern WORD_DESC *alloc_word_desc __P((void));
+extern WORD_DESC *make_bare_word __P((const char *));
+extern WORD_DESC *make_word_flags __P((WORD_DESC *, const char *));
+extern WORD_DESC *make_word __P((const char *));
+extern WORD_DESC *make_word_from_token __P((int));
+
+extern WORD_LIST *make_word_list __P((WORD_DESC *, WORD_LIST *));
+
+#define add_string_to_list(s, l) make_word_list (make_word(s), (l))
+
+extern COMMAND *make_command __P((enum command_type, SIMPLE_COM *));
+extern COMMAND *command_connect __P((COMMAND *, COMMAND *, int));
+extern COMMAND *make_for_command __P((WORD_DESC *, WORD_LIST *, COMMAND *, int));
+extern COMMAND *make_group_command __P((COMMAND *));
+extern COMMAND *make_case_command __P((WORD_DESC *, PATTERN_LIST *, int));
+extern PATTERN_LIST *make_pattern_list __P((WORD_LIST *, COMMAND *));
+extern COMMAND *make_if_command __P((COMMAND *, COMMAND *, COMMAND *));
+extern COMMAND *make_while_command __P((COMMAND *, COMMAND *));
+extern COMMAND *make_until_command __P((COMMAND *, COMMAND *));
+extern COMMAND *make_bare_simple_command __P((void));
+extern COMMAND *make_simple_command __P((ELEMENT, COMMAND *));
+extern void make_here_document __P((REDIRECT *, int));
+extern REDIRECT *make_redirection __P((REDIRECTEE, enum r_instruction, REDIRECTEE, int));
+extern COMMAND *make_function_def __P((WORD_DESC *, COMMAND *, int, int));
+extern COMMAND *clean_simple_command __P((COMMAND *));
+
+extern COMMAND *make_arith_command __P((WORD_LIST *));
+
+extern COMMAND *make_select_command __P((WORD_DESC *, WORD_LIST *, COMMAND *, int));
+
+#if defined (COND_COMMAND)
+extern COND_COM *make_cond_node __P((int, WORD_DESC *, COND_COM *, COND_COM *));
+extern COMMAND *make_cond_command __P((COND_COM *));
+#endif
+
+extern COMMAND *make_arith_for_command __P((WORD_LIST *, COMMAND *, int));
+
+extern COMMAND *make_subshell_command __P((COMMAND *));
+extern COMMAND *make_coproc_command __P((char *, COMMAND *));
+
+extern COMMAND *connect_async_list __P((COMMAND *, COMMAND *, int));
+
+#endif /* !_MAKE_CMD_H */
diff --git a/mksyntax.c b/mksyntax.c
new file mode 100644
index 0000000..56ade2e
--- /dev/null
+++ b/mksyntax.c
@@ -0,0 +1,415 @@
+/*
+ * mksyntax.c - construct shell syntax table for fast char attribute lookup.
+ */
+
+/* Copyright (C) 2000-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include <stdio.h>
+#include "bashansi.h"
+#include "chartypes.h"
+#include <errno.h>
+
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#include "syntax.h"
+
+extern int optind;
+extern char *optarg;
+
+#ifndef errno
+extern int errno;
+#endif
+
+#ifndef HAVE_STRERROR
+extern char *strerror();
+#endif
+
+struct wordflag {
+ int flag;
+ char *fstr;
+} wordflags[] = {
+ { CWORD, "CWORD" },
+ { CSHMETA, "CSHMETA" },
+ { CSHBRK, "CSHBRK" },
+ { CBACKQ, "CBACKQ" },
+ { CQUOTE, "CQUOTE" },
+ { CSPECL, "CSPECL" },
+ { CEXP, "CEXP" },
+ { CBSDQUOTE, "CBSDQUOTE" },
+ { CBSHDOC, "CBSHDOC" },
+ { CGLOB, "CGLOB" },
+ { CXGLOB, "CXGLOB" },
+ { CXQUOTE, "CXQUOTE" },
+ { CSPECVAR, "CSPECVAR" },
+ { CSUBSTOP, "CSUBSTOP" },
+ { CBLANK, "CBLANK" },
+};
+
+#define N_WFLAGS (sizeof (wordflags) / sizeof (wordflags[0]))
+#define SYNSIZE 256
+
+int lsyntax[SYNSIZE];
+int debug;
+char *progname;
+
+char preamble[] = "\
+/*\n\
+ * This file was generated by mksyntax. DO NOT EDIT.\n\
+ */\n\
+\n";
+
+char includes[] = "\
+#include \"config.h\"\n\
+#include \"stdc.h\"\n\
+#include \"syntax.h\"\n\n";
+
+static void
+usage()
+{
+ fprintf (stderr, "%s: usage: %s [-d] [-o filename]\n", progname, progname);
+ exit (2);
+}
+
+#ifdef INCLUDE_UNUSED
+static int
+getcflag (s)
+ char *s;
+{
+ int i;
+
+ for (i = 0; i < N_WFLAGS; i++)
+ if (strcmp (s, wordflags[i].fstr) == 0)
+ return wordflags[i].flag;
+ return -1;
+}
+#endif
+
+static char *
+cdesc (i)
+ int i;
+{
+ static char xbuf[16];
+
+ if (i == ' ')
+ return "SPC";
+ else if (ISPRINT (i))
+ {
+ xbuf[0] = i;
+ xbuf[1] = '\0';
+ return (xbuf);
+ }
+ else if (i == CTLESC)
+ return "CTLESC";
+ else if (i == CTLNUL)
+ return "CTLNUL";
+ else if (i == '\033') /* ASCII */
+ return "ESC";
+
+ xbuf[0] = '\\';
+ xbuf[2] = '\0';
+
+ switch (i)
+ {
+#ifdef __STDC__
+ case '\a': xbuf[1] = 'a'; break;
+ case '\v': xbuf[1] = 'v'; break;
+#else
+ case '\007': xbuf[1] = 'a'; break;
+ case 0x0B: xbuf[1] = 'v'; break;
+#endif
+ case '\b': xbuf[1] = 'b'; break;
+ case '\f': xbuf[1] = 'f'; break;
+ case '\n': xbuf[1] = 'n'; break;
+ case '\r': xbuf[1] = 'r'; break;
+ case '\t': xbuf[1] = 't'; break;
+ default: sprintf (xbuf, "%d", i); break;
+ }
+
+ return xbuf;
+}
+
+static char *
+getcstr (f)
+ int f;
+{
+ int i;
+
+ for (i = 0; i < N_WFLAGS; i++)
+ if (f == wordflags[i].flag)
+ return (wordflags[i].fstr);
+ return ((char *)NULL);
+}
+
+static void
+addcstr (str, flag)
+ char *str;
+ int flag;
+{
+ char *s, *fstr;
+ unsigned char uc;
+
+ for (s = str; s && *s; s++)
+ {
+ uc = *s;
+
+ if (debug)
+ {
+ fstr = getcstr (flag);
+ fprintf(stderr, "added %s for character %s\n", fstr, cdesc(uc));
+ }
+
+ lsyntax[uc] |= flag;
+ }
+}
+
+static void
+addcchar (c, flag)
+ unsigned char c;
+ int flag;
+{
+ char *fstr;
+
+ if (debug)
+ {
+ fstr = getcstr (flag);
+ fprintf (stderr, "added %s for character %s\n", fstr, cdesc(c));
+ }
+ lsyntax[c] |= flag;
+}
+
+static void
+addblanks ()
+{
+ register int i;
+ unsigned char uc;
+
+ for (i = 0; i < SYNSIZE; i++)
+ {
+ uc = i;
+ /* Since we don't call setlocale(), this defaults to the "C" locale, and
+ the default blank characters will be space and tab. */
+ if (isblank (uc))
+ lsyntax[uc] |= CBLANK;
+ }
+}
+
+/* load up the correct flag values in lsyntax */
+static void
+load_lsyntax ()
+{
+ /* shell metacharacters */
+ addcstr (shell_meta_chars, CSHMETA);
+
+ /* shell word break characters */
+ addcstr (shell_break_chars, CSHBRK);
+
+ addcchar ('`', CBACKQ);
+
+ addcstr (shell_quote_chars, CQUOTE);
+
+ addcchar (CTLESC, CSPECL);
+ addcchar (CTLNUL, CSPECL);
+
+ addcstr (shell_exp_chars, CEXP);
+
+ addcstr (slashify_in_quotes, CBSDQUOTE);
+ addcstr (slashify_in_here_document, CBSHDOC);
+
+ addcstr (shell_glob_chars, CGLOB);
+
+#if defined (EXTENDED_GLOB)
+ addcstr (ext_glob_chars, CXGLOB);
+#endif
+
+ addcstr (shell_quote_chars, CXQUOTE);
+ addcchar ('\\', CXQUOTE);
+
+ addcstr ("@*#?-$!", CSPECVAR); /* omits $0...$9 and $_ */
+
+ addcstr ("-=?+", CSUBSTOP); /* OP in ${paramOPword} */
+
+ addblanks ();
+}
+
+static void
+dump_lflags (fp, ind)
+ FILE *fp;
+ int ind;
+{
+ int xflags, first, i;
+
+ xflags = lsyntax[ind];
+ first = 1;
+
+ if (xflags == 0)
+ fputs (wordflags[0].fstr, fp);
+ else
+ {
+ for (i = 1; i < N_WFLAGS; i++)
+ if (xflags & wordflags[i].flag)
+ {
+ if (first)
+ first = 0;
+ else
+ putc ('|', fp);
+ fputs (wordflags[i].fstr, fp);
+ }
+ }
+}
+
+static void
+wcomment (fp, i)
+ FILE *fp;
+ int i;
+{
+ fputs ("\t\t/* ", fp);
+
+ fprintf (fp, "%s", cdesc(i));
+
+ fputs (" */", fp);
+}
+
+static void
+dump_lsyntax (fp)
+ FILE *fp;
+{
+ int i;
+
+ fprintf (fp, "int sh_syntabsiz = %d;\n", SYNSIZE);
+ fprintf (fp, "int sh_syntaxtab[%d] = {\n", SYNSIZE);
+
+ for (i = 0; i < SYNSIZE; i++)
+ {
+ putc ('\t', fp);
+ dump_lflags (fp, i);
+ putc (',', fp);
+ wcomment (fp, i);
+ putc ('\n', fp);
+ }
+
+ fprintf (fp, "};\n");
+}
+
+int
+main(argc, argv)
+ int argc;
+ char **argv;
+{
+ int opt, i;
+ char *filename;
+ FILE *fp;
+
+ if ((progname = strrchr (argv[0], '/')) == 0)
+ progname = argv[0];
+ else
+ progname++;
+
+ filename = (char *)NULL;
+ debug = 0;
+
+ while ((opt = getopt (argc, argv, "do:")) != EOF)
+ {
+ switch (opt)
+ {
+ case 'd':
+ debug = 1;
+ break;
+ case 'o':
+ filename = optarg;
+ break;
+ default:
+ usage();
+ }
+ }
+
+ argc -= optind;
+ argv += optind;
+
+ if (filename)
+ {
+ fp = fopen (filename, "w");
+ if (fp == 0)
+ {
+ fprintf (stderr, "%s: %s: cannot open: %s\n", progname, filename, strerror(errno));
+ exit (1);
+ }
+ }
+ else
+ {
+ filename = "stdout";
+ fp = stdout;
+ }
+
+
+ for (i = 0; i < SYNSIZE; i++)
+ lsyntax[i] = CWORD;
+
+ load_lsyntax ();
+
+ fprintf (fp, "%s\n", preamble);
+ fprintf (fp, "%s\n", includes);
+
+ dump_lsyntax (fp);
+
+ if (fp != stdout)
+ fclose (fp);
+ exit (0);
+}
+
+
+#if !defined (HAVE_STRERROR)
+
+#include <bashtypes.h>
+#ifndef _MINIX
+# include <sys/param.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+/* Return a string corresponding to the error number E. From
+ the ANSI C spec. */
+#if defined (strerror)
+# undef strerror
+#endif
+
+char *
+strerror (e)
+ int e;
+{
+ static char emsg[40];
+#if defined (HAVE_SYS_ERRLIST)
+ extern int sys_nerr;
+ extern char *sys_errlist[];
+
+ if (e > 0 && e < sys_nerr)
+ return (sys_errlist[e]);
+ else
+#endif /* HAVE_SYS_ERRLIST */
+ {
+ sprintf (emsg, "Unknown system error %d", e);
+ return (&emsg[0]);
+ }
+}
+#endif /* HAVE_STRERROR */
diff --git a/nojobs.c b/nojobs.c
new file mode 100644
index 0000000..b73e3d6
--- /dev/null
+++ b/nojobs.c
@@ -0,0 +1,938 @@
+/* nojobs.c - functions that make children, remember them, and handle their termination. */
+
+/* This file works under BSD, System V, minix, and Posix systems. It does
+ not implement job control. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+#include "filecntl.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <signal.h>
+#include <errno.h>
+
+#if defined (BUFFERED_INPUT)
+# include "input.h"
+#endif
+
+/* Need to include this up here for *_TTY_DRIVER definitions. */
+#include "shtty.h"
+
+#include "bashintl.h"
+
+#include "shell.h"
+#include "jobs.h"
+#include "execute_cmd.h"
+
+#include "builtins/builtext.h" /* for wait_builtin */
+
+#define DEFAULT_CHILD_MAX 32
+
+#if defined (_POSIX_VERSION) || !defined (HAVE_KILLPG)
+# define killpg(pg, sig) kill(-(pg),(sig))
+#endif /* USG || _POSIX_VERSION */
+
+#if !defined (HAVE_SIGINTERRUPT) && !defined (HAVE_POSIX_SIGNALS)
+# define siginterrupt(sig, code)
+#endif /* !HAVE_SIGINTERRUPT && !HAVE_POSIX_SIGNALS */
+
+#if defined (HAVE_WAITPID)
+# define WAITPID(pid, statusp, options) waitpid (pid, statusp, options)
+#else
+# define WAITPID(pid, statusp, options) wait (statusp)
+#endif /* !HAVE_WAITPID */
+
+/* Return the fd from which we are actually getting input. */
+#define input_tty() (shell_tty != -1) ? shell_tty : fileno (stderr)
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+extern int interactive, interactive_shell, login_shell;
+extern int subshell_environment;
+extern int last_command_exit_value, last_command_exit_signal;
+extern int interrupt_immediately;
+extern sh_builtin_func_t *this_shell_builtin;
+#if defined (HAVE_POSIX_SIGNALS)
+extern sigset_t top_level_mask;
+#endif
+extern procenv_t wait_intr_buf;
+extern int wait_signal_received;
+
+pid_t last_made_pid = NO_PID;
+pid_t last_asynchronous_pid = NO_PID;
+
+/* Call this when you start making children. */
+int already_making_children = 0;
+
+/* The controlling tty for this shell. */
+int shell_tty = -1;
+
+/* If this is non-zero, $LINES and $COLUMNS are reset after every process
+ exits from get_tty_state(). */
+int check_window_size;
+
+/* STATUS and FLAGS are only valid if pid != NO_PID
+ STATUS is only valid if (flags & PROC_RUNNING) == 0 */
+struct proc_status {
+ pid_t pid;
+ int status; /* Exit status of PID or 128 + fatal signal number */
+ int flags;
+};
+
+/* Values for proc_status.flags */
+#define PROC_RUNNING 0x01
+#define PROC_NOTIFIED 0x02
+#define PROC_ASYNC 0x04
+#define PROC_SIGNALED 0x10
+
+/* Return values from find_status_by_pid */
+#define PROC_BAD -1
+#define PROC_STILL_ALIVE -2
+
+static struct proc_status *pid_list = (struct proc_status *)NULL;
+static int pid_list_size;
+static int wait_sigint_received;
+
+static long child_max = -1L;
+
+static void alloc_pid_list __P((void));
+static int find_proc_slot __P((void));
+static int find_index_by_pid __P((pid_t));
+static int find_status_by_pid __P((pid_t));
+static int process_exit_status __P((WAIT));
+static int find_termsig_by_pid __P((pid_t));
+static int get_termsig __P((WAIT));
+static void set_pid_status __P((pid_t, WAIT));
+static void set_pid_flags __P((pid_t, int));
+static void unset_pid_flags __P((pid_t, int));
+static int get_pid_flags __P((pid_t));
+static void add_pid __P((pid_t, int));
+static void mark_dead_jobs_as_notified __P((int));
+
+static sighandler wait_sigint_handler __P((int));
+static char *j_strsignal __P((int));
+
+#if defined (HAVE_WAITPID)
+static void reap_zombie_children __P((void));
+#endif
+
+#if !defined (HAVE_SIGINTERRUPT) && defined (HAVE_POSIX_SIGNALS)
+static int siginterrupt __P((int, int));
+#endif
+
+static void restore_sigint_handler __P((void));
+
+/* Allocate new, or grow existing PID_LIST. */
+static void
+alloc_pid_list ()
+{
+ register int i;
+ int old = pid_list_size;
+
+ pid_list_size += 10;
+ pid_list = (struct proc_status *)xrealloc (pid_list, pid_list_size * sizeof (struct proc_status));
+
+ /* None of the newly allocated slots have process id's yet. */
+ for (i = old; i < pid_list_size; i++)
+ pid_list[i].pid = NO_PID;
+}
+
+/* Return the offset within the PID_LIST array of an empty slot. This can
+ create new slots if all of the existing slots are taken. */
+static int
+find_proc_slot ()
+{
+ register int i;
+
+ for (i = 0; i < pid_list_size; i++)
+ if (pid_list[i].pid == NO_PID)
+ return (i);
+
+ if (i == pid_list_size)
+ alloc_pid_list ();
+
+ return (i);
+}
+
+/* Return the offset within the PID_LIST array of a slot containing PID,
+ or the value NO_PID if the pid wasn't found. */
+static int
+find_index_by_pid (pid)
+ pid_t pid;
+{
+ register int i;
+
+ for (i = 0; i < pid_list_size; i++)
+ if (pid_list[i].pid == pid)
+ return (i);
+
+ return (NO_PID);
+}
+
+/* Return the status of PID as looked up in the PID_LIST array. A
+ return value of PROC_BAD indicates that PID wasn't found. */
+static int
+find_status_by_pid (pid)
+ pid_t pid;
+{
+ int i;
+
+ i = find_index_by_pid (pid);
+ if (i == NO_PID)
+ return (PROC_BAD);
+ if (pid_list[i].flags & PROC_RUNNING)
+ return (PROC_STILL_ALIVE);
+ return (pid_list[i].status);
+}
+
+static int
+process_exit_status (status)
+ WAIT status;
+{
+ if (WIFSIGNALED (status))
+ return (128 + WTERMSIG (status));
+ else
+ return (WEXITSTATUS (status));
+}
+
+/* Return the status of PID as looked up in the PID_LIST array. A
+ return value of PROC_BAD indicates that PID wasn't found. */
+static int
+find_termsig_by_pid (pid)
+ pid_t pid;
+{
+ int i;
+
+ i = find_index_by_pid (pid);
+ if (i == NO_PID)
+ return (0);
+ if (pid_list[i].flags & PROC_RUNNING)
+ return (0);
+ return (get_termsig ((WAIT)pid_list[i].status));
+}
+
+/* Set LAST_COMMAND_EXIT_SIGNAL depending on STATUS. If STATUS is -1, look
+ up PID in the pid array and set LAST_COMMAND_EXIT_SIGNAL appropriately
+ depending on its flags and exit status. */
+static int
+get_termsig (status)
+ WAIT status;
+{
+ if (WIFSTOPPED (status) == 0 && WIFSIGNALED (status))
+ return (WTERMSIG (status));
+ else
+ return (0);
+}
+
+/* Give PID the status value STATUS in the PID_LIST array. */
+static void
+set_pid_status (pid, status)
+ pid_t pid;
+ WAIT status;
+{
+ int slot;
+
+#if defined (COPROCESS_SUPPORT)
+ coproc_pidchk (pid, status);
+#endif
+
+ slot = find_index_by_pid (pid);
+ if (slot == NO_PID)
+ return;
+
+ pid_list[slot].status = process_exit_status (status);
+ pid_list[slot].flags &= ~PROC_RUNNING;
+ if (WIFSIGNALED (status))
+ pid_list[slot].flags |= PROC_SIGNALED;
+ /* If it's not a background process, mark it as notified so it gets
+ cleaned up. */
+ if ((pid_list[slot].flags & PROC_ASYNC) == 0)
+ pid_list[slot].flags |= PROC_NOTIFIED;
+}
+
+/* Give PID the flags FLAGS in the PID_LIST array. */
+static void
+set_pid_flags (pid, flags)
+ pid_t pid;
+ int flags;
+{
+ int slot;
+
+ slot = find_index_by_pid (pid);
+ if (slot == NO_PID)
+ return;
+
+ pid_list[slot].flags |= flags;
+}
+
+/* Unset FLAGS for PID in the pid list */
+static void
+unset_pid_flags (pid, flags)
+ pid_t pid;
+ int flags;
+{
+ int slot;
+
+ slot = find_index_by_pid (pid);
+ if (slot == NO_PID)
+ return;
+
+ pid_list[slot].flags &= ~flags;
+}
+
+/* Return the flags corresponding to PID in the PID_LIST array. */
+static int
+get_pid_flags (pid)
+ pid_t pid;
+{
+ int slot;
+
+ slot = find_index_by_pid (pid);
+ if (slot == NO_PID)
+ return 0;
+
+ return (pid_list[slot].flags);
+}
+
+static void
+add_pid (pid, async)
+ pid_t pid;
+ int async;
+{
+ int slot;
+
+ slot = find_proc_slot ();
+
+ pid_list[slot].pid = pid;
+ pid_list[slot].status = -1;
+ pid_list[slot].flags = PROC_RUNNING;
+ if (async)
+ pid_list[slot].flags |= PROC_ASYNC;
+}
+
+static void
+mark_dead_jobs_as_notified (force)
+ int force;
+{
+ register int i, ndead;
+
+ /* first, count the number of non-running async jobs if FORCE == 0 */
+ for (i = ndead = 0; force == 0 && i < pid_list_size; i++)
+ {
+ if (pid_list[i].pid == NO_PID)
+ continue;
+ if (((pid_list[i].flags & PROC_RUNNING) == 0) &&
+ (pid_list[i].flags & PROC_ASYNC))
+ ndead++;
+ }
+
+ if (child_max < 0)
+ child_max = getmaxchild ();
+ if (child_max < 0)
+ child_max = DEFAULT_CHILD_MAX;
+
+ if (force == 0 && ndead <= child_max)
+ return;
+
+ /* If FORCE == 0, we just mark as many non-running async jobs as notified
+ to bring us under the CHILD_MAX limit. */
+ for (i = 0; i < pid_list_size; i++)
+ {
+ if (pid_list[i].pid == NO_PID)
+ continue;
+ if (((pid_list[i].flags & PROC_RUNNING) == 0) &&
+ pid_list[i].pid != last_asynchronous_pid)
+ {
+ pid_list[i].flags |= PROC_NOTIFIED;
+ if (force == 0 && (pid_list[i].flags & PROC_ASYNC) && --ndead <= child_max)
+ break;
+ }
+ }
+}
+
+/* Remove all dead, notified jobs from the pid_list. */
+int
+cleanup_dead_jobs ()
+{
+ register int i;
+
+#if defined (HAVE_WAITPID)
+ reap_zombie_children ();
+#endif
+
+ for (i = 0; i < pid_list_size; i++)
+ {
+ if ((pid_list[i].flags & PROC_RUNNING) == 0 &&
+ (pid_list[i].flags & PROC_NOTIFIED))
+ pid_list[i].pid = NO_PID;
+ }
+
+#if defined (COPROCESS_SUPPORT)
+ coproc_reap ();
+#endif
+
+ return 0;
+}
+
+void
+reap_dead_jobs ()
+{
+ mark_dead_jobs_as_notified (0);
+ cleanup_dead_jobs ();
+}
+
+/* Initialize the job control mechanism, and set up the tty stuff. */
+initialize_job_control (force)
+ int force;
+{
+ shell_tty = fileno (stderr);
+
+ if (interactive)
+ get_tty_state ();
+}
+
+/* Setup this shell to handle C-C, etc. */
+void
+initialize_job_signals ()
+{
+ set_signal_handler (SIGINT, sigint_sighandler);
+
+ /* If this is a login shell we don't wish to be disturbed by
+ stop signals. */
+ if (login_shell)
+ ignore_tty_job_signals ();
+}
+
+#if defined (HAVE_WAITPID)
+/* Collect the status of all zombie children so that their system
+ resources can be deallocated. */
+static void
+reap_zombie_children ()
+{
+# if defined (WNOHANG)
+ pid_t pid;
+ WAIT status;
+
+ CHECK_TERMSIG;
+ while ((pid = waitpid (-1, (int *)&status, WNOHANG)) > 0)
+ set_pid_status (pid, status);
+# endif /* WNOHANG */
+ CHECK_TERMSIG;
+}
+#endif /* WAITPID */
+
+#if !defined (HAVE_SIGINTERRUPT) && defined (HAVE_POSIX_SIGNALS)
+static int
+siginterrupt (sig, flag)
+ int sig, flag;
+{
+ struct sigaction act;
+
+ sigaction (sig, (struct sigaction *)NULL, &act);
+
+ if (flag)
+ act.sa_flags &= ~SA_RESTART;
+ else
+ act.sa_flags |= SA_RESTART;
+
+ return (sigaction (sig, &act, (struct sigaction *)NULL));
+}
+#endif /* !HAVE_SIGINTERRUPT && HAVE_POSIX_SIGNALS */
+
+/* Fork, handling errors. Returns the pid of the newly made child, or 0.
+ COMMAND is just for remembering the name of the command; we don't do
+ anything else with it. ASYNC_P says what to do with the tty. If
+ non-zero, then don't give it away. */
+pid_t
+make_child (command, async_p)
+ char *command;
+ int async_p;
+{
+ pid_t pid;
+ int forksleep;
+
+ /* Discard saved memory. */
+ if (command)
+ free (command);
+
+ start_pipeline ();
+
+#if defined (BUFFERED_INPUT)
+ /* If default_buffered_input is active, we are reading a script. If
+ the command is asynchronous, we have already duplicated /dev/null
+ as fd 0, but have not changed the buffered stream corresponding to
+ the old fd 0. We don't want to sync the stream in this case. */
+ if (default_buffered_input != -1 && (!async_p || default_buffered_input > 0))
+ sync_buffered_stream (default_buffered_input);
+#endif /* BUFFERED_INPUT */
+
+ /* Create the child, handle severe errors. Retry on EAGAIN. */
+ forksleep = 1;
+ while ((pid = fork ()) < 0 && errno == EAGAIN && forksleep < FORKSLEEP_MAX)
+ {
+ sys_error ("fork: retry");
+#if defined (HAVE_WAITPID)
+ /* Posix systems with a non-blocking waitpid () system call available
+ get another chance after zombies are reaped. */
+ reap_zombie_children ();
+ if (forksleep > 1 && sleep (forksleep) != 0)
+ break;
+#else
+ if (sleep (forksleep) != 0)
+ break;
+#endif /* HAVE_WAITPID */
+ forksleep <<= 1;
+ }
+
+ if (pid < 0)
+ {
+ sys_error ("fork");
+ throw_to_top_level ();
+ }
+
+ if (pid == 0)
+ {
+#if defined (BUFFERED_INPUT)
+ unset_bash_input (0);
+#endif /* BUFFERED_INPUT */
+
+#if defined (HAVE_POSIX_SIGNALS)
+ /* Restore top-level signal mask. */
+ sigprocmask (SIG_SETMASK, &top_level_mask, (sigset_t *)NULL);
+#endif
+
+#if 0
+ /* Ignore INT and QUIT in asynchronous children. */
+ if (async_p)
+ last_asynchronous_pid = getpid ();
+#endif
+
+ default_tty_job_signals ();
+ }
+ else
+ {
+ /* In the parent. */
+
+ last_made_pid = pid;
+
+ if (async_p)
+ last_asynchronous_pid = pid;
+
+ add_pid (pid, async_p);
+ }
+ return (pid);
+}
+
+void
+ignore_tty_job_signals ()
+{
+#if defined (SIGTSTP)
+ set_signal_handler (SIGTSTP, SIG_IGN);
+ set_signal_handler (SIGTTIN, SIG_IGN);
+ set_signal_handler (SIGTTOU, SIG_IGN);
+#endif
+}
+
+void
+default_tty_job_signals ()
+{
+#if defined (SIGTSTP)
+ set_signal_handler (SIGTSTP, SIG_DFL);
+ set_signal_handler (SIGTTIN, SIG_DFL);
+ set_signal_handler (SIGTTOU, SIG_DFL);
+#endif
+}
+
+/* Wait for a single pid (PID) and return its exit status. Called by
+ the wait builtin. */
+int
+wait_for_single_pid (pid)
+ pid_t pid;
+{
+ pid_t got_pid;
+ WAIT status;
+ int pstatus, flags;
+
+ pstatus = find_status_by_pid (pid);
+
+ if (pstatus == PROC_BAD)
+ {
+ internal_error (_("wait: pid %ld is not a child of this shell"), (long)pid);
+ return (127);
+ }
+
+ if (pstatus != PROC_STILL_ALIVE)
+ {
+ if (pstatus > 128)
+ last_command_exit_signal = find_termsig_by_pid (pid);
+ return (pstatus);
+ }
+
+ siginterrupt (SIGINT, 1);
+ while ((got_pid = WAITPID (pid, &status, 0)) != pid)
+ {
+ CHECK_TERMSIG;
+ if (got_pid < 0)
+ {
+ if (errno != EINTR && errno != ECHILD)
+ {
+ siginterrupt (SIGINT, 0);
+ sys_error ("wait");
+ }
+ break;
+ }
+ else if (got_pid > 0)
+ set_pid_status (got_pid, status);
+ }
+
+ if (got_pid > 0)
+ {
+ set_pid_status (got_pid, status);
+ set_pid_flags (got_pid, PROC_NOTIFIED);
+ }
+
+ siginterrupt (SIGINT, 0);
+ QUIT;
+
+ return (got_pid > 0 ? process_exit_status (status) : -1);
+}
+
+/* Wait for all of the shell's children to exit. Called by the `wait'
+ builtin. */
+void
+wait_for_background_pids ()
+{
+ pid_t got_pid;
+ WAIT status;
+
+ /* If we aren't using job control, we let the kernel take care of the
+ bookkeeping for us. wait () will return -1 and set errno to ECHILD
+ when there are no more unwaited-for child processes on both
+ 4.2 BSD-based and System V-based systems. */
+
+ siginterrupt (SIGINT, 1);
+
+ /* Wait for ECHILD */
+ while ((got_pid = WAITPID (-1, &status, 0)) != -1)
+ set_pid_status (got_pid, status);
+
+ if (errno != EINTR && errno != ECHILD)
+ {
+ siginterrupt (SIGINT, 0);
+ sys_error("wait");
+ }
+
+ siginterrupt (SIGINT, 0);
+ QUIT;
+
+ mark_dead_jobs_as_notified (1);
+ cleanup_dead_jobs ();
+}
+
+/* Make OLD_SIGINT_HANDLER the SIGINT signal handler. */
+#define INVALID_SIGNAL_HANDLER (SigHandler *)wait_for_background_pids
+static SigHandler *old_sigint_handler = INVALID_SIGNAL_HANDLER;
+
+static void
+restore_sigint_handler ()
+{
+ if (old_sigint_handler != INVALID_SIGNAL_HANDLER)
+ {
+ set_signal_handler (SIGINT, old_sigint_handler);
+ old_sigint_handler = INVALID_SIGNAL_HANDLER;
+ }
+}
+
+/* Handle SIGINT while we are waiting for children in a script to exit.
+ All interrupts are effectively ignored by the shell, but allowed to
+ kill a running job. */
+static sighandler
+wait_sigint_handler (sig)
+ int sig;
+{
+ SigHandler *sigint_handler;
+
+ /* If we got a SIGINT while in `wait', and SIGINT is trapped, do
+ what POSIX.2 says (see builtins/wait.def for more info). */
+ if (this_shell_builtin && this_shell_builtin == wait_builtin &&
+ signal_is_trapped (SIGINT) &&
+ ((sigint_handler = trap_to_sighandler (SIGINT)) == trap_handler))
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ restore_sigint_handler ();
+ interrupt_immediately = 0;
+ trap_handler (SIGINT); /* set pending_traps[SIGINT] */
+ wait_signal_received = SIGINT;
+ longjmp (wait_intr_buf, 1);
+ }
+
+ if (interrupt_immediately)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ restore_sigint_handler ();
+ ADDINTERRUPT;
+ QUIT;
+ }
+
+ wait_sigint_received = 1;
+
+ SIGRETURN (0);
+}
+
+static char *
+j_strsignal (s)
+ int s;
+{
+ static char retcode_name_buffer[64] = { '\0' };
+ char *x;
+
+ x = strsignal (s);
+ if (x == 0)
+ {
+ x = retcode_name_buffer;
+ sprintf (x, "Signal %d", s);
+ }
+ return x;
+}
+
+/* Wait for pid (one of our children) to terminate. This is called only
+ by the execution code in execute_cmd.c. */
+int
+wait_for (pid)
+ pid_t pid;
+{
+ int return_val, pstatus;
+ pid_t got_pid;
+ WAIT status;
+
+ pstatus = find_status_by_pid (pid);
+
+ if (pstatus == PROC_BAD)
+ return (0);
+
+ if (pstatus != PROC_STILL_ALIVE)
+ {
+ if (pstatus > 128)
+ last_command_exit_signal = find_termsig_by_pid (pid);
+ return (pstatus);
+ }
+
+ /* If we are running a script, ignore SIGINT while we're waiting for
+ a child to exit. The loop below does some of this, but not all. */
+ wait_sigint_received = 0;
+ if (interactive_shell == 0)
+ old_sigint_handler = set_signal_handler (SIGINT, wait_sigint_handler);
+
+ while ((got_pid = WAITPID (-1, &status, 0)) != pid) /* XXX was pid now -1 */
+ {
+ CHECK_TERMSIG;
+ if (got_pid < 0 && errno == ECHILD)
+ {
+#if !defined (_POSIX_VERSION)
+ status.w_termsig = status.w_retcode = 0;
+#else
+ status = 0;
+#endif /* _POSIX_VERSION */
+ break;
+ }
+ else if (got_pid < 0 && errno != EINTR)
+ programming_error ("wait_for(%ld): %s", (long)pid, strerror(errno));
+ else if (got_pid > 0)
+ set_pid_status (got_pid, status);
+ }
+
+ if (got_pid > 0)
+ set_pid_status (got_pid, status);
+
+#if defined (HAVE_WAITPID)
+ if (got_pid >= 0)
+ reap_zombie_children ();
+#endif /* HAVE_WAITPID */
+
+ if (interactive_shell == 0)
+ {
+ SigHandler *temp_handler;
+
+ temp_handler = old_sigint_handler;
+ restore_sigint_handler ();
+
+ /* If the job exited because of SIGINT, make sure the shell acts as if
+ it had received one also. */
+ if (WIFSIGNALED (status) && (WTERMSIG (status) == SIGINT))
+ {
+
+ if (maybe_call_trap_handler (SIGINT) == 0)
+ {
+ if (temp_handler == SIG_DFL)
+ termsig_handler (SIGINT);
+ else if (temp_handler != INVALID_SIGNAL_HANDLER && temp_handler != SIG_IGN)
+ (*temp_handler) (SIGINT);
+ }
+ }
+ }
+
+ /* Default return value. */
+ /* ``a full 8 bits of status is returned'' */
+ return_val = process_exit_status (status);
+ last_command_exit_signal = get_termsig (status);
+
+#if !defined (DONT_REPORT_SIGPIPE)
+ if ((WIFSTOPPED (status) == 0) && WIFSIGNALED (status) &&
+ (WTERMSIG (status) != SIGINT))
+#else
+ if ((WIFSTOPPED (status) == 0) && WIFSIGNALED (status) &&
+ (WTERMSIG (status) != SIGINT) && (WTERMSIG (status) != SIGPIPE))
+#endif
+ {
+ fprintf (stderr, "%s", j_strsignal (WTERMSIG (status)));
+ if (WIFCORED (status))
+ fprintf (stderr, _(" (core dumped)"));
+ fprintf (stderr, "\n");
+ }
+
+ if (interactive_shell && subshell_environment == 0)
+ {
+ if (WIFSIGNALED (status) || WIFSTOPPED (status))
+ set_tty_state ();
+ else
+ get_tty_state ();
+ }
+
+ return (return_val);
+}
+
+/* Send PID SIGNAL. Returns -1 on failure, 0 on success. If GROUP is non-zero,
+ or PID is less than -1, then kill the process group associated with PID. */
+int
+kill_pid (pid, signal, group)
+ pid_t pid;
+ int signal, group;
+{
+ int result;
+
+ if (pid < -1)
+ {
+ pid = -pid;
+ group = 1;
+ }
+ result = group ? killpg (pid, signal) : kill (pid, signal);
+ return (result);
+}
+
+static TTYSTRUCT shell_tty_info;
+static int got_tty_state;
+
+/* Fill the contents of shell_tty_info with the current tty info. */
+get_tty_state ()
+{
+ int tty;
+
+ tty = input_tty ();
+ if (tty != -1)
+ {
+ ttgetattr (tty, &shell_tty_info);
+ got_tty_state = 1;
+ if (check_window_size)
+ get_new_window_size (0, (int *)0, (int *)0);
+ }
+}
+
+/* Make the current tty use the state in shell_tty_info. */
+int
+set_tty_state ()
+{
+ int tty;
+
+ tty = input_tty ();
+ if (tty != -1)
+ {
+ if (got_tty_state == 0)
+ return 0;
+ ttsetattr (tty, &shell_tty_info);
+ }
+ return 0;
+}
+
+/* Give the terminal to PGRP. */
+give_terminal_to (pgrp, force)
+ pid_t pgrp;
+ int force;
+{
+}
+
+/* Stop a pipeline. */
+int
+stop_pipeline (async, ignore)
+ int async;
+ COMMAND *ignore;
+{
+ already_making_children = 0;
+ return 0;
+}
+
+void
+start_pipeline ()
+{
+ already_making_children = 1;
+}
+
+void
+stop_making_children ()
+{
+ already_making_children = 0;
+}
+
+int
+get_job_by_pid (pid, block)
+ pid_t pid;
+ int block;
+{
+ int i;
+
+ i = find_index_by_pid (pid);
+ return ((i == NO_PID) ? PROC_BAD : i);
+}
+
+/* Print descriptive information about the job with leader pid PID. */
+void
+describe_pid (pid)
+ pid_t pid;
+{
+ fprintf (stderr, "%ld\n", (long) pid);
+}
+
+void
+unfreeze_jobs_list ()
+{
+}
+
+int
+count_all_jobs ()
+{
+ return 0;
+}
diff --git a/parse.y b/parse.y
new file mode 100644
index 0000000..2b47ff8
--- /dev/null
+++ b/parse.y
@@ -0,0 +1,5916 @@
+/* parse.y - Yacc grammar for bash. */
+
+/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+%{
+#include "config.h"
+
+#include "bashtypes.h"
+#include "bashansi.h"
+
+#include "filecntl.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#if defined (HAVE_LOCALE_H)
+# include <locale.h>
+#endif
+
+#include <stdio.h>
+#include "chartypes.h"
+#include <signal.h>
+
+#include "memalloc.h"
+
+#include "bashintl.h"
+
+#define NEED_STRFTIME_DECL /* used in externs.h */
+
+#include "shell.h"
+#include "trap.h"
+#include "flags.h"
+#include "parser.h"
+#include "mailcheck.h"
+#include "test.h"
+#include "builtins.h"
+#include "builtins/common.h"
+#include "builtins/builtext.h"
+
+#include "shmbutil.h"
+
+#if defined (READLINE)
+# include "bashline.h"
+# include <readline/readline.h>
+#endif /* READLINE */
+
+#if defined (HISTORY)
+# include "bashhist.h"
+# include <readline/history.h>
+#endif /* HISTORY */
+
+#if defined (JOB_CONTROL)
+# include "jobs.h"
+#endif /* JOB_CONTROL */
+
+#if defined (ALIAS)
+# include "alias.h"
+#else
+typedef void *alias_t;
+#endif /* ALIAS */
+
+#if defined (PROMPT_STRING_DECODE)
+# ifndef _MINIX
+# include <sys/param.h>
+# endif
+# include <time.h>
+# if defined (TM_IN_SYS_TIME)
+# include <sys/types.h>
+# include <sys/time.h>
+# endif /* TM_IN_SYS_TIME */
+# include "maxpath.h"
+#endif /* PROMPT_STRING_DECODE */
+
+#define RE_READ_TOKEN -99
+#define NO_EXPANSION -100
+
+#ifdef DEBUG
+# define YYDEBUG 1
+#else
+# define YYDEBUG 0
+#endif
+
+#if defined (HANDLE_MULTIBYTE)
+# define last_shell_getc_is_singlebyte \
+ ((shell_input_line_index > 1) \
+ ? shell_input_line_property[shell_input_line_index - 1] \
+ : 1)
+# define MBTEST(x) ((x) && last_shell_getc_is_singlebyte)
+#else
+# define last_shell_getc_is_singlebyte 1
+# define MBTEST(x) ((x))
+#endif
+
+#if defined (EXTENDED_GLOB)
+extern int extended_glob;
+#endif
+
+extern int eof_encountered;
+extern int no_line_editing, running_under_emacs;
+extern int current_command_number;
+extern int sourcelevel, parse_and_execute_level;
+extern int posixly_correct;
+extern int last_command_exit_value;
+extern pid_t last_command_subst_pid;
+extern char *shell_name, *current_host_name;
+extern char *dist_version;
+extern int patch_level;
+extern int dump_translatable_strings, dump_po_strings;
+extern sh_builtin_func_t *last_shell_builtin, *this_shell_builtin;
+#if defined (BUFFERED_INPUT)
+extern int bash_input_fd_changed;
+#endif
+
+extern int errno;
+/* **************************************************************** */
+/* */
+/* "Forward" declarations */
+/* */
+/* **************************************************************** */
+
+#ifdef DEBUG
+static void debug_parser __P((int));
+#endif
+
+static int yy_getc __P((void));
+static int yy_ungetc __P((int));
+
+#if defined (READLINE)
+static int yy_readline_get __P((void));
+static int yy_readline_unget __P((int));
+#endif
+
+static int yy_string_get __P((void));
+static int yy_string_unget __P((int));
+static void rewind_input_string __P((void));
+static int yy_stream_get __P((void));
+static int yy_stream_unget __P((int));
+
+static int shell_getc __P((int));
+static void shell_ungetc __P((int));
+static void discard_until __P((int));
+
+#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
+static void push_string __P((char *, int, alias_t *));
+static void pop_string __P((void));
+static void free_string_list __P((void));
+#endif
+
+static char *read_a_line __P((int));
+
+static int reserved_word_acceptable __P((int));
+static int yylex __P((void));
+static int alias_expand_token __P((char *));
+static int time_command_acceptable __P((void));
+static int special_case_tokens __P((char *));
+static int read_token __P((int));
+static char *parse_matched_pair __P((int, int, int, int *, int));
+static char *parse_comsub __P((int, int, int, int *, int));
+#if defined (ARRAY_VARS)
+static char *parse_compound_assignment __P((int *));
+#endif
+#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND)
+static int parse_dparen __P((int));
+static int parse_arith_cmd __P((char **, int));
+#endif
+#if defined (COND_COMMAND)
+static void cond_error __P((void));
+static COND_COM *cond_expr __P((void));
+static COND_COM *cond_or __P((void));
+static COND_COM *cond_and __P((void));
+static COND_COM *cond_term __P((void));
+static int cond_skip_newlines __P((void));
+static COMMAND *parse_cond_command __P((void));
+#endif
+#if defined (ARRAY_VARS)
+static int token_is_assignment __P((char *, int));
+static int token_is_ident __P((char *, int));
+#endif
+static int read_token_word __P((int));
+static void discard_parser_constructs __P((int));
+
+static char *error_token_from_token __P((int));
+static char *error_token_from_text __P((void));
+static void print_offending_line __P((void));
+static void report_syntax_error __P((char *));
+
+static void handle_eof_input_unit __P((void));
+static void prompt_again __P((void));
+#if 0
+static void reset_readline_prompt __P((void));
+#endif
+static void print_prompt __P((void));
+
+#if defined (HANDLE_MULTIBYTE)
+static void set_line_mbstate __P((void));
+static char *shell_input_line_property = NULL;
+#else
+# define set_line_mbstate()
+#endif
+
+extern int yyerror __P((const char *));
+
+#ifdef DEBUG
+extern int yydebug;
+#endif
+
+/* Default prompt strings */
+char *primary_prompt = PPROMPT;
+char *secondary_prompt = SPROMPT;
+
+/* PROMPT_STRING_POINTER points to one of these, never to an actual string. */
+char *ps1_prompt, *ps2_prompt;
+
+/* Handle on the current prompt string. Indirectly points through
+ ps1_ or ps2_prompt. */
+char **prompt_string_pointer = (char **)NULL;
+char *current_prompt_string;
+
+/* Non-zero means we expand aliases in commands. */
+int expand_aliases = 0;
+
+/* If non-zero, the decoded prompt string undergoes parameter and
+ variable substitution, command substitution, arithmetic substitution,
+ string expansion, process substitution, and quote removal in
+ decode_prompt_string. */
+int promptvars = 1;
+
+/* If non-zero, $'...' and $"..." are expanded when they appear within
+ a ${...} expansion, even when the expansion appears within double
+ quotes. */
+int extended_quote = 1;
+
+/* The number of lines read from input while creating the current command. */
+int current_command_line_count;
+
+/* The token that currently denotes the end of parse. */
+int shell_eof_token;
+
+/* The token currently being read. */
+int current_token;
+
+/* The current parser state. */
+int parser_state;
+
+/* Variables to manage the task of reading here documents, because we need to
+ defer the reading until after a complete command has been collected. */
+static REDIRECT *redir_stack[10];
+int need_here_doc;
+
+/* Where shell input comes from. History expansion is performed on each
+ line when the shell is interactive. */
+static char *shell_input_line = (char *)NULL;
+static int shell_input_line_index;
+static int shell_input_line_size; /* Amount allocated for shell_input_line. */
+static int shell_input_line_len; /* strlen (shell_input_line) */
+
+/* Either zero or EOF. */
+static int shell_input_line_terminator;
+
+/* The line number in a script on which a function definition starts. */
+static int function_dstart;
+
+/* The line number in a script on which a function body starts. */
+static int function_bstart;
+
+/* The line number in a script at which an arithmetic for command starts. */
+static int arith_for_lineno;
+
+/* The decoded prompt string. Used if READLINE is not defined or if
+ editing is turned off. Analogous to current_readline_prompt. */
+static char *current_decoded_prompt;
+
+/* The last read token, or NULL. read_token () uses this for context
+ checking. */
+static int last_read_token;
+
+/* The token read prior to last_read_token. */
+static int token_before_that;
+
+/* The token read prior to token_before_that. */
+static int two_tokens_ago;
+
+static int global_extglob;
+
+/* The line number in a script where the word in a `case WORD', `select WORD'
+ or `for WORD' begins. This is a nested command maximum, since the array
+ index is decremented after a case, select, or for command is parsed. */
+#define MAX_CASE_NEST 128
+static int word_lineno[MAX_CASE_NEST];
+static int word_top = -1;
+
+/* If non-zero, it is the token that we want read_token to return
+ regardless of what text is (or isn't) present to be read. This
+ is reset by read_token. If token_to_read == WORD or
+ ASSIGNMENT_WORD, yylval.word should be set to word_desc_to_read. */
+static int token_to_read;
+static WORD_DESC *word_desc_to_read;
+
+static REDIRECTEE source;
+static REDIRECTEE redir;
+%}
+
+%union {
+ WORD_DESC *word; /* the word that we read. */
+ int number; /* the number that we read. */
+ WORD_LIST *word_list;
+ COMMAND *command;
+ REDIRECT *redirect;
+ ELEMENT element;
+ PATTERN_LIST *pattern;
+}
+
+/* Reserved words. Members of the first group are only recognized
+ in the case that they are preceded by a list_terminator. Members
+ of the second group are for [[...]] commands. Members of the
+ third group are recognized only under special circumstances. */
+%token IF THEN ELSE ELIF FI CASE ESAC FOR SELECT WHILE UNTIL DO DONE FUNCTION COPROC
+%token COND_START COND_END COND_ERROR
+%token IN BANG TIME TIMEOPT
+
+/* More general tokens. yylex () knows how to make these. */
+%token <word> WORD ASSIGNMENT_WORD REDIR_WORD
+%token <number> NUMBER
+%token <word_list> ARITH_CMD ARITH_FOR_EXPRS
+%token <command> COND_CMD
+%token AND_AND OR_OR GREATER_GREATER LESS_LESS LESS_AND LESS_LESS_LESS
+%token GREATER_AND SEMI_SEMI SEMI_AND SEMI_SEMI_AND
+%token LESS_LESS_MINUS AND_GREATER AND_GREATER_GREATER LESS_GREATER
+%token GREATER_BAR BAR_AND
+
+/* The types that the various syntactical units return. */
+
+%type <command> inputunit command pipeline pipeline_command
+%type <command> list list0 list1 compound_list simple_list simple_list1
+%type <command> simple_command shell_command
+%type <command> for_command select_command case_command group_command
+%type <command> arith_command
+%type <command> cond_command
+%type <command> arith_for_command
+%type <command> coproc
+%type <command> function_def function_body if_command elif_clause subshell
+%type <redirect> redirection redirection_list
+%type <element> simple_command_element
+%type <word_list> word_list pattern
+%type <pattern> pattern_list case_clause_sequence case_clause
+%type <number> timespec
+%type <number> list_terminator
+
+%start inputunit
+
+%left '&' ';' '\n' yacc_EOF
+%left AND_AND OR_OR
+%right '|' BAR_AND
+%%
+
+inputunit: simple_list simple_list_terminator
+ {
+ /* Case of regular command. Discard the error
+ safety net,and return the command just parsed. */
+ global_command = $1;
+ eof_encountered = 0;
+ /* discard_parser_constructs (0); */
+ if (parser_state & PST_CMDSUBST)
+ parser_state |= PST_EOFTOKEN;
+ YYACCEPT;
+ }
+ | '\n'
+ {
+ /* Case of regular command, but not a very
+ interesting one. Return a NULL command. */
+ global_command = (COMMAND *)NULL;
+ if (parser_state & PST_CMDSUBST)
+ parser_state |= PST_EOFTOKEN;
+ YYACCEPT;
+ }
+ | error '\n'
+ {
+ /* Error during parsing. Return NULL command. */
+ global_command = (COMMAND *)NULL;
+ eof_encountered = 0;
+ /* discard_parser_constructs (1); */
+ if (interactive && parse_and_execute_level == 0)
+ {
+ YYACCEPT;
+ }
+ else
+ {
+ YYABORT;
+ }
+ }
+ | yacc_EOF
+ {
+ /* Case of EOF seen by itself. Do ignoreeof or
+ not. */
+ global_command = (COMMAND *)NULL;
+ handle_eof_input_unit ();
+ YYACCEPT;
+ }
+ ;
+
+word_list: WORD
+ { $$ = make_word_list ($1, (WORD_LIST *)NULL); }
+ | word_list WORD
+ { $$ = make_word_list ($2, $1); }
+ ;
+
+redirection: '>' WORD
+ {
+ source.dest = 1;
+ redir.filename = $2;
+ $$ = make_redirection (source, r_output_direction, redir, 0);
+ }
+ | '<' WORD
+ {
+ source.dest = 0;
+ redir.filename = $2;
+ $$ = make_redirection (source, r_input_direction, redir, 0);
+ }
+ | NUMBER '>' WORD
+ {
+ source.dest = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_output_direction, redir, 0);
+ }
+ | NUMBER '<' WORD
+ {
+ source.dest = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_input_direction, redir, 0);
+ }
+ | REDIR_WORD '>' WORD
+ {
+ source.filename = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_output_direction, redir, REDIR_VARASSIGN);
+ }
+ | REDIR_WORD '<' WORD
+ {
+ source.filename = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_input_direction, redir, REDIR_VARASSIGN);
+ }
+ | GREATER_GREATER WORD
+ {
+ source.dest = 1;
+ redir.filename = $2;
+ $$ = make_redirection (source, r_appending_to, redir, 0);
+ }
+ | NUMBER GREATER_GREATER WORD
+ {
+ source.dest = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_appending_to, redir, 0);
+ }
+ | REDIR_WORD GREATER_GREATER WORD
+ {
+ source.filename = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_appending_to, redir, REDIR_VARASSIGN);
+ }
+ | GREATER_BAR WORD
+ {
+ source.dest = 1;
+ redir.filename = $2;
+ $$ = make_redirection (source, r_output_force, redir, 0);
+ }
+ | NUMBER GREATER_BAR WORD
+ {
+ source.dest = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_output_force, redir, 0);
+ }
+ | REDIR_WORD GREATER_BAR WORD
+ {
+ source.filename = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_output_force, redir, REDIR_VARASSIGN);
+ }
+ | LESS_GREATER WORD
+ {
+ source.dest = 0;
+ redir.filename = $2;
+ $$ = make_redirection (source, r_input_output, redir, 0);
+ }
+ | NUMBER LESS_GREATER WORD
+ {
+ source.dest = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_input_output, redir, 0);
+ }
+ | REDIR_WORD LESS_GREATER WORD
+ {
+ source.filename = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_input_output, redir, REDIR_VARASSIGN);
+ }
+ | LESS_LESS WORD
+ {
+ source.dest = 0;
+ redir.filename = $2;
+ $$ = make_redirection (source, r_reading_until, redir, 0);
+ redir_stack[need_here_doc++] = $$;
+ }
+ | NUMBER LESS_LESS WORD
+ {
+ source.dest = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_reading_until, redir, 0);
+ redir_stack[need_here_doc++] = $$;
+ }
+ | REDIR_WORD LESS_LESS WORD
+ {
+ source.filename = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
+ redir_stack[need_here_doc++] = $$;
+ }
+ | LESS_LESS_MINUS WORD
+ {
+ source.dest = 0;
+ redir.filename = $2;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, 0);
+ redir_stack[need_here_doc++] = $$;
+ }
+ | NUMBER LESS_LESS_MINUS WORD
+ {
+ source.dest = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, 0);
+ redir_stack[need_here_doc++] = $$;
+ }
+ | REDIR_WORD LESS_LESS_MINUS WORD
+ {
+ source.filename = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
+ redir_stack[need_here_doc++] = $$;
+ }
+ | LESS_LESS_LESS WORD
+ {
+ source.dest = 0;
+ redir.filename = $2;
+ $$ = make_redirection (source, r_reading_string, redir, 0);
+ }
+ | NUMBER LESS_LESS_LESS WORD
+ {
+ source.dest = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_reading_string, redir, 0);
+ }
+ | REDIR_WORD LESS_LESS_LESS WORD
+ {
+ source.filename = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_reading_string, redir, REDIR_VARASSIGN);
+ }
+ | LESS_AND NUMBER
+ {
+ source.dest = 0;
+ redir.dest = $2;
+ $$ = make_redirection (source, r_duplicating_input, redir, 0);
+ }
+ | NUMBER LESS_AND NUMBER
+ {
+ source.dest = $1;
+ redir.dest = $3;
+ $$ = make_redirection (source, r_duplicating_input, redir, 0);
+ }
+ | REDIR_WORD LESS_AND NUMBER
+ {
+ source.filename = $1;
+ redir.dest = $3;
+ $$ = make_redirection (source, r_duplicating_input, redir, REDIR_VARASSIGN);
+ }
+ | GREATER_AND NUMBER
+ {
+ source.dest = 1;
+ redir.dest = $2;
+ $$ = make_redirection (source, r_duplicating_output, redir, 0);
+ }
+ | NUMBER GREATER_AND NUMBER
+ {
+ source.dest = $1;
+ redir.dest = $3;
+ $$ = make_redirection (source, r_duplicating_output, redir, 0);
+ }
+ | REDIR_WORD GREATER_AND NUMBER
+ {
+ source.filename = $1;
+ redir.dest = $3;
+ $$ = make_redirection (source, r_duplicating_output, redir, REDIR_VARASSIGN);
+ }
+ | LESS_AND WORD
+ {
+ source.dest = 0;
+ redir.filename = $2;
+ $$ = make_redirection (source, r_duplicating_input_word, redir, 0);
+ }
+ | NUMBER LESS_AND WORD
+ {
+ source.dest = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_duplicating_input_word, redir, 0);
+ }
+ | REDIR_WORD LESS_AND WORD
+ {
+ source.filename = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_duplicating_input_word, redir, REDIR_VARASSIGN);
+ }
+ | GREATER_AND WORD
+ {
+ source.dest = 1;
+ redir.filename = $2;
+ $$ = make_redirection (source, r_duplicating_output_word, redir, 0);
+ }
+ | NUMBER GREATER_AND WORD
+ {
+ source.dest = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_duplicating_output_word, redir, 0);
+ }
+ | REDIR_WORD GREATER_AND WORD
+ {
+ source.filename = $1;
+ redir.filename = $3;
+ $$ = make_redirection (source, r_duplicating_output_word, redir, REDIR_VARASSIGN);
+ }
+ | GREATER_AND '-'
+ {
+ source.dest = 1;
+ redir.dest = 0;
+ $$ = make_redirection (source, r_close_this, redir, 0);
+ }
+ | NUMBER GREATER_AND '-'
+ {
+ source.dest = $1;
+ redir.dest = 0;
+ $$ = make_redirection (source, r_close_this, redir, 0);
+ }
+ | REDIR_WORD GREATER_AND '-'
+ {
+ source.filename = $1;
+ redir.dest = 0;
+ $$ = make_redirection (source, r_close_this, redir, REDIR_VARASSIGN);
+ }
+ | LESS_AND '-'
+ {
+ source.dest = 0;
+ redir.dest = 0;
+ $$ = make_redirection (source, r_close_this, redir, 0);
+ }
+ | NUMBER LESS_AND '-'
+ {
+ source.dest = $1;
+ redir.dest = 0;
+ $$ = make_redirection (source, r_close_this, redir, 0);
+ }
+ | REDIR_WORD LESS_AND '-'
+ {
+ source.filename = $1;
+ redir.dest = 0;
+ $$ = make_redirection (source, r_close_this, redir, REDIR_VARASSIGN);
+ }
+ | AND_GREATER WORD
+ {
+ source.dest = 1;
+ redir.filename = $2;
+ $$ = make_redirection (source, r_err_and_out, redir, 0);
+ }
+ | AND_GREATER_GREATER WORD
+ {
+ source.dest = 1;
+ redir.filename = $2;
+ $$ = make_redirection (source, r_append_err_and_out, redir, 0);
+ }
+ ;
+
+simple_command_element: WORD
+ { $$.word = $1; $$.redirect = 0; }
+ | ASSIGNMENT_WORD
+ { $$.word = $1; $$.redirect = 0; }
+ | redirection
+ { $$.redirect = $1; $$.word = 0; }
+ ;
+
+redirection_list: redirection
+ {
+ $$ = $1;
+ }
+ | redirection_list redirection
+ {
+ register REDIRECT *t;
+
+ for (t = $1; t->next; t = t->next)
+ ;
+ t->next = $2;
+ $$ = $1;
+ }
+ ;
+
+simple_command: simple_command_element
+ { $$ = make_simple_command ($1, (COMMAND *)NULL); }
+ | simple_command simple_command_element
+ { $$ = make_simple_command ($2, $1); }
+ ;
+
+command: simple_command
+ { $$ = clean_simple_command ($1); }
+ | shell_command
+ { $$ = $1; }
+ | shell_command redirection_list
+ {
+ COMMAND *tc;
+
+ tc = $1;
+ if (tc->redirects)
+ {
+ register REDIRECT *t;
+ for (t = tc->redirects; t->next; t = t->next)
+ ;
+ t->next = $2;
+ }
+ else
+ tc->redirects = $2;
+ $$ = $1;
+ }
+ | function_def
+ { $$ = $1; }
+ | coproc
+ { $$ = $1; }
+ ;
+
+shell_command: for_command
+ { $$ = $1; }
+ | case_command
+ { $$ = $1; }
+ | WHILE compound_list DO compound_list DONE
+ { $$ = make_while_command ($2, $4); }
+ | UNTIL compound_list DO compound_list DONE
+ { $$ = make_until_command ($2, $4); }
+ | select_command
+ { $$ = $1; }
+ | if_command
+ { $$ = $1; }
+ | subshell
+ { $$ = $1; }
+ | group_command
+ { $$ = $1; }
+ | arith_command
+ { $$ = $1; }
+ | cond_command
+ { $$ = $1; }
+ | arith_for_command
+ { $$ = $1; }
+ ;
+
+for_command: FOR WORD newline_list DO compound_list DONE
+ {
+ $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ | FOR WORD newline_list '{' compound_list '}'
+ {
+ $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ | FOR WORD ';' newline_list DO compound_list DONE
+ {
+ $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ | FOR WORD ';' newline_list '{' compound_list '}'
+ {
+ $$ = make_for_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ | FOR WORD newline_list IN word_list list_terminator newline_list DO compound_list DONE
+ {
+ $$ = make_for_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ | FOR WORD newline_list IN word_list list_terminator newline_list '{' compound_list '}'
+ {
+ $$ = make_for_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ | FOR WORD newline_list IN list_terminator newline_list DO compound_list DONE
+ {
+ $$ = make_for_command ($2, (WORD_LIST *)NULL, $8, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ | FOR WORD newline_list IN list_terminator newline_list '{' compound_list '}'
+ {
+ $$ = make_for_command ($2, (WORD_LIST *)NULL, $8, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ ;
+
+arith_for_command: FOR ARITH_FOR_EXPRS list_terminator newline_list DO compound_list DONE
+ {
+ $$ = make_arith_for_command ($2, $6, arith_for_lineno);
+ if (word_top > 0) word_top--;
+ }
+ | FOR ARITH_FOR_EXPRS list_terminator newline_list '{' compound_list '}'
+ {
+ $$ = make_arith_for_command ($2, $6, arith_for_lineno);
+ if (word_top > 0) word_top--;
+ }
+ | FOR ARITH_FOR_EXPRS DO compound_list DONE
+ {
+ $$ = make_arith_for_command ($2, $4, arith_for_lineno);
+ if (word_top > 0) word_top--;
+ }
+ | FOR ARITH_FOR_EXPRS '{' compound_list '}'
+ {
+ $$ = make_arith_for_command ($2, $4, arith_for_lineno);
+ if (word_top > 0) word_top--;
+ }
+ ;
+
+select_command: SELECT WORD newline_list DO list DONE
+ {
+ $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ | SELECT WORD newline_list '{' list '}'
+ {
+ $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $5, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ | SELECT WORD ';' newline_list DO list DONE
+ {
+ $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ | SELECT WORD ';' newline_list '{' list '}'
+ {
+ $$ = make_select_command ($2, add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), $6, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ | SELECT WORD newline_list IN word_list list_terminator newline_list DO list DONE
+ {
+ $$ = make_select_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ | SELECT WORD newline_list IN word_list list_terminator newline_list '{' list '}'
+ {
+ $$ = make_select_command ($2, REVERSE_LIST ($5, WORD_LIST *), $9, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ ;
+
+case_command: CASE WORD newline_list IN newline_list ESAC
+ {
+ $$ = make_case_command ($2, (PATTERN_LIST *)NULL, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ | CASE WORD newline_list IN case_clause_sequence newline_list ESAC
+ {
+ $$ = make_case_command ($2, $5, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ | CASE WORD newline_list IN case_clause ESAC
+ {
+ $$ = make_case_command ($2, $5, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ ;
+
+function_def: WORD '(' ')' newline_list function_body
+ { $$ = make_function_def ($1, $5, function_dstart, function_bstart); }
+
+ | FUNCTION WORD '(' ')' newline_list function_body
+ { $$ = make_function_def ($2, $6, function_dstart, function_bstart); }
+
+ | FUNCTION WORD newline_list function_body
+ { $$ = make_function_def ($2, $4, function_dstart, function_bstart); }
+ ;
+
+function_body: shell_command
+ { $$ = $1; }
+ | shell_command redirection_list
+ {
+ COMMAND *tc;
+
+ tc = $1;
+ /* According to Posix.2 3.9.5, redirections
+ specified after the body of a function should
+ be attached to the function and performed when
+ the function is executed, not as part of the
+ function definition command. */
+ /* XXX - I don't think it matters, but we might
+ want to change this in the future to avoid
+ problems differentiating between a function
+ definition with a redirection and a function
+ definition containing a single command with a
+ redirection. The two are semantically equivalent,
+ though -- the only difference is in how the
+ command printing code displays the redirections. */
+ if (tc->redirects)
+ {
+ register REDIRECT *t;
+ for (t = tc->redirects; t->next; t = t->next)
+ ;
+ t->next = $2;
+ }
+ else
+ tc->redirects = $2;
+ $$ = $1;
+ }
+ ;
+
+subshell: '(' compound_list ')'
+ {
+ $$ = make_subshell_command ($2);
+ $$->flags |= CMD_WANT_SUBSHELL;
+ }
+ ;
+
+coproc: COPROC shell_command
+ {
+ $$ = make_coproc_command ("COPROC", $2);
+ $$->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+ | COPROC shell_command redirection_list
+ {
+ COMMAND *tc;
+
+ tc = $2;
+ if (tc->redirects)
+ {
+ register REDIRECT *t;
+ for (t = tc->redirects; t->next; t = t->next)
+ ;
+ t->next = $3;
+ }
+ else
+ tc->redirects = $3;
+ $$ = make_coproc_command ("COPROC", $2);
+ $$->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+ | COPROC WORD shell_command
+ {
+ $$ = make_coproc_command ($2->word, $3);
+ $$->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+ | COPROC WORD shell_command redirection_list
+ {
+ COMMAND *tc;
+
+ tc = $3;
+ if (tc->redirects)
+ {
+ register REDIRECT *t;
+ for (t = tc->redirects; t->next; t = t->next)
+ ;
+ t->next = $4;
+ }
+ else
+ tc->redirects = $4;
+ $$ = make_coproc_command ($2->word, $3);
+ $$->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+ | COPROC simple_command
+ {
+ $$ = make_coproc_command ("COPROC", clean_simple_command ($2));
+ $$->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+ ;
+
+if_command: IF compound_list THEN compound_list FI
+ { $$ = make_if_command ($2, $4, (COMMAND *)NULL); }
+ | IF compound_list THEN compound_list ELSE compound_list FI
+ { $$ = make_if_command ($2, $4, $6); }
+ | IF compound_list THEN compound_list elif_clause FI
+ { $$ = make_if_command ($2, $4, $5); }
+ ;
+
+
+group_command: '{' compound_list '}'
+ { $$ = make_group_command ($2); }
+ ;
+
+arith_command: ARITH_CMD
+ { $$ = make_arith_command ($1); }
+ ;
+
+cond_command: COND_START COND_CMD COND_END
+ { $$ = $2; }
+ ;
+
+elif_clause: ELIF compound_list THEN compound_list
+ { $$ = make_if_command ($2, $4, (COMMAND *)NULL); }
+ | ELIF compound_list THEN compound_list ELSE compound_list
+ { $$ = make_if_command ($2, $4, $6); }
+ | ELIF compound_list THEN compound_list elif_clause
+ { $$ = make_if_command ($2, $4, $5); }
+ ;
+
+case_clause: pattern_list
+ | case_clause_sequence pattern_list
+ { $2->next = $1; $$ = $2; }
+ ;
+
+pattern_list: newline_list pattern ')' compound_list
+ { $$ = make_pattern_list ($2, $4); }
+ | newline_list pattern ')' newline_list
+ { $$ = make_pattern_list ($2, (COMMAND *)NULL); }
+ | newline_list '(' pattern ')' compound_list
+ { $$ = make_pattern_list ($3, $5); }
+ | newline_list '(' pattern ')' newline_list
+ { $$ = make_pattern_list ($3, (COMMAND *)NULL); }
+ ;
+
+case_clause_sequence: pattern_list SEMI_SEMI
+ { $$ = $1; }
+ | case_clause_sequence pattern_list SEMI_SEMI
+ { $2->next = $1; $$ = $2; }
+ | pattern_list SEMI_AND
+ { $1->flags |= CASEPAT_FALLTHROUGH; $$ = $1; }
+ | case_clause_sequence pattern_list SEMI_AND
+ { $2->flags |= CASEPAT_FALLTHROUGH; $2->next = $1; $$ = $2; }
+ | pattern_list SEMI_SEMI_AND
+ { $1->flags |= CASEPAT_TESTNEXT; $$ = $1; }
+ | case_clause_sequence pattern_list SEMI_SEMI_AND
+ { $2->flags |= CASEPAT_TESTNEXT; $2->next = $1; $$ = $2; }
+ ;
+
+pattern: WORD
+ { $$ = make_word_list ($1, (WORD_LIST *)NULL); }
+ | pattern '|' WORD
+ { $$ = make_word_list ($3, $1); }
+ ;
+
+/* A list allows leading or trailing newlines and
+ newlines as operators (equivalent to semicolons).
+ It must end with a newline or semicolon.
+ Lists are used within commands such as if, for, while. */
+
+list: newline_list list0
+ {
+ $$ = $2;
+ if (need_here_doc)
+ gather_here_documents ();
+ }
+ ;
+
+compound_list: list
+ | newline_list list1
+ {
+ $$ = $2;
+ }
+ ;
+
+list0: list1 '\n' newline_list
+ | list1 '&' newline_list
+ {
+ if ($1->type == cm_connection)
+ $$ = connect_async_list ($1, (COMMAND *)NULL, '&');
+ else
+ $$ = command_connect ($1, (COMMAND *)NULL, '&');
+ }
+ | list1 ';' newline_list
+
+ ;
+
+list1: list1 AND_AND newline_list list1
+ { $$ = command_connect ($1, $4, AND_AND); }
+ | list1 OR_OR newline_list list1
+ { $$ = command_connect ($1, $4, OR_OR); }
+ | list1 '&' newline_list list1
+ {
+ if ($1->type == cm_connection)
+ $$ = connect_async_list ($1, $4, '&');
+ else
+ $$ = command_connect ($1, $4, '&');
+ }
+ | list1 ';' newline_list list1
+ { $$ = command_connect ($1, $4, ';'); }
+ | list1 '\n' newline_list list1
+ { $$ = command_connect ($1, $4, ';'); }
+ | pipeline_command
+ { $$ = $1; }
+ ;
+
+simple_list_terminator: '\n'
+ | yacc_EOF
+ ;
+
+list_terminator:'\n'
+ { $$ = '\n'; }
+ | ';'
+ { $$ = ';'; }
+ | yacc_EOF
+ { $$ = yacc_EOF; }
+ ;
+
+newline_list:
+ | newline_list '\n'
+ ;
+
+/* A simple_list is a list that contains no significant newlines
+ and no leading or trailing newlines. Newlines are allowed
+ only following operators, where they are not significant.
+
+ This is what an inputunit consists of. */
+
+simple_list: simple_list1
+ {
+ $$ = $1;
+ if (need_here_doc)
+ gather_here_documents ();
+ if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token)
+ {
+ global_command = $1;
+ eof_encountered = 0;
+ rewind_input_string ();
+ YYACCEPT;
+ }
+ }
+ | simple_list1 '&'
+ {
+ if ($1->type == cm_connection)
+ $$ = connect_async_list ($1, (COMMAND *)NULL, '&');
+ else
+ $$ = command_connect ($1, (COMMAND *)NULL, '&');
+ if (need_here_doc)
+ gather_here_documents ();
+ if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token)
+ {
+ global_command = $1;
+ eof_encountered = 0;
+ rewind_input_string ();
+ YYACCEPT;
+ }
+ }
+ | simple_list1 ';'
+ {
+ $$ = $1;
+ if (need_here_doc)
+ gather_here_documents ();
+ if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token)
+ {
+ global_command = $1;
+ eof_encountered = 0;
+ rewind_input_string ();
+ YYACCEPT;
+ }
+ }
+ ;
+
+simple_list1: simple_list1 AND_AND newline_list simple_list1
+ { $$ = command_connect ($1, $4, AND_AND); }
+ | simple_list1 OR_OR newline_list simple_list1
+ { $$ = command_connect ($1, $4, OR_OR); }
+ | simple_list1 '&' simple_list1
+ {
+ if ($1->type == cm_connection)
+ $$ = connect_async_list ($1, $3, '&');
+ else
+ $$ = command_connect ($1, $3, '&');
+ }
+ | simple_list1 ';' simple_list1
+ { $$ = command_connect ($1, $3, ';'); }
+
+ | pipeline_command
+ { $$ = $1; }
+ ;
+
+pipeline_command: pipeline
+ { $$ = $1; }
+ | BANG pipeline
+ {
+ if ($2)
+ $2->flags |= CMD_INVERT_RETURN;
+ $$ = $2;
+ }
+ | timespec pipeline
+ {
+ if ($2)
+ $2->flags |= $1;
+ $$ = $2;
+ }
+ | timespec BANG pipeline
+ {
+ if ($3)
+ $3->flags |= $1|CMD_INVERT_RETURN;
+ $$ = $3;
+ }
+ | BANG timespec pipeline
+ {
+ if ($3)
+ $3->flags |= $2|CMD_INVERT_RETURN;
+ $$ = $3;
+ }
+ | timespec list_terminator
+ {
+ ELEMENT x;
+
+ /* Boy, this is unclean. `time' by itself can
+ time a null command. We cheat and push a
+ newline back if the list_terminator was a newline
+ to avoid the double-newline problem (one to
+ terminate this, one to terminate the command) */
+ x.word = 0;
+ x.redirect = 0;
+ $$ = make_simple_command (x, (COMMAND *)NULL);
+ $$->flags |= $1;
+ /* XXX - let's cheat and push a newline back */
+ if ($2 == '\n')
+ token_to_read = '\n';
+ }
+
+ ;
+
+pipeline: pipeline '|' newline_list pipeline
+ { $$ = command_connect ($1, $4, '|'); }
+ | pipeline BAR_AND newline_list pipeline
+ {
+ /* Make cmd1 |& cmd2 equivalent to cmd1 2>&1 | cmd2 */
+ COMMAND *tc;
+ REDIRECTEE rd, sd;
+ REDIRECT *r;
+
+ tc = $1->type == cm_simple ? (COMMAND *)$1->value.Simple : $1;
+ sd.dest = 2;
+ rd.dest = 1;
+ r = make_redirection (sd, r_duplicating_output, rd, 0);
+ if (tc->redirects)
+ {
+ register REDIRECT *t;
+ for (t = tc->redirects; t->next; t = t->next)
+ ;
+ t->next = r;
+ }
+ else
+ tc->redirects = r;
+
+ $$ = command_connect ($1, $4, '|');
+ }
+ | command
+ { $$ = $1; }
+ ;
+
+timespec: TIME
+ { $$ = CMD_TIME_PIPELINE; }
+ | TIME TIMEOPT
+ { $$ = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
+ ;
+%%
+
+/* Initial size to allocate for tokens, and the
+ amount to grow them by. */
+#define TOKEN_DEFAULT_INITIAL_SIZE 496
+#define TOKEN_DEFAULT_GROW_SIZE 512
+
+/* Should we call prompt_again? */
+#define SHOULD_PROMPT() \
+ (interactive && (bash_input.type == st_stdin || bash_input.type == st_stream))
+
+#if defined (ALIAS)
+# define expanding_alias() (pushed_string_list && pushed_string_list->expander)
+#else
+# define expanding_alias() 0
+#endif
+
+/* Global var is non-zero when end of file has been reached. */
+int EOF_Reached = 0;
+
+#ifdef DEBUG
+static void
+debug_parser (i)
+ int i;
+{
+#if YYDEBUG != 0
+ yydebug = i;
+#endif
+}
+#endif
+
+/* yy_getc () returns the next available character from input or EOF.
+ yy_ungetc (c) makes `c' the next character to read.
+ init_yy_io (get, unget, type, location) makes the function GET the
+ installed function for getting the next character, makes UNGET the
+ installed function for un-getting a character, sets the type of stream
+ (either string or file) from TYPE, and makes LOCATION point to where
+ the input is coming from. */
+
+/* Unconditionally returns end-of-file. */
+int
+return_EOF ()
+{
+ return (EOF);
+}
+
+/* Variable containing the current get and unget functions.
+ See ./input.h for a clearer description. */
+BASH_INPUT bash_input;
+
+/* Set all of the fields in BASH_INPUT to NULL. Free bash_input.name if it
+ is non-null, avoiding a memory leak. */
+void
+initialize_bash_input ()
+{
+ bash_input.type = st_none;
+ FREE (bash_input.name);
+ bash_input.name = (char *)NULL;
+ bash_input.location.file = (FILE *)NULL;
+ bash_input.location.string = (char *)NULL;
+ bash_input.getter = (sh_cget_func_t *)NULL;
+ bash_input.ungetter = (sh_cunget_func_t *)NULL;
+}
+
+/* Set the contents of the current bash input stream from
+ GET, UNGET, TYPE, NAME, and LOCATION. */
+void
+init_yy_io (get, unget, type, name, location)
+ sh_cget_func_t *get;
+ sh_cunget_func_t *unget;
+ enum stream_type type;
+ const char *name;
+ INPUT_STREAM location;
+{
+ bash_input.type = type;
+ FREE (bash_input.name);
+ bash_input.name = name ? savestring (name) : (char *)NULL;
+
+ /* XXX */
+#if defined (CRAY)
+ memcpy((char *)&bash_input.location.string, (char *)&location.string, sizeof(location));
+#else
+ bash_input.location = location;
+#endif
+ bash_input.getter = get;
+ bash_input.ungetter = unget;
+}
+
+char *
+yy_input_name ()
+{
+ return (bash_input.name ? bash_input.name : "stdin");
+}
+
+/* Call this to get the next character of input. */
+static int
+yy_getc ()
+{
+ return (*(bash_input.getter)) ();
+}
+
+/* Call this to unget C. That is, to make C the next character
+ to be read. */
+static int
+yy_ungetc (c)
+ int c;
+{
+ return (*(bash_input.ungetter)) (c);
+}
+
+#if defined (BUFFERED_INPUT)
+#ifdef INCLUDE_UNUSED
+int
+input_file_descriptor ()
+{
+ switch (bash_input.type)
+ {
+ case st_stream:
+ return (fileno (bash_input.location.file));
+ case st_bstream:
+ return (bash_input.location.buffered_fd);
+ case st_stdin:
+ default:
+ return (fileno (stdin));
+ }
+}
+#endif
+#endif /* BUFFERED_INPUT */
+
+/* **************************************************************** */
+/* */
+/* Let input be read from readline (). */
+/* */
+/* **************************************************************** */
+
+#if defined (READLINE)
+char *current_readline_prompt = (char *)NULL;
+char *current_readline_line = (char *)NULL;
+int current_readline_line_index = 0;
+
+static int
+yy_readline_get ()
+{
+ SigHandler *old_sigint;
+ int line_len;
+ unsigned char c;
+
+ if (!current_readline_line)
+ {
+ if (!bash_readline_initialized)
+ initialize_readline ();
+
+#if defined (JOB_CONTROL)
+ if (job_control)
+ give_terminal_to (shell_pgrp, 0);
+#endif /* JOB_CONTROL */
+
+ old_sigint = (SigHandler *)NULL;
+ if (signal_is_ignored (SIGINT) == 0)
+ {
+ old_sigint = (SigHandler *)set_signal_handler (SIGINT, sigint_sighandler);
+ interrupt_immediately++;
+ }
+ terminate_immediately = 1;
+
+ current_readline_line = readline (current_readline_prompt ?
+ current_readline_prompt : "");
+
+ terminate_immediately = 0;
+ if (signal_is_ignored (SIGINT) == 0 && old_sigint)
+ {
+ interrupt_immediately--;
+ set_signal_handler (SIGINT, old_sigint);
+ }
+
+#if 0
+ /* Reset the prompt to the decoded value of prompt_string_pointer. */
+ reset_readline_prompt ();
+#endif
+
+ if (current_readline_line == 0)
+ return (EOF);
+
+ current_readline_line_index = 0;
+ line_len = strlen (current_readline_line);
+
+ current_readline_line = (char *)xrealloc (current_readline_line, 2 + line_len);
+ current_readline_line[line_len++] = '\n';
+ current_readline_line[line_len] = '\0';
+ }
+
+ if (current_readline_line[current_readline_line_index] == 0)
+ {
+ free (current_readline_line);
+ current_readline_line = (char *)NULL;
+ return (yy_readline_get ());
+ }
+ else
+ {
+ c = current_readline_line[current_readline_line_index++];
+ return (c);
+ }
+}
+
+static int
+yy_readline_unget (c)
+ int c;
+{
+ if (current_readline_line_index && current_readline_line)
+ current_readline_line[--current_readline_line_index] = c;
+ return (c);
+}
+
+void
+with_input_from_stdin ()
+{
+ INPUT_STREAM location;
+
+ if (bash_input.type != st_stdin && stream_on_stack (st_stdin) == 0)
+ {
+ location.string = current_readline_line;
+ init_yy_io (yy_readline_get, yy_readline_unget,
+ st_stdin, "readline stdin", location);
+ }
+}
+
+#else /* !READLINE */
+
+void
+with_input_from_stdin ()
+{
+ with_input_from_stream (stdin, "stdin");
+}
+#endif /* !READLINE */
+
+/* **************************************************************** */
+/* */
+/* Let input come from STRING. STRING is zero terminated. */
+/* */
+/* **************************************************************** */
+
+static int
+yy_string_get ()
+{
+ register char *string;
+ register unsigned char c;
+
+ string = bash_input.location.string;
+
+ /* If the string doesn't exist, or is empty, EOF found. */
+ if (string && *string)
+ {
+ c = *string++;
+ bash_input.location.string = string;
+ return (c);
+ }
+ else
+ return (EOF);
+}
+
+static int
+yy_string_unget (c)
+ int c;
+{
+ *(--bash_input.location.string) = c;
+ return (c);
+}
+
+void
+with_input_from_string (string, name)
+ char *string;
+ const char *name;
+{
+ INPUT_STREAM location;
+
+ location.string = string;
+ init_yy_io (yy_string_get, yy_string_unget, st_string, name, location);
+}
+
+/* Count the number of characters we've consumed from bash_input.location.string
+ and read into shell_input_line, but have not returned from shell_getc.
+ That is the true input location. Rewind bash_input.location.string by
+ that number of characters, so it points to the last character actually
+ consumed by the parser. */
+static void
+rewind_input_string ()
+{
+ int xchars;
+
+ /* number of unconsumed characters in the input -- XXX need to take newlines
+ into account, e.g., $(...\n) */
+ xchars = shell_input_line_len - shell_input_line_index;
+ if (bash_input.location.string[-1] == '\n')
+ xchars++;
+
+ /* XXX - how to reflect bash_input.location.string back to string passed to
+ parse_and_execute or xparse_dolparen? xparse_dolparen needs to know how
+ far into the string we parsed. parse_and_execute knows where bash_input.
+ location.string is, and how far from orig_string that is -- that's the
+ number of characters the command consumed. */
+
+ /* bash_input.location.string - xchars should be where we parsed to */
+ /* need to do more validation on xchars value for sanity -- test cases. */
+ bash_input.location.string -= xchars;
+}
+
+/* **************************************************************** */
+/* */
+/* Let input come from STREAM. */
+/* */
+/* **************************************************************** */
+
+/* These two functions used to test the value of the HAVE_RESTARTABLE_SYSCALLS
+ define, and just use getc/ungetc if it was defined, but since bash
+ installs its signal handlers without the SA_RESTART flag, some signals
+ (like SIGCHLD, SIGWINCH, etc.) received during a read(2) will not cause
+ the read to be restarted. We need to restart it ourselves. */
+
+static int
+yy_stream_get ()
+{
+ int result;
+
+ result = EOF;
+ if (bash_input.location.file)
+ {
+ if (interactive)
+ {
+ interrupt_immediately++;
+ terminate_immediately++;
+ }
+ result = getc_with_restart (bash_input.location.file);
+ if (interactive)
+ {
+ interrupt_immediately--;
+ terminate_immediately--;
+ }
+ }
+ return (result);
+}
+
+static int
+yy_stream_unget (c)
+ int c;
+{
+ return (ungetc_with_restart (c, bash_input.location.file));
+}
+
+void
+with_input_from_stream (stream, name)
+ FILE *stream;
+ const char *name;
+{
+ INPUT_STREAM location;
+
+ location.file = stream;
+ init_yy_io (yy_stream_get, yy_stream_unget, st_stream, name, location);
+}
+
+typedef struct stream_saver {
+ struct stream_saver *next;
+ BASH_INPUT bash_input;
+ int line;
+#if defined (BUFFERED_INPUT)
+ BUFFERED_STREAM *bstream;
+#endif /* BUFFERED_INPUT */
+} STREAM_SAVER;
+
+/* The globally known line number. */
+int line_number = 0;
+
+#if defined (COND_COMMAND)
+static int cond_lineno;
+static int cond_token;
+#endif
+
+STREAM_SAVER *stream_list = (STREAM_SAVER *)NULL;
+
+void
+push_stream (reset_lineno)
+ int reset_lineno;
+{
+ STREAM_SAVER *saver = (STREAM_SAVER *)xmalloc (sizeof (STREAM_SAVER));
+
+ xbcopy ((char *)&bash_input, (char *)&(saver->bash_input), sizeof (BASH_INPUT));
+
+#if defined (BUFFERED_INPUT)
+ saver->bstream = (BUFFERED_STREAM *)NULL;
+ /* If we have a buffered stream, clear out buffers[fd]. */
+ if (bash_input.type == st_bstream && bash_input.location.buffered_fd >= 0)
+ saver->bstream = set_buffered_stream (bash_input.location.buffered_fd,
+ (BUFFERED_STREAM *)NULL);
+#endif /* BUFFERED_INPUT */
+
+ saver->line = line_number;
+ bash_input.name = (char *)NULL;
+ saver->next = stream_list;
+ stream_list = saver;
+ EOF_Reached = 0;
+ if (reset_lineno)
+ line_number = 0;
+}
+
+void
+pop_stream ()
+{
+ if (!stream_list)
+ EOF_Reached = 1;
+ else
+ {
+ STREAM_SAVER *saver = stream_list;
+
+ EOF_Reached = 0;
+ stream_list = stream_list->next;
+
+ init_yy_io (saver->bash_input.getter,
+ saver->bash_input.ungetter,
+ saver->bash_input.type,
+ saver->bash_input.name,
+ saver->bash_input.location);
+
+#if defined (BUFFERED_INPUT)
+ /* If we have a buffered stream, restore buffers[fd]. */
+ /* If the input file descriptor was changed while this was on the
+ save stack, update the buffered fd to the new file descriptor and
+ re-establish the buffer <-> bash_input fd correspondence. */
+ if (bash_input.type == st_bstream && bash_input.location.buffered_fd >= 0)
+ {
+ if (bash_input_fd_changed)
+ {
+ bash_input_fd_changed = 0;
+ if (default_buffered_input >= 0)
+ {
+ bash_input.location.buffered_fd = default_buffered_input;
+ saver->bstream->b_fd = default_buffered_input;
+ SET_CLOSE_ON_EXEC (default_buffered_input);
+ }
+ }
+ /* XXX could free buffered stream returned as result here. */
+ set_buffered_stream (bash_input.location.buffered_fd, saver->bstream);
+ }
+#endif /* BUFFERED_INPUT */
+
+ line_number = saver->line;
+
+ FREE (saver->bash_input.name);
+ free (saver);
+ }
+}
+
+/* Return 1 if a stream of type TYPE is saved on the stack. */
+int
+stream_on_stack (type)
+ enum stream_type type;
+{
+ register STREAM_SAVER *s;
+
+ for (s = stream_list; s; s = s->next)
+ if (s->bash_input.type == type)
+ return 1;
+ return 0;
+}
+
+/* Save the current token state and return it in a malloced array. */
+int *
+save_token_state ()
+{
+ int *ret;
+
+ ret = (int *)xmalloc (4 * sizeof (int));
+ ret[0] = last_read_token;
+ ret[1] = token_before_that;
+ ret[2] = two_tokens_ago;
+ ret[3] = current_token;
+ return ret;
+}
+
+void
+restore_token_state (ts)
+ int *ts;
+{
+ if (ts == 0)
+ return;
+ last_read_token = ts[0];
+ token_before_that = ts[1];
+ two_tokens_ago = ts[2];
+ current_token = ts[3];
+}
+
+/*
+ * This is used to inhibit alias expansion and reserved word recognition
+ * inside case statement pattern lists. A `case statement pattern list' is:
+ *
+ * everything between the `in' in a `case word in' and the next ')'
+ * or `esac'
+ * everything between a `;;' and the next `)' or `esac'
+ */
+
+#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
+
+#define END_OF_ALIAS 0
+
+/*
+ * Pseudo-global variables used in implementing token-wise alias expansion.
+ */
+
+/*
+ * Pushing and popping strings. This works together with shell_getc to
+ * implement alias expansion on a per-token basis.
+ */
+
+typedef struct string_saver {
+ struct string_saver *next;
+ int expand_alias; /* Value to set expand_alias to when string is popped. */
+ char *saved_line;
+#if defined (ALIAS)
+ alias_t *expander; /* alias that caused this line to be pushed. */
+#endif
+ int saved_line_size, saved_line_index, saved_line_terminator;
+} STRING_SAVER;
+
+STRING_SAVER *pushed_string_list = (STRING_SAVER *)NULL;
+
+/*
+ * Push the current shell_input_line onto a stack of such lines and make S
+ * the current input. Used when expanding aliases. EXPAND is used to set
+ * the value of expand_next_token when the string is popped, so that the
+ * word after the alias in the original line is handled correctly when the
+ * alias expands to multiple words. TOKEN is the token that was expanded
+ * into S; it is saved and used to prevent infinite recursive expansion.
+ */
+static void
+push_string (s, expand, ap)
+ char *s;
+ int expand;
+ alias_t *ap;
+{
+ STRING_SAVER *temp = (STRING_SAVER *)xmalloc (sizeof (STRING_SAVER));
+
+ temp->expand_alias = expand;
+ temp->saved_line = shell_input_line;
+ temp->saved_line_size = shell_input_line_size;
+ temp->saved_line_index = shell_input_line_index;
+ temp->saved_line_terminator = shell_input_line_terminator;
+#if defined (ALIAS)
+ temp->expander = ap;
+#endif
+ temp->next = pushed_string_list;
+ pushed_string_list = temp;
+
+#if defined (ALIAS)
+ if (ap)
+ ap->flags |= AL_BEINGEXPANDED;
+#endif
+
+ shell_input_line = s;
+ shell_input_line_size = strlen (s);
+ shell_input_line_index = 0;
+ shell_input_line_terminator = '\0';
+#if 0
+ parser_state &= ~PST_ALEXPNEXT; /* XXX */
+#endif
+
+ set_line_mbstate ();
+}
+
+/*
+ * Make the top of the pushed_string stack be the current shell input.
+ * Only called when there is something on the stack. Called from shell_getc
+ * when it thinks it has consumed the string generated by an alias expansion
+ * and needs to return to the original input line.
+ */
+static void
+pop_string ()
+{
+ STRING_SAVER *t;
+
+ FREE (shell_input_line);
+ shell_input_line = pushed_string_list->saved_line;
+ shell_input_line_index = pushed_string_list->saved_line_index;
+ shell_input_line_size = pushed_string_list->saved_line_size;
+ shell_input_line_terminator = pushed_string_list->saved_line_terminator;
+
+ if (pushed_string_list->expand_alias)
+ parser_state |= PST_ALEXPNEXT;
+ else
+ parser_state &= ~PST_ALEXPNEXT;
+
+ t = pushed_string_list;
+ pushed_string_list = pushed_string_list->next;
+
+#if defined (ALIAS)
+ if (t->expander)
+ t->expander->flags &= ~AL_BEINGEXPANDED;
+#endif
+
+ free ((char *)t);
+
+ set_line_mbstate ();
+}
+
+static void
+free_string_list ()
+{
+ register STRING_SAVER *t, *t1;
+
+ for (t = pushed_string_list; t; )
+ {
+ t1 = t->next;
+ FREE (t->saved_line);
+#if defined (ALIAS)
+ if (t->expander)
+ t->expander->flags &= ~AL_BEINGEXPANDED;
+#endif
+ free ((char *)t);
+ t = t1;
+ }
+ pushed_string_list = (STRING_SAVER *)NULL;
+}
+
+#endif /* ALIAS || DPAREN_ARITHMETIC */
+
+void
+free_pushed_string_input ()
+{
+#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
+ free_string_list ();
+#endif
+}
+
+/* Return a line of text, taken from wherever yylex () reads input.
+ If there is no more input, then we return NULL. If REMOVE_QUOTED_NEWLINE
+ is non-zero, we remove unquoted \<newline> pairs. This is used by
+ read_secondary_line to read here documents. */
+static char *
+read_a_line (remove_quoted_newline)
+ int remove_quoted_newline;
+{
+ static char *line_buffer = (char *)NULL;
+ static int buffer_size = 0;
+ int indx, c, peekc, pass_next;
+
+#if defined (READLINE)
+ if (no_line_editing && SHOULD_PROMPT ())
+#else
+ if (SHOULD_PROMPT ())
+#endif
+ print_prompt ();
+
+ pass_next = indx = 0;
+ while (1)
+ {
+ /* Allow immediate exit if interrupted during input. */
+ QUIT;
+
+ c = yy_getc ();
+
+ /* Ignore null bytes in input. */
+ if (c == 0)
+ {
+#if 0
+ internal_warning ("read_a_line: ignored null byte in input");
+#endif
+ continue;
+ }
+
+ /* If there is no more input, then we return NULL. */
+ if (c == EOF)
+ {
+ if (interactive && bash_input.type == st_stream)
+ clearerr (stdin);
+ if (indx == 0)
+ return ((char *)NULL);
+ c = '\n';
+ }
+
+ /* `+2' in case the final character in the buffer is a newline. */
+ RESIZE_MALLOCED_BUFFER (line_buffer, indx, 2, buffer_size, 128);
+
+ /* IF REMOVE_QUOTED_NEWLINES is non-zero, we are reading a
+ here document with an unquoted delimiter. In this case,
+ the line will be expanded as if it were in double quotes.
+ We allow a backslash to escape the next character, but we
+ need to treat the backslash specially only if a backslash
+ quoting a backslash-newline pair appears in the line. */
+ if (pass_next)
+ {
+ line_buffer[indx++] = c;
+ pass_next = 0;
+ }
+ else if (c == '\\' && remove_quoted_newline)
+ {
+ peekc = yy_getc ();
+ if (peekc == '\n')
+ {
+ line_number++;
+ continue; /* Make the unquoted \<newline> pair disappear. */
+ }
+ else
+ {
+ yy_ungetc (peekc);
+ pass_next = 1;
+ line_buffer[indx++] = c; /* Preserve the backslash. */
+ }
+ }
+ else
+ line_buffer[indx++] = c;
+
+ if (c == '\n')
+ {
+ line_buffer[indx] = '\0';
+ return (line_buffer);
+ }
+ }
+}
+
+/* Return a line as in read_a_line (), but insure that the prompt is
+ the secondary prompt. This is used to read the lines of a here
+ document. REMOVE_QUOTED_NEWLINE is non-zero if we should remove
+ newlines quoted with backslashes while reading the line. It is
+ non-zero unless the delimiter of the here document was quoted. */
+char *
+read_secondary_line (remove_quoted_newline)
+ int remove_quoted_newline;
+{
+ char *ret;
+ int n, c;
+
+ prompt_string_pointer = &ps2_prompt;
+ if (SHOULD_PROMPT())
+ prompt_again ();
+ ret = read_a_line (remove_quoted_newline);
+#if defined (HISTORY)
+ if (ret && remember_on_history && (parser_state & PST_HEREDOC))
+ {
+ /* To make adding the the here-document body right, we need to rely
+ on history_delimiting_chars() returning \n for the first line of
+ the here-document body and the null string for the second and
+ subsequent lines, so we avoid double newlines.
+ current_command_line_count == 2 for the first line of the body. */
+
+ current_command_line_count++;
+ maybe_add_history (ret);
+ }
+#endif /* HISTORY */
+ return ret;
+}
+
+/* **************************************************************** */
+/* */
+/* YYLEX () */
+/* */
+/* **************************************************************** */
+
+/* Reserved words. These are only recognized as the first word of a
+ command. */
+STRING_INT_ALIST word_token_alist[] = {
+ { "if", IF },
+ { "then", THEN },
+ { "else", ELSE },
+ { "elif", ELIF },
+ { "fi", FI },
+ { "case", CASE },
+ { "esac", ESAC },
+ { "for", FOR },
+#if defined (SELECT_COMMAND)
+ { "select", SELECT },
+#endif
+ { "while", WHILE },
+ { "until", UNTIL },
+ { "do", DO },
+ { "done", DONE },
+ { "in", IN },
+ { "function", FUNCTION },
+#if defined (COMMAND_TIMING)
+ { "time", TIME },
+#endif
+ { "{", '{' },
+ { "}", '}' },
+ { "!", BANG },
+#if defined (COND_COMMAND)
+ { "[[", COND_START },
+ { "]]", COND_END },
+#endif
+#if defined (COPROCESS_SUPPORT)
+ { "coproc", COPROC },
+#endif
+ { (char *)NULL, 0}
+};
+
+/* other tokens that can be returned by read_token() */
+STRING_INT_ALIST other_token_alist[] = {
+ /* Multiple-character tokens with special values */
+ { "-p", TIMEOPT },
+ { "&&", AND_AND },
+ { "||", OR_OR },
+ { ">>", GREATER_GREATER },
+ { "<<", LESS_LESS },
+ { "<&", LESS_AND },
+ { ">&", GREATER_AND },
+ { ";;", SEMI_SEMI },
+ { ";&", SEMI_AND },
+ { ";;&", SEMI_SEMI_AND },
+ { "<<-", LESS_LESS_MINUS },
+ { "<<<", LESS_LESS_LESS },
+ { "&>", AND_GREATER },
+ { "&>>", AND_GREATER_GREATER },
+ { "<>", LESS_GREATER },
+ { ">|", GREATER_BAR },
+ { "|&", BAR_AND },
+ { "EOF", yacc_EOF },
+ /* Tokens whose value is the character itself */
+ { ">", '>' },
+ { "<", '<' },
+ { "-", '-' },
+ { "{", '{' },
+ { "}", '}' },
+ { ";", ';' },
+ { "(", '(' },
+ { ")", ')' },
+ { "|", '|' },
+ { "&", '&' },
+ { "newline", '\n' },
+ { (char *)NULL, 0}
+};
+
+/* others not listed here:
+ WORD look at yylval.word
+ ASSIGNMENT_WORD look at yylval.word
+ NUMBER look at yylval.number
+ ARITH_CMD look at yylval.word_list
+ ARITH_FOR_EXPRS look at yylval.word_list
+ COND_CMD look at yylval.command
+*/
+
+/* These are used by read_token_word, but appear up here so that shell_getc
+ can use them to decide when to add otherwise blank lines to the history. */
+
+/* The primary delimiter stack. */
+struct dstack dstack = { (char *)NULL, 0, 0 };
+
+/* A temporary delimiter stack to be used when decoding prompt strings.
+ This is needed because command substitutions in prompt strings (e.g., PS2)
+ can screw up the parser's quoting state. */
+static struct dstack temp_dstack = { (char *)NULL, 0, 0 };
+
+/* Macro for accessing the top delimiter on the stack. Returns the
+ delimiter or zero if none. */
+#define current_delimiter(ds) \
+ (ds.delimiter_depth ? ds.delimiters[ds.delimiter_depth - 1] : 0)
+
+#define push_delimiter(ds, character) \
+ do \
+ { \
+ if (ds.delimiter_depth + 2 > ds.delimiter_space) \
+ ds.delimiters = (char *)xrealloc \
+ (ds.delimiters, (ds.delimiter_space += 10) * sizeof (char)); \
+ ds.delimiters[ds.delimiter_depth] = character; \
+ ds.delimiter_depth++; \
+ } \
+ while (0)
+
+#define pop_delimiter(ds) ds.delimiter_depth--
+
+/* Return the next shell input character. This always reads characters
+ from shell_input_line; when that line is exhausted, it is time to
+ read the next line. This is called by read_token when the shell is
+ processing normal command input. */
+
+/* This implements one-character lookahead/lookbehind across physical input
+ lines, to avoid something being lost because it's pushed back with
+ shell_ungetc when we're at the start of a line. */
+static int eol_ungetc_lookahead = 0;
+
+static int
+shell_getc (remove_quoted_newline)
+ int remove_quoted_newline;
+{
+ register int i;
+ int c;
+ unsigned char uc;
+
+ QUIT;
+
+ if (sigwinch_received)
+ {
+ sigwinch_received = 0;
+ get_new_window_size (0, (int *)0, (int *)0);
+ }
+
+ if (eol_ungetc_lookahead)
+ {
+ c = eol_ungetc_lookahead;
+ eol_ungetc_lookahead = 0;
+ return (c);
+ }
+
+#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
+ /* If shell_input_line[shell_input_line_index] == 0, but there is
+ something on the pushed list of strings, then we don't want to go
+ off and get another line. We let the code down below handle it. */
+
+ if (!shell_input_line || ((!shell_input_line[shell_input_line_index]) &&
+ (pushed_string_list == (STRING_SAVER *)NULL)))
+#else /* !ALIAS && !DPAREN_ARITHMETIC */
+ if (!shell_input_line || !shell_input_line[shell_input_line_index])
+#endif /* !ALIAS && !DPAREN_ARITHMETIC */
+ {
+ line_number++;
+
+ restart_read:
+
+ /* Allow immediate exit if interrupted during input. */
+ QUIT;
+
+ i = 0;
+ shell_input_line_terminator = 0;
+
+ /* If the shell is interatctive, but not currently printing a prompt
+ (interactive_shell && interactive == 0), we don't want to print
+ notifies or cleanup the jobs -- we want to defer it until we do
+ print the next prompt. */
+ if (interactive_shell == 0 || SHOULD_PROMPT())
+ {
+#if defined (JOB_CONTROL)
+ /* This can cause a problem when reading a command as the result
+ of a trap, when the trap is called from flush_child. This call
+ had better not cause jobs to disappear from the job table in
+ that case, or we will have big trouble. */
+ notify_and_cleanup ();
+#else /* !JOB_CONTROL */
+ cleanup_dead_jobs ();
+#endif /* !JOB_CONTROL */
+ }
+
+#if defined (READLINE)
+ if (no_line_editing && SHOULD_PROMPT())
+#else
+ if (SHOULD_PROMPT())
+#endif
+ print_prompt ();
+
+ if (bash_input.type == st_stream)
+ clearerr (stdin);
+
+ while (1)
+ {
+ c = yy_getc ();
+
+ /* Allow immediate exit if interrupted during input. */
+ QUIT;
+
+ if (c == '\0')
+ {
+#if 0
+ internal_warning ("shell_getc: ignored null byte in input");
+#endif
+ continue;
+ }
+
+ RESIZE_MALLOCED_BUFFER (shell_input_line, i, 2, shell_input_line_size, 256);
+
+ if (c == EOF)
+ {
+ if (bash_input.type == st_stream)
+ clearerr (stdin);
+
+ if (i == 0)
+ shell_input_line_terminator = EOF;
+
+ shell_input_line[i] = '\0';
+ break;
+ }
+
+ shell_input_line[i++] = c;
+
+ if (c == '\n')
+ {
+ shell_input_line[--i] = '\0';
+ current_command_line_count++;
+ break;
+ }
+ }
+
+ shell_input_line_index = 0;
+ shell_input_line_len = i; /* == strlen (shell_input_line) */
+
+ set_line_mbstate ();
+
+#if defined (HISTORY)
+ if (remember_on_history && shell_input_line && shell_input_line[0])
+ {
+ char *expansions;
+# if defined (BANG_HISTORY)
+ int old_hist;
+
+ /* If the current delimiter is a single quote, we should not be
+ performing history expansion, even if we're on a different
+ line from the original single quote. */
+ old_hist = history_expansion_inhibited;
+ if (current_delimiter (dstack) == '\'')
+ history_expansion_inhibited = 1;
+# endif
+ expansions = pre_process_line (shell_input_line, 1, 1);
+# if defined (BANG_HISTORY)
+ history_expansion_inhibited = old_hist;
+# endif
+ if (expansions != shell_input_line)
+ {
+ free (shell_input_line);
+ shell_input_line = expansions;
+ shell_input_line_len = shell_input_line ?
+ strlen (shell_input_line) : 0;
+ if (!shell_input_line_len)
+ current_command_line_count--;
+
+ /* We have to force the xrealloc below because we don't know
+ the true allocated size of shell_input_line anymore. */
+ shell_input_line_size = shell_input_line_len;
+
+ set_line_mbstate ();
+ }
+ }
+ /* Try to do something intelligent with blank lines encountered while
+ entering multi-line commands. XXX - this is grotesque */
+ else if (remember_on_history && shell_input_line &&
+ shell_input_line[0] == '\0' &&
+ current_command_line_count > 1)
+ {
+ if (current_delimiter (dstack))
+ /* We know shell_input_line[0] == 0 and we're reading some sort of
+ quoted string. This means we've got a line consisting of only
+ a newline in a quoted string. We want to make sure this line
+ gets added to the history. */
+ maybe_add_history (shell_input_line);
+ else
+ {
+ char *hdcs;
+ hdcs = history_delimiting_chars ();
+ if (hdcs && hdcs[0] == ';')
+ maybe_add_history (shell_input_line);
+ }
+ }
+
+#endif /* HISTORY */
+
+ if (shell_input_line)
+ {
+ /* Lines that signify the end of the shell's input should not be
+ echoed. */
+ if (echo_input_at_read && (shell_input_line[0] ||
+ shell_input_line_terminator != EOF))
+ fprintf (stderr, "%s\n", shell_input_line);
+ }
+ else
+ {
+ shell_input_line_size = 0;
+ prompt_string_pointer = &current_prompt_string;
+ if (SHOULD_PROMPT ())
+ prompt_again ();
+ goto restart_read;
+ }
+
+ /* Add the newline to the end of this string, iff the string does
+ not already end in an EOF character. */
+ if (shell_input_line_terminator != EOF)
+ {
+ if (shell_input_line_len + 3 > shell_input_line_size)
+ shell_input_line = (char *)xrealloc (shell_input_line,
+ 1 + (shell_input_line_size += 2));
+
+ shell_input_line[shell_input_line_len] = '\n';
+ shell_input_line[shell_input_line_len + 1] = '\0';
+
+ set_line_mbstate ();
+ }
+ }
+
+ uc = shell_input_line[shell_input_line_index];
+
+ if (uc)
+ shell_input_line_index++;
+
+#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
+ /* If UC is NULL, we have reached the end of the current input string. If
+ pushed_string_list is non-empty, it's time to pop to the previous string
+ because we have fully consumed the result of the last alias expansion.
+ Do it transparently; just return the next character of the string popped
+ to. */
+pop_alias:
+ if (!uc && (pushed_string_list != (STRING_SAVER *)NULL))
+ {
+ pop_string ();
+ uc = shell_input_line[shell_input_line_index];
+ if (uc)
+ shell_input_line_index++;
+ }
+#endif /* ALIAS || DPAREN_ARITHMETIC */
+
+ if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n')
+ {
+ if (SHOULD_PROMPT ())
+ prompt_again ();
+ line_number++;
+ /* XXX - what do we do here if we're expanding an alias whose definition
+ ends with a newline? Recall that we inhibit the appending of a
+ space in mk_alexpansion() if newline is the last character. */
+#if 0 /* XXX - bash-4.2 (jonathan@claggett.org) */
+ if (expanding_alias () && shell_input_line[shell_input_line_index+1] == '\0')
+ {
+ uc = 0;
+ goto pop_alias;
+ }
+#endif
+
+ goto restart_read;
+ }
+
+ if (!uc && shell_input_line_terminator == EOF)
+ return ((shell_input_line_index != 0) ? '\n' : EOF);
+
+ return (uc);
+}
+
+/* Put C back into the input for the shell. This might need changes for
+ HANDLE_MULTIBYTE around EOLs. Since we (currently) never push back a
+ character different than we read, shell_input_line_property doesn't need
+ to change when manipulating shell_input_line. The define for
+ last_shell_getc_is_singlebyte should take care of it, though. */
+static void
+shell_ungetc (c)
+ int c;
+{
+ if (shell_input_line && shell_input_line_index)
+ shell_input_line[--shell_input_line_index] = c;
+ else
+ eol_ungetc_lookahead = c;
+}
+
+#ifdef INCLUDE_UNUSED
+/* Back the input pointer up by one, effectively `ungetting' a character. */
+static void
+shell_ungetchar ()
+{
+ if (shell_input_line && shell_input_line_index)
+ shell_input_line_index--;
+}
+#endif
+
+/* Discard input until CHARACTER is seen, then push that character back
+ onto the input stream. */
+static void
+discard_until (character)
+ int character;
+{
+ int c;
+
+ while ((c = shell_getc (0)) != EOF && c != character)
+ ;
+
+ if (c != EOF)
+ shell_ungetc (c);
+}
+
+void
+execute_variable_command (command, vname)
+ char *command, *vname;
+{
+ char *last_lastarg;
+ sh_parser_state_t ps;
+
+ save_parser_state (&ps);
+ last_lastarg = get_string_value ("_");
+ if (last_lastarg)
+ last_lastarg = savestring (last_lastarg);
+
+ parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST);
+
+ restore_parser_state (&ps);
+ bind_variable ("_", last_lastarg, 0);
+ FREE (last_lastarg);
+
+ if (token_to_read == '\n') /* reset_parser was called */
+ token_to_read = 0;
+}
+
+/* Place to remember the token. We try to keep the buffer
+ at a reasonable size, but it can grow. */
+static char *token = (char *)NULL;
+
+/* Current size of the token buffer. */
+static int token_buffer_size;
+
+/* Command to read_token () explaining what we want it to do. */
+#define READ 0
+#define RESET 1
+#define prompt_is_ps1 \
+ (!prompt_string_pointer || prompt_string_pointer == &ps1_prompt)
+
+/* Function for yyparse to call. yylex keeps track of
+ the last two tokens read, and calls read_token. */
+static int
+yylex ()
+{
+ if (interactive && (current_token == 0 || current_token == '\n'))
+ {
+ /* Before we print a prompt, we might have to check mailboxes.
+ We do this only if it is time to do so. Notice that only here
+ is the mail alarm reset; nothing takes place in check_mail ()
+ except the checking of mail. Please don't change this. */
+ if (prompt_is_ps1 && time_to_check_mail ())
+ {
+ check_mail ();
+ reset_mail_timer ();
+ }
+
+ /* Avoid printing a prompt if we're not going to read anything, e.g.
+ after resetting the parser with read_token (RESET). */
+ if (token_to_read == 0 && SHOULD_PROMPT ())
+ prompt_again ();
+ }
+
+ two_tokens_ago = token_before_that;
+ token_before_that = last_read_token;
+ last_read_token = current_token;
+ current_token = read_token (READ);
+
+ if ((parser_state & PST_EOFTOKEN) && current_token == shell_eof_token)
+ {
+ current_token = yacc_EOF;
+ if (bash_input.type == st_string)
+ rewind_input_string ();
+ }
+ parser_state &= ~PST_EOFTOKEN;
+
+ return (current_token);
+}
+
+/* When non-zero, we have read the required tokens
+ which allow ESAC to be the next one read. */
+static int esacs_needed_count;
+
+void
+gather_here_documents ()
+{
+ int r;
+
+ r = 0;
+ while (need_here_doc)
+ {
+ parser_state |= PST_HEREDOC;
+ make_here_document (redir_stack[r++], line_number);
+ parser_state &= ~PST_HEREDOC;
+ need_here_doc--;
+ }
+}
+
+/* When non-zero, an open-brace used to create a group is awaiting a close
+ brace partner. */
+static int open_brace_count;
+
+#define command_token_position(token) \
+ (((token) == ASSIGNMENT_WORD) || (parser_state&PST_REDIRLIST) || \
+ ((token) != SEMI_SEMI && (token) != SEMI_AND && (token) != SEMI_SEMI_AND && reserved_word_acceptable(token)))
+
+#define assignment_acceptable(token) \
+ (command_token_position(token) && ((parser_state & PST_CASEPAT) == 0))
+
+/* Check to see if TOKEN is a reserved word and return the token
+ value if it is. */
+#define CHECK_FOR_RESERVED_WORD(tok) \
+ do { \
+ if (!dollar_present && !quoted && \
+ reserved_word_acceptable (last_read_token)) \
+ { \
+ int i; \
+ for (i = 0; word_token_alist[i].word != (char *)NULL; i++) \
+ if (STREQ (tok, word_token_alist[i].word)) \
+ { \
+ if ((parser_state & PST_CASEPAT) && (word_token_alist[i].token != ESAC)) \
+ break; \
+ if (word_token_alist[i].token == TIME && time_command_acceptable () == 0) \
+ break; \
+ if (word_token_alist[i].token == ESAC) \
+ parser_state &= ~(PST_CASEPAT|PST_CASESTMT); \
+ else if (word_token_alist[i].token == CASE) \
+ parser_state |= PST_CASESTMT; \
+ else if (word_token_alist[i].token == COND_END) \
+ parser_state &= ~(PST_CONDCMD|PST_CONDEXPR); \
+ else if (word_token_alist[i].token == COND_START) \
+ parser_state |= PST_CONDCMD; \
+ else if (word_token_alist[i].token == '{') \
+ open_brace_count++; \
+ else if (word_token_alist[i].token == '}' && open_brace_count) \
+ open_brace_count--; \
+ return (word_token_alist[i].token); \
+ } \
+ } \
+ } while (0)
+
+#if defined (ALIAS)
+
+ /* OK, we have a token. Let's try to alias expand it, if (and only if)
+ it's eligible.
+
+ It is eligible for expansion if EXPAND_ALIASES is set, and
+ the token is unquoted and the last token read was a command
+ separator (or expand_next_token is set), and we are currently
+ processing an alias (pushed_string_list is non-empty) and this
+ token is not the same as the current or any previously
+ processed alias.
+
+ Special cases that disqualify:
+ In a pattern list in a case statement (parser_state & PST_CASEPAT). */
+
+static char *
+mk_alexpansion (s)
+ char *s;
+{
+ int l;
+ char *r;
+
+ l = strlen (s);
+ r = xmalloc (l + 2);
+ strcpy (r, s);
+#if 0 /* XXX - bash-4.2 */
+ if (r[l -1] != ' ' && r[l -1] != '\n')
+#else
+ if (r[l -1] != ' ')
+#endif
+ r[l++] = ' ';
+ r[l] = '\0';
+ return r;
+}
+
+static int
+alias_expand_token (tokstr)
+ char *tokstr;
+{
+ char *expanded;
+ alias_t *ap;
+
+ if (((parser_state & PST_ALEXPNEXT) || command_token_position (last_read_token)) &&
+ (parser_state & PST_CASEPAT) == 0)
+ {
+ ap = find_alias (tokstr);
+
+ /* Currently expanding this token. */
+ if (ap && (ap->flags & AL_BEINGEXPANDED))
+ return (NO_EXPANSION);
+
+ /* mk_alexpansion puts an extra space on the end of the alias expansion,
+ so the lookahead by the parser works right. If this gets changed,
+ make sure the code in shell_getc that deals with reaching the end of
+ an expanded alias is changed with it. */
+ expanded = ap ? mk_alexpansion (ap->value) : (char *)NULL;
+
+ if (expanded)
+ {
+ push_string (expanded, ap->flags & AL_EXPANDNEXT, ap);
+ return (RE_READ_TOKEN);
+ }
+ else
+ /* This is an eligible token that does not have an expansion. */
+ return (NO_EXPANSION);
+ }
+ return (NO_EXPANSION);
+}
+#endif /* ALIAS */
+
+static int
+time_command_acceptable ()
+{
+#if defined (COMMAND_TIMING)
+ switch (last_read_token)
+ {
+ case 0:
+ case ';':
+ case '\n':
+ case AND_AND:
+ case OR_OR:
+ case '&':
+ case DO:
+ case THEN:
+ case ELSE:
+ case '{': /* } */
+ case '(': /* ) */
+ return 1;
+ default:
+ return 0;
+ }
+#else
+ return 0;
+#endif /* COMMAND_TIMING */
+}
+
+/* Handle special cases of token recognition:
+ IN is recognized if the last token was WORD and the token
+ before that was FOR or CASE or SELECT.
+
+ DO is recognized if the last token was WORD and the token
+ before that was FOR or SELECT.
+
+ ESAC is recognized if the last token caused `esacs_needed_count'
+ to be set
+
+ `{' is recognized if the last token as WORD and the token
+ before that was FUNCTION, or if we just parsed an arithmetic
+ `for' command.
+
+ `}' is recognized if there is an unclosed `{' present.
+
+ `-p' is returned as TIMEOPT if the last read token was TIME.
+
+ ']]' is returned as COND_END if the parser is currently parsing
+ a conditional expression ((parser_state & PST_CONDEXPR) != 0)
+
+ `time' is returned as TIME if and only if it is immediately
+ preceded by one of `;', `\n', `||', `&&', or `&'.
+*/
+
+static int
+special_case_tokens (tokstr)
+ char *tokstr;
+{
+ if ((last_read_token == WORD) &&
+#if defined (SELECT_COMMAND)
+ ((token_before_that == FOR) || (token_before_that == CASE) || (token_before_that == SELECT)) &&
+#else
+ ((token_before_that == FOR) || (token_before_that == CASE)) &&
+#endif
+ (tokstr[0] == 'i' && tokstr[1] == 'n' && tokstr[2] == 0))
+ {
+ if (token_before_that == CASE)
+ {
+ parser_state |= PST_CASEPAT;
+ esacs_needed_count++;
+ }
+ return (IN);
+ }
+
+ if (last_read_token == WORD &&
+#if defined (SELECT_COMMAND)
+ (token_before_that == FOR || token_before_that == SELECT) &&
+#else
+ (token_before_that == FOR) &&
+#endif
+ (tokstr[0] == 'd' && tokstr[1] == 'o' && tokstr[2] == '\0'))
+ return (DO);
+
+ /* Ditto for ESAC in the CASE case.
+ Specifically, this handles "case word in esac", which is a legal
+ construct, certainly because someone will pass an empty arg to the
+ case construct, and we don't want it to barf. Of course, we should
+ insist that the case construct has at least one pattern in it, but
+ the designers disagree. */
+ if (esacs_needed_count)
+ {
+ esacs_needed_count--;
+ if (STREQ (tokstr, "esac"))
+ {
+ parser_state &= ~PST_CASEPAT;
+ return (ESAC);
+ }
+ }
+
+ /* The start of a shell function definition. */
+ if (parser_state & PST_ALLOWOPNBRC)
+ {
+ parser_state &= ~PST_ALLOWOPNBRC;
+ if (tokstr[0] == '{' && tokstr[1] == '\0') /* } */
+ {
+ open_brace_count++;
+ function_bstart = line_number;
+ return ('{'); /* } */
+ }
+ }
+
+ /* We allow a `do' after a for ((...)) without an intervening
+ list_terminator */
+ if (last_read_token == ARITH_FOR_EXPRS && tokstr[0] == 'd' && tokstr[1] == 'o' && !tokstr[2])
+ return (DO);
+ if (last_read_token == ARITH_FOR_EXPRS && tokstr[0] == '{' && tokstr[1] == '\0') /* } */
+ {
+ open_brace_count++;
+ return ('{'); /* } */
+ }
+
+ if (open_brace_count && reserved_word_acceptable (last_read_token) && tokstr[0] == '}' && !tokstr[1])
+ {
+ open_brace_count--; /* { */
+ return ('}');
+ }
+
+#if defined (COMMAND_TIMING)
+ /* Handle -p after `time'. */
+ if (last_read_token == TIME && tokstr[0] == '-' && tokstr[1] == 'p' && !tokstr[2])
+ return (TIMEOPT);
+#endif
+
+#if 0
+#if defined (COMMAND_TIMING)
+ if (STREQ (token, "time") && ((parser_state & PST_CASEPAT) == 0) && time_command_acceptable ())
+ return (TIME);
+#endif /* COMMAND_TIMING */
+#endif
+
+#if defined (COND_COMMAND) /* [[ */
+ if ((parser_state & PST_CONDEXPR) && tokstr[0] == ']' && tokstr[1] == ']' && tokstr[2] == '\0')
+ return (COND_END);
+#endif
+
+ return (-1);
+}
+
+/* Called from shell.c when Control-C is typed at top level. Or
+ by the error rule at top level. */
+void
+reset_parser ()
+{
+ dstack.delimiter_depth = 0; /* No delimiters found so far. */
+ open_brace_count = 0;
+
+#if defined (EXTENDED_GLOB)
+ /* Reset to global value of extended glob */
+ if (parser_state & PST_EXTPAT)
+ extended_glob = global_extglob;
+#endif
+
+ parser_state = 0;
+
+#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
+ if (pushed_string_list)
+ free_string_list ();
+#endif /* ALIAS || DPAREN_ARITHMETIC */
+
+ if (shell_input_line)
+ {
+ free (shell_input_line);
+ shell_input_line = (char *)NULL;
+ shell_input_line_size = shell_input_line_index = 0;
+ }
+
+ FREE (word_desc_to_read);
+ word_desc_to_read = (WORD_DESC *)NULL;
+
+ current_token = '\n'; /* XXX */
+ last_read_token = '\n';
+ token_to_read = '\n';
+}
+
+/* Read the next token. Command can be READ (normal operation) or
+ RESET (to normalize state). */
+static int
+read_token (command)
+ int command;
+{
+ int character; /* Current character. */
+ int peek_char; /* Temporary look-ahead character. */
+ int result; /* The thing to return. */
+
+ if (command == RESET)
+ {
+ reset_parser ();
+ return ('\n');
+ }
+
+ if (token_to_read)
+ {
+ result = token_to_read;
+ if (token_to_read == WORD || token_to_read == ASSIGNMENT_WORD)
+ {
+ yylval.word = word_desc_to_read;
+ word_desc_to_read = (WORD_DESC *)NULL;
+ }
+ token_to_read = 0;
+ return (result);
+ }
+
+#if defined (COND_COMMAND)
+ if ((parser_state & (PST_CONDCMD|PST_CONDEXPR)) == PST_CONDCMD)
+ {
+ cond_lineno = line_number;
+ parser_state |= PST_CONDEXPR;
+ yylval.command = parse_cond_command ();
+ if (cond_token != COND_END)
+ {
+ cond_error ();
+ return (-1);
+ }
+ token_to_read = COND_END;
+ parser_state &= ~(PST_CONDEXPR|PST_CONDCMD);
+ return (COND_CMD);
+ }
+#endif
+
+#if defined (ALIAS)
+ /* This is a place to jump back to once we have successfully expanded a
+ token with an alias and pushed the string with push_string () */
+ re_read_token:
+#endif /* ALIAS */
+
+ /* Read a single word from input. Start by skipping blanks. */
+ while ((character = shell_getc (1)) != EOF && shellblank (character))
+ ;
+
+ if (character == EOF)
+ {
+ EOF_Reached = 1;
+ return (yacc_EOF);
+ }
+
+ if MBTEST(character == '#' && (!interactive || interactive_comments))
+ {
+ /* A comment. Discard until EOL or EOF, and then return a newline. */
+ discard_until ('\n');
+ shell_getc (0);
+ character = '\n'; /* this will take the next if statement and return. */
+ }
+
+ if (character == '\n')
+ {
+ /* If we're about to return an unquoted newline, we can go and collect
+ the text of any pending here document. */
+ if (need_here_doc)
+ gather_here_documents ();
+
+#if defined (ALIAS)
+ parser_state &= ~PST_ALEXPNEXT;
+#endif /* ALIAS */
+
+ parser_state &= ~PST_ASSIGNOK;
+
+ return (character);
+ }
+
+ if (parser_state & PST_REGEXP)
+ goto tokword;
+
+ /* Shell meta-characters. */
+ if MBTEST(shellmeta (character) && ((parser_state & PST_DBLPAREN) == 0))
+ {
+#if defined (ALIAS)
+ /* Turn off alias tokenization iff this character sequence would
+ not leave us ready to read a command. */
+ if (character == '<' || character == '>')
+ parser_state &= ~PST_ALEXPNEXT;
+#endif /* ALIAS */
+
+ parser_state &= ~PST_ASSIGNOK;
+
+ peek_char = shell_getc (1);
+ if (character == peek_char)
+ {
+ switch (character)
+ {
+ case '<':
+ /* If '<' then we could be at "<<" or at "<<-". We have to
+ look ahead one more character. */
+ peek_char = shell_getc (1);
+ if MBTEST(peek_char == '-')
+ return (LESS_LESS_MINUS);
+ else if MBTEST(peek_char == '<')
+ return (LESS_LESS_LESS);
+ else
+ {
+ shell_ungetc (peek_char);
+ return (LESS_LESS);
+ }
+
+ case '>':
+ return (GREATER_GREATER);
+
+ case ';':
+ parser_state |= PST_CASEPAT;
+#if defined (ALIAS)
+ parser_state &= ~PST_ALEXPNEXT;
+#endif /* ALIAS */
+
+ peek_char = shell_getc (1);
+ if MBTEST(peek_char == '&')
+ return (SEMI_SEMI_AND);
+ else
+ {
+ shell_ungetc (peek_char);
+ return (SEMI_SEMI);
+ }
+
+ case '&':
+ return (AND_AND);
+
+ case '|':
+ return (OR_OR);
+
+#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND)
+ case '(': /* ) */
+ result = parse_dparen (character);
+ if (result == -2)
+ break;
+ else
+ return result;
+#endif
+ }
+ }
+ else if MBTEST(character == '<' && peek_char == '&')
+ return (LESS_AND);
+ else if MBTEST(character == '>' && peek_char == '&')
+ return (GREATER_AND);
+ else if MBTEST(character == '<' && peek_char == '>')
+ return (LESS_GREATER);
+ else if MBTEST(character == '>' && peek_char == '|')
+ return (GREATER_BAR);
+ else if MBTEST(character == '&' && peek_char == '>')
+ {
+ peek_char = shell_getc (1);
+ if MBTEST(peek_char == '>')
+ return (AND_GREATER_GREATER);
+ else
+ {
+ shell_ungetc (peek_char);
+ return (AND_GREATER);
+ }
+ }
+ else if MBTEST(character == '|' && peek_char == '&')
+ return (BAR_AND);
+ else if MBTEST(character == ';' && peek_char == '&')
+ {
+ parser_state |= PST_CASEPAT;
+#if defined (ALIAS)
+ parser_state &= ~PST_ALEXPNEXT;
+#endif /* ALIAS */
+ return (SEMI_AND);
+ }
+
+ shell_ungetc (peek_char);
+
+ /* If we look like we are reading the start of a function
+ definition, then let the reader know about it so that
+ we will do the right thing with `{'. */
+ if MBTEST(character == ')' && last_read_token == '(' && token_before_that == WORD)
+ {
+ parser_state |= PST_ALLOWOPNBRC;
+#if defined (ALIAS)
+ parser_state &= ~PST_ALEXPNEXT;
+#endif /* ALIAS */
+ function_dstart = line_number;
+ }
+
+ /* case pattern lists may be preceded by an optional left paren. If
+ we're not trying to parse a case pattern list, the left paren
+ indicates a subshell. */
+ if MBTEST(character == '(' && (parser_state & PST_CASEPAT) == 0) /* ) */
+ parser_state |= PST_SUBSHELL;
+ /*(*/
+ else if MBTEST((parser_state & PST_CASEPAT) && character == ')')
+ parser_state &= ~PST_CASEPAT;
+ /*(*/
+ else if MBTEST((parser_state & PST_SUBSHELL) && character == ')')
+ parser_state &= ~PST_SUBSHELL;
+
+#if defined (PROCESS_SUBSTITUTION)
+ /* Check for the constructs which introduce process substitution.
+ Shells running in `posix mode' don't do process substitution. */
+ if MBTEST(posixly_correct || ((character != '>' && character != '<') || peek_char != '(')) /*)*/
+#endif /* PROCESS_SUBSTITUTION */
+ return (character);
+ }
+
+ /* Hack <&- (close stdin) case. Also <&N- (dup and close). */
+ if MBTEST(character == '-' && (last_read_token == LESS_AND || last_read_token == GREATER_AND))
+ return (character);
+
+tokword:
+ /* Okay, if we got this far, we have to read a word. Read one,
+ and then check it against the known ones. */
+ result = read_token_word (character);
+#if defined (ALIAS)
+ if (result == RE_READ_TOKEN)
+ goto re_read_token;
+#endif
+ return result;
+}
+
+/*
+ * Match a $(...) or other grouping construct. This has to handle embedded
+ * quoted strings ('', ``, "") and nested constructs. It also must handle
+ * reprompting the user, if necessary, after reading a newline, and returning
+ * correct error values if it reads EOF.
+ */
+#define P_FIRSTCLOSE 0x01
+#define P_ALLOWESC 0x02
+#define P_DQUOTE 0x04
+#define P_COMMAND 0x08 /* parsing a command, so look for comments */
+#define P_BACKQUOTE 0x10 /* parsing a backquoted command substitution */
+#define P_ARRAYSUB 0x20 /* parsing a [...] array subscript for assignment */
+
+/* Lexical state while parsing a grouping construct or $(...). */
+#define LEX_WASDOL 0x001
+#define LEX_CKCOMMENT 0x002
+#define LEX_INCOMMENT 0x004
+#define LEX_PASSNEXT 0x008
+#define LEX_RESWDOK 0x010
+#define LEX_CKCASE 0x020
+#define LEX_INCASE 0x040
+#define LEX_INHEREDOC 0x080
+#define LEX_HEREDELIM 0x100 /* reading here-doc delimiter */
+#define LEX_STRIPDOC 0x200 /* <<- strip tabs from here doc delim */
+#define LEX_INWORD 0x400
+
+#define COMSUB_META(ch) ((ch) == ';' || (ch) == '&' || (ch) == '|')
+
+#define CHECK_NESTRET_ERROR() \
+ do { \
+ if (nestret == &matched_pair_error) \
+ { \
+ free (ret); \
+ return &matched_pair_error; \
+ } \
+ } while (0)
+
+#define APPEND_NESTRET() \
+ do { \
+ if (nestlen) \
+ { \
+ RESIZE_MALLOCED_BUFFER (ret, retind, nestlen, retsize, 64); \
+ strcpy (ret + retind, nestret); \
+ retind += nestlen; \
+ } \
+ } while (0)
+
+static char matched_pair_error;
+
+static char *
+parse_matched_pair (qc, open, close, lenp, flags)
+ int qc; /* `"' if this construct is within double quotes */
+ int open, close;
+ int *lenp, flags;
+{
+ int count, ch, tflags;
+ int nestlen, ttranslen, start_lineno;
+ char *ret, *nestret, *ttrans;
+ int retind, retsize, rflags;
+
+/*itrace("parse_matched_pair[%d]: open = %c close = %c flags = %d", line_number, open, close, flags);*/
+ count = 1;
+ tflags = 0;
+
+ if ((flags & P_COMMAND) && qc != '`' && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0)
+ tflags |= LEX_CKCOMMENT;
+
+ /* RFLAGS is the set of flags we want to pass to recursive calls. */
+ rflags = (qc == '"') ? P_DQUOTE : (flags & P_DQUOTE);
+
+ ret = (char *)xmalloc (retsize = 64);
+ retind = 0;
+
+ start_lineno = line_number;
+ while (count)
+ {
+ ch = shell_getc (qc != '\'' && (tflags & LEX_PASSNEXT) == 0);
+
+ if (ch == EOF)
+ {
+ free (ret);
+ parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), close);
+ EOF_Reached = 1; /* XXX */
+ return (&matched_pair_error);
+ }
+
+ /* Possible reprompting. */
+ if (ch == '\n' && SHOULD_PROMPT ())
+ prompt_again ();
+
+ /* Don't bother counting parens or doing anything else if in a comment
+ or part of a case statement */
+ if (tflags & LEX_INCOMMENT)
+ {
+ /* Add this character. */
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+
+ if (ch == '\n')
+ tflags &= ~LEX_INCOMMENT;
+
+ continue;
+ }
+
+ /* Not exactly right yet, should handle shell metacharacters, too. If
+ any changes are made to this test, make analogous changes to subst.c:
+ extract_delimited_string(). */
+ else if MBTEST((tflags & LEX_CKCOMMENT) && (tflags & LEX_INCOMMENT) == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || shellblank (ret[retind - 1])))
+ tflags |= LEX_INCOMMENT;
+
+ if (tflags & LEX_PASSNEXT) /* last char was backslash */
+ {
+ tflags &= ~LEX_PASSNEXT;
+ if (qc != '\'' && ch == '\n') /* double-quoted \<newline> disappears. */
+ {
+ if (retind > 0)
+ retind--; /* swallow previously-added backslash */
+ continue;
+ }
+
+ RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
+ if MBTEST(ch == CTLESC || ch == CTLNUL)
+ ret[retind++] = CTLESC;
+ ret[retind++] = ch;
+ continue;
+ }
+ /* If we're reparsing the input (e.g., from parse_string_to_word_list),
+ we've already prepended CTLESC to single-quoted results of $'...'.
+ We may want to do this for other CTLESC-quoted characters in
+ reparse, too. */
+ else if MBTEST((parser_state & PST_REPARSE) && open == '\'' && (ch == CTLESC || ch == CTLNUL))
+ {
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+ continue;
+ }
+ else if MBTEST(ch == CTLESC || ch == CTLNUL) /* special shell escapes */
+ {
+ RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
+ ret[retind++] = CTLESC;
+ ret[retind++] = ch;
+ continue;
+ }
+ else if MBTEST(ch == close) /* ending delimiter */
+ count--;
+ /* handle nested ${...} specially. */
+ else if MBTEST(open != close && (tflags & LEX_WASDOL) && open == '{' && ch == open) /* } */
+ count++;
+ else if MBTEST(((flags & P_FIRSTCLOSE) == 0) && ch == open) /* nested begin */
+ count++;
+
+ /* Add this character. */
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+
+ /* If we just read the ending character, don't bother continuing. */
+ if (count == 0)
+ break;
+
+ if (open == '\'') /* '' inside grouping construct */
+ {
+ if MBTEST((flags & P_ALLOWESC) && ch == '\\')
+ tflags |= LEX_PASSNEXT;
+ continue;
+ }
+
+ if MBTEST(ch == '\\') /* backslashes */
+ tflags |= LEX_PASSNEXT;
+
+#if 0
+ /* The big hammer. Single quotes aren't special in double quotes. The
+ problem is that Posix says the single quotes are semi-special:
+ within a double-quoted ${...} construct "an even number of
+ unescaped double-quotes or single-quotes, if any, shall occur." */
+ if MBTEST(open == '{' && (flags & P_DQUOTE) && ch == '\'') /* } */
+ continue;
+#endif
+
+ /* Could also check open == '`' if we want to parse grouping constructs
+ inside old-style command substitution. */
+ if (open != close) /* a grouping construct */
+ {
+ if MBTEST(shellquote (ch))
+ {
+ /* '', ``, or "" inside $(...) or other grouping construct. */
+ push_delimiter (dstack, ch);
+ if MBTEST((tflags & LEX_WASDOL) && ch == '\'') /* $'...' inside group */
+ nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC|rflags);
+ else
+ nestret = parse_matched_pair (ch, ch, ch, &nestlen, rflags);
+ pop_delimiter (dstack);
+ CHECK_NESTRET_ERROR ();
+
+ if MBTEST((tflags & LEX_WASDOL) && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0))
+ {
+ /* Translate $'...' here. */
+ ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen);
+ xfree (nestret);
+
+ if ((rflags & P_DQUOTE) == 0)
+ {
+ nestret = sh_single_quote (ttrans);
+ free (ttrans);
+ nestlen = strlen (nestret);
+ }
+ else
+ {
+ nestret = ttrans;
+ nestlen = ttranslen;
+ }
+ retind -= 2; /* back up before the $' */
+ }
+ else if MBTEST((tflags & LEX_WASDOL) && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0))
+ {
+ /* Locale expand $"..." here. */
+ ttrans = localeexpand (nestret, 0, nestlen - 1, start_lineno, &ttranslen);
+ xfree (nestret);
+
+ nestret = sh_mkdoublequoted (ttrans, ttranslen, 0);
+ free (ttrans);
+ nestlen = ttranslen + 2;
+ retind -= 2; /* back up before the $" */
+ }
+
+ APPEND_NESTRET ();
+ FREE (nestret);
+ }
+ else if ((flags & P_ARRAYSUB) && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
+ goto parse_dollar_word;
+ }
+ /* Parse an old-style command substitution within double quotes as a
+ single word. */
+ /* XXX - sh and ksh93 don't do this - XXX */
+ else if MBTEST(open == '"' && ch == '`')
+ {
+ nestret = parse_matched_pair (0, '`', '`', &nestlen, rflags);
+
+ CHECK_NESTRET_ERROR ();
+ APPEND_NESTRET ();
+
+ FREE (nestret);
+ }
+ else if MBTEST(open != '`' && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
+ /* check for $(), $[], or ${} inside quoted string. */
+ {
+parse_dollar_word:
+ if (open == ch) /* undo previous increment */
+ count--;
+ if (ch == '(') /* ) */
+ nestret = parse_comsub (0, '(', ')', &nestlen, (rflags|P_COMMAND) & ~P_DQUOTE);
+ else if (ch == '{') /* } */
+ nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags);
+ else if (ch == '[') /* ] */
+ nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags);
+
+ CHECK_NESTRET_ERROR ();
+ APPEND_NESTRET ();
+
+ FREE (nestret);
+ }
+ if MBTEST(ch == '$')
+ tflags |= LEX_WASDOL;
+ else
+ tflags &= ~LEX_WASDOL;
+ }
+
+ ret[retind] = '\0';
+ if (lenp)
+ *lenp = retind;
+/*itrace("parse_matched_pair[%d]: returning %s", line_number, ret);*/
+ return ret;
+}
+
+/* Parse a $(...) command substitution. This is messier than I'd like, and
+ reproduces a lot more of the token-reading code than I'd like. */
+static char *
+parse_comsub (qc, open, close, lenp, flags)
+ int qc; /* `"' if this construct is within double quotes */
+ int open, close;
+ int *lenp, flags;
+{
+ int count, ch, peekc, tflags, lex_rwlen, lex_wlen, lex_firstind;
+ int nestlen, ttranslen, start_lineno;
+ char *ret, *nestret, *ttrans, *heredelim;
+ int retind, retsize, rflags, hdlen;
+
+/*itrace("parse_comsub: qc = `%c' open = %c close = %c", qc, open, close);*/
+ count = 1;
+ tflags = LEX_RESWDOK;
+
+ if ((flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0)
+ tflags |= LEX_CKCASE;
+ if ((tflags & LEX_CKCASE) && (interactive == 0 || interactive_comments))
+ tflags |= LEX_CKCOMMENT;
+
+ /* RFLAGS is the set of flags we want to pass to recursive calls. */
+ rflags = (flags & P_DQUOTE);
+
+ ret = (char *)xmalloc (retsize = 64);
+ retind = 0;
+
+ start_lineno = line_number;
+ lex_rwlen = lex_wlen = 0;
+
+ heredelim = 0;
+ lex_firstind = -1;
+
+ while (count)
+ {
+comsub_readchar:
+ ch = shell_getc (qc != '\'' && (tflags & LEX_PASSNEXT) == 0);
+
+ if (ch == EOF)
+ {
+eof_error:
+ free (ret);
+ FREE (heredelim);
+ parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), close);
+ EOF_Reached = 1; /* XXX */
+ return (&matched_pair_error);
+ }
+
+ /* If we hit the end of a line and are reading the contents of a here
+ document, and it's not the same line that the document starts on,
+ check for this line being the here doc delimiter. Otherwise, if
+ we're in a here document, mark the next character as the beginning
+ of a line. */
+ if (ch == '\n')
+ {
+ if ((tflags & LEX_HEREDELIM) && heredelim)
+ {
+ tflags &= ~LEX_HEREDELIM;
+ tflags |= LEX_INHEREDOC;
+ lex_firstind = retind + 1;
+ }
+ else if (tflags & LEX_INHEREDOC)
+ {
+ int tind;
+ tind = lex_firstind;
+ while ((tflags & LEX_STRIPDOC) && ret[tind] == '\t')
+ tind++;
+ if (STREQN (ret + tind, heredelim, hdlen))
+ {
+ tflags &= ~(LEX_STRIPDOC|LEX_INHEREDOC);
+/*itrace("parse_comsub:%d: found here doc end `%s'", line_number, ret + tind);*/
+ free (heredelim);
+ heredelim = 0;
+ lex_firstind = -1;
+ }
+ else
+ lex_firstind = retind + 1;
+ }
+ }
+
+ /* Possible reprompting. */
+ if (ch == '\n' && SHOULD_PROMPT ())
+ prompt_again ();
+
+ /* XXX -- possibly allow here doc to be delimited by ending right
+ paren. */
+ if ((tflags & LEX_INHEREDOC) && ch == close && count == 1)
+ {
+ int tind;
+/*itrace("parse_comsub: in here doc, ch == close, retind - firstind = %d hdlen = %d retind = %d", retind-lex_firstind, hdlen, retind);*/
+ tind = lex_firstind;
+ while ((tflags & LEX_STRIPDOC) && ret[tind] == '\t')
+ tind++;
+ if (retind-tind == hdlen && STREQN (ret + tind, heredelim, hdlen))
+ {
+ tflags &= ~(LEX_STRIPDOC|LEX_INHEREDOC);
+/*itrace("parse_comsub:%d: found here doc end `%s'", line_number, ret + tind);*/
+ free (heredelim);
+ heredelim = 0;
+ lex_firstind = -1;
+ }
+ }
+
+ /* Don't bother counting parens or doing anything else if in a comment */
+ if (tflags & (LEX_INCOMMENT|LEX_INHEREDOC))
+ {
+ /* Add this character. */
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+
+ if ((tflags & LEX_INCOMMENT) && ch == '\n')
+{
+/*itrace("parse_comsub:%d: lex_incomment -> 0 ch = `%c'", line_number, ch);*/
+ tflags &= ~LEX_INCOMMENT;
+}
+
+ continue;
+ }
+
+ if (tflags & LEX_PASSNEXT) /* last char was backslash */
+ {
+/*itrace("parse_comsub:%d: lex_passnext -> 0 ch = `%c' (%d)", line_number, ch, __LINE__);*/
+ tflags &= ~LEX_PASSNEXT;
+ if (qc != '\'' && ch == '\n') /* double-quoted \<newline> disappears. */
+ {
+ if (retind > 0)
+ retind--; /* swallow previously-added backslash */
+ continue;
+ }
+
+ RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
+ if MBTEST(ch == CTLESC || ch == CTLNUL)
+ ret[retind++] = CTLESC;
+ ret[retind++] = ch;
+ continue;
+ }
+
+ /* If this is a shell break character, we are not in a word. If not,
+ we either start or continue a word. */
+ if MBTEST(shellbreak (ch))
+ {
+ tflags &= ~LEX_INWORD;
+/*itrace("parse_comsub:%d: lex_inword -> 0 ch = `%c' (%d)", line_number, ch, __LINE__);*/
+ }
+ else
+ {
+ if (tflags & LEX_INWORD)
+ {
+ lex_wlen++;
+/*itrace("parse_comsub:%d: lex_inword == 1 ch = `%c' lex_wlen = %d (%d)", line_number, ch, lex_wlen, __LINE__);*/
+ }
+ else
+ {
+/*itrace("parse_comsub:%d: lex_inword -> 1 ch = `%c' (%d)", line_number, ch, __LINE__);*/
+ tflags |= LEX_INWORD;
+ lex_wlen = 0;
+ }
+ }
+
+ /* Skip whitespace */
+ if MBTEST(shellblank (ch) && lex_rwlen == 0)
+ {
+ /* Add this character. */
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+ continue;
+ }
+
+ /* Either we are looking for the start of the here-doc delimiter
+ (lex_firstind == -1) or we are reading one (lex_firstind >= 0).
+ If this character is a shell break character and we are reading
+ the delimiter, save it and note that we are now reading a here
+ document. If we've found the start of the delimiter, note it by
+ setting lex_firstind. Backslashes can quote shell metacharacters
+ in here-doc delimiters. */
+ if (tflags & LEX_HEREDELIM)
+ {
+ if (lex_firstind == -1 && shellbreak (ch) == 0)
+ lex_firstind = retind;
+#if 0
+ else if (heredelim && (tflags & LEX_PASSNEXT) == 0 && ch == '\n')
+ {
+ tflags |= LEX_INHEREDOC;
+ tflags &= ~LEX_HEREDELIM;
+ lex_firstind = retind + 1;
+ }
+#endif
+ else if (lex_firstind >= 0 && (tflags & LEX_PASSNEXT) == 0 && shellbreak (ch))
+ {
+ if (heredelim == 0)
+ {
+ nestret = substring (ret, lex_firstind, retind);
+ heredelim = string_quote_removal (nestret, 0);
+ free (nestret);
+ hdlen = STRLEN(heredelim);
+/*itrace("parse_comsub:%d: found here doc delimiter `%s' (%d)", line_number, heredelim, hdlen);*/
+ }
+ if (ch == '\n')
+ {
+ tflags |= LEX_INHEREDOC;
+ tflags &= ~LEX_HEREDELIM;
+ lex_firstind = retind + 1;
+ }
+ else
+ lex_firstind = -1;
+ }
+ }
+
+ /* Meta-characters that can introduce a reserved word. Not perfect yet. */
+ if MBTEST((tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && (shellmeta(ch) || ch == '\n'))
+ {
+ /* Add this character. */
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+ peekc = shell_getc (1);
+ if (ch == peekc && (ch == '&' || ch == '|' || ch == ';')) /* two-character tokens */
+ {
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = peekc;
+/*itrace("parse_comsub:%d: set lex_reswordok = 1, ch = `%c'", line_number, ch);*/
+ tflags |= LEX_RESWDOK;
+ lex_rwlen = 0;
+ continue;
+ }
+ else if (ch == '\n' || COMSUB_META(ch))
+ {
+ shell_ungetc (peekc);
+/*itrace("parse_comsub:%d: set lex_reswordok = 1, ch = `%c'", line_number, ch);*/
+ tflags |= LEX_RESWDOK;
+ lex_rwlen = 0;
+ continue;
+ }
+ else if (ch == EOF)
+ goto eof_error;
+ else
+ {
+ /* `unget' the character we just added and fall through */
+ retind--;
+ shell_ungetc (peekc);
+ }
+ }
+
+ /* If we can read a reserved word, try to read one. */
+ if (tflags & LEX_RESWDOK)
+ {
+ if MBTEST(islower (ch))
+ {
+ /* Add this character. */
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+ lex_rwlen++;
+ continue;
+ }
+ else if MBTEST(lex_rwlen == 4 && shellbreak (ch))
+ {
+ if (STREQN (ret + retind - 4, "case", 4))
+{
+ tflags |= LEX_INCASE;
+/*itrace("parse_comsub:%d: found `case', lex_incase -> 1 lex_reswdok -> 0", line_number);*/
+}
+ else if (STREQN (ret + retind - 4, "esac", 4))
+{
+ tflags &= ~LEX_INCASE;
+/*itrace("parse_comsub:%d: found `esac', lex_incase -> 0 lex_reswdok -> 0", line_number);*/
+}
+ tflags &= ~LEX_RESWDOK;
+ }
+ else if MBTEST((tflags & LEX_CKCOMMENT) && ch == '#' && (lex_rwlen == 0 || ((tflags & LEX_INWORD) && lex_wlen == 0)))
+ ; /* don't modify LEX_RESWDOK if we're starting a comment */
+ else if MBTEST((tflags & LEX_INCASE) && ch != '\n')
+ /* If we can read a reserved word and we're in case, we're at the
+ point where we can read a new pattern list or an esac. We
+ handle the esac case above. If we read a newline, we want to
+ leave LEX_RESWDOK alone. If we read anything else, we want to
+ turn off LEX_RESWDOK, since we're going to read a pattern list. */
+{
+ tflags &= ~LEX_RESWDOK;
+/*itrace("parse_comsub:%d: lex_incase == 1 found `%c', lex_reswordok -> 0", line_number, ch);*/
+}
+ else if MBTEST(shellbreak (ch) == 0)
+{
+ tflags &= ~LEX_RESWDOK;
+/*itrace("parse_comsub:%d: found `%c', lex_reswordok -> 0", line_number, ch);*/
+}
+ }
+
+ /* Might be the start of a here-doc delimiter */
+ if MBTEST((tflags & LEX_INCOMMENT) == 0 && (tflags & LEX_CKCASE) && ch == '<')
+ {
+ /* Add this character. */
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+ peekc = shell_getc (1);
+ if (peekc == EOF)
+ goto eof_error;
+ if (peekc == ch)
+ {
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = peekc;
+ peekc = shell_getc (1);
+ if (peekc == EOF)
+ goto eof_error;
+ if (peekc == '-')
+ {
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = peekc;
+ tflags |= LEX_STRIPDOC;
+ }
+ else
+ shell_ungetc (peekc);
+ if (peekc != '<')
+ {
+ tflags |= LEX_HEREDELIM;
+ lex_firstind = -1;
+ }
+ continue;
+ }
+ else
+ ch = peekc; /* fall through and continue XXX */
+ }
+ else if MBTEST((tflags & LEX_CKCOMMENT) && (tflags & LEX_INCOMMENT) == 0 && ch == '#' && (((tflags & LEX_RESWDOK) && lex_rwlen == 0) || ((tflags & LEX_INWORD) && lex_wlen == 0)))
+{
+/*itrace("parse_comsub:%d: lex_incomment -> 1 (%d)", line_number, __LINE__);*/
+ tflags |= LEX_INCOMMENT;
+}
+
+ if MBTEST(ch == CTLESC || ch == CTLNUL) /* special shell escapes */
+ {
+ RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
+ ret[retind++] = CTLESC;
+ ret[retind++] = ch;
+ continue;
+ }
+#if 0
+ else if MBTEST((tflags & LEX_INCASE) && ch == close && close == ')')
+ tflags &= ~LEX_INCASE; /* XXX */
+#endif
+ else if MBTEST(ch == close && (tflags & LEX_INCASE) == 0) /* ending delimiter */
+{
+ count--;
+/*itrace("parse_comsub:%d: found close: count = %d", line_number, count);*/
+}
+ else if MBTEST(((flags & P_FIRSTCLOSE) == 0) && (tflags & LEX_INCASE) == 0 && ch == open) /* nested begin */
+{
+ count++;
+/*itrace("parse_comsub:%d: found open: count = %d", line_number, count);*/
+}
+
+ /* Add this character. */
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+
+ /* If we just read the ending character, don't bother continuing. */
+ if (count == 0)
+ break;
+
+ if MBTEST(ch == '\\') /* backslashes */
+ tflags |= LEX_PASSNEXT;
+
+ if MBTEST(shellquote (ch))
+ {
+ /* '', ``, or "" inside $(...). */
+ push_delimiter (dstack, ch);
+ if MBTEST((tflags & LEX_WASDOL) && ch == '\'') /* $'...' inside group */
+ nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC|rflags);
+ else
+ nestret = parse_matched_pair (ch, ch, ch, &nestlen, rflags);
+ pop_delimiter (dstack);
+ CHECK_NESTRET_ERROR ();
+
+ if MBTEST((tflags & LEX_WASDOL) && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0))
+ {
+ /* Translate $'...' here. */
+ ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen);
+ xfree (nestret);
+
+ if ((rflags & P_DQUOTE) == 0)
+ {
+ nestret = sh_single_quote (ttrans);
+ free (ttrans);
+ nestlen = strlen (nestret);
+ }
+ else
+ {
+ nestret = ttrans;
+ nestlen = ttranslen;
+ }
+ retind -= 2; /* back up before the $' */
+ }
+ else if MBTEST((tflags & LEX_WASDOL) && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0))
+ {
+ /* Locale expand $"..." here. */
+ ttrans = localeexpand (nestret, 0, nestlen - 1, start_lineno, &ttranslen);
+ xfree (nestret);
+
+ nestret = sh_mkdoublequoted (ttrans, ttranslen, 0);
+ free (ttrans);
+ nestlen = ttranslen + 2;
+ retind -= 2; /* back up before the $" */
+ }
+
+ APPEND_NESTRET ();
+ FREE (nestret);
+ }
+ else if MBTEST((tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
+ /* check for $(), $[], or ${} inside command substitution. */
+ {
+ if ((tflags & LEX_INCASE) == 0 && open == ch) /* undo previous increment */
+ count--;
+ if (ch == '(') /* ) */
+ nestret = parse_comsub (0, '(', ')', &nestlen, (rflags|P_COMMAND) & ~P_DQUOTE);
+ else if (ch == '{') /* } */
+ nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags);
+ else if (ch == '[') /* ] */
+ nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags);
+
+ CHECK_NESTRET_ERROR ();
+ APPEND_NESTRET ();
+
+ FREE (nestret);
+ }
+ if MBTEST(ch == '$')
+ tflags |= LEX_WASDOL;
+ else
+ tflags &= ~LEX_WASDOL;
+ }
+
+ FREE (heredelim);
+ ret[retind] = '\0';
+ if (lenp)
+ *lenp = retind;
+/*itrace("parse_comsub:%d: returning `%s'", line_number, ret);*/
+ return ret;
+}
+
+/* XXX - this needs to handle functionality like subst.c:no_longjmp_on_fatal_error;
+ maybe extract_command_subst should handle it. */
+char *
+xparse_dolparen (base, string, indp, flags)
+ char *base;
+ char *string;
+ int *indp;
+ int flags;
+{
+ sh_parser_state_t ps;
+ int orig_ind, nc, sflags;
+ char *ret, *s, *ep, *ostring;
+
+ /*yydebug = 1;*/
+ orig_ind = *indp;
+ ostring = string;
+
+ sflags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOFREE;
+ if (flags & SX_NOLONGJMP)
+ sflags |= SEVAL_NOLONGJMP;
+ save_parser_state (&ps);
+
+ /*(*/
+ parser_state |= PST_CMDSUBST|PST_EOFTOKEN; /* allow instant ')' */ /*(*/
+ shell_eof_token = ')';
+ parse_string (string, "command substitution", sflags, &ep);
+
+ restore_parser_state (&ps);
+ reset_parser ();
+ if (interactive)
+ token_to_read = 0;
+
+ /* Need to find how many characters parse_and_execute consumed, update
+ *indp, if flags != 0, copy the portion of the string parsed into RET
+ and return it. If flags & 1 (EX_NOALLOC) we can return NULL. */
+
+ /*(*/
+ if (ep[-1] != ')')
+ {
+#if DEBUG
+ if (ep[-1] != '\n')
+ itrace("xparse_dolparen:%d: ep[-1] != RPAREN (%d), ep = `%s'", line_number, ep[-1], ep);
+#endif
+ while (ep > ostring && ep[-1] == '\n') ep--;
+ }
+
+ nc = ep - ostring;
+ *indp = ep - base - 1;
+
+ /*(*/
+#if DEBUG
+ if (base[*indp] != ')')
+ itrace("xparse_dolparen:%d: base[%d] != RPAREN (%d), base = `%s'", line_number, *indp, base[*indp], base);
+#endif
+
+ if (flags & SX_NOALLOC)
+ return (char *)NULL;
+
+ if (nc == 0)
+ {
+ ret = xmalloc (1);
+ ret[0] = '\0';
+ }
+ else
+ ret = substring (ostring, 0, nc - 1);
+
+ return ret;
+}
+
+#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND)
+/* Parse a double-paren construct. It can be either an arithmetic
+ command, an arithmetic `for' command, or a nested subshell. Returns
+ the parsed token, -1 on error, or -2 if we didn't do anything and
+ should just go on. */
+static int
+parse_dparen (c)
+ int c;
+{
+ int cmdtyp, sline;
+ char *wval;
+ WORD_DESC *wd;
+
+#if defined (ARITH_FOR_COMMAND)
+ if (last_read_token == FOR)
+ {
+ arith_for_lineno = line_number;
+ cmdtyp = parse_arith_cmd (&wval, 0);
+ if (cmdtyp == 1)
+ {
+ wd = alloc_word_desc ();
+ wd->word = wval;
+ yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL);
+ return (ARITH_FOR_EXPRS);
+ }
+ else
+ return -1; /* ERROR */
+ }
+#endif
+
+#if defined (DPAREN_ARITHMETIC)
+ if (reserved_word_acceptable (last_read_token))
+ {
+ sline = line_number;
+
+ cmdtyp = parse_arith_cmd (&wval, 0);
+ if (cmdtyp == 1) /* arithmetic command */
+ {
+ wd = alloc_word_desc ();
+ wd->word = wval;
+ wd->flags = W_QUOTED|W_NOSPLIT|W_NOGLOB|W_DQUOTE;
+ yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL);
+ return (ARITH_CMD);
+ }
+ else if (cmdtyp == 0) /* nested subshell */
+ {
+ push_string (wval, 0, (alias_t *)NULL);
+ if ((parser_state & PST_CASEPAT) == 0)
+ parser_state |= PST_SUBSHELL;
+ return (c);
+ }
+ else /* ERROR */
+ return -1;
+ }
+#endif
+
+ return -2; /* XXX */
+}
+
+/* We've seen a `(('. Look for the matching `))'. If we get it, return 1.
+ If not, assume it's a nested subshell for backwards compatibility and
+ return 0. In any case, put the characters we've consumed into a locally-
+ allocated buffer and make *ep point to that buffer. Return -1 on an
+ error, for example EOF. */
+static int
+parse_arith_cmd (ep, adddq)
+ char **ep;
+ int adddq;
+{
+ int exp_lineno, rval, c;
+ char *ttok, *tokstr;
+ int ttoklen;
+
+ exp_lineno = line_number;
+ ttok = parse_matched_pair (0, '(', ')', &ttoklen, 0);
+ rval = 1;
+ if (ttok == &matched_pair_error)
+ return -1;
+ /* Check that the next character is the closing right paren. If
+ not, this is a syntax error. ( */
+ c = shell_getc (0);
+ if MBTEST(c != ')')
+ rval = 0;
+
+ tokstr = (char *)xmalloc (ttoklen + 4);
+
+ /* if ADDDQ != 0 then (( ... )) -> "..." */
+ if (rval == 1 && adddq) /* arith cmd, add double quotes */
+ {
+ tokstr[0] = '"';
+ strncpy (tokstr + 1, ttok, ttoklen - 1);
+ tokstr[ttoklen] = '"';
+ tokstr[ttoklen+1] = '\0';
+ }
+ else if (rval == 1) /* arith cmd, don't add double quotes */
+ {
+ strncpy (tokstr, ttok, ttoklen - 1);
+ tokstr[ttoklen-1] = '\0';
+ }
+ else /* nested subshell */
+ {
+ tokstr[0] = '(';
+ strncpy (tokstr + 1, ttok, ttoklen - 1);
+ tokstr[ttoklen] = ')';
+ tokstr[ttoklen+1] = c;
+ tokstr[ttoklen+2] = '\0';
+ }
+
+ *ep = tokstr;
+ FREE (ttok);
+ return rval;
+}
+#endif /* DPAREN_ARITHMETIC || ARITH_FOR_COMMAND */
+
+#if defined (COND_COMMAND)
+static void
+cond_error ()
+{
+ char *etext;
+
+ if (EOF_Reached && cond_token != COND_ERROR) /* [[ */
+ parser_error (cond_lineno, _("unexpected EOF while looking for `]]'"));
+ else if (cond_token != COND_ERROR)
+ {
+ if (etext = error_token_from_token (cond_token))
+ {
+ parser_error (cond_lineno, _("syntax error in conditional expression: unexpected token `%s'"), etext);
+ free (etext);
+ }
+ else
+ parser_error (cond_lineno, _("syntax error in conditional expression"));
+ }
+}
+
+static COND_COM *
+cond_expr ()
+{
+ return (cond_or ());
+}
+
+static COND_COM *
+cond_or ()
+{
+ COND_COM *l, *r;
+
+ l = cond_and ();
+ if (cond_token == OR_OR)
+ {
+ r = cond_or ();
+ l = make_cond_node (COND_OR, (WORD_DESC *)NULL, l, r);
+ }
+ return l;
+}
+
+static COND_COM *
+cond_and ()
+{
+ COND_COM *l, *r;
+
+ l = cond_term ();
+ if (cond_token == AND_AND)
+ {
+ r = cond_and ();
+ l = make_cond_node (COND_AND, (WORD_DESC *)NULL, l, r);
+ }
+ return l;
+}
+
+static int
+cond_skip_newlines ()
+{
+ while ((cond_token = read_token (READ)) == '\n')
+ {
+ if (SHOULD_PROMPT ())
+ prompt_again ();
+ }
+ return (cond_token);
+}
+
+#define COND_RETURN_ERROR() \
+ do { cond_token = COND_ERROR; return ((COND_COM *)NULL); } while (0)
+
+static COND_COM *
+cond_term ()
+{
+ WORD_DESC *op;
+ COND_COM *term, *tleft, *tright;
+ int tok, lineno;
+ char *etext;
+
+ /* Read a token. It can be a left paren, a `!', a unary operator, or a
+ word that should be the first argument of a binary operator. Start by
+ skipping newlines, since this is a compound command. */
+ tok = cond_skip_newlines ();
+ lineno = line_number;
+ if (tok == COND_END)
+ {
+ COND_RETURN_ERROR ();
+ }
+ else if (tok == '(')
+ {
+ term = cond_expr ();
+ if (cond_token != ')')
+ {
+ if (term)
+ dispose_cond_node (term); /* ( */
+ if (etext = error_token_from_token (cond_token))
+ {
+ parser_error (lineno, _("unexpected token `%s', expected `)'"), etext);
+ free (etext);
+ }
+ else
+ parser_error (lineno, _("expected `)'"));
+ COND_RETURN_ERROR ();
+ }
+ term = make_cond_node (COND_EXPR, (WORD_DESC *)NULL, term, (COND_COM *)NULL);
+ (void)cond_skip_newlines ();
+ }
+ else if (tok == BANG || (tok == WORD && (yylval.word->word[0] == '!' && yylval.word->word[1] == '\0')))
+ {
+ if (tok == WORD)
+ dispose_word (yylval.word); /* not needed */
+ term = cond_term ();
+ if (term)
+ term->flags |= CMD_INVERT_RETURN;
+ }
+ else if (tok == WORD && yylval.word->word[0] == '-' && yylval.word->word[2] == 0 && test_unop (yylval.word->word))
+ {
+ op = yylval.word;
+ tok = read_token (READ);
+ if (tok == WORD)
+ {
+ tleft = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL);
+ term = make_cond_node (COND_UNARY, op, tleft, (COND_COM *)NULL);
+ }
+ else
+ {
+ dispose_word (op);
+ if (etext = error_token_from_token (tok))
+ {
+ parser_error (line_number, _("unexpected argument `%s' to conditional unary operator"), etext);
+ free (etext);
+ }
+ else
+ parser_error (line_number, _("unexpected argument to conditional unary operator"));
+ COND_RETURN_ERROR ();
+ }
+
+ (void)cond_skip_newlines ();
+ }
+ else if (tok == WORD) /* left argument to binary operator */
+ {
+ /* lhs */
+ tleft = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL);
+
+ /* binop */
+ tok = read_token (READ);
+ if (tok == WORD && test_binop (yylval.word->word))
+ {
+ op = yylval.word;
+ if (op->word[0] == '=' && (op->word[1] == '\0' || (op->word[1] == '=' && op->word[2] == '\0')))
+ parser_state |= PST_EXTPAT;
+ else if (op->word[0] == '!' && op->word[1] == '=' && op->word[2] == '\0')
+ parser_state |= PST_EXTPAT;
+ }
+#if defined (COND_REGEXP)
+ else if (tok == WORD && STREQ (yylval.word->word, "=~"))
+ {
+ op = yylval.word;
+ parser_state |= PST_REGEXP;
+ }
+#endif
+ else if (tok == '<' || tok == '>')
+ op = make_word_from_token (tok); /* ( */
+ /* There should be a check before blindly accepting the `)' that we have
+ seen the opening `('. */
+ else if (tok == COND_END || tok == AND_AND || tok == OR_OR || tok == ')')
+ {
+ /* Special case. [[ x ]] is equivalent to [[ -n x ]], just like
+ the test command. Similarly for [[ x && expr ]] or
+ [[ x || expr ]] or [[ (x) ]]. */
+ op = make_word ("-n");
+ term = make_cond_node (COND_UNARY, op, tleft, (COND_COM *)NULL);
+ cond_token = tok;
+ return (term);
+ }
+ else
+ {
+ if (etext = error_token_from_token (tok))
+ {
+ parser_error (line_number, _("unexpected token `%s', conditional binary operator expected"), etext);
+ free (etext);
+ }
+ else
+ parser_error (line_number, _("conditional binary operator expected"));
+ dispose_cond_node (tleft);
+ COND_RETURN_ERROR ();
+ }
+
+ /* rhs */
+ if (parser_state & PST_EXTPAT)
+ extended_glob = 1;
+ tok = read_token (READ);
+ if (parser_state & PST_EXTPAT)
+ extended_glob = global_extglob;
+ parser_state &= ~(PST_REGEXP|PST_EXTPAT);
+
+ if (tok == WORD)
+ {
+ tright = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL);
+ term = make_cond_node (COND_BINARY, op, tleft, tright);
+ }
+ else
+ {
+ if (etext = error_token_from_token (tok))
+ {
+ parser_error (line_number, _("unexpected argument `%s' to conditional binary operator"), etext);
+ free (etext);
+ }
+ else
+ parser_error (line_number, _("unexpected argument to conditional binary operator"));
+ dispose_cond_node (tleft);
+ dispose_word (op);
+ COND_RETURN_ERROR ();
+ }
+
+ (void)cond_skip_newlines ();
+ }
+ else
+ {
+ if (tok < 256)
+ parser_error (line_number, _("unexpected token `%c' in conditional command"), tok);
+ else if (etext = error_token_from_token (tok))
+ {
+ parser_error (line_number, _("unexpected token `%s' in conditional command"), etext);
+ free (etext);
+ }
+ else
+ parser_error (line_number, _("unexpected token %d in conditional command"), tok);
+ COND_RETURN_ERROR ();
+ }
+ return (term);
+}
+
+/* This is kind of bogus -- we slip a mini recursive-descent parser in
+ here to handle the conditional statement syntax. */
+static COMMAND *
+parse_cond_command ()
+{
+ COND_COM *cexp;
+
+ global_extglob = extended_glob;
+ cexp = cond_expr ();
+ return (make_cond_command (cexp));
+}
+#endif
+
+#if defined (ARRAY_VARS)
+/* When this is called, it's guaranteed that we don't care about anything
+ in t beyond i. We do save and restore the chars, though. */
+static int
+token_is_assignment (t, i)
+ char *t;
+ int i;
+{
+ unsigned char c, c1;
+ int r;
+
+ c = t[i]; c1 = t[i+1];
+ t[i] = '='; t[i+1] = '\0';
+ r = assignment (t, (parser_state & PST_COMPASSIGN) != 0);
+ t[i] = c; t[i+1] = c1;
+ return r;
+}
+
+/* XXX - possible changes here for `+=' */
+static int
+token_is_ident (t, i)
+ char *t;
+ int i;
+{
+ unsigned char c;
+ int r;
+
+ c = t[i];
+ t[i] = '\0';
+ r = legal_identifier (t);
+ t[i] = c;
+ return r;
+}
+#endif
+
+static int
+read_token_word (character)
+ int character;
+{
+ /* The value for YYLVAL when a WORD is read. */
+ WORD_DESC *the_word;
+
+ /* Index into the token that we are building. */
+ int token_index;
+
+ /* ALL_DIGITS becomes zero when we see a non-digit. */
+ int all_digit_token;
+
+ /* DOLLAR_PRESENT becomes non-zero if we see a `$'. */
+ int dollar_present;
+
+ /* COMPOUND_ASSIGNMENT becomes non-zero if we are parsing a compound
+ assignment. */
+ int compound_assignment;
+
+ /* QUOTED becomes non-zero if we see one of ("), ('), (`), or (\). */
+ int quoted;
+
+ /* Non-zero means to ignore the value of the next character, and just
+ to add it no matter what. */
+ int pass_next_character;
+
+ /* The current delimiting character. */
+ int cd;
+ int result, peek_char;
+ char *ttok, *ttrans;
+ int ttoklen, ttranslen;
+ intmax_t lvalue;
+
+ if (token_buffer_size < TOKEN_DEFAULT_INITIAL_SIZE)
+ token = (char *)xrealloc (token, token_buffer_size = TOKEN_DEFAULT_INITIAL_SIZE);
+
+ token_index = 0;
+ all_digit_token = DIGIT (character);
+ dollar_present = quoted = pass_next_character = compound_assignment = 0;
+
+ for (;;)
+ {
+ if (character == EOF)
+ goto got_token;
+
+ if (pass_next_character)
+ {
+ pass_next_character = 0;
+ goto got_escaped_character;
+ }
+
+ cd = current_delimiter (dstack);
+
+ /* Handle backslashes. Quote lots of things when not inside of
+ double-quotes, quote some things inside of double-quotes. */
+ if MBTEST(character == '\\')
+ {
+ peek_char = shell_getc (0);
+
+ /* Backslash-newline is ignored in all cases except
+ when quoted with single quotes. */
+ if (peek_char == '\n')
+ {
+ character = '\n';
+ goto next_character;
+ }
+ else
+ {
+ shell_ungetc (peek_char);
+
+ /* If the next character is to be quoted, note it now. */
+ if (cd == 0 || cd == '`' ||
+ (cd == '"' && peek_char >= 0 && (sh_syntaxtab[peek_char] & CBSDQUOTE)))
+ pass_next_character++;
+
+ quoted = 1;
+ goto got_character;
+ }
+ }
+
+ /* Parse a matched pair of quote characters. */
+ if MBTEST(shellquote (character))
+ {
+ push_delimiter (dstack, character);
+ ttok = parse_matched_pair (character, character, character, &ttoklen, (character == '`') ? P_COMMAND : 0);
+ pop_delimiter (dstack);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+ RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2,
+ token_buffer_size, TOKEN_DEFAULT_GROW_SIZE);
+ token[token_index++] = character;
+ strcpy (token + token_index, ttok);
+ token_index += ttoklen;
+ all_digit_token = 0;
+ quoted = 1;
+ dollar_present |= (character == '"' && strchr (ttok, '$') != 0);
+ FREE (ttok);
+ goto next_character;
+ }
+
+#ifdef COND_REGEXP
+ /* When parsing a regexp as a single word inside a conditional command,
+ we need to special-case characters special to both the shell and
+ regular expressions. Right now, that is only '(' and '|'. */ /*)*/
+ if MBTEST((parser_state & PST_REGEXP) && (character == '(' || character == '|')) /*)*/
+ {
+ if (character == '|')
+ goto got_character;
+
+ push_delimiter (dstack, character);
+ ttok = parse_matched_pair (cd, '(', ')', &ttoklen, 0);
+ pop_delimiter (dstack);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+ RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2,
+ token_buffer_size, TOKEN_DEFAULT_GROW_SIZE);
+ token[token_index++] = character;
+ strcpy (token + token_index, ttok);
+ token_index += ttoklen;
+ FREE (ttok);
+ dollar_present = all_digit_token = 0;
+ goto next_character;
+ }
+#endif /* COND_REGEXP */
+
+#ifdef EXTENDED_GLOB
+ /* Parse a ksh-style extended pattern matching specification. */
+ if MBTEST(extended_glob && PATTERN_CHAR (character))
+ {
+ peek_char = shell_getc (1);
+ if MBTEST(peek_char == '(') /* ) */
+ {
+ push_delimiter (dstack, peek_char);
+ ttok = parse_matched_pair (cd, '(', ')', &ttoklen, 0);
+ pop_delimiter (dstack);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+ RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2,
+ token_buffer_size,
+ TOKEN_DEFAULT_GROW_SIZE);
+ token[token_index++] = character;
+ token[token_index++] = peek_char;
+ strcpy (token + token_index, ttok);
+ token_index += ttoklen;
+ FREE (ttok);
+ dollar_present = all_digit_token = 0;
+ goto next_character;
+ }
+ else
+ shell_ungetc (peek_char);
+ }
+#endif /* EXTENDED_GLOB */
+
+ /* If the delimiter character is not single quote, parse some of
+ the shell expansions that must be read as a single word. */
+ if (shellexp (character))
+ {
+ peek_char = shell_getc (1);
+ /* $(...), <(...), >(...), $((...)), ${...}, and $[...] constructs */
+ if MBTEST(peek_char == '(' || \
+ ((peek_char == '{' || peek_char == '[') && character == '$')) /* ) ] } */
+ {
+ if (peek_char == '{') /* } */
+ ttok = parse_matched_pair (cd, '{', '}', &ttoklen, P_FIRSTCLOSE);
+ else if (peek_char == '(') /* ) */
+ {
+ /* XXX - push and pop the `(' as a delimiter for use by
+ the command-oriented-history code. This way newlines
+ appearing in the $(...) string get added to the
+ history literally rather than causing a possibly-
+ incorrect `;' to be added. ) */
+ push_delimiter (dstack, peek_char);
+ ttok = parse_comsub (cd, '(', ')', &ttoklen, P_COMMAND);
+ pop_delimiter (dstack);
+ }
+ else
+ ttok = parse_matched_pair (cd, '[', ']', &ttoklen, 0);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+ RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2,
+ token_buffer_size,
+ TOKEN_DEFAULT_GROW_SIZE);
+ token[token_index++] = character;
+ token[token_index++] = peek_char;
+ strcpy (token + token_index, ttok);
+ token_index += ttoklen;
+ FREE (ttok);
+ dollar_present = 1;
+ all_digit_token = 0;
+ goto next_character;
+ }
+ /* This handles $'...' and $"..." new-style quoted strings. */
+ else if MBTEST(character == '$' && (peek_char == '\'' || peek_char == '"'))
+ {
+ int first_line;
+
+ first_line = line_number;
+ push_delimiter (dstack, peek_char);
+ ttok = parse_matched_pair (peek_char, peek_char, peek_char,
+ &ttoklen,
+ (peek_char == '\'') ? P_ALLOWESC : 0);
+ pop_delimiter (dstack);
+ if (ttok == &matched_pair_error)
+ return -1;
+ if (peek_char == '\'')
+ {
+ ttrans = ansiexpand (ttok, 0, ttoklen - 1, &ttranslen);
+ free (ttok);
+
+ /* Insert the single quotes and correctly quote any
+ embedded single quotes (allowed because P_ALLOWESC was
+ passed to parse_matched_pair). */
+ ttok = sh_single_quote (ttrans);
+ free (ttrans);
+ ttranslen = strlen (ttok);
+ ttrans = ttok;
+ }
+ else
+ {
+ /* Try to locale-expand the converted string. */
+ ttrans = localeexpand (ttok, 0, ttoklen - 1, first_line, &ttranslen);
+ free (ttok);
+
+ /* Add the double quotes back */
+ ttok = sh_mkdoublequoted (ttrans, ttranslen, 0);
+ free (ttrans);
+ ttranslen += 2;
+ ttrans = ttok;
+ }
+
+ RESIZE_MALLOCED_BUFFER (token, token_index, ttranslen + 2,
+ token_buffer_size,
+ TOKEN_DEFAULT_GROW_SIZE);
+ strcpy (token + token_index, ttrans);
+ token_index += ttranslen;
+ FREE (ttrans);
+ quoted = 1;
+ all_digit_token = 0;
+ goto next_character;
+ }
+ /* This could eventually be extended to recognize all of the
+ shell's single-character parameter expansions, and set flags.*/
+ else if MBTEST(character == '$' && peek_char == '$')
+ {
+ ttok = (char *)xmalloc (3);
+ ttok[0] = ttok[1] = '$';
+ ttok[2] = '\0';
+ RESIZE_MALLOCED_BUFFER (token, token_index, 3,
+ token_buffer_size,
+ TOKEN_DEFAULT_GROW_SIZE);
+ strcpy (token + token_index, ttok);
+ token_index += 2;
+ dollar_present = 1;
+ all_digit_token = 0;
+ FREE (ttok);
+ goto next_character;
+ }
+ else
+ shell_ungetc (peek_char);
+ }
+
+#if defined (ARRAY_VARS)
+ /* Identify possible array subscript assignment; match [...]. If
+ parser_state&PST_COMPASSIGN, we need to parse [sub]=words treating
+ `sub' as if it were enclosed in double quotes. */
+ else if MBTEST(character == '[' && /* ] */
+ ((token_index > 0 && assignment_acceptable (last_read_token) && token_is_ident (token, token_index)) ||
+ (token_index == 0 && (parser_state&PST_COMPASSIGN))))
+ {
+ ttok = parse_matched_pair (cd, '[', ']', &ttoklen, P_ARRAYSUB);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+ RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2,
+ token_buffer_size,
+ TOKEN_DEFAULT_GROW_SIZE);
+ token[token_index++] = character;
+ strcpy (token + token_index, ttok);
+ token_index += ttoklen;
+ FREE (ttok);
+ all_digit_token = 0;
+ goto next_character;
+ }
+ /* Identify possible compound array variable assignment. */
+ else if MBTEST(character == '=' && token_index > 0 && (assignment_acceptable (last_read_token) || (parser_state & PST_ASSIGNOK)) && token_is_assignment (token, token_index))
+ {
+ peek_char = shell_getc (1);
+ if MBTEST(peek_char == '(') /* ) */
+ {
+ ttok = parse_compound_assignment (&ttoklen);
+
+ RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 4,
+ token_buffer_size,
+ TOKEN_DEFAULT_GROW_SIZE);
+
+ token[token_index++] = '=';
+ token[token_index++] = '(';
+ if (ttok)
+ {
+ strcpy (token + token_index, ttok);
+ token_index += ttoklen;
+ }
+ token[token_index++] = ')';
+ FREE (ttok);
+ all_digit_token = 0;
+ compound_assignment = 1;
+#if 1
+ goto next_character;
+#else
+ goto got_token; /* ksh93 seems to do this */
+#endif
+ }
+ else
+ shell_ungetc (peek_char);
+ }
+#endif
+
+ /* When not parsing a multi-character word construct, shell meta-
+ characters break words. */
+ if MBTEST(shellbreak (character))
+ {
+ shell_ungetc (character);
+ goto got_token;
+ }
+
+ got_character:
+
+ if (character == CTLESC || character == CTLNUL)
+ token[token_index++] = CTLESC;
+
+ got_escaped_character:
+
+ all_digit_token &= DIGIT (character);
+ dollar_present |= character == '$';
+
+ token[token_index++] = character;
+
+ RESIZE_MALLOCED_BUFFER (token, token_index, 1, token_buffer_size,
+ TOKEN_DEFAULT_GROW_SIZE);
+
+ next_character:
+ if (character == '\n' && SHOULD_PROMPT ())
+ prompt_again ();
+
+ /* We want to remove quoted newlines (that is, a \<newline> pair)
+ unless we are within single quotes or pass_next_character is
+ set (the shell equivalent of literal-next). */
+ cd = current_delimiter (dstack);
+ character = shell_getc (cd != '\'' && pass_next_character == 0);
+ } /* end for (;;) */
+
+got_token:
+
+ token[token_index] = '\0';
+
+ /* Check to see what thing we should return. If the last_read_token
+ is a `<', or a `&', or the character which ended this token is
+ a '>' or '<', then, and ONLY then, is this input token a NUMBER.
+ Otherwise, it is just a word, and should be returned as such. */
+ if MBTEST(all_digit_token && (character == '<' || character == '>' || \
+ last_read_token == LESS_AND || \
+ last_read_token == GREATER_AND))
+ {
+ if (legal_number (token, &lvalue) && (int)lvalue == lvalue)
+ yylval.number = lvalue;
+ else
+ yylval.number = -1;
+ return (NUMBER);
+ }
+
+ /* Check for special case tokens. */
+ result = (last_shell_getc_is_singlebyte) ? special_case_tokens (token) : -1;
+ if (result >= 0)
+ return result;
+
+#if defined (ALIAS)
+ /* Posix.2 does not allow reserved words to be aliased, so check for all
+ of them, including special cases, before expanding the current token
+ as an alias. */
+ if MBTEST(posixly_correct)
+ CHECK_FOR_RESERVED_WORD (token);
+
+ /* Aliases are expanded iff EXPAND_ALIASES is non-zero, and quoting
+ inhibits alias expansion. */
+ if (expand_aliases && quoted == 0)
+ {
+ result = alias_expand_token (token);
+ if (result == RE_READ_TOKEN)
+ return (RE_READ_TOKEN);
+ else if (result == NO_EXPANSION)
+ parser_state &= ~PST_ALEXPNEXT;
+ }
+
+ /* If not in Posix.2 mode, check for reserved words after alias
+ expansion. */
+ if MBTEST(posixly_correct == 0)
+#endif
+ CHECK_FOR_RESERVED_WORD (token);
+
+ the_word = (WORD_DESC *)xmalloc (sizeof (WORD_DESC));
+ the_word->word = (char *)xmalloc (1 + token_index);
+ the_word->flags = 0;
+ strcpy (the_word->word, token);
+ if (dollar_present)
+ the_word->flags |= W_HASDOLLAR;
+ if (quoted)
+ the_word->flags |= W_QUOTED; /*(*/
+ if (compound_assignment && token[token_index-1] == ')')
+ the_word->flags |= W_COMPASSIGN;
+ /* A word is an assignment if it appears at the beginning of a
+ simple command, or after another assignment word. This is
+ context-dependent, so it cannot be handled in the grammar. */
+ if (assignment (token, (parser_state & PST_COMPASSIGN) != 0))
+ {
+ the_word->flags |= W_ASSIGNMENT;
+ /* Don't perform word splitting on assignment statements. */
+ if (assignment_acceptable (last_read_token) || (parser_state & PST_COMPASSIGN) != 0)
+ the_word->flags |= W_NOSPLIT;
+ }
+
+ if (command_token_position (last_read_token))
+ {
+ struct builtin *b;
+ b = builtin_address_internal (token, 0);
+ if (b && (b->flags & ASSIGNMENT_BUILTIN))
+ parser_state |= PST_ASSIGNOK;
+ else if (STREQ (token, "eval") || STREQ (token, "let"))
+ parser_state |= PST_ASSIGNOK;
+ }
+
+ yylval.word = the_word;
+
+ if (token[0] == '{' && token[token_index-1] == '}' &&
+ (character == '<' || character == '>'))
+ {
+ /* can use token; already copied to the_word */
+ token[token_index-1] = '\0';
+ if (legal_identifier (token+1))
+ {
+ strcpy (the_word->word, token+1);
+/*itrace("read_token_word: returning REDIR_WORD for %s", the_word->word);*/
+ return (REDIR_WORD);
+ }
+ }
+
+ result = ((the_word->flags & (W_ASSIGNMENT|W_NOSPLIT)) == (W_ASSIGNMENT|W_NOSPLIT))
+ ? ASSIGNMENT_WORD : WORD;
+
+ switch (last_read_token)
+ {
+ case FUNCTION:
+ parser_state |= PST_ALLOWOPNBRC;
+ function_dstart = line_number;
+ break;
+ case CASE:
+ case SELECT:
+ case FOR:
+ if (word_top < MAX_CASE_NEST)
+ word_top++;
+ word_lineno[word_top] = line_number;
+ break;
+ }
+
+ return (result);
+}
+
+/* Return 1 if TOKSYM is a token that after being read would allow
+ a reserved word to be seen, else 0. */
+static int
+reserved_word_acceptable (toksym)
+ int toksym;
+{
+ switch (toksym)
+ {
+ case '\n':
+ case ';':
+ case '(':
+ case ')':
+ case '|':
+ case '&':
+ case '{':
+ case '}': /* XXX */
+ case AND_AND:
+ case BANG:
+ case BAR_AND:
+ case DO:
+ case DONE:
+ case ELIF:
+ case ELSE:
+ case ESAC:
+ case FI:
+ case IF:
+ case OR_OR:
+ case SEMI_SEMI:
+ case SEMI_AND:
+ case SEMI_SEMI_AND:
+ case THEN:
+ case TIME:
+ case TIMEOPT:
+ case COPROC:
+ case UNTIL:
+ case WHILE:
+ case 0:
+ return 1;
+ default:
+#if defined (COPROCESS_SUPPORT)
+ if (last_read_token == WORD && token_before_that == COPROC)
+ return 1;
+#endif
+ return 0;
+ }
+}
+
+/* Return the index of TOKEN in the alist of reserved words, or -1 if
+ TOKEN is not a shell reserved word. */
+int
+find_reserved_word (tokstr)
+ char *tokstr;
+{
+ int i;
+ for (i = 0; word_token_alist[i].word; i++)
+ if (STREQ (tokstr, word_token_alist[i].word))
+ return i;
+ return -1;
+}
+
+#if 0
+#if defined (READLINE)
+/* Called after each time readline is called. This insures that whatever
+ the new prompt string is gets propagated to readline's local prompt
+ variable. */
+static void
+reset_readline_prompt ()
+{
+ char *temp_prompt;
+
+ if (prompt_string_pointer)
+ {
+ temp_prompt = (*prompt_string_pointer)
+ ? decode_prompt_string (*prompt_string_pointer)
+ : (char *)NULL;
+
+ if (temp_prompt == 0)
+ {
+ temp_prompt = (char *)xmalloc (1);
+ temp_prompt[0] = '\0';
+ }
+
+ FREE (current_readline_prompt);
+ current_readline_prompt = temp_prompt;
+ }
+}
+#endif /* READLINE */
+#endif /* 0 */
+
+#if defined (HISTORY)
+/* A list of tokens which can be followed by newlines, but not by
+ semi-colons. When concatenating multiple lines of history, the
+ newline separator for such tokens is replaced with a space. */
+static const int no_semi_successors[] = {
+ '\n', '{', '(', ')', ';', '&', '|',
+ CASE, DO, ELSE, IF, SEMI_SEMI, SEMI_AND, SEMI_SEMI_AND, THEN, UNTIL,
+ WHILE, AND_AND, OR_OR, IN,
+ 0
+};
+
+/* If we are not within a delimited expression, try to be smart
+ about which separators can be semi-colons and which must be
+ newlines. Returns the string that should be added into the
+ history entry. */
+char *
+history_delimiting_chars ()
+{
+ register int i;
+
+ if (dstack.delimiter_depth != 0)
+ return ("\n");
+
+ /* We look for current_command_line_count == 2 because we are looking to
+ add the first line of the body of the here document (the second line
+ of the command). */
+ if (parser_state & PST_HEREDOC)
+ return (current_command_line_count == 2 ? "\n" : "");
+
+ /* First, handle some special cases. */
+ /*(*/
+ /* If we just read `()', assume it's a function definition, and don't
+ add a semicolon. If the token before the `)' was not `(', and we're
+ not in the midst of parsing a case statement, assume it's a
+ parenthesized command and add the semicolon. */
+ /*)(*/
+ if (token_before_that == ')')
+ {
+ if (two_tokens_ago == '(') /*)*/ /* function def */
+ return " ";
+ /* This does not work for subshells inside case statement
+ command lists. It's a suboptimal solution. */
+ else if (parser_state & PST_CASESTMT) /* case statement pattern */
+ return " ";
+ else
+ return "; "; /* (...) subshell */
+ }
+ else if (token_before_that == WORD && two_tokens_ago == FUNCTION)
+ return " "; /* function def using `function name' without `()' */
+
+ else if (token_before_that == WORD && two_tokens_ago == FOR)
+ {
+ /* Tricky. `for i\nin ...' should not have a semicolon, but
+ `for i\ndo ...' should. We do what we can. */
+ for (i = shell_input_line_index; whitespace (shell_input_line[i]); i++)
+ ;
+ if (shell_input_line[i] && shell_input_line[i] == 'i' && shell_input_line[i+1] == 'n')
+ return " ";
+ return ";";
+ }
+ else if (two_tokens_ago == CASE && token_before_that == WORD && (parser_state & PST_CASESTMT))
+ return " ";
+
+ for (i = 0; no_semi_successors[i]; i++)
+ {
+ if (token_before_that == no_semi_successors[i])
+ return (" ");
+ }
+
+ return ("; ");
+}
+#endif /* HISTORY */
+
+/* Issue a prompt, or prepare to issue a prompt when the next character
+ is read. */
+static void
+prompt_again ()
+{
+ char *temp_prompt;
+
+ if (interactive == 0 || expanding_alias ()) /* XXX */
+ return;
+
+ ps1_prompt = get_string_value ("PS1");
+ ps2_prompt = get_string_value ("PS2");
+
+ if (!prompt_string_pointer)
+ prompt_string_pointer = &ps1_prompt;
+
+ temp_prompt = *prompt_string_pointer
+ ? decode_prompt_string (*prompt_string_pointer)
+ : (char *)NULL;
+
+ if (temp_prompt == 0)
+ {
+ temp_prompt = (char *)xmalloc (1);
+ temp_prompt[0] = '\0';
+ }
+
+ current_prompt_string = *prompt_string_pointer;
+ prompt_string_pointer = &ps2_prompt;
+
+#if defined (READLINE)
+ if (!no_line_editing)
+ {
+ FREE (current_readline_prompt);
+ current_readline_prompt = temp_prompt;
+ }
+ else
+#endif /* READLINE */
+ {
+ FREE (current_decoded_prompt);
+ current_decoded_prompt = temp_prompt;
+ }
+}
+
+int
+get_current_prompt_level ()
+{
+ return ((current_prompt_string && current_prompt_string == ps2_prompt) ? 2 : 1);
+}
+
+void
+set_current_prompt_level (x)
+ int x;
+{
+ prompt_string_pointer = (x == 2) ? &ps2_prompt : &ps1_prompt;
+ current_prompt_string = *prompt_string_pointer;
+}
+
+static void
+print_prompt ()
+{
+ fprintf (stderr, "%s", current_decoded_prompt);
+ fflush (stderr);
+}
+
+/* Return a string which will be printed as a prompt. The string
+ may contain special characters which are decoded as follows:
+
+ \a bell (ascii 07)
+ \d the date in Day Mon Date format
+ \e escape (ascii 033)
+ \h the hostname up to the first `.'
+ \H the hostname
+ \j the number of active jobs
+ \l the basename of the shell's tty device name
+ \n CRLF
+ \r CR
+ \s the name of the shell
+ \t the time in 24-hour hh:mm:ss format
+ \T the time in 12-hour hh:mm:ss format
+ \@ the time in 12-hour hh:mm am/pm format
+ \A the time in 24-hour hh:mm format
+ \D{fmt} the result of passing FMT to strftime(3)
+ \u your username
+ \v the version of bash (e.g., 2.00)
+ \V the release of bash, version + patchlevel (e.g., 2.00.0)
+ \w the current working directory
+ \W the last element of $PWD
+ \! the history number of this command
+ \# the command number of this command
+ \$ a $ or a # if you are root
+ \nnn character code nnn in octal
+ \\ a backslash
+ \[ begin a sequence of non-printing chars
+ \] end a sequence of non-printing chars
+*/
+#define PROMPT_GROWTH 48
+char *
+decode_prompt_string (string)
+ char *string;
+{
+ WORD_LIST *list;
+ char *result, *t;
+ struct dstack save_dstack;
+ int last_exit_value, last_comsub_pid;
+#if defined (PROMPT_STRING_DECODE)
+ int result_size, result_index;
+ int c, n, i;
+ char *temp, octal_string[4];
+ struct tm *tm;
+ time_t the_time;
+ char timebuf[128];
+ char *timefmt;
+
+ result = (char *)xmalloc (result_size = PROMPT_GROWTH);
+ result[result_index = 0] = 0;
+ temp = (char *)NULL;
+
+ while (c = *string++)
+ {
+ if (posixly_correct && c == '!')
+ {
+ if (*string == '!')
+ {
+ temp = savestring ("!");
+ goto add_string;
+ }
+ else
+ {
+#if !defined (HISTORY)
+ temp = savestring ("1");
+#else /* HISTORY */
+ temp = itos (history_number ());
+#endif /* HISTORY */
+ string--; /* add_string increments string again. */
+ goto add_string;
+ }
+ }
+ if (c == '\\')
+ {
+ c = *string;
+
+ switch (c)
+ {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ strncpy (octal_string, string, 3);
+ octal_string[3] = '\0';
+
+ n = read_octal (octal_string);
+ temp = (char *)xmalloc (3);
+
+ if (n == CTLESC || n == CTLNUL)
+ {
+ temp[0] = CTLESC;
+ temp[1] = n;
+ temp[2] = '\0';
+ }
+ else if (n == -1)
+ {
+ temp[0] = '\\';
+ temp[1] = '\0';
+ }
+ else
+ {
+ temp[0] = n;
+ temp[1] = '\0';
+ }
+
+ for (c = 0; n != -1 && c < 3 && ISOCTAL (*string); c++)
+ string++;
+
+ c = 0; /* tested at add_string: */
+ goto add_string;
+
+ case 'd':
+ case 't':
+ case 'T':
+ case '@':
+ case 'A':
+ /* Make the current time/date into a string. */
+ (void) time (&the_time);
+ tm = localtime (&the_time);
+
+ if (c == 'd')
+ n = strftime (timebuf, sizeof (timebuf), "%a %b %d", tm);
+ else if (c == 't')
+ n = strftime (timebuf, sizeof (timebuf), "%H:%M:%S", tm);
+ else if (c == 'T')
+ n = strftime (timebuf, sizeof (timebuf), "%I:%M:%S", tm);
+ else if (c == '@')
+ n = strftime (timebuf, sizeof (timebuf), "%I:%M %p", tm);
+ else if (c == 'A')
+ n = strftime (timebuf, sizeof (timebuf), "%H:%M", tm);
+
+ if (n == 0)
+ timebuf[0] = '\0';
+ else
+ timebuf[sizeof(timebuf) - 1] = '\0';
+
+ temp = savestring (timebuf);
+ goto add_string;
+
+ case 'D': /* strftime format */
+ if (string[1] != '{') /* } */
+ goto not_escape;
+
+ (void) time (&the_time);
+ tm = localtime (&the_time);
+ string += 2; /* skip { */
+ timefmt = xmalloc (strlen (string) + 3);
+ for (t = timefmt; *string && *string != '}'; )
+ *t++ = *string++;
+ *t = '\0';
+ c = *string; /* tested at add_string */
+ if (timefmt[0] == '\0')
+ {
+ timefmt[0] = '%';
+ timefmt[1] = 'X'; /* locale-specific current time */
+ timefmt[2] = '\0';
+ }
+ n = strftime (timebuf, sizeof (timebuf), timefmt, tm);
+ free (timefmt);
+
+ if (n == 0)
+ timebuf[0] = '\0';
+ else
+ timebuf[sizeof(timebuf) - 1] = '\0';
+
+ if (promptvars || posixly_correct)
+ /* Make sure that expand_prompt_string is called with a
+ second argument of Q_DOUBLE_QUOTES if we use this
+ function here. */
+ temp = sh_backslash_quote_for_double_quotes (timebuf);
+ else
+ temp = savestring (timebuf);
+ goto add_string;
+
+ case 'n':
+ temp = (char *)xmalloc (3);
+ temp[0] = no_line_editing ? '\n' : '\r';
+ temp[1] = no_line_editing ? '\0' : '\n';
+ temp[2] = '\0';
+ goto add_string;
+
+ case 's':
+ temp = base_pathname (shell_name);
+ temp = savestring (temp);
+ goto add_string;
+
+ case 'v':
+ case 'V':
+ temp = (char *)xmalloc (16);
+ if (c == 'v')
+ strcpy (temp, dist_version);
+ else
+ sprintf (temp, "%s.%d", dist_version, patch_level);
+ goto add_string;
+
+ case 'w':
+ case 'W':
+ {
+ /* Use the value of PWD because it is much more efficient. */
+ char t_string[PATH_MAX];
+ int tlen;
+
+ temp = get_string_value ("PWD");
+
+ if (temp == 0)
+ {
+ if (getcwd (t_string, sizeof(t_string)) == 0)
+ {
+ t_string[0] = '.';
+ tlen = 1;
+ }
+ else
+ tlen = strlen (t_string);
+ }
+ else
+ {
+ tlen = sizeof (t_string) - 1;
+ strncpy (t_string, temp, tlen);
+ }
+ t_string[tlen] = '\0';
+
+#if defined (MACOSX)
+ /* Convert from "fs" format to "input" format */
+ temp = fnx_fromfs (t_string, strlen (t_string));
+ if (temp != t_string)
+ strcpy (t_string, temp);
+#endif
+
+#define ROOT_PATH(x) ((x)[0] == '/' && (x)[1] == 0)
+#define DOUBLE_SLASH_ROOT(x) ((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0)
+ /* Abbreviate \W as ~ if $PWD == $HOME */
+ if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, t_string) == 0))
+ {
+ if (ROOT_PATH (t_string) == 0 && DOUBLE_SLASH_ROOT (t_string) == 0)
+ {
+ t = strrchr (t_string, '/');
+ if (t)
+ strcpy (t_string, t + 1);
+ }
+ }
+#undef ROOT_PATH
+#undef DOUBLE_SLASH_ROOT
+ else
+ /* polite_directory_format is guaranteed to return a string
+ no longer than PATH_MAX - 1 characters. */
+ strcpy (t_string, polite_directory_format (t_string));
+
+ temp = trim_pathname (t_string, PATH_MAX - 1);
+ /* If we're going to be expanding the prompt string later,
+ quote the directory name. */
+ if (promptvars || posixly_correct)
+ /* Make sure that expand_prompt_string is called with a
+ second argument of Q_DOUBLE_QUOTES if we use this
+ function here. */
+ temp = sh_backslash_quote_for_double_quotes (t_string);
+ else
+ temp = savestring (t_string);
+
+ goto add_string;
+ }
+
+ case 'u':
+ if (current_user.user_name == 0)
+ get_current_user_info ();
+ temp = savestring (current_user.user_name);
+ goto add_string;
+
+ case 'h':
+ case 'H':
+ temp = savestring (current_host_name);
+ if (c == 'h' && (t = (char *)strchr (temp, '.')))
+ *t = '\0';
+ goto add_string;
+
+ case '#':
+ temp = itos (current_command_number);
+ goto add_string;
+
+ case '!':
+#if !defined (HISTORY)
+ temp = savestring ("1");
+#else /* HISTORY */
+ temp = itos (history_number ());
+#endif /* HISTORY */
+ goto add_string;
+
+ case '$':
+ t = temp = (char *)xmalloc (3);
+ if ((promptvars || posixly_correct) && (current_user.euid != 0))
+ *t++ = '\\';
+ *t++ = current_user.euid == 0 ? '#' : '$';
+ *t = '\0';
+ goto add_string;
+
+ case 'j':
+ temp = itos (count_all_jobs ());
+ goto add_string;
+
+ case 'l':
+#if defined (HAVE_TTYNAME)
+ temp = (char *)ttyname (fileno (stdin));
+ t = temp ? base_pathname (temp) : "tty";
+ temp = savestring (t);
+#else
+ temp = savestring ("tty");
+#endif /* !HAVE_TTYNAME */
+ goto add_string;
+
+#if defined (READLINE)
+ case '[':
+ case ']':
+ if (no_line_editing)
+ {
+ string++;
+ break;
+ }
+ temp = (char *)xmalloc (3);
+ n = (c == '[') ? RL_PROMPT_START_IGNORE : RL_PROMPT_END_IGNORE;
+ i = 0;
+ if (n == CTLESC || n == CTLNUL)
+ temp[i++] = CTLESC;
+ temp[i++] = n;
+ temp[i] = '\0';
+ goto add_string;
+#endif /* READLINE */
+
+ case '\\':
+ case 'a':
+ case 'e':
+ case 'r':
+ temp = (char *)xmalloc (2);
+ if (c == 'a')
+ temp[0] = '\07';
+ else if (c == 'e')
+ temp[0] = '\033';
+ else if (c == 'r')
+ temp[0] = '\r';
+ else /* (c == '\\') */
+ temp[0] = c;
+ temp[1] = '\0';
+ goto add_string;
+
+ default:
+not_escape:
+ temp = (char *)xmalloc (3);
+ temp[0] = '\\';
+ temp[1] = c;
+ temp[2] = '\0';
+
+ add_string:
+ if (c)
+ string++;
+ result =
+ sub_append_string (temp, result, &result_index, &result_size);
+ temp = (char *)NULL; /* Freed in sub_append_string (). */
+ result[result_index] = '\0';
+ break;
+ }
+ }
+ else
+ {
+ RESIZE_MALLOCED_BUFFER (result, result_index, 3, result_size, PROMPT_GROWTH);
+ result[result_index++] = c;
+ result[result_index] = '\0';
+ }
+ }
+#else /* !PROMPT_STRING_DECODE */
+ result = savestring (string);
+#endif /* !PROMPT_STRING_DECODE */
+
+ /* Save the delimiter stack and point `dstack' to temp space so any
+ command substitutions in the prompt string won't result in screwing
+ up the parser's quoting state. */
+ save_dstack = dstack;
+ dstack = temp_dstack;
+ dstack.delimiter_depth = 0;
+
+ /* Perform variable and parameter expansion and command substitution on
+ the prompt string. */
+ if (promptvars || posixly_correct)
+ {
+ last_exit_value = last_command_exit_value;
+ last_comsub_pid = last_command_subst_pid;
+ list = expand_prompt_string (result, Q_DOUBLE_QUOTES, 0);
+ free (result);
+ result = string_list (list);
+ dispose_words (list);
+ last_command_exit_value = last_exit_value;
+ last_command_subst_pid = last_comsub_pid;
+ }
+ else
+ {
+ t = dequote_string (result);
+ free (result);
+ result = t;
+ }
+
+ dstack = save_dstack;
+
+ return (result);
+}
+
+/************************************************
+ * *
+ * ERROR HANDLING *
+ * *
+ ************************************************/
+
+/* Report a syntax error, and restart the parser. Call here for fatal
+ errors. */
+int
+yyerror (msg)
+ const char *msg;
+{
+ report_syntax_error ((char *)NULL);
+ reset_parser ();
+ return (0);
+}
+
+static char *
+error_token_from_token (tok)
+ int tok;
+{
+ char *t;
+
+ if (t = find_token_in_alist (tok, word_token_alist, 0))
+ return t;
+
+ if (t = find_token_in_alist (tok, other_token_alist, 0))
+ return t;
+
+ t = (char *)NULL;
+ /* This stuff is dicy and needs closer inspection */
+ switch (current_token)
+ {
+ case WORD:
+ case ASSIGNMENT_WORD:
+ if (yylval.word)
+ t = savestring (yylval.word->word);
+ break;
+ case NUMBER:
+ t = itos (yylval.number);
+ break;
+ case ARITH_CMD:
+ if (yylval.word_list)
+ t = string_list (yylval.word_list);
+ break;
+ case ARITH_FOR_EXPRS:
+ if (yylval.word_list)
+ t = string_list_internal (yylval.word_list, " ; ");
+ break;
+ case COND_CMD:
+ t = (char *)NULL; /* punt */
+ break;
+ }
+
+ return t;
+}
+
+static char *
+error_token_from_text ()
+{
+ char *msg, *t;
+ int token_end, i;
+
+ t = shell_input_line;
+ i = shell_input_line_index;
+ token_end = 0;
+ msg = (char *)NULL;
+
+ if (i && t[i] == '\0')
+ i--;
+
+ while (i && (whitespace (t[i]) || t[i] == '\n'))
+ i--;
+
+ if (i)
+ token_end = i + 1;
+
+ while (i && (member (t[i], " \n\t;|&") == 0))
+ i--;
+
+ while (i != token_end && (whitespace (t[i]) || t[i] == '\n'))
+ i++;
+
+ /* Return our idea of the offending token. */
+ if (token_end || (i == 0 && token_end == 0))
+ {
+ if (token_end)
+ msg = substring (t, i, token_end);
+ else /* one-character token */
+ {
+ msg = (char *)xmalloc (2);
+ msg[0] = t[i];
+ msg[1] = '\0';
+ }
+ }
+
+ return (msg);
+}
+
+static void
+print_offending_line ()
+{
+ char *msg;
+ int token_end;
+
+ msg = savestring (shell_input_line);
+ token_end = strlen (msg);
+ while (token_end && msg[token_end - 1] == '\n')
+ msg[--token_end] = '\0';
+
+ parser_error (line_number, "`%s'", msg);
+ free (msg);
+}
+
+/* Report a syntax error with line numbers, etc.
+ Call here for recoverable errors. If you have a message to print,
+ then place it in MESSAGE, otherwise pass NULL and this will figure
+ out an appropriate message for you. */
+static void
+report_syntax_error (message)
+ char *message;
+{
+ char *msg;
+
+ if (message)
+ {
+ parser_error (line_number, "%s", message);
+ if (interactive && EOF_Reached)
+ EOF_Reached = 0;
+ last_command_exit_value = parse_and_execute_level ? EX_BADSYNTAX : EX_BADUSAGE;
+ return;
+ }
+
+ /* If the line of input we're reading is not null, try to find the
+ objectionable token. First, try to figure out what token the
+ parser's complaining about by looking at current_token. */
+ if (current_token != 0 && EOF_Reached == 0 && (msg = error_token_from_token (current_token)))
+ {
+ parser_error (line_number, _("syntax error near unexpected token `%s'"), msg);
+ free (msg);
+
+ if (interactive == 0)
+ print_offending_line ();
+
+ last_command_exit_value = parse_and_execute_level ? EX_BADSYNTAX : EX_BADUSAGE;
+ return;
+ }
+
+ /* If looking at the current token doesn't prove fruitful, try to find the
+ offending token by analyzing the text of the input line near the current
+ input line index and report what we find. */
+ if (shell_input_line && *shell_input_line)
+ {
+ msg = error_token_from_text ();
+ if (msg)
+ {
+ parser_error (line_number, _("syntax error near `%s'"), msg);
+ free (msg);
+ }
+
+ /* If not interactive, print the line containing the error. */
+ if (interactive == 0)
+ print_offending_line ();
+ }
+ else
+ {
+ msg = EOF_Reached ? _("syntax error: unexpected end of file") : _("syntax error");
+ parser_error (line_number, "%s", msg);
+ /* When the shell is interactive, this file uses EOF_Reached
+ only for error reporting. Other mechanisms are used to
+ decide whether or not to exit. */
+ if (interactive && EOF_Reached)
+ EOF_Reached = 0;
+ }
+
+ last_command_exit_value = parse_and_execute_level ? EX_BADSYNTAX : EX_BADUSAGE;
+}
+
+/* ??? Needed function. ??? We have to be able to discard the constructs
+ created during parsing. In the case of error, we want to return
+ allocated objects to the memory pool. In the case of no error, we want
+ to throw away the information about where the allocated objects live.
+ (dispose_command () will actually free the command.) */
+static void
+discard_parser_constructs (error_p)
+ int error_p;
+{
+}
+
+/************************************************
+ * *
+ * EOF HANDLING *
+ * *
+ ************************************************/
+
+/* Do that silly `type "bye" to exit' stuff. You know, "ignoreeof". */
+
+/* A flag denoting whether or not ignoreeof is set. */
+int ignoreeof = 0;
+
+/* The number of times that we have encountered an EOF character without
+ another character intervening. When this gets above the limit, the
+ shell terminates. */
+int eof_encountered = 0;
+
+/* The limit for eof_encountered. */
+int eof_encountered_limit = 10;
+
+/* If we have EOF as the only input unit, this user wants to leave
+ the shell. If the shell is not interactive, then just leave.
+ Otherwise, if ignoreeof is set, and we haven't done this the
+ required number of times in a row, print a message. */
+static void
+handle_eof_input_unit ()
+{
+ if (interactive)
+ {
+ /* shell.c may use this to decide whether or not to write out the
+ history, among other things. We use it only for error reporting
+ in this file. */
+ if (EOF_Reached)
+ EOF_Reached = 0;
+
+ /* If the user wants to "ignore" eof, then let her do so, kind of. */
+ if (ignoreeof)
+ {
+ if (eof_encountered < eof_encountered_limit)
+ {
+ fprintf (stderr, _("Use \"%s\" to leave the shell.\n"),
+ login_shell ? "logout" : "exit");
+ eof_encountered++;
+ /* Reset the parsing state. */
+ last_read_token = current_token = '\n';
+ /* Reset the prompt string to be $PS1. */
+ prompt_string_pointer = (char **)NULL;
+ prompt_again ();
+ return;
+ }
+ }
+
+ /* In this case EOF should exit the shell. Do it now. */
+ reset_parser ();
+ exit_builtin ((WORD_LIST *)NULL);
+ }
+ else
+ {
+ /* We don't write history files, etc., for non-interactive shells. */
+ EOF_Reached = 1;
+ }
+}
+
+/************************************************
+ * *
+ * STRING PARSING FUNCTIONS *
+ * *
+ ************************************************/
+
+/* It's very important that these two functions treat the characters
+ between ( and ) identically. */
+
+static WORD_LIST parse_string_error;
+
+/* Take a string and run it through the shell parser, returning the
+ resultant word list. Used by compound array assignment. */
+WORD_LIST *
+parse_string_to_word_list (s, flags, whom)
+ char *s;
+ int flags;
+ const char *whom;
+{
+ WORD_LIST *wl;
+ int tok, orig_current_token, orig_line_number, orig_input_terminator;
+ int orig_line_count;
+ int old_echo_input, old_expand_aliases;
+#if defined (HISTORY)
+ int old_remember_on_history, old_history_expansion_inhibited;
+#endif
+
+#if defined (HISTORY)
+ old_remember_on_history = remember_on_history;
+# if defined (BANG_HISTORY)
+ old_history_expansion_inhibited = history_expansion_inhibited;
+# endif
+ bash_history_disable ();
+#endif
+
+ orig_line_number = line_number;
+ orig_line_count = current_command_line_count;
+ orig_input_terminator = shell_input_line_terminator;
+ old_echo_input = echo_input_at_read;
+ old_expand_aliases = expand_aliases;
+
+ push_stream (1);
+ last_read_token = WORD; /* WORD to allow reserved words here */
+ current_command_line_count = 0;
+ echo_input_at_read = expand_aliases = 0;
+
+ with_input_from_string (s, whom);
+ wl = (WORD_LIST *)NULL;
+
+ if (flags & 1)
+ parser_state |= PST_COMPASSIGN|PST_REPARSE;
+
+ while ((tok = read_token (READ)) != yacc_EOF)
+ {
+ if (tok == '\n' && *bash_input.location.string == '\0')
+ break;
+ if (tok == '\n') /* Allow newlines in compound assignments */
+ continue;
+ if (tok != WORD && tok != ASSIGNMENT_WORD)
+ {
+ line_number = orig_line_number + line_number - 1;
+ orig_current_token = current_token;
+ current_token = tok;
+ yyerror (NULL); /* does the right thing */
+ current_token = orig_current_token;
+ if (wl)
+ dispose_words (wl);
+ wl = &parse_string_error;
+ break;
+ }
+ wl = make_word_list (yylval.word, wl);
+ }
+
+ last_read_token = '\n';
+ pop_stream ();
+
+#if defined (HISTORY)
+ remember_on_history = old_remember_on_history;
+# if defined (BANG_HISTORY)
+ history_expansion_inhibited = old_history_expansion_inhibited;
+# endif /* BANG_HISTORY */
+#endif /* HISTORY */
+
+ echo_input_at_read = old_echo_input;
+ expand_aliases = old_expand_aliases;
+
+ current_command_line_count = orig_line_count;
+ shell_input_line_terminator = orig_input_terminator;
+
+ if (flags & 1)
+ parser_state &= ~(PST_COMPASSIGN|PST_REPARSE);
+
+ if (wl == &parse_string_error)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ if (interactive_shell == 0 && posixly_correct)
+ jump_to_top_level (FORCE_EOF);
+ else
+ jump_to_top_level (DISCARD);
+ }
+
+ return (REVERSE_LIST (wl, WORD_LIST *));
+}
+
+static char *
+parse_compound_assignment (retlenp)
+ int *retlenp;
+{
+ WORD_LIST *wl, *rl;
+ int tok, orig_line_number, orig_token_size, orig_last_token, assignok;
+ char *saved_token, *ret;
+
+ saved_token = token;
+ orig_token_size = token_buffer_size;
+ orig_line_number = line_number;
+ orig_last_token = last_read_token;
+
+ last_read_token = WORD; /* WORD to allow reserved words here */
+
+ token = (char *)NULL;
+ token_buffer_size = 0;
+
+ assignok = parser_state&PST_ASSIGNOK; /* XXX */
+
+ wl = (WORD_LIST *)NULL; /* ( */
+ parser_state |= PST_COMPASSIGN;
+
+ while ((tok = read_token (READ)) != ')')
+ {
+ if (tok == '\n') /* Allow newlines in compound assignments */
+ {
+ if (SHOULD_PROMPT ())
+ prompt_again ();
+ continue;
+ }
+ if (tok != WORD && tok != ASSIGNMENT_WORD)
+ {
+ current_token = tok; /* for error reporting */
+ if (tok == yacc_EOF) /* ( */
+ parser_error (orig_line_number, _("unexpected EOF while looking for matching `)'"));
+ else
+ yyerror(NULL); /* does the right thing */
+ if (wl)
+ dispose_words (wl);
+ wl = &parse_string_error;
+ break;
+ }
+ wl = make_word_list (yylval.word, wl);
+ }
+
+ FREE (token);
+ token = saved_token;
+ token_buffer_size = orig_token_size;
+
+ parser_state &= ~PST_COMPASSIGN;
+
+ if (wl == &parse_string_error)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ last_read_token = '\n'; /* XXX */
+ if (interactive_shell == 0 && posixly_correct)
+ jump_to_top_level (FORCE_EOF);
+ else
+ jump_to_top_level (DISCARD);
+ }
+
+ last_read_token = orig_last_token; /* XXX - was WORD? */
+
+ if (wl)
+ {
+ rl = REVERSE_LIST (wl, WORD_LIST *);
+ ret = string_list (rl);
+ dispose_words (rl);
+ }
+ else
+ ret = (char *)NULL;
+
+ if (retlenp)
+ *retlenp = (ret && *ret) ? strlen (ret) : 0;
+
+ if (assignok)
+ parser_state |= PST_ASSIGNOK;
+
+ return ret;
+}
+
+/************************************************
+ * *
+ * SAVING AND RESTORING PARTIAL PARSE STATE *
+ * *
+ ************************************************/
+
+sh_parser_state_t *
+save_parser_state (ps)
+ sh_parser_state_t *ps;
+{
+#if defined (ARRAY_VARS)
+ SHELL_VAR *v;
+#endif
+
+ if (ps == 0)
+ ps = (sh_parser_state_t *)xmalloc (sizeof (sh_parser_state_t));
+ if (ps == 0)
+ return ((sh_parser_state_t *)NULL);
+
+ ps->parser_state = parser_state;
+ ps->token_state = save_token_state ();
+
+ ps->input_line_terminator = shell_input_line_terminator;
+ ps->eof_encountered = eof_encountered;
+
+ ps->current_command_line_count = current_command_line_count;
+
+#if defined (HISTORY)
+ ps->remember_on_history = remember_on_history;
+# if defined (BANG_HISTORY)
+ ps->history_expansion_inhibited = history_expansion_inhibited;
+# endif
+#endif
+
+ ps->last_command_exit_value = last_command_exit_value;
+#if defined (ARRAY_VARS)
+ v = find_variable ("PIPESTATUS");
+ if (v && array_p (v) && array_cell (v))
+ ps->pipestatus = array_copy (array_cell (v));
+ else
+ ps->pipestatus = (ARRAY *)NULL;
+#endif
+
+ ps->last_shell_builtin = last_shell_builtin;
+ ps->this_shell_builtin = this_shell_builtin;
+
+ ps->expand_aliases = expand_aliases;
+ ps->echo_input_at_read = echo_input_at_read;
+
+ return (ps);
+}
+
+void
+restore_parser_state (ps)
+ sh_parser_state_t *ps;
+{
+#if defined (ARRAY_VARS)
+ SHELL_VAR *v;
+#endif
+
+ if (ps == 0)
+ return;
+
+ parser_state = ps->parser_state;
+ if (ps->token_state)
+ {
+ restore_token_state (ps->token_state);
+ free (ps->token_state);
+ }
+
+ shell_input_line_terminator = ps->input_line_terminator;
+ eof_encountered = ps->eof_encountered;
+
+ current_command_line_count = ps->current_command_line_count;
+
+#if defined (HISTORY)
+ remember_on_history = ps->remember_on_history;
+# if defined (BANG_HISTORY)
+ history_expansion_inhibited = ps->history_expansion_inhibited;
+# endif
+#endif
+
+ last_command_exit_value = ps->last_command_exit_value;
+#if defined (ARRAY_VARS)
+ v = find_variable ("PIPESTATUS");
+ if (v && array_p (v) && array_cell (v))
+ {
+ array_dispose (array_cell (v));
+ var_setarray (v, ps->pipestatus);
+ }
+#endif
+
+ last_shell_builtin = ps->last_shell_builtin;
+ this_shell_builtin = ps->this_shell_builtin;
+
+ expand_aliases = ps->expand_aliases;
+ echo_input_at_read = ps->echo_input_at_read;
+}
+
+/************************************************
+ * *
+ * MULTIBYTE CHARACTER HANDLING *
+ * *
+ ************************************************/
+
+#if defined (HANDLE_MULTIBYTE)
+static void
+set_line_mbstate ()
+{
+ int i, previ, len, c;
+ mbstate_t mbs, prevs;
+ size_t mbclen;
+
+ if (shell_input_line == NULL)
+ return;
+ len = strlen (shell_input_line); /* XXX - shell_input_line_len ? */
+ FREE (shell_input_line_property);
+ shell_input_line_property = (char *)xmalloc (len + 1);
+
+ memset (&prevs, '\0', sizeof (mbstate_t));
+ for (i = previ = 0; i < len; i++)
+ {
+ mbs = prevs;
+
+ c = shell_input_line[i];
+ if (c == EOF)
+ {
+ int j;
+ for (j = i; j < len; j++)
+ shell_input_line_property[j] = 1;
+ break;
+ }
+
+ mbclen = mbrlen (shell_input_line + previ, i - previ + 1, &mbs);
+ if (mbclen == 1 || mbclen == (size_t)-1)
+ {
+ mbclen = 1;
+ previ = i + 1;
+ }
+ else if (mbclen == (size_t)-2)
+ mbclen = 0;
+ else if (mbclen > 1)
+ {
+ mbclen = 0;
+ previ = i + 1;
+ prevs = mbs;
+ }
+ else
+ {
+ /* XXX - what to do if mbrlen returns 0? (null wide character) */
+ int j;
+ for (j = i; j < len; j++)
+ shell_input_line_property[j] = 1;
+ break;
+ }
+
+ shell_input_line_property[i] = mbclen;
+ }
+}
+#endif /* HANDLE_MULTIBYTE */
diff --git a/parser-built b/parser-built
new file mode 100644
index 0000000..13e8550
--- /dev/null
+++ b/parser-built
@@ -0,0 +1,162 @@
+/* A Bison parser, made by GNU Bison 2.3. */
+
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ IF = 258,
+ THEN = 259,
+ ELSE = 260,
+ ELIF = 261,
+ FI = 262,
+ CASE = 263,
+ ESAC = 264,
+ FOR = 265,
+ SELECT = 266,
+ WHILE = 267,
+ UNTIL = 268,
+ DO = 269,
+ DONE = 270,
+ FUNCTION = 271,
+ COPROC = 272,
+ COND_START = 273,
+ COND_END = 274,
+ COND_ERROR = 275,
+ IN = 276,
+ BANG = 277,
+ TIME = 278,
+ TIMEOPT = 279,
+ WORD = 280,
+ ASSIGNMENT_WORD = 281,
+ REDIR_WORD = 282,
+ NUMBER = 283,
+ ARITH_CMD = 284,
+ ARITH_FOR_EXPRS = 285,
+ COND_CMD = 286,
+ AND_AND = 287,
+ OR_OR = 288,
+ GREATER_GREATER = 289,
+ LESS_LESS = 290,
+ LESS_AND = 291,
+ LESS_LESS_LESS = 292,
+ GREATER_AND = 293,
+ SEMI_SEMI = 294,
+ SEMI_AND = 295,
+ SEMI_SEMI_AND = 296,
+ LESS_LESS_MINUS = 297,
+ AND_GREATER = 298,
+ AND_GREATER_GREATER = 299,
+ LESS_GREATER = 300,
+ GREATER_BAR = 301,
+ BAR_AND = 302,
+ yacc_EOF = 303
+ };
+#endif
+/* Tokens. */
+#define IF 258
+#define THEN 259
+#define ELSE 260
+#define ELIF 261
+#define FI 262
+#define CASE 263
+#define ESAC 264
+#define FOR 265
+#define SELECT 266
+#define WHILE 267
+#define UNTIL 268
+#define DO 269
+#define DONE 270
+#define FUNCTION 271
+#define COPROC 272
+#define COND_START 273
+#define COND_END 274
+#define COND_ERROR 275
+#define IN 276
+#define BANG 277
+#define TIME 278
+#define TIMEOPT 279
+#define WORD 280
+#define ASSIGNMENT_WORD 281
+#define REDIR_WORD 282
+#define NUMBER 283
+#define ARITH_CMD 284
+#define ARITH_FOR_EXPRS 285
+#define COND_CMD 286
+#define AND_AND 287
+#define OR_OR 288
+#define GREATER_GREATER 289
+#define LESS_LESS 290
+#define LESS_AND 291
+#define LESS_LESS_LESS 292
+#define GREATER_AND 293
+#define SEMI_SEMI 294
+#define SEMI_AND 295
+#define SEMI_SEMI_AND 296
+#define LESS_LESS_MINUS 297
+#define AND_GREATER 298
+#define AND_GREATER_GREATER 299
+#define LESS_GREATER 300
+#define GREATER_BAR 301
+#define BAR_AND 302
+#define yacc_EOF 303
+
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+#line 320 "/Users/chet/src/bash/src/parse.y"
+{
+ WORD_DESC *word; /* the word that we read. */
+ int number; /* the number that we read. */
+ WORD_LIST *word_list;
+ COMMAND *command;
+ REDIRECT *redirect;
+ ELEMENT element;
+ PATTERN_LIST *pattern;
+}
+/* Line 1489 of yacc.c. */
+#line 155 "y.tab.h"
+ YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+extern YYSTYPE yylval;
+
diff --git a/parser.h b/parser.h
new file mode 100644
index 0000000..9ff6576
--- /dev/null
+++ b/parser.h
@@ -0,0 +1,64 @@
+/* parser.h -- Everything you wanted to know about the parser, but were
+ afraid to ask. */
+
+/* Copyright (C) 1995, 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_PARSER_H_)
+# define _PARSER_H_
+
+# include "command.h"
+# include "input.h"
+
+/* Possible states for the parser that require it to do special things. */
+#define PST_CASEPAT 0x000001 /* in a case pattern list */
+#define PST_ALEXPNEXT 0x000002 /* expand next word for aliases */
+#define PST_ALLOWOPNBRC 0x000004 /* allow open brace for function def */
+#define PST_NEEDCLOSBRC 0x000008 /* need close brace */
+#define PST_DBLPAREN 0x000010 /* double-paren parsing */
+#define PST_SUBSHELL 0x000020 /* ( ... ) subshell */
+#define PST_CMDSUBST 0x000040 /* $( ... ) command substitution */
+#define PST_CASESTMT 0x000080 /* parsing a case statement */
+#define PST_CONDCMD 0x000100 /* parsing a [[...]] command */
+#define PST_CONDEXPR 0x000200 /* parsing the guts of [[...]] */
+#define PST_ARITHFOR 0x000400 /* parsing an arithmetic for command */
+#define PST_ALEXPAND 0x000800 /* OK to expand aliases - unused */
+#define PST_EXTPAT 0x001000 /* parsing an extended shell pattern */
+#define PST_COMPASSIGN 0x002000 /* parsing x=(...) compound assignment */
+#define PST_ASSIGNOK 0x004000 /* assignment statement ok in this context */
+#define PST_EOFTOKEN 0x008000 /* yylex checks against shell_eof_token */
+#define PST_REGEXP 0x010000 /* parsing an ERE/BRE as a single word */
+#define PST_HEREDOC 0x020000 /* reading body of here-document */
+#define PST_REPARSE 0x040000 /* re-parsing in parse_string_to_word_list */
+#define PST_REDIRLIST 0x080000 /* parsing a list of redirctions preceding a simple command name */
+
+
+/* Definition of the delimiter stack. Needed by parse.y and bashhist.c. */
+struct dstack {
+/* DELIMITERS is a stack of the nested delimiters that we have
+ encountered so far. */
+ char *delimiters;
+
+/* Offset into the stack of delimiters. */
+ int delimiter_depth;
+
+/* How many slots are allocated to DELIMITERS. */
+ int delimiter_space;
+};
+
+#endif /* _PARSER_H_ */
diff --git a/patchlevel.h b/patchlevel.h
new file mode 100644
index 0000000..eab75cf
--- /dev/null
+++ b/patchlevel.h
@@ -0,0 +1,30 @@
+/* patchlevel.h -- current bash patch level */
+
+/* Copyright (C) 2001-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_PATCHLEVEL_H_)
+#define _PATCHLEVEL_H_
+
+/* It's important that there be no other strings in this file that match the
+ regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh
+ looks for to find the patch level (for the sccs version string). */
+
+#define PATCHLEVEL 7
+
+#endif /* _PATCHLEVEL_H_ */
diff --git a/pathexp.c b/pathexp.c
new file mode 100644
index 0000000..851ab8f
--- /dev/null
+++ b/pathexp.c
@@ -0,0 +1,486 @@
+/* pathexp.c -- The shell interface to the globbing library. */
+
+/* Copyright (C) 1995-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+#include <stdio.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+
+#include "shell.h"
+#include "pathexp.h"
+#include "flags.h"
+
+#include "shmbutil.h"
+#include "bashintl.h"
+
+#include <glob/strmatch.h>
+
+static int glob_name_is_acceptable __P((const char *));
+static void ignore_globbed_names __P((char **, sh_ignore_func_t *));
+
+#if defined (USE_POSIX_GLOB_LIBRARY)
+# include <glob.h>
+typedef int posix_glob_errfunc_t __P((const char *, int));
+#else
+# include <glob/glob.h>
+#endif
+
+/* Control whether * matches .files in globbing. */
+int glob_dot_filenames;
+
+/* Control whether the extended globbing features are enabled. */
+int extended_glob = EXTGLOB_DEFAULT;
+
+/* Control enabling special handling of `**' */
+int glob_star = 0;
+
+/* Return nonzero if STRING has any unquoted special globbing chars in it. */
+int
+unquoted_glob_pattern_p (string)
+ register char *string;
+{
+ register int c;
+ char *send;
+ int open;
+
+ DECLARE_MBSTATE;
+
+ open = 0;
+ send = string + strlen (string);
+
+ while (c = *string++)
+ {
+ switch (c)
+ {
+ case '?':
+ case '*':
+ return (1);
+
+ case '[':
+ open++;
+ continue;
+
+ case ']':
+ if (open)
+ return (1);
+ continue;
+
+ case '+':
+ case '@':
+ case '!':
+ if (*string == '(') /*)*/
+ return (1);
+ continue;
+
+ case CTLESC:
+ case '\\':
+ if (*string++ == '\0')
+ return (0);
+ }
+
+ /* Advance one fewer byte than an entire multibyte character to
+ account for the auto-increment in the loop above. */
+#ifdef HANDLE_MULTIBYTE
+ string--;
+ ADVANCE_CHAR_P (string, send - string);
+ string++;
+#else
+ ADVANCE_CHAR_P (string, send - string);
+#endif
+ }
+ return (0);
+}
+
+/* Return 1 if C is a character that is `special' in a POSIX ERE and needs to
+ be quoted to match itself. */
+static inline int
+ere_char (c)
+ int c;
+{
+ switch (c)
+ {
+ case '.':
+ case '[':
+ case '\\':
+ case '(':
+ case ')':
+ case '*':
+ case '+':
+ case '?':
+ case '{':
+ case '|':
+ case '^':
+ case '$':
+ return 1;
+ default:
+ return 0;
+ }
+ return (0);
+}
+
+int
+glob_char_p (s)
+ const char *s;
+{
+ switch (*s)
+ {
+ case '*':
+ case '[':
+ case ']':
+ case '?':
+ case '\\':
+ return 1;
+ case '+':
+ case '@':
+ case '!':
+ if (s[1] == '(') /*(*/
+ return 1;
+ break;
+ }
+ return 0;
+}
+
+/* PATHNAME can contain characters prefixed by CTLESC; this indicates
+ that the character is to be quoted. We quote it here in the style
+ that the glob library recognizes. If flags includes QGLOB_CVTNULL,
+ we change quoted null strings (pathname[0] == CTLNUL) into empty
+ strings (pathname[0] == 0). If this is called after quote removal
+ is performed, (flags & QGLOB_CVTNULL) should be 0; if called when quote
+ removal has not been done (for example, before attempting to match a
+ pattern while executing a case statement), flags should include
+ QGLOB_CVTNULL. If flags includes QGLOB_FILENAME, appropriate quoting
+ to match a filename should be performed. */
+char *
+quote_string_for_globbing (pathname, qflags)
+ const char *pathname;
+ int qflags;
+{
+ char *temp;
+ register int i, j;
+
+ temp = (char *)xmalloc (strlen (pathname) + 1);
+
+ if ((qflags & QGLOB_CVTNULL) && QUOTED_NULL (pathname))
+ {
+ temp[0] = '\0';
+ return temp;
+ }
+
+ for (i = j = 0; pathname[i]; i++)
+ {
+ if (pathname[i] == CTLESC)
+ {
+ if ((qflags & QGLOB_FILENAME) && pathname[i+1] == '/')
+ continue;
+ if ((qflags & QGLOB_REGEXP) && ere_char (pathname[i+1]) == 0)
+ continue;
+ temp[j++] = '\\';
+ i++;
+ if (pathname[i] == '\0')
+ break;
+ }
+ else if (pathname[i] == '\\')
+ {
+ temp[j++] = '\\';
+ i++;
+ if (pathname[i] == '\0')
+ break;
+ }
+ temp[j++] = pathname[i];
+ }
+ temp[j] = '\0';
+
+ return (temp);
+}
+
+char *
+quote_globbing_chars (string)
+ char *string;
+{
+ size_t slen;
+ char *temp, *s, *t, *send;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+ send = string + slen;
+
+ temp = (char *)xmalloc (slen * 2 + 1);
+ for (t = temp, s = string; *s; )
+ {
+ if (glob_char_p (s))
+ *t++ = '\\';
+
+ /* Copy a single (possibly multibyte) character from s to t,
+ incrementing both. */
+ COPY_CHAR_P (t, s, send);
+ }
+ *t = '\0';
+ return temp;
+}
+
+/* Call the glob library to do globbing on PATHNAME. */
+char **
+shell_glob_filename (pathname)
+ const char *pathname;
+{
+#if defined (USE_POSIX_GLOB_LIBRARY)
+ register int i;
+ char *temp, **results;
+ glob_t filenames;
+ int glob_flags;
+
+ temp = quote_string_for_globbing (pathname, QGLOB_FILENAME);
+
+ filenames.gl_offs = 0;
+
+# if defined (GLOB_PERIOD)
+ glob_flags = glob_dot_filenames ? GLOB_PERIOD : 0;
+# else
+ glob_flags = 0;
+# endif /* !GLOB_PERIOD */
+
+ glob_flags |= (GLOB_ERR | GLOB_DOOFFS);
+
+ i = glob (temp, glob_flags, (posix_glob_errfunc_t *)NULL, &filenames);
+
+ free (temp);
+
+ if (i == GLOB_NOSPACE || i == GLOB_ABORTED)
+ return ((char **)NULL);
+ else if (i == GLOB_NOMATCH)
+ filenames.gl_pathv = (char **)NULL;
+ else if (i != 0) /* other error codes not in POSIX.2 */
+ filenames.gl_pathv = (char **)NULL;
+
+ results = filenames.gl_pathv;
+
+ if (results && ((GLOB_FAILED (results)) == 0))
+ {
+ if (should_ignore_glob_matches ())
+ ignore_glob_matches (results);
+ if (results && results[0])
+ strvec_sort (results);
+ else
+ {
+ FREE (results);
+ results = (char **)NULL;
+ }
+ }
+
+ return (results);
+
+#else /* !USE_POSIX_GLOB_LIBRARY */
+
+ char *temp, **results;
+
+ noglob_dot_filenames = glob_dot_filenames == 0;
+
+ temp = quote_string_for_globbing (pathname, QGLOB_FILENAME);
+ results = glob_filename (temp, glob_star ? GX_GLOBSTAR : 0);
+ free (temp);
+
+ if (results && ((GLOB_FAILED (results)) == 0))
+ {
+ if (should_ignore_glob_matches ())
+ ignore_glob_matches (results);
+ if (results && results[0])
+ strvec_sort (results);
+ else
+ {
+ FREE (results);
+ results = (char **)&glob_error_return;
+ }
+ }
+
+ return (results);
+#endif /* !USE_POSIX_GLOB_LIBRARY */
+}
+
+/* Stuff for GLOBIGNORE. */
+
+static struct ignorevar globignore =
+{
+ "GLOBIGNORE",
+ (struct ign *)0,
+ 0,
+ (char *)0,
+ (sh_iv_item_func_t *)0,
+};
+
+/* Set up to ignore some glob matches because the value of GLOBIGNORE
+ has changed. If GLOBIGNORE is being unset, we also need to disable
+ the globbing of filenames beginning with a `.'. */
+void
+setup_glob_ignore (name)
+ char *name;
+{
+ char *v;
+
+ v = get_string_value (name);
+ setup_ignore_patterns (&globignore);
+
+ if (globignore.num_ignores)
+ glob_dot_filenames = 1;
+ else if (v == 0)
+ glob_dot_filenames = 0;
+}
+
+int
+should_ignore_glob_matches ()
+{
+ return globignore.num_ignores;
+}
+
+/* Return 0 if NAME matches a pattern in the globignore.ignores list. */
+static int
+glob_name_is_acceptable (name)
+ const char *name;
+{
+ struct ign *p;
+ int flags;
+
+ /* . and .. are never matched */
+ if (name[0] == '.' && (name[1] == '\0' || (name[1] == '.' && name[2] == '\0')))
+ return (0);
+
+ flags = FNM_PATHNAME | FNMATCH_EXTFLAG;
+ for (p = globignore.ignores; p->val; p++)
+ {
+ if (strmatch (p->val, (char *)name, flags) != FNM_NOMATCH)
+ return (0);
+ }
+ return (1);
+}
+
+/* Internal function to test whether filenames in NAMES should be
+ ignored. NAME_FUNC is a pointer to a function to call with each
+ name. It returns non-zero if the name is acceptable to the particular
+ ignore function which called _ignore_names; zero if the name should
+ be removed from NAMES. */
+
+static void
+ignore_globbed_names (names, name_func)
+ char **names;
+ sh_ignore_func_t *name_func;
+{
+ char **newnames;
+ int n, i;
+
+ for (i = 0; names[i]; i++)
+ ;
+ newnames = strvec_create (i + 1);
+
+ for (n = i = 0; names[i]; i++)
+ {
+ if ((*name_func) (names[i]))
+ newnames[n++] = names[i];
+ else
+ free (names[i]);
+ }
+
+ newnames[n] = (char *)NULL;
+
+ if (n == 0)
+ {
+ names[0] = (char *)NULL;
+ free (newnames);
+ return;
+ }
+
+ /* Copy the acceptable names from NEWNAMES back to NAMES and set the
+ new array end. */
+ for (n = 0; newnames[n]; n++)
+ names[n] = newnames[n];
+ names[n] = (char *)NULL;
+ free (newnames);
+}
+
+void
+ignore_glob_matches (names)
+ char **names;
+{
+ if (globignore.num_ignores == 0)
+ return;
+
+ ignore_globbed_names (names, glob_name_is_acceptable);
+}
+
+void
+setup_ignore_patterns (ivp)
+ struct ignorevar *ivp;
+{
+ int numitems, maxitems, ptr;
+ char *colon_bit, *this_ignoreval;
+ struct ign *p;
+
+ this_ignoreval = get_string_value (ivp->varname);
+
+ /* If nothing has changed then just exit now. */
+ if ((this_ignoreval && ivp->last_ignoreval && STREQ (this_ignoreval, ivp->last_ignoreval)) ||
+ (!this_ignoreval && !ivp->last_ignoreval))
+ return;
+
+ /* Oops. The ignore variable has changed. Re-parse it. */
+ ivp->num_ignores = 0;
+
+ if (ivp->ignores)
+ {
+ for (p = ivp->ignores; p->val; p++)
+ free(p->val);
+ free (ivp->ignores);
+ ivp->ignores = (struct ign *)NULL;
+ }
+
+ if (ivp->last_ignoreval)
+ {
+ free (ivp->last_ignoreval);
+ ivp->last_ignoreval = (char *)NULL;
+ }
+
+ if (this_ignoreval == 0 || *this_ignoreval == '\0')
+ return;
+
+ ivp->last_ignoreval = savestring (this_ignoreval);
+
+ numitems = maxitems = ptr = 0;
+
+ while (colon_bit = extract_colon_unit (this_ignoreval, &ptr))
+ {
+ if (numitems + 1 >= maxitems)
+ {
+ maxitems += 10;
+ ivp->ignores = (struct ign *)xrealloc (ivp->ignores, maxitems * sizeof (struct ign));
+ }
+ ivp->ignores[numitems].val = colon_bit;
+ ivp->ignores[numitems].len = strlen (colon_bit);
+ ivp->ignores[numitems].flags = 0;
+ if (ivp->item_func)
+ (*ivp->item_func) (&ivp->ignores[numitems]);
+ numitems++;
+ }
+ ivp->ignores[numitems].val = (char *)NULL;
+ ivp->num_ignores = numitems;
+}
diff --git a/pathexp.h b/pathexp.h
new file mode 100644
index 0000000..20d0baf
--- /dev/null
+++ b/pathexp.h
@@ -0,0 +1,102 @@
+/* pathexp.h -- The shell interface to the globbing library. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_PATHEXP_H_)
+#define _PATHEXP_H_
+
+#if defined (USE_POSIX_GLOB_LIBRARY)
+# define GLOB_FAILED(glist) !(glist)
+#else /* !USE_POSIX_GLOB_LIBRARY */
+# define GLOB_FAILED(glist) (glist) == (char **)&glob_error_return
+extern int noglob_dot_filenames;
+extern char *glob_error_return;
+#endif /* !USE_POSIX_GLOB_LIBRARY */
+
+/* Flag values for quote_string_for_globbing */
+#define QGLOB_CVTNULL 0x01 /* convert QUOTED_NULL strings to '\0' */
+#define QGLOB_FILENAME 0x02 /* do correct quoting for matching filenames */
+#define QGLOB_REGEXP 0x04 /* quote an ERE for regcomp/regexec */
+
+#if defined (EXTENDED_GLOB)
+/* Flags to OR with other flag args to strmatch() to enabled the extended
+ pattern matching. */
+# define FNMATCH_EXTFLAG (extended_glob ? FNM_EXTMATCH : 0)
+#else
+# define FNMATCH_EXTFLAG 0
+#endif /* !EXTENDED_GLOB */
+
+#define FNMATCH_IGNCASE (match_ignore_case ? FNM_CASEFOLD : 0)
+
+extern int glob_dot_filenames;
+extern int extended_glob;
+extern int glob_star;
+extern int match_ignore_case; /* doesn't really belong here */
+
+extern int unquoted_glob_pattern_p __P((char *));
+
+/* PATHNAME can contain characters prefixed by CTLESC; this indicates
+ that the character is to be quoted. We quote it here in the style
+ that the glob library recognizes. If flags includes QGLOB_CVTNULL,
+ we change quoted null strings (pathname[0] == CTLNUL) into empty
+ strings (pathname[0] == 0). If this is called after quote removal
+ is performed, (flags & QGLOB_CVTNULL) should be 0; if called when quote
+ removal has not been done (for example, before attempting to match a
+ pattern while executing a case statement), flags should include
+ QGLOB_CVTNULL. If flags includes QGLOB_FILENAME, appropriate quoting
+ to match a filename should be performed. */
+extern char *quote_string_for_globbing __P((const char *, int));
+
+extern int glob_char_p __P((const char *));
+extern char *quote_globbing_chars __P((char *));
+
+/* Call the glob library to do globbing on PATHNAME. */
+extern char **shell_glob_filename __P((const char *));
+
+/* Filename completion ignore. Used to implement the "fignore" facility of
+ tcsh and GLOBIGNORE (like ksh-93 FIGNORE).
+
+ It is passed a NULL-terminated array of (char *)'s that must be
+ free()'d if they are deleted. The first element (names[0]) is the
+ least-common-denominator string of the matching patterns (i.e.
+ u<TAB> produces names[0] = "und", names[1] = "under.c", names[2] =
+ "undun.c", name[3] = NULL). */
+
+struct ign {
+ char *val;
+ int len, flags;
+};
+
+typedef int sh_iv_item_func_t __P((struct ign *));
+
+struct ignorevar {
+ char *varname; /* FIGNORE or GLOBIGNORE */
+ struct ign *ignores; /* Store the ignore strings here */
+ int num_ignores; /* How many are there? */
+ char *last_ignoreval; /* Last value of variable - cached for speed */
+ sh_iv_item_func_t *item_func; /* Called when each item is parsed from $`varname' */
+};
+
+extern void setup_ignore_patterns __P((struct ignorevar *));
+
+extern void setup_glob_ignore __P((char *));
+extern int should_ignore_glob_matches __P((void));
+extern void ignore_glob_matches __P((char **));
+
+#endif
diff --git a/pathnames.h.in b/pathnames.h.in
new file mode 100644
index 0000000..38d0939
--- /dev/null
+++ b/pathnames.h.in
@@ -0,0 +1,33 @@
+/* pathnames.h -- absolute filenames that bash wants for various defaults. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_PATHNAMES_H_)
+#define _PATHNAMES_H_
+
+/* The default file for hostname completion. */
+#define DEFAULT_HOSTS_FILE "/etc/hosts"
+
+/* The default login shell startup file. */
+#define SYS_PROFILE "/etc/profile"
+
+/* The default location of the bash debugger initialization/startup file. */
+#define DEBUGGER_START_FILE "@DEBUGGER_START_FILE@"
+
+#endif /* _PATHNAMES_H */
diff --git a/pcomplete.c b/pcomplete.c
new file mode 100644
index 0000000..e4f2059
--- /dev/null
+++ b/pcomplete.c
@@ -0,0 +1,1546 @@
+/* pcomplete.c - functions to generate lists of matches for programmable completion. */
+
+/* Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (PROGRAMMABLE_COMPLETION)
+
+#include "bashtypes.h"
+#include "posixstat.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <signal.h>
+
+#if defined (PREFER_STDARG)
+# include <stdarg.h>
+#else
+# include <varargs.h>
+#endif
+
+#include <stdio.h>
+#include "bashansi.h"
+#include "bashintl.h"
+
+#include "shell.h"
+#include "pcomplete.h"
+#include "alias.h"
+#include "bashline.h"
+#include "execute_cmd.h"
+#include "pathexp.h"
+
+#if defined (JOB_CONTROL)
+# include "jobs.h"
+#endif
+
+#if !defined (NSIG)
+# include "trap.h"
+#endif
+
+#include "builtins.h"
+#include "builtins/common.h"
+
+#include <glob/glob.h>
+#include <glob/strmatch.h>
+
+#include <readline/rlconf.h>
+#include <readline/readline.h>
+#include <readline/history.h>
+
+#define PCOMP_RETRYFAIL 256
+
+#ifdef STRDUP
+# undef STRDUP
+#endif
+#define STRDUP(x) ((x) ? savestring (x) : (char *)NULL)
+
+typedef SHELL_VAR **SVFUNC ();
+
+#ifndef HAVE_STRPBRK
+extern char *strpbrk __P((char *, char *));
+#endif
+
+extern int array_needs_making;
+extern STRING_INT_ALIST word_token_alist[];
+extern char *signal_names[];
+
+#if defined (DEBUG)
+#if defined (PREFER_STDARG)
+static void debug_printf (const char *, ...) __attribute__((__format__ (printf, 1, 2)));
+#endif
+#endif /* DEBUG */
+
+static int it_init_joblist __P((ITEMLIST *, int));
+
+static int it_init_aliases __P((ITEMLIST *));
+static int it_init_arrayvars __P((ITEMLIST *));
+static int it_init_bindings __P((ITEMLIST *));
+static int it_init_builtins __P((ITEMLIST *));
+static int it_init_disabled __P((ITEMLIST *));
+static int it_init_enabled __P((ITEMLIST *));
+static int it_init_exported __P((ITEMLIST *));
+static int it_init_functions __P((ITEMLIST *));
+static int it_init_hostnames __P((ITEMLIST *));
+static int it_init_jobs __P((ITEMLIST *));
+static int it_init_running __P((ITEMLIST *));
+static int it_init_stopped __P((ITEMLIST *));
+static int it_init_keywords __P((ITEMLIST *));
+static int it_init_signals __P((ITEMLIST *));
+static int it_init_variables __P((ITEMLIST *));
+static int it_init_setopts __P((ITEMLIST *));
+static int it_init_shopts __P((ITEMLIST *));
+
+static int shouldexp_filterpat __P((char *));
+static char *preproc_filterpat __P((char *, char *));
+
+static void init_itemlist_from_varlist __P((ITEMLIST *, SVFUNC *));
+
+static STRINGLIST *gen_matches_from_itemlist __P((ITEMLIST *, const char *));
+static STRINGLIST *gen_action_completions __P((COMPSPEC *, const char *));
+static STRINGLIST *gen_globpat_matches __P((COMPSPEC *, const char *));
+static STRINGLIST *gen_wordlist_matches __P((COMPSPEC *, const char *));
+static STRINGLIST *gen_shell_function_matches __P((COMPSPEC *, const char *,
+ char *, int, WORD_LIST *,
+ int, int, int *));
+static STRINGLIST *gen_command_matches __P((COMPSPEC *, const char *, char *,
+ int, WORD_LIST *, int, int));
+
+static STRINGLIST *gen_progcomp_completions __P((const char *, const char *,
+ const char *,
+ int, int, int *, int *,
+ COMPSPEC **));
+
+static char *pcomp_filename_completion_function __P((const char *, int));
+
+#if defined (ARRAY_VARS)
+static SHELL_VAR *bind_comp_words __P((WORD_LIST *));
+#endif
+static void bind_compfunc_variables __P((char *, int, WORD_LIST *, int, int));
+static void unbind_compfunc_variables __P((int));
+static WORD_LIST *build_arg_list __P((char *, const char *, WORD_LIST *, int));
+static WORD_LIST *command_line_to_word_list __P((char *, int, int, int *, int *));
+
+#ifdef DEBUG
+static int progcomp_debug = 0;
+#endif
+
+int prog_completion_enabled = 1;
+
+/* These are used to manage the arrays of strings for possible completions. */
+ITEMLIST it_aliases = { 0, it_init_aliases, (STRINGLIST *)0 };
+ITEMLIST it_arrayvars = { LIST_DYNAMIC, it_init_arrayvars, (STRINGLIST *)0 };
+ITEMLIST it_bindings = { 0, it_init_bindings, (STRINGLIST *)0 };
+ITEMLIST it_builtins = { 0, it_init_builtins, (STRINGLIST *)0 };
+ITEMLIST it_commands = { LIST_DYNAMIC }; /* unused */
+ITEMLIST it_directories = { LIST_DYNAMIC }; /* unused */
+ITEMLIST it_disabled = { 0, it_init_disabled, (STRINGLIST *)0 };
+ITEMLIST it_enabled = { 0, it_init_enabled, (STRINGLIST *)0 };
+ITEMLIST it_exports = { LIST_DYNAMIC, it_init_exported, (STRINGLIST *)0 };
+ITEMLIST it_files = { LIST_DYNAMIC }; /* unused */
+ITEMLIST it_functions = { 0, it_init_functions, (STRINGLIST *)0 };
+ITEMLIST it_hostnames = { LIST_DYNAMIC, it_init_hostnames, (STRINGLIST *)0 };
+ITEMLIST it_groups = { LIST_DYNAMIC }; /* unused */
+ITEMLIST it_jobs = { LIST_DYNAMIC, it_init_jobs, (STRINGLIST *)0 };
+ITEMLIST it_keywords = { 0, it_init_keywords, (STRINGLIST *)0 };
+ITEMLIST it_running = { LIST_DYNAMIC, it_init_running, (STRINGLIST *)0 };
+ITEMLIST it_services = { LIST_DYNAMIC }; /* unused */
+ITEMLIST it_setopts = { 0, it_init_setopts, (STRINGLIST *)0 };
+ITEMLIST it_shopts = { 0, it_init_shopts, (STRINGLIST *)0 };
+ITEMLIST it_signals = { 0, it_init_signals, (STRINGLIST *)0 };
+ITEMLIST it_stopped = { LIST_DYNAMIC, it_init_stopped, (STRINGLIST *)0 };
+ITEMLIST it_users = { LIST_DYNAMIC }; /* unused */
+ITEMLIST it_variables = { LIST_DYNAMIC, it_init_variables, (STRINGLIST *)0 };
+
+COMPSPEC *pcomp_curcs;
+const char *pcomp_curcmd;
+
+#ifdef DEBUG
+/* Debugging code */
+static void
+#if defined (PREFER_STDARG)
+debug_printf (const char *format, ...)
+#else
+debug_printf (format, va_alist)
+ const char *format;
+ va_dcl
+#endif
+{
+ va_list args;
+
+ if (progcomp_debug == 0)
+ return;
+
+ SH_VA_START (args, format);
+
+ fprintf (stdout, "DEBUG: ");
+ vfprintf (stdout, format, args);
+ fprintf (stdout, "\n");
+
+ rl_on_new_line ();
+
+ va_end (args);
+}
+#endif
+
+/* Functions to manage the item lists */
+
+void
+set_itemlist_dirty (it)
+ ITEMLIST *it;
+{
+ it->flags |= LIST_DIRTY;
+}
+
+void
+initialize_itemlist (itp)
+ ITEMLIST *itp;
+{
+ (*itp->list_getter) (itp);
+ itp->flags |= LIST_INITIALIZED;
+ itp->flags &= ~LIST_DIRTY;
+}
+
+void
+clean_itemlist (itp)
+ ITEMLIST *itp;
+{
+ STRINGLIST *sl;
+
+ sl = itp->slist;
+ if (sl)
+ {
+ if ((itp->flags & (LIST_DONTFREEMEMBERS|LIST_DONTFREE)) == 0)
+ strvec_flush (sl->list);
+ if ((itp->flags & LIST_DONTFREE) == 0)
+ free (sl->list);
+ free (sl);
+ }
+ itp->slist = (STRINGLIST *)NULL;
+ itp->flags &= ~(LIST_DONTFREE|LIST_DONTFREEMEMBERS|LIST_INITIALIZED|LIST_DIRTY);
+}
+
+
+static int
+shouldexp_filterpat (s)
+ char *s;
+{
+ register char *p;
+
+ for (p = s; p && *p; p++)
+ {
+ if (*p == '\\')
+ p++;
+ else if (*p == '&')
+ return 1;
+ }
+ return 0;
+}
+
+/* Replace any instance of `&' in PAT with TEXT. Backslash may be used to
+ quote a `&' and inhibit substitution. Returns a new string. This just
+ calls stringlib.c:strcreplace(). */
+static char *
+preproc_filterpat (pat, text)
+ char *pat;
+ char *text;
+{
+ char *ret;
+
+ ret = strcreplace (pat, '&', text, 1);
+ return ret;
+}
+
+/* Remove any match of FILTERPAT from SL. A `&' in FILTERPAT is replaced by
+ TEXT. A leading `!' in FILTERPAT negates the pattern; in this case
+ any member of SL->list that does *not* match will be removed. This returns
+ a new STRINGLIST with the matching members of SL *copied*. Any
+ non-matching members of SL->list are *freed*. */
+STRINGLIST *
+filter_stringlist (sl, filterpat, text)
+ STRINGLIST *sl;
+ char *filterpat, *text;
+{
+ int i, m, not;
+ STRINGLIST *ret;
+ char *npat, *t;
+
+ if (sl == 0 || sl->list == 0 || sl->list_len == 0)
+ return sl;
+
+ npat = shouldexp_filterpat (filterpat) ? preproc_filterpat (filterpat, text) : filterpat;
+
+ not = (npat[0] == '!');
+ t = not ? npat + 1 : npat;
+
+ ret = strlist_create (sl->list_size);
+ for (i = 0; i < sl->list_len; i++)
+ {
+ m = strmatch (t, sl->list[i], FNMATCH_EXTFLAG);
+ if ((not && m == FNM_NOMATCH) || (not == 0 && m != FNM_NOMATCH))
+ free (sl->list[i]);
+ else
+ ret->list[ret->list_len++] = sl->list[i];
+ }
+
+ ret->list[ret->list_len] = (char *)NULL;
+ if (npat != filterpat)
+ free (npat);
+
+ return ret;
+}
+
+/* Turn an array of strings returned by rl_completion_matches into a STRINGLIST.
+ This understands how rl_completion_matches sets matches[0] (the lcd of the
+ strings in the list, unless it's the only match). */
+STRINGLIST *
+completions_to_stringlist (matches)
+ char **matches;
+{
+ STRINGLIST *sl;
+ int mlen, i, n;
+
+ mlen = (matches == 0) ? 0 : strvec_len (matches);
+ sl = strlist_create (mlen + 1);
+
+ if (matches == 0 || matches[0] == 0)
+ return sl;
+
+ if (matches[1] == 0)
+ {
+ sl->list[0] = STRDUP (matches[0]);
+ sl->list[sl->list_len = 1] = (char *)NULL;
+ return sl;
+ }
+
+ for (i = 1, n = 0; i < mlen; i++, n++)
+ sl->list[n] = STRDUP (matches[i]);
+ sl->list_len = n;
+ sl->list[n] = (char *)NULL;
+
+ return sl;
+}
+
+/* Functions to manage the various ITEMLISTs that we populate internally.
+ The caller is responsible for setting ITP->flags correctly. */
+
+static int
+it_init_aliases (itp)
+ ITEMLIST *itp;
+{
+#ifdef ALIAS
+ alias_t **alias_list;
+ register int i, n;
+ STRINGLIST *sl;
+
+ alias_list = all_aliases ();
+ if (alias_list == 0)
+ {
+ itp->slist = (STRINGLIST *)NULL;
+ return 0;
+ }
+ for (n = 0; alias_list[n]; n++)
+ ;
+ sl = strlist_create (n+1);
+ for (i = 0; i < n; i++)
+ sl->list[i] = STRDUP (alias_list[i]->name);
+ sl->list[n] = (char *)NULL;
+ sl->list_size = sl->list_len = n;
+ itp->slist = sl;
+#else
+ itp->slist = (STRINGLIST *)NULL;
+#endif
+ return 1;
+}
+
+static void
+init_itemlist_from_varlist (itp, svfunc)
+ ITEMLIST *itp;
+ SVFUNC *svfunc;
+{
+ SHELL_VAR **vlist;
+ STRINGLIST *sl;
+ register int i, n;
+
+ vlist = (*svfunc) ();
+ if (vlist == 0)
+ {
+ itp->slist = (STRINGLIST *)NULL;
+ return;
+ }
+ for (n = 0; vlist[n]; n++)
+ ;
+ sl = strlist_create (n+1);
+ for (i = 0; i < n; i++)
+ sl->list[i] = savestring (vlist[i]->name);
+ sl->list[sl->list_len = n] = (char *)NULL;
+ itp->slist = sl;
+}
+
+static int
+it_init_arrayvars (itp)
+ ITEMLIST *itp;
+{
+#if defined (ARRAY_VARS)
+ init_itemlist_from_varlist (itp, all_array_variables);
+ return 1;
+#else
+ return 0;
+#endif
+}
+
+static int
+it_init_bindings (itp)
+ ITEMLIST *itp;
+{
+ char **blist;
+ STRINGLIST *sl;
+
+ /* rl_funmap_names allocates blist, but not its members */
+ blist = (char **)rl_funmap_names (); /* XXX fix const later */
+ sl = strlist_create (0);
+ sl->list = blist;
+ sl->list_size = 0;
+ sl->list_len = strvec_len (sl->list);
+ itp->flags |= LIST_DONTFREEMEMBERS;
+ itp->slist = sl;
+
+ return 0;
+}
+
+static int
+it_init_builtins (itp)
+ ITEMLIST *itp;
+{
+ STRINGLIST *sl;
+ register int i, n;
+
+ sl = strlist_create (num_shell_builtins);
+ for (i = n = 0; i < num_shell_builtins; i++)
+ if (shell_builtins[i].function)
+ sl->list[n++] = shell_builtins[i].name;
+ sl->list[sl->list_len = n] = (char *)NULL;
+ itp->flags |= LIST_DONTFREEMEMBERS;
+ itp->slist = sl;
+ return 0;
+}
+
+static int
+it_init_enabled (itp)
+ ITEMLIST *itp;
+{
+ STRINGLIST *sl;
+ register int i, n;
+
+ sl = strlist_create (num_shell_builtins);
+ for (i = n = 0; i < num_shell_builtins; i++)
+ {
+ if (shell_builtins[i].function && (shell_builtins[i].flags & BUILTIN_ENABLED))
+ sl->list[n++] = shell_builtins[i].name;
+ }
+ sl->list[sl->list_len = n] = (char *)NULL;
+ itp->flags |= LIST_DONTFREEMEMBERS;
+ itp->slist = sl;
+ return 0;
+}
+
+static int
+it_init_disabled (itp)
+ ITEMLIST *itp;
+{
+ STRINGLIST *sl;
+ register int i, n;
+
+ sl = strlist_create (num_shell_builtins);
+ for (i = n = 0; i < num_shell_builtins; i++)
+ {
+ if (shell_builtins[i].function && ((shell_builtins[i].flags & BUILTIN_ENABLED) == 0))
+ sl->list[n++] = shell_builtins[i].name;
+ }
+ sl->list[sl->list_len = n] = (char *)NULL;
+ itp->flags |= LIST_DONTFREEMEMBERS;
+ itp->slist = sl;
+ return 0;
+}
+
+static int
+it_init_exported (itp)
+ ITEMLIST *itp;
+{
+ init_itemlist_from_varlist (itp, all_exported_variables);
+ return 0;
+}
+
+static int
+it_init_functions (itp)
+ ITEMLIST *itp;
+{
+ init_itemlist_from_varlist (itp, all_visible_functions);
+ return 0;
+}
+
+static int
+it_init_hostnames (itp)
+ ITEMLIST *itp;
+{
+ STRINGLIST *sl;
+
+ sl = strlist_create (0);
+ sl->list = get_hostname_list ();
+ sl->list_len = sl->list ? strvec_len (sl->list) : 0;
+ sl->list_size = sl->list_len;
+ itp->slist = sl;
+ itp->flags |= LIST_DONTFREEMEMBERS|LIST_DONTFREE;
+ return 0;
+}
+
+static int
+it_init_joblist (itp, jstate)
+ ITEMLIST *itp;
+ int jstate;
+{
+#if defined (JOB_CONTROL)
+ STRINGLIST *sl;
+ register int i;
+ register PROCESS *p;
+ char *s, *t;
+ JOB *j;
+ JOB_STATE ws; /* wanted state */
+
+ ws = JNONE;
+ if (jstate == 0)
+ ws = JRUNNING;
+ else if (jstate == 1)
+ ws = JSTOPPED;
+
+ sl = strlist_create (js.j_jobslots);
+ for (i = js.j_jobslots - 1; i >= 0; i--)
+ {
+ j = get_job_by_jid (i);
+ if (j == 0)
+ continue;
+ p = j->pipe;
+ if (jstate == -1 || JOBSTATE(i) == ws)
+ {
+ s = savestring (p->command);
+ t = strpbrk (s, " \t\n");
+ if (t)
+ *t = '\0';
+ sl->list[sl->list_len++] = s;
+ }
+ }
+ itp->slist = sl;
+#else
+ itp->slist = (STRINGLIST *)NULL;
+#endif
+ return 0;
+}
+
+static int
+it_init_jobs (itp)
+ ITEMLIST *itp;
+{
+ return (it_init_joblist (itp, -1));
+}
+
+static int
+it_init_running (itp)
+ ITEMLIST *itp;
+{
+ return (it_init_joblist (itp, 0));
+}
+
+static int
+it_init_stopped (itp)
+ ITEMLIST *itp;
+{
+ return (it_init_joblist (itp, 1));
+}
+
+static int
+it_init_keywords (itp)
+ ITEMLIST *itp;
+{
+ STRINGLIST *sl;
+ register int i, n;
+
+ for (n = 0; word_token_alist[n].word; n++)
+ ;
+ sl = strlist_create (n);
+ for (i = 0; i < n; i++)
+ sl->list[i] = word_token_alist[i].word;
+ sl->list[sl->list_len = i] = (char *)NULL;
+ itp->flags |= LIST_DONTFREEMEMBERS;
+ itp->slist = sl;
+ return 0;
+}
+
+static int
+it_init_signals (itp)
+ ITEMLIST *itp;
+{
+ STRINGLIST *sl;
+
+ sl = strlist_create (0);
+ sl->list = signal_names;
+ sl->list_len = strvec_len (sl->list);
+ itp->flags |= LIST_DONTFREE;
+ itp->slist = sl;
+ return 0;
+}
+
+static int
+it_init_variables (itp)
+ ITEMLIST *itp;
+{
+ init_itemlist_from_varlist (itp, all_visible_variables);
+ return 0;
+}
+
+static int
+it_init_setopts (itp)
+ ITEMLIST *itp;
+{
+ STRINGLIST *sl;
+
+ sl = strlist_create (0);
+ sl->list = get_minus_o_opts ();
+ sl->list_len = strvec_len (sl->list);
+ itp->slist = sl;
+ itp->flags |= LIST_DONTFREEMEMBERS;
+ return 0;
+}
+
+static int
+it_init_shopts (itp)
+ ITEMLIST *itp;
+{
+ STRINGLIST *sl;
+
+ sl = strlist_create (0);
+ sl->list = get_shopt_options ();
+ sl->list_len = strvec_len (sl->list);
+ itp->slist = sl;
+ itp->flags |= LIST_DONTFREEMEMBERS;
+ return 0;
+}
+
+/* Generate a list of all matches for TEXT using the STRINGLIST in itp->slist
+ as the list of possibilities. If the itemlist has been marked dirty or
+ it should be regenerated every time, destroy the old STRINGLIST and make a
+ new one before trying the match. TEXT is dequoted before attempting a
+ match. */
+static STRINGLIST *
+gen_matches_from_itemlist (itp, text)
+ ITEMLIST *itp;
+ const char *text;
+{
+ STRINGLIST *ret, *sl;
+ int tlen, i, n;
+ char *ntxt;
+
+ if ((itp->flags & (LIST_DIRTY|LIST_DYNAMIC)) ||
+ (itp->flags & LIST_INITIALIZED) == 0)
+ {
+ if (itp->flags & (LIST_DIRTY|LIST_DYNAMIC))
+ clean_itemlist (itp);
+ if ((itp->flags & LIST_INITIALIZED) == 0)
+ initialize_itemlist (itp);
+ }
+ if (itp->slist == 0)
+ return ((STRINGLIST *)NULL);
+ ret = strlist_create (itp->slist->list_len+1);
+ sl = itp->slist;
+
+ ntxt = bash_dequote_text (text);
+ tlen = STRLEN (ntxt);
+
+ for (i = n = 0; i < sl->list_len; i++)
+ {
+ if (tlen == 0 || STREQN (sl->list[i], ntxt, tlen))
+ ret->list[n++] = STRDUP (sl->list[i]);
+ }
+ ret->list[ret->list_len = n] = (char *)NULL;
+
+ FREE (ntxt);
+ return ret;
+}
+
+/* A wrapper for rl_filename_completion_function that dequotes the filename
+ before attempting completions. */
+static char *
+pcomp_filename_completion_function (text, state)
+ const char *text;
+ int state;
+{
+ static char *dfn; /* dequoted filename */
+ int qc;
+
+ if (state == 0)
+ {
+ FREE (dfn);
+ /* remove backslashes quoting special characters in filenames. */
+#if 1
+ if (RL_ISSTATE (RL_STATE_COMPLETING) && rl_filename_dequoting_function)
+#else
+ if (rl_filename_dequoting_function)
+#endif
+ {
+ /* Use rl_completion_quote_character because any single or
+ double quotes have been removed by the time TEXT makes it
+ here, and we don't want to remove backslashes inside
+ quoted strings. */
+ dfn = (*rl_filename_dequoting_function) ((char *)text, rl_completion_quote_character);
+ }
+ else
+ dfn = savestring (text);
+ }
+
+ return (rl_filename_completion_function (dfn, state));
+}
+
+#define GEN_COMPS(bmap, flag, it, text, glist, tlist) \
+ do { \
+ if (bmap & flag) \
+ { \
+ tlist = gen_matches_from_itemlist (it, text); \
+ if (tlist) \
+ { \
+ glist = strlist_append (glist, tlist); \
+ strlist_dispose (tlist); \
+ } \
+ } \
+ } while (0)
+
+#define GEN_XCOMPS(bmap, flag, text, func, cmatches, glist, tlist) \
+ do { \
+ if (bmap & flag) \
+ { \
+ cmatches = rl_completion_matches (text, func); \
+ tlist = completions_to_stringlist (cmatches); \
+ glist = strlist_append (glist, tlist); \
+ strvec_dispose (cmatches); \
+ strlist_dispose (tlist); \
+ } \
+ } while (0)
+
+/* Functions to generate lists of matches from the actions member of CS. */
+
+static STRINGLIST *
+gen_action_completions (cs, text)
+ COMPSPEC *cs;
+ const char *text;
+{
+ STRINGLIST *ret, *tmatches;
+ char **cmatches; /* from rl_completion_matches ... */
+ unsigned long flags;
+
+ ret = tmatches = (STRINGLIST *)NULL;
+ flags = cs->actions;
+
+ GEN_COMPS (flags, CA_ALIAS, &it_aliases, text, ret, tmatches);
+ GEN_COMPS (flags, CA_ARRAYVAR, &it_arrayvars, text, ret, tmatches);
+ GEN_COMPS (flags, CA_BINDING, &it_bindings, text, ret, tmatches);
+ GEN_COMPS (flags, CA_BUILTIN, &it_builtins, text, ret, tmatches);
+ GEN_COMPS (flags, CA_DISABLED, &it_disabled, text, ret, tmatches);
+ GEN_COMPS (flags, CA_ENABLED, &it_enabled, text, ret, tmatches);
+ GEN_COMPS (flags, CA_EXPORT, &it_exports, text, ret, tmatches);
+ GEN_COMPS (flags, CA_FUNCTION, &it_functions, text, ret, tmatches);
+ GEN_COMPS (flags, CA_HOSTNAME, &it_hostnames, text, ret, tmatches);
+ GEN_COMPS (flags, CA_JOB, &it_jobs, text, ret, tmatches);
+ GEN_COMPS (flags, CA_KEYWORD, &it_keywords, text, ret, tmatches);
+ GEN_COMPS (flags, CA_RUNNING, &it_running, text, ret, tmatches);
+ GEN_COMPS (flags, CA_SETOPT, &it_setopts, text, ret, tmatches);
+ GEN_COMPS (flags, CA_SHOPT, &it_shopts, text, ret, tmatches);
+ GEN_COMPS (flags, CA_SIGNAL, &it_signals, text, ret, tmatches);
+ GEN_COMPS (flags, CA_STOPPED, &it_stopped, text, ret, tmatches);
+ GEN_COMPS (flags, CA_VARIABLE, &it_variables, text, ret, tmatches);
+
+ GEN_XCOMPS(flags, CA_COMMAND, text, command_word_completion_function, cmatches, ret, tmatches);
+ GEN_XCOMPS(flags, CA_FILE, text, pcomp_filename_completion_function, cmatches, ret, tmatches);
+ GEN_XCOMPS(flags, CA_USER, text, rl_username_completion_function, cmatches, ret, tmatches);
+ GEN_XCOMPS(flags, CA_GROUP, text, bash_groupname_completion_function, cmatches, ret, tmatches);
+ GEN_XCOMPS(flags, CA_SERVICE, text, bash_servicename_completion_function, cmatches, ret, tmatches);
+
+ /* And lastly, the special case for directories */
+ if (flags & CA_DIRECTORY)
+ {
+ rl_completion_mark_symlink_dirs = 1; /* override user preference */
+ cmatches = bash_directory_completion_matches (text);
+ tmatches = completions_to_stringlist (cmatches);
+ ret = strlist_append (ret, tmatches);
+ strvec_dispose (cmatches);
+ strlist_dispose (tmatches);
+ }
+
+ return ret;
+}
+
+/* Generate a list of matches for CS->globpat. Unresolved: should this use
+ TEXT as a match prefix, or just go without? Currently, the code does not
+ use TEXT, just globs CS->globpat and returns the results. If we do decide
+ to use TEXT, we should call quote_string_for_globbing before the call to
+ glob_filename. */
+static STRINGLIST *
+gen_globpat_matches (cs, text)
+ COMPSPEC *cs;
+ const char *text;
+{
+ STRINGLIST *sl;
+
+ sl = strlist_create (0);
+ sl->list = glob_filename (cs->globpat, 0);
+ if (GLOB_FAILED (sl->list))
+ sl->list = (char **)NULL;
+ if (sl->list)
+ sl->list_len = sl->list_size = strvec_len (sl->list);
+ return sl;
+}
+
+/* Perform the shell word expansions on CS->words and return the results.
+ Again, this ignores TEXT. */
+static STRINGLIST *
+gen_wordlist_matches (cs, text)
+ COMPSPEC *cs;
+ const char *text;
+{
+ WORD_LIST *l, *l2;
+ STRINGLIST *sl;
+ int nw, tlen;
+ char *ntxt; /* dequoted TEXT to use in comparisons */
+
+ if (cs->words == 0 || cs->words[0] == '\0')
+ return ((STRINGLIST *)NULL);
+
+ /* This used to be a simple expand_string(cs->words, 0), but that won't
+ do -- there's no way to split a simple list into individual words
+ that way, since the shell semantics say that word splitting is done
+ only on the results of expansion. */
+ l = split_at_delims (cs->words, strlen (cs->words), (char *)NULL, -1, 0, (int *)NULL, (int *)NULL);
+ if (l == 0)
+ return ((STRINGLIST *)NULL);
+ /* This will jump back to the top level if the expansion fails... */
+ l2 = expand_words_shellexp (l);
+ dispose_words (l);
+
+ nw = list_length (l2);
+ sl = strlist_create (nw + 1);
+
+ ntxt = bash_dequote_text (text);
+ tlen = STRLEN (ntxt);
+
+ for (nw = 0, l = l2; l; l = l->next)
+ {
+ if (tlen == 0 || STREQN (l->word->word, ntxt, tlen))
+ sl->list[nw++] = STRDUP (l->word->word);
+ }
+ sl->list[sl->list_len = nw] = (char *)NULL;
+
+ dispose_words (l2);
+ FREE (ntxt);
+ return sl;
+}
+
+#ifdef ARRAY_VARS
+
+static SHELL_VAR *
+bind_comp_words (lwords)
+ WORD_LIST *lwords;
+{
+ SHELL_VAR *v;
+
+ v = find_variable ("COMP_WORDS");
+ if (v == 0)
+ v = make_new_array_variable ("COMP_WORDS");
+ if (readonly_p (v))
+ VUNSETATTR (v, att_readonly);
+ if (array_p (v) == 0)
+ v = convert_var_to_array (v);
+ v = assign_array_var_from_word_list (v, lwords, 0);
+
+ VUNSETATTR (v, att_invisible);
+ return v;
+}
+#endif /* ARRAY_VARS */
+
+static void
+bind_compfunc_variables (line, ind, lwords, cw, exported)
+ char *line;
+ int ind;
+ WORD_LIST *lwords;
+ int cw, exported;
+{
+ char ibuf[INT_STRLEN_BOUND(int) + 1];
+ char *value;
+ SHELL_VAR *v;
+
+ /* Set the variables that the function expects while it executes. Maybe
+ these should be in the function environment (temporary_env). */
+ v = bind_variable ("COMP_LINE", line, 0);
+ if (v && exported)
+ VSETATTR(v, att_exported);
+
+ value = inttostr (ind, ibuf, sizeof(ibuf));
+ v = bind_int_variable ("COMP_POINT", value);
+ if (v && exported)
+ VSETATTR(v, att_exported);
+
+ value = inttostr (rl_completion_type, ibuf, sizeof (ibuf));
+ v = bind_int_variable ("COMP_TYPE", value);
+ if (v && exported)
+ VSETATTR(v, att_exported);
+
+ value = inttostr (rl_completion_invoking_key, ibuf, sizeof (ibuf));
+ v = bind_int_variable ("COMP_KEY", value);
+ if (v && exported)
+ VSETATTR(v, att_exported);
+
+ /* Since array variables can't be exported, we don't bother making the
+ array of words. */
+ if (exported == 0)
+ {
+#ifdef ARRAY_VARS
+ v = bind_comp_words (lwords);
+ value = inttostr (cw, ibuf, sizeof(ibuf));
+ bind_int_variable ("COMP_CWORD", value);
+#endif
+ }
+ else
+ array_needs_making = 1;
+}
+
+static void
+unbind_compfunc_variables (exported)
+ int exported;
+{
+ unbind_variable ("COMP_LINE");
+ unbind_variable ("COMP_POINT");
+ unbind_variable ("COMP_TYPE");
+ unbind_variable ("COMP_KEY");
+#ifdef ARRAY_VARS
+ unbind_variable ("COMP_WORDS");
+ unbind_variable ("COMP_CWORD");
+#endif
+ if (exported)
+ array_needs_making = 1;
+}
+
+/* Build the list of words to pass to a function or external command
+ as arguments. When the function or command is invoked,
+
+ $0 == function or command being invoked
+ $1 == command name
+ $2 == word to be completed (possibly null)
+ $3 == previous word
+
+ Functions can access all of the words in the current command line
+ with the COMP_WORDS array. External commands cannot; they have to
+ make do with the COMP_LINE and COMP_POINT variables. */
+
+static WORD_LIST *
+build_arg_list (cmd, text, lwords, ind)
+ char *cmd;
+ const char *text;
+ WORD_LIST *lwords;
+ int ind;
+{
+ WORD_LIST *ret, *cl, *l;
+ WORD_DESC *w;
+ int i;
+
+ ret = (WORD_LIST *)NULL;
+ w = make_word (cmd);
+ ret = make_word_list (w, (WORD_LIST *)NULL);
+
+ w = (lwords && lwords->word) ? copy_word (lwords->word) : make_word ("");
+ cl = ret->next = make_word_list (w, (WORD_LIST *)NULL);
+
+ w = make_word (text);
+ cl->next = make_word_list (w, (WORD_LIST *)NULL);
+ cl = cl->next;
+
+ /* Search lwords for current word */
+ for (l = lwords, i = 1; l && i < ind-1; l = l->next, i++)
+ ;
+ w = (l && l->word) ? copy_word (l->word) : make_word ("");
+ cl->next = make_word_list (w, (WORD_LIST *)NULL);
+
+ return ret;
+}
+
+/* Build a command string with
+ $0 == cs->funcname (function to execute for completion list)
+ $1 == command name (command being completed)
+ $2 = word to be completed (possibly null)
+ $3 = previous word
+ and run in the current shell. The function should put its completion
+ list into the array variable COMPREPLY. We build a STRINGLIST
+ from the results and return it.
+
+ Since the shell function should return its list of matches in an array
+ variable, this does nothing if arrays are not compiled into the shell. */
+
+static STRINGLIST *
+gen_shell_function_matches (cs, text, line, ind, lwords, nw, cw, foundp)
+ COMPSPEC *cs;
+ const char *text;
+ char *line;
+ int ind;
+ WORD_LIST *lwords;
+ int nw, cw;
+ int *foundp;
+{
+ char *funcname;
+ STRINGLIST *sl;
+ SHELL_VAR *f, *v;
+ WORD_LIST *cmdlist;
+ int fval, found;
+ sh_parser_state_t ps;
+ sh_parser_state_t * restrict pps;
+#if defined (ARRAY_VARS)
+ ARRAY *a;
+#endif
+
+ found = 0;
+ if (foundp)
+ *foundp = found;
+
+ funcname = cs->funcname;
+ f = find_function (funcname);
+ if (f == 0)
+ {
+ internal_error (_("completion: function `%s' not found"), funcname);
+ rl_ding ();
+ rl_on_new_line ();
+ return ((STRINGLIST *)NULL);
+ }
+
+#if !defined (ARRAY_VARS)
+ return ((STRINGLIST *)NULL);
+#else
+
+ /* We pass cw - 1 because command_line_to_word_list returns indices that are
+ 1-based, while bash arrays are 0-based. */
+ bind_compfunc_variables (line, ind, lwords, cw - 1, 0);
+
+ cmdlist = build_arg_list (funcname, text, lwords, cw);
+
+ pps = &ps;
+ save_parser_state (pps);
+ begin_unwind_frame ("gen-shell-function-matches");
+ add_unwind_protect (restore_parser_state, (char *)pps);
+ add_unwind_protect (dispose_words, (char *)cmdlist);
+ add_unwind_protect (unbind_compfunc_variables, (char *)0);
+
+ fval = execute_shell_function (f, cmdlist);
+
+ discard_unwind_frame ("gen-shell-function-matches");
+ restore_parser_state (pps);
+
+ found = fval != EX_NOTFOUND;
+ if (fval == EX_RETRYFAIL)
+ found |= PCOMP_RETRYFAIL;
+ if (foundp)
+ *foundp = found;
+
+ /* Now clean up and destroy everything. */
+ dispose_words (cmdlist);
+ unbind_compfunc_variables (0);
+
+ /* The list of completions is returned in the array variable COMPREPLY. */
+ v = find_variable ("COMPREPLY");
+ if (v == 0)
+ return ((STRINGLIST *)NULL);
+ if (array_p (v) == 0)
+ v = convert_var_to_array (v);
+
+ VUNSETATTR (v, att_invisible);
+
+ a = array_cell (v);
+ if (found == 0 || (found & PCOMP_RETRYFAIL) || a == 0 || array_empty (a))
+ sl = (STRINGLIST *)NULL;
+ else
+ {
+ /* XXX - should we filter the list of completions so only those matching
+ TEXT are returned? Right now, we do not. */
+ sl = strlist_create (0);
+ sl->list = array_to_argv (a);
+ sl->list_len = sl->list_size = array_num_elements (a);
+ }
+
+ /* XXX - should we unbind COMPREPLY here? */
+ unbind_variable ("COMPREPLY");
+
+ return (sl);
+#endif
+}
+
+/* Build a command string with
+ $0 == cs->command (command to execute for completion list)
+ $1 == command name (command being completed)
+ $2 = word to be completed (possibly null)
+ $3 = previous word
+ and run in with command substitution. Parse the results, one word
+ per line, with backslashes allowed to escape newlines. Build a
+ STRINGLIST from the results and return it. */
+
+static STRINGLIST *
+gen_command_matches (cs, text, line, ind, lwords, nw, cw)
+ COMPSPEC *cs;
+ const char *text;
+ char *line;
+ int ind;
+ WORD_LIST *lwords;
+ int nw, cw;
+{
+ char *csbuf, *cscmd, *t;
+ int cmdlen, cmdsize, n, ws, we;
+ WORD_LIST *cmdlist, *cl;
+ WORD_DESC *tw;
+ STRINGLIST *sl;
+
+ bind_compfunc_variables (line, ind, lwords, cw, 1);
+ cmdlist = build_arg_list (cs->command, text, lwords, cw);
+
+ /* Estimate the size needed for the buffer. */
+ n = strlen (cs->command);
+ cmdsize = n + 1;
+ for (cl = cmdlist->next; cl; cl = cl->next)
+ cmdsize += STRLEN (cl->word->word) + 3;
+ cmdsize += 2;
+
+ /* allocate the string for the command and fill it in. */
+ cscmd = (char *)xmalloc (cmdsize + 1);
+
+ strcpy (cscmd, cs->command); /* $0 */
+ cmdlen = n;
+ cscmd[cmdlen++] = ' ';
+ for (cl = cmdlist->next; cl; cl = cl->next) /* $1, $2, $3, ... */
+ {
+ t = sh_single_quote (cl->word->word ? cl->word->word : "");
+ n = strlen (t);
+ RESIZE_MALLOCED_BUFFER (cscmd, cmdlen, n + 2, cmdsize, 64);
+ strcpy (cscmd + cmdlen, t);
+ cmdlen += n;
+ if (cl->next)
+ cscmd[cmdlen++] = ' ';
+ free (t);
+ }
+ cscmd[cmdlen] = '\0';
+
+ tw = command_substitute (cscmd, 0);
+ csbuf = tw ? tw->word : (char *)NULL;
+ dispose_word_desc (tw);
+
+ /* Now clean up and destroy everything. */
+ dispose_words (cmdlist);
+ free (cscmd);
+ unbind_compfunc_variables (1);
+
+ if (csbuf == 0 || *csbuf == '\0')
+ {
+ FREE (csbuf);
+ return ((STRINGLIST *)NULL);
+ }
+
+ /* Now break CSBUF up at newlines, with backslash allowed to escape a
+ newline, and put the individual words into a STRINGLIST. */
+ sl = strlist_create (16);
+ for (ws = 0; csbuf[ws]; )
+ {
+ we = ws;
+ while (csbuf[we] && csbuf[we] != '\n')
+ {
+ if (csbuf[we] == '\\' && csbuf[we+1] == '\n')
+ we++;
+ we++;
+ }
+ t = substring (csbuf, ws, we);
+ if (sl->list_len >= sl->list_size - 1)
+ strlist_resize (sl, sl->list_size + 16);
+ sl->list[sl->list_len++] = t;
+ while (csbuf[we] == '\n') we++;
+ ws = we;
+ }
+ sl->list[sl->list_len] = (char *)NULL;
+
+ free (csbuf);
+ return (sl);
+}
+
+static WORD_LIST *
+command_line_to_word_list (line, llen, sentinel, nwp, cwp)
+ char *line;
+ int llen, sentinel, *nwp, *cwp;
+{
+ WORD_LIST *ret;
+ char *delims;
+
+#if 0
+ delims = "()<>;&| \t\n"; /* shell metacharacters break words */
+#else
+ delims = rl_completer_word_break_characters;
+#endif
+ ret = split_at_delims (line, llen, delims, sentinel, SD_NOQUOTEDELIM, nwp, cwp);
+ return (ret);
+}
+
+/* Evaluate COMPSPEC *cs and return all matches for WORD. */
+
+STRINGLIST *
+gen_compspec_completions (cs, cmd, word, start, end, foundp)
+ COMPSPEC *cs;
+ const char *cmd;
+ const char *word;
+ int start, end;
+ int *foundp;
+{
+ STRINGLIST *ret, *tmatches;
+ char *line;
+ int llen, nw, cw, found, foundf;
+ WORD_LIST *lwords;
+ COMPSPEC *tcs;
+
+ found = 1;
+
+#ifdef DEBUG
+ debug_printf ("gen_compspec_completions (%s, %s, %d, %d)", cmd, word, start, end);
+ debug_printf ("gen_compspec_completions: %s -> %p", cmd, cs);
+#endif
+ ret = gen_action_completions (cs, word);
+#ifdef DEBUG
+ if (ret && progcomp_debug)
+ {
+ debug_printf ("gen_action_completions (%p, %s) -->", cs, word);
+ strlist_print (ret, "\t");
+ rl_on_new_line ();
+ }
+#endif
+
+ /* Now we start generating completions based on the other members of CS. */
+ if (cs->globpat)
+ {
+ tmatches = gen_globpat_matches (cs, word);
+ if (tmatches)
+ {
+#ifdef DEBUG
+ if (progcomp_debug)
+ {
+ debug_printf ("gen_globpat_matches (%p, %s) -->", cs, word);
+ strlist_print (tmatches, "\t");
+ rl_on_new_line ();
+ }
+#endif
+ ret = strlist_append (ret, tmatches);
+ strlist_dispose (tmatches);
+ rl_filename_completion_desired = 1;
+ }
+ }
+
+ if (cs->words)
+ {
+ tmatches = gen_wordlist_matches (cs, word);
+ if (tmatches)
+ {
+#ifdef DEBUG
+ if (progcomp_debug)
+ {
+ debug_printf ("gen_wordlist_matches (%p, %s) -->", cs, word);
+ strlist_print (tmatches, "\t");
+ rl_on_new_line ();
+ }
+#endif
+ ret = strlist_append (ret, tmatches);
+ strlist_dispose (tmatches);
+ }
+ }
+
+ lwords = (WORD_LIST *)NULL;
+ line = (char *)NULL;
+ if (cs->command || cs->funcname)
+ {
+ /* If we have a command or function to execute, we need to first break
+ the command line into individual words, find the number of words,
+ and find the word in the list containing the word to be completed. */
+ line = substring (rl_line_buffer, start, end);
+ llen = end - start;
+
+#ifdef DEBUG
+ debug_printf ("command_line_to_word_list (%s, %d, %d, %p, %p)",
+ line, llen, rl_point - start, &nw, &cw);
+#endif
+ lwords = command_line_to_word_list (line, llen, rl_point - start, &nw, &cw);
+#ifdef DEBUG
+ if (lwords == 0 && llen > 0)
+ debug_printf ("ERROR: command_line_to_word_list returns NULL");
+ else if (progcomp_debug)
+ {
+ debug_printf ("command_line_to_word_list -->");
+ printf ("\t");
+ print_word_list (lwords, "!");
+ printf ("\n");
+ fflush(stdout);
+ rl_on_new_line ();
+ }
+#endif
+ }
+
+ if (cs->funcname)
+ {
+ foundf = 0;
+ tmatches = gen_shell_function_matches (cs, word, line, rl_point - start, lwords, nw, cw, &foundf);
+ if (foundf != 0)
+ found = foundf;
+ if (tmatches)
+ {
+#ifdef DEBUG
+ if (progcomp_debug)
+ {
+ debug_printf ("gen_shell_function_matches (%p, %s, %p, %d, %d) -->", cs, word, lwords, nw, cw);
+ strlist_print (tmatches, "\t");
+ rl_on_new_line ();
+ }
+#endif
+ ret = strlist_append (ret, tmatches);
+ strlist_dispose (tmatches);
+ }
+ }
+
+ if (cs->command)
+ {
+ tmatches = gen_command_matches (cs, word, line, rl_point - start, lwords, nw, cw);
+ if (tmatches)
+ {
+#ifdef DEBUG
+ if (progcomp_debug)
+ {
+ debug_printf ("gen_command_matches (%p, %s, %p, %d, %d) -->", cs, word, lwords, nw, cw);
+ strlist_print (tmatches, "\t");
+ rl_on_new_line ();
+ }
+#endif
+ ret = strlist_append (ret, tmatches);
+ strlist_dispose (tmatches);
+ }
+ }
+
+ if (cs->command || cs->funcname)
+ {
+ if (lwords)
+ dispose_words (lwords);
+ FREE (line);
+ }
+
+ if (foundp)
+ *foundp = found;
+
+ if (found == 0 || (found & PCOMP_RETRYFAIL))
+ {
+ strlist_dispose (ret);
+ return NULL;
+ }
+
+ if (cs->filterpat)
+ {
+ tmatches = filter_stringlist (ret, cs->filterpat, word);
+#ifdef DEBUG
+ if (progcomp_debug)
+ {
+ debug_printf ("filter_stringlist (%p, %s, %s) -->", ret, cs->filterpat, word);
+ strlist_print (tmatches, "\t");
+ rl_on_new_line ();
+ }
+#endif
+ if (ret && ret != tmatches)
+ {
+ FREE (ret->list);
+ free (ret);
+ }
+ ret = tmatches;
+ }
+
+ if (cs->prefix || cs->suffix)
+ ret = strlist_prefix_suffix (ret, cs->prefix, cs->suffix);
+
+ /* If no matches have been generated and the user has specified that
+ directory completion should be done as a default, call
+ gen_action_completions again to generate a list of matching directory
+ names. */
+ if ((ret == 0 || ret->list_len == 0) && (cs->options & COPT_DIRNAMES))
+ {
+ tcs = compspec_create ();
+ tcs->actions = CA_DIRECTORY;
+ ret = gen_action_completions (tcs, word);
+ compspec_dispose (tcs);
+ }
+ else if (cs->options & COPT_PLUSDIRS)
+ {
+ tcs = compspec_create ();
+ tcs->actions = CA_DIRECTORY;
+ tmatches = gen_action_completions (tcs, word);
+ ret = strlist_append (ret, tmatches);
+ strlist_dispose (tmatches);
+ compspec_dispose (tcs);
+ }
+
+ return (ret);
+}
+
+void
+pcomp_set_readline_variables (flags, nval)
+ int flags, nval;
+{
+ /* If the user specified that the compspec returns filenames, make
+ sure that readline knows it. */
+ if (flags & COPT_FILENAMES)
+ rl_filename_completion_desired = nval;
+ /* If the user doesn't want a space appended, tell readline. */
+ if (flags & COPT_NOSPACE)
+ rl_completion_suppress_append = nval;
+}
+
+/* Set or unset FLAGS in the options word of the current compspec.
+ SET_OR_UNSET is 1 for setting, 0 for unsetting. */
+void
+pcomp_set_compspec_options (cs, flags, set_or_unset)
+ COMPSPEC *cs;
+ int flags, set_or_unset;
+{
+ if (cs == 0 && ((cs = pcomp_curcs) == 0))
+ return;
+ if (set_or_unset)
+ cs->options |= flags;
+ else
+ cs->options &= ~flags;
+}
+
+static STRINGLIST *
+gen_progcomp_completions (ocmd, cmd, word, start, end, foundp, retryp, lastcs)
+ const char *ocmd;
+ const char *cmd;
+ const char *word;
+ int start, end;
+ int *foundp, *retryp;
+ COMPSPEC **lastcs;
+{
+ COMPSPEC *cs, *oldcs;
+ const char *oldcmd;
+ STRINGLIST *ret;
+
+ cs = progcomp_search (ocmd);
+
+ if (cs == 0 || cs == *lastcs)
+ return (NULL);
+
+ if (*lastcs)
+ compspec_dispose (*lastcs);
+ cs->refcount++; /* XXX */
+ *lastcs = cs;
+
+ cs = compspec_copy (cs);
+
+ oldcs = pcomp_curcs;
+ oldcmd = pcomp_curcmd;
+
+ pcomp_curcs = cs;
+ pcomp_curcmd = cmd;
+
+ ret = gen_compspec_completions (cs, cmd, word, start, end, foundp);
+
+ pcomp_curcs = oldcs;
+ pcomp_curcmd = oldcmd;
+
+ /* We need to conditionally handle setting *retryp here */
+ if (retryp)
+ *retryp = foundp && (*foundp & PCOMP_RETRYFAIL);
+
+ if (foundp)
+ {
+ *foundp &= ~PCOMP_RETRYFAIL;
+ *foundp |= cs->options;
+ }
+
+ compspec_dispose (cs);
+ return ret;
+}
+
+/* The driver function for the programmable completion code. Returns a list
+ of matches for WORD, which is an argument to command CMD. START and END
+ bound the command currently being completed in rl_line_buffer. */
+char **
+programmable_completions (cmd, word, start, end, foundp)
+ const char *cmd;
+ const char *word;
+ int start, end, *foundp;
+{
+ COMPSPEC *cs, *lastcs;
+ STRINGLIST *ret;
+ char **rmatches, *t;
+ int found, retry, count;
+
+ lastcs = 0;
+ found = count = 0;
+
+ do
+ {
+ retry = 0;
+
+ /* We look at the basename of CMD if the full command does not have
+ an associated COMPSPEC. */
+ ret = gen_progcomp_completions (cmd, cmd, word, start, end, &found, &retry, &lastcs);
+ if (found == 0)
+ {
+ t = strrchr (cmd, '/');
+ if (t && *(++t))
+ ret = gen_progcomp_completions (t, cmd, word, start, end, &found, &retry, &lastcs);
+ }
+
+ if (found == 0)
+ ret = gen_progcomp_completions (DEFAULTCMD, cmd, word, start, end, &found, &retry, &lastcs);
+
+ count++;
+
+ if (count > 32)
+ {
+ internal_warning ("programmable_completion: %s: possible retry loop", cmd);
+ break;
+ }
+ }
+ while (retry);
+
+ if (ret)
+ {
+ rmatches = ret->list;
+ free (ret);
+ }
+ else
+ rmatches = (char **)NULL;
+
+ if (foundp)
+ *foundp = found;
+
+ if (lastcs) /* XXX - should be while? */
+ compspec_dispose (lastcs);
+
+ return (rmatches);
+}
+
+#endif /* PROGRAMMABLE_COMPLETION */
diff --git a/pcomplete.h b/pcomplete.h
new file mode 100644
index 0000000..dacbcef
--- /dev/null
+++ b/pcomplete.h
@@ -0,0 +1,161 @@
+/* pcomplete.h - structure definitions and other stuff for programmable
+ completion. */
+
+/* Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_PCOMPLETE_H_)
+# define _PCOMPLETE_H_
+
+#include "stdc.h"
+#include "hashlib.h"
+
+typedef struct compspec {
+ int refcount;
+ unsigned long actions;
+ unsigned long options;
+ char *globpat;
+ char *words;
+ char *prefix;
+ char *suffix;
+ char *funcname;
+ char *command;
+ char *filterpat;
+} COMPSPEC;
+
+/* Values for COMPSPEC actions. These are things the shell knows how to
+ build internally. */
+#define CA_ALIAS (1<<0)
+#define CA_ARRAYVAR (1<<1)
+#define CA_BINDING (1<<2)
+#define CA_BUILTIN (1<<3)
+#define CA_COMMAND (1<<4)
+#define CA_DIRECTORY (1<<5)
+#define CA_DISABLED (1<<6)
+#define CA_ENABLED (1<<7)
+#define CA_EXPORT (1<<8)
+#define CA_FILE (1<<9)
+#define CA_FUNCTION (1<<10)
+#define CA_GROUP (1<<11)
+#define CA_HELPTOPIC (1<<12)
+#define CA_HOSTNAME (1<<13)
+#define CA_JOB (1<<14)
+#define CA_KEYWORD (1<<15)
+#define CA_RUNNING (1<<16)
+#define CA_SERVICE (1<<17)
+#define CA_SETOPT (1<<18)
+#define CA_SHOPT (1<<19)
+#define CA_SIGNAL (1<<20)
+#define CA_STOPPED (1<<21)
+#define CA_USER (1<<22)
+#define CA_VARIABLE (1<<23)
+
+/* Values for COMPSPEC options field. */
+#define COPT_RESERVED (1<<0) /* reserved for other use */
+#define COPT_DEFAULT (1<<1)
+#define COPT_FILENAMES (1<<2)
+#define COPT_DIRNAMES (1<<3)
+#define COPT_NOSPACE (1<<4)
+#define COPT_BASHDEFAULT (1<<5)
+#define COPT_PLUSDIRS (1<<6)
+
+/* List of items is used by the code that implements the programmable
+ completions. */
+typedef struct _list_of_items {
+ int flags;
+ int (*list_getter) __P((struct _list_of_items *)); /* function to call to get the list */
+
+ STRINGLIST *slist;
+
+ /* These may or may not be used. */
+ STRINGLIST *genlist; /* for handing to the completion code one item at a time */
+ int genindex; /* index of item last handed to completion code */
+
+} ITEMLIST;
+
+/* Values for ITEMLIST -> flags */
+#define LIST_DYNAMIC 0x001
+#define LIST_DIRTY 0x002
+#define LIST_INITIALIZED 0x004
+#define LIST_MUSTSORT 0x008
+#define LIST_DONTFREE 0x010
+#define LIST_DONTFREEMEMBERS 0x020
+
+#define EMPTYCMD "_EmptycmD_"
+#define DEFAULTCMD "_DefaultCmD_"
+
+extern HASH_TABLE *prog_completes;
+extern int prog_completion_enabled;
+
+/* Not all of these are used yet. */
+extern ITEMLIST it_aliases;
+extern ITEMLIST it_arrayvars;
+extern ITEMLIST it_bindings;
+extern ITEMLIST it_builtins;
+extern ITEMLIST it_commands;
+extern ITEMLIST it_directories;
+extern ITEMLIST it_disabled;
+extern ITEMLIST it_enabled;
+extern ITEMLIST it_exports;
+extern ITEMLIST it_files;
+extern ITEMLIST it_functions;
+extern ITEMLIST it_groups;
+extern ITEMLIST it_hostnames;
+extern ITEMLIST it_jobs;
+extern ITEMLIST it_keywords;
+extern ITEMLIST it_running;
+extern ITEMLIST it_services;
+extern ITEMLIST it_setopts;
+extern ITEMLIST it_shopts;
+extern ITEMLIST it_signals;
+extern ITEMLIST it_stopped;
+extern ITEMLIST it_users;
+extern ITEMLIST it_variables;
+
+extern COMPSPEC *pcomp_curcs;
+extern const char *pcomp_curcmd;
+
+/* Functions from pcomplib.c */
+extern COMPSPEC *compspec_create __P((void));
+extern void compspec_dispose __P((COMPSPEC *));
+extern COMPSPEC *compspec_copy __P((COMPSPEC *));
+
+extern void progcomp_create __P((void));
+extern void progcomp_flush __P((void));
+extern void progcomp_dispose __P((void));
+
+extern int progcomp_size __P((void));
+
+extern int progcomp_insert __P((char *, COMPSPEC *));
+extern int progcomp_remove __P((char *));
+
+extern COMPSPEC *progcomp_search __P((const char *));
+
+extern void progcomp_walk __P((hash_wfunc *));
+
+/* Functions from pcomplete.c */
+extern void set_itemlist_dirty __P((ITEMLIST *));
+
+extern STRINGLIST *completions_to_stringlist __P((char **));
+
+extern STRINGLIST *gen_compspec_completions __P((COMPSPEC *, const char *, const char *, int, int, int *));
+extern char **programmable_completions __P((const char *, const char *, int, int, int *));
+
+extern void pcomp_set_readline_variables __P((int, int));
+extern void pcomp_set_compspec_options __P((COMPSPEC *, int, int));
+#endif /* _PCOMPLETE_H_ */
diff --git a/pcomplib.c b/pcomplib.c
new file mode 100644
index 0000000..fc4fbe4
--- /dev/null
+++ b/pcomplib.c
@@ -0,0 +1,225 @@
+/* pcomplib.c - library functions for programmable completion. */
+
+/* Copyright (C) 1999-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#if defined (PROGRAMMABLE_COMPLETION)
+
+#include "bashansi.h"
+#include <stdio.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include "bashintl.h"
+
+#include "shell.h"
+#include "pcomplete.h"
+
+#define COMPLETE_HASH_BUCKETS 32 /* must be power of two */
+
+#define STRDUP(x) ((x) ? savestring (x) : (char *)NULL)
+
+HASH_TABLE *prog_completes = (HASH_TABLE *)NULL;
+
+static void free_progcomp __P((PTR_T));
+
+COMPSPEC *
+compspec_create ()
+{
+ COMPSPEC *ret;
+
+ ret = (COMPSPEC *)xmalloc (sizeof (COMPSPEC));
+ ret->refcount = 0;
+
+ ret->actions = (unsigned long)0;
+ ret->options = (unsigned long)0;
+
+ ret->globpat = (char *)NULL;
+ ret->words = (char *)NULL;
+ ret->prefix = (char *)NULL;
+ ret->suffix = (char *)NULL;
+ ret->funcname = (char *)NULL;
+ ret->command = (char *)NULL;
+ ret->filterpat = (char *)NULL;
+
+ return ret;
+}
+
+void
+compspec_dispose (cs)
+ COMPSPEC *cs;
+{
+ cs->refcount--;
+ if (cs->refcount == 0)
+ {
+ FREE (cs->globpat);
+ FREE (cs->words);
+ FREE (cs->prefix);
+ FREE (cs->suffix);
+ FREE (cs->funcname);
+ FREE (cs->command);
+ FREE (cs->filterpat);
+
+ free (cs);
+ }
+}
+
+COMPSPEC *
+compspec_copy (cs)
+ COMPSPEC *cs;
+{
+ COMPSPEC *new;
+
+ new = (COMPSPEC *)xmalloc (sizeof (COMPSPEC));
+
+ new->refcount = cs->refcount;
+ new->actions = cs->actions;
+ new->options = cs->options;
+
+ new->globpat = STRDUP (cs->globpat);
+ new->words = STRDUP (cs->words);
+ new->prefix = STRDUP (cs->prefix);
+ new->suffix = STRDUP (cs->suffix);
+ new->funcname = STRDUP (cs->funcname);
+ new->command = STRDUP (cs->command);
+ new->filterpat = STRDUP (cs->filterpat);
+
+ return new;
+}
+
+void
+progcomp_create ()
+{
+ if (prog_completes == 0)
+ prog_completes = hash_create (COMPLETE_HASH_BUCKETS);
+}
+
+int
+progcomp_size ()
+{
+ return (HASH_ENTRIES (prog_completes));
+}
+
+static void
+free_progcomp (data)
+ PTR_T data;
+{
+ COMPSPEC *cs;
+
+ cs = (COMPSPEC *)data;
+ compspec_dispose (cs);
+}
+
+void
+progcomp_flush ()
+{
+ if (prog_completes)
+ hash_flush (prog_completes, free_progcomp);
+}
+
+void
+progcomp_dispose ()
+{
+ if (prog_completes)
+ hash_dispose (prog_completes);
+ prog_completes = (HASH_TABLE *)NULL;
+}
+
+int
+progcomp_remove (cmd)
+ char *cmd;
+{
+ register BUCKET_CONTENTS *item;
+
+ if (prog_completes == 0)
+ return 1;
+
+ item = hash_remove (cmd, prog_completes, 0);
+ if (item)
+ {
+ if (item->data)
+ free_progcomp (item->data);
+ free (item->key);
+ free (item);
+ return (1);
+ }
+ return (0);
+}
+
+int
+progcomp_insert (cmd, cs)
+ char *cmd;
+ COMPSPEC *cs;
+{
+ register BUCKET_CONTENTS *item;
+
+ if (cs == NULL)
+ programming_error (_("progcomp_insert: %s: NULL COMPSPEC"), cmd);
+
+ if (prog_completes == 0)
+ progcomp_create ();
+
+ cs->refcount++;
+ item = hash_insert (cmd, prog_completes, 0);
+ if (item->data)
+ free_progcomp (item->data);
+ else
+ item->key = savestring (cmd);
+ item->data = cs;
+
+ return 1;
+}
+
+COMPSPEC *
+progcomp_search (cmd)
+ const char *cmd;
+{
+ register BUCKET_CONTENTS *item;
+ COMPSPEC *cs;
+
+ if (prog_completes == 0)
+ return ((COMPSPEC *)NULL);
+
+ item = hash_search (cmd, prog_completes, 0);
+
+ if (item == NULL)
+ return ((COMPSPEC *)NULL);
+
+ cs = (COMPSPEC *)item->data;
+
+ return (cs);
+}
+
+void
+progcomp_walk (pfunc)
+ hash_wfunc *pfunc;
+{
+ if (prog_completes == 0 || pfunc == 0 || HASH_ENTRIES (prog_completes) == 0)
+ return;
+
+ hash_walk (prog_completes, pfunc);
+}
+
+#endif /* PROGRAMMABLE_COMPLETION */
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..9ab66f1
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,2 @@
+# Set of available languages.
+en@quot en@boldquot af bg ca cs de eo es et fi fr ga hu id ja lt nl pl pt_BR ro ru sk sv tr vi zh_TW
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644
index 0000000..6730665
--- /dev/null
+++ b/po/Makefile.in.in
@@ -0,0 +1,359 @@
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2003 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU General Public
+# License but which still want to provide support for the GNU gettext
+# functionality.
+# Please note that the actual code of GNU gettext is covered by the GNU
+# General Public License and is *not* in the public domain.
+
+PACKAGE = @PACKAGE_NAME@
+VERSION = @PACKAGE_VERSION@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+topdir = @top_srcdir@
+BUILD_DIR = @BUILD_DIR@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+datarootdir = @datarootdir@
+datadir = @datadir@
+localedir = @localedir@
+
+gettextsrcdir = $(datadir)/gettext/po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
+
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+MSGMERGE = msgmerge
+MSGMERGE_UPDATE = @MSGMERGE@ --update
+MSGINIT = msginit
+MSGCONV = msgconv
+MSGFILTER = msgfilter
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+UPDATEPOFILES = @UPDATEPOFILES@
+DUMMYPOFILES = @DUMMYPOFILES@
+DISTFILES.common = Makefile.in.in remove-potcdate.sin \
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
+DISTFILES = $(DISTFILES.common) Makevars POTFILES.in $(DOMAIN).pot stamp-po \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+
+# Makevars gets inserted here. (Don't remove this line!)
+
+.SUFFIXES:
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update
+
+.po.mo:
+ @echo "$(MSGFMT) -c -o $@ $<"; \
+ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
+
+.po.gmo:
+ @lang=`echo $* | sed -e 's,.*/,,'`; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
+ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+
+.sin.sed:
+ sed -e '/^#/d' $< > t-$@
+ mv t-$@ $@
+
+
+all: all-@USE_NLS@
+
+all-yes: stamp-po
+all-no:
+
+# stamp-po is a timestamp denoting the last time at which the CATALOGS have
+# been loosely updated. Its purpose is that when a developer or translator
+# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
+# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
+# invocations of "make" will do nothing. This timestamp would not be necessary
+# if updating the $(CATALOGS) would always touch them; however, the rule for
+# $(POFILES) has been designed to not touch files that don't need to be
+# changed.
+stamp-po: $(srcdir)/$(DOMAIN).pot
+ test -z "$(CATALOGS)" || $(MAKE) $(CATALOGS)
+ @echo "touch stamp-po"
+ @echo timestamp > stamp-poT
+ @mv stamp-poT stamp-po
+
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
+# otherwise packages like GCC can not be built if only parts of the source
+# have been downloaded.
+
+# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
+# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
+ --files-from=$(srcdir)/POTFILES.in \
+ --copyright-holder='$(COPYRIGHT_HOLDER)'
+ $(MAKE) $(MFLAGS) builtins.pot-update
+ test ! -f $(DOMAIN).po || { \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+ else \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ else \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ }
+
+# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
+# every "make" invocation, only create it when it is missing.
+# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
+$(srcdir)/$(DOMAIN).pot:
+ $(MAKE) $(DOMAIN).pot-update
+
+# This target rebuilds a PO file if $(DOMAIN).pot has changed.
+# Note that a PO file is not touched if it doesn't need to be changed.
+$(POFILES): $(srcdir)/$(DOMAIN).pot
+ @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
+ cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ for file in $(DISTFILES.common) Makevars.template; do \
+ $(INSTALL_DATA) $(srcdir)/$$file \
+ $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ for file in Makevars; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+install-data-no: all
+install-data-yes: all
+ $(mkinstalldirs) $(DESTDIR)$(datadir)
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkinstalldirs) $(DESTDIR)$$dir; \
+ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
+ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
+ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
+ fi; \
+ done; \
+ done
+
+install-strip: install
+
+installdirs: installdirs-exec installdirs-data
+installdirs-exec:
+installdirs-data: installdirs-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
+ else \
+ : ; \
+ fi
+installdirs-data-no:
+installdirs-data-yes:
+ $(mkinstalldirs) $(DESTDIR)$(datadir)
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkinstalldirs) $(DESTDIR)$$dir; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ fi; \
+ done; \
+ done
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall: uninstall-exec uninstall-data
+uninstall-exec:
+uninstall-data: uninstall-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ for file in $(DISTFILES.common) Makevars.template; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+uninstall-data-no:
+uninstall-data-yes:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ done; \
+ done
+
+check: all
+
+info dvi ps pdf html tags TAGS ctags CTAGS ID:
+
+mostlyclean:
+ rm -f remove-potcdate.sed
+ rm -f stamp-poT
+ rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f stamp-po $(GMOFILES)
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir:
+ $(MAKE) update-po
+ @$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ dists="$$dists Makevars.template"; \
+ fi; \
+ if test -f $(srcdir)/ChangeLog; then \
+ dists="$$dists ChangeLog"; \
+ fi; \
+ for i in 0 1 2 3 4 5 6 7 8 9; do \
+ if test -f $(srcdir)/ChangeLog.$$i; then \
+ dists="$$dists ChangeLog.$$i"; \
+ fi; \
+ done; \
+ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
+ for file in $$dists; do \
+ if test -f $$file; then \
+ cp -p $$file $(distdir); \
+ else \
+ cp -p $(srcdir)/$$file $(distdir); \
+ fi; \
+ done
+
+update-po: Makefile
+ $(MAKE) $(DOMAIN).pot-update
+ test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
+ $(MAKE) update-gmo
+
+# General rule for updating PO files.
+
+.nop.po-update:
+ @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
+ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
+ tmpdir=`pwd`; \
+ echo "$$lang:"; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+ cd $(srcdir); \
+ if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$lang.po failed!" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi
+
+$(DUMMYPOFILES):
+
+update-gmo: Makefile $(GMOFILES)
+ @:
+
+Makefile: Makefile.in.in $(top_builddir)/config.status @POMAKEFILEDEPS@ $(srcdir)/Rules-builtins
+ cd $(top_builddir) \
+ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
+ $(SHELL) ./config.status
+
+force:
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po/Makevars b/po/Makevars
new file mode 100644
index 0000000..84b2d95
--- /dev/null
+++ b/po/Makevars
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = $(BUILD_DIR)
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ -C
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
+# package. (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.) Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright. The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+# in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+# understood.
+# - Strings which make invalid assumptions about notation of date, time or
+# money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS = bug-bash@gnu.org
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used. It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..2a8f369
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,81 @@
+# List of source files containing translatable strings.
+# Copyright (C) 2004 Free Software Foundation, Inc.
+
+arrayfunc.c
+bashhist.c
+bashline.c
+braces.c
+builtins/alias.def
+builtins/bind.def
+builtins/break.def
+builtins/caller.def
+builtins/cd.def
+builtins/common.c
+builtins/complete.def
+builtins/declare.def
+builtins/enable.def
+builtins/evalfile.c
+builtins/exec.def
+builtins/exit.def
+builtins/fc.def
+builtins/fg_bg.def
+builtins/getopt.c
+builtins/hash.def
+builtins/help.def
+builtins/history.def
+builtins/inlib.def
+builtins/jobs.def
+builtins/kill.def
+builtins/let.def
+builtins/mapfile.def
+builtins/mkbuiltins.c
+builtins/printf.def
+builtins/pushd.def
+builtins/read.def
+builtins/return.def
+builtins/set.def
+builtins/setattr.def
+builtins/shift.def
+builtins/shopt.def
+builtins/source.def
+builtins/suspend.def
+builtins/type.def
+builtins/ulimit.def
+builtins/umask.def
+error.c
+eval.c
+execute_cmd.c
+expr.c
+general.c
+input.c
+jobs.c
+lib/intl/os2compat.c
+lib/malloc/malloc.c
+lib/malloc/stats.c
+lib/malloc/table.c
+lib/malloc/watch.c
+lib/sh/fmtulong.c
+lib/sh/netopen.c
+locale.c
+mailcheck.c
+make_cmd.c
+nojobs.c
+parse.y
+pcomplete.c
+pcomplib.c
+print_cmd.c
+redir.c
+shell.c
+sig.c
+siglist.c
+subst.c
+test.c
+trap.c
+variables.c
+version.c
+version2.c
+xmalloc.c
+
+# Apparently gettext's defaults cannot handle files that exist outside of the
+# source directory, like in the build directory
+#../builtins/builtins.c
diff --git a/po/README b/po/README
new file mode 100644
index 0000000..979884c
--- /dev/null
+++ b/po/README
@@ -0,0 +1 @@
+This apparently requires GNU sed
diff --git a/po/Rules-builtins b/po/Rules-builtins
new file mode 100644
index 0000000..57df81c
--- /dev/null
+++ b/po/Rules-builtins
@@ -0,0 +1,19 @@
+#
+# Update the strings from the builtins' long docs. Must be called when
+# bash.pot exists, in the middle of the bash.pot-update recipe
+#
+builtins.pot-update: $(top_builddir)/builtins/builtins.c
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_builddir)/builtins \
+ $(XGETTEXT_OPTIONS) --omit-header \
+ --copyright-holder='$(COPYRIGHT_HOLDER)' \
+ --join-existing \
+ builtins.c
+
+# This rule has no dependencies: we don't need to update builtins.pot at
+# every "make" invocation, only create it when it is missing.
+# Only "make builtins.pot-update" or "make dist" will force an update.
+$(srcdir)/builtins.pot:
+ $(MAKE) builtins.pot-update
+
+xdist:
+ $(MAKE) update-po
diff --git a/po/Rules-quot b/po/Rules-quot
new file mode 100644
index 0000000..5f46d23
--- /dev/null
+++ b/po/Rules-quot
@@ -0,0 +1,42 @@
+# Special Makefile rules for English message catalogs with quotation marks.
+
+DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
+
+.SUFFIXES: .insert-header .po-update-en
+
+en@quot.po-update: en@quot.po-update-en
+en@boldquot.po-update: en@boldquot.po-update-en
+
+.insert-header.po-update-en:
+ @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
+ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
+ tmpdir=`pwd`; \
+ echo "$$lang:"; \
+ ll=`echo $$lang | sed -e 's/@.*//'`; \
+ LC_ALL=C; export LC_ALL; \
+ cd $(srcdir); \
+ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "creation of $$lang.po failed!" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi
+
+en@quot.insert-header: insert-header.sin
+ sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
+
+en@boldquot.insert-header: insert-header.sin
+ sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
+
+mostlyclean: mostlyclean-quot
+mostlyclean-quot:
+ rm -f *.insert-header
diff --git a/po/af.gmo b/po/af.gmo
new file mode 100644
index 0000000..bf7d956
--- /dev/null
+++ b/po/af.gmo
Binary files differ
diff --git a/po/af.po b/po/af.po
new file mode 100644
index 0000000..1ae2aa3
--- /dev/null
+++ b/po/af.po
@@ -0,0 +1,4575 @@
+# bash
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Petri Jooste <rkwjpj@puk.ac.za>, 2004.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bash 2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2004-03-17 13:48+0200\n"
+"Last-Translator: Petri Jooste <rkwjpj@puk.ac.za>\n"
+"Language-Team: Afrikaans <i18n@af.org.za>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: arrayfunc.c:50
+#, fuzzy
+msgid "bad array subscript"
+msgstr "Os/2 Biskaart Skikking"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr ""
+
+#: arrayfunc.c:480
+#, fuzzy, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: illegal option -- %c\n"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr ""
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: kan nie %s skep nie"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr ""
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr ""
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr ""
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "%s: illegal option -- %c\n"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr ""
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr ""
+
+#: builtins/bind.def:245
+#, fuzzy, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: kan nie %s skep nie"
+
+#: builtins/bind.def:260
+#, fuzzy, c-format
+msgid "`%s': cannot unbind"
+msgstr "%s: bevel nie gevind nie"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, fuzzy, c-format
+msgid "`%s': unknown function name"
+msgstr "%s: leesalleen-funksie"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr ""
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr ""
+
+#: builtins/break.def:77 builtins/break.def:117
+#, fuzzy
+msgid "loop count"
+msgstr "Afteken"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr ""
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr ""
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr ""
+
+#: builtins/common.c:101
+#, fuzzy, c-format
+msgid "line %d: "
+msgstr "3d modus"
+
+#: builtins/common.c:139 error.c:261
+#, fuzzy, c-format
+msgid "warning: "
+msgstr "besig om te skryf"
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr ""
+
+#: builtins/common.c:166 test.c:827
+#, fuzzy
+msgid "too many arguments"
+msgstr "te veel parameters"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, fuzzy, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: option `%s' requires an argument\n"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr ""
+
+#: builtins/common.c:205
+#, fuzzy, c-format
+msgid "%s: not found"
+msgstr "%s: bevel nie gevind nie"
+
+#: builtins/common.c:214 shell.c:795
+#, fuzzy, c-format
+msgid "%s: invalid option"
+msgstr "%s: illegal option -- %c\n"
+
+#: builtins/common.c:221
+#, fuzzy, c-format
+msgid "%s: invalid option name"
+msgstr "%s: illegal option -- %c\n"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, fuzzy, c-format
+msgid "`%s': not a valid identifier"
+msgstr "Die datum is nie geldige!"
+
+#: builtins/common.c:238
+#, fuzzy
+msgid "invalid octal number"
+msgstr "Die sein nommer wat was gevang het"
+
+#: builtins/common.c:240
+#, fuzzy
+msgid "invalid hex number"
+msgstr "Die sein nommer wat was gevang het"
+
+#: builtins/common.c:242 expr.c:1256
+#, fuzzy
+msgid "invalid number"
+msgstr "Die sein nommer wat was gevang het"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr ""
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr ""
+
+#: builtins/common.c:264 error.c:454
+#, fuzzy, c-format
+msgid "%s: readonly variable"
+msgstr "Veranderlike boom"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr ""
+
+#: builtins/common.c:272 builtins/common.c:274
+#, fuzzy
+msgid "argument"
+msgstr "argument verwag\n"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr ""
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr ""
+
+#: builtins/common.c:290
+#, fuzzy, c-format
+msgid "%s: no job control"
+msgstr "geen taakbeheer in hierdie dop nie"
+
+#: builtins/common.c:292
+#, fuzzy
+msgid "no job control"
+msgstr "geen taakbeheer in hierdie dop nie"
+
+#: builtins/common.c:302
+#, fuzzy, c-format
+msgid "%s: restricted"
+msgstr "Die bediener beëindig Die verbinding."
+
+#: builtins/common.c:304
+#, fuzzy
+msgid "restricted"
+msgstr ""
+"\n"
+"Bevel beëindig\n"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr ""
+
+#: builtins/common.c:321
+#, fuzzy, c-format
+msgid "write error: %s"
+msgstr "pypfout: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr ""
+
+#: builtins/common.c:629 builtins/common.c:631
+#, fuzzy, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: dubbelsinnige herroetering"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr ""
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr ""
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr ""
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr ""
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr ""
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr ""
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr ""
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: leesalleen-funksie"
+
+#: builtins/declare.def:468
+#, fuzzy, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "Kan nie soek 'n handtekening in hierdie boodskap!"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr ""
+
+#: builtins/enable.def:312
+#, fuzzy, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "Kan nie oopmaak vir skrip-afvoer nie: \""
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr ""
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr ""
+
+#: builtins/enable.def:474
+#, fuzzy, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: kan nie %s skep nie"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: is 'n gids"
+
+#: builtins/evalfile.c:139
+#, fuzzy, c-format
+msgid "%s: not a regular file"
+msgstr "%s: kan nie 'n binêre lêer uitvoer nie"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr ""
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: kan nie 'n binêre lêer uitvoer nie"
+
+#: builtins/exec.def:212
+#, fuzzy, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: kan nie %s skep nie"
+
+#: builtins/exit.def:65
+#, fuzzy, c-format
+msgid "logout\n"
+msgstr "Afteken"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr ""
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr ""
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr ""
+
+#: builtins/fc.def:262
+#, fuzzy
+msgid "no command found"
+msgstr "%s: bevel nie gevind nie"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr ""
+
+#: builtins/fc.def:370
+#, fuzzy, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: kan nie %s skep nie"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr ""
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr ""
+
+#: builtins/getopt.c:110
+#, fuzzy, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: illegal option -- %c\n"
+
+#: builtins/getopt.c:111
+#, fuzzy, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: option `%s' requires an argument\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr ""
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr ""
+
+#: builtins/hash.def:244
+#, fuzzy, c-format
+msgid "hits\tcommand\n"
+msgstr "Bevelreël"
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] ""
+msgstr[1] ""
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+
+#: builtins/help.def:185
+#, fuzzy, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: kan nie %s skep nie"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr ""
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr ""
+
+#: builtins/history.def:365
+#, fuzzy, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: heelgetal-uitdrukking is verwag\n"
+
+#: builtins/inlib.def:71
+#, fuzzy, c-format
+msgid "%s: inlib failed"
+msgstr "%s: heelgetal-uitdrukking is verwag\n"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr ""
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr ""
+
+#: builtins/kill.def:263
+#, fuzzy
+msgid "Unknown error"
+msgstr "Onbekende fout %d"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+#, fuzzy
+msgid "expression expected"
+msgstr "Bools uitdrukking verwag"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "Veranderlike boom"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr ""
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr ""
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, fuzzy, c-format
+msgid "%s: invalid line count"
+msgstr "%s: illegal option -- %c\n"
+
+#: builtins/mapfile.def:277
+#, fuzzy, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: illegal option -- %c\n"
+
+#: builtins/mapfile.def:294
+#, fuzzy, c-format
+msgid "%s: invalid callback quantum"
+msgstr "Die sein nommer wat was gevang het"
+
+#: builtins/mapfile.def:326
+#, fuzzy
+msgid "empty array variable name"
+msgstr "Veranderlike boom"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr ""
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr ""
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr ""
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr ""
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr ""
+
+#: builtins/pushd.def:195
+#, fuzzy
+msgid "no other directory"
+msgstr "boonste lêergids."
+
+#: builtins/pushd.def:462
+#, fuzzy
+msgid "<no current directory>"
+msgstr "Nuutste gebruik word werksaam gids"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr ""
+
+#: builtins/pushd.def:508
+#, fuzzy
+msgid "directory stack index"
+msgstr "Stapel grootte verhoog"
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr ""
+
+#: builtins/read.def:588
+#, fuzzy, c-format
+msgid "read error: %d: %s"
+msgstr "pypfout: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr ""
+
+#: builtins/set.def:805
+#, fuzzy, c-format
+msgid "%s: cannot unset"
+msgstr "%s: kan nie %s skep nie"
+
+#: builtins/set.def:812
+#, fuzzy, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: kan nie %s skep nie"
+
+#: builtins/set.def:823
+#, fuzzy, c-format
+msgid "%s: not an array variable"
+msgstr "Veranderlike boom"
+
+#: builtins/setattr.def:186
+#, fuzzy, c-format
+msgid "%s: not a function"
+msgstr "%s: leesalleen-funksie"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+#, fuzzy
+msgid "shift count"
+msgstr "Shift"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr ""
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr ""
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr ""
+
+#: builtins/source.def:153
+#, fuzzy, c-format
+msgid "%s: file not found"
+msgstr "%s: bevel nie gevind nie"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr ""
+
+#: builtins/suspend.def:111
+#, fuzzy
+msgid "cannot suspend a login shell"
+msgstr "Begin aanteken tolk"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr ""
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr ""
+
+#: builtins/type.def:274
+#, fuzzy, c-format
+msgid "%s is a function\n"
+msgstr "%s: leesalleen-funksie"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr ""
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr ""
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr ""
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr ""
+
+#: builtins/ulimit.def:398
+#, fuzzy, c-format
+msgid "`%c': bad command"
+msgstr "%s: illegal option -- %c\n"
+
+#: builtins/ulimit.def:427
+#, fuzzy, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: kan nie %s skep nie"
+
+#: builtins/ulimit.def:453
+#, fuzzy
+msgid "limit"
+msgstr "Filter beperk:"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, fuzzy, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: kan nie %s skep nie"
+
+#: builtins/umask.def:118
+#, fuzzy
+msgid "octal number"
+msgstr "Die sein nommer wat was gevang het"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr ""
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr ""
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr ""
+
+#: error.c:165
+#, fuzzy, c-format
+msgid "last command: %s\n"
+msgstr "Bevelreël"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr ""
+
+#: error.c:406
+#, fuzzy
+msgid "unknown command error"
+msgstr "Onbekende fout %d"
+
+#: error.c:407
+#, fuzzy
+msgid "bad command type"
+msgstr "bevelnaam"
+
+#: error.c:408
+#, fuzzy
+msgid "bad connector"
+msgstr "foutiewe verbinder`%d'"
+
+#: error.c:409
+#, fuzzy
+msgid "bad jump"
+msgstr "Spring na:"
+
+#: error.c:447
+#, fuzzy, c-format
+msgid "%s: unbound variable"
+msgstr "Veranderlike boom"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr ""
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr ""
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr ""
+
+#: execute_cmd.c:2075
+#, fuzzy
+msgid "pipe error"
+msgstr "pypfout: %s"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr ""
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: bevel nie gevind nie"
+
+#: execute_cmd.c:4827
+#, fuzzy, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: is 'n gids"
+
+#: execute_cmd.c:4976
+#, fuzzy, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "kan nie fd %d na fd 0 dupliseer nie: %s"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr ""
+
+#: expr.c:265
+#, fuzzy
+msgid "recursion stack underflow"
+msgstr "Stapel grootte verhoog"
+
+#: expr.c:379
+#, fuzzy
+msgid "syntax error in expression"
+msgstr "Sintaks fout in patroon"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr ""
+
+#: expr.c:440 expr.c:445 expr.c:756
+#, fuzzy
+msgid "division by 0"
+msgstr "devisie by nul."
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr ""
+
+#: expr.c:513
+#, fuzzy
+msgid "`:' expected for conditional expression"
+msgstr "Soek die lêer vir 'n uitdrukking"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr ""
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr ""
+
+#: expr.c:854
+#, fuzzy
+msgid "missing `)'"
+msgstr "Ontbrekende '>'"
+
+#: expr.c:897 expr.c:1176
+#, fuzzy
+msgid "syntax error: operand expected"
+msgstr "Onverwagte einde van lêer tydens inlees van hulpbron."
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr ""
+
+#: expr.c:1202
+#, fuzzy, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr ""
+"Hierdie is die fout boodskap van %1:\n"
+"%2"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr ""
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "waarde te groot vir basis"
+
+#: expr.c:1329
+#, fuzzy, c-format
+msgid "%s: expression error\n"
+msgstr "%s: heelgetal-uitdrukking is verwag\n"
+
+#: general.c:61
+#, fuzzy
+msgid "getcwd: cannot access parent directories"
+msgstr "Kan nie die program uitvoer nie:"
+
+#: input.c:94 subst.c:4857
+#, fuzzy, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "kan nie fd %d na fd 0 dupliseer nie: %s"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr ""
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr ""
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr ""
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr ""
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr ""
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr ""
+
+#: jobs.c:1401
+#, fuzzy, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "E108: Geen veranderlike: \"%s\""
+
+#: jobs.c:1416
+#, fuzzy, c-format
+msgid "Signal %d"
+msgstr "Sein kwaliteit:"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Klaar"
+
+#: jobs.c:1435 siglist.c:123
+#, fuzzy
+msgid "Stopped"
+msgstr "Op gehou"
+
+#: jobs.c:1439
+#, fuzzy, c-format
+msgid "Stopped(%s)"
+msgstr "Op gehou"
+
+#: jobs.c:1443
+#, fuzzy
+msgid "Running"
+msgstr "aktief"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Klaar(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "Verlaat %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Onbekende status"
+
+#: jobs.c:1549
+#, fuzzy, c-format
+msgid "(core dumped) "
+msgstr "Kern Ontwikkelaar"
+
+#: jobs.c:1568
+#, fuzzy, c-format
+msgid " (wd: %s)"
+msgstr "Aktiveer nou dadelik"
+
+#: jobs.c:1776
+#, fuzzy, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "Fout in die skryf van %s"
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr ""
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr ""
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr ""
+
+#: jobs.c:2829
+#, fuzzy, c-format
+msgid "%s: job has terminated"
+msgstr "Die bediener beëindig Die verbinding."
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr ""
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, fuzzy, c-format
+msgid "%s: line %d: "
+msgstr "3d modus"
+
+#: jobs.c:3522 nojobs.c:814
+#, fuzzy, c-format
+msgid " (core dumped)"
+msgstr "Kern Ontwikkelaar"
+
+#: jobs.c:3534 jobs.c:3547
+#, fuzzy, c-format
+msgid "(wd now: %s)\n"
+msgstr "Aktiveer nou dadelik"
+
+#: jobs.c:3579
+#, fuzzy
+msgid "initialize_job_control: getpgrp failed"
+msgstr "Inisialisering van OpenGL het misluk."
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr ""
+
+#: jobs.c:3649
+#, fuzzy
+msgid "initialize_job_control: setpgid"
+msgstr "Inisialisering van OpenGL het misluk."
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr ""
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "geen taakbeheer in hierdie dop nie"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:313
+#, fuzzy
+msgid "unknown"
+msgstr "(onbekend)"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr ""
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr ""
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr ""
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr ""
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr ""
+
+#: lib/sh/netopen.c:168
+#, fuzzy, c-format
+msgid "%s: host unknown"
+msgstr "onbekend"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr ""
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr ""
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr ""
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:249
+#, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr ""
+
+#: mailcheck.c:433
+#, fuzzy
+msgid "You have mail in $_"
+msgstr "Bevestig Pos In"
+
+#: mailcheck.c:458
+#, fuzzy
+msgid "You have new mail in $_"
+msgstr "Wanneer nuwe pos arriveer in"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr ""
+
+#: make_cmd.c:323
+#, fuzzy
+msgid "syntax error: arithmetic expression required"
+msgstr "Sintaks fout in patroon"
+
+#: make_cmd.c:325
+#, fuzzy
+msgid "syntax error: `;' unexpected"
+msgstr "Onverwagte einde van lêer tydens inlees van hulpbron."
+
+#: make_cmd.c:326
+#, fuzzy, c-format
+msgid "syntax error: `((%s))'"
+msgstr "sintaksfout"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr ""
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr ""
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr ""
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr ""
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr ""
+
+#: parse.y:3960
+#, fuzzy
+msgid "syntax error in conditional expression"
+msgstr "Sintaks fout in patroon"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr ""
+
+#: parse.y:4042
+#, fuzzy
+msgid "expected `)'"
+msgstr "')' is verwag\n"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr ""
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr ""
+
+#: parse.y:4120
+#, fuzzy, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "%s: binêre operator is verwag\n"
+
+#: parse.y:4124
+#, fuzzy
+msgid "conditional binary operator expected"
+msgstr "%s: binêre operator is verwag\n"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr ""
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr ""
+
+#: parse.y:4161
+#, fuzzy, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "Soek die lêer vir 'n uitdrukking"
+
+#: parse.y:4164
+#, fuzzy, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "Soek die lêer vir 'n uitdrukking"
+
+#: parse.y:4168
+#, fuzzy, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "Soek die lêer vir 'n uitdrukking"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr ""
+
+#: parse.y:5477
+#, fuzzy, c-format
+msgid "syntax error near `%s'"
+msgstr "Sintaks fout in patroon"
+
+#: parse.y:5487
+#, fuzzy
+msgid "syntax error: unexpected end of file"
+msgstr "Onverwagte einde van lêer tydens inlees van hulpbron."
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "sintaksfout"
+
+#: parse.y:5549
+#, fuzzy, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Gebruik Kaart na Los Tronk"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr ""
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr ""
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr ""
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr ""
+
+#: print_cmd.c:363
+#, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr ""
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr ""
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr ""
+
+#: redir.c:166
+#, fuzzy, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: dubbelsinnige herroetering"
+
+#: redir.c:170
+#, fuzzy, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "Jy het gespesifiseer 'n bestaande lêer"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr ""
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr ""
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "Kan nie soek 'n handtekening in hierdie boodskap!"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr ""
+
+#: redir.c:1101
+#, fuzzy
+msgid "redirection error: cannot duplicate fd"
+msgstr "Pypfout.\n"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr ""
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr ""
+
+#: shell.c:884
+#, fuzzy, c-format
+msgid "%c%c: invalid option"
+msgstr "%s: illegal option -- %c\n"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Ek het nie 'n naam nie!"
+
+#: shell.c:1793
+#, fuzzy, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "bedryfstelselkernweergawe"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+
+#: shell.c:1796
+#, fuzzy
+msgid "GNU long options:\n"
+msgstr "Gnu C Saamsteller Opsies"
+
+#: shell.c:1800
+#, fuzzy
+msgid "Shell options:\n"
+msgstr "opneem opsies"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr ""
+
+#: shell.c:1816
+#, fuzzy, c-format
+msgid "\t-%s or -o option\n"
+msgstr ""
+"Gebruik so: %s LÊER \n"
+" of: %s OPSIE\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr ""
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr ""
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Foutiewe sein"
+
+#: siglist.c:51
+#, fuzzy
+msgid "Hangup"
+msgstr "Ophang"
+
+#: siglist.c:55
+#, fuzzy
+msgid "Interrupt"
+msgstr "Interrupt"
+
+#: siglist.c:59
+#, fuzzy
+msgid "Quit"
+msgstr "Verlaat"
+
+#: siglist.c:63
+#, fuzzy
+msgid "Illegal instruction"
+msgstr "Sigill (onwettige instruksie)"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr ""
+
+#: siglist.c:75
+#, fuzzy
+msgid "ABORT instruction"
+msgstr "Verwerking Instruksie"
+
+#: siglist.c:79
+#, fuzzy
+msgid "EMT instruction"
+msgstr "Verwerking Instruksie"
+
+#: siglist.c:83
+#, fuzzy
+msgid "Floating point exception"
+msgstr "wisselpuntgetaluitsondering"
+
+#: siglist.c:87
+#, fuzzy
+msgid "Killed"
+msgstr "Doodgemaak proses."
+
+#: siglist.c:91
+#, fuzzy
+msgid "Bus error"
+msgstr "Pypfout.\n"
+
+#: siglist.c:95
+#, fuzzy
+msgid "Segmentation fault"
+msgstr "Sigsegv (segmentasie oortreding)"
+
+#: siglist.c:99
+#, fuzzy
+msgid "Bad system call"
+msgstr "fork-stelselroep het gefaal"
+
+#: siglist.c:103
+#, fuzzy
+msgid "Broken pipe"
+msgstr "Sigpipe (gebroke pyp)"
+
+#: siglist.c:107
+#, fuzzy
+msgid "Alarm clock"
+msgstr "wêreld horlosie"
+
+#: siglist.c:111
+#, fuzzy
+msgid "Terminated"
+msgstr "Gedruk: %s"
+
+#: siglist.c:115
+#, fuzzy
+msgid "Urgent IO condition"
+msgstr "Ooreenstem enige kondisie"
+
+#: siglist.c:119
+#, fuzzy
+msgid "Stopped (signal)"
+msgstr "Sein kwaliteit:"
+
+#: siglist.c:127
+#, fuzzy
+msgid "Continue"
+msgstr "Gaan voort"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr ""
+
+#: siglist.c:139
+#, fuzzy
+msgid "Stopped (tty input)"
+msgstr "Sigttin (tty invoer)"
+
+#: siglist.c:143
+#, fuzzy
+msgid "Stopped (tty output)"
+msgstr "Sigttou (tty uitset)"
+
+#: siglist.c:147
+#, fuzzy
+msgid "I/O ready"
+msgstr "Gereed."
+
+#: siglist.c:151
+#, fuzzy
+msgid "CPU limit"
+msgstr "Filter beperk:"
+
+#: siglist.c:155
+#, fuzzy
+msgid "File limit"
+msgstr "Filter beperk:"
+
+#: siglist.c:159
+#, fuzzy
+msgid "Alarm (virtual)"
+msgstr "virtuele werkskerms"
+
+#: siglist.c:163
+#, fuzzy
+msgid "Alarm (profile)"
+msgstr "Vee profiel uit..."
+
+#: siglist.c:167
+#, fuzzy
+msgid "Window changed"
+msgstr "Lêer Het verander"
+
+#: siglist.c:171
+#, fuzzy
+msgid "Record lock"
+msgstr "Sluit Lêers"
+
+#: siglist.c:175
+#, fuzzy
+msgid "User signal 1"
+msgstr "Gebruiker Sein 1"
+
+#: siglist.c:179
+#, fuzzy
+msgid "User signal 2"
+msgstr "Gebruiker Sein 1"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr ""
+
+#: siglist.c:187
+#, fuzzy
+msgid "power failure imminent"
+msgstr "Vaaling na Uitpak"
+
+#: siglist.c:191
+#, fuzzy
+msgid "system crash imminent"
+msgstr "Die Kde Omval Handteerder"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr ""
+
+#: siglist.c:199
+#, fuzzy
+msgid "programming error"
+msgstr "Pypfout.\n"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr ""
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr ""
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr ""
+
+#: siglist.c:215
+msgid "Information request"
+msgstr ""
+
+#: siglist.c:223
+#, fuzzy
+msgid "Unknown Signal #"
+msgstr "Sein kwaliteit:"
+
+#: siglist.c:225
+#, fuzzy, c-format
+msgid "Unknown Signal #%d"
+msgstr "Sein kwaliteit:"
+
+#: subst.c:1333 subst.c:1454
+#, fuzzy, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "--Geen reëls in buffer--"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr ""
+
+#: subst.c:4754 subst.c:4770
+#, fuzzy
+msgid "cannot make pipe for process substitution"
+msgstr "Woord Substitusie"
+
+#: subst.c:4802
+#, fuzzy
+msgid "cannot make child for process substitution"
+msgstr "Woord Substitusie"
+
+#: subst.c:4847
+#, fuzzy, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "Kan nie oopmaak vir skrip-afvoer nie: \""
+
+#: subst.c:4849
+#, fuzzy, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "Kan nie oopmaak vir skrip-afvoer nie: \""
+
+#: subst.c:4867
+#, fuzzy, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "Kan nie oopmaak vir skrip-afvoer nie: \""
+
+#: subst.c:5063
+#, fuzzy
+msgid "cannot make pipe for command substitution"
+msgstr "Woord Substitusie"
+
+#: subst.c:5097
+#, fuzzy
+msgid "cannot make child for command substitution"
+msgstr "Woord Substitusie"
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr ""
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr ""
+
+#: subst.c:5907
+#, fuzzy, c-format
+msgid "%s: substring expression < 0"
+msgstr "ongeldige uitdrukking"
+
+#: subst.c:6965
+#, fuzzy, c-format
+msgid "%s: bad substitution"
+msgstr "Woord Substitusie"
+
+#: subst.c:7045
+#, fuzzy, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "Kan nie soek 'n handtekening in hierdie boodskap!"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, fuzzy, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "--Geen reëls in buffer--"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr ""
+
+#: test.c:146
+#, fuzzy
+msgid "argument expected"
+msgstr "argument verwag\n"
+
+#: test.c:155
+#, fuzzy, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: heelgetal-uitdrukking is verwag\n"
+
+#: test.c:263
+#, fuzzy
+msgid "`)' expected"
+msgstr "')' is verwag\n"
+
+#: test.c:265
+#, fuzzy, c-format
+msgid "`)' expected, found %s"
+msgstr "')' is verwag, maar %s gevind\n"
+
+#: test.c:280 test.c:693 test.c:696
+#, fuzzy, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: unitêre operator is verwag\n"
+
+#: test.c:449 test.c:736
+#, fuzzy, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: binêre operator is verwag\n"
+
+#: test.c:811
+#, fuzzy
+msgid "missing `]'"
+msgstr "Ontbrekende '>'"
+
+#: trap.c:203
+#, fuzzy
+msgid "invalid signal number"
+msgstr "Die sein nommer wat was gevang het"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr ""
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr ""
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr ""
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr ""
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr ""
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr ""
+
+#: variables.c:3376
+#, c-format
+msgid "%s has null exportstr"
+msgstr ""
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr ""
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr ""
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr ""
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: kan nie %s skep nie"
+
+#: variables.c:4683
+#, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr ""
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr ""
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: version.c:86 version2.c:83
+#, fuzzy, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "bedryfstelselkernweergawe"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+
+#: version2.c:86
+#, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr ""
+
+#: version2.c:87
+#, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: xmalloc.c:91
+#, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "%s: kan nie %s skep nie"
+
+#: xmalloc.c:163
+#, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "%s: kan nie %s skep nie"
+
+#: builtins.c:43
+#, fuzzy
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "E418: Ongeldige waarde: %s"
+
+#: builtins.c:47
+#, fuzzy
+msgid "unalias [-a] name [name ...]"
+msgstr "Volle Naam:"
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+
+#: builtins.c:54
+#, fuzzy
+msgid "break [n]"
+msgstr "Breek"
+
+#: builtins.c:56
+#, fuzzy
+msgid "continue [n]"
+msgstr "Gaan voort"
+
+#: builtins.c:58
+#, fuzzy
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "Ontfouting %1 (met arg %2 %3)"
+
+#: builtins.c:61
+#, fuzzy
+msgid "caller [expr]"
+msgstr "/Opsies/Toets"
+
+#: builtins.c:64
+#, fuzzy
+msgid "cd [-L|-P] [dir]"
+msgstr "init_cache_dir %s... "
+
+#: builtins.c:66
+#, fuzzy
+msgid "pwd [-LP]"
+msgstr "miniserv.pl is gestop\n"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr ""
+
+#: builtins.c:72
+msgid "false"
+msgstr ""
+
+#: builtins.c:74
+#, fuzzy
+msgid "command [-pVv] command [arg ...]"
+msgstr "Gebruik so: %s [OPSIE] [BEVEL [ARG]...]\n"
+
+#: builtins.c:76
+#, fuzzy
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "E418: Ongeldige waarde: %s"
+
+#: builtins.c:78
+#, fuzzy
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "E418: Ongeldige waarde: %s"
+
+#: builtins.c:80
+#, fuzzy
+msgid "local [option] name[=value] ..."
+msgstr "Name=Plaaslike Netwerk"
+
+#: builtins.c:83
+#, fuzzy
+msgid "echo [-neE] [arg ...]"
+msgstr "Ontfouting %1 (met arg %2 %3)"
+
+#: builtins.c:87
+#, fuzzy
+msgid "echo [-n] [arg ...]"
+msgstr "Konfigureer Eggo"
+
+#: builtins.c:90
+#, fuzzy
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "Teruglus lêernaam:"
+
+#: builtins.c:92
+#, fuzzy
+msgid "eval [arg ...]"
+msgstr "Ontfouting %1 (met arg %2 %3)"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr ""
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr ""
+
+#: builtins.c:98
+#, fuzzy
+msgid "exit [n]"
+msgstr "Verlaat"
+
+#: builtins.c:100
+#, fuzzy
+msgid "logout [n]"
+msgstr "Afteken"
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+
+#: builtins.c:107
+#, fuzzy
+msgid "fg [job_spec]"
+msgstr "Kort Spesifikasie werkvoorbeeld"
+
+#: builtins.c:111
+#, fuzzy
+msgid "bg [job_spec ...]"
+msgstr "Kort Spesifikasie werkvoorbeeld"
+
+#: builtins.c:114
+#, fuzzy
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "Teruglus lêernaam:"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "enige patroon"
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr ""
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr ""
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+
+#: builtins.c:134
+#, fuzzy
+msgid "let arg [arg ...]"
+msgstr "Kom ons begin!"
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+
+#: builtins.c:138
+#, fuzzy
+msgid "return [n]"
+msgstr "Terug Adres - 3/4 x 2\""
+
+#: builtins.c:140
+#, fuzzy
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "Gebruik so: %s [OPSIE]... [-] [GEBRUIKER [ARG]...]\n"
+
+#: builtins.c:142
+#, fuzzy
+msgid "unset [-f] [-v] [name ...]"
+msgstr "Volle Naam:"
+
+#: builtins.c:144
+#, fuzzy
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "Bediener of domein naam:"
+
+#: builtins.c:146
+#, fuzzy
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "Bediener of domein naam:"
+
+#: builtins.c:148
+#, fuzzy
+msgid "shift [n]"
+msgstr "Verlaat"
+
+#: builtins.c:150
+#, fuzzy
+msgid "source filename [arguments]"
+msgstr "Kies Lêernaam"
+
+#: builtins.c:152
+#, fuzzy
+msgid ". filename [arguments]"
+msgstr ". lêernaam"
+
+#: builtins.c:155
+#, fuzzy
+msgid "suspend [-f]"
+msgstr "|uitsit}\n"
+
+#: builtins.c:158
+#, fuzzy
+msgid "test [expr]"
+msgstr "/Opsies/Toets"
+
+#: builtins.c:160
+#, fuzzy
+msgid "[ arg... ]"
+msgstr "Arg %1"
+
+#: builtins.c:162
+#, fuzzy
+msgid "times"
+msgstr "Herhaal %1 times "
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr ""
+
+#: builtins.c:166
+#, fuzzy
+msgid "type [-afptP] name [name ...]"
+msgstr "Tipe die naam van die %1 speler."
+
+#: builtins.c:169
+#, fuzzy
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "Grootte beperk (Kb):"
+
+#: builtins.c:172
+#, fuzzy
+msgid "umask [-p] [-S] [mode]"
+msgstr "Belmetode"
+
+#: builtins.c:175
+#, fuzzy
+msgid "wait [id]"
+msgstr "Wag:"
+
+#: builtins.c:179
+#, fuzzy
+msgid "wait [pid]"
+msgstr "Wag:"
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr ""
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr ""
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:196
+#, fuzzy
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "Bediener of domein naam:"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr ""
+
+#: builtins.c:200
+#, fuzzy
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "Bediener of domein naam:"
+
+#: builtins.c:202
+#, fuzzy
+msgid "{ COMMANDS ; }"
+msgstr "Opdragte"
+
+#: builtins.c:204
+#, fuzzy
+msgid "job_spec [&]"
+msgstr "Kort Spesifikasie werkvoorbeeld"
+
+#: builtins.c:206
+#, fuzzy
+msgid "(( expression ))"
+msgstr "Bools uitdrukking verwag"
+
+#: builtins.c:208
+#, fuzzy
+msgid "[[ expression ]]"
+msgstr "Bools uitdrukking verwag"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr ""
+
+#: builtins.c:213
+#, fuzzy
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "Tydelike gids:"
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr ""
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr ""
+
+#: builtins.c:224
+#, fuzzy
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "Volle Naam:"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr ""
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "Tipe die naam van die %1 speler."
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+
+#: builtins.c:966
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+
+#, fuzzy
+#~ msgid " new current working directory."
+#~ msgstr "Nuutste gebruik word werksaam gids"
+
+#~ msgid "top directory."
+#~ msgstr "boonste lêergids."
+
+#, fuzzy
+#~ msgid "Obsolete. See `declare'."
+#~ msgstr "Verkeerde verklaring tipe"
+
+#, fuzzy
+#~ msgid "Logout of a login shell."
+#~ msgstr "Begin aanteken tolk"
+
+#~ msgid "Missing `}'"
+#~ msgstr "Ontbrekende `}'"
+
+#~ msgid "brace_expand> "
+#~ msgstr "krulhakie_uitbrei>"
+
+#~ msgid "Attempt to free unknown command type `%d'.\n"
+#~ msgstr "Poging om onbekende beveltipe vry te maak `%d'.\n"
+
+#~ msgid "Report this to %s\n"
+#~ msgstr "Meld dit aan by %s\n"
+
+#~ msgid "Stopping myself..."
+#~ msgstr "Besig om myself te stop..."
+
+#~ msgid "Tell %s to fix this someday.\n"
+#~ msgstr "Laat weet %s om dit eendag reg te maak.\n"
+
+#, fuzzy
+#~ msgid "execute_command: bad command type `%d'"
+#~ msgstr "Uitvoer 'n tolk opdrag lyn"
+
+#~ msgid "real\t"
+#~ msgstr "regtig\t"
+
+#~ msgid "user\t"
+#~ msgstr "gebruiker\t"
+
+#~ msgid "sys\t"
+#~ msgstr "stelsel\t"
+
+#~ msgid ""
+#~ "real\t0m0.00s\n"
+#~ "user\t0m0.00s\n"
+#~ "sys\t0m0.00s\n"
+#~ msgstr ""
+#~ "regtig\t0m0.00s\n"
+#~ "gebruiker\t0m0.00s\n"
+#~ "stelsel\t0m0.00s\n"
+
+#~ msgid "cannot duplicate fd %d to fd 1: %s"
+#~ msgstr "kan nie fd %d na fd 1 dupliseer nie: %s"
+
+#, fuzzy
+#~ msgid "%s: output redirection restricted"
+#~ msgstr "gebruik tans beperkte dop %s"
+
+#, fuzzy
+#~ msgid "Out of memory!"
+#~ msgstr "Te min geheue."
+
+#, fuzzy
+#~ msgid "You have already added item `%s'\n"
+#~ msgstr "Jy alreeds het 'n groep genaamd %1."
+
+#, fuzzy
+#~ msgid "You have entered %d (%d) items. The distribution is:\n"
+#~ msgstr "Die wagwoord frase jy ingevoerde is ongeldige."
+
+#, fuzzy
+#~ msgid "%s: bg background job?"
+#~ msgstr "Druktaak gestuur."
+
+#, fuzzy
+#~ msgid "cprintf: bad `%%' argument (%c)"
+#~ msgstr "%s: option `%s' requires an argument\n"
+
+#, fuzzy
+#~ msgid "option `%s' requires an argument"
+#~ msgstr "%s: option `%s' requires an argument\n"
+
+#, fuzzy
+#~ msgid "%s: unrecognized option"
+#~ msgstr "%s: unrecognized option `%c%s'\n"
+
+#, fuzzy
+#~ msgid "`-c' requires an argument"
+#~ msgstr "%s: option `%s' requires an argument\n"
+
+#, fuzzy
+#~ msgid "%s: bad array subscript"
+#~ msgstr "Os/2 Biskaart Skikking"
+
+#, fuzzy
+#~ msgid "reading"
+#~ msgstr "besig om te lees"
+
+#, fuzzy
+#~ msgid "$%c: unbound variable"
+#~ msgstr "Veranderlike boom"
+
+#, fuzzy
+#~ msgid "%s: bad arithmetic substitution"
+#~ msgstr "&Sintetisering/Wiskundige + Menging"
+
+#, fuzzy
+#~ msgid "-%s: binary operator expected"
+#~ msgstr "%s: binêre operator is verwag\n"
+
+#, fuzzy
+#~ msgid "%s[%s: bad subscript"
+#~ msgstr "Slegte formule."
+
+#, fuzzy
+#~ msgid "[%s: bad subscript"
+#~ msgstr "Slegte formule."
+
+#, fuzzy
+#~ msgid "option %c\n"
+#~ msgstr "Opsie"
+
+#, fuzzy
+#~ msgid "option a\n"
+#~ msgstr "Opsie"
+
+#, fuzzy
+#~ msgid "option b\n"
+#~ msgstr "Opsie"
+
+#, fuzzy
+#~ msgid "option c with value `%s'\n"
+#~ msgstr "Opsie '%s' vereis 'n waarde."
+
+#, fuzzy
+#~ msgid "non-option ARGV-elements: "
+#~ msgstr "parameters wat nie opsies is nie word geïgnoreer"
+
+#, fuzzy
+#~ msgid "%s: Unknown flag %s.\n"
+#~ msgstr "onbekende vlag: "
+
+#, fuzzy
+#~ msgid "Unknown directive `%s'"
+#~ msgstr "Onbekende direktief"
+
+#, fuzzy
+#~ msgid "%s requires an argument"
+#~ msgstr "%s: option `%s' requires an argument\n"
+
+#, fuzzy
+#~ msgid "%s found before $END"
+#~ msgstr "Nee einde was gevind."
+
+#, fuzzy
+#~ msgid "%s already has a function (%s)"
+#~ msgstr "Proses %1 het alreeds verdwyn!"
+
+#, fuzzy
+#~ msgid "%s already had a docname (%s)"
+#~ msgstr "Alles is alreeds installeer"
+
+#, fuzzy
+#~ msgid "%s already has short documentation (%s)"
+#~ msgstr "Proses %1 het alreeds verdwyn!"
+
+#, fuzzy
+#~ msgid "%s already has a %s definition"
+#~ msgstr "Proses %1 het alreeds verdwyn!"
+
+#, fuzzy
+#~ msgid "mkbuiltins: Out of virtual memory!\n"
+#~ msgstr "GenericName=Virtuele Geheue Statistieke"
+
+#, fuzzy
+#~ msgid "%[DIGITS | WORD] [&]"
+#~ msgstr "Woord oorvloei"
+
+#, fuzzy
+#~ msgid "Arguments we accept:"
+#~ msgstr "Aanvaar karakter verstel:"
+
+#, fuzzy
+#~ msgid " vi-command, and vi-insert."
+#~ msgstr "Biep op kaart voeg by en verwydering"
+
+#, fuzzy
+#~ msgid " -l List names of functions."
+#~ msgstr "Verander Posisies/Name..."
+
+#, fuzzy
+#~ msgid " reused as input."
+#~ msgstr "Invoer Versterking Limiet"
+
+#, fuzzy
+#~ msgid " -r keyseq Remove the binding for KEYSEQ."
+#~ msgstr "Verwyder koekies vir domein."
+
+#, fuzzy
+#~ msgid "break N levels."
+#~ msgstr "6 nuwe vlakke"
+
+#, fuzzy
+#~ msgid "to be followed."
+#~ msgstr "Lêers na Wees Uitgepak"
+
+#, fuzzy
+#~ msgid "The flags are:"
+#~ msgstr "Linker Vlaggies"
+
+#, fuzzy
+#~ msgid "name only."
+#~ msgstr "Naam slegs"
+
+#, fuzzy
+#~ msgid "\t\\a\talert (bell)"
+#~ msgstr "stelsel klok"
+
+#, fuzzy
+#~ msgid "\t\\c\tsuppress trailing newline"
+#~ msgstr "Verwyder agterste spasies"
+
+#, fuzzy
+#~ msgid "\t\\E\tescape character"
+#~ msgstr "Ongeldige karakter <%s>"
+
+#, fuzzy
+#~ msgid "\t\\f\tform feed"
+#~ msgstr "Koevert Voer"
+
+#, fuzzy
+#~ msgid "\t\\n\tnew line"
+#~ msgstr "Lyn uit"
+
+#, fuzzy
+#~ msgid "\t\\r\tcarriage return"
+#~ msgstr "Terug Adres - 3/4 x 2\""
+
+#, fuzzy
+#~ msgid "\t\\t\thorizontal tab"
+#~ msgstr "Oortjie Wydte:"
+
+#, fuzzy
+#~ msgid "\t\\v\tvertical tab"
+#~ msgstr "Oortjie Wydte:"
+
+#, fuzzy
+#~ msgid "with the -E option."
+#~ msgstr "%s: illegal option -- %c\n"
+
+#, fuzzy
+#~ msgid "is set."
+#~ msgstr "Nie stel"
+
+#, fuzzy
+#~ msgid "string."
+#~ msgstr "String"
+
+#, fuzzy
+#~ msgid " mode, then vi."
+#~ msgstr "-v\t\t\tVi modus (soos \"vi\")"
+
+#, fuzzy
+#~ msgid "used."
+#~ msgstr "gebruik word"
+
+#, fuzzy
+#~ msgid "job is used."
+#~ msgstr "Die naam '%1' is alreeds gebruik word"
+
+#, fuzzy
+#~ msgid "anything in the history list."
+#~ msgstr "Lêer Alreeds in Lys"
+
+#, fuzzy
+#~ msgid "process group leader."
+#~ msgstr "Proses groep Id"
+
+#, fuzzy
+#~ msgid "\t-, +\t\tunary minus, plus"
+#~ msgstr "Name=Qt Motif Plus"
+
+#, fuzzy
+#~ msgid "\t*, /, %\t\tmultiplication, division, remainder"
+#~ msgstr "devisie by nul."
+
+#, fuzzy
+#~ msgid "\t&\t\tbitwise AND"
+#~ msgstr "en etiket: "
+
+#, fuzzy
+#~ msgid "\t^\t\tbitwise XOR"
+#~ msgstr "operande Xor data"
+
+#, fuzzy
+#~ msgid "\t|\t\tbitwise OR"
+#~ msgstr " of meer"
+
+#, fuzzy
+#~ msgid "\t&&\t\tlogical AND"
+#~ msgstr "en etiket: "
+
+#, fuzzy
+#~ msgid "\t||\t\tlogical OR"
+#~ msgstr " of meer"
+
+#, fuzzy
+#~ msgid "\texpr ? expr : expr"
+#~ msgstr "ooreenstemmende inskrywings gewone uitdrukking."
+
+#, fuzzy
+#~ msgid "\t\t\tconditional expression"
+#~ msgstr "ongeldige uitdrukking"
+
+#, fuzzy
+#~ msgid "rules above."
+#~ msgstr "Boonste Redigeerder"
+
+#, fuzzy
+#~ msgid " -m Job control is enabled."
+#~ msgstr "Stop flikkerende (as flikkerende is geaktiveer)"
+
+#, fuzzy
+#~ msgid " -o option-name"
+#~ msgstr "Gebruik so: %s [OPSIE] NAAM...\n"
+
+#~ msgid " allexport same as -a"
+#~ msgstr " allexport dieselfde as -a"
+
+#~ msgid " braceexpand same as -B"
+#~ msgstr " braceexpand dieselfde as -B"
+
+#~ msgid " errexit same as -e"
+#~ msgstr " errexit dieselfde as -e"
+
+#~ msgid " hashall same as -h"
+#~ msgstr " hashall dieselfde as -h"
+
+#~ msgid " histexpand same as -H"
+#~ msgstr " histexpand dieselfde as -H"
+
+#~ msgid " interactive-comments"
+#~ msgstr " interaktiewe-kommentaar"
+
+#~ msgid " keyword same as -k"
+#~ msgstr " keyword dieselfde as -k"
+
+#~ msgid " monitor same as -m"
+#~ msgstr " monitor dieselfde as -m"
+
+#~ msgid " noclobber same as -C"
+#~ msgstr " noclobber dieselfde as -C"
+
+#~ msgid " noexec same as -n"
+#~ msgstr " noexec dieselfde as -n"
+
+#~ msgid " noglob same as -f"
+#~ msgstr " noglob dieselfde as -f"
+
+#~ msgid " notify save as -b"
+#~ msgstr " notify dieselfde as -b"
+
+#~ msgid " nounset same as -u"
+#~ msgstr " nounset dieselfde as -u"
+
+#~ msgid " onecmd same as -t"
+#~ msgstr " onecmd dieselfde as -t"
+
+#~ msgid " physical same as -P"
+#~ msgstr " physical dieselfde as -P"
+
+#~ msgid " match the standard"
+#~ msgstr " pas by die standaard"
+
+#~ msgid " privileged same as -p"
+#~ msgstr " privileged dieselfde as -p"
+
+#~ msgid " verbose same as -v"
+#~ msgstr " verbose dieselfde as -v"
+
+#~ msgid " xtrace same as -x"
+#~ msgstr " xtrace dieselfde as -x"
+
+#~ msgid " by default."
+#~ msgstr " by verstek."
+
+#, fuzzy
+#~ msgid " by redirection of output."
+#~ msgstr "eSound Uitsetinpropprogram %s"
+
+#~ msgid "see readonly."
+#~ msgstr "sien leesalleen"
+
+#, fuzzy
+#~ msgid "processing."
+#~ msgstr "Verwerking..."
+
+#, fuzzy
+#~ msgid "File operators:"
+#~ msgstr "lêer assosiasies"
+
+#, fuzzy
+#~ msgid " -d FILE True if file is a directory."
+#~ msgstr "%1 is 'n gids, maar 'n lêer was verwag."
+
+#, fuzzy
+#~ msgid " -e FILE True if file exists."
+#~ msgstr "Verwyder, as bestaan, die _:kommentaar"
+
+#, fuzzy
+#~ msgid " modification date) file2."
+#~ msgstr "Begin na datum"
+
+#, fuzzy
+#~ msgid "String operators:"
+#~ msgstr "Soekstring"
+
+#, fuzzy
+#~ msgid " -n STRING"
+#~ msgstr "String"
+
+#, fuzzy
+#~ msgid "Other operators:"
+#~ msgstr "Ander weergawe (B):"
+
+#, fuzzy
+#~ msgid ""
+#~ "less-than, less-than-or-equal, greater-than, or greater-than-or-equal"
+#~ msgstr "is grootter as of gelyk na"
+
+#, fuzzy
+#~ msgid "than ARG2."
+#~ msgstr "%1 vroeër as %2"
+
+#~ msgid "the shell."
+#~ msgstr "die dop."
+
+#, fuzzy
+#~ msgid "with \"kill -signal $$\"."
+#~ msgstr "Stuur alle prosesse die KILL sein...\n"
+
+#, fuzzy
+#~ msgid "or unfound, respectively."
+#~ msgstr "Formule of gewig:"
+
+#, fuzzy
+#~ msgid " -H\tuse the `hard' resource limit"
+#~ msgstr "Minimum waarde is 'n hard beperk"
+
+#, fuzzy
+#~ msgid " -m\tthe maximum resident set size"
+#~ msgstr "Data inwoonend stel grootte in Kgrepe"
+
+#, fuzzy
+#~ msgid " -p\tthe pipe buffer size"
+#~ msgstr " Audio Buffer Grootte (antwoord tyd) "
+
+#, fuzzy
+#~ msgid " -v\tthe size of virtual memory"
+#~ msgstr "GenericName=Virtuele Geheue Statistieke"
+
+#, fuzzy
+#~ msgid "processes."
+#~ msgstr "Prosesse"
+
+#, fuzzy
+#~ msgid "pipeline are waited for."
+#~ msgstr "Die drukker vir wat werke word versoekte"
+
+#, fuzzy
+#~ msgid "the COMMANDS are executed."
+#~ msgstr "Stoor geskiedenis van uitgevoerde bevele."
+
+#, fuzzy
+#~ msgid "function as $0 .. $n."
+#~ msgstr "-L\t\t\tSelfde as -r"
+
+#, fuzzy
+#~ msgid "entire set of commands."
+#~ msgstr "%s outobevele vir \"%s\""
+
+#, fuzzy
+#~ msgid "BASH_VERSION The version numbers of this Bash."
+#~ msgstr "Hierdie is hoe nommers sal wees vertoon."
+
+#, fuzzy
+#~ msgid "\t\tshell can access."
+#~ msgstr "Konfigureer internettoegang..."
+
+#, fuzzy
+#~ msgid "\t\tfor new mail."
+#~ msgstr "Nuwe Pos Inkennisstelling"
+
+#, fuzzy
+#~ msgid "\t\tlooking for commands."
+#~ msgstr "%s outobevele vir \"%s\""
+
+#, fuzzy
+#~ msgid "\t\tprimary prompt."
+#~ msgstr "Konqueror: Por"
+
+#, fuzzy
+#~ msgid "command_oriented_history"
+#~ msgstr "Herstel/Herstel herroep Geskiedenis..."
+
+#, fuzzy
+#~ msgid " a single history line."
+#~ msgstr "/Skoopmodus/Lynskoop"
+
+#~ msgid "not each is set."
+#~ msgstr "nie elkeen is gestel nie."
diff --git a/po/bash.pot b/po/bash.pot
new file mode 100644
index 0000000..68d33f8
--- /dev/null
+++ b/po/bash.pot
@@ -0,0 +1,3919 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR Free Software Foundation, Inc.
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr ""
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr ""
+
+#: arrayfunc.c:480
+#, c-format
+msgid "%s: invalid associative array key"
+msgstr ""
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr ""
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr ""
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr ""
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr ""
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr ""
+
+#: builtins/alias.def:132
+#, c-format
+msgid "`%s': invalid alias name"
+msgstr ""
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr ""
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr ""
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr ""
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr ""
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr ""
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr ""
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr ""
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr ""
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr ""
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr ""
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr ""
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr ""
+
+#: builtins/common.c:139 error.c:261
+#, c-format
+msgid "warning: "
+msgstr ""
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr ""
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr ""
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr ""
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr ""
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr ""
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr ""
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr ""
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr ""
+
+#: builtins/common.c:238
+msgid "invalid octal number"
+msgstr ""
+
+#: builtins/common.c:240
+msgid "invalid hex number"
+msgstr ""
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr ""
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr ""
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr ""
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr ""
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr ""
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr ""
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr ""
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr ""
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr ""
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr ""
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr ""
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr ""
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr ""
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr ""
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr ""
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr ""
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr ""
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr ""
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr ""
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr ""
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr ""
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr ""
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr ""
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr ""
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr ""
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr ""
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr ""
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr ""
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr ""
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr ""
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr ""
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr ""
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr ""
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr ""
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr ""
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr ""
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr ""
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr ""
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr ""
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr ""
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr ""
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr ""
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr ""
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr ""
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr ""
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr ""
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr ""
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr ""
+
+#: builtins/hash.def:244
+#, c-format
+msgid "hits\tcommand\n"
+msgstr ""
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] ""
+msgstr[1] ""
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr ""
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr ""
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr ""
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr ""
+
+#: builtins/inlib.def:71
+#, c-format
+msgid "%s: inlib failed"
+msgstr ""
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr ""
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr ""
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr ""
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr ""
+
+#: builtins/mapfile.def:165
+#, c-format
+msgid "%s: not an indexed array"
+msgstr ""
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr ""
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr ""
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, c-format
+msgid "%s: invalid line count"
+msgstr ""
+
+#: builtins/mapfile.def:277
+#, c-format
+msgid "%s: invalid array origin"
+msgstr ""
+
+#: builtins/mapfile.def:294
+#, c-format
+msgid "%s: invalid callback quantum"
+msgstr ""
+
+#: builtins/mapfile.def:326
+msgid "empty array variable name"
+msgstr ""
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr ""
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr ""
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr ""
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr ""
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr ""
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr ""
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr ""
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr ""
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr ""
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr ""
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr ""
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr ""
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr ""
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr ""
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr ""
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr ""
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr ""
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr ""
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr ""
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr ""
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr ""
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr ""
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr ""
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr ""
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr ""
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr ""
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr ""
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr ""
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr ""
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr ""
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr ""
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr ""
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr ""
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr ""
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr ""
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr ""
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr ""
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr ""
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr ""
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr ""
+
+#: error.c:406
+msgid "unknown command error"
+msgstr ""
+
+#: error.c:407
+msgid "bad command type"
+msgstr ""
+
+#: error.c:408
+msgid "bad connector"
+msgstr ""
+
+#: error.c:409
+msgid "bad jump"
+msgstr ""
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr ""
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr ""
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr ""
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr ""
+
+#: execute_cmd.c:2075
+msgid "pipe error"
+msgstr ""
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr ""
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr ""
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr ""
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr ""
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr ""
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr ""
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr ""
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr ""
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr ""
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr ""
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr ""
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr ""
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr ""
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr ""
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr ""
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr ""
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr ""
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr ""
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr ""
+
+#: expr.c:1329
+#, c-format
+msgid "%s: expression error\n"
+msgstr ""
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr ""
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr ""
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr ""
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr ""
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr ""
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr ""
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr ""
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr ""
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr ""
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr ""
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr ""
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr ""
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr ""
+
+#: jobs.c:1443
+msgid "Running"
+msgstr ""
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr ""
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr ""
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr ""
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr ""
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr ""
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr ""
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr ""
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr ""
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr ""
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr ""
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr ""
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, c-format
+msgid "%s: line %d: "
+msgstr ""
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr ""
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr ""
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr ""
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr ""
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr ""
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr ""
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr ""
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:313
+msgid "unknown"
+msgstr ""
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr ""
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr ""
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr ""
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr ""
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr ""
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr ""
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr ""
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr ""
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr ""
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:249
+#, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr ""
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr ""
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr ""
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr ""
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr ""
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr ""
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr ""
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr ""
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr ""
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr ""
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr ""
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr ""
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr ""
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr ""
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr ""
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr ""
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr ""
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr ""
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr ""
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr ""
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr ""
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr ""
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr ""
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr ""
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr ""
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr ""
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr ""
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr ""
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr ""
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr ""
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr ""
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr ""
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr ""
+
+#: print_cmd.c:363
+#, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr ""
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr ""
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr ""
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr ""
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr ""
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr ""
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr ""
+
+#: redir.c:184
+#, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr ""
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr ""
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr ""
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr ""
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr ""
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr ""
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr ""
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr ""
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr ""
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr ""
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr ""
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr ""
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr ""
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr ""
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr ""
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr ""
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr ""
+
+#: siglist.c:59
+msgid "Quit"
+msgstr ""
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr ""
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr ""
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr ""
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr ""
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr ""
+
+#: siglist.c:87
+msgid "Killed"
+msgstr ""
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr ""
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr ""
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr ""
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr ""
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr ""
+
+#: siglist.c:111
+msgid "Terminated"
+msgstr ""
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr ""
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr ""
+
+#: siglist.c:127
+msgid "Continue"
+msgstr ""
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr ""
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr ""
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr ""
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr ""
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr ""
+
+#: siglist.c:155
+msgid "File limit"
+msgstr ""
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr ""
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr ""
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr ""
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr ""
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr ""
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr ""
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr ""
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr ""
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr ""
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr ""
+
+#: siglist.c:199
+msgid "programming error"
+msgstr ""
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr ""
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr ""
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr ""
+
+#: siglist.c:215
+msgid "Information request"
+msgstr ""
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr ""
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr ""
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr ""
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr ""
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr ""
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr ""
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr ""
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr ""
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr ""
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr ""
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr ""
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr ""
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr ""
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr ""
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr ""
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr ""
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr ""
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr ""
+
+#: test.c:146
+msgid "argument expected"
+msgstr ""
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr ""
+
+#: test.c:263
+msgid "`)' expected"
+msgstr ""
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr ""
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr ""
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr ""
+
+#: test.c:811
+msgid "missing `]'"
+msgstr ""
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr ""
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr ""
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr ""
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr ""
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr ""
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr ""
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr ""
+
+#: variables.c:3376
+#, c-format
+msgid "%s has null exportstr"
+msgstr ""
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr ""
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr ""
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr ""
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+
+#: variables.c:4678
+#, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr ""
+
+#: variables.c:4683
+#, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr ""
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr ""
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr ""
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+
+#: version2.c:86
+#, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr ""
+
+#: version2.c:87
+#, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: xmalloc.c:91
+#, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+
+#: xmalloc.c:93
+#, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr ""
+
+#: xmalloc.c:163
+#, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+
+#: xmalloc.c:165
+#, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr ""
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr ""
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr ""
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr ""
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr ""
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr ""
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr ""
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr ""
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr ""
+
+#: builtins.c:68
+msgid ":"
+msgstr ""
+
+#: builtins.c:70
+msgid "true"
+msgstr ""
+
+#: builtins.c:72
+msgid "false"
+msgstr ""
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr ""
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr ""
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr ""
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr ""
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr ""
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr ""
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr ""
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr ""
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr ""
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr ""
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr ""
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr ""
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr ""
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr ""
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr ""
+
+#: builtins.c:117
+msgid "help [-dms] [pattern ...]"
+msgstr ""
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr ""
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr ""
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr ""
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr ""
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr ""
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr ""
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr ""
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr ""
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr ""
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr ""
+
+#: builtins.c:152
+msgid ". filename [arguments]"
+msgstr ""
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr ""
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr ""
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr ""
+
+#: builtins.c:162
+msgid "times"
+msgstr ""
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr ""
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr ""
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr ""
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr ""
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr ""
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr ""
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr ""
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr ""
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr ""
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr ""
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr ""
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr ""
+
+#: builtins.c:206
+msgid "(( expression ))"
+msgstr ""
+
+#: builtins.c:208
+msgid "[[ expression ]]"
+msgstr ""
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr ""
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr ""
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr ""
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr ""
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr ""
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr ""
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+
+#: builtins.c:237
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr ""
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+
+#: builtins.c:966
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
diff --git a/po/bg.gmo b/po/bg.gmo
new file mode 100644
index 0000000..ecba6d2
--- /dev/null
+++ b/po/bg.gmo
Binary files differ
diff --git a/po/bg.po b/po/bg.po
new file mode 100644
index 0000000..8363cbf
--- /dev/null
+++ b/po/bg.po
@@ -0,0 +1,5594 @@
+# Bulgarian translation of bash po-file.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# This file is distributed under the same license as the bash package.
+# Alexander Shopov <ash@contact.bg>, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bash 3.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2007-07-26 07:18+0300\n"
+"Last-Translator: Alexander Shopov <ash@contact.bg>\n"
+"Language-Team: Bulgarian <dict@fsa-bg.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=n != 1;\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "неправилен Ð¸Ð½Ð´ÐµÐºÑ Ð½Ð° маÑив"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr ""
+
+#: arrayfunc.c:480
+#, fuzzy, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: грешно име на дейÑтвие"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: не може да Ñе приÑвоÑва на нецифров индекÑ"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: не може да Ñе Ñъздаде: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+"изпълнение на команда на Ð®Ð½Ð¸ÐºÑ Ð¾Ñ‚ bash: не може да Ñе открие подредбата на\n"
+"функциите на клавишите за командата"
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: първиÑÑ‚ непразен знак не е „\"“"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "в %2$s липÑва затварÑщ знак „%1$c“"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: разделителÑÑ‚ двоеточие липÑва"
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "„%s“: грешно име на подредбата на функциите на клавишите"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr ""
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "„%s“: грешно име на подредбата на функциите на клавишите"
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: не може да Ñе прочете: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "„%s“: не може да Ñе премахне приÑвоÑване"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "„%s“: непознато име на функциÑ"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s не може да Ñе зададе на никой клавиш.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s може да Ñе извика чрез "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr ""
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "валидно Ñамо за циклите Ñ â€žfor“, „while“ и „until“"
+
+#: builtins/caller.def:133
+#, fuzzy
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr "Връща контекÑта на текущото извикване на подпрограма."
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "Променливата $HOME не зададена"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "Променливата $OLDPWD не е зададена"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr ""
+
+#: builtins/common.c:139 error.c:261
+#, fuzzy, c-format
+msgid "warning: "
+msgstr "%s: предупреждение: "
+
+#: builtins/common.c:153
+#, fuzzy, c-format
+msgid "%s: usage: "
+msgstr "%s: предупреждение: "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "прекалено много аргументи"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: опциÑта изиÑква аргумент"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: изиÑква Ñе чиÑлов аргумент"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: не е открит"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: грешна опциÑ"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: грешно име на опциÑ"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "„%s“: грешен идентификатор"
+
+#: builtins/common.c:238
+#, fuzzy
+msgid "invalid octal number"
+msgstr "неправилен номер на Ñигнал"
+
+#: builtins/common.c:240
+#, fuzzy
+msgid "invalid hex number"
+msgstr "грешно чиÑло"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "грешно чиÑло"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: грешно указване на Ñигнал"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "„%s“: неправилен идентификатор на Ð¿Ñ€Ð¾Ñ†ÐµÑ Ð¸Ð»Ð¸ задача"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: променлива Ñ Ð¿Ñ€Ð°Ð²Ð° Ñамо за четене"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s е извън допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "аргументът"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s е извън допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: нÑма такава задача"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: нÑма управление на задачите"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "нÑма управление на задачите"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: ограничена обвивка"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "ограничена обвивка"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: не е команда вградена в обвивката"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "грешка при запиÑ: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: грешка при получаването на текущата директориÑ: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: нееднозначно указана задача"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: грешно име на дейÑтвие"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: не е указано допиÑване"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "предупреждение: опциÑта „-F“ може да не работи Ñпоред очакваниÑта ви"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "предупреждение: опциÑта „-C“ може да не работи Ñпоред очакваниÑта ви"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr ""
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "може да Ñе използва Ñамо във функциÑ"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "„-f“ не може да Ñе използва за Ñъздаването на функции"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ Ð¿Ñ€Ð°Ð²Ð° Ñамо за четене"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: променливите за маÑиви не могат да Ñе унищожават така"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "липÑва възможноÑÑ‚ за динамично зареждане"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "ÑподелениÑÑ‚ обект %s не може да бъде зареден: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "не може да Ñе открие %s в ÑÐ¿Ð¾Ð´ÐµÐ»ÐµÐ½Ð¸Ñ Ð¾Ð±ÐµÐºÑ‚ %s: %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: не е зареден динамично"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: не може да Ñе изтрие: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: е директориÑ"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: не е обикновен файл"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: файлът е прекалено голÑм"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: двоичниÑÑ‚ файл не може да бъде изпълнен"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: не може да Ñе изпълни: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr ""
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "това не е входна обвивка: използвайте „exit“"
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "Има Ñпрени задачи.\n"
+
+#: builtins/exit.def:122
+#, fuzzy, c-format
+msgid "There are running jobs.\n"
+msgstr "Има Ñпрени задачи.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "не е открита команда"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "указване на иÑториÑта"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: не може да Ñе отвори временен файл: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr ""
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "задача %d е Ñтартирана без управление на задачите"
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: непозволена Ð¾Ð¿Ñ†Ð¸Ñ -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: опциÑта изиÑква аргумент -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "хеширането е изключено"
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: таблицата Ñ Ñ…ÐµÑˆÐ¾Ð²Ðµ е празна\n"
+
+#: builtins/hash.def:244
+#, fuzzy, c-format
+msgid "hits\tcommand\n"
+msgstr "поÑледна команда: %s\n"
+
+#: builtins/help.def:130
+#, fuzzy, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Команди на обвивката, които напаÑват на ключовата дума „"
+msgstr[1] "Команди на обвивката, които напаÑват на ключовата дума „"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"нÑма теми в помощта, които да отговарÑÑ‚ на „%s“. Опитайте Ñ\n"
+"„help help“, „man -k %s“ или „info %s“."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: не може да Ñе отвори: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"Тези команди на интерпретатора Ñа дефинирани вътрешно.\n"
+"Ðапишете „help“, за да видите ÑпиÑъка.\n"
+"Ðапишете „help ИМЕ_ÐÐ_ФУÐКЦИЯ“ за повече Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° Ñъответната функциÑ.\n"
+"Ðапишете „info bash“ за повече Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° обвивката като цÑло.\n"
+"Ðапишете „man -k“ или „info“ за повече Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° командите извън "
+"ÑпиÑъка.\n"
+"\n"
+"Знакът звездичка „*“ до името на команда означава, че Ñ‚Ñ Ðµ изключена.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "не може да Ñе ползва едновременно повече от една от опциите -anrw"
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ñ Ð² иÑториÑта"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: неуÑпешно замеÑтване чрез иÑториÑта"
+
+#: builtins/inlib.def:71
+#, fuzzy, c-format
+msgid "%s: inlib failed"
+msgstr "%s: неуÑпешно замеÑтване чрез иÑториÑта"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "не е позволена друга Ð¾Ð¿Ñ†Ð¸Ñ Ñ â€ž-x“"
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: аргументите Ñ‚Ñ€Ñбва да Ñа идентификатори на процеÑи или задачи"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "ÐеизвеÑтна грешка"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "очаква Ñе израз"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: не е променлива за маÑив"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: грешно указване на Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¸Ñ Ð´ÐµÑкриптор"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: грешен файлов деÑкриптор: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, fuzzy, c-format
+msgid "%s: invalid line count"
+msgstr "%s: грешна опциÑ"
+
+#: builtins/mapfile.def:277
+#, fuzzy, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: грешна опциÑ"
+
+#: builtins/mapfile.def:294
+#, fuzzy, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: грешно име на дейÑтвие"
+
+#: builtins/mapfile.def:326
+#, fuzzy
+msgid "empty array variable name"
+msgstr "%s: не е променлива за маÑив"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr ""
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "„%s“: липÑва форматиращ знак"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "„%c“: грешен форматиращ знак"
+
+#: builtins/printf.def:578
+#, fuzzy, c-format
+msgid "warning: %s: %s"
+msgstr "%s: предупреждение: "
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "липÑва шеÑтнадеÑетична цифра за \\x"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "нÑма друга директориÑ"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "«нÑма текуща директориÑ»"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr ""
+
+#: builtins/pushd.def:508
+#, fuzzy
+msgid "directory stack index"
+msgstr "отрицателно препълване на Ñтека за рекурÑии"
+
+#: builtins/pushd.def:683
+#, fuzzy
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+" Показва ÑпиÑъка Ñ Ñ‚ÐµÐºÑƒÑ‰Ð¾ запомнените директории. СпиÑъкът Ñе попълва чрез\n"
+" командата „pushd“. Можете да вадите директории от ÑпиÑъка Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð°Ñ‚Ð°\n"
+" „popd“.\n"
+" \n"
+" ОпциÑта „-l“ кара командата „dirs“ да извежда пълните имена на "
+"директориите,\n"
+" а не Ñъкратените ÑпрÑмо домашната Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð¸Ð¼ÐµÐ½Ð°. Това означава, че\n"
+" „~/bin“ може да Ñе покаже като „/homes/pesho/bin“. ОпциÑта „-v“ води "
+"до\n"
+" отпечатване на Ñтека на директориите, като вÑеки елемент Ñе извежда на "
+"нов\n"
+" ред и Ñе предхожда от номера Ñи в Ñтека. ОпциÑта „-p“ Ñъщо води до "
+"поредово\n"
+" отпечатване, но без Ð¿Ð¾Ñ€ÐµÐ´Ð½Ð¸Ñ Ð½Ð¾Ð¼ÐµÑ€ в Ñтека. ОпциÑта „-c“ изчиÑтва Ñтека "
+"на\n"
+" директориите като изтрива вÑички елементи.\n"
+" \n"
+" +N показва N-Ñ‚Ð¸Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚ отлÑво в ÑпиÑъка показван от\n"
+" командата „dirs“, когато е Ñтартирана без опции. Брои Ñе от 0.\n"
+" \n"
+" -N показва N-Ñ‚Ð¸Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚ отдÑÑно в ÑпиÑъка показван от\n"
+" командата „dirs“, когато е Ñтартирана без опции. Брои Ñе от 0."
+
+#: builtins/pushd.def:705
+#, fuzzy
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+" Ð”Ð¾Ð±Ð°Ð²Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð² Ñтека на директориите или превърта Ñтека\n"
+" като най-горна Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ñтава текущата директориÑ. Без\n"
+" аргументи ÑÐ¼ÐµÐ½Ñ Ð½Ð°Ð¹-горните две директории.\n"
+" \n"
+" +N Превърта Ñтека, така че N-тата Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ (като Ñе брои\n"
+" от лÑвата Ñтрана на ÑпиÑъка, показан от командата „dirs“\n"
+" като Ñе почва от 0) да е най-отгоре.\n"
+" \n"
+" -N Превърта Ñтека, така че N-тата Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ (като Ñе брои\n"
+" от дÑÑната Ñтрана на ÑпиÑъка, показан от командата „dirs“\n"
+" като Ñе почва от 0) да е най-отгоре.\n"
+" \n"
+" -n подтиÑкане на нормалното преминаване към Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð¿Ñ€Ð¸\n"
+" добавÑнето на директории към Ñтека, така че Ñе Ð¿Ñ€Ð¾Ð¼ÐµÐ½Ñ Ñамо той.\n"
+"\n"
+" dir Ð´Ð¾Ð±Ð°Ð²Ñ Ð”Ð˜Ð  най-отгоре в Ñтека на директориите, като Ñ Ð¿Ñ€Ð°Ð²Ð¸\n"
+" новата текуща работна директориÑ.\n"
+" \n"
+" Можете да изведете Ñтека на директориÑта Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð°Ñ‚Ð° „dirs“."
+
+#: builtins/pushd.def:730
+#, fuzzy
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+" Маха директории от Ñтека Ñ Ñ‚ÑÑ…. Без аргументи\n"
+" премахва поÑледната Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð² Ñтека и влиза в новата\n"
+" поÑледна директориÑ.\n"
+" \n"
+" +N премахва N-Ñ‚Ð¸Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚ като Ñе брои отлÑво в ÑпиÑъка\n"
+" показван от командата „dirs“, като Ñе брои от 0. Ðапр.: „popd +0“\n"
+" премахва първата директориÑ, „popd +1“ - втората.\n"
+"\n"
+" -N премахва N-Ñ‚Ð¸Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚ като Ñе брои отдÑÑно в ÑпиÑъка\n"
+" показван от командата „dirs“, като Ñе брои от 0. Ðапр.: „popd -0“\n"
+" премахва поÑледната директориÑ, „popd -1“ - предпоÑледната.\n"
+"\n"
+" -n подтиÑкане на нормалното преминаване към Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð¿Ñ€Ð¸ добавÑнето "
+"на\n"
+" директории към Ñтека, така че Ñе Ð¿Ñ€Ð¾Ð¼ÐµÐ½Ñ Ñамо той.\n"
+"\n"
+" Стекът Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ð¸Ñ‚Ðµ Ñе визуализира Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð°Ñ‚Ð° „dirs“."
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: грешно указване на изтичането на времето"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "грешка при четене: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+"„return“ е възможен Ñамо от Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð¸Ð»Ð¸ изпълнен в текущата обвивка Ñкрипт"
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr ""
+"не може едновременно да Ñе премахват задаваниÑта на Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð¸ променлива"
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: не може да Ñе премахне"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: не може да Ñе премахне: %s е Ñамо за четене"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: не е променлива за маÑив"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: не е функциÑ"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "брой на премеÑтваниÑта"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr ""
+"не може едновременно да Ñе задават и да Ñе премахват опции на обвивката"
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: грешно име на Ð¾Ð¿Ñ†Ð¸Ñ Ð½Ð° обвивката"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "изиÑква Ñе аргумент име на файл"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: файлът не е открит"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "не може да бъде временно ÑпрÑна"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "входната обвивка не може да бъде временно ÑпрÑна"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "%s е Ñиноним на „%s“\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s в ключова дума на обвивката\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s е функциÑ\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "%s е вградена команда в обвивката\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s е %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "%s е хеширан (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s: неправилен аргумент за ограничение"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "„%c“: неправилна команда"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: ограничението не може да бъде получено: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr ""
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: ограничението не може да бъде променено: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "оÑмично чиÑло"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "„%c“: неправилен оператор за опиÑателен режим"
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "„%c“: неправилен знак за опиÑателен режим"
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr ""
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "поÑледна команда: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "ПреуÑтановÑване…"
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "неизвеÑтна грешка в команда"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "неправилен вид команда"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "лоша връзка"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "неправилен преход"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: променлива без ÑтойноÑÑ‚"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr ""
+"^Gвремето за изчакване на вход изтече: Ñледва автоматично излизане от "
+"ÑиÑтемата\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "ÑтандартниÑÑ‚ вход от /dev/null не може да бъде пренаÑочен: %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "в променливата $TIMEFORMAT: „%c“: грешен форматиращ знак"
+
+#: execute_cmd.c:2075
+#, fuzzy
+msgid "pipe error"
+msgstr "грешка при запиÑ: %s"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr ""
+"%s: ограничение: в имената на командите не може да приÑÑŠÑтва знакът „/“"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: командата не е открита"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: лош интерпретатор"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "файловиÑÑ‚ деÑкриптор %d не може да Ñе дублира като деÑкриптор %d"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "макÑималниÑÑ‚ брой нива за рекурÑÐ¸Ñ Ð² израз бÑха преминати"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "отрицателно препълване на Ñтека за рекурÑии"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "Ñинтактична грешка в израз"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "опит за приÑвоÑване на ÑтойноÑÑ‚ на нещо, което не е променлива"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "деление на 0"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "програмна грешка: неправилна лекÑема за приÑвоÑване на израз"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "за уÑловен израз Ñе изиÑква „:“"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "Ñтепента е по-малка от 0"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr "очаква Ñе идентификатор Ñлед предварително увеличаване или намалÑване"
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "липÑва „)“"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "Ñинтактична грешка: очаква Ñе оператор"
+
+#: expr.c:1178
+#, fuzzy
+msgid "syntax error: invalid arithmetic operator"
+msgstr "Ñинтактична грешка: изиÑква Ñе аритметичен израз"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr ""
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "грешна аритметична оÑнова на бройна ÑиÑтема"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "ÑтойноÑтта е прекалено голÑма за оÑновата"
+
+#: expr.c:1329
+#, fuzzy, c-format
+msgid "%s: expression error\n"
+msgstr "%s: очаква Ñе целочиÑлен израз"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getcwd: родителÑките директории не могат да бъдат доÑтъпени"
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "не може да Ñе изчиÑти режимът без забавÑне на Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¸Ñ Ð´ÐµÑкриптор %d"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+"не може да Ñе задели нов файлов деÑкриптор за вход на bash от деÑкриптор %d"
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr ""
+"запазване на входа на bash: вече ÑъщеÑтвува буфер за Ð½Ð¾Ð²Ð¸Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð² деÑкриптор "
+"%d"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr ""
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr ""
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "изтриване на ÑпрÑната задача %d в групата процеÑи %ld"
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr ""
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr ""
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr ""
+"опиÑателен идентификатор на процеÑ: %ld: нÑма такъв идентификатор на процеÑ"
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr ""
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr ""
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr ""
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr ""
+
+#: jobs.c:1443
+msgid "Running"
+msgstr ""
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr ""
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr ""
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr ""
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr ""
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr ""
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr ""
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "изчакване: процеÑÑŠÑ‚ Ñ Ð¸Ð´ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ‚Ð¾Ñ€ %ld не е дъщерен на тази обвивка"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "изчакване: липÑват данни за Ð¿Ñ€Ð¾Ñ†ÐµÑ Ñ Ð¸Ð´ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ‚Ð¾Ñ€ %ld"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "изчакване на задача: задачата %d е ÑпрÑна"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: задачата е приключила"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: задача %d вече е във фонов режим"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, fuzzy, c-format
+msgid "%s: line %d: "
+msgstr "%s: предупреждение: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr ""
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr ""
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr ""
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr ""
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr ""
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr ""
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "в тази обвивка нÑма управление на задачите"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "заделÑне на памет: грешно предположение: %s\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"заделÑне на памет: %s:%d: предположението е отпечатано\r\n"
+
+#: lib/malloc/malloc.c:313
+#, fuzzy
+msgid "unknown"
+msgstr "%s: непознат хоÑÑ‚"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr ""
+"заделÑне на памет: блок в ÑпиÑъка ÑÑŠÑ Ñвободни блокове е зает или неподходÑщ"
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr ""
+"изчиÑтване на памет: извикано е Ñ Ð±Ð»Ð¾ÐºÐ¾Ð² аргумент, който вече е изчиÑтен"
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "изчиÑтване на памет: извикано е Ñ Ð½ÐµÐ·Ð°Ð´ÐµÐ»ÐµÐ½ блоков аргумент"
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr ""
+"изчиÑтване на памет: открито е отрицателно препълване Ñ mh_nbytes извън\n"
+"допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½"
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr ""
+"изчиÑтване на памет: къÑовете на началната и крайната облаÑти Ñе различават"
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "презаделÑне: извикано е Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚ Ñ Ð½ÐµÐ·Ð°Ð´ÐµÐ»ÐµÐ½ блок"
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr ""
+"презаделÑне: открито е отрицателно препълване Ñ mh_nbytes извън допуÑтимиÑ\n"
+"диапазон"
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "презаделÑне: къÑовете на началната и крайната облаÑти Ñе различават"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr ""
+"региÑтриране на презаделÑне: таблицата за заделÑниÑта е пълна Ñ FIND_ALLOC?\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr "региÑтриране на презаделÑне: %p вече е в таблицата като заделен?\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "региÑтриране на Ñвободни: %p вече е в таблицата като Ñвободен?\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "грешна оÑнова на бройна ÑиÑтема"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: непознат хоÑÑ‚"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: неправилна уÑлуга"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: неправилно указан мрежов път"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "не Ñе поддържат мрежови операции"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "презаделÑне на памет: %s:%d: %lu байта не могат да Ñе заделÑÑ‚"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "презаделÑне на памет: %s:%d: %lu байта не могат да Ñе заделÑÑ‚"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Имате поща в $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Имате нова поща в $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "Пощата в %s вече е прочетена\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "Ñинтактична грешка: изиÑква Ñе аритметичен израз"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "Ñинтактична грешка: неочакван знак „;“"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "Ñинтактична грешка: „((%s))“"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "вътрешен документ Ñ â€ž<<“: неправилен вид инÑÑ‚Ñ€ÑƒÐºÑ†Ð¸Ñ %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr ""
+"пренаÑочване: инÑтрукциÑта за пренаÑочване „%d“ е извън допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr ""
+"неочакван знак за край на файл „EOF“, а Ñе очакваше ÑъответÑтващ знак „%c“"
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "неочакван знак за край на файл „EOF“, а Ñе очакваше „]]“"
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "Ñинтактична грешка в уÑловен израз: неочаквана лекÑема „%s“"
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "Ñинтактична грешка в уÑловен израз"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "неочаквана лекÑема „%s“, а Ñе очакваше знакът „)“"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "очакваше Ñе „)“"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "неочакван аргумент „%s“ за унарен уÑловен оператор"
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "неочакван аргумент за унарен уÑловен оператор"
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "неочаквана лекÑема „%s“, очакваше Ñе бинарен уÑловен оператор"
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "очакваше Ñе бинарен уÑловен оператор"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "неочакван аргумент „%s“ за бинарен уÑловен оператор"
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "неочакван аргумент за бинарен уÑловен оператор"
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "неочаквана лекÑема „%c“ в уÑловна команда"
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "неочаквана лекÑема „%s“ в уÑловна команда"
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "неочаквана лекÑема %d в уÑловна команда"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "Ñинтактична грешка в близоÑÑ‚ до неочакваната лекÑема „%s“"
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "Ñинтактична грешка в близоÑÑ‚ до „%s“"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "Ñинтактична грешка: неочакван край на файл"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "Ñинтактична грешка"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Използвайте „%s“, за да излезете от обвивката.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "неочакван знак за край на файл „EOF“, очакваше Ñе знакът „)“"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "допиÑване: функциÑта „%s“ не е открита"
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr ""
+"вмъкване на завършване на команда: %s указване на команда, което е NULL"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "команда за печат: лош конектор „%d“"
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d: грешен файлов деÑкриптор: %s"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "отпечатване: „%c“: неправилен форматиращ знак"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "файловиÑÑ‚ деÑкриптор е извън допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: двуÑмиÑлено пренаÑочване"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: не може да Ñе презапише ÑъщеÑтвуващ файл"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: поради ограничение изходът не може да Ñе пренаÑочи"
+
+#: redir.c:180
+#, fuzzy, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "не може да Ñе Ñъздаде временен файл за вътрешен документ Ñ â€ž<<“: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: на член от маÑив не може да Ñе приÑвои ÑпиÑък"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "/dev/(tcp|udp)/host/port не Ñе поддържа, ако нÑма поддръжка на мрежа"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "грешка при пренаÑочване: файловиÑÑ‚ деÑкриптор не може да бъде дублиран"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "не е открита директориÑта /tmp. Създайте Ñ!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "/tmp Ñ‚Ñ€Ñбва да е директориÑ"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: неправилна опциÑ"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Ðе може да Ñе получи името на Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð¸Ñ‚ÐµÐ»!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr ""
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Употреба: %s [дълга Ð¾Ð¿Ñ†Ð¸Ñ Ð½Ð° GNU] [опциÑ] …\n"
+" %s [дълга Ð¾Ð¿Ñ†Ð¸Ñ Ð½Ð° GNU] [опциÑ] файл-Ñкрипт …\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "Дълги опции на GNU:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Опции на обвивката:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr ""
+" -irsD или -c команда, или -O къÑа_Ð¾Ð¿Ñ†Ð¸Ñ (Ñамо при Ñтартиране)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr " -%s или -o опциÑ\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"За повече Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° опциите на обвивката въведете „%s -c \"help set\"“.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"За повече Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° вградените в обвивката команди въведете „%s -c "
+"help“.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "За да докладвате грешки използвайте командата „bashbug“.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "маÑка за обработката на Ñигнали: %d: невалидна операциÑ"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr ""
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr ""
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr ""
+
+#: siglist.c:59
+msgid "Quit"
+msgstr ""
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr ""
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr ""
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr ""
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr ""
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr ""
+
+#: siglist.c:87
+msgid "Killed"
+msgstr ""
+
+#: siglist.c:91
+#, fuzzy
+msgid "Bus error"
+msgstr "Ñинтактична грешка"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr ""
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr ""
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr ""
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr ""
+
+#: siglist.c:111
+#, fuzzy
+msgid "Terminated"
+msgstr "ограничена обвивка"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr ""
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr ""
+
+#: siglist.c:127
+msgid "Continue"
+msgstr ""
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr ""
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr ""
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr ""
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr ""
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr ""
+
+#: siglist.c:155
+msgid "File limit"
+msgstr ""
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr ""
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr ""
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr ""
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr ""
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr ""
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr ""
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr ""
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr ""
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr ""
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr ""
+
+#: siglist.c:199
+msgid "programming error"
+msgstr ""
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr ""
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr ""
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr ""
+
+#: siglist.c:215
+msgid "Information request"
+msgstr ""
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr ""
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr ""
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "лошо замеÑтване: липÑва затварÑщ знак „%s“ в %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: на член от маÑив не може да Ñе приÑвои ÑпиÑък"
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "не може да Ñе Ñъздаде програмен канал за замеÑтване на процеÑи"
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "не може да Ñе Ñъздаде дъщерен Ð¿Ñ€Ð¾Ñ†ÐµÑ Ð·Ð° замеÑтване на процеÑи"
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "именуваниÑÑ‚ програмен канал %s не може да Ñе отвори за четене"
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "именуваниÑÑ‚ програмен канал %s не може да Ñе отвори за запиÑ"
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr ""
+"именуваниÑÑ‚ програмен канал %s не може да Ñе\n"
+"дублира като Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¸Ñ Ð´ÐµÑкриптор %d"
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "не може да Ñе Ñъздаде програмен канал за замеÑтване на команди"
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr "не може да Ñе Ñъздаде дъщерен Ð¿Ñ€Ð¾Ñ†ÐµÑ Ð·Ð° замеÑтване на команди"
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "замеÑтване на команди: каналът не може да Ñе дублира като fd 1"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: аргументът е null или не е зададен"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: изразът от подниза е < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: лошо замеÑтване"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: не може да Ñе задава по този начин"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, fuzzy, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "лошо замеÑтване: липÑва затварÑщ знак „%s“ в %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "нÑма Ñъвпадение: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "очаква Ñе аргумент"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: очаква Ñе целочиÑлен израз"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "очаква Ñе „)“"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "очаква Ñе „)“, а е получено %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: очаква Ñе унарен оператор"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: очаква Ñе бинарен оператор"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "липÑва „]“"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "неправилен номер на Ñигнал"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr ""
+"Ñтартиране на предÑтоÑщите капани: неправилна ÑтойноÑÑ‚ в trap_list[%d]: %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+"Ñтартиране на предÑтоÑщите капани: обработката на Ñигнали е SIG_DFL.\n"
+"%d (%s) е преизпратено на текущата обвивка"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "обработка на капани: неправилен Ñигнал %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "грешка при внаÑÑнето на дефинициÑта на Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð·Ð° „%s“"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "нивото на обвивката (%d) е прекалено голÑмо. Задава Ñе да е 1"
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr ""
+"Ñъздаване на локална променлива: липÑва контекÑÑ‚ на Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð² текущата "
+"облаÑÑ‚\n"
+"на видимоÑÑ‚"
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr ""
+"вÑички локални променливи: липÑва контекÑÑ‚ на Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð² текущата облаÑÑ‚ на\n"
+"видимоÑÑ‚"
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: аргументът е null или не е зададен"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "неправилен знак на Ð¿Ð¾Ð·Ð¸Ñ†Ð¸Ñ %d в низа за изнаÑÑне за %s"
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "липÑва „=“ в низа за изнаÑÑне за %s"
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+"изваждане на контекÑÑ‚ на променливи: в началото на Ñтруктурата за променливи "
+"на\n"
+"обвивката (shell_variables) е нещо, което не е контекÑÑ‚ на функциÑ"
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr ""
+"изваждане на контекÑÑ‚ на променливи: липÑва контекÑÑ‚ за глобални променливи\n"
+"(global_variables)"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+"изваждане на облаÑÑ‚: поÑледниÑÑ‚ елемент Ñтруктурата за променливи на "
+"обвивката\n"
+"(shell_variables) не е временна облаÑÑ‚ в обкръжението"
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: не може да Ñе отвори: %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d: грешен файлов деÑкриптор: %s"
+
+#: version.c:46
+#, fuzzy
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "ÐвторÑки права (C) 2005 Free Software Foundation, Inc.\n"
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr ""
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "ÐвторÑки права (C) 2005 Free Software Foundation, Inc.\n"
+
+#: version2.c:87
+#, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+"заделÑне на памет: %lu байта не могат да Ñе заделÑÑ‚ (заделени Ñа\n"
+"%lu байта)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "заделÑне на памет: %lu байта не могат да Ñе заделÑÑ‚"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+"заделÑне на памет: %s:%d: %lu байта не могат да Ñе заделÑÑ‚ (заделени Ñа\n"
+"%lu байта)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "заделÑне на памет: %s:%d: %lu байта не могат да Ñе заделÑÑ‚"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr ""
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr ""
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr ""
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr ""
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr ""
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr ""
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr ""
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr ""
+
+#: builtins.c:68
+msgid ":"
+msgstr ""
+
+#: builtins.c:70
+msgid "true"
+msgstr ""
+
+#: builtins.c:72
+msgid "false"
+msgstr ""
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr ""
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr ""
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr ""
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr ""
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr ""
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr ""
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr ""
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr ""
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr ""
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr ""
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr ""
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr ""
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr ""
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr ""
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr ""
+
+#: builtins.c:117
+msgid "help [-dms] [pattern ...]"
+msgstr ""
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr ""
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr ""
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr ""
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr ""
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr ""
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr ""
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr ""
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr ""
+
+#: builtins.c:148
+#, fuzzy
+msgid "shift [n]"
+msgstr "брой на премеÑтваниÑта"
+
+#: builtins.c:150
+#, fuzzy
+msgid "source filename [arguments]"
+msgstr "изиÑква Ñе аргумент име на файл"
+
+#: builtins.c:152
+#, fuzzy
+msgid ". filename [arguments]"
+msgstr "изиÑква Ñе аргумент име на файл"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr ""
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr ""
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr ""
+
+#: builtins.c:162
+msgid "times"
+msgstr ""
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr ""
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr ""
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr ""
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr ""
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr ""
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr ""
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr ""
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr ""
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr ""
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr ""
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr ""
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr ""
+
+#: builtins.c:206
+#, fuzzy
+msgid "(( expression ))"
+msgstr "очаква Ñе израз"
+
+#: builtins.c:208
+#, fuzzy
+msgid "[[ expression ]]"
+msgstr "очаква Ñе израз"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr ""
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr ""
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr ""
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr ""
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr ""
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr ""
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+
+#: builtins.c:237
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr ""
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:254
+#, fuzzy
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+" „alias“ без аргументи или Ñ Ð¾Ð¿Ñ†Ð¸Ñта „-p“ отпечатва ÑпиÑъка ÑÑŠÑ Ñинонимите "
+"във\n"
+" формат ИМЕ=СТОЙÐОСТ на ÑÑ‚Ð°Ð½Ð´Ð°Ñ€Ñ‚Ð½Ð¸Ñ Ð¸Ð·Ñ…Ð¾Ð´. Ð’ противен Ñлучай за вÑÑко "
+"ИМЕ,\n"
+" за което е зададена ÑтойноÑÑ‚, Ñе дефинира Ñиноним. Интервал в ÐºÑ€Ð°Ñ Ð½Ð°\n"
+" ÑтойноÑÑ‚ предизвиква Ñинонимно замеÑтване на Ñледващата дума при\n"
+" замеÑтването на Ñинонима. Командата „alias“ връща иÑтина, оÑвен в "
+"Ñлучаите,\n"
+" когато Ñе зададе ИМЕ, за което не е дефиниран Ñиноним."
+
+#: builtins.c:276
+#, fuzzy
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+" ИМЕната Ñе премахват от ÑпиÑъка Ñ Ð´ÐµÑ„Ð¸Ð½Ð¸Ñ€Ð°Ð½Ð¸Ñ‚Ðµ Ñиноними. Ðко е е дадена и\n"
+" опциÑта „-a“ тогава Ñе премахват вÑички Ñиноними."
+
+#: builtins.c:289
+#, fuzzy
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+" ПриÑвоÑване на поÑледователноÑÑ‚ от клавиши на Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð¸Ð»Ð¸ Ð¼Ð°ÐºÑ€Ð¾Ñ Ð¾Ñ‚ "
+"readline\n"
+" или задаване на променлива на readline. СинтакÑиÑÑŠÑ‚ Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð¸ без "
+"опции\n"
+" е еквивалентен на този във файла „~/.inputrc“, но Ñ‚Ñ€Ñбва да Ñе подаде "
+"като\n"
+" единÑтвен аргумент:\n"
+" bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+"\n"
+" bind приема Ñледните опции:\n"
+" -m ПОДРЕДБРИзползване на ПОДРЕДБÐта като подредба на функциите "
+"на\n"
+" клавишите докато командата Ñе изпълнÑва. Валидни "
+"Ñа\n"
+" Ñледните имена: „emacs“, „emacs-standard“,\n"
+" „emacs-meta“, „emacs-ctlx“, „vi“, „vi-move“,\n"
+" „vi-command“ и „vi-insert“.\n"
+" -l СпиÑък Ñ Ð¸Ð¼ÐµÐ½Ð°Ñ‚Ð° на функциите.\n"
+" -P СпиÑък Ñ Ð¸Ð¼ÐµÐ½Ð°Ñ‚Ð° на функциите и приÑвоÑваниÑта.\n"
+" -p СпиÑък Ñ Ð¸Ð¼ÐµÐ½Ð°Ñ‚Ð° на функциите и приÑвоÑваниÑта във "
+"вид,\n"
+" който може да Ñе използва за вход.\n"
+" -r КЛÐВИШÐÐ_ПОСЛЕДОВÐТЕЛÐОСТ\n"
+" Премахване на приÑвоената Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð¾Ñ‚\n"
+" КЛÐВИШÐÐта_ПОСЛЕДОВÐТЕЛÐОСТ.\n"
+" -x КЛÐВИШÐÐ_ПОСЛЕДОВÐТЕЛÐОСТ:КОМÐÐДÐ_ÐÐ_ОБВИВКÐТÐ\n"
+" Изпълнение на КОМÐÐДÐта_ÐÐ_ОБВИВКÐТРпри въвеждането "
+"на\n"
+" КЛÐВИШÐÐта_ПОСЛЕДОВÐТЕЛÐОСТ.\n"
+" -f ФÐЙЛ Прочитане на приÑвоÑваниÑта на клавиши от ФÐЙЛа.\n"
+" -q ИМЕ_ÐÐ_ФУÐКЦИЯ\n"
+" Проверка кои клавиши извикват функциÑта Ñ Ñ‚Ð¾Ð²Ð° име.\n"
+" -u ИМЕ_ÐÐ_ФУÐКЦИЯ\n"
+" Премахване на приÑвоÑваниÑта към вÑички клавиши на\n"
+" функциÑта Ñ Ñ‚Ð¾Ð²Ð° име.\n"
+" -V СпиÑък Ñ Ð¸Ð¼ÐµÐ½Ð°Ñ‚Ð° на променливите и ÑтойноÑтите им.\n"
+" -v СпиÑък Ñ Ð¸Ð¼ÐµÐ½Ð°Ñ‚Ð° на променливите и ÑтойноÑтите им във "
+"вид,\n"
+" който може да Ñе използва за вход.\n"
+" -S СпиÑък Ñ ÐºÐ»Ð°Ð²Ð¸ÑˆÐ½Ð¸Ñ‚Ðµ поÑледователноÑти, които извикват\n"
+" макроÑи и ÑтойноÑтите им.\n"
+" -s СпиÑък Ñ ÐºÐ»Ð°Ð²Ð¸ÑˆÐ½Ð¸Ñ‚Ðµ поÑледователноÑти, които извикват\n"
+" макроÑи и ÑтойноÑтите им във вид, който може да "
+"Ñе\n"
+" използва за вход."
+
+#: builtins.c:326
+#, fuzzy
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+" Продължение ÑÑŠÑ Ñледващата Ð¸Ñ‚ÐµÑ€Ð°Ñ†Ð¸Ñ Ð¾Ñ‚ цикъл ползващ FOR, WHILE или UNTIL.\n"
+" Ðко е указан N, Ñе продължава от N-Ñ‚Ð¸Ñ Ð¾Ð±Ñ…Ð²Ð°Ñ‰Ð°Ñ‰ цикъл."
+
+#: builtins.c:338
+#, fuzzy
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+" Продължение ÑÑŠÑ Ñледващата Ð¸Ñ‚ÐµÑ€Ð°Ñ†Ð¸Ñ Ð¾Ñ‚ цикъл ползващ FOR, WHILE или UNTIL.\n"
+" Ðко е указан N, Ñе продължава от N-Ñ‚Ð¸Ñ Ð¾Ð±Ñ…Ð²Ð°Ñ‰Ð°Ñ‰ цикъл."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+
+#: builtins.c:365
+#, fuzzy
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+" Връща контекÑта на текущото извикване на подпрограма.\n"
+" \n"
+" Без ИЗРÐЗ връща „$line $filename“. С ИЗРÐЗ връща\n"
+" „$line $subroutine $filename“. Допълнителната Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð¼Ð¾Ð¶Ðµ да Ñе\n"
+" използва за получаване на Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° ÑÑŠÑтоÑнието на Ñтека.\n"
+" \n"
+" СтойноÑтта на ИЗРÐЗа показва за колко рамки ÑпрÑмо текущата да Ñе "
+"изведе\n"
+" информациÑ. Ðай-горната рамка е 0."
+
+#: builtins.c:383
+#, fuzzy
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+" СмÑна на текущата Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð´Ð° е ДИРЕКТОРИЯ. Променливата $HOME е\n"
+" Ñтандартната директориÑ. Променливата $CDPATH Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»Ñ Ð¿ÑŠÑ‚Ñ Ð·Ð° Ñ‚ÑŠÑ€Ñене\n"
+" на директории, които могат да Ñъдържат ДИРЕКТОРИЯта. Директориите в "
+"$CDPATH\n"
+" Ñа разделени Ñ â€ž:“. ЛипÑващо име на Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð¾Ð·Ð½Ð°Ñ‡Ð°Ð²Ð° текущата\n"
+" директориÑ, Ñ‚.е. „.“. Ðко името на ДИРЕКТОРИЯта започва Ñ Ð½Ð°ÐºÐ»Ð¾Ð½ÐµÐ½Ð° "
+"черта\n"
+" „/“, $CDPATH не Ñе ползва. Ðко директориÑта не е открита, но е "
+"зададена\n"
+" опциÑта на обвивката „cdable_vars“, то думата Ñе пробва като име на\n"
+" променлива. Ðко променливата има ÑтойноÑÑ‚, то директориÑта Ñе ÑменÑ\n"
+" към ÑтойноÑтта на таи променлива. ОпциÑта „-P“ налага използването на\n"
+" фактичеÑката подредба на директориите, вмеÑто да Ñе Ñледват Ñимволните\n"
+" връзки. ОпциÑта „-L“ налага Ñледването на Ñимволните връзки."
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+
+#: builtins.c:428
+#, fuzzy
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr " Без ефект - командата нищо не прави. Връща Ñе изходен код 0."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+
+#: builtins.c:476
+#, fuzzy
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+" ОбÑвÑване на променливи и/или задаване на техните атрибути. Ðко не Ñа "
+"зададени\n"
+" ИМЕна, то Ñе показват ÑтойноÑтите на променливите. ОпциÑта „-p“ "
+"показва\n"
+" ÑтойноÑтта и атрибутите за вÑÑко ИМЕ.\n"
+" \n"
+" Опциите Ñа:\n"
+" \n"
+" -a да Ñе Ñъздадат маÑиви Ñ Ñ‚ÐµÐ·Ð¸ ИМЕна (ако това Ñе поддържа)\n"
+" -f да Ñе избира Ñамо измежду имената на функциите\n"
+" -F да Ñе изведат имената на функциите (Ñ Ð½Ð¾Ð¼ÐµÑ€ на реда и име на "
+"файла\n"
+" Ñ Ð¸Ð·Ñ…Ð¾Ð´Ð½Ð¸Ñ ÐºÐ¾Ð´ при изчиÑтване на грешки) без дефинициите.\n"
+" -i на ИМЕто Ñе дава атрибут „цÑло чиÑло“\n"
+" -r маха Ñе възможноÑтта за промÑна на ИМЕната\n"
+" -t на ИМЕто Ñе дава атрибут „проÑледÑване“\n"
+" -x ИМЕто да бъде изнаÑÑно\n"
+"\n"
+" При променливите Ñ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚ за цÑло чиÑло Ñе извършва аритметично "
+"замеÑтване\n"
+" (вижте командата „let“) при първоначално приÑвоÑване.\n"
+" \n"
+" При извеждането на ÑтойноÑтите на променливите „-f“ извежда имената и\n"
+" дефинициите на функциите. ОпциÑта „-F“ ограничава изведената "
+"информациÑ\n"
+" до имената.\n"
+"\n"
+" Използването на „+“ вмеÑто „-“ премахва атрибута. При използването във\n"
+" Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð˜ÐœÐ•Ð½Ð°Ñ‚Ð° Ñтават локални, както при използването на командата "
+"„local“."
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+
+#: builtins.c:537
+#, fuzzy
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+" Извеждане на ÐРГУМЕÐТите. Когато е зададена опциÑта „-n“, не Ñе извежда "
+"знак\n"
+" за нов ред. Ðко е зададена опциÑта „-e“, Ñе включва интерпретирането "
+"на\n"
+" Ñледните знаци екранирани Ñ Ð¾Ð±Ñ€Ð°Ñ‚Ð½Ð° наклонена черта - „\\“:\n"
+" \\a ÑиÑтемен звънец\n"
+" \\b триене назад\n"
+" \\c пропуÑкане на знака за нов ред\n"
+" \\E знак за екраниране\n"
+" \\f знак „Завършване на формулÑра“ (form feed)\n"
+" \\n знак за нов ред\n"
+" \\r знак „Връщане на каретката“ (carriage return)\n"
+" \\t хоризонтална табулациÑ\n"
+" \\v вертикална табулациÑ\n"
+" \\\\ обратно наклонена черта\n"
+" \\ÐМР знакът Ñ ÐºÐ¾Ð´ в ASCII - ÐоМеР (в оÑмична бройна ÑиÑтема).\n"
+"\n"
+" Можете изрично да Ñпрете интерпретирането на горните знаци Ñ Ð¾Ð¿Ñ†Ð¸Ñта „-"
+"E“."
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+
+#: builtins.c:626
+#, fuzzy
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+" getopts Ñе използва от процедурите на обвивката за анализа на позиционните\n"
+" аргументи.\n"
+" \n"
+" ÐИЗът_С_ОПЦИИ Ñъдържа знаците, които Ñ‚Ñ€Ñбва да Ñе разпознават като "
+"опции.\n"
+" Ðко буквата е Ñледвана от двоеточие, очаква Ñе опциÑта да получава "
+"аргумент,\n"
+" който да е разделен от Ð½ÐµÑ Ñ Ð¸Ð½Ñ‚ÐµÑ€Ð²Ð°Ð»(и).\n"
+" \n"
+" При вÑÑко извикване, „getopts“ поÑÑ‚Ð°Ð²Ñ Ñледващата Ð¾Ð¿Ñ†Ð¸Ñ Ð² променливата "
+"на\n"
+" обвивката $name, като Ñ Ð¸Ð½Ð¸Ñ†Ð¸Ð°Ð»Ð¸Ð·Ð¸Ñ€Ð°, ако Ñ‚Ñ Ð½Ðµ ÑъщеÑтвува, а индекÑÑŠÑ‚ "
+"на\n"
+" ÑÐ»ÐµÐ´Ð²Ð°Ñ‰Ð¸Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚, който Ñ‚Ñ€Ñбва да Ñе обработи, в променливата на "
+"обвивката\n"
+" $OPTIND. $OPTIND Ñе инициализира да е 1 при вÑÑко извикване на обвивка "
+"или\n"
+" Ñкрипт. Когато опциÑта Ñе нуждае от аргумент, той Ñе поÑÑ‚Ð°Ð²Ñ Ð² "
+"променливата\n"
+" на обвивката $OPTARG.\n"
+" \n"
+" „getopts“ докладва грешки по един от два начина. Ðко първиÑÑ‚ знак на\n"
+" $OPTSTRING е двоеточие, „getopts“ използва тихо докладване. В този "
+"режим\n"
+" не Ñе извеждат никакви ÑÑŠÐ¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð·Ð° грешка. Ðко Ñе Ñрещне неправилна "
+"опциÑ,\n"
+" „getopts“ Ñлага „:“ в $NAME, а в $OPTARG - ÑÑ€ÐµÑ‰Ð½Ð°Ñ‚Ð¸Ñ Ð·Ð½Ð°Ðº за опциÑ. "
+"Ðко\n"
+" „getopts“ не е в режим на тихо докладване, в $NAME Ñе Ñлага „?“, $OPTARG "
+"Ñе\n"
+" премахва и Ñе изпиÑва диагноÑтично Ñъобщение.\n"
+" \n"
+" Ðко променливата на обвивката $OPTERR е ÑÑŠÑ ÑтойноÑÑ‚ 0, „getopts“ "
+"изключва\n"
+" извеждането на диагноÑтични ÑъобщениÑ, дори първиÑÑ‚ знак в $OPTSTRING да "
+"не\n"
+" е двоеточие. По подразбиране $OPTERR е ÑÑŠÑ ÑтойноÑÑ‚ 1.\n"
+" \n"
+" „getopts“ по принцип анализира позиционните аргументи ($0 - $9), но ако "
+"Ñа\n"
+" дадени повече аргументи, те биват анализирани вмеÑто това."
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+#: builtins.c:689
+#, fuzzy
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+" Изход от обвивката Ñ ÐºÐ¾Ð´ N. Ðко N е изпуÑнат, то изходниÑÑ‚ код е този на\n"
+" поÑледната изпълнена команда."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+
+#: builtins.c:708
+#, fuzzy
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+" „fc“ Ñе използва, за изброÑването или редактирането и повторното изпълнение "
+"на\n"
+" команди от ÑпиÑъка на иÑториÑта. ПЪРВИ и ПОСЛЕДЕРÑа номера, които "
+"могат да\n"
+" указват допуÑÑ‚Ð¸Ð¼Ð¸Ñ Ð´Ð¸Ð°Ð¿Ð°Ð·Ð¾Ð½. Ðко е зададен Ñамо ПЪРВИÑÑ‚ аргумент, той\n"
+" задава низ, който е началото на команда.\n"
+" \n"
+" -e РЕДÐКТОР показва редактора, който да Ñе използва. Стандартно "
+"е\n"
+" $FCEDIT, Ñлед това Ñе проверÑва $EDITOR и Ð½Ð°ÐºÑ€Ð°Ñ "
+"„vi“.\n"
+" -l означава редовете да Ñе покажат вмеÑто редактират.\n"
+" -n означава номерата на редовете да не Ñе показват.\n"
+" -r означава обратна подредба (отпред да е най-новиÑÑ‚ "
+"ред).\n"
+" \n"
+" При варианта „fc -s [ШÐБЛ=ЗÐМЕСТ …] [КОМÐÐДÐ]“ командата Ñе изпълнÑва, "
+"като\n"
+" вÑÑка поÑва на ШÐБЛона Ñе Ð·Ð°Ð¼ÐµÐ½Ñ ÑÑŠÑ Ð—ÐМЕСТителÑ.\n"
+" \n"
+" Удобен за използване Ñиноним е „r='fc -s'“. По такъв начин, ако "
+"напишете\n"
+" „r cc“, ще Ñе изпълни поÑледната команда, коÑто започва Ñ â€žcc“, а "
+"когато\n"
+" Ñе въведе Ñамо „-r“, ще Ñе изпълни поÑледната команда."
+
+#: builtins.c:738
+#, fuzzy
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+" Изважда ЗÐДÐЧРот фонов режим и Ñ Ð¿Ñ€Ð°Ð²Ð¸ текуща задача. Ðко липÑва\n"
+" аргумент ЗÐДÐЧÐ, Ñе използва текущата задача Ñпоред обвивката."
+
+#: builtins.c:753
+#, fuzzy
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+" ПоÑÑ‚Ð°Ð²Ñ Ð²ÑÑка ЗÐДÐЧРвъв фонов режим, вÑе едно е била Ñтартирана Ñ â€ž&“.\n"
+" Ðко липÑва аргумент ЗÐДÐЧÐ, Ñе използва текущата задача Ñпоред обвивката."
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:816
+#, fuzzy
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+" Показване на ÑпиÑъка на иÑториÑта Ñ Ð½Ð¾Ð¼ÐµÑ€Ð° на ред. Редовете, които Ñа\n"
+" отбелÑзани ÑÑŠÑ Ð·Ð½Ð°ÐºÐ° „*“, Ñа били променени. Ðргументът N указва да Ñе\n"
+" извеждат Ñамо N на брой реда. ОпциÑта „-c“ предизвиква изчиÑтването на\n"
+" ÑпиÑъка, като Ñе изтриват вÑички елементи от него. ОпциÑта „-d“ "
+"изтрива\n"
+" елемента в иÑториÑта намиращ Ñе поÑочената ПОЗИЦИЯ. ОпциÑта „-w“ "
+"запиÑва\n"
+" текущата иÑÑ‚Ð¾Ñ€Ð¸Ñ Ð²ÑŠÐ² файла за иÑториÑта. ОпциÑта „-r“ означава ÑъщиÑÑ‚ "
+"файл\n"
+" да Ñе прочете, а Ñъдържанието му да Ñе добави към иÑториÑта. ОпциÑта „-"
+"a“\n"
+" Ð´Ð¾Ð±Ð°Ð²Ñ Ð¸ÑториÑта от текущата ÑеÑÐ¸Ñ ÐºÑŠÐ¼ файла Ñ Ð¸ÑториÑта. ОпциÑта „-n“\n"
+" предизвиква вÑички редове от файла Ñ Ð¸ÑториÑта, които вÑе още не Ñа\n"
+" прочетени от файла Ñ Ð¸ÑториÑта, да Ñе прочетат и добавÑÑ‚ към текущата\n"
+" иÑÑ‚Ð¾Ñ€Ð¸Ñ Ð½Ð° командите.\n"
+" \n"
+" Ðко аргументът ИМЕ_ÐÐ_ФÐЙЛ е зададен, той Ñе използва като файл за\n"
+" иÑториÑта. Ðко той липÑва, Ñе използва файлът Ñочен в променливата на\n"
+" Ñредата $HISTFILE. Ð’ противен Ñлучай Ñе ползва „~/.bash_history“. Ðко е\n"
+" зададена опциÑта „-s“, аргументите, които не Ñа опции, Ñе добавÑÑ‚ като "
+"един\n"
+" елемент към файла Ñ Ð¸ÑториÑта. ОпциÑта „-p“ означава да Ñе извърши\n"
+" иÑторичеÑко замеÑтване за вÑеки ÐРГУМЕÐТ, а резултатът да Ñе изведе, "
+"без\n"
+" нищо да Ñе запиÑва в иÑториÑта на командите.\n"
+" \n"
+" Ðко променливата $HISTTIMEFORMAT е зададена и не е „null“, ÑтойноÑтта Ñ "
+"Ñе\n"
+" използва като Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¸Ñ€Ð°Ñ‰Ð¸Ñ Ð½Ð¸Ð· за функциÑта „strftime“, за да Ñе "
+"отбелÑзва\n"
+" времето Ñвързано Ñ Ð²Ñеки елемент от иÑториÑта. Ð’ противен Ñлучай "
+"времето не\n"
+" Ñе запиÑва."
+
+#: builtins.c:852
+#, fuzzy
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+" Извежда ÑпиÑък Ñ Ð°ÐºÑ‚Ð¸Ð²Ð½Ð¸Ñ‚Ðµ задачи. ОпциÑта „-l“ включва и идентификатора "
+"на\n"
+" процеÑите в добавка към Ñтандартната информациÑ. ОпциÑта „-p“ извежда "
+"Ñамо\n"
+" идентификаторите на процеÑите. Ðко е зададена опциÑта „-n“ Ñе извеждат "
+"Ñамо\n"
+" процеÑите Ñ Ð¿Ñ€Ð¾Ð¼ÐµÐ½ÐµÐ½Ð¾ ÑÑŠÑтоÑние от поÑледното извеждане на тази "
+"информациÑ.\n"
+" ЗÐДÐЧÐта ограничава информациÑта до Ñебе Ñи. Опциите „-r“ и „-s“\n"
+" ограничават Ñъответно изхода Ñамо до работещите и Ñпрени задачи. Без "
+"опции\n"
+" Ñе отпечатва ÑÑŠÑтоÑнието на вÑички активни задачи. Ðко е зададена "
+"опциÑта\n"
+" „-x“, КОМÐÐДÐта Ñе изпълнÑва, Ñлед като вÑички ЗÐДÐЧи, които Ñе поÑвÑват "
+"като\n"
+" аргументи, Ñе заменÑÑ‚ Ñ Ð¸Ð´ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ‚Ð¾Ñ€Ð° на водача на групата процеÑи."
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+
+#: builtins.c:898
+#, fuzzy
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+" Изпращане на Ñигнала SIGSPEC на процеÑа Ñ Ð¸Ð´ÐµÐ½Ñ‚Ð¸Ñ„Ð¸ÐºÐ°Ñ‚Ð¾Ñ€ ИдП (или ЗÐДÐЧÐ).\n"
+" Ðко Ñигналът SIGSPEC не ÑъщеÑтвува, Ñе използва SIGTERM.\n"
+" ОпциÑта „-l“ изброÑва имената на Ñигналите. Ðко към Ð½ÐµÑ Ñа добавени\n"
+" аргументи, те Ñе интерпретират като номера на Ñигналите чиито имена\n"
+" да Ñе изброÑÑ‚. „kill“ е команда вградена в обвивката поради две\n"
+" причини: позволÑва да Ñе използват и идентификатори на задачи оÑвен\n"
+" идентификатори на процеÑи, а и ако Ñте пуÑнали макÑимално разрешениÑ\n"
+" за Ð²Ð°Ñ Ð±Ñ€Ð¾Ð¹ процеÑи, нÑма да ви Ñе налага да пуÑнете още един процеÑ,\n"
+" за да убиете друг."
+
+#: builtins.c:921
+#, fuzzy
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+" Ð’Ñеки аргумент е аритметичен израз, който Ñе бъде изчиÑлен. ИзчиÑлениÑта\n"
+" Ñе извършват в аритметика Ñ Ñ†ÐµÐ»Ð¾Ñ‡Ð¸Ñлени ÑтойноÑти Ñ Ð¿Ð¾ÑтоÑнна широчина\n"
+" без проверка за препълване. Делението на 0 Ñе прихваща и Ñе отбелÑзва\n"
+" грешка. СледващиÑÑ‚ ÑпиÑък на оператори е разделен на групи Ñпоред\n"
+" приоритета на операциите. Подредбата е Ñ Ð½Ð°Ð¼Ð°Ð»Ñващ приоритет.\n"
+" \n"
+" id++, id-- поÑледващо увеличаване/намалÑване на променлива\n"
+" ++id, --id предварително увеличаване/намалÑване на променлива\n"
+" -, + унарни минуÑ, плюÑ\n"
+" !, ~ логичеÑко и побитово отрицаниÑ\n"
+" ** вдигане на Ñтепен\n"
+" *, /, % умножение, деление, целочиÑлен оÑтатък\n"
+" +, - Ñъбиране, изваждане\n"
+" <<, >> побитово меÑтене налÑво и надÑÑно\n"
+" <=, >=, <, > Ñравнение\n"
+" ==, != равно, различно\n"
+" & побитово И\n"
+" ^ побитово ИЛИ, ИЛИ\n"
+" | побитово ИЛИ\n"
+" && логичеÑко И\n"
+" || логичеÑко ИЛИ\n"
+" expr ? expr : expr\n"
+" уÑловен оператор\n"
+" =, *=, /=, %=,\n"
+" +=, -=, <<=, >>=,\n"
+" &=, ^=, |= приÑвоÑване\n"
+" \n"
+" Разрешено е ползването на променливи на обвивката като операнди.\n"
+" Името на променлива Ñе замеÑтва Ñ Ð½ÐµÐ¹Ð½Ð°Ñ‚Ð° ÑтойноÑÑ‚ (коÑто Ñе\n"
+" преобразува до цÑло чиÑло Ñ Ð¿Ð¾ÑтоÑнна широчина) в израза. Ðе\n"
+" е необходимо за променливата да е Ñ Ð°Ñ‚Ñ€Ð¸Ð±ÑƒÑ‚ за целочиÑленоÑÑ‚, за\n"
+" да Ñе използва в израз.\n"
+" \n"
+" Операторите Ñе изчиÑлÑват по приоритет. Подизразите в Ñкоби Ñе\n"
+" изчиÑлÑват първи и могат да променÑÑ‚ приоритета.\n"
+" \n"
+" Ðко поÑледниÑÑ‚ ÐРГУМЕÐТ Ñе изчиÑлÑва като 0, „let“ връща 1. Ð’\n"
+" противен Ñлучай - връща 0."
+
+#: builtins.c:966
+#, fuzzy
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+" От ÑÑ‚Ð°Ð½Ð´Ð°Ñ€Ñ‚Ð½Ð¸Ñ Ð²Ñ…Ð¾Ð´ или от Ñ„Ð°Ð¹Ð»Ð¾Ð²Ð¸Ñ Ð´ÐµÑкриптор ФД, ако е използвана опциÑта "
+"„-u“,\n"
+" Ñе прочита един ред и първата дума Ñе приÑвоÑва на първото ИМЕ, втората "
+"дума\n"
+" на второто ИМЕ и Ñ‚.н., а на поÑледното ИМЕ Ñе приÑвоÑват оÑтаващите "
+"думи.\n"
+" Като разделители на думи Ñе използват Ñамо знаците указани в $IFS. Ðко "
+"не Ñа\n"
+" дадени ИМЕна, прочетениÑÑ‚ ред Ñе запазва в променливата $REPLY. Когато "
+"е\n"
+" използвана опциÑта „-r“, входът не Ñе обработва и замеÑтването на\n"
+" екранираните Ñ â€ž\\“ знаци Ñе изключва. ОпциÑта „-d“ кара „read“ да\n"
+" продължи до прочитането на Ð¿ÑŠÑ€Ð²Ð¸Ñ Ð·Ð½Ð°Ðº, който приÑÑŠÑтва в променливата\n"
+" $DELIM, а не до минаването на нов ред. Ðко е зададена опциÑта „-p“, Ñе\n"
+" извежда низът ПОДСКÐЗКРбез минаване на нов ред, преди да Ñе четат знаци "
+"на\n"
+" входа. Когато е зададена опциÑта „-a“, прочетените уми Ñе приÑвоÑват\n"
+" поÑледователно на елементите на ÐœÐСИВа, като индекÑÑŠÑ‚ му започва от 0. "
+"Ðко\n"
+" приÑÑŠÑтва опциÑта „-e“, а обвивката е интерактивна, за четене на реда "
+"Ñе\n"
+" използва „readline“. Когато опциÑта „-n“ има аргумент БРОЙ_ЗÐÐЦИ, то "
+"„read“\n"
+" Ñвършва Ñлед прочитането на този БРОЙ_ЗÐÐЦИ. С опциÑта „-s“ входът от\n"
+" терминал не Ñе отпечатва на екрана.\n"
+" \n"
+" ОпциÑта „-t“ задава ИÐТЕРВÐЛ, в който Ñ‚Ñ€Ñбва да Ñе въведе цÑл ред. Ð’\n"
+" противен Ñлучай „read“ завършва Ñ Ð³Ñ€ÐµÑˆÐºÐ°. Ðко е зададена, ÑтойноÑтта "
+"на\n"
+" променливата $TMOUT обозначава времето, за което Ñ‚Ñ€Ñбва да Ñе въведе "
+"редът.\n"
+" ИзходниÑÑ‚ код е 0, оÑвен ако не Ñе Ñрещне знак за край на файл „EOF“, "
+"мине\n"
+" ИÐТЕРВÐЛът за въвеждане или е зададен неправилен файлов деÑкриптор като\n"
+" аргумент на „-u“."
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+
+#: builtins.c:1022
+#, fuzzy
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+" -a ОтбелÑзване на променливите, които Ñа Ñъздадени или променени, да\n"
+" бъдат изнеÑени.\n"
+" -b Ðезабавно извеÑÑ‚Ñване на Ñпиране на задача.\n"
+" -e Ðезабавен изход, ако команда приключи команда Ñ ÐºÐ¾Ð´, който не е "
+"0.\n"
+" -f Изключване на генерирането на имена на файлове (чрез „*“, „?“ и т."
+"н.).\n"
+" -h ЗапомнÑне на меÑтоположението на команди при Ñ‚ÑŠÑ€Ñенето им.\n"
+" -k Ð’Ñички аргументи за приÑвоÑване Ñе помеÑтват в Ñредата на команда, "
+"не\n"
+" Ñамо тези, които предхождат името на команда.\n"
+" -m Включване на управлението на задачи.\n"
+" -n Прочитане на команди, без да Ñе изпълнÑват.\n"
+" -o ИМЕ_ÐÐ_ОПЦИЯ\n"
+" Задаване на променливата, коÑто Ð¾Ñ‚Ð³Ð¾Ð²Ð°Ñ€Ñ Ð½Ð° ИМЕто_ÐÐ_ОПЦИЯ:\n"
+" allexport Ñъщото като „-a“\n"
+" braceexpand Ñъщото като „-B“\n"
+" emacs използване на Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð·Ð° редактиране подобен на "
+"„emacs“\n"
+" errexit Ñъщото като „-e“\n"
+" errtrace Ñъщото като „-E“\n"
+" functrace Ñъщото като „-T“\n"
+" hashall Ñъщото като „-h“\n"
+" histexpand Ñъщото като „-H“\n"
+" history включване на иÑториÑта на командите\n"
+" ignoreeof обвивката нÑма да излезе при откриване на знак за край "
+"на\n"
+" файл „EOF“.\n"
+" interactive-comments\n"
+" позволÑване на коментари в интерактивните команди\n"
+" keyword Ñъщото като „-k“\n"
+" monitor Ñъщото като „-m“\n"
+" noclobber Ñъщото като „-C“\n"
+" noexec Ñъщото като „-n“\n"
+" noglob Ñъщото като „-f“\n"
+" nolog тази Ð¾Ð¿Ñ†Ð¸Ñ Ñе приема в момента, но Ñе игнорира\n"
+" notify Ñъщото като „-b“\n"
+" nounset Ñъщото като „-u“\n"
+" onecmd Ñъщото като „-t“\n"
+" physical Ñъщото като „-P“\n"
+" pipefail изходниÑÑ‚ код на Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð½Ð¸Ñ ÐºÐ°Ð½Ð°Ð» е този на поÑледната\n"
+" команда, коÑто завършва Ñ ÐºÐ¾Ð´ различен от 0\n"
+" posix промÑна на поведението на „bash“ да Ð¾Ñ‚Ð³Ð¾Ð²Ð°Ñ€Ñ Ð½Ð° "
+"Ñтандарт\n"
+" 1003.2\n"
+" privileged Ñъщото като „-p“\n"
+" verbose Ñъщото като „-v“\n"
+" vi използване на Ð¸Ð½Ñ‚ÐµÑ€Ñ„ÐµÐ¹Ñ Ð·Ð° редактиране подобен на „vi“\n"
+" xtrace Ñъщото като „-x“\n"
+" -p ОпциÑта включена. когато реалниÑÑ‚ и ефективниÑÑ‚ идентификатори "
+"процеÑи\n"
+" не Ñъвпадат. Изключва обработката на файла $ENV и внаÑÑнето "
+"на\n"
+" функции на обвивката. Изключването на тази Ð¾Ð¿Ñ†Ð¸Ñ Ð²Ð¾Ð´Ð¸ до "
+"това\n"
+" ефективните идентификатори за потребител и група да Ñтанат "
+"равни\n"
+" на реалните.\n"
+" -t Изход Ñлед прочитането и изпълнението на една команда.\n"
+" -u Ðезададените променливи да Ñе третират като грешки при "
+"замеÑтването.\n"
+" -v Отпечатване на входните редове към обвивката при прочитането им.\n"
+" -x Отпечатване на командите и аргументите им при изпълнението им.\n"
+" -B Обвивката ще извършва замеÑтване на изразите Ñ Ñ„Ð¸Ð³ÑƒÑ€Ð½Ð¸ Ñкоби.\n"
+" -C ПредотвратÑване на презапиÑването на ÑъщеÑтвуващите обикновени "
+"файлове\n"
+" чрез пренаÑочване на изхода.\n"
+" -E Капанът за „ERR“ да Ñе наÑледÑва от функциите на обвивката.\n"
+" -H Включване на замеÑтването чрез иÑториÑта Ñ â€ž!“. Стандартно тази "
+"опциÑ\n"
+" е налична за интерактивните обвивки.\n"
+" -P Да не Ñе Ñледват Ñимволните връзки при изпълнението на команди "
+"като\n"
+" „cd“, които променÑÑ‚ текущата директориÑ.\n"
+" -T Капанът за „DEBUG“ да Ñе наÑледÑва от функциите на обвивката.\n"
+" - ОÑтаващите аргументи да Ñе тълкуват като позиционни. Опциите „-x“ "
+"и\n"
+" Ñа изключени.\n"
+" \n"
+" Използването на „+“ вмеÑто „-“ изключва опциите. Тези опции могат да "
+"Ñе\n"
+" използват и при Ñтартирането на обвивката. Текущото им ÑÑŠÑтоÑние Ñе "
+"намира\n"
+" в „$-“. ОÑтаналите n на брой ÐРГументи Ñа позиционни и Ñе приÑвоÑват\n"
+" Ñъответно на $1, $2,… $n. Ðко не Ñа зададени ÐРГументи, Ñе извеждат\n"
+" вÑички променливи на Ñредата."
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+#, fuzzy
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+" Изчитане и изпълнение на командите от ФÐЙЛа и изход. Директориите опиÑани "
+"в\n"
+" променливата $PATH Ñе използват за изпълнението на командите от ФÐЙЛа. "
+"Ðко\n"
+" Ñа зададени ÐРГУМЕÐТИ, те Ñе превръщат в позиционни аргументи при\n"
+" изпълнението на ФÐЙЛа."
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+#, fuzzy
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+" Изход Ñ ÐºÐ¾Ð´ 0 (иÑтина) или 1 (лъжа) в завиÑимоÑÑ‚ от ÑтойноÑтта на ИЗРÐЗа.\n"
+" Изразите могат да бъдат унарни или бинарни. Унарните най-чеÑто Ñе "
+"използват\n"
+" за проверка на ÑÑŠÑтоÑнието на файл. ОÑвен Ñ‚ÑÑ… има и оператори за "
+"чиÑлови\n"
+" ÑÑ€Ð°Ð²Ð½ÐµÐ½Ð¸Ñ Ð¸ низови оператори.\n"
+" \n"
+" Файлови оператори:\n"
+" \n"
+" -a ФÐЙЛ ИÑтина, ако ФÐЙЛът ÑъщеÑтвува.\n"
+" -b ФÐЙЛ ИÑтина, ако ФÐЙЛът е блоково уÑтройÑтво.\n"
+" -c ФÐЙЛ ИÑтина, ако ФÐЙЛът е знаково уÑтройÑтво.\n"
+" -d ФÐЙЛ ИÑтина, ако ФÐЙЛът е директориÑ.\n"
+" -e ФÐЙЛ ИÑтина, ако ФÐЙЛът ÑъщеÑтвува.\n"
+" -f ФÐЙЛ ИÑтина, ако ФÐЙЛът ÑъщеÑтвува и е обикновен файл.\n"
+" -g ФÐЙЛ ИÑтина, ако ФÐЙЛът е ÑÑŠÑ Ð·Ð°Ð´Ð°Ð´ÐµÐ½ бит за ÑмÑна на група\n"
+" при изпълнение.\n"
+" -h ФÐЙЛ ИÑтина, ако ФÐЙЛът е Ñимволна връзка.\n"
+" -L ФÐЙЛ ИÑтина, ако ФÐЙЛът е Ñимволна връзка.\n"
+" -k ФÐЙЛ ИÑтина, ако ФÐЙЛът е ÑÑŠÑ Ð·Ð°Ð´Ð°Ð´ÐµÐ½ лепкав бит.\n"
+" -p ФÐЙЛ ИÑтина, ако ФÐЙЛът е именуван програмен канал.\n"
+" -r ФÐЙЛ ИÑтина, ако ФÐЙЛът може да бъде прочетен от ваÑ.\n"
+" -s ФÐЙЛ ИÑтина, ако ФÐЙЛът може да бъде запиÑван от ваÑ.\n"
+" -S ФÐЙЛ ИÑтина, ако ФÐЙЛът е програмно гнездо.\n"
+" -t ФДСК ИÑтина, ако ФайловиÑÑ‚_ДеСКриптор е отворен на терминал.\n"
+" -u ФÐЙЛ ИÑтина, ако ФÐЙЛът е ÑÑŠÑ Ð·Ð°Ð´Ð°Ð´ÐµÐ½ бит за ÑмÑна на "
+"потребител\n"
+" при изпълнение.\n"
+" -w ФÐЙЛ ИÑтина, ако ФÐЙЛът може да бъде запиÑван от ваÑ.\n"
+" -x ФÐЙЛ ИÑтина, ако ФÐЙЛът може да бъде изпълнÑван от ваÑ.\n"
+" -O ФÐЙЛ ИÑтина, ако ФÐЙЛът може да бъде ефективно притежаван от "
+"ваÑ.\n"
+" -G ФÐЙЛ ИÑтина, ако ФÐЙЛът може да бъде ефективно притежаван от "
+"вашата\n"
+" група.\n"
+" -N ФÐЙЛ ИÑтина, ако ФÐЙЛът е бил променÑн от поÑледното му "
+"прочитане.\n"
+" \n"
+" ФÐЙЛ_1 -nt ФÐЙЛ_2 ИÑтина, ако ФÐЙЛ_1 е по-нов от ФÐЙЛ_2 (Ñпоред\n"
+" датата на промÑна).\n"
+" ФÐЙЛ_1 -ot ФÐЙЛ_2 ИÑтина, ако ФÐЙЛ_1 е по-Ñтар от ФÐЙЛ_2 "
+"(Ñпоред\n"
+" датата на промÑна). \n"
+" ФÐЙЛ_1 -ef ФÐЙЛ_2 ИÑтина, ако ФÐЙЛ_1 е твърда връзка към "
+"ФÐЙЛ_2.\n"
+" \n"
+" Ðизови оператори:\n"
+" \n"
+" -z ÐИЗ ИÑтина, ако ÐИЗът е празен.\n"
+" -n ÐИЗ ИÑтина, ако ÐИЗът не е празен.\n"
+" ÐИЗ ИÑтина, ако ÐИЗът не е празен.\n"
+" \n"
+" ÐИЗ_1 = ÐИЗ_2 ИÑтина, ако низовете Ñа равни.\n"
+" ÐИЗ_1 != ÐИЗ_2 ИÑтина, ако низовете не Ñа равни.\n"
+" ÐИЗ_1 < ÐИЗ_2 ИÑтина, ако ÐИЗ_1 е лекÑикографÑки преди ÐИЗ_2.\n"
+" ÐИЗ_1 > ÐИЗ_2 ИÑтина, ако ÐИЗ_1 е лекÑикографÑки Ñлед ÐИЗ_2.\n"
+" \n"
+" Други оператори:\n"
+" \n"
+" -o ОПЦИЯ ИÑтина, ако ОПЦИЯта на обвивката е "
+"зададена.\n"
+" ! ИЗРÐЗ ИÑтина, ако ИЗРÐЗът е лъжа.\n"
+" ИЗРÐЗ_1 -a ИЗРÐЗ_2 ИÑтина, ако и двата ИЗРÐЗа Ñа иÑтина.\n"
+" ИЗРÐЗ_1 -o ИЗРÐЗ_2 ИÑтина, ако поне един от ИЗРÐЗите е иÑтина.\n"
+" \n"
+" ÐРГ_1 ОПЕРÐТОР ÐРГ_2 Ðритметични теÑтове. Те връщат иÑтина, ако "
+"Ñе\n"
+" изпълнÑва математичеÑкото уÑловие на "
+"ОПЕРÐТОРа,\n"
+" който е един от Ñледните (значението е в "
+"Ñкоби):\n"
+" „-eq“ (=), „-ne“ (!=), „-lt“ (<),\n"
+" „-le“ (<=), „-gt“ (>) , „-ge“ (>=)."
+
+#: builtins.c:1299
+#, fuzzy
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+" Това е Ñиноним на вградената команда „test“, но поÑледниÑÑ‚ аргумент Ñ‚Ñ€Ñбва\n"
+" задължително да е знакът „]“, който да ÑъответÑтва на отварÑщата Ñкоба "
+"„[“."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:1320
+#, fuzzy
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+" Командата ÐРГУМЕÐТ ще бъде прочетена и изпълнена, когато обвивката получи\n"
+" УКÐЗÐÐиÑ_СИГÐÐЛ(и). Ðко ÐРГУМЕÐТът липÑва (и Ñе подава единичен\n"
+" УКÐЗÐÐ_СИГÐÐЛ) или е „-“, то вÑеки УКÐЗÐÐ_СИГÐÐЛ Ñе връща към "
+"първоначалната\n"
+" Ñи ÑтойноÑÑ‚. Ðко ÐРГУМЕÐТът е Ð½ÑƒÐ»ÐµÐ²Ð¸Ñ Ð½Ð¸Ð·, вÑеки УКÐЗÐÐ_СИГÐÐЛ Ñе\n"
+" пренебрегва от обвивката и командите, които Ñе Ñтартират през неÑ. Ðко\n"
+" УКÐЗÐÐиÑÑ‚_СИГÐÐЛ е „EXIT (0)“, то командата ÐРГУМЕÐТ Ñе изпълнÑва от\n"
+" обвивката при изход. Ðко УКÐЗÐÐиÑÑ‚_СИГÐÐЛ е „DEBUG“, ÐРГУМЕÐТът Ñе\n"
+" изпълнÑва Ñлед вÑÑка проÑта команда. Ðко е дадена опциÑта „-p“, то\n"
+" Ñе извеждат командите Ñвързани Ñ Ð²Ñеки УКÐЗÐÐ_СИГÐÐЛ. Ð’Ñеки "
+"УКÐЗÐÐ_СИГÐÐЛ\n"
+" е или име на Ñигнал от файла „signal.h“ или номер на Ñигнал. ÐÑма "
+"разлика\n"
+" между главни и малки букви в имената на Ñигнали, а предÑтавката „SIG“ не "
+"е\n"
+" задължителна. „trap -l“ отпечатва ÑпиÑъка Ñ Ð¸Ð¼ÐµÐ½Ð°Ñ‚Ð° на Ñигналите и\n"
+" ÑъответÑтващите им номера. Забележете, че Ñигнал може да бъде изпратен "
+"на\n"
+" обвивката Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð°Ñ‚Ð° „kill -signal $$“."
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+#, fuzzy
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+" ulimit оÑъщеÑтвÑва контрол върху реÑурÑите, които Ñа доÑтъпни на процеÑите\n"
+" Ñтартирани през обвивката върху ÑиÑтемите, които поддържат такова\n"
+" управление. Ðко Ñа зададени опции, те означават Ñледното:\n"
+" \n"
+" -S използване на „мекото“ ограничение на реÑурÑ\n"
+" -H използване на „твърдото“ ограничение на реÑурÑ\n"
+" -a извеждат Ñе вÑички текущи ограничениÑ\n"
+" -c макÑималниÑÑ‚ размер на Ñъздадените файлове ÑÑŠÑ Ñъдържание на\n"
+" паметта (core)\n"
+" -d макÑималниÑÑ‚ размер на Ñегмента на Ð¿Ñ€Ð¾Ñ†ÐµÑ Ð·Ð° данни\n"
+" -f макÑималниÑÑ‚ размер на файловете Ñъздадени от обвивката\n"
+" -i макÑималниÑÑ‚ брой на изчакващите Ñигнали\n"
+" -l макÑималниÑÑ‚ размер памет, коÑто Ð¿Ñ€Ð¾Ñ†ÐµÑ Ð¼Ð¾Ð¶Ðµ да заключи\n"
+" -m макÑималниÑÑ‚ поÑтоÑнно зареден в паметта Ñегмент\n"
+" -n макÑималниÑÑ‚ брой деÑкриптори на отворени файлове\n"
+" -p размер на буфера за конвейери\n"
+" -q макÑималниÑÑ‚ брой байтове в опашките за ÑÑŠÐ¾Ð±Ñ‰ÐµÐ½Ð¸Ñ Ð¿Ð¾ POSIX\n"
+" -s макÑималниÑÑ‚ размер на Ñтека\n"
+" -t макÑималното процеÑорно време в Ñекунди\n"
+" -u макÑималниÑÑ‚ брой потребителÑки процеÑи\n"
+" -v размерът на виртуалната памет\n"
+" -x макÑималниÑÑ‚ брой Ð·Ð°ÐºÐ»ÑŽÑ‡Ð²Ð°Ð½Ð¸Ñ Ð½Ð° файлове\n"
+" \n"
+" Ðко е зададено ОГРÐÐИЧЕÐИЕ, то това е новата ÑтойноÑÑ‚ на ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ "
+"реÑурÑ.\n"
+" Специалните ÑтойноÑти „soft“, „hard“ и „unlimited“ означават текущите "
+"меко,\n"
+" твърдо и никакво ограничение Ñъответно. Ð’ противен Ñлучай Ñе извежда\n"
+" текущата ÑтойноÑÑ‚ на ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ñ€ÐµÑурÑ. СтойноÑтите Ñа в блокове от по "
+"1024\n"
+" байта, Ñ Ð¸Ð·ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ðµ на:\n"
+" - опциÑта „-p“, при коÑто блоковете Ñа от по 512 байта;\n"
+" - опциÑта „-t“, при коÑто ÑтойноÑтта е в Ñекунди;\n"
+" - опциÑта „-u“, при коÑто ÑтойноÑтта е точниÑÑ‚ брой процеÑи."
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+#, fuzzy
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+" Изчакване на ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¿Ñ€Ð¾Ñ†ÐµÑ Ð¸ докладване за Ð¸Ð·Ñ…Ð¾Ð´Ð½Ð¸Ñ ÐºÐ¾Ð´. Ðко не е "
+"зададен N,\n"
+" вÑички текущо активни дъщерни процеÑи Ñе изчакват и изходниÑÑ‚ код е 0. "
+"N\n"
+" може да е идентификатор на Ð¿Ñ€Ð¾Ñ†ÐµÑ Ð¸Ð»Ð¸ задача. Ðко е задача, изчакват "
+"Ñе\n"
+" вÑички процеÑи в Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð½Ð¸Ñ ÐºÐ°Ð½Ð°Ð» на задачата."
+
+#: builtins.c:1481
+#, fuzzy
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+" Цикълът „for“ изпълнÑва поÑледователноÑÑ‚ от команди за вÑеки член в ÑпиÑък "
+"от\n"
+" елементи. Ðко блокът „в ДУМИ …“ не приÑÑŠÑтва, използва Ñе „in \"$@\"“. "
+"За\n"
+" вÑеки елемент в ДУМИте, ИМЕто Ñе задава да е елементът и Ñе изпълнÑват\n"
+" КОМÐÐДИте."
+
+#: builtins.c:1495
+#, fuzzy
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+" Еквивалентно на:\n"
+" (( ИЗРÐЗ_1 ))\n"
+" while (( ИЗРÐЗ_2 )); do\n"
+" КОМÐÐДИ\n"
+" (( EXP_3 ))\n"
+" done\n"
+" ИЗРÐЗ_1, ИЗРÐЗ_2, и ИЗРÐЗ_3 Ñа аритметични изрази. Ð’Ñеки изпуÑнат израз "
+"Ñе\n"
+" изчиÑлÑва да е 1."
+
+#: builtins.c:1513
+#, fuzzy
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+" ДУМИте биват замеÑтвани, което води до Ñъздаването на ÑпиÑък Ñ Ð´ÑƒÐ¼Ð¸.\n"
+" Ðаборът от замеÑтените думи бива отпечатан на изхода за Ñтандартната\n"
+" грешка, като вÑÑка от Ñ‚ÑÑ… Ñе предшеÑтва от номер. Ðко клаузата „in "
+"ДУМИ“\n"
+" липÑва, използва Ñе „in \"$@\"“. Ð’ такива Ñлуча Ñе отпечатва "
+"подÑказката PS3\n"
+" и от ÑÑ‚Ð°Ð½Ð´Ð°Ñ€Ñ‚Ð½Ð¸Ñ Ð²Ñ…Ð¾Ð´ Ñе прочита ред. Ðко редът Ñе ÑÑŠÑтои от номера, "
+"който\n"
+" ÑъответÑтва на нÑÐºÐ¾Ñ Ð¾Ñ‚ показаните думи, ИМЕто Ñе задава да е тази "
+"дума.\n"
+" Ðко редът е празен, отново Ñе отпечатват ДУМИте и подÑказката. Ðко Ñе\n"
+" прочете „EOF“, командата завършва. Ð’ÑÑка друга ÑтойноÑÑ‚ приÑвоÑва "
+"„null“ на\n"
+" ИМЕ. ПрочетениÑÑ‚ ред „null“ Ñе запазва в променливата REPLY. КОМÐÐДИте "
+"Ñе\n"
+" изпълнÑват Ñлед вÑеки избор до изпълнÑването на команда за прекъÑване\n"
+" (break)."
+
+#: builtins.c:1534
+#, fuzzy
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+" Изпълнение на ПРОГРÐÐœÐиÑ_КÐÐÐЛ и отпечатване на обобщение за реалното,\n"
+" потребителÑкото и ÑиÑтемно процеÑорни времена, които изпълнението на\n"
+" ПРОГРÐÐœÐиÑ_КÐÐÐЛ отнема. ИзходниÑÑ‚ код е този на ПРОГРÐÐœÐиÑ_КÐÐÐЛ. "
+"ОпциÑта\n"
+" „-p“ води до извеждане на ÑтатиÑтиката за времето в различен формат - "
+"Ñпоред\n"
+" ÑтойноÑтта на променливата на Ñредата $TIMEFORMAT."
+
+#: builtins.c:1551
+#, fuzzy
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+" Избирателно Ñе изпълнÑват КОМÐÐДИ на база ДУМÐ, коÑто напаÑва на ШÐБЛОÐ.\n"
+" Шаблоните Ñе разделÑÑ‚ ÑÑŠÑ Ð·Ð½Ð°ÐºÐ° „|“."
+
+#: builtins.c:1563
+#, fuzzy
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+" Първо Ñе изпълнÑват командите в блока „if КОМÐÐДИ“. Ðко изходниÑÑ‚ код е 0, "
+"то\n"
+" Ñе изпълнÑва блокът „then КОМÐÐДИ“. Ð’ противен Ñлучай поÑледователно "
+"Ñе\n"
+" изпълнÑва вÑеки блок „elif КОМÐÐДИ“ - ако изходниÑÑ‚ код е 0, то Ñе "
+"изпълнÑва\n"
+" ÑÑŠÐ¾Ñ‚Ð²ÐµÑ‚Ð½Ð¸Ñ Ð±Ð»Ð¾Ðº „then КОМÐÐДИ“, Ñлед което завършва изпълнението на "
+"целиÑ\n"
+" блок „if“. Ðко изходниÑÑ‚ код на никой от блоковете „if“ и „elif“ не е "
+"бил 0,\n"
+" изпълнÑва Ñе блока „else КОМÐÐДИ“, Ñтига такъв да приÑÑŠÑтва. ИзходниÑÑ‚ "
+"код\n"
+" от цÑлата конÑÑ‚Ñ€ÑƒÐºÑ†Ð¸Ñ Ðµ този на поÑледната изпълнена команда или е 0, "
+"ако\n"
+" никое теÑтово уÑловие, не Ñе е оценило като иÑтина."
+
+#: builtins.c:1580
+#, fuzzy
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+" ЗамеÑтване и изпълнение на КОМÐÐДИте докато поÑледната команда в блока "
+"„while“\n"
+" е Ñ Ð¸Ð·Ñ…Ð¾Ð´ÐµÐ½ код, който е 0."
+
+#: builtins.c:1592
+#, fuzzy
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+" ЗамеÑтване и изпълнение на КОМÐÐДИте докато поÑледната команда в блока "
+"„until“\n"
+" е Ñ Ð¸Ð·Ñ…Ð¾Ð´ÐµÐ½ код, който не е 0."
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+
+#: builtins.c:1632
+#, fuzzy
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+" ИзпълнÑване на цÑл набор от команди в група. Това е един от начините да "
+"Ñе\n"
+" цÑл набор от команди."
+
+#: builtins.c:1644
+#, fuzzy
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+" Еквивалентно на аргумента ЗÐДÐЧРна командата „fg“. ВъзобновÑва ÑпрÑна\n"
+" задача или такава на заден фон. ЗÐДÐЧÐта може да указва или име, или\n"
+" номер на задача. Ðко Ñлед ЗÐДÐЧÐта Ñе въведе знакът „&“, задачата\n"
+" Ñе изпълнÑва във фонов режим, вÑе едно е била подадена като аргумент\n"
+" на командата „bg“."
+
+#: builtins.c:1659
+#, fuzzy
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+" ИЗРÐЗът Ñе изчиÑлÑва Ñпоред правилата на аритметичното оценÑване.\n"
+" Еквивалентно на „let ИЗРÐЗ“."
+
+#: builtins.c:1671
+#, fuzzy
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+" Връща ÑÑŠÑтоÑние 0 или 1 в завиÑимоÑÑ‚ от оценката на уÑÐ»Ð¾Ð²Ð½Ð¸Ñ Ð˜Ð—Ð ÐЗ. "
+"Изразите\n"
+" Ñа ÑÑŠÑтавени от Ñъщите примитиви, както вградената команда „test“ и "
+"могат да\n"
+" Ñе Ñъчетават чрез Ñледните оператори:\n"
+" \n"
+" ( ИЗРÐЗ ) Връща ÑтойноÑтта на ИЗРÐЗа\n"
+" ! ИЗРÐЗ ИÑтина, ако ИЗРÐЗ Ñе Ð¾Ñ†ÐµÐ½Ñ Ð½Ð° лъжа, в оÑтаналите "
+"Ñлучаи\n"
+" е лъжа\n"
+" ИЗРÐЗ1 && ИЗРÐЗ2 ИÑтина, ако едновременно ИЗРÐЗ1 и ИЗРÐЗ2 Ñа "
+"иÑтина,\n"
+" в оÑтаналите Ñлучаи е лъжа.\n"
+" ИЗРÐЗ1 || ИЗРÐЗ2 ИÑтина, ако поне единиÑÑ‚ от ИЗРÐЗ1 и ИЗРÐЗ2 е "
+"иÑтина,\n"
+" в оÑтаналите Ñлучаи е лъжа.\n"
+" \n"
+" Когато Ñе използват операторите „==“ и „!=“, низът от дÑÑната Ñтрана на\n"
+" оператора Ñе използва като шаблон и Ñе извършва напаÑване. Операторите\n"
+" „&&“ и „||“ не оценÑÑ‚ ИЗРÐЗ2, ако ИЗРÐЗ1 е доÑтатъчен за определÑне на\n"
+" ÑтойноÑтта на израза."
+
+#: builtins.c:1697
+#, fuzzy
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+" BASHVERSION Ð˜Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° верÑиÑта на bash.\n"
+" CDPATH СпиÑък Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ð¸ разделени Ñ Ð´Ð²Ð¾ÐµÑ‚Ð¾Ñ‡Ð¸Ðµ, които да Ñе\n"
+" Ñ‚ÑŠÑ€ÑÑÑ‚ като аргументи за командата „cd“.\n"
+" GLOBIGNORE СпиÑък Ñ ÑˆÐ°Ð±Ð»Ð¾Ð½Ð¸ на файлови имена, разделени Ñ "
+"двоеточие,\n"
+" които да Ñе игнорират от замеÑтването на пътÑ.\n"
+" HISTFILE Името на файла, в който Ñе ÑъхранÑва иÑториÑта на "
+"командите.\n"
+" HISTFILESIZE МакÑималниÑÑ‚ брой редове, които горниÑÑ‚ файл може да\n"
+" Ñъдържа.\n"
+" HISTSIZE МакÑималниÑÑ‚ брой редове, които една работеща обвивка "
+"може да\n"
+" доÑтъпи.\n"
+" HOME ПълниÑÑ‚ път до домашната ви директориÑ.\n"
+" HOSTNAME Името на текущата машина.\n"
+" HOSTTYPE Видът на процеÑора, под който работи текущата обвивка.\n"
+" IGNOREEOF УправлÑва дейÑтвието на обвивката при Ñрещането на "
+"единичен\n"
+" знак за край на файл „EOF“. Ðко променливата е "
+"зададена,\n"
+" Ñ‚Ñ ÑƒÐºÐ°Ð·Ð²Ð° Ð±Ñ€Ð¾Ñ Ð½Ð° знаците „EOF“, който могат да Ñе\n"
+" Ñрещнат ÑамоÑтоÑтелно на един ред, преди обвивката "
+"да\n"
+" завърши работа и излезе (Ñтандартно е 10). Когато\n"
+" променливата не е зададена, един „EOF“ означава край "
+"на\n"
+" входÑщите данни.\n"
+" MACHTYPE Ðиз, който опиÑва текущата ÑиÑтема, на коÑто работи "
+"bash.\n"
+" MAILCHECK Колко чеÑто, в Ñекунди, да проверÑва bash за нови "
+"пиÑма.\n"
+" MAILPATH СпиÑък Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ðµ, които bash проверÑва за нови пиÑма.\n"
+" OSTYPE ВерÑиÑта на ЮникÑ, на коÑто работи bash.\n"
+" PATH СпиÑък Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ð¸, които да Ñе претърÑват за команди.\n"
+" PROMPTCOMMAND Команда, коÑто да Ñе изпълнÑва преди отпечатването на\n"
+" оÑновната подÑказка на ÐºÐ¾Ð¼Ð°Ð½Ð´Ð½Ð¸Ñ Ñ€ÐµÐ´.\n"
+" PS1 Ðиз за оÑновната подÑказка.\n"
+" PS2 Ðиз за втората подÑказка.\n"
+" PWD ПълниÑÑ‚ път и име на текущата директориÑ.\n"
+" SHELLOPTS СпиÑък Ñ Ð²ÐºÐ»ÑŽÑ‡ÐµÐ½Ð¸Ñ‚Ðµ опции на обвивката, разделени Ñ\n"
+" двоеточие.\n"
+" TERM Името на Ñ‚ÐµÐºÑƒÑ‰Ð¸Ñ Ð²Ð¸Ð´ терминал.\n"
+" TIMEFORMAT ИзходниÑÑ‚ формат за ÑтатиÑтиката за времето за "
+"изпълнение\n"
+" на команда, който Ñе използва от запазената дума "
+"„time“.\n"
+" autoresume СтойноÑÑ‚, коÑто не е „null“, означава, че командна дума, "
+"коÑто\n"
+" Ñе поÑвÑва ÑамоÑтоÑтелно на ред, първо Ñе проверÑва "
+"в\n"
+" ÑпиÑъка Ñ Ñ‚ÐµÐºÑƒÑ‰Ð¾ Ñпрените задачи. Ðко бъде открита "
+"там,\n"
+" задачата Ñе пуÑка и Ñе Ñлага на преден план. "
+"СтойноÑÑ‚\n"
+" „exact“ (Ñтрого Ñъвпадение) означава, че командната\n"
+" дума, Ñ‚Ñ€Ñбва точно да Ñъвпада Ñ Ð¸Ð¼ÐµÑ‚Ð¾ на команда в\n"
+" ÑпиÑъка ÑÑŠÑ Ñпрени задачи. СтойноÑÑ‚ „substring“\n"
+" (Ñъвпадение на подниз) означава, че командната дума\n"
+" Ñ‚Ñ€Ñбва да е подниз на задачата. Ð’ÑÑка друга "
+"ÑтойноÑÑ‚\n"
+" означава, че командата думата Ñ‚Ñ€Ñбва да е началото "
+"на\n"
+" ÑпрÑна задача.\n"
+" histchars Знаци, които определÑÑ‚ бързото замеÑтване и това по "
+"иÑториÑ.\n"
+" ПървиÑÑ‚ знак е за замеÑтването по иÑториÑ, "
+"обикновено е\n"
+" „!“. ВториÑÑ‚ е за бързото замеÑтване, обикновено е "
+"„^“.\n"
+" ТретиÑÑ‚ е за коментарите в иÑториÑта, обикновено е "
+"„#“.\n"
+" HISTIGNORE СпиÑък Ñ ÑˆÐ°Ð±Ð»Ð¾Ð½Ð¸, разделени Ñ Ð´Ð²Ð¾ÐµÑ‚Ð¾Ñ‡Ð¸Ðµ, които указват "
+"кои\n"
+" команди да не Ñе запазват в иÑториÑта.\n"
+
+#: builtins.c:1754
+#, fuzzy
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+" Ð”Ð¾Ð±Ð°Ð²Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð² Ñтека на директориите или превърта Ñтека\n"
+" като най-горна Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ñтава текущата директориÑ. Без\n"
+" аргументи ÑÐ¼ÐµÐ½Ñ Ð½Ð°Ð¹-горните две директории.\n"
+" \n"
+" +N Превърта Ñтека, така че N-тата Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ (като Ñе брои\n"
+" от лÑвата Ñтрана на ÑпиÑъка, показан от командата „dirs“\n"
+" като Ñе почва от 0) да е най-отгоре.\n"
+" \n"
+" -N Превърта Ñтека, така че N-тата Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ (като Ñе брои\n"
+" от дÑÑната Ñтрана на ÑпиÑъка, показан от командата „dirs“\n"
+" като Ñе почва от 0) да е най-отгоре.\n"
+" \n"
+" -n подтиÑкане на нормалното преминаване към Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð¿Ñ€Ð¸\n"
+" добавÑнето на директории към Ñтека, така че Ñе Ð¿Ñ€Ð¾Ð¼ÐµÐ½Ñ Ñамо той.\n"
+"\n"
+" dir Ð´Ð¾Ð±Ð°Ð²Ñ Ð”Ð˜Ð  най-отгоре в Ñтека на директориите, като Ñ Ð¿Ñ€Ð°Ð²Ð¸\n"
+" новата текуща работна директориÑ.\n"
+" \n"
+" Можете да изведете Ñтека на директориÑта Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð°Ñ‚Ð° „dirs“."
+
+#: builtins.c:1788
+#, fuzzy
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+" Маха директории от Ñтека Ñ Ñ‚ÑÑ…. Без аргументи\n"
+" премахва поÑледната Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð² Ñтека и влиза в новата\n"
+" поÑледна директориÑ.\n"
+" \n"
+" +N премахва N-Ñ‚Ð¸Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚ като Ñе брои отлÑво в ÑпиÑъка\n"
+" показван от командата „dirs“, като Ñе брои от 0. Ðапр.: „popd +0“\n"
+" премахва първата директориÑ, „popd +1“ - втората.\n"
+"\n"
+" -N премахва N-Ñ‚Ð¸Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚ като Ñе брои отдÑÑно в ÑпиÑъка\n"
+" показван от командата „dirs“, като Ñе брои от 0. Ðапр.: „popd -0“\n"
+" премахва поÑледната директориÑ, „popd -1“ - предпоÑледната.\n"
+"\n"
+" -n подтиÑкане на нормалното преминаване към Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð¿Ñ€Ð¸ добавÑнето "
+"на\n"
+" директории към Ñтека, така че Ñе Ð¿Ñ€Ð¾Ð¼ÐµÐ½Ñ Ñамо той.\n"
+"\n"
+" Стекът Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ð¸Ñ‚Ðµ Ñе визуализира Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð°Ñ‚Ð° „dirs“."
+
+#: builtins.c:1818
+#, fuzzy
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+" Показва ÑпиÑъка Ñ Ñ‚ÐµÐºÑƒÑ‰Ð¾ запомнените директории. СпиÑъкът Ñе попълва чрез\n"
+" командата „pushd“. Можете да вадите директории от ÑпиÑъка Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð°Ñ‚Ð°\n"
+" „popd“.\n"
+" \n"
+" ОпциÑта „-l“ кара командата „dirs“ да извежда пълните имена на "
+"директориите,\n"
+" а не Ñъкратените ÑпрÑмо домашната Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð¸Ð¼ÐµÐ½Ð°. Това означава, че\n"
+" „~/bin“ може да Ñе покаже като „/homes/pesho/bin“. ОпциÑта „-v“ води "
+"до\n"
+" отпечатване на Ñтека на директориите, като вÑеки елемент Ñе извежда на "
+"нов\n"
+" ред и Ñе предхожда от номера Ñи в Ñтека. ОпциÑта „-p“ Ñъщо води до "
+"поредово\n"
+" отпечатване, но без Ð¿Ð¾Ñ€ÐµÐ´Ð½Ð¸Ñ Ð½Ð¾Ð¼ÐµÑ€ в Ñтека. ОпциÑта „-c“ изчиÑтва Ñтека "
+"на\n"
+" директориите като изтрива вÑички елементи.\n"
+" \n"
+" +N показва N-Ñ‚Ð¸Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚ отлÑво в ÑпиÑъка показван от\n"
+" командата „dirs“, когато е Ñтартирана без опции. Брои Ñе от 0.\n"
+" \n"
+" -N показва N-Ñ‚Ð¸Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚ отдÑÑно в ÑпиÑъка показван от\n"
+" командата „dirs“, когато е Ñтартирана без опции. Брои Ñе от 0."
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+#, fuzzy
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+" printf форматира и отпечатва ÐРГУМЕÐТИте Ñпоред управлението на ФОРМÐТа.\n"
+" ФОРМÐТът е поÑледователноÑÑ‚ от знаци, коÑто Ñъдържа три вида обекти:\n"
+" обикновени знаци, които биват отпечатани директно на ÑÑ‚Ð°Ð½Ð´Ð°Ñ€Ñ‚Ð½Ð¸Ñ Ð¸Ð·Ñ…Ð¾Ð´;\n"
+" екраниращи знакови поÑледователноÑти, които биват преобразувани и "
+"отпечатани\n"
+" на ÑÑ‚Ð°Ð½Ð´Ð°Ñ€Ñ‚Ð½Ð¸Ñ Ð¸Ð·Ñ…Ð¾Ð´; и форматиращи знакови поÑледователноÑти, вÑÑка от\n"
+" които предизвиква отпечатването на Ñледващ аргумент. ОÑвен "
+"Ñтандартните\n"
+" Ñ„Ð¾Ñ€Ð¼Ð°Ñ‚Ð¸Ñ€Ð°Ð½Ð¸Ñ Ð¾Ð¿Ð¸Ñани в ръководÑтвото на printf, „%b“ предизвиква "
+"замеÑтването\n"
+" на екранираниÑта Ñ Ð¾Ð±Ñ€Ð°Ñ‚Ð½Ð¾ наклонени черти в ÑÑŠÐ¾Ñ‚Ð²ÐµÑ‚Ð½Ð¸Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚, а „%"
+"q“\n"
+" предизвиква цитирането на аргумента, така че да може да бъде използван "
+"като\n"
+" вход за обвивката. Ðко е включена опциÑта „-v“, изходът Ñе поÑÑ‚Ð°Ð²Ñ Ð²\n"
+" променливата на обвивката VAR, вмеÑто да Ñе извежда на ÑÑ‚Ð°Ð½Ð´Ð°Ñ€Ñ‚Ð½Ð¸Ñ Ð¸Ð·Ñ…Ð¾Ð´."
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+#, fuzzy
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+" Показване на възможните допиÑÐ²Ð°Ð½Ð¸Ñ Ð½Ð° базата на възможноÑтите. Целта е да "
+"Ñе\n"
+" ползва в рамките Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° обвивката, коÑто генерира възможните "
+"допиÑваниÑ.\n"
+" Ðко е зададен незадължителниÑÑ‚ аргумент ДУМÐ, генерират Ñе напаÑваниÑта "
+"Ñ\n"
+" него."
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "презаделÑне на памет: %lu байта не могат да Ñе заделÑÑ‚ наново (заделени "
+#~ "Ñа\n"
+#~ "%lu байта)"
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "презаделÑне на памет: %lu байта не могат да Ñе заделÑÑ‚"
+
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "презаделÑне на памет: %s:%d: %lu байта не могат да Ñе заделÑÑ‚ (заделени "
+#~ "Ñа %lu байта)"
+
+#~ msgid " "
+#~ msgstr " "
+
+#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR,"
+#~ msgstr "Без ИЗРÐЗ връща „$ред $име_на_файл“. С ИЗРÐЗ връща"
+
+#~ msgid "returns \"$line $subroutine $filename\"; this extra information"
+#~ msgstr "„$ред $Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ $име_на_файл“. Тази допълнителна информациÑ"
+
+#~ msgid "can be used used to provide a stack trace."
+#~ msgstr "може да Ñе използва да получаването на Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° Ñтека."
+
+#~ msgid ""
+#~ "The value of EXPR indicates how many call frames to go back before the"
+#~ msgstr "СтойноÑтта на ИЗРÐЗа показва колко Ð¸Ð·Ð²Ð¸ÐºÐ²Ð°Ð½Ð¸Ñ Ð¿Ñ€ÐµÐ´Ð¸ текущото"
+
+#~ msgid "current one; the top frame is frame 0."
+#~ msgstr "Ñ‚Ñ€Ñбва да Ñе върнат. ПоÑледното извикване е 0."
+
+#~ msgid "%s: invalid number"
+#~ msgstr "%s: грешно чиÑло"
+
+#~ msgid "Shell commands matching keywords `"
+#~ msgstr "Команди на обвивката, които напаÑват на ключовите думи „"
+
+#~ msgid "Display the list of currently remembered directories. Directories"
+#~ msgstr ""
+#~ "Показване на ÑпиÑъка Ñ Ñ‚ÐµÐºÑƒÑ‰Ð¾ запомнените директории. Те биват запомнени "
+#~ "чрез"
+
+#~ msgid "find their way onto the list with the `pushd' command; you can get"
+#~ msgstr ""
+#~ "командата „pushd“. Можете да преминете в обратен ред в ÑпиÑъка чрез "
+#~ "командата"
+
+#~ msgid "back up through the list with the `popd' command."
+#~ msgstr "„popd“."
+
+#~ msgid ""
+#~ "The -l flag specifies that `dirs' should not print shorthand versions"
+#~ msgstr ""
+#~ "ОпциÑта „-l“ указва, че командата „dirs“ не Ñ‚Ñ€Ñбва да извежда кратката "
+#~ "верÑÐ¸Ñ Ð½Ð°"
+
+#~ msgid ""
+#~ "of directories which are relative to your home directory. This means"
+#~ msgstr ""
+#~ "на директориите, които Ñа отноÑителни ÑпрÑмо домашната ви директориÑ. "
+#~ "Това"
+
+#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag"
+#~ msgstr ""
+#~ "означава, че вмеÑто „~/bin“ ще бъде изведено нещо подобно на „/homes/geek/"
+#~ "bin“."
+
+#~ msgid "causes `dirs' to print the directory stack with one entry per line,"
+#~ msgstr ""
+#~ "ОпциÑта „-v“ кара „dirs“ да извежда Ñтека Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ð¸Ñ‚Ðµ по една на ред, "
+#~ "като"
+
+#~ msgid ""
+#~ "prepending the directory name with its position in the stack. The -p"
+#~ msgstr ""
+#~ "пред вÑÑка Ñе отпечатва мÑÑтото Ñ Ð² Ñтека. ОпциÑта „-p“ прави Ñъщото, "
+#~ "без да"
+
+#~ msgid "flag does the same thing, but the stack position is not prepended."
+#~ msgstr ""
+#~ "включва мÑÑтото на директориÑта в Ñтека. ОпциÑта „-c“ изчиÑтва Ñтека Ñ"
+
+#~ msgid ""
+#~ "The -c flag clears the directory stack by deleting all of the elements."
+#~ msgstr "директориите като изтрива вÑичките му елементи."
+
+#~ msgid ""
+#~ "+N displays the Nth entry counting from the left of the list shown by"
+#~ msgstr "+N показва N-Ñ‚Ð¸Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚ отлÑво в ÑпиÑъка показван от"
+
+#~ msgid " dirs when invoked without options, starting with zero."
+#~ msgstr ""
+#~ " командата „dirs“, когато е Ñтартирана без опции. Брои Ñе от 0."
+
+#~ msgid ""
+#~ "-N displays the Nth entry counting from the right of the list shown by"
+#~ msgstr "-N показва N-Ñ‚Ð¸Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚ отдÑÑно в ÑпиÑъка показван от"
+
+#~ msgid "Adds a directory to the top of the directory stack, or rotates"
+#~ msgstr "Ð”Ð¾Ð±Ð°Ð²Ñ Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð² Ñтека на директориите или превърта Ñтека,"
+
+#~ msgid "the stack, making the new top of the stack the current working"
+#~ msgstr "като най-горна Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ñтава текущата директориÑ. Без"
+
+#~ msgid "directory. With no arguments, exchanges the top two directories."
+#~ msgstr "аргументи ÑÐ¼ÐµÐ½Ñ Ð½Ð°Ð¹-горните две директории."
+
+#~ msgid "+N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "+N Превърта Ñтека, така че N-тата Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ (като Ñе брои"
+
+#~ msgid " from the left of the list shown by `dirs', starting with"
+#~ msgstr " от лÑвата Ñтрана на ÑпиÑъка, показан от командата „dirs“"
+
+#~ msgid " zero) is at the top."
+#~ msgstr " като Ñе почва от 0) да е най-отгоре."
+
+#~ msgid "-N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "-N Превърта Ñтека, така че N-тата Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ (като Ñе брои"
+
+#~ msgid " from the right of the list shown by `dirs', starting with"
+#~ msgstr " от дÑÑната Ñтрана на ÑпиÑъка, показан от командата „dirs“"
+
+#~ msgid "-n suppress the normal change of directory when adding directories"
+#~ msgstr "-n подтиÑкане на нормалното преминаване към Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð¿Ñ€Ð¸"
+
+#~ msgid " to the stack, so only the stack is manipulated."
+#~ msgstr ""
+#~ " добавÑнето на директории към Ñтека, така че Ñе Ð¿Ñ€Ð¾Ð¼ÐµÐ½Ñ Ñамо той."
+
+#~ msgid "dir adds DIR to the directory stack at the top, making it the"
+#~ msgstr "dir Ð´Ð¾Ð±Ð°Ð²Ñ Ð”Ð˜Ð  най-отгоре в Ñтека на директориите, като Ñ Ð¿Ñ€Ð°Ð²Ð¸"
+
+#~ msgid " new current working directory."
+#~ msgstr " новата текуща работна директориÑ."
+
+#~ msgid "You can see the directory stack with the `dirs' command."
+#~ msgstr "Можете да изведете Ñтека на директориÑта Ñ ÐºÐ¾Ð¼Ð°Ð½Ð´Ð°Ñ‚Ð° „dirs“."
+
+#~ msgid "Removes entries from the directory stack. With no arguments,"
+#~ msgstr "Маха директории от Ñтека Ñ Ñ‚ÑÑ…. Без аргументи"
+
+#~ msgid "removes the top directory from the stack, and cd's to the new"
+#~ msgstr "премахва поÑледната Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð² Ñтека и влиза в новата"
+
+#~ msgid "top directory."
+#~ msgstr "поÑледна директориÑ."
+
+#~ msgid "+N removes the Nth entry counting from the left of the list"
+#~ msgstr "+N премахва N-Ñ‚Ð¸Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚ като Ñе брои отлÑво в ÑпиÑъка"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'"
+#~ msgstr ""
+#~ " показван от командата „dirs“, като Ñе брои от 0. Ðапр.: „popd +0“"
+
+#~ msgid " removes the first directory, `popd +1' the second."
+#~ msgstr " премахва първата директориÑ, „popd +1“ - втората."
+
+#~ msgid "-N removes the Nth entry counting from the right of the list"
+#~ msgstr "-N премахва N-Ñ‚Ð¸Ñ ÐµÐ»ÐµÐ¼ÐµÐ½Ñ‚ като Ñе брои отдÑÑно в ÑпиÑъка"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'"
+#~ msgstr ""
+#~ " показван от командата „dirs“, като Ñе брои от 0. Ðапр.: „popd -0“"
+
+#~ msgid " removes the last directory, `popd -1' the next to last."
+#~ msgstr " премахва поÑледната директориÑ, „popd -1“ - предпоÑледната."
+
+#~ msgid ""
+#~ "-n suppress the normal change of directory when removing directories"
+#~ msgstr ""
+#~ "-n подтиÑкане на нормалното преминаване към Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ Ð¿Ñ€Ð¸ "
+#~ "премахването на"
+
+#~ msgid " from the stack, so only the stack is manipulated."
+#~ msgstr " директории от Ñтека, така че Ñе Ð¿Ñ€Ð¾Ð¼ÐµÐ½Ñ Ñамо той."
+
+#~ msgid "allocated"
+#~ msgstr "заделени"
+
+#~ msgid "freed"
+#~ msgstr "оÑвободени"
+
+#~ msgid "requesting resize"
+#~ msgstr "изиÑква Ñе преоразмераване"
+
+#~ msgid "just resized"
+#~ msgstr "току що преораземерени"
+
+#~ msgid "bug: unknown operation"
+#~ msgstr "грешка: непозната операциÑ"
+
+#~ msgid "malloc: watch alert: %p %s "
+#~ msgstr "заделÑне на памет: предупреждение при наблюдение: %p %s "
+
+#~ msgid ""
+#~ " Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n"
+#~ " break N levels."
+#~ msgstr ""
+#~ " Изход от цикъл ползващ FOR, WHILE или UNTIL. Ðко е указан N, Ñе излиза "
+#~ "от N\n"
+#~ " обхващащи цикъла."
+
+#~ msgid ""
+#~ " Run a shell builtin. This is useful when you wish to rename a\n"
+#~ " shell builtin to be a function, but need the functionality of the\n"
+#~ " builtin within the function itself."
+#~ msgstr ""
+#~ " Изпълнение на команда вградена в обвивката. Това е полезно, когато "
+#~ "иÑкате да\n"
+#~ " използвате името на команда вградена в обвивката за име на функциÑ, "
+#~ "но във\n"
+#~ " функциÑта Ñе нуждаете от командата."
+
+#~ msgid ""
+#~ " Print the current working directory. With the -P option, pwd prints\n"
+#~ " the physical directory, without any symbolic links; the -L option\n"
+#~ " makes pwd follow symbolic links."
+#~ msgstr ""
+#~ " Отпечатва текущата работна директориÑ. С опциÑта „-P“ командата „pwd“ "
+#~ "извежда\n"
+#~ " физичеÑката Ð´Ð¸Ñ€ÐµÐºÑ‚Ð¾Ñ€Ð¸Ñ - без Ñимволни връзки. ОпциÑта „-L“ кара "
+#~ "командата\n"
+#~ " „pwd“ да Ñледва физичеÑките връзки."
+
+#~ msgid " Return a successful result."
+#~ msgstr " Връща уÑпешен резултат."
+
+#~ msgid " Return an unsuccessful result."
+#~ msgstr " Връща неуÑпешен резултат."
+
+#~ msgid ""
+#~ " Runs COMMAND with ARGS ignoring shell functions. If you have a shell\n"
+#~ " function called `ls', and you wish to call the command `ls', you can\n"
+#~ " say \"command ls\". If the -p option is given, a default value is "
+#~ "used\n"
+#~ " for PATH that is guaranteed to find all of the standard utilities. "
+#~ "If\n"
+#~ " the -V or -v option is given, a string is printed describing "
+#~ "COMMAND.\n"
+#~ " The -V option produces a more verbose description."
+#~ msgstr ""
+#~ " Изпълнение на КОМÐÐÐ”Ð Ñ ÐРГументи като Ñе пренебрегват функциите в "
+#~ "обвивката.\n"
+#~ " Ðко ÑъщеÑтвува Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð½Ð° обвивката наречена „ls“, можете да "
+#~ "извикате\n"
+#~ " командата чрез „command ls“. Ðко е зададена опциÑта „-p“ Ñе "
+#~ "използва\n"
+#~ " Ñтандартна ÑтойноÑÑ‚ на променливата $PATH, коÑто гарантирано открива "
+#~ "вÑички\n"
+#~ " Ñтандартни програми. Ðко е зададена нÑÐºÐ¾Ñ Ð¾Ñ‚ опциите „-V“ или „-v“, "
+#~ "Ñе\n"
+#~ "\t отпечатва опиÑание на КОМÐÐДÐта. ОпциÑта „-V“ води до по-подробен "
+#~ "изход."
+
+#~ msgid " Obsolete. See `declare'."
+#~ msgstr " ОÑтарÑло, да не Ñе използва. Виж „declare“."
+
+#~ msgid ""
+#~ " Create a local variable called NAME, and give it VALUE. LOCAL\n"
+#~ " can only be used within a function; it makes the variable NAME\n"
+#~ " have a visible scope restricted to that function and its children."
+#~ msgstr ""
+#~ " Създаване на локална променлива Ñ Ð˜ÐœÐ• и приÑвоÑване на СТОЙÐОСТ. "
+#~ "ЛОКÐЛÐÐта може\n"
+#~ " да Ñе използва Ñамо във функциÑ. Ð¢Ñ ÐºÐ°Ñ€Ð° променливата на ИМЕ да е Ñ "
+#~ "облаÑÑ‚\n"
+#~ " на видимоÑÑ‚, коÑто е ограничена до тази Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ð¸ наÑледниците Ñ."
+
+#~ msgid ""
+#~ " Output the ARGs. If -n is specified, the trailing newline is suppressed."
+#~ msgstr ""
+#~ " ÐРГУМЕÐТите Ñе извеждат. Ðко е дадена опциÑта „-n“, Ñе подтиÑка "
+#~ "извеждането\n"
+#~ "на нов ред."
+
+#~ msgid ""
+#~ " Enable and disable builtin shell commands. This allows\n"
+#~ " you to use a disk command which has the same name as a shell\n"
+#~ " builtin without specifying a full pathname. If -n is used, the\n"
+#~ " NAMEs become disabled; otherwise NAMEs are enabled. For example,\n"
+#~ " to use the `test' found in $PATH instead of the shell builtin\n"
+#~ " version, type `enable -n test'. On systems supporting dynamic\n"
+#~ " loading, the -f option may be used to load new builtins from the\n"
+#~ " shared object FILENAME. The -d option will delete a builtin\n"
+#~ " previously loaded with -f. If no non-option names are given, or\n"
+#~ " the -p option is supplied, a list of builtins is printed. The\n"
+#~ " -a option means to print every builtin with an indication of whether\n"
+#~ " or not it is enabled. The -s option restricts the output to the "
+#~ "POSIX.2\n"
+#~ " `special' builtins. The -n option displays a list of all disabled "
+#~ "builtins."
+#~ msgstr ""
+#~ " Включване или изключване на вградените в обвивката команди. Това ви "
+#~ "позволÑва\n"
+#~ " да използвате външна команда, коÑто има Ñъщото име като вградена в "
+#~ "обвивката\n"
+#~ " команда, без да указвате име Ñъдържащо път. Ðко използвате опциÑта „-"
+#~ "n“\n"
+#~ " ИМЕната Ñе изключват, в противен Ñлучай Ñе включват. Ðапример, за "
+#~ "да\n"
+#~ " използвате командата „test“, коÑто Ñе намира в пътищата указани Ñ "
+#~ "$PATH, а\n"
+#~ " не верÑиÑта вградена в обвивката, използвайте „enable -n test“. При\n"
+#~ " ÑиÑтемите, които разполагат Ñ Ð´Ð¸Ð½Ð°Ð¼Ð¸Ñ‡Ð½Ð¾ зареждане, опциÑта „-f“ може "
+#~ "да Ñе\n"
+#~ " използва за зареждането на нова команда вградена в обвивката от "
+#~ "Ñподелен\n"
+#~ " обект ÑÑŠÑ Ñъответното ИМЕ_ÐÐ_ФÐЙЛ. ОпциÑта „-d“ изтрива реÑурÑа "
+#~ "зареден Ñ\n"
+#~ " „-f“. Ðко не Ñа зададени имена, които да не Ñа опции, или Ñе "
+#~ "използва\n"
+#~ " опциÑта „-p“, Ñе извеждат имената на вградените команди. ОпциÑта „-"
+#~ "a“\n"
+#~ " означава вÑÑка вградена команда да Ñе изведе заедно Ñ Ñ‚Ð¾Ð²Ð° дали е "
+#~ "включена\n"
+#~ " или изключена. ОпциÑта „-s“ ограничава изхода до „Ñпециалните“ "
+#~ "вградени\n"
+#~ " команди на POSIX.2. ОпциÑта „-s“ извежда ÑпиÑъка на вÑички "
+#~ "изключени\n"
+#~ " вградени команди."
+
+#~ msgid ""
+#~ " Read ARGs as input to the shell and execute the resulting command(s)."
+#~ msgstr ""
+#~ " Изчитане на ÐРГУМЕÐТите като вход за обвивката и изпълнение на "
+#~ "получените\n"
+#~ "команди."
+
+#~ msgid ""
+#~ " Exec FILE, replacing this shell with the specified program.\n"
+#~ " If FILE is not specified, the redirections take effect in this\n"
+#~ " shell. If the first argument is `-l', then place a dash in the\n"
+#~ " zeroth arg passed to FILE, as login does. If the `-c' option\n"
+#~ " is supplied, FILE is executed with a null environment. The `-a'\n"
+#~ " option means to make set argv[0] of the executed process to NAME.\n"
+#~ " If the file cannot be executed and the shell is not interactive,\n"
+#~ " then the shell exits, unless the shell option `execfail' is set."
+#~ msgstr ""
+#~ " Изпълнение на ФÐЙЛ, като обвивката бива заменена Ñ ÑƒÐºÐ°Ð·Ð°Ð½Ð°Ñ‚Ð° програма. "
+#~ "Ðко\n"
+#~ " ФÐЙЛът не е указан, пренаÑочването Ñе извършва в тази обвивка. Ðко "
+#~ "първата\n"
+#~ " Ð¾Ð¿Ñ†Ð¸Ñ Ðµ „-l“, нулевиÑÑ‚ аргумент подаден на ФÐЙЛа e тире - подобно на "
+#~ "това,\n"
+#~ " което Ñе Ñлучва при влизане в ÑиÑтемата. При подаването на опциÑта "
+#~ "„-c“\n"
+#~ " ФÐЙЛът Ñе изпълнÑва Ñ Ð¿Ñ€Ð°Ð·Ð½Ð¾ обкръжение. ОпциÑта „-a“ означава "
+#~ "нулевиÑÑ‚\n"
+#~ " елемент от маÑива Ñ Ð°Ñ€Ð³ÑƒÐ¼ÐµÐ½Ñ‚Ð¸ (argv[0]) да е ИМЕ. Ðко ФÐЙЛът не може "
+#~ "да Ñе\n"
+#~ " изпълни и обвивката не е интерактивна, обвивката завършва работа, "
+#~ "оÑвен ако\n"
+#~ " не е зададена опциÑта на обвивката „execfail“."
+
+#~ msgid " Logout of a login shell."
+#~ msgstr " Изход от входна обвивка"
+
+#~ msgid ""
+#~ " For each NAME, the full pathname of the command is determined and\n"
+#~ " remembered. If the -p option is supplied, PATHNAME is used as the\n"
+#~ " full pathname of NAME, and no path search is performed. The -r\n"
+#~ " option causes the shell to forget all remembered locations. The -d\n"
+#~ " option causes the shell to forget the remembered location of each "
+#~ "NAME.\n"
+#~ " If the -t option is supplied the full pathname to which each NAME\n"
+#~ " corresponds is printed. If multiple NAME arguments are supplied "
+#~ "with\n"
+#~ " -t, the NAME is printed before the hashed full pathname. The -l "
+#~ "option\n"
+#~ " causes output to be displayed in a format that may be reused as "
+#~ "input.\n"
+#~ " If no arguments are given, information about remembered commands is "
+#~ "displayed."
+#~ msgstr ""
+#~ " За вÑÑко ИМЕ Ñе Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»Ñ Ð¸ Ð·Ð°Ð¿Ð¾Ð¼Ð½Ñ Ð¿ÑŠÐ»Ð½Ð¾Ñ‚Ð¾ име Ñ Ð¿ÑŠÑ‚Ñ Ð½Ð° командата.\n"
+#~ " Когато е указана опциÑта „-p“, ПЪТÑÑ‚ Ñе използва като пълен път за "
+#~ "името и\n"
+#~ " не Ñе Ñ‚ÑŠÑ€Ñи в Ð½Ð¾Ñ€Ð¼Ð°Ð»Ð½Ð¸Ñ Ð¿ÑŠÑ‚. ОпциÑта „-r“ кара обвивката да забрави "
+#~ "вÑички\n"
+#~ " запомнени меÑта. ОпциÑта „-d“ кара обвивката да забрави запомненото "
+#~ "мÑÑто\n"
+#~ " на обекта ÑÑŠÑ Ñъответното ИМЕ. Ðко е зададена опциÑта „-t“, извежда "
+#~ "Ñе\n"
+#~ " цÑлото име Ñ Ð¿ÑŠÑ‚Ñ Ð½Ð° Ñъответното ИМЕ. Ðко на опциÑта „-t“ Ñа "
+#~ "подадени\n"
+#~ " множеÑтво ИМЕна, те Ñе отпечатват преди хешираното пълно име. "
+#~ "ОпциÑта „-l“\n"
+#~ " форматира изхода по начин, който го прави удобен за вход. Ðко не Ñа\n"
+#~ " подадени аргументи, Ñе извежда Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° запомнените команди."
+
+#~ msgid ""
+#~ " Display helpful information about builtin commands. If PATTERN is\n"
+#~ " specified, gives detailed help on all commands matching PATTERN,\n"
+#~ " otherwise a list of the builtins is printed. The -s option\n"
+#~ " restricts the output for each builtin command matching PATTERN to\n"
+#~ " a short usage synopsis."
+#~ msgstr ""
+#~ " Извеждане на полезна Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° вградените команди. Ðко е указан "
+#~ "ШÐБЛОÐ,\n"
+#~ " Ñе извежда Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ñамо за командите, които напаÑват, в противен "
+#~ "Ñлучай\n"
+#~ " Ñе извежда Ð¸Ð½Ñ„Ð¾Ñ€Ð¼Ð°Ñ†Ð¸Ñ Ð·Ð° вÑички команди. ОпциÑта „-s“ ограничава\n"
+#~ " информациÑта за вÑÑка вградена команда до кратко Ñъобщение за\n"
+#~ " предназначението Ñ."
+
+#~ msgid ""
+#~ " By default, removes each JOBSPEC argument from the table of active "
+#~ "jobs.\n"
+#~ " If the -h option is given, the job is not removed from the table, but "
+#~ "is\n"
+#~ " marked so that SIGHUP is not sent to the job if the shell receives a\n"
+#~ " SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove "
+#~ "all\n"
+#~ " jobs from the job table; the -r option means to remove only running "
+#~ "jobs."
+#~ msgstr ""
+#~ " По подразбиране премахва вÑеки аргумент ЗÐДÐЧРот таблицата на "
+#~ "активните\n"
+#~ " задачи. Когато е зададена опциÑта „-h“, задачата не Ñе премахва от\n"
+#~ " таблицата, но Ñе отбелÑзва да не получава Ñигнал „SIGHUP“, когато "
+#~ "обвивката\n"
+#~ " получи такъв Ñигнал. ОпциÑта „-а“, когато не е указана ЗÐДÐЧÐ, "
+#~ "означава\n"
+#~ " вÑички задачи да Ñе извадÑÑ‚ от таблицата ÑÑŠÑ Ð·Ð°Ð´Ð°Ñ‡Ð¸. ОпциÑта „-r“ "
+#~ "кара да\n"
+#~ " Ñе махнат Ñамо вървÑщите задачи."
+
+#~ msgid ""
+#~ " Causes a function to exit with the return value specified by N. If N\n"
+#~ " is omitted, the return status is that of the last command."
+#~ msgstr ""
+#~ " Води до изход от Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ Ñ Ð²ÑŠÑ€Ð½Ð°Ñ‚ код N. Ðко не е указан N, връща Ñе "
+#~ "изходниÑ\n"
+#~ " код на поÑледната команда."
+
+#~ msgid ""
+#~ " For each NAME, remove the corresponding variable or function. Given\n"
+#~ " the `-v', unset will only act on variables. Given the `-f' flag,\n"
+#~ " unset will only act on functions. With neither flag, unset first\n"
+#~ " tries to unset a variable, and if that fails, then tries to unset a\n"
+#~ " function. Some variables cannot be unset; also see readonly."
+#~ msgstr ""
+#~ " За вÑÑко ИМЕ Ñе премахва Ñъответната променлива или име. Когато е "
+#~ "зададена\n"
+#~ " опциÑта „-v“, „unset“ дейÑтва Ñамо на променливи. Когато е зададена "
+#~ "опциÑта\n"
+#~ " „-f“, „unset“ дейÑтва Ñамо на функции. Когато командата Ñе използва "
+#~ "без\n"
+#~ " опции, първо Ñе прави опита за премахване на променлива и Ñлед това "
+#~ "на\n"
+#~ " функциÑ. ÐÑкои променливи не могат да Ñе премахнат. Вижте "
+#~ "вградената\n"
+#~ " команда „readonly“."
+
+#~ msgid ""
+#~ " NAMEs are marked for automatic export to the environment of\n"
+#~ " subsequently executed commands. If the -f option is given,\n"
+#~ " the NAMEs refer to functions. If no NAMEs are given, or if `-p'\n"
+#~ " is given, a list of all names that are exported in this shell is\n"
+#~ " printed. An argument of `-n' says to remove the export property\n"
+#~ " from subsequent NAMEs. An argument of `--' disables further option\n"
+#~ " processing."
+#~ msgstr ""
+#~ " ИМЕната Ñе маркират за автоматично изнаÑÑне към Ñредата на поÑледвалите\n"
+#~ " команди. Ðко е зададена опциÑта „-f“, ИМЕната Ñа на функции. Ðко не "
+#~ "Ñа\n"
+#~ " дадени ИМЕна, или е използвана опциÑта „-p“, Ñе извежда ÑпиÑък Ñ "
+#~ "вÑички\n"
+#~ " имена, които Ñа изнеÑени от тази обвивка. ОпциÑта „-n“ указва "
+#~ "Ñледващите\n"
+#~ " ИМЕна повече да не Ñа изнеÑени. Ðргументът „--“ изключва третирането "
+#~ "на\n"
+#~ " Ñледващите аргументи като опции."
+
+#~ msgid ""
+#~ " The given NAMEs are marked readonly and the values of these NAMEs may\n"
+#~ " not be changed by subsequent assignment. If the -f option is given,\n"
+#~ " then functions corresponding to the NAMEs are so marked. If no\n"
+#~ " arguments are given, or if `-p' is given, a list of all readonly "
+#~ "names\n"
+#~ " is printed. The `-a' option means to treat each NAME as\n"
+#~ " an array variable. An argument of `--' disables further option\n"
+#~ " processing."
+#~ msgstr ""
+#~ " Премахва възможноÑтта за промÑна на дадените ИМЕна при поÑледващи "
+#~ "приÑвоÑваниÑ.\n"
+#~ " Когато е използвана опциÑта „-f“, Ñе премахва възможноÑтта за промÑна "
+#~ "на\n"
+#~ " функциите Ñ Ñ‚ÐµÐ·Ð¸ ИМЕна. Ðко не Ñа дадени аргументи или е използвана "
+#~ "опциÑта\n"
+#~ " „-p“, Ñе извеждат имената, които Ñа без възможноÑÑ‚ за промÑна. "
+#~ "ОпциÑта „-a“\n"
+#~ " означава вÑÑко име да Ñе интерпретира като променлива за маÑив. "
+#~ "Ðргументът\n"
+#~ " „--“ изключва третирането на Ñледващите аргументи като опции."
+
+#~ msgid ""
+#~ " The positional parameters from $N+1 ... are renamed to $1 ... If N is\n"
+#~ " not given, it is assumed to be 1."
+#~ msgstr ""
+#~ " Позиционните аргументи от $N+1 и нагоре Ñъответно Ñе преименуват на $1 "
+#~ "и\n"
+#~ " нагоре. Ðко N не е зададен, приема Ñе, че е 1."
+
+#~ msgid ""
+#~ " Suspend the execution of this shell until it receives a SIGCONT\n"
+#~ " signal. The `-f' if specified says not to complain about this\n"
+#~ " being a login shell if it is; just suspend anyway."
+#~ msgstr ""
+#~ " Временно Ñпиране на изпълнението на текущата обвивка до получаването на "
+#~ "Ñигнала\n"
+#~ " „SIGCONT“. Ðко е зададена опциÑта „-f“, Ñе подтиÑка "
+#~ "предупреждението, че\n"
+#~ " това е входна обвивка, изпълнението Ñ Ð¿Ñ€Ð¾Ñто Ñе Ñпира."
+
+#~ msgid ""
+#~ " Print the accumulated user and system times for processes run from\n"
+#~ " the shell."
+#~ msgstr ""
+#~ " Отпечатване на натрупаното потребителÑко и ÑиÑтемно време за процеÑи, "
+#~ "които Ñа\n"
+#~ " Ñтартирани през обвивката."
+
+#~ msgid ""
+#~ " For each NAME, indicate how it would be interpreted if used as a\n"
+#~ " command name.\n"
+#~ " \n"
+#~ " If the -t option is used, `type' outputs a single word which is one "
+#~ "of\n"
+#~ " `alias', `keyword', `function', `builtin', `file' or `', if NAME is "
+#~ "an\n"
+#~ " alias, shell reserved word, shell function, shell builtin, disk "
+#~ "file,\n"
+#~ " or unfound, respectively.\n"
+#~ " \n"
+#~ " If the -p flag is used, `type' either returns the name of the disk\n"
+#~ " file that would be executed, or nothing if `type -t NAME' would not\n"
+#~ " return `file'.\n"
+#~ " \n"
+#~ " If the -a flag is used, `type' displays all of the places that "
+#~ "contain\n"
+#~ " an executable named `file'. This includes aliases, builtins, and\n"
+#~ " functions, if and only if the -p flag is not also used.\n"
+#~ " \n"
+#~ " The -f flag suppresses shell function lookup.\n"
+#~ " \n"
+#~ " The -P flag forces a PATH search for each NAME, even if it is an "
+#~ "alias,\n"
+#~ " builtin, or function, and returns the name of the disk file that "
+#~ "would\n"
+#~ " be executed."
+#~ msgstr ""
+#~ " За вÑÑко ИМЕ Ñе отпечатва как ще Ñе интерпретира, ако Ñе използва за име "
+#~ "на\n"
+#~ " команда.\n"
+#~ " \n"
+#~ " Ðко Ñе използва опциÑта „-t“, командата „type“ извежда единÑтвена "
+#~ "дума,\n"
+#~ " коÑто е нÑÐºÐ¾Ñ Ð¾Ñ‚ „alias“, „keyword“, „function“, „builtin“, „file“ "
+#~ "или „“,\n"
+#~ " ако ИМЕто Ñъответно е Ñиноним, запазена дума на обвивката, Ñ„ÑƒÐ½ÐºÑ†Ð¸Ñ "
+#~ "на\n"
+#~ " обвивката, вградена команда в обвивката, файл или не е намерено.\n"
+#~ " \n"
+#~ " Ðко Ñе използва опциÑта „-p“, командата „type“ или извежда името на "
+#~ "файла,\n"
+#~ " който ще Ñе изпълни, или не извежда в нищо, в Ñлучаите, когато „type -"
+#~ "t ИМЕ“\n"
+#~ " не връща „file“.\n"
+#~ " \n"
+#~ " Ðко Ñе използва опциÑта „-a“, командата „type“ извежда вÑички меÑта, "
+#~ "които\n"
+#~ " Ñъдържат изпълним обект Ñ Ñ‚Ð°ÐºÐ¾Ð²Ð° ИМЕ. Това включва Ñинонимите, "
+#~ "вградените\n"
+#~ " команди и функции, но Ñамо ако не Ñе използва и опциÑта „-p“.\n"
+#~ " \n"
+#~ " ОпциÑта „-f“ подтиÑка Ñ‚ÑŠÑ€Ñенето във функциите на обвивката.\n"
+#~ " \n"
+#~ " ОпциÑта „-P“ кара ИМЕто да Ñе Ñ‚ÑŠÑ€Ñи в Ð¿ÑŠÑ‚Ñ $PATH, дори ИМЕто да е\n"
+#~ " Ñиноним, вградена команда или функциÑ, и да Ñе изведе името на файла, "
+#~ "който\n"
+#~ " би Ñе изпълнил."
+
+#~ msgid ""
+#~ " The user file-creation mask is set to MODE. If MODE is omitted, or if\n"
+#~ " `-S' is supplied, the current value of the mask is printed. The `-"
+#~ "S'\n"
+#~ " option makes the output symbolic; otherwise an octal number is "
+#~ "output.\n"
+#~ " If `-p' is supplied, and MODE is omitted, the output is in a form\n"
+#~ " that may be used as input. If MODE begins with a digit, it is\n"
+#~ " interpreted as an octal number, otherwise it is a symbolic mode "
+#~ "string\n"
+#~ " like that accepted by chmod(1)."
+#~ msgstr ""
+#~ " МаÑката за Ñъздадените от Ð¿Ð¾Ñ‚Ñ€ÐµÐ±Ð¸Ñ‚ÐµÐ»Ñ Ñ„Ð°Ð¹Ð»Ð¾Ð²Ðµ е зададена да е РЕЖИМ. "
+#~ "Ðко той\n"
+#~ " е пропуÑнат или е дадена опциÑта „-S“, отпечатва Ñе текущата ÑтойноÑÑ‚ "
+#~ "на\n"
+#~ " маÑката. ОпциÑта „-S“ води до опиÑателен изход, в противен Ñлучай "
+#~ "Ñе\n"
+#~ " отпечатва чиÑло в оÑмична бройна ÑиÑтема. Ðко е дадена опциÑта „-p“, "
+#~ "а\n"
+#~ " режимът е пропуÑнат, изходът може да Ñе използва като вход. Ðко "
+#~ "РЕЖИМът\n"
+#~ " започва Ñ Ñ†Ð¸Ñ„Ñ€Ð°, то той Ñе интерпретира като оÑмично чиÑло, в "
+#~ "противен\n"
+#~ " Ñлучай е опиÑателен низ, който Ñе приема от командата „chmod“."
+
+#~ msgid ""
+#~ " Wait for the specified process and report its termination status. If\n"
+#~ " N is not given, all currently active child processes are waited for,\n"
+#~ " and the return code is zero. N is a process ID; if it is not given,\n"
+#~ " all child processes of the shell are waited for."
+#~ msgstr ""
+#~ " Изчакване на ÑƒÐºÐ°Ð·Ð°Ð½Ð¸Ñ Ð¿Ñ€Ð¾Ñ†ÐµÑ Ð¸ докладване за Ð¸Ð·Ñ…Ð¾Ð´Ð½Ð¸Ñ ÐºÐ¾Ð´. Ðко не е "
+#~ "зададен N,\n"
+#~ " вÑички текущо активни дъщерни процеÑи Ñе изчакват и изходниÑÑ‚ код е "
+#~ "0. N\n"
+#~ " е идентификатор на процеÑ. Ðко не е задача, изчакват Ñе вÑички "
+#~ "процеÑи в\n"
+#~ " Ð¿Ñ€Ð¾Ð³Ñ€Ð°Ð¼Ð½Ð¸Ñ ÐºÐ°Ð½Ð°Ð» на задачата."
+
+#~ msgid ""
+#~ " Create a simple command invoked by NAME which runs COMMANDS.\n"
+#~ " Arguments on the command line along with NAME are passed to the\n"
+#~ " function as $0 .. $n."
+#~ msgstr ""
+#~ " Създаване на проÑта команда, коÑто Ñе извиква чрез ИМЕ, коÑто Ñтартира "
+#~ "КОМÐÐДИ.\n"
+#~ " Ðргументите на ÐºÐ¾Ð¼Ð°Ð½Ð´Ð½Ð¸Ñ Ñ€ÐµÐ´, заедно Ñ Ð˜ÐœÐ•Ñ‚Ð¾, Ñе предават на "
+#~ "функциÑта като\n"
+#~ " $0 … $n."
+
+#~ msgid ""
+#~ " Toggle the values of variables controlling optional behavior.\n"
+#~ " The -s flag means to enable (set) each OPTNAME; the -u flag\n"
+#~ " unsets each OPTNAME. The -q flag suppresses output; the exit\n"
+#~ " status indicates whether each OPTNAME is set or unset. The -o\n"
+#~ " option restricts the OPTNAMEs to those defined for use with\n"
+#~ " `set -o'. With no options, or with the -p option, a list of all\n"
+#~ " settable options is displayed, with an indication of whether or\n"
+#~ " not each is set."
+#~ msgstr ""
+#~ " Превключва ÑтойноÑтите на променливите, които управлÑват допълнителното\n"
+#~ " поведение. ОпциÑта „-s“ позволÑва задаването на вÑÑка ОПЦИЯ. "
+#~ "ОпциÑта „-q“\n"
+#~ " премахва вÑÑка ОПЦИЯ. ОпциÑта „-q“ предотвратÑва извеждането на "
+#~ "информациÑ.\n"
+#~ " ВърнатиÑÑ‚ код показва дали вÑÑка Ð¾Ð¿Ñ†Ð¸Ñ Ðµ зададена или премахната. "
+#~ "ОпциÑта\n"
+#~ " „-o“ ограничава ОПЦИите до тези, които Ñа дефинирани да Ñе използват "
+#~ "ÑÑŠÑ\n"
+#~ " „set -o“. Без опции или Ñ Ð¾Ð¿Ñ†Ð¸Ñта „-p“ Ñе извежда ÑпиÑъка на вÑички "
+#~ "опции\n"
+#~ " като Ñе показва дали Ñа зададени или не."
+
+#~ msgid ""
+#~ " For each NAME, specify how arguments are to be completed.\n"
+#~ " If the -p option is supplied, or if no options are supplied, "
+#~ "existing\n"
+#~ " completion specifications are printed in a way that allows them to "
+#~ "be\n"
+#~ " reused as input. The -r option removes a completion specification "
+#~ "for\n"
+#~ " each NAME, or, if no NAMEs are supplied, all completion "
+#~ "specifications."
+#~ msgstr ""
+#~ " За вÑÑко ИМЕ поÑочва как да Ñе допиÑват аргументите.\n"
+#~ " Ðко е зададена опциÑта -p или не Ñа зададени никакви опции, "
+#~ "ÑъщеÑтвуващите\n"
+#~ " клаÑове допиÑÐ²Ð°Ð½Ð¸Ñ Ñе отпечатват по начин, който позволÑва да Ñе "
+#~ "използват\n"
+#~ " повторно за вход. ОпциÑта -r премахва ÐºÐ»Ð°Ñ Ð´Ð¾Ð¿Ð¸ÑÐ²Ð°Ð½Ð¸Ñ Ð·Ð° вÑÑко "
+#~ "поÑочено\n"
+#~ " ИМЕ, а ако не е дадено такова - махат Ñе вÑички клаÑове."
diff --git a/po/boldquot.sed b/po/boldquot.sed
new file mode 100644
index 0000000..4b937aa
--- /dev/null
+++ b/po/boldquot.sed
@@ -0,0 +1,10 @@
+s/"\([^"]*\)"/“\1â€/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“â€/""/g
+s/“/“/g
+s/â€/â€/g
+s/‘/‘/g
+s/’/’/g
diff --git a/po/ca.gmo b/po/ca.gmo
new file mode 100644
index 0000000..c34b446
--- /dev/null
+++ b/po/ca.gmo
Binary files differ
diff --git a/po/ca.po b/po/ca.po
new file mode 100644
index 0000000..14b2e1d
--- /dev/null
+++ b/po/ca.po
@@ -0,0 +1,6487 @@
+# Catalan messages for the GNU bash-2.0
+# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Montxo Vicente i Sempere <montxo@alacant.com>, 2003.
+# Jordi Mas i Hern?ndez <jmas@softcatala.org>, 2004 (correccions).
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bash-2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2003-12-28 19:59+0100\n"
+"Last-Translator: Montxo Vicente i Sempere <montxo@alacant.com>\n"
+"Language-Team: Catalan <ca@dodds.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "la matriu est? mal composta"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr ""
+
+#: arrayfunc.c:480
+#, fuzzy, c-format
+msgid "%s: invalid associative array key"
+msgstr "%c%c: opci? inv?lida"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: no es pot assignar a un ?ndex que no ?s num?ric"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: no es pot crear: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr ""
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr ""
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr ""
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "%c%c: opci? inv?lida"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr ""
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr ""
+
+#: builtins/bind.def:245
+#, fuzzy, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: no es pot crear: %s"
+
+#: builtins/bind.def:260
+#, fuzzy, c-format
+msgid "`%s': cannot unbind"
+msgstr "%s: no s'ha trobat l'ordre"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, fuzzy, c-format
+msgid "`%s': unknown function name"
+msgstr "%s: funci? nom?s de lectura"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr ""
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr ""
+
+#: builtins/break.def:77 builtins/break.def:117
+#, fuzzy
+msgid "loop count"
+msgstr "fi de sessi?"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr ""
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr ""
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr ""
+
+#: builtins/common.c:101
+#, fuzzy, c-format
+msgid "line %d: "
+msgstr "encaix %3d:"
+
+#: builtins/common.c:139 error.c:261
+#, fuzzy, c-format
+msgid "warning: "
+msgstr "s'est? escrivint"
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr ""
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "nombre excessiu de par?metres"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, fuzzy, c-format
+msgid "%s: option requires an argument"
+msgstr "cal un par?metre per a l'opci?: -"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr ""
+
+#: builtins/common.c:205
+#, fuzzy, c-format
+msgid "%s: not found"
+msgstr "%s: no s'ha trobat l'ordre"
+
+#: builtins/common.c:214 shell.c:795
+#, fuzzy, c-format
+msgid "%s: invalid option"
+msgstr "%c%c: opci? inv?lida"
+
+#: builtins/common.c:221
+#, fuzzy, c-format
+msgid "%s: invalid option name"
+msgstr "%c%c: opci? inv?lida"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, fuzzy, c-format
+msgid "`%s': not a valid identifier"
+msgstr "'%s' no ?s un identificador v?lid"
+
+#: builtins/common.c:238
+#, fuzzy
+msgid "invalid octal number"
+msgstr "n?mero inv?lid de senyal"
+
+#: builtins/common.c:240
+#, fuzzy
+msgid "invalid hex number"
+msgstr "n?mero inv?lid de senyal"
+
+#: builtins/common.c:242 expr.c:1256
+#, fuzzy
+msgid "invalid number"
+msgstr "n?mero inv?lid de senyal"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr ""
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr ""
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: ?s una variable nom?s de lectura"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr ""
+
+#: builtins/common.c:272 builtins/common.c:274
+#, fuzzy
+msgid "argument"
+msgstr "s'esperava un par?metre"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr ""
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr ""
+
+#: builtins/common.c:290
+#, fuzzy, c-format
+msgid "%s: no job control"
+msgstr "no hi ha cap tasca de control dins d'aquest int?rpret"
+
+#: builtins/common.c:292
+#, fuzzy
+msgid "no job control"
+msgstr "no hi ha cap tasca de control dins d'aquest int?rpret"
+
+#: builtins/common.c:302
+#, fuzzy, c-format
+msgid "%s: restricted"
+msgstr "%s: s'ha finalitzat la tasca"
+
+#: builtins/common.c:304
+#, fuzzy
+msgid "restricted"
+msgstr "Terminat"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr ""
+
+#: builtins/common.c:321
+#, fuzzy, c-format
+msgid "write error: %s"
+msgstr "error del conducte: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr ""
+
+#: builtins/common.c:629 builtins/common.c:631
+#, fuzzy, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: Redirecci? ambigua"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr ""
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr ""
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr ""
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr ""
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr ""
+
+#: builtins/declare.def:122
+#, fuzzy
+msgid "can only be used in a function"
+msgstr ""
+"servir LOCAL dins d'una funci?; a?? restringir? la magnitud visible de la"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr ""
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: funci? nom?s de lectura"
+
+#: builtins/declare.def:468
+#, fuzzy, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "$%s: no es pot assignar d'aquesta manera"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr ""
+
+#: builtins/enable.def:312
+#, fuzzy, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "no es pot obrir el conducte anomenat %s per a %s: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr ""
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr ""
+
+#: builtins/enable.def:474
+#, fuzzy, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: no es pot crear: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: ?s un directori"
+
+#: builtins/evalfile.c:139
+#, fuzzy, c-format
+msgid "%s: not a regular file"
+msgstr "%s: no es pot executar el fitxer binari"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr ""
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: no es pot executar el fitxer binari"
+
+#: builtins/exec.def:212
+#, fuzzy, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: no es pot crear: %s"
+
+#: builtins/exit.def:65
+#, fuzzy, c-format
+msgid "logout\n"
+msgstr "fi de sessi?"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr ""
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr ""
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr ""
+
+#: builtins/fc.def:262
+#, fuzzy
+msgid "no command found"
+msgstr "%s: no s'ha trobat l'ordre"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr ""
+
+#: builtins/fc.def:370
+#, fuzzy, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: no es pot crear: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr ""
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr ""
+
+#: builtins/getopt.c:110
+#, fuzzy, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "opci? ilžlegal: -"
+
+#: builtins/getopt.c:111
+#, fuzzy, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "cal un par?metre per a l'opci?: -"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr ""
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr ""
+
+#: builtins/hash.def:244
+#, fuzzy, c-format
+msgid "hits\tcommand\n"
+msgstr "si s'escriu \"r\" s'executar? la darrera ordre."
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] ""
+msgstr[1] ""
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+
+#: builtins/help.def:185
+#, fuzzy, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: no es pot crear: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr ""
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr ""
+
+#: builtins/history.def:365
+#, fuzzy, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: s'esperava una expressi? de nombre enter"
+
+#: builtins/inlib.def:71
+#, fuzzy, c-format
+msgid "%s: inlib failed"
+msgstr "%s: s'esperava una expressi? de nombre enter"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr ""
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr ""
+
+#: builtins/kill.def:263
+#, fuzzy
+msgid "Unknown error"
+msgstr "Error desconegut %d"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "s'esperava una expressi?"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: variable sense vincle"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr ""
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr ""
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, fuzzy, c-format
+msgid "%s: invalid line count"
+msgstr "%c%c: opci? inv?lida"
+
+#: builtins/mapfile.def:277
+#, fuzzy, c-format
+msgid "%s: invalid array origin"
+msgstr "%c%c: opci? inv?lida"
+
+#: builtins/mapfile.def:294
+#, fuzzy, c-format
+msgid "%s: invalid callback quantum"
+msgstr "n?mero inv?lid de senyal"
+
+#: builtins/mapfile.def:326
+#, fuzzy
+msgid "empty array variable name"
+msgstr "%s: variable sense vincle"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr ""
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr ""
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr ""
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr ""
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr ""
+
+#: builtins/pushd.def:195
+#, fuzzy
+msgid "no other directory"
+msgstr "seguent entrada de la pila (o sia, la nova primera entrada)."
+
+#: builtins/pushd.def:462
+#, fuzzy
+msgid "<no current directory>"
+msgstr "\taquest ser? el nou directori actual de treball."
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr ""
+
+#: builtins/pushd.def:508
+#, fuzzy
+msgid "directory stack index"
+msgstr "S'ha desbordat la base de la pila."
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr ""
+
+#: builtins/read.def:588
+#, fuzzy, c-format
+msgid "read error: %d: %s"
+msgstr "error del conducte: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+
+#: builtins/set.def:768
+#, fuzzy
+msgid "cannot simultaneously unset a function and a variable"
+msgstr ""
+"servir LOCAL dins d'una funci?; a?? restringir? la magnitud visible de la"
+
+#: builtins/set.def:805
+#, fuzzy, c-format
+msgid "%s: cannot unset"
+msgstr "%s: no es pot crear: %s"
+
+#: builtins/set.def:812
+#, fuzzy, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: no es pot crear: %s"
+
+#: builtins/set.def:823
+#, fuzzy, c-format
+msgid "%s: not an array variable"
+msgstr "%s: variable sense vincle"
+
+#: builtins/setattr.def:186
+#, fuzzy, c-format
+msgid "%s: not a function"
+msgstr "%s: funci? nom?s de lectura"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+#, fuzzy
+msgid "shift count"
+msgstr "shift [n]"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr ""
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr ""
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr ""
+
+#: builtins/source.def:153
+#, fuzzy, c-format
+msgid "%s: file not found"
+msgstr "%s: no s'ha trobat l'ordre"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr ""
+
+#: builtins/suspend.def:111
+#, fuzzy
+msgid "cannot suspend a login shell"
+msgstr "Finalitzar una sessi? de l'int?rpret d'ordres."
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr ""
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr ""
+
+#: builtins/type.def:274
+#, fuzzy, c-format
+msgid "%s is a function\n"
+msgstr "%s: funci? nom?s de lectura"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr ""
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr ""
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr ""
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr ""
+
+#: builtins/ulimit.def:398
+#, fuzzy, c-format
+msgid "`%c': bad command"
+msgstr "%c%c: opci? inv?lida"
+
+#: builtins/ulimit.def:427
+#, fuzzy, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: no es pot crear: %s"
+
+#: builtins/ulimit.def:453
+#, fuzzy
+msgid "limit"
+msgstr "L?mit de la UCP"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, fuzzy, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: no es pot crear: %s"
+
+#: builtins/umask.def:118
+#, fuzzy
+msgid "octal number"
+msgstr "n?mero inv?lid de senyal"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr ""
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr ""
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr ""
+
+#: error.c:165
+#, fuzzy, c-format
+msgid "last command: %s\n"
+msgstr "si s'escriu \"r\" s'executar? la darrera ordre."
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr ""
+
+#: error.c:406
+#, fuzzy
+msgid "unknown command error"
+msgstr "Error desconegut %d"
+
+#: error.c:407
+#, fuzzy
+msgid "bad command type"
+msgstr "un nom d'una ordre."
+
+#: error.c:408
+#, fuzzy
+msgid "bad connector"
+msgstr "connector inv?lid '%d'"
+
+#: error.c:409
+#, fuzzy
+msgid "bad jump"
+msgstr "Salt incorrecte %d"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: variable sense vincle"
+
+#: eval.c:181
+#, fuzzy, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr ""
+"%c ha excedit el temps d'espera per una entrada: fi autom?tica de sessi?\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr ""
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr ""
+
+#: execute_cmd.c:2075
+#, fuzzy
+msgid "pipe error"
+msgstr "error del conducte: %s"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: restringit: no es pot especificar '/' en noms d'ordres"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: no s'ha trobat l'ordre"
+
+#: execute_cmd.c:4827
+#, fuzzy, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: ?s un directori"
+
+#: execute_cmd.c:4976
+#, fuzzy, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr ""
+"no es pot copiar per duplicat el descriptor del fitxer df %d cap a df 0: %s"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "s'ha excedit el nivell de recursivitat de l'expressi?"
+
+#: expr.c:265
+#, fuzzy
+msgid "recursion stack underflow"
+msgstr "S'ha desbordat la base de la pila."
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "error de sintaxi a l'expressi?"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "s'ha intentat assignar una variable inexistent"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "divisi? per 0"
+
+#: expr.c:471
+#, fuzzy
+msgid "bug: bad expassign token"
+msgstr "error de programaci?: pas incorrecte del senyal %d per a expassing()."
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "s'esperava ':' per a l'expressi? condicional"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr ""
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr ""
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "falta algun ')'"
+
+#: expr.c:897 expr.c:1176
+#, fuzzy
+msgid "syntax error: operand expected"
+msgstr "error de sintaxi: s'ha arribat inesperadament a la fi del fitxer"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr ""
+
+#: expr.c:1202
+#, fuzzy, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s: %s: %s (la prova d'error ?s \"%s\")\n"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr ""
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "valor massa gran per a la base de numeraci?"
+
+#: expr.c:1329
+#, fuzzy, c-format
+msgid "%s: expression error\n"
+msgstr "%s: s'esperava una expressi? de nombre enter"
+
+#: general.c:61
+#, fuzzy
+msgid "getcwd: cannot access parent directories"
+msgstr "getwd: no s'ha pogut accedir als directoris pares"
+
+#: input.c:94 subst.c:4857
+#, fuzzy, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr ""
+"no es pot copiar per duplicat el descriptor del fitxer df %d cap a df 0: %s"
+
+#: input.c:258
+#, fuzzy, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+"no s'ha pogut assignar una nova descripci? de fitxer per a l'entrada de "
+"bash\n"
+"a partir del descriptor de fitxer %d: %s"
+
+#: input.c:266
+#, fuzzy, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr ""
+"check_bash_input: ja hi existeix mem?ria interm?dia per a la nova\n"
+"descripci? de fitxer %d"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr ""
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr ""
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr ""
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr ""
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr ""
+
+#: jobs.c:1401
+#, fuzzy, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: L'identificador de proc?s (pid) no existeix (%d)!\n"
+
+#: jobs.c:1416
+#, fuzzy, c-format
+msgid "Signal %d"
+msgstr "Senyal desconeguda #%d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Fet"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Aturat"
+
+#: jobs.c:1439
+#, fuzzy, c-format
+msgid "Stopped(%s)"
+msgstr "Aturat"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "S'est? executant"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Fet (%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "Fi d'execuci? amb l'estat %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Estat desconegut"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(la imatge del nucli ha estat bolcada) "
+
+#: jobs.c:1568
+#, fuzzy, c-format
+msgid " (wd: %s)"
+msgstr "(wd ara: %s)\n"
+
+#: jobs.c:1776
+#, fuzzy, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "error en l'execuci? de setpgid (%d a %d) en el proc?s fill %d: %s\n"
+
+#: jobs.c:2104 nojobs.c:585
+#, fuzzy, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr ""
+"wait: l'identificador del proc?s (pid) %d no ?s un fill d'aquest int?rpret"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr ""
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr ""
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: s'ha finalitzat la tasca"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr ""
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, fuzzy, c-format
+msgid "%s: line %d: "
+msgstr "encaix %3d:"
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr " (bolcat de la imatge del nucli)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(wd ara: %s)\n"
+
+#: jobs.c:3579
+#, fuzzy
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_jobs: getpgrp ha fallat: %s"
+
+#: jobs.c:3639
+#, fuzzy
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_jobs: disciplina de l?nia: %s"
+
+#: jobs.c:3649
+#, fuzzy
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_jobs: getpgrp ha fallat: %s"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr ""
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "no hi ha cap tasca de control dins d'aquest int?rpret"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:313
+#, fuzzy
+msgid "unknown"
+msgstr "<desconegut>"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr ""
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr ""
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr ""
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr ""
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr ""
+
+#: lib/sh/netopen.c:168
+#, fuzzy, c-format
+msgid "%s: host unknown"
+msgstr "desconegut"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr ""
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr ""
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr ""
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc: no es poden reassignar %lu octets (%lu octets reassignats)"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc: no es poden reassignar %lu octets (%lu octets reassignats)"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Teniu correu en $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Teniu correu nou en $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "S'ha llegit el correu a %s\n"
+
+#: make_cmd.c:323
+#, fuzzy
+msgid "syntax error: arithmetic expression required"
+msgstr "error de sintaxi a l'expressi?"
+
+#: make_cmd.c:325
+#, fuzzy
+msgid "syntax error: `;' unexpected"
+msgstr "error de sintaxi: s'ha arribat inesperadament a la fi del fitxer"
+
+#: make_cmd.c:326
+#, fuzzy, c-format
+msgid "syntax error: `((%s))'"
+msgstr "error de sintaxi"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: el tipus d'instrucci? %d ?s incorrecte"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr ""
+
+#: parse.y:3133 parse.y:3369
+#, fuzzy, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr ""
+"s'ha arribat inesperadament a la fi del fitxer (EOF) mentre\n"
+"es buscava per '%c'"
+
+#: parse.y:3951
+#, fuzzy
+msgid "unexpected EOF while looking for `]]'"
+msgstr ""
+"s'ha arribat inesperadament a la fi del fitxer (EOF) mentre\n"
+"es buscava per '%c'"
+
+#: parse.y:3956
+#, fuzzy, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "hi ha un error inesperat de sintaxi prop del senyal '%s'"
+
+#: parse.y:3960
+#, fuzzy
+msgid "syntax error in conditional expression"
+msgstr "error de sintaxi a l'expressi?"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr ""
+
+#: parse.y:4042
+#, fuzzy
+msgid "expected `)'"
+msgstr "s'esperava ')'"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr ""
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr ""
+
+#: parse.y:4120
+#, fuzzy, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "%s: s'esperava un operador binari"
+
+#: parse.y:4124
+#, fuzzy
+msgid "conditional binary operator expected"
+msgstr "%s: s'esperava un operador binari"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr ""
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr ""
+
+#: parse.y:4161
+#, fuzzy, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "s'esperava ':' per a l'expressi? condicional"
+
+#: parse.y:4164
+#, fuzzy, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "s'esperava ':' per a l'expressi? condicional"
+
+#: parse.y:4168
+#, fuzzy, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "s'esperava ':' per a l'expressi? condicional"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "hi ha un error inesperat de sintaxi prop del senyal '%s'"
+
+#: parse.y:5477
+#, fuzzy, c-format
+msgid "syntax error near `%s'"
+msgstr "hi ha un error inesperat de sintaxi prop del senyal '%s'"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "error de sintaxi: s'ha arribat inesperadament a la fi del fitxer"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "error de sintaxi"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Utilitzeu ?%s? per a eixir de l'int?rpret d'ordres.\n"
+
+#: parse.y:5711
+#, fuzzy
+msgid "unexpected EOF while looking for matching `)'"
+msgstr ""
+"s'ha arribat inesperadament a la fi del fitxer (EOF) mentre\n"
+"es buscava per '%c'"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr ""
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr ""
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: el connector '%d' ?s incorrecte"
+
+#: print_cmd.c:363
+#, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr ""
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr ""
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr ""
+
+#: redir.c:166
+#, fuzzy, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: Redirecci? ambigua"
+
+# No acabe d'entendre el significat de l'original "clobber"
+#: redir.c:170
+#, fuzzy, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: No s'ha pogut sobreescriure el fitxer existent"
+
+#: redir.c:175
+#, fuzzy, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: restringit: no es pot especificar '/' en noms d'ordres"
+
+#: redir.c:180
+#, fuzzy, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "no es pot establir un conducte per a la substituci? del proc?s: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: no es pot assignar la llista a un element de la matriu"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr ""
+
+#: redir.c:1101
+#, fuzzy
+msgid "redirection error: cannot duplicate fd"
+msgstr "error de redirecci?"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr ""
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr ""
+
+#: shell.c:884
+#, fuzzy, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: opci? inv?lida"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "No tinc cap nom d'usuari!"
+
+#: shell.c:1793
+#, fuzzy, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU %s, versi? %s\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Sintaxi:\t%s [opci?-format-llarg GNU] [opci?] ...\n"
+"\t%s [opci?-format-llarg GNU] [opci?] fitxer_de_seq??ncies ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "opcions de formes llargues de GNU:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Opcions de l'int?rpret d'ordres:\n"
+
+#: shell.c:1801
+#, fuzzy
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD o -c ordre\t\t(nom?s per a invocar)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s o -o opci?\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"Per a obtindre m?s informaci? sobre les opcions de l'int?rpret\n"
+"d'ordres, teclegeu ?%s -c \"help set\"?.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"Per a obtindre m?s informaci? sobre les ordres integrades de l'int?rpret,\n"
+"teclegeu '%s -c help' .\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr ""
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr ""
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Senyal falsa"
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Penjar"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Interrumpeix"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "Eixir"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Instrucci? ilžlegal"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "BPT rastrejament/captura"
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "Instrucci? d'avortament (ABORT)"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "Instrucci? per a emular una captura EMT"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Excepci? en operaci? amb coma flotant"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "Finalitzat"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "Error de bus"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Violaci? de segment"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Crida inv?lida del sistema"
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "Conducte trencat"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Temporitzador"
+
+#: siglist.c:111
+#, fuzzy
+msgid "Terminated"
+msgstr ""
+"opci? incorrecta, la funci? getopts() introdueix el signe '?' dins de\n"
+"la variable NAME i esborra la variable OPTARG. Si no es troba una \n"
+"opci? necess?ria, s'introdueix el signe '?' en la variable NAME, \n"
+"s'esborra la variable OPTARG, i s'imprimir? un missatge de\n"
+"diagn?stic."
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "Condici? urgent d'Entrada/Eixida (En/Ei)"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Aturat (senyal)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "Continua"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "S'ha mort o s'ha aturat el proc?s fill"
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Aturat (entrada per terminal)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Aturat (eixida per terminal)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "Entrada/Eixida preparades"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "L?mit de la UCP"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "L?mit de la grand?ria del fitxer"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "Alarma (virtual)"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "Alarma (entorn)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "S'ha canviat la finestra"
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr "Bloqueig de gravaci?"
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "Senyal 1 definida per l'usuari"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "Senyal 2 definida per l'usuari"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "pendent de l'entrada de dades HFT"
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "fallida imminent d'energia"
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "fallida imminent del sistema"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "proc?s de migraci? cap a un altre UPC en curs"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "error de programaci?"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "S'ha concedit el mode de monitor HFT"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "S'ha rebutjat el mode de monitor HFT"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "S'ha completat la seq??ncia de so HFT"
+
+#: siglist.c:215
+msgid "Information request"
+msgstr ""
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Senyal desconeguda #"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Senyal desconeguda #%d"
+
+#: subst.c:1333 subst.c:1454
+#, fuzzy, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "substituci? inv?lida: no existeix '%s' en %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: no es pot assignar la llista a un element de la matriu"
+
+#: subst.c:4754 subst.c:4770
+#, fuzzy
+msgid "cannot make pipe for process substitution"
+msgstr "no es pot establir un conducte per a la substituci? del proc?s: %s"
+
+#: subst.c:4802
+#, fuzzy
+msgid "cannot make child for process substitution"
+msgstr "no es pot establir un proc?s fill per a la substituci? del proc?s: %s"
+
+#: subst.c:4847
+#, fuzzy, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "no es pot obrir el conducte anomenat %s per a %s: %s"
+
+#: subst.c:4849
+#, fuzzy, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "no es pot obrir el conducte anomenat %s per a %s: %s"
+
+#: subst.c:4867
+#, fuzzy, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr ""
+"no es pot duplicar el conducte anomenat %s\n"
+"com a descripci? de fitxer %d: %s"
+
+#: subst.c:5063
+#, fuzzy
+msgid "cannot make pipe for command substitution"
+msgstr "no es poden establir conductes per a la substituci? de l'ordre: %s"
+
+#: subst.c:5097
+#, fuzzy
+msgid "cannot make child for command substitution"
+msgstr "no es pot crear un proc?s fill per a la substituci? del proc?s: %s"
+
+#: subst.c:5114
+#, fuzzy
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr ""
+"command_substitute(): el coducte no es pot duplicar\n"
+"com a descripci? de fitxer 1: %s"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: par?metre nul o no ajustat"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: la sub-cadena de l'expressi? ?s < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: substituci? inv?lida"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: no es pot assignar d'aquesta manera"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, fuzzy, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "substituci? inv?lida: no existeix '%s' en %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr ""
+
+#: test.c:146
+msgid "argument expected"
+msgstr "s'esperava un par?metre"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: s'esperava una expressi? de nombre enter"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "s'esperava ')'"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "mentre es buscava ?)?, s'ha trobat %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: s'esperava un operador unari"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: s'esperava un operador binari"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "s'ha perdut algun ']'"
+
+#: trap.c:203
+#, fuzzy
+msgid "invalid signal number"
+msgstr "n?mero inv?lid de senyal"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr ""
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+
+#: trap.c:380
+#, fuzzy, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: Senyal inv?lida %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "'%s': error en importar la definici? de la funci?"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr ""
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr ""
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr ""
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: par?metre nul o no ajustat"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr ""
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr ""
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr ""
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: no es pot crear: %s"
+
+#: variables.c:4683
+#, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr ""
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr ""
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: version.c:86 version2.c:83
+#, fuzzy, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU %s, versi? %s\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+
+#: version2.c:86
+#, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr ""
+
+#: version2.c:87
+#, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: no es poden assignar %lu octets (%lu octets assignats)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: no es poden assignar %lu octets (%lu octets assignats)"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: no es poden assignar %lu octets (%lu octets assignats)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: no es poden assignar %lu octets (%lu octets assignats)"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [nom[=valor] ... ]"
+
+#: builtins.c:47
+#, fuzzy
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] [nom ...]"
+
+#: builtins.c:51
+#, fuzzy
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+"bind [-lpvsPVS] [-m keymap] [-f fitxer] [-q nom] [-r keyseq] [keyseq:funci?-"
+"readline] "
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [n]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [n]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [ordre-interna [arg ...]]"
+
+#: builtins.c:61
+#, fuzzy
+msgid "caller [expr]"
+msgstr "test [expressi?]"
+
+#: builtins.c:64
+#, fuzzy
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-PL] [directori]"
+
+#: builtins.c:66
+#, fuzzy
+msgid "pwd [-LP]"
+msgstr "pwd [-PL]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr ""
+
+#: builtins.c:72
+msgid "false"
+msgstr ""
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] ordre [par?metre ...]"
+
+#: builtins.c:76
+#, fuzzy
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-afFrxi] [-p] nom[=valor] ..."
+
+#: builtins.c:78
+#, fuzzy
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-afFrxi] [-p] nom[=valor] ..."
+
+#: builtins.c:80
+#, fuzzy
+msgid "local [option] name[=value] ..."
+msgstr "local nom[=valor] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [par?metre ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [par?metre ...]"
+
+#: builtins.c:90
+#, fuzzy
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-pnds] [-a] [-f fitxer] [nom ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [par?metre ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts cadena_opcions nom [par?metre]"
+
+#: builtins.c:96
+#, fuzzy
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a nom] fitxer [redireccionament ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [n]"
+
+#: builtins.c:100
+#, fuzzy
+msgid "logout [n]"
+msgstr "fi de sessi?"
+
+#: builtins.c:103
+#, fuzzy
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+"fc [-e nom_e] [-nlr] [primer] [darrer]\n"
+"o\n"
+"fc -s [patr?=rep] [ordre]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [id_tasca]"
+
+#: builtins.c:111
+#, fuzzy
+msgid "bg [job_spec ...]"
+msgstr "bg [id_tasca]"
+
+#: builtins.c:114
+#, fuzzy
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-r] [-p cam?] [nom ...]"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "help [patr? ...]"
+
+#: builtins.c:121
+#, fuzzy
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [n]\n"
+"o\n"
+"history -awrn [fitxer]\n"
+"o\n"
+"history -ps par?metre [par?metre...]"
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr ""
+"jobs [-lnprs] [id_tasca ...]\n"
+"o\n"
+"jobs -x ordre [par?metres]"
+
+#: builtins.c:129
+#, fuzzy
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [id_tasca ...]"
+
+#: builtins.c:132
+#, fuzzy
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s id_senyal | -n n?m_senyal | -id_senyal] [id_proc?s | tasca]...\n"
+"o\n"
+"kill -l [id_senyal]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let par?metres [par?metres ...]"
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+#, fuzzy
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o opci?] [par?metres ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [nom ...]"
+
+#: builtins.c:144
+#, fuzzy
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr ""
+"export [-nf] [nom ...]\n"
+"o\n"
+"export -p"
+
+#: builtins.c:146
+#, fuzzy
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr ""
+"readonly [-anf] [nom ...]\n"
+"o\n"
+"readonly -p"
+
+#: builtins.c:148
+#, fuzzy
+msgid "shift [n]"
+msgstr "exit [n]"
+
+#: builtins.c:150
+#, fuzzy
+msgid "source filename [arguments]"
+msgstr "nom del fitxer d'origen"
+
+#: builtins.c:152
+#, fuzzy
+msgid ". filename [arguments]"
+msgstr ". nom del fitxer"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [expressi?]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ par?metres... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "times"
+
+#: builtins.c:164
+#, fuzzy
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr ""
+"trap [par?metres] [id_senyal], o \n"
+"trap -l"
+
+#: builtins.c:166
+#, fuzzy
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-apt] nom [nom ...]"
+
+#: builtins.c:169
+#, fuzzy
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdfmstpnuv] [l?mit]"
+
+#: builtins.c:172
+#, fuzzy
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-S] [mode]"
+
+#: builtins.c:175
+#, fuzzy
+msgid "wait [id]"
+msgstr "wait [n]"
+
+#: builtins.c:179
+#, fuzzy
+msgid "wait [pid]"
+msgstr "wait [n]"
+
+#: builtins.c:182
+#, fuzzy
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for NOM [in PARAULES ... ;] do ORDRES; done"
+
+#: builtins.c:184
+#, fuzzy
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for NOM [in PARAULES ... ;] do ORDRES; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select NOM [in PARAULES ... ;] do ORDRES; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr ""
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case PARAULES in [PATR? [| PATR?]...) ORDRES ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if ORDRES; then ORDRES; [ elif ORDRES; then ORDRES; ]... [ else ORDRES; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while ORDRES; do ORDRES; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until ORDRES; do ORDRES; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr ""
+
+#: builtins.c:200
+#, fuzzy
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "function NOM { ORDRES ; } or NOM () { ORDRES ; }"
+
+#: builtins.c:202
+#, fuzzy
+msgid "{ COMMANDS ; }"
+msgstr "{ ORDRES }"
+
+#: builtins.c:204
+#, fuzzy
+msgid "job_spec [&]"
+msgstr "fg [id_tasca]"
+
+#: builtins.c:206
+#, fuzzy
+msgid "(( expression ))"
+msgstr "s'esperava una expressi?"
+
+#: builtins.c:208
+#, fuzzy
+msgid "[[ expression ]]"
+msgstr "s'esperava una expressi?"
+
+#: builtins.c:210
+#, fuzzy
+msgid "variables - Names and meanings of some shell variables"
+msgstr "Es permeten les variables de l'int?rpret d'ordres com a operands. El"
+
+#: builtins.c:213
+#, fuzzy
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [directori | +N | -N] [-n]"
+
+#: builtins.c:217
+#, fuzzy
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [+N | -N] [-n]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+#, fuzzy
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o opci?_format_llarg] nom_opci? [nom_opci?...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr ""
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "type [-apt] nom [nom ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+
+#: builtins.c:276
+#, fuzzy
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Es treuen NOMs de la llista de les definicions d'?lies. Si s'especifica"
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:326
+#, fuzzy
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr "Repr?n la seg?ent iteraci? del bucle envoltant FOR, WHILE, o UNTIL."
+
+#: builtins.c:338
+#, fuzzy
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr "Repr?n la seg?ent iteraci? del bucle envoltant FOR, WHILE, o UNTIL."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+
+#: builtins.c:428
+#, fuzzy
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr "Cap efecte; no es fa res. Es retorna amb el codi zero com a eixida."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+#: builtins.c:689
+#, fuzzy
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr "Finalitza l'int?rpret d'ordres amb l'estat d'N. Si s'ometeix N,"
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+
+#: builtins.c:738
+#, fuzzy
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr "Ubica la ID_TASCA en primer pla, i l'activa com a la tasca actual."
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+
+#: builtins.c:966
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+
+#: builtins.c:1299
+#, fuzzy
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"par?metre ha de ser el signe \"]\" perqu? es puga tancar l'expressi? que\n"
+"comen?a pel signe \"[\"."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+
+#: builtins.c:1551
+#, fuzzy
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr "Executa selectivament les ordres especificades en ORDRES seguint una "
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1580
+#, fuzzy
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Expandeix i executa les ordres especificades en ORDRES i els executa\n"
+"de tal manera que la darrera ordre"
+
+#: builtins.c:1592
+#, fuzzy
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Expandeix i executa les ordres especificades en ORDRES i els executa\n"
+"de tal manera que la darrera ordre"
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+
+#: builtins.c:1632
+#, fuzzy
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr "Executa un conjunt d'ordres en un grup. A?? ?s una manera de"
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: no es poden reassignar %lu octets (%lu octets reassignats)"
+
+#, fuzzy
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr ""
+#~ "xrealloc: no es poden reassignar %lu octets (%lu octets reassignats)"
+
+#, fuzzy
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: no es poden reassignar %lu octets (%lu octets reassignats)"
+
+#~ msgid "Display the list of currently remembered directories. Directories"
+#~ msgstr ""
+#~ "Mostra la llista dels directoris actualment recordats. Els directoris "
+
+#~ msgid "find their way onto the list with the `pushd' command; you can get"
+#~ msgstr "troben el seu cam? en la llista amb l'ordre ?pushd?; podeu anar cap"
+
+#~ msgid "back up through the list with the `popd' command."
+#~ msgstr "endarrere a trav?s de la llista amb l'ordre ?popd?."
+
+#~ msgid ""
+#~ "The -l flag specifies that `dirs' should not print shorthand versions"
+#~ msgstr ""
+#~ "Si s'especifica el senyalador \"-l\" no es mostrar? la forma abreviada"
+
+#~ msgid ""
+#~ "of directories which are relative to your home directory. This means"
+#~ msgstr "dels directoris que estiguen relacionats amb el vostre directori"
+
+#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag"
+#~ msgstr "d'usuari. Aix? vol dir que ?~/bin? pot ser exhibit com"
+
+#~ msgid "causes `dirs' to print the directory stack with one entry per line,"
+#~ msgstr ""
+#~ "?/home/bfox/bin?. Amb el senyalador \"-v\" l'ordre ?dirs? mostrar? la"
+
+#~ msgid ""
+#~ "prepending the directory name with its position in the stack. The -p"
+#~ msgstr ""
+#~ "pila de directoris amb una l?nia per a cada entrada, afegint el nom de"
+
+#~ msgid "flag does the same thing, but the stack position is not prepended."
+#~ msgstr "directori amb la seua posici? en la pila. Amb el senyalador \"-p\""
+
+#~ msgid ""
+#~ "The -c flag clears the directory stack by deleting all of the elements."
+#~ msgstr ""
+#~ "esdevindr? el mateix, per? no mostrar? les posicions. El senyalador\n"
+#~ "\"-c\" buidar? la pila de directoris esborrant tots els seus elements."
+
+#, fuzzy
+#~ msgid ""
+#~ "+N displays the Nth entry counting from the left of the list shown by"
+#~ msgstr ""
+#~ "+N\texhibeix l'entrada N?sima comptant des de l'esquerra de la llista "
+
+#, fuzzy
+#~ msgid " dirs when invoked without options, starting with zero."
+#~ msgstr ""
+#~ "\tmostrada per ?dirs? quan se l'invoca sense opcions, comen?ant per\n"
+#~ "\tzero."
+
+#, fuzzy
+#~ msgid ""
+#~ "-N displays the Nth entry counting from the right of the list shown by"
+#~ msgstr ""
+#~ "-N\texhibeix l'entrada N?sima comptant des de la dreta de la llista "
+
+#~ msgid "Adds a directory to the top of the directory stack, or rotates"
+#~ msgstr ""
+#~ "Afegeix un directori en el principi de la pila de dicrectoris, o gira "
+
+#~ msgid "the stack, making the new top of the stack the current working"
+#~ msgstr ""
+#~ "la pila fent que el primer directori de la pila siga l'actual. Sense"
+
+#~ msgid "directory. With no arguments, exchanges the top two directories."
+#~ msgstr "cap par?metre, intercanvia els dos primers directoris."
+
+#, fuzzy
+#~ msgid "+N Rotates the stack so that the Nth directory (counting"
+#~ msgstr ""
+#~ "+N\tGira la pila de tal manera que el directori N?sim (comptant des de"
+
+#, fuzzy
+#~ msgid " from the left of the list shown by `dirs', starting with"
+#~ msgstr "\tl'esquerra de la llista mostrada per \"dirs\") ?s al principi."
+
+#, fuzzy
+#~ msgid " zero) is at the top."
+#~ msgstr "\tla dreta) ?s el primer."
+
+#, fuzzy
+#~ msgid "-N Rotates the stack so that the Nth directory (counting"
+#~ msgstr ""
+#~ "-N\tGira la pila de tal manera que el directori N?sim (comptant des de "
+
+#, fuzzy
+#~ msgid " from the right of the list shown by `dirs', starting with"
+#~ msgstr "\tl'esquerra de la llista mostrada per \"dirs\") ?s al principi."
+
+#, fuzzy
+#~ msgid "-n suppress the normal change of directory when adding directories"
+#~ msgstr ""
+#~ "-n\tsuprimeix el canvi normal de directori quan se'n afegeix a la pila, "
+
+#, fuzzy
+#~ msgid " to the stack, so only the stack is manipulated."
+#~ msgstr "\tde tal manera que nom?s es manipula la pila."
+
+#, fuzzy
+#~ msgid "dir adds DIR to the directory stack at the top, making it the"
+#~ msgstr ""
+#~ "dir\tafegeix DIR a la pila de directoris al principi, de tal manera que "
+
+#, fuzzy
+#~ msgid " new current working directory."
+#~ msgstr "\taquest ser? el nou directori actual de treball."
+
+#~ msgid "You can see the directory stack with the `dirs' command."
+#~ msgstr "Podeu comprovar la pila de directori amb l'ordre ?dirs?."
+
+#~ msgid "Removes entries from the directory stack. With no arguments,"
+#~ msgstr "Esborra entrades de la pila de directoris. Sense cap par?metre,"
+
+#~ msgid "removes the top directory from the stack, and cd's to the new"
+#~ msgstr "esborra el primer directori de la pila, i canvia el directori a la"
+
+#~ msgid "top directory."
+#~ msgstr "seguent entrada de la pila (o sia, la nova primera entrada)."
+
+#, fuzzy
+#~ msgid "+N removes the Nth entry counting from the left of the list"
+#~ msgstr "+N\ttreu l'entrada N?sima comptant des de l'esquerra de la llista"
+
+#, fuzzy
+#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'"
+#~ msgstr "\tmostrada per ?dirs?, comen?ant per zero. Per exemple: ?popd +0?"
+
+#, fuzzy
+#~ msgid " removes the first directory, `popd +1' the second."
+#~ msgstr "\ttreu el primer directori, ?popd +1? el segon, etc..."
+
+#, fuzzy
+#~ msgid "-N removes the Nth entry counting from the right of the list"
+#~ msgstr "-N\ttreu l'entrada N?sima comptant des de la dreta de la llista"
+
+#, fuzzy
+#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'"
+#~ msgstr ""
+#~ "\tmostrada per ?dirs?, comen?ant per zero. Per exemple: ?popd -0? treu"
+
+#, fuzzy
+#~ msgid " removes the last directory, `popd -1' the next to last."
+#~ msgstr "\tel darrer directori, ?popd -1? treu el pen?ltim, etc..."
+
+#, fuzzy
+#~ msgid ""
+#~ "-n suppress the normal change of directory when removing directories"
+#~ msgstr ""
+#~ "-n\tsuprimeix el canvi normal de directori quan es treu cap directori "
+
+#, fuzzy
+#~ msgid " from the stack, so only the stack is manipulated."
+#~ msgstr "\tde la pila, de tal manera que nom?s es manipula la pila."
+
+#, fuzzy
+#~ msgid ""
+#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n"
+#~ " break N levels."
+#~ msgstr "Ix d'un bucle FOR, WHILE o UNTIL."
+
+#~ msgid "Obsolete. See `declare'."
+#~ msgstr "Obsoleta. Llegiu ?declare?."
+
+#~ msgid ""
+#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed."
+#~ msgstr ""
+#~ "Mostra els PAR?METREs. Si especifiqueu -n, se suprimir? el car?cter\n"
+#~ "d'inici de l?nia."
+
+#~ msgid ""
+#~ "Read ARGs as input to the shell and execute the resulting command(s)."
+#~ msgstr ""
+#~ "Llegeix els PAR?METRES a l'entrada de l'int?rpret d'ordres i executa les\n"
+#~ "ordres resultants."
+
+#~ msgid "Logout of a login shell."
+#~ msgstr "Finalitzar una sessi? de l'int?rpret d'ordres."
+
+#, fuzzy
+#~ msgid ""
+#~ "Causes a function to exit with the return value specified by N. If N\n"
+#~ " is omitted, the return status is that of the last command."
+#~ msgstr ""
+#~ "Provoca l'eixida d'una funci? amb un valor de retorn especificat per"
+
+#, fuzzy
+#~ msgid ""
+#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is\n"
+#~ " not given, it is assumed to be 1."
+#~ msgstr ""
+#~ "Es reanomenen els par?metres posicionals des de $N+1 ... com a $1 ... "
+
+#, fuzzy
+#~ msgid ""
+#~ "Print the accumulated user and system times for processes run from\n"
+#~ " the shell."
+#~ msgstr ""
+#~ "Mostra el temps acumulat per l'usuari i pel sistema d'haver executat "
+
+#~ msgid "Missing `}'"
+#~ msgstr "S'ha perdut '}'"
+
+#~ msgid "brace_expand> "
+#~ msgstr "clau_expansi?> "
+
+# Ac? vaig tindre dubtes sobre quina paraula fer servir
+# per al terme "command". Mirant-me el diccionari auxiliar
+# de Sebasti? Pla i Sanz, traductor del KDE, vaig trobar-ne tres
+# de traduccions: ordre, comandament, i comanda. I vaig triar
+# la paraula "comanda".
+#
+# No obstant aix?, no s? si la paraula "command" pot traduir-se
+# tamb? amb els altres termes depenent del context. Reviseu
+# sobre el terme "comanda".
+# Mtx (12/10/2002).
+#
+# Llegint al TERMCAT, la paraula "comanda" no apareix enlloc. Al glossari
+# de termes del Softcatal? si hi apareix. Encara no ho tinc clar. Mentre
+# m'informe una mica m?s, per?, ho deixar? com a "ordre", tal com ho
+# heu fet fins ara. El problema que t? el TERMCAT, a la meua opini?, ?s
+# que s'apropa massa a l'espanyol. No en tinc res en contra d'aquesta
+# llengua, per? algunes traduccions en catal?, per exemple, basant-se
+# en l'espanyol, em semblen poc naturals, i n'he trobat d'altres basats
+# en el franc?s que s? me'n semblen m?s naturals.
+# Mtx (15/10/2002)
+#~ msgid "Attempt to free unknown command type `%d'.\n"
+#~ msgstr "Intenteu lliurar l'ordre de mena desconeguda '%d'.\n"
+
+#~ msgid "Report this to %s\n"
+#~ msgstr "Informeu d'aix? a %s\n"
+
+#~ msgid "Stopping myself..."
+#~ msgstr "Aturant-me..."
+
+#~ msgid "Tell %s to fix this someday.\n"
+#~ msgstr "Digueu a %s que solucione aix? algun dia.\n"
+
+#~ msgid "execute_command: bad command type `%d'"
+#~ msgstr "ordre_execuci?: el tipus d'ordre ?s inv?lid '%d'"
+
+#~ msgid "real\t"
+#~ msgstr "real\t"
+
+#~ msgid "user\t"
+#~ msgstr "usuari\t"
+
+#~ msgid "sys\t"
+#~ msgstr "sistema\t"
+
+#~ msgid ""
+#~ "real\t0m0.00s\n"
+#~ "user\t0m0.00s\n"
+#~ "sys\t0m0.00s\n"
+#~ msgstr ""
+#~ "real\t0m0.00s\n"
+#~ "usuari\t0m0.00s\n"
+#~ "sistema\t0m0.00s\n"
+
+#~ msgid "cannot duplicate fd %d to fd 1: %s"
+#~ msgstr ""
+#~ "no es pot copiar per duplicat el descriptor del fitxer df %d cap a df 1: %"
+#~ "s"
+
+#~ msgid "%s: output redirection restricted"
+#~ msgstr "%s: redirecci? d'eixida restringida"
+
+#~ msgid "Out of memory!"
+#~ msgstr "Mem?ria esgotada!"
+
+#~ msgid "You have already added item `%s'\n"
+#~ msgstr "Ja hi heu afegit l'element: '%s'\n"
+
+#~ msgid "You have entered %d (%d) items. The distribution is:\n"
+#~ msgstr "Heu introdu?t %d (%d) elements. La distribuci? ?s:\n"
+
+#~ msgid "%s: bg background job?"
+#~ msgstr "%s: suggeriment: voleu executar 'bg' en segon pla?"
+
+#~ msgid ""
+#~ "Redirection instruction from yyparse () '%d' is\n"
+#~ "out of range in make_redirection ()."
+#~ msgstr ""
+#~ "La instrucci? de redirecci? de la funci? yyparse () '%d' ?s fora\n"
+#~ "de l'interval en la funci? make_redirection()."
+
+#~ msgid "clean_simple_command () got a command with type %d."
+#~ msgstr "clean_simple_command () heu rebut un ordre del tipus %d."
+
+#~ msgid "got errno %d while waiting for %d"
+#~ msgstr "s'ha rebut l'error %d mentre s'esperava per %d"
+
+#~ msgid "syntax error near unexpected token `%c'"
+#~ msgstr "hi ha un error inesperat de sintaxi a prop del senyal '%c'"
+
+#~ msgid "print_command: bad command type `%d'"
+#~ msgstr "print_command: tipus d'ordre inv?lid '%d'"
+
+#~ msgid "cprintf: bad `%%' argument (%c)"
+#~ msgstr "crintf: el par?metre '%%' de l'opci? %c ?s inv?lid"
+
+#~ msgid "option `%s' requires an argument"
+#~ msgstr "l'opci? '%s' requereix un par?metre"
+
+#~ msgid "%s: unrecognized option"
+#~ msgstr "%s: l'opci? no ?s reconeguda"
+
+#~ msgid "`-c' requires an argument"
+#~ msgstr "'-c' requereix un par?metre"
+
+#~ msgid "%s: cannot execute directories"
+#~ msgstr "%s: no es poden executar els directoris"
+
+#~ msgid "Bad code in sig.c: sigprocmask"
+#~ msgstr "Codi incorrecte a la rutina sig.c: sigprocmask"
+
+#~ msgid "bad substitution: no ending `}' in %s"
+#~ msgstr "substituci? inv?lida: no s'ha tancat %s amb cap '}'"
+
+#~ msgid "%s: bad array subscript"
+#~ msgstr "%s: la composici? de la matriu no ?s v?lida"
+
+#~ msgid "can't make pipes for process substitution: %s"
+#~ msgstr "no es poden establir conductes per a la substituci? del proc?s: %s"
+
+#~ msgid "reading"
+#~ msgstr "s'est? llegint"
+
+#~ msgid "process substitution"
+#~ msgstr "proc?s de substituci? en curs"
+
+#~ msgid "command substitution"
+#~ msgstr "substituci? de l'ordre"
+
+#~ msgid "Can't reopen pipe to command substitution (fd %d): %s"
+#~ msgstr ""
+#~ "El conducte no es pot reobrir per a substituir\n"
+#~ "l'ordre (descripci? de fitxer%d): %s"
+
+#~ msgid "$%c: unbound variable"
+#~ msgstr "$%c: variable sense vincle"
+
+#~ msgid "%s: bad arithmetic substitution"
+#~ msgstr "%s: substituci? aritm?tica inv?lida"
+
+#~ msgid "-%s: binary operator expected"
+#~ msgstr "-%s: s'esperava un operador binari"
+
+#~ msgid "%s[%s: bad subscript"
+#~ msgstr "%s[%s: sub-?ndex inv?lid"
+
+#~ msgid "[%s: bad subscript"
+#~ msgstr "[%s: sub-?ndex inv?lid"
+
+#~ msgid "digits occur in two different argv-elements.\n"
+#~ msgstr "les xifres apareixen dins de dos par?metres diferents.\n"
+
+#~ msgid "option %c\n"
+#~ msgstr "opci? %c\n"
+
+#~ msgid "option a\n"
+#~ msgstr "opci? a\n"
+
+#~ msgid "option b\n"
+#~ msgstr "opci? b\n"
+
+#~ msgid "option c with value `%s'\n"
+#~ msgstr "opci? c amb el valor ?%s?\n"
+
+#~ msgid "?? sh_getopt returned character code 0%o ??\n"
+#~ msgstr "sh_getopt() retorn? 0%o com a codi de car?cter??\n"
+
+#~ msgid "non-option ARGV-elements: "
+#~ msgstr "elements d'ARGV que no s?n opcions: "
+
+#~ msgid "%s: Unknown flag %s.\n"
+#~ msgstr "%s: Senyalador desconegut %s.\n"
+
+#~ msgid "Unknown directive `%s'"
+#~ msgstr "Directiva desconeguda ?%s?"
+
+#~ msgid "%s requires an argument"
+#~ msgstr "%s cal un par?metre"
+
+#~ msgid "%s must be inside of a $BUILTIN block"
+#~ msgstr "%s ha d'estar dins d'un bloc $BUILTIN"
+
+#~ msgid "%s found before $END"
+#~ msgstr "%s trobat abans de $END"
+
+#~ msgid "%s already has a function (%s)"
+#~ msgstr "%s ja cont? la funci? definida: %s"
+
+#~ msgid "%s already had a docname (%s)"
+#~ msgstr "%s ja t? un nom de document (%s)"
+
+#~ msgid "%s already has short documentation (%s)"
+#~ msgstr "%s ja t? una documentaci? r?pida (%s)"
+
+#~ msgid "%s already has a %s definition"
+#~ msgstr "%s ja t? una definici? %s"
+
+#~ msgid "mkbuiltins: Out of virtual memory!\n"
+#~ msgstr "mkbuiltins(): S'ha esgotat la mem?ria virtual!\n"
+
+# Tot i que no he trobat cap traducci? t?cnica oficial al TERMCAT
+# crec que la traducci? de "prompt" com a "apuntador" ?s prou
+# ilustratiu i significatiu per al context, no?.
+#~ msgid "read [-r] [-p prompt] [-a array] [-e] [name ...]"
+#~ msgstr "read [-r] [-p apuntador] [-a matriu] [-e] [nom ...]"
+
+#~ msgid "%[DIGITS | WORD] [&]"
+#~ msgstr "%[XIFRES | PARAULES] [&]"
+
+#~ msgid "variables - Some variable names and meanings"
+#~ msgstr "variables - Algunes variables i els seus significats"
+
+#~ msgid "`alias' with no arguments or with the -p option prints the list"
+#~ msgstr ""
+#~ "Si 'alias' no porta arguments o porta l'opci? -p es mostra la llista"
+
+#~ msgid "of aliases in the form alias NAME=VALUE on standard output."
+#~ msgstr "d'?lies en la forma 'alias NOM=VALOR' en l'eixida per defecte."
+
+#~ msgid "Otherwise, an alias is defined for each NAME whose VALUE is given."
+#~ msgstr ""
+#~ "Altrament, es defineix un ?lies per cada NOM que en d?na el seu VALOR."
+
+#~ msgid "A trailing space in VALUE causes the next word to be checked for"
+#~ msgstr ""
+#~ "Un salt de l?nia dins del VALOR for?a la substituci? de la seg?ent "
+#~ "paraula per"
+
+#~ msgid "alias substitution when the alias is expanded. Alias returns"
+#~ msgstr "substituci? de l'?lies quan aquest s'hi expandeix. L'?lies torna"
+
+#~ msgid "true unless a NAME is given for which no alias has been defined."
+#~ msgstr ""
+#~ "cert almenys que es d?ne un NOM pel qual no s'haja estat definit cap ?"
+#~ "lies."
+
+#~ msgid "then remove all alias definitions."
+#~ msgstr "l'opci? -a, aleshores se suprimeixen totes les definicions."
+
+#~ msgid "Bind a key sequence to a Readline function, or to a macro. The"
+#~ msgstr ""
+#~ "Vincula una seq??ncia de tecles cap una funci? de lectura, o a una macro."
+
+#~ msgid "syntax is equivalent to that found in ~/.inputrc, but must be"
+#~ msgstr ""
+#~ "La sintaxi ?s equivalent al que es troba a ~/.inputrc, per? ha s'ha de fer"
+
+#~ msgid ""
+#~ "passed as a single argument: bind '\"\\C-x\\C-r\": re-read-init-file'."
+#~ msgstr ""
+#~ "el pas com a ?nic par?metre: bind '\"\\C-x\\C-r\": re-read-init-file'."
+
+#~ msgid "Arguments we accept:"
+#~ msgstr "Els par?metres acceptats s?n:"
+
+#~ msgid ""
+#~ " -m keymap Use `keymap' as the keymap for the duration of this"
+#~ msgstr ""
+#~ " -m mapa_tecles Fa servir 'keymap' com el mapa de car?cters "
+#~ "durant"
+
+#~ msgid " command. Acceptable keymap names are emacs,"
+#~ msgstr ""
+#~ " l'execuci? d'aquest ordre. S'accepten els noms emacs,"
+
+#~ msgid ""
+#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,"
+#~ msgstr ""
+#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,"
+
+#~ msgid " vi-command, and vi-insert."
+#~ msgstr " vi-command, i vi-insert."
+
+#~ msgid " -l List names of functions."
+#~ msgstr " -l Mostra la llista de noms de les funcions."
+
+#~ msgid " -P List function names and bindings."
+#~ msgstr ""
+#~ " -P Mostra la llista de noms i vincles de les funcions."
+
+#~ msgid ""
+#~ " -p List functions and bindings in a form that can be"
+#~ msgstr ""
+#~ " -p Mostra la llista de funcions i vincles d'una manera"
+
+#~ msgid " reused as input."
+#~ msgstr ""
+#~ " que puga ser reutilitzada com a entrada de dades."
+
+#~ msgid " -r keyseq Remove the binding for KEYSEQ."
+#~ msgstr ""
+#~ " -r seq??ncia_tecles Treu els vincles de la seq??ncia de tecles."
+
+#~ msgid " -f filename Read key bindings from FILENAME."
+#~ msgstr " -f fitxer Llegeix les assignacions de tecles d'un fitxer."
+
+#~ msgid ""
+#~ " -q function-name Query about which keys invoke the named function."
+#~ msgstr ""
+#~ " -q nom_funci? Consultar quines tecles invoquen la funci? demanada."
+
+#~ msgid " -V List variable names and values"
+#~ msgstr ""
+#~ " -V Mostra la llista de noms i valors de les variables."
+
+#~ msgid ""
+#~ " -v List variable names and values in a form that can"
+#~ msgstr ""
+#~ " -v Mostra la llista de noms i valors de variables de "
+#~ "manera"
+
+#~ msgid " be reused as input."
+#~ msgstr ""
+#~ " que puga ser reutilitzada com a entrada de dades."
+
+#~ msgid ""
+#~ " -S List key sequences that invoke macros and their "
+#~ "values"
+#~ msgstr ""
+#~ " -S Mostra la llista de seq??ncies de tecles que criden\n"
+#~ " macros i els seus valors."
+
+#~ msgid ""
+#~ " -s List key sequences that invoke macros and their "
+#~ "values in"
+#~ msgstr ""
+#~ " -s Mostra la llista de seq??ncies de tecles que criden"
+
+#~ msgid " a form that can be reused as input."
+#~ msgstr ""
+#~ " macros i els seus valors de manera que puga ser\n"
+#~ " reutilitzada com a entrada de dades."
+
+#~ msgid "break N levels."
+#~ msgstr "Si s'especifica N, s'ix despr?s de N iteracions."
+
+#~ msgid "If N is specified, resume at the N-th enclosing loop."
+#~ msgstr "Si s'especifica N, es repr?n el bucle al N-?sim cicle."
+
+#~ msgid "Run a shell builtin. This is useful when you wish to rename a"
+#~ msgstr ""
+#~ "Executa una ordre integrada de l'int?rpret. Aix? ?s ?til quan desitgeu"
+
+#~ msgid "shell builtin to be a function, but need the functionality of the"
+#~ msgstr ""
+#~ "renomenar una ordre integrada de l'int?rpret perqu? siga una funci?, per?"
+
+#~ msgid "builtin within the function itself."
+#~ msgstr "cal la funcionalitat de l'ordre integrada dins de la pr?pia funci?."
+
+#~ msgid "Change the current directory to DIR. The variable $HOME is the"
+#~ msgstr "Fa servir DIR com el directori actual. La variable $HOME ?s el"
+
+#~ msgid "default DIR. The variable $CDPATH defines the search path for"
+#~ msgstr ""
+#~ "valor per defecte de DIR. La variable $CDPATH defineix el cam? de recerca"
+
+#~ msgid "the directory containing DIR. Alternative directory names in CDPATH"
+#~ msgstr ""
+#~ "per al directori que cont? DIR. Els noms de directoris alternatius que "
+#~ "hi ha"
+
+#~ msgid "are separated by a colon (:). A null directory name is the same as"
+#~ msgstr ""
+#~ "en CDPATH s?n separats per dos punts. Un nom buit de directori ?s el "
+#~ "mateix"
+
+#~ msgid "the current directory, i.e. `.'. If DIR begins with a slash (/),"
+#~ msgstr ""
+#~ "que el directori actual, p.e. ?.?. Si es comen?a en DIR amb una barra "
+#~ "(/),"
+
+#~ msgid "then $CDPATH is not used. If the directory is not found, and the"
+#~ msgstr ""
+#~ "aleshores no es fa servir $CDPATH. Si no es troba el directori, i l'opci?"
+
+#~ msgid "shell option `cdable_vars' is set, then try the word as a variable"
+#~ msgstr ""
+#~ "de l'int?rpret ?cdable_vars? ?s activa, aleshores intenta fer servir la"
+
+#~ msgid "name. If that variable has a value, then cd to the value of that"
+#~ msgstr ""
+#~ "paraula com a nom de variable. Si aquesta variable ja tenia un valor,"
+
+#~ msgid ""
+#~ "variable. The -P option says to use the physical directory structure"
+#~ msgstr "aleshores es canvia al directori d'aquest valor. L'opci? -P indica"
+
+#~ msgid ""
+#~ "instead of following symbolic links; the -L option forces symbolic links"
+#~ msgstr ""
+#~ "l'emprament de l'estructura f?sica del directori en voltes d'enlla?os"
+
+#~ msgid "to be followed."
+#~ msgstr "simb?lics; l'opci? -L for?a el seguiment d'enlla?os simb?lics."
+
+#~ msgid "Print the current working directory. With the -P option, pwd prints"
+#~ msgstr ""
+#~ "Mostra el directori actual de treball. Amb l'opci? -P, pwd mostra el"
+
+#~ msgid "the physical directory, without any symbolic links; the -L option"
+#~ msgstr ""
+#~ "directori f?sic, sense cap enlla? simb?lic; l'opci? -L fa que pwd seguisca"
+
+#~ msgid "makes pwd follow symbolic links."
+#~ msgstr "els enlla?os simb?lics."
+
+#~ msgid ""
+#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell"
+#~ msgstr ""
+#~ "Executa ORDRE amb PAR?METRES ignorant les funcions de l'int?rpret. Si "
+#~ "teniu"
+
+#~ msgid "function called `ls', and you wish to call the command `ls', you can"
+#~ msgstr ""
+#~ "una funci? de l'int?rpret anomenat ?ls?, i desitgeu cridar l'ordre ?ls?,"
+
+#~ msgid ""
+#~ "say \"command ls\". If the -p option is given, a default value is used"
+#~ msgstr ""
+#~ "podeu escriure ?command ls?. Si doneu l'opci? -p, es far? servir un valor"
+
+#~ msgid ""
+#~ "for PATH that is guaranteed to find all of the standard utilities. If"
+#~ msgstr ""
+#~ "per defecte per al PATH, que garanteix la cerca de les eines est?ndard. "
+#~ "Si hi"
+
+#~ msgid ""
+#~ "the -V or -v option is given, a string is printed describing COMMAND."
+#~ msgstr ""
+#~ "indiqueu l'opci? -V o -v, es mostrar? una cadena de text descrivint "
+#~ "l'ORDRE."
+
+#~ msgid "The -V option produces a more verbose description."
+#~ msgstr "L'opci? -V produeix una descripci? m?s acurada."
+
+#~ msgid "Declare variables and/or give them attributes. If no NAMEs are"
+#~ msgstr ""
+#~ "Es declara les variables i/o se'ls d?na atributs. Si no es proporcionen "
+#~ "NOMS,"
+
+#~ msgid "given, then display the values of variables instead. The -p option"
+#~ msgstr ""
+#~ "aleshores mostra els valors de les variables. L'opci? -p mostrar? els"
+
+#~ msgid "will display the attributes and values of each NAME."
+#~ msgstr "atributs i valors de cada NOM."
+
+#~ msgid "The flags are:"
+#~ msgstr "Els senyaladors s?n:"
+
+#~ msgid " -a\tto make NAMEs arrays (if supported)"
+#~ msgstr " -a\tper a fer matrius de NOMS (si n'?s suportat)"
+
+#~ msgid " -f\tto select from among function names only"
+#~ msgstr " -f\ttriar nom?s entre els noms de les funcions"
+
+#~ msgid " -F\tto display function names without definitions"
+#~ msgstr " -F\tmostrar noms de funcions ometent les seues definicions"
+
+#~ msgid " -r\tto make NAMEs readonly"
+#~ msgstr " -r\tblocar l'acc?s d'escriptura de les variables NOMs"
+
+#~ msgid " -x\tto make NAMEs export"
+#~ msgstr " -x\texportar les variables de NOMs"
+
+#~ msgid " -i\tto make NAMEs have the `integer' attribute set"
+#~ msgstr " -i\tactivar l'atribut num?ric enter les variables NOMs"
+
+#~ msgid "Variables with the integer attribute have arithmetic evaluation (see"
+#~ msgstr ""
+#~ "Les variables que tinguen l'atribut num?ric enter tenen feta l'evaluaci?"
+
+#~ msgid "`let') done when the variable is assigned to."
+#~ msgstr "aritm?tica (mirar ?let?) quan se'ls assigna la variable."
+
+#~ msgid "When displaying values of variables, -f displays a function's name"
+#~ msgstr ""
+#~ "Quan es mostra els valors de les variables, amb -f es mostra un nom de "
+#~ "funci?"
+
+#~ msgid "and definition. The -F option restricts the display to function"
+#~ msgstr ""
+#~ "i la definici?. Amb l'opci? -F es limita nom?s en mostrar el nom de la"
+
+#~ msgid "name only."
+#~ msgstr "funci?."
+
+#~ msgid ""
+#~ "Using `+' instead of `-' turns off the given attribute instead. When"
+#~ msgstr ""
+#~ "Emprant \"+\" en voltes de \"-\" desactiva l'atribut especificat. Quan ?s"
+
+#~ msgid "used in a function, makes NAMEs local, as with the `local' command."
+#~ msgstr ""
+#~ "emprat en una funci?, converteix NOMs en variables locals, igual com es "
+#~ "fa\n"
+#~ "amb l'ordre ?local?."
+
+#~ msgid "Create a local variable called NAME, and give it VALUE. LOCAL"
+#~ msgstr ""
+#~ "Es crea una variable local anomenat NOM, i el d?na un VALOR. Nom?s es "
+#~ "pot fer"
+
+#~ msgid "have a visible scope restricted to that function and its children."
+#~ msgstr "variable NOM nom?s per a aquesta funci? i per als seus fills."
+
+#~ msgid "Output the ARGs. If -n is specified, the trailing newline is"
+#~ msgstr ""
+#~ "Mostra els PAR?METREs. Si especifiqueu -n, s'eliminar? el car?cter de "
+#~ "salt"
+
+#~ msgid "suppressed. If the -e option is given, interpretation of the"
+#~ msgstr ""
+#~ "de l?nia. Si especifiqueu l'opci? -e, s'activar? la interpretaci? de les"
+
+#~ msgid "following backslash-escaped characters is turned on:"
+#~ msgstr "seq??ncies d'escapada (barra inclinada inversa):"
+
+#~ msgid "\t\\a\talert (bell)"
+#~ msgstr "\t\\a\talerta (camponada)"
+
+#~ msgid "\t\\b\tbackspace"
+#~ msgstr "\t\\b\tesborrar cap enrere"
+
+#~ msgid "\t\\c\tsuppress trailing newline"
+#~ msgstr "\t\\c\tsuprimeix el car?cter de salt de l?nia"
+
+#~ msgid "\t\\E\tescape character"
+#~ msgstr "\t\\E\tcar?cter d'escapada"
+
+#~ msgid "\t\\f\tform feed"
+#~ msgstr "\t\\f\talimentaci? manual de paper"
+
+#~ msgid "\t\\n\tnew line"
+#~ msgstr "\t\\n\tl?nia nova"
+
+#~ msgid "\t\\r\tcarriage return"
+#~ msgstr "\t\\r\ttecla de retorn de carro"
+
+#~ msgid "\t\\t\thorizontal tab"
+#~ msgstr "\t\\t\tpestanya horitzontal"
+
+#~ msgid "\t\\v\tvertical tab"
+#~ msgstr "\t\\v\tpestanya vertical"
+
+#~ msgid "\t\\\\\tbackslash"
+#~ msgstr "\t\\\\\tbarra invertida"
+
+#~ msgid "\t\\num\tthe character whose ASCII code is NUM (octal)."
+#~ msgstr "\t\\num\tcar?cter del qual codi ASCII ?s NUM (octal)."
+
+#~ msgid ""
+#~ "You can explicitly turn off the interpretation of the above characters"
+#~ msgstr ""
+#~ "Podeu desactivar expl?citament la interpretaci? dels car?cters esmentats "
+#~ "amb"
+
+#~ msgid "with the -E option."
+#~ msgstr "l'opci? -E."
+
+#~ msgid "Enable and disable builtin shell commands. This allows"
+#~ msgstr ""
+#~ "Activa i desactiva les ordres integrades de l'int?rpret d'ordres. A?? us"
+
+#~ msgid "you to use a disk command which has the same name as a shell"
+#~ msgstr ""
+#~ "permet fer servir una ordre de disc que tinga el mateix nom d'una ordre "
+#~ "interna"
+
+#~ msgid "builtin. If -n is used, the NAMEs become disabled; otherwise"
+#~ msgstr ""
+#~ "de l'int?rpret d'ordres. Si utilitzeu -n, els NOMs es desactiven; "
+#~ "altrament"
+
+#~ msgid "NAMEs are enabled. For example, to use the `test' found on your"
+#~ msgstr ""
+#~ "s'activarien els NOMs. Per exemple, per a fer servir l'ordre ?test? del "
+#~ "cam?"
+
+#~ msgid "path instead of the shell builtin version, type `enable -n test'."
+#~ msgstr ""
+#~ "d'acc?s (PATH) en voltes de la versi? integrada de l'int?rpret d'ordres,"
+
+#~ msgid "On systems supporting dynamic loading, the -f option may be used"
+#~ msgstr ""
+#~ "teclegeu ?enable -n test?. En sistemes que suporten c?rrega din?mica, "
+#~ "l'opci?"
+
+#~ msgid "to load new builtins from the shared object FILENAME. The -d"
+#~ msgstr ""
+#~ "-f es pot fer servir per a carregar noves ordres predefinides de l'objecte"
+
+#~ msgid "option will delete a builtin previously loaded with -f. If no"
+#~ msgstr ""
+#~ "de FITXER compartit. L'opci? -d esborrar? una ordre integrada carregada "
+
+#~ msgid "non-option names are given, or the -p option is supplied, a list"
+#~ msgstr ""
+#~ "pr?viament amb -f. Si no s'especifica cap opci?, o s'especifica l'opci? -"
+#~ "p, es"
+
+#~ msgid "of builtins is printed. The -a option means to print every builtin"
+#~ msgstr ""
+#~ "mostra una llista d'ordres predefinides. L'opci? -a implica mostrar cada"
+
+#~ msgid "with an indication of whether or not it is enabled. The -s option"
+#~ msgstr ""
+#~ "ordre integrada amb una indicaci? de si est? activa o no. L'opci? -s "
+#~ "impedeix"
+
+#~ msgid "restricts the output to the Posix.2 `special' builtins. The -n"
+#~ msgstr ""
+#~ "l'eixida de les ordres predefinides \"especials\" Posix.2. L'opci? -n "
+#~ "mostra"
+
+#~ msgid "option displays a list of all disabled builtins."
+#~ msgstr "una llista de totes les funcions internes desactivades."
+
+#~ msgid "Getopts is used by shell procedures to parse positional parameters."
+#~ msgstr ""
+#~ "La funci? getopts() ?s utilitzada pels procediments de l'int?rpret "
+#~ "d'ordres\n"
+#~ "per a analitzar par?metres posicionals."
+
+#~ msgid "OPTSTRING contains the option letters to be recognized; if a letter"
+#~ msgstr ""
+#~ "La variable OPTSTRING cont? les opcions de forma curta per a ser "
+#~ "reconegudes;"
+
+#~ msgid "is followed by a colon, the option is expected to have an argument,"
+#~ msgstr ""
+#~ "si una lletra ?s seguida per dos punts, s'ha de donar un par?metre que "
+#~ "hauria"
+
+#~ msgid "which should be separated from it by white space."
+#~ msgstr "d'estar separat per un espai en blanc."
+
+#~ msgid "Each time it is invoked, getopts will place the next option in the"
+#~ msgstr ""
+#~ "Cada vegada que se'l invoca, ?getops? posar? la seg?ent opci? en la "
+#~ "variable"
+
+#~ msgid "shell variable $name, initializing name if it does not exist, and"
+#~ msgstr ""
+#~ "$name de l'int?rpret d'ordres, creant-lo si no existeix, i l'?ndex del "
+#~ "seg?ent"
+
+#~ msgid "the index of the next argument to be processed into the shell"
+#~ msgstr ""
+#~ "par?metre per a processar-se dins de la variable OPTIND de l'int?rpret"
+
+#~ msgid "variable OPTIND. OPTIND is initialized to 1 each time the shell or"
+#~ msgstr ""
+#~ "d'ordres. OPTIND s'inicia amb 1 cada vegada que s'invoca l'int?rpret "
+#~ "d'ordres"
+
+#~ msgid "a shell script is invoked. When an option requires an argument,"
+#~ msgstr ""
+#~ "o una seq??ncia d'ordres. Quan una opci? requereix un par?metre, la funci?"
+
+#~ msgid "getopts places that argument into the shell variable OPTARG."
+#~ msgstr ""
+#~ "getopts() colžloca aquest par?metre dins de la variable OPTARG de l'int?"
+#~ "rpret."
+
+#~ msgid "getopts reports errors in one of two ways. If the first character"
+#~ msgstr ""
+#~ "La funci? getopts() comunica errors en una de les dues maneres. Si el"
+
+#~ msgid "of OPTSTRING is a colon, getopts uses silent error reporting. In"
+#~ msgstr "primer car?cter de la variable OPSTRING ?s el signe ':', la funci?"
+
+#~ msgid "this mode, no error messages are printed. If an illegal option is"
+#~ msgstr ""
+#~ "getopts() corre silenciosament. D'aquesta manera, no s'imprimir? cap"
+
+#~ msgid "seen, getopts places the option character found into OPTARG. If a"
+#~ msgstr "missatge d'error. Si es troba una opci? incorrecta, la funci?"
+
+#~ msgid "required argument is not found, getopts places a ':' into NAME and"
+#~ msgstr "colžloca aquesta opci? de forma curta dins de la variable OPTARG "
+
+#~ msgid "sets OPTARG to the option character found. If getopts is not in"
+#~ msgstr ""
+#~ "si no es troba un patr?metre esperat, la funci? getopts() introdueix"
+
+#~ msgid "silent mode, and an illegal option is seen, getopts places '?' into"
+#~ msgstr "el signe ':' dins de la variable NAME i estableix el valor de la"
+
+#~ msgid "NAME and unsets OPTARG. If a required option is not found, a '?'"
+#~ msgstr ""
+#~ "variable OPTARG amb l'opci? de forma curta que s'hi haja trobada. Si"
+
+#~ msgid "is placed in NAME, OPTARG is unset, and a diagnostic message is"
+#~ msgstr "la funci? getopts() no est? en mode silenci?s, i s'ha trobat una"
+
+#~ msgid "If the shell variable OPTERR has the value 0, getopts disables the"
+#~ msgstr "Si la variable OPTERR de l'int?rpret d'ordres t? un valor nul, la"
+
+#~ msgid "printing of error messages, even if the first character of"
+#~ msgstr ""
+#~ "funci? getopts() desactiva la impressi? dels missatges d'error, tot i"
+
+#~ msgid "OPTSTRING is not a colon. OPTERR has the value 1 by default."
+#~ msgstr ""
+#~ "que el primer car?cter de OPSTRING no siga el signe ':'. La variable\n"
+#~ "OPTERR t? el valor 1 com a defecte."
+
+#~ msgid "Getopts normally parses the positional parameters ($0 - $9), but if"
+#~ msgstr "La funci? getopts() normalment analitza els par?metres posicionals"
+
+#~ msgid "more arguments are given, they are parsed instead."
+#~ msgstr ""
+#~ "($0-$9), per? si se'n d?na m?s arguments, se'ls analitza en voltes\n"
+#~ "dels posicionals."
+
+#~ msgid "Exec FILE, replacing this shell with the specified program."
+#~ msgstr ""
+#~ "Executa el FITXER, reempla?ant aquest int?rpret d'ordres pel programa."
+
+#~ msgid "If FILE is not specified, the redirections take effect in this"
+#~ msgstr ""
+#~ "especificat. Si no s'especifica FITXER, els redre?aments tindran efecte"
+
+#~ msgid "shell. If the first argument is `-l', then place a dash in the"
+#~ msgstr "en aquest int?rpret d'ordres. Si el primer par?metre ?s \"-l\","
+
+#~ msgid "zeroth arg passed to FILE, as login does. If the `-c' option"
+#~ msgstr "aleshores es reempla?a el par?metre 0 pel signe \"-\" referenciat a"
+
+#~ msgid "is supplied, FILE is executed with a null environment. The `-a'"
+#~ msgstr ""
+#~ "FITXER, com aix? es fa en l'inici de sessi?. Si s'especifica l'opci? \"-c"
+#~ "\","
+
+#~ msgid "option means to make set argv[0] of the executed process to NAME."
+#~ msgstr ""
+#~ "s'executa FITXER en un entorn nul. L'opci? \"-a\" estableix que el\n"
+#~ "proc?s executat portar? aquest NOM."
+
+#~ msgid "If the file cannot be executed and the shell is not interactive,"
+#~ msgstr "Si no es pot executar el fitxer i l'int?rpret d'ordres no ?s"
+
+#~ msgid "then the shell exits, unless the variable \"no_exit_on_failed_exec\""
+#~ msgstr "interactiu, aleshores l'int?rpret finalitza la seua execuci?, a"
+
+#~ msgid "is set."
+#~ msgstr "menys que s'inicialitze la variable \"no_exit_on_failed_exec\"."
+
+#~ msgid "is that of the last command executed."
+#~ msgstr "l'estat d'eixida ?s el darrer ordre executat."
+
+#~ msgid ""
+#~ "FIRST and LAST can be numbers specifying the range, or FIRST can be a"
+#~ msgstr "PRIMER i ?LTIM poden ser n?meros que especifiquen el rang, o PRIMER"
+
+#~ msgid "string, which means the most recent command beginning with that"
+#~ msgstr ""
+#~ "pot ser una cadena, que representa l'ordre m?s recent el qual comen?a"
+
+#~ msgid "string."
+#~ msgstr "amb eixa cadena."
+
+#~ msgid ""
+#~ " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR,"
+#~ msgstr ""
+#~ " -e ENAME tria quin editor emprar. FCEDIT ?s per defecte, despr?s ?s"
+
+#~ msgid ""
+#~ " then the editor which corresponds to the current readline editing"
+#~ msgstr ""
+#~ " EDITOR, despr?s l'editor que correspon amb l'actual editor del "
+
+#~ msgid " mode, then vi."
+#~ msgstr " mode de l?nia d'ordre, i per ?ltim ?vi?."
+
+#~ msgid " -l means list lines instead of editing."
+#~ msgstr " -l mostra les l?nies en voltes d'editar-les."
+
+#~ msgid " -n means no line numbers listed."
+#~ msgstr " -n no es mostraran els n?meros de l?nia."
+
+#~ msgid ""
+#~ " -r means reverse the order of the lines (making it newest listed "
+#~ "first)."
+#~ msgstr ""
+#~ " -r inverteix l'ordre de les l?nies (els m?s recents es llisten primer)."
+
+#~ msgid "With the `fc -s [pat=rep ...] [command]' format, the command is"
+#~ msgstr ""
+#~ "Amb el format ?fc -s [pat=rep ...] [command]?, es reexecuta l'ordre "
+
+#~ msgid "re-executed after the substitution OLD=NEW is performed."
+#~ msgstr "despr?s de que es realitze la substituci? de ANTIC per NOU."
+
+#~ msgid "A useful alias to use with this is r='fc -s', so that typing `r cc'"
+#~ msgstr "Un ?lies ?til per a usar-lo amb aix? ?s r='fc -s', per tant si"
+
+#~ msgid "runs the last command beginning with `cc' and typing `r' re-executes"
+#~ msgstr "s'escriu ?r cc? s'executar? la darrera ordre que comen?a per ?cc? i"
+
+#~ msgid "JOB_SPEC is not present, the shell's notion of the current job is"
+#~ msgstr "Si no s'especifica ID_TASCA, s'aplicaran els atributs d'execuci? de"
+
+#~ msgid "used."
+#~ msgstr "l'int?rpret d'ordres de la tasca actual."
+
+#~ msgid "Place JOB_SPEC in the background, as if it had been started with"
+#~ msgstr "Ubica ID_TASCA en segon pla, com si s'haguera iniciat amb \"&\"."
+
+#~ msgid "`&'. If JOB_SPEC is not present, the shell's notion of the current"
+#~ msgstr "Si no s'especifica ID_TASCA, s'aplicaran els atributs d'execuci? de"
+
+#~ msgid "job is used."
+#~ msgstr "l'int?rpret d'ordres de la tasca actual."
+
+#~ msgid "For each NAME, the full pathname of the command is determined and"
+#~ msgstr "Per a cada NOM, es determina i es recorda el nom del cam? d'acc?s"
+
+#~ msgid "remembered. If the -p option is supplied, PATHNAME is used as the"
+#~ msgstr "complet de l'ordre. Si s'especifica l'opci? -p , es fa servir"
+
+#~ msgid "full pathname of NAME, and no path search is performed. The -r"
+#~ msgstr "CAM?_ACC?S com el nom del cam? complet de NOM, i no es realitzar?"
+
+#~ msgid "option causes the shell to forget all remembered locations. If no"
+#~ msgstr "cap cerca de camins. L'opci? -r fa que l'int?rpret d'ordres oblide"
+
+#~ msgid ""
+#~ "arguments are given, information about remembered commands is displayed."
+#~ msgstr ""
+#~ "totes les ubicacions del cam? d'acc?s. Si no s'hi d?na arguments, es\n"
+#~ "mostrar? informaci? sobre els camins d'acc?s triats per les ordres."
+
+#~ msgid "Display helpful information about builtin commands. If PATTERN is"
+#~ msgstr "Mostra informaci? d'utilitat sobre les ordres integrades. Si"
+
+#~ msgid "specified, gives detailed help on all commands matching PATTERN,"
+#~ msgstr "s'especifica PLANTILLA, s'hi d?na ajuda detallada sobre totes les"
+
+#~ msgid "otherwise a list of the builtins is printed."
+#~ msgstr ""
+#~ "ordres que coincidisquen amb PLANTILLA, altrament s'hi mostrar? una\n"
+#~ "llista de les ordres integrades."
+
+#~ msgid "Display the history list with line numbers. Lines listed with"
+#~ msgstr "Mostra el llistat de l'hist?ric de manera numerada. Les l?nies qu?"
+
+#~ msgid "with a `*' have been modified. Argument of N says to list only"
+#~ msgstr ""
+#~ "han sigut modificades s?n llistades amb el signe \"*\". El par?metre"
+
+#~ msgid "the last N lines. The -c option causes the history list to be"
+#~ msgstr ""
+#~ "N mostra les darreres N l?nies. L'opci? -c fa que es buide l'hist?ric"
+
+#~ msgid ""
+#~ "cleared by deleting all of the entries. The `-w' option writes out the"
+#~ msgstr ""
+#~ "esborrant totes les seues entrades. L'opci? \"-w\" escriu l'hist?ric"
+
+#~ msgid ""
+#~ "current history to the history file; `-r' means to read the file and"
+#~ msgstr ""
+#~ "actual al fitxer d'hist?ric; d'altra banda, l'opci? \"-r\" llegeix el"
+
+#~ msgid "append the contents to the history list instead. `-a' means"
+#~ msgstr ""
+#~ "fitxer i afegeix els continguts a l'hist?ric. L'opci? \"-a\" afegeix"
+
+#~ msgid "to append history lines from this session to the history file."
+#~ msgstr "les l?nies de l'hist?ric d'aquesta sessi? al fitxer de l'hist?ric."
+
+#~ msgid "Argument `-n' means to read all history lines not already read"
+#~ msgstr ""
+#~ "Amb el par?metre \"-n\" es llegeix totes les l?nies de l'hist?ric que"
+
+#~ msgid "from the history file and append them to the history list. If"
+#~ msgstr "encara no hagen sigut llegides del fitxer d'hist?ric i l'afegeix a"
+
+#~ msgid "FILENAME is given, then that is used as the history file else"
+#~ msgstr "la llista de l'hist?ric. Si s'especifica FITXER, aquest es far?"
+
+#~ msgid "if $HISTFILE has a value, that is used, else ~/.bash_history."
+#~ msgstr ""
+#~ "servir com el fitxer d'hist?ric, altrament s'utilitzar? el valor de\n"
+#~ "$HISTFILE, si en t?, i sin? es mirar? en ~/.bash_history."
+
+#~ msgid "If the -s option is supplied, the non-option ARGs are appended to"
+#~ msgstr "Si s'especifica l'opci? \"-s\", els PAR?METRES que no s?n opcions"
+
+#~ msgid "the history list as a single entry. The -p option means to perform"
+#~ msgstr ""
+#~ "seran afegits a l'hist?ric com una entrada ?nica. Amb l'opci? \"-p\""
+
+#~ msgid ""
+#~ "history expansion on each ARG and display the result, without storing"
+#~ msgstr ""
+#~ "es realitza una expansi? de l'hist?ric en cada PAR?METRE i mostra el "
+
+#~ msgid "anything in the history list."
+#~ msgstr "resultat, sense al?ar res en l'hist?ric."
+
+#~ msgid "Lists the active jobs. The -l option lists process id's in addition"
+#~ msgstr "Llista les tasques actives. Amb l'opci? \"-l\" es llista els"
+
+#~ msgid "to the normal information; the -p option lists process id's only."
+#~ msgstr ""
+#~ "identificadors de proc?s a m?s de la informaci? normal; amb l'opci? \n"
+#~ "\"-p\" es llista nom?s els identificadors de proc?s."
+
+#~ msgid ""
+#~ "If -n is given, only processes that have changed status since the last"
+#~ msgstr "Si s'especifica \"-n\", nom?s s'imprimeixen els processos que hagen"
+
+#~ msgid ""
+#~ "notification are printed. JOBSPEC restricts output to that job. The"
+#~ msgstr ""
+#~ "canviat el seu estat despr?s del seu darrer av?s.\n"
+#~ "ID_TASCA restringeix que es mostre una tasca particular."
+
+#~ msgid "-r and -s options restrict output to running and stopped jobs only,"
+#~ msgstr ""
+#~ "Amb les opcions \"-r\" i \"-s\" es restringeix nom?s la impressi? de"
+
+#~ msgid "respectively. Without options, the status of all active jobs is"
+#~ msgstr "les tasques actives i aturades, respectivamente. Sense cap opci?,"
+
+#~ msgid ""
+#~ "printed. If -x is given, COMMAND is run after all job specifications"
+#~ msgstr ""
+#~ "es mostren l'estat de totes les tasques actives Si s'especifica\n"
+#~ "\"-X\" s'executa ORDRE despr?s de que totes les especificacions de"
+
+#~ msgid ""
+#~ "that appear in ARGS have been replaced with the process ID of that job's"
+#~ msgstr ""
+#~ "tasca que apareixen en PAR?METRES hagen sigut reempla?ades pel proc?s"
+
+#~ msgid "process group leader."
+#~ msgstr "ID del proc?s de la tasca mestressa del grup."
+
+#~ msgid "Removes each JOBSPEC argument from the table of active jobs."
+#~ msgstr ""
+#~ "Suprimeix cada par?metre de ID_TASCA de la taula de tasques actives."
+
+#~ msgid "Send the processes named by PID (or JOB) the signal SIGSPEC. If"
+#~ msgstr ""
+#~ "Envia el SENYAL als processos especificats pel seu PID o pel seu nom"
+
+#~ msgid ""
+#~ "SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'"
+#~ msgstr "de tasca. Si no s'especifica el SENYAL, aleshores s'assumeix"
+
+#~ msgid "lists the signal names; if arguments follow `-l' they are assumed to"
+#~ msgstr "SIGTERM. Amb un par?metre de \"-l\" es llista els noms de les"
+
+#~ msgid "be signal numbers for which names should be listed. Kill is a shell"
+#~ msgstr ""
+#~ "senyals; si hi ha un par?metre despr?s de l'opci? \"-l\", es mostra\n"
+#~ "el valor num?ric del n?mero de senyal. L'ordre ?kill? ?s "
+
+#~ msgid "builtin for two reasons: it allows job IDs to be used instead of"
+#~ msgstr "integrada de l'int?rpret per dues raons: permet fer servir els"
+
+#~ msgid "process IDs, and, if you have reached the limit on processes that"
+#~ msgstr ""
+#~ "identificadors de tasca en voltes dels identificadors de proc?s i, si"
+
+#~ msgid ""
+#~ "you can create, you don't have to start a process to kill another one."
+#~ msgstr ""
+#~ "no heu excedit el l?mit de processos que pots crear-hi, no heu\n"
+#~ "d'iniciar un altre proc?s per a finalitzar un altre."
+
+#~ msgid "Each ARG is an arithmetic expression to be evaluated. Evaluation"
+#~ msgstr "Cada PARAMETRE ?s una expressi? aritm?tica per a avaluar-se."
+
+#~ msgid "is done in long integers with no check for overflow, though division"
+#~ msgstr ""
+#~ "L'avaluaci? es fa amb enters long sense control de sobreeiximent, si"
+
+#~ msgid "by 0 is trapped and flagged as an error. The following list of"
+#~ msgstr ""
+#~ "b? la divisi? per 0 ?s capturada i marcada com un error. La seg?ent"
+
+#~ msgid "operators is grouped into levels of equal-precedence operators."
+#~ msgstr "llista d'operadors s'agrupa dins del mateix nivell de preced?ncia."
+
+#~ msgid "The levels are listed in order of decreasing precedence."
+#~ msgstr "La llista dels nivells est? ordenada de manera decreixent."
+
+#~ msgid "\t-, +\t\tunary minus, plus"
+#~ msgstr "\t-, +\t\tunari minus, m?s"
+
+#~ msgid "\t!, ~\t\tlogical and bitwise negation"
+#~ msgstr "\t!, ~\t\tnegaci? l?gica i bin?ria"
+
+#~ msgid "\t*, /, %\t\tmultiplication, division, remainder"
+#~ msgstr "\t*, /, %\t\tmultiplicaci?, divisi?, restant"
+
+#~ msgid "\t+, -\t\taddition, subtraction"
+#~ msgstr "\t+, -\t\taddici?, substracci?"
+
+#~ msgid "\t<<, >>\t\tleft and right bitwise shifts"
+#~ msgstr "\t<<, >>\t\tdecalaments bin?ries dreta i esquerra"
+
+#~ msgid "\t<=, >=, <, >\tcomparison"
+#~ msgstr "\t<=, >=, <, >\tcomparaci?"
+
+#~ msgid "\t==, !=\t\tequality, inequality"
+#~ msgstr "\t==, !=\t\tequival?ncia, inequival?ncia"
+
+#~ msgid "\t&\t\tbitwise AND"
+#~ msgstr "\t&\t\tAND binari"
+
+#~ msgid "\t^\t\tbitwise XOR"
+#~ msgstr "\t^\t\tXOR binari"
+
+#~ msgid "\t|\t\tbitwise OR"
+#~ msgstr "\t|\t\tOR binari"
+
+#~ msgid "\t&&\t\tlogical AND"
+#~ msgstr "\t&&\t\tAND l?gic"
+
+#~ msgid "\t||\t\tlogical OR"
+#~ msgstr "\t||\t\tOR l?gic"
+
+#~ msgid "\texpr ? expr : expr"
+#~ msgstr "\texpr ? expr : expr"
+
+#~ msgid "\t\t\tconditional expression"
+#~ msgstr "\t\t\texpressi? condicional"
+
+#~ msgid "\t=, *=, /=, %=,"
+#~ msgstr "\t=, *=, /=, %=,"
+
+#~ msgid "\t+=, -=, <<=, >>=,"
+#~ msgstr "\t+=, -=, <<=, >>=,"
+
+#~ msgid "\t&=, ^=, |=\tassignment"
+#~ msgstr "\t&=, ^=, |=\tassignaci?"
+
+#~ msgid "is replaced by its value (coerced to a long integer) within"
+#~ msgstr ""
+#~ "nom de la variable ?s reempla?at pel seu valor (convertit for?osament"
+
+#~ msgid "an expression. The variable need not have its integer attribute"
+#~ msgstr ""
+#~ "en un enter long) dins d'una expressi?. No cal que la variable tinga"
+
+#~ msgid "turned on to be used in an expression."
+#~ msgstr ""
+#~ "activada el seu atribut d'enter per ser utilitzada en una expressi?."
+
+#~ msgid "Operators are evaluated in order of precedence. Sub-expressions in"
+#~ msgstr ""
+#~ "S'avaluen els operadors per ordre de preced?ncia. Les subexpressions"
+
+#~ msgid "parentheses are evaluated first and may override the precedence"
+#~ msgstr "qu? que es troben dins dels par?ntesis s?n avaluades primer i poden"
+
+#~ msgid "rules above."
+#~ msgstr "saltar-se les regles de preced?ncies esmentades."
+
+#~ msgid "If the last ARG evaluates to 0, let returns 1; 0 is returned"
+#~ msgstr "Si el darrer PARAMETRE avalua a 0, let retorna 1; altrament, es"
+
+#~ msgid "otherwise."
+#~ msgstr "retorna 1."
+
+#~ msgid "One line is read from the standard input, and the first word is"
+#~ msgstr ""
+#~ "Es llegeix una l?nia des de l'entrada de dades est?ndard, i s'assigna"
+
+#~ msgid ""
+#~ "assigned to the first NAME, the second word to the second NAME, and so"
+#~ msgstr "la primera paraula al primer NOM, la segona paraula al segon NOM, i"
+
+#~ msgid ""
+#~ "on, with leftover words assigned to the last NAME. Only the characters"
+#~ msgstr "aix? successivament, assignant-se les ?ltimes paraules als ?ltims"
+
+#~ msgid "found in $IFS are recognized as word delimiters. The return code is"
+#~ msgstr "NOMs. Nom?s es reconeixen com a delimitadors els car?cters que es"
+
+#~ msgid ""
+#~ "zero, unless end-of-file is encountered. If no NAMEs are supplied, the"
+#~ msgstr ""
+#~ "troben en $IFS. El codi de retorn ?s zero, mentre no es trobe el fi"
+
+#~ msgid ""
+#~ "line read is stored in the REPLY variable. If the -r option is given,"
+#~ msgstr ""
+#~ "de fitxer (EOF). Si no s'especifica NOMs, s'al?a la l?nia llegida en"
+
+#~ msgid "this signifies `raw' input, and backslash escaping is disabled. If"
+#~ msgstr ""
+#~ "la variable REPLY. Si s'especifica l'opci? \"-r\", aix? vol dir que es"
+
+#~ msgid "the `-p' option is supplied, the string supplied as an argument is"
+#~ msgstr ""
+#~ "tracta d'una entrada de dades directa (\"raw data\"), i es desactiva la"
+
+#~ msgid ""
+#~ "output without a trailing newline before attempting to read. If -a is"
+#~ msgstr ""
+#~ "barra invertida d'escapada. Si s'especifica l'opci? \"-p\", la cadena"
+
+#~ msgid ""
+#~ "supplied, the words read are assigned to sequential indices of ARRAY,"
+#~ msgstr "especificada com a par?metre es mostra sense salts de l?nia abans"
+
+#~ msgid "starting at zero. If -e is supplied and the shell is interactive,"
+#~ msgstr ""
+#~ "d'intentar llegir-la. Si s'especifica l'opci? \"-a\", s'assignen les"
+
+#~ msgid "readline is used to obtain the line."
+#~ msgstr ""
+#~ "paraules llegides a ?n ?ndex seq?encial de MATRIU, incialitzant a\n"
+#~ "zero. Si s'especifica l'opci? \"-e\" i l'int?rpret d'ordres ?s\n"
+#~ "interactiu, es fa servir \"readline\" per a obtindre la l?nia."
+
+#~ msgid "is omitted, the return status is that of the last command."
+#~ msgstr "N. Si s'omet N, l'estat del retorn ?s el de la darrera ordre."
+
+#~ msgid " -a Mark variables which are modified or created for export."
+#~ msgstr ""
+#~ " -a Marca les variables modificades o creades per a exportar-les."
+
+#~ msgid " -b Notify of job termination immediately."
+#~ msgstr " -b Avisa immediatament de la finalitzaci? d'una tasca."
+
+#~ msgid " -e Exit immediately if a command exits with a non-zero status."
+#~ msgstr ""
+#~ " -e Ix immediatament si una ordre ix amb un estat distint de zero."
+
+#~ msgid " -f Disable file name generation (globbing)."
+#~ msgstr " -f Desactiva la generaci? de noms de fitxer (globbing)."
+
+#~ msgid " -h Remember the location of commands as they are looked up."
+#~ msgstr " -h Recorda la ubicaci? de les ordres quan siguen buscades."
+
+#~ msgid ""
+#~ " -i Force the shell to be an \"interactive\" one. Interactive shells"
+#~ msgstr ""
+#~ " -i For?a l'int?rpret d'ordres el mode \"interactiu\". Aquest mode"
+
+#~ msgid " always read `~/.bashrc' on startup."
+#~ msgstr " llegeix sempre ?~/.bashrc? en iniciar-se."
+
+#~ msgid " -k All assignment arguments are placed in the environment for a"
+#~ msgstr ""
+#~ " -k Ubica totes les assignacions de par?metres en l'entorn per una"
+
+#~ msgid " command, not just those that precede the command name."
+#~ msgstr ""
+#~ " ordre, no tan sols aquells que precedeix del nom de l'ordre."
+
+#~ msgid " -m Job control is enabled."
+#~ msgstr " -m Activa el control de tasques."
+
+#~ msgid " -n Read commands but do not execute them."
+#~ msgstr " -n Llegeix les ordres per? no els executa."
+
+#~ msgid " -o option-name"
+#~ msgstr " -o nom-opci?"
+
+#~ msgid " Set the variable corresponding to option-name:"
+#~ msgstr " Especifiqueu la variable corresponent per a nom-opci?:"
+
+#~ msgid " allexport same as -a"
+#~ msgstr " allexport el mateix que -a"
+
+#~ msgid " braceexpand same as -B"
+#~ msgstr " braceexpand el mateix que -B"
+
+#~ msgid " emacs use an emacs-style line editing interface"
+#~ msgstr ""
+#~ " emacs utilitza una interfa? d'edici? de l?nia de\n"
+#~ " l'estil d'emacs."
+
+#~ msgid " errexit same as -e"
+#~ msgstr " errexit el mateix que -e"
+
+#~ msgid " hashall same as -h"
+#~ msgstr " hashall el mateix que -h"
+
+#~ msgid " histexpand same as -H"
+#~ msgstr " histexpand el mateix que -H"
+
+#~ msgid " ignoreeof the shell will not exit upon reading EOF"
+#~ msgstr ""
+#~ " ignoreeof l'int?rpret d'ordres no terminar? fins llegir\n"
+#~ " el fi de fitxer (EOF)."
+
+#~ msgid " interactive-comments"
+#~ msgstr " interactive-comments"
+
+#~ msgid ""
+#~ " allow comments to appear in interactive commands"
+#~ msgstr ""
+#~ " permet mostrar-se comentaris en les ordres\n"
+#~ " interactives"
+
+#~ msgid " keyword same as -k"
+#~ msgstr " keyword el mateix que -k"
+
+#~ msgid " monitor same as -m"
+#~ msgstr " monitor el mateix que -m"
+
+#~ msgid " noclobber same as -C"
+#~ msgstr " noclobber el mateix que -C"
+
+#~ msgid " noexec same as -n"
+#~ msgstr " noexec el mateix que -n"
+
+#~ msgid " noglob same as -f"
+#~ msgstr " noglob el mateix que -f"
+
+#~ msgid " notify save as -b"
+#~ msgstr " notify el mateix que -b"
+
+#~ msgid " nounset same as -u"
+#~ msgstr " nounset el mateix que -u"
+
+#~ msgid " onecmd same as -t"
+#~ msgstr " onecmd el mateix que -t"
+
+#~ msgid " physical same as -P"
+#~ msgstr " physical el mateix que -P"
+
+#~ msgid ""
+#~ " posix change the behavior of bash where the default"
+#~ msgstr ""
+#~ " posix canvia el comportament de bash en l'operaci?"
+
+#~ msgid ""
+#~ " operation differs from the 1003.2 standard to"
+#~ msgstr " per defecte de l'est?ndard 1003.2 per a"
+
+#~ msgid " match the standard"
+#~ msgstr " coincidir amb l'est?ndard"
+
+#~ msgid " privileged same as -p"
+#~ msgstr " privileged el mateix que -p"
+
+#~ msgid " verbose same as -v"
+#~ msgstr " verbose el mateix que -v"
+
+#~ msgid " vi use a vi-style line editing interface"
+#~ msgstr ""
+#~ " vi utilitza una intefa? d'edici? de l?nia de\n"
+#~ " l'estil de ?vi?"
+
+#~ msgid " xtrace same as -x"
+#~ msgstr " xtrace el mateix que -x"
+
+#~ msgid ""
+#~ " -p Turned on whenever the real and effective user ids do not match."
+#~ msgstr ""
+#~ " -p S'activa quan no coincideixen els identificadors d'usuari real \n"
+#~ " i efectiu."
+
+#~ msgid " Disables processing of the $ENV file and importing of shell"
+#~ msgstr " Desactiva el proc?s del fitxer $ENV i la importaci? de les"
+
+#~ msgid ""
+#~ " functions. Turning this option off causes the effective uid and"
+#~ msgstr " funcions de l'int?rpret d'ordres. Si es desactiva aquesta"
+
+#~ msgid " gid to be set to the real uid and gid."
+#~ msgstr ""
+#~ " opci?, s'estableix l'identificador d'usuari (uid) i\n"
+#~ " l'identificador de grup (gid) efectius per l'uid i gid reals."
+
+#~ msgid " -t Exit after reading and executing one command."
+#~ msgstr " -t Ix despr?s de llegir i executar una ordre."
+
+#~ msgid " -u Treat unset variables as an error when substituting."
+#~ msgstr ""
+#~ " -u Considerar les variables no inicialitzades com un error quan\n"
+#~ " se substitu?sca."
+
+#~ msgid " -v Print shell input lines as they are read."
+#~ msgstr ""
+#~ " -v Imprimeix les l?nies d'entrada de dades de l'int?rpret\n"
+#~ " d'ordres mentre es llegeixen."
+
+#~ msgid " -x Print commands and their arguments as they are executed."
+#~ msgstr ""
+#~ " -x Imprimeix les ordres i els seus par?metres mentre s'executen."
+
+#~ msgid " -B the shell will perform brace expansion"
+#~ msgstr " -B l'int?rpret d'ordres realitzar? una expansi? de claus."
+
+#~ msgid " -H Enable ! style history substitution. This flag is on"
+#~ msgstr " -H Activa l'estil ! en la substituci? de l'hist?ric. Aquest"
+
+#~ msgid " by default."
+#~ msgstr " senyalador est? marcat per defecte."
+
+#~ msgid " -C If set, disallow existing regular files to be overwritten"
+#~ msgstr " -C Evita que els fitxers regulars siguen sobreescrits per la"
+
+#~ msgid " by redirection of output."
+#~ msgstr " redirecci? de l'eixida de dades."
+
+#~ msgid " -P If set, do not follow symbolic links when executing commands"
+#~ msgstr ""
+#~ " -P No rastreja els enlla?os simb?lics quan s'executa ordres com "
+
+#~ msgid " such as cd which change the current directory."
+#~ msgstr " per exemple cd que canvia el directori actual."
+
+#~ msgid "Using + rather than - causes these flags to be turned off. The"
+#~ msgstr ""
+#~ "Si feu servir el signe \"+\" en voltes del signe \"-\" desmarcareu els\n"
+#~ "senyaladors. Tamb? es poden utilitzar els senyaladors des de la"
+
+#~ msgid "flags can also be used upon invocation of the shell. The current"
+#~ msgstr "invocaci? de l'int?rpret d'ordres. Es pot trobar la configuraci?"
+
+#~ msgid ""
+#~ "set of flags may be found in $-. The remaining n ARGs are positional"
+#~ msgstr "actual dels senyaladors en $-. Els restants PAR?METRES n s?n"
+
+#~ msgid "parameters and are assigned, in order, to $1, $2, .. $n. If no"
+#~ msgstr ""
+#~ "par?metres posicionals i estan assignats, en ordre, a $1, $2, ... $n."
+
+#~ msgid "ARGs are given, all shell variables are printed."
+#~ msgstr ""
+#~ "Si no s'especifiquen els PAR?METRES, es mostraran totes les variables de\n"
+#~ "l'int?rpret d'ordres."
+
+#~ msgid "For each NAME, remove the corresponding variable or function. Given"
+#~ msgstr ""
+#~ "Esborra la variable o funci? corresponent per a cada NOM. Amb l'opci? "
+
+#~ msgid "the `-v', unset will only act on variables. Given the `-f' flag,"
+#~ msgstr ""
+#~ "\"-v\", ?unset? opera nom?s en les variables. Amb el senyalador \"-f\","
+
+#~ msgid "unset will only act on functions. With neither flag, unset first"
+#~ msgstr "nom?s en funcions. Amb cap dels dos senyaladors, ?unset? primer"
+
+#~ msgid "tries to unset a variable, and if that fails, then tries to unset a"
+#~ msgstr ""
+#~ "intentar? eliminar una variable, i si en falla, aleshores ho intenta"
+
+#~ msgid ""
+#~ "function. Some variables (such as PATH and IFS) cannot be unset; also"
+#~ msgstr ""
+#~ "amb una funci?. Algunes variables (aix? com CAMI_ACCES i IFS) no es"
+
+#~ msgid "see readonly."
+#~ msgstr "poden esborrar (veure l'opci? \"readonly\")."
+
+#~ msgid "NAMEs are marked for automatic export to the environment of"
+#~ msgstr ""
+#~ "S'assenyalen els NOMs per a exportar-los autom?ticament a l'entorn de "
+
+#~ msgid "subsequently executed commands. If the -f option is given,"
+#~ msgstr ""
+#~ "les ordres executades subseq?entment. Si s'especifica l'opci? \"-f\", "
+
+#~ msgid "the NAMEs refer to functions. If no NAMEs are given, or if `-p'"
+#~ msgstr ""
+#~ "els NOMs fan refer?ncia a les funcions. Si no s'especifica NOMs, o si "
+
+#~ msgid "is given, a list of all names that are exported in this shell is"
+#~ msgstr ""
+#~ "s'especifica \"-p\", es mostra una llista de tots els noms exportats cap "
+
+#~ msgid "printed. An argument of `-n' says to remove the export property"
+#~ msgstr "aquest int?rpret d'ordres. Amb \"-n\" s'esborra les propietats "
+
+#~ msgid "from subsequent NAMEs. An argument of `--' disables further option"
+#~ msgstr "d'exportaci? per als NOMs subseq?ents. Amb \"--\" s'atura el "
+
+#~ msgid "processing."
+#~ msgstr "tractament subseq?ent de les opcions."
+
+#~ msgid ""
+#~ "The given NAMEs are marked readonly and the values of these NAMEs may"
+#~ msgstr ""
+#~ "Els NOMs especificats es marquen amb l'atribut de nom?s lectura, els"
+
+#~ msgid "not be changed by subsequent assignment. If the -f option is given,"
+#~ msgstr ""
+#~ "valors dels quals no poden ser canviats per assignacions subseq?ents."
+
+#~ msgid "then functions corresponding to the NAMEs are so marked. If no"
+#~ msgstr ""
+#~ "Si s'especifica l'opci? \"-f\", aleshores les funcions corresponents als"
+
+#~ msgid ""
+#~ "arguments are given, or if `-p' is given, a list of all readonly names"
+#~ msgstr "NOMs tamb? se'n marquen. Si no s'especifica par?metres, o si"
+
+#~ msgid ""
+#~ "is printed. An argument of `-n' says to remove the readonly property"
+#~ msgstr ""
+#~ "s'especifica \"-p\", es mostra una llista de tots els noms amb l'atribut"
+
+#~ msgid "from subsequent NAMEs. The `-a' option means to treat each NAME as"
+#~ msgstr "de nom?s lectura. Amb l'opci? \"-n\" s'esborra l'atribut de nom?s"
+
+#~ msgid "an array variable. An argument of `--' disables further option"
+#~ msgstr ""
+#~ "lectura pels NOMs subseq?ents. Amb \"-a\" tracta cada NOM com una\n"
+#~ "variable de matriu. Amb el par?metre \"--\" s'atura el tractament\n"
+#~ "subseq?ent de les opcions."
+
+#~ msgid "not given, it is assumed to be 1."
+#~ msgstr "Si no s'especifica N, s'assumeix el valor com a 1."
+
+#~ msgid "Read and execute commands from FILENAME and return. The pathnames"
+#~ msgstr "Llegeix i executa ordres de FITXER i retorna. Es fan servir els"
+
+#~ msgid "in $PATH are used to find the directory containing FILENAME."
+#~ msgstr "camins d'acc?s de $PATH per a trobar el directori que cont? FITXER."
+
+#~ msgid "Suspend the execution of this shell until it receives a SIGCONT"
+#~ msgstr ""
+#~ "Susp?n l'execuci? d'aquest int?rpret d'ordres fins que reba una senyal"
+
+#~ msgid "signal. The `-f' if specified says not to complain about this"
+#~ msgstr ""
+#~ "SIGCONT. Si s'especifica \"-f\" no es mostrar? cap missatge d'av?s de"
+
+#~ msgid "being a login shell if it is; just suspend anyway."
+#~ msgstr ""
+#~ "si l'int?rpret ?s un d'inici de sessi? (shell login); simplement ho susp?"
+#~ "n de\n"
+#~ "qualsevol manera."
+
+#~ msgid "Exits with a status of 0 (trueness) or 1 (falseness) depending on"
+#~ msgstr "Ix amb l'estat de 0 (cert) o 1 (fals) depenent de l'avaluaci? de "
+
+#~ msgid "the evaluation of EXPR. Expressions may be unary or binary. Unary"
+#~ msgstr "l'EXPRESSIO. Les expressions poden ser un?ries o bin?ries. Les"
+
+#~ msgid "expressions are often used to examine the status of a file. There"
+#~ msgstr ""
+#~ "expressions un?ries sovint es fan servir per a examinar l'estat d'un"
+
+#~ msgid "are string operators as well, and numeric comparison operators."
+#~ msgstr "fitxer. Tamb? hi ha operadors de cadenes i de comparaci? num?rica."
+
+#~ msgid "File operators:"
+#~ msgstr "Operadors de fitxer:"
+
+#~ msgid " -b FILE True if file is block special."
+#~ msgstr " -b FITXER Cert si el fitxer ?s un bloc especial."
+
+#~ msgid " -c FILE True if file is character special."
+#~ msgstr " -c FITXER Cert si el fitxer ?s un car?cter especial."
+
+#~ msgid " -d FILE True if file is a directory."
+#~ msgstr " -d FITXER Cert si el fitxer ?s un directori."
+
+#~ msgid " -e FILE True if file exists."
+#~ msgstr " -e FITXER Cert si el fitxer existeix."
+
+#~ msgid " -f FILE True if file exists and is a regular file."
+#~ msgstr ""
+#~ " -f FITXER Cert si el fitxer existeix i ?s un fitxer normal."
+
+#~ msgid " -g FILE True if file is set-group-id."
+#~ msgstr " -g FITXER Cert si el fitxer ?s set-group-id."
+
+#~ msgid " -h FILE True if file is a symbolic link. Use \"-L\"."
+#~ msgstr ""
+#~ " -h FITXER Cert si el fitxer ?s un enlla? simb?lic.\n"
+#~ " Utilitzeu \"-L\"."
+
+#~ msgid " -L FILE True if file is a symbolic link."
+#~ msgstr " -L FITXER Cert si el fitxer ?s un enlla? simb?lic."
+
+#~ msgid " -k FILE True if file has its \"sticky\" bit set."
+#~ msgstr ""
+#~ " -k FITXER Cert si el fitxer t? activat el seu bit \"sticky\"."
+
+#~ msgid " -p FILE True if file is a named pipe."
+#~ msgstr " -p FITXER Cert si el fitxer ?s un conducte anomenat."
+
+#~ msgid " -r FILE True if file is readable by you."
+#~ msgstr " -r FITXER Cert si podeu llegir el fitxer."
+
+#~ msgid " -s FILE True if file exists and is not empty."
+#~ msgstr " -s FITXER Cert si el fitxer existeix i no ?s buit."
+
+#~ msgid " -S FILE True if file is a socket."
+#~ msgstr " -S FITXER Cert si el fitxer ?s un s?col."
+
+#~ msgid " -t FD True if FD is opened on a terminal."
+#~ msgstr " -t FD Cert si FD ?s obert en una terminal."
+
+#~ msgid " -u FILE True if the file is set-user-id."
+#~ msgstr " -u FITXER Cert si el fitxer ?s set-user-id."
+
+#~ msgid " -w FILE True if the file is writable by you."
+#~ msgstr " -w FITXER Cert si podeu escriure el fitxer."
+
+#~ msgid " -x FILE True if the file is executable by you."
+#~ msgstr " -w FITXER Cert si podeu escriure el fitxer."
+
+#~ msgid " -O FILE True if the file is effectively owned by you."
+#~ msgstr " -O FITXER Cert si sou el propietari del fitxer."
+
+#~ msgid ""
+#~ " -G FILE True if the file is effectively owned by your group."
+#~ msgstr " -G FITXER Cert si sou del grup propietari del fitxer."
+
+#~ msgid " FILE1 -nt FILE2 True if file1 is newer than (according to"
+#~ msgstr ""
+#~ " FITXER1 -nt FITXER2\n"
+#~ " Cert si fitxer1 ?s tan recent com fitxer2"
+
+#~ msgid " modification date) file2."
+#~ msgstr " (d'acord amb les dates d'?ltima modificaci?)."
+
+#~ msgid " FILE1 -ot FILE2 True if file1 is older than file2."
+#~ msgstr ""
+#~ " FITXER1 -ot FITXER2\n"
+#~ " Cert si fitxer1 ?s tan antic com fitxer2."
+
+#~ msgid " FILE1 -ef FILE2 True if file1 is a hard link to file2."
+#~ msgstr ""
+#~ " FITXER1 -ef FITXER2\n"
+#~ " Cert si fitxer 1 ?s un enlla? fort cap a fitxer2."
+
+#~ msgid "String operators:"
+#~ msgstr "Operadors de cadena:"
+
+#~ msgid " -z STRING True if string is empty."
+#~ msgstr " -z CADENA Cert si la cadena ?s bu?da."
+
+#~ msgid " -n STRING"
+#~ msgstr " -n CADENA"
+
+#~ msgid " STRING True if string is not empty."
+#~ msgstr " CADENA Cert si la cadena no ?s bu?da."
+
+#~ msgid " STRING1 = STRING2"
+#~ msgstr " CADENA1 = CADENA2"
+
+#~ msgid " True if the strings are equal."
+#~ msgstr " Cert si les cadenes s?n iguals."
+
+#~ msgid " STRING1 != STRING2"
+#~ msgstr " CADENA1 != CADENA2"
+
+#~ msgid " True if the strings are not equal."
+#~ msgstr " Cert si les cadenes s?n diferents."
+
+#~ msgid " STRING1 < STRING2"
+#~ msgstr " CADENA1 < CADENA2"
+
+#~ msgid ""
+#~ " True if STRING1 sorts before STRING2 lexicographically"
+#~ msgstr ""
+#~ " Cert si CADENA1 precedeix alfab?ticament CADENA2."
+
+#~ msgid " STRING1 > STRING2"
+#~ msgstr " CADENA1 > CADENA2"
+
+#~ msgid ""
+#~ " True if STRING1 sorts after STRING2 lexicographically"
+#~ msgstr ""
+#~ " Cert si CADENA1 poscedeix alfab?ticament CADENA2."
+
+#~ msgid "Other operators:"
+#~ msgstr "Altres operadors:"
+
+#~ msgid " ! EXPR True if expr is false."
+#~ msgstr " ! EXPR Cert si l'expressi? ?s falsa."
+
+#~ msgid " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true."
+#~ msgstr " EXPR1 -a EXPR2 Cert si ambdues expressions s?n certes."
+
+#~ msgid " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true."
+#~ msgstr " EXPR1 -o EXPR2 Cert si cap d'ambdues expresi?ns s?n certes."
+
+#~ msgid " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,"
+#~ msgstr " arg1 OP arg2 C?lcul aritm?tic. OP ?s una de les seg?ents"
+
+#~ msgid " -lt, -le, -gt, or -ge."
+#~ msgstr " opcions: -eq, -ne, -lt, -le, -gt, or -ge."
+
+#~ msgid "Arithmetic binary operators return true if ARG1 is equal, not-equal,"
+#~ msgstr "Els operadors aritm?tics binaris retornen un valor de cert si "
+
+#~ msgid ""
+#~ "less-than, less-than-or-equal, greater-than, or greater-than-or-equal"
+#~ msgstr ""
+#~ "PARAMETRE1 ?s 'igual', 'diferent', 'menys que', 'menys o igual que',"
+
+#~ msgid "than ARG2."
+#~ msgstr "'m?s que', o 'm?s o igual que', el PARAMETRE2."
+
+#~ msgid "This is a synonym for the \"test\" builtin, but the last"
+#~ msgstr "Es tracta del sin?nim de l'ordre integrada ?test?, per? el darrer "
+
+#~ msgid "the shell."
+#~ msgstr "processos des de l'int?rpret d'ordres."
+
+#~ msgid "The command ARG is to be read and executed when the shell receives"
+#~ msgstr "L'ordre especificada en PARAMETRE s'ha de llegir i executar quan"
+
+#~ msgid "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are"
+#~ msgstr "l'int?rpret d'ordres rep alguna senyal de SIGNAL_SPEC. Si s'omet"
+
+#~ msgid "reset to their original values. If ARG is the null string each"
+#~ msgstr "PARAMETRE s'inicialitzen totes les senyals especificades als seus"
+
+#~ msgid "SIGNAL_SPEC is ignored by the shell and by the commands it invokes."
+#~ msgstr "corresponents valors originals Si el PARAMETRE ?s una cadena buida"
+
+#~ msgid "If SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from"
+#~ msgstr ""
+#~ "l'int?rpret, i les ordres que els invoquen, ignoren cada SIGNAL_SPEC."
+
+#~ msgid "the shell. If SIGNAL_SPEC is DEBUG, ARG is executed after every"
+#~ msgstr "Si s'especifica SIGNAL_SPEC com EXIT(0), s'executa l'ordre"
+
+#~ msgid "command. If ARG is `-p' then the trap commands associated with"
+#~ msgstr ""
+#~ "especificada en PARAMETRE despr?s de la finalitzaci? de la sessi? de\n"
+#~ "l'int?rpret d'ordres. Si s'especifica DEBUG en SIGNAL_SPEC, s'executa"
+
+#~ msgid "each SIGNAL_SPEC are displayed. If no arguments are supplied or if"
+#~ msgstr ""
+#~ "l'ordre especificada en PARAMETRE despr?s de la finalitzaci? de la\n"
+#~ "sessi? de l'int?rpret d'ordres. Si s'especifica \"-p\" en PARAMETRE"
+
+#~ msgid "only `-p' is given, trap prints the list of commands associated with"
+#~ msgstr ""
+#~ "aleshores es mostren les ordres de ?trap? associades amb cadascuna de\n"
+#~ "les especificacions del SENYAL. Si no s'especifica cap par?metre,"
+
+#~ msgid ""
+#~ "each signal number. SIGNAL_SPEC is either a signal name in <signal.h>"
+#~ msgstr ""
+#~ "?trap? mostra una llista d'ordres associades amb cadascun dels n?meros\n"
+#~ "de senyal. L'especificaci? del SENYAL pot ser b? un nom de senyal"
+
+#~ msgid ""
+#~ "or a signal number. `trap -l' prints a list of signal names and their"
+#~ msgstr ""
+#~ "especificat en <signal.h>, b? tindre un valor num?ric. L'ordre ?trap\n"
+#~ "-l? mostra una llista dels noms de senyal i els seus corresponents"
+
+#~ msgid "corresponding numbers. Note that a signal can be sent to the shell"
+#~ msgstr "n?meros. Observeu que una senyal pot ser lliurada a l'int?rpret"
+
+#~ msgid "with \"kill -signal $$\"."
+#~ msgstr "d'ordres amb ?kill -signal $$?."
+
+#~ msgid "For each NAME, indicate how it would be interpreted if used as a"
+#~ msgstr ""
+#~ "Per a cada NOM, indica com s'hauria d'interpretar si es fa servir com "
+
+#~ msgid "If the -t option is used, returns a single word which is one of"
+#~ msgstr ""
+#~ "Si es fa servir l'opci? \"-t\", retorna una paraula ?nica que pot ser"
+
+#~ msgid ""
+#~ "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an"
+#~ msgstr ""
+#~ "\"alias\", \"keyword\", \"function\", \"builtin\", \"file\" o \"\", si un "
+#~ "NOM ?s"
+
+#~ msgid ""
+#~ "alias, shell reserved word, shell function, shell builtin, disk file,"
+#~ msgstr ""
+#~ "un ?lies, una paraula reservada, una funci?, una ordre integrada, un"
+
+#~ msgid "or unfound, respectively."
+#~ msgstr "fitxer del disc o no trobat, respectivament."
+
+#~ msgid "If the -p flag is used, either returns the name of the disk file"
+#~ msgstr ""
+#~ "Si es fa servir l'opci? \"-p\", o b? retorna el nom del fitxer del disc"
+
+#~ msgid "that would be executed, or nothing if -t would not return `file'."
+#~ msgstr ""
+#~ "que es podria executar, o b? no retorna res si l'opci? \"-t\" no\n"
+#~ "retornara \"file\"."
+
+#~ msgid "If the -a flag is used, displays all of the places that contain an"
+#~ msgstr ""
+#~ "Si es fa servir el senyalador \"-a\", mostra totes les ubicacions que"
+
+#~ msgid ""
+#~ "executable named `file'. This includes aliases and functions, if and"
+#~ msgstr ""
+#~ "contenen un executable anomenat \"file\". Aix? inclou per a ?lies i"
+
+#~ msgid "only if the -p flag is not also used."
+#~ msgstr ""
+#~ "funcions si, i nom?s si, el senyalador \"-p\" tampoc no es fa servir."
+
+#~ msgid "Type accepts -all, -path, and -type in place of -a, -p, and -t,"
+#~ msgstr ""
+#~ "L'ordre integrada ?type? accepta que s'especifique \"-all\", \"-path\", i"
+
+#~ msgid "respectively."
+#~ msgstr ""
+#~ "\"-type\", per a les opcions de \"-a\", \"-p\", i \"-t\", respectivament."
+
+#~ msgid "Ulimit provides control over the resources available to processes"
+#~ msgstr "L'ordre integrada ?ulimit? inclou el control sobre els recursos"
+
+#~ msgid "started by the shell, on systems that allow such control. If an"
+#~ msgstr "disponibles als processos iniciats per l'int?rpret, en sistemes que"
+
+#~ msgid "option is given, it is interpreted as follows:"
+#~ msgstr ""
+#~ "ho permeten. Si s'especifica una opci?, ser? especificada com\n"
+#~ "segueix:"
+
+#~ msgid " -S\tuse the `soft' resource limit"
+#~ msgstr " -S\tutilitza el l?mit dels recursos l?gics"
+
+#~ msgid " -H\tuse the `hard' resource limit"
+#~ msgstr " -H\tutilitza el l?mit dels recursos de maquinari"
+
+#~ msgid " -a\tall current limits are reported"
+#~ msgstr " -a\tmostra tots els l?mits actuals"
+
+#~ msgid " -c\tthe maximum size of core files created"
+#~ msgstr ""
+#~ " -c\tlimita la grand?ria m?xima dels fitxers de bolcat de mem?ria"
+
+#~ msgid " -d\tthe maximum size of a process's data segment"
+#~ msgstr " -d\tlimita la grand?ria m?xima d'un segment de proc?s de dades"
+
+#~ msgid " -m\tthe maximum resident set size"
+#~ msgstr " -m\tlimita la grand?ria m?xima d'una variable resident"
+
+#~ msgid " -s\tthe maximum stack size"
+#~ msgstr " -s\tlimita la grand?ria m?xima de la pila"
+
+#~ msgid " -t\tthe maximum amount of cpu time in seconds"
+#~ msgstr " -t\tlimita el temps m?xim d'an?lisi per la UCP en segons"
+
+#~ msgid " -f\tthe maximum size of files created by the shell"
+#~ msgstr " -f\tlimita la grand?ria d'un fitxer creat per l'int?rpret"
+
+#~ msgid " -p\tthe pipe buffer size"
+#~ msgstr " -p\tlimita la grand?ria de la mem?ria interm?dia d'un conducte"
+
+#~ msgid " -n\tthe maximum number of open file descriptors"
+#~ msgstr " -n\tlimita el nombre m?xim utilitzable de descriptors de fitxer"
+
+#~ msgid " -u\tthe maximum number of user processes"
+#~ msgstr " -u\tlimita el nombre m?xim de processos per usuari"
+
+#~ msgid " -v\tthe size of virtual memory"
+#~ msgstr " -v\tlimita la grand?ria de la mem?ria virtual"
+
+#~ msgid "If LIMIT is given, it is the new value of the specified resource."
+#~ msgstr "Si s'especifica LIMIT, aquest ser? el nou valor del recurs "
+
+#~ msgid "Otherwise, the current value of the specified resource is printed."
+#~ msgstr "especificat. Altrament, mostra el valor actual del recurs"
+
+#~ msgid "If no option is given, then -f is assumed. Values are in 1k"
+#~ msgstr "especificat. Si no s'especifica cap opci?, aleshores s'assumeix"
+
+#~ msgid "increments, except for -t, which is in seconds, -p, which is in"
+#~ msgstr ""
+#~ "l'opci? \"-f\". Els valors s'especifiquen en increments de 1k, tret del"
+
+#~ msgid "increments of 512 bytes, and -u, which is an unscaled number of"
+#~ msgstr ""
+#~ "cas de l'opci? \"-t\", que es en segons, de l'opci? \"-p\", que es tracta"
+
+#~ msgid "processes."
+#~ msgstr ""
+#~ "d'increments de 512 octets, i de l'opci? \"-u\", que ?s un recompte\n"
+#~ "num?ric de processos."
+
+#~ msgid ""
+#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if"
+#~ msgstr ""
+#~ "La m?scara dels modes d'acc?s durant la creaci? d'un fitxer ?s MODE."
+
+#~ msgid ""
+#~ "`-S' is supplied, the current value of the mask is printed. The `-S'"
+#~ msgstr ""
+#~ "Si s'omet MODE, o si s'especifica l'opci? \"-S\", es mostra el valor"
+
+#~ msgid ""
+#~ "option makes the output symbolic; otherwise an octal number is output."
+#~ msgstr ""
+#~ "actual de la m?scara. Amb l'opci? \"-S\" es mostra de manera simb?lica;"
+
+#~ msgid "If MODE begins with a digit, it is interpreted as an octal number,"
+#~ msgstr ""
+#~ "d'altra manera l'eixida de dades ?s n?meros octals. Si MODE comen?a"
+
+#~ msgid ""
+#~ "otherwise it is a symbolic mode string like that accepted by chmod(1)."
+#~ msgstr ""
+#~ "per un d?git, aquest ser? interpretat com un n?mero octal, altrament"
+
+#~ msgid ""
+#~ "Wait for the specified process and report its termination status. If"
+#~ msgstr "s'accepten els valors simb?lics de ?chmod? (veure ?man?, secci? 1)."
+
+#~ msgid "N is not given, all currently active child processes are waited for,"
+#~ msgstr "Espera la fi d'execuci? d'un proc?s especificat i informa el seu"
+
+#~ msgid "and the return code is zero. N may be a process ID or a job"
+#~ msgstr ""
+#~ "estat de fi d'execuci?. Si no s'especifica N, s'espera per tots els"
+
+#~ msgid "specification; if a job spec is given, all processes in the job's"
+#~ msgstr ""
+#~ "processos fills actuals, i el codi de retorn ?s zero. La variable N"
+
+#~ msgid "pipeline are waited for."
+#~ msgstr ""
+#~ "pot ser un IDentificador de proc?s o l'especificaci? d'una tasca; si\n"
+#~ "s'especifica una especificaci? de tasca, s'esperen per tots els\n"
+#~ "processos dels conductes."
+
+#~ msgid "and the return code is zero. N is a process ID; if it is not given,"
+#~ msgstr "i el codi de retorn ?s zero. El par?metre N ?s un IDentificador de"
+
+#~ msgid "all child processes of the shell are waited for."
+#~ msgstr ""
+#~ "proc?s; si aquest no s'hi especifica, s'espera per tots els processos\n"
+#~ "fills de l'int?rpret d'ordres."
+
+#~ msgid "The `for' loop executes a sequence of commands for each member in a"
+#~ msgstr ""
+#~ "L'ordre de repetici? ?for? executa una seq??ncia d'ordres per a cada"
+
+#~ msgid ""
+#~ "list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is"
+#~ msgstr ""
+#~ "item de la llista. Si no s'especifica l'expressi? \"in WORDS...;\","
+
+#~ msgid ""
+#~ "assumed. For each element in WORDS, NAME is set to that element, and"
+#~ msgstr ""
+#~ "aleshores es fa servir el contingut de \"$@\". Per a cada element que"
+
+#~ msgid "the COMMANDS are executed."
+#~ msgstr ""
+#~ "hi ha en PARAULES, s'inicialitza NOM a aquest element, i s'executen\n"
+#~ "les ORDRES."
+
+#~ msgid "The WORDS are expanded, generating a list of words. The"
+#~ msgstr "S'expandeix les PARAULES, generant-se una llista de paraules. Es"
+
+#~ msgid "set of expanded words is printed on the standard error, each"
+#~ msgstr "mostra el conjunt de les paraules expandides per l'eixida d'error"
+
+#~ msgid "preceded by a number. If `in WORDS' is not present, `in \"$@\"'"
+#~ msgstr ""
+#~ "est?ndard, precedit d'un n?mero. Si no s'especifica l'expressi? \"in"
+
+#~ msgid "is assumed. The PS3 prompt is then displayed and a line read"
+#~ msgstr "WORDS\", es fa servir el contingut de \"$@\". Aleshores s'exhibeix"
+
+#~ msgid "from the standard input. If the line consists of the number"
+#~ msgstr "l'indicador de PS3 i es llegeix la l?nia des de l'entrada de dades"
+
+#~ msgid "corresponding to one of the displayed words, then NAME is set"
+#~ msgstr ""
+#~ "est?ndard. Si la l?nia consisteix d'un n?mero corresponent a una de"
+
+#~ msgid "to that word. If the line is empty, WORDS and the prompt are"
+#~ msgstr "les paraules exhibides, aleshores el valor de la variable NOM"
+
+#~ msgid "redisplayed. If EOF is read, the command completes. Any other"
+#~ msgstr ""
+#~ "s'inicialitza amb aquesta paraula. Si la l?nia ?s buida, la variable"
+
+#~ msgid "value read causes NAME to be set to null. The line read is saved"
+#~ msgstr ""
+#~ "PARAULES i l'indicador s'exhibeixen una altra vegada. Si es detecta"
+
+#~ msgid "in the variable REPLY. COMMANDS are executed after each selection"
+#~ msgstr ""
+#~ "un la fi del fitxer (EOF), l'ordre termina. Si es llegeix qualsevol"
+
+#~ msgid "until a break or return command is executed."
+#~ msgstr ""
+#~ "altre valor, s'inicialitzar? el valor de NOM com nul. La l?nia\n"
+#~ "llegida s'al?a en la variable REPLY. Les ordres al?ades en el\n"
+#~ "par?metre ORDRES s'executa despr?s de cada selecci? fins que s'execute\n"
+#~ "una ordre de ?break? o ?return?."
+
+#~ msgid "`|' is used to separate multiple patterns."
+#~ msgstr ""
+#~ "concord?ncia del valor en PARAULA amb del valor en PATRO. Es fa\n"
+#~ "servir el signe \"|\" per a separar m?ltiples patrons."
+
+#~ msgid ""
+#~ "The if COMMANDS are executed. If the exit status is zero, then the then"
+#~ msgstr "S'executen els ORDRES ?if?. Si l'estat d'eixida ?s zero, aleshores"
+
+#~ msgid ""
+#~ "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed"
+#~ msgstr ""
+#~ "s'executen les ORDRES ?then?. Altrament, s'executen cadascun de les"
+
+#~ msgid ""
+#~ "in turn, and if the exit status is zero, the corresponding then COMMANDS"
+#~ msgstr "ORDRES de ?elif?, i si l'estat d'eixida ?s zero, les corresponents"
+
+#~ msgid ""
+#~ "are executed and the if command completes. Otherwise, the else COMMANDS"
+#~ msgstr "ORDRES de ?else? s'executen, si n'hi han. L'estat d'eixida ?s el"
+
+#~ msgid ""
+#~ "are executed, if present. The exit status is the exit status of the last"
+#~ msgstr "corresponent de la darrera ordre executada, o zero si no hi ha cap"
+
+#~ msgid "command executed, or zero if no condition tested true."
+#~ msgstr "condici? resolta com a certa."
+
+#~ msgid "`while' COMMANDS has an exit status of zero."
+#~ msgstr "de la instrucci? ?while? tinga un estat d'eixida igual a zero."
+
+#~ msgid "`until' COMMANDS has an exit status which is not zero."
+#~ msgstr "de la instrucci? ?until? tinga un estat d'eixida que no siga zero."
+
+#~ msgid "Create a simple command invoked by NAME which runs COMMANDS."
+#~ msgstr "Crea una ordre simple invocada pel NOM que executa ORDRES. Els "
+
+#~ msgid "Arguments on the command line along with NAME are passed to the"
+#~ msgstr ""
+#~ "par?metres especificats al llarg de la l?nia de l'ordre es passen a la"
+
+#~ msgid "function as $0 .. $n."
+#~ msgstr "funci? com a $0 ... $n."
+
+#~ msgid "entire set of commands."
+#~ msgstr "redireccionar un conjunt sencer d'ordres."
+
+#~ msgid "This is similar to the `fg' command. Resume a stopped or background"
+#~ msgstr "A?? ?s semblant amb qu? passa amb l'ordre ?fg?. Repr?n una tasca "
+
+#~ msgid "job. If you specifiy DIGITS, then that job is used. If you specify"
+#~ msgstr ""
+#~ "aturada o ubicada en segon pla. Si especifiqueu DIGITS, aleshores es"
+
+#~ msgid ""
+#~ "WORD, then the job whose name begins with WORD is used. Following the"
+#~ msgstr "fa servir aquesta tasca. Si especifiqueu PARAULES, aleshores es fa"
+
+#~ msgid "job specification with a `&' places the job in the background."
+#~ msgstr ""
+#~ "servir la tasca, el nom de la qual comence pel valor en PARAULA. Si\n"
+#~ "s'especifica la tasca comen?ant pel signe \"&\" s'ubica la tasca en\n"
+#~ "segon pla."
+
+#~ msgid "BASH_VERSION The version numbers of this Bash."
+#~ msgstr "BASH_VERSION Cont? la versi? de Bash."
+
+#~ msgid "CDPATH A colon separated list of directories to search"
+#~ msgstr "CDPATH Cont? una llista de directoris, separats"
+
+#~ msgid "\t\twhen the argument to `cd' is not found in the current"
+#~ msgstr ""
+#~ " pel signe de dos punts, per a cercar quan el par?metre"
+
+#~ msgid "\t\tdirectory."
+#~ msgstr ""
+#~ " especificat per a l'ordre ?cd? no es troba en el\n"
+#~ " directori actual."
+
+#~ msgid ""
+#~ "HISTFILE The name of the file where your command history is stored."
+#~ msgstr ""
+#~ "HISTFILE Cont? el nom del fitxer on ?s al?ada l'hist?ric\n"
+#~ " d'ordres executades."
+
+#~ msgid "HISTFILESIZE The maximum number of lines this file can contain."
+#~ msgstr ""
+#~ "HISTFILESIZE Cont? el nombre m?xim de l?nies que un fitxer pot \n"
+#~ " contindre."
+
+#~ msgid "HISTSIZE The maximum number of history lines that a running"
+#~ msgstr "HISTSIZE Cont? el nombre m?xim de l?nies de l'hist?ric que "
+
+#~ msgid "\t\tshell can access."
+#~ msgstr " l'int?rpret d'ordres pot accedir."
+
+#~ msgid "HOME The complete pathname to your login directory."
+#~ msgstr ""
+#~ "HOME Cont? el nom cam? d'acc?s cap el directori de la\n"
+#~ " vostra sessi? d'usuari."
+
+#~ msgid ""
+#~ "HOSTTYPE The type of CPU this version of Bash is running under."
+#~ msgstr ""
+#~ "HOSTTYPE Cont? la mena de CPU sota la qual aquesta versi?\n"
+#~ " de bash est? corrent."
+
+#~ msgid ""
+#~ "IGNOREEOF Controls the action of the shell on receipt of an EOF"
+#~ msgstr ""
+#~ "IGNOREOEOF Controla l'acci? de l'int?rpret d'ordres quan rep un"
+
+#~ msgid "\t\tcharacter as the sole input. If set, then the value"
+#~ msgstr " car?cter de fi de fitxer (EOF) com a ?nica entrada."
+
+#~ msgid "\t\tof it is the number of EOF characters that can be seen"
+#~ msgstr " Si s'activa, aleshores el seu valor ?s el nombre de"
+
+#~ msgid "\t\tin a row on an empty line before the shell will exit"
+#~ msgstr ""
+#~ " car?cters EOF que pot ser mostrat en un afilera d'una"
+
+#~ msgid "\t\t(default 10). When unset, EOF signifies the end of input."
+#~ msgstr ""
+#~ " l?nia bu?da despr?s de que l'int?rpret eixir? (per\n"
+#~ " omissi? el valor ?s 10). Quan ?s desactivat, EOF vol\n"
+#~ " dir que s'ha finalitzat l'entrada de dades."
+
+#~ msgid "MAILCHECK\tHow often, in seconds, Bash checks for new mail."
+#~ msgstr ""
+#~ "MAILCHECK Cont? el temps, en segons, pel qual bash cada vegada \n"
+#~ " comprova si hi ha nou correu."
+
+#~ msgid "MAILPATH\tA colon-separated list of filenames which Bash checks"
+#~ msgstr "MAILPATH Cont? una llista de noms de fitxers, separats pel "
+
+#~ msgid "\t\tfor new mail."
+#~ msgstr " signe \":\", on Bash comprova si hi ha correu nou."
+
+#~ msgid "OSTYPE\t\tThe version of Unix this version of Bash is running on."
+#~ msgstr ""
+#~ "OSTYPE Cont? la versi? d'Unix sota la qual aquesta versi? de \n"
+#~ " Bash est? corrent."
+
+#~ msgid "PATH A colon-separated list of directories to search when"
+#~ msgstr "PATH Cont? una llista de directoris, separats pel signe "
+
+#~ msgid "\t\tlooking for commands."
+#~ msgstr " \":\", per on es recorrer? quan es busca una ordre."
+
+#~ msgid "PROMPT_COMMAND A command to be executed before the printing of each"
+#~ msgstr ""
+#~ "PROMPT_COMMAND Cont? l'ordre que s'executar? despr?s de mostrar-se "
+
+#~ msgid "\t\tprimary prompt."
+#~ msgstr " cada indicador primari."
+
+#~ msgid "PS1 The primary prompt string."
+#~ msgstr "PS1 Cont? la cadena de l'indicador primari."
+
+#~ msgid "PS2 The secondary prompt string."
+#~ msgstr "PS2 Cont? la cadena de l'indicador secundari."
+
+#~ msgid "TERM The name of the current terminal type."
+#~ msgstr "TERM Cont? el nom de la mena de terminal actual."
+
+#~ msgid "auto_resume Non-null means a command word appearing on a line by"
+#~ msgstr "auto_resume Cont? el nom de l'ordre que es buscar? primer d'una"
+
+#~ msgid "\t\titself is first looked for in the list of currently"
+#~ msgstr ""
+#~ " llista de tasques actualment aturades. Si se'n troba,"
+
+#~ msgid "\t\tstopped jobs. If found there, that job is foregrounded."
+#~ msgstr ""
+#~ " aquesta tasca s'ubicar? en primer pla. Amb el valor"
+
+#~ msgid "\t\tA value of `exact' means that the command word must"
+#~ msgstr " de \"exact\" el nom de l'ordre ha de coincidir"
+
+#~ msgid "\t\texactly match a command in the list of stopped jobs. A"
+#~ msgstr " exactament una ordre qu? es trobe a la llista de"
+
+#~ msgid "\t\tvalue of `substring' means that the command word must"
+#~ msgstr " tasques aturades. Amb \"substring\", la paraula de"
+
+#~ msgid "\t\tmatch a substring of the job. Any other value means that"
+#~ msgstr ""
+#~ " l'ordre ha de coincidir parcialment amb el nom de la"
+
+#~ msgid "\t\tthe command must be a prefix of a stopped job."
+#~ msgstr ""
+#~ " tasca (una subcadena d'aquesta). Altrament, amb\n"
+#~ " qualsevol altre valor la paraula de l'ordre ha de\n"
+#~ " coincidir amb un prefix de la tasca aturada."
+
+#~ msgid "command_oriented_history"
+#~ msgstr "command_oriented_history"
+
+#~ msgid ""
+#~ " Non-null means to save multiple-line commands together on"
+#~ msgstr ""
+#~ " Si no ?s buit, s'al?ar? juntament les ordres escrites"
+
+#~ msgid " a single history line."
+#~ msgstr ""
+#~ " en m?ltiples l?nies en una sola l?nia de l'hist?ric."
+
+#~ msgid "histchars Characters controlling history expansion and quick"
+#~ msgstr "histchars Cont? els car?cters que controlen l'expansi? de "
+
+#~ msgid "\t\tsubstitution. The first character is the history"
+#~ msgstr " l'hist?ric i la substituci? r?pida. El primer"
+
+#~ msgid "\t\tsubstitution character, usually `!'. The second is"
+#~ msgstr " car?cter ?s el de substituci? de l'hist?ric,"
+
+#~ msgid "\t\tthe `quick substitution' character, usually `^'. The"
+#~ msgstr " normalment \"!\". El segon ?s el de \"substituci?"
+
+#~ msgid "\t\tthird is the `history comment' character, usually `#'."
+#~ msgstr ""
+#~ " r?pida\", normalment \"^\". El tercer ?s el de\n"
+#~ " \"comentari de l'hist?ric\", normalment \"#\"."
+
+#~ msgid "HISTCONTROL\tSet to a value of `ignorespace', it means don't enter"
+#~ msgstr "HISTCONTROL Si s'hi especifica \"ignorespace\", no s'introduir?"
+
+#~ msgid "\t\tlines which begin with a space or tab on the history"
+#~ msgstr ""
+#~ " l?nies que comencen amb un espai o de tabulaci? en la"
+
+#~ msgid "\t\tlist. Set to a value of `ignoredups', it means don't"
+#~ msgstr ""
+#~ " llista de l'hist?ric. Si s'activa amb \"ignoredups\","
+
+#~ msgid "\t\tenter lines which match the last entered line. Set to"
+#~ msgstr ""
+#~ " no s'introduir? l?nies que concidisquen amb la darrera"
+
+#~ msgid "\t\t`ignoreboth' means to combine the two options. Unset,"
+#~ msgstr ""
+#~ " l?nia executada. Amb \"ignoreboth\" s'actuar? amb els"
+
+#~ msgid "\t\tor set to any other value than those above means to save"
+#~ msgstr " dos criteris anteriors alhora. Desactivada, o"
+
+#~ msgid "\t\tall lines on the history list."
+#~ msgstr ""
+#~ " especificant-se qualsevol altre valor, que no siga un\n"
+#~ " dels esmentats anteriorment, al?a totes les l?nies a\n"
+#~ " la llista de l'hist?ric."
+
+#~ msgid "Toggle the values of variables controlling optional behavior."
+#~ msgstr ""
+#~ "Commuta els valors de les variables, controlant els comportaments \n"
+#~ "opcionals."
+
+#~ msgid "The -s flag means to enable (set) each OPTNAME; the -u flag"
+#~ msgstr ""
+#~ "El senyalador ?-s? activa cada variable de OPTNAME; el senyalador \"-u\" "
+
+#~ msgid "unsets each OPTNAME. The -q flag suppresses output; the exit"
+#~ msgstr "desactiva cada OPTNAME. El senyalador \"-q\" suprimeix l'eixida de"
+
+#~ msgid "status indicates whether each OPTNAME is set or unset. The -o"
+#~ msgstr "dades; l'estat d'eixida indica si cada OPTNAME ?s activat o no."
+
+#~ msgid "option restricts the OPTNAMEs to those defined for use with"
+#~ msgstr "L'opci? \"o\" restringeix els OPTNAMEs d'aquells definits per a"
+
+#~ msgid "`set -o'. With no options, or with the -p option, a list of all"
+#~ msgstr "utilitzar-ho amb l'ordre ?set -o?. Sense cap opci?, o amb l'opci?"
+
+#~ msgid "settable options is displayed, with an indication of whether or"
+#~ msgstr ""
+#~ "\"-p\", s'exhibeix una llista de totes les opcions activables, amb una"
+
+#~ msgid "not each is set."
+#~ msgstr "indicaci? si ja ho ?s o no."
diff --git a/po/cs.gmo b/po/cs.gmo
new file mode 100644
index 0000000..5d92d8f
--- /dev/null
+++ b/po/cs.gmo
Binary files differ
diff --git a/po/cs.po b/po/cs.po
new file mode 100644
index 0000000..579ba71
--- /dev/null
+++ b/po/cs.po
@@ -0,0 +1,6121 @@
+# Czech tranlation for bash.
+# Copyright (C) 2008 Free Software Foundation, Inc.
+# This file is distributed under the same license as the bash package.
+# Petr Pisar <petr.pisar@atlas.cz>, 2008, 2009.
+#
+# subscript → podskript
+# subroutine → podprogram
+# completition options → možnosti doplňování
+# shell option → pÅ™epínaÄ shellu (shopt)
+# Názvy signálu a stavů procesu by měly souhlasit se signal(7).
+msgid ""
+msgstr ""
+"Project-Id-Version: bash 4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2009-09-23 14:23+0200\n"
+"Last-Translator: Petr Pisar <petr.pisar@atlas.cz>\n"
+"Language-Team: Czech <translation-team-cs@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "chybný podskript pole"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr "%s: Äíslované pole nezle pÅ™evést na pole asociativní"
+
+#: arrayfunc.c:480
+#, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: neplatný klÃ­Ä asociativního pole"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: pÅ™es neÄíselný indexu nelze dosadit"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr "%s: %s: při přiřazovaní asociativního pole se musí použít podskript"
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: nelze vytvořit: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr "bash_execute_unix_command: pro příkaz nelze nalézt klávesovou mapu "
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: první nebílý znak není „\"“"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "ne zavírající „%c“ v %s"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: chybí dvojteÄkový oddÄ›lovaÄ"
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "„%s“: chybný název klávesové mapy"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr "upravování řádku není povoleno"
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "„%s“: chybný název klávesové mapy"
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: nelze Äíst: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "„%s“: nelze zrušit vazbu"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "„%s“: neznámé jméno funkce"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s není svázán s žádnou klávesou.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s lze vyvolat přes "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr "poÄet smyÄek"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "má smysl jen ve smyÄkách „for“, „while“ nebo „until“"
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+"Vrátí kontext aktuálního volání podprogramu.\n"
+" \n"
+" Bez VÃRAZU vrátí "
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "není nestavena HOME"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "není nastaveno OLDPWD"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr "řádek %d: "
+
+#: builtins/common.c:139 error.c:261
+#, c-format
+msgid "warning: "
+msgstr "varování: "
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr "%s: užití: "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "příliš mnoho argumentů"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: pÅ™epínaÄ vyžaduje argument"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: vyžadován Äíselný argument"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: nenalezeno"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: chybný pÅ™epínaÄ"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: chybný název pÅ™epínaÄe"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "„%s“: není platným identifikátorem"
+
+#: builtins/common.c:238
+msgid "invalid octal number"
+msgstr "neplatné osmiÄkové Äíslo"
+
+#: builtins/common.c:240
+msgid "invalid hex number"
+msgstr "chybné Å¡estnáctkové Äíslo"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "chybné Äíslo"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: chybné urÄení signálu"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "„%s“: není PID ani platným oznaÄením úlohy"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: promÄ›nná pouze pro Ätení"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s mimo rozsah"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "argument"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s mimo rozsah"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: žádná taková úloha"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: žádné řízení úloh"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "žádné řízení úloh"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: omezeno"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "omezeno"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: není vestavěným příkazem shellu"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "chyba zápisu: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr "chyba při nastavování vlastností terminálu: %s"
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr "chyba při získávání vlastností terminálu: %s"
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: chyba pÅ™i zjiÅ¡Å¥ování souÄasného adresáře: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: nejednoznaÄné urÄení úlohy"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: neplatný název akce"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: žádné doplňování neurÄeno"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "varování: pÅ™epínaÄ -F možná nebude dÄ›lat, co jste Äekali"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "varování: pÅ™epínaÄ -C možná nebude dÄ›lat, co jste Äekali"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr "doplňovací funkce se právě nevykonává"
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "může být použito jen ve funkci"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "„-f“ nezle použít na výrobu funkce"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: funkce jen pro Ätení"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: takto nelze likvidovat pole"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr "%s: asociativní pole nelze pÅ™evést na Äíslované pole"
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "dynamické nahrávání není dostupné"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "sdílený objekt %s nelze otevřít: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "ve sdílením objektu %2$s nelze nalézt %1$s: %3$s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: není dynamicky nahráno"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: nelze smazat: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: je adresářem"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: není obyÄejný soubor"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: soubor je příliš velký"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: binární soubor nelze spustit"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: nelze provést: %s"
+
+# XXX: Toto je zpráva interaktivního shellu při příkazu exit informující
+# o odhlášení
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr "odhlášení\n"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "toto není login shell: použijte „exit“"
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "Jsou zde pozastavení úlohy.\n"
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr "Jsou zde běžící úlohy.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "žádný příkaz nenalezen"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "urÄení historie"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: doÄasný soubor nelze otevřít: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr "souÄasný"
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "úloha %d spuštěna bez správy úloh"
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: chybný pÅ™epínaÄ – %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: pÅ™epínaÄ vyžaduje argument – %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "hashování zakázáno"
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: tabulka hashů je prázdná\n"
+
+#: builtins/hash.def:244
+#, c-format
+msgid "hits\tcommand\n"
+msgstr "zásahů\tpříkaz\n"
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Příkazy shellu shodující se s klíÄovým slovem „"
+msgstr[1] "Příkazy shellu shodující se s klíÄovými slovy „"
+msgstr[2] "Příkazy shellu shodující se s klíÄovými slovy „"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"žádné téma nápovědy se nehodí pro „%s“. Zkuste „help help“ nebo „man -k %s“ "
+"nebo „info %s“."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: nelze otevřít: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"Tyto příkazy shellu jsou vnitřně definovány. Napište „help“, abyste získali\n"
+"tento seznam. Podrobnosti o funkci „název“ získáte příkazem „help název“.\n"
+"Příkazem „info bash“ získáte obecné informace o tomto shellu.\n"
+"Použijte „man -k“ nebo „info“, chcete-li zjistit více o příkazech, které\n"
+"na tomto seznamu nejsou.\n"
+"\n"
+"HvÄ›zdiÄka (*) vedle jména znamená, že příkaz je zakázán.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "nelze použít více jak jeden z -anrw"
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "místo v historii"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: expanze historie selhala"
+
+#: builtins/inlib.def:71
+#, c-format
+msgid "%s: inlib failed"
+msgstr "%s: inlib selhala"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "s „-x“ nejsou dovoleny další pÅ™epínaÄe"
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: argumenty musí být proces nebo identifikátor úlohy"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Neznámá chyba"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "oÄekáván výraz"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: není (proměnnou typu) pole"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: chybné urÄení deskriptoru souboru"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: neplatný deskriptor souboru: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, c-format
+msgid "%s: invalid line count"
+msgstr "%s: chybný poÄet řádků"
+
+#: builtins/mapfile.def:277
+#, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: chybný poÄátek pole"
+
+#: builtins/mapfile.def:294
+#, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: neplatné množství mezi voláními"
+
+#: builtins/mapfile.def:326
+msgid "empty array variable name"
+msgstr "prázdný název proměnné typu pole"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr "je vyžadována podpora proměnných typu pole"
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "„%s“: postrádám formátovací znak"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "„%c“: neplatný formátovací znak"
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr "varování: %s: %s"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "u \\x chybí Å¡estnáctková Äíslovka"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "žádný další adresář"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<žádný aktuální adresář>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr "prázdný zásobník adresářů"
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr "pořadí v zásobníku adresářů"
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+"Zobrazí seznam právě zapamatovaných adresářů. Adresáře si najdou svoji\n"
+" cestu na seznam příkazem „pushd“ a procházet seznamem zpět lze příkazem\n"
+" „popd“.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -c\tvyprázdní zásobník adresářů tím, že smaže všechny jeho prvky\n"
+" -l\tnevypisuje adresáře relativní vašemu domovskému adresáři pomocí\n"
+" \tvlnkové předpony\n"
+" -p\tvypíše zásobník adresářů stylem jedna položka na jeden řádek\n"
+" -v\tvypíše zásobník adresářů stylem jedna položka na jeden řádek\n"
+" \tuvozená svojí pozicí na zásobníku\n"
+" \n"
+" Argumenty:\n"
+" +N\tZobrazí N. položku poÄítáno zleva na seznamu, který zobrazuje\n"
+" \tdirs, když je vyvolán bez pÅ™epínaÄů, poÄínaje nulou.\n"
+" \n"
+" -N\tZobrazí N. položku poÄítáno zprava na seznamu, který zobrazuje\n"
+" \tdirs, když je vyvolán bez pÅ™epínaÄů, poÄínaje nulou."
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Přidá adresář na vrchol zásobníku adresářů nebo zásobník zrotuje tak,\n"
+" že nový vrchol zásobníku se stane souÄasným pracovním adresářem. Bez\n"
+" argumentů prohodí dva vrchní adresáře.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -n\tPotlaÄí obvyklou zmÄ›nu adresáře, když se na zásobník pÅ™idávají\n"
+" \tadresáře, takže změněn bude pouze zásobník.\n"
+" \n"
+" Argumenty:\n"
+" +N\tZrotuje zásobník tak, že N. adresář (poÄítáno zleva na seznamu\n"
+" \tzobrazovaném pomocí „dirs“, poÄínaje nulou) se dostane na vrchol.\n"
+" \n"
+" -N\tZrotuje zásobník tak, že N. adresář (poÄítáno zprava na seznamu\n"
+" \tzobrazovaném pomocí „dirs“, poÄínaje nulou) se dostane na vrchol.\n"
+" \n"
+" ADRESÃŘ\n"
+" \tPÅ™idá ADRESÃŘ na vrchol zásobníku adresářů a uÄiní jej novým\n"
+" \tsouÄasným pracovním adresářem.\n"
+" \n"
+" Zásobník adresářů si můžete prohlédnout příkazem „dirs“."
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Odstraní položku ze zásobníku adresářů. Bez argumentů odstraní adresář\n"
+" z vrcholu zásobníku a přepne se do nového vrcholového adresáře.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -n\tPotlaÄí obvyklou zmÄ›nu adresáře, když se ze zásobníku odebírají\n"
+" \tadresáře, takže změněn bude pouze zásobník.\n"
+" \n"
+" Argumenty:\n"
+" +N\tOdstraní N. položku poÄítáno zleva na seznamu zobrazovaném pomocí\n"
+" \t„dirs“, poÄínaje nulou. Na příklad: „popd +0“ odstraní první\n"
+" \tadresář, „popd -1“ druhý.\n"
+" \n"
+" -N\tOdstraní N. položku poÄítáno zprava na seznamu zobrazovaném "
+"pomocí\n"
+" \t„dirs“, poÄínaje nulou. Na příklad: „popd -0“ odstraní poslední\n"
+" \tadresář, „popd -1“ další vedle posledního.\n"
+" \n"
+" Zásobník adresářů si můžete prohlédnout příkazem „dirs“."
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: chybné urÄení Äasového limitu"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "chyba Ätení: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr "„return“ lze provést jen z funkce nebo skriptu naÄteného pÅ™es „source“"
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "funkci i promÄ›nnou nelze ruÅ¡it souÄasnÄ›"
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: nelze zrušit"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: nelze zruÅ¡it: %s jen pro Ätení"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: není (proměnnou typu) pole"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: není funkcí"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "poÄet shiftů"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr "pÅ™epínaÄ shellu nelze zároveň nastavit a zruÅ¡it"
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: chybný název pÅ™epínaÄe shellu"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "vyžadován argument s názvem souboru"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: soubor nenalezen"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "nelze pozastavit"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "login shell nelze pozastavit"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "%s je alias na „%s“\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s je klíÄové slovo shellu\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s je funkce\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "%s je souÄást shellu\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s je %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "%s je zahashován (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s: chybný argument s limitou"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "„%c“: chybný příkaz"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: limit nelze zjistit: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr "limit"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: limit nelze změnit: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "osmiÄkové Äíslo"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "„%c“: chybný operátor symbolických práv"
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "„%c“: chybný znak symbolický práv "
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr " řádek "
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "poslední příkaz: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "UkonÄuji…"
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "chyba neznámého příkazu"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "chybný druh příkazu"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "chybný konektor"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "chybný skok"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: nevázaná proměnná"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "Äasový limit pro Äekání na vstup vyprÅ¡el: automatické odhlášení\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "standardní vstup nelze přesměrovat z /dev/null: %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "TIMEFORMAT: „%c“: chybný formátovací znak"
+
+#: execute_cmd.c:2075
+msgid "pipe error"
+msgstr "chyba v rouře"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: omezeno: v názvu příkazu nesmí být „/“"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: příkaz nenalezen"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: chybný interpretr"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "deskriptor souboru %d nelze duplikovat na deskriptor %d"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "úroveň rekurze výrazu byla pÅ™ekroÄena"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "zásobník rekurze podtekl"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "syntaktická chyba ve výrazu"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "pokus o přiřazení do ne-proměnné"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "dělení nulou"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "chyba: chybný expassing token"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "v podmínÄ›ném výrazu oÄekávána „:“"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "mocnitel menší než 0"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr "po pÅ™ednostním zvýšení nebo snížení oÄekáván identifikátor"
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "postrádám „)“"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "syntaktická chyba: oÄekáván operand"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "syntaktická chyba: chybný aritmetický operátor"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s%s%s: %s (chybný token je „%s“)"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "chybný aritmetický základ"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "hodnot je pro základ příliš velká"
+
+#: expr.c:1329
+#, c-format
+msgid "%s: expression error\n"
+msgstr "%s: chyba výrazu\n"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getcwd: rodiÄovské adresáře nejsou přístupné"
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "na deskriptoru %d nelze resetovat režim nodelay"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr "nový deskriptor souboru pro vstup bashe z deskr. %d nelze alokovat"
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "save_bash_input: buffer již pro nový deskriptor %d existuje"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr "start_pipeline: pgrp roury"
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr "forknutý PID %d se objevil v běžící úloze %d"
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "mažu pozastavenou úlohu %d se skupinou procesů %ld"
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr "add_process: proces %5ld (%s) do the_pipeline"
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr "add_process: PID %5ld (%s) oznaÄen za stále živého"
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: %ld: žádný takový PID"
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr "Signál %d"
+
+# XXX: (úloha) dokonÄna. Používat ženský rod i unásledujících. Jedná se
+# o výpis úloh.
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "DokonÄena"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Pozastavena"
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr "Pozastavena (%s)"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "Běží"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "DokonÄena (%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "UkonÄena %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Stav neznámý"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(core dumped [obraz paměti uložen]) "
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr " (cwd: %s)"
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "setpgid na potomku (z %ld na %ld)"
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait: PID %ld není potomkem tohoto shellu"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "wait_for: Žádný záznam o procesu %ld"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job: úloha %d je pozastavena"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: úloha skonÄila"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: úloha %d je již na pozadí"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, c-format
+msgid "%s: line %d: "
+msgstr "%s: řádek %d: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr " (core dumped [obraz paměti uložen])"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(cwd nyní: %s)\n"
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_job_control: getpgrp selhalo"
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_job_control: disciplína linky"
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_job_control: setpgid"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr "nelze nastavit skupinu procesů terminálu (%d)"
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "žádná správa úloh v tomto shellu"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc: předpoklad nesplněn: %s\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"malloc: %s:%d: zbabraný předpoklad\r\n"
+
+#: lib/malloc/malloc.c:313
+msgid "unknown"
+msgstr "není známo"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr "malloc: blok v seznamu uvolněných zbit"
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free: zavoláno s argumentem již uvolněného bloku"
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free: zavoláno s argumentem nenaalokovaného bloku"
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr "free: zjiÅ¡tÄ›no podteÄení, mh_nbytes mimo rozsah"
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free: velikosti poÄáteÄního a koncového kusu se liší"
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc: zavoláno s argumentem nenaalokovaného bloku"
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr "realloc: zjiÅ¡tÄ›no podteÄení, mh_nbytes mimo rozsah"
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "realloc: velikosti poÄáteÄního a koncového kusu se liší"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr "register_alloc: tabulka alokací je plná FIND_ALLOC?\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr "register_alloc: %p již obsažen v tabulce jako alokovaný?\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "register_free: %p již obsažen v tabulce jako volný?\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "chybný základ"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: stroj není znám"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: chybná služba"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: chybné urÄení síťové cesty"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "síťové operace nejsou podporovány"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc: %s:%d: nelze alokovat %'lu bajtů"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc: %s:%d: nelze alokovat %'lu bajtů"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "V $_ máte poštu"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "V $_ máte novou poštu"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "PoÅ¡ta v %s je pÅ™eÄtená\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "chyba syntaxe: vyžadován aritmetický výraz"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "chyba syntaxe: neoÄekávaný „;“"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "chyba syntaxe: „((%s))“"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: chybný druh instrukce %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr "„here“ dokument na řádku %d ukonÄen koncem souboru (požadováno „%s“)"
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr "make_redirection: instrukce přesměrování „%d“ mimo rozsah"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "neoÄekávaný konec souboru pÅ™i hledání znaku odpovídajícímu „%c“"
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "neoÄekávaný konec souboru pÅ™i hledání „]]“"
+
+# XXX: Condional means condition (adj.) probably. Can English distinguish
+# between the condition (podmínkový) and the code branch (podmíněný)? Check
+# for all "conditional" string occurences.
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "chyba syntaxe ve výrazu podmínky: neoÄekávaný token „%s“"
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "chyba syntaxe ve výrazu podmínky"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "neoÄekávaný token „%s“, oÄekávána „)“"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "oÄekávána „)“"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "neoÄekávaný argument „%s“ u podmínkového unárního operátoru"
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "neoÄekávaný argument u podmínkového unárního operátoru"
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "neoÄekávaný token „%s“, oÄekáván podmínkový binární operátor"
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "oÄekáván podmínkový binární operátor"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "neoÄekávaný argument „%s„ u podmínkového binárního operátoru"
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "neoÄekávaný argument u podmínkového binárního operátoru"
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "neoÄekávaný token „%c“ v podmínkovém příkazu"
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "neoÄekávaný token „%s“ v podmínkovém příkazu"
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "neoÄekávaný token %d v podmínkovém příkazu"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "chyba syntaxe poblíž neoÄekávaného tokenu „%s“"
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "chyba syntaxe poblíž „%s“"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "chyba syntaxe: nenadálý konec souboru"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "chyba syntaxe"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Shell lze ukonÄit příkazem „%s“.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "nenadálý konec souboru při hledání odpovídající „)“"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "doplňování: funkce „%s“ nenalezena"
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr "progcomp_insert: %s: NULLOVÃ COMPSPEC"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: chybná propojka „%d“"
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d: neplatný deskriptor souboru: %s"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "cprintf: „%c“: chybný formátovací znak"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "deskriptor souboru mimo rozsah"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: nejednoznaÄné pÅ™esmÄ›rování"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: existující soubor nelze přepsat"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: omezeno: výstup nelze přesměrovat"
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "pro „here“ dokument nelze vytvoÅ™it doÄasný soubor: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: seznam nelze přiřadit do prvku pole"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "/dev/(tcp|udp)/host/port není bez síťování podporováno"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "chyba přesměrování: deskriptor souboru nelze duplikovat"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "nelze nalézt /tmp, vytvořte jej, prosím!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "/tmp musí být platným názvem pro adresář"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: chybný pÅ™epínaÄ"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Nemám žádné jméno!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU bash, verze %s-(%s)\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Použití:\t%s [Dlouhý GNU pÅ™epínaÄ] [pÅ™epínaÄ]…\n"
+"\t%s [Dlouhý GNU pÅ™epínaÄ] [pÅ™epínaÄ] skriptový_soubor…\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "Dlouhé GNU pÅ™epínaÄe:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "PÅ™epínaÄe shellu:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD nebo -c příkaz nebo -O shopt_pÅ™epínaÄ\t(pouze pÅ™i vyvolání)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s nebo -o pÅ™epínaÄ\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"Podrobnosti o pÅ™epínaÄích shellu získáte tím, že napíšete „%s -c \"help set"
+"\"“.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"Podrobnosti o příkazech vestavěných do shellu získáte tím, že\n"
+"napište „%s -c help“.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "Chyby nahlásíte příkazem „bashbug“.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d: neplatná operace"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Falešný signál"
+
+# PÅ™eklady názvů signálů pÅ™evzaty (s mírnými úpravami) z Äeské pÅ™ekladu
+# manuálové stránky signal(7).
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Linka terminálu zavěšena"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Přerušení"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "UkonÄení"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Neplatná instrukce"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "Přerušení při ladění"
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "UkonÄení funkcí abort()"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "Instrukce EMT"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Výjimka pÅ™i práci s pohyblivou řádovou Äárkou"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "Zabit"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "Chyba sběrnice"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Chyba segmentace"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Špatné volání systému"
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "Z roury nikdo neÄte"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Signál ÄasovaÄe"
+
+#: siglist.c:111
+msgid "Terminated"
+msgstr "UkonÄit"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "Čekají urgentní I/O data"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Pozastaveno (signálem)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "PokraÄovat"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "Potomek byl pozastaven nebo zemřel"
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Pozastaveno (vstupem TTY)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Pozastaveno (výstupem na TTY)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "I/O je připraveno"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "Dosažen limit procesorového Äasu"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "Dosažen limit velikosti souboru"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "ÄŒasovaÄ (virtuální)"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "ÄŒasovaÄ (profilovací)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Změna okna"
+
+# XXX: SIGLOST
+#: siglist.c:171
+msgid "Record lock"
+msgstr "Zámek záznamu"
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "Uživatelský signal 1"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "Uživatelský signál 2"
+
+# FIXME: HFT znamená High Frequency Timer? Zkontrolovat i další výskyty
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "vstupní data HFT Äekají"
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "hrozí selhání napájení"
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "hrozí selhání systému"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "přesunout proces na jiný procesor"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "chyba programování"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "Režim HFT sledování přidělen"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "Režim HFT sledování odebrán"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "HFT zvuková posloupnost byla dokonÄena"
+
+#: siglist.c:215
+msgid "Information request"
+msgstr "Požadavek o informaci"
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Neznámé Äíslo signálu"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Neznámý signál Ä. %d"
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "chybná substituce: v %2$s chybí uzavírací „%1$s“"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: seznam nelze přiřadit do prvku pole"
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "nelze vyrobit rouru za úÄelem substituce procesu"
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "nelze vytvoÅ™it potomka za úÄelem substituce procesu"
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "pojmenovanou rouru %s nelze otevřít pro Ätení"
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "pojmenovanou rouru %s nelze otevřít pro zápis"
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "pojmenovanou rouru %s nelze zdvojit jako deskriptor %d"
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "nelze vytvořit rouru pro substituci příkazu"
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr "nelze vytvořit potomka pro substituci příkazu"
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "command_substitute: rouru nelze zdvojit jako deskriptor 1"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: parametr null nebo nenastaven"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: výraz podřetězce < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: chybná substituce"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: takto nelze přiřazovat"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "chybná substituce: v %s chybí uzavírací „`“"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "žádná shoda: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "oÄekáván argument"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: oÄekáván celoÄíselný výraz"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "oÄekávána „)“"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "oÄekávána „)“, nalezeno %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: oÄekáván unární operátor"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: oÄekáván binární operátor"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "postrádám „]“"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "neplatné Äíslo signálu"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps: chybná hodnota v trap_list[%d]: %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr "run_pending_traps: obsluha signálu je SIG_DFL, přeposílám %d (%s) sobě"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: chybný signál %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "chyba při importu definice „%s“"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "úroveň shellu (%d) příliš vysoká, resetuji na 1"
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr "make_local_variable: žádný kontext funkce v aktuálním rozsahu"
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr "all_local_variables: žádný kontext funkce v aktuálním rozsahu"
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: parametr null nebo nenastaven"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "neplatný znak %d v exportstr pro %s"
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "v exportstr pro %s chybí „=“"
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr "pop_var_context: hlava shell_variables není kontextem funkce"
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr "pop_var_context: chybí kontext global_variables"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr "pop_scope: hlava shell_variables není doÄasným rozsahem prostÅ™edí"
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: nelze otevřít: %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d: neplatný deskriptor souboru: %s"
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Copyright © 2009 Free Software Foundation, Inc."
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Licence GPLv3+: GNU GPL verze 3 nebo novější <http://gnu.org/licenses/gpl."
+"html>\n"
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU bash, verze %s (%s)\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr "Toto je svobodné programové vybavení: máte právo jej měnit a šířit.\n"
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr "VEÅ KERÉ ZÃRUKY chybí, jak jen zákon dovoluje.\n"
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Copyright © 2009 Free Software Foundation, Inc."
+
+#: version2.c:87
+#, fuzzy, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Licence GPLv3+: GNU GPL verze 3 nebo novější <http://gnu.org/licenses/gpl."
+"html>\n"
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: nelze alokovat %'lu bajtů (%'lu bajtů alokováno)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: nezle alokovat %'lu bajtů"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: %s:%d: nelze alokovat %'lu bajtů (%'lu bajtů alokováno)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: %s:%d: nelze alokovat %'lu bajtů"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [název[=hodnota] …]"
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] název [název…]"
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+"bind [-lpvsPVS] [-m klávmapa] [-f soubor] [-q název] [-u název] [-r "
+"klávposl] [-x klávposl:příkaz-shellu] [klávposl:readline-funkce nebo "
+"readline-příkaz]"
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [n]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [n]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [vestavěný-příkaz-shellu [argument…]]"
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr "caller [výraz]"
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-L|-P] [adr]"
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr "pwd [-LP]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr "true"
+
+#: builtins.c:72
+msgid "false"
+msgstr "false"
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] příkaz [argument…]"
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-aAfFilrtux] [-p] [název[=hodnota]…]"
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-aAfFilrtux] [-p] název[=hodnota]…"
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr "local [pÅ™epínaÄ] název[=hodnota]…"
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [argument…]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [argument…]"
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-a] [-dnps] [-f soubor] [název…]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [argument…]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts optstring name [argument]"
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a název] [příkaz [argument…]] [přesměrování…]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [n]"
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr "logout [n]"
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+"fc [-e enázev] [-lnr] [první] [poslední] nebo fc -s [vzor=náhrada] [příkaz]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [úloha]"
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr "bg [úloha…]"
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-lr] [-p název_cesty] [-dt] [název…]"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "help [-ds] [vzorek…]"
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [-d pozice] [n] nebo history -anrw [jméno_souboru] nebo history "
+"-ps argument [argument…]"
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr "jobs [-lnprs] [úloha…] nebo jobs -x příkaz [argumenty]"
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [-h] [-ar] [úloha…]"
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s sigspec | -n Äíssig | -sigspec] pid | úloha … nebo kill -l [sigspec]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let argument [argument…]"
+
+#: builtins.c:136
+#, fuzzy
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+"read [-ers] [-a pole] [-d oddÄ›lovaÄ] [-i text] [-n p_znaků] [-p výzva] [-t "
+"limit] [-u fd] [jméno…]"
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o název_pÅ™epínaÄe] [argument…]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [jméno…]"
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-fn] [název[=hodnota] …] nebo export -p"
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-af] [název[=hodnota] …] nebo readonly -p"
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr "shift [n]"
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr "source název_souboru [argumenty]"
+
+#: builtins.c:152
+msgid ". filename [arguments]"
+msgstr ". název_souboru [argumenty]"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [výraz]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ argument… ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "times"
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [-lp] [[argument] signal_spec…]"
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-afptP] název [název…]"
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-p] [-S] [mód]"
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr "wait [id]"
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr "wait [pid]"
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for NÃZEV [in SLOVECH…] ; do PŘÃKAZY; done"
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for (( výr1; výr2; výr3 )); do PŘÃKAZY; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select NÃZEV [in SLOVA…;] do PŘÃKAZY; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr "time [-p] kolona"
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case SLOVO in [VZOR [| VZOR]…) PŘÃKAZY ;;]… esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if PŘÃKAZY; then PŘÃKAZY; [ elif PŘÃKAZY; then PŘÃKAZY; ]… [ else PŘÃKAZY; ] "
+"fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while PŘÃKAZY; do PŘÃKAZY; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until PŘÃKAZY; do PŘÃKAZY; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr "command [NÃZEV] příkaz [pÅ™esmÄ›rování]"
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "function jméno { PŘÃKAZY ; } nebo jméno () { PŘÃKAZY ; }"
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr "{ PŘÃKAZY ; }"
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr "úloha [&]"
+
+#: builtins.c:206
+msgid "(( expression ))"
+msgstr "(( výraz ))"
+
+#: builtins.c:208
+msgid "[[ expression ]]"
+msgstr "[[ výraz ]]"
+
+# XXX: "variable" je literál na seznamy vestavěných příkazů
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr "variables – názvy a významy některých proměnných shellu"
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [-n] [+N | -N | adresář]"
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [-n] [+N | -N]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o] [název_volby…]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr "printf [-v proměnná] formát [argumenty]"
+
+#: builtins.c:229
+#, fuzzy
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+"complete [-abcdefgjksuv] [-pr] [-o pÅ™epínaÄ] [-A akce] [-G globvzor] [-W "
+"seznam_slov] [-F funkce] [-C příkaz] [-X filtrvzor] [-P předpona] [-S "
+"přípona] [název…]"
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+"compgen [-abcdefgjksuv] [-o pÅ™epínaÄ] [-A akce] [-G globvzor] [-W "
+"seznam_slov] [-F funkce] [-C příkaz] [-X filtrvzor] [-P předpona] [-S "
+"přípona] [slovo]"
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "compopt [-o|+o možnost] [název…]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"mapfile [-n poÄet] [-O poÄátek] [-s poÄet] [-t] [-u fd] [-C volání] [-c "
+"množství] [pole]"
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"readarray [-n poÄet] [-O poÄátek] [-s poÄet] [-t] [-u fd] [-C volání] [-c "
+"množství] [pole]"
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"Definuje nebo zobrazí aliasy.\n"
+" \n"
+" „alias“ bez argumentů vypíše na standardní výstup seznam aliasů ve "
+"znovu\n"
+" použitelném formátu NÃZEV=HODNOTA.\n"
+" \n"
+" Jinak bude definován alias pro každý NÃZEV, který má zadanou HODNOTU.\n"
+" ZávÄ›reÄná mezera v HODNOTÄš způsobí, že pÅ™i expanzi bude následující "
+"slovo\n"
+" zkontrolováno na substituci aliasů.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -p\tVypíše všechny definované aliasy ve znovu použitelném formátu\n"
+" \n"
+" Návratový kód:\n"
+" alias vrátí pravdu, pokud nebyl zadán NÃZEV, pro který není žádný alias\n"
+" definován."
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Odstraní každý NÃZEV ze seznamů definovaných aliasů.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -a\todstraní všechny definice aliasů. \n"
+" Vrací úspÄ›ch, pokud NÃZEV není neexistující alias."
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+"Nastaví klávesové zkratky a proměnné Readline.\n"
+" \n"
+" Naváže posloupnost kláves na Readline funkci nebo makro nebo nastaví\n"
+" Readline promÄ›nnou. Syntaxe nepÅ™epínaÄových argumentů je shodná se\n"
+" syntaxí ~/.inputrc, ale musí být zadána jako jediný argument:\n"
+" napÅ™. bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -m klávmapa Použije KLÃVMAPU jako klávesovou mapu pro trvání\n"
+" tohoto příkazu. Možné klávesové mapy jsou emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command a vi-insert.\n"
+" -l Vypíše seznam názvů funkcí.\n"
+" -P Vypíše seznam názvů funkcí a klávesových vazeb.\n"
+" -p Vypíše seznam funkcí a klávesových vazeb ve "
+"formátu,\n"
+" který lze použít jako vstup.\n"
+" -S Vypíše seznam posloupností kláves,\n"
+" které vyvolávají makra, a jejich hodnoty.\n"
+" -s Vypíše seznam posloupností kláves,\n"
+" která vyvolávají makra, a jejich hodnoty ve "
+"formátu,\n"
+" který lze použít jako vstup. -"
+"V Vypíše seznam názvů proměnných a hodnot.\n"
+" -v Vypíše seznam názvů proměnných a hodnot ve "
+"formátu,\n"
+" který lze použít jako vstup.\n"
+" -q název-funkce Dotáže se, které klávesy vyvolají zadanou funkci.\n"
+" -u název-funkce Zruší všechny vazby na klávesy, které jsou "
+"napojeny\n"
+" na zadanou funkci.\n"
+" -r klávposl Odstraní vazbu na KLÃVPOSL.\n"
+" -f soubor NaÄte vazby kláves ze SOUBORU.\n"
+" -x klávposl:příkaz-shellu\n"
+" Způsobí, že bude vykonán PŘÃKAZ-SHELLU, když bude\n"
+" zadána KLÃVPOSL.\n"
+" \n"
+" Návratový kód:\n"
+" bind vrací 0, pokud není zadán nerozpoznaný pÅ™epínaÄ nebo nedojde "
+"k chybě."
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"UkonÄí smyÄku for, whle nebo until.\n"
+" \n"
+" UkonÄí smyÄku FOR, WHILE nebo UNTIL. Je-li zadáno N, ukonÄí N\n"
+" obklopujících smyÄek.\n"
+" \n"
+" Návratový kód:\n"
+" Návratový kód je 0, pokud N je větší nebo rovno 1."
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Obnoví smyÄku for, while nebo until.\n"
+" \n"
+" PÅ™ejde k další iteraci obklopující smyÄky FOR, WHILE nebo UNTIL.\n"
+" Je-li zadáno N, bude tak uÄinÄ›no v N. obklopující smyÄce. \n"
+" Návratový kód:\n"
+" Návratový kód je 0, pokud N je větší nebo rovno 1."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+"Provede vestavěný příkaz shellu.\n"
+" \n"
+" Provede VESTAVÄšNÃ-PŘÃKAZ-SHELLU s argumenty ARGUMENTY, aniž by se "
+"uplatnilo\n"
+" vyhledávání příkazu. Toto se hodí, když si přejete reimplementovat\n"
+" vestavěný příkaz shellu jako funkci shellu, avšak potřebujete spustit\n"
+" vestavěný příkaz uvnitř této funkce.\n"
+" \n"
+" Návratový kód:\n"
+" Vrací návratový kód VESTAVÄšNÉHO-PŘÃKAZU-SHELLU, nebo nepravdu, pokud\n"
+" VESTAVÄšNÃ-PŘÃKAZ-SHELLU není vestavÄ›ným příkazem shellu."
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+"Vrátí kontext aktuálního podprogramu.\n"
+" \n"
+" Bez VÃRAZU vrátí „$řádek $název_souboru“. S VÃRAZEM vrátí\n"
+" „$řádek $podprogram $název_souboru“; tuto zvláštní informaci lze\n"
+" využít pro výpis zásobníku volání.\n"
+" \n"
+" Hodnota VÃRAZU urÄuje, kolik rámců volání se má zpÄ›tnÄ› projít od toho\n"
+" souÄasného; vrcholový rámec má Äíslo 0.\n"
+" \n"
+" Návratový kód:\n"
+" Vrací 0, pokud shell provádí shellovou funkci a VÃRAZ je platný."
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+"Změní pracovní adresář shellu.\n"
+" \n"
+" Změní aktuální adresář na ADR. Implicitní ADR je hodnota proměnné "
+"shellu\n"
+" HOME.\n"
+" \n"
+" Proměnná CDPATH definuje vyhledávací cestu pro adresář obsahující ADR.\n"
+" Názvy náhradních adresářů v CDPATH se oddÄ›lují dvojteÄkou (:). Prázdný\n"
+" název adresáře je stejný jako aktuální adresář. ZaÄíná-li ADR na "
+"lomítko\n"
+" (/), nebude CDPATH použita.\n"
+" \n"
+" Nebude-li adresář nalezen a pÅ™epínaÄ shellu „cdable_vars“ bude "
+"nastaven,\n"
+" pak se dané slovo zkusí jakožto název proměnné. Má-li taková proměnná\n"
+" hodnotu, pak její hodnota se použije jako ADR.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -L\tvynutí následování symbolických odkazů\n"
+" -P\tnařizuje použít fyzickou adresářovou strukturu namísto\n"
+" \tnásledování symbolických odkazů\n"
+" \n"
+" Symbolické odkazy se implicitně následují, jako by bylo zadáno „-L“.\n"
+" \n"
+" Návratový kód:\n"
+" Vrací 0, byl-li adresář změněn, jinak nenulovou hodnotu."
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+"Vypíše název souÄasného pracovního adresáře.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -L\tvypíše hodnotu $PWD, pokud pojmenovává souÄasný pracovní\n"
+" \tadresář\n"
+" -P\tvypíše fyzický adresář prostý všech symbolických odkazů\n"
+" \n"
+" Implicitně se „pwd“ chová, jako by bylo zadáno „-L“.\n"
+" \n"
+" Návratový kód:\n"
+" Vrací 0, nebyl-li zadán neplatný pÅ™epínaÄ a mohl-li být souÄasný\n"
+" adresář pÅ™eÄten."
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Prázdný příkaz.\n"
+" \n"
+" Žádný úÄinek, tento příkaz nic nedÄ›lá.\n"
+" \n"
+" Návratový kód:\n"
+" Vždy uspěje."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Vrátí výsledek úspěchu.\n"
+" \n"
+" Návratový kód:\n"
+" Vždy uspěje."
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+"Vrátí výsledek neúspěchu.\n"
+" \n"
+" Návratový kód:\n"
+" Vždy selže."
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+"Provede jednoduchý příkaz nebo zobrazí podrobnosti o příkazech.\n"
+" \n"
+" Spustí PŘÃKAZ s ARGUMENTY ignoruje funkce shellu, nebo zobrazí "
+"informace\n"
+" o zadaných PŘÃKAZECH. Lze využít, když je tÅ™eba vyvolat příkazy "
+"z disku,\n"
+" pÅ™iÄemž existuje funkce stejného jména.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -p\tpro PATH bude použita implicitní hodnota, která zaruÄuje,\n"
+" \tže budou nalezeny všechny standardní nástroje\n"
+" -v\tzobrazí popis PŘÃKAZU podobný vestavÄ›nému příkazu „type“\n"
+" -V\tzobrazí podrobnÄ›jší popis každého PŘÃKAZU\n"
+" \n"
+" Návratový kód:\n"
+" Vrací návratový kód PŘÃKAZU, nebo selže, nebyl–li příkaz nalezen."
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Nastaví hodnoty a atributy proměnných.\n"
+" \n"
+" Deklaruje promÄ›nné a nastaví jim atributy. Nejsou-li zadány NÃZVY,\n"
+" zobrazí atributy a hodnoty všech proměnných.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -f\tomezí akce nebo výpis na názvy funkcí a deklarace\n"
+" -F\tomezí výpis jen na názvy funkcí (a Äíslo řádku a název\n"
+" \tzdrojového souboru, je-li zapnuto ladění)\n"
+" -p zobrazí atributy a hodnotu každého NÃZVU\n"
+" \n"
+" PÅ™epínaÄe, které nastavují atributy:\n"
+" -a\tuÄiní NÃZVY Äíslovanými poli (je-li podporováno)\n"
+" -A\tuÄiní NÃZVY asociativními poli (je-li podporováno)\n"
+" -i\tpÅ™iÅ™adí NÃZVÅ®M atribut „integer“ (Äíslo)\n"
+" -l\tpÅ™evede NÃZVY na malá písmena v dobÄ› pÅ™iÅ™azení\n"
+" -r\tuÄiní NÃZVY jen pro Ätení\n"
+" -t\tpÅ™iÅ™adí NÃZVÅ®M atribut „trace“ (sledování)\n"
+" -u\tpÅ™evede NÃZVY na velká písmena v dobÄ› pÅ™iÅ™azení\n"
+" -x\tvyexportuje NÃZVY\n"
+" \n"
+" Pomocí „+“ namísto „-“ daný atribut vypnete.\n"
+" \n"
+" Proměnné s atributem integer jsou aritmeticky vyhodnoceny (vizte příkaz\n"
+" „let“), jakmile je do proměnné přiřazeno.\n"
+" \n"
+" Je-li použito uvnitÅ™ funkce, uÄiní „declare“ NÃZVY lokálními stejnÄ› "
+"jako\n"
+" příkaz „local“.\n"
+" \n"
+" Návratový kód:\n"
+" Vrací úspÄ›ch, pokud nebyl zadán neplatný pÅ™epínaÄ a nedoÅ¡lo k chybÄ›."
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+"Nastaví hodnoty a atributy proměnných\n"
+" \n"
+" Příkaz je zastaralý. Vizte „help declare“."
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+"Definuje lokální proměnné.\n"
+" \n"
+" Vytvoří lokální promÄ›nnou pojmenovanou NÃZEV a pÅ™iÅ™adí jí HODNOTU. "
+"PŘEPÃNAÄŒ\n"
+" smí může být jakýkoliv pÅ™epínaÄ přípustný u „declare“\n"
+" \n"
+" Lokální proměnné lze použít jen uvnitř funkcí, budou viditelné jen "
+"v dané\n"
+" funkci a jejich potomcích.\n"
+" \n"
+" Návratový kód:\n"
+" Vrací úspÄ›ch, nebyl-li zadán neplatný pÅ™epínaÄ, nenastala-li chyba a\n"
+" vykonává-li shell funkci."
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Vypíše své argumenty na standardní výstup.\n"
+" \n"
+" Zobrazí své ARGUMENTY na standardním výstupu a ukonÄí je z novým "
+"řádkem.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -n\tnepřipojuje nový řádek\n"
+" -e\tzapne interpretování následujících znaků uvozených zpětným "
+"lomítkem\n"
+" -E\texplicitnÄ› potlaÄí interpretování znaků uvozených zpÄ›tným "
+"lomítkem\n"
+" \n"
+" „echo“ interpretuje následující znaky uvozené zpětným lomítkem:\n"
+" \\a\tpoplach (zvonek)\n"
+" \\b\tbackspace\n"
+" \\c\tpotlaÄí další výstup\n"
+" \\E\tznak escapu\n"
+" \\f\tposun formuláře (form feed)\n"
+" \\n\tnový řádek\n"
+" \\r\tnávrat vozíku\n"
+" \\t\tvodorovný tabulátor\n"
+" \\v\tsvislý tabulátor\n"
+" \\\\\tzpětné lomítko\n"
+" \\0nnn\tznak, jehož ASCII kód je NNN (osmiÄkovÄ›). NNN smí být\n"
+" \t0 až 3 osmiÄkové Äíslice\n"
+" \\xHH\tosmibitový znak, jehož hodnota je HH (šestnáctkově). HH smí\n"
+" \tbýt jedna nebo dvÄ› Å¡estnáctkové Äíslice\n"
+" \n"
+" Návratový kód:\n"
+" Vrací úspěch, nedojde-li k chybě zápisu na výstup."
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Vypíše argumenty na standardní výstup.\n"
+" \n"
+" Na standardním výstupu zobrazí ARGUMENTY následované odřádkováním.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -n\tneodřádkovává\n"
+" \n"
+" Vrací úspěch, nedojte-li k chybě zápisu na výstup."
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+"Povoluje a zakazuje vestavěné příkazy shellu.\n"
+" \n"
+" Povoluje a zakazuje vestavěné příkazy shellu. Zakázání vám umožní\n"
+" spustit program z disku, který má stejné jméno jako vestavěný příkaz\n"
+" shellu, aniž byste museli zadávat celou cestu.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -a\tvypíše seznam vestavÄ›ných příkazů a vyznaÄí, který je a který "
+"není\n"
+" \tpovolen\n"
+" -n\tzakáže každý NÃZEV nebo zobrazí seznam zakázaných vestavÄ›ných\n"
+" \tpříkazů\n"
+" -p\tvypíše seznam vestavěných příkazů ve znovu použitelné podobě\n"
+" -s\tvypíše pouze názvy posixových „speciálních“ vestavěných příkazů\n"
+" \n"
+" PÅ™epínaÄe řídící dynamické nahrávání:\n"
+" -f\tZavede vestavÄ›ný příkaz NÃZEV ze sdíleného objektu NÃZEV_SOUBORU\n"
+" -d\tOdstraní vestavění příkaz zavedený pomocí –f\n"
+" \n"
+" Bez pÅ™epínaÄů povolí vÅ¡echny NÃZVY.\n"
+" \n"
+" Abyste používali „test“ z $PATH namísto verze vestavěné do shellu,\n"
+" napište „enable -n test“.\n"
+" \n"
+" Návratový kód:\n"
+" Vrací úspÄ›ch, je-li NÃZEV vestavÄ›ným příkazem shellu a nevyskytne-li\n"
+" se chyba."
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+"Spustí argumenty jako příkaz shellu.\n"
+" \n"
+" ARGUMENTY slouÄí do jediného Å™etÄ›zce, použije jej jako vstup shellu\n"
+" a vykoná výsledné příkazy.\n"
+" Návratový kód:\n"
+" Vrátí návratový kód příkazu, nebo úspěch, byl-li příkaz prázdný."
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+"Rozebere pÅ™epínaÄové argumenty.\n"
+" \n"
+" Getopts se používá v shellových procedurách na rozebrání poziÄních\n"
+" parametrů jakožto pÅ™epínaÄů.\n"
+" \n"
+" OPTSTRING obsahuje písmena pÅ™epínaÄů, které mají být rozeznány, Je-li\n"
+" písmeno následováno dvojteÄkou, po pÅ™epínaÄi se oÄekává argument, který\n"
+" by mÄ›l být od pÅ™epínaÄe oddÄ›len bílým místem.\n"
+" \n"
+" Pokaždé když je getopts zavolán, je následující pÅ™epínaÄ umístÄ›n do\n"
+" proměnné $name (proměnná je inicializována, neexistuje-li) a pořadí\n"
+" dalšího argumentu, který Äeká na zpracování, do promÄ›nné shellu OPTIND.\n"
+" OPTIND je inicializována na 1 vždy, když je zavolán shell nebo shellový\n"
+" skript. Pokud pÅ™epínaÄ vyžaduje argument, getopts umístí tento argument\n"
+" do proměnné shellu OPTARG.\n"
+" \n"
+" getopts hlásí chyby jedním ze dvou způsobů. Pokud prvním znakem "
+"OPTSTRING\n"
+" je dvojteÄka, getopts hlásí chyby tichým způsobem. V tomto režimu žádné\n"
+" chybové zprávy nejsou vypisovány. Když se narazí na neplatný pÅ™epínaÄ,\n"
+" getopts umístí tento znak do OPTARG. Pokud není nalezen povinný "
+"argument,\n"
+" getopts umístí „:“ do NAME a OPTARG nastaví na znak nalezeného "
+"pÅ™epínaÄe.\n"
+" Pokud getopts nepracuje v tomto tichém režimu a je nalezen neplatný\n"
+" pÅ™epínaÄ, getopts umístí „?“ do NAME a zruší OPTARG. Když nenajde "
+"povinný\n"
+" argument, je do NAME zapsán „?“, OPTARG zrušen a vytištěna diagnostická\n"
+" zpráva.\n"
+" \n"
+" Pokud proměnná shellu OPTERR má hodnotu 0, getopts vypne vypisování\n"
+" chybových zpráv, dokonce i když první znak OPTSTRING není dvojteÄka.\n"
+" Implicitní hodnota OPTERR je 1.\n"
+" \n"
+" NormálnÄ› getopts zpracovává poziÄní parametry ($0–$9), avÅ¡ak následuje-"
+"li\n"
+" getopts více argumentů, budou rozebrány tyto namísto poziÄních.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, byl-li nalezen nÄ›jaký pÅ™epínaÄ. NeúspÄ›ch vrátí, když "
+"dojde\n"
+" na konec pÅ™epínaÄů nebo nastane-li chyba."
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+"Nahradí shell zadaným příkazem.\n"
+" \n"
+" Vykoná PŘÃKAZ, pÅ™iÄemž nahradí tento shell zadaným programem. "
+"ARGUMENTY\n"
+" se stanou argumenty PŘÃKAZU. Není-li PŘÃKAZ zadán, pÅ™esmÄ›rování "
+"zapůsobí\n"
+" v tomto shellu.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -a název\tpÅ™edá název jakožto nultý argument PŘÃKAZU\n"
+" -c\t\tspustí PŘÃKAZ s prázdným prostÅ™edím\n"
+" -t\t\tdo nultého argumentu PŘÃKAZU umístí pomlÄku\n"
+" \n"
+" Pokud příkaz nemůže být proveden, neinteraktivní shell bude ukonÄen,\n"
+" pokud pÅ™epínaÄ shellu „execfail“ není nastaven.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud byl PŘÃKAZ nalezen a nedoÅ¡lo k chybÄ› pÅ™esmÄ›rování."
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"UkonÄí shell.\n"
+" \n"
+" UkonÄí tento shell se stavem N. Bez N bude návratový kód roven kódu\n"
+" posledně prováděného příkazu."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+"UkonÄí pÅ™ihlaÅ¡ovací shell.\n"
+" \n"
+" UkonÄí pÅ™ihlaÅ¡ovací (login) shell se stavem N. Nebyl-li příkaz zavolán\n"
+" z přihlašovacího shellu, vrátí chybu."
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+"Zobrazí nebo vykoná příkazy ze seznamu historie.\n"
+" \n"
+" fc se používá na vypsání, úpravu a znovu provedení příkazů ze seznamu\n"
+" historie. PRVNà a POSLEDNà mohou být Äísla urÄující rozsah nebo PRVNà "
+"může být\n"
+" Å™etÄ›zec, což urÄuje nejnovÄ›jší příkaz zaÄínající na zadaný Å™etÄ›zec.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -e ENÃZEV\tvybere editor. Implicitní je FCEDIT, pak EDITOR, pak vi.\n"
+" -l\tvypisuje řádky namísto jejich upravování\n"
+" -n\tvypne Äíslování řádků pÅ™i jejich vypisování\n"
+" -r\tobrátí pořadí řádků (nejnovější budou první)\n"
+" \n"
+" Forma příkazu „fc -s [vzor=náhrada… [příkaz]“ znamená, že PŘÃKAZ bude\n"
+" po nahrazení STARÃ=NOVà znovu vykonán.\n"
+" \n"
+" UžiteÄný alias je r='fc -s', takže napsání „r cc“ spustí poslední "
+"příkaz\n"
+" zaÄínající na „cc“ a zadání „r“ znovu spustí poslední příkaz.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspěch nebo kód provedeného příkazu. Nenulový kód, vyskytne-li se\n"
+" chyba."
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"Přepne úlohu na popředí.\n"
+" \n"
+" PÅ™esune úlohu urÄenou pomocí ÚLOHA na popÅ™edí a uÄiní ji aktuální "
+"úlohou.\n"
+" Není-li ÚLOHA zadána, použije se úloha, o které si shell myslí, že je\n"
+" aktuální.\n"
+" \n"
+" Návratový kód:\n"
+" Kód úlohy přesunuté do popředí, nebo došlo-li k chybě, kód selhání."
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Přesune úlohy do pozadí.\n"
+" \n"
+" PÅ™epne každou úlohu urÄenou pomocí ÚLOHA na pozadí, jako by byla\n"
+" spuštěna s „&“. Ne-li ÚLOHA uvedena, použije se úloha, o které si shell\n"
+" myslí, že je aktuální.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspěch, pokud je správa úloh zapnuta a nedošlo-li k nějaké chybě."
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+"Zapamatuje si nebo zobrazí umístění programu.\n"
+" \n"
+" Pro každý NÃZEV je urÄena plná cesta k příkazu a je zapamatována. Nejsou-"
+"li\n"
+" zadány žádné argumenty, budou vypsány informace o zapamatovaných "
+"příkazech.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -d\t\tzapomene zapamatovaná umístÄ›ní každého NÃZVU\n"
+" -l\t\tvypíše v takové podobě, kterou lze opět použít jako vstup\n"
+" -p cesta\tpoužije NÃZEV_CESTY jako plnou cestu k NÃZVU\n"
+" -r\t\tzapomene všechna zapamatovaná umístění\n"
+" -t\t\tvypíše zapamatované umístÄ›ní každého NÃZVU a každému umístÄ›ní\n"
+" \t\tpÅ™edepíše odpovídající NÃZEV, bylo zadáno více NÃZVÅ®\n"
+" Argumenty:\n"
+" NÃZEV\t\tKaždý NÃZEV je vyhledán v $PATH a pÅ™idán do seznamu\n"
+" \t\tzapamatovaných příkazů.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud byl NÃZEV nalezen a nebyl-li zadán neplatný pÅ™epínaÄ."
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+"Zobrazí podrobnosti o vestavěných příkazech.\n"
+" \n"
+" Zobrazí struÄný souhrn vestavÄ›ných příkazů. Je-li zadán VZOREK,\n"
+" vrátí podrobnou nápovědu ke všem příkazům odpovídajícím VZORKU, jinak "
+"je\n"
+" vytištěn seznam syntaxe vestavěných příkazů.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -d\tvypíše krátké pojednání na každé téma\n"
+" -m\tzobrazí použití v jakoby manuálovém formátu\n"
+" -s\tvypíše pouze krátký popis použití o každém příkazu odpovídajícímu\n"
+" \tVZORKU\n"
+" \n"
+" Argumenty:\n"
+" VZOREK\tVzorek urÄující téma nápovÄ›dy\n"
+" \n"
+" Návratový kód:\n"
+" Vrací úspÄ›ch, pokud byl nalezen VZOREK a nebyl zadán neplatný pÅ™epínaÄ."
+
+# FIXME: bash-4.0-pre1: Orphaned line between -w and -p option. It belongs to -n.
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Zobrazí nebo upraví seznam historie.\n"
+" \n"
+" Zobrazí seznam historie s oÄíslovanými řádky. Řádky vypsané s „*“ byly\n"
+" změněny. Argument N říká, že se vypíše pouze posledních N řádek.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -c\tvyprázdní seznam historie smazáním všech položek\n"
+" -d pozice\tsmaže ze seznamu historie položku na pozici POZICE\n"
+" \n"
+" -a\tpřipojí řádky historie z této relace do souboru historie\n"
+" -n\tnaÄte vÅ¡echny řádky historie, které jeÅ¡tÄ› nebyly naÄteny,\n"
+" \tze souboru historie a připojí je do seznamu historie\n"
+" -r\tnaÄte soubor historie a obsah pÅ™ipojí do seznamu historie\n"
+" -w\tzapíše souÄasnou historii do souboru historie\n"
+" \n"
+" -p\tprovede expanzi historie na každém ARGUMENTU a výsledek zobrazí,\n"
+" \taniž by cokoliv uložil do seznamu historie\n"
+" -s\tpřipojí ARGUMENTY do seznamu historie jako jednu položku\n"
+" \n"
+" Je-li zadán JMÉNO_SOUBORU, tak ten je použit jako soubor historie. "
+"Jinak\n"
+" pokud $HISTFILE má hodnotu, tato je použita, jinak ~/.bash_history.\n"
+" \n"
+" Je-li proměnná $HISTTIMEFORMAT nastavena a není-li prázdná, její "
+"hodnota\n"
+" se použije jako formátovací Å™etÄ›zec pro strftime(3) pÅ™i výpisu Äasových\n"
+" razítek spojených s každou položkou historie. Jinak žádná Äasová "
+"razítka\n"
+" nebudou vypisována. \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud nebyl zadán neplatný pÅ™epínaÄ a nedoÅ¡lo k chybÄ›."
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+"Zobrazí stav úloh.\n"
+" \n"
+" Vypíše aktivní úlohy. ÚLOHA omezuje výstup na danou úlohu. Bez uvedení\n"
+" pÅ™epínaÄů bude vypsán stav vÅ¡ech aktivních úloh.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -l\tvypíše navíc ID procesů\n"
+" -n\tvypíše pouze procesy, které od minulého oznámení změnily stav\n"
+" -p\tvypíše pouze ID procesů\n"
+" -r\tzúží výstup jen na běžící úlohy\n"
+" -s\tzúží výstup jen na pozastavené úlohy\n"
+" \n"
+" Je-li použito -x, bude spuštěn příkaz, jakmile všechny úlohy uvedené "
+"mezi\n"
+" ARGUMENTY budou nahrazeny ID procesu, který je vedoucím skupiny dané "
+"úlohy.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud nebyl zadán neplatný pÅ™epínaÄ a nevyskytla se "
+"chyba.\n"
+" Byl-ly použit pÅ™epínaÄ -x, vrátí návratový kód PŘÃKAZU."
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+"Odstraní úlohy ze souÄasného shellu.\n"
+" \n"
+" Z tabulky aktivních úloh odebere každou ÚLOHU. Nebudou-li ÚLOHY zadány,\n"
+" shell použije vlastní pÅ™edstavu o souÄasné úloze.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -a\todstraní vÅ¡echny úlohy, pokud nebyla žádná ÚLOHA urÄena\n"
+" -h\toznaÄí každou ÚLOHU tak, že jí nebude zaslán SIGHUP, až shell sám\n"
+" \tobdrží tento signál\n"
+" -r\todstraní jen běžící úlohy\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud nebyl zadán neplatný pÅ™epínaÄ nebo ÚLOHA."
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Zašle signál úloze.\n"
+" \n"
+" ZaÅ¡le procesu urÄeném PID (nebo ÚLOHOU) signál zadaný pomocí SIGSPEC\n"
+" nebo ÄŒÃSSIG. Není-li SIGSPEC ani ÄŒÃSSIG zadán, pak se pÅ™edpokládá "
+"SIGTERM.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -s sig\tSIG je název signálu\n"
+" -n sig\tSIG je Äíslo signálu\n"
+" -l\tvypíše Äísla signálů; pokud „-l“ následují argumenty, má\n"
+" \tse za to, že se jedná o Äísla signálů, pro které se mají vyspat\n"
+" \tjejich názvy.\n"
+" \n"
+" Kill je vestavěný příkaz shellu ze dvou důvodů: umožňuje použít\n"
+" identifikátory úloh namísto ID procesů a umožní zabíjet procesy i poté,\n"
+" co jste dosáhli limitu poÄtu procesů, které smíte vytvoÅ™it.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud nebyl zadán neplatný pÅ™epínaÄ a nedoÅ¡lo k chybÄ›."
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+"Vyhodnotí aritmetický výraz.\n"
+" \n"
+" Vyhodnotí každý ARGUMENT jako aritmetický výraz. Vyhodnocení je\n"
+" provádÄ›no v celých Äíslech o pevné šířce bez kontrol pÅ™eteÄení, avÅ¡ak\n"
+" dÄ›lení 0 je zachyceno a oznaÄeno za chybu. Následující seznam operátorů\n"
+" je rozdělen do skupin podle úrovní přednosti. Skupiny jsou seřazeny\n"
+" v sestupném pořadí přednosti.\n"
+" \n"
+" \tid++, id--\tnásledné zvýšení, snížení proměnné\n"
+" \t++id, --id\tpřednostní zvýšení, snížení proměnné\n"
+" \t-, +\t\tunární mínus, plus\n"
+" \t!, ~\t\tlogická a bitová negace\n"
+" \t**\t\tumocnění\n"
+" \t*, /, %\t\tnásobení, dělení, zbytková třída\n"
+" \t+, -\t\tsÄítání, odeÄítání\n"
+" \t<<, >>\t\tlevý a pravý bitový posun\n"
+" \t<=, >=, <, >\tporovnání\n"
+" \t==, !=\t\trovnost, nerovnost\n"
+" \t&\t\tbitové a zároveň (AND)\n"
+" \t^\t\tbitové vyluÄující nebo (XOR)\n"
+" \t|\t\tbitové nebo (OR)\n"
+" \t&&\t\tlogické a zároveň (AND)\n"
+" \t||\t\tlogické nebo (OR)\n"
+" \tVÃRAZ ? VÃRAZ : VÃRAZ\n"
+" \t\t\tpodmíněný operátor\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tpřiřazení\n"
+" \n"
+" Proměnné shellu jsou povolené operandy. Název proměnné je uvnitř výrazu\n"
+" nahrazen její hodnotou (s automatickým pÅ™evodem na celé Äíslo pevné "
+"šířky).\n"
+" PromÄ›nná nemusí mít atribut integer (Äíslo) zapnutý, aby byla "
+"použitelná\n"
+" ve výrazu.\n"
+" \n"
+" Operátory se vyhodnocují v pořadí přednosti. Podvýrazy v závorkách jsou\n"
+" vyhodnoceny přednostně a smí přebít pravidla přednosti uvedená výše.\n"
+" \n"
+" Návratový kód:\n"
+" Pokud poslední ARGUMENT je vyhodnocen na 0, let vrátí 1. Jinak je\n"
+" navrácena 0."
+
+#: builtins.c:966
+#, fuzzy
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+"NaÄte ze standardního vstupu jeden řádek a rozdÄ›lí jej na položy.\n"
+" \n"
+" Ze standardního vstupu, nebo deskriptoru souboru FD, je-li zadán\n"
+" pÅ™epínaÄ -u, je naÄten jeden řádek. Řádek se rozdÄ›lí na Äásti jako pÅ™i\n"
+" dělení na slova a první slovo je přiřazeno do prvního JMÉNA, druhé "
+"slovo\n"
+" do druhého JMÉNA a tak dále, pÅ™iÄemž pÅ™ebývající slova se pÅ™iÅ™adí do\n"
+" posledního JMÉNA. Pouze znaky uvedené v $IFS jsou považovány za\n"
+" oddÄ›lovaÄe slov.\n"
+" \n"
+" Nejsou-li uvedeny žádná JMÉNA, naÄtený řádek bude uložen do promÄ›nné "
+"REPLY.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -a pole\tnaÄtená slova budou pÅ™iÅ™azena do postupných prvků POLE\n"
+" \t\tpoÄínaje nulou\n"
+" -d oddÄ›lovaÄ\tpokraÄuje, dokud není naÄten první znak ODDÄšLOVAÄŒE\n"
+" \t\tnamísto nového řádku\n"
+" -e\t\tv interaktivním shellu bude řádek naÄten pomocí Readline\n"
+" -i text\tpoužije TEXT jako prvotní text pro Readline\n"
+" -n p_znaků\tvrátí řízení po naÄtení P_ZNAKÅ® znaků, aniž by Äekal na\n"
+" \t\tnový řádek\n"
+" -p výzva\tvypíše Å™etÄ›zec VÃZVA bez závÄ›reÄného nového řádku dříve,\n"
+" \t\tnež se zahájí naÄítání\n"
+" -r\t\tnepovolí zpětná lomítka pro escapování jakýchkoliv znaků\n"
+" -s\t\tvstup pocházející z terminálu nebude zobrazován\n"
+" -t limit\tumožní vyprÅ¡ení Äasového limitu a vrácení chyby, pokud\n"
+" \t\tnebude naÄten celý řádek do LIMIT sekund. Hodnota promÄ›nné\n"
+" \t\tTIMOUT představuje implicitní limit. TIMEOUT smí být desetinné\n"
+" \t\tÄíslo. Je-li TIMEOUT 0, read vrátí úspÄ›ch, jen bude-li na zadaném\n"
+" \t\tdeskriptoru souboru připraven vstup. Návratový kód bude větší než\n"
+" \t\t128, pokud Äasový limit bude pÅ™ekroÄen.\n"
+" -u fd\t\tÄte z deskriptoru souboru FD namísto standardního vstupu\n"
+" \n"
+" Návratový kód:\n"
+" Návratový kód je nula, pokud se nenarazí na konec souboru, Äasový limit\n"
+" pro Ätení nevyprší nebo není poskytnut neplatný deskriptor souboru jako\n"
+" argument -u."
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+"Návrat z shellové funkce.\n"
+" \n"
+" Způsobí ukonÄení funkce nebo skriptu naÄteného pÅ™es „source“ "
+"s návratovou\n"
+" hodnotou urÄenou N. Je-li N vynecháno, návratový kód bude roven "
+"poslednímu\n"
+" příkazu vykonanému uvnitÅ™ dotyÄné funkce nebo skriptu.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vrátí N, nebo selže, pokud shell neprovádí funkci nebo skript."
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+"Nastaví nebo zruší hodnoty pÅ™epínaÄů shellu a poziÄních parametrů.\n"
+" \n"
+" ZmÄ›ní hodnoty atributům shellu a poziÄním parametrům, nebo zobrazí "
+"názvy\n"
+" a hodnoty proměnných shellu.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -a OznaÄí mÄ›nÄ›né nebo vytvářené promÄ›nné pro export.\n"
+" -b NeprodlenÄ› oznámí ukonÄení úlohy.\n"
+" -e NeprodlenÄ› skonÄí, pokud nÄ›jaký příkaz skonÄí s nenulovým kódem.\n"
+" -f Zakáže vytváření jmen souborů (globbing).\n"
+" -h Zapamatuje si umístění příkazů tehdy, když jsou vyhledány.\n"
+" -k Všechny přiřazovací argumenty budou umístěny do prostředí\n"
+" příkazu. Nejenom ty, co předchází název příkazu.\n"
+" -m Správa úloh je zapnuta.\n"
+" -n Příkazy naÄte, ale neprovede je.\n"
+" -o NÃZEV_PŘEPÃNAÄŒE\n"
+" Nastaví promÄ›nnou odpovídající NÃZVU_PŘEPÃNAÄŒE:\n"
+" allexport stejné jako -a\n"
+" braceexpand stejné jako -B\n"
+" emacs použije emacsový způsob editace na řádku\n"
+" errexit stejné jako -e\n"
+" errtrace stejné jako -E\n"
+" functrace stejné jako -T\n"
+" hashall stejné jako -h\n"
+" histexpand stejné jako -H\n"
+" history zapne historii příkazů\n"
+" ignoreeof shell neskonÄí, když naÄte EOF (konec souboru)\n"
+" interactive-comments\n"
+" povolí, aby se v interaktivních příkazech\n"
+" objevovaly komentáře\n"
+" keyword stejné jako -k\n"
+" monitor stejné jako -m\n"
+" noclobber stejné jako -C\n"
+" noexec stejné jako -n\n"
+" noglob stejné jako -f\n"
+" nolog v souÄasnosti pÅ™ijímáno, ale ignorováno\n"
+" notify stejné jako -b\n"
+" nounset stejné jako -u\n"
+" onecmd stejné jako -t\n"
+" physical stejné jako -P\n"
+" pipefail návratová hodnota kolony je status posledního\n"
+" příkazu, který skonÄil s nenulovým kódem.\n"
+" Návratová hodnota je nula, pokud žádný z příkazů\n"
+" neskonÄil s nenulovým kódem.\n"
+" posix změní chování bashe tam, kde implicitní chování\n"
+" se liší od standardu 1003.2, tak, aby bylo\n"
+" v souladu se standardem\n"
+" privileged stejné jako -p\n"
+" verbose stejné jako -v\n"
+" vi použije vi způsob editace na řádku\n"
+" xtrace stejné jako -x\n"
+" -p Zapnuto, kdykoliv reálné a efektivní ID uživatele se neshodují.\n"
+" Vypne zpracování souboru $ENV a importování shellových funkcí.\n"
+" Vypnutí tohoto pÅ™epínaÄe způsobí, že efektivní UID a GID budou\n"
+" nastavena na reálná UID a GID.\n"
+" -t SkonÄí po naÄtení a provedení jednoho příkazu.\n"
+" -u Při substituci považuje nenastavené proměnné za chybu.\n"
+" -v Vstupní řádky shellu se budou vypisovat tak, jak budou naÄítány.\n"
+" -x Vypisuje příkazy a jejich argumenty tak, jak jsou spouštěny.\n"
+" -B Shell bude provádět závorkovou (brace) expanzi.\n"
+" -C Je-li nastaveno, zakáže přepsání již existujících běžných souborů\n"
+" při přesměrování výstupu.\n"
+" -E Je-li nastaveno, trap ERR (zachytávání chyb) bude děděn do\n"
+" funkcí shellu.\n"
+" -H Zapne ! způsob nahrazování historie. Tento příznak je automaticky\n"
+" zapnut při interaktivním shellu.\n"
+" -P Je-li nastaveno, nebudou následovány symbolické odkazy při\n"
+" provádění příkazů jako změna pracovního adresáře pomocí „cd“.\n"
+" -T Je-li nastaveno, trap DEBUG (obsluha ladění) bude děděna do\n"
+" funkcí shellu.\n"
+" - PÅ™iÅ™adí jakékoliv zbývající argumenty do poziÄních parametrů.\n"
+" PÅ™epínaÄe -x a -v budou vypnuty.\n"
+" \n"
+" Použití + místo - způsobí, že tyto příznaky budou vypnuty. Příznaky lze "
+"též\n"
+" použít při volání shellu. Aktuální množinu příznaků je možno nalézt "
+"v $-.\n"
+" PÅ™ebývajících n ARGUMENTÅ® jsou poziÄní parametry a budou pÅ™iÅ™azeny,\n"
+" v pořadí, do $1, $2, … $n. Nejsou-li zadány žádné ARGUMENTY, budou\n"
+" vytištěny všechny proměnné shellu.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspěch, pokud nebyl zadán neplatný argument."
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+"Odstraňuje hodnoty a atributy proměnných a funkcí shellu.\n"
+" \n"
+" Pro každé JMÉNO odstraní odpovídající proměnnou nebo funkci.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -f\tpovažuje každé JMÉNO za funkci shellu\n"
+" -v\tpovažuje každé JMÉNO za proměnnou shellu\n"
+" \n"
+" Bez těchto dvou příznaků unset nejprve zkusí zrušit proměnnou a pokud "
+"toto\n"
+" selže, tak zkusí zrušit funkci.\n"
+" \n"
+" Některé proměnné nelze odstranit. Vizte příkaz „readonly“.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud nebyl zadán neplatný pÅ™epínaÄ a JMÉNO není jen pro\n"
+" Ätení."
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Nastaví atribut exportovat proměnné shellu.\n"
+" \n"
+" Každý NÃZEV je oznaÄen pro automatické exportování do prostÅ™edí "
+"následně\n"
+" prováděných příkazů. Je-li zadána HODNOTA, před exportem přiřadí "
+"HODNOTU.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -f\tvztahuje se na funkce shellu\n"
+" -n\todstraní vlastnost exportovat každému NÃZVU\n"
+" -p\tzobrazí seznam všech exportovaných proměnných a funkcí\n"
+" \n"
+" Argument „--“ zakazuje zpracování dalších pÅ™epínaÄů.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud nebyl zadán neplatný pÅ™epínaÄ nebo NÃZEV."
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"OznaÄí promÄ›nné shellu za nezmÄ›nitelné.\n"
+" \n"
+" OznaÄí každý NÃZEV jako jen pro Ätení, hodnoty tÄ›chto NÃZVÅ® nebude "
+"možné\n"
+" zmÄ›nit následným pÅ™iÅ™azením. Je-li zadána HODNOTA, pÅ™ed oznaÄením za "
+"jen\n"
+" pro Ätení pÅ™iÅ™adí HODNOTU.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -a\tvztahuje se na promÄ›nné typu Äíslované pole\n"
+" -A\tvztahuje se na proměnné typu asociativní pole\n"
+" -f\tvztahuje se funkce shellu\n"
+" -p\tzobrazí seznam vÅ¡ech promÄ›nných a funkcí jen pro Ätení\n"
+" \n"
+" Argument „--“ zakáže zpracování dalších pÅ™epínaÄů.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud nebyl zadán neplatný pÅ™epínaÄ nebo NÃZEV."
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+"Posune poziÄní parametry.\n"
+" \n"
+" PÅ™ejmenuje poziÄní parametry $N+1, $N+2, … na $1, $2, …\n"
+" Není-li zadáno N, předpokládá se 1.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspěch, pokud N není záporný a není větší než $#."
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+"Vykoná příkazy obsažené ze souboru v souÄasném shellu.\n"
+" \n"
+" NaÄte a provede příkazy z NÃZEV_SOUBORU v tomto shellu. Položky v $PATH\n"
+" jsou použity pro nalezení adresáře obsahujícího NÃZEV_SOUBORU. Jsou-li\n"
+" zadány nÄ›jaké ARGUMENTY, stanou se poziÄními parametry pÅ™i bÄ›hu\n"
+" NÃZVU_SOUBORU.\n"
+" \n"
+" Návratový kód:\n"
+" Vrací návratový kód posledního provedeného příkazu z NÃZVU_SOUBORU.\n"
+" Selže, pokud NÃZEV_SOUBORU nelze naÄíst."
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Pozastaví běh shellu.\n"
+" \n"
+" Pozastaví provádění tohoto shellu do doby, něž bude obdržen signál\n"
+" SIGCONT. Není-li vynuceno, přihlašovací shell nelze pozastavit.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -f\tvynutí pozastavení, i když se jedná o přihlašovací (login) shellu\n"
+" \n"
+" Návratový kód:\n"
+" Vrací úspěch, pokud je správa úloh zapnuta a nevyskytla se chyba."
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+"Vyhodnotí podmínkový výraz.\n"
+" \n"
+" SkonÄí s kódem 0 (pravda) nebo 1 (nepravda) podle vyhodnocení VÃRAZU.\n"
+" Výraz smí být unární nebo binární. Unární výrazy se Äasto používají pro\n"
+" zjištění stavu souboru. Rovněž jsou k dispozici řetězcové operátory a\n"
+" operátory Äíselného porovnání.\n"
+" \n"
+" Souborové operátory:\n"
+" \n"
+" -a SOUBOR Pravda, pokud soubor existuje.\n"
+" -b SOUBOR Pravda, pokud soubor je blokovým zařízením.\n"
+" -c SOUBOR Pravda, pokud soubor je znakovým zařízením.\n"
+" -d SOUBOR Pravda, pokud soubor je adresářem.\n"
+" -e SOUBOR Pravda, pokud soubor existuje.\n"
+" -f SOUBOR Pravda, pokud soubor existuje a je to běžný soubor.\n"
+" -g SOUBOR Pravda, pokud soubor je SGID.\n"
+" -h SOUBOR Pravda, pokud soubor je symbolickým odkazem.\n"
+" -L SOUBOR Pravda, pokud soubor je symbolickým odkazem.\n"
+" -k SOUBOR Pravda, pokud soubor má nastavený „sticky“ bit.\n"
+" -p SOUBOR Pravda, pokud soubor je pojmenovanou rourou.\n"
+" -r SOUBOR Pravda, pokud soubor je vámi Äitelný.\n"
+" -s SOUBOR Pravda, pokud soubor existuje a je neprázdný.\n"
+" -S SOUBOR Pravda, pokud soubor je socketem.\n"
+" -t FD Pravda, pokud FD (deskriptor souboru) je otevřený na\n"
+" terminálu.\n"
+" -u SOUBOR Pravda, pokud soubor je SUID.\n"
+" -w SOUBOR Pravda, pokud soubor je vámi zapisovatelný.\n"
+" -x SOUBOR Pravda, pokud soubor je vámi spustitelný.\n"
+" -O SOUBOR Pravda, pokud soubor je vámi efektivně vlastněn.\n"
+" -G SOUBOR Pravda, pokud soubor je efektivně vlastněn vaší\n"
+" skupinou.\n"
+" -N SOUBOR Pravda, pokud soubor byl zmÄ›nÄ›n po posledním Ätení.\n"
+" \n"
+" SOUBOR1 -nt SOUBOR2\n"
+" Pravda, pokud je SOUBOR1 novější než SOUBOR2 (podle "
+"Äasu\n"
+" změny obsahu).\n"
+" \n"
+" SOUBOR1 -ot SOUBOR2\n"
+" Pravda, pokud SOUBOR1 je starší než SOUBOR2.\n"
+" \n"
+" SOUBOR1 -ef SOUBOR2\n"
+" Pravda, pokud SOUBOR1 je pevným odkazem na SOUBOR2.\n"
+" \n"
+" Řetězcové operátory:\n"
+" \n"
+" -z ŘETĚZEC Pravda, pokud ŘETĚZEC je prázdný.\n"
+" \n"
+" -n ŘETĚZEC\n"
+" ŘETĚZEC Pravda, pokud ŘETĚZEC není prázdný.\n"
+" \n"
+" ŘETĚZEC1 = ŘETĚZEC2\n"
+" Pravda, pokud jsou řetězce shodné.\n"
+" ŘETĚZEC1 != ŘETĚZEC2\n"
+" Pravda, pokud se řetězce neshodují.\n"
+" ŘETĚZEC1 < ŘETĚZEC2\n"
+" Pravda, pokud se ŘETĚZEC1 řadí lexikograficky před\n"
+" ŘETĚZEC2.\n"
+" ŘETĚZEC1 > ŘETĚZEC2\n"
+" Pravda, pokud se ŘETĚZEC1 řadí lexikograficky za\n"
+" ŘETĚZEC2.\n"
+" \n"
+" Další operátory:\n"
+" \n"
+" -o PŘEPÃNAÄŒ Pravda, pokud je pÅ™epínaÄ shellu PŘEPÃNAÄŒ zapnut.\n"
+" ! VÃRAZ Pravda, pokud je VÃRAZ nepravdivý.\n"
+" VÃRAZ1 -a VÃRAZ2\n"
+" Pravda, pokud oba VÃRAZ1 I VÃRAZ2 jsou pravdivé.\n"
+" VÃRAZ1 -o VÃRAZ2\n"
+" Pravda, pokud VÃRAZ1 NEBO VÃRAZ2 je pravdivý.\n"
+" \n"
+" ARGUMENT1 OP ARGUMENT2\n"
+" Aritmetické testy. OP je jeden z -eq, -ne, -lt,\n"
+" -le, -gt nebo -ge.\n"
+" \n"
+" Aritmetické binární operátory vracejí pravdu, pokud ARGUMENT1 je roven,\n"
+" neroven, menší než, menší než nebo roven, větší než, větší než nebo\n"
+" roven ARGUMENTU2. \n"
+" Návratový kód:\n"
+" Vrací úspÄ›ch, je-li VÃRAZ vyhodnocen jako pravdivý. Selže, je-li VÃRAZ\n"
+" vyhodnocen jako nepravdivý nebo je-li zadán neplatný argument."
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"Vyhodnotí podmínkový výraz.\n"
+" \n"
+" Toto je synonymum pro vestavěný příkaz „test“, až na to, že poslední\n"
+" argument musí být doslovně „]“, aby se shodoval s otevírající „[“."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Zobrazí Äasy procesu.\n"
+" \n"
+" Vypíše celkovou dobu procesu shellu a všech jeho potomků, kterou "
+"strávili\n"
+" v uživatelském a jaderném (system) prostoru.\n"
+" \n"
+" Návratový kód:\n"
+" Vždy uspěje."
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+"Zachytávání signálů a jiných událostí.\n"
+" \n"
+" Definuje a aktivuje obsluhy, které budou spuštěny, když shell obdrží\n"
+" signály nebo nastanou urÄité podmínky.\n"
+" \n"
+" Příkaz ARGUMENT bude naÄten a proveden, až shell obdrží signál(y)\n"
+" SIGNAL_SPEC. Pokud ARGUMENT chybí (a je zadán jeden SIGNAL_SPEC) nebo "
+"je\n"
+" „-“, každý urÄený signál bude pÅ™enastaven zpÄ›t na svoji původní "
+"hodnotu.\n"
+" Je-li ARGUMENT prázdný řetězec, každý SIGNAL_SPEC bude shellem a "
+"příkazy\n"
+" z něj spuštěnými ignorován.\n"
+" \n"
+" Je-li SIGNAL_SPEC „EXIT (0)“, bude ARGUMENT proveden pÅ™i ukonÄování "
+"tohoto\n"
+" shellu. Je-li SIGNAL_SPEC „DEBUG“, bude ARGUMENT proveden před každým\n"
+" jednoduchým příkazem.\n"
+" \n"
+" Nejsou-li poskytnuty žádné argumenty, trap vypíše seznam příkazů "
+"navázaných\n"
+" na všechny signály.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -l\tvypíše seznam jmen signálů a jim odpovídajících Äísel\n"
+" -p\tzobrazí příkazy navázané na každý SIGNAL_SPEC\n"
+" \n"
+" Každý SIGNAL_SPEC je buÄto jméno signálu ze <signal.h>, nebo Äíslo "
+"signálu.\n"
+" U jmen signálů nezáleží na velikosti písmen a předpona SIG je "
+"nepovinná.\n"
+" Aktuálnímu shellu lze zaslat signál pomocí „kill -signal $$“.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud SIGSPEC a zadané pÅ™epínaÄe jsou platné."
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+"Zobrazí informace o typu příkazu.\n"
+" \n"
+" O každém NÃZVU Å™ekne, jak by byl interpretován, kdyby byl použit jako\n"
+" název příkazu.\n"
+" \n"
+" PÅ™epínaÄe\n"
+" -a\tzobrazí všechna místa, kde se nalézá spustitelný program\n"
+" \tpojmenovaný NÃZEV. To zahrnuje aliasy, vestavÄ›né příkazy a funkce\n"
+" \tjen a pouze tehdy, když není rovněž použit pÅ™epínaÄ -p.\n"
+" -f\tpotlaÄí hledání mezi funkcemi shellu\n"
+" -P\tvynutí prohledání PATH na každý NÃZEV, dokonce i když se\n"
+" \tjedná o alias, vestavěný příkaz nebo funkci, a vrátí název\n"
+" \tsouboru na disku, který by byl spuštěn\n"
+" -p\tbuÄ vrátí jméno souboru na disku, který by byl spuÅ¡tÄ›n,\n"
+" \tnebo nic, pokud „type -t NÃZEV“ by nevrátil „file“ (soubor)\n"
+" -t\tvypíše jedno slovo z těchto: „alias“, „keyword“, „function“,\n"
+" \t„builtin“, „file“ nebo „“, je-li NÃZEV alias, klíÄové slovo\n"
+" \tshellu, shellová funkce, vestavěný příkaz shellu, soubor na\n"
+" \tdisku nebo nenalezený příkaz\n"
+" \n"
+" Argumenty:\n"
+" NÃZEV\tNázev příkazu urÄený k výkladu.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud vÅ¡echny NÃZVY byly nalezeny. Selže, pokud nÄ›které\n"
+" nalezeny nebyly."
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Upravuje omezení (limity) zdrojů shellu.\n"
+" \n"
+" Poskytuje kontrolu nad zdroji dostupnými shellu a procesům z něj\n"
+" spuštěných (na systémech, které takovou kontrolu umožňují).\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -S\tpoužije se „měkké“ (soft) omezení zdroje\n"
+" -H\tpoužije se „tvrdé“ (hard) omezení zdroje\n"
+" -a\tnahlásí vÅ¡echna souÄasná omezení (limity)\n"
+" -b\tvelikost vyrovnávací paměti socketů\n"
+" -c\tmaximální velikost vytvářených core souborů (výpis paměti "
+"programu)\n"
+" -d\tmaximální velikost datového segmentu procesu\n"
+" -e\tmaximální plánovací priorita („nice“)\n"
+" -f\tmaximální velikost souborů zapsaných shellem a jeho potomky\n"
+" -i\tmaximální poÄet Äekajících signálů\n"
+" -l\tmaximální velikost paměti, kterou může proces zamknout\n"
+" -m\tmaximální velikost rezidentní paměti (resident set size)\n"
+" -n\tmaximální poÄet otevÅ™ených deskriptorů souboru\n"
+" -p\tvelikost vyrovnávací paměti rour\n"
+" -q\tmaximální poÄet bajtů ve frontÄ› posixových zpráv\n"
+" -r\tmaximální priorita plánování v reálném Äase\n"
+" -s\tmaximální velikost zásobníku\n"
+" -t\tmaximální množství procesorového Äasu v sekundách\n"
+" -u\tmaximální poÄet procesů uživatele\n"
+" -v\tvelikost virtuální paměti\n"
+" -x\tmaximální poÄet zámků na souborech\n"
+" \n"
+" Je-li zadán LIMIT, jedná se o novou hodnotu daného zdroje. Zvláštní\n"
+" hodnoty LIMITU „soft“, „hard“ a „unlimited“ znamenají souÄasný mÄ›kký\n"
+" limit, souÄasný tvrdý limit a žádný limit. V opaÄném případÄ› bude\n"
+" zobrazena souÄasná hodnota limitu daného zdroje. Není-li zadán žádný\n"
+" pÅ™epínaÄ, pak se pÅ™edpokládá -f.\n"
+" \n"
+" Hodnoty jsou v násobcích 1024 bajtů, kromě -t, která je v sekundách,\n"
+" -p, která je v násobcích 512 bajtů, a -u, což je absolutní poÄet "
+"procesů.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vrací úspÄ›ch, pokud nebyl zadán neplatný pÅ™epínaÄ a nevyskytla se chyba."
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+"Zobrazí nebo nastaví uživatelskou masku práv.\n"
+" \n"
+" Nastaví Uživatelskou masku práv vytvářených souborů na MÓD. Je-li\n"
+" MÓD vynechán, bude vytiÅ¡tÄ›na souÄasná hodnota masky.\n"
+" \n"
+" ZaÄíná-li MÓD Äíslicí, bude interpretován jako osmiÄkové Äíslo, jinak\n"
+" jako řetězec symbolického zápisu práv tak, jak jej chápe chmod(1).\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -p\tje-li MÓD vynechán, bude výstup v podobě, kterou lze použít\n"
+" \tjako vstup\n"
+" -S\tuÄiní výstup symbolický, jinak bude výstupem osmiÄkové Äíslo\n"
+" \n"
+" Návratový kód\n"
+" Vrátí úspÄ›ch, pokud nebyl zadán neplatný MÓD nebo pÅ™epínaÄ."
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"PoÄká na dokonÄení úlohy a vrátí její návratový kód.\n"
+" \n"
+" PoÄká na proces urÄený ID, což může být ID procesu nebo identifikace\n"
+" úlohy, a nahlásí jeho návratový kód. Není-li ID zadáno, poÄká na "
+"všechny\n"
+" právě aktivní dětské procesy a návratovým kódem bude nula. Je-li ID\n"
+" identifikátorem úlohy, poÄká na vÅ¡echny procesy z kolony úlohy.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí kód ID, selže, pokud ID není platný nebo byl zadán neplatný "
+"pÅ™epínaÄ."
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"PoÄká na dokonÄení procesu a vrátí jeho návratový kód.\n"
+" \n"
+" PoÄká na zadaný proces a nahlásí jeho návratový kód. Není-li PID zadán,\n"
+" bude se Äekat na vÅ¡echny právÄ› aktivní procesy potomků a návratová "
+"hodnota\n"
+" bude nula. PID musí být ID procesu.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí kód ID, selže, pokud ID není platný nebo byl zadán neplatný "
+"pÅ™epínaÄ."
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Pro každý prvek seznamu vykoná příkazy.\n"
+" \n"
+" SmyÄka „for“ provede posloupnost příkazů pro každý prvek v seznamu "
+"položek.\n"
+" Pokud „in SLOVECH…;“ není přítomno, pak se předpokládá „in \"$@\"“. "
+"NÃZEV\n"
+" bude postupnÄ› nastaven na každý prvek ve SLOVECH a PŘÃKAZY budou "
+"provedeny.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí kód naposledy provedeného příkazu."
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Aritmetika smyÄek.\n"
+" \n"
+" Ekvivalentní k\n"
+" \t(( VÃR1 ))\n"
+" \twhile (( VÃR2 )); do\n"
+" \t\tPŘÃKAZY\n"
+" \t\t(( VÃR3 ))\n"
+" \tdone\n"
+" VÃR1, VÃR2 a VÃR3 jsou aritmetické výrazy. Chybí-li nÄ›který výraz,\n"
+" chová se, jako by byl vyhodnocen na 1. \n"
+" Návratový kód:\n"
+" Vrátí kód naposledy vykonaného příkazu."
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Vybere slova ze seznamu a vykoná příkazy.\n"
+" \n"
+" SLOVA jsou expandována a vytvoří seznam slov. Množina expandovaných "
+"slov\n"
+" je vytiÅ¡tÄ›na na standardní chybový výstup, každé pÅ™edchází Äíslo. Není-"
+"li\n"
+" „in SLOVA“ přítomno, předpokládá se „in \"$@\"“. Pak je zobrazena výzva "
+"PS3\n"
+" a jeden řádek naÄten ze standardního vstupu. Pokud je řádek tvoÅ™en "
+"Äíslem\n"
+" odpovídajícím jednomu ze zobrazených slov, pak NÃZEV bude nastaven na "
+"toto\n"
+" slovo. Pokud je řádek prázdný, SLOVA a výzva budou znovu zobrazeny. Je-"
+"li\n"
+" naÄten EOF (konec souboru), příkaz konÄí. NaÄtení jakékoliv jiné "
+"hodnoty\n"
+" nastaví NÃZEV na prázdný Å™etÄ›zec. NaÄtený řádek bude uložen do promÄ›nné\n"
+" REPLY. Po každém výbÄ›ru budou provedeny PŘÃKAZY, dokud nebude vykonán\n"
+" příkaz „break“.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí kód naposledy prováděného příkazu."
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+"Nahlásí Äas spotÅ™ebovaný provádÄ›ním kolony.\n"
+" \n"
+" Vykoná KOLONU a zobrazí pÅ™ehled reálného Äasu, uživatelského\n"
+" procesorového Äasu a systémového procesorového Äasu stráveného "
+"prováděním\n"
+" KOLONY poté, co skonÄí.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -p\tzobrazí pÅ™ehled Äasů v pÅ™enositelném posixovém formátu\n"
+" \n"
+" Hodnota proměnné TIMEFORMAT se použije jako specifikace výstupního "
+"formátu.\n"
+" \n"
+" Návratový kód:\n"
+" Návratová hodnota je návratová hodnota KOLONY."
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Provede příkazy podle shody se vzorem.\n"
+" \n"
+" VýbÄ›rovÄ› provede PŘÃKAZY na základÄ› shody SLOVA se VZOREM. Znak „|“\n"
+" se používá na oddělení násobných VZORŮ.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí kód naposledy provedeného příkazu."
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Vykoná příkazy na základě splnění podmínky.\n"
+" \n"
+" Provede seznam „if PŘÃKAZŮ“. Bude-li jeho návratový kód nula, pak bude\n"
+" proveden seznam „then PŘÃKAZŮ“. Jinak bude proveden popoÅ™adÄ› každý "
+"seznam\n"
+" „elif PŘÃKAZŮ“ a bude-li jeho návratový kód nula, odpovídající seznam\n"
+" „then PŘÃKAZŮ“ bude proveden a příkaz if skonÄí. V opaÄném případÄ› bude\n"
+" proveden seznam „else PŘÃKAZŮ“, pokud existuje. Návratová hodnota celé\n"
+" konstrukce je návratovou hodnotou posledního provedeného příkazu nebo "
+"nula,\n"
+" pokud žádná z testovaných podmínek není pravdivá.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí kód naposledy provedeného příkazu."
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Vykonává příkazy, dokud test úspěšně prochází.\n"
+" \n"
+" Expanduje a provádí PŘÃKAZY tak dlouho, dokud poslední příkaz ve "
+"„while“\n"
+" PŘÃKAZECH má nulový návratový kód.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí kód naposledy provedeného příkazu."
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Vykonává příkazy, dokud test konÄí neúspěšnÄ›.\n"
+" \n"
+" Expanduje a provádí PŘÃKAZY tak dlouho, dokud poslední příkaz ve "
+"„until“\n"
+" PŘÃKAZECH má nenulový návratový kód. \n"
+" Návratový kód:\n"
+" Vrátí kód naposledy provedeného příkazu."
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+"Vytvoří koproces pojmenovaný NÃZEV.\n"
+" \n"
+" Vykoná PŘÃKAZ asynchronnÄ›, pÅ™iÄemž jeho standardní výstup a standardní\n"
+" vstup budou napojeny rourou na souborové deskriptory uvedené v poli "
+"NÃZEV\n"
+" tohoto shellu pod indexem 0 a 1. Implicitní NÃZEV je „COPROC“.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí návratový kód PŘÃKAZU."
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+"Definuje funkci shellu.\n"
+" \n"
+" Vytvoří shellovou funkci pojmenovanou NÃZEV. Volána jakožto jednoduchý\n"
+" příkaz spustí PŘÃKAZY v kontextu volajícího shellu. Je-li vyvolán "
+"NÃZEV,\n"
+" budou funkci předány argumenty jako $1…$n a název funkce bude umístěn "
+"do\n"
+" $FUNCNAME.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud NÃZEV není jen pro Ätení."
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Seskupí příkazy do jednotky.\n"
+" \n"
+" Spustí množinu příkazů v jedné skupině. Toto je jeden ze způsobů,\n"
+" jak přesměrovat celou množinu příkazů. \n"
+" Návratový kód:\n"
+" Vrátí kód naposledy spuštěného příkazu."
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+"Obnoví úlohu do popředí.\n"
+" \n"
+" Ekvivalent k argumentu ÚLOHA příkazu „fg“. Obnoví pozastavenou úlohu\n"
+" nebo úlohu na pozadí. ÚLOHA může urÄovat buÄ název úlohy, nebo Äíslo "
+"úlohy.\n"
+" Přidání „&“ za ÚLOHU přesune úlohu na pozadí, jako by identifikátor "
+"úlohy\n"
+" byl argumentem příkazu „bg“.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí kód obnovené úlohy."
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+"Vyhodnotí aritmetický výraz.\n"
+" \n"
+" VÃRAZ bude vyhodnocen podle pravidel aritmetického vyhodnocování.\n"
+" Ekvivalentní k „let VÃRAZ“.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí 1, pokud se VÃRAZ vyhodnotí na 0. Jinak vrátí 0."
+
+# XXX: „coniditional command“ znamená podmínka, výraz podmínky. Nikoliv
+# příkaz, který by byl vykonán na základě splnění jiné podmínky. Tj. překlad
+# „podmíněný příkaz“ je chybný.
+# Toto je nápověda k vestavěnému příkazu „[“.
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+"Vykoná podmínkový příkaz.\n"
+" \n"
+" Vrátí status 0 nebo 1 podle vyhodnocení výrazu podmínky VÃRAZ. Výrazy\n"
+" se skládají ze stejných primitiv jako u vestavěného příkazu „test“ a\n"
+" mohou být kombinovány za pomoci následujících operátorů:\n"
+" \n"
+" ( VÃRAZ )\tVrátí hodnotu VÃRAZU\n"
+" ! VÃRAZ\t\tPravda, pokud VÃRAZ je nepravdivý; jinak nepravda\n"
+" VÃR1 && VÃR2\tPravda, pokud oba VÃR1 i VÃR2 jsou pravdivé;\n"
+" \t\tjinak nepravda\n"
+" VÃR1 || VÃR2\tPravda, pokud VÃR1 nebo VÃR2 je pravdivý; jinak "
+"nepravda\n"
+" \n"
+" Jsou-li použity operátory „==“ a „!=“, řetězec napravo od operátoru je\n"
+" použit jako vzor a bude uplatněno porovnávání proti vzoru. Je-li použit\n"
+" operátor „=~, řetězec napravo do operátoru je uvažován jako regulární\n"
+" výraz.\n"
+" \n"
+" Operátory && a || nevyhodnocují VÃR2, pokud VÃR1 je dostateÄný na "
+"urÄení\n"
+" hodnoty výrazu.\n"
+" \n"
+" Návratový kód:\n"
+" 0 nebo 1 podle hodnoty VÃRAZU."
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+"Názvu běžných proměnných shellu a jejich význam.\n"
+" \n"
+" BASH_VERSION\tInformace o verzi tohoto Bashe.\n"
+" CDPATH\tDvojteÄkou oddÄ›lený seznam adresářů, který se prohledává\n"
+" \t\tna adresáře zadané jako argumenty u „cd“.\n"
+" GLOBIGNORE\tDvojteÄkou oddÄ›lený seznam vzorů popisujících jména "
+"souborů,\n"
+" \t\tkterá budou ignorována při expanzi cest.\n"
+" HISTFILE\tJméno souboru, kde je uložena historie vašich příkazů.\n"
+" HISTFILESIZE\tMaximální poÄet řádků, které tento soubor smí obsahovat.\n"
+" HISTSIZE\tMaximální poÄet řádků historie, které jsou dostupné uvnitÅ™\n"
+" \t\tběžícího shellu.\n"
+" HOME\tCelá cesta do vašeho domovského adresáře.\n"
+" HOSTNAME\tJméno souÄasného stroje.\n"
+" HOSTTYPE\tDruh CPU, na které tento Bash běží.\n"
+" IGNOREEOF\tŘídí reakci shellu na přijetí znaku EOF (konec souboru)\n"
+" \t\tpři samotném vstupu. Je-li nastaveno, pak její hodnota udává\n"
+" \t\tpoÄet znaků EOF, které mohou bezprostÅ™ednÄ› následovat na prázdném\n"
+" \t\třádku, dříve než shell skonÄí (implicitní hodnota je 10). Není-li\n"
+" \t\tnastaveno, EOF znaÄí konec vstupu.\n"
+" MACHTYPE\tŘetězec popisující systém, na kterém tento Bash běží.\n"
+" MAILCHECK\tJak Äasto, v sekundách, kontroluje Bash novou poÅ¡tu.\n"
+" MAILPATH\tDvojteÄkou oddÄ›lený seznam názvů souborů, které Bash\n"
+" \t\tkontroluje na novou poštu.\n"
+" OSTYPE\tVerze Unixu, na kterém tento Bash běží.\n"
+" PATH\tDvojteÄkou oddÄ›lený seznam adresářů, které jsou prohledávány\n"
+" \t\tna příkazy.\n"
+" PROMPT_COMMAND\tPříkaz, který je proveden před vytištěním každé\n"
+" \t\tprimární výzvy shellu.\n"
+" PS1\t\tŘetězec prvotní výzvy shellu.\n"
+" PS2\t\tŘetězec druhotné výzvy shellu.\n"
+" PWD\t\tCelé jméno cesty do aktuálního adresáře.\n"
+" SHELLOPTS\tDvojteÄkou oddÄ›lený seznam zapnutých pÅ™epínaÄů shellu.\n"
+" TERM\tNázev druhu souÄasného terminálu.\n"
+" TIMEFORMAT\tVýstupní formát Äasové statistiky zobrazované vyhrazeným\n"
+" \t\tslovem „time“.\n"
+" auto_resume\tNeprázdná hodnota znamená, že slovo příkazu objevující se\n"
+" \t\tna řádce automaticky je nejprve vyhledáno v seznamu\n"
+" \t\tprávě pozastavených úloh. Je-li tam nalezeno, daná úloha bude\n"
+" \t\tpřepnuta na popředí. Hodnota „exact“ znamená, že slovo příkazu\n"
+" \t\tse musí přesně shodovat s příkazem v seznamu pozastavených úloh.\n"
+" \t\tHodnota „substring“ znamená, že slovo příkazu se musí shodovat\n"
+" \t\ts podřetězcem úlohy. Jakákoliv jiná hodnota znamená, že příkaz\n"
+" \t\tmusí být předponou pozastavené úlohy.\n"
+" histchars\tZnaky řídící expanzi historie a rychlé nahrazování.\n"
+" \t\tPrvní znak je znak nahrazení historie, obvykle „!“. Druhý je\n"
+" \t\tznak „rychlého nahrazování“, obvykle „^“. Třetí je znak\n"
+" \t\t„komentáře historie“, obvykle „#“.\n"
+" HISTIGNORE\tDvojteÄkou oddÄ›lený seznam vzorů používaný na\n"
+" \t\trozlišení, které příkazy by měly být uloženy do seznamu\n"
+" \t\thistorie.\n"
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Přidá adresáře do zásobníku.\n"
+" \n"
+" Přidá adresář na vrchol zásobníku adresářů nebo zásobník zrotuje tak,\n"
+" že nový vrchol zásobníku se stane souÄasným pracovním adresářem. Bez\n"
+" argumentů prohodí dva vrchní adresáře.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -n\tPotlaÄí obvyklou zmÄ›nu adresáře, když se na zásobník pÅ™idávají\n"
+" \tadresáře, takže změněn bude pouze zásobník.\n"
+" \n"
+" Argumenty:\n"
+" +N\tZrotuje zásobník tak, že N. adresář (poÄítáno zleva na seznamu\n"
+" \tzobrazovaném pomocí „dirs“, poÄínaje nulou) se dostane na vrchol.\n"
+" \n"
+" -N\tZrotuje zásobník tak, že N. adresář (poÄítáno zprava na seznamu\n"
+" \tzobrazovaném pomocí „dirs“, poÄínaje nulou) se dostane na vrchol.\n"
+" \n"
+" adresář\n"
+" \tPÅ™idá ADRESÃŘ na vrchol zásobníku adresářů a uÄiní jej novým\n"
+" \tsouÄasným pracovním adresářem.\n"
+" \n"
+" Zásobník adresářů si můžete prohlédnout příkazem „dirs“.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspěch, pokud nebyl zadán neplatný argument a změna adresáře\n"
+" neselhala."
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Odebere adresáře ze zásobníku.\n"
+" \n"
+" Odstraní položky ze zásobníku adresářů. Bez argumentů odstraní adresář\n"
+" z vrcholu zásobníku a přepne do nového adresáře na vrchu zásobníku.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -n\tPotlaÄí obvyklou zmÄ›nu adresáře, když se ze zásobníku odebírají\n"
+" \tadresáře, takže změněn bude pouze zásobník.\n"
+" \n"
+" Argumenty:\n"
+" +N\tOdstraní N. položku poÄítáno zleva na seznamu zobrazovaném\n"
+" \tpomocí „dirs“, poÄínaje nulou. Na příklad: „popd +0“ odstraní\n"
+" první adresář, „popd -1“ druhý.\n"
+" \n"
+" -N\tOdstraní N. položku poÄítáno zprava na seznamu zobrazovaném\n"
+" \tpomocí „dirs“, poÄínaje nulou. Na příklad: „popd -0“ odstraní\n"
+" poslední adresář, „popd -1“ další vedle posledního.\n"
+" \n"
+" Zásobník adresářů si můžete prohlédnout příkazem „dirs“.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspěch, pokud nebyl zadán neplatný argument nebo neselhala změna\n"
+" adresáře."
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Zobrazí zásobník adresářů.\n"
+" \n"
+" Zobrazí seznam právě pamatovaných adresářů. Adresáře si najdou cestu\n"
+" na seznam příkazem „pushd“ a procházet seznamem zpět lze příkazem "
+"„popd“.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -c\tvyprázdní zásobník adresářů tím, že smaže všechny jeho prvky\n"
+" -l\tnevypíše vlnkou zkrácené verze adresářů, které jsou relativní\n"
+" \tvašemu domovskému adresáři\n"
+" -p\tvypíše zásobník adresářů po jedné položce na řádek\n"
+" -v\tvypíše zásobník adresářů po jedné položce na řádek, pÅ™iÄemž\n"
+" \tnázvu adresáře předřadí jeho umístění na zásobníku\n"
+" \n"
+" Argumenty:\n"
+" +N\tzobrazí N. položku poÄítáno zleva na seznamu, který zobrazuje\n"
+" \tdirs, když je vyvolán bez pÅ™epínaÄů, poÄínaje nulou.\n"
+" \n"
+" -N\tzobrazí N. položku poÄítáno zprava na seznamu, který zobrazuje\n"
+" \tdirs, když je vyvolán bez pÅ™epínaÄů, poÄínaje nulou. \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud nebyl zadán neplatný pÅ™epínaÄ a nevyskytla se chyba."
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+"Zapne nebo vypne volby (pÅ™epínaÄe) shellu.\n"
+" \n"
+" ZmÄ›ní nastavení každého pÅ™epínaÄe shellu NÃZEV_VOLBY. Bez pÅ™epínaÄových\n"
+" argumentů vypíše seznam vÅ¡ech pÅ™epínaÄů shellu s příznakem, zda je, "
+"nebo\n"
+" není nastaven.\n"
+" PÅ™epínaÄe:\n"
+" -o\tomezí NÃZVY_VOLEB na ty, které jsou definovány pro použití\n"
+" \ts „set -o“\n"
+" -p\tvypíše každou volbu shellu s urÄením jejího stavu\n"
+" -q\tpotlaÄí výstup\n"
+" -s\tzapne [set] každý NÃZEV_VOLBY\n"
+" -u\tvypne [unset] každý NÃZEV_VOLBY\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, je-li NÃZEV_VOLBY zapnut. Selže, byl-li zadán neplatný\n"
+" pÅ™epínaÄ nebo je-li NÃZEV_VOLBY vypnut."
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+"Naformátuje a vypíše ARGUMENTY podle definice FORMÃTU.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -v proměnná\tvýstup umístí do proměnné shellu PROMĚNNà namísto\n"
+" \t\todeslání na standardní výstup.\n"
+" \n"
+" FORMÃT je Å™etÄ›zec znaků, který obsahuje tÅ™i druhy objektů: obyÄejné "
+"znaky,\n"
+" které jsou prostě zkopírovány na standardní výstup, posloupnosti "
+"escapových\n"
+" znaků, které jsou zkonvertovány a zkopírovány na standardní výstup a\n"
+" formátovací definice, z nichž každá způsobí vytištění dalšího "
+"argumentu.\n"
+" \n"
+" Tento printf interpretuje vedle standardních formátovacích definic\n"
+" popsaných v printf(1) a printf(3) též:\n"
+" \n"
+" %b\texpanduje posloupnosti escapované zpětným lomítkem\n"
+" \t\tv odpovídajícím argumentu\n"
+" %q\toescapuje argument takovým způsobem, že jej bude možné\n"
+" \t\tpoužít jako vstup shellu\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud nebyl zadán neplatný pÅ™epínaÄ a nedoÅ¡lo k chybÄ›\n"
+" zápisu nebo přiřazení."
+
+#: builtins.c:1895
+#, fuzzy
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"UrÄuje, jak budou argumenty doplňovány pomocí knihovny Readline.\n"
+" \n"
+" Pro každý NÃZEV udává, jak se budou doplňovat argumenty. Nejsou-li\n"
+" zadány žádné pÅ™epínaÄe, budou vypsány existující pravidla doplňování\n"
+" v podobě vhodné pro jejich znovu užití na vstupu.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -p\tvypíše existující pravidla doplňování v znovu použitelném tvaru\n"
+" -r\todstraní pro každý NÃZEV doplňovací pravidlo, nebo není-li zadán\n"
+" \tžádný NÃZEV, zruší vÅ¡echna pravidla\n"
+" \n"
+" Při doplňování se akce uplatňují v pořadí, v jakém by byla tímto "
+"příkazem\n"
+" vypsána pravidla psaná velkými písmeny.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud nebyl zadán neplatný pÅ™epínaÄ a nevyskytla se chyba."
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Zobrazí možná doplnÄ›ní v závislosti na pÅ™epínaÄích.\n"
+" \n"
+" Je zamýšleno pro použití uvnitř shellových funkcí generujících možná\n"
+" doplnění. Je-li poskytnut volitelný argument SLOVO, budou vygenerovány\n"
+" shody se SLOVEM.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud nebyl zadán neplatný pÅ™epínaÄ a nevyskytla se chyba."
+
+#: builtins.c:1938
+#, fuzzy
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+"Upraví nebo zobrazí možnosti doplňování.\n"
+" \n"
+" PozmÄ›ní možnosti doplňování každého NÃZVU, nebo, není-li zadán žádný\n"
+" NÃZEV, právÄ› provádÄ›ného doplňování. Nejsou-li zadány žádné MOŽNOSTI,\n"
+" vypíše možnost doplňování každého NÃZVU nebo definic právÄ› provádÄ›ného\n"
+" doplňování.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" \t-o možnost\tNastaví možnost doplňování MOŽNOST každému NÃZVU\n"
+" \n"
+" Pomocí „+o“ namísto „-o“ zadanou možnost vypnete.\n"
+" \n"
+" Argumenty:\n"
+" Každý NÃZEV odkazuje na příkaz, pro který musí být pÅ™edem definováno\n"
+" pravidlo (definice) doplňování pomocí vestavěného příkazu „complete“.\n"
+" Nejsou-li zadány žádné NÃZVY, musí být compopt volán funkcí, která "
+"právě\n"
+" generuje doplňování. Změněny pak budou možnosti tohoto právě "
+"prováděného\n"
+" generátoru doplňování.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud nebyl zadán neplatný pÅ™epínaÄ a NÃZEV mÄ›l "
+"definováno\n"
+" pravidlo doplňování."
+
+#: builtins.c:1968
+#, fuzzy
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+"NaÄte řádky ze souboru do promÄ›nné typu pole.\n"
+" \n"
+" NaÄte řádky ze standardního vstupu nebo z deskriptoru souboru FD, byl-"
+"li\n"
+" zadán pÅ™epínaÄ -u, do promÄ›nné POLE, která je typu pole. Implicitním "
+"POLEM\n"
+" je proměnná MAPFILE.\n"
+" \n"
+" PÅ™epínaÄe:\n"
+" -n poÄet\tZkopíruje nejvýše POÄŒET řádků. Je-li POÄŒET 0,\n"
+" \t\tzkopíruje všechny řádky.\n"
+" -O poÄátek\tPÅ™iÅ™azování do POLE zaÄne na indexu POÄŒÃTEK.\n"
+" \t\tImplicitní index je 0.\n"
+" -s poÄet\tZahodí prvních POÄŒET naÄtených řádků.\n"
+" -t\t\tOdstraní znaky konce řádku z každého naÄteného řádku.\n"
+" -u fd\t\tŘádky Äte z deskriptoru souboru FD namísto ze\n"
+" \t\tstandardního vstupu.\n"
+" -C volání\tVyhodnotí VOLÃNà pokaždé, když je naÄteno MNOŽSTVÃ\n"
+" \t\třádků.\n"
+" -c množství\tUdává poÄet řádků, které je tÅ™eba pÅ™eÄíst, mezi\n"
+" \t\tkaždým zavoláním VOLÃNÃ.\n"
+" \n"
+" Argumenty:\n"
+" POLE\t\tNázev proměnné typu pole, do které budou přiřazena data\n"
+" \t\tze souboru.\n"
+" \n"
+" Je-li uvedeno -C bez -c, implicitní množství bude 5000. Vyhodnocovanému\n"
+" VOLÃNà bude jako dodateÄný argument pÅ™edán index prvku pole, do kterého\n"
+" se bude vzápětí přiřazovat.\n"
+" \n"
+" Nebude-li explicitnÄ› udán poÄátek, mapfile vyprázdní POLE pÅ™ed tím,\n"
+" než do nÄ›j zaÄne pÅ™iÅ™azovat.\n"
+" \n"
+" Návratový kód:\n"
+" Vrátí úspÄ›ch, pokud nebyl zadán neplatný pÅ™epínaÄ a POLE nebylo jen pro\n"
+" Ätení."
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+"NaÄte řádky ze souboru do promÄ›nné typu pole.\n"
+" \n"
+" Synonymum pro „mapfile“."
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xrealloc: nelze přealokovat %'lu bajtů (%'lu bajtů alokováno)"
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: nelze alokovat %'lu bajtů"
+
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: %s:%d: nelze přealokovat %'lu bajtů (%'lu bajtů alokováno)"
+
+#~ msgid " "
+#~ msgstr " "
+
+#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR,"
+#~ msgstr "Bez VÃRAZU vrací „$line $filename“. S VÃRAZEM "
+
+#~ msgid "returns \"$line $subroutine $filename\"; this extra information"
+#~ msgstr "vrací „$line $subroutine $filename“. Tyto údaje"
+
+#~ msgid "can be used used to provide a stack trace."
+#~ msgstr "lze využít při výpisu zásobníku volání."
+
+#~ msgid ""
+#~ "The value of EXPR indicates how many call frames to go back before the"
+#~ msgstr "Hodnota VÃRAZ znaÄí, kolik rámců volání se má jít zpÄ›t pÅ™ed"
+
+#~ msgid "current one; the top frame is frame 0."
+#~ msgstr "souÄasný rámec, vrcholový rámec má Äíslo 0."
+
+#~ msgid "%s: invalid number"
+#~ msgstr "%s: chybné Äíslo"
+
+#~ msgid "Shell commands matching keywords `"
+#~ msgstr "Příkazy shellu shodující se s klíÄovými slovy „"
+
+#~ msgid "Display the list of currently remembered directories. Directories"
+#~ msgstr "Zobrazí seznam právě zapamatovaných adresářů. Adresáře"
+
+#~ msgid "find their way onto the list with the `pushd' command; you can get"
+#~ msgstr "se na seznam umisťují příkazem „pushd“, předchozí stav seznamu lze"
+
+#~ msgid "back up through the list with the `popd' command."
+#~ msgstr "vrátit příkazem „popd“."
+
+#~ msgid ""
+#~ "The -l flag specifies that `dirs' should not print shorthand versions"
+#~ msgstr "Příznak -l znaÄí, že „dirs“ nemá vypisovat zkrácené verze adresářů,"
+
+#~ msgid ""
+#~ "of directories which are relative to your home directory. This means"
+#~ msgstr "které leží pod vaším domovským adresářem. To znamená, že „~/bin“"
+
+#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag"
+#~ msgstr "smí být zobrazen jako „/homes/bfox/bin“. Příznak -v způsobí, že"
+
+#~ msgid "causes `dirs' to print the directory stack with one entry per line,"
+#~ msgstr ""
+#~ "„dirs“ vypíše zásobník adresářů záznam po záznamu na samostatné řádky"
+
+#~ msgid ""
+#~ "prepending the directory name with its position in the stack. The -p"
+#~ msgstr "a před název adresáře uvede jeho pořadí v zásobníku. Příznak -p"
+
+#~ msgid "flag does the same thing, but the stack position is not prepended."
+#~ msgstr "dělá to samé, ale bez informace o umístění na zásobníku."
+
+#~ msgid ""
+#~ "The -c flag clears the directory stack by deleting all of the elements."
+#~ msgstr "Příznak -c vyprázdní zásobník smazáním všem prvků."
+
+#~ msgid ""
+#~ "+N displays the Nth entry counting from the left of the list shown by"
+#~ msgstr "+N zobrazí N. položku poÄítáno zleva na seznamu, který by ukázal"
+
+#~ msgid " dirs when invoked without options, starting with zero."
+#~ msgstr " příkaz dirs bez jakýchkoliv pÅ™epínaÄů, poÄítáno od nuly."
+
+#~ msgid ""
+#~ "-N displays the Nth entry counting from the right of the list shown by"
+#~ msgstr "-N zobrazí N. položku poÄítáno zprava na seznamu, který by ukázal"
+
+#~ msgid "Adds a directory to the top of the directory stack, or rotates"
+#~ msgstr ""
+#~ "Přidá adresář na vrchol zásobníku adresářů, nebo rotuje zásobník tak,"
+
+#~ msgid "the stack, making the new top of the stack the current working"
+#~ msgstr "že nový vrchol zásobníku se stane pracovním adresářem."
+
+#~ msgid "directory. With no arguments, exchanges the top two directories."
+#~ msgstr "Bez argumentů prohodí horní dva adresáře."
+
+#~ msgid "+N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "+N Zrotuje zásobník tak, že N. adresář (poÄítáno"
+
+#~ msgid " from the left of the list shown by `dirs', starting with"
+#~ msgstr " zleva seznamu, který by ukázal „dirs“, poÄínaje od"
+
+#~ msgid " zero) is at the top."
+#~ msgstr " nuly) se dostane na vrchol."
+
+#~ msgid "-N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "-N Zrotuje zásobník tak, že N. adresář (poÄítáno"
+
+#~ msgid " from the right of the list shown by `dirs', starting with"
+#~ msgstr " zprava seznamu, který by ukázal „dirs“, poÄínaje od"
+
+#~ msgid "-n suppress the normal change of directory when adding directories"
+#~ msgstr ""
+#~ "-n potlaÄí obvyklou zmÄ›nu pracovního adresáře pÅ™i pÅ™idávání adresářů"
+
+#~ msgid " to the stack, so only the stack is manipulated."
+#~ msgstr " na zásobník, takže se změní jen obsah zásobníku."
+
+#~ msgid "dir adds DIR to the directory stack at the top, making it the"
+#~ msgstr "adr pÅ™idá ADR na vrchol zásobníku adresářů a uÄiní jej"
+
+#~ msgid " new current working directory."
+#~ msgstr " novým pracovním adresářem."
+
+#~ msgid "You can see the directory stack with the `dirs' command."
+#~ msgstr "Zásobník adresářů si lze prohlédnout příkazem „dirs“."
+
+#~ msgid "Removes entries from the directory stack. With no arguments,"
+#~ msgstr "Odstraní položky ze zásobníku adresářů. Bez argumentů"
+
+#~ msgid "removes the top directory from the stack, and cd's to the new"
+#~ msgstr "odstraní adresář z vrcholu zásobníku a přepne se do nového"
+
+#~ msgid "top directory."
+#~ msgstr "vrcholového adresáře."
+
+#~ msgid "+N removes the Nth entry counting from the left of the list"
+#~ msgstr "+N odstraní N. položku poÄítáno zleva na seznamu,"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'"
+#~ msgstr " který by ukázal „dirs“, poÄínaje nulou. Například „popd +0“"
+
+#~ msgid " removes the first directory, `popd +1' the second."
+#~ msgstr " odstraní první adresář, „popd +1“ druhý."
+
+#~ msgid "-N removes the Nth entry counting from the right of the list"
+#~ msgstr "-N odstraní N. položku poÄítáno zprava na seznamu,"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'"
+#~ msgstr " který by ukázal „dirs“, poÄínaje nulou. Například: „popd -0“"
+
+#~ msgid " removes the last directory, `popd -1' the next to last."
+#~ msgstr " odstraní poslední adresář, “popd -1“ předposlední."
+
+#~ msgid ""
+#~ "-n suppress the normal change of directory when removing directories"
+#~ msgstr ""
+#~ "-n potlaÄí obvyklou zmÄ›nu pracovního adresáře pÅ™i odebírání adresářů"
+
+#~ msgid " from the stack, so only the stack is manipulated."
+#~ msgstr " ze zásobníku, takže pouze zásobník dozná změny."
+
+#~ msgid "allocated"
+#~ msgstr "alokováno"
+
+#~ msgid "freed"
+#~ msgstr "uvolněno"
+
+#~ msgid "requesting resize"
+#~ msgstr "požadující velikost"
+
+#~ msgid "just resized"
+#~ msgstr "právě změněna velikost"
+
+#~ msgid "bug: unknown operation"
+#~ msgstr "chyba: neznámá operace"
+
+#~ msgid "malloc: watch alert: %p %s "
+#~ msgstr "malloc: výstraha sledování: %p %s"
+
+#~ msgid ""
+#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n"
+#~ " break N levels."
+#~ msgstr ""
+#~ "UkonÄí smyÄku FOR, WHILE nebo UNTIL. Je-li zadáno N, ukonÄí N úrovní."
+
+#~ msgid ""
+#~ "Run a shell builtin. This is useful when you wish to rename a\n"
+#~ " shell builtin to be a function, but need the functionality of the\n"
+#~ " builtin within the function itself."
+#~ msgstr ""
+#~ "Spustí vestavěný příkaz shellu. Toto se hodí, přejete-li si přejmenovat\n"
+#~ " vestavěný příkaz na funkci, avšak funkcionalitu vestavěného příkazu\n"
+#~ " potřebujete v téže funkci."
+
+#~ msgid ""
+#~ "Print the current working directory. With the -P option, pwd prints\n"
+#~ " the physical directory, without any symbolic links; the -L option\n"
+#~ " makes pwd follow symbolic links."
+#~ msgstr ""
+#~ "Vypíše souÄasný pracovní adresář. S pÅ™epínaÄem -P vypíše pwd fyzický\n"
+#~ " adresář prostý vÅ¡ech symbolický odkazů; pÅ™epínaÄ -L pÅ™inutí pwd\n"
+#~ " následovat symbolické odkazy."
+
+#~ msgid "Return a successful result."
+#~ msgstr "Vrací výsledek úspěchu."
+
+#~ msgid ""
+#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell\n"
+#~ " function called `ls', and you wish to call the command `ls', you can\n"
+#~ " say \"command ls\". If the -p option is given, a default value is "
+#~ "used\n"
+#~ " for PATH that is guaranteed to find all of the standard utilities. "
+#~ "If\n"
+#~ " the -V or -v option is given, a string is printed describing "
+#~ "COMMAND.\n"
+#~ " The -V option produces a more verbose description."
+#~ msgstr ""
+#~ "Spustí PŘÃKAZ s ARGUMENTY ignoruje funkce shellu. Máte-li shellovou\n"
+#~ " funkci pojmenovanou „ls“, a chcete-li zavolat příkaz „ls“, použijte\n"
+#~ " „command ls“. Je-li zadán pÅ™epínaÄ -p, bude pro PATH použita "
+#~ "implicitní\n"
+#~ " hodnota, která zaruÄuje, že budou nalezeny vÅ¡echny standardní "
+#~ "nástroje.\n"
+#~ " Je-li zadán pÅ™epínaÄ -V nebo -v, bude vytiÅ¡tÄ›n Å™etÄ›zec popisující "
+#~ "PŘÃKAZ.\n"
+#~ " PÅ™epínaÄ -V produkuje podrobnÄ›jší popis."
+
+#~ msgid ""
+#~ "Declare variables and/or give them attributes. If no NAMEs are\n"
+#~ " given, then display the values of variables instead. The -p option\n"
+#~ " will display the attributes and values of each NAME.\n"
+#~ " \n"
+#~ " The flags are:\n"
+#~ " \n"
+#~ " -a\tto make NAMEs arrays (if supported)\n"
+#~ " -f\tto select from among function names only\n"
+#~ " -F\tto display function names (and line number and source file name "
+#~ "if\n"
+#~ " \tdebugging) without definitions\n"
+#~ " -i\tto make NAMEs have the `integer' attribute\n"
+#~ " -r\tto make NAMEs readonly\n"
+#~ " -t\tto make NAMEs have the `trace' attribute\n"
+#~ " -x\tto make NAMEs export\n"
+#~ " \n"
+#~ " Variables with the integer attribute have arithmetic evaluation (see\n"
+#~ " `let') done when the variable is assigned to.\n"
+#~ " \n"
+#~ " When displaying values of variables, -f displays a function's name\n"
+#~ " and definition. The -F option restricts the display to function\n"
+#~ " name only.\n"
+#~ " \n"
+#~ " Using `+' instead of `-' turns off the given attribute instead. "
+#~ "When\n"
+#~ " used in a function, makes NAMEs local, as with the `local' command."
+#~ msgstr ""
+#~ "Deklaruje promÄ›nné a/nebo jim nastaví atributy. Nejsou-li zadány NÃZVY,\n"
+#~ " tak místo toho zobrazí hodnoty promÄ›nných. PÅ™epínaÄ -p zobrazí "
+#~ "atributy\n"
+#~ " a hodnoty pro každý NÃZEV.\n"
+#~ " \n"
+#~ " Příznaky jsou:\n"
+#~ " \n"
+#~ " -a\tuÄiní NÃZVY poli (je-li podporováno)\n"
+#~ " -f\tvybírá pouze mezi názvy funkcí\n"
+#~ " -F\tzobrazí názvy funkcí (a Äíslo řádku a název zdrojového "
+#~ "souboru,\n"
+#~ " \tje-li zapnuto ladění) bez definic\n"
+#~ " -i\tpÅ™iÅ™adí NÃZVÅ®M atribut „integer“ (Äíslo)\n"
+#~ " -r\tuÄiní NÃZVY jen pro Ätení\n"
+#~ " -t\tpÅ™iÅ™adí NÃZVÅ®M atribut „trace“ (sledování)\n"
+#~ " -x\tvyexportuje NÃZVY\n"
+#~ " \n"
+#~ " Proměnné s atributem integer jsou aritmeticky vyhodnoceny (vizte "
+#~ "„let“),\n"
+#~ " když je do proměnné přiřazováno.\n"
+#~ " \n"
+#~ " Při zobrazování hodnot proměnných -f zobrazí názvy a definice "
+#~ "funkcí.\n"
+#~ " PÅ™epínaÄ -F omezí výpis jen na názvy funkcí.\n"
+#~ " \n"
+#~ " Pomocí „+“ namísto „-“ daný atribut odeberete. Je-li použito uvnitř\n"
+#~ " funkce, uÄiní NÃZVY lokální stejnÄ› jako příkaz „local“."
+
+#~ msgid "Obsolete. See `declare'."
+#~ msgstr "Zastaralé. Vizte „declare“."
+
+#~ msgid ""
+#~ "Create a local variable called NAME, and give it VALUE. LOCAL\n"
+#~ " can only be used within a function; it makes the variable NAME\n"
+#~ " have a visible scope restricted to that function and its children."
+#~ msgstr ""
+#~ "Vytvoří lokální promÄ›nnou pojmenovanou NÃZEV a pÅ™iÅ™adí jí HODNOTU.\n"
+#~ " LOCAL smí být použito jen uvnitÅ™ funkcí. UÄiní promÄ›nnou NÃZEV "
+#~ "viditelnou\n"
+#~ " jen v dané funkci a jejích potomcích."
+
+#~ msgid ""
+#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed."
+#~ msgstr ""
+#~ "Vypíše ARGUMENTY. Je-li zadáni -n, závÄ›reÄný konec řádku bude potlaÄen."
+
+#~ msgid ""
+#~ "Enable and disable builtin shell commands. This allows\n"
+#~ " you to use a disk command which has the same name as a shell\n"
+#~ " builtin without specifying a full pathname. If -n is used, the\n"
+#~ " NAMEs become disabled; otherwise NAMEs are enabled. For example,\n"
+#~ " to use the `test' found in $PATH instead of the shell builtin\n"
+#~ " version, type `enable -n test'. On systems supporting dynamic\n"
+#~ " loading, the -f option may be used to load new builtins from the\n"
+#~ " shared object FILENAME. The -d option will delete a builtin\n"
+#~ " previously loaded with -f. If no non-option names are given, or\n"
+#~ " the -p option is supplied, a list of builtins is printed. The\n"
+#~ " -a option means to print every builtin with an indication of whether\n"
+#~ " or not it is enabled. The -s option restricts the output to the "
+#~ "POSIX.2\n"
+#~ " `special' builtins. The -n option displays a list of all disabled "
+#~ "builtins."
+#~ msgstr ""
+#~ "Povolí nebo zakáže vestavěný příkaz shellu. To vám umožňuje použít\n"
+#~ " příkaz z disku, který má stejné jméno jako vestavěný příkaz shellu, "
+#~ "aniž\n"
+#~ " byste museli zadávat celou cestu. Je-li použito -n, NÃZVY se stanou\n"
+#~ " zakázanými, jinak budou povoleny. Například „test“ z PATH namísto "
+#~ "verze\n"
+#~ " vestavěné do shellu lze používat tak, že napíšete „enable -n test“. "
+#~ "Na\n"
+#~ " systémech podporujících dynamické zavádÄ›ní pÅ™epínaÄ -f může být "
+#~ "použit\n"
+#~ " pro zavedení nových vestavěných příkazů ze sdíleného objektu "
+#~ "NÃZEV_SOUBORU.\n"
+#~ " PÅ™epínaÄ -d odstraní vestavÄ›ný příkaz zavedený pÅ™es -f. Není-li "
+#~ "zadán\n"
+#~ " žádný pÅ™epínaÄ nebo je-li zadán pÅ™epínaÄ -p, bude vypsán seznam "
+#~ "vestavěných\n"
+#~ " příkazů. PÅ™epínaÄ -a znamená, že budou vypsány vÅ¡echny vestavÄ›né "
+#~ "příkazy a\n"
+#~ " u každého bude vyznaÄeno, zda je povolen nebo zakázán. PÅ™epínaÄ -s "
+#~ "omezí\n"
+#~ " výpis na příkazy uvedené v POSIX.2. PÅ™epínaÄ -n zobrazí seznam vÅ¡ech\n"
+#~ " zakázaných vestavěných příkazů."
+
+#~ msgid ""
+#~ "Read ARGs as input to the shell and execute the resulting command(s)."
+#~ msgstr "NaÄte ARGUMENTY jako vstup shellu a výsledný příkaz(y) provede."
+
+#~ msgid ""
+#~ "Exec FILE, replacing this shell with the specified program.\n"
+#~ " If FILE is not specified, the redirections take effect in this\n"
+#~ " shell. If the first argument is `-l', then place a dash in the\n"
+#~ " zeroth arg passed to FILE, as login does. If the `-c' option\n"
+#~ " is supplied, FILE is executed with a null environment. The `-a'\n"
+#~ " option means to make set argv[0] of the executed process to NAME.\n"
+#~ " If the file cannot be executed and the shell is not interactive,\n"
+#~ " then the shell exits, unless the shell option `execfail' is set."
+#~ msgstr ""
+#~ "Provede SOUBOR, pÅ™iÄemž nahradí tento shell zadaným programem.\n"
+#~ " Není-li SOUBOR zadán, přesměrování zapůsobí v tomto shellu. Je-li "
+#~ "prvním\n"
+#~ " argumentem „-l“, bude do nultého argumentu SOUBORU umístÄ›na pomlÄka "
+#~ "tak,\n"
+#~ " jak to dÄ›lá login. Je-li zadán pÅ™epínaÄ â€ž-c“, bude SOUBOR spuÅ¡tÄ›n\n"
+#~ " s prázdným prostÅ™edím. PÅ™epínaÄ â€ž-a“ znamená, že argv[0] provádÄ›ného\n"
+#~ " procesu bude nastaven na NÃZEV. Pokud soubor nemůže být proveden a "
+#~ "shell\n"
+#~ " není interaktivní, pak shell bude ukonÄen, pokud pÅ™epínaÄ shellu\n"
+#~ " „execfail“ není nastaven."
+
+#~ msgid "Logout of a login shell."
+#~ msgstr "Odhlásí z přihlašovacího (login) shellu."
+
+#~ msgid ""
+#~ "For each NAME, the full pathname of the command is determined and\n"
+#~ " remembered. If the -p option is supplied, PATHNAME is used as the\n"
+#~ " full pathname of NAME, and no path search is performed. The -r\n"
+#~ " option causes the shell to forget all remembered locations. The -d\n"
+#~ " option causes the shell to forget the remembered location of each "
+#~ "NAME.\n"
+#~ " If the -t option is supplied the full pathname to which each NAME\n"
+#~ " corresponds is printed. If multiple NAME arguments are supplied "
+#~ "with\n"
+#~ " -t, the NAME is printed before the hashed full pathname. The -l "
+#~ "option\n"
+#~ " causes output to be displayed in a format that may be reused as "
+#~ "input.\n"
+#~ " If no arguments are given, information about remembered commands is "
+#~ "displayed."
+#~ msgstr ""
+#~ "Pro každý NÃZEV je urÄena plná cesta k příkazu a je zapamatována.\n"
+#~ " Za použití pÅ™epínaÄe -p se vezme NÃZEV_CESTY za plnou cestu k NÃZVU "
+#~ "a\n"
+#~ " žádné vyhledávání cesty se nekoná. PÅ™epínaÄ -r způsobí, že shell "
+#~ "zapomene\n"
+#~ " vÅ¡echny zapamatovaná umístÄ›ní. PÅ™epínaÄ -d způsobí, že shell "
+#~ "zapomene\n"
+#~ " zapamatovaná umístÄ›ní každého NÃZVU. Je-li zadán pÅ™epínaÄ -t, bude "
+#~ "vypsána\n"
+#~ " plná cesta ke každému NÃZVU. Je-li s -t zadáno více NÃZVÅ®, NÃZEV "
+#~ "bude\n"
+#~ " vypsán pÅ™ed uloženou celou cestou. PÅ™epínaÄ -l vytvoří takový "
+#~ "výstup,\n"
+#~ " který lze opět použít jako vstup. Nejsou-li zadány žádné argumenty,\n"
+#~ " budou vypsány informace o zapamatovaných příkazech."
+
+#~ msgid ""
+#~ "Display helpful information about builtin commands. If PATTERN is\n"
+#~ " specified, gives detailed help on all commands matching PATTERN,\n"
+#~ " otherwise a list of the builtins is printed. The -s option\n"
+#~ " restricts the output for each builtin command matching PATTERN to\n"
+#~ " a short usage synopsis."
+#~ msgstr ""
+#~ "Zobrazí užiteÄné informace o vestavÄ›ných příkazech. Je-li zadán VZOREK,\n"
+#~ " vrátí podrobnou nápovědu ke všem příkazům odpovídajícím VZORKU, jinak "
+#~ "je\n"
+#~ " vytiÅ¡tÄ›n seznam vestavÄ›ných příkazů. PÅ™epínaÄ -s omezí výstup "
+#~ "o každém\n"
+#~ " vestavÄ›ném příkazu odpovídajícího VZORKU na struÄný popis použití."
+
+#~ msgid ""
+#~ "By default, removes each JOBSPEC argument from the table of active jobs.\n"
+#~ " If the -h option is given, the job is not removed from the table, but "
+#~ "is\n"
+#~ " marked so that SIGHUP is not sent to the job if the shell receives a\n"
+#~ " SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove "
+#~ "all\n"
+#~ " jobs from the job table; the -r option means to remove only running "
+#~ "jobs."
+#~ msgstr ""
+#~ "Implicitně odstraní každý argument ÚLOHA z tabulky aktivních úloh. Je-li\n"
+#~ " zadán pÅ™epínaÄ -h, úloha není odstranÄ›na z tabulky, ale je oznaÄena "
+#~ "tak.\n"
+#~ " že úloze nebude zaslán SIGHUP, když shell obdrží SIGHUP. PÅ™epínaÄ -"
+#~ "a,\n"
+#~ " pokud není uvedena ÚLOHA, znamená, že všechny úlohy budou odstraněny\n"
+#~ " z tabulky úloh. PÅ™epínaÄ -r znamená, že pouze běžící úlohy budou\n"
+#~ " odstraněny."
+
+#~ msgid ""
+#~ "Causes a function to exit with the return value specified by N. If N\n"
+#~ " is omitted, the return status is that of the last command."
+#~ msgstr ""
+#~ "Způsobí ukonÄení funkce s návratovou hodnotou uvedenou v N. Je-li\n"
+#~ " N vynecháno, návratový kód je roven poslednímu příkazu."
+
+#~ msgid ""
+#~ "For each NAME, remove the corresponding variable or function. Given\n"
+#~ " the `-v', unset will only act on variables. Given the `-f' flag,\n"
+#~ " unset will only act on functions. With neither flag, unset first\n"
+#~ " tries to unset a variable, and if that fails, then tries to unset a\n"
+#~ " function. Some variables cannot be unset; also see readonly."
+#~ msgstr ""
+#~ "Pro každé JMÉNO odstraní odpovídající proměnnou nebo funkci.\n"
+#~ " Spolu s „-v“ bude unset fungovat jen na proměnné. S příznakem „-f“ "
+#~ "bude\n"
+#~ " unset fungovat jen na funkce. Bez těchto dvou příznaků unset nejprve "
+#~ "zkusí\n"
+#~ " zrušit proměnnou a pokud toto selže, tak zkusí zrušit funkci. "
+#~ "Některé\n"
+#~ " proměnné nelze odstranit. Taktéž vizte příkaz „readonly“."
+
+#~ msgid ""
+#~ "NAMEs are marked for automatic export to the environment of\n"
+#~ " subsequently executed commands. If the -f option is given,\n"
+#~ " the NAMEs refer to functions. If no NAMEs are given, or if `-p'\n"
+#~ " is given, a list of all names that are exported in this shell is\n"
+#~ " printed. An argument of `-n' says to remove the export property\n"
+#~ " from subsequent NAMEs. An argument of `--' disables further option\n"
+#~ " processing."
+#~ msgstr ""
+#~ "NÃZVY jsou oznaÄeny pro automatické exportování do prostÅ™edí následnÄ›\n"
+#~ " provádÄ›ných příkazů. Je-li zadán pÅ™epínaÄ -f, NÃZVY se vztahují "
+#~ "k funkcím.\n"
+#~ " Nejsou-li zadány žádné NÃZVY nebo je-li zadáno „-p“, bude vytiÅ¡tÄ›n "
+#~ "seznam\n"
+#~ " všech názvů, které jsou v tomto shellu exportovány. Argument „-n“ "
+#~ "nařizuje\n"
+#~ " odstranit vlastnost exportovat z následujících NÃZVÅ®. Argument „--“\n"
+#~ " zakazuje zpracování dalších pÅ™epínaÄů."
+
+#~ msgid ""
+#~ "The given NAMEs are marked readonly and the values of these NAMEs may\n"
+#~ " not be changed by subsequent assignment. If the -f option is given,\n"
+#~ " then functions corresponding to the NAMEs are so marked. If no\n"
+#~ " arguments are given, or if `-p' is given, a list of all readonly "
+#~ "names\n"
+#~ " is printed. The `-a' option means to treat each NAME as\n"
+#~ " an array variable. An argument of `--' disables further option\n"
+#~ " processing."
+#~ msgstr ""
+#~ "Zadané NÃZVY budou oznaÄeny jako jen pro Ätení a hodnoty tÄ›chto NÃZVÅ®\n"
+#~ " nebude možné zmÄ›nit následným pÅ™iÅ™azením. Je-li zadán pÅ™epínaÄ -f, "
+#~ "pak\n"
+#~ " funkce tÄ›chto NÃZVÅ® budou takto oznaÄeny. Nejsou-li zadány žádné "
+#~ "argumenty\n"
+#~ " nebo je-li zadáno „-p“, bude vytištěn seznam všech jmen jen pro "
+#~ "Ätení.\n"
+#~ " PÅ™epínaÄ â€ž-a“ znamená, že s každým NÃZVEM bude zacházeno jako "
+#~ "s proměnnou\n"
+#~ " typu pole. Argument „--“ zakáže zpracování dalších pÅ™epínaÄů."
+
+#~ msgid ""
+#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is\n"
+#~ " not given, it is assumed to be 1."
+#~ msgstr ""
+#~ "PoziÄní parametry budou pÅ™ejmenovány z $N+1 na $1 atd. Není-li N zadáno,\n"
+#~ " předpokládá se 1."
+
+#~ msgid ""
+#~ "Suspend the execution of this shell until it receives a SIGCONT\n"
+#~ " signal. The `-f' if specified says not to complain about this\n"
+#~ " being a login shell if it is; just suspend anyway."
+#~ msgstr ""
+#~ "Pozastaví provádění tohoto shellu do doby, něž bude obdržen signál\n"
+#~ " SIGCONT. „-f“, je-li zadán, potlaÄí stížnost na to, že se jedná\n"
+#~ " o pÅ™ihlaÅ¡ovací shell (pokud tomu tak je), a prostÄ› pozastaví Äinnost."
+
+#~ msgid ""
+#~ "Print the accumulated user and system times for processes run from\n"
+#~ " the shell."
+#~ msgstr ""
+#~ "Vypíše celkovou dobu procesu spuštěného z shellu, kterou strávil\n"
+#~ " v uživatelském a jaderném (system) prostoru."
+
+#~ msgid ""
+#~ "For each NAME, indicate how it would be interpreted if used as a\n"
+#~ " command name.\n"
+#~ " \n"
+#~ " If the -t option is used, `type' outputs a single word which is one "
+#~ "of\n"
+#~ " `alias', `keyword', `function', `builtin', `file' or `', if NAME is "
+#~ "an\n"
+#~ " alias, shell reserved word, shell function, shell builtin, disk "
+#~ "file,\n"
+#~ " or unfound, respectively.\n"
+#~ " \n"
+#~ " If the -p flag is used, `type' either returns the name of the disk\n"
+#~ " file that would be executed, or nothing if `type -t NAME' would not\n"
+#~ " return `file'.\n"
+#~ " \n"
+#~ " If the -a flag is used, `type' displays all of the places that "
+#~ "contain\n"
+#~ " an executable named `file'. This includes aliases, builtins, and\n"
+#~ " functions, if and only if the -p flag is not also used.\n"
+#~ " \n"
+#~ " The -f flag suppresses shell function lookup.\n"
+#~ " \n"
+#~ " The -P flag forces a PATH search for each NAME, even if it is an "
+#~ "alias,\n"
+#~ " builtin, or function, and returns the name of the disk file that "
+#~ "would\n"
+#~ " be executed."
+#~ msgstr ""
+#~ "O každém NÃZVU Å™ekne, jak by byl interpretován, kdyby byl použit jako\n"
+#~ " název příkazu.\n"
+#~ " \n"
+#~ " Je-li použit pÅ™epínaÄ -t, „type“ vypíše jedno slovo z tÄ›chto: "
+#~ "„alias“,\n"
+#~ " „keyword“, „function“, „builtin“, „file“ nebo „“, je-li NÃZEV alias,\n"
+#~ " klíÄové slovo shellu, shellová funkce, vestavÄ›ný příkaz shellu, "
+#~ "soubor\n"
+#~ " na disku nebo nenalezený soubor.\n"
+#~ " \n"
+#~ " Je-li použit pÅ™epínaÄ -p, „type“ buÄ vrátí jméno souboru na disku, "
+#~ "který\n"
+#~ " by byl spuÅ¡tÄ›n, nebo nic, pokud „type -t NÃZEV“ by nevrátil „file“.\n"
+#~ " \n"
+#~ " Je-li použit pÅ™epínaÄ -a, „type“ zobrazí vÅ¡echna místa, kde se "
+#~ "nalézá\n"
+#~ " spustitelný program pojmenovaný „soubor“. To zahrnuje aliasy, "
+#~ "vestavěné\n"
+#~ " příkazy a funkce jen a pouze tehdy, když není rovněž použit pÅ™epínaÄ -"
+#~ "p.\n"
+#~ " \n"
+#~ " PÅ™epínaÄ -f potlaÄí hledání mezi funkcemi shellu.\n"
+#~ " \n"
+#~ " PÅ™epínaÄ -P vynutí prohledání PATH na každý NÃZEV, dokonce i když se\n"
+#~ " jedná o alias, vestavěný příkaz nebo funkci, a vrátí název souboru "
+#~ "na\n"
+#~ " disku, který by byl spuštěn."
+
+#~ msgid ""
+#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if\n"
+#~ " `-S' is supplied, the current value of the mask is printed. The `-"
+#~ "S'\n"
+#~ " option makes the output symbolic; otherwise an octal number is "
+#~ "output.\n"
+#~ " If `-p' is supplied, and MODE is omitted, the output is in a form\n"
+#~ " that may be used as input. If MODE begins with a digit, it is\n"
+#~ " interpreted as an octal number, otherwise it is a symbolic mode "
+#~ "string\n"
+#~ " like that accepted by chmod(1)."
+#~ msgstr ""
+#~ "Uživatelská maska práv vytvářených souborů je nastavena na MÓD. Je-li\n"
+#~ " MÓD vynechán nebo je-li uvedeno „-S“, bude vytiÅ¡tÄ›na souÄasná "
+#~ "hodnota\n"
+#~ " masky. PÅ™epínaÄ â€ž-S“ uÄiní výstup symbolický, jinak bude výstupem\n"
+#~ " osmiÄkové Äíslo. Je-li zadáno „-p“ a MÓD je vynechán, bude výstup ve\n"
+#~ " formátu, který lze použít jako vstup. ZaÄíná-li MÓD Äíslicí, bude\n"
+#~ " interpretován jako osmiÄkové Äíslo, jinak jako Å™etÄ›zec symbolického "
+#~ "zápisu\n"
+#~ " práv tak, jak jej chápe chmod(1)."
+
+#~ msgid ""
+#~ "Wait for the specified process and report its termination status. If\n"
+#~ " N is not given, all currently active child processes are waited for,\n"
+#~ " and the return code is zero. N is a process ID; if it is not given,\n"
+#~ " all child processes of the shell are waited for."
+#~ msgstr ""
+#~ "PoÄká na zadaný proces a nahlásí jeho návratový kód. Není-li N zadáno,\n"
+#~ " bude se Äekat na vÅ¡echny právÄ› aktivní procesy potomků a návratová "
+#~ "hodnota\n"
+#~ " bude nula. N je ID procesu. Není-li zadáno, bude se Äekat na vÅ¡echny\n"
+#~ " procesy potomků tohoto shellu."
+
+#~ msgid ""
+#~ "Create a simple command invoked by NAME which runs COMMANDS.\n"
+#~ " Arguments on the command line along with NAME are passed to the\n"
+#~ " function as $0 .. $n."
+#~ msgstr ""
+#~ "Vytvoří jednoduchý příkaz volaný JMÉNEM, který spustí PŘÃKAZY. Argumenty\n"
+#~ " z příkazové řádky spolu se JMÉNEM budou předány do funkce jako $0…$n."
+
+#~ msgid ""
+#~ "Toggle the values of variables controlling optional behavior.\n"
+#~ " The -s flag means to enable (set) each OPTNAME; the -u flag\n"
+#~ " unsets each OPTNAME. The -q flag suppresses output; the exit\n"
+#~ " status indicates whether each OPTNAME is set or unset. The -o\n"
+#~ " option restricts the OPTNAMEs to those defined for use with\n"
+#~ " `set -o'. With no options, or with the -p option, a list of all\n"
+#~ " settable options is displayed, with an indication of whether or\n"
+#~ " not each is set."
+#~ msgstr ""
+#~ "PÅ™epne hodnoty promÄ›nných řídící volitelné chování. PÅ™epínaÄ -s znamená,\n"
+#~ " že se každý NÃZEV_VOLBY zapne (nastaví). PÅ™epínaÄ -u každý "
+#~ "NÃZEV_VOLBY\n"
+#~ " vypne. PÅ™epínaÄ -q potlaÄí výstup. Zda je nebo není nastaven každý\n"
+#~ " NÃZEV_VOLBY, indikuje návratový kód. PÅ™epínaÄ -o omezí NÃZVY_VOLEB na "
+#~ "ty,\n"
+#~ " které jsou definovány pro použití s „set -o“. Bez pÅ™epínaÄů nebo\n"
+#~ " s pÅ™epínaÄem -p je zobrazen seznam vÅ¡ech nastavitelných voleb vÄetnÄ›\n"
+#~ " indikace, zda je každá nastavena."
+
+#~ msgid ""
+#~ "For each NAME, specify how arguments are to be completed.\n"
+#~ " If the -p option is supplied, or if no options are supplied, "
+#~ "existing\n"
+#~ " completion specifications are printed in a way that allows them to "
+#~ "be\n"
+#~ " reused as input. The -r option removes a completion specification "
+#~ "for\n"
+#~ " each NAME, or, if no NAMEs are supplied, all completion "
+#~ "specifications."
+#~ msgstr ""
+#~ "U každého NÃZVU sdÄ›lí, jak budou argumenty doplnÄ›ny. Je-li zadán\n"
+#~ " pÅ™epínaÄ -p nebo není-li zadán pÅ™epínaÄ Å¾Ã¡dný, budou existující "
+#~ "definice\n"
+#~ " doplňování vytištěny tak. že je bude možné znovu použít jako vstup.\n"
+#~ " PÅ™epínaÄ -r odstraní definici doplnÄ›ní pro každý NÃZEV nebo chybí-li "
+#~ "NÃZVY,\n"
+#~ " odstraní všechny definice."
diff --git a/po/de.gmo b/po/de.gmo
new file mode 100644
index 0000000..eadb264
--- /dev/null
+++ b/po/de.gmo
Binary files differ
diff --git a/po/de.po b/po/de.po
new file mode 100644
index 0000000..a532a09
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,6579 @@
+# German language file for GNU Bash 4.0
+# Copyright (C) 1996 Free Software Foundation, Inc.
+# This file is distributed under the same license as the bash package.
+# Nils Naumann <nnau@gmx.net>, 1996, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: bash 4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2009-09-14 20:37+0200\n"
+"Last-Translator: Nils Naumann <nnau@gmx.net>\n"
+"Language-Team: German <translation-team-de@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "Falscher Feldbezeichner."
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr "%s: Kann nicht das indizierte in ein assoziatives Array umwandeln."
+
+#: arrayfunc.c:480
+#, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: Ungültiger Schlüssel für das assoziative Array."
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: Kann nicht auf einen nicht-numerischen Index zuweisen."
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+"%s: %s: Ein Feldbezeicher wird zum Zuweisen eines assoziativen Arrays "
+"benötigt."
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: Kann die Datei %s nicht erzeugen."
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+"bash_execute_unix_command: Kann nicht die Tastenzuordnung für das Kommando "
+"finden."
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr " %s: Das erste nicht Leerzeichen ist nicht `\\'."
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "fehlende schließende `%c' in %s."
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: Fehlender Doppelpunkt."
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "`%s': Ungültiger KEYMAP Name."
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr "Zeileneditierung ist nicht aktiviert."
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "`%s': Ungültiger KEYMAP Name."
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: Nicht lesbar: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "`%s': Bindung kann nicht gelöst werden."
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "%s: Unbekannter Funktionsname."
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s ist keiner Taste zugeordnet.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s kann aufgerufen werden durch "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr "Schleifen Zähler"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "nur in einer `for', `while' oder `until' Schleife sinnvoll."
+
+# Problem mit Extraktion des Strings
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "HOME ist nicht zugewiesen."
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "OLDPWD ist nicht zugewiesen."
+
+# Debug Ausgabe
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr "Zeile %d: "
+
+#: builtins/common.c:139 error.c:261
+#, c-format
+msgid "warning: "
+msgstr "Warnung: "
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr "%s: Gebrauch: "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "Zu viele Argumente."
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: Ein numerischer Paremeter ist erforderlich."
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: Ein numerischer Parameter ist erforderlich."
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: Nicht gefunden."
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: Ungültige Option"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: Ungültiger Optionsname."
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "`%s': Ist kein gültiger Bezeichner."
+
+#: builtins/common.c:238
+msgid "invalid octal number"
+msgstr "Ungültige Oktalzahl."
+
+#: builtins/common.c:240
+msgid "invalid hex number"
+msgstr "Ungültige hexadezimale Zahl."
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "Ungültige Zahl."
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: Ungültige Signalbezeichnung."
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "`%s': Ist keine gültige Prozess- oder Jobbezeichnung."
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: Schreibgeschützte Variable."
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s ist außerhalb des Gültigkeitsbereiches."
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "Argument"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s ist außerhalb des Gültigkeitsbereiches."
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: Kein solche Job."
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: Keine Job Steuerung in dieser Shell."
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "Keine Job Steuerung in dieser Shell."
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: gesperrt"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "gesperrt"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: Ist kein Shell Kommando."
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "Schreibfehler: %s."
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr "Fehler beim Setzen der Terminalattribute: %s"
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr "Fehler beim Ermitteln der Terminalattribute: %s"
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: Kann das nicht aktuelle Verzeichnis wiederfinden: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: Mehrdeutige Job Bezeichnung."
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: Ungültige Methode."
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: Keine Komplettierung angegeben."
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "Warnung: Die -F Option könnte unerwartete Ergebnisse liefern."
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "Warnung: Die -C Option könnte unerwartete Ergebnisse liefern."
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr "Gegenwärtig wird keine Komplettierungsfunktion ausgeführt."
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "kann nur innerhalb einer Funktion benutzt werden."
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "Mit `-f' können keine Funktionen erzeugt werden."
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: Schreibgeschützte Funktion."
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: Kann Feldvariablen nicht auf diese Art löschen."
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+"%s: Konvertieren von assoziativen in indizierte Arrays ist nicht möglich."
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "Dynamisches Laden ist nicht verfügbar."
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "Kann die dynamische Bibiliothek nicht laden %s: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "Kann %s nicht in der dynamischen Bibiliothek finden %s: %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: Ist nicht dynamisch geladen."
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: Kann nicht löschen: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: ist ein Verzeichnis."
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: Ist keine normale Datei."
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: Die Datei ist zu groß."
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: Kann die Datei nicht ausführen."
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: Kann nicht ausführen: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr "Abgemeldet\n"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "Keine Login Shell: Mit exit abmelden."
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "Es gibt noch angehaltene Prozesse.\n"
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr "Es gibt noch laufende Prozesse.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "Kein Kommando gefunden."
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr ""
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: Kann die tempräre Datei nicht öffnen: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr "gegenwärtig"
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "Job %d wurde ohne Jobsteuerung gestartet."
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: Ungültige Option -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: Diese Option erfordert ein Argument -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "Hashing deaktiviert."
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: Die Hashtabelle ist leer.\n"
+
+#: builtins/hash.def:244
+#, c-format
+msgid "hits\tcommand\n"
+msgstr "Treffer\tBefehl\n"
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Shell Kommandos auf die das Schlüsselwort zutrifft `"
+msgstr[1] "Shell Kommandos auf die die Schlüsselwörter zutreffen `"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"Auf `%s' trifft kein Hilfethema zu. Probieren Sie `help help', `man -k %s' "
+"oder `info %s'."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: Kann die Datei nicht öffnen: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"Die Shell Kommandos sind intern definiert. Mit `help' kann eine Liste\n"
+"angesehen werden. Durch `help Name' wird eine Beschreibung der\n"
+"Funktion `Name' angezeigt. Die Dokumentation ist mit `info bash'\n"
+"einsehbar. Detaillierte Beschreibungen der Shellkommandos sind mit\n"
+"`man -k' oder `info' abrufbar.\n"
+"\n"
+"Ein Stern (*) neben dem Namen kennzeichnet deaktivierte Kommandos.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "Es darf nur eine Option aus -anrw angegeben werden."
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "Kommandostapelposition."
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: Kommandoersetzung gescheitert."
+
+#: builtins/inlib.def:71
+#, c-format
+msgid "%s: inlib failed"
+msgstr "%s: inlib gescheitert."
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "Keine weiteren Optionen mit `-x' erlaubt."
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: Die Argumente müssen Prozess- oder Jobbezeichnungen sein."
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Unbekannter Fehler."
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "Ausdruck erwartet."
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: Ist kein Array."
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr ""
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: Ungültiger Dateibezeichner: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, c-format
+msgid "%s: invalid line count"
+msgstr "%s: Ungültige Zeilenanzahlangabe."
+
+#: builtins/mapfile.def:277
+#, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: Ungültiger Zeilenindex für den Array Beginn."
+
+#: builtins/mapfile.def:294
+#, c-format
+msgid "%s: invalid callback quantum"
+msgstr ""
+
+#: builtins/mapfile.def:326
+msgid "empty array variable name"
+msgstr "Fehlender Name für die Array Variable."
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr "Die Array Variablen Unterstützung ist in dieser Shell nicht vorhanden."
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "`%s': Fehlendes Formatierungszeichen."
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "`%c': Ungültiges Formatierungszeichen."
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr "Warnung: %s: %s"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "Fehlende hexadezimale Ziffer nach \\x."
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "kein anderes Verzeichnis"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<kein aktuelles Verzeichnis>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr "Der Verzeichnisstapel ist leer."
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr ""
+
+#: builtins/pushd.def:683
+#, fuzzy
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+"Zeigt die Liste der gegenwärtig gespeicherten Verzeichnisse an.\n"
+" Gespeichert werden die Verzeichnisse durch das `popd' Kommando und\n"
+" können durch das `pushd' Kommando wieder vom Stapel entfernt\n"
+" werden.\n"
+"\n"
+" Optionen:\n"
+" -c Verzeichnisstapel durch Löschen aller Einträge bereinigen.\n"
+" -l "
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Legt ein Verzeichniseintrag auf den Verzeichnisstapel ab oder rotiert\n"
+"den Stapel so, dass das aktuelle Verzeichnis oben liegt. Ohne Argumente\n"
+"werden die beiden oberen Einträge vertauscht.\n"
+"\n"
+" Optionen: \n"
+" -n\tVermeidet das Wechseln des Verzeichnisses, so dass\n"
+"\tnur der Verzeichnisstapel geändert wird.\n"
+"\n"
+" Argumente:\n"
+" +N\tRotiert den Verzeichnisstapel, dass das N-te Verzeichnis\n"
+"\tvon links, das von `dirs' angezeigt wird, nach oben kommt. Die Zählung\n"
+"\tbeginnt dabei mit Null.\n"
+"\n"
+" -N\tRotiert den Verzeichnisstapel, dass das N-te Verzeichnis\n"
+"\tvon rechts, das von `dirs' angezeigt wird, nach oben kommt. Die \n"
+"\tZählung beginnt dabei mit Null.\n"
+"\n"
+" dir\tLegt DIR auf den Verzeichnisstapel und wechselt in dieses\n"
+" Verzeichnis.\n"
+" \n"
+" Das `dirs' Kommando zeigt den Verueichnisstapel an."
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Erntfernt Einträge vom Stapel. Ohne Argumente wird der oberste Eintrag\n"
+" gelöscht und anschließend in das das neue oben liegede Verzeichnis\n"
+" gewechselt.\n"
+" \n"
+" Optionen:\n"
+" -n\tVermeidet das Wechseln des Verzeichnisses, so dass\n"
+"\tnur der Verzeichnisstapel geändert wird.\n"
+" \n"
+" Argumente:\n"
+" +N\tEntfernt den N-ten Eintrag von links, der von `dirs'\n"
+"\tangezeigt wird. Dabei beginnt die Zählung von Null. So\n"
+"\tentfernt z.B. `popd +0' den ersten und `popd +1' den zweiten\n"
+"\tEintrag.\n"
+" \n"
+" -N\tEntfernt den N-ten Eintrag von rechts, der von `dirs'\n"
+"\tangezeigt wird. Dabei beginnt die Zählung von Null. So\n"
+"\tentfernt z.B. `popd -0' den letzten und `popd +1' den vorletzten\n"
+"\tEintrag.\n"
+" \n"
+" Das `dirs' Kommando zeigt den Verzeichnisstapel an."
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: Ungültige Wartezeitangebe."
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "Lesefehler: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr ""
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr ""
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr ""
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: Ist kein Array."
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: Ist keine Funktion."
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr ""
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr "Kann nicht Shell Optinen gleichzeitig aktivieren und deaktivieren."
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr ""
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "Ein Dateiname wird as Argument benötigt."
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: Datei nicht gefunden."
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr ""
+
+# logout
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "Kann die Loginshell nicht unterbrechen."
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr ""
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s Ist ein reserviertes Schlüsselwort der Shell.\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s ist eine Funktion.\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr ""
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s ist %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr ""
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr ""
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "`%c': Falsches Kommando."
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: Kann die nicht Grenze setzen: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr "Grenze"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: Kann die Grenze nicht ändern: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr ""
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr ""
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr ""
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr " Zeile "
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "Letztes Kommando: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "Abbruch..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "Unbekanntes Kommando"
+
+#: error.c:407
+msgid "bad command type"
+msgstr ""
+
+# Programmierfehler
+#: error.c:408
+msgid "bad connector"
+msgstr ""
+
+#: error.c:409
+msgid "bad jump"
+msgstr "Falscher Sprung"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s ist nicht gesetzt."
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "Zu lange keine Eingabe: Automatisch ausgeloggt.\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "Kann nicht die Standardeingabe von /dev/null umleiten: %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "TIMEFORMAT: `%c': Ungültiges Formatzeichen."
+
+#: execute_cmd.c:2075
+msgid "pipe error"
+msgstr "Pipe-Fehler"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: Verboten: `/' ist in Kommandonamen unzulässig."
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: Kommando nicht gefunden."
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: Defekter Interpreter"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "Kann fd %d nicht auf fd %d verdoppeln."
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "Zu viele Rekursionen in Ausdruck."
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "Rekursionsstapel leer."
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "Syntaxfehler im Ausdruck."
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "Zuweisung zu einer Nicht-Variablen versucht."
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "Division durch 0."
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "Fehler: Falscher Zuweisungsoperator."
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "`:' erwartet für ein bedingten Ausdruck."
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "Der Exponent ist kleiner als 0."
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr ""
+"Nach einem Präinkrement oder Prädekrement wird ein Bezeichner erwartet."
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "Fehlende `)'"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "Syntax Fehler: Operator erwartet."
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "Syntaxfehler: Ungültiger arithmetischer Operator."
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s%s%s: %s (Fehlerverursachendes Zeichen ist \\\"%s\\\")."
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "Ungültige Basis."
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "Der Wert ist zu groß für die aktuelle Basis."
+
+#: expr.c:1329
+#, c-format
+msgid "%s: expression error\n"
+msgstr "%s: Fehler im Ausdruck.\n"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getwd: Kann nicht auf das übergeordnete Verzeichnis zugreifen."
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "Konnte den No-Delay Modus für fd %d nicht wieder herstellen."
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr "Kann keinen neuen Filedeskriptor für die Eingabe von fd %d zuweisen."
+
+# Debug Ausgabe
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "save_bash_input: Es existiert bereits ein Puffer für den neuen fd %d."
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr "start_pipeline: pgrp pipe"
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr ""
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr ""
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr ""
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr ""
+
+# Programmierfehler
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: %ld: Prozeßnummer existiert nicht."
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr "Signal %d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Fertig"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Angehalten"
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr "Angehalten(%s)"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "Läuft"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Fertig(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "Exit %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Unbekannter Status"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(Speicherabzug geschrieben) "
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr " (wd: %s)"
+
+# interner Fehler
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr ""
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait: Prozeß %ld wurde nicht von dieser Shell gestartet."
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr ""
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr ""
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: Programm ist beendet."
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr ""
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+# Debug Ausgabe
+#: jobs.c:3508
+#, c-format
+msgid "%s: line %d: "
+msgstr "%s: Zeile %d: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr " (Speicherabzug geschrieben)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(gegenwärtiges Arbeitsverzeichnis ist: %s)\n"
+
+# interner Fehler
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_jobs: getpgrp war nicht erfolgreich."
+
+# interner Fehler
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_job_control: line discipline"
+
+# interner Fehler
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_job_control: setpgid"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr "Kann die Prozessgruppe des Terminals nicht setzen (%d)."
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "Keine Job Steuerung in dieser Shell."
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc: Speicherzusicherung gescheitert: %s.\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\\r\n"
+"malloc: %s:%d: Speicherzusicherung verpfuscht\\r\n"
+
+#: lib/malloc/malloc.c:313
+msgid "unknown"
+msgstr "Unbekannt"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr ""
+"Malloc: Ein frei gekennzeichneter Speicherbereich wurde überschrieben."
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free: Wurde für bereits freigegebenen Speicherbereich aufgerufen."
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free: Wurde für nicht zugeordneten Speicherbereich aufgerufen."
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr "free: Underflow erkannt; mh_nbytes außerhalb des Gültigkeitsbereichs."
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free: Beginn und Ende Segmentgrößen sind unterschiedlich."
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc: Mit nicht zugewiesenen Argument aufgerufen."
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr ""
+"realloc: Underflow erkannt; mh_nbytes außerhalb des Gültigkeitsbereichs."
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "realloc: Beginn und Ende Segmentgrößen sind unterschiedlich.<"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr ""
+"register_alloc: Speicherzuordnungstabelle ist mit FIND_ALLOC gefüllt?\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr ""
+"register_alloc: %p ist bereits in der Speicherzuordnungstabelle als belegt "
+"gekennzeichnet?\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr ""
+"register_free: %p ist bereits in der Speicherzuordnungstabelle als frei "
+"gekennzeichnet?\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "Ungültige Basis"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: Unbekannter Host."
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: unbekannter Dienst."
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: Fehlerhafte Netzwerkspfadangabe."
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "Der Netzwerkbetrieb ist nicht unterstützt."
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc: %s:%d: Kann nicht %lu Bytes reservieren."
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc: %s:%d: Kann nicht %lu Bytes reservieren."
+
+# Du oder Sie?
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Sie haben Post in $_."
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Sie haben neue Post in $_."
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "Die Post in %s wurde bereits gelesen.\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "Syntaxfehler: Ein arithmetischer Ausdruck wird verlangt."
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "Syntax Fehler: unerwartetes `;'."
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "Syntax Fehler: `((%s))'."
+
+# interner Fehler
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: Falscher Befehlstyp %d."
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr ""
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "Dateiende beim Suchen nach `%c' erreicht."
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "Dateiende beim Suchen nach `]]' erreicht."
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "Syntaxfehler im bedingten Ausdruck: Unerwartetes Zeichen `%s'."
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "Syntaxfehler im bedingen Ausdruck."
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "Unerwartetes Zeichen: `%s' anstatt von `)'"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "`)' erwartet."
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr ""
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr ""
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr ""
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr ""
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr ""
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr ""
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr ""
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr ""
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr ""
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "Syntaxfehler beim unerwarteten Wort `%s'"
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "Syntaxfehler beim unerwarteten Wort `%s'"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "Syntax Fehler: Unerwartetes Dateiende."
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "Syntax Fehler"
+
+# Du oder Sie?
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Benutze \"%s\" um die Shell zu verlassen.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "Dateiende beim Suchen nach passender `)' erreicht."
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr ""
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr ""
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: Falsches Verbindungszeichen `%d'."
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d: Ungültiger Dateibezeichner: %s"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr ""
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr ""
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: Mehrdeutige Umlenkung."
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: Kann existierende Datei nicht überschreiben."
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: Gesperrt: Die Ausgabe darf nicht umgeleitet werden."
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr ""
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: Kann einem Feldelement keine Liste zuweisen."
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "/dev/(tcp|udp)/host/port Wird ohne Netzwerk nicht unterstützt"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr ""
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "Konnte das /tmp Verzeichnis nicht finden, bitte anlegen."
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "/tmp muß ein gültiger Verzeichnisname sein."
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: Ungültige Option"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Ich habe keinen Benutzernamen!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU bash, Version %s-(%s)\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Benutzung:\t%s [Lange GNU Option] [Option] ...\n"
+"\t\t%s [Lange GNU Option] [Option] Script-Datei ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "Lange GNU Optionen:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Shell-Optionen:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD oder -c Kommando\t\t(Nur Aufruf)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s oder Option -o\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr "`%s -c \"help set\"' für mehr Informationen über Shell-Optionen.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr "`%s -c help' für mehr Information über Shell-Kommandos.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "Mit dem `bashbug' Kommando können Fehler gemeldet werden.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d: Ungültige Operation"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Falsches Signal."
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Aufgelegt"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Unterbrochen (Interrupt)"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "Quit"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Ungültige Anweisung."
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "Verfolgen/anhalten abfangen (Trace/breakpoint trap)"
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "Abbruchkommando"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "EMT abfangen (EMT trap)"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Gleitkommafehler"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "Abgebrochen (Killed)"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "Bus-Fehler"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Adressierungsfehler"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Falscher Systemaufruf"
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "Unterbrochene Pipe"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Wecker"
+
+#: siglist.c:111
+msgid "Terminated"
+msgstr "Abgebrochen (Terminated)"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "Dringende IO-Bedingung"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Angehalten (Signal)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "Prozeßbearbeitung wieder aufgenommen."
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "Kindprozeß abgebrochen oder gestoppt."
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Angehalten (Terminaleingabe)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Angehalten (Terminalausgabe)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "E/A fertig"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "Rechenzeitgrenze"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "Grenze für Dateigröße"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "Alarm (Virtuell)"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "Alarm (Profil)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Fenster geändert."
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr "Datei blockiert."
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "Nutzersignal 1"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "Nutzersignal 2"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "HFT Eingabedaten ausstehend."
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "Spannungsausfall steht bevor."
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "Systemausfall steht bevor."
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "Verlege den Prozeß auf einen anderen Prozessor."
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "Programmierfehler"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "HFT-Monitormodus erlaubt."
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "HFT-Monitormodus abgeschaltet."
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "HFT-Tonfolge beendet."
+
+#: siglist.c:215
+msgid "Information request"
+msgstr "Informationsanforderung"
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Unbekannte Signalnummer."
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Unbekanntes Signal Nr.: %d."
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "Falsche Ersetzung: Keine schließende `%s' in `%s' enthalten."
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: Kann einem Feldelement keine Liste zuweisen."
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "Kann keine Pipe für die Prozeßersetzung erzeugen."
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "Kann den Kindsprozess für die Prozeßersetzung nicht erzeugen."
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "Kann nicht die benannte Pipe %s zum lesen öffnen."
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "Kann nicht die benannte Pipe %s zum schreiben öffnen."
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "Kann die benannte Pipe %s nicht auf fd %d."
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "Kann keine Pipes für Kommandoersetzung erzeugen."
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr "Kann keinen Unterprozess für die Kommandoersetzung erzeugen."
+
+# interner Fehler
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "Kommandoersetzung: Kann Pipe nicht als fd 1 duplizieren."
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: Parameter ist Null oder nicht gesetzt."
+
+# interner Fehler
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: Teilstring-Ausdruck < 0."
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: Falsche Variablenersetzung."
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: Kann so nicht zuweisen."
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "Falsche Ersetzung: Keine schließende \"`\" in %s."
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "Keine Entsprechung: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "Argument erwartet."
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: Ganzzahliger Ausdruck erwartet."
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "`)' erwartet."
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "`)' erwartet, %s gefunden."
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: Einstelliger (unärer) Operator erwartet."
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: Zweistelliger (binärer) Operator erwartet."
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "Fehlende `]'"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "Ungültige Signalnummer."
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr ""
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+
+# Programmierfehler
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: Falsches Signal %d."
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "Fehler beim Importieren der Funktionsdefinition für `%s'."
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr ""
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr ""
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr ""
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: Parameter ist Null oder nicht gesetzt."
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr ""
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr ""
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr ""
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: Kann die Datei nicht öffnen: %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d: Ungültiger Dateibezeichner: %s"
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Copyright (C) 2009 Free Software Foundation, Inc."
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Lizenz GPLv3+: GNU GPL Version 3 oder jünger <http://gnu.org/licenses/gpl."
+"html>\n"
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU bash, Version %s (%s)\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr "Dies ist freie Software. Sie darf verändert und verteilt werden.\n"
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr "Für dieses Programm besteht keinerlei Garantie.\n"
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Copyright (C) 2009 Free Software Foundation, Inc."
+
+#: version2.c:87
+#, fuzzy, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Lizenz GPLv3+: GNU GPL Version 3 oder jünger <http://gnu.org/licenses/gpl."
+"html>\n"
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: Kann %lu Bytes nicht reservieren (%lu bytes reserviert)."
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: Kann nicht %lu Bytes reservieren."
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+"xmalloc: %s:%d: Kann nicht %lu Bytes reservieren (%lu bytes reserviert)."
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: %s:%d: Kann nicht %lu Bytes reservieren."
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [Name[=Wert] ... ]"
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] Name [Name ...]"
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+"bind [-lpvsPVS] [-m Tastaturtabelle] [-f Dateiname] [-q Name] [-u Name] [-r "
+"Tastenfolge:Shell Kommando] [Tastenfolge:readline Funktion oder Kommando]"
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [n]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [n]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [Shellkommando [Argument ...]]"
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr "caller [Ausdruck]"
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-L|-P] [Verzeichnis]"
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr "pwd [-LP]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr "Wahr"
+
+#: builtins.c:72
+msgid "false"
+msgstr "Falsch"
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] Kommando [Argument ...]"
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-aAfFilrtux] [-p] [Name[=Wert] ...]"
+
+#
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-aAfFilrtux] [-p] Name[=Wert] ..."
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr "local [Option] Name[=Wert] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [Argument ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [Argument ...]"
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-a] [-dnps] [-f Dateiname] [Name ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [Argument ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts Optionen Variable [Argumente]"
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a Name] [Kommando [Argumente ...]] [Umleitung ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [n]"
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr "logout [n]"
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+"fc [-e Editor] [-lnr] [Anfang] [Ende] oder fc -s [Muster=Ersetzung] "
+"[Kommando]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [Jobbezeichnung]"
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr "bg [Jobbezeichnung ...]"
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-lr] [-p Pfadname] [-dt] [Name ...]"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "help [-ds] [Muster ...]"
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [-d Offset] [n] oder history -anrw [Dateiname] oder history -ps "
+"Argument [Argument...]"
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr "jobs [-lnprs] [Jobbez. ...] or jobs -x Kommando [Arg]"
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [-h] [-ar] [Jobbezeichnung ...]"
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s Signalname | -n Signalnummer | -Signalname] [pid | job] ... oder "
+"kill -l [Signalname]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let Argument [Argument ...]"
+
+#: builtins.c:136
+#, fuzzy
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+"read [-ers] [-a Feld] [-d Begrenzer] [-i Text] [-n Zeichenanzahl] [-p "
+"Prompt] [-t Zeitlimit] [-u fd] [Name ...]"
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o Option] [ARG ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [NAME ...]"
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-fn] [Name[=Wert] ...] oder export -p"
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-af] [Name[=Wert] ...] oder readonly -p"
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr "shift [n]"
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr "source Dateiname [Argumente]"
+
+#: builtins.c:152
+msgid ". filename [arguments]"
+msgstr ". Dateiname [Argumente]"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [Ausdruck]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ Argument... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "times"
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [-lp] [[Argument] Signalbezeichnung ...]"
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-afptP] Name [Name ...]"
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdefilmnpqrstuvx] [Grenzwert]"
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-p] [-S] [Modus]"
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr "wait [id]"
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr "wait [pid]"
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for Name [in Wortliste ... ] ; do Kommandos; done"
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for (( Ausdr1; Ausdr2; Ausdr3 )); do Kommandos; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select Name [in Wortliste ... ;] do Kommandos; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr "time [-p] Pipeline"
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case Wort in [Muster [| Muster]...) Kommandos ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if Kommandos; then Kommandos; [ elif Kommandos; then Kommandos; ]... [ else "
+"Kommandos; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while Kommandos; do Kommandos; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until Kommandos; do Kommandos; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr "coproc [Name] Kommando [Umleitungen]"
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "function Name { Kommandos ; } oder Name () { Kommandos ; }"
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr "{ Kommandos ; }"
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr "Jobbezeichnung [&]"
+
+#: builtins.c:206
+msgid "(( expression ))"
+msgstr "(( Ausdruck ))"
+
+#: builtins.c:208
+msgid "[[ expression ]]"
+msgstr "[[ Ausdruck ]]"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr "variables - Namen und Bedeutung einiger Shell Variablen"
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [-n] [+N | -N | Verzeichnis]"
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [-n] [+N | -N]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o] [Optionsname ...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr "printf [-v var] Format [Argumente]"
+
+#: builtins.c:229
+#, fuzzy
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+"complete [-abcdefgjksuv] [-pr] [-o Option] [-A Methode] [-G Suchmuster] [-W "
+"Wortliste] [-F Funktion] [-C Kommando] [-X Filtermuster] [-P Prefix] [-S "
+"Suffix] [Name ...]"
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+"compgen [-abcdefgjksuv] [-o Option] [-A Aktion] [-G Suchmuster] [-W "
+"Wortliste] [-F Funktion] [-C Kommando] [-X Filtermuster] [-P Prefix] [-S "
+"Suffix] [Wort]"
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "compopt [-o|+o Option] [Name ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"Definiert Aliase oder zeigt sie an.\n"
+" \n"
+" Ohne Argumente wird die Liste der Aliase (Synonyme) in der Form \n"
+" `alias Name=Wert' auf die Standardausgabe gedruckt.\n"
+"\n"
+" Sonst wird ein Alias für jeden angegebenen Namen definiert, für den ein\n"
+" Wert angegeben wurde. \n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Rückgabewert:\n"
+" Meldet Erfolg, außer wenn NAME nicht existiert."
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Entferne jeden Namen von der Aliasliste.\n"
+" \n"
+" Optionen:\n"
+" -a\tEnferne alle Alias Definitionen.\n"
+" \n"
+" Gibt immer Erfolg zurück, wenn der Name existiert."
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Beendet for, while oder until Schleifen.\n"
+" \n"
+" Break beendet eine FOR, WHILE oder UNTIL Schleife. Wenn N angegeben "
+"ist, werden N geschachtelte\n"
+" Schleifen beendet.\n"
+" \n"
+" Rückgabewert:\n"
+" Der Rückgabewert ist 0, es sei den N ist größer oder gleich 1."
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Springt zum Schleifenanfang von for, while, oder until Schleifen.\n"
+" \n"
+" Continoue springt zum Schleifenanfang der aktuellen FOR, WHILE oder "
+"UNTIL \n"
+" Schleife. Wenn N angegeben ist, werden N wird zum Beginn der N-ten\n"
+" übergeordneten Schleife gesprungen.\n"
+" \n"
+" Rückgabewert:\n"
+" Der Rückgabewert ist 0, außer wenn N größer oder gleich 1 ist."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+"Führt eine eingebeute Shell Funktionen aus.\n"
+" \n"
+" Führt die eingebaute Shell Funktionen mit den angegebenen\n"
+" Argumenten aus, ohne das Kommando nachzuschlagen. Diese Funktion\n"
+" ist dann nützlich, wenn eine eingebaute Shell Funktion\n"
+" überschrieben wurde, diese aber trotzdem ausgeführt werden soll.\n"
+" \n"
+" Rückgabewert: \n"
+" Der Rückgabewert der eingebauten Schellfunkrion oder Falsch, wenn\n"
+" diese nicht existiert."
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+"Wechselt das Arbeitsverzeichnis.\n"
+" \n"
+" Wechselt das aktuelle Abeitsverzeichnis zu DIR. Ohne Angabe eines\n"
+" Verzeichnisses wird in das Heimatverzeichnis gewechselt. \n"
+" \n"
+" Die Variable CDPATH enthält den Suchpfad für das in DIR\n"
+" spezifizierte Verzeichnis. Die Pfadnamen werden durch Doppelpunkte\n"
+" (:) getrennt. Ein leerer Pfadname bezeichnet das aktuelle\n"
+" Verzeichnis. Wenn DIR mit einem Schrägsrtich (/) beginnt, wird der\n"
+" CDPATH nicht durchsucht.\n"
+" \n"
+" Wenn kein entsprechendes Verzeichnis gefunden wurde und die Shell\n"
+" Option `cdable_vars' gesetzt ist, dann wird angenommen, dass DIR\n"
+" einen Variablennamen enthält. Wenn dann noch diese Variable ein\n"
+" Wert besitzt, wird dieser als Inhalt von DIR verwendet.\n"
+" \n"
+" Optionen:\n"
+" -L\tErzwingt das Folgen symbolischer Verweise.\n"
+" -P\tSymbolische Verweise werden ignoriert.\n"
+" \n"
+" Standardmäßig wird symbolischen Verweisen gefolgt.\n"
+" \n"
+" Rückgabewert:\n"
+" Wenn das Verzeichnic gewechselt wurde 0; sonst ungleich Null."
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr " be a literal `]', to match the opening `['.<"
+
+# colon
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Leeranweisung.\n"
+"\n"
+" Leeranweisung; das Kommando hat keine Wirkung.\n"
+"\n"
+" Rückgabewert:\n"
+" Das Kommando ist immer erfolgreich."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+"Setzt Variablen Werte und Eigenschaften\n"
+"\n"
+" Veraltet. Siehe `help declare'."
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+"Definiert lokale Variablen.\n"
+" \n"
+" Erzeugt eine Lokale Variable NAME und weist ihr den Wert VALUE zu. "
+"OPTION\n"
+" kann eine beliebige von `declare' akzeptierte Option sein.\n"
+"\n"
+" Lokale Variablen können nur innerhalb einer Funktion benutzt werden. "
+"Sie\n"
+" sind nur in der sie erzeugenden Funktion und ihren Kindern "
+"sichtbar. \n"
+" \n"
+" Rückgabewert:\n"
+" Liefert \"Erfolg\" außer bei einer ungültigen Option, einem Fehler oder\n"
+" die Shell führt keine Funktion aus."
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+# exit
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"Beendet die aktuelle Shell.\n"
+"\n"
+" Beendt die die aktuelle Shell mit dem Rückgabewert N. Wenn N nicht "
+"angegeben ist,\n"
+" wird der Rückgabewert des letzten ausgeführten Kommandos übernommen."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+
+#: builtins.c:966
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"Wertet einen bedingen Ausdruck aus.\n"
+" \n"
+" Dieses Kommando entspricht dem \"test\" Kommando, aber das letzte "
+"Argument muss ein `]' sein."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+# dirs
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+"Liest Zeilen einer Datei in eine Array Variable.\n"
+"\n"
+" Ist ein Synonym für `mapfile'."
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xrealloc: Kann %lu Bytes nicht reservieren (%lu bytes reserviert)."
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: Kann nicht %lu Bytes reservieren."
+
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: %s:%d: Kann nicht %lu Bytes reservieren (%lu bytes reserviert)."
+
+#~ msgid "Missing `}'"
+#~ msgstr "Fehlende `}'."
+
+#~ msgid "brace_expand> "
+#~ msgstr "Klammererweiterung>"
+
+#~ msgid "Attempt to free unknown command type `%d'.\n"
+#~ msgstr "Versuche den unbekannten Kommandotyp `%d' zu freizugeben.\n"
+
+#~ msgid "Report this to %s\n"
+#~ msgstr "Schicke eine Fehlermeldung an: %s\n"
+
+#~ msgid "Stopping myself..."
+#~ msgstr "Abbruch ..."
+
+#~ msgid "Tell %s to fix this someday.\n"
+#~ msgstr "Schicke eine Fehlermeldung an: %s\n"
+
+# Programmierfehler
+#~ msgid "execute_command: bad command type `%d'"
+#~ msgstr "execute_command: Falscher Kommandotyp `%d'."
+
+#~ msgid "real\t"
+#~ msgstr "Gesamt\t"
+
+#~ msgid "user\t"
+#~ msgstr "Nutzer\t"
+
+#~ msgid "sys\t"
+#~ msgstr "System\t"
+
+#~ msgid ""
+#~ "real\t0m0.00s\n"
+#~ "user\t0m0.00s\n"
+#~ "sys\t0m0.00s\n"
+#~ msgstr ""
+#~ "Gesamt\t0m0.00s\n"
+#~ "Nutzer\t0m0.00s\n"
+#~ "System\t0m0.00s\n"
+
+#~ msgid "cannot duplicate fd %d to fd 1: %s"
+#~ msgstr "Kann fd %d nicht auf fd 1 verdoppeln: %s"
+
+#~ msgid "%s: output redirection restricted"
+#~ msgstr "%s: Das Umlenken der Ausgabe ist verboten."
+
+#~ msgid "Out of memory!"
+#~ msgstr "Arbeitsspeicher erschöpft!"
+
+# Debug Ausgabe
+#~ msgid "You have already added item `%s'\n"
+#~ msgstr "You have already added item `%s'.\n"
+
+# Debug Ausgabe
+#~ msgid "You have entered %d (%d) items. The distribution is:\n"
+#~ msgstr "You have entered %d (%d) items. The distribution is:\n"
+
+#~ msgid "<unknown>"
+#~ msgstr "<unbekannt>"
+
+#~ msgid "%s: bg background job?"
+#~ msgstr "%s: bg Hintergrundprozeß?"
+
+# Programmierfehler
+#~ msgid ""
+#~ "Redirection instruction from yyparse () '%d' is\n"
+#~ "out of range in make_redirection ()."
+#~ msgstr ""
+#~ "Umlenkung von yyparse() `%d' in make_redirection\n"
+#~ "ist außerhalb des zulässigen Bereichs."
+
+# Programmierfehler
+#~ msgid "clean_simple_command () got a command with type %d."
+#~ msgstr "clean_simple_command () erhielt ein Kommando vom Typ %d."
+
+#~ msgid "got errno %d while waiting for %d"
+#~ msgstr "Erhielt Fehlernummer %d beim Warten auf %d."
+
+#~ msgid "syntax error near unexpected token `%c'"
+#~ msgstr "Syntaxfehler beim unerwarteten Zeichen `%c'"
+
+#~ msgid "print_command: bad command type `%d'"
+#~ msgstr "print_command: Falscher Kommandotyp `%d'."
+
+#~ msgid "cprintf: bad `%%' argument (%c)"
+#~ msgstr "cprintf: Falsches `%%' Argument (%c)"
+
+#~ msgid "option `%s' requires an argument"
+#~ msgstr "Option `%s' erfordert ein Argument."
+
+#~ msgid "%s: unrecognized option"
+#~ msgstr "%s: Option nicht erkannt."
+
+#~ msgid "`-c' requires an argument"
+#~ msgstr "`-c' erfordert ein Argument."
+
+#~ msgid "%s: cannot execute directories"
+#~ msgstr "%s: Kann Verzeichnisse nicht ausführen."
+
+# interner Fehler
+#~ msgid "Bad code in sig.c: sigprocmask"
+#~ msgstr "Falscher Code in sig.c: Sigprocmask."
+
+#~ msgid "can't make pipes for process substitution: %s"
+#~ msgstr "Kann keine Pipes für die Prozeßersetzung erzeugen: %s."
+
+#~ msgid "reading"
+#~ msgstr "lese"
+
+#~ msgid "process substitution"
+#~ msgstr "Prozeßersetzung"
+
+#~ msgid "command substitution"
+#~ msgstr "Kommandoersetzung"
+
+# interner Fehler
+#~ msgid "Can't reopen pipe to command substitution (fd %d): %s"
+#~ msgstr "Kann Pipe für Kommandoersetzung nicht wieder öffnen (fd %d): %s."
+
+#~ msgid "$%c: unbound variable"
+#~ msgstr "$%c ist nicht gesetzt."
+
+#~ msgid "%s: bad arithmetic substitution"
+#~ msgstr "%s: Falsche arithmetische Ersetzung."
+
+#~ msgid "-%s: binary operator expected"
+#~ msgstr "-%s: Zweistelliger (binärer) Operator erwartet."
+
+#~ msgid "%s[%s: bad subscript"
+#~ msgstr "%s[%s: Falscher Index."
+
+#~ msgid "[%s: bad subscript"
+#~ msgstr "[%s: Falscher Index."
+
+# Testprogramm für sh_getopts
+#~ msgid "digits occur in two different argv-elements.\n"
+#~ msgstr "Ziffer taucht in zwei verschiedenen Elementen von argv auf.\n"
+
+#~ msgid "option %c\n"
+#~ msgstr "Option %c\n"
+
+#~ msgid "option a\n"
+#~ msgstr "Option a\n"
+
+#~ msgid "option b\n"
+#~ msgstr "Option b\n"
+
+#~ msgid "option c with value `%s'\n"
+#~ msgstr "Option c mit Wert `%s'\n"
+
+# Testprogramm für sh_getopts
+#~ msgid "?? sh_getopt returned character code 0%o ??\n"
+#~ msgstr "?? sh_getopt gab Code 0%o zurück??\n"
+
+# Testprogramm für sh_getopts
+#~ msgid "non-option ARGV-elements: "
+#~ msgstr "Elemente von ARGV, die keine Optionen sind: "
+
+# mkbuilltins Hilfsprogramm
+#~ msgid "%s: Unknown flag %s.\n"
+#~ msgstr "%s: Unbekannter Schalter %s.\n"
+
+# mkbuiltins Hilfsprogramm
+#~ msgid "Unknown directive `%s'"
+#~ msgstr "Unbekannte Anweisung `%s'."
+
+#~ msgid "%s requires an argument"
+#~ msgstr "%s erfordert ein Argument."
+
+#~ msgid "%s must be inside of a $BUILTIN block"
+#~ msgstr "%s muß innerhalb eines $BUILTIN Blocks stehen."
+
+#~ msgid "%s found before $END"
+#~ msgstr "%s vor $END gefunden."
+
+#~ msgid "%s already has a function (%s)"
+#~ msgstr "%s hat schon eine Funktion (%s)."
+
+# docname --> Bezeichnung ??
+#~ msgid "%s already had a docname (%s)"
+#~ msgstr "%s hat schon eine Bezeichnung (%s)."
+
+#~ msgid "%s already has short documentation (%s)"
+#~ msgstr "%s hat schon eine Kurzbeschreibung (%s)."
+
+#~ msgid "%s already has a %s definition"
+#~ msgstr "%s ist schon %s definiert."
+
+# mkbuildins Hilfsprogramm
+#~ msgid "mkbuiltins: Out of virtual memory!\n"
+#~ msgstr "mkbuiltins: Virtueller Speicher erschöpft!\n"
+
+#~ msgid "read [-r] [-p prompt] [-a array] [-e] [name ...]"
+#~ msgstr ""
+#~ "read [-r] [-p Eingabeaufforderung] [-a Feldvariable] [-e] [Name ...]"
+
+#~ msgid "%[DIGITS | WORD] [&]"
+#~ msgstr "%[Ziffern | Wort] [&]"
+
+#~ msgid "variables - Some variable names and meanings"
+#~ msgstr "Variablen - Einige Variablennamen und ihre Bedeutung"
+
+# alias
+#~ msgid "`alias' with no arguments or with the -p option prints the list"
+#~ msgstr "`alias' ohne Argumente oder mit der Option -p gibt die Liste der"
+
+#~ msgid "of aliases in the form alias NAME=VALUE on standard output."
+#~ msgstr "Synonyme in der Form NAME=WERT auf die Standardausgabe aus."
+
+#~ msgid "Otherwise, an alias is defined for each NAME whose VALUE is given."
+#~ msgstr ""
+#~ "Sonst wird ein Synonym für jeden NAMEN definiert, dessen WERT angegeben "
+#~ "wird."
+
+#~ msgid "A trailing space in VALUE causes the next word to be checked for"
+#~ msgstr ""
+#~ "Ein Leerzeichen nach WERT bewirkt, daß das nächste WORT auf ein Synonym"
+
+#~ msgid "alias substitution when the alias is expanded. Alias returns"
+#~ msgstr ""
+#~ "untersucht wird wenn SYNONYM ausgewertet wird. `Alias' gibt wahr zurück,"
+
+#~ msgid "true unless a NAME is given for which no alias has been defined."
+#~ msgstr ""
+#~ "außer wenn ein NAME angegeben wurde, für den kein SYNONYM vorhanden ist."
+
+# unalias
+#~ msgid ""
+#~ "Remove NAMEs from the list of defined aliases. If the -a option is given,"
+#~ msgstr "Entfernt NAMEn aus der Liste der Synonyme. Wenn die Option -a"
+
+#~ msgid "then remove all alias definitions."
+#~ msgstr "angegeben ist, werden alle Synonyme gelöscht."
+
+# readline
+#~ msgid "Bind a key sequence to a Readline function, or to a macro. The"
+#~ msgstr ""
+#~ "Verbindet eine Tastenfolge mit einer Readline-Funktion oder einem Makro. "
+#~ "Die"
+
+#~ msgid "syntax is equivalent to that found in ~/.inputrc, but must be"
+#~ msgstr ""
+#~ "Syntax entspricht der der Datei `~/.inputrc', sie muß jedoch als Argument"
+
+#~ msgid ""
+#~ "passed as a single argument: bind '\"\\C-x\\C-r\": re-read-init-file'."
+#~ msgstr "angegeben werden. Z.B.: bind '\"\\C-x\\C-r\": re-read-init-file'."
+
+#~ msgid "Arguments we accept:"
+#~ msgstr "Gültige Argumente:"
+
+#~ msgid ""
+#~ " -m keymap Use `keymap' as the keymap for the duration of this"
+#~ msgstr ""
+#~ " -m Tastaturtabelle wählt die Tastaturtabelle für die Dauer dieses "
+#~ "Kommandos."
+
+#~ msgid " command. Acceptable keymap names are emacs,"
+#~ msgstr ""
+#~ " Mögliche Namen für Tastaturtabellen sind: emacs"
+
+#~ msgid ""
+#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,"
+#~ msgstr ""
+#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,"
+
+#~ msgid " vi-command, and vi-insert."
+#~ msgstr " vi-command, und vi-insert."
+
+#~ msgid " -l List names of functions."
+#~ msgstr " -l Listet die Namen der Funktionen."
+
+#~ msgid " -P List function names and bindings."
+#~ msgstr ""
+#~ " -P Listet die Namen der Funktion und deren "
+#~ "Tastenzuordnung."
+
+#~ msgid ""
+#~ " -p List functions and bindings in a form that can be"
+#~ msgstr ""
+#~ " -p Listet die Funktionsnamen und deren Tastenzuordnung "
+#~ "so,"
+
+#~ msgid " reused as input."
+#~ msgstr ""
+#~ " daß sie als Eingabe wiederverwendet werden können."
+
+#~ msgid " -r keyseq Remove the binding for KEYSEQ."
+#~ msgstr " -r Tastenfolge Entfernt die Zuordnung für Tastenfolge."
+
+#~ msgid " -f filename Read key bindings from FILENAME."
+#~ msgstr " -f Dateiname Liest die Tastenzuordnungen von Dateiname."
+
+#~ msgid ""
+#~ " -q function-name Query about which keys invoke the named function."
+#~ msgstr ""
+#~ " -q Funktionsname Gibt die Tastenzuordnung für den Funktionsnamen aus."
+
+#~ msgid " -V List variable names and values"
+#~ msgstr " -V Gibt Variablennamen und deren Werte aus."
+
+#~ msgid ""
+#~ " -v List variable names and values in a form that can"
+#~ msgstr ""
+#~ " -v Gibt Variablennamen und deren Werte in einer Form "
+#~ "aus,"
+
+#~ msgid " be reused as input."
+#~ msgstr " die als Eingabe wiederverwendet werden kann."
+
+#~ msgid ""
+#~ " -S List key sequences that invoke macros and their "
+#~ "values"
+#~ msgstr " -S Gibt Tastenfolgen aus, die Makros aufrufen."
+
+#~ msgid ""
+#~ " -s List key sequences that invoke macros and their "
+#~ "values in"
+#~ msgstr " -s Gibt Tastenfolgen aus, die Makros aufrufen."
+
+#~ msgid " a form that can be reused as input."
+#~ msgstr ""
+#~ " Die Ausgabe kann als Eingabe wiederverwendet werden."
+
+# break
+#~ msgid "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,"
+#~ msgstr ""
+#~ "Bricht eine for, while oder until Schleife ab. Wenn N angegeben ist, dann"
+
+#~ msgid "break N levels."
+#~ msgstr "werden N Schleifenebenen verlassen."
+
+# continue
+#~ msgid "Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop."
+#~ msgstr ""
+#~ "Springt zur nächsten Iteration der for, while oder until Schleife. Wenn N"
+
+#~ msgid "If N is specified, resume at the N-th enclosing loop."
+#~ msgstr ""
+#~ "angegeben ist, wird mit der N-ten übergeordneten Schleife fortgefahren."
+
+# builtin
+#~ msgid "Run a shell builtin. This is useful when you wish to rename a"
+#~ msgstr ""
+#~ "Führt eine Shellfunktion aus. Das ist nützlich, wenn eine Shellfunktion"
+
+#~ msgid "shell builtin to be a function, but need the functionality of the"
+#~ msgstr "umbenannt wurde, aber das ursprüngliche Verhalten benötigt wird."
+
+#~ msgid "builtin within the function itself."
+#~ msgstr " "
+
+# cd
+#~ msgid "Change the current directory to DIR. The variable $HOME is the"
+#~ msgstr ""
+#~ "Setzt das Arbeitsverzeichnis auf Verz. Wenn Verz. nicht angegeben ist, "
+#~ "dann"
+
+#~ msgid "default DIR. The variable $CDPATH defines the search path for"
+#~ msgstr ""
+#~ "wird in das $HOME-Verzeichnis gewechselt. In der Variable $CDPATH kann "
+#~ "eine"
+
+#~ msgid "the directory containing DIR. Alternative directory names in CDPATH"
+#~ msgstr ""
+#~ "durch Doppelpunkt (:) getrennte Liste angegeben werden, in denen Verz. "
+#~ "gesucht"
+
+#~ msgid "are separated by a colon (:). A null directory name is the same as"
+#~ msgstr "wird. Beginnt Verz. mit einem `/', wird $CDPATH nicht benutzt."
+
+#~ msgid "the current directory, i.e. `.'. If DIR begins with a slash (/),"
+#~ msgstr ""
+#~ "Wenn das Verzeichnis nicht gefunden wird und die Shelloption `cdable_vars'"
+
+#~ msgid "then $CDPATH is not used. If the directory is not found, and the"
+#~ msgstr ""
+#~ "gesetzt ist, dann wird Verz. als ein Variablenname interpretiert. Ergibt"
+
+#~ msgid "shell option `cdable_vars' is set, then try the word as a variable"
+#~ msgstr "dies einen Wert für die Variable, dann wird das aktuelle"
+
+#~ msgid "name. If that variable has a value, then cd to the value of that"
+#~ msgstr ""
+#~ "Verzeichnis auf diesen Wert gesetzt. Option -P veranlaßt cd symbolische"
+
+#~ msgid ""
+#~ "variable. The -P option says to use the physical directory structure"
+#~ msgstr "Verweise zu ignorieren; -L erzwingt das Benutzen symbolischer"
+
+#~ msgid ""
+#~ "instead of following symbolic links; the -L option forces symbolic links"
+#~ msgstr "Verweise."
+
+#~ msgid "to be followed."
+#~ msgstr " "
+
+# pwd
+#~ msgid "Print the current working directory. With the -P option, pwd prints"
+#~ msgstr ""
+#~ "Gibt das Arbeitsverzeichnis aus. Die Angabe von -P ignoriert symbolische"
+
+#~ msgid "the physical directory, without any symbolic links; the -L option"
+#~ msgstr "Verweise. Mit -L wird das Verwenden von symbolischen Verweisen"
+
+#~ msgid "makes pwd follow symbolic links."
+#~ msgstr "erzwungen."
+
+# command
+#~ msgid ""
+#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell"
+#~ msgstr ""
+#~ "Führt das Kommando mit den Argumenten aus, ohne die Shellfunktionen zu"
+
+#~ msgid "function called `ls', and you wish to call the command `ls', you can"
+#~ msgstr "berücksichtigen. Wenn eine Shellfunktion `ls' definiert ist, führt"
+
+#~ msgid ""
+#~ "say \"command ls\". If the -p option is given, a default value is used"
+#~ msgstr "\"command ls\" das Kommando `ls' aus. Mit der Option -p wird ein"
+
+#~ msgid ""
+#~ "for PATH that is guaranteed to find all of the standard utilities. If"
+#~ msgstr "Standardwert für PATH verwendet. -v gibt eine kurze Beschreibung"
+
+#~ msgid ""
+#~ "the -V or -v option is given, a string is printed describing COMMAND."
+#~ msgstr "des Kommandos aus; -V eine ausführliche."
+
+#~ msgid "The -V option produces a more verbose description."
+#~ msgstr " "
+
+# declare
+#~ msgid "Declare variables and/or give them attributes. If no NAMEs are"
+#~ msgstr ""
+#~ "Deklariert Variablen oder weist ihnen Werte zu. Wenn kein Name angegeben"
+
+#~ msgid "given, then display the values of variables instead. The -p option"
+#~ msgstr ""
+#~ "ist, dann wird der Wert der Variablen ausgegeben. Option -p gibt die"
+
+#~ msgid "will display the attributes and values of each NAME."
+#~ msgstr "Merkmale und Werte der Namen aus."
+
+#~ msgid "The flags are:"
+#~ msgstr "Die Schalter sind:"
+
+#~ msgid " -a\tto make NAMEs arrays (if supported)"
+#~ msgstr " -a\tDeklariert Name als Feldvariable (wenn unterstützt)."
+
+#~ msgid " -f\tto select from among function names only"
+#~ msgstr " -f\tZeigt nur Funktionsnamen."
+
+#~ msgid " -F\tto display function names without definitions"
+#~ msgstr " -F\tZeigt Funktionsnamen ohne Definition an."
+
+#~ msgid " -r\tto make NAMEs readonly"
+#~ msgstr " -r\tSetzt Name auf `nur Lesen'-Status."
+
+#~ msgid " -x\tto make NAMEs export"
+#~ msgstr " -x\tMarkiert Name für automatischen Export in alle Subshells."
+
+#~ msgid " -i\tto make NAMEs have the `integer' attribute set"
+#~ msgstr " -i\tSetzt den Typ von Name auf Ganzzahl."
+
+#~ msgid "Variables with the integer attribute have arithmetic evaluation (see"
+#~ msgstr ""
+#~ "Wenn der Variablen ein Wert zugewiesen wird (siehe `let'), findet eine"
+
+#~ msgid "`let') done when the variable is assigned to."
+#~ msgstr "arithmetische Auswertung statt."
+
+#~ msgid "When displaying values of variables, -f displays a function's name"
+#~ msgstr ""
+#~ "Wenn Variablenwerte angezeigt werden, gibt die Option -f Funktionsnamen"
+
+#~ msgid "and definition. The -F option restricts the display to function"
+#~ msgstr "und -definitionen aus. Die Option -F beschränkt die Ausgabe auf"
+
+#~ msgid "name only."
+#~ msgstr "Funktionsnamen."
+
+#~ msgid ""
+#~ "Using `+' instead of `-' turns off the given attribute instead. When"
+#~ msgstr "`+' statt `-' schaltet das angegebene Merkmal ab. `declare'"
+
+#~ msgid "used in a function, makes NAMEs local, as with the `local' command."
+#~ msgstr "innerhalb einer Funktion wirkt wie `local'."
+
+# typset
+#~ msgid "Obsolete. See `declare'."
+#~ msgstr "Veraltet. Siehe `declare'."
+
+# local
+#~ msgid "Create a local variable called NAME, and give it VALUE. LOCAL"
+#~ msgstr ""
+#~ "Erzeugt eine lokale Variable Name und weist ihr Wert zu. Die Anweisung "
+#~ "kann"
+
+#~ msgid "have a visible scope restricted to that function and its children."
+#~ msgstr "nur innerhalb dieser Funktion und allen Unterfunktionen zugänglich."
+
+# echo
+#~ msgid "Output the ARGs. If -n is specified, the trailing newline is"
+#~ msgstr ""
+#~ "Gibt die Argumente aus. Wenn -n angegeben ist, wird kein Zeilenumbruch"
+
+#~ msgid "suppressed. If the -e option is given, interpretation of the"
+#~ msgstr ""
+#~ "angefügt. Die Option -e interpretiert folgende Sonderzeichen zur "
+#~ "Formatierung"
+
+#~ msgid "following backslash-escaped characters is turned on:"
+#~ msgstr "der Ausgabe:"
+
+#~ msgid "\t\\a\talert (bell)"
+#~ msgstr "\t\\a\tAlarm (Glocke)."
+
+#~ msgid "\t\\b\tbackspace"
+#~ msgstr "\t\\b\tSchritt zurück."
+
+#~ msgid "\t\\c\tsuppress trailing newline"
+#~ msgstr "\t\\c\tKein Zeilenumbruch."
+
+#~ msgid "\t\\E\tescape character"
+#~ msgstr "\t\\E\tEscape-Zeichen."
+
+#~ msgid "\t\\f\tform feed"
+#~ msgstr "\t\\f\tSeitenvorschub."
+
+#~ msgid "\t\\n\tnew line"
+#~ msgstr "\t\\n\tZeilenumbruch."
+
+#~ msgid "\t\\r\tcarriage return"
+#~ msgstr "\t\\r\tWagenrücklauf."
+
+#~ msgid "\t\\t\thorizontal tab"
+#~ msgstr "\t\\t\tHorizontaler Tabulator."
+
+#~ msgid "\t\\v\tvertical tab"
+#~ msgstr "\t\\v\tVertikaler Tabulator."
+
+#~ msgid "\t\\\\\tbackslash"
+#~ msgstr "\t\\\\\tDas Zeichen `\\'."
+
+#~ msgid "\t\\num\tthe character whose ASCII code is NUM (octal)."
+#~ msgstr "\t\\num\tDas Zeichen mit dem (oktalen) ASCII-Code num."
+
+#~ msgid ""
+#~ "You can explicitly turn off the interpretation of the above characters"
+#~ msgstr ""
+#~ "Die Option -E schaltet die Auswertung der oben angegebenen Sonderzeichen"
+
+#~ msgid "with the -E option."
+#~ msgstr "ab."
+
+#~ msgid ""
+#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed."
+#~ msgstr ""
+#~ "Gibt ARGUMENTE aus. Die Option -n verhindert den abschließenden "
+#~ "Zeilenumbruch."
+
+# enable
+#~ msgid "Enable and disable builtin shell commands. This allows"
+#~ msgstr "Schaltet Shellfunktionen ab und an. Damit kann ein gleichnamiges"
+
+#~ msgid "you to use a disk command which has the same name as a shell"
+#~ msgstr "externes Kommando anstatt des Shellkommandos benutzt werden."
+
+#~ msgid "builtin. If -n is used, the NAMEs become disabled; otherwise"
+#~ msgstr "-n schaltet Namen ab, sonst werden NAMEn angeschaltet."
+
+#~ msgid "NAMEs are enabled. For example, to use the `test' found on your"
+#~ msgstr "Um z.B. die externe Funktion `test' zu verwenden,"
+
+#~ msgid "path instead of the shell builtin version, type `enable -n test'."
+#~ msgstr ""
+#~ "muß `enable -n test' eingegeben werden. Auf Systemen, die Bibiliotheken"
+
+#~ msgid "On systems supporting dynamic loading, the -f option may be used"
+#~ msgstr ""
+#~ "dynamisch nachladen können, kann die Option -f genutzt werden, um neue"
+
+#~ msgid "to load new builtins from the shared object FILENAME. The -d"
+#~ msgstr ""
+#~ "Shellfunktionen aus der dynamischen Bibiliothek Dateiname zu laden. -d"
+
+#~ msgid "option will delete a builtin previously loaded with -f. If no"
+#~ msgstr "entlädt dynamisch geladene Shellfunktionen wieder. Wenn"
+
+#~ msgid "non-option names are given, or the -p option is supplied, a list"
+#~ msgstr "keine Option oder -p angegeben ist, wird eine Liste der"
+
+#~ msgid "of builtins is printed. The -a option means to print every builtin"
+#~ msgstr "Shellfunktionen ausgegeben. -a gibt eine Liste der Shellfunktionen"
+
+#~ msgid "with an indication of whether or not it is enabled. The -s option"
+#~ msgstr ""
+#~ "aus, in der ein- und ausgeschaltete Funktionen gekennzeichnet sind; -s"
+
+#~ msgid "restricts the output to the Posix.2 `special' builtins. The -n"
+#~ msgstr "beschränkt die Ausgabe auf Posix.2-Shellfunktionen. -n"
+
+#~ msgid "option displays a list of all disabled builtins."
+#~ msgstr "zeigt eine Liste aller abgeschalteter Funktionen an."
+
+# eval
+#~ msgid ""
+#~ "Read ARGs as input to the shell and execute the resulting command(s)."
+#~ msgstr "Verbindet die Argumente zu einer Kommandozeile und führt sie aus."
+
+# getopts
+#~ msgid "Getopts is used by shell procedures to parse positional parameters."
+#~ msgstr "Shellprozeduren benutzen getopts, um die Kommandozeole auszuwerten."
+
+#~ msgid "OPTSTRING contains the option letters to be recognized; if a letter"
+#~ msgstr ""
+#~ "Optstring enthält die zu erkennenden Buchstaben. Folgt einem Buchstaben "
+#~ "ein"
+
+#~ msgid "is followed by a colon, the option is expected to have an argument,"
+#~ msgstr "Doppelpunkt, dann erwartet die Funktion ein Argument, das durch ein"
+
+#~ msgid "which should be separated from it by white space."
+#~ msgstr "Leerzeichen vom Optionszeichen getrennt ist."
+
+#~ msgid "Each time it is invoked, getopts will place the next option in the"
+#~ msgstr ""
+#~ "Bei jedem Aufruf weist getopt die nächste Option der Shell-Variablen "
+#~ "$name zu,"
+
+#~ msgid "shell variable $name, initializing name if it does not exist, and"
+#~ msgstr "erzeugt sie gegebenenfalls und setzt den Zeiger in der"
+
+#~ msgid "the index of the next argument to be processed into the shell"
+#~ msgstr "Shellvariablen OPTIND auf die nächste abzuarbeitende Option."
+
+#~ msgid "variable OPTIND. OPTIND is initialized to 1 each time the shell or"
+#~ msgstr "OPTIND wird beim Start der Shell mit 1 initialisiert."
+
+#~ msgid "a shell script is invoked. When an option requires an argument,"
+#~ msgstr "Erwartet eine Option ein Argument, wird dieses Argument in der"
+
+#~ msgid "getopts places that argument into the shell variable OPTARG."
+#~ msgstr "Shellvariablen OPTARG zurückgegeben."
+
+#~ msgid "getopts reports errors in one of two ways. If the first character"
+#~ msgstr ""
+#~ "Es gibt zwei Möglichkeiten der Fehlerbehandlung. Wenn das erste Zeichen "
+#~ "von"
+
+#~ msgid "of OPTSTRING is a colon, getopts uses silent error reporting. In"
+#~ msgstr ""
+#~ "OPTSTRING ein Doppelpunkt ist, wird keine Fehlermeldung angezeigt "
+#~ "(\"stille"
+
+#~ msgid "this mode, no error messages are printed. If an illegal option is"
+#~ msgstr ""
+#~ "Fehlermeldung\") Wenn ein ungültiges Optionszeichen erkannt wird, dann "
+#~ "wird"
+
+#~ msgid "seen, getopts places the option character found into OPTARG. If a"
+#~ msgstr ""
+#~ "es der Shellvariablen OPTARG zugewiesen. Wenn ein Argument fehlt, dann"
+
+#~ msgid "required argument is not found, getopts places a ':' into NAME and"
+#~ msgstr "wird der Shellvariablen NAME ein ':' zugewiesen und an OPTARG das "
+
+#~ msgid "sets OPTARG to the option character found. If getopts is not in"
+#~ msgstr ""
+#~ "Optionszeichen übergeben. Wenn getopt sich nicht im \"stillen\" Modus"
+
+#~ msgid "silent mode, and an illegal option is seen, getopts places '?' into"
+#~ msgstr ""
+#~ "befindet und ein ungültiges Optionszeichen erkannt wird, weist getopt der"
+
+#~ msgid "NAME and unsets OPTARG. If a required option is not found, a '?'"
+#~ msgstr ""
+#~ "Variable Name '?' zu und löscht OPTARG. Wenn eine erforderliche Option "
+#~ "nicht"
+
+#~ msgid "is placed in NAME, OPTARG is unset, and a diagnostic message is"
+#~ msgstr ""
+#~ "gefunden wurde, wird `?` an NAME zugewiesen, OPTARG gelöscht und eine "
+#~ "Fehler-"
+
+#~ msgid "printed."
+#~ msgstr "meldung ausgegeben."
+
+#~ msgid "If the shell variable OPTERR has the value 0, getopts disables the"
+#~ msgstr ""
+#~ "Wenn die Shellvariable OPTERR den Wert 0 besitzt, unterdrückt getopts die "
+#~ "Aus-"
+
+#~ msgid "printing of error messages, even if the first character of"
+#~ msgstr ""
+#~ "gabe von Fehlermeldungen, auch dann, wenn das erste Zeichen von OPTSTRING "
+#~ "kein"
+
+#~ msgid "OPTSTRING is not a colon. OPTERR has the value 1 by default."
+#~ msgstr "Doppelpunkt ist. OPTERR hat standardmäßig den Wert 1."
+
+#~ msgid "Getopts normally parses the positional parameters ($0 - $9), but if"
+#~ msgstr ""
+#~ "Getopts wertet normalerweise die übergebenen Parameter $0 - $9 aus, aber "
+#~ "wenn"
+
+#~ msgid "more arguments are given, they are parsed instead."
+#~ msgstr "mehr Argumente angegeben sind, werden diese auch ausgewertet."
+
+# exec
+#~ msgid "Exec FILE, replacing this shell with the specified program."
+#~ msgstr "Fürt Datei aus und ersetzt die Shell durch das angegebene Programm."
+
+#~ msgid "If FILE is not specified, the redirections take effect in this"
+#~ msgstr ""
+#~ "Wenn kein Kommando angegeben ist, werden die Ein-/Ausgabeumleitungen auf "
+#~ "die"
+
+#~ msgid "shell. If the first argument is `-l', then place a dash in the"
+#~ msgstr ""
+#~ "aufrufende Shell angewendet. Wenn das erste Argument -l ist, dann wird "
+#~ "dieses"
+
+#~ msgid "zeroth arg passed to FILE, as login does. If the `-c' option"
+#~ msgstr ""
+#~ "als nulltes Argument an die Datei übergeben (wie login). Mit der -c "
+#~ "Option"
+
+#~ msgid "is supplied, FILE is executed with a null environment. The `-a'"
+#~ msgstr ""
+#~ "wird die Datei ohne gesetzte Umgebungsvariablen ausgeführt. Die -a Option"
+
+#~ msgid "option means to make set argv[0] of the executed process to NAME."
+#~ msgstr "setzt argv[0] des ausgeführten Prozeßes auf Name."
+
+#~ msgid "If the file cannot be executed and the shell is not interactive,"
+#~ msgstr ""
+#~ "Wenn die Datei nicht ausgeführt werden kann und die Shell nicht "
+#~ "interaktiv ist,"
+
+#~ msgid "then the shell exits, unless the variable \"no_exit_on_failed_exec\""
+#~ msgstr ""
+#~ "dann wird sie verlassen, außer die Variable \"no_exit_on_failed_exec\" ist"
+
+#~ msgid "is set."
+#~ msgstr "gesetzt."
+
+#~ msgid "is that of the last command executed."
+#~ msgstr "der Rückkehrstatus des zuletzt ausgeführten Kommandos verwendet."
+
+# fc
+#~ msgid ""
+#~ "FIRST and LAST can be numbers specifying the range, or FIRST can be a"
+#~ msgstr ""
+#~ "Anfang und Ende bezeichnen einen Bereich oder, wenn Anfang eine "
+#~ "Zeichenkette"
+
+#~ msgid "string, which means the most recent command beginning with that"
+#~ msgstr "ist, das letzte Kommando welches mit dieser Zeichkette beginnt."
+
+#~ msgid "string."
+#~ msgstr " "
+
+#~ msgid ""
+#~ " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR,"
+#~ msgstr ""
+#~ " -e Editor ist der aufzurufende Texteditor. Standardmäßig wird FCEDIT, "
+#~ "dann"
+
+#~ msgid ""
+#~ " then the editor which corresponds to the current readline editing"
+#~ msgstr ""
+#~ " EDITOR, anschließend der dem readline Modus entsprechende Editor"
+
+#~ msgid " mode, then vi."
+#~ msgstr " und sonst vi aufgerufen."
+
+#~ msgid " -l means list lines instead of editing."
+#~ msgstr " -l zeigt nur die Zeilen an."
+
+#~ msgid " -n means no line numbers listed."
+#~ msgstr " -n unterdrückt das Anzeigen von Zeilennummern."
+
+#~ msgid ""
+#~ " -r means reverse the order of the lines (making it newest listed "
+#~ "first)."
+#~ msgstr ""
+#~ " -r dreht die Sortierreihenfolge um (jüngster Eintrag wird zuerst "
+#~ "angezeigt)."
+
+#~ msgid "With the `fc -s [pat=rep ...] [command]' format, the command is"
+#~ msgstr ""
+#~ "Mit `fc -s [Muster=Ersetzung ...] [command]' wird das Kommando wiederholt,"
+
+#~ msgid "re-executed after the substitution OLD=NEW is performed."
+#~ msgstr "nachdem die Substitution Alt=Neu durchgeführt wurde."
+
+#~ msgid "A useful alias to use with this is r='fc -s', so that typing `r cc'"
+#~ msgstr ""
+#~ "Eine nützliche Aliasersetzung kann r='fc -s' sein, mit der z.B. durch `r "
+#~ "cc`"
+
+#~ msgid "runs the last command beginning with `cc' and typing `r' re-executes"
+#~ msgstr ""
+#~ "das letzte Kommando welches mit `cc' beginnt aufgerufen wird und die "
+#~ "Eingabe"
+
+# fg
+#~ msgid "Place JOB_SPEC in the foreground, and make it the current job. If"
+#~ msgstr "Bringt den mit `^Z' angehaltenen Job in den Vordergrund. Wenn eine"
+
+#~ msgid "JOB_SPEC is not present, the shell's notion of the current job is"
+#~ msgstr ""
+#~ "Jobbezeichnung angegeben ist, dann wird der zuletzt angehaltene Job im"
+
+#~ msgid "used."
+#~ msgstr "Vordergrund gestartet."
+
+# bg
+#~ msgid "Place JOB_SPEC in the background, as if it had been started with"
+#~ msgstr ""
+#~ "Startet einen mit `^Z' angehaltenen Job im Hintergrund, als ob er mit `&'"
+
+#~ msgid "`&'. If JOB_SPEC is not present, the shell's notion of the current"
+#~ msgstr ""
+#~ "gestartet worden wäre. Ist keine Jobbezeichnung angegeben, wird der "
+#~ "zuletzt"
+
+#~ msgid "job is used."
+#~ msgstr "angehaltene Job im Hintergrund gestartet."
+
+# hash
+#~ msgid "For each NAME, the full pathname of the command is determined and"
+#~ msgstr ""
+#~ "Für jeden angegebenen Namen wird der vollständige Pfadname des Kommandos"
+
+#~ msgid "remembered. If the -p option is supplied, PATHNAME is used as the"
+#~ msgstr ""
+#~ "ermittelt und gemerkt. Wenn die -p Option angegeben wird, dann wird der"
+
+#~ msgid "full pathname of NAME, and no path search is performed. The -r"
+#~ msgstr ""
+#~ "Pfadname verwendet und keine Suche durchgeführt. Die -r Option löscht die"
+
+#~ msgid "option causes the shell to forget all remembered locations. If no"
+#~ msgstr ""
+#~ "gespeicherten Pfade. Wenn keine Option angegeben ist, dann werden alle"
+
+#~ msgid ""
+#~ "arguments are given, information about remembered commands is displayed."
+#~ msgstr "gespeicherten Kommandos angezeigt."
+
+# help
+#~ msgid "Display helpful information about builtin commands. If PATTERN is"
+#~ msgstr ""
+#~ "Gibt Hilfetexte für die eingebauten Kommandos aus. Wenn ein Muster "
+#~ "angegeben"
+
+#~ msgid "specified, gives detailed help on all commands matching PATTERN,"
+#~ msgstr ""
+#~ "ist, dann wird eine detailierte Beschreibung der Kommandos angezeigt, die "
+#~ "dem"
+
+#~ msgid "otherwise a list of the builtins is printed."
+#~ msgstr ""
+#~ "Muster entsprechen. Sonst werden die eingebauten Kommandos gelistet."
+
+# history
+#~ msgid "Display the history list with line numbers. Lines listed with"
+#~ msgstr ""
+#~ "Zeigt den Kommandozeilenspeicher mit Zeilennummern an. Mit `*' markierte"
+
+#~ msgid "with a `*' have been modified. Argument of N says to list only"
+#~ msgstr ""
+#~ "Zeilen wurden verändert. Mit einer Zahl als Argument wird nur die "
+#~ "angegebene"
+
+#~ msgid "the last N lines. The -c option causes the history list to be"
+#~ msgstr ""
+#~ "Anzahl Zeilen ausgegeben. Mit der `-c' Option kann der "
+#~ "Kommandozeilenspeicher"
+
+#~ msgid ""
+#~ "cleared by deleting all of the entries. The `-w' option writes out the"
+#~ msgstr ""
+#~ "gelöscht werden. Ist die `-w' Option angegeben, wird der Kommandozeilen-"
+
+#~ msgid ""
+#~ "current history to the history file; `-r' means to read the file and"
+#~ msgstr ""
+#~ "speicher in die history Datei geschrieben. `-r' liest diese Datei und fügt"
+
+#~ msgid "append the contents to the history list instead. `-a' means"
+#~ msgstr ""
+#~ "ihren Inhalt an den Kommandozeilenspeicher an. Durch die Option `-a' "
+#~ "kann der"
+
+#~ msgid "to append history lines from this session to the history file."
+#~ msgstr ""
+#~ "Kommandozeilenspeicher der Sitzung an die history Datei angefügt werden."
+
+#~ msgid "Argument `-n' means to read all history lines not already read"
+#~ msgstr ""
+#~ "Das Argument `-n' bewirkt, daß alle Zeilen die noch nicht aus der history "
+#~ "Datei"
+
+#~ msgid "from the history file and append them to the history list. If"
+#~ msgstr ""
+#~ "gelesen wurden an den Kommandozeilenspeicher angefügt werden. Wenn ein "
+#~ "Datei-"
+
+#~ msgid "FILENAME is given, then that is used as the history file else"
+#~ msgstr ""
+#~ "name angegeben ist, dann wird dieser als Name der history Datei "
+#~ "verwendet. Sonst"
+
+#~ msgid "if $HISTFILE has a value, that is used, else ~/.bash_history."
+#~ msgstr ""
+#~ "wird der Inhalt der Variablen $HISTFILE und anschließend ~/.bash_history "
+#~ "verwendet."
+
+#~ msgid "If the -s option is supplied, the non-option ARGs are appended to"
+#~ msgstr ""
+#~ "Durch die -s Option wird bewirkt, daß die Nicht-Options-Argumente als "
+#~ "eigene"
+
+#~ msgid "the history list as a single entry. The -p option means to perform"
+#~ msgstr ""
+#~ "Zeile an den Kommandospeicher angefügt werden. Mit -p wird für jedes "
+#~ "Argument"
+
+#~ msgid ""
+#~ "history expansion on each ARG and display the result, without storing"
+#~ msgstr ""
+#~ "die Kommandosubstitution durchgeführt und das Ergebnis angezeigt, ohne "
+#~ "jedoch"
+
+#~ msgid "anything in the history list."
+#~ msgstr "etwas im Kommandozeilenspeicher abzulegen."
+
+# jobs
+#~ msgid "Lists the active jobs. The -l option lists process id's in addition"
+#~ msgstr ""
+#~ "Gibt eine Liste der aktiven Jobs aus. Mit der -l Option werden "
+#~ "zusätzlich die"
+
+#~ msgid "to the normal information; the -p option lists process id's only."
+#~ msgstr ""
+#~ "Prozeßnummern und mit der -p Option nur die Prozeßnummern ausgsgegeben."
+
+#~ msgid ""
+#~ "If -n is given, only processes that have changed status since the last"
+#~ msgstr ""
+#~ "Die Option -n bewirkt, daß nur Jobs angezeigt werden, die ihren Status "
+#~ "seid dem"
+
+#~ msgid ""
+#~ "notification are printed. JOBSPEC restricts output to that job. The"
+#~ msgstr ""
+#~ "letzten Aufruf geändert haben. Jobbez. beschränkt die Anzeige auf diesen "
+#~ "Job."
+
+#~ msgid "-r and -s options restrict output to running and stopped jobs only,"
+#~ msgstr ""
+#~ "-r zeigt nur laufende und -s nur gestoppte Jobs an. Wenn keine Optionen"
+
+#~ msgid "respectively. Without options, the status of all active jobs is"
+#~ msgstr "angegeben sind, dann wird der Status aller aktiven Jobs angezeigt."
+
+#~ msgid ""
+#~ "printed. If -x is given, COMMAND is run after all job specifications"
+#~ msgstr ""
+#~ "Wenn -x in der Kommandozeile angegeben ist, wird das Kommando ausgeführt "
+#~ "und"
+
+#~ msgid ""
+#~ "that appear in ARGS have been replaced with the process ID of that job's"
+#~ msgstr "vorher alle vorkommenden Jobspezifikationen durch ihre Prozeßnummer"
+
+#~ msgid "process group leader."
+#~ msgstr "ersetzt."
+
+# disown
+#~ msgid "Removes each JOBSPEC argument from the table of active jobs."
+#~ msgstr "Entfernt die angegebenen Jobs von der Liste der aktiven Jobs."
+
+# kill
+#~ msgid "Send the processes named by PID (or JOB) the signal SIGSPEC. If"
+#~ msgstr ""
+#~ "Sendet den durch pid (oder job) angegebenen Prozessen das Signal "
+#~ "SIGSPEC. Wenn"
+
+#~ msgid ""
+#~ "SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'"
+#~ msgstr ""
+#~ "kein Signal angegeben ist wird SIGTERM gesendet. Mit der Option -l kann "
+#~ "eine"
+
+#~ msgid "lists the signal names; if arguments follow `-l' they are assumed to"
+#~ msgstr ""
+#~ "Liste der möglichen Signalnamen angezeigt werden. Wenn Zahlen nach der "
+#~ "Option"
+
+#~ msgid "be signal numbers for which names should be listed. Kill is a shell"
+#~ msgstr ""
+#~ "angegeben werden, wird deren Signalbezeichnung angezeigt. Kill ist aus "
+#~ "zwei"
+
+#~ msgid "builtin for two reasons: it allows job IDs to be used instead of"
+#~ msgstr ""
+#~ "Gründen eine Shellfunktion: es können Jobbezeichnungen anstatt "
+#~ "Prozeßnummern"
+
+#~ msgid "process IDs, and, if you have reached the limit on processes that"
+#~ msgstr ""
+#~ "genutzt werden und, wenn die maximale Anzahl laufender Prozesse erreicht "
+#~ "ist"
+
+#~ msgid ""
+#~ "you can create, you don't have to start a process to kill another one."
+#~ msgstr ""
+#~ "braucht kein weiterer Prozeß gestartet zu werden, um einen anderen zu "
+#~ "beenden."
+
+# let
+#~ msgid "Each ARG is an arithmetic expression to be evaluated. Evaluation"
+#~ msgstr ""
+#~ "Jedes Argument ist ein auszuwertender arithmetischer Ausdruck. Es werden "
+#~ "long"
+
+#~ msgid "is done in long integers with no check for overflow, though division"
+#~ msgstr ""
+#~ "integer Variablen verwendet. Ein Überlauftest wird nicht ausgeführt, "
+#~ "jedoch"
+
+#~ msgid "by 0 is trapped and flagged as an error. The following list of"
+#~ msgstr ""
+#~ "wird eine Division durch 0 erkannt und als Fehler gekennzeichnet. Die"
+
+#~ msgid "operators is grouped into levels of equal-precedence operators."
+#~ msgstr "Liste von Operatoren ist in Gruppen gleichen Vorrangs geordnet."
+
+#~ msgid "The levels are listed in order of decreasing precedence."
+#~ msgstr "Die Gruppen selbst sind nach abnehmendem Vorrang sortiert."
+
+#~ msgid "\t-, +\t\tunary minus, plus"
+#~ msgstr "\t-, +\t\tVorzeichen."
+
+#~ msgid "\t!, ~\t\tlogical and bitwise negation"
+#~ msgstr "\t!, ~\t\tLogische und bitweise Negation."
+
+#~ msgid "\t*, /, %\t\tmultiplication, division, remainder"
+#~ msgstr "\t*, /, %\t\tMultiplikation, Division und Modulo."
+
+#~ msgid "\t+, -\t\taddition, subtraction"
+#~ msgstr "\t+, -\t\tAddition und Subtraktion."
+
+#~ msgid "\t<<, >>\t\tleft and right bitwise shifts"
+#~ msgstr "\t<<, >>\t\tBitweise Links- und Rechtsverschiebung."
+
+#~ msgid "\t<=, >=, <, >\tcomparison"
+#~ msgstr "\t<=, >=, <, >\tVergleichsoperatoren."
+
+#~ msgid "\t==, !=\t\tequality, inequality"
+#~ msgstr "\t==, !=\t\tGleich und ungleich."
+
+#~ msgid "\t&\t\tbitwise AND"
+#~ msgstr "\t&\t\tBitweises UND."
+
+#~ msgid "\t^\t\tbitwise XOR"
+#~ msgstr "\t^\t\tBitweises XOR."
+
+#~ msgid "\t|\t\tbitwise OR"
+#~ msgstr "\t|\t\tBitweises OR."
+
+#~ msgid "\t&&\t\tlogical AND"
+#~ msgstr "\t&&\t\tLogisches UND."
+
+#~ msgid "\t||\t\tlogical OR"
+#~ msgstr "\t||\t\tLogisches ODER."
+
+#~ msgid "\texpr ? expr : expr"
+#~ msgstr "\tAusdruck1 ? Ausdruck2 : Ausdruck3"
+
+#~ msgid "\t\t\tconditional expression"
+#~ msgstr "\t\t\tBedingte Befehlsausführung."
+
+#~ msgid "\t=, *=, /=, %=,"
+#~ msgstr "\t=, *=, /=, %=,"
+
+#~ msgid "\t+=, -=, <<=, >>=,"
+#~ msgstr "\t+=, -=, <<=, >>=,"
+
+#~ msgid "\t&=, ^=, |=\tassignment"
+#~ msgstr "\t&=, ^=, |=\tZuweisungen."
+
+#~ msgid "is replaced by its value (coerced to a long integer) within"
+#~ msgstr ""
+#~ "Ausdruck durch ihren in long integer umgewandelten Wert ersetzt. Um "
+
+#~ msgid "an expression. The variable need not have its integer attribute"
+#~ msgstr "die Variable in einem Ausdruck verwenden zu können, muß ihr "
+
+#~ msgid "turned on to be used in an expression."
+#~ msgstr "Integerattribut nicht aktiviert sein."
+
+#~ msgid "Operators are evaluated in order of precedence. Sub-expressions in"
+#~ msgstr "Die Operatoren werden in Reihenfolge ihres Vorrangs ausgewertet."
+
+#~ msgid "parentheses are evaluated first and may override the precedence"
+#~ msgstr ""
+#~ "Geklammerte Teilausdrücke werden zuerst ausgewertet und können von den"
+
+#~ msgid "rules above."
+#~ msgstr "oben angegebenen Vorrangregeln abweichen."
+
+#~ msgid "If the last ARG evaluates to 0, let returns 1; 0 is returned"
+#~ msgstr "Wenn das zuletzt ausgewertete Argument 0 ergibt, liefert let "
+
+#~ msgid "otherwise."
+#~ msgstr "1 als Rückgabewert, sonst 0."
+
+# read
+#~ msgid "One line is read from the standard input, and the first word is"
+#~ msgstr ""
+#~ "Es wird eine Zeile von der Standardeingabe gelesen und das erste Wort der"
+
+#~ msgid ""
+#~ "assigned to the first NAME, the second word to the second NAME, and so"
+#~ msgstr ""
+#~ "ersten Variablen NAME zugewiesen, das zweite Wort der zweiten Variablen "
+#~ "und so"
+
+#~ msgid ""
+#~ "on, with leftover words assigned to the last NAME. Only the characters"
+#~ msgstr ""
+#~ "weiter, bis ein Wort der letzten Variablen zugewiesen wurde. Nur die in "
+#~ "$IFS"
+
+#~ msgid "found in $IFS are recognized as word delimiters. The return code is"
+#~ msgstr ""
+#~ "angegebenen Zeichen werden als Trennzeichen erkannt. Wenn kein EOF "
+#~ "Zeichen"
+
+#~ msgid ""
+#~ "zero, unless end-of-file is encountered. If no NAMEs are supplied, the"
+#~ msgstr ""
+#~ "aufgetreten ist, ist der Rückgabewert Null. Wenn kein NAME angegeben "
+#~ "wurde,"
+
+#~ msgid ""
+#~ "line read is stored in the REPLY variable. If the -r option is given,"
+#~ msgstr ""
+#~ "verwendet read die REPLY Variable. Durch die Option -r wird das "
+#~ "Auswerten von"
+
+#~ msgid "this signifies `raw' input, and backslash escaping is disabled. If"
+#~ msgstr ""
+#~ "mit `\\' markierten Sonderzeichen unterdrückt. Wenn die Option -r "
+#~ "angegeben"
+
+#~ msgid "the `-p' option is supplied, the string supplied as an argument is"
+#~ msgstr ""
+#~ "ist, dann wird die Eingabeaufforderung ohne einen abschließenden "
+#~ "Zeilenumbruch"
+
+#~ msgid ""
+#~ "output without a trailing newline before attempting to read. If -a is"
+#~ msgstr ""
+#~ "angezeigt. Wenn die Option -a angegeben ist, dann wird die Eingabe an die"
+
+#~ msgid ""
+#~ "supplied, the words read are assigned to sequential indices of ARRAY,"
+#~ msgstr ""
+#~ "Feldvariable ARRAY übergeben und für jeden Eintrag der Index von Null "
+#~ "beginnend"
+
+#~ msgid "starting at zero. If -e is supplied and the shell is interactive,"
+#~ msgstr ""
+#~ "um Eins erhöht wird. Mit der -e Option wird bei einer interaktiven Shell "
+#~ "die"
+
+#~ msgid "readline is used to obtain the line."
+#~ msgstr ""
+#~ "die readline Funktionen aktiviert, um die Eingabezeile zu editieren."
+
+# return
+#~ msgid ""
+#~ "Causes a function to exit with the return value specified by N. If N"
+#~ msgstr ""
+#~ "Beendet eine Shellfunktion und setzt den Rückgabewert auf N. Wenn kein "
+#~ "Rückga-"
+
+#~ msgid "is omitted, the return status is that of the last command."
+#~ msgstr ""
+#~ "bewert angegeben ist, wird der des zuletzt ausgeführten Kommandos "
+#~ "verwendet."
+
+# set
+#~ msgid " -a Mark variables which are modified or created for export."
+#~ msgstr ""
+#~ " -a Markiert erzeugte oder veränderte Variablen als exportierbar."
+
+#~ msgid " -b Notify of job termination immediately."
+#~ msgstr " -b Zeigt das Beenden von Prozessen sofort an."
+
+#~ msgid " -e Exit immediately if a command exits with a non-zero status."
+#~ msgstr ""
+#~ " -e Beendet die Shell sofort, wenn ein Kommando ein Fehler "
+#~ "zurückliefert."
+
+#~ msgid " -f Disable file name generation (globbing)."
+#~ msgstr " -f Unterdrückt das Erzeugen von Dateinamen."
+
+#~ msgid " -h Remember the location of commands as they are looked up."
+#~ msgstr " -h Speichert die eingegebenen Kommandos sofort."
+
+#~ msgid ""
+#~ " -i Force the shell to be an \"interactive\" one. Interactive shells"
+#~ msgstr ""
+#~ " -i Erzwingt, daß die Shell interaktiv arbeitet. Interaktive Shells"
+
+#~ msgid " always read `~/.bashrc' on startup."
+#~ msgstr ""
+#~ " interpretieren beim Aufrufen den Inhalt der Datei `~/.bashrc'."
+
+#~ msgid " -k All assignment arguments are placed in the environment for a"
+#~ msgstr ""
+#~ " -k Die komplette Kommandozeile wird in die Umgebung der Funktion"
+
+#~ msgid " command, not just those that precede the command name."
+#~ msgstr ""
+#~ " geschrieben, nicht bloß die Argumente nach dem Funktionsnamen."
+
+#~ msgid " -m Job control is enabled."
+#~ msgstr " -m Jobsteuerung wird aktiviert."
+
+#~ msgid " -n Read commands but do not execute them."
+#~ msgstr " -n Kommandos werden gelesen aber nicht ausgeführt."
+
+#~ msgid " -o option-name"
+#~ msgstr " -o Option"
+
+#~ msgid " Set the variable corresponding to option-name:"
+#~ msgstr " Setzt die angegebene Option:"
+
+#~ msgid " allexport same as -a"
+#~ msgstr " allexport Wie die Option -a."
+
+#~ msgid " braceexpand same as -B"
+#~ msgstr " braceexpand Wie die Option -B."
+
+#~ msgid " emacs use an emacs-style line editing interface"
+#~ msgstr ""
+#~ " emacs Schaltet den Kommandozeileneditor in den emacs-"
+#~ "Stil."
+
+#~ msgid " errexit same as -e"
+#~ msgstr " errexit Wie die Option -e."
+
+#~ msgid " hashall same as -h"
+#~ msgstr " hashall Wie die Option -h."
+
+#~ msgid " histexpand same as -H"
+#~ msgstr " histexpand Wie die Option -H."
+
+#~ msgid " ignoreeof the shell will not exit upon reading EOF"
+#~ msgstr ""
+#~ " ignoreeof Shell wird nach dem Lesen von EOF nicht "
+#~ "verlassen ."
+
+#~ msgid " interactive-comments"
+#~ msgstr " interactive-comments"
+
+#~ msgid ""
+#~ " allow comments to appear in interactive commands"
+#~ msgstr ""
+#~ " Kommentare werden auch in der Kommandozeile "
+#~ "erlaubt."
+
+#~ msgid " keyword same as -k"
+#~ msgstr " keyword Wie die Option -k."
+
+#~ msgid " monitor same as -m"
+#~ msgstr " monitor Wie die Option -m."
+
+#~ msgid " noclobber same as -C"
+#~ msgstr " noclobber Wie die Option -C."
+
+#~ msgid " noexec same as -n"
+#~ msgstr " noexec Wie die Option -n."
+
+#~ msgid " noglob same as -f"
+#~ msgstr " noglob Wie die Option -f."
+
+#~ msgid " notify save as -b"
+#~ msgstr " notify Wie die Option -b."
+
+#~ msgid " nounset same as -u"
+#~ msgstr " nounset Wie die Option -u."
+
+#~ msgid " onecmd same as -t"
+#~ msgstr " onecmd Wie die Option -t."
+
+#~ msgid " physical same as -P"
+#~ msgstr " physical Wie die Option -P."
+
+#~ msgid ""
+#~ " posix change the behavior of bash where the default"
+#~ msgstr ""
+#~ " posix Ändert das Verhalten der Shell, wo sie vom,"
+
+#~ msgid ""
+#~ " operation differs from the 1003.2 standard to"
+#~ msgstr " 1003.2 Standard abweicht, zu einem POSIX "
+
+#~ msgid " match the standard"
+#~ msgstr " kompatibelen Verhalten."
+
+#~ msgid " privileged same as -p"
+#~ msgstr " privileged Wie die Option -p."
+
+#~ msgid " verbose same as -v"
+#~ msgstr " verbose Wie die Option -v."
+
+#~ msgid " vi use a vi-style line editing interface"
+#~ msgstr ""
+#~ " vi Schaltet den Kommandozeileneditor in den vi-Stil."
+
+#~ msgid " xtrace same as -x"
+#~ msgstr " xtrace Wie die Option -x."
+
+#~ msgid ""
+#~ " -p Turned on whenever the real and effective user ids do not match."
+#~ msgstr ""
+#~ " -p Ist aktiviert, wenn die reale und effektive Nutzer ID nicht "
+#~ "überein-"
+
+#~ msgid " Disables processing of the $ENV file and importing of shell"
+#~ msgstr ""
+#~ " stimmen. Die $ENV Datei wird nicht ausgeführt und keine "
+#~ "Shellfunk-"
+
+#~ msgid ""
+#~ " functions. Turning this option off causes the effective uid and"
+#~ msgstr ""
+#~ " tionen importiert. Das Deaktivieren dieser Option setzt die "
+#~ "Effektive"
+
+#~ msgid " gid to be set to the real uid and gid."
+#~ msgstr " uid und gid auf die Reale uid und gid."
+
+#~ msgid " -t Exit after reading and executing one command."
+#~ msgstr ""
+#~ " -t Beendet die Shell sofort nach Ausfühern eines einzelnen Kommandos."
+
+#~ msgid " -u Treat unset variables as an error when substituting."
+#~ msgstr ""
+#~ " -u Der Versuch leere (ungesetzte) Variablen zu erweitern erzeugt "
+#~ "einen Fehler."
+
+#~ msgid " -v Print shell input lines as they are read."
+#~ msgstr " -v Gibt die Kommandozeilen aus wie sie gelesenen wurden."
+
+#~ msgid " -x Print commands and their arguments as they are executed."
+#~ msgstr ""
+#~ " -x Gibt die Kommandos mit ihren Argumenten aus wie es ausgeführt "
+#~ "wird."
+
+#~ msgid " -B the shell will perform brace expansion"
+#~ msgstr " -B Schaltet die Klammernerweiterung der Shell ein."
+
+#~ msgid " -H Enable ! style history substitution. This flag is on"
+#~ msgstr ""
+#~ " -H Schaltet den Zugriff auf den Kommandozeilenspeicher durch `!' ein."
+
+#~ msgid " by default."
+#~ msgstr " Diese Option ist standardmäßig aktiviert."
+
+#~ msgid " -C If set, disallow existing regular files to be overwritten"
+#~ msgstr ""
+#~ " -C Verhindert das Ãœberschreiben von existierenden Dateien durch"
+
+#~ msgid " by redirection of output."
+#~ msgstr " Umleiten der Ausgabe (wie noclobber)."
+
+#~ msgid " -P If set, do not follow symbolic links when executing commands"
+#~ msgstr ""
+#~ " -P Symbolische Verweise werden beim Ausführen von Kommandos, wie z."
+#~ "B. cd"
+
+#~ msgid " such as cd which change the current directory."
+#~ msgstr " welches das aktuelle Arbeitsverzeichnis ändert, ignoriert."
+
+#~ msgid "Using + rather than - causes these flags to be turned off. The"
+#~ msgstr ""
+#~ "Durch `+' an Stelle von `-' kann eine Option deaktiviert werden. Die "
+#~ "Optionen"
+
+#~ msgid "flags can also be used upon invocation of the shell. The current"
+#~ msgstr ""
+#~ "können auch beim Aufruf der Shell benutzt werden. Die gegenwärtig "
+#~ "aktivierten"
+
+#~ msgid ""
+#~ "set of flags may be found in $-. The remaining n ARGs are positional"
+#~ msgstr ""
+#~ "Optionen sind in der Variablen $- gespeichert. Die verbleibenden n "
+#~ "Argumente"
+
+#~ msgid "parameters and are assigned, in order, to $1, $2, .. $n. If no"
+#~ msgstr ""
+#~ "sind Parameter und werden den Variablen $1, $2, .. $n zugewiesen. Wenn "
+#~ "kein"
+
+#~ msgid "ARGs are given, all shell variables are printed."
+#~ msgstr "Argument angegeben ist, dann werden alle Shellvariablen ausgegeben."
+
+# unset
+#~ msgid "For each NAME, remove the corresponding variable or function. Given"
+#~ msgstr ""
+#~ "Für jeden angegebenen NAMEn wird die entsprechende Variable oder Funktion "
+#~ "ge-"
+
+#~ msgid "the `-v', unset will only act on variables. Given the `-f' flag,"
+#~ msgstr ""
+#~ "löscht. Mit `-v' werden nur Variablen und mit `-f' nur Funktionen "
+#~ "gelöscht."
+
+#~ msgid "unset will only act on functions. With neither flag, unset first"
+#~ msgstr ""
+#~ "Wenn kein Schalter angegeben ist, wird zunächst eine Variable gesucht und "
+#~ "wenn"
+
+#~ msgid "tries to unset a variable, and if that fails, then tries to unset a"
+#~ msgstr ""
+#~ "eine solche nicht gefunden wurde, dann wird versucht eine Funktion zu "
+#~ "löschen."
+
+#~ msgid ""
+#~ "function. Some variables (such as PATH and IFS) cannot be unset; also"
+#~ msgstr ""
+#~ "Einige Variablen (z.B. PATH und IFS) können nicht gelöscht werden. Siehe"
+
+#~ msgid "see readonly."
+#~ msgstr "diesbezüglich auch die Hilfe der Funktion readonly."
+
+# export
+#~ msgid "NAMEs are marked for automatic export to the environment of"
+#~ msgstr ""
+#~ "Die NAMEn werden für den automatischen Export in die Umgebung von der "
+#~ "Shell"
+
+#~ msgid "subsequently executed commands. If the -f option is given,"
+#~ msgstr ""
+#~ "gestarteten Prozesse markiert. Wenn die -f Option angegenen ist, dann "
+#~ "bezeich-"
+
+#~ msgid "the NAMEs refer to functions. If no NAMEs are given, or if `-p'"
+#~ msgstr ""
+#~ "nen die NAME'n Funktionen. Wenn keine NAMEn angegeben sind, oder die `-p'"
+
+#~ msgid "is given, a list of all names that are exported in this shell is"
+#~ msgstr ""
+#~ "Option angegeben ist, dann wird eine Liste aller von der Shell "
+#~ "exportierter"
+
+#~ msgid "printed. An argument of `-n' says to remove the export property"
+#~ msgstr ""
+#~ "Namen ausgegeben. Mit dem Argument `-n' wird die Exporteigenschaft des "
+#~ "NAMENs"
+
+#~ msgid "from subsequent NAMEs. An argument of `--' disables further option"
+#~ msgstr ""
+#~ "gelöscht. Ein Argument `--' verhindert, daß nach diesem Zeichen weitere"
+
+#~ msgid "processing."
+#~ msgstr "Optionen ausgewertet werden."
+
+# readonly
+#~ msgid ""
+#~ "The given NAMEs are marked readonly and the values of these NAMEs may"
+#~ msgstr ""
+#~ "Die angegebenen NAMEn werden als Nur-Lesen markiert. Deren Inhalte können"
+
+#~ msgid "not be changed by subsequent assignment. If the -f option is given,"
+#~ msgstr ""
+#~ "nicht mehr geändert werden. Wenn die -f Option angegeben wird, dann "
+#~ "werden nur"
+
+#~ msgid "then functions corresponding to the NAMEs are so marked. If no"
+#~ msgstr ""
+#~ "Funktionen markiert. Ohne oder mit dem `-p' Argument, werden alle auf "
+#~ "Nur- "
+
+#~ msgid ""
+#~ "arguments are given, or if `-p' is given, a list of all readonly names"
+#~ msgstr ""
+#~ "Lesen gesetzte Namen ausgegeben. Mit dem Argument `-n' kann die Nur-Lese"
+
+#~ msgid ""
+#~ "is printed. An argument of `-n' says to remove the readonly property"
+#~ msgstr ""
+#~ "Eigenschaft für die angegebenen Namen entfernt werden. Der `-a' Schalter"
+
+#~ msgid "from subsequent NAMEs. The `-a' option means to treat each NAME as"
+#~ msgstr ""
+#~ "bewirkt, daß jeder Name als Feldvariable behandelt wird. Das Argument "
+#~ "`--'"
+
+#~ msgid "an array variable. An argument of `--' disables further option"
+#~ msgstr "unterdrückt das Auswerten weiterer Optionen."
+
+# shift
+#~ msgid ""
+#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is"
+#~ msgstr ""
+#~ "Die Positionsvariablen $N+1 ... werden nach $1 ... umbenannt. Wenn N "
+#~ "nicht"
+
+#~ msgid "not given, it is assumed to be 1."
+#~ msgstr "angegeben ist, dann wird 1 verwendet."
+
+# source
+#~ msgid "Read and execute commands from FILENAME and return. The pathnames"
+#~ msgstr ""
+#~ "Liest und führt anschließend die Kommandos in DATEINAME aus. $PATH wird"
+
+#~ msgid "in $PATH are used to find the directory containing FILENAME."
+#~ msgstr "als Suchpfad benutzt, um DATEINAME zu finden."
+
+# suspend
+#~ msgid "Suspend the execution of this shell until it receives a SIGCONT"
+#~ msgstr ""
+#~ "Hält das Ausführen der Shell solange an, bis sie das Signal SIGCONT "
+#~ "empfängt."
+
+#~ msgid "signal. The `-f' if specified says not to complain about this"
+#~ msgstr ""
+#~ "Die `-f' Option unterdrückt eine Warnung, wenn es sich um eine Login Shell"
+
+#~ msgid "being a login shell if it is; just suspend anyway."
+#~ msgstr "handelt und hält auch deren Abarbeitung an."
+
+# test
+#~ msgid "Exits with a status of 0 (trueness) or 1 (falseness) depending on"
+#~ msgstr ""
+#~ "Liefert den Rückgabewert 0 (wahr) oder 1 (falsch), abhängig vom Ergebnis "
+#~ "des"
+
+#~ msgid "the evaluation of EXPR. Expressions may be unary or binary. Unary"
+#~ msgstr ""
+#~ "Ausdruckes EXPR. Die Ausdrücke können ein- (unär) oder zweistellig "
+#~ "(binär) sein."
+
+#~ msgid "expressions are often used to examine the status of a file. There"
+#~ msgstr ""
+#~ "Einstellige Ausdrücke werden oft zum Ermitteln eines Dateizustandes "
+#~ "verwendet."
+
+#~ msgid "are string operators as well, and numeric comparison operators."
+#~ msgstr ""
+#~ "Es gibt außerden Zeichenketten- und numerische Vergleichsoperatoren."
+
+#~ msgid "File operators:"
+#~ msgstr "Datei Operatoren:"
+
+#~ msgid " -b FILE True if file is block special."
+#~ msgstr ""
+#~ " -b DATEI Wahr, wenn der Dateiname ein Blockgerät bezeichnet."
+
+#~ msgid " -c FILE True if file is character special."
+#~ msgstr ""
+#~ " -c DATEI Wahr, wenn der Dateiname ein sequentielles Gerät "
+#~ "bezeichnet."
+
+#~ msgid " -d FILE True if file is a directory."
+#~ msgstr " -d DATEI Wahr, wenn es ein Verzeichnis ist."
+
+#~ msgid " -e FILE True if file exists."
+#~ msgstr " -e DATEI Wahr, wenn die Datei existiert."
+
+#~ msgid " -f FILE True if file exists and is a regular file."
+#~ msgstr ""
+#~ " -f DATEI Wahr, wenn die Datei existiert und eine reguläre Datei "
+#~ "ist."
+
+#~ msgid " -g FILE True if file is set-group-id."
+#~ msgstr " -g DATEI Wahr, wenn das SGID Bit gesetzt ist."
+
+#~ msgid " -h FILE True if file is a symbolic link. Use \"-L\"."
+#~ msgstr ""
+#~ " -h DATEI Wahr, wenn FILE symbolischer Verweis ist. (Besser -L "
+#~ "verw.)"
+
+#~ msgid " -L FILE True if file is a symbolic link."
+#~ msgstr " -L DATEI Wahr, wenn FIIE einen symbolischen Verweis ist."
+
+#~ msgid " -k FILE True if file has its \"sticky\" bit set."
+#~ msgstr ""
+#~ " -k DATEI Wahr, wenn nur der Besitzer die Datei ändern darf "
+#~ "(sticky)."
+
+#~ msgid " -p FILE True if file is a named pipe."
+#~ msgstr ""
+#~ " -p DATEI Wahr, wenn FILE eine benannte Pipeline (named pipe) "
+#~ "ist."
+
+#~ msgid " -r FILE True if file is readable by you."
+#~ msgstr ""
+#~ " -r DATEI Wahr, wenn die Datei vom aktuellen Benutzer lesbar ist."
+
+#~ msgid " -s FILE True if file exists and is not empty."
+#~ msgstr ""
+#~ " -s DATEI Wahr, wenn die Datei existiert und nicht leer ist."
+
+#~ msgid " -S FILE True if file is a socket."
+#~ msgstr " -S DATEI Wahr, wenn die Datei ein \"Socket\" ist."
+
+#~ msgid " -t FD True if FD is opened on a terminal."
+#~ msgstr ""
+#~ " -t FD Wahr, wenn die Dateinummer FD für ein Terminal "
+#~ "geöffnet ist."
+
+#~ msgid " -u FILE True if the file is set-user-id."
+#~ msgstr ""
+#~ " -u DATEI Wahr, wenn für diese Datei das SUID Bit gesetzt ist."
+
+#~ msgid " -w FILE True if the file is writable by you."
+#~ msgstr ""
+#~ " -w DATEI Wahr, wenn die Datei vom aktuellen Benutzer schreibbar "
+#~ "ist."
+
+#~ msgid " -x FILE True if the file is executable by you."
+#~ msgstr ""
+#~ " -x DATEI Wahr, wenn die Datei vom aktuellen Benutzer ausführbar "
+#~ "ist."
+
+#~ msgid " -O FILE True if the file is effectively owned by you."
+#~ msgstr ""
+#~ " -O DATEI Wahr, wenn der aktuelle Benutzer Eigentümer der Datei "
+#~ "ist."
+
+#~ msgid ""
+#~ " -G FILE True if the file is effectively owned by your group."
+#~ msgstr ""
+#~ " -G DATEI Wahr, wenn GID des Benutzers und der Datei "
+#~ "übereinstimmen."
+
+#~ msgid " FILE1 -nt FILE2 True if file1 is newer than (according to"
+#~ msgstr ""
+#~ " DATEI1 -nt DATEI2 Wahr, wenn der letzte Änderungszeitpunkt von DATEI1 "
+#~ "jünger"
+
+#~ msgid " modification date) file2."
+#~ msgstr " ist als der von DATEI2."
+
+#~ msgid " FILE1 -ot FILE2 True if file1 is older than file2."
+#~ msgstr " DATEI1 -ot DATEI2 Wahr, wenn DATEI1 älter ist als DATEI2."
+
+#~ msgid " FILE1 -ef FILE2 True if file1 is a hard link to file2."
+#~ msgstr ""
+#~ " DATEI1 -ef DATEI2 Wahr, wenn beide Inodes übereinstimmen (hard link)."
+
+#~ msgid "String operators:"
+#~ msgstr "Operatoren für Zeichenketten (Strings):"
+
+#~ msgid " -z STRING True if string is empty."
+#~ msgstr " -z STRING Wahr, wenn die Länge der Zeichenkette Null ist."
+
+#~ msgid " -n STRING"
+#~ msgstr " -n STRING"
+
+#~ msgid " STRING True if string is not empty."
+#~ msgstr ""
+#~ " STRING Wahr, wenn die Länge der Zeichenkette größer als Null "
+#~ "ist."
+
+#~ msgid " STRING1 = STRING2"
+#~ msgstr " STRING1 = STRING2"
+
+#~ msgid " True if the strings are equal."
+#~ msgstr " Wahr, wenn die Zeichenketten identisch sind."
+
+#~ msgid " STRING1 != STRING2"
+#~ msgstr " STRING1 != STRING2"
+
+#~ msgid " True if the strings are not equal."
+#~ msgstr ""
+#~ " Wahr, wenn die Zeichenketten unterschiedlich sind."
+
+#~ msgid " STRING1 < STRING2"
+#~ msgstr " STRING1 < STRING2"
+
+#~ msgid ""
+#~ " True if STRING1 sorts before STRING2 lexicographically"
+#~ msgstr ""
+#~ " Wahr, wenn STRING1 vor STRING2 alphabetisch geordnet "
+#~ "ist."
+
+#~ msgid " STRING1 > STRING2"
+#~ msgstr " STRING1 > STRING2"
+
+#~ msgid ""
+#~ " True if STRING1 sorts after STRING2 lexicographically"
+#~ msgstr ""
+#~ " Wahr, wenn STRING1 nach STRING2 alphabetisch geordnet "
+#~ "ist."
+
+#~ msgid "Other operators:"
+#~ msgstr "Andere Operatoren:"
+
+#~ msgid " ! EXPR True if expr is false."
+#~ msgstr " ! EXPR Wahr, wenn der Ausdruck EXPR `falsch' liefert."
+
+#~ msgid " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true."
+#~ msgstr ""
+#~ " EXPR1 -a EXPR2 Wahr, wenn die Ausdrücke EXPR1 und EXPR2 `wahr' "
+#~ "liefern."
+
+#~ msgid " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true."
+#~ msgstr ""
+#~ " EXPR1 -o EXPR2 Wahr, wenn entweder EXPR1 oder EXPR2 wahr liefern."
+
+#~ msgid " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,"
+#~ msgstr ""
+#~ " arg1 OP arg2 Arithmetische Operatoren. OP kann -eq, -ne, -lt, -le, -"
+#~ "gt"
+
+#~ msgid " -lt, -le, -gt, or -ge."
+#~ msgstr " oder -ge sein."
+
+#~ msgid "Arithmetic binary operators return true if ARG1 is equal, not-equal,"
+#~ msgstr ""
+#~ "Diese binären arithmetischen Operatoren liefern Wahr, wenn ARG1 gleich,"
+
+#~ msgid ""
+#~ "less-than, less-than-or-equal, greater-than, or greater-than-or-equal"
+#~ msgstr ""
+#~ "ungleich, kleiner als, kleiner gleich, größer als oder größer gleich"
+
+#~ msgid "than ARG2."
+#~ msgstr "ARG2 ist."
+
+# [
+#~ msgid "This is a synonym for the \"test\" builtin, but the last"
+#~ msgstr ""
+#~ "Dies ist ein Synonym für die Shellfunktion test. Das letzte Argument muß "
+#~ "ein"
+
+#~ msgid "argument must be a literal `]', to match the opening `['."
+#~ msgstr "`]' sein, das mit dem öffnenden `[' korrespondiert."
+
+# times
+#~ msgid "Print the accumulated user and system times for processes run from"
+#~ msgstr ""
+#~ "Gibt die verbrauchte Benutzer- und Systemzeit für die Shell und der von"
+
+#~ msgid "the shell."
+#~ msgstr "ihr gestarteten Prozesse aus."
+
+# trap
+#~ msgid "The command ARG is to be read and executed when the shell receives"
+#~ msgstr ""
+#~ "Die Shell fängt die in SIG_SPEC angegebenen Signale ab führt das Kommando "
+#~ "ARG"
+
+#~ msgid "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are"
+#~ msgstr ""
+#~ "aus. Wenn kein ARG angegeben ist, werden alle bezeichneten Signale "
+#~ "zurück-"
+
+#~ msgid "reset to their original values. If ARG is the null string each"
+#~ msgstr ""
+#~ "gesetzt. Ist ARG eine leere Zeichenkette, dann wird jedes angegebne Sig-"
+
+#~ msgid "SIGNAL_SPEC is ignored by the shell and by the commands it invokes."
+#~ msgstr ""
+#~ "nal von der Shell und den von ihr aufgerufenen Kommandos ignoriert. Wenn "
+#~ "das"
+
+#~ msgid "If SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from"
+#~ msgstr ""
+#~ "Signal EXIT (0) abgefangen wird, dann wird ARG bei Verlassen der Shell "
+#~ "ausge-"
+
+#~ msgid "the shell. If SIGNAL_SPEC is DEBUG, ARG is executed after every"
+#~ msgstr ""
+#~ "führt. Durch Abfangen des Signals DEBUG, wird ARG nach jedem Kommando"
+
+#~ msgid "command. If ARG is `-p' then the trap commands associated with"
+#~ msgstr ""
+#~ "aufgerufen. Mit `-p' werden Kommandos angezeigt, die für jedes "
+#~ "abgefangene"
+
+#~ msgid "each SIGNAL_SPEC are displayed. If no arguments are supplied or if"
+#~ msgstr ""
+#~ "Signal ausgeführt werden. Wenn keine Argumente angegeben sind, oder wenn "
+#~ "das"
+
+#~ msgid "only `-p' is given, trap prints the list of commands associated with"
+#~ msgstr ""
+#~ "Argument `-p' angegeben ist, wird eine Liste der Kommandos für jedes "
+#~ "abgefan-"
+
+#~ msgid ""
+#~ "each signal number. SIGNAL_SPEC is either a signal name in <signal.h>"
+#~ msgstr ""
+#~ "gene Signal angezeigt. SIGNAL_SPEC ist entweder ein Signalname (aus "
+#~ "signal.h)"
+
+#~ msgid ""
+#~ "or a signal number. `trap -l' prints a list of signal names and their"
+#~ msgstr ""
+#~ "oder eine Signalnummer. `trap -l' gibt eine Liste der Signalnamen und "
+#~ "der ent-"
+
+#~ msgid "corresponding numbers. Note that a signal can be sent to the shell"
+#~ msgstr ""
+#~ "sprechenden Nummern aus. Ein Signal kann an eine Shell mit dem Befehl "
+#~ "\"kill"
+
+#~ msgid "with \"kill -signal $$\"."
+#~ msgstr "-signal $$\" gesendet werden."
+
+# type
+#~ msgid "For each NAME, indicate how it would be interpreted if used as a"
+#~ msgstr ""
+#~ "Gibt aus, wie der angegebene NAME interpretiert würde, wenn er in der"
+
+#~ msgid "If the -t option is used, returns a single word which is one of"
+#~ msgstr ""
+#~ "Die Option -t bewirkt, daß eins der Worte: `alias', `keyword', `function',"
+
+#~ msgid ""
+#~ "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an"
+#~ msgstr ""
+#~ "`file' oder `' ausgegeben wird, wenn NAME ein Alias, ein in der Shell "
+#~ "reser-"
+
+#~ msgid ""
+#~ "alias, shell reserved word, shell function, shell builtin, disk file,"
+#~ msgstr ""
+#~ "viertes Wort, eine Skriptfunktion, eine eingebaute Shellfunktion, eine "
+#~ "Datei"
+
+#~ msgid "or unfound, respectively."
+#~ msgstr "ist oder kein Kommandotyp gefunden wurde."
+
+#~ msgid "If the -p flag is used, either returns the name of the disk file"
+#~ msgstr ""
+#~ "Wenn der -p Schalter angegeben ist, dann wird, wenn eine entsprechende "
+#~ "Datei"
+
+#~ msgid "that would be executed, or nothing if -t would not return `file'."
+#~ msgstr "existiert, ihr Name ausgegegeben,"
+
+#~ msgid "If the -a flag is used, displays all of the places that contain an"
+#~ msgstr ""
+#~ "Mit dem -a Schalter werden alle ausführbaren Dateien mit dem Namen `file'"
+
+#~ msgid ""
+#~ "executable named `file'. This includes aliases and functions, if and"
+#~ msgstr ""
+#~ "angezeigt. Dieses schließt Aliase und Funktionen ein, aber nur dann"
+
+#~ msgid "only if the -p flag is not also used."
+#~ msgstr "wenn nicht gleichzeitig der -p Schalter gesetzt ist."
+
+#~ msgid "Type accepts -all, -path, and -type in place of -a, -p, and -t,"
+#~ msgstr ""
+#~ "Type akzeptiert auch die Argumente -all, -path und -type an Stelle von -a,"
+
+#~ msgid "respectively."
+#~ msgstr "-p und -t."
+
+# ulimit
+#~ msgid "Ulimit provides control over the resources available to processes"
+#~ msgstr ""
+#~ "Ulimit steuert die Ressourcen, die den von der Shell aufgerufenen "
+#~ "Prozessen"
+
+#~ msgid "started by the shell, on systems that allow such control. If an"
+#~ msgstr ""
+#~ "zur Verfügung stehen, wenn das System Ressourcensteuerung unterstützt. "
+#~ "Wenn"
+
+#~ msgid "option is given, it is interpreted as follows:"
+#~ msgstr "eine Option angegebe ist, dann wird sie wie folgt interpretiert:"
+
+#~ msgid " -S\tuse the `soft' resource limit"
+#~ msgstr " -S\tNutze die `weiche (soft)' Ressourceneinstellung."
+
+#~ msgid " -H\tuse the `hard' resource limit"
+#~ msgstr " -H\tNutze die `harte (hard)' Ressourceneinstellung."
+
+#~ msgid " -a\tall current limits are reported"
+#~ msgstr " -a\tDie gegenwärtige Ressourceneinstellung wird ausgegeben."
+
+#~ msgid " -c\tthe maximum size of core files created"
+#~ msgstr " -c\tDie maximale Größe der erzeugten core-Dateien."
+
+# für ein Prozeß oder für alle?
+#~ msgid " -d\tthe maximum size of a process's data segment"
+#~ msgstr " -d\tDie maximale Größe des Datensegmentes eines Prozesses."
+
+#~ msgid " -m\tthe maximum resident set size"
+#~ msgstr ""
+#~ " -m\tMaximale Größe des nicht auszulagenden (residenten) "
+#~ "Prozeßspeichers."
+
+#~ msgid " -s\tthe maximum stack size"
+#~ msgstr " -s\tDie maximale Größe des Stapelspeichers."
+
+#~ msgid " -t\tthe maximum amount of cpu time in seconds"
+#~ msgstr " -t\tDie maximal verfügbare CPU-Zeit (in Sekunden)."
+
+#~ msgid " -f\tthe maximum size of files created by the shell"
+#~ msgstr ""
+#~ " -f\tDie maximal erlaubte Größe für von der Shell erzeugte Dateien."
+
+#~ msgid " -p\tthe pipe buffer size"
+#~ msgstr " -p\tDie Größe des Pipeline-Puffers."
+
+#~ msgid " -n\tthe maximum number of open file descriptors"
+#~ msgstr " -n\tDie maximale Anzahl gleichzeitig geöffneter Dateien."
+
+#~ msgid " -u\tthe maximum number of user processes"
+#~ msgstr " -u\tDie maximale Anzahl von Prozessen des Benutzers."
+
+#~ msgid " -v\tthe size of virtual memory"
+#~ msgstr " -v\tDie Größe des virtuellen Arbeitsspeichers."
+
+#~ msgid "If LIMIT is given, it is the new value of the specified resource."
+#~ msgstr ""
+#~ "Wenn eine Grenze angegeben ist, wird die Resouce auf diesen Wert gesetzt."
+
+#~ msgid "Otherwise, the current value of the specified resource is printed."
+#~ msgstr ""
+#~ "Sonst wird der gegenwärtig eingestellte Wert ausgegeben. Wenn keine "
+#~ "Option"
+
+#~ msgid "If no option is given, then -f is assumed. Values are in 1k"
+#~ msgstr ""
+#~ "angegeben ist wird -f verwendet. Die Einheit ist 1k außer für -t, deren"
+
+#~ msgid "increments, except for -t, which is in seconds, -p, which is in"
+#~ msgstr ""
+#~ "Wert in Sekunden angegeben wird, -p, dessen Einheit 512 bytes ist und -u,"
+
+#~ msgid "increments of 512 bytes, and -u, which is an unscaled number of"
+#~ msgstr "für das die Anzahl der Prozesse verwendet"
+
+#~ msgid "processes."
+#~ msgstr "wird."
+
+# umask
+#~ msgid ""
+#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if"
+#~ msgstr ""
+#~ "Die Dateierzeugungsmaske wird auf MODE gesetzt. Wenn MODE nicht, oder -S"
+
+#~ msgid ""
+#~ "`-S' is supplied, the current value of the mask is printed. The `-S'"
+#~ msgstr ""
+#~ "angegeben ist, dann wird die aktuelle Dateierzeugungsmaske ausgegeben."
+
+#~ msgid ""
+#~ "option makes the output symbolic; otherwise an octal number is output."
+#~ msgstr ""
+#~ "Die `-S' Option bewirkt, daß die symbolische Entsprechung ausgegeben "
+#~ "wird. "
+
+#~ msgid "If MODE begins with a digit, it is interpreted as an octal number,"
+#~ msgstr ""
+#~ "Wenn MODE mit einer Ziffer beginnt, wird diese als Oktalzahl "
+#~ "interpretiert."
+
+#~ msgid ""
+#~ "otherwise it is a symbolic mode string like that accepted by chmod(1)."
+#~ msgstr ""
+#~ "Ansonsten wird eine symbolische Notation (analog chmod(1)) angenommen."
+
+# wait
+#~ msgid ""
+#~ "Wait for the specified process and report its termination status. If"
+#~ msgstr ""
+#~ "Wartet auf das Beenden der angegebenen Prozesse und gibt deren "
+#~ "Rückgabewert"
+
+#~ msgid "N is not given, all currently active child processes are waited for,"
+#~ msgstr "aus. Wenn keine Prozesse angegeben sind, wird auf alle aktiven"
+
+#~ msgid "and the return code is zero. N may be a process ID or a job"
+#~ msgstr ""
+#~ "Hintergrundprozesse gewartet und Null zurückgegeben. An wait können"
+
+#~ msgid "specification; if a job spec is given, all processes in the job's"
+#~ msgstr ""
+#~ "Prozeßnummern und Jobbezeichnungen übergeben werden. Wenn "
+#~ "Jobbezeichnungen"
+
+#~ msgid "pipeline are waited for."
+#~ msgstr ""
+#~ "angegeben sind, dann wird auf alle Prozesse in der Job-Pipeline gewartet "
+#~ "und"
+
+#~ msgid "and the return code is zero. N is a process ID; if it is not given,"
+#~ msgstr "Null zurückgegeben."
+
+#~ msgid "all child processes of the shell are waited for."
+#~ msgstr " "
+
+# for
+#~ msgid "The `for' loop executes a sequence of commands for each member in a"
+#~ msgstr ""
+#~ "`for' führt eine Reihe von Kommandos für jeden Eintrag einer Liste aus."
+
+#~ msgid ""
+#~ "list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is"
+#~ msgstr "Ohne `in WORTLISTE' wird als Argument `in \"$@\"' verwendet."
+
+#~ msgid ""
+#~ "assumed. For each element in WORDS, NAME is set to that element, and"
+#~ msgstr "NAME wird nacheinander ein Element aus WORTLISTE zugewiesen"
+
+#~ msgid "the COMMANDS are executed."
+#~ msgstr "und die KOMMANDOS ausgeführt."
+
+# select
+#~ msgid "The WORDS are expanded, generating a list of words. The"
+#~ msgstr ""
+#~ "Die WORTE werden erweitert und erzeugen eine Wortliste. Diese wird als"
+
+#~ msgid "set of expanded words is printed on the standard error, each"
+#~ msgstr "numerierte Liste auf dem Standardfehlerkanal ausgegeben."
+
+#~ msgid "preceded by a number. If `in WORDS' is not present, `in \"$@\"'"
+#~ msgstr ""
+#~ "Wenn `in WORTE' nicht angegeben ist, dann wird `in \"$@\"' verwendet."
+
+#~ msgid "is assumed. The PS3 prompt is then displayed and a line read"
+#~ msgstr ""
+#~ "Das PS3-Promt wird angezeigt und eine Zeile von der Standardeingabe "
+#~ "gelesen."
+
+#~ msgid "from the standard input. If the line consists of the number"
+#~ msgstr ""
+#~ "Wenn die gelesene Zeile eine Zeilennummer der angezeigten Liste enhält, "
+#~ "dann"
+
+#~ msgid "corresponding to one of the displayed words, then NAME is set"
+#~ msgstr "wird NAME entsprechend dem WORT in der bezeichneten Zeile gesetzt."
+
+#~ msgid "to that word. If the line is empty, WORDS and the prompt are"
+#~ msgstr ""
+#~ "Wird eine leere Zeichenkette gelesen, dann wird die Liste erneut "
+#~ "angezeigt."
+
+#~ msgid "redisplayed. If EOF is read, the command completes. Any other"
+#~ msgstr ""
+#~ "Mir einem EOF Zeichen wird die Eingabe abgebrochen. Jeder andere Inhalt "
+#~ "der"
+
+#~ msgid "value read causes NAME to be set to null. The line read is saved"
+#~ msgstr ""
+#~ "Zeichenkette bewirkt, daß NAME auf Null gesetzt wird. Die gelesene Zeile "
+#~ "wird"
+
+#~ msgid "in the variable REPLY. COMMANDS are executed after each selection"
+#~ msgstr ""
+#~ "in der Variable REPLY gespeichert. Die KOMMANDOS werden so lange "
+#~ "wiederholt,"
+
+#~ msgid "until a break or return command is executed."
+#~ msgstr "bis die Schleife mit break oder return verlassen wird."
+
+# case
+#~ msgid "Selectively execute COMMANDS based upon WORD matching PATTERN. The"
+#~ msgstr "Führt KOMMANDOS abhängig von einem WORT aus, das MUSTER entspricht."
+
+#~ msgid "`|' is used to separate multiple patterns."
+#~ msgstr "Das Zeichen `|' trennt mehrere Muster."
+
+# if
+#~ msgid ""
+#~ "The if COMMANDS are executed. If the exit status is zero, then the then"
+#~ msgstr ""
+#~ "Die KOMMANDOS werden ausgewertet. Ist der Rückgabewert Null, dann werden "
+#~ "die"
+
+#~ msgid ""
+#~ "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed"
+#~ msgstr ""
+#~ "then KOMMANDOS ausgeführt. Ansonsten werden die elif KOMMANDOS der Reihe "
+#~ "nach"
+
+#~ msgid ""
+#~ "in turn, and if the exit status is zero, the corresponding then COMMANDS"
+#~ msgstr ""
+#~ "ausgewertet und bei einem Rückgabewert Null die dazugehörigen KOMMANDOS"
+
+#~ msgid ""
+#~ "are executed and the if command completes. Otherwise, the else COMMANDS"
+#~ msgstr "ausgeführt und if beendet. Sonst wird, wenn ein else Kommandozweig"
+
+#~ msgid ""
+#~ "are executed, if present. The exit status is the exit status of the last"
+#~ msgstr ""
+#~ "existiert, dieser ausgeführt. Der Exitstatus ist der des letzten Kommandos"
+
+#~ msgid "command executed, or zero if no condition tested true."
+#~ msgstr "oder Null, wenn keine Bedingung wahr ergab."
+
+# while
+#~ msgid "Expand and execute COMMANDS as long as the final command in the"
+#~ msgstr ""
+#~ "Wiederholt den Schleifenkörper `do KOMMANDOS done' so lange die letzte"
+
+#~ msgid "`while' COMMANDS has an exit status of zero."
+#~ msgstr "Kommando `while KOMMANDOS' einen Rückkehrstatus Null liefert."
+
+# until
+#~ msgid "`until' COMMANDS has an exit status which is not zero."
+#~ msgstr ""
+#~ "Kommando in `until KOMMANDOS' einen Rückkehrstatus ungleich Null liefert."
+
+# function
+#~ msgid "Create a simple command invoked by NAME which runs COMMANDS."
+#~ msgstr "Erzeugt eine neue Shellfunktion NAME, die KOMMANDOS ausführt. "
+
+#~ msgid "Arguments on the command line along with NAME are passed to the"
+#~ msgstr "NAME und Kommandozeilenagumente werden an die Funktion als $0 .. $n"
+
+#~ msgid "function as $0 .. $n."
+#~ msgstr "übergeben."
+
+# grouping_braces
+#~ msgid "Run a set of commands in a group. This is one way to redirect an"
+#~ msgstr ""
+#~ "Führt Kommandos in einer Gruppe aus. Das ist eine Möglichkeit die "
+#~ "Ausgabe von"
+
+#~ msgid "entire set of commands."
+#~ msgstr "einer Gruppe Kommandos umzuleiten."
+
+# fg_percent
+#~ msgid "This is similar to the `fg' command. Resume a stopped or background"
+#~ msgstr ""
+#~ "Ist ähnlich dem `fg' Kommando. Nimmt einen angehaltenen oder hintergrund "
+#~ "Job"
+
+#~ msgid "job. If you specifiy DIGITS, then that job is used. If you specify"
+#~ msgstr ""
+#~ "wieder auf. Wenn eine Jobnummer angegeben ist, dann wird dieser "
+#~ "aufgenommen."
+
+#~ msgid ""
+#~ "WORD, then the job whose name begins with WORD is used. Following the"
+#~ msgstr ""
+#~ "Wenn eine Zeichenkette angegeben ist, dann wird der Job der mit diesen "
+#~ "Zeichen"
+
+#~ msgid "job specification with a `&' places the job in the background."
+#~ msgstr "beginnt wieder aufgenommen. `&' bringt den Job in den Hintergrund."
+
+# variable_help
+#~ msgid "BASH_VERSION The version numbers of this Bash."
+#~ msgstr "BASH_VERSION Versionsnummer der Bash."
+
+#~ msgid "CDPATH A colon separated list of directories to search"
+#~ msgstr ""
+#~ "CDPATH Eine durch Doppelpunkt getrennte Liste von "
+#~ "Verzeichnissen, die"
+
+#~ msgid "\t\twhen the argument to `cd' is not found in the current"
+#~ msgstr "\t\tdurchsucht werden, wenn das Argument von `cd' nicht im"
+
+#~ msgid "\t\tdirectory."
+#~ msgstr "\t\taktuellen Verzeichnis gefunden wird."
+
+#~ msgid ""
+#~ "HISTFILE The name of the file where your command history is stored."
+#~ msgstr "HISTFILE Datei, die den Kommandozeilenspeicher enthält. "
+
+#~ msgid "HISTFILESIZE The maximum number of lines this file can contain."
+#~ msgstr ""
+#~ "HISTFILESIZE Maximale Zeilenanzahl, die diese Datei enthalten darf."
+
+#~ msgid "HISTSIZE The maximum number of history lines that a running"
+#~ msgstr ""
+#~ "HISTSIZE Maximale Anzahl von Zeilen, auf die der Historymechanismus"
+
+#~ msgid "\t\tshell can access."
+#~ msgstr "\t\tder Shell zurückgreifen kann."
+
+#~ msgid "HOME The complete pathname to your login directory."
+#~ msgstr "HOME Heimatverzeichnis des aktuellen Benutzers."
+
+#~ msgid ""
+#~ "HOSTTYPE The type of CPU this version of Bash is running under."
+#~ msgstr ""
+#~ "HOSTTYPE CPU-Typ des Rechners, auf dem die Bash gegenwärtig läuft."
+
+#~ msgid ""
+#~ "IGNOREEOF Controls the action of the shell on receipt of an EOF"
+#~ msgstr ""
+#~ "IGNOREEOF Legt die Reaktion der Shell auf ein EOF-Zeichen fest."
+
+#~ msgid "\t\tcharacter as the sole input. If set, then the value"
+#~ msgstr "\t\tWenn die Variable eine ganze Zahl enthält, wird diese Anzahl"
+
+#~ msgid "\t\tof it is the number of EOF characters that can be seen"
+#~ msgstr "\t\tEOF Zeichen (Ctrl-D) abgewartet, bis die Shell verlassen wird."
+
+#~ msgid "\t\tin a row on an empty line before the shell will exit"
+#~ msgstr "\t\tDer Vorgabewert ist 10. Ist IGNOREEOF nicht gesetzt,"
+
+#~ msgid "\t\t(default 10). When unset, EOF signifies the end of input."
+#~ msgstr "\t\tsignalisiert EOF das Ende der Eingabe."
+
+#~ msgid "MAILCHECK\tHow often, in seconds, Bash checks for new mail."
+#~ msgstr ""
+#~ "MAILCHECK\tZeitintervall [s], in dem nach angekommener Post gesucht wird."
+
+#~ msgid "MAILPATH\tA colon-separated list of filenames which Bash checks"
+#~ msgstr ""
+#~ "MAILPATH\tEine durch Doppelpunkt getrennte Liste von Dateien, die nach"
+
+#~ msgid "\t\tfor new mail."
+#~ msgstr "\t\tneu angekommener Post durchsucht werden."
+
+#~ msgid "OSTYPE\t\tThe version of Unix this version of Bash is running on."
+#~ msgstr ""
+#~ "OSTYPE\t\tBetriebssystemversion, auf der die Bash gegenwärtig läuft."
+
+#~ msgid "PATH A colon-separated list of directories to search when"
+#~ msgstr "PATH\t\tDurch Doppelpunkt getrennte Liste von Verzeichnissen, die "
+
+#~ msgid "\t\tlooking for commands."
+#~ msgstr "\t\tnach Kommandos durchsucht werden."
+
+#~ msgid "PROMPT_COMMAND A command to be executed before the printing of each"
+#~ msgstr ""
+#~ "PROMPT_COMMAND Kommando, das vor der Anzeige einer primären "
+#~ "Eingabeaufforderung"
+
+#~ msgid "\t\tprimary prompt."
+#~ msgstr "\t\t(PS1) ausgeführt wird."
+
+#~ msgid "PS1 The primary prompt string."
+#~ msgstr ""
+#~ "PS1 Zeichenkette, die die primäre Eingabeaufforderung enthält."
+
+#~ msgid "PS2 The secondary prompt string."
+#~ msgstr ""
+#~ "PS2 Zeichenkette, die die sekundäre Eingabeaufforderung "
+#~ "enthält."
+
+#~ msgid "TERM The name of the current terminal type."
+#~ msgstr "TERM Name des aktuellen Terminaltyps."
+
+#~ msgid "auto_resume Non-null means a command word appearing on a line by"
+#~ msgstr ""
+#~ "auto_resume Ein Wert ungleich Null bewirkt, daß ein einzelnes "
+#~ "Kommando auf"
+
+#~ msgid "\t\titself is first looked for in the list of currently"
+#~ msgstr "\t\teiner Zeile zunächst in der Liste gegenwärtig gestoppter Jobs"
+
+#~ msgid "\t\tstopped jobs. If found there, that job is foregrounded."
+#~ msgstr "\t\tgesucht und dieser in den Vordergrund geholt wird. `exact'"
+
+#~ msgid "\t\tA value of `exact' means that the command word must"
+#~ msgstr "\t\tbewirkt, daß das Kommando genau dem Kommando in der"
+
+#~ msgid "\t\texactly match a command in the list of stopped jobs. A"
+#~ msgstr "\t\tListe der gestoppten Jobs entsprechen muß. Wenn die Variable"
+
+#~ msgid "\t\tvalue of `substring' means that the command word must"
+#~ msgstr "\t\tden Wert `substring' enthält, muß das Kommando einem Substring"
+
+#~ msgid "\t\tmatch a substring of the job. Any other value means that"
+#~ msgstr "\t\tder Jobbezeichnung entsprechen. Bei einem anderen Wert müssen"
+
+#~ msgid "\t\tthe command must be a prefix of a stopped job."
+#~ msgstr "\t\tdie ersten Zeichen übereinstimmen."
+
+#~ msgid "command_oriented_history"
+#~ msgstr "command_oriented_history"
+
+#~ msgid ""
+#~ " Non-null means to save multiple-line commands together on"
+#~ msgstr "\t\tMehrzeilige Kommandos werden im Kommandozeilenspeicher in einer"
+
+#~ msgid " a single history line."
+#~ msgstr "\t\tZeile abgelegt, wenn die Variable ungleich Null gesetzt ist."
+
+#~ msgid "histchars Characters controlling history expansion and quick"
+#~ msgstr ""
+#~ "histchars Zeichen, die die Befehlswiederholung und die "
+#~ "Schnellersetzung"
+
+#~ msgid "\t\tsubstitution. The first character is the history"
+#~ msgstr "\t\tsteuern. An erster Stelle steht das Befehlswiederholungszeichen"
+
+#~ msgid "\t\tsubstitution character, usually `!'. The second is"
+#~ msgstr "\t\t(normalerweise `!'); an zweiter das `Schnell-Ersetzen-Zeichen'"
+
+#~ msgid "\t\tthe `quick substitution' character, usually `^'. The"
+#~ msgstr "\t\t(normalerweise `^'). Das dritte Zeichen ist das"
+
+#~ msgid "\t\tthird is the `history comment' character, usually `#'."
+#~ msgstr "\t\t`Kommentarzeichen' (normalerweise `#')."
+
+#~ msgid "HISTCONTROL\tSet to a value of `ignorespace', it means don't enter"
+#~ msgstr "HISTCONTROL\tGesetzt auf `ignorespace' werden keine mit einem"
+
+#~ msgid "\t\tlines which begin with a space or tab on the history"
+#~ msgstr ""
+#~ "\t\tLeerzeichen oder Tabulator beginnenden Zeilen im Kommandospeicher"
+
+#~ msgid "\t\tlist. Set to a value of `ignoredups', it means don't"
+#~ msgstr "\t\tabgelegt. Der Wert `ignoredups' verhindert das Speichern"
+
+#~ msgid "\t\tenter lines which match the last entered line. Set to"
+#~ msgstr "\t\taufeinanderfolgender identischer Zeilen. `ignoreboth'"
+
+#~ msgid "\t\t`ignoreboth' means to combine the two options. Unset,"
+#~ msgstr "\t\tkombiniert beide Einstellungen. Wenn die Variable"
+
+#~ msgid "\t\tor set to any other value than those above means to save"
+#~ msgstr "\t\tnicht oder auf einen anderen Wert gesetzt ist, werden alle"
+
+#~ msgid "\t\tall lines on the history list."
+#~ msgstr "\t\teingegebenen Zeilen im Kommandospeicher abgelegt."
+
+# pushd
+#~ msgid "Adds a directory to the top of the directory stack, or rotates"
+#~ msgstr ""
+#~ "Legt ein Verzeichnisnamen auf den Verzeichnisstapel oder rotiert diesen "
+#~ "so,"
+
+# Gibt's denn auch andere als "aktuelle" Arbeitsverzeichnisse?
+# "Arbeit" impliziert .m.E. "aktuell"
+# ck
+#~ msgid "the stack, making the new top of the stack the current working"
+#~ msgstr "daß das Arbeitsverzeichnis auf der Spitze des Stapels liegt. Ohne"
+
+#~ msgid "directory. With no arguments, exchanges the top two directories."
+#~ msgstr ""
+#~ "Argumente werden die obersten zwei Verzeichnisse auf dem Stapel "
+#~ "vertauscht."
+
+#~ msgid "+N\tRotates the stack so that the Nth directory (counting"
+#~ msgstr ""
+#~ "+N\tRotiert den Stapel so, daß das N'te Verzeichnis (angezeigt von `dirs',"
+
+#~ msgid "\tfrom the left of the list shown by `dirs') is at the top."
+#~ msgstr "gezählt von links) sich an der Spitze des Stapels befindet."
+
+#~ msgid "-N\tRotates the stack so that the Nth directory (counting"
+#~ msgstr ""
+#~ "-N\tRotiert den Stapel so, daß das N'te Verzeichnis (angezeigt von `dirs',"
+
+#~ msgid "\tfrom the right) is at the top."
+#~ msgstr "gezählt von rechts) sich an der Spitze des Stapels befindet."
+
+#~ msgid "-n\tsuppress the normal change of directory when adding directories"
+#~ msgstr "-n\tunterdrückt das Wechseln in das Verzeichnis beim Hinzufügen zum"
+
+#~ msgid "\tto the stack, so only the stack is manipulated."
+#~ msgstr "\tStapel, so daß nur der Stapel verändert wird."
+
+#~ msgid "dir\tadds DIR to the directory stack at the top, making it the"
+#~ msgstr "DIR\tLegt DIR auf die Spitze des Verzeichnisstapels und wechselt"
+
+#~ msgid "You can see the directory stack with the `dirs' command."
+#~ msgstr ""
+#~ "Der Verzeichnisstapel kann mit dem Kommando `dirs' angezeigt werden."
+
+# pushd
+#~ msgid "Removes entries from the directory stack. With no arguments,"
+#~ msgstr ""
+#~ "Entfernt Einträge vom Verzeichnisstapel. Ohne Argumente wird die Spitze "
+#~ "des"
+
+#~ msgid "removes the top directory from the stack, and cd's to the new"
+#~ msgstr "Stapels entfernt und in das Verzeichnis gewechselt, das dann an der"
+
+#~ msgid "+N\tremoves the Nth entry counting from the left of the list"
+#~ msgstr ""
+#~ "+N\tEntfernt den N'ten Eintrag vom Stapel, gezählt von Null von der "
+#~ "Liste,"
+
+#~ msgid "\tshown by `dirs', starting with zero. For example: `popd +0'"
+#~ msgstr "\tdie `dirs' anzeigt. Beispielsweise entfernen `popd +0' das"
+
+#~ msgid "\tremoves the first directory, `popd +1' the second."
+#~ msgstr "\terste Verzeichnis und `popd +1' das zweite."
+
+#~ msgid "-N\tremoves the Nth entry counting from the right of the list"
+#~ msgstr ""
+#~ "-N\tEntfernt den N'ten Eintrag vom Stapel, beginend rechts bei Null in der"
+
+#~ msgid "\tshown by `dirs', starting with zero. For example: `popd -0'"
+#~ msgstr "\tListe, die `dirs' angeigt. Beispielsweise entfernen `popd -0'"
+
+#~ msgid "\tremoves the last directory, `popd -1' the next to last."
+#~ msgstr "\tdas letzte Verzeichnis und `popd -1' das vorletzte."
+
+#~ msgid ""
+#~ "-n\tsuppress the normal change of directory when removing directories"
+#~ msgstr ""
+#~ "-n\tVerhindert das Wechseln des Arbeitsverzeichnisses wenn Verzeichnisse"
+
+#~ msgid "\tfrom the stack, so only the stack is manipulated."
+#~ msgstr "\tvom Stapel entfernt werden, so daß nur der Stapel verändert wird."
diff --git a/po/en@boldquot.gmo b/po/en@boldquot.gmo
new file mode 100644
index 0000000..418ce9b
--- /dev/null
+++ b/po/en@boldquot.gmo
Binary files differ
diff --git a/po/en@boldquot.header b/po/en@boldquot.header
new file mode 100644
index 0000000..fedb6a0
--- /dev/null
+++ b/po/en@boldquot.header
@@ -0,0 +1,25 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
+# This catalog furthermore displays the text between the quotation marks in
+# bold face, assuming the VT100/XTerm escape sequences.
+#
diff --git a/po/en@boldquot.po b/po/en@boldquot.po
new file mode 100644
index 0000000..c5b1461
--- /dev/null
+++ b/po/en@boldquot.po
@@ -0,0 +1,5474 @@
+# English translations for GNU bash package.
+# Copyright (C) 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the GNU bash package.
+# Automatically generated, 2009.
+#
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
+# This catalog furthermore displays the text between the quotation marks in
+# bold face, assuming the VT100/XTerm escape sequences.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU bash 4.1-release\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2009-12-30 08:25-0500\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "bad array subscript"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr "%s: cannot convert indexed to associative array"
+
+#: arrayfunc.c:480
+#, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: invalid associative array key"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: cannot assign to non-numeric index"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr "%s: %s: must use subscript when assigning associative array"
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: cannot create: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr "bash_execute_unix_command: cannot find keymap for command"
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: first non-whitespace character is not ‘\"’"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "no closing ‘%c’ in %s"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: missing colon separator"
+
+#: builtins/alias.def:132
+#, c-format
+msgid "`%s': invalid alias name"
+msgstr "‘%s’: invalid alias name"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr "line editing not enabled"
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "‘%s’: invalid keymap name"
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: cannot read: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "‘%s’: cannot unbind"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "‘%s’: unknown function name"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s is not bound to any keys.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s can be invoked via "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr "loop count"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "only meaningful in a ‘for’, ‘while’, or ‘until’ loop"
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+". With EXPR, returns\n"
+" "
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "HOME not set"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "OLDPWD not set"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr "line %d: "
+
+#: builtins/common.c:139 error.c:261
+#, c-format
+msgid "warning: "
+msgstr "warning: "
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr "%s: usage: "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "too many arguments"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: option requires an argument"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: numeric argument required"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: not found"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: invalid option"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: invalid option name"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "‘%s’: not a valid identifier"
+
+#: builtins/common.c:238
+msgid "invalid octal number"
+msgstr "invalid octal number"
+
+#: builtins/common.c:240
+msgid "invalid hex number"
+msgstr "invalid hex number"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "invalid number"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: invalid signal specification"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "‘%s’: not a pid or valid job spec"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: readonly variable"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s out of range"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "argument"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s out of range"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: no such job"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: no job control"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "no job control"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: restricted"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "restricted"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: not a shell builtin"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "write error: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr "error setting terminal attributes: %s"
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr "error getting terminal attributes: %s"
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: error retrieving current directory: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: ambiguous job spec"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: invalid action name"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: no completion specification"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "warning: -F option may not work as you expect"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "warning: -C option may not work as you expect"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr "not currently executing completion function"
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "can only be used in a function"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "cannot use ‘-f’ to make functions"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: readonly function"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: cannot destroy array variables in this way"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr "%s: cannot convert associative to indexed array"
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "dynamic loading not available"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "cannot open shared object %s: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "cannot find %s in shared object %s: %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: not dynamically loaded"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: cannot delete: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: is a directory"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: not a regular file"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: file is too large"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: cannot execute binary file"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: cannot execute: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr "logout\n"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "not login shell: use ‘exit’"
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "There are stopped jobs.\n"
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr "There are running jobs.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "no command found"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "history specification"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: cannot open temp file: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr "current"
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "job %d started without job control"
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: illegal option -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: option requires an argument -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "hashing disabled"
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: hash table empty\n"
+
+#: builtins/hash.def:244
+#, c-format
+msgid "hits\tcommand\n"
+msgstr "hits\tcommand\n"
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Shell commands matching keyword `"
+msgstr[1] "Shell commands matching keywords `"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"no help topics match ‘%s’. Try ‘help help’ or ‘man -k %s’ "
+"or ‘info %s’."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: cannot open: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"These shell commands are defined internally. Type ‘help’ to see this "
+"list.\n"
+"Type ‘help name’ to find out more about the function ‘name’.\n"
+"Use ‘info bash’ to find out more about the shell in general.\n"
+"Use ‘man -k’ or ‘info’ to find out more about commands not in "
+"this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "cannot use more than one of -anrw"
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "history position"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: history expansion failed"
+
+#: builtins/inlib.def:71
+#, c-format
+msgid "%s: inlib failed"
+msgstr "%s: inlib failed"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "no other options allowed with ‘-x’"
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: arguments must be process or job IDs"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Unknown error"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "expression expected"
+
+#: builtins/mapfile.def:165
+#, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: not an indexed array"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: invalid file descriptor specification"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: invalid file descriptor: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, c-format
+msgid "%s: invalid line count"
+msgstr "%s: invalid line count"
+
+#: builtins/mapfile.def:277
+#, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: invalid array origin"
+
+#: builtins/mapfile.def:294
+#, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: invalid callback quantum"
+
+#: builtins/mapfile.def:326
+msgid "empty array variable name"
+msgstr "empty array variable name"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr "array variable support required"
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "‘%s’: missing format character"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "‘%c’: invalid format character"
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr "warning: %s: %s"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "missing hex digit for \\x"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "no other directory"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<no current directory>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr "directory stack empty"
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr "directory stack index"
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the ‘pushd’ command; you can "
+"get\n"
+" back up through the list with the ‘popd’ command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by ‘dirs’, starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by ‘dirs’, starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The ‘dirs’ builtin displays the directory stack."
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by ‘dirs’, starting with zero. For example: ‘popd +0"
+"[0m’\n"
+" \tremoves the first directory, ‘popd +1’ the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by ‘dirs’, starting with zero. For example: ‘popd -0"
+"[0m’\n"
+" \tremoves the last directory, ‘popd -1’ the next to last.\n"
+" \n"
+" The ‘dirs’ builtin displays the directory stack."
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: invalid timeout specification"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "read error: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr "can only ‘return’ from a function or sourced script"
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "cannot simultaneously unset a function and a variable"
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: cannot unset"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: cannot unset: readonly %s"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: not an array variable"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: not a function"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "shift count"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr "cannot set and unset shell options simultaneously"
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: invalid shell option name"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "filename argument required"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: file not found"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "cannot suspend"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "cannot suspend a login shell"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "%s is aliased to ‘%s’\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s is a shell keyword\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s is a function\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "%s is a shell builtin\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s is %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "%s is hashed (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s: invalid limit argument"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "‘%c’: bad command"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: cannot get limit: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr "limit"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: cannot modify limit: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "octal number"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "‘%c’: invalid symbolic mode operator"
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "‘%c’: invalid symbolic mode character"
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr " line "
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "last command: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "Aborting..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "unknown command error"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "bad command type"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "bad connector"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "bad jump"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: unbound variable"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "timed out waiting for input: auto-logout\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "cannot redirect standard input from /dev/null: %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "TIMEFORMAT: ‘%c’: invalid format character"
+
+#: execute_cmd.c:2075
+msgid "pipe error"
+msgstr "pipe error"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: restricted: cannot specify ‘/’ in command names"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: command not found"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: bad interpreter"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "cannot duplicate fd %d to fd %d"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "expression recursion level exceeded"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "recursion stack underflow"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "syntax error in expression"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "attempted assignment to non-variable"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "division by 0"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "bug: bad expassign token"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "‘:’ expected for conditional expression"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "exponent less than 0"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr "identifier expected after pre-increment or pre-decrement"
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "missing ‘)’"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "syntax error: operand expected"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "syntax error: invalid arithmetic operator"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s%s%s: %s (error token is “%sâ€)"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "invalid arithmetic base"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "value too great for base"
+
+#: expr.c:1329
+#, c-format
+msgid "%s: expression error\n"
+msgstr "%s: expression error\n"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getcwd: cannot access parent directories"
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "cannot reset nodelay mode for fd %d"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr "cannot allocate new file descriptor for bash input from fd %d"
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "save_bash_input: buffer already exists for new fd %d"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr "start_pipeline: pgrp pipe"
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr "forked pid %d appears in running job %d"
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "deleting stopped job %d with process group %ld"
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr "add_process: process %5ld (%s) in the_pipeline"
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr "add_process: pid %5ld (%s) marked as still alive"
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: %ld: no such pid"
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr "Signal %d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Done"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Stopped"
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr "Stopped(%s)"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "Running"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Done(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "Exit %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Unknown status"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(core dumped) "
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr " (wd: %s)"
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "child setpgid (%ld to %ld)"
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait: pid %ld is not a child of this shell"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "wait_for: No record of process %ld"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job: job %d is stopped"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: job has terminated"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: job %d already in background"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr "waitchld: turning on WNOHANG to avoid indefinite block"
+
+#: jobs.c:3508
+#, c-format
+msgid "%s: line %d: "
+msgstr "%s: line %d: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr " (core dumped)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(wd now: %s)\n"
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_job_control: getpgrp failed"
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_job_control: line discipline"
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_job_control: setpgid"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr "cannot set terminal process group (%d)"
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "no job control in this shell"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc: failed assertion: %s\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+
+#: lib/malloc/malloc.c:313
+msgid "unknown"
+msgstr "unknown"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr "malloc: block on free list clobbered"
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free: called with already freed block argument"
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free: called with unallocated block argument"
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr "free: underflow detected; mh_nbytes out of range"
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free: start and end chunk sizes differ"
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc: called with unallocated block argument"
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr "realloc: underflow detected; mh_nbytes out of range"
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "realloc: start and end chunk sizes differ"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr "register_alloc: alloc table is full with FIND_ALLOC?\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr "register_alloc: %p already in table as allocated?\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "register_free: %p already in table as free?\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "invalid base"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: host unknown"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: invalid service"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: bad network path specification"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "network operations not supported"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr "setlocale: LC_ALL: cannot change locale (%s)"
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr "setlocale: LC_ALL: cannot change locale (%s): %s"
+
+#: locale.c:247
+#, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "setlocale: %s: cannot change locale (%s)"
+
+#: locale.c:249
+#, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "setlocale: %s: cannot change locale (%s): %s"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "You have mail in $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "You have new mail in $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "The mail in %s has been read\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "syntax error: arithmetic expression required"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "syntax error: ‘;’ unexpected"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "syntax error: ‘((%s))’"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: bad instruction type %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr "here-document at line %d delimited by end-of-file (wanted ‘%s’)"
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr "make_redirection: redirection instruction ‘%d’ out of range"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "unexpected EOF while looking for matching ‘%c’"
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "unexpected EOF while looking for ‘]]’"
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "syntax error in conditional expression: unexpected token ‘%s’"
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "syntax error in conditional expression"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "unexpected token ‘%s’, expected ‘)’"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "expected ‘)’"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "unexpected argument ‘%s’ to conditional unary operator"
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "unexpected argument to conditional unary operator"
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "unexpected token ‘%s’, conditional binary operator expected"
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "conditional binary operator expected"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "unexpected argument ‘%s’ to conditional binary operator"
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "unexpected argument to conditional binary operator"
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "unexpected token ‘%c’ in conditional command"
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "unexpected token ‘%s’ in conditional command"
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "unexpected token %d in conditional command"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "syntax error near unexpected token ‘%s’"
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "syntax error near ‘%s’"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "syntax error: unexpected end of file"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "syntax error"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Use “%s†to leave the shell.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "unexpected EOF while looking for matching ‘)’"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "completion: function ‘%s’ not found"
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr "progcomp_insert: %s: NULL COMPSPEC"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: bad connector ‘%d’"
+
+#: print_cmd.c:363
+#, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "xtrace_set: %d: invalid file descriptor"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr "xtrace_set: NULL file pointer"
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr "xtrace fd (%d) != fileno xtrace fp (%d)"
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "cprintf: ‘%c’: invalid format character"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "file descriptor out of range"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: ambiguous redirect"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: cannot overwrite existing file"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: restricted: cannot redirect output"
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "cannot create temp file for here-document: %s"
+
+#: redir.c:184
+#, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: cannot assign fd to variable"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "/dev/(tcp|udp)/host/port not supported without networking"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "redirection error: cannot duplicate fd"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "could not find /tmp, please create!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "/tmp must be a valid directory name"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: invalid option"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "I have no name!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU bash, version %s-(%s)\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "GNU long options:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Shell options:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s or -o option\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"Type ‘%s -c “help set‒ for more information about shell "
+"options.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"Type ‘%s -c help’ for more information about shell builtin commands.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "Use the ‘bashbug’ command to report bugs.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d: invalid operation"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Bogus signal"
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Hangup"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Interrupt"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "Quit"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Illegal instruction"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "BPT trace/trap"
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "ABORT instruction"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "EMT instruction"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Floating point exception"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "Killed"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "Bus error"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Segmentation fault"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Bad system call"
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "Broken pipe"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Alarm clock"
+
+#: siglist.c:111
+msgid "Terminated"
+msgstr "Terminated"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "Urgent IO condition"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Stopped (signal)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "Continue"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "Child death or stop"
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Stopped (tty input)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Stopped (tty output)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "I/O ready"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "CPU limit"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "File limit"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "Alarm (virtual)"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "Alarm (profile)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Window changed"
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr "Record lock"
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "User signal 1"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "User signal 2"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "HFT input data pending"
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "power failure imminent"
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "system crash imminent"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "migrate process to another CPU"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "programming error"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "HFT monitor mode granted"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "HFT monitor mode retracted"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "HFT sound sequence has completed"
+
+#: siglist.c:215
+msgid "Information request"
+msgstr "Information request"
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Unknown Signal #"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Unknown Signal #%d"
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "bad substitution: no closing ‘%s’ in %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: cannot assign list to array member"
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "cannot make pipe for process substitution"
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "cannot make child for process substitution"
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "cannot open named pipe %s for reading"
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "cannot open named pipe %s for writing"
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "cannot duplicate named pipe %s as fd %d"
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "cannot make pipe for command substitution"
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr "cannot make child for command substitution"
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "command_substitute: cannot duplicate pipe as fd 1"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: parameter null or not set"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: substring expression < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: bad substitution"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: cannot assign in this way"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+
+#: subst.c:7839
+#, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "bad substitution: no closing “`†in %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "no match: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "argument expected"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: integer expression expected"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "‘)’ expected"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "‘)’ expected, found %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: unary operator expected"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: binary operator expected"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "missing ‘]’"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "invalid signal number"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps: bad value in trap_list[%d]: %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: bad signal %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "error importing function definition for ‘%s’"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "shell level (%d) too high, resetting to 1"
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr "make_local_variable: no function context at current scope"
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr "all_local_variables: no function context at current scope"
+
+#: variables.c:3376
+#, c-format
+msgid "%s has null exportstr"
+msgstr "%s has null exportstr"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "invalid character %d in exportstr for %s"
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "no ‘=’ in exportstr for %s"
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr "pop_var_context: head of shell_variables not a function context"
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr "pop_var_context: no global_variables context"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr "pop_scope: head of shell_variables not a temporary environment scope"
+
+#: variables.c:4678
+#, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: %s: cannot open as FILE"
+
+#: variables.c:4683
+#, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%s: %s: invalid value for trace file descriptor"
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Copyright (C) 2009 Free Software Foundation, Inc."
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU bash, version %s (%s)\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr "This is free software; you are free to change and redistribute it.\n"
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr "There is NO WARRANTY, to the extent permitted by law.\n"
+
+#: version2.c:86
+#, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+
+#: version2.c:87
+#, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+
+#: xmalloc.c:91
+#, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+
+#: xmalloc.c:93
+#, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "%s: cannot allocate %lu bytes"
+
+#: xmalloc.c:163
+#, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+
+#: xmalloc.c:165
+#, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "%s: %s:%d: cannot allocate %lu bytes"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [name[=value] ... ]"
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] name [name ...]"
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [n]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [n]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [shell-builtin [arg ...]]"
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr "caller [expr]"
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-L|-P] [dir]"
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr "pwd [-LP]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr "true"
+
+#: builtins.c:72
+msgid "false"
+msgstr "false"
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] command [arg ...]"
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-aAfFilrtux] [-p] name[=value] ..."
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr "local [option] name[=value] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [arg ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [arg ...]"
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-a] [-dnps] [-f filename] [name ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [arg ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts optstring name [arg]"
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [n]"
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr "logout [n]"
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [job_spec]"
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr "bg [job_spec ...]"
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-lr] [-p pathname] [-dt] [name ...]"
+
+#: builtins.c:117
+msgid "help [-dms] [pattern ...]"
+msgstr "help [-dms] [pattern ...]"
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [-h] [-ar] [jobspec ...]"
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let arg [arg ...]"
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [name ...]"
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-fn] [name[=value] ...] or export -p"
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-af] [name[=value] ...] or readonly -p"
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr "shift [n]"
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr "source filename [arguments]"
+
+#: builtins.c:152
+msgid ". filename [arguments]"
+msgstr ". filename [arguments]"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [expr]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ arg... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "times"
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [-lp] [[arg] signal_spec ...]"
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-afptP] name [name ...]"
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-p] [-S] [mode]"
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr "wait [id]"
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr "wait [pid]"
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for NAME [in WORDS ... ] ; do COMMANDS; done"
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select NAME [in WORDS ... ;] do COMMANDS; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr "time [-p] pipeline"
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while COMMANDS; do COMMANDS; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until COMMANDS; do COMMANDS; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr "coproc [NAME] command [redirections]"
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "function name { COMMANDS ; } or name () { COMMANDS ; }"
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr "{ COMMANDS ; }"
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr "job_spec [&]"
+
+#: builtins.c:206
+msgid "(( expression ))"
+msgstr "(( expression ))"
+
+#: builtins.c:208
+msgid "[[ expression ]]"
+msgstr "[[ expression ]]"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr "variables - Names and meanings of some shell variables"
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [-n] [+N | -N | dir]"
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [-n] [+N | -N]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o] [optname ...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr "printf [-v var] format [arguments]"
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+
+#: builtins.c:237
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "compopt [-o|+o option] [-DE] [name ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, ‘alias’ prints the list of aliases in the "
+"reusable\n"
+" form ‘alias NAME=VALUE’ on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '“\\C-x\\C-râ€: re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns “$line $filenameâ€. With EXPR, returns\n"
+" “$line $subroutine $filenameâ€; this extra information can be used "
+"to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option ‘cdable_vars’ "
+"is set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if ‘-L’ were "
+"specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, ‘pwd’ behaves as if ‘-L’ were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the ‘type’ "
+"builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the ‘integer’ attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the ‘trace’ attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using ‘+’ instead of ‘-’ turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the ‘let’ command) performed when the variable is assigned a "
+"value.\n"
+" \n"
+" When used in a function, ‘declare’ makes NAMEs local, as with the "
+"‘local’\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See ‘help declare’."
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by ‘declare’.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" ‘echo’ interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix ‘special’ builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the ‘test’ found in $PATH instead of the shell builtin\n"
+" version, type ‘enable -n test’.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ‘:’ into NAME "
+"and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places ‘?’ "
+"into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a ‘?"
+"[0m’\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option ‘execfail’ is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the ‘fc -s [pat=rep ...] [command]’ format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing ‘r cc"
+"[0m’\n"
+" runs the last command beginning with ‘cc’ and typing ‘r’ re-"
+"executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with ‘&’. If JOB_SPEC is not present, the "
+"shell's notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a ‘*’. An argument of N lists only the last N "
+"entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow ‘-l’ they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+
+#: builtins.c:966
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see ‘readonly’.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of ‘--’ disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of ‘--’ disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its ‘sticky’ bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the “test†builtin, but the last argument "
+"must\n"
+" be a literal ‘]’, to match the opening ‘[’."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or ‘-’, each specified signal is reset to its "
+"original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with “kill -signal $$â€.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe ‘-p’ option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if ‘type -t NAME’ would not return ‘file’.\n"
+" -t\toutput a single word which is one of ‘alias’, ‘keyword"
+"[0m’,\n"
+" \t‘function’, ‘builtin’, ‘file’ or ‘’, if NAME "
+"is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the ‘soft’ resource limit\n"
+" -H\tuse the ‘hard’ resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (‘nice’)\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values ‘soft’, ‘hard’, and ‘unlimited’ "
+"stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The ‘for’ loop executes a sequence of commands for each member in "
+"a\n"
+" list of items. If ‘in WORDS ...;’ is not present, then ‘in “"
+"$@‒ is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If ‘in WORDS’ is not present, ‘in “$@"
+"[0m‒\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" ‘|’ is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Execute commands based on conditional.\n"
+" \n"
+" The ‘if COMMANDS’ list is executed. If its exit status is zero, "
+"then the\n"
+" ‘then COMMANDS’ list is executed. Otherwise, each ‘elif "
+"COMMANDS’ list is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" ‘then COMMANDS’ list is executed and the if command completes. "
+"Otherwise,\n"
+" the ‘else COMMANDS’ list is executed, if present. The exit status "
+"of the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" ‘while’ COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" ‘until’ COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is “COPROCâ€.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the ‘fg’ command. Resume "
+"a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a ‘&’ places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to ‘bg’.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to “let EXPRESSIONâ€.\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the ‘test’ builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the ‘==’ and ‘!=’ operators are used, the string to the "
+"right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the ‘=~’ operator is used, the string to the right of the "
+"operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to ‘cd’.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t‘time’ reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of ‘exact’ means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of ‘substring’ means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually ‘!’. The second is\n"
+" \t\tthe ‘quick substitution’ character, usually ‘^’. The\n"
+" \t\tthird is the ‘history comment’ character, usually ‘#’.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by ‘dirs’, starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by ‘dirs’, starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The ‘dirs’ builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by ‘dirs’, starting with zero. For example: ‘popd +0"
+"[0m’\n"
+" \tremoves the first directory, ‘popd +1’ the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by ‘dirs’, starting with zero. For example: ‘popd -0"
+"[0m’\n"
+" \tremoves the last directory, ‘popd -1’ the next to last.\n"
+" \n"
+" The ‘dirs’ builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the ‘pushd’ command; you can "
+"get\n"
+" back up through the list with the ‘popd’ command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with ‘set -o’\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to “empty†commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the “default†command completion\n"
+" \t-E\t\tChange options for the “empty†command completion\n"
+" \n"
+" Using ‘+o’ instead of ‘-o’ turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the ‘complete’ builtin. If no "
+"NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for ‘mapfile’."
diff --git a/po/en@quot.gmo b/po/en@quot.gmo
new file mode 100644
index 0000000..dfd93eb
--- /dev/null
+++ b/po/en@quot.gmo
Binary files differ
diff --git a/po/en@quot.header b/po/en@quot.header
new file mode 100644
index 0000000..a9647fc
--- /dev/null
+++ b/po/en@quot.header
@@ -0,0 +1,22 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
diff --git a/po/en@quot.po b/po/en@quot.po
new file mode 100644
index 0000000..557d400
--- /dev/null
+++ b/po/en@quot.po
@@ -0,0 +1,5436 @@
+# English translations for GNU bash package.
+# Copyright (C) 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the GNU bash package.
+# Automatically generated, 2009.
+#
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU bash 4.1-release\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2009-12-30 08:25-0500\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "bad array subscript"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr "%s: cannot convert indexed to associative array"
+
+#: arrayfunc.c:480
+#, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: invalid associative array key"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: cannot assign to non-numeric index"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr "%s: %s: must use subscript when assigning associative array"
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: cannot create: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr "bash_execute_unix_command: cannot find keymap for command"
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: first non-whitespace character is not ‘\"’"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "no closing ‘%c’ in %s"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: missing colon separator"
+
+#: builtins/alias.def:132
+#, c-format
+msgid "`%s': invalid alias name"
+msgstr "‘%s’: invalid alias name"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr "line editing not enabled"
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "‘%s’: invalid keymap name"
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: cannot read: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "‘%s’: cannot unbind"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "‘%s’: unknown function name"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s is not bound to any keys.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s can be invoked via "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr "loop count"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "only meaningful in a ‘for’, ‘while’, or ‘until’ loop"
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+". With EXPR, returns\n"
+" "
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "HOME not set"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "OLDPWD not set"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr "line %d: "
+
+#: builtins/common.c:139 error.c:261
+#, c-format
+msgid "warning: "
+msgstr "warning: "
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr "%s: usage: "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "too many arguments"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: option requires an argument"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: numeric argument required"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: not found"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: invalid option"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: invalid option name"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "‘%s’: not a valid identifier"
+
+#: builtins/common.c:238
+msgid "invalid octal number"
+msgstr "invalid octal number"
+
+#: builtins/common.c:240
+msgid "invalid hex number"
+msgstr "invalid hex number"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "invalid number"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: invalid signal specification"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "‘%s’: not a pid or valid job spec"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: readonly variable"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s out of range"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "argument"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s out of range"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: no such job"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: no job control"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "no job control"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: restricted"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "restricted"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: not a shell builtin"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "write error: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr "error setting terminal attributes: %s"
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr "error getting terminal attributes: %s"
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: error retrieving current directory: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: ambiguous job spec"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: invalid action name"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: no completion specification"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "warning: -F option may not work as you expect"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "warning: -C option may not work as you expect"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr "not currently executing completion function"
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "can only be used in a function"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "cannot use ‘-f’ to make functions"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: readonly function"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: cannot destroy array variables in this way"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr "%s: cannot convert associative to indexed array"
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "dynamic loading not available"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "cannot open shared object %s: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "cannot find %s in shared object %s: %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: not dynamically loaded"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: cannot delete: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: is a directory"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: not a regular file"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: file is too large"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: cannot execute binary file"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: cannot execute: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr "logout\n"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "not login shell: use ‘exit’"
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "There are stopped jobs.\n"
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr "There are running jobs.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "no command found"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "history specification"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: cannot open temp file: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr "current"
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "job %d started without job control"
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: illegal option -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: option requires an argument -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "hashing disabled"
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: hash table empty\n"
+
+#: builtins/hash.def:244
+#, c-format
+msgid "hits\tcommand\n"
+msgstr "hits\tcommand\n"
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Shell commands matching keyword `"
+msgstr[1] "Shell commands matching keywords `"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"no help topics match ‘%s’. Try ‘help help’ or ‘man -k %s’ or ‘info %s’."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: cannot open: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"These shell commands are defined internally. Type ‘help’ to see this list.\n"
+"Type ‘help name’ to find out more about the function ‘name’.\n"
+"Use ‘info bash’ to find out more about the shell in general.\n"
+"Use ‘man -k’ or ‘info’ to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "cannot use more than one of -anrw"
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "history position"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: history expansion failed"
+
+#: builtins/inlib.def:71
+#, c-format
+msgid "%s: inlib failed"
+msgstr "%s: inlib failed"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "no other options allowed with ‘-x’"
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: arguments must be process or job IDs"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Unknown error"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "expression expected"
+
+#: builtins/mapfile.def:165
+#, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: not an indexed array"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: invalid file descriptor specification"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: invalid file descriptor: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, c-format
+msgid "%s: invalid line count"
+msgstr "%s: invalid line count"
+
+#: builtins/mapfile.def:277
+#, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: invalid array origin"
+
+#: builtins/mapfile.def:294
+#, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: invalid callback quantum"
+
+#: builtins/mapfile.def:326
+msgid "empty array variable name"
+msgstr "empty array variable name"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr "array variable support required"
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "‘%s’: missing format character"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "‘%c’: invalid format character"
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr "warning: %s: %s"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "missing hex digit for \\x"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "no other directory"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<no current directory>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr "directory stack empty"
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr "directory stack index"
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the ‘pushd’ command; you can get\n"
+" back up through the list with the ‘popd’ command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by ‘dirs’, starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by ‘dirs’, starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The ‘dirs’ builtin displays the directory stack."
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by ‘dirs’, starting with zero. For example: ‘popd +0’\n"
+" \tremoves the first directory, ‘popd +1’ the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by ‘dirs’, starting with zero. For example: ‘popd -0’\n"
+" \tremoves the last directory, ‘popd -1’ the next to last.\n"
+" \n"
+" The ‘dirs’ builtin displays the directory stack."
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: invalid timeout specification"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "read error: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr "can only ‘return’ from a function or sourced script"
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "cannot simultaneously unset a function and a variable"
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: cannot unset"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: cannot unset: readonly %s"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: not an array variable"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: not a function"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "shift count"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr "cannot set and unset shell options simultaneously"
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: invalid shell option name"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "filename argument required"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: file not found"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "cannot suspend"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "cannot suspend a login shell"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "%s is aliased to ‘%s’\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s is a shell keyword\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s is a function\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "%s is a shell builtin\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s is %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "%s is hashed (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s: invalid limit argument"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "‘%c’: bad command"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: cannot get limit: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr "limit"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: cannot modify limit: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "octal number"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "‘%c’: invalid symbolic mode operator"
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "‘%c’: invalid symbolic mode character"
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr " line "
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "last command: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "Aborting..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "unknown command error"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "bad command type"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "bad connector"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "bad jump"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: unbound variable"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "timed out waiting for input: auto-logout\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "cannot redirect standard input from /dev/null: %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "TIMEFORMAT: ‘%c’: invalid format character"
+
+#: execute_cmd.c:2075
+msgid "pipe error"
+msgstr "pipe error"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: restricted: cannot specify ‘/’ in command names"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: command not found"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: bad interpreter"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "cannot duplicate fd %d to fd %d"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "expression recursion level exceeded"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "recursion stack underflow"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "syntax error in expression"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "attempted assignment to non-variable"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "division by 0"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "bug: bad expassign token"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "‘:’ expected for conditional expression"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "exponent less than 0"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr "identifier expected after pre-increment or pre-decrement"
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "missing ‘)’"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "syntax error: operand expected"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "syntax error: invalid arithmetic operator"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s%s%s: %s (error token is “%sâ€)"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "invalid arithmetic base"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "value too great for base"
+
+#: expr.c:1329
+#, c-format
+msgid "%s: expression error\n"
+msgstr "%s: expression error\n"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getcwd: cannot access parent directories"
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "cannot reset nodelay mode for fd %d"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr "cannot allocate new file descriptor for bash input from fd %d"
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "save_bash_input: buffer already exists for new fd %d"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr "start_pipeline: pgrp pipe"
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr "forked pid %d appears in running job %d"
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "deleting stopped job %d with process group %ld"
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr "add_process: process %5ld (%s) in the_pipeline"
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr "add_process: pid %5ld (%s) marked as still alive"
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: %ld: no such pid"
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr "Signal %d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Done"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Stopped"
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr "Stopped(%s)"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "Running"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Done(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "Exit %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Unknown status"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(core dumped) "
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr " (wd: %s)"
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "child setpgid (%ld to %ld)"
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait: pid %ld is not a child of this shell"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "wait_for: No record of process %ld"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job: job %d is stopped"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: job has terminated"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: job %d already in background"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr "waitchld: turning on WNOHANG to avoid indefinite block"
+
+#: jobs.c:3508
+#, c-format
+msgid "%s: line %d: "
+msgstr "%s: line %d: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr " (core dumped)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(wd now: %s)\n"
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_job_control: getpgrp failed"
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_job_control: line discipline"
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_job_control: setpgid"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr "cannot set terminal process group (%d)"
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "no job control in this shell"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc: failed assertion: %s\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+
+#: lib/malloc/malloc.c:313
+msgid "unknown"
+msgstr "unknown"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr "malloc: block on free list clobbered"
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free: called with already freed block argument"
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free: called with unallocated block argument"
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr "free: underflow detected; mh_nbytes out of range"
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free: start and end chunk sizes differ"
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc: called with unallocated block argument"
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr "realloc: underflow detected; mh_nbytes out of range"
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "realloc: start and end chunk sizes differ"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr "register_alloc: alloc table is full with FIND_ALLOC?\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr "register_alloc: %p already in table as allocated?\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "register_free: %p already in table as free?\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "invalid base"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: host unknown"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: invalid service"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: bad network path specification"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "network operations not supported"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr "setlocale: LC_ALL: cannot change locale (%s)"
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr "setlocale: LC_ALL: cannot change locale (%s): %s"
+
+#: locale.c:247
+#, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "setlocale: %s: cannot change locale (%s)"
+
+#: locale.c:249
+#, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "setlocale: %s: cannot change locale (%s): %s"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "You have mail in $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "You have new mail in $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "The mail in %s has been read\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "syntax error: arithmetic expression required"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "syntax error: ‘;’ unexpected"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "syntax error: ‘((%s))’"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: bad instruction type %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr "here-document at line %d delimited by end-of-file (wanted ‘%s’)"
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr "make_redirection: redirection instruction ‘%d’ out of range"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "unexpected EOF while looking for matching ‘%c’"
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "unexpected EOF while looking for ‘]]’"
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "syntax error in conditional expression: unexpected token ‘%s’"
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "syntax error in conditional expression"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "unexpected token ‘%s’, expected ‘)’"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "expected ‘)’"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "unexpected argument ‘%s’ to conditional unary operator"
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "unexpected argument to conditional unary operator"
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "unexpected token ‘%s’, conditional binary operator expected"
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "conditional binary operator expected"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "unexpected argument ‘%s’ to conditional binary operator"
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "unexpected argument to conditional binary operator"
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "unexpected token ‘%c’ in conditional command"
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "unexpected token ‘%s’ in conditional command"
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "unexpected token %d in conditional command"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "syntax error near unexpected token ‘%s’"
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "syntax error near ‘%s’"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "syntax error: unexpected end of file"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "syntax error"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Use “%s†to leave the shell.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "unexpected EOF while looking for matching ‘)’"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "completion: function ‘%s’ not found"
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr "progcomp_insert: %s: NULL COMPSPEC"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: bad connector ‘%d’"
+
+#: print_cmd.c:363
+#, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "xtrace_set: %d: invalid file descriptor"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr "xtrace_set: NULL file pointer"
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr "xtrace fd (%d) != fileno xtrace fp (%d)"
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "cprintf: ‘%c’: invalid format character"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "file descriptor out of range"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: ambiguous redirect"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: cannot overwrite existing file"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: restricted: cannot redirect output"
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "cannot create temp file for here-document: %s"
+
+#: redir.c:184
+#, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: cannot assign fd to variable"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "/dev/(tcp|udp)/host/port not supported without networking"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "redirection error: cannot duplicate fd"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "could not find /tmp, please create!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "/tmp must be a valid directory name"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: invalid option"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "I have no name!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU bash, version %s-(%s)\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "GNU long options:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Shell options:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s or -o option\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr "Type ‘%s -c “help setâ€â€™ for more information about shell options.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr "Type ‘%s -c help’ for more information about shell builtin commands.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "Use the ‘bashbug’ command to report bugs.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d: invalid operation"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Bogus signal"
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Hangup"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Interrupt"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "Quit"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Illegal instruction"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "BPT trace/trap"
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "ABORT instruction"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "EMT instruction"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Floating point exception"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "Killed"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "Bus error"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Segmentation fault"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Bad system call"
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "Broken pipe"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Alarm clock"
+
+#: siglist.c:111
+msgid "Terminated"
+msgstr "Terminated"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "Urgent IO condition"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Stopped (signal)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "Continue"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "Child death or stop"
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Stopped (tty input)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Stopped (tty output)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "I/O ready"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "CPU limit"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "File limit"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "Alarm (virtual)"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "Alarm (profile)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Window changed"
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr "Record lock"
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "User signal 1"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "User signal 2"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "HFT input data pending"
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "power failure imminent"
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "system crash imminent"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "migrate process to another CPU"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "programming error"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "HFT monitor mode granted"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "HFT monitor mode retracted"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "HFT sound sequence has completed"
+
+#: siglist.c:215
+msgid "Information request"
+msgstr "Information request"
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Unknown Signal #"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Unknown Signal #%d"
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "bad substitution: no closing ‘%s’ in %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: cannot assign list to array member"
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "cannot make pipe for process substitution"
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "cannot make child for process substitution"
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "cannot open named pipe %s for reading"
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "cannot open named pipe %s for writing"
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "cannot duplicate named pipe %s as fd %d"
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "cannot make pipe for command substitution"
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr "cannot make child for command substitution"
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "command_substitute: cannot duplicate pipe as fd 1"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: parameter null or not set"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: substring expression < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: bad substitution"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: cannot assign in this way"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+
+#: subst.c:7839
+#, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "bad substitution: no closing “`†in %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "no match: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "argument expected"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: integer expression expected"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "‘)’ expected"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "‘)’ expected, found %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: unary operator expected"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: binary operator expected"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "missing ‘]’"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "invalid signal number"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps: bad value in trap_list[%d]: %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: bad signal %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "error importing function definition for ‘%s’"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "shell level (%d) too high, resetting to 1"
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr "make_local_variable: no function context at current scope"
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr "all_local_variables: no function context at current scope"
+
+#: variables.c:3376
+#, c-format
+msgid "%s has null exportstr"
+msgstr "%s has null exportstr"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "invalid character %d in exportstr for %s"
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "no ‘=’ in exportstr for %s"
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr "pop_var_context: head of shell_variables not a function context"
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr "pop_var_context: no global_variables context"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr "pop_scope: head of shell_variables not a temporary environment scope"
+
+#: variables.c:4678
+#, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: %s: cannot open as FILE"
+
+#: variables.c:4683
+#, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%s: %s: invalid value for trace file descriptor"
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Copyright (C) 2009 Free Software Foundation, Inc."
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU bash, version %s (%s)\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr "This is free software; you are free to change and redistribute it.\n"
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr "There is NO WARRANTY, to the extent permitted by law.\n"
+
+#: version2.c:86
+#, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+
+#: version2.c:87
+#, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+
+#: xmalloc.c:91
+#, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+
+#: xmalloc.c:93
+#, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "%s: cannot allocate %lu bytes"
+
+#: xmalloc.c:163
+#, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+
+#: xmalloc.c:165
+#, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "%s: %s:%d: cannot allocate %lu bytes"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [name[=value] ... ]"
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] name [name ...]"
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [n]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [n]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [shell-builtin [arg ...]]"
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr "caller [expr]"
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-L|-P] [dir]"
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr "pwd [-LP]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr "true"
+
+#: builtins.c:72
+msgid "false"
+msgstr "false"
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] command [arg ...]"
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-aAfFilrtux] [-p] name[=value] ..."
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr "local [option] name[=value] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [arg ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [arg ...]"
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-a] [-dnps] [-f filename] [name ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [arg ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts optstring name [arg]"
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [n]"
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr "logout [n]"
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [job_spec]"
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr "bg [job_spec ...]"
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-lr] [-p pathname] [-dt] [name ...]"
+
+#: builtins.c:117
+msgid "help [-dms] [pattern ...]"
+msgstr "help [-dms] [pattern ...]"
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [-h] [-ar] [jobspec ...]"
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let arg [arg ...]"
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [name ...]"
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-fn] [name[=value] ...] or export -p"
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-af] [name[=value] ...] or readonly -p"
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr "shift [n]"
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr "source filename [arguments]"
+
+#: builtins.c:152
+msgid ". filename [arguments]"
+msgstr ". filename [arguments]"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [expr]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ arg... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "times"
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [-lp] [[arg] signal_spec ...]"
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-afptP] name [name ...]"
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-p] [-S] [mode]"
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr "wait [id]"
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr "wait [pid]"
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for NAME [in WORDS ... ] ; do COMMANDS; done"
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select NAME [in WORDS ... ;] do COMMANDS; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr "time [-p] pipeline"
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while COMMANDS; do COMMANDS; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until COMMANDS; do COMMANDS; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr "coproc [NAME] command [redirections]"
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "function name { COMMANDS ; } or name () { COMMANDS ; }"
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr "{ COMMANDS ; }"
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr "job_spec [&]"
+
+#: builtins.c:206
+msgid "(( expression ))"
+msgstr "(( expression ))"
+
+#: builtins.c:208
+msgid "[[ expression ]]"
+msgstr "[[ expression ]]"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr "variables - Names and meanings of some shell variables"
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [-n] [+N | -N | dir]"
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [-n] [+N | -N]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o] [optname ...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr "printf [-v var] format [arguments]"
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+
+#: builtins.c:237
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "compopt [-o|+o option] [-DE] [name ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, ‘alias’ prints the list of aliases in the reusable\n"
+" form ‘alias NAME=VALUE’ on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '“\\C-x\\C-râ€: re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns “$line $filenameâ€. With EXPR, returns\n"
+" “$line $subroutine $filenameâ€; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option ‘cdable_vars’ is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if ‘-L’ were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, ‘pwd’ behaves as if ‘-L’ were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the ‘type’ builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the ‘integer’ attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the ‘trace’ attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using ‘+’ instead of ‘-’ turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the ‘let’ command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, ‘declare’ makes NAMEs local, as with the "
+"‘local’\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See ‘help declare’."
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by ‘declare’.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" ‘echo’ interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix ‘special’ builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the ‘test’ found in $PATH instead of the shell builtin\n"
+" version, type ‘enable -n test’.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ‘:’ into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places ‘?’ into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a ‘?’\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option ‘execfail’ is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the ‘fc -s [pat=rep ...] [command]’ format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing ‘r cc’\n"
+" runs the last command beginning with ‘cc’ and typing ‘r’ re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with ‘&’. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a ‘*’. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow ‘-l’ they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+
+#: builtins.c:966
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see ‘readonly’.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of ‘--’ disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of ‘--’ disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its ‘sticky’ bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the “test†builtin, but the last argument must\n"
+" be a literal ‘]’, to match the opening ‘[’."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or ‘-’, each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with “kill -signal $$â€.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe ‘-p’ option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if ‘type -t NAME’ would not return ‘file’.\n"
+" -t\toutput a single word which is one of ‘alias’, ‘keyword’,\n"
+" \t‘function’, ‘builtin’, ‘file’ or ‘’, if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the ‘soft’ resource limit\n"
+" -H\tuse the ‘hard’ resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (‘nice’)\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values ‘soft’, ‘hard’, and ‘unlimited’ stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The ‘for’ loop executes a sequence of commands for each member in a\n"
+" list of items. If ‘in WORDS ...;’ is not present, then ‘in “$@â€â€™ is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If ‘in WORDS’ is not present, ‘in “$@â€â€™\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" ‘|’ is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Execute commands based on conditional.\n"
+" \n"
+" The ‘if COMMANDS’ list is executed. If its exit status is zero, then "
+"the\n"
+" ‘then COMMANDS’ list is executed. Otherwise, each ‘elif COMMANDS’ list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" ‘then COMMANDS’ list is executed and the if command completes. "
+"Otherwise,\n"
+" the ‘else COMMANDS’ list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" ‘while’ COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" ‘until’ COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is “COPROCâ€.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the ‘fg’ command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a ‘&’ places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to ‘bg’.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to “let EXPRESSIONâ€.\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the ‘test’ builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the ‘==’ and ‘!=’ operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the ‘=~’ operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to ‘cd’.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t‘time’ reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of ‘exact’ means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of ‘substring’ means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually ‘!’. The second is\n"
+" \t\tthe ‘quick substitution’ character, usually ‘^’. The\n"
+" \t\tthird is the ‘history comment’ character, usually ‘#’.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by ‘dirs’, starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by ‘dirs’, starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The ‘dirs’ builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by ‘dirs’, starting with zero. For example: ‘popd +0’\n"
+" \tremoves the first directory, ‘popd +1’ the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by ‘dirs’, starting with zero. For example: ‘popd -0’\n"
+" \tremoves the last directory, ‘popd -1’ the next to last.\n"
+" \n"
+" The ‘dirs’ builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the ‘pushd’ command; you can get\n"
+" back up through the list with the ‘popd’ command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with ‘set -o’\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to “empty†commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the “default†command completion\n"
+" \t-E\t\tChange options for the “empty†command completion\n"
+" \n"
+" Using ‘+o’ instead of ‘-o’ turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the ‘complete’ builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for ‘mapfile’."
diff --git a/po/eo.gmo b/po/eo.gmo
new file mode 100644
index 0000000..ce32da4
--- /dev/null
+++ b/po/eo.gmo
Binary files differ
diff --git a/po/eo.po b/po/eo.po
new file mode 100644
index 0000000..736734d
--- /dev/null
+++ b/po/eo.po
@@ -0,0 +1,5614 @@
+# -*- eval: (po-consider-source-path "../builtins/"); -*-
+# Esperanto language file for GNU Bash.
+# Copyright (C) 1996 Free Software Foundation, Inc.
+# This file is distributed under the same license as the bash package.
+# Sergio Pokrovskij <sergio.pokrovskij@gmail.com>, 1998, 2006, 2009.
+#
+# Stilaj notoj:
+# Angulaj citiloj limigas «plurajn vortojn»,
+# 99-66 estas la citiloj de „unuvortaĵo‟
+#
+# La mesaÄojn pri internaj eraroj (markitaj per XXX) probable malnecesas
+# traduki.
+#
+# Glosaro:
+# callback retrovoko
+# to force ... pre superforto
+# granted jesigita
+# here-document tuj-dokumento (info "(bash)Redirections")
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU bash 4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2009-06-01 00:31+0600\n"
+"Last-Translator: Sergio Pokrovskij <sergio.pokrovskij@gmail.com>\n"
+"Language-Team: Esperanto <translation-team-eo@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "Misa tabel-indico"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr "%s: Maleblas konverti pozician tabelon en asocitabelon"
+
+#: arrayfunc.c:480
+#, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: Misa asocitabela Ålosilo"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: Valorizato havu nombran indicon"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr "%s: %s: Valorizante per asocitabelo uzu indicon"
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: Ne prosperis krei: %s"
+
+# XXX: internal_error
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr "bash_execute_unix_command: Mankas klavartabelo por komando"
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: La unua ne-blankspaca signo ne estas „\"‟"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "Mankas ferma „%c‟ en %s"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: Mankas disiga dupunkto"
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "„%s‟: Misa nomo por klavartabelo"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr "liniredaktado ne estas ebligita"
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "„%s‟: Misa nomo por klavartabelo"
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: Ne eblas legi: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "%s: Ne eblas malligi"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "%s: Nekonata funkcinomo"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s malhavas klavligon\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s vokeblas per "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr "iteracinombrilo"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "Sencas nur en iteracio „for‟, „while‟ aŭ „until‟"
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+"Liveras la kuntekston de la kuranta procedurvoko.\n"
+"\n"
+" Sen ESPR liveras "
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "HOME malhavas valoron"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "OLDPWD malhavas valoron"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr "linio %dª: "
+
+#: builtins/common.c:139 error.c:261
+#, c-format
+msgid "warning: "
+msgstr "Averto: "
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr "%s: Uzmaniero: "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "Tro multe da argumentoj"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: La opcio bezonas argumenton"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: Necesas nombra argumento"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: Ne trovita"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: Misa opcio"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: Misa opcinomo"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "„%s‟ ne estas taŭga nomo"
+
+#: builtins/common.c:238
+msgid "invalid octal number"
+msgstr "Misa okuma nombro"
+
+#: builtins/common.c:240
+msgid "invalid hex number"
+msgstr "Misa 16uma nombro"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "Misa nombro"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: Misa signalindiko"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "„%s‟: Nek proceznumero, nek taŭga laborindiko"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: Nurlega variablo"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s estas ekster sia variejo"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "argumento"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s estas ekster sia variejo"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: Ne estas tia laboro"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: Ĉi tiu Åelo ne disponigas laborregadon"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "Laborregado ne disponeblas"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: Limigita"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "limigita"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "„%s‟ ne estas primitiva komando Åela"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "Eraro ĉe skribo: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr "Eraro ĉe agordado de terminalaj atributoj: %s"
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr "Eraro ĉe akiro de terminalaj atributoj: %s"
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: Eraro ĉe provo determini la kurantan dosierujon: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: Ambigua laborindiko"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: Misa nomo de ago"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: Kompletigo ne estas specifita"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "Averto: La opcio -F povas funkcii alie ol vi eble supozas"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "Averto: La opcio -C povas funkcii alie ol vi eble supozas"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr "Ni ne estas en plenumado de kompletiga funkcio"
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "Uzeblas nur ene de funkcio"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "„-f‟ ne estas uzebla por fari funkciojn"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: Nurlega funkcio"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "$%s: ĉi tiel ne eblas neniigi variablojn"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr "%s: Ne eblas konverti asocitabelon en pozician tabelon"
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "Rultempa Åargo ne disponeblas"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "Ne malfermiÄis dinamika biblioteko %s: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "Mankas %s en la dinamika biblioteko%s: %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: Ne Åargita dinamike"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: Ne eblas forigi: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s estas dosierujo"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: Ne ordinara dosiero"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: Tro granda dosiero"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: Neplenumebla duuma dosiero"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: Maleblas plenumi: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr "adiaÅ­\n"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "La Åelo ne estas saluta; eliru per «exit»"
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "Restas haltigitaj laboroj.\n"
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr "Restas rulataj laboroj.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "Komando ne trovita"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "Historia indiko"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: Ne malfermiÄis labordosiero: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr "kuranta"
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "La laboro %d estas lanĉita sen laborregado"
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: Misa opcio -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: La opcio bezonas argumenton -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "Nomkonservado (haketado, «hashing») estas malÅaltita"
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: Hakettabelo estas malplena\n"
+
+#: builtins/hash.def:244
+#, c-format
+msgid "hits\tcommand\n"
+msgstr "Trafoj\tKomando\n"
+
+# ZZZ: aĉaj citiloj (fermita en la programo)
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Åœelaj komandoj kongruaj kun la Ålosilvorto '"
+msgstr[1] "Åœelaj komandoj kongruaj kun la Ålosilvortoj '"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"Helpaĵo pri „%s‟ malestas.\n"
+"Provu «help help» aŭ «man -k %s» aŭ «info %s»."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: Fiaskis malfermo de %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"Jenaj komandoj estas enkonstruitaj. Tajpu „help‟ por eligi la liston.\n"
+"Tajpu «help NOMO» por informoj pri la funkcio NOMO.\n"
+"Uzu «info bash» por la Äenerala informo pri la Åelo.\n"
+"Uzu «man -k» aŭ «info» por informo pri komandoj ĉi tie ne listigitaj.\n"
+"\n"
+"Steleto (*) tuj post nomo indikas, ke la komando estas malebligita.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "Ne pli ol unu el -anrw estas uzebla"
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "pozicio en la historio"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: Historia malvolvo fiaskis"
+
+#: builtins/inlib.def:71
+#, c-format
+msgid "%s: inlib failed"
+msgstr "%s: inlib fiaskis"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "La uzo de „-x‟ malebligas aliajn opciojn"
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: Argumento estu proceznumero aÅ­ laborindiko"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Nekonata eraro"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "Mankas esprimo"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: Ne tabela variablo"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: Misa indiko de dosiernumero"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: Misa dosiernumero: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, c-format
+msgid "%s: invalid line count"
+msgstr "%s: Misa lininombro"
+
+#: builtins/mapfile.def:277
+#, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: Misa tabelbazo"
+
+# Supozeble callback => retrovoko ??
+#: builtins/mapfile.def:294
+#, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: Misa kvanto ĉe retrovoko"
+
+#: builtins/mapfile.def:326
+msgid "empty array variable name"
+msgstr "Mankas nomo de tabelvariablo"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr "necesas subteno de tabelvariabloj"
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "„%s‟: Mankas formata signo"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "„%c‟: Misa signo formata"
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr "Averto: %s: %s"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "Mankas 16uma cifero por \\x"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "Ne estas alia dosierujo"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<mankas kuranta dosierujo>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr "Dosierujstako malplenas"
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr "indico de dosierujstako"
+
+# dirs [-clpv] [+N] [-N]
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+"Listigu la kurantan dosierujstakon. La dosierujoj trafas en\n"
+" la stakon per la komando „pushd‟ kaj estas forigeblaj per la\n"
+" komando „popd‟.\n"
+"\n"
+" Opcioj:\n"
+" -c\tforviÅu la dosierujstakon (forigu ĉiujn erojn)\n"
+" -l\tne uzu tildon en la dosierujnomoj bazitaj relative\n"
+" \tal via hejma dosierujo\n"
+" -p\teligu dosierujstakon lokante po unu eron sur linio\n"
+" -v\teligu dosierujstakon lokante po unu eron sur linio,\n"
+"\tprefiksante la dosierujnomon per Äia numero en la stako\n"
+"\n"
+" Argumentoj:\n"
+" +N\teligu la Nan eron nombrante de maldekstre en la listo eligebla\n"
+"\tper „dirs‟ sen opcioj, numerante ekde 0.\n"
+"\n"
+" -N\teligu la Nan eron nombrante de dekstre en la listo eligebla\n"
+"\tper „dirs‟ sen opcioj, numerante ekde 0."
+
+# pushd [dir | +N | -N] [-n]
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Surstakigu dosierujon sur la stakon da dosierujoj, aÅ­ cikle Åovu\n"
+" la stakon tiel, ke la nova stakpinto iÄu la kuranta dosierujo.\n"
+" Senargumente, permutu la du plej suprajn dosierujojn de la stako.\n"
+"\n"
+" Opcioj:\n"
+" -n\tNe ÅanÄu la kurantan dosierujon surstakigante dosierujon sur\n"
+" \tla stakon; do, nur la stakon ÅanÄu.\n"
+"\n"
+" +N\tCikle Åovu la stakon tiel ke la Nª dosierujo (nombrante de\n"
+" \tmaldekstre en la listo eligebla per „dirs‟, numerante de 0)\n"
+" iÄu la pinta.\n"
+"\n"
+" -N\tCikle Åovu la stakon tiel ke la Nª dosierujo (nombrante de\n"
+" \tdekstre en la listo eligebla per „dirs‟, numerante de 0) iÄu\n"
+" la pinta.\n"
+"\n"
+" dir\tsurstakigu la dosierujon dir kaj faru Äin la nova kuranta\n"
+" \tdosierujo labora.\n"
+"\n"
+" Vi povas vidigi la stakon da dosierujoj per la komando „dirs‟."
+
+# popd [+N | -N] [-n]
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Elstakigu erojn el la stako de dosierujoj. Senargumente, forigu la\n"
+" pintan dosierujon kaj iru (cd) en la novan pintan dosierujon.\n"
+"\n"
+"\n"
+" Opcioj:\n"
+" -n\tNe ÅanÄu la kurantan dosierujon demetante dosierujon el la\n"
+"\tstako; do, nur la stakon ÅanÄu.\n"
+"\n"
+" Argumentoj:\n"
+" +N\tforigu la Nan eron de maldekstre de la listo eligebla per\n"
+"\t„dirs‟, numerante ekde 0. Ekz-e: «popd +0» forigas la plej\n"
+"\tmaldekstran dosierujon; «popd +1», Äian najbaron.\n"
+"\n"
+" -N\tforigu la Nan eron de dekstre de la listo eligebla per „dirs‟,\n"
+"\tnumerante ekde 0. Ekz-e: «popd -0» forigas la lastan\n"
+"\tdosierujon; «popd -1», la antaŭlastan.\n"
+"\n"
+" Vi povas vidigi la stakon da dosierujoj per la komando „dirs‟."
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: Misa indiko de atendotempo"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "Lega (read) eraro: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+"„return‟ sencas nur en funkcio aŭ punkte vokita („.‟, „source‟) skripto"
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "Ne eblas samtempe malaktivigi funkcion kaj variablon"
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: Malaktivigo fiaskis"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: Malaktivigo fiaskis: nurlega %s"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: Ne tabela variablo"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: Ne funkcio"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "Nombrilo de „shift‟"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr "Maleblas samtempe Åalti kaj malÅalti Åelan opcion"
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: Misa nomo de Åela opcio"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "Necesas dosiernoma argumento"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: Dosiero ne trovita"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "Ne eblas halteti"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "Ne eblas haltetigi salutan Åelon"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "„%s‟ alinomas jenon: «%s»\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "„%s‟ estas Ålosilvorto de la Åelo\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s estas funkcio\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "„%s‟ estas primitiva komando de la Åelo\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "„%s‟ estas „%s‟\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "„%s‟ estas metita en hakettabelon (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s: MaltaÅ­ga argumento por limo"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "„%c‟: Misa komando"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: Fiaskis provo legi limon: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr "limo"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: Malprosperis ÅanÄi limon: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "Okuma nombro"
+
+# Misa modifilo: «umask Z-w» aŭ «umask aZw»
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "„%c‟: Maltaŭga simbolo por atingorajta modifilo"
+
+# Misa kategorio: ne [rw] ktp
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "„%c‟: La signo ne estas simbolo de atingorajta kategorio"
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr " linio "
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "La ĵusa komando: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "Ĉesigado ..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "Nekonata komand-eraro"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "Misa komandotipo"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "Misa stir-operacio"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "Misa salto"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: Neligita variablo"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "Tro longe sen enigo: AÅ­tomata seancofino\n"
+
+# XXX: internal error:
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "Fiaskis provo nomumi la disponaĵon «/dev/null» ĉefenigujo: %s"
+
+# XXX: internal error:
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "TIMEFORMAT: „%c‟: Misa formatsigno"
+
+#: execute_cmd.c:2075
+msgid "pipe error"
+msgstr "Eraro en dukto"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: Malpermesitas uzi „/‟ en komandonomoj"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: Komando ne trovita"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: Misa interpretilo"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "Ne eblas kunnomumi al dosiernumero %d la dosiernumeron %d"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "Tro profunda rekursio en esprimo"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "Rekursistako elĉerpita"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "Sintaksa eraro en esprimo"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "Provo valorizi ne-variablon"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "Divido per 0"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "CIMO: Misa operacisigno en kombinita valorizsimbolo"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "„:‟ mankas kondiĉa esprimo"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "Negativa eksponento"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr "Post antaÅ­kremento aperu nomo de variablo"
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "Mankas „)‟"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "Sintaksa eraro: Mankas operando"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "Sintaksa eraro: Misa operacisimbolo aritmetika"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s%s%s: %s (misa simbolo estas „%s‟)"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "MaltaÅ­ga bazo nombrosistema"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "Tro granda valoro por bazo de nombrosistemo"
+
+#: expr.c:1329
+#, c-format
+msgid "%s: expression error\n"
+msgstr "%s: Misa esprimo\n"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getwd: Ne eblas atingi patrajn dosierujojn"
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "Ne eblas reÅalti senprokrastan reÄimon por dosiernumero %d"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr "Maleblas disponigi novan dosiernumeron por BaÅa enigo el n-ro %d"
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "save_bash_input: La nova dosiernumero (fd %d) jam havas bufron"
+
+# ZZZ: sys_error (_("start_pipeline: pgrp pipe"));
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr "start_pipeline: procezgrupo dukto"
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr "Forke farita proceznumero %d aperas en rulata laboro %d"
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "Haltigita laboro %d kun procezgrupo %ld estas forigata"
+
+# ifdef DEBUG ... internal_warning():
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr "add_process: process %5ld (%s) in the_pipeline"
+
+# ifdef DEBUG ... internal_warning():
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr "add_process: pid %5ld (%s) marked as still alive"
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: Ne estas tia proceznumero (%ld)!"
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr "Signalo %d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Farite"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Haltigita"
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr "Haltigita(%s)"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "Rulata"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Farite(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "Eliro %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Nekonata stato"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(nekropsio elÅutita)"
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr " (labordosierujo: %s)"
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "provo atribui (setpgid) procezgrupon %2$ld de la procezido %1$ld"
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait: La procezo %ld ne estas ido de ĉi tiu Åelo"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "wait_for: Malestas informoj pri procezo %ld"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job: La laboro %d estas haltigita"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: La laboro finiÄis"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: La laboro %d jam estas fona"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, c-format
+msgid "%s: line %d: "
+msgstr "%s: linio %dª: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr "(nekropsio elÅutita)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(nun labordosierujo estas: %s)\n"
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_job_control: getpgrp fiaskis"
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_job_control: liniaranÄo"
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_job_control: setpgid()"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr "ne prosperis atribui grupon (%d) de terminala procezo"
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "Ĉi tiu Åelo ne disponigas laborregadon"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc: Malveras la aserto: %s\n"
+
+# XXX: debug?
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"malloc: %s:%d: aserto sufokita\r\n"
+
+# XXX: internal error
+#: lib/malloc/malloc.c:313
+msgid "unknown"
+msgstr "nekonata"
+
+# XXX: debug?
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr "malloc: Skribdifektita bloko en malokupa listo (free list)"
+
+# XXX: debug?
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free: La argumento montras blokon jam malokupitan"
+
+# XXX: debug?
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free: La argumento ne montras generitan memoron"
+
+# XXX: debug?
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr "free: Okazis maltroo; mh_nbytes estas ekster sia variejo"
+
+# XXX: debug?
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free: La ĉapa kaj vosta longoj de memorpeco ne estas egalaj"
+
+# XXX: debug?
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc: La argumento ne montras generitan memoron"
+
+# XXX: debug?
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr "realloc: Okazis maltroo; mh_nbytes estas ekster sia variejo"
+
+# XXX: debug?
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "realloc: La ĉapa kaj vosta longoj de memorpeco ne estas egalaj"
+
+# XXX: debug?
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr "register_alloc: „alloc‟-tabelo elĉerpiÄis je FIND_ALLOC?\n"
+
+# XXX: debug?
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr "register_alloc: %p jam en la tabelo kvazaÅ­ kreita (?)\n"
+
+# XXX: debug?
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "register_free: %p jam en la tabelo kvazaÅ­ malokupita (?)\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "Misa bazo nombrosistema"
+
+# XXX: internal error
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: Nekonata retnodo"
+
+# XXX: internal error
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: Misa servo-indiko"
+
+# XXX: internal error
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: Misa retvojo-indiko"
+
+# XXX: internal error
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "Reta funkciado ne disponeblas"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+# XXX: fatal_error
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc: %s:%d: ne eblas reokupi %lu bajtojn"
+
+# XXX: fatal_error
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc: %s:%d: ne eblas reokupi %lu bajtojn"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Vi havas poÅton en $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Nova poÅto en $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "La poÅto en %s estas jam legita\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "Sintaksa eraro: Necesas aritmetika esprimo"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "Sintaksa eraro: Neatendita „;‟"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "Sintaksa eraro: „((%s))‟"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: Misa ordontipo %d"
+
+# internal_warning():
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr "Tuj-dokumenton de linio %d limigas dosierfino (mankas „%s‟)"
+
+# XXX: programming_error
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr "make_redirection: Alidirektada komando „%d‟ ekster sia variejo"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "Neatendita dosierfino dum serĉo de responda „%c‟"
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "Neatendita dosierfino dum serĉo de „]]‟"
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "Sintaksa eraro en kondiĉa esprimo: Neatendita simbolo „%s‟"
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "Sintaksa eraro en kondiĉa esprimo"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "Nekonvena simbolo „%s‟ anstataŭ „)‟"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "Mankas „)‟"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "La argumento „%s‟ ne konvenas por unuloka kondiĉa operacisimbolo"
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "Maltaŭga argumento por unuloka kondiĉa operacisimbolo"
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "Misa simbolo „%s‟ anstataŭ duloka kondiĉa operacisigno"
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "ĉi tie devas esti duloka kondiĉa operacisigno"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "La argumento „%s‟ ne konvenas por duloka kondiĉa operacisimbolo"
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "<maltaŭga argumento por duloka kondiĉa operacisimbolo"
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "Misa simbolo „%c‟ en kondiĉa komando"
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "Misa simbolo „%s‟ en kondiĉa komando"
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "Misa simbolo „%d‟ en kondiĉa komando"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "Sintaksa eraro apud neatendita simbolo „%s‟"
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "Sintaksa eraro apud „%s‟"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "Sintaksa eraro: Neatendita dosierfino"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "Sintaksa eraro"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Uzu «%s» por eliri el la Åelo.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "Neatendita dosierfino dum serĉo de responda „)‟"
+
+# XXX: internal_error
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "Kompletigo: Funkcio „%s‟ ne trovita"
+
+# XXX: programming_error
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr "progcomp_insert: %s: NULL COMPSPEC"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: Misa stir-operacio „%d‟"
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d: Misa dosiernumero: %s"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+# XXX: programming_error
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "cprintf: „%c‟: Misa formatsigno"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "Ekstervarieja dosiernomo"
+
+# XXX: internal_error
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: Ambigua alidirektado"
+
+# XXX: internal_error
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: Maleblas surskribi ekzistantan dosieron"
+
+# XXX: internal_error
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: Limigita Åelo: malpermesitas alidirekti eligon"
+
+# XXX: internal_error
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "Malprosperis krei labordosieron por tuj-dokumento: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: Maleblas valorizi tabelanon per listo"
+
+# XXX: internal_warning
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "«/dev/(tcp|udp)/host/port» ne disponeblas ekster retumado"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "Alidirektada eraro: Fiaskis kunnomumo al dosiernumero"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "Mankas «/tmp», bv krei Äin!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "«/tmp» devas esti valida dosierujo"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: Misa opcio"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Mi ne havas nomon!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNUa «bash», versio %s-(%s)\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Uzo:\t%s [GNUa opcio longforma] [opcio] ...\n"
+"\t%s [GNUa opcio longforma] [opcio] SKRIPTODOSIERO ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "GNUaj opcioj longformaj:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Åœelaj opcioj:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD aÅ­ -c komando aÅ­ -O shopt_opcio\t\t(nur voko)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s aÅ­ -o opcio\n"
+
+# bash --help
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr "Por pluaj informoj pri la opcioj tajpu: «%s -c \"help set\"»\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr "Por scii pli pri la primitivaj Åelkomandoj tajpu: „%s -c help‟\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "Por raporti pri eraroj uzu la komandon „bashbug‟\n"
+
+# XXX: internal_error
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d: Misa operacio"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Åœtopsignalo"
+
+# Hangup detected on controlling terminal or death of controlling
+# process
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Malkonekto"
+
+# Interrupt from keyboard
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Interrompo"
+
+# Quit from keyboard
+#: siglist.c:59
+msgid "Quit"
+msgstr "Klavara eliro"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Miskomando"
+
+# SIGTRAP 5 Core Trace/breakpoint trap
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "Spurada kontrolpunkto"
+
+# Abort signal from abort(3)
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "Komando ABORT"
+
+# SIGEMT is not specified in POSIX 1003.1-2001, but neverthless appears
+# on most other Unices, where its default action is typically to termi-
+# nate the process with a core dump.
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "EMT-komando"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Glitpunkta escepto"
+
+# SIGKILL 9 Term Kill signal
+# Nek kaptebla nek ignorebla (malkiel ABORT)
+#: siglist.c:87
+msgid "Killed"
+msgstr "Murdu"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "Bus-eraro"
+
+# SIGSEGV 11 Core Invalid memory reference
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Adreseraro"
+
+# SIGSYS 12,-,12 Core Bad argument to routine (SVID)
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Misa sistemvoko"
+
+# SIGPIPE 13 Term Broken pipe: write to pipe with no readers
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "Rompita dukto"
+
+# SIGALRM 14 Term Timer signal from alarm(2)
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "VekhorloÄo"
+
+# SIGTERM 15 Term Termination signal
+#: siglist.c:111
+msgid "Terminated"
+msgstr "FiniÄu"
+
+# SIGURG 16,23,21 Ign Urgent condition on socket (4.2 BSD)
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "UrÄa stato eneliga"
+
+# SIGSTOP 17,19,23 Stop Stop process
+# Nek kaptebla nek ignorebla (samkiel SIGKILL)
+# Haltu (poste eblos plu iri, vd SIGCONT)
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Haltu (signalo)"
+
+# SIGCONT 19,18,25 Continue if stopped
+#: siglist.c:127
+msgid "Continue"
+msgstr "Pluen"
+
+# SIGCHLD 20,17,18 Ign Child stopped or terminated
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "Procezido mortis aÅ­ haltis"
+
+# SIGTTIN 21,21,26 Stop tty input for background process
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Haltu (pro terminalenigo)"
+
+# SIGTTOU 22,22,27 Stop tty output for background process
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Haltu (pro terminaleligo)"
+
+# SIGIO 23,29,22 Term I/O now possible (4.2 BSD)
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "Eneligo pretas"
+
+# SIGXCPU 24,24,30 Core CPU time limit exceeded (4.2 BSD)
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "Ĉefprocesora tempolimo"
+
+# SIGXFSZ 25,25,31 Core File size limit exceeded (4.2 BSD)
+#: siglist.c:155
+msgid "File limit"
+msgstr "Dosiera longolimo"
+
+# SIGVTALRM 26,26,28 Term Virtual alarm clock (4.2 BSD)
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "Vekilo (virtuala)"
+
+# SIGPROF 27,27,29 Term Profiling timer expired
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "Vekilo (profilada)"
+
+# SIGWINCH 28,28,20 Ign Window resize signal (4.3 BSD, Sun)
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Fenestro ÅanÄiÄis"
+
+# SIGLOST -,-,- Term File lock lost
+#: siglist.c:171
+msgid "Record lock"
+msgstr "DosierÅloso"
+
+# SIGUSR1 30,10,16 Term User-defined signal 1
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "Uzulsignalo 1ª"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "Uzulsignalo 2ª"
+
+# Harbor File Transfer:
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "Pendas HFT-enigo"
+
+# SIGPWR 29,30,19 Term Power failure (System V)
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "Energiprovizo paneontas"
+
+# SIGDANGER
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "La sistemo estas kraÅonta"
+
+# SIGMIGRATE:
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "La procezo iru al alia ĉefprocesoro"
+
+# SIGPRE
+#: siglist.c:199
+msgid "programming error"
+msgstr "Programeraro"
+
+# SIGGRANT (monopola??)
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "HFT-monitorreÄimo jesigita"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "HFT-monitorreÄimo forprenita"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "HFT-sonsekvenco finiÄis"
+
+# SIGINFO 29,-,- A synonym for SIGPWR
+#: siglist.c:215
+msgid "Information request"
+msgstr "Informmendo"
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Nekonata signalnumero"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Nekonata signalo n-ro %d"
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "Misa anstataŭigo: Mankas ferma „%s‟ en %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: Maleblas valorizi tabelanon per listo"
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "Ne prosperis fari dukton por proceza anstataÅ­igo"
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "Ne prosperis krei idon por proceza anstataÅ­igo"
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "Ne prosperis malfermi nomitan dukton %s porlegan"
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "Ne prosperis malfermi nomitan dukton %s por skribado"
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "Ne prosperis kunnomumi nomhavan dukton %s kiel dosiernumeron %d"
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "Ne prosperis fari dukton por komanda anstataÅ­igo"
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr "Ne prosperis krei procezidon por komanda anstataÅ­igo"
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "command_substitute: Ne prosperis kunnomumi la dosiernumeron 1 al dukto"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: Parametro estas NUL aÅ­ malaktiva"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: subĉeno-esprimo < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: Misa anstataÅ­igo"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: ĉi tiel ne valorizebla"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "Misa anstataŭigo: Mankas ferma „`‟ en %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "Nenio kongrua: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "Mankas argumento"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: Mankas entjera esprimo"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "Mankas „)‟"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "AnstataÅ­ „)‟ troviÄas %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: Tie devas esti unuloka operacisigno"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: Tie devas esti duloka operacisigno"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "Mankas „]‟"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "Misa signalnumero"
+
+# XXX: internal_warning
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps: Misa valoro en trap_list[%d]: %p"
+
+# XXX: internal_warning
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr "run_pending_traps: Signaltraktilo SIG_DFL resendas %d (%s) al mi mem"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: Misa signalnumero %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "Eraro ĉe importo de funkcidifino por „%s‟"
+
+# XXX: internal_warning
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "%d estas tro granda Åelnivelo; mallevita Äis 1"
+
+# XXX: internal_error
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr "make_local_variable: Malestas funkcia kunteksto en ĉi-regiono"
+
+# XXX: internal_error
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr "all_local_variables: Malestas funkcia kunteksto en ĉi-regiono"
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: Parametro estas NUL aÅ­ malaktiva"
+
+# XXX: internal_error
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "Misa signo %d en eksporta signoĉeno por „%s‟"
+
+# XXX: internal_error
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "Mankas „=‟ en eksporta signoĉeno por „%s‟"
+
+# XXX: internal_error
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+"pop_var_context: La kapo de „shell_variables‟ ne estas funkcia kunteksto"
+
+# XXX: internal_error
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr "pop_var_context: Mankas kunteksto de „global_variables‟"
+
+# XXX: internal_error
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr "pop_scope: La kapo de „shell_variables‟ ne estas provizora regiono"
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: Fiaskis malfermo de %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d: Misa dosiernumero: %s"
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Copyright (C) 2009 ĉe «Free Software Foundation, Inc.»"
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"La permesilo estas GPLv3+; t.e. GNU GPL, versio 3ª aŭ pli nova.\n"
+"La tekston vd ĉe <http://gnu.org/licenses/gpl.html>\n"
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNUa «bash», versio %s (%s)\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+"Ĉi tiu programo estas libera; vi rajtas libere Äin ÅanÄi kaj pludoni.\n"
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+"NENIA GARANTIO estas donita, tiom kiom tion permesas la koncerna leÄo.\n"
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Copyright (C) 2009 ĉe «Free Software Foundation, Inc.»"
+
+#: version2.c:87
+#, fuzzy, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"La permesilo estas GPLv3+; t.e. GNU GPL, versio 3ª aŭ pli nova.\n"
+"La tekston vd ĉe <http://gnu.org/licenses/gpl.html>\n"
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc(): Ne povas okupi %lu bajtojn (%lu bajtoj disponigitaj)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: Ne prosperis okupi %lu bajtojn"
+
+# XXX: fatal_error
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: %s:%d: ne eblas okupi %lu bajtojn (%lu bajtoj disponigitaj)"
+
+# XXX: fatal_error
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: %s:%d: ne eblas okupi %lu bajtojn"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [NOMO[=VALORO] ... ]"
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] NOMO [NOMO ...]"
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+"bind [-lpvsPVS] [-m KLAVARTABELO] [-f DOSIERNOMO] [-q NOMO]\n"
+" [-u NOMO] [-r KLAVAÄ´O] [-x KLAVAÄ´O:ÅœELKOMANDO]\n"
+" [KLAVAĴO:READLINE-FUNKCIO AŬ READLINE-KOMANDO] "
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [N]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [N]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [ÅœELAÄ´O [ARG ...]]"
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr "caller [ESPRIMO]"
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-L|-P] [DOSIERUJO]"
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr "pwd [-LP]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr "true"
+
+#: builtins.c:72
+msgid "false"
+msgstr "false"
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] KOMANDO [ARG ...]"
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-aAfFilrtux] [-p] [NOMO[=VALORO] ...]"
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-aAfFilrtux] [-p] NOMO[=VALORO] ..."
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr "local [OPCIO] NOMO[=VALORO] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [ARG ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [ARG ...]"
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-a] [-dnps] [-f DOSIERNOMO] [NOMO ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [ARG ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts OPCIĈENO NOMO [ARG]"
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a NOMO] [KOMANDO [ARGUMENTOJ ...]] [ALIDIREKTADO ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [N]"
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr "logout [N]"
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+"fc [-e REDAKTILO] [-lnr] [UNUA] [LASTA] aÅ­\n"
+"fc -s [ÅœABLONO=ANST] [KOMANDO]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [LABORINDIKO]"
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr "bg [LABORINDIKO]"
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-lr] [-p VOJNOMO] [-dt] [NOMO ...]"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "help [-ds] [ÅœABLONO ...]"
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [-d DEÅœOVO] [n] aÅ­\n"
+"history -awr [DOSIERNOMO] aÅ­\n"
+"history -ps ARG [ARG...]"
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr ""
+"jobs [-lnprs] [LABORINDIKO ...] aÅ­\n"
+"jobs -x KOMANDO [ARGS]"
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [-h] [-ar] [LABORINDIKO ...]"
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s SIGSNOM | -n SIGNUM | -SIGNOM] [PN | LABORINDIKO] ... aÅ­\n"
+"kill -l [SIGNOM]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let ARG [ARG ...]"
+
+#: builtins.c:136
+#, fuzzy
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+"read [-ers] [-a TABELO] [-d DISIG] [-i TEKSTO] [-n NSIGN] [-p INVIT] [-t "
+"TLIM] [-u DN] [NOMO ...]"
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [N]"
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o OPCINOMO] [ARG ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [NOMO ...]"
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-fn] [NOMO[=VALORO] ...] aÅ­ export -p"
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-aAf] [NOMO[=VALORO] ...] aÅ­ readonly -p"
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr "shift [N]"
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr "source DOSIERNOMO [ARGUMENTOJ]"
+
+#: builtins.c:152
+msgid ". filename [arguments]"
+msgstr ". DOSIERNOMO [ARGUMENTOJ]"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [ESPRIMO]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ ARG... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "times"
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [-lp] [[ARG] SIGNALINDIKO ...]"
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-afptP] NOMO [NOMO ...]"
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdefilmnpqrstuvx] [LIMO]"
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-p] [-S] [REÄœIMO]"
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr "wait [IND]"
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr "wait [PN]"
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for NOMO [in VORTOJ ... ] ; do KOMANDOJ; done"
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for (( ESPR1; ESPR2; ESPR3 )); do KOMANDOJ; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select NONO [in VORTOJ ... ;] do KOMANDOJ; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr "time [-p] DUKTO"
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case VORTO in [ÅœABLONO [| ÅœABLONO]...) KOMANDOJ ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if KOMANDOJ; then KOMANDOJ; [ elif KOMANDOJ; then KOMANDOJ; ]... [ else "
+"KOMANDOJ; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while KOMANDOJ; do KOMANDOJ; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until KOMANDOJ; do KOMANDOJ; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr "coproc [NOMO] KOMANDO [ALIDIREKTADOJ]"
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "function NOMO { KOMANDOJ ; } aÅ­ NOMO () { KOMANDOJ ; }"
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr "{ KOMANDOJ ; }"
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr "LABORINDIKO [&]"
+
+#: builtins.c:206
+msgid "(( expression ))"
+msgstr "(( ESPRIMO ))"
+
+#: builtins.c:208
+msgid "[[ expression ]]"
+msgstr "[[ ESPRIMO ]]"
+
+# Ĉu "variables" estas serĉa Ålosilo ?
+# T.e. "help var" aÅ­ "help variabl", sed ne "nelp variabloj"?
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr "var - Nomoj kaj signifo de kelkaj Åelvariabloj"
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [-n] [+N | -N | DOSIERUJO]"
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [-n] [+N | -N]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o] [OPCINOMO ...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr "printf [-v VAR] FORMATO [ARGUMENTOJ]"
+
+#: builtins.c:229
+#, fuzzy
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+"complete [-abcdefgjksuv] [-pr] [-o OPCIO] [-A AGO] [-G GLOBÅœAB] [-W "
+"VORTLISTO] [-F FUNKCIO] [-C KOMANDO] [-X FILTROÅœAB] [-P PREFIKSO] [-S "
+"SUFFIKSO] [NOMO ...]"
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+"compgen [-abcdefgjksuv] [-o OPCIO] [-A AGO] [-G GLOBÅœAB] [-W vORTLISTO] [-"
+"F FUNKCIO] [-C KOMANDO] [-X FILTROÅœAB] [-P PREFIKSO] [-S SUFFIKSO] [VORTO]"
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "compopt [-o|+o OPCIO] [NOMO ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"mapfile [-n NOMBRILO] [-O ORIGINO] [-s NOMBRILO] [-t] [-u DN] [-C RETROVOKO] "
+"[-c KVANTO] [TABELO]"
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"readarray [-n NOMBRILO] [-O ORIGINO] [-s NOMBRILO] [-t] [-u DN] [-C "
+"RETROVOKO] [-c KVANTO] [TABELO]"
+
+# alias:
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"Difinu aÅ­ listigu alinomojn.\n"
+"\n"
+" Sen argumento aŭ kun la opcio -p „alias‟ eligas en la ĉefeligujon\n"
+" la liston da alinomoj en la reuzebla formo «alias NOMO=VALORO».\n"
+"\n"
+" Alie, ĉiu NOMO iÄas difinita kiel alinomo por indikita VALORO.\n"
+" Vosta spaceto en la VALORO kaŭzas teston, ĉu la sekva vorto estas\n"
+" alinome anstataŭigenda ĉe la komputo de la alinomo.\n"
+"\n"
+" Opcioj:\n"
+" -p\tEligu ĉiujn difinitajn alinomojn en reuzebla formo.\n"
+"\n"
+" Elirstato:\n"
+" La komando „alias‟ liveras „true‟ krom se aperas NOMO ne difinita\n"
+" alinome."
+
+# unalias [-a] name [name ...]
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Forigu la nomojn name ... el la listo de difinitaj alinomoj.\n"
+"\n"
+" Opcioj:\n"
+" -a\tSe enestas la opcio „-a‟, ĉiujn alinomojn forigu.\n"
+"\n"
+" Liveru sukceson krom se name ne estas difinita alinome."
+
+# bind [-lpvsPVS] [-m KLAVARTABELO] [-f DOSIERNOMO] [-q NOMO] [-u NOMO]
+# [-r KLAVAÄ´O] [-x KLAVAÄ´O:ÅœELKOMANDO]
+# [KLAVAĴO:READLINE-FUNKCIO AŬ READLINE-KOMANDO]
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+"Difinu klavligojn kaj variablojn.\n"
+"\n"
+" Ligu klavosekvencon al linilega funkcio, aÅ­ al makroo, aÅ­ valorizu\n"
+" linilegan variablon. La sintakso de ne-opcia argumento estas tiu\n"
+" de «~/.inputrc», tamen la ligon oni esprimu unuargumente; ekz-e:\n"
+" bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+"\n"
+" Opcioj:\n"
+" -m KLAVARTABELO Uzu KLAVARTABELOn dum la daŭro de ĉi tiu komando.\n"
+" La eblaj nomoj de klavartabelo estas: „emacs‟,\n"
+" „emacs-standard‟, „emacs-meta‟, „emacs-ctlx‟,\n"
+" „vi‟, „vi-move‟, „vi-command‟ kaj „vi-insert‟.\n"
+" -l Listigu funkcinomojn.\n"
+" -P Listigu funkcinomojn kaj klavligojn.\n"
+" -p Listigu funkcinomojn kaj klavligojn en formo\n"
+" reuzebla por enigo.\n"
+" -S Listigu makroajn klavsekvencojn kaj ilian valoron.\n"
+" -s Listigu makroajn klavsekvencojn kaj ilian valoron\n"
+" en formo reuzebla por enigo.\n"
+" -V Listigu variablonomojn kaj ilian valoron.\n"
+" -v Listigu variablonomojn kaj ilian valoron en formo\n"
+" reuzebla por enigo.\n"
+" -q FUNKCINOMO Demando pri la klavoj ligitaj al la FUNKCINOMO.\n"
+" -u FUNKCINOMO Malligu ĉiujn klavligojn disde la FUNKCINOMO.\n"
+" -r KLAVAÄ´O Forigu la ligon de la klavsekvenco KLAVAÄ´O\n"
+" -f DOSIERNOMO Legu klavligojn el DOSIERNOMO\n"
+" -x KLAVAÄ´O:ÅœELKOMANDO La ÅœELKOMANDO plenumiÄu ĉe enigo de KLAVAÄ´O.\n"
+"\n"
+" Elirstato:\n"
+" 0, krom se nekonata opcio estas donita aÅ­ eraro okazis."
+
+# exit:
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Finu iteracion FOR, WHILE aÅ­ UNTIL\n"
+"\n"
+" Eliru ekster iteracion FOR, WHILE aÅ­ UNTIL. Se N estas donita,\n"
+" iru N iteraciajn nivelojn eksteren.\n"
+"\n"
+" Elirstato:\n"
+" Ĝi estas 0, kondiĉe ke N estas pli granda ol aŭ egala al 1."
+
+# continue:
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"DaÅ­rigu iteraciadon de ordono FOR, WHILE aÅ­ UNTIL\n"
+"\n"
+" Pasu al la sekva iteraciero de FOR, WHILE aÅ­ UNTIL.\n"
+" Se N estas donita, eliru Äis la nivelon de la Nª inganta\n"
+" iteraciordono.\n"
+"\n"
+" Elirstato:\n"
+" Ĝi estas 0, kondiĉe ke N estas pli granda ol aŭ egala al 1."
+
+# builtin [shell-builtin [arg ...]]
+# builtin [ÅœELAÄ´O [ARG ...]]
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+"Rulu primitivan Åelkomandon\n"
+"\n"
+" Plenumu primitivan Åelkomandon ÅœELAÄ´O kun la argumentoj ARG sen la\n"
+" normala komadoserĉo. Tio utilas se oni volas uzi la nomon de\n"
+" Åelaĵo por nomi funkcion, sed bezonas la koncernan primitivon en\n"
+" la funkcio mem.\n"
+"\n"
+" Elirstato:\n"
+" Tiu de de ÅœELAÄ´O; aÅ­ malsukceso, se ÅœELAÄ´O ne estas primitiva\n"
+" Åelkomando."
+
+# caller [expr] =>
+# caller [ESPRIMO]
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+"Liveru la kuntekston de la kuranta procedurvoko\n"
+"\n"
+" Se ESPRIMO malestas, liveru «$line $filename». Se ESPRIMO\n"
+" ĉeestas, liveru «$line $subroutine $filename»; ĉi tiu krominformo\n"
+" uzeblas por vidigi la vok-stakon.\n"
+"\n"
+" La valoro de ESPRIMO indikas, kiom da vokkadroj retroiri disde la\n"
+" kuranta; la pinta kadro havas la numeron 0.\n"
+"\n"
+" Elirstato:\n"
+" Äœi estas 0, kondiĉe ke la Åelo plenumas Åelfunkcion kaj la ESPRIMO\n"
+" estas valida."
+
+# cd:
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+"ÅœanÄu la kurantan laboran dosierujon de la Åelo.\n"
+"\n"
+" La kuranta dosierujo iÄu dir aÅ­, se dir malestas, la valoro\n"
+" de la variablo $HOME.\n"
+"\n"
+" La variablo $CDPATH difinas la serĉvojon por la dosierujo\n"
+" entenanta dir-on. En $CDPATH, dupunkto „:‟ apartigas alternativajn\n"
+" dosierujojn, vakua dosiernomo egalas la kurantan (t.e. „.‟). Se dir\n"
+" komenciÄas per „/‟, la variablo $CDPATH ne estas uzata.\n"
+"\n"
+" Se la dosierujo ne troviÄas, kaj la Åela opcio „cdable_vars‟ estas\n"
+" Åaltita, la vorto estas interpretata kiel variablo. Se la\n"
+" variablo havas valoron, plenumiÄas „cd‟ al tiu valoro.\n"
+"\n"
+" Opcioj:\n"
+" -L\tsekvu simbolajn ligilojn.\n"
+" -P\tuzu la fizikan strukturon de dosierujoj sen iri laÅ­\n"
+"\tsimbolaj ligiloj\n"
+"\n"
+" Defaŭlte la simbolaj ligiloj estas sekvataj, kvazaŭ „-L‟ ĉeestus.\n"
+"\n"
+" Elirstato:\n"
+" Äœi estas 0, se la dosierujÅanÄo sukcesis; nenulo aliokaze."
+
+# pwd [-LP]
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+"Eligu la nomon de kuranta labora dosierujo\n"
+"\n"
+" Opcioj:\n"
+" -L eligu la valoron de $PWD, se Äi indikas la kurantan laboran\n"
+" dosierujon\n"
+" -P eligu la nomon de la fizika dosierujo, sen eventualaj simbolaj\n"
+" ligiloj\n"
+"\n"
+" Defaŭlte „pwd‟ kondutas tiel, kiel kun la opcio „-L‟.\n"
+"\n"
+" Elirstato:\n"
+" 0, krom se aperas misa opcio aÅ­ la kuranta dosierujo estas\n"
+" nelegebla."
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Malplena ordono\n"
+"\n"
+" Senefika: La komando nenion faras.\n"
+"\n"
+" Elirstato:\n"
+" Ĉiam sukcesa."
+
+# true
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Liveru sukcesan rezulton\n"
+"\n"
+" Elirstato:\n"
+" Ĉiam sukcesa."
+
+# false:
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+"Liveru fiaskon.\n"
+"\n"
+" Elirstato:\n"
+" Ĉiam malsukcesa."
+
+# command [-pVv] command [arg ...]
+# command [-pVv] KOMANDO [ARG ...]
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+"Plenumu simplan komandon aÅ­ vidigu informojn pri komandoj\n"
+"\n"
+" Plenumu KOMANDOn kun ARGoj sen atenti eventualajn Åelfunkciojn\n"
+" samnomajn; aÅ­ vidigu informojn pri indikitaj KOMANDOj. Uzeblas\n"
+" por voki komandojn de disko malgraÅ­ la ekzisto de samnomaj\n"
+" funkcioj.\n"
+"\n"
+" Opcioj:\n"
+" -p Uzu la defaÅ­ltan valoron de la de la variablo $PATH (tio\n"
+"\tebligas trovi ĉiujn normajn utilaĵojn)\n"
+" -v\tEligu komandopriskribon laŭ la maniero de la primitivaĵo „type‟\n"
+" -V\tEligu pli detalan priskribon de KOMANDO\n"
+"\n"
+" Elirstato:\n"
+" Tiu de KOMANDO; aÅ­ malsukceso, se KOMANDO ne troveblas."
+
+# declare [-afFirtx] [-p] [name[=value] ...]
+# declare [-aAfFilrtux] [-p] [NOMO[=VALORO] ...]
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Difinu valorojn aÅ­ atributojn de variabloj\n"
+"\n"
+" Deklaru variablojn aÅ­ valorizu ilin per atributoj.\tSe NOMOj\n"
+" mankas, anstataŭe eligu la valoron de ĉiuj variabloj.\n"
+"\n"
+" Opcioj:\n"
+" -f\tla ago aÅ­ eligo koncernu nur la funkciajn NOMOjn kaj difinojn\n"
+" -F\teligu nur funkcinomojn (ĉe erarserĉo, ankaŭ lininumeron kaj\n"
+"\tfontodosieran nomon) sen difinoj\n"
+" -p\teligu la atributojn kaj la valorojn de ĉiu NOMO\n"
+"\n"
+" Opcioj atributdonaj:\n"
+" -a\tfaru la NOMOjn poziciaj tabeloj (se realigite)\n"
+" -A\tfaru la NOMOjn asocitabeloj (se realigite)\n"
+" -i\thavigu al la variabloj NOMOj la atributon „integer‟ (entjera)\n"
+" -l\tminuskligu la NOMOjn ĉe valorizo\n"
+" -r\tfaru la variablojn NOMOj nurlegaj\n"
+" -t\thavigu al la NOMOj la atributon „trace‟ (spurata)\n"
+" -u\tmajuskligu la NOMOjn ĉe valorizo\n"
+" -x\teksportu la variablojn NOMOj\n"
+"\n"
+" La uzo de „+‟ anstataÅ­ „-‟ malÅaltas la koncernan attributon.\n"
+" Uzite en funkcio, „declare‟ faras la NOMOjn lokaj, samkiel la\n"
+" komando „local‟.\n"
+"\n"
+" Ĉe valorizo de variablo havanta atributon „integer‟ (entjera)\n"
+" okazas aritmetika komputado (vd „let‟).\n"
+"\n"
+" Eliistato:\n"
+" Sukceso, krom se aperas misa opcio aÅ­ okazas eraro."
+
+# typeset [-aAfFilrtux] [-p] name[=value] ...
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+"Difinu atributojn kaj valorojn de variabloj\n"
+"\n"
+" Arkaika. Vd «help declare»."
+
+# local [option] name[=value] ...
+# local [OPCIO] NOMO[=VALORO] ...
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+"Difinu lokajn variablojn\n"
+"\n"
+" Kreu lokan variablon NOMO kaj Äin valorizu per VALORO. OPCIO\n"
+" povas esti ajna el la opcioj de „declare‟.\n"
+"\n"
+" Lokaj variabloj uzeblas nur ene de funkcio; ili estas videblaj nur\n"
+" en la funkcio kie ili estas difinitaj kaj en Äiaj idoj.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se aperas misa opcio, okazas eraro, aÅ­ la Åelo ne\n"
+" estas plenumanta funkcion."
+
+# echo:
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Eligu la argumentojn en la ĉefeligujon\n"
+"\n"
+" Eligu la ARGojn en la ĉefeligujon, postmetu linirompon.\n"
+"\n"
+" Opcioj:\n"
+" -n\tne aldonu la finan linirompon\n"
+" -e\taktivigu interpretadon de la ĉi-subaj deklivaĵoj\n"
+" -E\tmalaktivigu interpretadon de la ĉi-subaj deklivaĵoj\n"
+"\n"
+" „echo‟ povas interpreti la sekvajn literojn prefiksitajn per\n"
+" deklivo (per la signo „\\‟):\n"
+"\t\\a\tpepo (sonsignalo)\n"
+"\t\\b\tretropaÅo\n"
+"\t\\c\tĉesigu pluan eligon\n"
+"\t\\e\teskapsigno\n"
+"\t\\f\tpaÄ-avanco\n"
+"\t\\n\tlinifino\n"
+"\t\\r\tĉaretreveno\n"
+"\t\\t\thorizontala tabo\n"
+"\t\\v\tvertikala tabo\n"
+"\t\\\\\tdeklivo „\\‟\n"
+"\t\\0CCC\tla signo kies Askia kodono estas CCC (okume). CCC\n"
+"\t\tpovas enteni 0, 1, 2 aÅ­ 3 okumajn ciferojn\n"
+"\t\\0xHH\tla signo kies 8-bita kodono estas HH (16-ume). HH\n"
+"\t\tpovas enteni unu aÅ­ du 16-umajn ciferojn\n"
+"\n"
+" Elirstato:\n"
+" Sukcesa, krom se okazas elig-eraro."
+
+# echo [-n] [ARG ...]
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Skribu argumentojn en la ĉefeligujon\n"
+"\n"
+" Eligu la ARGojn en la ĉefeligujon, aldonu linifinilon.\n"
+"\n"
+" Opcio:\n"
+" -n Ne aldonu postan linifinilon\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se okazas skriberaro."
+
+# enable [-a] [-dnps] [-f filename] [name ...]
+# enable [-a] [-dnps] [-f DOSIERNOMO] [NOMO ...]
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+"Aktivigu aÅ­ malaktivigu primitivajn komandojn\n"
+"\n"
+" Aktivigu aÅ­ malaktivigu primitivajn Åelkomandojn. Tio ebligas\n"
+" uzi eksteran komandon, samnoman kun primitivaĵo, sen indiki\n"
+" Äian plenan vojon.\n"
+"\n"
+" Opcioj:\n"
+" -a\tListigu la primitivaĵojn indikante, ĉu ili estas aktivaj\n"
+" -n Malaktivigu la NOMOjn, aŭ listigu la malaktivajn primitivaĵojn\n"
+" -p\tListigu primitivaĵojn en formo taŭga por reuzo\n"
+" -s Eligu nur la «specialajn» Åelfunkciojn de Posix\n"
+"\n"
+" Opcioj regantaj dinamikan Åargadon:\n"
+" -f\tŜargu primitivaĵon NOMO el la dinamika biblioteko DOSIERNOMO\n"
+" -d Forigu Åelkomandon dinamike Åargitan per -f\n"
+"\n"
+" Senopcie: Aktivigu ĉiujn NOMOjn\n"
+"\n"
+" Ekz-e por uzi la „test‟on troveblan en $PATH anstataŭ la\n"
+" samnoman primitivan Åelkomandon, diru: «enable -n test».\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se NOMO ne estas primitiva Åelkomando aÅ­ okazis\n"
+" eraro."
+
+# eval [ARG ...]
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+"Plenumu argumentojn kiel Åelkomandon\n"
+"\n"
+" Kunmetu la ARGojn en unu ĉenon, uzu la rezulton kiel enigaĵon por\n"
+" la Åelo kaj plenumu la legita(j)n komando(j)n.\n"
+"\n"
+" Elirstato:\n"
+" Tiu de la komandoĉeno; sukceso, se la komando estas vakua."
+
+# getopts optstring name [arg] =>
+# getopts OPCIĈENO NOMO [ARG]
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+"Analizu opciajn argumentojn\n"
+"\n"
+" La funkcion „getopts‟ uzas Åelproceduroj por analizi opciformajn\n"
+" numerparametrojn.\n"
+"\n"
+" La argumento OPCIĈENO entenas la rekonendajn opciliterojn; se\n"
+" literon sekvas dupunkto, la opcio postulas argumenton, disde Äi\n"
+" apartigendan per blanka spaco.\n"
+"\n"
+" Ĉe ĉiu voko „getopts‟ liveros la vican opcion en la Åelvariablon\n"
+" $NOMO (estigante la variablon se Äi ne ekzistas); kaj la indicon\n"
+" de la sekve traktota argumento en la Åelvariablon OPTIND. OPTIND\n"
+" ricevas la komencan valoron 1 ĉe ĉiu voko de la Åelo aÅ­ Åela\n"
+" skripto. Kiam opcio bezonas argumenton, „getopts‟ liveras tiun\n"
+" argumenton en la Åelvariablon OPTARG.\n"
+"\n"
+" La funkcio „getopts‟ raportas pri eraroj dumaniere. Se la unua\n"
+" signo de OPCIĈENO estas dupunkto, „getopts‟ prisilentas\n"
+" erarojn. En tiu reÄimo, nenia erarmesaÄo estas eligata.\n"
+" Renkontinte misan opcion, „getopts‟ metas la trovitan opciliteron\n"
+" en OPTARG. Se mankas bezonata argumento, la Åelvariablo NOMO\n"
+" ricevas la valoron ':', kaj la variablo OPTARG, la trovitan\n"
+" opcion. Se „getopts‟ ne estas en silenta reÄimo kaj trovas\n"
+" misan opcion, tiam NOMO ricevas la valoron '?' kaj OPTARG\n"
+" senvaloriÄas. Se mankas bezonata opcio, NOMO ricevas la\n"
+" valoron '?', OPTARG senvaloriÄas kaj erarmesaÄo estas eligata.\n"
+"\n"
+" Se la Åelvariablo OPTERR havas la valoron 0, „getopts‟\n"
+" malaktivigas la eligon de erarmesaÄoj, eĉ se la unua signo de\n"
+" OPCIĈENO ne estas dupunkto. La apriora valoro de OPTERR estas 1.\n"
+"\n"
+" Normale „getopts‟ analizas la numerparametrojn ($0 - $9), sed se\n"
+" estas pli da argumentoj, „getopts‟ anstataŭe analizas ilin.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, se opcio estas trovita; malsukceso, se renkontiÄis\n"
+" la fino de la opcioj aÅ­ okazis eraro."
+
+# exec [-cl] [-a name] [command [arguments ...]] [redirection ...]
+# exec [-cl] [-a NOMO] [KOMANDO [ARGUMENTOJ ...]] [ALIDIREKTADO ...]
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+"AnstataÅ­igu la Åelon je la donita komando\n"
+"\n"
+" Plenumu la KOMANDOn, anstataÅ­igante la Åelon je la donita\n"
+" programo. La ARGUMENTOj servas kiel argumentoj por KOMANDO.\n"
+" Se KOMANDO ne estas indikita, la alidirektadoj okazu en \n"
+" la kuranta Åelo.\n"
+"\n"
+" Opcioj:\n"
+" -a NOMO Pasigu NOMOn al KOMANDO kiel la argumenton argv[0]\n"
+" -c\tLa plenumo de KOMANDO okazu en vakua medio\n"
+" -l\tMetu minuson en la nulan argumenton pasigatan al KOMANDO\n"
+"\n"
+" Se la komandon ne eblas plenumi kaj la Åelo ne estas dialoga, tiam\n"
+" la Åelo finiÄas, krom se la opcio „execfail‟ estas aktiva.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se KOMANDO ne estas trovita aÅ­ okazis eraro pri\n"
+" alirektado."
+
+# exit [n]
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"Forlasu la Åelon\n"
+"\n"
+" Forlasu la Åelon kun elirstato N. Se N mankas, la elirstato\n"
+" estas tiu de la plej ĵuse plenumita komando."
+
+# logout [N]
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+"AdiaÅ­, saluta Åelo!\n"
+"\n"
+" Eliru el saluta Åelo kun la elirstato N. Liveru malsukceson, se\n"
+" plenumate ne en saluta Åelo."
+
+# ZZZ: fc [-e ename] [-nlr] [first] [last] or
+# fc -s [pat=rep] [command] =>
+# fc [-e REDAKTILO] [-lnr] [UNUA] [LASTA] aÅ­
+# fc -s [ÅœABLONO=ANST] [KOMANDO]
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+"Eligu aÅ­ plenumu komandojn el la historilisto\n"
+"\n"
+" „fc‟ servas por listigi aŭ redakti kaj replenumi komandojn el la\n"
+" historilisto. UNUA kaj LASTA povas esti numeroj, indikantaj\n"
+" intervalon da numeroj; aÅ­, se UNUA estas signoĉeno, Äi indikas\n"
+" la plej ĵusan komandon komenciÄantan per tiu signoĉeno.\n"
+"\n"
+" Opcioj:\n"
+" -e REDAKTILO\tla uzota redaktilo. DefaÅ­lte FCEDIT, poste\n"
+"\tEDITOR, poste „vi‟\n"
+" -l\tnur eligu la liniojn sen redakti ilin\n"
+" -n\teligu sennumere (nur la liniojn)\n"
+" -r\tinversigu la ordon de la linioj (komencu per la plej ĵusaj).\n"
+"\n"
+" «fc -s [ŜABLONO=ANST ...] [KOMANDO]» plenumas la KOMANDOn en kiu\n"
+" ĉiu apero de ŜABLONO estas la anstataŭigita je ANST.\n"
+"\n"
+" Oportuna alinomo por tio estas «alias r='fc -s'», tiel ke ekz-e per\n"
+" «r cc» oni rulos la plej ĵusan komandon komenciÄantan per «cc», kaj\n"
+" per «r» replenumigas la ĵusan komandon.\n"
+"\n"
+" Elisrstato:\n"
+" Sukceso, aÅ­ la elirstato de la plenumita KOMANDO; nenulo, se okazis\n"
+" eraro."
+
+# fg [job_spec] => fg [LABORINDIKO]
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"Movu laboron en la dialogon\n"
+"\n"
+" Faru la laboron LABORINDIKO dialoga kaj la kuranta. Se\n"
+" LABORINDIKO malestas, apliku la Åelan koncepton pri la kuranta\n"
+" laboro.\n"
+"\n"
+" Elirstato:\n"
+" Tiu de la dialogigita komando; aÅ­ malsukceso, se okazis eraro."
+
+# bg [job_spec] => bg [LABORINDIKO]
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"ForÅovu laboron fonen\n"
+"\n"
+" ForÅovu la laboron LABORINDIKO en la fonon, faru Äin kvazaÅ­\n"
+" lanĉita kun „&‟. Se nenia laboro estas indikita, apliku la\n"
+" Åelan koncepton pri la kuranta laboro.\n"
+"\n"
+" Elirstato:\\n\"\n"
+" Sukceso, kondiĉe ke laborregadon estas Åaltita kaj ne okazis\n"
+" eraro."
+
+# hash [-lr] [-p VOJNOMO] [-dt] [NOMO ...]
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+"Registru aÅ­ vidigu vojnomojn de programoj\n"
+"\n"
+" Por ĉiu komando NOMO, trovu kaj registru en hakettabelo la\n"
+" kompletan vojon al ties programo. Se nenia argumento estas\n"
+" donita, eligu la informojn pri la memorataj komandoj.\n"
+"\n"
+" Opcioj:\n"
+" -d Forgesu la registritajn vojojn por ĉiu NOMO\n"
+" -l Eligu en formo reuzeblan por enigo\n"
+" -p VOJNOMO\tuzu VOJNOMOn kiel kompletan vojon por la NOMO\n"
+" -r Forgesu ĉiujn registritajn vojojn\n"
+" -t Eligu la registritajn vojojn por ĉiu NOMO, mentante la NOMOn\n"
+" titole antaÅ­ Äia vojo se estas pluraj NOMOj\n"
+"\n"
+" Argumentoj:\n"
+" NOMO Ĉiu NOMO estas serĉota en $PATH kaj registrota en la\n"
+"\thakettabelo de registritaj komandoj\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se aperas netrovebla NOMO aÅ­ misa opcio."
+
+# help [-ds] [pattern ...]
+# help [-ds] [ÅœABLONO ...]
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+"Vidigu informon pri prmitivaj komandoj\n"
+"\n"
+" Eligu mallongan resummon pri la primitivaj komandoj. Se ĉeestas\n"
+" ŜABLONO, eligu detalan helpon pri ĉiuj komandoj kongruaj kun la\n"
+" Åablono; alie eligu nur liston da temoj.\n"
+"\n"
+" Opcioj:\n"
+" -d\tEligu mallongajn priskribojn de ĉiuj temoj\n"
+" -m\tVidigu uzmanieron en la „manpaÄa‟ stilo (kiel la komando „man‟)\n"
+" -s\tEligu nur mallongan resumon pri ĉiu trovita kongruaĵo\n"
+"\n"
+" Argumentoj:\n"
+" ŜABLONO Komenca signoĉeno de temtitolo\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se mankas kongruaĵoj por ŜABLONO, aŭ aperis\n"
+" misa opcio."
+
+# ZZZ history [-c] [-d offset] [n] or
+# history -awr [filename] or
+# history -ps arg [arg...] =>
+# history [-c] [-d DEÅœOVO] [n] aÅ­
+# history -awr [DOSIERNOMO] aÅ­
+# history -ps ARG [ARG...]
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Eligu aÅ­ redaktu la historiliston\n"
+"\n"
+" Eligu la liston de enigitaj komandoj kun lininumeroj. La ÅanÄitajn\n"
+" liniojn marku per „*‟. Kun argumento n, eligu nur la ĵusajn\n"
+" n liniojn.\n"
+"\n"
+" Opcioj:\n"
+" -c\tforviÅu la tutan historion (forigu ĉiujn eroj el la listo)\n"
+" -d forviÅu la linion kies numero estas DEÅœOVO\n"
+"\n"
+" -a\taldonu la historiliniojn de la kuranta seanco al la\n"
+" historidosiero\n"
+" -n\tlegu ĉiujn ankoraŭ ne legitajn liniojn el la historidosiero\n"
+" kaj aldonu ilin en la historiliston\n"
+" -r legu la dosieron kaj aldonu Äian enhavon al la kuranta\n"
+" historilisto\n"
+" -w konservu la kurantan historion en la historidosiero\n"
+"\n"
+" -p plenumu historian anstataŭigon por ĉiu el la argumentoj ARG\n"
+" kaj eligu la rezulton sen konservi ion en la historilisto\n"
+"\n"
+" -s enÅovu la neopciajn argumentojn ARG en la historiliston\n"
+" kiel unu apartan linion\n"
+"\n"
+" Se ĉeestas DOSIERNOMO, uzu Äin kiel nomon de historidosiero;\n"
+" alie, se la variablo $HISTFILE havas valoron, uzu ĉi tiun;\n"
+" alie uzu «~/.bash_history».\n"
+"\n"
+" Se la variablo $HISTTIMEFORMAT havas valoron kaj se ĉi tiu ne\n"
+" estas null, tiam Äi servu kiel formata ĉeno en strftime(3) por\n"
+" tempostampi ĉiun linion en eligaĵoj de historio. Aliokaze nenia\n"
+" tempostampo estu eligata.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se renkontiÄas mis opcio aÅ­ okazis eraro."
+
+# ZZZ jobs [-lnprs] [jobspec ...] or
+# jobs -x command [args] =>
+# jobs [-lnprs] [LABORINDIKO ...] aÅ­
+# jobs -x KOMANDO [ARGS]
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+"Montru la staton de laboroj\n"
+"\n"
+" Eligu liston da aktivaj laboroj. Se LABORINDIKO estas donita,\n"
+" nur pri tiu laboro informu. Senopcie, montru la staton de ĉiuj\n"
+" aktivaj laboroj.\n"
+"\n"
+" Opcioj:\n"
+" -l eligu, krom la normalajn informojn, ankaÅ­ la proceznumerojn\n"
+" -n listigu nur la procezojn kies stato ÅanÄiÄis post la lasta\n"
+" informmendo\n"
+" -p eligu nur la proceznumerojn\n"
+" -r informu nur pri la laboroj aktivaj (rulataj)\n"
+" -s informu nur pri la laboroj haltigitaj\n"
+"\n"
+" La opcio -x lanĉas la KOMANDOn, antaÅ­e ÅanÄinte ĉiujn\n"
+" laborindikojn aperantajn en la argumentoj ARGS je la\n"
+" proceznumero de la ĉefprocezo de la grupo.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se enestas misa opcio aÅ­ okazis eraro.\n"
+" Ĉe „-x‟, la elirstato de la KOMANDO."
+
+# disown [-h] [-ar] [jobspec ...]
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+"Forigu laborojn el la kuranta Åelo\n"
+"\n"
+" Forigu ĉiun laboron indikitan per argumento LABORINDIKO el\n"
+" la tabelo de aktivaj laboroj. Se nenia laboro estas indikita,\n"
+" apliku la Åelan koncepton pri la kuranta laboro.\n"
+"\n"
+" Opcioj:\n"
+" -a forigu ĉiujn laborojn el la labortabelo\n"
+" -h anstataÅ­ forigi laboron el la tabelo, marku Äin tiel, ke la\n"
+" signalo SIGHUP ne estu plusendita al la laboro(j) kiam tian\n"
+" signalon ricevas la Åelo\n"
+" -r forigu nur rulatajn laborojn\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se enestas misa opcio aÅ­ LABORINDIKO."
+
+# ZZZ: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or
+# kill -l [sigspec] =>
+# kill [-s SIGSNOM | -n SIGNUM | -SIGNOM] PN | LABORINDIKO ... aÅ­
+# kill -l [SIGNOM]
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Sendu signalon al laboro\n"
+"\n"
+" Sendu al la procezoj, indikitaj per sia proceznumero PN (aÅ­\n"
+" per la LABORINDIKO) la signalon SIGNOM aÅ­ SIGNUM. Se nek\n"
+" SIGNUM nek SIGNOM enestas, sendu SIGTERM.\n"
+"\n"
+" Opcioj:\n"
+" -s\tSIGNOM estas nomo de signalo\n"
+" -n\tSIGNUM estas numero de signalo\n"
+" -l listigu signalnomojn; la eventuale sekvantaj entjeraj\n"
+" argumentoj estas signalnumeroj, ĉeeste de kiuj nur la al\n"
+" ili respondaj signalnomoj estu eligataj.\n"
+"\n"
+" „kill‟ estas primitiva Åelkomando pro du kaÅ­zoj:\n"
+" unue, Äi ebligas uzi laborindikojn anstataÅ­ proceznumerojn;\n"
+" kaj due, se la maksimuma nombro de kreeblaj procezoj estas\n"
+" atingita, ne necesas lanĉi kroman procezon por ĉesigi iun alian.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se enestas misa opcio aÅ­ okazis eraro."
+
+# let arg [arg ...]
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+"Komputu aritmetikan esprimon\n"
+"\n"
+" Ĉiu arg estas komputenda aritmetika esprimo. La komputado uzas\n"
+" fikslongajn entjerojn sen kontrolo pri trooj; tamen divido per 0\n"
+" estas kaptata kaj raportata kiel eraro. En la sekvanta listo\n"
+" da operacioj la samprioritataj operacisimboloj aperas kune.\n"
+" La grupoj estas aranÄitaj laÅ­ malkresko de ligforto.\n"
+"\n"
+"\tnomo++, nomo--\tpostkrementoj de variablo\n"
+"\t++nomo, --nomo\tantaÅ­krementoj de variablo\n"
+"\t-, +\t\tunulokaj minus, plus\n"
+"\t!, ~\t\tlogika kaj laÅ­bita negoj\n"
+" ** potencigo\n"
+"\t*, /, %\t\tmultipliko, divido, resto\n"
+"\t+, -\t\tadicio, subtraho\n"
+"\t<<, >>\t\tlaÅ­bitaj Åovoj maldekstren kaj dekstren\n"
+"\t<=, >=, <, >\tkomparaj operacioj\n"
+"\t==, !=\t\tegalo, neegalo\n"
+"\t&\t\tlaÅ­bita KAJ\n"
+"\t^\t\tlaŭbita DISAŬ\n"
+"\t|\t\tlaŭbita AŬ\n"
+"\t&&\t\tlogika KAJ\n"
+"\t||\t\tlogika AŬ\n"
+"\tesprimo ? esprimo : esprimo\n"
+"\t\t\tkondiĉa esprimo\n"
+"\t=, *=, /=, %=,\n"
+"\t+=, -=, <<=, >>=,\n"
+"\t&=, ^=, |=\tvalorizoj\n"
+"\n"
+" Åœelvariabloj uzeblas kiel operandoj. En esprimo la nomon de\n"
+" variablo anstataÅ­as Äia valoro (altipigita al fikslonga entjero).\n"
+" Por tia uzo en esprimo variablo ne bezonas havi Åaltita sian\n"
+" atributon „integer‟ (entjera).\n"
+"\n"
+" La operacioj plenumiÄas laÅ­ la ligforto de siaj operacisignoj. La\n"
+" enkrampigitaj subesprimoj plenumiÄas unue, kaj tio ebligas\n"
+" ĉirkaŭiri la supre priskribitajn regulojn pri la ligfortoj.\n"
+"\n"
+" Elirstato:\n"
+" Se la komputo de la lasta arg donas 0, la komando „let‟\n"
+" liveras 1; alie Äi liveras 0."
+
+# read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-p prompt]
+# [-t timeout] [-u fd] [name ...]
+# read [-ers] [-a TABELO] [-d DISIG] [-i TEKSTO] [-n NSIGN] [-p INVIT]
+# [-t TLIM] [-u DN] [NOMO ...]
+#: builtins.c:966
+#, fuzzy
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+"Legu linion el la ĉefenigujo kaj disigu Äin en kampojn\n"
+"\n"
+" Legu unu linion el la ĉefenigujo, aŭ el la dosiero indikita\n"
+" per dosiernumero DN, se la opcio -u estas donita. La linion\n"
+" disigu en kampojn, kiel ĉe vortodisigo, kaj la unuan vorton ricevu\n"
+" la unua argumento NOMO; la duan, la dua NOMO ktp; la lasta NOMO\n"
+" ricevu ĉiujn restantajn vortojn. Nur la signoj troveblaj en la\n"
+" variablo $IFS rolas kiel vortodisigiloj.\n"
+"\n"
+" Se nenia NOMO estas donita, konservu la legitan linion en la\n"
+" variablo REPLY.\n"
+"\n"
+" Opcioj:\n"
+" -a TABELO\tla legatajn vortojn konservu en la sinsekvaj anoj de\n"
+"\t\tTABELO, komencante ekde la indico 0\n"
+" -d DISIG\tlegu Äis la unua signo de la disigilo DISIG (anstataÅ­\n"
+"\t\tlegi Äis linifino)\n"
+" -e\t\tuzu Readline por akiri la linion en dialoga Åelo\n"
+" -i TEKSTO\tuzu TEKSTOn kiel komencan tekston por Readline\n"
+" -n NSIGN\tĉesu leginte NSIGN da signoj (anstataÅ­ legi Äis\n"
+"\t\tlinifino)\n"
+" -p INVIT\teligu de la invitĉenon\tINVIT sen liniavanco antaŭ la\n"
+"\t\tatendata enigo\n"
+" -r\t\tla deklivo „\\‟ estu ordinara signo (ne eskapsigno)\n"
+" -s\t\tsilentigu la eĥon de la terminala enigo\n"
+" -t TLIM\tla komando read ĉesiÄu kun fiaska elirstato se\n"
+"\t\tkompleta linio da enigaĵo ne estas ricevita dum\t TLIM\n"
+"\t\tda sekundoj. Se la variablo TMOUT havas valoron, ĉi\n"
+"\t\ttiu estas uzata kiel defaÅ­lta atendolimo. TLIM povas\n"
+"\t\testi frakcio. Se TLIM estas 0,\t read sukcesas nur se\n"
+"\t\tla engaĵo pretas ĉe la indikita dosiernumero. La\n"
+"\t\telirstato estas pli granda ol 128 se la atendotempo\n"
+"\t\testas atingita\n"
+" -u DN\tlegu per la dosiernunero DN anstataŭ el la ĉefenigujo\n"
+"\n"
+" Elirstato:\n"
+" Äœi estas 0, krom se renkontiÄas dosierfino, aÅ­ atendolimo estas\n"
+" atingita, aÅ­ -u indikas nevalidan dosiernumeron."
+
+# return [n]
+# return [N]
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+"Revenu el Åelfunkcio\n"
+"\n"
+" Igas la funkcion aÅ­ punkte vokitan („.‟, „source‟) skripton finiÄi\n"
+" kaj liveri la donitan valoron N kiel elirstaton. Se N mankas,\n"
+" la elirstato estas tiu de la ĵusa komando.\n"
+"\n"
+" Elirstato:\n"
+" N, aÅ­ malsukceso se la Åelo ne plenumas Åelfunkcion aÅ­ skripton."
+
+# set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]
+# set [--abefhkmnptuvxBCHP] [-o OPCINOMO] [ARG ...]
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+"Donu aÅ­ forprenu valorojn de Åelvariabloj kaj numerparametroj.\n"
+"\n"
+" ÅœanÄu la valoron de Åelatributoj kaj numerparametroj, aÅ­ vidigu la\n"
+" nomojn kaj valorojn de Åelvariabloj.\n"
+"\n"
+" Opcioj:\n"
+" -a\tMarku eksportendaj la variablojn ÅanÄitajn aÅ­ kreitajn\n"
+" -b\tTuj sciigu pri finiÄo de fonaj laboroj\n"
+" -e\tEliru tuj se ajna komando finiÄis kun elirstato alia ol 0\n"
+" -f\tMalÅaltu generadon de dosiernomoj (globbing)\n"
+" -h\tRegistru en hakettabelo la situon de komandoj serĉataj\n"
+" -k\tĈiujn valorizojn en ajna parto de komandolinio rigardu\n"
+"\tkiel valorizojn de Åelvariabloj por la labormedio de la\n"
+"\tkomando, ne nur la valorizojn antaÅ­ la komandonomo\n"
+" -m\tAktivigu la laborregadon\n"
+" -n\tLegu la komandojn sen plenumi ilin\n"
+" -o OPCINOMO\n"
+"\tAktivigu la variablon respondan al la OPCIONOMO:\n"
+"\t allexport\tsamkiel -a\n"
+"\t braceexpand\tsamkiel -B\n"
+"\t emacs\tuzu emakseskan interfacon por liniredaktado\n"
+"\t errexit\tsamkiel -e\n"
+"\t errtrace\tsamkiel -E\n"
+"\t functrace\tsamkiel -T\n"
+"\t hashall\tsamkiel -h\n"
+"\t histexpand\tsamkiel -H\n"
+"\t history\tebligu komandohistorion\n"
+"\t ignoreeof\tla Åelo ne finiÄu leginte dosierfinilon\n"
+"\t interactive-comments\n"
+"\t\t\ttoleru komentojn en dialogaj komandoj\n"
+"\t keyword\tsamkiel -k\n"
+"\t monitor\tsamkiel -m\n"
+"\t noclobber\tsamkiel -C\n"
+"\t noexec\tsamkiel -n\n"
+"\t noglob\tsamkiel -f\n"
+"\t notify\tsamkiel -b\n"
+"\t nounset\tsamkiel -u\n"
+"\t onecmd\tsamkiel -t\n"
+"\t physical\tsamkiel -P\n"
+"\t pipefail\tla elirstato de dukto estu la elirstato\n"
+"\t\t\tde la lasta komando finiÄinta nenule, aÅ­\n"
+"\t\t\t0, se neniu komando alie finiÄis\n"
+"\t posix\tÅanÄu la konduton de BaÅo ĉie kie Äia defaÅ­lta\n"
+"\t\t\tfunkciado devias disde Pozikso, tiel ke Äi\n"
+"\t\t\tkonformu al tiu normo\n"
+"\t privileged\tsamkiel -p\n"
+"\t verbose\tsamkiel -v\n"
+"\t vi\t\tuzu vi-eskan interfacon por liniredaktado\n"
+"\t xtrace\tsamkiel -x\n"
+" -p\tPrivilegia reÄimo, aktiviÄas meme kiam la reala kaj efektiva\n"
+"\tidentoj de la uzanto malkongruas. La dosiero $ENV ne estas\n"
+"\ttraktata, nek la Åelfunkcioj, importataj el la medio.\n"
+"\tMalaktivigo de tiu opcio ÅanÄas la efektivajn uid kaj gid\n"
+"\tlaÅ­ la realaj uid kaj gid\n"
+" -t\tFinu la Åelon leginte kaj plenuminte unu komandon\n"
+" -u\tProvo anstataÅ­igi senvaloran variablon estu eraro\n"
+" -v\tEligu la komandoliniojn legatajn\n"
+" -x\tEligu la plenumotajn komandojn kaj iliajn argumentojn\n"
+" -B\tLa Åelo faru vinkulmalvolvon\n"
+" -C\tSe aktiva, malebligu skribdifekti ekzistantajn ordinarajn\n"
+"\tdosierojn per alidirektado de la eligo\n"
+" -E\tSe aktiva, la ERR-kaptilon (ERR trap) heredas la Åelaj\n"
+"\tfunkcioj\n"
+" -H\tEbligu atingi la historion !-stile. DefaÅ­lte la opcio estas\n"
+"\taktiva en la dialogaj Åeloj.\n"
+" -P\tNe sekvu simbolajn ligilojn plenumante komandojn ÅanÄantajn\n"
+"\tla kurantan dosierujon („cd‟ ktp)\n"
+" -T\tSe aktiva, la DEBUG-kaptilon (DEBUG trap) heredas la Åelaj\n"
+"\tfunkcioj\n"
+" -\tLa restantajn argumentojn uzu por valorizi la\n"
+" numerparametrojn. La opcioj -x kaj -v malaktiviÄas.\n"
+"\n"
+" Uzante la signon + anstataÅ­ - vi povas malÅalti la opcion. La\n"
+" opciojn ankaÅ­ eblas uzi ĉe la voko de la Åelo. La kuranta aro da\n"
+" aktivaj opcioj troveblas en $-. La restantaj n argumentoj ARG\n"
+" iÄas valoroj de la numervariabloj $1, $2 ... $n (en tiu ordo).\n"
+" Senargumente, eligu ĉiujn Åelvariablojn.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se renkontiÄas misa opcio."
+
+# unset [-f] [-v] [name ...]
+# unset [-f] [-v] [NOMO ...]
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+"Forigu valorojn kaj atributojn de Åelaj funkcioj kaj variabloj\n"
+"\n"
+" Por ĉiu NOMO, forigu la respondan variablon aŭ funkcion.\n"
+"\n"
+" Opcioj:\n"
+" -f\ttraktu ĉiun NOMOn kiel funkcion\n"
+" -v traktu ĉiun NOMOn kiel variablon\n"
+"\n"
+" Se neniu el la du opcioj estas indikita, „unset‟ unue provos\n"
+" forigi variablon, kaj se tia ne troviÄos, funkcion.\n"
+"\n"
+" Iujn variablojn ne eblas forigi. Vd ankaÅ­ la helpon pri\n"
+" „readonly‟.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se aperis misa opcio aÅ­ NOMO estas nurlega."
+
+# export [-fn] [name[=value] ...] or export -p
+# export [-fn] [NOMO[=VALORO] ...] aÅ­ export -p
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Marku Åelvariablojn kiel eksportajn\n"
+"\n"
+" Marku la NOMOjn por aÅ­tomata eksporto en la medion de la\n"
+" plenumotaj komandoj. Se ĉeestas VALORO, uzu Äin por valorizi\n"
+" NOMOn antaÅ­ ol eksporti.\n"
+"\n"
+" Opcioj:\n"
+" -f\ttemas pri Åelfunkcioj\n"
+" -n\tforviÅu la eksportomarkon de la NOMOj\n"
+" -p\teligu la liston de ĉiuj eksportaj variabloj kaj funkcioj\n"
+"\n"
+" La opcio „--‟ ĉesigas pluan opcitraktadon.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se aperis nevalida NOMO aÅ­ misa opcio."
+
+# readonly [-af] [name[=value] ...] or readonly -p
+# readonly [-aAf] [NOMO[=VALORO] ...] aÅ­ readonly -p
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Faru Åelvariablojn neÅanÄeblaj\n"
+"\n"
+" La donitaj NOMOj iÄas nurlegaj kaj la valorojn de tiuj nomoj\n"
+" ne povas ÅanÄi posta valorizo. Se ĉeestas VALORO, uzu Äin por\n"
+" valorizi la NOMOn antaÅ­ ol fari Äin nurlega.\n"
+"\n"
+" Opcioj:\n"
+" -a\ttemas pri pozicitabela signifo de plursignifa NOMO\n"
+" -A\ttemas pri asocitabela signifo de plursignifa NOMO\n"
+" -f\ttemas pri Åelfunkcia signifo de plursignifa NOMO\n"
+" -p\teligu ĉiujn nurlegajn variablojn kaj funkciojn\n"
+"\n"
+" La opcio „--‟ ĉesigas pluan opcitraktadon.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se aperas nevalida nomo aÅ­ misa opcio."
+
+# shift [n]
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+"Åœovu numerparametrojn\n"
+"\n"
+" La numerparametrojn $N+1, $N+2 ... renumeru al $1, $2 ...\n"
+" Se N ne estas indikita, uzu 1 anstataÅ­e."
+
+# source filename [arguments]
+# source DOSIERNOMO [ARGUMENTOJ]
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+"Plenumu komandojn el dosiero en la kuranta Åelo\n"
+"\n"
+" Legu kaj plenumu la komandojn el DOSIERNOMO en la kuranta Åelo.\n"
+" Uzu la vojojn el la variablo $PATH por trovi la dosierujon de\n"
+" DOSIERNOMO. La eventualaj ARGUMENTOJ iÄas la numerparametroj por\n"
+" plenumo de DOSIERNOMO.\n"
+"\n"
+" Elirstato:\n"
+" Tiu de la komando laste plenumita en DOSIERNOMO; malsukceso, se\n"
+" DOSIERNOMO ne legeblas."
+
+# suspend [-f]
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Haltetigu la plenumon de la Åelo\n"
+"\n"
+" Haltetigu la plenumon de la Åelo Äis Äi ricevos la signalon SIGCONT.\n"
+" Krom se per superforto, salutan Åelon ne eblas haltetigi.\n"
+"\n"
+" Opcio:\n"
+" -f\tSuperforte haltetu, eĉ se la Åelo estas saluta Åelo\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se laborregado estas malÅaltita aÅ­ okazis eraro."
+
+# test [expr]
+# test [ESPRIMO]
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+"Komputu kondiĉan esprimon\n"
+"\n"
+" Liveru elirstaton 0 (vera) aÅ­ 1 (malvera) laÅ­ la rezulto de\n"
+" komputado de la ESPRIMO. La esprimoj povas esti unulokaj aÅ­\n"
+" dulokaj. La unulokaj plejparte servas por determini la \n"
+" statuson de dosiero. Krome, estas operacioj super ĉenoj kaj la\n"
+" nombrokomparaj operacioj.\n"
+"\n"
+" Operacioj super dosieroj:\n"
+"\n"
+"\t-a DOSIERO\tVera se DOSIERO ekzistas\n"
+"\t-b DOSIERO\tVera se DOSIERO estas por bloka eneligo\n"
+"\t-c DOSIERO\tVera se DOSIERO estas por bajta eneligo\n"
+"\t-d DOSIERO\tVera se DOSIERO estas dosierujo\n"
+"\t-e DOSIERO\tVera se DOSIERO ekzistas\n"
+"\t-f DOSIERO\tVera se DOSIERO ekzistas kaj estas ordinara\n"
+"\t-g DOSIERO\tVera se DOSIERO havas set-group-id = 1\n"
+"\t-h DOSIERO\tVera se DOSIERO estas simbola ligilo\n"
+"\t-L DOSIERO\tVera se DOSIERO estas simbola ligilo\n"
+"\t-k DOSIERO\tVera se la DOSIERO havas sticky = 1\n"
+"\t-p DOSIERO\tVera se DOSIERO estas nomhava dukto\n"
+"\t-r DOSIERO\tVera se vi rajtas legi DOSIEROn\n"
+"\t-s DOSIERO\tVera se DOSIERO ekzistas kaj longas pli ol 0\n"
+"\t-S DOSIERO\tVera se DOSIERO estas kontaktingo („socket‟)\n"
+"\t-t DNUMERO\tVera se la dosiero DNUMERO estas terminala\n"
+"\t-u DOSIERO\tVera se DOSIERO havas set-user-id = 1\n"
+"\t-w DOSIERO\tVera se vi rajtas skribi en DOSIEROn\n"
+"\t-x DOSIERO\tVera se vi rajtas lanĉi DOSIEROn\n"
+"\t-O DOSIERO\tVera se DOSIERO estas via dosiero\n"
+"\t-G DOSIERO\tVera se DOSIERO apartenas al via grupo\n"
+"\t-N DOSIERO\tVera se DOSIERO ÅanÄiÄis post la lasta lego\n"
+"\n"
+"\tD_RO1 -nt D_RO2\tVera se la dosiero D_RO1 estas pli freÅa\n"
+"\t\t\t(laÅ­ la ÅanÄodato) ol la dosiero D_RO2\n"
+"\tD_RO1 -ot D_RO2\tVera se D_RO1 estas malpli freÅas ol D_RO2\n"
+"\tD_RO1 -ef D_RO2\tVera se D_RO1 estas rekta ligilo al D_RO2\n"
+"\n"
+" Operacioj super ĉenoj:\n"
+"\n"
+"\t-z ĈENO\t\tVera se ĈENO estas vakua\n"
+"\t-n ĈENO\t\tVera se ĈENO ne estas vakua\n"
+"\tĈENO\t\tVera se ĈENO ne estas vakua\n"
+"\tĈENO1 = ĈENO2\tVera se la ĉenoj estas egalaj\n"
+"\tĈENO1 != ĈENO2\tVera se la ĉenoj ne estas egalaj\n"
+"\tĈENO1 < ĈENO2\tVera se ĈENO1 leksikografie antaŭas la\n"
+"\t\t\tĉenon ĈENO2\n"
+"\tĈENO1 > ĈENO2\tVera se ĈENO1 leksikografie sekvas la\n"
+"\t\t\tĉenon ĈENO2\n"
+"\n"
+" Diversaj operacioj:\n"
+"\n"
+" -o OPCIO Vera se la Åelopcio OPCIO estas Åaltita\n"
+"\t! ESPR\t\tVera se la esprimo ESPR estas falsa\n"
+"\tESPR1 -a ESPR2\tVera se ambaÅ­ esprimoj estas veraj\n"
+"\tESPR1 -o ESPR2\tVera se ajna el la esprimoj estas vera\n"
+"\n"
+"\targ1 KP arg2\tAritmetikaj komparoj. KP estas iu el la\n"
+"\t\t\trilatoj -eq, -ne, -lt, -le, -gt, -ge\n"
+"\n"
+" La aritmetikaj komparoj liveras veron se arg1 estas respektive\n"
+" egala, neegala, malplia ol, malplia aÅ­ egala al, plia ol,\n"
+" plia aÅ­ egala al arg2.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, se la rezulto de la komputo de ESPRIMO estas vero;\n"
+" malsukceso, se la rezulto estas malvero aÅ­ renkontiÄas misa\n"
+" argumento."
+
+# [ arg... ]
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"Ĉi tiu estas sinonimo de la primitivo „test‟; tamen la lasta\n"
+" argumento devas esti „]‟ fermanta la esprimon komencitan per „[‟."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Vidigu proceztempojn\n"
+"\n"
+" Eligu la tempojn akumulitajn de la uzanto kaj de la kerno\n"
+" por la Åelo kaj Äiaj procezidoj.\n"
+"\n"
+" Elirstato:\n"
+" Ĉiam sukcesa."
+
+# trap [-lp] [[arg] signal_spec ...]
+# trap [-lp] [[ARG] SIGNALINDIKO ...]
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+"Kaptu signalojn kaj aliajn eventojn\n"
+"\n"
+" Difinu kaj aktivigu traktilojn plenumotajn kiam Åelo ricevos\n"
+" signalojn aŭ ĉe aliaj kondiĉoj.\n"
+"\n"
+" La komando ARG estas legota kaj plenumota kiam la Åelo ricevos\n"
+" signalon el SIGNALINDIKO. Se ARG malestas (kaj SIGNALINDIKO\n"
+" konsistas el unu sola signalo) aŭ estas „-‟, ĉiuj indikitaj\n"
+" signaloj rericevas sian komencan valoron. Se ARG estas vakua\n"
+" ĉeno, la Åelo mem kaj komandoj el Äi vokitaj malatentos ĉiujn\n"
+" signalojn de SIGNALINDIKO.\n"
+"\n"
+" Se inter la signaloj SIGNALINDIKO estas „EXIT‟ (aŭ 0), tiam ARG de\n"
+" la komando plenumiÄos ĉe la eliro el la Åelo. Se en SIGNALINDIKO\n"
+" estas „DEBUG‟, ARG plenumiÄos post ĉiu komando.\n"
+"\n"
+" Senargumente trap listigas komandojn plenumotajn laŭ ĉiu signalo.\n"
+"\n"
+" Opcioj:\n"
+" -l\tlistigu la signalnomojn kun la numeroj\n"
+" -p vidigu la trap-komandojn por trakti ĉiun SIGNALINDIKOn\n"
+"\n"
+" Ĉiu SIGNALINDIKO estas aŭ signalnomo el <signal.h>, aŭ\n"
+" signalnumero. La signalnomoj estas usklecoblindaj, kaj la\n"
+" prefikso „SIG‟ estas ellasebla. Signalon S oni povas sendi al la\n"
+" Åelo per la komando «kill -S $$».\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, kondiĉe ke SIGNALINDIKOj kaj la opcioj estas taŭgaj."
+
+# type [-afptP] name [name ...]
+# type [-afptP] NOMO [NOMO ...]
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+"Vidigu informon pri tipo de komando\n"
+"\n"
+" Por ĉiu NOMO, montru kion Äi signifus en la pozicio de\n"
+" komadonomo.\n"
+"\n"
+" Opcioj:\n"
+" -a\tlistigu ĉiujn lokojn entenantajn plenumeblan dosieron\n"
+" kun koncerna NOMO; la listo inkludas alinomojn kaj\n"
+" funkciojn, se kaj nur se malestas la opcio „-p‟\n"
+" -f ekskludas el la serĉo la Åelfunkciojn\n"
+" -P\tapliku vojserĉon laŭ PATH por ĉiu NOMO, eĉ se ekzistas tianoma\n"
+" funkcio, primitiva komando aÅ­ alinomo, kaj liveru la nomon de\n"
+" tiel plenumebla diskdosiero\n"
+" -p\teligu la nomon de dosiero kiu iÄus plenumata;\n"
+" aŭ nenion, se «type -t name» ne eligus „file‟\n"
+" -t\teligu unu vorton, iun el la sekvaj:\n"
+" „alias‟, „keyword‟, „function‟, „builtin‟, „file‟ aŭ „‟ --\n"
+" se NOMO estas, respektive, alinomo, Åela Ålosilvorto,\n"
+" Åelfunkcio, Åela primitivo, dosiero aÅ­ nenio konata\n"
+"\n"
+" Argumentoj:\n"
+" NOMO Esplorenda komandonomo\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, se ĉiujn NOMOjn prosperis trovi; malsukceso, se estis\n"
+" netrovitaj."
+
+# ulimit [-SHacdefilmnpqrstuvx] [limit]
+# ulimit [-SHacdefilmnpqrstuvx] [LIMO]
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"ÅœanÄu risurcolimaĵojn de la Åelo\n"
+"\n"
+" La komando „ulimit‟ ebligas mastrumi la risurcojn disponeblajn al\n"
+" la procezoj lanĉataj el la Åelo (se la operaciumo ebligas tian\n"
+" mastrumadon).\n"
+"\n"
+" Opcioj:\n"
+" -S\tÅanÄebla („soft‟) limo\n"
+" -H\tfirma („hard‟) limo\n"
+" -a\teligu ĉiujn kurantajn risurcolimaĵojn\n"
+" -c\tmaksimuma longo de nekropsia dosiero („core‟)\n"
+" -d\tmaksimuma longo de datumsegmento de procezo\n"
+" -e\tmaksimuma viciga prioritato („nice‟)\n"
+" -f\tmaksimuma longo de dosieroj skribataj de la Åelo kaj Äiaj idoj\n"
+" -l\tmaksimuma longo de Ålosebla procezmemoro (mlock)\n"
+" -m\tmaksimuma longo de rezida procezmemoro\n"
+" -n\tmaksimuma nombro de malfermitaj dosiernumeroj\n"
+" -p\tlongo de dukta bufro (pipe)\n"
+" -q\tmaksimuma nombro da bajtoj en atendovicoj de Poziksaj mesaÄoj\n"
+" -r\tmaksimuma prioritato realtempa\n"
+" -s\tmaksimuma longo de stako\n"
+" -t\tmaksimuma tempo ĉefprocesora (en sekundoj)\n"
+" -u\tmaksimuma nombro de procezoj de la uzanto\n"
+" -v\tlongo de la virtuala memoro\n"
+" -x\tmaksimuma nombro de dosierÅlosoj\n"
+"\n"
+" Se LIMO estas indikita, Äia valoro limigas la koncernan risurcon;\n"
+" la specialaj vortoj por LIMO: „soft‟, „hard‟, „unlimited‟\n"
+" signifas, respektive: «la kuranta ÅanÄebla limo», «la kuranta\n"
+" firma limo», «sen limo». Alie estas eligata la kuranta valoro de\n"
+" la koncerna risurco. Manko de opcioj implicas -f.\n"
+"\n"
+" La valoroj estas en obloj de 1024 bajtoj, krom por la opcio -t,\n"
+" kiu estas en sekundoj; por -p, kiu estas en obloj de 512 bajtoj;\n"
+" kaj por -u, kiu estas sendimensia nombro de procezoj.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, kondiĉe ke la opcioj estas taŭgaj kaj ne okazis eraro."
+
+# umask [-p] [-S] [mode]
+# umask [-p] [-S] [REÄœIMO]
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+"Vidigu aÅ­ agordu dosierreÄiman maskon\n"
+"\n"
+" La dosierkrea masko de la uzanto havu la valoron de la argumento\n"
+" REÄœIMO. Se REÄœIMO mankas, eligu la kurantan valoron de la masko.\n"
+"\n"
+" Se la argumento REÄœIMO komenciÄas per cifero, Äi estas\n"
+" interpretata kiel okuma nombro; alie, kiel simbola signoĉeno\n"
+" laÅ­ chmod(1).\n"
+"\n"
+" Opcioj:\n"
+" -p\tse REĜIMO malestas, la eligaĵo havu formon taŭgan por enigo\n"
+" -S\tla eligo estu simbola; alie Äi estas okuma nombro\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se REÄœIMO estas nevalida aÅ­ aperas misa opcio."
+
+# wait [id]
+# wait [IND]
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Atendu ke laboro finiÄu, kaj liveru elirstaton\n"
+"\n"
+" Atendu finiÄon de la procezo indikita per IND (kiu povas esti\n"
+" proceznumero aÅ­ laborindiko) kaj liveru Äian elirstaton. Se IND\n"
+" malestas, atendu ĉiujn aktivajn procezidojn, kaj liveru la \n"
+" elirstaton 0. Se IND estas laborindiko, atendu ĉiujn procezojn en\n"
+" la dukto de la laboro.\n"
+"\n"
+" Elirstato:\n"
+" Tiu de IND; malsukceso, se IND estas nevalida aÅ­ se renkontiÄas\n"
+" nevalida opcio.<"
+
+# wait [pid]
+# wait [PN]
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Atendu ke procezo finiÄu, kaj liveru elirstaton\n"
+"\n"
+" Atendu finiÄon de la indikita procezo kaj liveru Äian elirstaton.\n"
+" Se PN malestas, atendu ĉiujn aktivajn procezidojn, kaj liveru la\n"
+" elirstaton 0. PN devas esti proceznumero.\n"
+"\n"
+" Elirstato:\n"
+" Tiu de PN; malsukceso, se PN estas nevalida aÅ­ se renkontiÄas\n"
+" nevalida opcio."
+
+# for NAME [in WORDS ... ] ; do COMMANDS; done
+# for NOMO [in VORTOJ ... ] ; do KOMANDOJ; done
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Plenumu komandojn por ĉiu ero de listo\n"
+"\n"
+" La iteracio „for‟ plenumas la KOMANDOJn por ĉiu ero de sia listo.\n"
+" Se la parto «in VORTOJ ...;» malestas, «in \"$@\"» estas uzata\n"
+" anstataŭe. Por ĉiu el la VORTOJ, la NOMO estas valorizata per tiu\n"
+" ero kaj la KOMANDOJ estas plenumataj.\n"
+"\n"
+" Elirstato:\n"
+" Tiu de la laste plenumita komando."
+
+# for (( exp1; exp2; exp3 )); do COMMANDS; done
+# for (( ESPR1; ESPR2; ESPR3 )); do KOMANDOJ; done
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Aritmetika iteracio\n"
+"\n"
+" Ekvivalentas al\n"
+"\t(( ESPR1 ))\n"
+"\twhile (( ESPR2 )); do\n"
+"\t KOMANDOJ\n"
+"\t (( ESPR3 ))\n"
+"\tdone\n"
+" kie ESPR1, ESPR2 kaj ESPR3 estas aritmetikaj esprimoj. Se iu el\n"
+" ili malestas, 1 estas uzata anstataÅ­e.\n"
+"\n"
+" Elirstato:\n"
+" Tiu de la laste plenumita komando."
+
+# select NAME [in WORDS ... ;] do COMMANDS; done
+# select NONO [in VORTOJ ... ;] do KOMANDOJ; done
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Elektu vortojn el listo kaj plenumu komandojn\n"
+"\n"
+" Malvolvu VORTOJn, generante liston da vortoj. Tiujn vortojn eligu\n"
+" en la ĉeferarujon, ĉiu antaŭate de sia numero. Se „in VORTOJ‟\n"
+" malestas, prenu anstataÅ­e la enhavon de \"$@\". Poste eligu la\n"
+" inviton laŭ la variablo PS3 kaj legu linion el la ĉefenigujo. Se\n"
+" la linio konsistas el numero responda al iu el la vortoj eligitaj,\n"
+" la NOMO ricevu Äin kiel sian valoron. Se la linio entenas nenion,\n"
+" ripetu VORTOJn kaj la inviton. Ĉe la dosierfino la komando\n"
+" finiÄas. Ajna alia enigaĵo vakuigas la variablon NOMO. La legita\n"
+" linio konserviÄas en la variablo REPLY. Plenumu la KOMANDOJn post\n"
+" ĉiu elekto, Äis renkontiÄos komando de eliro (break).\n"
+"\n"
+" Elirstato:\n"
+" Tiu de la laste plenumita komando."
+
+# time [-p] PIPELINE
+# time [-p] DUKTO
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+"Raportu tempon konsumitan de dukto\n"
+"\n"
+" Plenumu la DUKTOn kaj poste eligu tabelon el la reala tempo,\n"
+" la ĉefprocesora tempo de la uzanto, kaj la ĉefprocesora tempo\n"
+" sistema, konsumitaj por plenumi la DUKTOn, kiam Äi finÄos.\n"
+"\n"
+" Opcio:\n"
+" -p\tprezentu la tempojn laÅ­ la portebla Poziksa formo\n"
+"\n"
+" La variablo TIMEFORMAT difinas la formon de la eligaĵo.\n"
+"\n"
+" Elirstato:\n"
+" Tiu de la DUKTO."
+
+# case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac
+# case VORTO in [ÅœABLONO [| ÅœABLONO]...) KOMANDOJ ;;]... esac
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Plenumu komandojn laÅ­ Åablonkongruo \n"
+"\n"
+" Plenumu KOMANDOJn kondiĉe ke VORTO kongruas kun ŜABLONO.\n"
+" La streko „|‟ servas por disigi Åablonojn (se pluraj).\n"
+"\n"
+" Elirstato:\n"
+" Tiu de la komando laste plenumita."
+
+# if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]...
+# [ else COMMANDS; ] fi
+# if KOMANDOJ; then KOMANDOJ;[ elif KOMANDOJ; then KOMANDOJ; ]...
+# [ else KOMANDOJ; ] fi
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Plenumu komandojn depende je kondiĉo\n"
+"\n"
+" Plenumu la komandojn el «if KOMANDOJ». Se la elirstato estas 0,\n"
+" tiam plenumu la komandojn el «then KOMANDOJ». Alie, laŭvice,\n"
+" plenumu la komandoj el «elif KOMANDOJ», kaj se la elirstato\n"
+" estas 0, plenumu la komandojn de ties «then KOMANDOJ», post kio\n"
+" la komando „if‟ finiÄas. Alie plenumu la komandojn el\n"
+" «else KOMANDOJ» (se tiaj enestas). La elirstato estas tiu de la\n"
+" lasta komando plenumita, aŭ 0 se neniu el la kondiĉoj estis vera."
+
+# while COMMANDS; do COMMANDS; done
+# while KOMANDOJ; do KOMANDOJ; done
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Plenumadu komandojn dum testo sukcesas\n"
+"\n"
+" Ripete malvolvu kaj plenumu la KOMANDOJn dum la lasta el la\n"
+" KOMANDOJ de la „while‟-parto liveras elirstaton 0.\n"
+"\n"
+" Elirstato:\n"
+" Tiu de la komando laste plenumita. "
+
+# until COMMANDS; do COMMANDS; done
+# until KOMANDOJ; do KOMANDOJ; done
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Plenumadu komandojn Äis kiam testo sukcesos\n"
+"\n"
+" Ripete malvolvu kaj plenumu la komandojn dum la lasta el la\n"
+" KOMANDOJ de la „until‟-parto liveras elirstaton alian ol 0.\n"
+"\n"
+" Elirstato:\n"
+" Tiu de la komando laste plenumita."
+
+# coproc [NAME] command [redirections]
+# coproc [NOMO] KOMANDO [ALIDIREKTADOJ]
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+"Kreu kunprocezon nomotan NOMO\n"
+"\n"
+" Plenumu KOMANDOn nesinkrone, konektinte per dukto Äiajn ĉefelgujon\n"
+" kaj ĉefengujon al la dosiernumeroj listigitaj en la tabelo NOMO de\n"
+" la kuranta Åelo ĉe la indicoj 0 kaj 1. La defaÅ­lta NOMO estas\n"
+" „COPROC‟.\n"
+"\n"
+" Elirstato:\n"
+" Tiu de KOMANDO."
+
+# function name { COMMANDS ; } or name () { COMMANDS ; }
+# function NOMO { KOMANDOJ ; } aÅ­ NOMO () { KOMANDOJ ; }
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+"Difinu Åelfunkcion\n"
+"\n"
+" Kreu Åelfunkcion kun NOMO. Vokite kiel simpla komando, NOMO\n"
+" plenumas la KOMANDOJn en la medio de la vokanta Åelo. Ĉe voko de\n"
+" NOMO la komandoliniajn argumentojn la funkcio ricevas en $0...$n,\n"
+" kaj la funkcinomo registriÄas en $FUNCNAME.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se NOMO estas nurlega."
+
+# grouping_braces: { COMMANDS ; }
+# { KOMANDOJ ; }
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Arigu komandojn en komandan unuon\n"
+"\n"
+" Plenumu la komandojn grupe. Tiel eblas apliki alidirektadon al\n"
+" tuta grupo da komandoj.\n"
+"\n"
+" Elirstato:\n"
+" Tiu de la komando laste plenumita."
+
+# job_spec [&]
+# LABORINDIKO [&]
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+"Reaktivigu laboron en la fono\n"
+"\n"
+" Samkiel la argumento LABORINDIKO en komando „fg‟. Reaktivigu\n"
+" haltigitan aÅ­ fonan laboron. LABORINDIKO povas esti labornomo aÅ­\n"
+" labornumero. Postmetita „&‟ sendas la laboron en la fonon,\n"
+" samkiel se la komando „bg‟ estus aplikita al LABORINDIKO.\n"
+"\n"
+" Elirstato:\n"
+" Tiu de la reakivigita laboro."
+
+# (( expression ))
+# (( ESPRIMO ))
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+"Komputu aritmetikan esprimon\n"
+"\n"
+" La esprimo EXPRESSION komputiÄas laÅ­ la aritmetikaj reguloj.\n"
+" Ekvivalentas al «let EXPRESSION».\n"
+"\n"
+" Elirstato:\n"
+" 1, se la rezulto de la ESPRIMO estas 0; 0 aliokaze."
+
+# [[ expression ]]
+# [[ ESPRIMO ]]
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+"Plenumu kondiĉkomandon\n"
+"\n"
+" Liveras elirstaton 0 aŭ 1 laŭ la rezulto de komputado de kondiĉa\n"
+" ESPRIMO. Esprimoj konsistas el bazaj esprimoj, kiajn uzas la\n"
+" primitivaĵo „test‟, kaj komponiÄas per sekvaj operacioj:\n"
+"\n"
+" ( ESPRIMO ) Liveras la valoron de ESPRIMO\n"
+" ! ESPRIMO\t Vera, se ESPRIMO estas malvera; alie malvera\n"
+" ESP1 && ESP2 Vera, se veras ambaÅ­ ESP1 kaj ESP2; alie malvera\n"
+" ESP1 || ESP2 Vera, se veras ajna el ESP1 kaj ESP2; alie malvera\n"
+"\n"
+" En la operacioj „==‟ kaj „!=‟ la signoĉeno dekstre de la operacisigno\n"
+" rolas kiel Åablono, kongrueco al kiu estas testata. Ĉe la\n"
+" operacio „=~‟ la ĉeno en la dekstra parto rolas kiel regulesprimo\n"
+" por kongruectestado.\n"
+"\n"
+" En la operacioj && kaj || la duaj subesprimoj ESP2 ne estas\n"
+" komputataj se ESP1 jam sufiĉas por determini la rezulton.\n"
+"\n"
+" Elirstato:\n"
+" 0 aÅ­ 1, laÅ­ la valoro de ESPRIMO."
+
+# help var
+# variables - Names and meanings of some shell variables
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+"Nomoj kaj uzoj de komunaj Åelvariabloj\n"
+"\n"
+" BASH_VERSION Informo pri la versio de ĉi tiu BaÅo\n"
+" CDPATH\tListo da dosierujoj (disigitaj per dupunkto) en\n"
+"\t\tkiuj argumenta dosierujo de „cd‟ estu serĉata\n"
+" GLOBIGNORE\tListo da Åablonoj (disigitaj per dupunkto) difinanta\n"
+"\t\tdosiernomojn ignorendajn ĉe malvolvo de dosierindikoj\n"
+" HISTFILE\tNomo de la dosiero por via komandohistorio\n"
+" HISTFILESIZE Maksimuma nombro de linioj konserveblaj en HISTFILE\n"
+" HISTSIZE\tMaksimuma nombro de linioj el komandohistorio\n"
+"\t\tatingeblaj el plenumata Åelo\n"
+" HOME\tPlena dosierindiko pri via hejma dosierujo\n"
+" HOSTNAME\tNomo de la rulanta komputilo\n"
+" HOSTTYPE\tTipo de la ĉefprocesoro rulanta ĉi tiun BaÅon\n"
+" IGNOREEOF\tDeterminas la konduton de la Åelo kiam Äi ricevas\n"
+"\t\tdosierfinilon (^D, \\004) kiel nuran enigaĵon. Se Äi\n"
+"\t\tekzistas kaj havas nombran valoron, tiam ĉi tiu\n"
+" indikas, kiom da sinsekvaj dosierfinilojn toleri\n"
+"\t\tantaÅ­ ol la Åelo finiÄu (defaÅ­lte, 10). Sen tia\n"
+"\t\tvaloro, ^D signifas finon de enigo\n"
+" MACHTYPE\tSignoĉeno priskribanta la komputsistemon rulantan\n"
+"\t\tĉi tiun BaÅon\n"
+" MAILCHECK\tKiom ofte (post kiom da sekundoj) BaÅo kontrolu\n"
+"\t\tricevon de nova retpoÅta mesaÄo\n"
+" MAILPATH\tListo da dosiernomoj (disigitaj per dupunkto) kiujn\n"
+"\t\tBaÅo testu pri nova retpoÅtaĵo\n"
+" OSTYPE\tVersio de Unikso sur kiu ĉi tiu BaÅo ruliÄas\n"
+" PATH\tListo da dosierujoj (disigitaj per dupunkto) kie serĉi\n"
+"\t\tkomandojn\n"
+" PROMPT_COMMAND Komando plenumenda antaŭ ĉiu unuaranga invito\n"
+" PS1\t\tSignoĉeno de la unuaranga invito\n"
+" PS2\t\tSignoĉeno de la duaranga invito\n"
+" PWD\t\tPlena dosierindiko de la kuranta dosierujo\n"
+" SHELLOPTS\tListo da aktivaj Åelaj opcioj (disigitaj per dupunktoj)\n"
+" TERM\tTipo de la uzata terminalo\n"
+" TIMEFORMAT\tFormato por eligi tempostatistikon per la komando „time‟\n"
+" auto_resume\tSe ne vakua, indikas ke komandan vorton sole aperanta\n"
+"\t\ten linio la Åelo unue serĉu en la listo de haltetintaj\n"
+"\t\tlaboroj. Se trovita tie, la laboro iÄu dialoga.\n"
+"\t\tLa valoro „exact‟ postulas ekzaktan kongruon de la\n"
+"\t\tkomanda vorto kun la komando el la laborlisto. La valoro\n"
+"\t\t„substring‟ indikas ke la komanda vorto kongruu kun\n"
+"\t\tsubĉeno de la laboro. Ĉia alia valoro indikas ke la\n"
+"\t\tkomando estu komenca parto de la labornomo\n"
+" histchars\tSignoj regantaj reuzon de komandohistorio kaj rapidan\n"
+"\t\tanstataŭigon. Unue estas la reuziga signo, kutime „!‟.\n"
+"\t\tDue estas la signo de „rapida anstataŭigo‟, kutime „^‟.\n"
+"\t\tTrie estas la signo de „historia komentilo‟,\n"
+"\t\tkutime „#‟\n"
+" HISTIGNORE\tListo da Åablonoj (disigitaj per dupunkto) difinanta\n"
+"\t\tkiujn komandojn konservi en la historilisto\n"
+
+# pushd [-n] [+N | -N | dir]
+# pushd [-n] [+N | -N | DOSIERUJO]
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Surstakigu dosierujojn\n"
+"\n"
+" Surstakigu dosierujon sur la stakon da dosierujoj, aÅ­ cikle Åovu\n"
+" la stakon tiel, ke la nova stakpinto estu la kuranta dosierujo.\n"
+" Senargumente, permutu la du plej suprajn dosierujojn de la stako.\n"
+"\n"
+" Opcio:\n"
+" -n\tNe ÅanÄu la kurantan dosierujon (ne plenumu cd) surstakigante\n"
+" dosierujon sur la stakon; do, nur la stakon ÅanÄu\n"
+"\n"
+" Argumentoj:\n"
+" +N\tCikle Åovu la stakon tiel ke la Nª dosierujo (nombrante de\n"
+" \tmaldekstre en la listo eligebla per „dirs‟, numerante de 0)\n"
+" iÄu la pinta\n"
+"\n"
+" -N\tCikle Åovu la stakon tiel ke la Nª dosierujo (nombrante de\n"
+" \tdekstre en la listo eligebla per „dirs‟, numerante de 0) iÄu\n"
+" la pinta\n"
+"\n"
+" DOSIERUJO\n"
+"\tsurstakigu la DOSIERUJOn kaj faru Äin la nova kuranta\n"
+" \tdosierujo labora\n"
+"\n"
+" Vi povas vidigi la stakon da dosierujoj per la komando „dirs‟.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se aperas misa argumento aÅ­ se cd malsukcesas."
+
+# popd [-n] [+N | -N]
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Elstakigu dosierujojn\n"
+"\n"
+" Elstakigu erojn el la stako da dosierujoj. Senargumente, forigu\n"
+" la pintan dosierujon kaj iru (cd) en la novan pintan dosierujon.\n"
+"\n"
+" Opcio:\n"
+" -n\tNe ÅanÄu (cd) la kurantan dosierujon demetante dosierujon el\n"
+" la stako; do, nur la stakon ÅanÄu\n"
+"\n"
+" Argumentoj:\n"
+" +N\tForigu la N-an eron de maldekstre de la listo eligebla per\n"
+"\t„dirs‟, numerante ekde 0. Ekz-e: «popd +0» forigas la plej\n"
+"\tmaldekstran dosierujon; «popd +1», Äian najbaron\n"
+"\n"
+" -N\tForigu la N-an eron de dekstre de la listo eligebla per\n"
+" „dirs‟, numerante ekde 0. Ekz-e: «popd -0» forigas la lastan\n"
+"\tdosierujon; «popd -1», la antaŭlastan\n"
+"\n"
+" Vi povas vidigi la stakon da dosierujoj per la komando „dirs‟.\n"
+" Elirstato:\n"
+" Sukceso, krom se aperas misa argumento aÅ­ se cd malsukcesas."
+
+# dirs [-clpv] [+N] [-N]
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Listigu dosierujstakon\n"
+"\n"
+" Listigu la kurantan dosierujstakon. La dosierujoj trafas en la\n"
+" stakon per la komando „pushd‟ kaj estas forigeblaj per la komando\n"
+" „popd‟.\n"
+"\n"
+" Opcioj:\n"
+" -c viÅu la dosierujstakon forigante el Äi ĉiujn erojn\n"
+" -l ne uzu mallongan formon de dosierujnomoj relative al via hejma\n"
+" dosierujo\n"
+" -p listigu dosierujstakon lokante po unu eron sur linio\n"
+" -v listigu po unu eron de la dosierujstako en linio, metante\n"
+" antaÅ­ la dosierujnomo Äian numeron en la stako \n"
+"\n"
+" Argumentoj:\n"
+" +N\teligu la N-an eron (numerante de maldekstre kaj ekde 0) de la\n"
+" listo eligebla per senopcia „dirs‟\n"
+"\n"
+" -N\teligu la N-an eron (numerante de dekstre kaj ekde 0) en la\n"
+" listo eligebla per senopcia „dirs‟\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se aperas misa opcio aÅ­ okazas eraro."
+
+# shopt [-pqsu] [-o] [optname ...]
+# shopt [-pqsu] [-o] [OPCINOMO ...]
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+"Åœaltu kaj malÅaltu Åelajn opciojn\n"
+"\n"
+" ÅœanÄu la staton de ĉiu el la OPCINOMOj. Sen opciaj argumentoj,\n"
+" listigu ĉiujn Åelajn opciojn, indikante pri ĉiu el ili, ĉu Äi\n"
+" estas Åaltita.\n"
+"\n"
+" Opcioj:\n"
+" -o limigu OPCINOMOJn je tiuj difinitaj por uzo per «set -o»\n"
+" -p eligu ĉiun Åelan opcion indikante ĉu Äi estas Åaltita\n"
+" -q silentigu eligon\n"
+" -s Åaltu (aktivigu) ĉiun el la OPCINOMOj\n"
+" -u malÅaltu (malaktivigu) ĉiun el la OPCINOMOj\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, se OPCINOMO estas Åaltita; malsukceso, se aperas misa\n"
+" opcio, aÅ­ se OPCINOMO estas malÅaltita.\n"
+" "
+
+# printf [-v var] format [arguments]
+# printf [-v VAR] FORMATO [ARGUMENTOJ]
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+"AranÄu kaj eligu argumentojn argumentojn laÅ­ formato\n"
+"\n"
+" Opcio:\n"
+" -v VAR eligu en Åelvariablon VAR anstataÅ­ en la ĉefeligujon\n"
+"\n"
+" FORMATO estas signoĉeno entenanta 3 tipojn da objektoj:\n"
+" ordinaraj signoj, simple kopiataj en la ĉefeligujon;\n"
+" eskapsekvencoj por signo, konvertataj kaj kopiataj en la ĉefeligujon; \n"
+" kaj formataj specifoj, ĉiu el kiuj kaŭzas eligon de vica argumento.\n"
+"\n"
+" Aldone al la normaj specifiloj laŭ „printf(1)‟ kaj „printf(3)‟,\n"
+" „%b‟ igas malvolvi deklivajn (\\) eskapsekvencojn en sia argumento, kaj\n"
+" „%q‟ ordonas ke la argumento eliÄu en formo taÅ­ga por Åela re-enigo.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se aperas misa opcio aÅ­ okazas eraro pri skribo aÅ­\n"
+" valorizo."
+
+# complete [-abcdefgjksuv] [-pr] [-o OPCIO] [-A AGO] [-G GLOBÅœAB]
+# [-W VORTLISTO] [-F FUNKCIO] [-C KOMANDO] [-X FILTROÅœAB]
+# [-P PREFIKSO] [-S SUFFIKSO] [NOMO ...]
+#: builtins.c:1895
+#, fuzzy
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Difinu, kiel Readline kompletigu argumentojn\n"
+"\n"
+" Por ĉiu NOMO difinu, kiel la argumentoj estu kompletigotaj. Se\n"
+" nenia opcio estas donita, eligu la aktualajn \n"
+" kompletigoregulojn en formo reuzebla por enigo en la Åelon.\n"
+"\n"
+" Opcioj:\n"
+" -p\tkompletigoregulojn en formo reuzebla por enigo en la Åelon\n"
+" -r\tforigu la kompletigoregulon por ĉiu NOMO, aŭ, se nenia NOMO\n"
+"\testas donita, ĉiujn kompletigoregulojn\n"
+"\n"
+" Ĉe provo kompletigi la agoj aplikiÄas laÅ­ la ordo de majusklaj\n"
+" opcioj en la ĉi-supre listo.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se misa opcio estas donita, aÅ­ eraro okazis."
+
+# compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat]
+# [-W wordlist] [-P prefix] [-S suffix] [-X filterpat]
+# [-F function] [-C command] [word]
+# compgen [-abcdefgjksuv] [-o OPCIO] [-A AGO] [-G GLOBÅœAB]
+# [-W vORTLISTO] [-F FUNKCIO] [-C KOMANDO] [-X FILTROÅœAB]
+# [-P PREFIKSO] [-S SUFFIKSO] [VORTO]
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Montru la eblajn kompletigojn depende je la opcioj\n"
+"\n"
+" Destinita por uzo en Åelfunkcio generanta eblajn kompletigojn. Se\n"
+" la eventuala argumento VORTO estas donita, generu Äiajn kongruaĵojn.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se aperas misa opcio aÅ­ okazas eraro."
+
+# compopt [-o|+o option] [name ...]
+# compopt [-o|+o OPCIO] [NOMO ...]
+#: builtins.c:1938
+#, fuzzy
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+"ÅœanÄu aÅ­ vidigu opciojn pri kompletigo\n"
+"\n"
+" ÅœanÄu la kompletigajn opciojn por ĉiu NOMO, aÅ­ - se nenia NOMO\n"
+" estas indikita - la nune plenumatan kompletigon. Se nenia OPCIO\n"
+" estas donita, eligu la kompletigajn opciojn por ĉiu NOMO aŭ la\n"
+" kurantan kompletigan regularon.\n"
+"\n"
+" Opcioj:\n"
+" -o OPCIO Ŝaltu kompletigan OPCIOn por ĉiu NOMO\n"
+"\n"
+" Uzante «+o» anstataÅ­ «-o» oni povas malÅalti la indikitan OPCIOn.\n"
+"\n"
+" Argumentoj:\n"
+" Ĉiu NOMO indikas komandon, por kiu kompletiga regulo devas esti\n"
+" jam difinita per la primitivaĵo „complete‟. Se nenia NOMO estas\n"
+" donita, tiam la komandon compopt devas voki funkcio generanta, kaj\n"
+" Äuste la opcioj por ĉi tiu nune plenumata generilo de kompletigoj\n"
+" estu ÅanÄitaj.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se aperas misa opcio, aÅ­ por NOMO mankas difino de\n"
+" kompletiga regulo."
+
+# mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback]
+# [-c quantum] [array]
+# mapfile [-n NOMBRILO] [-O ORIGINO] [-s NOMBRILO] [-t] [-u DN] [-C RETROVOKO]
+# [-c KVANTO] [TABELO]
+#: builtins.c:1968
+#, fuzzy
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+"Legu liniojn el la ĉefenigujo en tabelvariablon\n"
+"\n"
+" Legu liniojn el la ĉefenigujo en la variablon TABELO, aŭ el la\n"
+" dosiernumero DN, se ĉeestas la opcio „-u‟. La defaŭlta tabelo\n"
+" estas la variablo MAPFILE.\n"
+"\n"
+" Opcioj:\n"
+" -n NOMBRILO Kopiu maksimume NOMBRILOn da linioj. Se NOMBRILO\n"
+" estas 0, kopiu ĉiujn liniojn\n"
+" -O ORIGINO Komencu valorizi la TABELOn ekde la indekso ORIGINO.\n"
+" La defaÅ­lta origino estas 0.\n"
+" -s NOMBRILO Ignoru NOMBRILOn da unuaj linioj\n"
+" -t Forigu la vostan linifinilon el ĉiu legita linio\n"
+" -u DN Legu per la dosiernunero DN anstataŭ el la ĉefenigujo\n"
+" -C RETROVOKO Plenumu RETROVOKOn post ĉiu KVANTO da legitaj linioj\n"
+" -c KVANTO\tPo kiom da linioj legi inter sinsekvaj RETROVOKOj\n"
+"\n"
+" Argumento:\n"
+" TABELO\tNomo de tabelvariablo uzota por la legotaj datumoj\n"
+"\n"
+" Se „-C‟ aperas sen „-c‟, la defaŭlta kvanto estas 5000. Ĉe\n"
+" komputo de RETROVOKO ĉi tiu ricevas la indicon de la sekva\n"
+" elemento de la tabelo kiel kroman argumenton.\n"
+"\n"
+" Se mankas malimplica ORIGINO, mapfile viÅos la TABELOn antaÅ­\n"
+" valorizi Äin.\n"
+"\n"
+" Elirstato:\n"
+" Sukceso, krom se aperas misa opcio aÅ­ TABELO estas nurlega."
+
+# readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback]
+# [-c quantum] [array]
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+"Legu liniojn el la ĉefenigujo en tabelvariablon\n"
+"\n"
+" Sinonimo de „mapfile‟."
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xrealloc(): Ne povas reokupi %lu bajtojn (%lu bajtoj disponigitaj)."
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: Ne eblas reokupi %lu bajtojn."
+
+# XXX: fatal_error
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: %s:%d: ne eblas reokupi %lu bajtojn (%lu bajtoj disponigitaj)"
diff --git a/po/es.gmo b/po/es.gmo
new file mode 100644
index 0000000..e626a6f
--- /dev/null
+++ b/po/es.gmo
Binary files differ
diff --git a/po/es.po b/po/es.po
new file mode 100644
index 0000000..2cad3cc
--- /dev/null
+++ b/po/es.po
@@ -0,0 +1,8446 @@
+# Mensajes en español para GNU bash-4.0.
+# Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the bash package.
+# Cristian Othón Martínez Vera <cfuga@itam.mx>, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU bash 4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2009-03-19 19:34-0600\n"
+"Last-Translator: Cristian Othón Martínez Vera <cfuga@itam.mx>\n"
+"Language-Team: Spanish <es@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "subíndice de matriz incorrecto"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr "%s: no se puede convertir la matriz de indizada a asociativa"
+
+#: arrayfunc.c:480
+#, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: índice de matriz asociativa inválido"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: no se puede asignar a un índice que no es numérico"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr "%s: %s: se debe usar un subíndice al asignar a una matriz asociativa"
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: no se puede crear: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+"bash_execute_unix_command: no se puede encontrar la combinación de teclas "
+"para la orden"
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: el primer carácter que no es espacio en blanco no es `\"'"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "no hay un `%c' que cierre en %s"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: falta un `:' separador"
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "`%s': nombre de combinación de teclas inválido"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr "no se activó la edición de línea"
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "`%s': nombre de combinación de teclas inválido"
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: no se puede leer: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "%s: no se puede borrar la asignación"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "`%s': nombre de función desconocido"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s no está asignado a ninguna tecla.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s se puede invocar a través de "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr "cuenta de ciclo"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "sólo tiene significado en un ciclo `for', `while' o `until'"
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+"Devuelve el contexto de la llamada a subrutina actual.\n"
+" \n"
+" Sin EXPR, devuelve "
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "HOME no está definido"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "OLDPWD no está definido"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr "línea %d: "
+
+#: builtins/common.c:139 error.c:261
+#, c-format
+msgid "warning: "
+msgstr "aviso: "
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr "%s: uso: "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "demasiados argumentos"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: la opción requiere un argumento"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: se requiere un argumento numérico"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: no se encontró"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: opción inválida"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: nombre de opción inválido"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "`%s': no es un identificador válido"
+
+#: builtins/common.c:238
+msgid "invalid octal number"
+msgstr "número octal inválido"
+
+#: builtins/common.c:240
+msgid "invalid hex number"
+msgstr "número hexadecimal inválido"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "número inválido"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: especificación de señal inválida"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "`%s': no es un pid o una especificación válida de trabajo"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: variable de sólo lectura"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s fuera de rango"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "argumento"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s fuera de rango"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: no existe ese trabajo"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: no hay control de trabajos"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "no hay control de trabajos"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: restringido"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "restringido"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: no es una orden interna del shell"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "error de escritura: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr "error al establecer los atributos de la terminal: %s"
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr "error al obtener los atributos de la terminal: %s"
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: error al obtener el directorio actual: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: especificación de trabajo ambigua"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: nombre de acción inválido"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: no hay completado de especificación"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "aviso: es posible que la opción -F no funcione como se espera"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "aviso: es posible que la opción -C no funcione como se espera"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr "no se está ejecutando la función de completado"
+
+# sólo se puede usar. sv
+# De acuerdo. cfuga
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "sólo se puede usar dentro de una función"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "no se puede usar `-f' para hacer funciones"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: función de sólo lectura"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: no se pueden destruir variables de matriz de esta forma"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr "%s: no se puede convertir una matriz asociativa a indizada"
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "la carga dinámica no está disponible"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "no se puede abrir el objeto compartido %s: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "no se puede encontrar %s en el objeto compartido %s: %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: no se cargó dinámicamente"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: no se puede borrar: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: es un directorio"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: no es un fichero regular"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: el fichero es demasiado grande"
+
+# file=fichero. archive=archivo. Si no, es imposible traducir tar. sv
+# De acuerdo. Corregido en todo el fichero. cfuga
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: no se puede ejecutar el fichero binario"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: no se puede ejecutar: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr "logout\n"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "no es un shell de entrada: use `exit'"
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "Hay trabajos detenidos.\n"
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr "Hay trabajos en ejecución.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "no se encontró la orden"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "especificación de historia"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: no se puede abrir el fichero temporal: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr "actual"
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "el trabajo %d inició sin control de trabajo"
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: opción ilegal -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: la opción requiere un argumento -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "asociación desactivada"
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: tabla de asociación vacía\n"
+
+#: builtins/hash.def:244
+#, c-format
+msgid "hits\tcommand\n"
+msgstr "coinc\torden\n"
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Orden del shell que coinciden con la palabra `"
+msgstr[1] "Órdenes del shell que coinciden con la palabra `"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"no hay temas de ayuda que coincidan con `%s'. Pruebe `help help' o `man -k %"
+"s' o `info %s'."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: no se puede abrir: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"Estas órdenes del shell están definidas internamente. Teclee `help' para\n"
+"ver esta lista.\n"
+"Teclee `help nombre' para saber más sobre la función `nombre'.\n"
+"Use `info bash' para saber más sobre el shell en general.\n"
+"Use `man -k' o `info' para saber más sobre las órdenes que no están en\n"
+"esta lista.\n"
+"\n"
+"Un asterisco (*) junto a un nombre significa que el comando está "
+"desactivado.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "no se puede usar más de uno de -anrw"
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "posición en la historia"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: falló la expansión de la historia"
+
+#: builtins/inlib.def:71
+#, c-format
+msgid "%s: inlib failed"
+msgstr "%s: falló inlib"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "no se permiten otras opciones con `-x'"
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: los argumentos deben ser procesos o IDs de trabajos"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Error desconocido"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "se esperaba una expresión"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: no es una variable de matriz"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: especificación de descriptor de fichero inválida"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: descriptor de fichero inválido: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, c-format
+msgid "%s: invalid line count"
+msgstr "%s: cuenta de líneas inválida"
+
+#: builtins/mapfile.def:277
+#, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: origen de matriz inválido"
+
+#: builtins/mapfile.def:294
+#, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: quantum de llamada inválido"
+
+#: builtins/mapfile.def:326
+msgid "empty array variable name"
+msgstr "nombre de variable de matriz vacío"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr "se requiere el soporte de variable de matriz"
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "`%s': falta el carácter de formato"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "`%c': carácter de formato inválido"
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr "aviso: %s: %s"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "falta el dígito hexadecimal para \\x"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "no hay otro directorio"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<no hay directorio actual>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr "la pila de directorios está vacía"
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr "índice de la pila de directorios"
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+"Muestra la lista de directorios actualmente grabados. Los directorios\n"
+" se guardan en la lista con la orden `pushd'; pueden ir saliendo de\n"
+" la lista con la orden `popd'.\n"
+" \n"
+" Opciones:\n"
+" -c\tlimpia la pila de directorios, eliminando todos los elementos\n"
+" -l\tno muestra las versiones con prefijo de tilde de los directorios\n"
+" \trelativos a su directorio inicial\n"
+" -p\tmuestra la pila de directorios con una entrada por línea\n"
+" -v\tmuestra la pila de directorios con una entrada por línea con\n"
+" \tsu posición en la pila como prefijo\n"
+" \n"
+" Argumentos:\n"
+" +N\tMuestra la N-ésima entrada contando desde la izquierda de\n"
+" \tla lista mostrada por dirs cuando se llama sin opciones,\n"
+" \tempezando desde cero.\n"
+" \n"
+" -N\tMuestra la N-ésima entrada contando desde la derecha de\n"
+"\tla lista mostrada por dirs cuando se llama sin opciones,\n"
+"\tempezando desde cero."
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Agrega un directorio al tope de la pila de directorios, o rota\n"
+" la pila, haciendo que el nuevo tope de la pila sea el\n"
+" directorio de trabajo actual. Sin argumentos, intercambia\n"
+" los dos directorios del tope.\n"
+" \n"
+" Argumentos:\n"
+" +N\tRota la pila para que el N-ésimo directorio (contando\n"
+" \tde la izquierda de la lista mostrada por `dirs',\n"
+" \tcomenzando desde cero) esté en el tope.\n"
+" -N\tRota la pila para que el N-ésimo directorio (contando\n"
+" \tde la derecha de la lista mostrada por `dirs',\n"
+" \tcomenzando desde cero) esté en el tope.\n"
+" \n"
+" dir\tagrega DIR a la pila de directorios en el tope,\n"
+" \thaciéndolo el nuevo directorio de trabajo actual.\n"
+" \n"
+" La orden interna `dirs' muestra la pila de directorios."
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Borra entradas de la pila de directorios. Sin argumentos, borra\n"
+" directorio del tope de la pila, y cambia al nuevo directorio tope.\n"
+" \n"
+" Opciones:\n"
+" -n\tsuprime el cambio normal de directorio cuando se borran\n"
+" \tdirectorios de la pila, así sólo se manipula la pila.\n"
+" \n"
+" Argumentos:\n"
+" +N\tBorra la N-ésima entrada contando de la izquierda de\n"
+" \tla lista mostrada por `dirs', comenzando desde cero.\n"
+" \tPor ejemplo: `popd +0' borra el primer directorio, `popd +1'\n"
+" \tel segundo.\n"
+" \n"
+" -N\tBorra la N-ésima entrada contando de la derecha de\n"
+" \tla lista mostrada por `dirs', comenzando desde cero.\n"
+" \tPor ejemplo: `popd -0' borra el último directorio, `popd -1'\n"
+" \tel penúltimo.\n"
+" \n"
+" La orden interna `dirs' muestra la pila de directorios."
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: especificación de tiempo de expiración inválida"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "error de lectura: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+"sólo se puede usar `return' en una función o un guión leído con `source'"
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "no se puede borrar al mismo tiempo una función y una variable"
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: no se puede borrar"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: no se puede borrar: %s es de solo lectura"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: no es una variable de matriz"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: no es una función"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "cuenta de shift"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr "no se pueden activar y desactivar opciones del shell simultáneamente"
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: nombre de opción del shell inválido"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "se requiere un argumento de nombre de fichero"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: no se encontró el fichero"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "no se puede suspender"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "no se puede suspender un shell de entrada"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "%s es un alias de `%s'\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s es una palabra clave del shell\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s: es una función\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "%s es una orden interna del shell\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s is %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "%s está asociado (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s: límite de argumento inválido"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "`%c': orden errónea"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: no se puede obtener el límite: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr "límite"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: no se puede modificar el límite: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "número octal"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "`%c': operador de modo simbólico inválido"
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "`%c': carácter de modo simbólico inválido"
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr " línea "
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "última orden: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "Abortando..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "error de orden desconocido"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "tipo de orden erróneo"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "conector erróneo"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "salto erróneo"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: variable sin asignar"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "ha expirado mientras esperaba alguna entrada: auto-logout\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "no se puede redirigir la salida estándar desde /dev/null: %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "TIMEFORMAT: `%c': carácter de formato inválido"
+
+#: execute_cmd.c:2075
+msgid "pipe error"
+msgstr "error de tubería"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: restringido: no se puede especificar `/' en nombres de órdenes"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: no se encontró la orden"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: intérprete erróneo"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "no se puede duplicar el df %d al df %d"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "se ha excedido el nivel de recursión de la expresión"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "desbordamiento de la base de la pila de recursión"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "error sintáctico en la expresión"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "se intentó asignar a algo que no es una variable"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "división por 0"
+
+# token en bison fue traducido como terminal. ¿Lo traducimos igual aquí
+# o lo dejamos como 'unidad' o 'elemento'? cfuga
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "bicho: elemento de asignación de expresión erróneo"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "se esperaba `:' para la expresión condicional"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "exponente menor que 0"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr ""
+"se esperaba un identificador después del pre-incremento o pre-decremento"
+
+# falta , singular em+
+# mmmh, puede faltar más de un paréntesis cfuga
+# tiene razón Enrique, es singular. cfuga
+#: expr.c:854
+msgid "missing `)'"
+msgstr "falta un `)'"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "error sintáctico: se esperaba un operando"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "error sintáctico: operador aritmético inválido"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s%s%s: %s (el elemento de error es \"%s\")"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "base aritmética inválida"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "valor demasiado grande para la base"
+
+#: expr.c:1329
+#, c-format
+msgid "%s: expression error\n"
+msgstr "%s: error de expresión\n"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getcwd: no se puede acceder a los directorios padre"
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "no se puede reestablecer el modo nodelay para el df %d"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+"no se puede asignar un nuevo descriptor de fichero para la entrada de bash "
+"desde el df %d"
+
+# buffer: espacio intermedio , alojamiento intermedio ( me gusta menos )
+# em+
+# almacenamiento intermedio. cfuga
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr ""
+"save_bash_input: el almacenamiento intermedio ya existe para el nuevo df %d"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr "start_pipeline: tubería de pgrp"
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr "el pid `forked' %d aparece en el trabajo en ejecución %d"
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "borrando el trabajo detenido %d con grupo de proceso %ld"
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr "add_process: el proceso %5ld (%s) en the_pipeline"
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr "add_process: pid %5ld (%s) se marca como vivo aún"
+
+# Cambiaría 'hay' por 'existe' em+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: %ld: no existe tal pid"
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr "Señal %d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Hecho"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Detenido"
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr "Detenido(%s)"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "Ejecutando"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Hecho(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "Salida %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Estado desconocido"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(`core' generado) "
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr " (dir ahora: %s)"
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "setpgid hijo (%ld a %ld)"
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait: pid %ld no es un proceso hijo de este shell"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "wait_for: No hay un registro del proceso %ld"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job: el trabajo %d está detenido"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: el trabajo ha terminado"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: el trabajo %d ya está en segundo plano"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, c-format
+msgid "%s: line %d: "
+msgstr "%s: línea %d: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr " (`core' generado)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(dir ahora: %s)\n"
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_jobs_control: falló getpgrp"
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_jobs_control: disciplina de línea"
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_jobs_control: setpgid"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr "no se puede establecer el grupo de proceso de terminal (%d)"
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "no hay control de trabajos en este shell"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc: falló la aserción: %s\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"malloc: %s:%d: aserción arruinada\r\n"
+
+#: lib/malloc/malloc.c:313
+msgid "unknown"
+msgstr "desconocido"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr "malloc: bloque en la lista libre sobreescrito"
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free: se llamó con un argumento de bloque previamente liberado"
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free: se llamó con un argumento de bloque sin asignar"
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr ""
+"free: se detectó un desbordamiento por debajo; mh_nbytes fuera de rango"
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free: los tamaños de los pedazos de inicio y fin son diferentes"
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc: se llamó con un argumento de bloque sin asignar"
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr ""
+"realloc: se detectó un desbordamiento por debajo; mh_nbytes fuera de rango"
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "realloc: los tamaños de los pedazos de inicio y fin son diferentes"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr "register_alloc: ¿la tabla alloc está llena con FIND_ALLOC?\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr "register_alloc: ¿%p ya está en la tabla como asignado?\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "register_free: ¿%p ya está en la tabla como libre?\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "base inválida"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: anfitrión desconocido"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: servicio inválido"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: especificación de ruta de red errónea"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "no hay soporte para operaciones de red"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc: %s:%d: no se pueden reasignar %lu bytes"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc: %s:%d: no se pueden reasignar %lu bytes"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Tiene correo en $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Tiene correo nuevo en $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "El correo en %s fue leído\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "error sintáctico: se requiere una expresión aritmética"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "error sintáctico: `;' inesperado"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "error sintáctico: `((%s))'"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: tipo de instrucción %d erróneo"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+"el documento-aquí en la línea %d está delimitado por fin-de-fichero (se "
+"esperaba `%s')"
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr ""
+"make_redirection: la instrucción de redirección `%d' está fuera de rango"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "EOF inesperado mientras se buscaba un `%c' coincidente"
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "EOF inesperado mientras se buscaba `]]'"
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "error sintáctico en la expresión condicional: elemento inesperado `%s'"
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "error sintáctico en la expresión condicional"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "elemento inesperado `%s', se esperaba `)'"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "se esperaba `)'"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "argumento inesperado `%s' para el operador unario condicional"
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "argumento inesperado para el operador unario condicional"
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "elemento inesperado `%s', se esperaba un operador binario condicional"
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "se esperaba un operador binario condicional"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "argumento inesperado `%s' para el operador binario condicional"
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "argumento inesperado para el operador binario condicional"
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "elemento inesperado `%c' en la orden condicional"
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "elemento inesperado `%s' en la orden condicional"
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "elemento inesperado %d en la orden condicional"
+
+# Token: elemento ?
+# error sintáctico, no se esperaba el símbolo `%c' em+
+# No puedo tomar tal cual la corrección. El error puede no ser
+# provocado por el símbolo. Simplemente estar cerca del mismo. cfuga
+# Por consistencia con el siguiente, yo borraría la coma. sv
+# Cierto. Coma borrada. cfuga
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "error sintáctico cerca del elemento inesperado `%s'"
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "error sintáctico cerca de `%s'"
+
+# Propongo cambio de orden:
+# no se esperaba el final de la línea em+
+# Ojo, que end of file es fin de fichero, no de línea. sv
+# Se hicieron ambos cambios. cfuga
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "error sintáctico: no se esperaba el final del fichero"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "error sintáctico"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Use \"%s\" para dejar el shell.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "EOF inesperado mientras se buscaba un `)' coincidente"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "completion: no se encuentra la función `%s'"
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr "progcomp_insert: %s: COMPSPEC nulo"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: conector erróneo `%d'"
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d: descriptor de fichero inválido: %s"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "cprintf: `%c': carácter de formato inválido"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "descriptor de fichero fuera de rango"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: redireccionamiento ambiguo"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: no se puede sobreescribir un fichero existente"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: restringido: no se puede redirigir la salida"
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "no se puede crear un fichero temporal para el documento-aquí: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: no se puede asignar una lista a un miembro de la matriz"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "no se admite /dev/(tcp|udp)/anfitrion/puerto sin red"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "error de redirección: no se puede duplicar el df"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "¡no se puede encontrar /tmp, crear por favor!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "/tmp debe ser un nombre de directorio válido"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: opción inválida"
+
+# Yo pondría "no tengo ningún nombre". sv
+# Revisé el código fuente de bash. Es un mensaje de error cuando no se
+# encuentra el nombre del usuario que ejecuta el shell. cfuga
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "¡No tengo nombre de usuario!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU bash, versión %s-(%s)\n"
+
+# En la lista spanglish se discutió mucho sobre script,
+# no sé en que quedó, ni puedo decirte ahora cómo lo hemos
+# traducido en otras ocasiones. Sehll script lo henmos traducido
+# como guión del shell , eso es seguro ... así que puede estar
+# bien así , ya lo verán otros em+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Modo de empleo:\t%s [opción GNU larga] [opción] ...\n"
+"\t%s [opción GNU larga] [opción] guión-del-shell\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "Opciones GNU largas:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Opciones del shell:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD o -c orden o -O opcion_shopt\t\t(sólo invocación)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s o -o opción\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"Teclee `%s -c \"help set\"' para más información sobre las opciones del "
+"shell.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"Teclee `%s -c help' para más información sobre las órdenes internas del "
+"shell.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "Use la orden `bashbug' para reportar bichos.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d: operación inválida"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Señal ambigua"
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Colgar"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Interrumpir"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "Salir"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Instrucción ilegal"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "BPT rastreo/captura"
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "instrucción ABORT"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "instrucción EMT"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Excepción de coma flotante"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "Matado"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "Error en el bus"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Violación de segmento"
+
+# llamada del sistema em+
+# Es una llamada a una función del sistema em+
+# De acuerdo, pero lo que está mal es la forma de invocar la
+# llamada a la función del sistema, no la llamada en sí cfuga
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Llamada al sistema errónea"
+
+# (pipe) no, por favor. Esto ya está traducido en libc, así que a estas
+# alturas, la gente ya debería saber qué es eso de la tubería. sv
+# De acuerdo. cfuga
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "Tubería rota"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Temporizador"
+
+#: siglist.c:111
+msgid "Terminated"
+msgstr "Terminado"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "Condición de E/S urgente"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Detenido (señal)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "Continúa"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "El proceso hijo ha muerto o está parado"
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Detenido (entrada por terminal)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Detenido (salida por terminal)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "E/S listas"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "Límite de CPU"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "Límite de ficheros"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "Alarma (virtual)"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "Alarma (entorno)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Ventana cambiada"
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr "Bloqueo de grabación"
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "Señal de usuario 1"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "Señal de usuario 2"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "entrada de datos HFT pendiente"
+
+# falla: fallo em+
+# Suscribo lo anterior. falla suena muy raro.
+# Yo lo pondría además al revés: fallo de energía inminente. sv
+# Me gusta como lo sugieres. Cambio hecho. cfuga
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "fallo de energía inminente"
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "caída del sistema inminente"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "migrando el proceso a otra CPU"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "error de programación"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "el modo monitor HFT ha sido concedido"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "el modo monitor HTF ha sido retirado"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "la secuencia de sonido HFT ha sido completado"
+
+#: siglist.c:215
+msgid "Information request"
+msgstr "Solicitud de información"
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Señal Desconocida #"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Señal Desconocida #%d"
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "sustitución errónea: no hay un `%s' que cierre en %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: no se puede asignar una lista a un miembro de la matriz"
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "no se puede crear la tubería para la sustitución del proceso"
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "no se puede crear un proceso hijo para la sustitución del proceso"
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "no se puede abrir la tubería llamada %s para lectura"
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "no se puede abrir la tubería llamada %s para escritura"
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "no se puede duplicar la tubería llamada %s como df %d"
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "no se pueden crear la tubería para la sustitución de la orden"
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr "no se puede crear un proceso hijo para la sustitución de la orden"
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "command_substitute: no se puede duplicar la tubería como df 1"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: parámetro nulo o no establecido"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: expresión de subcadena < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: sustitución errónea"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: no se puede asignar de esta forma"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "sustitución errónea: no hay una \"`\" que cierre en %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "no hay coincidencia: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "se esperaba un argumento"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: se esperaba una expresión entera"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "se esperaba `)'"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "se esperaba `)', se encontró %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: se esperaba un operador unario"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: se esperaba un operador binario"
+
+# Singular em+
+# Puede faltar más de un ] cfuga
+# Cierto, pero al menos uno seguro que falta.
+# Yo creo que no hace falta el (n). sv
+# Abreviando "falta [al menos] un `]'" saldría: "falta un `]'".
+# ¿No es mejor "falta algún `]'"? cfuga
+# Tiene razón Enrique: singular. cfuga
+#: test.c:811
+msgid "missing `]'"
+msgstr "falta un `]'"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "número de señal inválido"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps: valor erróneo en trap_list[%d]: %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+"run_pending_traps: el manejador de señal es SIG_DFL, reenviando %d (%s) a mí "
+"mismo"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: señal errónea %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "error al importar la definición de la función para `%s'"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "el nivel de shell (%d) es demasiado alto, se reestablece a 1"
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr "make_local_variable: no hay contexto de función en el ámbito actual"
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr "all_local_variables: no hay contexto de función en el ámbito actual"
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: parámetro nulo o no establecido"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "carácter inválido %d en exportstr para %s"
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "no hay `=' en exportstr para %s"
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+"pop_var_context: la cabeza de shell_variables no es un contexto de función"
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr "pop_var_context: no es un contexto global_variables"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+"pop_scope: la cabeza de shell_variables no es un ámbito de ambiente temporal"
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: no se puede abrir: %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d: descriptor de fichero inválido: %s"
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Copyright (C) 2009 Free Software Foundation, Inc."
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Licencia GPLv3+: GPL de GNU versión 3 o posterior <http://gnu.org/licenses/"
+"gpl.html>\n"
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU bash, versión %s (%s)\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+"Esto es software libre; usted es libre de cambiarlo y redistribuirlo.\n"
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr "NO hay GARANTÍA, a la extensión permitida por la ley.\n"
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Copyright (C) 2009 Free Software Foundation, Inc."
+
+#: version2.c:87
+#, fuzzy, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Licencia GPLv3+: GPL de GNU versión 3 o posterior <http://gnu.org/licenses/"
+"gpl.html>\n"
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: no se pueden asignar %lu bytes (%lu bytes asignados)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: no se pueden asignar %lu bytes"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: %s:%d: no se pueden asignar %lu bytes (%lu bytes asignados)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: %s:%d: no se pueden asignar %lu bytes"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [nombre[=valor] ... ]"
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] nombre [nombre ...]"
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+"bind [-lpvsPVS] [-m comb_teclas] [-f fichero] [-q nombre] [-u nombre] [-r "
+"secteclas] [-x secteclas:orden-shell] [secteclas:función-readline u orden-"
+"readline]"
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [n]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [n]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [orden-interna-shell [arg ...]]"
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr "caller [expresión]"
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-L|-P] [directorio]"
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr "pwd [-LP]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr "true"
+
+#: builtins.c:72
+msgid "false"
+msgstr "false"
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] orden [arg ...]"
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-aAfFilrtux] [-p] nombre[=valor] ..."
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-aAfFilrtux] [-p] nombre[=valor] ..."
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr "local [opción] nombre[=valor] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [arg ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [arg ...]"
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-a] [-dnps] [-f fichero] [nombre ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [arg ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts cadena_opciones nombre [arg]"
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a nombre] [orden [argumentos ...]] [redirección ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [n]"
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr "logout [n]"
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr "fc [-e nombre_e] [-lnr] [primero] [último] ó fc -s [pat=rep] [orden]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [id_trabajo]"
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr "bg [id_trabajo ...]"
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-lr] [-p ruta] [-dt] [nombre ...]"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "help [-ds] [patrón ...]"
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [-d despl] [n] ó history -anrw [fichero] ó history -ps arg "
+"[arg...]"
+
+# jobspec no es sólo el pid del proceso, puede ser tambien
+# el nombre de la orden que se creo con el proceso em+
+# por eso es idtrabajo, no pidtrabajo. De cualquier forma, no me agrada
+# mucho. ¿Sugerencias? cfuga
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr "jobs [-lnprs] [idtrabajo ...] ó jobs -x orden [args]"
+
+# lo mismo em+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [-h] [-ar] [idtrabajo ...]"
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s id_señal | -n num_señal | -id_señal] pid | idtrabajo ... ó kill -l "
+"[id_señal]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let arg [arg ...]"
+
+#: builtins.c:136
+#, fuzzy
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+"read [-ers] [-a matriz] [-d delim] [-i texto] [-n ncars] [-p prompt] [-t "
+"tiempo] [-u df] [nombre ...]"
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o nombre-opción] [arg ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [nombre ...]"
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-fn] [nombre[=valor] ...] ó export -p"
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-af] [nombre[=valor] ...] ó readonly -p"
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr "shift [n]"
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr "source fichero [argumentos]"
+
+#: builtins.c:152
+msgid ". filename [arguments]"
+msgstr ". fichero [argumentos]"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [expresión]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ arg... ]"
+
+# Esto podría ser "veces". Mirar el contexto. sv
+# No es veces. times es una orden interna del shell. cfuga
+#: builtins.c:162
+msgid "times"
+msgstr "times"
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [-lp] [[arg] id_señal ...]"
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-afptP] nombre [nombre ...]"
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdefilmnpqrstuvx] [límite]"
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-p] [-S] [modo]"
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr "wait [id]"
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr "wait [pid]"
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for NOMBRE [in PALABRAS ... ] ; do ÓRDENES; done"
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for (( exp1; exp2; exp3 )); do ÓRDENES; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select NOMBRE [in PALABRAS ... ;] do ÓRDENES; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr "time [-p] tubería"
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case PALABRA in [PATRÓN [| PATRÓN]...) ÓRDENES ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if ÓRDENES; then ÓRDENES; [ elif ÓRDENES; then ÓRDENES; ]...[ else "
+"ÓRDENES; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while ÓRDENES; do ÓRDENES; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until ÓRDENES; do ÓRDENES; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr "coproc [NOMBRE] orden [redirecciones]"
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "function nombre { ÓRDENES ; } ó nombre () { ÓRDENES ; }"
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr "{ ÓRDENES ; }"
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr "id_trabajo [&]"
+
+#: builtins.c:206
+msgid "(( expression ))"
+msgstr "(( expresión ))"
+
+#: builtins.c:208
+msgid "[[ expression ]]"
+msgstr "[[ expresión ]]"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr "variables - Nombres y significados de algunas variables de shell"
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [-n] [+N | -N | dir"
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [-n] [+N | -N]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o] [nombre_opción...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr "printf [-v var] formato [argumentos]"
+
+#: builtins.c:229
+#, fuzzy
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+"complete [-abcdefgjksuv] [-pr] [-o opción] [-A acción] [-G patglob] [-W "
+"listapalabras] [-F función] [-C orden] [-X patfiltro] [-P prefijo] [-S "
+"sufijo] [nombre ...]"
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+"compgen [-abcdefgjksuv] [-o opción] [-A acción] [-G patglob] [-W "
+"listapalabras] [-F función] [-C orden] [-X patfiltro] [-P prefijo] [-S "
+"sufijo] [palabra]"
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "compopt [-o|+o opción] [nombre ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"mapfile [-n cuenta] [-O origen] [-s cuenta] [-t] [-u df] [-C llamada] [-c "
+"quantum] [matriz]"
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"readarray [-n cuenta] [-O origen] [-s cuenta] [-t] [-u df] [-C llamada] [-c "
+"quantum] [matriz]"
+
+# Más en español sería: se define un alias por cada NOMBRE cuyo VALOR se da. sv
+# Lo mismo de antes: el alias es expandido -> el alias se expande. sv
+# no alias -> ningún alias. sv
+# De acuerdo. cfuga
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"Define o muestra aliases.\n"
+" \n"
+" `alias' sin argumentos muestra la lista de aliases en la forma\n"
+" reutilizable `alias NOMBRE=VALOR' en la salida estándar.\n"
+" \n"
+" De otra manera, se define un alias por cada NOMBRE cuyo VALOR se\n"
+" proporcione. Un espacio final en VALOR causa que se revise\n"
+" la siguiente palabra para sustitución de alias cuando se expande\n"
+" el alias.\n"
+" \n"
+" Opciones:\n"
+" -p\tMuestra todos los aliases definidos en un formato reusable\n"
+" \n"
+" Estado de salida:\n"
+" alias devuelve verdadero a menos que se de un NOMBRE para el cual\n"
+" no se haya definido ningún alias."
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Borra cada NOMBRE de la lista de alias definidos.\n"
+" \n"
+" Opciones:\n"
+" -a\telimina todas las definiciones de alias.\n"
+" Devuelve verdadero a menos que un NOMBRE no sea un alias existente."
+
+# lee 'la'... em+
+# Corregido. Además, es plural: lee las asignaciones... cfuga
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+"Establece secuencias de teclas Readline y variables.\n"
+"\n"
+" Asigna una secuencia de teclas a una función Readline o a una macro, o\n"
+" establece una variable Readline. La sintaxis de los argumentos que\n"
+" no son opciones es equivalente a la que se encuentra en ~/.inputrc,\n"
+" pero se debe pasar como un solo argumento:\n"
+" p.e., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Opciones:\n"
+" \n"
+" -m comb_teclas Usa COMB_TECLAS como la combinación de teclas por "
+"la\n"
+" duración de esta orden. Los nombres de "
+"combinaciones\n"
+" de teclas aceptables son emacs, emacs-standard,\n"
+" emacs-meta, emacs-ctlx, vi, vi-move, vi-command y\n"
+" vi-insert.\n"
+" -l Enlista los nombres de las funciones.\n"
+" -P Enlista los nombres de las funciones y "
+"asignaciones.\n"
+" -p Enlista las funciones y asignaciones en una forma "
+"que\n"
+" se puede reusar como entrada.\n"
+" -S Enlista las secuencias de teclas que invocan "
+"macros\n"
+" y sus valores.\n"
+" -s Enlista las secuencias de teclas que invocan "
+"macros\n"
+" y sus valores en una forma que se pueden reusar "
+"como\n"
+" entrada.\n"
+" -V Enlista los nombres de variables y valores.\n"
+" -v Enlista los nombres de variables y valores en una\n"
+" forma que se pueden reusar como entrada.\n"
+" -q nombre-funcion Pregunta qué teclas invocan la función nombrada.\n"
+" -u nombre-función Borra todas las teclas que están ligadas a\n"
+" la función nombrada.\n"
+" -r secteclas Borra la asignación para la SECTECLAS.\n"
+" -f fichero Lee las asignaciones de teclas del FICHERO.\n"
+" -x secteclas:orden-shell\tCausa que se ejecute la ORDEN-SHELL cuando\n"
+" \t\t\t\tse introduce la SECTECLAS.\n"
+" \n"
+" Estado de salida:\n"
+" bind devuelve 0 a menos que se presente una opción desconocida o suceda\n"
+" un error."
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Termina ciclos for, while o until.\n"
+" \n"
+" Termina un ciclo FOR, WHILE o UNTIL. Si se especifica N, termina\n"
+" N ciclos anidados.\n"
+" \n"
+" Estado de salida:\n"
+" El estado de salida es 0 a menos que N no sea mayor o igual a 1."
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Continúa iteraciones for, while o until\n"
+" \n"
+" Continúa la siguiente iteración del ciclo FOR, WHILE o UNTIL\n"
+" circundante. Si se especifica N, retoma en el N-ésimo ciclo "
+"circundante.\n"
+" \n"
+" Estado de Salida:\n"
+" El estado de salida es 0 a menos que N no sea mayor o igual a 1."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+"Ejecuta órdenes internas del shell\n"
+" \n"
+" Ejecuta la ORDEN-INTERNA-SHELL con los argumentos ARGs sin realizar\n"
+" la búsqueda interna de órdenes. Esto es útil cuando desea "
+"reimplementar\n"
+" una orden interna del shell como una función de shell, pero necesita\n"
+" ejecutar la orden interna dentro de la función.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve el estado de salida de la ORDEN-INTERNA-SHELL, o falso si la\n"
+" ORDEN-INTERNA-SHELL no es una orden interna de shell."
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+"Devuelve el contexto de la llamada a subrutina actual.\n"
+" \n"
+" Sin EXPR, devuelve \"$linea $nombrefichero\". Con EXPR, devuelve\n"
+" \"$linea $subrutina $nombrefichero\"; esta información adicional\n"
+" se puede usar para proveer un volcado de pila.\n"
+" \n"
+" El valor de EXPR indica cuántos marcos de llamada se debe retroceder\n"
+" antes del actual; el marco inicial es el marco 0.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve 0 a menos que el shell no esté ejecutando una función de shell\n"
+" o EXPR sea inválida."
+
+# Slash lo venimos traduciendo por barra inclinada , y backslash
+# por barra invertida em++
+# Corregido en toda la traducción. cfuga
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+"Cambia el directorio de trabajo del shell.\n"
+" \n"
+" Cambia el directorio actual a DIR. DIR por defecto es el valor de la\n"
+" variable de shell HOME.\n"
+" La variable CDPATH define la ruta de búsqueda por el directorio que\n"
+" contiene DIR. Los nombres alternativos de directorio en CDPATH se\n"
+" separan con dos puntos (:). Un nombre de directorio nulo es igual que\n"
+" el directorio actual Si DIR comienza con una barra inclinada (/),\n"
+" entonces no se usa CDPATH.\n"
+" Si no se encuentra el directorio, y la opción del shell `cdable_vars'\n"
+" está activa, entonces se trata la palabra como un nombre de variable.\n"
+" Si esa variable tiene un valor, se utiliza su valor como DIR.\n"
+" \n"
+" Opciones:\n"
+" -L\tfuerza a seguir los enlaces simbólicos\n"
+" -P\tusar la estructura física de directorios sin seguir los enlaces\n"
+" \tsimbólicos\n"
+" \n"
+" La acción por defecto es seguir los enlaces simbólicos, como si se\n"
+" especificara `-L'.\n"
+" \n"
+" Estado de salida:\n"
+" Devuelve 0 si se cambia el directorio; de otra forma es diferente a cero."
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+"Muestra el nombre del directorio de trabajo actual.\n"
+" \n"
+" Opciones:\n"
+" -L\tmuestra el valor de $PWD si nombra al directorio de\n"
+" \ttrabajo actual\n"
+" -P\tmuestra el directorio físico, sin enlaces simbólicos\n"
+" \n"
+" Por defecto, `pwd' se comporta como si se especificara `-L'.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve 0 a menos que se de una opción inválida o no se pueda leer\n"
+" el directorio actual."
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Orden nula.\n"
+" \n"
+" Sin efecto; la orden no hace nada.\n"
+" \n"
+" Estado de Salida:\n"
+" Siempre con éxito."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Devuelve un resultado con éxito.\n"
+" \n"
+" Estado de salida:\n"
+" Siempre con éxito."
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+"Devuelve un resultado sin éxito.\n"
+" \n"
+" Estado de salida:\n"
+" Siempre falla."
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+"Ejecuta una orden simple o muestra información sobre órdenes.\n"
+" \n"
+" Ejecuta la ORDEN con ARGumentos, suprimiendo la búsqueda de funciones\n"
+" de shell, o muestra información sobre las ÓRDENes especificadas. Se "
+"puede\n"
+" usar para invocar órdenes en disco cuando existe una función con el "
+"mismo\n"
+" nombre.\n"
+" \n"
+" Opciones:\n"
+" -p\tusa un valor por defecto para PATH para garantizar que\n"
+" \tencuentre todas las utilidades estándar\n"
+" -v\tmuestra una descripción de la ORDEN similar a la orden\n"
+" \tinterna `type'\n"
+" -V\tmuestra una descripción más detallada de cada ORDEN\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve el estado de salida de la ORDEN, o falla si no se encuentra\n"
+" la ORDEN."
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Establece valores de variable y atributos.\n"
+" \n"
+" Declara variables y les da atributos. Si no se da ningún NOMBRE,\n"
+" muestra los atributos y valores de todas las variables.\n"
+" \n"
+" Opciones:\n"
+" -f\trestringe la acción o muestra a nombres y definiciones\n"
+" \tde funciones\n"
+" -F\trestringe la muestra a nombres de funciones (con número de\n"
+" \tlínea y fichero fuente al depurar)\n"
+" -p\tmuestra los atributos y valor de cada NOMBRE\n"
+" \n"
+" Opciones que establecen atributos:\n"
+" -a\testablece NOMBREs como matrices indizadas (si se admiten)\n"
+" -A\testablece NOMBREs como matrices asociativas (si se admiten)\n"
+" -i\testablece NOMBREs con el atributo `integer'\n"
+" -l\tconvierte NOMBREs a minúsculas en la asignación\n"
+" -r\testablece NOMBREs como de sólo lectura\n"
+" -t\testablece NOMBREs con el atributo `trace'\n"
+" -u\tconvierte NOMBREs a mayúsculas en la asignación\n"
+" -x\testablece NOMBREs para exportar\n"
+" \n"
+" Si usa `+' en lugar de `-' desactiva el atributo dado.\n"
+" \n"
+" Las variables con el atributo integer realizan evaluación aritmética\n"
+" (vea la orden `let') cuando se asigna un valor a la variable.\n"
+" \n"
+" Cuando se usa en una función, `declare' hace locales a los NOMBREs,\n"
+" como sucede con la orden `local'.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que se de una opción inválida o\n"
+" suceda un error."
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+"Establece valores de variables y atributos.\n"
+" \n"
+" Obsoleto. Consulte `help declare'."
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+"Define variables locales.\n"
+" \n"
+" Crea una variable local llamada NOMBRE, y le da un VALOR. OPCIÓN puede\n"
+" ser cualquier opción aceptada por `declare'.\n"
+" \n"
+" Las variables locales sólo se pueden usar en una función; son visibles\n"
+" sólo en la función donde se definen y sus hijos.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que se de una opción inválida, suceda\n"
+" un error, o el shell no esté ejecutando una función."
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Escribe argumentos en la salida estándar.\n"
+" \n"
+" Muestra los ARGumentos en la salida estándar seguidos por un carácter\n"
+" de fin de línea.\n"
+" Opciones:\n"
+" -n\tno agrega un carácter de fin de línea\n"
+" -e\tactiva la interpretación de caracteres de escape de\n"
+" \tde barra invertida\n"
+" -E\tdesactiva explícitamente la interpretación de caracteres de\n"
+" \tde escape de barra invertida\n"
+" \n"
+" `echo' interpreta los siguientes caracteres de escape de barra "
+"invertida:\n"
+" \\a\talerta (timbre)\n"
+" \\b\tespacio hacia atrás\n"
+" \\c\tsuprime toda salida a continuación\n"
+" \\E\tcarácter de escape\n"
+" \\f\talimentación de papel\n"
+" \\n\tlínea nueva\n"
+" \\r\tretorno de carro\n"
+" \\t\ttabulador horizontal\n"
+" \\v\ttabulador vertical\n"
+" \\\\\tbarra invertida\n"
+" \\0nnn\tel carácter cuyo código ASCII es NNN (octal). NNN puede ser\n"
+" \tde 0 a 3 dígitos octales\n"
+" \\xHH\tel carácter de ocho bits cuyo valor es HH (hexadecimal). HH\n"
+" \tpuede ser de uno o dos dígitos hexadecimales\n"
+" \n"
+" Estado de salida:\n"
+" Devuelve con éxito a menos que suceda un error de escritura."
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Escribe argumentos en la salida estándar.\n"
+" \n"
+" Muestra los ARGumentos en la salida estándar seguidos por un carácter\n"
+" de fin de línea.\n"
+" Opciones:\n"
+" -n\tno agrega un carácter de fin de línea\n"
+" \n"
+" Estado de salida:\n"
+" Devuelve con éxito a menos que suceda un error de escritura."
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+"Activa y desactiva las órdenes internas del shell.\n"
+" \n"
+" Activa y desactiva las órdenes internas del shell. El desactivar le\n"
+" permite ejecutar una orden del disco que tenga el mismo nombre que\n"
+" la orden interna del shell, sin usar el nombre de ruta completo.\n"
+" \n"
+" Opciones:\n"
+" -a\tmuestra la lista de órdenes internas indicando si están activas o "
+"no\n"
+" -n\tdesactiva cada NOMBRE o muestra la lista de órdenes internas\n"
+" \tdesactivadas\n"
+" -p\tmuestra la lista de órdenes internas en una forma reusable\n"
+" -s\tmuestra sólo los nombres de las órdenes internas `especiales' "
+"Posix\n"
+" \n"
+" Opciones que controlan la carga dinámica:\n"
+" -f\tcarga la orden interna NOMBRE del objeto compartido FICHERO\n"
+" -d\tborra una orden interna cargada con -f\n"
+" \n"
+" Sin opciones, se activa cada NOMBRE.\n"
+" \n"
+" Para usar `test' que se encuentra en $PATH en lugar de la orden interna\n"
+" del shell, ejecute `enable -n test'.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que NOMBRE no sea una orden interna del "
+"shell\n"
+" o suceda un error."
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+"Ejecuta argumentos como una orden de shell.\n"
+" \n"
+" Combina los ARGumentos en una sola cadena, usa el resultado como "
+"entrada\n"
+" para el shell, y ejecuta las órdenes resultantes.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve el estado de salida de la orden o éxito si la orden es nula."
+
+# "a ser reconocidas" no está en español.
+# Yo pondría "las letras de opción que se reconocen". sv
+# en una de dos formas -> en una de las dos formas siguientes em+
+# dar argumentos -> especificar em+
+# De acuerdo. cfuga
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+"Decodifica argumentos de opción.\n"
+"\n"
+" Getopts se usa en procedimientos del shell para decodificar parámetros\n"
+" posicionales como opciones.\n"
+" \n"
+" CADENA_OPCIONES contiene las letras de opción para reconocer; si\n"
+" una letra es seguida por dos puntos, se espera que la opción tenga\n"
+" un argumento, del cual se debe separar con espacios en blanco.\n"
+" \n"
+" Cada vez que se invoca, getopts colocará la siguiente opción en la\n"
+" variable de shell $nombre, inicializando nombre si no existe, y el\n"
+" índice del siguiente argumento a ser procesado en la variable de\n"
+" shell OPTIND. OPTIND se inicializa a 1 cada vez que se invoca el\n"
+" shell, o un guión de shell. Cuando una opción requiere un argumento,\n"
+" getopts coloca ese argumento en la variable de shell OPTARG.\n"
+" \n"
+" getopts reporta errores en una de las dos formas siguientes. Si\n"
+" el primer carácter de OPTSTRING es dos puntos, getopts usa el\n"
+" aviso de errores silencioso. En este modo, no se muestran\n"
+" mensajes de error. Si se encuentra una opción inválida, getopts\n"
+" coloca el carácter de opción encontrado en OPTARG. Si no se\n"
+" encuentra el argumento necesario, getopts coloca ':' en NOMBRE y\n"
+" define OPTARG con el carácter de opción encontrado. Si getopts no\n"
+" está en modo silencioso, y se encuentra una opción inválida, getopts\n"
+" coloca '?' en NOMBRE y borra OPTARG. Si no se encuentra un argumento\n"
+" necesario, se coloca '?' en NOMBRE, se borra OPTARG, y se muestra\n"
+" un mensaje de diagnóstico.\n"
+" \n"
+" Si la variable de shell OPTERR tiene el valor 0, getopts desactiva\n"
+" la notificación de mensajes de error, aún si el primer carácter de\n"
+" OPTSTRING no es ':'. OPTERR tiene el valor 1 por defecto.\n"
+" \n"
+" Getopts normalmente compara los parámetros de posición ($0 - $9),\n"
+" pero si se especifican más argumentos, éstos se comparan en lugar\n"
+" de los primeros.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito si se encuentra una opción; falla si se encuentra\n"
+" el final de las opciones o sucede un error."
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+"Reemplaza el shell con la orden dada.\n"
+" \n"
+" Ejecuta la ORDEN, reemplazando este shell con el programa especificado.\n"
+" Los ARGUMENTOS se vuelven los argumentos de la ORDEN. Si no se\n"
+" especifica la ORDEN, cualquir redirección toma efecto en el shell "
+"actual.\n"
+" \n"
+" Opciones:\n"
+" -a nombre\tpasa el NOMBRE como el argumento cero de la ORDEN\n"
+" -c\t\tejecuta la ORDEN en un ambiente vacío\n"
+" -l\t\tcoloca un guión en el argumento cero de la ORDEN\n"
+" \n"
+" Si la orden no se puede ejecutar, termina un shell no interactivo,\n"
+" a menos que la opción de shell `execfail' esté activa.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve éxito a menos que no se encuentre la ORDEN o que suceda un\n"
+" error de redirección."
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"Termina el shell.\n"
+" \n"
+" Termina el shell con un estado de N. Si se omite N, el estado de "
+"salida\n"
+" es el mismo de la última orden ejecutada."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+"Termina un shell de entrada.\n"
+" \n"
+" Termina un shell de entrada con un estado de salida de N. Devuelve un\n"
+" error si no se ejecuta en un shell de entrada."
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+"Muestra o ejecuta órdenes de la lista de historia.\n"
+" \n"
+" fc se usa para listar o editar y reejecutar órdenes de la lista de\n"
+" historia. PRIMERO y ÚLTIMO pueden ser números que especifican el "
+"rango,\n"
+" o PRIMERO puede ser una cadena, que significa la orden más reciente que\n"
+" comience con esa cadena.\n"
+" \n"
+" -e NOMBRE_E selecciona el editor a usar. Por defecto es FCEDIT,\n"
+" \t\tdespués EDITOR, después vi\n"
+" -l lista líneas en lugar de editar\n"
+" -n omite los números de línea al listar\n"
+" -r inverte el orden de las líneas (muestra primero las más "
+"recientes)\n"
+" \n"
+" Con el formato `fc -s [pat=rep ...] [orden]', la ORDEN se\n"
+" ejecuta de nuevo después de realizar la sustitución ANT=NUEVO.\n"
+" \n"
+" Un alias útil para usar con esto es r='fc -s', así que al teclear\n"
+" `r cc' ejecuta la última orden que comience con `cc' y al teclear\n"
+" `r' re-ejecuta la última orden.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito o el estado de la orden ejecutada; si sucede un "
+"error\n"
+" es diferente de cero."
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"Mueve el trabajo al primer plano.\n"
+" \n"
+" Ubica al trabajo identificado con IDTRABAJO en el primer plano, y\n"
+" lo hace el trabajo actual. Si IDTRABAJO no está presente, se usa\n"
+" la noción del shell del trabajo actual.\n"
+" \n"
+" Estado de Salida:\n"
+" El estado del comando ubicado en primer plano, o falla si sucede un "
+"error."
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Mueve trabajos al segundo plano.\n"
+" \n"
+" Coloca los trabajos identificados por cada IDTRABAJO en segundo plano,\n"
+" como si se hubieran iniciado con `&'. Si IDTRABAJO no está presente,\n"
+" se usa la noción del shell del trabajo actual.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve éxito a menos que el control de trabajos no esté activado o\n"
+" suceda un error."
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+"Almacena o muestra la ubicación de los programas.\n"
+" \n"
+" Determina y almacena la ruta completa de cada órden NOMBRE. Si\n"
+" no se proporcionan argumentos, se muestra la información de las\n"
+" órdenes almacenadas.\n"
+" \n"
+" Opciones:\n"
+" -d\t\tolvida la ubicación almacenada de cada NOMBRE\n"
+" -l\t\tmuestra en un formato que se puede reusar como entrada\n"
+" -p ruta\tusa RUTA como la ruta completa de NOMBRE\n"
+" -r\t\tolvida todas las ubicaciones almacenadas\n"
+" -t\t\tmuestra la ubicación almacenada de cada NOMBRE,\n"
+" \t\tcada ubicación con el NOMBRE correspondiente\n"
+" \t\tse dan varios NOMBREs\n"
+" Argumentos:\n"
+" NOMBRE\t\tCada NOMBRE se busca en $PATH y se agrega a la lista\n"
+" \t\tde órdenes almacenadas.\n"
+" \n"
+" Estado de Salida\n"
+" Devuelve con éxito a menos que no se encuentre NOMBRE o se proporcione\n"
+" una opción inválida."
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+"Muestra información sobre órdenes internas.\n"
+" \n"
+" Muestra un resumen breve de las órdenes internas. Si se especifica\n"
+" un PATRÓN, da ayuda detallada sobre todas las órdenes que\n"
+" coincidan con el PATRÓN, de otra forma se muestra la lista de\n"
+" tópicos de ayuda.\n"
+" \n"
+" Opciones:\n"
+" -d\tmuestra una descripción corta para cada tópico\n"
+" -m\tmuestra el uso en un formato similar a página man\n"
+" -s\tmuestra sólo una sinopsis breve de uso para cada tópico que\n"
+" \tcoincida con el PATRÓN\n"
+" \n"
+" Argumentos:\n"
+" PATRÓN\tPatrón que especifica un tópico de ayuda\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que no se encuentre PATRÓN o se proporcione\n"
+" una opción inválida."
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Muestra o manipula la lista de la historia. \n"
+" Muestra la lista de la historia con números de línea, mostrando\n"
+" cada línea modificada con un `*' como prefijo. El argumento N\n"
+" muestra solamente las últimas N entradas.\n"
+" \n"
+" Opciones:\n"
+" -c\tborra la lista de historia eliminando todas las entradas\n"
+" -d despl\tborra la entrada de la histora en la posición DESPL\n"
+" \n"
+" -a\tagrega las líneas de histora de esta sesión al fichero de "
+"historia\n"
+" -n\tlee todas las líneas de historia que no se han leído del fichero\n"
+" \tde historia\n"
+" -r\tlee el fichero de historia y agrega el contenido al fichero\n"
+" \tde historia\n"
+" -w\tescribe la historia actual en el fichero de historia\n"
+" \n"
+" -p\thace expansión de historia en cada ARGumento y muestra el\n"
+" \tresultado, sin guardarlo en la lista de historia\n"
+" -s\tagrega los ARGumentos a la lista de historia como\n"
+" \tuna sola entrada\n"
+" Si se proporciona FICHERO, entonces se usa como el fichero de\n"
+" historia. Si no, si $HISTFILE tien un valor, éste se usa, en otro caso\n"
+" ~/.bash_history.\n"
+" \n"
+" Si la variable $HISTTIMEFORMAT está definida y no es nula, se usa su\n"
+" valor como una cadena de formato strftime(3) para mostrar la marca de\n"
+" tiempo asociada con cada entrada de historia mostrada. No se muestra\n"
+" ninguna marca de tiempo de otra forma."
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+"Muestra el estado de los trabajos.\n"
+" \n"
+" Muestra los trabajos activos. IDTRABAJO restringe la salida a\n"
+" ese trabajo. Sin opciones, se muestra el estado de todos los trabajos\n"
+" activos.\n"
+" \n"
+" Opciones:\n"
+" -l\tmuestra los id's de los procesos, además de\n"
+" \tla información normal\n"
+" -n\tsolo muestra los procesos que han cambia de estado desde\n"
+" \tla última notificación\n"
+" -p\tsolo muestra los id's de los procesos -r\trestringe la salida "
+"a los trabajos en ejecución\n"
+" -s\trestringe la salida a los trabajos detenidos\n"
+" \n"
+" Si se especifica -x, la ORDEN se ejecuta después de que todas las\n"
+" especificaciones de trabajo que aparecen en ARGS se han reemplazado\n"
+" con el ID de proceso del líder del grupo de procesos de dicho trabajo.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que se de una opción inválida o suceda un\n"
+" error. Si se usa -x, devuelve el estado de salida de la ORDEN."
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+"Borra trabajos del shell actual.\n"
+" \n"
+" Borra cada argumento IDTRABAJO de la tabla de trabajos activos. Sin\n"
+" algún IDTRABAJO, el shell utiliza su noción del trabajo actual.\n"
+" \n"
+" Opciones:\n"
+" -a\tborra todos los trabajos si no se proporciona IDTRABAJO\n"
+" -h\tmarca cada IDTRABAJO para no se envíe SIGHUP al trabajo si\n"
+" \tel shell recibe un SIGHUP\n"
+" -r\tborra solo los trabajos en ejecución\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que se proporcionen una opción o un\n"
+" IDTRABAJO inválidos."
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Envía una señal a un trabajo.\n"
+" \n"
+" Envía a los procesos nombrados por PID (o IDTRABAJO) la señal ID_SEÑAL\n"
+" o NUM_SEÑAL. Si no están presentes ni ID_SEÑAL o NUM_SEÑAL, se asume\n"
+" SIGTERM.\n"
+" \n"
+" Opciones:\n"
+" -s sig\tSIG es un nombre de señal\n"
+" -n sig\tSIG es un número de señal\n"
+" -l\tenlista los nombres de señales; si hay argumentos a continuación\n"
+" \tde `-l', se asume que son números de señal para las cuales se debe\n"
+" mostrar el nombre.\n"
+" \n"
+" Kill es una orden interna del shell por dos razones: permite que se\n"
+" puedan usar IDs de trabajo en lugar de IDs de proceso, y permite matar\n"
+" procesos si ha alcanzado el límite de procesos que puede crear.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que se de una opción inválida o suceda un "
+"error."
+
+# "a ser evaluada" no está en español. sv
+# Cierto. ¿Así está mejor? cfuga
+# overflow -> desbordamiento o sobrepasamiento. nunca lo he visto
+# traducido como sobreflujo. sv
+# Corregido. cfuga
+# No sé si existe precedencia en español, pero me suena fatal.
+# Yo pondría simplemente "prioridad". sv
+# Creo que si existe, pero tu sugerencia es mejor. cfuga
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+"Evalúa expresiones aritméticas.\n"
+" \n"
+" Evalúa cada ARG como una expresión aritmética. La evaluación se hace\n"
+" con enteros de longitud fija, sin revisar desbordamientos, aunque la\n"
+" la división por 0 se captura y se marca como un error. La siguiente\n"
+" lista de operadores está agrupada en niveles de operadores de la misma\n"
+" prioridad. Se muestran los niveles en orden de prioridad decreciente.\n"
+" \n"
+" \tid++, id--\tpost-incremento, post-decremento de variable\n"
+" \t++id, --id\tpre-incremento, pre-decremento de variable\n"
+" \t-, +\t\tmenos, más unario\n"
+" \t!, ~\t\tnegación lógica y basada en bits\n"
+" \t**\t\texponenciación\n"
+" \t*, /, %\t\tmultiplicación, división, residuo\n"
+" \t+, -\t\tadición, sustracción\n"
+" \t<<, >>\t\tdesplazamientos de bits izquierdo y derecho\n"
+" \t<=, >=, <, >\tcomparación\n"
+" \t==, !=\t\tequivalencia, inequivalencia\n"
+" \t&\t\tAND de bits\n"
+" \t^\t\tXOR de bits\n"
+" \t|\t\tOR de bits\n"
+" \t&&\t\tAND lógico\n"
+" \t||\t\tOR lógico\n"
+" \texpr ? expr : expr\n"
+" \t\t\toperador condicional\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tasignación\n"
+" \n"
+" Se permiten las variables de shell como operandos. Se reemplaza\n"
+" el nombre de la variable por su valor (coercionado a un entero\n"
+" de longitud fija) dentro de una expresión. La variable no\n"
+" necesita tener activado su atributo integer para ser usada en\n"
+" una expresión.\n"
+" \n"
+" Los operadores se evalúan en orden de prioridad. Primero se\n"
+" evalúan las sub-expresiones en paréntesis y pueden sobrepasar\n"
+" las reglas de prioridad anteriores.\n"
+" \n"
+" Estado de salida:\n"
+" Si el último ARGumento se evalúa como 0, let devuelve 1; de otra\n"
+" forma, let devuelve 0."
+
+#: builtins.c:966
+#, fuzzy
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+"Lee una línea de la salida estándar y la divide en campos.\n"
+" \n"
+" Lee una sola línea de la entrada estándar, o del descriptor de\n"
+" fichero FD si se proporciona la opción -u. La línea se divide en "
+"campos\n"
+" con separación de palabras, y la primera palabra se asigna al primer\n"
+" NOMBRE, la segunda palabra al segundo NOMBRE, y así sucesivamente, con\n"
+" las palabras restantes asignadas al último NOMBRE. Sólo los caracteres\n"
+" que se encuentran en $IFS se reconocen como delimitadores de palabras.\n"
+" \n"
+" Si no se proporciona ningún NOMBRE, la línea leída se guarda en la\n"
+" variable REPLY.\n"
+" \n"
+" Opciones:\n"
+" -a matriz\tasigna las palabras leídas a índices secuenciales de\n"
+" \tla variable de matriz MATRIZ, empezando en cero\n"
+" -d delim\tcontinúa hasta que se lea el primer carácter de DELIM,\n"
+" \t\ten lugar de línea nueva\n"
+" -e\t\tusa Readline para obtener la línea en un shell interactivo\n"
+" -i texto\tUsa el TEXTO como el texto inicial para Readline\n"
+" -n ncars\tregresa después de leer NCARS caracteres en lugar de\n"
+" \t\tesperar una línea nueva\n"
+" -p prompt\tmuestra la cadena PROMPT sin un caractér de línea nueva\n"
+" \t\tal final antes de intentar leer\n"
+" -r\t\tno permite que las barras invertidas escapen caracteres\n"
+" -s\t\tno muestra la salida que proviene de una terminal\n"
+" -t tiempo\texpira y devuelve fallo si no se lee una línea completa\n"
+" \t\tde entrada en TIEMPO segundos. El valor de la variable TMOUT\n"
+" \t\tes el tiempo de expiración por defecto. TIEMPO puede ser un\n"
+" \t\tnúmero fraccionario. Si TIEMPO es 0, read devuelve con éxito\n"
+" \t\tsólo si hay entrada disponible en el descriptor de fichero\n"
+" \t\tespecificado. El estado de salida es mayor que 128 si se excede\n"
+" \t\tel tiempo de expiración.\n"
+" -u df\t\tlee del descriptor de fichero DF en lugar de la entrada\n"
+" \t\testándar \n"
+" Estado de Salida:\n"
+" El código de devolución es cero, a menos que se encuentre un final de\n"
+" línea, el tiempo de read expire, o se proporcione un descriptor de\n"
+" fichero inválido como el argumento de -u."
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+"Devuelve de una función de shell.\n"
+" \n"
+" Causa que una función o un guión leído termine con el valor de "
+"devolución\n"
+" especificado por N. Si se omite N, el estado de devolución es el de\n"
+" la última orden ejecutada dentro de la función o guión.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve N, o falla si el shell no está ejecutando una función o un "
+"guión."
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+"Establece o borra los valores de las opciones de shell y los parámetros\n"
+"posicionales.\n"
+" \n"
+" Opciones:\n"
+" -a Marca las variables que se modifican o crean para exportación.\n"
+" -b Notifica el término de trabajos inmediatamente.\n"
+" -e Termina inmediatamente si una orden termina con un estado\n"
+" diferente a cero.\n"
+" -f Desactiva la generación de nombres de ficheros (englobamiento).\n"
+" -h Recuerda la ubicación de las órdenes como se localizaron.\n"
+" -k Todos los argumentos de asignación se colocan en el ambiente para "
+"una\n"
+" orden, no solo aquellos que preceden al nombre de la orden.\n"
+" -m Activa el control de trabajos.\n"
+" -n Lee órdenes pero no las ejecuta.\n"
+" -o nombre-opcion\n"
+" Establece la variable correspondiente a nombre-opcion:\n"
+" allexport igual que -a\n"
+" braceexpand igual que -B\n"
+" emacs usa una interfaz de edición de línea estilo "
+"emacs\n"
+" errexit igual que -e\n"
+" errtrace igual que -E\n"
+" functrace igual que -T\n"
+" hashall igual que -h\n"
+" histexpand igual que -H\n"
+" history activa la historia de órdenes\n"
+" ignoreeof el shell no terminará después de leer EOF\n"
+" interactive-comments\n"
+" permite que haya comentarios en órdenes "
+"interactivas\n"
+" keyword igual que -k\n"
+" monitor igual que -m\n"
+" noclobber igual que -C\n"
+" noexec igual que -n\n"
+" noglob igual que -f\n"
+" nolog actualmente se acepta pero se descarta\n"
+" notify igual que -b\n"
+" nounset igual que -u\n"
+" onecmd igual que -t\n"
+" physical igual que -P\n"
+" pipefail el valor de devolución de una tubería es el "
+"estado\n"
+" del último comando en salir con un estado "
+"diferente\n"
+" de cero, o cero si ninguna orden termina con un\n"
+" estado diferente de cero\n"
+" posix cambia el comportamiento de bash donde la "
+"operación\n"
+" por defecto difiere del estándar Posix para que\n"
+" coincida con el estándar\n"
+" privileged igual que -p\n"
+" verbose igual que -v\n"
+" vi usa una interfaz de edición de línea estilo vi\n"
+" xtrace igual que -x\n"
+" -p Activo cuando los ids real y efectivo del usuario no coinciden.\n"
+" Desactiva el procesamiento del fichero $ENV y la importación de\n"
+" funciones de shell. Si se desactiva esta opción causa que el uid "
+"y\n"
+" el gid efectivos sean iguales al uid y el gid real.\n"
+" -t Termina después de leer y ejecutar una orden.\n"
+" -u Trata las variables sin definir como un error se sustituyen.\n"
+" -v Muestra las líneas de entrada del shell mientras se leen.\n"
+" -x Muestra las órdenes y sus argumentos mientras se ejecutan.\n"
+" -B el shell realizará expansión de llaves.\n"
+" -C Si se activa, no permite que los ficheros regulares existentes\n"
+" se sobreescriban por redirección de la salida.\n"
+" -E Si se activa, las funciones del shell heredan la trampa ERR.\n"
+" -H Activa el estilo de sustitución de historia ! . Esta opción está\n"
+" activa por defecto cuando el shell es interactivo.\n"
+" -P Si se activa, no sigue enlaces simbólicos cuando se ejecutan "
+"órdenes\n"
+" como cd, que cambian el directorio actual.\n"
+" -T Si se activa, las funciones del shell heredan la trampa DEBUG.\n"
+" - Asigna cualquier argumento restante a los parámetros "
+"posicionales.\n"
+" Las opciones -x y -v se desactivan.\n"
+" \n"
+" Si se usa + en lugar de - causa que estas opciones se desactiven. Las\n"
+" opciones también se pueden usar en la invocación del shell. El "
+"conjunto\n"
+" actual de opciones se puede encontrar en $-. Los n ARGs restantes son\n"
+" parámetros posicionales que se asignan, en orden, a $1, $2, .. $n. Si "
+"no\n"
+" se proporciona ningún ARG, se muestran todas las variables del shell.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que se proporcione una opción inválida."
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+"Desactiva valores y atributos de las variables y funciones del shell.\n"
+" \n"
+" Por cada NOMBRE, borra la función o variable correspondiente.\n"
+" \n"
+" Opciones:\n"
+" -f\ttrata cada NOMBRE como una función de shell\n"
+" -v\ttrata cada NOMBRE como una variable de shell\n"
+" \n"
+" Sin opciones, unset primero trata de borrar una variable, y si falla,\n"
+" trata de borrar una función.\n"
+" \n"
+" Algunas variables no se pueden borrar; también consulte `readonly'.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que se proporcione una opción inválida o\n"
+" un NOMBRE sea de sólo lectura."
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Establece el atributo de exportación para las variables de shell.\n"
+" \n"
+" Marca cada NOMBRE para exportación automática al ambiente para las "
+"órdenes\n"
+" ejecutadas subsecuentemente. Si se proporciona un VALOR, se asigna el\n"
+" VALOR antes de exportar.\n"
+" \n"
+" Opciones:\n"
+" -f\tse refiere a funciones de shell\n"
+" -n\tborra la propiedad de exportación para cada NOMBRE\n"
+" -p\tmuestra una lista de todas las variables y funciones exportadas\n"
+" \n"
+" El argumento `--' desactiva el procesamiento posterior de opciones.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que se proporcione una opción inválida o que\n"
+" NOMBRE sea inválido."
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Marca las variables de shell para evitar su modificación.\n"
+" \n"
+" Marca cada NOMBRE como de sólo lectura; los valores de esos NOMBREs\n"
+" no se pueden modificar por asignaciones subsecuentes. Si se "
+"proporciona\n"
+" un VALOR, se asigna el VALOR antes de marcar como de sólo lectura.\n"
+" \n"
+" Opciones:\n"
+" -a\tse refiere a variables de matriz indizada\n"
+" -A\tse refiere a variables de matriz asociativa\n"
+" -f\tse refiere a funciones de shell\n"
+" -p\tmuestra una lista de todas las variables y funciones de sólo "
+"lectura\n"
+" \n"
+" El argumento `--' desactiva el procesamiento posterior de opciones.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que se proporcione una opción inválida o\n"
+" el NOMBRE sea inválido."
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+"Desplaza los parámetros posicionales.\n"
+" \n"
+" Renombra los parámetros posicionales $N+1,$N+2 ... a $1,$2 ... Si no\n"
+" se proporciona N, se asume que es 1.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que N sea negativo o mayor que $#."
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+"Ejecuta órdenes de un fichero en el shell actual.\n"
+" \n"
+" Lee y ejecuta órdenes del FICHERO en el shell actual. Se utilizan las\n"
+" entradas en $PATH para encontrar el directorio que contiene el FICHERO.\n"
+" Si se proporciona ARGUMENTOS, se convierten en los parámetros "
+"posicionales\n"
+" cuando se ejecuta el FICHERO.\n"
+" Estado de Salida:\n"
+" Devuelve el estado de la última orden ejecutada del FICHERO; falla si\n"
+" no se puede leer el FICHERO."
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Suspende la ejecución del shell.\n"
+" \n"
+" Suspende la ejecución de este shell hasta que recibe una señal SIGCONT.\n"
+" Los shells de entrada no se pueden suspender, a menos que sean "
+"forzados.\n"
+" \n"
+" Opciones:\n"
+" -f\tfuerza la suspensión, aún si el shell es un shell de entrada\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que no esté activo el control de trabajos o\n"
+" suceda un error."
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+"Evalúa expresiones condicionales.\n"
+" \n"
+" Termina con un estado de 0 (verdadero) o 1 (falso) dependiendo de\n"
+" la evaluación de EXPR. Las expresiones pueden ser unarias o binarias.\n"
+" Las expresiones unarias se usan generalmente para examinar el estado\n"
+" de un fichero. Hay también operadores de cadenas, y operadores de\n"
+" comparación numérica.\n"
+" \n"
+" Operadores de fichero:\n"
+" \n"
+" -a FICHERO Verdadero si el fichero existe.\n"
+" -b FICHERO Verdadero si el fichero es especial de bloques.\n"
+" -c FICHERO Verdadero si el fichero es especial de caracteres.\n"
+" -d FICHERO Verdadero si el fichero es un directorio.\n"
+" -e FICHERO Verdadero si el fichero existe.\n"
+" -f FICHERO Verdadero si el fichero existe y es un fichero "
+"regular.\n"
+" -g FICHERO Verdadero si el fichero tiene activado el set-group-"
+"id.\n"
+" -h FICHERO Verdadero si el fichero es un enlace simbólico.\n"
+" -L FICHERO Verdadero si el fichero es un enlace simbólico.\n"
+" -k FICHERO Verdadero si el fichero tiene el bit `sticky' "
+"activado.\n"
+" -p FICHERO Verdadero si el fichero es una tubería nombrada.\n"
+" -r FICHERO Verdadero si el fichero es legible para usted.\n"
+" -s FICHERO Verdadero si el fichero existe y no está vacío.\n"
+" -S FICHERO Verdadero si el fichero es un `socket'.\n"
+" -t DF Verdadero si el DF está abierto en una terminal.\n"
+" -u FICHERO Verdadero si el fichero tiene activado el set-user-id.\n"
+" -w FICHERO Verdadero si usted puede escribir en el fichero.\n"
+" -x FICHERO Verdadero si usted puede ejecutar el fichero.\n"
+" -O FICHERO Verdadero si usted efectivamente posee el fichero.\n"
+" -G FICHERO Verdadero si su grupo efectivamente posee el fichero.\n"
+" -N FICHERO Verdadero si el fichero se modificó desde la última "
+"lectura.\n"
+" \n"
+" FICH1 -nt FICH2 Verdadero si fich1 es más reciente que fich2\n"
+" (de acuerdo a la fecha de modificación).\n"
+" \n"
+" FICH1 -ot FICH2 Verdadero si fich1 es más antiguo que fich2.\n"
+" \n"
+" FICH1 -ef FICH2 Verdadero si fich1 es un enlace duro a fich2.\n"
+" \n"
+" Operadores de cadenas:\n"
+" \n"
+" -z CADENA Verdadero si la cadena está vacía.\n"
+" \n"
+" -n CADENA\n"
+" CADENA Verdadero si la cadena no está vacía.\n"
+" \n"
+" CADENA1 = CADENA2\n"
+" Verdadero si las cadenas son iguales.\n"
+" CADENA1 != CADENA2\n"
+" Verdadero si las cadenas no son iguales.\n"
+" CADENA1 < CADENA2\n"
+" Verdadero si STRING1 se ordena antes que STRING2\n"
+" lexicográficamente.\n"
+" CADENA1 > CADENA2\n"
+" Verdadero si STRING1 se ordena después que STRING2\n"
+" lexicográficamente.\n"
+" \n"
+" Otros operadores:\n"
+" \n"
+" -o OPCIÓN Verdadero si la opción del shell OPCIÓN está activada.\n"
+" ! EXPR Verdadero si expr es falso.\n"
+" EXPR1 -a EXPR2 Verdadero si expr1 Y expr2 are son verdaderas.\n"
+" EXPR1 -o EXPR2 Verdadero si cualquiera de expr1 O expr2 es verdadera.\n"
+" \n"
+" arg1 OP arg2 Pruebas aritméticas. OP es uno de -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Los operadores binarios aritméticos devuelven verdadero si ARG1 es\n"
+" igual, no igual, menor, menor o igual, mayor, mayor o igual que ARG2.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito si EXPR evalúa a verdadero; falla si EXPR evalúa a\n"
+" falso o se proporciona un argumento inválido."
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"Evalúa una expresión condicional.\n"
+" \n"
+" Este es un sinónimo para la orden interna \"test\", pero el último\n"
+" argumento debe ser un `]' literal, que coincida con el `[' inicial."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Muestra los tiempos de proceso.\n"
+" \n"
+" Muestra los tiempos de usuario y sistema acumulados por el shell y "
+"todos\n"
+" sus procesos hijos.\n"
+" \n"
+" Estado de salida:\n"
+" Siempre con éxito."
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+"Atrapa señales y otros eventos.\n"
+" \n"
+" Define y activa manejadores a ejecutar cuando el shell recibe señales\n"
+" u otras condiciones.\n"
+" \n"
+" ARG es una orden para leer y ejecutar cuando el shell recibe la(s)\n"
+" señal(es) ID_SEÑAL. Si ARG no está presente (y sólo se proporciona\n"
+" una sola ID_SEÑAL) o se proporciona `-', cada señal especificada se\n"
+" reestablece a su valor original. Si ARG es la cadena nula, el shell\n"
+" y las órdenes que invoque ignoran cada ID_SEÑAL.\n"
+" \n"
+" Si una ID_SEÑAL es EXIT (0) se ejecuta la orden ARG al salir del\n"
+" shell. Si una ID_SEÑAL es DEBUG, se ejecuta ARG después de cada\n"
+" orden simple.\n"
+" \n"
+" Si no se proporcionan argumentos, trap muestra la lista de órdenes\n"
+" asociadas con cada señal.\n"
+" \n"
+" Opciones:\n"
+" -l\tmuestra una lista de nombres de señal con su número "
+"correspondiente\n"
+" -p\tmuestra las órdenes trap asociadas con cada ID_SEÑAL\n"
+" \n"
+" Cada ID_SEÑAL es un nombre de señal en <signal.h> o un número de señal.\n"
+" Los nombres de señal no son sensibles a mayúsculas y minúsculas y el\n"
+" prefijo SIG es opcional. Se puede enviar una señal al shell con\n"
+" \"kill -signal $$\". \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que una ID_SEÑAL sea inválida o se "
+"proporcione\n"
+" una opción inválida."
+
+# No he visto que este fichero incluya la posibilidad de traducir las
+# palabras que muestra `type -t'. Por esta razón, se dejan en inglés. cfuga
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+"Muestra información sobre el tipo de orden.\n"
+" \n"
+" Por cada NOMBRE, indica cómo se interpretaría si se usa como un nombre\n"
+" de orden.\n"
+" \n"
+" Opciones:\n"
+" -a\tmuestra todas las ubicaciones que contienen un ejecutable llamado\n"
+" \tNOMBRE; incluye aliases, órdenes internas, y funciones, solo y solo "
+"si\n"
+" \tno se usó también la opción `-p'\n"
+" -f\tsuprime la búsqueda de funciones de shell\n"
+" -P\tfuerza una búsqueda en PATH por cada nombre, aún si hay un alias,\n"
+" \torden interna, o función, y devuelve el nombre del fichero en el "
+"disco\n"
+" \tque se ejecutaría\n"
+" -p\tdevuelve ya sea el nombre del fichero en disco que se ejecutaría,\n"
+" \to nada si `type -t NOMBRE' no devuelve `fichero'.\n"
+" -t\tmuestra una sola palabra, que es una de `alias', `keyword',\n"
+" \t`function', `builtin', `file' o `', si el NOMBRE es un alias,\n"
+" \tpalabra reservada del shell, función del shell, orden interna del\n"
+" \tshell, fichero de disco, o no se encuentra, respectivamente.\n"
+" \n"
+" Argumentos:\n"
+" NOMBRE\tNombre de orden a interpretar.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito si se encuentran todos los NOMBREs; falla si no se\n"
+" encuentra alguno."
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Modifica los límites de recursos del shell.\n"
+" \n"
+" Provee control sobre los recursos disponibles para el shell y los\n"
+" procesos que crea, en sistemas que permiten tal control.\n"
+" \n"
+" Opciones:\n"
+" \n"
+" -S\tusa el límite de recurso `soft'\n"
+" -H\tusa el límite de recurso `hard'\n"
+" -a\tmuestra todos los límites actuales\n"
+" -b\tel tamaño del almacenamiento intermedio del `socket'\n"
+" -c\tel tamaño máximo de los ficheros `core' creados\n"
+" -d\tel tamaño máximo del segmento de datos de un proceso\n"
+" -e\tla prioridad máxima de calendarización (`nice')\n"
+" -f\tel tamaño máximo de los ficheros escritos por el shell y sus "
+"hijos\n"
+" -i\tel número máximo de señales pendientes\n"
+" -l\tel tamaño máximo que un proceso puede bloquear en memoria\n"
+" -m\tel tamaño máximo para las variables residentes\n"
+" -n\tel número máximo de descriptores de fichero abiertos\n"
+" -p\tel tamaño del almacenamiento intermedio para tuberías\n"
+" -q\tel tamaño máximo de bytes en las colas de mensajes POSIX\n"
+" -r\tla prioridad máxima de calendarización en tiempo real\n"
+" -s\tel tamaño máximo de pila\n"
+" -t\tla cantidad máxima de tiempo de cpu en segundos\n"
+" -u\tel número máximo de procesos de usuario\n"
+" -v\tel tamaño de la memoria virtual\n"
+" -x\tel número máximo de bloqueos de ficheros\n"
+" \n"
+" Si se establece LÍMITE, éste es el nuevo valor del recurso "
+"especificado;\n"
+" los valores especiales de LÍMITE `soft', `hard' y `unlimited'\n"
+" corresponden al límite suave actual, el límite duro actual, y\n"
+" sin límite, respectivamente. De otra forma, se muestra el valor actual\n"
+" de los recursos especificados. Si no se proporciona una opción, se\n"
+" asume -f.\n"
+" \n"
+" Los valores son en incrementos de 1024 bytes, excepto para -t, el cual\n"
+" es en segundos, -p, el cual es en incrementos de 512 bytes, y -u, el\n"
+" cual es un número de procesos sin escala.\n"
+" \n"
+" Estado de salida:\n"
+" Devuelve con éxito a menos que se proporcione una opción inválida o "
+"suceda\n"
+" un error."
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+"Muestra o establece la máscara de modo de ficheros.\n"
+" \n"
+" Establece la máscara de creación de ficheros del usuario a MODO. Si se\n"
+" omite el MODO, muestra el valor actual de la máscara.\n"
+" \n"
+" Si el MODO empieza con un dígito, se interpreta como un número octal;\n"
+" de otra forma es una cadena de modo simbólico como la que acepta chmod "
+"(1).\n"
+" \n"
+" Opciones:\n"
+" -p\tsi se omite el MODO, muestra en una forma reusable como entrada\n"
+" -S\tsalida simbólica; de otra forma muestra el modo como número octal\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que el MODO sea inválido o se proporcione\n"
+" una opción inválida."
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Espera la terminación del trabajo y devuelve el estado de salida.\n"
+" \n"
+" Espera al proceso identificado por ID, el cual puede ser un ID de\n"
+" proceso o una especificación de trabajo, y reporta su estado de salida.\n"
+" Si no se proporciona un ID, espera a todos los procesos hijo activos,\n"
+" y el estado de devolución es cero. Si ID es una especificación de\n"
+" trabajo, espera a todos los procesos en la cola de trabajos.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve el estado de ID; falla si ID es inválido o se proporciona una\n"
+" opción inválida."
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Espera la terminación del trabajo y devuelve el estado de salida.\n"
+" \n"
+" Espera al proceso especificado y reporta su estado de salida. Si\n"
+" no se proporciona un PID, espera a todos los procesos hijo activos,\n"
+" y el código de devolución es cero. PID debe ser un ID de proceso.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve el estado de ID; falla si ID es inválido o se proporciona una\n"
+" opción inválida."
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Ejecuta órdenes por cada miembro en una lista.\n"
+" \n"
+" El ciclo `for' ejecuta una secuencia de órdenes para cada miembro en\n"
+" una lista de elementos. Si `in PALABRAS ...;' no está presente,\n"
+" entonces se asume `in \"$@\"'. Para cada elemento en PALABRAS,\n"
+" se define NOMBRE como ese elemento, y se ejecutan las ÓRDENES.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve el estado de la última orden ejecutada."
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Aritmética para un ciclo.\n"
+" \n"
+" Equivalente a\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tÓRDENES\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, y EXP3 son expresiones aritméticas. Si se omite\n"
+" cualquier expresión, se comporta como si se evaluara a 1.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve el estado de la última orden ejecutada."
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Selecciona palabras de una lista y ejecuta órdenes.\n"
+" \n"
+" Se expanden las PALABRAS, generando una lista de palabras. El\n"
+" conjunto de palabras expandidas se muestra en la salida de error\n"
+" estándar, cada una precedida por un número. Si `in PALABRAS' no\n"
+" está presente, se asume `in \"$@\"'. Entonces se muestra el\n"
+" prompt PS3 y se lee una línea de la entrada estándar. Si la\n"
+" línea consiste en el número correspondiente a una de las palabras\n"
+" mostradas, entonces se define NOMBRE como esa palabra. Si la\n"
+" línea está vacía, PALABRAS y el prompt se muestran de nuevo. Si\n"
+" se lee EOF, se completa la orden. Cualquier otro valor leído\n"
+" causa que NOMBRE se defina como nulo. La línea leída se guarda\n"
+" en la variable REPLY. Se ejecutan las ÓRDENES después de cada\n"
+" selección hasta que se ejecuta una orden break.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve el estado de la última orden ejecutada."
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+"Reporta el tiempo consumido por la ejecución de la tubería.\n"
+" \n"
+" Ejecuta la TUBERÍA y muestra un resumen del tiempo real, el tiempo de\n"
+" CPU del usuario, y el tiempo de CPU del sistema utilizado por\n"
+" la ejecución de la TUBERÍA cuando termina.\n"
+" \n"
+" Opciones:\n"
+" -p\tmuestra el resumen de tiempos en el formato Posix transportable\n"
+" \n"
+" Estado de Salida:\n"
+" El estado de devolución es el estado de devolución de la TUBERÍA."
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Ejecuta órdenes en base a la coincidencia de patrones.\n"
+" \n"
+" Ejecuta ÓRDENES selectivamente basado en coincidencias de la PALABRA\n"
+" con el PATRÓN. Se utiliza `|' para separar patrones múltiples.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve el estado de la última orden ejecutada."
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Ejecuta comandos en base a condicionales.\n"
+" \n"
+" Se ejecuta la lista `if ÓRDENES'. Si su estado de salida es cero,\n"
+" entonces se ejecuta la lista `then ÓRDENES`. De otra forma, cada lista\n"
+" `elif ÓRDENES' se ejecuta en su lugar, y si su estado de salida es "
+"cero,\n"
+" se ejecuta la lista `then ÓRDENES' correspondiente y se completa la\n"
+" orden if. De otra forma, se ejecuta la lista `else ÓRDENES', si está\n"
+" presente. El estado de salida de toda la construcción es el estado de\n"
+" salida de la última orden ejecutada, o cero si ninguna condición "
+"resultó\n"
+" verdadera.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve el estado de la última orden ejecutada."
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Ejecuta órdenes mientras una prueba tenga éxito.\n"
+" \n"
+" Expande y ejecuta ÓRDENES mientras la orden final en las ÓRDENES\n"
+" `while' tenga un estado de salida de cero.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve el estado de la última orden ejecutada."
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Ejecuta órdenes mientras una prueba no tenga éxito.\n"
+" \n"
+" Expande y ejecuta ÓRDENES mientras la orden final en las ÓRDENES\n"
+" `until' tengan un estado de salida que no sea cero.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve el estado de la última orden ejecutada."
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+"Crea un coproceso llamado NOMBRE.\n"
+" \n"
+" Ejecuta la ORDEN asíncronamente, con la salida estándar y la entrada\n"
+" estándar de la orden contectada a través de una tubería a los "
+"descriptores\n"
+" de fichero asignados a los índices 0 y 1 de una variable de matriz "
+"NOMBRE\n"
+" en el shell en ejecución. El nombre por defecto es \"COPROC\".\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve el estado de salida de la ORDEN."
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+"Define una función de shell.\n"
+" \n"
+" Crea una función de shell llamada NOMBRE. Cuando se invoca como una\n"
+" orden simple, NOMBRE ejecuta ÓRDENES en el contexto del shell que lo\n"
+" llamó. Cuando se invoca NOMBRE, los argumentos se pasan a la función\n"
+" como $1...$n, y el nombre de la función está en $FUNCNAME.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que NOMBRE sea de sólo lectura"
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Agrupa órdenes como una unidad.\n"
+" \n"
+" Ejecuta un conjunto de órdenes en un grupo. Esta es una forma de\n"
+" redirigir un conjunto completo de órdenes.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve el estado de la última orden ejecutada."
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+"Reinicia el trabajo en primer plano.\n"
+" \n"
+" Equivalente al argumento IDTRABAJO de la orden `fg'. Reinicia un\n"
+" trabajo detenido o en segundo plano. IDTRABAJO puede especificar\n"
+" un nombre de trabajo o un número de trabajo. Un `&' a continuación\n"
+" de IDTRABAJO coloca al trabajo en segundo plano, como si la\n"
+" especificación del trabajo se hubiera proporcionado como\n"
+" un argumento de `bg'.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve el estado del trabajo reiniciado."
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+"Evalúa una expresión aritmética.\n"
+" \n"
+" Se evalua la EXPRESIÓN de acuerdo a las reglas de evaluación\n"
+" aritmética. Equivalente a \"let EXPRESIÓN\".\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve 1 si la EXPRESIÓN evalúa a 0; devuelve 0 de otra manera."
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+"Ejecuta una orden condicional.\n"
+" \n"
+" Devuelve un estado de 0 ó 1 dependiendo de la evaluación de la "
+"expresión\n"
+" condicional EXPRESIÓN. Las expresiones se componen de los mismos\n"
+" elementos primarios usados por la orden interna `test', y se pueden\n"
+" combinar usando los siguientes operadores:\n"
+" \n"
+" ( EXPRESIÓN )\tDevuelve el valor de la EXPRESIÓN\n"
+" ! EXPRESIÓN\tVerdadero si la EXPRESIÓN es falsa; de otra forma es "
+"falso\n"
+" EXPR1 && EXPR2\tVerdadero si EXPR1 y EXPR2 son verdaderos; de\n"
+" \t\totra forma es falso\n"
+" \tEXPR1 || EXPR2\tVerdadero si EXPR1 o EXPR2 es verdadero; de\n"
+" \t\totra forma es falso\n"
+" \n"
+" Cuando se usan los operadores `==' y `!=', se usa la cadena a la\n"
+" derecha del operador como un patrón y se realiza una coincidencia de\n"
+" patrones. Cuando se usa el operador `=~', la cadena a la derecha del\n"
+" operador coincide como una expresión regular.\n"
+" \n"
+" Los operadores && y || no evalúan EXPR2 si EXPR1 es suficiente para\n"
+" determinar el valor de una expresión. \n"
+" Estado de Salida:\n"
+" 0 o 1 dependiendo del valor de la EXPRESIÓN."
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+"Nombres de variables de shell comunes y su uso.\n"
+" \n"
+" BASH_VERSION\tInformación de versión para este Bash.\n"
+" CDPATH\tUna lista de directorios separada por dos puntos\n"
+" \t\tpara buscar directorios dados como argumentos para `cd'.\n"
+" GLOBIGNORE\tUna lista de patrones separada por dos puntos\n"
+" \t\tque describe nombres de fichero a ignorar por la expansión\n"
+" \t\tde rutas de nombre.\n"
+" HISTFILE\tEl nombre del fichero donde se almacena su historia\n"
+" \t\tde órdenes.\n"
+" HISTFILESIZE\tEl número máximo de líneas que puede contener\n"
+" \t\teste fichero.\n"
+" HISTSIZE\tEl número máximo de líneas de líneas de historia que\n"
+" \t\tun shell en ejecución puede acceder.\n"
+" HOME\tLa ruta completa a su directorio de entrada.\n"
+" HOSTNAME\tEl nombre del anfitrión actual.\n"
+" HOSTTYPE\tEl tipo de CPU bajo el cual se ejecuta esta versión de\n"
+" \t\tBash.\n"
+" IGNOREEOF\tControla la acción del shell al recibir un carácter\n"
+" \t\tEOF como la única entrada. Si está definida, entonces su\n"
+" \t\tvalor es el número de caracteres EOF que se deben leer de\n"
+" \t\tforma consecutiva en una línea vacía antes de que el shell\n"
+" \t\ttermine (por defecto 10). Cuando no está definida, EOF\n"
+" \t\tsignifica el fin de la entrada.\n"
+" MACHTYPE\tUna cadena que describe el sistema actual donde se\n"
+" \t\tejecuta Bash.\n"
+" MAILCHECK\tLa frecuencia, en segundos, que Bash busca correo nuevo.\n"
+" MAILPATH\tUna lista de nombres de ficheros separada por dos puntos\n"
+" \t\ten la cual Bash busca correo nuevo.\n"
+" OSTYPE\tla versión de Unix en la que se ejecuta esta versión\n"
+" \t\tde Bash.\n"
+" PATH\tUna lista de directorios separada por dos puntos en la que\n"
+" \t\tse buscan órdenes.\n"
+" PROMPT_COMMAND\tUna orden a ejecutar antes de mostrar cada prompt\n"
+" \t\tprimario.\n"
+" PS1\t\tLa cadena primaria de prompt.\n"
+" PS2\t\tLa cadena secundaria de prompt.\n"
+" PWD\t\tLa ruta completa del directorio actual.\n"
+" SHELLOPTS\tUna lista separada por dos puntos de las opciones\n"
+" \t\tde shell activadas.\n"
+" TERM\tEl nombre del tipo actual de terminal.\n"
+" TIMEFORMAT\tEl formato de salida para las estadísticas de tiempo\n"
+" \t\tmostradas por la palabra reservada `time'.\n"
+" auto_resume\tSi no es nulo significa que una palabra de orden que\n"
+" \t\taparece en una línea por sí sola se busca primero en la lista\n"
+" \t\tactual de trabajos detenidos. Si se encuentra ahí, ese\n"
+" \t\ttrabajo se coloca en primer plano. Un valor `exact' significa\n"
+" \t\tque la palabra de orden debe coincidir exactamente con una\n"
+" \t\torden en la lista de trabajos detenidos. Un valor `substring'\n"
+" \t\tsignifica que la palabra de orden debe coincidir con una\n"
+" \t\tsubcadena del trabajo. Cualquier otro valor significa que\n"
+" \t\tla orden debe ser un prefijo de un trabajo detenido.\n"
+" histchars\tLos caracteres que controlan la expansión de historia\n"
+" \t\ty la sustitución rápida. El primer carácter es el\n"
+" \t\tcarácter de sustitución de historia, generalmente `!'. El\n"
+" \t\tsegundo es el carácter de `sustitución rápida', generalmente\n"
+" \t\t`^'. El tercero es el carácter `comentario de historia',\n"
+" \t\tgeneralmente `#'.\n"
+" HISTIGNORE\tUna lista separada por dos puntos de patrones usados\n"
+" \t\tpara decidir cuáles órdenes se deben guardar en la lista de\n"
+" \t\thistoria.\n"
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Agrega directorios a la pila.\n"
+" \n"
+" Agrega un directorio al tope de la pila de directorios, o rota\n"
+" la pila, haciendo que el nuevo tope de la pila sea el\n"
+" directorio de trabajo actual. Sin argumentos, intercambia\n"
+" los dos directorios del tope.\n"
+" \n"
+" Opciones:\n"
+" -n\tsuprime el cambio normal de directorio cuando se agregan\n"
+" \tdirectorios a la pila, así sólo se manipula la pila.\n"
+" \n"
+" Argumentos:\n"
+" +N\tRota la pila para que el N-ésimo directorio (contando\n"
+" \tde la izquierda de la lista mostrada por `dirs',comenzando\n"
+" \tdesde cero) esté en el tope.\n"
+" \n"
+" -N\tRota la pila para que el N-ésimo directorio (contando\n"
+" \tde la derecha de la lista mostrada por `dirs', comenzando\n"
+" \tdesde cero) esté en el tope.\n"
+" \n"
+" dir\tagrega DIR a la pila de directorios en el tope,\n"
+" \thaciéndolo el nuevo directorio de trabajo actual.\n"
+" \n"
+" La orden interna `dirs' muestra la pila de directorios.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que se proporcione un argumento inválido o\n"
+" falle el cambio de directorio."
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Borra directorios de la pila.\n"
+" \n"
+" Borra entradas de la pila de directorios. Sin argumentos,\n"
+" borra el directorio del tope de la pila, y cambia al\n"
+" nuevo directorio tope.\n"
+" \n"
+" Opciones:\n"
+" -n\tsuprime el cambio normal de directorio cuando se borran\n"
+" \tdirectorios de la pila, así sólo se manipula la pila.\n"
+" \n"
+" Argumentos:\n"
+" \n"
+" +N\tBorra la N-ésima entrada contando de la izquierda de\n"
+" \tla lista mostrada por `dirs', comenzando desde cero.\n"
+" \tPor ejemplo: `popd +0' borra el primer directorio, `popd +1'\n"
+" \tel segundo.\n"
+" \n"
+" -N\tBorra la N-ésima entrada contando de la derecha de\n"
+" \tla lista mostrada por `dirs', comenzando desde cero.\n"
+" \tPor ejemplo: `popd -0' borra el último directorio, `popd -1'\n"
+" \tel penúltimo.\n"
+" \n"
+" La orden interna `dirs' muestra el contenido de la pila.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que se proporcione un argumento inválido o\n"
+" falle el cambio de directorio."
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Muestra la pila de directorios.\n"
+" \n"
+" Muestra la lista de directorios actualmente grabados. Los directorios\n"
+" se guardan en la lista con la orden `pushd'; pueden ir saliendo de\n"
+" la lista con la orden `popd'.\n"
+" \n"
+" Opciones:\n"
+" \n"
+" -c\tlimpia la pila de directorios, eliminando todos sus elementos.\n"
+" -l\tno muestra versiones con prefijo de tilde de los directorios\n"
+" \trelativos a su directorio inicial.\n"
+" -p\tmuestra la pila de directorios con una entrada por línea\n"
+" -v\tmuestra la pila de directorios con una entrada por línea con\n"
+" \tsu posición en la pila como prefijo\n"
+" \n"
+" Argumentos: +N\tmuestra la N-ésima entrada contando desde la "
+"izquierda de la lista\n"
+" \tmostrada por dirs cuando se invoca sin opciones,\n"
+" \tempezando de cero.\n"
+" \n"
+" -N\tmuestra la N-ésima entrada contando desde la derecha de la lista\n"
+" \tmostrada por dirs cuando se invoca sin opciones,\n"
+" \tempezando de cero.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito, a menos que se proporcione una opción inválida o\n"
+" suceda un error."
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+"Activa y desactiva opciones de shell.\n"
+" \n"
+" Cambia la configuración de cada opción de shell NOMBRE_OPCIÓN. Sin\n"
+" alguna opción como argumento, muestra todas las opciones de shell con\n"
+" una indicación si está activa o no.\n"
+" \n"
+" Opciones:\n"
+" -o\trestringe NOMBRE_OPCIÓN a aquellos definidos con `set -o'\n"
+" -p\tmuestra cada opción de shell con un indicador de su estado\n"
+" -q\tsuprime la salida\n"
+" -s\tactiva (establece) cada NOMBRE_OPCIÓN\n"
+" -u\tdesactiva (borra) cada NOMBRE_OPCIÓN\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito si se activa NOMBRE_OPCIÓN; falla si se proporciona\n"
+" una opción inválida o NOMBRE_OPCIÓN está desactivado."
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+"Da formato y muestra ARGUMENTOS bajo el control del FORMATO.\n"
+" \n"
+" Opciones:\n"
+" -v var\tasigna la salida a la variable de shell VAR en lugar\n"
+" \t\tde mostrarla en la salida estándar\n"
+" \n"
+" FORMATO es una cadena de caracteres la cual contiene tres tipos de\n"
+" objetos caracteres simples, los cuales solamente se copian a la salida\n"
+" salida estándar; secuencias de escape de caracteres, las cuales\n"
+" se convierten y se copian a la salida estándar; y especificaciones de\n"
+" formato, cada una de las cuales causa la muestra del siguiente "
+"argumento\n"
+" consecutivo.\n"
+" \n"
+" Además de las especificaciones de formato estándar descritas en\n"
+" printf(1) y printf(3), printf interpreta:\n"
+" %b\texpande las secuencias de escape de barra invertida en\n"
+" \t\tel argumento correspondiente\n"
+" %q\tcita el argumento de tal forma que se puede reusar como\n"
+" \t\tentrada del shell.\n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que se proporcione una opción inválida o\n"
+" suceda un error de escritura o de asignación."
+
+#: builtins.c:1895
+#, fuzzy
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Especifica cuántos argumentos deben ser completados por Readline.\n"
+" \n"
+" Por cada NOMBRE, especifica cuántos argumentos se deben completar. Si\n"
+" no se proporcionan opciones, se muestran las especificaciones de\n"
+" completado existentes en una forma que permite que se reusen como "
+"entrada.\n"
+" \n"
+" Opciones:\n"
+" -p\tmuestra las especificaciones de completado existentes en formato\n"
+" \treusable\n"
+" -r\tborra una especificación de completado para cada NOMBRE,\n"
+" \to, si no se proporcionan NOMBREs, todas las especificaciones\n"
+" \tde completado\n"
+" \n"
+" Cuando se intenta el completado, las acciones se aplican en el orden en\n"
+" que se enlistan las opciones de letra mayúscula antes indicadas.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que se proporcione una opción inválida o\n"
+" suceda un error."
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Muestra los posibles complementos dependiendo de las opciones.\n"
+" \n"
+" Sirve para usarse desde una función de shell que genere complementos\n"
+" posibles. Si se proporciona el argumento opcional PALABRA, se generan\n"
+" las coincidencias contra PALABRA.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que se proporcione una opción inválida o\n"
+" suceda un error."
+
+#: builtins.c:1938
+#, fuzzy
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+"Modifica o muestra las opciones de completado.\n"
+" \n"
+" Modifica las opciones de completado para cada NOMBRE, o, si no se\n"
+" proporcionan NOMBREs, el completado actualmente en ejecución. Si no se\n"
+" proporcionan OPCIONes, muestra las opciones de completado para cada\n"
+" NOMBRE o la especificación de completado actual. \n"
+" Opciones:\n"
+" \t-o opción\tEstablece la opción de completado OPCIÓN\n"
+" \t\tpara cada NOMBRE\n"
+" \n"
+" Si usa `+o' en lugar de `-o' desactiva la opción especificada.\n"
+" \n"
+" Argumentos:\n"
+" \n"
+" Cada NOMBRE se refiere a una orden para la cual se definió previamente\n"
+" una especificación de completado usando la orden interna `complete'.\n"
+" Si no se proporcionan NOMBREs, compopt debe llamarse desde una función\n"
+" que genere completados, y se modifican las opciones para ese generador\n"
+" de completados en ejecución.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que se proporcione una opción inválida o\n"
+" el NOMBRE no tenga una especificación de completado definida."
+
+#: builtins.c:1968
+#, fuzzy
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+"Lee líneas de un fichero y las guarda en una variable de matriz.\n"
+" \n"
+" Lee líneas de la entrada estándar y las guarda en la variable de matriz\n"
+" MATRIZ, o desde el descriptor de fichero DF si se proporciona la opción\n"
+" -u. La variable MAPFILE es la MATRIZ por defecto.\n"
+" \n"
+" Opciones:\n"
+" -n cuenta\tCopia hasta CUENTA líneas. Si CUENTA es 0, se copian\n"
+" \ttodas las líneas.\n"
+" -O origen\tComienza a asignar a MATRIZ en el índice ORIGEN. El\n"
+" \tíndice por defecto es 0.\n"
+" -s cuenta \tDescarta las primeras CUENTA líneas leídas.\n"
+" -t\t\tBorra la nueva línea final de cada línea leída.\n"
+" -u df\t\tLee líneas del descriptor de fichero DF en lugar de la\n"
+" \tentrada estándar.\n"
+" -C llamada\tEvalúa LLAMADA cada vez que se leen QUANTUM líneas.\n"
+" -c quantum\tEspecifica el número de líneas a leer entre cada\n"
+" \tllamada a LLAMADA.\n"
+" \n"
+" Argumentos:\n"
+" MATRIZ\t\tNombre de variable de matriz a usar para guardar datos.\n"
+" \n"
+" Si se proporciona -C sin -c, el quantum por defecto es 5000. Cuando\n"
+" se evalúa LLAMADA, se proporciona el índice del siguiente elemento\n"
+" de la matriz a asignar como un argumento adicional.\n"
+" \n"
+" Si no se proporciona un origen explícito, mapfile borrará la MATRIZ\n"
+" antes de usarla para asignación.\n"
+" \n"
+" Estado de Salida:\n"
+" Devuelve con éxito a menos que se proporcione una opción inválida o\n"
+" la MATRIZ sea de sólo lectura."
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+"Lee líneas de un fichero en una variable de matriz.\n"
+" \n"
+" Un sinónimo de `mapfile'."
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xrealloc: no se pueden reasignar %lu bytes (%lu bytes asignados)"
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: no se pueden reasignar %lu bytes"
+
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: %s:%d: no se pueden reasignar %lu bytes (%lu bytes asignados)"
+
+#~ msgid " "
+#~ msgstr " "
+
+#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR,"
+#~ msgstr "Sin EXPR, returns devuelve \"$linea $nombrefichero\". Con EXPR,"
+
+#~ msgid "returns \"$line $subroutine $filename\"; this extra information"
+#~ msgstr "devuelve \"$linea $subrutina $nombrefichero\"; esta información"
+
+#~ msgid "can be used used to provide a stack trace."
+#~ msgstr "adicional se puede usar para proveer un volcado de pila."
+
+#~ msgid ""
+#~ "The value of EXPR indicates how many call frames to go back before the"
+#~ msgstr ""
+#~ "El valor de EXPR indica cuántos marcos de llamada se debe retroceder"
+
+#~ msgid "current one; the top frame is frame 0."
+#~ msgstr "antes del actual; el marco inicial es el marco 0."
+
+#~ msgid "%s: invalid number"
+#~ msgstr "%s: número inválido"
+
+#~ msgid "Shell commands matching keywords `"
+#~ msgstr "Órdenes del shell que coinciden con las palabras `"
+
+#~ msgid "Display the list of currently remembered directories. Directories"
+#~ msgstr ""
+#~ "Muestra la lista de directorios actualmente grabados. Los directorios"
+
+#~ msgid "find their way onto the list with the `pushd' command; you can get"
+#~ msgstr "se guardan en la lista con la orden `pushd'; pueden ir saliendo de"
+
+#~ msgid "back up through the list with the `popd' command."
+#~ msgstr "la lista con la orden `popd'."
+
+#~ msgid ""
+#~ "The -l flag specifies that `dirs' should not print shorthand versions"
+#~ msgstr ""
+#~ "La opción -l especifica que `dirs' no debe mostrar versiones abreviadas"
+
+#~ msgid ""
+#~ "of directories which are relative to your home directory. This means"
+#~ msgstr ""
+#~ "de los directorios que son relativos a su directorio inicial. Esto "
+#~ "significa"
+
+#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag"
+#~ msgstr "que `~/bin' se mostrará como `/homes/bfox/bin'. La opción -v"
+
+#~ msgid "causes `dirs' to print the directory stack with one entry per line,"
+#~ msgstr ""
+#~ "causa que `dirs' imprima la pila de directorios con una entrada por línea,"
+
+#~ msgid ""
+#~ "prepending the directory name with its position in the stack. The -p"
+#~ msgstr ""
+#~ "anteponiendo la posición en la pila al nombre del directorio. La opción"
+
+#~ msgid "flag does the same thing, but the stack position is not prepended."
+#~ msgstr "-p hace lo mismo, pero no antepone la posición en la pila."
+
+#~ msgid ""
+#~ "The -c flag clears the directory stack by deleting all of the elements."
+#~ msgstr ""
+#~ "La opción -c limpia la pila de directorios borrando todos sus elementos."
+
+#~ msgid ""
+#~ "+N displays the Nth entry counting from the left of the list shown by"
+#~ msgstr ""
+#~ "+N muestra la N-ésima entrada contando desde la izquierda de la lista"
+
+#~ msgid " dirs when invoked without options, starting with zero."
+#~ msgstr ""
+#~ " mostrada por dirs cuando se invoca sin opciones, empezando de cero."
+
+#~ msgid ""
+#~ "-N displays the Nth entry counting from the right of the list shown by"
+#~ msgstr ""
+#~ "-N muestra la N-ésima entrada contando desde la derecha de la lista"
+
+#~ msgid "Adds a directory to the top of the directory stack, or rotates"
+#~ msgstr "Agrega un directorio al tope de la pila de directorios, o rota"
+
+#~ msgid "the stack, making the new top of the stack the current working"
+#~ msgstr "la pila, haciendo que el nuevo tope de la pila sea el directorio de"
+
+#~ msgid "directory. With no arguments, exchanges the top two directories."
+#~ msgstr ""
+#~ "trabajo actual. Sin argumentos, intercambia los dos directorios del tope."
+
+#~ msgid "+N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "+N Rota la pila para que el N-ésimo directorio (contando"
+
+#~ msgid " from the left of the list shown by `dirs', starting with"
+#~ msgstr ""
+#~ " de la izquierda de la lista mostrada por `dirs', comenzando desde"
+
+#~ msgid " zero) is at the top."
+#~ msgstr " cero) esté en el tope."
+
+#~ msgid "-N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "-N Rota la pila para que el N-ésimo directory (contando"
+
+#~ msgid " from the right of the list shown by `dirs', starting with"
+#~ msgstr ""
+#~ " de la derecha de la lista mostrada por `dirs', comenzando desde"
+
+#~ msgid "-n suppress the normal change of directory when adding directories"
+#~ msgstr ""
+#~ "-n suprime el cambio normal de directorio cuando se agregan directorios"
+
+#~ msgid " to the stack, so only the stack is manipulated."
+#~ msgstr " a la pila, así sólo se manipula la pila."
+
+#~ msgid "dir adds DIR to the directory stack at the top, making it the"
+#~ msgstr "dir agrega DIR a la pila de directorios en el tope, haciéndolo el"
+
+#~ msgid " new current working directory."
+#~ msgstr " nuevo directorio de trabajo actual."
+
+#~ msgid "You can see the directory stack with the `dirs' command."
+#~ msgstr "Puede ver la pila de directorios con la orden `dirs'."
+
+#~ msgid "Removes entries from the directory stack. With no arguments,"
+#~ msgstr "Borra entradas de la pila de directorios. Sin argumentos,"
+
+#~ msgid "removes the top directory from the stack, and cd's to the new"
+#~ msgstr "borra el directorio del tope de la pila, y cambia al nuevo"
+
+#~ msgid "top directory."
+#~ msgstr "directorio tope."
+
+#~ msgid "+N removes the Nth entry counting from the left of the list"
+#~ msgstr ""
+#~ "+N borra la N-ésima entrada contando desde la izquierda de la lista"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'"
+#~ msgstr ""
+#~ " mostrada por `dirs', comenzando desde cero. Por ejemplo: `popd +0'"
+
+#~ msgid " removes the first directory, `popd +1' the second."
+#~ msgstr " borra el primer directorio, `popd +1' el segundo."
+
+#~ msgid "-N removes the Nth entry counting from the right of the list"
+#~ msgstr "-N borra la N-ésima entrada contando desde la derecha de la lista"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'"
+#~ msgstr ""
+#~ " mostrada por `dirs', comenzando desde cero. Por ejemplo: `popd -0'"
+
+#~ msgid " removes the last directory, `popd -1' the next to last."
+#~ msgstr " borra el último directorio, `popd -1' el penúltimo."
+
+#~ msgid ""
+#~ "-n suppress the normal change of directory when removing directories"
+#~ msgstr ""
+#~ "-n suprime el cambio normal de directorio cuando se borran directorios"
+
+#~ msgid " from the stack, so only the stack is manipulated."
+#~ msgstr " de la pila, así sólo se manipula la pila."
+
+#~ msgid "allocated"
+#~ msgstr "asignado"
+
+#~ msgid "freed"
+#~ msgstr "liberado"
+
+#~ msgid "requesting resize"
+#~ msgstr "solicitando cambio de tamaño"
+
+#~ msgid "just resized"
+#~ msgstr "terminó cambio de tamaño"
+
+#~ msgid "bug: unknown operation"
+#~ msgstr "bicho: operación desconocida"
+
+#~ msgid "malloc: watch alert: %p %s "
+#~ msgstr "malloc: alerta de observación: %p %s "
+
+#~ msgid ""
+#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n"
+#~ " break N levels."
+#~ msgstr ""
+#~ "Sale de un ciclo FOR, WHILE o UNTIL. Si se especifica N,\n"
+#~ " sale N niveles."
+
+#~ msgid ""
+#~ "Run a shell builtin. This is useful when you wish to rename a\n"
+#~ " shell builtin to be a function, but need the functionality of the\n"
+#~ " builtin within the function itself."
+#~ msgstr ""
+#~ "Ejecuta una orden interna del shell. Esto es útil cuando desea "
+#~ "renombrar\n"
+#~ " una orden interna del shell para que sea una función, pero necesita\n"
+#~ " la funcionalidad de la orden interna dentro de la misma función."
+
+#~ msgid ""
+#~ "Print the current working directory. With the -P option, pwd prints\n"
+#~ " the physical directory, without any symbolic links; the -L option\n"
+#~ " makes pwd follow symbolic links."
+#~ msgstr ""
+#~ "Muestra el directorio de trabajo actual. Con la opción -P, pwd muestra\n"
+#~ " el directorio físico, sin enlaces simbólicos; la opción -L hace que\n"
+#~ " pwd siga los enlaces simbólicos."
+
+#~ msgid "Return a successful result."
+#~ msgstr "Devuelve un resultado exitoso."
+
+# es usado -> se usa. sv
+# es impresa -> se muestra una cadena em+
+# "Si se da la opción -V o -v,..." sv
+# De acuerdo. cfuga
+#~ msgid ""
+#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell\n"
+#~ " function called `ls', and you wish to call the command `ls', you can\n"
+#~ " say \"command ls\". If the -p option is given, a default value is "
+#~ "used\n"
+#~ " for PATH that is guaranteed to find all of the standard utilities. "
+#~ "If\n"
+#~ " the -V or -v option is given, a string is printed describing "
+#~ "COMMAND.\n"
+#~ " The -V option produces a more verbose description."
+#~ msgstr ""
+#~ "Ejecuta COMMAND con ARGS ignorando las funciones del shell. Si tiene "
+#~ "una\n"
+#~ " función de shell llamada `ls', y desea llamar a la orden `ls', puede\n"
+#~ " decir \"command ls\". Si se da la opción -p, se usa un valor por\n"
+#~ " defecto para PATH que garantiza encontrar todas las herramientas\n"
+#~ " estándar. Si se da la opción -V o -v, se muestra una cadena que\n"
+#~ " describe COMMAND. La opción -V produce una descripción más detallada."
+
+# apaga -> desactiva em+
+# Corregido en toda la traducción. cfuga
+#~ msgid ""
+#~ "Declare variables and/or give them attributes. If no NAMEs are\n"
+#~ " given, then display the values of variables instead. The -p option\n"
+#~ " will display the attributes and values of each NAME.\n"
+#~ " \n"
+#~ " The flags are:\n"
+#~ " \n"
+#~ " -a\tto make NAMEs arrays (if supported)\n"
+#~ " -f\tto select from among function names only\n"
+#~ " -F\tto display function names (and line number and source file name "
+#~ "if\n"
+#~ " \tdebugging) without definitions\n"
+#~ " -i\tto make NAMEs have the `integer' attribute\n"
+#~ " -r\tto make NAMEs readonly\n"
+#~ " -t\tto make NAMEs have the `trace' attribute\n"
+#~ " -x\tto make NAMEs export\n"
+#~ " \n"
+#~ " Variables with the integer attribute have arithmetic evaluation (see\n"
+#~ " `let') done when the variable is assigned to.\n"
+#~ " \n"
+#~ " When displaying values of variables, -f displays a function's name\n"
+#~ " and definition. The -F option restricts the display to function\n"
+#~ " name only.\n"
+#~ " \n"
+#~ " Using `+' instead of `-' turns off the given attribute instead. "
+#~ "When\n"
+#~ " used in a function, makes NAMEs local, as with the `local' command."
+#~ msgstr ""
+#~ "Declara variables y/o les asigna atributos. Si no se propociona\n"
+#~ " ningún NAME, entonces muestra los valores de las variables.\n"
+#~ " La opción -p mostrará los atributos y valores de cada NAME.\n"
+#~ " \n"
+#~ " Las opciones son:\n"
+#~ " \n"
+#~ " -a\thace a los NAMEs matrices (si tiene soporte)\n"
+#~ " -f\tselecciona solamente nombres de funciones\n"
+#~ " -F\tmuestra nombres de funciones (y número de línea y nombre de\n"
+#~ " \tfichero fuente si se está depurando) sin definiciones\n"
+#~ " -i\tasigna a los NAMEs el atributo `integer'\n"
+#~ " -r\thace a los NAMEs de sólo lectura\n"
+#~ " -t\tasigna a los NAMEs el atributo `trace'\n"
+#~ " -x\thace a los NAMEs exportables\n"
+#~ " \n"
+#~ " Las variables con el atributo integer se les evalúa aritméticamente\n"
+#~ " (vea `let') cuando se asigna la variable.\n"
+#~ " \n"
+#~ " Cuando se muestran los valores de las variables, -f muestra\n"
+#~ " el nombre de una función y su definición. La opción -F restringe\n"
+#~ " a mostrar solamente el nombre de la función.\n"
+#~ " \n"
+#~ " Al usar `+' en lugar de `-' desactiva el atributo dado. Cuando se\n"
+#~ " usa en una función, hace a los NAMEs locales, como sucede con la\n"
+#~ " orden `local'."
+
+#~ msgid "Obsolete. See `declare'."
+#~ msgstr "Obsoleto. Ver `declare'."
+
+# y le da -> y le asigna em+
+# sólo se puede usar. sv
+# tenga un alcance visible -> sea visible solo para la función y sus los hijos em+
+# De acuerdo. cfuga
+#~ msgid ""
+#~ "Create a local variable called NAME, and give it VALUE. LOCAL\n"
+#~ " can only be used within a function; it makes the variable NAME\n"
+#~ " have a visible scope restricted to that function and its children."
+#~ msgstr ""
+#~ "Crea una variable local llamada NAME, y le asigna un VALUE. LOCAL\n"
+#~ " sólo se puede usar dentro de una función; hace que la variable NAME\n"
+#~ " solamente sea visible a esa función y sus hijos."
+
+#~ msgid ""
+#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed."
+#~ msgstr ""
+#~ "Muestra los ARGs. Si se especifica -n, se elimina el carácter\n"
+#~ " de fin de línea."
+
+# se puede usar. sv
+# Se muestra una lista de órdenes internas. sv
+# Hay muchos más mensajes que están en "pasiva" que quedarían mejor en
+# forma "reflexiva". No comento más y te dejo que los mires despacio.
+# Gracias por la observación. cfuga
+#~ msgid ""
+#~ "Enable and disable builtin shell commands. This allows\n"
+#~ " you to use a disk command which has the same name as a shell\n"
+#~ " builtin without specifying a full pathname. If -n is used, the\n"
+#~ " NAMEs become disabled; otherwise NAMEs are enabled. For example,\n"
+#~ " to use the `test' found in $PATH instead of the shell builtin\n"
+#~ " version, type `enable -n test'. On systems supporting dynamic\n"
+#~ " loading, the -f option may be used to load new builtins from the\n"
+#~ " shared object FILENAME. The -d option will delete a builtin\n"
+#~ " previously loaded with -f. If no non-option names are given, or\n"
+#~ " the -p option is supplied, a list of builtins is printed. The\n"
+#~ " -a option means to print every builtin with an indication of whether\n"
+#~ " or not it is enabled. The -s option restricts the output to the "
+#~ "POSIX.2\n"
+#~ " `special' builtins. The -n option displays a list of all disabled "
+#~ "builtins."
+#~ msgstr ""
+#~ "Activa y desactiva las órdenes internas del shell. Esto le permite\n"
+#~ " usar una orden del sistema que tenga el mismo nombre que una orden\n"
+#~ " interna del shell sin especificar una ruta completa. Si se usa -n, "
+#~ "los\n"
+#~ " NAMEs se desactivan; de otra forma los NAMEs se activan. Por "
+#~ "ejemplo,\n"
+#~ " para usar `test' que se encuentra en $PATH en lugar de la versión "
+#~ "interna\n"
+#~ " del shell, teclee `enable -n test'. En sistemas que soportan\n"
+#~ " carga dinámica, se puede usar la opción -f para cargar nuevas "
+#~ "órdenes\n"
+#~ " internas desde el objeto compartido FILENAME. La opción -d borrará "
+#~ "una\n"
+#~ " orden interna cargada previamente con -f. Si no se propocionan "
+#~ "nombres\n"
+#~ " que no sean opciones, o se especifica la opción -p, se muestra una "
+#~ "lista\n"
+#~ " de órdenes internas. La opción -a es para mostrar cada orden "
+#~ "interna\n"
+#~ " con una indicación si está o no activada. La opción -s restringe la\n"
+#~ " salida a las órdenes internas `especiales' de POSIX.2. La opción -n\n"
+#~ " muestra una lista de todas las órdenes internas desactivadas."
+
+#~ msgid ""
+#~ "Read ARGs as input to the shell and execute the resulting command(s)."
+#~ msgstr ""
+#~ "Lee ARGs como entrada del shell y ejecuta el(los) comando(s) resultantes."
+
+#~ msgid ""
+#~ "Exec FILE, replacing this shell with the specified program.\n"
+#~ " If FILE is not specified, the redirections take effect in this\n"
+#~ " shell. If the first argument is `-l', then place a dash in the\n"
+#~ " zeroth arg passed to FILE, as login does. If the `-c' option\n"
+#~ " is supplied, FILE is executed with a null environment. The `-a'\n"
+#~ " option means to make set argv[0] of the executed process to NAME.\n"
+#~ " If the file cannot be executed and the shell is not interactive,\n"
+#~ " then the shell exits, unless the shell option `execfail' is set."
+#~ msgstr ""
+#~ "Ejecuta FILE, reemplazando este shell con el programa especificado.\n"
+#~ " Si no se especifica FILE, las redirecciones toman efecto en este\n"
+#~ " shell. Si el primer argumento es `-l' entonces coloca un guión\n"
+#~ " en el argumento cero que pasa a FILE, como lo hace login. Si se\n"
+#~ " proporciona la opción `-c', se ejecuta FILE con un ambiente nulo.\n"
+#~ " La opción `-a' establece el argv[0] del proceso ejecutado a NOMBRE.\n"
+#~ " Si no se puede ejecutar el fichero, y el shell no es intercativo,\n"
+#~ " entonces el shell termina, a menos que esté activa la opción\n"
+#~ " `execfail'."
+
+#~ msgid "Logout of a login shell."
+#~ msgstr "Se desconecta de un shell de entrada."
+
+#~ msgid ""
+#~ "For each NAME, the full pathname of the command is determined and\n"
+#~ " remembered. If the -p option is supplied, PATHNAME is used as the\n"
+#~ " full pathname of NAME, and no path search is performed. The -r\n"
+#~ " option causes the shell to forget all remembered locations. The -d\n"
+#~ " option causes the shell to forget the remembered location of each "
+#~ "NAME.\n"
+#~ " If the -t option is supplied the full pathname to which each NAME\n"
+#~ " corresponds is printed. If multiple NAME arguments are supplied "
+#~ "with\n"
+#~ " -t, the NAME is printed before the hashed full pathname. The -l "
+#~ "option\n"
+#~ " causes output to be displayed in a format that may be reused as "
+#~ "input.\n"
+#~ " If no arguments are given, information about remembered commands is "
+#~ "displayed."
+#~ msgstr ""
+#~ "Por cada NOMBRE, se determina la ruta completa de la orden y se graba.\n"
+#~ " Si se especifica la opción -p, se usa PATHNAME como la ruta completa\n"
+#~ " de NAME, y no se realiza la búsqueda de ruta. La opción -r hace que\n"
+#~ " el shell olvide todas las ubicaciones grabadas. La opción -d hace "
+#~ "que\n"
+#~ " el shell olvide las ubicaciones grabadas de cada NAME. Si se\n"
+#~ " proporciona la opción -t se muestra la ruta completa para cada NAME\n"
+#~ " correspondiente. Si se proporcionan múltiples argumentos NAME con\n"
+#~ " -t, NAME se muestra antes de la ruta completa. La opción -l hace\n"
+#~ " que la salida se muestre en un formato que se puede reusar como\n"
+#~ " entrada. Si no se proporcionan argumentos, se muestra la "
+#~ "información\n"
+#~ " de las órdenes grabadas."
+
+#~ msgid ""
+#~ "Display helpful information about builtin commands. If PATTERN is\n"
+#~ " specified, gives detailed help on all commands matching PATTERN,\n"
+#~ " otherwise a list of the builtins is printed. The -s option\n"
+#~ " restricts the output for each builtin command matching PATTERN to\n"
+#~ " a short usage synopsis."
+#~ msgstr ""
+#~ "Muestra información útil sobre las órdenes internas del shell. Si se\n"
+#~ " especifica un PATRÓN, proporciona ayuda detallada sobre todas las\n"
+#~ " órdenes que coinciden con el PATRÓN, de otra forma se muestra una\n"
+#~ " lista de las órdenes internas. La opción -s restringe la salida\n"
+#~ " de cada orden interna que concida con el PATRÓN a una breve\n"
+#~ " sinopsis de uso."
+
+#~ msgid ""
+#~ "By default, removes each JOBSPEC argument from the table of active jobs.\n"
+#~ " If the -h option is given, the job is not removed from the table, but "
+#~ "is\n"
+#~ " marked so that SIGHUP is not sent to the job if the shell receives a\n"
+#~ " SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove "
+#~ "all\n"
+#~ " jobs from the job table; the -r option means to remove only running "
+#~ "jobs."
+#~ msgstr ""
+#~ "Por defecto, elimina cada argumento JOBSPEC de la tabla de trabajos "
+#~ "activos.\n"
+#~ " Si se especifica la opción -h, el trabajo no se elimina de la tabla,\n"
+#~ " pero se marca de forma que no se envía SIGHUP al trabajo si el shell\n"
+#~ " recibe un SIGHUP. La opción -a, cuando no se proporciona JOBSPEC, "
+#~ "borra\n"
+#~ " todos los trabajos de la tabla de trabajos; la opción -r borra sólo\n"
+#~ " los trabajos activos."
+
+#~ msgid ""
+#~ "Causes a function to exit with the return value specified by N. If N\n"
+#~ " is omitted, the return status is that of the last command."
+#~ msgstr ""
+#~ "Causa la salida de una función con el valor de devolución especificado "
+#~ "por N.\n"
+#~ " Si se omite N, el estado de devolución será el de la última orden."
+
+#~ msgid ""
+#~ "For each NAME, remove the corresponding variable or function. Given\n"
+#~ " the `-v', unset will only act on variables. Given the `-f' flag,\n"
+#~ " unset will only act on functions. With neither flag, unset first\n"
+#~ " tries to unset a variable, and if that fails, then tries to unset a\n"
+#~ " function. Some variables cannot be unset; also see readonly."
+#~ msgstr ""
+#~ "Para cada NAME, se borra la variable o función correspondiente. Al usar\n"
+#~ " `-v', unset sólo actuará sobre variables. Al usar la opción `-f',\n"
+#~ " unset sólo actuará sobre funciones. Sin ninguna opción, unset "
+#~ "primero\n"
+#~ " intenta borrar una variable, y si esto falla, entonces intenta "
+#~ "borrar\n"
+#~ " una función. Algunas variables no se pueden borrar; vea también "
+#~ "readonly."
+
+#~ msgid ""
+#~ "NAMEs are marked for automatic export to the environment of\n"
+#~ " subsequently executed commands. If the -f option is given,\n"
+#~ " the NAMEs refer to functions. If no NAMEs are given, or if `-p'\n"
+#~ " is given, a list of all names that are exported in this shell is\n"
+#~ " printed. An argument of `-n' says to remove the export property\n"
+#~ " from subsequent NAMEs. An argument of `--' disables further option\n"
+#~ " processing."
+#~ msgstr ""
+#~ "Se marcan NAMEs para exportación automática al ambiente de las\n"
+#~ " órdenes ejecutadas subsecuentemente. Si se establece la opción -f,\n"
+#~ " NAMEs se refieren a funciones. Si no se proporciona ningún NAME,\n"
+#~ " o si se proporciona `-p', se muestra una lista de todos los nombres\n"
+#~ " que se exportan en este shell. Un argumento `-n' indica eliminar\n"
+#~ " la propiedad de exportación para los NAMEs subsecuentes. Un "
+#~ "argumento\n"
+#~ " `--' desactiva el procesamiento posterior de opciones."
+
+#~ msgid ""
+#~ "The given NAMEs are marked readonly and the values of these NAMEs may\n"
+#~ " not be changed by subsequent assignment. If the -f option is given,\n"
+#~ " then functions corresponding to the NAMEs are so marked. If no\n"
+#~ " arguments are given, or if `-p' is given, a list of all readonly "
+#~ "names\n"
+#~ " is printed. The `-a' option means to treat each NAME as\n"
+#~ " an array variable. An argument of `--' disables further option\n"
+#~ " processing."
+#~ msgstr ""
+#~ "Los NAMEs dados se marcan como sólo lectura y los valores de esos NAMEs\n"
+#~ " no se pueden cambiar por asignaciones posteriores. Si se propociona\n"
+#~ " la opción -f, entonces también se marcan las funciones que "
+#~ "correspondan\n"
+#~ " a los NAMEs. Si no se proporcionan argumentos, o si se especifica\n"
+#~ " `-p', se muestra una lista de todos los nombres de sólo lectura.\n"
+#~ " La opción `-a' trata cada NAME como una variable de matriz.\n"
+#~ " Un argumento `--' desactiva opciones posteriores."
+
+#~ msgid ""
+#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is\n"
+#~ " not given, it is assumed to be 1."
+#~ msgstr ""
+#~ "Los parámetros posicionales de $N+1 ... se renombran a $1 ... Si no se\n"
+#~ " proporciona N, se asume que es 1."
+
+#~ msgid ""
+#~ "Suspend the execution of this shell until it receives a SIGCONT\n"
+#~ " signal. The `-f' if specified says not to complain about this\n"
+#~ " being a login shell if it is; just suspend anyway."
+#~ msgstr ""
+#~ "Suspende la ejecución de este shell hasta que recibe una señal\n"
+#~ " SIGCONT. Si se especifica `-f' indica que no se queje si es\n"
+#~ " un shell de login; y se suspende de cualquier forma."
+
+#~ msgid ""
+#~ "Print the accumulated user and system times for processes run from\n"
+#~ " the shell."
+#~ msgstr ""
+#~ "Muestra los tiempos de usuario y de sistema acumulados para los procesos\n"
+#~ " ejecutados desde el shell."
+
+#~ msgid ""
+#~ "For each NAME, indicate how it would be interpreted if used as a\n"
+#~ " command name.\n"
+#~ " \n"
+#~ " If the -t option is used, `type' outputs a single word which is one "
+#~ "of\n"
+#~ " `alias', `keyword', `function', `builtin', `file' or `', if NAME is "
+#~ "an\n"
+#~ " alias, shell reserved word, shell function, shell builtin, disk "
+#~ "file,\n"
+#~ " or unfound, respectively.\n"
+#~ " \n"
+#~ " If the -p flag is used, `type' either returns the name of the disk\n"
+#~ " file that would be executed, or nothing if `type -t NAME' would not\n"
+#~ " return `file'.\n"
+#~ " \n"
+#~ " If the -a flag is used, `type' displays all of the places that "
+#~ "contain\n"
+#~ " an executable named `file'. This includes aliases, builtins, and\n"
+#~ " functions, if and only if the -p flag is not also used.\n"
+#~ " \n"
+#~ " The -f flag suppresses shell function lookup.\n"
+#~ " \n"
+#~ " The -P flag forces a PATH search for each NAME, even if it is an "
+#~ "alias,\n"
+#~ " builtin, or function, and returns the name of the disk file that "
+#~ "would\n"
+#~ " be executed."
+#~ msgstr ""
+#~ "Para cada NAME, se indica cómo se interpretaría se se usara como\n"
+#~ " el nombre de una orden.\n"
+#~ " \n"
+#~ " Si se usa la opción -t, `type' muestra una sola palabra que es una\n"
+#~ " de `alias', `keyword', `function', `builtin', `file' ó `', si NAME\n"
+#~ " es un alias, palabra reservada del shell, función del shell, orden\n"
+#~ " interna del shell, fichero del disco, o no encontrado, "
+#~ "respectivamente.\n"
+#~ " \n"
+#~ " Si se usa la opción -p, `type' devuelve el nombre del fichero del\n"
+#~ " sistema que sería ejecutado, o nada, si `type -t NAME' no devuelve\n"
+#~ " `file'.\n"
+#~ " \n"
+#~ " Si se usa la opción -a, `type' muestra todos los lugares que "
+#~ "contienen\n"
+#~ " un ejecutable llamado `file'. Esto incluye a aliases, órdenes\n"
+#~ " internas, y funciones, si y solo si no se usa la opción -p.\n"
+#~ " \n"
+#~ " La opción -f suprime la búsqueda de funciones de shell.\n"
+#~ " \n"
+#~ " La opción -P fuerza una búsqueda en PATH por cada NAME, aún si es un\n"
+#~ " alias, orden interna, o función, y devuelve el nombre del fichero "
+#~ "del\n"
+#~ " disco que se puede ejecutar."
+
+#~ msgid ""
+#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if\n"
+#~ " `-S' is supplied, the current value of the mask is printed. The `-"
+#~ "S'\n"
+#~ " option makes the output symbolic; otherwise an octal number is "
+#~ "output.\n"
+#~ " If `-p' is supplied, and MODE is omitted, the output is in a form\n"
+#~ " that may be used as input. If MODE begins with a digit, it is\n"
+#~ " interpreted as an octal number, otherwise it is a symbolic mode "
+#~ "string\n"
+#~ " like that accepted by chmod(1)."
+#~ msgstr ""
+#~ "La máscara de creación de ficheros se establece a MODE. Si se omite "
+#~ "MODE,\n"
+#~ " o si se proporciona `-S', se muestra el valor actual de la máscara. "
+#~ "La\n"
+#~ " opción `-S' hace la salida simbólica; de otra forma la salida es un\n"
+#~ " número octal. Si se proporciona `-p', y se omite MODE, la salida es\n"
+#~ " en una forma que se puede usar como entrada. Si MODE empieza con un\n"
+#~ " dígito, se interpreta como un número octal, de otra forma es una "
+#~ "cadena\n"
+#~ " de modo simbólico como la que acepta chmod(1)."
+
+#~ msgid ""
+#~ "Wait for the specified process and report its termination status. If\n"
+#~ " N is not given, all currently active child processes are waited for,\n"
+#~ " and the return code is zero. N is a process ID; if it is not given,\n"
+#~ " all child processes of the shell are waited for."
+#~ msgstr ""
+#~ "Espera al proceso especificado y reporta su estado final. Si no se\n"
+#~ " proporciona N, espera a todos los procesos hijo activos actualmente,\n"
+#~ " y el código de devolución es cero. N es un ID de proceso; si no se\n"
+#~ " proporciona, se espera a todos los procesos hijo del shell."
+
+#~ msgid ""
+#~ "Create a simple command invoked by NAME which runs COMMANDS.\n"
+#~ " Arguments on the command line along with NAME are passed to the\n"
+#~ " function as $0 .. $n."
+#~ msgstr ""
+#~ "Crea una orden simple invocada por NAME que ejecuta COMMMANDS.\n"
+#~ " Se pasan a la función los argumentos en la línea de órdenes\n"
+#~ " junto con NAME como $0 .. $n."
+
+#~ msgid ""
+#~ "Toggle the values of variables controlling optional behavior.\n"
+#~ " The -s flag means to enable (set) each OPTNAME; the -u flag\n"
+#~ " unsets each OPTNAME. The -q flag suppresses output; the exit\n"
+#~ " status indicates whether each OPTNAME is set or unset. The -o\n"
+#~ " option restricts the OPTNAMEs to those defined for use with\n"
+#~ " `set -o'. With no options, or with the -p option, a list of all\n"
+#~ " settable options is displayed, with an indication of whether or\n"
+#~ " not each is set."
+#~ msgstr ""
+#~ "Cambia los valores de las variables que controlan conductas opcionales.\n"
+#~ " La opción -s activa (define) cada OPTNAME; la opción -u desactiva\n"
+#~ " cada OPTNAME. La opción -q suprime la salida; el estado de salida\n"
+#~ " indica si cada OPTNAME se definió o no. La opción -o restringe\n"
+#~ " que OPTNAMEs sean aquéllos definidos para usarse con `set -o'.\n"
+#~ " Sin opciones, o con la opción -p, se muestra una lista de todas\n"
+#~ " las opciones definibles, con una indicación si están o no activas."
+
+#~ msgid ""
+#~ "For each NAME, specify how arguments are to be completed.\n"
+#~ " If the -p option is supplied, or if no options are supplied, "
+#~ "existing\n"
+#~ " completion specifications are printed in a way that allows them to "
+#~ "be\n"
+#~ " reused as input. The -r option removes a completion specification "
+#~ "for\n"
+#~ " each NAME, or, if no NAMEs are supplied, all completion "
+#~ "specifications."
+#~ msgstr ""
+#~ "Por cada NAME, especifica cómo se deben completar los argumentos.\n"
+#~ " Si se proporciona la opción -p, o si no se proporcionan opciones, se\n"
+#~ " muestran las especificaciones existentes de completado en una forma\n"
+#~ " que permite que se reusen como entrada. La opción -r borra una\n"
+#~ " especificación de completado para cada NAME, o, si no se proporciona\n"
+#~ " ningún NAMEs, todas las especificaciones de completado."
+
+#~ msgid "Missing `}'"
+#~ msgstr "Faltan `}'"
+
+#~ msgid "brace_expand> "
+#~ msgstr "expansión_llave> "
+
+# ¿ a qué se refiere ? em+
+# También podría ser la orden de tipo desconocido. sv
+# Tiene razón Santiago. Las órdenes se guardan en matrices de caracteres
+# en bash. Si bash intenta borrar uno de estos comandos y el tipo del dato
+# NO es matriz de caracter, emitiría este mensaje. cfuga
+#~ msgid "Attempt to free unknown command type `%d'.\n"
+#~ msgstr "Intentando liberar la orden de tipo desconocido `%d'.\n"
+
+#~ msgid "Report this to %s\n"
+#~ msgstr "Comunique esto a %s\n"
+
+#~ msgid "Stopping myself..."
+#~ msgstr "Deteniéndome..."
+
+#~ msgid "Tell %s to fix this someday.\n"
+#~ msgstr "Decir a %s que arregle esto algún día.\n"
+
+#~ msgid "execute_command: bad command type `%d'"
+#~ msgstr "execute_command: tipo de orden erróneo `%d'"
+
+#~ msgid "real\t"
+#~ msgstr "real\t"
+
+#~ msgid "user\t"
+#~ msgstr "usuario\t"
+
+#~ msgid "sys\t"
+#~ msgstr "sistema\t"
+
+#~ msgid ""
+#~ "real\t0m0.00s\n"
+#~ "user\t0m0.00s\n"
+#~ "sys\t0m0.00s\n"
+#~ msgstr ""
+#~ "real\t0m0.00s\n"
+#~ "usuario\t0m0.00s\n"
+#~ "sistema\t0m0.00s\n"
+
+#~ msgid "cannot duplicate fd %d to fd 1: %s"
+#~ msgstr "no se puede duplicar el df %d al df 1: %s"
+
+#~ msgid "%s: output redirection restricted"
+#~ msgstr "%s: la redirección de salida está restringida"
+
+#~ msgid "Out of memory!"
+#~ msgstr "¡Memoria agotada!"
+
+#~ msgid "You have already added item `%s'\n"
+#~ msgstr "Ya se había añadido el elemento `%s'\n"
+
+# Han sido introducidos o quizá , Vd, introdujo em+
+#~ msgid "You have entered %d (%d) items. The distribution is:\n"
+#~ msgstr "Introdujo %d (%d) elementos. La distribución es:\n"
+
+#~ msgid "%s: bg background job?"
+#~ msgstr "%s: ¿bg trabajo en background?"
+
+#~ msgid ""
+#~ "Redirection instruction from yyparse () '%d' is\n"
+#~ "out of range in make_redirection ()."
+#~ msgstr ""
+#~ "La instrucción de redirección de yyparse () '%d' está fuera de rango en \n"
+#~ "make_redirection ()."
+
+#~ msgid "clean_simple_command () got a command with type %d."
+#~ msgstr "clean_simple_command () tiene una orden del tipo %d."
+
+#~ msgid "got errno %d while waiting for %d"
+#~ msgstr "se obtuvo errno %d mientras esperaba a %d"
+
+# algo por el estilo em+
+#~ msgid "syntax error near unexpected token `%c'"
+#~ msgstr "error sintáctico cerca del elemento inesperado `%c'"
+
+# Por consistencia con mensajes anteriores, sería erróneo (el tipo). sv
+# De acuerdo. Corregido. cfuga
+#~ msgid "print_command: bad command type `%d'"
+#~ msgstr "print_command: tipo de dato de orden `%d' erróneo"
+
+#~ msgid "cprintf: bad `%%' argument (%c)"
+#~ msgstr "cprintf: argumento `%%' erróneo (%c)"
+
+#~ msgid "option `%s' requires an argument"
+#~ msgstr "la opción `%s' requiere un argumento"
+
+#~ msgid "%s: unrecognized option"
+#~ msgstr "%s: la opción no es reconocida"
+
+#~ msgid "`-c' requires an argument"
+#~ msgstr "`-c' requiere un argumento"
+
+#~ msgid "%s: cannot execute directories"
+#~ msgstr "%s: no se pueden ejecutar directorios"
+
+#~ msgid "Bad code in sig.c: sigprocmask"
+#~ msgstr "Código erróneo en sig.c: sigprocmask"
+
+#~ msgid "bad substitution: no ending `}' in %s"
+#~ msgstr "sustitución errónea: no hay `}' final en %s"
+
+#~ msgid "%s: bad array subscript"
+#~ msgstr "%s: subíndice de matriz erróneo"
+
+#~ msgid "can't make pipes for process substitution: %s"
+#~ msgstr ""
+#~ "no se pueden crear las tuberías (pipes) para la sustitución del proceso: %"
+#~ "s"
+
+#~ msgid "reading"
+#~ msgstr "leyendo"
+
+#~ msgid "writing"
+#~ msgstr "escribiendo"
+
+# del proceso em+
+#~ msgid "process substitution"
+#~ msgstr "sustitución de proceso"
+
+#~ msgid "command substitution"
+#~ msgstr "sustitución de la orden"
+
+#~ msgid "Can't reopen pipe to command substitution (fd %d): %s"
+#~ msgstr ""
+#~ "No se puede reabrir la tubería para la sustitución de la orden (df %d): %s"
+
+#~ msgid "$%c: unbound variable"
+#~ msgstr "$%c: variable desligada"
+
+#~ msgid "%s: bad arithmetic substitution"
+#~ msgstr "%s: sustitución aritmética errónea"
+
+#~ msgid "-%s: binary operator expected"
+#~ msgstr "-%s: se esperaba un operador binario"
+
+#~ msgid "%s[%s: bad subscript"
+#~ msgstr "%s[%s: subíndice erróneo"
+
+#~ msgid "[%s: bad subscript"
+#~ msgstr "[%s: subíndice erróneo"
+
+# Yo pondría "hay dígitos en dos elementos diferentes de argv". sv
+# De acuerdo. cfuga
+#~ msgid "digits occur in two different argv-elements.\n"
+#~ msgstr "hay dígitos en dos elementos diferentes de argv.\n"
+
+#~ msgid "option %c\n"
+#~ msgstr "opción %c\n"
+
+#~ msgid "option a\n"
+#~ msgstr "opción a\n"
+
+#~ msgid "option b\n"
+#~ msgstr "opción b\n"
+
+#~ msgid "option c with value `%s'\n"
+#~ msgstr "opción c con el valor `%s'\n"
+
+#~ msgid "?? sh_getopt returned character code 0%o ??\n"
+#~ msgstr "?? sh_getopt devolvió el código de carácter 0%o ??\n"
+
+#~ msgid "non-option ARGV-elements: "
+#~ msgstr "elementos de ARGV que no son opciones: "
+
+#~ msgid "%s: Unknown flag %s.\n"
+#~ msgstr "%s: Indicador desconocido %s.\n"
+
+#~ msgid "Unknown directive `%s'"
+#~ msgstr "Directiva desconocida `%s'"
+
+#~ msgid "%s requires an argument"
+#~ msgstr "%s requiere un argumento"
+
+#~ msgid "%s must be inside of a $BUILTIN block"
+#~ msgstr "%s debe estar dentro de un bloque $BUILTIN"
+
+#~ msgid "%s found before $END"
+#~ msgstr "%s encontrado antes de $END"
+
+#~ msgid "%s already has a function (%s)"
+#~ msgstr "%s ya tiene una función (%s)"
+
+#~ msgid "%s already had a docname (%s)"
+#~ msgstr "%s ya tiene un nombre de documento (%s)"
+
+#~ msgid "%s already has short documentation (%s)"
+#~ msgstr "% ya tiene documentación corta (%s)"
+
+# Si traducimos con la gramática española, probablemente sería:
+# ...una definición %s". sv
+# De acuerdo. cfuga
+#~ msgid "%s already has a %s definition"
+#~ msgstr "%s ya tiene una definición %s"
+
+#~ msgid "mkbuiltins: Out of virtual memory!\n"
+#~ msgstr "mkbuiltins: ¡Memoria agotada!\n"
+
+#~ msgid "read [-r] [-p prompt] [-a array] [-e] [name ...]"
+#~ msgstr "read [-r] [-p prompt] [-a matriz] [-e] [nombre ...]"
+
+#~ msgid ". filename"
+#~ msgstr ". fichero"
+
+#~ msgid "%[DIGITS | WORD] [&]"
+#~ msgstr "%[DÍGITOS | PALABRAS] [&]"
+
+#~ msgid "variables - Some variable names and meanings"
+#~ msgstr "variables - Algunos nombres de variables y sus significados"
+
+#~ msgid "`alias' with no arguments or with the -p option prints the list"
+#~ msgstr "`alias' sin argumentos o con la opción -p muestra la lista"
+
+#~ msgid "of aliases in the form alias NAME=VALUE on standard output."
+#~ msgstr "de aliases en la forma alias NOMBRE=VALOR por la entrada estándar."
+
+# Más en español sería: se define un alias por cada NOMBRE cuyo VALOR se da. sv
+# De acuerdo. cfuga
+#~ msgid "Otherwise, an alias is defined for each NAME whose VALUE is given."
+#~ msgstr ""
+#~ "De otra manera, se define un alias por cada NOMBRE cuyo VALOR se da."
+
+#~ msgid "A trailing space in VALUE causes the next word to be checked for"
+#~ msgstr ""
+#~ "Un espacio final en VALOR causa que la siguiente palabra sea revisada para"
+
+# Lo mismo de antes: el alias es expandido -> el alias se expande. sv
+# De acuerdo. cfuga
+#~ msgid "alias substitution when the alias is expanded. Alias returns"
+#~ msgstr "la sustitución del alias cuando el alias se expande. Alias devuelve"
+
+# no alias -> ningún alias. sv
+# De acuerdo. cfuga
+#~ msgid "true unless a NAME is given for which no alias has been defined."
+#~ msgstr ""
+#~ "verdadero a menos que para un NOMBRE dado no se haya definido ningún "
+#~ "alias."
+
+#~ msgid "then remove all alias definitions."
+#~ msgstr "entonces borra todas las definiciones de alias."
+
+#~ msgid "Bind a key sequence to a Readline function, or to a macro. The"
+#~ msgstr ""
+#~ "Asigna una secuencia de teclas a una función Readline, o a una macro. La"
+
+#~ msgid "syntax is equivalent to that found in ~/.inputrc, but must be"
+#~ msgstr ""
+#~ "sintaxis es equivalente a la encontrada en ~/.inputrc, pero debe ser"
+
+#~ msgid ""
+#~ "passed as a single argument: bind '\"\\C-x\\C-r\": re-read-init-file'."
+#~ msgstr ""
+#~ "pasada como un solo argumento: bind '\"\\C-x\\C-r\": re-read-init-file'."
+
+#~ msgid "Arguments we accept:"
+#~ msgstr "Argumentos que se aceptan:"
+
+#~ msgid ""
+#~ " -m keymap Use `keymap' as the keymap for the duration of this"
+#~ msgstr ""
+#~ " -m mapa_teclas Usa `mapa_teclas' como el mapa de teclas durante esta"
+
+#~ msgid " command. Acceptable keymap names are emacs,"
+#~ msgstr ""
+#~ " orden. Los nombres de mapas de teclas aceptables son"
+
+#~ msgid ""
+#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,"
+#~ msgstr ""
+#~ " emacs, emacs-standard, emacs-meta, emacs-ctlx, vi,"
+
+#~ msgid " vi-command, and vi-insert."
+#~ msgstr " vi-move, vi-command y vi-insert."
+
+#~ msgid " -l List names of functions."
+#~ msgstr " -l Muestra los nombres de las funciones."
+
+#~ msgid " -P List function names and bindings."
+#~ msgstr ""
+#~ " -P Muestra los nombres de funciones y asignaciones."
+
+#~ msgid ""
+#~ " -p List functions and bindings in a form that can be"
+#~ msgstr ""
+#~ " -p Muestra las funciones y asignaciones en un formato "
+#~ "que"
+
+#~ msgid " reused as input."
+#~ msgstr " puede reusarse como entrada."
+
+#~ msgid " -r keyseq Remove the binding for KEYSEQ."
+#~ msgstr " -r sec_teclas Borra la asignación para SEC_TECLAS"
+
+# lee 'la'... em+
+#~ msgid " -f filename Read key bindings from FILENAME."
+#~ msgstr " -f fichero Lee la asignación de teclas de FICHERO."
+
+#~ msgid ""
+#~ " -q function-name Query about which keys invoke the named function."
+#~ msgstr ""
+#~ " -q nombre-función Pregunta sobre qué teclas invocan la función "
+#~ "nombrada."
+
+#~ msgid " -V List variable names and values"
+#~ msgstr " -V Muestra los nombres de variables y valores"
+
+#~ msgid ""
+#~ " -v List variable names and values in a form that can"
+#~ msgstr ""
+#~ " -v Muestra los nombres de variables y valores de una "
+#~ "forma que"
+
+#~ msgid " be reused as input."
+#~ msgstr " puede reusarse como entrada."
+
+#~ msgid ""
+#~ " -S List key sequences that invoke macros and their "
+#~ "values"
+#~ msgstr ""
+#~ " -S Muestra las secuencias de teclas que invocan macros "
+#~ "y sus\n"
+#~ " valores"
+
+#~ msgid ""
+#~ " -s List key sequences that invoke macros and their "
+#~ "values in"
+#~ msgstr ""
+#~ " -s Muestra las secuencias de teclas que invocan macros "
+#~ "y sus"
+
+#~ msgid " a form that can be reused as input."
+#~ msgstr ""
+#~ " valores en una forma que puede reusarse como entrada."
+
+#~ msgid "break N levels."
+#~ msgstr "sale N niveles."
+
+#~ msgid "If N is specified, resume at the N-th enclosing loop."
+#~ msgstr "Si se especifica N, retoma en el N-ésimo ciclo."
+
+#~ msgid "Run a shell builtin. This is useful when you wish to rename a"
+#~ msgstr "Ejecuta un shell interno. Esto es útil cuando desea renombrar un"
+
+#~ msgid "shell builtin to be a function, but need the functionality of the"
+#~ msgstr ""
+#~ "shell interno para que sea una función, pero necesita la funcionalidad"
+
+#~ msgid "builtin within the function itself."
+#~ msgstr "interna dentro de la misma función."
+
+#~ msgid "Change the current directory to DIR. The variable $HOME is the"
+#~ msgstr "Cambia el directorio actual a DIR. La variable $HOME es el DIR"
+
+#~ msgid "default DIR. The variable $CDPATH defines the search path for"
+#~ msgstr "por omisión. La variable $CDPATH define la ruta de búsqueda para"
+
+#~ msgid "the directory containing DIR. Alternative directory names in CDPATH"
+#~ msgstr ""
+#~ "el directorio que contiene DIR. Los nombres alternativos de directorio en"
+
+#~ msgid "are separated by a colon (:). A null directory name is the same as"
+#~ msgstr ""
+#~ "CDPATH son separados por dos puntos (:). Un nombre de directorio nulo es"
+
+# Slash lo venimos traduciendo por barra inclinada , y backslash
+# por barra invertida em++
+#~ msgid "the current directory, i.e. `.'. If DIR begins with a slash (/),"
+#~ msgstr ""
+#~ "igual al directorio actual, p.e. `.'. Si DIR comienza con una barra "
+#~ "inclinada"
+
+#~ msgid "then $CDPATH is not used. If the directory is not found, and the"
+#~ msgstr ""
+#~ "(/), entonces $CDPATH no se usa. Si el directorio no se encuentra, y"
+
+#~ msgid "shell option `cdable_vars' is set, then try the word as a variable"
+#~ msgstr ""
+#~ "la opción de shell `cdable_vars' está activa, entonces intenta la palabra"
+
+#~ msgid "name. If that variable has a value, then cd to the value of that"
+#~ msgstr ""
+#~ "como nombre de variable. Si esa variable tiene un valor, entonces se "
+#~ "cambia al"
+
+#~ msgid ""
+#~ "variable. The -P option says to use the physical directory structure"
+#~ msgstr ""
+#~ "valor de esa variable. La opción -P indica el uso de la estructura física"
+
+#~ msgid ""
+#~ "instead of following symbolic links; the -L option forces symbolic links"
+#~ msgstr "del directorio en lugar de seguir enlaces simbólicos; la opción -L"
+
+# forza -> fuerza? cfuga
+#~ msgid "to be followed."
+#~ msgstr "fuerza que los vínculos simbólicos sean seguidos."
+
+#~ msgid "Print the current working directory. With the -P option, pwd prints"
+#~ msgstr ""
+#~ "Imprime el directorio actual de trabajo. Con la opción -P, pwd imprime"
+
+#~ msgid "the physical directory, without any symbolic links; the -L option"
+#~ msgstr "el directorio físico, sin ningún enlace simbólico; la opción -L"
+
+#~ msgid "makes pwd follow symbolic links."
+#~ msgstr "hace que pwd siga los enlaces simbólicos."
+
+#~ msgid ""
+#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell"
+#~ msgstr "Ejecuta ORDEN con ARGUMENTOS ignorando las funciones del shell. Si"
+
+#~ msgid "function called `ls', and you wish to call the command `ls', you can"
+#~ msgstr ""
+#~ "tiene una función de shell llamada `ls', y desea llamar a la orden `ls',"
+
+#~ msgid ""
+#~ "say \"command ls\". If the -p option is given, a default value is used"
+#~ msgstr ""
+#~ "se puede decir \"command ls\". Si se especifica la opción -p, se usa un "
+#~ "valor"
+
+# es usado -> se usa. sv
+# De acuerdo. La corrección incluye también la línea anterior. cfuga
+#~ msgid ""
+#~ "for PATH that is guaranteed to find all of the standard utilities. If"
+#~ msgstr ""
+#~ "por omisión para PATH que garantiza encontrar todas las herramientas "
+#~ "estándar."
+
+# es impresa -> se muestra una cadena em+
+# "Si se da la opcón -V o -v,..." sv
+# De acuerdo. cfuga
+#~ msgid ""
+#~ "the -V or -v option is given, a string is printed describing COMMAND."
+#~ msgstr ""
+#~ "Si se da la opción -V o -v, se muestra una cadena describiendo la ORDEN."
+
+#~ msgid "The -V option produces a more verbose description."
+#~ msgstr "La opción -V produce una descripción más completa."
+
+#~ msgid "Declare variables and/or give them attributes. If no NAMEs are"
+#~ msgstr ""
+#~ "Declara variables y/o les da atributos. Si no se proporcionan NOMBREs,"
+
+#~ msgid "given, then display the values of variables instead. The -p option"
+#~ msgstr "entonces muestra los valores de las variables. La opción -p"
+
+#~ msgid "will display the attributes and values of each NAME."
+#~ msgstr "mostrará los atributos y valores de cada NOMBRE."
+
+#~ msgid "The flags are:"
+#~ msgstr "Los indicadores son:"
+
+#~ msgid " -a\tto make NAMEs arrays (if supported)"
+#~ msgstr " -a\thacer los NOMBREs matrices (si está soportado)"
+
+#~ msgid " -f\tto select from among function names only"
+#~ msgstr " -f\tseleccionar sólo entre los nombres de funciones"
+
+#~ msgid " -F\tto display function names without definitions"
+#~ msgstr " -F\tmostrar los nombres de funciones sin definiciones"
+
+#~ msgid " -r\tto make NAMEs readonly"
+#~ msgstr " -r\thacer los NOMBREs de sólo lectura"
+
+#~ msgid " -x\tto make NAMEs export"
+#~ msgstr " -x\thacer los NOMBREs exportables"
+
+#~ msgid " -i\tto make NAMEs have the `integer' attribute set"
+#~ msgstr " -i\thacer que los NOMBREs tengan el atributo `entero' activado"
+
+#~ msgid "Variables with the integer attribute have arithmetic evaluation (see"
+#~ msgstr "Las variables con el atributo entero tienen evaluación aritmética"
+
+#~ msgid "`let') done when the variable is assigned to."
+#~ msgstr "(ver `let') cuando la variable es asignada."
+
+#~ msgid "When displaying values of variables, -f displays a function's name"
+#~ msgstr "Cuando se muestran valores de variables, -f muestra el nombre y"
+
+#~ msgid "and definition. The -F option restricts the display to function"
+#~ msgstr "la definición de la función. La opción -F evita que se muestre"
+
+#~ msgid "name only."
+#~ msgstr "solamente el nombre de la función."
+
+# apaga -> desactiva em+
+#~ msgid ""
+#~ "Using `+' instead of `-' turns off the given attribute instead. When"
+#~ msgstr ""
+#~ "Usar `+' en lugar de `-' desactiva el atributo dado. Cuando es usado"
+
+#~ msgid "used in a function, makes NAMEs local, as with the `local' command."
+#~ msgstr ""
+#~ "en una función, hace los NOMBREs locales, como con la orden `local'."
+
+# y le da -> y le asigna em+
+#~ msgid "Create a local variable called NAME, and give it VALUE. LOCAL"
+#~ msgstr "Crea una variable local llamada NOMBRE, y le asigna un VALOR. LOCAL"
+
+# tenga un alcance visible -> sea visible solo para la función y sus los hijos em+
+#~ msgid "have a visible scope restricted to that function and its children."
+#~ msgstr "tenga visible sólo para la función y sus hijos."
+
+#~ msgid "Output the ARGs. If -n is specified, the trailing newline is"
+#~ msgstr "Muestra los ARGumentos. Si -n es especificado, el carácter final de"
+
+#~ msgid "suppressed. If the -e option is given, interpretation of the"
+#~ msgstr ""
+#~ "fin de línea es eliminado. Si se especifica la opción -e, se activa la"
+
+#~ msgid "following backslash-escaped characters is turned on:"
+#~ msgstr "interpretación de estos caracteres de escape con barras invertidas:"
+
+#~ msgid "\t\\a\talert (bell)"
+#~ msgstr "\t\\a\talerta (campana)"
+
+#~ msgid "\t\\b\tbackspace"
+#~ msgstr "\t\\b\tespacio hacia atrás"
+
+#~ msgid "\t\\c\tsuppress trailing newline"
+#~ msgstr "\t\\c\tsuprime el carácter de fin de línea restante"
+
+#~ msgid "\t\\E\tescape character"
+#~ msgstr "\t\\E\tcarácter de escape"
+
+#~ msgid "\t\\f\tform feed"
+#~ msgstr "\t\\f\talimentación de papel"
+
+#~ msgid "\t\\n\tnew line"
+#~ msgstr "\t\\n\tnueva línea"
+
+#~ msgid "\t\\r\tcarriage return"
+#~ msgstr "\t\\r\tretorno de carro"
+
+#~ msgid "\t\\t\thorizontal tab"
+#~ msgstr "\t\\t\ttabulador horizontal"
+
+#~ msgid "\t\\v\tvertical tab"
+#~ msgstr "\t\\v\ttabulador vertical"
+
+#~ msgid "\t\\\\\tbackslash"
+#~ msgstr "\t\\\\\tbarra invertida"
+
+#~ msgid "\t\\num\tthe character whose ASCII code is NUM (octal)."
+#~ msgstr "\t\\num\tel carácter cuyo código ASCII es NÚM (octal)."
+
+#~ msgid ""
+#~ "You can explicitly turn off the interpretation of the above characters"
+#~ msgstr "Puede desactivar explícitamente la interpretación de los siguientes"
+
+#~ msgid "with the -E option."
+#~ msgstr "caracteres con la opción -E ."
+
+#~ msgid "Enable and disable builtin shell commands. This allows"
+#~ msgstr "Activa y desactiva las órdenes internas del shell. Esto permite"
+
+#~ msgid "you to use a disk command which has the same name as a shell"
+#~ msgstr ""
+#~ "que use una orden del sistema que tenga el mismo nombre de una orden"
+
+#~ msgid "builtin. If -n is used, the NAMEs become disabled; otherwise"
+#~ msgstr "interna. Si se usa -n , los NOMBREs se desactivan; de otra forma"
+
+#~ msgid "NAMEs are enabled. For example, to use the `test' found on your"
+#~ msgstr "se activan los NOMBREs. Por ejemplo, para usar `test' de la"
+
+#~ msgid "path instead of the shell builtin version, type `enable -n test'."
+#~ msgstr ""
+#~ "ruta de acceso en lugar de la versión interna del shell, teclee\n"
+#~ "`enable -n test'."
+
+# se puede usar. sv
+#~ msgid "On systems supporting dynamic loading, the -f option may be used"
+#~ msgstr "En sistemas que soportan carga dinámica, la opción -f se puede usar"
+
+#~ msgid "to load new builtins from the shared object FILENAME. The -d"
+#~ msgstr "para cargar nuevas órdenes internas del objeto FICHERO compartido."
+
+#~ msgid "option will delete a builtin previously loaded with -f. If no"
+#~ msgstr "La opción -d borrará una orden interna cargada con -f. Si no"
+
+#~ msgid "non-option names are given, or the -p option is supplied, a list"
+#~ msgstr ""
+#~ "se especifica ninguna opción, o se especifica la opción -p, se muestra "
+#~ "una lista"
+
+# Se muestra una lista de órdenes internas. sv
+# Hay muchos más mensajes que están en "pasiva" que quedarían mejor en
+# forma "reflexiva". No comento más y te dejo que los mires despacio.
+# Gracias por la observación. cfuga
+#~ msgid "of builtins is printed. The -a option means to print every builtin"
+#~ msgstr ""
+#~ "de órdenes internas. La opción -a implica mostrar cada orden interno"
+
+#~ msgid "with an indication of whether or not it is enabled. The -s option"
+#~ msgstr "con una indicación de si está activa o no. La opción -s impide"
+
+#~ msgid "restricts the output to the Posix.2 `special' builtins. The -n"
+#~ msgstr "la salida a las órdenes internas `especiales' Posix.2. La opción -n"
+
+#~ msgid "option displays a list of all disabled builtins."
+#~ msgstr "muestra una lista de todos las órdenes internas desactivadas."
+
+#~ msgid "Getopts is used by shell procedures to parse positional parameters."
+#~ msgstr ""
+#~ "Los procedimientos de shell usan getopts para decodificar parámetros\n"
+#~ "de posición."
+
+# "a ser reconocidas" no está en español.
+# Yo pondría "las letras de opción que se reconocen". sv
+# De acuerdo. cfuga
+#~ msgid "OPTSTRING contains the option letters to be recognized; if a letter"
+#~ msgstr ""
+#~ "La CADENA_OPCIONES contiene las letras de opción que se reconocen; si una"
+
+#~ msgid "is followed by a colon, the option is expected to have an argument,"
+#~ msgstr ""
+#~ "letra es seguida de dos puntos, se espera que la opción tenga un "
+#~ "argumento,"
+
+#~ msgid "which should be separated from it by white space."
+#~ msgstr "que debe estar separado por espacios."
+
+#~ msgid "Each time it is invoked, getopts will place the next option in the"
+#~ msgstr "Cada vez que se llama, getopts colocará la siguiente opción en"
+
+#~ msgid "shell variable $name, initializing name if it does not exist, and"
+#~ msgstr ""
+#~ "la variable de shell $nombre, creando nombre si no existe, y el índice"
+
+#~ msgid "the index of the next argument to be processed into the shell"
+#~ msgstr ""
+#~ "del siguiente argumento para procesarse dentro de la variable del shell"
+
+#~ msgid "variable OPTIND. OPTIND is initialized to 1 each time the shell or"
+#~ msgstr "OPTIND. OPTIND inicia con 1 cada vez que el shell o un guión de"
+
+#~ msgid "a shell script is invoked. When an option requires an argument,"
+#~ msgstr "shell es llamado. Cuando una opción requiere un argumento,"
+
+#~ msgid "getopts places that argument into the shell variable OPTARG."
+#~ msgstr "getopts coloca ese argumento en la variable de shell OPTARG."
+
+# en una de dos formas -> en una de las dos formas siguientes em+
+#~ msgid "getopts reports errors in one of two ways. If the first character"
+#~ msgstr ""
+#~ "getopts comunica errores en una de las dos formas siguientes. Si el "
+#~ "primer carácter"
+
+#~ msgid "of OPTSTRING is a colon, getopts uses silent error reporting. In"
+#~ msgstr ""
+#~ "de OPTSTRING es dos puntos, getopts usa el aviso de error silencioso."
+
+#~ msgid "this mode, no error messages are printed. If an illegal option is"
+#~ msgstr ""
+#~ "En este modo, no se muestran mensajes de error. Si se encuentra una "
+#~ "opción"
+
+#~ msgid "seen, getopts places the option character found into OPTARG. If a"
+#~ msgstr "ilegal, getopts coloca el carácter de opción encontrado en OPTARG."
+
+#~ msgid "required argument is not found, getopts places a ':' into NAME and"
+#~ msgstr ""
+#~ "Si un argumento necesario no se encuentra, getopts coloca ':' en NOMBRE"
+
+#~ msgid "sets OPTARG to the option character found. If getopts is not in"
+#~ msgstr "y establece a OPTARG con el carácter de opción encontrado. Si"
+
+#~ msgid "silent mode, and an illegal option is seen, getopts places '?' into"
+#~ msgstr ""
+#~ "getopts no está en modo silencioso, y se encuentra una opción ilegal,"
+
+#~ msgid "NAME and unsets OPTARG. If a required option is not found, a '?'"
+#~ msgstr "getopts coloca '?' en NOMBRE y borra OPTARG. Si no se encuentra"
+
+#~ msgid "is placed in NAME, OPTARG is unset, and a diagnostic message is"
+#~ msgstr "una opción necesaria, se coloca un '?' en NOMBRE, se borra OPTARG,"
+
+#~ msgid "If the shell variable OPTERR has the value 0, getopts disables the"
+#~ msgstr ""
+#~ "Si la variable de shell OPTERR tiene el valor 0, getopts deshabilita"
+
+#~ msgid "printing of error messages, even if the first character of"
+#~ msgstr "la notificación de mensajes de error, aún si el primer carácter de"
+
+#~ msgid "OPTSTRING is not a colon. OPTERR has the value 1 by default."
+#~ msgstr "OPTSTRING no es ':'. OPTERR tiene el valor de 1 por omisión."
+
+#~ msgid "Getopts normally parses the positional parameters ($0 - $9), but if"
+#~ msgstr ""
+#~ "Getopts normalmente compara los parámetros de posición ($0 - $9), pero"
+
+# dar argumentos -> especificar em+
+#~ msgid "more arguments are given, they are parsed instead."
+#~ msgstr ""
+#~ "si se especifican más argumentos, se comparan en lugar de los primeros."
+
+#~ msgid "Exec FILE, replacing this shell with the specified program."
+#~ msgstr ""
+#~ "Ejecuta el FICHERO, reemplazando este shell con el programa especificado."
+
+#~ msgid "If FILE is not specified, the redirections take effect in this"
+#~ msgstr ""
+#~ "Si no se especifica un FICHERO, las redirecciones toman efecto en este"
+
+#~ msgid "shell. If the first argument is `-l', then place a dash in the"
+#~ msgstr "shell. Si el primer argumento es `-l', entonces coloca un guión en"
+
+#~ msgid "zeroth arg passed to FILE, as login does. If the `-c' option"
+#~ msgstr ""
+#~ "el argumento 0 pasado al FICHERO, como lo hace login. Si se especifica la "
+#~ "opción"
+
+#~ msgid "is supplied, FILE is executed with a null environment. The `-a'"
+#~ msgstr "`-c', el FICHERO se ejecuta en un entorno nulo. La opción `-a'"
+
+#~ msgid "option means to make set argv[0] of the executed process to NAME."
+#~ msgstr "hace que cambie el argv[0] del proceso ejecutado a NOMBRE."
+
+#~ msgid "If the file cannot be executed and the shell is not interactive,"
+#~ msgstr "Si el fichero no se puede ejecutar y el shell no es interactivo,"
+
+#~ msgid "then the shell exits, unless the variable \"no_exit_on_failed_exec\""
+#~ msgstr "entonces el shell termina, a menos que la variable"
+
+#~ msgid "is set."
+#~ msgstr "\"no_exit_on_failed_exec\" esté activada."
+
+#~ msgid "is that of the last command executed."
+#~ msgstr "es el del último comando ejecutado."
+
+#~ msgid ""
+#~ "FIRST and LAST can be numbers specifying the range, or FIRST can be a"
+#~ msgstr ""
+#~ "PRIMERO y ÚLTIMO pueden ser números especificando el rango, o PRIMERO"
+
+#~ msgid "string, which means the most recent command beginning with that"
+#~ msgstr "puede ser una cadena, que representa el comando más reciente que"
+
+#~ msgid "string."
+#~ msgstr "comience con dicha cadena."
+
+#~ msgid ""
+#~ " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR,"
+#~ msgstr ""
+#~ " -e NOMBRE_E escoge qué editor emplear. Por omisión es FCEDIT, después"
+
+#~ msgid ""
+#~ " then the editor which corresponds to the current readline editing"
+#~ msgstr " EDITOR, después el editor que corresponde a la edición actual"
+
+#~ msgid " mode, then vi."
+#~ msgstr " del modo de línea de comando, y finalmente vi."
+
+#~ msgid " -l means list lines instead of editing."
+#~ msgstr " -l significa mostrar líneas en lugar de editarlas."
+
+#~ msgid " -n means no line numbers listed."
+#~ msgstr " -n significa que no sean mostrados los números de línea."
+
+#~ msgid ""
+#~ " -r means reverse the order of the lines (making it newest listed "
+#~ "first)."
+#~ msgstr ""
+#~ " -r significa invertir el orden de las líneas (líneas nuevas primero)."
+
+#~ msgid "With the `fc -s [pat=rep ...] [command]' format, the command is"
+#~ msgstr "Con el formato `fc -s [pat=rep ...] [orden]', la orden es"
+
+#~ msgid "re-executed after the substitution OLD=NEW is performed."
+#~ msgstr ""
+#~ "re-ejecutado después de que se realiza la sustitución ANTIGUA=NUEVA."
+
+#~ msgid "A useful alias to use with this is r='fc -s', so that typing `r cc'"
+#~ msgstr ""
+#~ "Un alias útil para usar con esto es r='fc -s', así que al teclear `r cc'"
+
+#~ msgid "runs the last command beginning with `cc' and typing `r' re-executes"
+#~ msgstr ""
+#~ "ejecuta la última orden que comenzó con `cc' y tecleando `r' re-ejecuta"
+
+#~ msgid "JOB_SPEC is not present, the shell's notion of the current job is"
+#~ msgstr ""
+#~ "Si el IDTRABAJO no se encuentra, se usa la noción del shell de trabajo"
+
+#~ msgid "used."
+#~ msgstr "actual."
+
+#~ msgid "Place JOB_SPEC in the background, as if it had been started with"
+#~ msgstr ""
+#~ "Ubica al IDTRABAJO en el background, como si hubiera sido iniciado con"
+
+#~ msgid "`&'. If JOB_SPEC is not present, the shell's notion of the current"
+#~ msgstr "`&'. Si el IDTRABAJO no se encuentra, se usa la noción del shell"
+
+#~ msgid "job is used."
+#~ msgstr "de trabajo actual."
+
+#~ msgid "For each NAME, the full pathname of the command is determined and"
+#~ msgstr "Para cada NOMBRE, se determina la ruta completa de la orden y se"
+
+#~ msgid "remembered. If the -p option is supplied, PATHNAME is used as the"
+#~ msgstr "recuerda. Si se especifica la opción -p, se usa la RUTA_DE_ACCESO"
+
+#~ msgid "full pathname of NAME, and no path search is performed. The -r"
+#~ msgstr ""
+#~ "como la ruta completa de NOMBRE y no se realiza la búsqueda de ruta."
+
+#~ msgid "option causes the shell to forget all remembered locations. If no"
+#~ msgstr ""
+#~ " La opción -r hace que el shell olvide todas las ubicaciones recordadas."
+
+#~ msgid ""
+#~ "arguments are given, information about remembered commands is displayed."
+#~ msgstr ""
+#~ " Si no se especifican argumentos, se muestra la información sobre las "
+#~ "órdenes recordadas."
+
+#~ msgid "Display helpful information about builtin commands. If PATTERN is"
+#~ msgstr "Muestra información de ayuda acerca de las órdenes internas. Si se"
+
+#~ msgid "specified, gives detailed help on all commands matching PATTERN,"
+#~ msgstr ""
+#~ "especifica la PLANTILLA, da ayuda detallada de todas las órdenes que"
+
+#~ msgid "otherwise a list of the builtins is printed."
+#~ msgstr ""
+#~ "coinciden con la PLANTILLA, de otra forma se muestra una lista de las "
+#~ "órdenes internas."
+
+#~ msgid "Display the history list with line numbers. Lines listed with"
+#~ msgstr ""
+#~ "Muestra la lista de la historia con números de línea. Las líneas "
+#~ "mostradas"
+
+#~ msgid "with a `*' have been modified. Argument of N says to list only"
+#~ msgstr ""
+#~ "con un `*' han sido modificadas. Un argumento de N indica que solo se"
+
+#~ msgid "the last N lines. The -c option causes the history list to be"
+#~ msgstr ""
+#~ "muestren las últimas N líneas. La opción -c hace que la lista de la "
+#~ "historia"
+
+#~ msgid ""
+#~ "cleared by deleting all of the entries. The `-w' option writes out the"
+#~ msgstr ""
+#~ "sea borrada eliminando todas las entradas. La opción `-w' escribe la "
+#~ "historia"
+
+#~ msgid ""
+#~ "current history to the history file; `-r' means to read the file and"
+#~ msgstr ""
+#~ "actual al fichero de historia; `-r' al contrario, lee el fichero y agrega"
+
+#~ msgid "append the contents to the history list instead. `-a' means"
+#~ msgstr "el contenido a la lista de la historia. `-a' agrega las"
+
+#~ msgid "to append history lines from this session to the history file."
+#~ msgstr "líneas de la historia de esta sesión al fichero de historia."
+
+#~ msgid "Argument `-n' means to read all history lines not already read"
+#~ msgstr "El argumento `-n' lee todas las líneas de historia que no han sido"
+
+#~ msgid "from the history file and append them to the history list. If"
+#~ msgstr ""
+#~ "leídas aún del fichero de historia y las agrega a la lista de historia."
+
+#~ msgid "FILENAME is given, then that is used as the history file else"
+#~ msgstr ""
+#~ " Si se especifica un FICHERO, entonces se usa como el fichero de historia"
+
+#~ msgid "if $HISTFILE has a value, that is used, else ~/.bash_history."
+#~ msgstr ""
+#~ "de otra manera si $HISTFILE tiene un valor, se utiliza, de otra forma se "
+#~ "usa ~/.bash_history."
+
+#~ msgid "If the -s option is supplied, the non-option ARGs are appended to"
+#~ msgstr ""
+#~ "Si se especifica la opción -s, los ARGumentos que no son opciones se"
+
+#~ msgid "the history list as a single entry. The -p option means to perform"
+#~ msgstr ""
+#~ "agregan a la lista de historia como una sola entrada. La opción -p "
+#~ "realiza"
+
+#~ msgid ""
+#~ "history expansion on each ARG and display the result, without storing"
+#~ msgstr ""
+#~ "una expansión de historia en cada ARGumento y muestra el resultado, sin "
+#~ "guardar"
+
+#~ msgid "anything in the history list."
+#~ msgstr "nada en la lista de historia."
+
+#~ msgid "Lists the active jobs. The -l option lists process id's in addition"
+#~ msgstr ""
+#~ "Muestra los trabajos activos. La opción -l muestra los id's de los "
+#~ "procesos además"
+
+#~ msgid "to the normal information; the -p option lists process id's only."
+#~ msgstr ""
+#~ "de la información normal; la opción -p solamente muestra los id's de los "
+#~ "procesos."
+
+#~ msgid ""
+#~ "If -n is given, only processes that have changed status since the last"
+#~ msgstr ""
+#~ "Si se especifica -n, solamente se muestran los procesos que han cambiado"
+
+#~ msgid ""
+#~ "notification are printed. JOBSPEC restricts output to that job. The"
+#~ msgstr ""
+#~ "de estado desde la última notificación. IDJOB limita la salida a ese "
+#~ "trabajo. Las"
+
+#~ msgid "-r and -s options restrict output to running and stopped jobs only,"
+#~ msgstr ""
+#~ "opciones -r y -s limitan la salida a mostrar sólo trabajos corriendo y "
+#~ "detenidos,"
+
+#~ msgid "respectively. Without options, the status of all active jobs is"
+#~ msgstr "respectivamente. Sin opciones, se muestra el estado de todos los"
+
+#~ msgid ""
+#~ "printed. If -x is given, COMMAND is run after all job specifications"
+#~ msgstr ""
+#~ "trabajos activos. Si se especifica -x, la ORDEN se ejecuta después de "
+#~ "que todas las especificaciones de trabajos"
+
+#~ msgid ""
+#~ "that appear in ARGS have been replaced with the process ID of that job's"
+#~ msgstr "que aparecen en ARGS han sido reemplazadas por el ID de proceso del"
+
+#~ msgid "process group leader."
+#~ msgstr "líder del grupo de procesos de dicho trabajo."
+
+#~ msgid "Removes each JOBSPEC argument from the table of active jobs."
+#~ msgstr "Elimina cada argumento IDJOBS de la tabla de trabajos activos."
+
+#~ msgid "Send the processes named by PID (or JOB) the signal SIGSPEC. If"
+#~ msgstr ""
+#~ "Manda a los procesos nombrados por PID (o TRABAJO) la señal SIGSPEC. Si"
+
+#~ msgid ""
+#~ "SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'"
+#~ msgstr ""
+#~ "no se especifica SIGSPEC, entonces se asume SIGTERM. El argumento `-l'"
+
+#~ msgid "lists the signal names; if arguments follow `-l' they are assumed to"
+#~ msgstr ""
+#~ "muestra los nombres de señales; si hay argumentos después de `-l', se"
+
+#~ msgid "be signal numbers for which names should be listed. Kill is a shell"
+#~ msgstr ""
+#~ "asume que son números de señales cuyos nombres deben mostrarse. Kill es "
+#~ "una orden"
+
+#~ msgid "builtin for two reasons: it allows job IDs to be used instead of"
+#~ msgstr ""
+#~ "interna de shell por dos razones: permite que los IDs de trabajos sean "
+#~ "usados en lugar de "
+
+#~ msgid "process IDs, and, if you have reached the limit on processes that"
+#~ msgstr "IDs de procesos, y, si ha alcanzado el límite de procesos que"
+
+#~ msgid ""
+#~ "you can create, you don't have to start a process to kill another one."
+#~ msgstr "puede crear, no tiene que iniciar un proceso para eliminar a otro."
+
+# "a ser evaluada" no está en español. sv
+# Cierto. ¿Así está mejor? cfuga
+#~ msgid "Each ARG is an arithmetic expression to be evaluated. Evaluation"
+#~ msgstr ""
+#~ "Cada ARGumento es una expresión aritmética para evaluarse. La evaluación"
+
+# overflow -> desbordamiento o sobrepasamiento. nunca lo he visto
+# traducido como sobreflujo. sv
+# Corregido. cfuga
+#~ msgid "is done in long integers with no check for overflow, though division"
+#~ msgstr ""
+#~ "se hace en enteros long sin revisar desbordamientos, aunque la división"
+
+#~ msgid "by 0 is trapped and flagged as an error. The following list of"
+#~ msgstr "por 0 es capturada y marcada como un error. La siguiente lista de"
+
+# No sé si existe precedencia en español, pero me suena fatal.
+# Yo pondría simplemente "prioridad". sv
+# Creo que si existe, pero tu sugerencia es mejor. cfuga
+#~ msgid "operators is grouped into levels of equal-precedence operators."
+#~ msgstr ""
+#~ "operadores está agrupada en niveles de operadores de la misma prioridad."
+
+#~ msgid "The levels are listed in order of decreasing precedence."
+#~ msgstr "Se muestran los niveles en orden de prioridad decreciente."
+
+#~ msgid "\t-, +\t\tunary minus, plus"
+#~ msgstr "\t-, +\t\tmenos unario, más"
+
+#~ msgid "\t!, ~\t\tlogical and bitwise negation"
+#~ msgstr "\t!, ~\t\tnegación lógica y basada en bits"
+
+#~ msgid "\t*, /, %\t\tmultiplication, division, remainder"
+#~ msgstr "\t*, /, %\t\tmultiplicación, división, residuo"
+
+#~ msgid "\t+, -\t\taddition, subtraction"
+#~ msgstr "\t+, -\t\tadición, sustracción"
+
+#~ msgid "\t<<, >>\t\tleft and right bitwise shifts"
+#~ msgstr "\t<<, >>\t\tdesplazamientos de bits izquierdo y derecho"
+
+#~ msgid "\t<=, >=, <, >\tcomparison"
+#~ msgstr "\t<=, >=, <, >\tcomparación"
+
+#~ msgid "\t==, !=\t\tequality, inequality"
+#~ msgstr "\t==, !=\t\tequivalencia, inequivalencia"
+
+#~ msgid "\t&\t\tbitwise AND"
+#~ msgstr "\t&\t\tAND de bits"
+
+#~ msgid "\t^\t\tbitwise XOR"
+#~ msgstr "\t^\t\tXOR de bits"
+
+#~ msgid "\t|\t\tbitwise OR"
+#~ msgstr "\t|\t\tOR de bits"
+
+#~ msgid "\t&&\t\tlogical AND"
+#~ msgstr "\t&&\t\tAND lógico"
+
+#~ msgid "\t||\t\tlogical OR"
+#~ msgstr "\t||\t\tOR lógico"
+
+#~ msgid "\texpr ? expr : expr"
+#~ msgstr "\texpr ? expr : expr"
+
+#~ msgid "\t\t\tconditional expression"
+#~ msgstr "\t\t\texpresión condicional"
+
+#~ msgid "\t=, *=, /=, %=,"
+#~ msgstr "\t=, *=, /=, %=,"
+
+#~ msgid "\t+=, -=, <<=, >>=,"
+#~ msgstr "\t+=, -=, <<=, >>=,"
+
+#~ msgid "\t&=, ^=, |=\tassignment"
+#~ msgstr "asignaciones\t&=, ^=, |="
+
+#~ msgid "is replaced by its value (coerced to a long integer) within"
+#~ msgstr "de la variable por su valor (asignado a un entero long) dentro de"
+
+#~ msgid "an expression. The variable need not have its integer attribute"
+#~ msgstr "una expresión. La variable no necesita tener activado su atributo"
+
+#~ msgid "turned on to be used in an expression."
+#~ msgstr "entero para que se use en una expresión."
+
+#~ msgid "Operators are evaluated in order of precedence. Sub-expressions in"
+#~ msgstr ""
+#~ "Los operadores se evalúan en orden de prioridad. Se evalúan en primer"
+
+#~ msgid "parentheses are evaluated first and may override the precedence"
+#~ msgstr "lugar las sub-expresiones en paréntesis y pueden sobrepasar las"
+
+#~ msgid "rules above."
+#~ msgstr "reglas de prioridad anteriores."
+
+#~ msgid "If the last ARG evaluates to 0, let returns 1; 0 is returned"
+#~ msgstr "Si el último ARGumento evalua a 0, let regresa 1; de otra manera"
+
+#~ msgid "otherwise."
+#~ msgstr "se regresa 0."
+
+#~ msgid "One line is read from the standard input, and the first word is"
+#~ msgstr "Una línea se lee de la entrada estándar, y la primera palabra se"
+
+#~ msgid ""
+#~ "assigned to the first NAME, the second word to the second NAME, and so"
+#~ msgstr ""
+#~ "asigna al primer NOMBRE, la segunda palabra al segundo NOMBRE, y así"
+
+#~ msgid ""
+#~ "on, with leftover words assigned to the last NAME. Only the characters"
+#~ msgstr ""
+#~ "con las palabras restantes asignadas al último NOMBRE. Solo los "
+#~ "caracteres"
+
+#~ msgid "found in $IFS are recognized as word delimiters. The return code is"
+#~ msgstr ""
+#~ "que se encuentran en $IFS se reconocen como delimitadores de palabras. El"
+
+#~ msgid ""
+#~ "zero, unless end-of-file is encountered. If no NAMEs are supplied, the"
+#~ msgstr ""
+#~ "código de retorno es cero, a menos que se encuentre un fin-de-fichero. "
+#~ "Si no"
+
+#~ msgid ""
+#~ "line read is stored in the REPLY variable. If the -r option is given,"
+#~ msgstr ""
+#~ "se establece ningún NOMBRE, la línea leída se guarda en la variable "
+#~ "REPLY. Si"
+
+#~ msgid "this signifies `raw' input, and backslash escaping is disabled. If"
+#~ msgstr ""
+#~ "se proporciona la opción -r, esto significa entrada `textual', y se "
+#~ "desactiva"
+
+#~ msgid "the `-p' option is supplied, the string supplied as an argument is"
+#~ msgstr "el escape de la barra invertida. Si se proporciona la opción `-p',"
+
+#~ msgid ""
+#~ "output without a trailing newline before attempting to read. If -a is"
+#~ msgstr ""
+#~ "se muestra la cadena proporcionada como argumento sin un fín de línea "
+#~ "terminal antes de intentar leerla."
+
+#~ msgid ""
+#~ "supplied, the words read are assigned to sequential indices of ARRAY,"
+#~ msgstr ""
+#~ "Si se da -a, se asignan las palabras leídas a índices secuenciales de "
+#~ "MATRIZ"
+
+#~ msgid "starting at zero. If -e is supplied and the shell is interactive,"
+#~ msgstr "iniciando en cero. Si se da -e y el shell es interactivo,"
+
+#~ msgid "readline is used to obtain the line."
+#~ msgstr "se usa readline para obtener la línea."
+
+#~ msgid "is omitted, the return status is that of the last command."
+#~ msgstr "se omite N, se utiliza el código de estado de la última orden."
+
+#~ msgid " -a Mark variables which are modified or created for export."
+#~ msgstr ""
+#~ " -a Marca las variables que se modifican o crean para exportación."
+
+#~ msgid " -b Notify of job termination immediately."
+#~ msgstr " -b Notifica el término de trabajos inmediatamente."
+
+#~ msgid " -e Exit immediately if a command exits with a non-zero status."
+#~ msgstr ""
+#~ " -e Termina inmediatamente si una orden termina con un estado "
+#~ "diferente a cero."
+
+#~ msgid " -f Disable file name generation (globbing)."
+#~ msgstr ""
+#~ " -f Desactiva la generación de nombres de ficheros (englobamiento)."
+
+#~ msgid " -h Remember the location of commands as they are looked up."
+#~ msgstr ""
+#~ " -h Recuerda la ubicación de las órdenes como fueron localizadas."
+
+#~ msgid ""
+#~ " -i Force the shell to be an \"interactive\" one. Interactive shells"
+#~ msgstr ""
+#~ " -i Fuerza que el shell sea \"interactive\". Los shells interactivos"
+
+#~ msgid " always read `~/.bashrc' on startup."
+#~ msgstr " siempre leen `~/.bashrc' al inicio."
+
+#~ msgid " -k All assignment arguments are placed in the environment for a"
+#~ msgstr ""
+#~ " -k Todos los argumentos de asignación se ubican en el ambiente para "
+#~ "una"
+
+#~ msgid " command, not just those that precede the command name."
+#~ msgstr ""
+#~ " orden, no solamente aquéllos que preceden al nombre de la orden."
+
+#~ msgid " -m Job control is enabled."
+#~ msgstr " -m Se activa el control de trabajos."
+
+#~ msgid " -n Read commands but do not execute them."
+#~ msgstr " -n Lee órdenes pero no las ejecuta."
+
+#~ msgid " -o option-name"
+#~ msgstr " -o nombre-opción"
+
+#~ msgid " Set the variable corresponding to option-name:"
+#~ msgstr " Establece la variable correspondiente a nombre-opción:"
+
+#~ msgid " allexport same as -a"
+#~ msgstr " allexport igual que -a"
+
+#~ msgid " braceexpand same as -B"
+#~ msgstr " braceexpand igual que -B"
+
+#~ msgid " emacs use an emacs-style line editing interface"
+#~ msgstr ""
+#~ " emacs usa una interfaz de edición de línea estilo emacs"
+
+#~ msgid " errexit same as -e"
+#~ msgstr " errexit igual que -e"
+
+#~ msgid " hashall same as -h"
+#~ msgstr " hashall igual que -h"
+
+#~ msgid " histexpand same as -H"
+#~ msgstr " histexpand igual que -H"
+
+#~ msgid " ignoreeof the shell will not exit upon reading EOF"
+#~ msgstr " ignoreeof el shell no terminará después de leer EOF"
+
+#~ msgid " interactive-comments"
+#~ msgstr " interactive-comments"
+
+#~ msgid ""
+#~ " allow comments to appear in interactive commands"
+#~ msgstr ""
+#~ " permite que los comentarios se muestren en "
+#~ "órdenes interactivas"
+
+#~ msgid " keyword same as -k"
+#~ msgstr " keyword igual que -k"
+
+#~ msgid " monitor same as -m"
+#~ msgstr " monitor igual que -m"
+
+#~ msgid " noclobber same as -C"
+#~ msgstr " noclobber igual que -C"
+
+#~ msgid " noexec same as -n"
+#~ msgstr " noexec igual que -n"
+
+#~ msgid " noglob same as -f"
+#~ msgstr " noglob igual que -f"
+
+#~ msgid " notify save as -b"
+#~ msgstr " notify igual que -b"
+
+#~ msgid " nounset same as -u"
+#~ msgstr " nounset igual que -u"
+
+#~ msgid " onecmd same as -t"
+#~ msgstr " onecmd same as -t"
+
+#~ msgid " physical same as -P"
+#~ msgstr " physical same as -P"
+
+#~ msgid ""
+#~ " posix change the behavior of bash where the default"
+#~ msgstr ""
+#~ " posix cambia la conducta de bash donde por omisión"
+
+#~ msgid ""
+#~ " operation differs from the 1003.2 standard to"
+#~ msgstr ""
+#~ " la operación difiere del estándar 1003.2 para"
+
+#~ msgid " match the standard"
+#~ msgstr " cumplir el estándar"
+
+#~ msgid " privileged same as -p"
+#~ msgstr " privileged igual que -p"
+
+#~ msgid " verbose same as -v"
+#~ msgstr " verbose igual que -v"
+
+#~ msgid " vi use a vi-style line editing interface"
+#~ msgstr ""
+#~ " vi usa una interfaz de edición de línea estilo vi"
+
+#~ msgid " xtrace same as -x"
+#~ msgstr " xtrace igual que -x"
+
+#~ msgid ""
+#~ " -p Turned on whenever the real and effective user ids do not match."
+#~ msgstr ""
+#~ " -p Se activa cada vez que los ids real y efectivo no coinciden."
+
+# FIXME: $ENV es variable, no fichero. cfuga
+#~ msgid " Disables processing of the $ENV file and importing of shell"
+#~ msgstr ""
+#~ " Desactiva el procesamiento del fichero $ENV y la importación de "
+#~ "funciones"
+
+#~ msgid ""
+#~ " functions. Turning this option off causes the effective uid and"
+#~ msgstr " de shell. Desactivar esta opción causa que el uid y el gid"
+
+#~ msgid " gid to be set to the real uid and gid."
+#~ msgstr " efectivos sean iguales al uid y al gid reales."
+
+#~ msgid " -t Exit after reading and executing one command."
+#~ msgstr " -t Terminar después de leer y ejecutar una orden."
+
+#~ msgid " -u Treat unset variables as an error when substituting."
+#~ msgstr ""
+#~ " -u Tratar las variables no establecidas como un error cuando se hace "
+#~ "sustitución."
+
+#~ msgid " -v Print shell input lines as they are read."
+#~ msgstr " -v Muestra las líneas de entrada del shell mientras se leen."
+
+#~ msgid " -x Print commands and their arguments as they are executed."
+#~ msgstr " -x Muestra las órdenes y sus argumentos mientras se ejecutan."
+
+#~ msgid " -B the shell will perform brace expansion"
+#~ msgstr " -B el shell hará expansión de llaves"
+
+#~ msgid " -H Enable ! style history substitution. This flag is on"
+#~ msgstr ""
+#~ " -H Activa el estilo ! de sustitución de la historia. Este indicador"
+
+#~ msgid " by default."
+#~ msgstr " está activado por omisión."
+
+#~ msgid " -C If set, disallow existing regular files to be overwritten"
+#~ msgstr ""
+#~ " -C Si está establecido, evita que los ficheros regulares existentes "
+#~ "sean sobreescritos"
+
+#~ msgid " by redirection of output."
+#~ msgstr " por una redirección de salida."
+
+#~ msgid " -P If set, do not follow symbolic links when executing commands"
+#~ msgstr ""
+#~ " -P Si está establecido, no se siguen los enlaces simbólicos cuando "
+#~ "se ejecutan órdenes"
+
+#~ msgid " such as cd which change the current directory."
+#~ msgstr " como cuando cd cambia al directorio actual."
+
+#~ msgid "Using + rather than - causes these flags to be turned off. The"
+#~ msgstr ""
+#~ "Usar + en lugar de - causa que estos indicadores sean desactivados. Los"
+
+#~ msgid "flags can also be used upon invocation of the shell. The current"
+#~ msgstr ""
+#~ "indicadores también se pueden usar durante la invocación del shell. El "
+#~ "conjunto"
+
+#~ msgid ""
+#~ "set of flags may be found in $-. The remaining n ARGs are positional"
+#~ msgstr ""
+#~ "actual de indicadores se encuentra en $-. Los ARGumentos n restantes son "
+#~ "parámetros"
+
+#~ msgid "parameters and are assigned, in order, to $1, $2, .. $n. If no"
+#~ msgstr "posicionales y se asignan, en orden, a $1, $2, .. $n. Si no"
+
+#~ msgid "ARGs are given, all shell variables are printed."
+#~ msgstr ""
+#~ "se establecen ARGumentos, se muestran todas las variables del shell."
+
+#~ msgid "For each NAME, remove the corresponding variable or function. Given"
+#~ msgstr ""
+#~ "Para cada NOMBRE, se borra la variable o función correspondiente. Al usar"
+
+#~ msgid "the `-v', unset will only act on variables. Given the `-f' flag,"
+#~ msgstr "`-v', unset sólo actuará en variables. Al usar el indicador `-f',"
+
+#~ msgid "unset will only act on functions. With neither flag, unset first"
+#~ msgstr ""
+#~ "unset sólo actuará en funciones. Sin ningún indicador, unset primero"
+
+#~ msgid "tries to unset a variable, and if that fails, then tries to unset a"
+#~ msgstr ""
+#~ "intenta borrar una variable, y si eso falla, entonces intenta borrar una"
+
+#~ msgid ""
+#~ "function. Some variables (such as PATH and IFS) cannot be unset; also"
+#~ msgstr ""
+#~ "función. Algunas variables (como PATH e IFS) no se pueden borrar; vea"
+
+#~ msgid "see readonly."
+#~ msgstr "también readonly."
+
+#~ msgid "NAMEs are marked for automatic export to the environment of"
+#~ msgstr "los NOMBREs se marcan para exportación automática al ambiente de"
+
+#~ msgid "subsequently executed commands. If the -f option is given,"
+#~ msgstr ""
+#~ "las órdenes ejecutadas subsecuentemente. Si se establece el indicador -f,"
+
+#~ msgid "the NAMEs refer to functions. If no NAMEs are given, or if `-p'"
+#~ msgstr ""
+#~ "los NOMBREs se refieren a funciones. Si no se establecen NOMBREs, o si `-"
+#~ "p'"
+
+#~ msgid "is given, a list of all names that are exported in this shell is"
+#~ msgstr ""
+#~ "se establece, se muestra una lista de todos los nombres que se exportan"
+
+#~ msgid "printed. An argument of `-n' says to remove the export property"
+#~ msgstr ""
+#~ "en este shell. Un argumento `-n' indica que se borre la propiedad de "
+#~ "exportación"
+
+#~ msgid "from subsequent NAMEs. An argument of `--' disables further option"
+#~ msgstr ""
+#~ "de NOMBREs subsecuentes. Un argumento `--' desactiva el procesamiento"
+
+#~ msgid "processing."
+#~ msgstr "posterior de opciones."
+
+#~ msgid ""
+#~ "The given NAMEs are marked readonly and the values of these NAMEs may"
+#~ msgstr ""
+#~ "Los NOMBREs dados se marcan como sólo-lectura y los valores de esos "
+#~ "NOMBREs"
+
+#~ msgid "not be changed by subsequent assignment. If the -f option is given,"
+#~ msgstr ""
+#~ "no se pueden cambiar por asignaciones posteriores. Si se establece el "
+#~ "indicador -f,"
+
+#~ msgid "then functions corresponding to the NAMEs are so marked. If no"
+#~ msgstr ""
+#~ "entonces también se marcan las funciones correspondientes a los NOMBREs. "
+#~ "Si no"
+
+#~ msgid ""
+#~ "arguments are given, or if `-p' is given, a list of all readonly names"
+#~ msgstr ""
+#~ "se establecen argumentos, o si se establece `-p', se muestra una lista de "
+#~ "todos los nombres"
+
+#~ msgid ""
+#~ "is printed. An argument of `-n' says to remove the readonly property"
+#~ msgstr ""
+#~ "de sólo-lectura. Un argumento `-n' indica que se borre la propiedad de "
+#~ "sólo-lectura"
+
+#~ msgid "from subsequent NAMEs. The `-a' option means to treat each NAME as"
+#~ msgstr "de los NOMBREs subsecuentes. La opción `-a' trata cada NOMBRE como"
+
+#~ msgid "an array variable. An argument of `--' disables further option"
+#~ msgstr ""
+#~ "una variable de matriz. Un argumento de `--' desactiva opciones "
+#~ "posteriores"
+
+#~ msgid "not given, it is assumed to be 1."
+#~ msgstr "establece N, se asume que es 1."
+
+#~ msgid "Read and execute commands from FILENAME and return. The pathnames"
+#~ msgstr "Lee y ejecuta órdenes del FICHERO y regresa. Los nombres de ruta"
+
+#~ msgid "in $PATH are used to find the directory containing FILENAME."
+#~ msgstr ""
+#~ "en $PATH se utilizan para encontrar al directorio que contiene el FICHERO."
+
+#~ msgid "Suspend the execution of this shell until it receives a SIGCONT"
+#~ msgstr "Suspende la ejecución de este shell hasta que recive una señal"
+
+#~ msgid "signal. The `-f' if specified says not to complain about this"
+#~ msgstr "SIGCONT. Si se especifica `-f' indica que no se queje si"
+
+#~ msgid "being a login shell if it is; just suspend anyway."
+#~ msgstr "es un shell de login; y solo suspender de cualquier forma."
+
+#~ msgid "Exits with a status of 0 (trueness) or 1 (falseness) depending on"
+#~ msgstr "Termina con un estado de 0 (verdad) ó 1 (falsedad) dependiendo de"
+
+#~ msgid "the evaluation of EXPR. Expressions may be unary or binary. Unary"
+#~ msgstr ""
+#~ "la evaluación de EXPR. Las expresiones pueden ser unarias o binarias. "
+#~ "Las expresiones"
+
+#~ msgid "expressions are often used to examine the status of a file. There"
+#~ msgstr ""
+#~ "unarias se utilizan con frecuencia para examinar el estado de un fichero."
+
+#~ msgid "are string operators as well, and numeric comparison operators."
+#~ msgstr ""
+#~ "Hay operadores de cadenas también, y operadores de comparación numérica."
+
+#~ msgid "File operators:"
+#~ msgstr "Operadores de fichero:"
+
+#~ msgid " -b FILE True if file is block special."
+#~ msgstr " -b FICHERO Verdadero si el fichero es especial de bloques."
+
+#~ msgid " -c FILE True if file is character special."
+#~ msgstr ""
+#~ " -c FICHERO Verdadero si el fichero es especial de caracteres."
+
+#~ msgid " -d FILE True if file is a directory."
+#~ msgstr " -d FICHERO Verdadero si el fichero es un directorio."
+
+#~ msgid " -e FILE True if file exists."
+#~ msgstr " -e FICHERO Verdadero si el fichero existe."
+
+#~ msgid " -f FILE True if file exists and is a regular file."
+#~ msgstr ""
+#~ " -f FICHERO Verdadero si el fichero existe y es un fichero regular."
+
+#~ msgid " -g FILE True if file is set-group-id."
+#~ msgstr ""
+#~ " -g FICHERO Verdadero si el fichero tiene activado el set-group-id."
+
+#~ msgid " -h FILE True if file is a symbolic link. Use \"-L\"."
+#~ msgstr ""
+#~ " -h FICHERO Verdadero si el fichero es un enlace simbólico. Use "
+#~ "\"-L\"."
+
+#~ msgid " -L FILE True if file is a symbolic link."
+#~ msgstr " -L FICHERO Verdadero si el fichero es un enlace simbólico."
+
+#~ msgid " -k FILE True if file has its \"sticky\" bit set."
+#~ msgstr ""
+#~ " -k FICHERO Verdadero si el fichero tiene el bit \"sticky\" "
+#~ "activado."
+
+#~ msgid " -p FILE True if file is a named pipe."
+#~ msgstr " -p FICHERO Verdadero si el fichero es una tubería nombrada."
+
+#~ msgid " -r FILE True if file is readable by you."
+#~ msgstr " -r FICHERO Verdadero si usted puede leer el fichero."
+
+#~ msgid " -s FILE True if file exists and is not empty."
+#~ msgstr " -s FICHERO Verdadero si el fichero existe y no está vacío."
+
+#~ msgid " -S FILE True if file is a socket."
+#~ msgstr " -S FICHERO Verdadero si el fichero es un `socket'."
+
+#~ msgid " -t FD True if FD is opened on a terminal."
+#~ msgstr " -t DF Verdadero si DF está abierto en una terminal."
+
+#~ msgid " -u FILE True if the file is set-user-id."
+#~ msgstr ""
+#~ " -u FICHERO Verdadero si el fichero tiene activado el set-user-id."
+
+#~ msgid " -w FILE True if the file is writable by you."
+#~ msgstr " -w FICHERO Verdadero si usted puede modificar el fichero."
+
+#~ msgid " -x FILE True if the file is executable by you."
+#~ msgstr " -x FICHERO Verdadero si usted puede ejecutar el fichero."
+
+#~ msgid " -O FILE True if the file is effectively owned by you."
+#~ msgstr ""
+#~ " -O FICHERO Verdadero si usted efectivamente posee el fichero."
+
+#~ msgid ""
+#~ " -G FILE True if the file is effectively owned by your group."
+#~ msgstr ""
+#~ " -G FICHERO Verdadero si su grupo efectivamente posee el fichero."
+
+#~ msgid " FILE1 -nt FILE2 True if file1 is newer than (according to"
+#~ msgstr ""
+#~ " FICH1 -nt FICH2 Verdadero si fich1 es más nuevo que (de acuerdo a"
+
+#~ msgid " modification date) file2."
+#~ msgstr " la fecha de modificación) el fich2."
+
+#~ msgid " FILE1 -ot FILE2 True if file1 is older than file2."
+#~ msgstr " FICH1 -ot FICH2 Verdadero si fich1 es más viejo que fich2."
+
+#~ msgid " FILE1 -ef FILE2 True if file1 is a hard link to file2."
+#~ msgstr " FICH1 -ef FICH2 Verdadero si fich1 es un enlace duro a fich2."
+
+#~ msgid "String operators:"
+#~ msgstr "Operadores de cadenas:"
+
+#~ msgid " -z STRING True if string is empty."
+#~ msgstr " -z CADENA Verdadero si la cadena está vacía."
+
+#~ msgid " -n STRING"
+#~ msgstr " -n CADENA"
+
+#~ msgid " STRING True if string is not empty."
+#~ msgstr " CADENA Verdadero si la cadena no está vacía."
+
+#~ msgid " STRING1 = STRING2"
+#~ msgstr " CADENA1 = CADENA2"
+
+#~ msgid " True if the strings are equal."
+#~ msgstr " Verdadero si las cadenas son iguales."
+
+#~ msgid " STRING1 != STRING2"
+#~ msgstr " CADENA1 != CADENA2"
+
+#~ msgid " True if the strings are not equal."
+#~ msgstr " Verdadero si las cadenas no son iguales."
+
+#~ msgid " STRING1 < STRING2"
+#~ msgstr " CADENA1 < CADENA2"
+
+#~ msgid ""
+#~ " True if STRING1 sorts before STRING2 lexicographically"
+#~ msgstr ""
+#~ " Verdadero si la CADENA1 se ordena antes que la CADENA2 "
+#~ "lexicográficamente"
+
+#~ msgid " STRING1 > STRING2"
+#~ msgstr " CADENA1 > CADENA2"
+
+#~ msgid ""
+#~ " True if STRING1 sorts after STRING2 lexicographically"
+#~ msgstr ""
+#~ " Verdadero si la CADENA1 se ordena después que la "
+#~ "CADENA2 lexicográficamente"
+
+#~ msgid "Other operators:"
+#~ msgstr "Otros operadores:"
+
+#~ msgid " ! EXPR True if expr is false."
+#~ msgstr " ! EXPR Verdadero si la expr es falsa"
+
+#~ msgid " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true."
+#~ msgstr " EXPR1 -a EXPR2 Verdadero si ambas expr1 Y expr2 son verdaderas."
+
+#~ msgid " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true."
+#~ msgstr ""
+#~ " EXPR1 -o EXPR2 Verdadero si cualquiera de expr1 O expr2 es verdadera."
+
+#~ msgid " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,"
+#~ msgstr " arg1 OP arg2 Pruebas aritméticas. OP es uno de -eq, -ne,"
+
+#~ msgid " -lt, -le, -gt, or -ge."
+#~ msgstr " -lt, -le, -gt, ó -ge."
+
+#~ msgid "Arithmetic binary operators return true if ARG1 is equal, not-equal,"
+#~ msgstr ""
+#~ "Los operadores binarios aritméticos devuelven verdadero si ARG1 es igual, "
+#~ "no igual,"
+
+#~ msgid ""
+#~ "less-than, less-than-or-equal, greater-than, or greater-than-or-equal"
+#~ msgstr "menor, menor o igual, mayor, ó mayor o igual"
+
+#~ msgid "than ARG2."
+#~ msgstr "que ARG2."
+
+#~ msgid "This is a synonym for the \"test\" builtin, but the last"
+#~ msgstr "Es un sinónimo para la orden interna \"test\", pero el último"
+
+#~ msgid "the shell."
+#~ msgstr "ejecutados desde el shell."
+
+#~ msgid "The command ARG is to be read and executed when the shell receives"
+#~ msgstr "La orden ARG se lee y ejecuta cuando el shell recibe la(s)"
+
+#~ msgid "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are"
+#~ msgstr ""
+#~ "señal(es) ID_SEÑAL. Si ARG no está, todas las señales especificadas son"
+
+#~ msgid "reset to their original values. If ARG is the null string each"
+#~ msgstr ""
+#~ "establecidas a sus valores originales. Si ARG es la cadena nula cada"
+
+#~ msgid "SIGNAL_SPEC is ignored by the shell and by the commands it invokes."
+#~ msgstr "ID_SEÑAL es ignorada por el shell y por las órdenes que invoque."
+
+#~ msgid "If SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from"
+#~ msgstr "Si ID_SEÑAL es EXIT (0) la orden ARG se ejecuta al terminar el"
+
+#~ msgid "the shell. If SIGNAL_SPEC is DEBUG, ARG is executed after every"
+#~ msgstr "shell. Si ID_SEÑAL es DEBUG, ARG se ejecuta después de cada"
+
+#~ msgid "command. If ARG is `-p' then the trap commands associated with"
+#~ msgstr "orden. Si ARG es `-p' entonces se muestran las órdenes de captura"
+
+#~ msgid "each SIGNAL_SPEC are displayed. If no arguments are supplied or if"
+#~ msgstr "asociadas con cada ID_SEÑAL. Si no se proporcionan argumentos o si"
+
+#~ msgid "only `-p' is given, trap prints the list of commands associated with"
+#~ msgstr ""
+#~ "sólo se proporciona `-p', trap muestra la lista de órdenes asociadas"
+
+#~ msgid ""
+#~ "each signal number. SIGNAL_SPEC is either a signal name in <signal.h>"
+#~ msgstr ""
+#~ "con cada número de señal. ID_SEÑAL es un nombre de señal en <signal.h>"
+
+#~ msgid ""
+#~ "or a signal number. `trap -l' prints a list of signal names and their"
+#~ msgstr ""
+#~ "o un número de señal. `trap -l' muestra una lista de nombres de señal y "
+#~ "sus"
+
+#~ msgid "corresponding numbers. Note that a signal can be sent to the shell"
+#~ msgstr ""
+#~ "números correspondientes. Note que una señal se puede enviar al shell"
+
+#~ msgid "with \"kill -signal $$\"."
+#~ msgstr "con \"kill -signal $$\"."
+
+#~ msgid "For each NAME, indicate how it would be interpreted if used as a"
+#~ msgstr "Para cada NOMBRE, indica cómo sería interpretada si se usara como"
+
+#~ msgid "If the -t option is used, returns a single word which is one of"
+#~ msgstr "Si se usa la opción -t, regresa una sola palabra que es una de"
+
+#~ msgid ""
+#~ "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an"
+#~ msgstr ""
+#~ "`alias', `keyword', `function', `builtin', `file' ó `', si el NOMBRE es un"
+
+#~ msgid ""
+#~ "alias, shell reserved word, shell function, shell builtin, disk file,"
+#~ msgstr ""
+#~ "alias, palabra reservada del shell, función del shell, orden interna del "
+#~ "shell, fichero del disco,"
+
+#~ msgid "or unfound, respectively."
+#~ msgstr "o no encontrada, respectivamente."
+
+#~ msgid "If the -p flag is used, either returns the name of the disk file"
+#~ msgstr ""
+#~ "Si se usa el indicador -p, regresa el nombre del fichero del sistema"
+
+#~ msgid "that would be executed, or nothing if -t would not return `file'."
+#~ msgstr "que sería ejecutado, o nada si -t no regresa algún `fichero'."
+
+#~ msgid "If the -a flag is used, displays all of the places that contain an"
+#~ msgstr ""
+#~ "Si se usa el indicador -a, muestra todos los lugares que contienen un"
+
+#~ msgid ""
+#~ "executable named `file'. This includes aliases and functions, if and"
+#~ msgstr ""
+#~ "ejecutable llamado `fichero' Esto incluye a aliases y funciones, si y"
+
+#~ msgid "only if the -p flag is not also used."
+#~ msgstr "sólo si el indicador -p no se especifica también."
+
+#~ msgid "Type accepts -all, -path, and -type in place of -a, -p, and -t,"
+#~ msgstr "Type acepta -all, -path, y -type en lugar de -a, -p, y -t,"
+
+#~ msgid "respectively."
+#~ msgstr "respectivamente."
+
+#~ msgid "Ulimit provides control over the resources available to processes"
+#~ msgstr ""
+#~ "ulimit provee control sobre los recursos disponibles para los procesos"
+
+#~ msgid "started by the shell, on systems that allow such control. If an"
+#~ msgstr ""
+#~ "iniciados por el shell, en sistemas que permiten dicho control. Si se"
+
+#~ msgid "option is given, it is interpreted as follows:"
+#~ msgstr "establece una opción, se interpreta como sigue:"
+
+#~ msgid " -S\tuse the `soft' resource limit"
+#~ msgstr " -S\tusa el límite de recurso `suave'"
+
+#~ msgid " -H\tuse the `hard' resource limit"
+#~ msgstr " -H\tusa el límite de recurso `duro'"
+
+#~ msgid " -a\tall current limits are reported"
+#~ msgstr " -a\tse muestran todos los límites actuales"
+
+#~ msgid " -c\tthe maximum size of core files created"
+#~ msgstr " -c\tel tamaño máximo de los ficheros `core' creados"
+
+#~ msgid " -d\tthe maximum size of a process's data segment"
+#~ msgstr " -d\tel tamaño máximo del segmento de datos de un proceso"
+
+#~ msgid " -m\tthe maximum resident set size"
+#~ msgstr " -m\tel tamaño máximo para las variables residentes"
+
+#~ msgid " -s\tthe maximum stack size"
+#~ msgstr " -s\tel tamaño máximo de la pila"
+
+#~ msgid " -t\tthe maximum amount of cpu time in seconds"
+#~ msgstr " -t\tla cantidad máxima de tiempo de cpu en segundos"
+
+#~ msgid " -f\tthe maximum size of files created by the shell"
+#~ msgstr " -f\tel número máximo de ficheros creados por el shell"
+
+#~ msgid " -p\tthe pipe buffer size"
+#~ msgstr " -p\tel tamaño del almacenamiento intermedio para tuberías"
+
+#~ msgid " -n\tthe maximum number of open file descriptors"
+#~ msgstr " -n\tel número máximo de descriptores de fichero abiertos"
+
+#~ msgid " -u\tthe maximum number of user processes"
+#~ msgstr " -u\tel número máximo de procesos de usuario"
+
+#~ msgid " -v\tthe size of virtual memory"
+#~ msgstr " -v\tel tamaño de la memoria virtual"
+
+#~ msgid "If LIMIT is given, it is the new value of the specified resource."
+#~ msgstr ""
+#~ "Si se establece el LÍMITE, este es el nuevo valor del recurso "
+#~ "especificado."
+
+#~ msgid "Otherwise, the current value of the specified resource is printed."
+#~ msgstr ""
+#~ "De otra forma, se muestra la lista actual de los recursos especificados."
+
+#~ msgid "If no option is given, then -f is assumed. Values are in 1k"
+#~ msgstr ""
+#~ "Si no se establece una opción, entonces se asume -f. Los valores son en "
+#~ "incrementos"
+
+#~ msgid "increments, except for -t, which is in seconds, -p, which is in"
+#~ msgstr "de 1k, excepto para -t, que es en segundos, -p, que es en"
+
+#~ msgid "increments of 512 bytes, and -u, which is an unscaled number of"
+#~ msgstr "incrementos de 512 bytes, y -u, que es un número no escalado de"
+
+#~ msgid "processes."
+#~ msgstr "procesos."
+
+#~ msgid ""
+#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if"
+#~ msgstr ""
+#~ "La máscara de creación de ficheros del usuario se establece a MODO. Si "
+#~ "se omite el MODO, o si"
+
+#~ msgid ""
+#~ "`-S' is supplied, the current value of the mask is printed. The `-S'"
+#~ msgstr ""
+#~ "se proporciona `-S', se muestra el valor actual de la máscara. La opción"
+
+#~ msgid ""
+#~ "option makes the output symbolic; otherwise an octal number is output."
+#~ msgstr ""
+#~ "`-S' logra una salida simbólica; de otra forma la salida es un número "
+#~ "octal."
+
+#~ msgid "If MODE begins with a digit, it is interpreted as an octal number,"
+#~ msgstr ""
+#~ "Si el MODO comienza con un dígito, se interpreta como un número octal,"
+
+#~ msgid ""
+#~ "otherwise it is a symbolic mode string like that accepted by chmod(1)."
+#~ msgstr ""
+#~ "de otra forma es una cadena de modo simbólico como la aceptada por chmod"
+#~ "(1)."
+
+#~ msgid ""
+#~ "Wait for the specified process and report its termination status. If"
+#~ msgstr "Espera al proceso especificado y reporta su estado final. Si no se"
+
+#~ msgid "N is not given, all currently active child processes are waited for,"
+#~ msgstr ""
+#~ "proporciona N, espera a todos los procesos hijo activos actualmente,"
+
+#~ msgid "and the return code is zero. N may be a process ID or a job"
+#~ msgstr ""
+#~ "y el código de regreso es cero. N puede ser un ID de proceso o una "
+#~ "especificación"
+
+#~ msgid "specification; if a job spec is given, all processes in the job's"
+#~ msgstr ""
+#~ "de trabajo; si se proporciona una especificación de trabajo, se espera a "
+#~ "todos los procesos en la"
+
+#~ msgid "pipeline are waited for."
+#~ msgstr "línea de ejecución del trabajo."
+
+#~ msgid "and the return code is zero. N is a process ID; if it is not given,"
+#~ msgstr ""
+#~ "y el código de regreso es cero. N es un ID de proceso; si no se "
+#~ "proporcioan,"
+
+#~ msgid "all child processes of the shell are waited for."
+#~ msgstr "espera a todos los procesos hijos del shell."
+
+#~ msgid "The `for' loop executes a sequence of commands for each member in a"
+#~ msgstr ""
+#~ "El ciclo `for' ejecuta una secuencia de órdenes para cada miembro en una"
+
+#~ msgid ""
+#~ "list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is"
+#~ msgstr ""
+#~ "lista de elementos. Si `in PALABRAS ...;' no se encuentra, entonces se "
+#~ "asume"
+
+#~ msgid ""
+#~ "assumed. For each element in WORDS, NAME is set to that element, and"
+#~ msgstr ""
+#~ "`in \"$@\"'. Para cada elemento en PALABRAS, se establece NOMBRE a ese "
+#~ "elemento y"
+
+#~ msgid "the COMMANDS are executed."
+#~ msgstr "se ejecutan las ÓRDENES."
+
+#~ msgid "The WORDS are expanded, generating a list of words. The"
+#~ msgstr "Las PALABRAS se expanden, generando una lista de palabras. El"
+
+#~ msgid "set of expanded words is printed on the standard error, each"
+#~ msgstr ""
+#~ "conjunto de palabras expandidas se muestra en la salida de error estándar"
+
+#~ msgid "preceded by a number. If `in WORDS' is not present, `in \"$@\"'"
+#~ msgstr ""
+#~ "cada una precedida por un número. Si `in PALABRAS' no se encuentra, se "
+#~ "asume"
+
+#~ msgid "is assumed. The PS3 prompt is then displayed and a line read"
+#~ msgstr "`in \"$@\"'. El prompt PS3 se muestra y se lee una línea de"
+
+#~ msgid "from the standard input. If the line consists of the number"
+#~ msgstr "la entrada estándar. Si la línea consiste del número"
+
+#~ msgid "corresponding to one of the displayed words, then NAME is set"
+#~ msgstr ""
+#~ "correspondiente a una de las palabras mostradas, entonces se establece "
+#~ "NOMBRE"
+
+#~ msgid "to that word. If the line is empty, WORDS and the prompt are"
+#~ msgstr "a esa palabra. Si la línea está vacía, se muestran de nuevo"
+
+#~ msgid "redisplayed. If EOF is read, the command completes. Any other"
+#~ msgstr ""
+#~ "las PALABRAS y el prompt. Si se lee EOF, la orden se completa. Cualquier "
+#~ "otro"
+
+#~ msgid "value read causes NAME to be set to null. The line read is saved"
+#~ msgstr "valor leído causa que NOMBRE sea nulo. La línea leída se salva en"
+
+#~ msgid "in the variable REPLY. COMMANDS are executed after each selection"
+#~ msgstr ""
+#~ "la variable REPLY. Las ÓRDENES se ejecutan después de cada selección"
+
+#~ msgid "until a break or return command is executed."
+#~ msgstr "hasta que se ejecute una orden break ó return."
+
+#~ msgid "`|' is used to separate multiple patterns."
+#~ msgstr "`|' se usa para separar plantillas múltiples."
+
+#~ msgid ""
+#~ "The if COMMANDS are executed. If the exit status is zero, then the then"
+#~ msgstr ""
+#~ "Las ÓRDENES if se ejecutan. Si el código de regreso es cero, entonces "
+#~ "las ÓRDENES"
+
+#~ msgid ""
+#~ "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed"
+#~ msgstr ""
+#~ "then se ejecutan. De otra forma, cada uno de las ÓRDENES elif se ejecutan"
+
+#~ msgid ""
+#~ "in turn, and if the exit status is zero, the corresponding then COMMANDS"
+#~ msgstr ""
+#~ "en turno, y si el código de regreso es cero, las ÓRDENES then "
+#~ "correspondientes"
+
+#~ msgid ""
+#~ "are executed and the if command completes. Otherwise, the else COMMANDS"
+#~ msgstr ""
+#~ "se ejecutan y la orden if se completa. De otra forma, las ÓRDENES else"
+
+#~ msgid ""
+#~ "are executed, if present. The exit status is the exit status of the last"
+#~ msgstr ""
+#~ "se ejecutan, si se encuentran. El código de salida es el código de "
+#~ "salida de la última"
+
+#~ msgid "command executed, or zero if no condition tested true."
+#~ msgstr "orden ejecutada, o cero si ninguna condición probada fue verdadera."
+
+#~ msgid "`while' COMMANDS has an exit status of zero."
+#~ msgstr "`while' tenga un código de salida de cero."
+
+#~ msgid "`until' COMMANDS has an exit status which is not zero."
+#~ msgstr "`until' tenga un código de salida que no sea cero."
+
+#~ msgid "Create a simple command invoked by NAME which runs COMMANDS."
+#~ msgstr ""
+#~ "Crea un comando simple invocado por el NOMBRE que ejecuta las ÓRDENES."
+
+#~ msgid "Arguments on the command line along with NAME are passed to the"
+#~ msgstr ""
+#~ "Los argumentos en la línea de comando junto con el NOMBRE se pasan a la"
+
+#~ msgid "function as $0 .. $n."
+#~ msgstr "función como $0 .. $n."
+
+#~ msgid "entire set of commands."
+#~ msgstr "conjunto completo de órdenes"
+
+#~ msgid "This is similar to the `fg' command. Resume a stopped or background"
+#~ msgstr ""
+#~ "Esto es similar a la orden `fg'. Reinicia un trabajo detenido o en el"
+
+#~ msgid "job. If you specifiy DIGITS, then that job is used. If you specify"
+#~ msgstr ""
+#~ "background. Si especifica DÍGITOS, entonces se usa ese trabajo. Si "
+#~ "proporciona"
+
+#~ msgid ""
+#~ "WORD, then the job whose name begins with WORD is used. Following the"
+#~ msgstr ""
+#~ "una PALABRA, entonces se usa el trabajo cuyo nombre comience con PALABRA."
+
+#~ msgid "job specification with a `&' places the job in the background."
+#~ msgstr ""
+#~ "Al colocar una especificación de trabajo seguido de un `&', se coloca al "
+#~ "trabajo en el background. "
+
+#~ msgid "BASH_VERSION The version numbers of this Bash."
+#~ msgstr "BASH_VERSION Los números de versión de este Bash."
+
+#~ msgid "CDPATH A colon separated list of directories to search"
+#~ msgstr "CDPATH Una lista separada por `:' de directorios a buscar"
+
+#~ msgid "\t\twhen the argument to `cd' is not found in the current"
+#~ msgstr "\t\tcuando el argumento para `cd' no se encuentra en el directorio"
+
+#~ msgid "\t\tdirectory."
+#~ msgstr "\t\tactual."
+
+#~ msgid ""
+#~ "HISTFILE The name of the file where your command history is stored."
+#~ msgstr ""
+#~ "HISTFILE El nombre del fichero donde se guarda la historia de "
+#~ "órdenes."
+
+#~ msgid "HISTFILESIZE The maximum number of lines this file can contain."
+#~ msgstr ""
+#~ "HISTFILESIZE El número máximo de líneas que este fichero puede "
+#~ "contener."
+
+#~ msgid "HISTSIZE The maximum number of history lines that a running"
+#~ msgstr "HISTSIZE El número máximo de líneas de historia que un shell"
+
+#~ msgid "\t\tshell can access."
+#~ msgstr "\t\ten ejecución puede acceder."
+
+#~ msgid "HOME The complete pathname to your login directory."
+#~ msgstr ""
+#~ "HOME La ruta completa a su directorio de entrada (login)."
+
+#~ msgid ""
+#~ "HOSTTYPE The type of CPU this version of Bash is running under."
+#~ msgstr ""
+#~ "HOSTTYPE El tipo de CPU bajo el cual esta versión de Bash corre."
+
+#~ msgid ""
+#~ "IGNOREEOF Controls the action of the shell on receipt of an EOF"
+#~ msgstr ""
+#~ "IGNOREEOF Controla la acción del shell al recibir un carácter EOF"
+
+#~ msgid "\t\tcharacter as the sole input. If set, then the value"
+#~ msgstr "\t\tcomo la única entrada. Si se establece, entonces el valor"
+
+#~ msgid "\t\tof it is the number of EOF characters that can be seen"
+#~ msgstr ""
+#~ "\t\tde esta variable es el número de caracteres EOF que se pueden recibir"
+
+#~ msgid "\t\tin a row on an empty line before the shell will exit"
+#~ msgstr ""
+#~ "\t\ten forma seguida en una línea vacía antes de que el shell termine"
+
+#~ msgid "\t\t(default 10). When unset, EOF signifies the end of input."
+#~ msgstr ""
+#~ "\t\t(10 por omisión). Cuando se desactiva, EOF significa el fin de la "
+#~ "entrada."
+
+#~ msgid "MAILCHECK\tHow often, in seconds, Bash checks for new mail."
+#~ msgstr ""
+#~ "MAILCHECK\tQue tan seguido, en segundos, Bash revisa si hay correo nuevo."
+
+#~ msgid "MAILPATH\tA colon-separated list of filenames which Bash checks"
+#~ msgstr ""
+#~ "MAILPATH\tUna lista de nombres de fichero separados por dos puntos que "
+#~ "Bash revisa"
+
+#~ msgid "\t\tfor new mail."
+#~ msgstr "\t\tpor correo nuevo."
+
+#~ msgid "OSTYPE\t\tThe version of Unix this version of Bash is running on."
+#~ msgstr ""
+#~ "OSTYPE\t\tLa versión de Unix bajo la cual esta versión de Bash se ejecuta."
+
+#~ msgid "PATH A colon-separated list of directories to search when"
+#~ msgstr ""
+#~ "PATH Una lista de directorios separada por dos puntos para "
+#~ "buscar"
+
+#~ msgid "\t\tlooking for commands."
+#~ msgstr "\t\tcuando se requieren órdenes."
+
+#~ msgid "PROMPT_COMMAND A command to be executed before the printing of each"
+#~ msgstr "PROMPT_COMMAND Una orden a ejecutar antes de mostrar cada"
+
+#~ msgid "\t\tprimary prompt."
+#~ msgstr "\t\tprompt primario."
+
+#~ msgid "PS1 The primary prompt string."
+#~ msgstr "PS1 La cadena primaria de prompt."
+
+#~ msgid "PS2 The secondary prompt string."
+#~ msgstr "PS2 La cadena secundaria de prompt."
+
+#~ msgid "TERM The name of the current terminal type."
+#~ msgstr "TERM El nombre del tipo de terminal actual."
+
+#~ msgid "auto_resume Non-null means a command word appearing on a line by"
+#~ msgstr ""
+#~ "auto_resume Si no es nulo significa que una palabra de orden que "
+#~ "aparece en una línea"
+
+#~ msgid "\t\titself is first looked for in the list of currently"
+#~ msgstr "\t\tpor sí mismo se busca primero en la lista de trabajos detenidos"
+
+#~ msgid "\t\tstopped jobs. If found there, that job is foregrounded."
+#~ msgstr ""
+#~ "\t\tactualmente. Si se encuentra ahí, ese trabajo se trae a primer plano."
+
+#~ msgid "\t\tA value of `exact' means that the command word must"
+#~ msgstr "\t\tEl valor `exact' significa que la palabra de la orden debe"
+
+#~ msgid "\t\texactly match a command in the list of stopped jobs. A"
+#~ msgstr ""
+#~ "\t\tcoincidir exactamente con una orden en la lista de trabajos "
+#~ "detenidos. El"
+
+#~ msgid "\t\tvalue of `substring' means that the command word must"
+#~ msgstr "\t\tvalor `substring' significa que la palabra de la orden debe"
+
+#~ msgid "\t\tmatch a substring of the job. Any other value means that"
+#~ msgstr ""
+#~ "\t\tcoincidir con una subcadena del trabajo. Cualquier otro valor "
+#~ "significa que"
+
+#~ msgid "\t\tthe command must be a prefix of a stopped job."
+#~ msgstr "\t\tla orden debe ser un prefijo de un trabajo detenido."
+
+#~ msgid "command_oriented_history"
+#~ msgstr "command_oriented_history"
+
+#~ msgid ""
+#~ " Non-null means to save multiple-line commands together on"
+#~ msgstr ""
+#~ " Si no es nulo significa que debe guardar órdenes de "
+#~ "varias líneas juntas en"
+
+#~ msgid " a single history line."
+#~ msgstr " una sola línea de historia."
+
+#~ msgid "histchars Characters controlling history expansion and quick"
+#~ msgstr ""
+#~ "histchars Caracteres que controlan la expansión de la historia y la"
+
+#~ msgid "\t\tsubstitution. The first character is the history"
+#~ msgstr "\t\tsustitución rápida. El primer carácter es el carácter de"
+
+#~ msgid "\t\tsubstitution character, usually `!'. The second is"
+#~ msgstr "\t\tsustutución de historia, generalmente `!'. El segundo es"
+
+#~ msgid "\t\tthe `quick substitution' character, usually `^'. The"
+#~ msgstr "\t\tel carácter de `sustitución rápida', generalmente `^'. El"
+
+#~ msgid "\t\tthird is the `history comment' character, usually `#'."
+#~ msgstr ""
+#~ "\t\ttercero es el carácter de `comentario de historia', generalmente `#'."
+
+#~ msgid "HISTCONTROL\tSet to a value of `ignorespace', it means don't enter"
+#~ msgstr ""
+#~ "HISTCONTROL\tEstablecido con el valor `ignorespace', significa que no "
+#~ "agrega"
+
+#~ msgid "\t\tlines which begin with a space or tab on the history"
+#~ msgstr "\t\tlíneas que inicien con un espacio o tabulador a la lista de"
+
+#~ msgid "\t\tlist. Set to a value of `ignoredups', it means don't"
+#~ msgstr "\t\thistoria. Con el valor `ignoredups', significa que no agrega"
+
+#~ msgid "\t\tenter lines which match the last entered line. Set to"
+#~ msgstr "\t\tlíneas que coincidan con la última línea introducida. Con"
+
+#~ msgid "\t\t`ignoreboth' means to combine the two options. Unset,"
+#~ msgstr ""
+#~ "\t\t`ignoreboth' significa que combina las dos opciones. Sin establecer,"
+
+#~ msgid "\t\tor set to any other value than those above means to save"
+#~ msgstr ""
+#~ "\t\to con cualquier otro valor diferente a los arriba mencionados "
+#~ "significa"
+
+#~ msgid "\t\tall lines on the history list."
+#~ msgstr "\t\tguardar todas las líneas en la lista de la historia."
+
+#~ msgid "Toggle the values of variables controlling optional behavior."
+#~ msgstr ""
+#~ "Cambia los valores de las variables que controlan conductas opcionales."
+
+#~ msgid "The -s flag means to enable (set) each OPTNAME; the -u flag"
+#~ msgstr ""
+#~ "El indicador -s significa establecer cada NOMBRE_OPCIÓN; el indicador -u"
+
+#~ msgid "unsets each OPTNAME. The -q flag suppresses output; the exit"
+#~ msgstr ""
+#~ "borra cada NOMBRE_OPCIÓN. El indicador -q suprime la salida; el estado"
+
+#~ msgid "status indicates whether each OPTNAME is set or unset. The -o"
+#~ msgstr "de salida indica cuál NOMBRE_OPCIÓN está activado o no. La opción"
+
+#~ msgid "option restricts the OPTNAMEs to those defined for use with"
+#~ msgstr ""
+#~ "-o restringe a los NOMBRE_OPCIONes a aquéllos definidos para su uso con"
+
+#~ msgid "`set -o'. With no options, or with the -p option, a list of all"
+#~ msgstr ""
+#~ "`set -o'. Sin opciones, o con la opción -p, se muestra una lista de"
+
+#~ msgid "settable options is displayed, with an indication of whether or"
+#~ msgstr "todas las opciones activables, con una indicación de si se puede"
+
+#~ msgid "not each is set."
+#~ msgstr "o no activar cada una."
diff --git a/po/et.gmo b/po/et.gmo
new file mode 100644
index 0000000..779307f
--- /dev/null
+++ b/po/et.gmo
Binary files differ
diff --git a/po/et.po b/po/et.po
new file mode 100644
index 0000000..2fbdb4b
--- /dev/null
+++ b/po/et.po
@@ -0,0 +1,3941 @@
+# Estonian translations for GNU bash.
+# Copyright (C) 2001 Free Software Foundation, Inc.
+# Toomas Soome <Toomas.Soome@microlink.ee>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bash 3.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2006-11-11 16:38+0200\n"
+"Last-Translator: Toomas Soome <Toomas.Soome@microlink.ee>\n"
+"Language-Team: Estonian <et@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-15\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "vigane massiivi indeks"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr ""
+
+#: arrayfunc.c:480
+#, fuzzy, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: vigane tegevuse nimi"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: mitte-numbrilisele indeksile ei saa omistada"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: ei saa luua: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: esimine mitte-tühemik sümbol pole `\"'"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "sulgev `%c' puudub %s sees"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: puudub eraldav koolon"
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "%s: vigane tegevuse nimi"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr ""
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr ""
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: ei saa lugeda: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "`%s': ei saa lahti siduda"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "`%s': tundmatu funktsiooni nimi"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s ei ole seotud ühegi klahviga.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s saab kasutada läbi "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr ""
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "omab mõtet ainult `for', `while' või `until' tsüklis"
+
+#: builtins/caller.def:133
+#, fuzzy
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr "Tagastab jooksva alamprotseduuri konteksti."
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "HOME pole seatud"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "OLDPWD pole seatud"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr ""
+
+#: builtins/common.c:139 error.c:261
+#, fuzzy, c-format
+msgid "warning: "
+msgstr "%s: hoiatus: "
+
+#: builtins/common.c:153
+#, fuzzy, c-format
+msgid "%s: usage: "
+msgstr "%s: hoiatus: "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "liiga palju argumente"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: võti nõuab argumenti"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: nõutakse numbrilist argumenti"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: ei leitud"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: vigane võti"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: vigane võtme nimi"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "`%s': ei ole lubatud identifikaator"
+
+#: builtins/common.c:238
+#, fuzzy
+msgid "invalid octal number"
+msgstr "vigane signaali number"
+
+#: builtins/common.c:240
+#, fuzzy
+msgid "invalid hex number"
+msgstr "vigane number"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "vigane number"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: vigane signaali spetsifikatsioon"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "`%s': ei ole pid ega korrektne töö spetsifikatsioon"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: mittemuudetav muutuja"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s on piiridest väljas"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "argument"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s on piiridest väljas"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: sellist tööd pole"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: töökontroll puudub"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "töökontroll puudub"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: piiratud"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "piiratud"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: ei ole sisekäsk"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "kirjutamise viga: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr ""
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: segane töö"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: vigane tegevuse nimi"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr ""
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "hoiatus: võti -F ei pruugi töötada nagu te ootate"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "hoiatus: võti -C ei pruugi töötada nagu te ootate"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr ""
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "saab kasutada ainult funktsioonis"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "võtit `-f' ei saa funktsiooni loomiseks kasutada"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: funktsioon ei ole muudetav"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: masiivi muutujaid ei saa nii kustutada"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "dünaamilist laadimist et saa kasutada"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "jagatud objekti %s ei saa avada: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "%s puudub jagatud objektis %s: %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: pole dünaamiliselt laetud"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: ei saa kustutada: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: on kataloog"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: ei ole tavaline fail"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: fail on liiga suur"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: kahendfaili ei õnnestu käivitada"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: ei saa käivitada: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr ""
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "pole login shell: kasutage `exit'"
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "Teil on peatatud töid.\n"
+
+#: builtins/exit.def:122
+#, fuzzy, c-format
+msgid "There are running jobs.\n"
+msgstr "Teil on peatatud töid.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "käsku ei ole"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr ""
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: ajutist faili ei saa avada: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr ""
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr ""
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: lubamatu võti -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: võti nõuab argumenti -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr ""
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr ""
+
+#: builtins/hash.def:244
+#, fuzzy, c-format
+msgid "hits\tcommand\n"
+msgstr "viimane käsklus: %s\n"
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] ""
+msgstr[1] ""
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: ei saa avada: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr ""
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr ""
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr ""
+
+#: builtins/inlib.def:71
+#, fuzzy, c-format
+msgid "%s: inlib failed"
+msgstr "%s: vigane teenus"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr ""
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr ""
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Tundmatu viga"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "oodati avaldist"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: pole massiiv"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr ""
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr ""
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, fuzzy, c-format
+msgid "%s: invalid line count"
+msgstr "%s: vigane võti"
+
+#: builtins/mapfile.def:277
+#, fuzzy, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: vigane võti"
+
+#: builtins/mapfile.def:294
+#, fuzzy, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: vigane tegevuse nimi"
+
+#: builtins/mapfile.def:326
+#, fuzzy
+msgid "empty array variable name"
+msgstr "%s: pole massiiv"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr ""
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr ""
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr ""
+
+#: builtins/printf.def:578
+#, fuzzy, c-format
+msgid "warning: %s: %s"
+msgstr "%s: hoiatus: "
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr ""
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "teist kataloogi pole"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<jooksev kataloog puudub>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr ""
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr ""
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr ""
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "viga lugemisel: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr ""
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: ei saa eemaldada"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: ei saa eemaldada: %s on ainult lugemiseks"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: pole massiiv"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: ei ole funktsioon"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "shift arv"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr ""
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr ""
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr ""
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: faili ei ole"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "peatamine ei õnnestu"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "login shelli ei saa peatada"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr ""
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s on shelli võtmesõna\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s: on funktsioon\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "%s on shelli sisekäsk\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s on %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr ""
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr ""
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "`%c': halb käsklus"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: ei õnnestu lugeda piirangut: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr ""
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: ei õnnestu muuta piirangut: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "kaheksandnumber"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr ""
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr ""
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr ""
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "viimane käsklus: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "Katkestan..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "tundmatu viga käsus"
+
+#: error.c:407
+msgid "bad command type"
+msgstr ""
+
+#: error.c:408
+msgid "bad connector"
+msgstr ""
+
+#: error.c:409
+msgid "bad jump"
+msgstr ""
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: sidumata muutuja"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr ""
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr ""
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr ""
+
+#: execute_cmd.c:2075
+#, fuzzy
+msgid "pipe error"
+msgstr "kirjutamise viga: %s"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: piiratud: käskudes ei saa kasutada sümboleid `/'"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: käsku ei ole"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: halb interpretaator"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr ""
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "avaldise rekursioon on liiga sügav"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr ""
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "süntaksi viga avaldises"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "üritati omistada mitte-muutujale"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "nulliga jagamine"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr ""
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr ""
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "eksponent on väiksem kui 0"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr ""
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "puudub `)'"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "süntaksi viga: oodati operandi"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "süntaksi viga: vigane aritmeetiline operaator"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr ""
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "vigane aritmeetiline baas"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "väärtus on baasiks liiga suur"
+
+#: expr.c:1329
+#, fuzzy, c-format
+msgid "%s: expression error\n"
+msgstr "%s: oodati täisarvude avaldist"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getcwd: vanemkataloogidele ei ole juurdepääsu"
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr ""
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr ""
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr ""
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr ""
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr ""
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr ""
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr ""
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: %ld: pid puudub"
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr ""
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr ""
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr ""
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr ""
+
+#: jobs.c:1443
+msgid "Running"
+msgstr ""
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr ""
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr ""
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr ""
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr ""
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr ""
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr ""
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr ""
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr ""
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job: töö %d on peatatud"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: töö on lõpetatud"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: töö %d on juba taustal"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, fuzzy, c-format
+msgid "%s: line %d: "
+msgstr "%s: hoiatus: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr ""
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr ""
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr ""
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr ""
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr ""
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr ""
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr ""
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:313
+#, fuzzy
+msgid "unknown"
+msgstr "%s: tundmatu masin"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr ""
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr ""
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr ""
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr ""
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "vigane baas"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: tundmatu masin"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: vigane teenus"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr ""
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr ""
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:249
+#, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr ""
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Teil on kiri kaustas $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Teil on uus kiri kaustas $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "Kiri kaustas %s on loetud\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "süntaksi viga: nõutakse aritmeetilist avaldist"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "süntaksi viga: ootamatu `;'"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "süntaksi viga: `((%s))'"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr ""
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr ""
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr ""
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr ""
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr ""
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "süntaksi viga tingimuslikus avaldises"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "ootamatu märk `%s', oodati `)'"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "oodati `)'"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr ""
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr ""
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr ""
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr ""
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr ""
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr ""
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr ""
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr ""
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr ""
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr ""
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "süntaksi viga kohal `%s'"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "süntaksi viga: ootamatu faililõpp"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "süntaksi viga"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Käsuinterpretaatorist väljumiseks kasutage \"%s\".\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr ""
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr ""
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr ""
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr ""
+
+#: print_cmd.c:363
+#, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr ""
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr ""
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "faili deskriptor on piiridest väljas"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: segane ümbersuunamine"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: fail on olemas, ei kirjuta üle"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: piiratud: väljundit ei saa ümber suunata"
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr ""
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "$%s: sedasi ei saa omistada"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr ""
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "viga ümbersuunamisel: fd duplikaadi loomine ei õnnestu"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "/tmp puudub, palun looge see!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "/tmp peab olema kataloogi nimi"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: vigane võti"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Mul ei ole nime!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr ""
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Kasuta:\t%s [GNU pikk võti] [võti] ...\n"
+"\t%s [GNU pikk võti] [võti] skript-fail ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "GNU pikad võtmed:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Käsuinterpretaatori võtmed:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD või -c käsklus või -O lühivõti\t\t(ainult käivitamine)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s või -o võti\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "Vigadest teatamiseks kasutage käsku `bashbug'.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d: vigane operatsioon"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr ""
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr ""
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr ""
+
+#: siglist.c:59
+msgid "Quit"
+msgstr ""
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr ""
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr ""
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr ""
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr ""
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr ""
+
+#: siglist.c:87
+msgid "Killed"
+msgstr ""
+
+#: siglist.c:91
+#, fuzzy
+msgid "Bus error"
+msgstr "süntaksi viga"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr ""
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr ""
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr ""
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr ""
+
+#: siglist.c:111
+#, fuzzy
+msgid "Terminated"
+msgstr "piiratud"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr ""
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr ""
+
+#: siglist.c:127
+msgid "Continue"
+msgstr ""
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr ""
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr ""
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr ""
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr ""
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr ""
+
+#: siglist.c:155
+msgid "File limit"
+msgstr ""
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr ""
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr ""
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr ""
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr ""
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr ""
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr ""
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr ""
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr ""
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr ""
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr ""
+
+#: siglist.c:199
+msgid "programming error"
+msgstr ""
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr ""
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr ""
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr ""
+
+#: siglist.c:215
+msgid "Information request"
+msgstr ""
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr ""
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr ""
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr ""
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr ""
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr ""
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr ""
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr ""
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr ""
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr ""
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr ""
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr ""
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr ""
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: parameeter on null või pole seatud"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr ""
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: halb asendus"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: sedasi ei saa omistada"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, fuzzy, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "sulgev `%c' puudub %s sees"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "ei leitud: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "oodati argumenti"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: oodati täisarvude avaldist"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "oodati `)'"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "oodati `)', saadi %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: eeldati unaarset operaatorit"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: eeldati binaarset operaatorit"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "puudub `]'"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "vigane signaali number"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps: halb väärtus muutujas trap_list[%d]: %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+"run_pending_traps: signaali käsitleja on SIG_DFL, saadan %d (%s) iseendale"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: vigane signaal %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr ""
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "shelli tase (%d) on liiga kõrge, kasutan väärtust 1"
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr "make_local_variable: praegune skoop pole funktsiooni kontekst"
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr "all_local_variables: praegune skoop pole funktsiooni kontekst"
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: parameeter on null või pole seatud"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr ""
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr ""
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr "pop_var_context: pole global_variables kontekst"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: ei saa avada: %s"
+
+#: variables.c:4683
+#, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr ""
+
+#: version.c:46
+#, fuzzy
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Autoriõigus © 2006 Free Software Foundation, Inc.\n"
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr ""
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Autoriõigus © 2006 Free Software Foundation, Inc.\n"
+
+#: version2.c:87
+#, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: xmalloc.c:91
+#, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "%s: ei saa luua: %s"
+
+#: xmalloc.c:163
+#, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "%s: ei saa luua: %s"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr ""
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr ""
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr ""
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr ""
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr ""
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr ""
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr ""
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr ""
+
+#: builtins.c:68
+msgid ":"
+msgstr ""
+
+#: builtins.c:70
+msgid "true"
+msgstr ""
+
+#: builtins.c:72
+msgid "false"
+msgstr ""
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr ""
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr ""
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr ""
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr ""
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr ""
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr ""
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr ""
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr ""
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr ""
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr ""
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr ""
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr ""
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr ""
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr ""
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr ""
+
+#: builtins.c:117
+msgid "help [-dms] [pattern ...]"
+msgstr ""
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr ""
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr ""
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr ""
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr ""
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr ""
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr ""
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr ""
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr ""
+
+#: builtins.c:148
+#, fuzzy
+msgid "shift [n]"
+msgstr "shift arv"
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr ""
+
+#: builtins.c:152
+#, fuzzy
+msgid ". filename [arguments]"
+msgstr "liiga palju argumente"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr ""
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr ""
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr ""
+
+#: builtins.c:162
+msgid "times"
+msgstr ""
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr ""
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr ""
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr ""
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr ""
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr ""
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr ""
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr ""
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr ""
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr ""
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr ""
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr ""
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr ""
+
+#: builtins.c:206
+#, fuzzy
+msgid "(( expression ))"
+msgstr "oodati avaldist"
+
+#: builtins.c:208
+#, fuzzy
+msgid "[[ expression ]]"
+msgstr "oodati avaldist"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr ""
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr ""
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr ""
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr ""
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr ""
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr ""
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+
+#: builtins.c:237
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr ""
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+
+#: builtins.c:966
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+
+#~ msgid " "
+#~ msgstr " "
+
+#~ msgid "%s: invalid number"
+#~ msgstr "%s: vigane number"
+
+#~ msgid "freed"
+#~ msgstr "vabastatud"
diff --git a/po/fi.gmo b/po/fi.gmo
new file mode 100644
index 0000000..c0ee173
--- /dev/null
+++ b/po/fi.gmo
Binary files differ
diff --git a/po/fi.po b/po/fi.po
new file mode 100644
index 0000000..29c4ea3
--- /dev/null
+++ b/po/fi.po
@@ -0,0 +1,5469 @@
+# Finnish translation for bash-4.0
+# Copyright (C) 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the bash-4.0 package.
+#
+# Pekka Niemi, 2009.
+# Pekka Niemi <pekka.niemi@iki.fi>, 2009.
+# $Id: bash-4.0.fi.po 38 2009-05-09 12:21:42Z pen $
+msgid ""
+msgstr ""
+"Project-Id-Version: bash-4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2009-05-09 15:13+0300\n"
+"Last-Translator: Pekka Niemi <pekka.niemi@iki.fi>\n"
+"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+"X-Generator: Lokalize 0.3\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "virheellinen taulukkoindeksi"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr "%s: indeksoitua taulukkoa ei voi muuttaa assosiatiiviseksi"
+
+#: arrayfunc.c:480
+#, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: virheellinen assosiatiivinen indeksi"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: ei voida sijoittaa epänumeeriseen indeksiin"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+"%s: %s: assosiatiiviseen taulukkoon sijoitettaessa täytyy käyttää "
+"avainindeksiä"
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: ei voida luoda: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr "bash_execute_unix_command: komennolle ei löydy näppäinkarttaa"
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: ensimmäinen ei-tyhjä merkki ei ole â€\"â€"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "ei loppumerkkiä â€%c†rivissä %s"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: puuttuva kaksoispiste-erotin"
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "â€%sâ€: virheellinen näppäinkartan nimi"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr "rivieditointi ei ole käytössä"
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "â€%sâ€: virheellinen näppäinkartan nimi"
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: ei voida lukea: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "â€%sâ€: ei voida irrottaa"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "â€%sâ€: tuntematon funktio"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s ei ole sidottu mihinkään näppäimeen.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s voidaan käynnistää näppäinkomennolla "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr "toistolaskuri"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "voidaan käyttää vain â€forâ€-, â€whileâ€- tai â€untilâ€-silmukoissa"
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+"Palauttaa nykyisen alirutiinikutsun kontekstin.\n"
+" \n"
+" Ilman LAUSEKETTA palauttaa"
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "HOME-ympäristömuuttujaa ei ole asetettu"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "OLDPWD-ympäristömuuttujaa ei ole asetettu"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr "rivi %d: "
+
+#: builtins/common.c:139 error.c:261
+#, c-format
+msgid "warning: "
+msgstr "varoitus: "
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr "%s: käyttö: "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "liian monta argumenttia"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: valitsin vaatii argumentin"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: vaaditaan numeerinen argumentti"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: ei löytynyt"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: virheellinen valitsin"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: virheellinen valitsimen nimi"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "â€%sâ€: virheellinen tunniste"
+
+#: builtins/common.c:238
+msgid "invalid octal number"
+msgstr "virheellinen oktaaliluku"
+
+#: builtins/common.c:240
+msgid "invalid hex number"
+msgstr "virheellinen heksadesimaaliluku"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "virheellinen luku"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: virheellinen signaalimääritys"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "â€%sâ€: ei ole prosessitunnus eikä kelvollinen työtunniste"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: kirjoitussuojattu muuttuja"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s rajojen ulkopuolella"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "argumentti"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s rajojen ulkopuolella"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: työtä ei löydy"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: ei työnohjausta"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "ei työnohjausta"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: rajoitettu"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "rajoitettu"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: ei ole komentotulkin sisäänrakennettu komento"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "kirjoitusvirhe: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr "pääteasetuksia asetettaessa tapahtui virhe: %s"
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr "pääteasetuksia luettaessa tapahtui virhe: %s"
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: nykyhakemistoa luettaessa tapahtui virhe: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: ei ole yksiselitteinen työtunniste"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: virheellinen toiminnon nimi"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: ei lavennusmääritystä"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "varoitus: -F -valitsin ei ehkä toimi odotetusti"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "varoitus: -C -valitsin ei ehkä toimi odotetusti"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr "tällä hetkellä komennon lavennusfunktiota ei suoriteta"
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "voidaan käyttää ainoastaan funktiossa"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "â€-fâ€:ää ei voida käyttää funktioiden luomiseen"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: kirjoitussuojattu funktio"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: taulukkomuuttujia ei voi tuhota näin"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr "%s: assosiatiivista taulukkoa ei voi muuttaa indeksoiduksi"
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "dynaaminen lataus ei ole käytettävissä"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "jaettua objektia %s ei voida avata: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "kohdetta %s ei löydy jaetusta objektista %s: %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: ei dynaamisesti ladattu"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: ei voida poistaa: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: on hakemisto"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: ei tavallinen tiedosto"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: tiedosto on liian iso"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: binääritiedostoa ei voida suorittaa"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: ei voida suorittaa: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr "lopetus\n"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "ei ole sisäänkirjautumiskomentotulkki: käytä komentoa â€exitâ€"
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "Töitä on pysäytettynä.\n"
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr "Töitä on ajossa.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "ei löytynyt komentoa"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "komentohistoriamääritys"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: väliaikaistiedostoa ei voitu avata: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr "nykyinen"
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "työ %d käynnistyi ilman työnohjausta"
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: virheellinen valitsin – %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: valitsin vaatii argumentin – %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "hajautus kytketty pois"
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: hajautustaulukko on tyhjä\n"
+
+#: builtins/hash.def:244
+#, c-format
+msgid "hits\tcommand\n"
+msgstr "osumia\tkomento\n"
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Sopivat komennot avainsanaan `"
+msgstr[1] "Sopivat komennot avainsanoihin `"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"Ohjeita kohteelle â€%s†ei löydy. Kokeile â€help helpâ€, â€man -k %s†tai \n"
+"â€info %sâ€."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: ei voida avata: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"Nämä komennot on määritelty sisäisesti. Kirjoita â€help†nähdäksesi tämän "
+"listan.\n"
+"Kirjoita â€help name†saadaksesi lisätietoja funktiosta â€nameâ€.\n"
+"Komennolla â€info bash†saat lisää yleisiä tietoja komentotulkista.\n"
+"Käytä komentoa â€man -k†tai â€info†saadaksesi lisätietoja komennoista, jotka "
+"eivät ole tällä listalla.\n"
+"\n"
+"Asteriski (*) nimen vieressä tarkoittaa, että komennon käyttö on estetty.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "valitsimista -anrw voidaan käyttää vain yhtä"
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "sijainti komentohistoriassa"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: historiaviittaus epäonnistui"
+
+#: builtins/inlib.def:71
+#, c-format
+msgid "%s: inlib failed"
+msgstr "%s: inlib epäonnistui"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "â€-xâ€:n kanssa ei voida käyttää muita valitsimia"
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: argumenttien pitää olla prosessi- tai työtunnisteita"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Tuntematon virhe"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "odotettiin lauseketta"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: ei ole taulukkomuuttuja"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: virheellinen tiedostokahvamääritys"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: virheellinen tiedostokahva: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, c-format
+msgid "%s: invalid line count"
+msgstr "%s: virheellinen rivimäärä"
+
+#: builtins/mapfile.def:277
+#, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: virheellinen taulukkoindeksi"
+
+#: builtins/mapfile.def:294
+#, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: virheellinen paluukutsumäärä"
+
+#: builtins/mapfile.def:326
+msgid "empty array variable name"
+msgstr "tyhjä taulukkomuuttujan nimi"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr "vaaditaan tukea taulukkomuuttujille"
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "â€%sâ€: puuttuva muotoilumerkki"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "â€%câ€: virheellinen muotoilumerkki"
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr "varoitus: %s: %s"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "\\x:stä puuttuu heksadesimaalinumero"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "ei toista hakemistoa"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<ei nykyhakemistoa>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr "hakemistopino on tyhjä"
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr "hakemistopinon indeksi"
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+"Näyttää muistissa olevat hakemistot. Hakemistot\n"
+" löytävät tiensä listaan â€pushdâ€-komennolla; voit\n"
+" palata listan hakemistoihin â€popdâ€-komennolla.\n"
+" \n"
+" Valitsimet:\n"
+" -c\ttyhjennä hakemistopino\n"
+" -l\tälä tulosta tilde-alkuisia versioita hakemistoista jotka ovat\n"
+" \tsuhteessa kotihakemistoosi\n"
+" -p tulosta hakemistopino, hakemisto per rivi\n"
+" -v tulosta hakemistopino, hakemisto per rivi, pinon "
+"sijaintinumeroineen\n"
+" \n"
+" Argumentit:\n"
+" +N\tNäyttää listan N:nnen alkion (laskien vasemmalta dirs-komennon \n"
+" \tantamasta listasta). Valitsimetta kutsuttaessa aloitetaan nollasta.\n"
+" \n"
+" -N\tNäyttää listan N:nnen alkion (laskien oikealta dirs-komennon\n"
+" \tantamasta listasta). Valitsimetta kutsuttaessa aloitetaan nollasta."
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Lisää hakemiston hakemistopinon ylimmäiseksi, tai kääntää pinon, \n"
+" jolloin nykyhakemisto menee pinon huipulle. Ilman argumentteja \n"
+" vaihtaa pinon kahden päällimmäisen hakemiston paikkoja.\n"
+" \n"
+" Valitsimet:\n"
+" -n\tjättää hakemiston vaihtamatta, joten vain pinoa muutetaan\n"
+" \n"
+" Argumentit:\n"
+" +N\tKääntää pinoa niin, että N:s hakemisto (laskien vasemmalta \"dirs"
+"\"-\n"
+" komennon antamasta listasta) on päällimmäisenä.\n"
+" \n"
+" -N\tKääntää pinoa niin, että N:s hakemisto (laskien oikealta \"dirs"
+"\"-\n"
+" komennon antamasta listasta) on päällimmäisenä.\n"
+" \n"
+" Sisäänrakennettu â€dirsâ€-komento näyttää hakemistopinon."
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Poistaa alkioita hakemistopinosta. Ilman argumenttia poistaa ylimmän\n"
+" hakemiston, ja siirtää seuraavan ylimmäiseksi.\n"
+" \n"
+" Valitsimet:\n"
+" -n\tEi siirrytä normaalisti pinosta poistettuun hakemistoon,\n"
+" \tjoten vain pinoa muutetaan.\n"
+" \n"
+" Argumentit:\n"
+" +N\tPoistaa N:nnen alkion (laskien vasemmalta â€dirsâ€-komennon\n"
+" \tantamasta listasta, alkaen nollasta). Esimerkiksi â€popd +0â€\n"
+" \tpoistaa ensimmäisen hakemistot, â€popd +1†toisen.\n"
+" \n"
+" -N\tPoistaa N:nnen alkion (laskien oikealta â€dirsâ€-komennon \n"
+" \tantamasta listasta, alkaen nollasta). Esimerkiksi: â€popd -0â€\n"
+" \tpoistaa viimeisen hakemiston, â€popd -1†sitä edellisen.\n"
+" \n"
+" Sisäänrakennettu â€dirsâ€-komento näyttää hakemistopinon sisällön."
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: virheellinen aikakatkaisumääritys"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "lukuvirhe: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr "â€return†on käytettävissä vain funktiossa tai ladatussa skriptissä"
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "funktiota ja muuttujaa ei voi poistaa yhtä aikaa"
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: ei voida poistaa"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: ei voida poistaa: kirjoitussuojattu %s"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: ei ole taulukkomuuttuja"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: ei ole funktio"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "siirtolaskuri"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr ""
+"komentotulkin valitsimia ei voida laittaa päällä ja ottaa pois päältä "
+"samanaikaisesti"
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: virheellinen komentotulkin valitsimen nimi"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "vaaditaan tiedostonimi argumentiksi"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: tiedostoa ei löytynyt"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "ei voida keskeyttää"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "sisäänkirjautumiskomentotulkkia ei voi keskeyttää"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "%s on aliasioitu â€%sâ€\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s on komentotulkin avainsana\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s on funktio\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "%s on komentotulkin sisäänrakennettu komento\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s on %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "%s on hajautettu (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s: virheellinen rajoitusargumentti"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "â€%câ€: virheellinen komento"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: rajoitusta ei saada: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr "rajoitus"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: rajoitusta ei voida muokata: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "oktaaliluku"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "â€%câ€: virheellinen symbolisen tilan operaattori"
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "â€%câ€: virheellinen symbolisen tilan merkki"
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr " rivi "
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "viimeinen komento: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "Keskeytetään..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "tuntematon komentovirhe"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "virheellinen komentotyyppi"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "virheellinen liittäjä"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "virheellinen hyppy"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: sitomaton muuttuja"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "aikakatkaisu: automaattinen uloskirjautuminen\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "syötettä ei voida lukea tiedostosta /dev/null: %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "AJAN MUOTOMÄÄRITYS: â€%câ€: virheellinen muotoilumerkki"
+
+#: execute_cmd.c:2075
+msgid "pipe error"
+msgstr "putkitusvirhe"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: rajoitettu: komentojen nimissä ei voi käyttää â€/â€-merkkiä"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: komentoa ei löydy"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: virheellinen tulkki"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "tiedostokahvaa %d ei voida kopioida kahvaksi %d"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "lausekkeen rekursiomäärä ylittyi"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "rekursiopinon alivuoto"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "lauseoppivirhe lausekkeessa"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "yritettiin sijoittaa objektiin, joka ei ole muuttuja"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "jako nollalla"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "bugi: virheellinen sijoitusavainsana"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "â€:â€:ttä odotettiin ehdolliseen lausekkeeseen"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "eksponentti on pienempi kuin 0"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr "odotettiin muuttujaa ++:n tai --:n jälkeen"
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "puuttuva â€)â€"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "lauseoppivirhe: odotettiin operandia"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "lauseoppivirhe: virheellinen aritmetiikkaoperaattori"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s%s%s: %s (virheellinen avainsana on â€%sâ€)"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "virheellinen lukujärjestelmä"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "liian iso luku lukujärjestelmälle"
+
+#: expr.c:1329
+#, c-format
+msgid "%s: expression error\n"
+msgstr "%s: virhe lausekkeessa\n"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getcwd: ylempiin hakemistoihin ei päästä"
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "nodelay-tilaa ei voida asettaa tiedostokahvalle %d"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr "bashin syötteeksi ei voida avata uutta tiedostokahvaa kahvasta %d"
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "save_bash_input: uudella tiedostokahvalla %d on jo puskuri"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr "start_pipeline: pgrp-putki"
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr "haarautettu prosessi-id %d on ajossa olevalla työllä %d"
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "poistetaan pysäytetty työ %d prosessiryhmästä %ld"
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr "add_process: prosessi %5ld (%s) putkijonossa"
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr "add_process: prosessi %5ld (%s) on merkattu vielä toimivaksi"
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: %ld: prosessitunnusta ei löydy."
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr "Signaali %d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Valmis"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Pysäytetty"
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr "Pysäytetty(%s)"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "Ajossa"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Valmis(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "Poistui %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Tuntematon tila"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(luotiin core-tiedosto)"
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr " (työhakemisto: %s)"
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "lapsiprosessin setpgid (%ld => %ld)"
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait: prosessi %ld ei ole tämän komentotulkin lapsiprosessi"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "wait_for: Prosessista %ld ei ole tietoja"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job: työ %d on pysäytetty"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: työ on lopetettu"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: työ %d on jo taustalla"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, c-format
+msgid "%s: line %d: "
+msgstr "%s: rivi %d:"
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr " (luotiin core-tiedosto)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(työhakemisto nyt: %s)\n"
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_job_control: getpgrp epäonnistui"
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_job_control: vuonhallinta"
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_job_control: setpgid"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr "päätteen prosessiryhmää ei voitu asettaa (%d)"
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "tällä komentotulkilla ei ole työnohjausta"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc: varmistus epäonnistui: %s\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"malloc: %s:%d: varmistus epäonnistui\r\n"
+
+#: lib/malloc/malloc.c:313
+msgid "unknown"
+msgstr "tuntematon"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr "malloc: vapaitten listan lohko ylikirjoittui"
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free: kutsuttiin argumenttina jo vapautettu lohko"
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free: kutsuttuun argumenttina varaamaton lohko"
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr "free: havaittiin alivuoto; mh_nbytes rajojen ulkopuolella"
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free: alku- ja loppulohkojen koot eroavat"
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc: kutsuargumentti on varaamaton lohko"
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr "realloc: havaittiin alivuoto; mh_nbytes rajojen ulkopuolella"
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "realloc: alku- ja loppulohkojen koot eroavat"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr "register_alloc: varaustaulukko on täynnä FIND_ALLOCeja?\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr "register_alloc: %p on merkitty taulukossa jo varatuksi?\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "register_free: %p on jo taulukossa vapaana?\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "virheellinen lukujärjestelmä"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: tuntematon palvelin"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: virheellinen palvelu"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: virheellinen verkkopolkumääritys"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "verkko-operaatioita ei ole tuettu"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc: %s:%d: ei voida varata %lu tavua"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc: %s:%d: ei voida varata %lu tavua"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Sinulle on postia laatikossa $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Sinulla on uutta postia laatikossa $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "Posti laatikossa %s on luettu\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "lauseoppivirhe: vaaditaan aritmeettinen lauseke"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "lauseoppivirhe: odottamaton â€;â€"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "lauseoppivirhe: â€((%s))â€"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: virheellinen käskytyyppi %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+"here-dokumentti rivillä %d päättyi tiedoston loppumiseen (haluttiin â€%sâ€)"
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr "make_redirection: uudelleenohjaus â€%d†rajojen ulkopuolella"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "odottamaton EOF (tiedostonloppu) odotettaessa sulkevaa â€%câ€"
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "odottamaton EOF odotettaessa â€]]â€"
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "lauseoppivirhe ehdollisessa lausekkeessa: odottamaton avainsana â€%sâ€"
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "lauseoppivirhe ehdollisessa lausekkeessa"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "odottamaton avainsana â€%sâ€, odotettiin â€)â€"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "odototettiin â€)â€"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "odottamaton argumentti â€%s†ehdolliselle unaariselle operaattorille"
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "odottamaton argumentti ehdolliselle unaariselle operaattorille"
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr ""
+"odottamaton avainsana â€%sâ€, odotettiin ehdollista binääristä operaattoria"
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "odotettiin ehdollista binääristä operaattoria"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "odottamaton argumentti â€%s†ehdolliselle binääriselle operaattorille"
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "odottamaton argumentti ehdolliselle binääriselle operaattorille"
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "odottamaton avainsana â€%c†ehdollisessa komennossa"
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "odottamaton avainsana â€%s†ehdollisessa komennossa"
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "odottamaton avainsana %d ehdollisessa komennossa"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "lauseoppivirhe lähellä odottamatonta avainsanaa â€%sâ€"
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "lauseoppivirhe lähellä â€%sâ€"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "lauseoppivirhe: odottamaton tiedostonloppu"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "lauseoppivirhe"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Kirjoita â€%s†poistuaksesi komentotulkista.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "Odottamaton EOF odotettaessa vastaavaa â€)â€"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "täydennys: funktiota â€%s†ei löytynyt"
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr "progcomp_insert: %s: tyhjä COMPSPEC"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: virheellinen yhdistin â€%dâ€"
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d: virheellinen tiedostokahva: %s"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "cprintf: â€%câ€: virheellinen muotoilumerkki"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "tiedostokahva rajojen ulkopuolella"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: epämääräinen uudelleenohjaus"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: olemassa olevan tiedoston päälle ei voida kirjoittaa"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: rajoitettu: tulostusta ei voida uudelleenohjata"
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "here-dokumentille ei voida luoda väliaikaistiedostoa: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: listaa ei voida sijoittaa taulukon alkioon"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "/dev/(tcp|udp)/host/port-muotoa ei tueta ilman tietoliikennettä"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "virhe uudelleenohjauksessa: tiedostokahvaa ei voida kopioida"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "/tmp-hakemistoa ei löytynyt, luo se!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "/tmp:n pitää olla kelvollinen hakemiston nimi"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: virheellinen valitsin"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Minulla ei ole nimeä!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU bash, versio %s-(%s)\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Käyttö:\t%s[GNU:n pitkä valitsin] [valitsin] ...\n"
+"\t%s [GNU:n pitkä valitsin] [valitsin] komentotiedosto ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "GNU:n pitkät valitsimet:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Komentotulkin valitsimet:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr ""
+"\t-irsD tai -c komento tai -O shopt_option (ainoastaan käynnistettäessä)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s tai -o -valitsin\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"Kirjoita â€%s -c 'help set'†saadaksesi lisätietoja komentotulkin "
+"valitsimista.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"Kirjoita â€%s -c help†saadaksesi lisätietoja komentotulkin "
+"sisäänrakennetuista komennoista.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "Raportoi virheet komennolla â€bashbugâ€.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d: virheellinen operaatio"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Väärä signaali"
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Linjankatkaisu"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Keskeytys"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "Lopetettu"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Virheellinen käsky"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "Jäljitys/katkaisupisteansa"
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "ABORT-käsky"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "EMT-käsky"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Liukulukupoikkeus"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "Tapettu"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "Väylävirhe"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Muistialueen ylitys"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Virheellinen järjestelmäkutsu"
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "Katkennut putki"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Herätyskello"
+
+#: siglist.c:111
+msgid "Terminated"
+msgstr "Päätetty"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "Kiireellinen I/O-ehto"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Pysäytetty (signaali)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "Jatka"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "Lapsiprosessin kuolema tai pysähtyminen"
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Pysäytetty (päätteen syöte)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Pysäytetty (päätteen tuloste)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "I/O on valmis"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "CPU-rajoitus"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "Tiedostorajoitus"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "Hälytys (virtuaalinen)"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "Hälytys (profiili)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Ikkuna vaihtunut"
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr "Tietuelukko"
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "Käyttäjän määrittelemä signaali 1"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "Käyttäjän määrittelemä signaali 2"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "HFT-syöte odottaa"
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "sähkökatko lähellä"
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "järjestelmän kaatuminen lähellä"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "siirrä prosessi toiselle CPU:lle"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "ohjelmointivirhe"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "HFT-monitorointitila käytössä"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "HFT-monitorointitila peruttu"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "HFT-äänisekvenssi on valmistunut"
+
+#: siglist.c:215
+msgid "Information request"
+msgstr "Informaatiopyyntö"
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Tuntematon signaali #"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Tuntematon signaali #%d"
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "virheellinen korvaus: ei sulkevaa â€%s†jonossa %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: listaa ei voida sijoittaa taulukon alkioon"
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "putkea ei voida luoda prosessin korvaamista varten"
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "lapsiprosessia ei voida luoda prosessin korvaamista varten"
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "nimettyä putkea %s ei voida avata lukemista varten"
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "nimettyä putkea %s ei voida avata kirjoitusta varten"
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "nimettyä putkea %s ei voida kopioida tiedostokahvaksi %d"
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "putkea ei voida luoda komennon korvaamista varten"
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr "ei voida luoda lapsiprosessia komennon korvaamista varten"
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "command_substitute: putkea ei voida kopioida tiedostokahvaksi 1"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: parametria ei ole tai sitä ei ole asetettu"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: alimerkkijonolauseke < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: virheellinen korvaus"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: ei voida asettaa näin"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "virheellinen korvaus: ei sulkevaa â€`†jonossa %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "ei osumia: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "odotettiin argumenttia"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: odotettiin kokonaislukuilmaisua"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "odotettiin â€)â€"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "odotettiin â€)â€, löydettiin %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: odotettiin unaarista operaattoria"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: odotettiin binääristä operaattoria"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "puuttuva â€]â€"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "virheellinen signaalinumero"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps: virheellinen arvo trap_list[%d]: %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+"run_pending_traps: signaalikäsittelijä on SIG_DFL, lähetän %d (%s) uudelleen "
+"itselleni"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: virheellinen signaali %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "virhe tuotaessa â€%sâ€:n funktiomääritystä"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "komentotulkkitaso (%d) liian korkea, palautetaan 1:ksi"
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr "make_local_variable: ei funktiokontekstia nykytilassa"
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr "all_local_variables: ei funktiokontekstia nykytilassa"
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: parametria ei ole tai sitä ei ole asetettu"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "virheellinen merkki %d %s:n exportstr:ssä"
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "ei =:ä kohteen %s exportstr:ssä"
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr "pop_var_context: shell_variablesin alku ei ole funktiokonteksti"
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr "pop_var_context: ei global_variables-kontekstia"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+"pop_scope: shell_variablesin alku ei väliaikaisten ympäristömuuttujien "
+"ympäristössä"
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: ei voida avata: %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d: virheellinen tiedostokahva: %s"
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Copyright © 2009 Free Software Foundation, Inc."
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Lisenssi GPLv3+: GNU GPL versio 3 tai uudempi <http://gnu.org/licenses/gpl."
+"html>\n"
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU bash, versio %s (%s)\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr "Tämä on vapaa ohjelma; saat muutella ja levittää sitä vapaasti.\n"
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr "Takuuta ei ole lain määräämissä rajoissa.\n"
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Copyright © 2009 Free Software Foundation, Inc."
+
+#: version2.c:87
+#, fuzzy, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Lisenssi GPLv3+: GNU GPL versio 3 tai uudempi <http://gnu.org/licenses/gpl."
+"html>\n"
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: ei voida varata %lu tavua (varattiin %lu tavua)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: ei voitu varata %lu tavua"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: %s:%d: ei voida varata %lu tavua (varattiin %lu tavua)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: %s:%d: ei voida varata %lu tavua"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [nimi[=arvo] ... ]"
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] nimi [nimi ...]"
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+"bind [-lpvsPVS] [-m näppäinkartta] [-f tiedostonimi] [-q nimi] [-u nimi] [-r "
+"näppäinsarja] [-x näppäinsarja:komento] [näppäinsarja:readline-funktio tai "
+"readline-komento]"
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [n]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [n]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [sisäänrakennettu komento [arg ...]]"
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr "caller [expr]"
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-L|-P] [dir]"
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr "pwd [-LP]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr "true"
+
+#: builtins.c:72
+msgid "false"
+msgstr "false"
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] komento [arg ...]"
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-aAfFilrtux] [-p] [niemi[=arvo] ...]"
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-aAfFilrtux] [-p] nimi[=arvo] ..."
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr "local [valitsin] nimi[=arvo] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [arg ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [arg ...]"
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-a] [-dnps] [-f tiedosto] [nimi ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [arg ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts valitsinmerkit nimi [arg]"
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a nimi] [komento [argumentit ...]] [uudelleenohjaus ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [n]"
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr "lopetus [n]"
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+"fc [-e e-nimi] [-lnr] [ensimmäinen] [viimeinen] tai fc -s [pat=rep] [komento]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [työtunniste]"
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr "bg [työtunniste ...]"
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-lr] [-p polku] [-dt] [nimi ...]"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "help [-ds] [malline ...]"
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [-d erotus] [n] tai history -anrw [tiedosto] or history -ps arg "
+"[arg...]"
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr "jobs [-lnprs] [työtunniste ...] tai jobs -x komento [args]"
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [-h] [-ar] [työtunniste ...]"
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s signaalitunniste | -n signaalinumero | -signaalimäärite] prosessi-"
+"id | työtunniste ... tai kill -l [signaalimäärite]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let arg [arg ...]"
+
+#: builtins.c:136
+#, fuzzy
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+"read [-ers] [-a taulukko] [-d erotin] [-i teksti] [-n lkm] [-p kehote] [-t "
+"aikakatkaisu] [-u tiedostokahva] [nimi ...]"
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o valitsinnimi] [arg ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [nimi ...]"
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-fn] [nimi[=arvo] ...] tai export -p"
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-af] [nimi[=arvo] ...] tai readonly -p"
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr "shift [n]"
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr "source tiedosto [argumentit]"
+
+#: builtins.c:152
+msgid ". filename [arguments]"
+msgstr ". tiedosto [argumentit]"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [lauseke]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ arg... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "times"
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [-lp] [[arg] signaalimäärite ...]"
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-afptP] nimi [nimi ...]"
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdefilmnpqrstuvx] [raja]"
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-p] [-S] [tila]"
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr "wait [id]"
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr "wait [pid]"
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for NIMI [in ARVOT ... ] ; do KOMENNOT; done"
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for (( lause1; lause2; lause3 )); do KOMENNOT; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select NIMI [in ARVOT ... ;] do KOMENNOT; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr "time [-p] komentoputki"
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case SANA in [MALLINE [| MALLINE]...) KOMENNOT ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if KOMENNOT; then KOMENNOT; [ elif KOMENNOT; then KOMENNOT; ]... [ else "
+"KOMENNOT; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while KOMENNOT; do KOMENNOT; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until KOMENNOT; do KOMENNOT; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr "coproc [NIMI] komento [uudelleenohjaukset]"
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "function nimi { KOMENNOT ; } tai nimi () { KOMENNOT ; }"
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr "{ KOMENNOT ; }"
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr "työtunniste [&]"
+
+#: builtins.c:206
+msgid "(( expression ))"
+msgstr "(( lauseke ))"
+
+#: builtins.c:208
+msgid "[[ expression ]]"
+msgstr "[[ lauseke ]]"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr "muuttujat - eräiden komentotulkin muuttujien nimet ja merkitykset"
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [-n] [+N | -N | hakemisto]"
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [-n] [+N | -N]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o] [valitsinnimi ...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr "printf [-v muuttuja] muoto [argumentit]"
+
+#: builtins.c:229
+#, fuzzy
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+"complete [-abcdefgjksuv] [-pr] [-o valitsin] [-A toimenpide] [-G "
+"jokerimalline] [-W sanalista] [-F funktio] [-C komento] [-X "
+"suodatinmalline] [-P prefiksi] [-S suffiksi] [nimi...]"
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+"compgen [-abcdefgjksuv] [-o valitsin] [-A toimenpide] [-G jokerimalline] [-"
+"W sanalista] [-F funktio] [-C komento] [-X suodatinmalline] [-P prefiksi] [-"
+"S suffiksi] [sana]"
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "compopt [-o|+o valitsin] [nimi ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"mapfile [-n lukumäärä] [-O alkuperä] [-s laskuri] [-t] [-u tiedostokahva] \n"
+"[-C paluukutsu] [-c määrä] [taulukko]"
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"readarray [-n lukumäärä] [-O alkuperä] [-s laskuri] [-t] [-u "
+"tiedostokahva] \n"
+"[-C paluukutsu] [-c määrä] [taulukko]"
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"Näytä tai määrittele aliaksia.\n"
+" \n"
+" Ilman aliaksia â€alias†tulostaa vakiotulosteeseen listan aliaksista \n"
+" hyödynnettävässä muodossa â€alias NIMI=ARVOâ€.\n"
+" \n"
+" Muussa tapauksessa luodaan uusi alias jokaiselle NIMELLE,\n"
+" jonka ARVO on annettu. ARVON jälkeinen tyhjä tarkastetaan\n"
+" alias-korvauksen varalta aliasta laajennettaessa.\n"
+" \n"
+" Valitsimet:\n"
+" -p\ttulosta kaikki määritellyt aliakset hyödynnettävässä\n"
+" \tmuodossa.\n"
+" \n"
+" Paluuarvo:\n"
+" alias palauttaa arvon tosi, mikäli parametriksi on annettu NIMI jonka\n"
+" aliasta ei ole määritelty."
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Poista kukin NIMI määriteltyjen aliasten listasta.\n"
+" \n"
+" Valitsimet:\n"
+" -a\tpoista kaikki aliasmääritykset.\n"
+" \n"
+" Palauttaa arvon tosi paitsi jos NIMI-nimistä aliasta\n"
+" ei ole."
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+"Aseta readlinen näppäimistösidonnat ja muuttujat.\n"
+" \n"
+" Sido näppäinyhdistelmä readlinen funktioon tai makroon, tai \n"
+" aseta readlinen muuttuja. Valitsimeton argumenttisyntaksi vastaa\n"
+" ~/.inputrc:n, mutta on annettava yhtenä argumenttina:\n"
+" esimerkiksi, bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Valitsimet:\n"
+" -m näppäinkartta käytä NÄPPÄINKARTTAA tämän komennon ajan.\n"
+" Hyväksyttäviä näppäinkarttoja ovat emacs, emacs-"
+"standard,\n"
+" emacs-meta, emacs-cltx, vi, vi-move, vi-command ja "
+"vi-insert.\n"
+" -l Listaa funktioiden nimet\n"
+" -P Listaa funktioiden nimet ja sidonnat.\n"
+" -p Listaa funktioiden nimet ja sidonnat "
+"hyödynnettävässä \n"
+" muodossa.\n"
+" -S Listaa makrot herättävät näppäinyhdistelmät ja "
+"niiden \n"
+" arvot\n"
+" -s Listaa makrot herättävät näppäinyhdistelmät ja "
+"niiden \n"
+" arvot\n"
+" hyödynnettävässä muodossa.\n"
+" -q funktion-nimi Tarkista, mitkä näppäimet käynnistävät nimetyn \n"
+" funktion.\n"
+" -u funktion-nimi Poista nimettyyn funktioon tehdyt näppäinsidonnat.\n"
+" -r näppäinyhdistelmä Poista NÄPPÄINYHDISTELMÄN sidonta.\n"
+" -f tiedosto Lue näppäinsidonnat TIEDOSTOSTA.\n"
+" -x näppäinyhdistelmä:komento\tkäynnistä KOMENTO \n"
+" NÄPPÄINYHDISTELMÄLLÄ.\n"
+" \n"
+" Paluuarvo:\n"
+" bind palauttaa 0 paitsi jos on annettu tunnistamaton valitsin tai "
+"tapahtuu \n"
+" virhe."
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Exit for, while- tai until-silmukoista\n"
+" \n"
+" Poistu FOR-, WHILE- tai UNTIL-silmukasta. Jos N on annettu, poistu\n"
+" N:stä sisäkkäisestä silmukasta.\n"
+" \n"
+" Paluuarvo:\n"
+" Paluuarvo on 0 jollei N ole suurempi tai yhtäsuuri kuin 1."
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Jatko for-, while tai until-silmukoille.\n"
+" \n"
+" Jatkaa seuraavaa FOR-, WHILE- tai UNTIL-silmukan kierrosta.\n"
+" Jos N on annettu, jatkaa N:ttä silmukkaa.\n"
+" \n"
+" Paluuarvo:\n"
+" Paluuarvo on 0 ellei N ole suurempi tai yhtäsuuri kuin 1."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+"Suorita komentotulkin sisäänrakennettuja komentoja.\n"
+" \n"
+" Suorita KOMENTO argumentein ARGs ilman komennon etsimistä.\n"
+" Tämä on hyödyllistä silloin, kun haluat tehdä komentotulkin komennosta\n"
+" funktion, mutta haluat suorittaa komennon funktiosta käsin.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa KOMENNON paluuarvon, tai epätoden jos KOMENTO ei ole\n"
+" sisäänrakennettu komento."
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+"Palauta tämänhetkisen alirutiinikutsun konteksti.\n"
+" \n"
+" Ilman parametria, palauttaa â€$line $filenameâ€. Parametrilla palauttaa \n"
+" â€$line $subroutine $filenameâ€; saatua lisätietoa voidaan käyttää "
+"kutsupinon\n"
+" kuvaamiseksi.\n"
+" \n"
+" Parametrin arvo määrää, montako kutsukehystä taaksepäin siirrytään; \n"
+" ylin kehys on numero 0.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa 0 ellei komentotulkki ole funktion ulkopuolella tai parametri\n"
+" on virheellinen."
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+"Vaihtaa työhakemistoa.\n"
+" \n"
+" Siirry hakemistoon HAKEMISTO. HAKEMISTOn oletusarvo on HOME-\n"
+" ympäristömuuttujan arvo.\n"
+" \n"
+" CDPATH-ympäristömuuttuja määrittelee hakupolun HAKEMISTOlle. Vaihto-\n"
+" ehtoiset hakemistonimet erotetaan CDPAThissa kaksoispisteellä.\n"
+" Tyhjä hakemisto tarkoittaa nykyistä hakemistoa. Jos HAKEMISTO ALKAA\n"
+" kauttaviivalla, CDPATHia ei käytetä.\n"
+" \n"
+" Jos hakemistoa ei löydy, ja komentotulkin valitsin â€cdable_vars†on "
+"asetettu,\n"
+" oletetaan hakemiston olevan muuttuja. Jos kyseisellä muuttujalla on "
+"arvo,\n"
+" sitä käytetään HAKEMISTOksi.\n"
+" \n"
+" Valitsimet:\n"
+" -L\tpakota seuraamaan symbolisia linkkejä\n"
+" -P\tkäytä fyysistä hakemistorakennetta, älä seuraa symbolisia "
+"linkkejä\n"
+" \n"
+" Oletus on seurata symbolisia linkkejä, kuten jos â€-L†olisi annettu.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa 0, jos hakemistoa vaihdettiin, nollasta poikkeavan muussa \n"
+" tapauksessa."
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+"Tulostaa tämänhetkisen työhakemiston.\n"
+" \n"
+" Valitsimet:\n"
+" -L\ttulosta $PWD-ympäristömuuttujan arvo jos se sisältää\n"
+" \tnykyisen työhakemiston nimen\n"
+" -P\ttulosta fyysinen hakemisto ilman symbolisia linkkejä\n"
+" \n"
+" Oletusarvoisesti â€pwd†käyttäytyy kuin â€-L†olisi annettu.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa 0 ellei ole annettu virheellistä valitsinta tai nykyistä \n"
+" hakemistoa ei voida lukea."
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Tyhjä komento.\n"
+" \n"
+" Ei vaikutusta; komento ei tee mitään.\n"
+" \n"
+" Paluuarvo:\n"
+" Onnistuu aina."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Palauttaa onnistuneen paluuarvon.\n"
+" \n"
+" Paluuarvo:\n"
+" Onnistuu aina."
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+"Palauttaa epäonnistuneen paluuarvon.\n"
+" \n"
+" Paluuarvo:\n"
+" Epäonnistuu aina."
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+"Suorittaa yksinkertaisen komennon tai näyttää tietoja komennoista.\n"
+" \n"
+" Suorittaa KOMENNON PARAMETREIN ohittaen komentotulkin funktiohaun,\n"
+" tai näyttää tietoja annetuista KOMENNOISTA. Voidaan käyttää \n"
+" käynnistämään komentoja levyltä silloin, kun on olemassa samanniminen\n"
+" funktio.\n"
+" \n"
+" Valitsimet:\n"
+" -p\tkäytä PATHin oletusarvoa jonka taataan löytävän kaikki "
+"vakiotyökalut\n"
+" -v\ttulosta KOMENNON kuvaus (kuten sisäänrakennettu â€typeâ€-komento)\n"
+" -V\ttulosta KOMENTOJEN yksityiskohtaisemmat kuvaukset\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa KOMENNON paluuarvon, tai epäonnistumisen jos KOMENTOA ei \n"
+" löytynyt."
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Asettaa muuttujien arvot ja attribuutit.\n"
+" \n"
+" Määrittele muuttujat ja anna niille attribuutit. Jos NIMIÄ ei anneta,\n"
+" näytä kaikkien muuttujien attribuutit ja arvot.\n"
+" \n"
+" Valitsimet:\n"
+" -f\trajaa toiminto tai listaus funktioiden nimiin ja määrityksiin\n"
+" -F\trajaa listaus ainoastaan funktioiden nimiin (plus rivinumeroon \n"
+" \t ja lähdetiedostoon debugattaessa)\n"
+" -p\tnäytä jokaisen NIMEN attribuutit ja arvo\n"
+" \n"
+" Attribuutteja muuttavat valitsimet:\n"
+" -a\ttee NIMISTÄ indeksoidut taulukot (jos tuettu)\n"
+" -A\ttee NIMISTÄ assosiatiiviset taulukot (jos tuettu)\n"
+" -i\ttee NIMISTÄ kokonaislukuja\n"
+" -l\tNIMIIN sijoitetut merkkijonot muutetaan pienaakkosiksi\n"
+" -r\tkirjoitussuojaa NIMET\n"
+" -t\taseta NIMIEN â€traceâ€-attribuutti\n"
+" -u\tNIMIIN sijoitetut merkkijonot muutetaan suuraakkosiksi\n"
+" -x\tNIMET viedään\n"
+" \n"
+" Käyttämällä â€+â€:aa â€-â€:n sijaan annettu attribuutti poistetaan.\n"
+" \n"
+" Muuttujille, joille on annettu kokonaislukuattribuutti, suoritetaan\n"
+" aritmeettinen evaluointi silloin kun niille annetaan arvo (katso\n"
+" â€letâ€-komento).\n"
+" \n"
+" Funktiossa käytettäessä â€declare†tekee NIMISTÄ paikallisia, kuten "
+"â€localâ€-\n"
+" komento.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistumisen ellei ole annettu virheellistä valitsinta tai "
+"tule \n"
+" virhetilannetta."
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+"Asettaa muuttujien arvoja ja attribuutteja.\n"
+" \n"
+" Vanhentunut. Katso â€help declareâ€."
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+"Määrittele paikallisia muuttujia.\n"
+" \n"
+" Luo paikallinen NIMI-niminen muuttuja, ja anna sille arvo ARVO. "
+"VALITSIN\n"
+" voi olla mikä tahansa komennon â€declare†hyväksymä.\n"
+" \n"
+" Paikallisia muuttujia voidaan käyttää ainoastaan funktiossa; ne ovat\n"
+" näkyviä ainoastaan määritelleessä funktiossa ja sen lapsissa.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen, ellei ole annettu virheellistä valitsinta,\n"
+" tapahtuu virhe tai komentotulkki ei ole suorittamassa funktiota."
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Kirjoita argumentit vakiotulosteeseen.\n"
+" \n"
+" Tulosta ARGUMENTIT vakiotulosteeseen rivinvaihdoin.\n"
+" \n"
+" Valitsimet:\n"
+" -n\tälä lisää rivinvaihtoa\n"
+" -e\ttulkitse seuraavat kenoviivaohjaukset\n"
+" -E\tohita kenoviivaohjausten tulkinta\n"
+" \n"
+" \"echo\" tulkitsee seuraavat kenoviivaohjausmerkit:\n"
+" \\a\täänimerkki\n"
+" \\b\tbackspace\n"
+" \\c\tkeskeytä tulostus\n"
+" \\e\tESC-merkki\n"
+" \\f\tsivunvaihto\n"
+" \\n\trivinvaihto\n"
+" \\r\tpalautin\n"
+" \\t\tsarkain\n"
+" \\v\tvertikaalinen sarkain\n"
+" \\\\\tkenoviiva\n"
+" \\0nnn\tmerkki jonka ASCII-koodi oktaalina on NNN. NNN voi olla 0-3\n"
+" \toktaalimerkkiä\n"
+" \\xHH\tkahdeksanbittinen merkki jonka heksadesimaaliarvo on HH. HH "
+"voi \n"
+" \tolla 1-2 heksadesimaalimerkkiä\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen ellei tapahdu virhettä."
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Tulosta argumentit vakiotulosteeseen.\n"
+" \n"
+" Tulosta ARGUMENTIT vakiotulosteeseen päättäen rivinvaihdolla.\n"
+" \n"
+" Valitsimet:\n"
+" -n\tälä lisää rivinvaihtoa\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen ellei tapahdu virhettä."
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+"Ottaa käyttöön tai poistaa käytöstä komentotulkin sisäänrakennettuja "
+"komentoja.\n"
+" \n"
+" Ottaa käyttöön tai poistaa komentotulkin sisäänrakennettuja komentoja\n"
+" käytöstä. Käytöstäpoisto sallii sinun käyttävän sisäisen komennon "
+"kanssa \n"
+" samannimisiä, levyllä olevia komentoja käyttämättä koko polkua.\n"
+" \n"
+" Valitsimet:\n"
+" -a\tlistaa komennot ja tiedot, mitkä on otettu käyttöön\n"
+" -n\tpoistaa NIMET käytöstä tai näyttää listan poistetuista\n"
+" -p\ttulosta lista komennoista hyödynnettävässä muodossa\n"
+" -s\ttulosta ainoastaan Posix-komennot\n"
+" \n"
+" Valitsimet, jotka kontrolloivat dynaamista lataamista:\n"
+" -f\tlataa komento NIMI jaetusta objektista TIEDOSTO\n"
+" -d\tpoista -f:llä ladattu komento\n"
+" \n"
+" Jollei valitsimia anneta, kukin NIMI otetaan käyttöön.\n"
+" \n"
+" Jos haluat käyttää $PATHista löytyvää â€testâ€-komentoa sisäänrakennetun\n"
+" sijaan, kirjoita â€enable -n testâ€.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen, paitsi jos NIMI ei ole komentotulkin "
+"sisäänrakennettu\n"
+" komento tai tapahtuu virhe."
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+"Suorita argumentit komentotulkin komentona.\n"
+" \n"
+" Yhdistä ARGUMENTIT yhdeksi merkkijonoksi, käytä tulosta komentotulkin\n"
+" syötteenä ja suorita saadut komennot.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa komennon paluuarvon tai onnistuneen jos komento on tyhjä."
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+"Selaa valitsimien argumentit.\n"
+" \n"
+" Getoptsia käytetään komentotulkin proseduureissa käsiteltäessä\n"
+" komentoriviparametreina annettuja valitsimia.\n"
+" \n"
+" OPTSTRING sisältää tunnistettavat valitsinkirjaimet; jos kirjainta\n"
+" seuraa kaksoispiste, valitsimella odotetaan olevan argumentti, joka \n"
+" pitäisi erottaa siitä tyhjämerkillä.\n"
+" \n"
+" Getopts sijoittaa joka kutsukerralla seuraavan valitsimen muuttujaan\n"
+" $nimi, alustaen sen tarvittaessa, ja seuraavan käsiteltävän argumentin\n"
+" OPTIND-ympäristömuuttujaan. OPTIND alustetaan 1:ksi jokaisella\n"
+" komentotulkin tai komentotiedoston käynnistyskerralla. Kun valitsin\n"
+" vaatii argumentin, getopts sijoittaa sen muuttujaan OPTARG.\n"
+" \n"
+" Getopts ilmoittaa virheistä jommallakummalla tavalla kahdesta. Jos\n"
+" OPTSTRINGIN ensimmäinen merkki on kaksoispiste, getopts ilmoittaa\n"
+" virheistä hiljaisesti. Tällöin ei tulosteta virheilmoitusta. Jos "
+"löydetään\n"
+" virheellinen valitsinmerkki, se sijoitetaan OPTARGIIN. Jos vaadittua\n"
+" argumenttia ei löydetä, getopts sijoittaa â€:â€:n NAMEEN ja asettaa\n"
+" löydetyn optiomerkin OPTARGIIN. Jos getopts ei ole hiljaisessa tilassa\n"
+" ja löydetään virheellinen valitsin, getopts sijoittaa â€?â€:n NAMEEN ja\n"
+" tyhjentää OPTARGIN. Jos vaadittua argumenttia ei löydetä, NAMEEN\n"
+" sijoitetaan â€?â€, OPTARG tyhjennetään ja tulostetaan virheilmoitus.\n"
+" \n"
+" Jos OPTERR-ympäristömuuttujassa on arvo 0, getopts jättää "
+"virheilmoitukset\n"
+" tulostamatta, vaikka OPTSTRINGIN ensimmäinen merkki ei ole "
+"kaksoispiste.\n"
+" OPTERRin oletusarvo on 1.\n"
+" \n"
+" Getopts selaa normaalisti positioparametrit ($0 - $9), mutta jos \n"
+" argumentteja annetaan enemmän, ne selataan sen sijaan.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen jos valitsin löytyy; epäonnistuneen jos "
+"valitsimet\n"
+" loppuvat tai tapahtuu virhe."
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+"Korvaa komentotulkki annetulla komennolla.\n"
+" \n"
+" Suorita KOMENTO, korvaten tämä komentotulkki annetulla ohjelmalla.\n"
+" ARGUMENTEISTA tulee KOMENNON argumentteja. Jos KOMENTOA ei anneta,\n"
+" kaikki uudelleenohjaukset tapahtuvat nykyisessä komentotulkissa.\n"
+" \n"
+" Valitsimet:\n"
+" -a name\tanna NAME nollantena argumenttina KOMENNOLLE\n"
+" -c\t\tsuorita KOMENTO tyhjässä ympäristössä\n"
+" -l\t\tsijoita miinusmerkki KOMENNON nollanteen argumenttiin\n"
+" \n"
+" Jos komentoa ei voida suorittaa, ei-interaktiivinen komentotulkki "
+"poistuu,\n"
+" ellei tulkin valitsinta â€execfail†ole asetettu.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos KOMENTOA ei löydy tai "
+"uudelleenohjauksessa\n"
+" tapahtuu virhe."
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"Poistu komentotulkista.\n"
+" \n"
+" Poistuu komentotulkista paluuarvolla N. Jos N:ää ei anneta, paluuarvo\n"
+" on viimeisen komennon paluuarvo."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+"Poistu sisäänkirjautumiskomentotulkista.\n"
+" \n"
+" Poistuu sisäänkirjautumiskomentotulkista paluuarvolla N. Palauttaa\n"
+" virheen jos ei olla sisäänkirjautumiskomentotulkissa."
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+"Näytä tai suorita komentoja komentohistoriasta.\n"
+" \n"
+" Fc:tä käytetään historialistassa olevien komentojen tulostamiseen tai\n"
+" muokkaamiseen ja uudelleensuoritukseen. ALKU ja LOPPU voivat olla\n"
+" rajaavia numeroita, tai ALKU voi olla merkkijono, joka tarkoittaa "
+"viimei-\n"
+" sintä sillä alkavaa komentoa.\n"
+" \n"
+" Valitsimet:\n"
+" -e ENIMI\tvalitse käytettävä editori. Oletus on FCEDIT, sitten EDITOR\n"
+" \t\tsitten vi\n"
+" -l\tlistaa rivit editoinnin sijaan\n"
+" -r\tlistaa käänteisessä järjestyksessä\n"
+" \n"
+" Käytettäessä muotoa â€fc -s [malline=korvaus] [komento]â€, komento\n"
+" suoritetaan kun korvaus MALLINE=KORVAUS on suoritettu.\n"
+" \n"
+" Eräs käyttökelpoinen alias on r='fc -s', jolloin â€r cc†ajaa viimeisen "
+"cc-\n"
+" alkuisen komennon ja â€r†suorittaa viimeisen komennon.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen tai suoritetun komennon paluuarvon; nollasta\n"
+" poikkeava virhetilanteessa."
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"Siirrä työ edustalle.\n"
+" \n"
+" Siirrä TYÖKUVAAJALLA tunnistettu työ edustalle, jolloin siitä tulee "
+"nykyinen\n"
+" työ. Jos TYÖKUVAAJAA ei ole annettu, käytetään komentotulkin käsitystä\n"
+" tämänhetkisestä työstä.\n"
+" \n"
+" Paluuarvo:\n"
+" Edustalle tuodun työn paluuarvo, tai epäonnistuminen virhetilanteessa."
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Siirtää työt taustalle.\n"
+" \n"
+" Siirtää kunkin TYÖNKUVAAJALLA tunnistetun työn taustalle, kuten jos ne "
+"olisi\n"
+" käynnistetty â€&â€:llä. Jos TYÖNKUVAAJAA ei ole annettu, käytetään "
+"komento-\n"
+" tulkin käsitystä nykyisestä työstä.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos työnohjaus ei ole käytössä tai "
+"tapahtuu\n"
+" virhe."
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+"Muista tai näytä ohjelmien sijainnit.\n"
+" \n"
+" Selvitä ja muista jokaisen komennon NIMI täysi polkunimi. Jos "
+"argumentteja\n"
+" ei ole annettu, tulostetaan tiedot muistetuista komennoista.\n"
+"\n"
+" Valitsimet:\n"
+" -d\t\tunohda jokaisen NIMEN sijainti\n"
+" -l\t\tnäytä hyödynnettävässä muodossa\n"
+" -p polku\tkäytä POLKUA NIMEN täytenä polkunimenä\n"
+" -r\t\tunohda kaikki sijainnit\n"
+" -t\t\ttulosta kaikkien NIMIEN muistetut sijainnit. Jos annetaan "
+"useampi NIMI,\n"
+" \t\tsijaintien eteen tulostetaan vastaava NIMI\n"
+" Argumentit:\n"
+" NIMI\t\tKukin NIMI etsitään $PATH-muuttujan hakupoluista ja lisätään\n"
+" muistettujen komentojen listaan.\n"
+"\n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos NIMEÄ ei löydy tai on annettu "
+"virheellinen valitsin."
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+"Näyttää tietoja sisäänrakennetuista komennoista.\n"
+" \n"
+" Näyttää lyhyet tiivistelmät sisäänrakennetuista komennoista. Jos "
+"MALLINE\n"
+" on annettu, antaa yksityiskohtaisemman ohjeen kaikista MALLINEESEEN\n"
+" sopivista komennoista, muuten tulostetaan lista ohjeotsikoista.\n"
+" \n"
+" Valitsimet:\n"
+" -d\ttulosta kunkin aiheen lyhyt kuvaus\n"
+" -m\tnäytä käyttöohje man-sivumaisessa muodossa\n"
+" -s\ttulosta ainoastaan lyhyt käyttöohje kustakin MALLINEESEEN \n"
+" \tsopivasta\n"
+" \n"
+" Argumentit:\n"
+" MALLINE\tohjeotsikon hakumalline\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos MALLINETTA ei löydy tai valitsin on\n"
+" virheellinen."
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Näyttää tai muokkaa komentohistoriaa.\n"
+" \n"
+" Näyttää (komento)historian rivinumeroin, sijoittaen asteriskin jokaisen\n"
+" muokatun alkion eteen. Argumentilla N listataan vain N viimeistä "
+"alkiota.\n"
+" \n"
+" Valitsimet:\n"
+" -c\ttyhjennä historia poistamalla kaikki alkiot\n"
+" -d sijainti\tpoista alkio kohdasta SIJAINTI\n"
+" \n"
+" -a\tlisää tämän istunnon historiarivit historiatiedostoon\n"
+" -n\tlue kaikki rivit, joita ei jo ole luettu historiatiedostosta\n"
+" -r\tlue historiatiedosto ja lisää sen sisältö historiaan\n"
+" -w\tkirjoita nykyinen historia historiatiedostoon ja lisää ne "
+"historiaan\n"
+" \n"
+" -p\tsuorita historialaajennos jokaiselle ARGUMENTILLE ja näytä tulos\n"
+" \tlisäämättä sitä historiaan\n"
+" -s\tliitä ARGUMENTIT historiaan yhtenä alkiona\n"
+" \n"
+" Jos TIEDOSTO on annettu, sitä käytetään historiatiedostona. Muuten,\n"
+" jos $HISTFILE:llä on arvo, sitä käytetään, muuten ~/.bash_history.\n"
+" \n"
+" Jos $HISTTIMEFORMAT-muuttuja on asetettu ja se ei ole tyhjä, sen arvoa\n"
+" käytetään strftime(3):n muotoilujonona tulostettaessa kunkin alkion "
+"aikaleima.\n"
+" Muussa tapauksessa aikaleimoja ei tulosteta.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin "
+"tai tapahtuu virhe."
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+"Näyttää töiden tilan.\n"
+" \n"
+" Listaa aktiiviset työt. TYÖMÄÄRITYS rajaa tulostuksen kyseiseen työhön.\n"
+" Ilman valitsimia tulostetaan kaikkien aktiivisten töiden tila.\n"
+" \n"
+" Valitsimet:\n"
+" -l\tlistaa prosessitunnukset (pid) muun tiedon lisäksi\n"
+" -n\tlistaa ainoastaan prosessit joiden tila on muuttunut viimeisen\n"
+" \tilmoituksen jälkeen\n"
+" -p\tlistaa vain prosessitunnukset\n"
+" -r\trajaa tulostus ajossa oleviin töihin\n"
+" \n"
+" Jos -x on annettu, KOMENTO suoritetaan kun kaikki ARGUMENTEISSA annetut\n"
+" työmääritykset on korvattu kyseisen työn prosessiryhmän johtajan "
+"prosessi-\n"
+" tunnuksella.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai \n"
+" tapahtuu virhe. Jos -x:ää on käytetty, palauttaa KOMENNON paluuarvon."
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+"Poistaa töitä nykyisestä komentotulkista.\n"
+" \n"
+" Poistaa kunkin TYÖTUNNISTEEN aktiivisten töiden taulukosta. Ilman\n"
+" TYÖTUNNISTEITA komentotulkki käyttää omaa arviotaan nykyisestä\n"
+" työstä.\n"
+" \n"
+" Valitsimet:\n"
+" -a\tpoista kaikki työt ellei TYÖTUNNISTETTA ole annettu\n"
+" -h\tmerkitse kukin TYÖTUNNISTE siten, ettei niille lähetetä\n"
+" \tSIGHUPia, jos komentotulkki vastaanottaa sellaisen\n"
+" -r\tpoista ainoastaan ajossa olevat työt\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos jokin valitsin tai TYÖTUNNISTE on "
+"virheellinen."
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Lähetä työlle signaali.\n"
+" \n"
+" Lähettää PIDILLÄ tai TYÖTUNNISTEELLA tunnistetulle prosessille\n"
+" SIGSPECILLÄ tai SIGNUMILLA annetun signaalin. Jos kumpaakaan\n"
+" ei ole läsnä, käytetään SIGTERMIÄ.\n"
+" \n"
+" Valitsimet:\n"
+" -s sig\tSIG on signaalin nimi\n"
+" -n sig\tSIG on signaalin numero\n"
+" -l\tlistaa signaalien nimet; â€-lâ€:n jälkeiset argumentit oletetaan\n"
+" \tsignaalinumeroiksi, joiden nimet halutaan listata.\n"
+" \n"
+" Kill on sisäänrakennettu komento kahdesta syystä: se antaa käyttää\n"
+" työtunnisteita prosessitunnusten sijaan, ja sallii prosessien "
+"tappamisen\n"
+" vaikka sallittujen prosessien lukumäärä olisikin ylitetty.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai "
+"tapahtuu virhe."
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+"Laskee matemaattiset lausekkeet.\n"
+" \n"
+" Laskee jokaisen ARGUMENTIN matemaattisena lausekkeena. Evaluointi\n"
+" tehdään kiinteänmittaisina kokonaislukuina ilman ylivuodon "
+"tarkistamista,\n"
+" vaikkakin nollalla jako havaitaan ja ilmoitetaan virheenä. Seuraava \n"
+" operaattorilista on ryhmitelty samanarvoisten operaattoreiden ryhmiin. \n"
+" Evaluointijärjestys on laskeva.\n"
+" \n"
+" \tid++, id--\tmuuttujan jälkilisäys, jälkivähennys\n"
+" \t++id, --id\toperaattorin etulisäys, etuvähennys\n"
+" \t-, +\t\tunaarinen miinus, plus\n"
+" \t!, ~\t\tlooginen ja bittitason negaatio\n"
+" \t**\t\tpotenssiinkorotus\n"
+" \t*, /, %\t\tkertominen, jakaminen, jakojäännös\n"
+" \t+, -\t\tlisäys, vähennys\n"
+" \t<<, >>\t\tbittisiirrot vasemmalle ja oikealle\n"
+" \t<=, >=, <, >\tvertailu\n"
+" \t==, !=\t\tyhtäläisyys, epäyhtäläisyys\n"
+" \t&\t\tbittitason AND\n"
+" \t^\t\tbittitason XOR\n"
+" \t|\t\tbittitason OR\n"
+" \t&&\t\tlooginen AND\n"
+" \t||\t\tlooginen OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tehdollinen operaattori\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tsijoitus\n"
+" \n"
+" Ympäristömuuttujia voidaan käyttää operandeina. Lausekkeessa muuttujan \n"
+" nimi korvataan sen arvolla (määrämittaiseksi kokonaisluvuksi "
+"pakotettuna).\n"
+" Muuttujan integer-attribuutin ei tarvitse olla asetettuna.\n"
+" \n"
+" Operaattorit evaluoidaan laskennallisessa järjestyksessä. Suluissa "
+"olevat \n"
+" alilausekkeet evaluoidaan ensin; suluilla voidaan myös muuttaa \n"
+" edelläkuvattua laskentajärjestystä.\n"
+" \n"
+" Paluuarvo:\n"
+" Jos viimeinen ARGUMENTTI evaluoituu nollaksi, let palauttaa 1, muussa\n"
+" tapauksessa 0."
+
+#: builtins.c:966
+#, fuzzy
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+"Lukee rivin vakiosyötteestä ja jakaa sen kenttiin.\n"
+" \n"
+" Lukee yksittäisen rivin vakiosyötteestä tai tiedostokahvasta\n"
+" FD jos käytetään -u -valitsinta. Rivi jaetaan kenttiin kuten sanatkin, "
+"ja \n"
+" ensimmäinen sana sijoitetaan ensimmäiseen NIMEEN, toinen TOISEEN, ja "
+"niin \n"
+" edelleen, ylijäävien sanojen sijoittuessa viimeiseen NIMEEN. Sanojen \n"
+" erottimiksi hyväksytään vain $IFS-muuttujassa ilmoitetut.\n"
+" \n"
+" Jos NIMIÄ ei ole annettu, luettu rivi sijoitetaan REPLY-muuttujaan.\n"
+" \n"
+" Valitsimet:\n"
+" -a taulukko\tsijoita sanat järjestyksessä taulukkoon TAULUKKO, alkaen\n"
+" \t\tindeksistä nolla\n"
+" -d erotin \tjatka kunnes ensimmäinen EROTTIMEN merkki on luettu, ei\n"
+" \t\trivinvaihto\n"
+" -e käytä readlinea rivin lukemiseksi "
+"interaktiivisessa \n"
+" \t\tkomentotulkissa\n"
+" -i teksti\tkäytä TEKSTIÄ readlinen oletustekstinä\n"
+" -n määrä\t\tpalaa, kun MÄÄRÄ merkkiä on luettu, sen sijaan että \n"
+" \t\todotetaan rivinvaihtoa\n"
+" -p kehote\ttulosta KEHOTE ilman rivinvaihtoa ennen lukua\n"
+" -r\t\tälä salli kenoviivojen käyttöä\n"
+" -s \t\tälä näytä päätteeltä näppäiltyjä merkkejä\n"
+" -t aikaraja\tkeskeytä ja palauta epäonnistuminen jos kokonaista riviä\n"
+" \t\tei saada luettua sekunneissa ilmoitetun AIKARAJAN puitteissa.\n"
+" \t\tMuuttujan TMOUT arvo on oletusarvo. AIKARAJA voi olla \n"
+" \t\treaaliluku.\n"
+"\t\tJos AIKARAJA on 0, read palauttaa onnistumisen vain jos syöte on\n"
+"\t\tvalmiina annetussa tiedostokahvassa. Paluuarvo on suurempi \n"
+" \t\tkuin 128 jos aikaraja ylittyy\n"
+" -u FD\t\tlue tiedostokahvasta FD vakiosyötetiedoston sijaan\n"
+" \n"
+" Paluuarvo:\n"
+" Paluuarvo on nolla, ellei törmätä tiedoston loppumiseen, aikarajan\n"
+" ylitykseen tai mikäli -u:lle annetaan virheellinen tiedostokahva."
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+"Palauttaa komentotulkin funktiosta.\n"
+" \n"
+" Aiheuttaa funktion tai luetun skriptin poistumisen annetulla "
+"paluuarvolla N.\n"
+" Jos N:ää ei ole annettu, palautetaan viimeisen funktiossa tai "
+"skriptissä\n"
+" suoritetun komennon paluuarvo.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa N:n, tai epäonnistuneen mikäli komentotulkki ei ole "
+"suorittamassa\n"
+" funktiota tai skriptiä."
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+"Asettaa tai poistaa komentotulkin valitsimia ja positionaalisia "
+"parametreja.\n"
+" \n"
+" Muuttaa komentotulkin attribuutteja ja positionaalisia parametreja, tai\n"
+" näyttää komentotulkin muuttujien nimet ja arvot.\n"
+" \n"
+" Valitsimet:\n"
+" -a Merkitse luodut tai muutetut parametrit vientiä varten.\n"
+" -b Ilmoita työn päättymisestä välittömästi.\n"
+" -e Poistu välittömästi jos komento palauttaa nollasta poikkeavan "
+"arvon.\n"
+" -f Poista tiedostonimen lavennus käytöstä.\n"
+" -h muista komentojen sijainti sitä mukaa kun niitä etsitään.\n"
+" -k kaikki asetukset sijoitetaan komennon ympäristöön, ei vain ne,\n"
+" jotka ovat ennen komennon nimeä.\n"
+" -m Työnohjaus on käytössä.\n"
+" -n Lue komennot mutta älä suorita niitä.\n"
+" -o valitsimen nimi\n"
+" Aseta muuttuja valitsimen nimen mukaan:\n"
+" allexport\tsama kuin -a\n"
+" braceexpand\tsama kuin -B\n"
+" emacs\t\tkäytä emacs-tyylistä rivieditointia\n"
+" errexit\t\tsama kuin -e\n"
+" errtrace\t\tsama kuin -E\n"
+" functrace\tsama kuin -T\n"
+" hashall\t\tsama kuin -h\n"
+" histexpand\tsama kuin -H\n"
+" history\t\tota komentohistoria käyttöön\n"
+" ignoreeof\tkomentotulkki ei poistu syötteen loppuessa\n"
+" interactive-comments\n"
+" sallii kommentit interaktiivisissa "
+"komennoissa\n"
+" keyword\t\tsama kuin -k\n"
+" monitor\t\tsama kuin -m\n"
+" noclobber\tsama kuin -C\n"
+" noexec\t\tsama kuin -n\n"
+" noglob\t\tsama kuin -f\n"
+" nolog\t\ttällä hetkellä hyväksytty mutta ei huomioida\n"
+" notify\t\tsama kuin -b\n"
+" nounset\t\tsama kuin -u\n"
+" onecmd\t\tsama kuin -t\n"
+" physical\t\tsama kuin -P\n"
+" pipefail\t\tkomentoputken paluuarvo on viimeisen nollasta\n"
+" \t\t\tpoikkeavan komennon paluuarvo, tai nolla jos\n"
+" \t\t\tmikään komento ei palauttanut nollasta \n"
+" \t\t\tpoikkeavaa\n"
+" posix\t\tmuuta bashin toiminta vastaamaan Posixia\n"
+" privileged\tsama kuin -p\n"
+" verbose\t\tsama kuin -v\n"
+" vi\t\tkäytä vi-tyylistä komentorivieditointia\n"
+" xtrace\t\tsama kuin -x\n"
+" -p Asetetaan jos todellinen ja efektiivinen uid eivät täsmää.\n"
+" Poistaa $ENV-tiedoston käsittelyn ja funktioiden tuonnin "
+"käytöstä.\n"
+" Tämän valitsimen poistaminen aiheuttaa efektiivisen uid:n ja gid:"
+"n\n"
+" (käyttäjä- ja ryhmätunnus) asettamisen todelliseksi uid:ksi ja \n"
+" gid:ksi.\n"
+" -t Poistu yhden komennon lukemisen ja suorittamisen jälkeen.\n"
+" -u Kohtele asettamattomia muuttujia virheenä korvauksen yhteydessä.\n"
+" -v Tulosta komentotulkin syöterivit lukemisen myötä.\n"
+" -x Tulosta komennot argumentteineen niitä suoritettaessa.\n"
+" -B Komentotulkki suorittaa aaltosulkeitten laajentamisen\n"
+" -C Jos asetettu, estää tavallisten tiedostojen päällekirjoittamisen\n"
+" uudelleenohjauksella.\n"
+" -E Jos asetettu, ERR-kaappaus periytyy funktioihin\n"
+" -H Ota !-tyylinen historian korvaus käyttöön. Tämä on "
+"oletusarvoisesti\n"
+" päällä, mikäli komentotulkki on interaktiivinen.\n"
+" -P Jos asetettu, älä seuraa symbolisia linkkejä suoritettaessa\n"
+" hakemistoa vaihtavia komentoja, kuten cd.\n"
+" -T Jos asetettu, funktiot perivät DEBUG-kaappauksen\n"
+" - Sijoita loput argumentit positionaalisiin parametreihin. -x - ja \n"
+" -v -optiot poistetaan käytöstä.\n"
+" \n"
+" Mikäli käytetään â€+â€-merkkiä â€-â€:n sijaan, optiot otetaan pois päältä.\n"
+" Valitsimet voidaan myös asettaa komentotulkin käynnistyksessä.\n"
+" Asetetut valitsimet löytyvät muuttujasta $-. Loput N ARGUMENTTIA ovat\n"
+" positionaalisia parametreja ja asetetaan järjestyksessä muuttujiin\n"
+" $1, $2, .. $N. Jos argumentteja ei ole annettu, tulostetaan kaikki\n"
+" ympäristömuuttujat.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistumisen ellei ole annettu virheellistä valitsinta."
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+"Poista ympäristömuuttujien ja funktioiden arvoja ja attribuutteja.\n"
+"\n"
+" Poista jokaisen NIMI-niminen muuttuja tai funktio.\n"
+"\n"
+" Valitsimet:\n"
+" -f\tkohtele jokaista NIMEÄ funktiona\n"
+" -v\tkohtele jokaista NIMEÄ muuttujana\n"
+" \n"
+" Ilman valitsimia unset yrittää ensin poistaa muuttujan, ja mikäli se\n"
+" epäonnistuu, yrittää poistaa funktion.\n"
+" \n"
+" Joitain muuttujia ei voi poistaa; katso myös â€readonlyâ€.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n"
+" tai NIMI on kirjoitussuojattu."
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Aseta ympäristömuuttujien vientiattribuutin.\n"
+" \n"
+" Merkitse kukin NIMI vietäväksi automaattisesti suoritettujen komentojen\n"
+" ympäristöön. Jos ARVO on annettu, se sijoitetaan NIMEEN ennen vientiä.\n"
+" \n"
+" Valitsimet:\n"
+" -f\tviittaa komentotulkin funktioihin\n"
+" -n\tpoista jokaiselta NIMELTÄ vientiattribuutti\n"
+" -p\tlistaa kaikki viedyt muuttujat ja funktiot\n"
+" \n"
+" â€--†argumenttina lopettaa valitsimien käsittelyn.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n"
+" tai NIMI on virheellinen."
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Merkitse ympäristömuuttujat kirjoitussuojatuiksi.\n"
+" \n"
+" Merkitse kukin NIMI kirjoitussuojatuksi; näiden NIMIEN arvoa ei voi\n"
+" muuttaa. Jos ARVO on annettu, sijoita se NIMEEN ennen merkitsemistä\n"
+" kirjoitussuojatuksi.\n"
+" \n"
+" Valitsimet:\n"
+" -a\tviittaa indeksoidun taulukon muuttujiin\n"
+" -A\tviittaa assosiatiivisen taulukon muuttujiin\n"
+" -f\tviittaa funktioihin\n"
+" -p\tnäytä lista kirjoitussuojatuista muuttujista ja funktioista\n"
+" \n"
+" Argumentti â€--†päättää valitsimien käsittelyn.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n"
+" tai NIMI on virheellinen."
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+"Siirrä positionaalisia parametreja.\n"
+" \n"
+" Siirrä positionaalisia parametreja $N+1, $N+2 ... parametreihin $1, "
+"$2 ...\n"
+" Jos N:ää ei ole annettu, sen oletetaan olevan 1.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen ellei N ole negatiivinen tai suurempi kuin $#."
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+"Suorittaa tiedoston komennot nykyisessä komentotulkissa.\n"
+" \n"
+" Lue ja suorita komennot TIEDOSTOSTA nykyisessä tulkissa. $PATH:in\n"
+" komponentteja käytetään TIEDOSTON sisältävän hakemiston haussa.\n"
+" Mahdolliset ARGUMENTIT sijoitetaan positionaalisiksi parametreiksi\n"
+" TIEDOSTOA suoritettaessa.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa viimeisen TIEDOSTON suoritetun komennon paluuarvon; "
+"epäonnistuu\n"
+" mikäli TIEDOSTOA ei voida lukea."
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Keskeyttää komentotulkin suorituksen.\n"
+" \n"
+" Keskeyttää tämän tulkin suorituksen kunnes se saa SIGCONT-signaalin.\n"
+" Sisäänkirjautumistulkkeja ei voi keskeyttää kuin väkisin.\n"
+" \n"
+" Valitsimet:\n"
+" -f\tpakota keskeyttämään, vaikka tulkki olisi sisäänkirjautumis-\n"
+" \ttulkki.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos työnohjaus ei ole käytössä tai "
+"tapahtuu\n"
+" virhe."
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+"Evaluoi ehdollisen lausekkeen.\n"
+" \n"
+" Poistuu arvolla 0 (tosi) tai 1 (epätosi) riippuen LAUSEKKEEN "
+"evaluoinnista.\n"
+" Lausekkeen voivat olla unaarisia tai binäärisiä. Unaarisia lausekkeita\n"
+" käytetään usein tarkistamaan tiedoston tila. On myös merkkijono-\n"
+" operaattoreita, ja operaattoreita numeroiden vertailuun.\n"
+" \n"
+" Tiedosto-operaattorit:\n"
+" \n"
+" -a TIEDOSTO Tosi jos tiedosto on olemassa.\n"
+" -b TIEDOSTO Tosi jos tiedosto on lohkolaite.\n"
+" -c TIEDOSTO Tosi jos tiedosto on merkkilaite.\n"
+" -d TIEDOSTO Tosi jos tiedosto on hakemisto.\n"
+" -e TIEDOSTO Tosi jos tiedosto on olemassa.\n"
+" -f TIEDOSTO Tosi jos tiedosto on olemassa ja on tavallinen "
+"tiedosto.\n"
+" -g TIEDOSTO Tosi jos tiedostolla on set-group-id -bitti.\n"
+" -h TIEDOSTO Tosi jos tiedosto on symbolinen linkki.\n"
+" -L TIEDOSTO Tosi jos tiedosto on symbolinen linkki.\n"
+" -k TIEDOSTO Tosi jos tiedostolla on sticky-bitti.\n"
+" -p TIEDOSTO Tosi jos tiedosto on nimetty putki.\n"
+" -r TIEDOSTO Tosi jos sinulla on lukuoikeus tiedostoon.\n"
+" -s TIEDOSTO Tosi jos tiedosto on olemassa eikä se ole tyhjä.\n"
+" -S TIEDOSTO Tosi jos tiedosto on soketti.\n"
+" -t FD Tosi jos FD on avattu päätteeseen.\n"
+" -u TIEDOSTO Tosi jos tiedostolla on set-user-id -bitti.\n"
+" -w TIEDOSTO Tosi jos sinulla on kirjoitusoikeus tiedostoon.\n"
+" -x TIEDOSTO Tosi jos sinulla on tiedoston suoritusoikeus.\n"
+" -O TIEDOSTO Tosi jos omistat tiedoston.\n"
+" -G TIEDOSTO Tosi jos ryhmäsi omistaa tiedoston.\n"
+" -N TIEDOSTO Tosi jos tiedostoa on muokattu viimeisen "
+"lukukerran\n"
+" jälkeen.\n"
+" \n"
+" TIEDOSTO1 -nt TIEDOSTO2 Tosi jos TIEDOSTO1 on uudempi kuin TIEDOSTO2\n"
+" (muutospäivän perusteella).\n"
+" \n"
+" TIEDOSTO1 -ot TIEDOSTO2 Tosi jos TIEDOSTO1 on vanhempi kuin "
+"TIEDOSTO2.\n"
+" \n"
+" TIEDOSTO1 -ef TIEDOSTO2 Tosi jos TIEDOSTO1 on kovolinkki TIEDOSTO2:"
+"een.\n"
+" \n"
+" Merkkijono-operaattorit:\n"
+" \n"
+" -z JONO Tosi jos JONO on tyhjä.\n"
+" \n"
+" -n JONO\n"
+" JONO Tosi jos JONO ei ole tyhjä.\n"
+" \n"
+" JONO1 = JONO2\n"
+" Tosi jos JONOT ovat samat.\n"
+" JONO1 != JONO2\n"
+" Tosi jos JONOT eivät ole samat.\n"
+" JONO1 < JONO2\n"
+" Tosi jos JONO1 aakkostuu ennen JONO2:ta.\n"
+" JONO1 > JONO2\n"
+" Tosi jos JONO1 aakkostuu JONO2:n jälkeen.\n"
+" \n"
+" Muut operaattorit:\n"
+" \n"
+" -o VALITSIN Tosi jos tulkin VALITSIN on käytössä.\n"
+" ! LAUSEKE Tosi jos LAUSEKE on epätosi.\n"
+" LAUSEKE1 -a LAUSEKE2 \n"
+" Tosi jos molemmat lausekkeet ovat tosia.\n"
+" LAUSEKE1 -o LAUSEKE2 \n"
+" Tosi jos jompikumpi lausekkeista on tosi.\n"
+" \n"
+" ARG1 OP ARG2 Aritmeettiset testit. OP on jokin seuraavista:\n"
+" \t \t -eq, -ne, -lt, -le, -gt tai -ge.\n"
+" \n"
+" Binääriset aritmetiikkaoperaattorit palauttavat toden jos ARG1 on \n"
+" yhtäsuuri, erisuuri, pienempi, pienempi tai yhtä suuri, suurempi\n"
+" tahi suurempi tai yhtä suuri kuin ARG2.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistumisen jos LAUSEKE evaluoituu todeksi; epäonnistuu jos\n"
+" LAUSEKE evaluoituu vääräksi tai on annettu virheellinen argumentti."
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"Evaluoi ehdollisen lausekkeen.\n"
+" \n"
+" Tämä on sisäänrakennetun â€testâ€-komennon synonyymi, mutta viimeisen\n"
+" argumentin pitää olla â€]â€, joka sulkee avaavan â€[â€:n."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Näyttää prosessiajat.\n"
+" \n"
+" Tulostaa kumuloituneet käyttäjä- ja järjestelmäajat sekä "
+"komentotulkille\n"
+" että kaikille sen lapsiprosesseille.\n"
+" \n"
+" Paluuarvo:\n"
+" Onnistuu aina."
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+"Kaappaa signaalit ja muut poikkeamat.\n"
+" \n"
+" Määrittelee ja aktivoi käsittelijöitä, jotka suoritetaan kun "
+"komentotulkki\n"
+" saa signaalin tai muissa tilanteissa.\n"
+" \n"
+" ARGUMENTTI on luettava ja suoritettava komento kun tulkki saa \n"
+" SIGNAALIissa määritellyn signaalin/signaalit. Jos ARGUMENTTI puuttuu\n"
+" (ja vain yksittäinen SIGNAALI on annettu) tai on â€-â€, kukin määrätty\n"
+" signaali palautetaan oletusarvoonsa. Jos ARGUMENTTI on tyhjä "
+"merkkijono,\n"
+" tulkki ja sen käynnistämät komennot jättävät annetut signaalit "
+"huomiotta.\n"
+" \n"
+" Jos SIGNAALI on EXIT (0), ARGUMENTTI suoritetaan tulkin poistuessa.\n"
+" Jos SIGNAALI on DEBUG, ARGUMENTTI suoritetaan ennen jokaista "
+"yksittäistä\n"
+" komentoa.\n"
+" \n"
+" Jos argumentteja ei ole annettu, trap tulostaa kuhunkin signaaliin "
+"liitetyt\n"
+" komennot.\n"
+" \n"
+" Valitsimet:\n"
+" -l\ttulostaa listan signaalien nimistä ja vastaavista numeroista\n"
+" -p\ttulostaa kuhunkin signaaliin liitetyt kaappauskomennot\n"
+" \n"
+" Kukin SIGNAALI on joko signaalin nimi <signal.h>-tiedostossa tai "
+"numero.\n"
+" Signaalien nimet eivät ole aakkoslajillisia ja alkuosa SIG on "
+"valinnainen.\n"
+" Signaali lähetetään tulkille komennolla â€kill -signal $$â€.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneet paitsi jos SIGNAALI on virheellinen tai on "
+"annettu\n"
+" virheellinen valitsin."
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+"Näyttää tietoja komentotyypistä.\n"
+" \n"
+" Näyttää, miten kukin NIMI tulkittaisiin, jos sitä käytettäisiin "
+"komentona.\n"
+" \n"
+" Valitsimet:\n"
+" -a\tnäyttää kaikki paikat, jossa on NIMI-niminen ohjelma; sisältää\n"
+" \taliakset, sisäänrakennetut komennot ja funktiot, jos ja vain\n"
+" \tjos -p -valitsinta ole käytetty\n"
+" -f\testää funktiohaun\n"
+" -P\tpakottaa hakemaan NIMET hakupolulta, vaikka se olisikin alias,\n"
+" \tsisäänrakennettu komento, tai funktio, ja palauttaa \n"
+" \tsuoritettavan levytiedoston nimen\n"
+" -p\tpalauttaa joko suoritettavan levytiedoston nimen, tai ei mitään\n"
+" \tjos â€type -t NIMI†ei palauttaisi â€fileâ€.\n"
+" -t\ttulosta sana, joka on â€aliasâ€, â€keywordâ€, â€functionâ€,\n"
+" \tâ€builtinâ€, â€file†tai â€â€, jos NIMI on alias,\n"
+" \tavainsana, funktio, sisäänrakennettu komento, levytiedosto tai\n"
+" \tsitä ei löytynyt.\n"
+" \n"
+" Argumentit:\n"
+" NIMI\tTulkittavan komennon nimi.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen mikäli kaikki NIMET löytyivät, muussa tapauksessa\n"
+" epäonnistuu."
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Muuttaa komentotulkin resurssirajoituksia.\n"
+" \n"
+" Antaa kontrollin tulkin ja sen luomien prosessien resursseille \n"
+" järjestelmissä, jossa se on mahdollista.\n"
+" \n"
+" Valitsimet:\n"
+" -S\tkäytä â€pehmeää†resurssirajaa\n"
+" -H\tkäytä â€kovaa†resurssirajaa\n"
+" -a\traportoi nykyiset rajat\n"
+" -b\tsoketin puskurikoko\n"
+" -c\tluotujen core-tiedostojen maksimikoko\n"
+" -d\tprosessin datasegmentin maksimikoko\n"
+" -e\tylin skedulointiprioriteetti (â€niceâ€-arvo)\n"
+" -f\tkomentotulkin ja sen lapsiprosessien kirjoittamien tiedostojen\n"
+" \tmaksimikoko\n"
+" -i\todottavien signaalien maksimimäärä\n"
+" -l\tprosessin lukitseman muistin maksimikoko\n"
+" -m\tmuistinvaraisen joukon maksimikoko\n"
+" -n\tavointen tiedostokahvojen maksimimäärä\n"
+" -p\tputken puskurikoko\n"
+" -q\tPOSIX-viestijonoissa olevien tavujen maksimi\n"
+" -r\tsuurin reaaliaikaskedulointi-prioriteetti\n"
+" -s\tpinon maksimikoko\n"
+" -t\tenin CPU-aika sekunneissa\n"
+" -u\tkäyttäjäprosessien maksimimäärä\n"
+" -v\tvirtuaalimuistin koko\n"
+" -x\ttiedostolukitusten maksimimäärä\n"
+" \n"
+" Jos RAJA on annettu, se on määrätyn resurssin uusi arvo; RAJAN "
+"erikoisarvot\n"
+" â€softâ€, â€hard†ja â€unlimited†tarkoittavat nykyistä pehmeää, kovaa ja\n"
+" rajatonta. Muussa tapauksessa tulostetaan annetun resurssin arvo. Jos\n"
+" valitsimia ei ole annettu, oletetaan -f.\n"
+" \n"
+" Arvon ovat 1024 tavun monikertoja, paitsi -t:n, joka on sekuntteja,\n"
+" -p, jota kasvatetaan 512 tavun osissa, ja -u, joka on prosessien \n"
+" skaalaamaton määrä.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n"
+" tai tapahtuu virhe."
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+"Näyttää tai asettaa tiedoston tilamaskin.\n"
+" \n"
+" Asettaa käyttäjän tiedostonluontimaskin TILAKSI. Jos TILAA ei ole \n"
+" annettu, tulostaa maskin nykyisen arvon.\n"
+" \n"
+" Jos TILA alkaa numerolla, se käsitellään oktaalinumerona; muussa\n"
+" tapauksessa se on symbolinen tilamerkkijono jonka chmod(1) hyväksyy.\n"
+" \n"
+" Valitsimet:\n"
+" -p\tjos TILAA ei ole annettu, tulostetaan hyödynnettävässä\n"
+" \tmuodossa\n"
+" -S\ttulostaa symbolisena; muussa tapauksessa tulostetaan\n"
+" \toktaaliluku\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen ellei TILA ole virheellinen tai on annettu \n"
+" virheellinen valitsin."
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Odottaa työn valmistumista ja palauttaa paluuarvon.\n"
+" \n"
+" Odottaa ID:llä tunnistettua prosessia, joka (ID) voi olla "
+"prosessitunnus\n"
+" tai työtunniste, ja palauttaa sen paluuarvon. Jos ID:tä ei ole annettu,\n"
+" odottaa kaikkia tällä hetkellä aktiivisia lapsiprosesseja, ja paluuarvo\n"
+" on nolla. Jos ID on työtunniste, odottaa kaikkia prosesseja työn "
+"komento-\n"
+" putkessa.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa ID:n tilan; epäonnistuu jos ID on virheellinen tai on annettu\n"
+" virheellinen valitsin."
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Odottaa työn valmistumista ja palauttaa paluuarvon.\n"
+" \n"
+" Odottaa annettua prosessia ja palauttaa sen paluuarvon. Jos prosessi-\n"
+" tunnistetta (PID) ei ole annettu, odottaa kaikkia tällä hetkellä "
+"aktiivisia \n"
+" lapsiprosesseja, ja paluuarvo on nolla.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa ID:n tilan; epäonnistuu jos ID on virheellinen tai on annettu\n"
+" virheellinen valitsin."
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Suorittaa komennot listan jokaiselle jäsenelle.\n"
+" \n"
+" â€Forâ€-silmukka suorittaa komentoketjun listan jokaiselle alkiolle. Jos\n"
+" â€in SANAT ...;†ei ole annettu, käytetään rakennetta â€in $@â€. NIMI "
+"asetetaan\n"
+" vuorollaan jokaiseksi SANAT-listan alkioksi, ja KOMENNOT suoritetaan.\n"
+" \n"
+" Paluuarvo:\n"
+" Viimeisen suoritetun komennon paluuarvo."
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Aritmeettinen for-silmukka.\n"
+" \n"
+" Vastaa\n"
+" \t(( LAUSEKE1))\n"
+" \twhile (( LAUSEKE2 )); do\n"
+" \t\tKOMENNOT\n"
+" \t\t(( LAUSEKE3 ))\n"
+" \tdone\n"
+"\n"
+" LAUSEKE1, LAUSEKE2 ja LAUSEKE3 ovat aritmeettisiä lausekkeita. Jos "
+"jokin\n"
+" lauseke on jätetty pois, se tulkitaan 1:ksi.\n"
+" \n"
+" Paluuarvo:\n"
+" Viimeisen suoritetun komennon paluuarvo."
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Valitsee sanat listasta ja suorittaa komennot.\n"
+" \n"
+" SANAT lavennetaan, jolloin saadaan sanalista. Lavennettujen sanojen "
+"joukko\n"
+" tulostetaan vakiovirhetulosteeseen juoksevasti numeroituna. Jos â€in "
+"SANATâ€\n"
+" puuttuu, käytetään rakennetta â€in $@â€. Tämän jälkeen tulostetaan \n"
+" PS3-kehote ja vakiosyötteestä luetaan rivi. Mikäli rivi koostuu \n"
+" numerosta joka vastaa jotakin tulostetuista sanoista, asetetaan NIMEN \n"
+" arvoksi kyseinen sana. Jos rivi on tyhjä, SANAT ja kehote tulostetaan \n"
+" uudelleen. Mikäli saadaan EOF (tiedoston loppu), komento päättyy.\n"
+" Mikä tahansa muu luettu arvo aiheuttaa NIMEN tyhjäämisen. Luettu rivi \n"
+" tallennetaan REPLY-muuttujaan. KOMENNOT suoritetaan kunkin valinnan \n"
+" jälkeen kunnes suoritetaan break-komento.\n"
+"\n"
+" Paluuarvo:\n"
+" Viimeisen suoritetun komennon paluuarvo."
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+"Raportoi komentoketjun suoritusajan.\n"
+" \n"
+" Suorita KOMENTOKETJU ja tulosta yhteenveto käytetystä ajasta, käyttäjän\n"
+" CPU-ajasta ja järjestelmän CPU-ajasta KOMENTOKETJUA suoritettaessa sen\n"
+" päätyttyä.\n"
+" \n"
+" Valitsimet:\n"
+" -p\ttulosta ajastusyhteenveto siirrettävässä POSIX-muodossa.\n"
+" \n"
+" Tulosteen muotoilussa käytetään TIMEFORMAT-muuttujan arvoa.\n"
+" \n"
+" Paluuarvo:\n"
+" KOMENTOKETJUN paluuarvo."
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Suorittaa komentoja tekstihaun perusteella.\n"
+" \n"
+" Suorittaa valikoiden KOMENTOJA perustuen SANAAN joka sopii "
+"MALLINEESEEN.\n"
+" â€|â€:ea käytetään erottamaan mallineita.\n"
+" \n"
+" Paluuarvo:\n"
+" Viimeisen suoritetun komennon paluuarvo."
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Suorittaa komentoja ehdollisesti.\n"
+" \n"
+" â€if KOMENNOTâ€-lista suoritetaan. Jos sen paluuarvo on nolla, "
+"suoritetaan\n"
+" â€then KOMENNOTâ€-lista. Muussa tapauksessa suoritetaan vuorollaan\n"
+" kukin â€elif KOMENNOTâ€-lista, ja jos sen paluuarvo on nolla, suoritetaan\n"
+" vastaava â€then KOMENNOTâ€-lista ja if-komento päätetään. Muutoin\n"
+" suoritetaan â€else KOMENNOTâ€-lista, jos sellainen on. Koko rakenteen\n"
+" paluuarvo on viimeisen komennon paluuarvo tai nolla, jos mikään ehto\n"
+" ei toteutunut.\n"
+"\n"
+" Paluuarvo:\n"
+" Viimeisen suoritetun komennon paluuarvo."
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Suorittaa komentoja niin kauan kun testi onnistuu.\n"
+" \n"
+" Laventaa ja suorittaa KOMENTOJA niin kauan kun viimeinen komento\n"
+" â€while KOMENNOT†palauttaa nollan.\n"
+" \n"
+" Paluuarvo:\n"
+" Viimeisen komennon paluuarvo."
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Suorittaa komentoja niin kauan kun testi epäonnistuu.\n"
+" \n"
+" Laventaa ja suorittaa KOMENTOJA niin kauna kun viimeinen komento\n"
+" â€until KOMENNOT†palauttaa nollasta poikkeavan paluuarvon.\n"
+" \n"
+" Paluuarvo:\n"
+" Viimeisen suoritetun komennon paluuarvo."
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+"Luo NIMI-nimisen rinnakkaisprosessin.\n"
+" \n"
+" Suorittaa KOMENNON asynkronisesti, vakiotuloste ja vakiosyöte\n"
+" ohjattuna putken kautta tiedostokahvoihin suorittavan tulkin NIMI-"
+"nimisen\n"
+" taulukon indekseihin 0 ja 1. Oletus-NIMI on â€COPROCâ€.\n"
+" \n"
+" Paluuarvo:\n"
+" KOMENNON paluuarvo."
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+"Luo funktion.\n"
+" \n"
+" Luo komentotulkin funktion NIMI. Jos NIMI käynnistetään komentona,\n"
+" KOMENNOT ajetaan kutsuvan tulkin ympäristössä. Kun NIMI käynnistetään,\n"
+" sen argumentit välitetään parametreina $1...$n, ja funktion nimi\n"
+" sijoitetaan muuttujaan $FUNCNAME.\n"
+" \n"
+" Paluuarvo:\n"
+" Onnistuu, ellei NIMI ole kirjoitussuojattu."
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Ryhmittää komennot.\n"
+" \n"
+" Suorittaa komennot ryhmässä. Tämä on eräs tapa uudelleenohjata "
+"kokonaisen\n"
+" komentojoukon tulosteet.\n"
+" \n"
+" Paluuarvo:\n"
+" Viimeisen suoritetun komennon paluuarvo."
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+"Siirtää komennon edustalle.\n"
+" \n"
+" Sama kuin â€fgâ€-komennon TYÖNKUVAAJA-argumentti. Jatkaa joko "
+"keskeytettyä\n"
+" tai taustatyötä. TYÖNKUVAAJA voi määritellä joko työn nimen tai "
+"numeron.\n"
+" Jos TYÖNKUVAAJAA seuraa â€&†siirretään työ taustalle, kuten jos "
+"työnkuvaaja\n"
+" olisi annettu â€bgâ€-komennon argumentiksi.\n"
+" \n"
+" Paluuarvo:\n"
+" Työn tila."
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+"Evaluoi artimeettinen lauseke.\n"
+" \n"
+" LAUSEKKEEN arvo evaluoidaan laskentasääntöjen mukaisesti. Sama kuin\n"
+" â€let LAUSEKEâ€.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa 1, jos LAUSEKKEEN arvo on 0; muuten palauttaa 0."
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+"Suorittaa ehdollisen komennon.\n"
+" \n"
+" Palauttaa 0 tai 1 riippuen ehdollisen LAUSEKKEEN tuloksesta. "
+"Lausekkeissa\n"
+" käytetään samoja primäärejä kuin sisäänrakennetussa â€testâ€-komennossa,\n"
+" ja voidaan yhdistellä seuraavilla operaattoreilla:\n"
+" \n"
+" ( LAUSEKE )\tPalauttaa LAUSEKKEEN arvon\n"
+" ! LAUSEKE\t\tTosi jos LAUSEKE on epätosi; muuten epätosi\n"
+" LAUSEKE1 && LAUSEKE2\tTosi jos molemmat lausekkeet ovat tosia, muuten\n"
+" \t\tepätosi\n"
+" LAUSEKE1 || LAUSEKE2\tTosi jos jompikumpi lausekkeista on tosi,\n"
+" \t\t\tmuuten epätosi\n"
+" \n"
+" Käytettäessä â€==â€- ja â€!=â€-operaattoreita oikeanpuoleista merkkijonoa \n"
+" käytetään mallineena ja suoritetaan haku sen perusteella. Operaattoria\n"
+" â€=~†käytettäessä oikeanpuoleinen merkkijonoa käsitellään kuten "
+"säännöllistä\n"
+" lauseketta.\n"
+"\n"
+" Operaattorit â€&&†ja â€||†eivät evaluoi LAUSEKETTA2 jos LAUSEKE1 "
+"riittää\n"
+" lausekkeen arvon päättelyyn.\n"
+" \n"
+" Paluuarvo:\n"
+" 0 tai 1 riippuen LAUSEKKEEN arvosta."
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+"Yleisiä komentotulkin muuttujia ja niiden käyttö.\n"
+" \n"
+" BASH_VERSION\tTämän Bashin versiotiedot.\n"
+" CDPATH\tKaksoispistein eroteltu lista hakemistoista, joista etsitään\n"
+" \t\tâ€cdâ€-komennolle argumentiksi annettua hakemistoa.\n"
+" GLOBIGNORE\tKaksoispistein eroteltu lista mallineista, joihin sopivat\n"
+" \t\ttiedostonimet jätetään huomiotta polun laventamisessa.\n"
+" HISTFILE\tTiedosto, johon komentohistoriasi tallennetaan.\n"
+" HISTFILESIZE\tMaksimi rivimäärä tähän tiedostoon tallennetaan.\n"
+" HISTSIZE\tTulkin käytettävissä olevien historiarivien maksimimäärä\n"
+" HOME\tTäydellinen polku sisäänkirjautumishakemistoosi.\n"
+" HOSTNAME\tNykyisen palvelimen nimi.\n"
+" HOSTTYPE\tCPU-tyyppi, jonka alaisuudessa tämä Bash-versio on ajossa.\n"
+" IGNOREEOF\tKontrolloi, miten tulkki toimii saadessaan syötteenä pelkän\n"
+" \t\tEOF:n (tiedoston loppu). Jos asetettu, sen määrittelemä\n"
+" \t\tlukumäärä EOF:iä voidaan lukea syötteenä peräkkäin ennenkuin\n"
+" \t\ttulkki poistuu (oletuksena 10). Jos ei ole asetettu, EOF\n"
+" \t\tmerkitsee syötteen loppua.\n"
+" MACHTYPE\tJärjestelmää kuvaava merkkijono.\n"
+" MAILCHECK\tMiten monen sekunnein välein Bash tarkistaa uudet postit.\n"
+" MAILPATH\tKaksoispistein eroteltu lista tiedostoista joista Bash\n"
+" \t\ttarkistaa uudet postit.\n"
+" OSTYPE\tJärjestelmän Unix-versio.\n"
+" PATH\tKaksoispistein eroteltu lista hakemistoista, joista etsitään\n"
+" \t\tkomentoja.\n"
+" PROMPT_COMMAND\tEnnen primäärin kehotteen tulostamista suoritettava\n"
+" \t\tkomento.\n"
+" PS1\t\tPrimääri komentokehote.\n"
+" PS2\t\tSekundääri kehote.\n"
+" PWD\t\tNykyisen hakemiston täydellinen polkunimi.\n"
+" SHELLOPTS\tKaksoispistein eroteltu lista käytössä olevista tulkin\n"
+" \t\tvalitsimista.\n"
+" TERM\tKäytettävän päätetyypin nimi.\n"
+" TIMEFORMAT\tâ€timeâ€-käskyn tulosteen muotoilumalline.\n"
+" auto_resume\tJos ei tyhjä, ensimmäistä rivillä olevaa komentosanaa "
+"etsitään\n"
+" \t\tkeskeytettyjen töiden listasta. Jos sana löydetään, kyseinen\n"
+" \t\ttyö tuodaan esiin. â€exactâ€-arvo tarkoittaa, että komentosanan\n"
+" \t\tpitää olla täysin sama kuin keskeytettyjen listalta löytyvä.\n"
+" \t\tArvo â€substring†tarkoittaa että komentosanan pitää olla\n"
+" \t\tosa työnimeä. Mikä tahansa muu tarkoittaa että komennon pitää\n"
+" \t\tolla keskeytetyn työn nimen alkuosa.\n"
+" histchars\tMerkit, jotka ohjaavat historialistasta hakua ja "
+"pikakorvausta.\n"
+" \t\tEnsimmäinen merkki on historiakorvausmerkki, tavallisesti â€!â€.\n"
+" \t\tToinen, pikakorvausmerkki, on yleensä â€^â€. Kolmas merkki,\n"
+" \t\ttavallisesti â€#â€, on historiakommentti.\n"
+" HISTIGNORE\tKaksoispistein eroteltu lista mallineista, joita käytetään\n"
+" \t\tpäätettäessä komentojen tallentamisesta historialistaan.\n"
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Lisää hakemistoja pinoon.\n"
+" \n"
+" Lisää hakemiston hakemistopinon päällimmäiseksi, tai kierrättää pinoa,\n"
+" jolloin nykyhakemisto siirretään pinon päällimmäiseksi. Ilman "
+"argumentteja\n"
+" vaihtaa pinon kaksi päällimmäistä keskenään.\n"
+" \n"
+" Valitsimet:\n"
+" -n\tJättää normaalin hakemiston vaihdon tekemättä lisättäessä\n"
+" \t\thakemistoja pinoon, joten ainoastaan pinoa muokataan.\n"
+" \n"
+" Argumentit:\n"
+" +N\tKierrättää pinoa niin, että N:s hakemisto (laskien vasemmalta\n"
+" \t\tâ€dirsâ€-komennon tuottamasta listasta, alkaen nollasta) on\n"
+" \t\tpinon päällimmäisenä.\n"
+" -N\tKierrättää pinoa niin, että N:s hakemisto (laskien oikealta\n"
+" \t\tâ€dirsâ€-komennon tuottamasta listasta, alkaen nollasta) on\n"
+" \t\tpinon päällimmäisenä.\n"
+" HAKEM\tLisää HAKEMIN hakemistopinon päällimmäiseksi ja tekee \n"
+" \t\tsiitä työhakemiston.\n"
+" \n"
+" Sisäänrakennettu â€dirs†näyttää hakemistopinon.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen, paitsi jos on annettu virheellinen argumentti "
+"tai\n"
+" hakemiston vaihtaminen epäonnistuu."
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Poistaa hakemistoja pinosta.\n"
+" \n"
+" Poistaa alkioita hakemistopinosta. Ilman argumentteja poistaa\n"
+" pinon päällimmäisen, ja siirtyy uuteen ylimpään hakemistoon.\n"
+" \n"
+" Valitsimet:\n"
+" -n\tJättää normaalin hakemistoon siirtymisen suorittamatta,\n"
+" \t\tjoten vain pinoa muokataan.\n"
+" +N\tPoistaa N:nnen alkion (laskien vasemmalta â€dirsâ€-komennon\n"
+" \t\ttuottamasta listasta, alkaen nollasta). Esimerkiksi â€popd +0â€\n"
+" \t\tpoistaa ensimmäisen hakemiston, â€popd +1†toisen.\n"
+" -N\tPoistaa N:nnen alkion (laskien oikealta â€dirsâ€-komennon\n"
+" \ttuottamasta listasta, alkaen nollasta). Esimerkiksi â€popd -0â€\n"
+" \tpoistaa viimeisen hakemiston, â€popd -1†toiseksi viimeisen.\n"
+"\n"
+" Sisäänrakennettu â€dirsâ€-komento listaa hakemistopinon.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos on annettu virheellinen argumentti tai\n"
+" hakemiston vaihto epäonnistuu."
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Näyttää hakemistopinon.\n"
+" \n"
+" Näyttää listan tällä hetkellä muistetuista hakemistoista. Hakemistot\n"
+" päätyvät listalle â€pushdâ€-komennolla; voit selata pinoa â€popdâ€-\n"
+" komennolla.\n"
+" \n"
+" Valitsimet:\n"
+" -c\tTyhjennä hakemistopino poistamalla kaikki alkiot\n"
+" -l\tälä tulosta tilde-alkuisia versioita kotihakemistoon \n"
+" \tsuhteutetuista hakemistoista\n"
+" -p\ttulosta hakemistopuu hakemisto per rivi\n"
+" -v\ttulosta hakemistopuu, hakemisto per rivi, numeroituina \n"
+" \tpinoindeksin mukaan\n"
+" \n"
+" Argumentit:\n"
+" +N\tNäyttää N:nnen alkion (â€dirsâ€-komennon tuottamasta listasta\n"
+" \tvasemmalta laskien) alkaen nollasta käynnistettäessä ilman\n"
+" \toptioita.\n"
+" -N\tNäyttää N:nnen alkion (â€dirsâ€-komennon tuottamasta listasta\n"
+" \toikealta laskien) alkaen nollasta käynnistettäessä ilman\n"
+" \toptioita.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n"
+" tai tapahtuu virhe."
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+"Asettaa ja poistaa komentotulkin valitsimia.\n"
+" \n"
+" Muuttaa kunkin tulkin VALITSIMEN asetuksen. Ilman argumentteja\n"
+" listaa kaikki tulkin valitsimet ja tiedon, onko valitsin voimassa \n"
+" vai ei.\n"
+" \n"
+" Valitsimet:\n"
+" -o\trajaa VALITSIMET niihin, jotka on määritelty käytettäväksi\n"
+" \tâ€set -oâ€:lla\n"
+" -p\ttulosta kukin tulkin valitsin ja sen tila\n"
+" -q\tälä tulosta\n"
+" -s\taseta kukin VALITSIN\n"
+" -u\tpoista kukin VALITSIN\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen, mikäli VALITSIN on käytössä, epäonnistuu jos on\n"
+" annettu virheellinen VALITSIN tai VALITSIN ei ole käytössä."
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+"Muotoilee ja tulostaa ARGUMENTIT MUOTOILULLA muotoiltuna.\n"
+" \n"
+" Valitsimet:\n"
+" -v muuttuja\tsijoita tuloste muuttujaan MUUTTUJA, älä tulosta\n"
+" \n"
+" MUOTOILU on merkkijono, joka koostuu kolmentyyppisistä alkioista:\n"
+" tavallisista merkeistä, jotka vain kopioidaan vakiotulosteeseen;\n"
+" escape-yhdistelmistä, jotka muunnetaan ja kopioidaan vakiotulosteeseen; "
+"ja\n"
+" muotoilumäärityksistä, joista jokainen aiheuttaa seuraavan vuorossa\n"
+" olevan argumentin tulostamisen.\n"
+"\n"
+" Printf(1):n ja printf(3):n vakiomuotoilujen lisäksi printf tulkitsee:\n"
+" %b\tlavenna escape-yhdistelmät vastaavassa argumentissa\n"
+" %q\tkapseloi argumentti siten, että se voidaan käyttää tulkin\n"
+" \tsyötteenä\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai\n"
+" tapahtuu kirjoitus- tai sijoitusvirhe."
+
+#: builtins.c:1895
+#, fuzzy
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Määrittelee miten readline täydentää argumentit.\n"
+" \n"
+" Määrittelee, miten kukin NIMI täydennetään. Ilman valitsimia "
+"tulostetaan\n"
+" nykyiset täydennysmääritykset siten, että niitä voidaan käyttää \n"
+" syötteenä.\n"
+" \n"
+" Valitsimet:\n"
+" -p\ttulostaa olemassa olevat täydennysmääritykset \n"
+" hyödynnettävässä muodossa\n"
+" -r\tpoista täydennysmääritys kultakin NIMELTÄ, tai, jos NIMIÄ ei\n"
+" \tole annettu, kaikki täydennysmääritykset\n"
+" \n"
+" Täydennystä yritettäessä toimenpiteen suoritetaan samassa "
+"järjestyksessä\n"
+" missä isoilla kirjoitetut valitsimet on edellä listattu.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai \n"
+" tapahtuu virhe."
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Näyttää mahdolliset täydenteet valitsimista riippuen.\n"
+" \n"
+" Tarkoitettu käytettäväksi komentotulkin funktiossa, joka luo "
+"mahdollisia\n"
+" täydenteitä. Jos valinnainen argumentti SANA on annettu, luodaan siihen\n"
+" sopivat täydenteet.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai\n"
+" tapahtuu virhe."
+
+#: builtins.c:1938
+#, fuzzy
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+"Muuttaa tai näyttää täydennysvalitsimet.\n"
+" \n"
+" Muuttaa kunkin NIMEN, tai jos NIMIÄ ei ole annettu, tämänhetkisen\n"
+" täydennyksen täydennysvalitsimia. Jos VALITSIMIA ei ole annettu, \n"
+" tulostaa kunkin NIMEN tai tämänhetkisen täydennyksen \n"
+" täydennysvalitsimet.\n"
+" \n"
+" Valitsimet:\n"
+" \t-o valitsin\taseta täydennysvalitsin VALITSIN kullekin NIMELLE\n"
+" \n"
+" Käyttämällä â€+oâ€:ta â€-oâ€:n sijaan kyseinen valitsin poistetaan.\n"
+" \n"
+" Argumentit:\n"
+" \n"
+" Kukin NIMI viittaa komentoon jolle täydennysmääritys on ollut pakko\n"
+" määritellä aiemmin käyttämällä sisäänrakennettua komentoa â€completeâ€.\n"
+" Jos NIMIÄ ei ole annettu, compoptia pitää kutsua tällä hetkellä\n"
+" täydennyksiä tuottavasta funktiosta, ja sen valitsimia muutetaan.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin tai\n"
+" NIMELLE ei ole määritetty täydennysmääritystä."
+
+#: builtins.c:1968
+#, fuzzy
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+"Lukee rivejä vakiosyötteestä taulukkomuuttujaan.\n"
+" \n"
+" Lukee rivejä vakiosyötteestä taulukkomuuttujaan TAULUKKO, tai \n"
+" tiedostokahvasta TK jos käytetään -u -valitsinta. Muuttuja MAPFILE\n"
+" on oletus-TAULUKKO.\n"
+" \n"
+" Valitsimet:\n"
+" -n laskuri\tKopioi korkeintaan LASKURI riviä. Jos LASKURI on 0,\n"
+" \t\tkaikki rivit kopioidaan.\n"
+" -O alku\t\tAloita sijoitus indeksistä ALKU. Oletusindeksi on 0.\n"
+" -s laskuri\tHylkää LASKURI ensimmäistä luettua riviä.\n"
+" -t\t\tPoista rivinloppumerkki jokaisesta luetusta rivistä.\n"
+" -u TK\t\tLue rivit tiedostokahvasta TK.\n"
+" -C paluukutsu\tSuorita PALUUKUTSU aina, kun MÄÄRÄ riviä on luettu.\n"
+" -c määrä\t\tMäärittele, montako riviä luetaan ennen kutakin \n"
+" \t\tPALUUKUTSUA.\n"
+" \n"
+" Argumentit:\n"
+" TAULUKKO\t\tTaulukkomuuttuja, johon tiedot luetaan.\n"
+"\n"
+" Jos -C on annettu ilman -c:tä, oletusmäärä on 5000. Kun PALUUKUTSUA\n"
+" evaluoidaan, sille annetaan indeksi seuraavaan sijoituspaikkaan\n"
+" ylimääräisenä argumenttina.\n"
+" \n"
+" Jos ALKUA ei ole annettu, mapfile tyhjentää TAULUKON ennen siihen\n"
+" sijoittamista.\n"
+" \n"
+" Paluuarvo:\n"
+" Palauttaa onnistuneen paitsi jos on annettu virheellinen valitsin\n"
+" tai TAULUKKO on kirjoitussuojattu."
+
+# Changed " characters into â€...
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+"Lukee rivit tiedostosta taulukkomuuttujaan.\n"
+" \n"
+" â€mapfileâ€:n synonyymi."
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xrealloc: ei voida uudelleenvarata %lu tavua (varattiin %lu tavua)"
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: ei voida varata %lu tavua"
+
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: %s:%d: ei voida uudelleenvarata %lu tavua (varattiin %lu tavua)"
diff --git a/po/fr.gmo b/po/fr.gmo
new file mode 100644
index 0000000..9fe681f
--- /dev/null
+++ b/po/fr.gmo
Binary files differ
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 0000000..52d5e1f
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,5593 @@
+# Messages français pour GNU concernant bash.
+# Copyright © 2008 Free Software Foundation, Inc.
+# Michel Robitaille <robitail@IRO.UMontreal.CA>, 2004
+# Christophe Combelles <ccomb@free.fr>, 2008
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bash 3.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2008-03-13 13:10+0100\n"
+"Last-Translator: Christophe Combelles <ccomb@free.fr>\n"
+"Language-Team: French <traduc@traduc.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "mauvais indice de tableau"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr ""
+
+#: arrayfunc.c:480
+#, fuzzy, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s : nom d'action non valable"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s : impossible d'assigner à un index non numérique"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s : impossible de créer : %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+"bash_execute_unix_command : impossible de trouver le mappage clavier pour la "
+"commande"
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s : le premier caractère non vide n'est pas « \" »"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "pas de « %c » de fermeture dans %s"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s : virgule de séparation manquante"
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "« %s » : nom du mappage clavier invalide"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr ""
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "« %s » : nom du mappage clavier invalide"
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s : impossible de lire : %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "%s : impossible à délier"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "%s : nom de fonction inconnu"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s n'est lié à aucune touche.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s peut être appelé via "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr ""
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "ceci n'a un sens que dans une boucle « for », « while » ou « until »"
+
+#: builtins/caller.def:133
+#, fuzzy
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr "Renvoie le contexte de l'appel de sous-routine actuel"
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "« HOME » non défini"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "« OLDPWD » non défini"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr ""
+
+#: builtins/common.c:139 error.c:261
+#, fuzzy, c-format
+msgid "warning: "
+msgstr "%s : avertissement :"
+
+#: builtins/common.c:153
+#, fuzzy, c-format
+msgid "%s: usage: "
+msgstr "%s : avertissement :"
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "trop d'arguments"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s : l'option nécessite un argument"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s : argument numérique nécessaire"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s : non trouvé"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s : option non valable"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s : nom d'option non valable"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "« %s » : identifiant non valable"
+
+#: builtins/common.c:238
+#, fuzzy
+msgid "invalid octal number"
+msgstr "Numéro de signal non valable"
+
+#: builtins/common.c:240
+#, fuzzy
+msgid "invalid hex number"
+msgstr "nombre non valable"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "nombre non valable"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s : indication de signal non valable"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr ""
+"« %s » : ce n'est pas un n° de processus ou une spécification de tâche "
+"valable"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s : variable en lecture seule"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s : %s hors plage"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "argument"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s hors plage"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s : tâche inexistante"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s : pas de contrôle de tâche"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "pas de contrôle de tâche"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s : restreint"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "restreint"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s : ceci n'est pas une primitive du shell"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "erreur d'écriture : %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s : erreur de détermination du répertoire actuel : %s : %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s : spécification de tâche ambiguë"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s : nom d'action non valable"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s : pas d'indication de complètement"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr ""
+"avertissement : l'option « -F » peut fonctionner différemment de ce à quoi "
+"vous vous attendez"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr ""
+"avertissement : l'option « -C » peut fonctionner différemment de ce à quoi "
+"vous vous attendez"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr ""
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "utilisable seulement dans une fonction"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "« -f » ne peut pas être utilisé pour fabriquer des fonctions"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s : fonction en lecture seule"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s : impossible de détruire des variables tableaux de cette façon"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "chargement dynamique non disponible"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "impossible d'ouvrir l'objet partagé %s : %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "impossible de trouver %s dans l'objet partagé %s : %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s : non chargé dynamiquement"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s : impossible d'effacer : %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s : ceci est un répertoire"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s : ceci n'est pas un fichier régulier"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s : le fichier est trop grand"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s : fichier binaire impossible à lancer"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s : impossible d'exécuter : %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr ""
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "ce n'est pas un shell de connexion : utilisez « exit »"
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "Il y a des tâches stoppées.\n"
+
+#: builtins/exit.def:122
+#, fuzzy, c-format
+msgid "There are running jobs.\n"
+msgstr "Il y a des tâches stoppées.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "aucune commande trouvée"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "indication d'historique"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s : impossible d'ouvrir le fichier temporaire : %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr ""
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "tâche %d démarrée sans contrôle de tâche"
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s : option non permise -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s : l'option nécessite un argument -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "hachage désactivé"
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s : table de hachage vide\n"
+
+#: builtins/hash.def:244
+#, fuzzy, c-format
+msgid "hits\tcommand\n"
+msgstr "dernière commande : %s\n"
+
+#: builtins/help.def:130
+#, fuzzy, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Commandes du shell correspondant au mot-clé « "
+msgstr[1] "Commandes du shell correspondant au mot-clé « "
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"Aucune rubrique d'aide ne correspond à « %s ». Essayez « help help », « man -"
+"k %s » ou « info %s »."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s : impossible d'ouvrir : %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"Ces commandes de shell sont définies de manière interne.Tapez « help » pour "
+"voir cette liste.\n"
+"Tapez « help nom » pour en savoir plus sur la fonction qui s'appelle « nom "
+"».\n"
+"Utilisez « info bash » pour en savoir plus sur le shell en général.\n"
+"Utilisez « man -k » ou « info » pour en savoir plus sur les commandes qui\n"
+"ne font pas partie de cette liste.\n"
+"\n"
+"Une astérisque (*) à côté d'un nom signifie que la commande est désactivée.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "impossible d'utiliser plus d'une option parmi « -anrw »"
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "position dans l'historique"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s : l'expansion de l'historique a échoué"
+
+#: builtins/inlib.def:71
+#, fuzzy, c-format
+msgid "%s: inlib failed"
+msgstr "%s : l'expansion de l'historique a échoué"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "pas d'autre option permise avec « -x »"
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr ""
+"%s : les arguments doivent être des identifiants de tâche ou de processus"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Erreur inconnue"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "une expression est attendue"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s : n'est pas une variable tableau"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s : spécification de descripteur de fichier non valable"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d : descripteur de fichier non valable : %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, fuzzy, c-format
+msgid "%s: invalid line count"
+msgstr "%s : option non valable"
+
+#: builtins/mapfile.def:277
+#, fuzzy, c-format
+msgid "%s: invalid array origin"
+msgstr "%s : option non valable"
+
+#: builtins/mapfile.def:294
+#, fuzzy, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s : nom d'action non valable"
+
+#: builtins/mapfile.def:326
+#, fuzzy
+msgid "empty array variable name"
+msgstr "%s : n'est pas une variable tableau"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr ""
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "« %s » : caractère de format manquant"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "« %c » : caractère de format non permis"
+
+#: builtins/printf.def:578
+#, fuzzy, c-format
+msgid "warning: %s: %s"
+msgstr "%s : avertissement :"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "chiffre hexadécimal manquant pour \\x"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "pas d'autre répertoire"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<aucun répertoire courant>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr ""
+
+#: builtins/pushd.def:508
+#, fuzzy
+msgid "directory stack index"
+msgstr "Débordement négatif de la pile de récursivité"
+
+#: builtins/pushd.def:683
+#, fuzzy
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+"Affiche la liste des répertoires actuellement mémorisés. Les répertoires\n"
+" sont insérés dans la liste avec la commande « pushd ». Vous pouvez "
+"remonter\n"
+" dans la liste en enlevant des éléments avec la commande « popd ».\n"
+" \n"
+" L'option « -l » spécifie que « dirs » ne doit pas afficher des versions\n"
+" raccourcies des répertoires relativement à votre répertoire personnel.\n"
+" Cela signifie que « ~/bin » devrait être affiché comme « /homes/bfox/bin "
+"».\n"
+" L'option « -v » permet à « dirs » d'afficher la pile des répertoires "
+"avec\n"
+" un élément par ligne, en commençant la ligne par la position dans la "
+"pile.\n"
+" L'option « -p » fait la même chose mais le numéro de position n'est pas\n"
+" affiché. L'option « -c » efface la pile des répertoires en enlevant "
+"tous\n"
+" les éléments.\n"
+" \n"
+" +N\t affiche le Nième élément en comptant de zéro depuis la gauche de "
+"la\n"
+" liste affichée par « dirs » lorsque celle-ci est appelée sans option.\n"
+" \n"
+" -N\t affiche le Nième élément en comptant de zéro depuis la droite de "
+"la\n"
+" liste affichée par « dirs » lorsque celle-ci est appelée sans option."
+
+#: builtins/pushd.def:705
+#, fuzzy
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Ajoute un répertoire en haut de la pile des répertoires, ou permute\n"
+" la pile, de façon que le répertoire en haut de la pile devienne\n"
+" le nouveau répertoire de travail. S'il n'y a pas d'argument, les deux\n"
+" répertoires en haut de la pile sont échangés.\n"
+" \n"
+" +N\tPermute la pile de façon que le Nième répertoire se place en haut,\n"
+" \ten comptant de zéro depuis la gauche de la liste fournie par « dirs "
+"».\n"
+" \n"
+" -N\tPermute la pile de façon que le Nième répertoire se place en haut,\n"
+" \ten comptant de zéro depuis la droite de la liste fournie par « dirs "
+"».\n"
+" \n"
+" -n\tne change pas de répertoire de travail lorsque des répertoires\n"
+" \tsont ajoutés à la pile, de façon que seule la pile soit manipulée\n"
+" \n"
+" dir\tajoute le répertoire DIR en haut de la pile, et en fait le nouveau\n"
+" \trépertoire de travail.\n"
+" \n"
+" Vous pouvez voir la pile des répertoires avec la commande « dirs »."
+
+#: builtins/pushd.def:730
+#, fuzzy
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Enlève des éléments de la pile des répertoires. S'il n'y a pas\n"
+" d'argument, le répertoire en haut de la pile est enlevé,\n"
+" et le nouveau sommet de la pile devient le répertoire de travail.\n"
+" \n"
+" +N\tEnlève le Nième répertoire, en comptant de zéro depuis la gauche\n"
+" \tde la liste fournie par « dirs ». Par exemple : « popd +0 »\n"
+" \n"
+"enlève le premier répertoire, « popd +1 » le deuxième. \n"
+" -N\tEnlève le Nième répertoire, en comptant de zéro depuis la droite\n"
+" \tde la liste fournie par « dirs ». Par exemple : « popd -0 »\n"
+" \n"
+"enlève le dernier répertoire, « popd -1 » l'avant-dernier. \n"
+" -n\tne change pas de répertoire de travail lorsque des répertoires\n"
+" \tsont enlevés de la pile, de façon que seule la pile soit manipulée\n"
+" \n"
+" Vous pouvez voir la pile des répertoires avec la commande « dirs »."
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s : spécification de délai d'expiration non valable"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "Erreur de lecture : %d : %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+"« return » n'est possible que depuis une fonction ou depuis un script "
+"exécuté par « source »"
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr ""
+"« unset » ne peut pas s'appliquer simultanément à une fonction et à une "
+"variable"
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s : « unset » impossible"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s : « unset » impossible : %s est en lecture seule"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s : n'est pas une variable tableau"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s : n'est pas une fonction"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "nombre de « shift »"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr ""
+"les options du shell ne peuvent pas être simultanément activées et "
+"désactivées"
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s : nom d'option du shell non valable"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "nom de fichier nécessaire en argument"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s : fichier introuvable"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "suspension impossible"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "un shell de connexion ne peut pas être suspendu"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "%s est un alias vers « %s »\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s est un mot-clé du shell\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s est une fonction\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "%s est une primitive du shell\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s est %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "%s est haché (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s : argument de limite non valable"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "« %c » : mauvaise commande"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s : impossible d'obtenir la limite : %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr ""
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s : impossible de modifier la limite : %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "Nombre octal"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "« %c » : opérateur de mode symbolique non valable"
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "« %c » : caractère de mode symbolique non valable"
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr ""
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "dernière commande : %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "Annulation..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "erreur de commande inconnue"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "mauvais type de commande"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "mauvais connecteur"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "mauvais saut"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s : variable sans liaison"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "attente de données expirée : déconnexion automatique\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "l'entrée standard ne peut pas être redirigée depuis /dev/null : %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "TIMEFORMAT : « %c » : caractère de format non valable"
+
+#: execute_cmd.c:2075
+#, fuzzy
+msgid "pipe error"
+msgstr "erreur d'écriture : %s"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr ""
+"%s : restriction : « / » ne peut pas être spécifié dans un nom de commande"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s : commande introuvable"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s : %s : mauvais interpréteur"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "Impossible de dupliquer le fd %d vers le fd %d"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "Dépassement du niveau de récursivité dans l'expression"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "Débordement négatif de la pile de récursivité"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "erreur de syntaxe dans l'expression"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "tentative d'affectation à une non-variable"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "division par 0"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "bogue : mauvais symbole pour expassign"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "« : » attendu pour une expression conditionnelle."
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "exposant négatif"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr "identifiant attendu après un pré-incrément ou un pré-décrément"
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "« ) » manquante"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "erreur de syntaxe : opérande attendue"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "erreur de syntaxe : opérateur arithmétique non valable"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr ""
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "base arithmétique non valable"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "valeur trop grande pour la base"
+
+#: expr.c:1329
+#, fuzzy, c-format
+msgid "%s: expression error\n"
+msgstr "%s : nombre entier attendu comme expression"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getcwd : ne peut accéder aux répertoires parents"
+
+#: input.c:94 subst.c:4857
+#, fuzzy, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "Impossible de réinitialiser le mode « nodelay » pour le fd %d"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+"impossible d'allouer un nouveau descripteur de fichier pour l'entrée de bash "
+"depuis le fd %d"
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "save_bash_input : le tampon existe déjà pour le nouveau fd %d"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr ""
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr "le processus cloné n°%d apparaît dans la tâche en fonctionnement %d"
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "suppression de la tâche stoppée %d avec le groupe de processus %ld"
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr ""
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr ""
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid : %ld : n° de processus inexistant"
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr ""
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr ""
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr ""
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr ""
+
+#: jobs.c:1443
+msgid "Running"
+msgstr ""
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr ""
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr ""
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr ""
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr ""
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr ""
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr ""
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait : le processus n°%ld n'est pas un fils de ce shell."
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "wait_for : aucun enregistrement du processus n°%ld"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job : la tâche %d est stoppée"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s : la tâche s'est terminée"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s : la tâche %d est déjà en arrière plan"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, fuzzy, c-format
+msgid "%s: line %d: "
+msgstr "%s : avertissement :"
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr ""
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr ""
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr ""
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr ""
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr ""
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr ""
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "pas de contrôle de tâche dans ce shell"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc : échec de l'assertion : %s\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"malloc : %s:%d : assertion manquée\r\n"
+
+#: lib/malloc/malloc.c:313
+#, fuzzy
+msgid "unknown"
+msgstr "%s : hôte inconnu"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr "malloc : bloc écrasé sur liste libre"
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free : appelé avec un bloc déjà libéré comme argument"
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free : appelé avec un bloc non alloué comme argument"
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr "free : débordement négatif détecté ; « mh_nbytes » est hors plage"
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free : les tailles de fragment au début et à la fin sont différentes"
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc : appelé avec un bloc non alloué comme argument"
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr "realloc : débordement négatif détecté ; « mh_nbytes » est hors plage"
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr ""
+"realloc : les tailles de fragment au début et à la fin sont différentes"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr "register_alloc : la table d'allocation est pleine avec FIND_ALLOC ?\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr "register_alloc : %p déjà alloué selon la table ?\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "register_free : %p déjà libre selon la table ?\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "base non valable"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s : hôte inconnu"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: service non valable"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s : mauvaise spécification de chemin réseau"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "opérations sur le réseau non prises en charge"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc : %s:%d : impossible d'allouer %lu octets"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc : %s:%d : impossible d'allouer %lu octets"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Vous avez du courrier dans $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Vous avez du nouveau courrier dans $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "Le courrier dans %s a été lu.\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "Erreur de syntaxe : expression arithmétique nécessaire"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "Erreur de syntaxe : « ; » non attendu"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "Erreur de syntaxe : « ((%s)) »"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document : le type d'instruction %d est incorrect"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr "make_redirection : l'instruction de redirection « %d » est hors plage"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr ""
+"Caractère de fin de fichier (EOF) prématuré lors de la recherche du « %c » "
+"correspondant"
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr ""
+"Caractère de fin de fichier (EOF) prématuré lors de la recherche de « ]] »"
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr ""
+"Erreur de syntaxe dans une expression conditionnelle : symbole « %s » "
+"inattendu"
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "Erreur de syntaxe dans une expression conditionnelle"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "Symbole inattendu « %s » au lieu de « ) »"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "« ) » attendu"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "argument inattendu « %s » pour l'opérateur conditionnel à un argument"
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "argument inattendu pour l'opérateur conditionnel à un argument"
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "Symbole « %s » trouvé à la place d'un opérateur binaire conditionnel"
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "opérateur binaire conditionnel attendu"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "argument « %s » inattendu pour l'opérateur binaire conditionnel"
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "argument inattendu pour l'opérateur binaire conditionnel"
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "Symbole « %c » inattendu dans la commande conditionnelle"
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "Symbole « %s » inattendu dans la commande conditionnelle"
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "Symbole « %d » inattendu dans la commande conditionnelle"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "Erreur de syntaxe près du symbole inattendu « %s »"
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "Erreur de syntaxe près de « %s »"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "Erreur de syntaxe : fin de fichier prématurée"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "Erreur de syntaxe"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Utilisez « %s » pour quitter le shell.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr ""
+"Caractère de fin de fichier (EOF) prématuré lors de la recherche d'un « ) » "
+"correspondant"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "complètement : fonction « %s » non trouvée"
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr "progcomp_insert : %s : NULL COMPSPEC"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command : mauvais connecteur « %d »"
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d : descripteur de fichier non valable : %s"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "cprintf : « %c » : caractère de format invalide"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "descripteur de fichier hors plage"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s : redirection ambiguë"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s : impossible d'écraser le fichier existant"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s : restreint : impossible de rediriger la sortie"
+
+#: redir.c:180
+#, fuzzy, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr ""
+"impossible de créer un fichier temporaire pour le « here-document » : %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s : impossible d'affecter une liste à un élément de tableau"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "/dev/(tcp|udp)/host/port non pris en charge sans réseau"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr ""
+"Erreur de redirection : impossible de dupliquer le descripteur de fichier"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "« /tmp » introuvable, veuillez le créer !"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "« /tmp » doit être un nom de répertoire correct"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c : option non valable"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Je n'ai pas de nom !"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr ""
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Utilisation :\t%s [option longue GNU] [option] ...\n"
+"\t%s [option longue GNU] [option] fichier-script ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "Options longues GNU :\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Options du shell :\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD ou -c commande ou -O shopt_option\t\t(invocation seulement)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s ou -o option\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"Pour en savoir plus sur les options du shell, tapez « %s -c \"help set\" ».\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"Pour en savoir plus sur les primitives du shell, tapez « %s -c help ».\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "Utilisez la commande « bashbug » pour faire un rapport de bogue.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask : %d : operation non valable"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr ""
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr ""
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr ""
+
+#: siglist.c:59
+msgid "Quit"
+msgstr ""
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr ""
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr ""
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr ""
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr ""
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr ""
+
+#: siglist.c:87
+msgid "Killed"
+msgstr ""
+
+#: siglist.c:91
+#, fuzzy
+msgid "Bus error"
+msgstr "Erreur de syntaxe"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr ""
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr ""
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr ""
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr ""
+
+#: siglist.c:111
+#, fuzzy
+msgid "Terminated"
+msgstr "restreint"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr ""
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr ""
+
+#: siglist.c:127
+msgid "Continue"
+msgstr ""
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr ""
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr ""
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr ""
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr ""
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr ""
+
+#: siglist.c:155
+msgid "File limit"
+msgstr ""
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr ""
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr ""
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr ""
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr ""
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr ""
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr ""
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr ""
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr ""
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr ""
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr ""
+
+#: siglist.c:199
+msgid "programming error"
+msgstr ""
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr ""
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr ""
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr ""
+
+#: siglist.c:215
+msgid "Information request"
+msgstr ""
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr ""
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr ""
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "Mauvaise substitution : pas de « %s » de fermeture dans %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s : impossible d'affecter une liste à un élément de tableau"
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "Impossible de fabriquer un tube pour une substitution de processus"
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "Impossible de fabriquer un fils pour une substitution de processus"
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "Impossible d'ouvrir le tube nommé « %s » en lecture"
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "Impossible d'ouvrir le tube nommé « %s » en écriture"
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "Impossible de dupliquer le tube nommé « %s » vers le fd %d"
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "Impossible de fabriquer un tube pour une substitution de commande"
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr ""
+"Impossible de fabriquer un processus fils pour une substitution de commande"
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "command_substitute : impossible de dupliquer le tube vers le fd 1"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s : paramètre vide ou non défini"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s : expression de sous-chaîne négative"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s : mauvaise substitution"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s : affectation impossible de cette façon"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, fuzzy, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "Mauvaise substitution : pas de « %s » de fermeture dans %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "Pas de correspondance : %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "argument attendu"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s : nombre entier attendu comme expression"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "« ) » attendue"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "« ) » attendu au lieu de %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s : opérateur unaire attendu"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s : opérateur binaire attendu"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "« ] » manquant"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "Numéro de signal non valable"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps : mauvaise valeur dans trap_list[%d] : %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+"run_pending_traps : le gestionnaire de signal est SIG_DFL, %d (%s) renvoyé à "
+"moi-même"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler : mauvais signal %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "erreur lors de l'import de la définition de fonction pour « %s »"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "niveau de shell trop élevé (%d), initialisation à 1"
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr ""
+"make_local_variable : aucun contexte de fonction dans le champ d'application "
+"actuel"
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr ""
+"all_local_variables : aucun contexte de fonction dans le champ d'application "
+"actuel"
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s : paramètre vide ou non défini"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "caractère %d non valable dans « exportstr » pour %s"
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "Pas de « = » dans « exportstr » pour %s"
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+"pop_var_context : le début de « shell_variables » n'est pas un contexte de "
+"fonction"
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr "pop_var_context : aucun contexte à « global_variables »"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+"pop_scope : le début de « shell_variables » n'est pas un champ d'application "
+"temporaire d'environnement"
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s : impossible d'ouvrir : %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d : descripteur de fichier non valable : %s"
+
+#: version.c:46
+#, fuzzy
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Copyright (C) 2006 Free Software Foundation, Inc.\n"
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr ""
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Copyright (C) 2006 Free Software Foundation, Inc.\n"
+
+#: version2.c:87
+#, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc : impossible d'allouer %lu octets (%lu octets alloués)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc : impossible d'allouer %lu octets"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc : %s:%d : impossible d'allouer %lu octets (%lu octets alloués)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc : %s:%d : impossible d'allouer %lu octets"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr ""
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr ""
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr ""
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr ""
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr ""
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr ""
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr ""
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr ""
+
+#: builtins.c:68
+msgid ":"
+msgstr ""
+
+#: builtins.c:70
+msgid "true"
+msgstr ""
+
+#: builtins.c:72
+msgid "false"
+msgstr ""
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr ""
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr ""
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr ""
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr ""
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr ""
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr ""
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr ""
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr ""
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr ""
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr ""
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr ""
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr ""
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr ""
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr ""
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr ""
+
+#: builtins.c:117
+msgid "help [-dms] [pattern ...]"
+msgstr ""
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr ""
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr ""
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr ""
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr ""
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr ""
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr ""
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr ""
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr ""
+
+#: builtins.c:148
+#, fuzzy
+msgid "shift [n]"
+msgstr "nombre de « shift »"
+
+#: builtins.c:150
+#, fuzzy
+msgid "source filename [arguments]"
+msgstr "nom de fichier nécessaire en argument"
+
+#: builtins.c:152
+#, fuzzy
+msgid ". filename [arguments]"
+msgstr "nom de fichier nécessaire en argument"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr ""
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr ""
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr ""
+
+#: builtins.c:162
+msgid "times"
+msgstr ""
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr ""
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr ""
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr ""
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr ""
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr ""
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr ""
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr ""
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr ""
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr ""
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr ""
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr ""
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr ""
+
+#: builtins.c:206
+#, fuzzy
+msgid "(( expression ))"
+msgstr "une expression est attendue"
+
+#: builtins.c:208
+#, fuzzy
+msgid "[[ expression ]]"
+msgstr "une expression est attendue"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr ""
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr ""
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr ""
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr ""
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr ""
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr ""
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+
+#: builtins.c:237
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr ""
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:254
+#, fuzzy
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"« alias » sans argument ou avec l'option « -p » affiche sur la sortie "
+"standard\n"
+" la liste des alias sous la forme NAME=VALUE. Sinon, un alias est défini\n"
+" pour chaque NAME dont la VALUE est fournie. Une espace après la VALUE\n"
+" entraîne la vérification de la substitution d'alias pour le mot suivant\n"
+" lorsque l'alias est étendu. « alias » renvoie « true » à moins qu'un "
+"NAME\n"
+" ne soit fourni pour lequel aucun alias n'a été défini."
+
+#: builtins.c:276
+#, fuzzy
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Enlève les NAME de la liste des alias définis. Si l'option « -a » est "
+"fournie,\n"
+"alors toutes les définitions d'alias sont enlevées."
+
+#: builtins.c:289
+#, fuzzy
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+"Associe une suite de touches à une fonction « Readline » ou définit une\n"
+"variable « Readline ». Les arguments non-options suivent une syntaxe "
+"équivalente à celle\n"
+"du fichier ~/.inputrc, mais doivent être transmis comme arguments uniques :\n"
+" bind '\"\\C-x\\C-r\" : re-read-init-file'.\n"
+" bind accepte les options suivantes :\n"
+" -m keymap Utilise « keymap » comme mappage clavier pendant "
+"la\n"
+" durée de cette commande. Des noms de mappage "
+"valables sont « emacs », « emacs-standard », « emacs-"
+"meta », \n"
+" « emacs-ctlx », « vi », « vi-move », « vi-command » "
+"et\n"
+" « vi-insert ».\n"
+" -l Affiche les noms de fonctions.\n"
+" -P Affiche les noms et associations des fonctions.\n"
+" -p Affiche les fonctions et associations dans une "
+"forme qui\n"
+" peut être réutilisée comme entrée.\n"
+" -r seqtouche Enlève l'association pour « seqtouche ».\n"
+" -x seqtouche:commande-shell\tEntraîne l'exécution de la « commande-"
+"shell »\n"
+" \t\t\t\tlorsque « seqtouche » est entrée.\n"
+" -f nomfichier Lit l'association de touches depuis le fichier.\n"
+" -q nom-fonction Permet de savoir quelles touches appellent la "
+"fonction.\n"
+" -u nom-fonction Enlève toutes les associations de touches liée à la "
+"fonction.\n"
+" -V Affiche les noms et valeurs des variables\n"
+" -v Affiche les noms et valeurs des variables dans une "
+"forme qui peut\n"
+" être réutilisée comme entrée.\n"
+" -S Affiche les séquences de touches qui invoquent des "
+"macros,\n"
+" et leurs valeurs.\n"
+" -s Affiche les séquences de touches qui invoquent des "
+"macros,\n"
+" et leurs valeurs sous une forme qui peut être "
+"utilisée comme entrée."
+
+#: builtins.c:326
+#, fuzzy
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Reprend l'exécution à la prochaine boucle FOR, WHILE ou UNTIL de niveau "
+"supérieur.\n"
+" Si N est précisé, reprend à N-ième boucle supérieure."
+
+#: builtins.c:338
+#, fuzzy
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Reprend l'exécution à la prochaine boucle FOR, WHILE ou UNTIL de niveau "
+"supérieur.\n"
+" Si N est précisé, reprend à N-ième boucle supérieure."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+
+#: builtins.c:365
+#, fuzzy
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+"Renvoie le contexte de l'appel de sous-routine actuel.\n"
+" \n"
+" Sans EXPR, renvoie « $ligne $nomfichier ». Avec EXPR,\n"
+" renvoie « $ligne $sousroutine $nomfichier »; ces informations "
+"supplémentaires\n"
+" peuvent être utilisées pour fournir une trace de la pile.\n"
+" \n"
+" La valeur de EXPR indique le nombre de cadres d'appels duquel il faut "
+"revenir en arrière\n"
+" avant le cadre actuel ; le cadre supérieur est le cadre 0."
+
+#: builtins.c:383
+#, fuzzy
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+"Change le répertoire actuel vers DIR. La variable « $HOME » est le "
+"répertoire\n"
+" DIR par défaut. La variable CDPATH définit le chemin de recherche\n"
+" du répertoire contenant DIR. Les noms de répertoires alternatifs dans "
+"CDPATH\n"
+" sont séparés par un deux-point « : ». Un nom de répertoire vide est "
+"identique\n"
+" au répertoire actuel, càd « . ». Si DIR commence avec une barre oblique "
+"« / »,\n"
+" alors CDPATH n'est pas utilisé. Si le répertoire n'est pas trouvé et "
+"que\n"
+" l'option « cdable_vars » du shell est définie, alors le mot est essayé "
+"comme nom\n"
+" de variable. Si la variable possède une valeur, alors on fait « cd » "
+"vers cette valeur.\n"
+" L'option « -P » indique d'utiliser la structure physique des répertoires "
+"plutôt que\n"
+" les liens symboliques ; l'option « -L » force le suivi des liens "
+"symboliques."
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+
+#: builtins.c:428
+#, fuzzy
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Sans effet : la commande ne fait rien. Le code de sortie zéro est renvoyé."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:448
+#, fuzzy
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr "Renvoie un résultat d'échec"
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+
+#: builtins.c:476
+#, fuzzy
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Déclare des variables ou ajoute des attributs aux variables. Si aucun nom\n"
+" n'est donné, affiche plutôt les valeurs des variables. L'option « -p »\n"
+" permet d'afficher les attributs et les valeurs de chaque NAME.\n"
+" \n"
+" Les options sont :\n"
+" \n"
+" -a\tpour faire des tableaux de NAME (si pris en charge)\n"
+" -f\tpour choisir uniquement parmi les noms de fonctions\n"
+" -F\tpour afficher les noms de fonctions (et les numéros de ligne et "
+"le\n"
+" \tfichier source si le mode de débogage est activé\n"
+" -i\tpour que les NAME aient l'attribut « integer »\n"
+" -r\tpour que les NAME soient en lecture seule\n"
+" -t\tpour que les NAME aient l'attribut « trace »\n"
+" -x\tpour faire un export des NAME\n"
+" \n"
+" L'évaluation arithmétique des variables ayant l'attribut « integer » "
+"est\n"
+" effectuée au moment de l'affectation (voir « let »).\n"
+" \n"
+" Lors de l'affichage des valeurs de variables, -f affiche le nom de la "
+"fonction\n"
+" et sa définition. L'option -F permet de n'afficher que le nom.\n"
+" \n"
+" Un attribut peut être désactivé en utilisant « + » au lieu de « - ». "
+"Dans une\n"
+" fonction, ceci a pour effet de rendre les NAME locaux, comme avec la "
+"commande «local »."
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+
+#: builtins.c:537
+#, fuzzy
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Affiche les ARGs. Si « -n » est spécifié, le retour à la ligne final et "
+"supprimé.\n"
+" L'option « -e » permet d'activer l'interprétation des caractères à "
+"contre-oblique\n"
+" parmi la liste ci-dessous :\n"
+" \t\\a\talerte (cloche)\n"
+" \t\\b\tretour arrière\n"
+" \t\\c\tsuppr. dernier retour à la ligne\n"
+" \t\\E\tcaractère Échap.\n"
+" \t\\f\tsaut de page\n"
+" \t\\n\tsaut de ligne\n"
+" \t\\r\tretour chariot\n"
+" \t\\t\ttabulation horizontale\n"
+" \t\\v\ttabulation verticale\n"
+" \t\\\\\tbarre contre-oblique\n"
+" \t\\0nnn\tle caractère dont le code ASCII est NNN (en octal). NNN peut "
+"être\n"
+" \t\tlong de 0 à 3 chiffres octaux\n"
+" \n"
+" Vous pouvez désactiver de manière explicite l'interprétation des "
+"caractères ci-dessus\n"
+" avec l'option « -E »."
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+
+#: builtins.c:626
+#, fuzzy
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+"« getopts » est utilisé par les procédures du shell pour analyser les \n"
+" paramètres de position.\n"
+" \n"
+" OPTSTRING contient les lettres d'options qui devront être reconnues ;\n"
+" si une lettre est suivie par un deux-points, elle devra posséder un\n"
+" argument séparé d'elle par une espace.\n"
+" \n"
+" À chaque fois qu'elle est appelée, « getopts » place l'option suivante\n"
+" dans la variable de shell « $nom », en initialisant « nom » si elle "
+"n'existe pas,\n"
+" et place l'index de l'argument suivant dans la variable de shell "
+"OPTIND.\n"
+" OPTIND est initialisé à 1 à chaque fois que le shell ou qu'un script "
+"shell\n"
+" est appelé. Lorsqu'une option nécessite un argument, « getopts » place "
+"cet\n"
+" argument dans la variable de shell OPTARG.\n"
+" \n"
+" « getopts » signale les erreurs d'une façon parmi deux. Si le premier "
+"caractère\n"
+" d'OPTSTRING est un deux-points, « getopts » utilise un signalement "
+"d'erreur\n"
+" silencieux. Dans ce mode aucun message d'erreur n'est affiché. Si une "
+"option\n"
+" incorrecte est rencontrée, « getopts » place dans OPTARG le caractère "
+"d'option\n"
+" trouvé. Si un argument nécessaire n'est pas trouvé, « getopts » place un "
+"« : »\n"
+" dans NAME et place dans OPTARG le caractère d'option trouvé. Si « "
+"getopts »\n"
+" n'est pas en mode silencieux et qu'une option incorrecte est rencontrée, "
+"il\n"
+" place « ? » dans NAME et efface OPTARG. Si un argument nécessaire n'est "
+"pas\n"
+" trouvé, un « ? » est placé dans NAME, OPTARG est effacé et un message de "
+"diagnostic\n"
+" est affiché.\n"
+" \n"
+" Si la variable de shell OPTERR possède la valeur 0, « getopts » "
+"désactive\n"
+" l'affichage des messages d'erreur, même si le premier caractère "
+"d'OPTSTRING\n"
+" n'est pas un deux-points. OPTERR possède la valeur 1 par défaut.\n"
+" \n"
+" « getopts » analyse habituellement les paramètres de position ($0 - $9), "
+"mais\n"
+" si plus d'argument sont données, ils sont analysés à la place."
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+#: builtins.c:689
+#, fuzzy
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"Terminer le shell avec le code de retour « N ». Si N est omis, le code\n"
+" de retour est celui de la dernière commande exécutée."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+
+#: builtins.c:708
+#, fuzzy
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+"« fc » est utilisé pour afficher ou modifier puis ré-exécuter les commandes\n"
+" de l'historique des commandes. FIRST et LAST peuvent être des nombres\n"
+" indiquant la plage ou FIRST peut être une chaîne donnant le début de la\n"
+" commande la plus récente recherchée.\n"
+" \n"
+" -e ENAME définit quel éditeur utiliser. Par défaut il s'agit de « "
+"FCEDIT »\n"
+" puis « EDITOR », puis « vi ».\n"
+" \n"
+" -l affiche les les lignes au lieu de les éditer.\n"
+" -n n'affiche pas les numéros de ligne.\n"
+" -r inverse l'ordre des lignes (les plus récentes en premier).\n"
+" \n"
+" En tapant « fc -s [ancien=nouveau ...] [commande] », la commande est ré-"
+"exécutée\n"
+" après avoir effectué la substitution OLD=NEW.\n"
+" \n"
+" Un alias utile est « r='fc -s' » de sorte qu'en tapant « r cc »,\n"
+" la dernière commande commençant par « cc » est ré-exécutée et avec « r "
+"», la\n"
+" dernière commande est ré-exécutée."
+
+#: builtins.c:738
+#, fuzzy
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"Place JOB_SPEC au premier plan et en fait la tâche actuelle. Si\n"
+" JOB_SPEC n'est pas fourni, le shell utilise sa propre notion\n"
+" de tâche actuelle."
+
+#: builtins.c:753
+#, fuzzy
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Place chaque JOB_SPEC en arrière plan comme s'il avait été démarré avec « & "
+"».\n"
+" Si JOB_SPEC n'est pas fourni, le shell utilise sa propre notion\n"
+" de tâche actuelle."
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:816
+#, fuzzy
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Affiche l'historique avec des numéros de lignes. Les lignes possédant\n"
+" un « * » ont été modifiées. L'argument N permet de n'afficher que\n"
+" les N dernières lignes. L'option « -c » efface complètement "
+"l'historique.\n"
+" L'option « -d » efface l'élément d'historique placé à la position "
+"OFFSET.\n"
+" L'option « -w » écrit l'historique actuel dans le fichier d'historique.\n"
+" « -r » permet de lire le fichier et d'ajouter son contenu à la fin de\n"
+" l'historique. « -a » permet d'ajouter les lignes d'historiques de cette\n"
+" session à la fin du fichier d'historique. L'argument « -n » permet de "
+"lire\n"
+" toutes les lignes d'historique non déjà lues depuis le fichier "
+"d'historique\n"
+" puis de les ajouter à l'historique.\n"
+" \n"
+" Si FILENAME est fourni, il est utilisé comme fichier d'historique, "
+"sinon\n"
+" la valeur de « $HISTFILE » est utilisée, sinon le fichier « ~/."
+"bash_history ».\n"
+" Si l'option « -s » est fournie, les arguments qui ne sont pas des "
+"options sont\n"
+" ajoutés à la fin de l'historique comme un seul élément. L'option « -p » "
+"permet\n"
+" d'effectuer une expansion d'historique sur chaque ARG et d'afficher le "
+"résultat,\n"
+" sans rien enregistrer dans le fichier d'historique.\n"
+" \n"
+" Si la variable « $HISTTIMEFORMAT » est définie et non vide, sa valeur "
+"est\n"
+" utilisée comme chaîne de format pour « strftime(3) » afin d'afficher "
+"les\n"
+" valeurs de temps associées à chaque élément de l'historique. Sinon,\n"
+" aucun valeur de temps n'est affichée."
+
+#: builtins.c:852
+#, fuzzy
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+"Affiche les tâches actives. L'option « -l » ajoute les numéros de processus\n"
+" en plus des informations habituelles. L'option « -p » n'affiche que les\n"
+" numéros de processus. Si « -n » est fourni, seuls les processus dont\n"
+" l'état a changé depuis la dernière notification sont affichés. JOBSPEC\n"
+" restreint l'affichage à ce numéro de tâche. Les options « -r » et « -s "
+"»\n"
+" restreignent l'affichage respectivement aux tâches en cours d'exécution\n"
+" et aux tâches stoppées. Sans option, l'état de toutes les tâches "
+"actives\n"
+" est affiché. Si « -x » est fourni, la commande COMMAND est lancée après "
+"que toutes\n"
+" les spécifications de tâches qui apparaissent dans les ARGS ont été "
+"remplacées\n"
+" par le numéro de processus du leader du groupe de processus pour cette "
+"tâche."
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+
+#: builtins.c:898
+#, fuzzy
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Envoie le signal SIGSPEC aux processus désignés par PID (ou JOBSPEC). Si\n"
+" SIGSPEC n'est pas fourni, alors SIGTERM est utilisé. L'argument « -l »\n"
+" permet de lister les noms de signaux. Si des arguments sont donnés à « -"
+"l »,\n"
+" ils sont supposés être des numéros de signaux pour lesquels les noms \n"
+" doivent être affichés. « kill » est une commande intégrée au shell pour\n"
+" deux raisons : il permet d'utiliser des numéros de tâche plutôt que des\n"
+" numéros de processus et, si vous avez atteint la limite du nombre de\n"
+" processus que vous pouvez créer, vous n'avez pas besoin de générer un\n"
+" nouveau processus pour en tuer un autre."
+
+#: builtins.c:921
+#, fuzzy
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+"chaque ARG est une expression arithmétique à évaluer. L'évaluation\n"
+" est faite avec des entiers de largeur fixe sans vérification de\n"
+" dépassement, mais la division par zéro est interceptée et\n"
+" signalée comme une erreur. La liste suivante d'opérateurs\n"
+" est groupée par niveau d'égale priorité. Les niveaux sont listés\n"
+" par priorité décroissante.\n"
+" \n"
+" \tid++, id--\tpost-incrément ou post-décrément de variable\n"
+" \t++id, --id\tpré-incrément ou pré-décrément de variable\n"
+" \t-, +\t\tmoins, plus \t!, ~\t\tnégations logique et binaire\n"
+" \t**\t\tmise en exposant\n"
+" \t*, /, %\t\tmultiplication, division, reste de la division\n"
+" \t+, -\t\taddition, soustraction\n"
+" \t<<, >>\t\tdécalage binaire à gauche et à droite\n"
+" \t<=, >=, <, >\tcomparaison\n"
+" \t==, !=\t\tégalité, inégalité\n"
+" \t&\t\tET binaire\n"
+" \t^\t\tOU binaire exclusif\n"
+" \t|\t\tOU binaire\n"
+" \t&&\t\tET logique\n"
+" \t||\t\tOU logique\n"
+" \texpr ? expr : expr\n"
+" \t\t\topérateur de condition\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\taffectation\n"
+" \n"
+" Les variables de shell sont autorisées comme opérandes. Le nom de la\n"
+" variable est remplacé par sa valeur (contrainte à un entier de largeur "
+"fixe)\n"
+" à l'intérieur d'une expression. La variable n'a pas besoin d'avoir son "
+"attribut\n"
+" d'entier activé pour être utilisée dans une expression.\n"
+" \n"
+" Les opérateurs sont évalués dans leur ordre de priorité. Les sous-"
+"expressions entre\n"
+" parenthèses sont évaluées en premier et peuvent être prioritaires sur "
+"les règles\n"
+" ci-dessus.\n"
+" \n"
+" Si le dernier ARG est évalué à 0, « let » renvoie 1, sinon 0 est renvoyé."
+
+#: builtins.c:966
+#, fuzzy
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+"Une ligne est lue depuis l'entrée standard ou depuis le descripteur de "
+"fichier\n"
+" FD si l'option « -u » est fournie. Le premier mot est affecté au premier "
+"NAME,\n"
+" le second mot au second NAME, et ainsi de suite, les mots restants étant "
+"affectés\n"
+" au dernier NAME. Seuls les caractères situés dans « $IFS » sont reconnus "
+"comme\n"
+" étant des délimiteurs de mots. Si aucun NAME n'est fourni, la ligne est "
+"conservée\n"
+" dans la variable REPLY. L'option « -r » signifie « entrée brute » et la "
+"neutralisation \n"
+" par barre oblique inverse est désactivée. L'option « -d » indique de "
+"continuer\" la lecture jusqu'à ce que le premier caractère de DELIM soit "
+"lu plutôt que\n"
+" le retour à la ligne. Si « -p » est fourni, la chaîne PROMPT est "
+"affichée\n"
+" sans retour à la ligne final avant la tentative de lecture. Si « -a » "
+"est fourni,\n"
+" les mots lus sont affectés en séquence aux indices du TABLEAU, en "
+"commençant\n"
+" à zéro. Si « -e » est fourni et que le shell est interactif, « readline "
+"» est\n"
+" utilisé pour obtenir la ligne. Si « -n » est fourni avec un argument "
+"NCHARS non nul,\n"
+" « read » se termine après que NCHARS caractères ont été lus. L'option « -"
+"s »\n"
+" permet aux données venant d'un terminal de ne pas être répétées.\n"
+" \n"
+" L'option « -t » permet à « read » de se terminer avec une erreur si une "
+"ligne\n"
+" entière de données ne lui a pas été fournie avant le DÉLAI d'expiration. "
+"Si la\n"
+" variable TMOUT est définie, sa valeur est le délai d'expiration par "
+"défaut. Le code\n"
+" de retour est zéro à moins qu'une fin de fichier ne soit rencontrée, que "
+"« read »\n"
+" atteigne le délai d'expiration ou qu'un descripteur de fichier incorrect "
+"ne soit\n"
+" fourni pour l'argument « -u »."
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+
+#: builtins.c:1022
+#, fuzzy
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+" -a Marquer pour l'export toutes les variables qui sont modifiées ou "
+"créées.\n"
+" -b Avertir immédiatement à la fin d'une tâche.\n"
+" -e Terminer immédiatement si une commande s'arrête avec un code de "
+"retour non nul.\n"
+" -f Désactiver la génération de nom de fichier (globbing).\n"
+" -h Mémoriser l'emplacement des commandes après leur recherche.\n"
+" -k Placer dans l'environnement tous les arguments d'affectation "
+"pour une commande,\n"
+" pas seulement ceux qui précèdent le nom de la commande.\n"
+" -m Activer le contrôle de tâche.\n"
+" -n Lire les commandes, mais ne pas les exécuter.\n"
+" -o nom-option\n"
+" Définir la variable correspondant à nom-option :\n"
+" allexport identique à -a\n"
+" braceexpand identique à -B\n"
+" emacs utiliser une édition de ligne façon « emacs »\n"
+" errexit identique à -e\n"
+" errtrace identique à -E\n"
+" functrace identique à -T\n"
+" hashall identique à -h\n"
+" histexpand identique à -H\n"
+" history activer l'historique des commandes\n"
+" ignoreeof ne pas terminer le shell à la lecture d'un « "
+"EOF »\n"
+" interactive-comments\n"
+" permet aux commentaires d'apparaître dans les "
+"commandes interactives\n"
+" keyword identique à -k\n"
+" monitor identique à -m\n"
+" noclobber identique à -C\n"
+" noexec identique à -n\n"
+" noglob identique à -f\n"
+" nolog actuellement accepté mais ignoré\n"
+" notify identique à -b\n"
+" nounset identique à -u\n"
+" onecmd identique à -t\n"
+" physical identique à -P\n"
+" pipefail le code de retour d'un tube est celui de la "
+"dernière commande\n"
+" qui s'est terminée avec un code non nul,\n"
+" ou zéro si aucune commande ne s'est arrêtée "
+"avec un code non nul.\n"
+" posix modifie le comportement de « bash » pour qu'il "
+"se comporte comme\n"
+" le standard 1003.2 aux endroits où il diffère "
+"par défaut.\n"
+" privileged identique à -p\n"
+" verbose identique à -v\n"
+" vi utiliser une édition de ligne façon « vi »\n"
+" xtrace identique à -x\n"
+" -p Option activée lorsque les n° d'identifiants utilisateurs réels "
+"et effectifs ne\n"
+" sont pas les mêmes. Désactive le traitement du fichier $ENV et "
+"l'import des\n"
+" fonctions du shell. Désactiver cette option permet de définir "
+"les uid et gid\n"
+" effectifs à la valeur des uid et gid réels. -t Terminer "
+"après la lecture et l'exécution d'une commande.\n"
+" -u Traiter les variables non définies comme des erreurs lors de la "
+"substitution.\n"
+" -v Afficher les lignes d'entrée du shell à leur lecture.\n"
+" -x Afficher les commandes et leurs arguments au moment de leur "
+"exécution.\n"
+" -B Effectuer l'expansion des accolades -C Si définit, "
+"empêche les fichiers réguliers existants d'être écrasés par une\n"
+" redirection de la sortie.\n"
+" -E Si définit, l'interception ERR est héritée par les fonctions du "
+"shell.\n"
+" -H Activer la substitution d'historique façon « ! ». Ceci est actif "
+"par défaut\n"
+" lorsque le shell est interactif.\n"
+" -P Si définit, les liens symboliques ne sont pas suivis lors de "
+"l'exécution des\n"
+" commandes telles que « cd » qui changent le répertoire courant.\n"
+" -T Si définit, l'interception DEBUG est héritée par les fonctions "
+"du shell.\n"
+" - Affecter tous les arguments restants aux paramètres de "
+"position.\n"
+" Les options « -x » et « -v » sont désactivées.\n"
+" \n"
+" Ces indicateurs peuvent être désactivés en utilisant « + » plutôt que « "
+"- ». Ils peuvent\n"
+" être utilisés lors de l'appel au shell. Le jeu d'indicateurs actuel peut "
+"être trouvé\n"
+" dans « $- ». Les n ARGs restants sont des paramètres de position et "
+"sont affectés,\n"
+" dans l'ordre, à $1, $2, .. $n. Si aucun ARG n'est donné, toutes les "
+"variables du shell\n"
+" sont affichées."
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+#, fuzzy
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+"Lit et exécute les commandes depuis le fichier FILENAME puis se termine. Les "
+"chemins\n"
+" dans $PATH sont utilisés pour trouver le répertoire contenant FILENAME.\n"
+" Si des ARGUMENTS sont fournis, ils deviennent les paramètres de "
+"position\n"
+" lorsque FILENAME est exécuté."
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+#, fuzzy
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+"Se termine avec le code de retour 0 (vrai) ou 1 (faux) selon\n"
+" le résultat de l'évaluation de EXPR. Les expressions peuvent être\n"
+" unaires ou binaires. Les expressions unaires sont souvent utilisées\n"
+" pour examiner l'état d'un fichier. Il existe aussi des opérateurs de\n"
+" chaîne, ainsi que des opérateurs de comparaison numériques.\n"
+". \n"
+" Opérateurs sur des fichiers : \n"
+" \n"
+" -a FICHIER Vrai si le fichier existe.\n"
+" -b FICHIER Vrai si le fichier est un fichier spécial de bloc\n"
+" -c FICHIER Vrai si le fichier est un fichier spécial de "
+"caractères\n"
+" -d FICHIER Vrai si le fichier est un répertoire.\n"
+" -e FICHIER Vrai si le fichier existe\n"
+" -f FICHIER Vrai si le fichier existe et est un fichier régulier\n"
+" -g FICHIER Vrai si le fichier est « set-group-id »\n"
+" -h FICHIER Vrai si le fichier est un lien symbolique\n"
+" -L FICHIER Vrai si le fichier est un lien symbolique\n"
+" -k FICHIER Vrai si le fichier a son bit « sticky » défini\n"
+" -p FICHIER Vrai si le fichier est un tube nommé\n"
+" -r FICHIER Vrai si le fichier est lisible par vous\n"
+" -s FICHIER Vrai si le fichier existe et n'est pas vide\n"
+" -S FICHIER Vrai si le fichier est un socket\n"
+" -t FD Vrai si FD est ouvert sur un terminal\n"
+" -u FICHIER Vrai si le fichier est « set-user-id »\n"
+" -w FICHIER Vrai si le fichier peut être écrit par vous\n"
+" -x FICHIER Vrai si le fichier est exécutable par vous\n"
+" -O FICHIER Vrai si le fichier est effectivement possédé par "
+"vous\n"
+" -G FICHIER Vrai si le fichier est effectivement possédé par "
+"votre groupe\n"
+" -N FICHIER Vrai si le fichier a été modifié depuis la dernière "
+"fois qu'il a été lu\n"
+" FICHIER1 -nt FICHIER2 Vrai si le fichier1 est plus récent que le fichier2 "
+"(selon la date de modification)\n"
+" FICHIER1 -ot FICHIER2 Vrai si le fichier1 est plus vieux que le fichier2\n"
+" FICHIER1 -ef FICHIER2 Vrai si le fichier1 est un lien physique vers le "
+"fichier2\n"
+" \n"
+" Opérateurs sur des chaînes :\n"
+" \n"
+" -z CHAÎNE Vrai si la chaîne est vide\n"
+" -n CHAÃŽNE\n"
+" CHAÎNE Vrai si la chaîne n'est pas vide\n"
+" \n"
+" CHAÃŽNE1 = CHAÃŽNE2\n"
+" Vrai si les chaînes sont égales\n"
+" CHAÃŽNE1 != CHAÃŽNE2\n"
+" Vrai si les chaînes ne sont pas égales\n"
+" CHAÃŽNE1 < CHAÃŽNE2\n"
+" Vrai si le tri lexicographique place la chaîne1 en "
+"premier\n"
+" CHAÃŽNE1 > CHAÃŽNE2\n"
+" Vrai si le tri lexicographique place la chaîne1 en "
+"deuxième\n"
+" \n"
+" Autres opérateurs :\n"
+" \n"
+" -o OPTION Vrai si l'OPTION du shell est activée\n"
+" ! EXPR Vrai si l'EXPRession est fausse\n"
+" EXPR1 -a EXPR2 Vrai si les deux expressions sont vraies\n"
+" EXPR1 -o EXPR2 Vrai si l'une des deux expressions est vraie\n"
+" \n"
+" arg1 OP arg2 Tests arithmétiques. OP peut être -eq, -ne,\n"
+" -lt, -le, -gt ou -ge.\n"
+" \n"
+" Les opérateurs arithmétiques binaires renvoient « vrai » si ARG1 est "
+"égal,\n"
+" non-égal, inférieur, inférieur ou égal, supérieur, supérieur ou égal à "
+"ARG2."
+
+#: builtins.c:1299
+#, fuzzy
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"Ceci est un synonyme de la primitive « test », mais le dernier argument\n"
+" doit être le caractère « ] », pour fermer le « [ » correspondant."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:1320
+#, fuzzy
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+"La commande ARG doit être lue et exécutée lorsque le shell reçoit le\n"
+" signal SIGNAL_SPEC. Si ARG est absent (et qu'un unique SIGNAL_SPEC)\n"
+" est fourni) ou égal à « - », tous les signaux spécifié sont remis\n"
+" à leur valeur d'origine. Si ARG est une chaîne vide, tous les "
+"SIGNAL_SPEC\n"
+" sont ignorés par le shell et les commandes qu'il appelle. Si "
+"SIGNAL_SPEC\n"
+" est EXIT (0), la commande ARG est exécutée à la sortie du shell. Si un\n"
+" SIGNAL_SPEC est DEBUG, ARG est exécuté après chaque commande simple. \n"
+" Si l'option « -p » est fournie, les commandes d'interception associées "
+"à\n"
+" chaque SIGNAL_SPEC sont affichées. Si aucun argument n'est fourni ou "
+"si \n"
+" « -p » est fourni seul, « trap » affiche la liste des commandes "
+"associées\n"
+" à chaque signal. Chaque SIGNAL_SPEC est soit un nom de signal dans "
+"<signal.h>\n"
+" ou un numéro de signal. Les noms de signaux sont insensibles à la casse "
+"et\n"
+" le préfixe « SIG » est facultatif. « trap -l » affiche la liste des "
+"signaux\n"
+" et leur numéros correspondants. Remarquez qu'un signal peut être envoyé "
+"au\n"
+" shell avec « kill -signal $$ »."
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+#, fuzzy
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"« ulimit » fournit un contrôle sur les ressources disponibles aux\n"
+" processus lancés depuis le shell, sur les systèmes qui permettent\n"
+" ce genre de contrôles. Si une option est donnée, elle est interprétée\n"
+" de la sorte :\n"
+" \n"
+" -S\tutiliser la limite de ressources « soft »\n"
+" -H\tutiliser la limite de ressources « hard »\n"
+" -a\ttoutes les limites actuelles sont présentées\n"
+" -c\ttaille maximale des fichiers « core » créés\n"
+" -d\ttaille maximale du segment de données d'un processus\n"
+" -e\tla priorité maximale d'ordonnancement (« nice »)\n"
+" -f\tla taille maximale des fichiers écrits par le shell et ses fils\n"
+" -i\tle nombre maximal de signaux en attente\n"
+" -l\tla taille maximale qu'un processus peut verrouiller en mémoire\n"
+" -m\tla taille maximale de « set » résident\n"
+" -n\tle nombre maximal de descripteurs de fichiers ouverts\n"
+" -p\tla taille du tampon pour les tubes\n"
+" -q\tle nombre maximal d'octets dans les queues de messages POSIX\n"
+" -r\tla priorité maximale pour l'ordonnancement temps-réel\n"
+" -s\tla taille maximale de la pile\n"
+" -t\tla quantité maximale de temps processeur en secondes\n"
+" -u\tle nombre maximal de processus utilisateurs\n"
+" -v\tla taille de la mémoire virtuelle\n"
+" -x\tle nombre maximal de verrous de fichiers\n"
+" \n"
+" Si LIMIT est fournie, elle est utilisée comme nouvelle valeur de "
+"ressource\n"
+" Les valeurs spéciales de LIMIT « soft », « hard » et « unlimited » "
+"correspondent\n"
+" respectivement aux valeurs actuelles de la limite souple, de la limite "
+"dure,\n"
+" ou à une absence de limite. Sinon la valeur actuelle de la limite est "
+"affichée\n"
+" Si aucune option n'est donnée, « -f » est supposée. Les valeurs sont\n"
+" des multiples de 1024 octets, sauf pour « -t » qui prend des secondes,\n"
+" « -p » qui prend un multiple de 512 octets et « -u » qui prend un "
+"nombre\n"
+" sans unité."
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+#, fuzzy
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Attend le processus spécifié et donne son code de retour. Si N n'est\n"
+" pas donné, tous les processus fils actuellement actifs sont attendus\n"
+" et le code de retour est zéro. N peut être un n° de processus ou un\n"
+" spécificateur de tâche. Si c'est un spécificateur de tâche, tous les\n"
+" processus présents dans le tube de la tâche sont attendus."
+
+#: builtins.c:1481
+#, fuzzy
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"La boucle « for » exécute une suite de commandes pour chaque membre d'une\n"
+" liste d'éléments. Si « in WORDS ...; » n'est pas fourni, « in \"$@\" » "
+"est\n"
+" utilisé. Pour chaque élément dans WORDS, NAME est défini à cet élément,\n"
+" et les COMMANDS sont exécutées."
+
+#: builtins.c:1495
+#, fuzzy
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Équivalent à\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 sont des expressions arithmétiques. Si une "
+"expression\n"
+" omise, elle se comporte comme si elle s'évaluait à 1."
+
+#: builtins.c:1513
+#, fuzzy
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Les mots WORDS subissent une expansion et génèrent une liste de mots.\n"
+" L'ensemble de ces mots est affiché dans la sortie d'erreur, chacun\n"
+" étant précédé d'un nombre. Si « in WORDS » n'est pas fourni, \n"
+" « in \"$@\" » est utilisé. L'invite PS3 est ensuite affichée et une\n"
+" ligne est lue depuis l'entrée standard. Si la ligne consiste en\n"
+" le numéro d'un des mots affichés, alors ce mot est affecté à NAME.\n"
+" Si la ligne est vide, WORDS et l'invite sont réaffichés. Si un EOF\n"
+" est lu, la commande se termine. Toute autre valeur lue a pour effet\n"
+" de vider NAME. La ligne lue est conservée dans la variable REPLY.\n"
+" Les COMMANDS sont exécutées après chaque sélection jusqu'à ce qu'une\n"
+" commande « break » soit exécutée."
+
+#: builtins.c:1534
+#, fuzzy
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+"Exécute PIPELINE et affiche un résumé du temps réel, du temps processeur\n"
+" utilisateur, et du temps processeur système passés à exécuter PIPELINE\n"
+" lorsque celui-ci se termine. Le code de retour est celui de PIPELINE.\n"
+" L'option « -p » affiche le résumé dans un format légèrement différent.\n"
+" Elle utilise la valeur de la variable TIMEFORMAT comme format de sortie."
+
+#: builtins.c:1551
+#, fuzzy
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Exécute de manière sélective les commandes COMMANDS basées sur le\n"
+" motif PATTERN de correspondance des mots WORDS. Le caractère\n"
+" « | » est utilisé pour séparer les différents motifs."
+
+#: builtins.c:1563
+#, fuzzy
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"La liste « if COMMANDS » est exécutée. Si elle se termine avec un code de "
+"zéro,\n"
+" alors la liste « then COMMANDS » est exécutée. Sinon, chaque liste\n"
+" « elif COMMANDS » est exécutée à son tour et si son code de retour est "
+"zéro,\n"
+" la liste « then COMMANDS » correspondante est exécutée et la commande « "
+"if »\n"
+" se termine. Sinon, la list « else COMMANDS » est exécutée si elle "
+"existe.\n"
+" Le code de retour de l'ensemble est celui de la dernière commande "
+"exécutée\n"
+" ou zéro si aucune condition n'était vraie. "
+
+#: builtins.c:1580
+#, fuzzy
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Effectue une expansion et exécute les commandes « COMMANDS » aussi "
+"longtemps\n"
+" que la commande finale parmi celles de « while » se termine avec un\n"
+" code de retour de zéro."
+
+#: builtins.c:1592
+#, fuzzy
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Effectue une expansion et exécute les commandes « COMMANDS » aussi "
+"longtemps\n"
+" que les commandes de « until » se terminent avec un code de retour\n"
+" différent de zéro."
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+
+#: builtins.c:1632
+#, fuzzy
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Lance un ensemble de commandes d'un groupe. Ceci est une façon de\n"
+" rediriger tout un ensemble de commandes."
+
+#: builtins.c:1644
+#, fuzzy
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+"Équivalent à l'argument JOB_SPEC de la commande « fg ». Reprend l'exécution\n"
+" d'une tâche stoppée ou en tâche de fond. JOB_SPEC peut spécifier soit\n"
+" un nom soit un numéro de tâche. Faire suivre JOB_SPEC de « & » permet "
+"de\n"
+" placer la tâche en arrière plan, comme si la spécification de tâche "
+"avait\n"
+" été fournie comme argument de « bg »."
+
+#: builtins.c:1659
+#, fuzzy
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+"L'EXPRESSION est évaluée selon les règles de l'évaluation arithmétique.\n"
+" C'est équivalent à « let EXPRESSION »."
+
+#: builtins.c:1671
+#, fuzzy
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+"Renvoie un code de retour de 0 ou 1 dépendant de l'évaluation de "
+"l'EXPRESSION\n"
+" conditionnelle. Les expressions sont formées de la même façon que pour "
+"la\n"
+" primitive « test », et peuvent être combinées avec les opérateurs "
+"suivants :\n"
+" \n"
+" \t( EXPRESSION )\tRenvoie la valeur de l'EXPRESSION\n"
+" \t! EXPRESSION\tVrai si l'EXPRESSION est fausse, sinon vrai\n"
+" \tEXPR1 && EXPR2\tVrai si EXPR1 et EXPR2 sont vraies, faux sinon\n"
+" \tEXPR1 || EXPR2\tVrai si EXPR1 ou EXPR2 est vraie, faux sinon\n"
+" \n"
+" Lorsque les opérateurs « == » et « != » sont utilisés, la chaîne à\n"
+" droite de l'opérateur est utilisée comme motif, et une mise en "
+"correspondance\n"
+" est effectuée. Les opérateurs « && » et « || » n'évaluent pas EXPR2 si\n"
+" EXPR1 est suffisant pour déterminer la valeur de l'expression."
+
+#: builtins.c:1697
+#, fuzzy
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+"BASH_VERSION\tNuméro de version de ce Bash.\n"
+" CDPATH\tUne liste de répertoires, séparés par un deux-points, utilisés\n"
+" \t\tpar « cd » pour la recherche de répertoires.\n"
+" GLOBIGNORE\tUne liste de motifs séparés par un deux-points, décrivant "
+"les\n"
+" \t\tnoms de fichier à ignorer lors de l'expansion des chemins.\n"
+" HISTFILE\tLe nom du fichier où votre historique des commandes est "
+"stocké.\n"
+" HISTFILESIZE\tLe nombre maximal de lignes que ce fichier peut contenir.\n"
+" HISTSIZE\tLe nombre maximal de lignes d'historique auquel un shell en\n"
+" \t\tfonctionnement peut accéder.\n"
+" HOME\tLe chemin complet vers votre répertoire de connexion.\n"
+" HOSTNAME\tLe nom de la machine actuelle.\n"
+" HOSTTYPE\tLe type de processeur sur laquelle cette version de Bash "
+"fonctionne.\n"
+" IGNOREEOF\tContrôle l'action du shell à la réception d'un caractère « "
+"EOF »\n"
+" \t\tcomme seule entrée. Si défini, sa valeur est le nombre de "
+"caractères\n"
+" \t\t« EOF » qui peuvent être rencontrés à la suite sur une ligne vide\n"
+" \t\tavant que le shell ne se termine (10 par défaut).\n"
+" \t\tS'il n'est pas défini, « EOF » signifie la fin de l'entrée.\n"
+" MACHTYPE\tUne chaîne décrivant le système actuel sur lequel fonctionne "
+"Bash.\n"
+" MAILCHECK\tLe nombre de secondes séparant deux vérifications du courrier "
+"par Bash.\n"
+" MAILPATH\tUne liste de fichiers séparés par un deux-points, que Bash "
+"utilise\n"
+" \t\tpour vérifier les nouveaux courriers.\n"
+" OSTYPE\tLa version d'Unix sur laquelle cette version de Bash "
+"fonctionne.\n"
+" PATH\tUne liste de répertoires séparés par un deux-points, utilisés\n"
+" \t\tpour la recherche des commandes.\n"
+" PROMPT_COMMAND\tUne commande à exécuter avant d'afficher chaque invite\n"
+" \t\tde commande principale.\n"
+" PS1\t\tL'invite de commande principale.\n"
+" PS2\t\tL'invite secondaire.\n"
+" PWD\t\tLe chemin complet vers le répertoire actuel.\n"
+" SHELLOPTS\tLa liste des options activées du shell, séparées par un deux-"
+"points.\n"
+" TERM\tLe nom du type actuel du terminal.\n"
+" TIMEFORMAT\tLe format de sortie pour les statistiques de temps "
+"affichées\n"
+" \t\tpar le mot réservé « time ».\n"
+" auto_resume\tNon-vide signifie qu'un mot de commande apparaissant\n"
+" \t\tde lui-même sur une ligne est d'abord recherché dans la liste des\n"
+" \t\ttâches stoppées. Si elle est trouvée, la tâche est remise en avant-"
+"plan.\n"
+" \t\tUne valeur de « exact » signifie que le mot de commande doit "
+"correspondre\n"
+" \t\texactement à la commande dans la liste des tâches stoppées. Une "
+"valeur\n"
+" \t\tde « substring » signifie que le mot de commande\n"
+" \t\tcorrespondre à une sous-chaîne de la tâche. Une autre valeur "
+"signifie\n"
+" \t\tque la commande doit être un préfixe d'une tâche stoppée.\n"
+" histchars\tCaractères contrôlant l'expansion d'historique et la "
+"substitution\n"
+" \t\trapide. Le premier caractère est le caractère de substitution "
+"d'historique,\n"
+" \t\thabituellement « ! ». Le deuxième est le caractère de substitution "
+"rapide,\n"
+" \t\thabituellement « ^ ». Le troisième est le caractère de commentaire\n"
+" \t\td'historique, habituellement « # ».\n"
+" HISTIGNORE\tUne liste de motifs séparés par un deux-points, utilisés "
+"pour\n"
+" \t\tdécider quelles commandes doivent être conservées dans la liste "
+"d'historique.\n"
+
+#: builtins.c:1754
+#, fuzzy
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Ajoute un répertoire en haut de la pile des répertoires, ou permute\n"
+" la pile, de façon que le répertoire en haut de la pile devienne\n"
+" le nouveau répertoire de travail. S'il n'y a pas d'argument, les deux\n"
+" répertoires en haut de la pile sont échangés.\n"
+" \n"
+" +N\tPermute la pile de façon que le Nième répertoire se place en haut,\n"
+" \ten comptant de zéro depuis la gauche de la liste fournie par « dirs "
+"».\n"
+" \n"
+" -N\tPermute la pile de façon que le Nième répertoire se place en haut,\n"
+" \ten comptant de zéro depuis la droite de la liste fournie par « dirs "
+"».\n"
+" \n"
+" -n\tne change pas de répertoire de travail lorsque des répertoires\n"
+" \tsont ajoutés à la pile, de façon que seule la pile soit manipulée\n"
+" \n"
+" dir\tajoute le répertoire DIR en haut de la pile, et en fait le nouveau\n"
+" \trépertoire de travail.\n"
+" \n"
+" Vous pouvez voir la pile des répertoires avec la commande « dirs »."
+
+#: builtins.c:1788
+#, fuzzy
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Enlève des éléments de la pile des répertoires. S'il n'y a pas\n"
+" d'argument, le répertoire en haut de la pile est enlevé,\n"
+" et le nouveau sommet de la pile devient le répertoire de travail.\n"
+" \n"
+" +N\tEnlève le Nième répertoire, en comptant de zéro depuis la gauche\n"
+" \tde la liste fournie par « dirs ». Par exemple : « popd +0 »\n"
+" \n"
+"enlève le premier répertoire, « popd +1 » le deuxième. \n"
+" -N\tEnlève le Nième répertoire, en comptant de zéro depuis la droite\n"
+" \tde la liste fournie par « dirs ». Par exemple : « popd -0 »\n"
+" \n"
+"enlève le dernier répertoire, « popd -1 » l'avant-dernier. \n"
+" -n\tne change pas de répertoire de travail lorsque des répertoires\n"
+" \tsont enlevés de la pile, de façon que seule la pile soit manipulée\n"
+" \n"
+" Vous pouvez voir la pile des répertoires avec la commande « dirs »."
+
+#: builtins.c:1818
+#, fuzzy
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Affiche la liste des répertoires actuellement mémorisés. Les répertoires\n"
+" sont insérés dans la liste avec la commande « pushd ». Vous pouvez "
+"remonter\n"
+" dans la liste en enlevant des éléments avec la commande « popd ».\n"
+" \n"
+" L'option « -l » spécifie que « dirs » ne doit pas afficher des versions\n"
+" raccourcies des répertoires relativement à votre répertoire personnel.\n"
+" Cela signifie que « ~/bin » devrait être affiché comme « /homes/bfox/bin "
+"».\n"
+" L'option « -v » permet à « dirs » d'afficher la pile des répertoires "
+"avec\n"
+" un élément par ligne, en commençant la ligne par la position dans la "
+"pile.\n"
+" L'option « -p » fait la même chose mais le numéro de position n'est pas\n"
+" affiché. L'option « -c » efface la pile des répertoires en enlevant "
+"tous\n"
+" les éléments.\n"
+" \n"
+" +N\t affiche le Nième élément en comptant de zéro depuis la gauche de "
+"la\n"
+" liste affichée par « dirs » lorsque celle-ci est appelée sans option.\n"
+" \n"
+" -N\t affiche le Nième élément en comptant de zéro depuis la droite de "
+"la\n"
+" liste affichée par « dirs » lorsque celle-ci est appelée sans option."
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+#, fuzzy
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+"« printf » formate et affiche les ARGUMENTS en contrôlant le FORMAT. Le "
+"FORMAT\n"
+" est une chaîne de caractères qui contient trois types d'objets : des "
+"caractères\n"
+" normaux qui sont simplement copiés vers la sortie standard, des "
+"séquences d'échappement\n"
+" qui sont converties et copiées vers la sortie standard et des "
+"spécifications de\n"
+" format, chacun entraînant l'affichage de l'argument suivant. En plus des "
+"formats\n"
+" standards de « printf(1) » , « %b » permet d'effectuer l'expansion des "
+"séquences\n"
+" d'échappement à contre-oblique dans l'argument correspondant et « %q » "
+"permet de\n"
+" protéger les arguments par guillemets de façon qu'ils puissent être "
+"réutilisés\n"
+" comme entrée du shell. Si l'option « -v » est fournie, la sortie est "
+"placée dans\n"
+" la variable VAR plutôt que d'être envoyée vers la sortie standard."
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+#, fuzzy
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Affiche les possibilités de complètement dépendant des options. Ceci est "
+"destiné\n"
+" à être utilisé depuis une fonction de shell générant des complètements "
+"possibles.\n"
+" Si le mot « WORD » optionnel est fourni, des correspondances avec « WORD "
+"»\n"
+" sont générées."
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xrealloc : impossible de réallouer %lu octets (%lu octets alloués)"
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc : impossible d'allouer %lu octets"
+
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc : %s:%d : impossible de réallouer %lu octets (%lu octets alloués)"
+
+#~ msgid " "
+#~ msgstr " "
+
+#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR,"
+#~ msgstr "Sans « EXPR », renvoie « $ligne $nomfichier ». Avec « EXPR »,"
+
+#~ msgid "returns \"$line $subroutine $filename\"; this extra information"
+#~ msgstr ""
+#~ "renvoie « $ligne $sousroutine $nomfichier » ; cette information "
+#~ "supplémentaire"
+
+#~ msgid "can be used used to provide a stack trace."
+#~ msgstr "peut être utilisée pour fournir une trace de la pile"
+
+#~ msgid ""
+#~ "The value of EXPR indicates how many call frames to go back before the"
+#~ msgstr ""
+#~ "La valeur de « EXPR » indique le nombre de cadres d'appel dont il faut "
+#~ "reculer"
+
+#~ msgid "current one; the top frame is frame 0."
+#~ msgstr "par rapport à l'actuel ; le cadre supérieur est le cadre 0."
+
+#~ msgid "%s: invalid number"
+#~ msgstr "%s : nombre non valable"
+
+#~ msgid "Shell commands matching keywords `"
+#~ msgstr "Commandes du shell correspondant aux mots-clés « "
+
+#~ msgid "Display the list of currently remembered directories. Directories"
+#~ msgstr ""
+#~ "Affiche la liste des répertoires actuellement mémorisés. Les répertoires"
+
+#~ msgid "find their way onto the list with the `pushd' command; you can get"
+#~ msgstr "sont insérés dans la pile avec la commande « pushd » ; vous pouvez"
+
+#~ msgid "back up through the list with the `popd' command."
+#~ msgstr ""
+#~ "remonter dans la pile en enlevant des éléments avec la commande « popd »."
+
+#~ msgid ""
+#~ "The -l flag specifies that `dirs' should not print shorthand versions"
+#~ msgstr ""
+#~ "L'option « -l » demande à « dirs » de ne pas afficher sous forme abrégée"
+
+#~ msgid ""
+#~ "of directories which are relative to your home directory. This means"
+#~ msgstr ""
+#~ "les répertoires relatifs à votre répertoire personnel. Cela signifie que"
+
+#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag"
+#~ msgstr ""
+#~ "le répertoire « ~/bin » pourra être affiché « /homes/bfox/bin ». L'option "
+#~ "« -v »"
+
+#~ msgid "causes `dirs' to print the directory stack with one entry per line,"
+#~ msgstr "demande à « dirs » d'afficher un répertoire de la pile par ligne,"
+
+#~ msgid ""
+#~ "prepending the directory name with its position in the stack. The -p"
+#~ msgstr ""
+#~ "en le précédant de sa position dans la pile. L'option « -p » fait la "
+#~ "même chose"
+
+#~ msgid "flag does the same thing, but the stack position is not prepended."
+#~ msgstr "sans afficher le numéro d'emplacement dans la pile."
+
+#~ msgid ""
+#~ "The -c flag clears the directory stack by deleting all of the elements."
+#~ msgstr ""
+#~ "L'option « -c » vide la pile des répertoires en retirant tous ses "
+#~ "éléments."
+
+#~ msgid ""
+#~ "+N displays the Nth entry counting from the left of the list shown by"
+#~ msgstr ""
+#~ "+N affiche la Nième entrée à partir de la gauche de la liste fournie par"
+
+#~ msgid " dirs when invoked without options, starting with zero."
+#~ msgstr ""
+#~ " « dirs » lorsqu'elle est appelée sans option, la première entrée "
+#~ "étant zéro."
+
+#~ msgid ""
+#~ "-N displays the Nth entry counting from the right of the list shown by"
+#~ msgstr ""
+#~ "+N affiche la Nième entrée à partir de la droite de la liste fournie par"
+
+#~ msgid "Adds a directory to the top of the directory stack, or rotates"
+#~ msgstr ""
+#~ "Ajoute un répertoire au dessus de la pile des répertoires ou effectue une"
+
+#~ msgid "the stack, making the new top of the stack the current working"
+#~ msgstr ""
+#~ "rotation de la pile en plaçant le répertoire supérieur comme répertoire "
+#~ "courant."
+
+#~ msgid "directory. With no arguments, exchanges the top two directories."
+#~ msgstr ""
+#~ "Sans paramètre, les deux répertoires supérieurs de la pile sont échangés."
+
+#~ msgid "+N Rotates the stack so that the Nth directory (counting"
+#~ msgstr ""
+#~ "+N effectue une rotation de la pile de façon que le Nième répertoire "
+#~ "soit"
+
+#~ msgid " from the left of the list shown by `dirs', starting with"
+#~ msgstr ""
+#~ "placé au dessus (N commençant à zéro et en partant à gauche de la liste"
+
+#~ msgid " zero) is at the top."
+#~ msgstr " fournie par « dirs »)."
+
+#~ msgid "-N Rotates the stack so that the Nth directory (counting"
+#~ msgstr ""
+#~ "+N effectue une rotation de la pile de façon que le Nième répertoire "
+#~ "soit"
+
+#~ msgid " from the right of the list shown by `dirs', starting with"
+#~ msgstr ""
+#~ "placé au dessus (N commençant à zéro et en partant à gauche de la liste"
+
+#~ msgid "-n suppress the normal change of directory when adding directories"
+#~ msgstr ""
+#~ "-n inhibe le changement de répertoire lors d'un ajout de répertoire "
+
+#~ msgid " to the stack, so only the stack is manipulated."
+#~ msgstr " à la liste. Seule la pile est manipulée."
+
+#~ msgid "dir adds DIR to the directory stack at the top, making it the"
+#~ msgstr ""
+#~ "dir ajoute « DIR » au dessus de la pile des répertoires, en faisant de "
+#~ "lui"
+
+#~ msgid " new current working directory."
+#~ msgstr " le nouveau répertoire courant."
+
+#~ msgid "You can see the directory stack with the `dirs' command."
+#~ msgstr ""
+#~ "Vous pouvez voir le contenu de la pile des répertoires avec la commande « "
+#~ "dirs »."
+
+#~ msgid "Removes entries from the directory stack. With no arguments,"
+#~ msgstr "Enlève des éléments de la pile des répertoires. Sans paramètre,"
+
+#~ msgid "removes the top directory from the stack, and cd's to the new"
+#~ msgstr "le répertoire supérieur de la pile est enlevé et un changement de"
+
+#~ msgid "top directory."
+#~ msgstr "de répertoire se fait vers le nouveau répertoire supérieur."
+
+#~ msgid "+N removes the Nth entry counting from the left of the list"
+#~ msgstr "+N enlève le Nième élément en commençant à zéro à gauche"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'"
+#~ msgstr "de la liste affichée par « dirs ». Par exemple, « popd +0 »"
+
+#~ msgid " removes the first directory, `popd +1' the second."
+#~ msgstr " enlève le premier répertoire, « popd +1 » le second."
+
+#~ msgid "-N removes the Nth entry counting from the right of the list"
+#~ msgstr "+N enlève la Nième entrée en commençant à zéro à droite"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'"
+#~ msgstr "de la liste affichée par « dirs ». Par exemple, « popd -0 »"
+
+#~ msgid " removes the last directory, `popd -1' the next to last."
+#~ msgstr " enlève le dernier répertoire, « popd -1 » l'avant-dernier."
+
+#~ msgid ""
+#~ "-n suppress the normal change of directory when removing directories"
+#~ msgstr ""
+#~ "-n inhibe le changement de répertoire lors de l'enlèvement d'un "
+#~ "répertoire"
+
+#~ msgid " from the stack, so only the stack is manipulated."
+#~ msgstr " de la liste. Seule la pile est manipulée."
+
+#~ msgid "allocated"
+#~ msgstr "alloué"
+
+#~ msgid "freed"
+#~ msgstr "libéré"
+
+#~ msgid "requesting resize"
+#~ msgstr "demande de redimensionnement"
+
+#~ msgid "just resized"
+#~ msgstr "redimensionné à l'instant"
+
+#~ msgid "bug: unknown operation"
+#~ msgstr "bogue : opération inconnue"
+
+#~ msgid "malloc: watch alert: %p %s "
+#~ msgstr "malloc : alerte de « watch » : %p %s "
+
+#~ msgid ""
+#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n"
+#~ " break N levels."
+#~ msgstr ""
+#~ "Permet de sortir d'une boucle FOR, WHILE ou UNTIL. Si N est précisé,\n"
+#~ " la sortie de boucle se fait sur N niveaux."
+
+#~ msgid ""
+#~ "Run a shell builtin. This is useful when you wish to rename a\n"
+#~ " shell builtin to be a function, but need the functionality of the\n"
+#~ " builtin within the function itself."
+#~ msgstr ""
+#~ "Lance une primitive du shell. Ceci est utile lorsque vous souhaitez "
+#~ "nommer une fonction comme\n"
+#~ " une primitive, mais que vous avez besoin d'utiliser la primitive dans "
+#~ "la fonction elle-même."
+
+#~ msgid ""
+#~ "Print the current working directory. With the -P option, pwd prints\n"
+#~ " the physical directory, without any symbolic links; the -L option\n"
+#~ " makes pwd follow symbolic links."
+#~ msgstr ""
+#~ "Affiche le répertoire de travail actuel. Avec l'option « -P », « pwd » "
+#~ "affiche\n"
+#~ " le répertoire physique, sans lien symbolique ; l'option « -L »\n"
+#~ " demande à « pwd » de suivre les liens symboliques."
+
+#~ msgid "Return a successful result."
+#~ msgstr "Renvoie un résultat de succès"
+
+#~ msgid ""
+#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell\n"
+#~ " function called `ls', and you wish to call the command `ls', you can\n"
+#~ " say \"command ls\". If the -p option is given, a default value is "
+#~ "used\n"
+#~ " for PATH that is guaranteed to find all of the standard utilities. "
+#~ "If\n"
+#~ " the -V or -v option is given, a string is printed describing "
+#~ "COMMAND.\n"
+#~ " The -V option produces a more verbose description."
+#~ msgstr ""
+#~ "Lance la commande COMMAND avec les ARGS en ignorant les fonctions du "
+#~ "shell. Si vous\n"
+#~ " avez défini une fonction de shell appelée « ls » et que vous voulez "
+#~ "appeler\n"
+#~ " la commande « ls », vous pouvez faire « command ls ». Si l'option « -"
+#~ "p » est\n"
+#~ " donnée, une valeur par défaut est utilisée pour le PATH garantissant "
+#~ "que tous\n"
+#~ " les utilitaires standards seront trouvés. Si l'option « -V » ou « -v "
+#~ "» est\n"
+#~ " donnée, une description de la commande s'affiche. L'option « -V » "
+#~ "fournit plus\n"
+#~ " d'informations."
+
+#~ msgid "Obsolete. See `declare'."
+#~ msgstr "Obsolète. Consulter « declare »."
+
+#~ msgid ""
+#~ "Create a local variable called NAME, and give it VALUE. LOCAL\n"
+#~ " can only be used within a function; it makes the variable NAME\n"
+#~ " have a visible scope restricted to that function and its children."
+#~ msgstr ""
+#~ "Permet de créer une variable locale appelée NAME, et de lui affecter une "
+#~ "VALUE.\n"
+#~ " LOCAL peut seulement être utilisé à l'intérieur d'une fonction ; il "
+#~ "rend le nom de\n"
+#~ " variable NAME visible uniquement à l'intérieur de la fonction et de "
+#~ "ses filles."
+
+#~ msgid ""
+#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed."
+#~ msgstr "Affiche les ARGs. L'option « -n » supprime le saut de ligne final."
+
+#~ msgid ""
+#~ "Enable and disable builtin shell commands. This allows\n"
+#~ " you to use a disk command which has the same name as a shell\n"
+#~ " builtin without specifying a full pathname. If -n is used, the\n"
+#~ " NAMEs become disabled; otherwise NAMEs are enabled. For example,\n"
+#~ " to use the `test' found in $PATH instead of the shell builtin\n"
+#~ " version, type `enable -n test'. On systems supporting dynamic\n"
+#~ " loading, the -f option may be used to load new builtins from the\n"
+#~ " shared object FILENAME. The -d option will delete a builtin\n"
+#~ " previously loaded with -f. If no non-option names are given, or\n"
+#~ " the -p option is supplied, a list of builtins is printed. The\n"
+#~ " -a option means to print every builtin with an indication of whether\n"
+#~ " or not it is enabled. The -s option restricts the output to the "
+#~ "POSIX.2\n"
+#~ " `special' builtins. The -n option displays a list of all disabled "
+#~ "builtins."
+#~ msgstr ""
+#~ "Active et désactive les primitives du shell. Ceci permet\n"
+#~ " d'utiliser une commande du disque qui a le même nom qu'une commande "
+#~ "intégrée\n"
+#~ " sans devoir spécifier un chemin complet. Si « -n » est utilisé, les\n"
+#~ " noms NAME sont désactivés ; sinon, les noms NAME sont activés. Par "
+#~ "exemple,\n"
+#~ " pour utiliser « test » trouvé dans $PATH au lieu de la primitive du\n"
+#~ " même nom, tapez « enable -n test ». Sur les systèmes permettant le "
+#~ "chargement\n"
+#~ " dynamique, l'option « -f » peut être utilisée pour charger de "
+#~ "nouvelles primitives\n"
+#~ " depuis l'objet partagé FILENAME. L'option « -d » efface une "
+#~ "primitive précédemment\n"
+#~ " chargée avec « -f ». Si aucun nom (n'étant pas une option) n'est "
+#~ "donné, ou si l'option\n"
+#~ " « -p » est spécifiée, une liste de primitive est affichée. L'option "
+#~ "« -a » permet d'afficher\n"
+#~ " toutes les primitives en précisant si elles sont activées ou non. "
+#~ "L'option « -s » restreint\n"
+#~ " la sortie aux primitives « special » POSIX.2. L'option « -n » affiche "
+#~ "une liste de toutes les\n"
+#~ " primitives désactivées."
+
+#~ msgid ""
+#~ "Read ARGs as input to the shell and execute the resulting command(s)."
+#~ msgstr ""
+#~ "Lit les ARGs comme une entrée du shell et exécute les commandes "
+#~ "résultantes."
+
+#~ msgid ""
+#~ "Exec FILE, replacing this shell with the specified program.\n"
+#~ " If FILE is not specified, the redirections take effect in this\n"
+#~ " shell. If the first argument is `-l', then place a dash in the\n"
+#~ " zeroth arg passed to FILE, as login does. If the `-c' option\n"
+#~ " is supplied, FILE is executed with a null environment. The `-a'\n"
+#~ " option means to make set argv[0] of the executed process to NAME.\n"
+#~ " If the file cannot be executed and the shell is not interactive,\n"
+#~ " then the shell exits, unless the shell option `execfail' is set."
+#~ msgstr ""
+#~ "Exécute le fichier FILE en remplaçant ce shell par le programme "
+#~ "spécifié.\n"
+#~ " Si FILE n'est pas spécifié, les redirections prennent effet dans\n"
+#~ " ce shell. Si le premier argument est « -l », un tiret est placé dans\n"
+#~ " l'argument n°0 transmis à FILE, comme le fait « login ». Si l'option\n"
+#~ " « -c » est fournie, FILE est exécuté avec un environnement vide.\n"
+#~ " L'option « -a » indique de définir « argv[0] » du processus exécuté\n"
+#~ " à NAME. Si le fichier ne peut pas être exécuté et que le shell n'est\n"
+#~ " pas interactif, alors le shell se termine, à moins que l'option « "
+#~ "execfail »\n"
+#~ " ne soit définie."
+
+#~ msgid "Logout of a login shell."
+#~ msgstr "Fermer un shell de connexion"
+
+#~ msgid ""
+#~ "For each NAME, the full pathname of the command is determined and\n"
+#~ " remembered. If the -p option is supplied, PATHNAME is used as the\n"
+#~ " full pathname of NAME, and no path search is performed. The -r\n"
+#~ " option causes the shell to forget all remembered locations. The -d\n"
+#~ " option causes the shell to forget the remembered location of each "
+#~ "NAME.\n"
+#~ " If the -t option is supplied the full pathname to which each NAME\n"
+#~ " corresponds is printed. If multiple NAME arguments are supplied "
+#~ "with\n"
+#~ " -t, the NAME is printed before the hashed full pathname. The -l "
+#~ "option\n"
+#~ " causes output to be displayed in a format that may be reused as "
+#~ "input.\n"
+#~ " If no arguments are given, information about remembered commands is "
+#~ "displayed."
+#~ msgstr ""
+#~ "Pour chaque NAME, le chemin complet de la commande est déterminé puis "
+#~ "mémorisé.\n"
+#~ " Si l'option « -p » est fournie, le CHEMIN est utilisé comme chemin "
+#~ "complet\n"
+#~ " pour NAME, et aucune recherche n'est effectuée. L'option « -r » "
+#~ "demande au shell\n"
+#~ " d'oublier tous les chemins mémorisés. L'option « -d » demande au "
+#~ "shell d'oublier\n"
+#~ " les chemins mémorisés pour le NAME. Si l'option « -t » est fournie, "
+#~ "le chemin\n"
+#~ " complet auquel correspond chaque NAME est affiché. Si plusieurs NAME "
+#~ "sont fournis\n"
+#~ " à l'option « -t », le NAME est affiché avant chemin complet haché. "
+#~ "L'option\n"
+#~ " « -l » permet d'utiliser un format de sortie qui peut être réutilisé "
+#~ "comme entrée.\n"
+#~ " Si aucun argument n'est donné, des informations sur les commandes "
+#~ "mémorisées sont\n"
+#~ " affichées."
+
+#~ msgid ""
+#~ "Display helpful information about builtin commands. If PATTERN is\n"
+#~ " specified, gives detailed help on all commands matching PATTERN,\n"
+#~ " otherwise a list of the builtins is printed. The -s option\n"
+#~ " restricts the output for each builtin command matching PATTERN to\n"
+#~ " a short usage synopsis."
+#~ msgstr ""
+#~ "Affiche des informations utiles sur les commandes intégrées. Si MOTIF\n"
+#~ " est précisé, une aide détaillée sur toutes les commandes "
+#~ "correspondant\n"
+#~ " au MOTIF sont affichées, sinon une liste des commandes intégrées est\n"
+#~ " fournie. L'option « -s » restreint l'affichage de chaque commande\n"
+#~ " correspondant au MOTIF à une courte description sur l'utilisation."
+
+#~ msgid ""
+#~ "By default, removes each JOBSPEC argument from the table of active jobs.\n"
+#~ " If the -h option is given, the job is not removed from the table, but "
+#~ "is\n"
+#~ " marked so that SIGHUP is not sent to the job if the shell receives a\n"
+#~ " SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove "
+#~ "all\n"
+#~ " jobs from the job table; the -r option means to remove only running "
+#~ "jobs."
+#~ msgstr ""
+#~ "Par défaut, enlève tous les arguments JOBSPEC de la table des tâches "
+#~ "actives.\n"
+#~ " Si l'option « -h » est fournie, la tâche n'est pas retirée de la "
+#~ "table mais\n"
+#~ " est marquée de telle sorte que le signal SIGHUP ne lui soit pas "
+#~ "envoyé quand\n"
+#~ " le shell reçoit un SIGHUP. Lorsque JOBSPEC n'est pas fournie, "
+#~ "l'option « -a »,\n"
+#~ " permet d'enlever toutes les tâches de la table des tâches. L'option « "
+#~ "-r »\n"
+#~ " indique de ne retirer que les tâches en cours de fonctionnement."
+
+#~ msgid ""
+#~ "Causes a function to exit with the return value specified by N. If N\n"
+#~ " is omitted, the return status is that of the last command."
+#~ msgstr ""
+#~ "Permet à une fonction de se terminer avec le code de retour spécifié par "
+#~ "N.\n"
+#~ " Si N est omis, le code de retour est celui de la dernière commande."
+
+#~ msgid ""
+#~ "For each NAME, remove the corresponding variable or function. Given\n"
+#~ " the `-v', unset will only act on variables. Given the `-f' flag,\n"
+#~ " unset will only act on functions. With neither flag, unset first\n"
+#~ " tries to unset a variable, and if that fails, then tries to unset a\n"
+#~ " function. Some variables cannot be unset; also see readonly."
+#~ msgstr ""
+#~ "Pour chaque NAME, supprime la variable ou la fonction correspondante.\n"
+#~ " En spécifiant « -v », « unset » agira seulement sur les variables.\n"
+#~ " Avec l'option « -f », « unset » n'agit que sur les fonctions. Sans "
+#~ "option,\n"
+#~ " « unset » essaye d'abord de supprimer une variable et, s'il échoue, "
+#~ "essaye\n"
+#~ " de supprimer une fonction. Certaines variables ne peuvent pas être "
+#~ "supprimées.\n"
+#~ " Consultez aussi « readonly ». "
+
+#~ msgid ""
+#~ "NAMEs are marked for automatic export to the environment of\n"
+#~ " subsequently executed commands. If the -f option is given,\n"
+#~ " the NAMEs refer to functions. If no NAMEs are given, or if `-p'\n"
+#~ " is given, a list of all names that are exported in this shell is\n"
+#~ " printed. An argument of `-n' says to remove the export property\n"
+#~ " from subsequent NAMEs. An argument of `--' disables further option\n"
+#~ " processing."
+#~ msgstr ""
+#~ "Les NAME sont marqués pour export automatique vers l'environnement des\n"
+#~ " prochaines commandes exécutées. si l'option « -f » est donnée, les "
+#~ "NAME\n"
+#~ " se rapportent à des fonctions. Si aucun NAME n'est donné ou si « -p "
+#~ "»\n"
+#~ " est fourni, la liste de tous les NAME exportés dans ce shell "
+#~ "s'affiche.\n"
+#~ " L'argument « -n » permet de supprimer la propriété d'export des NAME "
+#~ "qui\n"
+#~ " suivent. L'argument « -- » désactive le traitement des options "
+#~ "suivantes."
+
+#~ msgid ""
+#~ "The given NAMEs are marked readonly and the values of these NAMEs may\n"
+#~ " not be changed by subsequent assignment. If the -f option is given,\n"
+#~ " then functions corresponding to the NAMEs are so marked. If no\n"
+#~ " arguments are given, or if `-p' is given, a list of all readonly "
+#~ "names\n"
+#~ " is printed. The `-a' option means to treat each NAME as\n"
+#~ " an array variable. An argument of `--' disables further option\n"
+#~ " processing."
+#~ msgstr ""
+#~ "Les NAME donnés sont marqués pour lecture seule et les valeurs de ces "
+#~ "NAME\n"
+#~ " ne peuvent plus être changés par affection. Si l'option « -f » est "
+#~ "donnée,\n"
+#~ " les fonctions correspondant aux NAME sont marquées de la sorte. Si "
+#~ "aucun\n"
+#~ " argument n'est donné ou si « -p » est fourni, la liste de tous les "
+#~ "noms\n"
+#~ " en lecture seule est affichée. L'option « -a » indique de traiter "
+#~ "tous les\n"
+#~ " NAME comme des variables tableaux. L'argument « -- » désactive le "
+#~ "traitement\n"
+#~ " des option suivantes."
+
+#~ msgid ""
+#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is\n"
+#~ " not given, it is assumed to be 1."
+#~ msgstr ""
+#~ "Les paramètres de position depuis $N+1 ... sont renommés en $1 ...\n"
+#~ " Si N n'est pas fourni, il est supposé égal à 1."
+
+#~ msgid ""
+#~ "Suspend the execution of this shell until it receives a SIGCONT\n"
+#~ " signal. The `-f' if specified says not to complain about this\n"
+#~ " being a login shell if it is; just suspend anyway."
+#~ msgstr ""
+#~ "Suspend l'exécution de ce shell jusqu'à ce qu'il reçoive le signal "
+#~ "SIGCONT.\n"
+#~ " Si « -f » est spécifié, il indique de ne pas se plaindre s'il s'agit "
+#~ "d'un \n"
+#~ " shell de connexion, mais de suspendre quand-même."
+
+#~ msgid ""
+#~ "Print the accumulated user and system times for processes run from\n"
+#~ " the shell."
+#~ msgstr ""
+#~ "Affiche les temps utilisateur et système accumulés pour les processus\n"
+#~ " lancés depuis le shell."
+
+#~ msgid ""
+#~ "For each NAME, indicate how it would be interpreted if used as a\n"
+#~ " command name.\n"
+#~ " \n"
+#~ " If the -t option is used, `type' outputs a single word which is one "
+#~ "of\n"
+#~ " `alias', `keyword', `function', `builtin', `file' or `', if NAME is "
+#~ "an\n"
+#~ " alias, shell reserved word, shell function, shell builtin, disk "
+#~ "file,\n"
+#~ " or unfound, respectively.\n"
+#~ " \n"
+#~ " If the -p flag is used, `type' either returns the name of the disk\n"
+#~ " file that would be executed, or nothing if `type -t NAME' would not\n"
+#~ " return `file'.\n"
+#~ " \n"
+#~ " If the -a flag is used, `type' displays all of the places that "
+#~ "contain\n"
+#~ " an executable named `file'. This includes aliases, builtins, and\n"
+#~ " functions, if and only if the -p flag is not also used.\n"
+#~ " \n"
+#~ " The -f flag suppresses shell function lookup.\n"
+#~ " \n"
+#~ " The -P flag forces a PATH search for each NAME, even if it is an "
+#~ "alias,\n"
+#~ " builtin, or function, and returns the name of the disk file that "
+#~ "would\n"
+#~ " be executed."
+#~ msgstr ""
+#~ "Indique comment chaque NAME serait interprété s'il était utilisé comme "
+#~ "un\n"
+#~ " nom de commande.\n"
+#~ " \n"
+#~ " Si l'option « -t » est utilisée, « type » affiche un simple mot "
+#~ "parmi\n"
+#~ " « alias », « keyword », « function », « builtin », « file » ou « », "
+#~ "si\n"
+#~ " NAME est respectivement un alias, un mot réservé du shell, une "
+#~ "fonction\n"
+#~ " du shell, une primitive, un fichier du disque, ou s'il est inconnu.\n"
+#~ " \n"
+#~ " Si l'indicateur « -p » est utilisé, « type » renvoie soit le nom du "
+#~ "fichier\n"
+#~ " du disque qui serait exécuté, soit rien si « type -t NAME » ne "
+#~ "retourne pas\n"
+#~ " « file ».\n"
+#~ " \n"
+#~ " Si « -a » est utilisé, « type » affiche tous les emplacements qui "
+#~ "contiennent\n"
+#~ " un exécutable nommé « file ». Ceci inclut les alias, les primitives "
+#~ "et les\n"
+#~ " fonctions si, et seulement si « -p » n'est pas également utilisé.\n"
+#~ " \n"
+#~ " L'indicateur « -P » force une recherche dans PATH pour chaque NAME "
+#~ "même\n"
+#~ " si c'est un alias, une primitive ou une fonction et renvoie le nom "
+#~ "du\n"
+#~ " fichier du disque qui serait exécuté."
+
+#~ msgid ""
+#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if\n"
+#~ " `-S' is supplied, the current value of the mask is printed. The `-"
+#~ "S'\n"
+#~ " option makes the output symbolic; otherwise an octal number is "
+#~ "output.\n"
+#~ " If `-p' is supplied, and MODE is omitted, the output is in a form\n"
+#~ " that may be used as input. If MODE begins with a digit, it is\n"
+#~ " interpreted as an octal number, otherwise it is a symbolic mode "
+#~ "string\n"
+#~ " like that accepted by chmod(1)."
+#~ msgstr ""
+#~ "Le masque de création des fichiers utilisateurs est réglé à MODE. Si "
+#~ "MODE\n"
+#~ " est omis ou si « -S » est fourni, la valeur actuelle du masque est "
+#~ "affichée\n"
+#~ " L'option « -S » rend la sortie symbolique, sinon une valeur octale "
+#~ "est\n"
+#~ " est utilisée. Si « -p » est fourni et que MODE est omis, la sortie se "
+#~ "fait\n"
+#~ " dans un format qui peut être réutilisé comme entrée. Si MODE commence "
+#~ "par\n"
+#~ " un chiffre, il est interprété comme un nombre octal, sinon comme une "
+#~ "chaîne\n"
+#~ " symbolique de mode comme celle utilisée par « chmod(1) »."
+
+#~ msgid ""
+#~ "Wait for the specified process and report its termination status. If\n"
+#~ " N is not given, all currently active child processes are waited for,\n"
+#~ " and the return code is zero. N is a process ID; if it is not given,\n"
+#~ " all child processes of the shell are waited for."
+#~ msgstr ""
+#~ "Attend le processus spécifié et donne son code de retour. Si N n'est\n"
+#~ " pas donné, tous les processus fils actuellement actifs sont attendus\n"
+#~ " et le code de retour est zéro. N est un n° de processus. S'il n'est\n"
+#~ " pas fourni, tous les processus du shell sont attendus."
+
+#~ msgid ""
+#~ "Create a simple command invoked by NAME which runs COMMANDS.\n"
+#~ " Arguments on the command line along with NAME are passed to the\n"
+#~ " function as $0 .. $n."
+#~ msgstr ""
+#~ "Crée une simple commande invoquée avec NAME, et qui lance les\n"
+#~ " commandes COMMANDS. Les arguments fournis avec NAME sur la\n"
+#~ " ligne de commande sont transmis à la fonction en tant que $0 .. $n."
+
+#~ msgid ""
+#~ "Toggle the values of variables controlling optional behavior.\n"
+#~ " The -s flag means to enable (set) each OPTNAME; the -u flag\n"
+#~ " unsets each OPTNAME. The -q flag suppresses output; the exit\n"
+#~ " status indicates whether each OPTNAME is set or unset. The -o\n"
+#~ " option restricts the OPTNAMEs to those defined for use with\n"
+#~ " `set -o'. With no options, or with the -p option, a list of all\n"
+#~ " settable options is displayed, with an indication of whether or\n"
+#~ " not each is set."
+#~ msgstr ""
+#~ "Commute la valeur des variables qui contrôlent les comportements "
+#~ "optionnels.\n"
+#~ " L'option « -s » indique d'activer chaque option nommée OPTNAME. "
+#~ "L'option\n"
+#~ " « -u » désactive l'option OPTNAME. L'option « -q » rend la sortie "
+#~ "silencieuse.\n"
+#~ " Le code de retour indique si chaque OPTNAME est activée ou "
+#~ "désactivée.\n"
+#~ " L'option « -o » restreint les options OPTNAME à celles qui peuvent "
+#~ "être utilisées avec\n"
+#~ " « set -o ». Sans option ou avec l'option « -p », une liste de toutes "
+#~ "les\n"
+#~ " options modifiables est affichée, avec une indication sur l'état de "
+#~ "chacune."
+
+#~ msgid ""
+#~ "For each NAME, specify how arguments are to be completed.\n"
+#~ " If the -p option is supplied, or if no options are supplied, "
+#~ "existing\n"
+#~ " completion specifications are printed in a way that allows them to "
+#~ "be\n"
+#~ " reused as input. The -r option removes a completion specification "
+#~ "for\n"
+#~ " each NAME, or, if no NAMEs are supplied, all completion "
+#~ "specifications."
+#~ msgstr ""
+#~ "Pour chaque NAME, spécifie comment les arguments doivent être complétés.\n"
+#~ " Si l'option « -p » est fournie ou si aucune option n'est fournie, les "
+#~ "spécifications\n"
+#~ " de complètement actuelles sont affichées de manière à pouvoir être "
+#~ "réutilisées\n"
+#~ " comme entrée. L'option « -r » enlève la spécification de complètement "
+#~ "pour chaque\n"
+#~ " NAME ou, si aucun NAME n'est fourni, toutes les spécifications de "
+#~ "complètement."
diff --git a/po/ga.gmo b/po/ga.gmo
new file mode 100644
index 0000000..531788b
--- /dev/null
+++ b/po/ga.gmo
Binary files differ
diff --git a/po/ga.po b/po/ga.po
new file mode 100644
index 0000000..de7f03c
--- /dev/null
+++ b/po/ga.po
@@ -0,0 +1,4324 @@
+# translation of bash4.po to Irish
+# Copyright (C) 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the bash package.
+#
+# Séamus Ó Ciardhuáin <seoc(at)iolfree.ie>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: bash 4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2009-09-24 23:08+0100\n"
+"Last-Translator: Séamus Ó Ciardhuáin <seoc@iolfree.ie>\n"
+"Language-Team: Irish <gaeilge-gnulinux@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n==2 ? 1 : 2;\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "droch-fhoscript eagair"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr ""
+"%s: ní féidir eagar innéacsaithe a thiontú go heagar comhthiomsaitheach"
+
+#: arrayfunc.c:480
+#, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: eochair neamhbhailí eagair chomhthiomsaithigh"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: ní féidir sannadh go hinnéacs neamhuimhriúil."
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+"%s: %s: caithfear foscript a úsáid le sannadh chuig eagar comhthiomsaitheach"
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: ní féidir cruthú: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+"bash_execute_unix_command: ní féidir mapa eochrach an ordaithe a aimsiú"
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: ní \" é an chéad charachtar nach spás bán é."
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "Níl \"%c\" dúnta i %s"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: deighilteoir idirstaid ar iarraidh"
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "\"%s\": ainm neamhbhailí ar mhapa eochrach "
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr "níl eagarthóireacht líne cumasaithe"
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "\"%s\": ainm neamhbhailí ar mhapa eochrach "
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: ní féidir léamh: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "\"%s\": ní féidir dícheangail"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "\"%s\": ainm feidhme neamhaithnid"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "Níl %s ceangailte le heochair ar bith.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "Is féidir %s a ghlaoigh trí "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr "comhaireamh lúibe"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "Gan chiall ach i lúb \"for\", \"while\" nó \"until\""
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+"Aischuir comhthéacs an ghlaoigh reatha fhoghnáthaimh.\n"
+" \n"
+" Gan SLONN, aischuirtear "
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "Níl HOME socruithe"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "Níl OLDPWD socruithe"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr "líne %d: "
+
+#: builtins/common.c:139 error.c:261
+#, c-format
+msgid "warning: "
+msgstr "rabhadh: "
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr "%s: úsáid: "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "An iomarca argóintí"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: tá argóint riachtanach don rogha"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: argóint uimhriúil de dhíth"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: gan aimsiú"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: rogha neamhbhailí"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: ainm neamhbhailí rogha"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "\"%s\": ní aitheantóir bailí é"
+
+#: builtins/common.c:238
+msgid "invalid octal number"
+msgstr "uimhir ochtnártha neamhbhailí"
+
+#: builtins/common.c:240
+msgid "invalid hex number"
+msgstr "uimhir heicsidheachúlach neamhbhailí"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "uimhir neamhbhailí"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: sonrú neamhbhailí comhartha"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "\"%s\": ní aitheantas próisis nó sonrú jab bailí é"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: athróg inléite amháin"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s as raon"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "argóint"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s as raon"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: níl a léithéid de jab ann."
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: gan rialú jabanna."
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "Gan rialú jabanna."
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: srianta"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "srianta"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: ní ordú ionsuite blaoisce é."
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "earráid scríofa: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr "earráid agus airíonna teirminéil á socrú: %s"
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr "earráid agus airíonna teirminéil á fáil: %s"
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: earráid ag fáil na comhadlainne reatha: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: sonrú jab athbhríoch"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: ainm neamhbhailí gnímh"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: níl sonrú iomlánaithe ann."
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr ""
+"Rabhadh: b'fhéidir nach n-oibríonn an rogha -F mar a bheifeá ag súil leis."
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr ""
+"Rabhadh: b'fhéidir nach n-oibríonn an rogha -C mar a bheifeá ag súil leis."
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr "níl an fheidhm chomhlánaithe á rith faoi láthair"
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "Inúsáidte i bhfeidhmeanna amháin. "
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "Ní féidir \"-f\" a úsáid chun feidhmeanna a dhéanamh"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: feidhm inléite amháin"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: ní féidir athróga eagair a scrios mar seo."
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+"%s: ní féidir eagar comhthiomsaitheach a thiontú go heagar innéacsaithe"
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "Níl luchtú dinimiciúil ar fáil"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "Ní féidir an réad comhroinnte %s a oscailt: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "Ní féidir %s a aimsiú sa réad comhroinnte %s: %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: níl sé luchtaithe go dinimiciúil"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: ní féidir scrios: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: is comhadlann é"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: ní gnáthchomhad é"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: tá an comhad ró-mhór"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: ní féidir comhad dénártha a rith"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: ní féidir rith: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr "logout\n"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "Ní blaosc logála isteach é seo: úsáid \"exit\""
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "Tá jabanna stoptha ann.\n"
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr "Tá jabanna ag rith.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "Níor aimsíodh ordú"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "Sonrú staire"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: ní féidir comhad sealadach a oscailt: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr "reatha"
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "Thosaigh jab %d gan rialú jabanna."
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: rogha neamhdhleathach -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: tá argóint riachtanach don rogha -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "Tá haiseáil díchumasaithe."
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: tá an tábla haiseála folamh.\n"
+
+#: builtins/hash.def:244
+#, c-format
+msgid "hits\tcommand\n"
+msgstr "amais\tordú\n"
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Ordaithe blaoisce a mheaitseálann an lorgfhocal \""
+msgstr[1] "Ordaithe blaoisce a mheaitseálann na lorgfhocail \""
+msgstr[2] "Ordaithe blaoisce a mheaitseálann na lorgfhocail '"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"Ní mheaitseálann ábhar cabhrach ar bith \"%s\". Bain triail as \"help help\" "
+"nó \"man -k %s\" nó \"info %s\"."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: ní féidir oscailt: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"Tá na horduithe blaoisce seo sainmhínithe go hinmheánach.\n"
+"Usáid \"help\" leis an liosta seo a thaispeáint.\n"
+"Úsáid \"help ainm\" chun tuilleadh eolais a fháil faoin bhfeidhm \"ainm\".\n"
+"Úsáid \"info bash\" chun tuilleadh eolais a fháil faoin mblaosc féin.\n"
+"Úsáid \"man -k\" nó \"info\" chun tuilleadh eolais a fháil faoi ordaithe "
+"nach bhfuil sa liosta seo.\n"
+"Ciallaíonn réalt (*) ar ainm go bhfuil an t-ordú díchumasaithe.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "Ní féidir níos mó ná ceann amháin as -anrw a úsáid."
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "suíomh staire"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: theip ar fhairsingiú staire."
+
+#: builtins/inlib.def:71
+#, c-format
+msgid "%s: inlib failed"
+msgstr "%s: theip ar inlib"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "Níl roghanna eile ceadaithe le \"-x\""
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: is gá le argóintí bheith ina aitheantais phróisis nó jab"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Earráid neamhaithnid"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "Ag súil le slonn"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: ní athróg eagair é"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: sonrú neamhbhailí tuairisceora comhaid"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: tuairisceoir comhaid neamhbhailí: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, c-format
+msgid "%s: invalid line count"
+msgstr "%s: comhaireamh neamhbhailí línte"
+
+#: builtins/mapfile.def:277
+#, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: bunphointe neamhbhailí eagair"
+
+#: builtins/mapfile.def:294
+#, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: candam neamhbhailí aisghlaoigh"
+
+#: builtins/mapfile.def:326
+msgid "empty array variable name"
+msgstr "ainm folamh athróga eagair"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr "tacaíocht le hathróga eagair de dhíth"
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "\"%s\": carachtar formáide ar iarraidh."
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "\"%c\": carachtar formáide neamhbhailí."
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr "rabhadh: %s: %s"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "digit heicsidheachúlach ar iarraidh le haghaidh \\x"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "Níl comhadlann eile ann"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<níl comhadlann reatha ann>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr "cruach fholamh chomhadlainne"
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr "innéacs cruaiche comhadlainne"
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: sonrú neamhbhailí teorann ama"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "earráid léite: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+"ní féidir \"return\" a dhéanamh ach ó fheidhm nó ó script rite le \"source\""
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "Ní féidir feidhm agus athróg a dhíshocrú ag an am céanna."
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: ní féidir díshocrú"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: ní féidir díshocrú: %s inléite amháin"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: ní athróg eagair é"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: ní feidhm é."
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "comhaireamh iomlaoide"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr "Ní féidir roghanna blaoisce a shocrú agus a dhíshocrú ag an am céanna."
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: ainm neamhbhailí ar rogha blaoisce"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "Is gá don argóint bheith ina ainm comhaid."
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: níor aimsíodh an comhad"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "Ní féidir cur ar fionraí."
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "Ní féidir blaosc logála isteach a chur ar fionraí."
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "Tá %s ailiasáilte go \"%s\".\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "Is eochairfhocal blaoisce é %s.\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "Is feidhm é %s.\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "Is ordú ionsuite blaoisce é %s\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "Tá %s %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "Tá %s haiseáilte (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s: argóint teorann neamhbhailí"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "\"%c\": droch-ordú"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: ní féidir teorainn a fháil: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr "teorainn"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: ní féidir teorainn a athrú: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "uimhir ochtnártha"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "\"%c\": oibreoir neamhbhailí móid shiombalaigh"
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "\"%c\": carachtar neamhbhailí móid shiombalaigh"
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr " líne "
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "Ordú deireanach: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "Ag tobscor..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "earráid ordaithe neamhaithnid"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "droch-chineál ordaithe"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "drochnascóir"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "drochléim"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: athróg neamhcheangailte"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "imithe thar am ag feitheamh le hionchur: logáil amach uathoibríoch\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "Ní féidir an ionchur caighdeánach a atreorú ó /dev/null: %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "FORMÃID_AMA: \"%c\": carachtar formáide neamhbhaií."
+
+#: execute_cmd.c:2075
+msgid "pipe error"
+msgstr "earráid phíopa"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: srianta: ní féidir \"/\" a shonrú in ainmneacha ordaithe"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: níor aimsíodh an t-ordú"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: drochléirmhínitheoir"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr ""
+"Ní féidir an tuairisceoir comhaid %d a dhúbailt mar thuairisceoir comhaid %d."
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "imithe thar leibhéal athchursála sloinn"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "gannsreabhadh na cruaiche athchúrsála"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "Earráid chomhréire sa slonn."
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "Deineadh iarracht sannadh go rud nach athróg é."
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "roinnt ar 0"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "fabht: droch-chomhartha expassign"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "Bhíothas ag súil le \":\" le haghaidh sloinn choinníollaigh."
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "Easpónant níos lú ná 0."
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr "ag súil le aitheantóir tar éis réamhincriminte nó réamhdeicriminte"
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "\")\" ar iarraidh"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "Earráid chomhréire: bhíothas ag súil le hoibreann."
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "earráid chomhréire: oibreoir neamhbhailí uimhríochta"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s%s%s: %s (comhartha earráide \"%s\")"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "Bonnuimhir uimhríochtúil neamhbhailí."
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "Tá an luach rómhór don bhonnuimhir."
+
+#: expr.c:1329
+#, c-format
+msgid "%s: expression error\n"
+msgstr "%s: earráid sloinn\n"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getcwd: ní féidir na máthairchomhadlanna a rochtain."
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr ""
+"ní féidir an mód gan mhoill a athshocrú le haghaidh an tuairisceora chomhaid "
+"%d"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+"Ní féidir tuairisceoir comhaid nua a leithdháileadh le haghaidh ionchur bash "
+"ón tuairisceoir comhaid %d."
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr ""
+"save_bash_input: tá an maolán ann cheana le haghaidh an tuairisceoir comhaid "
+"nua %d"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr "start_pipeline: pgrp píopa"
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr "tá an aitheantas an phróisis ghabhlaithe %d sa jab %d atá ag rith"
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "Tá an jab stoptha %d leis an ngrúpa próisis %ld á scrios."
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr "add_process: próiseas %5ld (%s) sa phíblíne"
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr "add_process: próiseas %5ld (%s) marcáilte mar fós beo"
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: %ld: níl an aitheantóir próisis sin ann."
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr "Comhartha %d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Déanta"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Stoptha"
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr "Stoptha(%s)"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "Ag Rith"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Déanta(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "Scoir %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Stádas neamhaithnid"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(cuimhne dumpáilte)"
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr " (comhadlann oibre: %s)"
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "setpgid macphróisis (%ld go %ld)"
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait: níl an próiseas %ld ina mhacphróiseas den bhlaosc seo."
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "wait_for: níl taifead den phróiseas %ld"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job: tá an jab %d stoptha."
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: tá an jab críochnaithe."
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: tá an jab %d sa chúlra cheana."
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, c-format
+msgid "%s: line %d: "
+msgstr "%s: líne %d: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr " (cuimhne dumpáilte)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(comhadlann oibre anois: %s)\n"
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_job_control: theip ar getpgrp"
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_job_control: araíonacht líne"
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_job_control: setpgid"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr "ní féidir grúpa próisis teirminéil a shocrú (%d)"
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "Níl rialú jabanna sa bhlaosc seo."
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc: dearbhú teipthe: %s\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"malloc: %s:%d: dearbhú ina phraiseach\r\n"
+
+#: lib/malloc/malloc.c:313
+msgid "unknown"
+msgstr "neamhaithnid"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr "malloc: bloc ar an liosta saor scriosta"
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free: glaoite le argóint bhloic á saoradh cheana"
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free: glaoite le argóint bhloic nár leithdháileadh"
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr "free: gannsreabhadh; tá mh_nbytes as raon"
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free: ní ionann méid na smután túis agus deiridh"
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc: glaoite le argóint bhloic nár leithdháileadh"
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr "realloc: gannsreabhadh; tá mh_nbytes as raon"
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "realloc: ní ionann méideanna na smután túis agus deiridh"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr "register_alloc: an bhfuil an tábla leithdháilte lán le FIND_ALLOC?\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr ""
+"register_alloc: an bhfuil %p sa tábla mar atá sé leithdháilte cheana?\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "register_free: an bhfuil %p sa tábla cheana mar ceann saor?\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "Bonn neamhbhailí"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: óstríomhaire neamhaithnid"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: seirbhís neamhbhailí"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: drochshonrú conaire líonra"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "Ní thacaítear le oibríochtaí líonra."
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc: %s:%d: ní féidir %lu beart a leithdháileadh"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc: %s:%d: ní féidir %lu beart a leithdháileadh"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Tá ríomhphost agat i $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Tá ríomhphost nua agat i $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "Tá an ríomhphost i %s léite\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "Earráid chomhréire: tá slonn uimhríochtúil de dhith."
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "Earráid chomhréire: \";\" gan súil leis."
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "Earráid chomhréire: \"((%s))\""
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: drochchineál ordaithe %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+"cáipéis leabaithe ag líne %d teormharcáilte le deireadh comhaid (\"%s\" á "
+"lorg)"
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr "make_redirection: ordú atreoraithe \"%d\" as raon."
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "Deireadh comhaid gan súil leis agus \"%c\" a mheaitseálann á lorg."
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "Deireadh comhaid gan súil leis agus \"]]\" á lorg."
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr ""
+"Earráid chomhréire i slonn coinníollach: comhartha \"%s\" gan suil leis."
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "Earráid chomhréire i slonn coinníollach."
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "Comhartha \"%s\" gan súil leis; ag súil le \")\"."
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "Ag súil le \")\""
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "Argóint \"%s\" gan súil lei go hoibreoir aonártha coinníollach."
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "Argóint gan súil lei go hoibreoir coinníollach aonártha ."
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr ""
+"Comhartha \"%s\" gan súil leis. Bhíothas ag súil le hoibreoir coinníollach "
+"dénártha."
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "Bhíothas ag súil le hoibreoir coinníollach dénártha."
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "Argóint \"%s\" gan súil lei go hoibreoir dénártha coinníollach."
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "Argóint gan súil lei go hoibreoir dénártha coinníollach."
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "Comhartha \"%c\" gan súil leis in ordú coinníollach."
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "Comhartha \"%s\" gan súil leis in ordú coinníollach."
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "Comhartha %d gan súil leis in ordú coinníollach."
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr ""
+"Earráid chomhréire in aice comhartha \"%s\" nach rabhthas ag súil leis."
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "Earráid chomhréire in aice \"%s\""
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "Earráid chomhréire: deireadh comhaid gan súil leis."
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "Earráid chomhréire"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Úsáid \"%s\" le scoir den mblaosc.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "Deireadh comhaid gan súil leis agus \")\" á lorg le meaitseáil."
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "Iomlánú: níor aimsíodh an fheidhm \"%s\"."
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr "progcomp_insert: %s: tá COMPSPEC neamhnitheach"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: drochnascóir \"%d\""
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d: tuairisceoir comhaid neamhbhailí: %s"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "cprintf: \"%c\": carachtar formáide neamhbhailí"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "tuairisceoir comhaid as raon"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: atreorú athbhríoch"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: ní féidir comhad atá ann cheana a fhorscríobh."
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: srianta: ní féidir aschur a atreorú."
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "ní féidir cáipéis shealadach a chruthú don cháipéis leabaithe: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: ní féidir liosta a shannadh go ball eagair."
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "Ní thacaítear le /dev/(tcp|udp)/óstríomhaire/port gan líonrú."
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "Earráid atreoraithe: ní féidir an tuairisceoir comhaid a dhúbailt."
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "Níorbh fhéidir /tmp a aimsiú. Cruthaigh é le do thoil!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "Caithfidh /tmp bheith ina ainm comhadlainne bailí."
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: rogha neamhbhailí"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Níl ainm orm!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU bash, leagan %s-(%s)\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Úsáid:\t%s [rogha fada GNU] [rogha] ...\n"
+"\t%s [rogha fada GNU] [rogha] comhad_scripte ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "Roghanna fada GNU:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Roghanna blaoisce:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD nó -c ordú nó -O rogha_shopt\t\t(glaoch amháin)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s nó -o rogha\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"Úsáid %s -c \"help set\" le haghaidh tuilleadh eolais faoi roghanna "
+"blaoisce.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"Úsáid \"%s -c help\" le haghaidh tuilleadh eolais faoi orduithe ionsuite "
+"blaoisce.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "Úsáid an t-ordú \"bashbug\" le tuarascáil a sheoladh faoi fhabht.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d: oibríocht neamhbhailí"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Droch-chomhartha"
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Crochadh"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Idirbhriseadh"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "Scoir"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Treoir mídhleathach"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "Rianú/gaistiú brisphointe"
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "Treoir ABORT"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "Treoir EMT"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Eisceacht snámhphointe"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "Maraithe"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "Earráid bhus"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Fabht deighilte"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Droch-ghlaoch córais"
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "Píopa briste"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Clog aláraim"
+
+#: siglist.c:111
+msgid "Terminated"
+msgstr "Críochnaithe"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "Staid phráinneach I/A"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Stoptha (comhartha)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "Lean ar aghaidh"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "Bás macphróisis nó stopadh"
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Stoptha (ionchur teirminéil)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Stoptha (aschur teirminéil)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "I/A ullamh"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "Teorainn LAP"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "Teorainn chomhad"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "Aláram (fíorúil)"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "Aláram (próifíl)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Fuinneog athraithe"
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr "Glas taifid"
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "Comhartha úsáideora 1"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "Comhartha úsáideora 2"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "sonraí ionchuir HFT ar feitheamh"
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "teip chumhachta ar tí tarlú"
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "cliseadh córais ar tí tarlú"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "bog próiseas go LAP eile"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "earráid ríomhchláraithe"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "mód monatóireachta HFT ceadaithe"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "mód monatóireachta HFT cealaithe"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "seicheamh fuaime HFT críochnaithe"
+
+#: siglist.c:215
+msgid "Information request"
+msgstr "Iarratas faisnéise"
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Comhartha neamhaithnid #"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Comhartha neamhaithnid #%d"
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "Drochionadú: níl \"%s\" dúnta i %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: ní féidir liosta a shannadh go ball eagair."
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "Ní féidir píopa a dhéanamh le haghaidh ionadaíocht próisis."
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "Ní féidir macphróiseas a dhéanamh le haghaidh ionadaíocht próisis."
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "Ní féidir píopa ainmnithe %s a oscailt le haghaidh léamh."
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "Ní féidir píopa ainmnithe %s a oscailt le haghaidh scríofa."
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr ""
+"Ní féidir an píopa ainmnithe %s a dhúbailt mar thuairisceoir comhaid %d."
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "Ní féidir píopa a dhéanamh le haghaidh ionadú ordaithe."
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr "Ní féidir macphróiseas a dhéanamh le haghaidh ionadú ordaithe."
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr ""
+"command_substitute: ní feidir an píopa a dhúbailt mar thuairisceoir comhaid "
+"1."
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: paraiméadar neamhnitheach nó gan socrú."
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: slonn fotheaghráin < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: drochionadú"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: ní féidir sannadh mar seo."
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "drochionadú: níl \"`\" dúnta i %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "gan meaitseáil: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "Bhíothas ag súil le hargóint."
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: ag súil le slonn slánuimhreach."
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "Ag súil le \")\""
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "Ag súil le \")\", ach fuarthas %s."
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: ag súil le hoibreoir aonártha."
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: ag súil le hoibreoir dénártha."
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "\"]\" ar iarraidh"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "Uimhir chomhartha neamhbhailí"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps: drochluach sa liosta_gaistí[%d]: %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+"run_pending_traps: is SIG_DFL an láimhseálaí comharthaí; %d (%s) á "
+"athsheoladh chugam féin."
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: droch-chomhartha %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "Earráid agus sainmhíniú na feidhme \"%s\" á iompórtáil."
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "Tá an leibhéal blaoisce (%d) ró-ard; á athshocrú go 1."
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr "make_local_variable: níl comhthéacs feidhme sa scóip reatha."
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr "all_local_variables: níl comhthéacs feidhme sa scóip reatha"
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: paraiméadar neamhnitheach nó gan socrú."
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "Carachtar neamhbhailí %d sa teaghrán easpórtála le haghaidh %s."
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "Níl \"=\" sa teaghrán easpórtála le haghaidh %s."
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr "pop_var_context: ní comhthéacs feidhme é ceann shell_variables"
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr "pop_var_context: níl comhthéacs global_variables ann"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr "pop_scope: ní scóip shealadach thimpeallachta é ceann shell_variables"
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: ní féidir oscailt: %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d: tuairisceoir comhaid neamhbhailí: %s"
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Cóipcheart © 2009 Free Software Foundation, Inc."
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Ceadúnas GPLv3+: GNU GPL leagan 3 nó níos déanaí <http://gnu.org/licenses/"
+"gpl.html>\n"
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU bash, leagan %s (%s)\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr "Is saorbhogearra é seo; tá cead agat é a athrú agus a dháileadh.\n"
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+"Ní ghabhann baránta ar bith leis, sa mhéid is atá sin ceadaithe de réir "
+"dlí.\n"
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Cóipcheart © 2009 Free Software Foundation, Inc."
+
+#: version2.c:87
+#, fuzzy, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Ceadúnas GPLv3+: GNU GPL leagan 3 nó níos déanaí <http://gnu.org/licenses/"
+"gpl.html>\n"
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: ní féidir %lu beart a leithdháileadh (%lu beart leithdháilte)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: ní féidir %lu beart a leithdháileadh"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+"xmalloc: %s:%d: ní féidir %lu beart a leithdháileadh (%lu beart leithdháilte)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: %s:%d: ní féidir %lu beart a leithdháileadh"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [ainm[=luach] ... ]"
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] ainm [ainm ...]"
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [N]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [N]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [ORDÚ-IONSUITE-BLAOISCE [ARGÓINT ...]]"
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr "caller [SLONN]"
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-L|-P] [comhadlann]"
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr "pwd [-LP]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr "true"
+
+#: builtins.c:72
+msgid "false"
+msgstr "false"
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] ORDÚ [ARGÓINT ...]"
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-aAfFilrtux] [-p] [ainm[=luach] ...]"
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-aAfFilrtux] [-p] ainm[=luach] ..."
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr "local [ROGHA] AINM[=LUACH] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [ARGÓINT ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [ARGÓINT ...]"
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-a] [-dnps] [-f comhadainm] [ainm ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [argóint ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts teaghrán_roghanna ainm [argóint]"
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a ainm] [ordú [argóintí ...]] [atreorú ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [N]"
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr "logout [n]"
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+"fc [-e AINM_E] [-lnr] [CÉAD] [DEIREANACH] nó fc -s [PATRÚN=IONADAÃ] [ORDÚ]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [SONRÚ_JAB]"
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr "bg [SONRÚ_JAB ...]"
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-lr] [-p CONAIR] [-dt] [AINM ...]"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "help [-ds] [PATRÚN ...]"
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [-d SEACH_CHUR] [n] nó history -anrw [COMHADAINM] nó history -"
+"ps ARGÓINT [ARGÓINT...]"
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr "jobs [-lnprs] [SONRÚ_JAB ...] nó jobs -x ORDÚ [ARGÓINTÃ]"
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [-h] [-ar] [SONRÚ_JAB ...]"
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s sonrú_comhartha | -n uimhir_chomhartha | -sonrú_comhartha] "
+"aitheantóir_próisis | sonrú_jab ... nó kill -l [sonrú_comhartha]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let argóint [argóint ...]"
+
+#: builtins.c:136
+#, fuzzy
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+"read [-ers] [-a eagar] [-d teormharcóir] [-i téacs] [-n líon_carachtar] [-p "
+"leid] [-t teorainn_ama] [-u tuairisceoir_comhaid] [ainm ...]"
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o ainm-rogha] [argóint ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [ainm ...]"
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-fn] [ainm[=luach] ...] nó export -p"
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-af] [ainm[=luach] ...] nó readonly -p"
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr "shift [n]"
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr "source comhadainm [argóintí]"
+
+#: builtins.c:152
+msgid ". filename [arguments]"
+msgstr ". comhadainm [argóintí]"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [slonn]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ argóint... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "times"
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [-lp] [[argóint] sonrú_comhartha ...]"
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-afptP] ainm [ainm ...]"
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdefilmnpqrstuvx] [teorainn]"
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-p] [-S] [mód]"
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr "wait [aitheantas]"
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr "wait [aitheantas_próisis]"
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for AINM [in FOCAIL ... ] ; do ORDUITHE; done"
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for (( slonn1; slonn2; slonn3 )); do ORDUITHE; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select AINM [in FOCAIL ... ;] do ORDUITHE; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr "time [-p] píblíne"
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case FOCAL in [PATRÚN [| PATRÚN]...) ORDUITHE ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if ORDUITHE; then ORDUITHE; [ elif ORDUITHE; then ORDUITHE; ]... [ else "
+"ORDUITHE; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while ORDUITHE; do ORDUITHE; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until ORDUITHE; do ORDUITHE; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr "coproc [AINM] ordú [atreoruithe]"
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "function AINM { ORDUITHE ; } nó AINM () { ORDUITHE ; }"
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr "{ ORDUITHE ; }"
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr "sonrú_jab [&]"
+
+#: builtins.c:206
+msgid "(( expression ))"
+msgstr "(( slonn ))"
+
+#: builtins.c:208
+msgid "[[ expression ]]"
+msgstr "[[ slonn ]]"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr "Athróga - ainmneacha agus mínithe ar fathróga áirithe blaoisce"
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [-n] [+N | -N | comhadlann]"
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [-n] [+N | -N]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o] [ainm_rogha ...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr "printf [-v athróg] formáid [argóintí]"
+
+#: builtins.c:229
+#, fuzzy
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+"complete [-abcdefgjksuv] [-pr] [-o rogha] [-A gníomh] [-G patrún] [-W "
+"liosta_focal] [-F feidhm] [-C ordú] [-X patrún_scagaire] [-P réimír] [-S "
+"iarmhír] [ainm ...]"
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+"compgen [-abcdefgjksuv] [-o rogha] [-A gníomh] [-G patrún] [-W "
+"liosta_focal] [-F feidhm] [-C ordú] [-X patrún_scagaire] [-P réimír] [-S "
+"iarmhír] [FOCAL]"
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "compopt [-o|+o rogha] [ainm ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr "a"
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr "t"
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"Sainigh nó taispeáin ailiasanna.\n"
+" \n"
+" Gan argóintí, priontálann \"alias\" an liosta ailiasanna san fhoirm\n"
+" \"alias LUACH=VALUE\" ar an ngnáth-aschur.\n"
+" \n"
+" I ngach cás eile, sainítear ailias do gach AINM a thugtar LUACH dó.\n"
+" Má tá spás chun deiridh LUACH, déantar an chéad fhocal eile a sheiceáil\n"
+" le haghaidh ionadú ailias nuair a fhairsingítear an ailias.\n"
+" \n"
+" Roghanna:\n"
+" -p\tPriontáil gach ailias sainithe i bhfoirm inathúsáidte.\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear an luach true mura thugtar AINM nach bhfuil\n"
+" ailias sainithe dó."
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Bain gach AINM de liosta na n-ailiasanna sainithe.\n"
+" \n"
+" Roghanna:\n"
+" -a\tbain gach sainiú ailias.\n"
+" \n"
+" Aischuirtear rath ach sa chás nach bhfuil AINM ann."
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Scoir de lúba for, while nó until.\n"
+" \n"
+" Scoir de lúb \"for\", \"while\" \"nó \"until\". Má shonraítear N, scoir\n"
+" de N lúb mhórthimpeall.\n"
+" \n"
+" Stádas Scortha:\n"
+" Is é 0 an stádas scortha mura bhfuil N níos lú ná 1."
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Lean ar aghaidh le lúba for, while nó until.\n"
+" \n"
+" Tosaigh an chéad atriall eile den lúb mhórthimpeall \"for\", \"while\" "
+"nó \"until\".\n"
+" Má shonraítear N, tosaigh an Nú lúb mhórthimpeall.\n"
+" \n"
+" Stádas Scortha:\n"
+" Is é 0 an stádas scortha mura bhfuil N níos lú ná 1."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+"Rith orduithe ionsuite na blaoisce.\n"
+" \n"
+" Rith ORDÚ-IONSUITE-BLAOISCE leis na hargóintí ARGÓINTà gan cuardach\n"
+" ordaithe a dhéanamh. Tá sé seo úsáideach más mian leat ordú blaoisce a\n"
+" athshainiú mar fheidhm bhlaoisce agus gur ghá an t-ordú ionsuite a rith\n"
+" laistigh den fheidhm.\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear stádas scortha ORDÚ-IONSUITE-BLAOISCE, nó falsa mura "
+"bhfuil\n"
+" ORDÚ-IONSUITE-BLAOISCE ina ordú ionsuite blaoisce."
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+"Aischuir comhthéacs an ghlaoigh reatha fhoghnáthaimh.\n"
+" \n"
+" Gan SLONN, aischuirtear \"$line $filename\". Le SLONN, aischuirtear\n"
+" \"$line $subroutine $filename\"; is féidir lorg cruaiche a sholáthar "
+"leis an\n"
+" fhaisnéis bhreise seo.\n"
+" \n"
+" Taispeánann an luach atá ag SLONN an méis frámaí glaoigh le dul siar\n"
+" roimh an ceann reatha; fráma 0 an ceann atá ar barr.\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear 0 ach sa chás nach bhfuil an bhlaosc ag rith feidhme "
+"blaoisce, nó\n"
+" sa chás go bhfuil SLONN neamhbhailí."
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+"Priontáil ainm na comhadlainne oibre reatha.\n"
+" \n"
+" Roghanna:\n"
+" -L\tpriontáil luach $PWD má thugann sé ainm na comhadlainne\n"
+" \toibre reatha. -P\tpriontáil an chomhadlann fhisiciúil, gan naisc "
+"shiombalacha\n"
+" \n"
+" Mar réamhshocrú, oibríonn \"pwd\" faoi mar a bheadh \"-L\" sonraithe.\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear luach de 0 mura thugtar rogha neamhbhailí nó mura féidir\n"
+" an chomhadlann reatha a léamh."
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Ordú neamhnitheach.\n"
+" \n"
+" Gan éifeacht; ní dhéanann an t-ordú faic.\n"
+" \n"
+" Stadas Scortha:\n"
+" Éiríonn leis i gcónaí."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Aischuir toradh rathúil.\n"
+" \n"
+" Stádas Scortha:\n"
+" Éiríonn leis i gcónaí."
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+"Aischuir toradh neamhrathúil.\n"
+" \n"
+" Stádas Scortha:\n"
+" Teipeann air i gcónaí."
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+"Rith ordú simplí nó taispeáin eolas maidir le horduithe.\n"
+" \n"
+" Ritheann ORDÚ le hARGÓINTà gan cuardach feidhme blaoisce, nó "
+"taispeánann\n"
+" eolas maidir leis na horduithe sonraithe. Is féidir é seo a úsáid chun "
+"orduithe ar\n"
+" diosca a rith má tá feidhm leis an ainm céanna ann.\n"
+" \n"
+" Roghanna:\n"
+" -p\túsáid luach réamhshocraithe le haghaidh CONAIR a aimseoidh go "
+"cinnte\n"
+" \tgach ceann de na gnáthríomhchláir áirge.\n"
+" -v\ttaispeáin cur síos ar ORDÚ cosúil leis an ordú ionsuite \"type\"\n"
+" -V\ttaispeáin cur síos níos faide de gach ORDÚ\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear an stádas scortha ó ORDÚ, nó teip mura aimsítear ORDÚ."
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+"Socraigh luachanna agus airíonna athróg.\n"
+" \n"
+" Imithe i léig. Feic \"help declare\"."
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+"Sainigh athróga logánta.\n"
+" \n"
+" Cruthaítear athróg logánta darbh ainm AINM, agus cuirtear LUACH leis. "
+"Is\n"
+" féidir le ROGHA a bheith ceann ar bith de na roghanna a ghlacann "
+"\"declare\" leo.\n"
+" \n"
+" Ní féidir athróga logánta a úsáid ach laistigh de fheidhm. Tá siad "
+"infheicthe\n"
+" san fheidhm ina shainítear iad agus a mic amháin.\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear rath mura thugtar rogha neamhbhailí, nó mura tharlaíonn "
+"earráid,\n"
+" nó mura bhfuil an bhlaosc ag rith feidhme."
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Scríobh na hargóintí ar an ngnáthaschur.\n"
+" \n"
+" Taispeáin na hARGÓINTà ar an ngnáthaschur agus líne nua ina ndiadh.\n"
+" \n"
+" Roghanna:\n"
+" -n\tná hiarcheangail líne nua\n"
+" -n\tcumasaigh na héaluithe cúlslaise -E\tdíchumasaigh na "
+"héaluithe cúlslaise \n"
+" Tuigeann \"echo\" na carachtair éalaithe le cúlslais seo a leanas:\n"
+" \\a\tairdeall (clog)\n"
+" \\b\tcúlspás\n"
+" \\c\tcur deireadh le aschur\n"
+" \\e\tcaractar éalaithe\n"
+" \\f\tfotha foirme\n"
+" \\n\tlíne nua\n"
+" \\r\taisfhilleadh carráiste\n"
+" \\t\ttáib chothrománach\n"
+" \\v\ttáib ingearach\n"
+" \\\\\tcúlslais\n"
+" \\0nnn\tan carachtar leis an gcód ASCII NNN (ochtnártha). Is féidir le "
+"NNN\n"
+" \tbheith 0 go 3 digit ochtnártha ar fhad\n"
+" \\xHH\tan carachtar ocht ngiotán leis an luach HH (heicsidheachúlach). "
+"Is\n"
+" \tféidir le HH bheith 1 nó 2 digit heicsidheachúlach ar fhad.\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear rath ach i gcás earráide scríofa."
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Scríobh na hargóintí ar an ngnáthaschur.\n"
+" \n"
+" Taispeáin na hARGÓINTà ar an ngnáthaschur agus líne nua ina ndiaidh.\n"
+" \n"
+" Roghanna:\n"
+" -n\tná hiarcheangail líne nua\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear rath ach i gcás earráide scríofa."
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+"Rith argóintí mar ordú blaoisce.\n"
+" \n"
+" Cuir ARGÓINTà i dteaghrán amháin, úsáid an toradh mar ionchur go dtí\n"
+" an bhlaosc, agus rith na horduithe toraidh.\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear stádas scortha an ordaithe, nó rath más ordú neamhnitheach "
+"é."
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"Scoir den bhlaosc.\n"
+" \n"
+" Scoireann den bhlaosc le stádas N. Má fhágtar N ar lár, is é stádas\n"
+" an chéad ordaithe deireanaigh an stádas scortha."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+"Scoir de bhlaosc logála isteach.\n"
+" \n"
+" Scoireann de bhlaosc logála isteach le stádas scortha N. Aischuirtear\n"
+" earráid má ritear é i mblaosc nach blaosc logála isteach í."
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+"Taispeáin nó rith orduithe ón liosta staire.\n"
+" \n"
+" Úsáidtear fc chun orduithe ón liosta staire a liostú, a chur in eagar, "
+"nó a ath-rith.\n"
+" Más uimhreacha iad CÉAD agus DEIREANACH, sonraíonn siad an raon, nó is\n"
+" féidir le CÉAD bheith ina theaghrán, rud a chiallaíonn an t-ordú is "
+"deireanaí a\n"
+" thosaíonn leis an teaghrán sin.\n"
+" \n"
+" Roghanna:\n"
+" -e AINM_E\troghnaigh an clár eagarthóra atá le húsáid. FCEDIT an "
+"réamhshocrú,\n"
+" \tansin EDITOR, agus ansin vi.\n"
+" -n\tfág uimhreacha na línte ar lár agus liosta á thaispeáint\n"
+" -r\taisiompaigh ord na línte (.i. liostaigh an ceann is nuaí ar dtús)\n"
+" \n"
+" San fhormáid \"fc -s [PATRÚN=IONADAà ...] [ORDÚ]\", ath-ritear ORDÚ\n"
+" tar éis an t-ionadú SEAN=NUA a dhéanamh.\n"
+" \n"
+" Ailias úsáideach is ea r='fc -s', sa chaoi go ritheann \"r cc\" an t-"
+"ordú is deireanaí\n"
+" a thosaíonn le \"cc\", agus ath-ritheann \"r\" an t-ordú is deireanaí.\n"
+" \n"
+" Stádas Scortha:n\\ Aischuirtear rath nó stádas an ordaithe rite; "
+"neamh-nialas má tharlaíonn earráid."
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"Bog jab go dtí an tulra.\n"
+" \n"
+" Cuir an jab a shonraítear le SONRÚ_JAB sa tulra agus é mar an jab "
+"reatha.\n"
+" Mura bhfuil SONRÚ_JAB ann, úsáidtear cibé jab atá reatha de réir na "
+"blaoisce.\n"
+" \n"
+" Stádas Scortha:\n"
+" Stádas an ordaithe curtha sa tulra, nó teip má tharlaíonn earráid."
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Bog jabanna go dtí an cúlra.\n"
+" \n"
+" Cuir an jab a shonraítear le SONRÚ_JAB sa chúlra cosúil le é a thosú le "
+"\"&\".\n"
+" Mura bhfuil SONRÚ_JAB ann, úsáidtear cibé jab atá reatha de réir na "
+"blaoisce.\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear rath ach má tharlaíonn earráid nó mura bhfuil\n"
+" rialú jabanna cumasaithe."
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+"Taispeáin eolas maidir le horduithe ionsuite.\n"
+" \n"
+" Taispeántar achoimrí na n-orduithe ionsuite. Má shonraítear PATRÚN,\n"
+" taispeántar cabhair chuimsitheach faoi gach ordú a mheaitseálann "
+"PATRÚN;\n"
+" i gcásanna eile taispeántar liosta na n-ábhar cabhrach.\n"
+" \n"
+" Roghanna:\n"
+" -d\ttaispeáin cur síos gairid ar gach ábhar\n"
+" -m\ttaispeáin úsáid i bhformáid cosúil leis an lámhleabhar man(1)\n"
+" -s\tná taispeáin ach achoimre gairid úsáide le haghaidh gach ábhair a\n"
+" \tmheatseálann PATRÚN\n"
+" \n"
+" Argóintí:\n"
+" PATRÚN\tpatrún a shonraíonn ábhar cabhrach\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear rath ach sa chás nach n-aimsítear PATRÚN nó go dtugtar\n"
+" rogha neamhbhailí."
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+"Bain jabanna den mblaosc reatha.\n"
+" \n"
+" Baintear gach SONRÚ_JAB den tábla de jabanna gníomhacha. Gan\n"
+" SONRÚ_JAB ar bith úsáidtear an jab atá reatha dar leis an mblaosc.\n"
+" \n"
+" Roghanna:\n"
+" -a\tbain gach jab mura sholáraítear SONRÚ_JAB\n"
+" -h\tmarcáil gach SONRÚ_JAB sa chaoi nach seolfar SIGHUP chuige má\n"
+" \tfhaigheann an bhlaosc féin SIGHUP\n"
+" -r\tná bain ach jabanna atá ag rith\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear rath ach sa chás go dtugtar rogha neamhbhailí\n"
+" nó SONRÚ_JAB neamhbhailí."
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+
+#: builtins.c:966
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+"Fill ó fheidhm bhlaoisce.\n"
+" \n"
+" Filltear ó fheidhm nó ó script léite as comhad leis an luach scortha\n"
+" a shonraítear i N. Má fhágtar N ar lár, is é an stádas scortha ná "
+"stadas\n"
+" an orduithe dheireanaigh a ritheadh laistigh den fheidhm nó script.\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear N, nó teip sa chás nach bhfuil an bhlaosc ag rith feidhme "
+"nó scripte."
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"Luacháil slonn coinníollach.\n"
+" \n"
+" Leasainm é seo ar an ordú blaoisce ionsuite \"test\", ach\n"
+" caithfear \"]\" go díreach a bheith ann mar an argóint\n"
+" dheireanach, le bheith comhoiriúnach leis an \"[\" ag an tús."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Taispeáin amanna próisis.\n"
+" \n"
+" \n"
+"Taispeántar amanna carntha úsáideora agus córais na blaoisce agus a\n"
+" macphróiseas.\n"
+" \n"
+" Stádas Scortha:\n"
+" Éiríonn leis i gcónaí."
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Lúib for uimhriochtúil.\n"
+" \n"
+" Mar an gcéanna le\n"
+" \t(( SLONN1 ))\n"
+" \twhile (( SLONN2 )); do\n"
+" \t\tORDAITHE\n"
+" \t\t(( SLONN3 ))\n"
+" \tdone\n"
+" Is sloinn uimhreachtúla iad SLONN1, SLONN2 agus SLONN3.\n"
+" Má fhágtar slonn ar bith ar lár, oibríonn an lúib mar a bheadh luach de "
+"1 air.\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear stádas an ordaithe dheireanaigh a ritheadh."
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+"Sainigh feidhm bhlaoisce.\n"
+" \n"
+" Cruthaíonn feidhm bhlaoisce darbh ainm AINM. Nuair a úsáidtear mar ordú\n"
+" simplí é, ritheann AINM na hORDUITHE i gcomhthéacs na blaoisce glaoigh.\n"
+" Nuair a ghlaoitear AINM, tugtar na hargóintí don fheidhm mar $0 ... $n, "
+"agus\n"
+" tá ainm na feidhme i $FUNCNAME.\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear rath mura bhfuil AINM inléite amháin."
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Grúpáil orduithe mar aonad.\n"
+" \n"
+" Rith tacar orduithe i ngrúpa. Seo bealach amháin chun tacar iomlán\n"
+" orduithe a atreorú.\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear stádas an ordaithe dheireanaigh a ritheadh."
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Taispeáin na hiomlánaithe atá ar fáil de réir na roghanna.\n"
+" \n"
+" Tá sé seo ceaptha le húsáid i bhfeidmeanna blaoisce a chruthaíonn "
+"iomlánaithe.\n"
+" Má thugtar an argóint roghnach FOCAL, cruthaítear iomlánaithe\n"
+" atá comhoiriúnach le FOCAL.\n"
+" \n"
+" Stádas Scortha:\n"
+" Aischuirtear rath mura thugtar rogha neamhbhailí agus mura tharlaíonn "
+"earráid."
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+"Léigh línte ó chomhad agus cuir in athróg eagair iad.\n"
+" \n"
+" Comhchiallach le \"mapfile\"."
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: ní féidir %lu beart a athleithdháileadh (%lu beart leithdháilte)"
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: ní féidir %lu beart a leithdháileadh"
+
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: %s:%d: ní féidir %lu beart a athleithdháileadh (%lu beart "
+#~ "leithdháilte)"
diff --git a/po/hu.gmo b/po/hu.gmo
new file mode 100644
index 0000000..8421414
--- /dev/null
+++ b/po/hu.gmo
Binary files differ
diff --git a/po/hu.po b/po/hu.po
new file mode 100644
index 0000000..6435e67
--- /dev/null
+++ b/po/hu.po
@@ -0,0 +1,6302 @@
+# Hungarian translation of the GNU bash.
+# Copyright (C) 2002 Free Software Foundation, Inc.
+# Gábor István <stive@mezobereny.hu>, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bash 2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2002-06-14 09:49GMT\n"
+"Last-Translator: Gábor István <stive@mezobereny.hu>\n"
+"Language-Team: Hungarian <translation-team-hu@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 0.9.5\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "hibás tömb a tömbindexben"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr ""
+
+#: arrayfunc.c:480
+#, fuzzy, c-format
+msgid "%s: invalid associative array key"
+msgstr "%c%c: rossz opció"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: nem lehet hozzárendelni nem szám indexet"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: nem lehet létrehozni: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr ""
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr ""
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr ""
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "%c%c: rossz opció"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr ""
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr ""
+
+#: builtins/bind.def:245
+#, fuzzy, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: nem lehet létrehozni: %s"
+
+#: builtins/bind.def:260
+#, fuzzy, c-format
+msgid "`%s': cannot unbind"
+msgstr "%s: parancs nem található"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, fuzzy, c-format
+msgid "`%s': unknown function name"
+msgstr "%s Csak olvasható funkció"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr ""
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr ""
+
+#: builtins/break.def:77 builtins/break.def:117
+#, fuzzy
+msgid "loop count"
+msgstr "logout"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr ""
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr ""
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr ""
+
+#: builtins/common.c:101
+#, fuzzy, c-format
+msgid "line %d: "
+msgstr "foglalat %3d: "
+
+#: builtins/common.c:139 error.c:261
+#, fuzzy, c-format
+msgid "warning: "
+msgstr "írás"
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr ""
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "túl sok argumentum"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, fuzzy, c-format
+msgid "%s: option requires an argument"
+msgstr "az opció paramétert igényel:-"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr ""
+
+#: builtins/common.c:205
+#, fuzzy, c-format
+msgid "%s: not found"
+msgstr "%s: parancs nem található"
+
+#: builtins/common.c:214 shell.c:795
+#, fuzzy, c-format
+msgid "%s: invalid option"
+msgstr "%c%c: rossz opció"
+
+#: builtins/common.c:221
+#, fuzzy, c-format
+msgid "%s: invalid option name"
+msgstr "%c%c: rossz opció"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, fuzzy, c-format
+msgid "`%s': not a valid identifier"
+msgstr "`%s' nem érvényes azonosító"
+
+#: builtins/common.c:238
+#, fuzzy
+msgid "invalid octal number"
+msgstr "rossz jel(signal) szám"
+
+#: builtins/common.c:240
+#, fuzzy
+msgid "invalid hex number"
+msgstr "rossz jel(signal) szám"
+
+#: builtins/common.c:242 expr.c:1256
+#, fuzzy
+msgid "invalid number"
+msgstr "rossz jel(signal) szám"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr ""
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr ""
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s Csak olvasható változó"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr ""
+
+#: builtins/common.c:272 builtins/common.c:274
+#, fuzzy
+msgid "argument"
+msgstr "paraméter szükséges"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr ""
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr ""
+
+#: builtins/common.c:290
+#, fuzzy, c-format
+msgid "%s: no job control"
+msgstr "nincs munkafolyamat ellenõrzés ezen a parancsértelmezõn"
+
+#: builtins/common.c:292
+#, fuzzy
+msgid "no job control"
+msgstr "nincs munkafolyamat ellenõrzés ezen a parancsértelmezõn"
+
+#: builtins/common.c:302
+#, fuzzy, c-format
+msgid "%s: restricted"
+msgstr "%s: munkafolyamat megszakadt"
+
+#: builtins/common.c:304
+#, fuzzy
+msgid "restricted"
+msgstr "Félbeszakítva"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr ""
+
+#: builtins/common.c:321
+#, fuzzy, c-format
+msgid "write error: %s"
+msgstr "Csõ (pipe)hiba %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr ""
+
+#: builtins/common.c:629 builtins/common.c:631
+#, fuzzy, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: Nem egyértelmû átirányítás"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr ""
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr ""
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr ""
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr ""
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr ""
+
+#: builtins/declare.def:122
+#, fuzzy
+msgid "can only be used in a function"
+msgstr "A local-t csak funkción belül lehet használni, létrehozott változó NÉV"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr ""
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s Csak olvasható funkció"
+
+#: builtins/declare.def:468
+#, fuzzy, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "$%s így nem lehet hozzárendelni"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr ""
+
+#: builtins/enable.def:312
+#, fuzzy, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "nem lehet létrehozni a %s \"named pipe\"-ot a %s-nek: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr ""
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr ""
+
+#: builtins/enable.def:474
+#, fuzzy, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: nem lehet létrehozni: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: egy könyvtár"
+
+#: builtins/evalfile.c:139
+#, fuzzy, c-format
+msgid "%s: not a regular file"
+msgstr "%s: nem futtatható bináris fájl"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr ""
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: nem futtatható bináris fájl"
+
+#: builtins/exec.def:212
+#, fuzzy, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: nem lehet létrehozni: %s"
+
+#: builtins/exit.def:65
+#, fuzzy, c-format
+msgid "logout\n"
+msgstr "logout"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr ""
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr ""
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr ""
+
+#: builtins/fc.def:262
+#, fuzzy
+msgid "no command found"
+msgstr "%s: parancs nem található"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr ""
+
+#: builtins/fc.def:370
+#, fuzzy, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: nem lehet létrehozni: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr ""
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr ""
+
+#: builtins/getopt.c:110
+#, fuzzy, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "érvénytelen opció: -"
+
+#: builtins/getopt.c:111
+#, fuzzy, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "az opció paramétert igényel:-"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr ""
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr ""
+
+#: builtins/hash.def:244
+#, fuzzy, c-format
+msgid "hits\tcommand\n"
+msgstr "újra futtathatja az utolsó parancsot."
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] ""
+msgstr[1] ""
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+
+#: builtins/help.def:185
+#, fuzzy, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: nem lehet létrehozni: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr ""
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr ""
+
+#: builtins/history.def:365
+#, fuzzy, c-format
+msgid "%s: history expansion failed"
+msgstr "%s egész szám szükséges"
+
+#: builtins/inlib.def:71
+#, fuzzy, c-format
+msgid "%s: inlib failed"
+msgstr "%s egész szám szükséges"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr ""
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr ""
+
+#: builtins/kill.def:263
+#, fuzzy
+msgid "Unknown error"
+msgstr "Ismeretlen hiba %d"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "várható kifejezés"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s felszabadított változó"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr ""
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr ""
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, fuzzy, c-format
+msgid "%s: invalid line count"
+msgstr "%c%c: rossz opció"
+
+#: builtins/mapfile.def:277
+#, fuzzy, c-format
+msgid "%s: invalid array origin"
+msgstr "%c%c: rossz opció"
+
+#: builtins/mapfile.def:294
+#, fuzzy, c-format
+msgid "%s: invalid callback quantum"
+msgstr "rossz jel(signal) szám"
+
+#: builtins/mapfile.def:326
+#, fuzzy
+msgid "empty array variable name"
+msgstr "%s felszabadított változó"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr ""
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr ""
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr ""
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr ""
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr ""
+
+#: builtins/pushd.def:195
+#, fuzzy
+msgid "no other directory"
+msgstr "könyvtárba."
+
+#: builtins/pushd.def:462
+#, fuzzy
+msgid "<no current directory>"
+msgstr "\tlesz az aktuális munkakönyvtár."
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr ""
+
+#: builtins/pushd.def:508
+#, fuzzy
+msgid "directory stack index"
+msgstr "Rekurziós verem túlcsordult"
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr ""
+
+#: builtins/read.def:588
+#, fuzzy, c-format
+msgid "read error: %d: %s"
+msgstr "Csõ (pipe)hiba %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+
+#: builtins/set.def:768
+#, fuzzy
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "A local-t csak funkción belül lehet használni, létrehozott változó NÉV"
+
+#: builtins/set.def:805
+#, fuzzy, c-format
+msgid "%s: cannot unset"
+msgstr "%s: nem lehet létrehozni: %s"
+
+#: builtins/set.def:812
+#, fuzzy, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: nem lehet létrehozni: %s"
+
+#: builtins/set.def:823
+#, fuzzy, c-format
+msgid "%s: not an array variable"
+msgstr "%s felszabadított változó"
+
+#: builtins/setattr.def:186
+#, fuzzy, c-format
+msgid "%s: not a function"
+msgstr "%s Csak olvasható funkció"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+#, fuzzy
+msgid "shift count"
+msgstr "shift [n]"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr ""
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr ""
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr ""
+
+#: builtins/source.def:153
+#, fuzzy, c-format
+msgid "%s: file not found"
+msgstr "%s: parancs nem található"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr ""
+
+#: builtins/suspend.def:111
+#, fuzzy
+msgid "cannot suspend a login shell"
+msgstr "Kilépés a parancsértelmezõbõl."
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr ""
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr ""
+
+#: builtins/type.def:274
+#, fuzzy, c-format
+msgid "%s is a function\n"
+msgstr "%s Csak olvasható funkció"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr ""
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr ""
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr ""
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr ""
+
+#: builtins/ulimit.def:398
+#, fuzzy, c-format
+msgid "`%c': bad command"
+msgstr "%c%c: rossz opció"
+
+#: builtins/ulimit.def:427
+#, fuzzy, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: nem lehet létrehozni: %s"
+
+#: builtins/ulimit.def:453
+#, fuzzy
+msgid "limit"
+msgstr "CPU határ"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, fuzzy, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: nem lehet létrehozni: %s"
+
+#: builtins/umask.def:118
+#, fuzzy
+msgid "octal number"
+msgstr "rossz jel(signal) szám"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr ""
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr ""
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr ""
+
+#: error.c:165
+#, fuzzy, c-format
+msgid "last command: %s\n"
+msgstr "újra futtathatja az utolsó parancsot."
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr ""
+
+#: error.c:406
+#, fuzzy
+msgid "unknown command error"
+msgstr "Ismeretlen hiba %d"
+
+#: error.c:407
+#, fuzzy
+msgid "bad command type"
+msgstr "parancsként használja."
+
+#: error.c:408
+#, fuzzy
+msgid "bad connector"
+msgstr "rossz csatlakozás `%d'"
+
+#: error.c:409
+#, fuzzy
+msgid "bad jump"
+msgstr "Rossz ugrás %d"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s felszabadított változó"
+
+#: eval.c:181
+#, fuzzy, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "%c túl sokáig nem csinált semmit:automatikus kilépés\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr ""
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr ""
+
+#: execute_cmd.c:2075
+#, fuzzy
+msgid "pipe error"
+msgstr "Csõ (pipe)hiba %s"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: fenntartva: parancs nem tartalmazhat '/' karaktert"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: parancs nem található"
+
+#: execute_cmd.c:4827
+#, fuzzy, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: egy könyvtár"
+
+#: execute_cmd.c:4976
+#, fuzzy, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "nem másolható a fd %d fd 0: %s-re"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "kifejezés túllépte a megengedett rekurzív szintet"
+
+#: expr.c:265
+#, fuzzy
+msgid "recursion stack underflow"
+msgstr "Rekurziós verem túlcsordult"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "szintaktikai hiba a kifelyezésben"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "nem változóhoz próbált hozzárendelni"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "nullával való osztás"
+
+#: expr.c:471
+#, fuzzy
+msgid "bug: bad expassign token"
+msgstr "Hiba:rossz vezérjel %d"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "`:' túllépte a kifelyezés feltételeit"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr ""
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr ""
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "rossz ')'"
+
+#: expr.c:897 expr.c:1176
+#, fuzzy
+msgid "syntax error: operand expected"
+msgstr "szintaktikai hiba: váratlan fájl vég"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr ""
+
+#: expr.c:1202
+#, fuzzy, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s: %s: %s (a hiba jele \"%s\")\n"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr ""
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "az érték túl nagy"
+
+#: expr.c:1329
+#, fuzzy, c-format
+msgid "%s: expression error\n"
+msgstr "%s egész szám szükséges"
+
+#: general.c:61
+#, fuzzy
+msgid "getcwd: cannot access parent directories"
+msgstr "getwd: nem elérhetõ a szülõ könyvtár"
+
+#: input.c:94 subst.c:4857
+#, fuzzy, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "nem másolható a fd %d fd 0: %s-re"
+
+#: input.c:258
+#, fuzzy, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+"nem lehet lefoglalni az új fájlleírót a bash bemenetére a fd %d: %s-r?l"
+
+#: input.c:266
+#, fuzzy, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "check_bash_input: puffer már létezik az új fd %d"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr ""
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr ""
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr ""
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr ""
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr ""
+
+#: jobs.c:1401
+#, fuzzy, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: Nem létezõ pid (%d)!\n"
+
+#: jobs.c:1416
+#, fuzzy, c-format
+msgid "Signal %d"
+msgstr "Ismeretlen #%d Szignál"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Kész"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Megállítva"
+
+#: jobs.c:1439
+#, fuzzy, c-format
+msgid "Stopped(%s)"
+msgstr "Megállítva"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "Futó"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Kész (%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "Kilépés %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Ismeretlen állapot"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(memória kiírás)"
+
+#: jobs.c:1568
+#, fuzzy, c-format
+msgid " (wd: %s)"
+msgstr "(wd most: %s)\n"
+
+#: jobs.c:1776
+#, fuzzy, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "gyermek-folyamat setpgid (%d -ról %d-ra) hiba %d: %s\n"
+
+#: jobs.c:2104 nojobs.c:585
+#, fuzzy, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "várjon:a %d nem utóda ennek a parancsértelmezõnek"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr ""
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr ""
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: munkafolyamat megszakadt"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr ""
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, fuzzy, c-format
+msgid "%s: line %d: "
+msgstr "foglalat %3d: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr "(memória kiírás)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(wd most: %s)\n"
+
+#: jobs.c:3579
+#, fuzzy
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_jobs: getpgrp sikertelen: %s"
+
+#: jobs.c:3639
+#, fuzzy
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_jobs: sor fegyelem %s"
+
+#: jobs.c:3649
+#, fuzzy
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_jobs: getpgrp sikertelen: %s"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr ""
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "nincs munkafolyamat ellenõrzés ezen a parancsértelmezõn"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:313
+#, fuzzy
+msgid "unknown"
+msgstr "<ismeretlen>"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr ""
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr ""
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr ""
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr ""
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr ""
+
+#: lib/sh/netopen.c:168
+#, fuzzy, c-format
+msgid "%s: host unknown"
+msgstr "ismeretlen"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr ""
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr ""
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr ""
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xmalloc: nem lehet lefoglalni %lu bájtot (%lu bájt lefoglalva)"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xmalloc: nem lehet lefoglalni %lu bájtot (%lu bájt lefoglalva)"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Önnek levele van $_ -ben"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Önnek új levele érkezett a $_ -ra"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "A %s levelet már elolvasta\n"
+
+#: make_cmd.c:323
+#, fuzzy
+msgid "syntax error: arithmetic expression required"
+msgstr "szintaktikai hiba a kifelyezésben"
+
+#: make_cmd.c:325
+#, fuzzy
+msgid "syntax error: `;' unexpected"
+msgstr "szintaktikai hiba: váratlan fájl vég"
+
+#: make_cmd.c:326
+#, fuzzy, c-format
+msgid "syntax error: `((%s))'"
+msgstr "szintaktikai hiba"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: rossz utasítás típus %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr ""
+
+#: parse.y:3133 parse.y:3369
+#, fuzzy, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "váratlan EOF amíg vizsgáltam a `%c'-t"
+
+#: parse.y:3951
+#, fuzzy
+msgid "unexpected EOF while looking for `]]'"
+msgstr "váratlan EOF amíg vizsgáltam a `%c'-t"
+
+#: parse.y:3956
+#, fuzzy, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "szintaktikai hiba a váratlan %s vezérjel körül"
+
+#: parse.y:3960
+#, fuzzy
+msgid "syntax error in conditional expression"
+msgstr "szintaktikai hiba a kifelyezésben"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr ""
+
+#: parse.y:4042
+#, fuzzy
+msgid "expected `)'"
+msgstr "')' szükséges"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr ""
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr ""
+
+#: parse.y:4120
+#, fuzzy, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "%s:bináris mûvelet szükséges"
+
+#: parse.y:4124
+#, fuzzy
+msgid "conditional binary operator expected"
+msgstr "%s:bináris mûvelet szükséges"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr ""
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr ""
+
+#: parse.y:4161
+#, fuzzy, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "`:' túllépte a kifelyezés feltételeit"
+
+#: parse.y:4164
+#, fuzzy, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "`:' túllépte a kifelyezés feltételeit"
+
+#: parse.y:4168
+#, fuzzy, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "`:' túllépte a kifelyezés feltételeit"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "szintaktikai hiba a váratlan %s vezérjel körül"
+
+#: parse.y:5477
+#, fuzzy, c-format
+msgid "syntax error near `%s'"
+msgstr "szintaktikai hiba a váratlan %s vezérjel körül"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "szintaktikai hiba: váratlan fájl vég"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "szintaktikai hiba"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Használja \"%s\" a parancsértelmezõ elhagyásához.\n"
+
+#: parse.y:5711
+#, fuzzy
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "váratlan EOF amíg vizsgáltam a `%c'-t"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr ""
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr ""
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: rossz csatlakozás `%d'"
+
+#: print_cmd.c:363
+#, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr ""
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr ""
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr ""
+
+#: redir.c:166
+#, fuzzy, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: Nem egyértelmû átirányítás"
+
+#: redir.c:170
+#, fuzzy, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: Nem lehet megsemmisíteni létezõ fájlt‘"
+
+#: redir.c:175
+#, fuzzy, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: fenntartva: parancs nem tartalmazhat '/' karaktert"
+
+#: redir.c:180
+#, fuzzy, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "nem lehet létrehozni a pipe-ot feladat behelyettesítéshez: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: nem lehet a listához rendelni az elemet"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr ""
+
+#: redir.c:1101
+#, fuzzy
+msgid "redirection error: cannot duplicate fd"
+msgstr "átirányítási hiba"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr ""
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr ""
+
+#: shell.c:884
+#, fuzzy, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: rossz opció"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Nincs nevem!"
+
+#: shell.c:1793
+#, fuzzy, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU %s, verzió %s\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Használat:\t%s [GNU hosszú opció] [opció] ...\n"
+"\t%s [GNU hosszú opció] [opció] parancs fájl ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "GNU hosszú opciók:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Parancsértelmezõ opciók:\n"
+
+#: shell.c:1801
+#, fuzzy
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD vagy -c parancs\t\t(csak végrehajtható)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s vagy -o opciók\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"Írja be a `%s -c \"help set\"' ha több információra van szüksége a "
+"parancsértelmezõ opcióival kapcsolatban.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"Írja be a `%s -c \"help set\"' ha több információra van szüksége a "
+"parancsértelmezõ beépített utasításaival kapcsolatban.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr ""
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr ""
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Hamis jel"
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Bontás"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Megszakítás"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "Kilépés"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Érvénytelen utasítás"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "BPT nyomkövetés/csapda"
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "Utasítás MEGSZAKÍTÁSA"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "EMT utasítás"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Lebegõ pontos esemény"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "Kilõve"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "Busz hiba"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Szegmens hiba"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Rossz rendszerhívás"
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "Törött csõ (pipe)"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Emlékeztetés"
+
+#: siglist.c:111
+#, fuzzy
+msgid "Terminated"
+msgstr "ki."
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "Sürgõs IO feltétel"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Megállítva (jellel)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "Folytatás"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "Gyermek objektum meghalt vagy megállt"
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Megállítva (tty bemenet)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Megállítva (tty kimenet)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "I/O kész"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "CPU határ"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "Fájl határ"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "Emlékeztetés (virtuális)"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "Emlékeztetés (profil)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Ablak megváltozott"
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr "Felvétel zárolva"
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "Felhasználói jel 1"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "Felhasználói jel 2"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "HFT bemeneti adat függõben"
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "áram kimaradás várható"
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "rendszer sérülés várható"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "feladat átadása másik CPU-nak"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "programozási hiba"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "HFT felügyelõ mód engedélyezve"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "HFT felügyelõ mód visszavonva"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "HFT hangsorozat behelyezve"
+
+#: siglist.c:215
+msgid "Information request"
+msgstr ""
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Ismeretlen # Szignál"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Ismeretlen #%d Szignál"
+
+#: subst.c:1333 subst.c:1454
+#, fuzzy, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "rossz behelyettesítés: ne a %s be a %s-t"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: nem lehet a listához rendelni az elemet"
+
+#: subst.c:4754 subst.c:4770
+#, fuzzy
+msgid "cannot make pipe for process substitution"
+msgstr "nem lehet létrehozni a pipe-ot feladat behelyettesítéshez: %s"
+
+#: subst.c:4802
+#, fuzzy
+msgid "cannot make child for process substitution"
+msgstr ""
+"nem lehet létrehozni a gyermekfolyamatott feladat behelyettesítéshez: %s"
+
+#: subst.c:4847
+#, fuzzy, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "nem lehet létrehozni a %s \"named pipe\"-ot a %s-nek: %s"
+
+#: subst.c:4849
+#, fuzzy, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "nem lehet létrehozni a %s \"named pipe\"-ot a %s-nek: %s"
+
+#: subst.c:4867
+#, fuzzy, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "nem lehet másolni a %s \"named pipe\"-ot mint fd %d :%s"
+
+#: subst.c:5063
+#, fuzzy
+msgid "cannot make pipe for command substitution"
+msgstr "nem lehet létrehozni a \"pipe\"-ot parancs behelyettesítéséhez: %s"
+
+#: subst.c:5097
+#, fuzzy
+msgid "cannot make child for command substitution"
+msgstr ""
+"nem lehet létrehozni a gyermekfolyamatot a parancs behelyettesítéséhez: %s"
+
+#: subst.c:5114
+#, fuzzy
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "command_substitute: nem lehet másolni a \"pipe\"-ot mint fd 1: %s"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s paraméter semmis vagy nincs beállítva"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s szövegrész kifejezés < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s rossz behelyettesítés"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s így nem lehet hozzárendelni"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, fuzzy, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "rossz behelyettesítés: ne a %s be a %s-t"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr ""
+
+#: test.c:146
+msgid "argument expected"
+msgstr "paraméter szükséges"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s egész szám szükséges"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "')' szükséges"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "')' szükséges, %s-t találtam"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s unáris mûvelet szükséges"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s:bináris mûvelet szükséges"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "hiányzó ']'"
+
+#: trap.c:203
+#, fuzzy
+msgid "invalid signal number"
+msgstr "rossz jel(signal) szám"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr ""
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+
+#: trap.c:380
+#, fuzzy, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: Rossz jel(signal) %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "hiba a %s funkció definíció importálásakor"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr ""
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr ""
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr ""
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s paraméter semmis vagy nincs beállítva"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr ""
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr ""
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr ""
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: nem lehet létrehozni: %s"
+
+#: variables.c:4683
+#, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr ""
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr ""
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: version.c:86 version2.c:83
+#, fuzzy, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU %s, verzió %s\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+
+#: version2.c:86
+#, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr ""
+
+#: version2.c:87
+#, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: nem lehet újra lefoglalni %lu bájtot (%lu bájt lefoglalva)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: nem lehet újra lefoglalni %lu bájtot (%lu bájt lefoglalva)"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: nem lehet újra lefoglalni %lu bájtot (%lu bájt lefoglalva)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: nem lehet újra lefoglalni %lu bájtot (%lu bájt lefoglalva)"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [név[=érték] ... ]"
+
+#: builtins.c:47
+#, fuzzy
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] [név ...]"
+
+#: builtins.c:51
+#, fuzzy
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+"bind [-lpvsPVS] [-m keymap] [-f fájlnév] [-q név] [-r bill.kód] [bill.kód:"
+"readline-funkció]"
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [n]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [n]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [shell-builtin [arg ...]]"
+
+#: builtins.c:61
+#, fuzzy
+msgid "caller [expr]"
+msgstr "test [kifelyezés]"
+
+#: builtins.c:64
+#, fuzzy
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-PL] [könyvtár]"
+
+#: builtins.c:66
+#, fuzzy
+msgid "pwd [-LP]"
+msgstr "pwd [-PL]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr ""
+
+#: builtins.c:72
+msgid "false"
+msgstr ""
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] parancs [arg ...]"
+
+#: builtins.c:76
+#, fuzzy
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-afFrxi] [-p] név[=érték] ..."
+
+#: builtins.c:78
+#, fuzzy
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-afFrxi] [-p] név[=érték] ..."
+
+#: builtins.c:80
+#, fuzzy
+msgid "local [option] name[=value] ..."
+msgstr "local name[=érték] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [arg ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [arg ...]"
+
+#: builtins.c:90
+#, fuzzy
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-pnds] [-a] [-f fájlnév] [név ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [arg ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts optstring név [arg]"
+
+#: builtins.c:96
+#, fuzzy
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a név] fájl [átirányítás ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [n]"
+
+#: builtins.c:100
+#, fuzzy
+msgid "logout [n]"
+msgstr "logout"
+
+#: builtins.c:103
+#, fuzzy
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr "fc [-e ename] [-nlr] [elsõ] [utolsó] vagy fc -s [pat=rep] [cmd]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [munka_folyamat]"
+
+#: builtins.c:111
+#, fuzzy
+msgid "bg [job_spec ...]"
+msgstr "bg [munka_folyamat]"
+
+#: builtins.c:114
+#, fuzzy
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-r] [-p útvonal] [név ...]"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "help [minta ...]"
+
+#: builtins.c:121
+#, fuzzy
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [n] vagy history -awrn [fájlnév] vagy history -ps arg [arg...]"
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr "jobs [-lnprs] [munkafolyamat ...] vagy jobs -x parancs [args]"
+
+#: builtins.c:129
+#, fuzzy
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [munka folyamat ...]"
+
+#: builtins.c:132
+#, fuzzy
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s jeltípus(sigspec) | -n jel(signum) | -jeltípus(sigspec)] [pid | "
+"job]... vagy kill -l [jeltípus(sigspec)]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let arg [arg ...]"
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+#, fuzzy
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o opció] [arg ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [név ...]"
+
+#: builtins.c:144
+#, fuzzy
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-nf] [név ...] vagy export -p"
+
+#: builtins.c:146
+#, fuzzy
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-anf] [név ...] vagy readonly -p"
+
+#: builtins.c:148
+#, fuzzy
+msgid "shift [n]"
+msgstr "exit [n]"
+
+#: builtins.c:150
+#, fuzzy
+msgid "source filename [arguments]"
+msgstr "forrás fájlneve"
+
+#: builtins.c:152
+#, fuzzy
+msgid ". filename [arguments]"
+msgstr "fájlnév"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [kifelyezés]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ arg... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "times"
+
+#: builtins.c:164
+#, fuzzy
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [arg] [signal_spec] vagy trap -l"
+
+#: builtins.c:166
+#, fuzzy
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-apt] név [név ...]"
+
+#: builtins.c:169
+#, fuzzy
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdfmstpnuv] [határ]"
+
+#: builtins.c:172
+#, fuzzy
+msgid "umask [-p] [-S] [mode]"
+msgstr "mask [-S] [mód]"
+
+#: builtins.c:175
+#, fuzzy
+msgid "wait [id]"
+msgstr "wait [n]"
+
+#: builtins.c:179
+#, fuzzy
+msgid "wait [pid]"
+msgstr "wait [n]"
+
+#: builtins.c:182
+#, fuzzy
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for NÉV [in SZAVAK ... ;] do PARANCSOK; done"
+
+#: builtins.c:184
+#, fuzzy
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for NÉV [in SZAVAK ... ;] do PARANCSOK; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select NÉV [in SZAVAK ... ;] do PARANCSOK; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr ""
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case SZÓ in [MINTA [| MINTA]...) PARANCSOK ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if PARANCSOK; then PARANCSOK; [ elif PARANCSOK; then PARANCSOK; ]... [ else "
+"PARANCSOK; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while PARANCSOK; do PARANCSOK; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until PARANCSOK; do PARANCSOK; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr ""
+
+#: builtins.c:200
+#, fuzzy
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "function NÉV { PARANCSOK ; } vagy NÉV () { PARANCSOK ; }"
+
+#: builtins.c:202
+#, fuzzy
+msgid "{ COMMANDS ; }"
+msgstr "{ PARANCSOK }"
+
+#: builtins.c:204
+#, fuzzy
+msgid "job_spec [&]"
+msgstr "fg [munka_folyamat]"
+
+#: builtins.c:206
+#, fuzzy
+msgid "(( expression ))"
+msgstr "várható kifejezés"
+
+#: builtins.c:208
+#, fuzzy
+msgid "[[ expression ]]"
+msgstr "várható kifejezés"
+
+#: builtins.c:210
+#, fuzzy
+msgid "variables - Names and meanings of some shell variables"
+msgstr ""
+"A parancsértelmezõ változói felhasználhatók operandusként. A változó neve"
+
+#: builtins.c:213
+#, fuzzy
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [könyvtár | +N | -N] [-n]"
+
+#: builtins.c:217
+#, fuzzy
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [+N | -N] [-n]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+#, fuzzy
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o hosszú opciók] optnév [optnév...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr ""
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "type [-apt] név [név ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+
+#: builtins.c:276
+#, fuzzy
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr "NÉV eltávolítása a meghatározott aliasok listájából. A -a opció"
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:326
+#, fuzzy
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Folytatja a következõ egy szinttel magasabban elhelyezkedõ FOR, WHILE vagy "
+"UNTIL hurokkal."
+
+#: builtins.c:338
+#, fuzzy
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Folytatja a következõ egy szinttel magasabban elhelyezkedõ FOR, WHILE vagy "
+"UNTIL hurokkal."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+
+#: builtins.c:428
+#, fuzzy
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr "Nem csinál semmit ez a parancs. A visszatérési értéke 0."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+#: builtins.c:689
+#, fuzzy
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr "Kilép a parancsértelmezõbõl N státusszal. Ha az N-t kihagyja akkor a "
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+
+#: builtins.c:738
+#, fuzzy
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"A munka_folyamat-ot az elõtérbe helyezi és jelenlegi folyamatot csinál "
+"belõle."
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+
+#: builtins.c:966
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+
+#: builtins.c:1299
+#, fuzzy
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"egy ']' szövegkonstansnak kell lennie, hogy párban legyen a nyitó '['-val."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+
+#: builtins.c:1551
+#, fuzzy
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr "Feltételesen futtatja a PARANCSOT ha a SZÓ megegyezik a MINTÁVAL. A"
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1580
+#, fuzzy
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr "Kibontja és végrehajtja a PARANCSOT amíg az utolsó parancs a "
+
+#: builtins.c:1592
+#, fuzzy
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr "Kibontja és végrehajtja a PARANCSOT amíg az utolsó parancs a "
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+
+#: builtins.c:1632
+#, fuzzy
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr "Parancsok halmazát futtatja egy csoportban. Ez az egyik módja az"
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xmalloc: nem lehet lefoglalni %lu bájtot (%lu bájt lefoglalva)"
+
+#, fuzzy
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xmalloc: nem lehet lefoglalni %lu bájtot (%lu bájt lefoglalva)"
+
+#, fuzzy
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xmalloc: nem lehet lefoglalni %lu bájtot (%lu bájt lefoglalva)"
+
+#~ msgid "Display the list of currently remembered directories. Directories"
+#~ msgstr "Megjeleníti a jelenleg feljegyzett könyvtárakat. Könyvtárak"
+
+#~ msgid "find their way onto the list with the `pushd' command; you can get"
+#~ msgstr "listába való behelyezés a 'pushd' parancs végzi és az eltávolítást"
+
+#~ msgid "back up through the list with the `popd' command."
+#~ msgstr "pedig a 'popd' utasítással lehet végrehajtani."
+
+#~ msgid ""
+#~ "The -l flag specifies that `dirs' should not print shorthand versions"
+#~ msgstr "A '-l' opció hatására a 'dirs' nem használja a gyorsírás módot"
+
+#~ msgid ""
+#~ "of directories which are relative to your home directory. This means"
+#~ msgstr "a saját könyvtárból nyíló mappákra. Ez azt jelenti, hogy"
+
+#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag"
+#~ msgstr ""
+#~ "a '~/bin' helyet '/home/bfox/bin' fog megjelenni. A '-v' azt hatására"
+
+#~ msgid "causes `dirs' to print the directory stack with one entry per line,"
+#~ msgstr "a 'dirs' a verem elemeit külön sorba írja ki"
+
+#~ msgid ""
+#~ "prepending the directory name with its position in the stack. The -p"
+#~ msgstr "és a könyvtár neve elé írja a veremben elfoglalt helyét is. A '-p'"
+
+#~ msgid "flag does the same thing, but the stack position is not prepended."
+#~ msgstr "ugyanezt csinálja csak nem írja ki az elfoglalt helyet."
+
+#~ msgid ""
+#~ "The -c flag clears the directory stack by deleting all of the elements."
+#~ msgstr "A '-c'-vel az egész könyvtár vermet kitörli."
+
+#, fuzzy
+#~ msgid ""
+#~ "+N displays the Nth entry counting from the left of the list shown by"
+#~ msgstr "+N\tMegmutatja a verem N-edik bejegyzését a számolást balról kezdi"
+
+#, fuzzy
+#~ msgid " dirs when invoked without options, starting with zero."
+#~ msgstr "\taz elsõ eleme a nulladik."
+
+#, fuzzy
+#~ msgid ""
+#~ "-N displays the Nth entry counting from the right of the list shown by"
+#~ msgstr "-N\tMegmutatja a verem N-edik bejegyzését a számolást jobbról kezdi"
+
+#~ msgid "Adds a directory to the top of the directory stack, or rotates"
+#~ msgstr "Egy új könyvtárat ad a könyvtár veremhez, vagy eltolja"
+
+#~ msgid "the stack, making the new top of the stack the current working"
+#~ msgstr "a vermet, létrehozza a verem elejét az aktuális munka "
+
+#~ msgid "directory. With no arguments, exchanges the top two directories."
+#~ msgstr "könyvtárban. Opciók nélkül felcseréli az elsõ két könyvtárat."
+
+#, fuzzy
+#~ msgid "+N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "+N\t\tEltolja a verem N-edik könyvtárát (a számolást"
+
+#, fuzzy
+#~ msgid " from the left of the list shown by `dirs', starting with"
+#~ msgstr "\t\tbalról kezdi a 'dirs' listájában) legelõre."
+
+#, fuzzy
+#~ msgid " zero) is at the top."
+#~ msgstr "\tjobbról kezdi) legelõre."
+
+#, fuzzy
+#~ msgid "-N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "-N\t\tEltolja a verem N-edik könyvtárát (a számolást"
+
+#, fuzzy
+#~ msgid " from the right of the list shown by `dirs', starting with"
+#~ msgstr "\t\tbalról kezdi a 'dirs' listájában) legelõre."
+
+#, fuzzy
+#~ msgid "-n suppress the normal change of directory when adding directories"
+#~ msgstr ""
+#~ "-n\tletiltja a normális könyvtár váltást. Amikor a könyvtárakat váltunk"
+
+#, fuzzy
+#~ msgid " to the stack, so only the stack is manipulated."
+#~ msgstr "\takkor a veremhez adjuk az aktuális könyvtárat."
+
+#, fuzzy
+#~ msgid "dir adds DIR to the directory stack at the top, making it the"
+#~ msgstr "dir\tA DIR-t behelyezi a verem elejére és az"
+
+#, fuzzy
+#~ msgid " new current working directory."
+#~ msgstr "\tlesz az aktuális munkakönyvtár."
+
+#~ msgid "You can see the directory stack with the `dirs' command."
+#~ msgstr "A könyvtár vermet a 'dirs' paranccsal tekintheti meg."
+
+#~ msgid "Removes entries from the directory stack. With no arguments,"
+#~ msgstr "Bejegyzést távolít el a könyvtár verembõl. Opciók nélkül"
+
+#~ msgid "removes the top directory from the stack, and cd's to the new"
+#~ msgstr "eltávolítja a verem elsõ bejegyzését, és átlép a soron következõ"
+
+#~ msgid "top directory."
+#~ msgstr "könyvtárba."
+
+#, fuzzy
+#~ msgid "+N removes the Nth entry counting from the left of the list"
+#~ msgstr "+N\tEltávolítja a verem N-edik bejegyzését (a számolást"
+
+#, fuzzy
+#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'"
+#~ msgstr "\tbalról kezdi és nullával indítja) .Például a 'popd +0'"
+
+#, fuzzy
+#~ msgid " removes the first directory, `popd +1' the second."
+#~ msgstr "\taz elsõ könyvtárat távolítja el, a 'pop +1' a másodikat."
+
+#, fuzzy
+#~ msgid "-N removes the Nth entry counting from the right of the list"
+#~ msgstr "+N\tEltávolítja a verem N-edik bejegyzését (a számolást"
+
+#, fuzzy
+#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'"
+#~ msgstr "\tbalról kezdi és nullával indítja) .Például a 'popd -0'"
+
+#, fuzzy
+#~ msgid " removes the last directory, `popd -1' the next to last."
+#~ msgstr "\taz utolsó könyvtárat távolítja el, a 'pop +1' a .utolsóelõttit"
+
+#, fuzzy
+#~ msgid ""
+#~ "-n suppress the normal change of directory when removing directories"
+#~ msgstr ""
+#~ "-n\tletiltja a normális könyvtár váltást. Amikor a könyvtárakat váltunk"
+
+#, fuzzy
+#~ msgid " from the stack, so only the stack is manipulated."
+#~ msgstr "\takkor a verembõl eltávolítja az aktuális könyvtárat."
+
+#, fuzzy
+#~ msgid ""
+#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n"
+#~ " break N levels."
+#~ msgstr "Kilép egy FOR, WHILE vagy UNTIL hurokból. Ha N meg van határozva,"
+
+#~ msgid "Obsolete. See `declare'."
+#~ msgstr "Elavult. Lásd 'declare'"
+
+#~ msgid ""
+#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed."
+#~ msgstr ""
+#~ "Kimenet az ARG. Ha -n használja, akkor a sorvégi újsor jelet nem veszi "
+#~ "figyelembe."
+
+#~ msgid ""
+#~ "Read ARGs as input to the shell and execute the resulting command(s)."
+#~ msgstr ""
+#~ "Beolvassa az ARG tartalmát a bemenetrõl a parancsértelmezõhõz és "
+#~ "elindítja."
+
+#~ msgid "Logout of a login shell."
+#~ msgstr "Kilépés a parancsértelmezõbõl."
+
+#, fuzzy
+#~ msgid ""
+#~ "Causes a function to exit with the return value specified by N. If N\n"
+#~ " is omitted, the return status is that of the last command."
+#~ msgstr ""
+#~ "A funkció hatására kilép és a visszatérési értéke az N-ben meghatározott "
+#~ "érték lesz."
+
+#, fuzzy
+#~ msgid ""
+#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is\n"
+#~ " not given, it is assumed to be 1."
+#~ msgstr "A pozicionáló paramétereket átnevezi $N+1-rõl $1-re.Ha az N"
+
+#, fuzzy
+#~ msgid ""
+#~ "Print the accumulated user and system times for processes run from\n"
+#~ " the shell."
+#~ msgstr "Kiírja felhasználó és a rendszer mennyi idõ használt fel arra, hogy"
+
+#~ msgid "Missing `}'"
+#~ msgstr "Hiányzó '}'"
+
+#~ msgid "brace_expand> "
+#~ msgstr "brace_expand> "
+
+#~ msgid "Attempt to free unknown command type `%d'.\n"
+#~ msgstr "Megpróbálom felszabadítani az ismeretlen `%d' parancs típust.\n"
+
+#~ msgid "Report this to %s\n"
+#~ msgstr "Kérem jelentse ezt a %s -re \n"
+
+#~ msgid "Stopping myself..."
+#~ msgstr "Leállítom magam..."
+
+#~ msgid "Tell %s to fix this someday.\n"
+#~ msgstr "Mondja el %s -nek, hogy kijavíthassa\n"
+
+#~ msgid "execute_command: bad command type `%d'"
+#~ msgstr "execute_command: rossz parancs típus `%d'"
+
+#~ msgid "real\t"
+#~ msgstr "valós\t"
+
+#~ msgid "user\t"
+#~ msgstr "felhasználói\t"
+
+#~ msgid "sys\t"
+#~ msgstr "rendszer\t"
+
+#~ msgid ""
+#~ "real\t0m0.00s\n"
+#~ "user\t0m0.00s\n"
+#~ "sys\t0m0.00s\n"
+#~ msgstr ""
+#~ "valós\t0m0.00s\n"
+#~ "felhasználói\t0m0.00s\n"
+#~ "rendszer\t0m0.00s\n"
+
+#~ msgid "cannot duplicate fd %d to fd 1: %s"
+#~ msgstr "nem másolható a fd %d fd 1: %s-re"
+
+#~ msgid "%s: output redirection restricted"
+#~ msgstr "%s kimenet átirányítás fenntartva"
+
+#~ msgid "Out of memory!"
+#~ msgstr "Elfogyott a memória!"
+
+#~ msgid "You have already added item `%s'\n"
+#~ msgstr "A `%s' elem egyszer már hozzá lett adva\n"
+
+#~ msgid "You have entered %d (%d) items. The distribution is:\n"
+#~ msgstr "Ön %d (%d) elemet írt be. A terjesztés:\n"
+
+#~ msgid "%s: bg background job?"
+#~ msgstr "%s: bg háttér munkafolyamat?"
+
+#~ msgid ""
+#~ "Redirection instruction from yyparse () '%d' is\n"
+#~ "out of range in make_redirection ()."
+#~ msgstr ""
+#~ "Az átirányítási utasítás a yyparse-ból () '%d' \n"
+#~ "túl van a határon a make_redirection ().-ben"
+
+#~ msgid "clean_simple_command () got a command with type %d."
+#~ msgstr "clean_simple_command () kaptam egy %d típusú parancsot."
+
+#~ msgid "got errno %d while waiting for %d"
+#~ msgstr "kaptam egy %d hibát amíg vártam a %d-re"
+
+#~ msgid "syntax error near unexpected token `%c'"
+#~ msgstr "szintaktikai hiba a váratlan %c vezérjel körül"
+
+#~ msgid "print_command: bad command type `%d'"
+#~ msgstr "print_command: rossz parancs típus `%d'"
+
+#~ msgid "cprintf: bad `%%' argument (%c)"
+#~ msgstr "cprintf: rossz `%%' paraméter (%c)"
+
+#~ msgid "option `%s' requires an argument"
+#~ msgstr "opciók a `%s' paramétert igényel"
+
+#~ msgid "%s: unrecognized option"
+#~ msgstr "a %s ismeretlen opció"
+
+#~ msgid "`-c' requires an argument"
+#~ msgstr "`-c' paramétert igényel"
+
+#~ msgid "%s: cannot execute directories"
+#~ msgstr "%s: könyvtárakat nem lehet futtatni"
+
+#~ msgid "Bad code in sig.c: sigprocmask"
+#~ msgstr "Hibás kód a sig.c-ben: sigprocmask"
+
+#~ msgid "bad substitution: no ending `}' in %s"
+#~ msgstr "rossz behelyettesítés: nincs lezáró } a %s-ben"
+
+#~ msgid "%s: bad array subscript"
+#~ msgstr "%s rossz tömb a tömbindexben"
+
+#~ msgid "can't make pipes for process substitution: %s"
+#~ msgstr "nem lehet létrehozni a pipe-ot feladat behelyettesítéshez: %s"
+
+#~ msgid "reading"
+#~ msgstr "olvasás"
+
+#~ msgid "process substitution"
+#~ msgstr "feladat behelyettesítése"
+
+#~ msgid "command substitution"
+#~ msgstr "parancs behelyettesítése"
+
+#~ msgid "Can't reopen pipe to command substitution (fd %d): %s"
+#~ msgstr ""
+#~ "Nem lehet újra megnyitni a \"pipe\"-ot a parancs behelyettesítéshez(fd %"
+#~ "d): %s"
+
+#~ msgid "$%c: unbound variable"
+#~ msgstr "$%c felszabadított változó"
+
+#~ msgid "%s: bad arithmetic substitution"
+#~ msgstr "%s: rossz számtani helyettesítés"
+
+#~ msgid "-%s: binary operator expected"
+#~ msgstr "-%s:bináris mûvelet szükséges"
+
+#~ msgid "%s[%s: bad subscript"
+#~ msgstr "%s[%s: rossz tömbindex"
+
+#~ msgid "[%s: bad subscript"
+#~ msgstr "[%s: rossz tömbindex"
+
+#~ msgid "digits occur in two different argv-elements.\n"
+#~ msgstr "számjegyek fordultak elõ két különbözõ \"argv\"elemben.\n"
+
+#~ msgid "option %c\n"
+#~ msgstr "opció: %c\n"
+
+#~ msgid "option a\n"
+#~ msgstr "opció a\n"
+
+#~ msgid "option b\n"
+#~ msgstr "opció b\n"
+
+#~ msgid "option c with value `%s'\n"
+#~ msgstr "opció c %s értékkel\n"
+
+#~ msgid "?? sh_getopt returned character code 0%o ??\n"
+#~ msgstr "?? sh_getopt visszakapott karakter kód 0%o ??\n"
+
+#~ msgid "non-option ARGV-elements: "
+#~ msgstr "nem opció az \"argv\"elemek"
+
+#~ msgid "%s: Unknown flag %s.\n"
+#~ msgstr "%s: Ismeretlen jel %s.\n"
+
+#~ msgid "Unknown directive `%s'"
+#~ msgstr "Ismeretlen direktíva %s"
+
+#~ msgid "%s requires an argument"
+#~ msgstr "a %s paramétert igényel"
+
+#~ msgid "%s must be inside of a $BUILTIN block"
+#~ msgstr "%s-nek a $BUILTIN blokkon belül kell hogy legyen"
+
+#~ msgid "%s found before $END"
+#~ msgstr "%s találtam az $END elõtt"
+
+#~ msgid "%s already has a function (%s)"
+#~ msgstr "%s már létezõ függvény (%s)"
+
+#~ msgid "%s already had a docname (%s)"
+#~ msgstr "a %s már kész dokumentum (%s)"
+
+#~ msgid "%s already has short documentation (%s)"
+#~ msgstr "a %s már létezõ rövid dokumentáció (%s)"
+
+#~ msgid "%s already has a %s definition"
+#~ msgstr "a %s már létezõ %s meghatározás(definition)"
+
+#~ msgid "mkbuiltins: Out of virtual memory!\n"
+#~ msgstr "mkbuiltins: A virtuális memória elfogyott!\n"
+
+#~ msgid "read [-r] [-p prompt] [-a array] [-e] [name ...]"
+#~ msgstr "read [-r] [-p kérdés] [-a tömb] [-e] [név ...]"
+
+#~ msgid "%[DIGITS | WORD] [&]"
+#~ msgstr "%[SZÁMOK | SZÓ] [&]"
+
+#~ msgid "variables - Some variable names and meanings"
+#~ msgstr "változók - Néhány változó neve és jelentése"
+
+#~ msgid "`alias' with no arguments or with the -p option prints the list"
+#~ msgstr ""
+#~ "`alias' paraméterek nélkül vagy -p opcióval kiírja az aliasok listáját"
+
+#~ msgid "of aliases in the form alias NAME=VALUE on standard output."
+#~ msgstr "az NÉV=ÉRTÉK formában a standard kimeneten."
+
+#~ msgid "Otherwise, an alias is defined for each NAME whose VALUE is given."
+#~ msgstr ""
+#~ "Egyébként, az alias-ban meghatározott mindegyik NÉV-nek az ÉRTÉK lesz "
+#~ "átadva."
+
+#~ msgid "A trailing space in VALUE causes the next word to be checked for"
+#~ msgstr " "
+
+#~ msgid "alias substitution when the alias is expanded. Alias returns"
+#~ msgstr "Az alias visszatérési értéke "
+
+#~ msgid "true unless a NAME is given for which no alias has been defined."
+#~ msgstr "igaz hacsak a NÉV alatt nincs alias meghatározva."
+
+#~ msgid "then remove all alias definitions."
+#~ msgstr "eltávolítja az összes alias meghatározást."
+
+#~ msgid "Bind a key sequence to a Readline function, or to a macro. The"
+#~ msgstr ""
+#~ "a bind egy kulcs szekvencia a readline funkcióhoz vagy egy makróhoz."
+
+#~ msgid "syntax is equivalent to that found in ~/.inputrc, but must be"
+#~ msgstr "A szintaktika megegyezik az ~/.inputrc-vel, de át kell"
+
+#~ msgid ""
+#~ "passed as a single argument: bind '\"\\C-x\\C-r\": re-read-init-file'."
+#~ msgstr ""
+#~ "adni egy egyszerû paraméterrel: bind '\"\\C-x\\C-r\": re-read-init-file'."
+
+#~ msgid "Arguments we accept:"
+#~ msgstr "A paraméterek amiket elfogadunk:"
+
+#~ msgid ""
+#~ " -m keymap Use `keymap' as the keymap for the duration of this"
+#~ msgstr " -m keymap A `keymap'-ot használja keymap-ként az amíg"
+
+#~ msgid " command. Acceptable keymap names are emacs,"
+#~ msgstr ""
+#~ " a parancs fut. Elfogadható keymap névnek emacs-ok,"
+
+#~ msgid ""
+#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,"
+#~ msgstr ""
+#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,"
+
+#~ msgid " vi-command, and vi-insert."
+#~ msgstr " vi-parancs, és vi-beszúrás."
+
+#~ msgid " -l List names of functions."
+#~ msgstr " -l A funkciók neveinek a listája."
+
+#~ msgid " -P List function names and bindings."
+#~ msgstr " -P A nevek és a hozzájuk tartozó bind-ok listája."
+
+#~ msgid ""
+#~ " -p List functions and bindings in a form that can be"
+#~ msgstr ""
+#~ " -p A funkciók és bind-ok listája bemenetként újra "
+#~ "felszanálható"
+
+#~ msgid " reused as input."
+#~ msgstr " formában."
+
+#~ msgid " -r keyseq Remove the binding for KEYSEQ."
+#~ msgstr " -r keyseq Bind eltávolítása a KEYSEQ-rõl."
+
+#~ msgid " -f filename Read key bindings from FILENAME."
+#~ msgstr " -f FÁJLNÉN Bind-ok olvasása a FÁJLNÉV fájlból."
+
+#~ msgid ""
+#~ " -q function-name Query about which keys invoke the named function."
+#~ msgstr ""
+#~ " -q function-name Lekérdezi, hogy milyen billentyût hív meg a funkció."
+
+#~ msgid " -V List variable names and values"
+#~ msgstr " -V A változók neveinek és értékeinek a listája."
+
+#~ msgid ""
+#~ " -v List variable names and values in a form that can"
+#~ msgstr ""
+#~ " -v A változók és értékeik neveinek a listája "
+#~ "bemenetként "
+
+#~ msgid " be reused as input."
+#~ msgstr " újra felhasználható formában."
+
+#~ msgid ""
+#~ " -S List key sequences that invoke macros and their "
+#~ "values"
+#~ msgstr ""
+#~ " -S A kulcs szekvenciák listája a meghívott makrókkal és "
+#~ "azok értékével"
+
+#~ msgid ""
+#~ " -s List key sequences that invoke macros and their "
+#~ "values in"
+#~ msgstr ""
+#~ " -S A kulcs szekvenciák listája a meghívott makrókkal és "
+#~ "azok értékével"
+
+#~ msgid " a form that can be reused as input."
+#~ msgstr " melyeket fel lehet használni bemenetként."
+
+#~ msgid "break N levels."
+#~ msgstr "akkor N szintet lép ki."
+
+#~ msgid "If N is specified, resume at the N-th enclosing loop."
+#~ msgstr ""
+#~ "Ha N meg van határozva akkor N szinttel magasabb hurokba lép vissza."
+
+#~ msgid "Run a shell builtin. This is useful when you wish to rename a"
+#~ msgstr ""
+#~ "Egy beépített utasítást futtat , Ez akkor hasznos ha átakar nevezni egy"
+
+#~ msgid "shell builtin to be a function, but need the functionality of the"
+#~ msgstr ""
+#~ "egy beépített parancsot funkcióvá, de szüksége van a beépített parancs"
+
+#~ msgid "builtin within the function itself."
+#~ msgstr "eredeti funkciójára."
+
+#~ msgid "Change the current directory to DIR. The variable $HOME is the"
+#~ msgstr "Belép a dir könyvtárba.A $HOME változó az alapértelmezett"
+
+#~ msgid "default DIR. The variable $CDPATH defines the search path for"
+#~ msgstr "DIR. A $CDPATH változó meghatározza a keresési útvonalát a DIR-t"
+
+#~ msgid "the directory containing DIR. Alternative directory names in CDPATH"
+#~ msgstr "tartalmazó könyvtárnak. Az alternatív könyvtár neveket a CDPATH-ban"
+
+#~ msgid "are separated by a colon (:). A null directory name is the same as"
+#~ msgstr "kettõsponttal(:) kell elválasztani. Az üres könyvtár név azonos"
+
+#~ msgid "the current directory, i.e. `.'. If DIR begins with a slash (/),"
+#~ msgstr "a jelenlegi könyvtárral `.'. Ha a DIR per jellel kezdõdik (/),"
+
+#~ msgid "then $CDPATH is not used. If the directory is not found, and the"
+#~ msgstr "akkor a $CDPATH nem használható. Ha a könyvtár nem található és a"
+
+#~ msgid "shell option `cdable_vars' is set, then try the word as a variable"
+#~ msgstr ""
+#~ "a parancsértelmezõ 'cdable_vars' nincs beállítva, akkor a szót "
+#~ "megpróbálja mint "
+
+#~ msgid "name. If that variable has a value, then cd to the value of that"
+#~ msgstr ""
+#~ "változó névként. Ha ennek a változónak van értéke, akkor behelyettesíti a "
+#~ "változó "
+
+#~ msgid ""
+#~ "variable. The -P option says to use the physical directory structure"
+#~ msgstr ""
+#~ "értékét. A -P opció azt jelenti, hogy a fizikai könyvtár felépítést "
+#~ "használja"
+
+#~ msgid ""
+#~ "instead of following symbolic links; the -L option forces symbolic links"
+#~ msgstr ""
+#~ "a szimbolikus linkek helyet, a -L opció pedig a szimbolikus linkek "
+#~ "követését"
+
+#~ msgid "to be followed."
+#~ msgstr "erõlteti ki"
+
+#~ msgid "Print the current working directory. With the -P option, pwd prints"
+#~ msgstr "Kiírja a könyvtárat ahol áll. A -P opcióban a pwd a "
+
+#~ msgid "the physical directory, without any symbolic links; the -L option"
+#~ msgstr ""
+#~ "fizikai könyvtár felépítést mutatja, a szimbolikus linkek nélkül, a -L "
+#~ "opció"
+
+#~ msgid "makes pwd follow symbolic links."
+#~ msgstr "pedig követi a szimbolikus linkeket."
+
+#~ msgid ""
+#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell"
+#~ msgstr ""
+#~ "Egy PARANCS-ot futtat ARG-okkal figyelmen kívül hagyja a parancsértelmezõ"
+
+#~ msgid "function called `ls', and you wish to call the command `ls', you can"
+#~ msgstr ""
+#~ "funkcióit.Ha van egy funkció aminek a neve 'ls', és megakarja hívni, csak "
+#~ "azt"
+
+#~ msgid ""
+#~ "say \"command ls\". If the -p option is given, a default value is used"
+#~ msgstr ""
+#~ "kell mondani, hogy \"command ls\".Ha a -p opciót használja, akkor "
+#~ "felhasználja"
+
+#~ msgid ""
+#~ "for PATH that is guaranteed to find all of the standard utilities. If"
+#~ msgstr "a PATH változót így biztos, hogy meg találja az alap programokat."
+
+#~ msgid ""
+#~ "the -V or -v option is given, a string is printed describing COMMAND."
+#~ msgstr "Ha a -V vagy a -v opciót használja akkor kiírja a COMMAND leírását."
+
+#~ msgid "The -V option produces a more verbose description."
+#~ msgstr "A -V opció több információt ad vissza."
+
+#~ msgid "Declare variables and/or give them attributes. If no NAMEs are"
+#~ msgstr "Változókat hoz létre és/vagy attribútumokat ad nekik. Ha nincs NÉV"
+
+#~ msgid "given, then display the values of variables instead. The -p option"
+#~ msgstr "átadva, akkor a megjeleníti a változók értékeit. A -p opció"
+
+#~ msgid "will display the attributes and values of each NAME."
+#~ msgstr "megjeleníti az attribútumokat és az mindegyik NÉV értékét."
+
+#~ msgid "The flags are:"
+#~ msgstr "A lehetséges opciók:"
+
+#~ msgid " -a\tto make NAMEs arrays (if supported)"
+#~ msgstr " -a\tlétrehozza a NÉV tömböt (ha támogatott)"
+
+#~ msgid " -f\tto select from among function names only"
+#~ msgstr "7 -f\tcsak a funkciókat válassza ki"
+
+#~ msgid " -F\tto display function names without definitions"
+#~ msgstr " -F\tmegjeleníti a funkció neveket a meghatározásuk nélkül"
+
+#~ msgid " -r\tto make NAMEs readonly"
+#~ msgstr " -r\ta NEVEKET csak olvashatóvá teszi"
+
+#~ msgid " -x\tto make NAMEs export"
+#~ msgstr " -x\ta NEVEKET exportálható módon írja ki"
+
+#~ msgid " -i\tto make NAMEs have the `integer' attribute set"
+#~ msgstr " -i\tkiírja a NEVEKET amiknek 'szám' az attribútumuk"
+
+#~ msgid "Variables with the integer attribute have arithmetic evaluation (see"
+#~ msgstr "A változók melyeknek szám az attribútumuk egy számot (lásd a "
+
+#~ msgid "`let') done when the variable is assigned to."
+#~ msgstr "let) kell, hozzárendelni."
+
+#~ msgid "When displaying values of variables, -f displays a function's name"
+#~ msgstr "Amikor megjeleníti a változók értékét a -f a funkciók nevét"
+
+#~ msgid "and definition. The -F option restricts the display to function"
+#~ msgstr "és meghatározásukat mutatja. A -F opció szigorúan csak "
+
+#~ msgid "name only."
+#~ msgstr "a funkciók nevét jeleníti meg."
+
+#~ msgid ""
+#~ "Using `+' instead of `-' turns off the given attribute instead. When"
+#~ msgstr "A '+' használata a '-' helyet az attribútumot törli.Amikor "
+
+#~ msgid "used in a function, makes NAMEs local, as with the `local' command."
+#~ msgstr ""
+#~ "egy funkcióban használja a létrehozott NÉV helyi lesz, mint a local "
+#~ "parancsnál."
+
+#~ msgid "Create a local variable called NAME, and give it VALUE. LOCAL"
+#~ msgstr ""
+#~ "Létrehoz egy helyi változott melyet NÉV-nek hív és átadja neki az ÉRTÉKET."
+
+#~ msgid "have a visible scope restricted to that function and its children."
+#~ msgstr "csak a funkción és gyermekein belül érvényes."
+
+#~ msgid "Output the ARGs. If -n is specified, the trailing newline is"
+#~ msgstr ""
+#~ "Kimenet az ARG. Ha -n használja, akkor a sorvégi újsort jelet nem veszi"
+
+#~ msgid "suppressed. If the -e option is given, interpretation of the"
+#~ msgstr ""
+#~ "figyelembe. Ha a -e opciót használja akkor a következõ 'backslash-escaped'"
+
+#~ msgid "following backslash-escaped characters is turned on:"
+#~ msgstr "karaktereket használja:"
+
+#~ msgid "\t\\a\talert (bell)"
+#~ msgstr "\t\\a\tébresztõ (csengõ)"
+
+#~ msgid "\t\\b\tbackspace"
+#~ msgstr "\t\\b\ttörlés"
+
+#~ msgid "\t\\c\tsuppress trailing newline"
+#~ msgstr "\t\\c\tsorvégi újsor kihagyása"
+
+#~ msgid "\t\\E\tescape character"
+#~ msgstr "\t\\E\tescape karakter"
+
+#~ msgid "\t\\f\tform feed"
+#~ msgstr "\t\\f\tlap dobás"
+
+#~ msgid "\t\\n\tnew line"
+#~ msgstr "\t\\n\túj sor"
+
+#~ msgid "\t\\r\tcarriage return"
+#~ msgstr "\t\\r\tkocsi vissza"
+
+#~ msgid "\t\\t\thorizontal tab"
+#~ msgstr "\t\\t\tvízszintes tab"
+
+#~ msgid "\t\\v\tvertical tab"
+#~ msgstr "\t\\v\tfüggõleges tab"
+
+#~ msgid "\t\\\\\tbackslash"
+#~ msgstr "\t\\\\\tbackslash"
+
+#~ msgid "\t\\num\tthe character whose ASCII code is NUM (octal)."
+#~ msgstr "\t\\num\ta NUM a karakter ASCII kódja (nyolcas számrendszerben)"
+
+#~ msgid ""
+#~ "You can explicitly turn off the interpretation of the above characters"
+#~ msgstr "A -E opcióval ki lehet kapcsolni a karakterek fenti"
+
+#~ msgid "with the -E option."
+#~ msgstr "értelmezését."
+
+#~ msgid "Enable and disable builtin shell commands. This allows"
+#~ msgstr ""
+#~ "Engedélyezés és Letiltja parancsértelmezõ beépített utasításait. Ez azt "
+#~ "jelenti,"
+
+#~ msgid "you to use a disk command which has the same name as a shell"
+#~ msgstr ""
+#~ "hogy lehet használni a lemezen található parancsokat melyeknek a neve meg-"
+
+#~ msgid "builtin. If -n is used, the NAMEs become disabled; otherwise"
+#~ msgstr ""
+#~ "egyezik a beépítettével. Ha a -n használja, akkor a NÉV le lesz tiltva "
+#~ "egyébként"
+
+#~ msgid "NAMEs are enabled. For example, to use the `test' found on your"
+#~ msgstr ""
+#~ "a NEVET engedélyezi. Például ha használni akarja a 'test' -et ami lemezen "
+#~ "létezik"
+
+#~ msgid "path instead of the shell builtin version, type `enable -n test'."
+#~ msgstr "a parancsértelelmezõ helyet, gépelje be 'enable -n test'."
+
+#~ msgid "On systems supporting dynamic loading, the -f option may be used"
+#~ msgstr ""
+#~ "Azokon a rendszereken ami támogatja a dinamikus betöltést, a -f opcióval"
+
+#~ msgid "to load new builtins from the shared object FILENAME. The -d"
+#~ msgstr "be lehet tölteni a FÁJLNÉV fájlt és beépítettként használni. A -d"
+
+#~ msgid "option will delete a builtin previously loaded with -f. If no"
+#~ msgstr "opció pedig letörli az elõzõleg a -f el betöltött programot. Ha nem"
+
+#~ msgid "non-option names are given, or the -p option is supplied, a list"
+#~ msgstr ""
+#~ "ír be semmit vagy a -p opciót használja akkor megjeleníti az engedélyéket "
+
+#~ msgid "of builtins is printed. The -a option means to print every builtin"
+#~ msgstr "beépített parancsokat. A -a opció megjeleníti az összes beépített"
+
+#~ msgid "with an indication of whether or not it is enabled. The -s option"
+#~ msgstr "parancsot akár engedélyezve akár nem. A -s opció kierõlteti"
+
+#~ msgid "restricts the output to the Posix.2 `special' builtins. The -n"
+#~ msgstr "a Posix.2 speciális beépített parancsait.A -n kiírja az összes"
+
+#~ msgid "option displays a list of all disabled builtins."
+#~ msgstr "letiltott beépített parancsot."
+
+#~ msgid "Getopts is used by shell procedures to parse positional parameters."
+#~ msgstr ""
+#~ "A getopts -ot a parancsértelmezõ használja a parancsok paraméterinek az "
+#~ "elemzésére."
+
+#~ msgid "OPTSTRING contains the option letters to be recognized; if a letter"
+#~ msgstr "Az OPTSTRING tartalmazza a felismerendõ opciókat, ha az opciókat"
+
+#~ msgid "is followed by a colon, the option is expected to have an argument,"
+#~ msgstr "kettõspont követi akkor valószínûleg paramétere is van,"
+
+#~ msgid "which should be separated from it by white space."
+#~ msgstr "amit javasolt elválasztani szóközzel."
+
+#~ msgid "Each time it is invoked, getopts will place the next option in the"
+#~ msgstr "Minden hívásnál a getopts elhelyezi a $name"
+
+#~ msgid "shell variable $name, initializing name if it does not exist, and"
+#~ msgstr "változóba, ha nem létezik a név akkor"
+
+#~ msgid "the index of the next argument to be processed into the shell"
+#~ msgstr "a következõ paraméter az OPTIND változóba kerül."
+
+#~ msgid "variable OPTIND. OPTIND is initialized to 1 each time the shell or"
+#~ msgstr ""
+#~ "Az OPTIND változót csak egyszer kell létrehozni a parancsértelmezõben "
+#~ "vagy "
+
+#~ msgid "a shell script is invoked. When an option requires an argument,"
+#~ msgstr ""
+#~ "egy parancsállomány meghívásakor. Amikor az opció paramétert igényel"
+
+#~ msgid "getopts places that argument into the shell variable OPTARG."
+#~ msgstr "akkor a getopts belehelyezi a paramétert az OPTARG változóba."
+
+#~ msgid "getopts reports errors in one of two ways. If the first character"
+#~ msgstr "A getopts két módon képes képes a hibákat jelenteni.Ha az OPSTRING"
+
+#~ msgid "of OPTSTRING is a colon, getopts uses silent error reporting. In"
+#~ msgstr ""
+#~ "elsõ karakterre egy kettõspont, akkor a getopts csendes hibamódban van."
+
+#~ msgid "this mode, no error messages are printed. If an illegal option is"
+#~ msgstr ""
+#~ "Ebben az üzemmódjában nem ír hiba üzenetet. Ha érvénytelen opció talál"
+
+#~ msgid "seen, getopts places the option character found into OPTARG. If a"
+#~ msgstr "abban az esetben a getopts az OPTARG változóba helyezi az opciót."
+
+#~ msgid "required argument is not found, getopts places a ':' into NAME and"
+#~ msgstr ""
+#~ "Ha egy szükséges paramétert nincs meg a getopts egy ':' helyez a NÉV-be és"
+
+#~ msgid "sets OPTARG to the option character found. If getopts is not in"
+#~ msgstr "beállítja az OPTARG-ot a hibás opciókhoz. Ha a getopts nem csöndes"
+
+#~ msgid "silent mode, and an illegal option is seen, getopts places '?' into"
+#~ msgstr "üzemmódban van és érvénytelen opciót talál, akkor a getopts egy '?'"
+
+#~ msgid "NAME and unsets OPTARG. If a required option is not found, a '?'"
+#~ msgstr ""
+#~ "a NÉV változóba és leállítja az OPTARG változót. Ha a szükséges opció "
+#~ "nincs meg"
+
+#~ msgid "is placed in NAME, OPTARG is unset, and a diagnostic message is"
+#~ msgstr ""
+#~ "akkor egy '?' -et rak a NÉV-be és az OPTARG-ot leállítja és egy üzenetet "
+#~ "küld"
+
+#~ msgid "If the shell variable OPTERR has the value 0, getopts disables the"
+#~ msgstr "Ha az OPTERR változó értéke 0, akkor a getopts letiltja"
+
+#~ msgid "printing of error messages, even if the first character of"
+#~ msgstr "az üzenetek küldését, még akkor is ha az OPTSTRING elsõ karakterre"
+
+#~ msgid "OPTSTRING is not a colon. OPTERR has the value 1 by default."
+#~ msgstr "egy kettõspont. Az OPTERR alapértéke 1."
+
+#~ msgid "Getopts normally parses the positional parameters ($0 - $9), but if"
+#~ msgstr ""
+#~ "A getopts normál esetben a pozicionáló paramétereket ($0-$9) elemzi, de"
+
+#~ msgid "more arguments are given, they are parsed instead."
+#~ msgstr "ha több paramétert kap akkor azokat használja helyettük."
+
+#~ msgid "Exec FILE, replacing this shell with the specified program."
+#~ msgstr ""
+#~ "FÁJL futtatása, kicseréli a parancsértelmezõt egy meghatározott programra."
+
+#~ msgid "If FILE is not specified, the redirections take effect in this"
+#~ msgstr ""
+#~ "Ha a FÁJL nincs meghatározva akkor az átírányítás effektus lép életbe"
+
+#~ msgid "shell. If the first argument is `-l', then place a dash in the"
+#~ msgstr ""
+#~ "a parancsértelmezõn. Ha az elsõ paraméter '-l' akkor egy gondolatjelet"
+
+#~ msgid "zeroth arg passed to FILE, as login does. If the `-c' option"
+#~ msgstr ""
+#~ "rak a FÁJL nulladik paraméterébe mint ahogy a login teszi. Ha a '-c' "
+#~ "opciót"
+
+#~ msgid "is supplied, FILE is executed with a null environment. The `-a'"
+#~ msgstr "alkalmazza akkor a FÁJL üres környezeti változókkal indul. A '-a'"
+
+#~ msgid "option means to make set argv[0] of the executed process to NAME."
+#~ msgstr ""
+#~ "opció azt jeleni, hogy a futtatott mûvelet NEVét az argv[0]-ra állítja."
+
+#~ msgid "If the file cannot be executed and the shell is not interactive,"
+#~ msgstr "Ha nem lehet a fájlt futtatni és a parancsértelmezõ nem interaktív,"
+
+#~ msgid "then the shell exits, unless the variable \"no_exit_on_failed_exec\""
+#~ msgstr ""
+#~ "akkor a parancsértelmezõ kilép, hacsak nem a \"no_exit_on_failed_exec\""
+
+#~ msgid "is set."
+#~ msgstr "változó nincs beállítva."
+
+#~ msgid "is that of the last command executed."
+#~ msgstr ""
+#~ "visszatérési érték az utoljára futtatott parancs vissza térési értéke "
+#~ "lesz."
+
+#~ msgid ""
+#~ "FIRST and LAST can be numbers specifying the range, or FIRST can be a"
+#~ msgstr ""
+#~ "Az elsõ és az utolsó lehet egy tömb kezdõ és befejezõ értéke, vagy az elsõ"
+
+#~ msgid "string, which means the most recent command beginning with that"
+#~ msgstr "lehet egy sztring ami a legutolsó parancs elsõ sztringjét"
+
+#~ msgid "string."
+#~ msgstr "jelenti."
+
+#~ msgid ""
+#~ " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR,"
+#~ msgstr ""
+#~ " -e ENÉV kiválasztja a felhasznált szerkesztõt . Alapból a vi-t "
+#~ "használja"
+
+#~ msgid ""
+#~ " then the editor which corresponds to the current readline editing"
+#~ msgstr " "
+
+#~ msgid " mode, then vi."
+#~ msgstr " "
+
+#~ msgid " -l means list lines instead of editing."
+#~ msgstr " -l a szerkesztés helyet csak megjeleníti az elemeket."
+
+#~ msgid " -n means no line numbers listed."
+#~ msgstr " -n nem írja ki a sorok számát."
+
+#~ msgid ""
+#~ " -r means reverse the order of the lines (making it newest listed "
+#~ "first)."
+#~ msgstr " -r visszafele rendezi a sorokat (a legújabb elem lesz az elsõ)."
+
+#~ msgid "With the `fc -s [pat=rep ...] [command]' format, the command is"
+#~ msgstr ""
+#~ "A fc -s [pat=rep ...] [command]' formával, az újra lefuttatott parancs"
+
+#~ msgid "re-executed after the substitution OLD=NEW is performed."
+#~ msgstr "behelyettesíti a saját helyére az utasítást."
+
+#~ msgid "A useful alias to use with this is r='fc -s', so that typing `r cc'"
+#~ msgstr "Egy hasznos alias az r='fc -s', így amikor begépeli a 'r cc'"
+
+#~ msgid "runs the last command beginning with `cc' and typing `r' re-executes"
+#~ msgstr ""
+#~ "lefuttatja az utolsó 'cc'-vel kezdõdõ parancsot és amikor beírja az 'r'-t "
+
+#~ msgid "JOB_SPEC is not present, the shell's notion of the current job is"
+#~ msgstr ""
+#~ "Ha munka_folyamat nincs meghatározva akkor a jelenlegi munka folyamatot"
+
+#~ msgid "used."
+#~ msgstr "használja."
+
+#~ msgid "Place JOB_SPEC in the background, as if it had been started with"
+#~ msgstr ""
+#~ "nka_folyamat-ot az háttérbe helyezi mintha '&' jellel indította volna"
+
+#~ msgid "`&'. If JOB_SPEC is not present, the shell's notion of the current"
+#~ msgstr "Ha a munkafolyamat nincs meghatározva akkor"
+
+#~ msgid "job is used."
+#~ msgstr "a jelenlegi munkafolyamatot használja."
+
+#~ msgid "For each NAME, the full pathname of the command is determined and"
+#~ msgstr "Meghatározza az összes név teljes elérési útvonalát és megjegyzi."
+
+#~ msgid "remembered. If the -p option is supplied, PATHNAME is used as the"
+#~ msgstr "Ha a '-p' opciót használja akkor az ÚTVONAL-at veszi a NÉV teljes"
+
+#~ msgid "full pathname of NAME, and no path search is performed. The -r"
+#~ msgstr "útvonalának és nem keresi az útvonalat. A '-r' opció"
+
+#~ msgid "option causes the shell to forget all remembered locations. If no"
+#~ msgstr "felszólítja a parancsértelmezõt, hogy felejtse el az összes helyet."
+
+#~ msgid ""
+#~ "arguments are given, information about remembered commands is displayed."
+#~ msgstr ""
+#~ "Ha nincs megadva paraméter akkor megjeleníti a megjegyzett parancsokat."
+
+#~ msgid "Display helpful information about builtin commands. If PATTERN is"
+#~ msgstr "Hasznos információkat jelenít meg a beépített parancsokról. Ha a "
+
+#~ msgid "specified, gives detailed help on all commands matching PATTERN,"
+#~ msgstr ""
+#~ "MINTA meg van határozva, akkor részletes segítséget ír ki az utasításról"
+
+#~ msgid "otherwise a list of the builtins is printed."
+#~ msgstr "egyébként egy listát jelenít meg a beépített parancsokról."
+
+#~ msgid "Display the history list with line numbers. Lines listed with"
+#~ msgstr "Sorszámozva megjeleníti az elõzményeket. A megváltoztatott sorokat"
+
+#~ msgid "with a `*' have been modified. Argument of N says to list only"
+#~ msgstr ""
+#~ "egy csillaggal(*) jelöli. Az N opció azt jelenti, hogy csak az utolsó"
+
+#~ msgid "the last N lines. The -c option causes the history list to be"
+#~ msgstr "N sort mutatja meg. A '-c' opció eredménye, hogy az elõzmény"
+
+#~ msgid ""
+#~ "cleared by deleting all of the entries. The `-w' option writes out the"
+#~ msgstr ""
+#~ "lista összes eleme törlõdik. A '-w' opció azonnal kiírja az elõzményeket"
+
+#~ msgid ""
+#~ "current history to the history file; `-r' means to read the file and"
+#~ msgstr "az aktuális listába, '-r' pedig beolvassa a fájlt"
+
+#~ msgid "append the contents to the history list instead. `-a' means"
+#~ msgstr "és az új fájlt elemeit használja helyette. A '-a' hozzáfûzi"
+
+#~ msgid "to append history lines from this session to the history file."
+#~ msgstr "az aktuális terminál sorait a teljes elõzmény fájlhoz."
+
+#~ msgid "Argument `-n' means to read all history lines not already read"
+#~ msgstr "A '-n' opció beolvassa az egész elõzmény nem beolvasott sorait"
+
+#~ msgid "from the history file and append them to the history list. If"
+#~ msgstr "ez elõzmények fájlból és hozzáfûzi az elõzmény listához."
+
+#~ msgid "FILENAME is given, then that is used as the history file else"
+#~ msgstr "Ha fájlnevet is megadunk akkor azt a fájlt fogja használni"
+
+#~ msgid "if $HISTFILE has a value, that is used, else ~/.bash_history."
+#~ msgstr ""
+#~ "Ha nincs a $HISFILE-nak érték adva akkor a ~/.bash_history-t használja."
+
+#~ msgid "If the -s option is supplied, the non-option ARGs are appended to"
+#~ msgstr "A '-s' opció hatására az ARG-ot hozzáfûzi"
+
+#~ msgid "the history list as a single entry. The -p option means to perform"
+#~ msgstr "az elõzményekhez. A '-p' opció "
+
+#~ msgid ""
+#~ "history expansion on each ARG and display the result, without storing"
+#~ msgstr "végre hajtja ez összes ARG-ot és az eredményt megjeleníti"
+
+#~ msgid "anything in the history list."
+#~ msgstr "anélkül, hogy bármit is beírna az elõzmény listába."
+
+#~ msgid "Lists the active jobs. The -l option lists process id's in addition"
+#~ msgstr ""
+#~ "Kilistázza az aktív munka folyamatokat. A '-l' opció kiírja feladat "
+#~ "azonosított"
+
+#~ msgid "to the normal information; the -p option lists process id's only."
+#~ msgstr ""
+#~ "a normál információk mellé, a '-p' opció pedig csak a feladat azonosított "
+#~ "írja ki."
+
+#~ msgid ""
+#~ "If -n is given, only processes that have changed status since the last"
+#~ msgstr ""
+#~ "Ha a '-n' opciót használja akkor csak a változásokat írja ki ami az "
+#~ "utolsó hívás "
+
+#~ msgid ""
+#~ "notification are printed. JOBSPEC restricts output to that job. The"
+#~ msgstr "után történt. A MUNKAFOLYAMAT meghatározzam, hogy melyiket írja ki."
+
+#~ msgid "-r and -s options restrict output to running and stopped jobs only,"
+#~ msgstr ""
+#~ "A '-r' és a '-s' opciók csak a futó és a megállított folyamatokat írja ki"
+
+#~ msgid "respectively. Without options, the status of all active jobs is"
+#~ msgstr "Minden opció nélkül megjeleníti az összes aktív munkafolyamatot"
+
+#~ msgid ""
+#~ "printed. If -x is given, COMMAND is run after all job specifications"
+#~ msgstr ""
+#~ "A '-x' opció hatására a PARANCS lefutása után az összes munkafolyamat "
+
+#~ msgid ""
+#~ "that appear in ARGS have been replaced with the process ID of that job's"
+#~ msgstr ""
+#~ "meghatározás ami az ARGS-ban feltûnik az kicserélõdik a munkafolyamat "
+#~ "vezetõ"
+
+#~ msgid "process group leader."
+#~ msgstr "feladat azonosítójára."
+
+#~ msgid "Removes each JOBSPEC argument from the table of active jobs."
+#~ msgstr "Eltávolítja az összes MUNKAFOLYAMAT-ot az aktív folyamatok közül."
+
+#~ msgid "Send the processes named by PID (or JOB) the signal SIGSPEC. If"
+#~ msgstr "A jeltípust(sigspec) küld a meghatározott PID-re vagy JOB-ra."
+
+#~ msgid ""
+#~ "SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'"
+#~ msgstr ""
+#~ "Ha a jeltípus(sigpsec) nincs meghatározva akkor egy SIGTERM-et küld."
+
+#~ msgid "lists the signal names; if arguments follow `-l' they are assumed to"
+#~ msgstr ""
+#~ "A '-l' opció kilistázza a jelek neveit.Ha a '-l' opció paramétere egy"
+
+#~ msgid "be signal numbers for which names should be listed. Kill is a shell"
+#~ msgstr ""
+#~ "jel száma akkor a számhoz tartozó nevet írja ki. A kill két okból "
+#~ "beépített"
+
+#~ msgid "builtin for two reasons: it allows job IDs to be used instead of"
+#~ msgstr "utasítása a parancsértelmezõnek: a job azonosító helyet"
+
+#~ msgid "process IDs, and, if you have reached the limit on processes that"
+#~ msgstr "és ha (esetleg) a feladatok elérik a maximális határt akkor nem"
+
+#~ msgid ""
+#~ "you can create, you don't have to start a process to kill another one."
+#~ msgstr ""
+#~ "nem lehet új feladatot indítani(fõleg a kill) és így nem lehetséges "
+#~ "kilõni semmit."
+
+#~ msgid "Each ARG is an arithmetic expression to be evaluated. Evaluation"
+#~ msgstr "Minden ARG egy matematikai kifelyezés. Az érték"
+
+#~ msgid "is done in long integers with no check for overflow, though division"
+#~ msgstr "lehet hosszú egész túlcsordulás ellenõrzés nélkül. A nullával való"
+
+#~ msgid "by 0 is trapped and flagged as an error. The following list of"
+#~ msgstr ""
+#~ "osztás megszakítja és hibát jelez.A következõ lista egy összefoglaló"
+
+#~ msgid "operators is grouped into levels of equal-precedence operators."
+#~ msgstr "az operátorokról végrehajtás szerinti csoportosításban."
+
+#~ msgid "The levels are listed in order of decreasing precedence."
+#~ msgstr ""
+#~ "A listában végrehajtás szerint csökkenõ sorrendben vannak felsorolva."
+
+#~ msgid "\t-, +\t\tunary minus, plus"
+#~ msgstr "\t-, +\t\tunáris mínusz, plusz"
+
+#~ msgid "\t!, ~\t\tlogical and bitwise negation"
+#~ msgstr "\t!, ~\t\tlogikai és bitszintû negálás"
+
+#~ msgid "\t*, /, %\t\tmultiplication, division, remainder"
+#~ msgstr "\t*, /, %\t\tszorzás, osztás, maradékképzés"
+
+#~ msgid "\t+, -\t\taddition, subtraction"
+#~ msgstr "\t+, -\t\tösszeadása, kivonás"
+
+#~ msgid "\t<<, >>\t\tleft and right bitwise shifts"
+#~ msgstr "\t<<, >>\t\tbitszintû balra és jobbra emelés"
+
+#~ msgid "\t<=, >=, <, >\tcomparison"
+#~ msgstr "\t<=, >=, <, >\tösszehasonlítás"
+
+#~ msgid "\t==, !=\t\tequality, inequality"
+#~ msgstr "\t==, !=\t\tegyenlõség ,egyenlõtlenség"
+
+#~ msgid "\t&\t\tbitwise AND"
+#~ msgstr "\t&\t\tbitszintû ÉS"
+
+#~ msgid "\t^\t\tbitwise XOR"
+#~ msgstr "\t^\t\tbitszintû kizáró-vagy"
+
+#~ msgid "\t|\t\tbitwise OR"
+#~ msgstr "\t|\t\tbitszintû VAGY"
+
+#~ msgid "\t&&\t\tlogical AND"
+#~ msgstr "\t&&\t\tlogikai ÉS"
+
+#~ msgid "\t||\t\tlogical OR"
+#~ msgstr "\t||\t\tlogikai VAGY"
+
+#~ msgid "\texpr ? expr : expr"
+#~ msgstr "\tkifelyezés ? kifelyezés : kifelyezés"
+
+#~ msgid "\t\t\tconditional expression"
+#~ msgstr "\t\t\tfeltételes kifelyezés"
+
+#~ msgid "\t=, *=, /=, %=,"
+#~ msgstr "\t=, *=, /=, %=,"
+
+#~ msgid "\t+=, -=, <<=, >>=,"
+#~ msgstr "\t+=, -=, <<=, >>=,"
+
+#~ msgid "\t&=, ^=, |=\tassignment"
+#~ msgstr "\t&=, ^=, |=\thozzárendelés"
+
+#~ msgid "is replaced by its value (coerced to a long integer) within"
+#~ msgstr "behelyettesíthetõ a kifelyezésekben értékek helyére "
+
+#~ msgid "an expression. The variable need not have its integer attribute"
+#~ msgstr ""
+#~ "(hosszú egészre kiegészítve). A változónak nem lehet egész attribútuma"
+
+#~ msgid "turned on to be used in an expression."
+#~ msgstr "beállítva, ha kifelyezésként kívánja használni."
+
+#~ msgid "Operators are evaluated in order of precedence. Sub-expressions in"
+#~ msgstr "Az operátorok kiértékelési sorrendben. Az al-kifelyezések"
+
+#~ msgid "parentheses are evaluated first and may override the precedence"
+#~ msgstr ""
+#~ "elsõnek hívódnak meg és ezzel felülbírálhatják a teljes végre hajtási"
+
+#~ msgid "rules above."
+#~ msgstr "szabályokat."
+
+#~ msgid "If the last ARG evaluates to 0, let returns 1; 0 is returned"
+#~ msgstr "Ha az utolsó ARG értéke 0 akkor a visszatérési értéke 1, egyébként"
+
+#~ msgid "otherwise."
+#~ msgstr "0 -val tér vissza."
+
+#~ msgid "One line is read from the standard input, and the first word is"
+#~ msgstr "Egy sort beolvas a standard bemenetrõl és az elsõ szót"
+
+#~ msgid ""
+#~ "assigned to the first NAME, the second word to the second NAME, and so"
+#~ msgstr ""
+#~ "hozzárendeli az elsõ NÉV-hez, a második szót hozzárendeli a második NÉV-"
+#~ "hez"
+
+#~ msgid ""
+#~ "on, with leftover words assigned to the last NAME. Only the characters"
+#~ msgstr ""
+#~ "és így tovább egészen addig míg el nem éri az utolsó NEVet. Abban az "
+#~ "esetben"
+
+#~ msgid "found in $IFS are recognized as word delimiters. The return code is"
+#~ msgstr ""
+#~ "ha a $IFS egy karaktert talál akkor azt szóhatárolóként fogja fel. A "
+#~ "visszatérési"
+
+#~ msgid ""
+#~ "zero, unless end-of-file is encountered. If no NAMEs are supplied, the"
+#~ msgstr ""
+#~ "érték 0, hacsak nem kap fájl vége jelet.Ha a NÉV nincs meghatározva, akkor"
+
+#~ msgid ""
+#~ "line read is stored in the REPLY variable. If the -r option is given,"
+#~ msgstr ""
+#~ "a beolvasott sorok a REPLY változóban tárolódnak. A '-r' opció hatására"
+
+#~ msgid "this signifies `raw' input, and backslash escaping is disabled. If"
+#~ msgstr ""
+#~ "a bemenetet, mint nyers bemenet használja és a backslash karaktereket "
+#~ "letiltja."
+
+#~ msgid "the `-p' option is supplied, the string supplied as an argument is"
+#~ msgstr ""
+#~ "Ha a '-p' opció sztring paraméterét kiírja (újsor karakter nélkül) a "
+#~ "kimenetre"
+
+#~ msgid ""
+#~ "output without a trailing newline before attempting to read. If -a is"
+#~ msgstr "mielõtt még az olvasásba belekezdene. A '-a' opció hatására"
+
+#~ msgid ""
+#~ "supplied, the words read are assigned to sequential indices of ARRAY,"
+#~ msgstr "a beolvasott szavak egy indexelt tömb elemeiket veszi fel, nullával"
+
+#~ msgid "starting at zero. If -e is supplied and the shell is interactive,"
+#~ msgstr ""
+#~ "kezdõdõen. A '-e' opció alkalmazása és a parancsértelmezõ párbeszéd módja"
+
+#~ msgid "readline is used to obtain the line."
+#~ msgstr "hatására a 'readline'-ból veszi a feldolgozási sort."
+
+#~ msgid "is omitted, the return status is that of the last command."
+#~ msgstr ""
+#~ "Ha az N értéke nincs megadva akkor a visszatérési értéket az utolsó "
+#~ "parancsból veszi."
+
+#~ msgid " -a Mark variables which are modified or created for export."
+#~ msgstr ""
+#~ " -a Megjelöli a változót úgy mintha az export módosította vagy "
+#~ "létrehozta volna."
+
+#~ msgid " -b Notify of job termination immediately."
+#~ msgstr " -b Azonnal megszakítja a munkafolyamatot."
+
+#~ msgid " -e Exit immediately if a command exits with a non-zero status."
+#~ msgstr " -e Kilép azonnal ha a parancs nem nulla állapotban van."
+
+#~ msgid " -f Disable file name generation (globbing)."
+#~ msgstr " -f Letiltja a fájlnév generálást (globbing)."
+
+#~ msgid " -h Remember the location of commands as they are looked up."
+#~ msgstr " -h Megjegyzi a parancs helyét amit megtalált."
+
+#~ msgid ""
+#~ " -i Force the shell to be an \"interactive\" one. Interactive shells"
+#~ msgstr ""
+#~ " -i Kierõlteti a parancsértelmezõtõl a párbeszédes üzemmódot. Ez a "
+
+#~ msgid " always read `~/.bashrc' on startup."
+#~ msgstr " mód mindig a '~/.bashrc' használja indulásnál."
+
+#~ msgid " -k All assignment arguments are placed in the environment for a"
+#~ msgstr ""
+#~ " -k Az összes hozzárendelt paraméter elhelyezi a környezeti változok "
+#~ "között"
+
+#~ msgid " command, not just those that precede the command name."
+#~ msgstr " nem csak azt ami a parancs nevét megelõzi."
+
+#~ msgid " -m Job control is enabled."
+#~ msgstr " -m A munkafolyamat ellenõrzés engedélyezése."
+
+#~ msgid " -n Read commands but do not execute them."
+#~ msgstr " -n Beolvassa a parancsok, de nem hajtja õket végre."
+
+#~ msgid " -o option-name"
+#~ msgstr " -o opció neve"
+
+#~ msgid " Set the variable corresponding to option-name:"
+#~ msgstr ""
+#~ " A változok beállításához használhatók a következõ opció nevek:"
+
+#~ msgid " allexport same as -a"
+#~ msgstr " allexport ugyanaz mint a -a"
+
+#~ msgid " braceexpand same as -B"
+#~ msgstr " braceexpand ugyanaz mint a -B"
+
+#~ msgid " emacs use an emacs-style line editing interface"
+#~ msgstr " emacs emacs stílusú sor szerkesztés használata"
+
+#~ msgid " errexit same as -e"
+#~ msgstr " errexit ugyanaz mint a -e"
+
+#~ msgid " hashall same as -h"
+#~ msgstr " hashall ugyanaz mint a -h"
+
+#~ msgid " histexpand same as -H"
+#~ msgstr " histexpand ugyanaz mint a -H"
+
+#~ msgid " ignoreeof the shell will not exit upon reading EOF"
+#~ msgstr ""
+#~ " ignoreeof a parancsértelmezõ nem lép ki amíg nem kap EOF "
+#~ "jelet"
+
+#~ msgid " interactive-comments"
+#~ msgstr " interactive-comments"
+
+#~ msgid ""
+#~ " allow comments to appear in interactive commands"
+#~ msgstr ""
+#~ " engedélyezi a megjegyzéseket a párbeszédes parancsoknál"
+
+#~ msgid " keyword same as -k"
+#~ msgstr " keyword ugyanaz mint a -k"
+
+#~ msgid " monitor same as -m"
+#~ msgstr " monitor ugyanaz mint a -m"
+
+#~ msgid " noclobber same as -C"
+#~ msgstr " noclobber ugyanaz mint a -C"
+
+#~ msgid " noexec same as -n"
+#~ msgstr " noexec ugyanaz mint a -n"
+
+#~ msgid " noglob same as -f"
+#~ msgstr " noglob ugyanaz mint a -f"
+
+#~ msgid " notify save as -b"
+#~ msgstr " notify ugyanaz mint a -b"
+
+#~ msgid " nounset same as -u"
+#~ msgstr " nounset ugyanaz mint a -u"
+
+#~ msgid " onecmd same as -t"
+#~ msgstr " onecmd ugyanaz mint a -t"
+
+#~ msgid " physical same as -P"
+#~ msgstr " physical ugyanaz mint a -P"
+
+#~ msgid ""
+#~ " posix change the behavior of bash where the default"
+#~ msgstr ""
+#~ " posix megváltoztatja a bash viselkedését ott ahol az "
+#~ "alap"
+
+#~ msgid ""
+#~ " operation differs from the 1003.2 standard to"
+#~ msgstr " mód különbözik a 1003.2 szabványtól"
+
+#~ msgid " match the standard"
+#~ msgstr " az aktuális szabvány"
+
+#~ msgid " privileged same as -p"
+#~ msgstr " privileged ugyanaz mint a -p"
+
+#~ msgid " verbose same as -v"
+#~ msgstr " verbose ugyanaz mint a -v"
+
+#~ msgid " vi use a vi-style line editing interface"
+#~ msgstr " vi vi stílusú sor szerkesztést használ"
+
+#~ msgid " xtrace same as -x"
+#~ msgstr " xtrace ugyanaz mint a -x"
+
+#~ msgid ""
+#~ " -p Turned on whenever the real and effective user ids do not match."
+#~ msgstr ""
+#~ " -p Bekapcsolja még akkor is ha a valós és az effektív felhasználó "
+#~ "azonosító"
+
+#~ msgid " Disables processing of the $ENV file and importing of shell"
+#~ msgstr ""
+#~ " különbözik. Letiltja $ENV fájl feldolgozását és a parancsértelmezõbe "
+#~ "építését"
+
+#~ msgid ""
+#~ " functions. Turning this option off causes the effective uid and"
+#~ msgstr " Beállítja az effektív felhasználó és csoport azonosítót a "
+
+#~ msgid " gid to be set to the real uid and gid."
+#~ msgstr " valós felhasználó és csoport azonosítóra."
+
+#~ msgid " -t Exit after reading and executing one command."
+#~ msgstr " -t Kilép az olvasás és egy parancs végrehajtása után."
+
+#~ msgid " -u Treat unset variables as an error when substituting."
+#~ msgstr ""
+#~ " -u Úgy kezeli a leállított változókat mintha hibás lenne a "
+#~ "behelyettesítés."
+
+#~ msgid " -v Print shell input lines as they are read."
+#~ msgstr " -v Kiírja a parancsértelmezõ bemenetét úgy ahogy beolvasta."
+
+#~ msgid " -x Print commands and their arguments as they are executed."
+#~ msgstr ""
+#~ " -x Kiírja a parancsokat és a paramétereiket úgy ahogy lefuttatta "
+#~ "õket."
+
+#~ msgid " -B the shell will perform brace expansion"
+#~ msgstr " -B a parancsértelmezõ elõkészíti a közös bõvítményeket"
+
+#~ msgid " -H Enable ! style history substitution. This flag is on"
+#~ msgstr " -H Engedélyezés a ! stílusú elõzmény behelyettesítés. Ez a jel"
+
+#~ msgid " by default."
+#~ msgstr " alapból be van kapcsolva."
+
+#~ msgid " -C If set, disallow existing regular files to be overwritten"
+#~ msgstr " -C Ha be van állítva akkor a hagyományos fájl felülírása"
+
+#~ msgid " by redirection of output."
+#~ msgstr " a kimenet átirányításával."
+
+#~ msgid " -P If set, do not follow symbolic links when executing commands"
+#~ msgstr ""
+#~ " -P Ha be van állítva akkor nem fogja követni a szimbolikus linkeket "
+#~ "amikor"
+
+#~ msgid " such as cd which change the current directory."
+#~ msgstr ""
+#~ "elindított program mint a 'cd' megpróbálja meg változtatni az aktuális "
+#~ "könyvtárat."
+
+#~ msgid "Using + rather than - causes these flags to be turned off. The"
+#~ msgstr "Ha a '-' helyet '+' használ akkor a jelzõt kikapcsolja."
+
+#~ msgid "flags can also be used upon invocation of the shell. The current"
+#~ msgstr "A jelzõket még lehet használni a parancsértelmezõ meghívására.A "
+
+#~ msgid ""
+#~ "set of flags may be found in $-. The remaining n ARGs are positional"
+#~ msgstr ""
+#~ "jelenlegi jelzõ beállításokat a $- tárolja. A maradék n ARG a pozicionáló"
+
+#~ msgid "parameters and are assigned, in order, to $1, $2, .. $n. If no"
+#~ msgstr "paraméterekhez rendeli hozzá ($1, $2, $3 ...$n) Ha nem"
+
+#~ msgid "ARGs are given, all shell variables are printed."
+#~ msgstr "nem adunk semmilyen opciót meg akkor az összes változó kiírja."
+
+#~ msgid "For each NAME, remove the corresponding variable or function. Given"
+#~ msgstr "Az összes NÉV változót vagy függvényt letörli"
+
+#~ msgid "the `-v', unset will only act on variables. Given the `-f' flag,"
+#~ msgstr "A '-v' használatakor csak a változókat állítja le.A '-f' pedig"
+
+#~ msgid "unset will only act on functions. With neither flag, unset first"
+#~ msgstr "csak a funkciókat.Opciók nélkül az unset elõször megpróbálja a "
+
+#~ msgid "tries to unset a variable, and if that fails, then tries to unset a"
+#~ msgstr ""
+#~ "a változók leállítását és ha nem sikerül akkor megpróbálja a funkciókat "
+#~ "is."
+
+#~ msgid ""
+#~ "function. Some variables (such as PATH and IFS) cannot be unset; also"
+#~ msgstr "Néhány kiemelt változót (pl PATH vagy IFS) nem lehet letörölni"
+
+#~ msgid "see readonly."
+#~ msgstr "ezek csak olvashatók."
+
+#~ msgid "NAMEs are marked for automatic export to the environment of"
+#~ msgstr ""
+#~ "A NEVET megjelöli automatikus exportálásra a késõbb elindított parancs"
+
+#~ msgid "subsequently executed commands. If the -f option is given,"
+#~ msgstr "környezeti változóiként."
+
+#~ msgid "the NAMEs refer to functions. If no NAMEs are given, or if `-p'"
+#~ msgstr ""
+#~ "A '-f' besorolja a NEVET a funkciók közé. Ha nem adja meg a nevet vagy"
+
+#~ msgid "is given, a list of all names that are exported in this shell is"
+#~ msgstr ""
+#~ "'-p' -t használja akkor kiírja az összes nevet amit exportáltak ebben a "
+#~ "parancs-"
+
+#~ msgid "printed. An argument of `-n' says to remove the export property"
+#~ msgstr "értelmezõben. A '-n' hatására eltávolítja a NEVET exportálandók"
+
+#~ msgid "from subsequent NAMEs. An argument of `--' disables further option"
+#~ msgstr "közül. A '--' paramétere letiltja a következõ opció"
+
+#~ msgid "processing."
+#~ msgstr "feldolgozását."
+
+#~ msgid ""
+#~ "The given NAMEs are marked readonly and the values of these NAMEs may"
+#~ msgstr ""
+#~ "Az átadott NEVET csak olvashatóvá teszi és ettõl kezdve nem lehet meg"
+
+#~ msgid "not be changed by subsequent assignment. If the -f option is given,"
+#~ msgstr "változtatni a hozzárendeléseket. "
+
+#~ msgid "then functions corresponding to the NAMEs are so marked. If no"
+#~ msgstr "A '-f' hatására a funkciónak megfelelõ NEVET megjelöli. Ha"
+
+#~ msgid ""
+#~ "arguments are given, or if `-p' is given, a list of all readonly names"
+#~ msgstr ""
+#~ "opciók nélkül vagy a '-p'-vel indítjuk el akkor egy listát kapunk a csak"
+
+#~ msgid ""
+#~ "is printed. An argument of `-n' says to remove the readonly property"
+#~ msgstr ""
+#~ "olvasható funkciókról.A '-n' hatására eltávolítja a NEVET csak olvashatók"
+
+#~ msgid "from subsequent NAMEs. The `-a' option means to treat each NAME as"
+#~ msgstr "közül.A '-a' opció az összes NEVET tömb változóként kezel."
+
+#~ msgid "an array variable. An argument of `--' disables further option"
+#~ msgstr "A '--' paramétere letiltja a következõ opció feldolgozását."
+
+#~ msgid "not given, it is assumed to be 1."
+#~ msgstr "értékét nem adjuk meg, akkor egyel csökkenti."
+
+#~ msgid "Read and execute commands from FILENAME and return. The pathnames"
+#~ msgstr ""
+#~ "Beolvas és végrehajtja a parancsokat a FÁJLNÉV-bõl és visszatér.A $PATH"
+
+#~ msgid "in $PATH are used to find the directory containing FILENAME."
+#~ msgstr "változóban található útvonalon próbálja meg keresi a FÁJLNEVET."
+
+#~ msgid "Suspend the execution of this shell until it receives a SIGCONT"
+#~ msgstr ""
+#~ "Felfüggeszti ennek a parancsértelmezõnek a futtatását amíg egy SIGCONT"
+
+#~ msgid "signal. The `-f' if specified says not to complain about this"
+#~ msgstr ""
+#~ "jelet nem kap.A '-f' azt jelenti, hogy nem fog szólni, ha egy "
+#~ "bejelentkezett"
+
+#~ msgid "being a login shell if it is; just suspend anyway."
+#~ msgstr "parancsértelmezõt próbál felfüggeszteni, mindenképp felfüggeszt."
+
+#~ msgid "Exits with a status of 0 (trueness) or 1 (falseness) depending on"
+#~ msgstr ""
+#~ "Kilép 0 státusszal (igaz) vagy 1-el (hiba) a KIFELYEZÉS eredményétõl"
+
+#~ msgid "the evaluation of EXPR. Expressions may be unary or binary. Unary"
+#~ msgstr "függõen. A KIFELYEZÉS lehet unáris vagy bináris. Az unáris "
+
+#~ msgid "expressions are often used to examine the status of a file. There"
+#~ msgstr ""
+#~ "kifelyezéseket gyakran használják fájlok helyzetének a vizsgálatára."
+
+#~ msgid "are string operators as well, and numeric comparison operators."
+#~ msgstr "Vagy ott ahol a sztingeket kell összehasonlítani számokkal."
+
+#~ msgid "File operators:"
+#~ msgstr "Fájl operátorok:"
+
+#~ msgid " -b FILE True if file is block special."
+#~ msgstr " -b FÁJL Igaz ha a FÁJL egy speciális blokk fájl."
+
+#~ msgid " -c FILE True if file is character special."
+#~ msgstr " -c FÁJL Igaz ha a FÁJL egy speciális karakter fájl"
+
+#~ msgid " -d FILE True if file is a directory."
+#~ msgstr " -d FÁJL Igaz ha a FÁJL egy könyvtár"
+
+#~ msgid " -e FILE True if file exists."
+#~ msgstr " -e FÁJL Igaz ha a FÁJL létezik."
+
+#~ msgid " -f FILE True if file exists and is a regular file."
+#~ msgstr " -f FÁJL Igaz ha a FÁJL létezik és általános fájl."
+
+#~ msgid " -g FILE True if file is set-group-id."
+#~ msgstr ""
+#~ " -g FÁJL Igaz ha a FÁJL csoport azonosítója be van állítva."
+
+#~ msgid " -h FILE True if file is a symbolic link. Use \"-L\"."
+#~ msgstr ""
+#~ " -h FÁJL Igaz ha a FÁJL egy szimbolikus link. A \"-L\" "
+#~ "használatával."
+
+#~ msgid " -L FILE True if file is a symbolic link."
+#~ msgstr " -L FÁJL Igaz ha a FÁJL egy szimbolikus link."
+
+#~ msgid " -k FILE True if file has its \"sticky\" bit set."
+#~ msgstr ""
+#~ " -k FÁJL Igaz ha a FÁJL-on be van állítva a rögzített bit."
+
+#~ msgid " -p FILE True if file is a named pipe."
+#~ msgstr " -p FÁJL Igaz ha a FÁJL egy csõ(pipe)."
+
+#~ msgid " -r FILE True if file is readable by you."
+#~ msgstr " -r FÁJL Igaz ha a FÁJL ön által olvasható."
+
+#~ msgid " -s FILE True if file exists and is not empty."
+#~ msgstr " -s FÁJL Igaz ha a FÁJL létezik és nem üres."
+
+#~ msgid " -S FILE True if file is a socket."
+#~ msgstr " -S FÁJL Igaz ha a FÁJL egy socket."
+
+#~ msgid " -t FD True if FD is opened on a terminal."
+#~ msgstr " -t FD Igaz ha az FD megnyitották egy terminálon."
+
+#~ msgid " -u FILE True if the file is set-user-id."
+#~ msgstr ""
+#~ " -u FÁJL Igaz ha a FÁJL-on a felhasználó azonosító be van "
+#~ "állítva."
+
+#~ msgid " -w FILE True if the file is writable by you."
+#~ msgstr " -w FÁJL Igaz ha a FÁJL-t ön tudja írni."
+
+#~ msgid " -x FILE True if the file is executable by you."
+#~ msgstr " -x FÁJL Igaz ha a FÁJL-t tudja futtatni."
+
+#~ msgid " -O FILE True if the file is effectively owned by you."
+#~ msgstr " -O FÁJL Igaz ha a FÁJL-t effektíve ön birtokolja."
+
+#~ msgid ""
+#~ " -G FILE True if the file is effectively owned by your group."
+#~ msgstr ""
+#~ " -G FÁJL Igaz ha a FÁJL az ön csoportja effektíve birtokolja."
+
+#~ msgid " FILE1 -nt FILE2 True if file1 is newer than (according to"
+#~ msgstr " FÁJL1 -nt FÁJL2 Igaz ha a FÁJL1 újabb mint (módosítási dátum "
+
+#~ msgid " modification date) file2."
+#~ msgstr " szerint) FÁJL2."
+
+#~ msgid " FILE1 -ot FILE2 True if file1 is older than file2."
+#~ msgstr " FÁJL1 -bot FÁJL2 Igaz ha a FÁJL1 régebbi, mint a FÁJL2."
+
+#~ msgid " FILE1 -ef FILE2 True if file1 is a hard link to file2."
+#~ msgstr " FÁJL1 -ef FÁJL2 Igaz ha a FÁJL1 egy hard link a FÁJL2-re."
+
+#~ msgid "String operators:"
+#~ msgstr "Sztring operátorok:"
+
+#~ msgid " -z STRING True if string is empty."
+#~ msgstr " -z SZTRING Igaz .ha a SZTRING üres."
+
+#~ msgid " -n STRING"
+#~ msgstr " -n SZTRING"
+
+#~ msgid " STRING True if string is not empty."
+#~ msgstr " SZTRING Igaz .ha a SZTRING nem üres"
+
+#~ msgid " STRING1 = STRING2"
+#~ msgstr " SZTRING1 = SZTRING2"
+
+#~ msgid " True if the strings are equal."
+#~ msgstr " Igaz ha a két sztring azonos."
+
+#~ msgid " STRING1 != STRING2"
+#~ msgstr " SZTRING1 != SZTRING2"
+
+#~ msgid " True if the strings are not equal."
+#~ msgstr " Igaz ha a két sztring nem azonos."
+
+#~ msgid " STRING1 < STRING2"
+#~ msgstr " SZTRING1 < SZTRING2"
+
+#~ msgid ""
+#~ " True if STRING1 sorts before STRING2 lexicographically"
+#~ msgstr ""
+#~ " Igaz ha a SZTRING1 elõrébb van mint a SZTRING2 "
+#~ "lexikálisan"
+
+#~ msgid " STRING1 > STRING2"
+#~ msgstr " SZTRING1 > SZTRING2"
+
+#~ msgid ""
+#~ " True if STRING1 sorts after STRING2 lexicographically"
+#~ msgstr ""
+#~ " Igaz ha a SZTRING1 hátrébb van mint a SZTRING2 "
+#~ "lexikálisan"
+
+#~ msgid "Other operators:"
+#~ msgstr "Egyéb operátorok:"
+
+#~ msgid " ! EXPR True if expr is false."
+#~ msgstr " ! KIFELYEZÉS Igaz ha a KIFELYEZÉS."
+
+#~ msgid " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true."
+#~ msgstr " KIF1 -a KIF2 Igaz ha mindkét(ÉS) KIFelyezés igaz."
+
+#~ msgid " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true."
+#~ msgstr " KIF1 -a KIF2 Igaz ha valamelyik(VAGY) KIFelyezés igaz."
+
+#~ msgid " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,"
+#~ msgstr " arg1 OP arg2 Számtani összehasonlítások. OP lehet -eq, -ne,"
+
+#~ msgid " -lt, -le, -gt, or -ge."
+#~ msgstr " -lt, -le, -gt, vagy -ge közül bármelyik."
+
+#~ msgid "Arithmetic binary operators return true if ARG1 is equal, not-equal,"
+#~ msgstr ""
+#~ "A bináris számtani operátorok igaz értékel térnek vissza ha az ARG1 "
+#~ "egyenlõ"
+
+#~ msgid ""
+#~ "less-than, less-than-or-equal, greater-than, or greater-than-or-equal"
+#~ msgstr ""
+#~ "nem egyenlõ, kevesebb mint, kevesebb vagy egyenlõ, nagyobb mint vagy"
+
+#~ msgid "than ARG2."
+#~ msgstr "nagyobb vagy egyenlõ mint az ARG2."
+
+#~ msgid "This is a synonym for the \"test\" builtin, but the last"
+#~ msgstr ""
+#~ "Ez egy szinonimája a \"test\" beépített utasításnak, de az utolsó "
+#~ "paraméter"
+
+#~ msgid "the shell."
+#~ msgstr "a feladatot futtassa ezen a parancsértelmezõn."
+
+#~ msgid "The command ARG is to be read and executed when the shell receives"
+#~ msgstr ""
+#~ "Az ARG-ban meghatározott parancsot futtatja le ha a parancsértelmezõ egy"
+
+#~ msgid "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are"
+#~ msgstr "SIGNAL_SCEP jelet kap.Ha az ARG-ot elhagyjuk akkor az összes jel"
+
+#~ msgid "reset to their original values. If ARG is the null string each"
+#~ msgstr ""
+#~ "vissza áll az eredeti értékére. Ha az ARG egy üres sztring akkor a "
+#~ "parancsértelmezõ"
+
+#~ msgid "SIGNAL_SPEC is ignored by the shell and by the commands it invokes."
+#~ msgstr "és a parancsok SIGNAL_SPEC hívásait figyelmen kívül hagyja."
+
+#~ msgid "If SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from"
+#~ msgstr ""
+#~ "Ha egy SIGNAL_SPEC EXIT(0) ARG-ot kap akkor kilép az aktuális parancs-"
+
+#~ msgid "the shell. If SIGNAL_SPEC is DEBUG, ARG is executed after every"
+#~ msgstr "értelmezõbõl.Ha a SIGNAL_SPEC értéke DEBUG akkor az ARG minden"
+
+#~ msgid "command. If ARG is `-p' then the trap commands associated with"
+#~ msgstr "parancs után le fut. Ha az ARG egy '-p' akkor megjeleníti az összes"
+
+#~ msgid "each SIGNAL_SPEC are displayed. If no arguments are supplied or if"
+#~ msgstr "SIGNAL_SPEC hozzárendelést. Ha opciók nélkül használja vagy"
+
+#~ msgid "only `-p' is given, trap prints the list of commands associated with"
+#~ msgstr ""
+#~ "csak a '-p'-t akkor a trap kiírja a hozzárendelt parancsok listáját az "
+
+#~ msgid ""
+#~ "each signal number. SIGNAL_SPEC is either a signal name in <signal.h>"
+#~ msgstr ""
+#~ "összes jel számával. A SIGNAL_SPEC elfogadja a <signal.h>-ban "
+#~ "meghatározott"
+
+#~ msgid ""
+#~ "or a signal number. `trap -l' prints a list of signal names and their"
+#~ msgstr ""
+#~ "neveket vagy számukat. A 'trap -l' kiírja a jelek neveit és a "
+#~ "hozzátartozó "
+
+#~ msgid "corresponding numbers. Note that a signal can be sent to the shell"
+#~ msgstr ""
+#~ "értékeket.Megjegyzés: a parancsértelemzõnek a \"kill -signal $$\" -al "
+
+#~ msgid "with \"kill -signal $$\"."
+#~ msgstr "lehet küldeni."
+
+#~ msgid "For each NAME, indicate how it would be interpreted if used as a"
+#~ msgstr "Az összes NÉVrõl hogyan értelmezi ha parancsértelmezõ amikor"
+
+#~ msgid "If the -t option is used, returns a single word which is one of"
+#~ msgstr ""
+#~ "Ha a '-t' opciót használja akkor az eredmény a következõ szavak egyike"
+
+#~ msgid ""
+#~ "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an"
+#~ msgstr ""
+#~ "`alias', `keyword', `function', `builtin', `file' vagy `', ha a NÉV egy"
+
+#~ msgid ""
+#~ "alias, shell reserved word, shell function, shell builtin, disk file,"
+#~ msgstr ""
+#~ "alias, parancsértelmezõ által fenntartott szó, parancsértelmezõ funkció, "
+
+#~ msgid "or unfound, respectively."
+#~ msgstr ""
+#~ "beépített utasítás, egy fájl a lemezen vagy ha nincs meg,sorrendben."
+
+#~ msgid "If the -p flag is used, either returns the name of the disk file"
+#~ msgstr ""
+#~ "Ha a '-p'-t használja vissza tér a lemezen található fájl pontos helyével"
+
+#~ msgid "that would be executed, or nothing if -t would not return `file'."
+#~ msgstr "vagy ha nem ad vissza semmit akkor az nem egy fájl."
+
+#~ msgid "If the -a flag is used, displays all of the places that contain an"
+#~ msgstr ""
+#~ "A '-a' opció hatására megjeleníti az összes helyet ahol a megtalálható"
+
+#~ msgid ""
+#~ "executable named `file'. This includes aliases and functions, if and"
+#~ msgstr ""
+#~ "mint futtatható fájl. Ez magában foglalja a aliasokat és a funkciókat "
+
+#~ msgid "only if the -p flag is not also used."
+#~ msgstr "csak akkor ha '-p'-t nem használja."
+
+#~ msgid "Type accepts -all, -path, and -type in place of -a, -p, and -t,"
+#~ msgstr "A type elfogadja -all, -path, és a -type szavakat -a, -p, és -t,"
+
+#~ msgid "respectively."
+#~ msgstr "helyet."
+
+#~ msgid "Ulimit provides control over the resources available to processes"
+#~ msgstr ""
+#~ "Az ulimit teljes ellenõrzést biztosít a parancsértelmezõ által elindított "
+#~ "programok"
+
+#~ msgid "started by the shell, on systems that allow such control. If an"
+#~ msgstr "elõforrásai felet, ami által az egész rendszer lehet szabályozni."
+
+#~ msgid "option is given, it is interpreted as follows:"
+#~ msgstr "A következõ lista bemutatja az elérhetõ opciókat:"
+
+#~ msgid " -S\tuse the `soft' resource limit"
+#~ msgstr " -S\t \"lágy\" erõforrás korlátozást használ"
+
+#~ msgid " -H\tuse the `hard' resource limit"
+#~ msgstr " -H\t \"kemény\" erõforrás korlátozást használ"
+
+#~ msgid " -a\tall current limits are reported"
+#~ msgstr " -a\tmegjeleníti az összes korlátozás"
+
+#~ msgid " -c\tthe maximum size of core files created"
+#~ msgstr " -c\ta maximálisan létrehozható core fájl mérete"
+
+#~ msgid " -d\tthe maximum size of a process's data segment"
+#~ msgstr " -d maximális mérete feladatok adat szegmensének"
+
+#~ msgid " -m\tthe maximum resident set size"
+#~ msgstr " -m\ta maximális bennmaradó(rezidest) rész mérete"
+
+#~ msgid " -s\tthe maximum stack size"
+#~ msgstr " -s\ta verem maximális mérete"
+
+#~ msgid " -t\tthe maximum amount of cpu time in seconds"
+#~ msgstr " -t\ta maximálisan felhasználható cpu idõ másodpercben"
+
+#~ msgid " -f\tthe maximum size of files created by the shell"
+#~ msgstr ""
+#~ " -f\t a parancsértelmezõ által létrehozható fájlok maximális mérete"
+
+#~ msgid " -p\tthe pipe buffer size"
+#~ msgstr " -p\ta csõ(pipe) puffer mérete"
+
+#~ msgid " -n\tthe maximum number of open file descriptors"
+#~ msgstr " -n\ta maximálisan megnyitható fájl leírók száma"
+
+#~ msgid " -u\tthe maximum number of user processes"
+#~ msgstr " -u\ta felhasználó által maximálisan elindítható feladatok száma"
+
+#~ msgid " -v\tthe size of virtual memory"
+#~ msgstr " -v\ta virtuális memória mérete"
+
+#~ msgid "If LIMIT is given, it is the new value of the specified resource."
+#~ msgstr "Ha a HATÁR meghatározza akkor azaz értéket használja az erõforrás."
+
+#~ msgid "Otherwise, the current value of the specified resource is printed."
+#~ msgstr "Egyébként megjeleníti a jelenlegi értékét az elõforrásnak."
+
+#~ msgid "If no option is given, then -f is assumed. Values are in 1k"
+#~ msgstr ""
+#~ "Ha opció nélkül indításhoz a '-f' van hozzárendelve.Az értékek Kilobájtban"
+
+#~ msgid "increments, except for -t, which is in seconds, -p, which is in"
+#~ msgstr ""
+#~ "értendõ, kivétel a '-a' értéke mert az másodpercet jelent és a '-p' "
+#~ "amelyik"
+
+#~ msgid "increments of 512 bytes, and -u, which is an unscaled number of"
+#~ msgstr "512 bájtot. A '-u' pedig a folyamatok száma darabban "
+
+#~ msgid "processes."
+#~ msgstr "kihelyezve."
+
+#~ msgid ""
+#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if"
+#~ msgstr ""
+#~ "A felhasználó fájl létrehozási MÓDJÁT állíthatjuk be. Ha a MÓDot elhagyjuk"
+
+#~ msgid ""
+#~ "`-S' is supplied, the current value of the mask is printed. The `-S'"
+#~ msgstr ""
+#~ "vagy a '-S' opciót használjuk akkor a jelenlegi maskot írja ki. A '-S' "
+#~ "opció "
+
+#~ msgid ""
+#~ "option makes the output symbolic; otherwise an octal number is output."
+#~ msgstr ""
+#~ "kimenete a szimbolikus jelentést írja ki egyébként nyolcas "
+#~ "számrendszerben kódolva"
+
+#~ msgid "If MODE begins with a digit, it is interpreted as an octal number,"
+#~ msgstr ""
+#~ "írja ki.Ha a MÓD számmal kezdõdik akkor nyolcas számrendszerben kódolva"
+
+#~ msgid ""
+#~ "otherwise it is a symbolic mode string like that accepted by chmod(1)."
+#~ msgstr ""
+#~ "értelmezi egyébként a szimbolikus módokat használja mint a chmod(1)."
+
+#~ msgid ""
+#~ "Wait for the specified process and report its termination status. If"
+#~ msgstr "Várakozik egy meghatározott feladatra és jelentést készít róla."
+
+#~ msgid "N is not given, all currently active child processes are waited for,"
+#~ msgstr ""
+#~ "Ha az N nincs meghatározva akkor a jelenleg aktív gyermek folyamatra vár"
+
+#~ msgid "and the return code is zero. N may be a process ID or a job"
+#~ msgstr ""
+#~ "és a visszatérési értéke 0. Az N lehet egy folyamat azonosító és egy "
+#~ "munka-"
+
+#~ msgid "specification; if a job spec is given, all processes in the job's"
+#~ msgstr "folyamat meghatározás, ha egy munkafolyamatot ad át akkor az összes"
+
+#~ msgid "pipeline are waited for."
+#~ msgstr "folyamatára várakozik."
+
+#~ msgid "and the return code is zero. N is a process ID; if it is not given,"
+#~ msgstr ""
+#~ "és a visszatérési értéke 0. Az N lehet egy folyamat azonosító ha ez nincs "
+
+#~ msgid "all child processes of the shell are waited for."
+#~ msgstr "megadva a parancsértelmezõ összes gyermek feladatára várakozik."
+
+#~ msgid "The `for' loop executes a sequence of commands for each member in a"
+#~ msgstr "A 'for' egy hurokban elindítja a parancsokat amíg az összes eleme"
+
+#~ msgid ""
+#~ "list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is"
+#~ msgstr ""
+#~ "végig nem futott. Ha az 'in SZAVAK..;'nincs jelen akkor a \"$@\" értékeit"
+
+#~ msgid ""
+#~ "assumed. For each element in WORDS, NAME is set to that element, and"
+#~ msgstr "használja fel.A SZAVAK összes elemét a NÉVhez rendeli és lefuttatja"
+
+#~ msgid "the COMMANDS are executed."
+#~ msgstr "a PARANCSOKAT."
+
+#~ msgid "The WORDS are expanded, generating a list of words. The"
+#~ msgstr "SZAVAK kiválasztása, lista generálása a szavakból"
+
+#~ msgid "set of expanded words is printed on the standard error, each"
+#~ msgstr "Az összegyûjtõt szavakat a standard hibakimenetre küldi, mindegyik"
+
+#~ msgid "preceded by a number. If `in WORDS' is not present, `in \"$@\"'"
+#~ msgstr "besorszámozva. Ha a 'in SZAVAK' nincs jelen akkor a \"$@\""
+
+#~ msgid "is assumed. The PS3 prompt is then displayed and a line read"
+#~ msgstr "használja. A PS3 prompt jelenik meg és szabvány bemenetrõl"
+
+#~ msgid "from the standard input. If the line consists of the number"
+#~ msgstr "olvas. Ha a sorban található valamelyik szám megfelel"
+
+#~ msgid "corresponding to one of the displayed words, then NAME is set"
+#~ msgstr "a megjelenített szavak egyikével akkor azt behelyettesíti a NÉV-be"
+
+#~ msgid "to that word. If the line is empty, WORDS and the prompt are"
+#~ msgstr "Ha a sor üres akkor a SZAVAKAT és a promptot újra megjeleníti"
+
+#~ msgid "redisplayed. If EOF is read, the command completes. Any other"
+#~ msgstr ""
+#~ "Ha EOF jelet olvas be akkor a parancsot befejezi. Minden egyéb helyzetben"
+
+#~ msgid "value read causes NAME to be set to null. The line read is saved"
+#~ msgstr "a NÉV értékét nullára állítja be. A beolvasott sort eltárolja a "
+
+#~ msgid "in the variable REPLY. COMMANDS are executed after each selection"
+#~ msgstr ""
+#~ "REPLY változóba. A parancsot az mindig lefuttatja egészen addig amíg"
+
+#~ msgid "until a break or return command is executed."
+#~ msgstr "meg nem szakítjuk vagy vissza nem tér a parancs."
+
+#~ msgid "`|' is used to separate multiple patterns."
+#~ msgstr "'|' használhatjuk több minta elválasztásához."
+
+#~ msgid ""
+#~ "The if COMMANDS are executed. If the exit status is zero, then the then"
+#~ msgstr ""
+#~ "Az if PARANCS lefuttatása. Ha a kimeneti status nulla akkor a 'then'"
+
+#~ msgid ""
+#~ "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed"
+#~ msgstr " PARANCS-ot lefuttatja. Egyébként az 'elif' PARANCSAIt futtatja le"
+
+#~ msgid ""
+#~ "in turn, and if the exit status is zero, the corresponding then COMMANDS"
+#~ msgstr ""
+#~ "és ha ennek a visszatérési értéke nulla akkor a megfelelõ PARANCSok "
+#~ "lesznek"
+
+#~ msgid ""
+#~ "are executed and the if command completes. Otherwise, the else COMMANDS"
+#~ msgstr ""
+#~ "lefuttatva és ezzel behelyezõdik az 'if' parancs. Egyébként az 'else' ág "
+#~ "PARANCSAI"
+
+#~ msgid ""
+#~ "are executed, if present. The exit status is the exit status of the last"
+#~ msgstr "futnak le (persze ha jelen van). A visszatérési státusz az utolsó"
+
+#~ msgid "command executed, or zero if no condition tested true."
+#~ msgstr "lefutott parancsé vagy nulla ha az 'if' feltétel nem igaz."
+
+#~ msgid "`while' COMMANDS has an exit status of zero."
+#~ msgstr "'while'-ban nem tér vissza nulla kilépési státusszal."
+
+#~ msgid "`until' COMMANDS has an exit status which is not zero."
+#~ msgstr "'until'-ban nem tér vissza nulla kilépési státusszal."
+
+#~ msgid "Create a simple command invoked by NAME which runs COMMANDS."
+#~ msgstr ""
+#~ "Létrehoz egy egyszerû parancsot amit a NÉVvel lehet meghívni és ami "
+#~ "lefuttatja"
+
+#~ msgid "Arguments on the command line along with NAME are passed to the"
+#~ msgstr "a PARANCSOKAT. A parancssorban a NÉV opciói a $0..$N"
+
+#~ msgid "function as $0 .. $n."
+#~ msgstr "változókban jelenik meg."
+
+#~ msgid "entire set of commands."
+#~ msgstr "átirányítás a parancsok halmazának."
+
+#~ msgid "This is similar to the `fg' command. Resume a stopped or background"
+#~ msgstr ""
+#~ "Ez hasonlít az 'fg' parancsra. Folyattatja a megállított vagy háttérbe "
+#~ "rakott"
+
+#~ msgid "job. If you specifiy DIGITS, then that job is used. If you specify"
+#~ msgstr ""
+#~ "munkafolyamatokat. Ha meghatározza a SZÁMOKAT akkor azt munkafolyamatot"
+
+#~ msgid ""
+#~ "WORD, then the job whose name begins with WORD is used. Following the"
+#~ msgstr ""
+#~ "használja. Ha a SZÓT adja meg akkor azokat a folyamatokat használja ami a "
+
+#~ msgid "job specification with a `&' places the job in the background."
+#~ msgstr ""
+#~ "a SZÓval kezdõdik.A munkafolyamat meghatározása egy '&'-re végzõdik akkor "
+#~ "a háttérbe helyezi."
+
+#~ msgid "BASH_VERSION The version numbers of this Bash."
+#~ msgstr "BASH_VERSION A Bash verzió száma."
+
+#~ msgid "CDPATH A colon separated list of directories to search"
+#~ msgstr ""
+#~ "CDPATH Kettõsponttal elválasztott lista azoknak a könyvtáraknak"
+
+#~ msgid "\t\twhen the argument to `cd' is not found in the current"
+#~ msgstr "\t\thelyérõl amiket a 'cd' parancs nem talál meg az aktuális "
+
+#~ msgid "\t\tdirectory."
+#~ msgstr "\t\tkönyvtárban."
+
+#~ msgid ""
+#~ "HISTFILE The name of the file where your command history is stored."
+#~ msgstr ""
+#~ "HISTFILE A fájl neve ahol a saját parancs elõzményeket tárolja."
+
+#~ msgid "HISTFILESIZE The maximum number of lines this file can contain."
+#~ msgstr "HISTFILESIZE Maximális sorok száma amit ez a fájl tartalmazhat."
+
+#~ msgid "HISTSIZE The maximum number of history lines that a running"
+#~ msgstr "HISTSIZE A maximális sorok száma amit a futó"
+
+#~ msgid "\t\tshell can access."
+#~ msgstr "\t\tparancsértelmezõ még elérhet."
+
+#~ msgid "HOME The complete pathname to your login directory."
+#~ msgstr "HOME A teljes útvonala a saját belépési könyvtárnak."
+
+#~ msgid ""
+#~ "HOSTTYPE The type of CPU this version of Bash is running under."
+#~ msgstr "HOSTTYPE A CPU típusa annak a gépeknek ahol a Bash fut."
+
+#~ msgid ""
+#~ "IGNOREEOF Controls the action of the shell on receipt of an EOF"
+#~ msgstr ""
+#~ "IGNOREEOF Ellenõrzi a parancsértelemezõ viselkedését amikor egy EOF"
+
+#~ msgid "\t\tcharacter as the sole input. If set, then the value"
+#~ msgstr ""
+#~ "\t\tkaraktert kap mint önálló bemenet. Ha be van állítva akkor ez az "
+
+#~ msgid "\t\tof it is the number of EOF characters that can be seen"
+#~ msgstr "\t\t érték akkor azt jelenti, hogy hány üres"
+
+#~ msgid "\t\tin a row on an empty line before the shell will exit"
+#~ msgstr "\t\tsor keljen az EOF jel elõtt, hogy kilépjen(alapból 10). Amikor"
+
+#~ msgid "\t\t(default 10). When unset, EOF signifies the end of input."
+#~ msgstr "\t\t nincs beállítva akkor az EOF jelre befejezi a bevitelt"
+
+#~ msgid "MAILCHECK\tHow often, in seconds, Bash checks for new mail."
+#~ msgstr "MAILCHECK\tHány másodpercenként ellenõrizze a Bash az új leveleket."
+
+#~ msgid "MAILPATH\tA colon-separated list of filenames which Bash checks"
+#~ msgstr "MAILPATH\tEgy kettõsponttal elválasztott lista a fájl nevekrõl ahol"
+
+#~ msgid "\t\tfor new mail."
+#~ msgstr "\t\ta Bash ellenõrzi az új leveleket."
+
+#~ msgid "OSTYPE\t\tThe version of Unix this version of Bash is running on."
+#~ msgstr "OSTYPE\t\tA Unix verziója annak a gépnek ahol a Bash fut."
+
+#~ msgid "PATH A colon-separated list of directories to search when"
+#~ msgstr ""
+#~ "PATH Kettõsponttal elválasztott lista azokról a könyvtárakról"
+
+#~ msgid "\t\tlooking for commands."
+#~ msgstr "\t\tahol a Bash keresi a parancsokat."
+
+#~ msgid "PROMPT_COMMAND A command to be executed before the printing of each"
+#~ msgstr "PROMPT_COMMAND A parancs amit mindig lefuttat mielõtt kiírja "
+
+#~ msgid "\t\tprimary prompt."
+#~ msgstr "\t\tmielõtt megjelenítené az elsõdleges promptot."
+
+#~ msgid "PS1 The primary prompt string."
+#~ msgstr "PS1 Az elsõdleges prompt sztringje."
+
+#~ msgid "PS2 The secondary prompt string."
+#~ msgstr "PS2 másodlagos prompt sztringje."
+
+#~ msgid "TERM The name of the current terminal type."
+#~ msgstr "TERM A jelenlegi terminál típusának a neve."
+
+#~ msgid "auto_resume Non-null means a command word appearing on a line by"
+#~ msgstr ""
+#~ "auto_resume A kitöltött változó azt jelenti a kiadott parancsokat"
+
+#~ msgid "\t\titself is first looked for in the list of currently"
+#~ msgstr "\t\telõbb megnézi a jelenleg megállított munka"
+
+#~ msgid "\t\tstopped jobs. If found there, that job is foregrounded."
+#~ msgstr "\t\tfolyamatok között.Ha megtalálja akkor azt folytatja."
+
+#~ msgid "\t\tA value of `exact' means that the command word must"
+#~ msgstr "\t\tAz `exact' értéke azt jelenti, hogy a parancsnak teljesen meg"
+
+#~ msgid "\t\texactly match a command in the list of stopped jobs. A"
+#~ msgstr "\t\tkell egyezni a leállított munkafolyamat nevével."
+
+#~ msgid "\t\tvalue of `substring' means that the command word must"
+#~ msgstr "\t\tA 'substring' érték pedig azt jelenti, hogy a parancsnak csak "
+
+#~ msgid "\t\tmatch a substring of the job. Any other value means that"
+#~ msgstr ""
+#~ "\t\tegy része is elegendõ az egyezéshez.Minden egyéb érték azt jelenti,"
+
+#~ msgid "\t\tthe command must be a prefix of a stopped job."
+#~ msgstr ""
+#~ "\t\t hogy a parancs elõtéte kell hogy legyen a legállított munkafolyamat."
+
+#~ msgid "command_oriented_history"
+#~ msgstr "command_oriented_history"
+
+#~ msgid ""
+#~ " Non-null means to save multiple-line commands together on"
+#~ msgstr ""
+#~ " A változó kitöltése azt jelenti, hogy több soros "
+#~ "parancsokat"
+
+#~ msgid " a single history line."
+#~ msgstr " egy sorba rakja az elõzmények közé."
+
+#~ msgid "histchars Characters controlling history expansion and quick"
+#~ msgstr ""
+#~ "histchars Ezekkel a karakterekkel befolyásolható az elõzmények gyors"
+
+#~ msgid "\t\tsubstitution. The first character is the history"
+#~ msgstr "\t\tbehelyettesítése. Az elõzmények elsõ karakterre"
+
+#~ msgid "\t\tsubstitution character, usually `!'. The second is"
+#~ msgstr "\t\ta behelyettesítõ karakter általában '!'. A második"
+
+#~ msgid "\t\tthe `quick substitution' character, usually `^'. The"
+#~ msgstr "\t\ta gyors behelyettesítést jelenti általában `^' jelenti. A"
+
+#~ msgid "\t\tthird is the `history comment' character, usually `#'."
+#~ msgstr "\t\tharmadik a elõzmények megjegyzés karakterre általában '#'."
+
+#~ msgid "HISTCONTROL\tSet to a value of `ignorespace', it means don't enter"
+#~ msgstr "HISTCONTROL\tA változó `ignorespace' értéke azt jelenti, hogy"
+
+#~ msgid "\t\tlines which begin with a space or tab on the history"
+#~ msgstr ""
+#~ "\t\tazokat a sorokat amelyek helyjellel vagy tabulátorral kezdõdnek "
+#~ "kihagyja az"
+
+#~ msgid "\t\tlist. Set to a value of `ignoredups', it means don't"
+#~ msgstr "\t\telõzmények közül.Az `ignoredups' jelentése"
+
+#~ msgid "\t\tenter lines which match the last entered line. Set to"
+#~ msgstr "\t\tha a beírt sor azonos az elõzõvel akkor nem rögzíti.Ha "
+
+#~ msgid "\t\t`ignoreboth' means to combine the two options. Unset,"
+#~ msgstr ""
+#~ "\t\t`ignoreboth'-ra állítjuk be akkor a két tulajdonságot ötvözi."
+#~ "Leállítása"
+
+#~ msgid "\t\tor set to any other value than those above means to save"
+#~ msgstr "\t\tvagy már ha értékre állítjuk be akkor a mentés során"
+
+#~ msgid "\t\tall lines on the history list."
+#~ msgstr "\t\tminden sor bele kerül az elõzmények közé."
+
+#~ msgid "Toggle the values of variables controlling optional behavior."
+#~ msgstr "A változok értékeivel szabályozhatjuk az opciók viselkedését."
+
+#~ msgid "The -s flag means to enable (set) each OPTNAME; the -u flag"
+#~ msgstr "A '-s'-el engedélyezhetjük az összes OPTNEVEt, a '-u'-val pedig"
+
+#~ msgid "unsets each OPTNAME. The -q flag suppresses output; the exit"
+#~ msgstr "letilthatjuk õket. A '-q' opcióval a kimenetet letilthatjuk el így"
+
+#~ msgid "status indicates whether each OPTNAME is set or unset. The -o"
+#~ msgstr "csak a visszatérési értékek jelzik az OPTNEVEk állapotát. A '-o'"
+
+#~ msgid "option restricts the OPTNAMEs to those defined for use with"
+#~ msgstr "opcióval rögzítheti a OPTNEVEK-et ezeket a meghatározásokat"
+
+#~ msgid "`set -o'. With no options, or with the -p option, a list of all"
+#~ msgstr ""
+#~ "a 'set -o' használhatjuk. Opciók nélkül vagy a 'p' opció kilistázza az "
+#~ "összes"
+
+#~ msgid "settable options is displayed, with an indication of whether or"
+#~ msgstr "beállítható opciót jelezve azokat amik már be vannak állítva és"
+
+#~ msgid "not each is set."
+#~ msgstr "azokat amik nincsenek beállítva."
diff --git a/po/id.gmo b/po/id.gmo
new file mode 100644
index 0000000..53df6ad
--- /dev/null
+++ b/po/id.gmo
Binary files differ
diff --git a/po/id.po b/po/id.po
new file mode 100644
index 0000000..4084842
--- /dev/null
+++ b/po/id.po
@@ -0,0 +1,6296 @@
+# Pesan Bahasa Indonesia untuk bash
+# Copyright (C) 2008 Free Software Foundation, Inc.
+# This file is distributed under the same license as the bash package.
+# Arif E. Nugroho <arif_endro@yahoo.com>, 2008, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bash 4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2009-03-21 11:40+0700\n"
+"Last-Translator: Arif E. Nugroho <arif_endro@yahoo.com>\n"
+"Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "array subscript buruk"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr "%s: tidak dapat mengubah index ke array yang berassosiasi"
+
+#: arrayfunc.c:480
+#, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: kunci array assosiasi tidak valid"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: tidak dapat mengassign ke index tidak-numeric"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr "%s: %s: harus menggunakan subscript ketika memberikan assosiasi array"
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: tidak dapat membuat: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr "bash_execute_unix_command: tidak dapat menemukan keymap untuk perintah"
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: bukan karakter whitespace (spasi) pertama ditemukan `\"'"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "tidak menutup '%c' dalam %s"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: hilang pemisah colon"
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "'%s': nama keymap tidak valid"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr "pengubahan baris tidak aktif"
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "'%s': nama keymap tidak valid"
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: tidak dapat membaca: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "'%s': tidak dapat melepaskan"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "'%s': nama fungsi tidak dikenal"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s tidak terikat ke kunci apapun.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s dapat dipanggil melalui "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr "jumlah loop"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "hanya berarti dalam sebuah `for', `while', atau `until'loop"
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+"Mengembalikan konteks dari panggilan subroutine saat ini.\n"
+" \n"
+" Tanpa EXPR, kembali "
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "HOME tidak diset"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "OLDPWD tidak diset"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr "baris %d: "
+
+#: builtins/common.c:139 error.c:261
+#, c-format
+msgid "warning: "
+msgstr "peringatan: "
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr "%s: penggunaan: "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "terlalu banyak argumen"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: pilihan membutuhkan sebuah argumen"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: argumen numeric dibutuhkan"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: tidak ditemukan"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: pilihan tidak valid"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: nama pilihan tidak valid"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "`%s': bukan sebuah identifier yang valid"
+
+#: builtins/common.c:238
+msgid "invalid octal number"
+msgstr "nomor oktal tidak valid"
+
+#: builtins/common.c:240
+msgid "invalid hex number"
+msgstr "nomor hexa tidak valid"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "nomor tidak valid"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: spesifikasi sinyal tidak valid"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "`%s': bukan sebuah pid atau spesifikasi pekerjaan yang valid"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: variabel baca-saja"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s diluar jangkauan"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "argumen"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s diluar jangkauan"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: tidak ada pekerjaan seperti itu"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: tidak ada pengontrol kerja"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "tidak ada pengontrol kerja"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: terbatas"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "terbatas"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: bukan sebuah builtin shell"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "gagal menulis: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr "error menentukan atribut terminal: %s"
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr "error mendapatkan atribut terminal: %s"
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: error mengambil direktori saat ini: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: spesifikasi pekerjaan ambigu"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: nama aksi tidak valid"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: tidak ada spesifikasi completion"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr ""
+"peringatan: pilihan -F mungkin tidak bekerja seperti yang anda harapkan"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr ""
+"peringatan: pilihan -C mungkin tidak bekerja seperti yang anda harapkan"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr "saat ini sedang tidak menjalankan fungsi completion"
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "hanya dapat digunakan dalam sebuah fungsi"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "tidak dapat menggunakan `-f' untuk membuat fungsi"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: fungsi baca-saja"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: tidak dapat menghapus variabel array secara ini"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr "%s: tidak dapat mengubah assosiasi ke array index"
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "dynamic loading tidak tersedia"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "tidak dapat membuka object shared %s: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "tidak dapat menemukan %s dalam shared object %s: %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: bukan dinamically loaded"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: tidak dapat menghapus: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: bukan sebuah direktori"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: bukan sebuah file umum"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: file terlalu besar"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: tidak dapat menjalankan berkas binary"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: tidak dapat menjalankan: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr "logout\n"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "bukan sebuah login shell: gunakan `exit'"
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "Ada pekerjaan yang terhenti.\n"
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr "Ada pekerjaan yang sedang berjalan.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "perintah tidak ditemukan"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "spesifikasi sejarah"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: tidak dapat membuka file sementara: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr "sekarang"
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "pekerjaan %d dimulai tanpa pengontrol pekerjaan"
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: pilihan tidak legal -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: pilihan membutuhkan sebuah argumen -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "hashing dinonaktifkan"
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: tabel hash kosong\n"
+
+#: builtins/hash.def:244
+#, c-format
+msgid "hits\tcommand\n"
+msgstr "tekan\tperintah\n"
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Perintah shell cocok dengan kata kunci `"
+msgstr[1] "Perintah shell cocok dengan kata kunci `"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"tidak ada topik bantuan yang cocok dengan `%s'. Coba `help help' atau 'man -"
+"k %s' atau `info %s'."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: tidak dapat membuka: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"Perintah shell ini didefinisikan secara internal. Ketik `help' untuk melihat "
+"daftar ini.\n"
+"Ketik `help nama' untuk informasi lebih lanjut mengenai fungsi `nama'.\n"
+"Gunakan `info bash' untuk informasi lebih lanjut mengenasi shell secara "
+"umum.\n"
+"Gunakan `man -k' atau `info' untuk informasi lebih lanjut mengenai perintah "
+"yang tidak ada dalam daftar ini.\n"
+"\n"
+"Sebuah asterisk (*) disebelah dari nama berarti perintah tersebut tidak "
+"aktif.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "tidak dapat menggunakan lebih dari satu pilihan dari -anrw"
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "posisi sejarah"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: expansi sejarah gagal"
+
+#: builtins/inlib.def:71
+#, c-format
+msgid "%s: inlib failed"
+msgstr "%s: inlib gagal"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "tidak ada pilihan lain yang diperbolehkan dengan `-x'"
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: argumen harus diproses atau ID pekerjaan"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Kesalahan tidak diketahui"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "diduga sebuah ekspresi"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: bukan sebuah variabel array"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: spesifikasi file deskripsi tidak valid"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: file deskriptor %s tidak valid"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, c-format
+msgid "%s: invalid line count"
+msgstr "%s: jumlah baris tidak valid"
+
+#: builtins/mapfile.def:277
+#, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: asal array tidak valid"
+
+#: builtins/mapfile.def:294
+#, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: nama aksi tidak valid"
+
+#: builtins/mapfile.def:326
+msgid "empty array variable name"
+msgstr "nama variabel array kosong"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr "bantuan array variabel dibutuhkan"
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "`%s': hilang karakter format"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "`%c': karakter format tidak valid"
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr "peringatan: %s: %s"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "hilang digit hexa untuk \\x"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "tidak ada direktori lain"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<direktori saat ini>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr "direktori stack kosong"
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr "index direktori stack"
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+"Menampilkan daftar dari direktori yang diingat saat ini. Direktori\n"
+" menemukan jalannya kedalam daftar dengan perintah `pushd'; anda dapat "
+"memperoleh\n"
+" backup melalui daftar dengan perintah `popd'.\n"
+" \n"
+" Pilihan:\n"
+" -c\tmenghapus direktori stact dengan menghapus seluruh elemen\n"
+" -l\tjangan menampilkan versi dengan tilde dari direktori relative\n"
+" \tke direkori rumah anda\n"
+" -p\tmenampilkan direktori stack dengan satu masukan per baris\n"
+" -v\tmenampilkan direktori stack dengan satu masukan per baris diawali\n"
+" \tdengan posisnya dalam stack\n"
+" \n"
+" Argumen:\n"
+" +N\tMenampilkan masukan ke N dihitung dari kiri dari daftar yang "
+"ditampilkan oleh\n"
+" \tdirs ketika dipanggil tanpa pilihan, dimulai dari nol.\n"
+" \n"
+" -N\tMenampilkan masukan ke N dihitung dari kanan dari daftar yang "
+"ditampilkan oleh\n"
+" \tdirs ketika dipanggil tanpa pilihan, dimulai dari nol."
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Menambahkan sebuah direktori ke top dari direktori stack, atau merotasi\n"
+" stack, membuah top baru dari stack dari working direktori saat ini.\n"
+" Tanpa argumen, menukar top dari dua direktori.\n"
+" \n"
+" Pilihan:\n"
+" -n\tmenekan perubahan normal dari direktori ketika menambahkan "
+"direktori\n"
+" \tke stack, jadi hanya stack yang dimanipulasi.\n"
+" \n"
+" Argumen:\n"
+" +N\tMerotasi stack sehingga direktori ke N (dihitung\n"
+" \tdari kiri dari daftar yang terlihat oleh `dirs', dimulai dengan\n"
+" \tnol) adalah di top.\n"
+" \n"
+" -N\tMerotasi stack sehingga direktori ke N (dihitung\n"
+" \tdari kanan dari daftar yang terliha oleh `dirs', dimulai dengan\n"
+" \tnol) adalah di top.\n"
+" \n"
+" dir\tenambahkan DIR ke direktori stack di puncak, membuatnya\n"
+" \tcurrent working directory.\n"
+" \n"
+" Builtin `dirs' menampilkan direktori stack."
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Manghapus masukan dalam direktori stack. Tanpa argumen,\n"
+" menghapus top direktori dari stack, dan cd's ke top\n"
+" direktori baru.\n"
+" \n"
+" Pilihan:\n"
+" -n\tmenekan perubahan normal dari direktori ketika menghapus direktori\n"
+" \tdari stack, jadi hanya stack yang dimanipulasi.\n"
+" \n"
+" Argumen:\n"
+" -N\tmenghapus masukan ke N dihitung dari kiri dari daftar\n"
+" \tyang ditampilkan oleh `dirs', dimulai dari nol. Sebagai contoh: `popd "
+"+0'\n"
+" \tmenghapus direktori terakhir, `popd -1' sebelum terakhir.\n"
+" \n"
+" Builtin `dirs' menampilkan direktori stack."
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: spesifikasi timeout tidak valid"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "error baca: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr "hanya dapat `return' dari sebuah fungsi atau script yang disource"
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "tidak dapat secara simultan unset sebuah fungsi dan sebuah variable"
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: tidak dapat unset"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: tidak dapat unset: baca-saja %s"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: bukan sebuah variabel array"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: bukan sebuah fungsi"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "shift terhitung"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr "tidak dapat menset dan menunset pilihan shell secara bersamaan"
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: nama pilihan shell tidak valid"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "argumen nama file dibutuhkan"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: berkas tidak ditemukan"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "tidak dapat suspend"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "tidak dapat suspend sebuah login shell"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "%s sudah dialiasi ke `%s'\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s adalah sebuah shell dengan kata kunci\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s adalah sebuah fungsi\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "%s adalah sebuah shell builtin\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s adalah %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "%s memiliki hash (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s: argumen limit tidak valid"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "`%c': perintah buruk"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: tidak dapat get limit: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr "batas"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: tidak dapat memodifikasi batas: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "nomor oktal"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "`%c': operator mode symbolic tidak valid"
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "`%c': mode karakter symbolic tidak valid"
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr " baris "
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "perintah terakhir: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "membatalkan..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "perintah error tidak diketahui"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "tipe perintah buruk"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "konektor buruk"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "lompat buruk"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: variabel tidak terikat"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "kehabisan waktu menunggu masukan: otomatis-keluar\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "tidak dapat menyalurkan masukan standar dari /dev/null: %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "TIMEFORMAT: `%c': karakter format tidak valid"
+
+#: execute_cmd.c:2075
+msgid "pipe error"
+msgstr "pipe error"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr ""
+"%s: dibatasi: tidak dapat menspesifikasikan '/' dalam nama nama perintah"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: perintah tidak ditemukan"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: interpreter buruk"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "tidak dapat menduplikasikan fd %d ke fd %d"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "expresi level rekursi terlewati"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "rekursi stack underflow"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "syntax error dalam expresi"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "mencoba menempatkan ke bukan sebuah variabel"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "dibagi oleh 0"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "bug: tanda expassign buruk"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "`:' diharapkan untuk sebuah pernyataan kondisional"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "eksponen kurang dari 0"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr "idenfier diharapkan setelah pre-increment atau pre-decrement"
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "hilang `)'"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "syntax error: operand diharapkan"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "syntax error: operator arithmetic tidak valid"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s%s%s: %s (error token adalah \"%s\")"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "basis arithmetic tidak valid"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "nilai terlalu besar untuk basis"
+
+#: expr.c:1329
+#, c-format
+msgid "%s: expression error\n"
+msgstr "%s: expresi error\n"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getcwd: tidak dapat mengakses direktori orang tua"
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "tidak dapat mereset mode nodelay untuk fd %d"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+"tidak dapat mengalokasikan berkas deskripsi bari untuk masukan bash dari fd %"
+"d"
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "simpan bash_input: buffer telah ada untuk fd %d baru"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr "start_pipeline: pgrp pipe"
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr "forked pid %d terlihat dalam pekerjaan yang sedang berjalan %d"
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "menghapus pekerjaan yang terhenti %d dengan proses grup %ld"
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr "add_process: process %5ld (%s) dalam the_pipeline"
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr "add_process: pid %5ld (%s) ditandai dengan tetap hidup"
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: %ld: tidak ada pid seperti itu"
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr "sinyal %d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Selesai"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Terhenti"
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr "Terhenti(%s)"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "Berjalan"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Selesai(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "Keluar %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Status tidak diketahui"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(core didump) "
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr " (wd: %s)"
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "anak setpgid (%ld ke %ld)"
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait: pid %ld bukan sebuah anak dari shell ini"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "wait_for: Tidak ada catatan untuk proses %ld"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job: pekerjaan %d terhenti"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: pekerjaan telah selesai"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: pekerjaan %d sudah berjalan di belakang (background)"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, c-format
+msgid "%s: line %d: "
+msgstr "%s: baris %d: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr " (core didump)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(wd sekarang: %s)\n"
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_job_control: getpgrp gagal"
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_job_control: baris disiplin"
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_job_control: setpgid"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr "tidak dapat menset terminal proses grup (%d)"
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "tidak ada pengontrol pekerjaan dalam shell ini"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc: gagal assertion: %s\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"malloc: %s:%d: assertion rusak\r\n"
+
+#: lib/malloc/malloc.c:313
+msgid "unknown"
+msgstr "tidak diketahui"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr "malloc: blok dalam daftar bebas clobbered"
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free: dipanggil dengan argumen blok yang sudah dibebaskan"
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free: dipanggil dengan argumen blok yang tidak dialokasikan"
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr "free: underflow terdeteksi; mh_nbytes diluar dari jangkauan"
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free: awal dan akhir dari ukuran potongan berbeda"
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc: dipanggil dengan argumen blok yang tidak teralokasikan"
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr "realloc: underflow terdeteksi; my_nbytes diluar dari jangkauan"
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "realloc: awal dan akhir dari ukuran potongan berbeda"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr "register_alloc: tabel alokasi penuh dengan FIND_ALLOC?\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr ""
+"register_alloc: %p sudah berada dalam tabel sepertinya sudah dialokasikan?\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "register_free: %p sudah berada dalam tabel sebagai bebas?\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "basis tidak valid"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: host tidak diketahui"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: layanan tidak valid"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: spesifikasi jalur network buruk"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "operasi jaringan tidak dilayani"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc: %s:%d: tidak dapat mengalokasikan %lu bytes"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc: %s:%d: tidak dapat mengalokasikan %lu bytes"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Anda memiliki surat dalam $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Anda memiliki surat baru dalam $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "Surat dalam %s telah dibaca\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "syntax error: membutuhkan ekspresi arithmetic"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "syntax error: `;' tidak terduga"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "syntax error: `((%s))'"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: tipe instruksi buruk %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+"dokumen-disini di baris %d dibatasi oleh akhir-dari-berkas (diinginkan `%s')"
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr "make_redirection: instruksi redireksi `%d' diluar dari jangkauan"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "EOF tidak terduga ketika mencari untuk pencocokan `%c'"
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "EOF tidak terduga ketika mencari untuk `]]'"
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "syntax error dalam ekspresi kondisional: tanda `%s' tidak terduga"
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "syntax error dalam ekspresi kondisional"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "tanda `%s' tidak terduga, diduga `)'"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "diduga `)'"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "argumen tidak terduga `%s' ke operator kondisional unary"
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "argumen tidak terduga untuk operasi unary kondisional"
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "tanda `%s' tidak terduga, operator binary kondisional diduga"
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "operator binary kondisional diduga"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "argumen `%s' tidak terduga ke operator binary kondisional"
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "argumen tidak terduga ke operasi binary kondisional"
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "tanda `%c' tidak terduga dalam perintah kondisional"
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "tanda `%s' tidak terduga dalam perintah kondisional"
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "tanda %d tidak terduga dalam perintah kondisional"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "syntax error didekat tanda `%s' yang tidak terduga"
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "syntax error didekat `%s'"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "syntax error: tidak terduga diakhir dari berkas"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "syntax error"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Gunakan \"%s\" untuk meninggalkan shell.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "EOF tidak terduga ketika mencari untuk pencocokan ')'"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "completion: fungsi `%s' tidak ditemukan"
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr "progcomp_insert: %s: NULL COMPSPEC"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: konektor buruk `%d'"
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d: file deskriptor %s tidak valid"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "cprintf: '%c': format karakter tidak valid"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "berkas deskripsi diluar dari jangkauan"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: redirect ambigu"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: tidak dapat menulis berkas yang sudah ada"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: restricted: tidak dapat meredirect keluaran"
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "tidak dapat membuat berkas sementara untuk dokumen disini: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: tidak dapat meng-assign daftar kedalam anggoya array"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "/dev/(tcp|udp)/host/port tidak dilayani tanpa jaringan"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "redirection error: tidak dapat menduplikasi fd"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "tidak dapat menemukan /tmp, tolong buat!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "/tmp harus berupa sebuah nama direktori yang valid"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: pilihan tidak valid"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Aku tidak memiliki nama!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU bash, versi %s-(%s)\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Penggunaan:\t%s [GNU pilihan panjang] [pilihan] ...\n"
+"\t%s [GNU pilihan panjang] [pilihan] berkas-script ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "GNU pilihan panjang:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Pilihan shell:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD atau -c perintah atau -O shopt_option\t\t(hanya pemanggilan)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s atau pilihan -o\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"Ketik `%s -c \"help set\"' untuk informasi lebih lanjut mengenai pilihan "
+"shell.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"Ketik `%s -c help' untuk informasi lebih lanjut mengenai perintah builting "
+"shell.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "Gunakan perintah 'bashbug' untuk melaporkan bugs.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d: operasi tidak valid"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Sinyal palsu"
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Hangup"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Interupsi"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "Berhenti"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Instruksi ilegal"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "BPT trace/trap"
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "Instruksi ABORT"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "Instruksi EMT"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Floating point exception"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "Dibunuh"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "Bus error"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Kesalahan segmentasi"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Pemanggilan sistem buruk"
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "Pipe rusak"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Alarm clock"
+
+#: siglist.c:111
+msgid "Terminated"
+msgstr "Selesai"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "Kodisi IO penting"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Terhenti (sinyal)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "Melanjutkan"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "Anak tewas atau berhenti"
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Terhenti (tty input)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Terhenti (tty output)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "I/O siap"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "Batas CPU"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "Batas berkas"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "Alarm (virtual)"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "Alarm (profile)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Window berubah"
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr "Catatan terkunci"
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "Sinyal pengguna 1"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "Sinyal pengguna 2"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "HFT masukan data tertunda"
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "Kelihatannya akan terjadi kegagalan power suply"
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "Kelihatannya akan terjadi kerusakan sistem"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "pindahkan proses ke CPU lain"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "error dalam pemrograman"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "HFT mode monitoring diberikan"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "HFT mode monitoring ditarik"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "HFTP sound sequence telah selesai"
+
+#: siglist.c:215
+msgid "Information request"
+msgstr "Permintaan informasi"
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Sinyal tidak diketahui #"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Sinyal tidak diketahui #%d"
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "substitusi buruk: tidak ada penutupan `%s' dalam %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: tidak dapat meng-assign daftar kedalam anggoya array"
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "tidak dapat membuat pipe untuk proses substitusi"
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "tidak dapat membuat anak untuk proses substitusi"
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "tidak dapat membuka named pipe %s untuk membaca"
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "tidak dapat membukan named pipe %s untuk menulis"
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "tidak dapat menduplikasi nama pipe %s sebagai fd %d"
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "tidak dapat membuat pipe untuk perintah substitusi"
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr "tidak dapat membuat anak untuk perintah substitusi"
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "command_substitute: tidak dapat menduplikasikan pipe sebagi fd 1"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: parameter kosong atau tidak diset"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: substring expresi < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: substitusi buruk"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: tidak dapat meng-assign dengan cara ini"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "substitusi buruk: tidak ada penutupan \"\" dalam %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "tidak cocok: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "argumen diharapkan"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: expresi integer diduga"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "')' diduga"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "`)' diduga, ditemukan %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: operator unary diduga"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: operator binary diduga"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "hilang `]'"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "nomor sinyal tidak valid"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps: nilai buruk dalam trap_list[%d]: %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+"run_pending_traps: sinyal handler adalah SIG_DFL, mengirimkan kembali %d (%"
+"s) kediri sendiri"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: sinyal buruk %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "error mengimpor definisi fungsi untuk `%s'"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "level shell (%d) terlalu tinggi, mereset ke 1"
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr "make_local_variable: tidak ada context fungsi di scope ini"
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr "all_local_variables: tidak ada context fungsi dalam scope ini"
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: parameter kosong atau tidak diset"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "karakter %d tidak valid dalam exporstr untuk %s"
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "bukan `=' dalam exportstr untuk %s"
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+"pop_var_context: kepala dari shell_variables bukan sebuah fungsi cbntext"
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr "pop_var_context: bukan global_variable context"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+"pop_scope: kepala dari shell_variables bukan sebuah scope lingkungan "
+"sementara"
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: tidak dapat membuka: %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d: file deskriptor %s tidak valid"
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Hak Cipta (C) 2009 Free Software Foundation, Inc."
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Lisensi GPLv3+: GNU GPL versi 3 atau sesudahnya <http://gnu.org/licenses/gpl."
+"html>\n"
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU bash, versi %s (%s)\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+"Ini adalah perangkat lunak bebas; anda bebas untuk mengubah dan "
+"mendistribusikannya.\n"
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr "TIDAK ADA GARANSI, selama masih diijinkan oleh hukum yang berlaku.\n"
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Hak Cipta (C) 2009 Free Software Foundation, Inc."
+
+#: version2.c:87
+#, fuzzy, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Lisensi GPLv3+: GNU GPL versi 3 atau sesudahnya <http://gnu.org/licenses/gpl."
+"html>\n"
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: tidak dapat mengalokasikan %lu bytes (%lu bytes teralokasi)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: tidak dapat mengalokasikan %lu bytes"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+"xmalloc: %s:%d: tidak dapat mengalokasikan %lu bytes (%lu bytes teralokasi)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: %s: %d: tidak dapat teralokasi %lu bytes"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [name[=nilai] ... ]"
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] name [nama ...]"
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+"bind [-lpvsPVS] [-m keymap] [-f nama berkas] [-q nama] [-u nama] [-r keyseq] "
+"[-x keyseq:perintah-shell] [keyseq:readline-function atau readline-command]"
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [n]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [n]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [shell-builtin [arg ...]]"
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr "pemanggil [expr]"
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-L|-P] [direktori]"
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr "pwd [-LP]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr "benar"
+
+#: builtins.c:72
+msgid "false"
+msgstr "salah"
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "perintah [-pVv] perintah [argumen ...]"
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-aAfFilrtux] [-p] [name[=nilai] ...]"
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-aAfFilrtux] [-p] name[=nilai] ..."
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr "local [pilihan] name[=nilai] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [arg ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [arg ...]"
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-a] [-dnps] [-f nama berkas] [name ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [argumen ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts nama optstring [arg]"
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a nama] [perintah [argumen ...]] [redireksi ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [n]"
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr "logout [n]"
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+"fc [-e ename] [-lnr] [pertama] [terakhir] atau fc -s [pat=rep] [perintah]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [spesifikasi pekerjaan]"
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr "bg [spesifikasi pekerjaan ...]"
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-lr] [-p nama jalur] [-dt] [nama ...]"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "bantuan [-ds] [pola ...]"
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"sejarah [-c] [-d ofset] [n] atau history -anrw [nama berkas] atau history -"
+"ps arg [arg...]"
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr "jobs [-lnprs] [spesifikasi pekerjaan ...] atau jobs -x perintah [args]"
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [-h] [-ar] [spesifikasi pekerjaan ...]"
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s spesifikasi sinyal | -n nomor sinyal | -sigspec] pid | jobsepc ... "
+"atau kill -l [sigspec]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "biarkan arg [argumen ...]"
+
+#: builtins.c:136
+#, fuzzy
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+"read [-ers] [-a array] [-d pembatas] [-i text] [-n nchars] [-p prompt] [-t "
+"timeout] [-u fd] [name ...]"
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [-abefhkmnptuvxBCHP] [-o nama-pilihan] [argumen ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [name ...]"
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-fn] [name[=nilai] ...] atau export -p"
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-af] [name[=nilai] ...] atau readonly -p"
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr "shift [n]"
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr "source nama berkas [argumen]"
+
+#: builtins.c:152
+msgid ". filename [arguments]"
+msgstr ". nama berkas [argumen]"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [expr]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ arg... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "kali"
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [-lp] [[arg] spesifikasi sinyal ...]"
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-afptP] nama [name ...]"
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdefilmnpqrstuvx] [batas]"
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-p] [-S] [mode]"
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr "wait [id]"
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr "wait [pid]"
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for NAMA [in WORDS ...] ; do PERINTAH; done"
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for (( exp1; exp2; exp3 )); do PERINTAH; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select NAMA [ in WORDS ... ;] do PERINTAH; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr "time [-p] pipeline"
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case WORD in [POLA [| POLA]...) PERINTAH ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if PERINTAH; then PERINTAH; [ elif PERINTAH; then PERINTAH; ]... [ else "
+"PERINTAH; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while PERINTAH; do PERINTAH; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until PERINTAH; do PERINTAH; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr "coproc [NAMA] perintah [redireksi]"
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "function name { PERINTAH; } atau name () { PERINTAH ; }"
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr "{ PERINTAH ; }"
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr "job_spec [&]"
+
+#: builtins.c:206
+msgid "(( expression ))"
+msgstr "(( expressi ))"
+
+#: builtins.c:208
+msgid "[[ expression ]]"
+msgstr "[[ expressi ]]"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr "variabel - Nama dan arti dari beberapa shell variabel"
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [-n] [+N | -N | dir]"
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [-n] [+N | -N]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o] [optname ...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr "printf [-v var] format [argumen]"
+
+#: builtins.c:229
+#, fuzzy
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+"complete [-abcdefgjksuv] [-pr] [-o pilihan] [-A action] [-G globpat] [-W "
+"daftar kata] [-F fungsi] [-C perintah] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+"compgen [-abcdefgjksuv] [-o pilihan] [-A aksi] [-G globpat] [-W wordlist] [-"
+"F fungsi] [-C perintah] [-X filterpat] [-P prefix] [-S suffix] [word]"
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "compopt [-o|+o pilihan] [nama ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"mapfile [-n jumlah] [-O asal] [-s jumlah] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"readarray [-n jumlah] [-O asal] [-s jumlah] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"Definisikan atau tampilkan aliases.\n"
+" \n"
+" `alias' dengan tanpa argumen atau dengan pilihan -p menampilkan daftar\n"
+" dari aliases dalam bentuk alias NAMA=NILAI di keluaran standar.\n"
+" \n"
+" Jika tidak, sebuah alias didefinisikan untuk setiap NAMA yang NILAI-nya "
+"diberikan.\n"
+" sebuah tambahan spasi dalam NILAI menyebabkan kata selanjutnyan untuk "
+"diperikasi untuk\n"
+" pengganti alias ketika alias diexpand.\n"
+" \n"
+" Pilihan:\n"
+" -p\tTampilkan seluruh alias yang terdefinisi dalam format yang "
+"berguna\n"
+" \n"
+" Status Keluar:\n"
+" alias mengembalikan true sampai sebuah NAMA diberikan yang mana belum "
+"ada alias yang\n"
+" terdefinisi."
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Hapus setiap NAMA dari daftar yang mendefinisikan aliases.\n"
+" \n"
+" Pilihan:\n"
+" -a\thapus semua definisi alias.\n"
+" \n"
+" Mengembalikan sukses kecuali sebuah NAMA bukan alias yang sudah ada."
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+"Set Readline kunci pengikat dan variabel.\n"
+" \n"
+" Ikat sebuah urutan kunci ke fungsi readline atau sebuah macro, atau set\n"
+" sebuah variabel readline. Argumen bukan-pilihan syntax yang equivalent\n"
+" yang ditemukan dalam ~/.inputrc, tetapi harus dilewatkan sebagai sebuah "
+"argumen tunggal:\n"
+" yang terikat '\"\\C-x\\C-r\": membaca kembali berkas inisialisasi.\n"
+" \n"
+" Pilihan:\n"
+" -m keymap Gunakan `keymap' sebagai keymap untuk durasi dari "
+"perintah\n"
+" ini. Nama keymap yang diterima adalah emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, dan vi-insert.\n"
+" -l Daftar dari nama fungsi.\n"
+" -p Daftar dari nama fungsi dan bindings.\n"
+" -p Daftar dari fungsi dan bindings dalam bentuk yang "
+"dapat digunakan sebagai\n"
+" masukan.\n"
+" -S Daftar urutan kunci yang memanggil macros "
+"dannilainya\n"
+" -s Daftar urutan kunci yang memanggil macros "
+"dannilainya\n"
+" dalam sebuah bentuk yang dapat digunakan sebagai "
+"sebuah masukan. -V Daftar nama variabel dan nilai\n"
+" -v Daftar nama variabel dan nilai dalam bentuk yang "
+"dapat digunakan\n"
+" sebagai masukan.\n"
+" -q nama-fungsi Minta tentang kunci mana yang dipanggil oleh fungsi "
+"yang disebut.\n"
+" -u nama-fungsi Unbind semua kunci yang terikat dengan nama-"
+"fungsi.\n"
+" -r keyseq Hapus binding untuk KEYSEQ.\n"
+" -f namafile Baca kunci bindings dari NAMAFILE.\n"
+" -x keyseq:shell-command\tMenyebabkan SHELL-COMMAND untuk dijalankan "
+"ketika\n"
+" \t\t\t\tKEYSEQ dimasuki.\n"
+" \n"
+" Status Keluar:\n"
+" bind memberikan kembalian 0 kecuali sebuah pilihan tidak dikenal "
+"diberikan atau sebuah error terjadi."
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Keluar dari for, while, atau until loops.\n"
+" \n"
+" Keluar untuk FOR, WHILE atau UNTIL loop. Jika N dispesifikasikan, keluar "
+"N yang melingkupi\n"
+" loops.\n"
+" \n"
+" Status Keluar:\n"
+" Status keluar adalah 0 kecuali N tidak lebih besar atau sama dengan 1."
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Melanjutkan for, while, atau until loops.\n"
+" \n"
+" Melanjutkan ke iterasi selanjutnya dari loop yang dilingkupi oleh FOR, "
+"WHILE, atau UNTIL.\n"
+" Jika N dispesifikasikan, melanjutkan di posisi ke N dari loop yang "
+"dilingkupi. \n"
+" Status Keluar:\n"
+" Status keluar adalah 0 kecuali N tidak lebih besar atau sama dengan 1."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+"Menjalankan shell builtins.\n"
+" \n"
+" Menjalankan SHELL-BUILTIN dengan argumen ARGs tanpa menjalankan "
+"pencarian\n"
+" perintah. Ini berguna ketika anda menginginkan untuk mengimplementasikan "
+"sebuah shell builtin\n"
+" sebagai sebuah fungsi shell, tetapi butuh untuk menjalankan builtin "
+"dalah fungsi.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan status keluar dari SHELL-BUILTIN, atau salah jika SHELL-"
+"BUILTIN adalah\n"
+" bukan sebuah shell builtin.."
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+"Mengembalikan context dari panggilan subroutine saat ini.\n"
+" \n"
+" Tanpa EXPR, mengembalikan \"$line $filename\". Dengan EXPR,\n"
+" mengembalikan \"$line $subroutine $filename\"; informasi extra ini\n"
+" dapat digunakan untuk menyediakan jejak stack.\n"
+" \n"
+" Nilai dari EXPR mengindikasikan bagaimana banyak panggilan frames "
+"kembali sebelum\n"
+" yang ada; Top frame adalah frame 0. \n"
+" Status Keluar:\n"
+" Mengembalikan 0 kecuali shell sedang tidak menjalankan sebuah fungsi "
+"shell atau EXPR\n"
+" tidak valid."
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+"Pindah direktori kerja shell.\n"
+" \n"
+" Pindah direktori saat ini ke DIR. Variabel $HOME adalah\n"
+" default DIR.\n"
+" \n"
+" Variabel CDPATH mendefinisikan jalur pencarian untuk\n"
+" direktori yang berisi DIR. Alternatif nama direktori dalam CDPATH\n"
+" dipisahkan oleh sebuah colon (:). Sebuah nama direktori kosong adalah "
+"sama dengan\n"
+" direktori saat ini. i.e. `.'. Jika DIR dimulai dengan sebuah slash (/),\n"
+" maka CDPATH tidak digunakan.\n"
+" \n"
+" Jika direktori tidak ditemukan, dan\n"
+" pilihan shell cdable_vars' diset, maka coba kata sebagai sebuah nama\n"
+" variabel. Jika variabel itu memiliki sebuah nilai, maka nilai dari "
+"variabel itu yang digunakan\n"
+" \n"
+" Pilihan:\n"
+" -L\tmemaksa link simbolik untuk diikuti\n"
+" -P\tgunakan struktur physical direktori tanpa mengikuti link\n"
+" symbolik\n"
+" \n"
+" Default adalah mengikuti link simbolik, seperti dalam `-L' "
+"dispesifikasikan.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan 0 jika direktori berubah; bukan nol jika tidak."
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+"Menampilkan nama dari direktori yang digunakan sekarang.\n"
+" \n"
+" Pilihan:\n"
+" -L\tmenampilkan nilai dari $PWD jika ini nama dari direktori\n"
+" \tyang digunakan sekarang\n"
+" -P\tmenampilkan direktori pisik, tanpa link simbolik apapun\n"
+" \n"
+" Secara default, `pwd' berlaku seperi jika pilihan `-L' "
+"dispesifikasikan.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan 0 kecuali jika sebuah pilihan tidak valid diberikan atau "
+"direktori sekarang\n"
+" tidak bisa dibaca."
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Perintah kosong.\n"
+" \n"
+" Tidak ada efek; perintah tidak melakukan apa-apa.\n"
+" \n"
+" Status Keluar:\n"
+" Selalu sukses."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Mengembalikan sebuah hasil yang sukses.\n"
+" \n"
+" Status Keluar:\n"
+" Selalu sukses."
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+"Mengembalikan sebuah kembaliah yang tidak sukses.\n"
+" \n"
+" Status Keluar:\n"
+" Selalu gagal."
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+"Menjalankan sebuah perintah sederhana atau menampilkan informasi mengenai "
+"perintah.\n"
+" \n"
+" Menjalankan PERINTAH tanpa ARGS menekan fungsi pencarian shell, atau "
+"menampilkan\n"
+" informasi mengenasi PERINTAH tertentu. Dapat digunakan untuk memanggil "
+"perintah\n"
+" dalam disk ketika sebuah fungsi dengan nama yang sama ada.\n"
+" \n"
+" Pilihan:\n"
+" -p\tgunakan sebuah nilai default untuk PATH yang menjamin untuk "
+"mencari seluruh\n"
+" \tpenggunaan stadar\n"
+" -v\tmenampilkan deskripsi dari PERINTAH sama dengan `type' builtin\n"
+" -V\tmenampilkan lebih jelas deskripsi dari setiap PERINTAH\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan status keluar dari PERINTAH, atau gagal jika PERINTAH "
+"tidak ditemukan."
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Menset nilai variabel dan atribut.\n"
+" \n"
+" Variabel deklarasi dan memberikan atribut untuknya. Jika tidak ada NAMA "
+"yang diberikan,\n"
+" tampilkan atribut dan nilai dari seluruh variabel.\n"
+" \n"
+" Pilihan:\n"
+" -f\tbatasi aksi atau tampilkan nama fungsi dan definisi\n"
+" -F\tbatasi tampilan ke nama fungsi saja (tambahkan nomor baris dan\n"
+" \tsumber berkas ketika debugging)\n"
+" -p\ttampilkan atribut dan nilai dari setiap NAMA\n"
+" \n"
+" Pilihan yang menset atribut:\n"
+" -a\tuntuk membuat NAMA idex array (jika didukung)\n"
+" -A\tuntuk membuat NAMA assosiasi array (jika didukung)\n"
+" -i\tuntuk membuat NAMA memiliki atribut `integer'\n"
+" -l\tuntuk mengubah NAMA ke huruf kecil dalam assignment\n"
+" -r\tuntuk membuah NAMA baca-saja\n"
+" -u\tuntuk mengubah NAMA ke huruf besar dalam penempatan\n"
+" -x\tuntuk membuah NAMA export\n"
+" \n"
+" Menggunakan `+' daripada `-' menonaktifkan atribut yang diberikan.\n"
+" \n"
+" Variabel dengan atribut integer memiliki evaluasi aritmetic (lihat\n"
+" perintah `let') ditampilkan ketika variabel diberi sebuah nilai.\n"
+" \n"
+" Ketika digunakan dalam sebuah fungsi, `declare' membuat NAMA lokal, "
+"seperti dengan\n"
+" perintah `local'.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau "
+"sebuah error terjadi."
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+"Menset nilai variabel dan atribut.\n"
+" \n"
+" Kadaluarsa. Lihat `help declare'."
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+"Mendefinisikan variabel lokal.\n"
+" \n"
+" Membuat sebuah variabel locak dipanggil NAMA, dan memberikan kepadanya "
+"NILAI. OPSI dapat\n"
+" berupa semua pilihan yang diterima oleh `declare'.\n"
+" \n"
+" Variabel lokal hanya dapat digunakan dalam sebuah fungsi; mereka hanya\n"
+" dapat dilihat ke fungsi dimana mereka terdefinisi dan anaknya.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan, "
+"sebuah error terjadi.\n"
+" atau shell tidak menjalankan sebuah fungsi."
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Tulis argumen ke standar keluaran.\n"
+" \n"
+" Menampilkan ARG ke standar keluaran diikuti oleh baris baru.\n"
+" \n"
+" Pilihan:\n"
+" -n\tjangan menambahkan sebuah baris baru\n"
+" -e\taktifkan interpretasi dari karakter backslash\n"
+" -E\tsecara eksplisit tekan interpretasi dari karakter backslash\n"
+" \n"
+" `echo' menginterpretasikan karakter backslash-escaped berikut:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress karakter baris baru yang tersisa\n"
+" \\E\tescape karakter\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tkarakter yang memiliki kode ASCII NNN (oktal). NNN dapat "
+"berupa\n"
+" \t0 sampai 3 oktal digit\n"
+" \\xHH\tdelapan-bit karakter yang nilainya adalah HH (hexadesimal). HH\n"
+" \tdapat satu dari dua bilangan hex\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali sebuah penulisan error terjadi."
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Menulis argumen ke standar output.\n"
+" \n"
+" Menampilkan ARG ke standard keluaran diikuti dengan sebuah baris baru.\n"
+" \n"
+" Pilihan:\n"
+" -n\tjangan menambahkan sebuah baris baru\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali sebuah penulisan error terjadi."
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+"Aktifkan dan non-aktifkan shell builtins.\n"
+" \n"
+" Aktifkan dan non-aktifkan perintah builtin shell. Menonaktifkan "
+"membolehkan anda untuk\n"
+" menjalankan sebuah perintah disk yang memiliki nama yang sama dengan "
+"shell builtin\n"
+" tanpa menggunakan sebuah nama jalur yang lengkap.\n"
+" \n"
+" Pilihan:\n"
+" -a\ttampilkan daftar dari builtins memperlihatkan aktif atau tidak "
+"setiap diaktifkan\n"
+" -n\tmenonaktifkan setiap NAMA atau tampilkan daftar dari builtin yang "
+"tidak aktif\n"
+" -p\ttampilkan daftar dari builtins dalam format yang berguna\n"
+" -s\ttampilkan yang nama dari Posix `special' builtins\n"
+" \n"
+" Pilihan mengontrol dynamic loading:\n"
+" -f\tLoad builtin NAMA dari shared object NAMA BERKAS\n"
+" -d\tHapus sebuah builtin diload dengan -f\n"
+" \n"
+" Tanpa pilihan, untuk setiap NAMA di aktifkan.\n"
+" \n"
+" Untuk menggunakan `test' ditemukan dalam $PATH daripada dalam shell "
+"builtin\n"
+" versi, ketik `enable -n test'.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali NAMA bukan sebuah shell builtin atau sebuah "
+"error terjadi."
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+"Menjalankan argumen sebagai sebuah perintah shell.\n"
+" \n"
+" Mengkombinasikan ARG dalam sebuah string tunggal, gunakan hasil sebagai "
+"masukan dalam shell,\n"
+" dan jalankan hasil dari perintah.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan status keluar dari perintah atau sukses jika perintah "
+"adalah kosong."
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+"Ambil argumen pilihan.\n"
+" \n"
+" Getops digunakan oleh shell procedures untuk memparse parameter posisi.\n"
+" \n"
+" OPTSTRING berisi huruf pilihan yang dikenali; jika sebuah huruf\n"
+" diikuti oleh sebuah colon, pilihan diduga akan berupa argumen,\n"
+" yang seharusnya dipisahkan dari itu oleh spasi.\n"
+" \n"
+" Setiap waktu ini dipanggil, getopts akan menempatkan pilihan selanjutnya "
+"dalam\n"
+" $name shell variabel, menginisialisasi nama jiki ini tidak ada, dan\n"
+" index dari argumen selanjutnya untuk diproses kedalam shell\n"
+" variabel OPTIND. OPTIND diinisialisasi ke 1 setiap shell atau\n"
+" sebuah shell script dipanggil. Ketika sebuah pilihan membutuhkan sebuah "
+"argumen,\n"
+" getopts menempatkan argumen itu kedalam variabel shell OPTARG.\n"
+" \n"
+" getopts melaporkan error dalam satu dari dua cara. Jika karakter "
+"pertama\n"
+" dari OPTSTRING adalah sebuah colon, getopts menggunakan silent error "
+"laporan. Dalam\n"
+" Mode ini, tidak ada pesan error yang ditampilkan. Jika sebuah pilihan "
+"tidak valid terlihat\n"
+" getops menempatkan karakter pilihan yang ditemukan ke OPTARG. Jika "
+"sebuah\n"
+" argumen yang dibutuhkan tidak ditemukan, getopts menempatkan sebuah ':' "
+"kedalam NAME dan\n"
+" menset OPTARG ke pilihan karakter yang ditemukan. Jika getopts tidak "
+"dalam\n"
+" mode silent, dan sebuah pilihan tidak valid terlihat getopts menempatkan "
+"'?' kedalam\n"
+" variabel NAME, OPTARG tidak diset, dan sebuah pesan analisis\n"
+" tampilkan.\n"
+" \n"
+" Jika sebuah variabel shell OPTERR memiliki sebuah nilai 0, getopts "
+"mendisable\n"
+" pencetakan dari pesan error, bahkan jika karakter pertama dari\n"
+" OPTSTRING bukan sebuah colon. OPTERR memiliki nilai 1 secara default.\n"
+" \n"
+" Getopts secara normal memparse parameter posisi ($0 - $9), tetapi jika\n"
+" lebih dari satu argumen diberikan, mereka diparse. \n"
+" Status Keluar:\n"
+" Mengembalikan sukses jika sebuah pilihan ditemukan; gagal jika akhir "
+"dari pilihan\n"
+" ditemui atau sebuah error terjadi."
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+"Mengganti shell dengan perintah yang diberikan.\n"
+" \n"
+" Jalankan PERINTAH, ganti shell ini dengan aplikasi yang "
+"dispesifikaskan.\n"
+" ARGUMEN menjadi argumen dari PERINTAH. Jika PERINTAH tidak "
+"dispesifikasikan,\n"
+" setiap redireksi akan memiliki afek dalam shell sekarang.\n"
+" \n"
+" Pilihan:\n"
+" -a nama\tlewatkan NAMA sebagai argumen ke nol ke PERINTAH\n"
+" -c\t\tjalankan PERINTAH dengan sebuah environment kosong\n"
+" -l\t\ttempatkan sebuah dash dalam argumen ke nol ke PERINTAH\n"
+" \n"
+" Jika perintah tidak dapat dijalankan, sebuah non-interaktif shell "
+"keluar, kecuali\n"
+" pilihan shell `execfail' diset.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali PERINTAH tidak ditemukan atau sebuah "
+"redireksi error terjadi."
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"Keluar dari shell.\n"
+" \n"
+" Keluar dari shell dengan status dari N. Jika N diabaikan, status "
+"keluaran\n"
+" adalah status dari perintah terakhir yang dijalankan."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+"Keluar dari sebuah login shell.\n"
+" \n"
+" Keluar sebuah login shell dengan status keluar N. Mengembalikan sebuah "
+"error jika tidak dijalankan\n"
+" dalam sebuah login shell."
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+"Tampilkan atau jalankan perintah dari daftar sejarah.\n"
+" \n"
+" fc biasa digunakan untuk mendaftar atau mengubah dan menjalankan "
+"perintah dari daftar sejarah.\n"
+" PERTAMA dan TERAKHIR dapat berupa nomor yang menspesifikasikan "
+"jangkauan, atau PERTAMA dapat berupa sebuah\n"
+" string, yang berarti adalah perintah yang berawal dengan string.\n"
+" \n"
+" Pilihan:\n"
+" -e ENAME\tmemilih editor yang akan digunakan. Default adalah FCEDIT, "
+"kemudian EDITOR,\n"
+" \t\tkemudian vi.\n"
+" -l \tdaftar baris daripada mengubahnya.\n"
+" -n \tabaikan nomor baris ketika MENDAFTAR.\n"
+" -r \tmembalik urutan dari baris (membuat yang terbaru terdaftar "
+"pertama).\n"
+" \n"
+" Dengan `fc -s [pat=rep ...] [perintah]' format, perintah\n"
+" dijalankan setelah substitusi OLD=NEW dilakukan.\n"
+" \n"
+" Sebuah alias yang berguna yang digunakan dengan ini r='fc -s', jadi "
+"mengetikan `r cc'\n"
+" menjalankan perintah terakhir yang diawali dengan `cc' dan mengetikan "
+"'r' menjalankan kembali\n"
+" perintah terakhir.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses atau status dari perintah yang dijalankan; tidak-"
+"nol jika sebuah error terjadi."
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"Pindahkan pekerjaan di foreground.\n"
+" \n"
+" Tempatkan JOB_SPEC di foreground, dan buat ini pekerjaan saat ini. Jika\n"
+" JOB_SPEC tidak ada, shell notion dari pekerjaan saat ini\n"
+" yang digunakan.\n"
+" \n"
+" Status Keluar:\n"
+" Status dari perintah yang ditempatkan di foreground, atau gagal jika "
+"sebuah error terjadi."
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Pindahkan pekerjaan ke background.\n"
+" \n"
+" Tempatkan setiap JOB_SPEC dalam background, seperti jika ini telah "
+"dimulai dengan\n"
+" `&'. Jika JOB_SPEC tidak ada, notion shell's dari pekerjaan\n"
+" yang saat berjalan digunakan.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali pengontrol pekerjaan tidak aktif atau "
+"sebuah error terjadi."
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+"Ingat atau tampilkan lokasi aplikasi.\n"
+" \n"
+" Tentukan dan ingat nama jalur lengkap dari setiap NAMA perintah. Jika\n"
+" tidak ada argumen yang diberikan, informasi mengenai perintah yang "
+"diingat akan ditampilkan.\n"
+" \n"
+" Pilihan:\n"
+" -d\t\tlupakan lokasi yang diingat untuk setiap NAMA\n"
+" -l\t\ttampilkan dalam format yang bisa digunakan sebagai masukan\n"
+" -p pathname\tgunakan NAMA JALUR yang nama jalur lengkap dari NAMA\n"
+" -r\t\tlupakan semua lokasi yang diingat\n"
+" -t\t\ttampilkan lokasi yang diingat untuk setiap NAMA, diawali\n"
+" \t\tuntuk setiap lokasi diberikan NAMA yang sesuai jika multiple\n"
+" \t\tNAMA diberikan\n"
+" Argumen:\n"
+" NAMA\t\tSetiap NAMA yang ditemukan dalam $PATH dan ditambahkan dalam "
+"daftar\n"
+" \t\tdari perintah yang diingat.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali NAMA tidak ditemukan atau sebuah pilihan "
+"tidak valid telah diberikan."
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+"Tampilkan informasi mengenai perintah builtin.\n"
+" \n"
+" Tampilkan ringkasan singkat dari perintah builtin. Jika POLA\n"
+" dispesifikasikan, tampilkan bantuan lengkap di seluruh perintah yang "
+"cocok dengan POLA,\n"
+" jika tidak daftar dari topik bantuan ditampilkan.\n"
+" \n"
+" Pilihan:\n"
+" -d\tkeluarkan deskripsi singkat untuk setiap topik\n"
+" -m\ttampilkan penggunaan dalam format pseudo-manpage\n"
+" -s\tkeluarkan hanya penggunaan singkat untuk setiap topik yang cocok\n"
+" \tdengan POLA\n"
+" \n"
+" Argumen:\n"
+" POLA\tPola menspesifikasikan topik bantuan\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali POLA tidak ditemukan atau pilihan tidak "
+"valid diberikan."
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Menampilkan atau memanipulasi daftar sejarah.\n"
+" \n"
+" Menampilkan daftar sejarah dengan nomor baris. Baris yang ditampilkan "
+"dengan\n"
+" sebuah `*' telah diubah. Argumen dari N mengatakan untuk menampilkan "
+"hanya\n"
+" N baris terakhir.\n"
+" \n"
+" Pilihan:\n"
+" -c\tmenghapus daftar sejarah dengan cara menghapus seluruh masukan\n"
+" -d menghapus masukan sejarah di offset OFFSET.\n"
+" \n"
+" -a\tmenambahkan ke daftar sejarah dari sesi ini ke berkas sejarah.\n"
+" -n\tmembaca seluruh baris sejarah yang belum dibaca dari berkas "
+"sejarah\n"
+" -r\tmembaca berkas sejarah dan menambahkan isinya ke daftar\n"
+" \tsejarah\n"
+" -w menulis sejarah sekarang ke berkas sejarah\n"
+" \tdan menambahkannya kedalam daftar sejarah\n"
+" \n"
+" -p\tjalankan expansi sejarah untuk setiap ARG dan tampilkan hasilnya\n"
+" \ttanpa menyimpannya kedalam daftar sejarah\n"
+" -s\ttambahkan ARG ke daftar sejarah sebagai sebuah masukan tunggal\n"
+" \n"
+" \n"
+" Jika NAMAFILE diberikan, maka itu digunakan sebagai berkas sejarah "
+"selain itu\n"
+" jika $HISTFILE memiliki nilai, maka itu digunakan, selain itu ~/."
+"bash_history.\n"
+" \n"
+" \n"
+" Jika variabel $HISTTIMEFORMAT diset dan tidak kosong, nilai ini yang "
+"akan digunakan\n"
+" sebagai format untuk string untuk strftime(3) untuk mencetak timestamp "
+"yang berhubungan\n"
+" dengan setiap masukan sejarah yang ditampilkan. Tidak ada time stamp "
+"yang ditampilkan jika tidak.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau "
+"sebuah error terjadi."
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+"Menampilkan status dari pekerjaan.\n"
+" \n"
+" Tampilkan pekerjaan yang aktif. JOBSPEC membatasi keluaran ke pekerjaan "
+"itu.\n"
+" Tanpa pilihan, status dari seluruh aktif job ditampilkan.\n"
+" \n"
+" Pilihan:\n"
+" -l menampilkan daftar dari proses id sebagai informasi tambahan.\n"
+" -n diberikan, hanya proses yang sudah berubah status saja sejak\n"
+" \tnotifikasi terakhir yang ditampilkan.\n"
+" -p hanya menampilkan proses id saja.\n"
+" -r membatasi keluaran ke pekerjaan yang sedang jalan\n"
+" -s membatasi keluaran ke pekerjaan yang berhenti\n"
+" \n"
+" Jika pilihan -x diberikan, PERINTAH dijalankan setelah semua spesifikasi "
+"pekerjaan\n"
+" yang tampil di ARGS telah diganti dengan proses ID dari proses "
+"pekerjaan\n"
+" grup leader.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecualis sebuah pilihan tidak valid diberikan atau "
+"sebuah error terjadi.\n"
+" Jika -x digunakan, mengembalikan status keluar dari PERINTAH."
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+"Hapus pekerjaan dari shell sekarang.\n"
+" \n"
+" Hapus setiap JOBSPEC argumen dari tabel dari pekerjaan aktif. Tanpa\n"
+" JOBSPEC apapun, shell menggunakan indikasi ini dari pekerjaan sekarang.\n"
+" \n"
+" Pilihan:\n"
+" -a\thapus seluruh pekerjaan jika JOBSPEC tidak diberikan\n"
+" -h\ttandai setiap JOBSPEC sehingga SIGHUP tidak dikirim ke pekerjaan "
+"jika\n"
+" \tshell menerima sebuah SIGHUP\n"
+" -r\thapus hanya pekerjaan yang sedang berjalan\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali ada sebuah pilihan tidak valid atau JOBSPEC "
+"diberikan."
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Mengirim sebuah sinyal ke sebuah pekerjaan.\n"
+" \n"
+" Mengirim ke sebuah proses yang diidentifikasikan oleh PID atau JOBSPEC "
+"dengan sinyal yang diberi name\n"
+" oleh SIGSPEC atau SIGNUM. Jika SIGSPEC atau SIGNUM tidak ada, maka\n"
+" SIGTERM diasumsikan.\n"
+" \n"
+" Pilihan:\n"
+" -s sig\tSIG adalah sebuah nama sinyal\n"
+" -n sig\tSIG adalah sebuah nomor sinyal\n"
+" -l\tdaftar dari nama sinyal; jika argumen diikuti dengan `-l' mereka "
+"mengasumsikan ke\n"
+" \tnomor sinyal yang namanya ditampilkan.\n"
+" Kill adalah sebuah shell builtin untuk dua alasan; ini membolehkan "
+"sebuah jobs ID untuk digunakan dari pada\n"
+" proses IDs, dan memperbolehkan proses untuk dimatikan jika batas\n"
+" dari proses yang dibuat tercapai.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau "
+"sebuah error terjadi."
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+"Evaluasi ekspresi arithmetic.\n"
+" \n"
+" Setiap ARG adalah sebuah ekspresi arithmetic yang dievaluasi. Evaluasi\n"
+" dilakukan dalam fixed-width integers dengan tidak ada pemeriksaan untuk "
+"overflow, walaupun\n"
+" pembagian dengan 0 ditangkap dan ditandai sebagai error. Berikut\n"
+" daftar dari operator yang dikelompokkan dalam tingkat tingkat dari equal "
+"precedence operators.\n"
+" Tingkat yang ditampilkan dalam urutan dari decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariabel post-increment, post-decrement\n"
+" \t++id, --id\tvariabel pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical dan bitwise negasi\n"
+" \t**\t\texponential\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+. -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shift\n"
+" \t<=. >=, <, >\tperbandingan\n"
+" \t==, !=\t\tpersamaan, dan ketidak samaan\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\toperator kondisional\n"
+" \t=, *=, /=, %=,\n"
+" \t+=. -=. <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Variabel shell dibolehkan sebagai operand. Nama dari variabel\n"
+" digantikan oleh nilainya (coerced ke fixed-width integer) dalam\n"
+" sebuah expresi. Variabel tidak butuh atribut integer\n"
+" dinyalakan untuk digunakan dalam sebuah expresi.\n"
+" \n"
+" Operator yang dievaluasi dalam urutan precedence. Sub-expresi dalam\n"
+" parentheses dievaluasi terlebih dahulu dan boleh dioverride precedence\n"
+" aturan diatasnya.\n"
+" \n"
+" Status Keluar:\n"
+" Jika ARG terakhir dievaluasi ke 0, membiarkan kembali ke 1; 0 "
+"dikembalikan Jika tidak."
+
+#: builtins.c:966
+#, fuzzy
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+"Membaca sebuah baris dari standar masukan dan membaginya dalam bagian "
+"bagian.\n"
+" \n"
+" Satu baris dibaca dari masukan standar, atau dari berkas deskripsi FD "
+"jika\n"
+" pilihan -u diberikan, dan kata pertama diberikan ke NAMA pertama,\n"
+" kata kedua ke NAMA kedua, dan seterusnya. dengan kata yang tersisa "
+"ditempatkan\n"
+" ke NAMA terakhir. Hanya karakter yang ditemukan dalam $IFS yang dikenal "
+"sebagai pembatas\n"
+" kata.\n"
+" \n"
+" Jika tidak ada NAMA yang diberikan, baris yang dibaca disimpan dalam "
+"variabel BALASAN\n"
+" \n"
+" Pilihan:\n"
+" -a array\tditempatkan kata dibaca secara berurutan indice dari array\n"
+" \t\tvariabel ARRAY, dimulai dari nol\n"
+" -d delim\tdilanjutkan sampai karakter pertama dari PEMBATAS dibaca, "
+"daripada\n"
+" \t\tbaris baru\n"
+" -e\t\tgunakan Readline untuk memperoleh baris dalam sebuah shell "
+"interaktif\n"
+" -i text\tGunakan TEXT sebagai text inisial untuk Readline\n"
+" -n nchars\tkembali setelah membaca NCHARS characters daripada "
+"menunggu\n"
+" \t\tuntuk sebuah baris baru\n"
+" -p prompt\tkeluarkan string PROMPT tanpa tambahan baris baru sebelum\n"
+" \t\tmencoba untuk membaca\n"
+" -r\t\tjangan ijinkan backslash untuk mengeluarkan karakter apapun\n"
+" -s\t\tjangan echo masukan yang datang dari sebuah terminal\n"
+" -t menyebabkan pembacaan untuk time out dan kembali gagal jika sebuah "
+"baris lengkap\n"
+" \t\tdari masukan tidak dibaca dalam TIMEOUT detik. Jika variabel TMOUT "
+"terset,\n"
+" \t\tnilai ini akan menjadi nilai default timeout. TIMEOUT mungkin "
+"sebuah\n"
+" \t\tbilangan fraksional. Status keluaran lebih besar dari 128 jika\n"
+" \t\ttimeout dilewati\n"
+" -u fd\t\tbaca dari berkas deskripsi FD daripada standar masukan\n"
+" \n"
+" Status Keluar:\n"
+" Kode kembali adalah nol, kecuali akhir-dari-berkas ditemui, baca "
+"kehabisan waktu,\n"
+" atau sebuah berkas deskripsi disupply sebagai sebuah argumen ke pilihan -"
+"u."
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+"Kembali dari sebuah fungsi shell.\n"
+" \n"
+" Menyebabkan sebuah fungsi atau sebuah script untuk keluar dengan nilai "
+"kembali\n"
+" yang dispesifikasikan oleh N. Jika N diabaikan, status kembalian adalah\n"
+" perintah terakhir yang dijalankan dalam fungsi atau script.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan N, atau gagal jika shell tidak menjalan sebuah fungsi atau "
+"script."
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+"Set atau unset nilai dari pilihan shell dan parameter posisi.\n"
+" \n"
+" Ubah nilai dari atribut shell dan parameter posisi, atau\n"
+" tampilkan nama dan nilai dari variabel shell.\n"
+" \n"
+" Pilihan:\n"
+" -a Tandai variabel yang telah termodifikasi atau dibuat untuk "
+"export.\n"
+" -b Notifikasi penyelesaian pekerjaan secara langsung.\n"
+" -e Keluar langsung jika sebuah perintah keluar dengan status tidak "
+"nol.\n"
+" -f Menonaktifkan pembuatan nama berkas (globbing).\n"
+" -h Ingat lokasi dari perintah sebagai mereka dicari.\n"
+" -k Semua argumen assignment ditempatkan dalam environment untuk "
+"sebuah\n"
+" perintah, tidak hanya mengawali nama perintah.\n"
+" -m Pengendali pekerjaan diaktifkan.\n"
+" -n Baca perintah tapi jangan menjalankan perintah tersebut.\n"
+" -o nama-pilihan\n"
+" Set variabel menurut nama-pilihan:\n"
+" allexport sama seperti -a\n"
+" braceexpand sama seperti -B\n"
+" emacs gunakan gaya emacs dalam line editing interface\n"
+" errexit sama seperti -e\n"
+" errtrace sama seperti -E\n"
+" functrace sama seperti -T\n"
+" hashall sama seperti -h\n"
+" histexpand sama seperti -H\n"
+" history aktifkan sejarah perintah\n"
+" ignoreeof shell tidak akan keluar ketika membaca EOF\n"
+" interactive-comments\n"
+" membolehkan komentar ada dalam perintah "
+"interaktif\n"
+" keyword sama seperti -k\n"
+" monitor sama seperti -m\n"
+" noclobber sama seperti -C\n"
+" noexec sama seperti -n\n"
+" noglob sama seperti -f\n"
+" nolog saat ini diterima tetapi diabaikan\n"
+" notify sama seperti -b\n"
+" nounset sama seperti -u\n"
+" onecmd sama seperti -t\n"
+" physical sama seperti -P\n"
+" pipefail nilai kembalian dari sebuah pipelie adalah status "
+"dari\n"
+" perintah terakhir yang keluar dengan sebuah status "
+"tidak nol,\n"
+" atau nol jika tidak ada perintah yang keluar "
+"dengan status tidak nol\n"
+" posix ubah perilaku dari bash dimana operasi\n"
+" default berbeda dari 1003.2 standar ke\n"
+" sesuai dengan standar\n"
+" privileged sama seperti -p\n"
+" verbose sama seperti -v\n"
+" vi gunakan sebuah gaya vi dalam line editing "
+"interface.\n"
+" xtrace sama seperti -x\n"
+" -p Aktif ketika real dan efektif id pengguna tidak cocok.\n"
+" Menonaktifkan pemrosesan dari berkas $ENV dan mengimpor dari "
+"fungsi\n"
+" shell. Mengubah pilihan ini off menyebabkan efektif uid dan\n"
+" gid untuk diset ke real uid dan gid.\n"
+" -t Keluar setelah membaca dan menjalankan satu perintah.\n"
+" -u Perlakukan variabel yang tidak diset sebagai error ketika "
+"mensubstitusi.\n"
+" -v Tampilkan baris masukan shell seperti ketika dibaca.\n"
+" -x Tampilkan perintah dan argumennya ketika menjalankan perintah "
+"tersebut.\n"
+" -B Shell akan melakukan expansi brace\n"
+" -C Jika diset, melarang berkas regular yang telah ada untuk "
+"ditulis\n"
+" oleh keluaran redirection.\n"
+" -E Jika diset, trap ERR diturunkan oleh fungsi shell.\n"
+" -H Mengaktifkan ! gaya pengubahan sejarah. Tanda ini aktif\n"
+" secara default ketika shell interaktif.\n"
+" -P Jika diset, jangan ikuti symbolic link ketika menjalankan "
+"perintah\n"
+" seperti cd ketika mengubah direktori kerja sekarang.\n"
+" -T Jika diset, Debug trap diturunkan oleh fungsi shell.\n"
+" - Assign argumen yang tersisa ke parameter posisi.\n"
+" Pilihan -x dan -v akan dimatikan.\n"
+" \n"
+" Menggunakan + daripada - akan menyebabkan tanda untuk dimatikan. Tanda\n"
+" juga bisa digunakan dalam pemanggilan shell. Tanda yang terset\n"
+" saat ini dapat ditemukan dalam $-. ARG n yang tersisa adalah parameter\n"
+" posisi dan ditempatkan, dalam urutan, ke $1, $2, ... $n. Jika tidak ada\n"
+" ARG yang diberikan, semua shell variabel ditampilkan.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan."
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+"Unset nilai dan atribut dari variabel shell dan fungsi.\n"
+" \n"
+" Untuk setiap NAMA, hapus variabel atau fungsi yang berhubungan.\n"
+" \n"
+" Pilihan:\n"
+" -f\tperlakukan setiap NAMA sebagai sebuah fungsi shell\n"
+" -v\tperlakukan setiap NAMA sebagai sebuah variabel shell\n"
+" \n"
+" Tanpa pilihan, unset pertama mencoba untuk menunset sebuah variabel, dan "
+"jika itu gagal,\n"
+" mencoba untuk menunset sebuah fungsi.\n"
+" \n"
+" Beberapa variabel tidak dapat diunset; Lihat juga `readonly'.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau "
+"sebuah NAMA adalah baca-saja."
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Set export atribut untuk variabel shell.\n"
+" \n"
+" Tandai setiap NAMA untuk otomatis export ke environment setelah\n"
+" perintah dijalankan. Jika NILAI diberikan, berikan NILAI sebelum "
+"export.\n"
+" \n"
+" Pilihan:\n"
+" -f\tmerujuk ke fungsi shell\n"
+" -n\thapus properti export dari setiap NAMA\n"
+" -p\ttampilkan daftar dari seluruh variabel dan fungsi yang terexport\n"
+" \n"
+" Sebuah argumen dari `--' menonaktifkan pemrosesan pilihan selanjutnya.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau "
+"NAMA tidak valid."
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Tandai variabel shell sebagai tidak bisa diubah.\n"
+" \n"
+" Tandai setiap NAMA sebagai baca-saja; nilai dari NAMA ini tidak boleh\n"
+" diubah untuk penggunaan selanjutnya. Jika NILAI diberikan, berikan "
+"NILAI\n"
+" sebelum menandainya sebagai baca-saja.\n"
+" \n"
+" Pilihan:\n"
+" -a\tmerujuk ke aray index variabel\n"
+" -A\tmerujuk ke variabel aray assosiasi\n"
+" -f\tmerujuk ke fungsi shell\n"
+" -p\tmenampilkan sebuah daftar dari seluruh variabel dan fungsi baca-"
+"saja\n"
+" \n"
+" Sebuah argumen dari `--' menonaktifkan pemrosesan pilihan selanjutnya.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecual sebuah pilihan tidak valid diberikan atau "
+"NAMA tidak valid."
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+"Geser parameter posisi.\n"
+" \n"
+" Ubah nama parameter posisi $N+1,$N+2 ... ke $1,$2 ... Jika N\n"
+" tidak diberikan, N diasumsikan 1.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali N adalah negatif atau lebih besar dari $#."
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+"Jalankan perintah dari sebuah berkas dalam shell sekarang.\n"
+" \n"
+" Baca dan jalankan perintah dari FILENAME dan kembali. Nama jalur dalam\n"
+" $PATH digunakan untuk mencari direktori yang berisi NAMABERKAS. Jika "
+"salah satu\n"
+" dari ARGUMENTS diberikan, mereka menjadi parameter posisi ketika\n"
+" NAMABERKAS dijalankan.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan status dari perintah terakhir yang dijalankan dalam NAMA "
+"BERKAS; gagal jika\n"
+" NAMA BERKAS tidak dapat dibaca."
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Suspend eksekusi shell.\n"
+" \n"
+" Suspend eksekusi dari shell ini sampai menerima sebuah sinyal SIGCONT.\n"
+" Kecuali dipaksa, login shell tidak dapat disuspend.\n"
+" \n"
+" Pilihan:\n"
+" -f\tpaksa untuk suspend, walaupun jika shell adalah sebuah login "
+"shell\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali pengontrol pekerjaan tidak aktif atau "
+"sebuah error terjadi."
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+"Evaluasi ekspresi kondisi.\n"
+" \n"
+" Keluar dengan sebuah status dari 0 (benar) atau 1 (salah) tergantung "
+"dari\n"
+" evaluasi dari EXPR. Expresi dapat berupa unary atau binary. Unary\n"
+" expresi sering digunakan untuk memeriksa status dari sebuah berkas.\n"
+" Terdapat operator string juga, dan operator pembanding numerik.\n"
+" \n"
+" Operator berkas:\n"
+" \n"
+" -a BERKAS Benar jika berkas ada.\n"
+" -b BERKAS Benar jika berkas berupa blok spesial.\n"
+" -c BERKAS Benar jika berkas adalah karakter spesial.\n"
+" -d BERKAS Benar jika berkas adalah sebuah direktori.\n"
+" -e BERKAS Benar jika berkas ada.\n"
+" -f BERKAS Benar jika berkas ada dan berupa sebuah berkas "
+"regular.\n"
+" -g BERKAS Benar jika berkas memiliki set-grup-id.\n"
+" -h BERKAS Benar jika berkas adalah symbolic link.\n"
+" -L BERKAS Benar jika berkas adalah symbolic link.\n"
+" -k BERKAS Benar jika berkas memiliki `sticky' bit diset.\n"
+" -p BERKAS Benar jika berkas adalah named pipe.\n"
+" -r BERKAS Benar jika berkas dapat dibaca oleh anda.\n"
+" -s BERKAS Benar jika berkas ada dan tidak kosong.\n"
+" -S BERKAS Benar jika berkas adalah socket.\n"
+" -t FD Benar jika FD dibuka dalam sebuah terminal.\n"
+" -u BERKAS Benar jika berkas memiliki set-user-id.\n"
+" -w BERKAS Benar jika berkas dapat ditulis oleh anda.\n"
+" -x BERKAS Benar jika berkas dapat dijalankan oleh anda.\n"
+" -O BERKAS Benar jika berkas secara efektif dimiliki oleh "
+"anda.\n"
+" -G BERKAS Benar jika berkas secara efektif dimiliki oleh grup "
+"anda.\n"
+" -N BERKAS Benar jika berkas telah dimodifikasi sejak terakhir "
+"ini dibaca.\n"
+" \n"
+" FILE1 -nt FILE2 Benar jika file1 lebih baru dari file2 (menurut \n"
+" tanggal modifikasi).\n"
+" \n"
+" FILE1 -ot FILE2 Benar jika file1 lebih lama dari file2.\n"
+" \n"
+" FILE1 -ef FILE2 Benar jika file1 adalah hard link ke file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING Benar jika string kosong.\n"
+" \n"
+" -n STRING\n"
+" STRING Benar jika string tidak kosong.\n"
+" \n"
+" STRING1 = STRING2\n"
+" Benar jika string sama.\n"
+" STRING1 != STRING2\n"
+" Benar jika string tidak sama.\n"
+" STRING1 < STRING2\n"
+" Benar jika STRING1 sorts sebelum STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" Benar jika STRING1 sorts sesudah STRING2 "
+"lexicographically.\n"
+" \n"
+" Operator lain:\n"
+" \n"
+" -o Pilihan Benar jika pilihan shell OPSI diaktifkan.\n"
+" ! EXPR Benar jika expr salah.\n"
+" EXPR1 -a EXPR2 Benar jika kedua expr1 dan expr2 adalah benar.\n"
+" EXPR1 -o EXPR2 Benar jika salah satu dari expr1 atau expr2 adalah "
+"benar.\n"
+" \n"
+" arg1 OP arg2 Pemeriksaan arithmetik. OP adalah salah satu dari -"
+"eq, -ne,\n"
+" -lt, -le, -gt, atau -ge.\n"
+" \n"
+" Arithmetic binary operator mengembalikan benar jika ARG1 adalah "
+"equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, atau greater-than-or-"
+"equal\n"
+" than ARG2.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses jika EKSPR mengevaluasi ke benar; gagal jika "
+"EXPR mengevaluasi ke\n"
+" salah atau sebuah argumen tidak valid diberikan."
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"Evaluasi expresi kondisional.\n"
+" \n"
+" Ini sinonim untuk \"test\" builtin, tetapi argumen terakhir\n"
+" harus berupa sebuah literal `]', untuk mencocokan dengan pembukaan `['."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Tampilkan waktu pemrosesan.\n"
+" \n"
+" Tampilkan akumulasi waktu penggunaan pengguna dan sistem untuk shell dan "
+"seluruh proses dari\n"
+" anaknya.\n"
+" \n"
+" Status Keluar:\n"
+" Selalu sukses."
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+"Tangkap sinyal dan even lainnya.\n"
+" \n"
+" Definisikan dan aktivasi handlers yang harus dijalankan ketika shell "
+"menerima sinyal\n"
+" atau kondisi lain.\n"
+" \n"
+" ARG perintah dibaca dan dijalankan ketika shell menerima\n"
+" sinyal SIGNAL_SPEC. Jika ARG tidak ada (dan sebuah sinyal SIGNAL_SPEC\n"
+" diberikan) atau `-', setiap sinyal yang dispesifikasikan akan direset "
+"kenilai\n"
+" original. Jika ARG adalah string kosong untuk setiap SIGNAL_SPEC "
+"diabaikan oleh\n"
+" shell dan oleh perintah yang dipanggil.\n"
+" \n"
+" Jika sebuah SIGNAL_SPEC adalah EXIT(0) perintah ARG dijalankan pada saat "
+"keluar dari shell. Jika\n"
+" sebuah SIGNAL_SPEC adalah DEBUG, ARG dijalankan setiap perintah "
+"sederhana.\n"
+" \n"
+" Jika tidak ada argumen yang diberikan, trap menampilkan daftar dari "
+"perintah yang berasosiasi\n"
+" dengan setiap sinyal.\n"
+" \n"
+" Pilihan:\n"
+" -l\tmenampilkan sebuah daftar dari nama sinyal dan nomor yang "
+"berhubungan\n"
+" -p\tmenampilkan perintah trap yang berasosiasi dengan setiap "
+"SIGNAL_SPEC\n"
+" \n"
+" Setiap SIGNAL_SPEC yang ada di nama sinyal dalam <signal.h> atau nomor "
+"sinyal. Nama sinyal\n"
+" adalah case insensitive dan SIG prefix adalah opsional. sebuah\n"
+" sinyal dapat dikirim ke sebuah shell dengan \"kill -signal $$\".\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali sebuah SIGSPEC adalah tidak valid atau "
+"sebuah pilihan tidak valid diberikan."
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+"Tampilkan informasi tentang perintah yang diketik.\n"
+" \n"
+" Untuk setiap NAMA, indikasikan bagaimana ini akan diinterpretasikan jika "
+"digunakan sebagai sebuah\n"
+" nama perintah.\n"
+" \n"
+" Pilihan:\n"
+" -a\tmenampilkan seluruh lokasi yang berisi sebuah nama NAMA yang dapat "
+"dijalankan;\n"
+" \tmeliputi aliases, builtins, dan fungsi, jika dan hanya jika\n"
+" \tpilihan `-p' juga sedang tidak digunakan\n"
+" -f\tmenekan pencarian fungsi shell\n"
+" -P\tmemaksa sebuah JALUR pencarian untuk setiap NAMA, bahkan jika ini "
+"adalah sebuah alias,\n"
+" \tbuiltin, atau fungsi, dan mengembalikan nama dari berkas disk\n"
+" \tyang akan dijalankan\n"
+" -p\tmengembalikan baik nama dari berkas disk yang akan dijalankan,\n"
+" \tatau tidak sama sekali jika `type -t NAME' akan mengembalikan "
+"`berkas'.\n"
+" -t\tkeluarkan sebuah kata tunggal yang merupakan salah satu dari "
+"`alias', `keyword',\n"
+" \t`fungsi', `builtin', `berkas', atau `', jika NAMA adalah sebuah alias, "
+"shell\n"
+" \treserved word, fungsi shell, builtin shell, berkas disk, atau\n"
+" \ttidak ditemukan\n"
+" \n"
+" Argumen:\n"
+" NAMA\tNama perintah yang akan diinterpretasikan.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses jika seluruh dari NAMA ditemukan; gagal jika ada "
+"yang tidak ditemukan."
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Modifikasi batas sumber daya shell.\n"
+" \n"
+" memberikan kontrol terhadap sarana yang tersedia untuk proses\n"
+" yang dimulai oleh shell, dalam sistem yang mengijinkan untuk kontrol "
+"tersebut.\n"
+" \n"
+" Pilihan:\n"
+" -S\tgunakan `soft' batas sarana\n"
+" -H\tgunakan `hard' batas sarana\n"
+" -a\tsemua batas ditampilkan\n"
+" -c\tukuram maksimum untuk berkas cores yang dibuat\n"
+" -d\tukuran maksimum untuk sebuah proses data segment\n"
+" -e\tprioritas antrian maksimum ('nice')\n"
+" -f\tukuran maksimum berkas yang ditulis oleh shell dan anaknya\n"
+" -l\tjumlah maksimum dari sinyal tertunda\n"
+" -m\tukuran maksimum dari resident\n"
+" -n\tjumlah maksimum dari berkas deskriptor yang terbuka\n"
+" -p\tukuran pipe buffer\n"
+" -q\tjumlah maksimum dari bytes dalam POSIX pesan antrian\n"
+" -r\tprioritas maksimum dari real-time scheduling\n"
+" -s\tukuran maksimum dari stack\n"
+" -t\tjumlah maksimum dari waktu cpu dalam detik\n"
+" -u\tjumlah maksimum dari proses pengguna\n"
+" -v\tukuran dari memori virtual\n"
+" -x\tjumlah maksimum dari berkas pengunci\n"
+" \n"
+" Jika BATAS diberikan, maka nilai baru yang dispesifikasikan untuk "
+"sarana;\n"
+" nilai spesial LIMIT `soft', `hard', dan `unlimited' berarti untuk\n"
+" soft limit saat ini, jika hard limit saat ini dan no limit, "
+"respectively.\n"
+" Jika tidak, nilai sekarang dari sarana yang dispesifikasikan "
+"ditampilkan.\n"
+" Jika tidak ada pilihan yang diberikan, maka -f diasumsikan.\n"
+" \n"
+" Nilai adalah dalam 1024-byte increments, kecuali untuk -t, yang berarti "
+"dalam detik\n"
+" -p, yang berarti increment dalam 512 bytes, dan -u, yang berarti "
+"unscaled dari\n"
+" jumlah proses.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau "
+"sebuah error terjadi."
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+"Tampilkan atau set mask mode dari berkas.\n"
+" \n"
+" Set pembuatan berkas pengguna mask dengan MODE. Jika MODE diabaikan, "
+"tampilkan\n"
+" nilai dari mask sekarang.\n"
+" \n"
+" Jika MODE diawali dengan sebuah digit, ini diinterpretasikan sebagai "
+"sebuah bilangan oktal;\n"
+" jika tidak ini adalah sebuah mode simbolik seperti yang diterima oleh "
+"chmod(1).\n"
+" \n"
+" Pilihan:\n"
+" -p\tjika MODE diabaikan, keluarkan dalam sebuah format yang bisa "
+"digunakan sebagai masukan\n"
+" -S\tmembuat keluaran simbolik; jika tidak sebuah bilangan oktal adalah "
+"keluarannya\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali MODE tidak valid atau sebuah pilihan tidak "
+"valid diberikan."
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Tunggu untuk penyelesaian pekerjaan dan kembalikan status keluar.\n"
+" \n"
+" Tunggu untuk proses yang diidentifikasikan oleh ID, yang mungkin sebuah "
+"proses ID atau sebuah\n"
+" spesifikasi pekerjaan, dan laporkan status selesainya. Jika ID tidak\n"
+" diberikan, tunggu untuk seluruh proses anak yang aktif, dan status "
+"kembalian\n"
+" adalah nol. Jika ID adalah sebuah spesifikasi pekerjaan, tunggu untuk "
+"seluruh proses\n"
+" dalam pipeline pekerjaan.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan status dari ID; gagal jika ID tidak valid atau sebuah "
+"pilihan tidak\n"
+" valid diberikan."
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Tunggu untuk penyelesaian proses dan kembalikan status keluar.\n"
+" \n"
+" Tunggu untuk proses yang dispesifikasikan dan laporkan status "
+"selesainya. Jika\n"
+" PID tidak diberikan, maka semua aktif proses anak ditunggu,\n"
+" dan kode kembalian adalah nol. PID dapat berupa proses ID.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan status dari ID; gagal jika ID tidak valid atau sebuah "
+"pilihan tidak valid\n"
+" diberikan."
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Jalankan perintah untuk setiap anggota dalam sebuah daftar.\n"
+" \n"
+" `for' loop menjalankan urutan dari perintah untuk setiap anggota dalam "
+"sebuah\n"
+" daftar dari items. Jika `in KATA ...;' tidak ada, maka `in \"$@\"' yang\n"
+" menjadi asumsi. Untuk setiap elemen dalam KATA, NAMA di set untuk elemen "
+"tersebut, dan\n"
+" PERINTAH dijalankan.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan status dari perintah terakhir yang dijalankan."
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Arithmetic untuk loop.\n"
+" \n"
+" Sama dengan\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tPERINTAH\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, dan EXP3 adalah expresi arithmetic. Jika setiap expresi\n"
+" diabaikan, ini berjalan seperti jika dievaluasi ke 1.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan status dari perintah terakhir yang dijalankan."
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Pilih kata dari sebuah daftar dan jalankan perintah.\n"
+" \n"
+" WORDS diexpand, menghasilkan daftar dari kata.\n"
+" set dari kata yang diexpand ditampilkan dalam standar error, setiap\n"
+" keluaran diawali dengan sebuah nomor. Jika `in WORDS' tidak ada, `in \"$@"
+"\"'\n"
+" diasumsikan. Kemudian PS3 prompt ditampilkan dan sebuah baris dibaca\n"
+" dari standar masukan. Jika baris berisi dari nomor yang\n"
+" berhubungan dengan salah sata kata yang ditampilkan, maka NAMA diset\n"
+" ke WORD tersebut. Jika baris kosong, WORDS dan prompt\n"
+" ditampilkan kembali. Jika EOF dibaca, perintah selesai. Baris yang "
+"dibaca disimpan\n"
+" dalam variabel REPLY. PERINTAH dijalankan setelah setiap seleksi\n"
+" sampai perintah break dijalankan.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan status dari perintah terakhir yang dijalankan."
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+"Melaporkan waktu yang dihabiskan dalam menjalan eksekusi pipeline.\n"
+" \n"
+" Jalankan PIPELINE dan tampilkan ringkasan dari real time, user CPU "
+"time,\n"
+" dan sistem CPU time yang dihabiskan dalam menjalankan PIPELINE ketika "
+"ini selesai.\n"
+" \n"
+" Pilihan:\n"
+" -p\tmenampilkan ringkasan waktu dalam format portable Posix\n"
+" \n"
+" Status Keluar:\n"
+" Status kembali adalah status kembali dari PIPELINE."
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Menjalankan perintah berdasarkan pencocokan pola.\n"
+" \n"
+" Secara selektif menjalankan PERINTAH berdasarkan dari KATA yang cocok "
+"dengan POLA.\n"
+" `|' digunakan untuk memisahkan beberapa pola. \n"
+" Status Keluar:\n"
+" Mengembalikan setatus dari perintah terakhir yang dijalankan."
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Menjalankan perintah berdasarkan kondisi.\n"
+" \n"
+" Daftar `if PERINTAH' dijalankan. Jika ini memberikan status keluaran "
+"nol, maka\n"
+" daftar `then PERINTAH' dijalankan. Jika tidak, setiap daftar dari `elif "
+"PERINTAH' \n"
+" dijalankan satu satu, dan jika ini memberikan status keluaran nol, untuk "
+"setiap\n"
+" daftar dari `then PERINTAH' yang dijalankan maka perintah `if' selesai. "
+"Jika tidak,\n"
+" daftar `else PERINTAH' dijalankan, jika ada. Status keluaran dari \n"
+" seluruh construct adalah status keluaran dari perintah terakhir yang "
+"dijalankan, atau nol\n"
+" jika tidak ada kondisi yang diperiksa benar.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan status dari perintah terakhir yang dijalankan."
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Menjalankan perintah sepanjang pemeriksaan sukses.\n"
+" \n"
+" Expand dan jalankan PERINTAH sepanjang akhir perintah dari\n"
+" PERINTAH `while' telah memberikan status keluaran nol.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan status dari perintah terakhir yang dijalankan."
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Menjalankan perintah sepanjang pemeriksaan tidak sukses.\n"
+" \n"
+" Expand dan jalankan PERINTAH sepanjang akhir perintah dari\n"
+" PERINTAH `until' telah memberikan status keluaran bukan nol. \n"
+" Status Keluar:\n"
+" Mengembalikan status dari perintah terakhir yang dijalankan."
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+"Buat sebuah koproses dengan nama NAMA.\n"
+" \n"
+" Jalankan PERINTAH secara tidak sinkron, dengan standar keluaran dan\n"
+" standar masukan dari perintah terhubung melalui sebuah pipa berkas\n"
+" pipa deskripsi yang ditandai dengan 0 dan 1 dari sebuah susunan NAMA\n"
+" variabel dalam shell yang dijalankan.\n"
+" Nama baku adalah \"COPROC\".\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan status keluar dari PERINTAH."
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+"Definisikan fungsi shell.\n"
+" \n"
+" Buat sebuah fungsi shell dengan nama NAMA. Ketika dipanggil sebagai "
+"sebuah perintah sederhana,\n"
+" NAMA menjalankan PERINTAH dalam context shell pemanggil. Ketika NAMA "
+"dipanggil,\n"
+" argumen dilewatkan ke fungsi sebagai $1...$n, dan nama fungsi\n"
+" dalam $FUNCNAME.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali NAMA adalah baca-saja."
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Grup perintah sebagai sebuah unit.\n"
+" \n"
+" Jalankan sebuah set dari perintah dalam grup. Ini adalah salah satu cara "
+"untuk meredirect\n"
+" seluruh set dari perintah.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan status dari perintah terakhir yang dieksekusi."
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+"Melanjutkan pekerjaan dalam foreground.\n"
+" \n"
+" Sama dengan JOB_SPEC argumen untuk perintah `fg'. Melanjutkan sebuah\n"
+" pekerjaan yang telah berhenti atau menjadi background. JOB_SPEC dapat "
+"dispesifikasikan dengan nama job\n"
+" atau nomor job. JOB_SPEC diikuti dengan sebuah `&' menempatkan job "
+"dalam\n"
+" background, seperti dalam spesifikasi pekerjaan yang telah "
+"dispesifikasikan sebagai sebuah\n"
+" argumen untuk `bg'.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan status dari pekerjaan yang dilanjutkan."
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+"Evaluasi ekspresi arithmetic.\n"
+" \n"
+" EXPRESI dievaluasi berdasarkan dalam aturan evaluasi\n"
+" arithmetic. Sama dengan \"let EXPRESI\".\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan 1 jika EXPRESI dievaluasi ke 0; mengembalikan 0 jika tidak."
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+"Menjalankan perintah kondisional.\n"
+" \n"
+" Mengembalikan sebuah status dari 0 atau 1 tergantung dari evaluasi dari\n"
+" kondisi expresi EXPRESI. Expresi disusun dari primari yang sama dari "
+"yang digunakan\n"
+" oleh `test' builtin, dan boleh dikombinasikan dengan menggunakan "
+"operator berikut\n"
+" \n"
+" ( EXPRESI )\tMengembalikan nilai dari EXPRESI\n"
+" ! EXPRESI\t\tBenar jika kedua EXPR1 dan EXPR2 adalah benar; selain itu "
+"salah\n"
+" EXPR1 && EXPR2\tBenar jika kedua EXPR1 dan EXPR2 adalah benar; selain "
+"itu salah\n"
+" EXPR1 || EXPR2\tBenar jika salah satu EXPR1 atau EXPR2 adalah benar; "
+"selain itu salah\n"
+" \n"
+" Ketika operator `==' dan `!=' digunakan, string yang disebelah kanan "
+"dari \n"
+" operator yang digunakan sebagai sebuah pola dan pencocokan pola "
+"dilakukan.\n"
+" Ketika operator `=~' digunakan, string yang dikanan dari operator\n"
+" dicocokan sebagai sebuah ekspresi regular.\n"
+" \n"
+" Operator && dan || tidak mengevaluasi EXPR2 jika EXPR1 tidak mencukupi "
+"untuk\n"
+" menentukan nilai dari expresi.\n"
+" \n"
+" Status Keluar:\n"
+" 0 atau 1 tergantun dari nilai dari EKSPRESI."
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+"Nama variabel shell umum dan penggunaannya.\n"
+" \n"
+" BASH_VERSION\tInformasi versi dari Bash ini.\n"
+" CDPATH\tSebuah daftar yang dipisahkan oleh titik dua dari direktori "
+"untuk mencari\n"
+" \t\tdirektori yang diberikan sebagai argumen untuk `cd'.\n"
+" GLOBIGNORE\tSebuah daftar pola yang dipisahkan dengan titik dua "
+"menjelaskan nama berkas yang\n"
+" \t\tdiabaikan oleh pathname expansion.\n"
+" HISTFILE\tNama dari berkas dimana sejara perintah anda disimpan.\n"
+" HISTFILESIZE\tJumlah maksimum dari baris dimana berkas ini berisi.\n"
+" HISTSIZE\tJumlah maksimum dari baris sejarah yang sedang berjalan\n"
+" \t\tketika shell sedang menaksesnya.\n"
+" HOME\tNama jalur lengkap ke direktori login anda.\n"
+" HOSTNAME\tNama dari host saat ini.\n"
+" HOSTTYPE\tTipe dari CPU dari veri Bash yang sedang berjalan.\n"
+" IGNOREEOF\tKendalikan aksi dari shell ketika menerima sebuah EOF\n"
+" \t\tkarakter sebagai masukan. Jika diset, maka nilai\n"
+" \t\tdari jumlah karakter EOF yang bisa diterima\n"
+" \t\tdalam sebuah baris dalam baris kosong sebelum shell keluar\n"
+" \t\t(default 10). Ketika diunset, EOF menandakan akhir dari masukan.\n"
+" MACHTYPE\tSebuah kata yang menjelaskan system yang berjalan ketika Bash "
+"berjalan.\n"
+" MAILCHECK\tSeberapa sering, dalam detik, Bash memeriksa pesan baru.\n"
+" MAILPATH\tDaftar dari nama berkas yang dipisahkan oleh titik-dua dimana "
+"Bash memeriksa\n"
+" \t\tpesan baru.\n"
+" OSTYPE\tVersi Unix dari Versi Bash yang sedang berjalan.\n"
+" PATH\tDaftar direktori yang dipisahkan oleh titik-dua untuk mencari "
+"ketika\n"
+" \t\tmencari perintah.\n"
+" PROMPT_COMMAND\tSebuah perintah yang dijalankan sebelum menampilkan "
+"setiap\n"
+" \t\tmasukan utama.\n"
+" PS1\t\tKata prompt utama.\n"
+" PS2\t\tKata prompt kedua.\n"
+" PWD\t\tNama jalur lengkat dari direktori sekarang.\n"
+" SHELLOPTS\tDaftar dari shell pilihan yang dipisahkan oleh titik-dua.\n"
+" TERM\tNama dari tipe terminal sekarang.\n"
+" TIMEFORMAT\tFormat keluaran dari statistik waktu yang ditampilkan oleh\n"
+" \t\t`time' kata yang direserved.\n"
+" auto_resume\tTidak kosong berarti sebuah kata perintah akan munncul di "
+"sebuah baris dengan\n"
+" \t\tsendirinya adalah pertama dicari dalam daftar dari\n"
+" \t\tpekerjaan yang terhenti sekarang. Jika ditemukan disana, maka "
+"pekerjaan intu di foregroundkan.\n"
+" \t\tNila dari `exact' berarti kata perintah harus\n"
+" \t\tcocok secara tepat dalam daftar dari pekerjaan yang terhenti. "
+"Sebuah\n"
+" \t\tNila dari `substring' berarti bahwa kata perintah harus cocok\n"
+" \t\tdengan substring dari pekerjaan. Nilai yang lain berarti\n"
+" \t\tperintah harus diawali dari sebuah pekerjaan yang terhenti.\n"
+" histchars\tKarakter pengendali history expansion dan pensubstitusi\n"
+" \t\tcepat. Karakter pertama adalah karakter\n"
+" \t\tpengganti sejarah, biasanya `!'. Karakter kedua\n"
+" \t\tdari `quick substitution', biasanya `^'. Karakter\n"
+" \t\tketiga adalah karakter `history comment'. biasanya `#',\n"
+" HISTIGNORE\tSebuah daftar pola yang dipisahkan oleh titik dua yang "
+"digunakan untuk menentukan dimana\n"
+" \t\tperintah seharusnya disimpan dalam daftar sejarah.\n"
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Menambahkan direktori ke stack.\n"
+" \n"
+" Menambahkan sebuah direktori ke top dari direktori stack, atau merotasi\n"
+" stack, membuah top baru dari stack dari working direktori saat ini.\n"
+" Tanpa argumen, menukar top dari dua direktori.\n"
+" \n"
+" Pilihan:\n"
+" -n\tmenekan perubahan normal dari direktori ketika menambahkan "
+"direktori\n"
+" \tke stack, jadi hanya stack yang dimanipulasi.\n"
+" \n"
+" Argumen:\n"
+" +N\tMerotasi stack sehingga direktori ke N (dihitung\n"
+" \tdari kiri dari daftar yang terlihat oleh `dirs', dimulai dengan\n"
+" \tnol) adalah di top.\n"
+" \n"
+" -N\tMerotasi stack sehingga direktori ke N (dihitung\n"
+" \tdari kanan dari daftar yang terliha oleh `dirs', dimulai dengan\n"
+" \tnol) adalah di top.\n"
+" \n"
+" dir\tenambahkan DIR ke direktori stack di puncak, membuatnya\n"
+" \tdirektori kerja sekarang.\n"
+" \n"
+" Builtin `dirs' menampilkan direktori stack.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali ada sebuah argumen tidak valid diberikan "
+"atau pemindahan\n"
+" direktori gagal."
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Hapus direktori dari stack.\n"
+" \n"
+" Manghapus masukan dalam direktori stack. Tanpa argumen,\n"
+" menghapus top direktori dari stack, dan cd's ke top\n"
+" direktori baru.\n"
+" \n"
+" Pilihan:\n"
+" -n\tmenekan perubahan normal dari direktori ketika menghapus "
+"direktori\n"
+" \tdari stack, jadi hanya stack yang dimanipulasi.\n"
+" \n"
+" Argumen:\n"
+" +N\tmenghapus masukan ke N dihitung dari kiri dari daftar\n"
+" \tyang ditampilkan oleh `dirs', dimulai dari nol. Sebagai contoh: `popd "
+"+0'\n"
+" \tmenghapus direktori terakhir, `popd +1' sebelum terakhir.\n"
+" \n"
+" -N\tmenghapus masukan ke N dihitung dari kanan dari daftar\n"
+" \tyang ditampilkan oleh `dirs', dimulai dari nol. Sebagai contoh: `popd -"
+"0'\n"
+" \tmenghapus direktori terakhir, `popd -1' sebelum terakhir.\n"
+" \n"
+" Builtin `dirs' menampilkan direktori stack.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali ada sebuah argumen tidak valid diberikan "
+"atau pemindahan\n"
+" direktori gagal."
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Menampilkan direktori stack.\n"
+" \n"
+" Menampilkan daftar dari direktori yang diingat saat ini. Direktori\n"
+" menemukan jalannya kedalam daftar dengan perintah `pushd'; anda dapat "
+"memperoleh\n"
+" backup melalui daftar dengan perintah `popd'.\n"
+" \n"
+" Pilihan:\n"
+" -c\tmenghapus direktori stack dengan menghapus seluruh elemen.\n"
+" -l\tjangan menampilkan versi yang diawali tilde dari direktori yang "
+"relatif\n"
+" \tke direktori rumah anda\n"
+" -p\tmenampilkan direktori stack dengan satu masukan setiap baris\n"
+" -v\tmenampilkan direktori stack dengan satu masukan setiap baris "
+"diawali\n"
+" \tdengan posisinya dalam stack\n"
+" Argumen:\n"
+" +N\tmenampilkan masukan ke N dihitung dari kiri dari daftar yang "
+"ditampilkan oleh\n"
+" \tdirs ketika dijalankan tanpa pilihan, dimulai dari nol.\n"
+" \n"
+" -N\tmenampilkan masukan ke N dihitung dari kanan dari daftar yang "
+"ditampilkan oleh\n"
+" \tdirs ketika dijalankan tanpa pilihan, dimulai dari nol. \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali ada sebuah pilihan tidak valid diberikan "
+"atau sebuah error terjadi."
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+"Set dan unset pilihan shell.\n"
+" \n"
+" Ubah setting untuk setiap pilihan shell OPTNAME. Tanpa pilihan\n"
+" argumen apapun, tampilkan daftar shell pilihan dengan sebuah indikasi\n"
+" ya atau tidak setiap pilihan di set.\n"
+" \n"
+" Pilihan:\n"
+" -o\tbatasi OPTNAME ke definisi untuk digunakan dengan `set -o'\n"
+" -p\ttampilkan setiap pilihan shell dengan sebuah indikasi dari "
+"statusnya\n"
+" -q\ttekan keluaran\n"
+" -s\taktifkan (set) setiap OPTNAME\n"
+" -u\tnonaktifkan (unset) setiap OPTNAME\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses jika OPTNAME diaktifkan; gagal jika sebuah pilihan "
+"tidak valid diberikan\n"
+" atau OPTNAME dinonaktifkan."
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+"Format dan tampilkan ARGUMEN dalam kontrol dari FORMAT.\n"
+" \n"
+" Pilihan:\n"
+" -v var\tkeluaran ditempatkan dalam sebuah nilai dari variabel\n"
+" shell VAR daripada dikirimkan ke keluaran standar.\n"
+" \n"
+" FORMAT adalah sebuah karakter string yang berisi dari tiga tipe dari "
+"objects: plain\n"
+" karakter, yang disalin secara sederhana dari keluaran standar, karakter "
+"escape\n"
+" sequences yang mengubah dan menyalin keluaran standar, dan\n"
+" spesifikasi format, yang selalu menampilkan argumen\n"
+" \n"
+" Tambahan dari spesifikasi standar printf(1) formats dan\n"
+" printf(3), printf menginterprestasikan:\n"
+" \n"
+" %b berarti untuk menexpand backslash escape sequences dalam argumen "
+"yang sesuai\n"
+" %q berarti meng-quote argumen dalam sebuah cara yang dapat digunakan "
+"sebagai masukan shell.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau "
+"sebuah penulisan atau penempatan\n"
+" error terjadi."
+
+#: builtins.c:1895
+#, fuzzy
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Spesifikasikan bagaimana argumen akan diselesaikan oleh Readline.\n"
+" \n"
+" Untuk setiap NAMA, spesifikasikan bagaimana argumen akan diselesaikan. "
+"Jika tidak ada pilihan\n"
+" yang diberikan, spesifikasi penyelesaian yang sudah ada akan ditampilkan "
+"dalam cara\n"
+" yang diperbolehkan untuk digunakan sebagai masukan.\n"
+" \n"
+" Pilihan:\n"
+" -p\ttampilkan spesifikasi penyelesaian yang telah ada dalam format "
+"yang berguna\n"
+" -r\thapus sebuah spesifikasi penyelesaian untuk setiap NAMA, atau jika "
+"tidak ada\n"
+" \tNAMA yang diberikan, seluruh spesifikasi penyelesaian\n"
+" \n"
+" Ketika penyelesaian dicoba, aksi yang dilakukan dalam urutan\n"
+" huruf besar pilihan yang ditampilkan diatas.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau "
+"sebuah error terjadi."
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Menampilkan kemungkinan penyelesaian tergantung dari pilihan.\n"
+" \n"
+" Ditujukan untuk digunakan dari dalam sebuah fungsi shell yang "
+"menghasilkan kemungkinan untuk completions.\n"
+" Jika argumen WORD opsional yang diberikan, cocok dengan WORD telah\n"
+" dihasilkan.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau "
+"sebuah error terjadi."
+
+#: builtins.c:1938
+#, fuzzy
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+"Modifikasi atau tampilkan pilihan penyelesaian.\n"
+" \n"
+" Modifikasi pilihan penyelesaian untuk setiap NAMA, atau, jika tidaka ada "
+"NAMA yang diberikan,\n"
+" penyelesaian mulai dijalankan. Jika tidak ada OPSI yang diberikan, "
+"tampilkan\n"
+" pilihan penyelesaian untuk setiap NAMA atau spesifikasi penyelesaian "
+"sekarang.\n"
+" \n"
+" Pilihan:\n"
+" \t-o option\tSet pilihan penyelesaian OPSI untuk setiap NAMA\n"
+" \n"
+" Gunakan `+o' daripada `-o' matikan pilihan yang dispesifikasikan.\n"
+" \n"
+" Argumen:\n"
+" \n"
+" Setiap NAMA yang dirujuk dalam sebuah perintah untuk sebuah spesifikasi "
+"penyelesaian harus\n"
+" sebelumnya telah didefinisikan dengan menggunakan builtin `complete'. "
+"Jika tidak ada NAMA\n"
+" yang diberikan, compopt harus dipanggil oleh sebuah fungsi yang dibuat "
+"oleh penyelesaian sekarang,\n"
+" dan pilihan untuk menjalankan penyelesaian sekarang\n"
+" telah dimodifikasi.\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau "
+"NAMA tidak memiliki\n"
+" spesifikasi penyelesaian yang terdefinisi."
+
+#: builtins.c:1968
+#, fuzzy
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+"Baca baris dari standar masukan kedalam sebuah susunan variabel.\n"
+" \n"
+" Baca baris dari standar masukan kedalam variabel array ARRAY, atau dari\n"
+" berkas deskripsi FD jika pilihan -u diberikan. Variabel MAPFILE adalah\n"
+" baku ARRAY.\n"
+" \n"
+" Pilihan:\n"
+" -n count\tSalin di baris COUNT. Jika COUNT adalah 0, semua baris "
+"disalin.\n"
+" -O origin\tAwal penempatan ke ARRAY di index ORIGIN. Default index "
+"adalah 0.\n"
+" -s count \tAbaikan baris COUNT pertama yang dibaca.\n"
+" -t\t\tHapus sebuah akhiran baris baru dari setiap baris yang dibaca.\n"
+" -u fd\t\tBaca baris dari berkas deskripsi FD daripada dari masukan "
+"standar.\n"
+" -C callback\tEvaluasi CALLBACK untuk setiap waktu QUANTUM baris adalah "
+"baca.\n"
+" -c quantum\tSpesifikasikan jumlah dari baris yang dibaca diantara "
+"setiap pemanggilan ke CALLBACK.\n"
+" \n"
+" Argumen:\n"
+" ARRAY\t\tNama variabel array yang digunakan untuk berkas data.\n"
+" \n"
+" Jika -C Diberikan tanpa -c, default quantum adalah 5000.\n"
+" \n"
+" Jika tidak diberikan dengan asal secara eksplisit, berkas peta akan "
+"menghapus ARRAY sebelum\n"
+" ditempatkan kepadanya\n"
+" \n"
+" Status Keluar:\n"
+" Mengembalikan sukses kecuali sebuah pilihan tidak valid diberikan atau "
+"ARRAY adalah baca-saja."
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+"Baca baris dari sebuah berkas kedalam sebuah susunan variabel.\n"
+" \n"
+" Sebuah sinonim untuk `mapfile'."
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: tidak dapat menrealokasikan %lu bytes (%lu bytes teralokasikan)"
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: tidak dapat mengalokasikan %lu bytes"
+
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: %s: %d: tidak dapat melakukan reallokasi %lu bytes (%lu bytes "
+#~ "teralokasi)"
+
+#~ msgid " "
+#~ msgstr " "
+
+#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR,"
+#~ msgstr ""
+#~ "Tanpa EXPR, mengembalikan kembalian \"$line $filename\". Dengan EXPR,"
+
+#~ msgid "returns \"$line $subroutine $filename\"; this extra information"
+#~ msgstr ""
+#~ "mengembalikan \"$line $subroutine $filename\"; informasi tambahan ini"
+
+#~ msgid "can be used used to provide a stack trace."
+#~ msgstr "dapat digunakan untuk menyediakan jejak sebuah stack."
+
+#~ msgid ""
+#~ "The value of EXPR indicates how many call frames to go back before the"
+#~ msgstr ""
+#~ "Nilai dari EXPR mengindikasikan berapa banyak call frames untuk kembali "
+#~ "sebelum"
+
+#~ msgid "current one; the top frame is frame 0."
+#~ msgstr "salah satu ini; top frame adalah frame 0."
+
+#~ msgid "%s: invalid number"
+#~ msgstr "%s: nomor invalid"
+
+#~ msgid "Shell commands matching keywords `"
+#~ msgstr "Perintah shell cocok dengan kata kunci `"
+
+#~ msgid "Display the list of currently remembered directories. Directories"
+#~ msgstr "Tampilkan daftar dari direktori yang diingat sekarang. Direktori"
+
+#~ msgid "find their way onto the list with the `pushd' command; you can get"
+#~ msgstr ""
+#~ "menemukan jalannya sendiri kedalam daftar dengan perintah `pushd'; anda "
+#~ "dapat memperoleh"
+
+#~ msgid "back up through the list with the `popd' command."
+#~ msgstr "bantuan melalui daftar dari perintah `popd'."
+
+#~ msgid ""
+#~ "The -l flag specifies that `dirs' should not print shorthand versions"
+#~ msgstr ""
+#~ "Flag -l menspesifikasikan bahwa `dirs' seharusnya tidak menampilkan versi "
+#~ "pendek"
+
+#~ msgid ""
+#~ "of directories which are relative to your home directory. This means"
+#~ msgstr "dari direktori yang relatif dari direktori home anda. Ini berarti"
+
+#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag"
+#~ msgstr ""
+#~ "bahwa `~/bin' mungkin ditampilkan sebagai `/homes/bfox/bin'. Pilihan -v"
+
+#~ msgid "causes `dirs' to print the directory stack with one entry per line,"
+#~ msgstr ""
+#~ "menyebabkan `dirs' ditampilkan di stack direktori dengan satu masukan per "
+#~ "baris,"
+
+#~ msgid ""
+#~ "prepending the directory name with its position in the stack. The -p"
+#~ msgstr "mendahului nama direktori dengan posisinya dalam stack. Pilihan -p"
+
+#~ msgid "flag does the same thing, but the stack position is not prepended."
+#~ msgstr "melakukan hal yang sama, tetapi posisi stack tidak didahului."
+
+#~ msgid ""
+#~ "The -c flag clears the directory stack by deleting all of the elements."
+#~ msgstr ""
+#~ "Pilihan -c menghapus direktori stack dengan cara menghapus seluruh elemen."
+
+#~ msgid ""
+#~ "+N displays the Nth entry counting from the left of the list shown by"
+#~ msgstr ""
+#~ "+N menampilkan masukan ke N dihitung dari kiri dari daftar yang "
+#~ "ditampilkan oleh"
+
+#~ msgid " dirs when invoked without options, starting with zero."
+#~ msgstr " dirs ketika dipanggil tanpa pilihan, dimulai dengan nol."
+
+#~ msgid ""
+#~ "-N displays the Nth entry counting from the right of the list shown by"
+#~ msgstr ""
+#~ "-N menampilkan masukan ke N dihitung dari kanan dari daftar yang "
+#~ "ditampilkan dengan"
+
+#~ msgid "Adds a directory to the top of the directory stack, or rotates"
+#~ msgstr ""
+#~ "menambahkan sebuah direktori ke ujung atas dari direktori stack, atau "
+#~ "memutar"
+
+#~ msgid "the stack, making the new top of the stack the current working"
+#~ msgstr "stack, membuat sebuah top baru dari stack direktori yang dipakai"
+
+#~ msgid "directory. With no arguments, exchanges the top two directories."
+#~ msgstr "saat ini. Tanpa argumen, menukar top dari dua direktori."
+
+#~ msgid "+N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "+N Memutar stack sehingga direktori ke N (dihitung"
+
+#~ msgid " from the left of the list shown by `dirs', starting with"
+#~ msgstr ""
+#~ " dari kiri dari daftar yang ditampilkan oleh `dirs', dimulai dari"
+
+#~ msgid " zero) is at the top."
+#~ msgstr " nol) ini dilakukan di top."
+
+#~ msgid "-N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "-N Memutar stact sehingga direktori ke N (dihitung"
+
+#~ msgid " from the right of the list shown by `dirs', starting with"
+#~ msgstr ""
+#~ " dari kanan dari daftar yang ditampilkan oleh `dirs', dimulai dengan"
+
+#~ msgid "-n suppress the normal change of directory when adding directories"
+#~ msgstr ""
+#~ "-n menekan perubahan normal dari direktori ketika menambahkan direktori"
+
+#~ msgid " to the stack, so only the stack is manipulated."
+#~ msgstr " ke stack, jadi hanya stack yang dimanipulasi."
+
+#~ msgid "dir adds DIR to the directory stack at the top, making it the"
+#~ msgstr "dir menambahkan DIR ke direktori stack di top, membuatnya "
+
+#~ msgid " new current working directory."
+#~ msgstr " menjadi direktori baru untuk bekerja."
+
+#~ msgid "You can see the directory stack with the `dirs' command."
+#~ msgstr "Anda dapat melihat direktori stack dengan perintah `dirs'."
+
+#~ msgid "Removes entries from the directory stack. With no arguments,"
+#~ msgstr "Hapus masukan dari direktori stack. Tanpa argumen,"
+
+#~ msgid "removes the top directory from the stack, and cd's to the new"
+#~ msgstr "menghapus top direktori dari stack, dan pindah ke"
+
+#~ msgid "top directory."
+#~ msgstr "top direktori yang baru."
+
+#~ msgid "+N removes the Nth entry counting from the left of the list"
+#~ msgstr "+N menghapus masukan ke-N dihitung dari kiri dari daftar"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'"
+#~ msgstr " yang terlihat oleh `dirs', dimulai dari nol. Contoh: `popd +0'"
+
+#~ msgid " removes the first directory, `popd +1' the second."
+#~ msgstr " menghapus direktori pertama, `popd +1' kedua."
+
+#~ msgid "-N removes the Nth entry counting from the right of the list"
+#~ msgstr "-N menghapus masukan ke N dihitung dari kanan dari daftar"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'"
+#~ msgstr " yang terlihat oleh `dirs', dimulai dari nol. Contoh: `popd -0'"
+
+#~ msgid " removes the last directory, `popd -1' the next to last."
+#~ msgstr ""
+#~ " menghapus direktori terakhir, `popd -1' selanjutnya ke terakhir."
+
+#~ msgid ""
+#~ "-n suppress the normal change of directory when removing directories"
+#~ msgstr ""
+#~ "-n menekan perubahan normal dari direktori ketika menghapus direktori"
+
+#~ msgid " from the stack, so only the stack is manipulated."
+#~ msgstr " dari stack, sehingga hanya stack yang dimanipulasi."
+
+#~ msgid "allocated"
+#~ msgstr "teralokasi"
+
+#~ msgid "freed"
+#~ msgstr "terbebaskan"
+
+#~ msgid "requesting resize"
+#~ msgstr "meminta resize"
+
+#~ msgid "just resized"
+#~ msgstr "just resized"
+
+#~ msgid "bug: unknown operation"
+#~ msgstr "bug: operasi tidak diketahui"
+
+#~ msgid "malloc: watch alert: %p %s "
+#~ msgstr "malloc: watch alert: %p %s "
+
+#~ msgid ""
+#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n"
+#~ " break N levels."
+#~ msgstr ""
+#~ "Keluar dari dalam sebuah FOR, WHILE, atau UNTIL loop. jika N "
+#~ "dispesifikasikan,\n"
+#~ " break N levels."
+
+#~ msgid ""
+#~ "Run a shell builtin. This is useful when you wish to rename a\n"
+#~ " shell builtin to be a function, but need the functionality of the\n"
+#~ " builtin within the function itself."
+#~ msgstr ""
+#~ "Jalankan sebuah builtin shell. Ini akan berguna ketika anda mengharapkan "
+#~ "untuk mengganti nama sebuah\n"
+#~ " shell builting ke sebuah fungsi, tetapi membutuhkan sebuah "
+#~ "fungsionalitas dari\n"
+#~ " sebuah fungsi builtin itu sendiri."
+
+#~ msgid ""
+#~ "Print the current working directory. With the -P option, pwd prints\n"
+#~ " the physical directory, without any symbolic links; the -L option\n"
+#~ " makes pwd follow symbolic links."
+#~ msgstr ""
+#~ "Tampilkan direktori yang sedang digunakan saat ini. Dengan pilihan -P, "
+#~ "pwd menampilkan\n"
+#~ " direktori physical, tanpa symbolic link yang lain; dengan pilihan -L\n"
+#~ " membuat pwd mengikuti symbolic links."
+
+#~ msgid "Return a successful result."
+#~ msgstr "Mengembalikan sebuah kembalian yang sukses."
+
+#~ msgid ""
+#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell\n"
+#~ " function called `ls', and you wish to call the command `ls', you can\n"
+#~ " say \"command ls\". If the -p option is given, a default value is "
+#~ "used\n"
+#~ " for PATH that is guaranteed to find all of the standard utilities. "
+#~ "If\n"
+#~ " the -V or -v option is given, a string is printed describing "
+#~ "COMMAND.\n"
+#~ " The -V option produces a more verbose description."
+#~ msgstr ""
+#~ "Menjalankan PERINTAH dengan ARGS mengabaikan fungsi shell. Jika anda "
+#~ "memiliki sebuah shell\n"
+#~ " fungsi yang memanggil `ls', dan anda berharap untuk memanggil "
+#~ "perintah `ls', anda dapat\n"
+#~ " mengatakan \"command ls\". Jika pilihan -p diberikan, sebuah nilai "
+#~ "default digunakan\n"
+#~ " untuk PATH yang menjamin untuk mencari semua utilitis standar. Jika\n"
+#~ " pilihan -V atau -v diberikan, sebuah string ditampilkan "
+#~ "mendeskripsikan PERINTAH.\n"
+#~ " Pilihan -V menghasilkan deskripsi yang lebih detail."
+
+#~ msgid ""
+#~ "Declare variables and/or give them attributes. If no NAMEs are\n"
+#~ " given, then display the values of variables instead. The -p option\n"
+#~ " will display the attributes and values of each NAME.\n"
+#~ " \n"
+#~ " The flags are:\n"
+#~ " \n"
+#~ " -a\tto make NAMEs arrays (if supported)\n"
+#~ " -f\tto select from among function names only\n"
+#~ " -F\tto display function names (and line number and source file name "
+#~ "if\n"
+#~ " \tdebugging) without definitions\n"
+#~ " -i\tto make NAMEs have the `integer' attribute\n"
+#~ " -r\tto make NAMEs readonly\n"
+#~ " -t\tto make NAMEs have the `trace' attribute\n"
+#~ " -x\tto make NAMEs export\n"
+#~ " \n"
+#~ " Variables with the integer attribute have arithmetic evaluation (see\n"
+#~ " `let') done when the variable is assigned to.\n"
+#~ " \n"
+#~ " When displaying values of variables, -f displays a function's name\n"
+#~ " and definition. The -F option restricts the display to function\n"
+#~ " name only.\n"
+#~ " \n"
+#~ " Using `+' instead of `-' turns off the given attribute instead. "
+#~ "When\n"
+#~ " used in a function, makes NAMEs local, as with the `local' command."
+#~ msgstr ""
+#~ "Declare variabel dan/atau memberikan atribut kepada mereka. Jika tidak "
+#~ "ada NAMA yang\n"
+#~ " diberikan, maka menampilkan nilai dari variabel. Pilihan -p\n"
+#~ " akan menampilkan atribut dan nilai dari setiap NAMA.\n"
+#~ " \n"
+#~ " Flags adalah:\n"
+#~ " \n"
+#~ " -a\tuntuk membuat aray NAMA (jika disupport)\n"
+#~ " -f\tuntuk memilih dari nama fungsi saja\n"
+#~ " -F\tuntuk menampilkan nama fungsi (dan nomor baris dan source nama "
+#~ "file jika\n"
+#~ " \tdebugging) tanpa definisi\n"
+#~ " -i\tuntuk membuat NAMA memiliki atribut `integer'\n"
+#~ " -r\tuntuk membuat NAMA baca-saja\n"
+#~ " -t\tuntuk membuat NAMA memiliki atribut `trace'\n"
+#~ " -x\tuntuk membuat NAME export\n"
+#~ " \n"
+#~ " Variabel dengan atribut integer memiliki arithmetic evaluasi (lihat\n"
+#~ " `let') selesai ketika variabel diberikan ke.\n"
+#~ " \n"
+#~ " Ketika menampilkan nilai dari variabel, -f menampilkan sebuah nama "
+#~ "fungsi\n"
+#~ " dan definisi. Pilihan -F menekan untuk menampikan nama\n"
+#~ " fungsi saja.\n"
+#~ " \n"
+#~ " Menggunakan `+' daripada `-' mematikan atribut yang diberikan. "
+#~ "Ketika\n"
+#~ " sedang digunkan dalam sebuah fungsi, membuat NAMA lokal, seperti "
+#~ "dalam perintah 'local'."
+
+#~ msgid "Obsolete. See `declare'."
+#~ msgstr "Kadaluarsa. Lihat `declare'."
+
+#~ msgid ""
+#~ "Create a local variable called NAME, and give it VALUE. LOCAL\n"
+#~ " can only be used within a function; it makes the variable NAME\n"
+#~ " have a visible scope restricted to that function and its children."
+#~ msgstr ""
+#~ "Membuat sebuah variabel lokal yang disebut NAMA, dan menampilkan NILAI-"
+#~ "nya. LOKAL\n"
+#~ " hanya dapat digunakan dalam sebuah fungsi; ini membuat NAMA variabel\n"
+#~ " memiliki scope visibel terbatas untuk fungsi itu dan anaknya."
+
+#~ msgid ""
+#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed."
+#~ msgstr ""
+#~ "Keluaran dari ARGs. Jika pilihan -n dispesifikasikan, akhiran baris baru "
+#~ "dihapus."
+
+#~ msgid ""
+#~ "Enable and disable builtin shell commands. This allows\n"
+#~ " you to use a disk command which has the same name as a shell\n"
+#~ " builtin without specifying a full pathname. If -n is used, the\n"
+#~ " NAMEs become disabled; otherwise NAMEs are enabled. For example,\n"
+#~ " to use the `test' found in $PATH instead of the shell builtin\n"
+#~ " version, type `enable -n test'. On systems supporting dynamic\n"
+#~ " loading, the -f option may be used to load new builtins from the\n"
+#~ " shared object FILENAME. The -d option will delete a builtin\n"
+#~ " previously loaded with -f. If no non-option names are given, or\n"
+#~ " the -p option is supplied, a list of builtins is printed. The\n"
+#~ " -a option means to print every builtin with an indication of whether\n"
+#~ " or not it is enabled. The -s option restricts the output to the "
+#~ "POSIX.2\n"
+#~ " `special' builtins. The -n option displays a list of all disabled "
+#~ "builtins."
+#~ msgstr ""
+#~ "Enable dan disable perintah builtin shell. Ini membolehkan\n"
+#~ " anda untuk menggunakan perintah disk yang memiliki nama sama seperti "
+#~ "sebuah NAMA\n"
+#~ " shell builtin tanpa menspesifikasikan sebuah pathname full. Jika "
+#~ "pilihan -n digunakan,\n"
+#~ " NAMA menjadi disabled; jika tidak NAMA menjadi enabled. Contoh,\n"
+#~ " gunakan `test' ditemukan dalam $PATH daripada dalam builtin versi\n"
+#~ " builtin shell, ketik `enable -n test'. Di system mensupport dynamic\n"
+#~ " loading, pilihan -f mungkin bisa digunakan untuk menload builtin baru "
+#~ "dari\n"
+#~ " shared object NAMAFILE. Pilihan -d akan menghapus sebuah builting\n"
+#~ " yang sebelumnya diload dengan pilihan -f. Jika tidak ada nama pilihan "
+#~ "yang diberikan, atau\n"
+#~ " pilihan -p diberikan, daftar dari builtin ditampilkan.\n"
+#~ " Pilihan -a berarti menampilkan setiap builtin dengan sebuah indikasi "
+#~ "apakah\n"
+#~ " atau tidak ini enabled. Pilihan -s membatasi keluaran ke POSIX.2\n"
+#~ " `special' builtins. Pilihan -n menampilkan daftar dari semua yang "
+#~ "builtins yang disabled."
+
+#~ msgid ""
+#~ "Read ARGs as input to the shell and execute the resulting command(s)."
+#~ msgstr ""
+#~ "Baca ARGs sebagai masukan ke shell dan jalankan untuk menghasilkan "
+#~ "perintah(s)."
+
+#~ msgid ""
+#~ "Exec FILE, replacing this shell with the specified program.\n"
+#~ " If FILE is not specified, the redirections take effect in this\n"
+#~ " shell. If the first argument is `-l', then place a dash in the\n"
+#~ " zeroth arg passed to FILE, as login does. If the `-c' option\n"
+#~ " is supplied, FILE is executed with a null environment. The `-a'\n"
+#~ " option means to make set argv[0] of the executed process to NAME.\n"
+#~ " If the file cannot be executed and the shell is not interactive,\n"
+#~ " then the shell exits, unless the shell option `execfail' is set."
+#~ msgstr ""
+#~ "Exec FILE, menimpa shell ini dengan aplikasi yang dispesifikasikan.\n"
+#~ " Jika FILE tidak dispesifikasikan, redirectiions mengambil efek dalam\n"
+#~ " shell ini. Jika argumen pertama adalah `-l', maka tempatkan sebuah "
+#~ "dash dalam\n"
+#~ " argument ke nol yang dilewatkan ke FILE, seperti yang dilakukan oleh "
+#~ "login. Jika pilihan `-c'\n"
+#~ " diberikan, FILE dijalankan dengan environmen kosong. Jika pilihan `-"
+#~ "a'\n"
+#~ " berarti menset argv[0] dari proses yang dijalankan ke NAMA.\n"
+#~ " Jika berkas tidak dapat dijalankan dan shell bukan interaktif,\n"
+#~ " maka shell keluar, unless pilihan shell `execfail' diset."
+
+#~ msgid "Logout of a login shell."
+#~ msgstr "Logout dari sebuah login shell."
+
+#~ msgid ""
+#~ "For each NAME, the full pathname of the command is determined and\n"
+#~ " remembered. If the -p option is supplied, PATHNAME is used as the\n"
+#~ " full pathname of NAME, and no path search is performed. The -r\n"
+#~ " option causes the shell to forget all remembered locations. The -d\n"
+#~ " option causes the shell to forget the remembered location of each "
+#~ "NAME.\n"
+#~ " If the -t option is supplied the full pathname to which each NAME\n"
+#~ " corresponds is printed. If multiple NAME arguments are supplied "
+#~ "with\n"
+#~ " -t, the NAME is printed before the hashed full pathname. The -l "
+#~ "option\n"
+#~ " causes output to be displayed in a format that may be reused as "
+#~ "input.\n"
+#~ " If no arguments are given, information about remembered commands is "
+#~ "displayed."
+#~ msgstr ""
+#~ "Untuk setiap NAMA, full pathname dari perintah ditentukan dan\n"
+#~ " diingat. Jika pilihan -p diberikan, PATHNAME digunakan sebagai\n"
+#~ " full pathname dari NAME, dan tidak ada jalur pencarian yang "
+#~ "dilakukan. Pilihan -r\n"
+#~ " menyebabkan shell untuk melupakan semua lokasi yang diingat. Pilihan -"
+#~ "d\n"
+#~ " menyebabkan shell untuk melupakan lokasi dari setiap NAMA.\n"
+#~ " Jika pilihan -t diberikan ful pathname ke setiap NAMA\n"
+#~ " yang bersesuaian ditampilkan. Jika beberapa argumen NAMA diberikan "
+#~ "dengan\n"
+#~ " pilihan -t, NAME ditampilkan sebelum hashed full pathname. Pilihan -"
+#~ "l\n"
+#~ " menyebabkan keluaran untuk ditampilkan dalam format yang biasa "
+#~ "digunakan sebagai masukan.\n"
+#~ " Jika tidak ada argumen yang diberikan, informasi mengenai perintah "
+#~ "yang diingat akan ditampilkan."
+
+#~ msgid ""
+#~ "Display helpful information about builtin commands. If PATTERN is\n"
+#~ " specified, gives detailed help on all commands matching PATTERN,\n"
+#~ " otherwise a list of the builtins is printed. The -s option\n"
+#~ " restricts the output for each builtin command matching PATTERN to\n"
+#~ " a short usage synopsis."
+#~ msgstr ""
+#~ "Menampilkan informasi yang berharga mengenai perintah builtin. Jika "
+#~ "PATTERN\n"
+#~ " dispesifikasikan, memberikan bantuan detail mengenail seluruh "
+#~ "perintah yang cocok dengan PATTERN,\n"
+#~ " jika tidak sebuah daftar dari builtings akan ditampilkan. Pilihan -s\n"
+#~ " membatasi keluaran dari setiap perintah builtin yang cocok dengan "
+#~ "PATTERN ke\n"
+#~ " ringkasan penggunaan singkat."
+
+#~ msgid ""
+#~ "By default, removes each JOBSPEC argument from the table of active jobs.\n"
+#~ " If the -h option is given, the job is not removed from the table, but "
+#~ "is\n"
+#~ " marked so that SIGHUP is not sent to the job if the shell receives a\n"
+#~ " SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove "
+#~ "all\n"
+#~ " jobs from the job table; the -r option means to remove only running "
+#~ "jobs."
+#~ msgstr ""
+#~ "Secara default, menghapus setiap JOBSPEC argumen dari tabel actif jobs.\n"
+#~ " Jika pilihan -n diberikan, pekerjaan tidak dihapus dari tabel, tetap "
+#~ "ditandai\n"
+#~ " sehingga ketika SIGHUP tidak terkirim ke job ketika shell menerima "
+#~ "sebuah\n"
+#~ " SIGHUP. Pilihan -a, ketika JOBSPEC tidak diberikan, berarti menghapus "
+#~ "seluruh\n"
+#~ " pekerjaan dari job tabel; Pilihan -r berarti hanya menghapus "
+#~ "pekerjaan yang berjalan."
+
+#~ msgid ""
+#~ "Causes a function to exit with the return value specified by N. If N\n"
+#~ " is omitted, the return status is that of the last command."
+#~ msgstr ""
+#~ "Menyebabkan sebuah fungsi untuk keluar dengan nilai kembalian "
+#~ "dispesifikasikan oleh N. Jika N\n"
+#~ " diabaikan, maka status kembalian adalah status dari perintah terakhir."
+
+#~ msgid ""
+#~ "For each NAME, remove the corresponding variable or function. Given\n"
+#~ " the `-v', unset will only act on variables. Given the `-f' flag,\n"
+#~ " unset will only act on functions. With neither flag, unset first\n"
+#~ " tries to unset a variable, and if that fails, then tries to unset a\n"
+#~ " function. Some variables cannot be unset; also see readonly."
+#~ msgstr ""
+#~ "Untuk setiap NAMA, hapus variabel atau fungsi yang berhubungan. Dengan\n"
+#~ " pilihan `-v', unset hanya berlaku di variabel. Dengan pilihan `-f',\n"
+#~ " unset hanya berlaku untuk fungsi. Dengan tidak menggunakan dua "
+#~ "pilihan itu,\n"
+#~ " pertama akan mencoba mengunset variabel, dan jika itu gagal maka "
+#~ "akan\n"
+#~ " mencoba untuk mengunset sebuah fungsi. Beberapa variabel tidak dapat "
+#~ "diunset. Lihat readonly."
+
+#~ msgid ""
+#~ "NAMEs are marked for automatic export to the environment of\n"
+#~ " subsequently executed commands. If the -f option is given,\n"
+#~ " the NAMEs refer to functions. If no NAMEs are given, or if `-p'\n"
+#~ " is given, a list of all names that are exported in this shell is\n"
+#~ " printed. An argument of `-n' says to remove the export property\n"
+#~ " from subsequent NAMEs. An argument of `--' disables further option\n"
+#~ " processing."
+#~ msgstr ""
+#~ "NAMA ditandai untuk otomatis export ke environment dari\n"
+#~ " perintah yang akan dijalankan selanjutnya. Jika pilihan -f "
+#~ "diberikan,\n"
+#~ " NAMA akan menunjuk ke fungsi. Jika tidak ada NAMA diberikan, atau "
+#~ "jika pilihan `-p'\n"
+#~ " diberikan, daftar dari seluruh nama yang diexport dalam shell ini\n"
+#~ " ditampilkan. Sebuah argumen dari pilihan `-n' mengatakan untuk "
+#~ "menghapus expor properti\n"
+#~ " dari NAMA selanjutnya. Sebuah argumen dari `--' menonaktifkan "
+#~ "pemrosesan\n"
+#~ " pilihan selanjutnya."
+
+#~ msgid ""
+#~ "The given NAMEs are marked readonly and the values of these NAMEs may\n"
+#~ " not be changed by subsequent assignment. If the -f option is given,\n"
+#~ " then functions corresponding to the NAMEs are so marked. If no\n"
+#~ " arguments are given, or if `-p' is given, a list of all readonly "
+#~ "names\n"
+#~ " is printed. The `-a' option means to treat each NAME as\n"
+#~ " an array variable. An argument of `--' disables further option\n"
+#~ " processing."
+#~ msgstr ""
+#~ "NAMA yang diberikan ditandai secara baca-saja dan nilai dari NAMA ini "
+#~ "tidak\n"
+#~ " boleh diubah oleh assignmen selanjutnya. Jika pilihan -f diberikan,\n"
+#~ " maka fungsi yang berhubungan dengan NAMA akan ditandai. Jika tidak\n"
+#~ " ada argumen yang diberikan, atau jika pilihan `-p' diberikan, sebuah "
+#~ "daftar dari seluruh nama baca-saja\n"
+#~ " ditampilkan. Pilihan `-a' berarti memperlakukan setiap NAMA sebagai\n"
+#~ " sebuah variabel array. Sebuah argumen dari `--' menonaktifkan "
+#~ "pemrosesan\n"
+#~ " pilihan selanjutnya."
+
+#~ msgid ""
+#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is\n"
+#~ " not given, it is assumed to be 1."
+#~ msgstr ""
+#~ "Parameter posisi dari $N+1 ... diubah namanya menjadi $1 ... Jika N\n"
+#~ " tidak diberikan, ini diasumsikan untuk menjadi 1."
+
+#~ msgid ""
+#~ "Suspend the execution of this shell until it receives a SIGCONT\n"
+#~ " signal. The `-f' if specified says not to complain about this\n"
+#~ " being a login shell if it is; just suspend anyway."
+#~ msgstr ""
+#~ "Suspend eksekusi dari shell ini sampai ini menerima sebuah sinyal "
+#~ "SIGCONT\n"
+#~ " Jika pilihan `-f' dispesifikasikan maka tidak komplain tentang ini "
+#~ "menjadi\n"
+#~ " sebuah login shell jika emang begitu. Hanya lakukan suspend saja."
+
+#~ msgid ""
+#~ "Print the accumulated user and system times for processes run from\n"
+#~ " the shell."
+#~ msgstr ""
+#~ "Tampilkan waktu yang terakumulasi oleh pengguna dan system untuk proses "
+#~ "yang berjalan dari\n"
+#~ " shell."
+
+#~ msgid ""
+#~ "For each NAME, indicate how it would be interpreted if used as a\n"
+#~ " command name.\n"
+#~ " \n"
+#~ " If the -t option is used, `type' outputs a single word which is one "
+#~ "of\n"
+#~ " `alias', `keyword', `function', `builtin', `file' or `', if NAME is "
+#~ "an\n"
+#~ " alias, shell reserved word, shell function, shell builtin, disk "
+#~ "file,\n"
+#~ " or unfound, respectively.\n"
+#~ " \n"
+#~ " If the -p flag is used, `type' either returns the name of the disk\n"
+#~ " file that would be executed, or nothing if `type -t NAME' would not\n"
+#~ " return `file'.\n"
+#~ " \n"
+#~ " If the -a flag is used, `type' displays all of the places that "
+#~ "contain\n"
+#~ " an executable named `file'. This includes aliases, builtins, and\n"
+#~ " functions, if and only if the -p flag is not also used.\n"
+#~ " \n"
+#~ " The -f flag suppresses shell function lookup.\n"
+#~ " \n"
+#~ " The -P flag forces a PATH search for each NAME, even if it is an "
+#~ "alias,\n"
+#~ " builtin, or function, and returns the name of the disk file that "
+#~ "would\n"
+#~ " be executed."
+#~ msgstr ""
+#~ "Untuk setiap NAMA, mengindikasikan bagaimana ini akan diinterpretasikan "
+#~ "jika digunakan sebagai sebuah\n"
+#~ " nama perintah.\n"
+#~ " \n"
+#~ " Jika sebuah pilihan -t digunakan, `type' mengeluarkan sebuah kata "
+#~ "tunggal yang salah satu dari\n"
+#~ " `alias', `keyword', `function', `builtin', `file', atau `', jika NAMA "
+#~ "adalah sebuah\n"
+#~ " alias, shell kata yang dipesan, shell fungsi, shell builtin, disk "
+#~ "file,\n"
+#~ " atau tidak ditemukan, respectively.\n"
+#~ " \n"
+#~ " Jika flag -p digunakan, `type' menampilkan semua dari tempat yang "
+#~ "berisi\n"
+#~ " nama executable `file'. Ini meliputi aliases, builtings, dan\n"
+#~ " fungsi, jika dan hanya jika flag -p juga tidak digunakan.\n"
+#~ " \n"
+#~ " Flag -f menekan seluruh fungsi shell lookup.\n"
+#~ " \n"
+#~ " Flag -P memaksa sebuah JALUR pencarian untuk setiap NAMA, bahkan jika "
+#~ "ini merupakan sebuah alias,\n"
+#~ " builtin, atau fungsi, dan mengembalikan nama ke disk file yang akan\n"
+#~ " dijalankan."
+
+#~ msgid ""
+#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if\n"
+#~ " `-S' is supplied, the current value of the mask is printed. The `-"
+#~ "S'\n"
+#~ " option makes the output symbolic; otherwise an octal number is "
+#~ "output.\n"
+#~ " If `-p' is supplied, and MODE is omitted, the output is in a form\n"
+#~ " that may be used as input. If MODE begins with a digit, it is\n"
+#~ " interpreted as an octal number, otherwise it is a symbolic mode "
+#~ "string\n"
+#~ " like that accepted by chmod(1)."
+#~ msgstr ""
+#~ "File-creation mask pengguna diset ke MODE. Jika MODE diabaikan, atau "
+#~ "jika\n"
+#~ " `-S' diberikan, nilai sekaran dari mask ditampilkan. Pilihan `-S'\n"
+#~ " membuah keluaran symbolic; jika tidak sebuah bilangan octal "
+#~ "dikeluarkan.\n"
+#~ " Jika pilihan `-p' diberikan, dan MODE diabaikan, keluaran adalah "
+#~ "dalam format\n"
+#~ " yang bisa digunakan sebagai masukan. Jika MODE dimulai dengan sebuah "
+#~ "digit, ini\n"
+#~ " diinterpretasikan sebagai sebuah bilangan octal, jika tidak ini "
+#~ "adalah sebuah symbolic mode string\n"
+#~ " yang diterima oleh chmod(1)."
+
+#~ msgid ""
+#~ "Wait for the specified process and report its termination status. If\n"
+#~ " N is not given, all currently active child processes are waited for,\n"
+#~ " and the return code is zero. N is a process ID; if it is not given,\n"
+#~ " all child processes of the shell are waited for."
+#~ msgstr ""
+#~ "Menunggu sampai proses yang dispesifikasikan dan laporkan status "
+#~ "selesainya. Jika\n"
+#~ " N tidak diberikan, semua proses anak yang masih aktif ditunggu "
+#~ "untuk,\n"
+#~ " dan mengembalikan kode kembalian nol. N adalah sebuah proses ID; jika "
+#~ "ini tidak diberikan,\n"
+#~ " semua proses anak dari shell ditunggu."
+
+#~ msgid ""
+#~ "Create a simple command invoked by NAME which runs COMMANDS.\n"
+#~ " Arguments on the command line along with NAME are passed to the\n"
+#~ " function as $0 .. $n."
+#~ msgstr ""
+#~ "Buat sebuah perintah sederhana yang memanggil dengan NAMA yang "
+#~ "menjalankan PERINTAH.\n"
+#~ " Argumen dalam baris perintah dengan NAMA dilewatkan ke\n"
+#~ " fungsi sebagai $0 .. $n."
+
+#~ msgid ""
+#~ "Toggle the values of variables controlling optional behavior.\n"
+#~ " The -s flag means to enable (set) each OPTNAME; the -u flag\n"
+#~ " unsets each OPTNAME. The -q flag suppresses output; the exit\n"
+#~ " status indicates whether each OPTNAME is set or unset. The -o\n"
+#~ " option restricts the OPTNAMEs to those defined for use with\n"
+#~ " `set -o'. With no options, or with the -p option, a list of all\n"
+#~ " settable options is displayed, with an indication of whether or\n"
+#~ " not each is set."
+#~ msgstr ""
+#~ "Ubah nilai dari variabel yang mengontrol perilaku opsional.\n"
+#~ " Pilihan -s berarti untuk mengaktifkan (set) setiap OPTNAME; pilihan -"
+#~ "u\n"
+#~ " mengunset setiap OPTNAME. tanda -q menekan keluaran; status keluaran\n"
+#~ " mengindikasikan apakah setiap OPTNAME diset atau diunset. Pilihan -o\n"
+#~ " membatasi OPTNAME ke nilai yang didefinisikan untuk digunakan dengan\n"
+#~ " `set -o'. Tanpa pilihan, atau dengan pilihan -p, sebuah daftar dari "
+#~ "seluruh\n"
+#~ " pilihan yang bisa diset ditampilkan, tanpa sebuah indikasi apakah "
+#~ "salah satu atau\n"
+#~ " bukan setiap dari variabel diset."
+
+#~ msgid ""
+#~ "For each NAME, specify how arguments are to be completed.\n"
+#~ " If the -p option is supplied, or if no options are supplied, "
+#~ "existing\n"
+#~ " completion specifications are printed in a way that allows them to "
+#~ "be\n"
+#~ " reused as input. The -r option removes a completion specification "
+#~ "for\n"
+#~ " each NAME, or, if no NAMEs are supplied, all completion "
+#~ "specifications."
+#~ msgstr ""
+#~ "Untuk setiap NAMA, spesifikasikan bagaimana argumen akan diselesaikan.\n"
+#~ " Jika pilihan -p diberikan, atau tidak ada pilihan yang diberikan, "
+#~ "completion\n"
+#~ " spesifikasi yang telah ada ditampilkan dalam sebuah cara yang "
+#~ "membolehkan mereka untuk\n"
+#~ " digunakan sebagai masukan. Pilihan -r menghapus sebuah spesifikasi "
+#~ "completion untuk\n"
+#~ " setiap NAMA, atau jika tidak ada NAMA yang diberikan, untuk semua "
+#~ "spesifikasi completion."
diff --git a/po/insert-header.sin b/po/insert-header.sin
new file mode 100644
index 0000000..b26de01
--- /dev/null
+++ b/po/insert-header.sin
@@ -0,0 +1,23 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# At each occurrence of a line starting with "msgid ", we execute the following
+# commands. At the first occurrence, insert the file. At the following
+# occurrences, do nothing. The distinction between the first and the following
+# occurrences is achieved by looking at the hold space.
+/^msgid /{
+x
+# Test if the hold space is empty.
+s/m/m/
+ta
+# Yes it was empty. First occurrence. Read the file.
+r HEADER
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+g
+N
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/ja.gmo b/po/ja.gmo
new file mode 100644
index 0000000..7def4d7
--- /dev/null
+++ b/po/ja.gmo
Binary files differ
diff --git a/po/ja.po b/po/ja.po
new file mode 100644
index 0000000..18dec23
--- /dev/null
+++ b/po/ja.po
@@ -0,0 +1,4195 @@
+# Japanese message for GNU bash 2.0
+# Copyright (C) 1999 Free Software Foundation, Inc.
+# Kyoichi Ozaki <k@afromania.org>, 2000.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU bash 2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2000-03-21 19:30+0900\n"
+"Last-Translator: Kyoichi Ozaki <k@afromania.org>\n"
+"Language-Team: Japanese <ja@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=EUC-JP\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr ""
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr ""
+
+#: arrayfunc.c:480
+#, fuzzy, c-format
+msgid "%s: invalid associative array key"
+msgstr "%c%c: °­¤¤¥ª¥×¥·¥ç¥ó"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr ""
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr ""
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr ""
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr ""
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "%c%c: °­¤¤¥ª¥×¥·¥ç¥ó"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr ""
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr ""
+
+#: builtins/bind.def:245
+#, fuzzy, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó"
+
+#: builtins/bind.def:260
+#, fuzzy, c-format
+msgid "`%s': cannot unbind"
+msgstr "%s: ¥³¥Þ¥ó¥É¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, fuzzy, c-format
+msgid "`%s': unknown function name"
+msgstr "%s: Æɤ߹þ¤ß¤Î¤ß¤Î´Ø¿ô"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr ""
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr ""
+
+#: builtins/break.def:77 builtins/break.def:117
+#, fuzzy
+msgid "loop count"
+msgstr "¥í¥°¥¢¥¦¥È"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr ""
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr ""
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr ""
+
+#: builtins/common.c:101
+#, fuzzy, c-format
+msgid "line %d: "
+msgstr "¥¹¥í¥Ã¥È %3d: "
+
+#: builtins/common.c:139 error.c:261
+#, fuzzy, c-format
+msgid "warning: "
+msgstr "½ñ¤­¹þ¤ßÃæ"
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr ""
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "°ú¿ô¤¬Â¿¤¹¤®¤Þ¤¹"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, fuzzy, c-format
+msgid "%s: option requires an argument"
+msgstr "¥ª¥×¥·¥ç¥ó¤Ë¤Ï°ú¿ô¤¬É¬Í×: -"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr ""
+
+#: builtins/common.c:205
+#, fuzzy, c-format
+msgid "%s: not found"
+msgstr "%s: ¥³¥Þ¥ó¥É¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó"
+
+#: builtins/common.c:214 shell.c:795
+#, fuzzy, c-format
+msgid "%s: invalid option"
+msgstr "%c%c: °­¤¤¥ª¥×¥·¥ç¥ó"
+
+#: builtins/common.c:221
+#, fuzzy, c-format
+msgid "%s: invalid option name"
+msgstr "%c%c: °­¤¤¥ª¥×¥·¥ç¥ó"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, fuzzy, c-format
+msgid "`%s': not a valid identifier"
+msgstr "`%s' ¤ÏÍ­¸ú¤Ê³Îǧ¤Ç¤Ï¤Ê¤¤"
+
+#: builtins/common.c:238
+#, fuzzy
+msgid "invalid octal number"
+msgstr "°­¤¤¥·¥°¥Ê¥ëÈÖ¹æ"
+
+#: builtins/common.c:240
+#, fuzzy
+msgid "invalid hex number"
+msgstr "°­¤¤¥·¥°¥Ê¥ëÈÖ¹æ"
+
+#: builtins/common.c:242 expr.c:1256
+#, fuzzy
+msgid "invalid number"
+msgstr "°­¤¤¥·¥°¥Ê¥ëÈÖ¹æ"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr ""
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr ""
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: Æɤ߹þ¤ß¤Î¤ß¤ÎÊÑ¿ô"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr ""
+
+#: builtins/common.c:272 builtins/common.c:274
+#, fuzzy
+msgid "argument"
+msgstr "°ú¿ô¤ò´üÂÔ"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr ""
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr ""
+
+#: builtins/common.c:290
+#, fuzzy, c-format
+msgid "%s: no job control"
+msgstr "¤³¤Î¥·¥§¥ë¤Ë¤Ï¥¸¥ç¥ÖÀ©¸æ¤¬¤¢¤ê¤Þ¤»¤ó"
+
+#: builtins/common.c:292
+#, fuzzy
+msgid "no job control"
+msgstr "¤³¤Î¥·¥§¥ë¤Ë¤Ï¥¸¥ç¥ÖÀ©¸æ¤¬¤¢¤ê¤Þ¤»¤ó"
+
+#: builtins/common.c:302
+#, fuzzy, c-format
+msgid "%s: restricted"
+msgstr "%s: ¥¸¥ç¥Ö¤Ï½ªÎ»¤·¤Þ¤·¤¿"
+
+#: builtins/common.c:304
+#, fuzzy
+msgid "restricted"
+msgstr "½ªÎ»¤·¤Þ¤·¤¿"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr ""
+
+#: builtins/common.c:321
+#, fuzzy, c-format
+msgid "write error: %s"
+msgstr "¥Ñ¥¤¥×¥¨¥é¡¼: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr ""
+
+#: builtins/common.c:629 builtins/common.c:631
+#, fuzzy, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: ¤¢¤¤¤Þ¤¤¤Ê¥ê¥À¥¤¥ì¥¯¥È"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr ""
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr ""
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr ""
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr ""
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr ""
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr ""
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr ""
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: Æɤ߹þ¤ß¤Î¤ß¤Î´Ø¿ô"
+
+#: builtins/declare.def:468
+#, fuzzy, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "$%s: ¤³¤Î¤è¤¦¤Ë»ØÄê¤Ç¤­¤Þ¤»¤ó"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr ""
+
+#: builtins/enable.def:312
+#, fuzzy, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "named pipe %s ¤ò %s ¤Ø³«¤±¤Þ¤»¤ó: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr ""
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr ""
+
+#: builtins/enable.def:474
+#, fuzzy, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: ¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¹"
+
+#: builtins/evalfile.c:139
+#, fuzzy, c-format
+msgid "%s: not a regular file"
+msgstr "%s: ¥Ð¥¤¥Ê¥ê¥Õ¥¡¥¤¥ë¤ò¼Â¹Ô¤Ç¤­¤Þ¤»¤ó"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr ""
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: ¥Ð¥¤¥Ê¥ê¥Õ¥¡¥¤¥ë¤ò¼Â¹Ô¤Ç¤­¤Þ¤»¤ó"
+
+#: builtins/exec.def:212
+#, fuzzy, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó"
+
+#: builtins/exit.def:65
+#, fuzzy, c-format
+msgid "logout\n"
+msgstr "¥í¥°¥¢¥¦¥È"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr ""
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr ""
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr ""
+
+#: builtins/fc.def:262
+#, fuzzy
+msgid "no command found"
+msgstr "%s: ¥³¥Þ¥ó¥É¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr ""
+
+#: builtins/fc.def:370
+#, fuzzy, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr ""
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr ""
+
+#: builtins/getopt.c:110
+#, fuzzy, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "ÉÔÀµ¤Ê¥ª¥×¥·¥ç¥ó: -"
+
+#: builtins/getopt.c:111
+#, fuzzy, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "¥ª¥×¥·¥ç¥ó¤Ë¤Ï°ú¿ô¤¬É¬Í×: -"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr ""
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr ""
+
+#: builtins/hash.def:244
+#, c-format
+msgid "hits\tcommand\n"
+msgstr ""
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] ""
+msgstr[1] ""
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+
+#: builtins/help.def:185
+#, fuzzy, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr ""
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr ""
+
+#: builtins/history.def:365
+#, fuzzy, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: »Ø¿ô¤Îɽ¸½¤ò´üÂÔ"
+
+#: builtins/inlib.def:71
+#, fuzzy, c-format
+msgid "%s: inlib failed"
+msgstr "%s: »Ø¿ô¤Îɽ¸½¤ò´üÂÔ"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr ""
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr ""
+
+#: builtins/kill.def:263
+#, fuzzy
+msgid "Unknown error"
+msgstr "̤ÃΤΥ¨¥é¡¼ %d"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "ɽ¸½¤ò´üÂÔ¤·¤Æ¤Þ¤¹"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: Ÿ³«¤µ¤ì¤Æ¤¤¤Ê¤¤ÊÑ¿ô"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr ""
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr ""
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, fuzzy, c-format
+msgid "%s: invalid line count"
+msgstr "%c%c: °­¤¤¥ª¥×¥·¥ç¥ó"
+
+#: builtins/mapfile.def:277
+#, fuzzy, c-format
+msgid "%s: invalid array origin"
+msgstr "%c%c: °­¤¤¥ª¥×¥·¥ç¥ó"
+
+#: builtins/mapfile.def:294
+#, fuzzy, c-format
+msgid "%s: invalid callback quantum"
+msgstr "°­¤¤¥·¥°¥Ê¥ëÈÖ¹æ"
+
+#: builtins/mapfile.def:326
+#, fuzzy
+msgid "empty array variable name"
+msgstr "%s: Ÿ³«¤µ¤ì¤Æ¤¤¤Ê¤¤ÊÑ¿ô"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr ""
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr ""
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr ""
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr ""
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr ""
+
+#: builtins/pushd.def:195
+#, fuzzy
+msgid "no other directory"
+msgstr "%s: ¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¹"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr ""
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr ""
+
+#: builtins/pushd.def:508
+#, fuzzy
+msgid "directory stack index"
+msgstr "Recursion stack underflow"
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr ""
+
+#: builtins/read.def:588
+#, fuzzy, c-format
+msgid "read error: %d: %s"
+msgstr "¥Ñ¥¤¥×¥¨¥é¡¼: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr ""
+
+#: builtins/set.def:805
+#, fuzzy, c-format
+msgid "%s: cannot unset"
+msgstr "%s: %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó"
+
+#: builtins/set.def:812
+#, fuzzy, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó"
+
+#: builtins/set.def:823
+#, fuzzy, c-format
+msgid "%s: not an array variable"
+msgstr "%s: Ÿ³«¤µ¤ì¤Æ¤¤¤Ê¤¤ÊÑ¿ô"
+
+#: builtins/setattr.def:186
+#, fuzzy, c-format
+msgid "%s: not a function"
+msgstr "%s: Æɤ߹þ¤ß¤Î¤ß¤Î´Ø¿ô"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+#, fuzzy
+msgid "shift count"
+msgstr "shift [n]"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr ""
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr ""
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr ""
+
+#: builtins/source.def:153
+#, fuzzy, c-format
+msgid "%s: file not found"
+msgstr "%s: ¥³¥Þ¥ó¥É¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr ""
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr ""
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr ""
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr ""
+
+#: builtins/type.def:274
+#, fuzzy, c-format
+msgid "%s is a function\n"
+msgstr "%s: Æɤ߹þ¤ß¤Î¤ß¤Î´Ø¿ô"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr ""
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr ""
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr ""
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr ""
+
+#: builtins/ulimit.def:398
+#, fuzzy, c-format
+msgid "`%c': bad command"
+msgstr "%c%c: °­¤¤¥ª¥×¥·¥ç¥ó"
+
+#: builtins/ulimit.def:427
+#, fuzzy, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó"
+
+#: builtins/ulimit.def:453
+#, fuzzy
+msgid "limit"
+msgstr "CPU ¸ÂÅÙ"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, fuzzy, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó"
+
+#: builtins/umask.def:118
+#, fuzzy
+msgid "octal number"
+msgstr "°­¤¤¥·¥°¥Ê¥ëÈÖ¹æ"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr ""
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr ""
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr ""
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr ""
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr ""
+
+#: error.c:406
+#, fuzzy
+msgid "unknown command error"
+msgstr "̤ÃΤΥ¨¥é¡¼ %d"
+
+#: error.c:407
+#, fuzzy
+msgid "bad command type"
+msgstr "print_command: °­¤¤¥³¥Þ¥ó¥É¥¿¥¤¥× `%d'"
+
+#: error.c:408
+#, fuzzy
+msgid "bad connector"
+msgstr "°­¤¤¼õÅϤ· `%d'"
+
+#: error.c:409
+#, fuzzy
+msgid "bad jump"
+msgstr "°­¤¤ jump %d"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: Ÿ³«¤µ¤ì¤Æ¤¤¤Ê¤¤ÊÑ¿ô"
+
+#: eval.c:181
+#, fuzzy, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "%c¤ÏÆþÎÏÂÔ¤Á¤«¤é¥¿¥¤¥à¥¢¥¦¥È¤·¤Þ¤·¤¿: ¼«Æ°¥í¥°¥¢¥¦¥È\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr ""
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr ""
+
+#: execute_cmd.c:2075
+#, fuzzy
+msgid "pipe error"
+msgstr "¥Ñ¥¤¥×¥¨¥é¡¼: %s"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: À©¸Â: `/' ¤ò¥³¥Þ¥ó¥É̾¤Ëµ­½Ò¤Ç¤­¤Þ¤»¤ó"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: ¥³¥Þ¥ó¥É¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó"
+
+#: execute_cmd.c:4827
+#, fuzzy, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: ¤Ï¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¹"
+
+#: execute_cmd.c:4976
+#, fuzzy, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "fd %d ¤ò fd 0 ¤ËÊ£À½¤Ç¤­¤Þ¤»¤ó: %s"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "ɽ¸½¤ÎºÆµ¢²Äǽ¥ì¥Ù¥ë¤ò±Û¤¨¤Þ¤·¤¿"
+
+#: expr.c:265
+#, fuzzy
+msgid "recursion stack underflow"
+msgstr "Recursion stack underflow"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "ɽ¸½¤Ë¥·¥ó¥¿¥Ã¥¯¥¹¥¨¥é¡¼"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "ÈóÊÑ¿ô¤Ë³ä¤êÅö¤Æ¤ò¹Ô¤ª¤¦¤È¤·¤Æ¤Þ¤¹"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "0 ¤Î³ä»»"
+
+#: expr.c:471
+#, fuzzy
+msgid "bug: bad expassign token"
+msgstr "bug: bad expassign token' %d"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "`:' ¤ò¾ò·ï¤Îɽ¸½¤Î¤¿¤á´üÂÔ¤·¤Æ¤Þ¤¹"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr ""
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr ""
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "`)' ¤¬¤¢¤ê¤Þ¤»¤ó"
+
+#: expr.c:897 expr.c:1176
+#, fuzzy
+msgid "syntax error: operand expected"
+msgstr "¥·¥ó¥¿¥Ã¥¯¥¹ ¥¨¥é¡¼: ´üÂÔ¤·¤Æ¤Ê¤¤¥Õ¥¡¥¤¥ë¤Î½ªÎ»"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr ""
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr ""
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr ""
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "¥Ù¡¼¥¹¤ÎÃͤˤÏÂ礭¤¹¤®¤Þ¤¹"
+
+#: expr.c:1329
+#, fuzzy, c-format
+msgid "%s: expression error\n"
+msgstr "%s: »Ø¿ô¤Îɽ¸½¤ò´üÂÔ"
+
+#: general.c:61
+#, fuzzy
+msgid "getcwd: cannot access parent directories"
+msgstr "getwd: ¾å°Ì¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤Þ¤»¤ó"
+
+#: input.c:94 subst.c:4857
+#, fuzzy, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "fd %d ¤ò fd 0 ¤ËÊ£À½¤Ç¤­¤Þ¤»¤ó: %s"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+
+#: input.c:266
+#, fuzzy, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "check_bash_input: fd %d ¤Î¤¿¤á¤Î¥Ð¥Ã¥Õ¥¡¤Ï´û¤Ë¸ºß¤·¤Þ¤¹"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr ""
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr ""
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr ""
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr ""
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr ""
+
+#: jobs.c:1401
+#, fuzzy, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: ¥×¥í¥»¥¹ID(%d)¤Ï¸ºß¤·¤Þ¤»¤ó!\n"
+
+#: jobs.c:1416
+#, fuzzy, c-format
+msgid "Signal %d"
+msgstr "̤ÃΤΥ·¥°¥Ê¥ë #%d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "½ªÎ»"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Ää»ß"
+
+#: jobs.c:1439
+#, fuzzy, c-format
+msgid "Stopped(%s)"
+msgstr "Ää»ß"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "¼Â¹ÔÃæ"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "½ªÎ»(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "½ªÎ» %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "̤ÃΤΥ¹¥Æ¡¼¥¿¥¹"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(¥³¥¢¥À¥ó¥×) "
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr ""
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr ""
+
+#: jobs.c:2104 nojobs.c:585
+#, fuzzy, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "ÂÔµ¡: pid %d ¤³¤Î¥·¥§¥ë¤Î»Ò¥×¥í¥»¥¹¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr ""
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr ""
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: ¥¸¥ç¥Ö¤Ï½ªÎ»¤·¤Þ¤·¤¿"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr ""
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, fuzzy, c-format
+msgid "%s: line %d: "
+msgstr "¥¹¥í¥Ã¥È %3d: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr " (¥³¥¢¥À¥ó¥×)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr ""
+
+#: jobs.c:3579
+#, fuzzy
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_jobs: getpgrp ¼ºÇÔ: %s"
+
+#: jobs.c:3639
+#, fuzzy
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_jobs: ¥é¥¤¥ó discipline: %s"
+
+#: jobs.c:3649
+#, fuzzy
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_jobs: getpgrp ¼ºÇÔ: %s"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr ""
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "¤³¤Î¥·¥§¥ë¤Ë¤Ï¥¸¥ç¥ÖÀ©¸æ¤¬¤¢¤ê¤Þ¤»¤ó"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:313
+#, fuzzy
+msgid "unknown"
+msgstr "<̤ÃÎ>"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr ""
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr ""
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr ""
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr ""
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr ""
+
+#: lib/sh/netopen.c:168
+#, fuzzy, c-format
+msgid "%s: host unknown"
+msgstr "̤ÃÎ"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr ""
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr ""
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr ""
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:249
+#, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr ""
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "¥á¡¼¥ë¤¬ $_ ¤Ë¤¢¤ê¤Þ¤¹"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "¿·¤·¤¤¥á¡¼¥ë¤¬ $_ ¤Ë¤¢¤ê¤Þ¤¹"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "%s ¤Î¥á¡¼¥ë¤Ï´û¤ËÆɤޤì¤Æ¤Þ¤¹\n"
+
+#: make_cmd.c:323
+#, fuzzy
+msgid "syntax error: arithmetic expression required"
+msgstr "ɽ¸½¤Ë¥·¥ó¥¿¥Ã¥¯¥¹¥¨¥é¡¼"
+
+#: make_cmd.c:325
+#, fuzzy
+msgid "syntax error: `;' unexpected"
+msgstr "¥·¥ó¥¿¥Ã¥¯¥¹ ¥¨¥é¡¼: ´üÂÔ¤·¤Æ¤Ê¤¤¥Õ¥¡¥¤¥ë¤Î½ªÎ»"
+
+#: make_cmd.c:326
+#, fuzzy, c-format
+msgid "syntax error: `((%s))'"
+msgstr "¥·¥ó¥¿¥Ã¥¯¥¹¥¨¥é¡¼"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: °­¤¤»Ø¼¨¥¿¥¤¥× %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr ""
+
+#: parse.y:3133 parse.y:3369
+#, fuzzy, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "´üÂÔ¤·¤Æ¤Ê¤¤¥Õ¥¡¥¤¥ë¤Î½ªÎ»(EOF)¤¬`%c'¤ò¸«ÉÕ¤±¤ë¤Þ¤¨¤ËȯÀ¸"
+
+#: parse.y:3951
+#, fuzzy
+msgid "unexpected EOF while looking for `]]'"
+msgstr "´üÂÔ¤·¤Æ¤Ê¤¤¥Õ¥¡¥¤¥ë¤Î½ªÎ»(EOF)¤¬`%c'¤ò¸«ÉÕ¤±¤ë¤Þ¤¨¤ËȯÀ¸"
+
+#: parse.y:3956
+#, fuzzy, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "´üÂÔ¤·¤Æ¤Ê¤¤ token `%s' ¤Î¤¢¤¿¤ê¤Ë¥·¥ó¥¿¥Ã¥¯¥¹¥¨¥é¡¼"
+
+#: parse.y:3960
+#, fuzzy
+msgid "syntax error in conditional expression"
+msgstr "ɽ¸½¤Ë¥·¥ó¥¿¥Ã¥¯¥¹¥¨¥é¡¼"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr ""
+
+#: parse.y:4042
+#, fuzzy
+msgid "expected `)'"
+msgstr "`)' ¤ò´üÂÔ"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr ""
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr ""
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr ""
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr ""
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr ""
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr ""
+
+#: parse.y:4161
+#, fuzzy, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "`:' ¤ò¾ò·ï¤Îɽ¸½¤Î¤¿¤á´üÂÔ¤·¤Æ¤Þ¤¹"
+
+#: parse.y:4164
+#, fuzzy, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "`:' ¤ò¾ò·ï¤Îɽ¸½¤Î¤¿¤á´üÂÔ¤·¤Æ¤Þ¤¹"
+
+#: parse.y:4168
+#, fuzzy, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "`:' ¤ò¾ò·ï¤Îɽ¸½¤Î¤¿¤á´üÂÔ¤·¤Æ¤Þ¤¹"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "´üÂÔ¤·¤Æ¤Ê¤¤ token `%s' ¤Î¤¢¤¿¤ê¤Ë¥·¥ó¥¿¥Ã¥¯¥¹¥¨¥é¡¼"
+
+#: parse.y:5477
+#, fuzzy, c-format
+msgid "syntax error near `%s'"
+msgstr "´üÂÔ¤·¤Æ¤Ê¤¤ token `%s' ¤Î¤¢¤¿¤ê¤Ë¥·¥ó¥¿¥Ã¥¯¥¹¥¨¥é¡¼"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "¥·¥ó¥¿¥Ã¥¯¥¹ ¥¨¥é¡¼: ´üÂÔ¤·¤Æ¤Ê¤¤¥Õ¥¡¥¤¥ë¤Î½ªÎ»"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "¥·¥ó¥¿¥Ã¥¯¥¹¥¨¥é¡¼"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "¥·¥§¥ë¤«¤éæ½Ð¤¹¤ë¤Î¤Ë \"%s\" ¤ò»È¤¤¤Ê¤µ¤¤.\n"
+
+#: parse.y:5711
+#, fuzzy
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "´üÂÔ¤·¤Æ¤Ê¤¤¥Õ¥¡¥¤¥ë¤Î½ªÎ»(EOF)¤¬`%c'¤ò¸«ÉÕ¤±¤ë¤Þ¤¨¤ËȯÀ¸"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr ""
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr ""
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: °­¤¤Àܳ `%d'"
+
+#: print_cmd.c:363
+#, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr ""
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr ""
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr ""
+
+#: redir.c:166
+#, fuzzy, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: ¤¢¤¤¤Þ¤¤¤Ê¥ê¥À¥¤¥ì¥¯¥È"
+
+#: redir.c:170
+#, fuzzy, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: ¸ºß¤¹¤ë¥Õ¥¡¥¤¥ë¤ò¾å½ñ¤­¤Ç¤­¤Þ¤»¤ó"
+
+#: redir.c:175
+#, fuzzy, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: À©¸Â: `/' ¤ò¥³¥Þ¥ó¥É̾¤Ëµ­½Ò¤Ç¤­¤Þ¤»¤ó"
+
+#: redir.c:180
+#, fuzzy, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "¥×¥í¥»¥¹¤ÎÂåÆþ¤Ë¥Ñ¥¤¥×¤òºîÀ®¤Ç¤­¤Þ¤»¤ó: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: ¥ê¥¹¥È¤òÇÛÎó¥á¥ó¥Ð¡¼¤Ë³ä¤êÅö¤Æ¤é¤ì¤Þ¤»¤ó"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr ""
+
+#: redir.c:1101
+#, fuzzy
+msgid "redirection error: cannot duplicate fd"
+msgstr "¥ê¥À¥¤¥ì¥¯¥·¥ç¥ó¥¨¥é¡¼"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr ""
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr ""
+
+#: shell.c:884
+#, fuzzy, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: °­¤¤¥ª¥×¥·¥ç¥ó"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "»ä¤Ï̾Á°¤¬¤¢¤ê¤Þ¤»¤ó!"
+
+#: shell.c:1793
+#, fuzzy, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU %s, ¥Ð¡¼¥¸¥ç¥ó %s\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"»ÈÍÑÊýË¡:\t%s [GNU Ť¤¥ª¥×¥·¥ç¥ó] [¥ª¥×¥·¥ç¥ó] ...\n"
+"\t%s [GNU Ť¤¥ª¥×¥·¥ç¥ó] [¥ª¥×¥·¥ç¥ó] ¥¹¥¯¥ê¥×¥È¥Õ¥¡¥¤¥ë ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "GNU Ť¤¥ª¥×¥·¥ç¥ó:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "¥·¥§¥ë ¥ª¥×¥·¥ç¥ó:\n"
+
+#: shell.c:1801
+#, fuzzy
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD Ëô¤Ï ¥³¥Þ¥ó¥É\t\t(Áʤ¨¤Î¤ß)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s Ëô¤Ï -o ¥ª¥×¥·¥ç¥ó\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr "¥·¥§¥ë¥ª¥×¥·¥ç¥ó¤Î¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï `%s -c \"help set\"'¤ÈÆþÎÏ.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr "ÁȤ߹þ¤ß¥³¥Þ¥ó¥É¤Ë¤Ä¤¤¤Æ¤Ï `%s -c help'¤ÈÆþÎÏ .\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr ""
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr ""
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "°­¤¤¥·¥°¥Ê¥ë"
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Ää»ß"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "³ä¤ê¹þ¤ß"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "½ªÎ»"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "°­¤¤»Ø¼¨"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr ""
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "»Ø¼¨¤ÎÃæ»ß"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "EMT »Ø¼¨"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "ÉâÆ°ÅÀ¤ÎÎã³°"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "»¦¤·¤Þ¤·¤¿"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "¥Ð¥¹¥¨¥é¡¼"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "¥»¥°¥á¥ó¥Æ¡¼¥·¥ç¥ó¥Õ¥©¥ë¥È"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "°­¤¤¥·¥¹¥Æ¥à¥³¡¼¥ë"
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "¥Ñ¥¤¥×¤¬ÀÚ¤ì¤Þ¤·¤¿"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "¥¢¥é¡¼¥à»þ·×"
+
+#: siglist.c:111
+#, fuzzy
+msgid "Terminated"
+msgstr "½ªÎ»¤·¤Þ¤·¤¿"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "µÞ¤®¤Î IO ¾õÂÖ"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Ää»ß (¥·¥°¥Ê¥ë)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "³¹Ô"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "»Ò¤Î½ªÎ»Ëô¤ÏÄä»ß "
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Ää»ß (tty ÆþÎÏ)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Ää»ß (tty ½ÐÎÏ)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "I/O ÍÑ°Õ¤¬¤Ç¤­¤Æ¤¤¤Þ¤¹"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "CPU ¸ÂÅÙ"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "¥Õ¥¡¥¤¥ë¸ÂÅÙ"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "·ÙÊó (²¾ÁÛ)"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "·ÙÊó (¥×¥í¥Õ¥¡¥¤¥ë)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Á뤬Êѹ¹¤µ¤ì¤Þ¤·¤¿"
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr "µ­Ï¿¤Î¥í¥Ã¥¯"
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "¥æ¡¼¥¶¥·¥°¥Ê¥ë 1"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "¥æ¡¼¥¶¥·¥°¥Ê¥ë 2"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "HFT ̤·è¤ÎÆþÎϥǡ¼¥¿"
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "ÅŸ»¸Î¾ã¤Î´í¸±"
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "¥·¥¹¥Æ¥à¥¯¥é¥Ã¥·¥å¤Î´í¸±"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "¥×¥í¥»¥¹¤ò°ã¤¦CPU¤Ë°ÜÆ°"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "¥×¥í¥°¥é¥ß¥ó¥°¥¨¥é¡¼"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "HTF monitor¥â¡¼¥É¤¬Í¿¤¨¤é¤ì¤Þ¤·¤¿"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "HFT monitor¥â¡¼¥É¤¬Ã¥¤ï¤ì¤Þ¤·¤¿"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr ""
+
+#: siglist.c:215
+msgid "Information request"
+msgstr ""
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "̤ÃΤΥ·¥°¥Ê¥ë #"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "̤ÃΤΥ·¥°¥Ê¥ë #%d"
+
+#: subst.c:1333 subst.c:1454
+#, fuzzy, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "°­¤¤ÂåÆþ: `%s' ¤¬ %s ¤Ë¤Ï¤¢¤ê¤Þ¤»¤ó"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: ¥ê¥¹¥È¤òÇÛÎó¥á¥ó¥Ð¡¼¤Ë³ä¤êÅö¤Æ¤é¤ì¤Þ¤»¤ó"
+
+#: subst.c:4754 subst.c:4770
+#, fuzzy
+msgid "cannot make pipe for process substitution"
+msgstr "¥×¥í¥»¥¹¤ÎÂåÆþ¤Ë¥Ñ¥¤¥×¤òºîÀ®¤Ç¤­¤Þ¤»¤ó: %s"
+
+#: subst.c:4802
+#, fuzzy
+msgid "cannot make child for process substitution"
+msgstr "¥×¥í¥»¥¹¤ÎÂåÆþ¤Ë»Ò¤òºîÀ®¤Ç¤­¤Þ¤»¤ó: %s"
+
+#: subst.c:4847
+#, fuzzy, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "named pipe %s ¤ò %s ¤Ø³«¤±¤Þ¤»¤ó: %s"
+
+#: subst.c:4849
+#, fuzzy, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "named pipe %s ¤ò %s ¤Ø³«¤±¤Þ¤»¤ó: %s"
+
+#: subst.c:4867
+#, fuzzy, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "named pipe %s ¤ò fd %d ¤Î¤¿¤á¤ËÊ£À½¤¹¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó: %s"
+
+#: subst.c:5063
+#, fuzzy
+msgid "cannot make pipe for command substitution"
+msgstr "ÂåÍý¥³¥Þ¥ó¥É¤Ë¥Ñ¥¤¥×¤òºîÀ®¤Ç¤­¤Þ¤»¤ó: %s"
+
+#: subst.c:5097
+#, fuzzy
+msgid "cannot make child for command substitution"
+msgstr "ÂåÍý¥³¥Þ¥ó¥É¤Ë»Ò¤òºîÀ®¤Ç¤­¤Þ¤»¤ó: %s"
+
+#: subst.c:5114
+#, fuzzy
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "command_substitute: ¥Ñ¥¤¥×¤ò fd 1 ¤È¤·¤ÆÊ£À½¤Ç¤­¤Þ¤»¤ó: %s"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: ¥Ñ¥é¥á¡¼¥¿¤¬¥Ì¥ëËô¤Ï¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤Þ¤»¤ó"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr ""
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: °­¤¤ÂåÍý"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: ¤³¤Î¤è¤¦¤Ë»ØÄê¤Ç¤­¤Þ¤»¤ó"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, fuzzy, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "°­¤¤ÂåÆþ: `%s' ¤¬ %s ¤Ë¤Ï¤¢¤ê¤Þ¤»¤ó"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr ""
+
+#: test.c:146
+msgid "argument expected"
+msgstr "°ú¿ô¤ò´üÂÔ"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: »Ø¿ô¤Îɽ¸½¤ò´üÂÔ"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "`)' ¤ò´üÂÔ"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "`)', ¤ò´üÂÔ, ÆÀ¤¿¤Î¤Ï %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr ""
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr ""
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "`]'¤¬È´¤±¤Æ¤Þ¤¹"
+
+#: trap.c:203
+#, fuzzy
+msgid "invalid signal number"
+msgstr "°­¤¤¥·¥°¥Ê¥ëÈÖ¹æ"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr ""
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+
+#: trap.c:380
+#, fuzzy, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: °­¤¤¥·¥°¥Ê¥ë %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr ""
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr ""
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr ""
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr ""
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: ¥Ñ¥é¥á¡¼¥¿¤¬¥Ì¥ëËô¤Ï¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤Þ¤»¤ó"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr ""
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr ""
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr ""
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó"
+
+#: variables.c:4683
+#, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr ""
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr ""
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: version.c:86 version2.c:83
+#, fuzzy, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU %s, ¥Ð¡¼¥¸¥ç¥ó %s\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+
+#: version2.c:86
+#, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr ""
+
+#: version2.c:87
+#, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: xmalloc.c:91
+#, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "%s: %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó"
+
+#: xmalloc.c:163
+#, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "%s: %s ¤òºîÀ®¤Ç¤­¤Þ¤»¤ó"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [̾Á°[=ÃÍ] ... ]"
+
+#: builtins.c:47
+#, fuzzy
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] [̾Á° ...]"
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "̾̂ [n]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "³¹Ô [n]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [shell-builtin [°ú¿ô ...]]"
+
+#: builtins.c:61
+#, fuzzy
+msgid "caller [expr]"
+msgstr "test [ɽ¸½]"
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr ""
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr ""
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr ""
+
+#: builtins.c:72
+msgid "false"
+msgstr ""
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] ¥³¥Þ¥ó¥É [°ú¿ô ...]"
+
+#: builtins.c:76
+#, fuzzy
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-afFrxi] [-p] ̾Á°[=ÃÍ] ..."
+
+#: builtins.c:78
+#, fuzzy
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-afFrxi] [-p] ̾Á°[=ÃÍ] ..."
+
+#: builtins.c:80
+#, fuzzy
+msgid "local [option] name[=value] ..."
+msgstr "local ̾Á°[=ÃÍ] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [°ú¿ô ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [°ú¿ô ...]"
+
+#: builtins.c:90
+#, fuzzy
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-pnds] [-a] [-f ¥Õ¥¡¥¤¥ë̾] [̾Á° ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [°ú¿ô ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts optstring ̾Á° [°ú¿ô]"
+
+#: builtins.c:96
+#, fuzzy
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a ̾Á°] ¥Õ¥¡¥¤¥ë [¥ê¥À¥¤¥ì¥¯¥·¥ç¥ó ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "½ªÎ» [n]"
+
+#: builtins.c:100
+#, fuzzy
+msgid "logout [n]"
+msgstr "¥í¥°¥¢¥¦¥È"
+
+#: builtins.c:103
+#, fuzzy
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr "fc [-e ename] [-nlr] [ºÇ½é] [ºÇ¸å] of fc -s [¥Ñ¥¿¡¼¥ó=rep] [¥³¥Þ¥ó¥É]"
+
+#: builtins.c:107
+#, fuzzy
+msgid "fg [job_spec]"
+msgstr "disown [jobspec ...]"
+
+#: builtins.c:111
+#, fuzzy
+msgid "bg [job_spec ...]"
+msgstr "disown [jobspec ...]"
+
+#: builtins.c:114
+#, fuzzy
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-r] [-p ¥Ñ¥¹Ì¾] [̾Á° ...]"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "help [¥Ñ¥¿¡¼¥ó ...]"
+
+#: builtins.c:121
+#, fuzzy
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [n] Ëô¤Ï history -awrn [¥Õ¥¡¥¤¥ë̾] of history -ps arg [°ú¿ô...]"
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr "jobs [-lnprs] [jobspec ...] Ëô¤Ï jobs -x commando [°ú¿ô]"
+
+#: builtins.c:129
+#, fuzzy
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [jobspec ...]"
+
+#: builtins.c:132
+#, fuzzy
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s sigspec | -n signum | -sigspec] [pid | job]... Ëô¤Ï kill -l "
+"[sigspec]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let °ú¿ô [°ú¿ô ...]"
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+#, fuzzy
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o ¥ª¥×¥·¥ç¥ó] [°ú¿ô ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [̾Á° ...]"
+
+#: builtins.c:144
+#, fuzzy
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-nf] [̾Á° ...] Ëô¤Ï export -p"
+
+#: builtins.c:146
+#, fuzzy
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-anf] [̾Á° ...] Ëô¤Ï readonly -p"
+
+#: builtins.c:148
+#, fuzzy
+msgid "shift [n]"
+msgstr "½ªÎ» [n]"
+
+#: builtins.c:150
+#, fuzzy
+msgid "source filename [arguments]"
+msgstr "source ¥Õ¥¡¥¤¥ë̾"
+
+#: builtins.c:152
+#, fuzzy
+msgid ". filename [arguments]"
+msgstr ". ¥Õ¥¡¥¤¥ë̾"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [ɽ¸½]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ °ú¿ô... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "times"
+
+#: builtins.c:164
+#, fuzzy
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [°ú¿ô] [signal_spec] Ëô¤Ï trap -l"
+
+#: builtins.c:166
+#, fuzzy
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-apt] ̾Á° [̾Á° ...]"
+
+#: builtins.c:169
+#, fuzzy
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdfmstpnuv] [¾å¸Â]"
+
+#: builtins.c:172
+#, fuzzy
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-S] [¥â¡¼¥É]"
+
+#: builtins.c:175
+#, fuzzy
+msgid "wait [id]"
+msgstr "wait [n]"
+
+#: builtins.c:179
+#, fuzzy
+msgid "wait [pid]"
+msgstr "wait [n]"
+
+#: builtins.c:182
+#, fuzzy
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for ̾Á° [in ¸ÀÍÕ ... ;] do ¥³¥Þ¥ó¥É·²; done"
+
+#: builtins.c:184
+#, fuzzy
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for ̾Á° [in ¸ÀÍÕ ... ;] do ¥³¥Þ¥ó¥É·²; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select ̾Á° [in ¸ÀÍÕ ... ;] do ¥³¥Þ¥ó¥É·²; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr ""
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case ¸ÀÍÕ in [¥Ñ¥¿¡¼¥ó [| ¥Ñ¥¿¡¼¥ó]...) ¥³¥Þ¥ó¥É·² ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if ¥³¥Þ¥ó¥É·²; then ¥³¥Þ¥ó¥É·²; [ elif ¥³¥Þ¥ó¥É·²; then ¥³¥Þ¥ó¥É·²; ]... "
+"[ else ¥³¥Þ¥ó¥É·²; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while ¥³¥Þ¥ó¥É·²; do ¥³¥Þ¥ó¥É·²; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until ¥³¥Þ¥ó¥É·²; do ¥³¥Þ¥ó¥É·²; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr ""
+
+#: builtins.c:200
+#, fuzzy
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "function ̾Á° { ¥³¥Þ¥ó¥É·² ; } or ̾Á° () { ¥³¥Þ¥ó¥É·² ; } "
+
+#: builtins.c:202
+#, fuzzy
+msgid "{ COMMANDS ; }"
+msgstr "{ ¥³¥Þ¥ó¥É·² }"
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr ""
+
+#: builtins.c:206
+#, fuzzy
+msgid "(( expression ))"
+msgstr "ɽ¸½¤ò´üÂÔ¤·¤Æ¤Þ¤¹"
+
+#: builtins.c:208
+#, fuzzy
+msgid "[[ expression ]]"
+msgstr "ɽ¸½¤ò´üÂÔ¤·¤Æ¤Þ¤¹"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr ""
+
+#: builtins.c:213
+#, fuzzy
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [¥Ç¥£¥ì¥¯¥È¥ê | +N | -N ] [-n]"
+
+#: builtins.c:217
+#, fuzzy
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [+N | -N] [-n]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+#, fuzzy
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o Ť¤¥ª¥×¥·¥ç¥ó] optname [optname...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr ""
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "type [-apt] ̾Á° [̾Á° ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+
+#: builtins.c:276
+#, fuzzy
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"[̾Á°]¤òÄêµÁ¤µ¤ì¤Æ¤¤¤ë¥¨¥¤¥ê¥¢¥¹¤«¤éºï½ü¤·¤Ê¤µ¤¤¡£¤â¤·¡¢-a ¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ"
+"¤¿¤Ê¤é¡¢"
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+
+#: builtins.c:966
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+
+#~ msgid "Missing `}'"
+#~ msgstr "`}'¤¬¤¢¤ê¤Þ¤»¤ó"
+
+#~ msgid "brace_expand> "
+#~ msgstr "¥Ö¥ì¡¼¥¹Å¸³«> "
+
+#~ msgid "Attempt to free unknown command type `%d'.\n"
+#~ msgstr "̤ÃΤʥ³¥Þ¥ó¥É¥¿¥¤¥× `%d' ¤ò³«Êü¤·¤è¤¦¤È¤·¤Æ¤Þ¤¹.\n"
+
+#~ msgid "Report this to %s\n"
+#~ msgstr "%s ¤ËÊó¹ð¤·¤Æ¤¯¤À¤µ¤¤\n"
+
+#~ msgid "Stopping myself..."
+#~ msgstr "Ää»ß¤·¤Þ¤¹..."
+
+#~ msgid "Tell %s to fix this someday.\n"
+#~ msgstr "%s ¤Ë¤¤¤Ä¤«¤³¤ì¤òľ¤¹¤è¤¦¤ËÅÁ¤¨¤Æ¤¯¤À¤µ¤¤.\n"
+
+#~ msgid "execute_command: bad command type `%d'"
+#~ msgstr "¥³¥Þ¥ó¥É¼Â¹Ô: ´Ö°ã¤Ã¤¿¥³¥Þ¥ó¥É¥¿¥¤¥× `%d'"
+
+#~ msgid "real\t"
+#~ msgstr "¼Â\t"
+
+#~ msgid "user\t"
+#~ msgstr "¥æ¡¼¥¶\t"
+
+#~ msgid "sys\t"
+#~ msgstr "¥·¥¹¥Æ¥à\t"
+
+#~ msgid ""
+#~ "real\t0m0.00s\n"
+#~ "user\t0m0.00s\n"
+#~ "sys\t0m0.00s\n"
+#~ msgstr ""
+#~ "¼Â\t0m0.00s\n"
+#~ "¥æ¡¼¥¶\t0m0.00s\n"
+#~ "¥·¥¹¥Æ¥à\t0m0.00s\n"
+
+#~ msgid "cannot duplicate fd %d to fd 1: %s"
+#~ msgstr "fd %d ¤ò fd 1 ¤ËÊ£À½¤Ç¤­¤Þ¤»¤ó: %s"
+
+#~ msgid "%s: output redirection restricted"
+#~ msgstr "%s: ½ÐÎÏ¥ê¥À¥¤¥ì¥¯¥·¥ç¥ó¤¬À©¸Â¤µ¤ì¤Æ¤Þ¤¹"
+
+#~ msgid "Out of memory!"
+#~ msgstr "¥á¥â¥ê¤¬¤¢¤ê¤Þ¤»¤ó!"
+
+#~ msgid "You have already added item `%s'\n"
+#~ msgstr "¤¢¤Ê¤¿¤Ï´û¤Ë¥¢¥¤¥Æ¥à`%s'¤òÉÕ¤±Â­¤·¤Æ¤Þ¤¹\n"
+
+#~ msgid "You have entered %d (%d) items. The distribution is:\n"
+#~ msgstr ""
+#~ "¤¢¤Ê¤¿¤Þ¤Ï %d (%d) ¥¢¥¤¥Æ¥à¤òÆþÎϤ·¤Þ¤·¤¿¡£¥Ç¥£¥¹¥È¥ê¥Ó¥å¡¼¥·¥ç¥ó¤Ï:\n"
+
+#~ msgid "%s: bg background job?"
+#~ msgstr "%s: bg ¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¤Î»Å»ö?"
+
+#~ msgid ""
+#~ "Redirection instruction from yyparse () '%d' is\n"
+#~ "out of range in make_redirection ()."
+#~ msgstr ""
+#~ "yyparse () '%d' ¤«¤é¤Î¥ê¥À¥¤¥ì¥¯¥·¥ç¥ó»Ø¼¨¤Ï\n"
+#~ "make_redirection () ¤ÎÈϰϳ°¤Ç¤¹."
+
+#~ msgid "clean_simple_command () got a command with type %d."
+#~ msgstr "clean_simple_command () ¤Ï¥¿¥¤¥× %d ¤Î¥³¥Þ¥ó¥É¤òÆÀ¤Þ¤·¤¿."
+
+#~ msgid "got errno %d while waiting for %d"
+#~ msgstr "¥¨¥é¡¼ÈÖ¹æ %d ¤ò %d ¤òÂԤäƤ¤¤ë´Ö¤ËÆÀ¤Þ¤·¤¿"
+
+#~ msgid "syntax error near unexpected token `%c'"
+#~ msgstr "´üÂÔ¤·¤Æ¤Ê¤¤ token `%c' ¤Î¤¢¤¿¤ê¤Ë¥·¥ó¥¿¥Ã¥¯¥¹¥¨¥é¡¼"
+
+#~ msgid "cprintf: bad `%%' argument (%c)"
+#~ msgstr "cprintf: °­¤¤ `%%' °ú¿ô (%c)"
+
+#~ msgid "option `%s' requires an argument"
+#~ msgstr "optie `%s' ¤Ï°ú¿ô¤òɬÍפȤ·¤Þ¤¹"
+
+#~ msgid "%s: unrecognized option"
+#~ msgstr "%s: ǧ¼±¤Ç¤­¤Ê¤¤¥ª¥×¥·¥ç¥ó"
+
+#~ msgid "`-c' requires an argument"
+#~ msgstr "`-c' °ú¿ô¤òɬÍפȤ·¤Þ¤¹"
+
+#~ msgid "%s: cannot execute directories"
+#~ msgstr "%s: ¥Ç¥£¥ì¥¯¥È¥ê¤ò¼Â¹Ô¤Ç¤­¤Þ¤»¤ó"
+
+#~ msgid "Bad code in sig.c: sigprocmask"
+#~ msgstr "sig.c ¤ÎÃæ¤Ë°­¤¤¥³¡¼¥É: sigprocmask"
+
+#~ msgid "bad substitution: no ending `}' in %s"
+#~ msgstr "°­¤¤ÂåÆþ: ½ªÎ»¤¹¤ë `}' ¤¬ %s ¤Ë¤¢¤ê¤Þ¤»¤ó"
+
+#~ msgid "%s: bad array subscript"
+#~ msgstr "%s: °­¤¤ÇÛÎó subscript"
+
+#~ msgid "can't make pipes for process substitution: %s"
+#~ msgstr "¥×¥í¥»¥¹¤ÎÂåÆþ¤Ë¥Ñ¥¤¥×¤òºîÀ®¤Ç¤­¤Þ¤»¤ó: %s"
+
+#~ msgid "reading"
+#~ msgstr "Æɤ߹þ¤ßÃæ"
+
+#~ msgid "process substitution"
+#~ msgstr "¥×¥í¥»¥¹¤ÎÂåÍý"
+
+#~ msgid "command substitution"
+#~ msgstr "¥³¥Þ¥ó¥É¤ÎÂåÍý"
+
+#~ msgid "Can't reopen pipe to command substitution (fd %d): %s"
+#~ msgstr "¥³¥Þ¥ó¥É¤ÎÂåÍý¤Ë¥Ñ¥¤¥×¤òºÆ¤Ó³«¤±¤Þ¤»¤ó (fd %d): %s"
+
+#~ msgid "$%c: unbound variable"
+#~ msgstr "$%c: Ÿ³«¤µ¤ì¤Æ¤¤¤Ê¤¤ÊÑ¿ô"
+
+#~ msgid "%s: bad arithmetic substitution"
+#~ msgstr "%s: ´Ö°ã¤Ã¤¿»»½ÑÂåÆþ"
+
+#~ msgid "option %c\n"
+#~ msgstr "¥ª¥×¥·¥ç¥ó %c\n"
+
+#~ msgid "option a\n"
+#~ msgstr "¥ª¥×¥·¥ç¥ó a\n"
+
+#~ msgid "option b\n"
+#~ msgstr "¥ª¥×¥·¥ç¥ó b\n"
+
+#~ msgid "option c with value `%s'\n"
+#~ msgstr "ÃÍ `%s' ¤Î¥ª¥×¥·¥ç¥ó c\n"
+
+#~ msgid "?? sh_getopt returned character code 0%o ??\n"
+#~ msgstr "?? sh_getopt ¤Ï¥­¥ã¥é¥¯¥¿¡¼¥³¡¼¥É 0%o ¤òÊÖ¤·¤Þ¤·¤¿ ??\n"
+
+#~ msgid "%s: Unknown flag %s.\n"
+#~ msgstr "%s: ̤ÃΤΥե饰 %s.\n"
+
+#~ msgid "%s requires an argument"
+#~ msgstr "%s °ú¿ô¤¬É¬Í×"
+
+#~ msgid "%s must be inside of a $BUILTIN block"
+#~ msgstr "%s ¤Ï $BUILTIN ¥Ö¥í¥Ã¥¯¤ÎÃæ¤Ç¤Ê¤±¤ì¤Ð¤¤¤±¤Þ¤»¤ó"
+
+#~ msgid "%s found before $END"
+#~ msgstr "%s ¤¬ $END ¤ÎÁ°¤Ë¸«¤Ä¤«¤ê¤Þ¤·¤¿"
+
+#~ msgid "%s already has a function (%s)"
+#~ msgstr "%s ¤Ï´û¤Ë´Ø¿ô¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹ (%s)"
+
+#~ msgid "%s already had a docname (%s)"
+#~ msgstr "%s ¤Ï´û¤Ëdocname¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹ (%s) "
+
+#~ msgid "%s already has short documentation (%s)"
+#~ msgstr "%s ¤Ï´û¤Ë¾®¥É¥­¥å¥á¥ó¥È¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹ (%s)"
+
+#~ msgid "%s already has a %s definition"
+#~ msgstr "%s ¤Ï´û¤Ë % sÄêµÁ¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹"
+
+#~ msgid "mkbuiltins: Out of virtual memory!\n"
+#~ msgstr "mkbuiltins: ²¾ÁÛ¥á¥â¥êÀÚ¤ì!\n"
+
+#~ msgid "read [-r] [-p prompt] [-a array] [-e] [name ...]"
+#~ msgstr "read [-r] [-p prompt] [-a ÇÛÎó] [-e] [̾Á° ...]"
+
+#~ msgid "%[DIGITS | WORD] [&]"
+#~ msgstr "%[·å¿ô | ¸ÀÍÕ] [%]"
+
+#~ msgid "variables - Some variable names and meanings"
+#~ msgstr "ÊÑ¿ô - ÊÑ¿ô̾¤È°ÕÌ£"
+
+#~ msgid "`alias' with no arguments or with the -p option prints the list"
+#~ msgstr "°ú¿ô̵¤·Ëô¤Ï¥ª¥×¥·¥ç¥ó -p ÉÕ¤­¤Î`alias'¤Ï¥ê¥¹¥È¤ò½ÐÎÏ"
+
+#~ msgid "of aliases in the form alias NAME=VALUE on standard output."
+#~ msgstr "ɸ½à½ÐÎϤΠ̾Á°=ÃÍ ¤Î·Á¼°¤Ç¥¨¥¤¥ê¥¢¥¹"
+
+#~ msgid "Otherwise, an alias is defined for each NAME whose VALUE is given."
+#~ msgstr "¤µ¤â¤Ê¤±¤ì¤Ð¡¢¤½¤ì¤¾¤ìÃͤÎÍ¿¤¨¤é¤ì¤¿Ì¾Á°¤Ë¥¨¥¤¥ê¥¢¥¹¤ÏÄêµÁ¤µ¤ì¤ë."
+
+#~ msgid "true unless a NAME is given for which no alias has been defined."
+#~ msgstr "¥¨¥¤¥ê¥¢¥¹¤¬ÄêµÁ¤µ¤ì¤Æ¤ª¤é¤º¡¢[̾Á°]¤¬ÅϤµ¤ì¤Æ¤¤¤Ê¤±¤ì¤Ð¿¿"
+
+#~ msgid "then remove all alias definitions."
+#~ msgstr "Á´¤Æ¤Î¥¨¥¤¥ê¥¢¥¹¤ÎÄêµÁ¤òºï½ü."
+
+#~ msgid "Arguments we accept:"
+#~ msgstr "¼õ¤±¼è¤ë°ú¿ô¤Ï:"
diff --git a/po/lt.gmo b/po/lt.gmo
new file mode 100644
index 0000000..a3be0fa
--- /dev/null
+++ b/po/lt.gmo
Binary files differ
diff --git a/po/lt.po b/po/lt.po
new file mode 100644
index 0000000..d0000ec
--- /dev/null
+++ b/po/lt.po
@@ -0,0 +1,4317 @@
+# translation of bash-4.0.po to Lithuanian
+# Copyright (C) 2008 Free Software Foundation, Inc.
+# This file is distributed under the same license as the bash package.
+#
+# Gintautas Miliauskas <gintas@akl.lt>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: bash-4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2009-03-25 16:49+0200\n"
+"Last-Translator: Gintautas Miliauskas <gintas@akl.lt>\n"
+"Language-Team: Lithuanian <komp_lt@konferencijos.lt>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && (n%"
+"100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "blogas masyvo indeksas"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr ""
+
+#: arrayfunc.c:480
+#, fuzzy, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: netaisyklingas veiksmo pavadinimas"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: nepavyko priskirti prie neskaitinio indekso"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: nepavyko sukurti: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr "bash_execute_unix_command: nepavyko rasti keymapo komandai"
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: pirmas ne tarpo simbolis nėra „\"“"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "nÄ—ra uždaranÄiojo „%c“ %s"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: trūksta dvitaškio skirtuko"
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "„%s“: netaisyklingas keymap'o pavadinimas"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr "eilutės redagavimas neįgalintas"
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "„%s“: netaisyklingas keymap'o pavadinimas"
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: nepavyko perskaityti: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "„%s“: nepavyko atjungti (unbind)"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "„%s“: nežinomas funkcijos pavadinimas"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s nėra priskirtas jokiam klavišui.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s gali būti iškviestas su "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr ""
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "prasminga tik „for“, „while“ arba „until“ cikle"
+
+#: builtins/caller.def:133
+#, fuzzy
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr "Grąžina esamos procedūros kontekstą."
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "HOME nenustatytas"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "OLDPWD nenustatytas"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr "eilutÄ— %d: "
+
+#: builtins/common.c:139 error.c:261
+#, c-format
+msgid "warning: "
+msgstr "įspėjimas: "
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr "%s: naudojimas: "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "per daug argumentų"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: parametrui reikia argumento"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: reikia skaitinio argumento"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: nerasta"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: negalimas parametras"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: netaisyklingas parametro vardas"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "`%s': netaisyklingas identifikatorius"
+
+#: builtins/common.c:238
+msgid "invalid octal number"
+msgstr "netaisyklingas aÅ¡tuonetainis skaiÄius"
+
+#: builtins/common.c:240
+msgid "invalid hex number"
+msgstr "netaisyklingas Å¡eÅ¡ioliktainis skaiÄius"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "netaisyklingas skaiÄius"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: netaisyklinga signalo specifikacija"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "„%s“: ne pid'as ar taisyklinga darbo specifikacija"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: kintamasis tik skaitymui"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s išėjo už ribų"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "argumentas"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s už ribų"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: nÄ—ra tokio darbo"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: nėra darbų valdymo"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "nėra darbų valdymo"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: apribota"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "apribota"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: ne vidinÄ— aplinkos komanda"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "rašymo klaida: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: klaida skaitant esamÄ… aplankÄ…: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: dviprasmis darbo aprašymas"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: netaisyklingas veiksmo pavadinimas"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: nÄ—ra baigimo specifikacijos"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "įspėjimas: parametras -F gali neveikti taip, kaip tikitės"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "įspėjimas: parametras -C gali neveikti taip, kaip tikitės"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr ""
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "galima naudoti tik funkcijoje"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "negalima naudoti „-f“ funkcijoms kurti"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: funkcija tik skaitymui"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: negalima tokiu būdu sunaikinti masyvų kintamųjų"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "dinaminis įkrovimas negalimas"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "nepavyko atverti bendrojo objekto %s: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "nepavyko rasti %s bendrajame objekte %s: %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: nedinamiškai įkrauta"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: nepavyko ištrinti: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: aplankas"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: ne paprastas failas"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: failas per didelis"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: negalima vykdyti dvejetainių failų"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: nepavyko paleisti: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr ""
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "ne prisijungimo aplinka: naudokite „exit“"
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "Yra sustabdytų darbų.\n"
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr "Yra veikianÄių darbų.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "komandų nerasta"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "istorijos specifikacija"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: nepavyko atverti laikinojo failo: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr ""
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "darbas %d pradėtas be darbų valdymo"
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: neleistinas parametras -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: parametrui reikia argumento -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "maiša išjungta"
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: maiÅ¡os lentelÄ— tuÅ¡Äia\n"
+
+#: builtins/hash.def:244
+#, fuzzy, c-format
+msgid "hits\tcommand\n"
+msgstr "paskutinÄ— komanda: %s\n"
+
+#: builtins/help.def:130
+#, fuzzy, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Aplinkos komandos, atitinkanÄios raktažodį „"
+msgstr[1] "Aplinkos komandos, atitinkanÄios raktažodį „"
+msgstr[2] "Aplinkos komandos, atitinkanÄios raktažodį „"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"nÄ—ra žinyno temų, atitinkanÄių „%s“. Bandykite „help help“, „man -k %s“ arba "
+"„info %s“."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: nepavyko atverti: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"Šios aplinkos komandos vidinės. Jei norite pamatyti šį sąrašą, įveskite "
+"„help“.\n"
+"Įveskite „help fn“, jei norite sužinoti daugiau apie funkciją „fn“.\n"
+"Įveskite „info bash“, jei norite daugiau sužinoti apie aplinką apskritai.\n"
+"Naudokite „man -k“ ir „info“, jei norite sužinoti daugiau apie komandas, "
+"nesanÄiasÅ¡iame sÄ…raÅ¡e.\n"
+"\n"
+"Žvaigždutė (*) prie vardo reiškia, kad komanda išjungta.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "negalima naudoti daugiau negu vieno parametro iš -anrw"
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "istorijos pozicija"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: istorijos išskleidimas nesėkmingas"
+
+#: builtins/inlib.def:71
+#, fuzzy, c-format
+msgid "%s: inlib failed"
+msgstr "%s: istorijos išskleidimas nesėkmingas"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "su „-x“ neleidžiama naudoti kitų parametrų"
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: argumentai turi būti procesų arba darbų ID"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Nežinoma klaida"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "tikėtasi išraiškos"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: ne masyvo kintamasis"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: netaisyklinga failo deskriptoriaus specifikacija"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: netaisyklingas failo deskriptorius: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, fuzzy, c-format
+msgid "%s: invalid line count"
+msgstr "%s: nesamas parametras"
+
+#: builtins/mapfile.def:277
+#, fuzzy, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: nesamas parametras"
+
+#: builtins/mapfile.def:294
+#, fuzzy, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: netaisyklingas veiksmo pavadinimas"
+
+#: builtins/mapfile.def:326
+#, fuzzy
+msgid "empty array variable name"
+msgstr "%s: ne masyvo kintamasis"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr ""
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "„%s“: trūksta formato simbolio"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "„%c“: netaisyklingas formato simbolis"
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr "įspėjimas: %s: %s"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "trūksta šešioliktainio skaitmens išraiškoje \\x"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "nÄ—ra kito aplanko"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<nÄ—ra esamo aplanko>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr ""
+
+#: builtins/pushd.def:508
+#, fuzzy
+msgid "directory stack index"
+msgstr "rekursijos steko atvirkštinis perpildymas"
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: klaidinga laiko ribos (timeout) specifikacija"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "skaitymo klaida: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr "galima grįžti (return) tik iš funkcijos ar scenarijaus"
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "negalima kartu ištrinti funkcijos ir kintamojo"
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: nepavyko ištrinti"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: nepavyko ištrinti: %s tik skaitymui"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: ne masyvo kintamasis"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: ne funkcija"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "postÅ«mių skaiÄius"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr "negalima aplinkos nuostatos vienu metu įjungti ir išjungti"
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: netaisyklingas aplinkos nuostatos pavadinimas"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "reikia failo pavadinimo argumento"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: failas nerastas"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "nepavyko sustabdyti"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "nepavyko sustabdyti prisijungimo aplinkos"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "%s yra „%s“ sinonimas\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s yra aplinkos raktinis žodis\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s yra funkcija\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "%s yra aplinkos vidinÄ— komanda\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s yra %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "%s yra hešuotas (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s: netaisyklingas limito argumentas"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "`%c': bloga komanda"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: nepavyko gauti limito: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr "riba"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: nepavyko pakeisti limito: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "aÅ¡tuntainis skaiÄius"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "„%c“: netaisyklingas simbolinės veiksenos operatorius"
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "„%c“: netaisyklingas simbolinės veiksenos simbolis"
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr " eilutÄ— "
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "paskutinÄ— komanda: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "Nutraukiama..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "nežinoma komandos klaida"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "blogas komandos tipas"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "blogas jungtukas"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "blogas Å¡uolis"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: nepriskirtas kintamasis"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "laukiant įvedimo baigėsi laikas: automatiškai atsijungta\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "nepavyko peradresuoti standartinio įvedimo iš /dev/null: %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "TIMEFORMAT: „%c“: netaisyklingas formato simbolis"
+
+#: execute_cmd.c:2075
+#, fuzzy
+msgid "pipe error"
+msgstr "rašymo klaida: %s"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: apribota: negalima naudoti „/“ komandų pavadinimuose"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: komanda nerasta"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: blogas interpretatorius"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "nepavyko dublikuoti fd %d į fd %d"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "viršytas išraiškos rekursijos lygis"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "rekursijos steko atvirkštinis perpildymas"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "sintaksės klaida išraiškoje"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "bandymas priskirti ne kintamajam"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "dalyba iš 0"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "klaida: bloga expassign leksema"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "sąlygos išraiškoje tikėtasi „:“"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "eksponentė mažesnis už 0"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr ""
+"po prieš-didinimo ar prieš-mažinimo operatoriaus tikėtasi identifikatoriaus"
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "Trūksta „)“"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "sintaksÄ—s klaida: tikÄ—tasi operando"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "sintaksÄ—s klaida: netaisyklingas aritmetinis operatorius"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr ""
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "netaisyklingas aritmetinis pagrindas"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "per didelė pagrindo reikšmė"
+
+#: expr.c:1329
+#, c-format
+msgid "%s: expression error\n"
+msgstr "%s: išraiškos klaida\n"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getcwd: nepavyko pasiekti aukštesnių aplankų"
+
+#: input.c:94 subst.c:4857
+#, fuzzy, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "nepavyko dublikuoti fd %d į fd %d"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr "nepavyko išskirti naujo failo deskriptoriaus bash įvedimui iš fd %d"
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "save_bash_input: naujam fd %d buferis jau egzistuoja"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr ""
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr ""
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "trinamas sustabdytas darbas %d procesų grupėje %ld"
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr ""
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr ""
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: %ld: tokio pid nÄ—ra"
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr "Signalas %d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Atlikta"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr ""
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr ""
+
+#: jobs.c:1443
+msgid "Running"
+msgstr ""
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Atlikta(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr ""
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Nežinoma būsena"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr ""
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr ""
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr ""
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait: pid %ld nÄ—ra Å¡ios aplinkos dukterinis procesas"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "wait_for: nėra proceso %ld įrašo"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job: darbas %d yra sustabdytas"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: darbas užsibaigė"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: darbas %d jau fone"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, c-format
+msgid "%s: line %d: "
+msgstr "%s: %d eilutÄ—: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr ""
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr ""
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr ""
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr ""
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr ""
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr ""
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "šioje aplinkoje nėra darbų valdymo"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc: pažeista prielaida: %s\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"malloc: %s:%d: prielaida pažeista\r\n"
+
+#: lib/malloc/malloc.c:313
+msgid "unknown"
+msgstr "nežinoma"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr "malloc: blokas iš laisvų blokų sąrašo sugadintas"
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free: iškviestas su jau atlaisvintu bloku"
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free: iškviestas su nerezervuotu bloku"
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr "free: atvirkštinis perpildymas (underflow); mh_nbytes už ribos"
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free: pradžios ir pabaigos blokų (chunk) dydžiai skiriasi"
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc: iškviestas su nerezervuotu bloku"
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr "realloc: atvirkštinis perpildymas (underflow); mh_nbytes už ribos"
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "realloc: pradžios ir pabaigos blokų (chunk) dydžiai skiriasi"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr "register_alloc: alloc lentelÄ— pilna su FIND_ALLOC?\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr "register_alloc: %p jau lentelÄ—je kaip rezervuotas?\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "register_free: %p jau lentelÄ—je kaip laisvas?\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "netaisyklingas pagrindas"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: adresas nežinomas"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: netaisyklinga tarnyba"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: netaisyklingas tinklo kelias"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "tinklo operacijos nepalaikomos"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc: %s:%d: nepavyko išskirti %lu baitų"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc: %s:%d: nepavyko išskirti %lu baitų"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Turite laiškų $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Turite naujų laiškų $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "Paštas %s perskaitytas\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "sintaksės klaida: reikia aritmetinės išraiškos"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "sintaksės klaida: netikėtas „;“"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "sintaksės klaida: „((%s))“"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: blogas instrukcijos tipas %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr "make_redirection: nukreipimo instrukcija „%d“ už ribų"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "netikėta failo pabaiga ieškant atitinkamo „%c“"
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "netikėta failo pabaiga ieškant „]]“"
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "sintaksės klaida sąlygos išraiškoje: netikėta leksema „%s“"
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "sintaksės klaida sąlygos išraiškoje"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "netikėta leksema „%s“, tikėtasi „)“"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "tikėtasi „)“"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "netikėtas argumentas „%s“ sąlygos unariniam operatoriui"
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "netikÄ—tas argumentas sÄ…lygos unariniam operatoriui"
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "netikėta leksema „%s“, tikėtasi sąlyginio binarinio operatoriaus"
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "tikÄ—tasi sÄ…lygos binarinio operatoriaus"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "netikėtas argumentas „%s“ sąlygos binariniam operatoriui"
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "netikÄ—tas argumentas sÄ…lygos binariniam operatoriui"
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "netikėta leksema „%c“ sąlygos komandoje"
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "netikėta leksema „%s“ sąlygos komandoje"
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "netikÄ—ta leksema %d sÄ…lygos komandoje"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "sintaksės klaida prie netikėtos leksemos: „%s“"
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "sintaksės klaida prie „%s“"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "sintaksÄ—s klaida: netikÄ—ta failo pabaiga"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "sintaksÄ—s klaida"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Naudokite „%s“, jei norite išeiti iš ap.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "netikėta failo pabaiga ieškant atitinkamo „)“"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "completion: funkcija „%s“ nerasta"
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr "progcomp_insert: %s: NULL COMPSPEC"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: blogas jungtukas  „%d“"
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d: netaisyklingas failo deskriptorius: %s"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "cprintf: „%c“: netaisyklingas formato simbolis"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "failo deskriptorius už ribų"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: ambiguous redirect"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: negalima perraÅ¡yti egzistuojanÄio failo"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: apribota: negalima peradresuoti išvedimo"
+
+#: redir.c:180
+#, fuzzy, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "nepavyko sukurti laikino failo „here“ dokumentui: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: negalima priskirti sąrašo masyvo elementui"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "/dev/(tcp|udp)/serveris/prievadas nepalaikoma be tinklo"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "nukreipimo klaida: nepavyko dublikuoti fd"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "nepavyko rasti /tmp, sukurkite šį aplanką!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "/tmp turi būti taisyklingas aplanko pavadinimas"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: netaisyklingas parametras"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Neturiu vardo!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU bash, versija %s-(%s)\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Naudojimas:\t%s [GNU ilgas parametras] [parametras] ...\n"
+"\t%s [GNU ilgas parametras] [parametras] scenarijaus-failas ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "GNU ilgi parametrai:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Aplinkos parametrai:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr ""
+"\t-irsD arba -c komanda arba -O shopt_nustatymas\t\t(tik iškvietimui)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s arba -o nustatymas\n"
+
+#: shell.c:1822
+#, fuzzy, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"Bandykite „%s --help“ arba „%s --usage“, jei norite gauti daugiau "
+"informacijos.\n"
+
+#: shell.c:1823
+#, fuzzy, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr "Bandykite „ldd --help“, jei norite daugiau informacijos."
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "Naudokite komandą „bashbug“ klaidoms pranešti.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d: netaisyklinga operacija"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr ""
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr ""
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr ""
+
+#: siglist.c:59
+msgid "Quit"
+msgstr ""
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr ""
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr ""
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "ABORT instrukcija"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr ""
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Slankaus kablelio klaida"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr ""
+
+#: siglist.c:91
+#, fuzzy
+msgid "Bus error"
+msgstr "sintaksÄ—s klaida"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Segmentacijos klaida"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr ""
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr ""
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Žadintuvas"
+
+#: siglist.c:111
+msgid "Terminated"
+msgstr "Nutraukta"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr ""
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Sustabdyta (signalas)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "Tęsti"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr ""
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Sustabdyta (tty įvedimas)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Sustabdyta (tty išvedimas)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr ""
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "CPU riba"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "Failų riba"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr ""
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr ""
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Langas pakeistas"
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr ""
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr ""
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr ""
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr ""
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr ""
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr ""
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "proceso migravimas į kitą CPU"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "programavimo klaida"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr ""
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr ""
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr ""
+
+#: siglist.c:215
+msgid "Information request"
+msgstr "Informacijos užklausa"
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Nežinomas signalas #"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Nežinomas signalas #%d"
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "blogas keitinys: trūksta „%s“ %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: negalima priskirti sąrašo masyvo elementui"
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr ""
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr ""
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr ""
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr ""
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr ""
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr ""
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr ""
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr ""
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: parametras tuÅ¡Äias arba nenustatytas"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: posekio išraiška < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: blogas keitinys"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: negalima tokiu būdu priskirti"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, fuzzy, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "blogas keitinys: trūksta „%s“ %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "nėra atitikmenų: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "tikÄ—tasi argumento"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: tikėtasi skaitinės išraiškos"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "tikėtasi „)“"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "tikėtasi „)“, rasta %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: tikÄ—tasi unarinio operatoriaus"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: tikÄ—tasi binarinio operatoriaus"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "trūksta „]“"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "netaisyklingas signalo numeris"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps: bloga trap_list[%d] reikšmė: %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr "run_pending_traps: signalo doroklÄ— yra SIG_DFL, siunÄiamas %d (%s) sau"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: blogas signalas %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "klaida importuojant funkcijos apibrėžimą „%s“"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "aplinkos lygmuo (%d) per aukštas, nustatoma į 1"
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr ""
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr ""
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: parametras tuÅ¡Äias arba nenustatytas"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "netaisyklingas simbolis %d %s exportstr'e"
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "%s exportstr'e trūksta „=“"
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr "pop_var_context: nÄ—ra global_variables konteksto"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: nepavyko atverti: %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d: netaisyklingas failo deskriptorius: %s"
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "AutorinÄ—s teisÄ—s (C) 2009 Free Software Foundation, Inc."
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Licencija GPLv3+: GNU GPL versija 3 arba naujesnÄ— <http://gnu.org/licenses/"
+"gpl.html>\n"
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU bash, versija %s (%s)\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+"Tai yra laisva programinė įranga; jūs esate laisvas keisti ir platinti ją.\n"
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr "Nėra JOKIOS GARANTIJOS, kiek tik tą leidžia įstatymas.\n"
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "AutorinÄ—s teisÄ—s (C) 2009 Free Software Foundation, Inc."
+
+#: version2.c:87
+#, fuzzy, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Licencija GPLv3+: GNU GPL versija 3 arba naujesnÄ— <http://gnu.org/licenses/"
+"gpl.html>\n"
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: nepavyko išskirti %lu baitų (%lu baitų išskirta)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: nepavyko išskirti %lu baitų"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: %s:%d: nepavyko išskirti %lu baitų (išskirta %lu baitų)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: %s:%d: nepavyko išskirti %lu baitų"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [pavadinimas[=reikšmė] ... ]"
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] pavadinimas [pavadinimas ...]"
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [n]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [n]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [aplinkos-komanda [arg ...]]"
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr "caller [išraiška]"
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-L|-P] [aplankas]"
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr "pwd [-LP]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr "true"
+
+#: builtins.c:72
+msgid "false"
+msgstr "false"
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] komanda [arg ...]"
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-aAfFilrtux] [-p] [pavadinimas[=reikšmė] ...]"
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-aAfFilrtux] [-p] pavadinimas[=reikšmė] ..."
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr "local [option] pavadinimas[=reikšmė] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [arg ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [arg ...]"
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-a] [-dnps] [-f failopavadinimas] [pavadinimas ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [arg ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts optsekos pavadinimas [arg]"
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr ""
+"exec [-cl] [-a pavadinimas] [komanda [argumentai ...]] [nukreipimas ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [n]"
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr "logout [n]"
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr "fc [-e evardas] [-lnr] [pirm] [pask] arba fc -s [pat=rep] [komanda]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr ""
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr ""
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr ""
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "echo [-n] [arg ...]"
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr ""
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr ""
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s sigspec | -n signum | -sigspec] pid | darbospec ... arba kill -l "
+"[sigspec]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let arg [arg ...]"
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o nustatymas] [arg ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [pavadinimas ...]"
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-fn] [pavadinimas[=vertÄ—] ...] arba export -p"
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-af] [pavadinimas[=vertÄ—] ...] arba readonly -p"
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr "shift [n]"
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr "source failopavadinimas [argumentai]"
+
+#: builtins.c:152
+msgid ". filename [arguments]"
+msgstr ". failopavadinimas [argumentai]"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [išrk]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ arg... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "times"
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [-lp] [[arg] signalo_spec ...]"
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-afptP] pavadinimas [pavadinimas ...]"
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdefilmnpqrstuvx] [riba]"
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-p] [-S] [režimas]"
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr "wait [id]"
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr "wait [pid]"
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for PAVADINIMAS [in ŽODŽIAI ... ] ; do KOMANDOS; done"
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for (( išrk1; išrk2; išrk3 )); do KOMANDOS; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select PAVADINIMAS [in ŽODŽIAI ... ;] do KOMANDOS; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr ""
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr ""
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if KOMANDOS; then KOMANDOS; [ elif KOMANDOS; then KOMANDOS; ]... [ else "
+"KOMANDOS; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while KOMANDOS; do KOMANDOS; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until KOMANDOS; do KOMANDOS; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr ""
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "funkcijos pavadinimas { KOMANDOS ; } arba name () { KOMANDOS ; }"
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr "{ KOMANDOS ; }"
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr "darbo_spec [&]"
+
+#: builtins.c:206
+msgid "(( expression ))"
+msgstr "(( išraiška ))"
+
+#: builtins.c:208
+msgid "[[ expression ]]"
+msgstr "[[ išraiška ]]"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr "kintamieji – Kai kurių aplinkos kintamųjų pavadinimai ir reikšmės"
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [-n] [+N | -N | dir]"
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [-n] [+N | -N]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o] [optvardas ...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr "printf [-v kint] formatas [argumentai]"
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "shopt [-pqsu] [-o] [optvardas ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:254
+#, fuzzy
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"„alias“ be argumentų arba su -p nuostata išspausdina alternatyviųjų\n"
+" vardų sąrašą formatu VARDAS=REIKŠMĖ į standartinį išvedimą.\n"
+" Kitu atveju aprašomas alternatyvusis vardas kiekvienam VARDUI,\n"
+" kurio REIKÅ MÄ– nurodyta.\n"
+"Jei REIKÅ MÄ– baigiasi tarpo simboliu, kitame\n"
+" žodyje ieškoma alternatyviųjų vardų keitinių, kai alternatyvusis vardas\n"
+" išskleidžiamas. „alias“ grąžina „true“, nebent duotas VARDAS, kuriam\n"
+" neaprašytas joks alternatyvusis vardas."
+
+#: builtins.c:276
+#, fuzzy
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Pašalinti VARDUS iš aprašytų alternatyviųjų vardų sąrašo. Jei nurodyta\n"
+" nuostata -a, pašalinti visus alternatyviuosius vardus."
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+
+#: builtins.c:338
+#, fuzzy
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Tęsti kitą FOR, WHILE arba UNTIL ciklo iteraciją.\n"
+" Jei N nurodytas, tęsti ciklą, esantį N lygmenų virš esamo."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+
+#: builtins.c:365
+#, fuzzy
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+"Grąžina esamos procedūros kontekstą.\n"
+" \n"
+" Be IŠRAIŠKOS, grąžina „$eilutė $failo_vardas“. Su IŠRAIŠKA,\n"
+" grąžina „$eilutė $procedūra $failo_vardas“; ši papildoma informacija\n"
+" gali būti panaudota kuriant steko išrašą (stack trace).\n"
+" \n"
+" IŠRAIŠKOS reikšmė nurodo, per kiek kvietimo freimų grįžti nuo\n"
+" esamo; viršutinis freimas yra 0."
+
+#: builtins.c:383
+#, fuzzy
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+"Pakeisti esamą aplanką į DIR. Kintamasis $HOME yra\n"
+" numatytasis DIR. Kintamasis CDPATH nurodo aplankus, kuriuose bus\n"
+" ieškoma DIR. Aplankų pavadinimai CDPATH skiriami dvitaškiu (:).\n"
+" TuÅ¡Äias aplanko vardas tapatus esamam aplankui, t.y. „.“.\n"
+" Jei DIR prasideda pasviruoju brūkšniu (/), į CDPATH neatsižvelgiama.\n"
+" Jei aplankas nerastas ir aplinkos nuostata „cdable_vars“ įjungta,\n"
+" tada žodis bandomas kaip kintamojo pavadinimas. Jei kintamasis\n"
+" turi reikÅ¡mÄ™, tada esamas aplankas pakeiÄiamas į kintamojo reikÅ¡mÄ™.\n"
+" Parametras -P nurodo, kad turi būti naudojama fizinė aplankų struktūra,\n"
+" užuot sekus simbolines nuorodas; parametras -L nurodo, kad turi būti\n"
+" sekama simbolinÄ—mis nuorodomis."
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+
+#: builtins.c:428
+#, fuzzy
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr "Jokio efekto; komanda nieko nedaro. Grąžinamas klaidos kodas 0."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:448
+#, fuzzy
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr "Grąžinti nesėkmingą rezultatą."
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+#: builtins.c:689
+#, fuzzy
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"Išeiti iš aplinkos su klaidos kodu N. Jei N nenurodytas, išeinant "
+"nustatomas\n"
+" paskutinÄ—s vykdytos komandos klaidos kodas."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+
+#: builtins.c:966
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+#, fuzzy
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+"Skaityti ir vykdyti komandas iš FAILO ir grįžti. Keliai\n"
+" kintamajame $PATH naudojami aplankui, kuriame yra FAILAS, rasti.\n"
+" Jei nurodyta ARGUMENTŲ, jie tampa poziciniais parametrais iškvietus\n"
+" FAILÄ„."
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1580
+#, fuzzy
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Išskleisti ir vykdyti KOMANDAS tol, kol galutinė komanda iš\n"
+" „while“ komandų grąžina klaidos kodą 0."
+
+#: builtins.c:1592
+#, fuzzy
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Išskleisti ir vykdyti KOMANDAS tol, kol galutinė komanda iš\n"
+" „until“ komandų grąžina klaidos kodą, nelygų 0."
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+
+#: builtins.c:1632
+#, fuzzy
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Vykdyti eilę komandų grupėje. Tai yra vienas iš būdų nukreipti\n"
+" visos eilės komandų įvedimą/išvedimą."
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+#, fuzzy
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+"printf formatuoja ir spausdina ARGUMENTUS nurodytu FORMATU. FORMATAS\n"
+" yra simbolių seka, sudaryta iš trijų tipų objektų: paprastų\n"
+" simbolių, tiesiog nukopijuojamų į standartinį išvedimą,\n"
+" kaitos sekų, konvertuojamų ir kopijuojamų į standartinį išvedimą,\n"
+" ir formato specifikacijų, kurių kiekviena išspausdina kitą argumentą.\n"
+" Be įprastų printf(1) formatų, %b reiškia išplėsti kairinio brūkšnio\n"
+" („\\“) kaitos sekas atitinkamame argumente, o %q reiškia išvesti\n"
+" argumentą kabutėse tokia forma, kad rezultatą būtų galima\n"
+" panaudoti įvedimui.\n"
+" Jei pateiktas parametras -v, išvedimas įrašomas į aplinkos kintamąjį\n"
+" KINT, užuot spausdinus į standartinį išvedimą."
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+#, fuzzy
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Rodyti galimus užbaigimus priklausomai nuo nustatymų. Naudotina\n"
+" iÅ¡ aplinkos funkcijos, generuojanÄios galimus užbaigimus.\n"
+" Jei pateiktas nebūtinasis ŽODŽIO argumentas, išvedami įrašai,\n"
+" atitinkantys ŽODĮ."
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xrealloc: nepavyko išskirti %lu baitų (išskirta %lu baitų)"
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: nepavyko išskirti %lu baitų"
+
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xrealloc: %s:%d: nepavyko išskirti %lu baitų (išskirta %lu baitų)"
+
+#~ msgid " "
+#~ msgstr " "
+
+#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR,"
+#~ msgstr "Be EXPR, grąžina „$line $filename“. Su EXPR,"
+
+#~ msgid "returns \"$line $subroutine $filename\"; this extra information"
+#~ msgstr "grąžina „$line $subroutine $filename“; ši papildoma informacija"
+
+#~ msgid "can be used used to provide a stack trace."
+#~ msgstr "gali būti panaudota generuojant steko išrašą (stack trace)."
+
+#~ msgid ""
+#~ "The value of EXPR indicates how many call frames to go back before the"
+#~ msgstr "EXPR reikšmė nurodo, per kiek kvietimo freimų eiti atgal prieš"
+
+#~ msgid "current one; the top frame is frame 0."
+#~ msgstr "esamą. Viršutinis freimas yra 0."
+
+#~ msgid "%s: invalid number"
+#~ msgstr "%s: netaisyklingas skaiÄius"
+
+#~ msgid "Shell commands matching keywords `"
+#~ msgstr "Aplinkos komandos, atitinkanÄios raktažodžius „"
+
+#~ msgid "Display the list of currently remembered directories. Directories"
+#~ msgstr "Rodyti prisimenamų aplankų sąrašą. Aplankai"
+
+#~ msgid "find their way onto the list with the `pushd' command; you can get"
+#~ msgstr "atsiduria sąraše su „pushd“ komanda; galite kilti"
+
+#~ msgid "back up through the list with the `popd' command."
+#~ msgstr "sąrašu su „popd“ komanda."
+
+#~ msgid ""
+#~ "The -l flag specifies that `dirs' should not print shorthand versions"
+#~ msgstr "Parametras -l nurodo, kad „dirs“ neturėtų spausdinti sutrumpintų"
+
+#~ msgid ""
+#~ "of directories which are relative to your home directory. This means"
+#~ msgstr "aplankų, santykinių namų aplinkui, pavadinimų. Tai reiškia, kad"
+
+#, fuzzy
+#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag"
+#~ msgstr "kad „~/bin“ bus rodomas kaip „/home/bfox/bin“. Su parametru -v"
+
+#~ msgid "causes `dirs' to print the directory stack with one entry per line,"
+#~ msgstr "„dirs“ išveda aplankų steką po vieną pavadinimą eilutėje,"
+
+#~ msgid ""
+#~ "prepending the directory name with its position in the stack. The -p"
+#~ msgstr "prieš pavadinimą prirašoma aplanko pozicija steke. Parametras -p"
+
+#~ msgid "flag does the same thing, but the stack position is not prepended."
+#~ msgstr "turi tokį patį efektÄ…, taÄiau pozicija steke neiÅ¡vedama."
+
+#~ msgid ""
+#~ "The -c flag clears the directory stack by deleting all of the elements."
+#~ msgstr "Parametras -c išvalo aplankų steką."
+
+#~ msgid ""
+#~ "+N displays the Nth entry counting from the left of the list shown by"
+#~ msgstr "+N rodo N-tÄ…jį įraÅ¡Ä… skaiÄiuojant iÅ¡ kairÄ—s sÄ…raÅ¡e, rodomame"
+
+#~ msgid " dirs when invoked without options, starting with zero."
+#~ msgstr " „dirs“, iÅ¡kviesto be parametrų (skaiÄiuojama nuo nulio)."
+
+#~ msgid ""
+#~ "-N displays the Nth entry counting from the right of the list shown by"
+#~ msgstr "-N rodo N-tajį įraÅ¡Ä… skaiÄiuojant iÅ¡ deÅ¡inÄ—s sÄ…raÅ¡e, rodomame"
+
+#~ msgid "Adds a directory to the top of the directory stack, or rotates"
+#~ msgstr "Įdeda aplanką į aplankų steko viršų, arba pasuka"
+
+#~ msgid "the stack, making the new top of the stack the current working"
+#~ msgstr "steką, nustatydamas esamą aplanką į naująją steko viršūnės reikšmę."
+
+#~ msgid "directory. With no arguments, exchanges the top two directories."
+#~ msgstr "Be argumentų, sukeiÄia virÅ¡utinius du aplankus."
+
+#~ msgid "+N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "+N Pasuka stekÄ…, kad N-tasis aplankas (skaiÄiuojant"
+
+#~ msgid " from the left of the list shown by `dirs', starting with"
+#~ msgstr " iš kairės sąraše, rodomame „dirs“, pradedant nuo nulio)"
+
+#~ msgid " zero) is at the top."
+#~ msgstr " būtų viršuje."
+
+#~ msgid "-N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "-N Pasuka stekÄ…, kad N-tasis aplankas (skaiÄiuojant"
+
+#~ msgid " from the right of the list shown by `dirs', starting with"
+#~ msgstr " iš dešinės sąraše, rodomame „dirs“, pradedant nuo nulio)"
+
+#~ msgid "-n suppress the normal change of directory when adding directories"
+#~ msgstr "-n išjungti įprastą aplanko pakeitimą pridedant aplankus"
+
+#~ msgid " to the stack, so only the stack is manipulated."
+#~ msgstr " į stekÄ…, taigi, pakeiÄiamas tik stekas."
+
+#~ msgid "dir adds DIR to the directory stack at the top, making it the"
+#~ msgstr "dir prideda DIR į aplankų steko viršų; DIR nustatomas"
+
+#~ msgid " new current working directory."
+#~ msgstr " naujuoju darbiniu aplanku."
+
+#~ msgid "You can see the directory stack with the `dirs' command."
+#~ msgstr "Galite pamatyti aplankų steką komanda „dirs“."
+
+#~ msgid "Removes entries from the directory stack. With no arguments,"
+#~ msgstr "Šalina įrašus iš aplankų steko. Jei nenurodyta argumentų,"
+
+#~ msgid "removes the top directory from the stack, and cd's to the new"
+#~ msgstr "paÅ¡alina virÅ¡utinį aplankÄ… iÅ¡ steko ir pakeiÄia darbinį aplankÄ…"
+
+#~ msgid "top directory."
+#~ msgstr "steko virÅ¡Å«nÄ—je esanÄiu."
+
+#~ msgid "+N removes the Nth entry counting from the left of the list"
+#~ msgstr ""
+#~ "+N paÅ¡alina N-tÄ…jį įraÅ¡Ä… skaiÄiuojant iÅ¡ kairÄ—s sÄ…raÅ¡e, iÅ¡vedamame „dir“"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'"
+#~ msgstr " (skaiÄiuojama nuo nulio). Pavyzdžiui: „popd +0“"
+
+#~ msgid " removes the first directory, `popd +1' the second."
+#~ msgstr " pašalina pirmąjį aplanką, „popd +1“ – antrąjį."
+
+#~ msgid "-N removes the Nth entry counting from the right of the list"
+#~ msgstr ""
+#~ "+N paÅ¡alina N-tÄ…jį įraÅ¡Ä… skaiÄiuojant iÅ¡ deÅ¡inÄ—s sÄ…raÅ¡e, iÅ¡vedamame "
+#~ "„dir“"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'"
+#~ msgstr " (skaiÄiuojama nuo nulio). Pavyzdžiui: „popd -0“"
+
+#~ msgid " removes the last directory, `popd -1' the next to last."
+#~ msgstr " pašalina paskutinį aplanką, „popd -1“ – priešpaskutinį."
+
+#~ msgid ""
+#~ "-n suppress the normal change of directory when removing directories"
+#~ msgstr " išjungti įprastą darbinio aplanko keitimą šalinant aplankus"
+
+#~ msgid " from the stack, so only the stack is manipulated."
+#~ msgstr " iÅ¡ steko, taigi, pakeiÄiamas tik stekas."
+
+#~ msgid "allocated"
+#~ msgstr "išskirta"
+
+#~ msgid "freed"
+#~ msgstr "atlaisvinta"
+
+#~ msgid "requesting resize"
+#~ msgstr "prašoma dydžio keitimo"
+
+#~ msgid "just resized"
+#~ msgstr "tik kÄ… pakeistas dydis"
+
+#~ msgid "bug: unknown operation"
+#~ msgstr "klaida: nežinoma operacija"
+
+#~ msgid "malloc: watch alert: %p %s "
+#~ msgstr "malloc: stebinio įspėjimas: %p %s "
+
+#~ msgid ""
+#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n"
+#~ " break N levels."
+#~ msgstr ""
+#~ "Išeiti iš FOR, WHILE arba UNTIL ciklo. Jei nurodytas N,\n"
+#~ " išeiti aukštyn per N lygmenų."
+
+#~ msgid ""
+#~ "Run a shell builtin. This is useful when you wish to rename a\n"
+#~ " shell builtin to be a function, but need the functionality of the\n"
+#~ " builtin within the function itself."
+#~ msgstr ""
+#~ "Vykdyti aplinkos įtaisytą funkciją. Ši komanda naudinga, kai norite\n"
+#~ " vietoje įtaisytos funkcijos naudoti savÄ…jÄ…, taÄiau reikia\n"
+#~ " pasinaudoti įtaisytąja šios funkcijos viduje."
+
+#~ msgid ""
+#~ "Print the current working directory. With the -P option, pwd prints\n"
+#~ " the physical directory, without any symbolic links; the -L option\n"
+#~ " makes pwd follow symbolic links."
+#~ msgstr ""
+#~ "Išspausdinti esamą aplanką. Su parametru -P „pwd“ spausdina\n"
+#~ " fizinį aplanką, be jokių simbolinių nuorodų; su parametru -L\n"
+#~ " „pwd“ seka simbolinėmis nuorodomis."
+
+#~ msgid "Return a successful result."
+#~ msgstr "Grąžinti sėkmingą rezultatą."
+
+#~ msgid "Obsolete. See `declare'."
+#~ msgstr "Pasenusi komanda. Žr. „declare“."
+
+#~ msgid ""
+#~ "Create a local variable called NAME, and give it VALUE. LOCAL\n"
+#~ " can only be used within a function; it makes the variable NAME\n"
+#~ " have a visible scope restricted to that function and its children."
+#~ msgstr ""
+#~ "Sukurti vietinį kintamąjį nurodytu PAVADINIMU ir suteikti jam REIKŠMĘ.\n"
+#~ " „local“ gali būti naudojamas tik funkcijose; jis sukuria kintamąjį,\n"
+#~ " matomÄ… tik paÄioje funkcijoje ir jos dukterinÄ—se funkcijose."
+
+#~ msgid ""
+#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed."
+#~ msgstr ""
+#~ "IÅ¡spausdinti ARGUMENTUS. Jei nurodytas -n, nespausdinamas naujos "
+#~ "eilutÄ—s\n"
+#~ " simbolis pabaigoje."
+
+#~ msgid ""
+#~ "Read ARGs as input to the shell and execute the resulting command(s)."
+#~ msgstr "Skaityti ARGUMENTUS kaip aplinkos komandas ir jas vykdyti."
+
+#~ msgid "Logout of a login shell."
+#~ msgstr "Atsijungti nuo prisijungimo aplinkos (login shell)."
+
+#~ msgid ""
+#~ "Causes a function to exit with the return value specified by N. If N\n"
+#~ " is omitted, the return status is that of the last command."
+#~ msgstr ""
+#~ "Išeina iš funkcijos, grąžinama reikšmė N. Jei N nenurodyta,\n"
+#~ " grąžinama paskutinės vykdytos komandos reikšmė."
+
+#~ msgid ""
+#~ "For each NAME, remove the corresponding variable or function. Given\n"
+#~ " the `-v', unset will only act on variables. Given the `-f' flag,\n"
+#~ " unset will only act on functions. With neither flag, unset first\n"
+#~ " tries to unset a variable, and if that fails, then tries to unset a\n"
+#~ " function. Some variables cannot be unset; also see readonly."
+#~ msgstr ""
+#~ "Kiekvienam PAVADINIMUi, pašalinti atitinkamą kintamąjį ar funkciją.\n"
+#~ " Jei nurodytas „-v“, unset veiks tik su kintamaisiais. Jei nurodytas\n"
+#~ " „-f“, unset veiks tik su funkcijomis. Jei nenurodytas nei vienas iš\n"
+#~ " šių parametrų, unset pirmiausiai bandys pašalinti kintamąjį, ir jei\n"
+#~ " tai nepasiseks, bandys pašalinti funkciją. Kai kurie kintamieji "
+#~ "negali\n"
+#~ " būti pašalinti; žr. „readonly“."
+
+#~ msgid ""
+#~ "Suspend the execution of this shell until it receives a SIGCONT\n"
+#~ " signal. The `-f' if specified says not to complain about this\n"
+#~ " being a login shell if it is; just suspend anyway."
+#~ msgstr ""
+#~ "Sustabdyti Å¡ios aplinkos darbÄ…, kol bus gautas SIGCONT\n"
+#~ " signalas. Jei nurodyta „-f“, nesiskųsti, jei ši aplinka yra "
+#~ "prisijungimo\n"
+#~ " aplinka (login shell) ir sustabdyti jÄ… bet kuriuo atveju."
+
+#~ msgid ""
+#~ "Create a simple command invoked by NAME which runs COMMANDS.\n"
+#~ " Arguments on the command line along with NAME are passed to the\n"
+#~ " function as $0 .. $n."
+#~ msgstr ""
+#~ "Sukurti paprastÄ… komandÄ…, iÅ¡kvieÄiamÄ… PAVADINIMU, vykdanÄiÄ… KOMANDAS.\n"
+#~ " Argumentai komandų eilutėje kartu su PAVADINIMU perduodami funkcijai\n"
+#~ " kaip $0 .. $n."
+
+#~ msgid ""
+#~ "For each NAME, specify how arguments are to be completed.\n"
+#~ " If the -p option is supplied, or if no options are supplied, "
+#~ "existing\n"
+#~ " completion specifications are printed in a way that allows them to "
+#~ "be\n"
+#~ " reused as input. The -r option removes a completion specification "
+#~ "for\n"
+#~ " each NAME, or, if no NAMEs are supplied, all completion "
+#~ "specifications."
+#~ msgstr ""
+#~ "Kiekvienam VARDUI nurodyti, kaip argumentai turėtų būti užbaigti.\n"
+#~ " Jei pateiktas -p nustatymas arba nepateikta jokių nustatymų,\n"
+#~ " spausdinamos esamos užbaigimo specifikacijos tokiu formatu, kad\n"
+#~ " jas būtų galima panaudoti kaip įvestį. Nustatymas -r pašalina\n"
+#~ " užbaigimo specifikaciją kiekvienam VARDUI, arba, jei nenurodyta\n"
+#~ " VARDO, visas užbaigimo specifikacijas."
diff --git a/po/nl.gmo b/po/nl.gmo
new file mode 100644
index 0000000..9ff8b25
--- /dev/null
+++ b/po/nl.gmo
Binary files differ
diff --git a/po/nl.po b/po/nl.po
new file mode 100644
index 0000000..48b382f
--- /dev/null
+++ b/po/nl.po
@@ -0,0 +1,5455 @@
+# Dutch translations for bash
+# Copyright (C) 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the bash package.
+#
+# De vertaling van de ruim 70 laatste hulpteksten (65%) in dit bestand
+# volgt niet helemaal het normale stramien van "onbepaalde wijs voor
+# elke functieomschrijvende tekst". De hoofddocstring gebruikt wel
+# de onbepaalde wijs, maar het begin de gedetailleerdere omschrijving
+# stapt over op de derde persoon, om daarna een passieve vorm te
+# gebruiken voor de rest van de preciseringen en uitzonderingen.
+# Deze opzet is nog niet helemaal consequent doorgevoerd; voor de
+# volgende vertaler is er dus nog ruimschoots werk. -- Benno, 2008
+#
+# Opmerking over vocabulair:
+# 'Stopped' wordt consequent vertaald met "Gepauzeerd", omdat "Gestopt"
+# te veel zou doen denken aan "Beëindigd", terwijl het alleen maar gaat
+# om stilstaan en niet om finale opgave. Een alternatieve vertaling
+# zou "Stilstand" kunnen zijn.
+#
+# Erick Branderhorst <branderh@iaehv.nl>, 1996.
+# Julie Vermeersch <julie@lambda1.be>, 2004.
+# Benno Schulenberg <benno@vertaalt.nl>, 2006, 2008.
+# Erwin Poeze <erwin.poeze@gmail.com>, 2009.
+msgid ""
+msgstr ""
+"Project-Id-Version: bash-4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2009-12-03 15:15+0100\n"
+"Last-Translator: Erwin Poeze <erwin.poeze@gmail.com>\n"
+"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "ongeldige array-index"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr "%s: kan geïndexeerd array niet omzetten naar associatief array"
+
+#: arrayfunc.c:480
+#, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: ongeldige sleutel voor associatief array"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: niet-numerieke index is niet mogelijk"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr "%s: %s: een index is nodig bij toekenning aan associatief array"
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "Kan %s niet aanmaken: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+"bash_execute_unix_command(): kan voor opdracht geen toetsenkaart vinden"
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: eerste teken dat geen witruimte is is niet '\"'"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "geen sluit-'%c' in %s"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: ontbrekend scheidingsteken (dubbele punt)"
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "'%s': ongeldige naam voor toetsenkaart"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr "bewerken van regels niet ingeschakeld"
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "'%s': ongeldige naam voor toetsenkaart"
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "Kan %s niet lezen: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "Kan %s niet losmaken"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "'%s': onbekende functienaam"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s is aan geen enkele toets gebonden\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s kan worden aangeroepen via "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr "herhalingsaantal"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "heeft alleen betekenis in een 'for'-, 'while'- of 'until'-lus"
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+"Geeft de context van de huidige functie-aanroep.\n"
+" \n"
+" Zonder EXPR, resulteert "
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "HOME is niet gedefinieerd"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "OLDPWD is niet gedefinieerd"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr "regel %d: "
+
+#: builtins/common.c:139 error.c:261
+#, c-format
+msgid "warning: "
+msgstr "waarschuwing: "
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr "%s: gebruik: "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "te veel argumenten"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: optie vereist een argument"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: vereist een numeriek argument"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: niet gevonden"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: ongeldige optie"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: ongeldige optienaam"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "'%s': is geen geldige naam"
+
+#: builtins/common.c:238
+msgid "invalid octal number"
+msgstr "ongeldig octaal getal"
+
+#: builtins/common.c:240
+msgid "invalid hex number"
+msgstr "ongeldig hexadecimaal getal"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "ongeldig getal"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: ongeldige signaalaanduiding"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "'%s': is geen PID en geen geldige taakaanduiding"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: is een alleen-lezen variabele"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s valt buiten bereik"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "argument"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s valt buiten bereik"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: taak bestaat niet"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: geen taakbesturing"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "geen taakbesturing"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: beperkte modus"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "beperkte modus"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: is geen ingebouwde opdracht van de shell"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "schrijffout: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr "Instellen terminalattributen is mislukt: %s"
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr "Ophalen terminalattributen is mislukt: %s"
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: fout tijdens bepalen van huidige map: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: taakaanduiding is niet eenduidig"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: ongeldige actienaam"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: is geen completerings-aanduiding"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "waarschuwing: optie -F functioneert mogelijk niet zoals verwacht"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "waarschuwing: optie -C functioneert mogelijk niet zoals verwacht"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr "er wordt momenteel geen completeringsfunctie uitgevoerd"
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "kan alleen worden gebruikt binnen een functie"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "'-f' kan niet gebruikt worden om een functie te definiëren"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: is een alleen-lezen functie"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: kan array-variabelen niet op deze manier verwijderen"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr "%s: kan associatief array niet omzetten naar geïndexeerd array"
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "dynamisch-laden is niet beschikbaar"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "kan gedeeld object %s niet openen: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "kan %s niet vinden in gedeeld object %s: %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: is niet dynamisch geladen"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "Kan %s niet verwijderen: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: is een map"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: is geen normaal bestand"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: bestand is te groot"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: kan een binair bestand niet uitvoeren"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "Kan %s niet uitvoeren: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr "uitgelogd\n"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "geen login-shell; gebruik 'exit'"
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "Er zijn nog gepauzeerde taken.\n"
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr "Er zijn nog draaiende taken.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "geen opdracht gevonden"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "geschiedenisaanduiding"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "Kan tijdelijk bestand '%s' niet openen: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr "huidige"
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "taak %d is gestart zonder taakbesturing"
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: ongeldige optie -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: optie vereist een argument -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "hashen is uitgeschakeld"
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: de hash-tabel is leeg\n"
+
+#: builtins/hash.def:244
+#, c-format
+msgid "hits\tcommand\n"
+msgstr "treffers commando\n"
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Shell-opdrachten die overeenkomen met '"
+msgstr[1] "Shell-opdrachten die overeenkomen met '"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"Er is geen hulptekst voor '%s'.\n"
+"Probeer 'help help' of 'man -k %s' of 'info %s'."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "Kan %s niet openen: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"Hieronder staan alle interne shell-opdrachten opgesomd. Typ 'help' om dit\n"
+"overzicht opnieuw te zien. Typ 'help naam' voor meer informatie over de\n"
+"opdracht met die naam. Typ 'info bash' voor gedetailleerde informatie over\n"
+"de gehele shell. En gebruik 'man -k ...' of 'info ...' voor meer "
+"informatie\n"
+"over andere opdrachten.\n"
+"\n"
+"(Een sterretje (*) naast een naam betekent dat de functie uitgeschakeld "
+"is.)\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "slechts één van '-a', '-n', '-r' of '-w' is mogelijk"
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "geschiedenispositie"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: geschiedenisexpansie is mislukt"
+
+#: builtins/inlib.def:71
+#, c-format
+msgid "%s: inlib failed"
+msgstr "%s: 'inlib' is mislukt"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "bij '-x' zijn geen andere opties toegestaan"
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: argumenten moeten proces-IDs of taak-IDs zijn"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Onbekende fout"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "uitdrukking werd verwacht"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: is geen array-variabele"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: ongeldige aanduiding van bestandsdescriptor"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: ongeldige bestandsdescriptor: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, c-format
+msgid "%s: invalid line count"
+msgstr "%s: ongeldig regelaantal"
+
+#: builtins/mapfile.def:277
+#, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: ongeldig array-begin"
+
+# Quantum is een hoeveelheid regels, een getal.
+# Callback is de aan te roepen functie, maar onnodig in de vertaling.
+#: builtins/mapfile.def:294
+#, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: ongeldige hoeveelheid"
+
+#: builtins/mapfile.def:326
+msgid "empty array variable name"
+msgstr "lege naam van array-variabele"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr "ondersteuning van arrayvariabelen is vereist"
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "'%s': ontbrekend opmaakteken"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "'%c': ongeldig opmaakteken"
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr "waarschuwing: %s: %s"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "ontbrekend hexadecimaal cijfer bij \\x"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "geen andere map"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<geen huidige map>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr "mappenstapel is leeg"
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr "mappenstapelindex"
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+"Toont de huidige lijst van onthouden mappen. Mappen worden aan deze\n"
+" lijst toegevoegd met de opdracht 'pushd', en verwijderd met 'popd'.\n"
+"\n"
+" Opties:\n"
+" -c de mappenstapel wissen door alle elementen te verwijderen\n"
+" -l paden niet afkorten (relatief ten opzichte van uw thuismap)\n"
+" maar volledig weergegeven\n"
+" -p de mappenstapel tonen met één item per regel\n"
+" -v als '-p' maar met elk item voorafgegaan wordt door diens positie\n"
+" in de stapel\n"
+"\n"
+" Argumenten:\n"
+" +N Toont het N-de item, tellend vanaf links, van de lijst getoond\n"
+" door 'dirs' wanneer opgeroepen zonder opties, beginnend bij nul.\n"
+" -N Toont het N-de item, tellend vanaf rechts, van de lijst getoond\n"
+" door 'dirs' wanneer opgeroepen zonder opties, beginnend bij nul."
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Voegt een map toe aan de top van de mappenstapel, of roteert de stapel\n"
+" en maakt de huidige werkmap gelijk aan de nieuwe top van de stapel.\n"
+" Zonder argumenten worden de bovenste twee mappen verwisseld.\n"
+"\n"
+" Optie:\n"
+" -n de verandering van map onderdukken bij het toevoegen van mappen\n"
+" aan de stapel, zodat alleen de stapel wordt gemanipuleerd\n"
+"\n"
+" Argumenten:\n"
+" +N Roteert de stapel zodat de N-de map (tellend vanaf links, van\n"
+" de lijst getoond door 'dirs', beginned bij nul) bovenaan komt.\n"
+" -N Roteert de stapel zodat de N-de map (tellend vanaf rechts, van\n"
+" de lijst getoond door 'dirs', beginned bij nul) bovenaan komt.\n"
+" MAP Voegt deze map toe aan de top van de mappenstapel, het de nieuwe\n"
+" werkmap makend.\n"
+"\n"
+" De opdracht 'dirs' toont de huidige mappenstapel."
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Verwijdert items van de mappenstapel. Zonder argumenten verwijdert\n"
+" het de bovenste map van de stapel, en maakt de huidige werkmap\n"
+" gelijk aan de nieuwe bovenste map.\n"
+"\n"
+" Optie:\n"
+" -n de verandering van map onderdukken bij het toevoegen van mappen\n"
+" aan de stapel, zodat alleen de stapel wordt gemanipuleerd\n"
+"\n"
+" Argumenten:\n"
+" +N Verwijdert het N-de item tellend vanaf links (van de lijst\n"
+" getoond door 'dirs', beginnend met nul). Bijvoorbeeld:\n"
+" 'popd +0' verwijdert de eerste map, 'popd +' de tweede.\n"
+" -N Verwijdert het N-de item tellend vanaf rechts (van de lijst\n"
+" getoond door 'dirs', beginnend met nul). Bijvoorbeeld:\n"
+" 'popd -0' verwijdert de laatste map, 'popd -1' de voorlaatste.\n"
+"\n"
+" De opdracht 'dirs' toont de huidige mappenstapel."
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: ongeldige aanduiding van tijdslimiet"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "leesfout: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+"kan alleen een 'return' doen uit een functie of een uit script aangeroepen "
+"met 'source'"
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "kan niet tegelijk een functie en een variabele verwijderen"
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "Kan '%s' niet verwijderen"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "Kan '%s' niet verwijderen: %s is alleen-lezen"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: is geen array-variabele"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: is geen functie"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "shift-aantal"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr "kan shell-opties niet tegelijk inschakelen en uitschakelen"
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: ongeldige shell-optienaam"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "vereist een bestandsnaam als argument"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: bestand niet gevonden"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "kan niet pauzeren"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "kan een inlog-shell niet pauzeren"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "%s is een alias voor '%s'\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s is een shell-sleutelwoord\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s is een functie\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "%s is een ingebouwde shell-functie\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s is %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "%s is gehasht (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s: ongeldige limietwaarde"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "'%c': ongeldige opdracht"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: kan de limiet niet bepalen: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr "limiet"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: kan de limiet niet wijzigen: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "octaal getal"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "'%c': ongeldige operator in symbolische modus"
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "'%c': ongeldig teken in symbolische modus"
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr " regel "
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "laatste opdracht: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "Afbreken..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "onbekende opdrachtfout"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "ongeldig opdrachttype"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "ongeldige verbinder"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "ongeldige sprong"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: ongebonden variabele"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "wachten op invoer duurde te lang -- automatisch afgemeld\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "kan standaardinvoer niet omleiden vanaf /dev/null: %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "TIMEFORMAT: '%c': ongeldig opmaakteken"
+
+#: execute_cmd.c:2075
+msgid "pipe error"
+msgstr "pijpfout"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: beperkte modus: '/' in opdrachtnamen is niet toegestaan"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: opdracht niet gevonden"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: ongeldige interpreter"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "kan bestandsdescriptor %d niet dupliceren naar bestandsdescriptor %d"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "recursieniveau van expressies is overschreden"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "recursiestapel-onderloop"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "syntaxfout in expressie"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "poging tot toewijzing aan een niet-variabele"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "deling door nul"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "**interne fout**: onjuist symbool in toewijzingsexpressie"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "':' werd verwacht voor een voorwaardelijke expressie"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "exponent is kleiner dan 0"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr "naam verwacht na pre-increment of pre-decrement"
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "ontbrekend ')'"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "syntaxfout: operator verwacht"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "syntaxfout: ongeldige rekenkundige operator"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s%s%s: %s (het onjuiste symbool is \"%s\")"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "ongeldige rekenkundige basis"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "waarde is te groot voor basis"
+
+#: expr.c:1329
+#, c-format
+msgid "%s: expression error\n"
+msgstr "%s: expressiefout\n"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getwd(): kan geen geen toegang verkrijgen tot bovenliggende mappen"
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "kan 'nodelay'-modus niet uitschakelen voor bestandsdescriptor %d"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+"kan geen nieuwe bestandsdescriptor reserveren voor bash-invoer vanuit "
+"bestandsdescriptor %d"
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr ""
+"check_bash_input(): buffer bestaat al voor nieuwe bestandsdescriptor %d"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr "start_pipeline(): procesgroep van pijp"
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr "afgesplitst PID %d hoort bij draaiende taak %d"
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "verwijderen van gepauzeerde taak %d met procesgroep %ld..."
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr "add_process(): proces %5ld (%s) in de pijplijn"
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr "add_process(): PID %5ld (%s) staat gemarkeerd als nog actief"
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid(): PID %ld bestaat niet"
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr "Signaal %d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Klaar"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Gepauzeerd"
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr "Gepauzeerd(%s)"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "Wordt uitgevoerd"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Klaar(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "Exit %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Onbekende afsluitwaarde"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(geheugendump gemaakt) "
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr " (werkmap: %s)"
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "instellen van procesgroep %2$ld van dochter %1$ld"
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait(): PID %ld is geen dochterproces van deze shell"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "wait_for(): proces %ld is nergens geregistreerd"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job(): taak %d is gepauzeerd"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: taak is afgesloten"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: taak %d draait al op de achtergrond"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, c-format
+msgid "%s: line %d: "
+msgstr "%s: regel %d: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr " (geheugendump gemaakt)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(werkmap is nu: %s)\n"
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_job_control: getpgrp() is mislukt"
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_job_control: lijnprotocol"
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_job_control: setpgid()"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr "kan procesgroep (%d) van terminal niet instellen"
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "er is geen taakbesturing in deze shell"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc(): controletest is mislukt: %s\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"malloc(): %s:%d: controletest is mislukt\r\n"
+
+#: lib/malloc/malloc.c:313
+msgid "unknown"
+msgstr "onbekend"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr "malloc(): een pointer op de lijst van vrije blokken is overschreven"
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free(): aangeroepen met als argument een blok dat al vrijgegeven is"
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free(): aangeroepen met als argument een ongebruikt blok"
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr "free(): onderloop: 'mh_nbytes' valt buiten bereik"
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free(): blokgroottes van begin en eind zijn verschillend"
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc(): aangeroepen met als argument een ongebruikt blok"
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr "realloc(): onderloop: 'mh_nbytes' valt buiten bereik"
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "realloc(): blokgroottes van begin en eind zijn verschillend"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr "register_alloc(): reserveringstabel is vol??\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr "register_alloc(): %p staat al als gereserveerd in tabel??\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "register_free(): %p staat al als vrij in tabel??\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "ongeldige basis"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: onbekende host"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: ongeldige service"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: ongeldige aanduiding van netwerkpad"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "netwerkoperaties worden niet ondersteund"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc(): %s:%d: kan %lu bytes niet opnieuw reserveren"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc(): %s:%d: kan %lu bytes niet opnieuw reserveren"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "U hebt post in $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "U hebt nieuwe post in $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "De post in %s is gelezen.\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "syntaxfout: een rekenkundige uitdrukking is vereist"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "syntaxfout: onverwachte ';'"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "syntaxfout: '((%s))'"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document(): ongeldig instructietype %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+"regel %d van \"hier\"-document eindigt met einde van bestand (verwachtte '%"
+"s')"
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr "make_redirection(): omleidingsinstructie '%d' valt buiten bereik"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "onverwacht bestandseinde tijdens zoeken naar bijpassende '%c'"
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "onverwacht bestandseinde tijdens zoeken naar ']]'"
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "syntaxfout in conditionele expressie: onverwacht symbool '%s'"
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "syntaxfout in conditionele expressie"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "onverwacht symbool '%s'; ')' werd verwacht"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "')' werd verwacht"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "onverwacht argument '%s' bij eenzijdige conditionele operator"
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "onverwacht argument bij eenzijdige conditionele operator"
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr ""
+"onverwacht symbool '%s'; tweezijdige conditionele operator werd verwacht"
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "tweezijdige conditionele operator werd verwacht"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "onverwacht argument '%s' bij tweezijdige conditionele operator"
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "onverwacht argument bij tweezijdige conditionele operator"
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "onverwacht symbool '%c' in conditionele opdracht"
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "onverwacht symbool '%s' in conditionele opdracht"
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "onverwacht symbool %d in conditionele opdracht"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "syntaxfout nabij onverwacht symbool '%s'"
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "syntaxfout nabij '%s'"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "syntaxfout: onverwacht bestandseinde"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "syntaxfout"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Gebruik \"%s\" om de shell te verlaten.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "onverwacht bestandseinde tijdens zoeken naar bijpassende ')'"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "completion(): functie '%s' niet gevonden"
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr "progcomp_insert(): %s: lege COMPSPEC"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command(): ongeldige verbinder '%d'"
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d: ongeldige bestandsdescriptor: %s"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "cprintf(): '%c': ongeldig opmaakteken"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "bestandsdescriptor valt buiten bereik"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: omleiding is niet eenduidig"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: kan bestaand bestand niet overschrijven"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: beperkte modus: omleiden van uitvoer is niet toegestaan"
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "kan geen tijdelijk bestand maken voor \"hier\"-document: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: kan geen lijst toewijzen aan een array-element"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "/dev/(tcp|udp)/host/port is niet mogelijk zonder netwerk"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "omleidingsfout: kan bestandsdescriptor niet dupliceren"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "Kan /tmp niet vinden; maak deze aan!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "/tmp dient een geldige mapnaam te zijn"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: ongeldige optie"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Ik heb geen naam!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU bash, versie %s-(%s)\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Gebruik: %s [opties]\n"
+" %s [opties] scriptbestand...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "Lange opties:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Korte opties:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD, of -c opdracht, of -O shopt-optie (enkel bij aanroep)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s, of -o optie (veranderbaar via 'set')\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr "Typ '%s -c \"help set\"' voor meer informatie over shell-opties.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"Typ '%s -c help' voor meer informatie over ingebouwde shell-functies.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "Gebruik de opdracht 'bashbug' om fouten in bash te rapporteren.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask(): %d: ongeldige operatie"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Niet-bestaand signaal"
+
+# Vroeger ging dit over het afsluiten van een modemverbinding,
+# tegenwoordig over het afsluiten van een pseudoterminal.
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Opgehangen"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Onderbroken"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "Afsluiten"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Ongeldige instructie"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "Traceer/breekpunt-instructie"
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "ABORT-instructie"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "EMT-instructie"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Drijvende-komma-berekeningsfout"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "Geëlimineerd"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "Busfout"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Segmentatiefout"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Onjuiste systeemaanroep"
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "Gebroken pijp"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Alarmklok"
+
+#: siglist.c:111
+msgid "Terminated"
+msgstr "Afgesloten"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "Spoedeisende I/O-toestand"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Gepauzeerd (signaal)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "Doorgaan"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "Dochter is geëlimineerd of gestopt"
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Gepauzeerd (tty-invoer)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Gepauzeerd (tty-uitvoer)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "I/O is mogelijk"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "CPU-limiet"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "Bestandslimiet"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "Alarm (virtueel)"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "Alarm (profiel)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Venster is veranderd"
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr "Recordvergrendeling"
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "Gebruikerssignaal 1"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "Gebruikerssignaal 2"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "HFT-invoergegevens staan te wachten"
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "stroomstoring dreigt"
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "systeemcrash dreigt"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "proces naar andere processor verplaatsen"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "programmeerfout"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "HFT-monitormodus is gegeven"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "HFT-monitormodus is herroepen"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "HFT-geluidssequentie is afgespeeld"
+
+#: siglist.c:215
+msgid "Information request"
+msgstr "Verzoek om informatie"
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Onbekend signaalnummer"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Onbekend signaal #%d"
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "ongeldige vervanging: geen sluit-'%s' in %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: kan geen lijst toewijzen aan een array-element"
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "kan geen pijp maken voor procesvervanging"
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "kan geen dochterproces maken voor procesvervanging"
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "kan pijp genaamd %s niet openen om te lezen"
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "kan pijp genaamd %s niet openen om te schrijven"
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "kan pijp genaamd %s niet dupliceren als bestandsdescriptor %d"
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "kan geen pijp maken voor opdrachtvervanging"
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr "kan geen dochterproces maken voor opdrachtvervanging"
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr ""
+"command_substitute(): kan pijp niet dupliceren als bestandsdescriptor 1"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: lege parameter, of niet ingesteld"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: resultaat van deeltekenreeks is kleiner dan nul"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: ongeldige vervanging"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: kan niet op deze manier toewijzen"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "ongeldige vervanging: geen afsluitende '`' in %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "geen overeenkomst: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "argument werd verwacht"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: een geheel-getaluitdrukking werd verwacht"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "')' werd verwacht"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "')' werd verwacht; %s gevonden"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "eenzijdige operator werd verwacht, %s gevonden"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "tweezijdige operator werd verwacht, %s gevonden"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "ontbrekende ']'"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "ongeldig signaalnummer"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps(): ongeldige waarde in trap_list[%d]: %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+"run_pending_traps: signaalverwerker is SIG_DFL, herzenden van %d (%s) aan "
+"mezelf..."
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler(): ongeldig signaal %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "fout tijdens importeren van functiedefinitie voor '%s'"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "shell-niveau is te hoog (%d); teruggezet op 1"
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr ""
+"make_local_variable(): er is geen functiecontext in huidige geldigheidsbereik"
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr ""
+"all_local_variables(): er is geen functiecontext in huidige geldigheidsbereik"
+
+#: variables.c:3376
+#, c-format
+msgid "%s has null exportstr"
+msgstr ""
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "ongeldig teken '%d' in export-tekenreeks voor %s"
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "geen '=' in export-tekenreeks voor %s"
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr "pop_var_context(): top van 'shell_variables' is geen functiecontext"
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr "pop_var_context(): er is geen 'global_variables'-context"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+"pop_scope(): top van 'shell_variables' is geen tijdelijk geldigheidsbereik"
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "Kan %s niet openen: %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d: ongeldige bestandsdescriptor: %s"
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Copyright (C) 2009 Free Software Foundation, Inc."
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"De licentie is GPLv3+: GNU GPL versie 3 of later.\n"
+"Zie http://gnu.org/licenses/gpl.html voor de volledige tekst.\n"
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU bash, versie %s (%s)\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+"Dit is vrije software; u mag het vrijelijk wijzigen en verder verspreiden.\n"
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr "Er is GEEN GARANTIE, voor zover de wet dit toestaat.\n"
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Copyright (C) 2009 Free Software Foundation, Inc."
+
+#: version2.c:87
+#, fuzzy, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"De licentie is GPLv3+: GNU GPL versie 3 of later.\n"
+"Zie http://gnu.org/licenses/gpl.html voor de volledige tekst.\n"
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc(): kan geen %lu bytes reserveren (%lu bytes gereserveerd)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc(): kan geen %lu bytes reserveren"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+"xmalloc(): %s:%d: kan geen %lu bytes reserveren (%lu bytes gereserveerd)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc(): %s:%d: kan geen %lu bytes reserveren"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [NAAM[=WAARDE] ... ]"
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] NAAM [NAAM...]"
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+"bind [-lpvsPVS] [-m TOETSENKAART] [-f BESTANDSNAAM] [-q NAAM] [-u NAAM]\n"
+" [-r TOETSENREEKS] [-x TOETSENREEKS:SHELL-OPDRACHT]\n"
+" [TOETSENREEKS:READLINE-FUNCTIE | TOETSENREEKS:READLINE-OPDRACHT]"
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [N]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [N]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [INGEBOUWDE_SHELLFUNCTIE [ARGUMENT...]]"
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr "caller [EXPRESSIE]"
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-L|-P] [MAP]"
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr "pwd [-LP]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr "waar"
+
+#: builtins.c:72
+msgid "false"
+msgstr "onwaar"
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] OPDRACHT [ARGUMENT...]"
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-aAfFilrtux] [-p] [NAAM[=WAARDE]...]"
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-aAfFilrtux] [-p] NAAM[=WAARDE]..."
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr "local [OPTIE] NAAM[=WAARDE]..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [ARGUMENT...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [ARGUMENT...]"
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-a] [-dnps] [-f BESTANDSNAAM] [NAAM...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [ARGUMENT...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts OPTIETEKENREEKS NAAM [ARGUMENT]"
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a NAAM] [OPDRACHT [ARGUMENT...]] [OMLEIDING...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [N]"
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr "logout [N]"
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+"fc [-e EDITORNAAM] [-lnr] [EERSTE] [LAATSTE]\n"
+"of: fc -s [PATROON=VERVANGING] [OPDRACHT]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [TAAKAANDUIDING]"
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr "bg [TAAKAANDUIDING...]"
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-lr] [-p PADNAAM] [-dt] [NAAM...]"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "help [-ds] [PATROON...]"
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [-d POSITIE] [N]\n"
+" of: history -anrw [BESTANDSNAAM]\n"
+" of: history -ps ARGUMENT..."
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr ""
+"jobs [-lnprs] [TAAKAANDUIDING...] of jobs -x OPDRACHT [ARGUMENT...]"
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [-h] [-ar] [TAAKAANDUIDING...]"
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s SIGNAALNAAM | -n SIGNAALNUMMER | -SIGNAAL] PID | TAAKAANDUIDING\n"
+" of: kill -l [SIGNAAL]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let ARGUMENT..."
+
+#: builtins.c:136
+#, fuzzy
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+"read [-ers] [-a ARRAY] [-d SCHEIDINGSTEKEN] [-i TEKST] [-n AANTAL_TEKENS]\n"
+" [-p PROMPT] [-t TIJDSLIMIET] [-u BESTANDSDESCRIPTOR] [NAAM...]"
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [N]"
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o OPTIENAAM] [ARGUMENT...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [NAAM...]"
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-fn] [NAAM[=WAARDE] ...] of export -p"
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-af] [NAAM[=WAARDE] ...] of readonly -p"
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr "shift [N]"
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr "source BESTANDSNAAM [ARGUMENTEN]"
+
+#: builtins.c:152
+msgid ". filename [arguments]"
+msgstr ". BESTANDSNAAM [ARGUMENTEN]"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [EXPRESSIE]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ ARGUMENT... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "times"
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [-lp] [[ARGUMENT] SIGNAALAANDUIDING...]"
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-afptP] NAAM..."
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdefilmnpqrstuvx] [GRENSWAARDE]"
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-p] [-S] [MODUS]"
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr "wait [ID]"
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr "wait [PID]"
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for NAAM [in WOORDEN...] ; do OPDRACHTEN; done"
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for (( EXPR1; EXPR2; EXPR3 )); do OPDRACHTEN; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select NAAM [in WOORDEN... ;] do OPDRACHTEN; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr "time [-p] PIJPLIJN"
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case WOORD in [PATROON [| PATROON]...) OPDRACHTEN ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if OPDRACHTEN; then OPDRACHTEN;\n"
+" [ elif OPDRACHTEN; then OPDRACHTEN; ]...\n"
+" [ else OPDRACHTEN; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while OPDRACHTEN; do OPDRACHTEN; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until OPDRACHTEN; do OPDRACHTEN; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr "coproc [NAAM] opdracht [verwijzingen]"
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "function NAAM { OPDRACHTEN ; } of NAAM () { OPDRACHTEN ; }"
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr "{ OPDRACHTEN ; }"
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr "TAAKAANDUIDING [&]"
+
+#: builtins.c:206
+msgid "(( expression ))"
+msgstr "(( EXPRESSIE ))"
+
+#: builtins.c:208
+msgid "[[ expression ]]"
+msgstr "[[ EXPRESSIE ]]"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr "variables - enkele shell-variabelen"
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [-n] [+N | -N | MAP]"
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [-n] [+N | -N]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o] [OPTIENAAM...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr "printf [-v VARIABELE] OPMAAK [ARGUMENTEN]"
+
+#: builtins.c:229
+#, fuzzy
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+"complete [-abcdefgjksuv] [-pr] [-o OPTIE] [-A ACTIE] [-G PATROON]\n"
+" [-W WOORDENLIJST] [-F FUNCTIE] [-C OPDRACHT]\n"
+" [-X FILTERPATROON] [-P PREFIX] [-S SUFFIX] [NAAM...]"
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+"compgen [-abcdefgjksuv] [-pr] [-o OPTIE] [-A ACTIE] [-G PATROON]\n"
+" [-W WOORDENLIJST] [-F FUNCTIE] [-C OPDRACHT]\n"
+" [-X FILTERPATROON] [-P PREFIX] [-S SUFFIX] [WOORD]"
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "compopt [-o|+o OPTIE] [NAAM...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"mapfile [-n AANTAL] [-O BEGIN] [-s AANTAL] [-t] [-u BESTANDSDESCRIPTOR]\n"
+" [-C FUNCTIE] [-c HOEVEELHEID] [ARRAY]"
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"readarray [-n AANTAL] [-O BEGIN] [-s AANTAL] [-t] [-u BESTANDSDESCRIPTOR]\n"
+" [-C FUNCTIE] [-c HOEVEELHEID] [ARRAY]"
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"Aliassen definiëren of tonen.\n"
+"\n"
+" Zonder argumenten, of met optie '-p', toont 'alias' op standaarduitvoer\n"
+" de huidige lijst van aliassen in de vorm: alias NAAM='VERVANGING'.\n"
+" Met argumenten, wordt er een alias gedefinieerd voor elke NAAM waarvoor\n"
+" een VERVANGING gegeven is. Als de VERVANGING eindigt op een spatie, "
+"dan\n"
+" wordt bij aliasexpansie ook van het nakomende woord gecontroleerd of "
+"het\n"
+" een alias is.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij er een NAAM zonder VERVANGING gegeven is."
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Elke gegeven NAAM verwijderen uit de lijst van gedefinieerde aliassen.\n"
+"\n"
+" Optie '-a' verwijdert alle aliassen.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij NAAM geen bestaande alias is."
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+"Toetsbindingen en variabelen van 'readline' instellen.\n"
+"\n"
+" Een toetsenreeks verbinden aan een 'readline'-functie of aan een macro,\n"
+" of een 'readline'-variabele instellen. De syntax van argumenten die "
+"geen\n"
+" opties zijn is gelijkaardig aan die voor ~/.inputrc, maar zij dienen "
+"één\n"
+" geheel te zijn, bijvoorbeeld: bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+"\n"
+" Opties:\n"
+" -f BESTANDSNAAM de toetsbindingen uit dit bestand lezen\n"
+" -l alle bekende functienamen opsommen\n"
+" -m TOETSENKAART deze toetsenkaart gebruiken voor de duur van deze\n"
+" opdracht; mogelijke toetsenkaarten zijn 'emacs',\n"
+" 'emacs-standard', 'emacs-meta', 'emacs-ctlx',\n"
+" 'vi', 'vi-move', 'vi-insert' en 'vi-command'\n"
+" -P functienamen en hun bindingen tonen\n"
+" -p functienamen en hun bindingen tonen, in een vorm "
+"die\n"
+" kan worden hergebruikt als invoer\n"
+" -r TOETSENREEKS de binding voor deze toetsenreeks verwijderen\n"
+" -q FUNCTIENAAM tonen welke toetsen deze functie aanroepen\n"
+" -S toetsenreeksen tonen die macro's aanroepen\n"
+" -s toetsenreeksen tonen die macro's aanroepen, in een\n"
+" vorm die kan worden hergebruikt als invoer\n"
+" -u FUNCTIENAAM verwijdert alle toetsbindingen aan deze functie\n"
+" -V variabelenamen en hun waarden tonen\n"
+" -v variabelenamen en hun waarden tonen, in een vorm "
+"die\n"
+" kan worden hergebruikt als invoer\n"
+" -x TOETSENREEKS:SHELL_OPDRACHT deze shell-opdracht uitvoeren als "
+"deze\n"
+" toetsenreeks ingevoerd wordt \n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of een "
+"fout\n"
+" optrad."
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Een 'for'-, 'while'- of 'until'-lus beëindigen.\n"
+" Als N gegeven is, dan worden N niveaus van lussen beëindigd.\n"
+" De afsluitwaarde is 0, tenzij N kleiner dan 1 is."
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"De volgende herhaling van huidige 'for'-, 'while'- of 'until'-lus beginnen.\n"
+" Als N gegeven is, dan wordt N niveaus hoger doorgegaan. De "
+"afsluitwaarde is 0, tenzij N kleiner dan 1 is."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+"Een ingebouwde shell-functie uitvoeren.\n"
+"\n"
+" Voert de gegeven ingebouwde shell-functie met de gegeven argumenten "
+"uit.\n"
+" Dit is handig als u de naam van een ingebouwde functie voor een eigen\n"
+" functie wilt gebruiken, maar toch de functionaliteit van de ingebouwde\n"
+" functie nodig hebt.\n"
+"\n"
+" De afsluitwaarde is die van de uitgevoerde shell-functie, of 1\n"
+" of 1 als INGEBOUWDE_SHELLFUNCTIE geen ingebouwde shell-functie is."
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+"De context van de aanroep van de huidige functie tonen.\n"
+"\n"
+" Zonder argument produceert het \"$regelnummer $bestandsnaam\"; met\n"
+" argument \"$regelnummer $functienaam $bestandsnaam\". Deze tweede\n"
+" vorm kan gebruikt worden om een 'stack trace' te produceren. De\n"
+" waarde van het argument geeft aan hoeveel frames er teruggegaan\n"
+" moet worden; het huidige frame heeft nummer 0.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij de shell momenteel geen functie uitvoert\n"
+" of EXPRESSIE ongeldig is."
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+"De huidige map wijzigen.\n"
+"\n"
+" Wijzigt de huidige map naar de gegeven MAP. Als geen MAP gegeven is,\n"
+" dan wordt de waarde van de variabele HOME gebruikt.\n"
+"\n"
+" De variabele CDPATH definieert de mappen waarin naar MAP gezocht wordt.\n"
+" De mapnamen in CDPATH worden gescheiden door dubbele punten (:); een\n"
+" lege mapnaam is hetzelfde als de huidige map (.). Als MAP begint met\n"
+" een slash (/), dan wordt CDPATH niet gebruikt.\n"
+"\n"
+" Als de gegeven map niet wordt gevonden, en shell-optie 'cdable_vars'\n"
+" is ingeschakeld, dan wordt het gegeven woord als een variabelenaam\n"
+" begrepen, en als die variabele een naam bevat, dan gaat 'cd' naar de\n"
+" map met die naam.\n"
+"\n"
+" Opties:\n"
+" -L symbolische koppelingen volgen (standaard)\n"
+" -P de fysieke mappenstructuur gebruiken;\n"
+" symbolische koppelingen worden eerst \"vertaald\"\n"
+"\n"
+" De afsluitwaarde is 0 als de gewenste map ingesteld kon worden, anders 1."
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+"De naam van de huidige werkmap tonen.\n"
+"\n"
+" Opties:\n"
+" -P het werkelijke, fysieke pad tonen, zonder symbolische "
+"koppelingen\n"
+" -L het pad tonen zoals dat gevolgd is, inclusief eventuele "
+"symbolische\n"
+" koppelingen (standaard)\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd\n"
+" of de huidige map niet bepaald kon worden."
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr "Doet niets; de opdracht heeft geen effect; de afsluitwaarde is 0."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr "Geeft afsluitwaarde 0, horend bij \"gelukt\"."
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr "Geeft afsluitwaarde 1, horend bij \"mislukt\"."
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+"Een opdracht uitvoeren of informatie over een opdracht tonen.\n"
+"\n"
+" Voert de gegeven opdracht uit met de gegeven argumenten, waarbij een\n"
+" eventueel gelijknamige shell-functie genegeerd wordt. Dit kan gebruikt\n"
+" worden om een programma op schijf uit te voeren wanneer er een functie\n"
+" met dezelfde naam bestaat.\n"
+"\n"
+" Opties:\n"
+" -p een standaardwaarde voor PATH gebruiken, zodat alle\n"
+" standaardprogramma's gegarandeerd gevonden worden\n"
+" -v tonen welke opdracht er uitgevoerd zou worden\n"
+" -V als '-v' maar gedetailleerder\n"
+"\n"
+" De afsluitwaarde is die van de uitgevoerde OPDRACHT,\n"
+" of 1 als de OPDRACHT niet gevonden is."
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Waarden en attributen van variabelen instellen.\n"
+"\n"
+" Declareert de gegeven variabelen en/of kent hen attributen toe.\n"
+" Als er geen namen van variabelen gegeven zijn, dan worden de\n"
+" bestaande variabelen en hun waarden getoond.\n"
+"\n"
+" Opties:\n"
+" -f alleen de gedefinieerde functies tonen (geen variabelen)\n"
+" -F alleen de namen van de functies tonen, zonder de definities\n"
+" -p van elke gegeven variabele de attributen en waarde tonen\n"
+"\n"
+" Attributen:\n"
+" -a van gegeven variabelen arrays maken (indien mogelijk)\n"
+" -A van gegeven variabelen associatieve arrays maken (indien "
+"mogelijk)\n"
+" -i aan gegeven variabelen het 'geheel getal'-attribuut toekennen\n"
+" -l gegeven variabelen bij toekenning omzetten naar kleine letters\n"
+" -r de gegeven variabelen alleen-lezen maken\n"
+" -t aan gegeven variabelen het 'trace'-attribuut toekennen\n"
+" -u gegeven variabelen bij toekenning omzetten naar hoofdletters\n"
+" -x de gegeven variabelen exporteren\n"
+"\n"
+" Een '+' in plaats van een '-' voor de letter schakelt het betreffende\n"
+" attribuut uit.\n"
+"\n"
+" Bij variabelen met het 'geheel getal'-attribuut wordt bij toewijzingen\n"
+" een rekenkundige evaluatie gedaan (zie 'let').\n"
+"\n"
+" Als 'declare' wordt gebruikt in een functie, dan maakt het elke gegeven\n"
+" naam lokaal, net zoals de opdracht 'local'.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er "
+"een\n"
+" fout optreedt."
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+"Waarden en attributen van variabelen instellen.\n"
+" Verouderd. Zie 'help declare'."
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+"Lokale variabelen definiëren.\n"
+"\n"
+" Maakt een lokale variabele NAAM aan, en kent deze de waarde WAARDE toe.\n"
+" OPTIE kan elke optie zijn die ook door 'declare' geaccepteerd wordt.\n"
+"\n"
+" 'local' kan alleen binnen een functie gebruikt worden, en zorgt ervoor\n"
+" dat het geldigheidsbereik van de variabele NAAM beperkt wordt tot de\n"
+" betreffende functie en diens dochters.\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd, er een\n"
+" fout optrad, of de shell geen functie aan het uitvoeren is."
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"De gegeven argumenten naar standaarduitvoer schrijven.\n"
+"\n"
+" Opties:\n"
+" -n de afsluitende nieuwe regel onderdrukken\n"
+" -e onderstaande backslash-stuurcodes interpreteren\n"
+" -E onderstaande backslash-stuurcodes niet interpreteren\n"
+"\n"
+" 'echo' kent de volgende stuurcodes: \\a geluidssignaal\n"
+" \\b backspace\n"
+" \\c geen verdere uitvoer produceren\n"
+" \\E escapecode\n"
+" \\f nieuwe pagina (FF-teken)\n"
+" \\n nieuwe regel (LF-teken)\n"
+" \\r naar begin van huidige regel (CR-teken)\n"
+" \\t horizontale tab\n"
+" \\v verticale tab\n"
+" \\\\ een backslash (\\)\n"
+" \\0NNN het teken met ASCII-code NNN (octaal, 1 tot 3 cijfers)\n"
+" \\xHH het teken met code HH (hexadecimaal, 1 of 2 cijfers)\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een schrijffout optreedt."
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"De gegeven argumenten naar standaarduitvoer schrijven.\n"
+"\n"
+" Schrijft de gegeven argumenten naar standaarduitvoer, gevolgd door.\n"
+" een nieuwe regel. Optie -n onderdrukt de afsluitende nieuwe regel.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een schrijffout optreedt."
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+"Ingebouwde shell-opdrachten in- of uitschakelen.\n"
+"\n"
+" Schakelt ingebouwde opdrachten in of uit. Dit laatste maakt het "
+"mogelijk\n"
+" om een bestand op schijf uit te voeren dat dezelfde naam heeft als een\n"
+" ingebouwde opdracht, zonder het volledige pad op te moeten geven.\n"
+"\n"
+" Opties:\n"
+" -a de ingebouwde opdrachten tonen en of ze in- of uitgeschakeld "
+"zijn\n"
+" -n genoemde opdrachten uitschakelen of uitgeschakelde opdrachten "
+"tonen\n"
+" -p uitvoer produceren die hergebruikt kan worden als invoer "
+"(standaard)\n"
+" -s alleen de speciale POSIX ingebouwde opdrachten tonen\n"
+"\n"
+" Opties die het dynamisch laden besturen:\n"
+" -f ingebouwde opdracht NAAM laden uit gedeeld object BESTANDSNAAM\n"
+" -d opdracht die geladen is met '-f' verwijderen.\n"
+"\n"
+" Zonder opties wordt elke gegeven NAAM ingeschakeld. Zonder namen "
+"worden\n"
+" de ingeschakelde opdrachten getoond (of met '-n' de uitgeschakelde).\n"
+"\n"
+" Voorbeeld: om in plaats van de ingebouwde 'test' het bestand 'test' te\n"
+" gebruiken dat zich in uw zoekpad PATH bevindt, typt u 'enable -n test'.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij NAAM geen ingebouwde shell-opdracht is of\n"
+"  een fout optreedt."
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+"Argumenten uitvoeren als een shell-opdracht.\n"
+"\n"
+" Combineert de gegeven argumenten tot een enkele tekenreeks, gebruikt "
+"deze\n"
+" als invoer voor de shell, en voert de resulterende opdrachten uit.\n"
+"\n"
+" De afsluitwaarde is die van de uitgevoerde opdracht, of 0 als de "
+"opdracht\n"
+" leeg is."
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+"Opties ontleden.\n"
+"\n"
+" 'getopts' kan door shell-scripts gebruikt worden om positionele "
+"parameters\n"
+" als opties te ontleden.\n"
+"\n"
+" De OPTIETEKENREEKS bevat de te herkennen optieletters; als een letter\n"
+" gevolgd wordt door een dubbele punt, dan hoort de optie een argument\n"
+" te hebben, ervan gescheiden door witruimte.\n"
+"\n"
+" Elke keer dat 'getopts' wordt aangeroepen, plaatst het de volgende\n"
+" gevonden optie in de gegeven shell-variabele NAAM, en het nummer van\n"
+" het daarna te behandelen argument in de variabele OPTIND. Deze OPTIND\n"
+" wordt geïnitialiseerd op 1 elke keer als de shell of een shell-script\n"
+" wordt aangeroepen. Als een optie een argument heeft, dan wordt dat\n"
+" argument in de shell-variabele OPTARG geplaatst.\n"
+"\n"
+" 'getopts' kan fouten op twee manieren rapporteren: in stille modus of\n"
+" in normale modus. Stille modus wordt gebruikt als het eerste teken\n"
+" van de optietekenreeks een dubbele punt is. In deze modus worden er\n"
+" geen foutmeldingen geprint. In stille modus geldt: als 'getopts' een\n"
+" ongeldige optie vindt, wordt dat teken in OPTARG geplaatst; als een\n"
+" vereist argument bij een optie ontbreekt, dan wordt een ':' in NAAM\n"
+" geplaatst en de optieletter in OPTARG. In normale modus geldt: als\n"
+" 'getopts' een ongeldige optie vindt, wordt een '?' in NAME geplaatst,\n"
+" en OPTARG leeggemaakt; als een vereist argument ontbreekt, dan wordt\n"
+" een ':' in NAAM geplaatst en de gevonden optieletter in OPTARG; in\n"
+" beide gevallen wordt er ook een foutmelding geprint.\n"
+"\n"
+" Als de shell-variabele OPTERR de waarde 0 heeft, wordt het printen\n"
+" van foutmeldingen uitgeschakeld, zelfs als het eerste teken van de\n"
+" optiereeks geen dubbele punt is. De standaardwaarde van OPTERR is 1.\n"
+"\n"
+" Normaliter ontleedt 'getopts' de positionele parameters: $0...$9.\n"
+" Maar als er argumenten gegeven worden, dan worden deze ontleed."
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+"De shell vervangen door de gegeven opdracht.\n"
+"\n"
+" Voert de gegeven OPDRACHT uit, daarbij deze shell vervangend door dat\n"
+" programma. Eventuele ARGUMENTen worden de argumenten van OPDRACHT.\n"
+" Als er geen OPDRACHT gegeven is, dan worden eventuele omleidingen van\n"
+" kracht voor deze shell zelf.\n"
+"\n"
+" Opties:\n"
+" -a NAAM deze naam als nulde argument aan OPDRACHT meegeven\n"
+" -c de opdracht uitvoeren met een lege omgeving\n"
+" -l een koppelteken als nulde argument aan OPDRACHT meegeven\n"
+"\n"
+" Als de opdracht niet kan worden uitgevoerd, dan sluit een niet-"
+"interactieve\n"
+" shell af, tenzij de shell-optie 'execfail' aan staat.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij OPDRACHT niet gevonden wordt of er een\n"
+" omleidingsfout optreedt."
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"De shell beëindigen.\n"
+"\n"
+" Beëindigt de shell met een afsluitwaarde van N. Zonder N is de\n"
+" afsluitwaarde die van de laatst uitgevoerde opdracht."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+"Een login-shell beëindigen.\n"
+"\n"
+" Beëindigt een login-shell met een afsluitwaarde van N. Geeft een\n"
+" foutmelding als de huidige shell geen login-shell is."
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+"Opdrachten uit de geschiedenis tonen of uitvoeren.\n"
+"\n"
+" Kan gebruikt worden om oude opdrachten te tonen, of om deze te bewerken\n"
+" en opnieuw uit te voeren. EERSTE en LAATSTE kunnen getallen zijn die "
+"een\n"
+" bereik opgeven, of EERSTE kan een tekenreeksje zijn waarmee de "
+"recentste\n"
+" opdracht wordt bedoeld die met die letters begint.\n"
+"\n"
+" Opties:\n"
+" -e EDITORNAAM de te gebruiken editor; standaard wordt de waarde van\n"
+" FCEDIT gebruikt, anders die van EDITOR, anders 'vi'\n"
+" -l een lijst met opdrachten tonen (in plaats van ze te bewerken)\n"
+" -n de lijst zonder nummers weergeven\n"
+" -r de volgorde van de lijst omdraaien (nieuwste eerst)\n"
+"\n"
+" In de vorm 'fc -s [PATROON=VERVANGING]... [OPDRACHT]', wordt OPDRACHT\n"
+" opnieuw uitgevoerd nadat de aangegeven vervangingen zijn gedaan.\n"
+"\n"
+" Een handige alias bij deze functie is r='fc -s', zodat het typen van\n"
+" 'r' de laatste opdracht opnieuw uitvoert, en het typen van 'r cc' de\n"
+" laatste opdracht die met 'cc' begon opnieuw uitvoert.\n"
+"\n"
+" De afsluitwaarde die van de uitgevoerde opdracht, of 0, of niet-nul als\n"
+" er een fout optreedt."
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"De gegeven taak in de voorgrond plaatsen.\n"
+"\n"
+" Plaatst de gegeven taak in de voorgrond, en maakt deze tot de huidige "
+"taak.\n"
+" Als er geen taak gegeven is, dan wordt dat wat volgens de shell de "
+"huidige\n"
+" taak is gebruikt.\n"
+"\n"
+" De afsluitwaarde is die van de in voorgrond geplaatste taak, of 1 als "
+"er\n"
+" een fout optreedt."
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"De gegeven taken in de achtergrond plaatsen.\n"
+"\n"
+" Plaatst gegeven taken in de achtergrond, alsof deze gestart waren met "
+"'&'.\n"
+" Als er geen taak gegeven is, dan wordt dat wat volgens de shell de "
+"huidige\n"
+" taak is gebruikt.\n"
+"\n"
+" De afsluitwaarde is 0 tenzij taakbeheer uitgeschakeld is of er een fout\n"
+" optreedt."
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+"Programmalocaties onthouden of tonen.\n"
+"\n"
+" Bepaalt en onthoudt voor elke gegeven opdracht-NAAM het volledige pad.\n"
+" Als er geen argumenten gegeven zijn, dan wordt informatie over de\n"
+" onthouden paden getoond.\n"
+"\n"
+" Opties:\n"
+" -d het pad van elke gegeven NAAM vergeten\n"
+" -l uitvoer produceren die herbruikbaar is als invoer\n"
+" -p PADNAAM te gebruiken PADNAAM van de opdracht NAAM\n"
+" -r alle paden vergeten\n"
+" -t voor elke gegeven naam het onthouden pad tonen\n"
+"\n"
+" Elke gegeven NAAM wordt opgezocht in $PATH en wordt toegevoegd aan de\n"
+" lijst met onthouden opdrachten.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij NAAM niet gevonden wordt of een ongeldige\n"
+" optie gegeven werd."
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+"Informatie tonen over ingebouwde opdrachten.\n"
+"\n"
+" Toont korte hulpteksten voor ingebouwde opdrachten van de shell.\n"
+" Als een PATROON gegeven is, dan worden hulpteksten getoond voor alle\n"
+" opdrachten die aan dit PATROON voldoen, anders wordt een lijst met\n"
+" onderwerpen waarvoor hulp beschikbaar is getoond.\n"
+"\n"
+" Opties:\n"
+" -d een korte omschrijving tonen voor elk onderwerp\n"
+" -m gebruiksbericht tonen in pseudo-opmaak van een man-pagina\n"
+" -s de uitvoer beperken tot een beknopt gebruiksbericht\n"
+"\n"
+" De afsluitwaarde is 0, tenzij niets aan PATROON voldoet of een "
+"ongeldige\n"
+" optie gegeven werd."
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"De opdrachtengeschiedenis tonen of bewerken.\n"
+"\n"
+" Geeft de lijst met uitgevoerde opdrachten weer (de \"geschiedenis\"),\n"
+" inclusief regelnummers; voor bewerkte items staat een '*'. Met een\n"
+" argument van N worden alleen de laatste N opdrachten getoond.\n"
+"\n"
+" Opties:\n"
+" -c huidige geschiedenis wissen: alle uitgevoerde opdrachten "
+"vergeten\n"
+" -d POSITIE het geschiedenisitem op deze positie verwijderen\n"
+"\n"
+" -a huidige geschiedenis aan eind van geschiedenisbestand toevoegen\n"
+" -n alle nog niet gelezen regels uit het geschiedenisbestand lezen\n"
+" -r het geschiedenisbestand lezen en toevoegen aan einde van\n"
+" huidige geschienis\n"
+" -w huidige geschiedenis aan einde van geschiedenisbestand toevoegen\n"
+"\n"
+" -p geschiedenisopzoeking uitvoeren voor elk ARGUMENT en het "
+"resultaat\n"
+" tonen zonder dit in de geschiedenis op te slaan -s de "
+"ARGUMENTen als één enkel item aan de geschiedenis toevoegen\n"
+" Als een BESTANDSNAAM gegeven is, dan wordt dat gebruikt als het\n"
+" geschiedenisbestand, anders wordt de waarde van HISTFILE gebruikt, en\n"
+" als die variabele leeg is, dan ~/.bash_history.\n"
+" Als de variabele HISTTIMEFORMAT ingesteld en niet leeg is, dan wordt de\n"
+" waarde ervan gebruikt als een opmaaktekenreeks for strftime(3), om een\n"
+" tijdsstempel bij elk geschiedenisitem weer te geven. Anders worden "
+"geen\n"
+" tijdsstempels getoond. \n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er "
+"een\n"
+" fout optreedt."
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+"De status van taken tonen.\n"
+"\n"
+" Toont de actieve taken. Een TAAKAANDUIDING beperkt de uitvoer tot "
+"alleen\n"
+" die taak. Zonder opties wordt de status van alle actieve taken "
+"getoond.\n"
+"\n"
+" Opties:\n"
+" -l ook de proces-ID's tonen, naast de gewone informatie\n"
+" -n alleen processen tonen die sinds de vorige melding zijn "
+"veranderd\n"
+" -p alleen de proces-ID's tonen\n"
+" -r uitvoer beperken tot draaiende taken\n"
+" -s uitvoer beperken tot gepauzeerde taken\n"
+" Als optie '-x' gegeven is, wordt de gegeven OPDRACHT uitgevoerd nadat\n"
+" alle gegeven taken (in ARGUMENTen) afgesloten zijn (dat wil zeggen: hun\n"
+" proces-ID is vervangen door dat van hun moederproces).\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of een\n"
+" fout optreedt. Als '-x' gebruikt is, dan is de afsluitwaarde die van\n"
+" OPDRACHT."
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+"Taken uit de huidige shell verwijderen.\n"
+"\n"
+" Verwijdert elke gegeven taak uit de tabel met actieve taken. Zonder\n"
+" een TAAKAANDUIDING wordt dat wat volgens de shell de huidige taak is\n"
+" verwijderd.\n"
+"\n"
+" Opties:\n"
+" -a alle taken verwijderen (als geen TAAKAANDUIDING gegeven is)\n"
+" -h taken niet verwijderen maar zodanig markeren dat deze geen "
+"SIGHUP\n"
+" krijgen wanneer de shell een SIGHUP krijgt\n"
+" -r alleen draaiende taken verwijderen\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie of TAAKAANDUIDING\n"
+" gegeven werd."
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Een signaal naar een taak sturen.\n"
+"\n"
+" Stuurt de via PID of TAAKAANDUIDING aangeduide processen het gegeven\n"
+" signaal. Als er geen signaal gegeven is, dan wordt SIGTERM gestuurd.\n"
+"\n"
+" Opties:\n"
+" -n NAAM het signaal met deze naam sturen\n"
+" -s NUMMER het signaal met dit nummer sturen\n"
+" -l lijst met beschikbare signalen tonen; als na '-l' "
+"argumenten\n"
+" volgen, dan wordt voor elk nummer de bijbehorende naam\n"
+" getoond, en voor elke naam het bijbehorende nummer\n"
+"\n"
+" 'kill' is om twee redenen een ingebouwde shell-opdracht: het "
+"accepteert\n"
+" ook taakaanduidingen in plaats van alleen proces-ID's, en als het "
+"maximum\n"
+" aantal processen bereikt is hoeft u geen nieuw proces te starten om een\n"
+" ander proces te elimineren.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er "
+"een\n"
+" fout optreedt."
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+"Rekenkundige uitdrukkingen evalueren.\n"
+"\n"
+" Evalueert elk ARGUMENT als een rekenkundige uitdrukking.\n"
+" De evaluatie gebeurt in gehele getallen zonder controle op overloop;\n"
+" maar deling door nul wordt gedetecteerd en wordt getoond als een fout.\n"
+"\n"
+" Onderstaande lijst toont de beschikbare operatoren in groepjes van "
+"gelijke\n"
+" voorrang; de groepjes zijn gerangschikt volgens afnemende voorrang.\n"
+"\n"
+" var++, var-- post-increment, post-decrement van variabele\n"
+" ++var, --var pre-increment, pre-decrement van variabele\n"
+" -, + eenzijdig minteken, eenzijdig plusteken\n"
+" !, ~ logisch tegengestelde, bitsgewijs tegengestelde\n"
+" ** machtsverheffing\n"
+" *, /, % vermenigvuldiging, deling, rest\n"
+" +, - optelling, aftrekking\n"
+" <<, >> bitsgewijze verschuiving naar links, naar rechts\n"
+" <=, >=, <, > vergelijkingen\n"
+" ==, != gelijkheid, ongelijkheid\n"
+" & bitsgewijze AND\n"
+" ^ bitsgewijze XOR\n"
+" | bitsgewijze OR\n"
+" && logische AND\n"
+" || logische OR\n"
+"\n"
+" expr ? expr : expr voorwaardelijke uitdrukking\n"
+"\n"
+" =, *=, /=, %=, +=, -=, <<=, >>=, &=, ^=, |= toewijzingen\n"
+"\n"
+" Shell-variabelen zijn toegestaan als parameters. De naam van een "
+"variabele\n"
+" wordt vervangen door zijn waarde (zonodig omgezet naar een geheel "
+"getal).\n"
+" Variabelen hoeven geen 'geheel getal'-attribuut te hebben om gebruikt "
+"te\n"
+" kunnen worden in een expressie.\n"
+"\n"
+" Operatoren worden geëvalueerd in volgorde van voorrang. Subexpressies\n"
+" tussen haakjes worden altijd eerst geëvalueerd en overstijgen zodoende\n"
+" bovengenoemde voorrangsregels.\n"
+"\n"
+" Als het laatste ARGUMENT evalueert tot 0, dan is de afsluitwaarde van\n"
+" 'let' 1; anders 0."
+
+#: builtins.c:966
+#, fuzzy
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+"Een regel van standaardinvoer lezen en in velden opsplitsen.\n"
+"\n"
+" Leest één regel van standaardinvoer (of van de gegeven "
+"bestandsdescriptor\n"
+" als optie -u gegeven is) en wijst het eerste woord aan de eerste NAAM "
+"toe,\n"
+" het tweede woord aan de tweede NAAM, en zo verder; de resterende "
+"woorden\n"
+" worden toegewezen aan de laatste NAAM. Alleen de tekens in de "
+"variabele\n"
+" IFS worden herkend als woordscheidingstekens. Als er geen namen "
+"gegeven\n"
+" zijn, wordt de gelezen regel opgeslagen in de variabele REPLY.\n"
+"\n"
+" Opties:\n"
+" -a ARRAY\tde gelezen woorden toekennen aan de opeenvolgende posities\n"
+" \t\tvan het genoemde array, beginnend bij index nul\n"
+" -d TEKEN\tdoorgaan met lezen tot TEKEN gelezen wordt (i.p.v. LF-"
+"teken)\n"
+" -e\t\tin een interactieve shell 'readline' gebruiken om de regel\n"
+" \t\tin te lezen\n"
+" -i TEKST\tdoor 'readline' te gebruiken begintekst\n"
+" -n AANTAL\tstoppen na dit aantal tekens gelezen te hebben (i.p.v. tot\n"
+" \t\teen LF-teken)\n"
+" -p PROMPT\tdeze tekenreeks tonen als prompt (zonder afsluitende "
+"nieuwe\n"
+" \t\tregel) alvorens te beginnen met lezen\n"
+" -r\t\tbackslash-codes niet omzetten naar hun betekenis\n"
+" -s\t\tinvoer die van een terminal komt niet echoën\n"
+" -t AANTAL\tna dit aantal seconden stoppen met wachten op invoer en\n"
+" \t\tafsluiten met een code groter dan 128; de waarde van de\n"
+" \t\tvariabele TMOUT is de standaardwaarde voor het aantal te\n"
+" \t\twachten seconden; het aantal mag drijvendepuntgetal zijn\n"
+" -u BSDS\t\tvan deze bestandsdescriptor lezen i.p.v. van "
+"standaardinvoer\n"
+" \n"
+" De afsluitwaarde is 0, tenzij einde-van-bestand (EOF) bereikt werd,\n"
+" de tijdslimiet overschreden werd, of een ongeldige bestandsdescriptor\n"
+" als argument van '-u' gegeven werd."
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+"Terugkeren uit een shell-functie.\n"
+"\n"
+" Doet een functie of gesourced script afsluiten met afsluitwaarde N.\n"
+" Zonder N is de afsluitwaarde die van de laatst uitgevoerde opdracht\n"
+" in functie of script.\n"
+"\n"
+" De afsluitwaarde is N, of 1 als de shell geen functie of script aan het\n"
+" uitvoeren is."
+
+# Voor de duidelijkheid is de tekstvolgorde veranderd.
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+"Waarden van shell-opties of positionele parameters instellen.\n"
+"\n"
+" Schakelt shell-attributen in of uit, of verandert waarden van "
+"positionele\n"
+" parameters. Zonder opties of argumenten toont 'set' de namen en "
+"waarden\n"
+" van alle gedefinieerde variabelen en functies, in een vorm die als "
+"invoer\n"
+" hergebruikt kan worden. De volgende opties zijn beschikbaar (een '+' "
+"in\n"
+" plaats van een '-' schakelt het betreffende attribuut _uit_ i.p.v. in):\n"
+"\n"
+" -a nieuwe of gewijzigde variabelen en functies automatisch "
+"exporteren\n"
+" -B accoladevervanging uitvoeren (is standaard, b.v. a{b,c} -> ab ac)\n"
+" -b beëindiging van een taak direct melden (i.p.v. na huidige "
+"opdracht)\n"
+" -C omleiding van uitvoer mag gewone bestanden niet overschrijven\n"
+" -E een 'trap' op ERR door laten werken in functies en "
+"dochterprocessen\n"
+" -e de shell afsluiten zodra afsluitwaarde van een opdracht niet nul "
+"is\n"
+" -f jokertekens voor bestandsnamen uitschakelen (geen 'globbing')\n"
+" -H geschiedenisopdracht '!' beschikbaar stellen (standaard)\n"
+" -h het volledige pad van opdrachten onthouden na eerste keer "
+"opzoeken\n"
+" -k ook nakomende toewijzingen aan variabelen in de omgeving plaatsen\n"
+" -m taakbesturing beschikbaar stellen (standaard)\n"
+" -n opdrachten wel lezen maar niet uitvoeren (\"droogzwemmen\")\n"
+" -o OPTIENAAM deze optie inschakelen (zie verderop voor de lange "
+"namen)\n"
+" -P fysieke paden volgen in plaats van symbolische koppelingen\n"
+" -p geprivilegeerde modus: de bestanden aangeduid door ENV en "
+"BASH_ENV\n"
+" worden genegeerd, functies worden niet uit de omgeving "
+"geïmporteerd,\n"
+" en ook eventuele SHELLOPTS worden genegeerd; modus wordt "
+"automatisch\n"
+" ingeschakeld als effectieve en echte UID of GID niet "
+"overeenkomen;\n"
+" uitschakelen maakt dan effectieve UID en GID gelijk aan de echte\n"
+" -T een 'trap' op DEBUG door laten werken in functies en "
+"dochterprocessen\n"
+" -t afsluiten na het lezen en uitvoeren van één opdracht\n"
+" -u het gebruik van niet-bestaande variabelen behandelen als een fout\n"
+" -v invoerregel weergeven (\"echoën\") zodra deze gelezen is\n"
+" -x elke opdracht met argumenten weergeven voordat deze wordt "
+"uitgevoerd\n"
+" -- nakomende argumenten zijn positionele parameters; als er geen "
+"verdere\n"
+" argumenten zijn, worden de bestaande positionele parameters "
+"gewist\n"
+" - opties -v en -x uitschakelen; nakomende argumenten zijn "
+"positionele\n"
+" parameters; maar zonder argumenten worden de bestaande niet "
+"gewist\n"
+"\n"
+" De opties kunnen ook gebruikt worden bij het starten van de shell.\n"
+" De huidige toestand van de attributen is te vinden in $-. Eventuele\n"
+" extra argumenten van 'set' worden begrepen als positionele parameters\n"
+" en worden toegewezen aan $1, $2, ... $N.\n"
+"\n"
+" De lange namen voor gebruik met optie -o (of +o) zijn:\n"
+" allexport == -a (automatisch exporteren van nieuwen/gewijzigden)\n"
+" braceexpand == -B (accoladevervanging uitvoeren)\n"
+" emacs regelbewerkingsinterface in stijl van 'emacs' gebruiken\n"
+" errexit == -e (shell afsluiten bij eerste fout)\n"
+" errtrace == -E ('trap' op ERR overal laten gelden)\n"
+" functrace == -T ('trap' op DEBUG overal laten gelden)\n"
+" hashall == -h (gevonden pad van opdrachten onthouden)\n"
+" histexpand == -H ('!'-opdracht beschikbaar stellen)\n"
+" history opdrachtengeschiedenis beschikbaar stellen\n"
+" ignoreeof Ctrl-D negeren; de shell niet afsluiten bij lezen van "
+"EOF\n"
+" interactive-comments commentaar in interactieve opdrachten toestaan\n"
+" keyword == -k (nakomende toewijzingen ook meenemen)\n"
+" monitor == -m (taakbesturing beschikbaar stellen)\n"
+" noclobber == -C (omleidingen geen bestanden laten overschrijven)\n"
+" noexec == -n (opdrachten lezen maar niet uitvoeren)\n"
+" noglob == -f (jokertekens uitschakelen)\n"
+" nolog (herkend maar genegeerd)\n"
+" notify == -b (beëindiging van een taak direct melden)\n"
+" nounset == -u (niet-bestaande variabelen als een fout "
+"beschouwen)\n"
+" onecmd == -t (afsluiten na uitvoeren van één opdracht)\n"
+" physical == -P (fysieke paden volgen i.p.v. symbolische)\n"
+" pipefail de afsluitwaarde van een pijplijn gelijkmaken aan die "
+"van\n"
+" de laatste niet-succesvolle opdracht in de reeks, of "
+"aan\n"
+" 0 als alle opdrachten succesvol waren\n"
+" posix de voorschriften van de POSIX-standaard strict volgen\n"
+" privileged == -p (geprivilegeerde modus)\n"
+" verbose == -v (elke invoerregel echoën)\n"
+" vi regelbewerkingsinterface in stijl van 'vi' gebruiken\n"
+" xtrace == -x (elke opdracht echoën)\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd."
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+"Shell-variabelen en -functies verwijderen.\n"
+"\n"
+" Verwijdert voor elke NAAM de bijbehorende variabele of functie.\n"
+"\n"
+" Opties:\n"
+" -f elke NAAM als een shell-functie begrijpen\n"
+" -v elke NAAM als een shell-variabele begrijpen\n"
+"\n"
+" Zonder opties zal 'unset' eerst een variabele proberen te verwijderen,\n"
+" en als dat niet lukt, dan een functie. Sommige variabelen kunnen niet\n"
+" verwijderd worden; zie ook 'readonly'. \n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of een\n"
+" NAAM alleen-lezen is."
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Het export-attribuut van shell-variabelen instellen.\n"
+"\n"
+" Markeert elke gegeven naam voor automatische export naar de omgeving\n"
+" van latere opdrachten. Als een WAARDE gegeven is, dan deze WAARDE\n"
+" toekennen alvorens te exporteren.\n"
+"\n"
+" Opties:\n"
+" -f gegeven namen verwijzen alleen naar functies\n"
+" -n voor de gegeven namen de exportmarkering juist verwijderen\n"
+" -p een lijst van alle geëxporteerde namen tonen\n"
+"\n"
+" Het argument '--' schakelt verdere optieverwerking uit.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie of NAAM gegeven werd."
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Shell-variabelen als onveranderbaar markeren.\n"
+"\n"
+" Markeert elke gegeven NAAM als alleen-lezen, zodat de waarde van deze\n"
+" NAAM niet meer veranderd kan worden door een latere toewijzing. Als "
+"een\n"
+" WAARDE gegeven is, dan deze WAARDE toekennen alvorens deze te fixeren.\n"
+"\n"
+" Opties:\n"
+" -a elke naam als een array begrijpen\n"
+" -A elke naam als een associatief array begrijpen\n"
+" -f gegeven namen verwijzen alleen naar functies\n"
+" -p een lijst van alle onveranderbare variabelen en functies tonen\n"
+"\n"
+" Het argument '--' schakelt verdere optieverwerking uit.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie of NAAM gegeven werd."
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+"Positionele parameters opschuiven.\n"
+"\n"
+" Hernoemt positionele parameters $N+1,$N+2,... naar $1,$2,...\n"
+" Als N niet gegeven is, wordt de waarde 1 aangenomen.\n"
+"\n"
+" De afsluitwaarde is 0 tenzij N negatief is of groter dan $#."
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+"Opdrachten uit bestand in de huidige shell uitvoeren.\n"
+"\n"
+" Leest opdrachten uit het gegeven bestand en voert deze uit in de "
+"huidige\n"
+" shell. De mappen in PATH worden nagezocht om het genoemde bestand te\n"
+" vinden. Als er verder nog argumenten gegeven zijn, dan worden dit de\n"
+" positionele parameters tijdens de uitvoering van het genoemde bestand.\n"
+"\n"
+" De afsluitwaarde is die van de laatst uitgevoerde opdracht in het "
+"gegeven\n"
+" bestand, of 1 als dit bestand niet gelezen kan worden."
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Uitvoering van de shell pauzeren.\n"
+"\n"
+" Pauzeert de uitvoering van deze shell totdat een SIGCONT-signaal\n"
+" ontvangen wordt. Een login-shell kan niet gepauzeerd worden, tenzij\n"
+" optie '-f' gegeven is.\n"
+"\n"
+" Optie:\n"
+" -f pauzering afdwingen, ook als dit een login-shell is\n"
+"\n"
+" De afsluitwaarde is 0 tenzij taakbeheer uitgeschakeld is of er een fout\n"
+" optreedt."
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+"Een conditionele expressie evalueren.\n"
+"\n"
+" Evalueert de gegeven EXPRESSIE; afhankelijk van het resultaat is de\n"
+" afsluitwaarde 0 (\"waar\") of 1 (\"onwaar\"). De expressies kunnen\n"
+" eenzijdig of tweezijdig zijn; eenzijdige expressies worden vaak\n"
+" gebruikt om de toestand van een bestand te inspecteren. Er zijn ook\n"
+" operatoren voor tekenreeksen en voor getalsmatige vergelijkingen.\n"
+"\n"
+" Bestandsoperatoren:\n"
+" -a BESTAND waar als bestand bestaat\n"
+" -b BESTAND waar als bestand een blok-apparaat is\n"
+" -c BESTAND waar als bestand een byte-apparaat is\n"
+" -d BESTAND waar als bestand een map is\n"
+" -e BESTAND waar als bestand bestaat\n"
+" -f BESTAND waar als bestand een gewoon bestand is\n"
+" -G BESTAND waar als uw groep het bestand effectief bezit\n"
+" -g BESTAND waar als bestand SETGUID is\n"
+" -h BESTAND waar als bestand een symbolische koppeling is\n"
+" -k BESTAND waar als bestand \"sticky\"-bit aan heeft staan\n"
+" -L BESTAND waar als bestand een symbolische koppeling is\n"
+" -N BESTAND waar als bestand gewijzigd is sinds laatste lezing\n"
+" -O BESTAND waar als u het bestand effectief bezit\n"
+" -p BESTAND waar als bestand een benoemde pijp is\n"
+" -r BESTAND waar als bestand voor u leesbaar is\n"
+" -S BESTAND waar als bestand een socket is\n"
+" -s BESTAND waar als bestand niet leeg is\n"
+" -t DESCRIPTOR waar als bestandsdescriptor geopend is op een "
+"terminal\n"
+" -u BESTAND waar als bestand SETUID is\n"
+" -w BESTAND waar als bestand voor u schrijfbaar is\n"
+" -x BESTAND waar als bestand door u uitvoerbaar is\n"
+"\n"
+" BEST1 -nt BEST2 waar als eerste bestand later gewijzigd is dan "
+"tweede\n"
+" BEST1 -ot BEST2 waar als eerste bestand eerder gewijzigd is dan "
+"tweede\n"
+" BEST1 -ef BEST2 waar als eerste bestand harde koppeling is naar "
+"tweede\n"
+"\n"
+" Tekenreeksoperatoren:\n"
+" -z REEKS waar als tekenreeks leeg is\n"
+" -n REEKS waar als tekenreeks niet leeg is\n"
+" REEKS waar als tekenreeks niet leeg is\n"
+" RKS1 = RKS2 waar als de tekenreeksen gelijk zijn\n"
+" RKS1 != RKS2 waar als de tekenreeksen niet gelijk zijn\n"
+" RKS1 < RKS2 waar als eerste reeks lexicografisch voor de tweede "
+"komt\n"
+" RKS1 > RKS2 waar als eerste reeks lexicografisch na de tweede "
+"komt\n"
+"\n"
+" Andere operatoren:\n"
+" -o OPTIE waar als de shell-optie ingeschakeld is\n"
+" ! EXPR waar als EXPR onwaar is\n"
+" EXPR1 -a EXPR2 waar als beide expressies waar zijn\n"
+" EXPR1 -o EXPR2 onwaar als beide expressies onwaar zijn\n"
+" ARG1 VGL ARG2 waar als rekenkundige vergelijking klopt; VGL is één\n"
+" van de volgende: -eq, -ne, -lt, -le, -gt, -ge;\n"
+" ze betekenen: gelijk, ongelijk, kleiner dan,\n"
+" kleiner of gelijk, groter dan, groter of gelijk\n"
+"\n"
+" De afsluitwaarde is 0 als EXPRESSIE waar is, 1 als EXPRESSIE onwaar is,\n"
+" en 2 als een ongeldig argument gegeven werd."
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"Een conditionele expressie evalueren.\n"
+"\n"
+" Dit is een synoniem voor de ingebouwde functie 'test', behalve dat\n"
+" het laatste argument een ']' moet zijn, horend bij de begin-'['."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Procestijden tonen.\n"
+"\n"
+" Geeft de totaal verbruikte gebruikers- en systeemtijd weer; eerst de\n"
+" tijden verbruikt door de shell zelf, en daaronder de tijden verbruikt\n"
+" door de processen uitgevoerd door de shell.\n"
+"\n"
+" De afsluitwaarde is altijd 0."
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+"Signalen en andere gebeurtenissen opvangen.\n"
+"\n"
+" Definieert en activeert afhandelingsprocedures die uitgevoerd moeten\n"
+" worden wanneer de shell een signaal of andere gebeurtenissen ontvangt.\n"
+"\n"
+" ARGUMENT is een opdracht die gelezen en uitgevoerd wordt wanneer de "
+"shell\n"
+" een van de opgegeven signalen ontvangt. Als ARGUMENT ontbreekt en er "
+"één\n"
+" signaal gegeven is, of wanneer ARGUMENT '-' is, dan worden de opgegeven\n"
+" signalen teruggezet op de waarde die ze hadden bij het starten van deze\n"
+" shell. Als ARGUMENT de lege tekenreeks is, dan worden de opgegeven\n"
+" signalen genegeerd door zowel deze shell als door alle "
+"dochterprocessen.\n"
+"\n"
+" Als EXIT (0) als signaal opgegeven wordt, dan wordt ARGUMENT uitgevoerd\n"
+" bij het afsluiten van de shell. Als DEBUG als signaal opgegeven wordt,\n"
+" dan wordt ARGUMENT uitgevoerd vóór elke enkelvoudige opdracht. Als "
+"RETURN\n"
+" als signaal opgegeven wordt, dan wordt ARGUMENT uitgevoerd elke keer "
+"als\n"
+" een functie (of een met 'source' aangeroepen script) terugkeert. Als "
+"ERR\n"
+" als signaal opgegeven wordt, dan wordt ARGUMENT uitgevoerd elke keer "
+"als\n"
+" een enkelvoudige opdracht eindigt met een afsluitwaarde die niet nul "
+"is.\n"
+"\n"
+" Als er geen enkel argument gegeven is, dan toont 'trap' welke "
+"opdrachten\n"
+" er met welke signalen verbonden zijn.\n"
+"\n"
+" Opties:\n"
+" -l een overzicht tonen van signaalnummers en hun namen\n"
+" -p voor elk gegeven signaal tonen welke opdracht ermee verbonden is\n"
+"\n"
+" Signalen kunnen als naam of als nummer opgegeven worden, in hoofd- of "
+"in\n"
+" kleine letters, en het voorvoegsel 'SIG' is optioneel. Merk op dat met\n"
+" 'kill -signaal $$' een signaal naar de huidige shell gestuurd kan "
+"worden.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie of SIGNAALAANDUIDING\n"
+" gegeven werd."
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+"Informatie tonen over een opdracht.\n"
+"\n"
+" Toont voor elke gegeven NAAM hoe deze zou worden geïnterpreteerd als\n"
+" deze als opdracht gebruikt zou worden.\n"
+"\n"
+" Opties:\n"
+" -a alle plaatsen tonen met een uitvoerbaar bestand genaamd NAAM;\n"
+" dit omvat aliassen, ingebouwde shell-opdrachten, functies,\n"
+" sleutelwoorden, en bestanden op schijf (alleen zonder '-p')\n"
+" -f functies negeren, alsof ze niet gedefinieerd zijn\n"
+" -P naar elke gegeven naam zoeken in het huidige zoekpad (PATH), ook\n"
+" als het een alias, ingebouwde shell-opdracht of functie is\n"
+" -p voor elke gegeven naam het volledige pad tonen van het bestand "
+"dat\n"
+" uitgevoerd zou worden, of niets als er een alias, functie,\n"
+" ingebouwde shell-opdracht of sleutelwoord met die naam is\n"
+" -t alleen het type van de opgegeven namen tonen: 'alias', 'builtin',\n"
+" 'file', 'function' of 'keyword', al naar gelang het een alias,\n"
+" een ingebouwde shell-opdracht, een bestand op schijf, een\n"
+" gedefinieerde functie of een sleutelwoord betreft; of niets\n"
+" als de naam onbekend is\\ \n"
+" De afsluitwaarde is 0 als elke NAAM gevonden werd, anders 1."
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Grenzen van hulpbronnen aanpassen.\n"
+"\n"
+" Begrenst de beschikbare hulpbronnen voor processen gestart door deze "
+"shell\n"
+" -- op systemen die zulke begrenzing toestaan.\n"
+"\n"
+" Opties:\n"
+" -S een \"zachte\" hulpbrongrens gebruiken\n"
+" -H een \"harde\" hulpbrongrens gebruiken\n"
+" -a alle huidige begrenzingen tonen\n"
+" -b de maximum grootte van een socketbuffer\n"
+" -c de maximum grootte van een core-bestand (in kB)\n"
+" -d de maximum hoeveelheid gegevensgeheugen van een proces (in kB)\n"
+" -e de maximum procespriotiteit (de 'nice'-waarde)\n"
+" -f de maximum grootte van bestanden geschreven door shell of "
+"dochters\n"
+" -i het maximum aantal nog wachtende signalen\n"
+" -l de maximum hoeveelheid geheugen die een proces mag vastpinnen "
+"(kB)\n"
+" -m de maximum hoeveelheid fysiek geheugen van een proces (in kB)\n"
+" -n het maximum aantal open bestandsdescriptors\n"
+" -p de maximum grootte van een pijpbuffer\n"
+" -q het maximum aantal bytes in POSIX berichtwachtrijen\n"
+" -r de maximum realtime-procesprioriteit\n"
+" -s de maximum stapelgrootte (in kB)\n"
+" -t de maximum hoeveelheid CPU-tijd (in seconden)\n"
+" -u het maximum aantal gebruikersprocessen\n"
+" -v de maximum hoeveelheid virtueel geheugen van een proces (in kB)\n"
+" -x het maximum aantal bestandsvergrendelingen\n"
+"\n"
+" Als een GRENSWAARDE opgegeven is, dan wordt dit de nieuwe waarde van de\n"
+" aangegeven hulpbron, anders wordt de huidige waarde ervan getoond.\n"
+" De speciale grenswaarden 'soft', 'hard' en 'unlimited' staan voor de\n"
+" huidige zachte grens, de huidige harde grens, en onbegrensd.\n"
+" Als geen optie gegeven is, dan wordt optie '-f' aangenomen.\n"
+"\n"
+" De waardes gaan in stappen van 1024 bytes, behalve voor '-t', die in\n"
+" seconden is, voor '-p', die in stappen van 512 bytes gaat, en voor '-"
+"u',\n"
+" dat een ongeschaald aantal is.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of een\n"
+" fout optreedt."
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+"Het bestandsaanmaakmasker tonen of instellen.\n"
+"\n"
+" Stelt het bestandsaanmaakmasker van de gebruiker in op de gegeven "
+"MODUS.\n"
+" Als MODUS ontbreekt, dan wordt de huidige waarde van het masker "
+"getoond.\n"
+"\n"
+" Als MODUS begint met een cijfer, wordt het begrepen als een octaal "
+"getal,\n"
+" anders als een symbolische modus-tekenreeks zoals chmod (1) die kent.\n"
+"\n"
+" Opties:\n"
+" -p als invoer herbruikbare uitvoer produceren (indien MODUS "
+"ontbreekt)\n"
+" -S symbolische uitvoer produceren; anders octale getallen\n"
+"\n"
+" De afsluitwaarde is 0, tenzij MODUS ongeldig is of een ongeldige optie\n"
+" gegeven werd."
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Op taakafsluiting wachten en de afsluitwaarde rapporteren.\n"
+"\n"
+" Wacht op het proces aangeduid door ID -- dat een taakaanduiding of een\n"
+" proces-ID mag zijn -- en rapporteert diens afsluitwaarde. Als geen ID\n"
+" gegeven is, dan wordt er gewacht op alle actieve dochterprocessen, en "
+"is\n"
+" de afsluitwaarde van 'wait' automatisch 0. Als ID een taakaanduiding "
+"is,\n"
+" dan wordt er gewacht op alle processen in de pijplijn van die taak.\n"
+"\n"
+" De afsluitwaarde is die van ID, 1 als ID ongeldig si, of 2 als een\n"
+" ongeldige optie gegeven werd."
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Op procesafsluiting wachten en de afsluitwaarde rapporteren.\n"
+"\n"
+" Wacht op het proces aangeduid door ID en rapporteert diens "
+"afsluitwaarde.\n"
+" Als geen PID gegeven is, dan wordt er gewacht op alle momenteel actieve\n"
+" dochterprocessen, en is de afsluitwaarde van 'wait' automatisch 0. PID\n"
+" moet een proces-ID zijn.\n"
+"\n"
+" De afsluitwaarde is die van ID, 1 als ID ongeldig si, of 2 als een\n"
+" ongeldige optie gegeven werd."
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Opdrachten uitvoeren voor elk element in een lijst.\n"
+"\n"
+" De 'for'-lus voert een reeks opdrachten uit voor elk element in een\n"
+" lijst van items. Als 'in WOORDEN...;' afwezig is, wordt 'in \"$@\";'\n"
+" aangenomen. Voor elk element in WOORDEN wordt NAAM gelijkgemaakt aan\n"
+" dat element en worden de OPDRACHTEN uitgevoerd. \n"
+" De afsluitwaarde is die van de laatst uitgevoerde opdracht."
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Een rekenkundige 'for'-lus.\n"
+"\n"
+" Dit is het equivalent van:\n"
+"\n"
+" (( EXP1 )); while (( EXP2 )); do OPDRACHTEN; (( EXP3 )); done\n"
+"\n"
+" EXP1, EXP2, and EXP3 zijn rekenkundige expressies. Als een expressie\n"
+" weggelaten wordt, wordt de waarde 1 ervoor in de plaats genomen.\n"
+"\n"
+" De afsluitwaarde is die van de laatst uitgevoerde opdracht."
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Een keuzelijst aanbieden en opdrachten uitvoeren.\n"
+"\n"
+" Toont een menu op standaardfoutuitvoer: een genummerde lijst met de\n"
+" gegeven woorden nadat alle shell-vervangingen erop zijn toegepast.\n"
+" Als het 'in'-gedeelte afwezig is, wordt 'in \"$@\";' aangenomen.\n"
+"\n"
+" Na het menu wordt de PS3-prompt getoond, en wordt een regel van\n"
+" standaardinvoer gelezen. Als de gelezen regel één van de getoonde\n"
+" nummers is, dan wordt NAAM gelijkgemaakt aan het bijbehorende woord;\n"
+" als de regel leeg is, worden het menu en de prompt opnieuw getoond;\n"
+" als einde-van-bestand (Ctrl-D) wordt gelezen, dan wordt de opdracht\n"
+" beëindigd. Elke andere waarde zorgt ervoor dat de variabele NAAM\n"
+" wordt leeggemaakt. De gelezen regel wordt altijd opgeslagen in de\n"
+" variabele REPLY. Na elke keuze worden de bijbehorende opdrachten\n"
+" uitgevoerd. Dit gaat door totdat een 'break' de opdracht beëindigt. \n"
+"\n"
+" De afsluitwaarde is die van de laatst uitgevoerde opdracht."
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+"De door een pijplijn verbruikte tijd tonen.\n"
+"\n"
+" Voert de in de PIJPLIJN gegeven opdrachten uit en toont daarna een\n"
+" tijdssamenvatting: de totale verlopen tijd, de in gebruikersprocessen\n"
+" verbruikte processortijd , en de in systeemprocessen verbruikte\n"
+" processortijd.\n"
+"\n"
+" De uitvoer kan via de omgevingsvariabele TIMEFORMAT aangepast worden.\n"
+" Optie '-p' negeert deze omgevingsvariabele en toont de tijden in een\n"
+" overdraagbare standaardopmaak.\n"
+" De afsluitwaarde is die van de PIJPLIJN."
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Opdrachten uitvoeren afhankelijk van patroonovereenkomsten.\n"
+"\n"
+" Voert één van de gegeven sets met opdrachten uit, afhankelijk van met\n"
+" welk PATROON het WOORD overeenkomt. Met '|' kunnen meerdere patronen\n"
+" gegroepeerd worden.\n"
+"\n"
+" De afsluitwaarde is die van de laatst uitgevoerde opdracht."
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Opdrachten uitvoeren afhankelijk van voorwaarden.\n"
+"\n"
+" Voert eerst de opdrachten na 'if' uit; als de afsluitwaarde daarvan\n"
+" nul is, dan worden de opdrachten na de eerste 'then' uitgevoerd; anders\n"
+" de opdrachten na de eerstvolgende 'elif' (indien aanwezig) of de 'else'\n"
+" (indien aanwezig). Als de afsluitwaarde van de opdrachten na een "
+"'elif'\n"
+" nul is, dan worden de opdrachten na de bijbehorende 'then' uitgevoerd.\n"
+" Als er geen verdere 'elif' of 'else' meer is, of zodra de opdrachten na\n"
+" een 'then' zijn uitgevoerd, is de 'if'-opdracht voltooid.\n"
+"\n"
+" De afsluitwaarde van de gehele opdracht is die van de laatst "
+"uitgevoerde\n"
+" deelopdracht, of nul als geen enkele 'if' of 'elif' nul opleverde."
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Opdrachten uitvoeren zolang een test slaagt.\n"
+"\n"
+" Voert de gegeven opdrachten uit zolang de laatste opdracht achter\n"
+" 'while' een afsluitwaarde van 0 heeft.\n"
+"\n"
+" De afsluitwaarde is die van de laatst uitgevoerde opdracht."
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Opdrachten uitvoeren zolang een test niet slaagt.\n"
+"\n"
+" Voert de gegeven opdrachten uit zolang de laatste opdracht achter\n"
+" 'until' een afsluitwaarde ongelijk aan 0 heeft.\n"
+"\n"
+" De afsluitwaarde is die van de laatst uitgevoerde opdracht."
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+"Een co-proces aanmaken genaamd NAAM.\n"
+" \n"
+" OPDRACHT asynchroon uitvoeren, met de standaardinvoer en -uitvoer van\n"
+" de opdracht via een pipe verbonden met bestandsverwijzigen toegewezen\n"
+" aan indices 0 en 1 van een array-variabele NAAM in de uitvoerende "
+"shell.\n"
+" De standaard-NAAM is \"COPROC\".\n"
+" \n"
+" Afsluitstatus:\n"
+" Geeft de afsluitwaarde van OPDRACHT."
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+"Een shell-functie definiëren.\n"
+"\n"
+" Maakt een shell-functie aan die met NAAM aangeroepen kan worden en die\n"
+" de gegeven OPDRACHTEN uitvoert in de context van de aanroepende shell.\n"
+" Wanneer NAAM aangeroepen wordt, worden de argumenten aan de functie\n"
+" doorgegeven als $0...$N, en de functienaam in $FUNCNAME.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij NAAM onveranderbaar is."
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Opdrachten als een eenheid groeperen.\n"
+"\n"
+" Voert een set opdrachten als een eenheid uit. Dit is een manier om\n"
+" de in- en uitvoer van een hele set opdrachten om te kunnen leiden.\n"
+"\n"
+" De afsluitwaarde is die van de laatst uitgevoerde opdracht."
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+"Een taak hervatten in de voorgrond.\n"
+"\n"
+" Hervat de gegeven achtergrondtaak of gepauzeerde taak in de voorgrond.\n"
+" Dit is equivalent aan de opdracht 'fg'. De taak kan met een nummer of\n"
+" met een naam aangeduid worden.\n"
+"\n"
+" Als na de taakaanduiding een '&' volgt, dan wordt de taak in de\n"
+" achtergrond geplaatst. Dit is equivalent aan de opdracht 'bg'.\n"
+"\n"
+" De afsluitwaarde is die van de hervatte taak."
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+"Een rekenkundige uitdrukking evalueren.\n"
+"\n"
+" Evalueert de gegeven expressie als een rekenkundige uitdrukking.\n"
+" Dit is equivalent aan 'let EXPRESSIE'.\n"
+"\n"
+" De afsluitwaarde is 1 als de EXPRESSIE tot 0 evalueert; anders 0."
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+"Een voorwaardelijke opdracht uitveoren.\n"
+"\n"
+" Evalueert de gegeven conditionele expressie; afhankelijk van het "
+"resultaat\n"
+" is de afsluitwaarde 0 (\"waar\") of 1 (\"onwaar\"). De expressies "
+"bestaan uit\n"
+" dezelfde basiscomponenten als die van ingebouwde opdracht 'test', en "
+"kunnen\n"
+" worden gecombineerd met de volgende operatoren:\n"
+"\n"
+" ( EXPRESSIE ) de waarde van de gegeven expressie\n"
+" ! EXPRESSIE waar als EXPRESSIE onwaar is, anders onwaar\n"
+" EXPR1 && EXPR2 waar als beide expressies waar zijn, anders "
+"onwaar\n"
+" EXPR1 || EXPR2 onwaar als beide expressies onwaar zijn, anders "
+"waar\n"
+"\n"
+" Als '==' of '!=' als operator gebruikt wordt, dan wordt de rechter\n"
+" tekenreeks als patroon begrepen en wordt patroonherkenning "
+"uitgevoerd. Als '=~' als operator gebruikt wordt, dan wordt de rechter "
+"tekenreeks\n"
+" als een reguliere expressie begrepen.\n"
+"\n"
+" De operatoren '&&' en '||' evalueren de tweede expressie níét als de "
+"waarde\n"
+" van de eerste voldoende is om het eindresulaat te bepalen. \n"
+"\n"
+" De afsluitwaarde is 0 of 1, afhankelijk van EXPRESSIE."
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+"De betekenis van enkele algemene shell-variabelen.\n"
+"\n"
+" Hieronder volgt de beschrijving van een aantal variabelen. (In elke\n"
+" lijst worden de elementen van elkaar gescheiden door dubbele punten.)\n"
+"\n"
+" BASH_VERSION versie-informatie van deze 'bash'\n"
+" CDPATH lijst van mappen om te doorzoeken wanneer het argument "
+"van\n"
+" 'cd' niet in de huidige map voorkomt\n"
+" GLOBIGNORE lijst van patronen die de bestandsnamen beschrijven die "
+"bij\n"
+" bestandsnaamjokertekenexpansie genegeerd moeten worden\n"
+" HISTFILE naam van het bestand dat uw opdrachtengeschiedenis bevat\n"
+" HISTFILESIZE maximum aantal regels dat geschiedenisbestand mag "
+"bevatten\n"
+" HISTIGNORE lijst van patronen die niet in geschiedenis moeten komen\n"
+" HISTSIZE maximum aantal geschiedenisregels dat huidige shell "
+"gebruikt\n"
+" HOME het volledige pad naar uw thuismap\n"
+" HOSTNAME de naam van de computer waarop deze 'bash' wordt "
+"uitgevoerd\n"
+" HOSTTYPE de soort CPU waarop deze 'bash' wordt uitgevoerd\n"
+" IGNOREEOF het aantal te negeren Ctrl-D's alvorens de shell afsluit\n"
+" MACHTYPE de soort machine waarop deze 'bash' wordt uitgevoerd\n"
+" MAILCHECK hoe vaak (in seconden) 'bash' controleert op nieuwe mail\n"
+" MAILPATH lijst van bestandsnamen die 'bash' controleert op nieuwe "
+"mail\n"
+" OSTYPE de soort Unix waarop deze 'bash' wordt uitgevoerd\n"
+" PATH lijst van mappen waar opdrachten in gezocht moeten worden\n"
+" PROMPT_COMMAND uit te voeren opdracht vóór het tonen van primaire "
+"prompt\n"
+" PS1 tekenreeks die primaire prompt beschrijft\n"
+" PS2 tekenreeks die secundaire prompt beschrijft (standaard '> "
+"')\n"
+" PWD het volledige pad van de huidige map\n"
+" SHELLOPTS lijst van ingeschakelde shell-opties\n"
+" TERM soortnaam van de huidige terminal\n"
+" TIMEFORMAT opmaakvoorschrift voor de uitvoer van 'time'\n"
+" auto_resume niet-leeg betekent dat één opdrachtwoord op de "
+"opdrachtregel\n"
+" eerst opgezocht wordt in de lijst van gepauzeerde "
+"taken,\n"
+" en indien daar gevonden, dan wordt die taak in de "
+"voorgrond\n"
+" geplaatst; de waarde 'exact' betekent dat het gegeven "
+"woord\n"
+" exact moet overeenkomen met een opdracht in de lijst "
+"van\n"
+" gepauzeerde taken; de waarde 'substring' betekent dat "
+"een\n"
+" overeenkomst met een deeltekenreeks voldoende is; elke\n"
+" andere waarde betekent dat het gegeven woord aan het "
+"begin\n"
+" moet staan van de opdracht van een gepauzeerde taak\n"
+" histchars tekens die geschiedenisexpansie en -vervanging besturen;\n"
+" het eerste teken is het geschiedenisvervangingsteken,\n"
+" gewoonlijk '!'; het tweede teken is het snelle\n"
+" vervangingsteken, gewoonlijk '^'; het derde teken is "
+"het\n"
+" geschiedeniscommentaarteken, gewoonlijk '#'\n"
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Mappen aan de mappenstapel toevoegen.\n"
+"\n"
+" Voegt een map toe aan de top van de mappenstapel, of roteert de stapel\n"
+" en maakt de huidige werkmap gelijk aan de nieuwe top van de stapel.\n"
+" Zonder argumenten worden de bovenste twee mappen verwisseld.\n"
+"\n"
+" Optie:\n"
+" -n onderdrukt de verandering van map bij het toevoegen van mappen\n"
+" aan de stapel, zodat enkel de stapel wordt gemanipuleerd\n"
+"\n"
+" Argumenten:\n"
+" MAP Voegt deze map toe aan de top van de mappenstapel, het de nieuwe\n"
+" werkmap makend.\n"
+" +N Roteert de stapel zodat de N-de map (tellend vanaf links, van\n"
+" de lijst getoond door 'dirs', beginned bij nul) bovenaan komt.\n"
+" -N Roteert de stapel zodat de N-de map (tellend vanaf rechts, van\n"
+" de lijst getoond door 'dirs', beginned bij nul) bovenaan komt.\n"
+"\n"
+" De ingebouwde opdracht 'dirs' toont de huidige mappenstapel.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldig argument gegeven werd of de\n"
+" mapwijziging mislukte. De opdracht 'dirs' geeft de huidige "
+"mappenstapel weer."
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Mappen van de mappenstapel verwijderen.\n"
+"\n"
+" Verwijdert items van de mappenstapel. Zonder argumenten verwijdert\n"
+" het de bovenste map van de stapel, en maakt de huidige werkmap\n"
+" gelijk aan de nieuwe bovenste map.\n"
+"\n"
+" Optie:\n"
+" -n onderdrukt de verandering van map bij het toevoegen van mappen\n"
+" aan de stapel, zodat enkel de stapel wordt gemanipuleerd\n"
+"\n"
+" Argumenten:\n"
+" +N Verwijdert het N-de item tellend vanaf links (van de lijst\n"
+" getoond door 'dirs', beginnend met nul). Bijvoorbeeld:\n"
+" 'popd +0' verwijdert de eerste map, 'popd +' de tweede.\n"
+" -N Verwijdert het N-de item tellend vanaf rechts (van de lijst\n"
+" getoond door 'dirs', beginnend met nul). Bijvoorbeeld:\n"
+" 'popd -0' verwijdert de laatste map, 'popd -1' de voorlaatste.\n"
+"\n"
+" De ingebouwde opdracht 'dirs' toont de huidige mappenstapel.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldig argument gegeven werd of de\n"
+" mapwijziging mislukte."
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"De mappenstapel tonen.\n"
+"\n"
+" Toont de huidige lijst van onthouden mappen. Mappen worden aan deze\n"
+" lijst toegevoegd met de opdracht 'pushd', en verwijderd met 'popd'.\n"
+"\n"
+" Opties:\n"
+" -c de mappenstapel wissen door alle elementen te verwijderen\n"
+" -l paden volledig tonen, niet afgekort ten opzichte van uw thuismap\n"
+" -p de mappenstapel tonen met één item per regel\n"
+" -v als '-p', maar met elk item voorafgegeaan wordt door zijn "
+"positie\n"
+" in de stapel\n"
+"\n"
+" Argumenten:\n"
+" +N Het N-de item tonen, tellend vanaf links, van de lijst getoond\n"
+" door 'dirs' wanneer opgeroepen zonder opties, beginnend bij nul.\n"
+" -N Het N-de item tonen, tellend vanaf rechts, van de lijst getoond\n"
+" door 'dirs' wanneer opgeroepen zonder opties, beginnend bij nul.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er "
+"een\n"
+" fout optreedt."
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+"Shell-opties in- of uitschakelen.\n"
+"\n"
+" Stelt de waarde in elke gegeven OPTIENAAM -- van een shell-optie die\n"
+" bepaald shell-gedrag beïnvloedt. Zonder opties wordt een lijst van "
+"alle\n"
+" instelbare opties getoond, met bij elke optie de vermelding of deze al\n"
+" dan niet ingeschakeld is.\n"
+"\n"
+" Opties:\n"
+" -o de verzameling mogelijke OPTIENAMEN naar diegene die "
+"gedefinieerd\n"
+" zijn voor gebruik met 'set -o'\n"
+" -p uitvoer produceren die herbruikbaar is als invoer\n"
+" -q uitvoer onderdrukken\n"
+" -s elke gegeven OPTIENAAM inschakelen\n"
+" -u elke gegeven OPTIENAAM uitschakelen\n"
+"\n"
+" Zonder opties is de afsluitwaarde 0 indien OPTIENAAM ingeschakeld is,\n"
+" 1 indien uitgeschakeld. De afsluitwaarde is ook 1 als een ongeldige\n"
+" optienaam gegeven werd, en de afsluitwaarde is 2 als een ongeldige "
+"optie\n"
+" gegeven werd."
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+"Argumenten volgens een opmaakvoorschrift opmaken en printen.\n"
+"\n"
+" Print de gegeven ARGUMENTEN, opgemaakt volgens de gegeven OPMAAK.\n"
+"\n"
+" Optie:\n"
+" -v VAR de uitvoer in de variabele VAR plaatsen in plaats van deze\n"
+" naar standaarduitvoer te sturen\n"
+"\n"
+" De OPMAAK-tekenreeks bestaat uit drie soorten tekens: gewone tekens,\n"
+" die simpelweg naar standaarduitvoer gekopieerd worden; stuurtekens,\n"
+" die omgezet worden en dan naar standaarduitvoer gekopieerd worden;\n"
+" en opmaaksymbolen, die elk steeds het volgende argument doen printen.\n"
+"\n"
+" Naast de standaard %-opmaaksymbolen van printf(1), \"diouxXfeEgGcs\",\n"
+" betekent %b dat de backslash-stuurtekens in het betreffende argument\n"
+" omgezet moeten worden, en betekent %q dat het argument op zo'n manier\n"
+" aangehaald moet worden dat het als invoer voor de shell hergebruikt\n"
+" kan worden.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er "
+"een\n"
+" fout optreedt."
+
+#: builtins.c:1895
+#, fuzzy
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Aangeven hoe argumenten door 'readline' gecompleteerd moeten worden.\n"
+"\n"
+" Geeft voor elke gegeven NAAM aan hoe de argumenten gecompleteerd dienen\n"
+" te worden. Zonder opties worden de bestaande "
+"completeringsvoorschriften\n"
+" getoond (in een vorm die als invoer hergebruikt kan worden).\n"
+"\n"
+" Opties:\n"
+" -p bestaande completeringsvoorschriften in herbruikbare vorm tonen\n"
+" -r elk genoemd voorschrift verwijderen, of alle voorschriften als\n"
+" geen NAAM gegeven is\n"
+"\n"
+" Als completering geprobeerd wordt, dan worden de acties toegepast in de\n"
+" volgorde van de bovenstaande hoofdletteropties.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er "
+"een\n"
+" fout optreedt."
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"De mogelijke completeringen tonen, afhankelijk van de gegeven opties.\n"
+"\n"
+" Bedoeld voor gebruik binnen een functie die mogelijke completeringen\n"
+" genereert. Als het optionele argument WOORD aanwezig is, worden alleen\n"
+" de daarbij passende completeringen gegenereerd.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of er "
+"een\n"
+" fout optreedt."
+
+#: builtins.c:1938
+#, fuzzy
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+"Completeringsopties wijzigen of tonen.\n"
+"\n"
+" Wijzigt de completeringsopties van elke gegeven NAAM, of als geen NAAM\n"
+" gegeven is, die van de huidige completering. Als geen OPTIE gegeven "
+"is,\n"
+" dan worden de completeringsopties van elke gegeven NAAM getoond, of die\n"
+" van de huidige completering.\n"
+"\n"
+" Optie:\n"
+" -o OPTIE deze completeringsoptie inschakelen voor elke gegeven NAAM\n"
+"\n"
+" Het gebruik van '+o' i.p.v. '-o' schakelt de betreffende optie _uit_.\n"
+"\n"
+" Elke NAAM dient te refereren aan een opdracht waarvoor reeds een\n"
+" completeringsvoorschrift gedefinieerd is via de opdracht 'complete'.\n"
+" Als geen NAAM gegeven is, dan dient 'compopt' aangeroepen te worden "
+"door\n"
+" een functie die momenteel completeringen genereert; dan worden de "
+"opties\n"
+" voor die draaiende completeringsgenerator gewijzigd.\n"
+"\n"
+" De afsluitwaarde is 0, tenzij een ongeldige optie gegeven werd of voor\n"
+" NAAM is geen completeringsvoorschrift gedefinieerd."
+
+#: builtins.c:1968
+#, fuzzy
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+"Regels inlezen in een array-variabele.\n"
+" \n"
+" Leest regels van standaardinvoer in in the array-variabele ARRAY.\n"
+" De variabele MAPFILE wordt gebruikt als geen ARRAY gegeven is. \n"
+" Opties:\n"
+" -n AANTAL\tmaximaal dit aantal regels kopiëren (0 = alles)\n"
+" -O BEGIN\tmet toekennen beginnen bij deze index (standaard 0)\n"
+" -s AANTAL\tdit aantal regels overslaan\n"
+" -t \t\tnieuweregelteken aan eind van elke gelezen regel verwijderen\n"
+" -u BES.DES.\tuit deze bestandsdescriptor lezen i.p.v. uit "
+"standaardinvoer\n"
+" -C FUNCTIE\tdeze functie evalueren na elke HOEVEELHEID regels\n"
+" -c HOEVEELHEID\thet aantal te lezen regels voor elke aanroep van "
+"FUNCTIE\n"
+"n Argument:\n"
+" ARRAY\t\tnaam van array-variabele waarin regels ingelezen moeten worden\n"
+" \n"
+" Als '-C' gegeven is zonder '-c', is de standaard-HOEVEELHEID 5000. Als\n"
+" FUNCTIE is geevalueerd wordt hieraan de index van het volgende array-"
+"element\n"
+" toegekend als een additioneel argument.\n"
+" \n"
+" Als geen expliciet BEGIN gegeven is, wordt het array gewist alvorens\n"
+" met toekennen te beginnen.\n"
+" \n"
+" De afsluitwaarde is 0, tenzij ARRAY alleen-lezen is of een ongeldige\n"
+" optie gegeven werd."
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+"Regels uit een bestand lezen naar een array-varabele.\n"
+" \n"
+" Een synoniem voor `mapfile'."
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc(): kan %lu bytes niet opnieuw reserveren (%lu bytes gereserveerd)"
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc(): kan %lu bytes niet opnieuw reserveren"
+
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc(): %s:%d: kan %lu bytes niet opnieuw reserveren (%lu bytes "
+#~ "gereserveerd)"
+
+#~ msgid "%s: invalid number"
+#~ msgstr "%s: ongeldig getal"
+
+#~ msgid "allocated"
+#~ msgstr "gereserveerd"
+
+#~ msgid "freed"
+#~ msgstr "vrijgegeven"
+
+#~ msgid "requesting resize"
+#~ msgstr "verzoek tot grootteverandering"
+
+#~ msgid "just resized"
+#~ msgstr "juist van grootte veranderd"
+
+#~ msgid "bug: unknown operation"
+#~ msgstr "**interne fout**: onbekende operatie"
+
+#~ msgid ""
+#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed."
+#~ msgstr ""
+#~ "Schrijft de gegeven argumenten naar standaarduitvoer.\n"
+#~ " Optie -n onderdrukt de afsluitende nieuwe regel."
+
+#~ msgid "Logout of a login shell."
+#~ msgstr "Beëindigt een login-shell."
diff --git a/po/pl.gmo b/po/pl.gmo
new file mode 100644
index 0000000..6501d1c
--- /dev/null
+++ b/po/pl.gmo
Binary files differ
diff --git a/po/pl.po b/po/pl.po
new file mode 100644
index 0000000..98f0a29
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,5208 @@
+# Polish translation of bash
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# This file is distributed under the same license as the bash package.
+# Andrzej M. Krzysztofowicz <ankry@mif.pg.gda.pl> 2006,2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bash 3.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2007-11-30 08:49+0100\n"
+"Last-Translator: Andrzej M. Krzysztofowicz <ankry@mif.pg.gda.pl>\n"
+"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "nieprawid³owy indeks tablicy"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr ""
+
+#: arrayfunc.c:480
+#, fuzzy, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: nieprawid³owa nazwa akcji"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: nie mo¿na przypisaæ do nienumerycznego indeksu"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: nie mo¿na utworzyæ: %s"
+
+# ???
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+"bash_execute_unix_command: nie mo¿na znale¼æ mapy klawiszy dla polecenia"
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: pierwszym drukowalnym znakiem nie jest `\"'"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "brak zamykaj±cego `%c' w %s"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: brak separuj±cego dwukropka"
+
+# ???
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "`%s': nieprawid³owa nazwa mapy klawiszy"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr ""
+
+# ???
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "`%s': nieprawid³owa nazwa mapy klawiszy"
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: nie mo¿na odczytaæ: %s"
+
+# ???
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "`%s': nie mo¿na usun±æ dowi±zania"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "`%s': nie znana nazwa funkcji"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s nie jest przypisany do ¿adnego klawisza.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s mo¿e byæ wywo³any przez "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr ""
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "ma sens tylko w pêtli `for', `while' lub `until'"
+
+# ???
+#: builtins/caller.def:133
+#, fuzzy
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr "Wraca do kontekstu wywo³ania bie¿±cego podprogramu"
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "Nie ustawiono HOME"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "Nie ustawiono OLDPWD"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr ""
+
+#: builtins/common.c:139 error.c:261
+#, fuzzy, c-format
+msgid "warning: "
+msgstr "%s: uwaga: "
+
+#: builtins/common.c:153
+#, fuzzy, c-format
+msgid "%s: usage: "
+msgstr "%s: uwaga: "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "za du¿o argumentów"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: opcja wymaga argumentu"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: wymagany argument numeryczny"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: nie znaleziono"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: nieprawid³owa opcja"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: nieprawid³owa nazwa opcji"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "`%s': nieprawid³owy identyfikator"
+
+#: builtins/common.c:238
+#, fuzzy
+msgid "invalid octal number"
+msgstr "nieprawid³owy numer sygna³u"
+
+#: builtins/common.c:240
+#, fuzzy
+msgid "invalid hex number"
+msgstr "nieprawid³owa liczba"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "nieprawid³owa liczba"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: nieprawid³owo okre¶lony sygna³"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "`%s': nie jest to nr PID ani prawid³owe okre¶lenie zadania"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: zmienna tylko do odczytu"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s poza zakresem"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "argument"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s poza zakresem"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: brak takiego zadania"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: brak kontroli zadañ"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "brak kontroli zadañ"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: ograniczony"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "ograniczony"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: nie jest to polecenie pow³oki"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "b³±d zapisu: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: b³±d przy okre¶laniu katalogu bie¿±cego: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: niejednoznaczne okre¶lenie zadania"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: nieprawid³owa nazwa akcji"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: brak definicji dla uzupe³nienia"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "uwaga: opcja -F mo¿e dzia³aæ inaczej ni¿ oczekiwano"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "uwaga: opcja -C mo¿e dzia³aæ inaczej ni¿ oczekiwano"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr ""
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "mo¿na u¿ywaæ tylko w funkcji"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "nie mo¿na u¿ywaæ `-f' do tworzenia funkcji"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: funkcja tylko do odczytu"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: nie mo¿na w ten sposób unicestwiæ zmiennej tablicowej"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "³adowanie dynamiczne nie jest dostêpne"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "nie mo¿na otworzyæ obiektu wspó³dzielonego %s: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "nie mo¿na znale¼æ %s w obiekcie wspó³dzielonym %s: %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: nie jest ³adowany dynamicznie"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: nie mo¿na usun±æ: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: jest katalogiem"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: nie jest zwyk³ym plikiem"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: plik jest za du¿y"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: nie mo¿na uruchomiæ pliku binarnego"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: nie mo¿na uruchomiæ: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr ""
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "to nie jest pow³oka logowania: u¿yj `exit'"
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "Istniej± zatrzymane zadania.\n"
+
+#: builtins/exit.def:122
+#, fuzzy, c-format
+msgid "There are running jobs.\n"
+msgstr "Istniej± zatrzymane zadania.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "nie znaleziono polecenia"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "specyfikacja historii"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: nie uda³o siê otworzyæ pliku tymczasowego: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr ""
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "zadanie %d uruchomiono bez kontroli zadañ"
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: niedozwolona opcja -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: opcja wymaga argumentu -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "zapamiêtywanie ¶cie¿ek poleceñ w tablicy asocjacyjnej wy³±czone"
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: tablica asocjacyjna pusta\n"
+
+#: builtins/hash.def:244
+#, fuzzy, c-format
+msgid "hits\tcommand\n"
+msgstr "ostatnie polecenie: %s\n"
+
+#: builtins/help.def:130
+#, fuzzy, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Polecenia pow³oki pasuj±ce do s³owa kluczowego `"
+msgstr[1] "Polecenia pow³oki pasuj±ce do s³owa kluczowego `"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"¿aden temat pomocy nie pasuje do `%s'. Spróbuj `help help', `man -k %s'\n"
+"lub `info %s'."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: nie mo¿na otworzyæ: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"Te polecenia pow³oki s± poleceniami wewnêtrznymi. Napisz `help', aby\n"
+"zobaczyæ listê.\n"
+"Napisz `help nazwa', aby otrzymaæ wiêcej informacji o funkcji `nazwa'.\n"
+"U¿yj `info bash', aby otrzymaæ wiêcej informacji ogólnych o pow³oce.\n"
+"U¿yj `man -k' lub `info', aby otrzymaæ wiêcej informacji o poleceniach z "
+"tej\n"
+"listy.\n"
+"\n"
+"Gwiazdka (*) po nazwie oznacza, ¿e dane polecenie jest wy³±czone.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "nie mo¿na u¿ywaæ wiêcej ni¿ jednego spo¶ród -anrw"
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "pozycja historii"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: rozwiniêcie wg historii nie powiod³o siê"
+
+#: builtins/inlib.def:71
+#, fuzzy, c-format
+msgid "%s: inlib failed"
+msgstr "%s: rozwiniêcie wg historii nie powiod³o siê"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "nie mo¿na u¿ywaæ innych opcji przy `-x'"
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: argumentami musz± byæ numery procesów lub zadañ"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Nieznany b³±d"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "spodziewano siê wyra¿enia"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: nie jest zmienn± tablicow±"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: nieprawid³owo okre¶lony deskryptor pliku"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: nieprawid³owy deskryptor pliku: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, fuzzy, c-format
+msgid "%s: invalid line count"
+msgstr "%s: nieprawid³owa opcja"
+
+#: builtins/mapfile.def:277
+#, fuzzy, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: nieprawid³owa opcja"
+
+#: builtins/mapfile.def:294
+#, fuzzy, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: nieprawid³owa nazwa akcji"
+
+#: builtins/mapfile.def:326
+#, fuzzy
+msgid "empty array variable name"
+msgstr "%s: nie jest zmienn± tablicow±"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr ""
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "`%s': brak znaku formatuj±cego"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "`%c': nieprawid³owy znak formatuj±cy"
+
+#: builtins/printf.def:578
+#, fuzzy, c-format
+msgid "warning: %s: %s"
+msgstr "%s: uwaga: "
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "brak cyfry szesnastkowej dla \\x"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "brak innego katalogu"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<brak katalogu bie¿±cego>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr ""
+
+#: builtins/pushd.def:508
+#, fuzzy
+msgid "directory stack index"
+msgstr "niedomiar stosu rekursji"
+
+#: builtins/pushd.def:683
+#, fuzzy
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+"Wypisanie listy aktualnie pamiêtanych katalogów. Katalogi umieszczane s±\n"
+" na li¶cie za pomoc± polecenia `pushd'; mo¿na cofaæ siê w obrêbie listy\n"
+" za pomoc± polecenia `popd'.\n"
+" \n"
+" Znacznik -l oznacza, ¿e `dirs' nie powinno wypisywaæ katalogów w "
+"skróconej\n"
+" wersji, tzn. wzglêdem katalogu domowego wywo³uj±cego. Oznacza to, ¿e\n"
+" `~/bin' mo¿e zostaæ wypisany jako `/homes/bfox/bin'. Znacznik -v "
+"powoduje,\n"
+" ¿e `dirs' wypisuje katalogi w osobnych wierszach, poprzedzaj±c ka¿dy\n"
+" z nich jego pozycj± na stosie. Znacznik -p powoduje to samo, lecz bez\n"
+" podawania pozycji na stosie. Znacznik -c powoduje wyczyszczenie stosu\n"
+" katalogów poprzez usuniêcie wszystkich jego elementów.\n"
+" \n"
+" +N\tWypisanie N-tej pozycji licz±c od lewej strony listy wypisywanej\n"
+" \tprzez dirs wywo³ane bez opcji, pocz±wszy od zera.\n"
+" \n"
+" -N\tWypisanie N-tej pozycji licz±c od prawej strony listy wypisywanej\n"
+" \tprzez dirs wywo³ane bez opcji, pocz±wszy od zera."
+
+#: builtins/pushd.def:705
+#, fuzzy
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Dodanie katalogu na wierzcho³ku stosu katalogów lub rotacja stosu czyni±ca\n"
+" jego nowym wierzcho³kiem bie¿±cy katalog roboczy. Wywo³ane bez\n"
+" argumentów zamienia na stosie dwa najwy¿sze katalogi.\n"
+" \n"
+" +N\tRotacja stosu czyni±ca jego wierzcho³kiem N-ty katalog (licz±c od\n"
+" \tlewej strony listy wypisywanej przez `dirs', pocz±wszy od zera).\n"
+" \n"
+" -N\tRotacja stosu czyni±ca jego wierzcho³kiem N-ty katalog (licz±c od\n"
+" \tprawej strony listy wypisywanej przez `dirs', pocz±wszy od zera).\n"
+" \n"
+" -n\tPominiêcie zmiany katalogu podczas umieszczania katalogów na\n"
+" \tstosie tak, ¿e zmieniany jest tylko stos.\n"
+" \n"
+" dir\tUmieszczenie DIR na wierzcho³ku stosu i uczynienie go nowym\n"
+" \tbie¿±cym katalogiem roboczym.\n"
+" \n"
+" Zawarto¶æ stosu katalogów mo¿na zobaczyæ za pomoc± polecenia `dirs'."
+
+#: builtins/pushd.def:730
+#, fuzzy
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Usuniêcie pozycji ze stosu katalogów. Wywo³ane bez argumentów usuwa\n"
+" katalog z wierzcho³ka stosu i zmienia katalog bie¿±cy na katalog\n"
+" bêd±cy nowym wierzcho³kiem stosu.\n"
+" \n"
+" +N\tUsuniêcie ze stosu N-tej pozycji licz±c od lewej strony listy\n"
+" \twypisywanej przez `dirs', pocz±wszy od zera. Na przyk³ad: `popd +0'\n"
+" \tusuwa pierwszy katalog, `popd +1' usuwa drugi.\n"
+" \n"
+" -N\tUsuniêcie ze stosu N-tej pozycji licz±c od prawej strony listy\n"
+" \twypisywanej przez `dirs', pocz±wszy od zera. Na przyk³ad: `popd -0'\n"
+" \tusuwa pierwszy katalog, `popd -1' usuwa drugi.\n"
+" \n"
+" -n\tPominiêcie zmiany katalogu podczas usuwania katalogów ze stosu tak,\n"
+" \t¿e zmieniany jest tylko stos.\n"
+" \n"
+" Zawarto¶æ stosu katalogów mo¿na zobaczyæ za pomoc± polecenia `dirs'."
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: nieprawid³owo okre¶lony timeout"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "b³±d odczytu: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr "wyj¶cie przez `return' mo¿liwe tylko z funkcji lub skryptu"
+
+# ???
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "nie mo¿na jednocze¶nie anulowaæ definicji funkcji i zmiennej"
+
+# ???
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: nie mo¿na anulowaæ definicji"
+
+# ???
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: nie mo¿na anulowaæ definicji: %s jest tylko do odczytu"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: nie jest zmienn± tablicow±"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: nie jest funkcj±"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "licznik przesuniêcia"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr "nie mo¿na opcji pow³oki jednocze¶nie ustawiæ i uniewa¿niæ"
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: nieprawid³owa nazwa opcji pow³oki"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "wymagany argument w postaci nazwy pliku"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: nie znaleziono pliku"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "nie mo¿na wstrzymaæ"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "nie mo¿na wstrzymaæ pow³oki logowania"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "%s jest aliasem do %s'\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s jest s³owem kluczowym pow³oki\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s jest funkcj±\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "%s jest wewnêtrznym poleceniem pow³oki\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s jest %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "¶cie¿ka do %s jest zapamiêtana (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s: nieprawid³owy argument stanowi±cy ograniczenie"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "`%c': z³e polecenie"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: nie mo¿na odczytaæ ograniczenia: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr ""
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: nie mo¿na zmieniæ ograniczenia: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "liczba ósemkowa"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "`%c': nieprawid³owy operator trybu symbolicznego"
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "`%c': nieprawid³owy znak trybu symbolicznego"
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr ""
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "ostatnie polecenie: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "Przerywanie..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "nieznany b³±d polecenia"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "z³y rodzaj polecenia"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "z³y ³±cznik"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "z³y skok"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: nieustawiona zmienna"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "przekroczony czas oczekiwania na dane wej¶ciowe: auto-wylogowanie\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "nie mo¿na przekierowaæ standardowego wej¶cia z /dev/null: %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "TIMEFORMAT: `%c': nieprawid³owy znak formatuj±cy"
+
+#: execute_cmd.c:2075
+#, fuzzy
+msgid "pipe error"
+msgstr "b³±d zapisu: %s"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: ograniczony: nie mo¿na podawaæ `/' w nazwach poleceñ"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: nie znaleziono polecenia"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: z³y interpreter"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "nie mo¿na skopiowaæ deskryptora pliku %d do %d"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "przekroczone ograniczenie poziomu rekursji dla wyra¿enia"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "niedomiar stosu rekursji"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "b³±d sk³adniowy w wyra¿eniu"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "próba przypisania do nie-zmiennej"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "dzielenie przez 0"
+
+# ???
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "b³±d: z³y prefiks operatora przypisuj±cego"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "spodziewano siê `:' w wyra¿eniu warunkowym"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "wyk³adnik mniejszy ni¿ 0"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr ""
+"spodziewany identyfikator po operatorze preinkrementacji lub predekrementacji"
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "brakuj±cy `)'"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "b³±d sk³adni: spodziewany argument"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "b³±d sk³adni: nieprawid³owy operator arytmetyczny"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr ""
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "nieprawid³owa podstawa arytmetyczna"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "warto¶æ za du¿a na podstawê"
+
+#: expr.c:1329
+#, fuzzy, c-format
+msgid "%s: expression error\n"
+msgstr "%s: oczekiwano wyra¿enia ca³kowitego"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getcwd: niemo¿liwy dostêp do katalogów nadrzêdnych"
+
+#: input.c:94 subst.c:4857
+#, fuzzy, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "nie mo¿na wy³±czyæ trybu nieblokuj±cego dla deskryptora %d"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr "nie mo¿na przydzieliæ nowego deskryptora pliku dla wej¶cia basha z %d"
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "save_bash_input: bufor dla nowego deskryptora %d ju¿ istnieje"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr ""
+
+# ???
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr "proces o PID %d wystêpuje w dzia³aj±cym zadaniu %d"
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "usuwanie zatrzymanego zadania %d z grup± procesów %ld"
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr ""
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr ""
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: %ld: brak takiego PID-u"
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr ""
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr ""
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr ""
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr ""
+
+#: jobs.c:1443
+msgid "Running"
+msgstr ""
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr ""
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr ""
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr ""
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr ""
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr ""
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr ""
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait: PID %ld nie jest potomkiem tej pow³oki"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "wait_for: Brak rekordu dla procesu %ld"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job: zadanie %d jest zatrzymane"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: zadanie zosta³o przerwane"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: zadanie %d ju¿ pracuje w tle"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, fuzzy, c-format
+msgid "%s: line %d: "
+msgstr "%s: uwaga: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr ""
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr ""
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr ""
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr ""
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr ""
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr ""
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "w tej pow³oce nie ma kontroli zadañ"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc: za³o¿enie, ¿e %s nie jest spe³nione\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"malloc: %s:%d: spartaczone za³o¿enie\r\n"
+
+#: lib/malloc/malloc.c:313
+#, fuzzy
+msgid "unknown"
+msgstr "%s: nieznany host"
+
+# ???
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr "malloc: nieprawid³owy blok na li¶cie wolnych bloków"
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free: wywo³ane dla bloku, który ju¿ zosta³ zwolniony"
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free: wywo³ane dla bloku, który nie zosta³ przydzielony"
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr "free: wykryto niedomiar; mh_nbytes poza zakresem"
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free: rozmiar pocz±tkowy i koñcowy fragmentu s± ró¿ne"
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc: wywo³ane dla bloku, który nie zosta³ przydzielony"
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr "realloc: wykryto niedomiar; mh_nbytes poza zakresem"
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "realloc: rozmiar pocz±tkowy i koñcowy fragmentu s± ró¿ne"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr "register_alloc: tablica alokacji jest pe³na podczas FIND_ALLOC?\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr "register_alloc: %p ju¿ znajduje siê w tablicy jako przydzielony?\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "register_free: %p ju¿ znajduje siê w tablicy jako wolny?\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "nieprawid³owa podstawa"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: nieznany host"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: nieznana us³uga"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: ¼le okre¶lona ¶cie¿ka sieciowa"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "operacje sieciowe nie s± wspierane"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc: %s:%d: nie mo¿na przydzieliæ %lu bajtów"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc: %s:%d: nie mo¿na przydzieliæ %lu bajtów"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Masz pocztê w $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Masz now± pocztê w $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "Poczta w %s jest przeczytana\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "b³±d sk³adni: oczekiwano wyra¿enia arytmetycznego"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "b³±d sk³adni: oczekiwany `;'"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "b³±d sk³adni: `((%s))'"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: z³y rodzaj instrukcji %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr "make_redirection: instrukcja przekierowania `%d' poza zakresem"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "nieoczekiwany EOF podczas poszukiwania pasuj±cego `%c'"
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "nieoczekiwany EOF podczas poszukiwania `]]'"
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "b³±d sk³adni w wyra¿eniu warunkowym: nieoczekiwany znacznik `%s'"
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "b³±d sk³adni w wyra¿eniu warunkowym"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "nieoczekiwany znacznik `%s', oczekiwano `)'"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "oczekiwano `)'"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "nieoczekiwany argument `%s' jednoargumentowego operatora warunkowego"
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "nieoczekiwany argument jednoargumentowego operatora warunkowego"
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "nieoczekiwany argument `%s', oczekiwano dwuarg. operatora warunkowego"
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "oczekiwano dwuargumentowego operatora warunkowego"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "nieoczekiwany argument `%s' dwuargumentowego operatora warunkowego"
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "nieoczekiwany argument dwuargumentowego operatora warunkowego"
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "nieoczekiwany znacznik `%c' w poleceniu warunkowym"
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "nieoczekiwany znacznik `%s' w poleceniu warunkowym"
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "nieoczekiwany znacznik %d w poleceniu warunkowym"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "b³±d sk³adni przy nieoczekiwanym znaczniku `%s'"
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "b³±d sk³adni przy `%s'"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "b³±d sk³adni: nieoczekiwany koniec pliku"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "b³±d sk³adni"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "U¿yj \"%s\", aby opu¶ciæ tê pow³okê.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "nieoczekiwany EOF podczas poszukiwania pasuj±cego `)'"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "uzupe³nienie: nie znaleziono funkcji `%s'"
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr "progcomp_insert: %s: NULL COMPSPEC"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: z³y ³±cznik `%d'"
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d: nieprawid³owy deskryptor pliku: %s"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "cprintf: `%c': nieprawid³owy znak formatuj±cy"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "deskryptor pliku poza zakresem"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: nieojednoznaczne przekierowanie"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: nie mo¿na nadpisaæ istniej±cego pliku"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: ograniczony: nie mo¿na przekierowaæ wyj¶cia"
+
+#: redir.c:180
+#, fuzzy, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "nie mo¿na utworzyæ pliku tymczasowego dla dokumentu miejscowego: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: nie mo¿na przypisaæ listy do elementu tablicy"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "/dev/(tcp|udp)/host/port nie s± wspierane bez sieci"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "b³±d przekierowania: nie mo¿na powieliæ deskryptora pliku"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "nie mo¿na znale¼æ /tmp, proszê o utworzenie!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "/tmp musi byæ prawid³ow± nazw± katalogu"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: nieprawid³owa opcja"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Nie mam nazwy!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr ""
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"U¿ycie:\t%s [d³uga opcja GNU] [opcja] ...\n"
+"\t%s [d³uga opcja GNU] [opcja] plik-skryptu ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "D³ugie opcje GNU:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Opcje pow³oki:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD lub -c polecenie lub -O shopt_option\t\t(tylko wywo³anie)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s lub -o opcja\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"Aby uzyskaæ wiêcej informacji o opcjach pow³oki, napisz `%s -c \"help set"
+"\"'.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"Aby uzyskaæ wiêcej informacji o poleceniach wewnêtrznych pow³oki,\n"
+"napisz `%s -c help'.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "Do zg³aszania b³êdów nale¿y u¿ywaæ polecenia `bashbug'.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d: nieprawid³owa operacja"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr ""
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr ""
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr ""
+
+#: siglist.c:59
+msgid "Quit"
+msgstr ""
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr ""
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr ""
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr ""
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr ""
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr ""
+
+#: siglist.c:87
+msgid "Killed"
+msgstr ""
+
+#: siglist.c:91
+#, fuzzy
+msgid "Bus error"
+msgstr "b³±d sk³adni"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr ""
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr ""
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr ""
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr ""
+
+#: siglist.c:111
+#, fuzzy
+msgid "Terminated"
+msgstr "ograniczony"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr ""
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr ""
+
+#: siglist.c:127
+msgid "Continue"
+msgstr ""
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr ""
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr ""
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr ""
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr ""
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr ""
+
+#: siglist.c:155
+msgid "File limit"
+msgstr ""
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr ""
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr ""
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr ""
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr ""
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr ""
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr ""
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr ""
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr ""
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr ""
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr ""
+
+#: siglist.c:199
+msgid "programming error"
+msgstr ""
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr ""
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr ""
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr ""
+
+#: siglist.c:215
+msgid "Information request"
+msgstr ""
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr ""
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr ""
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "z³e podstawienie: brak zamykaj±cego `%s' w %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: nie mo¿na przypisaæ listy do elementu tablicy"
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "nie mo¿na utworzyæ potoku dla podstawienia procesu"
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "nie mo¿na utworzyæ procesu potomnego dla podstawienia procesu"
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "nie mo¿na otworzyæ nazwanego potoku %s do odczytu"
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "nie mo¿na otworzyæ nazwanego potoku %s do zapisu"
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "nie mo¿na powieliæ nazwanego potoku %s jako deskryptor %d"
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "nie mo¿na utworzyæ potoku dla podstawienia polecenia"
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr "nie mo¿na utworzyæ procesu potomnego dla podstawienia polecenia"
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "command_substitute: nie mo¿na powieliæ potoku jako deskryptora 1"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: parametr pusty lub nieustawiony"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: wyra¿enie dla pod³añcucha < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: z³e podstawienie"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: nie mo¿na przypisywaæ w ten sposób"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, fuzzy, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "z³e podstawienie: brak zamykaj±cego `%s' w %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "brak pasuj±cego: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "oczekiwano argumentu"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: oczekiwano wyra¿enia ca³kowitego"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "oczekiwano `)'"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "oczekiwano `)', znaleziono %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: oczekiwano operatora jednoargumentowego"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: oczekiwano operatora dwuargumentowego"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "brakuj±cy `]'"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "nieprawid³owy numer sygna³u"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps: z³a warto¶æ trap_list[%d]: %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+"run_pending_traps: obs³uga sygna³u jest ustawiona na SIG_DFL, wysy³aj±c %d (%"
+"s) do siebie"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: z³y sygna³ %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "b³±d importu definicji funkcji dla `%s'"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "poziom pow³oki (%d) jest za du¿y, ustawiono na 1"
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr "make_local_variable: brak kontekstu funkcji w bie¿±cym zakresie"
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr "all_local_variables: brak kontekstu funkcji w bie¿±cym zakresie"
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: parametr pusty lub nieustawiony"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "nieprawid³owy znak %d w exportstr dla %s"
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "brak `=' w exportstr dla %s"
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr "pop_var_context: nag³ówek shell_variables poza kontekstem funkcji"
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr "pop_var_context: brak kontekstu global_variables"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+"pop_scope: nag³ówek shell_variables poza zakresem tymczasowego ¶rodowiska"
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: nie mo¿na otworzyæ: %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d: nieprawid³owy deskryptor pliku: %s"
+
+#: version.c:46
+#, fuzzy
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Copyright (C) 2006 Free Software Foundation, Inc.\n"
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr ""
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Copyright (C) 2006 Free Software Foundation, Inc.\n"
+
+#: version2.c:87
+#, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: nie mo¿na przydzieliæ %lu bajtów (przydzielono %lu)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: nie mo¿na przydzieliæ %lu bajtów"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: %s:%d: nie mo¿na przydzieliæ %lu bajtów (przydzielono %lu)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: %s:%d: nie mo¿na przydzieliæ %lu bajtów"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr ""
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr ""
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr ""
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr ""
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr ""
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr ""
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr ""
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr ""
+
+#: builtins.c:68
+msgid ":"
+msgstr ""
+
+#: builtins.c:70
+msgid "true"
+msgstr ""
+
+#: builtins.c:72
+msgid "false"
+msgstr ""
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr ""
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr ""
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr ""
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr ""
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr ""
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr ""
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr ""
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr ""
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr ""
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr ""
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr ""
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr ""
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr ""
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr ""
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr ""
+
+#: builtins.c:117
+msgid "help [-dms] [pattern ...]"
+msgstr ""
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr ""
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr ""
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr ""
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr ""
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr ""
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr ""
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr ""
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr ""
+
+#: builtins.c:148
+#, fuzzy
+msgid "shift [n]"
+msgstr "licznik przesuniêcia"
+
+#: builtins.c:150
+#, fuzzy
+msgid "source filename [arguments]"
+msgstr "wymagany argument w postaci nazwy pliku"
+
+#: builtins.c:152
+#, fuzzy
+msgid ". filename [arguments]"
+msgstr "wymagany argument w postaci nazwy pliku"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr ""
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr ""
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr ""
+
+#: builtins.c:162
+msgid "times"
+msgstr ""
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr ""
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr ""
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr ""
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr ""
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr ""
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr ""
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr ""
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr ""
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr ""
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr ""
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr ""
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr ""
+
+#: builtins.c:206
+#, fuzzy
+msgid "(( expression ))"
+msgstr "spodziewano siê wyra¿enia"
+
+#: builtins.c:208
+#, fuzzy
+msgid "[[ expression ]]"
+msgstr "spodziewano siê wyra¿enia"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr ""
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr ""
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr ""
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr ""
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr ""
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr ""
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+
+#: builtins.c:237
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr ""
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:254
+#, fuzzy
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"`alias' bez argumentów lub z opcj± -p wypisuje na standardowym wyj¶ciu\n"
+" listê aliasów w postaci alias NAME=VALUE. W przeciwnym przypadku\n"
+" definiowany jest alias dla ka¿dego NAME, dla którego podano VALUE.\n"
+" Spacja na koñcu VALUE powoduje, ¿e podczas rozwijania tego aliasu\n"
+" podstawienie aliasów bêdzie przeprowadzone tak¿e dla nastêpnego\n"
+" s³owa. Polecenie alias zwraca prawdê, chyba ¿e poda siê NAME, dla\n"
+" którego nie zdefiniowano aliasu."
+
+#: builtins.c:276
+#, fuzzy
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Usuwa wszystkie NAME z listy zdefiniowanych aliasów. Je¶li podano opcjê -a,\n"
+" usuwane s± wszystkie definicje aliasów."
+
+#: builtins.c:289
+#, fuzzy
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+"Przypisanie sekwencji klawiszy do funkcji Readline lub makra albo "
+"ustawienie\n"
+" zmiennej Readline. Sk³adnia pozbawiona opcji jest równowa¿na stosowanej\n"
+" w ~/.inputrc, ale musi byæ przekazana jako jeden argument:\n"
+" bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" bind akceptuje nastêpuj±ce opcje:\n"
+" -m keymap U¿ycie `keymap' jako mapy klawiatury na czas tego\n"
+" polecenia. Dozwolone nazwy map klawiatury to "
+"emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command i vi-insert.\n"
+" -l Wypisanie nazw funkcji.\n"
+" -P Wypisanie nazw funkcji i dowi±zañ.\n"
+" -p Wypisanie funkcji i dowi±zañ w postaci nadaj±cej "
+"siê\n"
+" do u¿ycia jako dane wej¶ciowe.\n"
+" -r keyseq Usuniêcie dowi±zania dla KEYSEQ.\n"
+" -x keyseq:shell-command\tPowoduje uruchomienie SHELL-COMMAND, gdy\n"
+" \t\t\t\twprowadzone zostanie KEYSEQ.\n"
+" -f filename Odczyt dowi±zañ dla klawiszy z pliku FILENAME.\n"
+" -q function-name Okre¶lenie, które klawisze wywo³uj± zadan± "
+"funkcjê.\n"
+" -u function-name Anulowanie wszystkich dowi±zañ dla klawiszy\n"
+" przypisanych do funkcji function-name.\n"
+" -V Wypisanie nazw zmiennych i ich warto¶ci.\n"
+" -v Wypisanie nazw zmiennych i ich warto¶ci w postaci\n"
+" nadaj±cej siê do u¿ycia jako dane wej¶ciowe.\n"
+" -S Wypisanie sekwencji klawiszy wywo³uj±cych makra "
+"oraz\n"
+" ich warto¶ci.\n"
+" -s Wypisanie sekwencji klawiszy wywo³uj±cych makra "
+"oraz\n"
+" ich warto¶ci w postaci nadaj±cej siê do u¿ycia "
+"jako\n"
+" dane wej¶ciowe."
+
+#: builtins.c:326
+#, fuzzy
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Rozpoczêcie nastêpnej iteracji pêtli FOR, WHILE lub UNTIL zawier±jacej\n"
+" polecenie. Je¶li podano N, iteracja dotyczy pêtli N-tego poziomu."
+
+#: builtins.c:338
+#, fuzzy
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Rozpoczêcie nastêpnej iteracji pêtli FOR, WHILE lub UNTIL zawier±jacej\n"
+" polecenie. Je¶li podano N, iteracja dotyczy pêtli N-tego poziomu."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+
+#: builtins.c:365
+#, fuzzy
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+"Zwrócenie kontekstu wywo³ania bie¿±cej procedury.\n"
+" \n"
+" Bez EXPR, zwracane jest \"$line $filename\". Z EXPR, zwracane jest\n"
+" \"$line $subroutine $filename\"; dodatkowe informacje s³u¿± do\n"
+" udostêpnienia ¶ladu stosu.\n"
+" \n"
+" Warto¶æ EXPR okre¶la o ile ramek wywo³añ wzglêdem bie¿±cej ramki\n"
+" nale¿y siê cofn±æ; numer najwy¿szej ramki to 0."
+
+#: builtins.c:383
+#, fuzzy
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+"Zmiana bie¿±cego katalogu na DIR. Domy¶lnym DIR jest zmienna $HOME.\n"
+" Zmienna CDPATH okre¶la ¶cie¿kê przeszukiwania w poszukiwaniu katalogu\n"
+" zawieraj±cego DIR. Alternatywne nazwy katalogów s± w CDPATH rozdzielone\n"
+" dwukropkami (:). Pusta nazwa katalogu oznacza to samo, co katalog\n"
+" bie¿±cy, tzn. `.'. Je¶li DIR zaczyna siê od uko¶nika (/), to CDPATH nie\n"
+" nie jest u¿ywane. Gdy katalog nie zostanie znaleziony, a ustawiona\n"
+" zmienna pow³oki `cdable_vars', to nastêpuje próba u¿ycia podanej nazwy\n"
+" jako nazwy zmiennej. Je¶li zmienna ta ma warto¶æ, to wykonywane jest cd\n"
+" do warto¶ci tej zmiennej. Opcja -P poleca korzystaæ z fizycznej "
+"struktury\n"
+" katalogów zamiast ¶ledzenia dowi±zañ symbolicznych; opcja -L wymusza\n"
+" ¶ledzenie dowi±zañ symbolicznych."
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+
+#: builtins.c:428
+#, fuzzy
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"¯adnego efektu; polecenie nic nie robi. Jako kod zakoñczenia\n"
+" zwracane jest zero."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:448
+#, fuzzy
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr "Zwracany jest niepomy¶lny wynik zakoñczenia."
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+
+#: builtins.c:476
+#, fuzzy
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Deklarowanie zmiennych i/lub nadawanie im atrybutów. Je¶li nie podano NAME,\n"
+" wypisywane s± warto¶ci zmiennych. Opcja -p powoduje wypisanie atrybutów\n"
+" i warto¶ci dla ka¿dego NAME.\n"
+" \n"
+" Pozosta³e opcje:\n"
+" \n"
+" -a\tuczynienie wszystkich NAME tablicami (je¶li wspierane)\n"
+" -f\twybranie tylko spo¶ród nazw funkcji\n"
+" -F\twypisanie nazw funkcji (oraz, w przypadku ¶ledzenia, numerów\n"
+" \twierszy i nazw plików) bez definicji\n"
+" -i\tnadanie wszystkim NAME atrybutu `integer'\n"
+" -r\tuczynienie wszystkich NAME tylko do odczytu\n"
+" -t\tnadanie wszystkim NAME atrybutu `trace'\n"
+" -x\tuczynienie wszystkich NAME eksportowanymi\n"
+" \n"
+" Dla zmiennych posiadaj±cych atrybut integer wykonywana jest podczas\n"
+" nadawania im warto¶ci ewaluacja arytmetyczna (patrz `let').\n"
+" \n"
+" Przy wypisywaniu warto¶ci zmiennych, -f powoduje wypisanie zarówno "
+"nazw,\n"
+" jak i definicji funkcji. Przy opcji -F wypisywane s± tylko nazwy "
+"funkcji.\n"
+" \n"
+" U¿ycie `+' zamiast `-' powoduje wy³±czenie danego atrybutu. U¿yte\n"
+" w funkcji czyni wszystkie NAME lokalnymi, podobnie jak polecenie `local'."
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+
+#: builtins.c:537
+#, fuzzy
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Wypisanie argumentów. Je¶li podano -n, pomijany jest koñcowy znak nowego\n"
+" wiersza. Je¶li podano opcjê -e, w³±czana jest interpretacja "
+"nastêpuj±cych\n"
+" znaków poprzedzonych odwrotnym uko¶nikiem:\n"
+" \t\\a\talarm (dzwonek)\n"
+" \t\\b\tcofanie\n"
+" \t\\c\tlikwidacja koñcowego znaku nowego wiersza\n"
+" \t\\E\tznak ESCAPE\n"
+" \t\\f\twysuw strony\n"
+" \t\\n\tnowy wiersz\n"
+" \t\\r\tpowrót karetki\n"
+" \t\\t\ttabulacja pozioma\n"
+" \t\\v\ttabulacja pionowa\n"
+" \t\\\\\todwrotny uko¶nik\n"
+" \t\\0nnn\tznak o kodzie ASCII NNN (ósemkowo). NNN mo¿e stanowiæ od\n"
+" \t\t0 do 3 cyfr ósemkowych\n"
+" \n"
+" Za pomoc± opcji -E mo¿na jawnie wy³±czyæ interpretacjê powy¿szych znaków."
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+#: builtins.c:689
+#, fuzzy
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"Opuszczenie pow³oki z kodem zakoñczenia N. Je¶li N pominiêto, kodem\n"
+" zakoñczenia bêdzie kod zakoñczenia ostatniego wykonanego polecenia."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+
+#: builtins.c:708
+#, fuzzy
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+"fc s³u¿y do wypisywania, edycji i pomownego uruchamiania poleceñ z listy\n"
+" historii. FIRST i LAST jako liczby okre¶laj± zakres lub FIRST jako "
+"napis\n"
+" oznacza najpó¼niej wykonywane polecenie zaczynaj±ce siê od tego napisu.\n"
+" \n"
+" -e ENAME okre¶la edytor, który ma byæ u¿ywany. Domy¶lnymi "
+"warto¶ciami\n"
+" s±: najpierw FCEDIT, potem EDITOR, a na koñcu vi.\n"
+" \n"
+" -l oznacza wypisysanie wierszy zamiast ich edycji.\n"
+" -n oznacza niewypisysanie numerów wierszy.\n"
+" -r oznacza odwrócenie kolejno¶ci wierszy (czyni±c najnowsze wypisane\n"
+" polecenie pierwszym).\n"
+" \n"
+" Przy wywo³aniu polecenia w postaci `fc -s [pat=rep ...] [command]',\n"
+" jest ono wywo³ywane ponownie po wykonaniu podstawienia OLD=NEW.\n"
+" \n"
+" Przydatnym aliasem korzystaj±cym z tego jest r='fc -s' tak, ¿e "
+"napisanie\n"
+" `r cc' uruchamia ostatnie polecenie zaczynaj±ce siê od `cc' a napisanie\n"
+" `r' uruchamia ponownie ostatnie polecenie."
+
+#: builtins.c:738
+#, fuzzy
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"Umieszczenie JOB_SPEC na pierwszym planie oraz uczynienie go bie¿±cym\n"
+" zadaniem. Je¶li nie podano JOB_SPEC, u¿yte zostanie zadanie bie¿±ce\n"
+" w rozumieniu pow³oki"
+
+#: builtins.c:753
+#, fuzzy
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Umieszczenie wszystkich JOB_SPEC w tle tak, jakby zosta³y uruchomione\n"
+" z `&'. Je¶li nie podano JOB_SPEC, u¿yte zostanie zadanie bie¿±ce\n"
+" w rozumieniu pow³oki"
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:852
+#, fuzzy
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+"Wypisanie aktywnych zadañ. Opcja -l powoduje wypisanie oprócz zwyk³ej\n"
+" informacji tak¿e numerów PID procesów; Opcja -p powoduje wypisanie "
+"tylko\n"
+" numerów PID procesów. Przy podaniu opcji -n, wypisywane s± tylko te\n"
+" procesy, których stan uleg³ zmianie od ostatniego powiadomienia.\n"
+" JOBSPEC ogranicza wypisywanie do danego zadania. Opcje -r i -s\n"
+" ograniczaj± wypisywanie do zadañ, odpowiednio, dzia³aj±cych i\n"
+" zatrzymanych. Bez opcji wypisywany jest stan wszystkich aktywnych "
+"zadañ.\n"
+" Przy podaniu -x, uruchamiane jet polecenie COMMAND po zast±pieniu\n"
+" ka¿dej z wystêpuj±cych w ARGS specyfikacji zadañ numerem PID procesu\n"
+" wiod±cego danego zadania."
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+
+#: builtins.c:898
+#, fuzzy
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Wys³anie do procesów okre¶lonych przez PID (lub JOBSPEC) sygna³u SIGSPEC.\n"
+" Gdy SIGSPEC nie jest podany, zak³ada siê, ¿e chodzi o SIGTERM. Argument\n"
+" `-l' powoduje wypisanie nazw sygna³ów; je¶li po `-l' wystêpuj± jakie¶\n"
+" argumenty, zak³ada siê, ¿e s± to numery sygna³ów, dla których nale¿y\n"
+" wypisaæ nazwy. Kill jest poleceniem wewnêtrznym z dwóch powodów:\n"
+" umo¿liwia korzystanie z identyfikatorów zadañ zamiast numerów PID\n"
+" oraz, w przypadku osi±gniêcia ograniczenia na liczbê procesów, nie\n"
+" powoduje potrzeby uruchamiania dodatkowego procesu, aby jaki¶ ubiæ."
+
+#: builtins.c:921
+#, fuzzy
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+"Ka¿dy z argumentów jest wyra¿eniem arytmetycznym do obliczenia. Obliczenia\n"
+" s± wykonywane dla liczb ca³kowitych o sta³ej d³ugo¶ci bez sprawdzania\n"
+" przepe³nienia, jednak¿e dzielenie przez 0 jest przechwytywane i "
+"oznaczane\n"
+" jako b³±d. Nastêpuj±ca lista operatorów jest pogrupowana na poziomy\n"
+" operatorów o jednakowym priorytecie.\n"
+" Poziomy s± wypisane w kolejno¶ci malej±cego priorytetu.\n"
+" \n"
+" \tid++, id--\tpost-inkrementacja, post-dekrementacja zmiennej\n"
+" \t++id, --id\tpre-inkrementacja, pre-dekrementacja zmiennej\n"
+" \t-, +\t\tjednoargumentowy minus, plus\n"
+" \t!, ~\t\tlogiczna i bitowa negacja\n"
+" \t**\t\tpotêgowanie\n"
+" \t*, /, %\t\tmno¿enie, dzieleni, reszta z dzielenia\n"
+" \t+, -\t\tdodawanie, odejmowanie\n"
+" \t<<, >>\t\tlewe i prawe przesuniêcie bitowe\n"
+" \t<=, >=, <, >\tporównanie\n"
+" \t==, !=\t\trówno¶æ, nierówno¶æ\n"
+" \t&\t\tbitowe AND\n"
+" \t^\t\tbitowe XOR\n"
+" \t|\t\tbitowe OR\n"
+" \t&&\t\tlogiczne AND\n"
+" \t||\t\tlogiczne OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\toperator warunkowy\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tprzypisanie\n"
+" \n"
+" Jako operandy mog± wystêpowaæ zmienne pow³oki. Nazwa zmiennej jest\n"
+" zastêpowana w w wyra¿eniu jej warto¶ci± (po konwersji do liczby\n"
+" ca³kowitej o sta³ej d³ugo¶ci). Zmienna, aby mog³a byæ u¿yta\n"
+" w wyra¿eniu, nie musi mieæ ustawionego atrybutu integer.\n"
+" \n"
+" Operacje s± wykonywane wg. priorytetów operatorów. Najpierw s±\n"
+" wykonywane podwyra¿enia w nawiasach i maj± one pierwszeñstwo przed\n"
+" powy¿szymi priorytetami operatorów.\n"
+" \n"
+" Je¶li warto¶ci± ostatniego argumentu jest 0, let zwraca 1;\n"
+" w pozosta³ych przypadkach zwracane jest 0."
+
+#: builtins.c:966
+#, fuzzy
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+"Odczytanie pojedynczego wiersza ze standardowego wej¶cia lub z deskryptora\n"
+" pliku FD, je¶li podano opcjê -u. Przypisanie pierwszego odczytanego\n"
+" s³owa do pierwszego NAME, drugiego - do drugiego NAME itd., pozosta³e\n"
+" nadmiarowe s³owa przypisuj±c do ostatniego NAME. Jako separatory s³ów\n"
+" rozpoznawane s± jedynie znaki wystêpuj±ce w $IFS. W razie nie podania\n"
+" ¿adnego NAME, przeczytany wiersz jest przechowywany w zmiennej REPLY.\n"
+" Podanie opcji -r, oznacza wej¶cie `surowe' i wy³±czenie cytowania przez\n"
+" odwrotny uko¶nik. Opcja -d powoduje czytanie do napotkania pierwszego\n"
+" znaku DELIM, a nie do znaku nowego wiersza. Gdy podana zostanie opcja\n"
+" -p, przed odczytem wyprowadzany jest napis PROMPT bez nastêpuj±cego po\n"
+" nim znaku koñca wiersza. Gdy podana zostanie opcja -a, odczytane s³owa\n"
+" s± przypisywane do kolejnych indeksów tablicy ARRAY, pocz±wszy od zera.\n"
+" Gdy podana zostanie opcja -e a pow³oka jest interakcyjna, wiersz jest\n"
+" pobierany za pomoc± readline. Podanie -n z niezerowym argumentem NCHARS\n"
+" powoduje, ¿e odczyt koñczy siê po odczytaniu NCHARS znaków. Opcja -s\n"
+" powoduje, ¿e odczyt z terminala odbywa siê bez echa.\n"
+" \n"
+" Opcja -t powoduje przeterminowanie odczytu i zwrócenie b³êdy, je¿eli\n"
+" w ci±gu TIMEOUT sekund nie zostanie odczytany pe³en wiersz. Je¶li\n"
+" ustawiona jest zmienna TMOUT, jej warto¶æ stanowi domy¶lny timeout.\n"
+" Kodem powrotu jest zero, chyba ¿e napotkano koniec pliku, wyst±pi³\n"
+" timeout odczytu lub jako argument dla -u podano nieprawid³owy "
+"deskryptor\n"
+" pliku."
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+
+#: builtins.c:1022
+#, fuzzy
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+" -a Oznaczenie zmiennych, które zosta³y zmodyfikowane lub utworzone "
+"jako\n"
+" eksportowane.\n"
+" -b Natychmiastowe powiadomienie o zakoñczeniu zadania.\n"
+" -e Natychmiastowe zakoñczenie, gdy polecenie zakoñczy siê z\n"
+" niezerowym kodem powrotu.\n"
+" -f Wy³±czenie generowania nazw plików (globbing).\n"
+" -h Pamiêtanie po³o¿enia znalezionych poleceñ.\n"
+" -k Umieszczanie w ¶rodowisku polecenia wszystkich argumentów o\n"
+" postaci przypisania, nie tylko tych, które poprzedzaja nazwê\n"
+" polecenia.\n"
+" -m W³±czenie kontroli zadañ.\n"
+" -n Czytanie poleceñ, lecz niewykonywanie ich.\n"
+" -o nazwa-opcji\n"
+" Ustawienie zmiennej odpowiadaj±cej nazwa-opcji:\n"
+" allexport to samo, co -a\n"
+" braceexpand to samo, co -B\n"
+" emacs korzystanie z interfejsu edycji wiersza w "
+"stylu\n"
+" emacsa\n"
+" errexit to samo, co -e\n"
+" errtrace to samo, co -E\n"
+" functrace to samo, co -T\n"
+" hashall to samo, co -h\n"
+" histexpand to samo, co -H\n"
+" history w³±czenie historii poleceñ\n"
+" ignoreeof nie koñczenie pow³oki po odczytaniu EOF\n"
+" interactive-comments\n"
+" pozwolenie na wyst±pienie komentarzy\n"
+" w poleceniach interakcyjnych\n"
+" keyword to samo, co -k\n"
+" monitor to samo, co -m\n"
+" noclobber to samo, co -C\n"
+" noexec to samo, co -n\n"
+" noglob to samo, co -f\n"
+" nolog aktualnie akceptowane ale ignorowane\n"
+" notify to samo, co -b\n"
+" nounset to samo, co -u\n"
+" onecmd to samo, co -t\n"
+" physical to samo, co -P\n"
+" pipefail kodem powrotu potoku jest kod powrotu "
+"ostatniego\n"
+" polecenia koñcz±cego siê z niezerowym kodem "
+"lub\n"
+" zero, gdy ¿adne polecenie nie zakoñczy³o siê z\n"
+" niezerowym kodem powrotu\n"
+" posix zmiana zachowania basha, gdy standardowe\n"
+" zachowanie operacji ró¿ni siê od standardu\n"
+" 1003.2 na zgodne ze standardem\n"
+" privileged to samo, co -p\n"
+" verbose to samo, co -v\n"
+" vi korzystanie z interfejsu edycji wiersza w "
+"stylu\n"
+" vi\n"
+" xtrace to samo, co -x\n"
+" -p W³±czone, gdy nie zgadzaj± siê rzeczywisty i efektywny ID\n"
+" u¿ytkownika. Wy³±cza przetwarzanie pliku $ENV oraz import "
+"funkcji\n"
+" pow³oki. Wy³±czenie tej opcji powoduje, ¿e efektywne UID i GID\n"
+" zostan± ustawione na rzeczywiste UID i GID.\n"
+" -t Zakoñczenie po przeczytaniu i uruchomieniu jednego polecenia.\n"
+" -u Traktowanie podczas podstawienia nieustawionych zmiennych jako\n"
+" b³êdów.\n"
+" -v Wypisywanie wej¶cia pow³oki tak, jak zosta³o przeczytane.\n"
+" -x Wypisywanie poleceñ i ich argumentów tak, jak s± uruchamiane.\n"
+" -B Przeprowadzanie przez pow³okê rozwijania nawiasów.\n"
+" -C Gdy ustawione, nie pozwalanie na nadpisywanie istniej±cych\n"
+" zwyk³ych plików przez przekierowanie wyj¶cia.\n"
+" -E Gdy ustawione, dziedziczenie pu³apki ERR przez funkcje pow³oki.\n"
+" -H W³±czenie podstawienia historii w stylu `!'. Znacznik ten jest\n"
+" domy¶lnie w³±czony dla pow³oki interakcyjnej.\n"
+" -P Gdy ustawione, nie ¶ledzenie dowi±zañ symbolicznych podczas\n"
+" uruchamiania poleceñ takich, jak cd, które zmieniaj± katalog\n"
+" bie¿±cy.\n"
+" -T Gdy ustawione, dziedziczenie pu³apki DEBUG przez funkcje "
+"pow³oki.\n"
+" - Przypisywanie pozostaj±cych argumentów do argumentów "
+"pozycyjnych.\n"
+" Wy³±czenie opcji -x i -v.\n"
+" \n"
+" U¿ycie + zamiast - powoduje wy³±czenie powy¿szych znaczników. Mo¿na z\n"
+" nich tak¿e korzystaæ przy uruchomieniu pow³oki. Aktualny zestaw opcji\n"
+" mo¿na znale¼æ w $-. Pozosta³e n argumentów staje siê parametrami\n"
+" pozycyjnymi i s± one przypisane, kolejno, do $1, $2, .. $n. Gdy nie\n"
+" zostan± podane ¿adne argumenty, wypisywane s± wszystkie zmienne pow³oki."
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+#, fuzzy
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+"Odczytanie i uruchomienie poleceñ z pliku FILENAME oraz powrót. Do\n"
+" znalezienia katalogu zawieraj±cego FILENAME u¿ywane s± ¶cie¿ki zawarte\n"
+" w $PATH. Je¶li podane zostan± jakiekolwiek ARGUMENTS, staj± siê\n"
+" parametrami pozycyjnymi podczas uruchomienia FILENAME."
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+#, fuzzy
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+"Polecenie zwracaj±ce kod 0 (prawda) lub 1 (fa³sz) w zalezno¶ci od wyniku\n"
+" obliczenia wyra¿enia EXPR. Wyra¿enia mog± mieæ postaæ jedno- lub\n"
+" dwuargumentow±. jednoargumentowe wyra¿enia s³u¿± zwykle do badania "
+"stanu\n"
+" pliku. Istniej± równiez operatory dzia³aj±ce na ³añcuchach tekstowych,\n"
+" jak te¿ operatory numerycznego porównania.\n"
+" \n"
+" Operatory plikowe:\n"
+" \n"
+" -a FILE Prawda, gdy FILE istnieje.\n"
+" -b FILE Prawda, gdy FILE jest plikiem specjalnym urz±dzenia\n"
+" blokowego.\n"
+" -c FILE Prawda, gdy FILE jest plikiem specjalnym urz±dzenia\n"
+" znakowego.\n"
+" -d FILE Prawda, gdy FILE jest katalogiem.\n"
+" -e FILE Prawda, gdy FILE istnieje.\n"
+" -f FILE Prawda, gdy FILE istnieje i jest zwyk³ym plikiem.\n"
+" -g FILE Prawda, gdy FILE ma ustawiony bit SGID.\n"
+" -h FILE Prawda, gdy FILE jest dowi±zaniem symbolicznym.\n"
+" -L FILE Prawda, gdy FILE jest dowi±zaniem symbolicznym.\n"
+" -k FILE Prawda, gdy FILE ma ustawiony bit `sticky'.\n"
+" -p FILE Prawda, gdy FILE jest nazwanym potokiem.\n"
+" -r FILE Prawda, gdy FILE jest odczytywalny przez "
+"u¿ytkownika.\n"
+" -s FILE Prawda, gdy FILE istnieje i jest niepusty.\n"
+" -S FILE Prawda, gdy FILE jest gniazdem.\n"
+" -t FD Prawda, gdy FD jest otwarty na terminalu.\n"
+" -u FILE Prawda, gdy FILE ma ustawiony bit SUID.\n"
+" -w FILE Prawda, gdy FILE jest zapisywalny przez u¿ytkownika.\n"
+" -x FILE Prawda, gdy FILE jest uruchamialny przez "
+"u¿ytkownika.\n"
+" -O FILE Prawda, gdy u¿ytkownik jest efentywnym w³a¶cicielem\n"
+" FILE.\n"
+" -G FILE Prawda, grupa u¿ytkownika jest efentywnym "
+"w³a¶cicielem\n"
+" FILE.\n"
+" -N FILE Prawda, gdy FILE zosta³ zmodyfikowany po ostatnim\n"
+" odczycie.\n"
+" \n"
+" FILE1 -nt FILE2 Prawda, gdy FILE1 jest nowszy ni¿ FILE2 (porównuj±c\n"
+" czas ostatniej modyfikacji).\n"
+" \n"
+" FILE1 -ot FILE2 Prawda, gdy FILE1 jest starszy ni¿ FILE2.\n"
+" \n"
+" FILE1 -ef FILE2 Prawda, gdy FILE1 jest twardym dowi±zaniem do FILE2.\n"
+" \n"
+" Operatory ³añcuchowe:\n"
+" \n"
+" -z STRING Prawda, gdy STRING jest pusty.\n"
+" \n"
+" -n STRING\n"
+" STRING Prawda, gdy STRING nie jest pusty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" Prawda, gdy STRING1 i STRING2 s± równe.\n"
+" STRING1 != STRING2\n"
+" Prawda, gdy STRING1 i STRING2 nie s± równe.\n"
+" STRING1 < STRING2\n"
+" Prawda, gdy STRING1 znajduje siê w porz±dku\n"
+" leksykograficznym przed STRING2.\n"
+" STRING1 > STRING2\n"
+" Prawda, gdy STRING1 znajduje siê w porz±dku\n"
+" leksykograficznym po STRING2.\n"
+" \n"
+" Inne operatory:\n"
+" \n"
+" -o OPTION Prawda, gdy opcja pow³oki OPTION jest w³±czona.\n"
+" ! EXPR Prawda, gdy EXPR jest fa³szywe.\n"
+" EXPR1 -a EXPR2 Prawda, gdy zarówno EXPR1, jak i EXPR2 s± prawdziwe.\n"
+" EXPR1 -o EXPR2 Prawda, gdy EXPR1 lub EXPR2 jest prawdziwe.\n"
+" \n"
+" arg1 OP arg2 Testy arytmetyczne. OP jest jednym z -eq, -ne, -lt,\n"
+" -le, -gt lub -ge.\n"
+" \n"
+" Dwuargumentowe operatory arytmetyczne zwracaj± prawdê, gdy arg1 jest\n"
+" równy, nierówny, mniejszy ni¿, mniejszy lub równy, wiêkszy ni¿ lub\n"
+" wiêkszy lub równy arg2."
+
+#: builtins.c:1299
+#, fuzzy
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"Jest to synonim dla wbudowanego polecenia \"test\", ale wymagaj±cy, by\n"
+" ostatnim argumentem by³ `]' pasuj±cy do pocz±tkowego `['."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:1320
+#, fuzzy
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+"Gdy pow³oka otrzyma sygna³(y) SIGNAL_SPEC, odczytywane i uruchamiane jest\n"
+" polecenie podane jako argument ARG. W azie braku argumentów (i podaniu\n"
+" pojedynczego SIGNAL_SPEC) lub gdy argumentem jest `-', ka¿demu z "
+"podanych\n"
+" sygna³ów jest przywracana pierwotna warto¶æ. Je¶li ARG jest pustym\n"
+" ³añcuchem, ka¿dy SIGNAL_SPEC jest ignorowany przez pow³okê i wywo³ane\n"
+" przez ni± polecenia. Je¿eli jako SIGNAL_SPEC podano EXIT (0), polecenie\n"
+" ARG jest uruchamiane przy opuszczaniu pow³oki. Je¶li jako SIGNAL_SPEC\n"
+" podano DEBUG, ARG jest uruchamiane po ka¿dym poleceniu prostym.\n"
+" W przypadku podania opcji -p, wypisywane s± polecenia trap skojarzone\n"
+" z poszczególnymi SIGNAL_SPEC. W przypadku braku argumentów lub gdy\n"
+" podano jedynie opcjê -p, trap wypisuje listê poleceñ skojarzonych ze\n"
+" wszystkimi mo¿liwymi sygna³ami. Ka¿de z SIGNAL_SPEC mo¿e byæ albo nazw±\n"
+" sygna³u wg. <signal.h> lub numerem sygna³u. Nazwy sygna³ów s± "
+"niewra¿liwe\n"
+" na wielko¶æ liter a prefiks SIG jest opcjonalny. `trap -l' wypisuje "
+"listê\n"
+" nazw sygna³ów wraz z odpowiadaj±cymi im numerami. Nale¿y zauwa¿yæ, ¿e\n"
+" sygna³ mo¿na wys³aæ do pow³oki poleceniem \"kill -signal $$\"."
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+#, fuzzy
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Ulimit zapewnia z poziomu pow³oki kontrolê ilo¶ci zasobów udostêpnionych\n"
+" procesom w systemach, które tak± kontrolê umo¿liwiaj±. Gdy podana jest\n"
+" opcja, ma ona nastêpujêce znaczenie:\n"
+" \n"
+" -S\tkorzystanie z miêkkiego limitu zasobów\n"
+" -H\tkorzystanie ze sztywnego limitu zasobów\n"
+" -a\twypisanie wszystkich aktualnych limitów\n"
+" -c\tmaksymalny rozmiar tworzonych plików core\n"
+" -d\tmaksymalny rozmiar segmentu danych procesu\n"
+" -e\tmaksymalny priorytet szeregowania procesów (`nice')\n"
+" -f\tmaksymalny rozmiar plików zapisywanych przez pow³okê i jej\n"
+" \tprocesy potomne\n"
+" -i\tmaksymalna liczba oczekuj±cych sygna³ów\n"
+" -l\tmaksymalny rozmiar pamiêci, któr± proces mo¿e zablokowaæ\n"
+" -m\tmaksymalna ilo¶æ rezydentnych stron procesu\n"
+" -n\tmaksymalna liczba otwartych deskryptorów plików\n"
+" -p\trozmiar bufora potoku\n"
+" -q\tmaksymalna liczba bajtów w POSIX-owych kolejkach komunikatów\n"
+" -r\tmaksymalny priorytet szeregowania dla procesów czasu\n"
+" \trzeczywistego\n"
+" -s\tmaksymalny rozmiar stosu\n"
+" -t\tmaksymalna ilo¶æ czasu procesora w sekundach\n"
+" -u\tmaksymalna liczba procesów u¿ytkownika\n"
+" -v\trozmiar pamiêci wirtualnej\n"
+" -x\tmaksymalna liczba blokad plików\n"
+" \n"
+" Gdy podano warto¶æ LIMIT, stanowi ona now± warto¶æ ograniczenia dla\n"
+" danego zasobu; specjalne warto¶ci LIMIT: `soft', `hard' i `unlimited'\n"
+" oznaczaj±, odpowiednio, aktualne ograniczenie miêkkie, sztywne i brak\n"
+" ograniczenia.\n"
+" W przeciwnym przypadku wypisywana jest aktualna warto¶æ podanego\n"
+" ograniczenia.\n"
+" Gdy nie podano opcji, przyjmuje siê, ¿e podano -f. Warto¶ci s± podawane\n"
+" w jednostkach 1024-bajtowych, za wyj±tkiem -t, które jest w sekundach,\n"
+" -p, które jest w jednostkach 512-bajtowych oraz -u, które jest\n"
+" bezwymiarow± liczb± procesów."
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+#, fuzzy
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Oczekiwanie na podany proces i zg³oszenie jego statusu zakoñczenia. Gdy nie\n"
+" zostanie podane N, oczekiwanie dotyczy wszystkich aktualnie aktywnych\n"
+" procesów potomnych, a kodem powrotu jest zero. N mo¿e byæ numerem PID\n"
+" procesu lub specyfikacj± zadania; gdy jest specyfikacj± zadania,\n"
+" oczekiwanie dotyczy wszystkich procesów w potoku zadania."
+
+#: builtins.c:1481
+#, fuzzy
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Pêtla `for' uruchamia ci±g poleceñ dla ka¿dego elementu podanej listy. Gdy\n"
+" nie zostanie podane `in WORDS ...;', zak³ada siê, ¿e podano `in \"$@"
+"\"'.\n"
+" Dla ka¿dego elementu WORDS, NAME jest ustawiane na ten element\n"
+" i uruchamiane s± COMMANDS."
+
+#: builtins.c:1495
+#, fuzzy
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Równowa¿ne\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2 i EXP3 s± wyra¿eniami arytmetycznymi. Je¶li które¶ z wyra¿eñ\n"
+" zostanie pominiête, zachowanie jest takie, jaby mia³o ono warto¶æ 1."
+
+#: builtins.c:1513
+#, fuzzy
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"WORDS jest rozwijane, generhj±c listê s³ów. Zbiór rozwiniêtych s³ów\n"
+" wypisywany jest na standardowej diagnostyce, a ka¿de s³owo jest\n"
+" poprzedzone przez liczbê. Gdy nie zostanie podane `in WORDS', zak³ada\n"
+" siê, ¿e podano `in \"$@\"'. Wy¶wietlany jest wówczas tekst zachêty PS3\n"
+" i odczytywany jest wiersz ze standardowego wej¶cia. Gdy wiersz ten "
+"sk³ada\n"
+" siê z liczby przypisanej do jednego z wypisanych s³ów, to NAME jest\n"
+" ustawiane na to s³owo. Gdy wiersz jest pusty, WORDS i tekst zachêty s±\n"
+" Wy¶wietlane ponownie. Gdy odczytany zostanie EOF, polecenie siê koñczy.\n"
+" Ka¿da inna warto¶æ powoduje przypisanie NAME warto¶ci pustej. Odczytany\n"
+" wiersz jest zachowywany w zmiennej REPLY. Po ka¿dym wyborze uruchamiane\n"
+" s± polecenia COMMANDS a¿ do polecenia break."
+
+#: builtins.c:1534
+#, fuzzy
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+"Uruchomienie PIPELINE i wypisanie podsumowania zawieraj±cego czas "
+"rzeczywisty,\n"
+" czas procesora w trybie u¿ytkownika oraz czas procesora w trybie "
+"systemu,\n"
+" jakie spêdzi³o polecenie PIPELINE do chwili zatrzymania. Kod "
+"zakoñczenia\n"
+" jest kodem zakoñczenia polecenia PIPELINE. Opcja `-p' powoduje "
+"wypisanie\n"
+" podsumowania czasów w nieco innej postaci. U¿ywana jest wtedy warto¶æ\n"
+" zmiennej TIMEFORMAT jako format danych wyj¶ciowych."
+
+#: builtins.c:1551
+#, fuzzy
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Wybiórcze uruchamianie poleceñ COMMANDS w zale¿no¶ci od tego, czy WORD "
+"pasuje\n"
+" do wzorca PATTERN. Znak `|' s³u¿y do rozdzielania wielu wzorców."
+
+#: builtins.c:1563
+#, fuzzy
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Uruchomiana jest lista `if COMMANDS'. Gdy jej kod powrotu jest zerem,\n"
+" uruchamiana jest lista `then COMMANDS'. W przeciwnym przypadku\n"
+" uruchamiane s± poszczególne listy `elif COMMANDS' i, je¶li kod powrotu\n"
+" takiej listy jest zerem, uruchamiana jest odpowiednia lista\n"
+" `then COMMANDS' i polecenie if siê koñczy. W przeciwnym przypadku\n"
+" uruchamiana jest lista `else COMMANDS', je¶li taka istnieje. Kodem\n"
+" zakoñczenia ca³ej konstrukcji jest kod zakoñczenia ostatniego\n"
+" uruchomionego polecenia lub zero, gdy ¿aden ze sprawdzanych warunków\n"
+" nie by³ prawdziwy."
+
+#: builtins.c:1580
+#, fuzzy
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Rozwijanie i uruchamianie poleceñ COMMANDS tak d³ugo, dopóki ostatnie\n"
+" polecenie w `while' COMMANDS koñczy siê z kodem zero."
+
+#: builtins.c:1592
+#, fuzzy
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Rozwijanie i uruchamianie poleceñ COMMANDS tak d³ugo, dopóki ostatnie\n"
+" polecenie w `until' COMMANDS koñczy siê z kodem niezerowym."
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+
+#: builtins.c:1632
+#, fuzzy
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Uruchomienie zbioru poleceñ jako grupy. W ten sposób mo¿na przekierowaæ\n"
+" ca³y zbiór poleceñ."
+
+#: builtins.c:1644
+#, fuzzy
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+"Równowa¿ne argumentowi JOB_SPEC polecenia `fg'. Wznowienie zatrzymanego lub\n"
+" dzia³aj±cego w tle zadania. JOB_SPEC mo¿e okre¶laæ albo nazwê zadania\n"
+" albo jego numer. Umieszczenie `&' po JOB_SPEC umieszcza zadanie w tle\n"
+" tak, jak to siê dzieje po podaniu specyfikacji zadania jako argumentu "
+"dla\n"
+" `bg'."
+
+#: builtins.c:1659
+#, fuzzy
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+"Obliczenie wyra¿enia EXPRESSION zgodnie z zasadami obliczania wyra¿eñ\n"
+" arytmetycznych. Równowa¿ne \"let EXPRESSION\"."
+
+#: builtins.c:1671
+#, fuzzy
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+"Zwraca status wynosz±cy 0 lub 1 w zale¿no¶ci od wyniku wyra¿enia "
+"warynkowego\n"
+" EXPRESSION. Wyra¿enia s± tworzone na tych samych zasadach, jak\n"
+" w poleceniu `test' i mog± byæ ³±czone za pomoc± nastêpuj±cych "
+"operatorów\n"
+" \n"
+" \t( EXPRESSION )\tZwraca warto¶æ EXPRESSION\n"
+" \t! EXPRESSION\tPrawdziwe, gdy EXPRESSION jest fa³szywe; fa³szywe\n"
+" \t\tw innym przypadku\n"
+" \tEXPR1 && EXPR2\tPrawdziwe, gdy zarówno EXPR1 jak i EXPR2 s± "
+"prawdziwe;\n"
+" \t\tfa³szywe w innym przypadku\n"
+" \tEXPR1 || EXPR2\tPrawdziwe, gdy EXPR1 lub EXPR2 jest prawdziwe;\n"
+" \t\tfa³szywe w innym przypadku\n"
+" \n"
+" W przypadku u¿ycia operatorów `==' lub `!=', napis po prawej stronie\n"
+" operatora jest traktowany jak wzorzec i wykonywane jest dopasowywanie "
+"do\n"
+" wzorca. Operatory && i || nie opliczaj± EXPR2, je¶li obliczenie EXPR1\n"
+" wystarcza do okre¶lenia warto¶ci wyra¿enia."
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+
+#: builtins.c:1754
+#, fuzzy
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Dodanie katalogu na wierzcho³ku stosu katalogów lub rotacja stosu czyni±ca\n"
+" jego nowym wierzcho³kiem bie¿±cy katalog roboczy. Wywo³ane bez\n"
+" argumentów zamienia na stosie dwa najwy¿sze katalogi.\n"
+" \n"
+" +N\tRotacja stosu czyni±ca jego wierzcho³kiem N-ty katalog (licz±c od\n"
+" \tlewej strony listy wypisywanej przez `dirs', pocz±wszy od zera).\n"
+" \n"
+" -N\tRotacja stosu czyni±ca jego wierzcho³kiem N-ty katalog (licz±c od\n"
+" \tprawej strony listy wypisywanej przez `dirs', pocz±wszy od zera).\n"
+" \n"
+" -n\tPominiêcie zmiany katalogu podczas umieszczania katalogów na\n"
+" \tstosie tak, ¿e zmieniany jest tylko stos.\n"
+" \n"
+" dir\tUmieszczenie DIR na wierzcho³ku stosu i uczynienie go nowym\n"
+" \tbie¿±cym katalogiem roboczym.\n"
+" \n"
+" Zawarto¶æ stosu katalogów mo¿na zobaczyæ za pomoc± polecenia `dirs'."
+
+#: builtins.c:1788
+#, fuzzy
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Usuniêcie pozycji ze stosu katalogów. Wywo³ane bez argumentów usuwa\n"
+" katalog z wierzcho³ka stosu i zmienia katalog bie¿±cy na katalog\n"
+" bêd±cy nowym wierzcho³kiem stosu.\n"
+" \n"
+" +N\tUsuniêcie ze stosu N-tej pozycji licz±c od lewej strony listy\n"
+" \twypisywanej przez `dirs', pocz±wszy od zera. Na przyk³ad: `popd +0'\n"
+" \tusuwa pierwszy katalog, `popd +1' usuwa drugi.\n"
+" \n"
+" -N\tUsuniêcie ze stosu N-tej pozycji licz±c od prawej strony listy\n"
+" \twypisywanej przez `dirs', pocz±wszy od zera. Na przyk³ad: `popd -0'\n"
+" \tusuwa pierwszy katalog, `popd -1' usuwa drugi.\n"
+" \n"
+" -n\tPominiêcie zmiany katalogu podczas usuwania katalogów ze stosu tak,\n"
+" \t¿e zmieniany jest tylko stos.\n"
+" \n"
+" Zawarto¶æ stosu katalogów mo¿na zobaczyæ za pomoc± polecenia `dirs'."
+
+#: builtins.c:1818
+#, fuzzy
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Wypisanie listy aktualnie pamiêtanych katalogów. Katalogi umieszczane s±\n"
+" na li¶cie za pomoc± polecenia `pushd'; mo¿na cofaæ siê w obrêbie listy\n"
+" za pomoc± polecenia `popd'.\n"
+" \n"
+" Znacznik -l oznacza, ¿e `dirs' nie powinno wypisywaæ katalogów w "
+"skróconej\n"
+" wersji, tzn. wzglêdem katalogu domowego wywo³uj±cego. Oznacza to, ¿e\n"
+" `~/bin' mo¿e zostaæ wypisany jako `/homes/bfox/bin'. Znacznik -v "
+"powoduje,\n"
+" ¿e `dirs' wypisuje katalogi w osobnych wierszach, poprzedzaj±c ka¿dy\n"
+" z nich jego pozycj± na stosie. Znacznik -p powoduje to samo, lecz bez\n"
+" podawania pozycji na stosie. Znacznik -c powoduje wyczyszczenie stosu\n"
+" katalogów poprzez usuniêcie wszystkich jego elementów.\n"
+" \n"
+" +N\tWypisanie N-tej pozycji licz±c od lewej strony listy wypisywanej\n"
+" \tprzez dirs wywo³ane bez opcji, pocz±wszy od zera.\n"
+" \n"
+" -N\tWypisanie N-tej pozycji licz±c od prawej strony listy wypisywanej\n"
+" \tprzez dirs wywo³ane bez opcji, pocz±wszy od zera."
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+#, fuzzy
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Wypisanie mo¿liwych uzupe³nieñ w zale¿no¶ci od opcji. Przeznaczone do\n"
+" wykorzystania w funkcjach pow³oki generuj±cych mo¿liwe uzupe³nienia.\n"
+" Gdy podany jest opcjonalny argument WORD, generowane s± uzupe³nienia\n"
+" pasuj±ce do WORD."
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: nie mo¿na ponownie przydzieliæ %lu bajtów (przydzielono %lu)"
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: nie mo¿na przydzieliæ %lu bajtów"
+
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: %s:%d: nie mo¿na ponownie przydzieliæ %lu bajtów (przydzielono %"
+#~ "lu)"
+
+#~ msgid " "
+#~ msgstr " "
+
+# tekst wielowierszowy!
+#
+#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR,"
+#~ msgstr "Bez EXPR zwraca \"$line $filename\". Z EXPR zwraca"
+
+#~ msgid "returns \"$line $subroutine $filename\"; this extra information"
+#~ msgstr "\"$line $subroutine $filename\"; te dodatkowe informacje"
+
+#~ msgid "can be used used to provide a stack trace."
+#~ msgstr "mog± s³u¿yæ umo¿liwieniu ¶ledzenia stosu."
+
+# tekst wielowierszowy!
+#
+#~ msgid ""
+#~ "The value of EXPR indicates how many call frames to go back before the"
+#~ msgstr "Warto¶æ EXPR okre¶la o ile ramek wywo³añ wzglêdem bie¿±cej ramki"
+
+#~ msgid "current one; the top frame is frame 0."
+#~ msgstr "nale¿y siê cofn±æ; ramka na szczycie stosu ma numer 0."
+
+#~ msgid "%s: invalid number"
+#~ msgstr "%s: nieprawid³owa liczba"
+
+#~ msgid "Shell commands matching keywords `"
+#~ msgstr "Polecenia pow³oki pasuj±ce do s³ów kluczowych `"
+
+#~ msgid "Display the list of currently remembered directories. Directories"
+#~ msgstr "Wy¶wietla listê aktualnie pamiêtanych katalogów. Katalogi"
+
+#~ msgid "find their way onto the list with the `pushd' command; you can get"
+#~ msgstr "umieszczane s± na li¶cie za pomoc± polecenia `pushd'; cofanie siê"
+
+#~ msgid "back up through the list with the `popd' command."
+#~ msgstr "na li¶cie odbywa siê za pomoc± polecenia `popd'."
+
+#~ msgid ""
+#~ "The -l flag specifies that `dirs' should not print shorthand versions"
+#~ msgstr "Opcja -l oznacza, ¿e `dirs' nie powinno wypisywaæ skróconej wersji"
+
+#~ msgid ""
+#~ "of directories which are relative to your home directory. This means"
+#~ msgstr ""
+#~ "tych katalogów, które odnosz± siê do katalogu domowego. Oznacza to, ¿e"
+
+#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag"
+#~ msgstr ""
+#~ "`~/bin' mo¿e zostaæ wypisane jako `/homes/bfox/bin'. Opcja -v powoduje,"
+
+#~ msgid "causes `dirs' to print the directory stack with one entry per line,"
+#~ msgstr ""
+#~ "¿e `dirs' wypisuje listê katalogów w osobnych wierszach, poprzedzaj±c"
+
+#~ msgid ""
+#~ "prepending the directory name with its position in the stack. The -p"
+#~ msgstr ""
+#~ "nazwy katalogów ich numerami pozycji na stosie. Opcja -p robi to samo,"
+
+#~ msgid "flag does the same thing, but the stack position is not prepended."
+#~ msgstr "ale nie poprzedza numerami pozycji."
+
+#~ msgid ""
+#~ "The -c flag clears the directory stack by deleting all of the elements."
+#~ msgstr "Opcja -c czy¶ci stos katalogów usuwaj±c wszystkie jego elementy."
+
+#~ msgid ""
+#~ "+N displays the Nth entry counting from the left of the list shown by"
+#~ msgstr "+N wypisuje N-t± z kolei pozycjê od lewej w odniesieniu do listy"
+
+#~ msgid " dirs when invoked without options, starting with zero."
+#~ msgstr " wypisywanej przy wywo³aniu dirs bez opcji, licz±c od zera."
+
+#~ msgid ""
+#~ "-N displays the Nth entry counting from the right of the list shown by"
+#~ msgstr "-N wypisuje N-t± z kolei pozycjê od prawej w odniesieniu do listy"
+
+#~ msgid "Adds a directory to the top of the directory stack, or rotates"
+#~ msgstr "Dodaje katalog na wierzcho³ku stosu lub wykonuje rotacjê stosu,"
+
+#~ msgid "the stack, making the new top of the stack the current working"
+#~ msgstr "czyni±c jego wierzcho³kiem aktualny katalog bie¿±cy."
+
+#~ msgid "directory. With no arguments, exchanges the top two directories."
+#~ msgstr "Bez argumentów zamienia dwa katalogi po³o¿one najwy¿ej na stosie."
+
+#~ msgid "+N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "+N Wykonuje rotacjê stosu tak, ¿e N-ty katalog (licz±c od"
+
+#~ msgid " from the left of the list shown by `dirs', starting with"
+#~ msgstr " lewej w odniesieniu do listy wypisywanej przez `dirs',"
+
+#~ msgid " zero) is at the top."
+#~ msgstr " pocz±wszy od zera) znajdzie siê na wierzcho³ku."
+
+#~ msgid "-N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "-N Wykonuje rotacjê stosu tak, ¿e N-ty katalog (licz±c od"
+
+#~ msgid " from the right of the list shown by `dirs', starting with"
+#~ msgstr " prawej w odniesieniu do listy wypisywanej przez `dirs',"
+
+#~ msgid "-n suppress the normal change of directory when adding directories"
+#~ msgstr "-n wy³±cza zwyk³± zmianê katalogu przy umieszczaniu katalogów na"
+
+#~ msgid " to the stack, so only the stack is manipulated."
+#~ msgstr " stosie tak, ¿e zmieniany jest tylko stos."
+
+#~ msgid "dir adds DIR to the directory stack at the top, making it the"
+#~ msgstr "dir umieszcza DIR na wierzcho³ku stosu katalogów, czyni±c go"
+
+#~ msgid " new current working directory."
+#~ msgstr " nowym katalogiem bie¿±cym."
+
+#~ msgid "You can see the directory stack with the `dirs' command."
+#~ msgstr "Stos katalogów mo¿na zobaczyæ za pomoc± polecenia `dirs'."
+
+#~ msgid "Removes entries from the directory stack. With no arguments,"
+#~ msgstr "Usuwa pozycje ze stosu katalogów. Bez argumentów, usuwa ze"
+
+#~ msgid "removes the top directory from the stack, and cd's to the new"
+#~ msgstr "stosu najwy¿szy katalog oraz wykonuje cd do nowego najwy¿szego"
+
+#~ msgid "top directory."
+#~ msgstr "katalogu."
+
+#~ msgid "+N removes the Nth entry counting from the left of the list"
+#~ msgstr "+N usuwa N-t± z kolei pozycjê od lewej w odniesieniu do listy"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'"
+#~ msgstr " wypisywanej przez `dirs', licz±c od zera. Np.: `popd +0'"
+
+#~ msgid " removes the first directory, `popd +1' the second."
+#~ msgstr " usuwa pierwszy katalog a `popd +1' usuwa drugi."
+
+#~ msgid "-N removes the Nth entry counting from the right of the list"
+#~ msgstr "-N usuwa N-t± z kolei pozycjê od prawej w odniesieniu do listy"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'"
+#~ msgstr " wypisywanej przez `dirs', licz±c od zera. Np.: `popd -0'"
+
+#~ msgid " removes the last directory, `popd -1' the next to last."
+#~ msgstr " usuwa ostatni katalog a `popd -1' usuwa przedostatni."
+
+#~ msgid ""
+#~ "-n suppress the normal change of directory when removing directories"
+#~ msgstr "-n wy³±cza zwyk³± zmianê katalogu przy usuwaniu katalogów ze"
+
+#~ msgid " from the stack, so only the stack is manipulated."
+#~ msgstr " stosu tak, ¿e zmieniany jest tylko stos."
+
+#~ msgid "allocated"
+#~ msgstr "przydzielony"
+
+#~ msgid "freed"
+#~ msgstr "zwolniony"
+
+#~ msgid "requesting resize"
+#~ msgstr "wymagaj±cy zmiany rozmiaru"
+
+#~ msgid "just resized"
+#~ msgstr "o w³a¶nie zmienionym rozmiarze"
+
+#~ msgid "bug: unknown operation"
+#~ msgstr "b³±d: nieznana operacja"
+
+#~ msgid "malloc: watch alert: %p %s "
+#~ msgstr "malloc: alarm stra¿nka: %p %s "
+
+#~ msgid ""
+#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n"
+#~ " break N levels."
+#~ msgstr ""
+#~ "Wyj¶cie z wnêtrza pêtli FOR, WHILE lub UNTIL. Je¶li podano N, "
+#~ "przerywanych\n"
+#~ " jest N poziomów pêtli."
+
+#~ msgid ""
+#~ "Run a shell builtin. This is useful when you wish to rename a\n"
+#~ " shell builtin to be a function, but need the functionality of the\n"
+#~ " builtin within the function itself."
+#~ msgstr ""
+#~ "Uruchomienie wewnêtrznego polecenia pow³oki. Przydatne przy zastêpowaniu\n"
+#~ " polecenia pow³oki funkcj±, wewn±trz której wymagane jest wywo³anie "
+#~ "tego\n"
+#~ " polecenia pow³oki."
+
+#~ msgid ""
+#~ "Print the current working directory. With the -P option, pwd prints\n"
+#~ " the physical directory, without any symbolic links; the -L option\n"
+#~ " makes pwd follow symbolic links."
+#~ msgstr ""
+#~ "Wypisanie bia¿±cego katalogu roboczego. Z opcj± -P, pwd wypisuje "
+#~ "katalog\n"
+#~ " fizyczny, bez dowi±zañ symbolicznych; opcja -L powoduje, ¿e pwd "
+#~ "pod±¿a\n"
+#~ " za dowi±zaniami symbolicznymi."
+
+#~ msgid "Return a successful result."
+#~ msgstr "Zwracany jest pomy¶lny wynik zakoñczenia."
+
+#~ msgid ""
+#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell\n"
+#~ " function called `ls', and you wish to call the command `ls', you can\n"
+#~ " say \"command ls\". If the -p option is given, a default value is "
+#~ "used\n"
+#~ " for PATH that is guaranteed to find all of the standard utilities. "
+#~ "If\n"
+#~ " the -V or -v option is given, a string is printed describing "
+#~ "COMMAND.\n"
+#~ " The -V option produces a more verbose description."
+#~ msgstr ""
+#~ "Uruchomienie COMMAND z argumentami ARGS ignoruj±c funkcje pow³oki. Je¶li\n"
+#~ " istnieje funkcja pow³oki o nazwie `ls', a istnieje potrzeba "
+#~ "wywo³ania\n"
+#~ " polecenia `ls', mo¿na napisaæ \"command ls\". Je¶li podano opcje -p,\n"
+#~ " u¿ywana jest domy¶lna warto¶æ PATH, co zapewnia odnalezienie "
+#~ "wszystkich\n"
+#~ " standardowych narzêdzi. Je¶li podano opcjê -V lub -v, wypisywany "
+#~ "jest\n"
+#~ " napis opisuj±cy COMMAND. Opcja -V generuje obszerniejszy opis."
+
+#~ msgid "Obsolete. See `declare'."
+#~ msgstr "Przestarza³e. Patrz `declare'."
+
+#~ msgid ""
+#~ "Create a local variable called NAME, and give it VALUE. LOCAL\n"
+#~ " can only be used within a function; it makes the variable NAME\n"
+#~ " have a visible scope restricted to that function and its children."
+#~ msgstr ""
+#~ "Utworzenie zmiennej lokalnej o nazwie NAME, i nadanie jej warto¶ci "
+#~ "VALUE.\n"
+#~ " LOCAL mo¿na u¿yæ jedynie wewn±trz funkcji; powoduje, ¿e zakres\n"
+#~ " widoczno¶ci zmiennej NAME jest ograniczony do tej funkcji i jej\n"
+#~ " procesów potomnych."
+
+#~ msgid ""
+#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed."
+#~ msgstr ""
+#~ "Wypisanie argumentów. Gdy podano -n, koñcowy znak nowego wiersza jest "
+#~ "pomijany."
+
+#~ msgid ""
+#~ "Enable and disable builtin shell commands. This allows\n"
+#~ " you to use a disk command which has the same name as a shell\n"
+#~ " builtin without specifying a full pathname. If -n is used, the\n"
+#~ " NAMEs become disabled; otherwise NAMEs are enabled. For example,\n"
+#~ " to use the `test' found in $PATH instead of the shell builtin\n"
+#~ " version, type `enable -n test'. On systems supporting dynamic\n"
+#~ " loading, the -f option may be used to load new builtins from the\n"
+#~ " shared object FILENAME. The -d option will delete a builtin\n"
+#~ " previously loaded with -f. If no non-option names are given, or\n"
+#~ " the -p option is supplied, a list of builtins is printed. The\n"
+#~ " -a option means to print every builtin with an indication of whether\n"
+#~ " or not it is enabled. The -s option restricts the output to the "
+#~ "POSIX.2\n"
+#~ " `special' builtins. The -n option displays a list of all disabled "
+#~ "builtins."
+#~ msgstr ""
+#~ "W³±czenie i wy³±czenie wewnêtrznych poleceñ pow³oki. Pozwala to u¿ywaæ\n"
+#~ " programu zewnêtrznego o tej samej nazwie co polecenie wewnêtrzne "
+#~ "pow³oki\n"
+#~ " bez podawania pe³nej ¶cie¿ki. Je¶li podano -n, polecenia o nazwach\n"
+#~ " NAME ... s± wy³±czane; w przeciwnym przypadku polecenia o tych "
+#~ "nazwach\n"
+#~ " s± w³±czane. Np., aby u¿ywaæ zamiast wewnêtrznego polecenia `test'\n"
+#~ " polecenia znalezionego w $PATH, nale¿y napisaæ `nable -n test'.\n"
+#~ " W systemach wspieraj±cych ³adowanie dynamiczne mo¿na pos³u¿yc siê "
+#~ "opcj±\n"
+#~ " -f do wczytania nowej listy poleceñ wewnêtrznych ze wspó³dzielonego\n"
+#~ " obiektu FILENAME. Opcja -d usuwa polecenia wewnêtrzne wczytane "
+#~ "wcze¶niej\n"
+#~ " za pomoc± -f. W przypadku nie podania ¿adnej nazwy lub podania opcji -"
+#~ "p,\n"
+#~ " wypisywana jest lista poleceñ wewnêtrznych. Opcja -a oznacza "
+#~ "wypisanie\n"
+#~ " wszystkich poleceñ wewnêtrznych wraz z informacj± o ich w³±czeniu "
+#~ "bad¼\n"
+#~ " wy³±czeniu. Opcja -s ogranicza wypisywanie do poleceñ `specjalnych'\n"
+#~ " zgodnych z POSIX.2. Opcja -n powoduje wypisanie listy wszystkich\n"
+#~ " wy³±czonych poleceñ."
+
+#~ msgid ""
+#~ "Read ARGs as input to the shell and execute the resulting command(s)."
+#~ msgstr ""
+#~ "Czytanie argumentów jako danych wej¶ciowych pow³oki i uruchomienie tak\n"
+#~ " powsta³ego polecenia (powsta³ych poleceñ)."
+
+#~ msgid ""
+#~ "Exec FILE, replacing this shell with the specified program.\n"
+#~ " If FILE is not specified, the redirections take effect in this\n"
+#~ " shell. If the first argument is `-l', then place a dash in the\n"
+#~ " zeroth arg passed to FILE, as login does. If the `-c' option\n"
+#~ " is supplied, FILE is executed with a null environment. The `-a'\n"
+#~ " option means to make set argv[0] of the executed process to NAME.\n"
+#~ " If the file cannot be executed and the shell is not interactive,\n"
+#~ " then the shell exits, unless the shell option `execfail' is set."
+#~ msgstr ""
+#~ "Uruchomienie FILE, zastêpuj±c bie¿±c± pow³okê podanym programem.\n"
+#~ " Gdy nie podano FILE, przekierowanie dotyczy bie¿±cej pow³oki. Je¶li\n"
+#~ " pierwszym argumentem jest `-l', to zerowym argumentem przekazywanym\n"
+#~ " do FILE jest my¶lnik tak, jak to robi login. Gdy podano opcjê `-c',\n"
+#~ " FILE jest uruchamiane z pustym ¶rodowiskiem. Opcja `-a' oznacza\n"
+#~ " ustawienie argv[0] uruchomionego procesu na NAME. Je¶li pliku nie\n"
+#~ " mo¿na uruchomiæ a pow³oka nie jest interakcyjna, to koñczy ona\n"
+#~ " dzia³anie, chyba ¿e ustawiono opcjê pow³oki `execfail'."
+
+#~ msgid "Logout of a login shell."
+#~ msgstr "Wylogowanie z pow³oki logowania"
+
+#~ msgid ""
+#~ "For each NAME, the full pathname of the command is determined and\n"
+#~ " remembered. If the -p option is supplied, PATHNAME is used as the\n"
+#~ " full pathname of NAME, and no path search is performed. The -r\n"
+#~ " option causes the shell to forget all remembered locations. The -d\n"
+#~ " option causes the shell to forget the remembered location of each "
+#~ "NAME.\n"
+#~ " If the -t option is supplied the full pathname to which each NAME\n"
+#~ " corresponds is printed. If multiple NAME arguments are supplied "
+#~ "with\n"
+#~ " -t, the NAME is printed before the hashed full pathname. The -l "
+#~ "option\n"
+#~ " causes output to be displayed in a format that may be reused as "
+#~ "input.\n"
+#~ " If no arguments are given, information about remembered commands is "
+#~ "displayed."
+#~ msgstr ""
+#~ "Dla ka¿dego NAME, okre¶lana i zapamiêtywana jest pe³na ¶cie¿ka "
+#~ "polecenia.\n"
+#~ " Gdy podano opcjê -p, to jako pe³na ¶cie¿ka dla NAME jest u¿ywane\n"
+#~ " PATHNAME i nie odbywa siê poszukiwanie ¶cie¿ki. Opcja -r powoduje,\n"
+#~ " ¿e pow³oka zapomina wszystkie pamiêtane po³o¿enia. Opcja -d "
+#~ "powoduje,\n"
+#~ " ¿e pow³oka zapomina pamiêtane po³o¿enia wszystkich NAME. Podanie "
+#~ "opcji\n"
+#~ " -t powoduje wypisanie pe³nej ¶cie¿ki odpowiadaj±cej ka¿demu NAME.\n"
+#~ " Gdy przy -t podanych zostanie wiele NAME, s± one wypisywane przed\n"
+#~ " zapamiêtan± pe³n± ¶cie¿k±. Opcja -l powoduje wypisanie danych w "
+#~ "postaci,\n"
+#~ " która mo¿e s³u¿yæ jako dane wej¶ciowe. W przypadku nie podania "
+#~ "¿adnych\n"
+#~ " argumentów, wypisywane s± informacje o pamiêtanych poleceniach."
+
+#~ msgid ""
+#~ "Display helpful information about builtin commands. If PATTERN is\n"
+#~ " specified, gives detailed help on all commands matching PATTERN,\n"
+#~ " otherwise a list of the builtins is printed. The -s option\n"
+#~ " restricts the output for each builtin command matching PATTERN to\n"
+#~ " a short usage synopsis."
+#~ msgstr ""
+#~ "Wypisanie pomocnych informacji o wbudowanych poleceniach. Gdy podano\n"
+#~ " PATTERN, wypisywane s± szczegó³owe informacje pomocnicze dla\n"
+#~ " wszystkich poleceñ pasuj±cych do wzorca PATTERN, a w przeciwnym\n"
+#~ " przypadku wypisywana jest tylko lista poleceñ wewnêtrznych. Opcja -s\n"
+#~ " ogranicza opis ka¿dego z poleceñ wewnêtrznych pasuj±cych do wzorca\n"
+#~ " PATTERN do krótkiego opisu sk³adni."
+
+#~ msgid ""
+#~ "By default, removes each JOBSPEC argument from the table of active jobs.\n"
+#~ " If the -h option is given, the job is not removed from the table, but "
+#~ "is\n"
+#~ " marked so that SIGHUP is not sent to the job if the shell receives a\n"
+#~ " SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove "
+#~ "all\n"
+#~ " jobs from the job table; the -r option means to remove only running "
+#~ "jobs."
+#~ msgstr ""
+#~ "Domy¶lnie, usuwanie wszystkich argumentów JOBSPEC z tablicy aktywnych "
+#~ "zadañ.\n"
+#~ " Przy podaniu opcji -h, zadanie nie jest usuwane z tablicy ale, "
+#~ "oznaczane\n"
+#~ " w ten sposób, ¿e nie jest do niego wysy³any SIGHUP, gdy pow³oka "
+#~ "otrzyma\n"
+#~ " SIGHUP. Opcja -a, gdy nie jest podane JOBSPEC, oznacza usuniêcie\n"
+#~ " wszystkich zadañ z tablicy zadañ; opcja -r oznacza usuniêcie tylko\n"
+#~ " dzia³aj±cych zadañ."
+
+#~ msgid ""
+#~ "Causes a function to exit with the return value specified by N. If N\n"
+#~ " is omitted, the return status is that of the last command."
+#~ msgstr ""
+#~ "Powoduje zakoñczenie funkcji z kodem powrotu okre¶lonym przez N. Gdy N\n"
+#~ " zostanie pominiête, kodem powrotu jest kod powrotu ostatniego "
+#~ "polecenia."
+
+#~ msgid ""
+#~ "For each NAME, remove the corresponding variable or function. Given\n"
+#~ " the `-v', unset will only act on variables. Given the `-f' flag,\n"
+#~ " unset will only act on functions. With neither flag, unset first\n"
+#~ " tries to unset a variable, and if that fails, then tries to unset a\n"
+#~ " function. Some variables cannot be unset; also see readonly."
+#~ msgstr ""
+#~ "Dla ka¿dego NAME, usuwana jest odpowiednia zmienna lub funkcja. Po "
+#~ "podaniu\n"
+#~ " `-v' unset dzia³a tylko dla zmiennych. Po podaniu znacznika`-f' "
+#~ "unset\n"
+#~ " dzia³a tylko dla funkcji. Bez ¿adnego ze znaczników, unset najpierw\n"
+#~ " próbuje unicestwiæ zmienn±, a gdy to siê nie uda, próbuje unicestwiæ\n"
+#~ " funkcjê. Niektórych zmiennych nie mo¿na unicestwiæ; patrz tak¿e "
+#~ "readonly."
+
+#~ msgid ""
+#~ "NAMEs are marked for automatic export to the environment of\n"
+#~ " subsequently executed commands. If the -f option is given,\n"
+#~ " the NAMEs refer to functions. If no NAMEs are given, or if `-p'\n"
+#~ " is given, a list of all names that are exported in this shell is\n"
+#~ " printed. An argument of `-n' says to remove the export property\n"
+#~ " from subsequent NAMEs. An argument of `--' disables further option\n"
+#~ " processing."
+#~ msgstr ""
+#~ "Wszystkie NAME s± oznaczane jako eksportowane automatycznie do "
+#~ "¶rodowiska\n"
+#~ " kolenjno uruchamianych poleceñ. Je¶li zostanie podana opcja -f, to "
+#~ "NAME\n"
+#~ " oznaczaj± funkcje. W przypadku nie podania ¿adnego NAME lub podania "
+#~ "opcji\n"
+#~ " `-p', wypisywana jest lista wszystkich eksportowanych z tej pow³oki "
+#~ "nazw.\n"
+#~ " Argument `-n' oznacza, ¿e nale¿y usuni±æ w³asno¶æ eksportowania\n"
+#~ " z wszystkich nastêpnych NAME. Argument `--' wy³±cza przetwarzanie\n"
+#~ " dalszych opcji."
+
+#~ msgid ""
+#~ "The given NAMEs are marked readonly and the values of these NAMEs may\n"
+#~ " not be changed by subsequent assignment. If the -f option is given,\n"
+#~ " then functions corresponding to the NAMEs are so marked. If no\n"
+#~ " arguments are given, or if `-p' is given, a list of all readonly "
+#~ "names\n"
+#~ " is printed. The `-a' option means to treat each NAME as\n"
+#~ " an array variable. An argument of `--' disables further option\n"
+#~ " processing."
+#~ msgstr ""
+#~ "Oznaczanie podanych NAME jako tylko do odczytu tak, ¿e warto¶ci tych "
+#~ "NAME\n"
+#~ " nie mog± zostaæ zmienione przez pó¿niejsze przypisania. Gdy podana\n"
+#~ " zostanie opcja -f, odpowiednio oznaczane s± równie¿ funkcje "
+#~ "odpowiadaj±ce\n"
+#~ " NAME. Gdy nie podano argumentów lub podano `-p', wypisywana jest "
+#~ "lista\n"
+#~ " wszystkich nazw tylko do odczytu. Opcja `-a' oznacza, ¿e NAME nale¿y\n"
+#~ " traktowaæ jak zmienne tablicowe. Argument `--' wy³±cza przetwarzanie\n"
+#~ " dalszych opcji."
+
+#~ msgid ""
+#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is\n"
+#~ " not given, it is assumed to be 1."
+#~ msgstr ""
+#~ "Przemianowanie parametrów pozycyjnych od $N+1 ... na $1 ... Je¶li N nie\n"
+#~ " zostanie podane, zak³ada siê, ¿e jest równe 1."
+
+#~ msgid ""
+#~ "Suspend the execution of this shell until it receives a SIGCONT\n"
+#~ " signal. The `-f' if specified says not to complain about this\n"
+#~ " being a login shell if it is; just suspend anyway."
+#~ msgstr ""
+#~ "Zawieszenie wykonania bie¿±cej pow³oki do czasu otrzymania sygna³u "
+#~ "SIGCONT.\n"
+#~ " Podanie `-f' oznacza, ¿e pow³oka, bêd±ca pow³ok± logowania, nie "
+#~ "powinna\n"
+#~ " wobec tego protestowaæ, lecz zawiesiæ siê pomimo to."
+
+#~ msgid ""
+#~ "Print the accumulated user and system times for processes run from\n"
+#~ " the shell."
+#~ msgstr ""
+#~ "Wypisywanie ³±cznych czasów u¿ytkownika i systemu dla procesów "
+#~ "uruchomionych\n"
+#~ " z pow³oki."
+
+#~ msgid ""
+#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if\n"
+#~ " `-S' is supplied, the current value of the mask is printed. The `-"
+#~ "S'\n"
+#~ " option makes the output symbolic; otherwise an octal number is "
+#~ "output.\n"
+#~ " If `-p' is supplied, and MODE is omitted, the output is in a form\n"
+#~ " that may be used as input. If MODE begins with a digit, it is\n"
+#~ " interpreted as an octal number, otherwise it is a symbolic mode "
+#~ "string\n"
+#~ " like that accepted by chmod(1)."
+#~ msgstr ""
+#~ "Ustawienie maski dla plików tworzonych przez u¿ytkownika na MODE. Gdy "
+#~ "MODE\n"
+#~ " zostanie pominiête lub gdy podane zostanie `-S', wypisywana jest "
+#~ "bie¿±ca\n"
+#~ " warto¶c maski. Opcja `-S' powoduje wyprowadzanie symboliczne; w "
+#~ "przeciwnym\n"
+#~ " przypadku wyprowadzana jest liczba ósemkowa. Gdy podane zostanie `-"
+#~ "p'\n"
+#~ " a MODE zostanie pominiête, wyprowadzane s± dane w takim formacie, "
+#~ "jaki\n"
+#~ " powinny mieæ dane wej¶ciowe. Gdy MODE zaczyna siê od cyfry, jest\n"
+#~ " interpretowane jako liczba ósemkowa, w przeciwnym razie jest "
+#~ "³añcuchem\n"
+#~ " trybu w postaci symbolicznej, podobnej do akceptowanej przez chmod(1)."
+
+#~ msgid ""
+#~ "Wait for the specified process and report its termination status. If\n"
+#~ " N is not given, all currently active child processes are waited for,\n"
+#~ " and the return code is zero. N is a process ID; if it is not given,\n"
+#~ " all child processes of the shell are waited for."
+#~ msgstr ""
+#~ "Oczekiwanie na podany proces i zg³oszenie jego statusu zakoñczenia. Gdy "
+#~ "nie\n"
+#~ " zostanie podane N, oczekiwanie dotyczy wszystkich aktualnie "
+#~ "aktywnych\n"
+#~ " procesów potomnych, a kodem powrotu jest zero. N jest PID; gdy nie\n"
+#~ " zostanie podane, oczekiwanie dotyczy wszystkich procesów potomnych\n"
+#~ " pow³oki."
+
+#~ msgid ""
+#~ "Create a simple command invoked by NAME which runs COMMANDS.\n"
+#~ " Arguments on the command line along with NAME are passed to the\n"
+#~ " function as $0 .. $n."
+#~ msgstr ""
+#~ "Utworzenie prostego polecenia wywo³ywanego przez NAME, które uruchamia\n"
+#~ " polecenia COMMANDS. Argumenty z wiersza poleceñ podane po NAME s±\n"
+#~ " przekazywane do funkcji jako $0 .. $n."
+
+#~ msgid ""
+#~ "For each NAME, specify how arguments are to be completed.\n"
+#~ " If the -p option is supplied, or if no options are supplied, "
+#~ "existing\n"
+#~ " completion specifications are printed in a way that allows them to "
+#~ "be\n"
+#~ " reused as input. The -r option removes a completion specification "
+#~ "for\n"
+#~ " each NAME, or, if no NAMEs are supplied, all completion "
+#~ "specifications."
+#~ msgstr ""
+#~ "Okre¶lenie, jak argumenty maja byc uzupe³niane dla poszczególnych NAME.\n"
+#~ " Gdy podano opcjê -p, lub nie podano ¿adnych opcji, wypisywane s±\n"
+#~ " istniej±ce specyfikacje uzupe³nieñ w postaci, umo¿liwiaj±cej ich "
+#~ "ponowne\n"
+#~ " u¿ycie jako danych wej¶ciowych. Opcja -r powoduje usuniêcie "
+#~ "specyfikacji\n"
+#~ " uzupe³nieñ dla wszystkich NAME lub, gdy nie podano ¿adnego NAME,\n"
+#~ " wszystkich specyfikacji uzupe³nieñ."
diff --git a/po/pt_BR.gmo b/po/pt_BR.gmo
new file mode 100644
index 0000000..9ac9c43
--- /dev/null
+++ b/po/pt_BR.gmo
Binary files differ
diff --git a/po/pt_BR.po b/po/pt_BR.po
new file mode 100644
index 0000000..e7e42cf
--- /dev/null
+++ b/po/pt_BR.po
@@ -0,0 +1,6302 @@
+# bash: Translation to Brazilian Portuguese (pt_BR)
+# Copyright (C) 2002 Free Software Foundation, Inc.
+# Halley Pacheco de Oliveira <halleypo@ig.com.br>, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bash 2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2002-05-08 13:50GMT -3\n"
+"Last-Translator: Halley Pacheco de Oliveira <halleypo@ig.com.br>\n"
+"Language-Team: Brazilian Portuguese <ldp-br@bazar.conectiva.com.br>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 0.9.5\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "índice da matriz (array) incorreto"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr ""
+
+#: arrayfunc.c:480
+#, fuzzy, c-format
+msgid "%s: invalid associative array key"
+msgstr "%c%c: opção incorreta"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: impossível atribuir a índice não numérico"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: impossível criar: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr ""
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr ""
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr ""
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "%c%c: opção incorreta"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr ""
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr ""
+
+#: builtins/bind.def:245
+#, fuzzy, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: impossível criar: %s"
+
+#: builtins/bind.def:260
+#, fuzzy, c-format
+msgid "`%s': cannot unbind"
+msgstr "%s: comando não encontrado"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, fuzzy, c-format
+msgid "`%s': unknown function name"
+msgstr "%s: função somente para leitura"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr ""
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr ""
+
+#: builtins/break.def:77 builtins/break.def:117
+#, fuzzy
+msgid "loop count"
+msgstr "logout"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr ""
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr ""
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr ""
+
+#: builtins/common.c:101
+#, fuzzy, c-format
+msgid "line %d: "
+msgstr "encaixe (slot) %3d: "
+
+#: builtins/common.c:139 error.c:261
+#, fuzzy, c-format
+msgid "warning: "
+msgstr "escrevendo"
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr ""
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "número excessivo de argumentos"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, fuzzy, c-format
+msgid "%s: option requires an argument"
+msgstr "a opção requer um argumento: -"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr ""
+
+#: builtins/common.c:205
+#, fuzzy, c-format
+msgid "%s: not found"
+msgstr "%s: comando não encontrado"
+
+#: builtins/common.c:214 shell.c:795
+#, fuzzy, c-format
+msgid "%s: invalid option"
+msgstr "%c%c: opção incorreta"
+
+#: builtins/common.c:221
+#, fuzzy, c-format
+msgid "%s: invalid option name"
+msgstr "%c%c: opção incorreta"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, fuzzy, c-format
+msgid "`%s': not a valid identifier"
+msgstr "`%s' não é um identificador válido"
+
+#: builtins/common.c:238
+#, fuzzy
+msgid "invalid octal number"
+msgstr "número do sinal incorreto"
+
+#: builtins/common.c:240
+#, fuzzy
+msgid "invalid hex number"
+msgstr "número do sinal incorreto"
+
+#: builtins/common.c:242 expr.c:1256
+#, fuzzy
+msgid "invalid number"
+msgstr "número do sinal incorreto"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr ""
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr ""
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: a variável permite somente leitura"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr ""
+
+#: builtins/common.c:272 builtins/common.c:274
+#, fuzzy
+msgid "argument"
+msgstr "esperado argumento"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr ""
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr ""
+
+#: builtins/common.c:290
+#, fuzzy, c-format
+msgid "%s: no job control"
+msgstr "nenhum controle de trabalho nesta `shell'"
+
+#: builtins/common.c:292
+#, fuzzy
+msgid "no job control"
+msgstr "nenhum controle de trabalho nesta `shell'"
+
+#: builtins/common.c:302
+#, fuzzy, c-format
+msgid "%s: restricted"
+msgstr "%s: o trabalho terminou"
+
+#: builtins/common.c:304
+#, fuzzy
+msgid "restricted"
+msgstr "Terminado"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr ""
+
+#: builtins/common.c:321
+#, fuzzy, c-format
+msgid "write error: %s"
+msgstr "erro de `pipe': %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr ""
+
+#: builtins/common.c:629 builtins/common.c:631
+#, fuzzy, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: Redirecionamento ambíguo"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr ""
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr ""
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr ""
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr ""
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr ""
+
+#: builtins/declare.def:122
+#, fuzzy
+msgid "can only be used in a function"
+msgstr "somente pode ser usado dentro de funções; faz com que o escopo visível"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr ""
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: função somente para leitura"
+
+#: builtins/declare.def:468
+#, fuzzy, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "$%s: impossível atribuir desta maneira"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr ""
+
+#: builtins/enable.def:312
+#, fuzzy, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "impossível abrir o `named pipe' %s para %s: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr ""
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr ""
+
+#: builtins/enable.def:474
+#, fuzzy, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: impossível criar: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: é um diretório"
+
+#: builtins/evalfile.c:139
+#, fuzzy, c-format
+msgid "%s: not a regular file"
+msgstr "%s: impossível executar o arquivo binário"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr ""
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: impossível executar o arquivo binário"
+
+#: builtins/exec.def:212
+#, fuzzy, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: impossível criar: %s"
+
+#: builtins/exit.def:65
+#, fuzzy, c-format
+msgid "logout\n"
+msgstr "logout"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr ""
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr ""
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr ""
+
+#: builtins/fc.def:262
+#, fuzzy
+msgid "no command found"
+msgstr "%s: comando não encontrado"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr ""
+
+#: builtins/fc.def:370
+#, fuzzy, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: impossível criar: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr ""
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr ""
+
+#: builtins/getopt.c:110
+#, fuzzy, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "Opção ilegal: -"
+
+#: builtins/getopt.c:111
+#, fuzzy, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "a opção requer um argumento: -"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr ""
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr ""
+
+#: builtins/hash.def:244
+#, fuzzy, c-format
+msgid "hits\tcommand\n"
+msgstr "`r', o último comando seja executado novamente."
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] ""
+msgstr[1] ""
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+
+#: builtins/help.def:185
+#, fuzzy, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: impossível criar: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr ""
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr ""
+
+#: builtins/history.def:365
+#, fuzzy, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: esperado expressão de número inteiro"
+
+#: builtins/inlib.def:71
+#, fuzzy, c-format
+msgid "%s: inlib failed"
+msgstr "%s: esperado expressão de número inteiro"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr ""
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr ""
+
+#: builtins/kill.def:263
+#, fuzzy
+msgid "Unknown error"
+msgstr "Erro desconhecido %d"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "esperado uma expressão"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: variável não vinculada"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr ""
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr ""
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, fuzzy, c-format
+msgid "%s: invalid line count"
+msgstr "%c%c: opção incorreta"
+
+#: builtins/mapfile.def:277
+#, fuzzy, c-format
+msgid "%s: invalid array origin"
+msgstr "%c%c: opção incorreta"
+
+#: builtins/mapfile.def:294
+#, fuzzy, c-format
+msgid "%s: invalid callback quantum"
+msgstr "número do sinal incorreto"
+
+#: builtins/mapfile.def:326
+#, fuzzy
+msgid "empty array variable name"
+msgstr "%s: variável não vinculada"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr ""
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr ""
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr ""
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr ""
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr ""
+
+#: builtins/pushd.def:195
+#, fuzzy
+msgid "no other directory"
+msgstr "o novo diretório que ocupa o topo da pilha."
+
+#: builtins/pushd.def:462
+#, fuzzy
+msgid "<no current directory>"
+msgstr "\tnovo diretório atual de trabalho."
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr ""
+
+#: builtins/pushd.def:508
+#, fuzzy
+msgid "directory stack index"
+msgstr "Estouro na base da pilha de recursividade"
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr ""
+
+#: builtins/read.def:588
+#, fuzzy, c-format
+msgid "read error: %d: %s"
+msgstr "erro de `pipe': %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+
+#: builtins/set.def:768
+#, fuzzy
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "somente pode ser usado dentro de funções; faz com que o escopo visível"
+
+#: builtins/set.def:805
+#, fuzzy, c-format
+msgid "%s: cannot unset"
+msgstr "%s: impossível criar: %s"
+
+#: builtins/set.def:812
+#, fuzzy, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: impossível criar: %s"
+
+#: builtins/set.def:823
+#, fuzzy, c-format
+msgid "%s: not an array variable"
+msgstr "%s: variável não vinculada"
+
+#: builtins/setattr.def:186
+#, fuzzy, c-format
+msgid "%s: not a function"
+msgstr "%s: função somente para leitura"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+#, fuzzy
+msgid "shift count"
+msgstr "shift [n]"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr ""
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr ""
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr ""
+
+#: builtins/source.def:153
+#, fuzzy, c-format
+msgid "%s: file not found"
+msgstr "%s: comando não encontrado"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr ""
+
+#: builtins/suspend.def:111
+#, fuzzy
+msgid "cannot suspend a login shell"
+msgstr "Sair de uma shell de login."
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr ""
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr ""
+
+#: builtins/type.def:274
+#, fuzzy, c-format
+msgid "%s is a function\n"
+msgstr "%s: função somente para leitura"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr ""
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr ""
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr ""
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr ""
+
+#: builtins/ulimit.def:398
+#, fuzzy, c-format
+msgid "`%c': bad command"
+msgstr "%c%c: opção incorreta"
+
+#: builtins/ulimit.def:427
+#, fuzzy, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: impossível criar: %s"
+
+#: builtins/ulimit.def:453
+#, fuzzy
+msgid "limit"
+msgstr "Tempo limite de CPU excedido"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, fuzzy, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: impossível criar: %s"
+
+#: builtins/umask.def:118
+#, fuzzy
+msgid "octal number"
+msgstr "número do sinal incorreto"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr ""
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr ""
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr ""
+
+#: error.c:165
+#, fuzzy, c-format
+msgid "last command: %s\n"
+msgstr "`r', o último comando seja executado novamente."
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr ""
+
+#: error.c:406
+#, fuzzy
+msgid "unknown command error"
+msgstr "Erro desconhecido %d"
+
+#: error.c:407
+#, fuzzy
+msgid "bad command type"
+msgstr "usado como nome de um comando."
+
+#: error.c:408
+#, fuzzy
+msgid "bad connector"
+msgstr "conector incorreto `%d'"
+
+#: error.c:409
+#, fuzzy
+msgid "bad jump"
+msgstr "Desvio incorreto %d"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: variável não vinculada"
+
+#: eval.c:181
+#, fuzzy, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr ""
+"%ctempo limite de espera excedido aguardando entrada:\n"
+"fim automático da sessão\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr ""
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr ""
+
+#: execute_cmd.c:2075
+#, fuzzy
+msgid "pipe error"
+msgstr "erro de `pipe': %s"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: restrição: não é permitido especificar `/' em nomes de comandos"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: comando não encontrado"
+
+#: execute_cmd.c:4827
+#, fuzzy, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: é um diretório"
+
+#: execute_cmd.c:4976
+#, fuzzy, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "impossível duplicar fd (descritor de arquivo) %d para fd 0: %s"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "excedido o nível de recursividade da expressão"
+
+#: expr.c:265
+#, fuzzy
+msgid "recursion stack underflow"
+msgstr "Estouro na base da pilha de recursividade"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "erro de sintaxe na expressão"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "tentativa de atribuição para algo que não é uma variável"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "divisão por 0"
+
+#: expr.c:471
+#, fuzzy
+msgid "bug: bad expassign token"
+msgstr "Erro de programação: `token' inválido `%d' passado para expassign()"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "`:' esperado para expressão condicional"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr ""
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr ""
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "faltando `)'"
+
+#: expr.c:897 expr.c:1176
+#, fuzzy
+msgid "syntax error: operand expected"
+msgstr "erro de sintaxe: fim prematuro do arquivo"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr ""
+
+#: expr.c:1202
+#, fuzzy, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s: %s: %s (erro: o `token' é \"%s\")\n"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr ""
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "valor muito grande para esta base de numeração"
+
+#: expr.c:1329
+#, fuzzy, c-format
+msgid "%s: expression error\n"
+msgstr "%s: esperado expressão de número inteiro"
+
+#: general.c:61
+#, fuzzy
+msgid "getcwd: cannot access parent directories"
+msgstr "getwd: impossível acessar os diretórios pais (anteriores)"
+
+#: input.c:94 subst.c:4857
+#, fuzzy, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "impossível duplicar fd (descritor de arquivo) %d para fd 0: %s"
+
+#: input.c:258
+#, fuzzy, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+"impossível alocar novo descritor de arquivo (fd) para a entrada\n"
+"do `bash' a partir do descritor de arquivo (fd) %d: %s"
+
+#: input.c:266
+#, fuzzy, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr ""
+"check_bash_input: já existe o espaço intermediário (buffer)\n"
+"para o novo descritor de arquivo (fd) %d"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr ""
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr ""
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr ""
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr ""
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr ""
+
+#: jobs.c:1401
+#, fuzzy, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: o identificador do processo (pid) não existe (%d)!\n"
+
+#: jobs.c:1416
+#, fuzzy, c-format
+msgid "Signal %d"
+msgstr "Sinal desconhecido #%d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Concluído"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Parado"
+
+#: jobs.c:1439
+#, fuzzy, c-format
+msgid "Stopped(%s)"
+msgstr "Parado"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "Executando"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Concluído(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "Fim da execução com status %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Status desconhecido"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(imagem do núcleo gravada)"
+
+#: jobs.c:1568
+#, fuzzy, c-format
+msgid " (wd: %s)"
+msgstr "(wd agora: %s)\n"
+
+#: jobs.c:1776
+#, fuzzy, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "`setpgid' filho (%d para %d) erro %d: %s\n"
+
+#: jobs.c:2104 nojobs.c:585
+#, fuzzy, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait: o pid %d não é um filho deste `shell'"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr ""
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr ""
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: o trabalho terminou"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr ""
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, fuzzy, c-format
+msgid "%s: line %d: "
+msgstr "encaixe (slot) %3d: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr " (imagem do núcleo gravada)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(wd agora: %s)\n"
+
+#: jobs.c:3579
+#, fuzzy
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_jobs: getpgrp falhou: %s"
+
+#: jobs.c:3639
+#, fuzzy
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_jobs: disciplina da linha: %s"
+
+#: jobs.c:3649
+#, fuzzy
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_jobs: getpgrp falhou: %s"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr ""
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "nenhum controle de trabalho nesta `shell'"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:313
+#, fuzzy
+msgid "unknown"
+msgstr "<desconhecido>"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr ""
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr ""
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr ""
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr ""
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr ""
+
+#: lib/sh/netopen.c:168
+#, fuzzy, c-format
+msgid "%s: host unknown"
+msgstr "desconhecido"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr ""
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr ""
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr ""
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc: impossível realocar %lu bytes (%lu bytes alocados)"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc: impossível realocar %lu bytes (%lu bytes alocados)"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Você tem mensagem de correio em $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Você tem mensagem nova de correio em $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "As mensagens de correio em %s foram lidas\n"
+
+#: make_cmd.c:323
+#, fuzzy
+msgid "syntax error: arithmetic expression required"
+msgstr "erro de sintaxe na expressão"
+
+#: make_cmd.c:325
+#, fuzzy
+msgid "syntax error: `;' unexpected"
+msgstr "erro de sintaxe: fim prematuro do arquivo"
+
+#: make_cmd.c:326
+#, fuzzy, c-format
+msgid "syntax error: `((%s))'"
+msgstr "erro de sintaxe"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: o tipo da instrução está incorreto %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr ""
+
+#: parse.y:3133 parse.y:3369
+#, fuzzy, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "encontrado EOF não esperado enquanto procurava por `%c'"
+
+#: parse.y:3951
+#, fuzzy
+msgid "unexpected EOF while looking for `]]'"
+msgstr "encontrado EOF não esperado enquanto procurava por `%c'"
+
+#: parse.y:3956
+#, fuzzy, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "erro de sintaxe próximo do `token' não esperado `%s'"
+
+#: parse.y:3960
+#, fuzzy
+msgid "syntax error in conditional expression"
+msgstr "erro de sintaxe na expressão"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr ""
+
+#: parse.y:4042
+#, fuzzy
+msgid "expected `)'"
+msgstr "esperado `)'"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr ""
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr ""
+
+#: parse.y:4120
+#, fuzzy, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "%s: esperado operador binário"
+
+#: parse.y:4124
+#, fuzzy
+msgid "conditional binary operator expected"
+msgstr "%s: esperado operador binário"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr ""
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr ""
+
+#: parse.y:4161
+#, fuzzy, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "`:' esperado para expressão condicional"
+
+#: parse.y:4164
+#, fuzzy, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "`:' esperado para expressão condicional"
+
+#: parse.y:4168
+#, fuzzy, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "`:' esperado para expressão condicional"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "erro de sintaxe próximo do `token' não esperado `%s'"
+
+#: parse.y:5477
+#, fuzzy, c-format
+msgid "syntax error near `%s'"
+msgstr "erro de sintaxe próximo do `token' não esperado `%s'"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "erro de sintaxe: fim prematuro do arquivo"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "erro de sintaxe"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Use \"%s\" para sair da `shell'.\n"
+
+#: parse.y:5711
+#, fuzzy
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "encontrado EOF não esperado enquanto procurava por `%c'"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr ""
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr ""
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: conector incorreto `%d'"
+
+#: print_cmd.c:363
+#, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr ""
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr ""
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr ""
+
+#: redir.c:166
+#, fuzzy, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: Redirecionamento ambíguo"
+
+#: redir.c:170
+#, fuzzy, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: Impossível sobrescrever arquivo existente"
+
+#: redir.c:175
+#, fuzzy, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: restrição: não é permitido especificar `/' em nomes de comandos"
+
+#: redir.c:180
+#, fuzzy, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "impossível criar `pipe' para a substituição do processo: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: impossível atribuir uma lista a um membro de uma matriz (array)"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr ""
+
+#: redir.c:1101
+#, fuzzy
+msgid "redirection error: cannot duplicate fd"
+msgstr "erro de redirecionamento"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr ""
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr ""
+
+#: shell.c:884
+#, fuzzy, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: opção incorreta"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Eu não tenho nome!"
+
+#: shell.c:1793
+#, fuzzy, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU %s, versão %s\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Utilização:\t%s [opção-longa-GNU] [opção] ...\n"
+"\t%s [opção-longa-GNU] [opção] arquivo-de-script ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "opções-longas-GNU:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Opções da `shell':\n"
+
+#: shell.c:1801
+#, fuzzy
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD ou -c comando\t\t(somente para chamada)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s ou -o opção\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"Digite `%s -c \"help set\"' para mais informações sobre as opções da "
+"`shell'.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"Digite `%s -c help' para mais informações sobre os comandos internos do "
+"`shell'.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr ""
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr ""
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Sinal falso"
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Hangup"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Interromper"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "Sair"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Instrução ilegal"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "BPT Rastreamento/Captura (BPT trace/trap)"
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "Instrução ABORT"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "Instrução EMT"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Exceção de ponto flutuante"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "Morto (Killed)"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "Erro do barramento"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Falha de segmentação"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Chamada incorreta do sistema"
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "`Pipe' partido (Escrita sem leitura)"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Relógio de alarme"
+
+#: siglist.c:111
+#, fuzzy
+msgid "Terminated"
+msgstr "exibida."
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "Condição urgente de Entrada/Saída"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Parado (sinal)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "Continuar"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "Processo filho parado ou terminado"
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Parado (entrada tty)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Parado (saída tty)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "Entrada/Saída pronta"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "Tempo limite de CPU excedido"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "Tamanho limite do arquivo excedido"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "Alarme virtual de tempo"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "Alarme (profile)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Janela mudada"
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr "Registro bloqueado (lock)"
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "Sinal 1 definido pelo usuário"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "Sinal 2 definido pelo usuário"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "entrada de dados HFT pendente"
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "falha iminente de energia"
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "falha iminente do sistema"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "migrar o processo para outra CPU"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "erro de programação"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "modo monitor HFT autorizado"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "modo monitor HFT rescindido"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "a seqüência de som HFT foi completada"
+
+#: siglist.c:215
+msgid "Information request"
+msgstr ""
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Sinal desconhecido #"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Sinal desconhecido #%d"
+
+#: subst.c:1333 subst.c:1454
+#, fuzzy, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "substituição incorreta: nenhum `%s' em %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: impossível atribuir uma lista a um membro de uma matriz (array)"
+
+#: subst.c:4754 subst.c:4770
+#, fuzzy
+msgid "cannot make pipe for process substitution"
+msgstr "impossível criar `pipe' para a substituição do processo: %s"
+
+#: subst.c:4802
+#, fuzzy
+msgid "cannot make child for process substitution"
+msgstr "impossível criar um processo filho para a substituição do processo: %s"
+
+#: subst.c:4847
+#, fuzzy, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "impossível abrir o `named pipe' %s para %s: %s"
+
+#: subst.c:4849
+#, fuzzy, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "impossível abrir o `named pipe' %s para %s: %s"
+
+#: subst.c:4867
+#, fuzzy, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr ""
+"impossível duplicar o `named pipe' %s\n"
+"como descritor de arquivo (fd) %d: %s"
+
+#: subst.c:5063
+#, fuzzy
+msgid "cannot make pipe for command substitution"
+msgstr "impossível construir `pipes' para substituição do comando: %s"
+
+#: subst.c:5097
+#, fuzzy
+msgid "cannot make child for command substitution"
+msgstr "impossível criar um processo filho para substituição do comando: %s"
+
+#: subst.c:5114
+#, fuzzy
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr ""
+"command_substitute: impossível duplicar o `pipe' como\n"
+"descritor de arquivo (fd) 1: %s"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: parâmetro nulo ou não inicializado"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: expressão de substring < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: substituição incorreta"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: impossível atribuir desta maneira"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, fuzzy, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "substituição incorreta: nenhum `%s' em %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr ""
+
+#: test.c:146
+msgid "argument expected"
+msgstr "esperado argumento"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: esperado expressão de número inteiro"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "esperado `)'"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "esperado `)', encontrado %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: esperado operador unário"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: esperado operador binário"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "faltando `]'"
+
+#: trap.c:203
+#, fuzzy
+msgid "invalid signal number"
+msgstr "número do sinal incorreto"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr ""
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+
+#: trap.c:380
+#, fuzzy, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: Sinal incorreto %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "erro ao importar a definição da função para `%s'"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr ""
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr ""
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr ""
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: parâmetro nulo ou não inicializado"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr ""
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr ""
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr ""
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: impossível criar: %s"
+
+#: variables.c:4683
+#, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr ""
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr ""
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: version.c:86 version2.c:83
+#, fuzzy, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU %s, versão %s\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+
+#: version2.c:86
+#, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr ""
+
+#: version2.c:87
+#, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: impossível alocar %lu bytes (%lu bytes alocados)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: impossível alocar %lu bytes (%lu bytes alocados)"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: impossível alocar %lu bytes (%lu bytes alocados)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: impossível alocar %lu bytes (%lu bytes alocados)"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [NOME[=VALOR] ... ]"
+
+#: builtins.c:47
+#, fuzzy
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] [NOME ...]"
+
+#: builtins.c:51
+#, fuzzy
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+"bind [-lpvsPVS] [-m MAPA-TECLAS] [-f ARQUIVO] [-q NOME-FUNÇÃO] [-r SEQ-"
+"TECLAS] [SEQ-TECLAS:FUNÇÃO-DE-LEITURA-DE-LINHA]"
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [n]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [n]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [COMANDO-INTERNO-DA-SHELL [ARG ...]]"
+
+#: builtins.c:61
+#, fuzzy
+msgid "caller [expr]"
+msgstr "test [EXPR]"
+
+#: builtins.c:64
+#, fuzzy
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-PL] [DIR]"
+
+#: builtins.c:66
+#, fuzzy
+msgid "pwd [-LP]"
+msgstr "pwd [-PL]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr ""
+
+#: builtins.c:72
+msgid "false"
+msgstr ""
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] COMANDO [ARG ...]"
+
+#: builtins.c:76
+#, fuzzy
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-afFrxi] [-p] NOME[=VALOR] ..."
+
+#: builtins.c:78
+#, fuzzy
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-afFrxi] [-p] NOME[=VALOR] ..."
+
+#: builtins.c:80
+#, fuzzy
+msgid "local [option] name[=value] ..."
+msgstr "local NOME[=VALOR] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [ARG ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [ARG ...]"
+
+#: builtins.c:90
+#, fuzzy
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-pnds] [-a] [-f ARQUIVO] [NOME ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [ARG ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts OPÇÕES NOME [ARG]"
+
+#: builtins.c:96
+#, fuzzy
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a NOME] ARQUIVO [REDIRECIONAMENTO ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [n]"
+
+#: builtins.c:100
+#, fuzzy
+msgid "logout [n]"
+msgstr "logout"
+
+#: builtins.c:103
+#, fuzzy
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+"fc [-e EDITOR] [-nlr] [PRIMEIRO] [ÚLTIMO] ou fc -s [ANTIGO=NOVO] [COMANDO]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [JOB-ESPECIFICADO]"
+
+#: builtins.c:111
+#, fuzzy
+msgid "bg [job_spec ...]"
+msgstr "bg [JOB-ESPECIFICADO]"
+
+#: builtins.c:114
+#, fuzzy
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-r] [-p CAMINHO] [NOME ...]"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "help [PADRÃO ...]"
+
+#: builtins.c:121
+#, fuzzy
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [n] ou history -awrn [ARQUIVO] ou history -ps ARG [ARG...]"
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr "jobs [-lnprs] [JOB-ESPECIFICADO ...] ou jobs -x COMANDO [ARGS]"
+
+#: builtins.c:129
+#, fuzzy
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [JOB-ESPECIFICADO ...]"
+
+#: builtins.c:132
+#, fuzzy
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s SIGSPEC | -n SIGNUM | -SIGSPEC] [PID | JOB]... ou kill -l [SIGSPEC]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let ARG [ARG ...]"
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+#, fuzzy
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o OPÇÃO] [ARG ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [NOME ...]"
+
+#: builtins.c:144
+#, fuzzy
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-nf] [NOME ...] ou export -p"
+
+#: builtins.c:146
+#, fuzzy
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-anf] [NOME ...] ou readonly -p"
+
+#: builtins.c:148
+#, fuzzy
+msgid "shift [n]"
+msgstr "exit [n]"
+
+#: builtins.c:150
+#, fuzzy
+msgid "source filename [arguments]"
+msgstr "arquivo fonte"
+
+#: builtins.c:152
+#, fuzzy
+msgid ". filename [arguments]"
+msgstr ". ARQUIVO"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [EXPR]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ ARG... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "times"
+
+#: builtins.c:164
+#, fuzzy
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [ARG] [SINAL-ESPEC] ou trap -l"
+
+#: builtins.c:166
+#, fuzzy
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-apt] NOME [NOME ...]"
+
+#: builtins.c:169
+#, fuzzy
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdfmstpnuv] [LIMITE]"
+
+#: builtins.c:172
+#, fuzzy
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-S] [MODO]"
+
+#: builtins.c:175
+#, fuzzy
+msgid "wait [id]"
+msgstr "wait [n]"
+
+#: builtins.c:179
+#, fuzzy
+msgid "wait [pid]"
+msgstr "wait [n]"
+
+#: builtins.c:182
+#, fuzzy
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for NOME [in PALAVRAS ... ;] do COMANDOS; done"
+
+#: builtins.c:184
+#, fuzzy
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for NOME [in PALAVRAS ... ;] do COMANDOS; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select NOME [in PALAVRAS ... ;] do COMANDOS; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr ""
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case PALAVRA in [PADRÃO [| PADRÃO]...) COMANDOS ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if COMANDOS; then COMANDOS; [ elif COMANDOS; then COMANDOS; ]... [ else "
+"COMANDOS; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while COMANDOS; do COMANDOS; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until COMANDOS; do COMANDOS; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr ""
+
+#: builtins.c:200
+#, fuzzy
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "function NOME { COMANDOS ; } ou NOME () { COMANDOS ; }"
+
+#: builtins.c:202
+#, fuzzy
+msgid "{ COMMANDS ; }"
+msgstr "{ COMANDOS }"
+
+#: builtins.c:204
+#, fuzzy
+msgid "job_spec [&]"
+msgstr "fg [JOB-ESPECIFICADO]"
+
+#: builtins.c:206
+#, fuzzy
+msgid "(( expression ))"
+msgstr "esperado uma expressão"
+
+#: builtins.c:208
+#, fuzzy
+msgid "[[ expression ]]"
+msgstr "esperado uma expressão"
+
+#: builtins.c:210
+#, fuzzy
+msgid "variables - Names and meanings of some shell variables"
+msgstr "As variáveis da `shell' podem ser operandos. O nome da variável é"
+
+#: builtins.c:213
+#, fuzzy
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [DIR | +N | -N] [-n]"
+
+#: builtins.c:217
+#, fuzzy
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [+N | -N] [-n]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+#, fuzzy
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o OPÇÃO-LONGA] NOME-OPÇÃO [NOME-OPÇÃO...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr ""
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "type [-apt] NOME [NOME ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+
+#: builtins.c:276
+#, fuzzy
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Remove NOMEs da lista de aliases definidos. Se a opção -a for fornecida,"
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:326
+#, fuzzy
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr "Prossegue no próximo ciclo do laço FOR, WHILE ou UNTIL envolvente."
+
+#: builtins.c:338
+#, fuzzy
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr "Prossegue no próximo ciclo do laço FOR, WHILE ou UNTIL envolvente."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+
+#: builtins.c:428
+#, fuzzy
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Nenhum efeito; o comando não faz nada. Retorna zero no código de saída."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+#: builtins.c:689
+#, fuzzy
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr "Sair da `shell' com status igual a N. Se N for omitido, o status"
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+
+#: builtins.c:738
+#, fuzzy
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"Colocar JOB-ESPECIFICADO no primeiro plano, e torná-lo o trabalho atual."
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+
+#: builtins.c:966
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+
+#: builtins.c:1299
+#, fuzzy
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr "argumento deve ser o literal `]', para fechar o `[' de abertura."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+
+#: builtins.c:1551
+#, fuzzy
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Executar seletivamente COMANDOS tomando por base a correspondência entre"
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1580
+#, fuzzy
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr "Expande e executa COMANDOS enquanto o comando final nos"
+
+#: builtins.c:1592
+#, fuzzy
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr "Expande e executa COMANDOS enquanto o comando final nos"
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+
+#: builtins.c:1632
+#, fuzzy
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr "Executa um conjunto de comandos agrupando-os. Esta é uma forma de"
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xrealloc: impossível realocar %lu bytes (%lu bytes alocados)"
+
+#, fuzzy
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: impossível realocar %lu bytes (%lu bytes alocados)"
+
+#, fuzzy
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xrealloc: impossível realocar %lu bytes (%lu bytes alocados)"
+
+#~ msgid "Display the list of currently remembered directories. Directories"
+#~ msgstr "Exibe a lista atual de diretórios memorizados. Os diretórios são"
+
+#~ msgid "find their way onto the list with the `pushd' command; you can get"
+#~ msgstr "introduzidos na lista através do comando `pushd'; os diretórios são"
+
+#~ msgid "back up through the list with the `popd' command."
+#~ msgstr "removidos da lista através do comando `popd'."
+
+#~ msgid ""
+#~ "The -l flag specifies that `dirs' should not print shorthand versions"
+#~ msgstr "A opção -l especifica que `dirs' não deve exibir a versão resumida"
+
+#~ msgid ""
+#~ "of directories which are relative to your home directory. This means"
+#~ msgstr ""
+#~ "dos diretórios relativos ao seu diretório `home'. Isto significa que"
+
+#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag"
+#~ msgstr ""
+#~ "`~/bin' deve ser exibido como `/home/você/bin'. A opção -v faz com que"
+
+#~ msgid "causes `dirs' to print the directory stack with one entry per line,"
+#~ msgstr "`dirs' exiba a pilha de diretórios com uma entrada por linha,"
+
+#~ msgid ""
+#~ "prepending the directory name with its position in the stack. The -p"
+#~ msgstr "antecedendo o nome do diretório com a sua posição na pilha. A opção"
+
+#~ msgid "flag does the same thing, but the stack position is not prepended."
+#~ msgstr "-p faz a mesma coisa, mas a posição na pilha não é exibida. A opção"
+
+#~ msgid ""
+#~ "The -c flag clears the directory stack by deleting all of the elements."
+#~ msgstr "-c limpa a pilha de diretórios apagando todos os seus elementos."
+
+#, fuzzy
+#~ msgid ""
+#~ "+N displays the Nth entry counting from the left of the list shown by"
+#~ msgstr ""
+#~ "+N\texibe a n-ésima entrada contada a partir da esquerda da lista exibida"
+
+#, fuzzy
+#~ msgid " dirs when invoked without options, starting with zero."
+#~ msgstr "\tpor `dirs', quando este é chamado sem opções, começando por zero."
+
+#, fuzzy
+#~ msgid ""
+#~ "-N displays the Nth entry counting from the right of the list shown by"
+#~ msgstr ""
+#~ "-N\texibe a n-ésima entrada contada a partir da direita da lista exibida"
+
+#~ msgid "Adds a directory to the top of the directory stack, or rotates"
+#~ msgstr "Adiciona o diretório no topo da pilha de diretórios, ou rotaciona a"
+
+#~ msgid "the stack, making the new top of the stack the current working"
+#~ msgstr ""
+#~ "pilha, fazendo o diretório atual de trabalho ficar no topo da pilha."
+
+#~ msgid "directory. With no arguments, exchanges the top two directories."
+#~ msgstr "Sem nenhum argumento, troca os dois diretórios do topo."
+
+#, fuzzy
+#~ msgid "+N Rotates the stack so that the Nth directory (counting"
+#~ msgstr ""
+#~ "+N\tRotaciona a pilha de tal forma que o n-ésimo diretório (contado a"
+
+#, fuzzy
+#~ msgid " from the left of the list shown by `dirs', starting with"
+#~ msgstr "\tpartir da esquerda da lista exibida por `dirs') fique no topo."
+
+#, fuzzy
+#~ msgid " zero) is at the top."
+#~ msgstr "\tpartir da direita) fique no topo."
+
+#, fuzzy
+#~ msgid "-N Rotates the stack so that the Nth directory (counting"
+#~ msgstr ""
+#~ "-N\tRotaciona a pilha de tal forma que o n-ésimo diretório (contado a"
+
+#, fuzzy
+#~ msgid " from the right of the list shown by `dirs', starting with"
+#~ msgstr "\tpartir da esquerda da lista exibida por `dirs') fique no topo."
+
+#, fuzzy
+#~ msgid "-n suppress the normal change of directory when adding directories"
+#~ msgstr "-n\tsuprime a troca normal de diretório ao se adicionar diretórios"
+
+#, fuzzy
+#~ msgid " to the stack, so only the stack is manipulated."
+#~ msgstr "\tà pilha, fazendo com que somente a pilha seja manipulada."
+
+#, fuzzy
+#~ msgid "dir adds DIR to the directory stack at the top, making it the"
+#~ msgstr "dir\tadiciona DIR à pilha de diretórios, no topo, tornando-o o"
+
+#, fuzzy
+#~ msgid " new current working directory."
+#~ msgstr "\tnovo diretório atual de trabalho."
+
+#~ msgid "You can see the directory stack with the `dirs' command."
+#~ msgstr "Você pode exibir a pilha de diretórios através do comando `dirs'."
+
+#~ msgid "Removes entries from the directory stack. With no arguments,"
+#~ msgstr "Remove entradas da pilha de diretórios. Sem nenhum argumento,"
+
+#~ msgid "removes the top directory from the stack, and cd's to the new"
+#~ msgstr "remove o diretório que está no topo da pilha, e executa `cd' para"
+
+#~ msgid "top directory."
+#~ msgstr "o novo diretório que ocupa o topo da pilha."
+
+#, fuzzy
+#~ msgid "+N removes the Nth entry counting from the left of the list"
+#~ msgstr "+N\tremove a n-ésima entrada contada a partir da esquerda da lista"
+
+#, fuzzy
+#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'"
+#~ msgstr "\texibida por `dirs', começando por zero. Por exemplo: `popd +0'"
+
+#, fuzzy
+#~ msgid " removes the first directory, `popd +1' the second."
+#~ msgstr "\tremove o primeiro diretório, `popd +1' o segundo."
+
+#, fuzzy
+#~ msgid "-N removes the Nth entry counting from the right of the list"
+#~ msgstr "-N\tremove a n-ésima entrada contada a partir da direita da lista"
+
+#, fuzzy
+#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'"
+#~ msgstr "\texibida por `dirs', começando por zero. Por exemplo: `popd -0'"
+
+#, fuzzy
+#~ msgid " removes the last directory, `popd -1' the next to last."
+#~ msgstr "\tremove o último diretório, `popd -1' o penúltimo."
+
+#, fuzzy
+#~ msgid ""
+#~ "-n suppress the normal change of directory when removing directories"
+#~ msgstr "-n\tsuprime a troca normal de diretório ao remover-se diretórios"
+
+#, fuzzy
+#~ msgid " from the stack, so only the stack is manipulated."
+#~ msgstr "\tda pilha, fazendo com que somente a pilha seja manipulada."
+
+#, fuzzy
+#~ msgid ""
+#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n"
+#~ " break N levels."
+#~ msgstr "Sair de um laço FOR, WHILE ou UNTIL."
+
+#~ msgid "Obsolete. See `declare'."
+#~ msgstr "Obsoleta. Veja `declare'."
+
+#~ msgid ""
+#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed."
+#~ msgstr ""
+#~ "Exibe ARGS. Se -n for fornecido, o caracter final de nova linha é "
+#~ "suprimido."
+
+#~ msgid ""
+#~ "Read ARGs as input to the shell and execute the resulting command(s)."
+#~ msgstr ""
+#~ "Ler ARGs como entrada da `shell' e executar o(s) comando(s) resultante(s)."
+
+#~ msgid "Logout of a login shell."
+#~ msgstr "Sair de uma shell de login."
+
+#, fuzzy
+#~ msgid ""
+#~ "Causes a function to exit with the return value specified by N. If N\n"
+#~ " is omitted, the return status is that of the last command."
+#~ msgstr "Faz a função terminar com o valor de retorno especificado por N."
+
+#, fuzzy
+#~ msgid ""
+#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is\n"
+#~ " not given, it is assumed to be 1."
+#~ msgstr ""
+#~ "Os parâmetros posicionais a partir de $N+1 ... são deslocados para $1 ..."
+
+#, fuzzy
+#~ msgid ""
+#~ "Print the accumulated user and system times for processes run from\n"
+#~ " the shell."
+#~ msgstr ""
+#~ "Exibe os tempos acumulados do usuário e do sistema para os processos"
+
+#~ msgid "Missing `}'"
+#~ msgstr "Faltando `}'"
+
+#~ msgid "brace_expand> "
+#~ msgstr "brace_expand> "
+
+#~ msgid "Attempt to free unknown command type `%d'.\n"
+#~ msgstr "Tentativa de liberar um tipo de comando desconhecido `%d'.\n"
+
+#~ msgid "Report this to %s\n"
+#~ msgstr "Informar o ocorrido para %s\n"
+
+#~ msgid "Stopping myself..."
+#~ msgstr "Parando-me..."
+
+#~ msgid "Tell %s to fix this someday.\n"
+#~ msgstr "Informar %s para corrigir o ocorrido.\n"
+
+#~ msgid "execute_command: bad command type `%d'"
+#~ msgstr "execute_command: `%d' é um tipo incorreto de comando "
+
+#~ msgid "real\t"
+#~ msgstr "real\t"
+
+#~ msgid "user\t"
+#~ msgstr "usuário\t"
+
+#~ msgid "sys\t"
+#~ msgstr "sistema\t"
+
+#~ msgid ""
+#~ "real\t0m0.00s\n"
+#~ "user\t0m0.00s\n"
+#~ "sys\t0m0.00s\n"
+#~ msgstr ""
+#~ "real \t0m0.00s\n"
+#~ "usuário\t0m0.00s\n"
+#~ "sistema\t0m0.00s\n"
+
+#~ msgid "cannot duplicate fd %d to fd 1: %s"
+#~ msgstr "impossível duplicar fd (descritor de arquivo) %d para fd 1: %s"
+
+#~ msgid "%s: output redirection restricted"
+#~ msgstr "%s: redirecionamento da saída restringido"
+
+#~ msgid "Out of memory!"
+#~ msgstr "Memória esgotada!"
+
+#~ msgid "You have already added item `%s'\n"
+#~ msgstr "Você já adicionou o item `%s'\n"
+
+#~ msgid "You have entered %d (%d) items. The distribution is:\n"
+#~ msgstr "Entrados %d (%d) itens. A distribuição é:\n"
+
+#~ msgid "%s: bg background job?"
+#~ msgstr "%s: bg trabalho no segundo plano?"
+
+#~ msgid ""
+#~ "Redirection instruction from yyparse () '%d' is\n"
+#~ "out of range in make_redirection ()."
+#~ msgstr ""
+#~ "A instrução de redirecionamento do yyparse () '%d' está\n"
+#~ "fora do intervalo em make_redirection ()."
+
+#~ msgid "clean_simple_command () got a command with type %d."
+#~ msgstr "clean_simple_command () recebeu um comando do tipo %d."
+
+#~ msgid "got errno %d while waiting for %d"
+#~ msgstr "recebido erro número %d enquanto aguardava por %d"
+
+#~ msgid "syntax error near unexpected token `%c'"
+#~ msgstr "erro de sintaxe próximo do `token' não esperado `%c'"
+
+#~ msgid "print_command: bad command type `%d'"
+#~ msgstr "print_command: tipo de comando incorreto `%d'"
+
+#~ msgid "cprintf: bad `%%' argument (%c)"
+#~ msgstr "cprintf: argumento `%%' incorreto (%c)"
+
+#~ msgid "option `%s' requires an argument"
+#~ msgstr "a opção `%s' requer um argumento"
+
+#~ msgid "%s: unrecognized option"
+#~ msgstr "%s: a opção não é reconhecida"
+
+#~ msgid "`-c' requires an argument"
+#~ msgstr "A opção `-c' requer um argumento"
+
+#~ msgid "%s: cannot execute directories"
+#~ msgstr "%s: impossível executar diretórios"
+
+#~ msgid "Bad code in sig.c: sigprocmask"
+#~ msgstr "Código incorreto em sig.c: sigprocmask"
+
+#~ msgid "bad substitution: no ending `}' in %s"
+#~ msgstr "substituição incorreta: falta o `}' final em %s"
+
+#~ msgid "%s: bad array subscript"
+#~ msgstr "%s: indice da matriz (array) incorreto"
+
+#~ msgid "can't make pipes for process substitution: %s"
+#~ msgstr "impossível criar `pipes' para a substituição do processo: %s"
+
+#~ msgid "reading"
+#~ msgstr "lendo"
+
+#~ msgid "process substitution"
+#~ msgstr "substituição de processo"
+
+#~ msgid "command substitution"
+#~ msgstr "substituição de comando"
+
+#~ msgid "Can't reopen pipe to command substitution (fd %d): %s"
+#~ msgstr ""
+#~ "Impossível reabrir o `pipe' para substituição de comando (fd %d): %s"
+
+#~ msgid "$%c: unbound variable"
+#~ msgstr "$%c: variável não vinculada"
+
+#~ msgid "%s: bad arithmetic substitution"
+#~ msgstr "%s: substituição aritmética incorreta"
+
+#~ msgid "-%s: binary operator expected"
+#~ msgstr "-%s: esperado operador binário"
+
+#~ msgid "%s[%s: bad subscript"
+#~ msgstr "%s[%s: índice incorreto"
+
+#~ msgid "[%s: bad subscript"
+#~ msgstr "[%s: índice incorreto"
+
+#~ msgid "digits occur in two different argv-elements.\n"
+#~ msgstr "os dígitos aparecem em dois elementos argv diferentes.\n"
+
+#~ msgid "option %c\n"
+#~ msgstr "opção %c\n"
+
+#~ msgid "option a\n"
+#~ msgstr "opção a\n"
+
+#~ msgid "option b\n"
+#~ msgstr "opção b\n"
+
+#~ msgid "option c with value `%s'\n"
+#~ msgstr "opção c com o valor `%s'\n"
+
+#~ msgid "?? sh_getopt returned character code 0%o ??\n"
+#~ msgstr "?? sh_getopt retornou o código de caracter 0%o ??\n"
+
+#~ msgid "non-option ARGV-elements: "
+#~ msgstr "elementos de ARGV que não são opção:"
+
+#~ msgid "%s: Unknown flag %s.\n"
+#~ msgstr "%s: Opção %s desconhecida.\n"
+
+#~ msgid "Unknown directive `%s'"
+#~ msgstr "Diretiva desconhecida `%s'"
+
+#~ msgid "%s requires an argument"
+#~ msgstr "%s requer um argumento"
+
+#~ msgid "%s must be inside of a $BUILTIN block"
+#~ msgstr "%s deve estar dentro de um bloco $BUILTIN"
+
+#~ msgid "%s found before $END"
+#~ msgstr "%s encontrado antes de $END"
+
+#~ msgid "%s already has a function (%s)"
+#~ msgstr "%s já possui uma função (%s)"
+
+#~ msgid "%s already had a docname (%s)"
+#~ msgstr "%s já possui um nome de documento (%s)"
+
+#~ msgid "%s already has short documentation (%s)"
+#~ msgstr "%s já possui uma documentação curta (%s)"
+
+#~ msgid "%s already has a %s definition"
+#~ msgstr "%s já possui a definição %s"
+
+#~ msgid "mkbuiltins: Out of virtual memory!\n"
+#~ msgstr "mkbuiltins: Memória virtual esgotada!\n"
+
+#~ msgid "read [-r] [-p prompt] [-a array] [-e] [name ...]"
+#~ msgstr "read [-r] [-p MENSAGEM] [-a MATRIZ] [-e] [NOME ...]"
+
+#~ msgid "%[DIGITS | WORD] [&]"
+#~ msgstr "%[DÍGITOS | PALAVRA] [&]"
+
+#~ msgid "variables - Some variable names and meanings"
+#~ msgstr "variáveis - Alguns nomes de variáveis e suas descrições"
+
+#~ msgid "`alias' with no arguments or with the -p option prints the list"
+#~ msgstr "`alias' sem nenhum argumento, ou com a opção -p, exibe a lista"
+
+#~ msgid "of aliases in the form alias NAME=VALUE on standard output."
+#~ msgstr "de aliases na forma `alias NOME=VALOR' na saída padrão."
+
+#~ msgid "Otherwise, an alias is defined for each NAME whose VALUE is given."
+#~ msgstr ""
+#~ "Ou então, um alias é definido para cada NOME cujo VALOR for fornecido."
+
+#~ msgid "A trailing space in VALUE causes the next word to be checked for"
+#~ msgstr "Um espaço após VALOR faz a próxima palavra ser verificada para"
+
+#~ msgid "alias substitution when the alias is expanded. Alias returns"
+#~ msgstr "substituição do alias quando o alias é expandido. Alias retorna"
+
+#~ msgid "true unless a NAME is given for which no alias has been defined."
+#~ msgstr ""
+#~ "verdadeiro, a não ser que seja fornecido um NOME sem alias definido."
+
+#~ msgid "then remove all alias definitions."
+#~ msgstr "então todas as definições de alias são removidas."
+
+#~ msgid "Bind a key sequence to a Readline function, or to a macro. The"
+#~ msgstr ""
+#~ "Víncula uma seqüência de teclas a uma função de leitura de linha, ou a uma"
+
+#~ msgid "syntax is equivalent to that found in ~/.inputrc, but must be"
+#~ msgstr ""
+#~ "macro. A sintaxe é equivalente à encontrada em ~/.inputrc, mas deve ser"
+
+#~ msgid ""
+#~ "passed as a single argument: bind '\"\\C-x\\C-r\": re-read-init-file'."
+#~ msgstr ""
+#~ "passada como um único argumento: bind '\"\\C-x\\C-r\": re-read-init-file'."
+
+#~ msgid "Arguments we accept:"
+#~ msgstr "Argumentos permitidos:"
+
+#~ msgid ""
+#~ " -m keymap Use `keymap' as the keymap for the duration of this"
+#~ msgstr ""
+#~ " -m MAPA-TECLAS Usar `MAPA-TECLAS' como mapa das teclas pela duração"
+
+#~ msgid " command. Acceptable keymap names are emacs,"
+#~ msgstr " deste comando. Os nomes aceitos são emacs,"
+
+#~ msgid ""
+#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,"
+#~ msgstr ""
+#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,"
+
+#~ msgid " vi-command, and vi-insert."
+#~ msgstr " vi-command, and vi-insert."
+
+#~ msgid " -l List names of functions."
+#~ msgstr " -l Listar os nomes das funções."
+
+#~ msgid " -P List function names and bindings."
+#~ msgstr " -P Listar nomes e vinculações das funções."
+
+#~ msgid ""
+#~ " -p List functions and bindings in a form that can be"
+#~ msgstr ""
+#~ " -p Listar nomes e vinculações das funções de uma forma"
+
+#~ msgid " reused as input."
+#~ msgstr " que pode ser reutilizada como entrada."
+
+#~ msgid " -r keyseq Remove the binding for KEYSEQ."
+#~ msgstr " -r SEQ-TECLAS Remove o vínculo para SEQ-TECLAS."
+
+#~ msgid " -f filename Read key bindings from FILENAME."
+#~ msgstr " -f ARQUIVO Ler os vínculos das teclas em ARQUIVO."
+
+#~ msgid ""
+#~ " -q function-name Query about which keys invoke the named function."
+#~ msgstr " -q NOME-FUNÇÃO Consultar quais teclas chamam esta função."
+
+#~ msgid " -V List variable names and values"
+#~ msgstr " -V Listar os nomes e os valores das variáveis."
+
+#~ msgid ""
+#~ " -v List variable names and values in a form that can"
+#~ msgstr ""
+#~ " -v Listar os nomes e os valores das variáveis de uma"
+
+#~ msgid " be reused as input."
+#~ msgstr " forma que pode ser reutilizada como entrada."
+
+#~ msgid ""
+#~ " -S List key sequences that invoke macros and their "
+#~ "values"
+#~ msgstr ""
+#~ " -S Listar as seqüências de teclas que chamam macros\n"
+#~ " e seus valores."
+
+#~ msgid ""
+#~ " -s List key sequences that invoke macros and their "
+#~ "values in"
+#~ msgstr " -s Listar seqüências de teclas que chamam macros"
+
+#~ msgid " a form that can be reused as input."
+#~ msgstr ""
+#~ " e seus valores de uma forma que pode ser\n"
+#~ " reutilizada como entrada."
+
+#~ msgid "break N levels."
+#~ msgstr "Se N for especificado, sai de N níveis."
+
+#~ msgid "If N is specified, resume at the N-th enclosing loop."
+#~ msgstr "Se N for especificado, prossegue no N-ésimo laço envolvente."
+
+#~ msgid "Run a shell builtin. This is useful when you wish to rename a"
+#~ msgstr ""
+#~ "Executa um comando interno da `shell'. Útil quando desejamos substituir"
+
+#~ msgid "shell builtin to be a function, but need the functionality of the"
+#~ msgstr "um comando interno da `shell' por uma função, mas necessitamos da"
+
+#~ msgid "builtin within the function itself."
+#~ msgstr "funcionalidade do comando interno dentro da própria função."
+
+#~ msgid "Change the current directory to DIR. The variable $HOME is the"
+#~ msgstr "Troca o diretório atual para DIR. A variável $HOME é o padrão"
+
+#~ msgid "default DIR. The variable $CDPATH defines the search path for"
+#~ msgstr "para DIR. A variável $CDPATH define o caminho de procura para"
+
+#~ msgid "the directory containing DIR. Alternative directory names in CDPATH"
+#~ msgstr ""
+#~ "o diretório que contém DIR. Nomes de diretórios alternativos em CDPATH"
+
+#~ msgid "are separated by a colon (:). A null directory name is the same as"
+#~ msgstr ""
+#~ "são separados por dois pontos (:). Um nome de diretório nulo é o mesmo"
+
+#~ msgid "the current directory, i.e. `.'. If DIR begins with a slash (/),"
+#~ msgstr "que o diretório atual, i.e. `.'. Se DIR inicia com uma barra (/),"
+
+#~ msgid "then $CDPATH is not used. If the directory is not found, and the"
+#~ msgstr "então $CDPATH não é usado. Se o diretório não for encontrado, e a"
+
+#~ msgid "shell option `cdable_vars' is set, then try the word as a variable"
+#~ msgstr ""
+#~ "opção `cdable_vars' estiver definida, tentar usar DIR como um nome de"
+
+#~ msgid "name. If that variable has a value, then cd to the value of that"
+#~ msgstr ""
+#~ "variável. Se esta variável tiver valor, então `cd' para o valor desta"
+
+#~ msgid ""
+#~ "variable. The -P option says to use the physical directory structure"
+#~ msgstr ""
+#~ "variável. A opção -P indica para usar a estrutura física do diretório"
+
+#~ msgid ""
+#~ "instead of following symbolic links; the -L option forces symbolic links"
+#~ msgstr "em vez de seguir os vínculos simbólicos; a opção -L força seguir os"
+
+#~ msgid "to be followed."
+#~ msgstr "vínculos simbólicos."
+
+#~ msgid "Print the current working directory. With the -P option, pwd prints"
+#~ msgstr "Exibe o diretório atual de trabalho. Com a opção -P, `pwd' exibe"
+
+#~ msgid "the physical directory, without any symbolic links; the -L option"
+#~ msgstr "o diretório físico, sem nenhum vínculo simbólico; a opção -L faz"
+
+#~ msgid "makes pwd follow symbolic links."
+#~ msgstr "com que `pwd' siga os vínculos simbólicos."
+
+#~ msgid ""
+#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell"
+#~ msgstr ""
+#~ "Executa COMANDO com ARGs ignorando as funções da `shell'. Ex: Havendo"
+
+#~ msgid "function called `ls', and you wish to call the command `ls', you can"
+#~ msgstr ""
+#~ "uma função `ls', e se for necessário executar o comando `ls', executa-se"
+
+#~ msgid ""
+#~ "say \"command ls\". If the -p option is given, a default value is used"
+#~ msgstr ""
+#~ "\"command ls\". Se a opção -p for fornecida, o valor padrão é utilizado"
+
+#~ msgid ""
+#~ "for PATH that is guaranteed to find all of the standard utilities. If"
+#~ msgstr ""
+#~ "para PATH, garantindo-se o encontro de todos os utilitários padrão. Se"
+
+#~ msgid ""
+#~ "the -V or -v option is given, a string is printed describing COMMAND."
+#~ msgstr "a opção -V ou -v for fornecida, é exibida a descrição do COMANDO."
+
+#~ msgid "The -V option produces a more verbose description."
+#~ msgstr "A opção -V produz uma descrição mais extensa."
+
+#~ msgid "Declare variables and/or give them attributes. If no NAMEs are"
+#~ msgstr "Declara variáveis e/ou dá-lhes atributos. Se nenhum nome for"
+
+#~ msgid "given, then display the values of variables instead. The -p option"
+#~ msgstr "fornecido, então são exibidos os valores das variáveis. A opção -p"
+
+#~ msgid "will display the attributes and values of each NAME."
+#~ msgstr "exibe os atributos e valores para cada NOME."
+
+#~ msgid "The flags are:"
+#~ msgstr "As opções são:"
+
+#~ msgid " -a\tto make NAMEs arrays (if supported)"
+#~ msgstr " -a\tpara tornar NOMEs matrizes (arrays), se suportado"
+
+#~ msgid " -f\tto select from among function names only"
+#~ msgstr " -f\tpara selecionar somente entre nomes de funções"
+
+#~ msgid " -F\tto display function names without definitions"
+#~ msgstr " -F\tpara exibir os nomes das funções omitindo suas definições"
+
+#~ msgid " -r\tto make NAMEs readonly"
+#~ msgstr " -r\tpara tornar NOMEs somente para leitura"
+
+#~ msgid " -x\tto make NAMEs export"
+#~ msgstr " -x\tpara fazer a exportação de NOMEs"
+
+#~ msgid " -i\tto make NAMEs have the `integer' attribute set"
+#~ msgstr " -i\tpara ativar o atributo `inteiro' em NOMEs "
+
+#~ msgid "Variables with the integer attribute have arithmetic evaluation (see"
+#~ msgstr "Variáveis com atributo inteiro são avaliadas aritmeticamente (veja"
+
+#~ msgid "`let') done when the variable is assigned to."
+#~ msgstr "`let') quando é feita uma atribuição de valor."
+
+#~ msgid "When displaying values of variables, -f displays a function's name"
+#~ msgstr "Ao exibir os valores das variáveis, -f exibe o nome da função e"
+
+#~ msgid "and definition. The -F option restricts the display to function"
+#~ msgstr "sua definição. A opção -F restringe a exibição ao nome da função"
+
+#~ msgid "name only."
+#~ msgstr "somente."
+
+#~ msgid ""
+#~ "Using `+' instead of `-' turns off the given attribute instead. When"
+#~ msgstr "Usando `+' em vez de `-' faz o atributo ser desabilitado. Quando"
+
+#~ msgid "used in a function, makes NAMEs local, as with the `local' command."
+#~ msgstr "usado em uma função, torna NOMEs local, como no comando `local'."
+
+#~ msgid "Create a local variable called NAME, and give it VALUE. LOCAL"
+#~ msgstr "Cria uma variável local chamada NOME, e atribui VALOR. LOCAL"
+
+#~ msgid "have a visible scope restricted to that function and its children."
+#~ msgstr "da variável NOME fique restrito à própria função e às suas filhas."
+
+#~ msgid "Output the ARGs. If -n is specified, the trailing newline is"
+#~ msgstr "Exibe ARGs. Se -n for fornecido, o caracter final de nova linha é"
+
+#~ msgid "suppressed. If the -e option is given, interpretation of the"
+#~ msgstr ""
+#~ "suprimido. Se a opção -e for fornecida, a interpretação dos seguintes"
+
+#~ msgid "following backslash-escaped characters is turned on:"
+#~ msgstr "caracteres após a contrabarra é ativada:"
+
+#~ msgid "\t\\a\talert (bell)"
+#~ msgstr "\t\\a\talerta (bell)"
+
+#~ msgid "\t\\b\tbackspace"
+#~ msgstr "\t\\b\tbackspace"
+
+#~ msgid "\t\\c\tsuppress trailing newline"
+#~ msgstr "\t\\c\tsuprimir o caracter final de nova linha"
+
+#~ msgid "\t\\E\tescape character"
+#~ msgstr "\t\\E\to caracter de escape"
+
+#~ msgid "\t\\f\tform feed"
+#~ msgstr "\t\\f\talimentação de formulário (form feed)"
+
+#~ msgid "\t\\n\tnew line"
+#~ msgstr "\t\\n\tnova linha"
+
+#~ msgid "\t\\r\tcarriage return"
+#~ msgstr "\t\\r\tretorno de carro (cr)"
+
+#~ msgid "\t\\t\thorizontal tab"
+#~ msgstr "\t\\t\ttabulação horizontal (ht)"
+
+#~ msgid "\t\\v\tvertical tab"
+#~ msgstr "\t\\v\ttabulação vertical (vt)"
+
+#~ msgid "\t\\\\\tbackslash"
+#~ msgstr "\t\\\\\tcontrabarra"
+
+#~ msgid "\t\\num\tthe character whose ASCII code is NUM (octal)."
+#~ msgstr "\t\\num\to caracter com código ASCII igual a NUM (octal)."
+
+#~ msgid ""
+#~ "You can explicitly turn off the interpretation of the above characters"
+#~ msgstr ""
+#~ "Pode-se explicitamente desabilitar a interpretação dos caracteres acima"
+
+#~ msgid "with the -E option."
+#~ msgstr "através da opção -E."
+
+#~ msgid "Enable and disable builtin shell commands. This allows"
+#~ msgstr ""
+#~ "Habilita e desabilita os comandos internos da `shell', permitindo usar"
+
+#~ msgid "you to use a disk command which has the same name as a shell"
+#~ msgstr ""
+#~ "um comando de disco que tenha o mesmo nome do comando interno da `shell'."
+
+#~ msgid "builtin. If -n is used, the NAMEs become disabled; otherwise"
+#~ msgstr ""
+#~ "Se -n for especificado, os NOMEs são desabilitados, senão os nomes são"
+
+#~ msgid "NAMEs are enabled. For example, to use the `test' found on your"
+#~ msgstr ""
+#~ "habilitados. Por exemplo, para usar `test' encontrado pelo PATH em vez"
+
+#~ msgid "path instead of the shell builtin version, type `enable -n test'."
+#~ msgstr ""
+#~ "da versão interna do comando, digite `enable -n test'. Em sistemas que"
+
+#~ msgid "On systems supporting dynamic loading, the -f option may be used"
+#~ msgstr ""
+#~ "suportam carregamento dinâmico, pode-se usar a opção -f para carregar"
+
+#~ msgid "to load new builtins from the shared object FILENAME. The -d"
+#~ msgstr ""
+#~ "novos comandos internos do objeto compartilhado ARQUIVO. A opção -d"
+
+#~ msgid "option will delete a builtin previously loaded with -f. If no"
+#~ msgstr ""
+#~ "elimina os comandos internos previamente carregados com -f. Se nenhum"
+
+#~ msgid "non-option names are given, or the -p option is supplied, a list"
+#~ msgstr ""
+#~ "nome for fornecido, ou se a opção -p for fornecida, uma lista de comandos"
+
+#~ msgid "of builtins is printed. The -a option means to print every builtin"
+#~ msgstr ""
+#~ "internos é exibida. A opção -a faz com que todos os comandos internos"
+
+#~ msgid "with an indication of whether or not it is enabled. The -s option"
+#~ msgstr "sejam exibidos indicando se estão habilitados ou não. A opção -s"
+
+#~ msgid "restricts the output to the Posix.2 `special' builtins. The -n"
+#~ msgstr ""
+#~ "restringe a saída aos comandos internos `especiais' Posix.2. A opção"
+
+#~ msgid "option displays a list of all disabled builtins."
+#~ msgstr "-n exibe a lista de todos os comandos internos desabilitados."
+
+#~ msgid "Getopts is used by shell procedures to parse positional parameters."
+#~ msgstr ""
+#~ "Getopts é utilizado pelos procedimentos da `shell' para fazer a leitura\n"
+#~ " (parse) dos parâmetros posicionais."
+
+#~ msgid "OPTSTRING contains the option letters to be recognized; if a letter"
+#~ msgstr "OPÇÕES contém as letras das opções a serem reconhecidas; Se uma"
+
+#~ msgid "is followed by a colon, the option is expected to have an argument,"
+#~ msgstr "letra é seguida por dois pontos, a opção espera a presença de um"
+
+#~ msgid "which should be separated from it by white space."
+#~ msgstr "argumento que deve ser separado dela por espaço em branco."
+
+#~ msgid "Each time it is invoked, getopts will place the next option in the"
+#~ msgstr "Cada vez que for chamada, `getopts' irá colocar a próxima opção na"
+
+#~ msgid "shell variable $name, initializing name if it does not exist, and"
+#~ msgstr "variável da `shell' $NOME, inicializando NOME caso não exista, e o"
+
+#~ msgid "the index of the next argument to be processed into the shell"
+#~ msgstr "índice do próximo argumento a ser processado dentro da variável da"
+
+#~ msgid "variable OPTIND. OPTIND is initialized to 1 each time the shell or"
+#~ msgstr "`shell' OPTIND. OPTIND é inicializado com 1 cada vez que o script"
+
+#~ msgid "a shell script is invoked. When an option requires an argument,"
+#~ msgstr ""
+#~ "da `shell' é chamado. Quando uma opção requer um argumento, `getopts'"
+
+#~ msgid "getopts places that argument into the shell variable OPTARG."
+#~ msgstr "coloca este argumento dentro da variável da `shell' OPTARG."
+
+#~ msgid "getopts reports errors in one of two ways. If the first character"
+#~ msgstr ""
+#~ "`getopts' informa os erros de duas maneiras. Se o primeiro caracter de"
+
+#~ msgid "of OPTSTRING is a colon, getopts uses silent error reporting. In"
+#~ msgstr "OPÇÕES for dois pontos, `getopts' usa o modo silencioso. Neste"
+
+#~ msgid "this mode, no error messages are printed. If an illegal option is"
+#~ msgstr "modo, nenhuma mensagem de erro é exibida. Se uma opção ilegal for"
+
+#~ msgid "seen, getopts places the option character found into OPTARG. If a"
+#~ msgstr "encontrada, `getopts' coloca o caracter da opção em OPTARG. Se um"
+
+#~ msgid "required argument is not found, getopts places a ':' into NAME and"
+#~ msgstr ""
+#~ "argumento requerido não for encontrado, `getopts' coloca ':' em NOME e"
+
+#~ msgid "sets OPTARG to the option character found. If getopts is not in"
+#~ msgstr ""
+#~ "atribui a OPTARG o caracter de opção encontrado. Se `getopts' não está em"
+
+#~ msgid "silent mode, and an illegal option is seen, getopts places '?' into"
+#~ msgstr ""
+#~ "modo silencioso, e uma opção ilegal é encontrada, `getopts' coloca '?' em"
+
+#~ msgid "NAME and unsets OPTARG. If a required option is not found, a '?'"
+#~ msgstr ""
+#~ "NOME e desativa OPTARG. Se uma opção requerida não é encontrada, uma '?'"
+
+#~ msgid "is placed in NAME, OPTARG is unset, and a diagnostic message is"
+#~ msgstr ""
+#~ "é colocada em NOME, OPTARG é desativado, e uma mensagem de diagnóstico é"
+
+#~ msgid "If the shell variable OPTERR has the value 0, getopts disables the"
+#~ msgstr ""
+#~ "Se a variável da `shell' OPTERR tem o valor 0, `getopts' desabilita a"
+
+#~ msgid "printing of error messages, even if the first character of"
+#~ msgstr "exibição de mensagens de erro, mesmo que o primeiro caracter de"
+
+#~ msgid "OPTSTRING is not a colon. OPTERR has the value 1 by default."
+#~ msgstr "OPTSTRING não seja dois pontos. OPTERR tem o valor 1 por padrão."
+
+#~ msgid "Getopts normally parses the positional parameters ($0 - $9), but if"
+#~ msgstr ""
+#~ "`getopts' normalmente faz a leitura dos parãmetros posicionais ($0 - $9),"
+
+#~ msgid "more arguments are given, they are parsed instead."
+#~ msgstr "mas, se mais argumentos forem fornecidos, então estes são lidos."
+
+#~ msgid "Exec FILE, replacing this shell with the specified program."
+#~ msgstr ""
+#~ "Executa ARQUIVO, substituindo esta `shell' pelo programa especificado."
+
+#~ msgid "If FILE is not specified, the redirections take effect in this"
+#~ msgstr ""
+#~ "Se ARQUIVO não for especificado, os redirecionamentos são efetivados"
+
+#~ msgid "shell. If the first argument is `-l', then place a dash in the"
+#~ msgstr ""
+#~ "nesta `shell'. Se o primeiro argumento for `-l', coloca um hífen no"
+
+#~ msgid "zeroth arg passed to FILE, as login does. If the `-c' option"
+#~ msgstr "argumento `0' passado para ARQUIVO, como no login. Se a opção `-c'"
+
+#~ msgid "is supplied, FILE is executed with a null environment. The `-a'"
+#~ msgstr "for fornecida, ARQUIVO é executado com um ambiente nulo. A opção"
+
+#~ msgid "option means to make set argv[0] of the executed process to NAME."
+#~ msgstr "`-a' significa atribuir NOME para argv[0] do processo executado."
+
+#~ msgid "If the file cannot be executed and the shell is not interactive,"
+#~ msgstr ""
+#~ "Se o arquivo não puder ser executado e a `shell' não for interativa,"
+
+#~ msgid "then the shell exits, unless the variable \"no_exit_on_failed_exec\""
+#~ msgstr ""
+#~ "então a `shell' termina, a menos que a variável \"no_exit_on_failed_exec\""
+
+#~ msgid "is set."
+#~ msgstr "esteja inicializada."
+
+#~ msgid "is that of the last command executed."
+#~ msgstr "de saída é igual ao do último comando executado."
+
+#~ msgid ""
+#~ "FIRST and LAST can be numbers specifying the range, or FIRST can be a"
+#~ msgstr "PRIMEIRO e ÚLTIMO podem ser números especificando o intervalo, ou"
+
+#~ msgid "string, which means the most recent command beginning with that"
+#~ msgstr "PRIMEIRO pode ser uma cadeia de caracteres, representando o comando"
+
+#~ msgid "string."
+#~ msgstr "mais recente começado por estes caracteres."
+
+#~ msgid ""
+#~ " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR,"
+#~ msgstr ""
+#~ " -e EDITOR seleciona qual editor usar. O padrão é FCEDIT, depois "
+#~ "EDITOR,"
+
+#~ msgid ""
+#~ " then the editor which corresponds to the current readline editing"
+#~ msgstr ""
+#~ " depois o editor correspondente ao modo de edição atual da leitura"
+
+#~ msgid " mode, then vi."
+#~ msgstr " de linha, e depois o vi."
+
+#~ msgid " -l means list lines instead of editing."
+#~ msgstr " -l indica para listar as linha em vez de editá-las."
+
+#~ msgid " -n means no line numbers listed."
+#~ msgstr " -n indica para não listar os números das linhas."
+
+#~ msgid ""
+#~ " -r means reverse the order of the lines (making it newest listed "
+#~ "first)."
+#~ msgstr ""
+#~ " -r faz reverter a ordem das linhas (a última torna-se a primeira)."
+
+#~ msgid "With the `fc -s [pat=rep ...] [command]' format, the command is"
+#~ msgstr ""
+#~ "No formato `fc -s [ANTIGO=NOVO ...] [COMANDO]', o comando é executado"
+
+#~ msgid "re-executed after the substitution OLD=NEW is performed."
+#~ msgstr "novamente após a substituição de ANTIGO por NOVO ser realizada."
+
+#~ msgid "A useful alias to use with this is r='fc -s', so that typing `r cc'"
+#~ msgstr ""
+#~ "Um alias útil a ser usado é r='fc -s' para que, ao se digitar `r cc',"
+
+#~ msgid "runs the last command beginning with `cc' and typing `r' re-executes"
+#~ msgstr "seja executado o último comando começado por `cc' e, ao se digitar"
+
+#~ msgid "JOB_SPEC is not present, the shell's notion of the current job is"
+#~ msgstr ""
+#~ "Se JOB-ESPECIFICADO não estiver presente, a noção da `shell' do trabalho"
+
+#~ msgid "used."
+#~ msgstr "atual é utilizada."
+
+#~ msgid "Place JOB_SPEC in the background, as if it had been started with"
+#~ msgstr ""
+#~ "Colocar JOB-ESPECIFICADO no segundo plano, como se tivesse sido ativado"
+
+#~ msgid "`&'. If JOB_SPEC is not present, the shell's notion of the current"
+#~ msgstr ""
+#~ "com `&'. Se JOB-ESPECIFICADO não estiver presente, a noção da `shell'"
+
+#~ msgid "job is used."
+#~ msgstr "do trabalho atual é utilizada."
+
+#~ msgid "For each NAME, the full pathname of the command is determined and"
+#~ msgstr ""
+#~ "Para cada NOME, o caminho completo do comando é determinado e lembrado."
+
+#~ msgid "remembered. If the -p option is supplied, PATHNAME is used as the"
+#~ msgstr ""
+#~ "Se a opção -p for fornecida, CAMINHO é utilizado como o caminho completo"
+
+#~ msgid "full pathname of NAME, and no path search is performed. The -r"
+#~ msgstr "para NOME, e nenhuma procura de caminho é realizada. A opção -r"
+
+#~ msgid "option causes the shell to forget all remembered locations. If no"
+#~ msgstr ""
+#~ "faz com que a `shell' esqueça todas as localizações lembradas. Sem nenhum"
+
+#~ msgid ""
+#~ "arguments are given, information about remembered commands is displayed."
+#~ msgstr "argumento, as informações sobre os comandos lembrados são exibidas."
+
+#~ msgid "Display helpful information about builtin commands. If PATTERN is"
+#~ msgstr "Exibe informações úteis sobre os comandos internos. Se PADRÃO for"
+
+#~ msgid "specified, gives detailed help on all commands matching PATTERN,"
+#~ msgstr "especificado, fornece ajuda detalhada para todos os comandos que"
+
+#~ msgid "otherwise a list of the builtins is printed."
+#~ msgstr ""
+#~ "correspondem ao PADRÃO, senão a lista dos comandos internos é exibida."
+
+#~ msgid "Display the history list with line numbers. Lines listed with"
+#~ msgstr ""
+#~ "Exibe a lista histórica com os números das linhas. Linhas contendo um"
+
+#~ msgid "with a `*' have been modified. Argument of N says to list only"
+#~ msgstr "`*' foram modificadas. O argumento N faz listar somente as últimas"
+
+#~ msgid "the last N lines. The -c option causes the history list to be"
+#~ msgstr "N linhas. A opção -c faz com que a lista histórica seja apagada"
+
+#~ msgid ""
+#~ "cleared by deleting all of the entries. The `-w' option writes out the"
+#~ msgstr ""
+#~ "removendo todas as entradas. A opção `-w' escreve o histórico atual no"
+
+#~ msgid ""
+#~ "current history to the history file; `-r' means to read the file and"
+#~ msgstr ""
+#~ "arquivo de histórico; A opção `-r' significa ler o arquivo e apensar seu"
+
+#~ msgid "append the contents to the history list instead. `-a' means"
+#~ msgstr ""
+#~ "conteúdo à lista histórica. A opção `-a' significa apensar as linhas de"
+
+#~ msgid "to append history lines from this session to the history file."
+#~ msgstr "histórico desta sessão ao arquivo de histórico."
+
+#~ msgid "Argument `-n' means to read all history lines not already read"
+#~ msgstr "A opção `-n' faz ler todas as linhas de histórico ainda não lidas"
+
+#~ msgid "from the history file and append them to the history list. If"
+#~ msgstr ""
+#~ "do arquivo histórico, e apensá-las à lista de histórico. Se ARQUIVO"
+
+#~ msgid "FILENAME is given, then that is used as the history file else"
+#~ msgstr "for fornecido, então este é usado como arquivo de histórico, senão"
+
+#~ msgid "if $HISTFILE has a value, that is used, else ~/.bash_history."
+#~ msgstr ""
+#~ "se $HISTFILE possui valor, este é usado, senão ~/.bash_history. Se a"
+
+#~ msgid "If the -s option is supplied, the non-option ARGs are appended to"
+#~ msgstr ""
+#~ "opção -s for fornecida, os ARGs, que não forem opções, são apensados à"
+
+#~ msgid "the history list as a single entry. The -p option means to perform"
+#~ msgstr ""
+#~ "lista histórica como uma única entrada. A opção -p significa realizar a"
+
+#~ msgid ""
+#~ "history expansion on each ARG and display the result, without storing"
+#~ msgstr ""
+#~ "expansão da história em cada ARG e exibir o resultado, sem armazenar"
+
+#~ msgid "anything in the history list."
+#~ msgstr "nada na lista de histórico."
+
+#~ msgid "Lists the active jobs. The -l option lists process id's in addition"
+#~ msgstr ""
+#~ "Lista os trabalhos ativos. A opção -l lista os ID's dos processos além"
+
+#~ msgid "to the normal information; the -p option lists process id's only."
+#~ msgstr ""
+#~ "das informações usuais; a opção -p lista somente os ID's dos processos."
+
+#~ msgid ""
+#~ "If -n is given, only processes that have changed status since the last"
+#~ msgstr ""
+#~ "Se -n for fornecido, somente os processos que mudaram de status desde a"
+
+#~ msgid ""
+#~ "notification are printed. JOBSPEC restricts output to that job. The"
+#~ msgstr ""
+#~ "última notificação são exibidos. JOB-ESPECIFICADO restringe a saída a "
+#~ "este"
+
+#~ msgid "-r and -s options restrict output to running and stopped jobs only,"
+#~ msgstr ""
+#~ "trabalho. As opções -r e -s restringem a saída apenas aos trabalhos"
+
+#~ msgid "respectively. Without options, the status of all active jobs is"
+#~ msgstr ""
+#~ "executando e parados, respectivamente. Sem opções, o status de todos os"
+
+#~ msgid ""
+#~ "printed. If -x is given, COMMAND is run after all job specifications"
+#~ msgstr ""
+#~ "trabalhos ativos são exibidos. Se -x for fornecido, COMANDO é executado"
+
+#~ msgid ""
+#~ "that appear in ARGS have been replaced with the process ID of that job's"
+#~ msgstr ""
+#~ "após todas as especificações de trabalho que aparecem em ARGS terem sido"
+
+#~ msgid "process group leader."
+#~ msgstr "substituídas pelo ID do processo líder deste grupo de processos."
+
+#~ msgid "Removes each JOBSPEC argument from the table of active jobs."
+#~ msgstr ""
+#~ "Remove cada argumento JOB-ESPECIFICADO da tabela de trabalhos ativos."
+
+#~ msgid "Send the processes named by PID (or JOB) the signal SIGSPEC. If"
+#~ msgstr ""
+#~ "Envia ao processo identificado pelo PID (ou JOB) o sinal SIGSPEC. Se"
+
+#~ msgid ""
+#~ "SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'"
+#~ msgstr ""
+#~ "SIGSPEC não estiver presente, então SIGTERM é assumido. A opção `-l'"
+
+#~ msgid "lists the signal names; if arguments follow `-l' they are assumed to"
+#~ msgstr ""
+#~ "lista os nomes dos sinais; havendo argumentos após `-l', são assumidos"
+
+#~ msgid "be signal numbers for which names should be listed. Kill is a shell"
+#~ msgstr ""
+#~ "como sendo os números dos sinais cujos nomes devem ser exibidos. Kill"
+
+#~ msgid "builtin for two reasons: it allows job IDs to be used instead of"
+#~ msgstr ""
+#~ "é um comando interno por duas razões: permite o uso do ID do trabalho em"
+
+#~ msgid "process IDs, and, if you have reached the limit on processes that"
+#~ msgstr ""
+#~ "vez do ID do processo e, caso tenha sido atingido o limite de processos "
+#~ "que"
+
+#~ msgid ""
+#~ "you can create, you don't have to start a process to kill another one."
+#~ msgstr ""
+#~ "podem ser criados, não é necessário um novo processo para remover outro."
+
+#~ msgid "Each ARG is an arithmetic expression to be evaluated. Evaluation"
+#~ msgstr "Cada ARG é uma expressão aritmética a ser avaliada. A avaliação é"
+
+#~ msgid "is done in long integers with no check for overflow, though division"
+#~ msgstr ""
+#~ "feita usando inteiros longos sem verificar estouro, embora a divisão"
+
+#~ msgid "by 0 is trapped and flagged as an error. The following list of"
+#~ msgstr "por 0 seja capturada e indicada como erro. A lista abaixo está"
+
+#~ msgid "operators is grouped into levels of equal-precedence operators."
+#~ msgstr "grupada em níveis de igual de precedência dos operadores."
+
+#~ msgid "The levels are listed in order of decreasing precedence."
+#~ msgstr "Os níveis estão listados em ordem decrescente de precedência."
+
+#~ msgid "\t-, +\t\tunary minus, plus"
+#~ msgstr "\t-, +\t\tmenos, mais unários"
+
+#~ msgid "\t!, ~\t\tlogical and bitwise negation"
+#~ msgstr "\t!, ~\t\tnegação lógica e bit a bit"
+
+#~ msgid "\t*, /, %\t\tmultiplication, division, remainder"
+#~ msgstr "\t*, /, %\t\tmultiplicação, divisão, resto"
+
+#~ msgid "\t+, -\t\taddition, subtraction"
+#~ msgstr "\t+, -\t\tadição, subtração"
+
+#~ msgid "\t<<, >>\t\tleft and right bitwise shifts"
+#~ msgstr "\t<<, >>\t\tdeslocamento à esquerda e à direita bit a bit"
+
+#~ msgid "\t<=, >=, <, >\tcomparison"
+#~ msgstr "\t<=, >=, <, >\tcomparação"
+
+#~ msgid "\t==, !=\t\tequality, inequality"
+#~ msgstr "\t==, !=\t\tigualdade, desigualdade"
+
+#~ msgid "\t&\t\tbitwise AND"
+#~ msgstr "\t&\t\tE bit a bit"
+
+#~ msgid "\t^\t\tbitwise XOR"
+#~ msgstr "\t^\t\tOU Exclusivo (XOR) bit a bit"
+
+#~ msgid "\t|\t\tbitwise OR"
+#~ msgstr "\t|\t\tOU Inclusivo (OR) bit a bit"
+
+#~ msgid "\t&&\t\tlogical AND"
+#~ msgstr "\t&&\t\tE lógico"
+
+#~ msgid "\t||\t\tlogical OR"
+#~ msgstr "\t||\t\tOU lógico"
+
+#~ msgid "\texpr ? expr : expr"
+#~ msgstr "\texpr ? expr : expr"
+
+#~ msgid "\t\t\tconditional expression"
+#~ msgstr "\t\t\texpressão condicional"
+
+#~ msgid "\t=, *=, /=, %=,"
+#~ msgstr "\t=, *=, /=, %=,"
+
+#~ msgid "\t+=, -=, <<=, >>=,"
+#~ msgstr "\t+=, -=, <<=, >>=,"
+
+#~ msgid "\t&=, ^=, |=\tassignment"
+#~ msgstr "\t&=, ^=, |=\tatribuição"
+
+#~ msgid "is replaced by its value (coerced to a long integer) within"
+#~ msgstr "substituído pelo seu valor (convertido em inteiro longo) dentro"
+
+#~ msgid "an expression. The variable need not have its integer attribute"
+#~ msgstr "da expressão. A variável não precisa ter seu atributo inteiro"
+
+#~ msgid "turned on to be used in an expression."
+#~ msgstr "ativo para ser usada em uma expressão."
+
+#~ msgid "Operators are evaluated in order of precedence. Sub-expressions in"
+#~ msgstr ""
+#~ "Os operadores são avaliados em ordem de precedência. Sub-expressões"
+
+#~ msgid "parentheses are evaluated first and may override the precedence"
+#~ msgstr "entre parênteses são avaliadas primeiro e podem prevalecer sobre as"
+
+#~ msgid "rules above."
+#~ msgstr "regras de precedência anteriores."
+
+#~ msgid "If the last ARG evaluates to 0, let returns 1; 0 is returned"
+#~ msgstr "Se o último argumento for avaliado como 0, `let' retorna 1, caso"
+
+#~ msgid "otherwise."
+#~ msgstr "contrário, retorna 0."
+
+#~ msgid "One line is read from the standard input, and the first word is"
+#~ msgstr "Uma linha é lida a partir da entrada padrão, e a primeira palavra é"
+
+#~ msgid ""
+#~ "assigned to the first NAME, the second word to the second NAME, and so"
+#~ msgstr ""
+#~ "atribuída ao primeiro NOME, a segunda ao segundo NOME, e assim por diante,"
+
+#~ msgid ""
+#~ "on, with leftover words assigned to the last NAME. Only the characters"
+#~ msgstr ""
+#~ "com as palavras restantes atribuídas ao último NOME. Somente os "
+#~ "caracteres"
+
+#~ msgid "found in $IFS are recognized as word delimiters. The return code is"
+#~ msgstr ""
+#~ "encontrados em $IFS são reconhecidos como delimitadores. O código de "
+#~ "retorno"
+
+#~ msgid ""
+#~ "zero, unless end-of-file is encountered. If no NAMEs are supplied, the"
+#~ msgstr ""
+#~ "é zero, a menos que EOF seja encontrado. Se nenhum NOME for fornecido,"
+
+#~ msgid ""
+#~ "line read is stored in the REPLY variable. If the -r option is given,"
+#~ msgstr ""
+#~ "a linha lida é armazenada na variável REPLY. Se a opção -r for fornecida,"
+
+#~ msgid "this signifies `raw' input, and backslash escaping is disabled. If"
+#~ msgstr ""
+#~ "significa entrada `textual', desabilitando a interpretação da contrabarra."
+
+#~ msgid "the `-p' option is supplied, the string supplied as an argument is"
+#~ msgstr ""
+#~ "Se a opção `-p' for fornecida a MENSAGEM fornecida como argumento é "
+#~ "exibida,"
+
+#~ msgid ""
+#~ "output without a trailing newline before attempting to read. If -a is"
+#~ msgstr ""
+#~ "sem o caracter de nova linha, antes de efetuar a leitura. Se a opção -a"
+
+#~ msgid ""
+#~ "supplied, the words read are assigned to sequential indices of ARRAY,"
+#~ msgstr ""
+#~ "for fornecida, as palavras lidas são atribuídas aos índices seqüenciais"
+
+#~ msgid "starting at zero. If -e is supplied and the shell is interactive,"
+#~ msgstr ""
+#~ "da MATRIZ, começando por zero. Se a opção -e for fornecida, e a shell for"
+
+#~ msgid "readline is used to obtain the line."
+#~ msgstr "interativa, `readline' é utilizado para ler a linha."
+
+#~ msgid "is omitted, the return status is that of the last command."
+#~ msgstr "Se N for omitido, retorna o status do último comando executado."
+
+#~ msgid " -a Mark variables which are modified or created for export."
+#~ msgstr ""
+#~ " -a Marcar para exportação as variáveis que são criadas ou "
+#~ "modificadas."
+
+#~ msgid " -b Notify of job termination immediately."
+#~ msgstr " -b Notificar imediatamente o término do trabalho."
+
+#~ msgid " -e Exit immediately if a command exits with a non-zero status."
+#~ msgstr ""
+#~ " -e Terminar imediatamente se um comando terminar com status != 0."
+
+#~ msgid " -f Disable file name generation (globbing)."
+#~ msgstr " -f Desabilitar a geração de nome de arquivo (metacaracteres)."
+
+#~ msgid " -h Remember the location of commands as they are looked up."
+#~ msgstr " -h Lembrar da localização dos comandos ao procurá-los."
+
+#~ msgid ""
+#~ " -i Force the shell to be an \"interactive\" one. Interactive shells"
+#~ msgstr " -i Forçar a `shell' ser do tipo \"interativa\". `Shells'"
+
+#~ msgid " always read `~/.bashrc' on startup."
+#~ msgstr " interativas sempre lêem `~/.bashrc' ao iniciar."
+
+#~ msgid " -k All assignment arguments are placed in the environment for a"
+#~ msgstr ""
+#~ " -k Todos os argumentos de atribuição são colocados no ambiente,"
+
+#~ msgid " command, not just those that precede the command name."
+#~ msgstr " e não somente os que precedem o nome do comando."
+
+#~ msgid " -m Job control is enabled."
+#~ msgstr " -m O controle de trabalho está habilitado."
+
+#~ msgid " -n Read commands but do not execute them."
+#~ msgstr " -n Ler os comandos, mas não executá-los."
+
+#~ msgid " -o option-name"
+#~ msgstr " -o NOME-DA-OPÇÃO"
+
+#~ msgid " Set the variable corresponding to option-name:"
+#~ msgstr " Inicializar a variável correspondente ao nome da opção:"
+
+#~ msgid " allexport same as -a"
+#~ msgstr " allexport o mesmo que -a"
+
+#~ msgid " braceexpand same as -B"
+#~ msgstr " braceexpand o mesmo que -B"
+
+#~ msgid " emacs use an emacs-style line editing interface"
+#~ msgstr ""
+#~ " emacs usar interface de edição de linha estilo emacs"
+
+#~ msgid " errexit same as -e"
+#~ msgstr " errexit o mesmo que -e"
+
+#~ msgid " hashall same as -h"
+#~ msgstr " hashall o mesmo que -h"
+
+#~ msgid " histexpand same as -H"
+#~ msgstr " histexpand o mesmo que -H"
+
+#~ msgid " ignoreeof the shell will not exit upon reading EOF"
+#~ msgstr " ignoreeof a `shell' não termina após ler EOF"
+
+#~ msgid " interactive-comments"
+#~ msgstr " interactive-comments"
+
+#~ msgid ""
+#~ " allow comments to appear in interactive commands"
+#~ msgstr ""
+#~ " permite comentários em comandos interativos"
+
+#~ msgid " keyword same as -k"
+#~ msgstr " keyword o mesmo que -k"
+
+#~ msgid " monitor same as -m"
+#~ msgstr " monitor o mesmo que -m"
+
+#~ msgid " noclobber same as -C"
+#~ msgstr " noclobber o mesmo que -C"
+
+#~ msgid " noexec same as -n"
+#~ msgstr " noexec o mesmo que -n"
+
+#~ msgid " noglob same as -f"
+#~ msgstr " noglob o mesmo que -f"
+
+#~ msgid " notify save as -b"
+#~ msgstr " notify o mesmo que -b"
+
+#~ msgid " nounset same as -u"
+#~ msgstr " nounset o mesmo que -u"
+
+#~ msgid " onecmd same as -t"
+#~ msgstr " onecmd o mesmo que -t"
+
+#~ msgid " physical same as -P"
+#~ msgstr " physical o mesmo que -P"
+
+#~ msgid ""
+#~ " posix change the behavior of bash where the default"
+#~ msgstr ""
+#~ " posix mudar o comportamento do `bash' onde o padrão"
+
+#~ msgid ""
+#~ " operation differs from the 1003.2 standard to"
+#~ msgstr ""
+#~ " for diferente do padrão 1003.2, para tornar"
+
+#~ msgid " match the standard"
+#~ msgstr " igual ao padrão"
+
+#~ msgid " privileged same as -p"
+#~ msgstr " privileged o mesmo que -p"
+
+#~ msgid " verbose same as -v"
+#~ msgstr " verbose o mesmo que -v"
+
+#~ msgid " vi use a vi-style line editing interface"
+#~ msgstr ""
+#~ " vi usar interface de edição de linha estilo vi"
+
+#~ msgid " xtrace same as -x"
+#~ msgstr " xtrace o mesmo que -x"
+
+#~ msgid ""
+#~ " -p Turned on whenever the real and effective user ids do not match."
+#~ msgstr ""
+#~ " -p Habilitado sempre que o usuário real e efetivo forem diferentes."
+
+#~ msgid " Disables processing of the $ENV file and importing of shell"
+#~ msgstr ""
+#~ " Desabilita o processamento do arquivo $ENV e importação das "
+#~ "funções"
+
+#~ msgid ""
+#~ " functions. Turning this option off causes the effective uid and"
+#~ msgstr ""
+#~ " da `shell'. Desabilitando esta opção faz com que o `uid' e `gid'"
+
+#~ msgid " gid to be set to the real uid and gid."
+#~ msgstr " efetivos sejam feitos o mesmo que o `uid' e `gid' reais."
+
+#~ msgid " -t Exit after reading and executing one command."
+#~ msgstr " -t Sair após ler e executar um comando."
+
+#~ msgid " -u Treat unset variables as an error when substituting."
+#~ msgstr ""
+#~ " -u Tratar como erro as variáveis não inicializadas na substituição."
+
+#~ msgid " -v Print shell input lines as they are read."
+#~ msgstr " -v Exibir as linhas de entrada da `shell' ao lê-las."
+
+#~ msgid " -x Print commands and their arguments as they are executed."
+#~ msgstr " -x Exibir os comandos e seus argumentos ao executá-los."
+
+#~ msgid " -B the shell will perform brace expansion"
+#~ msgstr " -B a `shell' irá realizar a expansão das chaves {}"
+
+#~ msgid " -H Enable ! style history substitution. This flag is on"
+#~ msgstr " -H Habilitar o estilo ! para substituição do histórico."
+
+#~ msgid " by default."
+#~ msgstr " Esta opção está ativa por padrão."
+
+#~ msgid " -C If set, disallow existing regular files to be overwritten"
+#~ msgstr " -C Não permite que arquivos regulares existentes sejam"
+
+#~ msgid " by redirection of output."
+#~ msgstr " sobrescritos pelo redirecionamento da saída."
+
+#~ msgid " -P If set, do not follow symbolic links when executing commands"
+#~ msgstr " -P Não seguir os vínculos simbólicos ao executar comandos,"
+
+#~ msgid " such as cd which change the current directory."
+#~ msgstr " tais como `cd', que troca o diretório atual."
+
+#~ msgid "Using + rather than - causes these flags to be turned off. The"
+#~ msgstr "Usando + em vez de - faz com que as opções sejam desabilitadas. As"
+
+#~ msgid "flags can also be used upon invocation of the shell. The current"
+#~ msgstr ""
+#~ "opções também podem ser usadas na chamada da `shell'. O conjunto atual"
+
+#~ msgid ""
+#~ "set of flags may be found in $-. The remaining n ARGs are positional"
+#~ msgstr ""
+#~ "de opções pode ser encontrado em $-. Os n ARGs restantes são parâmetros"
+
+#~ msgid "parameters and are assigned, in order, to $1, $2, .. $n. If no"
+#~ msgstr "posicionais e são atribuídos, em ordem, a $1, $2, .. $n. Se nenhum"
+
+#~ msgid "ARGs are given, all shell variables are printed."
+#~ msgstr "ARG for fornecido, todas as variáveis da `shell' são exibidas."
+
+#~ msgid "For each NAME, remove the corresponding variable or function. Given"
+#~ msgstr ""
+#~ "Para cada NOME, remove a variável ou a função correspondente. Usando-se a"
+
+#~ msgid "the `-v', unset will only act on variables. Given the `-f' flag,"
+#~ msgstr ""
+#~ "opção `-v', `unset' atua somente nas variáveis. Usando-se a opção `-f'"
+
+#~ msgid "unset will only act on functions. With neither flag, unset first"
+#~ msgstr "`unset' atua somente nas funções. Sem nenhuma opção, inicialmente"
+
+#~ msgid "tries to unset a variable, and if that fails, then tries to unset a"
+#~ msgstr "`unset' tenta remover uma variável e, se falhar, tenta remover uma"
+
+#~ msgid ""
+#~ "function. Some variables (such as PATH and IFS) cannot be unset; also"
+#~ msgstr ""
+#~ "função. Algumas variáveis (como PATH e IFS) não podem ser removidas."
+
+#~ msgid "see readonly."
+#~ msgstr "Veja também o comando `readonly'."
+
+#~ msgid "NAMEs are marked for automatic export to the environment of"
+#~ msgstr ""
+#~ "NOMEs são marcados para serem automaticamente exportados para o ambiente"
+
+#~ msgid "subsequently executed commands. If the -f option is given,"
+#~ msgstr "dos comando executados a seguir. Se a opção -f for fornecida,"
+
+#~ msgid "the NAMEs refer to functions. If no NAMEs are given, or if `-p'"
+#~ msgstr ""
+#~ "os NOMEs se referem a funções. Se nenhum nome for fornecido, ou se `-p'"
+
+#~ msgid "is given, a list of all names that are exported in this shell is"
+#~ msgstr ""
+#~ "for usado, uma lista com todos os nomes que são exportados nesta `shell' é"
+
+#~ msgid "printed. An argument of `-n' says to remove the export property"
+#~ msgstr ""
+#~ "exibida. O argumento `-n' faz remover a propriedade de exportação dos"
+
+#~ msgid "from subsequent NAMEs. An argument of `--' disables further option"
+#~ msgstr "NOMEs subseqüentes. O argumento `--' desabilita o processamento de"
+
+#~ msgid "processing."
+#~ msgstr "opções posteriores."
+
+#~ msgid ""
+#~ "The given NAMEs are marked readonly and the values of these NAMEs may"
+#~ msgstr ""
+#~ "Os NOMEs são marcados como somente para leitura, e os valores destes"
+
+#~ msgid "not be changed by subsequent assignment. If the -f option is given,"
+#~ msgstr ""
+#~ "NOMEs não poderão ser alterados por novas atribuições. Se a opção -f for"
+
+#~ msgid "then functions corresponding to the NAMEs are so marked. If no"
+#~ msgstr ""
+#~ "fornecida, as funções correspondentes a NOMEs também são marcadas. Sem"
+
+#~ msgid ""
+#~ "arguments are given, or if `-p' is given, a list of all readonly names"
+#~ msgstr ""
+#~ "nenhum argumento, ou se `-p' for usado, uma lista com todos os nomes"
+
+#~ msgid ""
+#~ "is printed. An argument of `-n' says to remove the readonly property"
+#~ msgstr ""
+#~ "somente para leitura é exibida. O argumento `-n' remove a propriedade"
+
+#~ msgid "from subsequent NAMEs. The `-a' option means to treat each NAME as"
+#~ msgstr "somente para leitura. A opção `-a' faz tratar cada NOME como uma"
+
+#~ msgid "an array variable. An argument of `--' disables further option"
+#~ msgstr ""
+#~ "variável tipo matriz. Um argumento `--' desabilita o processamento de"
+
+#~ msgid "not given, it is assumed to be 1."
+#~ msgstr "Se N não for especificado, o valor 1 é assumido ($2 vira $1 ...)."
+
+#~ msgid "Read and execute commands from FILENAME and return. The pathnames"
+#~ msgstr "Ler e executar os comandos em ARQUIVO e retornar. Os caminhos em"
+
+#~ msgid "in $PATH are used to find the directory containing FILENAME."
+#~ msgstr "$PATH são usados para encontrar o diretório contendo o ARQUIVO."
+
+#~ msgid "Suspend the execution of this shell until it receives a SIGCONT"
+#~ msgstr ""
+#~ "Suspender a execução desta `shell' até que o sinal SIGCONT seja recebido."
+
+#~ msgid "signal. The `-f' if specified says not to complain about this"
+#~ msgstr "Se a opção `-f' for especificada indica para não reclamar sobre ser"
+
+#~ msgid "being a login shell if it is; just suspend anyway."
+#~ msgstr ""
+#~ "uma `shell de login', caso seja; simplesmente suspender de qualquer forma."
+
+#~ msgid "Exits with a status of 0 (trueness) or 1 (falseness) depending on"
+#~ msgstr ""
+#~ "Termina com status 0 (verdadeiro) ou 1 (falso) conforme EXPR for avaliada."
+
+#~ msgid "the evaluation of EXPR. Expressions may be unary or binary. Unary"
+#~ msgstr ""
+#~ "As expressões podem ser unárias ou binárias. As expressões unárias são"
+
+#~ msgid "expressions are often used to examine the status of a file. There"
+#~ msgstr ""
+#~ "muito usadas para examinar o status de um arquivo. Existem, também,"
+
+#~ msgid "are string operators as well, and numeric comparison operators."
+#~ msgstr ""
+#~ "operadores para cadeias de caracteres (strings) e comparações numéricas."
+
+#~ msgid "File operators:"
+#~ msgstr "Operadores para arquivos:"
+
+#~ msgid " -b FILE True if file is block special."
+#~ msgstr " -b ARQUIVO Verdade se o arquivo for do tipo especial de bloco."
+
+#~ msgid " -c FILE True if file is character special."
+#~ msgstr ""
+#~ " -c ARQUIVO Verdade se o arquivo for do tipo especial de caracter."
+
+#~ msgid " -d FILE True if file is a directory."
+#~ msgstr " -d ARQUIVO Verdade se o arquivo for um diretório."
+
+#~ msgid " -e FILE True if file exists."
+#~ msgstr " -e ARQUIVO Verdade se o arquivo existir."
+
+#~ msgid " -f FILE True if file exists and is a regular file."
+#~ msgstr " -f ARQUIVO Verdade se o arquivo existir e for do tipo regular."
+
+#~ msgid " -g FILE True if file is set-group-id."
+#~ msgstr ""
+#~ " -g ARQUIVO Verdade se o arquivo tiver o bit \"set-group-id\" ativo."
+
+#~ msgid " -h FILE True if file is a symbolic link. Use \"-L\"."
+#~ msgstr ""
+#~ " -h ARQUIVO Verdade se arquivo for um vínculo simbólico. Usar \"-L\"."
+
+#~ msgid " -L FILE True if file is a symbolic link."
+#~ msgstr " -L ARQUIVO Verdade se o arquivo for um vínculo simbólico."
+
+#~ msgid " -k FILE True if file has its \"sticky\" bit set."
+#~ msgstr " -k ARQUIVO Verdade se o arquivo tiver o bit \"sticky\" ativo."
+
+#~ msgid " -p FILE True if file is a named pipe."
+#~ msgstr " -p ARQUIVO Verdade se o arquivo for um `named pipe'."
+
+#~ msgid " -r FILE True if file is readable by you."
+#~ msgstr ""
+#~ " -r ARQUIVO Verdade se você tiver autorização para ler o arquivo."
+
+#~ msgid " -s FILE True if file exists and is not empty."
+#~ msgstr " -s ARQUIVO Verdade se o arquivo existir e não estiver vazio."
+
+#~ msgid " -S FILE True if file is a socket."
+#~ msgstr " -S ARQUIVO Verdade se o arquivo for um soquete."
+
+#~ msgid " -t FD True if FD is opened on a terminal."
+#~ msgstr ""
+#~ " -t FD Verdade se o descritor de arquivo (FD) estiver aberto\n"
+#~ " em um terminal."
+
+#~ msgid " -u FILE True if the file is set-user-id."
+#~ msgstr ""
+#~ " -u ARQUIVO Verdade se o arquivo tiver o bit \"set-user-id\" ativo."
+
+#~ msgid " -w FILE True if the file is writable by you."
+#~ msgstr ""
+#~ " -w ARQUIVO Verdade se você tiver autorização para escrever no "
+#~ "arquivo."
+
+#~ msgid " -x FILE True if the file is executable by you."
+#~ msgstr ""
+#~ " -x ARQUIVO Verdade se você tiver autorização para executar o arquivo."
+
+#~ msgid " -O FILE True if the file is effectively owned by you."
+#~ msgstr ""
+#~ " -O ARQUIVO Verdade se o arquivo pertencer ao seu usuário efetivo."
+
+#~ msgid ""
+#~ " -G FILE True if the file is effectively owned by your group."
+#~ msgstr ""
+#~ " -G ARQUIVO Verdade se o arquivo pertencer ao seu grupo efetivo."
+
+#~ msgid " FILE1 -nt FILE2 True if file1 is newer than (according to"
+#~ msgstr " ARQ1 -nt ARQ2 Verdade se ARQ1 for mais novo (conforme a data"
+
+#~ msgid " modification date) file2."
+#~ msgstr " de modificação) do que ARQ2."
+
+#~ msgid " FILE1 -ot FILE2 True if file1 is older than file2."
+#~ msgstr " ARQ1 -ot ARQ2 Verdade se ARQ1 for mais antigo que ARQ2."
+
+#~ msgid " FILE1 -ef FILE2 True if file1 is a hard link to file2."
+#~ msgstr ""
+#~ " ARQ1 -ef ARQ2 Verdade se ARQ1 for um vínculo direto para ARQ2.\n"
+#~ " (mesma unidade e mesmo número do inode)"
+
+#~ msgid "String operators:"
+#~ msgstr "Operadores para cadeias de caracteres (strings):"
+
+#~ msgid " -z STRING True if string is empty."
+#~ msgstr " -z STRING Verdade se STRING estiver vazia."
+
+#~ msgid " -n STRING"
+#~ msgstr " -n STRING"
+
+#~ msgid " STRING True if string is not empty."
+#~ msgstr " STRING Verdade se STRING não estiver vazia."
+
+#~ msgid " STRING1 = STRING2"
+#~ msgstr " STRING1 = STRING2"
+
+#~ msgid " True if the strings are equal."
+#~ msgstr " Verdade se STRING1 for idêntica à STRING2."
+
+#~ msgid " STRING1 != STRING2"
+#~ msgstr " STRING1 != STRING2"
+
+#~ msgid " True if the strings are not equal."
+#~ msgstr " Verdade se STRING1 não for idêntica à STRING2."
+
+#~ msgid " STRING1 < STRING2"
+#~ msgstr " STRING1 < STRING2"
+
+#~ msgid ""
+#~ " True if STRING1 sorts before STRING2 lexicographically"
+#~ msgstr ""
+#~ " Verdade se STRING1 tiver ordenação anterior à STRING2."
+
+#~ msgid " STRING1 > STRING2"
+#~ msgstr " STRING1 > STRING2"
+
+#~ msgid ""
+#~ " True if STRING1 sorts after STRING2 lexicographically"
+#~ msgstr ""
+#~ " Verdade se STRING1 tiver ordenação posterior à STRING2."
+
+#~ msgid "Other operators:"
+#~ msgstr "Outros operadores:"
+
+#~ msgid " ! EXPR True if expr is false."
+#~ msgstr " ! EXPR Verdade se a expressão EXPR for falsa."
+
+#~ msgid " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true."
+#~ msgstr " EXPR1 -a EXPR2 Verdade se EXPR1 `E' EXPR2 forem verdadeiras."
+
+#~ msgid " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true."
+#~ msgstr " EXPR1 -o EXPR2 Verdade se EXPR1 `OU' EXPR2 for verdadeira."
+
+#~ msgid " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,"
+#~ msgstr " arg1 OP arg2 Testes aritméticos. OP pode ser -eq, -ne,"
+
+#~ msgid " -lt, -le, -gt, or -ge."
+#~ msgstr " -lt, -le, -gt, ou -ge."
+
+#~ msgid "Arithmetic binary operators return true if ARG1 is equal, not-equal,"
+#~ msgstr ""
+#~ "Operadores aritméticos binários retornam verdadeiro se ARG1 for igual,"
+
+#~ msgid ""
+#~ "less-than, less-than-or-equal, greater-than, or greater-than-or-equal"
+#~ msgstr "diferente, menor, menor ou igual, maior, ou maior ou igual do que"
+
+#~ msgid "than ARG2."
+#~ msgstr "ARG2, respectivamente."
+
+#~ msgid "This is a synonym for the \"test\" builtin, but the last"
+#~ msgstr "É um sinônimo para o comando interno \"test\", mas o último"
+
+#~ msgid "the shell."
+#~ msgstr "executados por esta `shell'."
+
+#~ msgid "The command ARG is to be read and executed when the shell receives"
+#~ msgstr ""
+#~ "O comando em ARG é para ser lido e executado quando a `shell' receber o(s)"
+
+#~ msgid "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are"
+#~ msgstr ""
+#~ "sinal(is) SINAL-ESPEC. Se ARG for omitido, todos os sinais especificados"
+
+#~ msgid "reset to their original values. If ARG is the null string each"
+#~ msgstr ""
+#~ "retornam aos seus valores originais. Se ARG for uma string nula, cada"
+
+#~ msgid "SIGNAL_SPEC is ignored by the shell and by the commands it invokes."
+#~ msgstr ""
+#~ "SINAL-ESPEC é ignorado pela `shell' e pelos comandos chamados por ela."
+
+#~ msgid "If SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from"
+#~ msgstr ""
+#~ "Se SINAL-ESPEC for EXIT (0) o comando em ARG é executado na saída da"
+
+#~ msgid "the shell. If SIGNAL_SPEC is DEBUG, ARG is executed after every"
+#~ msgstr ""
+#~ "`shell'. Se SINAL-ESPEC for DEBUG, o comando em ARG é executado após cada"
+
+#~ msgid "command. If ARG is `-p' then the trap commands associated with"
+#~ msgstr ""
+#~ "comando. Se ARG for `-p' então os comandos de captura associados com cada"
+
+#~ msgid "each SIGNAL_SPEC are displayed. If no arguments are supplied or if"
+#~ msgstr "SINAL-ESPEC são exibidos. Se nenhum argumento for fornecido, ou se"
+
+#~ msgid "only `-p' is given, trap prints the list of commands associated with"
+#~ msgstr ""
+#~ "somente `-p' for fornecido, é exibida a lista dos comandos associados"
+
+#~ msgid ""
+#~ "each signal number. SIGNAL_SPEC is either a signal name in <signal.h>"
+#~ msgstr ""
+#~ "com cada número de sinal. SINAL-ESPEC é um nome de sinal em <signal.h> ou"
+
+#~ msgid ""
+#~ "or a signal number. `trap -l' prints a list of signal names and their"
+#~ msgstr ""
+#~ "um número de sinal. `trap -l' exibe a lista de nomes de sinais com seus"
+
+#~ msgid "corresponding numbers. Note that a signal can be sent to the shell"
+#~ msgstr ""
+#~ "números correspondentes. Note que o sinal pode ser enviado para a `shell'"
+
+#~ msgid "with \"kill -signal $$\"."
+#~ msgstr "através do comando \"kill -SINAL $$\"."
+
+#~ msgid "For each NAME, indicate how it would be interpreted if used as a"
+#~ msgstr "Para cada NOME, indica como este deve ser interpretado caso seja"
+
+#~ msgid "If the -t option is used, returns a single word which is one of"
+#~ msgstr ""
+#~ "Se a opção -t for fornecida, `type' retorna uma única palavra dentre"
+
+#~ msgid ""
+#~ "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an"
+#~ msgstr ""
+#~ "`alias', `keyword', `function', `builtin', `file' ou `', se NOME for um"
+
+#~ msgid ""
+#~ "alias, shell reserved word, shell function, shell builtin, disk file,"
+#~ msgstr ""
+#~ "alias, uma palavra reservada, função ou comando interno da shell, um "
+#~ "arquivo"
+
+#~ msgid "or unfound, respectively."
+#~ msgstr "em disco, ou não for encontrado, respectivamente."
+
+#~ msgid "If the -p flag is used, either returns the name of the disk file"
+#~ msgstr "Se a opção -p for fornecida, retorna o nome do arquivo em disco que"
+
+#~ msgid "that would be executed, or nothing if -t would not return `file'."
+#~ msgstr "deve ser executado, ou nada, caso -t não retorne `file'."
+
+#~ msgid "If the -a flag is used, displays all of the places that contain an"
+#~ msgstr "Se a opção -a for fornecida, exibe todos os locais que contém um"
+
+#~ msgid ""
+#~ "executable named `file'. This includes aliases and functions, if and"
+#~ msgstr ""
+#~ "arquivo executável chamado `ARQUIVO', incluindo os aliases e funções,"
+
+#~ msgid "only if the -p flag is not also used."
+#~ msgstr "mas somente se a opção -p não for fornecida conjuntamente."
+
+#~ msgid "Type accepts -all, -path, and -type in place of -a, -p, and -t,"
+#~ msgstr "O comando `type' aceita -all, -path, e -type no lugar de"
+
+#~ msgid "respectively."
+#~ msgstr "-a, -p, and -t, respectivamente."
+
+#~ msgid "Ulimit provides control over the resources available to processes"
+#~ msgstr ""
+#~ "Ulimit estabelece controle sobre os recursos disponíveis para os processos"
+
+#~ msgid "started by the shell, on systems that allow such control. If an"
+#~ msgstr ""
+#~ "iniciados por esta shell, em sistemas que permitem estes controles. Se uma"
+
+#~ msgid "option is given, it is interpreted as follows:"
+#~ msgstr "opção for fornecida, é interpretada como mostrado a seguir:"
+
+#~ msgid " -S\tuse the `soft' resource limit"
+#~ msgstr " -S\tutilizar os limites correntes (`soft') dos recursos"
+
+#~ msgid " -H\tuse the `hard' resource limit"
+#~ msgstr " -H\tutilizar os limites absolutos (`hard') dos recursos"
+
+#~ msgid " -a\tall current limits are reported"
+#~ msgstr " -a\ttodos os limites correntes são informados"
+
+#~ msgid " -c\tthe maximum size of core files created"
+#~ msgstr ""
+#~ " -c\to tamanho máximo para os arquivos de imagem do núcleo criados"
+
+#~ msgid " -d\tthe maximum size of a process's data segment"
+#~ msgstr " -d\to tamanho máximo do segmento de dados de um processo"
+
+#~ msgid " -m\tthe maximum resident set size"
+#~ msgstr ""
+#~ " -m\to tamanho máximo do conjunto de processos residentes em memória"
+
+#~ msgid " -s\tthe maximum stack size"
+#~ msgstr " -s\to tamanho máximo da pilha"
+
+#~ msgid " -t\tthe maximum amount of cpu time in seconds"
+#~ msgstr " -t\ta quantidade máxima de tempo de CPU em segundos"
+
+#~ msgid " -f\tthe maximum size of files created by the shell"
+#~ msgstr " -f\to tamanho máximo dos arquivos criados pela `shell'"
+
+#~ msgid " -p\tthe pipe buffer size"
+#~ msgstr " -p\to tamanho da área intermediária (buffer) do `pipe'"
+
+#~ msgid " -n\tthe maximum number of open file descriptors"
+#~ msgstr " -n\to número máximo de descritores de arquivos abertos"
+
+#~ msgid " -u\tthe maximum number of user processes"
+#~ msgstr " -u\to número máximo de processos do usuário"
+
+#~ msgid " -v\tthe size of virtual memory"
+#~ msgstr " -v\to tamanho da memória virtual"
+
+#~ msgid "If LIMIT is given, it is the new value of the specified resource."
+#~ msgstr ""
+#~ "Se LIMITE for fornecido, torna-se o novo valor do recurso especificado."
+
+#~ msgid "Otherwise, the current value of the specified resource is printed."
+#~ msgstr "Senão, o valor atual do recurso especificado é exibido."
+
+#~ msgid "If no option is given, then -f is assumed. Values are in 1k"
+#~ msgstr ""
+#~ "Se nenhuma opção for fornecida, então -f é assumido. Os valores são em"
+
+#~ msgid "increments, except for -t, which is in seconds, -p, which is in"
+#~ msgstr "incrementos de 1k, exceto para -t, que é em segundos, -p, que é em"
+
+#~ msgid "increments of 512 bytes, and -u, which is an unscaled number of"
+#~ msgstr "incrementos de 512 bytes, e -u, que é o número cardinal de"
+
+#~ msgid "processes."
+#~ msgstr "processos."
+
+#~ msgid ""
+#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if"
+#~ msgstr ""
+#~ "MODO é atribuído à máscara de criação de arquivos do usuário. Se omitido,"
+
+#~ msgid ""
+#~ "`-S' is supplied, the current value of the mask is printed. The `-S'"
+#~ msgstr ""
+#~ "ou se `-S' for especificado, a máscara em uso é exibida. A opção `-S'"
+
+#~ msgid ""
+#~ "option makes the output symbolic; otherwise an octal number is output."
+#~ msgstr "exibe símbolos na saída; sem esta opção um número octal é exibido."
+
+#~ msgid "If MODE begins with a digit, it is interpreted as an octal number,"
+#~ msgstr ""
+#~ "Se MODO começar por um dígito, é interpretado como sendo um número octal,"
+
+#~ msgid ""
+#~ "otherwise it is a symbolic mode string like that accepted by chmod(1)."
+#~ msgstr ""
+#~ "senão devem ser caracteres simbólicos, como os aceitos por chmod(1)."
+
+#~ msgid ""
+#~ "Wait for the specified process and report its termination status. If"
+#~ msgstr ""
+#~ "Aguardar pelo processo especificado e informar seu status de término. Se N"
+
+#~ msgid "N is not given, all currently active child processes are waited for,"
+#~ msgstr ""
+#~ "não for especificado, todos os processos filhos ativos são aguardados,"
+
+#~ msgid "and the return code is zero. N may be a process ID or a job"
+#~ msgstr "e o código de retorno é zero. N pode ser o ID de um processo ou a"
+
+#~ msgid "specification; if a job spec is given, all processes in the job's"
+#~ msgstr ""
+#~ "especificação de um trabalho; Se for a especificação de um trabalho, todos"
+
+#~ msgid "pipeline are waited for."
+#~ msgstr "os processos presentes no `pipeline' do trabalho são aguardados."
+
+#~ msgid "and the return code is zero. N is a process ID; if it is not given,"
+#~ msgstr ""
+#~ "e o código de retorno é zero. N é o ID de um processo; se N não for"
+
+#~ msgid "all child processes of the shell are waited for."
+#~ msgstr "especificado, todos os processos filhos da `shell' são aguardados."
+
+#~ msgid "The `for' loop executes a sequence of commands for each member in a"
+#~ msgstr ""
+#~ "O laço `for' executa a seqüência de comandos para cada membro na lista de"
+
+#~ msgid ""
+#~ "list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is"
+#~ msgstr ""
+#~ "items. Se `in PALAVRAS ...;' não estiver presente, então `in \"$@\"'"
+
+#~ msgid ""
+#~ "assumed. For each element in WORDS, NAME is set to that element, and"
+#~ msgstr ""
+#~ "(parâmetros posicionais) é assumido. Para cada elemento em PALAVRAS, NOME"
+
+#~ msgid "the COMMANDS are executed."
+#~ msgstr "assume seu valor, e os COMANDOS são executados."
+
+#~ msgid "The WORDS are expanded, generating a list of words. The"
+#~ msgstr ""
+#~ "As palavras são expandidas, gerando uma lista de palavras. O conjunto"
+
+#~ msgid "set of expanded words is printed on the standard error, each"
+#~ msgstr ""
+#~ "de palavras expandidas é enviado para a saída de erro padrão, cada uma"
+
+#~ msgid "preceded by a number. If `in WORDS' is not present, `in \"$@\"'"
+#~ msgstr ""
+#~ "precedida por um número. Se `in PALAVRAS' for omitido, `in \"$@\"' é"
+
+#~ msgid "is assumed. The PS3 prompt is then displayed and a line read"
+#~ msgstr "assumido. Em seguida o prompt PS3 é exibido, e uma linha é lida da"
+
+#~ msgid "from the standard input. If the line consists of the number"
+#~ msgstr ""
+#~ "entrada padrão. Se a linha consistir do número correspondente ao número"
+
+#~ msgid "corresponding to one of the displayed words, then NAME is set"
+#~ msgstr "de uma das palavras exibidas, então NOME é atribuído para esta"
+
+#~ msgid "to that word. If the line is empty, WORDS and the prompt are"
+#~ msgstr ""
+#~ "PALAVRA. Se a linha estiver vazia, PALAVRAS e o prompt são exibidos"
+
+#~ msgid "redisplayed. If EOF is read, the command completes. Any other"
+#~ msgstr ""
+#~ "novamente. Se EOF for lido, o comando termina. Qualquer outro valor"
+
+#~ msgid "value read causes NAME to be set to null. The line read is saved"
+#~ msgstr "lido faz com que NOME seja tornado nulo. A linha lida é salva"
+
+#~ msgid "in the variable REPLY. COMMANDS are executed after each selection"
+#~ msgstr "na variável REPLY. COMANDOS são executados após cada seleção"
+
+#~ msgid "until a break or return command is executed."
+#~ msgstr "até que o comando `break' ou `return' seja executado."
+
+#~ msgid "`|' is used to separate multiple patterns."
+#~ msgstr ""
+#~ "PALAVRA e PADRÃO. O caracter `|' é usado para separar múltiplos padrões."
+
+#~ msgid ""
+#~ "The if COMMANDS are executed. If the exit status is zero, then the then"
+#~ msgstr ""
+#~ "Os COMANDOS `if' são executados. Se os status de saída for zero, então os"
+
+#~ msgid ""
+#~ "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed"
+#~ msgstr ""
+#~ "COMANDOS `then' são executados, senão, os COMANDOS `elif' são executados "
+#~ "em"
+
+#~ msgid ""
+#~ "in turn, and if the exit status is zero, the corresponding then COMMANDS"
+#~ msgstr ""
+#~ "seqüência e, se o status de saída for zero, os COMANDOS `then' associados"
+
+#~ msgid ""
+#~ "are executed and the if command completes. Otherwise, the else COMMANDS"
+#~ msgstr ""
+#~ "são executados e o `if' termina. Senão, os COMANDOS da cláusula `else'"
+
+#~ msgid ""
+#~ "are executed, if present. The exit status is the exit status of the last"
+#~ msgstr ""
+#~ "são executados, se houver. O status de saída é o status de saída do"
+
+#~ msgid "command executed, or zero if no condition tested true."
+#~ msgstr ""
+#~ "último comando executado, ou zero, se nenhuma condição for verdadeira."
+
+#~ msgid "`while' COMMANDS has an exit status of zero."
+#~ msgstr "COMANDOS `while' tiver um status de saída igual a zero."
+
+#~ msgid "`until' COMMANDS has an exit status which is not zero."
+#~ msgstr "COMANDOS `until' tiver um status de saída diferente de zero."
+
+#~ msgid "Create a simple command invoked by NAME which runs COMMANDS."
+#~ msgstr "Cria um comando chamado NOME o qual executa COMANDOS."
+
+#~ msgid "Arguments on the command line along with NAME are passed to the"
+#~ msgstr "Os argumentos na linha de comando juntamente com NOME são passados"
+
+#~ msgid "function as $0 .. $n."
+#~ msgstr "para a função como $0 .. $n."
+
+#~ msgid "entire set of commands."
+#~ msgstr "redirecionar todo um conjunto de comandos."
+
+#~ msgid "This is similar to the `fg' command. Resume a stopped or background"
+#~ msgstr ""
+#~ "Semelhante ao comando `fg'. Prossegue a execução de um trabalho parado ou"
+
+#~ msgid "job. If you specifiy DIGITS, then that job is used. If you specify"
+#~ msgstr ""
+#~ "em segundo plano. Se DÍGITOS for especificado, então este trabalho é "
+#~ "usado."
+
+#~ msgid ""
+#~ "WORD, then the job whose name begins with WORD is used. Following the"
+#~ msgstr ""
+#~ "Se for especificado PALAVRA, o trabalho começado por PALAVRA é usado."
+
+#~ msgid "job specification with a `&' places the job in the background."
+#~ msgstr ""
+#~ "Seguindo-se a especificação por um `&' põe o trabalho em segundo plano."
+
+#~ msgid "BASH_VERSION The version numbers of this Bash."
+#~ msgstr "BASH_VERSION Os números da versão desta `bash'."
+
+#~ msgid "CDPATH A colon separated list of directories to search"
+#~ msgstr "CDPATH Uma lista, separada por dois pontos, de diretórios"
+
+#~ msgid "\t\twhen the argument to `cd' is not found in the current"
+#~ msgstr "\t\ta serem pesquisados quando o argumento para `cd' não for"
+
+#~ msgid "\t\tdirectory."
+#~ msgstr "\t\tencontrado no diretório atual."
+
+#~ msgid ""
+#~ "HISTFILE The name of the file where your command history is stored."
+#~ msgstr ""
+#~ "HISTFILE O nome do arquivo onde o histórico de comandos é "
+#~ "armazenado."
+
+#~ msgid "HISTFILESIZE The maximum number of lines this file can contain."
+#~ msgstr ""
+#~ "HISTFILESIZE O número máximo de linhas que este arquivo pode conter."
+
+#~ msgid "HISTSIZE The maximum number of history lines that a running"
+#~ msgstr "HISTSIZE O número máximo de linhas do histórico que uma"
+
+#~ msgid "\t\tshell can access."
+#~ msgstr "\t\t`shell' em execução pode acessar."
+
+#~ msgid "HOME The complete pathname to your login directory."
+#~ msgstr ""
+#~ "HOME O nome completo do caminho do seu diretório de login."
+
+#~ msgid ""
+#~ "HOSTTYPE The type of CPU this version of Bash is running under."
+#~ msgstr ""
+#~ "HOSTTYPE O tipo de CPU sob a qual esta `bash' está executando."
+
+#~ msgid ""
+#~ "IGNOREEOF Controls the action of the shell on receipt of an EOF"
+#~ msgstr "IGNOREEOF Controla a ação da `shell' ao receber um caracter"
+
+#~ msgid "\t\tcharacter as the sole input. If set, then the value"
+#~ msgstr "\t\tEOF como única entrada. Se estiver ativa, então o valor da"
+
+#~ msgid "\t\tof it is the number of EOF characters that can be seen"
+#~ msgstr "\t\tvariável é o número de caracteres EOF que podem ser recebidos,"
+
+#~ msgid "\t\tin a row on an empty line before the shell will exit"
+#~ msgstr "\t\tde forma seguida em uma linha vazia, antes da `shell' terminar"
+
+#~ msgid "\t\t(default 10). When unset, EOF signifies the end of input."
+#~ msgstr ""
+#~ "\t\t(padrão 10). Caso contrário, EOF significa o fim da entrada de dados."
+
+#~ msgid "MAILCHECK\tHow often, in seconds, Bash checks for new mail."
+#~ msgstr ""
+#~ "MAILCHECK\tFreqüência, em segundos, para a `bash' verificar novo e-mail."
+
+#~ msgid "MAILPATH\tA colon-separated list of filenames which Bash checks"
+#~ msgstr ""
+#~ "MAILPATH\tUma lista, separada por dois pontos, de nomes de arquivos,"
+
+#~ msgid "\t\tfor new mail."
+#~ msgstr "\t\tnos quais a `bash' vai verificar se existe novo e-mail."
+
+#~ msgid "OSTYPE\t\tThe version of Unix this version of Bash is running on."
+#~ msgstr "OSTYPE\t\tA versão do Unix sob a qual a `bash' está executando."
+
+#~ msgid "PATH A colon-separated list of directories to search when"
+#~ msgstr ""
+#~ "PATH Uma lista, separada por dois pontos, de diretórios a"
+
+#~ msgid "\t\tlooking for commands."
+#~ msgstr "\t\tserem pesquisados quando os comandos forem procurados."
+
+#~ msgid "PROMPT_COMMAND A command to be executed before the printing of each"
+#~ msgstr "PROMPT_COMMAND O comando a ser executado antes da exibição de cada"
+
+#~ msgid "\t\tprimary prompt."
+#~ msgstr "\t\tmensagem de prompt primária."
+
+#~ msgid "PS1 The primary prompt string."
+#~ msgstr "PS1 A mensagem primária de prompt exibida."
+
+#~ msgid "PS2 The secondary prompt string."
+#~ msgstr "PS2 A mensagem secundária de prompt exibida."
+
+#~ msgid "TERM The name of the current terminal type."
+#~ msgstr "TERM O nome do tipo de terminal em uso no momento."
+
+#~ msgid "auto_resume Non-null means a command word appearing on a line by"
+#~ msgstr ""
+#~ "auto_resume Não nulo significa que um comando aparecendo sozinho em"
+
+#~ msgid "\t\titself is first looked for in the list of currently"
+#~ msgstr ""
+#~ "\t\tlinha deve ser procurado primeiro na lista de trabalhos parados."
+
+#~ msgid "\t\tstopped jobs. If found there, that job is foregrounded."
+#~ msgstr ""
+#~ "\t\tSe for encontrado na lista, o trabalho vai para o primeiro plano."
+
+#~ msgid "\t\tA value of `exact' means that the command word must"
+#~ msgstr ""
+#~ "\t\tO valor `exact' significa que a palavra do comando deve corresponder"
+
+#~ msgid "\t\texactly match a command in the list of stopped jobs. A"
+#~ msgstr "\t\texatamente a um comando da lista de trabalhos parados."
+
+#~ msgid "\t\tvalue of `substring' means that the command word must"
+#~ msgstr "\t\tO valor `substring' significa que a palavra do comando deve"
+
+#~ msgid "\t\tmatch a substring of the job. Any other value means that"
+#~ msgstr "\t\tcorresponder a uma parte do trabalho. Qualquer outro valor"
+
+#~ msgid "\t\tthe command must be a prefix of a stopped job."
+#~ msgstr ""
+#~ "\t\tsignifica que o comando deve ser um prefixo de um trabalho parado."
+
+#~ msgid "command_oriented_history"
+#~ msgstr "command_oriented_history"
+
+#~ msgid ""
+#~ " Non-null means to save multiple-line commands together on"
+#~ msgstr ""
+#~ " Se não for nulo significa salvar comandos com múltiplas"
+
+#~ msgid " a single history line."
+#~ msgstr " linhas, juntas em uma única linha do histórico."
+
+#~ msgid "histchars Characters controlling history expansion and quick"
+#~ msgstr ""
+#~ "histchars Caracteres que controlam a expansão do histórico e a"
+
+#~ msgid "\t\tsubstitution. The first character is the history"
+#~ msgstr "\t\tsubstituição rápida. O primeiro caracter é o de substituição"
+
+#~ msgid "\t\tsubstitution character, usually `!'. The second is"
+#~ msgstr "\t\tdo histórico, geralmente o `!'. O segundo caracter é o"
+
+#~ msgid "\t\tthe `quick substitution' character, usually `^'. The"
+#~ msgstr "\t\tde substituição rápida, geralmente o `^'. O terceiro caracter"
+
+#~ msgid "\t\tthird is the `history comment' character, usually `#'."
+#~ msgstr "\t\té o de comentário do histórico, geralmente o `#'."
+
+#~ msgid "HISTCONTROL\tSet to a value of `ignorespace', it means don't enter"
+#~ msgstr ""
+#~ "HISTCONTROL\tCom valor igual a `ignorespace', significa não introduzir"
+
+#~ msgid "\t\tlines which begin with a space or tab on the history"
+#~ msgstr ""
+#~ "\t\tlinhas que iniciam por espaço ou tabulação na lista de histórico."
+
+#~ msgid "\t\tlist. Set to a value of `ignoredups', it means don't"
+#~ msgstr "\t\tCom valor igual a `ignoredups', significa não introduzir linhas"
+
+#~ msgid "\t\tenter lines which match the last entered line. Set to"
+#~ msgstr "\t\tque correspondam à última linha introduzida. Com valor igual a"
+
+#~ msgid "\t\t`ignoreboth' means to combine the two options. Unset,"
+#~ msgstr "\t\t`ignoreboth' significa combinar as duas opções. Remover,"
+
+#~ msgid "\t\tor set to any other value than those above means to save"
+#~ msgstr ""
+#~ "\t\tou atribuir algum outro valor que não os acima, significa salvar"
+
+#~ msgid "\t\tall lines on the history list."
+#~ msgstr "\t\ttodas as linhas na lista de histórico."
+
+#~ msgid "Toggle the values of variables controlling optional behavior."
+#~ msgstr ""
+#~ "Alterna os valores das variáveis controladoras de comportamentos "
+#~ "opcionais."
+
+#~ msgid "The -s flag means to enable (set) each OPTNAME; the -u flag"
+#~ msgstr "A opção -s ativa (set) cada NOME-OPÇÃO; a opção -u desativa cada"
+
+#~ msgid "unsets each OPTNAME. The -q flag suppresses output; the exit"
+#~ msgstr ""
+#~ "NOME-OPÇÃO. A opção -q suprime a saída; o status de término indica se"
+
+#~ msgid "status indicates whether each OPTNAME is set or unset. The -o"
+#~ msgstr "cada NOME-OPÇÃO foi ativado ou desativado A opção -o restringe"
+
+#~ msgid "option restricts the OPTNAMEs to those defined for use with"
+#~ msgstr "NOME-OPÇÃO para aqueles definidos para uso através de `set -o'."
+
+#~ msgid "`set -o'. With no options, or with the -p option, a list of all"
+#~ msgstr "Sem nenhuma opção, ou com a opção -p, uma lista com todas as"
+
+#~ msgid "settable options is displayed, with an indication of whether or"
+#~ msgstr ""
+#~ "opções que podem ser ativadas é exibida, com indicação sobre se cada uma"
+
+#~ msgid "not each is set."
+#~ msgstr "das opções está ativa ou não."
diff --git a/po/quot.sed b/po/quot.sed
new file mode 100644
index 0000000..0122c46
--- /dev/null
+++ b/po/quot.sed
@@ -0,0 +1,6 @@
+s/"\([^"]*\)"/“\1â€/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“â€/""/g
diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin
new file mode 100644
index 0000000..2436c49
--- /dev/null
+++ b/po/remove-potcdate.sin
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/ro.gmo b/po/ro.gmo
new file mode 100644
index 0000000..d3c700c
--- /dev/null
+++ b/po/ro.gmo
Binary files differ
diff --git a/po/ro.po b/po/ro.po
new file mode 100644
index 0000000..b554fb7
--- /dev/null
+++ b/po/ro.po
@@ -0,0 +1,6410 @@
+# Mesajele în limba românã pentru pachetul bash
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# Eugen Hoanca <eugenh@urban-grafx.ro>, 2003.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bash 2.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 1997-08-17 18:42+0300\n"
+"Last-Translator: Eugen Hoanca <eugenh@urban-grafx.ro>\n"
+"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "incluziune greºitã în interval"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr ""
+
+#: arrayfunc.c:480
+#, fuzzy, c-format
+msgid "%s: invalid associative array key"
+msgstr "%c%c: opþiune invalidã"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: nu se poate atribui cãtre index ne-numeric"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: nu s-a putut crea: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr ""
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr ""
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr ""
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "%c%c: opþiune invalidã"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr ""
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr ""
+
+#: builtins/bind.def:245
+#, fuzzy, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: nu s-a putut crea: %s"
+
+#: builtins/bind.def:260
+#, fuzzy, c-format
+msgid "`%s': cannot unbind"
+msgstr "%s: comandã negãsitã"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, fuzzy, c-format
+msgid "`%s': unknown function name"
+msgstr "%s: funcþie doar în citire (readonly)"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr ""
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr ""
+
+#: builtins/break.def:77 builtins/break.def:117
+#, fuzzy
+msgid "loop count"
+msgstr "logout"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr ""
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr ""
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr ""
+
+#: builtins/common.c:101
+#, fuzzy, c-format
+msgid "line %d: "
+msgstr "slot %3d: "
+
+#: builtins/common.c:139 error.c:261
+#, fuzzy, c-format
+msgid "warning: "
+msgstr "în scriere"
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr ""
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "prea mulþi parametri"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, fuzzy, c-format
+msgid "%s: option requires an argument"
+msgstr "opþiunea necesitã un parametru: -"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr ""
+
+#: builtins/common.c:205
+#, fuzzy, c-format
+msgid "%s: not found"
+msgstr "%s: comandã negãsitã"
+
+#: builtins/common.c:214 shell.c:795
+#, fuzzy, c-format
+msgid "%s: invalid option"
+msgstr "%c%c: opþiune invalidã"
+
+#: builtins/common.c:221
+#, fuzzy, c-format
+msgid "%s: invalid option name"
+msgstr "%c%c: opþiune invalidã"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, fuzzy, c-format
+msgid "`%s': not a valid identifier"
+msgstr "`%s' nu este un identificator valid"
+
+#: builtins/common.c:238
+#, fuzzy
+msgid "invalid octal number"
+msgstr "numãr de semnal invalid"
+
+#: builtins/common.c:240
+#, fuzzy
+msgid "invalid hex number"
+msgstr "numãr de semnal invalid"
+
+#: builtins/common.c:242 expr.c:1256
+#, fuzzy
+msgid "invalid number"
+msgstr "numãr de semnal invalid"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr ""
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr ""
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: variabilã doar în citire"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr ""
+
+#: builtins/common.c:272 builtins/common.c:274
+#, fuzzy
+msgid "argument"
+msgstr "se aºteaptã parametru"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr ""
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr ""
+
+#: builtins/common.c:290
+#, fuzzy, c-format
+msgid "%s: no job control"
+msgstr "nici un control de job în acest shell"
+
+#: builtins/common.c:292
+#, fuzzy
+msgid "no job control"
+msgstr "nici un control de job în acest shell"
+
+#: builtins/common.c:302
+#, fuzzy, c-format
+msgid "%s: restricted"
+msgstr "%s: jobul a fost terminat"
+
+#: builtins/common.c:304
+#, fuzzy
+msgid "restricted"
+msgstr "Terminat"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr ""
+
+#: builtins/common.c:321
+#, fuzzy, c-format
+msgid "write error: %s"
+msgstr "eroare de legãturã (pipe): %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr ""
+
+#: builtins/common.c:629 builtins/common.c:631
+#, fuzzy, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: Redirectare ambiguã"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr ""
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr ""
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr ""
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr ""
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr ""
+
+#: builtins/declare.def:122
+#, fuzzy
+msgid "can only be used in a function"
+msgstr "poate fi folosit doar într-o funcþie, ºi face ca variabila NUME"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr ""
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: funcþie doar în citire (readonly)"
+
+#: builtins/declare.def:468
+#, fuzzy, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "$%s: nu se poate asigna în acest mod"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr ""
+
+#: builtins/enable.def:312
+#, fuzzy, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "nu pot deschide legãtura numitã %s pentru %s: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr ""
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr ""
+
+#: builtins/enable.def:474
+#, fuzzy, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: nu s-a putut crea: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: este director"
+
+#: builtins/evalfile.c:139
+#, fuzzy, c-format
+msgid "%s: not a regular file"
+msgstr "%s: nu se poate executa fiºierul binar"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr ""
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: nu se poate executa fiºierul binar"
+
+#: builtins/exec.def:212
+#, fuzzy, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: nu s-a putut crea: %s"
+
+#: builtins/exit.def:65
+#, fuzzy, c-format
+msgid "logout\n"
+msgstr "logout"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr ""
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr ""
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr ""
+
+#: builtins/fc.def:262
+#, fuzzy
+msgid "no command found"
+msgstr "%s: comandã negãsitã"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr ""
+
+#: builtins/fc.def:370
+#, fuzzy, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: nu s-a putut crea: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr ""
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr ""
+
+#: builtins/getopt.c:110
+#, fuzzy, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "opþiune ilegalã: -"
+
+#: builtins/getopt.c:111
+#, fuzzy, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "opþiunea necesitã un parametru: -"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr ""
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr ""
+
+#: builtins/hash.def:244
+#, fuzzy, c-format
+msgid "hits\tcommand\n"
+msgstr "ultima comandã."
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] ""
+msgstr[1] ""
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+
+#: builtins/help.def:185
+#, fuzzy, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: nu s-a putut crea: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr ""
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr ""
+
+#: builtins/history.def:365
+#, fuzzy, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: se aºteaptã expresie întreagã (integer)"
+
+#: builtins/inlib.def:71
+#, fuzzy, c-format
+msgid "%s: inlib failed"
+msgstr "%s: variabilã fãrã limitã"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr ""
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr ""
+
+#: builtins/kill.def:263
+#, fuzzy
+msgid "Unknown error"
+msgstr "Eroare necunoscutã %d"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "se aºteaptã expresie"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: variabilã fãrã limitã"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr ""
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr ""
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, fuzzy, c-format
+msgid "%s: invalid line count"
+msgstr "%c%c: opþiune invalidã"
+
+#: builtins/mapfile.def:277
+#, fuzzy, c-format
+msgid "%s: invalid array origin"
+msgstr "%c%c: opþiune invalidã"
+
+#: builtins/mapfile.def:294
+#, fuzzy, c-format
+msgid "%s: invalid callback quantum"
+msgstr "numãr de semnal invalid"
+
+#: builtins/mapfile.def:326
+#, fuzzy
+msgid "empty array variable name"
+msgstr "%s: variabilã fãrã limitã"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr ""
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr ""
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr ""
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr ""
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr ""
+
+#: builtins/pushd.def:195
+#, fuzzy
+msgid "no other directory"
+msgstr "director superior."
+
+#: builtins/pushd.def:462
+#, fuzzy
+msgid "<no current directory>"
+msgstr "\tnoul director de lucru curent."
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr ""
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr ""
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr ""
+
+#: builtins/read.def:588
+#, fuzzy, c-format
+msgid "read error: %d: %s"
+msgstr "eroare de legãturã (pipe): %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+
+#: builtins/set.def:768
+#, fuzzy
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "poate fi folosit doar într-o funcþie, ºi face ca variabila NUME"
+
+#: builtins/set.def:805
+#, fuzzy, c-format
+msgid "%s: cannot unset"
+msgstr "%s: nu s-a putut crea: %s"
+
+#: builtins/set.def:812
+#, fuzzy, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: nu s-a putut crea: %s"
+
+#: builtins/set.def:823
+#, fuzzy, c-format
+msgid "%s: not an array variable"
+msgstr "%s: variabilã fãrã limitã"
+
+#: builtins/setattr.def:186
+#, fuzzy, c-format
+msgid "%s: not a function"
+msgstr "%s: funcþie doar în citire (readonly)"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+#, fuzzy
+msgid "shift count"
+msgstr "shift [n]"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr ""
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr ""
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr ""
+
+#: builtins/source.def:153
+#, fuzzy, c-format
+msgid "%s: file not found"
+msgstr "%s: comandã negãsitã"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr ""
+
+#: builtins/suspend.def:111
+#, fuzzy
+msgid "cannot suspend a login shell"
+msgstr "Ieºire dintr-un login al shell-ului."
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr ""
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr ""
+
+#: builtins/type.def:274
+#, fuzzy, c-format
+msgid "%s is a function\n"
+msgstr "%s: funcþie doar în citire (readonly)"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr ""
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr ""
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr ""
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr ""
+
+#: builtins/ulimit.def:398
+#, fuzzy, c-format
+msgid "`%c': bad command"
+msgstr "%c%c: opþiune invalidã"
+
+#: builtins/ulimit.def:427
+#, fuzzy, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: nu s-a putut crea: %s"
+
+#: builtins/ulimit.def:453
+#, fuzzy
+msgid "limit"
+msgstr "limitã CPU"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, fuzzy, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: nu s-a putut crea: %s"
+
+#: builtins/umask.def:118
+#, fuzzy
+msgid "octal number"
+msgstr "numãr de semnal invalid"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr ""
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr ""
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr ""
+
+#: error.c:165
+#, fuzzy, c-format
+msgid "last command: %s\n"
+msgstr "ultima comandã."
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr ""
+
+#: error.c:406
+#, fuzzy
+msgid "unknown command error"
+msgstr "Eroare necunoscutã %d"
+
+#: error.c:407
+#, fuzzy
+msgid "bad command type"
+msgstr "ºi nume de comandã."
+
+#: error.c:408
+#, fuzzy
+msgid "bad connector"
+msgstr "conector greºit `%d'"
+
+#: error.c:409
+#, fuzzy
+msgid "bad jump"
+msgstr "Salt invalid %d"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: variabilã fãrã limitã"
+
+#: eval.c:181
+#, fuzzy, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "%ca expirat aºteptând introducere de date: auto-logout\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr ""
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr ""
+
+#: execute_cmd.c:2075
+#, fuzzy
+msgid "pipe error"
+msgstr "eroare de legãturã (pipe): %s"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: limitat: nu se poate specifica `/' în numele comenzilor"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: comandã negãsitã"
+
+#: execute_cmd.c:4827
+#, fuzzy, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: este director"
+
+#: execute_cmd.c:4976
+#, fuzzy, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "nu se poate duplica fd %d în fd 0: %s"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "nivel de recursivitate al expresiei depãºit"
+
+#: expr.c:265
+#, fuzzy
+msgid "recursion stack underflow"
+msgstr "Stivã recursivitate prea puþin folositã(underflow)"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "eroare de sintaxã în expresie "
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "s-a încercat asignare cãtre non-variabilã"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "împãrþire la 0"
+
+#: expr.c:471
+#, fuzzy
+msgid "bug: bad expassign token"
+msgstr "bug: identificator(token) expassign greºit %d"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "`:' aºteptat dupã expresie condiþionalã"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr ""
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr ""
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "`)' lipsã"
+
+#: expr.c:897 expr.c:1176
+#, fuzzy
+msgid "syntax error: operand expected"
+msgstr "eroare de sintaxã: sfârºit de fiºier neaºteptat"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr ""
+
+#: expr.c:1202
+#, fuzzy, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s: %s: %s (identificatorul erorii este \"%s\")\n"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr ""
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "valoare prea mare pentru bazã"
+
+#: expr.c:1329
+#, fuzzy, c-format
+msgid "%s: expression error\n"
+msgstr "eroare de redirectare"
+
+#: general.c:61
+#, fuzzy
+msgid "getcwd: cannot access parent directories"
+msgstr "getwd: nu s-au putut accesa directoarele pãrinte"
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr ""
+
+#: input.c:258
+#, fuzzy, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+"nu se poate aloca descriptor de fiºier nou pentru inputul bash din fd %d: %s"
+
+#: input.c:266
+#, fuzzy, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "check_bash_input: buffer deja existent pentru fd nou %d"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr ""
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr ""
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr ""
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr ""
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr ""
+
+#: jobs.c:1401
+#, fuzzy, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: Nu existã pid-ul (%d)!\n"
+
+#: jobs.c:1416
+#, fuzzy, c-format
+msgid "Signal %d"
+msgstr "Semnal Necunoscut #%d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Finalizat"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Stopat"
+
+#: jobs.c:1439
+#, fuzzy, c-format
+msgid "Stopped(%s)"
+msgstr "Stopat"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "În rulare"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Finalizat(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "Ieºire %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Stare necunoscutã"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(core dumped) "
+
+#: jobs.c:1568
+#, fuzzy, c-format
+msgid " (wd: %s)"
+msgstr "(wd actual: %s)\n"
+
+#: jobs.c:1776
+#, fuzzy, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "setpgid copil (de la %d la %d) a întâlnit o eroare %d: %s\n"
+
+#: jobs.c:2104 nojobs.c:585
+#, fuzzy, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "aºteptaþi: pid-ul %d nu este rezultat(child) al acestui shell"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr ""
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr ""
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: jobul a fost terminat"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr ""
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, fuzzy, c-format
+msgid "%s: line %d: "
+msgstr "slot %3d: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr " (core dumped)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(wd actual: %s)\n"
+
+#: jobs.c:3579
+#, fuzzy
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_jobs: getpgrp eºuat: %s"
+
+#: jobs.c:3639
+#, fuzzy
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_jobs: disciplinã linie: %s"
+
+#: jobs.c:3649
+#, fuzzy
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_jobs: getpgrp eºuat: %s"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr ""
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "nici un control de job în acest shell"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:313
+msgid "unknown"
+msgstr "necunoscut"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr ""
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr ""
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr ""
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr ""
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr ""
+
+#: lib/sh/netopen.c:168
+#, fuzzy, c-format
+msgid "%s: host unknown"
+msgstr "necunoscut"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr ""
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr ""
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr ""
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc: nu pot realoca %lu octeþi (%lu octeþi alocaþi)"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc: nu pot realoca %lu octeþi (%lu octeþi alocaþi)"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Aveþi mail în $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Aveþi mail nou în $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "Mailul din %s a fost citit\n"
+
+#: make_cmd.c:323
+#, fuzzy
+msgid "syntax error: arithmetic expression required"
+msgstr "eroare de sintaxã în expresie "
+
+#: make_cmd.c:325
+#, fuzzy
+msgid "syntax error: `;' unexpected"
+msgstr "eroare de sintaxã: sfârºit de fiºier neaºteptat"
+
+#: make_cmd.c:326
+#, fuzzy, c-format
+msgid "syntax error: `((%s))'"
+msgstr "eroare de sintaxã"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: tip de instrucþiune greºit %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr ""
+
+#: parse.y:3133 parse.y:3369
+#, fuzzy, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "EOF brusc în cãutare dupã `%c'"
+
+#: parse.y:3951
+#, fuzzy
+msgid "unexpected EOF while looking for `]]'"
+msgstr "EOF brusc în cãutare dupã `%c'"
+
+#: parse.y:3956
+#, fuzzy, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "eroare de sintaxã neaºteptatã lângã `%s'"
+
+#: parse.y:3960
+#, fuzzy
+msgid "syntax error in conditional expression"
+msgstr "eroare de sintaxã în expresie "
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr ""
+
+#: parse.y:4042
+#, fuzzy
+msgid "expected `)'"
+msgstr "se aºteaptã `)'"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr ""
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr ""
+
+#: parse.y:4120
+#, fuzzy, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "%s: se aºteaptã operator binar"
+
+#: parse.y:4124
+#, fuzzy
+msgid "conditional binary operator expected"
+msgstr "%s: se aºteaptã operator binar"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr ""
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr ""
+
+#: parse.y:4161
+#, fuzzy, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "`:' aºteptat dupã expresie condiþionalã"
+
+#: parse.y:4164
+#, fuzzy, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "`:' aºteptat dupã expresie condiþionalã"
+
+#: parse.y:4168
+#, fuzzy, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "`:' aºteptat dupã expresie condiþionalã"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "eroare de sintaxã neaºteptatã lângã `%s'"
+
+#: parse.y:5477
+#, fuzzy, c-format
+msgid "syntax error near `%s'"
+msgstr "eroare de sintaxã neaºteptatã lângã `%s'"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "eroare de sintaxã: sfârºit de fiºier neaºteptat"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "eroare de sintaxã"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Folosiþi \"%s\" pentru a pãrãsi shellul.\n"
+
+#: parse.y:5711
+#, fuzzy
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "EOF brusc în cãutare dupã `%c'"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr ""
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr ""
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: conector greºitr `%d'"
+
+#: print_cmd.c:363
+#, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr ""
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr ""
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr ""
+
+#: redir.c:166
+#, fuzzy, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: Redirectare ambiguã"
+
+#: redir.c:170
+#, fuzzy, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: nu se poate accesa(clobber) fiºierul existent"
+
+#: redir.c:175
+#, fuzzy, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: limitat: nu se poate specifica `/' în numele comenzilor"
+
+#: redir.c:180
+#, fuzzy, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "nu pot face legãturã (pipe) pentru substituþia procesului: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: nu pot asigna listã membrului intervalului"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr ""
+
+#: redir.c:1101
+#, fuzzy
+msgid "redirection error: cannot duplicate fd"
+msgstr "eroare de redirectare"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr ""
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr ""
+
+#: shell.c:884
+#, fuzzy, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: opþiune invalidã"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Nu am nici un nume!"
+
+#: shell.c:1793
+#, fuzzy, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU %s, versiunea %s\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Folosire:\t%s [GNU opþiune lungã] [opþiune] ...\n"
+"\t%s [GNU opþiune lungã] [opþiune] fiºier script ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "opþiuni lungi GNU:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Opþiuni ale shell-ului:\n"
+
+#: shell.c:1801
+#, fuzzy
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD sau -c comandã\t\t(doar invocaþie)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s sau -o opþiune\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"Apãsaþi `%s -c \"set-ajutor\"' pentru mai multe informaþii despre opþiunile "
+"shell-ului.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"Apãsaþi `%s -c ajutor' pentru mai multe informaþii despre comenzile interne "
+"ale shell-ului.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr ""
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr ""
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Semnal fals"
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Deconectare"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Întrerupere"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "Pãrãsire"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Instrucþiune ilegalã"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "BPT trace/trap"
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "instrucþiune ABORT"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "instrucþiune EMT"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Excepþie virgulã mobilã"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "Terminat(killed)"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "Eroare de bus"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Eroare de segmentare (Segmentation fault)"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Apelare sistem invalidã"
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "Legãturã(pipe) întreruptã"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Ceas alarmã"
+
+#: siglist.c:111
+msgid "Terminated"
+msgstr "Terminat"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "Condiþie IO urgentã"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Oprit (semnal)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "Continuare"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "Succesor mort sau oprit"
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Oprit (tty input)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Oprit (tty output)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "I/O pregãtit"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "limitã CPU"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "limitã fiºier"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "Alarmã (virtual)"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "Alarmã (profil)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Fereastrã schimbatã"
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr "Reþinere (lock) înregistrare"
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "Semnal utilizator 1"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "Semnal utilizator 2"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "Date de intrare HFT în curs de rezolvare(pending)"
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "probleme electrice iminente"
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "crash de sistem iminent"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "migrare proces spre alt CPU"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "eroare de programare"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "mod monitor HFT acordat"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "mod monitor HFT retras"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "secvenþã de sunet HFT completatã"
+
+#: siglist.c:215
+msgid "Information request"
+msgstr ""
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Semnal Necunoscut #"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Semnal Necunoscut #%d"
+
+#: subst.c:1333 subst.c:1454
+#, fuzzy, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "substituþie invalidã: nu existã '%s' în %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: nu pot asigna listã membrului intervalului"
+
+#: subst.c:4754 subst.c:4770
+#, fuzzy
+msgid "cannot make pipe for process substitution"
+msgstr "nu pot face legãturã (pipe) pentru substituþia procesului: %s"
+
+#: subst.c:4802
+#, fuzzy
+msgid "cannot make child for process substitution"
+msgstr "nu pot crea un proces copil pentru substituirea procesului: %s"
+
+#: subst.c:4847
+#, fuzzy, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "nu pot deschide legãtura numitã %s pentru %s: %s"
+
+#: subst.c:4849
+#, fuzzy, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "nu pot deschide legãtura numitã %s pentru %s: %s"
+
+#: subst.c:4867
+#, fuzzy, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "nu se poate duplica legãtura numitã %s ca fd %d: %s "
+
+#: subst.c:5063
+#, fuzzy
+msgid "cannot make pipe for command substitution"
+msgstr "nu pot face legãturi(pipes) pentru substituþia de comenzi: %s"
+
+#: subst.c:5097
+#, fuzzy
+msgid "cannot make child for command substitution"
+msgstr "nu pot crea un copil pentru substituþia de comenzi: %s"
+
+#: subst.c:5114
+#, fuzzy
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "command_substitute: nu se poate duplica legãtura (pipe) ca fd 1: %s"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: parametru null sau nesetat"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: expresie subºir < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: substituþie invalidã"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: nu se poate asigna în acest mod"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, fuzzy, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "substituþie invalidã: nu existã ')' de final în %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr ""
+
+#: test.c:146
+msgid "argument expected"
+msgstr "se aºteaptã parametru"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: se aºteaptã expresie întreagã (integer)"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "se aºteaptã `)'"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "se aºteaptã `)', s-a primit %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: se aºteaptã operator unar"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: se aºteaptã operator binar"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "lipseºte ']'"
+
+#: trap.c:203
+#, fuzzy
+msgid "invalid signal number"
+msgstr "numãr de semnal invalid"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr ""
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+
+#: trap.c:380
+#, fuzzy, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: Semnal invalid %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "eroare în importarea definiþiei funcþiei pentru '%s'"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr ""
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr ""
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr ""
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: parametru null sau nesetat"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr ""
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr ""
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr ""
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: nu s-a putut crea: %s"
+
+#: variables.c:4683
+#, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr ""
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr ""
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: version.c:86 version2.c:83
+#, fuzzy, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU %s, versiunea %s\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+
+#: version2.c:86
+#, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr ""
+
+#: version2.c:87
+#, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: nu pot aloca %lu octeþi (%lu octeþi alocaþi)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: nu pot aloca %lu octeþi (%lu octeþi alocaþi)"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: nu pot aloca %lu octeþi (%lu octeþi alocaþi)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: nu pot aloca %lu octeþi (%lu octeþi alocaþi)"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [nume[=valoare] ... ]"
+
+#: builtins.c:47
+#, fuzzy
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] [nume ...]"
+
+#: builtins.c:51
+#, fuzzy
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+"bind [-lpvsPVS] [-m keymap] [-f nume_fiºier] [-q nume] [-r keyseq] [keyseq:"
+"funcþie readline]"
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [n]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [n]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [shell-builtin [arg ...]]"
+
+#: builtins.c:61
+#, fuzzy
+msgid "caller [expr]"
+msgstr "test [expr]"
+
+#: builtins.c:64
+#, fuzzy
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-PL] [dir]"
+
+#: builtins.c:66
+#, fuzzy
+msgid "pwd [-LP]"
+msgstr "pwd [-PL]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr ""
+
+#: builtins.c:72
+msgid "false"
+msgstr ""
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] comandã [arg ...]"
+
+#: builtins.c:76
+#, fuzzy
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-afFrxi] [-p] nume[=valoare] ..."
+
+#: builtins.c:78
+#, fuzzy
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-afFrxi] [-p] nume[=valoare] ..."
+
+#: builtins.c:80
+#, fuzzy
+msgid "local [option] name[=value] ..."
+msgstr "local nume[=valoare] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [arg ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [arg ...]"
+
+#: builtins.c:90
+#, fuzzy
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-pnds] [-a] [-f nume_fiºier] [nume ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [arg ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts optstring nume [arg]"
+
+#: builtins.c:96
+#, fuzzy
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a nume] fiºier [redirectare ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [n]"
+
+#: builtins.c:100
+#, fuzzy
+msgid "logout [n]"
+msgstr "logout"
+
+#: builtins.c:103
+#, fuzzy
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr "fc [-e enume] [-nlr] [prim] [u8ltim] sau fc -s [pat=rep] [cmd]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [job_spec]"
+
+#: builtins.c:111
+#, fuzzy
+msgid "bg [job_spec ...]"
+msgstr "bg [job_spec]"
+
+#: builtins.c:114
+#, fuzzy
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-r] [-p nume_cale] [nume ...]"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "help [tipar ...]"
+
+#: builtins.c:121
+#, fuzzy
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [n] sau history -awrn [nume_fiºier] sau history -ps arg [arg...]"
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr "jobs [-lnprs] [jobspec ...] sau jobs -x comandã [args]"
+
+#: builtins.c:129
+#, fuzzy
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [jobspec ...]"
+
+#: builtins.c:132
+#, fuzzy
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s sigspec | -n signum | -sigspec] [pid | job]... sau kill -l [sigspec]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let arg [arg ...]"
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+#, fuzzy
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o opþiune] [arg ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [nume ...]"
+
+#: builtins.c:144
+#, fuzzy
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-nf] [nume ...] sau export -p"
+
+#: builtins.c:146
+#, fuzzy
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-anf] [nume ...] sau readonly -p"
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr "shift [n]"
+
+#: builtins.c:150
+#, fuzzy
+msgid "source filename [arguments]"
+msgstr "nume fiºier sursã"
+
+#: builtins.c:152
+#, fuzzy
+msgid ". filename [arguments]"
+msgstr ". nume fiºier"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [expr]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ arg... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "ori"
+
+#: builtins.c:164
+#, fuzzy
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [arg] [signal_spec] sau trap -l"
+
+#: builtins.c:166
+#, fuzzy
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-apt] nume [nume ...]"
+
+#: builtins.c:169
+#, fuzzy
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdfmstpnuv] [limitã]"
+
+#: builtins.c:172
+#, fuzzy
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-S] [mod]"
+
+#: builtins.c:175
+#, fuzzy
+msgid "wait [id]"
+msgstr "wait [n]"
+
+#: builtins.c:179
+#, fuzzy
+msgid "wait [pid]"
+msgstr "wait [n]"
+
+#: builtins.c:182
+#, fuzzy
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for NUME [în EXPRESIE ... ;] executã COMENZI; done"
+
+#: builtins.c:184
+#, fuzzy
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for NUME [în EXPRESIE ... ;] executã COMENZI; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select NUME [în EXPRESIE ... ;] executã COMENZI; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr ""
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case EXPRESIE în [TIPAR[[TIPAR]..) COMENZI ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if COMENZI; then COMENZI; [elif COMENZI; then COMENZI; ]... [ else "
+"COMENZI; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while COMENZI; do COMENZI; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until COMENZI; do COMENZI; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr ""
+
+#: builtins.c:200
+#, fuzzy
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "function NUME { COMENZI ; } sau NUME () { COMENZI ; }"
+
+#: builtins.c:202
+#, fuzzy
+msgid "{ COMMANDS ; }"
+msgstr "{ COMENZI }"
+
+#: builtins.c:204
+#, fuzzy
+msgid "job_spec [&]"
+msgstr "fg [job_spec]"
+
+#: builtins.c:206
+#, fuzzy
+msgid "(( expression ))"
+msgstr "se aºteaptã expresie"
+
+#: builtins.c:208
+#, fuzzy
+msgid "[[ expression ]]"
+msgstr "se aºteaptã expresie"
+
+#: builtins.c:210
+#, fuzzy
+msgid "variables - Names and meanings of some shell variables"
+msgstr "Variabilele shell-ului sunt admise ca operanzi. Numele variabilei"
+
+#: builtins.c:213
+#, fuzzy
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [dir | +N | -N] [-n]"
+
+#: builtins.c:217
+#, fuzzy
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [+N | -N] [-n]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+#, fuzzy
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o opþiune lungã] nume_opt [nume_opt...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr ""
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "type [-apt] nume [nume ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+
+#: builtins.c:428
+#, fuzzy
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Nici un efect, comanda nu face nimic. Un cod de ieºire zero este returnat."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+#: builtins.c:689
+#, fuzzy
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr "Iese din shell cu starea lui N. Dacã N este omis, starea de ieºire"
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+
+#: builtins.c:966
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xrealloc: nu pot realoca %lu octeþi (%lu octeþi alocaþi)"
+
+#, fuzzy
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: nu pot realoca %lu octeþi (%lu octeþi alocaþi)"
+
+#, fuzzy
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xrealloc: nu pot realoca %lu octeþi (%lu octeþi alocaþi)"
+
+#~ msgid "Missing `}'"
+#~ msgstr "`}' lipsã"
+
+#~ msgid "brace_expand> "
+#~ msgstr "brace_expand> "
+
+#~ msgid "Attempt to free unknown command type `%d'.\n"
+#~ msgstr "Încercare de eliberare(free) tip comandã necunoscutã `%d'.\n"
+
+#~ msgid "Report this to %s\n"
+#~ msgstr "Raportaþi asta la %s\n"
+
+#~ msgid "Stopping myself..."
+#~ msgstr "Mã opresc..."
+
+#~ msgid "Tell %s to fix this someday.\n"
+#~ msgstr "Spuneþi lui %s sã repare asta într-o bun zi.\n"
+
+#~ msgid "execute_command: bad command type `%d'"
+#~ msgstr "execute_command: tip de comandã greºitã `%d'"
+
+#~ msgid "real\t"
+#~ msgstr "real\t"
+
+#~ msgid "user\t"
+#~ msgstr "user\t"
+
+#~ msgid "sys\t"
+#~ msgstr "sis\t"
+
+#~ msgid ""
+#~ "real\t0m0.00s\n"
+#~ "user\t0m0.00s\n"
+#~ "sys\t0m0.00s\n"
+#~ msgstr ""
+#~ "real\t0m0.00s\n"
+#~ "user\t0m0.00s\n"
+#~ "sis\t0m0.00s\n"
+
+#~ msgid "cannot duplicate fd %d to fd 1: %s"
+#~ msgstr "nu se poate duplica fd %d în fd 1: %s"
+
+#~ msgid "%s: output redirection restricted"
+#~ msgstr "%s redirectare spre output limitatã"
+
+#~ msgid "Out of memory!"
+#~ msgstr "Memorie plinã!"
+
+#~ msgid "You have already added item `%s'\n"
+#~ msgstr "Aþi adãugat deja elementul `%s'\n"
+
+#~ msgid "You have entered %d (%d) items. The distribution is:\n"
+#~ msgstr "Aþi introdus %d (%d) elemente. Distribuþia este:\n"
+
+#~ msgid "<unknown>"
+#~ msgstr "<necunoscut>"
+
+#~ msgid "%s: bg background job?"
+#~ msgstr "%s: bg job din fundal?"
+
+#~ msgid ""
+#~ "Redirection instruction from yyparse () '%d' is\n"
+#~ "out of range in make_redirection ()."
+#~ msgstr ""
+#~ "Redirectare instrucþiune din yyparse () '%d' is\n"
+#~ "în afara intervalului în make_redirection ()."
+
+#~ msgid "clean_simple_command () got a command with type %d."
+#~ msgstr "clean_simple_command () a primit o comandã de tipul %d."
+
+#~ msgid "got errno %d while waiting for %d"
+#~ msgstr "s-a primit errno %d în aºteptarea lui %d"
+
+#~ msgid "syntax error near unexpected token `%c'"
+#~ msgstr "eroare de sintaxã neaºteptatã lângã `%c'"
+
+#~ msgid "print_command: bad command type `%d'"
+#~ msgstr "print_command: tip comandã greºit `%d'"
+
+#~ msgid "cprintf: bad `%%' argument (%c)"
+#~ msgstr "cprintf: parametru `%%' invalid (%c)"
+
+#~ msgid "option `%s' requires an argument"
+#~ msgstr "opþiunea `%s' necesitã un parametru"
+
+#~ msgid "%s: unrecognized option"
+#~ msgstr "%s: opþiune necunoscutã"
+
+#~ msgid "`-c' requires an argument"
+#~ msgstr "`-c' necesitã un parametru"
+
+#~ msgid "%s: cannot execute directories"
+#~ msgstr "%s: directoarele nu se pot executa"
+
+#~ msgid "Bad code in sig.c: sigprocmask"
+#~ msgstr "Cod invalid în sig.c: sigprocmask"
+
+#~ msgid "%s: bad array subscript"
+#~ msgstr "%s:subscriere interval invalid"
+
+#~ msgid "can't make pipes for process substitution: %s"
+#~ msgstr "nu pot face legãturi (pipes) pentru substituþia procesului: %s"
+
+#~ msgid "reading"
+#~ msgstr "în citire"
+
+#~ msgid "process substitution"
+#~ msgstr "substituire de proces"
+
+#~ msgid "command substitution"
+#~ msgstr "substituire de comenzi"
+
+#~ msgid "Can't reopen pipe to command substitution (fd %d): %s"
+#~ msgstr ""
+#~ "Nu se poate redeschide legãtura (pipe) cãtre substituþia de comenzi (fd %"
+#~ "d): %s"
+
+#~ msgid "$%c: unbound variable"
+#~ msgstr "$%c: variabilã fãrã limitã"
+
+#~ msgid "%s: bad arithmetic substitution"
+#~ msgstr "%s: substituþie aritmeticã greºitã"
+
+#~ msgid "-%s: binary operator expected"
+#~ msgstr "-%s: se aºteaptã operator binar"
+
+#~ msgid "%s[%s: bad subscript"
+#~ msgstr "%s[%s: subsctipþie invalidã"
+
+#~ msgid "[%s: bad subscript"
+#~ msgstr "[%s: subscripþie invalidã"
+
+#~ msgid "digits occur in two different argv-elements.\n"
+#~ msgstr "se regãsesc digiþi în douã elemente argv diferite.\n"
+
+#~ msgid "option %c\n"
+#~ msgstr "opþiunea %c\n"
+
+#~ msgid "option a\n"
+#~ msgstr "opþiunea a\n"
+
+#~ msgid "option b\n"
+#~ msgstr "opþiunea b\n"
+
+#~ msgid "option c with value `%s'\n"
+#~ msgstr "opþiunea c cu valoarea '%s'\n"
+
+#~ msgid "?? sh_getopt returned character code 0%o ??\n"
+#~ msgstr "?? sh_getopt a returnat codul de caracter 0%o ??\n"
+
+#~ msgid "non-option ARGV-elements: "
+#~ msgstr "elemente ARGV fãrã opþiuni: "
+
+#~ msgid "%s: Unknown flag %s.\n"
+#~ msgstr "%s: Marcaj (flag) necunoscut %s.\n"
+
+#~ msgid "Unknown directive `%s'"
+#~ msgstr "Directivã necunoscutã '%s'"
+
+#~ msgid "%s requires an argument"
+#~ msgstr "%s necesitã un parametru"
+
+#~ msgid "%s must be inside of a $BUILTIN block"
+#~ msgstr "%s trebuie sa fie înãuntrul unui bloc $BUILTIN"
+
+#~ msgid "%s found before $END"
+#~ msgstr "s-a gãsit %s înainte de $END"
+
+#~ msgid "%s already has a function (%s)"
+#~ msgstr "%s avea deja o funcþie (%s)"
+
+#~ msgid "%s already had a docname (%s)"
+#~ msgstr "%s avea deja un docname (%s)"
+
+#~ msgid "%s already has short documentation (%s)"
+#~ msgstr "%s are deja documentaþie scurtã (%s)"
+
+#~ msgid "%s already has a %s definition"
+#~ msgstr "%s are deja o definiþie %s"
+
+#~ msgid "mkbuiltins: Out of virtual memory!\n"
+#~ msgstr "mkbuiltins: Memorie virtualã plinã!\n"
+
+#~ msgid "read [-r] [-p prompt] [-a array] [-e] [name ...]"
+#~ msgstr "read [-r] [-p prompt] [-a interval] [-e] [nume ...]"
+
+#~ msgid "%[DIGITS | WORD] [&]"
+#~ msgstr "%[DIGIÞI | CUVÂNT] [&]"
+
+#~ msgid "variables - Some variable names and meanings"
+#~ msgstr "variabile - Câteva nume de variabile ºi ce înseamnã"
+
+#~ msgid "`alias' with no arguments or with the -p option prints the list"
+#~ msgstr "`alias' fãrã parametri sau cu opþiunea -p printeazã lista"
+
+#~ msgid "of aliases in the form alias NAME=VALUE on standard output."
+#~ msgstr "aliasurilor în forma alias NUME=VALOARE la ieºirea standard"
+
+#~ msgid "Otherwise, an alias is defined for each NAME whose VALUE is given."
+#~ msgstr ""
+#~ "În caz contrar, aliasul este definit pentru fiecare NUME a cãrui VALOARE "
+#~ "este datã."
+
+#~ msgid "A trailing space in VALUE causes the next word to be checked for"
+#~ msgstr ""
+#~ "Un spaþiu la sfârºit în VALOARE va face ca urmãtorul cuvânt sa fie "
+#~ "interogat de"
+
+#~ msgid "alias substitution when the alias is expanded. Alias returns"
+#~ msgstr "substituþii de alias când aliasul este extins. Aliasul returneazã"
+
+#~ msgid "true unless a NAME is given for which no alias has been defined."
+#~ msgstr ""
+#~ "adevãrat în afarã de cazul în care NUME nu este dat ºi pentru care nu a "
+#~ "fost definit nici un alias."
+
+#~ msgid ""
+#~ "Remove NAMEs from the list of defined aliases. If the -a option is given,"
+#~ msgstr ""
+#~ "Eliminã NUME din lista de aliasuri definite. Dacã este datã opþiunea -a,"
+
+#~ msgid "then remove all alias definitions."
+#~ msgstr "atunci ºterge toate definiþiile aliasurilor."
+
+#~ msgid "Bind a key sequence to a Readline function, or to a macro. The"
+#~ msgstr ""
+#~ "Leagã (bind) o secvenþã de taste de o funcþie Readline, sau de un macro. "
+
+#~ msgid "syntax is equivalent to that found in ~/.inputrc, but must be"
+#~ msgstr ""
+#~ "Sintaxa este echivalentã cu cea întâlnitã în ~/.inputrc, dar trebuie"
+
+#~ msgid ""
+#~ "passed as a single argument: bind '\"\\C-x\\C-r\": re-read-init-file'."
+#~ msgstr ""
+#~ "trimisã parametru singular: bind '\"\\C-x\\C-r\": re-read-init-file'."
+
+#~ msgid "Arguments we accept:"
+#~ msgstr "Parametri acceptaþi:"
+
+#~ msgid ""
+#~ " -m keymap Use `keymap' as the keymap for the duration of this"
+#~ msgstr ""
+#~ " -m keymap Foloseºte `keymap' ca ºi mapare de taste pentru "
+#~ "durata"
+
+#~ msgid " command. Acceptable keymap names are emacs,"
+#~ msgstr ""
+#~ " acestei comenzi. Nume acceptate de keymaps sunt "
+#~ "emacs,"
+
+#~ msgid ""
+#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,"
+#~ msgstr ""
+#~ " emacs-standard, emacs-meta, emacs-ctlx, vi, vi-move,"
+
+#~ msgid " vi-command, and vi-insert."
+#~ msgstr " vi-command, ºi vi-insert."
+
+#~ msgid " -l List names of functions."
+#~ msgstr " -l Listeazã numele funcþiilor."
+
+#~ msgid " -P List function names and bindings."
+#~ msgstr ""
+#~ " -P Listeazã numele funcþiilor ºi legãturile (bindings)."
+
+#~ msgid ""
+#~ " -p List functions and bindings in a form that can be"
+#~ msgstr ""
+#~ " -p Listeazã funcþiile ºi legãturile (bindings) într-o "
+#~ "formã care"
+
+#~ msgid " reused as input."
+#~ msgstr " poate fi refolositã ca intrare(input)."
+
+#~ msgid " -r keyseq Remove the binding for KEYSEQ."
+#~ msgstr " -r keyseq Eliminã legãturile(bindings) pentru KEYSEQ."
+
+#~ msgid " -f filename Read key bindings from FILENAME."
+#~ msgstr ""
+#~ " -f nume_fiºier Citeºte legãturile (bindings) din NUME_FIªIER"
+
+#~ msgid ""
+#~ " -q function-name Query about which keys invoke the named function."
+#~ msgstr " -q nume_funcþie Verificã tastele care invocã funcþia numitã."
+
+#~ msgid " -V List variable names and values"
+#~ msgstr " -V Listeazã numele variabilelor ºi valorile"
+
+#~ msgid ""
+#~ " -v List variable names and values in a form that can"
+#~ msgstr ""
+#~ " -v Listeazã numele variabilelor ºi valorile într-o "
+#~ "formã care poate"
+
+#~ msgid " be reused as input."
+#~ msgstr " fi reutilizatã ca date de intrare."
+
+#~ msgid ""
+#~ " -S List key sequences that invoke macros and their "
+#~ "values"
+#~ msgstr ""
+#~ " -S Listeazã secvenþele de taste care invocã macrourile "
+#~ "ºi valorile lor"
+
+#~ msgid ""
+#~ " -s List key sequences that invoke macros and their "
+#~ "values in"
+#~ msgstr ""
+#~ " -s Listeazã secvenþele de taste care invocã macrourile "
+#~ "ºi valorile lorîntr-o"
+
+#~ msgid " a form that can be reused as input."
+#~ msgstr ""
+#~ " formã care poate fi reutilizatã ca date de intrare."
+
+#~ msgid "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,"
+#~ msgstr ""
+#~ "Ieºire dintr-un ciclu FOR, WHILE sau UNTIL. Daca N este specificat,"
+
+#~ msgid "break N levels."
+#~ msgstr "întrerupe N nivele"
+
+#~ msgid "Resume the next iteration of the enclosing FOR, WHILE or UNTIL loop."
+#~ msgstr ""
+#~ "Continuã urmatoarea iteraþie din ciclul închis FOR, WHILE sau UNTIL."
+
+#~ msgid "If N is specified, resume at the N-th enclosing loop."
+#~ msgstr "Dacã N este specificat, continuã al N-ulea ciclu închis."
+
+#~ msgid "Run a shell builtin. This is useful when you wish to rename a"
+#~ msgstr ""
+#~ "Ruleazã un shell intern. Aceasta este folositoare când doriþi sa "
+#~ "redenumiþi "
+
+#~ msgid "shell builtin to be a function, but need the functionality of the"
+#~ msgstr "un shell intern drept funcþie, dar aveþi nevoie de funcþionalitatea"
+
+#~ msgid "builtin within the function itself."
+#~ msgstr "funcþiei interne de asemenea."
+
+#~ msgid "Change the current directory to DIR. The variable $HOME is the"
+#~ msgstr "Schimbã directorul curent cu DIR. Variabila $HOME este"
+
+#~ msgid "default DIR. The variable $CDPATH defines the search path for"
+#~ msgstr "DIR implicit. Variabila $CDPATH defineºte calea de cãutare pentru"
+
+#~ msgid "the directory containing DIR. Alternative directory names in CDPATH"
+#~ msgstr ""
+#~ "directorul care conþine DIR. Numele de directoare alternative în CDPATH"
+
+#~ msgid "are separated by a colon (:). A null directory name is the same as"
+#~ msgstr ""
+#~ "sunt separate de douã puncte (:). Un nume de director nul reprezintã "
+#~ "referire la"
+
+#~ msgid "the current directory, i.e. `.'. If DIR begins with a slash (/),"
+#~ msgstr "directorul curent, i.e. `.'. Dacã DIR începe cu un slash (/),"
+
+#~ msgid "then $CDPATH is not used. If the directory is not found, and the"
+#~ msgstr "atunci $CDPATH nu este folositã. Dacã directorul nu este gãsit, ºi"
+
+#~ msgid "shell option `cdable_vars' is set, then try the word as a variable"
+#~ msgstr ""
+#~ "opþiunea de shell `cdable_vars' este setatã, atunci cuvântul este un nume"
+
+#~ msgid "name. If that variable has a value, then cd to the value of that"
+#~ msgstr ""
+#~ "de variabilã. Dacã variabila are o valoare, se va face cd pe valoarea "
+#~ "acelei"
+
+#~ msgid ""
+#~ "variable. The -P option says to use the physical directory structure"
+#~ msgstr ""
+#~ "variabile. Opþiunea -P trimite la folosirea structurii fizice de "
+#~ "directoare"
+
+#~ msgid ""
+#~ "instead of following symbolic links; the -L option forces symbolic links"
+#~ msgstr ""
+#~ "în loc de urmarea legãturilor simbolice; opþiunea -L forþeazã urmarea"
+
+#~ msgid "to be followed."
+#~ msgstr "legãturilor simbolice."
+
+#~ msgid "Print the current working directory. With the -P option, pwd prints"
+#~ msgstr "Afiºeazã directorul de lucru curent. Cu opþiunea -P, pwd afiºeazã"
+
+#~ msgid "the physical directory, without any symbolic links; the -L option"
+#~ msgstr "directoarele simbolice, fãrã nici o legãturã simbolicã; opþiunea -L"
+
+#~ msgid "makes pwd follow symbolic links."
+#~ msgstr "face ca pwd sã urmeze legãturile simbolice."
+
+#~ msgid ""
+#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell"
+#~ msgstr ""
+#~ "Ruleazã COMANDA cu PARAMETRI ignorând funcþiile shellului. Dacã aveþi"
+
+#~ msgid "function called `ls', and you wish to call the command `ls', you can"
+#~ msgstr ""
+#~ "o funcþie a shellului care se cheamã `ls', ºi doriþi sa numiþi comanda "
+#~ "`ls', puteþi"
+
+#~ msgid ""
+#~ "say \"command ls\". If the -p option is given, a default value is used"
+#~ msgstr ""
+#~ "spune \"command ls\". Daca este datã opþiunea -p este folositã o valoare "
+#~ "implicitã"
+
+#~ msgid ""
+#~ "for PATH that is guaranteed to find all of the standard utilities. If"
+#~ msgstr ""
+#~ "pentru CALE care e garantatã sã gãseascã toate utilitarele standard. Dacã"
+
+#~ msgid ""
+#~ "the -V or -v option is given, a string is printed describing COMMAND."
+#~ msgstr ""
+#~ "sunt date opþiunile -V sau -v, este tipãrit un ºir care descrie COMANDA."
+
+#~ msgid "The -V option produces a more verbose description."
+#~ msgstr "Opþiunea -V produce o descriere mult mai detaliatã."
+
+#~ msgid "Declare variables and/or give them attributes. If no NAMEs are"
+#~ msgstr ""
+#~ "Declarã variabile ºi/sau le dã atribute. Dacã nu e dat nici un NUME,"
+
+#~ msgid "given, then display the values of variables instead. The -p option"
+#~ msgstr "va afiºa în loc valorile variabilelor. Opþiunea -p"
+
+#~ msgid "will display the attributes and values of each NAME."
+#~ msgstr "va afiºa atributele ºi valorile fiecãrui NUME."
+
+#~ msgid "The flags are:"
+#~ msgstr "Marcajele(flags) sunt:"
+
+#~ msgid " -a\tto make NAMEs arrays (if supported)"
+#~ msgstr " -a\tpentru a crea intervale de NUME (dacã este suportat)"
+
+#~ msgid " -f\tto select from among function names only"
+#~ msgstr " -f\tpentru a selecta doar prin numele funcþiilor"
+
+#~ msgid " -F\tto display function names without definitions"
+#~ msgstr " -F\tpentru a afiºa numele funcþiilor fãrã definiþii"
+
+#~ msgid " -r\tto make NAMEs readonly"
+#~ msgstr " -r\tpentru a face NUME doar în citire (readonly)"
+
+#~ msgid " -x\tto make NAMEs export"
+#~ msgstr " -x\tpentru a exporta NUME"
+
+#~ msgid " -i\tto make NAMEs have the `integer' attribute set"
+#~ msgstr " -i\tpentru ca NUME sã aibe setat atributul de `integer'"
+
+#~ msgid "Variables with the integer attribute have arithmetic evaluation (see"
+#~ msgstr "Variabilele cu atributul integer au evaluarea aritmeticã (vezi"
+
+#~ msgid "`let') done when the variable is assigned to."
+#~ msgstr "`let') efectuatã când îi este atribuitã variabila."
+
+#~ msgid "When displaying values of variables, -f displays a function's name"
+#~ msgstr "La afiºarea valorilor variabilelor, -f afiºeazã numele funcþiei"
+
+#~ msgid "and definition. The -F option restricts the display to function"
+#~ msgstr "ºi definiþia. Opþiunea -F restrânge afiºarea doar la"
+
+#~ msgid "name only."
+#~ msgstr "numele funcþiei."
+
+#~ msgid ""
+#~ "Using `+' instead of `-' turns off the given attribute instead. When"
+#~ msgstr "Folosirea `+' în locul `-' dezactiveazã atributul dat. Când"
+
+#~ msgid "used in a function, makes NAMEs local, as with the `local' command."
+#~ msgstr ""
+#~ "este folosit într-o funcþie, se considerã NUME locale, ca ºi în comanda "
+#~ "`local'."
+
+#~ msgid "Obsolete. See `declare'."
+#~ msgstr "Învechit. Vezi `declare'."
+
+#~ msgid "Create a local variable called NAME, and give it VALUE. LOCAL"
+#~ msgstr ""
+#~ "Creeazã o variabilã localã denumitã NUME, ºi îi atribuie VALOARE. LOCAL"
+
+#~ msgid "have a visible scope restricted to that function and its children."
+#~ msgstr ""
+#~ "sã aibã un domeniu vizibil restrâns la acea funcþie ºi copilul (children) "
+#~ "ei."
+
+#~ msgid "Output the ARGs. If -n is specified, the trailing newline is"
+#~ msgstr ""
+#~ "Afiºeazã (output) ARGumenetele. Dacã -n este specificat,sfârºitul de "
+#~ "linie este"
+
+#~ msgid "suppressed. If the -e option is given, interpretation of the"
+#~ msgstr "suprimat. Dacã este datã opþiunea -e, interpretarea"
+
+#~ msgid "following backslash-escaped characters is turned on:"
+#~ msgstr ""
+#~ "urmãtorului caracterelor speciale (backslash-escaped) este activatã:"
+
+#~ msgid "\t\\a\talert (bell)"
+#~ msgstr "\t\\a\talertã (clopoþel (bell))"
+
+#~ msgid "\t\\b\tbackspace"
+#~ msgstr "\t\\b\tbackspace"
+
+#~ msgid "\t\\c\tsuppress trailing newline"
+#~ msgstr "\t\\c\tsuprimã sfârºitul de linie"
+
+#~ msgid "\t\\E\tescape character"
+#~ msgstr "\t\\E\tcaracterul escape"
+
+#~ msgid "\t\\f\tform feed"
+#~ msgstr "\t\\f\ttrecere la început de linie (form feed)"
+
+#~ msgid "\t\\n\tnew line"
+#~ msgstr "\t\\n\tlinie nouã"
+
+#~ msgid "\t\\r\tcarriage return"
+#~ msgstr "\t\\r\tretur de car (carriage return)"
+
+#~ msgid "\t\\t\thorizontal tab"
+#~ msgstr "\t\\t\ttab orizontal"
+
+#~ msgid "\t\\v\tvertical tab"
+#~ msgstr "\t\\v\ttab vertical"
+
+#~ msgid "\t\\\\\tbackslash"
+#~ msgstr "\t\\\\\tbackslash"
+
+#~ msgid "\t\\num\tthe character whose ASCII code is NUM (octal)."
+#~ msgstr "\t\\num\tcaracterul al cãrui cod ASCII este NUM (octal)."
+
+#~ msgid ""
+#~ "You can explicitly turn off the interpretation of the above characters"
+#~ msgstr "Puteþi dezactiva explicit interpretarea caracterelor de mai sus"
+
+#~ msgid "with the -E option."
+#~ msgstr "cu ajutorul opþiunii -E."
+
+#~ msgid ""
+#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed."
+#~ msgstr ""
+#~ "Afiºeazã (output) ARGumentele. Dacã este specificat -n, sfârºitul de "
+#~ "linie este suprimat."
+
+#~ msgid "Enable and disable builtin shell commands. This allows"
+#~ msgstr ""
+#~ "Activeazã ºi dezactiveazã comenzile interne ale shell-ului. Aceasta vã"
+
+#~ msgid "you to use a disk command which has the same name as a shell"
+#~ msgstr ""
+#~ "permite utilizarea unei comenzi disk care sã aibã acelaºi nume ca ºi cea "
+
+#~ msgid "builtin. If -n is used, the NAMEs become disabled; otherwise"
+#~ msgstr ""
+#~ "internã a shell-ului. Dacã este folosit -n, NUME devine dezactivat; în "
+#~ "caz contrar"
+
+#~ msgid "NAMEs are enabled. For example, to use the `test' found on your"
+#~ msgstr ""
+#~ "NUME este activat. De exemplu, pentru a folosi funcþia `test; aflatã în"
+
+#~ msgid "path instead of the shell builtin version, type `enable -n test'."
+#~ msgstr ""
+#~ "calea(path) dumneavoastrã în loc de versiunea internã, tastaþi `enable -n "
+#~ "test'."
+
+#~ msgid "On systems supporting dynamic loading, the -f option may be used"
+#~ msgstr ""
+#~ "Pe sistemele care suportã încãrcarea dinamicã, opþiunea -f poate fi "
+#~ "folositã"
+
+#~ msgid "to load new builtins from the shared object FILENAME. The -d"
+#~ msgstr ""
+#~ "pentru a încãrca noile elemente (builtins) din obiectul distribuit "
+#~ "(shared object) NUME_FIªIER. Opþiunea -d"
+
+#~ msgid "option will delete a builtin previously loaded with -f. If no"
+#~ msgstr "va ºterge un element (builtin) deja încãrcat cu -f. Dacã nu"
+
+#~ msgid "non-option names are given, or the -p option is supplied, a list"
+#~ msgstr ""
+#~ "este dat nici un nume non-opþiune, sau este prezentã opþiunea -p, o listã"
+
+#~ msgid "of builtins is printed. The -a option means to print every builtin"
+#~ msgstr ""
+#~ "de elemente(builtins) este tipãritã. Opþiunea -a înseamnã tipãrirea "
+#~ "fiecãrui "
+
+#~ msgid "with an indication of whether or not it is enabled. The -s option"
+#~ msgstr ""
+#~ "element(builtin) cu o indicaþie dacã este sau nu activ. Opþiunea -s"
+
+#~ msgid "restricts the output to the Posix.2 `special' builtins. The -n"
+#~ msgstr ""
+#~ "restricþioneazã output-ul la elementele(builtins) `speciale' Posix 2. "
+#~ "Opþiunea"
+
+#~ msgid "option displays a list of all disabled builtins."
+#~ msgstr "-n afiºeazã o listã a tuturor elementelor(builtins) inactive."
+
+#~ msgid ""
+#~ "Read ARGs as input to the shell and execute the resulting command(s)."
+#~ msgstr ""
+#~ "Citeºte ARGumente ca input al shell-ului ºi executã comanda(comenzile) "
+#~ "rezultatã(e)."
+
+#~ msgid "Getopts is used by shell procedures to parse positional parameters."
+#~ msgstr ""
+#~ "Getopts este folosit de procedurile de shell pentru a analiza(parse) "
+#~ "parametrii poziþionali."
+
+#~ msgid "OPTSTRING contains the option letters to be recognized; if a letter"
+#~ msgstr ""
+#~ "OPTSTRING conþine literele optiunilor care vor fi recunoscute; dacã o "
+#~ "literã"
+
+#~ msgid "is followed by a colon, the option is expected to have an argument,"
+#~ msgstr "e urmatã de douã puncte, opþiunea va trebui sã aibã un parametru,"
+
+#~ msgid "which should be separated from it by white space."
+#~ msgstr "care va fi separat de aceasta printr-un spaþiu."
+
+#~ msgid "Each time it is invoked, getopts will place the next option in the"
+#~ msgstr ""
+#~ "De fiecare datã când este invocat, getopts va pune urmãtoarea opþiune în"
+
+#~ msgid "shell variable $name, initializing name if it does not exist, and"
+#~ msgstr "variabile de shell $name, iniþializând name dacã nu existã, ºi"
+
+#~ msgid "the index of the next argument to be processed into the shell"
+#~ msgstr "indexul urmãtorilor parametri care vor fi procesaþi în variabila"
+
+#~ msgid "variable OPTIND. OPTIND is initialized to 1 each time the shell or"
+#~ msgstr ""
+#~ "de shell OPTIND. OPTIND este iniþializatã cu 1 de fiecare datã când "
+#~ "shellul sau"
+
+#~ msgid "a shell script is invoked. When an option requires an argument,"
+#~ msgstr ""
+#~ "un script al shellului este invocat. Când opþiunea necesitã un parametru,"
+
+#~ msgid "getopts places that argument into the shell variable OPTARG."
+#~ msgstr "getopts plaseazã acest parametru în variabila de shell OPTARG."
+
+#~ msgid "getopts reports errors in one of two ways. If the first character"
+#~ msgstr "getopts raporteazã erori în douã feluri. Dacã primul caracter"
+
+#~ msgid "of OPTSTRING is a colon, getopts uses silent error reporting. In"
+#~ msgstr ""
+#~ "al OPTSTRING este 'douã puncte', getopts va folosi raportarea "
+#~ "silenþioasã. În"
+
+#~ msgid "this mode, no error messages are printed. If an illegal option is"
+#~ msgstr ""
+#~ "acest mod, nici un mesaj de eroare nu este tipãrit. Dacã o opþiune "
+#~ "ilegalã este"
+
+#~ msgid "seen, getopts places the option character found into OPTARG. If a"
+#~ msgstr "întâlnitã, getopts plaseazã caracterul opþiunii în OPTARG. Dacã un"
+
+#~ msgid "required argument is not found, getopts places a ':' into NAME and"
+#~ msgstr "parametru necesar nu este întâlnit, getopts pune ':' la NUME ºi"
+
+#~ msgid "sets OPTARG to the option character found. If getopts is not in"
+#~ msgstr ""
+#~ "seteazã OPTARG la caracterul întâlnit al opþiunii. Dacã getopts nu este "
+#~ "în"
+
+#~ msgid "silent mode, and an illegal option is seen, getopts places '?' into"
+#~ msgstr ""
+#~ "modul silenþios, ºi se întâlneºte o opþiune ilegalã, getopts pune '?' în"
+
+#~ msgid "NAME and unsets OPTARG. If a required option is not found, a '?'"
+#~ msgstr ""
+#~ "NUME ºi deseteazã OPTARG. Dacã o opþiune necesarã nu este întâlnitã, un "
+#~ "'?'"
+
+#~ msgid "is placed in NAME, OPTARG is unset, and a diagnostic message is"
+#~ msgstr ""
+#~ "va fi pus în NUME, OPTARG va fi desetat, ºi un mesaj de diagnosticare va "
+#~ "fi"
+
+#~ msgid "printed."
+#~ msgstr "afiºat."
+
+#~ msgid "If the shell variable OPTERR has the value 0, getopts disables the"
+#~ msgstr "Dacã variabila de shell OPTERR are valoarea 0, getopts dezactiveazã"
+
+#~ msgid "printing of error messages, even if the first character of"
+#~ msgstr "afiºarea mesajelor de eroare, chiar daca primul caracter al"
+
+#~ msgid "OPTSTRING is not a colon. OPTERR has the value 1 by default."
+#~ msgstr "OPTSTRING nu este 'douã puncte'. OPTERR are implicit valoarea 1."
+
+#~ msgid "Getopts normally parses the positional parameters ($0 - $9), but if"
+#~ msgstr ""
+#~ "Getopts analizeazã(parses) normal parametrii poziþionali ($0 - $9), dar "
+#~ "dacã"
+
+#~ msgid "more arguments are given, they are parsed instead."
+#~ msgstr "sunt daþi mai mulþi parametri, aceºtia sunt analizaþi în loc."
+
+#~ msgid "Exec FILE, replacing this shell with the specified program."
+#~ msgstr "Exec FIªIER, înlocuind acest shell cu un program specificat."
+
+#~ msgid "If FILE is not specified, the redirections take effect in this"
+#~ msgstr "Dacã FIªIER nu este specificat, redirectãrile au efect în acest"
+
+#~ msgid "shell. If the first argument is `-l', then place a dash in the"
+#~ msgstr ""
+#~ "shell. Dacã primul parametru este `-l', atunci se va plasa o liniuþã în"
+
+#~ msgid "zeroth arg passed to FILE, as login does. If the `-c' option"
+#~ msgstr ""
+#~ "al zero-ulea arg pasat FIªIERului, cum face login-ul. Dacã opþiunea `-c'"
+
+#~ msgid "is supplied, FILE is executed with a null environment. The `-a'"
+#~ msgstr "este furnizatã, FIªIER este executat cu un mediu null. Opþiunea"
+
+#~ msgid "option means to make set argv[0] of the executed process to NAME."
+#~ msgstr "'-a' înseamnã setarea argv[0] a procesului executat la NUME."
+
+#~ msgid "If the file cannot be executed and the shell is not interactive,"
+#~ msgstr "Dacã fiºierul nu poate fi executat ºi shell-ul nu este interactiv,"
+
+#~ msgid "then the shell exits, unless the variable \"no_exit_on_failed_exec\""
+#~ msgstr "atunci shell-ul iese, dacã variabila \"no_exit_on_failed_exec\""
+
+#~ msgid "is set."
+#~ msgstr "nu este setatã."
+
+#~ msgid "is that of the last command executed."
+#~ msgstr "este aceea a ultimei comenzi executate."
+
+#~ msgid ""
+#~ "FIRST and LAST can be numbers specifying the range, or FIRST can be a"
+#~ msgstr ""
+#~ "PRIMUL ºi ULTIMUL pot fi numere care specificã intervalul, sau PRIMUL "
+#~ "poate fi"
+
+#~ msgid "string, which means the most recent command beginning with that"
+#~ msgstr ""
+#~ "un ºir care reprezintã cea mai recentã comandã care începea cu acest"
+
+#~ msgid "string."
+#~ msgstr "ºir."
+
+#~ msgid ""
+#~ " -e ENAME selects which editor to use. Default is FCEDIT, then EDITOR,"
+#~ msgstr ""
+#~ " -e ENUME selecteazã editorul de folosit. implicit este FCEDIT, apoi "
+#~ "EDITOR,"
+
+#~ msgid ""
+#~ " then the editor which corresponds to the current readline editing"
+#~ msgstr ""
+#~ " apoi editorul care corespunde cu modul de editare al liniei"
+#~ "(readline)"
+
+#~ msgid " mode, then vi."
+#~ msgstr " curente, ºi apoi vi."
+
+#~ msgid " -l means list lines instead of editing."
+#~ msgstr " -l reprezintã afiºarea liniilor în locul editãrii acestora."
+
+#~ msgid " -n means no line numbers listed."
+#~ msgstr " -n înseamnã cã nu vor fi afiºate numerele liniilor."
+
+#~ msgid ""
+#~ " -r means reverse the order of the lines (making it newest listed "
+#~ "first)."
+#~ msgstr ""
+#~ " -r reprezintã inversarea ordinii liniilor (cele mai noi fiind listate "
+#~ "primele)."
+
+#~ msgid "With the `fc -s [pat=rep ...] [command]' format, the command is"
+#~ msgstr "Cu `fc -s [pat=rep ...] [comandã]' format, comanda este"
+
+#~ msgid "re-executed after the substitution OLD=NEW is performed."
+#~ msgstr "reexecutatã dupã ce s-a produs substituþia VECHI=NOU."
+
+#~ msgid "A useful alias to use with this is r='fc -s', so that typing `r cc'"
+#~ msgstr "Un alias folositor este r='fc -s', aºa cã tastând `r cc'"
+
+#~ msgid "runs the last command beginning with `cc' and typing `r' re-executes"
+#~ msgstr ""
+#~ "se ruleazã ultima comandã care începe cu `cc' ºi tastând `r' se reexecutã"
+
+#~ msgid "Place JOB_SPEC in the foreground, and make it the current job. If"
+#~ msgstr ""
+#~ "Aduce JOB_SPEC în prim plan(foreground), ?ºi îl face jobul curent. Dacã"
+
+#~ msgid "JOB_SPEC is not present, the shell's notion of the current job is"
+#~ msgstr ""
+#~ "JOB_SPEC nu este prezent, este folositã noþiunea shell-ului despre jobul"
+
+#~ msgid "used."
+#~ msgstr "curent."
+
+#~ msgid "Place JOB_SPEC in the background, as if it had been started with"
+#~ msgstr "Pune JOB_SPEC în fundal(background), ca ºi cum ar fi fost pornit cu"
+
+#~ msgid "`&'. If JOB_SPEC is not present, the shell's notion of the current"
+#~ msgstr ""
+#~ "`&'. Dacã JOB_SPEC nu este prezent, va fi folositã noþiunea shell-ului "
+#~ "despre"
+
+#~ msgid "job is used."
+#~ msgstr "jobul curent."
+
+#~ msgid "For each NAME, the full pathname of the command is determined and"
+#~ msgstr "Pentru fiecare NUME, calea întreagã a comenzii este determinatã ºi"
+
+#~ msgid "remembered. If the -p option is supplied, PATHNAME is used as the"
+#~ msgstr ""
+#~ "reþinutã. Daca este furnizatã ºi opþiunea -p, CALE este folositã ca ºi"
+
+#~ msgid "full pathname of NAME, and no path search is performed. The -r"
+#~ msgstr ""
+#~ "cale de cãutare întreagã a NUMElui, ºi nu se mai face cãutare în calea "
+#~ "curentã. "
+
+#~ msgid "option causes the shell to forget all remembered locations. If no"
+#~ msgstr ""
+#~ "Opþiunea -r face ca shell-ul sã uite toate locaþiile reþinute. Dacã nu"
+
+#~ msgid ""
+#~ "arguments are given, information about remembered commands is displayed."
+#~ msgstr ""
+#~ "este furnizat nici un parametru sunt afiºate informaþii despre comenzile "
+#~ "reþinute."
+
+#~ msgid "Display helpful information about builtin commands. If PATTERN is"
+#~ msgstr ""
+#~ "Se afiºeazã informaþii folositoare despre comenzile interne. Dacã TIPAR "
+#~ "este"
+
+#~ msgid "specified, gives detailed help on all commands matching PATTERN,"
+#~ msgstr ""
+#~ "specificat, se dã ajutor detaliat pentru toate comenzile potrivite "
+#~ "TIPARului,"
+
+#~ msgid "otherwise a list of the builtins is printed."
+#~ msgstr "în caz contrar se va tipãri o listã a comenzilor interne."
+
+#~ msgid "Display the history list with line numbers. Lines listed with"
+#~ msgstr "Afiºeazã istoricul cu numerele liniilor. Liniile listate cu"
+
+#~ msgid "with a `*' have been modified. Argument of N says to list only"
+#~ msgstr "un `*' au fost modificate. Parametrul N va aduce afiºarea doar "
+
+#~ msgid "the last N lines. The -c option causes the history list to be"
+#~ msgstr "a ultimelor N linii. Opþiunea -c face ca lista istoricului sã fie"
+
+#~ msgid ""
+#~ "cleared by deleting all of the entries. The `-w' option writes out the"
+#~ msgstr "ºtearsã prin ºtergerea tuturor intrãrilor. Opþiunea `-w' scrie"
+
+#~ msgid ""
+#~ "current history to the history file; `-r' means to read the file and"
+#~ msgstr ""
+#~ "istoricul curent în fiºierul de istoric; `-r' înseamnã citirea "
+#~ "fiºierului ºi"
+
+#~ msgid "append the contents to the history list instead. `-a' means"
+#~ msgstr "adãugare a conþinutului listei istoricului în loc. `-a' înseamnã"
+
+#~ msgid "to append history lines from this session to the history file."
+#~ msgstr ""
+#~ "adãugare a liniilor istoricului din aceastã sesiune la fiºierul de "
+#~ "istoric."
+
+#~ msgid "Argument `-n' means to read all history lines not already read"
+#~ msgstr ""
+#~ "Parametrul `-n' înseamnã citirea tuturor liniilor istoricului care nu "
+#~ "sunt deja citite"
+
+#~ msgid "from the history file and append them to the history list. If"
+#~ msgstr ""
+#~ "din fiºierul de istoric ºi adãugarea lor la lista istoricului. Dacã"
+
+#~ msgid "FILENAME is given, then that is used as the history file else"
+#~ msgstr ""
+#~ "este dat NUME_FIªIER, acesta va fi utilizat ca fiºier de istoric, în caz "
+#~ "contrar"
+
+#~ msgid "if $HISTFILE has a value, that is used, else ~/.bash_history."
+#~ msgstr ""
+#~ "dacã $HISTFILE are valoare, aceasta este utilizatã, altfel ~/."
+#~ "bash_history."
+
+#~ msgid "If the -s option is supplied, the non-option ARGs are appended to"
+#~ msgstr ""
+#~ "Dacã este furnizatã opþiunea -s ARGumentele non-opþiuni sunt adãugate la"
+
+#~ msgid "the history list as a single entry. The -p option means to perform"
+#~ msgstr "lista istoricului ca intrãri singure. Opþiunea -p înseamnã"
+
+#~ msgid ""
+#~ "history expansion on each ARG and display the result, without storing"
+#~ msgstr ""
+#~ "expandarea istoricului la fiecare ARGument ºi afiºarea rezultatului, fãrã "
+#~ "a stoca"
+
+#~ msgid "anything in the history list."
+#~ msgstr "nimic în lista istoricului."
+
+#~ msgid "Lists the active jobs. The -l option lists process id's in addition"
+#~ msgstr ""
+#~ "Listeazã joburile active. Opþiunea -l listeazã id-urile proceselor în "
+#~ "plus faþã de"
+
+#~ msgid "to the normal information; the -p option lists process id's only."
+#~ msgstr ""
+#~ "informaþiile normale; optiunea -p listeazã doar id-urile proceselor."
+
+#~ msgid ""
+#~ "If -n is given, only processes that have changed status since the last"
+#~ msgstr ""
+#~ "Dacã este dat -n,sunt afiºate doar procesele care ºi-au schimbat starea"
+
+#~ msgid ""
+#~ "notification are printed. JOBSPEC restricts output to that job. The"
+#~ msgstr ""
+#~ "de la ultima notificare. JOBSPEC restricþioneazã output-ul spre acel "
+#~ "job. "
+
+#~ msgid "-r and -s options restrict output to running and stopped jobs only,"
+#~ msgstr ""
+#~ "Opþiunile -r ºi -s restricþioneazã output-ul doar spre joburile care "
+#~ "ruleazã ºi respectiv,"
+
+#~ msgid "respectively. Without options, the status of all active jobs is"
+#~ msgstr "care sunt stopate. Fãrã opþiuni, este afiºatã starea joburilor"
+
+#~ msgid ""
+#~ "printed. If -x is given, COMMAND is run after all job specifications"
+#~ msgstr ""
+#~ "active. Dacã este furnizat -x, COMANDÃ este rulatã dupã ce toate "
+#~ "specificaþiile"
+
+#~ msgid ""
+#~ "that appear in ARGS have been replaced with the process ID of that job's"
+#~ msgstr ""
+#~ "joburilor care aparîn ARGS au fost înlocuite cu ID-urile proceselor a"
+
+#~ msgid "process group leader."
+#~ msgstr "liderului de grup al proceselor acelui job(process group-leader)."
+
+#~ msgid "Removes each JOBSPEC argument from the table of active jobs."
+#~ msgstr "ªterge fiecare parametru JOBSPEC din tabela de joburi active."
+
+#~ msgid "Send the processes named by PID (or JOB) the signal SIGSPEC. If"
+#~ msgstr "Trimite proceselor numite de PID (sau JOB) semnalul SIGSPEC. Dacã"
+
+#~ msgid ""
+#~ "SIGSPEC is not present, then SIGTERM is assumed. An argument of `-l'"
+#~ msgstr "SIGSPEC nu este prezent, atunci se asumã SIGTERM. Parametrul `-l'"
+
+#~ msgid "lists the signal names; if arguments follow `-l' they are assumed to"
+#~ msgstr ""
+#~ "listeazã numele semnalelor; dacã urmeazã parametri dupã `-l' se asumã cã"
+
+#~ msgid "be signal numbers for which names should be listed. Kill is a shell"
+#~ msgstr ""
+#~ "sunt numere de semnale pentru care numele ar trebui listate. Kill este "
+#~ "comandã"
+
+#~ msgid "builtin for two reasons: it allows job IDs to be used instead of"
+#~ msgstr ""
+#~ "internã a sehll-ului din douã motive: permite utilizarea ID-urilor de "
+#~ "joburi în locul"
+
+#~ msgid "process IDs, and, if you have reached the limit on processes that"
+#~ msgstr "ID-urilor de procese, ºi, daca s-a ajuns la limita de procese care "
+
+#~ msgid ""
+#~ "you can create, you don't have to start a process to kill another one."
+#~ msgstr ""
+#~ "se pot crea, nu mai e nevoie sã se porneascã un proces pentru a omorî "
+#~ "altul."
+
+#~ msgid "Each ARG is an arithmetic expression to be evaluated. Evaluation"
+#~ msgstr ""
+#~ "Fiecare ARGument este o expresie aritmeticã ce va fi evaluatã. Evaluarea"
+
+#~ msgid "is done in long integers with no check for overflow, though division"
+#~ msgstr ""
+#~ "se face în întregi lungi (long integers) fãrã verificãri de overflow, "
+#~ "totuºi împãrþirea"
+
+#~ msgid "by 0 is trapped and flagged as an error. The following list of"
+#~ msgstr "la 0 este reþinutã ºi marcatã ca eroare. Urmãtoarea listã de"
+
+#~ msgid "operators is grouped into levels of equal-precedence operators."
+#~ msgstr "operatori este grupatã în nivele de operatori 'equal-precedence'."
+
+#~ msgid "The levels are listed in order of decreasing precedence."
+#~ msgstr "Nivelele sunt listate în ordinea inversã a întâietãþii."
+
+#~ msgid "\t-, +\t\tunary minus, plus"
+#~ msgstr "\t-, +\t\tplus, minus unar"
+
+#~ msgid "\t!, ~\t\tlogical and bitwise negation"
+#~ msgstr "\t!, ~\t\tnegare logicã"
+
+#~ msgid "\t*, /, %\t\tmultiplication, division, remainder"
+#~ msgstr "\t*, /, %\t\tînmulþire, împãrþire, rest"
+
+#~ msgid "\t+, -\t\taddition, subtraction"
+#~ msgstr "\t+, -\t\tadãugare, scãdere"
+
+#~ msgid "\t<<, >>\t\tleft and right bitwise shifts"
+#~ msgstr "\t<<, >>\t\toperaþii pe un bit la stânga ºi la dreapta"
+
+#~ msgid "\t<=, >=, <, >\tcomparison"
+#~ msgstr "\t<=, >=, <, >\tcomparare"
+
+#~ msgid "\t==, !=\t\tequality, inequality"
+#~ msgstr "\t==, !=\t\tegalitate, inegalitate"
+
+#~ msgid "\t&\t\tbitwise AND"
+#~ msgstr "\t&\t\tªI pe un bit"
+
+#~ msgid "\t^\t\tbitwise XOR"
+#~ msgstr "\t^\t\tSAU exclusiv(XOR) pe un bit"
+
+#~ msgid "\t|\t\tbitwise OR"
+#~ msgstr "\t|\t\tSAU pe un bit"
+
+#~ msgid "\t&&\t\tlogical AND"
+#~ msgstr "\t&&\t\tªI logic"
+
+#~ msgid "\t||\t\tlogical OR"
+#~ msgstr "\t||\t\tSAU logic"
+
+#~ msgid "\texpr ? expr : expr"
+#~ msgstr "\texpr ? expr : expr"
+
+#~ msgid "\t\t\tconditional expression"
+#~ msgstr "\t\t\texpresie condiþionalã"
+
+#~ msgid "\t=, *=, /=, %=,"
+#~ msgstr "\t=, *=, /=, %=,"
+
+#~ msgid "\t+=, -=, <<=, >>=,"
+#~ msgstr "\t+=, -=, <<=, >>=,"
+
+#~ msgid "\t&=, ^=, |=\tassignment"
+#~ msgstr "\t&=, ^=, |=\tatribuire"
+
+#~ msgid "is replaced by its value (coerced to a long integer) within"
+#~ msgstr "este înlocuit de valoarea sa (trunchiatã la un întreg lung) într-o"
+
+#~ msgid "an expression. The variable need not have its integer attribute"
+#~ msgstr "expresie. Variabila nu trebuie sã aibã atributul sãu întreg"
+
+#~ msgid "turned on to be used in an expression."
+#~ msgstr "activat pentru a fi folositã într-o expresie."
+
+#~ msgid "Operators are evaluated in order of precedence. Sub-expressions in"
+#~ msgstr "Operatorii sunt evaluaþi în ordinea întâietãþii. Subexpresiile din"
+
+#~ msgid "parentheses are evaluated first and may override the precedence"
+#~ msgstr "paranteze sunt evaluate primele ºi pot suprascrie regulile de"
+
+#~ msgid "rules above."
+#~ msgstr "întâietate de mai sus."
+
+#~ msgid "If the last ARG evaluates to 0, let returns 1; 0 is returned"
+#~ msgstr ""
+#~ "Dacã ultimul ARGument este evaluat la 0 let returneazã 1; 0 este returnat"
+
+#~ msgid "otherwise."
+#~ msgstr "în caz contrar."
+
+#~ msgid "One line is read from the standard input, and the first word is"
+#~ msgstr ""
+#~ "Linia este cititã de la intrarea(input) standard, ºi primul cuvânt este"
+
+#~ msgid ""
+#~ "assigned to the first NAME, the second word to the second NAME, and so"
+#~ msgstr ""
+#~ "atribuit primului NUME, al doilea cuvânt celui de-al doilea NUME, ºi aºa"
+
+#~ msgid ""
+#~ "on, with leftover words assigned to the last NAME. Only the characters"
+#~ msgstr ""
+#~ "mai departe, cu cele rãmase atribuite ultimelor NUME. Doar caracterele"
+
+#~ msgid "found in $IFS are recognized as word delimiters. The return code is"
+#~ msgstr ""
+#~ "gãsite în $IFS sunt recunoscute ca delimitatoare de cuvinte. Codul "
+#~ "returnat este"
+
+#~ msgid ""
+#~ "zero, unless end-of-file is encountered. If no NAMEs are supplied, the"
+#~ msgstr ""
+#~ "zero, cu excepþia cazului în care este întâlnit sfârºit de fiºier. Dacã "
+#~ "nici un NUME"
+
+#~ msgid ""
+#~ "line read is stored in the REPLY variable. If the -r option is given,"
+#~ msgstr ""
+#~ "nu este furnizat, linia cititã este stocatã în variabila RÃSPUNS. Dacã e "
+#~ "datã "
+
+#~ msgid "this signifies `raw' input, and backslash escaping is disabled. If"
+#~ msgstr ""
+#~ "opþiunea -r, aceasta înseamnã intrare `brutã' ºi caractere speciale "
+#~ "dezactivate."
+
+#~ msgid "the `-p' option is supplied, the string supplied as an argument is"
+#~ msgstr "Dacã este datã opþiunea `-p', ºirul furnizat ca argument este"
+
+#~ msgid ""
+#~ "output without a trailing newline before attempting to read. If -a is"
+#~ msgstr "trimis la output cu linie nouã înainte de citire. Dacã -a este"
+
+#~ msgid ""
+#~ "supplied, the words read are assigned to sequential indices of ARRAY,"
+#~ msgstr ""
+#~ "furnizatã, cuvintele citite sunt atribuite indicilor secvenþiali de "
+#~ "INTERVAL,"
+
+#~ msgid "starting at zero. If -e is supplied and the shell is interactive,"
+#~ msgstr ""
+#~ "începând de la zero. Dacã -e este furnizat ºi shell-ul este interactiv,"
+
+#~ msgid "readline is used to obtain the line."
+#~ msgstr "se va citi linia pentru obþinerea acesteia."
+
+#~ msgid ""
+#~ "Causes a function to exit with the return value specified by N. If N"
+#~ msgstr ""
+#~ "Cauzeazã terminarea unei funcþii cu valoarea specificatã de N. Dacã N"
+
+#~ msgid "is omitted, the return status is that of the last command."
+#~ msgstr "este omis, starea returnatã va fi aceea a ultimei comenzi."
+
+#~ msgid " -a Mark variables which are modified or created for export."
+#~ msgstr ""
+#~ " -a Marcheazã variabilele de modificat sau create pentru export."
+
+#~ msgid " -b Notify of job termination immediately."
+#~ msgstr " -b Notificare de terminare de job imediatã."
+
+#~ msgid " -e Exit immediately if a command exits with a non-zero status."
+#~ msgstr ""
+#~ " -e Iese imediat dacã existã o comandã cu stare diferitã de zero."
+
+#~ msgid " -f Disable file name generation (globbing)."
+#~ msgstr " -f Inhibã generarea de nume de fiºiere (globalizare)."
+
+#~ msgid " -h Remember the location of commands as they are looked up."
+#~ msgstr " -h Reþine locaþiile comenzilor pe mãsura verificãrii lor."
+
+#~ msgid ""
+#~ " -i Force the shell to be an \"interactive\" one. Interactive shells"
+#~ msgstr ""
+#~ " -i Forþeazã shell-ul sã fie unul \"interactiv\". Shell-urile "
+#~ "interactive"
+
+#~ msgid " always read `~/.bashrc' on startup."
+#~ msgstr " citesc întotdeauna `~/.bashrc' la rulare."
+
+#~ msgid " -k All assignment arguments are placed in the environment for a"
+#~ msgstr " -k Toþi parametrii atribuirii sunt plasaþi în mediu pentru o"
+
+#~ msgid " command, not just those that precede the command name."
+#~ msgstr " comandã, nu doar cele care preced numele comenzii."
+
+#~ msgid " -m Job control is enabled."
+#~ msgstr " -m Controlul job-urilor este activat."
+
+#~ msgid " -n Read commands but do not execute them."
+#~ msgstr " -n Citeºte comenzile, dar nu le executã."
+
+#~ msgid " -o option-name"
+#~ msgstr " -o nume-opþiune"
+
+#~ msgid " Set the variable corresponding to option-name:"
+#~ msgstr " Seteazã variabila corespunzãtoare numelui opþiunii:"
+
+#~ msgid " allexport same as -a"
+#~ msgstr " allexport la fel ca -a"
+
+#~ msgid " braceexpand same as -B"
+#~ msgstr " braceexpand la fel ca -B"
+
+#~ msgid " emacs use an emacs-style line editing interface"
+#~ msgstr ""
+#~ " emacs foloseºte o interfaþã de editare de linii stil "
+#~ "emacs"
+
+#~ msgid " errexit same as -e"
+#~ msgstr " errexit la fel ca -e"
+
+#~ msgid " hashall same as -h"
+#~ msgstr " hashall la fel ca -h"
+
+#~ msgid " histexpand same as -H"
+#~ msgstr " histexpand la fel ca -H"
+
+#~ msgid " ignoreeof the shell will not exit upon reading EOF"
+#~ msgstr " ignoreeof shellul nu va ieºi dupã citirea EOF"
+
+#~ msgid " interactive-comments"
+#~ msgstr " interactive-comments"
+
+#~ msgid ""
+#~ " allow comments to appear in interactive commands"
+#~ msgstr ""
+#~ " permite comentariilor sã aparã în comenzi "
+#~ "interactive."
+
+#~ msgid " keyword same as -k"
+#~ msgstr " keyword la fel ca -k"
+
+#~ msgid " monitor same as -m"
+#~ msgstr " monitor sla fel ca -m"
+
+#~ msgid " noclobber same as -C"
+#~ msgstr " noclobber la fel ca -C"
+
+#~ msgid " noexec same as -n"
+#~ msgstr " noexec la fel ca -n"
+
+#~ msgid " noglob same as -f"
+#~ msgstr " noglob la fel ca -f"
+
+#~ msgid " notify save as -b"
+#~ msgstr " notify la fel ca -b"
+
+#~ msgid " nounset same as -u"
+#~ msgstr " nounset la fel ca -u"
+
+#~ msgid " onecmd same as -t"
+#~ msgstr " onecmd la fel ca -t"
+
+#~ msgid " physical same as -P"
+#~ msgstr " physical la fel ca -P"
+
+#~ msgid ""
+#~ " posix change the behavior of bash where the default"
+#~ msgstr ""
+#~ " posix schimbã comportamentul bash în care implicit"
+
+#~ msgid ""
+#~ " operation differs from the 1003.2 standard to"
+#~ msgstr ""
+#~ " operaþiile diferã de standardul 1003.2 pentru"
+
+#~ msgid " match the standard"
+#~ msgstr " a se potrivi standardului"
+
+#~ msgid " privileged same as -p"
+#~ msgstr " privileged la fel ca -p"
+
+#~ msgid " verbose same as -v"
+#~ msgstr " verbose la fel ca -v"
+
+#~ msgid " vi use a vi-style line editing interface"
+#~ msgstr ""
+#~ " vi foloseºte o interfaþã de editare de linii stil vi"
+
+#~ msgid " xtrace same as -x"
+#~ msgstr " xtrace la fel ca -x"
+
+#~ msgid ""
+#~ " -p Turned on whenever the real and effective user ids do not match."
+#~ msgstr ""
+#~ " -p Activat de fiecare datã când id-urile de user real ºi efectiv nu "
+#~ "se potrivesc."
+
+#~ msgid " Disables processing of the $ENV file and importing of shell"
+#~ msgstr " Inhibã procesarea fiºierului $ENV ºi importarea funcþiilor"
+
+#~ msgid ""
+#~ " functions. Turning this option off causes the effective uid and"
+#~ msgstr ""
+#~ " shell-ului. Dezactivarea acestei opþiuni face ca uid-ul ºi gid-ul"
+
+#~ msgid " gid to be set to the real uid and gid."
+#~ msgstr " efectiv sã fie setate drept uid-ul ºi gid-ul real."
+
+#~ msgid " -t Exit after reading and executing one command."
+#~ msgstr " -t Iese dupã citirea ºi executarea unei comenzi."
+
+#~ msgid " -u Treat unset variables as an error when substituting."
+#~ msgstr " -u Trateazã variabilele nesetate drept erori în substituþie."
+
+#~ msgid " -v Print shell input lines as they are read."
+#~ msgstr ""
+#~ " -v Tipãreºte liniile de intrare(input) ale shell-ului pe mãsurã ce "
+#~ "sunt citite."
+
+#~ msgid " -x Print commands and their arguments as they are executed."
+#~ msgstr ""
+#~ " -x Tipãreºte comenzile ºi parametrii acestora pe mãsura executãrii."
+
+#~ msgid " -B the shell will perform brace expansion"
+#~ msgstr " -B shell-ul va executa expansiune de legãturi(brace)"
+
+#~ msgid " -H Enable ! style history substitution. This flag is on"
+#~ msgstr ""
+#~ " -H Activeazã substituþia istoricului stil ! . Acest marcaj(flag) "
+#~ "este activat"
+
+#~ msgid " by default."
+#~ msgstr " în mod implicit."
+
+#~ msgid " -C If set, disallow existing regular files to be overwritten"
+#~ msgstr ""
+#~ " -C Dacã este setat, nu va permite suprascrierea fiºierelor existente"
+
+#~ msgid " by redirection of output."
+#~ msgstr " prin redirectarea output-ului."
+
+#~ msgid " -P If set, do not follow symbolic links when executing commands"
+#~ msgstr ""
+#~ " -P Dacã este setat, nu va urma legãturile simbolice în executarea "
+#~ "comenzilor"
+
+#~ msgid " such as cd which change the current directory."
+#~ msgstr " precum cd care schimbã directorul curent."
+
+#~ msgid "Using + rather than - causes these flags to be turned off. The"
+#~ msgstr ""
+#~ "Folosind + în locul lui - provoacã dezactivarea acestor marcaje(flags)."
+
+#~ msgid "flags can also be used upon invocation of the shell. The current"
+#~ msgstr ""
+#~ " Marcajele pot fi folosite de asemenea pentru invocarea shell-ului. "
+#~ "Setul"
+
+#~ msgid ""
+#~ "set of flags may be found in $-. The remaining n ARGs are positional"
+#~ msgstr ""
+#~ "curent de marcaje(flags) poate fi gãsit în $-. ARGumentele n rãmase sunt"
+
+#~ msgid "parameters and are assigned, in order, to $1, $2, .. $n. If no"
+#~ msgstr ""
+#~ "parametri poziþionali ºi sunt atribuiþi, în ordine, lui $1, $2, .. $n. "
+#~ "Dacã nu"
+
+#~ msgid "ARGs are given, all shell variables are printed."
+#~ msgstr ""
+#~ "este dat nici un ARGument, sunt tipãrite toate variabilele shell-ului."
+
+#~ msgid "For each NAME, remove the corresponding variable or function. Given"
+#~ msgstr ""
+#~ "Pentru fiecare NUME, ºterge variabila sau funcþia corespunzãtoare. Dacã "
+#~ "se"
+
+#~ msgid "the `-v', unset will only act on variables. Given the `-f' flag,"
+#~ msgstr ""
+#~ "dã `-v', desetarea(unset) va acþiona numai pe variabile. Dacã se dã `-f',"
+
+#~ msgid "unset will only act on functions. With neither flag, unset first"
+#~ msgstr ""
+#~ "desetarea(unset) va acþiona numai pe funcþii. Fãrã nici un marcaj(flag), "
+
+#~ msgid "tries to unset a variable, and if that fails, then tries to unset a"
+#~ msgstr ""
+#~ "desetarea(unset) va încerca întâi pe variabile, ºi dacã eºueazãm va "
+#~ "încerca"
+
+#~ msgid ""
+#~ "function. Some variables (such as PATH and IFS) cannot be unset; also"
+#~ msgstr ""
+#~ "pe o funcþie. Anumite variabile ( precum PATH ºi IFS) nu pot fi desetate"
+#~ "(unset);"
+
+#~ msgid "see readonly."
+#~ msgstr "de asemenea, vedeþi readonly."
+
+#~ msgid "NAMEs are marked for automatic export to the environment of"
+#~ msgstr "NUMEle sunt marcate pentru exportul automat cãtre mediul"
+
+#~ msgid "subsequently executed commands. If the -f option is given,"
+#~ msgstr "comenzilor executate ulterior. Dacã este datã opþiunea -f,"
+
+#~ msgid "the NAMEs refer to functions. If no NAMEs are given, or if `-p'"
+#~ msgstr ""
+#~ "NUMEle se referã la funcþii. Dacã nu este dat nici un NUME, sau este dat "
+#~ "`-p'`,"
+
+#~ msgid "is given, a list of all names that are exported in this shell is"
+#~ msgstr ""
+#~ "va fi tipãritã o listã a tuturor numelor care sunt exportate în acest"
+
+#~ msgid "printed. An argument of `-n' says to remove the export property"
+#~ msgstr "shell. Parametrul `-n' va elimina proprietatea de export "
+
+#~ msgid "from subsequent NAMEs. An argument of `--' disables further option"
+#~ msgstr ""
+#~ "din NUMEle ulterioare. Parametrul `--' dezactiveazã procesarea opþiunilor"
+
+#~ msgid "processing."
+#~ msgstr "viitoare."
+
+#~ msgid ""
+#~ "The given NAMEs are marked readonly and the values of these NAMEs may"
+#~ msgstr "NUMEle date sunt marcate readonly ºi valorile acestor NUME nu poate"
+
+#~ msgid "not be changed by subsequent assignment. If the -f option is given,"
+#~ msgstr "fi schimbat de atribuiri ulterioare. Dacã este datã opþiunea -f,"
+
+#~ msgid "then functions corresponding to the NAMEs are so marked. If no"
+#~ msgstr "atunci funcþiile corespunzãtoare NUMElor sunt marcate. Dacã nu"
+
+#~ msgid ""
+#~ "arguments are given, or if `-p' is given, a list of all readonly names"
+#~ msgstr ""
+#~ "sunt furnizaþidaþ paramet, sau este dat parametrul `-p'` o listã de nume "
+#~ "readonlyri "
+
+#~ msgid ""
+#~ "is printed. An argument of `-n' says to remove the readonly property"
+#~ msgstr ""
+#~ "va fi tipãritã. Parametrul `-n' va elimina proprietatea de readonly"
+
+#~ msgid "from subsequent NAMEs. The `-a' option means to treat each NAME as"
+#~ msgstr ""
+#~ "pentru NUMEle ulterioare. Opþiunea `-a' reprezintã tratarea fiecãrui "
+#~ "NUME ca"
+
+#~ msgid "an array variable. An argument of `--' disables further option"
+#~ msgstr "o variabilã interval. Parametrul `--' dezactiveazã alte opþiuni"
+
+#~ msgid ""
+#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is"
+#~ msgstr ""
+#~ "Parametrii poziþionali de la $N+1 ... sunt redenumiþi în $1 ... Dacã N "
+#~ "nu este"
+
+#~ msgid "not given, it is assumed to be 1."
+#~ msgstr "furnizat, se presupune cã e 1."
+
+#~ msgid "Read and execute commands from FILENAME and return. The pathnames"
+#~ msgstr "Citeºte ºi executã comenzi din NUME_FIªIER ºi returnare. Cãile"
+
+#~ msgid "in $PATH are used to find the directory containing FILENAME."
+#~ msgstr ""
+#~ "din $PATH sunt folosite pentru a gãsi directorul care conþine NUME_FIªIER."
+
+#~ msgid "Suspend the execution of this shell until it receives a SIGCONT"
+#~ msgstr ""
+#~ "Suspendã execuþia acestui shell pânã se va primi un semnal de SIGCONT."
+
+#~ msgid "signal. The `-f' if specified says not to complain about this"
+#~ msgstr " Dacã este specificat `-f' va elimina avertismentele despre acest "
+
+#~ msgid "being a login shell if it is; just suspend anyway."
+#~ msgstr "login shell; va suspenda oricum."
+
+#~ msgid "Exits with a status of 0 (trueness) or 1 (falseness) depending on"
+#~ msgstr "Iese cu o stare de 0 (adevãr) sau 1 (falsitate) depinzând de"
+
+#~ msgid "the evaluation of EXPR. Expressions may be unary or binary. Unary"
+#~ msgstr "evaluarea EXPR. Expresiile pot fi unare sau binare. Expresiile"
+
+#~ msgid "expressions are often used to examine the status of a file. There"
+#~ msgstr ""
+#~ "unare sunt des folosite pentru a examina starea unui fiºier. Mai existã"
+
+#~ msgid "are string operators as well, and numeric comparison operators."
+#~ msgstr "operatori de ºir de asemenea, ºi operator de comparare numericã."
+
+#~ msgid "File operators:"
+#~ msgstr "Operatori de fiºier:"
+
+#~ msgid " -b FILE True if file is block special."
+#~ msgstr " -b FIªIER Adevãrat dacã fiºierul este bloc special."
+
+#~ msgid " -c FILE True if file is character special."
+#~ msgstr " -c FIªIER Adevãrat dacã fiºierul este caracter special."
+
+#~ msgid " -d FILE True if file is a directory."
+#~ msgstr " -b FIªIER Adevãrat dacã fiºierul este director."
+
+#~ msgid " -e FILE True if file exists."
+#~ msgstr " -e FIªIER Adevãrat dacã fiºierul existã."
+
+#~ msgid " -f FILE True if file exists and is a regular file."
+#~ msgstr ""
+#~ " -b FIªIER Adevãrat dacã fiºierul existã ºi este fiºier "
+#~ "obiºnuit (regular)."
+
+#~ msgid " -g FILE True if file is set-group-id."
+#~ msgstr ""
+#~ " -g FIªIER Adevãrat dacã fiºierul are setat id-ul de grup."
+
+#~ msgid " -h FILE True if file is a symbolic link. Use \"-L\"."
+#~ msgstr ""
+#~ " -h FIªIER Adevãrat dacã fiºierul este legãturã simbolicã. "
+#~ "Folosiþi \"-L\"."
+
+#~ msgid " -L FILE True if file is a symbolic link."
+#~ msgstr ""
+#~ " -L FIªIER Adevãrat dacã fiºierul este legãturã simbolicã."
+
+#~ msgid " -k FILE True if file has its \"sticky\" bit set."
+#~ msgstr ""
+#~ " -k FIªIER Adevãrat dacã fiºierul are setat \"sticky\" bit."
+
+#~ msgid " -p FILE True if file is a named pipe."
+#~ msgstr ""
+#~ " -p FIªIER Adevãrat dacã fiºierul este o legãturã(pipe) numitã."
+
+#~ msgid " -r FILE True if file is readable by you."
+#~ msgstr " -r FIªIER Adevãrat dacã fiºierul poate fi citit de tine."
+
+#~ msgid " -s FILE True if file exists and is not empty."
+#~ msgstr " -s FIªIER Adevãrat dacã fiºierul existã ºi nu este vid."
+
+#~ msgid " -S FILE True if file is a socket."
+#~ msgstr " -S FIªIER Adevãrat dacã fiºierul este un socket."
+
+#~ msgid " -t FD True if FD is opened on a terminal."
+#~ msgstr " -t FD Adevãrat dacã FD este deschis într-un terminal."
+
+#~ msgid " -u FILE True if the file is set-user-id."
+#~ msgstr " -u FIªIER Adevãrat dacã fiºierul are setat user id-ul."
+
+#~ msgid " -w FILE True if the file is writable by you."
+#~ msgstr " -w FIªIER Adevãrat dacã fiºierul poate fi scris de tine."
+
+#~ msgid " -x FILE True if the file is executable by you."
+#~ msgstr ""
+#~ " -x FIªIER Adevãrat dacã fiºierul poate fi executat de cãtre "
+#~ "tine."
+
+#~ msgid " -O FILE True if the file is effectively owned by you."
+#~ msgstr ""
+#~ " -O FIªIER Adevãrat dacã fiºierul este efectiv propriu(owned) "
+#~ "þie."
+
+#~ msgid ""
+#~ " -G FILE True if the file is effectively owned by your group."
+#~ msgstr ""
+#~ " -O FIªIER Adevãrat dacã fiºierul este efectiv propriu(owned) "
+#~ "grupului tãu."
+
+#~ msgid " FILE1 -nt FILE2 True if file1 is newer than (according to"
+#~ msgstr ""
+#~ " FIªIER1 -nt FIªIER2 Adevãrat dacã fiºier1 este mai nou decât (potrivit "
+
+#~ msgid " modification date) file2."
+#~ msgstr " datei modificãrii) fiºier2."
+
+#~ msgid " FILE1 -ot FILE2 True if file1 is older than file2."
+#~ msgstr ""
+#~ " FIªIER1 -ot FIªIER2 Adevãrat dacã fiºier1 este mai vechi decât fiºier2."
+
+#~ msgid " FILE1 -ef FILE2 True if file1 is a hard link to file2."
+#~ msgstr ""
+#~ " FIªIER1 -ef FIªIER2 Adevãrat dacã fiºier1 este hard link cãtre fiºier2."
+
+#~ msgid "String operators:"
+#~ msgstr "Operatori de ºiruri:"
+
+#~ msgid " -z STRING True if string is empty."
+#~ msgstr " -z ªIR Adevãrat dacã ºirul este vid."
+
+#~ msgid " -n STRING"
+#~ msgstr " -n ªIR"
+
+#~ msgid " STRING True if string is not empty."
+#~ msgstr " ªIR Adevãrat dacã ºirul nu este vid."
+
+#~ msgid " STRING1 = STRING2"
+#~ msgstr " ªIR1 = ªIR2"
+
+#~ msgid " True if the strings are equal."
+#~ msgstr " Adevãrat dacã ºirurile sunt egale."
+
+#~ msgid " STRING1 != STRING2"
+#~ msgstr " ªIR1 != ªIR2"
+
+#~ msgid " True if the strings are not equal."
+#~ msgstr " Adevãrat dacã ºirurile nu sunt egale."
+
+#~ msgid " STRING1 < STRING2"
+#~ msgstr " ªIR1 < ªIR2"
+
+#~ msgid ""
+#~ " True if STRING1 sorts before STRING2 lexicographically"
+#~ msgstr ""
+#~ " Adevãrat dacã ªIR1 se ordoneazã lexical înaintea lui "
+#~ "ªIR2"
+
+#~ msgid " STRING1 > STRING2"
+#~ msgstr " ªIR1 > ªIR2"
+
+#~ msgid ""
+#~ " True if STRING1 sorts after STRING2 lexicographically"
+#~ msgstr ""
+#~ " Adevãrat dacã ªIR1 se ordoneazã lexical dupã ªIR2"
+
+#~ msgid "Other operators:"
+#~ msgstr "Alþi operatori:"
+
+#~ msgid " ! EXPR True if expr is false."
+#~ msgstr " ! EXPR Adevãrat dacã expr e falsã."
+
+#~ msgid " EXPR1 -a EXPR2 True if both expr1 AND expr2 are true."
+#~ msgstr " EXPR1 -a EXPR2 Adevãrat dacã ºi expr1 ªI expr2 sunt adevãrate."
+
+#~ msgid " EXPR1 -o EXPR2 True if either expr1 OR expr2 is true."
+#~ msgstr ""
+#~ " EXPR1 -a EXPR2 Adevãrat dacã una din expr1 sau expr2 e adevãratã."
+
+#~ msgid " arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,"
+#~ msgstr " arg1 OP arg2 Teste aritmetice. OP este unul din -eq, -ne,"
+
+#~ msgid " -lt, -le, -gt, or -ge."
+#~ msgstr " -lt, -le, -gt, or -ge."
+
+#~ msgid "Arithmetic binary operators return true if ARG1 is equal, not-equal,"
+#~ msgstr "Operatorii aritmetici binari returneazã adevãrat(true) dacã ARG1 "
+
+#~ msgid ""
+#~ "less-than, less-than-or-equal, greater-than, or greater-than-or-equal"
+#~ msgstr ""
+#~ "este egal cu, nu este egal cu,mai mic, mai mic sau egal, mai mare, mai "
+#~ "mare sau egal"
+
+#~ msgid "than ARG2."
+#~ msgstr "decât ARG2."
+
+#~ msgid "This is a synonym for the \"test\" builtin, but the last"
+#~ msgstr "Acesta este un sinonim pentru comanda internã \"test\", dar ultimul"
+
+#~ msgid "argument must be a literal `]', to match the opening `['."
+#~ msgstr "argument trebuie sã fie un `]' literal, pentru a închide un `['."
+
+#~ msgid "Print the accumulated user and system times for processes run from"
+#~ msgstr ""
+#~ "Afiºeazã timpurile acumulate de user ºi sistem pentru procesele rulate din"
+
+#~ msgid "the shell."
+#~ msgstr "shell."
+
+#~ msgid "The command ARG is to be read and executed when the shell receives"
+#~ msgstr ""
+#~ "ARGumentele comenzii vor fi citite ºi executate când shell-ul primeºte"
+
+#~ msgid "signal(s) SIGNAL_SPEC. If ARG is absent all specified signals are"
+#~ msgstr ""
+#~ "semnal(e). SIGNAL_SPEC. Dacã ARGumentul este absent toate semnalele"
+
+#~ msgid "reset to their original values. If ARG is the null string each"
+#~ msgstr ""
+#~ "specifice sunt resetate la valorile lor originale. Dacã ARGumentul este "
+#~ "un ºir vid"
+
+#~ msgid "SIGNAL_SPEC is ignored by the shell and by the commands it invokes."
+#~ msgstr ""
+#~ "fiecare SIGNAL_SPEC este ignorat de shell ºi de comanda invocatã de "
+#~ "acesta."
+
+#~ msgid "If SIGNAL_SPEC is EXIT (0) the command ARG is executed on exit from"
+#~ msgstr ""
+#~ "Dacã SIGNAL_SPEC este EXIT (0) ARGumentele comenzii sunt executate la "
+
+#~ msgid "the shell. If SIGNAL_SPEC is DEBUG, ARG is executed after every"
+#~ msgstr ""
+#~ "ieºirea din shell. Dacã SIGNAL_SPEC este DEBUG, ARGument este executat"
+
+#~ msgid "command. If ARG is `-p' then the trap commands associated with"
+#~ msgstr ""
+#~ "dupã fiecare comandã. Dacã ARGument este `-' atunci vor fi afiºate "
+#~ "comenzile"
+
+#~ msgid "each SIGNAL_SPEC are displayed. If no arguments are supplied or if"
+#~ msgstr "trap asociate cu fiecare SIGNAL_SPEC. Dacã nu sunt furnizaþi "
+
+#~ msgid "only `-p' is given, trap prints the list of commands associated with"
+#~ msgstr ""
+#~ "parametri sau este dat doar `-p', trap afiºeazã lista de comenzi asociate "
+#~ "cu "
+
+#~ msgid ""
+#~ "each signal number. SIGNAL_SPEC is either a signal name in <signal.h>"
+#~ msgstr ""
+#~ "fiecare numãr de semnal. SIGNAL_SPEC este ori un nume de semnal din "
+#~ "<signal.h>"
+
+#~ msgid ""
+#~ "or a signal number. `trap -l' prints a list of signal names and their"
+#~ msgstr ""
+#~ "sau un numãr de semnal. `trap -l' tipãreºte o listã de numere de semnale "
+#~ "ºi "
+
+#~ msgid "corresponding numbers. Note that a signal can be sent to the shell"
+#~ msgstr ""
+#~ "numerele corespunzãtoare. Notaþi cã un semnal poate fi trimis shell-ului"
+
+#~ msgid "with \"kill -signal $$\"."
+#~ msgstr "cu \"kill -signal $$\"."
+
+#~ msgid "For each NAME, indicate how it would be interpreted if used as a"
+#~ msgstr ""
+#~ "Pentru fiecare NUME, indicã în ce mod va fi interpretat dacã este "
+#~ "utilizat ca"
+
+#~ msgid "If the -t option is used, returns a single word which is one of"
+#~ msgstr ""
+#~ "Dacã este folositã opþiunea -t, returneazã un singur cuvânt care este "
+#~ "unul din"
+
+#~ msgid ""
+#~ "`alias', `keyword', `function', `builtin', `file' or `', if NAME is an"
+#~ msgstr ""
+#~ "`alias', `keyword', `function', `builtin', `file' or `', dacã NUME este un"
+
+#~ msgid ""
+#~ "alias, shell reserved word, shell function, shell builtin, disk file,"
+#~ msgstr ""
+#~ "alias, cuvânt rezervat de shell, funcþie de shell, comandã internã, "
+#~ "fiºier de pe disk,"
+
+#~ msgid "or unfound, respectively."
+#~ msgstr "sau negãsit, respectiv."
+
+#~ msgid "If the -p flag is used, either returns the name of the disk file"
+#~ msgstr ""
+#~ "Dacã este utilizat marcajul(flag) -p se returneazã fie numele fiºierului "
+#~ "de disk"
+
+#~ msgid "that would be executed, or nothing if -t would not return `file'."
+#~ msgstr ""
+#~ "care urmeazã sã fie executat, sau nimic dacã -t nu va returna `fiºier'."
+
+#~ msgid "If the -a flag is used, displays all of the places that contain an"
+#~ msgstr "Dacã este folosit -a, se vor afiºa toate locurile care conþin"
+
+#~ msgid ""
+#~ "executable named `file'. This includes aliases and functions, if and"
+#~ msgstr ""
+#~ "un executabil numit `fiºier'. Aceasta include aliasuri ºi funcþii, ºi "
+#~ "numai"
+
+#~ msgid "only if the -p flag is not also used."
+#~ msgstr "marcajul(flag) -p nu este folosit de asemenea."
+
+#~ msgid "Type accepts -all, -path, and -type in place of -a, -p, and -t,"
+#~ msgstr "Type acceptã -all, -path ºi -type în loc de -a, -p ºi -t,"
+
+#~ msgid "respectively."
+#~ msgstr "respectiv"
+
+#~ msgid "Ulimit provides control over the resources available to processes"
+#~ msgstr "Ulimit oferã control al resurselor disponibile pentru procesele"
+
+#~ msgid "started by the shell, on systems that allow such control. If an"
+#~ msgstr ""
+#~ "rulate de shell, în sisteme care permit acest tip de control. Dacã este"
+
+#~ msgid "option is given, it is interpreted as follows:"
+#~ msgstr "datã o opþiune, este interpretatã precum urmeazã:"
+
+#~ msgid " -S\tuse the `soft' resource limit"
+#~ msgstr " -S\tfoloseºte limita `soft' a resursei"
+
+#~ msgid " -H\tuse the `hard' resource limit"
+#~ msgstr " -H\tfoloseºte limita `hard' a resursei"
+
+#~ msgid " -a\tall current limits are reported"
+#~ msgstr " -a\tsunt raportate toate limitele curente"
+
+#~ msgid " -c\tthe maximum size of core files created"
+#~ msgstr " -c\tmãrimea maximã de fiºiere core creatã"
+
+#~ msgid " -d\tthe maximum size of a process's data segment"
+#~ msgstr " -d\ttmãrimea maximã a unui segment de date al procesului"
+
+#~ msgid " -m\tthe maximum resident set size"
+#~ msgstr " -m\tmãrimea maximã de rezidenþã"
+
+#~ msgid " -s\tthe maximum stack size"
+#~ msgstr " -s\tmãrimea maximã a stivei(stack)"
+
+#~ msgid " -t\tthe maximum amount of cpu time in seconds"
+#~ msgstr " -t\tsuma maximã a timpului cpu în secunde"
+
+#~ msgid " -f\tthe maximum size of files created by the shell"
+#~ msgstr " -f\ttmãrimea maximã a fiºierelor create de shell"
+
+#~ msgid " -p\tthe pipe buffer size"
+#~ msgstr " -p\tmãrimea tamponului de legãturã (pipe buffer)"
+
+#~ msgid " -n\tthe maximum number of open file descriptors"
+#~ msgstr " -n\tnumãrul maxim de fiºiere deschise"
+
+#~ msgid " -u\tthe maximum number of user processes"
+#~ msgstr " -u\tnumãrul maxim de procese utilizator"
+
+#~ msgid " -v\tthe size of virtual memory"
+#~ msgstr " -v\tmãrimea memoriei virtuale"
+
+#~ msgid "If LIMIT is given, it is the new value of the specified resource."
+#~ msgstr "Dacã este datã LIMITÃ, va fi noua valoare a resursei specificate."
+
+#~ msgid "Otherwise, the current value of the specified resource is printed."
+#~ msgstr ""
+#~ "În caz contrar, este tipãritã valoarea curentã a resursei specificate."
+
+#~ msgid "If no option is given, then -f is assumed. Values are in 1k"
+#~ msgstr ""
+#~ "Dacã nu este datã nici o opþiune se presupune -f. Valorile sunt exprimate"
+
+#~ msgid "increments, except for -t, which is in seconds, -p, which is in"
+#~ msgstr ""
+#~ "în incrementãri de 1k, exceptând -t, care este în secunde, -p, care este "
+#~ "în"
+
+#~ msgid "increments of 512 bytes, and -u, which is an unscaled number of"
+#~ msgstr "incrementãri de 512 octeþi, ºi -u, care este un numãr nescalat de"
+
+#~ msgid "processes."
+#~ msgstr "procese."
+
+#~ msgid ""
+#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if"
+#~ msgstr ""
+#~ "Masca de crearecreation mask) a fiºierului utilizatorului e setatã la "
+#~ "MOD. Dacã"
+
+#~ msgid ""
+#~ "`-S' is supplied, the current value of the mask is printed. The `-S'"
+#~ msgstr ""
+#~ "MOD este omis sau este dat `-S', este tipãritã valoarea curentã a "
+#~ "mãºtii. Opþiunea"
+
+#~ msgid ""
+#~ "option makes the output symbolic; otherwise an octal number is output."
+#~ msgstr ""
+#~ "`-S' returneazã output simbolic; în caz contrar outputul este un numãr "
+#~ "octal."
+
+#~ msgid "If MODE begins with a digit, it is interpreted as an octal number,"
+#~ msgstr "Dacã MOD începe cu un digit, este interpretat ca numãr octal,"
+
+#~ msgid ""
+#~ "otherwise it is a symbolic mode string like that accepted by chmod(1)."
+#~ msgstr "în caz contrar este un ºir mod simbolic premis de chmod(1)."
+
+#~ msgid ""
+#~ "Wait for the specified process and report its termination status. If"
+#~ msgstr ""
+#~ "Aºteaptã dupã procesul specificat ºi raporteazã starea de terminare. Dacã"
+
+#~ msgid "N is not given, all currently active child processes are waited for,"
+#~ msgstr ""
+#~ "N nu este dat,se aºteaptã dupã toate procesele copil(child) curente,"
+
+#~ msgid "and the return code is zero. N may be a process ID or a job"
+#~ msgstr ""
+#~ "ºi codul returnat este zero. N poate fi un ID de proces sau o "
+#~ "specificaþie"
+
+#~ msgid "specification; if a job spec is given, all processes in the job's"
+#~ msgstr "de job; Dacã este datã o specificaþie de job,se aºteaptã dupã"
+
+#~ msgid "pipeline are waited for."
+#~ msgstr " toate procesele din legãturã(pipeline)."
+
+#~ msgid "and the return code is zero. N is a process ID; if it is not given,"
+#~ msgstr ""
+#~ "ºi codul returnat este zero. N este un ID de proces; dacã nu este dat,"
+
+#~ msgid "all child processes of the shell are waited for."
+#~ msgstr "se va aºtepta dupã doate procesele copil(child) din shell."
+
+#~ msgid "The `for' loop executes a sequence of commands for each member in a"
+#~ msgstr ""
+#~ "Ciclul `for' executã o secvenþã de comenzi pentru fiecare membru dintr-o"
+
+#~ msgid ""
+#~ "list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is"
+#~ msgstr ""
+#~ "listã de elemente. Dacã `in CUVINTE...;' nu este prezent, atunci `in \"$@"
+#~ "\"'"
+
+#~ msgid ""
+#~ "assumed. For each element in WORDS, NAME is set to that element, and"
+#~ msgstr ""
+#~ "este presupus. Pentru fiecare element din CUVINTE, NUME este setat ca "
+#~ "acel"
+
+#~ msgid "the COMMANDS are executed."
+#~ msgstr "element ºi COMENZI sunt executate."
+
+#~ msgid "The WORDS are expanded, generating a list of words. The"
+#~ msgstr "CUVINTEle sunt expandate, generând o listã de cuvinte. Setul de"
+
+#~ msgid "set of expanded words is printed on the standard error, each"
+#~ msgstr ""
+#~ "de cuvinte expandate este tipãrit la dispozitivul de eroare standard, "
+#~ "fiecare"
+
+#~ msgid "preceded by a number. If `in WORDS' is not present, `in \"$@\"'"
+#~ msgstr ""
+#~ "fiind precedat de un numãr. Dacã `in CUVINTE' nu este prezent, `in \"$@"
+#~ "\"'"
+
+#~ msgid "is assumed. The PS3 prompt is then displayed and a line read"
+#~ msgstr ""
+#~ "este presupus. Promptul PS3 este apoi afiºat ºi o linie va fi cititã de"
+
+#~ msgid "from the standard input. If the line consists of the number"
+#~ msgstr ""
+#~ "la intrare(input) standard. Dacã linia e alcãtuitã dintr-unul din "
+#~ "numerele"
+
+#~ msgid "corresponding to one of the displayed words, then NAME is set"
+#~ msgstr "corespunzãtoare unuia din cuvintele afiºate, atunci NUME este setat"
+
+#~ msgid "to that word. If the line is empty, WORDS and the prompt are"
+#~ msgstr ""
+#~ "drept cuvântul respectiv. Dacã linia este vidã, CUVINTEle ºi promptul "
+#~ "sunt"
+
+#~ msgid "redisplayed. If EOF is read, the command completes. Any other"
+#~ msgstr ""
+#~ "reafiºate. Dacã se citeºte EOF, comanda ajunge la sfârºit. Orice altã"
+
+#~ msgid "value read causes NAME to be set to null. The line read is saved"
+#~ msgstr ""
+#~ "valoare cititã va face ca NUMEle setat sã fie setat null. Linia cititã "
+#~ "este salvatã"
+
+#~ msgid "in the variable REPLY. COMMANDS are executed after each selection"
+#~ msgstr ""
+#~ "în variabila RÃSPUNS. COMENZIle sunt executate dupã fiecare selecþie"
+
+#~ msgid "until a break or return command is executed."
+#~ msgstr "pânã când se executã o comandã break sau return."
+
+#~ msgid "Selectively execute COMMANDS based upon WORD matching PATTERN. The"
+#~ msgstr ""
+#~ "Executã selectiv COMENZI bazându-se pe potrivirea CUVÂNTului în TIPAR."
+
+#~ msgid "`|' is used to separate multiple patterns."
+#~ msgstr " `|' este folosit pentru a separa mai multe tipare."
+
+#~ msgid ""
+#~ "The if COMMANDS are executed. If the exit status is zero, then the then"
+#~ msgstr ""
+#~ "COMENZIle if sunt executate. Dacã starea de ieºire este zero, atunc"
+
+#~ msgid ""
+#~ "COMMANDS are executed. Otherwise, each of the elif COMMANDS are executed"
+#~ msgstr ""
+#~ "COMENZIle then sunt executate. În caz contrar, fiecare din COMENZIle "
+#~ "elif sunt executate"
+
+#~ msgid ""
+#~ "in turn, and if the exit status is zero, the corresponding then COMMANDS"
+#~ msgstr ""
+#~ "pe rând, ºi dacã starea de ieºire este zero, atunci COMENZIle then "
+#~ "corespunzãtoare"
+
+#~ msgid ""
+#~ "are executed and the if command completes. Otherwise, the else COMMANDS"
+#~ msgstr ""
+#~ "sunt executate ºi comanda if se terminã. În caz contrar, COMENZIle else"
+
+#~ msgid ""
+#~ "are executed, if present. The exit status is the exit status of the last"
+#~ msgstr ""
+#~ "sunt executate, în cazul în care sunt prezente. Starea de ieºire este "
+#~ "starea de ieºire"
+
+#~ msgid "command executed, or zero if no condition tested true."
+#~ msgstr ""
+#~ "a ultimei comenzi executate, sau zero dacã nici o condiþie nu s-a dovedit "
+#~ "adevãratã."
+
+#~ msgid "Expand and execute COMMANDS as long as the final command in the"
+#~ msgstr "Expandeazã ºi executã COMENZI atâta timp cât comanda finalã din"
+
+#~ msgid "`while' COMMANDS has an exit status of zero."
+#~ msgstr "COMENZIle `while' au o stare de ieºire de zero."
+
+#~ msgid "`until' COMMANDS has an exit status which is not zero."
+#~ msgstr "COMENZIle `until' au o stare de ieºire diferitã de zero."
+
+#~ msgid "Create a simple command invoked by NAME which runs COMMANDS."
+#~ msgstr "Creazã o comandã simplã invocatã de NUME care ruleazã COMENZI."
+
+#~ msgid "Arguments on the command line along with NAME are passed to the"
+#~ msgstr "Parametrii din linia de comandã împreunã cu NUMEle sunt pasaþi"
+
+#~ msgid "function as $0 .. $n."
+#~ msgstr "funcþiei drept $0 .. $n."
+
+#~ msgid "Run a set of commands in a group. This is one way to redirect an"
+#~ msgstr ""
+#~ "Ruleazã un set de comenzi dintr-un grup. Aceasta este o cale de a "
+#~ "redirecta un"
+
+#~ msgid "entire set of commands."
+#~ msgstr "întreg set de comenzi."
+
+#~ msgid "This is similar to the `fg' command. Resume a stopped or background"
+#~ msgstr ""
+#~ "Aceasta este similarã comenzii `fg'. Continuã(resume) un job stopat sau "
+#~ "din"
+
+#~ msgid "job. If you specifiy DIGITS, then that job is used. If you specify"
+#~ msgstr ""
+#~ "fundal(background). Dacã se specificã DIGIÞI, atunci este folosit acel "
+#~ "job. Dacã"
+
+#~ msgid ""
+#~ "WORD, then the job whose name begins with WORD is used. Following the"
+#~ msgstr ""
+#~ "se specificã CUVÂNT, atunci e folosit jobul al cãrui nume începe cu "
+#~ "CUVÂNT."
+
+#~ msgid "job specification with a `&' places the job in the background."
+#~ msgstr ""
+#~ "Specificând jobului un `&' dupã, va plasa jobul în fundal(background)."
+
+#~ msgid "BASH_VERSION The version numbers of this Bash."
+#~ msgstr "BASH_VERSION Numãrul de versiune a acestui Bash."
+
+#~ msgid "CDPATH A colon separated list of directories to search"
+#~ msgstr ""
+#~ "CDPATH O listã de directoare separatã prin douã-puncte pentru a "
+#~ "se"
+
+#~ msgid "\t\twhen the argument to `cd' is not found in the current"
+#~ msgstr ""
+#~ "\t\tcãuta atunci când parametrii specificaþi comenzii `cd' nu sunt gãsiþi "
+#~ "în"
+
+#~ msgid "\t\tdirectory."
+#~ msgstr "\t\tdirectorul curent."
+
+#~ msgid ""
+#~ "HISTFILE The name of the file where your command history is stored."
+#~ msgstr ""
+#~ "HISTFILE Numele fiºierului unde istoricul comenzilor voastre este "
+#~ "stocat."
+
+#~ msgid "HISTFILESIZE The maximum number of lines this file can contain."
+#~ msgstr ""
+#~ "HISTFILESIZE Numãrul maxim de linii pe care acest fiºier poate sã le "
+#~ "conþinã."
+
+#~ msgid "HISTSIZE The maximum number of history lines that a running"
+#~ msgstr ""
+#~ "HISTSIZE Numãrul maxim de linii de istoric care pot fi accesate"
+
+#~ msgid "\t\tshell can access."
+#~ msgstr "\t\tde un shell activ."
+
+#~ msgid "HOME The complete pathname to your login directory."
+#~ msgstr "HOME Calea completã cãtre directorul vostru de login."
+
+#~ msgid ""
+#~ "HOSTTYPE The type of CPU this version of Bash is running under."
+#~ msgstr ""
+#~ "HOSTTYPE Tipul de CPU pe care ruleazã aceastã versiune de Bash."
+
+#~ msgid ""
+#~ "IGNOREEOF Controls the action of the shell on receipt of an EOF"
+#~ msgstr ""
+#~ "IGNOREEOF Controleazã acþiunea shell-ului la întâlnirea unui "
+#~ "caracter"
+
+#~ msgid "\t\tcharacter as the sole input. If set, then the value"
+#~ msgstr ""
+#~ "\t\tEOF ca singurã intrare(input). Dacã este setat, atunci valoarea"
+
+#~ msgid "\t\tof it is the number of EOF characters that can be seen"
+#~ msgstr "\t\tacestuia este numãrul de caractere EOF care pot fi întâlnite"
+
+#~ msgid "\t\tin a row on an empty line before the shell will exit"
+#~ msgstr "\t\tpe rând într-o linie vidã înainte de ieºirea shell-ului."
+
+#~ msgid "\t\t(default 10). When unset, EOF signifies the end of input."
+#~ msgstr ""
+#~ "\t\t(implicit 10). Când este desetat(unset), EOF semnificã sfârºitul "
+#~ "intrãrii(input)."
+
+#~ msgid "MAILCHECK\tHow often, in seconds, Bash checks for new mail."
+#~ msgstr ""
+#~ "MAILCHECK\tCât de des, în secunde, Bash-ul sã verifice dacã existã mail "
+#~ "nou."
+
+#~ msgid "MAILPATH\tA colon-separated list of filenames which Bash checks"
+#~ msgstr ""
+#~ "MAILPATH\tO listã de fiºiere separate prin douã-puncte pe care Bash o "
+#~ "verificã"
+
+#~ msgid "\t\tfor new mail."
+#~ msgstr "\t\tpentru mail nou."
+
+#~ msgid "OSTYPE\t\tThe version of Unix this version of Bash is running on."
+#~ msgstr ""
+#~ "OSTYPE\t\tVersiunea de Unix pe care aceastã versiune de Bash ruleazã."
+
+#~ msgid "PATH A colon-separated list of directories to search when"
+#~ msgstr ""
+#~ "PATH O listã de directoare separatã prin douã-puncte care se va"
+
+#~ msgid "\t\tlooking for commands."
+#~ msgstr "\t\tindexa în cãutarea comenzilor."
+
+#~ msgid "PROMPT_COMMAND A command to be executed before the printing of each"
+#~ msgstr ""
+#~ "PROMPT_COMMAND O comandã care va fi executatã înainte de tipãrirea "
+#~ "fiecãrui"
+
+#~ msgid "\t\tprimary prompt."
+#~ msgstr "\t\tprompt primar."
+
+#~ msgid "PS1 The primary prompt string."
+#~ msgstr "PS1 ªirul promptului primar."
+
+#~ msgid "PS2 The secondary prompt string."
+#~ msgstr "PS2 ªirul promptului secundar."
+
+#~ msgid "TERM The name of the current terminal type."
+#~ msgstr "TERM Numele tipului de terminal curent."
+
+#~ msgid "auto_resume Non-null means a command word appearing on a line by"
+#~ msgstr ""
+#~ "auto_resume Dacã nu e vid rezultã cã un cuvânt comandã ce apare pe o "
+#~ "linie"
+
+#~ msgid "\t\titself is first looked for in the list of currently"
+#~ msgstr "\t\tsingur este prima datã cãutat în lista "
+
+#~ msgid "\t\tstopped jobs. If found there, that job is foregrounded."
+#~ msgstr ""
+#~ "\t\tjoburilor.curente stopate. Dacã este gãsit acolo, acel job este adus "
+#~ "în prim-plan(foreground)."
+
+#~ msgid "\t\tA value of `exact' means that the command word must"
+#~ msgstr "\t\tO valoare de `exact' înseamnã cã acel cuvânt comandã trebuie"
+
+#~ msgid "\t\texactly match a command in the list of stopped jobs. A"
+#~ msgstr ""
+#~ "\t\tsã se potriveascã perfect unei comenzi din lista de joburi stopate. O"
+
+#~ msgid "\t\tvalue of `substring' means that the command word must"
+#~ msgstr "\t\tvaloare de `substring' înseamnã cã acel cuvânt comandã trebuie"
+
+#~ msgid "\t\tmatch a substring of the job. Any other value means that"
+#~ msgstr ""
+#~ "\t\tsã se potriveascã unui subºir al jobului. Orice altã valoare "
+#~ "înseamnã cã"
+
+#~ msgid "\t\tthe command must be a prefix of a stopped job."
+#~ msgstr "\t\tacea comandã trebuie sã fie prefixul unui job stopat."
+
+#~ msgid "command_oriented_history"
+#~ msgstr "command_oriented_history"
+
+#~ msgid ""
+#~ " Non-null means to save multiple-line commands together on"
+#~ msgstr ""
+#~ " Nevid reprezintã salvarea mai multor linii de comandã "
+#~ "împreunã într-o"
+
+#~ msgid " a single history line."
+#~ msgstr " singurã linie de istoric."
+
+#~ msgid "histchars Characters controlling history expansion and quick"
+#~ msgstr ""
+#~ "histchars Caractere care controleazã expansiunea istoricului ºi"
+
+#~ msgid "\t\tsubstitution. The first character is the history"
+#~ msgstr ""
+#~ "\t\tsubstituþii rapide. Primul caracter este caracterul de substituþie al"
+
+#~ msgid "\t\tsubstitution character, usually `!'. The second is"
+#~ msgstr "\t\tistoricului, de obicei `!'. Al doilea este"
+
+#~ msgid "\t\tthe `quick substitution' character, usually `^'. The"
+#~ msgstr "\t\tcaracterul de `quick substitution', de obicei `^'. Al treilea"
+
+#~ msgid "\t\tthird is the `history comment' character, usually `#'."
+#~ msgstr "\t\teste caracterul de `history comment', de obicei `#'."
+
+#~ msgid "HISTCONTROL\tSet to a value of `ignorespace', it means don't enter"
+#~ msgstr ""
+#~ "HISTCONTROL\tSeteazã o valoare de `ignorespace', care înseamnã sã nu"
+
+#~ msgid "\t\tlines which begin with a space or tab on the history"
+#~ msgstr "\t\tintroduci în lista de istoric linii care încep cu un"
+
+#~ msgid "\t\tlist. Set to a value of `ignoredups', it means don't"
+#~ msgstr ""
+#~ "\t\tspaþiu sau un tab. Seteazã o valoare de `ignoredups', care înseamnã"
+
+#~ msgid "\t\tenter lines which match the last entered line. Set to"
+#~ msgstr ""
+#~ "\t\ta nu se introduce linii care sunt asemãnãtoare ultimei linii "
+#~ "introduse."
+
+#~ msgid "\t\t`ignoreboth' means to combine the two options. Unset,"
+#~ msgstr ""
+#~ "\t\tSeteazã o valaore de `ignoreboth' însemnând combinarea celor douã "
+#~ "opþiuni."
+
+#~ msgid "\t\tor set to any other value than those above means to save"
+#~ msgstr ""
+#~ "\t\t Desetat(unset) sau setat la orice altã valoare decât acelea de mai "
+#~ "sus"
+
+#~ msgid "\t\tall lines on the history list."
+#~ msgstr "\t\taînseamnã salvarea tuturor liniilor în lista istoricului."
+
+#~ msgid "Adds a directory to the top of the directory stack, or rotates"
+#~ msgstr ""
+#~ "Adaugã un director în partea superioarã a stivei de directoare, sau "
+#~ "roteºte"
+
+#~ msgid "the stack, making the new top of the stack the current working"
+#~ msgstr "stiva, fãcând noul element superior al listei directorul curent"
+
+#~ msgid "directory. With no arguments, exchanges the top two directories."
+#~ msgstr ""
+#~ "de lucru. Fãrã parametri, interchimbã cele douã directoare superioare."
+
+#~ msgid "+N\tRotates the stack so that the Nth directory (counting"
+#~ msgstr "+N\tRoteºte stiva astfel încât al N-ulea director (numãrând"
+
+#~ msgid "\tfrom the left of the list shown by `dirs') is at the top."
+#~ msgstr "\tde la stânga listei afiºatã de `dirs') va fi în vârf(top)."
+
+#~ msgid "-N\tRotates the stack so that the Nth directory (counting"
+#~ msgstr "-N\tRoteºte stiva astfel încât al N-ulea director (numãrând"
+
+#~ msgid "\tfrom the right) is at the top."
+#~ msgstr "\tde la dreapta) va fi în vârf."
+
+#~ msgid "-n\tsuppress the normal change of directory when adding directories"
+#~ msgstr ""
+#~ "-n\tinhibã schimbarea normalã de directoare la adãugarea directoarelor"
+
+#~ msgid "\tto the stack, so only the stack is manipulated."
+#~ msgstr "\tîn stivã, astfel încât doar stiva sã fie manipulatã."
+
+#~ msgid "dir\tadds DIR to the directory stack at the top, making it the"
+#~ msgstr "dir\tadaugã DIR în vârful stivei de directoare, fãcându-l"
+
+#~ msgid "You can see the directory stack with the `dirs' command."
+#~ msgstr "Puteþi vedea stiva de directoare cu ajutorul comenzii `dirs'."
+
+#~ msgid "Removes entries from the directory stack. With no arguments,"
+#~ msgstr "ªterge intrãrile din stiva de directoare. Fãrã parametri, "
+
+#~ msgid "removes the top directory from the stack, and cd's to the new"
+#~ msgstr "ºterge directorul superior din stivã, ºi face cd la noul"
+
+#~ msgid "+N\tremoves the Nth entry counting from the left of the list"
+#~ msgstr "+N\tºterge al N-ulea element numãrând din stânga listei"
+
+#~ msgid "\tshown by `dirs', starting with zero. For example: `popd +0'"
+#~ msgstr "\tafiºate de `dirs', începând cu zero. De exemplu: `popd +0'"
+
+#~ msgid "\tremoves the first directory, `popd +1' the second."
+#~ msgstr "\tºterge primul director, `popd +1' al doilea."
+
+#~ msgid "-N\tremoves the Nth entry counting from the right of the list"
+#~ msgstr "-N\tºterge al N-ulea element numãrând din dreapta listei"
+
+#~ msgid "\tshown by `dirs', starting with zero. For example: `popd -0'"
+#~ msgstr "\tafiºate de `dirs', începând cu zero. De exemplu: `popd -0'"
+
+#~ msgid "\tremoves the last directory, `popd -1' the next to last."
+#~ msgstr "\tºterge ultimul director, `popd -1' penultimul."
+
+#~ msgid ""
+#~ "-n\tsuppress the normal change of directory when removing directories"
+#~ msgstr ""
+#~ "-n\tinhibã schimbarea normalã de directoare când se ºterg diurectoare"
+
+#~ msgid "\tfrom the stack, so only the stack is manipulated."
+#~ msgstr "\tdin stivã, astfel încât numai stiva sã fie manipulatã."
+
+#~ msgid "Display the list of currently remembered directories. Directories"
+#~ msgstr "Afiºeazã lista curentã de directoare reþinute. Directoarele"
+
+#~ msgid "find their way onto the list with the `pushd' command; you can get"
+#~ msgstr ""
+#~ "îºi gasesc locul în listã cu ajutorul comenzii `pushd'; puteþi merge"
+
+#~ msgid "back up through the list with the `popd' command."
+#~ msgstr "prin listã cu ajutorul comenzii `popd'."
+
+#~ msgid ""
+#~ "The -l flag specifies that `dirs' should not print shorthand versions"
+#~ msgstr ""
+#~ "Parametrul(flag) -l specificã faptul cã `dirs' nu ar trebui sã "
+#~ "tipãreascã "
+
+#~ msgid ""
+#~ "of directories which are relative to your home directory. This means"
+#~ msgstr ""
+#~ "versiuni prescurtate ale directoarelor care au legãturã(relative) cu home-"
+#~ "directory-ul."
+
+#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag"
+#~ msgstr ""
+#~ " Aceasta înseamnã cã `~/bin' poate fi afiºat ca `/homes/bfox/bin' "
+#~ "Parametrul"
+
+#~ msgid "causes `dirs' to print the directory stack with one entry per line,"
+#~ msgstr ""
+#~ "-v face ca `dirs' sã afiºeze stiva de directoare doar câte o intrare pe "
+#~ "linie,"
+
+#~ msgid ""
+#~ "prepending the directory name with its position in the stack. The -p"
+#~ msgstr "prefixând numele directorului cu poziþia în stivã. Parametrul -p"
+
+#~ msgid "flag does the same thing, but the stack position is not prepended."
+#~ msgstr "face acelaºi lucru, dar poziþia în stivã nu este prefix."
+
+#~ msgid ""
+#~ "The -c flag clears the directory stack by deleting all of the elements."
+#~ msgstr ""
+#~ "Parametrul(flag) -c ºterge stiva de directoare prin ºtergerea tuturor "
+#~ "elementelor."
+
+#~ msgid ""
+#~ "+N\tdisplays the Nth entry counting from the left of the list shown by"
+#~ msgstr "+N\tafiºeazã a N-a intrare numãrând de la stânga listei afiºate de"
+
+#~ msgid "\tdirs when invoked without options, starting with zero."
+#~ msgstr "\tdirs atunci când e invocatã fãrã opþiuni, începând cu zero."
+
+#~ msgid ""
+#~ "-N\tdisplays the Nth entry counting from the right of the list shown by"
+#~ msgstr "-N\tafiºeazã a N-a intrare numãrând de la dreapta listei afiºate de"
+
+#~ msgid "Toggle the values of variables controlling optional behavior."
+#~ msgstr ""
+#~ "Schimbã(toggle) valorile variabilelor, controlând comportamentul opþional."
+
+#~ msgid "The -s flag means to enable (set) each OPTNAME; the -u flag"
+#~ msgstr ""
+#~ "Parametrul -s înseamnã activarea(setarea) fiecãrei NUME_OPT; parametrul -u"
+
+#~ msgid "unsets each OPTNAME. The -q flag suppresses output; the exit"
+#~ msgstr "deseteazã(unset) fiecare NUME_OPT. Parametrul -q inhibã output-ul;"
+
+#~ msgid "status indicates whether each OPTNAME is set or unset. The -o"
+#~ msgstr ""
+#~ "starea de ieºire indicã dacã fiecare NUME_OPT este setat sau desetat."
+
+#~ msgid "option restricts the OPTNAMEs to those defined for use with"
+#~ msgstr ""
+#~ " Parametrul -o restricþioneazã NUME_OPT la acelea definite pentru a fi "
+
+#~ msgid "`set -o'. With no options, or with the -p option, a list of all"
+#~ msgstr ""
+#~ "folosite cu `set -o'. Fãrã nici o opþiune, sau cu opþiunea -p, este "
+#~ "afiºatã"
+
+#~ msgid "settable options is displayed, with an indication of whether or"
+#~ msgstr ""
+#~ "o listã a tuturor opþiunilor setabile, ceea ce indicã dacã fiecare este"
+
+#~ msgid "not each is set."
+#~ msgstr "setatã sau nu."
diff --git a/po/ru.gmo b/po/ru.gmo
new file mode 100644
index 0000000..b5aeccf
--- /dev/null
+++ b/po/ru.gmo
Binary files differ
diff --git a/po/ru.po b/po/ru.po
new file mode 100644
index 0000000..489635b
--- /dev/null
+++ b/po/ru.po
@@ -0,0 +1,3973 @@
+# Russian translations for GNU bash package
+# áÎÇÌÉÊÓËÉÅ ÐÅÒÅ×ÏÄÙ ÄÌÑ ÐÁËÅÔÁ GNU bash.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# This file is distributed under the same license as the GNU bash package.
+# <dushistov@mail.ru>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU bash 3.1-release\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2006-01-05 21:28+0300\n"
+"Last-Translator: Evgeniy Dushistov <dushistov@mail.ru>\n"
+"Language-Team: Russian <ru@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=KOI8-R\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
+"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "ÎÅÐÒÁ×ÉÌØÎÙÊ ÉÎÄÅËÓ ÍÁÓÓÉ×Á"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr ""
+
+#: arrayfunc.c:480
+#, fuzzy, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÏÅ ÉÍÑ ÏÐÃÉÉ"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s; ÎÅ ÍÏÇÕ ÐÒÉÐÉÓÁÔØ ÎÅ ÞÉÓÌÏ×ÏÊ ÉÎÄÅËÓ"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: ÎÅ ÍÏÇÕ ÓÏÚÄÁÔØ: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: ÐÅÒ×ÙÊ ÎÅÐÒÏÂÅÌØÎÙÊ ÓÉÍ×ÏÌ ÎÅ `\"'"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "ÎÅÔ ÚÁËÒÙ×ÁÀÝÅÇÏ `%c' × %s"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: ÐÒÏÐÕÝÅÎ ÒÁÚÄÅÌÉÔÅÌØ Ä×ÏÅÔÏÞÉÅ"
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÏÅ ÉÍÑ ÏÐÃÉÉ"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr ""
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr ""
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: ÎÅ ÍÏÇÕ ÐÒÏÞÉÔÁÔØ: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr ""
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "`%s': ÉÍÑ ÆÕÎËÃÉÉ ÎÅÉÚ×ÅÓÔÎÏ"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s ÎÅ ÐÒÉ×ÑÚÁÎÁ ÎÅ Ë ÏÄÎÏÊ ÉÚ ËÌÁ×ÉÛ.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s ÍÏÖÅÔ ÂÙÔØ ×ÙÚ×ÁÎ Ó ÐÏÍÏÝØÀ"
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr ""
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "ÉÍÅÅÔ ÓÍÙÓÌ ÔÏÌØËÏ × ÃÉËÌÁÈ `for', `while', ÉÌÉ `until'"
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "ÐÅÒÅÍÅÎÎÁÑ HOME ÎÅ ÕÓÔÁÎÏ×ÌÅÎÁ"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "ÐÅÒÅÍÅÎÎÁÑ OLDPWD ÎÅ ÕÓÔÁÎÏ×ÌÅÎÁ"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr ""
+
+#: builtins/common.c:139 error.c:261
+#, fuzzy, c-format
+msgid "warning: "
+msgstr "%s: ÐÒÅÄÕÐÒÅÖÄÅÎÉÅ:"
+
+#: builtins/common.c:153
+#, fuzzy, c-format
+msgid "%s: usage: "
+msgstr "%s: ÐÒÅÄÕÐÒÅÖÄÅÎÉÅ:"
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "ÓÌÉÛËÏÍ ÍÎÏÇÏ ÁÒÇÕÍÅÎÔÏ×"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: ÏÐÃÉÑ ÔÒÅÂÕÅÔ ÁÒÇÕÍÅÎÔÁ"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: ÔÒÅÂÕÅÔÓÑ ÞÉÓÌÏ×ÏÊ ÁÒÇÕÍÅÎÔ"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: ÎÅ ÎÁÊÄÅÎ"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: ÎÅÐÒÁ×ÉÌØÎÁÑ ÏÐÃÉÑ"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÏÅ ÉÍÑ ÏÐÃÉÉ"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "`%s': ÎÅÐÒÁ×ÉÌØÎÙÊ ÉÄÅÎÔÉÆÉËÁÔÏÒ"
+
+#: builtins/common.c:238
+#, fuzzy
+msgid "invalid octal number"
+msgstr "ÎÅÄÏÐÕÓÔÉÍÙÊ ÎÏÍÅÒ ÓÉÇÎÁÌÁ"
+
+#: builtins/common.c:240
+#, fuzzy
+msgid "invalid hex number"
+msgstr "ÎÅÄÏÐÕÓÔÉÍÏÅ ÞÉÓÌÏ"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "ÎÅÄÏÐÕÓÔÉÍÏÅ ÞÉÓÌÏ"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÁÑ ÓÐÅÃÉÆÉËÁÃÉÑ ÓÉÇÎÁÌÁ"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "`%s': ÎÅ ÉÄÅÎÔÉÆÉËÁÔÏÒ ÐÒÏÃÅÓÓÁ ÉÌÉ ÐÒÁ×ÉÌØÎÏÅ ÉÍÑ ÚÁÄÁÞÉ"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: ÄÏÓÔÕÐÎÁÑ ÔÏÌØËÏ ÎÁ ÞÔÅÎÉÅ ÐÅÒÅÍÅÎÎÁÑ"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s ×ÙÈÏÄÉÔ ÚÁ ÐÒÅÄÅÌÙ ÄÏÐÕÓÔÉÍÙÈ ÚÎÁÞÅÎÉÊ"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "ÁÒÇÕÍÅÎÔ"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s ×ÙÈÏÄÉÔ ÚÁ ÐÒÅÄÅÌÙ ÄÏÐÕÓÔÉÍÙÈ ÚÎÁÞÅÎÉÊ"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: ÎÅ ÔÁËÏÊ ÚÁÄÁÞÉ"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr ""
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr ""
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr ""
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr ""
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: ÎÅ ×ÓÔÒÏÅÎÎÁ × ÏÂÏÌÏÞËÕ"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "ÏÛÉÂËÁ ÚÁÐÉÓÉ: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: ÏÛÉÂËÁ ÐÏÌÕÞÅÎÉÑ ÔÅËÕÝÅÊ ÄÉÒÅËÔÏÒÉÉ: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr ""
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr ""
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr ""
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr ""
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr ""
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr ""
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "ÍÏÖÅÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎÁ ÔÏÌØËÏ × ÆÕÎËÃÉÉ"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr ""
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: ÄÏÓÔÕÐÎÁÑ ÔÏÌØËÏ ÎÁ ÞÔÅÎÉÅ ÆÕÎËÃÉÑ"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: ÎÅ ÍÏÇÕ ÕÄÁÌÉÔØ ÐÅÒÅÍÅÎÎÕÀ-ÍÁÓÓÉ× ÔÁËÉÍ ÓÐÏÓÏÂÏÍ"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr ""
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr ""
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr ""
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr ""
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: ÎÅ ÍÏÇÕ ÕÄÁÌÉÔØ: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: Ñ×ÌÑÅÔÓÑ ÄÉÒÅËÔÏÒÉÅÊ"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: ÎÅ Ñ×ÌÑÅÔÓÑ ÏÂÙÞÎÙÍ ÆÁÊÌÏÍ"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: ÓÌÉÛËÏÍ ÂÏÌØÛÏÊ ÆÁÊÌ"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: ÎÅ ÍÏÇÕ ÚÁÐÕÓÔÉÔØ ÂÉÎÁÒÎÙÊ ÆÁÊÌ"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: ÎÅ ÍÏÇÕ ÚÁÐÕÓÔÉÔØ: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr ""
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr ""
+"ÏÂÏÌÏÞËÁ ÎÅ Ñ×ÌÑÅÔÓÑ ÚÁÐÕÝÅÎÎÏÊ ÐÏÓÌÅ ×ÈÏÄÁ × ÓÉÓÔÅÍÕ: ÉÓÐÏÌØÚÕÊÔÅ `exit' "
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "åÓÔØ ÐÒÉÏÓÔÁÎÏ×ÌÅÎÎÙÅ ÚÁÄÁÞÉ.\n"
+
+#: builtins/exit.def:122
+#, fuzzy, c-format
+msgid "There are running jobs.\n"
+msgstr "åÓÔØ ÐÒÉÏÓÔÁÎÏ×ÌÅÎÎÙÅ ÚÁÄÁÞÉ.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "ÎÅ ÎÁÛÅÌ ÔÁËÕÀ ËÏÍÁÎÄÕ"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr ""
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: ÎÅ ÍÏÇÕ ÏÔËÒÙÔØ ×ÒÅÍÅÎÎÙÊ ÆÁÊÌ: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr ""
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr ""
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÁÑ ÏÐÃÉÑ -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr ""
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr ""
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr ""
+
+#: builtins/hash.def:244
+#, fuzzy, c-format
+msgid "hits\tcommand\n"
+msgstr "ÐÏÓÌÅÄÎÑÑ ËÏÍÁÎÄÁ: %s\n"
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] ""
+msgstr[1] ""
+msgstr[2] ""
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: ÎÅ ÍÏÇÕ ÏÔËÒÙÔØ: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr ""
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr ""
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr ""
+
+#: builtins/inlib.def:71
+#, fuzzy, c-format
+msgid "%s: inlib failed"
+msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÙÊ ÓÅÒ×ÉÓ"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr ""
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr ""
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "îÅÉÚ×ÅÓÔÎÁÑ ÏÛÉÂËÁ"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "ÏÖÉÄÁÌÏÓØ ×ÙÒÁÖÅÎÉÅ"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: ÎÅ ÐÅÒÅÍÅÎÎÁÑ-ÍÁÓÓÉ×"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÏÅ ÏÐÉÓÁÎÉÅ ÆÁÊÌÏ×ÏÇÏ ÄÅÓËÒÉÐÔÏÒÁ"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: ÎÅÄÏÐÕÓÔÉÍÙÊ ÄÅÓËÒÉÐÔÏÒ ÆÁÊÌÁ: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, fuzzy, c-format
+msgid "%s: invalid line count"
+msgstr "%s: ÎÅÐÒÁ×ÉÌØÎÁÑ ÏÐÃÉÑ"
+
+#: builtins/mapfile.def:277
+#, fuzzy, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: ÎÅÐÒÁ×ÉÌØÎÁÑ ÏÐÃÉÑ"
+
+#: builtins/mapfile.def:294
+#, fuzzy, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÏÅ ÞÉÓÌÏ"
+
+#: builtins/mapfile.def:326
+#, fuzzy
+msgid "empty array variable name"
+msgstr "%s: ÎÅ ÐÅÒÅÍÅÎÎÁÑ-ÍÁÓÓÉ×"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr ""
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "`%s': ÐÒÏÐÕÝÅÎ ÓÉÍ×ÏÌ ÆÏÒÍÁÔÉÒÏ×ÁÎÉÑ"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "%c': ÎÅÄÏÐÕÓÔÉÍÙÊ ÓÉÍ×ÏÌ ÆÏÒÍÁÔÉÒÏ×ÁÎÉÑ"
+
+#: builtins/printf.def:578
+#, fuzzy, c-format
+msgid "warning: %s: %s"
+msgstr "%s: ÐÒÅÄÕÐÒÅÖÄÅÎÉÅ:"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr ""
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "ÎÅÔ ÄÒÕÇÏÊ ÄÉÒÅËÔÏÒÉÉ"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr ""
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr ""
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr ""
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr ""
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "ÏÛÉÂËÁ ÞÔÅÎÉÑ: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr ""
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: ÎÅ ÍÏÇÕ ÓÂÒÏÓÉÔØ"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: ÎÅ ÍÏÇÕ ÓÂÒÏÓÉÔØ: ÄÏÓÔÕÐÎÏ ÔÏÌØËÏ ÄÌÑ ÞÔÅÎÉÑ %s"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: ÎÅ ÐÅÒÅÍÅÎÎÁÑ-ÍÁÓÓÉ×"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: ÎÅ ÆÕÎËÃÉÑ"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr ""
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr ""
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÏÅ ÉÍÑ ÏÐÃÉÉ ÏÂÏÌÏÞËÉ"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "ÔÒÅÂÕÅÔÓÑ ÁÒÇÕÍÅÎÔ ÉÍÑ ÆÁÊÌÁ"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: ÆÁÊÌ ÎÅ ÎÁÊÄÅÎ"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr ""
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr ""
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr ""
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s Ñ×ÌÑÅÔÓÑ ËÌÀÞÅ×ÙÍ ÓÌÏ×ÏÍ ÏÂÏÌÏÞËÉ\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s Ñ×ÌÑÅÔÓÑ ÆÕÎËÃÉÅÊ\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr ""
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr ""
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr ""
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr ""
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "`%c': ÐÌÏÈÁÑ ËÏÍÁÎÄÁ"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr ""
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr ""
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr ""
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "ÞÉÓÌÏ × ×ÏÓØÍÅÒÉÞÎÏÊ ÓÉÓÔÅÍÅ ÉÓÞÉÓÌÅÎÉÑ"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr ""
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr ""
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr ""
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "ÐÏÓÌÅÄÎÑÑ ËÏÍÁÎÄÁ: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "úÁ×ÅÒÛÁÀ ÒÁÂÏÔÕ..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "ÎÅÉÚ×ÅÓÔÎÁÑ ÏÛÉÂËÁ ËÏÍÁÎÄÙ"
+
+#: error.c:407
+msgid "bad command type"
+msgstr ""
+
+#: error.c:408
+msgid "bad connector"
+msgstr ""
+
+#: error.c:409
+msgid "bad jump"
+msgstr ""
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr ""
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr ""
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr ""
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr ""
+
+#: execute_cmd.c:2075
+#, fuzzy
+msgid "pipe error"
+msgstr "ÏÛÉÂËÁ ÚÁÐÉÓÉ: %s"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr ""
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: ËÏÍÁÎÄÁ ÎÅ ÎÁÊÄÅÎÁ"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: ÐÌÏÈÏÊ ÉÎÔÅÒÐÒÅÔÁÔÏÒ"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "ÎÅ ÍÏÇÕ ÄÕÂÌÉÒÏ×ÁÔØ fd %d × fd %d"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr ""
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr ""
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "ÓÉÎÔÁËÓÉÞÅÓËÁÑ ÏÛÉÂËÁ × ×ÙÒÁÖÅÎÉÅ"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "ÐÏÐÙÔËÁ ÐÒÉÓ×ÏÅÎÉÑ ÎÅ-ÐÅÒÅÍÅÎÎÏÊ"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "ÄÅÌÅÎÉÅ ÎÁ 0"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr ""
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr ""
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr ""
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr ""
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "ÐÒÏÐÕÝÅÎ `)'"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "ÏÛÉÂËÁ ÓÉÎÔÁËÓÉÓÁ: ÏÖÉÄÁÅÔÓÑ ÏÐÅÒÁÎÄ"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr ""
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr ""
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr ""
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr ""
+
+#: expr.c:1329
+#, fuzzy, c-format
+msgid "%s: expression error\n"
+msgstr "ÏÖÉÄÁÌÏÓØ ×ÙÒÁÖÅÎÉÅ"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr ""
+
+#: input.c:94 subst.c:4857
+#, fuzzy, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "ÎÅ ÍÏÇÕ ÄÕÂÌÉÒÏ×ÁÔØ fd %d × fd %d"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr ""
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr ""
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr ""
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr ""
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr ""
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr ""
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr ""
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr ""
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr ""
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr ""
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr ""
+
+#: jobs.c:1443
+msgid "Running"
+msgstr ""
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr ""
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr ""
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr ""
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr ""
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr ""
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr ""
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr ""
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr ""
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr ""
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr ""
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr ""
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, fuzzy, c-format
+msgid "%s: line %d: "
+msgstr "%s: ÐÒÅÄÕÐÒÅÖÄÅÎÉÅ:"
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr ""
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr ""
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr ""
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr ""
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr ""
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr ""
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr ""
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:313
+#, fuzzy
+msgid "unknown"
+msgstr "%s: ÈÏÓÔ ÎÅÉÚ×ÅÓÔÅÎ"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr ""
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr ""
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr ""
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr ""
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr ""
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: ÈÏÓÔ ÎÅÉÚ×ÅÓÔÅÎ"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: ÎÅÄÏÐÕÓÔÉÍÙÊ ÓÅÒ×ÉÓ"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr ""
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr ""
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:249
+#, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr ""
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "õ ×ÁÓ ÅÓÔØ ÐÏÞÔÁ × $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "õ ×ÁÓ ÅÓÔØ ÎÏ×ÁÑ ÐÏÞÔÁ × $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "ðÏÞÔÁ × %s ÂÙÌÁ ÐÒÏÞÉÔÁÎÁ\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr ""
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "ÏÛÉÂËÁ ÓÉÎÔÁËÓÉÓÁ: `;' ÎÅ ÏÖÉÄÁÅÔÓÑ"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "ÏÛÉÂËÁ ÓÉÎÔÁËÓÉÓÁ: `((%s))'"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr ""
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr ""
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr ""
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr ""
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr ""
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr ""
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr ""
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "ÏÖÉÄÁÌÓÑ `)'"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr ""
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr ""
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr ""
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr ""
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr ""
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr ""
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr ""
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr ""
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr ""
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr ""
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "ÏÛÉÂËÁ ÓÉÎÔÁËÓÉÓÁ ÏËÏÌÏ `%s'"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "ÏÛÉÂËÁ ÓÉÎÔÁËÓÉÓÁ: ÎÅÏÖÉÄÁÎÎÙÊ ËÏÎÅÃ ÆÁÊÌÁ"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "ÏÛÉÂËÁ ÓÉÎÔÁËÓÉÓÁ"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "éÓÐÏÌØÚÕÊÔÅ \"%s\", ÞÔÏÂÙ ÚÁ×ÅÒÛÉÔØÓÑ ÒÁÂÏÔÕ Ó ÏÂÏÌÏÞËÏÊ.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr ""
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr ""
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr ""
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr ""
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d: ÎÅÄÏÐÕÓÔÉÍÙÊ ÄÅÓËÒÉÐÔÏÒ ÆÁÊÌÁ: %s"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr ""
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "ÆÁÊÌÏ×ÙÊ ÄÅÓËÒÉÐÔÏÒ ÚÁ ÐÒÅÄÅÌÁÍÉ ÄÏÐÕÓÔÉÍÏÇÏ ÄÉÁÐÁÚÏÎÁ"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr ""
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: ÎÅ ÍÏÇÕ ÐÅÒÅÐÉÓÁÔØ ÕÖÅ ÓÕÝÅÓÔ×ÕÀÝÉÊ ÆÁÊÌ"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr ""
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr ""
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: ÎÅ ÐÅÒÅÍÅÎÎÁÑ-ÍÁÓÓÉ×"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr ""
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "ÏÛÉÂËÁ ÐÅÒÅÎÁÐÒÁ×ÌÅÎÉÑ: ÎÅ ÍÏÇÕ ÄÕÂÌÉÒÏ×ÁÔØ fd"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "ÎÅ ÍÏÇÕ ÎÁÊÔÉ /tmp, ÐÏÖÁÌÕÊÓÔÁ ÓÏÚÄÁÊÔÅ!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "/tmp ÄÏÌÖÎÁ ÂÙÔØ ÄÅÊÓÔ×ÉÔÅÌØÎÙÍ ÉÍÅÎÅÍ ÄÉÒÅËÔÏÒÉÉ"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: ÎÅÄÏÐÕÓÔÉÍÁÑ ÏÐÃÉÑ"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "õ ÍÅÎÑ ÎÅÔ ÉÍÅÎÉ!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr ""
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"éÓÐÏÌØÚÏ×ÁÎÉÅ:\n"
+"%s [ÄÌÉÎÎÙÅ ÏÐÃÉÉ Á-ÌÑ `GNU'] [ÏÐÃÉÉ] ...\n"
+"\t%s [ÄÌÉÎÎÙÅ ÏÐÃÉÉ Á-ÌÑ `GNU'] [ÏÐÃÉÉ] ÆÁÊÌ_ÓÏ_ÓËÒÉÐÔÏÍ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "äÌÉÎÎÙÅ ÏÐÃÉÉ × ÓÔÅÌÅ GNU:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "ïÐÃÉÉ ÏÂÏÌÏÞËÉ:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr ""
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s ÉÌÉ ÏÐÃÉÑ -o\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr ""
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr ""
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr ""
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr ""
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr ""
+
+#: siglist.c:59
+msgid "Quit"
+msgstr ""
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr ""
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr ""
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr ""
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr ""
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr ""
+
+#: siglist.c:87
+msgid "Killed"
+msgstr ""
+
+#: siglist.c:91
+#, fuzzy
+msgid "Bus error"
+msgstr "ÏÛÉÂËÁ ÓÉÎÔÁËÓÉÓÁ"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr ""
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr ""
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr ""
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr ""
+
+#: siglist.c:111
+msgid "Terminated"
+msgstr ""
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr ""
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr ""
+
+#: siglist.c:127
+msgid "Continue"
+msgstr ""
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr ""
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr ""
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr ""
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr ""
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr ""
+
+#: siglist.c:155
+msgid "File limit"
+msgstr ""
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr ""
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr ""
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr ""
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr ""
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr ""
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr ""
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr ""
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr ""
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr ""
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr ""
+
+#: siglist.c:199
+msgid "programming error"
+msgstr ""
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr ""
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr ""
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr ""
+
+#: siglist.c:215
+msgid "Information request"
+msgstr ""
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr ""
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr ""
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr ""
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr ""
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr ""
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr ""
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "ÎÅ ÍÏÇÕ ÏÔËÒÙÔØ ÉÍÅÎÎÏÊ ËÁÎÁÌ %s ÄÌÑ ÞÔÅÎÉÑ"
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "ÎÅ ÍÏÇÕ ÏÔËÒÙÔØ ÉÍÅÎÎÏÊ ËÁÎÁÌ %s ÄÌÑ ÚÁÐÉÓÉ"
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr ""
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr ""
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr ""
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr ""
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: ÐÁÒÁÍÅÔÒ null ÉÌÉ ÎÅ ÕÓÔÁÎÏ×ÌÅÎ"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr ""
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr ""
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr ""
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, fuzzy, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "ÎÅÔ ÚÁËÒÙ×ÁÀÝÅÇÏ `%c' × %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "ÎÅÔ ÓÏ×ÐÁÄÅÎÉÑ Ó: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "ÐÒÅÄÐÏÌÁÇÁÅÔÓÑ ÞÔÏ ÂÕÄÅÔ ÉÓÐÏÌØÚÏ×ÁÎ ÁÒÇÕÍÅÎÔ"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr ""
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "ÏÖÉÄÁÅÔÓÑ `)' "
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "ÏÖÉÄÁÌÓÑ `)', ÎÁÊÄÅÎ %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: ÏÖÉÄÁÅÔÓÑ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÕÎÁÒÎÏÇÏ ÏÐÅÒÁÔÏÒÁ"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: ÏÖÉÄÁÅÔÓÑ ÉÓÐÏÌØÚÏ×ÁÎÉÅ ÂÉÎÁÒÎÏÇÏ ÏÐÅÒÁÔÏÒÁ"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "ÐÒÏÐÕÝÅÎ `]'"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "ÎÅÄÏÐÕÓÔÉÍÙÊ ÎÏÍÅÒ ÓÉÇÎÁÌÁ"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr ""
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr ""
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr ""
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr ""
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr ""
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr ""
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: ÐÁÒÁÍÅÔÒ null ÉÌÉ ÎÅ ÕÓÔÁÎÏ×ÌÅÎ"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr ""
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr ""
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr ""
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: ÎÅ ÍÏÇÕ ÏÔËÒÙÔØ: %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d: ÎÅÄÏÐÕÓÔÉÍÙÊ ÄÅÓËÒÉÐÔÏÒ ÆÁÊÌÁ: %s"
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr ""
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr ""
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+
+#: version2.c:86
+#, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr ""
+
+#: version2.c:87
+#, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: xmalloc.c:91
+#, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "%s: ÎÅ ÍÏÇÕ ÓÏÚÄÁÔØ: %s"
+
+#: xmalloc.c:163
+#, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "%s: ÎÅ ÍÏÇÕ ÓÏÚÄÁÔØ: %s"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr ""
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr ""
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr ""
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr ""
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr ""
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr ""
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr ""
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr ""
+
+#: builtins.c:68
+msgid ":"
+msgstr ""
+
+#: builtins.c:70
+msgid "true"
+msgstr ""
+
+#: builtins.c:72
+msgid "false"
+msgstr ""
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr ""
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr ""
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr ""
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr ""
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr ""
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr ""
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr ""
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr ""
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr ""
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr ""
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr ""
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr ""
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr ""
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr ""
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr ""
+
+#: builtins.c:117
+msgid "help [-dms] [pattern ...]"
+msgstr ""
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr ""
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr ""
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr ""
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr ""
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr ""
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr ""
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr ""
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr ""
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr ""
+
+#: builtins.c:150
+#, fuzzy
+msgid "source filename [arguments]"
+msgstr "ÔÒÅÂÕÅÔÓÑ ÁÒÇÕÍÅÎÔ ÉÍÑ ÆÁÊÌÁ"
+
+#: builtins.c:152
+#, fuzzy
+msgid ". filename [arguments]"
+msgstr "ÔÒÅÂÕÅÔÓÑ ÁÒÇÕÍÅÎÔ ÉÍÑ ÆÁÊÌÁ"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr ""
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr ""
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr ""
+
+#: builtins.c:162
+msgid "times"
+msgstr ""
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr ""
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr ""
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr ""
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr ""
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr ""
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr ""
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr ""
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr ""
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr ""
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr ""
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr ""
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr ""
+
+#: builtins.c:206
+#, fuzzy
+msgid "(( expression ))"
+msgstr "ÏÖÉÄÁÌÏÓØ ×ÙÒÁÖÅÎÉÅ"
+
+#: builtins.c:208
+#, fuzzy
+msgid "[[ expression ]]"
+msgstr "ÏÖÉÄÁÌÏÓØ ×ÙÒÁÖÅÎÉÅ"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr ""
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr ""
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr ""
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr ""
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr ""
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr ""
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+
+#: builtins.c:237
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr ""
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+
+#: builtins.c:428
+#, fuzzy
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+" îÅÔ ËÁËÏÇÏ-ÌÉÂÏ ÜÆÆÅËÔÁ; ËÏÍÁÎÄÁ ÎÉÞÅÇÏ ÎÅ ÄÅÌÁÅÔ. îÕÌØ ×ÏÚ×ÒÁÝÁÅÔÓÑ × "
+"ËÁÞÅÓÔ×Å ÒÅÚÕÌØÔÁÔÁ."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:448
+#, fuzzy
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr "÷ÏÚ×ÒÁÝÁÅÔ ÒÅÚÕÌØÔÁÔ: ÎÅÕÄÁÞÁ."
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+
+#: builtins.c:966
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+#, fuzzy
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"ðÏËÁÚÙ×ÁÅÔ ×ÏÚÍÏÖÎÙÅ ÄÏÐÏÌÎÅÎÉÑ × ÚÁ×ÉÓÉÍÏÓÔÉ ÏÐÃÉÊ. ðÒÅÄÐÏÌÁÇÁÅÔÓÑ,\n"
+" ÞÔÏ ÂÕÄÅÔ ÉÓÐÏÌØÚÏ×ÁÔØÓÑ ×ÎÕÔÒÉ ÆÕÎËÃÉÊ ËÏÍÁÎÄÎÏÇÏ ÉÎÔÅÒÐÒÅÔÁÔÏÒÁ, "
+"ÇÅÎÅÒÉÒÕÀÝÅÊ ×ÏÚÍÏÖÎÙÅ ÄÏÐÏÌÎÅÎÉÑ.\n"
+" åÓÌÉ ÎÅÏÂÑÚÁÔÅÌØÎÙÊ ÁÒÇÕÍÅÎÔ óìï÷ï ÂÙÌ ÉÓÐÏÌØÚÏ×ÁÎ, ÔÏ ÂÕÄÕÔ "
+"ÓÇÅÎÅÒÉÒÏ×ÁÎÙ ÔÏÌØËÏ ÓÏ×ÐÁÄÅÎÉÑ Ó óìï÷ï."
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+
+#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR,"
+#~ msgstr "âÅÚ ÷ùòáö ×ÏÚ×ÒÁÝÁÅÔ \"$ÓÔÒÏËÁ $ÉÍÑÆÁÊÌÁ\". ó ÷ùòáö,"
+
+#~ msgid "returns \"$line $subroutine $filename\"; this extra information"
+#~ msgstr ""
+#~ "÷ÏÚ×ÒÁÝÁÅÔ \"$ÓÔÒÏËÁ $ÐÒÏÃÅÄÕÒÁ $ÉÍÑÆÁÊÌÁ\"; ÜÔÁ ÄÏÐÏÌÎÉÔÅÌØÎÁÑ "
+#~ "ÉÎÆÏÒÍÁÃÉÑ "
+
+#~ msgid "can be used used to provide a stack trace."
+#~ msgstr "ÍÏÖÅÔ ÂÙÔØ ÉÓÐÏÌØÚÏ×ÁÎÁ ÄÌÑ ÓÏÚÄÁÎÉÑ `stack trace'"
+
+#~ msgid "bug: unknown operation"
+#~ msgstr "ÏÛÉÂËÁ: ÎÅÉÚ×ÅÓÔÎÁÑ ÏÐÅÒÁÃÉÑ"
+
+#, fuzzy
+#~ msgid "Return a successful result."
+#~ msgstr "÷ÏÚ×ÒÁÝÁÅÔ ÒÅÚÕÌØÔÁÔ: ×ÓÅ ÈÏÒÏÛÏ."
+
+#, fuzzy
+#~ msgid "Obsolete. See `declare'."
+#~ msgstr " ÷ÙÛÅÌ ÉÚ ÕÐÏÔÒÅÂÌÅÎÉÑ. óÍ. `declare'."
+
+#, fuzzy
+#~ msgid "Logout of a login shell."
+#~ msgstr ""
+#~ "úÁ×ÅÒÛÅÎÉÑ ÓÅÁÎÓÁ ËÏÍÁÎÄÎÏÇÏ ÉÎÔÅÒÐÒÅÔÁÔÏÒÁ ÚÁÐÕÝÅÎÎÏÇÏ ÐÏÓÌÅ ×ÈÏÄÁ × "
+#~ "ÓÉÓÔÅÍÕ."
diff --git a/po/sk.gmo b/po/sk.gmo
new file mode 100644
index 0000000..06b798f
--- /dev/null
+++ b/po/sk.gmo
Binary files differ
diff --git a/po/sk.po b/po/sk.po
new file mode 100644
index 0000000..dba3061
--- /dev/null
+++ b/po/sk.po
@@ -0,0 +1,6018 @@
+# Slovak translation for bash.
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# This file is distributed under the same license as the bash package.
+# Ivan Masár <helix84@centrum.sk>, 2007, 2008, 2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bash 4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2009-03-19 13:09+0100\n"
+"Last-Translator: Ivan Masár <helix84@centrum.sk>\n"
+"Language-Team: Slovak <sk-i18n@lists.linux.sk>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "chybný index poľa"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr "%s: nie je možné previesť indexované pole na asociatívne"
+
+#: arrayfunc.c:480
+#, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: neplatný kÄ¾ÃºÄ asociatívneho poľa"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: nie je možné priradiť nenumerickému indexu"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr "%s: %s: pri priraÄovaní asociatívnemu poľu je potrebné použiÅ¥ index"
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: nie je možné vytvoriť: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+"bash_execute_unix_command: nie je možné nájsť klávesovú mapu pre príkaz"
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: prvý znak (okrem bielych znakov) nie je „\"“"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "chýba zatvárajúca „%c“ v %s"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: chýba oddeľovaÄ dvojbodka"
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "„%s“: neplatný názov klávesovej mapy"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr "úpravy riadka nie sú zapnuté"
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "„%s“: neplatný názov klávesovej mapy"
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: nie je možné preÄítaÅ¥: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "„%s“: nie je možné zrušiť väzbu (unbind)"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "„%s“: neznámy názov funkcie"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s nie je zviazaný (bind) s žiadnymi klávesmi.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s je možné vyvolať ako "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr "poÄet cyklov"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "dáva zmysel iba v cykle „for“, „while“ alebo „until“"
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+"Vracia kontext aktuálneho volania podprocedúry.\n"
+" \n"
+" Bez EXPR, vracia "
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "HOME nebola nastavená"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "OLDPWD nebola nastavená"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr "riadok %d: "
+
+#: builtins/common.c:139 error.c:261
+#, c-format
+msgid "warning: "
+msgstr "upozornenie: "
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr "%s: použitie "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "príliš veľa argumentov"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: voľba vyžaduje argument"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: vyžaduje sa numerický argument"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: nenájdené"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: neplatná voľba"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: neplatný názov voľby"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "„%s“: nie je platný identifikátor"
+
+#: builtins/common.c:238
+msgid "invalid octal number"
+msgstr "neplatné osmiÄkové Äíslo"
+
+#: builtins/common.c:240
+msgid "invalid hex number"
+msgstr "neplatné Å¡estnástkové Äíslo"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "neplatné Äíslo"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: neplatné urÄenie signálu"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "„%s“: nie je pid ani platný špecifikátor úlohy"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: premenná len na Äítanie"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s je mimo rozsahu"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "argument"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s mimo rozsahu"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: taká úloha neexistuje"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: riadenie úloh nedostupné"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "riadenie úloh nedostupné"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: obmedzené"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "obmedzené"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: nie je vstavaný príkaz (builtin) shellu"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "chyba zapisovania: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr "chyba pri nastavovaní atribútov terminálu: %s"
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr "chyba pri zisťovaní atribútov terminálu: %s"
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: chyba pri zisťovaní aktuálneho adresára: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: nejednoznaÄné urÄenie úlohy"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: neplatný názov akcie"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: chýba Å¡pecifikácia dokonÄovania"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "upozornenie: voľba -F nemusí fungovaÅ¥ tak ako oÄakávate"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "upozornenie: voľba -C nemusí fungovaÅ¥ tak ako oÄakávate"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr "momentálne sa nevykonáva funkcia doplňovania"
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "je možné použiť iba vo funkcii"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "nie je možné použiť „-f“ pre tvorbu funkcií"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: funkcia iba na Äítanie"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: nie je možné takto robiť deštrukciu premenných polí"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr "%s: nie je možné previesť asociatívne pole na indexované"
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "dynamické naÄítavanie nie je dostupné"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "nie je možné otvoriť zdieľaný objekt %s: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "nemožem nájsť %s v zdieľanom objekte %s: %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: nie je dynamicky naÄítané"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: nie je možné zmazať: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: je adresár"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: nie je obyÄajný súbor"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: súbor je príliš veľký"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: nie je možné vykonať binárny súbor"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: nie je možné spustiť: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr "odhlásenie\n"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "toto nie je login shell: použite „exit“"
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "Existujú zastavené úlohy.\n"
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr "Existujú bežiace úlohy.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "prákaz nenájdený"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "špecifikácia histórie"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: nie je možné otvoriť odkladací súbor: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr "aktuálny"
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "úloha %d zaÄala bez riadenia úloh"
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: neplatná voľba -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: voľba vyžaduje argument -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "hašovanie vypnuté"
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: hašovacia tabuľka je prázdna\n"
+
+#: builtins/hash.def:244
+#, c-format
+msgid "hits\tcommand\n"
+msgstr "použití\tpríkaz\n"
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Príkazy shellu zodpovedajúce kľúÄovému slovu „"
+msgstr[1] "Príkazy shellu zodpovedajúce kľúÄovým slovám „"
+msgstr[2] "Príkazy shellu zodpovedajúce kľúÄovým slovám „"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"pre „%s“ neboli nájdené zodpovedajúce témy pomocníka.\n"
+"Skúste „help help“ alebo „man -k %s“ alebo „info %s“."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: nie je možné otvoriť: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"Tieto príkazy shellu sú definované interne. Napísaním „help“ zobrazíte tento "
+"zoznam.\n"
+"Napísaním „help názov“ zistíte viac o funkcii „názov“.\n"
+"Napísaním „info bash“ zistíte viac o shelli vo všeobecnosti.\n"
+"Napísaním „man -k“ alebo „info“ zistíte viac príkazoch, ktoré nie sú v "
+"zozname.\n"
+"\n"
+"HviezdiÄka (*) vedľa názvu znamená, že príkaz je vypnutý.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "nie je možné použiť viac ako jednu z volieb -anrw"
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "poloha histórie"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: rozšírenie histórie zlyhalo"
+
+#: builtins/inlib.def:71
+#, c-format
+msgid "%s: inlib failed"
+msgstr "%s: inlib zlyhalo"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "iné voľby prípustné s „-x“"
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: argumenty musia byť ID procesov alebo úloh"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Neznáma chyba"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "oÄakával sa výraz"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: nie je premenná poľa"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: neplatná Å¡pecifikácia popisovaÄa súboru"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: neplatný popisovaÄ súboru: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, c-format
+msgid "%s: invalid line count"
+msgstr "%s: neplatný poÄet riadkov"
+
+#: builtins/mapfile.def:277
+#, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: neplatný zaÄiatok poľa"
+
+#: builtins/mapfile.def:294
+#, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: neplatné kvantum spätného volania"
+
+#: builtins/mapfile.def:326
+msgid "empty array variable name"
+msgstr "názov prázdnej premennej poľa"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr "vyžaduje sa podpora premennej poľa"
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "„%s“: chýba formátovací znak"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "„%c“: neplatný formátovací znak"
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr "upozornenie: %s: %s"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "chýba hexadecimálna Äíslica v \\x"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "žiadny iný adresár"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<žiadny aktuálny adresár>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr "zásobník adresárov je prázdny"
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr "index zásobníka adresárov"
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+"Zobrazí zoznam momentálne zapamätaných adresárov. Adresáre\n"
+" sa do zoznamu dostávajú príkazom „pushd“; zo zoznamu ich môžete\n"
+" vyberať postupne príkazom „popd“.\n"
+" \n"
+" Voľby:\n"
+" -c\tvyprázdni zásobník adresárov zmazaním všetkých položiek\n"
+" -l\tnevypisovať skrátené verzie adresárov relatívne vzhľadom\n"
+" \tna váš domovský adresár\n"
+" -p\tvypíše zásobník adresárov vo formáte jedna položka na riadok\n"
+" -v\tvypíše zásobník adresárov vo formáte jedna položka na riadok\n"
+" \ta pred ňu vypíše jej pozíciu na zásobníku\n"
+" \n"
+" Argumenty:\n"
+" +N\tzobrazuje N-tú položku poÄítajúc zľava zoznamu, ktorý zobrazuje\n"
+" \tdirs vyvolaný bez volieb, poÄínajúc nulou.\n"
+" \n"
+" -N\tzobrazuje N-tú položku poÄítajúc sprava zoznamu, ktorý zobrazuje\n"
+" \tdirs vyvolaný bez volieb, poÄínajúc nulou."
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Pridá adresár na vrchol zásobníka adresárov alebo ho otoÄí tak, že\n"
+" nový vrchol zásobníka sa stane aktuálnym pracovným adresárom.\n"
+" Bez argumentov vymení vrchné dva adresáre.\n"
+" \n"
+" Voľby:\n"
+" -n\tPotlaÄí normálnu zmenu adresára pri odstraňovaní položiek\n"
+" \tzo zásobníka, takže sa zmení iba zásobník.\n"
+" \n"
+" Argumenty:\n"
+" +N\tOtoÄí zásobník tak, že N-tý adresár (poÄítajúc zľava zoznamu,\n"
+" \tktorý zobrazuje „dirs“, poÄínajúc nulou) je na vrchu.\n"
+" \n"
+" -N\tOtoÄí zásobník tak, že N-tý adresár (poÄítajúc sprava zoznamu,\n"
+" \tktorý zobrazuje „dirs“, poÄínajúc nulou) je na vrchu.\n"
+" \n"
+" adr\tPridá ADR na vrchol zásobníka adresárov, Äím sa tento stane\n"
+" \tnovým aktuálnym pracovným adresárom.\n"
+" \n"
+" Zásobník adresárov môžete zobraziť vstavaným príkazom „dirs“."
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Odstráni položky zo zásobníka adresárov. Bez argumentov odstráni\n"
+" vrchnú položku zo zásobníka a zmení adresár na adresár, ktorý\n"
+" sa následne nachádza na vrchu zásobníka.\n"
+" \n"
+" Voľby:\n"
+" -n\tpotlaÄí normálnu zmenu adresára pri odstraňovaní položiek\n"
+" \tzo zásobníka, takže sa zmení iba zásobník.\n"
+" \n"
+" Argumenty:\n"
+" +N\todstráni N-tú položku položku poÄítajúc zľava zoznamu,\n"
+" \tktorý zobrazuje „dirs“, poÄínajúc nulou. Napríklad: „popd +0“\n"
+" \todstráni prvý adresár, „popd +1“ druhý.\n"
+" \n"
+" -N\todstráni N-tú položku položku poÄítajúc sprava zoznamu,\n"
+" \tktorý zobrazuje „dirs“, poÄínajúc nulou. Napríklad: „popd -0“\n"
+" \todstráni posledný adresár, „popd -1“ predposledný.\n"
+" \n"
+" Zásobník adresárov môžete zobraziť vstavaným príkazom „dirs“."
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: neplatná špecifikácia expirácie (timeout)"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "chyba pri Äítaní: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+"návrat („return“) je možné vykonať iba z funkcie alebo skriptu vyvolaného "
+"pomocou „source“"
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "nie je možné zároveň zrušiť funkciu a premennú"
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: nie je možné zrušiť"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: nie je možné zruÅ¡iÅ¥: len na Äítanie %s"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: nie je premenná poľa"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: nie je funkcia"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "posun o"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr "nie je možné zároveň nastaviť aj zrušiť voľby shellu"
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: neplatný názov voľby shellu"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "vyžaduje sa argument názov súboru"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: súbor sa nepodarilo nájsť"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "nie je možné suspendovať"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "nie je možné suspendovať login shell"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "%s má alias „%s“\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s je kľúÄové slovo shellu\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s je funkcia\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "%s je vstavaný príkaz (builtin) shellu\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s je %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "%s je hašovaný (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s: neplatný argument limitu"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "„%c“: chybný príkaz"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: nie je možné zistiť limit: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr "obmedzenie"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: nie je možné zmeniť limit: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "osmiÄkové Äíslo"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "„%c“: neplatný operátor symbolického režimu"
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "„%c“: neplatný znak symbolického režimu"
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr " riadok "
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "posledný príkaz: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "Ruší sa..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "chyba neznámeho príkazu"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "chybný typ príkazu"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "chybný konektor"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "chybný skok"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: neviazaná premenná"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "Äas vyprÅ¡al pri Äakaní na vstup: automatické odhlásenie\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "nie je možné presmerovať štandardný vstup z /dev/null: %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "TIMEFORMAT: „%c“: neplatný formátovácí znak"
+
+#: execute_cmd.c:2075
+msgid "pipe error"
+msgstr "chyba rúry"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: obmedzené: nie jemožné uviesť „/“ v názvoch príkazov"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: príkaz nenájdený"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: chybný interpreter"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "nie je možné duplikovať fd %d na fd %d"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "bola prekroÄená úroveň rekurzie výrazu"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "podteÄenie zásobníka rekurzie"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "chyba syntaxe vo výraze"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "pokus o priradenie mimo premennej"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "delenie nulou"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "chyba: chybný expassign token"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "pre podmienený výraz sa oÄakáva „:“"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "exponent menší ako 0"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr "po pre-inkrementácii alebo pre-dekrementácii sa oÄakáva identifikátor"
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "chýba „)“"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "chyba syntaxe: oÄakáva sa operand"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "chyba syntaxe: neplatný aritmetický operátor"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s%s%s: %s (chybný token je „%sâ€)"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "neplatný aritmetický základ"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "hodnota je ako základ príliš veľká"
+
+#: expr.c:1329
+#, c-format
+msgid "%s: expression error\n"
+msgstr "%s: chyba výrazu\n"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getcwd: nie je možné pristupovaÅ¥ k rodiÄovským adresárom"
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "nie j emožné resetovať nodelay režim fd %d"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr "nie je možné alokovaÅ¥ nový popisovaÄ súboru pre vstup bashu z fd %d"
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "save_bash_input: bufer už existuje pre nový fd %d"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr "start_pipeline: pgrp rúra"
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr "pid %d získaný pomocou fork sa vyskytuje v bežiacej úlohe %d"
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "mažem zastavenú úlohu %d so skupinou procesu %ld"
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr "add_process: proces %5ld (%s) v the_pipeline"
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr "add_process: pid %5ld (%s) je stále oznaÄený ako živý"
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: %ld: taký pid neexistuje"
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr "Signál %d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Hotovo"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Zastavené"
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr "Zastavené(%s)"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "Beží"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Hotovo(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "UkonÄenie %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Neznámy stav"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(bol uložený výpis pamäte) "
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr " (wd: %s)"
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "setpgid detského procesu (%ld to %ld)"
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait: pid %ld nie je dieťa tohto shellu"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "wait_for: Neexistuje záznam o procese %ld"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job: úloha %d je zastavená"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: úloha skonÄila"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: úloha %d už je v pozadí"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, c-format
+msgid "%s: line %d: "
+msgstr "%s: riadok %d: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr " (bol uložený výpis pamäte)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(wd teraz: %s)\n"
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_job_control: funkcia getpgrp zlyhala"
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_job_control: riadkový systém"
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_job_control: setpgid"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr "nie je možné nastaviť skupinu procesu terminálu (%d)"
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "v tomto shelli nie je riadenie úloh"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc: zlyhal predpoklad: %s\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"malloc: %s:%d: zbabraný predpoklad\r\n"
+
+#: lib/malloc/malloc.c:313
+msgid "unknown"
+msgstr "neznámy"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr "malloc: blok na zozname voľných zaprataný"
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free: zavolaný s argumentom už uvoľneného bloku"
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free: zavolaný s argumentom nealokovaného bloku"
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr "free: bolo detekované podteÄenie; mh_nbytes mimo rozsahu"
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free: veľkosti zaÄiatoÄného a koneÄného bloku (chunk) sa líšia"
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc: zavolaný s argumentom nealokovaného bloku"
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr "realloc: bolo detekované podteÄenie; mh_nbytes mimo rozsahu"
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "realloc: veľkosti zaÄiatoÄného a koneÄného bloku (chunk) sa líšia"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr "register_alloc: alok. tabuľla je plná s FIND_ALLOC?\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr "register_alloc: %p už je v tabuľke ako alokovaný?\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "register_free: %p už je v tabuľke ako voľný?\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "neplatný základ"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: hostiteľ neznámy"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: neplatná služba"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: chybná špecifikácia sieťovej cesty"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "sieťové operácie nie sú podporované"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc: %s:%d: nie je možné alokovať %lu bajtov"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc: %s:%d: nie je možné alokovať %lu bajtov"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Máte poštu v súbore $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Máte novú poštu v súbore $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "PoÅ¡ta v súbore %s bola preÄítaná\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "chyba syntaxe: vyžaduje sa aritmetický výraz"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "chyba syntaxe: neoÄakávaná „;“"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "chyba syntaxe: „((%s))“"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: chybný typ inštrukcie %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+"here-document na riadku %d oddelený znakom konca riadku (oÄakávalo sa „%sâ€)"
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr "make_redirection: inštrukcia presmerovania „%d“ mimo rozsahu"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "neoÄakávaný koniec súboru poÄas hľadania zodpovedajúceho „%c“"
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "neoÄakávaný koniec súboru poÄas hľadania „]]“"
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "chyba syntaxe v podmieneÄnom príkaze: neoÄakávaný token „%s“"
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "chyba syntaxe v podmieneÄnom príkaze"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "neoÄakávaný token „%s“, oÄakávalo sa `)'"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "oÄakávalo sa `)'"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "neoÄakávaný argument „%s“ podmieneÄného unárneho operátora"
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "neoÄakávaný argument podmieneÄného unárneho operátora"
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "neoÄakávaný token „%s“, oÄakáva sa podmieneÄný binárny operátor"
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "oÄakáva sa podmieneÄný binárny operátor"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "neoÄakávaný argument „%s“ v podmieneÄnom binárnom operátore"
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "neoÄakávaný argument v podmieneÄnom binárnom operátore"
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "neoÄakávaný token „%c“ v podmieneÄnom príkaze"
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "neoÄakávaný token „%s“ v podmieneÄnom príkaze"
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "neoÄakávaný token %d v podmieneÄnom príkaze"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "chyba syntaxe neÄaleko neoÄakávaného tokenu „%s“"
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "chyba syntaxe neÄaleko „%s“"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "chyba syntaxe: neoÄakávaný koniec súboru"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "chyba syntaxe"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Na opustenie shellu použite „%s“.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "neoÄakávaný koniec súboru poÄas hľadania zodpovedajúceho „)“"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "dokonÄovanie: funkcia „%s“ nebola nájdená"
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr "progcomp_insert: %s: NULL COMPSPEC"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: chybný konektor `%d'"
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d: neplatný popisovaÄ súboru: %s"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "cprintf: „%c“: neplatný formátovací znak"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "popisovaÄ súboru mimo rozsahu"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: nejednoznaÄné presmerovanie"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: nie je možné prepísať existujúci súbor"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: ombedzené: nie je možné presmerovať výstup"
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "nie je možné vytvoriť odkladací súbor pre here-document: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: nie je možné priradiť zoznam položke poľa"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "/dev/(tcp|udp)/host/port nie je podporovaný bez podpory sietí"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "chyba presmerovania: nie je možné duplikovať fd"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "nenašiel sa /tmp, vytvorte ho prosím!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "/tmp musí byť platný názov adresára"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: neplatná voľba"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Nemám meno!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU bash, verzia %s-(%s)\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Použitie:\t%s [GNU dlhá voľba] [voľba] ...\n"
+"\t%s [GNU dlhá voľba] [voľba] súbor-skriptu ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "GNU dlhé voľby:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Voľby shellu:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD alebo -c príkaz alebo -O krátka_voľba\t\t(iba vyvolanie)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s alebo -o voľba\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"Napísaním „%s -c \"help set\"“ získate viac informácií o voľbách shellu.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"Napísaním „%s -c help“ získate viac informácií o vstavaných príkazoch "
+"(builtins) shellu.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "Na ohlasovanie chýb použite príkaz „bashbug“.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d: neplatná operácia"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Neplatný signál"
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Zavesenie"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Prerušenie"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "UkonÄenie"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Neplatná inštrukcia"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "BPT trace/trap"
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "inštrukcia ABORT"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "inštrukcia EMT"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Výnimka pri operácii s plávajúcou desatinnou Äiarkou"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "Zabitý"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "chyba zbernice"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Chyba segmentácie"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Chybné systémové volanie"
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "Prerušená rúra"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Budík"
+
+#: siglist.c:111
+msgid "Terminated"
+msgstr "UkonÄené"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "Naliehavý stav V/V"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Zastavené (signál)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "PokraÄovaÅ¥"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "Zastavenie alebo zabitie detského procesu"
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Zastavené (vstup z tty)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Zastavené (výstup na tty)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "V/V pripravený"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "obmedzenie CPU"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "obmedzenie súborov"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "Budík (virtuálny)"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "Budík (profil)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Okno sa zmenilo"
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr "Zámok záznamu"
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "Používateľský signál 1"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "Používateľský signál 2"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "Äaká sa na vstupné údaje HFT"
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "nastane výpadok napájania"
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "nastane havária systému"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "presunúť proces na iný CPU"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "chyba programovania"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "udelený režim monitoru HFT"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "stiahnutý režim monitoru HFT"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "dokonÄila sa zvuková sekvencia HFT"
+
+#: siglist.c:215
+msgid "Information request"
+msgstr "Žiadosť o informácie"
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Neznáme Äíslo signálu"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Neznámy signál #%d"
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "chybná substitúcia: chýba „%s“ v %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: nie je možné priradiť zoznam položke poľa"
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "nie je možné vytvoriť rúru pre substitúciu procesov"
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "nie je možné vytvoriť potomka pre substitúciu procesov"
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "nie je možné otvoriÅ¥ pomenovanú rúru %s na Äítanie"
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "nie je možné otvoriť pomenovanú rúru %s na zápis"
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "nie je možné duplikovať pomenovanú rúru %s ako fd %d"
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "nie je možné vytvoriť rúru pre substitúciu príkazov"
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr "nie je možné vytvoriť potomka pre substitúciu príkazov"
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "command_substitute: nie je možné duplikovať rúru ako fd 1"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: parameter je null alebo nenastavený"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: výraz podreťazca < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: chybná substitúcia"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: nie je možné vykonať priradenie takýmto spôsobom"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "chybná substitúcia: : v reÅ¥azci %s chýba uzatvárajúci „`â€"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "bez zhody: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "oÄakával sa argument"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: oÄakával sa celoÄíselný výraz"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "oÄakávala sa „)“"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "oÄakávala sa „)“, bolo nájdené %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: oÄakával sa unárny operátor"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: oÄakával sa binárny operátor"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "chýba „]“"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "neplatné Äíslo signálu"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps: chybná hodnota v trap_list[%d]: %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+"run_pending_traps: obsluha signálu je SIG_DFL, znovu posielam %d (%s) sebe"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: chybný signál %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "chyba pri importe definície funkcie „%s“"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "úroveň shellu (%d) je príliš vysoká, nastavujem späť na 1"
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr "make_local_variable: v aktuálnom rozsahu sa nenachádza kontext funkcie"
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr "all_local_variables: v aktuálnom rozsahu sa nenachádza kontext funkcie"
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: parameter je null alebo nenastavený"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "neplatný znak %d v exportstr %s"
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "žiadne „=“ v exportstr %s"
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr "pop_var_context: hlaviÄka shell_variables nie je kontext funkcie"
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr "pop_var_context: chýba kontext global_variables"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr "pop_scope: hlaviÄka shell_variables nie je doÄasný rozsah prostredia"
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: nie je možné otvoriť: %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d: neplatný popisovaÄ súboru: %s"
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Copyright (C) 2009 Free Software Foundation, Inc."
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Licencia GPLv3+: GNU GPL verzie 3 alebo novšia http://gnu.org/licenses/gpl."
+"html\n"
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU bash, verzia %s (%s)\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr "Toto je slobodný softvér; môžete ho slobodne meniť a šíriť.\n"
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+"Nie sú poskytované ŽIADNE ZÃRUKY v rozsahu aký povoľuje\n"
+"aplikovateľné právo.\n"
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Copyright (C) 2009 Free Software Foundation, Inc."
+
+#: version2.c:87
+#, fuzzy, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Licencia GPLv3+: GNU GPL verzie 3 alebo novšia http://gnu.org/licenses/gpl."
+"html\n"
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: nie je možné alokovať %lu bajtov (%lu bajtov alokovaných)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: nie je možné alokovať %lu bajtov"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+"xmalloc: %s:%d: nie je možné alokovať %lu bajtov (%lu bajtov alokovaných)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: %s:%d: nie je možné alokovať %lu bajtov"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [názov[=hodnota] ... ]"
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] názov [názov ...]"
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+"bind [-lpvsPVS] [-m kláv_mapa] [-f názov_súboru] [-q názov] [-u názov] [-r "
+"postup_kláv] [-x postup_kláv:príkaz_shellu] [postup_kláv:funkcia_readline "
+"alebo príkaz-readline]"
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [n]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [n]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [vstavaná funcia shellu [arg ...]]"
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr "caller [výraz]"
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-L|-P] [adresár]"
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr "pwd [-LP]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr "pravda"
+
+#: builtins.c:72
+msgid "false"
+msgstr "nepravda"
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] command [arg ...]"
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-aAfFilrtux] [-p] [názov[=hodnota] ...]"
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-aAfFilrtux] [-p] názov[=hodnota] ..."
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr "local [voľba] názov[=hodnota] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [arg ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [arg ...]"
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-a] [-dnps] [-f názov_súboru] [názov ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [arg ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts názov_reťazca_volieb [arg]"
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a názov] [príkaz [argumenty ...]] [presmerovanie ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [n]"
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr "logout [n]"
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+"fc [-e enázov] [-lnr] [prvý] [posledný] alebo fc -s [vzor=opak] [príkaz]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [špec_úlohy]"
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr "bg [špec_úlohy ...]"
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-lr] [-p cesta] [-dt] [názov ...]"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "help [-ds] [vzor ...]"
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [-d ofset] [n] alebo history -anrw [názov_súboru] alebo history "
+"-ps arg [arg...]"
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr "jobs [-lnprs] [špec_úlohy ...] alebo jobs -x príkaz [argumenty]"
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [-h] [-ar] [špec_úlohy ...]"
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s Å¡pec_signálu | -n Äíslo_signálu | -Å¡pec_signálu] pid | "
+"špec_úlohy ... alebo kill -l [špec_signálu]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let arg [arg ...]"
+
+#: builtins.c:136
+#, fuzzy
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+"read [-ers] [-a pole] [-d oddeľovaÄ] [-i text] [-n nznakov] [-p výzva] [-t "
+"zdržadnie] [-u fd] [názov ...]"
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o názov_voľby] [arg ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [názov ...]"
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-fn] [názov[=hodnota] ...] alebo export -p"
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-af] [názov[=hodnota] ...] alebo readonly -p"
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr "shift [n]"
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr "source názov_súboru [argumenty]"
+
+#: builtins.c:152
+msgid ". filename [arguments]"
+msgstr ". názov_súboru [argumenty]"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [výraz]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ arg... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "-krát"
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [-lp] [[arg] špec_signálu ...]"
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-afptP] názov [názov ...]"
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdefilmnpqrstuvx] [obmedzenie]"
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-p] [-S] [režim]"
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr "wait [id]"
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr "wait [pid]"
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for NAME [in SLOVÃ ... ] ; do PRÃKAZY; done"
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for (( výraz1; výraz2; výraz3 )); do PRÃKAZY; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select NÃZOV [in SLOVÃ ... ;] do PRÃKAZY; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr "time [-p] rúra"
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case SLOVO in [VZOR [| VZOR]...) PRÃKAZY ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if PRÃKAZY; then PRÃKAZY; [ elif PRÃKAZY; then PRÃKAZY; ]... [ else "
+"PRÃKAZY; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while PRÃKAZY; do PRÃKAZY; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until PRÃKAZY; do PRÃKAZY; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr "coproc [NÃZOV] príkaz [presmerovania]"
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr ""
+"function názov_funkcie { PRÃKAZY ; } alebo názov_funkcie () { PRÃKAZY ; }"
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr "{ PRÃKAZY ; }"
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr "špec_úlohy [&]"
+
+#: builtins.c:206
+msgid "(( expression ))"
+msgstr "(( výraz ))"
+
+#: builtins.c:208
+msgid "[[ expression ]]"
+msgstr "[[ výraz ]]"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr "premenné - Názvy a významy niektorých premenných shellu"
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [-n] [+N | -N | adr]"
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [-n] [+N | -N]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o] [názov_voľby ...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr "printf [-v var] formát [argumenty]"
+
+#: builtins.c:229
+#, fuzzy
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+"complete [-abcdefgjksuv] [-pr] [-o voľba] [-A operácia] [-G glob_vzor] [-W "
+"zoznam_slov] [-F funkcia] [-C príkaz] [-X vzor_filtra] [-P predpona] [-S "
+"prípona] [názov ...]"
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+"compgen [-abcdefgjksuv] [-o voľba] [-A operácia] [-G glob_vzor] [-W "
+"zoznam_slov] [-F funkcia] [-C príkaz] [-X vzor_filtra] [-P predpona] [-S "
+"prípona] [slovo]"
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "compopt [-o|+o voľba] [názov ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"mapfile [-n poÄet] [-O zaÄiatok] [-s poÄet] [-t] [-u fd] [-C spätné_volanie] "
+"[-c kvantum] [pole]"
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"readarray [-n poÄet] [-O zaÄiatok] [-s poÄet] [-t] [-u fd] [-C "
+"spätné_volanie] [-c kvantum] [pole]"
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"Definovať alebo zobraziť aliasy.\n"
+" \n"
+" Bez argumentov vypíše všetky definované aliasy vo formáte, ktorý je\n"
+" možné znova použiÅ¥ v tvare NÃZOV=HODNOTA na Å¡tandardný výstup.\n"
+" \n"
+" Inak definuje alias pre každý NÃZOV, ktorého HODNOTA je zadaná.\n"
+" Medzera na konci HODNOTY spôsobí, že sa v ÄalÅ¡om slove\n"
+" skontroluje substitúcia aliasu pri expanzii aliasu.\n"
+" \n"
+" Voľby:\n"
+" -p\tVypíše všetky definované aliasy vo formáte, ktorý je možné\n"
+" \tznova použiť\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti vždy pravdu ak nebol zadaný NÃZOV, pre ktorý nie je definovaný "
+"alias."
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"OdstrániÅ¥ NÃZVY zo zoznamu definovaných aliasov.\n"
+" \n"
+" Voľby:\n"
+" -a\todstráni všetky definície aliasov.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebol zadaný NÃZOV, pre ktorý nie je definovaný alias."
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+"Nastaviť klávesové väzby a premenné Readline.\n"
+" \n"
+" Naviaže sekvenciu klávesov na funkciu alebo makro Readline alebo\n"
+" nastaviť premennú Readline. Syntax argumentu je rovnaká ako tá\n"
+" v ~/.inputrc, ale musí sa podať ako jediný argument:\n"
+" bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Voľby:\n"
+" -m klávmap Použije „klávmap“ ako mapu klávesov poÄas trvania\n"
+" tohto príkazu. Prijateľné názvy klávesových máp sú\n"
+" emacs emacs-standard, emacs-meta, emacs-ctlx, vi,\n"
+" vi-move, vi-command a vi-insert.\n"
+" -l Vypíše názvy funkcií.\n"
+" -P Vypíše názvy funkcií a väzby.\n"
+" -p Vypíše názvy funkcií a väzby v tvare, ktorý je\n"
+" možné znova použiť ako vstup.\n"
+" -S Vypíše klávesové sekvencie, ktoré vyvolávajú makrá "
+"a\n"
+" ich hodnoty\n"
+" -s Vypíše klávesové sekvencie, ktoré vyvolávajú makrá "
+"a\n"
+" ich hodnoty\n"
+" v tvare, ktorý je možné znova použiť ako vstup.\n"
+" -V Vypíše názvy premenných a hodnoty\n"
+" -v Vypíše názvy premenných a hodnoty v tvare, ktorý "
+"je\n"
+" -q názov-funkcie Zistí, ktoré klávesy vyvolávajú túto funkciu.\n"
+" -u názov-funkcie Zruší väzby všetkých kláves naviazaných na túto "
+"funkciu\n"
+" možné znova použiť ako vstup.\n"
+" -r kláv_sek Odstráni väzbu pre kláv_sek.\n"
+" -f súboru NaÄíta klávesové väzby z SÚBORU.\n"
+" -x kláv_sek:príkaz_shellu\tSpôsobí vykonanie PRÃKAZU_SHELLU po\n"
+" \t\t\t\tzadaní KLÃV_SEK.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba."
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"UkonÄenie cyklu for, while alebo until.\n"
+" \n"
+" UkonÄiÅ¥ cyklus FOR, WHILE alebo UNTIL. Ak je zadané N, ukonÄiÅ¥ N\n"
+" nadradených vnorených cyklov.\n"
+" \n"
+" Návratová hodnota:\n"
+" Návratová hodnota je 0 ak N nie je väÄÅ¡ie alebo rovné 1."
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"PokraÄovaÅ¥ v cykle for, while alebo until\n"
+" \n"
+" PokraÄuje v nasledujúcej iterácii cyklu FOR, WHILE alebo UNTIL.\n"
+" Ak je uvedené N, pokraÄovaÅ¥ v ÄalÅ¡ej iterácii cyklu o N úrovní vyÅ¡Å¡ej.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak N nie je väÄÅ¡ie alebo rovné 1."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+"Vykonať vstavenú funkciu shellu.\n"
+" \n"
+" Vykoná vstavenú funkciu shellu s argumentami ARG bez vykonania\n"
+" vyhľadania príkazu. To sa hodí, keÄ chcete reimplementovaÅ¥ vstavanú\n"
+" funkciu shellu ako funkciu shellu, ale potrebujete vstavanú funkciu "
+"volať\n"
+" v rámci vašej funkcie.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vracia návratový kód vstavanej funkcie shellu alebo 0 ak argument nie "
+"je\n"
+" vstavaná funkcia shellu."
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+"Vrátiť kontext aktuálneho volania podprocedúry.\n"
+" \n"
+" Bez VÃR, vráti „$line $filename“. S VÃR,\n"
+" vráti „$line $subroutine $filename“; túto informáciu\n"
+" je možné využiť pre trasovanie zásobníka.\n"
+" \n"
+" Hodnota VÃR urÄuje o koľko rámcov volania sa vrátiÅ¥\n"
+" pred aktuálny; najvyšší rámec má Äíslo 0.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak shell nevykonáva funkciu shellu a EXPR nie je neplatný."
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+"Zmeniť aktuálny adresár.\n"
+" \n"
+" Zmení aktuálny adresár na ADR. Premenná $HOME je štandardný ADR.\n"
+" \n"
+" Premenná CDPATH definuje cesty, v ktorých sa hľadá adresár obsahujúci "
+"ADR.\n"
+" Alternatívne názvy adresárov v CDPATH sú oddelené dvojbodkou (:).\n"
+" Prázdny (null) názov adresára zodpovedá aktuálnemu adresáru, t.j. „.“.\n"
+" Ak ADR zaÄína lomkou (/), CDPATH sa nepoužije.\n"
+" \n"
+" Ak adresár nebol nájdený a je nastavená voľba shellu „cdable_vars“,\n"
+" predpokladá sa, že toto slovo je názov premennej.\n"
+" Ak táto premenná má hodnotu, vykoná cd na hodnotu premennej.\n"
+" \n"
+" Voľby:\n"
+" -L\tvynúti nasledovanie symbolických odkazov\n"
+" -P\tpoužije sa fyzická štruktúra adresárov a nie nasledovať\n"
+" \t\tsymbolické odkazy.\n"
+" \n"
+" Štandardne sa budú nasledovať symbolické odkazy ako keby bola\n"
+" zadaná voľba „-L“.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak bol aktuálny adresár zmenený, inak nenulovú hodnotu."
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+"Vypísať názov aktuálneho pracovného adresára.\n"
+" \n"
+" Voľby:\n"
+" -L\tvypísať hodnotu $PWD ak pomenúva aktuálny pracovný\n"
+" \tadresár\n"
+" -P\tvypísať fyzický adresár bez symbolických odkazov\n"
+" \n"
+" Štandardne sa „pwd“ správa ako keby bolo uvedené „-L“.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vracia 0 ak nie je zadaná neplatná voľba alebo nie je možné\n"
+" preÄítaÅ¥ aktuálny adresár."
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Prázdny príkaz.\n"
+" \n"
+" Bez úÄinku; príkaz niÄ nerobí.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vždy vráti pravda."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Vráti úspešný výsledok\n"
+" \n"
+" Návratová hodnota:\n"
+" Vždy vráti 0."
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+"Prázdny príkaz.\n"
+" \n"
+" Vráti neúspešný výsledok.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vždy vráti nepravda."
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+"Vykonať jednoduchý príkaz alebo zobraziť informácie o príkazoch.\n"
+" \n"
+" Spustí PRÃKAZ s ARG potlaÄiac vyhľadanie funkcie shellu alebo\n"
+" zobrazí informácie o uvedených PRÃKAZoch. Možno použiÅ¥ na\n"
+" vyvolanie externých príkazov ak existuje funkcia s rovnakým názvom.\n"
+" \n"
+" Voľby:\n"
+" -p\tpoužiÅ¥ Å¡tandardnú hodnotu PATH, ktorá zaruÄene nájde vÅ¡etky\n"
+" \t\tštandardné nástroje\n"
+" -v\tvypísaÅ¥ popis PRÃKAZu podobný zabudovanému príkazu „type“\n"
+" -v\tvypísaÅ¥ podrobnejší popis každého PRÃKAZu\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti návratovú hodnotu PRÃKAZu alebo zlyhá ak nenájde PRÃKAZ."
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Nastaviť hodnoty a atribúty premennných.\n"
+" \n"
+" Deklaruje premenné a ich atribúty. Ak nie sú zadané NÃZVY,\n"
+" zobrazí atribúty a hodnoty všetkých premenných.\n"
+" \n"
+" Voľby:\n"
+" -f\tobmedzí operáciu alebo výpis na názvy funkcií a definície\n"
+" -F\tobmedzí výpis iba na názvy funkcií (plus Äíslo riadka a\n"
+" \t\tzdrojový súbor pri ladení)\n"
+" -p\tzobrazí atribúty a hodnotu každého NÃZVU\n"
+" \n"
+" Voľby, ktoré nastavujú atribúty:\n"
+" -a\turobí z NÃZVU indexované polia (ak sú podporované)\n"
+" -A\turobí z NÃZVOV asociatívne polia (ak sú podporované)\n"
+" -i\tdá NÃZVU atribút „celé Äíslo“\n"
+" -l\tprevedie NÃZVY pri priradení na malé písmená\n"
+" -r\tnastaví NÃZVY iba na Äítanie\n"
+" -t\tdá NÃZVU atribút „trace“\n"
+" -u\tprevedie NÃZVY pri priradení na veľké písmená\n"
+" -x\tprevedie NÃZVY na export\n"
+" \n"
+" Pomocou „+“ namiesto „-“ vypnete uvedený atribút.\n"
+" \n"
+" Premenné s atribútom „celé Äíslo“ vykonávajú aritmetické vyhodnocovanie\n"
+" (pozri príkaz „let“), keÄ je im priradená hodnota.\n"
+" \n"
+" KeÄ sa „declare“ použije vo funkcii, NÃZVY budú lokálne ako pri príkaze\n"
+" „local“.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba."
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+"Nastaviť hodnoty a atribúty premenných.\n"
+" \n"
+" Zastaralé. Pozri „help declare“."
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+"Definovať lokálne premenné.\n"
+" \n"
+" Vytvorí lokálnu premennú s názvom NÃZOV a priradí jej HODNOTU.\n"
+" VOĽBA je ľubovoľná voľba, ktorú prijme „declare“\n"
+" \n"
+" Lokálne premenné možno použiť iba v rámci funkcie; sú viditeľné\n"
+" iba v rámci funkcie, kde sú definované a v jej potomkoch.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebola zadaná neplatná voľba, nevyskytla sa chyba a\n"
+" shell práve nevykonáva funkciu."
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Vypísať argumenty na štandardný výstup.\n"
+" \n"
+" Vypíše ARGumenty na Å¡tandardný výstup ukonÄené znakom\n"
+" nového riadka.\n"
+" Voľby:\n"
+" -n\tpotlaÄí znak nového riadka na konci.\n"
+" -e\tzapne interpretáciu nasledovných únikových klauzúl\n"
+" -E\tvypne interpretáciu nasledovných únikových klauzúl\n"
+" \n"
+" „echo“ interpretuje nasledovné únikové klauzuly:\n"
+" \t\\a\tvýstraha (zvonÄek)\n"
+" \t\\b\tbackspace\n"
+" \t\\c\tptlaÄiÅ¥ posledný znak nového riadka\n"
+" \t\\e\tescape znaku\n"
+" \t\\f\tform feed\n"
+" \t\\n\tnový riadok\n"
+" \t\\r\tnávrat vozíka\n"
+" \t\\t\thorizontálny tabulátor\n"
+" \t\\v\tvertikálny tabulátor\n"
+" \t\\\\\tspätná lomka\n"
+" \t\\0nnn\tznak s ASCII kódom NNN (osmiÄkový). NNN môže maÅ¥\n"
+" \t\t0 až 3 osmiÄkové Äíslice\n"
+" \\xHH\tosembitový znak, ktorého hodnota je HH (hexadecimálne).\n"
+" \tHH môže maÅ¥ jednu alebo dve hexadecimálne Äíslice.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak sa nevyskytla sa chyba pri zápise."
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Vypísať argumenty na štandardný výstup.\n"
+" \n"
+" Vypíše ARGumenty na Å¡tandardný výstup ukonÄené znakom\n"
+" nového riadka.\n"
+" Voľby:\n"
+" -n\tpotlaÄí znak nového riadka na konci.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak sa nevyskytla sa chyba pri zápise."
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+"Zapnúť a vypnúť vstavané funkcie shellu.\n"
+" \n"
+" Zapína a vypína vstavané funkcie shellu. Vypnutie vám umožní\n"
+" vykonať externý príkaz s rovnakým názvom ako vstavaná funkcia\n"
+" shellu bez toho, aby ste museli použiť úplnú cestu k nemu.\n"
+" \n"
+" Voľby:\n"
+" -a\tvypíše zoznam vstavaných funkcií a zobrazí pi každej\n"
+" \tÄi je zapnutá\n"
+" -n\tvypne každý NÃZOV alebo zobrazí zoznam vypnutých\n"
+" \tvstavaných funkcií\n"
+" -p\tvypíše zoznam vstavaných funkcií v tvare, ktorý je\n"
+" \tmožné znova použiť ako vstup\n"
+" -s\tvypísať iba názvy Posixových „špeciálnych“\n"
+" \tvstavaných funkcií\n"
+" \n"
+" Voľby riadiace dynamické naÄítanie:\n"
+" -f\tNaÄítaÅ¥ vstavanú funkciu NÃZOV zo zdieľaného objektu SÚBOR\n"
+" -d\todstrániÅ¥ vstavanú funkciu naÄítanú voľbou -f\n"
+" \n"
+" Bez volieb zapne každý NÃZOV.\n"
+" \n"
+" Ak chcete použiť „test“, ktorý sa nachádza v ceste $PATH namiesto\n"
+" vstavanej funkcie shellu, napíšte „enable -n test“.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak NÃZOV nie je vstavaná funkcia shellu a nevyskytla sa chyba."
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+"Vykonať argumenty ako príkaz shellu.\n"
+" \n"
+" Skombinovať ARGumenty do jediného reťazca a použiť výsledok\n"
+" ako vstup shellu a vykonať tieto príkazy.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti návratovú hodnotu príkazu alebo 0 ak je príkaz prázdny."
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+"Syntaktická analýza volieb.\n"
+" \n"
+" Getopts používajú procedúry shellu na analýzu poziÄných parametrov.\n"
+" \n"
+" OPTSTRING obsahuje písmená volieb, ktoré pozná; ak po písmene\n"
+" nasleduje dvojbodka, po voľbe sa oÄakáva argument, ktorý by mal\n"
+" od nej byÅ¥ oddelený netlaÄiteľným znakom (medzera).\n"
+" \n"
+" Po každom zavolaní getopts dá nasledujúcu voľbu do premennej\n"
+" shellu $name, ak name neexeistuje, tak ho inicializuje a index\n"
+" ÄalÅ¡ieho argumentu, ktorý sa má spracovaÅ¥, dá do premennej\n"
+" shellu OPTIND. OPTIND je inicializovaný na 1 po každom vyvolaní\n"
+" shellu alebo shell skriptu. KeÄ voľba vyžaduje argument, getopts\n"
+" dá tento argument do premennej shellu OPTARG.\n"
+" \n"
+" getopts oznamuje chyby jedným z dvoch spôsobov. Ak je prvý znak\n"
+" OPTSTRING dvojbodka, getopts použije tiché oznamovanie chýb. V\n"
+" Tomto režime sa nevypíšu žiadne chybové správy. Ak getopts vidí\n"
+" neplatnú voľbu, dá znak nájdenej voľby do OPTARG. Ak nenájde\n"
+" požadovaný argument, getopts dá do NAME „:“ a nastaví OPTARG\n"
+" na znak nájdenej voľby. Ak getopts nie je v tichom režime a vidí\n"
+" neplatnú voľbu, dá do NAME „?“ a zruší (unset) OPTARG. Ak nenájde\n"
+" požadovaný argument, getopts dá do NAME „?“, zruší (unset) OPTARG\n"
+" a vypíše diagnostickú správu.\n"
+" \n"
+" Ak premenná shellu OPTERR má hodnotu 0, getopts vypne vypisovanie\n"
+" chybových správ, aj ak prvý znak OPTSTRING nie je dvojbodka.\n"
+" OPTERR má štandardne hodnotu 1.\n"
+" \n"
+" Getopts normálne spracúva poziÄné parametre ($0 - $9), ale ak je\n"
+" zadaných viac argumentov, spracuje tieto.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak je voľba nájdená; zlyhá po dosiahnutí konca reťazca volieb\n"
+" alebo ak sa vyskytne chyba."
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+"Nahradiť shell zadaným príkazom.\n"
+" \n"
+" VykonaÅ¥ PRÃKAZ, priÄom sa nahradí tento shell urÄeným programom.\n"
+" ARGUMENTy dostane PRÃKAZ ako argumenty. Ak nie je zadaný PRÃKAZ,\n"
+" vÅ¡etky presmerovania sa uskutoÄnia v aktuálnom shelli.\n"
+" \n"
+" Voľby:\n"
+" -a názov\tpoÅ¡le NÃZOV ako nultý argument PRÃKAZU\n"
+" -c\tvykoná PRÃKAZ s prázdnym prostredím\n"
+" -l\tdá pomlÄku na nultý argument PRÃKAZu\n"
+" \n"
+" Ak príkaz nemožno vykonaÅ¥, neinteraktívny shell sa ukonÄí ak nie je\n"
+" nastavená voľba shellu „execfail“.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak sa nestane, že PRÃKAZ nebol nájdený a nevyskytne sa chyba\n"
+" presmerovania."
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"UkonÄiÅ¥ shell\n"
+" \n"
+" UkonÄí shell s návratovou hodnotou N. Ak sa N vynechá, návratová\n"
+" hodnota sa nastaví podľa stavu posledného vykonaného príkazu."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+"UkonÄiÅ¥ login shell.\n"
+" \n"
+" UkonÄí login shell s návratovou hodnotou N. Vráti chybu ak nie je\n"
+" spustený v login shelli."
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+"Zobraziť alebo vykonať príkazy z histórie.\n"
+" \n"
+" fc sa používa na vypísanie alebo úpravu a opätovné vykonanie príkazov.\n"
+" z histórie.\n"
+" PRVà a POSLEDNà môžu byÅ¥ Äísla udávajúce rozsah alebo PRVà môže byÅ¥\n"
+" reÅ¥azec, ktorý znamená najnedávnejší príkaz zaÄínajúci týmto reÅ¥azcom.\n"
+" \n"
+" -e ENAME zvolí editor, ktorý sa má použiť. Štandardne je to FCEDIT,\n"
+" \t\tpotom EDITOR, potom vi.\n"
+" \n"
+" -l znamená vypísať riadky namiesto úpravy.\n"
+" -n znamená nevypisovaÅ¥ Äísla riadkov.\n"
+" -r znamená obrátiť poradie riadkov (najnovšie budú vypísané prvé).\n"
+" \n"
+" S formátom „fc -s [pat=rep ...] [príkaz]“ sa znova vykoná uvedený\n"
+" príkaz po vykonaní náhrady OLD=NEW.\n"
+" \n"
+" UžitoÄný alias, ktorý sa dá s týmto použiÅ¥, je r='fc -s', takže "
+"napísaním\n"
+" „r cc“ spustíte posledný príkaz zaÄínajúci „cc“ a napísaním „r“ "
+"opätovne\n"
+" vykonáte posledný príkaz.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 alebo stav vykonaného príkazu; nenulovú hodnotu ak sa vyskytne\n"
+" chyba."
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"Presunúť úlohu do popredia.\n"
+" \n"
+" Umiestni JOB_SPEC do popredia a urobí ju aktuálnou úlohou. Ak JOB_SPEC\n"
+" nie je prítomná, použije sa aktuálna úloha shellu.\n"
+" \n"
+" Návratová hodnota:\n"
+" Stav príkazu umiestneného do popredia; nenulovú hodnotu ak sa vyskytne\n"
+" chyba."
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Presunúť úlohu do popredia.\n"
+" \n"
+" Umiestni každú JOB_SPEC do pozadia, ako keby bola spustená s „&“. Ak\n"
+" JOB_SPEC nie je prítomná, použije sa aktuálna úloha shellu.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nie je riadenie úloh vypnuté a nevyskytne sa chyba."
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+"Vyvolať alebo zobraziť umiestnenia programu.\n"
+" \n"
+" UrÄiÅ¥ a zapamätaÅ¥ si úplnú cestu ku každému PRÃKAZu. Ak nie sú\n"
+" uvedené žiadne argumenty, zobrazia sa informácie o zapamätaných\n"
+" príkazoch.\n"
+" \n"
+" Voľby:\n"
+" -d\tzabudnúť zapamätanné umiestnenia každého NÃZVU\n"
+" -l\tzobraziť vo formáte, ktoré je možné znova použiť ako \t"
+"\tvstup\n"
+" -p cesta\tpoužiÅ¥ CESTU ako plnú cestu k NÃZVU\n"
+" -r\tzabudnúť všetky zapamätané umiestnenia\n"
+" -t\tvypísaÅ¥ zapamätané umiestnenia každého NÃZVU, pred\n"
+" \tne vypísaÅ¥ zodpovedajúci NÃZOV ak sú zadané viaceré\n"
+" \tNÃZVY\n"
+" \n"
+" Argumenty:\n"
+" NÃZOV\tKaždý NÃZOV sa vyhľadá v $PATH a pridá\n"
+" \t\tsa do zoznnamu zapamätaných príkazov.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak sa nestalo, že NÃZOV nebol nájdený a nebola zadaná\n"
+" neplatná voľba."
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+"Zobraziť informácie o vstavaných príkazoch.\n"
+" \n"
+" Zobrazí struÄné zhrnutia vstavaných príkazov. Ak je zadaný VZOR,\n"
+" uvedie podrobnosti o všetkých príkazoch zodpovedajúcich VZORu,\n"
+" inak vypíše zoznam tém pomocníka.\n"
+" \n"
+" Voľby:\n"
+" -d\tvypíše krátky popis každej z tém\n"
+" -m\tvypíše použitie vo formáte podobnom manuálovej stránke\n"
+" -s\tvypíše iba krátku syntax použitia každej z tém zodpovedajúcich\n"
+" \tVZORu\n"
+" \n"
+" Argumenty:\n"
+" VZOR\tVzor urÄujúci tému pomocníka\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak sa nestalo, že VZOR nebol nájdený a nebola zadaná\n"
+" neplatná voľba."
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Zobraziť alebo zmeniť históriu.\n"
+" \n"
+" Zobrazí históriu s Äíslami riadkov. Riadky s „*“ boli zmenené.\n"
+" Argument N znamená zobraziť iba posledných N riadkov.\n"
+" \n"
+" Voľby:\n"
+" -c\tvyÄistenie histórie vymazaním vÅ¡etkých jej položiek.\n"
+" -d\tzmaže položku histórie na pozícii OFSET\n"
+" \n"
+" -a\tpridať riadky histórie z aktuálnej relácie do súbory s históriou.\n"
+" -n\tpreÄítaÅ¥ vÅ¡etky zatiaľ nepreÄítané riadky\n"
+" -r\tpreÄítaÅ¥ súbor a pridaÅ¥ jeho obsah do zoznamu histórie\n"
+" \tzo súboru histórie a pridať ich do zoznamu histórie.\n"
+" -w\tvypíše aktuálnu históriu do súboru histórie.\n"
+" \n"
+" -p\tvykoná expanziu histórie každého ARG a zobrazí výsledok\n"
+" \tbez toho aby ukladal Äokoľvek do histórie.\n"
+" -s\tpridá ARG, ktoré nie sú voľbami do histórie ako jednu položku.\n"
+" \n"
+" Ak je uvedený SÚBOR, použije sa ako súbor histórie, inak sa použije\n"
+" $HISTFILE ak má nastavenú hodnotu, inak ~/.bash_history.\n"
+" \n"
+" Ak je premenná $HISTTIMEFORMAT nastavená a neprázdna, jej hodnota\n"
+" sa použije ako formátovací reÅ¥azec strftime(3) na tlaÄ prísluÅ¡ných\n"
+" Äasových známok zobrazených pri každej položke histórie.\n"
+" V opaÄnom prípade sa nebudú tlaÄiÅ¥ Äasové známky.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba."
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+"Zobraziť stav úloh.\n"
+" \n"
+" Vypíše aktívne úlohy. JOBSPEC vypíše iba úlohu s daným JOBSPEC.\n"
+" Bez volieb sa vypíše stav všetkých aktívnych úloh.\n"
+" \n"
+" Voľby:\n"
+" -l\tvypíše okrem bežných informácií aj ID procesov\n"
+" -n\tvypíše iba procesy, ktorých stav sa zmenil od poslednej kontroly.\n"
+" -p\tvypíše iba ID procesov\n"
+" -r\tobmedzí výstup iba na bežiace úlohy\n"
+" -s\tobmedzí výstup iba na zastavené úlohy\n"
+" \n"
+" Ak je zadaná voľba „-x“ PRÃKAZ sa spustí po tom, ako každá\n"
+" zo špecifikácií úloh, ktoré sú uvedené v ARGS, boli nahradené\n"
+" ID procesu lídra skupiny procesov danej úlohy.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba.\n"
+" Ak je použitá voľba -x, vráti sa návratová hodnota PRÃKAZu."
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+"Odstrániť úlohy z aktuálneho shellu.\n"
+" \n"
+" Odstráni každý argument JOBSPEC z tabuľky aktívnych úloh. Bez uvedenia\n"
+" akýchkoľvek JOBSPEC, shell použije svoj pojem aktuálnej úlohy.\n"
+" \n"
+" Voľby:\n"
+" -a\todstráni všetky úlohy ak nie sú uvedené JOBSPEC\n"
+" -h\toznaÄí každú JOBSPEC tak, že sa jej nepoÅ¡le SIGHUP ak shell\n"
+" \t\tdostane SIGHUP\n"
+" -r\todstráni iba bežiace úlohy\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebola zadaná neplatná JOBSPEC."
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Poslať úlohe signál.\n"
+" \n"
+" Pošle procesom s uvedeným PID (alebo JOBSPEC) signál SIGSPEC. Ak\n"
+" nie je SIGSPEC uvedená, predpokladá sa SIGTERM.\n"
+" \n"
+" Voľby:\n"
+" -s sig\tSIG je názov signálu\n"
+" -n sig\tSIG je Äíslo signálu\n"
+" -l\tvypíše názvy signálov; ak sú argumenty uvedené po „-l“,\n"
+" \tpredpokladá sa, že sú to Äísla signálov ktorých názvy sa majú\n"
+" \tzobraziť.\n"
+" \n"
+" Kill je vstavaný (builtin) príkaz shellu z dvoch dôvodov: umožňuje\n"
+" použitie ID úlohy okrem ID procesu a ak dosiahnete limit procesov, \n"
+" ktoré môžete vytvoriÅ¥, nemusíte spúšťaÅ¥ proces na ukonÄenie iného.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba."
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+"Vyhodnotiť aritmetické výrazy.\n"
+" \n"
+" Každý ARG je aritmetický výraz, ktorý sa má vyhodnotiť. Vyhodnocuje\n"
+" sa v celých Äíslach bez kontroly preteÄenia, hoci delenie nulou sa\n"
+" detekuje a oznaÄí ako chyba. Nasledujúci zoznam operátorov je\n"
+" zoskupený do úrovní s rovnakou precedenciou operátorov.\n"
+" Úrovne sú v poradí so zvyšujúcou sa precedenciou.\n"
+" \n"
+" \tid++, id--\tpostinkrementácia premennej, postdekrementácia\n"
+" \t++id, --id--\tpreinkrementácia premennej, predekrementácia\n"
+" \t-, +\t\tunárne mínus, plus\n"
+" \t!, ~\t\tlogická negácia a negácia po bitoch\n"
+" \t**\t\tumocnenie\n"
+" \t*, /, %\t\tnásobenie, delenie, zvyšok po delení\n"
+" \t+, -\t\tsÄítanie, odÄítanie\n"
+" \t<<, >>\t\tposun doľava resp. doprava po bitoch\n"
+" \t<=, >=, <, >\tporovnanie\n"
+" \t==, !=\t\trovnosť, nerovnosť\n"
+" \t&\t\tA po bitoch\n"
+" \t^\t\tXOR po bitoch\n"
+" \t|\t\tALEBO po bitoch\n"
+" \t&&\t\tkonjunkcia\n"
+" \t||\t\talternatíva\n"
+" \tvýraz ? výraz : výraz\n"
+" \t\t\tpodmienený operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tpriradenie\n"
+" \n"
+" Premenné shellu sú prípustné ako oeprandy. Názov premennej sa\n"
+" v rámci výrazu nahradí jej hodotou (vyžiadanou ako celé Äíslo).\n"
+" Nie je nutné, aby bol celoÄíselný atribút premennej zapnutý,\n"
+" aby ju bolo možné použiť vo výraze.\n"
+" \n"
+" Operátory sa vyhodnocujú v pradí podľa precedencie. Sub-výrazy\n"
+" v zátvorkách sa vyhodnocujú ako prvé a majú prednosť pred\n"
+" hore uvedenými pravidlami precedencie.\n"
+" \n"
+" Návratová hodnota:\n"
+" Ak sa posledný ARG vyhodnotí na 0, let vráti 1; 0 inak sa vráti 0."
+
+#: builtins.c:966
+#, fuzzy
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+"NaÄítaÅ¥ riadok zo Å¡tandardného vstupu a rozdeliÅ¥ ho do polí.\n"
+" \n"
+" Zo Å¡tandardného vstupu (alebo z popisovaÄa FD ak je uvedená voľba -u)\n"
+" sa naÄíta jeden riadok. Riadok sa rozdelí do polí ako pri delení \n"
+" na slová a prvé slovo sa priradí prvému NÃZVU, druhé\n"
+" slovo druhému NÃZVU atÄ. až zvyÅ¡né slová sa priradia poslednému\n"
+" NÃZVU. Iba znaky, ktoré sa nachádzajú v $IFS sa považujú za\n"
+" oddeľovaÄe slov.\n"
+" \n"
+" Ak nie sú uvedené žiadne NÃZVY, naÄítaný riadok sa uloží do premennej\n"
+" REPLY.\n"
+" \n"
+" Voľby:\n"
+" -a pole\tvÅ¡etky naÄítané slová sa priradia postupne indexom poľa POLE, "
+"poÄínajúc nulou.\n"
+" -d\tpokraÄovanie Äítania až kým sa nevyskytne prvý znak znak DELIM\n"
+" namiesto znaku nového riadka.\n"
+" -e a shell je interaktívny, na naÄítanie riadka sa použije readline.\n"
+" -i text\tpoužije TEXT ako prvotný text pre Readline\n"
+" -n znakov\tÄítanie vstupu skonÄí po naÄítaní ZNAKOV znakov.\n"
+" -p\tvýzva\tpred pokusom o Äítanie vypíše reÅ¥azec VÃZVA bez koncového\n"
+" \tznaku nového riadka.\n"
+" -r\tzápis únikových klauzúl pomocou spätnej lomky je vypnutý.\n"
+" -s\tvstup naÄítaný z terminálu nebude vypisovaÅ¥ (echo).\n"
+" \n"
+" -t interval\tukonÄenie Äítania po vyprÅ¡aní Äasového INTERVALu a ak\n"
+" \tsa do intervalu nenaÄíta úplný riadok vstupu, vráti chybu. Ak je\n"
+" \tnastavená premenná TMOUT, jej hodnota je štandardný interval\n"
+" \texpirácie. TMOUT môže byť zlomok. Návratová hodnota je\n"
+" \tväÄÅ¡ia ako 128 aj sa prekroÄí INTERVAL.\n"
+" -u fd\tnamiesto Å¡tandardného vstupu ÄítaÅ¥ z popisovaÄa súboru FD.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak sa nenarazí pri Äítaní nakoniec súboru, nevyprší Äas na\n"
+" Äítanie a ako argument -u nebol je zadaný neplatný popisovaÄ."
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+"Návrat z funkcie shellu.\n"
+" \n"
+" Spôsobí ukonÄenie funkcie alebo skriptu vyvolaného pomocou source\n"
+" s návratovou hodnotou N. Ak sa N vynechá, návratovou hodnotu je\n"
+" návratová hodnota posledného vykonaného príkazu v tejto funkcii Äi\n"
+" skripte.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti N alebo zlyhá ak shell nevykonáva funkciu Äi skript."
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+"NastaviÅ¥ alebo zruÅ¡iÅ¥ nastavenie volieb shellu a poziÄných parametrov.\n"
+" \n"
+" Zmení hodnotu atribútov shellu a poziÄných parametrov alebo zobrazí\n"
+" názvy a hodnoty premenných shellu.\n"
+" \n"
+" Voľby:\n"
+" -a OznaÄí premenné, ktoré sú zmenené alebo vytvorené na export.\n"
+" -b Okamžite oznámi ukonÄenie úlohy.\n"
+" -e Okamžite sa ukonÄí, keÄ sa príkaz ukonÄí s nenulovou návratovou\n"
+" hodnotou.\n"
+" -f Vypnúť tvorbu názvov súborov (globbing).\n"
+" -h Pamätať si, kde sú umiestnené príkazy po ich vyhľadaní.\n"
+" -k Všetky argumenty priradenia sa odovzdávajú do prostredia\n"
+" príkazu, nie len tie, ktoré predchádzajú názvy príkazu.\n"
+" -m Riadenie úloh je zapnuté.\n"
+" -n NaÄítaÅ¥ príkazy, ale nevykonávaÅ¥ ich.\n"
+" -o názov-voľby\n"
+" Nastaví premennú zodpovedajúcu názvu-voľby:\n"
+" allexport rovnaké ako -a\n"
+" braceexpand rovnaké ako -B\n"
+" emacs použiť rozhranie na úpravu príkazového riadka\n"
+" v štýle emacs\n"
+" errexit rovnaké ako -e\n"
+" errtrace rovnaké ako -E\n"
+" functrace rovnaké ako -T\n"
+" hashall rovnaké ako -h\n"
+" histexpand rovnaké ako -H\n"
+" history zapnúť históriu príkazov\n"
+" ignoreeof shell sa neukonÄí po naÄítaní znaku EOF\n"
+" interactive-comments\n"
+" umožní výskyt komentárov v interaktívnych "
+"príkazoch\n"
+" keyword rovnaké ako -k\n"
+" monitor rovnaké ako -m\n"
+" noclobber rovnaké ako -C\n"
+" noexec rovnaké ako -n\n"
+" noglob rovnaké ako -f\n"
+" nolog momentálne sa prijme, ale ignoruje sa\n"
+" notify rovnaké ako -b\n"
+" nounset rovnaké ako -u\n"
+" onecmd rovnaké ako -t\n"
+" physical rovnaké ako -P\n"
+" pipefail návratová hodnota postupnosti rúr je hodnota\n"
+" posledného príkazu, ktorý skonÄil s nenulovou\n"
+" hodnotou, alebo nula ak žiadny príkaz nevrátil\n"
+" nenulovú hodnotu\n"
+" posix zmeniť správanie bash, kde sa štandardné "
+"správanie\n"
+" líši od štandardu 1003.2 tak, aby mu "
+"zodpovedalo\n"
+" privileged rovnaké ako -p\n"
+" verbose rovnaké ako -v\n"
+" vi použiť rozhranie na úpravu príkazového riadka\n"
+" v štýle vi\n"
+" xtrace rovnaké ako -x\n"
+" \n"
+" -p Zapnuté vždy, keÄ sa skutoÄné a úÄinné ID používateľa nezhoduje.\n"
+" Vypína spracúvanie súboru $ENV a importovanie funkcií shellu.\n"
+" Vypnutie tejto voľby spôsobí, že úÄinný UID a GID sa nastavia\n"
+" na skutoÄný UID a GID.\n"
+" -t UkonÄiÅ¥ po naÄítaní a vykonaní jedného príkazu.\n"
+" -u Považovať nenastavené premenné za chybu pri substitúcii.\n"
+" -v VypisovaÅ¥ vstupné riadky shellu postupne ako sa naÄítavajú.\n"
+" -x VypisovaÅ¥ príkazy a ich argumenty postupne ako sa naÄítavajú.\n"
+" -B Shell bude vykonávať expanziu zložených zátvoriek\n"
+" -C Ak je voľba nastavená, zamedzí prepísaniu existujúcich súborov\n"
+" persmerovaním výstupu.\n"
+" -E Ak je voľba nastavená, zachytenie ERR zdedia funkcie shellu.\n"
+" -H Zapne substitúciu príkazov z histórie pomocou znaku !. Tento\n"
+" prepínaÄ je Å¡tandardne zapnutý, keÄ je shell interaktívny.\n"
+" -P Ak je voľba nastavená, nenasledovať symbolické odkazy pri\n"
+" vykonávaní príkazov ako cd, ktoré menia aktuálny adresár.\n"
+" -T Ak je voľba nastavená, zachytenie DEBUG zdedia funkcie shellu.\n"
+" - OdovzdaÅ¥ vÅ¡etky zostávajúce argumenty poziÄným parametrom.\n"
+" Voľby -x a -v sú vypnuté.\n"
+" \n"
+" Použitie + namiesto - spôsobí vypnutie voľby. Voľby je tiež možné\n"
+" použiť pri vyvolaní shellu. Momentálne nastavené voľby možno nájsť v\n"
+" $-. Zostávajúcich n ARGumentov je poziÄných a priradia sa postupne\n"
+" premenným $1, $2, .. $n. Ak nie sú zadané žiadne ARGumenty, všetky\n"
+" premenné shellu sa vypíšu.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebola zadaná neplatná voľba."
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+"Zrušiť nastavenie hodnôt a atribútov premenných shellu a funkcií.\n"
+" \n"
+" Pre každý NÃZOV odstráni zodpovedajúcu premennú alebo funkciu.\n"
+" \n"
+" Voľby:\n"
+" -f\tpovažovaÅ¥ každý NÃZOV za funkciu shellu\n"
+" -v\tpovažovaÅ¥ každý NÃZOV za premennú shellu\n"
+" \n"
+" Bez uvedenia volieb sa unset najskôr pokúša zrušiť nastavenie\n"
+" premennej a ak sa mu to nepodarí, pokúsi sa zrušiť nastavenie\n"
+" funkcie.\n"
+" \n"
+" Nastavenie niektorých premenných nemožno zrušiť; pozri aj „readonly“.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak sa nestalo, že je NÃZOV iba na Äítanie a nebola zadaná\n"
+" neplatná voľba."
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Nastaviť atribút export premenným shellu.\n"
+" \n"
+" OznaÄí každý NÃZOV na automatický export do prostredia Äalších\n"
+" spúšťaných príkazov. Ak je zadaná HODNOTA, pred exportovaním priradí\n"
+" premenej HODNOTU.\n"
+" \n"
+" Voľby:\n"
+" -f\toznaÄuje funkcie shellu\n"
+" -n\todoberie z NÃZVU atribút export\n"
+" -p\tzobrazí zoznam exportovaných premenných a funkcií\n"
+" \n"
+" Argument „--“ vypína spracovanie Äalších volieb.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak sa nestalo, že je NÃZOV neplatný a nebola zadaná\n"
+" neplatná voľba."
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"OznaÄiÅ¥ premenné shellu ako nemeniteľné.\n"
+" \n"
+" OznaÄí každý NÃZOV ako len na Äítanie (atribút readonly); hodnoty "
+"týchto\n"
+" NÃZVOV nie je možné Äalej meniÅ¥ priradením. Ak je zadaná HODNOTA,\n"
+" pred oznaÄením ako readonly priradiÅ¥ premenej HODNOTU.\n"
+" \n"
+" Voľby:\n"
+" -a\todkazuje na premenné indexovaných polí\n"
+" -A\todkazuje na premenné asociatívnych polí\n"
+" -f\todkazuje na funkcie shellu\n"
+" -p\tzobrazí zoznam premenných a funkcií len na Äítanie\n"
+" \n"
+" Argument „--“ vypína spracovanie Äalších volieb.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak sa nestalo, že je NÃZOV neplatný a nebola zadaná\n"
+" neplatná voľba."
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+"Posunúť poziÄné parametre.\n"
+" \n"
+" PremenovaÅ¥ poziÄné parametre $N+1,$N+2 ... to $1,$2 ... Ak N nie je\n"
+" zadané, predpokladá sa N=1.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak sa nestalo, že je N záporné alebo väÄÅ¡ie ako $#."
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+"Vykonať príkazy zo súboru v aktuálnom shelli.\n"
+" \n"
+" NaÄítaÅ¥ a vykonaÅ¥ príkazy zo SÚBORu v aktuálnom shelli.\n"
+" Na nájdenie adresára obsahujúceho SÚBOR sa použijú cesty z $PATH.\n"
+" Ak sú zadané nejaké ARGUMENTY, použijú sa ako poziÄné argumenty\n"
+" pri vykonaní SÚBORu.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti návratovú hodnotu posledného príkazu v SÚBORe; zlyhá ak nie je\n"
+" možné SÚBOR naÄítaÅ¥."
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Pozastaviť vykonávanie shellu.\n"
+" \n"
+" Pozastaviť vykonávanie shellu pokým nedostane signál SIGCONT.\n"
+" Ak to nie je vynútené, login shell nie je možné pozastaviť.\n"
+" \n"
+" Voľby:\n"
+" -f\tvynútiť pozastavenie aj v prípade, že shell je login shell\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak sa nestalo, že je vypnuté riadenie úloh a nevyskytla sa chyba."
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+"Vyhodnotiť podmienený výraz.\n"
+" \n"
+" SkonÄí s návratovou hodnotou 0 (pravda) alebo 1 (nepravda)\n"
+" v závislosti na vyhodnotení VÃR. Výrazy môžu byÅ¥ unárne alebo\n"
+" binárne. Unárne výrazy sa Äasto používajú na vyhodnotenie stavu\n"
+" súboru. Existujú aj operátory pracujúce s reťazcami a na\n"
+" porovnávanie.\n"
+" \n"
+" Operátory súborov:\n"
+" \n"
+" -a SÚBOR Pravda ak súbor existuje.\n"
+" -b SÚBOR Pravda ak je súbor špeciálne blokové zariadenie.\n"
+" -c SÚBOR Pravda ak je súbor špeciálne znakové zariadenie.\n"
+" -d SÚBOR Pravda ak je súbor adresárom.\n"
+" -e SÚBOR Pravda ak súbor existuje.\n"
+" -f SÚBOR Pravda ak súbor existuje a je to obyÄajný súbor.\n"
+" -g SÚBOR Pravda ak je súbor set-group-id.\n"
+" -h SÚBOR Pravda ak je súbor symbolický odkaz.\n"
+" -L SÚBOR Pravda ak je súbor symbolický odkaz.\n"
+" -k SÚBOR Pravda ak má súbor nastavený „sticky“ bit.\n"
+" -p SÚBOR Pravda ak je súbor pomenovaná rúra.\n"
+" -r SÚBOR Pravda ak je pre vás súbor Äitateľný.\n"
+" -s SÚBOR Pravda ak súbor existuje a nie je prázdny.\n"
+" -S SÚBOR Pravda ak súbor socket.\n"
+" -t FD Pravda ak je deskriptor FD otvorený v termináli.\n"
+" -u SÚBOR Pravda ak je súbor set-user-id.\n"
+" -w SÚBOR Pravda ak je pre vás súbor zapisovateľný.\n"
+" -x SÚBOR Pravda ak je pre vás súbor vykonateľný.\n"
+" -O SÚBOR Pravda ak ste úÄinným vlastníkom súboru.\n"
+" -G SÚBOR Pravda ak je vaÅ¡a skupina úÄinným vlastníkom "
+"súboru.\n"
+" -N SÚBOR Pravda ak bol súbor od posledného Äítania zmenený.\n"
+" \n"
+" SÚBOR1 -nt SÚBOR2 Pravda ak je SÚBOR1 novší ako SÚBOR2 (podľa\n"
+" dátumu poslednej zmeny).\n"
+" \n"
+" SÚBOR1 -ot SÚBOR2 Pravda ak je SÚBOR1 starší ako SÚBOR2.\n"
+" \n"
+" SÚBOR1 -ef SÚBOR2 Pravda ak je SÚBOR1 pevným odkazom na SÚBOR2.\n"
+" \n"
+" Operátory reťazcov:\n"
+" \n"
+" -z REŤAZEC Pravda ak je reťazec prázdny.\n"
+" \n"
+" -n REŤAZEC\n"
+" REŤAZEC Pravda ak je reťazec neprázdny\n"
+" \n"
+" REŤAZEC1 = REŤAZEC2\n"
+" Pravda ak sa reťazce rovnajú.\n"
+" REŤAZEC1 != REŤAZEC2\n"
+" Pravda ak sa reťazce nerovnajú.\n"
+" REŤAZEC1 < REŤAZEC2\n"
+" Pravda ak je REŤAZEC1 pre REŤAZCOM2 v lexikografickom "
+"poradí.\n"
+" REŤAZEC1 > REŤAZEC2\n"
+" Pravda ak je REŤAZEC1 po REŤAZCI2 v lexikografickom "
+"poradí.\n"
+" \n"
+" Iné operátory:\n"
+" \n"
+" -o VOĽBA Pravda ak je VOĽBA shellu zapnutá.\n"
+" ! VÃR Pravda ak je VÃR nepravdivý.\n"
+" VÃR1 -a VÃR2 Pavda ak sú oba VÃR1 aj VÃR2 pravdivé.\n"
+" VÃR1 -o VÃR2 Pavda ak je aspoň jeden z VÃR1 a VÃR2 pravdivý.\n"
+" \n"
+" arg1 OP arg2 Aritmetické testy. OP je jeden z -eq, -ne,\n"
+" -lt, -le, -gt alebo -ge.\n"
+" \n"
+" Aritmetické binárne operátory vracajú pravdu, keÄ sa ARG1 rovná,\n"
+" nerovná, je menší, menší alebo rovný, väÄší, väÄší alebo rovný ako\n"
+" ARG2.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak VÃR vyhodnotí ako pravdivý; zlyhá ako sa VÃR vyhodnotí\n"
+" ako nepravdivý alebo je zadaný neplatný argument."
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"Vyhodnotiť podmienený výraz.\n"
+" \n"
+" Toto je synonymum vsatavanej funkcie „test“, ale posledný\n"
+" argument musí byť literál „]“, ktorý uzatvára otvárajúcu „[“."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"ZobraziÅ¥ Äasy procesov\n"
+" \n"
+" Vypíše súhrnné používateľské a systmové Äasy shellu a vÅ¡etkých jeho\n"
+" potomkov.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vždy vráti 0."
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+"Zachytiť signály a iné udalosti.\n"
+" \n"
+" Definuje a aktivuje spustenie obsluhy udalosti, keÄ shell dostane "
+"signál SIGNAL_SPEC alebo iných podmienok.\n"
+" \n"
+" Príkaz ARG sa naÄíta a vykoná, keÄ shell dostane signál(y) SIGNAL_SPEC.\n"
+" Ak ARG chýba (a je uvedený jediný SIGNAL_SPEC) alebo je „-“,\n"
+" každý uvedený signál sa obnoví na pôvodnú hodnotu. Ak je ARG\n"
+" prázdny režazec, každý SIGNAL_SPEC shell a príkaz, ktorý vyvolá,\n"
+" ignoruje.\n"
+" \n"
+" Ak SIGNAL_SPEC je EXIT (0), príkaz ARG sa vykoná pri\n"
+" ukonÄení shellu. Ak je SIGNAL_SPEC DEBUG, ARG sa vykoná po každom\n"
+" jednom príkaze.\n"
+" \n"
+" Ak nie sú uvedené žiadne argumenty, trap vypíše zoznam príkazov\n"
+" asociovaných s každým signálom.\n"
+" \n"
+" Voľby:\n"
+" -l\tvypíše zoznam názvov signálov a ich zodpovedajúce Äísla\n"
+" -p\tzobrazia sa príkazy trap asociované s každým SIGNAL_SPEC\n"
+" \n"
+" Každý SIGNAL_SPEC je buÄ názov signálu ako v <signal.h> alebo Äíslo\n"
+" signálu. V názvoch signálov sa nerozlišuje veľkosť písmen a predpona\n"
+" SIG je nepovinná. Signál je možné shellu poslať príkazom „kill -signal $"
+"$“.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak sa nestalo, že je SIGSPEC neplatný a nebola zadaná\n"
+" neplatná voľba."
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+"Zobraziť informácie o type príkazu.\n"
+" \n"
+" Pre každý NÃZOV vypíše ako by sa interpretoval keby bol použitý\n"
+" ako názov príkazu.\n"
+" \n"
+" Voľby:\n"
+" -a\tzobrazí všetky umiestnenia, ktoré obsahujú spustiteľný súbor\n"
+" \ts názvom NÃZOV; vrátane aliasov, vstavaných funkcií a funkcií\n"
+" \tak a iba ak nebola použitá voľba „-p“\n"
+" -f\tpotlaÄiÅ¥ hľadanie vo funkciách shellu\n"
+" -P\tvynútiÅ¥ pri každom NÃZVE vyhľadanie v CESTE, aj ak je to alias,\n"
+" \tvstavaná funkcia alebo funkcia a vráti názov súboru na disku,\n"
+" \tktorý by sa spustil\n"
+" -p\tvráti buÄ názov súboru na disku, ktorý by sa spustil, alebo niÄ\n"
+" \tak by „type -t NAME“ nevrátilo „file“.\n"
+" -t\tvypísať jediné slovo, jedno zo slov „alias“, „keyword“,\n"
+" \t„function“, „builtin“, „file“ alebo „“, ak je názov alias,\n"
+" \tvyhradené slovo shellu, funkcia shellu, vstavaná funkcia shellu,\n"
+" \tsúbor na disku alebo NÃZOV nebol nájdený\n"
+" \n"
+" Argumenty:\n"
+" NÃZOV\tNázov príkazu, ktorý sa má interpretovaÅ¥.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak boli nájdené vÅ¡etky NÃZVY; zlyhá ak nie."
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Zmeniť obmedzenia prostriedkov shellu.\n"
+" \n"
+" Poskytuje kontrolu nad prostriedkami dostupnými procesu,\n"
+" ktorý spustil shell na systémoch, ktoré takúto kontrolu umožňujú.\n"
+" Ak sú zadané voľby, vyhodnocujú sa nasledovne:\n"
+" \n"
+" -S\tpoužiť „mäkký“ limit prostriedkov\n"
+" -H\tpoužiť „tvrdý“ limit prostriedkov\n"
+" -a\toznámi všetky aktuálne limity\n"
+" -c\tmaximálna veľkosť vytvorených core súborov\n"
+" -d\tmaximálna veľkosť dátového segmentu procesu\n"
+" -e\tmaximálna priorita plánovania („nice“)\n"
+" -f\tmaximálna veľkosť súborov, ktoré zapíše shell a jeho potomkovia\n"
+" -i\tmaximálny poÄet Äakajúcich signálov\n"
+" -l\tmaximálna veľkosť pamäte, ktorú môže proces uzamknúť\n"
+" -m\tmaximálna veľkosť pracovnej množiny\n"
+" -n\tmaximálny poÄet otvorených popisovaÄov súborov\n"
+" -p\tveľkosť bufera rúry\n"
+" -q\tmaximálny poÄet bajtov v POSIX frontoch správ\n"
+" -r\tmaximálna priorita plánovania v reálnom Äase\n"
+" -s\tmaximálna veľkosť zásobníka\n"
+" -t\tmaximálne množstvo Äasu CPU v sekundách\n"
+" -u\tmaximálny poÄet používateľských procesov\n"
+" -v\tveľkosť virtuálnej pamäte\n"
+" -x\tmaximálny poÄet zámkov súborov\n"
+" \n"
+" Ak je zadaný LIMIT, je to nová hodnota zadaného prostriedku;\n"
+" špeciálne hodnoty LIMIT sú „soft“, „hard“ a „unlimited“, ktoré\n"
+" znamenajú aktuálny mäkký limit, aktuálny tvrdý limit resp. žiadny "
+"limit.\n"
+" Inak sa vypíše aktuálna hodnota zadaného prostriedku.\n"
+" Ak nie je zadaná žiada voľba, predpokladá sa -f.\n"
+" \n"
+" Hodnoty sú v násobkoch 1024 bajtov okrem -t, ktorý je v sekundách,\n"
+" -p, ktorý je v násobkoch 512 bajtov a -u, Äo znamená neobmedzený\n"
+" poÄet procesov.\n"
+" \n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba."
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+"Zobraziť alebo nastaviť masku režimu súboru.\n"
+" \n"
+" Nastaví masku súborov vytvorených používateľom na REŽIM. Ak sa\n"
+" REŽIM vynechá, vypíše aktuálnu hodnotu masky.\n"
+" \n"
+" Ak REŽIM zaÄína bodkou, interpretuje sa ako osmiÄkové Äíslo;\n"
+" inak je to symbolické oznaÄenie režimu aké prijíma chmod(1).\n"
+" \n"
+" Voľby:\n"
+" -p\tak sa REŽIM vynechá, vypíše výstup v tvare, ktorý je možné\n"
+" \tpoužiť ako vstup\n"
+" -S\tvýpis v symbolickom tvare; inak osmiÄkové Äíslo\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak sa nestalo, že je REŽIM neplatný a nebola zadaná\n"
+" neplatná voľba."
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"ÄŒakaÅ¥ na dokonÄenie úlohy a vrátiÅ¥ návratovú hodnotu.\n"
+" \n"
+" PoÄká na proces s identifikátorom ID, Äo môže byÅ¥ PID alebo "
+"špecifikácia\n"
+" úlohy a oznámi stav jeho ukonÄenia. Ak nie je ID zadaný, poÄká na "
+"všetky\n"
+" momentálne aktívne detské procesy vo fronte úloh.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti stav ID; zlyhá ak je ID neplatný alebo bola zadaná\n"
+" neplatná voľba."
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"ÄŒakaÅ¥ na ukonÄenie zadaného procesu a vypísaÅ¥ jeho návratovú hodnotu.\n"
+" \n"
+" ÄŒaká na ukonÄenie zadaného procesu a oznámi jeho návratovú\n"
+" hodnotu. Ak nie je PID zadané, Äaká sa na vÅ¡etky momentálne\n"
+" aktívne procesy potomkov a návratová hodnota je nula.\n"
+" PID musí byť ID procesu.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti stav ID; zlyhá ak je ID neplatný alebo bola zadaná neplatná\n"
+" voľba."
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Vykoná množinu príkazov pre každú položku zoznamu.\n"
+" \n"
+" Cyklus „for“ vykonáva postupnosť príkazov pre každú položku v zozname.\n"
+" Ak nie je prítomné „in SLOVà ...;“, potom sa predpokladá „in \"$@\"“.\n"
+" Pre každý prvok v SLOVÃch sa NÃZOV nastaví na hodnotu položky a\n"
+" vykonajú sa PRÃKAZY.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti návratovú hodnotu posledného vykonaného príkazu."
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Aritmetický cyklus for.\n"
+" \n"
+" Ekvivalent\n"
+" \t(( VÃR1 ))\n"
+" \twhile (( VÃR2 )); do\n"
+" \t\tPRÃKAZY\n"
+" \t\t(( VÃR3 ))\n"
+" \tdone\n"
+" VÃR1, VÃR2 a VÃR3 sú aritmetické výrazy. Ak sa vykoná ktorýkoľvek\n"
+" výraz, chovanie je ako by sa vyhodnotil na 1.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti návratovú hodnotu posledného vykonaného príkazu."
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Vybrať slová zo zoznamu a vykonať príkazy.\n"
+" \n"
+" SLOVà sa rozbalia, Äím sa vytvorí zoznam slov. Zoznam slov sa\n"
+" vypíše na Å¡tandardný chybový výstup, pred každým z nich Äíslo.\n"
+" Ak nie je prítomné „in SLOVÓ, použije sa „in \"$@\"“. Zobrazí sa\n"
+" výzva PS3 a naÄíta sa riadok zo Å¡tandardného vstupu. Ak riadok\n"
+" pozostáva z Äísla zodpovedajúcemu jednému zo zobrazených slov,\n"
+" NÃZOV sa nastaví na dané slovo. Ak je riadok prázdny, SLOVà a\n"
+" výzva sa znova zobrazia. Po naÄítaní znaku konca súboru príkaz\n"
+" konÄí. NaÄítanie akejkoľvek inej hodnoty spôsobí nastavenie NÃZVU\n"
+" na NULL. NaÄítaný riadok sa uloží do premennej ODPOVEÄŽ. PRÃKAZY\n"
+" sa vykonajú po každom výbere až kým sa nevykoná príkaz break.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti návratovú hodnotu posledného vykonaného príkazu."
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+"OznámiÅ¥ Äas využitý vykonávaním rúry.\n"
+" \n"
+" VykonaÅ¥ RÚRU a po jej skonÄení vypísaÅ¥ zhrnutie skutoÄného Äasu,\n"
+" Äasu CPU a systémového Äasu CPU stráveného vykonaním RÚRY.\n"
+" \n"
+" Voľby:\n"
+" -p\tvypíše zhrnutie Äasov v prenosnom formáte Posix.\n"
+" \n"
+" Na formátovanie výstupu sa použije hodnota premennej TIMEFORMAT.\n"
+" \n"
+" Návratová hodnota:\n"
+" Návratová hodnota je návratová hodnota RÚRY."
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Vykonať príkazy na základe porovnávania vzorov\n"
+" \n"
+" Selektívne vykonávaÅ¥ PRÃKAZY na základe toho, Äi SLOVO zodpovedá\n"
+" VZORu.. „|“ sa použije na oddelenie viacerých vzorov.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti návratovú hodnotu posledného vykonaného príkazu."
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Vykonať príkazy na základe podmienky.\n"
+" \n"
+" Vykoná sa zoznam „if PRÃKAZY“. Ak je jeho návratová hodnota nula, "
+"vykoná\n"
+" sa zoznam „then PRÃKAZY“. Inak sa postupne vykoná každý zoznam\n"
+" „elif PRÃKAZY“ a ak je jeho návratová hodnota nula, vykoná sa "
+"zodpovedajúci\n"
+" zoznam „then PRÃKAZY“ a príkaz if skonÄí. Inak sa vykoná „else "
+"PRÃKAZY“,\n"
+" ak je prítomný. Návratová hodnota celej konštrukcie je návratová "
+"hodnota\n"
+" posledného vykonaného príkazu alebo nula ak sa žiadna podmienka\n"
+" nevyhodnotila na pravdu.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti návratovú hodnotu posledného vykonaného príkazu."
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Vykonávať príkazy kým podmienka platí.\n"
+" \n"
+" RozbaliÅ¥ a vykonávaÅ¥ PRÃKAZY pokým posledný príkaz medzi PRÃKAZMI\n"
+" „while“ nemá návratovú hodnotu nula.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti návratovú hodnotu posledného vykonaného príkazu."
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Vykonávať príkazy kým podmienka neplatí.\n"
+" \n"
+" RozbaliÅ¥ a vykonávaÅ¥ PRÃKAZY pokým posledný príkaz medzi PRÃKAZMI\n"
+" „until“ nemá nenulovú návratovú hodnotu.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti návratovú hodnotu posledného vykonaného príkazu."
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+"VytvoriÅ¥ koproces s názvom NÃZOV.\n"
+" \n"
+" Vykoná PRÃKAZ asynchrónne, priÄom Å¡tandardný výstup a vstup príkazu\n"
+" spojí rúrou s popsiovaÄmi súborov priradeným indexom poľa 0 a 1\n"
+" premennej poľa NÃZOV v spúštajúcom shelli.\n"
+" Å tandardný NÃZOV je „COPROC“.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti návratovú hodnotu PRÃKAZu."
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+"Definovať funkciu shellu.\n"
+" \n"
+" Vytvorí funkciu shellu NÃZOV. KeÄ sa spustí ako jednoduchý príkaz, "
+"NÃZOV\n"
+" spustí PRÃKAZy v kontexte vulajúceho shellu. KeÄ sa spustí v tvare "
+"NÃZOV,\n"
+" argumenty sa odovzdajú funkcii ako $1...$n a názov funkcie je "
+"$FUNCNAME.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak sa nestalo, že je NÃZOV iba na Äítanie."
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Zoskupiť príkazy do jednotky.\n"
+" \n"
+" Spustiť množinu príkazov v skupine. Toto je jeden zo spôsobov ako\n"
+" presmerovať celú možinu príkazov.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti návratovú hodnotu posledného vykonaného príkazu."
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+"Vyhodnotiť podmienený výraz.\n"
+" \n"
+" Ekvivalentné argumentu JOB_SPEC príkazu „fg“ Obnoví beh\n"
+" zastavenej úlohy alebo úlohyu bežiacej v pozadí. JOB_SPEC môže\n"
+" urÄiÅ¥ buÄ názov alebo Äíslo úlohy. Ak po JOB_SPEC nasleduje „&“, úloha\n"
+" sa umiestni do pozadia, ako keby bola špecifikácia úlohy zadaná ako\n"
+" argument príkazu „bg“.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti návratovú hodnotu obnovenej úlohy."
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+"Vyhodnotiť aritmetický výraz.\n"
+" \n"
+" VÃRAZ sa vyhodnotí podľa pravidiel aritmetického vyhodnocovania.\n"
+" Ekvivalentné s „let VÃRAZ“.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 1 ak sa VÃRAZ vyhodnotí na 0; inak vráti 0."
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+"Vykonať podmienený výraz.\n"
+" \n"
+" Vráti 0 alebo 1 v závislosti na vyhodnotení výrazu podmienky VÃRAZ.\n"
+" Výrazy sa skladajú z rovnakých zložiek ako pri vstavanom príkaze\n"
+" „test“ a je možné ich kombinovať pomocou nasledovných operátorov\n"
+" \n"
+" \t( VÃRAZ )\tVracia hodnoru výrazu VÃRAZ\n"
+" \t! VÃRAZ\tPravdivý, ak je VÃRAZ nepravdivý; inak pravdivý\n"
+" \tVÃR1 && VÃR2\tPravdivý ak je VÃR1 a zároveň VÃR2 pravdivý; inak "
+"nepravdivý\n"
+" \tVÃR1 || VÃR2\tPravdivý ak je VÃR1 alebo VÃR2 pravdivý; inak "
+"nepravdivý\n"
+" \n"
+" Ak sú použité operátory „==“ a „!=“, reťazec napravo od operátora\n"
+" sa použije ako vzor a vykoná sa hľadanie zhody reťazcov. Operátory\n"
+" && a || nevyhodnocujú VÃR2 ak hodnota VÃR1 postaÄuje na urÄenie\n"
+" hodnoty výrazu.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 alebo 1 v závislosti na hodnote VÃRAZu."
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+"Bežné názvy premenných shellu a ich použitie\n"
+" \n"
+" BASH_VERSION\tInformácie o verzii tohto Bash.\n"
+" CDPATH\tBodkoÄiarkami oddelený zoznam adresárov, v ktorých sa budú\n"
+" \t\thľadať adresáre dané ako argument príkazu „cd“.\n"
+" GLOBIGNORE\tBodkoÄiarkami oddelený zoznam vzorov popisujúcich názvy\n"
+" \t\tsúborov, ktoré má expanzia názvov ciest ignorovať.\n"
+" HISTFILE\tNázov súboru, kde je uložená vaša história príkazov.\n"
+" HISTFILESIZE\tMaximálny poÄet riadkov, ktorý môže obsahovaÅ¥.\n"
+" HISTSIZE\tMaximálny poÄet riadkov, su ktorým môže pristupovaÅ¥\n"
+" \t\tbežiaci shell.\n"
+" HOME\tÚplná cesta k vášmu prihlasovaciemu adresáru.\n"
+" HOSTNAME\tNázov stroja, na ktorom sa momentálne nachádzate.\n"
+" HOSTTYPE\tTyp procesora, na ktorom beží táto verzia Bash.\n"
+" IGNOREEOF\tRiadi ÄinnosÅ¥ shellu po prijatí znaku EOF ako\n"
+" \t\tjediného na vstupe. Ak je voľba nastavená, jej hodnota je\n"
+" \t\tpoÄet znakov EOF, ktoré budú za sebou prijaté na prázdnom\n"
+" \t\triadku predtým, než sa shell ukonÄí (Å¡tandardne 10). Ak voľba\n"
+" \t\tNie je nastavená, EOF znaÄí koniec vstupu.\n"
+" MACHTYPE\tReťazec popisujúci systém, na ktorom Bash práve beží.\n"
+" MAILCHECK\tAko Äasto v sekundách Bash kontroluje novú poÅ¡tu.\n"
+" MAILPATH\tBodkoÄiarkami oddelený zoznam názvov súborov,\n"
+" \t\tv ktorých Bash kontroluje novú poštu.\n"
+" OSTYPE\tVerzia Unixu na ktorej tento Bash beží.\n"
+" PATH\tBodkoÄiarkami oddelený zoznam adresárov, v ktorých sa\n"
+" \t\tmajú hľadať príkazy.\n"
+" PROMPT_COMMAND\tPríkaz, ktorý sa má vykonať pred každým\n"
+" \t\tvypísaním primárnej výzvy.\n"
+" PS1\t\tReťazec primárnej výzvy.\n"
+" PS2\t\tReťazec sekundárnej výzvy.\n"
+" PWD\t\tPlná cesta k aktuálnemu adresáru.\n"
+" SHELLOPTS\tBodkoÄiarkami oddelený zoznam zapnutých volieb shellu.\n"
+" TERM\tNázov aktuálneho typu terminálu.\n"
+" TIMEFORMAT\tFormát výstupu štatistiky doby behu, ktorú zobrazuje\n"
+" \t\tvyhradené slovo „time“.\n"
+" auto_resume\tNenulová hodnota znaÄí príkaz, ktorý keÄ sa vyskytuje na\n"
+" \t\tsamostatnom riadku, vyhľadá sa v zozname momentálne\n"
+" \t\tzastavených úloh. Ak sa je tam nachádza, úloha sa prenesie do\n"
+" \t\tpopredia. Hodnota „exact“ znamená, že slovo príkazu sa musí\n"
+" \t\tpresne zhodovať s príkazom v zozname zastavených úloh.\n"
+" \t\tHodnota „substring“ znamená, že slovo príkazu sa musí zhodovať s\n"
+" \t\tpodreťazcom úlohy. Akákoľvek iná hodnota znamená, že\n"
+" \t\tpríkaz musí byť predponou zastavenej úlohy.\n"
+" histchars\tZnaky riadiace dopĺňanie histórie a rýchle\n"
+" \t\tnahrádzanie. prvý znak je znak nahrádzania z\n"
+" \t\thistórie, zvyÄajne „!“. Druhý je znak „rýchleho\n"
+" \t\tnahrádzania“, zvyÄajne „^“. Tretí je znak\n"
+" \t\t„komentára histórie“, zvyÄajne „#“.\n"
+" HISTIGNORE\tBodkoÄiarkami oddelený zoznam vzoriek, ktoré\n"
+" \t\tsa používajú na rozhodovanie, Äi sa príkaz uloží do histórie.\n"
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Pridať adresár na zásobník.\n"
+" \n"
+" Pridá adresár na vrchol zásobníka adresárov alebo ho otoÄí tak, že\n"
+" nový vrchol zásobníka sa stane aktuálnym pracovným adresárom.\n"
+" Bez argumentov vymení vrchné dva adresáre.\n"
+" \n"
+" Voľby:\n"
+" -n\tpotlaÄí normálnu zmenu adresára pri odstraňovaní položiek\n"
+" \tzo zásobníka, takže sa zmení iba zásobník.\n"
+" \n"
+" Argumenty:\n"
+" +N\tOtoÄí zásobník tak, že N-tý adresár (poÄítajúc zľava zoznamu,\n"
+" \tktorý zobrazuje „dirs“, poÄínajúc nulou) je na vrchu.\n"
+" \n"
+" -N\tOtoÄí zásobník tak, že N-tý adresár (poÄítajúc sprava zoznamu,\n"
+" \tktorý zobrazuje „dirs“, poÄínajúc nulou) je na vrchu.\n"
+" \n"
+" adr\tpridá ADR na vrchol zásobníka adresárov, Äím sa tento stane\n"
+" \tnovým aktuálnym pracovným adresárom.\n"
+" \n"
+" Zásobník adresárov môžete zobraziť vstavaným príkazom „dirs“.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebol zadaný neplatný argument a nevyskytla sa\n"
+" chyba pri zmene adresára."
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Odstrániť položky zo zásobníka adresárov.\n"
+" \n"
+" Odstráni položky zo zásobníka adresárov. Bez argumentov odstráni\n"
+" vrchnú položku zo zásobníka a zmení adresár na adresár, ktorý\n"
+" sa následne nachádza na vrchu zásobníka.\n"
+" \n"
+" Voľby:\n"
+" -n\tpotlaÄí normálnu zmenu adresára pri odstraňovaní položiek\n"
+" \tzo zásobníka, takže sa zmení iba zásobník.\n"
+" \n"
+" +N\todstráni N-tú položku položku poÄítajúc zľava zoznamu,\n"
+" \tktorý zobrazuje „dirs“, poÄínajúc nulou. Napríklad: „popd +0“\n"
+" \todstráni prvý adresár, „popd +1“ druhý.\n"
+" \n"
+" -N\todstráni N-tú položku položku poÄítajúc sprava zoznamu,\n"
+" \tktorý zobrazuje „dirs“, poÄínajúc nulou. Napríklad: „popd -0“\n"
+" \todstráni posledný adresár, „popd -1“ predposledný.\n"
+" \n"
+" Zásobník adresárov môžete zobraziť príkazom „dirs“.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebol zadaný neplatný argument a nevyskytla sa\n"
+" chyba pri zmene adresára."
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Zobraziť zoznam momentálne zapamätaných adresárov.\n"
+" \n"
+" Zobrazí zoznam momentálne zapamätaných adresárov. Adresáre\n"
+" sa do zoznamu dostávajú príkazom „pushd“; zo zoznamu ich môžete\n"
+" vyberať postupne príkazom „popd“.\n"
+" \n"
+" Voľby:\n"
+" -c\tvyprázdniť zásobník adresárov zmazaním všetkých položiek.\n"
+" -l\tnevypisovať skrátené verzie adresárov vzhľadom na domovský\n"
+" \t\trelatívne k vášmu domovskému adresáru\n"
+" -p\tvypisovať zásobník adresárov vo formáte jedna položka na riadok\n"
+" -v\tvypisovať zásobník adresárov vo formáte jedna položka na\n"
+" \t\triadok a pred adresár vypísať jeho pozíciu v zásobníku.\n"
+" \n"
+" +N\tzobrazuje N-tú položku poÄítajúc zľava zoznamu, ktorý zobrazuje\n"
+" \t\tdirs vyvolaný bez volieb, poÄínajúc nulou.\n"
+" \n"
+" -N\tzobrazuje N-tú položku poÄítajúc sprava zoznamu, ktorý zobrazuje\n"
+" \t\tdirs vyvolaný bez volieb, poÄínajúc nulou.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebol zadaný neplatný argument a nevyskytla sa chyba."
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+"Nastaviť a zrušiť nastavenie volieb shellu.\n"
+" \n"
+" Zmení nastavenie každej z volieb shellu OPTNAME. Bez akýchkoľvek\n"
+" argumentov volieb vypíše vÅ¡etky voľby shellu s oznaÄením, Äi je každá\n"
+" z nich nastavená alebo nie.\n"
+" \n"
+" Voľby:\n"
+" -o\tobmedzí OPTNAME na tie, ktoré sú definované na použitie\n"
+" \tso „set -o“\n"
+" -p\tvypíše každú voľbu shellu s oznaÄením jej stavu\n"
+" -q\tpotlaÄí výstup\n"
+" -s\tzapnúť (nastaviť) každú OPTNAME\n"
+" -u\tvypnúť (zrušiť nastavenie) každú OPTNAME\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak je OPTNAME zapnuté; zlyhá ak bola zadaná\n"
+" neplatná voľba alebo OPTNAME je vypnuté."
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+"printf formátuje a vypisuje ARGUMENTY podľa FORMÃTu.\n"
+" \n"
+" FORMÃT je reÅ¥azec znakov, ktorý obsahuje tri typy objektov: Äisté "
+"znaky,\n"
+" ktoré sa jednoducho skopírujú na štandardný výstup, únikové klauzuly,\n"
+" ktoré sa nahradia zodpovedajúcim výstupom a skopírujú na štandardný\n"
+" výstup a špecifikácie formátu, z ktorých každá spôsobí vypísanie\n"
+" nasledovného argumentu.\n"
+" \n"
+" Okrem štandardných formátov popísaných v printf(1) a printf(3)\n"
+" printf rozoznáva:\n"
+" \n"
+" %b\trozšíriť únikové klauzuly backspace v zodpovedajúcom argumente\n"
+" %q\tdať argument do zátvoriek tak, aby ho bolo možné použiť ako\n"
+" \tvstup shellu.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba pri\n"
+" zápise Äi priradení."
+
+#: builtins.c:1895
+#, fuzzy
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Definuje ako má Readline dopĺňať argumenty.\n"
+" \n"
+" Pre každý NÃZOV uviesÅ¥ ako sa majú dopĺňaÅ¥ argumenty. Ak nie sú zadané\n"
+" žiadne argumenty, vypíšu sa existujúce dopĺňania v takom tvare, ktorý\n"
+" je možné znova použiť ako vstup.\n"
+" \n"
+" Voľby:\n"
+" -p\tvypísať existujúce špecifikácie dopĺňania v znovapoužiteľnom\n"
+" \ttvare\n"
+" -r\todstrániÅ¥ Å¡pecifikáciu dopĺňania každého NÃZVU alebo ak nie je\n"
+" \tzadaný žiadny NÃZOV, vÅ¡etky Å¡pecifikácie dopĺňania\n"
+" \n"
+" Pri pokuse o doplnenie sa operácie použijú v poradí hore uvedených\n"
+" volieb veľkými písmenami.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba."
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"ZobraziÅ¥ možné dokonÄenie v závislosti na voľbách.\n"
+" \n"
+" Slúži na použitie z shell funkcií tvoriacich možné dokonÄenia\n"
+" Ak je daný voliteľný parameter SLOVO, tvoria sa zhody so SLOVOm.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebola zadaná neplatná voľba a nevyskytla sa chyba."
+
+#: builtins.c:1938
+#, fuzzy
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+"Zmeniť alebo zobraziť voľby dopĺňania.\n"
+" \n"
+" Zmení voľby dopĺňania pre každý NÃZOV alebo ak nie je zadaný žiadny\n"
+" NÃZOV pre momentálne vykonávané dopĺňanie. Ak nie sú zadané žiadne\n"
+" voľby, vypíše Å¡pecifikácie dopĺňania pre každý NÃZOV alebo pre\n"
+" momentálne vykonávané dopĺňanie.\n"
+" \n"
+" Voľby:\n"
+" \t-o voľba\tNastaví voľbu dopĺňania VOĽBA pre každý NÃZOV\n"
+" \n"
+" Použitím „+o“ namiesto „-o“ vypnete urÄenú voľbu.\n"
+" \n"
+" Argumenty:\n"
+" \n"
+" Každý NÃZOV odkazuje na príkaz, pre ktorý musela byÅ¥ vopred definovaná\n"
+" špecifikácia dopĺňania pomocou vstavaného príkazu „complete“. Ak nie sú\n"
+" zadané žiadne NÃZVY, compopt musí byÅ¥ volaný priamo funkciou, ktorá\n"
+" práve tvorí dopĺňanie a voľby generátora momentálne vykonávaného\n"
+" dopĺňania sa zmenia.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebola zadaná neplatná voľba a NÃZOV nemá definovanú\n"
+" špecifikáciu dopĺňania."
+
+#: builtins.c:1968
+#, fuzzy
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+"NaÄítaÅ¥ riadky zo súboru do premennej poľa.\n"
+" \n"
+" NaÄíta riadky zo Å¡tandardného vstupu do premennej poľa POLE alebo z\n"
+" popisovaÄa súboru FD ak je zadaná voľba -u. Å tandardné POLE je premenná\n"
+" MAPFILE.\n"
+" \n"
+" Voľby:\n"
+" -n poÄet\tSkopírovaÅ¥ najviac POÄŒET riadkov. Ak je POÄŒER 0, vÅ¡etky "
+"riadky.\n"
+" -O zaÄiatok\tZaÄaÅ¥ priraÄovanie položiek POĽA na indexe ZAÄŒIATOK.\n"
+" \t\tPredvolený index je 0.\n"
+" -s poÄet\tIgnorovaÅ¥ prvých preÄítaných POÄŒET riadkov.\n"
+" -t\t\tOdstrániÅ¥ znak nového riadka z konca každého naÄítaného riadka.\n"
+" -u fd\t\tNaÄítaÅ¥ riadky z popisovaÄa FD namiesto Å¡tandardného vstupu.\n"
+" -C callback\tVyhodnotiÅ¥ CALLBACK po preÄítaní každých QUANTUM "
+"riadkov.\n"
+" -c quantum\tUrÄuje poÄet riadkov, ktoré sa majú preÄítaÅ¥ pred každým\n"
+" \t\tvolaním CALLBACK.\n"
+" \n"
+" Argumenty:\n"
+" ARRAY\t\tNázov premennej poľa, kam sa majú uložiť údaje.\n"
+" \n"
+" Ak uvediete -C bez -c, predvolená hodnota quantum je 5000.\n"
+" Pri vyhodnotení CALLBACK sa dodá index ÄalÅ¡ieho pevku poľa,\n"
+" ktorý sa má priradiÅ¥ ako Äalší argument.\n"
+" \n"
+" Ak nie je zadaný ZAÄŒIATOK explicitne, mapfile POLE vyÄistí predtým,\n"
+" než ho zaÄne plniÅ¥.\n"
+" \n"
+" Návratová hodnota:\n"
+" Vráti 0 ak nebola zadaná neplatná voľba a POLE nie je len na Äítanie."
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+"NaÄítaÅ¥ riadky zo súboru do premennej poľa.\n"
+" \n"
+" Synonymum k „mapfile“."
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: nie je možné realokovať %lu bajtov (%lu bajtov alokovaných)"
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: nie je možné alokovať %lu bajtov"
+
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: %s:%d: nie je možné realokovať %lu bajtov (%lu bajtov "
+#~ "alokovaných)"
+
+#~ msgid " "
+#~ msgstr " "
+
+#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR,"
+#~ msgstr "Bez VÃR, vráti „$line $filename“. S VÃR,"
+
+#~ msgid "returns \"$line $subroutine $filename\"; this extra information"
+#~ msgstr "vráti „$line $subroutine $filename“; túto informáciu"
+
+#~ msgid "can be used used to provide a stack trace."
+#~ msgstr "je možné využiť pre trasovanie zásobníka."
+
+#~ msgid ""
+#~ "The value of EXPR indicates how many call frames to go back before the"
+#~ msgstr "Hodnota VÃR urÄuje o koľko rámcov volania sa vrátiÅ¥"
+
+#~ msgid "current one; the top frame is frame 0."
+#~ msgstr "pred aktuálny; najvyšší rámec má Äíslo 0."
+
+#~ msgid "%s: invalid number"
+#~ msgstr "%s: neplatné Äíslo"
+
+#~ msgid "Shell commands matching keywords `"
+#~ msgstr "Príkazy shellu zodpovedajúce kľúÄovým slovám „"
+
+#~ msgid "Display the list of currently remembered directories. Directories"
+#~ msgstr "Zobraziť zoznam momentálne zapamätaných adresárov. Adresáre"
+
+#~ msgid "find their way onto the list with the `pushd' command; you can get"
+#~ msgstr "sa do zoznamu dostanú príkazom „pushd“; späť hore v zozname"
+
+#~ msgid "back up through the list with the `popd' command."
+#~ msgstr "sa môžete dostať príkazom „popd“."
+
+#~ msgid ""
+#~ "The -l flag specifies that `dirs' should not print shorthand versions"
+#~ msgstr "Voľba -l hovorí, že „dirs“ by nemal vypísovať skrátené verzie"
+
+#~ msgid ""
+#~ "of directories which are relative to your home directory. This means"
+#~ msgstr ""
+#~ "adresárov, ktoré sa vzťahujú k vášmu domovskému adresáru. To znamená,"
+
+#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag"
+#~ msgstr "že „~/bin“ sa može zobraziť ako „/homes/bfox/bin“. Voľba -v"
+
+#~ msgid "causes `dirs' to print the directory stack with one entry per line,"
+#~ msgstr ""
+#~ "hovorí, aby „dirs“ vypísal zásobník adresárov s jednou položkou na riadok,"
+
+#~ msgid ""
+#~ "prepending the directory name with its position in the stack. The -p"
+#~ msgstr "a pred názov adresára vypísal jeho polohu v zásobníku. Voľba -p"
+
+#~ msgid "flag does the same thing, but the stack position is not prepended."
+#~ msgstr "robí presne to isté, len sa nepridáva poloha v zásobníku."
+
+#~ msgid ""
+#~ "The -c flag clears the directory stack by deleting all of the elements."
+#~ msgstr "Voľba -c Äistí zásobník adresárov odstránením vÅ¡etkých prvkov."
+
+#~ msgid ""
+#~ "+N displays the Nth entry counting from the left of the list shown by"
+#~ msgstr "+N zobrazí N-tú položku zľava zoznamu zobrazenú pomocou"
+
+#~ msgid " dirs when invoked without options, starting with zero."
+#~ msgstr " dirs vyvolaného bez volieb, poÄínajúc nulou."
+
+#~ msgid ""
+#~ "-N displays the Nth entry counting from the right of the list shown by"
+#~ msgstr "+N zobrazí N-tú položku sprava zoznamu zobrazenú pomocou"
+
+#~ msgid "Adds a directory to the top of the directory stack, or rotates"
+#~ msgstr "Pridá adresár na vrch zásobníka adresárov alebo otoÄí"
+
+#~ msgid "the stack, making the new top of the stack the current working"
+#~ msgstr "zásobník, Äím aktuálny pracovný adresár bude na vrchu"
+
+#~ msgid "directory. With no arguments, exchanges the top two directories."
+#~ msgstr "zásobníka. Bez argumentov vymení vrchné dva adresáre."
+
+#~ msgid "+N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "+N OtoÄí zásobník tak, že N-tý adresár (poÄítajúc"
+
+#~ msgid " from the left of the list shown by `dirs', starting with"
+#~ msgstr " zľava zoznamu, ktorý vráti „dirs“, poÄínajúc nulou)"
+
+#~ msgid " zero) is at the top."
+#~ msgstr " je na vrchu."
+
+#~ msgid "-N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "-N OtoÄí zásobník tak, že N-tý adresár (poÄítajúc"
+
+#~ msgid " from the right of the list shown by `dirs', starting with"
+#~ msgstr " sprava zoznamu, ktorý vráti „dirs“, poÄínajúc nulou)"
+
+#~ msgid "-n suppress the normal change of directory when adding directories"
+#~ msgstr "-n potlaÄiÅ¥ normálnu zmenu adresára pri pridávaní adresárov"
+
+#~ msgid " to the stack, so only the stack is manipulated."
+#~ msgstr " na zásobník, takže sa zmení iba zásobník."
+
+#~ msgid "dir adds DIR to the directory stack at the top, making it the"
+#~ msgstr "dir pridá DIR na vrch zásobníka adreárov, Äím ho uÄiní"
+
+#~ msgid " new current working directory."
+#~ msgstr " novým aktuálnym adresárom."
+
+#~ msgid "You can see the directory stack with the `dirs' command."
+#~ msgstr "Zásobník adresárov môžete zobraziť príkazom „dirs“."
+
+#~ msgid "Removes entries from the directory stack. With no arguments,"
+#~ msgstr "Odstráni položky zo zásobníka adresárov. Bez argumentov"
+
+#~ msgid "removes the top directory from the stack, and cd's to the new"
+#~ msgstr "odstráni vrchný adresár zo zásobníka a zmení aktuálny adresár"
+
+#~ msgid "top directory."
+#~ msgstr "na nový vrchol zásobníka."
+
+#~ msgid "+N removes the Nth entry counting from the left of the list"
+#~ msgstr "+N Odstráni N-túä položku (poÄítajúc zľava zoznamu,"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'"
+#~ msgstr " ktorý vráti „dirs“, poÄínajúc nulou). Napríklad: „popd +0“"
+
+#~ msgid " removes the first directory, `popd +1' the second."
+#~ msgstr " odstráni prvý adresár, „popd +1“ druhý."
+
+#~ msgid "-N removes the Nth entry counting from the right of the list"
+#~ msgstr "-N Odstráni N-túä položku (poÄítajúc sprava zoznamu,"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'"
+#~ msgstr " ktorý vráti „dirs“, poÄínajúc nulou). Napríklad: „popd -0“"
+
+#~ msgid " removes the last directory, `popd -1' the next to last."
+#~ msgstr " odstráni posledný adresár, „popd -1“ predposledný."
+
+#~ msgid ""
+#~ "-n suppress the normal change of directory when removing directories"
+#~ msgstr "-n potlaÄiÅ¥ normálnu zmenu adresára pri odoberaní adresárov"
+
+#~ msgid " from the stack, so only the stack is manipulated."
+#~ msgstr " zo zásobníka, takže sa zmení iba zásobník."
+
+#~ msgid "allocated"
+#~ msgstr "alokované"
+
+#~ msgid "freed"
+#~ msgstr "uvoľnené"
+
+#~ msgid "requesting resize"
+#~ msgstr "žiadam o zmenu veľkosti"
+
+#~ msgid "just resized"
+#~ msgstr "veľkosť bola práve zmenená"
+
+#~ msgid "bug: unknown operation"
+#~ msgstr "chyba: neznáma operácia"
+
+#~ msgid "malloc: watch alert: %p %s "
+#~ msgstr "malloc: upozornenie sledovania: %p %s "
+
+#~ msgid ""
+#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n"
+#~ " break N levels."
+#~ msgstr ""
+#~ "VyskoÄí zvnútra cyklu FOR, WHILE alebo UNTIL. Ak je uvedené N,\n"
+#~ " vyskoÄí o N úrovní."
+
+#~ msgid ""
+#~ "Run a shell builtin. This is useful when you wish to rename a\n"
+#~ " shell builtin to be a function, but need the functionality of the\n"
+#~ " builtin within the function itself."
+#~ msgstr ""
+#~ "Spustí vstavaný príkaz (builtin) shellu. Toto je užitoÄné, keÄ\n"
+#~ " chcete premenovať vstavaný príkaz shellu na funkciu, ale\n"
+#~ " potrebujete funkcionalitu samotného vstavaného príkazu\n"
+#~ " vnútri funkcie."
+
+#~ msgid ""
+#~ "Print the current working directory. With the -P option, pwd prints\n"
+#~ " the physical directory, without any symbolic links; the -L option\n"
+#~ " makes pwd follow symbolic links."
+#~ msgstr ""
+#~ "Vypíše aktuálny pracovný adresár. S voľbou -P pwd vypíše\n"
+#~ " fyzický adresár bez symbolických odkazov; s voľbou -L\n"
+#~ " bude pwd nasledovať symbolické odkazy."
+
+#~ msgid "Return a successful result."
+#~ msgstr "Vráti úspešný výsledok."
+
+#~ msgid ""
+#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell\n"
+#~ " function called `ls', and you wish to call the command `ls', you can\n"
+#~ " say \"command ls\". If the -p option is given, a default value is "
+#~ "used\n"
+#~ " for PATH that is guaranteed to find all of the standard utilities. "
+#~ "If\n"
+#~ " the -V or -v option is given, a string is printed describing "
+#~ "COMMAND.\n"
+#~ " The -V option produces a more verbose description."
+#~ msgstr ""
+#~ "Spustí PRÃKAZ s ARG ignorujúc funkcie shellu. Ak máte funkciu shellu\n"
+#~ " zvanú „ls“ a chcete zavolať príkaz „ls“, môžete napísať\n"
+#~ " „command ls“. Ak je zadaná voľba -p, použije sa štandardná hodnota\n"
+#~ " PATH, ktorá zaruÄene nájde vÅ¡etky Å¡tandardné nástroje. Ak je zadaná\n"
+#~ " voľba -V alebo -v, vypíše sa popis PRÃKAZU.\n"
+#~ " Voľba -V poskytuje podrobnejší výstup."
+
+#~ msgid ""
+#~ "Declare variables and/or give them attributes. If no NAMEs are\n"
+#~ " given, then display the values of variables instead. The -p option\n"
+#~ " will display the attributes and values of each NAME.\n"
+#~ " \n"
+#~ " The flags are:\n"
+#~ " \n"
+#~ " -a\tto make NAMEs arrays (if supported)\n"
+#~ " -f\tto select from among function names only\n"
+#~ " -F\tto display function names (and line number and source file name "
+#~ "if\n"
+#~ " \tdebugging) without definitions\n"
+#~ " -i\tto make NAMEs have the `integer' attribute\n"
+#~ " -r\tto make NAMEs readonly\n"
+#~ " -t\tto make NAMEs have the `trace' attribute\n"
+#~ " -x\tto make NAMEs export\n"
+#~ " \n"
+#~ " Variables with the integer attribute have arithmetic evaluation (see\n"
+#~ " `let') done when the variable is assigned to.\n"
+#~ " \n"
+#~ " When displaying values of variables, -f displays a function's name\n"
+#~ " and definition. The -F option restricts the display to function\n"
+#~ " name only.\n"
+#~ " \n"
+#~ " Using `+' instead of `-' turns off the given attribute instead. "
+#~ "When\n"
+#~ " used in a function, makes NAMEs local, as with the `local' command."
+#~ msgstr ""
+#~ "Deklaruje premenné a/alebo im dodá argumenty. Ak nie sú zadané\n"
+#~ " NÃZVY, zobraziÅ¥ hodnoty premenných. Voľba -p zobrazí atribúty\n"
+#~ " a hotnoty každého NÃZVU.\n"
+#~ " \n"
+#~ " Príznaky sú:\n"
+#~ " \n"
+#~ " -a\tna vytvorenie polí NÃZVOV (ak sú podporované)\n"
+#~ " -f\tna výber iba spomedzi názvov funkcií\n"
+#~ " -F\tna zobrazenie názvov funkcií (a Äísla riadku a zdrojového "
+#~ "súboru\n"
+#~ " \tpre ladenie) bez definícií\n"
+#~ " -i\taby mali NÃZVY atribút „integer“\n"
+#~ " -r\taby boli NÃZVY len na Äítanie\n"
+#~ " -t\taby mali NÃZVY atribút „trace“\n"
+#~ " -x\taby sa NÃZVY exportovali\n"
+#~ " \n"
+#~ " Premenné s atribútom integer vykonávajú aritmetické vyhodnocovanie "
+#~ "(pozri\n"
+#~ " „let“) po priradení výrazu premennej.\n"
+#~ " \n"
+#~ " Pri zobrazovaní hodnôt premenných, -f zobrazí názov a definíciu\n"
+#~ " funkcie. Voľba -F obmedzí zobrazovanie iba na názov funkcie.\n"
+#~ " \n"
+#~ " Pomocou „+“ namiesto „-“ sa vypína daný atribút. KeÄ sa použije vo\n"
+#~ " funkcii, spôsobí lokálnosÅ¥ NÃZVOV ako pri príkaze „local“ command."
+
+#~ msgid "Obsolete. See `declare'."
+#~ msgstr "Zastaralé. Pozri „declare“."
+
+#~ msgid ""
+#~ "Create a local variable called NAME, and give it VALUE. LOCAL\n"
+#~ " can only be used within a function; it makes the variable NAME\n"
+#~ " have a visible scope restricted to that function and its children."
+#~ msgstr ""
+#~ "Vytvorí lokálnu premennú s NÃZVOM a priradí jej HODNOTU. LOCAL\n"
+#~ " je možné použiť iba v rámci funkcie; spôsobí obmedzenie viditeľnosti\n"
+#~ " premennej NÃZOV iba na túto funkciu a jej potomkov."
+
+#~ msgid ""
+#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed."
+#~ msgstr ""
+#~ "Vypíše ARGumenty. S voľbou -n bude posledný znak nového riadka potlaÄený."
+
+#~ msgid ""
+#~ "Enable and disable builtin shell commands. This allows\n"
+#~ " you to use a disk command which has the same name as a shell\n"
+#~ " builtin without specifying a full pathname. If -n is used, the\n"
+#~ " NAMEs become disabled; otherwise NAMEs are enabled. For example,\n"
+#~ " to use the `test' found in $PATH instead of the shell builtin\n"
+#~ " version, type `enable -n test'. On systems supporting dynamic\n"
+#~ " loading, the -f option may be used to load new builtins from the\n"
+#~ " shared object FILENAME. The -d option will delete a builtin\n"
+#~ " previously loaded with -f. If no non-option names are given, or\n"
+#~ " the -p option is supplied, a list of builtins is printed. The\n"
+#~ " -a option means to print every builtin with an indication of whether\n"
+#~ " or not it is enabled. The -s option restricts the output to the "
+#~ "POSIX.2\n"
+#~ " `special' builtins. The -n option displays a list of all disabled "
+#~ "builtins."
+#~ msgstr ""
+#~ "Zapína a vypína vstavené (builtin) príkazy shellu. Toto vám umožní\n"
+#~ " použiť príkaz s rovnakým názvom ako má vstavaný príkaz shellu\n"
+#~ " bez toho, aby ste uvádzali plnú cestu. S voľbou -n budú NÃZVY\n"
+#~ " vypnuté; inak budú NÃZVY zapnuté. Napríklad ak chcete použiÅ¥\n"
+#~ " „test“, ktorý sa nachádza v $PATH namiesto vstavaného príkazu,\n"
+#~ " napíšte „enable -n test“. Na systémoch, ktoré podporujú dynamické\n"
+#~ " nahrávanie je možné použiÅ¥ voľbu -f na naÄítanie nových vstavaných\n"
+#~ " príkazov zo zdieľaného objektu NÃZOVSÚBORU. Voľba -d zmaže\n"
+#~ " vstavaný príkaz, ktorý bol predtým naÄítaný pomocou -f. Ak nie sú\n"
+#~ " zadané žiadne názvy okrem volieb alebo je zadaná voľba -p , vypíše\n"
+#~ " sa zoznam vstavaných príkazov. Voľba -a znamená, že sa má vypísať\n"
+#~ " každý vstavaný príkaz a Äi je zapnutý alebo vypnutý. Voľba -s "
+#~ "obmedzí\n"
+#~ " výstup na POSIX.2 „special“ vstavané príkazy. Voľba -n zobrazí "
+#~ "zoznam\n"
+#~ " všetkých vypnutých vstavaných príkazov."
+
+#~ msgid ""
+#~ "Read ARGs as input to the shell and execute the resulting command(s)."
+#~ msgstr "PreÄíta ARGumenty ako vstup do shellu a vykoná výsledné príkazy."
+
+#~ msgid ""
+#~ "Exec FILE, replacing this shell with the specified program.\n"
+#~ " If FILE is not specified, the redirections take effect in this\n"
+#~ " shell. If the first argument is `-l', then place a dash in the\n"
+#~ " zeroth arg passed to FILE, as login does. If the `-c' option\n"
+#~ " is supplied, FILE is executed with a null environment. The `-a'\n"
+#~ " option means to make set argv[0] of the executed process to NAME.\n"
+#~ " If the file cannot be executed and the shell is not interactive,\n"
+#~ " then the shell exits, unless the shell option `execfail' is set."
+#~ msgstr ""
+#~ "Vykoná SÚBOR, priÄom nahradí tento shell uvedeným programom.\n"
+#~ " Ak SÚBOR nie je zadaný, presmerovania sa uskutoÄnia v tomto\n"
+#~ " shelli. Ak je prvý argument „-l“, potom dá znak spojovník do\n"
+#~ " nultého arg, ktorý sa dáva SÚBORU, tak ako to robí login. Ak sa\n"
+#~ " zadá voľba „-c“, SÚBOR sa vykoná s null prostredím. Voľba „-a“\n"
+#~ " znamená nastaviľ argv[0] vykonávaného procesu na NÃZOV.\n"
+#~ " Ak súbor nie je možné vykonať a shell nie je interaktívny, potom,\n"
+#~ " shell skonÄí, ak nie je nastavená voľba „execfail“."
+
+#~ msgid "Logout of a login shell."
+#~ msgstr "Odhlásiť sa z login shelu."
+
+#~ msgid ""
+#~ "For each NAME, the full pathname of the command is determined and\n"
+#~ " remembered. If the -p option is supplied, PATHNAME is used as the\n"
+#~ " full pathname of NAME, and no path search is performed. The -r\n"
+#~ " option causes the shell to forget all remembered locations. The -d\n"
+#~ " option causes the shell to forget the remembered location of each "
+#~ "NAME.\n"
+#~ " If the -t option is supplied the full pathname to which each NAME\n"
+#~ " corresponds is printed. If multiple NAME arguments are supplied "
+#~ "with\n"
+#~ " -t, the NAME is printed before the hashed full pathname. The -l "
+#~ "option\n"
+#~ " causes output to be displayed in a format that may be reused as "
+#~ "input.\n"
+#~ " If no arguments are given, information about remembered commands is "
+#~ "displayed."
+#~ msgstr ""
+#~ "Pre každý NÃZOV sa urÄí a zapamätá plná cesta k príkazu. Ak je daná voľba "
+#~ "-p\n"
+#~ " CESTA sa použije ako plná cesta k NÃZOV a nevykoná sa hľadanie "
+#~ "cesty.\n"
+#~ " Voľba -r spôsobí, že shell zabudne všetky zapamätané miesta.\n"
+#~ " Voľba -d spôsobí, že shell zabudne zapamätané miesto každého NÃZVU.\n"
+#~ " Ak je zadaná voľba -t, vypíše sa plná cesta zodpovedajúca každému\n"
+#~ " NÃZVU. Ak sú s voľbou -t uvedené viaceré argumenty NÃZOV, pred\n"
+#~ " plnou cestou sa vypíše NÃZOV. Voľba -l vypíše výstup vo forme, ktorú\n"
+#~ " je možné znova použiť ako vstup. Ak nie sú zadané žiadne argumenty,\n"
+#~ " zobrazia sa informácie o zapamätaných príkazoch."
+
+#~ msgid ""
+#~ "Display helpful information about builtin commands. If PATTERN is\n"
+#~ " specified, gives detailed help on all commands matching PATTERN,\n"
+#~ " otherwise a list of the builtins is printed. The -s option\n"
+#~ " restricts the output for each builtin command matching PATTERN to\n"
+#~ " a short usage synopsis."
+#~ msgstr ""
+#~ "Zobrazí užitoÄné informácie o vstavaných (builtin) príkazoch. Ak je\n"
+#~ " uvedený VZOR, poskytne podrobné informácie o všetkých príkazoch\n"
+#~ " zodpovedajúcich VZORU. Inak sa vypíše zoznam vstavaných príkazov.\n"
+#~ " Voľba -s obmedzí výstup pre každý príkaz zodpovedajúci VZORU na\n"
+#~ " krátke zhrnutie použitia."
+
+#~ msgid ""
+#~ "By default, removes each JOBSPEC argument from the table of active jobs.\n"
+#~ " If the -h option is given, the job is not removed from the table, but "
+#~ "is\n"
+#~ " marked so that SIGHUP is not sent to the job if the shell receives a\n"
+#~ " SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove "
+#~ "all\n"
+#~ " jobs from the job table; the -r option means to remove only running "
+#~ "jobs."
+#~ msgstr ""
+#~ "Štandardne odstráni argument JOBSPEC z tabuľky aktívnych úloh.\n"
+#~ " Ak je uvedená voľba „-h“, úloha sa neodstráni z tabuľky, ale oznaÄí "
+#~ "sa\n"
+#~ " tak, že SIGHUP sa nepošle úlohe, ak shell dostane SIGHUP. Voľba „-a“\n"
+#~ " bez uvedenej JOBSPEC znamená odstránenie všetkých úloh z tabuľky\n"
+#~ " úloh; voľba „-r“ znamená odstrániť iba bežiace úlohy."
+
+#~ msgid ""
+#~ "Causes a function to exit with the return value specified by N. If N\n"
+#~ " is omitted, the return status is that of the last command."
+#~ msgstr ""
+#~ "Spôsobí, že sa funkcia ukonÄí s návratovou hodnotou N. Ak N\n"
+#~ " vynecháte, vráti sa návratová hodnota posledného vykonaného\n"
+#~ " príkazu."
+
+#~ msgid ""
+#~ "For each NAME, remove the corresponding variable or function. Given\n"
+#~ " the `-v', unset will only act on variables. Given the `-f' flag,\n"
+#~ " unset will only act on functions. With neither flag, unset first\n"
+#~ " tries to unset a variable, and if that fails, then tries to unset a\n"
+#~ " function. Some variables cannot be unset; also see readonly."
+#~ msgstr ""
+#~ "Pre každý NÃZOV odstráni zodpovedajúcu premennú alebo funkciu.\n"
+#~ " Ak je zadaný prepínaÄ â€ž-v“, unset bude úÄinkovaÅ¥ iba na premenné.\n"
+#~ " Ak je zadaný prepínaÄ â€ž-t“, unset bude úÄinkovaÅ¥ iba na funkcie.\n"
+#~ " Bez prepínaÄov sa unset pokúsi najprv zruÅ¡iÅ¥ nastavenie premennej\n"
+#~ " a ak to zlyhá, pokúsi sa zrušiť nastavenie funkcie.\n"
+#~ " Niektoré premenné nemožno zrušiť; pozri aj readonly."
+
+#~ msgid ""
+#~ "NAMEs are marked for automatic export to the environment of\n"
+#~ " subsequently executed commands. If the -f option is given,\n"
+#~ " the NAMEs refer to functions. If no NAMEs are given, or if `-p'\n"
+#~ " is given, a list of all names that are exported in this shell is\n"
+#~ " printed. An argument of `-n' says to remove the export property\n"
+#~ " from subsequent NAMEs. An argument of `--' disables further option\n"
+#~ " processing."
+#~ msgstr ""
+#~ "NÃZVY sa oznaÄia na automatický export do prostredia následne\n"
+#~ " vykonaných príkazov. Ak je zadaná voľba -f, NÃZVY odkazujú na\n"
+#~ " funkcie. Ak nezadáte žiadne NÃZVY alebo zadáte voľbu „-p“,\n"
+#~ " vypíše sa zoznam všetkých názvov, ktoré sú exportované v tomto\n"
+#~ " shelli. Argument „-n“ hovorí, že sa má odstrániť vlastnosť export z\n"
+#~ " nasledujúcich NÃZVOV. Argument „--“ vypína spracovanie Äalších\n"
+#~ " volieb."
+
+#~ msgid ""
+#~ "The given NAMEs are marked readonly and the values of these NAMEs may\n"
+#~ " not be changed by subsequent assignment. If the -f option is given,\n"
+#~ " then functions corresponding to the NAMEs are so marked. If no\n"
+#~ " arguments are given, or if `-p' is given, a list of all readonly "
+#~ "names\n"
+#~ " is printed. The `-a' option means to treat each NAME as\n"
+#~ " an array variable. An argument of `--' disables further option\n"
+#~ " processing."
+#~ msgstr ""
+#~ "Zadané NÃZVY sa oznaÄia iba na Äítanie a hodnoty týchto NÃZVOV nebude\n"
+#~ " možné zmeniÅ¥ Äalším priradením. Ak je zadaná voľba -f, oznaÄia sa "
+#~ "takto\n"
+#~ " funkcie zodpovedajúce NÃZVU. Ak nie sú zadané žiadne argumenty alebo\n"
+#~ " je zadané „-p“, vypíše sa zoznam vÅ¡etkých názvov len na Äítanie. "
+#~ "Voľba „-a“\n"
+#~ " znamená, že sa každá premenná NÃZOV bude považovaÅ¥ za pole. Argument\n"
+#~ " „--“ vypína spracovanie Äalších volieb."
+
+#~ msgid ""
+#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is\n"
+#~ " not given, it is assumed to be 1."
+#~ msgstr ""
+#~ "PoziÄné parametre od $N+1 ... sa premenujú na $1 ... Ak\n"
+#~ " neuvediete N, predpokladá sa 1."
+
+#~ msgid ""
+#~ "Suspend the execution of this shell until it receives a SIGCONT\n"
+#~ " signal. The `-f' if specified says not to complain about this\n"
+#~ " being a login shell if it is; just suspend anyway."
+#~ msgstr ""
+#~ "Odstaviť vykonávanie tohto shellu, kým nedostane signál\n"
+#~ " SIGCONT. Zadanie voľby „-f“ hovorí, že sa shell nemá sťažovať,\n"
+#~ " ak je prihlasovací a napriek tomu sa má odhlásiť."
+
+#~ msgid ""
+#~ "Print the accumulated user and system times for processes run from\n"
+#~ " the shell."
+#~ msgstr ""
+#~ "VypísaÅ¥ kumulatívne používateľské a systémové Äasy procesov\n"
+#~ " spustených zo shellu."
+
+#~ msgid ""
+#~ "For each NAME, indicate how it would be interpreted if used as a\n"
+#~ " command name.\n"
+#~ " \n"
+#~ " If the -t option is used, `type' outputs a single word which is one "
+#~ "of\n"
+#~ " `alias', `keyword', `function', `builtin', `file' or `', if NAME is "
+#~ "an\n"
+#~ " alias, shell reserved word, shell function, shell builtin, disk "
+#~ "file,\n"
+#~ " or unfound, respectively.\n"
+#~ " \n"
+#~ " If the -p flag is used, `type' either returns the name of the disk\n"
+#~ " file that would be executed, or nothing if `type -t NAME' would not\n"
+#~ " return `file'.\n"
+#~ " \n"
+#~ " If the -a flag is used, `type' displays all of the places that "
+#~ "contain\n"
+#~ " an executable named `file'. This includes aliases, builtins, and\n"
+#~ " functions, if and only if the -p flag is not also used.\n"
+#~ " \n"
+#~ " The -f flag suppresses shell function lookup.\n"
+#~ " \n"
+#~ " The -P flag forces a PATH search for each NAME, even if it is an "
+#~ "alias,\n"
+#~ " builtin, or function, and returns the name of the disk file that "
+#~ "would\n"
+#~ " be executed."
+#~ msgstr ""
+#~ "Pre každý NÃZOV urÄí ako by sa interpretoval, keby sa použil ako\n"
+#~ " názov príkazu.\n"
+#~ " \n"
+#~ " Ak je použitá voľba -t, „type“ vypíše jediné slovo, ktoré je jedno z\n"
+#~ " „alias“, „keyword“, „function“, „builtin“, „file“ alebo „“, ak NÃZOV\n"
+#~ " je alias, vyhradené slovo shellu, funkcia shellu, vstavaný príkaz "
+#~ "shellu,\n"
+#~ " súbor na disku resp. nezistený typ.\n"
+#~ " \n"
+#~ " Ak je použitá voľba -p, „type“ vypíše buÄ názov súboru na disku,\n"
+#~ " ktorý by sa vykonal alebo niÄ ak by „type -t NÃZOV“ nevrátilo\n"
+#~ " „file“.\n"
+#~ " \n"
+#~ " Ak je použitá voľba -a, „type“ vypíše všetky miesta, ktoré obsahujú\n"
+#~ " spustiteľný súbor s názvom Ak je použitá voľba -t, „file“. Sem "
+#~ "patria\n"
+#~ " aliasy, vstavané premenné a funkcie ak a iba ak nie je zároveň "
+#~ "zadaný\n"
+#~ " prepínaÄ -p.\n"
+#~ " \n"
+#~ " Voľba -f potlaÄí vyhľadávanie funkcií shellu.\n"
+#~ " \n"
+#~ " Voľba -P vynúti vyhľadanie každého NÃZVU v ceste (premenná PATH),\n"
+#~ " aj ak je to alias, vstavaný príkaz shellu alebo funkcia a vráti "
+#~ "názov\n"
+#~ " súboru na disku, ktorý by sa vykonal."
+
+#~ msgid ""
+#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if\n"
+#~ " `-S' is supplied, the current value of the mask is printed. The `-"
+#~ "S'\n"
+#~ " option makes the output symbolic; otherwise an octal number is "
+#~ "output.\n"
+#~ " If `-p' is supplied, and MODE is omitted, the output is in a form\n"
+#~ " that may be used as input. If MODE begins with a digit, it is\n"
+#~ " interpreted as an octal number, otherwise it is a symbolic mode "
+#~ "string\n"
+#~ " like that accepted by chmod(1)."
+#~ msgstr ""
+#~ "Používateľská maska pre tvorbu súborov sa nastaví na REŽIM. Ak\n"
+#~ " vynecháte REŽIM alebo zadáte „-S“, vypíše sa aktuálna hodnota masky.\n"
+#~ " Voľba „-S“ vypisuje symbolický výstup; inak sa vypisuje Äíslo v "
+#~ "osmiÄkovej\n"
+#~ " sústave. Ak je zadaná voľba „-p“ a REŽIM sa vynechá, výstup je v "
+#~ "tvare,\n"
+#~ " ktorý je možné použiÅ¥ ako vstup. Ak REŽIM zaÄína Äíslicou, "
+#~ "interpretuje sa\n"
+#~ " ako Äíslo v osmiÄkovej sústave, inak je to symbolický reÅ¥azec "
+#~ "režimu,\n"
+#~ " v tvare, aký prijíma chmod(1)."
+
+#~ msgid ""
+#~ "Wait for the specified process and report its termination status. If\n"
+#~ " N is not given, all currently active child processes are waited for,\n"
+#~ " and the return code is zero. N is a process ID; if it is not given,\n"
+#~ " all child processes of the shell are waited for."
+#~ msgstr ""
+#~ "ÄŒakaÅ¥ na ukonÄenie zadaného procesu a vypísaÅ¥ jeho návratovú\n"
+#~ " hodnotu. Ak nie je N zadané, Äaká sa na vÅ¡etky momentálne\n"
+#~ " aktívne procesy potomkov a návratová hodnota je nula. N je\n"
+#~ " ID procesu; ak nie je zadaný, Äaká sa na ukonÄenie vÅ¡etkých\n"
+#~ " procesov potomkov shellu."
+
+#~ msgid ""
+#~ "Create a simple command invoked by NAME which runs COMMANDS.\n"
+#~ " Arguments on the command line along with NAME are passed to the\n"
+#~ " function as $0 .. $n."
+#~ msgstr ""
+#~ "VytvoriÅ¥ jednoduchý príkaz, ktorý sa vyvolá pomocou NÃZVU a spustí\n"
+#~ " PRÃKAZY. Argumenty príkazového riadka sa spolu s NÃZVOM dodajú\n"
+#~ " funkcii v premenných $0 až $n."
+
+#~ msgid ""
+#~ "Toggle the values of variables controlling optional behavior.\n"
+#~ " The -s flag means to enable (set) each OPTNAME; the -u flag\n"
+#~ " unsets each OPTNAME. The -q flag suppresses output; the exit\n"
+#~ " status indicates whether each OPTNAME is set or unset. The -o\n"
+#~ " option restricts the OPTNAMEs to those defined for use with\n"
+#~ " `set -o'. With no options, or with the -p option, a list of all\n"
+#~ " settable options is displayed, with an indication of whether or\n"
+#~ " not each is set."
+#~ msgstr ""
+#~ "Obráti hodnoty premenných riadiacich voliteľné správanie.\n"
+#~ " Voľba -s znamená zapnúť (nastaviÅ¥) naždého NÃZVU_VOĽBY;\n"
+#~ " voľba -u ruší nastavenie každého NÃZVU_VOĽBY. Voľba -q\n"
+#~ " potlaÄí výpis; stav ukonÄenia indikuje, Äi je každý NÃZOV_VOĽBY\n"
+#~ " nastavený alebo nenastavený. Voľba -o obmedzuje NÃZOV_VOĽBY\n"
+#~ " na tie, ktoré sú definované pre použitie so „set -o“. Bez volieb\n"
+#~ " alebo s voľbou -p sa vypíše zoznam nastaviteľných volieb\n"
+#~ " s oznaÄením, Äi je každá nastavená alebo nenastavená."
+
+#~ msgid ""
+#~ "For each NAME, specify how arguments are to be completed.\n"
+#~ " If the -p option is supplied, or if no options are supplied, "
+#~ "existing\n"
+#~ " completion specifications are printed in a way that allows them to "
+#~ "be\n"
+#~ " reused as input. The -r option removes a completion specification "
+#~ "for\n"
+#~ " each NAME, or, if no NAMEs are supplied, all completion "
+#~ "specifications."
+#~ msgstr ""
+#~ "Pre každý NÃZOV urÄí, koľko argumentov sa má doplniÅ¥.\n"
+#~ " Ak je daná voľba -p alebo žiadne voľby, vypíšu sa existujúce "
+#~ "špecifikácie doplnení v takom formáte, že je ich možné použiť na\n"
+#~ " vstupe. Voľba -r odstráni Å¡pecifikáciu doplnenia pre každý NÃZOV,\n"
+#~ " alebo, ak nebol uvedený žiadny NÃZOV, pre vÅ¡etky Å¡pecifikácie."
diff --git a/po/sv.gmo b/po/sv.gmo
new file mode 100644
index 0000000..b5bfcef
--- /dev/null
+++ b/po/sv.gmo
Binary files differ
diff --git a/po/sv.po b/po/sv.po
new file mode 100644
index 0000000..f23f250
--- /dev/null
+++ b/po/sv.po
@@ -0,0 +1,5453 @@
+# Swedish translation of bash
+# Copyright © 2008, 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the bash package.
+# Göran Uddeborg <goeran@uddeborg.se>, 2008, 2009.
+#
+# $Revision: 1.6 $
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bash 4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2009-03-25 19:35+0100\n"
+"Last-Translator: Göran Uddeborg <goeran@uddeborg.se>\n"
+"Language-Team: Swedish <tp-sv@listor.tp-sv.se>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "felaktigt vektorindex"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr "%s: det går inte att konvertera en indexerad vektor till associativ"
+
+#: arrayfunc.c:480
+#, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: ogiltig nyckel till associativ vektor"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: det går inte att tilldela till ickenumeriska index"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr "%s: %s: måste använda index vid tilldelning av associativ vektor"
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: det går inte att skapa: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+"bash_execute_unix_command: det går inte att hitta en tangentbindning för "
+"kommandot"
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: första ickeblanka tecknet är inte '\"'"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "ingen avslutande \"%c\" i %s"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: kolonseparator saknas"
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "\"%s\": ogiltigt tangentbindningsnamn"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr "radredigering är inte aktiverat"
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "\"%s\": ogiltigt tangentbindningsnamn"
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: det går inte att läsa: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "\"%s\": det går inte att avbinda"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "\"%s\": okänt funktionsnamn"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s är inte bundet till några tangenter.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s kan anropas via "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr "slingräknare"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "endast meningsfullt i en \"for\"-, \"while\"- eller \"until\"-slinga"
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+"Returnera kontexten för det aktuella subrutinanropet.\n"
+" \n"
+" Utan UTTR, returnerar "
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "HOME är inte satt"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "OLDPWD är inte satt"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr "rad %d: "
+
+#: builtins/common.c:139 error.c:261
+#, c-format
+msgid "warning: "
+msgstr "varning: "
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr "%s: användning: "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "för många argument"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: flaggan kräver ett argument"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: numeriskt argument krävs"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: finns inte"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: ogiltig flagga"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: ogiltigt flaggnamn"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "\"%s\": inte en giltig identifierare"
+
+#: builtins/common.c:238
+msgid "invalid octal number"
+msgstr "ogiltigt oktalt tal"
+
+#: builtins/common.c:240
+msgid "invalid hex number"
+msgstr "ogiltigt hexadecimalt tal"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "ogiltigt tal"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: ogiltig signalspecifikation"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "\"%s\": inte en pid eller giltig jobbspecifikation"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: endast läsbar variabel"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s utanför giltigt intervall"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "argument"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s utanför giltigt intervall"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: inget sådant jobb"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: ingen jobbstyrning"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "ingen jobbstyrning"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: begränsat"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "begränsat"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: inte inbyggt i skalet"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "skrivfel: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr "fel när terminalattribut ställdes in: %s"
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr "fel när terminalattribut hämtades: %s"
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: fel när aktuell katalog hämtades: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: tvetydig jobbspecifikation"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: ogiltigt åtgärdsnamn"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: ingen kompletteringsspecifikation"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "varning: flaggan -F fungerar kanske inte som du väntar dig"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "varning: flaggan -C fungerar kanske inte som du väntar dig"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr "kör inte en kompletteringsfunktion"
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "kan endast användas i en funktion"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "det går inte att använda \"-f\" för att göra funktioner"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: endast läsbar funktion"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: det går inte att förstöra vektorvariabler på detta sätt"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr "%s: det går inte att konvertera en associativ vektor till indexerad"
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "dynamisk laddning är inte tillgängligt"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "det går inte att öppna delat objekt %s: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "kan inte hitta %s i det delade objektet %s: %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: inte dynamiskt laddad"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: kan inte ta bort: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: är en katalog"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: inte en normal fil"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: filen är för stor"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: det går inte att köra binär fil"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: kan inte köra: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr "utloggning\n"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "inte ett inloggningsskal: använd \"exit\""
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "Det finns stoppade jobb.\n"
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr "Det finns körande jobb.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "hittar inget kommando"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "historiespecifikation"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: det går inte att öppna temporärfil: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr "aktuell"
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "jobb %d startade utan jobbstyrning"
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: ogiltig flagga -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: flaggan kräver ett argument -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "hasning avslaget"
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: hashtabellen tom\n"
+
+#: builtins/hash.def:244
+#, c-format
+msgid "hits\tcommand\n"
+msgstr "träffar\tkommando\n"
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Skalkommandon som matchar nyckelordet '"
+msgstr[1] "Skalkommandon som matchar nyckelorden '"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"inget hjälpämne matchar \"%s\". Prova \"help help\" eller \"man -k %s\" "
+"eller \"info %s\"."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: det går inte att öppna: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"Dessa skalkommandon är definierade internt. Skriv \"help\" för att se\n"
+"denna lista. Skriv \"help namn\" för att få reda på mer om funktionen\n"
+"\"namn\". Använd \"info bash\" får att få reda på mer om skalet rent\n"
+"allmänt. Använd \"man -k\" eller \"info\" för att få reda på mer om\n"
+"kommandon som inte är i listan.\n"
+"\n"
+"En stjärna (*) bredvid ett namn betyder att det kommandot är avstängt.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "det går inte att använda mer än en av -anrw"
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "historieposition"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: historieexpansionen misslyckades"
+
+#: builtins/inlib.def:71
+#, c-format
+msgid "%s: inlib failed"
+msgstr "%s: inlib misslyckades"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "inga andra flaggor är tillåtna med \"-x\""
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: argument måste vara processer eller job-id:n"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Okänt fel"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "uttryck förväntades"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: inte en vektorvariabel"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: ogiltig filidentifierarspecifikation"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: ogiltig filbeskrivare: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, c-format
+msgid "%s: invalid line count"
+msgstr "%s: ogiltigt radantal"
+
+#: builtins/mapfile.def:277
+#, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: ogiltig vektorstart"
+
+#: builtins/mapfile.def:294
+#, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: ogiltigt återanropskvanta"
+
+#: builtins/mapfile.def:326
+msgid "empty array variable name"
+msgstr "tomt vektorvariabelnamn"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr "stöd för vektorvariabler krävs"
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "\"%s\": formateringstecken saknas"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "\"%c\": ogiltigt formateringstecken"
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr "varning: %s: %s"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "hexadecimal siffra saknas för \\x"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "ingen annan katalog"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<ingen aktuell katalog>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr "katalogstacken är tom"
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr "katalogstackindex"
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+"Visa listan av kataloger i minnet just nu. Kataloger hamnar i listan\n"
+" med kommandot \"pushd\" command. Du kan komma tillbaka upp genom\n"
+" listan med kommandot \"popd\".\n"
+" \n"
+" Flaggor:\n"
+" -c\tnollställ katalogstacken genom att bo bort alla elementen\n"
+" -l\tskriv inte ut versioner med tildeprefix av kataloger som är\n"
+" \trelativa din hemkatalog\n"
+" -p\tskriv katalogstacken med en post per rad\n"
+" -v\tskriv katalogstacken med en post per rad inledda med dess\n"
+" \tposition i stacken\n"
+" \n"
+" Argument:\n"
+" +N\tVisa den N:e posten räknat från vänster i listan som visas\n"
+" \tav dirs när det anropas utan flaggor, räknat från noll.\n"
+" \n"
+" -N\tVisa den N:e posten räkntat från höger i listan som visas\n"
+"\tav dirs när det anropas utan flaggor, räknat från noll."
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Lägger till en katalog till toppen av katalogstacken, eller roterar\n"
+" stacken, och gör den nya toppen av stacken till den aktuella\n"
+" arbetskatalogen. Utan argument, byt de två toppkatalogerna.\n"
+" \n"
+" Flaggor:\n"
+" -n\tUndertryck det normala bytet av katalog när kataloger\n"
+" \tläggs till på stacken, så att endast stacken ändras.\n"
+" \n"
+" Argument:\n"
+" +N\tRoterar stacken så att den N:e katalogen (räknat från\n"
+" \tvänster i listan som visas av \"dirs\", med början på noll) hamnar\n"
+" \tpå toppen.\n"
+" \n"
+" -N\tRoterar stacken så att den N:e katalogen (räknat från\n"
+" \thöger i listan som visas av \"dirs\", med början på noll) hamnar\n"
+" \tpå toppen.\n"
+" \n"
+" kat\tLägger till KAT till toppen av katalogstacken, och gör den\n"
+" \ttill den nya aktuella arbetskatalogen.\n"
+" \n"
+" Den inbyggda \"dirs\" visar katalogstacken."
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Tar bort poster från katalogstacken. Utan argument tas den översta\n"
+" katalogen bort från stacken, och byte görs till den nya toppkatalogen.\n"
+" \n"
+" Flaggor:\n"
+" -n\tUndertryck det normala bytet av katalog när kataloger\n"
+" \tläggs till på stacken, så att endast stacken ändras.\n"
+" \n"
+" Arguments:\n"
+" +N\tTar bort den N:e posten räknat från vänster i listan\n"
+" \tsom visas av \"dirs\", med början på noll. Till exempel: \"popd +0\"\n"
+" \ttar bort den första katalogen, \"popd +1\" den andra.\n"
+" \n"
+" -N\tTar bort den N:e posten räknat från höger i listan\n"
+" \tsom visas av \"dirs\", med början på noll. Till exempel: \"popd -0\"\n"
+" \ttar bort den sista katalogen, \"popd -1\" den näst sista.\n"
+" \n"
+" Den inbyggda \"dirs\" visar katalogstacken."
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: ogiltig tidsgränsspecifikation"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "läsfel: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+"det går bara att göra \"return\" från en funktion eller källinläst skript"
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "det går inte att samtidigt ta bort en funktion och en variabel"
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: det går inte att ta bort tilldelning"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: det går inte att ta bort tilldelning: endast läsbar %s"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: inte en vektorvariabel"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: inte en funktion"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "skiftantal"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr "det går inte att sätta och ta bort skalflaggor samtidigt"
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: ogiltigt skalflaggsnamn"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "filnamnsargument krävs"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: filen finns inte"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "det går inte att suspendera"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "det går inte att suspendera ett inloggningsskal"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "%s är ett alias för \"%s\"\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s är ett nyckelord i skalet\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s är en funktion\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "%s är inbyggt i skalet\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s är %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "%s är hashad (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s: ogiltigt gränsargument"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "\"%c\": felaktigt kommando"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: kan inte avgöra gränsen: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr "gräns"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: kan inte ändra gränsen: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "oktalt tal"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "\"%c\": ogiltig operator för symboliskt läge"
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "\"%c\": ogiltigt tecken för symboliskt läge"
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr " rad "
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "senaste kommando: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "Avbryter..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "okänt kommandofel"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "felaktig kommandotyp"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "felaktig anslutning"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "felaktigt hopp"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: obunden variabel"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "tiden gick ut i väntan på indata: automatisk utloggning\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "det går inte att omdiregera standard in från /dev/null: %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "TIMEFORMAT: \"%c\": ogiltigt formateringstecken"
+
+#: execute_cmd.c:2075
+msgid "pipe error"
+msgstr "rörfel"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: begränsat: det går inte att ange \"/\" i kommandonamn"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: kommandot finns inte"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: felaktig tolk"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "det går inte att duplicera fb %d till fb %d"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "rekursionsnivå i uttryck överskriden"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "underspill i rekursionsstacken"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "syntaxfel i uttrycket"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "försök att tilldela till en icke-variabel"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "division med 0"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "bug: felaktig expassign-token"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "\":\" förväntades i villkorligt uttryck"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "exponenten är mindre än 0"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr "en identifierare förväntades efter pre-ökning eller pre-minskning"
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "\")\" saknas"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "syntaxfel: en operand förväntades"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "syntaxfel: ogiltig aritmetisk operator"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s%s%s: %s (felsymbol är \"%s\")"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "ogiltig aritmetisk bas"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "värdet är för stort för basen"
+
+#: expr.c:1329
+#, c-format
+msgid "%s: expression error\n"
+msgstr "%s: uttrycksfel\n"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getcwd: det går inte att komma åt föräldrakatalogen"
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "det går inte att återställa fördröjningsfritt läge för fb %d"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+"det går inte att allokera en ny filbeskrivare för bashindata från fb %d"
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "save_bash_input: buffert finns redan för ny fb %d"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr "start_pipeline: pgrp rör"
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr "avgrenad pid %d fins i körande jobb %d"
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "tar bort stoppat jobb %d med processgrupp %ld"
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr "add_process: process %5ld (%s) i the_pipeline"
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr "add_process: pid %5ld (%s) markerad som fortfarande vid liv"
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: %ld: ingen sådan pid"
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr "Signal %d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Klart"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Stoppat"
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr "Stoppat(%s)"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "Kör"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Klart(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "Avslut %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Okänd status"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(minnesutskrift skapad) "
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr " (ak: %s)"
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "barns setpgid (%ld till %ld)"
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait: pid %ld är inte ett barn till detta skal"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "wait_for: Ingen uppgift om process %ld"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job: jobb %d är stoppat"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: jobbet har avslutat"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: jobb %d är redan i bakgrunden"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, c-format
+msgid "%s: line %d: "
+msgstr "%s: rad %d: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr " (minnesutskrift skapad)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(ak nu: %s)\n"
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_job_control: getpgrp misslyckades"
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_job_control: linjedisciplin"
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_job_control: setpgid"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr "det går inte att sätta terminalprocessgrupp (%d)"
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "ingen jobbstyrning i detta skal"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc: försäkran misslyckades: %s\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"malloc: %s:%d: försäkran gick fel\r\n"
+
+#: lib/malloc/malloc.c:313
+msgid "unknown"
+msgstr "okänd"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr "malloc: block på frilista överskrivet"
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free: anropad med redan frigjort block som argument"
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free: anropad med oallokerat block som argument"
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr "free: underspill upptäckt: mh_nbytes utanför giltigt intervall"
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free: start- och slutstyckesstorlekar skiljer"
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc: anropat med oallokerat block som argument"
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr "realloc: underspill upptäckt: mh_nbytes utanför giltigt intervall"
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "realloc: start- och slutstycesstorlekar skiljer"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr "register_alloc: allokeringstabellen är full med FIND_ALLOC?\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr "register_alloc: %p finns redan i tabellen som allokerat?\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "register_free: %p finns redan i tabellen som fritt?\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "ogiltig bas"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: okänd värd"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: ogiltig tjänst"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: felaktig specifikation av nätverkssökväg"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "nätverksoperationer stöds inte"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc: %s: %d: kan inte allokera %lu byte"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc: %s: %d: kan inte allokera %lu byte"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Du har post i $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Du har ny post i $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "Posten i %s har lästs\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "syntaxfel: aritmetiskt uttryck krävs"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "syntaxfel: oväntat \";\""
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "syntaxfel: \"((%s))\""
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: felaktig instruktionstyp %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr "här-dokument på rad %d avgränsas av filslut (ville ha \"%s\")"
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr ""
+"make_redirection: omdirigeringsinstruktion \"%d\" utanför giltigt intervall"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "oväntat filslut vid sökning efter matchande \"%c\""
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "oväntat filslut vid sökning efter \"]]\""
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "syntaxfel i villkorligt uttryck: oväntad symbol \"%s\""
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "syntaxfel i villkorligt uttryck"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "oväntad symbol \"%s\", \")\" förväntades"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "\")\" förväntades"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "oväntat argument \"%s\" till villkorlig unär operator"
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "oväntat argument till villkorlig unär operator"
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "oväntad symbol \"%s\", villkorlig binär operator förväntades"
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "villkorlig binär operato förväntades"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "oväntat argument \"%s\" till villkorlig binär operator"
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "oväntat argument till villkorlig binär operator"
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "oväntad symbol \"%c\" i villkorligt kommando"
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "oväntad symbol \"%s\" i villkorligt kommando"
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "oväntad symbol %d i villkorligt kommando"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "syntaxfel när den oväntade symbolen \"%s\""
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "syntaxfel nära \"%s\""
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "syntaxfel: oväntat filslut"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "syntaxfel"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Använd \"%s\" fär att lämna skalet.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "oväntat filslut när matchande \")\" söktes"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "komplettering: funktion \"%s\" finns inte"
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr "progcomp_insert: %s: NULL COMPSPEC"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: felaktig anslutning \"%d\""
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d: ogiltig filbeskrivare: %s"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "cprintf: \"%c\": ogiltigt formateringstecken"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "filbeskrivare utanför giltigt intervall"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: tvetydig omdirigering"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: begränsad: det går inte att skriva över en existerande fil"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: begränsad: det går inte att omdirigera utdata"
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "det går inte att skapa temporärfil för här-dokument: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: det går inte att tilldela listor till vektormedlemmar"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "/dev/(tcp|udp)/host/port stöds inte utan nätverksfunktion"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "omdirigeringsfel: det går inte att duplicera fb"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "hittade inte /tmp, var god skapa!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "/tmp måste vara ett giltigt katalognamn"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: ogiltig flagga"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Jag har inget namn!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "GNU bash, version %s-(%s)\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Användning:\t%s [GNU lång flagga] [flagga] ...\n"
+"\t\t%s [GNU lång flagga] [flagga] skriptfil ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "GNU långa flaggor:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Skalflaggor:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD eller -c kommando eller -O shopt_flagga\t\t(bara uppstart)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s eller -o flagga\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr "Skriv \"%s -c 'help set'\" för mer information om skalflaggor.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr "Skriv \"%s -c help\" för mer information om inbyggda skalkommandon.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr ""
+"Använd kommandot \"bashbug\" för att rapportera fel.\n"
+"Skicka synpunkter på översättningen till <tp-sv@listor.tp-sv.se>.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d: ogiltig operation"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Felatkig signal"
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Avringd"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Avbruten"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "Lämnad"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Otillåten instruktion"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "Brytpunkt/spårningsfälla"
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "ABORT-instruktion"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "Emulatorfälla"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Flyttalsfel"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "Dödad"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "Bussfel"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Segmenteringsfel"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Felaktigt systemanrop"
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "Brutet rör"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Alarmklocka"
+
+#: siglist.c:111
+msgid "Terminated"
+msgstr "Avslutat"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "Viktigt I/O-tillstånd"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Stoppad (signal)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "Ã…terupptagen"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "Barn dött eller stoppat"
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Stoppad (terminalläsning)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Stoppad (terminalskrivning)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "I/O möjligt"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "CPU-gräns"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "Filgräns"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "Alarm (virtuell tid)"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "Alarm (profilering)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Ändrat fönster"
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr "Postlås"
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "Användarsignal 1"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "Användarsignal 2"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "HFT-indata väntar"
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "strömavbrott omedelbart förestående"
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "systemkrash omedelbart förestående"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "migrera process till en annan CPU"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "programmeringsfel"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "HFT-övervakningsläge givet"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "HFT-överakare borttagen"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "HFT-ljudsekevens har avslutat"
+
+#: siglist.c:215
+msgid "Information request"
+msgstr "Informationsbegäran"
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Okänd signal nr "
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Okänd signal nr %d"
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "felaktig substitution: ingen avslutande \"%s\" i %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: det går inte att tilldela listor till vektormedlemmar"
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "det går inte att skapa rör för processubstitution"
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "det går inte att skapa barn för processubstitution"
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "det går inte att öppna namngivet rör %s för läsning"
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "det går inte att öppna namngivet rör %s för skrivning"
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "det går inte att duplicera namngivet rör %s som fb %d"
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "det går inte att skapa rör för kommandosubstitution"
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr "det går inte att skapa barn för kommandosubstitution"
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "command_substitute: det går inte att duplicera rör som fb 1"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: parametern tom eller inte satt"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: delstränguttryck < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: felaktig substitution"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: det går inte att tilldela på detta sätt"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "felaktig ersättning: ingen avslutande \"`\" i %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "ingen match: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "argument förväntades"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: heltalsuttryck förväntades"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "\")\" förväntades"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "\")\" förväntades, fann %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: unär operator förväntades"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: binär operator förväntades"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "\"]\" saknas"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "ogiltigt signalnummer"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps: felaktigt värde i trap_list[%d]: %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+"run_pending_traps: signalhanterare är SIG_DFL, skickar om %d (%s) till mig "
+"själv"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: felaktig signal %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "fel vid import av funktionsdefinition för \"%s\""
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "skalnivå (%d) för hög, återställer till 1"
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr "make_local_variable: ingen funktionskontext i aktuellt sammanhang"
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr "all_local_variables: ingen funktionskontext i aktuellt sammanhang"
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: parametern tom eller inte satt"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "ogiltigt tecken %d i exportstr för %s"
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "inget \"=\" i exportstr för %s"
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+"pop_var_context: huvudet på shell_variables är inte en funktionskontext"
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr "pop_var_context: ingen kontext global_variables"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+"pop_scope: huvudet på shell_variables är inte en temporär omgivningsräckvidd"
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: det går inte att öppna: %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d: ogiltig filbeskrivare: %s"
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Copyright © 2009 Free Software Foundation, Inc."
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Licens GPLv3+: GNU GPL version 3 eller senare <http://gnu.org/licenses/gpl."
+"html>\n"
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "GNU bash, version %s (%s)\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+"Detta är fri programvara, det får fritt ändra och vidaredistribuera den.\n"
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr "Det finns INGEN GARANTI, så långt lagen tillåter.\n"
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Copyright © 2009 Free Software Foundation, Inc."
+
+#: version2.c:87
+#, fuzzy, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Licens GPLv3+: GNU GPL version 3 eller senare <http://gnu.org/licenses/gpl."
+"html>\n"
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: kan inte allokera %lu byte (%lu byte allokerade)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: kan inte allokera %lu byte"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: %s: %d: kan inte allokera %lu byte (%lu byte allokerade)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: %s: %d: kan inte allokera %lu byte"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [namn[=värde] ... ]"
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] namn [namn ...]"
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+"bind [-lpvsPVS] [-m tangentkarta] [-f filenamn] [-q namn] [-u namn] [-r "
+"tangentsekv] [-x tangentsekv:skalkommando] [tangentsekv:readline-funktion "
+"eller readline-kommando]"
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [n]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "continue [n]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [skalinbyggd [arg ...]]"
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr "caller [uttr]"
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-L|-P] [kat]"
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr "pwd [-LP]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr "true"
+
+#: builtins.c:72
+msgid "false"
+msgstr "false"
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] kommando [arg ...]"
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-aAfFilrtux] [-p] [namn[=värde] ...]"
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-aAfFilrtux] [-p] namn[=värde] ..."
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr "local [flagga] namn[=värde] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [arg ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [arg ...]"
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-a] [-dnps] [-f filenamn] [namn ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [arg ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts flgsträng namn [arg]"
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a namn] [kommando [argument ...]] [omdirigering ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [n]"
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr "logout [n]"
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+"fc [-e rnamn] [-lnr] [första] [sista] eller fc -s [mnst=ers] [kommando]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [jobbspec]"
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr "bg [jobbspec ...]"
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-lr] [-p sökväg] [-dt] [namn ...]"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "help [-ds] [mönster ...]"
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [-d avstånd] [n] eller history -anrw [filnamn] eller history -"
+"ps arg [arg...]"
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr "jobs [-lnprs] [jobbspec ...] eller jobs -x kommando [arg]"
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [-h] [-ar] [jobbspec ...]"
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobbspec ... eller kill -l "
+"[sigspec]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let arg [arg ...]"
+
+#: builtins.c:136
+#, fuzzy
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+"read [-ers] [-a vektor] [-d avgr] [-i text] [-n ntkn] [-p prompt] [-t "
+"tidgräns] [-u fb] [namn ...]"
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o flaggnamn] [arg ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [namn ...]"
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr "export [-fn] [namn[=värde] ...] eller export -p"
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr "readonly [-af] [namn[=värde] ...] eller readonly -p"
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr "skift [n]"
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr "source filnamn [argument]"
+
+#: builtins.c:152
+msgid ". filename [arguments]"
+msgstr ". filnamn [argument]"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "suspend [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [uttr]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ arg... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "times"
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [-lp] [[arg] signalspec ...]"
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-afptP] namn [namn ...]"
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdefilmnpqrstuvx] [gräns]"
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-p] [-S] [rättigheter]"
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr "wait [id]"
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr "wait [pid]"
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for NAMN [in ORD ... ] ; do KOMMANDON; done"
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for (( utr1; utr2; utr3 )); do KOMMANDON; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select NAMN [in ORD ... ;] do KOMMANDON; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr "time [-p] rör"
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case ORD in [MÖNSTER [| MÖNSTER]...) KOMMANDON ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if KOMMANDON; then KOMMANDON; [ elif KOMMANDON; then KOMMANDON; ]... [ else "
+"KOMMANDON; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while KOMMANDON; do KOMMANDON; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until KOMMANDON; do KOMMANDON; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr "coproc [NAMN] kommando [omdirigeringar]"
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr "function namn { KOMMANDON ; } or namn () { KOMMANDON ; }"
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr "{ KOMMANDON ; }"
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr "jobbspec [&]"
+
+#: builtins.c:206
+msgid "(( expression ))"
+msgstr "(( uttryck ))"
+
+#: builtins.c:208
+msgid "[[ expression ]]"
+msgstr "[[ uttryck ]]"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr "variabler - Namn och betydelse av några skalvariabler"
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [-n] [+N | -N | kat]"
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [-n] [+N | -N]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o] [flgnamn ...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr "printf [-v var] format [argument]"
+
+#: builtins.c:229
+#, fuzzy
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+"complete [-abcdefgjksuv] [-pr] [-o flagga] [-A åtgärd] [-G globmnst] [-W "
+"ordlista] [-F funktion] [-C kommando] [-X filtermnst] [-P prefix] [-S "
+"suffix] [namn ...]"
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+"compgen [-abcdefgjksuv] [-o flagga] [-A åtgärd] [-G globmnst] [-W "
+"ordlista] [-F funktion] [-C kommando] [-X filtermnst] [-P prefix] [-S "
+"suffix] [ord]"
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "compopt [-o|+o flagga] [namn ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"mapfile [-n antal] [-O start] [-s antal] [-t] [-u fb] [-C återanrop] [-c "
+"kvanta] [vektor]"
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"readarray [-n antal] [-O start] [-s antal] [-t] [-u fb] [-C återanrop] [-c "
+"kvanta] [vektor]"
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"Definiera eller visa alias.\n"
+" \n"
+" Utan argumen skriver \"alias\" listan på alias på den återanvändbara "
+"formen\n"
+" \"alias NAMN=VÄRDE\" på standard ut.\n"
+" \n"
+" Annars är ett alias definierat för varje NAMN vars VÄRDE är angivet.\n"
+" Ett avlutande blanktecken i VÄRDE gör att nästa ord undersöks för\n"
+" aliassubstitution när aliaset expanderas.\n"
+" \n"
+" Flaggor:\n"
+" -p\tSkriv alla definerade alias i på en återanvändbar form\n"
+" \n"
+" Slutstatus:\n"
+" alias returnerar sant om inte ett NAMN ges för vilket inget alias har\n"
+" definierats."
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Ta bort alla NAMN från listan med definierade alias.\n"
+" \n"
+" Flaggor:\n"
+" -a\tta bort alla aliasdefinitioner.\n"
+" \n"
+" Returnerar framgång om inte ett NAMN inte är ett existerande alias."
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+"Sätt Readline-tangentbindningar och -variabler.\n"
+" \n"
+" Bind en tangentsekvens till en Readline-funktion eller -makro, eller "
+"sätt\n"
+" en Readline-variabel. Syntaxen för argument vid sidan om flaggor är\n"
+" densamma som den i ~/.inputrc, men måste skickas som ett ensamt "
+"argument:\n"
+" t.ex., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Flaggor:\n"
+" -m tangentkarta Använt TANGENTKARTA som tangentkarta under detta\n"
+" kommando. Acceptabla tangentkartenamn är emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command och vi-insert.\n"
+" -l Lista namnen på funktioner.\n"
+" -P List funktionsnamn och bindningar.\n"
+" -p List funktioner och bindningar på ett sätt som kan\n"
+" återanvändas som indata.\n"
+" -S Lista tangentsekvenser som anropar makron och "
+"deras\n"
+" värden.\n"
+" -s Lista tangentskevenser som anropar makron och "
+"deras\n"
+" värden på ett sätt som kan återanvändas som "
+"indata.\n"
+" -V Lista variabelnamn och värden\n"
+" -v Lista variabelnamn och värden på ett sätt som kan\n"
+" återanvändas som indata.\n"
+" -q funktionsnamn Fråga efter vilka tangenter som anroper den "
+"namngivna\n"
+" funktionen\n"
+" -u funktionsnamn Tag bort alla tangenter som är bundna till den\n"
+" namngivna funktionen.\n"
+" -r tangentsekv Ta bort bindningen för TANGENTSEKV.\n"
+" -f filnamn Läs tangentbindningar från FILNAMN.\n"
+" -x tangentsekv:skalkommando Görs så att SKALKOMMANDO körs när\n"
+" \t\t\t\t TANGENTSEKV skrivs.\n"
+" \n"
+" Slutstatus:\n"
+" bind returnerar 0 om inte en okänd flagga ges eller ett fel inträffar."
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Avsluta for-, while- eller until-slinga.\n"
+" \n"
+" Avsluta en FOR-, WHILE eller UNTIL-slinga. Om N anges, avbryt N\n"
+" omslutande slingor.\n"
+" \n"
+" Slutstatus:\n"
+" Returvärdet är 0 förutsatt att N är större eller lika med 1."
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Ã…teruppta for-, while eller until-slinga.\n"
+" \n"
+" Återuppta nästa iteration i den omslutande FOR-, WHILE- eller UNTIL-"
+"slingan.\n"
+" Om N anges, återuppta den N:e omslutande slingan.\n"
+" \n"
+" Slutstatus:\n"
+" Slutstatus är 0 förutsatt att N är större eller lika med 1."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+"Exekvera en i skalet inbyggd funktion.\n"
+" \n"
+" Exekvera SKALINBYGGD med argument ARG utan att utföra "
+"kommandouppslagning.\n"
+" Detta är användbart när du vill implementera om en inbyggd funktion i\n"
+" skalet som en skalfunktion, men behöver köra den inbyggda funktionen i\n"
+" skalfunktionen.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar slutstatus från SKALINBYGGD, eller falkst om SKALINBYGGD "
+"inte\n"
+" är inbyggd i skalet."
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+"Returnera kontexten för det aktuella funktionsanropet.\n"
+" \n"
+" Utan UTTR, returneras \"$rad $filnamn\". Med UTTR, returneras\n"
+" \"$rad $subrutin $filnamn\". Denna extra information kan användas för\n"
+" att ge en stackspårning.\n"
+" \n"
+" Värdet på UTTR indikerar hur många anropsramar att gå tillbaka före den\n"
+" aktuella, toppramen är ram 0.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar 0 om inte skalet inte kör en skalfunktion eller UTTR är\n"
+" ogiltigt."
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+"Ändra skalets arbetskatalog.\n"
+" \n"
+" Ändra den aktuella katalogen till KAT. Standardvärde på KAT är värdet\n"
+" på skalvariabeln HOME.\n"
+" \n"
+" Variabeln CDPATH definierar sökvägen för katalogen som innehåller KAT.\n"
+" Alternativa katalognamn i CDPATH separeras av ett kolon (:). Ett tomt\n"
+" katalognamn är detsamma som aktuell katalog. Om KAT börjar med ett\n"
+" snedstreck (/) används inte CDPATH.\n"
+" \n"
+" Om katalogen inte kan hittas, och skalvariabeln \"cdable_vars\" är "
+"satt,\n"
+" antas ordet vara ett variabelnamn. Om den variabeln har ett värde\n"
+" används dess värde för KAT.\n"
+" \n"
+" Flaggor:\n"
+" -L\tframtvinga att symboliska länkar följs\n"
+" -P\tanvänd den fysiska katalogstrukturen utan att följa\n"
+" \tsymboliska länkar\n"
+" \n"
+" Standardvärde är att följa symboliska längar, som om \"-L\" vore "
+"angivet.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar 0 om katalogen är ändrad; skilt från noll annars."
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+"Skriv namnet på den aktuella arbetskatalogen.\n"
+" \n"
+" Flaggor:\n"
+" -L\tskriv värdet på $PWD om det är namnet på den aktuella\n"
+" \tarbetskatalogen\n"
+" -P\tskriv den fysiska katalogen, utan några symboliska länkar\n"
+" \n"
+" Som standard beter sig \"pwd\" som om \"-L\" vore angivet.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar 0 om inte en ogiltig flagga anges eller den aktuella "
+"katalogen\n"
+" inte kan läsas."
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Tomt kommando.\n"
+" \n"
+" Ingen effekt. Kommandot gör ingenting.\n"
+" \n"
+" Slutstatus:\n"
+" Lyckas alltid."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Returnerar ett lyckat resultat.\n"
+" \n"
+" Slutstatus:\n"
+" Lyckas alltid."
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+"Returnera ett misslyckat resultat.\n"
+" \n"
+" Slutstatus:\n"
+" Misslyckas alltid."
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+"Exekvera ett enkelt kommando eller visa information om kommandon.\n"
+" \n"
+" Kör KOMMANDO med ARGument och utelämna uppslagning av skalfunktioner,\n"
+" eller visa information om det angivna KOMMANDOt. Kan användas för att\n"
+" anropa kommandon på disk när det finns en funktion med samma namn.\n"
+" \n"
+" Flaggor:\n"
+" -p\tanvänd ett standardvärde på PATH som är garanterat att hitta\n"
+" \talla standardverktygen\n"
+" -v\tskriv en beskrivning av KOMMANDO liknande den inbyggda \"type\"\n"
+" -V\tskriv en mer utförlig beskrivning om varje KOMMANDO\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar slutstatus från KOMMANDO, eller misslyckande om KOMMANDO "
+"inte\n"
+" finns."
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Sätt variabelvärden och -attribut.\n"
+" \n"
+" Deklarera variabler och ge dem attribut. Om inget NAMN anges, visa\n"
+" attributen och värdena på alla variabler.\n"
+" \n"
+" Flaggor:\n"
+" -f\tbegränsa åtgärden till att visa funktionsnamn och -definitioner\n"
+" -F\tbegränsa visandet till endast funktionsnamn (plus radnummer\n"
+" \toch källkodsfil vid felsökning)\n"
+" -p\tvisa attributen och värden på varje NAMN\n"
+" \n"
+" Flaggor som sätter attribut:\n"
+" -a\tför att göra NAMN till indexerade vektorer (om det stöds)\n"
+" -A\tför att göra NAMN till associativa vektorer (om det stöds)\n"
+" -i\tför att ge NAMN attributet \"heltal\"\n"
+" -l\tför att konvertera NAMN till gemena vid tilldelning\n"
+" -r\tför att göra NAMN endast läsbart\n"
+" -t\tför att ge NAMN attributet \"spåra\"\n"
+" -u\tför att konvertera NAMN till versaler vid tilldelning\n"
+" -x\tför att exportera NAMN\n"
+" \n"
+" Användning av \"+\" istället för \"-\" slår av det angivna attributet.\n"
+" \n"
+" För variabler med attributet heltal utförs atitmetisk beräkning (se\n"
+" kommandot \"let\") när variabeln tilldelas ett värde.\n"
+" \n"
+" Vid användning i en funktion gör \"declare\" NAMN lokala, som med "
+"kommandot\n"
+" \"local\".\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga ges eller ett fel "
+"inträffar."
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+"Sätt variabelvärden och -attribut.\n"
+" \n"
+" Föråldrat. Se \"help declare\"."
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+"Definiera lokala variabler.\n"
+" \n"
+" Skapa en lokal variabel kallad NAMN, och ge den VÄRDE. FLAGGA kan\n"
+" vara alla flaggor som accepteras av \"declare\".\n"
+" \n"
+" Lokala variabler kan endast användas i en funktion; de är synliga "
+"endast\n"
+" för funktionen de definieras i och dess barn.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga ges, ett fel inträffar\n"
+" eller skalet inte exekverar en funktion."
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Skriv argument på standard ut.\n"
+" \n"
+" Visa ARGumenten på standard ut följt av en nyrad.\n"
+" \n"
+" Flaggor:\n"
+" -n\tlägg inte till en nyrad\n"
+" -e\taktivera tolkning av nedanstående specialsekvenser\n"
+" -E\tundertryck uttryckligen tolkning av specialsekvenser\n"
+" \n"
+" \"echo\" tolkar följande bakstrecksekvenser:\n"
+" \\a\talarm (klocka)\n"
+" \\b\tbacksteg\n"
+" \\c\tundertryck följande utdata\n"
+" \\e\tescape-tecknet\n"
+" \\f\tsidmatning\n"
+" \\n\tnyrad\n"
+" \\r\tvagnretur\n"
+" \\t\thorisontell tabulator\n"
+" \\v\tvertikal tabulator\n"
+" \\\\\tbakstreck\n"
+" \\0nnn\ttecknet vars ASCII-kod är NNN (oktalt). NNN kan vara\n"
+" \t0 till 3 oktala siffror\n"
+" \\xHH\tdet åttabitarstecken vars värde är HH (hexadecimalt). HH\n"
+" \tkan vara en eller två hexadecimala siffror\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte ett skrivfel inträffar."
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Skriv argument på standard ut.\n"
+" \n"
+" Visa ARGumenten på standard ut följt av en nyrad.\n"
+" \n"
+" Flaggor:\n"
+" -n\tlägg inte till en nyrad\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte ett skrivfel inträffar."
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+"Aktivera och avaktivera inbyggda kommandon i skalet.\n"
+" \n"
+" Aktiverar och avaktiverar inbyggda skalkommandon. Avaktivering låter\n"
+" dig exekvera diskkommandon som har samma namn som ett inbyggt\n"
+" skalkommando utan att använda en fullständig sökväg.\n"
+" \n"
+" Flaggor:\n"
+" -a\tskriv en lista av inbyggda kommando och visa om de är\n"
+" \taktiverade eller ej\n"
+" -n\tavaktivera varje NAMN eller visa en lista av avaktiverade\n"
+" \tkommandon\n"
+" -p\tskriv listan av inbyggda kommandon på en återanvändningsbar\n"
+" \tform\n"
+" -s\tskriv endast namnen på Posix \"special\"-inbyggda\n"
+" \n"
+" Flaggor som styr dynamisk inläsning:\n"
+" -f\tLäs int inbyggt NAMN från en delad objektfil FILNAMN\n"
+" -d\tTa bort en inbyggd inläst med -f\n"
+" \n"
+" Utan flaggor aktiveras varje NAMN.\n"
+" \n"
+" För att använda den \"test\" som finns i sökvägen istället för den i\n"
+" skalet inbyggda versionen, skriv \"enable -n test\".\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte NAMN inte är inbyggd i skalet eller ett fel\n"
+" inträffar."
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+"Exekvera argument som ett skalkommando.\n"
+" \n"
+" Kombinera ARGument till en enda sträng, och använd resultatet som "
+"indata\n"
+" till skalet och exekvera de resulterande kommandona.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar slutstatus av kommandot eller framgång om kommandot är tomt."
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+"Tolka flaggargument.\n"
+" \n"
+" Getopts används av skalprocedurer för att tolka positionsparametrar\n"
+" som flaggor.\n"
+" \n"
+" FLGSTRÄNG innehåller de flaggtecken som skall kännas igen. Om ett\n"
+" tecken följs av ett kolon förväntas flaggan ha ett argument, som\n"
+" skall separeras från den med blanktecken.\n"
+" \n"
+" Varje gång det anropas kommer getopts placera nästa flagga i skal-\n"
+" variabeln $namn, initiera namnet om det inte redan finns, och\n"
+" index på nästa argument läggas i skalvariabeln OPTIND. OPTIND\n"
+" initieras till 1 varje gång skalet eller ett skalskrpt startas. När\n"
+" en flagga behöver ett argument placerar getopts det argumentet i\n"
+" skalvariabeln OPTARG.\n"
+" \n"
+" getopts rapporterar fel på ett av två sätt. Om det första tecknet\n"
+" i OPTSTRING är ett kolon använder getopts tyst felrapportering. I\n"
+" detta läge skrivs inget felmeddelande ut. Om en ogiltig flagga ses\n"
+" placerar getopts det funna flaggtecknet i OPTARG. Om ett nödvändigt\n"
+" argument inte finns placerar getopts ett \":\" i NAMN och sätter OPTARG\n"
+" till det funna flaggtecknet. Om getopts inte är i tyst läge och en\n"
+" felaktig flagga upptäcks placerar getopts \"?\" i NAMN och tar bort\n"
+" OPTARG. Om ett nödvändigt argument inte hittas placeras ett \"?\" i\n"
+" NAMN, OPTARG tas bort och ett felmeddelande skrivs.\n"
+" \n"
+" Om skalvariabeln OPTERR har värdet 0 avaktiverar getopts utskriften\n"
+" av felmeddelanden, även om det första tecknet i FLGSTRÄNG inte är ett\n"
+" kolon. OPTERR har värdet 1 som standard.\n"
+" \n"
+" Getopts tolkar normalt positionsparametrarna ($0 - $9), men om fler\n"
+" argument ges tolkas de istället.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om en flagga hittas, misslyckas om slutet av\n"
+" flaggorna nås eller ett fel inträffar."
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+"Ersätt skalet med det givna kommandot.\n"
+" \n"
+" Exekvera KOMMANDO genom att ersätta detta skal med det angivna "
+"programmet.\n"
+" ARGUMENT blir argument till KOMMANDO. Om KOMMANDO inte anges kommer\n"
+" eventuella omdirigeringar att gälla för det aktuella skalet.\n"
+" \n"
+" Flaggor:\n"
+" -a namn\tskicka NAMN som det nollte argumentet till KOMMANDO\n"
+" -c\texekvera KOMMANDO med en tom miljö\n"
+" -l\tplacera ett streck i det nollte argumentet till KOMMANDO\n"
+" \n"
+" Om kommandot inte kan exekveras avslutar ett ickeinteraktivt skal, om\n"
+" inte skalflaggan \"execfail\" är satt.\n"
+" \n"
+" Sluttatus:\n"
+" Returnerar framgång om inte KOMMANDO inte finns eller ett fel vid\n"
+" omdirigering inträffar."
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"Avsluta skalet.\n"
+" \n"
+" Avslutar skalet med statusen N. Om N utelämnas är slutstatusen den\n"
+" hos det sist körda kommandot."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+"Avsluta ett inloggningsskal.\n"
+" \n"
+" Avslutar ett inloggningsskal med slutstatus N. Returnerar ett fel om\n"
+" det inte körs i ett inloggningsskal."
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+"Visa eller kör kommandon från historielistan.\n"
+" \n"
+" fc används för att lista eller redigera och köra om kommandon från\n"
+" historielistan. FÖRSTA och SISTA kan vara tal som anger intervallet,\n"
+" eller så kan FÖRSTA vara en sträng, som betyder det senaste kommandot\n"
+" som börjar med den strängen.\n"
+" \n"
+" Flaggor:\n"
+" -e RNAMN\tvälj vilken redigerar som skall användas. Standard är\n"
+" \t\tFCEDIT, sedan EDITOR, sedan vi\n"
+" -l \tlista rader istället för att redigera\n"
+" -n\tutelämna radnummer vid listningen\n"
+" -r\treversera ordningen på raderna (nyaste listas först)\n"
+" \n"
+" Med formatet \"fc -s [mnst=ers ...] [kommando]\" körs KOMMANDO om efter\n"
+" att substitutionen GAMMALT=NYTT har utförts.\n"
+" \n"
+" Ett användbart alias att använda med detta är r=\"fc -s\", så att "
+"skriva\n"
+" \"r cc\" kör senaste kommandot som börjar med \"cc\" och att skriva \"r"
+"\" kör\n"
+" om senaste kommandot.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång eller status på exekverat kommando, skilt från noll\n"
+" om ett fel inträffar."
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"Flytta ett jobb till förgrunden.\n"
+" \n"
+" Placera jobbet som identifieras av JOBBSPEC i förgrunden, och gör det\n"
+" till det aktuella jobbet. Om ingen JOBBSPEC finns används skalets\n"
+" begrep om det aktuella jobbet.\n"
+" \n"
+" Slutstatus:\n"
+" Status på kommandot som placerades i förgrunden, eller misslyckande om\n"
+" ett fel inträffar."
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Flytta jobb till bakgrunden.\n"
+" \n"
+" Placera jobben som idintifieras av varje JOBBSPEC i bakgrunden som om "
+"de\n"
+" hade startats med \"&\". Om ingen JOBBSPEC finns används skalets "
+"begrepp\n"
+" om det aktuella jobbet.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte jobbstyrning inte är aktiverat eller ett "
+"fel\n"
+" inträffar."
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+"Kom ihåg eller visa programlägen.\n"
+" \n"
+" Bestäm och kom ihåg den fullständiga sökvägen till varje kommando NAMN.\n"
+" Om inget argument ges visas information om kommandon som finns i "
+"minnet.\n"
+" \n"
+" Flaggor:\n"
+" -d\t\tglöm platsen i minnet för varje NAMN\n"
+" -l\t\tvisa i ett format som kan återanvändas som indata\n"
+" -p sökväg \tanvänd SÖKVÄG som den fullständiga sökvägen till NAMN\n"
+" -r\t\tglömm alla platser i minnet\n"
+" -t\t\tskriv platsen i minnet för varje NAMN, med NAMN före\n"
+" \t\tvarje motsvarande plats om flera NAMN ges\n"
+" Argument:\n"
+" NAMN\t\tVarje NAMN söks efter i $PATH och läggs till i listan\n"
+" \t\tav kommandon i minnet.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte NAMN inte hittas eller en ogiltig flagga ges."
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+"Visa information om inbyggda kommandon.\n"
+" \n"
+" Visar korta sammanfattningar om inbyggda kommandon. Om MÖNSTER anges\n"
+" ges detaljerad hjälp om alla kommandon som matchar MÖNSTER, annars "
+"skrivs\n"
+" listan med hjälpämnen.\n"
+" \n"
+" Flaggor:\n"
+" -d\tvisa en kort beskrivning för varje ämne\n"
+" -m\tvisa användning i låtsas-mansideformat\n"
+" -s\tvisa endast ett kort användningsformat för varje ämne som\n"
+" \tmatchar MÖNSTER\n"
+" \n"
+" Argument:\n"
+" MÖNSTER\tMönster som anger hjälpämnen\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte MÖNSTER inte finns eller en ogiltig flagga "
+"ges."
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Visa eller hantera historielistan.\n"
+" \n"
+" Visa historielistan med radnummer, inled varje modifierad post med en\n"
+" \"*\". Ett argument N listar endast de N senaste posterna.\n"
+" \n"
+" Flaggor:\n"
+" -c\tnollställ historielistan genom att ta bort alla poster\n"
+" -d avstånd\tta bort historieposten på avstånd AVSTÅND\n"
+" \n"
+" -a\tlägg till historierader från denna session till historiefilen\n"
+" -n\tläs alla historierader som inte redan lästs från historiefilen\n"
+" -r\tläs historiefilen och lägg till innehållet till historielistan\n"
+" -w\tskriv den aktuella historien till hstoriefilen och lägg till\n"
+" \tdem till historielistan\n"
+" \n"
+" -p\tutför historieexpansion på varje ARG och visa resultatet utan\n"
+" \tatt lagra det i historielistan\n"
+" -s\tlägg till ARG till historielistan som en ensam post\n"
+" \n"
+" Om FILENAMN anges används det som historiefil. Annars, om $HISTFILE "
+"har\n"
+" ett värde används det, annars ~/.bash_history.\n"
+" \n"
+" Om variabeln $HISTTIMEFORMAT är satt och inte tom används dess värde "
+"som\n"
+" en formatsträng till strftime(3) för att skriva tidsstämplar "
+"tillhörande\n"
+" varje visad historiepost. Inga tidsstämplar skrivs annars.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga ges eller ett fel "
+"inträffar."
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+"Visa status på jobb.\n"
+" \n"
+" Lista de aktiva jobben. JOBBSPEC begränsar utdata till det jobbet.\n"
+" Utan flaggor visas status på alla aktiva jobb.\n"
+" \n"
+" Flaggor:\n"
+" -l\tlistar process-id:n utöver den normala informationen\n"
+" -n\tlistar endast processer som har ändrat status sedan senaste\n"
+" \tnotifiering\n"
+" -p\tlistar endast process-id:n\n"
+" -r\tbegränsar utdata till körande jobb\n"
+" -s\tbegränsar utdata till stoppade jobb\n"
+" \n"
+" Om -x anges körs KOMMANDO efter alla jobbspecifikationer som förekommer\n"
+" i ARG har ersatts med process-id:t för det jobbets processgruppledare.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga ges eller ett fel "
+"inträffar.\n"
+" Om -x används returneras slutstatus från KOMMANDO."
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+"Ta bort jobb från det aktuella skalet.\n"
+" \n"
+" Tar bort varje JOBBSPEC-argument från tabellen över aktiva jobb. Utan\n"
+" någon JOBBSPEC använder skalet sitt begrepp om det aktuella jobbet.\n"
+" \n"
+" Flaggor:\n"
+" -a\tta bort alla jobb om JOBBSPEC inte anges\n"
+" -h\tmärk varje JOBBSPEC så att SIGHUP inte skickas till jobbet om\n"
+" \tskalet tar emot en SIGHUP\n"
+" -r\ttar bara bort körande jobb\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga eller JOBBSPEC ges."
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Skicka en signal till ett jobb.\n"
+" \n"
+" Skicka processerna som identifieras av PID eller JOBBSPEC signalerna "
+"som\n"
+" namnges av SIGSPEC eller SIGNUM. Om varken SIGSPEC eller SIGNUM är\n"
+" angivna antas SIGTERM.\n"
+" \n"
+" Flaggor:\n"
+" -s sig\tSIG är ett signalnamn\n"
+" -n sig\tSIG är ett signalnummer\n"
+" -l\tlista signalnamnen. Om argument följer \"-l\" antas de vara\n"
+" \tsignalnummer som namn skall listas för\n"
+" \n"
+" Kill är inbyggt i skalet av två skäl: det tillåter att jobb-id:n "
+"används\n"
+" istället för process-id:n, och det tillåter processer att dödas om "
+"gränsen\n"
+" för hur många processer du får skapa har nåtts.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga angivits eller ett fel\n"
+" inträffar."
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+"Evaluera aritmetiska uttryck.\n"
+" \n"
+" Evaluera varje ARG som ett aritmetiskt uttryck. Evaluering görs i "
+"heltal\n"
+" med fix bredd utan kontroll av spill, fast division med 0 fångas och\n"
+" flaggas som ett fel. Följande lista över operatorer är grupperad i\n"
+" nivåer av operatorer med samma precedens. Nivåerna är listade i "
+"ordning\n"
+" med sjunkande precedens.\n"
+" \n"
+" \tid++, id--\tpostinkrementering av variabel, postdekrementering\n"
+" \t++id, --id\tpreinkrementering av variabel, predekrementering\n"
+" \t-, +\t\tunärt minus, plus\n"
+" \t!, ~\t\tlogisk och bitvis negering\n"
+" \t**\t\texponentiatiering\n"
+" \t*, /, %\t\tmultiplikation, division, rest\n"
+" \t+, -\t\taddition, subtraktion\n"
+" \t<<, >>\t\tvänster och höger bitvisa skift\n"
+" \t<=, >=, <, >\tjämförelse\n"
+" \t==, !=\t\tlikhet, olikhet\n"
+" \t&\t\tbitvis OCH\n"
+" \t^\t\tbitvis EXKLUSIVT ELLER\n"
+" \t|\t\tbitvis ELLER\n"
+" \t&&\t\tlogiskt OCH\n"
+" \t||\t\tlogiskt ELLER\n"
+" \tuttf ? uttr : uttr\n"
+" \t\t\tvillkorlig operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\ttilldelning\n"
+" \n"
+" Skalvariabler är tillåtna som operander. namnet på variablerna ersätts\n"
+" med deras värde (omformat till ett heltal med fix bredd) inom ett\n"
+" uttryck. Variablerna behöver inte ha sina heltalsattribut påslagna för\n"
+" att användas i ett uttryck.\n"
+" \n"
+" Operatorer beräknas i precedensordning. Delutryck i parenteser "
+"beräknas\n"
+" först och kan åsidosätta precedensreglerna ovan.\n"
+" \n"
+" Slutstatus:\n"
+" Om det sista ARG beräknas till 0, returnerar let 1; let returnerar 0 "
+"annars."
+
+#: builtins.c:966
+#, fuzzy
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+"Läs en rad från standard in och dela upp den i fält.\n"
+" \n"
+" Läser en ensam rad från standard in, eller från filbeskrivare FB om\n"
+" flaggan -u ges. Raden delas upp i fält som vid orduppdelning, och "
+"första\n"
+" ordet tilldelas det första NAMNet, andra ordet till det andra NAMNet, "
+"och\n"
+" så vidare, med eventuella återstående ord tilldelade till det sista\n"
+" NAMNet. Endast tecknen som finns i $IFS används som ordavgränsare.\n"
+" \n"
+" Om inga NAMN anges, lagras den inlästa raden i variabeln REPLY.\n"
+" \n"
+" Flaggor:\n"
+" -a vektor\ttilldela de inlästa orden till sekvensiella index i "
+"vektor-\n"
+" \t\tvariabeln VEKTOR, med start från noll\n"
+" -d avgr\tfortsätt tills det första tecknet i AVGR lästs, istället för\n"
+" \t\tnyrad\n"
+" -e\t\tanvänd Readline för att få in raden i ett interaktivt\n"
+" \t\t\tskal\n"
+" -i text\tAnvänd TEXT som starttext för Readline\n"
+" -n ntkn\treturnera efter att ha läst NTKN tecken istället för att\n"
+" \t\tvänta på en nyrad\n"
+" -p prompt\tskriv ut strängen PROMPT utan en avslutande nyrad före\n"
+" \t\tförsök att läsa\n"
+" -r\t\ttillåt inte bakstreck att skydda några tecken\n"
+" -s\t\teka inte indata som kommer från terminalen\n"
+" -t tidgräns\tsluta vänta och returnera misslyckande om inte en\n"
+" \t\tkomplett rad lästs inom TIDSGRÄNS sekunder. Värdet på variabeln\n"
+" \t\tTMOUT är standardvärdet på tidsgränsen. TIDSGRÄNS kan vara ett\n"
+" \t\tbråktal. Om TIDSGRÄNS är 0 returnerar read lyckad status bara\n"
+"\t\tom det finns indata tillgängligt på den angivna filbeskrivaren.\n"
+" Slutstatus är större än 128 om tidsgränsen överskrids\n"
+" -u fb\t\tläs från filbeskrivare FB istället för standard in\n"
+" \n"
+" Slutstatus:\n"
+" Returkoden är noll om inte filslut nås, läsningens tidsgräns överskrids\n"
+" eller en ogiltig filbeskrivare ges som argument till -u."
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+"Returnera från en skalfunktion.\n"
+" \n"
+" Får en funktion eller ett källinläst skript att avsluta med returvärdet\n"
+" som anges av N. Om N utelämnas är returstatus den hos det sista\n"
+" kommandot som körts i funktionen eller skriptet.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar N, eller misslyckande om skalet inte kör en funktion eller\n"
+" skript."
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+"Sätt eller ta bort satta värden på skalflaggor och positionsparametrar.\n"
+" \n"
+" Ändra värdet på skalattribut och positionsparametrar, eller visa namnen\n"
+" och värdena på skalvariabler.\n"
+" \n"
+" Flaggor:\n"
+" -a Markera variabler om ändras eller skapas för export.\n"
+" -b Rapportera om avlutade jobb omedelbart.\n"
+" -e Avsluta omedelbart om ett kommando avslutar med nollskild status.\n"
+" -f Avaktivera filnamnsgenerering (globbing).\n"
+" -h Kom ihåg platsen för kommandon när de slås upp.\n"
+" -k Alla tilldelningsargument placeras i miljön för ett kommando, "
+"inte\n"
+" bara de som föregår kommandonamnet.\n"
+" -m Jobbstyrning är aktiverat.\n"
+" -n Läs kommandon men exekvera dem inte.\n"
+" -o flaggnamn\n"
+" Sätt variabeln som motsvarar flaggnamn:\n"
+" allexport samma som -a\n"
+" braceexpand samma som -B\n"
+" emacs använd radredigeringsgränssnitt i emacsstil\n"
+" errexit samma som -e\n"
+" errtrace samma som -E\n"
+" functrace samma som -T\n"
+" hashall samma som -h\n"
+" histexpand samma som -H\n"
+" history aktivera kommandohistoria\n"
+" ignoreeof skalet kommer inte avsluta vid läsning av "
+"filslut\n"
+" interactive-comments\n"
+" tillåt kommentarer att förekomma i interaktiva\n"
+" kommandon\n"
+" keyword samma som -k\n"
+" monitor samma som -m\n"
+" noclobber samma som -C\n"
+" noexec samma som -n\n"
+" noglob samma som -f\n"
+" nolog accepteras men ignoreras för närvarande\n"
+" notify samma som -b\n"
+" nounset samma som -u\n"
+" onecmd samma som -t\n"
+" physical samma som -P\n"
+" pipefail returvärdet av ett rör är status på det sista\n"
+" kommandot som avslutas med en status skild från\n"
+" noll, eller nol om inget kommando avslutas med\n"
+" en status skild från noll\n"
+" posix ändra beteendet på bash där standardbeteendet\n"
+" skiljer sig från Posixstandarden till att stämma\n"
+" med standarden\n"
+" privileged samma som -p\n"
+" verbose samma som -v\n"
+" vi använd radredigeringsgränssnitt i vi-stil\n"
+" xtrace samma som -x\n"
+" -p Slås på när den verkliga och effektiva användar-id:n inte stämmer\n"
+" överens. Avaktiverar bearbetning av $ENV-filen och import av\n"
+" skalfunktioner. Att slå av denna flagga får den effektiva uid "
+"och\n"
+" gid att sättas till den verkliga uid och gid.\n"
+" -t Avsluta efter att ha läst och exekverat ett kommando.\n"
+" -u Behandla osatta variabler som fel vid substitution.\n"
+" -v Skriv skalindatarader allteftersom de läses.\n"
+" -x Skriv kommandon och deras argument allteftersom de körs.\n"
+" -B skalet kommer utföra klammerexpansion\n"
+" -C Om satt tillåts inte existerande normala filer att skrivas över\n"
+" av omdirigering av utdata.\n"
+" -E Om satt ärvs ERR-fällan av skalfunktioner.\n"
+" -H Aktivera historiesubstituion i !-stil. Denna flagga är på som\n"
+" standard när skalet är interaktivt.\n"
+" -P Om satt följs inte symboliska länkar när kommandon såsom cd körs\n"
+" som ändrar aktuell katalog.\n"
+" -T Om satt ärvs DEBUG-fällan av skalfunktioner.\n"
+" - Tilldela eventuella återstående argument till "
+"positionsparametrar.\n"
+" Flaggorna -x och -v slås av.\n"
+" \n"
+" Användning av + istället för - får dessa flaggor att slås av. "
+"Flaggorna\n"
+" kan även användas vid uppstart av skalet. Den aktuella uppsättningen\n"
+" flaggor finns i $-. De återstående n ARGumenten är positionsparametrar\n"
+" och tilldelas, i ordning, till $1, $2, .. $n. Om inga ARGument ges\n"
+" skrivs alla skalvariabler ut.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga ges."
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+"Ta bort värden och attribut på skalvariabler och -funktioner.\n"
+" \n"
+" Tag för varje NAMN bort motsvarande variabel eller funktion.\n"
+" \n"
+" Flaggor:\n"
+" -f\tbehandla varje NAMN som en skalfunktion\n"
+" -v\tbehandla varje NAMN som en skalvariabel\n"
+" \n"
+" Utan flaggor försöker unset först att ta bort en variabel, och, om det\n"
+" misslyckas, försöker den ta bort en funktion.\n"
+" \n"
+" Några variabler kan inte tas bort, se även \"readonly\".\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga ges eller NAMN endast är\n"
+" läsbart."
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Sätt exportattribut på skalvariabler.\n"
+" \n"
+" Markerar varje NAMN för automatisk export till miljön för senare\n"
+" exekverade kommandon. Om VÄRDE anges tilldelas VÄRDE före export.\n"
+" \n"
+" Flaggor:\n"
+" -f\treferera till skalfunktioner\n"
+" -n\tta bort exportegenskapen från varje NAMN\n"
+" -p\tvisa en lista av alla exporterade variabler och funktioner\n"
+" \n"
+" Ett argument \"--\" avslutar vidare flaggbearbetning.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga ges eller NAMN är ogiltigt."
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Markera skalvariabler som oföränderliga.\n"
+" \n"
+" Markera varje NAMN som oföränderligt. Värdena på dessa NAMN kan inte\n"
+" ändras av senare tilldelningar. Om VÄRDE anges tilldelas VÄRDE före\n"
+" variabeln markeras oföränderlig.\n"
+" \n"
+" Flaggor:\n"
+" -a\treferera till indexerade vektorvariabler\n"
+" -A\trefererar till assoicativa vektorvariabler\n"
+" -f\treferara till skalfunktioner\n"
+" -p\tvisa en lista över alla oföränderliga variabler och funktioner\n"
+" \n"
+" Ett argument \"--\" avslutar vidare flaggbearbetning.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga ges eller NAMN är ogiltigt."
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+"Skifta positionsparametrar.\n"
+" \n"
+" Byt namn på positionsparametrarna $N+1,$N+2 ... till $1,$2 ... Om N "
+"inte\n"
+" anges antas det vara 1.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte N är negativt eller större än $#."
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+"Exekvera kommandon från en fil i det aktuella skalet.\n"
+" \n"
+" Läs och exekvera kommandon från FILNAMN i det aktuella skalet. "
+"Posterna\n"
+" i $PATH används för att hitta katalogen som innehåller FILNAMN. Om\n"
+" något ARGUMENT ges blir de positionsparametrar när FILNAMN körs.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar status på det sista kommandot som körs i FILNAMN, misslyckas\n"
+" om FILNAMN inte kan läsas."
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Suspendera skalexekvering.\n"
+" \n"
+" Suspendera exekveringen av detta skal tills det får en SIGCONT-signal.\n"
+" Om det inte framtvingas kan inloggningsskal inte suspenderas.\n"
+" \n"
+" Flaggor:\n"
+" -f\tframtvinga suspendering, även om skalet är ett inloggningsskal\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte jobbstyrning inte är aktiverat eller ett "
+"fel\n"
+" inträffar."
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+"Beräkna villkorligt uttryck.\n"
+" \n"
+" Avslutar med en status på 0 (sant) eller 1 (falskt) beroende på\n"
+" beräkningen av UTTR. Uttryck kan vara unära eller binära. Unära\n"
+" uttryck är ofta till för att undersöka status för en fil. Det finns\n"
+" stränoperatorer också, och numeriska jämförelseoperatoer.\n"
+" \n"
+" Filoperatorer:\n"
+" \n"
+" -a FIL Sant om filen finns.\n"
+" -b FIL Sant om filen är en blockspecialfil.\n"
+" -c FIL Sant om filen är en teckenspecialfil.\n"
+" -d FIL Sant om filen är en katalog.\n"
+" -e FIL Sant om filen finns.\n"
+" -f FIL Sant om filen finns, och är en normal fil.\n"
+" -g FIL Sant om filen är sätt-gruppid.\n"
+" -h FIL Sant om filen är en symbolisk länk.\n"
+" -L FIL Sant om filen är en symbolisk länk.\n"
+" -k FIL Sant om filen har \"fastbiten\" satt.\n"
+" -p FIL Sant om filen är ett namngivet rör.\n"
+" -r FIL Sant om filen kan läsas av dig.\n"
+" -s FIL Sant om filen finns och inte är tom.\n"
+" -S FIL Sant om filen är ett uttag (socket).\n"
+" -t FB Sant om FB är öppnad mot en terminal.\n"
+" -u FIL Sant om filen är sätt-användarid.\n"
+" -w FIL Sant om filen är skrivbar av dig.\n"
+" -x FIL Sant om filen är exekverbar av dig.\n"
+" -O FIL Sant om filen ägs av din verksamma användare.\n"
+" -G FIL Sant om filen ägs av din verksamma grupp.\n"
+" -N FIL Sant om filen har ändrats sedan den sist lästes.\n"
+" \n"
+" FIL1 -nt FIL2 Sant om fil1 är nyare än fil2 (enligt\n"
+" modifieringsdatum).\n"
+" \n"
+" FIL1 -ot FIL2 Sant om fil1 är äldre än fil2.\n"
+" \n"
+" FIL1 -ef FIL2 Sant om fil1 är en hård länk till fil2.\n"
+" \n"
+" Strängoperatorer:\n"
+" \n"
+" -z STRÄNG Sant om strängen är tom.\n"
+" \n"
+" -n STRÄNG\n"
+" STRÄNG Sant om strängen inte är tom.\n"
+" \n"
+" STRÄNG1 = STRÄNG2\n"
+" Sant om strängarna är lika.\n"
+" STRÄNG1 != STRÄNG2\n"
+" Sant om strängarna inte är lika.\n"
+" STRÄNG1 < STRÄNG2\n"
+" Sant om STRÄNG1 kommer före STRÄNG2 lexikografiskt.\n"
+" STRÄNG1 > STRÄNG2\n"
+" Sant om STRÄNG1 kommer efter STRÄNG2 lexikografiskt.\n"
+" \n"
+" Andra operatorer:\n"
+" \n"
+" -o FLAGGA Sant om skalflaggan FLAGGA är aktiv.\n"
+" ! UTTR Sant om uttr är falskt.\n"
+" UTTR1 -a UTTR2 Sant om både uttr1 OCH uttr2 är sanna.\n"
+" UTTR1 -o UTTR2 Sant om antingen uttr1 ELLER uttr2 är sanna.\n"
+" \n"
+" arg1 OP arg2 Aritmetiska test. OP är en av -eq, -ne,\n"
+" -lt, -le, -gt eller -ge.\n"
+" \n"
+" Aritmetiska binära operatorer returnerar sant om ARG1 är lika-med,\n"
+" inte-lika-med, mindre-än, mindre-än-eller-lika-med, större-än eller\n"
+" större-än-eller-lika-med ARG2.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om UTTR beräknas till sant. Misslyckas ifall UTTR\n"
+" beräknas till falskt eller ett ogiltigt argument ges."
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"Beräkna villkorligt uttryck.\n"
+" \n"
+" Detta är en synonym till det inbyggda \"test\", men det sista "
+"argumentet\n"
+" måste vara en bokstavlig \"]\", för att matcha den inledande \"[\"."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Visa processtider.\n"
+" \n"
+" Skriver ut den sammanlagda användar- och systemtiden för skalet och "
+"alla\n"
+" dess barnprocesser.\n"
+" \n"
+" Slutstatus:\n"
+" Lyckas alltid."
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+"Fånga signaler och andra händelser.\n"
+" \n"
+" Definierar och aktiverar hanterare som skall köras när skalet tar emot\n"
+" signaler eller andra omständigheter.\n"
+" \n"
+" ARG är ett kommando som skall läsas och exekveras när skalet tar emot\n"
+" signalen SIGNALSPEC. Om ARG inte anges (och en ensam SIGNALSPEC ges)\n"
+" eller \"-\" återställs varje angiven signal till sitt orginalvärde. Om\n"
+" ARG är den tomma strängen ingoreras varje SIGNALSPEC av skalet och av\n"
+" kommandon det startar.\n"
+" \n"
+" Om en SIGNALSPEC är EXIT (0) exekveras ARG vid avslut från skalet. Om\n"
+" en SIGNALSPEC är DEBUG exekveras ARG före varje enkelt kommando.\n"
+" \n"
+" Om inga argument ges skriver trap listan av kommandon som hör till "
+"varje\n"
+" signal.\n"
+" \n"
+" Flaggor:\n"
+" -l\tskriv en lista av signalnamn och deras motsvarande nummer\n"
+" -p\tvisa trap-kommandona associerade med varje SIGNALSPEC\n"
+" \n"
+" Varje SIGNALSPEC är antingen ett signalnamn i <signal.h> eller ett\n"
+" signalnummer. Signalnamn är skiftlägesokänsliga och SIG-prefixet är\n"
+" frivilligt. En signal kan skickas till skalet med \"kill -signal $$\".\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en SIGSPEC är ogiltig eller en ogiltig "
+"flagga\n"
+" ges."
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+"Visa information om kommandotyper.\n"
+" \n"
+" Indikera för varje NAMN hur det skulle tolkats om det användes som ett\n"
+" kommandonamn.\n"
+" \n"
+" Flaggor:\n"
+" -a\tvisa alla platser som innehåller ett körbart program med\n"
+" \tnamnet NAMN, inklusive alias, inbyggda och funktioner, om och endast\n"
+" \tom flaggan \"-p\" inte också används\n"
+" -f\tutelämna uppslagning av skalfunktioner\n"
+" -P\tframtvinga en PATH-sökning för varje NAMN, även om det är ett\n"
+" \talias, inbyggt eller funktion, och returnera namnet på diskfilen som\n"
+" \tskulle blivit exekverad\n"
+" -p\treturnerar antingen namnet på diskfilen som skulle exekverats,\n"
+" \teller ingenting om \"type -t NAMN\" inte skulle returnerat \"file\".\n"
+" -t\tskriv ut ett ensamt ord som är ett av \"alias\", \"keyword\",\n"
+" \t\"function\", \"builtin\", \"file\" eller \"\", om NAMN är ett alias, "
+"ett\n"
+" \treserverat ord i skalet, en skalfunktion, inbyggt i skalet, en "
+"diskfil\n"
+" \trespektive inte finns\n"
+" \n"
+" Argument:\n"
+" NAMN\tKomandonamn som skall tolkas.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om alla NAMNen finns, misslyckas om något inte finns."
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Modifiera skalresursgränser.\n"
+" \n"
+" Ger kontroll över resurserna som är tillgängliga till skalet och "
+"processer\n"
+" det skapar, på system som möjliggör sådan styrning.\n"
+" \n"
+" Flaggor:\n"
+" -S\tanvänd den \"mjuka\" resursgränsen\n"
+" -H\tanvänd den \"hårda\" resursgränsen\n"
+" -a\talla aktuella gränser rapporteras\n"
+" -b\tstorleken på uttagsbuffertar\n"
+" -c\tden maximala storleken på minnesutskrifter som skapas\n"
+" -d\tden maximala storleken på en process datasegmen\n"
+" -e\tden maximala schemaläggningsprioriteten (\"nice\")\n"
+" -f\tden maximala storleken på filer som skrivs av skalet och dess\n"
+" \tbarn\n"
+" -i\tdet maximala antalet väntande signaler\n"
+" -l\tden maximala storleken en process kan låsa i minnet\n"
+" -m\tden maximala residenta mängdstorleken\n"
+" -n\tdet maximala antalet öppna filbeskrivare\n"
+" -p\trörbuffertstorleken\n"
+" -q\tdet maximala antalet byte i POSIX-meddelandeköer\n"
+" -r\tden maximala realtidsschemaläggningsprioriteten\n"
+" -s\tden maximala stackstorleken\n"
+" -t\tden maximala mängden cpu-tid i sekunder\n"
+" -u\tdet maximala antalet användarprocesser\n"
+" -v\tstorleken på det virtuella minnet\n"
+" -x\tdet maximala antalet fillås\n"
+" \n"
+" Om GRÄNS anges är det ett nytt värde för den specificerade resursen; de\n"
+" speciella GRÄNS-värdena \"soft\", \"hard\" och \"unlimited\" står för "
+"den\n"
+" aktuella mjuka gränsen, den aktuella hårda grånsen respektive inge "
+"gräns.\n"
+" Annars skrivs det aktuella värdet på den specificerade resursen. Om\n"
+" ingen flagga ges antas -f.\n"
+" \n"
+" Värden är i 1024-bytesteg, utom för -t som är i sekunder, -p som är i "
+"steg\n"
+" på 512 byte och -u som är ett antal processer utan någon skalning.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga anges eller ett fel "
+"inträffar."
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+"Visa eller sätt filrättighetsmask.\n"
+" \n"
+" Sätter användarens filskapningsmask till RÄTTIGHETER. Om RÄTTIGHETER\n"
+" utelämnas skrivs det aktuella värdet på masken.\n"
+" \n"
+" Om RÄTTIGHETER börjar med en siffra tolkas det som ett oktalt tal, "
+"annars\n"
+" är det en symbolisk rättighetssträng som den som tas av chmod(1).\n"
+" \n"
+" Flaggor:\n"
+" -p\tom RÄTTIGHETER utelämnas, skriv ut i en form som kan\n"
+" \tåteranvändas som indata\n"
+" -S\tgör utmatningen symbolisk, annars används oktala tal\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte RÄTTIGHETER är ogiltig eller en ogiltig "
+"flagga\n"
+" ges."
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Vänta på att jobb blir färdiga och returnerar slutstatus.\n"
+" \n"
+" Väntar på processen som identifieras av ID, som kan vara en process-id\n"
+" eller en jobbspecifikation, och rapportera dess avslutningsstatus. Om\n"
+" ID inte ges, vänta på alla nu körande barnprocesser, och returstatus är\n"
+" noll. Om ID är en jobbspecifikation, vänta på alla processer i det\n"
+" jobbets rör.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar status på ID, misslyckas ifall ID är ogiltig eller en "
+"ogiltig\n"
+" flagga ges."
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Vänta på att en process blir färdig och returnerar slutstatus.\n"
+" \n"
+" Väntar på den angivna processen och rapportera dess avslutningsstatus. "
+"Om\n"
+" PID inte ges, vänta på alla nu körande barnprocesser, och returstatus "
+"är\n"
+" noll. PID måste vara en process-id.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar status på ID, misslyckas ifall ID är ogiltig eller en "
+"ogiltig\n"
+" flagga ges."
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Exekvera kommandon för varje medlem i en lista.\n"
+" \n"
+" \"for\"-slingan exekverar en sekvens av kommandon för varje medlem i en\n"
+" lista av element. Om \"in ORD ...;\" inte är med antas 'in \"$@\"'. "
+"För\n"
+" varje element i ORD sätts NAMN till det elementet, och KOMMANDON\n"
+" exekveras.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar status för det sist exekverade kommandot."
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Aritmetisk for-slinga.\n"
+" \n"
+" Likvärdigt med\n"
+" \t(( UTR1 ))\n"
+" \twhile (( UTR2 )); do\n"
+" \t\tKOMMANDON\n"
+" \t\t(( UTR3 ))\n"
+" \tdone\n"
+" UTR1, UTR2 och UTR3 är aritmetiska uttryck. Om något uttryck utelämnas\n"
+" beter det sig som om det beräknas till 1.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar statusen från det sist exekverade kommandot."
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Välj ord från en lista och exekvera kommandon.\n"
+" \n"
+" ORD expanderas och genererar en lista med ord. Mängden av\n"
+" expanderade ord skrivs på standard fel, vart och ett föregånget\n"
+" av ett tal. Om `in ORD' inte är med antas 'in \"$@\"'. Prompten\n"
+" PS3 skrivs sedan och en rad läses från standard in. OM raden\n"
+" består av numret motsvarande en av de visade orden sätts NAMN\n"
+" till det ordet. Om raden är tom visas ORD och prompten igen.\n"
+" Om filslut läses avslutar kommandot. Alla andra värden får NAMN\n"
+" att bli satt till tomt. Den inlästa raden sparas i variabeln\n"
+" REPLY. KOMMANDON exekveras efter varje val tills ett\n"
+" break-kommando exekveras.\n"
+" \n"
+" Sluttatus:\n"
+" Returnerar statusen från det sist exekverade kommandot."
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+"Rapportera tiden som används av rörets exekvering.\n"
+" \n"
+" Exekvera RÖR och skriv en sammanfattning av den verkliga tiden,\n"
+" användar-CPU-tiden och system-CPU-tiden som använts för att exekvera\n"
+" RÖRet när det avslutar.\n"
+" \n"
+" Flaggor:\n"
+" -p\tskriv tidssammanfattningen i det portabla Posix-formatet\n"
+" \n"
+" Värdet på variablen TIMEFORMAT används som utmatningsformat.\n"
+" \n"
+" Slutstatus:\n"
+" Returstatusen är returstatusen från RÖR."
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Exekvera kommandon baserat på mönstermatchning.\n"
+" \n"
+" Välj att exekvera KOMMANDON baserat på om ORD matchar MÖNSTER. Ett\n"
+" \"|\" används för att separera flera mönster.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar statusen från det sist exekverade kommandot."
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Exekvera kommndon baserat på ett villkor.\n"
+" \n"
+" Listan \"if KOMMANDON\" exekveras. Om des slutstatus är noll så "
+"exekveras\n"
+" listan \"then COMMANDS\". Annars exekveras varje lista \"elif KOMMANDON"
+"\"\n"
+" i tur och ordning, och om dess slutstatus är noll exekveras motsvarande\n"
+" lista \"then COMMANDS\" och if-kommandot avslutar. Annars exekveras "
+"listan\n"
+" \"else COMMANDS\" om den finns. Slutstatus av hela konstruktionen är\n"
+" slutstatusen på det sist exekverade kommandot, eller noll om inget\n"
+" villkor returnerade sant.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar status från det sist exekverade kommandot."
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Exekvera kommandon så länge ett test lyckas.\n"
+" \n"
+" Expandera och exekvera KOMMANDON så länge det sista kommandont i\n"
+" \"while\"-KOMMANDONa har en sluttstatus på noll.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar statusen från det sist exekverade kommandot."
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Exekvera kommandon så länge ett test inte lyckas.\n"
+" \n"
+" Expandera och exekvera KOMMANDON så länge det sista kommandot i\n"
+" \"until\"-KOMMANDONa har en slutstatus som inte är noll.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar statusen från det sist exekverade kommandot."
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+"Skapa en koprocess med namnet NAMN.\n"
+" \n"
+" Kör KOMMANDO asynkront, med standard ut och standard in för kommandot\n"
+" ansluta via ett rör till fildeskriptorer tilldelade indexen 0 och 1 i\n"
+" en vektorvariabel NAMN i skalet som kör. Standardvärde på NAMN är\n"
+" \"COPROC\".\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar statusen från KOMMANDO."
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+"Definiera en skalfunktion.\n"
+" \n"
+" Skapa en skalfunktion med namnet NAMN. När den anropas som ett enkelt\n"
+" kommando kör NAMN KOMMANDON i det anropande skalets kontext. När NAMN\n"
+" anropas skickas argumenten till funktionen som $1...$n och funktionens\n"
+" namn finns i $FUNCNAME.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte NAMN endast är läsbart."
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Gruppera kommandon som en enhet.\n"
+" \n"
+" Kör ett antal kommandon i en grupp. Detta är ett sätt at omdirigera\n"
+" en hel mängd kommandon.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar stutusen från det sist exekverade kommandot."
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+"Återuppta jobb i förgrunden.\n"
+" \n"
+" Likvärdigt med JOBBSPEC-argumentet till kommandot \"fg\". Återuppta\n"
+" ett stoppat eller bakgrundsjobb. JOBBSPEC kan ange antingen ett\n"
+" jobbnamn eller ett jobbnummer. Om JOBBSPEC följs av ett \"&\" placeras\n"
+" jobbet i bakgrunden, som om jobbspecifikationen hade givits som ett\n"
+" argument till \"bg\".\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar statusen på det återupptagna jobbet."
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+"Beräkna aritmetiskt uttryck.\n"
+" \n"
+" UTTRYCKet beräknas enligt reglerna för aritmetisk beräkning.\n"
+" Likvärdigt med \"let UTTRYCK\".\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar 1 om UTTRYCK beräknas till 0, returnerar 0 annars."
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+"Kör ett villkorligt kommando.\n"
+" \n"
+" Returnerar en status av 0 eller 1 beroende på evalueringen av det\n"
+" villkorliga uttrycket UTTRYCK. Uttryck är sammansatta av samma "
+"primitiver\n"
+" som används av det inbyggda \"test\", och kan kombineras med följande\n"
+" operatorer:\n"
+" \n"
+" ( UTTRYCK )\tReturnerar värdet på UTTRYCK\n"
+" ! UTTRYCK\t\tSant om UTTRYCK är falskt, annars falskt\n"
+" UTTR1 && UTTR2\tSant om både UTTR1 och UTTR2 är sanna, annars falskt\n"
+" UTTR1 || UTTR2\tSant om antingen UTTR1 eller UTTR2 är sant, annars\n"
+" falskt\n"
+" \n"
+" När operatorerna \"==\" och \"!=\" används används strängen till höger "
+"om\n"
+" som ett mönster och mönstermatchning utförs. När operatorn \"=~\" "
+"används\n"
+" matchas strängen till höger om operatorn som ett reguljärt uttryck.\n"
+" \n"
+" Operatorerna && och || beräknar inte UTTR2 om UTTR1 är tillräckligt för\n"
+" att avgöra uttryckets värde.\n"
+" \n"
+" Slutstatus:\n"
+" 0 eller 1 beroende på värdet av UTTRYCK."
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+"Vanliga skalvariablers namn och användning.\n"
+" \n"
+" BASH_VERSION\tVersionsinformation för denna Bash.\n"
+" CDPATH\tEn kolonseparerad lista av kataloger att söka i efter\n"
+" \t\tkataloger givna som argument till \"cd\".\n"
+" GLOBIGNORE\tEn kolonseparerad lista av mönster som beskriver filnamn\n"
+" \t\tatt ignorera vid söknamnsexpansion.\n"
+" HISTFILE\tNamnet på filen där din kommandohistorik sparas.\n"
+" HISTFILESIZE\tDet maximala antalet rade denna fil kan innehålla.\n"
+" HISTSIZE\tDet maximala antalet historierade ett körande skal kan\n"
+" \t\tkomma åt.\n"
+" HOME\tDen fullständiga sökvägen till din inloggningskatalog.\n"
+" HOSTNAME\tNamnet på den aktuella värden.\n"
+" HOSTTYPE\tTyp av CPU denna version av Bash kör under.\n"
+" IGNOREEOF\tStyr skalets åtgärd när det tar emot ett filslutstecken\n"
+" \t\tsom enda indata. Om den är satt är dess värde det antal\n"
+" \t\tfilslutstecken som kan ses i rad på en tom rad innan\n"
+" \t\tskalet avslutar (10 som standard). När den inte är satt\n"
+" \t\tbetyder filslut slut på indata.\n"
+" MACHTYPE\tEn sträng som bexkriver det aktuella systemet Bash kör på.\n"
+" MAILCHECK\tHur ofta, i sekunder, Bash tittar efter ny post.\n"
+" MAILPATH\tEn kolonseparerad lista av filnamn som Bash tittar efter\n"
+" \t\tny post i.\n"
+" OSTYPE\tDen version av Unix denna version av Bash kör på.\n"
+" PATH\tEn kolonseparerad lista av kataloger att söka i när\n"
+" \t\tkommandon skall letas upp.\n"
+" PROMPT_COMMAND\tEtt kommando att köra före utskriften av varje\n"
+" \t\tprimär prompt.\n"
+" PS1\t\tDen primära promptsträngen.\n"
+" PS2\t\tDen sekundära promptsträngen.\n"
+" PWD\t\tDet fullständiga söknamnet till den aktuella katalogen.\n"
+" SHELLOPTS\tEn kolonseparerad lista av aktiverade skalflaggor.\n"
+" TERM\tNamnet på den aktuella terminaltypen.\n"
+" TIMEFORMAT\tUtmatningsformatet för tidsstatistik som visas av det\n"
+" \t\treserverade ordet \"time\".\n"
+" auto_resume\tOm inte tomt betyder att ett kommandoord som förekommer\n"
+" \t\tensamt på en rad först letas efter i listan av för tillfället\n"
+" \t\tstoppade jobb. Om det hittas där läggs det jobbet i\n"
+" \t\tförgrunden. Ett värde av \"exact\" betyder att kommandoordet\n"
+" \t\texakt måste stämma med ett kommando i listan över stoppade\n"
+" \t\tjobb. Ett värde av \"substring\" betyder att kommandoordet\n"
+" \t\tmåste stämma med en delsträng av jobbet. Alla andra värden\n"
+" \t\tbetyder att kommandot måste vara ett prefix av ett stoppat\n"
+" \t\tjobb.\n"
+" histchars\tTecken som styr historieexpansion och snabbsubstitution.\n"
+" \t\tDet första tecknet är tecknet för historiesubstitution,\n"
+" \t\tvanligen \"!\". Det andra tecknet är tecknet för \"snabb\n"
+" \t\tsubstitution\", vanligen \"^\". Det tredje är tecknet för\n"
+" \t\t\"historiekommentar\", vanligen \"#\".\n"
+" HISTIGNORE\tEn kolonseparerad lista av mönster som används för att\n"
+" \t\tbestämma vilka kommandon som skall sparas i historielistan.\n"
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Lägg till kataloger på stacken.\n"
+" \n"
+" Lägger till en katalog till toppen av katalogstacken, eller roterar\n"
+" stacken, och gör den nya toppen av stacken till den aktuella\n"
+" arbetskatalogen. Utan argument byts de två toppkatalogerna.\n"
+" \n"
+" Flaggor:\n"
+" -n\tUndertryck det normala bytet av katalog när kataloger\n"
+" \tläggs till på stacken, så att endast stacken ändras.\n"
+" \n"
+" Argument:\n"
+" +N\tRotera stacken så att den N:e katalogen (räknat från\n"
+" \tvänster i listan som visas av \"dirs\", med start på noll) hamnar\n"
+" \tpå toppen.\n"
+" \n"
+" -N\tRotera stacken så att den N:e katalogen (räknat från\n"
+" \thöger i listan som visas av \"dirs\", med start på noll) hamnar\n"
+" \tpå toppen.\n"
+" \n"
+" kat\tLägger till KAT till toppen av katalogstacken, och gör\n"
+" \tden till den nya aktuella arbetskatalogen.\n"
+" \n"
+" Den inbyggda \"dirs\" visar katalogstacken.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte ett ogiltigt argument ges eller bytet av\n"
+" katalog misslyckas."
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Ta bort kataloger från stacken.\n"
+" \n"
+" Tar bort poster från katalogstacken. Utan argument tas toppkatalogen\n"
+" bort från stacken, och byter till den nya toppkatalogen.\n"
+" \n"
+" Flaggor:\n"
+" -n\tUndertryck det normala bytet av katalog när kataloger\n"
+" \ttas bort från stacken, så att endast stacken ändras.\n"
+" \n"
+" Argument:\n"
+" +N\tTar bort den N:e katalogen räknat från vänster i listan\n"
+" \tsom visas av \"dirs\", med start på noll. Till exempel: \"popd +0\"\n"
+" \ttar bort den första katalogen, \"popd +1\" den andra.\n"
+" \n"
+" -N\tTar bort den N:e katalogen räknat från höger i listan\n"
+" \tsom visas av \"dirs\", med start på noll. Till exempel: \"popd -0\"\n"
+" \ttar bort den sista katalogen, \"popd -1\" den näst sista.\n"
+" \n"
+" Den inbyggda \"dirs\" visar katalogstacken.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte ett ogiltigt argument ges eller bytet av\n"
+" katalog misslyckas."
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Visa katalogstacken.\n"
+" \n"
+" Visa listan av kataloger i minnet för närvarande. Kataloger kommer\n"
+" in på listan med kommandot \"pushd\". Du kan komma tillbaka upp genom\n"
+" listan med kommandot \"popd\".\n"
+" \n"
+" Flaggor:\n"
+" -c\tnollställer katalogstacken genom att ta bort alla element\n"
+" -l\tskriv inte ut versioner med tildeprefix av kataloger som\n"
+" \tär relativa till din hemkatalog\n"
+" -p\tskriv katalogstacken med en post per rad\n"
+" -v\tskriv katalogstacken med en post per rad föregångna av\n"
+" \tdess position i stacken\n"
+" \n"
+" Argument:\n"
+" +N\tVisar den N:e posten räknat från vänster i listan som visas\n"
+" \tav dirs när det anropas utan flaggor, med början från noll.\n"
+" \n"
+" -N\tVisar den N:e posten räknat från höger i listan som visas\n"
+" \tav dirs när det anropas utan fläggor, med början från noll.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga ges eller ett fel "
+"inträffar."
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+"Slå på och av skalflaggor.\n"
+" \n"
+" Ändra inställningen av varje flagga FLGNAMN. Utan några flaggargument\n"
+" listas alla skalflaggor med en indikation om var och en är satt.\n"
+" \n"
+" Flaggor:\n"
+" -o\tbegränsa FLGNAMN till de som kan användas med \"set -o\"\n"
+" -p\tskriv raje skalflagga med en indikation på dess status\n"
+" -q\tutelämna utmatning\n"
+" -s\taktivera (slå på) varje FLGNAMN\n"
+" -u\tavaktivera (slå av) varje FLGNAMN\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om FLGNAMN är aktiverat, misslyckas om en ogiltig\n"
+" flagga ges eller FLGNAMN är avaktiverat."
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+"Formatera och skriv ARGUMENT styrda av FORMAT.\n"
+" \n"
+" Flaggor:\n"
+" -v var\ttilldela utdata till skalvariabeln VAR istället för att\n"
+" \t\tskriva den på standard ut\n"
+" \n"
+" FORMAT är en teckensträng som innehåller tre sortes objekt: vanliga\n"
+" tecken, som helt enkelt kopieras till standard ut, teckenstyrsekvenser\n"
+" som konverteras och kopieras till standard ut och "
+"formatspecifikationer,\n"
+" där var och en medför utskrift av det nästföljande argumentet.\n"
+" argument.\n"
+" \n"
+" Förutom de standardformatspecifikationer som beskrivs a printf(1) och\n"
+" printf(3) tolkar printf:\n"
+" \n"
+" %b\texpandera bakstrecksstyrsekvenser i motsvarande argument\n"
+" %q\tcitera argumentet på ett sätt som kan återanvändas som\n"
+" \t\tindata till ett skal\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga ges eller ett skriv-\n"
+" eller tilldelningsfel inträffar."
+
+#: builtins.c:1895
+#, fuzzy
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Ange hur argument skal kompletteras av Readline.\n"
+" \n"
+" För varje NAMN, ange hur argument skall kompletteras. Om inga flaggor\n"
+" är givna skrivs nuvarande kompletteringsspecifikationer ut på ett sätt\n"
+" som gör att de kan användas som indata.\n"
+" \n"
+" Flaggor:\n"
+" -p\tskriv existerande kompletteringsspecifikationer på ett\n"
+" \tåteranvändningsbart format\n"
+" -r\tta bort en kompletteringsspecifikation för varje NAMN eller\n"
+" \tom inga NAMN är givna, alla kompletteringsinformationer\n"
+" \n"
+" När komplettering försöker göras försöks åtgärder i den ordning de\n"
+" versala flaggorna är uppräknade ovan.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga ges eller ett fel "
+"inträffar."
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Visa möjliga kompletteringar beroende på flaggorna.\n"
+" \n"
+" Avsett att användas inifrån en skalfunktion för att generera möjliga\n"
+" kompletteringar. Om det valfria argumentet ORD är givet genereras\n"
+" matchningar av ORD.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga ges eller ett fel "
+"inträffar."
+
+#: builtins.c:1938
+#, fuzzy
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+"Modifiera eller visa kompletteringsflaggor.\n"
+" \n"
+" Modifiera kompletteringsflaggorna för varje NAMN, eller, om inga NAMN "
+"är\n"
+" givna, den komplettering som för närvarande körs. Om ingen FLAGGA är\n"
+" given skrivs kompletteringsflaggorna för varje NAMN eller den aktuella\n"
+" kompletteringsspecifikationen.\n"
+" \n"
+" Flaggor:\n"
+" \t-o flagga\tSätt kompletteringsflagga FLAGGA för varje NAMN\n"
+" \n"
+" Genom att använda \"+o\" istället för \"-o\" slås den angivna flaggan "
+"av.\n"
+" \n"
+" Argument:\n"
+" \n"
+" Varje NAMN refererar till ett kommando för vilket en kompletterings-\n"
+" specifikation måste ha definierats tidigare med det inbyggda \"complete"
+"\".\n"
+" Om inget NAMN ges måste compopt anropas av en funktion som just nu\n"
+" genererar kompletteringar, och flaggorna för den just nu exekverande\n"
+" kompletteringsgeneratorn modifieras.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga ges eller NAMN inte har\n"
+" någon kompletteringsspecifikaation definierad."
+
+#: builtins.c:1968
+#, fuzzy
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+"Läs rader från standard in till en vektorvariabel.\n"
+" \n"
+" Läs rader från standard in till vektorvariabeln VEKTOR, eller från\n"
+" filbeskrivaren FB om flaggan -u ges. Variabeln MAPFILE är standard\n"
+" för VEKTOR.\n"
+" \n"
+" Flaggor:\n"
+" -n antal\tKopiera högs ANTAL rader. Om ANTAL är 0 kopieras alla "
+"rader.\n"
+" -O start\tBörja tilldela till VEKTOR vid index START. Standardindex "
+"är 0.\n"
+" -s antal \tSläng de första ANTAL inlästa raderna.\n"
+" -t\t\tTa bort en avslutande nyrad från varje inläst rad.\n"
+" -u fb\t\tLäs rader från filbeskrivare FB istället för standard in.\n"
+" -C återanrop\tBeräkna ÅTERANROP för varje KVANTA rader som läses.\n"
+" -c kvanta \tAnge antalet rader att läsa mellan varje anrop av\n"
+" \t\t \tÃ…TERANROP.\n"
+" \n"
+" Argument:\n"
+" VEKTOR\t\tNamn på vektorvariabel att använda för fildata.\n"
+" \n"
+" Om -C ges utan -c är standardkvanta 5000. När ÅTERANROP evalueras får\n"
+" den indexet på nästa vektorelement som ett extra argument.\n"
+" \n"
+" Om det inte ges någon specificerad start kommer mapfile nollställa "
+"VEKTOR\n"
+" före tilldelning till den.\n"
+" \n"
+" Slutstatus:\n"
+" Returnerar framgång om inte en ogiltig flagga ges eller VEKTOR är\n"
+" oföränderlig."
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+"Läs rader från en fil till en vektorvariabel.\n"
+" \n"
+" En synonym till \"mapfile\"."
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xrealloc: kan inte reallokera %lu byte (%lu byte allokerade)"
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: kan inte allokera %lu byte"
+
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: %s: %d: kan inte areallokera %lu byte (%lu byte allokerade)"
diff --git a/po/tr.gmo b/po/tr.gmo
new file mode 100644
index 0000000..f3b025b
--- /dev/null
+++ b/po/tr.gmo
Binary files differ
diff --git a/po/tr.po b/po/tr.po
new file mode 100644
index 0000000..d192182
--- /dev/null
+++ b/po/tr.po
@@ -0,0 +1,5510 @@
+# translation of bash-3.2.po to Turkish
+# Copyright (C) 2006 Free Software Foundation, Inc.
+# Nilgün Belma Bugüner <nilgun@buguner.name.tr>, 2006.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bash 3.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2006-10-30 20:00+0200\n"
+"Last-Translator: Nilgün Belma Bugüner <nilgun@buguner.name.tr>\n"
+"Language-Team: Turkish <gnu-tr-u12a@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.1\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "hatalı dizi indisi"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr ""
+
+#: arrayfunc.c:480
+#, fuzzy, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: eylem adı geçersiz"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: sayısal olmayan indise atama yapılamaz"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: oluşturulamıyor: %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr "bash_execute_unix_command: komut için kısayol bulunamıyor"
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr "%s: boÅŸluk olmayan ilk karakter `\"' deÄŸil"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "%2$s içinde kapatan `%1$c' yok"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: ikinokta imi eksik"
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "`%s': kısayol ismi geçersiz"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr ""
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "`%s': kısayol ismi geçersiz"
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: okunamıyor: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "`%s': kısayol değiştirilemiyor"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "`%s': iÅŸlev ismi bilinmiyor"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s için bir kısayol atanmamış.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s bunun üzerinden çağrılabilir: "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr ""
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr "sadece bir `for', `while' veya `until' döngüsünde anlamlı"
+
+#: builtins/caller.def:133
+#, fuzzy
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr "Geçerli altyordam çağrısının bağlamı döner."
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "HOME atanmamış"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "OLDPWD boÅŸ"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr ""
+
+#: builtins/common.c:139 error.c:261
+#, fuzzy, c-format
+msgid "warning: "
+msgstr "%s: uyarı: "
+
+#: builtins/common.c:153
+#, fuzzy, c-format
+msgid "%s: usage: "
+msgstr "%s: uyarı: "
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "çok fazla argüman"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: seçenek bir argüman gerektirir"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: sayısal argüman gerekli"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s:yok"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: seçenek geçersiz"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: seçenek ismi geçersiz"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "`%s': geçerli bir belirteç değil"
+
+#: builtins/common.c:238
+#, fuzzy
+msgid "invalid octal number"
+msgstr "geçersiz sinyal numarası"
+
+#: builtins/common.c:240
+#, fuzzy
+msgid "invalid hex number"
+msgstr "geçersiz sayı"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "geçersiz sayı"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: sinyal belirtimi geçersiz"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "`%s': geçerli bir iş belirtimi veya süreç numarası değil"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: salt okunur deÄŸiÅŸken"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s aralık dışı"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "argüman"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s aralık dışı"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: böyle bir iş yok"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: iÅŸ denetimi yok"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "iÅŸ denetimi yok"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: kısıtlı"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "kısıtlı"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: bir kabuk yerleÅŸiÄŸi deÄŸil"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "yazma hatası: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: geçerli dizin alınırken hata: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: iÅŸ belirtimi belirsiz"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: eylem adı geçersiz"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: tamamlama belirtimi yok"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "uyarı: -F seçeneği umduğunuz gibi çalışmayabilir"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "uyarı: -C seçeneği umduğunuz gibi çalışmayabilir"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr ""
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "sadece bir işlevde kullanılabilir"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "işlev yapmak için `-f' kullanılamaz"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: salt okunur iÅŸlev"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: dizi deÄŸiÅŸkenleri bu yolla iptal edilemez"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "özdevimli yükleme mümkün değil"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "%s paylaşımlı nesnesi açılamıyor: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "%2$s paylaşımlı nesnesinde %1$s bulunamıyor: %3$s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s: özdevimli olarak yüklenmemiş"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: silinemiyor: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: bir dizin"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: bir dosya deÄŸil"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: dosya çok büyük"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: ikili dosya çalıştırılamıyor"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: çalıştırılamıyor: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr ""
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "oturum açma kabuğu değil: `exit' kullanın"
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "DurmuÅŸ iÅŸler var.\n"
+
+#: builtins/exit.def:122
+#, fuzzy, c-format
+msgid "There are running jobs.\n"
+msgstr "DurmuÅŸ iÅŸler var.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "komut yok"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "geçmiş belirtimi"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: geçici dosya açılamıyor: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr ""
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "%d. iş, iş denetimsiz başlamış"
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: kuraldışı seçenek -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: seçenek bir argüman gerektirir -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "çitleme iptal edildi"
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: çitleme tablosu boş\n"
+
+#: builtins/hash.def:244
+#, fuzzy, c-format
+msgid "hits\tcommand\n"
+msgstr "son komut: %s\n"
+
+#: builtins/help.def:130
+#, fuzzy, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Bu anahtar sözcüğe uygun kabuk komutları: `"
+msgstr[1] "Bu anahtar sözcüğe uygun kabuk komutları: `"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"`%s' ile ilgili bir yardım metni yok. `help help' veya `man -k %s' ya da "
+"`info %s'.yazmayı deneyebilirsiniz."
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: açılamıyor: %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"Bu kabuk komutları dahili olarak tanımlı. Listeyi görmek için `help'yazın.\n"
+"`AD' gibi bir işlev hakkında bilgi almak için `help AD' yazınız.\n"
+"Kabuk hakkında genel bir bilgi edinmek için `info bash'yazınız.\n"
+"Bu listede olmayan komutlar hakkında bilgi bulmak isterseniz,\n"
+"`man -k' veya `info' yazın.\n"
+"\n"
+"Bir ismin yanında bir yıldız imi (*) varsa komut iptal edilmiş demektir.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "tek bir -anrw kullanılabilir"
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "geçmiş konumu"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: geçmiş yorumlaması başarısız"
+
+#: builtins/inlib.def:71
+#, fuzzy, c-format
+msgid "%s: inlib failed"
+msgstr "%s: geçmiş yorumlaması başarısız"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "`-x' ile başka seçenek kullanılamaz"
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: argümanlar süreç veya iş kimlikleri olmalı"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Bilinmeyen hata"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "ifade bekleniyordu"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: bir dizi deÄŸiÅŸkeni deÄŸil"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: dosya tanıtıcı belirtimi geçersiz"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: dosya tanıtıcı geçersiz: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, fuzzy, c-format
+msgid "%s: invalid line count"
+msgstr "%s: seçenek geçersiz"
+
+#: builtins/mapfile.def:277
+#, fuzzy, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: seçenek geçersiz"
+
+#: builtins/mapfile.def:294
+#, fuzzy, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: eylem adı geçersiz"
+
+#: builtins/mapfile.def:326
+#, fuzzy
+msgid "empty array variable name"
+msgstr "%s: bir dizi deÄŸiÅŸkeni deÄŸil"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr ""
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "`%s': biçim karakteri eksik"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "`%c': biçim karakteri geçersiz"
+
+#: builtins/printf.def:578
+#, fuzzy, c-format
+msgid "warning: %s: %s"
+msgstr "%s: uyarı: "
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "\\x için onaltılık rakam eksik"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "baÅŸka dizin yok"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<geçerli dizin yok>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr ""
+
+#: builtins/pushd.def:508
+#, fuzzy
+msgid "directory stack index"
+msgstr "özyineleme yığıtı alttan taştı"
+
+#: builtins/pushd.def:683
+#, fuzzy
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+"\rdirs [-clpv] [+N] [-N]\n"
+" O an anımsanan dizinleri listeler. Dizinler listeye `pushd'\n"
+" komutuyla eklenir; listeden tek tek geri almak içinse `popd'\n"
+" komutu kullanılır.\n"
+" -l seçeneği `dirs'in dizinleri ev dizininize göreli kısayollar\n"
+" olarak göstermemesine yol açar. Yani `~/bin' yerine `/homes/bfox/bin'\n"
+" gibi bir gösterimle karşılaşabilirsiniz. -v seçeneği `dirs'in\n"
+" dizin yığıtını dizin adının önüne yığıt konumunu ekleyerek her\n"
+" satırda bir girdi göstermesini sağlar. -p seçeneği yığıttaki\n"
+" konumu göstermemesi dışında aynı çıktıyı verir. -c seçeneği tüm\n"
+" girdileri silerek dizin yığıtını boşaltır. \n"
+" +N dirs seçeneksiz çağrıldığında gösterdiği listenin solundan\n"
+" sıfırla başlayarak sayılan N'inci girdiyi gösterir.\n"
+"\n"
+" -N dirs seçeneksiz çağrıldığında gösterdiği listenin sağından\n"
+" sıfırla başlayarak sayılan N'inci girdiyi gösterir."
+
+#: builtins/pushd.def:705
+#, fuzzy
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"\rpushd [DZN | +N | -N] [-n]\n"
+" Dizin yığıtının en üstüne bir dizin ekler, ya da geçerli çalışma\n"
+" dizini yığıtın tepesine gelecek şekilde yığıtı döndürür. Hiç\n"
+" argüman verilmemişse en üstteki iki dizini yer değiştirir.\n"
+"\n"
+" +N (`dirs' tarafından gösterilen listenin solundan saymaya\n"
+" sıfırla başlandığında) N'inci dizin tepeye gelecek şekilde\n"
+" yığıtı döndürür.\n"
+"\n"
+" -N (`dirs' tarafından gösterilen listenin sağından saymaya\n"
+" sıfırla başlandığında) N'inci dizin tepeye gelecek şekilde\n"
+" yığıtı döndürür.\n"
+"\n"
+" +n dizinleri yığıta eklerken normal dizin değişikliğini engeller,\n"
+" böylece sadece yığıt değiştirilmiş olur.\n"
+"\n"
+" DZN DiZiNi yeni çalışma dizini yaparak dizin yığıtının\n"
+" tepesine ekler.\n"
+"\n"
+" Dizin yığıtını `dirs' komutuyla görebilirsiniz."
+
+#: builtins/pushd.def:730
+#, fuzzy
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"\rpopd [+N | -N] [-n]\n"
+" Dizin yığıtından girdileri siler. Hiç argüman verilmemişse,\n"
+" yığıtın en üstündeki dizini yığıttan kaldırır ve yığıtın\n"
+" tepesinde kalan dizine geçer. \n"
+" +N `dirs' tarafından gösterilen listenin solundan saymaya\n"
+" sıfırla başlandığında N'inci girdiyi siler. Örneğin,\n"
+" `popd +0' ilk dizini `popd +1' ikincisini siler. \n"
+" -N `dirs' tarafından gösterilen listenin sağından saymaya\n"
+" sıfırla başlandığında N'inci girdiyi siler. Örneğin,\n"
+" `popd -0' son dizini `popd -1' sonuncudan öncekini siler. \n"
+" -n dizinleri yığıttan silerken normal dizin değişikliğini\n"
+" engeller, böylece sadece yığıt değiştirilmiş olur. \n"
+" Dizin yığıtını `dirs' komutuyla görebilirsiniz."
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: zamanaşımı belirtimi geçersiz"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "okuma hatası: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr "sadece bir işlev veya betikten kaynaklı olarak `return' yapılabilir"
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "bir işlev ve bir değişken aynı anda unset yapılamaz"
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: unset yapılamaz"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s:unset yapılamaz: %s salt okunur"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: bir dizi deÄŸiÅŸkeni deÄŸil"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: bir iÅŸlev deÄŸil"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "shift sayısı"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr "kabuk seçenekleri aynı anda hem atanıp hem de iptal edilemez"
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: kabuk seçenek ismi geçersiz"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "dosya ismi argüman gerekir"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: dosya yok"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "engellenemez"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "bir oturum açma kabuğu engellenemez"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "%s `%s' için takma addır\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s bir kabuk anahtar sözcüğüdür\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s bir iÅŸlevdir\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "%s bir kabuk yerleÅŸiÄŸidir\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s %s'dir\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "%s çitilmiş (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s: sınırlama argümanı geçersiz"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "`%c': hatalı komut"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: sınır alınamıyor: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr ""
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: sınır değiştirilemiyor: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "sekizlik sayı"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "`%c': simgesel kip işleci geçersiz"
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "`%c': simgesel kip karakteri geçersiz"
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr ""
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "son komut: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "Çıkılıyor..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "bilinmeyen komut hatası"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "hatalı komut türü"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "hatalı bağlantı"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "hatalı sıçrama"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: bağlanmamış değişken"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "girdi beklerken zamanaşımı: auto-logout\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "/dev/null'dan standart girdiye yönlendirme yapılamaz: %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "TIMEFORMAT: `%c': biçim karakteri geçersiz"
+
+#: execute_cmd.c:2075
+#, fuzzy
+msgid "pipe error"
+msgstr "yazma hatası: %s"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: kısıtlı: komut adında `/' kullanamazsınız"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: komut yok"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: hatalı yorumlayıcı"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "fd %d, fd %d olarak yinelenemiyor"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "ifade özyineleme düzeyi aşıldı"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "özyineleme yığıtı alttan taştı"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "ifadede sözdizimi hatası"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "değişken olmayana atama yapmaya çalışıldı"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "sıfırla bölme"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "yazılım hatası: bad expassign token"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "koşullu ifade için `:' bekleniyordu"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "üs sıfırdan küçük"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr "belirteç ön-arttırım veya ön-eksiltim sonrası bekleniyordu"
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "eksik `)'"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "sözdizimi hatası: terim umuluyordu"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "sözdizimi hatası: geçersiz aritmetik işleci"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr ""
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "geçersiz sayı tabanı"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "değer taban için fazla büyük"
+
+#: expr.c:1329
+#, fuzzy, c-format
+msgid "%s: expression error\n"
+msgstr "%s: tamsayı ifadesi bekleniyordu"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getcwd: üst dizinlere erişilemiyor"
+
+#: input.c:94 subst.c:4857
+#, fuzzy, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "fd %d için geciktirmeme kipi sıfırlanamıyor"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+"fd %d tanıtıcısındaki bash girdisi için yeni dosya tanıtıcısı ayrılamıyor"
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "save_bash_input: yeni fd %d için tampon zaten var"
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr ""
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr "çatallanan pid %d, çalışan iş %d içinde görünüyor"
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "durdurulan %2$ld süreç gruplu iş %1$d siliniyor"
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr ""
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr ""
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: %ld: böyle bir pid yok"
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr ""
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr ""
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr ""
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr ""
+
+#: jobs.c:1443
+msgid "Running"
+msgstr ""
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr ""
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr ""
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr ""
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr ""
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr ""
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr ""
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait: pid %ld bu kabuğun bir alt sürecine ait değil"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "wait_for: süreç %ld için kayıt yok"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job: iÅŸ %d durdu"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: iş sonlanmış"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: iÅŸ %d zaten artalanda"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, fuzzy, c-format
+msgid "%s: line %d: "
+msgstr "%s: uyarı: "
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr ""
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr ""
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr ""
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr ""
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr ""
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr ""
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "bu kabukta iÅŸ denetimi yok"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc: kanaat doğrulaması başarısız: %s\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"malloc: %s:%d: kanaat doğrulaması battı\r\n"
+
+#: lib/malloc/malloc.c:313
+#, fuzzy
+msgid "unknown"
+msgstr "%s: konak bilinmiyor"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr "malloc: serbest bırakılmış liste üstünde blok üste yazdı"
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free: zaten serbest bırakılmış blok argümanı ile çağrıldı"
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free: ayrılmamış blok argümanı ile çağrıldı"
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr "free: alttan taşma saptandı; mh_nbytes aralık dışında"
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free: başlangıç ve son tomar boyutları farklı"
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc: ayrılmamış blok argümanı ile çağrıldı"
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr "realloc: alttan taşma saptandı; mh_nbytes aralık dışında"
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "realloc: başlangıç ve son tomar boyutları farklı"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr "register_alloc: alloc tablosu FIND_ALLOC ile dolu olabilir mi?\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr "register_alloc: %p zaten ayrılmış olarak tabloda değil mi?\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "register_free: %p zaten serbest bırakılmış olarak tabloda değil mi?\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "geçersiz taban"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: konak bilinmiyor"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: geçersiz hizmet"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: hatalı ağ yolu belirtimi"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "desteklenmeyen aÄŸ iÅŸlemleri"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc: %s:%d: %lu bayt yeniden ayrılamıyor"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc: %s:%d: %lu bayt yeniden ayrılamıyor"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "$_'de postanız var"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "$_'de yeni postanız var"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "%s'deki posta okundu\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "sözdizimi hatası: aritmetik ifadesi gerekli"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "sözdizimi hatası: `;' beklenmiyordu"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "sözdizimi hatası: `((%s))'"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: hatalı yönerge türü %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr "make_redirection: yönlendirme yönergesi `%d' aralık dışında"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "`%c' için eşleşme aranırken beklenmedik dosya sonu"
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "`]]' aranırken beklenmedik dosya sonu"
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "koşullu ifadede sözdizimi hatası: beklenmedik dizgecik `%s'"
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "koşullu ifadede sözdizimi hatası"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "beklenmedik dizgecik `%s', `)' umuluyordu"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "`)' umuluyordu"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "koşullu tek terimli işlece beklenmedik argüman `%s'"
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "koşullu tek terimli işlece beklenmedik argüman"
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "beklenmedik dizgecik `%s', koşullu iki terimli işleç umuluyordu"
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "koşullu iki terimli işleç umuluyordu"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "koşullu iki terimli işlece beklenmedik argüman `%s'"
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "koşullu iki terimli işlece beklenmedik argüman"
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "koÅŸullu komutta beklenmeyen dizgecik `%c'"
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "koÅŸullu komutta beklenmeyen dizgecik `%s'"
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "koÅŸullu komutta beklenmeyen dizgecik %d"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "beklenmeyen dizgecik `%s' yakınında sözdizimi hatası"
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "`%s' yakınında sözdizimi hatası"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "sözdizimi hatası: beklenmeyen dosya sonu"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "sözdizimi hatası"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Kabuğu bırakmak için \"%s\" kullanın.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr "`)' için eşleşme aranırken beklenmedik dosya sonu"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "completion: `%s' iÅŸlevi yok"
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr "progcomp_insert: %s: NULL COMPSPEC"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: hatalı bağlayıcı `%d'"
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d: dosya tanıtıcı geçersiz: %s"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "cprintf: `%c': geçersiz biçim karakteri"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "dosya tanıtıcı aralık dışında"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: belirsiz yönlendirme"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: mevcut dosyanın üzerine yazılamıyor"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: kısıtlı: çıktı yönlendirilemiyor"
+
+#: redir.c:180
+#, fuzzy, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "belge için geçici dosya oluşturulamıyor: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: dizi üyesine liste atanamaz"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr "/dev/(tcp|udp)/host/port ağ olmaksızın desteklenmiyor"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "yönlendirme hatası: fd yinelenemiyor"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "/tmp bulunamadı, lütfen oluşturun!"
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "/tmp geçerli bir dizinin adı olmalıdır"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: geçersiz seçenek"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Hiç ismim yok!"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr ""
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Kullanım:\t%s [GNU uzun seçeneği] [seçenek] ...\n"
+"\t%s [GNU uzun seçeneği] [seçenek] betik-dosyası ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "GNU uzun seçenekleri:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Kabuk seçenekleri:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD veya -c KOMUT veya -O shopt_seçeneği\t(sadece çağrı için)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s ya da -o seçeneği\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"Kabuk seçenekleriyle ilgili daha fazla bilgi için `%s -c \"help set\"' "
+"yazın.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"Kabuk yerleşik komutlarıyla ilgili bilgi almak için `%s -c help' yazın.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr ""
+"Yazılım hatalarını raporlamak için `bashbug' komutunu kullanınız.\n"
+"Çeviri hatalarını ise <gnu-tr@belgeler.org> adresine bildiriniz.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d: geçersiz işlem"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr ""
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr ""
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr ""
+
+#: siglist.c:59
+msgid "Quit"
+msgstr ""
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr ""
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr ""
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr ""
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr ""
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr ""
+
+#: siglist.c:87
+msgid "Killed"
+msgstr ""
+
+#: siglist.c:91
+#, fuzzy
+msgid "Bus error"
+msgstr "sözdizimi hatası"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr ""
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr ""
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr ""
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr ""
+
+#: siglist.c:111
+#, fuzzy
+msgid "Terminated"
+msgstr "kısıtlı"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr ""
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr ""
+
+#: siglist.c:127
+msgid "Continue"
+msgstr ""
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr ""
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr ""
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr ""
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr ""
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr ""
+
+#: siglist.c:155
+msgid "File limit"
+msgstr ""
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr ""
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr ""
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr ""
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr ""
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr ""
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr ""
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr ""
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr ""
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr ""
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr ""
+
+#: siglist.c:199
+msgid "programming error"
+msgstr ""
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr ""
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr ""
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr ""
+
+#: siglist.c:215
+msgid "Information request"
+msgstr ""
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr ""
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr ""
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "hatalı ikame: %2$s içinde kapatan `%1$s' yok"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: dizi üyesine liste atanamaz"
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "süreç ikamesi için borulama yapılamıyor"
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "süreç ikamesi için alt süreç yapılamıyor"
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "isimli boru %s okumak için açılamıyor"
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "isimli boru %s yazmak için açılamıyor"
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "isimli boru %s fd %d olarak yinelenemiyor"
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "komut ikamesi için boru yapılamıyor"
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr "komut ikamesi için alt süreç yapılamıyor"
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "command_substitute: boru fd 1 olarak yinelenemiyor"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: parametre boş ya da değer atanmamış"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: altdizge ifadesi < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: hatalı ikame"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: bu yolla atama yapılmaz"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, fuzzy, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "hatalı ikame: %2$s içinde kapatan `%1$s' yok"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "eÅŸleÅŸme yok: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "argüman bekleniyordu"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: tamsayı ifadesi bekleniyordu"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "`)' bekleniyordu"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "`)' bekleniyordu, %s bulundu"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: tek terimli iÅŸleci bekleniyordu"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: iki terimli iÅŸleci bekleniyordu"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "eksik `]'"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "geçersiz sinyal numarası"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps:trap_list[%d] içinde hatalı değer: %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+"run_pending_traps: sinyal yakalayıcı SIG_DFL'dir, kendime %d (%s) göndererek"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler:hatalı sinyal %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "`%s'nin işlev tanımının içeri aktarılmasında hata"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "kabuk düzeyi (%d) çok yüksek, 1 yapılıyor"
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr "make_local_variable: geçerli etki alanında hiç işlev bağlamı yok"
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr "all_local_variables: geçerli etki alanında hiç işlev bağlamı yok"
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: parametre boş ya da değer atanmamış"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "%2$s için exportstr içinde geçersiz karakter %1$d"
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "%s için exportstr içinde `=' yok"
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr "pop_var_context: kabuk değişkenlerinin başı bir işlev bağlamı değil"
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr "pop_var_context: genel değişkenler bağlamı yok"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+"pop_scope: kabuk değişkenlerinin başı bir geçici ortam etki alanı değil"
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: açılamıyor: %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d: dosya tanıtıcı geçersiz: %s"
+
+#: version.c:46
+#, fuzzy
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Copyright © 2006 Free Software Foundation, Inc.\n"
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr ""
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Copyright © 2006 Free Software Foundation, Inc.\n"
+
+#: version2.c:87
+#, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: %lu bayt ayrılamıyor (%lu bayt ayrıldı)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: %lu bayt ayrılamıyor"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: %s:%d: %lu bayt ayrılamıyor (%lu bayt ayrıldı)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: %s:%d: %lu bayt ayrılamıyor"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr ""
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr ""
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr ""
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr ""
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr ""
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr ""
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr ""
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr ""
+
+#: builtins.c:68
+msgid ":"
+msgstr ""
+
+#: builtins.c:70
+msgid "true"
+msgstr ""
+
+#: builtins.c:72
+msgid "false"
+msgstr ""
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr ""
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr ""
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr ""
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr ""
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr ""
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr ""
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr ""
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr ""
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr ""
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr ""
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr ""
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr ""
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr ""
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr ""
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr ""
+
+#: builtins.c:117
+msgid "help [-dms] [pattern ...]"
+msgstr ""
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr ""
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr ""
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr ""
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr ""
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr ""
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr ""
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr ""
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr ""
+
+#: builtins.c:148
+#, fuzzy
+msgid "shift [n]"
+msgstr "shift sayısı"
+
+#: builtins.c:150
+#, fuzzy
+msgid "source filename [arguments]"
+msgstr "dosya ismi argüman gerekir"
+
+#: builtins.c:152
+#, fuzzy
+msgid ". filename [arguments]"
+msgstr "dosya ismi argüman gerekir"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr ""
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr ""
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr ""
+
+#: builtins.c:162
+msgid "times"
+msgstr ""
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr ""
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr ""
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr ""
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr ""
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr ""
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr ""
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr ""
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr ""
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr ""
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr ""
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr ""
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr ""
+
+#: builtins.c:206
+#, fuzzy
+msgid "(( expression ))"
+msgstr "ifade bekleniyordu"
+
+#: builtins.c:208
+#, fuzzy
+msgid "[[ expression ]]"
+msgstr "ifade bekleniyordu"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr ""
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr ""
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr ""
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr ""
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr ""
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr ""
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+
+#: builtins.c:237
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr ""
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:254
+#, fuzzy
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"\ralias [-p] [Ä°SÄ°M[=DEÄžER] ...]\n"
+" `alias' argümansız olarak veya -p seçeneği ile kullanıldığında rumuz\n"
+" listesini alias İSİM=DEĞER biçiminde standart çıktıya basar.\n"
+" Aksi takdirde belirtilen İSİM belirtilen DEĞERe rumuz olarak atanır.\n"
+" DEĞERden sonra gelen boşluklar takma ad yorumlaması sırasında\n"
+" sonraki sözcüğün takma ad ikamesi için sınanmasına sebep olur.\n"
+" Hiçbir şeyin rumuzu olmayan bir İSİM verilmedikçe alias doğru döndürür."
+
+#: builtins.c:276
+#, fuzzy
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"\runalias [-a] [Ä°SÄ°M ... ]\n"
+" İSİMleri tanımlı rümuzlar listesinden siler. Eğer -a seçeneği "
+"verilmiÅŸse,\n"
+" tüm rümuz tanımları silinir."
+
+#: builtins.c:289
+#, fuzzy
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+"\rbind [-m TUÅžDÄ°ZÄ°SÄ°] [-lpsvPSV]\n"
+"bind [-m TUÅžDÄ°ZÄ°SÄ°] [-q Ä°ÅžLEV] [-u Ä°ÅžLEV] [-r TUÅžDÄ°ZÄ°SÄ°]\n"
+"bind [-m TUÅžDÄ°ZÄ°SÄ°] -f DOSYAÄ°SMÄ°\n"
+"bind [-m TUÅžDÄ°ZÄ°SÄ°] -x TUÅžDÄ°ZÄ°SÄ°:KABUK-KOMUTU\n"
+"bind [-m TUÅžDÄ°ZÄ°SÄ°] TUÅžDÄ°ZÄ°SÄ°:Ä°ÅžLEV-Ä°SMÄ°\n"
+"bind [READLINE-KOMUTU]\n"
+" Bir tuÅŸ dizilimini bir Readline iÅŸlevine veya makrosuna baÄŸlar ya da\n"
+" bir Readline değişkeni atar. Seçeneksiz argüman sözdizimi ~/.initrc\n"
+" içinde bulunana eşdeğerdir, ama tek bir argüman olarak aktarılması\n"
+" gerekir: bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" bind şu seçenekleri kabul eder:\n"
+" -m TUŞDİZİSİ Bu komut süresince kısayol olarak TUŞDİZİSİ\n"
+" kullanılır. Olası kısayol isimleri: emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi,\n"
+" vi-move, vi-command ve vi-insert.\n"
+" -l Ä°ÅŸlev isimlerini listeler.\n"
+" -P İşlev isimlerini ve kısayolları listeler.\n"
+" -p İşlev isimlerini ve kısayolları, girdi olarak\n"
+" kullanılabilir biçimde listeler.\n"
+" -r TUŞDİZİSİ TUŞDİZİSİ için mevcut kısayolları kaldırır.\n"
+" -x TUÅžDÄ°ZÄ°SÄ°:KABUK-KOMUTU\n"
+" TUÅžDÄ°ZÄ°SÄ°nin her giriliÅŸinde KABUK-KOMUTUnun\n"
+" çalıştırılmasını sağlar.\n"
+" -f DOSYAİSMİ Tuş kısayollarını DOSYAİSMİnden okur.\n"
+" -q İŞLEV İsmi belirtilen İŞLEVi çağıran tuşlar hakkında "
+"sorgu.\n"
+" -u İŞLEV İsmi belirtilen İŞLEVi çağıran tüm tuş "
+"kısayollarını\n"
+" kaldırır.\n"
+" -V DeÄŸiÅŸken isimlerini ve deÄŸerlerini listeler.\n"
+" -v DeÄŸiÅŸken isimlerini ve deÄŸerlerini girdi olarak\n"
+" kullanılabilir biçimde listeler.\n"
+" -S Makroları çağıran tuş dizilerini ve değerlerini\n"
+" listeler\n"
+" -s Makroları çağıran tuş dizilerini ve değerlerini\n"
+" girdi olarak kullanılabilir biçimde listeler."
+
+#: builtins.c:326
+#, fuzzy
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"\rcontinue [N]\n"
+" FOR, WHILE veya UNTIL döngülerinin sonraki yinelemesinden devam edilir.\n"
+" N verilirse dışa doğru N. döngüden devam edilir. N >= 1 olmalıdır."
+
+#: builtins.c:338
+#, fuzzy
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"\rcontinue [N]\n"
+" FOR, WHILE veya UNTIL döngülerinin sonraki yinelemesinden devam edilir.\n"
+" N verilirse dışa doğru N. döngüden devam edilir. N >= 1 olmalıdır."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+
+#: builtins.c:365
+#, fuzzy
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+"\rcaller [Ä°FADE]\n"
+" O anki altyordam çağrısının bağlamını döndürür.\n"
+"\n"
+" İFADE olmaksızın, caller o anki altyordam çağrısının kaynak dosya "
+"ismini\n"
+" ve satır numarasını gösterir. Eğer İFADE olarak negatiften farklı "
+"bir\n"
+" tamsayı belirtilmişse caller o anki icra çağrısı yığıtındaki o "
+"konuma\n"
+" karşılık gelen kaynak dosyası, satır numarası ve altyordam "
+"ismini\n"
+" gösterir; bu ek bilgi bir yığıtın izini sürmek için "
+"kullanılabilir.\n"
+"\n"
+" İFADE değeri şu ankinden önce kaç çağrı çerçevesinin geri "
+"döneceğini\n"
+" belirtir; tepe çerçeve 0. çerçevedir."
+
+#: builtins.c:383
+#, fuzzy
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+"\rcd [-L|-P] [DÄ°ZÄ°N]\n"
+" Bulunulan dizinden DİZİNe geçilmesini sağlar. DİZİN verilmezse $HOME "
+"ile\n"
+" belirtilen dizine geçilir. CDPATH kabuk değişkeni mevcutsa "
+"deÄŸeri,\n"
+" DİZİNi arama yolu olarak kullanılır. CDPATH içindeki diğer dizin "
+"isimleri\n"
+" birer ikinokta imi (:) ile ayrılır. DİZİN bir / ile başlıyorsa "
+"CDPATH\n"
+" kullanılmaz. Eğer dizin yoksa ve `cdable_vars' kabuk seçeneği "
+"etkinse\n"
+" sözcük bir değişken ismi olarak denenir. Eğer bu değişken bir "
+"deÄŸere\n"
+" sahipse bu değerdeki dizine geçilir. -P seçeneği sembolik "
+"bağların\n"
+" izlenmeyip fiziksel dizin yapısının kullanılmasını sağlar; -L "
+"seçeneği\n"
+" sembolik bağların mutlaka izlenmesini sağlar."
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+
+#: builtins.c:428
+#, fuzzy
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"\r:\n"
+" Etkisizdir; bu komut birşey yapmaz. Sıfır çıkış kodu döndürülür."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:448
+#, fuzzy
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+"\rfalse\n"
+" Başarısız bir sonuç döndürür."
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+
+#: builtins.c:476
+#, fuzzy
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"\rdeclare [-afFirtx] [-p] [Ä°SÄ°M[=DEÄžER] ...]\n"
+" Değişkenlerin özellikleri ile bildirilmesini sağlar. Hiçbir İSİM\n"
+" verilmezse değişkenleri ve değerlerini listeler. -p seçeneği ile her\n"
+" İSİM için değerler ve özellikleri gösterecektir.\n"
+"\n"
+" Seçenekler:\n"
+"\n"
+" -a Her Ä°SÄ°M bir dizi deÄŸiÅŸkenidir(destekleniyorsa)\n"
+" -f Sadece işlev isimleri kullanılır.\n"
+" -F Tanımları olmaksızın sadece işlev isimleri (ve hata ayıklaması\n"
+" yapılıyorsa kaynak dosya isimleri ve satır sayıları) gösterilir\n"
+" -i Her İSİMe `integer' özniteliği verir.\n"
+" -r Ä°SÄ°Mleri salt-okunur yapar.\n"
+" -t Her İSİMe `trace' özniteliği verir.\n"
+" -x İSİMleri ihraç edilebilir yapar\n"
+"\n"
+" Tamsayı öznitelikli değişkenlere bir DEĞER atandığında aritmetik\n"
+" değerlendirme uygulanır (bkz, `let').\n"
+"\n"
+" Değişken değerleri gösterilirken, -f bir işlevin ismini ve tanımını\n"
+" gösterir. -F seçeneği ile sadece işlev isminin gösterilmesini sağlar.\n"
+"\n"
+" `-' yerine `+' kullanarak belirtilen öznitelik kapatılabilir.\n"
+" Bir işlevde kullanıldığında declare her İSİMi `local' komutu "
+"kullanılmış\n"
+" gibi yerel yapar."
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+
+#: builtins.c:537
+#, fuzzy
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"\recho [-neE] [ARG ...]\n"
+" ARGümanlarını çıktılar. -n seçeneği ile satırsonu karakteri "
+"baskılanır.\n"
+" -e seçeneği ile aşağıdaki tersbölü öncelemeli karakterlerin "
+"yorumlanması\n"
+" etkinleÅŸtirilir:\n"
+" \t\\a\tsesli uyarı (bell)\n"
+" \t\\b\tgerisilme\n"
+" \t\\c\tkendisinden sonra gelen satırsonu karakterini kaldırır\n"
+" \t\\E\tescape karakteri\n"
+" \t\\f\tsayfa ileri\n"
+" \t\\n\tsatırsonu\n"
+" \t\\r\tsatırbaşı\n"
+" \t\\t\tyatay sekme\n"
+" \t\\v\tdüşey sekme\n"
+" \t\\\\\ttersbölü\n"
+" \t\\0nnn\tsekizlik deÄŸeri nnn olan sekiz bitlik karakter\n"
+" \t \t(0, 1, 2 ya da 3 haneli olabilir)\n"
+" \n"
+" -E seçeneği ile yukarıdaki karakterlerin yorumlanmasını öntanımlı\n"
+" olarak etkin olduÄŸu sistemlerde bile kapatabilirsiniz."
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+
+#: builtins.c:626
+#, fuzzy
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+"\rgetopts SÇNDİZGESİ AD [ARG ...]\n"
+" getopts kabuk betikleri tarafından konumsal parametreleri "
+"çözümlemekte\n"
+" kullanılır.\n"
+"\n"
+" SÇNDİZGESİ tanınan seçenek karakterlerini içerir; bir karakterden "
+"sonra\n"
+" bir ikinokta imi (:) geliyorsa seçeneğin ondan bir boşlukla ayrılmış "
+"bir\n"
+" argümana sahip olacağı umulur.\n"
+"\n"
+" Her çağrılışında getopts işlenecek sonraki argümanın indisini "
+"OPTIND\n"
+" kabuk deÄŸiÅŸkenine ve AD deÄŸiÅŸkenini de mevcut deÄŸilse "
+"ilklendirerek\n"
+" sonraki seçeneği $AD kabuk değişkenine yerleştirir. OPTIND kabuğun ya "
+"da\n"
+" bir kabuk betiğinin her çağrılışında 1 ile ilklendirilir. Bir "
+"seçenek\n"
+" bir argüman gerektirdiğinde getopts argümanı OPTARG "
+"deÄŸiÅŸkenine\n"
+" yerleÅŸtirir.\n"
+"\n"
+" getopts hataları iki yolla raporlayabilir. Eğer SÇNDİZGESİnin "
+"ilk\n"
+" karakteri bir ':' ise sessiz hata raporlaması kullanılır. Bu "
+"kipte\n"
+" hiçbir hata iletisi basılmaz. Bir geçersiz seçenek saptanırsa "
+"getopt\n"
+" OPTARG'a bulunan seçenek karakterini yerleştirir. Bir gerekli "
+"argüman\n"
+" verilmemiÅŸse, getopts AD'a bir ':' yerleÅŸtirir. Getopts sessiz "
+"kipte\n"
+" değilse ve geçersiz bir seçenek görüldüğünde, getopts ? karakterini "
+"AD'a\n"
+" yerleştirir ve OPTARG değişkenini kaldırır. Eğer bir gerekli "
+"argüman\n"
+" bulunamazsa ve getopts sessiz kipte deÄŸilse AD'a ? "
+"karakteri\n"
+" yerleştirilir, OPTARG kaldırılır ve bir tanı iletisi basılır.\n"
+"\n"
+" OPTERR değişkeninin değeri 0 ise SÇNDİZGESİnin ilk karakteri bir "
+"':'\n"
+" olmasa bile hata iletileri gösterilmez. OPTERR değişkeninin "
+"öntanımlı\n"
+" deÄŸeri 1'dir.\n"
+"\n"
+" getopts normalde konumsal parametreleri ($0 - $9) çözümlese de "
+"baÅŸka\n"
+" argümanlar verilmişse bunları çözümler."
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+#: builtins.c:689
+#, fuzzy
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"\rexit [N]\n"
+" N durumu ile dönerek kabuk çıkar. N verilmezse son çalıştırılan komutun\n"
+" çıkış durumu döner."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+
+#: builtins.c:708
+#, fuzzy
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+"\rfc [-e DÃœZENLEYÄ°CÄ°] [-nlr] [Ä°LK] [SON]\n"
+"fc -s [ESKÄ°=YENÄ°] [KOMUT]\n"
+" fc, komut geçmişi listesindeki komutları listelemek, düzenlemek "
+"ve\n"
+" yeniden çalıştırmak için kullanılır. İLK ve SON olarak numara "
+"vererek\n"
+" bir aralık belirtilebileceği gibi İLK bir dizge de olabilir, bu "
+"takdirde\n"
+" bu dizge ile başlayan en son komut anlamına gelir.\n"
+"\n"
+" -e DÜZENLEYİCİ ile hangi düzenleyicinin kullanılacağı belirtilir.\n"
+" Belirtilmezse sırayla FCEDIT, EDITOR değişkenlerine bakılır\n"
+" bunlarda da birşey belirtilmemişse vi kullanılır.\n"
+"\n"
+" -l ile komutlar stardart çıktıya listelenir.\n"
+" -n ile listede satır numaraları bulunmaz.\n"
+" -r ile komutlar ters sırada (en yeniler listesi olarak) listelenir\n"
+"\n"
+" `fc -s [ESKİ=YENİ] [KOMUT]' biçiminde, ESKİ=YENİ ikamesi yapıldıktan\n"
+" sonra komut yeniden çalıştırılır.\n"
+"\n"
+" Bununla kullanılacak yararlı bir rümuz r='fc -s' olurdu.\n"
+" Böylece `r cc' yazarak `cc' ile başlayan son komut,\n"
+" r' yazarak en son komut çalıştırılabilir."
+
+#: builtins.c:738
+#, fuzzy
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"\rfg [Ä°Åž_BELÄ°RTÄ°MÄ°]\n"
+" İŞ_BELİRTİMİni önalana yerleştirir ve onu o an ki iş yapar.\n"
+" EÄŸer Ä°Åž_BELÄ°RTÄ°MÄ° belirtilmemiÅŸse kabuk iÅŸ belirtimi olarak\n"
+" o an ki işi kullanır."
+
+#: builtins.c:753
+#, fuzzy
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"\rbg [Ä°Åž_BELÄ°RTÄ°MÄ°]\n"
+" `&' ile başlatılmışçasına İŞ_BELİRTİMİni artalana yerleştirir.\n"
+" İŞ_BELİRTİMİ verilmemişse, iş belirtimi olarak o an ki iş kullanılır."
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:816
+#, fuzzy
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"\rhistory [-c] [-d KONUM] [N]\n"
+"history [-anrw] [DOSYAÄ°SMÄ°]\n"
+"history -ps ARG [ARG ...]\n"
+" Seçeneksiz kullanıldığında komut geçmişi listesini satır numaraları ile\n"
+" gösterir. Değişiklik yapılmış satırlarda numaralardan önce bir `*'\n"
+" vardır. Argüman olarak N belirtildiğinde sadece son N satır listelenir.\n"
+" -c komut geçmişi listesini tüm girdilerini silerek temizler. -d ile\n"
+" satır numarası KONUM olan geçmiş girdisi silinir. -w ile geçmiş listesi\n"
+" çıktısı geçmiş dosyasına yazılır. -r ile dosya okunur ve içeriği geçmiş\n"
+" listesine eklenir. -a ile oturumunun başlangıcından itibaren girilen\n"
+" geçmiş satırları geçmiş dosyasına eklenir. -n ile geçmiş dosyasından\n"
+" henüz okunmamış olan geçmiş satırları, geçmiş listesine eklenir.\n"
+"\n"
+" DOSYAÄ°SMÄ° verilmezse, $HISTFILE deÄŸiÅŸkenindeki deÄŸer, o da yoksa\n"
+" ~/.bash_history dosyası kullanılır. -s ile seçenek olmayan ARGümanlar\n"
+" geçmiş listesine tek bir girdi olarak eklenir. -p seçeneği ile\n"
+" argümanlar üzerinde geçmiş yorumlaması uygulanır ve geçmiş listesinde\n"
+" hiçbir şey saklanmaksızın sonuçlar standart çıktıda gösterilir.\n"
+"\n"
+" $HISTTIMEFORMAT kabuk değişkeni tanımlanmış ve anlamlı bir değere\n"
+" sahipse, değeri, gösterilen her geçmiş girdisi ile ilişkili zaman\n"
+" damgasını basacak olan strftime(3) işlevine biçim girdisi olur; aksi\n"
+" takdirde hiç zaman damgası basılmaz."
+
+#: builtins.c:852
+#, fuzzy
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+"\rjobs [-lnprs] [Ä°Åž_BELÄ°RTÄ°MÄ° ...]\n"
+"jobs -x KOMUT [ARG ...]\n"
+" Etkin işleri listeler. -l ile normal bilgilere ek olarak süreç\n"
+" kimliklerini de (PID) listeler. -p ile işlerin sadece süreç\n"
+" kimliklerini listeler. -n ile sadece kullanıcının durumları\n"
+" hakkında aldığı son uyarıdan beri durumları değişen işler hakkında\n"
+" bilgi gösterir. İŞ_BELİRTİMİ verilmişse, çıktı bu iş ile ilgili\n"
+" bilgilerle sınırlıdır. -r ile sadece çalışmakta olan, -s ile ise\n"
+" sadece durmuş olan işler listelenir. Seçeneksiz kullanıldığında jobs\n"
+" tüm etkin işlerin durumlarını basar. -x seçeneği verilmişse,\n"
+" ARGümanlar ile belirtilen tüm iş belirtimleri, işlerin süreç grup\n"
+" liderinin süreç grup kimliğine yerleştirilip KOMUT çalıştırılır."
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+
+#: builtins.c:898
+#, fuzzy
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"\rkill [-s SÄ°NYAL | -n SÄ°NYALNUM | -SÄ°NYAL] PID | Ä°Åž_BELÄ°RTÄ°MÄ° ...\n"
+"kill -l [SÄ°NYAL]\n"
+" PID ile belirtilen süreç kimliğine veya İŞ_BELİRTİMİ ile belirtilen\n"
+" işin sürecine SİNYAL veya SİNYALNUM ile belirtilen sinyali gönderir.\n"
+" SİNYAL ya harf büyüklüğüne duyarsız olarak SIGINT gibi bir sinyal ismi\n"
+" (SIG öneki olmadan da verilebilir) ya da bir sinyal numarası olabilir.\n"
+" SİNYALNUM ise bir sinyal numarası olmalıdır. SİNYAL veya SİNYALNUM\n"
+" verilmezse öntanımlı olarak SIGTERM kullanılır. -l seçeneği ile sinyal\n"
+" isimleri listelenir. Argümanlı -l seçeneğinde argümanların listelenecek\n"
+" sinyal isimlerinin numaraları olduğu varsayılır. Kill iki sebepten\n"
+" dolayı bir kabuk yerleşiğidir: süreç kimlikleri yerine iş "
+"kimliklerinin\n"
+" kullanımını mümkün kılar ve eğer oluşturabileceğiniz süreç sayısı\n"
+" sınırını aşarsanız başka bir süreci öldürecek bir süreci başlatmak\n"
+" zorunda kalmazsınız."
+
+#: builtins.c:921
+#, fuzzy
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+"\rlet Ä°FADE [Ä°FADE ...]\n"
+" Her Ä°FADE deÄŸerlendirilecek bir aritmetik ifadesidir. DeÄŸerlendirme\n"
+" sabit genişlikli tamsayılarla, taşma denetimi uygulanmaksızın yapılır,\n"
+" sıfırla bölme bir hata olarak bayraklanır ve onun için bir sinyal\n"
+" kapanı vardır. İşleçler için öncelikler ve çağrışımsallık ve değerler\n"
+" C dilindeki ile aynıdır. Aşağıdaki işleçler eşit öncelikli işleç\n"
+" düzeylerine göre öbeklenmiş ve azalan öncelikle listelenmişlerdir.\n"
+"\n"
+" id++ id-- sonradan-arttırım ve sonradan-eksiltim\n"
+" ++id --id önceden-arttırım ve önceden-eksiltim\n"
+" - + tek terimli eksi ve artı imi\n"
+" ! ~ mantıksal ve bitseviyesinde olumsuzlama\n"
+" ** üs imi\n"
+" * / % çarpma, bölme, kalan\n"
+" + - toplama, çıkarma\n"
+" << >> bitseviyesinde sola ve sağa ötelemeler\n"
+" <= >= < > karşılaştırmalar\n"
+" == != eÅŸitlik, eÅŸitsizlik\n"
+" & bitseviyesinde VE\n"
+" ^ bitseviyesinde ayrıcalıklı VEYA\n"
+" | bitseviyesinde VEYA\n"
+" && mantıksal VE\n"
+" || mantıksal VEYA\n"
+" ifade ? ifade : ifade koşullu üç terimlisi\n"
+" = *= /= %=\n"
+" += -= <<= \n"
+" >>= &= ^= |=\n"
+" atama iki terimlileri\n"
+"\n"
+" Kabuk değişkenleri terim olarak kullanılabilir. İfade içinde değişken\n"
+" ismi değeriyle değiştirilir (sabit genişlikli tamsayıya zorlanır).\n"
+" Bir kabuk değişkeni ifade içinde kullanılırken tamsayı niteliğinin\n"
+" etkinleÅŸtirilmesini gerektirmez.\n"
+"\n"
+" İşleçler öncelik sırasına göre değerlendirilir. Parantez içine alınmış\n"
+" alt ifadeler öncelikle değerlendirilir. Bu nedenle parantez içine alma\n"
+" işleçlerin önceliklerini arttırmak amacıyla kullanılabilir.\n"
+"\n"
+" Son ifade'nin sonucu 0 ise dönüş durumu 1 dir, aksi takdirde 0 dır."
+
+#: builtins.c:966
+#, fuzzy
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+"\rread [-ers] [-u DSYTNT] [-t ZMAÅžM] [-p Ä°STEM] [-a DÄ°ZÄ°]\n"
+" [-n KRKSAY] [-d AYRAÇ] [İSİM ...]\n"
+" Standart girdiden ya da -u seçeneği ile sağlanan DoSYaTaNıTıcıdan tek\n"
+" satır okur ve ilk sözcük ilk İSİMe, ikinci sözcük ikinci İSİMe ve böyle\n"
+" giderek, aradaki sözcükler ve ayraçlar son İSİMe kadar atanır. Satırı\n"
+" sözcüklere ayırmakta sadece $IFS değişkeninin değerindeki karakterler\n"
+" kullanılır. Tersbölü satırın devam ettirilmesi için ve kendinden sonra\n"
+" gelen özel karakterlerin yorumlanması için kullanılabilir. Hiç isim\n"
+" verilmemişse, satırın tamamı okunur ve REPLY değişkenine atanır. -r\n"
+" verildiğinde tersbölü bir önceleme karakteri olarak ele alınmaz,\n"
+" dolayısıyla tersbölü-satırsonu çifti satırın alt satırda devam "
+"edeceÄŸini\n"
+" belirtmekte kullanılamaz. -d ile satırın satırsonu karakterine "
+"kadar\n"
+" değil AYRAÇ karakterine kadar okunması sağlanır. -p ile "
+"girdi\n"
+" beklendiğini belirtecek İSTEM dizgesi satırsonu karakteri "
+"olmaksızın\n"
+" görüntülenir. İstem sadece girdi bir uçbirimden gelecekse "
+"gösterilir.\n"
+" -a ile sözcükler sırayla DİZİ dizisinin elemanlarına atanır; dizinin "
+"ilk\n"
+" elemanının indisi 0'dır; atama yapılmadan önce DİZİ dizisinin "
+"tüm\n"
+" elemanları silinir; diğer İSİM argümanları yoksayılır. -e ile "
+"kabuk\n"
+" etkileşimliyse, satırı sağlamak için readline kullanılır. -n "
+"ile\n"
+" satırın okunması KRKSAYıncı karakterde sona erer; satırın kalanı "
+"yok\n"
+" sayılır. -s ile sessiz kipe girilir, girdi bir uçbirimden "
+"geliyorsa\n"
+" karakterler yansılanmaz. -t ile satır ZMAŞM saniye sonra "
+"hala\n"
+" sonlandırılmamışsa read zamanaşımına düşer ve hata döner. "
+"$TMOUT\n"
+" değişkeni bir değerle atanmışsa değeri öntanımlı zamanaşımı "
+"deÄŸeri\n"
+" olarak ele alınır. Bu seçenek, girdi bir uçbirim ya da "
+"boruhattından\n"
+" okunmuyorsa etkisizdir. Dosyasonu karakteri (Ctrl-D) "
+"saptanmadıkça,\n"
+" okuma zamanaşımına düşmedikçe ya da -u seçeneği ile sağlanan\n"
+" DoSYaTaNıTıcı geçersiz olmadıkça dönüş durumu sıfırdır."
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+
+#: builtins.c:1022
+#, fuzzy
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+"\rset [--abefhkmnptuvxBCHP] [-o seçenek] [arg ...]\n"
+" -a Müteakip komutların ortamına aktarılmak üzere değiştirilen veya\n"
+" oluÅŸturulan iÅŸlev ve deÄŸiÅŸkenleri imler.\n"
+" -b Sonlandırılan artalan işlerin durumunun anında raporlanmasını "
+"saÄŸlar.\n"
+" -e Bir komut sıfırdan farklı bir çıkış durumu ile çıkarsa anında "
+"çıkar.\n"
+" -f Dosya ismi üretimini (globbing) iptal eder.\n"
+" -h Çalıştırmak için aranan komutları bulur ve yerlerini hatırlar "
+"(hash).\n"
+" -k Atama deyimleri şeklindeki tüm argümanları komut isminden önce\n"
+" belirtmek yerine ortama yerleÅŸtirir.\n"
+" -m Ä°ÅŸ denetimi etkinleÅŸtirilir.\n"
+" -n Komutları okur ama onları çalıştırmaz.\n"
+" -o seçenek-ismi\n"
+" seçenek-ismi olarak aşağıdakilerden biri verildiğinde karşılığı\n"
+" olan seçenekler kullanılmış olur:\n"
+" allexport -a ile aynı\n"
+" braceexpand -B ile aynı\n"
+" emacs emacs tarzı bir satır düzenleme arayüzü kullanılır\n"
+" errexit -e ile aynı\n"
+" errtrace -E ile aynı\n"
+" functrace -T ile aynı\n"
+" hashall -h ile aynı\n"
+" histexpand -H ile aynı\n"
+" history komut geçmişini etkinleştirir\n"
+" ignoreeof kabuk dosyasonu karakterine rastlanınca çıkmaz.\n"
+" interactive-comments\n"
+" etkileşimli komutlarda görünecek açıklamalara\n"
+" izin verir.\n"
+" keyword -k ile aynı\n"
+" monitor -m ile aynı\n"
+" noclobber -C ile aynı\n"
+" noexec -n ile aynı\n"
+" noglob -f ile aynı\n"
+" nolog o an kabul edilir ama yoksayılır\n"
+" notify -b ile aynı\n"
+" nounset -u ile aynı\n"
+" onecmd -t ile aynı\n"
+" physical -P ile aynı\n"
+" pipefail bir boruhattının dönüş değeri ya sıfırdan farklı "
+"bir\n"
+" durumla çıkan son (en sağdaki) komutun değeridir "
+"ya\n"
+" da boruhattındaki tüm komutlar başarılıysa "
+"sıfırdır\n"
+" posix Standart uyumu için POSIX 1003.2 "
+"standardındakinden\n"
+" farklı öntanımlı işlemde Bash davranışını "
+"deÄŸiÅŸtirir\n"
+" privileged -p ile aynı\n"
+" verbose -v ile aynı\n"
+" vi vi tarzı bir satır düzenleme arayüzü kullanılır\n"
+" xtrace -x ile aynı\n"
+" -p Ayrıcalıklı kipi etkinleştirir. Bu kipte, $BASH_ENV ve $ENV "
+"dosyaları\n"
+" işlenmez, kabuk işlevleri ortamdan miras alınmaz. Kabuk, gerçek\n"
+" kullanıcı (grup) kimliği ile aynı olmayan etkin kullanıcı (grup)\n"
+" kimliği ile başlatılmışsa ve -p seçeneği verilmemişse, bu eylemler\n"
+" alınır ve etkin kullanıcı (grup) kimliği, gerçek kullanıcı (grup)\n"
+" kimliğine ayarlanır. Başlatırken -p seçeneği verilmişse, etkin\n"
+" kullanıcı (grup) kimliği sıfırlanmaz. Bu seçeneğin kapatılması "
+"etkin\n"
+" kullanıcı ve grup kimliklerinin gerçek kullanıcı ve grup "
+"kimliklerine\n"
+" ayarlanmasına sebep olur.\n"
+" -t Tek bir komutu okuyup çalıştırdıktan sonra çıkar..\n"
+" -u Parametre yorumlaması uygulanırken bir hata sonucu değişkenlerin\n"
+" kaldırılmasına benzer bir davranış gösterir.\n"
+" -v Kabuk girdi satırlarını okunuyormuş gibi basar.\n"
+" -x Komutları ve argümanlarını çalıştırılıyormuş gibi basar.\n"
+" -B Kabuk kaşlı ayraç yorumlaması uygular.\n"
+" -C Çıktının > kullanılarak yönlendirilmesini ve <> kullanılarak mevcut\n"
+" dosyaların üzerine yazılmasını engeller.\n"
+" -E Etkinse ERR üstündeki bir tuzak kabuk işlevlerince miras alınır.\n"
+" -H ! tarzı geçmiş ikamesini etkinleştirir. Bu seçenek etkileşimli\n"
+" kabuklarda öntanımlı olarak etkindir.\n"
+" -P Verildiğinde, örneğin çalışılan dizini değiştirmek için cd gibi bir\n"
+" komut sembolik bağları izlemez.\n"
+" -T Etkinse DEBUG ve RETURN üstündeki bir tuzak kabuk işlevlerince\n"
+" miras alınır.\n"
+" - Seçeneklerin sonunu belirtir. Kalan tüm argümanlar konumsal\n"
+" parametrelere ayarlanır. -x ve -v seçenekleri kapatılır.\n"
+"\n"
+" Seçeneklerdeki - işaretleri yerine + kullanıldığında bu seçenekler\n"
+" kapatılır. Ayrıca, seçenekler kabuğun çağrılması sırasında da\n"
+" kullanılabilir. Seçeneklerin mevcut listesi $- içinde bulunabilir.\n"
+" Kalan N argüman konumsal parametrelerdir ve $1, $2, ... $N şeklinde\n"
+" atanır. Özel parametre # ise N'e ayarlanır. Hiç argüman verilmezse,\n"
+" tüm kabuk değişkenleri basılır."
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+#, fuzzy
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+"\rsource DOSYAÄ°SMÄ° [ARGÃœMANlar]\n"
+". DOSYAÄ°SMÄ° [ARGÃœMANlar]\n"
+" DOSYAİSMİndeki komutlar okunur ve çalıştırılır. DOSYAİSMİ / "
+"içermiyorsa\n"
+" DOSYAİSMİnin yerini bulmak için $PATH değişkeni kullanılır. Bash "
+"POSIX\n"
+" kipinde değilse ve $PATH içinde DOSYAİSMİ yoksa bulunulan dizine "
+"bakılır.\n"
+" Verilmiş ARGÜMANlar varsa, DOSYAİSMİ çalıştırılırken bunlar "
+"konumsal\n"
+" parametreler haline gelir. Aksi takdirde, konumsal "
+"parametreler\n"
+" deÄŸiÅŸtirilmez."
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+#, fuzzy
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+"\rtest [Ä°FADE]\n"
+"[ [Ä°FADE] ]\n"
+" İFADEnin değerlendirilmesine bağlı olarak 0 (doğru) veya 1 (yanlış)\n"
+" durumu ile çıkar. İfadeler tek terimli ya da iki terimli olabilir.\n"
+" Tek terimli ifadeler çoğunlukla bir dosyanın durumunu saptamakta\n"
+" kullanılır. Dizge işleçleri ve sayısal karşılaştırma işleçleri de\n"
+" vardır.\n"
+"\n"
+" Dosya işleçleri:\n"
+"\n"
+" -a DOSYA DOSYA varsa doÄŸrudur.\n"
+" -b DOSYA DOSYA varsa ve bloka özelse doğrudur.\n"
+" -c DOSYA DOSYA varsa ve karaktere özelse doğrudur.\n"
+" -d DOSYA DOSYA varsa ve bir dizinse doÄŸrudur.\n"
+" -e DOSYA DOSYA varsa doÄŸrudur.\n"
+" -f DOSYA DOSYA varsa ve normal bir dosyaysa doÄŸrudur.\n"
+" -g DOSYA DOSYA varsa ve grup kimliÄŸi biti 1 ise doÄŸrudur.\n"
+" -h DOSYA DOSYA varsa ve bir sembolik baÄŸ ise doÄŸrudur.\n"
+" -L DOSYA DOSYA varsa ve bir sembolik baÄŸ ise doÄŸrudur.\n"
+" -k DOSYA DOSYA dosya varsa ve yapışkan biti 1 ise doğrudur.\n"
+" -p DOSYA DOSYA varsa ve bir isimli boru (FIFO) ise doÄŸrudur.\n"
+" -r DOSYA DOSYA varsa ve okuyabiliyorsanız doğrudur.\n"
+" -s DOSYA DOSYA varsa ve uzunluğu sıfırdan büyükse doğrudur.\n"
+" -S DOSYA DOSYA varsa ve bir soketse doÄŸrudur.\n"
+" -t DSYTNT DSYTNT açık ve bir uçbirime karşılıksa doğrudur.\n"
+" -u DOSYA DOSYA varsa ve kullanıcı kimliği biti 1 ise "
+"doÄŸrudur.\n"
+" -w DOSYA DOSYA dosya varsa ve yazabiliyorsanız doğrudur.\n"
+" -x DOSYA DOSYA dosya varsa ve çalıştırabiliyorsanız "
+"doÄŸrudur.\n"
+" -O DOSYA DOSYA varsa ve etkin sahibi sizseniz doÄŸrudur.\n"
+" -G DOSYA DOSYA varsa ve etkin grubu sizinkiyse doÄŸrudur.\n"
+" -N DOSYA DOSYA varsa ve son okunduÄŸundan beri "
+"deÄŸiÅŸtirilmiÅŸse\n"
+" doÄŸrudur.\n"
+"\n"
+" DOSYA1 -nt DOSYA2 dosya1, dosya2'den değişiklik tarihine göre\n"
+" daha yeni ise ya da dosya1 mevcutken dosya2 yoksa\n"
+" doÄŸrudur.\n"
+"\n"
+" DOSYA1 -ot DOSYA2 dosya1, dosya2 den daha eski ise ya da dosya2\n"
+" mevcutken dosya1 yoksa doÄŸrudur.\n"
+"\n"
+" DOSYA1 -ef DOSYA2 dosya1 ile dosya2 aynı aygıt ve aynı dosya "
+"düğümünü\n"
+" gösteriyorsa (ona sabit bağ ise) doğrudur.\n"
+"\n"
+" Dizge işleçleri:\n"
+" \n"
+" -z DİZGE dizge uzunluğu sıfırsa doğrudur.\n"
+" \n"
+" -n DÄ°ZGE\n"
+" DİZGE dizge uzunluğu sıfırdan farklıysa doğrudur.\n"
+" \n"
+" DİZGE1 = DİZGE2 dizgeler aynıysa doğrudur.\n"
+" DİZGE1 != DİZGE2 dizgeler aynı değilse doğrudur.\n"
+" DİZGE1 < DİZGE2 dizge1 yerele göre sıralamada dizge2'den\n"
+" önceyse doğrudur.\n"
+" DİZGE1 > DİZGE2 dizge1 yerele göre sıralamada dizge2'den\n"
+" sonraysa doÄŸrudur.\n"
+"\n"
+" Diğer işleçler:\n"
+"\n"
+" -o SEÇENEK Kabuk seçeneği SEÇENEK etkinse doğrudur.\n"
+" ! İFADE İFADE yanlışsa doğrudur.\n"
+" Ä°FADE1 -a Ä°FADE2 Ä°FADE1 ve Ä°FADE2 her ikisi de doÄŸruysa doÄŸrudur.\n"
+" Ä°FADE1 -o Ä°FADE2 Ä°FADE1 veya Ä°FADE2 doÄŸruysa doÄŸrudur.\n"
+"\n"
+" arg1 İM arg2 Aritmetik sınamalar. İM bunlardan biri "
+"olmalıdır:\n"
+" -eq, -ne, -lt, -le, -gt veya -ge.\n"
+"\n"
+" Bir aritmetik ifadede ARG1 ve ARG2 arasında, aranan eşitlik, "
+"eÅŸitsizlik,\n"
+" küçüklük, büyüklük, küçüklük veya eşitlik, büyüklük veya eşitlik varsa\n"
+" ifadenin sonucu doÄŸrudur."
+
+#: builtins.c:1299
+#, fuzzy
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"\r[ [Ä°FADE] ]\n"
+" test yerleşiği ile aynıdır, fakat son argüman açan `[' ile eşleşen\n"
+" kapatan `]' olmak zorundadır."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:1320
+#, fuzzy
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+"\rtrap [-lp] [ARG SÄ°NYAL ...]\n"
+" ARGüman içindeki komutlar, kabuk SİNYAL sinyalini aldığında okunur ve\n"
+" çalıştırılır. ARGüman verilmezse (ve tek bir SİNYAL varsa) ya da `-'\n"
+" verilirse, belirtilen tüm sinyallere kabuk başlatıldığındaki değerleri\n"
+" yerleştirilir. ARGüman bir boş dizge ise her SİNYAL sinyali kabuk ve\n"
+" onu çağıran komutlar tarafından yoksayılır. Eğer SİNYAL 0 ya da EXIT\n"
+" ise ARGüman kabuk çıkarken çalıştırılır. Eğer SİNYAL olarak DEBUG\n"
+" verilmişse, ARGüman komutu her basit komuttan önce çalıştırılır. -p\n"
+" seçeneği verilmişse trap, her SİNYAL ile ilişkili trap komutlarını\n"
+" gösterir. Hiç ARGüman verilmemişse veya sadece -p verilmişse, trap\n"
+" her SİNYAL ile ilişkili komutların listesini basar. Her SİNYAL ya\n"
+" <signal.h> dosyasındaki bir sinyal ismi ya da bir sinyal numarası\n"
+" olarak verilmelidir. Sinyal isimleri harf büyüklüğüne duyarsızdır ve\n"
+" SIG öneki isteğe bağlıdır. -l seçeneği kabuğun sinyal isimlerini\n"
+" numaraları ile birlikte listelemesini sağlar. Kabuğa bir sinyal\n"
+" göndermek isterseniz \"kill -SİGNAL $$\" sözdizimini kullanabilirsiniz."
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+#, fuzzy
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"\rulimit [-SHacdfilmnpqstuvx] [SINIR]\n"
+" ulimit kabuk tarafından başlatılan süreçlerin kullanabildiği\n"
+" özkaynaklar üzerinde, sistem buna izin veriyorsa, denetim sağlar.\n"
+" Seçenekler verildiğinde şu anlamlara gelir:\n"
+"\n"
+" -S Yazılımsal (`soft') sınır kullanılır.\n"
+" -H Donanımsal (`hard') sınır kullanılır.\n"
+" -a Mevcut tüm sınırlamalar gösterilir. -c Oluşan core dosyalarının "
+"azami boyu\n"
+" -d Bir sürecin veri segmanının azami boyu\n"
+" -e Azami zamanlama önceliği (`nice')\n"
+" -f Kabuk ve çocukları tarafından oluşturulan dosyaların azami boyu\n"
+" -i Askıdaki sinyallerin azami sayısı\n"
+" -l BelleÄŸe kilitlenebilen azami boyut\n"
+" -m Azami bellek boyu\n"
+" -n Açık dosya tanıtıcılarının azami sayısı\n"
+" -p Boruhattı tamponunun boyu\n"
+" -q POSIX ileti kuyruklarındaki azami bayt miktarı\n"
+" -r Azami anında çalıştırma zamanlaması önceliği\n"
+" -s Yığıtın azami boyu\n"
+" -t İşlemci zamanının saniye cinsinden azami miktarı\n"
+" -u Tek bir kullanıcının kullanabileceği azami süreç sayısı\n"
+" -v Bir sürecin kullanabileceği sanal belleğin azami miktarı\n"
+" -x Dosya kilitlerinin azami sayısı\n"
+"\n"
+" SINIR verilmişse, belirtilen özkaynağın yeni değeridir; özel sınır\n"
+" değerleri mevcut donanımsal sınır için `hard', mevcut yazılımsal sınır\n"
+" için `soft' ve sınırsız için `unlimited''dir. Aksi takdirde, belirtilen\n"
+" özkaynak için mevcut değer gösterilir. Hiç seçenek verilmezse -f\n"
+" seçeneği verilmiş kabul edilir. Değerler -t için saniye cinsinden, -p\n"
+" için 512 baytlık blok sayısı olarak, -n ve -u için birimsiz, kalan\n"
+" seçenekler için 1024 baytlık blok sayısı olarak belirtilmelidir."
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+#, fuzzy
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"\rwait [N]\n"
+" Belirtilen süreci bekler ve sonlandırma durumunu raporlar. N\n"
+" verilmezse, o an etkin olan tüm süreçler için beklenir ve sıfır\n"
+" durumu ile dönülür. N bir süreç kimliği olabileceği gibi bir iş\n"
+" belirtimi de olabilir; bir iÅŸ belirtimi verilirse iÅŸin\n"
+" boruhattındaki tüm süreçler için beklenir."
+
+#: builtins.c:1481
+#, fuzzy
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"\rfor AD [in SÖZ ... ;] do KOMUT; done\n"
+" SÖZcükler yorumlanır ve sonuçlanan listenin AD ile bağlantılı her\n"
+" üyesi için KOMUTlar çalıştırılır. Deyimin `in SÖZ ... ;' parçası\n"
+" yoksa, `in \"$@\"' belirtilmiş gibi kümeyi oluşturan her parametre\n"
+" için KOMUTlar birer kere çalıştırılır."
+
+#: builtins.c:1495
+#, fuzzy
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"\rfor ((: for (( Ä°FADE1; Ä°FADE2; Ä°FADE3 )); do KOMUTlar; done\n"
+" Bu sözdizimi şu koda eşdeğerdir:\n"
+" \t(( Ä°FADE1 ))\n"
+" \twhile (( Ä°FADE2 )); do\n"
+" \t\tKOMUTlar\n"
+" \t\t(( Ä°FADE3 ))\n"
+" \tdone\n"
+" Ä°FADE1, Ä°FADE2 ve Ä°FADE3 aritmetik ifadelerdir. Verilmeyen her\n"
+" ifade için 1 verilmiş gibi işlem yapılır."
+
+#: builtins.c:1513
+#, fuzzy
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"\rselect AD [in SÖZ ... ;] do KOMUTlar; done\n"
+" `SÖZ ...;' listesi yorumlanarak öğe listesi üretilir. Öğe "
+"listesindeki\n"
+" her öğenin başına bir numara eklenerek standart hataya çıktılanır. "
+"EÄŸer\n"
+" `in SÖZ ... ;' parçası verilmezse, in \"$@\"' verilmiş gibi konuma "
+"bağlı\n"
+" parametreler basılır ve standart girdide PS3 istemi ile girdi "
+"beklenir.\n"
+" Listede belirtilen numaralardan biri girdi olarak verilirse, o "
+"konuma\n"
+" bağlı SÖZcük ile AD eşleştirilir. Girdi satırı boş verilirse, "
+"dosyasonu\n"
+" okununcaya kadar komut istemi tekrarlanır. Listede belirtilenler "
+"dışında\n"
+" verilen her değer için AD null ile eşleştirilir. Okunan satır "
+"$REPLY\n"
+" değişkeninde tutulur. Her seçimden sonra bir break komutu ile\n"
+" sonlandırılıncaya kadar komutlar çalıştırılır."
+
+#: builtins.c:1534
+#, fuzzy
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+"\rtime [-p] [!] KOMUT1 [| KOMUT2 ...]\n"
+" Bir boruhattındaki her komut bir kanal ile sonrakine bağlıdır. Böylece\n"
+" her komut bir önceki komutun çıktısını okur. time boruhattındaki iş\n"
+" sonuçlanınca geçen gerçek zaman, kullanıcı ve sistem zamanını basar.\n"
+" Dönüş durumu boruhattının dönüş durumudur. -p seçeneği zaman\n"
+" istatistiklerinin biraz farklı bir biçimde basılmasını sağlar; çıktı\n"
+" biçimi olarak TIMEFORMAT değişkeninin değerini kullanır."
+
+#: builtins.c:1551
+#, fuzzy
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"\rcase SÖZ in [KALIP [| KALIP]...) KOMUTlar ;;]... esac\n"
+" SÖZcük ile eşleşen ilk KALIP'a karşı düşen KOMUTları çalıştırır.\n"
+" `|' çok sayıda kalıbı ayırmak için kullanılır."
+
+#: builtins.c:1563
+#, fuzzy
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"\rif KOMUTlar; then KOMUTlar;\n"
+"[ elif KOMUTlar; then KOMUTlar; ]...\n"
+"[ else KOMUTlar; ]\n"
+"fi\n"
+"\n"
+" `if KOMUTlar;' listesi çalıştırılır; çıkış durumu sıfırsa\n"
+" `then KOMUTlar;' listesi çalıştırılır, değilse `elif KOMUTlar;'\n"
+" listesi çalıştırılır; bunun çıkış durumu sıfırsa `then KOMUTlar;'\n"
+" listesi çalıştırılır ve if komutu tamamlanır, değilse varsa\n"
+" `else KOMUTlar;' listesi çalıştırılır ve if komutu tamamlanır.\n"
+" Oluşumun tamamının dönüş durumu çalıştırılmış olan son komutun\n"
+" çıkış durumudur. Bir komut çalıştırılmamışsa ve hiçbir koşul\n"
+" doğru sonuç vermemişse sıfır döner."
+
+#: builtins.c:1580
+#, fuzzy
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"\rwhile KOMUTlar; do KOMUTlar; done\n"
+" `while KOMUTlar; listesinin çıkış durumu sıfır olduğu sürece\n"
+" `do KOMUTlar;' listesi çalıştırılır."
+
+#: builtins.c:1592
+#, fuzzy
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"\runtil KOMUTlar; do KOMUTlar; done\n"
+" `until KOMUTlar; listesinin çıkış durumu sıfırdan farklı olduğu sürece\n"
+" `do KOMUTlar;' listesi çalıştırılır."
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+
+#: builtins.c:1632
+#, fuzzy
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"\r{ KOMUTlar ; }\n"
+" KOMUTlar bir grup olarak çalıştırılır. Bu, bir komut kümesini bir\n"
+" yönlendirmede kullanmanın tek yoludur."
+
+#: builtins.c:1644
+#, fuzzy
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+"\r%: Ä°Åž_BELÄ°RTÄ°MÄ° [&]\n"
+" `fg' komutunu İŞ_BELİRTİMİ argümanı ile kullanmaya eşdeğerdir.\n"
+" Durmuş veya artalandaki bir işin önalanda sürdürülmesini sağlar.\n"
+" İŞ_BELİRTİMİ bir iş ismi veya iş numarası olarak belirtilebilir.\n"
+" İŞ_BELİRTİMİ'nden sonra bir & gelmesi işin `bg' komutununa argüman\n"
+" olarak kullanılmış gibi artalana yerleştirilmesine sebep olur."
+
+#: builtins.c:1659
+#, fuzzy
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+"\r(( Ä°FADE ))\n"
+" Verilen aritmetik İFADE aritmetik değerlendirme kurallarına göre\n"
+" deÄŸerlendirilir. \"let Ä°FADE\" ile eÅŸdeÄŸerdir."
+
+#: builtins.c:1671
+#, fuzzy
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+"\r[[ Ä°FADE ]]\n"
+" Koşullu İFADEnin değerine bağlı olarak 0 ya da 1 durumu ile döner.\n"
+" İfadeler test yerleşiği tarafından kullanılan aynı ilkelerle "
+"oluÅŸturulur\n"
+" ve aşağıdaki işleçler kullanılarak biraraya getirilebilirler:\n"
+"\n"
+" ( İFADE ) İFADEnin değeri döner\n"
+" ! İFADE İFADE yanlışsa doğru, doğruysa yanlıştır.\n"
+" Ä°FADE1 && Ä°FADE2 Ä°FADE1 ve Ä°FADE2 her ikisi de doÄŸruysa doÄŸrudur\n"
+" Ä°FADE1 || Ä°FADE2 Ä°FADE1 veya Ä°FADE2 doÄŸruysa doÄŸrudur\n"
+"\n"
+" == ve != işleçleri kullanıldığında, işlecin sağındaki dizge bir kalıp\n"
+" olarak ele alınır ve kalıp eşleştirmesi uygulanır. && ve || işleçleri\n"
+" eğer ilk ifade sonuç için belirleyici ise ikincisine bakmazlar."
+
+#: builtins.c:1697
+#, fuzzy
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+"\rdeğişkenler: Bazı değişkenler ve anlamları:\n"
+" BASH_VERSION Bu Bash'in sürüm bilgisi.\n"
+" CDPATH ` cd'ye argüman olarak verilecek dizinlerin aranacağı\n"
+" dizinlerin ikinokta imi ayraçlı listesi.\n"
+" GLOBIGNORE Dosyayolu yorumlaması tarafından yoksayılacak dosya\n"
+" isimlerini belirten kalıpların ikinokta imi ayraçlı\n"
+" listesi.\n"
+" HISTFILE Komut geçmişinizin saklanacağı dosyanın ismi.\n"
+" HISTFILESIZE Bu dosyanın içerebileceği azami satır sayısı.\n"
+" HISTSIZE Çalışan bir kabuğun erişebileceği geçmiş "
+"satırlarının\n"
+" azami sayısı.\n"
+" HOME Kullanıcının ev dizininin tam yolu.\n"
+" HOSTNAME Makinenizin aÄŸdaki konak ismi.\n"
+" HOSTTYPE Bash'in bu sürümünün altında çalıştığı işlemcinin "
+"türü\n"
+" IGNOREEOF Tek girdi olarak EOF karakteri alındığında kabuğun\n"
+" eylemini kontrol eder. Atandığında değeri, kabuk\n"
+" çıkmadan önce bir girdi satırındaki ilk karakter\n"
+" olarak okunabilen ardışık EOF karakterlerinin "
+"sayısını\n"
+" gösterir (öntanımlı 10). Eğer değişken mevcut "
+"deÄŸilse,\n"
+" EOF girdi sonunu belirtir.\n"
+" MACHTYPE Bash'in üzerinde çalıştığı sistemi açıklayan dizge.\n"
+" MAILCHECK Bash'in yeni postaya kaç saniyede bir bakacağı.\n"
+" MAILPATH Bash'in yeni posta var mı diye bakacağı dosya\n"
+" isimlerinin ikinokta imi ayraçlı listesi.\n"
+" OSTYPE Bash'in üzerinde çalıştığı çekirdeğin türü.\n"
+" PATH Komutları ararken bakılacak dizinlerin ikinokta imi\n"
+" ayraçlı listesi.\n"
+" PROMPT_COMMAND Birincil komut istemi ($PS1) basılmadan önce\n"
+" çalıştırılacak komut\n"
+" PS1 Birincil komut istemi dizgesi.\n"
+" PS2 Ä°kincil komut istemi dizgesi.\n"
+" PWD Çalışma dizininizin tam yolu.\n"
+" SHELLOPTS Etkin kabuk seçeneklerinin ikinokta imi ayraçlı "
+"listesi\n"
+" TERM Geçerli uçbirim türünün ismi.\n"
+" TIMEFORMAT time anahtar sözcüğü ile başlayan zamanlama "
+"bilgisinin\n"
+" nasıl belirtileceğini gösteren biçim dizgesi.\n"
+" auto_resume Değerin boş olmaması durmuş işin isminin onu\n"
+" başlatmakta kullanılan komut satırı olduğudur ve\n"
+" oradaysa iş önalana alınır. `exact' değeri, komut\n"
+" sözcüğünün durmuş işler listesindeki komutla tam\n"
+" olarak eşleşmesi gerektiği anlamına gelir. "
+"`substring'\n"
+" değeri, komut sözcüğünün işin bir altdizgesi ile\n"
+" eşleşmesi gerektiğini belirtir. Bunlar dışında bir\n"
+" değer komutun durmuş bir işe önek olması gerektiği\n"
+" anlamına gelir.\n"
+" histchars Geçmiş yorumlaması, hızlı ikame ve sembolleştirmeyi\n"
+" denetleyen en çok üç karakter. İlk karakter geçmiş\n"
+" yorumlamasının başlatılmasını sağlayan geçmiş\n"
+" yorumlama karakteridir ve normalde ! iÅŸaretidir.\n"
+" İkinci karakter, bir satırdaki ilk karakter "
+"olduÄŸunda\n"
+" `hızlı ikame'yi imleyen karakterdir ve normalde ^\n"
+" imidir. İstemlik olan üçüncü karakter ise, bir\n"
+" sözcüğün ilk karakteri olarak bulunduğunda satırın\n"
+" kalanının açıklama olmasını sağlayan karakterdir ve\n"
+" normalde # imidir.\n"
+" HISTIGNORE Geçmiş listesine hangi satırların kaydedilmesi\n"
+" gerektiğine karar vermek için kullanılan kalıpların\n"
+" ikinokta imi ayraçlı listesi.\n"
+
+#: builtins.c:1754
+#, fuzzy
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"\rpushd [DZN | +N | -N] [-n]\n"
+" Dizin yığıtının en üstüne bir dizin ekler, ya da geçerli çalışma\n"
+" dizini yığıtın tepesine gelecek şekilde yığıtı döndürür. Hiç\n"
+" argüman verilmemişse en üstteki iki dizini yer değiştirir.\n"
+"\n"
+" +N (`dirs' tarafından gösterilen listenin solundan saymaya\n"
+" sıfırla başlandığında) N'inci dizin tepeye gelecek şekilde\n"
+" yığıtı döndürür.\n"
+"\n"
+" -N (`dirs' tarafından gösterilen listenin sağından saymaya\n"
+" sıfırla başlandığında) N'inci dizin tepeye gelecek şekilde\n"
+" yığıtı döndürür.\n"
+"\n"
+" +n dizinleri yığıta eklerken normal dizin değişikliğini engeller,\n"
+" böylece sadece yığıt değiştirilmiş olur.\n"
+"\n"
+" DZN DiZiNi yeni çalışma dizini yaparak dizin yığıtının\n"
+" tepesine ekler.\n"
+"\n"
+" Dizin yığıtını `dirs' komutuyla görebilirsiniz."
+
+#: builtins.c:1788
+#, fuzzy
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"\rpopd [+N | -N] [-n]\n"
+" Dizin yığıtından girdileri siler. Hiç argüman verilmemişse,\n"
+" yığıtın en üstündeki dizini yığıttan kaldırır ve yığıtın\n"
+" tepesinde kalan dizine geçer. \n"
+" +N `dirs' tarafından gösterilen listenin solundan saymaya\n"
+" sıfırla başlandığında N'inci girdiyi siler. Örneğin,\n"
+" `popd +0' ilk dizini `popd +1' ikincisini siler. \n"
+" -N `dirs' tarafından gösterilen listenin sağından saymaya\n"
+" sıfırla başlandığında N'inci girdiyi siler. Örneğin,\n"
+" `popd -0' son dizini `popd -1' sonuncudan öncekini siler. \n"
+" -n dizinleri yığıttan silerken normal dizin değişikliğini\n"
+" engeller, böylece sadece yığıt değiştirilmiş olur. \n"
+" Dizin yığıtını `dirs' komutuyla görebilirsiniz."
+
+#: builtins.c:1818
+#, fuzzy
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"\rdirs [-clpv] [+N] [-N]\n"
+" O an anımsanan dizinleri listeler. Dizinler listeye `pushd'\n"
+" komutuyla eklenir; listeden tek tek geri almak içinse `popd'\n"
+" komutu kullanılır.\n"
+" -l seçeneği `dirs'in dizinleri ev dizininize göreli kısayollar\n"
+" olarak göstermemesine yol açar. Yani `~/bin' yerine `/homes/bfox/bin'\n"
+" gibi bir gösterimle karşılaşabilirsiniz. -v seçeneği `dirs'in\n"
+" dizin yığıtını dizin adının önüne yığıt konumunu ekleyerek her\n"
+" satırda bir girdi göstermesini sağlar. -p seçeneği yığıttaki\n"
+" konumu göstermemesi dışında aynı çıktıyı verir. -c seçeneği tüm\n"
+" girdileri silerek dizin yığıtını boşaltır. \n"
+" +N dirs seçeneksiz çağrıldığında gösterdiği listenin solundan\n"
+" sıfırla başlayarak sayılan N'inci girdiyi gösterir.\n"
+"\n"
+" -N dirs seçeneksiz çağrıldığında gösterdiği listenin sağından\n"
+" sıfırla başlayarak sayılan N'inci girdiyi gösterir."
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+#, fuzzy
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+"\rprintf [-v DEĞİŞKEN] BİÇİM [ARGümanlar]\n"
+" BİÇİMin denetimi altında ARGümanları standart çıktıya biçimleyerek\n"
+" yazar. BİÇİM üç tür nesne içeren bir dizgedir: salt karakterler\n"
+" basitçe standart çıktıya kopyalanır, öncelenmiş karakterler\n"
+" dönüştürülüp standart çıktıya kopyalanır ve biçim belirtimleri;\n"
+" belirtimlerin her biri sırayla karşı düşen ARGümanların basılmasını\n"
+" sağlar. Standart printf(1) biçimlerine ek olarak, %b printf'in tersbölü\n"
+" öncelemeli karakterlerin karşı düşen ARGümanda yorumlanmasını sağlar ve\n"
+" %q printf'in karşı düşen ARGümanı kabuk girdisi olarak kullanılabilecek\n"
+" biçimde çıktılamasını sağlar. -v seçeneği çıktının standart çıktıya\n"
+" basılması yerine DEĞİŞKENe atanmasını sağlar. "
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+#, fuzzy
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"\rcompgen [-abcdefgjksuv] [-o SEÇENEK] [-A EYLEM] [-G KALIP] [-W SÖZLİST]\n"
+" [-P ÖNEK] [-S SONEK] [-X SÜZGEÇ] [-F İŞLEV] [-C KOMUT] [SÖZCÜK]\n"
+" Seçeneklere bağlı olarak olası tamamlamaları gösterir. Olası\n"
+" tamamlamaları üretmek üzere bir kabuk işlevinin içinde kullanmak\n"
+" amacıyla tasarlanmıştır. İsteğe bağlı SÖZCÜK argümanı sağlandığı\n"
+" takdirde eşleşmelerden sadece SÖZCÜK ile eşleşenler üretilir."
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xrealloc: %lu bayt yeniden ayrılamıyor (%lu bayt ayrıldı)"
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: %lu bayt yeniden ayrılamıyor"
+
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xrealloc: %s:%d: %lu bayt yeniden ayrılamıyor (%lu bayt ayrıldı)"
+
+#~ msgid " "
+#~ msgstr " "
+
+#~ msgid "Without EXPR, returns returns \"$line $filename\". With EXPR,"
+#~ msgstr "İFADE olmaksızın \"$line $filename\" döner. İFADE ile ise"
+
+#~ msgid "returns \"$line $subroutine $filename\"; this extra information"
+#~ msgstr "\"$line $subroutine $filename\" döner; bu ek bilgi"
+
+#~ msgid "can be used used to provide a stack trace."
+#~ msgstr "bir yığıt izini sürmek için kullanılabilir."
+
+#~ msgid ""
+#~ "The value of EXPR indicates how many call frames to go back before the"
+#~ msgstr ""
+#~ "İFADE değeri şu ankinden önce kaç çağrı çerçevesinin geri döneceğini"
+
+#~ msgid "current one; the top frame is frame 0."
+#~ msgstr "belirtir; tepe çerçeve 0. çerçevedir."
+
+#~ msgid "%s: invalid number"
+#~ msgstr "%s: sayı geçersiz"
+
+#~ msgid "Shell commands matching keywords `"
+#~ msgstr "Bu anahtar sözcüklere uygun kabuk komutları: `"
+
+#~ msgid "Display the list of currently remembered directories. Directories"
+#~ msgstr ""
+#~ "\rdirs [-clpv] [+N] [-N]\n"
+#~ " O an anımsanan dizinleri listeler. Dizinler listeye"
+
+#~ msgid "find their way onto the list with the `pushd' command; you can get"
+#~ msgstr "`pushd' komutuyla eklenir; listeden tek tek geri almak içinse"
+
+#~ msgid "back up through the list with the `popd' command."
+#~ msgstr "`popd' komutu kullanılır."
+
+#~ msgid ""
+#~ "The -l flag specifies that `dirs' should not print shorthand versions"
+#~ msgstr "-l seçeneği `dirs'in dizinleri ev dizininize göreli kısayollar"
+
+#~ msgid ""
+#~ "of directories which are relative to your home directory. This means"
+#~ msgstr ""
+#~ "olarak göstermemesine yol açar. Yani `~/bin' yerine `/homes/bfox/bin'"
+
+#~ msgid "that `~/bin' might be displayed as `/homes/bfox/bin'. The -v flag"
+#~ msgstr "gibi bir gösterimle karşılaşabilirsiniz. -v seçeneği `dirs'in"
+
+#~ msgid "causes `dirs' to print the directory stack with one entry per line,"
+#~ msgstr "dizin yığıtını dizin adının önüne yığıt konumunu ekleyerek her"
+
+#~ msgid ""
+#~ "prepending the directory name with its position in the stack. The -p"
+#~ msgstr "satırda bir girdi göstermesini sağlar. -p seçeneği yığıttaki"
+
+#~ msgid "flag does the same thing, but the stack position is not prepended."
+#~ msgstr "konumu göstermemesi dışında aynı çıktıyı verir."
+
+#~ msgid ""
+#~ "The -c flag clears the directory stack by deleting all of the elements."
+#~ msgstr "-c seçeneği tüm girdileri silerek dizin yığıtını boşaltır."
+
+#~ msgid ""
+#~ "+N displays the Nth entry counting from the left of the list shown by"
+#~ msgstr "+N dirs seçeneksiz çağrıldığında gösterdiği listenin solundan"
+
+#~ msgid " dirs when invoked without options, starting with zero."
+#~ msgstr " sıfırla başlayarak sayılan N'inci girdiyi gösterir."
+
+#~ msgid ""
+#~ "-N displays the Nth entry counting from the right of the list shown by"
+#~ msgstr "-N dirs seçeneksiz çağrıldığında gösterdiği listenin sağından"
+
+#~ msgid "Adds a directory to the top of the directory stack, or rotates"
+#~ msgstr "Dizin yığıtının en üstüne bir dizin ekler, ya da geçerli çalışma"
+
+#~ msgid "the stack, making the new top of the stack the current working"
+#~ msgstr "dizini yığıtın tepesine gelecek şekilde yığıtı döndürür."
+
+#~ msgid "directory. With no arguments, exchanges the top two directories."
+#~ msgstr "Hiç argüman verilmemişse en üstteki iki dizini yer değiştirir."
+
+#~ msgid "+N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "+N (`dirs' tarafından gösterilen listenin solundan saymaya"
+
+#~ msgid " from the left of the list shown by `dirs', starting with"
+#~ msgstr " sıfırla başlandığında) N'inci dizin tepeye gelecek şekilde"
+
+#~ msgid " zero) is at the top."
+#~ msgstr " yığıtı döndürür."
+
+#~ msgid "-N Rotates the stack so that the Nth directory (counting"
+#~ msgstr "-N (`dirs' tarafından gösterilen listenin sağından saymaya"
+
+#~ msgid " from the right of the list shown by `dirs', starting with"
+#~ msgstr " sıfırla başlandığında) N'inci dizin tepeye gelecek şekilde"
+
+#~ msgid "-n suppress the normal change of directory when adding directories"
+#~ msgstr "+n dizinleri yığıta eklerken normal dizin değişikliğini engeller,"
+
+#~ msgid " to the stack, so only the stack is manipulated."
+#~ msgstr " böylece sadece yığıt değiştirilmiş olur."
+
+#~ msgid "dir adds DIR to the directory stack at the top, making it the"
+#~ msgstr "dir DİZİNi yeni çalışma dizini yaparak dizin yığıtının"
+
+#~ msgid " new current working directory."
+#~ msgstr " tepesine ekler."
+
+#~ msgid "You can see the directory stack with the `dirs' command."
+#~ msgstr "Dizin yığıtını `dirs' komutuyla görebilirsiniz."
+
+#~ msgid "Removes entries from the directory stack. With no arguments,"
+#~ msgstr "Dizin yığıtından girdileri siler. Hiç argüman verilmemişse,"
+
+#~ msgid "removes the top directory from the stack, and cd's to the new"
+#~ msgstr "yığıtın en üstündeki dizini yığıttan kaldırır ve"
+
+#~ msgid "top directory."
+#~ msgstr "yığıtın tepesinde kalan dizine geçer."
+
+#~ msgid "+N removes the Nth entry counting from the left of the list"
+#~ msgstr "+N `dirs' tarafından gösterilen listenin solundan saymaya"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd +0'"
+#~ msgstr " sıfırla başlandığında N'inci girdiyi siler. Örneğin,"
+
+#~ msgid " removes the first directory, `popd +1' the second."
+#~ msgstr " `popd +0' ilk dizini `popd +1' ikincisini siler."
+
+#~ msgid "-N removes the Nth entry counting from the right of the list"
+#~ msgstr "-N `dirs' tarafından gösterilen listenin sağından saymaya"
+
+#~ msgid " shown by `dirs', starting with zero. For example: `popd -0'"
+#~ msgstr " sıfırla başlandığında N'inci girdiyi siler. Örneğin,"
+
+#~ msgid " removes the last directory, `popd -1' the next to last."
+#~ msgstr " `popd -0' son dizini `popd -1' sonuncudan öncekini siler."
+
+#~ msgid ""
+#~ "-n suppress the normal change of directory when removing directories"
+#~ msgstr ""
+#~ "-n dizinleri yığıttan silerken normal dizin değişikliğini engeller,"
+
+#~ msgid " from the stack, so only the stack is manipulated."
+#~ msgstr " böylece sadece yığıt değiştirilmiş olur."
+
+#~ msgid "allocated"
+#~ msgstr "ayrılmış"
+
+#~ msgid "freed"
+#~ msgstr "serbest bırakılmış"
+
+#~ msgid "requesting resize"
+#~ msgstr "yeniden boyutlandırma isteniyor"
+
+#~ msgid "just resized"
+#~ msgstr "yeniden boyutlandırıldı"
+
+#~ msgid "bug: unknown operation"
+#~ msgstr "yazılım hatası: unknown operation"
+
+#~ msgid "malloc: watch alert: %p %s "
+#~ msgstr "malloc: yakalama alarmı: %p %s "
+
+#~ msgid ""
+#~ "Exit from within a FOR, WHILE or UNTIL loop. If N is specified,\n"
+#~ " break N levels."
+#~ msgstr ""
+#~ "\rbreak [N]\n"
+#~ " FOR, WHILE veya UNTIL döngülerinden çıkılmasını sağlar. N "
+#~ "verilmiÅŸse,\n"
+#~ " dışa doğru N. döngüden çıkılır. N >= 1 olmalıdır."
+
+#~ msgid ""
+#~ "Run a shell builtin. This is useful when you wish to rename a\n"
+#~ " shell builtin to be a function, but need the functionality of the\n"
+#~ " builtin within the function itself."
+#~ msgstr ""
+#~ "\rbuiltin [kabuk-yerleşiği [argümanlar]]\n"
+#~ " Bir kabuk yerleşiğini çalıştırır. Bu bir kabuk işlevinin bir "
+#~ "kabul\n"
+#~ " yerleşiği ile aynı isimde atanması durumunda faydalıdır, fakat "
+#~ "iÅŸlevin\n"
+#~ " içinde yerleşiğin işlevselliğinin sağlanması gerekir."
+
+#~ msgid ""
+#~ "Print the current working directory. With the -P option, pwd prints\n"
+#~ " the physical directory, without any symbolic links; the -L option\n"
+#~ " makes pwd follow symbolic links."
+#~ msgstr ""
+#~ "\rpwd [-LP]\n"
+#~ " Geçerli çalışma dizinini basar. -P seçeneği ile sembolik bağlar\n"
+#~ " olmaksızın fiziksel dizini basar; -L seçeneği ile sembolik bağları "
+#~ "izler."
+
+#~ msgid "Return a successful result."
+#~ msgstr ""
+#~ "\rtrue\n"
+#~ " Başarılı bir sonuç döndürür."
+
+#~ msgid ""
+#~ "Runs COMMAND with ARGS ignoring shell functions. If you have a shell\n"
+#~ " function called `ls', and you wish to call the command `ls', you can\n"
+#~ " say \"command ls\". If the -p option is given, a default value is "
+#~ "used\n"
+#~ " for PATH that is guaranteed to find all of the standard utilities. "
+#~ "If\n"
+#~ " the -V or -v option is given, a string is printed describing "
+#~ "COMMAND.\n"
+#~ " The -V option produces a more verbose description."
+#~ msgstr ""
+#~ "\rcommand [-pVv] KOMUT [ARGümanlar ...]\n"
+#~ " KOMUT komutunu KOMUT isimli kabuk iÅŸlevini yoksayarak "
+#~ "ARGümanlarla\n"
+#~ " çalıştırır. Örneğin, `ls' isimli bir kabuk işlevi varsa ve siz "
+#~ "`ls'\n"
+#~ " komutunu çalıştırmak istiyorsanız \"command ls\" "
+#~ "diyebilirsiniz.\n"
+#~ " -p seçeneği verilmişse, tüm standart uygulamaların bulunmasını "
+#~ "garanti\n"
+#~ " eden PATH için bir öntanımlı değer kullanılır. -V ya da -v "
+#~ "seçeneği\n"
+#~ " verilmişse, KOMUTu açıklayan bir dizge basılır. -V seçeneği "
+#~ "daha\n"
+#~ " ayrıntılı açıklama üretilmesini sağlar. "
+
+#~ msgid "Obsolete. See `declare'."
+#~ msgstr ""
+#~ "\rtypeset [-afFirtx] [-p] Ä°SÄ°M[=DEÄžER] ...\n"
+#~ " Geçersiz (eski). `declare'ye bakın."
+
+#~ msgid ""
+#~ "Create a local variable called NAME, and give it VALUE. LOCAL\n"
+#~ " can only be used within a function; it makes the variable NAME\n"
+#~ " have a visible scope restricted to that function and its children."
+#~ msgstr ""
+#~ "\rlocal [seçenek] İSİM[=DEĞER] ...\n"
+#~ " Ä°SÄ°M isimli bir yerel deÄŸiÅŸken oluÅŸturulup, ona DEÄžER atar.\n"
+#~ " local sadece bir işlev içinde kullanılabilir; İSİM değişkeninin\n"
+#~ " sadece işlev ve çocuklarının etki alanında görünür olmasını sağlar."
+
+#~ msgid ""
+#~ "Output the ARGs. If -n is specified, the trailing newline is suppressed."
+#~ msgstr ""
+#~ "\recho [-neE] [ARG ...]\n"
+#~ " ARGümanlarını çıktılar. -n belirtilmişse, satırsonu bastırılır."
+
+#~ msgid ""
+#~ "Enable and disable builtin shell commands. This allows\n"
+#~ " you to use a disk command which has the same name as a shell\n"
+#~ " builtin without specifying a full pathname. If -n is used, the\n"
+#~ " NAMEs become disabled; otherwise NAMEs are enabled. For example,\n"
+#~ " to use the `test' found in $PATH instead of the shell builtin\n"
+#~ " version, type `enable -n test'. On systems supporting dynamic\n"
+#~ " loading, the -f option may be used to load new builtins from the\n"
+#~ " shared object FILENAME. The -d option will delete a builtin\n"
+#~ " previously loaded with -f. If no non-option names are given, or\n"
+#~ " the -p option is supplied, a list of builtins is printed. The\n"
+#~ " -a option means to print every builtin with an indication of whether\n"
+#~ " or not it is enabled. The -s option restricts the output to the "
+#~ "POSIX.2\n"
+#~ " `special' builtins. The -n option displays a list of all disabled "
+#~ "builtins."
+#~ msgstr ""
+#~ "\renable [-n] [-p] [-f DOSYAÄ°SMÄ°] [-ads] [Ä°SÄ°M ...]\n"
+#~ " Yerleşik kabuk komutlarını etkinleştirir ve kaldırır. Bir "
+#~ "kabuk\n"
+#~ " yerleşiği ile aynı isme sahip bir disk komutunun tam dosya "
+#~ "yolu\n"
+#~ " belirtmeksizin kullanılabilmesini mümkün kılar. -n "
+#~ "seçeneği\n"
+#~ " kullanılmışsa İSİMler kullanımdan kaldırılır; aksi takdirde "
+#~ "Ä°SÄ°Mler\n"
+#~ " etkin kılınır. Örneğin `test' yerleşiği yerine `test' "
+#~ "uygulamasının\n"
+#~ " yerleşik komut olarak kullanılmasını sağlamak için `enable -n "
+#~ "test'\n"
+#~ " yazmalısınız. Dinamik yüklemenin desteklendiği sistemlerde, -"
+#~ "f\n"
+#~ " seçeneği ile yeni bir İSİM yerleşik komutunun DOSYAİSMİ ile "
+#~ "belirtilen\n"
+#~ " paylaşımlı nesneden yüklenmesi sağlanır. -d seçeneği -f ile "
+#~ "yüklenen\n"
+#~ " yerleşiği silmek için kullanılır. Hiç seçenek verilmezse ya da -"
+#~ "p\n"
+#~ " seçeneği verilirse kabuk yerleşiklerinin bir listesi gösterilir. -"
+#~ "a\n"
+#~ " seçeneği ile her yerleşik etkin olup olmadığı belirtilerek "
+#~ "listelenir.\n"
+#~ " -s seçeneği ile sadece POSIX'e özel yerleşikleri içerir. -n "
+#~ "seçeneği\n"
+#~ " bir İSİM belirtilmeksizin kullanılırsa kullanımdan "
+#~ "kaldırılmış\n"
+#~ " yerleÅŸikleri listeler."
+
+#~ msgid ""
+#~ "Read ARGs as input to the shell and execute the resulting command(s)."
+#~ msgstr ""
+#~ "\reval [ARG ...]\n"
+#~ " Kabuğa girilmiş biçimleriyle ARG'ları okur ve sonuçlanan komutları "
+#~ "çalıştır."
+
+#~ msgid ""
+#~ "Exec FILE, replacing this shell with the specified program.\n"
+#~ " If FILE is not specified, the redirections take effect in this\n"
+#~ " shell. If the first argument is `-l', then place a dash in the\n"
+#~ " zeroth arg passed to FILE, as login does. If the `-c' option\n"
+#~ " is supplied, FILE is executed with a null environment. The `-a'\n"
+#~ " option means to make set argv[0] of the executed process to NAME.\n"
+#~ " If the file cannot be executed and the shell is not interactive,\n"
+#~ " then the shell exits, unless the shell option `execfail' is set."
+#~ msgstr ""
+#~ "\rexec [-cl] [-a AD] DOSYA [YÖNLENDİRMELER]]\n"
+#~ " DOSYA'yı yeni bir süreç oluşturmadan kabukla değiştirip çalıştırır.\n"
+#~ " Eğer DOSYA belirtilmemişse, kabukta YÖNLENDİRMELER etkili olur.\n"
+#~ " Eğer ilk argüman -l ise, login'in yaptığı gibi DOSYAya aktarılan\n"
+#~ " sıfırıncı argümana bir tire yerleştirilir. -c seçeneği verilmişse,\n"
+#~ " DOSYA boş bir ortamda çalıştırılır. -a seçeneği verilirse kabuk,\n"
+#~ " DOSYAya ADı 0. argüman (argv[0]) olarak aktarır. Eğer DOSYA\n"
+#~ " çalıştırılamazsa ve kabuk etkileşimli değilse, `execfail' kabuk\n"
+#~ " değişkeni etkin olmadıkça kabuk çıkar."
+
+#~ msgid "Logout of a login shell."
+#~ msgstr ""
+#~ "\rlogout\n"
+#~ " Oturum kabuğundan çıkıp oturumu kapatır."
+
+#~ msgid ""
+#~ "For each NAME, the full pathname of the command is determined and\n"
+#~ " remembered. If the -p option is supplied, PATHNAME is used as the\n"
+#~ " full pathname of NAME, and no path search is performed. The -r\n"
+#~ " option causes the shell to forget all remembered locations. The -d\n"
+#~ " option causes the shell to forget the remembered location of each "
+#~ "NAME.\n"
+#~ " If the -t option is supplied the full pathname to which each NAME\n"
+#~ " corresponds is printed. If multiple NAME arguments are supplied "
+#~ "with\n"
+#~ " -t, the NAME is printed before the hashed full pathname. The -l "
+#~ "option\n"
+#~ " causes output to be displayed in a format that may be reused as "
+#~ "input.\n"
+#~ " If no arguments are given, information about remembered commands is "
+#~ "displayed."
+#~ msgstr ""
+#~ "\rhash [-lr] [-p DOSYAYOLU] [-dt] [AD]\n"
+#~ " AD argümanları olarak belirtilen komutların tam dosya yollarını\n"
+#~ " hatırlar, böylece müteakip çağrılarda aranmalarına gerek kalmaz.\n"
+#~ " Komutlar $PATH içinde listelenmiş dizinler aranarak bulunur. -p\n"
+#~ " seçeneği dosya yolu aramalarını engeller ve ADın konumu olarak\n"
+#~ " DOSYAYOLU kullanılır. -r seçeneği hatırlanan tüm konumları kabuğun\n"
+#~ " unutmasına sebep olur. -d seçeneği her AD için hatırlanan konumun\n"
+#~ " kabuk tarafından unutulmasına sebep olur. -t seçeneği verildiğinde\n"
+#~ " her ADa karşılık gelen dosya konumları basılır. -t seçeneği ile çok\n"
+#~ " sayıda AD verilirse, AD hatırlanan tam dosya yolundan önce basılır.\n"
+#~ " -l seçeneği çıktının girdi olarak tekrar kullanılmasını sağlayacak\n"
+#~ " biçimde basılmasını sağlar. Hiç argüman belirtilmezse ya da sadece\n"
+#~ " -l seçeneği belirtilirse hatırlanan komutlar hakkında bilgi basılır."
+
+#~ msgid ""
+#~ "Display helpful information about builtin commands. If PATTERN is\n"
+#~ " specified, gives detailed help on all commands matching PATTERN,\n"
+#~ " otherwise a list of the builtins is printed. The -s option\n"
+#~ " restricts the output for each builtin command matching PATTERN to\n"
+#~ " a short usage synopsis."
+#~ msgstr ""
+#~ "\rhelp [-s] [KALIP]\n"
+#~ " Yerleşik komutlar hakkında yardım bilgisi gösterir. KALIP "
+#~ "belirtilmiÅŸse,\n"
+#~ " help KALIP ile eşleşen tüm komutlar için yardım bilgisi gösterir, "
+#~ "aksi\n"
+#~ " takdirde yerleşikler listelenir. -s seçeneği ile yardım bilgisi "
+#~ "yerine\n"
+#~ " komutun kullanımını gösteren sözdizimini basar."
+
+#~ msgid ""
+#~ "By default, removes each JOBSPEC argument from the table of active jobs.\n"
+#~ " If the -h option is given, the job is not removed from the table, but "
+#~ "is\n"
+#~ " marked so that SIGHUP is not sent to the job if the shell receives a\n"
+#~ " SIGHUP. The -a option, when JOBSPEC is not supplied, means to remove "
+#~ "all\n"
+#~ " jobs from the job table; the -r option means to remove only running "
+#~ "jobs."
+#~ msgstr ""
+#~ "\rdisown [-h] [-ar] [Ä°Åž_BELÄ°RTÄ°MÄ° ...]\n"
+#~ " Seçeneksiz kullanımda her İŞ_BELİRTİMİ etkin işler tablosundan\n"
+#~ " kaldırılır. -h seçeneği ile iş tablodan kaldırılmaz ama imlenir\n"
+#~ " böylece kabuk bir SIGHUP alırsa bunu işe göndermez. İŞ_BELİRTİMİ\n"
+#~ " verilmeden -a seçeneğinin kullanılması durumunda iş tablosundaki\n"
+#~ " tüm işler kaldırılır. İŞ_BELİRTİMİ verilmeden -r seçeneğinin\n"
+#~ " kullanılması durumunda ise sadece çalışmakta olan işler kaldırılır."
+
+#~ msgid ""
+#~ "Causes a function to exit with the return value specified by N. If N\n"
+#~ " is omitted, the return status is that of the last command."
+#~ msgstr ""
+#~ "\rreturn [N]\n"
+#~ " Bir işlevin N değeri ile dönerek çıkmasına sebep olur. N verilmezse\n"
+#~ " son komutun dönüş durumu döner."
+
+#~ msgid ""
+#~ "For each NAME, remove the corresponding variable or function. Given\n"
+#~ " the `-v', unset will only act on variables. Given the `-f' flag,\n"
+#~ " unset will only act on functions. With neither flag, unset first\n"
+#~ " tries to unset a variable, and if that fails, then tries to unset a\n"
+#~ " function. Some variables cannot be unset; also see readonly."
+#~ msgstr ""
+#~ "\runset [-f] [-v] [AD ...]\n"
+#~ " ADı belirtilen her işlev ya da değişken kaldırılır. -v verilmişse,\n"
+#~ " işlem sadece kabuk değişkenlerine uygulanır. -f verilmişse, işlem\n"
+#~ " sadece kabuk işlevlerine uygulanır ve işlev tanımı kaldırılır.\n"
+#~ " Hiçbir seçenek verilmemişse, unset önce bir değişkeni kaldırmayı\n"
+#~ " dener, başarısız olursa bir işlevi kaldırmayı dener. Salt-okunur\n"
+#~ " değişkenler ve işlevler kaldırılamaz."
+
+#~ msgid ""
+#~ "NAMEs are marked for automatic export to the environment of\n"
+#~ " subsequently executed commands. If the -f option is given,\n"
+#~ " the NAMEs refer to functions. If no NAMEs are given, or if `-p'\n"
+#~ " is given, a list of all names that are exported in this shell is\n"
+#~ " printed. An argument of `-n' says to remove the export property\n"
+#~ " from subsequent NAMEs. An argument of `--' disables further option\n"
+#~ " processing."
+#~ msgstr ""
+#~ "\rexport [-nf] [Ä°SÄ°M[=DEÄžER] ...]\n"
+#~ "export -p\n"
+#~ " Ortamdaki çocuk sürece aktarılacak her İSİM'i imler. -f "
+#~ "verilmiÅŸse\n"
+#~ " Ä°SÄ°M'ler kabuk iÅŸlevleridir, aksi takdirde kabuk "
+#~ "deÄŸiÅŸkenleridir.\n"
+#~ " -n seçeneği verilirse aktarılacak İSİM'ler artık imlenmez. "
+#~ "Ä°SÄ°M\n"
+#~ " verilmemişse veya -p seçeneği verilmişse aktarılan İSİM'lerin "
+#~ "listesi\n"
+#~ " gösterilir. -p seçeneği çıktının girdi olarak tekrar "
+#~ "kullanılabilir\n"
+#~ " biçimde gösterilmesini sağlar. Bir değişken isminden sonra "
+#~ "=DEÄžER\n"
+#~ " geliyorsa değer değişkenin değeri yapılır. `--' ile seçenek "
+#~ "iÅŸlemleri\n"
+#~ " kapatılır."
+
+#~ msgid ""
+#~ "The given NAMEs are marked readonly and the values of these NAMEs may\n"
+#~ " not be changed by subsequent assignment. If the -f option is given,\n"
+#~ " then functions corresponding to the NAMEs are so marked. If no\n"
+#~ " arguments are given, or if `-p' is given, a list of all readonly "
+#~ "names\n"
+#~ " is printed. The `-a' option means to treat each NAME as\n"
+#~ " an array variable. An argument of `--' disables further option\n"
+#~ " processing."
+#~ msgstr ""
+#~ "\rreadonly [-af] [Ä°SÄ°M[=DEÄžER] ...]\n"
+#~ "readonly -p\n"
+#~ " Her Ä°SÄ°M'i salt-okunur olarak imler. Bu Ä°SÄ°M'lerin deÄŸerleri\n"
+#~ " müteakip çağrılarda değiştirilemez. -f seçeneği verilirse, her\n"
+#~ " İSİM bir kabuk işlevi olarak imlenir. -a seçeneği verilirse, her\n"
+#~ " isim bir dizi değişkeni olarak ele alınır. Hiç argüman verilmezse\n"
+#~ " veya -p seçeneği verilirse salt-okunur isimlerin hepsi basılır. Bir\n"
+#~ " deÄŸiÅŸken isminden sonra bir =DEÄžER geliyorsa DEÄžER deÄŸiÅŸkenin deÄŸeri\n"
+#~ " yapılır. `--' ile seçenek işlemleri kapatılır."
+
+#~ msgid ""
+#~ "The positional parameters from $N+1 ... are renamed to $1 ... If N is\n"
+#~ " not given, it is assumed to be 1."
+#~ msgstr ""
+#~ "\rshift [N]\n"
+#~ " $N+1 ... konumsal parametreleri $1 ... olarak ele alınır.\n"
+#~ " N verilmezse 1 kabul edilir."
+
+#~ msgid ""
+#~ "Suspend the execution of this shell until it receives a SIGCONT\n"
+#~ " signal. The `-f' if specified says not to complain about this\n"
+#~ " being a login shell if it is; just suspend anyway."
+#~ msgstr ""
+#~ "\rsuspend [-f]\n"
+#~ " Bu kabuğun çalışmasını bir SIGCONT sinyali alana kadar askıya alır.\n"
+#~ " -f seçeneği kullanıldığında kabuk bir giriş kabuğu olsa bile askıya "
+#~ "alınır."
+
+#~ msgid ""
+#~ "Print the accumulated user and system times for processes run from\n"
+#~ " the shell."
+#~ msgstr ""
+#~ "\rtimes\n"
+#~ " Kabukta çalışan süreçlerden toplanan kullanıcı ve sistem zamanlarını "
+#~ "basar."
+
+#~ msgid ""
+#~ "For each NAME, indicate how it would be interpreted if used as a\n"
+#~ " command name.\n"
+#~ " \n"
+#~ " If the -t option is used, `type' outputs a single word which is one "
+#~ "of\n"
+#~ " `alias', `keyword', `function', `builtin', `file' or `', if NAME is "
+#~ "an\n"
+#~ " alias, shell reserved word, shell function, shell builtin, disk "
+#~ "file,\n"
+#~ " or unfound, respectively.\n"
+#~ " \n"
+#~ " If the -p flag is used, `type' either returns the name of the disk\n"
+#~ " file that would be executed, or nothing if `type -t NAME' would not\n"
+#~ " return `file'.\n"
+#~ " \n"
+#~ " If the -a flag is used, `type' displays all of the places that "
+#~ "contain\n"
+#~ " an executable named `file'. This includes aliases, builtins, and\n"
+#~ " functions, if and only if the -p flag is not also used.\n"
+#~ " \n"
+#~ " The -f flag suppresses shell function lookup.\n"
+#~ " \n"
+#~ " The -P flag forces a PATH search for each NAME, even if it is an "
+#~ "alias,\n"
+#~ " builtin, or function, and returns the name of the disk file that "
+#~ "would\n"
+#~ " be executed."
+#~ msgstr ""
+#~ "\rtype [-afptP] AD [AD ...]\n"
+#~ " Her ADın bir komut ismi olarak kullanılırsa nasıl yorumlanması\n"
+#~ " gerektiÄŸini belirtir.\n"
+#~ "\n"
+#~ " -t seçeneği verildiğinde, AD bir takma ad ise `alias', bir işlev ise\n"
+#~ " `function', bir yerleşik komut ise `builtin', bir disk dosyası ise \n"
+#~ " `file' veya bir anahtar sözcük ise `keyword' sözcüğünü basar.\n"
+#~ "\n"
+#~ " -p seçeneği verildiğinde, AD, `type -t AD' çıktısı file sonucunu\n"
+#~ " vermiyorsa hiçbir şey dönmez, aksi takdirde çalıştırılacak disk\n"
+#~ " dosyasının ismi basılır.\n"
+#~ "\n"
+#~ " -a seçeneği verildiğinde, isim çalıştırılabilir dosyasının\n"
+#~ " bulunabileceği yerleri basar. Bu, sadece ve sadece -p seçeneği\n"
+#~ " kullanılmamışsa takma adları, yerleşik komutları ve işlevleri\n"
+#~ " de içerir.\n"
+#~ "\n"
+#~ " -f seçeneği belirtilmişse type kabuk işlevlerini bulmaya çalışmaz.\n"
+#~ "\n"
+#~ " -P seçeneği her ADiçin, bir takma ad, yerleşik komut veya işlev "
+#~ "olmasa\n"
+#~ " bile bir yol araması yapılmasını için zorlar ve çalıştırılabilir "
+#~ "disk\n"
+#~ " dosyası ismi ile döner."
+
+#~ msgid ""
+#~ "The user file-creation mask is set to MODE. If MODE is omitted, or if\n"
+#~ " `-S' is supplied, the current value of the mask is printed. The `-"
+#~ "S'\n"
+#~ " option makes the output symbolic; otherwise an octal number is "
+#~ "output.\n"
+#~ " If `-p' is supplied, and MODE is omitted, the output is in a form\n"
+#~ " that may be used as input. If MODE begins with a digit, it is\n"
+#~ " interpreted as an octal number, otherwise it is a symbolic mode "
+#~ "string\n"
+#~ " like that accepted by chmod(1)."
+#~ msgstr ""
+#~ "\rumask [-p] [-S] [KÄ°P]\n"
+#~ " Kabuk sürecinin dosya oluşturma maskesini KİP olarak ayarlar.\n"
+#~ " -S seçeneği bir KİP olmaksızın verilirse, maske sembolik kipte\n"
+#~ " gösterilir. -S seçeneği çıktının sembolik olmasını sağlar, yoksa\n"
+#~ " sekizlik değer basılır. -p seçeneği bir KİP olmaksızın verilirse,\n"
+#~ " maske, kabuğa girdi olarak verilebilecek biçemde gösterilir. KİP\n"
+#~ " bir rakam ile başlıyorsa sekizlik bir sayı olarak yorumlanır;\n"
+#~ " rakamla başlamıyorsa, chmod(1) komutundaki gibi bir sembolik kip\n"
+#~ " maskesi olarak yorumlanır. Eğer KİP verilmezse, maskenin mevcut\n"
+#~ " değeri gösterilir."
+
+#~ msgid ""
+#~ "Wait for the specified process and report its termination status. If\n"
+#~ " N is not given, all currently active child processes are waited for,\n"
+#~ " and the return code is zero. N is a process ID; if it is not given,\n"
+#~ " all child processes of the shell are waited for."
+#~ msgstr ""
+#~ "\rwait [N]\n"
+#~ " Belirtilen süreci bekler ve sonlandırma durumunu raporlar. N\n"
+#~ " verilmezse, o an etkin olan tüm süreçler için beklenir ve sıfır\n"
+#~ " durumu ile dönülür. N bir süreç kimliğidir; verilmezse kabuğun\n"
+#~ " tüm alt süreçleri için beklenir."
+
+#~ msgid ""
+#~ "Create a simple command invoked by NAME which runs COMMANDS.\n"
+#~ " Arguments on the command line along with NAME are passed to the\n"
+#~ " function as $0 .. $n."
+#~ msgstr ""
+#~ "\rfunction AD { KOMUTlar ; }\n"
+#~ "\tveya\n"
+#~ "AD () { KOMUTlar ; }\n"
+#~ " ADıyla çağrılarak KOMUTları çalıştıran basit bir komut oluşturur.\n"
+#~ " AD ile birlikte verilen komut satırı argümanları işleve $0 .. $N\n"
+#~ " olarak aktarılır."
+
+#~ msgid ""
+#~ "Toggle the values of variables controlling optional behavior.\n"
+#~ " The -s flag means to enable (set) each OPTNAME; the -u flag\n"
+#~ " unsets each OPTNAME. The -q flag suppresses output; the exit\n"
+#~ " status indicates whether each OPTNAME is set or unset. The -o\n"
+#~ " option restricts the OPTNAMEs to those defined for use with\n"
+#~ " `set -o'. With no options, or with the -p option, a list of all\n"
+#~ " settable options is displayed, with an indication of whether or\n"
+#~ " not each is set."
+#~ msgstr ""
+#~ "\rshopt [-pqsu] [-o UZUN-SEÇENEK] SÇNKADI [SÇNKADI...]\n"
+#~ " İsteğe bağlı kabuk davranışlarını kontrol eden değişken değerlerini "
+#~ "açıp\n"
+#~ " kapar. -s ile belirtilen her SÇNKADInı etkinleştirir. -u ile "
+#~ "belirtilen\n"
+#~ " her SÇNKADInı iptal eder. -q ile normal çıktıyı engeller; dönüş "
+#~ "durumu\n"
+#~ " SÇNKADInın etkin olup olmadığını gösterir. -o ile set yerleşiğinin "
+#~ "-o\n"
+#~ " seçeneğinde kullanılabilecek SÇNKADI değerlerini sınırlar. Seçeneksiz "
+#~ "ya\n"
+#~ " da -p seçeneği ile tüm atanabilir seçenekleri etkin olup "
+#~ "olmadıklarını\n"
+#~ " belirterek listeler."
+
+#~ msgid ""
+#~ "For each NAME, specify how arguments are to be completed.\n"
+#~ " If the -p option is supplied, or if no options are supplied, "
+#~ "existing\n"
+#~ " completion specifications are printed in a way that allows them to "
+#~ "be\n"
+#~ " reused as input. The -r option removes a completion specification "
+#~ "for\n"
+#~ " each NAME, or, if no NAMEs are supplied, all completion "
+#~ "specifications."
+#~ msgstr ""
+#~ "\rcomplete [-abcdefgjksuv] [-pr] [-o SEÇENEK] [-A EYLEM] [-G KALIP]\n"
+#~ " [-W SÖZLİST] [-P ÖNEK] [-S SONEK] [-X SÜZGEÇ] [-F İŞLEV]\n"
+#~ " [-C KOMUT] [AD ...]\n"
+#~ " Her AD için argümanların nasıl tamamlanmaları gerektiği belirtilir.\n"
+#~ " -p seçeneği verilirse veya hiç seçenek verilmezse, mevcut tamamlama\n"
+#~ " belirtimleri girdi olarak yeniden kullanılabilir şekilde basılır.\n"
+#~ " -r seçeneği her AD için tamamlama belirtimini kaldırır,\n"
+#~ " hiç AD belirtilmezse tümü kaldırılır."
diff --git a/po/vi.gmo b/po/vi.gmo
new file mode 100644
index 0000000..eb02d00
--- /dev/null
+++ b/po/vi.gmo
Binary files differ
diff --git a/po/vi.po b/po/vi.po
new file mode 100644
index 0000000..beb59d8
--- /dev/null
+++ b/po/vi.po
@@ -0,0 +1,5499 @@
+# Vietnamese translation for BASH (Bourne Again SHell).
+# Copyright © 2009 Free Software Foundation, Inc.
+# This file is distributed under the same license as the bash package.
+# Clytie Siddall <clytie@riverland.net.au>, 2008-2009.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bash 4.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2009-09-19 21:17+0930\n"
+"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
+"Language-Team: Vietnamese <vi-VN@googlegroups.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: LocFactoryEditor 1.8\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr "sai mảng in thấp"
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr "%s: không thể chuyển đổi mảng theo số mũ sang mảng kết hợp"
+
+#: arrayfunc.c:480
+#, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s: khoá màng kết hợp không hợp lệ"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr "%s: không thể cấp phát cho chỉ số không thuộc số"
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr "%s: %s: phải sử dụng chữ thấp khi gán mảng kết hợp"
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr "%s: không thể tạo %s"
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr "bash_execute_unix_command: không tìm thấy sơ đồ phím cho câu lệnh"
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr ""
+"%s: ký tự khác khoảng trắng đầu tiên không phải là dấu sổ chéo ngược « / »"
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr "thiếu « %c » đóng trong %s"
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr "%s: thiếu dấu hai chấm định giới"
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "« %s »: tên sơ đồ phím không hợp lệ"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr "chưa bật sửa đổi dòng"
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr "« %s »: tên sơ đồ phím không hợp lệ"
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s: không thể Ä‘á»c %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr "« %s »: không thể hủy tổ hợp"
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "« %s »: tên hàm không rõ"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr "%s không được tổ hợp với phím.\n"
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr "%s có thể được gá»i thông qua "
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr "đếm vòng"
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr ""
+"chỉ có nghĩa trong vòng lặp:\n"
+" • for\ttrong\n"
+" • while\ttrong khi\n"
+" • until\tđến khi"
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+"Trả lại ngữ cảnh của lá»i gá»i thÆ°á»ng trình con hiện thá»i.\n"
+"\n"
+" Không có BTHỰC thì trà lại "
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "ChÆ°a đặt biến môi trÆ°á»ng HOME (nhà)"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "ChÆ°a đặt biến môi trÆ°á»ng OLDPWD (mật khẩu cÅ©)"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr "dòng %d:"
+
+#: builtins/common.c:139 error.c:261
+#, c-format
+msgid "warning: "
+msgstr "cảnh báo :"
+
+#: builtins/common.c:153
+#, c-format
+msgid "%s: usage: "
+msgstr "%s: sử dụng:"
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "quá nhiá»u đối số"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s: tùy chá»n cần thiết má»™t đối số"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s: cần thiết đối số thuộc số"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s: không tìm thấy"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s: tùy chá»n không hợp lệ"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s: tên tùy chá»n không hợp lệ"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "« %s »: không phải đồ nhận diện hợp lệ"
+
+#: builtins/common.c:238
+msgid "invalid octal number"
+msgstr "số bát phân không hợp lệ"
+
+#: builtins/common.c:240
+msgid "invalid hex number"
+msgstr "số thập lục không hợp lệ"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr "số không hợp lệ"
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s: sai xác định tín hiệu"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "« %s »: không phải đặc tả hợp lệ cho PID hoặc công việc"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s: biến chỉ Ä‘á»c"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s: %s ở ngoại phạm vi"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "đối số"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s ở ngoại phạm vi"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s: không có công việc như vậy"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s: không có Ä‘iá»u khiển công việc"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "không có Ä‘iá»u khiển công việc"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s: bị hạn chế"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "bị hạn chế"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s: không phải dựng sẵn trình bao"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "lá»—i ghi: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr "gặp lỗi khi đặt các thuộc tính vỠthiết bị cuối: %s"
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr "gặp lỗi khi lấy các thuộc tính vỠthiết bị cuối: %s"
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s: gặp lá»—i khi lấy thÆ° mục hiện thá»i: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s: đặc tả công việc mơ hồ"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s: tên hành vi không hợp lệ"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s: không có đặc tả Ä‘iá»n nốt"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "cảnh báo: tùy chá»n « -F » có lẽ không hoạt Ä‘á»™ng nhÆ° mong đợi"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "cảnh báo: tùy chá»n « -C » có lẽ không hoạt Ä‘á»™ng nhÆ° mong đợi"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr "hiện thá»i không thá»±c thi chức năng Ä‘iá»n nốt"
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "chỉ có thể được dùng trong một hàm"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr "không thể dùng « -f » để tạo hàm"
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s: hàm chỉ Ä‘á»c"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr "%s: không thể phá hủy biến mảng bằng cách này"
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr "%s: không thể chuyển đổi mảng kết hợp sang mảng theo số mũ"
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr "không có sẵn chức năng nạp động"
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr "không thể mở đối tượng dùng chung %s: %s"
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr "không tìm thấy %s trong đối tượng dùng chung %s: %s"
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr "%s không phải được nạp động"
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr "%s: không thể xoá: %s"
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr "%s: là thư mục"
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr "%s: không phải là tập tin chuẩn"
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr "%s: tập tin quá lớn"
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr "%s: không thể thực hiện tập tin nhị phân"
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr "%s: không thể thực hiện: %s"
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr "đăng xuất\n"
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr "không phải trình bao đăng nhập: hãy dùng lệnh « exit » (thoát)"
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr "Vẫn có công việc bị dừng.\n"
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr "Vẫn có công việc đang chạy.\n"
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr "không tìm thấy lệnh"
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr "đặc tả lịch sử"
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr "%s: không thể mở tập tin tạm thá»i: %s"
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr "hiện thá»i"
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr "công việc %d đã khởi chạy mà không có Ä‘iá»u khiển công việc"
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: tùy chá»n không được phép -- %c\n"
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: tùy chá»n cần thiết đối số -- %c\n"
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr "chức năng tạo ký hiệu lộn xộn bị tắt"
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr "%s: bảng ký hiệu lộn xộn còn rỗng\n"
+
+#: builtins/hash.def:244
+#, c-format
+msgid "hits\tcommand\n"
+msgstr "gá»i nhá»›\tlệnh\n"
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] "Câu lệnh trình bao tương ứng với từ khoá `"
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+"không có chủ đỠtrợ giúp tương ứng với « %s ». Hãy thử câu lệnh:\n"
+" • help help\n"
+" • man -k %s\n"
+" • info %s"
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr "%s: không thể mở : %s"
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+"Những câu lệnh trình bao này được xác định nội bộ. Hãy gõ :\n"
+" • help\t\tđể xem danh sách này.\n"
+" • info bash\tđể tìm thêm thông tin chung vỠtrình bao.\n"
+" • man -k\t} • info\t\t} để tìm thêm thông tin vỠlệnh không có trong danh "
+"sách này.\n"
+"\n"
+"Dấu sao « * » bên cạnh tên thì ngụ ý nó bị tắt.\n"
+"\n"
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr "chỉ có thể dùng má»™t của những tùy chá»n « -a », « -n », « -r », « -w »"
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr "vị trí lịch sử"
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr "%s: lỗi mở rộng lịch sử"
+
+#: builtins/inlib.def:71
+#, c-format
+msgid "%s: inlib failed"
+msgstr "%s: inlib bị lỗi"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr "không cho phép dùng tùy chá»n thêm vá»›i « -x »"
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr "%s: đối số phải là mã số của tiến trình (PID) hoặc công việc"
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr "Lỗi không rõ"
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr "đợi biểu thức"
+
+#: builtins/mapfile.def:165
+#, fuzzy, c-format
+msgid "%s: not an indexed array"
+msgstr "%s: không phải biến mảng"
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr "%s: sai xác định bộ mô tả tập tin"
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr "%d: bộ mô tả tập tin không hợp lệ: %s"
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, c-format
+msgid "%s: invalid line count"
+msgstr "%s: sai đếm dòng"
+
+#: builtins/mapfile.def:277
+#, c-format
+msgid "%s: invalid array origin"
+msgstr "%s: gốc mảng không hợp lệ"
+
+#: builtins/mapfile.def:294
+#, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s: lượng gá»i ngược không hợp lệ"
+
+#: builtins/mapfile.def:326
+msgid "empty array variable name"
+msgstr "%s: tên biến mảng vẫn trống"
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr "cần thiết hỗ trợ biến mảng"
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr "« %s »: thiếu ký tự định dạng"
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr "« %c »: ký tự định dạng không hợp lệ"
+
+#: builtins/printf.def:578
+#, c-format
+msgid "warning: %s: %s"
+msgstr "cảnh báo : %s: %s"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr "thiếu chữ số thập phân cho \\x"
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr "không có thư mục khác"
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr "<không có thÆ° mục hiện thá»i>"
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr "đống thư mục vẫn trống"
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr "chỉ mục đống thư mục"
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+"Hiển thị danh sách các thÆ° mục được nhá»› hiện thá»i.\n"
+"\tLệnh « pushd » thêm thư mục vào danh sách này;\n"
+"« popd » nâng thư mục lên danh sách.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-c\tgá»™t đống thÆ° mục bằng cách xoá má»i phần tá»­\n"
+"\t\t-l\tđừng in ra phiên bản thư mục có dấu ngã nằm trước\n"
+"\t\t\tmà tÆ°Æ¡ng ứng vá»›i thÆ° mục chính của ngÆ°á»i dùng\n"
+"\t\t-p\tin ra đống thư mục mỗi dòng một mục\n"
+"\t\t-v\tin ra đống thư mục mỗi dòng một mục\n"
+"\t\t\tcó vị trí đống nằm trước\n"
+"\n"
+"\tÄối số :\n"
+"\t\t+N\thiển thị mục thứ N đếm từ bên trái danh sách\n"
+"\t\t\thiển thị theo thÆ° mục khi không Ä‘Æ°a ra tùy chá»n,\n"
+"\t\t\tbắt đầu từ số không.\n"
+"\n"
+"\t\t-N\thiển thị mục thứ N đếm từ bên phải danh sách\n"
+"\t\t\thiển thị theo thÆ° mục khi không Ä‘Æ°a ra tùy chá»n,\n"
+"\t\t\tbắt đầu từ số không."
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Thêm một thư mục vào đầu của đống thư mục, hoặc xoay đống,\n"
+"\tlàm cho thÆ° mục má»›i đầu đống là thÆ° mục làm việc hiện thá»i.\n"
+"\tKhông có đối số thì trao đổi hai thư mục đầu.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-n\tthu hồi chức năng chuyển đổi thÆ° mục bình thÆ°á»ng\n"
+"\tkhi thêm thư mục vào đống, thì chỉ thao tác đống chính nó.\n"
+"\n"
+"\tÄối số :\n"
+"\t\t+N\txoay đống để mà thư mục thứ N\n"
+"\t\t\t(đếm từ bên trái danh sách hiển thị theo thư mục,\n"
+"\t\t\tbắt đầu từ số không) nằm ở đầu.\n"
+"\n"
+"\t\t-N\txoay đống để mà thư mục thứ N\n"
+"\t\t\t(đếm từ bên phải danh sách hiển thị theo thư mục,\n"
+"\t\t\tbắt đầu từ số không) nằm ở đầu.\n"
+"\n"
+"\t\tdir\tthêm DIR vào đầu đống thư mục,\n"
+"\t\tthì làm cho nó thÆ° mục làm việc hiện thá»i.\n"
+"\n"
+"\tDựng sẵn « dirs » hiển thị đống thư mục."
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+"Gỡ bá» thÆ° mục khá»i đống thÆ° mục.\n"
+"Không Ä‘Æ°a ra đối số thì gỡ bá» thÆ° mục đầu khá»i đống,\n"
+"\tvà chuyển đổi sang thư mục đầu mới.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-n\tthu hồi chức năng chuyển đổi thÆ° mục bình thÆ°á»ng\n"
+"\t\tkhi gỡ bá» thÆ° mục khá»i đống, thì chỉ thao tác đống chính nó.\n"
+"\n"
+"\tÄối số :\n"
+"\t\t+N\tgỡ bỠmục thứ N đếm từ bên trái danh sách\n"
+"\t\t\thiển thị bằng « dirs », bắt đầu từ số không.\n"
+"\tVí dụ : « popd +0 » sẽ gỡ bỠthư mục đầu tiên,\n"
+"\t\t« popd +1 » gỡ bỠthư mục thứ hai, v.v.\n"
+"\n"
+"\t\t-N\tgỡ bỠmục thứ N đếm từ bên phải danh sách\n"
+"\t\t\thiển thị bằng « dirs », bắt đầu từ số không.\n"
+"\tVí dụ : « popd -0 » sẽ gỡ bỠthư mục cuối cùng,\n"
+"\t\t« popd -1 » gỡ bỠthư mục giáp cuối, v.v.\n"
+"\n"
+"\tDựng sẵn « dirs » sẽ hiển thị đống thư mục."
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr "%s: sai xác định quá hạn"
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr "lá»—i Ä‘á»c: %d: %s"
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+"chỉ có thể « return » (trở vá») từ má»™t hàm hoặc văn lệnh được gá»i từ nguồn"
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr "không thể hủy đặt đồng thá»i má»™t hàm VÀ má»™t biến"
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr "%s: không thể hủy đặt"
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr "%s: không thể hủy đặt: %s chỉ Ä‘á»c"
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr "%s: không phải biến mảng"
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr "%s: không phải hàm"
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr "đếm dá»i"
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr "không thể đồng thá»i đặt và hủy đặt các tùy chá»n trình bao"
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr "%s: tên tùy chá»n trình bao không hợp lệ"
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr "cần thiết đối số tên tập tin"
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr "%s: không tìm thấy tập tin"
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr "không thể ngưng"
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr "không thể ngưng trình bao đăng nhập"
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr "%s có bí danh tới « %s »\n"
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr "%s là từ khoá trình bao\n"
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr "%s là hàm\n"
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr "%s là dựng sẵn trình bao\n"
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr "%s là %s\n"
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr "%s có ký hiệu lộn xộn (%s)\n"
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr "%s: đối số giới hạn không hợp lệ"
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "« %c »: câu lệnh sai"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s: không thể lấy giới hạn: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr "giới hạn"
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s: không thể sửa đổi giới hạn: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "số bát phân"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr "« %c »: toán từ chế độ tượng trưng không hợp lệ"
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr "« %c »: ký tự chế độ tượng trưng không hợp lệ"
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr "dòng"
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "câu lệnh cuối cùng: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr "Hủy bá»..."
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "lỗi lệnh không rõ"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "kiểu lệnh sai"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "bộ kết nối sai"
+
+#: error.c:409
+msgid "bad jump"
+msgstr "sai nhảy"
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr "%s: biến chưa tổ hợp"
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr "\tquá hạn trong khi đợi dữ liệu nhập nên tự động đăng xuất\n"
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr "không thể chuyển hướng đầu vào tiêu chuẩn từ « /dev/null »: %s"
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr "ÄỊNH DẠNG THỜI GIAN: « %c »: ký tá»± định dạng không hợp lệ"
+
+#: execute_cmd.c:2075
+msgid "pipe error"
+msgstr "lỗi ống dẫn"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr "%s: bị hạn chế: không thể ghi rõ dấu sổ chéo « / » trong tên câu lệnh"
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s: không tìm thấy lệnh"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr "%s: %s: bộ thông dịch sai"
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr "không thể nhân đôi fd %d tới fd %d"
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr "vượt quá giới hạn mức độ đệ quy của biểu thức"
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr "trán ngược đống đệ quy"
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "lỗi cú pháp trong biểu thức"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr "thử gán cho đồ không phải biến"
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr "chia cho không"
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr "lỗi (bug): hiệu bài ấn định biểu thức sai"
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr "đợi dấu hai chấm « : » cho biểu thức Ä‘iá»u kiện"
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr "số mũ nhỠhơn 0"
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr "đợi đồ nhận diện đằng sau tăng/giảm dần sẵn"
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr "thiếu dấu ngoặc đóng « ) »"
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr "lỗi cú pháp: đợi toán hạng"
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr "lá»—i cú pháp: toán tá»­ số há»c không hợp lệ"
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr "%s%s%s: %s (hiệu bài lỗi là « %s »)"
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr "cÆ¡ số (số há»c) không hợp lệ"
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr "cơ số có giá trị quá lớn"
+
+#: expr.c:1329
+#, c-format
+msgid "%s: expression error\n"
+msgstr "%s: lỗi biểu thức\n"
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr "getcwd: không thể truy cập thư mục cấp trên"
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr "không thể đặt lại chế độ nodelay (không hoãn) cho fd %d"
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr "không thể cấp phát bộ mô tả tập tin mớ cho dữ liệu nhập bash từ fd %d"
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr "save_bash_input: đã có bộ đệm cho fd mới %d"
+
+# Nghĩa chữ ?
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr "start_pipeline: pgrp pipe"
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr "tiến trình con đã tạo (PID %d) xuất hiện trong công việc đang chạy %d"
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr "đang xoá công việc bị dừng chạy %d với nhóm tiến trình %ld"
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr "add_process: tiến trình %5ld (%s) trong the_pipeline"
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr "add_process: pid %5ld (%s) được đánh dấu vẫn hoạt động"
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr "describe_pid: %ld: không có PID (mã số tiến trình) như vậy"
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr "Tín hiệu %d"
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr "Hoàn tất"
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr "Bị dừng"
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr "Bị dừng(%s)"
+
+#: jobs.c:1443
+msgid "Running"
+msgstr "Äang chạy"
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr "Hoàn tất(%d)"
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr "Thoát %d"
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr "Không rõ trạng thái"
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr "(lõi bị đổ)"
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr " (wd: %s)"
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr "setpgid tiến trình con (%ld thành %ld)"
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr "wait: pid %ld không phải là tiến trình con của trình bao này"
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr "wait_for: Không có mục ghi vỠtiến trình %ld"
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr "wait_for_job: công việc %d bị dừng chạy"
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr "%s: công việc bị chấm dứt"
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr "%s: công việc %d đã chạy trong ná»n"
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, c-format
+msgid "%s: line %d: "
+msgstr "%s: dòng %d:"
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr " (lõi bị đổ)"
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr "(wd bây giá»: %s)\n"
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr "initialize_job_control: getpgrp bị lỗi"
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr "initialize_job_control: kỷ luật dòng"
+
+# Nghĩa chữ : dừng dịch
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr "initialize_job_control: setpgid"
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr "không thể đặt nhóm tiến trình cuối cùng (%d)"
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr "không có Ä‘iá»u khiển công việc trong trình bao này"
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr "malloc (cấp phát bộ nhớ): lỗi khẳng định: %s\n"
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+"\r\n"
+"malloc (cấp phát bá»™ nhá»›): %s:%d: khẳng định bị há»ng\r\n"
+
+#: lib/malloc/malloc.c:313
+msgid "unknown"
+msgstr "không rõ"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr ""
+"malloc (cấp phát bộ nhớ): khối bộ nhớ dành riêng trên danh sách các khối còn "
+"rảnh bị ghi vào"
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr "free: đã được gá»i vá»›i đối số khối đã giải phá»ng"
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr "free: đã được gá»i vá»›i đối số khối chÆ°a cấp phát"
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr "free: phát hiện sự tràn ngược; mh_nbytes ở ngoại phạm vi"
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr "free: kích cỡ đoạn đầu và cuối không trùng"
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr "realloc: đã được gá»i vá»›i đối số khối chÆ°a cấp phát"
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr "realloc: phát hiện sự tràn ngược; mh_nbytes ở ngoại phạm vi"
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr "realloc: kích cỡ đoạn đầu và cuối không trùng"
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr "register_alloc: bảng cấp phát đầy với FIND_ALLOC?\n"
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr "register_alloc: %p đã có trong bảng như được cấp phát ?\n"
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr "register_free: %p đã có trong bảng như còn rảnh ?\n"
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr "cơ số không hợp lệ"
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s: không rõ máy"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s: dịch vụ không hợp lệ"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s: đặc tả Ä‘Æ°á»ng dẫn mạng sai"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "không hỗ trợ thao tác mạng"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr "xrealloc: %s:%d: không thể cấp phát %lu byte"
+
+#: locale.c:249
+#, fuzzy, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr "xrealloc: %s:%d: không thể cấp phát %lu byte"
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "Bạn có thư trong $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "Bạn có thư mới trong $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "ThÆ° tín trong %s đã được Ä‘á»c\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "lá»—i cú pháp: cần thiết biểu thức số há»c"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "lá»—i cú pháp: dấu chấm phẩy « ; » bất thÆ°á»ng"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "lỗi cú pháp: `((%s))'"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document: kiểu chỉ dẫn sai %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+"tài liệu này ở dòng %d định giới bằng kết thúc tập tin (mong đợi « %s »)"
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr "make_redirection: chỉ dẫn chuyển hướng « %d » ở ngoại phạm vi"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr "gặp kết thúc tập tin bất thÆ°á»ng trong khi tìm « %c » tÆ°Æ¡ng ứng"
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr "gặp kết thúc tập tin bất thÆ°á»ng trong khi tìm « ]] »"
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr "gặp lá»—i cú pháp trong biểu thức Ä‘iá»u kiện: hiệu bài bất thÆ°á»ng « %s »"
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "gặp lá»—i cú pháp trong biểu thức Ä‘iá»u kiện"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr "gặp hiệu bài bất thÆ°á»ng « %s », còn mong đợi dấu ngoặc đóng « ) »"
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "đợi dấu đóng ngoặc « ) »"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr "đối số bất thÆ°á»ng « %s » tá»›i toán tá»­ nguyên phân Ä‘iá»u kiện"
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr "đối số bất thÆ°á»ng tá»›i toán tá»­ nguyên phân Ä‘iá»u kiện"
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr "hiệu bài bất thÆ°á»ng « %s » còn đợi toán tá»­ nhị phân Ä‘iá»u kiện"
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr "đợi toán tá»­ nhị phân Ä‘iá»u kiện"
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr "đối số bất thÆ°á»ng « %s » tá»›i toán tá»­ nhị phân Ä‘iá»u kiện"
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr "đối số bất thÆ°á»ng tá»›i toán tá»­ nhị phân Ä‘iá»u kiện"
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr "gặp hiệu bài bất thÆ°á»ng « %c » trong câu lệnh Ä‘iá»u kiện"
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr "gặp hiệu bài bất thÆ°á»ng « %s » trong câu lệnh Ä‘iá»u kiện"
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr "gặp hiệu bài bất thÆ°á»ng « %d » trong câu lệnh Ä‘iá»u kiện"
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr "gặp lá»—i cú pháp ở gần hiệu bài bất thÆ°á»ng « %s »"
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr "gặp lỗi cú pháp gần « %s »"
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr "lá»—i cú pháp: kết thúc tập tin bất thÆ°á»ng"
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "lỗi cú pháp"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr "Dùng « %s » để rá»i trình bao.\n"
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr ""
+"gặp kết thúc tập tin bất thÆ°á»ng trong khi tìm dấu ngoặc đóng « ) » tÆ°Æ¡ng ứng"
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr "completion: không tìm thấy hàm « %s »"
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr "progcomp_insert: %s: NULL COMPSPEC"
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr "print_command: bộ kết nối sai « %d »"
+
+#: print_cmd.c:363
+#, fuzzy, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr "%d: bộ mô tả tập tin không hợp lệ: %s"
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr "cprintf: « %c »: ký tự định dạng không hợp lệ"
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr "bộ mô tả tập tin ở ngoại phạm vi"
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr "%s: lá»i chuyển hÆ°á»›ng mÆ¡ hồ"
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr "%s: không thể ghi đè lên tập tin đã có"
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr "%s: bị hạn chế: không thể chuyển hướng kết xuất"
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr "không thể tạo tập tin tạm thá»i cho tài liệu này: %s"
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s: không thể gán danh sách cho bộ phận của mảng"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr ""
+"/dev/(tcp|udp)/host/port không được hỗ trợ khi không có chức năng chạy mạng"
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr "gặp lỗi chuyển hướng nên không thể nhân đôi fd"
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr "không tìm thấy « /tmp », hãy tạo."
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr "« /tmp » phải là tên thư mục hợp lệ"
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c: tùy chá»n không hợp lệ"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "Không có tên."
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr "bash của GNU, phiên bản %s-(%s)\n"
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"Sá»­ dụng:\t%s [tùy chá»n GNU dài] [tùy chá»n] ...\n"
+"\t%s [tùy chá»n GNU dài] [tùy chá»n] tập-tin-văn-lệnh ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "Tùy chá»n GNU dài:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Tùy chá»n trình bao :\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD hoặc -c lệnh or -O shopt_option\t\t(chỉ cuá»™c gá»i)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s hoặc -o tùy chá»n\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr ""
+"Gõ câu lệnh trợ giúp « %s -c \"help set\" » để xem thêm thông tin vỠcác tùy "
+"chá»n trình bao.\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr ""
+"Gõ câu lệnh trợ giúp « %s -c help » để xem thêm thông tin vỠcác câu lệnh "
+"trình bao dựng sẵn.\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "Dùng lệnh « bashbug » để thông báo lỗi.\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d: thao tác không hợp lệ"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr "Tín hiệu giả"
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr "Treo máy"
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr "Gián đoạn"
+
+#: siglist.c:59
+msgid "Quit"
+msgstr "Thoát"
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr "Câu lệnh không được phép"
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr "Theo vết/đặt bẫy BPT"
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr "Câu lệnh HỦY BỎ"
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr "Câu lệnh EMT"
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr "Ngoại lệ chấm động"
+
+#: siglist.c:87
+msgid "Killed"
+msgstr "Bị giết"
+
+#: siglist.c:91
+msgid "Bus error"
+msgstr "lỗi mạch nối"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr "Lỗi chia ra từng đoạn"
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr "Sai gá»i hệ thống"
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr "á»ng dẫn bị há»ng"
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr "Äồng hồ báo thức"
+
+#: siglist.c:111
+msgid "Terminated"
+msgstr "Bị chấm dứt"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr "Äiá»u kiện VR gấp"
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr "Bị dừng (tín hiệu)"
+
+#: siglist.c:127
+msgid "Continue"
+msgstr "Tiếp tục"
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr "Tiến trình con đã giết hoặc dừng"
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr "Bị dừng (tty nhập)"
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr "Bị dừng (tty xuất)"
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr "V/R sẵn sàng"
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr "Giới hạn CPU"
+
+#: siglist.c:155
+msgid "File limit"
+msgstr "Giới hạn tập tin"
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr "Báo động (ảo)"
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr "Báo động (hồ sơ)"
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr "Cửa sổ bị thay đổi"
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr "Mục ghi bị khoá"
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr "Tín hiệu ngÆ°á»i dùng 1"
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr "Tín hiệu ngÆ°á»i dùng 2"
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr "Dữ liệu nhập HFT bị hoãn"
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr "sắp bị cúp điện đột ngột"
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr "hệ thống sắp sụp đổ"
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr "chuyển tiến trình sang CPU khác"
+
+#: siglist.c:199
+msgid "programming error"
+msgstr "lỗi lập trình"
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr "Có chế độ màn hình HFT"
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr "Không có chế độ màn hình HFT"
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr "Äã hoàn thành chuá»—i âm thanh HFT"
+
+#: siglist.c:215
+msgid "Information request"
+msgstr "yêu cầu thông tin"
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr "Không rõ tín hiệu #"
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr "Không rõ tín hiệu #%d"
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr "sai thay thế: không có « %s » đóng trong %s"
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr "%s: không thể gán danh sách cho bộ phận của mảng"
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr "không thể tạo ống dẫn để thay thế tiến trình"
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr "không thể tạo tiến trình con để thay thế tiến trình"
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr "không thể mở ống dẫn đặt tên %s để Ä‘á»c"
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr "không thể mở ống dẫn đặt tên %s để ghi"
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr "không thể nhân đôi ống dẫn đặt tên %s thành fd %d"
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr "không thể tạo ống dẫn để thay thế lệnh"
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr "không thể tạo tiến trình con để thay thế lệnh"
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr "command_substitute: không thể nhân đôi ống dẫn thành fd 1"
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr "%s: tham số vô giá trị hoặc chưa được đặt"
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr "%s: biểu thức chuỗi phụ < 0"
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr "%s: sai thay thế"
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr "$%s: không thể gán bằng cách này"
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr "sai thay thế: không có « ` » đóng trong %s"
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr "không khớp: %s"
+
+#: test.c:146
+msgid "argument expected"
+msgstr "mong đợi đối số"
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr "%s: đợi biểu thức số nguyên"
+
+#: test.c:263
+msgid "`)' expected"
+msgstr "đợi dấu ngoặc đóng « ) »"
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr "đợi dấu ngoặc đóng « ) », còn tìm %s"
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr "%s: đợi toán tử nguyên phân"
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr "%s: đợi toán tử nhị phân"
+
+#: test.c:811
+msgid "missing `]'"
+msgstr "thiếu dấu ngoặc vụ đóng « ] »"
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "số thứ tự tín hiệu không hợp lệ"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr "run_pending_traps: giá trị sai trong danh sách trap_list[%d]: %p"
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr ""
+"run_pending_traps: bộ xử lý tín hiệu là SIG_DFL, đang gửi lại %d (%s) cho "
+"mình"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler: tín hiệu sai %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "gặp lá»—i khi nhập lá»i xác định hàm cho « %s »"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr "cấp trình bao (%d) quá cao nên đặt lại thành 1"
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr "make_local_variable: không có ngữ cảnh hàm ở phạm vi hiện thá»i"
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr "all_local_variables: không có ngữ cảnh hàm ở phạm vi hiện thá»i"
+
+#: variables.c:3376
+#, fuzzy, c-format
+msgid "%s has null exportstr"
+msgstr "%s: tham số vô giá trị hoặc chưa được đặt"
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr "sai ký tự %d trong chuỗi exportstr cho %s"
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr "không có dấu bằng « = » trong chuỗi exportstr cho %s"
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+"pop_var_context: đầu của shell_variables (các biến trình bao) không phải là "
+"ngữ cảnh hàm"
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr ""
+"pop_var_context: không có ngữ cảnh global_variables (các biến toàn cục)"
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+"pop_scope: đầu của shell_variables (các biến trình bao) không phải là phạm "
+"vi môi trÆ°á»ng tạm thá»i"
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s: không thể mở : %s"
+
+#: variables.c:4683
+#, fuzzy, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr "%d: bộ mô tả tập tin không hợp lệ: %s"
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr "Tác quyá»n © năm 2009 của Tổ chức Phần má»m Tá»± do."
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Giấy phép GPLv3+: Giấy Phép Công Cộng GNU phiên bản 3 hay sau <http://gnu."
+"org/licenses/gpl.html>\n"
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr "bash của GNU, phiên bản %s (%s)\n"
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr "Äây là phần má»m tá»± do thì bạn có quyá»n sá»­a đổi và phát hành lại nó.\n"
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr "KHÔNG BẢO ÄẢM GÃŒ CẢ, vá»›i Ä‘iá»u kiện được pháp luật cho phép.\n"
+
+#: version2.c:86
+#, fuzzy, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr "Tác quyá»n © năm 2009 của Tổ chức Phần má»m Tá»± do."
+
+#: version2.c:87
+#, fuzzy, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+"Giấy phép GPLv3+: Giấy Phép Công Cộng GNU phiên bản 3 hay sau <http://gnu."
+"org/licenses/gpl.html>\n"
+
+#: xmalloc.c:91
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: không thể cấp phát %lu byte (%lu byte đã cấp phát)"
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "xmalloc: không thể cấp phát %lu byte"
+
+#: xmalloc.c:163
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr "xmalloc: %s:%d: không thể cấp phát %lu byte (%lu byte đã cấp phát)"
+
+#: xmalloc.c:165
+#, fuzzy, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr "xmalloc: %s:%d: không thể cấp phát %lu byte"
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr "alias [-p] [tên[=giá-trị] ... ]"
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr "unalias [-a] tên [tên ...]"
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+"bind [-lpvsPVS] [-m sơ_đồ_phím] [-f tên_tập_tin] [-q tên] [-u tên] [-r "
+"dãy_phím] [-x dãy_phím:lệnh_trình_bao] [dãy_phím:chức_năng-readline hay lệnh-"
+"readline]"
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr "break [n]"
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr "tiếp tục [n]"
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr "builtin [shell-builtin [arg ...]]"
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr "caller [b_thức]"
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr "cd [-L|-P] [tmục]"
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr "pwd [-LP]"
+
+#: builtins.c:68
+msgid ":"
+msgstr ":"
+
+#: builtins.c:70
+msgid "true"
+msgstr "đúng"
+
+#: builtins.c:72
+msgid "false"
+msgstr "sai"
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr "command [-pVv] command [arg ...]"
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr "declare [-aAfFilrtux] [-p] [tên[=giá_trị] ...]"
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr "typeset [-aAfFilrtux] [-p] tên[=giá_trị] ..."
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr "local [tùy_chá»n] tên[=giá_trị] ..."
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr "echo [-neE] [đối_số ...]"
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr "echo [-n] [đối_số ...]"
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr "enable [-a] [-dnps] [-f tên_tập_tin] [tên ...]"
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr "eval [đối_số ...]"
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr "getopts chuá»—i_tùy_chá»n tên [đối_số]"
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr "exec [-cl] [-a tên] [lệnh [đối_số ...]] [chuyển_hướng ...]"
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr "exit [n]"
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr "đăng xuất [n]"
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+"fc [-e tên-e] [-lnr] [đầu] [cuối]\n"
+"\thay\n"
+"fc -s [mẫu=lập_lại] [lệnh]"
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr "fg [đặc_tả_công_việc]"
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr "bg [đặc_tả_công_việc ...]"
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr "hash [-lr] [-p Ä‘Æ°á»ng_dẫn] [-dt] [tên ...]"
+
+#: builtins.c:117
+#, fuzzy
+msgid "help [-dms] [pattern ...]"
+msgstr "help [-ds] [mẫu ...]"
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+"history [-c] [-d hiệu] [n]\n"
+"\thay\n"
+"history -anrw [tên_tập_tin]\n"
+"\thay\n"
+"history -ps đối_số [đối_số...]"
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr ""
+"jobs [-lnprs] [đặc_tả_công_việc ...]\n"
+"\thoặc\n"
+"jobs -x lệnh [các_đối_số]"
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr "disown [-h] [-ar] [đặc_tả_công_việc ...]"
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+"kill [-s đặc_tả_tín_hiệu | -n số_tín_hiệu | -đặc_tả_tín_hiệu] pid | "
+"đặc_tả_công_việc ...\n"
+"\thay\n"
+"kill -l [đặc_tả_tín_hiệu]"
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr "let đối_số [đối_số ...]"
+
+#: builtins.c:136
+#, fuzzy
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+"read [-ers] [-a mảng] [-d giới_hạn] [-i văn_bản] [-n số_ký_tự] [-p nhắc] [-t "
+"thá»i_hạn] [-u fd] [tên ...]"
+
+# nghĩa chữ
+#: builtins.c:138
+msgid "return [n]"
+msgstr "return [n]"
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr "set [--abefhkmnptuvxBCHP] [-o tùy_chá»n] [đối_số ...]"
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr "unset [-f] [-v] [tên ...]"
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr ""
+"export [-fn] [tên[=giá_trị] ...]\n"
+"\thay\n"
+"export -p"
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr ""
+"readonly [-af] [tên[=giá_trị] ...]\n"
+"\thay\n"
+"readonly -p"
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr "shift [n]"
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr "nguồn tên_tập_tin [đối_số ...]"
+
+#: builtins.c:152
+msgid ". filename [arguments]"
+msgstr ". tên_tập_tin [đối_số ...]"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr "ngÆ°ng [-f]"
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr "test [b_thức]"
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr "[ đối_số ... ]"
+
+#: builtins.c:162
+msgid "times"
+msgstr "lần"
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr "trap [-lp] [[đối_số] đặc_tả_tín_hiệu ...]"
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr "type [-afptP] tên [tên ...]"
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr "ulimit [-SHacdefilmnpqrstuvx] [giới_hạn]"
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr "umask [-p] [-S] [chế_độ]"
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr "đợi [id]"
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr "đợi [pid]"
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr "for TÊN [in CÃC-TỪ ... ;] do các_CÂU_LỆNH; done"
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr "for (( exp1; exp2; exp3 )); do các_CÂU_LỆNH; done"
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr "select TÊN [in CÃC-TỪ ... ;] do các_CÂU_LỆNH; done"
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr "thá»i hạn [-p] ống dẫn"
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr "case TỪ in [MẪU [| MẪU]...) các_CÂU_LỆNH ;;]... esac"
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+"if các_CÂU_LỆNH; then các_CÂU_LỆNH; [ elif các_CÂU_LỆNH; then "
+"các_CÂU_LỆNH; ]... [ else các_CÂU_LỆNH; ] fi"
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr "while các_CÂU_LỆNH; do các_CÂU_LỆNH; done"
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr "until các_CÂU_LỆNH; do các_CÂU_LỆNH; done"
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr "coproc [TÊN] command [định vị lại]"
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr ""
+"chức_năng tên { các_CÂU_LỆNH ; }\n"
+"\thay\n"
+"tên () { các_CÂU_LỆNH ; }"
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr "{ các_CÂU_LỆNH ; }"
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr "đặc_tả_công_việc [&]"
+
+#: builtins.c:206
+msgid "(( expression ))"
+msgstr "(( biểu_thức ))"
+
+#: builtins.c:208
+msgid "[[ expression ]]"
+msgstr "[[ biểu_thức ]]"
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr "biến — tên và nghĩa của một số biến trình bao"
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr "pushd [-n] [+N | -N | tmục]"
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr "popd [-n] [+N | -N]"
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr "dirs [-clpv] [+N] [-N]"
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr "shopt [-pqsu] [-o] [tùy_chá»n ...]"
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr "printf [-v biến] định_dạng [đối_số]"
+
+#: builtins.c:229
+#, fuzzy
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+"complete [-abcdefgjksuv] [-pr] [-o tùy_chá»n] [-A hành_Ä‘á»™ng] [-G mẫu_glob] [-"
+"W danh_sách_từ] [-F hàm] [-C lệnh] [-X mẫu_lá»c] [-P tiá»n_tố] [-S hậu_tố] "
+"[tên ...]"
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+"compgen [-abcdefgjksuv] [-o tùy_chá»n] [-A hành_Ä‘á»™ng] [-G mẫu_glob] [-W "
+"danh_sách_từ] [-F hàm] [-C lệnh] [-X mẫu_lá»c] [-P tiá»n_tố] [-S hậu_tố] [từ]"
+
+#: builtins.c:237
+#, fuzzy
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr "compopt [-o|+o tùy_chá»n] [tên ...]"
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"mapfile [-n đếm] [-O gốc] [-s đếm] [-t] [-u fd] [-C gá»i_ngược] [-c lượng] "
+"[mảng]"
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+"readarray [-n đếm] [-O gốc] [-s đếm] [-t] [-u fd] [-C gá»i_ngược] [-c lượng] "
+"[mảng]"
+
+#: builtins.c:254
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"Xác định hoặc hiển thị bí danh.\n"
+"\n"
+"\tKhông đưa ra đối số thì « alias » in ra danh sách các bí danh\n"
+"\ttheo định dạng có thể dùng lại được « bí_danh TÊN=GIÃ_TRỊ »\n"
+"\ttrên đầu ra tiêu chuẩn.\n"
+"\n"
+"\tCó đối số thì một bí danh được xác định cho mỗi TÊN có giá trị đưa ra.\n"
+"\tMá»™t dấu cách theo sau trong GIÃ_TRỊ thì gây ra từ kế tiếp được kiểm tra\n"
+"\tcó bí danh được thay thế khi bí danh được mở rộng.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-p\tin ra tất cả các bí danh đã xác định theo một định dạng\n"
+"\t\t\tcó thể dùng lại được\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tbí danh trả lại Äúng nếu không Ä‘Æ°a ra TÊN chÆ°a có bí danh được xác định."
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+"Gỡ bá» má»—i TÊN khá»i danh sách các bí danh đã xác định.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-a\tgỡ bá» tất cả các lá»i xác định bí danh.\n"
+"\n"
+"Trả lại thành công nếu không có TÊN là một bí danh không tồn tại."
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+"Äặt các tổ hợp phím và biến kiểu Readline.\n"
+"\n"
+"\tTổ hợp một dãy phím với một chức năng hay vĩ lệnh kiểu Readline,\n"
+"\t\thoặc đặt một biến Readline.\n"
+"\tCú pháp đối số khác tùy chá»n cÅ©ng tÆ°Æ¡ng Ä‘Æ°Æ¡ng vá»›i cú pháp\n"
+"\t\ttrong « ~/.inputrc », nhưng phải được gửi dưới dạng\n"
+"\t\tmột đối số riêng lẻ.\n"
+"\t\tVí dụ : bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-m sơ_đồ_phím\tdùng sơ đồ phím này làm sơ đồ phím\n"
+"\t\t\ttrong khoảng thá»i gian chạy câu lệnh này.\n"
+"\t\tTên sơ đồ phím hợp lệ:\n"
+"\t\t\temacs, emacs-standard, emacs-meta,\n"
+"\t\t\temacs-ctlx, vi, vi-move, vi-command,\n"
+"\t\t\tvi-insert\n"
+"\t\t-l\tliệt kê các tên chức năng\n"
+"\t\t-P\tliệt kê các tên và tổ hợp của chức năng\n"
+"\t\t-p\tliệt kê các chức năng và tổ hợp theo một định dạng\n"
+"\t\t\tcó thể dùng lại được làm dữ liệu nhập vào\n"
+"\t\t-S\tliệt kê các dãy phím mà gá»i vÄ© lệnh và giá trị tÆ°Æ¡ng ứng\n"
+"\t\t-S\tliệt kê các dãy phím mà gá»i vÄ© lệnh và giá trị tÆ°Æ¡ng ứng\n"
+"\t\t\ttheo một định dạng có thể dùng lại được\n"
+"\t\t\tlàm dữ liệu nhập vào\n"
+"\t\t-q tên_chức_năng\thá»i những phím nào gá»i chức năng này\n"
+"\t\t-u tên_chức_năng\ttháo tổ hợp tất cả các phím tổ hợp\n"
+"\t\t\tvới chức năng này\n"
+"\t\t-r dãy_phím\tgỡ bỠtổ hợp đối với dãy phím này\n"
+"\t\t-f tên_tập_tin\tÄ‘á»c các tổ hợp phím từ tập tin này\n"
+"\t\t-x dãy_phím:lệnh_trình_bao\tchạy câu lệnh trình bào này\n"
+"\t\t\tkhi dãy phím này được nhập vào\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tbind trả lại 0 nếu không Ä‘Æ°a ra tùy chá»n không nhận ra hay gặp lá»—i."
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Thoát khá»i vòng lặp kiểu trong, trong khi hay đến khi.\n"
+"\n"
+"\tThoát khá»i má»™t vòng lặp kiểu TRONG, TRONG KHI hay ÄẾN KHI.\n"
+"\tCó ghi rõ N thì ngắt N vòng lặp bao bá»c.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrạng thái thoát là 0 nếu N không nhỠhơn hay bằng 1."
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+"Tiếp tục lại chạy vòng lặp kiểu trong, trong khi hay đến khi.\n"
+"\n"
+"\tTiếp tục lại lần lặp lại kế tiếp của vòng lặp bao bá»c\n"
+"\t\tkiểu TRONG, TRONG KHI hay ÄẾN KHI.\n"
+"\tÄÆ°a ra N thì tiếp tục chạy vòng lặp bao bá»c thứ N.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrạng thái thoát là 0 nếu N không nhỠhơn hay bằng 1."
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+"Chạy dựng sẵn trình bao.\n"
+"\n"
+"\tChạy SHELL-BUILTIN (dá»±ng sẵn trình bao) vá»›i các Äá»I_Sá»\n"
+"\tmà không thực thi chức năng dò tìm câu lệnh.\n"
+"\tCó ích khi bạn muốn thực thi lại một dựng sẵn trình bao\n"
+"\tdưới dạng một chức năng trình bao, nhưng cũng\n"
+"\tcần thực thi dựng sẵn bên trong chức năng.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại trạng thái thoát của SHELL-BUILTIN,\n"
+"\thoặc sai nếu SHELL-BUILTIN không phải là một\n"
+"\tdựng sẵn trình bao."
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+"Trả vá» ngữ cảnh của cuá»™c gá»i hàm phụ hiện thá»i.\n"
+"\n"
+"\tKhông có B_THỨC thì trả lại « $line $filename ».\n"
+"\tCó B_THỨC thì trả lại « $line $subroutine $filename »;\n"
+"\tthông tin thêm này có thể được dùng để cung cấp vết đống.\n"
+"\n"
+"\tGiá trị của B_THỨC thì ngụ ý bao nhiêu khung gá»i cần lùi lại\n"
+"đằng trước khung hiện tại; khung đầu là khung 0.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại 0 nếu trình bao đang chạy chức năng trình bao,\n"
+"\t\tB_THỨC cũng hợp lệ."
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+"Chuyển đổi thư mục làm việc của trình bao.\n"
+"\n"
+"\tChuyển đổi thÆ° mục hiện thá»i sang TMỤC.\n"
+"\tThư mục mặc định là giá trị của biến trình bao HOME.\n"
+"\n"
+"\tBiến CDPATH thì xác định Ä‘Æ°á»ng dẫn tìm kiếm cho thÆ° mục chứa TMỤC.\n"
+"\tCác tên thư mục xen kẽ trong CDPATH cũng định giới bằng dấu hai chấm « : "
+"».\n"
+"\tMột tên thư mục trống tương đương với thư mục hiện tại.\n"
+"\tNếu TMỤC bắt đầu với dấu chéo « / » thì không dùng CDPATH.\n"
+"\n"
+"\tNếu không tìm thấy thư mục, và đặt biến trình bao « cdable_vars »,\n"
+"\t\tthì giả sử từ là một tên biến.\n"
+"\tNếu biến đó có giá trị thì giá trị này được dùng cho TMỤC.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-L\tép buộc theo liên kết tượng trưng\n"
+"\t\t-P\tdùng cấu trúc thư mục vật lý mà không theo liên kết tượng trưng\n"
+"\n"
+"\tMặc định là theo liên kết tượng trÆ°ng, nhÆ° là tùy chá»n « -L » Ä‘Æ°a ra.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại 0 nếu thư mục được chuyển đổi; không thì khác số không."
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+"In ra tên của thÆ° mục hoạt Ä‘á»™ng hiện thá»i.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-L\tin ra giá trị của $PWD nếu nó đặt tên\n"
+"\t\t\tcủa thÆ° mục hoạt Ä‘á»™ng hiện thá»i\n"
+"\t\t-P\tin ra thÆ° mục vật lý, không có liên kết má»m\n"
+"\n"
+"\t\tMặc định là « pwd » hoạt động như là « -L » được ghi rõ.\n"
+"\n"
+"\t\tTrạng thái thoát:\n"
+"\t\tTrả lại 0 nếu không Ä‘Æ°a ra tùy chá»n sai\n"
+"\t\tvà nếu Ä‘á»c được thÆ° mục hiện thá»i."
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Câu lệnh vô giá trị.\n"
+"\n"
+"\tKhông có hiệu ứng: câu lệnh không làm gì.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tLúc nào cũng thành công."
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Trả lại một kết quả thành công.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tLúc nào cũng thành công."
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+"Trả vỠkết quả không thành công.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tLúc nào cũng không thành công."
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+"Thực thi một câu lệnh đơn giản, hoặc hiển thị thông tin vỠcác câu lệnh.\n"
+"\n"
+"Chạy LỆNH vá»›i các Äá»I_Sá» thu hồi chức năng dò tìm chức năng trình bao,\n"
+"hoạc hiển thị thông tin vỠcác câu LỆNH được ghi rõ.\n"
+"Có thể được dùng để gá»i câu lệnh trên Ä‘Ä©a khi đã có má»™t chức năng cùng tên.\n"
+"\n"
+"Tùy chá»n:\n"
+"\t-p\tdùng má»™t giá trị mặc định cho ÄƯỜNG_DẪN\n"
+"\t\tmà chắc chắn sẽ tìm má»i tiện ích tiêu chuẩn\n"
+"\t-v\tin ra mô tả vỠcâu LỆNH mà tương tự với dựng sẵn « type » (kiểu)\n"
+"\t-V\tin ra mô tả chi tiết hơn vỠmỗi câu LỆNH\n"
+"\n"
+"Trạng thái thoát:\n"
+"Trả lại trạng thái thoát của câu LỆNH, hoặc bị lỗi nếu không tìm thấy câu "
+"LỆNH."
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Äặt các giá trị và thuá»™c tính của biến.\n"
+"\n"
+"\tTuyên bố mỗi biến và gán cho nó một số thuộc tính.\n"
+"\tKhông Ä‘Æ°a ra TÊN thì hiển thị các thuá»™c tính và giá trị của má»i giá trị.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-f\thạn chế hành động, hoặc hiển thị đối với tên và mô tả của chức năng\n"
+"\t\t-F\thiển thị chỉ đối với tên chức năng\n"
+"\t\t\t(và số thứ tự dòng và tập tin nguồn khi gỡ lỗi)\n"
+"\t\t-p\thiển thị các thuộc tính và giá trị của mỗi TÊN\n"
+"\n"
+"\tTùy chá»n cÅ©ng đặt thuá»™c tính:\n"
+"\t\t-a\tđặt TÊN là mảng theo số mũ (nếu được hỗ trợ)\n"
+"\t\t-A\tđặt TÊN là mảng kết hợp (nếu được hỗ trợ)\n"
+"\t\t-i\tđặt TÊN có thuộc tính « integer » (số nguyên)\n"
+"\t\t-l\tchuyển đổi TÊN sang chữ thÆ°á»ng khi được gán\n"
+"\t\t-r\tđặt TÊN là chỉ Ä‘á»c\n"
+"\t\t-t\tđặt TÊN có thuộc tính « trace » (theo vết)\n"
+"\t\t-u\tchuyển đổi TÊN sang chữ hoa khi được gán\n"
+"\t\t-x\tđặt TÊN xuất\n"
+"\n"
+"\tDùng « + » thay cho « - » thì tắt thuộc tính đưa ra.\n"
+"\n"
+"\tBiến có thuá»™c tính số nguyên thì định giá theo số há»c\n"
+"\t\t(xem câu lệnh « let ») khi biến có giá trị được gán.\n"
+"\n"
+"\tKhi dùng trong chức năng, « declare » (tuyên bố) đặt TÊN là cục bộ,\n"
+"\t\tnhư khi dùng câu lệnh « local » (cục bộ).\n"
+"\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không Ä‘Æ°a ra tùy chá»n sai hoặc gặp lá»—i."
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+"Äặt các giá trị và thuá»™c tính của biến.\n"
+"\n"
+"\tQuá cũ. Xem « help declare »."
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+"Xác định các biến cục bộ.\n"
+"\n"
+"\tTạo má»™t biến cục bá»™ tên TÊN, và gán cho nó GIÃ_TRỊ.\n"
+"\tTÙY_CHỌN có thể là bất cứ tùy chá»n nào được « declare » chấp nhận.\n"
+"\n"
+"\tBiến cục bộ chỉ dùng được bên trong chức năng;\n"
+"\t\tchỉ chức năng trong đó nó được xác định\n"
+"\t\t(và các chức năng con) có khả năng phát hiện nó.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không Ä‘Æ°a ra tùy chá»n sai hay gặp lá»—i,\n"
+"\tvà nếu trình bao đang chạy chức năng."
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Ghi các đối số vào đầu ra tiêu chuẩn.\n"
+"\n"
+"\tHiển thị các Äá»I_Sá» trên đầu ra tiêu chuẩn,\n"
+"\t\tvới một ký tự dòng mới theo sau.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-n\tđừng phụ thêm ký tự dòng mới\n"
+"\t\t-e\tbật Ä‘á»c ký tá»± thoát kiểu gạch chéo ngược mà theo sau\n"
+"\t\t-E\tthu hồi dứt khoát Ä‘á»c ký tá»± thoát kiểu gạch chéo ngược\n"
+"\n"
+"\t« echo » Ä‘á»c những ký tá»± thoát này kiểu gạch chéo ngược:\n"
+"\t\t\\a\tchuông báo\n"
+"\t\t\\b\txoá lùi\n"
+"\t\t\\c\tthu hồi kết xuất thêm nữa\n"
+"\t\t\\e\tký tự thoát\n"
+"\t\t\\f\tnạp giấy\n"
+"\t\t\\n\tdòng mới\n"
+"\t\t\\r\txuống dòng\n"
+"\t\t\\0nnn\tký tự có mã ASCII NNN (1-3 chữ số bát phân)\n"
+"\t\t\\xHH\tký tự 8-bit có giá trị HH (1-2 chữ số thập lục)\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không gặp lá»—i ghi.\t\t\\t\tkhoảng tab theo chiá»u "
+"ngang\n"
+"\t\t\\v\tkhoảng tab theo chiá»u dá»c\n"
+"\t\t\\\\\tgạch chéo ngược"
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+"Ghi các đối số vào đầu ra tiêu chuẩn\n"
+"\n"
+"\tHiển thị các Äá»I_Sá» trên đầu ra tiêu chuẩn vá»›i má»™t dòng má»›i theo sau.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-n\tđừng phụ thêm một dòng mới\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không gặp lỗi ghi."
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+"Bật/tắt dựng sẵn trình bao.\n"
+"\b\tBật và tắt các dựng sẵn trình bao.\b\tChức năng tắt thì cho phép bạn "
+"thực thi một câu lệnh đĩa\n"
+"\tmà cùng tên với một dựng sẵn trình bao,\n"
+"\tkhông cần dùng tên Ä‘Æ°á»ng dẫn đầy đủ.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-a\tin ra một danh sách các dựng sẳn, cũng hiển thị trạng thái bật/tắt\n"
+"\t\t-b\ttắt mỗi TÊN hoặc hiển thị danh sách các dựng sẵn bị tắt\n"
+"\t\t-p\tin ra danh sách các dựng sẵn theo một định dạng có thể dùng lại "
+"được\n"
+"\t\t-s\tin ra chỉ tên mỗi dựng sẵn Posix « đặc biệt »\n"
+"\n"
+"\tTùy chá»n Ä‘iá»u khiển chức năng nạp Ä‘á»™ng:\n"
+"\t\t-f\tnạp dá»±ng sẵn TÊN từ Ä‘iá»u khiển dùng chung TÊN_TẬP_TIN\n"
+"\t\t-d\tgỡ bỠmột dựng sẵn được nạp dùng « -f »\n"
+"\n"
+"\tKhông có tùy chá»n thì má»—i TÊN được bật lại.\n"
+"\n"
+"\tÄể sá»­ dụng « test » (hàm thá»­) nằm trên Ä‘Æ°á»ng dẫn mặc định $PATH\n"
+"\tthay cho phiên bản của dựng sẵn trình bao,\n"
+"\thãy gõ chuỗi « enable -n test ».\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu TÊN là một dựng sẵn trình bao, và không gặp lỗi."
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+"Thực thi các đối số dưới dạng một câu lệnh trình bao.\n"
+"\n"
+"\tPhối hợp các Äá»I_Sá» thành má»™t chuá»—i riêng lẻ,\n"
+"\tdùng kết quả làm dữ liệu nhập vào trình bao,\n"
+"\tvà thực thi các câu lệnh kết quả.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại trạng thái thoát của câu lệnh,\n"
+"\thay thành công nếu câu lệnh vô giá trị."
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+"Phân tích cú pháp của đối số tùy chá»n.\n"
+"\n"
+"\tGetopts được thủ tục trình bao dùng để phân tích cú pháp\n"
+"\t\tcủa tham số thuá»™c ví trị dÆ°á»›i dạng tùy chá»n.\n"
+"\n"
+"\tOPTSTRING chứa những chữ tùy chá»n cần nhận ra;\n"
+"\tmá»™t chữ có dấu hai chấm theo sau thì tùy chá»n mong đợi má»™t đối số,\n"
+"\tmà nên định giới bằng khoảng trắng.\n"
+"\n"
+"\tMá»—i lần được gá»i, getopts sẽ đặt tùy chá»n kế tiếp\n"
+"\t\tvào biến trình bao $name\n"
+"\t\t(cũng khởi tạo tên đó nếu nó chưa tồn tại)\n"
+"\t\tvà đặt chỉ mục của đối số kế tiếp cần xử lý\n"
+"\t\tvào biến trình bao OPTIND.\n"
+"\tOPTIND được sơ khởi thành 1 mỗi lần trình bao\n"
+"\thay má»™t văn lệnh trình bao được gá»i.\n"
+"\tKhi má»™t tùy chá»n đòi há»i má»™t đối số,\n"
+"\tgetopts đặt đối số đó vào biến trình bao OPTARG.\n"
+"\n"
+"\tgetopts thông báo lỗi bằng một của hai cách.\n"
+"\tNếu ký tự đầu tiên của chuỗi OPTSTRING là dấu hai chấm,\n"
+"\tgetopts dùng chức năng thông báo lỗi một cách im.\n"
+"\tBằng chế độ này, không in ra thông điệp lỗi nào.\n"
+"\tNếu gặp tùy chá»n sai thì getopts đặt vào OPTARG\n"
+"\tký tá»± tùy chá»n được tìm. Không tìm thấy đối số cần thiết\n"
+"\tthì getopts đặt một dấu hai chấm vào TÊN\n"
+"\tvà đặt OPTARG thành ký tá»± tùy chá»n được tìm.\n"
+"\tNếu getopts không phải ở chế Ä‘á»™ im, và gặp tùy chá»n sai,\n"
+"\tthì getopts đặt má»™t dấu há»i « ? » vào TÊN và bỠđặt OPTARG.\n"
+"\tKhông tìm thấy tùy chá»n cần thiết thì « ? » được đặt vào TÊN,\n"
+"\tOPTARG bị bỠđặt, và in ra một thông điệp chẩn đoán.\n"
+"\n"
+"\tNếu biến trình bao OPTERR có giá trị 0,\n"
+"\tthì getopts tắt chức năng in ra thông điệp,\n"
+"\tthậm chí nếu ký tự đầu tiên của chuỗi OPTSTRING\n"
+"\tkhông phải là dấu hai chấm. OPTERR có giá trị 1 theo mặc định.\n"
+"\n"
+"Getopts bình thÆ°á»ng phân tích cách tham số thuá»™c vị trí ($0 - $9),\n"
+"\tnhưng nếu đưa ra đối số bổ sung,\n"
+"\t(các) đối số này được phân tích để thay thế.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu tìm thấy má»™t tùy chá»n;\n"
+"\tkhông thành công nếu gặp kết thúc các tùy chá»n,\n"
+"\thoặc nếu gặp lỗi."
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+"Thay thế trình bao bằng câu lệnh đưa ra.\n"
+"\n"
+"\tThực thi câu LỆNH, cũng thay thế trình bao này bằng chương trình được ghi "
+"rõ.\n"
+"\tCác Äá»I_Sá» trở thành các đối số đối vá»›i câu LỆNH.\n"
+"\tKhông đưa ra câu LỆNH thì bất cứ việc chuyển hướng nào\n"
+"\tsẽ xảy ra trong trình bao đang chạy.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-a tên\tgửi TÊN cho câu LỆNH dưới dạng đối số thứ không\n"
+"\t\t-c\tthá»±c thi câu LỆNH vá»›i má»™t môi trÆ°á»ng trống\n"
+"\t\t-l\tđặt một dấu gạch vào đối số thứ không đối với câu LỆNH\n"
+"\n"
+"\tNếu câu LỆNH không thể thực thi được, một trình bao không tương tác\n"
+"\tsẽ thoát ra, nếu không đặt tùy chá»n trình bao « execfail ».\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu tìm được câu LỆNH và không gặp lỗi chuyển hướng."
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+"Thoát khá»i trình bao.\n"
+"\n"
+"\tThoát khá»i trình bao vá»›i trạng thái N.\n"
+"\tKhông đưa ra N thì trạng thái thoát\n"
+"\tlà trạng thái của câu lệnh cuối cùng được chạy."
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+"Thoát khá»i má»™t trình bao đăng nhập.\n"
+"\n"
+"\tThoát khá»i má»™t trình bao đăng nhập, vá»›i trạng thái thoát N.\n"
+"\tTrả lại lỗi nếu không được thực thi trong trình bao đăng nhập."
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+"Hiển thị hoặc thực thi các câu lệnh từ danh sách lược sử.\n"
+"\n"
+"\tfc được dùng để liệt kê hoặc chỉnh sửa và thực thi lại\n"
+"\tcâu lệnh từ danh sách lược sử.\n"
+"\tÄẦU và CUá»I có thể là số mà xác định phạm vi,\n"
+"hoặc ÄẦU có thể là má»™t chuá»—i đại diện câu lệnh\n"
+"\tvừa chạy nhất mà bắt đầu với chuỗi đó.\n"
+"\tTùy chá»n:\n"
+"\t\t-e ENAME\tchá»n trình soạn thảo nào cần dùng;\n"
+"\t\t\tmặc định là FCEDIT, sau đó EDITOR, sau đó vi\n"
+"\t\t-l\tliệt kê các dòng thay vào chỉnh sửa\n"
+"\t\t-n\tliệt kê mà không in ra số thứ tự dòng\n"
+"\t\t-r\tđảo ngược thứ tự các dòng (mới nhất trước)\n"
+"\n"
+"\tTùy theo định dạng « fc -s [mẫu=lần_lập_lại ...] [lệnh] »,\n"
+"\tcâu LỆNH được chạy lại sau khi thay thế CŨ bằng MỚI.\n"
+"\n"
+"\tCũng có thể sử dụng bí danh có ích « r='fc -s' »,\n"
+"\tvì thế việc gõ « r cc » sẽ chạy câu lệnh cuối cùng\n"
+"\tmà bắt đầu với « cc », và việc gõ « r »\n"
+"\tsẽ đơn giản chạy lại câu lệnh cuối cùng.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công hay trạng thái của câu lệnh được thực thi;\n"
+"\t\tgặp lỗi thì khác số không."
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+"Nâng công việc lên trước.\n"
+"\n"
+"\tNâng lên trÆ°á»›c công việc được ÄẶC_TẢ_CÔNG_VIỆC đại diện,\n"
+"\tthì làm cho nó là công việc hiện thá»i.\n"
+"\tKhông Ä‘Æ°a ra ÄẶC_TẢ_CÔNG_VIỆC\n"
+"\tthì dùng công việc hiện thá»i tùy theo trình bao.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrạng thái của câu lệnh được nâng lên trước;\n"
+"\tgặp lỗi thì không thành công."
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Gửi công việc ra sau.\n"
+"\n"
+"\tGá»­i ra sau các công việc được má»—i ÄẶC_TẢ_CÔNG_VIỆC đại diện,\n"
+"\tnhư là công việc được bắt đầu với « & ».\n"
+"\tKhông Ä‘Æ°a ra ÄẶC_TẢ_CÔNG_VIỆC\n"
+"\tthì dùng công việc hiện thá»i tùy theo trình bao.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu chức năng Ä‘iá»u khiển công việc được bật\n"
+"\tvà không gặp lỗi."
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+"Nhớ hoặc hiển thị vị trí của chương trình.\n"
+"\n"
+"\tXác định và ghi nhá»› tên Ä‘Æ°á»ng dẫn đầy đủ của má»—i TÊN câu lệnh.\n"
+"\tNếu không đưa ra đối số, hiển thị thông tin vỠcác câu lệnh được ghi nhớ.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-d\tquên vị trí được ghi nhớ của mỗi TÊN\n"
+"\t\t-l\thiển thị theo một định dạng có thể được dùng lại\n"
+"\t\t\tdưới dạng dữ liệu nhập vào\n"
+"\t\t-p tên_Ä‘Æ°á»ng_dẫn\tdùng TÊN_ÄƯỜNG_DẪN là tên Ä‘Æ°á»ng dẫn đầy đủ của TÊN\n"
+"\t\t-r\tquên má»i vị trí được ghi nhá»›\n"
+"\t\t-t\tin ra vị trí được ghi nhớ của mỗi TÊN,\n"
+"\t\t\tcó nhiá»u TÊN thì cÅ©ng in ra TÊN tÆ°Æ¡ng ứng ở trÆ°á»›c vị trí\n"
+"\n"
+"\tÄối số:\n"
+"\t\tTÊN\tmá»—i TÊN được tìm theo Ä‘Æ°á»ng dẫn mặc định $PATH,\n"
+"\t\tvà được thêm vào danh sách các câu lệnh được ghi nhớ.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu tìm được TÊN và không Ä‘Æ°a ra tùy chá»n sai."
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+"Hiển thị thông tin vỠcác câu lệnh dựng sẵn.\n"
+"\n"
+"\tHiển thị bản tóm tắt ngắn vỠcác câu lệnh dựng sẵn.\n"
+"\tNếu cũng ghi rõ MẪU thì in ra trợ giúp chi tiết\n"
+"\tvỠtất cả các câu lệnh tương ứng với mẫu đó ;\n"
+"\tkhông thì in ra danh sách các chủ đỠtrợ giúp.\n"
+"\n"
+"\rTùy chá»n:\n"
+"\t\t-d\txuất mô tả ngắn vá» má»—i chủ Ä‘á»\n"
+"\t\t-m\thiển thị cách sử dụng theo định dạng\n"
+"\t\t\tkiểu trang hướng dẫn (man)\n"
+"\t\t-s\txuất chỉ một bản tóm tắt ngắn vỠcách sử dụng\n"
+"\t\t\tcho mỗi chủ đỠtương ứng với MẪU\n"
+"\n"
+"\tÄối số :\n"
+"\t\tMẪU\tmẫu ghi rõ một chủ đỠtrợ giúp\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu tìm được MẪU và không Ä‘Æ°a ra tùy chá»n sai."
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Hiển thị hoặc thao tác danh sách lượd sử.\n"
+"\n"
+"\tHiển thị danh sách lược sử với các số thứ tự dòng,\n"
+"\tcũng đặt dấu sao « * » vào trước mỗi mục nhập bị sửa đổi.\n"
+"\tÄối số N thì liệt kê chỉ N mục nhập cuối cùng.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-c\txoá sạch danh sách lược sá»­ bằng cách xoá má»i mục nhập\n"
+"\t\t-d hiệu\txoá mục nhập lược sử ở hiệu này\n"
+"\n"
+"\t\t-a\tphụ thêm vào tập tin lư ợc sử các dòng lược sử từ phiên chạy này\n"
+"\t\t-n\tÄ‘á»c má»i dòng lược sá»­ chÆ°a Ä‘á»c từ tập tin lược sá»­\n"
+"\t\t-r\tÄ‘á»c tÆ° lược sá»­ và phụ thêm ná»™i dung vào lược sá»­\n"
+"\t\t-w\tghi lược sá»­ hiện thá»i vào tập tin lược sá»­\n"
+"\t\t\tcũng phụ thêm vào danh sách lược sử\n"
+"\n"
+"\t\t-p\tmở rá»™ng lược sá»­ vá»›i má»—i Äá»I_Sá», và hiển thị kết quả\n"
+"\t\t\tmà không ghi nhớ nó vào danh sách lược sử\n"
+"\t\t-s\tphụ thêm các Äá»I_Sá» vào danh sách lược sá»­\n"
+"\t\t\tdưới dạng một mục nhập riêng lẻ\n"
+"\n"
+"\tÄÆ°a ra TÊN_TẬP_TIN thì nó được dùng làm tập tin lược sá»­.\n"
+"\tNếu không, và nếu $HISTFILE có giá trị, thì nó được dùng;\n"
+"\tnếu $HISTFILE không có giá trị thì dùng « ~/.bash_history ».\n"
+"\n"
+"\tNếu biến $HISTTIMEFORMAT đã được đặt và có giá trị,\n"
+"\tthì giá trị đó được dùng làm chuỗi định dạng\n"
+"\tcho strftime(3) in ra nhãn thá»i gian tÆ°Æ¡ng ứng\n"
+"\tvới mỗi mục nhập lược sử được hiển thị.\n"
+"\tKhông thì không in ra nhãn thá»i gian.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không gặp tùy chá»n sai hay gặp lá»—i."
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+"Hiển thị trạng thái của công việc.\n"
+"\n"
+"\tLiệt kê các công việc đang chạy.\n"
+"\tÄẶC_TẢ_CÔNG_VIỆC hạn chế kết xuất thành công việc đó.\n"
+"\tKhông Ä‘Æ°a ra tùy chá»n thì hiển thị trạng thái\n"
+"\tcủa má»i công việc Ä‘ang chạy.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-l\tliệt kê các mã số tiến trình, thêm vào thông tin bình thÆ°á»ng\n"
+"\t\t-n\tliệt kê chỉ những tiến trình đã thay đổi trạng thái\n"
+"\t\t\tkể từ lần thông báo cuối cùng\n"
+"\t\t-s\thạn chế kết xuất thành những công việc bị dừng chạy\n"
+"\n"
+"\tÄÆ°a ra « -x » thì câu LỆNH được chạy sau khi tất cả các đặc tả công việc\n"
+"\tmà xuất hiện trong các Äá»I_SỠđã được thay thế bằng mã số tiến trình\n"
+"\tcủa trình dẫn đầu nhóm tiến trình của công việc đó.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không gặp tùy chá»n sai hay gặp lá»—i.\n"
+"\tÄÆ°a ra « -x » thì trả lại trạng thái thoát của câu LỆNH."
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+"Gỡ bá» công việc khá»i trình bao Ä‘ang chạy.\n"
+"\n"
+"\tGỡ bá» má»—i đối số JOBSPEC (đặc tả công việc) khá»i bảng các công việc Ä‘ang "
+"chạy.\n"
+"\tKhông có JOBSPEC thì trình bao dùng thông tin riêng vỠcông việc đang đang "
+"chạy.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-a\tgỡ bá» má»i công việc nếu không Ä‘Æ°a ra JOBSPEC\n"
+"\t\t-h\tđánh dấu mỗi JOBSPEC để không gửi tín hiệu ngưng kết nối SIGHUP\n"
+"\t\t\tcho công việc nếu trình bao nhận được SIGHUP\n"
+"\t\t-r\tgỡ bỠchỉ những công việc đang chạy\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không Ä‘Æ°a ra tùy chá»n sai hay JOBSPEC sai."
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+"Gửi một tín hiệu cho một công việc.\n"
+"\n"
+"\tGửi cho những tiến trình được mã số hay đặc tả công việc đại diện\n"
+"\ttín hiệu được SIGSPEC hay SIGNUM được đặt tên.\n"
+"\tKhông đưa ra SIGSPEC, cũng không đưa ra SIGNUM,\n"
+"\tthì giả sử SIGTERM.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-s TTH\tTTH là một tên tín hiệu\n"
+"\t\t-n STH\tSTH là một số thứ tự tín hiệu\n"
+"\t\t-l\tliệt kê các tên tín hiệu ;\n"
+"\t\t\tnếu có đối số theo sau « -l », thì giả sử mỗi đối số\n"
+"\t\t\tlà số thứ tự tin hiệu cho đó nên liệt kê tên\n"
+"\n"
+"\tKill là một dựng sẵn trình bao vì hai lý do :\n"
+"\tnó cho phép dùng mã số công việc thay cho mã số tiến trình,\n"
+"\tvà cho phép giết tiến trình nếu tới giới hạn số các tiến trình\n"
+"\tđược phép tạo.\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không Ä‘Æ°a ra tùy chá»n sai hay gặp lá»—i."
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+"Äịnh giá biểu thức số há»c.\n"
+"\n"
+"\tÄịnh giá má»—i Äá»I_Sá» nhÆ° là má»™t biểu thức số há»c.\n"
+"\tViệc định giá xảy ra theo số nguyên có độ rộng cố định\n"
+"\tmà không kiểm tra có tràn chưa,\n"
+"\tdù trÆ°á»ng hợp chia cho không được bắt và đặt cá» là má»™t lá»—i.\n"
+"\tTheo đây có danh sách các toán tử được nhóm lại\n"
+"\ttheo cấp các toán tá»­ cùng quyá»n Ä‘i trÆ°á»›c.\n"
+"\tDanh sách các cấp có thứ tá»± quyá»n Ä‘i trÆ°á»›c giảm.\n"
+"\n"
+"\tid++, id--\tbiến đổi sau khi tăng/giảm dần\n"
+"\t++id, --id\tbiến đổi trước khi tăng/giảm dần\n"
+"\t-, +\ttrừ, cộng nguyên phân\n"
+"\t!, ~\tphủ định lôgic và theo vị trí bit\n"
+"\t**\tmũ hoá\n"
+"\t*, /, %\tphép nhân, phép chia, số dư\n"
+"\t+, -\tphép công, phép trừ\n"
+"\t<<, >>\tdá»i theo vị trí bit bên trái/phải\n"
+"\t<=, >=, <, >\tso sánh\n"
+"\t==, !=\t bất đẳng thức, đẳng thức\n"
+"\t&\tAND (và) theo vị trí bit\n"
+"\t^\tXOR (hoặc loại từ) theo vị trí bit\n"
+"\t||\tOR (hoặc) theo vị trí bit\n"
+"\tb_thức ? b_thức : b_thức\ttoán từ Ä‘iá»u kiện\n"
+"\t=, *=, /=, %=, +=, -=, <<=, >>=, &=, ^=, |=\tgán\n"
+"\n"
+"\tCho phép biến trình bao dưới dạng toán hạng.\n"
+"\tTên của biến được thay thế bằng giá trị của nó\n"
+"\t(bị ép buộc thành một số nguyên rộng cố định)\n"
+"\tbên trong một biểu thức.\n"
+"\tBiến không cần có thuộc tính số nguyên được bật\n"
+"\tđể được dùng làm biểu thức.\n"
+"\n"
+"\tCác toán tá»­ được định giá theo thứ tá»± quyá»n Ä‘i trÆ°á»›c.\n"
+"\tCác biểu thức con nằm trong dấu ngoặc vẫn còn được định giá trước tiên,\n"
+"\tthì có quyá»n cao hÆ¡n các quy tắc Ä‘i trÆ°á»›c bên trên.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tNếu Äá»I_Sá» cuối cùng được định giá thành 0 thì let trả lại 1;\n"
+"\tkhông thì let trả lại 0."
+
+#: builtins.c:966
+#, fuzzy
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+"Äá»c má»™t dòng từ đầu vào tiêu chuẩn, sau đó chia nó ra nhiá»u trÆ°á»ng.\n"
+"\n"
+"\tÄá»c má»™t dòng riêng lẻ từ đầu vào tiêu chuẩn,\n"
+"\thoặc từ bá»™ mô tả tập tin FD nếu Ä‘Æ°a ra tùy chá»n « -u ».\n"
+"\tDòng được chia ra nhiá»u trÆ°á»ng giống nhÆ° khi chia từ ra,\n"
+"\tvà từ đầu tiên được gán cho TÊN đầu tiên,\n"
+"\ttừ thứ hai cho TÊN thứ hai, v.v.,\n"
+"\tvà từ còn lại nào được gán cho TÊN cuối cùng.\n"
+"\tChỉ những ký tự được tìm trong $IFS được nhận ra là ký tự định giới từ.\n"
+"\n"
+"\tKhông Ä‘Æ°a ra TÊN thì dòng được Ä‘á»c sẽ được ghi nhá»› vào biến REPLY (trả "
+"lá»i).\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-a MẢNG\tgán các từ được Ä‘á»c cho những số mÅ© tuần tá»±\n"
+"\t\t\tcủa biến mảng MẢNG, bắt đầu từ số không.\n"
+"\t\t-d định_giá»›i\ttiếp tục đến khi Ä‘á»c ký tá»± đầu tiên của DELIM,\n"
+"\t\t\thơn là ký tự dòng mới\n"
+"\t\t-e\tdùng Readline để lấy dòng trong một trình bao tương tác\n"
+"\t\t-i chuỗi\tdùng chuỗi này như là văn bản đầu tiên cho Readline\n"
+"\t\t-n số_ky_tá»±\ttrở vá» sau khi Ä‘á»c số các ký tá»± này,\n"
+"\t\t\thơn là đợi một ký tự dòng mới\n"
+"\t\t-p nhắc\txuất chuỗi NHẮC mà không có ký tự dòng mới theo sau,\n"
+"\t\t\ttrÆ°á»›c khi thá»­ Ä‘á»c\n"
+"\t\t-r\tđừng cho phép gạch chéo ngược thoát ký tự\n"
+"\t\t-s\tđừng báo lai dữ liệu nhập vào đến từ thiết bị cuối\n"
+"\t\t-t thá»i_hạn\tquá thá»i và trả lại không thành công\n"
+"\t\t\tnếu chÆ°a Ä‘á»c má»™t dòng dữ liệu nhập hoàn toàn trong số giấy này.\n"
+"\t\t\tGiá trị của biến TMOUT là thá»i hạn mặc định.\n"
+"\t\t\tThá»i hạn này có thể là má»™t số thuá»™c phân số.\n"
+"\t\t\tNếu THỜI_HẠN là 0 thì việc Ä‘á»c trả lại thành công chỉ nếu\n"
+"\t\t\tdữ liệu nhập sẵn sàng trên bộ mô tả tập tin đưa ra.\n"
+"\t\t\tTrạng thái thoát lá»›n hÆ¡n 128 nếu vượt quá thá»i hạn này.\n"
+"\t\t-u fd\tÄ‘á»c từ bá»™ mô tả tập tin FD thay cho đầu vào tiêu chuẩn\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tMã trả lại là số không, nếu không gặp kết thúc tập tin,\n"
+"\tkhông quá thá»i khi Ä‘á»c, và không Ä‘Æ°a ra bá»™ mô tả tập tin sai\n"
+"\tlàm đối số tới « -u »."
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+"Trả lại từ một chức năng trình bao.\n"
+"\n"
+"\tGây ra một chức năng hay văn lệnh từ nguồn sẽ thoát\n"
+"\tvới giá trị trả lại được N ghi rõ.\n"
+"\tKhông đưa ra N thì trạng thái trả lại thuộc vỠcâu lệnh cuối cùng\n"
+"\t\tđược chạy bên trong chức năng hay văn lệnh.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại N, hoặc bị lỗi nếu trình bao không đang chạy\n"
+"\t\tmột chức năng hay văn lệnh."
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+"Äặt hay bỠđặt giá trị của tùy chá»n trình bao và tham số thuá»™c vị trí.\n"
+"\n"
+"\tSửa đổi giá trị của thuộc tính trình bao và tham số thuộc vị trí,\n"
+"\thoặc hiển thị tên và giá trị của biến trình bao.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-a\tđánh dấu các biến được tạo hay sửa đổi để xuất ra\n"
+"\t\t-b\tthông báo ngay vỠcông việc bị chấm dứt\n"
+"\t\t-e\tthoát ngay nếu câu lệnh thoát với trạng thái khác số không\n"
+"\t\t-f\ttắt chức năng tạo tên tập tin (glob)\n"
+"\t\t-h\tnhớ vị trí của mỗi câu lệnh khi nó được dò tìm\n"
+"\t\t-k\tmá»i đối số gán được đặt vào môi trÆ°á»ng cho má»™t câu lệnh,\n"
+"\t\t\tkhông phải chỉ những đối số nằm trước tên câu lệnh\n"
+"\t\t-m\tbật chức năng Ä‘iá»u khiển công việc\n"
+"\t\t-n\tÄ‘á»c câu lệnh mà không thá»±c thi\n"
+"\t\t-o tên_tùy_chá»n\tđặt biến tÆ°Æ¡ng ứng vá»›i tùy chá»n này:\n"
+"\t\t\t• allexport\tbằng -a\n"
+"\t\t\t• braceexpand\tbằng -B\n"
+"\t\t\t• emacs\tdùng một giao diện chỉnh sửa dòng kiểu emacs\n"
+"\t\t\t• errexit\tbằng -e\n"
+"\t\t\t• errtrace\tbằng -E\n"
+"\t\t\t• functrace\tbằng -T\n"
+"\t\t\t• hashall\tbằng -h\n"
+"\t\t\t• histexpand\tbằng -H\n"
+"\t\t\t• history\tbật lược sử câu lệnh\n"
+"\t\t\t• ignoreeof\ttrình bao sẽ không thoát khi Ä‘á»c ký tá»± kết thúc tập tin\n"
+"\t\t\t• interactive-comments\tcho phép ghi chú trong câu lệnh tương tác\n"
+"\t\t\t• keyword\tbằng -k\n"
+"\t\t\t• monitor\tbằng -m\n"
+"\t\t\t• noclobber\tbằng -C\n"
+"\t\t\t• noexec\tbằng -n\n"
+"\t\t\t• noglob\tbằng -f\n"
+"\t\t\t• nolog\thiện thá»i được chấp nhận nhÆ°ng bị bá» qua\n"
+"\t\t\t• notify\tbằng -b\n"
+"\t\t\t• nounset\tbằng -u\n"
+"\t\t\t• onecmd\tbằng -t\n"
+"\t\t\t• physical\tbằng -P\n"
+"\t\t\t• pipefail\tgiá trị trả lại của một ống dẫn\n"
+"\t\t\t\tlà trạng thái của câu lệnh cuối cùng\n"
+"\t\t\t\tthoát với trạng thái khác số không,\n"
+"\t\t\t\thay số không nếu không có câu lệnh\n"
+"\t\t\t\tthoát với trạng thái khác số không\n"
+"\t\t\t• posix\tthay đổi ứng xử của bash\n"
+"\t\t\t\tmà thao tác mặc định khác với tiêu chuẩn Posix,\n"
+"\t\t\t\tđể tùy theo tiêu chuẩn\n"
+"\t\t\t• privileged\tbằng -p\n"
+"\t\t\t• verbose\tbằng -v\n"
+"\t\t\t• vi\tdùng một giao diện chỉnh sửa kiểu vi\n"
+"\t\t\t• xtrace\tbằng -x\n"
+"\t\t-p\tbật khi nào mã số thật và mã số có kết quả\n"
+"\t\t\tkhông tương ứng với nhau.\n"
+"\t\t\tTắt tính năng xử lý tập tin $ENV\n"
+"\t\t\tvà nhập chức năng trình bao.\n"
+"\t\t\tViệc tắt tùy chá»n này thì gêy ra UID và GID có kết quả\n"
+"\t\t\tđược đặt thành UID và GID thật.\n"
+"\t\t-t\tthoát sau khi Ä‘á»c và thá»±c thi má»™t câu lệnh\n"
+"\t\t-u\txử lý biến chưa đặt là lỗi khi thay thế\n"
+"\t\t-v\tin ra má»—i dòng nhập vào trình bao khi nó được Ä‘á»c\n"
+"\t\t-x\tin ra mỗi câu lệnh và đối số tương ứng\n"
+"\t\t\tkhi nó được thực thi\n"
+"\\t-B\ttrình bao sẽ mở rộng các dấu ngoặc móc\n"
+"\t\t-C\tđặt thì không cho phép ghi Ä‘á» lên tập tin bình thÆ°á»ng\n"
+"\t\t\tđã tồn tại bằng cách chuyển hướng kết xuất\n"
+"\t\t-E\tđặt thì bẫy ERR được chức năng trình bao kế thừa\n"
+"\t\t-H\tbật chức năng thay thế kiểu !\n"
+"\t\t\tCỠnày được đặt theo mặc định khi trình bao tương tác\n"
+"\t\t-P\tđặt thì không theo liên kết tượng trưng\n"
+"\t\t\tkhi thực thi câu lệnh như cd mà chuyển đổi thư mục hiện tại\n"
+"\t\t-T\tđặt thì bẩy DEBUG (gỡ lỗi) được chức năng trình bao kế thừa\n"
+"\t\t-\tgán bất cứ đối số còn lại nào cho những tham số thuộc vị trí.\n"
+"\t\t\tHai tùy chá»n « -x » và « -v » Ä‘á»u bị tắt.\n"
+"\n"
+"\tViệc dùng « + » hơn là « - » thì gây ra các cỠnày bị tắt.\n"
+"\tCác cá» cÅ©ng có thể được dùng khi gá»i trình bao.\n"
+"\tCÅ©ng có thể tìm thấy tập cá» hiện thá»i trong « $- ».\n"
+"\tCác đối số còn lại là tham số thuộc vị trí,\n"
+"\tvà được gán (theo thứ tự) cho $1, $2, .. $n.\n"
+"\tKhông Ä‘Æ°a ra đối số thì in ra má»i biến trình bao.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không gặp tùy chá»n sai."
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+"BỠđặt giá trị và thuộc tính của biến và chức năng của trình bao.\n"
+"\n"
+"\tÄối vá»›i má»—i TÊN, gỡ bá» biến hay chức năng mà tÆ°Æ¡ng ứng.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-f\tÄ‘á»c má»—i TÊN dượi dạng má»™t chức năng trình bao\n"
+"\t\t-v\tÄ‘á»c má»—i TÊN dượi dạng má»™t biến trình bao\n"
+"\n"
+"\tKhông có tùy chá»n thì chức năng bỠđặt sẽ thá»­ bỠđặt má»™t biến,\n"
+"\tvà nếu không thành công, sau đó thử bỠđặt một chức năng.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không Ä‘Æ°a ra tùy chá»n sai, và TÊN không chỉ Ä‘á»c."
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Äặt thuá»™c tính xuất khẩu cho biến trình bao.\n"
+"\n"
+"\tÄánh dấu má»—i TÊN để tá»± Ä‘á»™ng xuất vào môi trÆ°á»ng của câu lệnh được chạy vá» "
+"sau.\n"
+"\tÄÆ°a ra GIÃ_TRỊ thì gán GIÃ_TRỊ trÆ°á»›c khi xuất ra.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-f\ttham chiếu đến chức năng trình bao\n"
+"\t\t-n\tgỡ bá» thuá»™c tính xuất khẩu khá»i má»—i TÊN\n"
+"\t\t-p\thiển thị danh sách các biến và chức năng Ä‘á»u được xuất ra\n"
+"\n"
+"\tÄối số « -- » thì tắt chức năng xá»­ lý tùy chá»n sau nữa.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không Ä‘Æ°a ra tùy chá»n sai hay TÊN sai,"
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+"Äánh dấu biến trình bao không thể thay đổi được.\n"
+"\n"
+"\tÄánh dấu má»—i TÊN là chỉ Ä‘á»c; những giá trị của TÊN nhÆ° vậy\n"
+"\tthì không thay đổi được bất chấp việc gán theo sau.\n"
+"\tÄÆ°a ra GIÃ_TRỊ thì gán GIÃ_TRỊ trÆ°á»›c khi đánh dấu là chỉ Ä‘á»c.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-a\ttham chiếu đến biến kiểu mảng theo số mũ\n"
+"\t\t-A\ttham chiếu đến biến kiểu mảng kết hợp\n"
+"\t\t-f\ttham chiếu đến chức năng trình bao\n"
+"\t\t-p\thiển thị danh sách các biến và chức năng vẫn chỉ Ä‘á»c\n"
+"\n"
+"\tÄối số « -- » thì tắt chức năng xá»­ lý tùy chá»n sau nữa.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không Ä‘Æ°a ra tùy chá»n sai hay TÊN sai."
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+"Dá»i tham số thuá»™c vị trí.\n"
+"\n"
+"\tThay đổi tên của tham số thuộc vị trí $N+1,$N+2 ... đến $1,$2 ...\n"
+"\tKhông đưa ra N thì giả sử nó là 1.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu N không âm hay lớn hơn $#."
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+"Thực thi các câu lệnh từ một tập tin trong trình bao đang chạy.\n"
+"\n"
+"\tÄá»c và thá»±c thi các câu lệnh từ TÊN_TẬP_TIN\n"
+"\ttrong trình bao đang chạy.\n"
+"\tNhững mục nhập trong $PATH được dùng\n"
+"\tđể tìm thư mục chứa tên tập tin này.\n"
+"\tÄÆ°a ra đối số thì má»—i đối số trở thành tham số thuá»™c vị trí\n"
+"\tkhi TÊN_TẬP_TIN được thực thi.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại trạng thái của câu lệnh cuối cùng được thực thi trong "
+"TÊN_TẬP_TIN;\n"
+"\tkhông thành công nếu không thể Ä‘á»c TÊN_TẬP_TIN."
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+"Ngưng chạy trình bao.\n"
+"\n"
+"\tNgưng chạy trình bao này đến khi nó nhận tín hiệu tiếp tục (SIGCONT).\n"
+"\tNếu không ép buộc thì không thể ngưng chạy trình bao kiểu đăng nhập.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-f\tép buộc việc ngưng, thậm chí nếu trình bao có kiểu đăng nhập\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu chức năng Ä‘iá»u khiển công việc đã được bật, và "
+"không gặp lỗi."
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+"Äịnh giá biểu thức Ä‘iá»u kiện.\n"
+"\n"
+"Thoát với trạng thái 0 (đúng) hoặc 1 (sai), phụ thuộc vào phép tính B_THỨC.\n"
+"Biểu thức kiểu nguyên phân hoặc nhị phân cũng được.\n"
+"Biểu thức nguyên phân thÆ°á»ng dùng để kiểm tra trạng thái của tập tin.\n"
+"Cũng có đối số chuỗi, và toán tử so sánh thuộc số.\n"
+" \n"
+" Toán tử tập tin:\n"
+" \n"
+" -a TẬP_TIN Äúng nếu tập tin có phải tồn tại.\n"
+" -b TẬP_TIN Äúng nếu tập tin là đặc biệt vá» khối.\n"
+" -c TẬP_TIN Äúng nếu tập tin là đặc biệt vá» ký tá»±.\n"
+" -d TẬP_TIN Äúng nếu tập tin là má»™t thÆ° mục.\n"
+" -e TẬP_TIN Äúng nếu tập tin có phải tồn tại.\n"
+" -f TẬP_TIN Äúng nếu tập tin có phải tồn tại\n"
+"\t\t\t\t\tcÅ©ng là má»™t tập tin bình thÆ°á»ng.\n"
+" -g TẬP_TIN Äúng nếu tập tin là set-group-id (đặt mã số "
+"nhóm).\n"
+" -h TẬP_TIN Äúng nếu tập tin là má»™t liên kết tượng trÆ°ng.\n"
+" -L TẬP_TIN Äúng nếu tập tin là má»™t liên kết tượng trÆ°ng.\n"
+" -k TẬP_TIN Äúng nếu tập tin có bit « dính » được đặt.\n"
+" -p TẬP_TIN Äúng nếu tập tin là má»™t ống dẫn đặt tên.\n"
+" -r TẬP_TIN Äúng nếu tập tin cho bạn Ä‘á»c được.\n"
+" -s TẬP_TIN Äúng nếu tập tin có phải tồn tại và không phải "
+"rá»—ng.\n"
+" -S TẬP_TIN Äúng nếu tập tin là má»™t ổ cắm.\n"
+" -t FD Äúng nếu FD (bá»™ mô tả tập tin) được mở trên thiết bị "
+"cuối.\n"
+" -u TẬP_TIN Äúng nếu tập tin is set-user-id.\n"
+" -w TẬP_TIN Äúng nếu tập tin cho bạn ghi vào được.\n"
+" -x TẬP_TIN Äúng nếu tập tin cho bạn thá»±c hiện được.\n"
+" -O TẬP_TIN Äúng nếu tập tin được bạn sở hữu má»™t cách hiệu "
+"quả.\n"
+" -G TẬP_TIN Äúng nếu tập tin được nhóm của bạn sở hữu\n"
+"\t\t\t\t\tmột cách hiệu quả.\n"
+" -N TẬP_TIN Äúng nếu tập tin đã bị sá»­a đổi kể từ lần Ä‘á»c cuối "
+"cùng.\n"
+" \n"
+" TẬP_TIN1 -nt TẬP_TIN2 Äúng nếu tập tin 1 má»›i hÆ¡n tập tin 2\n"
+"\t\t(tùy theo ngày sửa đổi)\n"
+" \n"
+" TẬP_TIN1 -ot TẬP_TIN2 Äúng nếu tập tin 1 cÅ© hÆ¡n tập tin 2.\n"
+" \n"
+" TẬP_TIN1 -ef TẬP_TIN2 Äúng nếu tập tin 1 là má»™t liên kết cứng\n"
+"\t\t\t\t\t\ttới tập tin 2.\n"
+" \n"
+" Toán tử chuỗi:\n"
+" \n"
+" -z CHUá»–I Äúng nếu chuá»—i rá»—ng.\n"
+" \n"
+" -n CHUá»–I\n"
+" CHUá»–I Äúng nếu chuá»—i không rá»—ng.\n"
+" \n"
+" CHUá»–I1 = CHUá»–I2\t\tÄúng nếu hai chuá»—i trùng nhau.\n"
+" CHUá»–I1 != CHUá»–I2\tÄúng nếu hai chuá»—i khác nhau.\n"
+" CHUá»–I1 < CHUá»–I2\t\tÄúng nếu CHUá»–I1 sắp xếp đằng trÆ°á»›c CHUá»–I2\n"
+"\t\t\t\t\t\ttheo thứ tự từ điển.\n"
+" CHUá»–I1 > CHUá»–I2\t\tÄúng nếu CHUá»–I1 sắp xếp đằng sau CHUá»–I2\n"
+"\t\t\t\t\t\ttheo thứ tự từ điển.\n"
+" \n"
+" Toán tử khác:\n"
+" \n"
+" -o TÙY_CHỌN Äúng nếu tùy chá»n trình bao này đã được bật.\n"
+" ! B_THỨC Äúng nếu biểu thức này không đúng.\n"
+" B_THỨC1 -a B_THỨC2 \t\tÄúng nếu cả hai biểu thức này là đúng.\n"
+" B_THỨC1 -o B_THỨC2 \t\tÄúng nếu má»™t của hai biểu thức này là đúng.\n"
+" \n"
+" đối_số1 OP đối_số2 \t\tPhép thá»­ số há»c. OP là má»™t của:\n"
+"\t\t-eq\t\tbằng\n"
+"\t\t-ne\t\tkhông bằng\n"
+" \t-lt\t\tnhỠhơn\n"
+"\t\t-le\t\tnhỠhơn hoặc bằng\n"
+"\t\t-gt\t\tlớn hơn\n"
+"\t\t-ge\t\tlớn hơn hoặc bằng\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu B_THỨC định giá thành Äúng;\n"
+"\tkhông thành công nếu B_THỨC định giá thành Sai hay đưa ra đối số sai."
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+"Äịnh giá biểu thức Ä‘iá»u kiện.\n"
+"\n"
+"\tÄây là má»™t từ đồng nghÄ©a vá»›i dá»±ng sẵn « test »,\n"
+"\tnhưng đối số cuối cùng phải là một « ] » nghĩa chữ,\n"
+"\tđổ tương ứng với « [ » mở."
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+"Hiển thị thá»i lượng chạy tiến trình.\n"
+"\n"
+"\tIn ra thá»i lượng chạy trình bao (và các tiến trình con)\n"
+"\t\tđối vá»›i hệ thống và má»—i ngÆ°á»i dùng.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tLúc nào cũng thành công."
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+"Bắt các tín hiệu và dữ kiện khác.\n"
+"\n"
+"\tXác định và kích hoạt các bộ xử lý cần chạy khi trình bao\n"
+"\tnhận được tín hiệu hay Ä‘iá»u kiện khác.\n"
+"\n"
+"\tÄá»I_Sá» là má»™t câu lệnh cần Ä‘á»c và thá»±c thi khi trình bao\n"
+"\tnhận được (các) tín hiệu ÄẶC_TẢ_TÃN_HIỆU.\n"
+"\tNếu không Ä‘Æ°a ra Äá»I_Sá»\n"
+"\t(và cung cấp chỉ má»™t ÄẶC_TẢ_TÃN_HIỆU riêng lẻ),\n"
+"\thoặc đưa ra « - », mỗi tín hiệu được ghi rõ\n"
+"\tthì được đặt lại vỠgiá trị gốc.\n"
+"\tNếu Äá»I_Sá» là chuá»—i vô giá trị\n"
+"\tthì má»—i ÄẶC_TẢ_TÃN_HIỆU bị bá» qua\n"
+"\tbởi trình bao và những câu lệnh nó gá»i.\n"
+"\n"
+"\tNếu Ä‘Æ°a ra má»™t ÄẶC_TẢ_TÃN_HIỆU là EXIT (0),\n"
+"\tthì Äá»I_SỠđược thá»±c thi khi thoát khá»i trình bao.\n"
+"\tNếu Ä‘Æ°a ra má»™t ÄẶC_TẢ_TÃN_HIỆU là DEBUG,\n"
+"\tÄá»I_SỠđược thá»±c thi đằng trÆ°á»›c má»—i câu lệnh Ä‘Æ¡n giản.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-l\tin ra danh sách các tên tín hiệu và số thứ tự tương ứng\n"
+"\t\t-p\thiển thị các câu lệnh bắt tÆ°Æ¡ng ứng vá»›i má»—i ÄẶC_TẢ_TÃN_HIỆU\n"
+"\n"
+"\tMá»—i ÄẶC_TẢ_TÃN_HIỆU là hoặc má»™t tên tín hiệu trong <signal.h>,\n"
+"\thoặc một số thứ tự tín hiệu.\n"
+"\tTên tín hiệu không phân biệt chữ hoa/thÆ°á»ng,\n"
+"\tvà không bắt buá»™c phải dùng tiá»n tố « SIG ».\n"
+"\tCó thể gửi cho trình bao một tín hiệu,\n"
+"\tdùng « kill -signal $$ ».\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không Ä‘Æ°a ra ÄẶC_TẢ_TÃN_HIỆU sai\n"
+"\thay tùy chá»n sai."
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+"Hiển thị thông tin vỠkiểu câu lệnh.\n"
+"\n"
+"\tÄối vá»›i má»—i TÊN, ngụ ý nó sẽ được giải thích nhÆ° thế nào\n"
+"\t\tnếu nó được dùng dưới dạng một tên câu lệnh.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-a\thiển thị má»i vị trí chứa tập tin thá»±c thi được có TÊN;\n"
+"\t\t\tkhông đặt tùy chá»n « -p » thì cÅ©ng bao gồm\n"
+"\t\t\tcác bí danh, dựng sẵn và chức năng.\n"
+"\t\t-f\tthu hồi tính năng dò tìm chức năng trình bao\n"
+"\t\t-P\tép buá»™c tìm kiếm ÄƯỜNG_DẪN đối vá»›i má»—i TÊN,\n"
+"\t\t\tthậm chí nếu nó là bí danh, dựng sẵn hay chức năng,\n"
+"\t\t\tvà trả lại tên của tập tin trên đĩa mà sẽ được thực thi\n"
+"\t\t-p\ttrả lại hoặc tên của tập tin trên đĩa mà sẽ được thực thi,\n"
+"\t\t\thoặc không trả lại gì nếu câu lệnh « type -t TÊN »\n"
+"\t\t\tsẽ không trả lại « file » (tập tin).\n"
+"\t\t-t\txuất một từ riêng lẻ mà một của:\n"
+"\t\t\t• alias\tbí danh\n"
+"\t\t\t• keyword\ttừ dành riêng của trình bao\n"
+"\t\t\t• function\tchức năng của trình bao\n"
+"\t\t\t• builtin\tdựng sẵn của trình bao\n"
+"\t\t\t• file\ttập tin trên đĩa\n"
+"\t\t\t• \t\t(không gì) không tìm thấy\n"
+"\n"
+"\tÄối số :\n"
+"\tTÊN\ttên câu lệnh cần giải thích.\n"
+"\n"
+"\tTráng thái thoát:\n"
+"\tTrả lại thành công nếu tìm thấy tất cả các TÊN; không thì bị lỗi."
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Sửa đổi các giới hạn tài nguyên trình bao.\n"
+"\n"
+"\tCung cấp Ä‘iá»u khiển vá»›i các tài nguyên sẵn sàng\n"
+"\tcho trình bao và các tiến trình được nó tạo,\n"
+"\ttrên hệ thống cho phép Ä‘iá»u khiển nhÆ° vậy.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-S\tdùng giá»›i hạn tài nguyên « soft » (má»m)\n"
+"\t\t-H\tdùng giới hạn tài nguyên « hard » (cứng)\n"
+"\t\t-a\tthông báo má»i giá»›i hạn hiện thá»i\n"
+"\t\t-b\tkích cỡ của vùng đệm ổ cắm\n"
+"\t\t-c\tkích cỡ tối đa của tập tin lõi được tạo\n"
+"\t\t-d\tkích cỡ tối đa của từng đoạn dữ liệu của một tiến trình\n"
+"\t\t-e\tmức Æ°u tiên cao nhất khi định thá»i (« nice »)\n"
+"\t\t-f\tkích cỡ tối đa của của tập tin được ghi bởi trình bao\n"
+"\t\t\tvà các tiến trình con của nó\n"
+"\t\t-i\tsố tối đa các tín hiệu bị hoãn\n"
+"\t\t-l\tkích cỡ tối đa mà một tiến trình có thể khoá vào bộ nhớ\n"
+"\t\t-m\tkích cỡ tối đa của tập hợp nội trú\n"
+"\t\t-n\tsố tối đa các bộ mô tả tập tin còn mở\n"
+"\t\t-p\tkích cỡ của vùng đệm ống dẫn\n"
+"\t\t-q\tsố tối đa các byte trong hàng đợi thông điệp POSIX\n"
+"\t\t-r\tmức Æ°u tiên cao nhất khi định thá»i thật\n"
+"\t\t-s\tkích cỡ tối đa của đống\n"
+"\t\t-t\tthá»i gian CPU lâu nhất, theo giây\n"
+"\t\t-u\tsố tối Ä‘a các tiến trình của ngÆ°á»i dùng\n"
+"\t\t-v\tkích cỡ của bộ nhớ ảo\n"
+"\t\tsố tối đa các khoá tập tin\n"
+"\n"
+"\tNếu đưa ra GIỚI_HẠN thì nó là giá trị mới của tài nguyên được ghi rõ ;\n"
+"\tcũng có ba giá trị GIỚI_HẠN đặc biệt:\n"
+"\t\t• soft\tgiá»›i hạn má»m hiện thá»i\n"
+"\t\t• hard\tgiá»›i hạn cứng hiện thá»i\n"
+"\t\t• unlimited\tvô hạn\n"
+"\tKhông thì in ra giá trị hiện thá»i của tài nguyên được ghi rõ.\n"
+"\tKhông Ä‘Æ°a ra tùy chá»n thì giả sá»­ « -f ».\n"
+"\n"
+"\tGiá trị được ghi rõ theo bước 1024-byte, trừ :\n"
+"\t\t• -t\ttheo giây\n"
+"\t\t• -p\ttheo bước 512-byte\n"
+"\t\t• -u\tsố các tiến trình không theo tỷ lệ\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không Ä‘Æ°a ra tùy chá»n sai hay gặp lá»—i."
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+"Hiển thị hoặc đặt mặt nạ chế độ tập tin.\n"
+"\n"
+"\tÄặt mặt nạ (bá»™ lá»c) tạo tập tin của ngÆ°á»i dùng thành CHẾ_ÄỘ.\n"
+"\t\tKhông Ä‘Æ°a ra CHẾ_ÄỘ thì in ra giá trị hiện thá»i của mặt nạ.\n"
+"\n"
+"\tNếu CHẾ_ÄỘ bắt đầu vá»›i má»™t chữ số, nó được Ä‘á»c là má»™t số bát phân;\n"
+"\t\tkhông thì nó là một chuỗi chế độ tượng trưng\n"
+"\t\tgiống như chuỗi được chmod(1) chấp nhận.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-p\tkhông Ä‘Æ°a ra CHẾ_ÄỘ thì xuất theo má»™t định dạng\n"
+"\t\t\tcó thể được dùng lại làm dữ liệu nhập vào\n"
+"\t\t-S\tlàm cho kết xuất cũng tượng trưng,\n"
+"\t\t\tkhông thì xuất một số bát phân\n"
+"\n"
+"\tTráng thái thoát:\n"
+"\tTrả lại thành công nếu không có CHẾ_ÄỘ sai hay tùy chá»n sai."
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Äợi công việc chạy xong, sau đó trả lại trạng thái thoát.\n"
+"\n"
+"\tÄợi tiến trình được ID nhận diện, mà có thể là má»™t mã số tiến trình\n"
+"\t\thay một đặc tả công việc, sau đó trả lại trạng thái chấm dứt của nó.\n"
+"\t\tKhông đưa ra ID thì đợi tất cả các tiến trình con đang chạy,\n"
+"\t\tvà trạng thái trả lại là số không.\n"
+"\t\tNếu ID là một đặc tả công việc thì đợi tất cả các tiến trình\n"
+"\t\tvẫn nằm trong ống dẫn của công việc đó.\n"
+"\n"
+"\tTráng thái thoát:\n"
+"\tTrả lại trạng thái của ID; không thành công nếu ID sai\n"
+"\t\thoặc Ä‘Æ°a ra tùy chá»n sai."
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+"Äợi tiến trình chạy xong, sau đó thông báo trạng thái thoát của nó.\n"
+"\n"
+"\tÄợi tiến trình đã ghi rõ,\n"
+"\tsau đó thông báo trạng thái chấm dứt của nó.\n"
+"\tNếu không đưa ra PID (mã số tiến trình)\n"
+"\tthì đợi tất cả các tiến trình con đang chạy,\n"
+"\tvà mã trả lại là số không.\n"
+"\tPID phải là một mã số tiến trình.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại trạng thái của ID (mã số);\n"
+"\tkhông thành công nếu ID sai,\n"
+"\thoặc nếu Ä‘Æ°a ra tùy chá»n sai."
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Thực thi câu lệnh cho mỗi bộ phận trong một danh sách.\n"
+"\n"
+"\tVòng lặp « for » (cho) thì thực thi câu lệnh\n"
+"\tcho mỗi bộ phận trong một danh sách các mục.\n"
+"\tKhông Ä‘Æ°a ra « in CÃC_TỪ ... » thì giả sá»­ « in \"$@\" ».\n"
+"\tÄối vá»›i má»—i phần tá»­ trong CÃC_TỪ,\n"
+"\tTÊN được đặt thành phần tử đó,\n"
+"\tvà các câu LỆNH được thực thi.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại trạng thái của câu lệnh cuối cùng được chạy."
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Số há»c cho vòng lặp.\n"
+"\n"
+"\tTÆ°Æ¡ng Ä‘Æ°Æ¡ng vá»›i:\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+"EXP1, EXP2, EXP3 là biểu thức số há»c.\n"
+"BỠsót biểu thức nào thì ứng xử như nó tính là 1.\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại trạng thái của câu lệnh cuối cùng được chạy."
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Chá»n từ trong má»™t danh sách, và thá»±c thi câu lệnh.\n"
+"\n"
+"WORDS được mở rộng, mà tạo một danh sách các từ.\n"
+"Tập hợp các từ đã mở rộng được in trên đầu lỗi tiêu chuẩn.\n"
+"\tmỗi từ có con số đi trước.\n"
+"Không có « in WORDS » thì giả sử « in \"$@\" ».\n"
+"Dấu nhắc PS3 thì được hiển thị, và má»™t dòng được Ä‘á»c\n"
+"\ttừ đầu vào tiêu chuẩn.\n"
+"Nếu dòng này là số tương ứng với một của những từ được hiển thị,\n"
+"\tTÊN sẽ được đặt thành từ đó.\n"
+"Dòng rỗng thì hiển thị lại WORDS và dấu nhắc.\n"
+"Äá»c kết thúc tập tin thì chạy xong câu lệnh đó.\n"
+"Bất cứ giá trị khác nào được Ä‘á»c sẽ gây ra TÊN được đặt thành vô giá trị.\n"
+"Dòng được Ä‘á»c sẽ được lÆ°u lại vào biến REPLY (trả lá»i).\n"
+"Các CÂU_LỆNH được thá»±c hiện sau khi chá»n má»—i đồ,\n"
+"\tđến khi một lệnh gián đoạn được thực hiện.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại trạng thái của câu lệnh cuối cùng được chạy."
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+"Thông báo thá»i gian được chiếm khi ống dẫn thá»±c thi.\n"
+"\n"
+"\tThá»±c thi PIPELINE (ống dẫn) và in ra bản tóm tắt thá»i gian thật,\n"
+"\tthá»i gian CPU của ngÆ°á»i dùng, và thá»i gian CPU của hệ thống\n"
+"\t00 chiếm khi thực thi ống dẫn, khi ống dẫn chấm dứt.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-p\tin ra bản tóm tắt đếm thá»i gian\n"
+"\t\t\ttheo định dạng POSIX có thể mang theo\n"
+"\n"
+"\tGiá trị của biến TIMEFORMAT (định dạng thá»i gian)\n"
+"\tđược dùng làm định dạng kết xuất.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrạng thái trả lai là trạng thái trả lại của PIPELINE."
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Thức thi câu lệnh dựa vào khớp mẫu.\n"
+"\n"
+"\tThá»±c thi các câu LỆNH má»™t cách chá»n lá»c,\n"
+"\tdựa vào TỪ tương ứng với MẪU.\n"
+"\tNhiá»u mẫu định giá»›i bằng « | ».\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại trạng thái của câu lệnh cuối cùng được chạy."
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Thá»±c thi câu lệnh dá»±a vào Ä‘iá»u kiện.\n"
+"\n"
+"\tDanh sách « if LỆNH » được thực thi.\n"
+"\tNếu trạng thái thoát của nó là số không,\n"
+"\tthì danh sách « then LỆNH » được thực thi.\n"
+"\tKhông thì mỗi danh sách « elif LỆNH » được thực thi lần lượt,\n"
+"\tvà nếu trạng thái thoát của nó là số không,\n"
+"\tthì danh sách « then LỆNH » tương ứng được thực thi\n"
+"\tvà câu lệnh « nếu » (if) sẽ chạy xong.\n"
+"\tKhông thì danh sách « else LỆNH » được thực thi, nếu có.\n"
+"\tTrạng thái thoát của toàn bộ tạo dựng\n"
+"\tlà trạng thái của câu lệnh cuối cùng được chạy,\n"
+"\thoặc số không nếu không có Ä‘iá»u kiện có kết quả là Äúng.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại trạng thái của câu lệnh cuối cùng được chạy."
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Thực thi câu lệnh miễn là một phép thử thành công.\n"
+"\n"
+"\tMở rộng và thực thi các câu LỆNH miễn là câu lệnh cuối cùng\n"
+"\ttrong những câu LỆNH « while » (trong khi)\n"
+"\tcó trạng thái thoát là số không.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại trạng thái của câu lệnh cuối cùng được chạy."
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Thực thi câu lệnh miễn là một phép thử không thành công.\n"
+"\n"
+"\tMở rộng và thực thi các câu LỆNH miễn là câu lệnh cuối cùng\n"
+"\ttrong các câu LỆNH « until » (đến khi) có trạng thái thoát\n"
+"\tkhác số không.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại trạng thái của câu lệnh cuối cùng được chạy."
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+"Tạo một tiến trình đồng chạy có tên TÊN.\n"
+"\n"
+"\tThực hiện câu LỆNH một cách không đồng bộ, có đầu và tiêu chuẩn\n"
+"\tvà đầu ra tiêu chuẩn của câu lệnh này được kết nối thông qua một ống dẫn\n"
+"\ttới các bộ mô tả tập tin được gán cho chỉ số 0 và 1 của một biến mảng TÊN\n"
+"\ttrong trình bao đang chạy.\n"
+"\tTên mặc định là « COPROC ».\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại trạng thái thoát của câu LỆNH."
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+"Xác định chức năng trình bao.\n"
+"\n"
+"\tTạo một chức năng trình bao có TÊN.\n"
+"\tKhi được gá»i dÆ°á»›i dạng má»™t câu lệnh Ä‘Æ¡n giản,\n"
+"\tTÊN chạy các câu LỆNH theo ngữ cảnh của trình bao Ä‘ang gá»i.\n"
+"\tKhi TÊN được gá»i, các đối số được gá»­i cho chức năng dÆ°á»›i dạng $1...$n,\n"
+"\tvà tên chức năng nằm trong $FUNCNAME.\n"
+"\n"
+"\tTráng thái thoát:\n"
+"\tTrả lại thành công nếu TÊN không phải chỉ Ä‘á»c."
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+"Nhóm lại các câu lệnh làm cùng một đơn vị.\n"
+"\n"
+"\tChạy một tập hợp các câu lệnh trong cùng một nhóm.\n"
+"\tÄây là má»™t phÆ°Æ¡ng pháp chuyển hÆ°á»›ng\n"
+"\tmột tập hợp câu lệnh hoàn toàn.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại trạng thái của câu lệnh cuối cùng được chạy."
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+"Tiếp tục lại công việc ở trước.\n"
+"\n"
+"\tTÆ°Æ¡ng Ä‘Æ°Æ¡ng vá»›i đối số ÄẶC_TẢ_CÔNG_VIỆC vá»›i câu lệnh « fg ».\n"
+"\tTiếp tục lai má»™t công việc bị dừng chạy hay chạy vá» ná»n.\n"
+"\tÄẶC_TẢ_CÔNG_VIỆC có thể ghi rõ hoặc má»™t tên công việc,\n"
+"\thoặc một số thứ tự công việc.\n"
+"\tÄặt má»™t « & » theo sau ÄẶC_TẢ_CÔNG_VIỆC sẽ đặt công việc vá» ná»n,\n"
+"\tnhư là đặc tả công việc đã được cung cấp dưới dạng một đối số với « bg ».\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại trạng thái của công việc đã tiếp tục lại."
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+"Äịnh giá biểut thức số há»c.\n"
+"\n"
+"\tBIỂU_THỨC được tính tùy theo các quy tắc vỠđịnh giá số há»c.\n"
+"\tTương đương với « let BIỂU_THỨC ».\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại 1 nếu BIỂU_THỨC tính là 0; không thì trả lại 0."
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+"Thá»±c thi câu lệnh Ä‘iá»u kiện.\n"
+"\n"
+"Trả vỠtrạng thái 0 hoặc 1, phụ thuộc vào phép tính\n"
+"\tbiểu thức Ä‘iá»u kiện BIỂU_THỨC.\n"
+"Biểu thức chứa cùng những nguyên sơ được dùng bởi dựng sẵn « test »,\n"
+"\tvà có thể được tổ hợp dùng các toán tử theo đây:\n"
+" \n"
+" \t( BIỂU_THỨC )\tTrả vỠgiá trị của BIỂU_THỨC\n"
+" \t! BIỂU_THỨC\tÄúng nếu BIỂU_THỨC là không đúng; không thì sai\n"
+" \tB_THỨC1 && B_THỨC2\n"
+"\tÄúng nếu cả hai B_THỨC1 và B_THỨC2 Ä‘á»u là đúng; không thì sai\n"
+" \tB_THỨC1 || B_THỨC2\n"
+"\tÄúng nếu má»™t của B_THỨC1 và B_THỨC2 là đúng; không thì sai\n"
+" \n"
+"Khi dùng toán từ « == » và « != », chuỗi bên phải toán tử được dùng làm "
+"mẫu,\n"
+"\tvà thực hiện chức năng khớp mẫu.\n"
+"Toán tử « && » và « || » không tính B_THỨC2 nếu B_THỨC1 là đủ\n"
+"\tđể tính giá trị của biểu thức.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\t0 hay 1 phụ thuộc vào giá trị của BIỂU_THỨC."
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+"Tên và sá»­ dụng của má»—i biến trình bao thÆ°á»ng dùng.\n"
+"\n"
+"BASH_VERSION\tThông tin phiên bản vá» phần má»m Bash này.\n"
+" CDPATH\tDanh sách các thư mục định giới bằng dấu hai chấm,\n"
+"\tqua đó cần tìm kiếm thư mục được đưa ra dạng đối số với « cd ».\n"
+" GLOBIGNORE\tDanh sách các mẫu định giới bằng dấu hai chấm,\n"
+"\tmà diá»…n tả các tên tập tin cần bá» qua khi mở rá»™ng tên Ä‘Æ°á»ng dẫn.\n"
+" HISTFILE\tTên của tập tin chứa lịch sử câu lệnh của bạn.\n"
+" HISTFILESIZE\tSố tối đa các dòng có thể được tập tin này chứa.\n"
+" HISTSIZE\tSố tối đa các dòng lịch sử mà trình bao đang chạy có thể truy "
+"cập.\n"
+" HOME\tTên Ä‘Æ°á»ng dẫn đầy đủ đến thÆ° mục đăng nhập của bạn.\n"
+" HOSTNAME\tTên của máy chủ hiện thá»i của bạn.\n"
+" HOSTTYPE\tKiểu CPU dưới đó phiên bản Bash này đang chạy.\n"
+" IGNOREEOF\tÄiá»u khiển ứng xá»­ của trình bao khi nhận\n"
+"\tký tự kết thúc tập tin (EOF) là dữ liệu nhập độc nhất.\n"
+"\tÄặt thì giá trị của nó là số ký tá»± EOF có thể gặp liên tục\n"
+"\ttrên một dòng rỗng trước khi trình bao sẽ thoát (mặc định là 10).\n"
+"\tKhông đặt thì EOF sẽ cũng kết thúc nhập vào.\n"
+" MACHTYPE\tMá»™t chuá»—i diá»…n tả hệ thống hiện thá»i trên đó Bash Ä‘ang chạy.\n"
+" MAILCHECK\tKhoảng thá»i gian, theo giây, giữa hai lần Bash kiểm tra\n"
+"\tcó thư mới chưa.\n"
+" MAILPATH\tDanh sách các tên tập tin định giới bằng dấu hai chấm\n"
+"\ttrong đó Bash kiểm tra có thư mới chưa.\n"
+" OSTYPE\tPhiên bản UNIX trên đó Bash này đang chạy.\n"
+" PATH\tDanh sách các thư mục định giới bằng dấu hai chấm,\n"
+"\tqua đó cần tìm kiếm câu lệnh.\n"
+" PROMPT_COMMAND\tMột câu lệnh cần thực hiện trước khi in ra\n"
+"\tmỗi chuỗi nhắc chính.\n"
+" PS1\t\tChuỗi nhắc chính.\n"
+" PS2\t\tChuỗi nhắc phụ.\n"
+" PWD\t\tTên Ä‘Æ°á»ng dẫn đầy đủ của thÆ° mục hiện tại.\n"
+" SHELLOPTS\tDanh sách các tùy chá»n trình bao đã hiệu lá»±c\n"
+"\tđịnh giới bằng dấu hai chấm.\n"
+" TERM\tTên của kiểu thiết bị cuối hiện thá»i.\n"
+" TIMEFORMAT\tÄịnh dạng kết xuất cho thống kê đếm thá»i gian\n"
+"\tđược hiển thị bởi từ dành riêng « time ».\n"
+" auto_resume\tCó giá trị thì trước tiên tìm một từ lệnh xuất hiện một "
+"mình\n"
+"\ttrên một dòng, trong danh sách các công việc bị dừng chạy.\n"
+"\tTìm được thì đặt công việc đó vào trước.\n"
+"\tGiá trị « exact » (chính xác) có nghĩa là từ lệnh phải tương ứng\n"
+"\tchính xác với một câu lệnh trong danh sách các công việc bị dừng chạy.\n"
+"\tGiá trị « substring » (chuỗi phụ) có nghĩa là từ lệnh phải tương ứng\n"
+"\tvới một chuỗi phụ của công việc đó.\n"
+" histchars\tCác ký tá»± Ä‘iá»u khiển mở rá»™ng và thay thế nhanh lịch sá»­.\n"
+"\tKý tá»± đầu tiên thÆ°á»ng là ký tá»± thay thế lịch sá»­, thÆ°á»ng là « ! ».\n"
+"\tKý tá»± thứ hai là ký tá»± thay thế nhanh, thÆ°á»ng là « ^ ».\n"
+"\tKý tá»± thứ ba là ký tá»± ghi chú vá» lịch sá»­, thÆ°á»ng là « # ».\n"
+" HISTIGNORE\tDanh sách các mẫu định giới bằng dấu hai chấm,\n"
+"\tđược ùng để quyết định những câu lệnh nào nên được lưu\n"
+"\tvào danh sách lịch sử.\n"
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Thêm thư mục vào đống.\n"
+"\n"
+"Thêm một thư mục vào đầu của đống thư mục, hoặc xoay đống,\n"
+"\tlàm cho thÆ° mục má»›i đầu đống là thÆ° mục làm việc hiện thá»i.\n"
+"Không có đối số thì trao đổi hai thư mục đầu.\n"
+"\n"
+"+N\tXoay đống để thư mục thứ N (đếm từ bên trái danh sách\n"
+"\tđược hiển thị bằng « dirs », bắt đầu từ số không) dá»i lên đầu.\n"
+"\n"
+"-N\tXoay đống để thư mục thứ N (đếm từ bên phải danh sách\n"
+"\tđược hiển thị bằng « dirs », bắt đầu từ số không) dá»i lên đầu.\n"
+"\n"
+"-n\tThu hồi chức năng chuyển đổi bình thÆ°á»ng khi thêm thÆ° mục\n"
+"\tvào đống, để thao tác chỉ đống.\n"
+"\n"
+"dir\tThêm T_MỤC vào đầu đống thư mục, làm cho nó là thư mục\n"
+"\tlàm việc hiện thá»i má»›i.\n"
+"\n"
+"Dựng sẵn « dirs » thì hiển thị đống thư mục.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không đưa ra đối số sai,\n"
+"\tcũng không sai chuyển đổi thư mục."
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+"Gỡ bá» thÆ° mục khá»i đống.\n"
+"\n"
+"Gỡ bá» thÆ° mục khá»i đống thÆ° mục.\n"
+"Không có đối số thì gỡ bá» thÆ° mục đầu khá»i đống,\n"
+"\tvà cd (chuyển đổi thư mục) sang thư mục đầu mới.\n"
+"\n"
+"+N\tGỡ bỠthư mục thứ N (đếm từ bên trái danh sách\n"
+"\tđược hiển thị bằng « dirs », bắt đầu từ số không).\n"
+"\tVí dụ :\n"
+"\t\tpopd +0\t\tgỡ bỠthư mục cuối cùng\n"
+"\t\tpopd +1\t\tgỡ bỠthư mục thứ hai.\n"
+"\n"
+"-N\tGỡ bỠthư mục thứ N (đếm từ bên phải danh sách\n"
+"\tđược hiển thị bằng « dirs », bắt đầu từ số không).\n"
+"\tVí dụ :\n"
+"\t\tpopd -0\t\tgỡ bỠthư mục cuối cùng\n"
+"\t\tpopd -1\t\tgỡ bỠthư mục giáp cuối.\n"
+"\n"
+"-n\tThu hồi chức năng chuyển đổi bình thÆ°á»ng khi gỡ bá» thÆ° mục\n"
+"\tkhá»i đống, để thao tác chỉ đống.\n"
+"\n"
+"Dựng sẵn « dirs » thì hiển thị đống thư mục.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không đưa ra đối số sai,\n"
+"\tcũng không sai chuyển đổi thư mục."
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Hiển thị đống thư mục.\n"
+"\n"
+"\tHiển thị danh sách các thÆ° mục được nhá»› hiện thá»i.\n"
+"\tCâu lệnh « pushd » sẽ thêm thư mục vào danh sách;\n"
+"\tcâu lệnh « popd » cũng nâng thư mục lên danh sách.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-c\tgá»™t đống thÆ° mục bằng cách xoá má»i phần tá»­\n"
+"\t\t₫l\tđừng in a phiên bản thư mục có dấu ngã\n"
+"\t\t\t(tÆ°Æ¡ng đối so vá»›i thÆ° mục chính của ngÆ°á»i dùng)\n"
+"\t\t-p\tin ra đống thư mục, mỗi dòng một mục\n"
+"\t\t-v\tin ra đống thư mục, mỗi dòng một mục,\n"
+"\t\t\tvá»›i tiá»n tố là vị trí trong đống\n"
+"\n"
+"\tÄối số :\n"
+"\t\t+N\thiển thị mục thứ N bắt đầu từ bên trái danh sách\n"
+"\t\t\tđược hiển thị bằng « dirs »\n"
+"\t\t\tkhi được gá»i mà không Ä‘Æ°a ra tùy chá»n,\n"
+"\t\t\tbắt đầu từ số không.\n"
+"\n"
+"\t\t-N\thiển thị mục thứ N bắt đầu từ bên phải danh sách\n"
+"\t\t\tđược hiển thị bằng « dirs »\n"
+"\t\t\tkhi được gá»i mà không Ä‘Æ°a ra tùy chá»n,\n"
+"\t\t\tbắt đầu từ số không.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không Ä‘Æ°a ra tùy chá»n sai hay gặp lá»—i."
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+"Äặt và bỠđặt các tùy chá»n trình bao.\n"
+"\n"
+"\tThay đổi thiết lập của má»—i tùy chá»n trình bao có TÊN_TÙY_CHỌN.\n"
+"\tKhông có đối số tùy chá»n thì liệt kê tất cả các tùy chá»n trình bao,\n"
+"\tcÅ©ng ngụ ý má»—i tùy chá»n được đặt hay không.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-o\thạn chế TÊN_TÙY_CHỌN thành những tên được xác định\n"
+"\t\tđể sử dụng với « set -o »\n"
+"\t\t-p\tin ra má»—i tùy chá»n trình bao, cÅ©ng ngụ ý trạng thái của nó\n"
+"\t\t-q\tthu hồi kết xuất\n"
+"\t\t-u\ttắt (bỠđặt) mỗi TÊN_TÙY_CHỌN\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu TÊN_TÙY_CHỌN được bật;\n"
+"\tkhông thành công nếu Ä‘Æ°a ra tùy chá»n sai hay TÊN_TÙY_CHỌN bị tắt."
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+"Äịnh dạng và in ra các Äá»I_Sá» tùy theo ÄỊNH_DẠNG.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-v BIẾN\tgán kết xuất cho biến trình bao này,\n"
+"\t\t\thơn là hiển thị nó trên đầu ra tiêu chuẩn\n"
+"\n"
+"\tÄỊNH_DẠNG là má»™t chuá»—i ký tá»± mà chứa ba kiểu đối tượng:\n"
+"\t\t• ký tá»± bình thÆ°á»ng\tđược sao chép sang đầu ra tiêu chuẩn\n"
+"\t\t• dãy ký tự thoát\t00 chuyển đổi và sao chép sang đầu ra tiêu chuẩn\n"
+"\t\tđặc tả định dạng\tmỗi đặc tả gây ra in đối số kế tiếp.\n"
+"\n"
+"\tThêm vào đặc tả định dạng tiêu chuẩn được diễn tả\n"
+"\ttrong printf(1) và printf(3), printf Ä‘á»c được:\n"
+"\n"
+"\t\t%b\tmở rộng dãy thoát kiểu gạch chéo ngược trong đối số tương ứng\n"
+"\t\t%q\ttrích dẫn đối số bằng một cách có thể dùng lại được\n"
+"\t\t\tlàm dữ liệu nhập vào trình bao\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không Ä‘Æ°a ra tùy chá»n sai hay gặp lá»—i kiểu ghi hay "
+"gán."
+
+#: builtins.c:1895
+#, fuzzy
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Ghi rõ Readline sẽ Ä‘iá»n nốt các đối số nhÆ° thế nào.\n"
+"\n"
+"\tÄối vá»›i má»—i TÊN, ghi rõ các đối số sẽ được Ä‘iá»n nốt nhÆ° thế nào.\n"
+"\tKhông Ä‘Æ°a ra tùy chá»n thì in ra các đặc tả Ä‘iá»n nốt\n"
+"\tbằng một cách cho phép dùng lại đặc tả làm dữ liệu nhập vào.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-p\tin ra các đặc tả Ä‘iá»n nốt đã tồn tại theo má»™t định dạng\n"
+"\t\t\tcó thể dùng lại được\n"
+"\t\t-r\tgỡ bá» má»™t đặc tả Ä‘iá»n nốt cho má»—i TÊN,\n"
+"\t\t\thoặc nếu không Ä‘Æ°a ra TÊN thì gỡ bá» tất cả các đặc tả Ä‘iá»n nốt\n"
+"\n"
+"\tKhi chức năng Ä‘iá»n nốt được thá»­, những hành Ä‘á»™ng được làm\n"
+"\t\ttheo thứ tá»± của những tùy chá»n chữ hoa bên trên.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không Ä‘Æ°a ra tùy chá»n sai hay gặp lá»—i."
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+"Hiển thị các việc Ä‘iá»n nốt có thể làm, phụ thuá»™c vào những tùy chá»n.\n"
+"\n"
+"\tDự định dùng từ bên trong một chức năng trình bao\n"
+"\tmà tạo các việc Ä‘iá»n nốt có thể làm.\n"
+"\tNếu Ä‘Æ°a ra đối số TỪ vẫn tùy chá»n,\n"
+"\tthì tạo các kết quả tương ứng với TỪ.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không Ä‘Æ°a ra tùy chá»n sai hay gặp lá»—i."
+
+#: builtins.c:1938
+#, fuzzy
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+"Sá»­a đổi hoặc hiển thị các tùy chá»n Ä‘iá»n nốt.\n"
+"\n"
+"\tSá»­a đổi các tùy chá»n Ä‘iá»n nốt đối vá»›i má»—i TÊN,\n"
+"\thoặc nếu không Ä‘Æ°a ra TÊN thì chức năng Ä‘iá»n nốt Ä‘ang chạy.\n"
+"\tKhông Ä‘Æ°a ra tùy chá»n thì in ra các tùy chá»n Ä‘iá»n nốt\n"
+"\tđối vá»›i má»—i TÊN hay đặc tả Ä‘iá»n nốt hiện thá»i.\n"
+"\n"
+"\tTùy chá»n\"\n"
+"\t\t-o tùy_chá»n\tđặt tùy chá»n Ä‘iá»n nốt này đối vá»›i má»—i TÊN\n"
+"\n"
+"\tDùng « +o » thay cho « -o » thì tắt tùy chá»n Ä‘Æ°a ra.\n"
+"\n"
+"\tÄối số :\n"
+"\n"
+"\tMá»—i TÊN tham chiếu đến má»™t câu lệnh cho đó má»™t đặc tả Ä‘iá»n nốt\n"
+"\tphải được xác định trước dùng dựng sẵn « complete ».\n"
+"\tKhông Ä‘Æ°a ra TÊN thì « compopt » phải được gá»i\n"
+"\tbởi má»™t chức năng Ä‘ang tạo việc Ä‘iá»n nốt,\n"
+"\tcác tùy chá»n vá» hàm tạo việc Ä‘iá»n nốt Ä‘ang chạy cÅ©ng được sá»­a đổi.\n"
+"\n"
+"\tTrạng thái thoát:\n"
+"\tTrả lại thành công nếu không Ä‘Æ°a ra tùy chá»n sai,\n"
+"\tvà TÊN có má»™t đặc tả Ä‘iá»n nốt được xác định."
+
+#: builtins.c:1968
+#, fuzzy
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+"Äá»c các dòng từ đầu vào tiêu chuẩn vào má»™t biến mảng.\n"
+"\n"
+"\tÄá»c các dòng từ đầu vào tiêu chuẩn vào biến mảng MẢNG,\n"
+"\thoặc từ bá»™ mô tả tập tin FD nếu Ä‘Æ°a ra tùy chá»n « -u ».\n"
+"\tBiến TẬP_TIN_SÆ _Äá»’ là MẢNG mặc định.\n"
+"\n"
+"\tTùy chá»n:\n"
+"\t\t-n Sá»\tsao chép nhiá»u nhất Sá» dòng. Nếu Sá» là 0 thì sao chép má»i dòng.\n"
+"\t\t-O Gá»C\tbắt đầu gán cho MẢNG ở chỉ mục Gá»C. Chỉ mục mặc định là 0.\n"
+"\t\t-s Sá»\thủy Sá» dòng đầu tiên được Ä‘á»c.\n"
+"\t\t-t\tgỡ bá» má»™t ký tá»± dòng má»›i theo sau khá»i má»—i dòng được Ä‘á»c.\n"
+"\t\t-u FD\tÄ‘á»c các dòng từ bá»™ mô tả tập tin FD thay vào từ đầu vào tiêu "
+"chuẩn.\n"
+"\t\t-C GỌI_NGƯỢC\tđịnh giá GỌI_NGƯỢC má»—i lần Ä‘á»c LƯỢNG dòng.\n"
+"\t\t-c LƯỢNG\tghi rõ số các dòng được Ä‘á»c giữa hai lần gá»i GỌI_NGƯỢC.\n"
+"\n"
+"\tÄối số :\n"
+"\tMẢNG\ttên biến mảg cần dùng cho dữ liệu tập tin.\n"
+"\n"
+"\tNếu đưa ra « -C » mà không có « -c » thì lượng mặc định là 5000.\n"
+"\tKhi Æ°á»›c lượng lá»i GỌI_NGƯỢC thì nó nhận chỉ số của phần tá»­ mảng\n"
+"\tkế tiếp được gán dưới dạng một đối số bổ sung.\n"
+"\n"
+"\tKhông Ä‘Æ°a ra má»™t Gá»C dứt khoát thì mapfile (tập tin sÆ¡ đồ)\n"
+"\t\tsẽ xoá sạch MẢNG trước khi gán cho nó.\n"
+"\n"
+"\tTráng thái thoát:\n"
+"\tTrả lại thành công nếu không Ä‘Æ°a ra tùy chá»n sai và MẢNG không phải chỉ "
+"Ä‘á»c."
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+"Äá»c các dòng từ má»™t tập tin vào má»™t biến mảng.\n"
+"\n"
+"\tÄồng nghÄ©a vá»›i « mapfile »."
+
+#~ msgid "xrealloc: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr "xrealloc: không thể cấp phát lại %lu byte (%lu byte đã cấp phát)"
+
+#~ msgid "xrealloc: cannot allocate %lu bytes"
+#~ msgstr "xrealloc: không thể cấp phát %lu byte"
+
+#~ msgid "xrealloc: %s:%d: cannot reallocate %lu bytes (%lu bytes allocated)"
+#~ msgstr ""
+#~ "xrealloc: %s:%d: không thể cấp phát lại %lu byte (%lu byte đã cấp phát)"
diff --git a/po/zh_TW.gmo b/po/zh_TW.gmo
new file mode 100644
index 0000000..c3ca675
--- /dev/null
+++ b/po/zh_TW.gmo
Binary files differ
diff --git a/po/zh_TW.po b/po/zh_TW.po
new file mode 100644
index 0000000..7a5d32b
--- /dev/null
+++ b/po/zh_TW.po
@@ -0,0 +1,3942 @@
+# Chinese translations for bash package.
+# Copyright (C) 2008 Free Software Foundation, Inc.
+# This file is distributed under the same license as the bash package.
+# Zi-You Dai <ioppooster@gmail.com>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: bash-3.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-12-30 08:25-0500\n"
+"PO-Revision-Date: 2008-08-20 20:12+0800\n"
+"Last-Translator: Zi-You Dai <ioppooster@gmail.com>\n"
+"Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: arrayfunc.c:50
+msgid "bad array subscript"
+msgstr ""
+
+#: arrayfunc.c:313 builtins/declare.def:481
+#, c-format
+msgid "%s: cannot convert indexed to associative array"
+msgstr ""
+
+#: arrayfunc.c:480
+#, fuzzy, c-format
+msgid "%s: invalid associative array key"
+msgstr "%s:無效的功能å稱"
+
+#: arrayfunc.c:482
+#, c-format
+msgid "%s: cannot assign to non-numeric index"
+msgstr ""
+
+#: arrayfunc.c:518
+#, c-format
+msgid "%s: %s: must use subscript when assigning associative array"
+msgstr ""
+
+#: bashhist.c:383
+#, c-format
+msgid "%s: cannot create: %s"
+msgstr ""
+
+#: bashline.c:3457
+msgid "bash_execute_unix_command: cannot find keymap for command"
+msgstr ""
+
+#: bashline.c:3543
+#, c-format
+msgid "%s: first non-whitespace character is not `\"'"
+msgstr ""
+
+#: bashline.c:3572
+#, c-format
+msgid "no closing `%c' in %s"
+msgstr ""
+
+#: bashline.c:3606
+#, c-format
+msgid "%s: missing colon separator"
+msgstr ""
+
+#: builtins/alias.def:132
+#, fuzzy, c-format
+msgid "`%s': invalid alias name"
+msgstr "%s:無效的功能å稱"
+
+#: builtins/bind.def:120 builtins/bind.def:123
+msgid "line editing not enabled"
+msgstr ""
+
+#: builtins/bind.def:206
+#, c-format
+msgid "`%s': invalid keymap name"
+msgstr ""
+
+#: builtins/bind.def:245
+#, c-format
+msgid "%s: cannot read: %s"
+msgstr "%s:ä¸èƒ½è®€å–: %s"
+
+#: builtins/bind.def:260
+#, c-format
+msgid "`%s': cannot unbind"
+msgstr ""
+
+#: builtins/bind.def:295 builtins/bind.def:325
+#, c-format
+msgid "`%s': unknown function name"
+msgstr "`%s':未知函數å稱"
+
+#: builtins/bind.def:303
+#, c-format
+msgid "%s is not bound to any keys.\n"
+msgstr ""
+
+#: builtins/bind.def:307
+#, c-format
+msgid "%s can be invoked via "
+msgstr ""
+
+#: builtins/break.def:77 builtins/break.def:117
+msgid "loop count"
+msgstr ""
+
+#: builtins/break.def:137
+msgid "only meaningful in a `for', `while', or `until' loop"
+msgstr ""
+
+#: builtins/caller.def:133
+msgid ""
+"Returns the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns "
+msgstr ""
+
+#: builtins/caller.def:135
+msgid ""
+". With EXPR, returns\n"
+" "
+msgstr ""
+
+#: builtins/caller.def:136
+msgid ""
+"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0."
+msgstr ""
+
+#: builtins/cd.def:215
+msgid "HOME not set"
+msgstr "HOME 沒有設置"
+
+#: builtins/cd.def:227
+msgid "OLDPWD not set"
+msgstr "OLDPWD 沒有設置"
+
+#: builtins/common.c:101
+#, c-format
+msgid "line %d: "
+msgstr ""
+
+#: builtins/common.c:139 error.c:261
+#, fuzzy, c-format
+msgid "warning: "
+msgstr "%s:警告:"
+
+#: builtins/common.c:153
+#, fuzzy, c-format
+msgid "%s: usage: "
+msgstr "%s:警告:"
+
+#: builtins/common.c:166 test.c:827
+msgid "too many arguments"
+msgstr "太多引數"
+
+#: builtins/common.c:191 shell.c:499 shell.c:782
+#, c-format
+msgid "%s: option requires an argument"
+msgstr "%s:é¸é …需è¦ä¸€å€‹å¼•æ•¸"
+
+#: builtins/common.c:198
+#, c-format
+msgid "%s: numeric argument required"
+msgstr "%s:數字引數必須"
+
+#: builtins/common.c:205
+#, c-format
+msgid "%s: not found"
+msgstr "%s:沒有找到"
+
+#: builtins/common.c:214 shell.c:795
+#, c-format
+msgid "%s: invalid option"
+msgstr "%s:無效é¸é …"
+
+#: builtins/common.c:221
+#, c-format
+msgid "%s: invalid option name"
+msgstr "%s:無效é¸é …å"
+
+#: builtins/common.c:228 general.c:231 general.c:236
+#, c-format
+msgid "`%s': not a valid identifier"
+msgstr "`%s':ä¸æ˜¯ä¸€å€‹æœ‰æ•ˆçš„識別符"
+
+#: builtins/common.c:238
+#, fuzzy
+msgid "invalid octal number"
+msgstr "無效信號數"
+
+#: builtins/common.c:240
+#, fuzzy
+msgid "invalid hex number"
+msgstr "%s:無效的號碼"
+
+#: builtins/common.c:242 expr.c:1256
+msgid "invalid number"
+msgstr ""
+
+#: builtins/common.c:250
+#, c-format
+msgid "%s: invalid signal specification"
+msgstr "%s:無效的信號è¦æ ¼"
+
+#: builtins/common.c:257
+#, c-format
+msgid "`%s': not a pid or valid job spec"
+msgstr "`%s':ä¸æ˜¯ä¸€å€‹ pid 或有效的工作è¦æ ¼"
+
+#: builtins/common.c:264 error.c:454
+#, c-format
+msgid "%s: readonly variable"
+msgstr "%s:åªè®€è®Šæ•¸"
+
+#: builtins/common.c:272
+#, c-format
+msgid "%s: %s out of range"
+msgstr "%s:%s 超出範åœ"
+
+#: builtins/common.c:272 builtins/common.c:274
+msgid "argument"
+msgstr "引數"
+
+#: builtins/common.c:274
+#, c-format
+msgid "%s out of range"
+msgstr "%s 超出範åœ"
+
+#: builtins/common.c:282
+#, c-format
+msgid "%s: no such job"
+msgstr "%s:沒有此類的工作"
+
+#: builtins/common.c:290
+#, c-format
+msgid "%s: no job control"
+msgstr "%s:沒有工作控制"
+
+#: builtins/common.c:292
+msgid "no job control"
+msgstr "沒有工作控制"
+
+#: builtins/common.c:302
+#, c-format
+msgid "%s: restricted"
+msgstr "%s:有é™çš„"
+
+#: builtins/common.c:304
+msgid "restricted"
+msgstr "有é™çš„"
+
+#: builtins/common.c:312
+#, c-format
+msgid "%s: not a shell builtin"
+msgstr "%s:ä¸æ˜¯ä¸€å€‹å…§å»º shell"
+
+#: builtins/common.c:321
+#, c-format
+msgid "write error: %s"
+msgstr "寫入錯誤: %s"
+
+#: builtins/common.c:329
+#, c-format
+msgid "error setting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:331
+#, c-format
+msgid "error getting terminal attributes: %s"
+msgstr ""
+
+#: builtins/common.c:563
+#, c-format
+msgid "%s: error retrieving current directory: %s: %s\n"
+msgstr "%s:錯誤檢索當å‰ç›®éŒ„: %s: %s\n"
+
+#: builtins/common.c:629 builtins/common.c:631
+#, c-format
+msgid "%s: ambiguous job spec"
+msgstr "%s:å«ç³Šçš„工作è¦æ ¼"
+
+#: builtins/complete.def:276
+#, c-format
+msgid "%s: invalid action name"
+msgstr "%s:無效的功能å稱"
+
+#: builtins/complete.def:449 builtins/complete.def:644
+#: builtins/complete.def:853
+#, c-format
+msgid "%s: no completion specification"
+msgstr "%s:沒有完æˆçš„è¦æ ¼"
+
+#: builtins/complete.def:696
+msgid "warning: -F option may not work as you expect"
+msgstr "警告: -F é¸é …å¯èƒ½ç„¡æ³•æŒ‰é æœŸå·¥ä½œ"
+
+#: builtins/complete.def:698
+msgid "warning: -C option may not work as you expect"
+msgstr "警告: -C é¸é …å¯èƒ½ç„¡æ³•æŒ‰é æœŸå·¥ä½œ"
+
+#: builtins/complete.def:826
+msgid "not currently executing completion function"
+msgstr ""
+
+#: builtins/declare.def:122
+msgid "can only be used in a function"
+msgstr "åªèƒ½ç”¨åœ¨ä¸€å€‹å‡½æ•¸"
+
+#: builtins/declare.def:360
+msgid "cannot use `-f' to make functions"
+msgstr ""
+
+#: builtins/declare.def:372 execute_cmd.c:4937
+#, c-format
+msgid "%s: readonly function"
+msgstr "%s:åªè®€å‡½æ•¸"
+
+#: builtins/declare.def:468
+#, c-format
+msgid "%s: cannot destroy array variables in this way"
+msgstr ""
+
+#: builtins/declare.def:475
+#, c-format
+msgid "%s: cannot convert associative to indexed array"
+msgstr ""
+
+#: builtins/enable.def:137 builtins/enable.def:145
+msgid "dynamic loading not available"
+msgstr ""
+
+#: builtins/enable.def:312
+#, c-format
+msgid "cannot open shared object %s: %s"
+msgstr ""
+
+#: builtins/enable.def:335
+#, c-format
+msgid "cannot find %s in shared object %s: %s"
+msgstr ""
+
+#: builtins/enable.def:459
+#, c-format
+msgid "%s: not dynamically loaded"
+msgstr ""
+
+#: builtins/enable.def:474
+#, c-format
+msgid "%s: cannot delete: %s"
+msgstr ""
+
+#: builtins/evalfile.c:134 builtins/hash.def:169 execute_cmd.c:4794
+#: shell.c:1452
+#, c-format
+msgid "%s: is a directory"
+msgstr ""
+
+#: builtins/evalfile.c:139
+#, c-format
+msgid "%s: not a regular file"
+msgstr ""
+
+#: builtins/evalfile.c:147
+#, c-format
+msgid "%s: file is too large"
+msgstr ""
+
+#: builtins/evalfile.c:185 builtins/evalfile.c:203 execute_cmd.c:4864
+#: shell.c:1462
+#, c-format
+msgid "%s: cannot execute binary file"
+msgstr ""
+
+#: builtins/exec.def:212
+#, c-format
+msgid "%s: cannot execute: %s"
+msgstr ""
+
+#: builtins/exit.def:65
+#, c-format
+msgid "logout\n"
+msgstr ""
+
+#: builtins/exit.def:88
+msgid "not login shell: use `exit'"
+msgstr ""
+
+#: builtins/exit.def:120
+#, c-format
+msgid "There are stopped jobs.\n"
+msgstr ""
+
+#: builtins/exit.def:122
+#, c-format
+msgid "There are running jobs.\n"
+msgstr ""
+
+#: builtins/fc.def:262
+msgid "no command found"
+msgstr ""
+
+#: builtins/fc.def:349
+msgid "history specification"
+msgstr ""
+
+#: builtins/fc.def:370
+#, c-format
+msgid "%s: cannot open temp file: %s"
+msgstr ""
+
+#: builtins/fg_bg.def:149 builtins/jobs.def:282
+msgid "current"
+msgstr ""
+
+#: builtins/fg_bg.def:158
+#, c-format
+msgid "job %d started without job control"
+msgstr ""
+
+#: builtins/getopt.c:110
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr ""
+
+#: builtins/getopt.c:111
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr ""
+
+#: builtins/hash.def:92
+msgid "hashing disabled"
+msgstr ""
+
+#: builtins/hash.def:138
+#, c-format
+msgid "%s: hash table empty\n"
+msgstr ""
+
+#: builtins/hash.def:244
+#, fuzzy, c-format
+msgid "hits\tcommand\n"
+msgstr "最後的命令: %s\n"
+
+#: builtins/help.def:130
+#, c-format
+msgid "Shell commands matching keyword `"
+msgid_plural "Shell commands matching keywords `"
+msgstr[0] ""
+
+#: builtins/help.def:168
+#, c-format
+msgid ""
+"no help topics match `%s'. Try `help help' or `man -k %s' or `info %s'."
+msgstr ""
+
+#: builtins/help.def:185
+#, c-format
+msgid "%s: cannot open: %s"
+msgstr ""
+
+#: builtins/help.def:337
+#, c-format
+msgid ""
+"These shell commands are defined internally. Type `help' to see this list.\n"
+"Type `help name' to find out more about the function `name'.\n"
+"Use `info bash' to find out more about the shell in general.\n"
+"Use `man -k' or `info' to find out more about commands not in this list.\n"
+"\n"
+"A star (*) next to a name means that the command is disabled.\n"
+"\n"
+msgstr ""
+
+#: builtins/history.def:154
+msgid "cannot use more than one of -anrw"
+msgstr ""
+
+#: builtins/history.def:186
+msgid "history position"
+msgstr ""
+
+#: builtins/history.def:365
+#, c-format
+msgid "%s: history expansion failed"
+msgstr ""
+
+#: builtins/inlib.def:71
+#, fuzzy, c-format
+msgid "%s: inlib failed"
+msgstr "%s:無效æœå‹™"
+
+#: builtins/jobs.def:109
+msgid "no other options allowed with `-x'"
+msgstr ""
+
+#: builtins/kill.def:200
+#, c-format
+msgid "%s: arguments must be process or job IDs"
+msgstr ""
+
+#: builtins/kill.def:263
+msgid "Unknown error"
+msgstr ""
+
+#: builtins/let.def:95 builtins/let.def:120 expr.c:501 expr.c:516
+msgid "expression expected"
+msgstr ""
+
+#: builtins/mapfile.def:165
+#, c-format
+msgid "%s: not an indexed array"
+msgstr ""
+
+#: builtins/mapfile.def:249 builtins/read.def:279
+#, c-format
+msgid "%s: invalid file descriptor specification"
+msgstr ""
+
+#: builtins/mapfile.def:257 builtins/read.def:286
+#, c-format
+msgid "%d: invalid file descriptor: %s"
+msgstr ""
+
+#: builtins/mapfile.def:266 builtins/mapfile.def:304
+#, fuzzy, c-format
+msgid "%s: invalid line count"
+msgstr "%s:無效é¸é …"
+
+#: builtins/mapfile.def:277
+#, fuzzy, c-format
+msgid "%s: invalid array origin"
+msgstr "%s:無效é¸é …"
+
+#: builtins/mapfile.def:294
+#, fuzzy, c-format
+msgid "%s: invalid callback quantum"
+msgstr "%s:無效的功能å稱"
+
+#: builtins/mapfile.def:326
+msgid "empty array variable name"
+msgstr ""
+
+#: builtins/mapfile.def:347
+msgid "array variable support required"
+msgstr ""
+
+#: builtins/printf.def:374
+#, c-format
+msgid "`%s': missing format character"
+msgstr ""
+
+#: builtins/printf.def:551
+#, c-format
+msgid "`%c': invalid format character"
+msgstr ""
+
+#: builtins/printf.def:578
+#, fuzzy, c-format
+msgid "warning: %s: %s"
+msgstr "%s:警告:"
+
+#: builtins/printf.def:757
+msgid "missing hex digit for \\x"
+msgstr ""
+
+#: builtins/pushd.def:195
+msgid "no other directory"
+msgstr ""
+
+#: builtins/pushd.def:462
+msgid "<no current directory>"
+msgstr ""
+
+#: builtins/pushd.def:506
+msgid "directory stack empty"
+msgstr ""
+
+#: builtins/pushd.def:508
+msgid "directory stack index"
+msgstr ""
+
+#: builtins/pushd.def:683
+msgid ""
+"Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+"\tdirs when invoked without options, starting with zero."
+msgstr ""
+
+#: builtins/pushd.def:705
+msgid ""
+"Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/pushd.def:730
+msgid ""
+"Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack."
+msgstr ""
+
+#: builtins/read.def:252
+#, c-format
+msgid "%s: invalid timeout specification"
+msgstr ""
+
+#: builtins/read.def:588
+#, c-format
+msgid "read error: %d: %s"
+msgstr ""
+
+#: builtins/return.def:73
+msgid "can only `return' from a function or sourced script"
+msgstr ""
+
+#: builtins/set.def:768
+msgid "cannot simultaneously unset a function and a variable"
+msgstr ""
+
+#: builtins/set.def:805
+#, c-format
+msgid "%s: cannot unset"
+msgstr ""
+
+#: builtins/set.def:812
+#, c-format
+msgid "%s: cannot unset: readonly %s"
+msgstr ""
+
+#: builtins/set.def:823
+#, c-format
+msgid "%s: not an array variable"
+msgstr ""
+
+#: builtins/setattr.def:186
+#, c-format
+msgid "%s: not a function"
+msgstr ""
+
+#: builtins/shift.def:71 builtins/shift.def:77
+msgid "shift count"
+msgstr ""
+
+#: builtins/shopt.def:260
+msgid "cannot set and unset shell options simultaneously"
+msgstr ""
+
+#: builtins/shopt.def:325
+#, c-format
+msgid "%s: invalid shell option name"
+msgstr ""
+
+#: builtins/source.def:128
+msgid "filename argument required"
+msgstr ""
+
+#: builtins/source.def:153
+#, c-format
+msgid "%s: file not found"
+msgstr ""
+
+#: builtins/suspend.def:101
+msgid "cannot suspend"
+msgstr ""
+
+#: builtins/suspend.def:111
+msgid "cannot suspend a login shell"
+msgstr ""
+
+#: builtins/type.def:234
+#, c-format
+msgid "%s is aliased to `%s'\n"
+msgstr ""
+
+#: builtins/type.def:255
+#, c-format
+msgid "%s is a shell keyword\n"
+msgstr ""
+
+#: builtins/type.def:274
+#, c-format
+msgid "%s is a function\n"
+msgstr ""
+
+#: builtins/type.def:296
+#, c-format
+msgid "%s is a shell builtin\n"
+msgstr ""
+
+#: builtins/type.def:317 builtins/type.def:391
+#, c-format
+msgid "%s is %s\n"
+msgstr ""
+
+#: builtins/type.def:337
+#, c-format
+msgid "%s is hashed (%s)\n"
+msgstr ""
+
+#: builtins/ulimit.def:372
+#, c-format
+msgid "%s: invalid limit argument"
+msgstr ""
+
+#: builtins/ulimit.def:398
+#, c-format
+msgid "`%c': bad command"
+msgstr "`%c':壞的命令"
+
+#: builtins/ulimit.def:427
+#, c-format
+msgid "%s: cannot get limit: %s"
+msgstr "%s:ä¸èƒ½å¾—到 limit: %s"
+
+#: builtins/ulimit.def:453
+msgid "limit"
+msgstr ""
+
+#: builtins/ulimit.def:465 builtins/ulimit.def:765
+#, c-format
+msgid "%s: cannot modify limit: %s"
+msgstr "%s:ä¸èƒ½ä¿®æ”¹ limit: %s"
+
+#: builtins/umask.def:118
+msgid "octal number"
+msgstr "八進制數"
+
+#: builtins/umask.def:231
+#, c-format
+msgid "`%c': invalid symbolic mode operator"
+msgstr ""
+
+#: builtins/umask.def:286
+#, c-format
+msgid "`%c': invalid symbolic mode character"
+msgstr ""
+
+#: error.c:90 error.c:321 error.c:323 error.c:325
+msgid " line "
+msgstr ""
+
+#: error.c:165
+#, c-format
+msgid "last command: %s\n"
+msgstr "最後的命令: %s\n"
+
+#: error.c:173
+#, c-format
+msgid "Aborting..."
+msgstr ""
+
+#: error.c:406
+msgid "unknown command error"
+msgstr "未知命令錯誤"
+
+#: error.c:407
+msgid "bad command type"
+msgstr "壞的命令類型"
+
+#: error.c:408
+msgid "bad connector"
+msgstr "壞的連接器"
+
+#: error.c:409
+msgid "bad jump"
+msgstr ""
+
+#: error.c:447
+#, c-format
+msgid "%s: unbound variable"
+msgstr ""
+
+#: eval.c:181
+#, c-format
+msgid "timed out waiting for input: auto-logout\n"
+msgstr ""
+
+#: execute_cmd.c:497
+#, c-format
+msgid "cannot redirect standard input from /dev/null: %s"
+msgstr ""
+
+#: execute_cmd.c:1162
+#, c-format
+msgid "TIMEFORMAT: `%c': invalid format character"
+msgstr ""
+
+#: execute_cmd.c:2075
+#, fuzzy
+msgid "pipe error"
+msgstr "寫入錯誤: %s"
+
+#: execute_cmd.c:4481
+#, c-format
+msgid "%s: restricted: cannot specify `/' in command names"
+msgstr ""
+
+#: execute_cmd.c:4572
+#, c-format
+msgid "%s: command not found"
+msgstr "%s:命令找ä¸åˆ°"
+
+#: execute_cmd.c:4827
+#, c-format
+msgid "%s: %s: bad interpreter"
+msgstr ""
+
+#: execute_cmd.c:4976
+#, c-format
+msgid "cannot duplicate fd %d to fd %d"
+msgstr ""
+
+#: expr.c:241
+msgid "expression recursion level exceeded"
+msgstr ""
+
+#: expr.c:265
+msgid "recursion stack underflow"
+msgstr ""
+
+#: expr.c:379
+msgid "syntax error in expression"
+msgstr "表é”語法錯誤"
+
+#: expr.c:419
+msgid "attempted assignment to non-variable"
+msgstr ""
+
+#: expr.c:440 expr.c:445 expr.c:756
+msgid "division by 0"
+msgstr ""
+
+#: expr.c:471
+msgid "bug: bad expassign token"
+msgstr ""
+
+#: expr.c:513
+msgid "`:' expected for conditional expression"
+msgstr ""
+
+#: expr.c:781
+msgid "exponent less than 0"
+msgstr ""
+
+#: expr.c:826
+msgid "identifier expected after pre-increment or pre-decrement"
+msgstr ""
+
+#: expr.c:854
+msgid "missing `)'"
+msgstr ""
+
+#: expr.c:897 expr.c:1176
+msgid "syntax error: operand expected"
+msgstr ""
+
+#: expr.c:1178
+msgid "syntax error: invalid arithmetic operator"
+msgstr ""
+
+#: expr.c:1202
+#, c-format
+msgid "%s%s%s: %s (error token is \"%s\")"
+msgstr ""
+
+#: expr.c:1260
+msgid "invalid arithmetic base"
+msgstr ""
+
+#: expr.c:1280
+msgid "value too great for base"
+msgstr ""
+
+#: expr.c:1329
+#, c-format
+msgid "%s: expression error\n"
+msgstr ""
+
+#: general.c:61
+msgid "getcwd: cannot access parent directories"
+msgstr ""
+
+#: input.c:94 subst.c:4857
+#, c-format
+msgid "cannot reset nodelay mode for fd %d"
+msgstr ""
+
+#: input.c:258
+#, c-format
+msgid "cannot allocate new file descriptor for bash input from fd %d"
+msgstr ""
+
+#: input.c:266
+#, c-format
+msgid "save_bash_input: buffer already exists for new fd %d"
+msgstr ""
+
+#: jobs.c:466
+msgid "start_pipeline: pgrp pipe"
+msgstr ""
+
+#: jobs.c:887
+#, c-format
+msgid "forked pid %d appears in running job %d"
+msgstr ""
+
+#: jobs.c:1005
+#, c-format
+msgid "deleting stopped job %d with process group %ld"
+msgstr ""
+
+#: jobs.c:1110
+#, c-format
+msgid "add_process: process %5ld (%s) in the_pipeline"
+msgstr ""
+
+#: jobs.c:1113
+#, c-format
+msgid "add_process: pid %5ld (%s) marked as still alive"
+msgstr ""
+
+#: jobs.c:1401
+#, c-format
+msgid "describe_pid: %ld: no such pid"
+msgstr ""
+
+#: jobs.c:1416
+#, c-format
+msgid "Signal %d"
+msgstr ""
+
+#: jobs.c:1430 jobs.c:1455
+msgid "Done"
+msgstr ""
+
+#: jobs.c:1435 siglist.c:123
+msgid "Stopped"
+msgstr ""
+
+#: jobs.c:1439
+#, c-format
+msgid "Stopped(%s)"
+msgstr ""
+
+#: jobs.c:1443
+msgid "Running"
+msgstr ""
+
+#: jobs.c:1457
+#, c-format
+msgid "Done(%d)"
+msgstr ""
+
+#: jobs.c:1459
+#, c-format
+msgid "Exit %d"
+msgstr ""
+
+#: jobs.c:1462
+msgid "Unknown status"
+msgstr ""
+
+#: jobs.c:1549
+#, c-format
+msgid "(core dumped) "
+msgstr ""
+
+#: jobs.c:1568
+#, c-format
+msgid " (wd: %s)"
+msgstr ""
+
+#: jobs.c:1776
+#, c-format
+msgid "child setpgid (%ld to %ld)"
+msgstr ""
+
+#: jobs.c:2104 nojobs.c:585
+#, c-format
+msgid "wait: pid %ld is not a child of this shell"
+msgstr ""
+
+#: jobs.c:2331
+#, c-format
+msgid "wait_for: No record of process %ld"
+msgstr ""
+
+#: jobs.c:2607
+#, c-format
+msgid "wait_for_job: job %d is stopped"
+msgstr ""
+
+#: jobs.c:2829
+#, c-format
+msgid "%s: job has terminated"
+msgstr ""
+
+#: jobs.c:2838
+#, c-format
+msgid "%s: job %d already in background"
+msgstr ""
+
+#: jobs.c:3059
+msgid "waitchld: turning on WNOHANG to avoid indefinite block"
+msgstr ""
+
+#: jobs.c:3508
+#, fuzzy, c-format
+msgid "%s: line %d: "
+msgstr "%s:警告:"
+
+#: jobs.c:3522 nojobs.c:814
+#, c-format
+msgid " (core dumped)"
+msgstr ""
+
+#: jobs.c:3534 jobs.c:3547
+#, c-format
+msgid "(wd now: %s)\n"
+msgstr ""
+
+#: jobs.c:3579
+msgid "initialize_job_control: getpgrp failed"
+msgstr ""
+
+#: jobs.c:3639
+msgid "initialize_job_control: line discipline"
+msgstr ""
+
+#: jobs.c:3649
+msgid "initialize_job_control: setpgid"
+msgstr ""
+
+#: jobs.c:3677
+#, c-format
+msgid "cannot set terminal process group (%d)"
+msgstr ""
+
+#: jobs.c:3682
+msgid "no job control in this shell"
+msgstr ""
+
+#: lib/malloc/malloc.c:296
+#, c-format
+msgid "malloc: failed assertion: %s\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:312
+#, c-format
+msgid ""
+"\r\n"
+"malloc: %s:%d: assertion botched\r\n"
+msgstr ""
+
+#: lib/malloc/malloc.c:313
+#, fuzzy
+msgid "unknown"
+msgstr "%s:主機未知"
+
+#: lib/malloc/malloc.c:797
+msgid "malloc: block on free list clobbered"
+msgstr ""
+
+#: lib/malloc/malloc.c:874
+msgid "free: called with already freed block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:877
+msgid "free: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:896
+msgid "free: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:902
+msgid "free: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/malloc.c:1001
+msgid "realloc: called with unallocated block argument"
+msgstr ""
+
+#: lib/malloc/malloc.c:1016
+msgid "realloc: underflow detected; mh_nbytes out of range"
+msgstr ""
+
+#: lib/malloc/malloc.c:1022
+msgid "realloc: start and end chunk sizes differ"
+msgstr ""
+
+#: lib/malloc/table.c:177
+#, c-format
+msgid "register_alloc: alloc table is full with FIND_ALLOC?\n"
+msgstr ""
+
+#: lib/malloc/table.c:184
+#, c-format
+msgid "register_alloc: %p already in table as allocated?\n"
+msgstr ""
+
+#: lib/malloc/table.c:220
+#, c-format
+msgid "register_free: %p already in table as free?\n"
+msgstr ""
+
+#: lib/sh/fmtulong.c:101
+msgid "invalid base"
+msgstr ""
+
+#: lib/sh/netopen.c:168
+#, c-format
+msgid "%s: host unknown"
+msgstr "%s:主機未知"
+
+#: lib/sh/netopen.c:175
+#, c-format
+msgid "%s: invalid service"
+msgstr "%s:無效æœå‹™"
+
+#: lib/sh/netopen.c:306
+#, c-format
+msgid "%s: bad network path specification"
+msgstr "%s:壞的網路路徑è¦æ ¼"
+
+#: lib/sh/netopen.c:346
+msgid "network operations not supported"
+msgstr "ä¸æ”¯æŒç¶²è·¯æ“作"
+
+#: locale.c:192
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:194
+#, c-format
+msgid "setlocale: LC_ALL: cannot change locale (%s): %s"
+msgstr ""
+
+#: locale.c:247
+#, c-format
+msgid "setlocale: %s: cannot change locale (%s)"
+msgstr ""
+
+#: locale.c:249
+#, c-format
+msgid "setlocale: %s: cannot change locale (%s): %s"
+msgstr ""
+
+#: mailcheck.c:433
+msgid "You have mail in $_"
+msgstr "您有郵件在 $_"
+
+#: mailcheck.c:458
+msgid "You have new mail in $_"
+msgstr "您有新郵件在 $_"
+
+#: mailcheck.c:474
+#, c-format
+msgid "The mail in %s has been read\n"
+msgstr "郵件在 %s 已閱讀\n"
+
+#: make_cmd.c:323
+msgid "syntax error: arithmetic expression required"
+msgstr "語法錯誤:必須算術表é”"
+
+#: make_cmd.c:325
+msgid "syntax error: `;' unexpected"
+msgstr "語法錯誤: `;' æ„外"
+
+#: make_cmd.c:326
+#, c-format
+msgid "syntax error: `((%s))'"
+msgstr "語法錯誤: `((%s))'"
+
+#: make_cmd.c:575
+#, c-format
+msgid "make_here_document: bad instruction type %d"
+msgstr "make_here_document:壞的指示類型 %d"
+
+#: make_cmd.c:659
+#, c-format
+msgid "here-document at line %d delimited by end-of-file (wanted `%s')"
+msgstr ""
+
+#: make_cmd.c:756
+#, c-format
+msgid "make_redirection: redirection instruction `%d' out of range"
+msgstr "make_redirection:é‡æ–°å°Žå‘指示 `%d' 超出範åœ"
+
+#: parse.y:3133 parse.y:3369
+#, c-format
+msgid "unexpected EOF while looking for matching `%c'"
+msgstr ""
+
+#: parse.y:3951
+msgid "unexpected EOF while looking for `]]'"
+msgstr ""
+
+#: parse.y:3956
+#, c-format
+msgid "syntax error in conditional expression: unexpected token `%s'"
+msgstr ""
+
+#: parse.y:3960
+msgid "syntax error in conditional expression"
+msgstr "語法錯誤,在有æ¢ä»¶çš„表é”"
+
+#: parse.y:4038
+#, c-format
+msgid "unexpected token `%s', expected `)'"
+msgstr ""
+
+#: parse.y:4042
+msgid "expected `)'"
+msgstr "é æœŸ `)'"
+
+#: parse.y:4070
+#, c-format
+msgid "unexpected argument `%s' to conditional unary operator"
+msgstr ""
+
+#: parse.y:4074
+msgid "unexpected argument to conditional unary operator"
+msgstr ""
+
+#: parse.y:4120
+#, c-format
+msgid "unexpected token `%s', conditional binary operator expected"
+msgstr ""
+
+#: parse.y:4124
+msgid "conditional binary operator expected"
+msgstr ""
+
+#: parse.y:4146
+#, c-format
+msgid "unexpected argument `%s' to conditional binary operator"
+msgstr ""
+
+#: parse.y:4150
+msgid "unexpected argument to conditional binary operator"
+msgstr ""
+
+#: parse.y:4161
+#, c-format
+msgid "unexpected token `%c' in conditional command"
+msgstr ""
+
+#: parse.y:4164
+#, c-format
+msgid "unexpected token `%s' in conditional command"
+msgstr ""
+
+#: parse.y:4168
+#, c-format
+msgid "unexpected token %d in conditional command"
+msgstr ""
+
+#: parse.y:5459
+#, c-format
+msgid "syntax error near unexpected token `%s'"
+msgstr ""
+
+#: parse.y:5477
+#, c-format
+msgid "syntax error near `%s'"
+msgstr ""
+
+#: parse.y:5487
+msgid "syntax error: unexpected end of file"
+msgstr ""
+
+#: parse.y:5487
+msgid "syntax error"
+msgstr "語法錯誤"
+
+#: parse.y:5549
+#, c-format
+msgid "Use \"%s\" to leave the shell.\n"
+msgstr ""
+
+#: parse.y:5711
+msgid "unexpected EOF while looking for matching `)'"
+msgstr ""
+
+#: pcomplete.c:1030
+#, c-format
+msgid "completion: function `%s' not found"
+msgstr ""
+
+#: pcomplib.c:179
+#, c-format
+msgid "progcomp_insert: %s: NULL COMPSPEC"
+msgstr ""
+
+#: print_cmd.c:290
+#, c-format
+msgid "print_command: bad connector `%d'"
+msgstr ""
+
+#: print_cmd.c:363
+#, c-format
+msgid "xtrace_set: %d: invalid file descriptor"
+msgstr ""
+
+#: print_cmd.c:368
+msgid "xtrace_set: NULL file pointer"
+msgstr ""
+
+#: print_cmd.c:372
+#, c-format
+msgid "xtrace fd (%d) != fileno xtrace fp (%d)"
+msgstr ""
+
+#: print_cmd.c:1461
+#, c-format
+msgid "cprintf: `%c': invalid format character"
+msgstr ""
+
+#: redir.c:110
+msgid "file descriptor out of range"
+msgstr ""
+
+#: redir.c:166
+#, c-format
+msgid "%s: ambiguous redirect"
+msgstr ""
+
+#: redir.c:170
+#, c-format
+msgid "%s: cannot overwrite existing file"
+msgstr ""
+
+#: redir.c:175
+#, c-format
+msgid "%s: restricted: cannot redirect output"
+msgstr ""
+
+#: redir.c:180
+#, c-format
+msgid "cannot create temp file for here-document: %s"
+msgstr ""
+
+#: redir.c:184
+#, fuzzy, c-format
+msgid "%s: cannot assign fd to variable"
+msgstr "%s:åªè®€è®Šæ•¸"
+
+#: redir.c:544
+msgid "/dev/(tcp|udp)/host/port not supported without networking"
+msgstr ""
+
+#: redir.c:1101
+msgid "redirection error: cannot duplicate fd"
+msgstr ""
+
+#: shell.c:332
+msgid "could not find /tmp, please create!"
+msgstr ""
+
+#: shell.c:336
+msgid "/tmp must be a valid directory name"
+msgstr ""
+
+#: shell.c:884
+#, c-format
+msgid "%c%c: invalid option"
+msgstr "%c%c:無效é¸é …"
+
+#: shell.c:1651
+msgid "I have no name!"
+msgstr "我沒有åå­—ï¼"
+
+#: shell.c:1793
+#, c-format
+msgid "GNU bash, version %s-(%s)\n"
+msgstr ""
+
+#: shell.c:1794
+#, c-format
+msgid ""
+"Usage:\t%s [GNU long option] [option] ...\n"
+"\t%s [GNU long option] [option] script-file ...\n"
+msgstr ""
+"用法:\t%s [GNU é•·é¸é …] [é¸é …] ...\n"
+"\t%s [GNU é•·é¸é …] [é¸é …] script-file ...\n"
+
+#: shell.c:1796
+msgid "GNU long options:\n"
+msgstr "GNU é•·é¸é …:\n"
+
+#: shell.c:1800
+msgid "Shell options:\n"
+msgstr "Shell é¸é …:\n"
+
+#: shell.c:1801
+msgid "\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"
+msgstr "\t-irsD 或 -c 命令或 -O shopt_option\t\t(åªæœ‰å¼•ç”¨)\n"
+
+#: shell.c:1816
+#, c-format
+msgid "\t-%s or -o option\n"
+msgstr "\t-%s or -o é¸é …\n"
+
+#: shell.c:1822
+#, c-format
+msgid "Type `%s -c \"help set\"' for more information about shell options.\n"
+msgstr "輸入 `%s -c \"help set\"' 更多訊æ¯é—œæ–¼ shell é¸é …。\n"
+
+#: shell.c:1823
+#, c-format
+msgid "Type `%s -c help' for more information about shell builtin commands.\n"
+msgstr "輸入 `%s -c help' 更多訊æ¯é—œæ–¼å…§å»º shell 命令。\n"
+
+#: shell.c:1824
+#, c-format
+msgid "Use the `bashbug' command to report bugs.\n"
+msgstr "使用 `bashbug' 命令報告臭蟲。\n"
+
+#: sig.c:626
+#, c-format
+msgid "sigprocmask: %d: invalid operation"
+msgstr "sigprocmask: %d:無效æ“作"
+
+#: siglist.c:48
+msgid "Bogus signal"
+msgstr ""
+
+#: siglist.c:51
+msgid "Hangup"
+msgstr ""
+
+#: siglist.c:55
+msgid "Interrupt"
+msgstr ""
+
+#: siglist.c:59
+msgid "Quit"
+msgstr ""
+
+#: siglist.c:63
+msgid "Illegal instruction"
+msgstr ""
+
+#: siglist.c:67
+msgid "BPT trace/trap"
+msgstr ""
+
+#: siglist.c:75
+msgid "ABORT instruction"
+msgstr ""
+
+#: siglist.c:79
+msgid "EMT instruction"
+msgstr ""
+
+#: siglist.c:83
+msgid "Floating point exception"
+msgstr ""
+
+#: siglist.c:87
+msgid "Killed"
+msgstr ""
+
+#: siglist.c:91
+#, fuzzy
+msgid "Bus error"
+msgstr "語法錯誤"
+
+#: siglist.c:95
+msgid "Segmentation fault"
+msgstr ""
+
+#: siglist.c:99
+msgid "Bad system call"
+msgstr ""
+
+#: siglist.c:103
+msgid "Broken pipe"
+msgstr ""
+
+#: siglist.c:107
+msgid "Alarm clock"
+msgstr ""
+
+#: siglist.c:111
+#, fuzzy
+msgid "Terminated"
+msgstr "有é™çš„"
+
+#: siglist.c:115
+msgid "Urgent IO condition"
+msgstr ""
+
+#: siglist.c:119
+msgid "Stopped (signal)"
+msgstr ""
+
+#: siglist.c:127
+msgid "Continue"
+msgstr ""
+
+#: siglist.c:135
+msgid "Child death or stop"
+msgstr ""
+
+#: siglist.c:139
+msgid "Stopped (tty input)"
+msgstr ""
+
+#: siglist.c:143
+msgid "Stopped (tty output)"
+msgstr ""
+
+#: siglist.c:147
+msgid "I/O ready"
+msgstr ""
+
+#: siglist.c:151
+msgid "CPU limit"
+msgstr ""
+
+#: siglist.c:155
+msgid "File limit"
+msgstr ""
+
+#: siglist.c:159
+msgid "Alarm (virtual)"
+msgstr ""
+
+#: siglist.c:163
+msgid "Alarm (profile)"
+msgstr ""
+
+#: siglist.c:167
+msgid "Window changed"
+msgstr ""
+
+#: siglist.c:171
+msgid "Record lock"
+msgstr ""
+
+#: siglist.c:175
+msgid "User signal 1"
+msgstr ""
+
+#: siglist.c:179
+msgid "User signal 2"
+msgstr ""
+
+#: siglist.c:183
+msgid "HFT input data pending"
+msgstr ""
+
+#: siglist.c:187
+msgid "power failure imminent"
+msgstr ""
+
+#: siglist.c:191
+msgid "system crash imminent"
+msgstr ""
+
+#: siglist.c:195
+msgid "migrate process to another CPU"
+msgstr ""
+
+#: siglist.c:199
+msgid "programming error"
+msgstr ""
+
+#: siglist.c:203
+msgid "HFT monitor mode granted"
+msgstr ""
+
+#: siglist.c:207
+msgid "HFT monitor mode retracted"
+msgstr ""
+
+#: siglist.c:211
+msgid "HFT sound sequence has completed"
+msgstr ""
+
+#: siglist.c:215
+msgid "Information request"
+msgstr ""
+
+#: siglist.c:223
+msgid "Unknown Signal #"
+msgstr ""
+
+#: siglist.c:225
+#, c-format
+msgid "Unknown Signal #%d"
+msgstr ""
+
+#: subst.c:1333 subst.c:1454
+#, c-format
+msgid "bad substitution: no closing `%s' in %s"
+msgstr ""
+
+#: subst.c:2735
+#, c-format
+msgid "%s: cannot assign list to array member"
+msgstr ""
+
+#: subst.c:4754 subst.c:4770
+msgid "cannot make pipe for process substitution"
+msgstr ""
+
+#: subst.c:4802
+msgid "cannot make child for process substitution"
+msgstr ""
+
+#: subst.c:4847
+#, c-format
+msgid "cannot open named pipe %s for reading"
+msgstr ""
+
+#: subst.c:4849
+#, c-format
+msgid "cannot open named pipe %s for writing"
+msgstr ""
+
+#: subst.c:4867
+#, c-format
+msgid "cannot duplicate named pipe %s as fd %d"
+msgstr ""
+
+#: subst.c:5063
+msgid "cannot make pipe for command substitution"
+msgstr ""
+
+#: subst.c:5097
+msgid "cannot make child for command substitution"
+msgstr ""
+
+#: subst.c:5114
+msgid "command_substitute: cannot duplicate pipe as fd 1"
+msgstr ""
+
+#: subst.c:5617
+#, c-format
+msgid "%s: parameter null or not set"
+msgstr ""
+
+#: subst.c:5907
+#, c-format
+msgid "%s: substring expression < 0"
+msgstr ""
+
+#: subst.c:6965
+#, c-format
+msgid "%s: bad substitution"
+msgstr ""
+
+#: subst.c:7045
+#, c-format
+msgid "$%s: cannot assign in this way"
+msgstr ""
+
+#: subst.c:7374
+msgid ""
+"future versions of the shell will force evaluation as an arithmetic "
+"substitution"
+msgstr ""
+
+#: subst.c:7839
+#, c-format
+msgid "bad substitution: no closing \"`\" in %s"
+msgstr ""
+
+#: subst.c:8720
+#, c-format
+msgid "no match: %s"
+msgstr ""
+
+#: test.c:146
+msgid "argument expected"
+msgstr ""
+
+#: test.c:155
+#, c-format
+msgid "%s: integer expression expected"
+msgstr ""
+
+#: test.c:263
+msgid "`)' expected"
+msgstr ""
+
+#: test.c:265
+#, c-format
+msgid "`)' expected, found %s"
+msgstr ""
+
+#: test.c:280 test.c:693 test.c:696
+#, c-format
+msgid "%s: unary operator expected"
+msgstr ""
+
+#: test.c:449 test.c:736
+#, c-format
+msgid "%s: binary operator expected"
+msgstr ""
+
+#: test.c:811
+msgid "missing `]'"
+msgstr ""
+
+#: trap.c:203
+msgid "invalid signal number"
+msgstr "無效信號數"
+
+#: trap.c:327
+#, c-format
+msgid "run_pending_traps: bad value in trap_list[%d]: %p"
+msgstr ""
+
+#: trap.c:331
+#, c-format
+msgid ""
+"run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"
+msgstr "run_pending_traps: 信號處ç†æ˜¯ SIG_DFL, resending %d (%s) to myself"
+
+#: trap.c:380
+#, c-format
+msgid "trap_handler: bad signal %d"
+msgstr "trap_handler:壞的信號 %d"
+
+#: variables.c:363
+#, c-format
+msgid "error importing function definition for `%s'"
+msgstr "錯誤,輸入的函數定義為 `%s'"
+
+#: variables.c:748
+#, c-format
+msgid "shell level (%d) too high, resetting to 1"
+msgstr ""
+
+#: variables.c:1915
+msgid "make_local_variable: no function context at current scope"
+msgstr ""
+
+#: variables.c:3159
+msgid "all_local_variables: no function context at current scope"
+msgstr ""
+
+#: variables.c:3376
+#, c-format
+msgid "%s has null exportstr"
+msgstr ""
+
+#: variables.c:3381 variables.c:3390
+#, c-format
+msgid "invalid character %d in exportstr for %s"
+msgstr ""
+
+#: variables.c:3396
+#, c-format
+msgid "no `=' in exportstr for %s"
+msgstr ""
+
+#: variables.c:3835
+msgid "pop_var_context: head of shell_variables not a function context"
+msgstr ""
+
+#: variables.c:3848
+msgid "pop_var_context: no global_variables context"
+msgstr ""
+
+#: variables.c:3922
+msgid "pop_scope: head of shell_variables not a temporary environment scope"
+msgstr ""
+
+#: variables.c:4678
+#, fuzzy, c-format
+msgid "%s: %s: cannot open as FILE"
+msgstr "%s:ä¸èƒ½è®€å–: %s"
+
+#: variables.c:4683
+#, c-format
+msgid "%s: %s: invalid value for trace file descriptor"
+msgstr ""
+
+#: version.c:46
+msgid "Copyright (C) 2009 Free Software Foundation, Inc."
+msgstr ""
+
+#: version.c:47
+msgid ""
+"License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: version.c:86 version2.c:83
+#, c-format
+msgid "GNU bash, version %s (%s)\n"
+msgstr ""
+
+#: version.c:91 version2.c:88
+#, c-format
+msgid "This is free software; you are free to change and redistribute it.\n"
+msgstr ""
+
+#: version.c:92 version2.c:89
+#, c-format
+msgid "There is NO WARRANTY, to the extent permitted by law.\n"
+msgstr ""
+
+#: version2.c:86
+#, c-format
+msgid "Copyright (C) 2009 Free Software Foundation, Inc.\n"
+msgstr ""
+
+#: version2.c:87
+#, c-format
+msgid ""
+"License GPLv2+: GNU GPL version 2 or later <http://gnu.org/licenses/gpl."
+"html>\n"
+msgstr ""
+
+#: xmalloc.c:91
+#, c-format
+msgid "%s: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+
+#: xmalloc.c:93
+#, fuzzy, c-format
+msgid "%s: cannot allocate %lu bytes"
+msgstr "%s:ä¸èƒ½è®€å–: %s"
+
+#: xmalloc.c:163
+#, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"
+msgstr ""
+
+#: xmalloc.c:165
+#, c-format
+msgid "%s: %s:%d: cannot allocate %lu bytes"
+msgstr ""
+
+#: builtins.c:43
+msgid "alias [-p] [name[=value] ... ]"
+msgstr ""
+
+#: builtins.c:47
+msgid "unalias [-a] name [name ...]"
+msgstr ""
+
+#: builtins.c:51
+msgid ""
+"bind [-lpvsPVS] [-m keymap] [-f filename] [-q name] [-u name] [-r keyseq] [-"
+"x keyseq:shell-command] [keyseq:readline-function or readline-command]"
+msgstr ""
+
+#: builtins.c:54
+msgid "break [n]"
+msgstr ""
+
+#: builtins.c:56
+msgid "continue [n]"
+msgstr ""
+
+#: builtins.c:58
+msgid "builtin [shell-builtin [arg ...]]"
+msgstr ""
+
+#: builtins.c:61
+msgid "caller [expr]"
+msgstr ""
+
+#: builtins.c:64
+msgid "cd [-L|-P] [dir]"
+msgstr ""
+
+#: builtins.c:66
+msgid "pwd [-LP]"
+msgstr ""
+
+#: builtins.c:68
+msgid ":"
+msgstr ""
+
+#: builtins.c:70
+msgid "true"
+msgstr ""
+
+#: builtins.c:72
+msgid "false"
+msgstr ""
+
+#: builtins.c:74
+msgid "command [-pVv] command [arg ...]"
+msgstr ""
+
+#: builtins.c:76
+msgid "declare [-aAfFilrtux] [-p] [name[=value] ...]"
+msgstr ""
+
+#: builtins.c:78
+msgid "typeset [-aAfFilrtux] [-p] name[=value] ..."
+msgstr ""
+
+#: builtins.c:80
+msgid "local [option] name[=value] ..."
+msgstr ""
+
+#: builtins.c:83
+msgid "echo [-neE] [arg ...]"
+msgstr ""
+
+#: builtins.c:87
+msgid "echo [-n] [arg ...]"
+msgstr ""
+
+#: builtins.c:90
+msgid "enable [-a] [-dnps] [-f filename] [name ...]"
+msgstr ""
+
+#: builtins.c:92
+msgid "eval [arg ...]"
+msgstr ""
+
+#: builtins.c:94
+msgid "getopts optstring name [arg]"
+msgstr ""
+
+#: builtins.c:96
+msgid "exec [-cl] [-a name] [command [arguments ...]] [redirection ...]"
+msgstr ""
+
+#: builtins.c:98
+msgid "exit [n]"
+msgstr ""
+
+#: builtins.c:100
+msgid "logout [n]"
+msgstr ""
+
+#: builtins.c:103
+msgid "fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]"
+msgstr ""
+
+#: builtins.c:107
+msgid "fg [job_spec]"
+msgstr ""
+
+#: builtins.c:111
+msgid "bg [job_spec ...]"
+msgstr ""
+
+#: builtins.c:114
+msgid "hash [-lr] [-p pathname] [-dt] [name ...]"
+msgstr ""
+
+#: builtins.c:117
+msgid "help [-dms] [pattern ...]"
+msgstr ""
+
+#: builtins.c:121
+msgid ""
+"history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg "
+"[arg...]"
+msgstr ""
+
+#: builtins.c:125
+msgid "jobs [-lnprs] [jobspec ...] or jobs -x command [args]"
+msgstr ""
+
+#: builtins.c:129
+msgid "disown [-h] [-ar] [jobspec ...]"
+msgstr ""
+
+#: builtins.c:132
+msgid ""
+"kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l "
+"[sigspec]"
+msgstr ""
+
+#: builtins.c:134
+msgid "let arg [arg ...]"
+msgstr ""
+
+#: builtins.c:136
+msgid ""
+"read [-ers] [-a array] [-d delim] [-i text] [-n nchars] [-N nchars] [-p "
+"prompt] [-t timeout] [-u fd] [name ...]"
+msgstr ""
+
+#: builtins.c:138
+msgid "return [n]"
+msgstr ""
+
+#: builtins.c:140
+msgid "set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]"
+msgstr ""
+
+#: builtins.c:142
+msgid "unset [-f] [-v] [name ...]"
+msgstr ""
+
+#: builtins.c:144
+msgid "export [-fn] [name[=value] ...] or export -p"
+msgstr ""
+
+#: builtins.c:146
+msgid "readonly [-af] [name[=value] ...] or readonly -p"
+msgstr ""
+
+#: builtins.c:148
+msgid "shift [n]"
+msgstr ""
+
+#: builtins.c:150
+msgid "source filename [arguments]"
+msgstr ""
+
+#: builtins.c:152
+#, fuzzy
+msgid ". filename [arguments]"
+msgstr "太多引數"
+
+#: builtins.c:155
+msgid "suspend [-f]"
+msgstr ""
+
+#: builtins.c:158
+msgid "test [expr]"
+msgstr ""
+
+#: builtins.c:160
+msgid "[ arg... ]"
+msgstr ""
+
+#: builtins.c:162
+msgid "times"
+msgstr ""
+
+#: builtins.c:164
+msgid "trap [-lp] [[arg] signal_spec ...]"
+msgstr ""
+
+#: builtins.c:166
+msgid "type [-afptP] name [name ...]"
+msgstr ""
+
+#: builtins.c:169
+msgid "ulimit [-SHacdefilmnpqrstuvx] [limit]"
+msgstr ""
+
+#: builtins.c:172
+msgid "umask [-p] [-S] [mode]"
+msgstr ""
+
+#: builtins.c:175
+msgid "wait [id]"
+msgstr ""
+
+#: builtins.c:179
+msgid "wait [pid]"
+msgstr ""
+
+#: builtins.c:182
+msgid "for NAME [in WORDS ... ] ; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:184
+msgid "for (( exp1; exp2; exp3 )); do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:186
+msgid "select NAME [in WORDS ... ;] do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:188
+msgid "time [-p] pipeline"
+msgstr ""
+
+#: builtins.c:190
+msgid "case WORD in [PATTERN [| PATTERN]...) COMMANDS ;;]... esac"
+msgstr ""
+
+#: builtins.c:192
+msgid ""
+"if COMMANDS; then COMMANDS; [ elif COMMANDS; then COMMANDS; ]... [ else "
+"COMMANDS; ] fi"
+msgstr ""
+
+#: builtins.c:194
+msgid "while COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:196
+msgid "until COMMANDS; do COMMANDS; done"
+msgstr ""
+
+#: builtins.c:198
+msgid "coproc [NAME] command [redirections]"
+msgstr ""
+
+#: builtins.c:200
+msgid "function name { COMMANDS ; } or name () { COMMANDS ; }"
+msgstr ""
+
+#: builtins.c:202
+msgid "{ COMMANDS ; }"
+msgstr ""
+
+#: builtins.c:204
+msgid "job_spec [&]"
+msgstr ""
+
+#: builtins.c:206
+msgid "(( expression ))"
+msgstr ""
+
+#: builtins.c:208
+msgid "[[ expression ]]"
+msgstr ""
+
+#: builtins.c:210
+msgid "variables - Names and meanings of some shell variables"
+msgstr ""
+
+#: builtins.c:213
+msgid "pushd [-n] [+N | -N | dir]"
+msgstr ""
+
+#: builtins.c:217
+msgid "popd [-n] [+N | -N]"
+msgstr ""
+
+#: builtins.c:221
+msgid "dirs [-clpv] [+N] [-N]"
+msgstr ""
+
+#: builtins.c:224
+msgid "shopt [-pqsu] [-o] [optname ...]"
+msgstr ""
+
+#: builtins.c:226
+msgid "printf [-v var] format [arguments]"
+msgstr ""
+
+#: builtins.c:229
+msgid ""
+"complete [-abcdefgjksuv] [-pr] [-DE] [-o option] [-A action] [-G globpat] [-"
+"W wordlist] [-F function] [-C command] [-X filterpat] [-P prefix] [-S "
+"suffix] [name ...]"
+msgstr ""
+
+#: builtins.c:233
+msgid ""
+"compgen [-abcdefgjksuv] [-o option] [-A action] [-G globpat] [-W wordlist] "
+"[-F function] [-C command] [-X filterpat] [-P prefix] [-S suffix] [word]"
+msgstr ""
+
+#: builtins.c:237
+msgid "compopt [-o|+o option] [-DE] [name ...]"
+msgstr ""
+
+#: builtins.c:240
+msgid ""
+"mapfile [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:242
+msgid ""
+"readarray [-n count] [-O origin] [-s count] [-t] [-u fd] [-C callback] [-c "
+"quantum] [array]"
+msgstr ""
+
+#: builtins.c:254
+#, fuzzy
+msgid ""
+"Define or display aliases.\n"
+" \n"
+" Without arguments, `alias' prints the list of aliases in the reusable\n"
+" form `alias NAME=VALUE' on standard output.\n"
+" \n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded.\n"
+" \n"
+" Options:\n"
+" -p\tPrint all defined aliases in a reusable format\n"
+" \n"
+" Exit Status:\n"
+" alias returns true unless a NAME is supplied for which no alias has "
+"been\n"
+" defined."
+msgstr ""
+"`alias' with no arguments or with the -p option prints the list\n"
+" of aliases in the form alias NAME=VALUE on standard output.\n"
+" Otherwise, an alias is defined for each NAME whose VALUE is given.\n"
+" A trailing space in VALUE causes the next word to be checked for\n"
+" alias substitution when the alias is expanded. Alias returns\n"
+" true unless a NAME is given for which no alias has been defined."
+
+#: builtins.c:276
+msgid ""
+"Remove each NAME from the list of defined aliases.\n"
+" \n"
+" Options:\n"
+" -a\tremove all alias definitions.\n"
+" \n"
+" Return success unless a NAME is not an existing alias."
+msgstr ""
+
+#: builtins.c:289
+msgid ""
+"Set Readline key bindings and variables.\n"
+" \n"
+" Bind a key sequence to a Readline function or a macro, or set a\n"
+" Readline variable. The non-option argument syntax is equivalent to\n"
+" that found in ~/.inputrc, but must be passed as a single argument:\n"
+" e.g., bind '\"\\C-x\\C-r\": re-read-init-file'.\n"
+" \n"
+" Options:\n"
+" -m keymap Use KEYMAP as the keymap for the duration of this\n"
+" command. Acceptable keymap names are emacs,\n"
+" emacs-standard, emacs-meta, emacs-ctlx, vi, vi-"
+"move,\n"
+" vi-command, and vi-insert.\n"
+" -l List names of functions.\n"
+" -P List function names and bindings.\n"
+" -p List functions and bindings in a form that can be\n"
+" reused as input.\n"
+" -S List key sequences that invoke macros and their "
+"values\n"
+" -s List key sequences that invoke macros and their "
+"values\n"
+" in a form that can be reused as input.\n"
+" -V List variable names and values\n"
+" -v List variable names and values in a form that can\n"
+" be reused as input.\n"
+" -q function-name Query about which keys invoke the named function.\n"
+" -u function-name Unbind all keys which are bound to the named "
+"function.\n"
+" -r keyseq Remove the binding for KEYSEQ.\n"
+" -f filename Read key bindings from FILENAME.\n"
+" -x keyseq:shell-command\tCause SHELL-COMMAND to be executed when\n"
+" \t\t\t\tKEYSEQ is entered.\n"
+" \n"
+" Exit Status:\n"
+" bind returns 0 unless an unrecognized option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:326
+msgid ""
+"Exit for, while, or until loops.\n"
+" \n"
+" Exit a FOR, WHILE or UNTIL loop. If N is specified, break N enclosing\n"
+" loops.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+
+#: builtins.c:338
+msgid ""
+"Resume for, while, or until loops.\n"
+" \n"
+" Resumes the next iteration of the enclosing FOR, WHILE or UNTIL loop.\n"
+" If N is specified, resumes the Nth enclosing loop.\n"
+" \n"
+" Exit Status:\n"
+" The exit status is 0 unless N is not greater than or equal to 1."
+msgstr ""
+
+#: builtins.c:350
+msgid ""
+"Execute shell builtins.\n"
+" \n"
+" Execute SHELL-BUILTIN with arguments ARGs without performing command\n"
+" lookup. This is useful when you wish to reimplement a shell builtin\n"
+" as a shell function, but need to execute the builtin within the "
+"function.\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of SHELL-BUILTIN, or false if SHELL-BUILTIN is\n"
+" not a shell builtin.."
+msgstr ""
+
+#: builtins.c:365
+msgid ""
+"Return the context of the current subroutine call.\n"
+" \n"
+" Without EXPR, returns \"$line $filename\". With EXPR, returns\n"
+" \"$line $subroutine $filename\"; this extra information can be used to\n"
+" provide a stack trace.\n"
+" \n"
+" The value of EXPR indicates how many call frames to go back before the\n"
+" current one; the top frame is frame 0.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless the shell is not executing a shell function or EXPR\n"
+" is invalid."
+msgstr ""
+
+#: builtins.c:383
+msgid ""
+"Change the shell working directory.\n"
+" \n"
+" Change the current directory to DIR. The default DIR is the value of "
+"the\n"
+" HOME shell variable.\n"
+" \n"
+" The variable CDPATH defines the search path for the directory "
+"containing\n"
+" DIR. Alternative directory names in CDPATH are separated by a colon "
+"(:).\n"
+" A null directory name is the same as the current directory. If DIR "
+"begins\n"
+" with a slash (/), then CDPATH is not used.\n"
+" \n"
+" If the directory is not found, and the shell option `cdable_vars' is "
+"set,\n"
+" the word is assumed to be a variable name. If that variable has a "
+"value,\n"
+" its value is used for DIR.\n"
+" \n"
+" Options:\n"
+" -L\tforce symbolic links to be followed\n"
+" -P\tuse the physical directory structure without following symbolic\n"
+" \tlinks\n"
+" \n"
+" The default is to follow symbolic links, as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 if the directory is changed; non-zero otherwise."
+msgstr ""
+
+#: builtins.c:411
+msgid ""
+"Print the name of the current working directory.\n"
+" \n"
+" Options:\n"
+" -L\tprint the value of $PWD if it names the current working\n"
+" \tdirectory\n"
+" -P\tprint the physical directory, without any symbolic links\n"
+" \n"
+" By default, `pwd' behaves as if `-L' were specified.\n"
+" \n"
+" Exit Status:\n"
+" Returns 0 unless an invalid option is given or the current directory\n"
+" cannot be read."
+msgstr ""
+
+#: builtins.c:428
+msgid ""
+"Null command.\n"
+" \n"
+" No effect; the command does nothing.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:439
+msgid ""
+"Return a successful result.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:448
+msgid ""
+"Return an unsuccessful result.\n"
+" \n"
+" Exit Status:\n"
+" Always fails."
+msgstr ""
+
+#: builtins.c:457
+msgid ""
+"Execute a simple command or display information about commands.\n"
+" \n"
+" Runs COMMAND with ARGS suppressing shell function lookup, or display\n"
+" information about the specified COMMANDs. Can be used to invoke "
+"commands\n"
+" on disk when a function with the same name exists.\n"
+" \n"
+" Options:\n"
+" -p\tuse a default value for PATH that is guaranteed to find all of\n"
+" \tthe standard utilities\n"
+" -v\tprint a description of COMMAND similar to the `type' builtin\n"
+" -V\tprint a more verbose description of each COMMAND\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of COMMAND, or failure if COMMAND is not found."
+msgstr ""
+
+#: builtins.c:476
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Declare variables and give them attributes. If no NAMEs are given,\n"
+" display the attributes and values of all variables.\n"
+" \n"
+" Options:\n"
+" -f\trestrict action or display to function names and definitions\n"
+" -F\trestrict display to function names only (plus line number and\n"
+" \tsource file when debugging)\n"
+" -p\tdisplay the attributes and value of each NAME\n"
+" \n"
+" Options which set attributes:\n"
+" -a\tto make NAMEs indexed arrays (if supported)\n"
+" -A\tto make NAMEs associative arrays (if supported)\n"
+" -i\tto make NAMEs have the `integer' attribute\n"
+" -l\tto convert NAMEs to lower case on assignment\n"
+" -r\tto make NAMEs readonly\n"
+" -t\tto make NAMEs have the `trace' attribute\n"
+" -u\tto convert NAMEs to upper case on assignment\n"
+" -x\tto make NAMEs export\n"
+" \n"
+" Using `+' instead of `-' turns off the given attribute.\n"
+" \n"
+" Variables with the integer attribute have arithmetic evaluation (see\n"
+" the `let' command) performed when the variable is assigned a value.\n"
+" \n"
+" When used in a function, `declare' makes NAMEs local, as with the "
+"`local'\n"
+" command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:512
+msgid ""
+"Set variable values and attributes.\n"
+" \n"
+" Obsolete. See `help declare'."
+msgstr ""
+
+#: builtins.c:520
+msgid ""
+"Define local variables.\n"
+" \n"
+" Create a local variable called NAME, and give it VALUE. OPTION can\n"
+" be any option accepted by `declare'.\n"
+" \n"
+" Local variables can only be used within a function; they are visible\n"
+" only to the function where they are defined and its children.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied, an error occurs,\n"
+" or the shell is not executing a function."
+msgstr ""
+
+#: builtins.c:537
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" -e\tenable interpretation of the following backslash escapes\n"
+" -E\texplicitly suppress interpretation of backslash escapes\n"
+" \n"
+" `echo' interprets the following backslash-escaped characters:\n"
+" \\a\talert (bell)\n"
+" \\b\tbackspace\n"
+" \\c\tsuppress further output\n"
+" \\e\tescape character\n"
+" \\f\tform feed\n"
+" \\n\tnew line\n"
+" \\r\tcarriage return\n"
+" \\t\thorizontal tab\n"
+" \\v\tvertical tab\n"
+" \\\\\tbackslash\n"
+" \\0nnn\tthe character whose ASCII code is NNN (octal). NNN can be\n"
+" \t0 to 3 octal digits\n"
+" \\xHH\tthe eight-bit character whose value is HH (hexadecimal). HH\n"
+" \tcan be one or two hex digits\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:571
+msgid ""
+"Write arguments to the standard output.\n"
+" \n"
+" Display the ARGs on the standard output followed by a newline.\n"
+" \n"
+" Options:\n"
+" -n\tdo not append a newline\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a write error occurs."
+msgstr ""
+
+#: builtins.c:586
+msgid ""
+"Enable and disable shell builtins.\n"
+" \n"
+" Enables and disables builtin shell commands. Disabling allows you to\n"
+" execute a disk command which has the same name as a shell builtin\n"
+" without using a full pathname.\n"
+" \n"
+" Options:\n"
+" -a\tprint a list of builtins showing whether or not each is enabled\n"
+" -n\tdisable each NAME or display a list of disabled builtins\n"
+" -p\tprint the list of builtins in a reusable format\n"
+" -s\tprint only the names of Posix `special' builtins\n"
+" \n"
+" Options controlling dynamic loading:\n"
+" -f\tLoad builtin NAME from shared object FILENAME\n"
+" -d\tRemove a builtin loaded with -f\n"
+" \n"
+" Without options, each NAME is enabled.\n"
+" \n"
+" To use the `test' found in $PATH instead of the shell builtin\n"
+" version, type `enable -n test'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not a shell builtin or an error occurs."
+msgstr ""
+
+#: builtins.c:614
+msgid ""
+"Execute arguments as a shell command.\n"
+" \n"
+" Combine ARGs into a single string, use the result as input to the "
+"shell,\n"
+" and execute the resulting commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns exit status of command or success if command is null."
+msgstr ""
+
+#: builtins.c:626
+msgid ""
+"Parse option arguments.\n"
+" \n"
+" Getopts is used by shell procedures to parse positional parameters\n"
+" as options.\n"
+" \n"
+" OPTSTRING contains the option letters to be recognized; if a letter\n"
+" is followed by a colon, the option is expected to have an argument,\n"
+" which should be separated from it by white space.\n"
+" \n"
+" Each time it is invoked, getopts will place the next option in the\n"
+" shell variable $name, initializing name if it does not exist, and\n"
+" the index of the next argument to be processed into the shell\n"
+" variable OPTIND. OPTIND is initialized to 1 each time the shell or\n"
+" a shell script is invoked. When an option requires an argument,\n"
+" getopts places that argument into the shell variable OPTARG.\n"
+" \n"
+" getopts reports errors in one of two ways. If the first character\n"
+" of OPTSTRING is a colon, getopts uses silent error reporting. In\n"
+" this mode, no error messages are printed. If an invalid option is\n"
+" seen, getopts places the option character found into OPTARG. If a\n"
+" required argument is not found, getopts places a ':' into NAME and\n"
+" sets OPTARG to the option character found. If getopts is not in\n"
+" silent mode, and an invalid option is seen, getopts places '?' into\n"
+" NAME and unsets OPTARG. If a required argument is not found, a '?'\n"
+" is placed in NAME, OPTARG is unset, and a diagnostic message is\n"
+" printed.\n"
+" \n"
+" If the shell variable OPTERR has the value 0, getopts disables the\n"
+" printing of error messages, even if the first character of\n"
+" OPTSTRING is not a colon. OPTERR has the value 1 by default.\n"
+" \n"
+" Getopts normally parses the positional parameters ($0 - $9), but if\n"
+" more arguments are given, they are parsed instead.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if an option is found; fails if the end of options is\n"
+" encountered or an error occurs."
+msgstr ""
+
+#: builtins.c:668
+msgid ""
+"Replace the shell with the given command.\n"
+" \n"
+" Execute COMMAND, replacing this shell with the specified program.\n"
+" ARGUMENTS become the arguments to COMMAND. If COMMAND is not "
+"specified,\n"
+" any redirections take effect in the current shell.\n"
+" \n"
+" Options:\n"
+" -a name\tpass NAME as the zeroth argument to COMMAND\n"
+" -c\t\texecute COMMAND with an empty environment\n"
+" -l\t\tplace a dash in the zeroth argument to COMMAND\n"
+" \n"
+" If the command cannot be executed, a non-interactive shell exits, "
+"unless\n"
+" the shell option `execfail' is set.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless COMMAND is not found or a redirection error "
+"occurs."
+msgstr ""
+
+#: builtins.c:689
+msgid ""
+"Exit the shell.\n"
+" \n"
+" Exits the shell with a status of N. If N is omitted, the exit status\n"
+" is that of the last command executed."
+msgstr ""
+
+#: builtins.c:698
+msgid ""
+"Exit a login shell.\n"
+" \n"
+" Exits a login shell with exit status N. Returns an error if not "
+"executed\n"
+" in a login shell."
+msgstr ""
+
+#: builtins.c:708
+msgid ""
+"Display or execute commands from the history list.\n"
+" \n"
+" fc is used to list or edit and re-execute commands from the history "
+"list.\n"
+" FIRST and LAST can be numbers specifying the range, or FIRST can be a\n"
+" string, which means the most recent command beginning with that\n"
+" string.\n"
+" \n"
+" Options:\n"
+" -e ENAME\tselect which editor to use. Default is FCEDIT, then "
+"EDITOR,\n"
+" \t\tthen vi\n"
+" -l \tlist lines instead of editing\n"
+" -n\tomit line numbers when listing\n"
+" -r\treverse the order of the lines (newest listed first)\n"
+" \n"
+" With the `fc -s [pat=rep ...] [command]' format, COMMAND is\n"
+" re-executed after the substitution OLD=NEW is performed.\n"
+" \n"
+" A useful alias to use with this is r='fc -s', so that typing `r cc'\n"
+" runs the last command beginning with `cc' and typing `r' re-executes\n"
+" the last command.\n"
+" \n"
+" Exit Status:\n"
+" Returns success or status of executed command; non-zero if an error "
+"occurs."
+msgstr ""
+
+#: builtins.c:738
+msgid ""
+"Move job to the foreground.\n"
+" \n"
+" Place the job identified by JOB_SPEC in the foreground, making it the\n"
+" current job. If JOB_SPEC is not present, the shell's notion of the\n"
+" current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Status of command placed in foreground, or failure if an error occurs."
+msgstr ""
+
+#: builtins.c:753
+msgid ""
+"Move jobs to the background.\n"
+" \n"
+" Place the jobs identified by each JOB_SPEC in the background, as if "
+"they\n"
+" had been started with `&'. If JOB_SPEC is not present, the shell's "
+"notion\n"
+" of the current job is used.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:767
+msgid ""
+"Remember or display program locations.\n"
+" \n"
+" Determine and remember the full pathname of each command NAME. If\n"
+" no arguments are given, information about remembered commands is "
+"displayed.\n"
+" \n"
+" Options:\n"
+" -d\t\tforget the remembered location of each NAME\n"
+" -l\t\tdisplay in a format that may be reused as input\n"
+" -p pathname\tuse PATHNAME is the full pathname of NAME\n"
+" -r\t\tforget all remembered locations\n"
+" -t\t\tprint the remembered location of each NAME, preceding\n"
+" \t\teach location with the corresponding NAME if multiple\n"
+" \t\tNAMEs are given\n"
+" Arguments:\n"
+" NAME\t\tEach NAME is searched for in $PATH and added to the list\n"
+" \t\tof remembered commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is not found or an invalid option is given."
+msgstr ""
+
+#: builtins.c:792
+msgid ""
+"Display information about builtin commands.\n"
+" \n"
+" Displays brief summaries of builtin commands. If PATTERN is\n"
+" specified, gives detailed help on all commands matching PATTERN,\n"
+" otherwise the list of help topics is printed.\n"
+" \n"
+" Options:\n"
+" -d\toutput short description for each topic\n"
+" -m\tdisplay usage in pseudo-manpage format\n"
+" -s\toutput only a short usage synopsis for each topic matching\n"
+" \tPATTERN\n"
+" \n"
+" Arguments:\n"
+" PATTERN\tPattern specifiying a help topic\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless PATTERN is not found or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:816
+msgid ""
+"Display or manipulate the history list.\n"
+" \n"
+" Display the history list with line numbers, prefixing each modified\n"
+" entry with a `*'. An argument of N lists only the last N entries.\n"
+" \n"
+" Options:\n"
+" -c\tclear the history list by deleting all of the entries\n"
+" -d offset\tdelete the history entry at offset OFFSET.\n"
+" \n"
+" -a\tappend history lines from this session to the history file\n"
+" -n\tread all history lines not already read from the history file\n"
+" -r\tread the history file and append the contents to the history\n"
+" \tlist\n"
+" -w\twrite the current history to the history file\n"
+" \tand append them to the history list\n"
+" \n"
+" -p\tperform history expansion on each ARG and display the result\n"
+" \twithout storing it in the history list\n"
+" -s\tappend the ARGs to the history list as a single entry\n"
+" \n"
+" If FILENAME is given, it is used as the history file. Otherwise,\n"
+" if $HISTFILE has a value, that is used, else ~/.bash_history.\n"
+" \n"
+" If the $HISTTIMEFORMAT variable is set and not null, its value is used\n"
+" as a format string for strftime(3) to print the time stamp associated\n"
+" with each displayed history entry. No time stamps are printed "
+"otherwise.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:852
+msgid ""
+"Display status of jobs.\n"
+" \n"
+" Lists the active jobs. JOBSPEC restricts output to that job.\n"
+" Without options, the status of all active jobs is displayed.\n"
+" \n"
+" Options:\n"
+" -l\tlists process IDs in addition to the normal information\n"
+" -n\tlist only processes that have changed status since the last\n"
+" \tnotification\n"
+" -p\tlists process IDs only\n"
+" -r\trestrict output to running jobs\n"
+" -s\trestrict output to stopped jobs\n"
+" \n"
+" If -x is supplied, COMMAND is run after all job specifications that\n"
+" appear in ARGS have been replaced with the process ID of that job's\n"
+" process group leader.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs.\n"
+" If -x is used, returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:879
+msgid ""
+"Remove jobs from current shell.\n"
+" \n"
+" Removes each JOBSPEC argument from the table of active jobs. Without\n"
+" any JOBSPECs, the shell uses its notion of the current job.\n"
+" \n"
+" Options:\n"
+" -a\tremove all jobs if JOBSPEC is not supplied\n"
+" -h\tmark each JOBSPEC so that SIGHUP is not sent to the job if the\n"
+" \tshell receives a SIGHUP\n"
+" -r\tremove only running jobs\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option or JOBSPEC is given."
+msgstr ""
+
+#: builtins.c:898
+msgid ""
+"Send a signal to a job.\n"
+" \n"
+" Send the processes identified by PID or JOBSPEC the signal named by\n"
+" SIGSPEC or SIGNUM. If neither SIGSPEC nor SIGNUM is present, then\n"
+" SIGTERM is assumed.\n"
+" \n"
+" Options:\n"
+" -s sig\tSIG is a signal name\n"
+" -n sig\tSIG is a signal number\n"
+" -l\tlist the signal names; if arguments follow `-l' they are\n"
+" \tassumed to be signal numbers for which names should be listed\n"
+" \n"
+" Kill is a shell builtin for two reasons: it allows job IDs to be used\n"
+" instead of process IDs, and allows processes to be killed if the limit\n"
+" on processes that you can create is reached.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or an error occurs."
+msgstr ""
+
+#: builtins.c:921
+msgid ""
+"Evaluate arithmetic expressions.\n"
+" \n"
+" Evaluate each ARG as an arithmetic expression. Evaluation is done in\n"
+" fixed-width integers with no check for overflow, though division by 0\n"
+" is trapped and flagged as an error. The following list of operators is\n"
+" grouped into levels of equal-precedence operators. The levels are "
+"listed\n"
+" in order of decreasing precedence.\n"
+" \n"
+" \tid++, id--\tvariable post-increment, post-decrement\n"
+" \t++id, --id\tvariable pre-increment, pre-decrement\n"
+" \t-, +\t\tunary minus, plus\n"
+" \t!, ~\t\tlogical and bitwise negation\n"
+" \t**\t\texponentiation\n"
+" \t*, /, %\t\tmultiplication, division, remainder\n"
+" \t+, -\t\taddition, subtraction\n"
+" \t<<, >>\t\tleft and right bitwise shifts\n"
+" \t<=, >=, <, >\tcomparison\n"
+" \t==, !=\t\tequality, inequality\n"
+" \t&\t\tbitwise AND\n"
+" \t^\t\tbitwise XOR\n"
+" \t|\t\tbitwise OR\n"
+" \t&&\t\tlogical AND\n"
+" \t||\t\tlogical OR\n"
+" \texpr ? expr : expr\n"
+" \t\t\tconditional operator\n"
+" \t=, *=, /=, %=,\n"
+" \t+=, -=, <<=, >>=,\n"
+" \t&=, ^=, |=\tassignment\n"
+" \n"
+" Shell variables are allowed as operands. The name of the variable\n"
+" is replaced by its value (coerced to a fixed-width integer) within\n"
+" an expression. The variable need not have its integer attribute\n"
+" turned on to be used in an expression.\n"
+" \n"
+" Operators are evaluated in order of precedence. Sub-expressions in\n"
+" parentheses are evaluated first and may override the precedence\n"
+" rules above.\n"
+" \n"
+" Exit Status:\n"
+" If the last ARG evaluates to 0, let returns 1; let returns 0 otherwise.."
+msgstr ""
+
+#: builtins.c:966
+msgid ""
+"Read a line from the standard input and split it into fields.\n"
+" \n"
+" Reads a single line from the standard input, or from file descriptor FD\n"
+" if the -u option is supplied. The line is split into fields as with "
+"word\n"
+" splitting, and the first word is assigned to the first NAME, the second\n"
+" word to the second NAME, and so on, with any leftover words assigned to\n"
+" the last NAME. Only the characters found in $IFS are recognized as "
+"word\n"
+" delimiters.\n"
+" \n"
+" If no NAMEs are supplied, the line read is stored in the REPLY "
+"variable.\n"
+" \n"
+" Options:\n"
+" -a array\tassign the words read to sequential indices of the array\n"
+" \t\tvariable ARRAY, starting at zero\n"
+" -d delim\tcontinue until the first character of DELIM is read, rather\n"
+" \t\tthan newline\n"
+" -e\t\tuse Readline to obtain the line in an interactive shell\n"
+" -i text\tUse TEXT as the initial text for Readline\n"
+" -n nchars\treturn after reading NCHARS characters rather than waiting\n"
+" \t\tfor a newline, but honor a delimiter if fewer than NCHARS\n"
+" \t\tcharacters are read before the delimiter\n"
+" -N nchars\treturn only after reading exactly NCHARS characters, "
+"unless\n"
+" \t\tEOF is encountered or read times out, ignoring any delimiter\n"
+" -p prompt\toutput the string PROMPT without a trailing newline before\n"
+" \t\tattempting to read\n"
+" -r\t\tdo not allow backslashes to escape any characters\n"
+" -s\t\tdo not echo input coming from a terminal\n"
+" -t timeout\ttime out and return failure if a complete line of input "
+"is\n"
+" \t\tnot read withint TIMEOUT seconds. The value of the TMOUT\n"
+" \t\tvariable is the default timeout. TIMEOUT may be a\n"
+" \t\tfractional number. If TIMEOUT is 0, read returns success only\n"
+" \t\tif input is available on the specified file descriptor. The\n"
+" \t\texit status is greater than 128 if the timeout is exceeded\n"
+" -u fd\t\tread from file descriptor FD instead of the standard input\n"
+" \n"
+" Exit Status:\n"
+" The return code is zero, unless end-of-file is encountered, read times "
+"out,\n"
+" or an invalid file descriptor is supplied as the argument to -u."
+msgstr ""
+
+#: builtins.c:1009
+msgid ""
+"Return from a shell function.\n"
+" \n"
+" Causes a function or sourced script to exit with the return value\n"
+" specified by N. If N is omitted, the return status is that of the\n"
+" last command executed within the function or script.\n"
+" \n"
+" Exit Status:\n"
+" Returns N, or failure if the shell is not executing a function or script."
+msgstr ""
+
+#: builtins.c:1022
+msgid ""
+"Set or unset values of shell options and positional parameters.\n"
+" \n"
+" Change the value of shell attributes and positional parameters, or\n"
+" display the names and values of shell variables.\n"
+" \n"
+" Options:\n"
+" -a Mark variables which are modified or created for export.\n"
+" -b Notify of job termination immediately.\n"
+" -e Exit immediately if a command exits with a non-zero status.\n"
+" -f Disable file name generation (globbing).\n"
+" -h Remember the location of commands as they are looked up.\n"
+" -k All assignment arguments are placed in the environment for a\n"
+" command, not just those that precede the command name.\n"
+" -m Job control is enabled.\n"
+" -n Read commands but do not execute them.\n"
+" -o option-name\n"
+" Set the variable corresponding to option-name:\n"
+" allexport same as -a\n"
+" braceexpand same as -B\n"
+" emacs use an emacs-style line editing interface\n"
+" errexit same as -e\n"
+" errtrace same as -E\n"
+" functrace same as -T\n"
+" hashall same as -h\n"
+" histexpand same as -H\n"
+" history enable command history\n"
+" ignoreeof the shell will not exit upon reading EOF\n"
+" interactive-comments\n"
+" allow comments to appear in interactive commands\n"
+" keyword same as -k\n"
+" monitor same as -m\n"
+" noclobber same as -C\n"
+" noexec same as -n\n"
+" noglob same as -f\n"
+" nolog currently accepted but ignored\n"
+" notify same as -b\n"
+" nounset same as -u\n"
+" onecmd same as -t\n"
+" physical same as -P\n"
+" pipefail the return value of a pipeline is the status of\n"
+" the last command to exit with a non-zero status,\n"
+" or zero if no command exited with a non-zero "
+"status\n"
+" posix change the behavior of bash where the default\n"
+" operation differs from the Posix standard to\n"
+" match the standard\n"
+" privileged same as -p\n"
+" verbose same as -v\n"
+" vi use a vi-style line editing interface\n"
+" xtrace same as -x\n"
+" -p Turned on whenever the real and effective user ids do not match.\n"
+" Disables processing of the $ENV file and importing of shell\n"
+" functions. Turning this option off causes the effective uid and\n"
+" gid to be set to the real uid and gid.\n"
+" -t Exit after reading and executing one command.\n"
+" -u Treat unset variables as an error when substituting.\n"
+" -v Print shell input lines as they are read.\n"
+" -x Print commands and their arguments as they are executed.\n"
+" -B the shell will perform brace expansion\n"
+" -C If set, disallow existing regular files to be overwritten\n"
+" by redirection of output.\n"
+" -E If set, the ERR trap is inherited by shell functions.\n"
+" -H Enable ! style history substitution. This flag is on\n"
+" by default when the shell is interactive.\n"
+" -P If set, do not follow symbolic links when executing commands\n"
+" such as cd which change the current directory.\n"
+" -T If set, the DEBUG trap is inherited by shell functions.\n"
+" - Assign any remaining arguments to the positional parameters.\n"
+" The -x and -v options are turned off.\n"
+" \n"
+" Using + rather than - causes these flags to be turned off. The\n"
+" flags can also be used upon invocation of the shell. The current\n"
+" set of flags may be found in $-. The remaining n ARGs are positional\n"
+" parameters and are assigned, in order, to $1, $2, .. $n. If no\n"
+" ARGs are given, all shell variables are printed.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given."
+msgstr ""
+
+#: builtins.c:1104
+msgid ""
+"Unset values and attributes of shell variables and functions.\n"
+" \n"
+" For each NAME, remove the corresponding variable or function.\n"
+" \n"
+" Options:\n"
+" -f\ttreat each NAME as a shell function\n"
+" -v\ttreat each NAME as a shell variable\n"
+" \n"
+" Without options, unset first tries to unset a variable, and if that "
+"fails,\n"
+" tries to unset a function.\n"
+" \n"
+" Some variables cannot be unset; also see `readonly'.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a NAME is read-only."
+msgstr ""
+
+#: builtins.c:1124
+msgid ""
+"Set export attribute for shell variables.\n"
+" \n"
+" Marks each NAME for automatic export to the environment of subsequently\n"
+" executed commands. If VALUE is supplied, assign VALUE before "
+"exporting.\n"
+" \n"
+" Options:\n"
+" -f\trefer to shell functions\n"
+" -n\tremove the export property from each NAME\n"
+" -p\tdisplay a list of all exported variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1143
+msgid ""
+"Mark shell variables as unchangeable.\n"
+" \n"
+" Mark each NAME as read-only; the values of these NAMEs may not be\n"
+" changed by subsequent assignment. If VALUE is supplied, assign VALUE\n"
+" before marking as read-only.\n"
+" \n"
+" Options:\n"
+" -a\trefer to indexed array variables\n"
+" -A\trefer to associative array variables\n"
+" -f\trefer to shell functions\n"
+" -p\tdisplay a list of all readonly variables and functions\n"
+" \n"
+" An argument of `--' disables further option processing.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or NAME is invalid."
+msgstr ""
+
+#: builtins.c:1164
+msgid ""
+"Shift positional parameters.\n"
+" \n"
+" Rename the positional parameters $N+1,$N+2 ... to $1,$2 ... If N is\n"
+" not given, it is assumed to be 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless N is negative or greater than $#."
+msgstr ""
+
+#: builtins.c:1176 builtins.c:1191
+msgid ""
+"Execute commands from a file in the current shell.\n"
+" \n"
+" Read and execute commands from FILENAME in the current shell. The\n"
+" entries in $PATH are used to find the directory containing FILENAME.\n"
+" If any ARGUMENTS are supplied, they become the positional parameters\n"
+" when FILENAME is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed in FILENAME; fails if\n"
+" FILENAME cannot be read."
+msgstr ""
+
+#: builtins.c:1207
+msgid ""
+"Suspend shell execution.\n"
+" \n"
+" Suspend the execution of this shell until it receives a SIGCONT signal.\n"
+" Unless forced, login shells cannot be suspended.\n"
+" \n"
+" Options:\n"
+" -f\tforce the suspend, even if the shell is a login shell\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless job control is not enabled or an error occurs."
+msgstr ""
+
+#: builtins.c:1223
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" Exits with a status of 0 (true) or 1 (false) depending on\n"
+" the evaluation of EXPR. Expressions may be unary or binary. Unary\n"
+" expressions are often used to examine the status of a file. There\n"
+" are string operators as well, and numeric comparison operators.\n"
+" \n"
+" File operators:\n"
+" \n"
+" -a FILE True if file exists.\n"
+" -b FILE True if file is block special.\n"
+" -c FILE True if file is character special.\n"
+" -d FILE True if file is a directory.\n"
+" -e FILE True if file exists.\n"
+" -f FILE True if file exists and is a regular file.\n"
+" -g FILE True if file is set-group-id.\n"
+" -h FILE True if file is a symbolic link.\n"
+" -L FILE True if file is a symbolic link.\n"
+" -k FILE True if file has its `sticky' bit set.\n"
+" -p FILE True if file is a named pipe.\n"
+" -r FILE True if file is readable by you.\n"
+" -s FILE True if file exists and is not empty.\n"
+" -S FILE True if file is a socket.\n"
+" -t FD True if FD is opened on a terminal.\n"
+" -u FILE True if the file is set-user-id.\n"
+" -w FILE True if the file is writable by you.\n"
+" -x FILE True if the file is executable by you.\n"
+" -O FILE True if the file is effectively owned by you.\n"
+" -G FILE True if the file is effectively owned by your group.\n"
+" -N FILE True if the file has been modified since it was last "
+"read.\n"
+" \n"
+" FILE1 -nt FILE2 True if file1 is newer than file2 (according to\n"
+" modification date).\n"
+" \n"
+" FILE1 -ot FILE2 True if file1 is older than file2.\n"
+" \n"
+" FILE1 -ef FILE2 True if file1 is a hard link to file2.\n"
+" \n"
+" String operators:\n"
+" \n"
+" -z STRING True if string is empty.\n"
+" \n"
+" -n STRING\n"
+" STRING True if string is not empty.\n"
+" \n"
+" STRING1 = STRING2\n"
+" True if the strings are equal.\n"
+" STRING1 != STRING2\n"
+" True if the strings are not equal.\n"
+" STRING1 < STRING2\n"
+" True if STRING1 sorts before STRING2 "
+"lexicographically.\n"
+" STRING1 > STRING2\n"
+" True if STRING1 sorts after STRING2 lexicographically.\n"
+" \n"
+" Other operators:\n"
+" \n"
+" -o OPTION True if the shell option OPTION is enabled.\n"
+" ! EXPR True if expr is false.\n"
+" EXPR1 -a EXPR2 True if both expr1 AND expr2 are true.\n"
+" EXPR1 -o EXPR2 True if either expr1 OR expr2 is true.\n"
+" \n"
+" arg1 OP arg2 Arithmetic tests. OP is one of -eq, -ne,\n"
+" -lt, -le, -gt, or -ge.\n"
+" \n"
+" Arithmetic binary operators return true if ARG1 is equal, not-equal,\n"
+" less-than, less-than-or-equal, greater-than, or greater-than-or-equal\n"
+" than ARG2.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if EXPR evaluates to true; fails if EXPR evaluates to\n"
+" false or an invalid argument is given."
+msgstr ""
+
+#: builtins.c:1299
+msgid ""
+"Evaluate conditional expression.\n"
+" \n"
+" This is a synonym for the \"test\" builtin, but the last argument must\n"
+" be a literal `]', to match the opening `['."
+msgstr ""
+
+#: builtins.c:1308
+msgid ""
+"Display process times.\n"
+" \n"
+" Prints the accumulated user and system times for the shell and all of "
+"its\n"
+" child processes.\n"
+" \n"
+" Exit Status:\n"
+" Always succeeds."
+msgstr ""
+
+#: builtins.c:1320
+msgid ""
+"Trap signals and other events.\n"
+" \n"
+" Defines and activates handlers to be run when the shell receives "
+"signals\n"
+" or other conditions.\n"
+" \n"
+" ARG is a command to be read and executed when the shell receives the\n"
+" signal(s) SIGNAL_SPEC. If ARG is absent (and a single SIGNAL_SPEC\n"
+" is supplied) or `-', each specified signal is reset to its original\n"
+" value. If ARG is the null string each SIGNAL_SPEC is ignored by the\n"
+" shell and by the commands it invokes.\n"
+" \n"
+" If a SIGNAL_SPEC is EXIT (0) ARG is executed on exit from the shell. "
+"If\n"
+" a SIGNAL_SPEC is DEBUG, ARG is executed before every simple command.\n"
+" \n"
+" If no arguments are supplied, trap prints the list of commands "
+"associated\n"
+" with each signal.\n"
+" \n"
+" Options:\n"
+" -l\tprint a list of signal names and their corresponding numbers\n"
+" -p\tdisplay the trap commands associated with each SIGNAL_SPEC\n"
+" \n"
+" Each SIGNAL_SPEC is either a signal name in <signal.h> or a signal "
+"number.\n"
+" Signal names are case insensitive and the SIG prefix is optional. A\n"
+" signal may be sent to the shell with \"kill -signal $$\".\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless a SIGSPEC is invalid or an invalid option is "
+"given."
+msgstr ""
+
+#: builtins.c:1352
+msgid ""
+"Display information about command type.\n"
+" \n"
+" For each NAME, indicate how it would be interpreted if used as a\n"
+" command name.\n"
+" \n"
+" Options:\n"
+" -a\tdisplay all locations containing an executable named NAME;\n"
+" \tincludes aliases, builtins, and functions, if and only if\n"
+" \tthe `-p' option is not also used\n"
+" -f\tsuppress shell function lookup\n"
+" -P\tforce a PATH search for each NAME, even if it is an alias,\n"
+" \tbuiltin, or function, and returns the name of the disk file\n"
+" \tthat would be executed\n"
+" -p\treturns either the name of the disk file that would be executed,\n"
+" \tor nothing if `type -t NAME' would not return `file'.\n"
+" -t\toutput a single word which is one of `alias', `keyword',\n"
+" \t`function', `builtin', `file' or `', if NAME is an alias, shell\n"
+" \treserved word, shell function, shell builtin, disk file, or not\n"
+" \tfound, respectively\n"
+" \n"
+" Arguments:\n"
+" NAME\tCommand name to be interpreted.\n"
+" \n"
+" Exit Status:\n"
+" Returns success if all of the NAMEs are found; fails if any are not "
+"found."
+msgstr ""
+
+#: builtins.c:1383
+msgid ""
+"Modify shell resource limits.\n"
+" \n"
+" Provides control over the resources available to the shell and "
+"processes\n"
+" it creates, on systems that allow such control.\n"
+" \n"
+" Options:\n"
+" -S\tuse the `soft' resource limit\n"
+" -H\tuse the `hard' resource limit\n"
+" -a\tall current limits are reported\n"
+" -b\tthe socket buffer size\n"
+" -c\tthe maximum size of core files created\n"
+" -d\tthe maximum size of a process's data segment\n"
+" -e\tthe maximum scheduling priority (`nice')\n"
+" -f\tthe maximum size of files written by the shell and its children\n"
+" -i\tthe maximum number of pending signals\n"
+" -l\tthe maximum size a process may lock into memory\n"
+" -m\tthe maximum resident set size\n"
+" -n\tthe maximum number of open file descriptors\n"
+" -p\tthe pipe buffer size\n"
+" -q\tthe maximum number of bytes in POSIX message queues\n"
+" -r\tthe maximum real-time scheduling priority\n"
+" -s\tthe maximum stack size\n"
+" -t\tthe maximum amount of cpu time in seconds\n"
+" -u\tthe maximum number of user processes\n"
+" -v\tthe size of virtual memory\n"
+" -x\tthe maximum number of file locks\n"
+" \n"
+" If LIMIT is given, it is the new value of the specified resource; the\n"
+" special LIMIT values `soft', `hard', and `unlimited' stand for the\n"
+" current soft limit, the current hard limit, and no limit, respectively.\n"
+" Otherwise, the current value of the specified resource is printed. If\n"
+" no option is given, then -f is assumed.\n"
+" \n"
+" Values are in 1024-byte increments, except for -t, which is in seconds,\n"
+" -p, which is in increments of 512 bytes, and -u, which is an unscaled\n"
+" number of processes.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1428
+msgid ""
+"Display or set file mode mask.\n"
+" \n"
+" Sets the user file-creation mask to MODE. If MODE is omitted, prints\n"
+" the current value of the mask.\n"
+" \n"
+" If MODE begins with a digit, it is interpreted as an octal number;\n"
+" otherwise it is a symbolic mode string like that accepted by chmod(1).\n"
+" \n"
+" Options:\n"
+" -p\tif MODE is omitted, output in a form that may be reused as input\n"
+" -S\tmakes the output symbolic; otherwise an octal number is output\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless MODE is invalid or an invalid option is given."
+msgstr ""
+
+#: builtins.c:1448
+msgid ""
+"Wait for job completion and return exit status.\n"
+" \n"
+" Waits for the process identified by ID, which may be a process ID or a\n"
+" job specification, and reports its termination status. If ID is not\n"
+" given, waits for all currently active child processes, and the return\n"
+" status is zero. If ID is a a job specification, waits for all "
+"processes\n"
+" in the job's pipeline.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1466
+msgid ""
+"Wait for process completion and return exit status.\n"
+" \n"
+" Waits for the specified process and reports its termination status. If\n"
+" PID is not given, all currently active child processes are waited for,\n"
+" and the return code is zero. PID must be a process ID.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of ID; fails if ID is invalid or an invalid option "
+"is\n"
+" given."
+msgstr ""
+
+#: builtins.c:1481
+msgid ""
+"Execute commands for each member in a list.\n"
+" \n"
+" The `for' loop executes a sequence of commands for each member in a\n"
+" list of items. If `in WORDS ...;' is not present, then `in \"$@\"' is\n"
+" assumed. For each element in WORDS, NAME is set to that element, and\n"
+" the COMMANDS are executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1495
+msgid ""
+"Arithmetic for loop.\n"
+" \n"
+" Equivalent to\n"
+" \t(( EXP1 ))\n"
+" \twhile (( EXP2 )); do\n"
+" \t\tCOMMANDS\n"
+" \t\t(( EXP3 ))\n"
+" \tdone\n"
+" EXP1, EXP2, and EXP3 are arithmetic expressions. If any expression is\n"
+" omitted, it behaves as if it evaluates to 1.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1513
+msgid ""
+"Select words from a list and execute commands.\n"
+" \n"
+" The WORDS are expanded, generating a list of words. The\n"
+" set of expanded words is printed on the standard error, each\n"
+" preceded by a number. If `in WORDS' is not present, `in \"$@\"'\n"
+" is assumed. The PS3 prompt is then displayed and a line read\n"
+" from the standard input. If the line consists of the number\n"
+" corresponding to one of the displayed words, then NAME is set\n"
+" to that word. If the line is empty, WORDS and the prompt are\n"
+" redisplayed. If EOF is read, the command completes. Any other\n"
+" value read causes NAME to be set to null. The line read is saved\n"
+" in the variable REPLY. COMMANDS are executed after each selection\n"
+" until a break command is executed.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1534
+msgid ""
+"Report time consumed by pipeline's execution.\n"
+" \n"
+" Execute PIPELINE and print a summary of the real time, user CPU time,\n"
+" and system CPU time spent executing PIPELINE when it terminates.\n"
+" \n"
+" Options:\n"
+" -p\tprint the timing summary in the portable Posix format\n"
+" \n"
+" The value of the TIMEFORMAT variable is used as the output format.\n"
+" \n"
+" Exit Status:\n"
+" The return status is the return status of PIPELINE."
+msgstr ""
+
+#: builtins.c:1551
+msgid ""
+"Execute commands based on pattern matching.\n"
+" \n"
+" Selectively execute COMMANDS based upon WORD matching PATTERN. The\n"
+" `|' is used to separate multiple patterns.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1563
+msgid ""
+"Execute commands based on conditional.\n"
+" \n"
+" The `if COMMANDS' list is executed. If its exit status is zero, then "
+"the\n"
+" `then COMMANDS' list is executed. Otherwise, each `elif COMMANDS' list "
+"is\n"
+" executed in turn, and if its exit status is zero, the corresponding\n"
+" `then COMMANDS' list is executed and the if command completes. "
+"Otherwise,\n"
+" the `else COMMANDS' list is executed, if present. The exit status of "
+"the\n"
+" entire construct is the exit status of the last command executed, or "
+"zero\n"
+" if no condition tested true.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1580
+msgid ""
+"Execute commands as long as a test succeeds.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `while' COMMANDS has an exit status of zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1592
+msgid ""
+"Execute commands as long as a test does not succeed.\n"
+" \n"
+" Expand and execute COMMANDS as long as the final command in the\n"
+" `until' COMMANDS has an exit status which is not zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1604
+msgid ""
+"Create a coprocess named NAME.\n"
+" \n"
+" Execute COMMAND asynchronously, with the standard output and standard\n"
+" input of the command connected via a pipe to file descriptors assigned\n"
+" to indices 0 and 1 of an array variable NAME in the executing shell.\n"
+" The default NAME is \"COPROC\".\n"
+" \n"
+" Exit Status:\n"
+" Returns the exit status of COMMAND."
+msgstr ""
+
+#: builtins.c:1618
+msgid ""
+"Define shell function.\n"
+" \n"
+" Create a shell function named NAME. When invoked as a simple command,\n"
+" NAME runs COMMANDs in the calling shell's context. When NAME is "
+"invoked,\n"
+" the arguments are passed to the function as $1...$n, and the function's\n"
+" name is in $FUNCNAME.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless NAME is readonly."
+msgstr ""
+
+#: builtins.c:1632
+msgid ""
+"Group commands as a unit.\n"
+" \n"
+" Run a set of commands in a group. This is one way to redirect an\n"
+" entire set of commands.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the last command executed."
+msgstr ""
+
+#: builtins.c:1644
+msgid ""
+"Resume job in foreground.\n"
+" \n"
+" Equivalent to the JOB_SPEC argument to the `fg' command. Resume a\n"
+" stopped or background job. JOB_SPEC can specify either a job name\n"
+" or a job number. Following JOB_SPEC with a `&' places the job in\n"
+" the background, as if the job specification had been supplied as an\n"
+" argument to `bg'.\n"
+" \n"
+" Exit Status:\n"
+" Returns the status of the resumed job."
+msgstr ""
+
+#: builtins.c:1659
+msgid ""
+"Evaluate arithmetic expression.\n"
+" \n"
+" The EXPRESSION is evaluated according to the rules for arithmetic\n"
+" evaluation. Equivalent to \"let EXPRESSION\".\n"
+" \n"
+" Exit Status:\n"
+" Returns 1 if EXPRESSION evaluates to 0; returns 0 otherwise."
+msgstr ""
+
+#: builtins.c:1671
+msgid ""
+"Execute conditional command.\n"
+" \n"
+" Returns a status of 0 or 1 depending on the evaluation of the "
+"conditional\n"
+" expression EXPRESSION. Expressions are composed of the same primaries "
+"used\n"
+" by the `test' builtin, and may be combined using the following "
+"operators:\n"
+" \n"
+" ( EXPRESSION )\tReturns the value of EXPRESSION\n"
+" ! EXPRESSION\t\tTrue if EXPRESSION is false; else false\n"
+" EXPR1 && EXPR2\tTrue if both EXPR1 and EXPR2 are true; else false\n"
+" EXPR1 || EXPR2\tTrue if either EXPR1 or EXPR2 is true; else false\n"
+" \n"
+" When the `==' and `!=' operators are used, the string to the right of\n"
+" the operator is used as a pattern and pattern matching is performed.\n"
+" When the `=~' operator is used, the string to the right of the operator\n"
+" is matched as a regular expression.\n"
+" \n"
+" The && and || operators do not evaluate EXPR2 if EXPR1 is sufficient to\n"
+" determine the expression's value.\n"
+" \n"
+" Exit Status:\n"
+" 0 or 1 depending on value of EXPRESSION."
+msgstr ""
+
+#: builtins.c:1697
+msgid ""
+"Common shell variable names and usage.\n"
+" \n"
+" BASH_VERSION\tVersion information for this Bash.\n"
+" CDPATH\tA colon-separated list of directories to search\n"
+" \t\tfor directories given as arguments to `cd'.\n"
+" GLOBIGNORE\tA colon-separated list of patterns describing filenames to\n"
+" \t\tbe ignored by pathname expansion.\n"
+" HISTFILE\tThe name of the file where your command history is stored.\n"
+" HISTFILESIZE\tThe maximum number of lines this file can contain.\n"
+" HISTSIZE\tThe maximum number of history lines that a running\n"
+" \t\tshell can access.\n"
+" HOME\tThe complete pathname to your login directory.\n"
+" HOSTNAME\tThe name of the current host.\n"
+" HOSTTYPE\tThe type of CPU this version of Bash is running under.\n"
+" IGNOREEOF\tControls the action of the shell on receipt of an EOF\n"
+" \t\tcharacter as the sole input. If set, then the value\n"
+" \t\tof it is the number of EOF characters that can be seen\n"
+" \t\tin a row on an empty line before the shell will exit\n"
+" \t\t(default 10). When unset, EOF signifies the end of input.\n"
+" MACHTYPE\tA string describing the current system Bash is running on.\n"
+" MAILCHECK\tHow often, in seconds, Bash checks for new mail.\n"
+" MAILPATH\tA colon-separated list of filenames which Bash checks\n"
+" \t\tfor new mail.\n"
+" OSTYPE\tThe version of Unix this version of Bash is running on.\n"
+" PATH\tA colon-separated list of directories to search when\n"
+" \t\tlooking for commands.\n"
+" PROMPT_COMMAND\tA command to be executed before the printing of each\n"
+" \t\tprimary prompt.\n"
+" PS1\t\tThe primary prompt string.\n"
+" PS2\t\tThe secondary prompt string.\n"
+" PWD\t\tThe full pathname of the current directory.\n"
+" SHELLOPTS\tA colon-separated list of enabled shell options.\n"
+" TERM\tThe name of the current terminal type.\n"
+" TIMEFORMAT\tThe output format for timing statistics displayed by the\n"
+" \t\t`time' reserved word.\n"
+" auto_resume\tNon-null means a command word appearing on a line by\n"
+" \t\titself is first looked for in the list of currently\n"
+" \t\tstopped jobs. If found there, that job is foregrounded.\n"
+" \t\tA value of `exact' means that the command word must\n"
+" \t\texactly match a command in the list of stopped jobs. A\n"
+" \t\tvalue of `substring' means that the command word must\n"
+" \t\tmatch a substring of the job. Any other value means that\n"
+" \t\tthe command must be a prefix of a stopped job.\n"
+" histchars\tCharacters controlling history expansion and quick\n"
+" \t\tsubstitution. The first character is the history\n"
+" \t\tsubstitution character, usually `!'. The second is\n"
+" \t\tthe `quick substitution' character, usually `^'. The\n"
+" \t\tthird is the `history comment' character, usually `#'.\n"
+" HISTIGNORE\tA colon-separated list of patterns used to decide which\n"
+" \t\tcommands should be saved on the history list.\n"
+msgstr ""
+
+#: builtins.c:1754
+msgid ""
+"Add directories to stack.\n"
+" \n"
+" Adds a directory to the top of the directory stack, or rotates\n"
+" the stack, making the new top of the stack the current working\n"
+" directory. With no arguments, exchanges the top two directories.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when adding\n"
+" \tdirectories to the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the left of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" -N\tRotates the stack so that the Nth directory (counting\n"
+" \tfrom the right of the list shown by `dirs', starting with\n"
+" \tzero) is at the top.\n"
+" \n"
+" dir\tAdds DIR to the directory stack at the top, making it the\n"
+" \tnew current working directory.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1788
+msgid ""
+"Remove directories from stack.\n"
+" \n"
+" Removes entries from the directory stack. With no arguments, removes\n"
+" the top directory from the stack, and changes to the new top directory.\n"
+" \n"
+" Options:\n"
+" -n\tSuppresses the normal change of directory when removing\n"
+" \tdirectories from the stack, so only the stack is manipulated.\n"
+" \n"
+" Arguments:\n"
+" +N\tRemoves the Nth entry counting from the left of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd +0'\n"
+" \tremoves the first directory, `popd +1' the second.\n"
+" \n"
+" -N\tRemoves the Nth entry counting from the right of the list\n"
+" \tshown by `dirs', starting with zero. For example: `popd -0'\n"
+" \tremoves the last directory, `popd -1' the next to last.\n"
+" \n"
+" The `dirs' builtin displays the directory stack.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid argument is supplied or the directory\n"
+" change fails."
+msgstr ""
+
+#: builtins.c:1818
+msgid ""
+"Display directory stack.\n"
+" \n"
+" Display the list of currently remembered directories. Directories\n"
+" find their way onto the list with the `pushd' command; you can get\n"
+" back up through the list with the `popd' command.\n"
+" \n"
+" Options:\n"
+" -c\tclear the directory stack by deleting all of the elements\n"
+" -l\tdo not print tilde-prefixed versions of directories relative\n"
+" \tto your home directory\n"
+" -p\tprint the directory stack with one entry per line\n"
+" -v\tprint the directory stack with one entry per line prefixed\n"
+" \twith its position in the stack\n"
+" \n"
+" Arguments:\n"
+" +N\tDisplays the Nth entry counting from the left of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" -N\tDisplays the Nth entry counting from the right of the list shown "
+"by\n"
+" \tdirs when invoked without options, starting with zero.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1847
+msgid ""
+"Set and unset shell options.\n"
+" \n"
+" Change the setting of each shell option OPTNAME. Without any option\n"
+" arguments, list all shell options with an indication of whether or not "
+"each\n"
+" is set.\n"
+" \n"
+" Options:\n"
+" -o\trestrict OPTNAMEs to those defined for use with `set -o'\n"
+" -p\tprint each shell option with an indication of its status\n"
+" -q\tsuppress output\n"
+" -s\tenable (set) each OPTNAME\n"
+" -u\tdisable (unset) each OPTNAME\n"
+" \n"
+" Exit Status:\n"
+" Returns success if OPTNAME is enabled; fails if an invalid option is\n"
+" given or OPTNAME is disabled."
+msgstr ""
+
+#: builtins.c:1868
+msgid ""
+"Formats and prints ARGUMENTS under control of the FORMAT.\n"
+" \n"
+" Options:\n"
+" -v var\tassign the output to shell variable VAR rather than\n"
+" \t\tdisplay it on the standard output\n"
+" \n"
+" FORMAT is a character string which contains three types of objects: "
+"plain\n"
+" characters, which are simply copied to standard output; character "
+"escape\n"
+" sequences, which are converted and copied to the standard output; and\n"
+" format specifications, each of which causes printing of the next "
+"successive\n"
+" argument.\n"
+" \n"
+" In addition to the standard format specifications described in printf"
+"(1)\n"
+" and printf(3), printf interprets:\n"
+" \n"
+" %b\texpand backslash escape sequences in the corresponding argument\n"
+" %q\tquote the argument in a way that can be reused as shell input\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or a write or "
+"assignment\n"
+" error occurs."
+msgstr ""
+
+#: builtins.c:1895
+msgid ""
+"Specify how arguments are to be completed by Readline.\n"
+" \n"
+" For each NAME, specify how arguments are to be completed. If no "
+"options\n"
+" are supplied, existing completion specifications are printed in a way "
+"that\n"
+" allows them to be reused as input.\n"
+" \n"
+" Options:\n"
+" -p\tprint existing completion specifications in a reusable format\n"
+" -r\tremove a completion specification for each NAME, or, if no\n"
+" \tNAMEs are supplied, all completion specifications\n"
+" -D\tapply the completions and actions as the default for commands\n"
+" \twithout any specific completion defined\n"
+" -E\tapply the completions and actions to \"empty\" commands --\n"
+" \tcompletion attempted on a blank line\n"
+" \n"
+" When completion is attempted, the actions are applied in the order the\n"
+" uppercase-letter options are listed above. The -D option takes\n"
+" precedence over -E.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1923
+msgid ""
+"Display possible completions depending on the options.\n"
+" \n"
+" Intended to be used from within a shell function generating possible\n"
+" completions. If the optional WORD argument is supplied, matches "
+"against\n"
+" WORD are generated.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or an error occurs."
+msgstr ""
+
+#: builtins.c:1938
+msgid ""
+"Modify or display completion options.\n"
+" \n"
+" Modify the completion options for each NAME, or, if no NAMEs are "
+"supplied,\n"
+" the completion currently begin executed. If no OPTIONs are givenm, "
+"print\n"
+" the completion options for each NAME or the current completion "
+"specification.\n"
+" \n"
+" Options:\n"
+" \t-o option\tSet completion option OPTION for each NAME\n"
+" \t-D\t\tChange options for the \"default\" command completion\n"
+" \t-E\t\tChange options for the \"empty\" command completion\n"
+" \n"
+" Using `+o' instead of `-o' turns off the specified option.\n"
+" \n"
+" Arguments:\n"
+" \n"
+" Each NAME refers to a command for which a completion specification must\n"
+" have previously been defined using the `complete' builtin. If no NAMEs\n"
+" are supplied, compopt must be called by a function currently generating\n"
+" completions, and the options for that currently-executing completion\n"
+" generator are modified.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is supplied or NAME does not\n"
+" have a completion specification defined."
+msgstr ""
+
+#: builtins.c:1968
+msgid ""
+"Read lines from the standard input into an indexed array variable.\n"
+" \n"
+" Read lines from the standard input into the indexed array variable "
+"ARRAY, or\n"
+" from file descriptor FD if the -u option is supplied. The variable "
+"MAPFILE\n"
+" is the default ARRAY.\n"
+" \n"
+" Options:\n"
+" -n count\tCopy at most COUNT lines. If COUNT is 0, all lines are "
+"copied.\n"
+" -O origin\tBegin assigning to ARRAY at index ORIGIN. The default "
+"index is 0.\n"
+" -s count \tDiscard the first COUNT lines read.\n"
+" -t\t\tRemove a trailing newline from each line read.\n"
+" -u fd\t\tRead lines from file descriptor FD instead of the standard "
+"input.\n"
+" -C callback\tEvaluate CALLBACK each time QUANTUM lines are read.\n"
+" -c quantum\tSpecify the number of lines read between each call to "
+"CALLBACK.\n"
+" \n"
+" Arguments:\n"
+" ARRAY\t\tArray variable name to use for file data.\n"
+" \n"
+" If -C is supplied without -c, the default quantum is 5000. When\n"
+" CALLBACK is evaluated, it is supplied the index of the next array\n"
+" element to be assigned as an additional argument.\n"
+" \n"
+" If not supplied with an explicit origin, mapfile will clear ARRAY "
+"before\n"
+" assigning to it.\n"
+" \n"
+" Exit Status:\n"
+" Returns success unless an invalid option is given or ARRAY is readonly "
+"or\n"
+" not an indexed array."
+msgstr ""
+
+#: builtins.c:2001
+msgid ""
+"Read lines from a file into an array variable.\n"
+" \n"
+" A synonym for `mapfile'."
+msgstr ""
+
+#~ msgid "requesting resize"
+#~ msgstr "è¦æ±‚調整"
+
+#~ msgid "just resized"
+#~ msgstr "åªæ˜¯å¤§å°"
+
+#~ msgid "bug: unknown operation"
+#~ msgstr "bug:未知æ“作"
diff --git a/print_cmd.c b/print_cmd.c
new file mode 100644
index 0000000..b8fb0a2
--- /dev/null
+++ b/print_cmd.c
@@ -0,0 +1,1540 @@
+/* print_command -- A way to make readable commands from a command tree. */
+
+/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include <stdio.h>
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#if defined (PREFER_STDARG)
+# include <stdarg.h>
+#else
+# include <varargs.h>
+#endif
+
+#include "bashansi.h"
+#include "bashintl.h"
+
+#include "shell.h"
+#include "flags.h"
+#include <y.tab.h> /* use <...> so we pick it up from the build directory */
+
+#include "shmbutil.h"
+
+#include "builtins/common.h"
+
+#if !HAVE_DECL_PRINTF
+extern int printf __P((const char *, ...)); /* Yuck. Double yuck. */
+#endif
+
+extern int indirection_level;
+
+static int indentation;
+static int indentation_amount = 4;
+
+#if defined (PREFER_STDARG)
+typedef void PFUNC __P((const char *, ...));
+
+static void cprintf __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2)));
+static void xprintf __P((const char *, ...)) __attribute__((__format__ (printf, 1, 2)));
+#else
+#define PFUNC VFunction
+static void cprintf ();
+static void xprintf ();
+#endif
+
+static void reset_locals __P((void));
+static void newline __P((char *));
+static void indent __P((int));
+static void semicolon __P((void));
+static void the_printed_command_resize __P((int));
+
+static void make_command_string_internal __P((COMMAND *));
+static void _print_word_list __P((WORD_LIST *, char *, PFUNC *));
+static void command_print_word_list __P((WORD_LIST *, char *));
+static void print_case_clauses __P((PATTERN_LIST *));
+static void print_redirection_list __P((REDIRECT *));
+static void print_redirection __P((REDIRECT *));
+static void print_heredoc_header __P((REDIRECT *));
+static void print_heredoc_body __P((REDIRECT *));
+static void print_heredocs __P((REDIRECT *));
+static void print_deferred_heredocs __P((const char *));
+
+static void print_for_command __P((FOR_COM *));
+#if defined (ARITH_FOR_COMMAND)
+static void print_arith_for_command __P((ARITH_FOR_COM *));
+#endif
+#if defined (SELECT_COMMAND)
+static void print_select_command __P((SELECT_COM *));
+#endif
+static void print_group_command __P((GROUP_COM *));
+static void print_case_command __P((CASE_COM *));
+static void print_while_command __P((WHILE_COM *));
+static void print_until_command __P((WHILE_COM *));
+static void print_until_or_while __P((WHILE_COM *, char *));
+static void print_if_command __P((IF_COM *));
+#if defined (COND_COMMAND)
+static void print_cond_node __P((COND_COM *));
+#endif
+static void print_function_def __P((FUNCTION_DEF *));
+
+#define PRINTED_COMMAND_INITIAL_SIZE 64
+#define PRINTED_COMMAND_GROW_SIZE 128
+
+char *the_printed_command = (char *)NULL;
+int the_printed_command_size = 0;
+int command_string_index = 0;
+
+int xtrace_fd = -1;
+FILE *xtrace_fp = 0;
+
+#define CHECK_XTRACE_FP xtrace_fp = (xtrace_fp ? xtrace_fp : stderr)
+
+#define PRINT_DEFERRED_HEREDOCS(x) \
+ do { \
+ if (deferred_heredocs) \
+ print_deferred_heredocs (x); \
+ } while (0)
+
+/* Non-zero means the stuff being printed is inside of a function def. */
+static int inside_function_def;
+static int skip_this_indent;
+static int was_heredoc;
+static int printing_connection;
+static REDIRECT *deferred_heredocs;
+
+/* The depth of the group commands that we are currently printing. This
+ includes the group command that is a function body. */
+static int group_command_nesting;
+
+/* A buffer to indicate the indirection level (PS4) when set -x is enabled. */
+static char indirection_string[100];
+
+/* Print COMMAND (a command tree) on standard output. */
+void
+print_command (command)
+ COMMAND *command;
+{
+ command_string_index = 0;
+ printf ("%s", make_command_string (command));
+}
+
+/* Make a string which is the printed representation of the command
+ tree in COMMAND. We return this string. However, the string is
+ not consed, so you have to do that yourself if you want it to
+ remain around. */
+char *
+make_command_string (command)
+ COMMAND *command;
+{
+ command_string_index = was_heredoc = 0;
+ deferred_heredocs = 0;
+ make_command_string_internal (command);
+ return (the_printed_command);
+}
+
+/* The internal function. This is the real workhorse. */
+static void
+make_command_string_internal (command)
+ COMMAND *command;
+{
+ char s[3], *op;
+
+ if (command == 0)
+ cprintf ("");
+ else
+ {
+ if (skip_this_indent)
+ skip_this_indent--;
+ else
+ indent (indentation);
+
+ if (command->flags & CMD_TIME_PIPELINE)
+ {
+ cprintf ("time ");
+ if (command->flags & CMD_TIME_POSIX)
+ cprintf ("-p ");
+ }
+
+ if (command->flags & CMD_INVERT_RETURN)
+ cprintf ("! ");
+
+ switch (command->type)
+ {
+ case cm_for:
+ print_for_command (command->value.For);
+ break;
+
+#if defined (ARITH_FOR_COMMAND)
+ case cm_arith_for:
+ print_arith_for_command (command->value.ArithFor);
+ break;
+#endif
+
+#if defined (SELECT_COMMAND)
+ case cm_select:
+ print_select_command (command->value.Select);
+ break;
+#endif
+
+ case cm_case:
+ print_case_command (command->value.Case);
+ break;
+
+ case cm_while:
+ print_while_command (command->value.While);
+ break;
+
+ case cm_until:
+ print_until_command (command->value.While);
+ break;
+
+ case cm_if:
+ print_if_command (command->value.If);
+ break;
+
+#if defined (DPAREN_ARITHMETIC)
+ case cm_arith:
+ print_arith_command (command->value.Arith->exp);
+ break;
+#endif
+
+#if defined (COND_COMMAND)
+ case cm_cond:
+ print_cond_command (command->value.Cond);
+ break;
+#endif
+
+ case cm_simple:
+ print_simple_command (command->value.Simple);
+ break;
+
+ case cm_connection:
+
+ skip_this_indent++;
+ printing_connection++;
+ make_command_string_internal (command->value.Connection->first);
+
+ switch (command->value.Connection->connector)
+ {
+ case '&':
+ case '|':
+ {
+ char c = command->value.Connection->connector;
+
+ s[0] = ' ';
+ s[1] = c;
+ s[2] = '\0';
+
+ print_deferred_heredocs (s);
+
+ if (c != '&' || command->value.Connection->second)
+ {
+ cprintf (" ");
+ skip_this_indent++;
+ }
+ }
+ break;
+
+ case AND_AND:
+ print_deferred_heredocs (" && ");
+ if (command->value.Connection->second)
+ skip_this_indent++;
+ break;
+
+ case OR_OR:
+ print_deferred_heredocs (" || ");
+ if (command->value.Connection->second)
+ skip_this_indent++;
+ break;
+
+ case ';':
+ if (deferred_heredocs == 0)
+ {
+ if (was_heredoc == 0)
+ cprintf (";");
+ else
+ was_heredoc = 0;
+ }
+ else
+ print_deferred_heredocs (inside_function_def ? "" : ";");
+
+ if (inside_function_def)
+ cprintf ("\n");
+ else
+ {
+ cprintf (" ");
+ if (command->value.Connection->second)
+ skip_this_indent++;
+ }
+ break;
+
+ default:
+ cprintf (_("print_command: bad connector `%d'"),
+ command->value.Connection->connector);
+ break;
+ }
+
+ make_command_string_internal (command->value.Connection->second);
+ if (deferred_heredocs)
+ print_deferred_heredocs ("");
+ printing_connection--;
+ break;
+
+ case cm_function_def:
+ print_function_def (command->value.Function_def);
+ break;
+
+ case cm_group:
+ print_group_command (command->value.Group);
+ break;
+
+ case cm_subshell:
+ cprintf ("( ");
+ skip_this_indent++;
+ make_command_string_internal (command->value.Subshell->command);
+ cprintf (" )");
+ break;
+
+ case cm_coproc:
+ cprintf ("coproc %s ", command->value.Coproc->name);
+ skip_this_indent++;
+ make_command_string_internal (command->value.Coproc->command);
+ break;
+
+ default:
+ command_error ("print_command", CMDERR_BADTYPE, command->type, 0);
+ break;
+ }
+
+
+ if (command->redirects)
+ {
+ cprintf (" ");
+ print_redirection_list (command->redirects);
+ }
+ }
+}
+
+static void
+_print_word_list (list, separator, pfunc)
+ WORD_LIST *list;
+ char *separator;
+ PFUNC *pfunc;
+{
+ WORD_LIST *w;
+
+ for (w = list; w; w = w->next)
+ (*pfunc) ("%s%s", w->word->word, w->next ? separator : "");
+}
+
+void
+print_word_list (list, separator)
+ WORD_LIST *list;
+ char *separator;
+{
+ _print_word_list (list, separator, xprintf);
+}
+
+void
+xtrace_set (fd, fp)
+ int fd;
+ FILE *fp;
+{
+ if (fd >= 0 && sh_validfd (fd) == 0)
+ {
+ internal_error (_("xtrace_set: %d: invalid file descriptor"), fd);
+ return;
+ }
+ if (fp == 0)
+ {
+ internal_error (_("xtrace_set: NULL file pointer"));
+ return;
+ }
+ if (fd >= 0 && fileno (fp) != fd)
+ internal_warning (_("xtrace fd (%d) != fileno xtrace fp (%d)"), fd, fileno (fp));
+
+ xtrace_fd = fd;
+ xtrace_fp = fp;
+}
+
+void
+xtrace_init ()
+{
+ xtrace_set (-1, stderr);
+}
+
+void
+xtrace_reset ()
+{
+ if (xtrace_fd >= 0 && xtrace_fp)
+ {
+ fflush (xtrace_fp);
+ fclose (xtrace_fp);
+ }
+ else if (xtrace_fd >= 0)
+ close (xtrace_fd);
+
+ xtrace_fd = -1;
+ xtrace_fp = stderr;
+}
+
+void
+xtrace_fdchk (fd)
+ int fd;
+{
+ if (fd == xtrace_fd)
+ xtrace_reset ();
+}
+
+/* Return a string denoting what our indirection level is. */
+
+char *
+indirection_level_string ()
+{
+ register int i, j;
+ char *ps4;
+ char ps4_firstc[MB_LEN_MAX+1];
+ int ps4_firstc_len, ps4_len;
+
+ indirection_string[0] = '\0';
+ ps4 = get_string_value ("PS4");
+
+ if (ps4 == 0 || *ps4 == '\0')
+ return (indirection_string);
+
+ change_flag ('x', FLAG_OFF);
+ ps4 = decode_prompt_string (ps4);
+ change_flag ('x', FLAG_ON);
+
+ if (ps4 == 0 || *ps4 == '\0')
+ return (indirection_string);
+
+#if defined (HANDLE_MULTIBYTE)
+ ps4_len = strnlen (ps4, MB_CUR_MAX);
+ ps4_firstc_len = MBLEN (ps4, ps4_len);
+ if (ps4_firstc_len == 1 || ps4_firstc_len == 0 || MB_INVALIDCH (ps4_firstc_len))
+ {
+ ps4_firstc[0] = ps4[0];
+ ps4_firstc[ps4_firstc_len = 1] = '\0';
+ }
+ else
+ memcpy (ps4_firstc, ps4, ps4_firstc_len);
+#else
+ ps4_firstc[0] = ps4[0];
+ ps4_firstc[ps4_firstc_len = 1] = '\0';
+#endif
+
+ for (i = j = 0; ps4_firstc[0] && j < indirection_level && i < 99; i += ps4_firstc_len, j++)
+ {
+ if (ps4_firstc_len == 1)
+ indirection_string[i] = ps4_firstc[0];
+ else
+ memcpy (indirection_string+i, ps4_firstc, ps4_firstc_len);
+ }
+
+ for (j = ps4_firstc_len; *ps4 && ps4[j] && i < 99; i++, j++)
+ indirection_string[i] = ps4[j];
+
+ indirection_string[i] = '\0';
+ free (ps4);
+ return (indirection_string);
+}
+
+void
+xtrace_print_assignment (name, value, assign_list, xflags)
+ char *name, *value;
+ int assign_list, xflags;
+{
+ char *nval;
+
+ CHECK_XTRACE_FP;
+
+ if (xflags)
+ fprintf (xtrace_fp, "%s", indirection_level_string ());
+
+ /* VALUE should not be NULL when this is called. */
+ if (*value == '\0' || assign_list)
+ nval = value;
+ else if (sh_contains_shell_metas (value))
+ nval = sh_single_quote (value);
+ else if (ansic_shouldquote (value))
+ nval = ansic_quote (value, 0, (int *)0);
+ else
+ nval = value;
+
+ if (assign_list)
+ fprintf (xtrace_fp, "%s=(%s)\n", name, nval);
+ else
+ fprintf (xtrace_fp, "%s=%s\n", name, nval);
+
+ if (nval != value)
+ FREE (nval);
+
+ fflush (xtrace_fp);
+}
+
+/* A function to print the words of a simple command when set -x is on. */
+void
+xtrace_print_word_list (list, xtflags)
+ WORD_LIST *list;
+ int xtflags;
+{
+ WORD_LIST *w;
+ char *t, *x;
+
+ CHECK_XTRACE_FP;
+
+ if (xtflags)
+ fprintf (xtrace_fp, "%s", indirection_level_string ());
+
+ for (w = list; w; w = w->next)
+ {
+ t = w->word->word;
+ if (t == 0 || *t == '\0')
+ fprintf (xtrace_fp, "''%s", w->next ? " " : "");
+ else if (sh_contains_shell_metas (t))
+ {
+ x = sh_single_quote (t);
+ fprintf (xtrace_fp, "%s%s", x, w->next ? " " : "");
+ free (x);
+ }
+ else if (ansic_shouldquote (t))
+ {
+ x = ansic_quote (t, 0, (int *)0);
+ fprintf (xtrace_fp, "%s%s", x, w->next ? " " : "");
+ free (x);
+ }
+ else
+ fprintf (xtrace_fp, "%s%s", t, w->next ? " " : "");
+ }
+ fprintf (xtrace_fp, "\n");
+ fflush (xtrace_fp);
+}
+
+static void
+command_print_word_list (list, separator)
+ WORD_LIST *list;
+ char *separator;
+{
+ _print_word_list (list, separator, cprintf);
+}
+
+void
+print_for_command_head (for_command)
+ FOR_COM *for_command;
+{
+ cprintf ("for %s in ", for_command->name->word);
+ command_print_word_list (for_command->map_list, " ");
+}
+
+void
+xtrace_print_for_command_head (for_command)
+ FOR_COM *for_command;
+{
+ CHECK_XTRACE_FP;
+ fprintf (xtrace_fp, "%s", indirection_level_string ());
+ fprintf (xtrace_fp, "for %s in ", for_command->name->word);
+ xtrace_print_word_list (for_command->map_list, 0);
+}
+
+static void
+print_for_command (for_command)
+ FOR_COM *for_command;
+{
+ print_for_command_head (for_command);
+ cprintf (";");
+ newline ("do\n");
+
+ indentation += indentation_amount;
+ make_command_string_internal (for_command->action);
+ PRINT_DEFERRED_HEREDOCS ("");
+ semicolon ();
+ indentation -= indentation_amount;
+
+ newline ("done");
+}
+
+#if defined (ARITH_FOR_COMMAND)
+static void
+print_arith_for_command (arith_for_command)
+ ARITH_FOR_COM *arith_for_command;
+{
+ cprintf ("for ((");
+ command_print_word_list (arith_for_command->init, " ");
+ cprintf ("; ");
+ command_print_word_list (arith_for_command->test, " ");
+ cprintf ("; ");
+ command_print_word_list (arith_for_command->step, " ");
+ cprintf ("))");
+ newline ("do\n");
+ indentation += indentation_amount;
+ make_command_string_internal (arith_for_command->action);
+ semicolon ();
+ indentation -= indentation_amount;
+ newline ("done");
+}
+#endif /* ARITH_FOR_COMMAND */
+
+#if defined (SELECT_COMMAND)
+void
+print_select_command_head (select_command)
+ SELECT_COM *select_command;
+{
+ cprintf ("select %s in ", select_command->name->word);
+ command_print_word_list (select_command->map_list, " ");
+}
+
+void
+xtrace_print_select_command_head (select_command)
+ SELECT_COM *select_command;
+{
+ CHECK_XTRACE_FP;
+ fprintf (xtrace_fp, "%s", indirection_level_string ());
+ fprintf (xtrace_fp, "select %s in ", select_command->name->word);
+ xtrace_print_word_list (select_command->map_list, 0);
+}
+
+static void
+print_select_command (select_command)
+ SELECT_COM *select_command;
+{
+ print_select_command_head (select_command);
+
+ cprintf (";");
+ newline ("do\n");
+ indentation += indentation_amount;
+ make_command_string_internal (select_command->action);
+ semicolon ();
+ indentation -= indentation_amount;
+ newline ("done");
+}
+#endif /* SELECT_COMMAND */
+
+static void
+print_group_command (group_command)
+ GROUP_COM *group_command;
+{
+ group_command_nesting++;
+ cprintf ("{ ");
+
+ if (inside_function_def == 0)
+ skip_this_indent++;
+ else
+ {
+ /* This is a group command { ... } inside of a function
+ definition, and should be printed as a multiline group
+ command, using the current indentation. */
+ cprintf ("\n");
+ indentation += indentation_amount;
+ }
+
+ make_command_string_internal (group_command->command);
+
+ if (inside_function_def)
+ {
+ cprintf ("\n");
+ indentation -= indentation_amount;
+ indent (indentation);
+ }
+ else
+ {
+ semicolon ();
+ cprintf (" ");
+ }
+
+ cprintf ("}");
+
+ group_command_nesting--;
+}
+
+void
+print_case_command_head (case_command)
+ CASE_COM *case_command;
+{
+ cprintf ("case %s in ", case_command->word->word);
+}
+
+void
+xtrace_print_case_command_head (case_command)
+ CASE_COM *case_command;
+{
+ CHECK_XTRACE_FP;
+ fprintf (xtrace_fp, "%s", indirection_level_string ());
+ fprintf (xtrace_fp, "case %s in\n", case_command->word->word);
+}
+
+static void
+print_case_command (case_command)
+ CASE_COM *case_command;
+{
+ print_case_command_head (case_command);
+
+ if (case_command->clauses)
+ print_case_clauses (case_command->clauses);
+ newline ("esac");
+}
+
+static void
+print_case_clauses (clauses)
+ PATTERN_LIST *clauses;
+{
+ indentation += indentation_amount;
+ while (clauses)
+ {
+ newline ("");
+ command_print_word_list (clauses->patterns, " | ");
+ cprintf (")\n");
+ indentation += indentation_amount;
+ make_command_string_internal (clauses->action);
+ indentation -= indentation_amount;
+ if (clauses->flags & CASEPAT_FALLTHROUGH)
+ newline (";&");
+ else if (clauses->flags & CASEPAT_TESTNEXT)
+ newline (";;&");
+ else
+ newline (";;");
+ clauses = clauses->next;
+ }
+ indentation -= indentation_amount;
+}
+
+static void
+print_while_command (while_command)
+ WHILE_COM *while_command;
+{
+ print_until_or_while (while_command, "while");
+}
+
+static void
+print_until_command (while_command)
+ WHILE_COM *while_command;
+{
+ print_until_or_while (while_command, "until");
+}
+
+static void
+print_until_or_while (while_command, which)
+ WHILE_COM *while_command;
+ char *which;
+{
+ cprintf ("%s ", which);
+ skip_this_indent++;
+ make_command_string_internal (while_command->test);
+ semicolon ();
+ cprintf (" do\n"); /* was newline ("do\n"); */
+ indentation += indentation_amount;
+ make_command_string_internal (while_command->action);
+ indentation -= indentation_amount;
+ semicolon ();
+ newline ("done");
+}
+
+static void
+print_if_command (if_command)
+ IF_COM *if_command;
+{
+ cprintf ("if ");
+ skip_this_indent++;
+ make_command_string_internal (if_command->test);
+ semicolon ();
+ cprintf (" then\n");
+ indentation += indentation_amount;
+ make_command_string_internal (if_command->true_case);
+ indentation -= indentation_amount;
+
+ if (if_command->false_case)
+ {
+ semicolon ();
+ newline ("else\n");
+ indentation += indentation_amount;
+ make_command_string_internal (if_command->false_case);
+ indentation -= indentation_amount;
+ }
+ semicolon ();
+ newline ("fi");
+}
+
+#if defined (DPAREN_ARITHMETIC)
+void
+print_arith_command (arith_cmd_list)
+ WORD_LIST *arith_cmd_list;
+{
+ cprintf ("((");
+ command_print_word_list (arith_cmd_list, " ");
+ cprintf ("))");
+}
+#endif
+
+#if defined (COND_COMMAND)
+static void
+print_cond_node (cond)
+ COND_COM *cond;
+{
+ if (cond->flags & CMD_INVERT_RETURN)
+ cprintf ("! ");
+
+ if (cond->type == COND_EXPR)
+ {
+ cprintf ("( ");
+ print_cond_node (cond->left);
+ cprintf (" )");
+ }
+ else if (cond->type == COND_AND)
+ {
+ print_cond_node (cond->left);
+ cprintf (" && ");
+ print_cond_node (cond->right);
+ }
+ else if (cond->type == COND_OR)
+ {
+ print_cond_node (cond->left);
+ cprintf (" || ");
+ print_cond_node (cond->right);
+ }
+ else if (cond->type == COND_UNARY)
+ {
+ cprintf ("%s", cond->op->word);
+ cprintf (" ");
+ print_cond_node (cond->left);
+ }
+ else if (cond->type == COND_BINARY)
+ {
+ print_cond_node (cond->left);
+ cprintf (" ");
+ cprintf ("%s", cond->op->word);
+ cprintf (" ");
+ print_cond_node (cond->right);
+ }
+ else if (cond->type == COND_TERM)
+ {
+ cprintf ("%s", cond->op->word); /* need to add quoting here */
+ }
+}
+
+void
+print_cond_command (cond)
+ COND_COM *cond;
+{
+ cprintf ("[[ ");
+ print_cond_node (cond);
+ cprintf (" ]]");
+}
+
+#ifdef DEBUG
+void
+debug_print_cond_command (cond)
+ COND_COM *cond;
+{
+ fprintf (stderr, "DEBUG: ");
+ command_string_index = 0;
+ print_cond_command (cond);
+ fprintf (stderr, "%s\n", the_printed_command);
+}
+#endif
+
+void
+xtrace_print_cond_term (type, invert, op, arg1, arg2)
+ int type, invert;
+ WORD_DESC *op;
+ char *arg1, *arg2;
+{
+ CHECK_XTRACE_FP;
+ command_string_index = 0;
+ fprintf (xtrace_fp, "%s", indirection_level_string ());
+ fprintf (xtrace_fp, "[[ ");
+ if (invert)
+ fprintf (xtrace_fp, "! ");
+
+ if (type == COND_UNARY)
+ {
+ fprintf (xtrace_fp, "%s ", op->word);
+ fprintf (xtrace_fp, "%s", (arg1 && *arg1) ? arg1 : "''");
+ }
+ else if (type == COND_BINARY)
+ {
+ fprintf (xtrace_fp, "%s", (arg1 && *arg1) ? arg1 : "''");
+ fprintf (xtrace_fp, " %s ", op->word);
+ fprintf (xtrace_fp, "%s", (arg2 && *arg2) ? arg2 : "''");
+ }
+
+ fprintf (xtrace_fp, " ]]\n");
+
+ fflush (xtrace_fp);
+}
+#endif /* COND_COMMAND */
+
+#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND)
+/* A function to print the words of an arithmetic command when set -x is on. */
+void
+xtrace_print_arith_cmd (list)
+ WORD_LIST *list;
+{
+ WORD_LIST *w;
+
+ CHECK_XTRACE_FP;
+ fprintf (xtrace_fp, "%s", indirection_level_string ());
+ fprintf (xtrace_fp, "(( ");
+ for (w = list; w; w = w->next)
+ fprintf (xtrace_fp, "%s%s", w->word->word, w->next ? " " : "");
+ fprintf (xtrace_fp, " ))\n");
+
+ fflush (xtrace_fp);
+}
+#endif
+
+void
+print_simple_command (simple_command)
+ SIMPLE_COM *simple_command;
+{
+ command_print_word_list (simple_command->words, " ");
+
+ if (simple_command->redirects)
+ {
+ cprintf (" ");
+ print_redirection_list (simple_command->redirects);
+ }
+}
+
+static void
+print_heredocs (heredocs)
+ REDIRECT *heredocs;
+{
+ REDIRECT *hdtail;
+
+ cprintf (" ");
+ for (hdtail = heredocs; hdtail; hdtail = hdtail->next)
+ {
+ print_redirection (hdtail);
+ cprintf ("\n");
+ }
+ was_heredoc = 1;
+}
+
+/* Print heredocs that are attached to the command before the connector
+ represented by CSTRING. The parsing semantics require us to print the
+ here-doc delimiters, then the connector (CSTRING), then the here-doc
+ bodies. We don't print the connector if it's a `;', but we use it to
+ note not to print an extra space after the last heredoc body and
+ newline. */
+static void
+print_deferred_heredocs (cstring)
+ const char *cstring;
+{
+ REDIRECT *hdtail;
+
+ for (hdtail = deferred_heredocs; hdtail; hdtail = hdtail->next)
+ {
+ cprintf (" ");
+ print_heredoc_header (hdtail);
+ }
+ if (cstring[0] != ';' || cstring[1])
+ cprintf ("%s", cstring);
+ if (deferred_heredocs)
+ cprintf ("\n");
+ for (hdtail = deferred_heredocs; hdtail; hdtail = hdtail->next)
+ {
+ print_heredoc_body (hdtail);
+ cprintf ("\n");
+ }
+ if (deferred_heredocs)
+ {
+ if (cstring && cstring[0] && (cstring[0] != ';' || cstring[1]))
+ cprintf (" "); /* make sure there's at least one space */
+ dispose_redirects (deferred_heredocs);
+ was_heredoc = 1;
+ }
+ deferred_heredocs = (REDIRECT *)NULL;
+}
+
+static void
+print_redirection_list (redirects)
+ REDIRECT *redirects;
+{
+ REDIRECT *heredocs, *hdtail, *newredir;
+
+ heredocs = (REDIRECT *)NULL;
+ hdtail = heredocs;
+
+ was_heredoc = 0;
+ while (redirects)
+ {
+ /* Defer printing the here documents until we've printed the
+ rest of the redirections. */
+ if (redirects->instruction == r_reading_until || redirects->instruction == r_deblank_reading_until)
+ {
+ newredir = copy_redirect (redirects);
+ newredir->next = (REDIRECT *)NULL;
+ if (heredocs)
+ {
+ hdtail->next = newredir;
+ hdtail = newredir;
+ }
+ else
+ hdtail = heredocs = newredir;
+ }
+ else if (redirects->instruction == r_duplicating_output_word && redirects->redirector.dest == 1)
+ {
+ /* Temporarily translate it as the execution code does. */
+ redirects->instruction = r_err_and_out;
+ print_redirection (redirects);
+ redirects->instruction = r_duplicating_output_word;
+ }
+ else
+ print_redirection (redirects);
+
+ redirects = redirects->next;
+ if (redirects)
+ cprintf (" ");
+ }
+
+ /* Now that we've printed all the other redirections (on one line),
+ print the here documents. */
+ if (heredocs && printing_connection)
+ deferred_heredocs = heredocs;
+ else if (heredocs)
+ {
+ print_heredocs (heredocs);
+ dispose_redirects (heredocs);
+ }
+}
+
+static void
+print_heredoc_header (redirect)
+ REDIRECT *redirect;
+{
+ int kill_leading;
+ char *x;
+
+ kill_leading = redirect->instruction == r_deblank_reading_until;
+
+ /* Here doc header */
+ if (redirect->rflags & REDIR_VARASSIGN)
+ cprintf ("{%s}", redirect->redirector.filename->word);
+ else if (redirect->redirector.dest != 0)
+ cprintf ("%d", redirect->redirector.dest);
+
+ /* If the here document delimiter is quoted, single-quote it. */
+ if (redirect->redirectee.filename->flags & W_QUOTED)
+ {
+ x = sh_single_quote (redirect->here_doc_eof);
+ cprintf ("<<%s%s", kill_leading ? "-" : "", x);
+ free (x);
+ }
+ else
+ cprintf ("<<%s%s", kill_leading ? "-" : "", redirect->here_doc_eof);
+}
+
+static void
+print_heredoc_body (redirect)
+ REDIRECT *redirect;
+{
+ /* Here doc body */
+ cprintf ("%s%s", redirect->redirectee.filename->word, redirect->here_doc_eof);
+}
+
+static void
+print_redirection (redirect)
+ REDIRECT *redirect;
+{
+ int kill_leading, redirector, redir_fd;
+ WORD_DESC *redirectee, *redir_word;
+
+ kill_leading = 0;
+ redirectee = redirect->redirectee.filename;
+ redir_fd = redirect->redirectee.dest;
+
+ redir_word = redirect->redirector.filename;
+ redirector = redirect->redirector.dest;
+
+ switch (redirect->instruction)
+ {
+ case r_input_direction:
+ if (redirect->rflags & REDIR_VARASSIGN)
+ cprintf ("{%s}", redir_word->word);
+ else if (redirector != 0)
+ cprintf ("%d", redirector);
+ cprintf ("< %s", redirectee->word);
+ break;
+
+ case r_output_direction:
+ if (redirect->rflags & REDIR_VARASSIGN)
+ cprintf ("{%s}", redir_word->word);
+ else if (redirector != 1)
+ cprintf ("%d", redirector);
+ cprintf ("> %s", redirectee->word);
+ break;
+
+ case r_inputa_direction: /* Redirection created by the shell. */
+ cprintf ("&");
+ break;
+
+ case r_output_force:
+ if (redirect->rflags & REDIR_VARASSIGN)
+ cprintf ("{%s}", redir_word->word);
+ else if (redirector != 1)
+ cprintf ("%d", redirector);
+ cprintf (">|%s", redirectee->word);
+ break;
+
+ case r_appending_to:
+ if (redirect->rflags & REDIR_VARASSIGN)
+ cprintf ("{%s}", redir_word->word);
+ else if (redirector != 1)
+ cprintf ("%d", redirector);
+ cprintf (">> %s", redirectee->word);
+ break;
+
+ case r_input_output:
+ if (redirect->rflags & REDIR_VARASSIGN)
+ cprintf ("{%s}", redir_word->word);
+ else if (redirector != 1)
+ cprintf ("%d", redirector);
+ cprintf ("<> %s", redirectee->word);
+ break;
+
+ case r_deblank_reading_until:
+ case r_reading_until:
+ print_heredoc_header (redirect);
+ cprintf ("\n");
+ print_heredoc_body (redirect);
+ break;
+
+ case r_reading_string:
+ if (redirect->rflags & REDIR_VARASSIGN)
+ cprintf ("{%s}", redir_word->word);
+ else if (redirector != 0)
+ cprintf ("%d", redirector);
+ if (ansic_shouldquote (redirect->redirectee.filename->word))
+ {
+ char *x;
+ x = ansic_quote (redirect->redirectee.filename->word, 0, (int *)0);
+ cprintf ("<<< %s", x);
+ free (x);
+ }
+ else
+ cprintf ("<<< %s", redirect->redirectee.filename->word);
+ break;
+
+ case r_duplicating_input:
+ if (redirect->rflags & REDIR_VARASSIGN)
+ cprintf ("{%s}<&%d", redir_word->word, redir_fd);
+ else
+ cprintf ("%d<&%d", redirector, redir_fd);
+ break;
+
+ case r_duplicating_output:
+ if (redirect->rflags & REDIR_VARASSIGN)
+ cprintf ("{%s}>&%d", redir_word->word, redir_fd);
+ else
+ cprintf ("%d>&%d", redirector, redir_fd);
+ break;
+
+ case r_duplicating_input_word:
+ if (redirect->rflags & REDIR_VARASSIGN)
+ cprintf ("{%s}<&%s", redir_word->word, redirectee->word);
+ else
+ cprintf ("%d<&%s", redirector, redirectee->word);
+ break;
+
+ case r_duplicating_output_word:
+ if (redirect->rflags & REDIR_VARASSIGN)
+ cprintf ("{%s}>&%s", redir_word->word, redirectee->word);
+ else
+ cprintf ("%d>&%s", redirector, redirectee->word);
+ break;
+
+ case r_move_input:
+ if (redirect->rflags & REDIR_VARASSIGN)
+ cprintf ("{%s}<&%d-", redir_word->word, redir_fd);
+ else
+ cprintf ("%d<&%d-", redirector, redir_fd);
+ break;
+
+ case r_move_output:
+ if (redirect->rflags & REDIR_VARASSIGN)
+ cprintf ("{%s}>&%d-", redir_word->word, redir_fd);
+ else
+ cprintf ("%d>&%d-", redirector, redir_fd);
+ break;
+
+ case r_move_input_word:
+ if (redirect->rflags & REDIR_VARASSIGN)
+ cprintf ("{%s}<&%s-", redir_word->word, redirectee->word);
+ else
+ cprintf ("%d<&%s-", redirector, redirectee->word);
+ break;
+
+ case r_move_output_word:
+ if (redirect->rflags & REDIR_VARASSIGN)
+ cprintf ("{%s}>&%s-", redir_word->word, redirectee->word);
+ else
+ cprintf ("%d>&%s-", redirector, redirectee->word);
+ break;
+
+ case r_close_this:
+ if (redirect->rflags & REDIR_VARASSIGN)
+ cprintf ("{%s}>&-", redir_word->word);
+ else
+ cprintf ("%d>&-", redirector);
+ break;
+
+ case r_err_and_out:
+ cprintf ("&>%s", redirectee->word);
+ break;
+
+ case r_append_err_and_out:
+ cprintf ("&>>%s", redirectee->word);
+ break;
+ }
+}
+
+static void
+reset_locals ()
+{
+ inside_function_def = 0;
+ indentation = 0;
+ printing_connection = 0;
+ deferred_heredocs = 0;
+}
+
+static void
+print_function_def (func)
+ FUNCTION_DEF *func;
+{
+ COMMAND *cmdcopy;
+ REDIRECT *func_redirects;
+
+ func_redirects = NULL;
+ cprintf ("function %s () \n", func->name->word);
+ add_unwind_protect (reset_locals, 0);
+
+ indent (indentation);
+ cprintf ("{ \n");
+
+ inside_function_def++;
+ indentation += indentation_amount;
+
+ cmdcopy = copy_command (func->command);
+ if (cmdcopy->type == cm_group)
+ {
+ func_redirects = cmdcopy->redirects;
+ cmdcopy->redirects = (REDIRECT *)NULL;
+ }
+ make_command_string_internal (cmdcopy->type == cm_group
+ ? cmdcopy->value.Group->command
+ : cmdcopy);
+
+ remove_unwind_protect ();
+ indentation -= indentation_amount;
+ inside_function_def--;
+
+ if (func_redirects)
+ { /* { */
+ newline ("} ");
+ print_redirection_list (func_redirects);
+ cmdcopy->redirects = func_redirects;
+ }
+ else
+ newline ("}");
+
+ dispose_command (cmdcopy);
+}
+
+/* Return the string representation of the named function.
+ NAME is the name of the function.
+ COMMAND is the function body. It should be a GROUP_COM.
+ flags&FUNC_MULTILINE is non-zero to pretty-print, or zero for all on one line.
+ flags&FUNC_EXTERNAL means convert from internal to external form
+ */
+char *
+named_function_string (name, command, flags)
+ char *name;
+ COMMAND *command;
+ int flags;
+{
+ char *result;
+ int old_indent, old_amount;
+ COMMAND *cmdcopy;
+ REDIRECT *func_redirects;
+
+ old_indent = indentation;
+ old_amount = indentation_amount;
+ command_string_index = was_heredoc = 0;
+ deferred_heredocs = 0;
+
+ if (name && *name)
+ cprintf ("%s ", name);
+
+ cprintf ("() ");
+
+ if ((flags & FUNC_MULTILINE) == 0)
+ {
+ indentation = 1;
+ indentation_amount = 0;
+ }
+ else
+ {
+ cprintf ("\n");
+ indentation += indentation_amount;
+ }
+
+ inside_function_def++;
+
+ cprintf ((flags & FUNC_MULTILINE) ? "{ \n" : "{ ");
+
+ cmdcopy = copy_command (command);
+ /* Take any redirections specified in the function definition (which should
+ apply to the function as a whole) and save them for printing later. */
+ func_redirects = (REDIRECT *)NULL;
+ if (cmdcopy->type == cm_group)
+ {
+ func_redirects = cmdcopy->redirects;
+ cmdcopy->redirects = (REDIRECT *)NULL;
+ }
+ make_command_string_internal (cmdcopy->type == cm_group
+ ? cmdcopy->value.Group->command
+ : cmdcopy);
+
+ indentation = old_indent;
+ indentation_amount = old_amount;
+ inside_function_def--;
+
+ if (func_redirects)
+ { /* { */
+ newline ("} ");
+ print_redirection_list (func_redirects);
+ cmdcopy->redirects = func_redirects;
+ }
+ else
+ newline ("}");
+
+ result = the_printed_command;
+
+ if ((flags & FUNC_MULTILINE) == 0)
+ {
+#if 0
+ register int i;
+ for (i = 0; result[i]; i++)
+ if (result[i] == '\n')
+ {
+ strcpy (result + i, result + i + 1);
+ --i;
+ }
+#else
+ if (result[2] == '\n') /* XXX -- experimental */
+ strcpy (result + 2, result + 3);
+#endif
+ }
+
+ dispose_command (cmdcopy);
+
+ if (flags & FUNC_EXTERNAL)
+ result = remove_quoted_escapes (result);
+
+ return (result);
+}
+
+static void
+newline (string)
+ char *string;
+{
+ cprintf ("\n");
+ indent (indentation);
+ if (string && *string)
+ cprintf ("%s", string);
+}
+
+static char *indentation_string;
+static int indentation_size;
+
+static void
+indent (amount)
+ int amount;
+{
+ register int i;
+
+ RESIZE_MALLOCED_BUFFER (indentation_string, 0, amount, indentation_size, 16);
+
+ for (i = 0; amount > 0; amount--)
+ indentation_string[i++] = ' ';
+ indentation_string[i] = '\0';
+ cprintf (indentation_string);
+}
+
+static void
+semicolon ()
+{
+ if (command_string_index > 0 &&
+ (the_printed_command[command_string_index - 1] == '&' ||
+ the_printed_command[command_string_index - 1] == '\n'))
+ return;
+ cprintf (";");
+}
+
+/* How to make the string. */
+static void
+#if defined (PREFER_STDARG)
+cprintf (const char *control, ...)
+#else
+cprintf (control, va_alist)
+ const char *control;
+ va_dcl
+#endif
+{
+ register const char *s;
+ char char_arg[2], *argp, intbuf[INT_STRLEN_BOUND (int) + 1];
+ int digit_arg, arg_len, c;
+ va_list args;
+
+ SH_VA_START (args, control);
+
+ arg_len = strlen (control);
+ the_printed_command_resize (arg_len + 1);
+
+ char_arg[1] = '\0';
+ s = control;
+ while (s && *s)
+ {
+ c = *s++;
+ argp = (char *)NULL;
+ if (c != '%' || !*s)
+ {
+ char_arg[0] = c;
+ argp = char_arg;
+ arg_len = 1;
+ }
+ else
+ {
+ c = *s++;
+ switch (c)
+ {
+ case '%':
+ char_arg[0] = c;
+ argp = char_arg;
+ arg_len = 1;
+ break;
+
+ case 's':
+ argp = va_arg (args, char *);
+ arg_len = strlen (argp);
+ break;
+
+ case 'd':
+ /* Represent an out-of-range file descriptor with an out-of-range
+ integer value. We can do this because the only use of `%d' in
+ the calls to cprintf is to output a file descriptor number for
+ a redirection. */
+ digit_arg = va_arg (args, int);
+ if (digit_arg < 0)
+ {
+ sprintf (intbuf, "%u", (unsigned)-1);
+ argp = intbuf;
+ }
+ else
+ argp = inttostr (digit_arg, intbuf, sizeof (intbuf));
+ arg_len = strlen (argp);
+ break;
+
+ case 'c':
+ char_arg[0] = va_arg (args, int);
+ argp = char_arg;
+ arg_len = 1;
+ break;
+
+ default:
+ programming_error (_("cprintf: `%c': invalid format character"), c);
+ /*NOTREACHED*/
+ }
+ }
+
+ if (argp && arg_len)
+ {
+ the_printed_command_resize (arg_len + 1);
+ FASTCOPY (argp, the_printed_command + command_string_index, arg_len);
+ command_string_index += arg_len;
+ }
+ }
+
+ the_printed_command[command_string_index] = '\0';
+}
+
+/* Ensure that there is enough space to stuff LENGTH characters into
+ THE_PRINTED_COMMAND. */
+static void
+the_printed_command_resize (length)
+ int length;
+{
+ if (the_printed_command == 0)
+ {
+ the_printed_command_size = (length + PRINTED_COMMAND_INITIAL_SIZE - 1) & ~(PRINTED_COMMAND_INITIAL_SIZE - 1);
+ the_printed_command = (char *)xmalloc (the_printed_command_size);
+ command_string_index = 0;
+ }
+ else if ((command_string_index + length) >= the_printed_command_size)
+ {
+ int new;
+ new = command_string_index + length + 1;
+
+ /* Round up to the next multiple of PRINTED_COMMAND_GROW_SIZE. */
+ new = (new + PRINTED_COMMAND_GROW_SIZE - 1) & ~(PRINTED_COMMAND_GROW_SIZE - 1);
+ the_printed_command_size = new;
+
+ the_printed_command = (char *)xrealloc (the_printed_command, the_printed_command_size);
+ }
+}
+
+#if defined (HAVE_VPRINTF)
+/* ``If vprintf is available, you may assume that vfprintf and vsprintf are
+ also available.'' */
+
+static void
+#if defined (PREFER_STDARG)
+xprintf (const char *format, ...)
+#else
+xprintf (format, va_alist)
+ const char *format;
+ va_dcl
+#endif
+{
+ va_list args;
+
+ SH_VA_START (args, format);
+
+ vfprintf (stdout, format, args);
+ va_end (args);
+}
+
+#else
+
+static void
+xprintf (format, arg1, arg2, arg3, arg4, arg5)
+ const char *format;
+{
+ printf (format, arg1, arg2, arg3, arg4, arg5);
+}
+
+#endif /* !HAVE_VPRINTF */
diff --git a/quit.h b/quit.h
new file mode 100644
index 0000000..e7bf05b
--- /dev/null
+++ b/quit.h
@@ -0,0 +1,53 @@
+/* quit.h -- How to handle SIGINT gracefully. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_QUIT_H_)
+#define _QUIT_H_
+
+/* Non-zero means SIGINT has already ocurred. */
+extern volatile int interrupt_state;
+extern volatile int terminating_signal;
+
+/* Macro to call a great deal. SIGINT just sets the interrupt_state variable.
+ When it is safe, put QUIT in the code, and the "interrupt" will take
+ place. The same scheme is used for terminating signals (e.g., SIGHUP)
+ and the terminating_signal variable. That calls a function which will
+ end up exiting the shell. */
+#define QUIT \
+ do { \
+ if (terminating_signal) termsig_handler (terminating_signal); \
+ if (interrupt_state) throw_to_top_level (); \
+ } while (0)
+
+#define SETINTERRUPT interrupt_state = 1
+#define CLRINTERRUPT interrupt_state = 0
+
+#define ADDINTERRUPT interrupt_state++
+#define DELINTERRUPT interrupt_state--
+
+/* The same sort of thing, this time just for signals that would ordinarily
+ cause the shell to terminate. */
+
+#define CHECK_TERMSIG \
+ do { \
+ if (terminating_signal) termsig_handler (terminating_signal); \
+ } while (0)
+
+#endif /* _QUIT_H_ */
diff --git a/redir.c b/redir.c
new file mode 100644
index 0000000..c7a69f7
--- /dev/null
+++ b/redir.c
@@ -0,0 +1,1277 @@
+/* redir.c -- Functions to perform input and output redirection. */
+
+/* Copyright (C) 1997-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#if !defined (__GNUC__) && !defined (HAVE_ALLOCA_H) && defined (_AIX)
+ #pragma alloca
+#endif /* _AIX && RISC6000 && !__GNUC__ */
+
+#include <stdio.h>
+#include "bashtypes.h"
+#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+#include "filecntl.h"
+#include "posixstat.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <errno.h>
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+#include "bashansi.h"
+#include "bashintl.h"
+#include "memalloc.h"
+
+#define NEED_FPURGE_DECL
+
+#include "shell.h"
+#include "flags.h"
+#include "execute_cmd.h"
+#include "redir.h"
+
+#if defined (BUFFERED_INPUT)
+# include "input.h"
+#endif
+
+#define SHELL_FD_BASE 10
+
+int expanding_redir;
+
+extern int posixly_correct;
+extern REDIRECT *redirection_undo_list;
+extern REDIRECT *exec_redirection_undo_list;
+
+/* Static functions defined and used in this file. */
+static void add_undo_close_redirect __P((int));
+static void add_exec_redirect __P((REDIRECT *));
+static int add_undo_redirect __P((int, enum r_instruction, int));
+static int expandable_redirection_filename __P((REDIRECT *));
+static int stdin_redirection __P((enum r_instruction, int));
+static int undoablefd __P((int));
+static int do_redirection_internal __P((REDIRECT *, int));
+
+static int write_here_document __P((int, WORD_DESC *));
+static int write_here_string __P((int, WORD_DESC *));
+static int here_document_to_fd __P((WORD_DESC *, enum r_instruction));
+
+static int redir_special_open __P((int, char *, int, int, enum r_instruction));
+static int noclobber_open __P((char *, int, int, enum r_instruction));
+static int redir_open __P((char *, int, int, enum r_instruction));
+
+static int redir_varassign __P((REDIRECT *, int));
+static int redir_varvalue __P((REDIRECT *));
+
+/* Spare redirector used when translating [N]>&WORD[-] or [N]<&WORD[-] to
+ a new redirection and when creating the redirection undo list. */
+static REDIRECTEE rd;
+
+/* Set to errno when a here document cannot be created for some reason.
+ Used to print a reasonable error message. */
+static int heredoc_errno;
+
+void
+redirection_error (temp, error)
+ REDIRECT *temp;
+ int error;
+{
+ char *filename, *allocname;
+ int oflags;
+
+ allocname = 0;
+ if (temp->rflags & REDIR_VARASSIGN)
+ filename = savestring (temp->redirector.filename->word);
+ else if (temp->redirector.dest < 0)
+ /* This can happen when read_token_word encounters overflow, like in
+ exec 4294967297>x */
+ filename = _("file descriptor out of range");
+#ifdef EBADF
+ /* This error can never involve NOCLOBBER */
+ else if (error != NOCLOBBER_REDIRECT && temp->redirector.dest >= 0 && error == EBADF)
+ {
+ /* If we're dealing with two file descriptors, we have to guess about
+ which one is invalid; in the cases of r_{duplicating,move}_input and
+ r_{duplicating,move}_output we're here because dup2() failed. */
+ switch (temp->instruction)
+ {
+ case r_duplicating_input:
+ case r_duplicating_output:
+ case r_move_input:
+ case r_move_output:
+ filename = allocname = itos (temp->redirectee.dest);
+ break;
+ case r_duplicating_input_word:
+ if (temp->redirector.dest == 0) /* Guess */
+ filename = temp->redirectee.filename->word; /* XXX */
+ else
+ filename = allocname = itos (temp->redirector.dest);
+ break;
+ case r_duplicating_output_word:
+ if (temp->redirector.dest == 1) /* Guess */
+ filename = temp->redirectee.filename->word; /* XXX */
+ else
+ filename = allocname = itos (temp->redirector.dest);
+ break;
+ default:
+ filename = allocname = itos (temp->redirector.dest);
+ break;
+ }
+ }
+#endif
+ else if (expandable_redirection_filename (temp))
+ {
+expandable_filename:
+ if (posixly_correct && interactive_shell == 0)
+ {
+ oflags = temp->redirectee.filename->flags;
+ temp->redirectee.filename->flags |= W_NOGLOB;
+ }
+ filename = allocname = redirection_expand (temp->redirectee.filename);
+ if (posixly_correct && interactive_shell == 0)
+ temp->redirectee.filename->flags = oflags;
+ if (filename == 0)
+ filename = temp->redirectee.filename->word;
+ }
+ else if (temp->redirectee.dest < 0)
+ filename = "file descriptor out of range";
+ else
+ filename = allocname = itos (temp->redirectee.dest);
+
+ switch (error)
+ {
+ case AMBIGUOUS_REDIRECT:
+ internal_error (_("%s: ambiguous redirect"), filename);
+ break;
+
+ case NOCLOBBER_REDIRECT:
+ internal_error (_("%s: cannot overwrite existing file"), filename);
+ break;
+
+#if defined (RESTRICTED_SHELL)
+ case RESTRICTED_REDIRECT:
+ internal_error (_("%s: restricted: cannot redirect output"), filename);
+ break;
+#endif /* RESTRICTED_SHELL */
+
+ case HEREDOC_REDIRECT:
+ internal_error (_("cannot create temp file for here-document: %s"), strerror (heredoc_errno));
+ break;
+
+ case BADVAR_REDIRECT:
+ internal_error (_("%s: cannot assign fd to variable"), filename);
+ break;
+
+ default:
+ internal_error ("%s: %s", filename, strerror (error));
+ break;
+ }
+
+ FREE (allocname);
+}
+
+/* Perform the redirections on LIST. If flags & RX_ACTIVE, then actually
+ make input and output file descriptors, otherwise just do whatever is
+ neccessary for side effecting. flags & RX_UNDOABLE says to remember
+ how to undo the redirections later, if non-zero. If flags & RX_CLEXEC
+ is non-zero, file descriptors opened in do_redirection () have their
+ close-on-exec flag set. */
+int
+do_redirections (list, flags)
+ REDIRECT *list;
+ int flags;
+{
+ int error;
+ REDIRECT *temp;
+
+ if (flags & RX_UNDOABLE)
+ {
+ if (redirection_undo_list)
+ {
+ dispose_redirects (redirection_undo_list);
+ redirection_undo_list = (REDIRECT *)NULL;
+ }
+ if (exec_redirection_undo_list)
+ dispose_exec_redirects ();
+ }
+
+ for (temp = list; temp; temp = temp->next)
+ {
+ error = do_redirection_internal (temp, flags);
+ if (error)
+ {
+ redirection_error (temp, error);
+ return (error);
+ }
+ }
+ return (0);
+}
+
+/* Return non-zero if the redirection pointed to by REDIRECT has a
+ redirectee.filename that can be expanded. */
+static int
+expandable_redirection_filename (redirect)
+ REDIRECT *redirect;
+{
+ switch (redirect->instruction)
+ {
+ case r_output_direction:
+ case r_appending_to:
+ case r_input_direction:
+ case r_inputa_direction:
+ case r_err_and_out:
+ case r_append_err_and_out:
+ case r_input_output:
+ case r_output_force:
+ case r_duplicating_input_word:
+ case r_duplicating_output_word:
+ case r_move_input_word:
+ case r_move_output_word:
+ return 1;
+
+ default:
+ return 0;
+ }
+}
+
+/* Expand the word in WORD returning a string. If WORD expands to
+ multiple words (or no words), then return NULL. */
+char *
+redirection_expand (word)
+ WORD_DESC *word;
+{
+ char *result;
+ WORD_LIST *tlist1, *tlist2;
+ WORD_DESC *w;
+
+ w = copy_word (word);
+ if (posixly_correct)
+ w->flags |= W_NOSPLIT;
+
+ tlist1 = make_word_list (w, (WORD_LIST *)NULL);
+ expanding_redir = 1;
+ tlist2 = expand_words_no_vars (tlist1);
+ expanding_redir = 0;
+ dispose_words (tlist1);
+
+ if (!tlist2 || tlist2->next)
+ {
+ /* We expanded to no words, or to more than a single word.
+ Dispose of the word list and return NULL. */
+ if (tlist2)
+ dispose_words (tlist2);
+ return ((char *)NULL);
+ }
+ result = string_list (tlist2); /* XXX savestring (tlist2->word->word)? */
+ dispose_words (tlist2);
+ return (result);
+}
+
+static int
+write_here_string (fd, redirectee)
+ int fd;
+ WORD_DESC *redirectee;
+{
+ char *herestr;
+ int herelen, n, e;
+
+ expanding_redir = 1;
+ herestr = expand_string_to_string (redirectee->word, 0);
+ expanding_redir = 0;
+ herelen = STRLEN (herestr);
+
+ n = write (fd, herestr, herelen);
+ if (n == herelen)
+ {
+ n = write (fd, "\n", 1);
+ herelen = 1;
+ }
+ e = errno;
+ FREE (herestr);
+ if (n != herelen)
+ {
+ if (e == 0)
+ e = ENOSPC;
+ return e;
+ }
+ return 0;
+}
+
+/* Write the text of the here document pointed to by REDIRECTEE to the file
+ descriptor FD, which is already open to a temp file. Return 0 if the
+ write is successful, otherwise return errno. */
+static int
+write_here_document (fd, redirectee)
+ int fd;
+ WORD_DESC *redirectee;
+{
+ char *document;
+ int document_len, fd2;
+ FILE *fp;
+ register WORD_LIST *t, *tlist;
+
+ /* Expand the text if the word that was specified had
+ no quoting. The text that we expand is treated
+ exactly as if it were surrounded by double quotes. */
+
+ if (redirectee->flags & W_QUOTED)
+ {
+ document = redirectee->word;
+ document_len = strlen (document);
+ /* Set errno to something reasonable if the write fails. */
+ if (write (fd, document, document_len) < document_len)
+ {
+ if (errno == 0)
+ errno = ENOSPC;
+ return (errno);
+ }
+ else
+ return 0;
+ }
+
+ expanding_redir = 1;
+ tlist = expand_string (redirectee->word, Q_HERE_DOCUMENT);
+ expanding_redir = 0;
+
+ if (tlist)
+ {
+ /* Try using buffered I/O (stdio) and writing a word
+ at a time, letting stdio do the work of buffering
+ for us rather than managing our own strings. Most
+ stdios are not particularly fast, however -- this
+ may need to be reconsidered later. */
+ if ((fd2 = dup (fd)) < 0 || (fp = fdopen (fd2, "w")) == NULL)
+ {
+ if (fd2 >= 0)
+ close (fd2);
+ return (errno);
+ }
+ errno = 0;
+ for (t = tlist; t; t = t->next)
+ {
+ /* This is essentially the body of
+ string_list_internal expanded inline. */
+ document = t->word->word;
+ document_len = strlen (document);
+ if (t != tlist)
+ putc (' ', fp); /* separator */
+ fwrite (document, document_len, 1, fp);
+ if (ferror (fp))
+ {
+ if (errno == 0)
+ errno = ENOSPC;
+ fd2 = errno;
+ fclose(fp);
+ dispose_words (tlist);
+ return (fd2);
+ }
+ }
+ dispose_words (tlist);
+ if (fclose (fp) != 0)
+ {
+ if (errno == 0)
+ errno = ENOSPC;
+ return (errno);
+ }
+ }
+ return 0;
+}
+
+/* Create a temporary file holding the text of the here document pointed to
+ by REDIRECTEE, and return a file descriptor open for reading to the temp
+ file. Return -1 on any error, and make sure errno is set appropriately. */
+static int
+here_document_to_fd (redirectee, ri)
+ WORD_DESC *redirectee;
+ enum r_instruction ri;
+{
+ char *filename;
+ int r, fd, fd2;
+
+ fd = sh_mktmpfd ("sh-thd", MT_USERANDOM|MT_USETMPDIR, &filename);
+
+ /* If we failed for some reason other than the file existing, abort */
+ if (fd < 0)
+ {
+ FREE (filename);
+ return (fd);
+ }
+
+ errno = r = 0; /* XXX */
+ /* write_here_document returns 0 on success, errno on failure. */
+ if (redirectee->word)
+ r = (ri != r_reading_string) ? write_here_document (fd, redirectee)
+ : write_here_string (fd, redirectee);
+
+ if (r)
+ {
+ close (fd);
+ unlink (filename);
+ free (filename);
+ errno = r;
+ return (-1);
+ }
+
+ /* In an attempt to avoid races, we close the first fd only after opening
+ the second. */
+ /* Make the document really temporary. Also make it the input. */
+ fd2 = open (filename, O_RDONLY, 0600);
+
+ if (fd2 < 0)
+ {
+ r = errno;
+ unlink (filename);
+ free (filename);
+ close (fd);
+ errno = r;
+ return -1;
+ }
+
+ close (fd);
+ if (unlink (filename) < 0)
+ {
+ r = errno;
+#if defined (__CYGWIN__)
+ /* Under CygWin 1.1.0, the unlink will fail if the file is
+ open. This hack will allow the previous action of silently
+ ignoring the error, but will still leave the file there. This
+ needs some kind of magic. */
+ if (r == EACCES)
+ return (fd2);
+#endif /* __CYGWIN__ */
+ close (fd2);
+ free (filename);
+ errno = r;
+ return (-1);
+ }
+
+ free (filename);
+ return (fd2);
+}
+
+#define RF_DEVFD 1
+#define RF_DEVSTDERR 2
+#define RF_DEVSTDIN 3
+#define RF_DEVSTDOUT 4
+#define RF_DEVTCP 5
+#define RF_DEVUDP 6
+
+/* A list of pattern/value pairs for filenames that the redirection
+ code handles specially. */
+static STRING_INT_ALIST _redir_special_filenames[] = {
+#if !defined (HAVE_DEV_FD)
+ { "/dev/fd/[0-9]*", RF_DEVFD },
+#endif
+#if !defined (HAVE_DEV_STDIN)
+ { "/dev/stderr", RF_DEVSTDERR },
+ { "/dev/stdin", RF_DEVSTDIN },
+ { "/dev/stdout", RF_DEVSTDOUT },
+#endif
+#if defined (NETWORK_REDIRECTIONS)
+ { "/dev/tcp/*/*", RF_DEVTCP },
+ { "/dev/udp/*/*", RF_DEVUDP },
+#endif
+ { (char *)NULL, -1 }
+};
+
+static int
+redir_special_open (spec, filename, flags, mode, ri)
+ int spec;
+ char *filename;
+ int flags, mode;
+ enum r_instruction ri;
+{
+ int fd;
+#if !defined (HAVE_DEV_FD)
+ intmax_t lfd;
+#endif
+
+ fd = -1;
+ switch (spec)
+ {
+#if !defined (HAVE_DEV_FD)
+ case RF_DEVFD:
+ if (all_digits (filename+8) && legal_number (filename+8, &lfd) && lfd == (int)lfd)
+ {
+ fd = lfd;
+ fd = fcntl (fd, F_DUPFD, SHELL_FD_BASE);
+ }
+ else
+ fd = AMBIGUOUS_REDIRECT;
+ break;
+#endif
+
+#if !defined (HAVE_DEV_STDIN)
+ case RF_DEVSTDIN:
+ fd = fcntl (0, F_DUPFD, SHELL_FD_BASE);
+ break;
+ case RF_DEVSTDOUT:
+ fd = fcntl (1, F_DUPFD, SHELL_FD_BASE);
+ break;
+ case RF_DEVSTDERR:
+ fd = fcntl (2, F_DUPFD, SHELL_FD_BASE);
+ break;
+#endif
+
+#if defined (NETWORK_REDIRECTIONS)
+ case RF_DEVTCP:
+ case RF_DEVUDP:
+#if defined (HAVE_NETWORK)
+ fd = netopen (filename);
+#else
+ internal_warning (_("/dev/(tcp|udp)/host/port not supported without networking"));
+ fd = open (filename, flags, mode);
+#endif
+ break;
+#endif /* NETWORK_REDIRECTIONS */
+ }
+
+ return fd;
+}
+
+/* Open FILENAME with FLAGS in noclobber mode, hopefully avoiding most
+ race conditions and avoiding the problem where the file is replaced
+ between the stat(2) and open(2). */
+static int
+noclobber_open (filename, flags, mode, ri)
+ char *filename;
+ int flags, mode;
+ enum r_instruction ri;
+{
+ int r, fd;
+ struct stat finfo, finfo2;
+
+ /* If the file exists and is a regular file, return an error
+ immediately. */
+ r = stat (filename, &finfo);
+ if (r == 0 && (S_ISREG (finfo.st_mode)))
+ return (NOCLOBBER_REDIRECT);
+
+ /* If the file was not present (r != 0), make sure we open it
+ exclusively so that if it is created before we open it, our open
+ will fail. Make sure that we do not truncate an existing file.
+ Note that we don't turn on O_EXCL unless the stat failed -- if
+ the file was not a regular file, we leave O_EXCL off. */
+ flags &= ~O_TRUNC;
+ if (r != 0)
+ {
+ fd = open (filename, flags|O_EXCL, mode);
+ return ((fd < 0 && errno == EEXIST) ? NOCLOBBER_REDIRECT : fd);
+ }
+ fd = open (filename, flags, mode);
+
+ /* If the open failed, return the file descriptor right away. */
+ if (fd < 0)
+ return (errno == EEXIST ? NOCLOBBER_REDIRECT : fd);
+
+ /* OK, the open succeeded, but the file may have been changed from a
+ non-regular file to a regular file between the stat and the open.
+ We are assuming that the O_EXCL open handles the case where FILENAME
+ did not exist and is symlinked to an existing file between the stat
+ and open. */
+
+ /* If we can open it and fstat the file descriptor, and neither check
+ revealed that it was a regular file, and the file has not been replaced,
+ return the file descriptor. */
+ if ((fstat (fd, &finfo2) == 0) && (S_ISREG (finfo2.st_mode) == 0) &&
+ r == 0 && (S_ISREG (finfo.st_mode) == 0) &&
+ same_file (filename, filename, &finfo, &finfo2))
+ return fd;
+
+ /* The file has been replaced. badness. */
+ close (fd);
+ errno = EEXIST;
+ return (NOCLOBBER_REDIRECT);
+}
+
+static int
+redir_open (filename, flags, mode, ri)
+ char *filename;
+ int flags, mode;
+ enum r_instruction ri;
+{
+ int fd, r;
+
+ r = find_string_in_alist (filename, _redir_special_filenames, 1);
+ if (r >= 0)
+ return (redir_special_open (r, filename, flags, mode, ri));
+
+ /* If we are in noclobber mode, you are not allowed to overwrite
+ existing files. Check before opening. */
+ if (noclobber && CLOBBERING_REDIRECT (ri))
+ {
+ fd = noclobber_open (filename, flags, mode, ri);
+ if (fd == NOCLOBBER_REDIRECT)
+ return (NOCLOBBER_REDIRECT);
+ }
+ else
+ {
+ fd = open (filename, flags, mode);
+#if defined (AFS)
+ if ((fd < 0) && (errno == EACCES))
+ {
+ fd = open (filename, flags & ~O_CREAT, mode);
+ errno = EACCES; /* restore errno */
+ }
+#endif /* AFS */
+ }
+
+ return fd;
+}
+
+static int
+undoablefd (fd)
+ int fd;
+{
+ int clexec;
+
+ clexec = fcntl (fd, F_GETFD, 0);
+ if (clexec == -1 || (fd >= SHELL_FD_BASE && clexec == 1))
+ return 0;
+ return 1;
+}
+
+/* Do the specific redirection requested. Returns errno or one of the
+ special redirection errors (*_REDIRECT) in case of error, 0 on success.
+ If flags & RX_ACTIVE is zero, then just do whatever is neccessary to
+ produce the appropriate side effects. flags & RX_UNDOABLE, if non-zero,
+ says to remember how to undo each redirection. If flags & RX_CLEXEC is
+ non-zero, then we set all file descriptors > 2 that we open to be
+ close-on-exec. */
+static int
+do_redirection_internal (redirect, flags)
+ REDIRECT *redirect;
+ int flags;
+{
+ WORD_DESC *redirectee;
+ int redir_fd, fd, redirector, r, oflags;
+ intmax_t lfd;
+ char *redirectee_word;
+ enum r_instruction ri;
+ REDIRECT *new_redirect;
+ REDIRECTEE sd;
+
+ redirectee = redirect->redirectee.filename;
+ redir_fd = redirect->redirectee.dest;
+ redirector = redirect->redirector.dest;
+ ri = redirect->instruction;
+
+ if (redirect->flags & RX_INTERNAL)
+ flags |= RX_INTERNAL;
+
+ if (TRANSLATE_REDIRECT (ri))
+ {
+ /* We have [N]>&WORD[-] or [N]<&WORD[-] (or {V}>&WORD[-] or {V}<&WORD-).
+ and WORD, then translate the redirection into a new one and
+ continue. */
+ redirectee_word = redirection_expand (redirectee);
+
+ /* XXX - what to do with [N]<&$w- where w is unset or null? ksh93
+ closes N. */
+ if (redirectee_word == 0)
+ return (AMBIGUOUS_REDIRECT);
+ else if (redirectee_word[0] == '-' && redirectee_word[1] == '\0')
+ {
+ sd = redirect->redirector;
+ rd.dest = 0;
+ new_redirect = make_redirection (sd, r_close_this, rd, 0);
+ }
+ else if (all_digits (redirectee_word))
+ {
+ sd = redirect->redirector;
+ if (legal_number (redirectee_word, &lfd) && (int)lfd == lfd)
+ rd.dest = lfd;
+ else
+ rd.dest = -1; /* XXX */
+ switch (ri)
+ {
+ case r_duplicating_input_word:
+ new_redirect = make_redirection (sd, r_duplicating_input, rd, 0);
+ break;
+ case r_duplicating_output_word:
+ new_redirect = make_redirection (sd, r_duplicating_output, rd, 0);
+ break;
+ case r_move_input_word:
+ new_redirect = make_redirection (sd, r_move_input, rd, 0);
+ break;
+ case r_move_output_word:
+ new_redirect = make_redirection (sd, r_move_output, rd, 0);
+ break;
+ }
+ }
+ else if (ri == r_duplicating_output_word && (redirect->rflags & REDIR_VARASSIGN) == 0 && redirector == 1)
+ {
+ sd = redirect->redirector;
+ rd.filename = make_bare_word (redirectee_word);
+ new_redirect = make_redirection (sd, r_err_and_out, rd, 0);
+ }
+ else
+ {
+ free (redirectee_word);
+ return (AMBIGUOUS_REDIRECT);
+ }
+
+ free (redirectee_word);
+
+ /* Set up the variables needed by the rest of the function from the
+ new redirection. */
+ if (new_redirect->instruction == r_err_and_out)
+ {
+ char *alloca_hack;
+
+ /* Copy the word without allocating any memory that must be
+ explicitly freed. */
+ redirectee = (WORD_DESC *)alloca (sizeof (WORD_DESC));
+ xbcopy ((char *)new_redirect->redirectee.filename,
+ (char *)redirectee, sizeof (WORD_DESC));
+
+ alloca_hack = (char *)
+ alloca (1 + strlen (new_redirect->redirectee.filename->word));
+ redirectee->word = alloca_hack;
+ strcpy (redirectee->word, new_redirect->redirectee.filename->word);
+ }
+ else
+ /* It's guaranteed to be an integer, and shouldn't be freed. */
+ redirectee = new_redirect->redirectee.filename;
+
+ redir_fd = new_redirect->redirectee.dest;
+ redirector = new_redirect->redirector.dest;
+ ri = new_redirect->instruction;
+
+ /* Overwrite the flags element of the old redirect with the new value. */
+ redirect->flags = new_redirect->flags;
+ dispose_redirects (new_redirect);
+ }
+
+ switch (ri)
+ {
+ case r_output_direction:
+ case r_appending_to:
+ case r_input_direction:
+ case r_inputa_direction:
+ case r_err_and_out: /* command &>filename */
+ case r_append_err_and_out: /* command &>> filename */
+ case r_input_output:
+ case r_output_force:
+ if (posixly_correct && interactive_shell == 0)
+ {
+ oflags = redirectee->flags;
+ redirectee->flags |= W_NOGLOB;
+ }
+ redirectee_word = redirection_expand (redirectee);
+ if (posixly_correct && interactive_shell == 0)
+ redirectee->flags = oflags;
+
+ if (redirectee_word == 0)
+ return (AMBIGUOUS_REDIRECT);
+
+#if defined (RESTRICTED_SHELL)
+ if (restricted && (WRITE_REDIRECT (ri)))
+ {
+ free (redirectee_word);
+ return (RESTRICTED_REDIRECT);
+ }
+#endif /* RESTRICTED_SHELL */
+
+ fd = redir_open (redirectee_word, redirect->flags, 0666, ri);
+ free (redirectee_word);
+
+ if (fd == NOCLOBBER_REDIRECT)
+ return (fd);
+
+ if (fd < 0)
+ return (errno);
+
+ if (flags & RX_ACTIVE)
+ {
+ if (redirect->rflags & REDIR_VARASSIGN)
+ redirector = fcntl (fd, F_DUPFD, SHELL_FD_BASE); /* XXX try this for now */
+
+ if (flags & RX_UNDOABLE)
+ {
+ /* Only setup to undo it if the thing to undo is active. */
+ if ((fd != redirector) && (fcntl (redirector, F_GETFD, 0) != -1))
+ add_undo_redirect (redirector, ri, -1);
+ else
+ add_undo_close_redirect (redirector);
+ }
+
+#if defined (BUFFERED_INPUT)
+ check_bash_input (redirector);
+#endif
+
+ /* Make sure there is no pending output before we change the state
+ of the underlying file descriptor, since the builtins use stdio
+ for output. */
+ if (redirector == 1 && fileno (stdout) == redirector)
+ {
+ fflush (stdout);
+ fpurge (stdout);
+ }
+ else if (redirector == 2 && fileno (stderr) == redirector)
+ {
+ fflush (stderr);
+ fpurge (stderr);
+ }
+
+ if (redirect->rflags & REDIR_VARASSIGN)
+ {
+ if ((r = redir_varassign (redirect, redirector)) < 0)
+ {
+ close (redirector);
+ close (fd);
+ return (r); /* XXX */
+ }
+ }
+ else if ((fd != redirector) && (dup2 (fd, redirector) < 0))
+ return (errno);
+
+#if defined (BUFFERED_INPUT)
+ /* Do not change the buffered stream for an implicit redirection
+ of /dev/null to fd 0 for asynchronous commands without job
+ control (r_inputa_direction). */
+ if (ri == r_input_direction || ri == r_input_output)
+ duplicate_buffered_stream (fd, redirector);
+#endif /* BUFFERED_INPUT */
+
+ /*
+ * If we're remembering, then this is the result of a while, for
+ * or until loop with a loop redirection, or a function/builtin
+ * executing in the parent shell with a redirection. In the
+ * function/builtin case, we want to set all file descriptors > 2
+ * to be close-on-exec to duplicate the effect of the old
+ * for i = 3 to NOFILE close(i) loop. In the case of the loops,
+ * both sh and ksh leave the file descriptors open across execs.
+ * The Posix standard mentions only the exec builtin.
+ */
+ if ((flags & RX_CLEXEC) && (redirector > 2))
+ SET_CLOSE_ON_EXEC (redirector);
+ }
+
+ if (fd != redirector)
+ {
+#if defined (BUFFERED_INPUT)
+ if (INPUT_REDIRECT (ri))
+ close_buffered_fd (fd);
+ else
+#endif /* !BUFFERED_INPUT */
+ close (fd); /* Don't close what we just opened! */
+ }
+
+ /* If we are hacking both stdout and stderr, do the stderr
+ redirection here. XXX - handle {var} here? */
+ if (ri == r_err_and_out || ri == r_append_err_and_out)
+ {
+ if (flags & RX_ACTIVE)
+ {
+ if (flags & RX_UNDOABLE)
+ add_undo_redirect (2, ri, -1);
+ if (dup2 (1, 2) < 0)
+ return (errno);
+ }
+ }
+ break;
+
+ case r_reading_until:
+ case r_deblank_reading_until:
+ case r_reading_string:
+ /* REDIRECTEE is a pointer to a WORD_DESC containing the text of
+ the new input. Place it in a temporary file. */
+ if (redirectee)
+ {
+ fd = here_document_to_fd (redirectee, ri);
+
+ if (fd < 0)
+ {
+ heredoc_errno = errno;
+ return (HEREDOC_REDIRECT);
+ }
+
+ if (redirect->rflags & REDIR_VARASSIGN)
+ redirector = fcntl (fd, F_DUPFD, SHELL_FD_BASE); /* XXX try this for now */
+
+ if (flags & RX_ACTIVE)
+ {
+ if (flags & RX_UNDOABLE)
+ {
+ /* Only setup to undo it if the thing to undo is active. */
+ if ((fd != redirector) && (fcntl (redirector, F_GETFD, 0) != -1))
+ add_undo_redirect (redirector, ri, -1);
+ else
+ add_undo_close_redirect (redirector);
+ }
+
+#if defined (BUFFERED_INPUT)
+ check_bash_input (redirector);
+#endif
+ if (redirect->rflags & REDIR_VARASSIGN)
+ {
+ if ((r = redir_varassign (redirect, redirector)) < 0)
+ {
+ close (redirector);
+ close (fd);
+ return (r); /* XXX */
+ }
+ }
+ else if (fd != redirector && dup2 (fd, redirector) < 0)
+ {
+ r = errno;
+ close (fd);
+ return (r);
+ }
+
+#if defined (BUFFERED_INPUT)
+ duplicate_buffered_stream (fd, redirector);
+#endif
+
+ if ((flags & RX_CLEXEC) && (redirector > 2))
+ SET_CLOSE_ON_EXEC (redirector);
+ }
+
+ if (fd != redirector)
+#if defined (BUFFERED_INPUT)
+ close_buffered_fd (fd);
+#else
+ close (fd);
+#endif
+ }
+ break;
+
+ case r_duplicating_input:
+ case r_duplicating_output:
+ case r_move_input:
+ case r_move_output:
+ if ((flags & RX_ACTIVE) && (redirect->rflags & REDIR_VARASSIGN))
+ redirector = fcntl (redir_fd, F_DUPFD, SHELL_FD_BASE); /* XXX try this for now */
+
+ if ((flags & RX_ACTIVE) && (redir_fd != redirector))
+ {
+ if (flags & RX_UNDOABLE)
+ {
+ /* Only setup to undo it if the thing to undo is active. */
+ if (fcntl (redirector, F_GETFD, 0) != -1)
+ add_undo_redirect (redirector, ri, redir_fd);
+ else
+ add_undo_close_redirect (redirector);
+ }
+#if defined (BUFFERED_INPUT)
+ check_bash_input (redirector);
+#endif
+ if (redirect->rflags & REDIR_VARASSIGN)
+ {
+ if ((r = redir_varassign (redirect, redirector)) < 0)
+ {
+ close (redirector);
+ return (r); /* XXX */
+ }
+ }
+ /* This is correct. 2>&1 means dup2 (1, 2); */
+ else if (dup2 (redir_fd, redirector) < 0)
+ return (errno);
+
+#if defined (BUFFERED_INPUT)
+ if (ri == r_duplicating_input || ri == r_move_input)
+ duplicate_buffered_stream (redir_fd, redirector);
+#endif /* BUFFERED_INPUT */
+
+ /* First duplicate the close-on-exec state of redirectee. dup2
+ leaves the flag unset on the new descriptor, which means it
+ stays open. Only set the close-on-exec bit for file descriptors
+ greater than 2 in any case, since 0-2 should always be open
+ unless closed by something like `exec 2<&-'. It should always
+ be safe to set fds > 2 to close-on-exec if they're being used to
+ save file descriptors < 2, since we don't need to preserve the
+ state of the close-on-exec flag for those fds -- they should
+ always be open. */
+ /* if ((already_set || set_unconditionally) && (ok_to_set))
+ set_it () */
+#if 0
+ if (((fcntl (redir_fd, F_GETFD, 0) == 1) || redir_fd < 2 || (flags & RX_CLEXEC)) &&
+ (redirector > 2))
+#else
+ if (((fcntl (redir_fd, F_GETFD, 0) == 1) || (redir_fd < 2 && (flags & RX_INTERNAL)) || (flags & RX_CLEXEC)) &&
+ (redirector > 2))
+#endif
+ SET_CLOSE_ON_EXEC (redirector);
+
+ /* When undoing saving of non-standard file descriptors (>=3) using
+ file descriptors >= SHELL_FD_BASE, we set the saving fd to be
+ close-on-exec and use a flag to decide how to set close-on-exec
+ when the fd is restored. */
+ if ((redirect->flags & RX_INTERNAL) && (redirect->flags & RX_SAVCLEXEC) && redirector >= 3 && redir_fd >= SHELL_FD_BASE)
+ SET_OPEN_ON_EXEC (redirector);
+
+ /* dup-and-close redirection */
+ if (ri == r_move_input || ri == r_move_output)
+ {
+ xtrace_fdchk (redir_fd);
+
+ close (redir_fd);
+#if defined (COPROCESS_SUPPORT)
+ coproc_fdchk (redir_fd); /* XXX - loses coproc fds */
+#endif
+ }
+ }
+ break;
+
+ case r_close_this:
+ if (flags & RX_ACTIVE)
+ {
+ if (redirect->rflags & REDIR_VARASSIGN)
+ {
+ redirector = redir_varvalue (redirect);
+ if (redirector < 0)
+ return AMBIGUOUS_REDIRECT;
+ }
+
+ if ((flags & RX_UNDOABLE) && (fcntl (redirector, F_GETFD, 0) != -1))
+ add_undo_redirect (redirector, ri, -1);
+
+#if defined (COPROCESS_SUPPORT)
+ coproc_fdchk (redirector);
+#endif
+ xtrace_fdchk (redirector);
+
+#if defined (BUFFERED_INPUT)
+ check_bash_input (redirector);
+ close_buffered_fd (redirector);
+#else /* !BUFFERED_INPUT */
+ close (redirector);
+#endif /* !BUFFERED_INPUT */
+ }
+ break;
+
+ case r_duplicating_input_word:
+ case r_duplicating_output_word:
+ break;
+ }
+ return (0);
+}
+
+/* Remember the file descriptor associated with the slot FD,
+ on REDIRECTION_UNDO_LIST. Note that the list will be reversed
+ before it is executed. Any redirections that need to be undone
+ even if REDIRECTION_UNDO_LIST is discarded by the exec builtin
+ are also saved on EXEC_REDIRECTION_UNDO_LIST. FDBASE says where to
+ start the duplicating. If it's less than SHELL_FD_BASE, we're ok,
+ and can use SHELL_FD_BASE (-1 == don't care). If it's >= SHELL_FD_BASE,
+ we have to make sure we don't use fdbase to save a file descriptor,
+ since we're going to use it later (e.g., make sure we don't save fd 0
+ to fd 10 if we have a redirection like 0<&10). If the value of fdbase
+ puts the process over its fd limit, causing fcntl to fail, we try
+ again with SHELL_FD_BASE. */
+static int
+add_undo_redirect (fd, ri, fdbase)
+ int fd;
+ enum r_instruction ri;
+ int fdbase;
+{
+ int new_fd, clexec_flag;
+ REDIRECT *new_redirect, *closer, *dummy_redirect;
+ REDIRECTEE sd;
+
+ new_fd = fcntl (fd, F_DUPFD, (fdbase < SHELL_FD_BASE) ? SHELL_FD_BASE : fdbase+1);
+ if (new_fd < 0)
+ new_fd = fcntl (fd, F_DUPFD, SHELL_FD_BASE);
+
+ if (new_fd < 0)
+ {
+ sys_error (_("redirection error: cannot duplicate fd"));
+ return (-1);
+ }
+
+ clexec_flag = fcntl (fd, F_GETFD, 0);
+
+ sd.dest = new_fd;
+ rd.dest = 0;
+ closer = make_redirection (sd, r_close_this, rd, 0);
+ closer->flags |= RX_INTERNAL;
+ dummy_redirect = copy_redirects (closer);
+
+ sd.dest = fd;
+ rd.dest = new_fd;
+ if (fd == 0)
+ new_redirect = make_redirection (sd, r_duplicating_input, rd, 0);
+ else
+ new_redirect = make_redirection (sd, r_duplicating_output, rd, 0);
+ new_redirect->flags |= RX_INTERNAL;
+ if (clexec_flag == 0 && fd >= 3 && new_fd >= SHELL_FD_BASE)
+ new_redirect->flags |= RX_SAVCLEXEC;
+ new_redirect->next = closer;
+
+ closer->next = redirection_undo_list;
+ redirection_undo_list = new_redirect;
+
+ /* Save redirections that need to be undone even if the undo list
+ is thrown away by the `exec' builtin. */
+ add_exec_redirect (dummy_redirect);
+
+ /* experimental: if we're saving a redirection to undo for a file descriptor
+ above SHELL_FD_BASE, add a redirection to be undone if the exec builtin
+ causes redirections to be discarded. There needs to be a difference
+ between fds that are used to save other fds and then are the target of
+ user redirctions and fds that are just the target of user redirections.
+ We use the close-on-exec flag to tell the difference; fds > SHELL_FD_BASE
+ that have the close-on-exec flag set are assumed to be fds used internally
+ to save others. */
+ if (fd >= SHELL_FD_BASE && ri != r_close_this && clexec_flag)
+ {
+ sd.dest = fd;
+ rd.dest = new_fd;
+ new_redirect = make_redirection (sd, r_duplicating_output, rd, 0);
+ new_redirect->flags |= RX_INTERNAL;
+
+ add_exec_redirect (new_redirect);
+ }
+
+ /* File descriptors used only for saving others should always be
+ marked close-on-exec. Unfortunately, we have to preserve the
+ close-on-exec state of the file descriptor we are saving, since
+ fcntl (F_DUPFD) sets the new file descriptor to remain open
+ across execs. If, however, the file descriptor whose state we
+ are saving is <= 2, we can just set the close-on-exec flag,
+ because file descriptors 0-2 should always be open-on-exec,
+ and the restore above in do_redirection() will take care of it. */
+ if (clexec_flag || fd < 3)
+ SET_CLOSE_ON_EXEC (new_fd);
+ else if (redirection_undo_list->flags & RX_SAVCLEXEC)
+ SET_CLOSE_ON_EXEC (new_fd);
+
+ return (0);
+}
+
+/* Set up to close FD when we are finished with the current command
+ and its redirections. */
+static void
+add_undo_close_redirect (fd)
+ int fd;
+{
+ REDIRECT *closer;
+ REDIRECTEE sd;
+
+ sd.dest = fd;
+ rd.dest = 0;
+ closer = make_redirection (sd, r_close_this, rd, 0);
+ closer->flags |= RX_INTERNAL;
+ closer->next = redirection_undo_list;
+ redirection_undo_list = closer;
+}
+
+static void
+add_exec_redirect (dummy_redirect)
+ REDIRECT *dummy_redirect;
+{
+ dummy_redirect->next = exec_redirection_undo_list;
+ exec_redirection_undo_list = dummy_redirect;
+}
+
+/* Return 1 if the redirection specified by RI and REDIRECTOR alters the
+ standard input. */
+static int
+stdin_redirection (ri, redirector)
+ enum r_instruction ri;
+ int redirector;
+{
+ switch (ri)
+ {
+ case r_input_direction:
+ case r_inputa_direction:
+ case r_input_output:
+ case r_reading_until:
+ case r_deblank_reading_until:
+ case r_reading_string:
+ return (1);
+ case r_duplicating_input:
+ case r_duplicating_input_word:
+ case r_close_this:
+ return (redirector == 0);
+ case r_output_direction:
+ case r_appending_to:
+ case r_duplicating_output:
+ case r_err_and_out:
+ case r_append_err_and_out:
+ case r_output_force:
+ case r_duplicating_output_word:
+ return (0);
+ }
+ return (0);
+}
+
+/* Return non-zero if any of the redirections in REDIRS alter the standard
+ input. */
+int
+stdin_redirects (redirs)
+ REDIRECT *redirs;
+{
+ REDIRECT *rp;
+ int n;
+
+ for (n = 0, rp = redirs; rp; rp = rp->next)
+ if ((rp->rflags & REDIR_VARASSIGN) == 0)
+ n += stdin_redirection (rp->instruction, rp->redirector.dest);
+ return n;
+}
+
+/* These don't yet handle array references */
+static int
+redir_varassign (redir, fd)
+ REDIRECT *redir;
+ int fd;
+{
+ WORD_DESC *w;
+ SHELL_VAR *v;
+
+ w = redir->redirector.filename;
+ v = bind_var_to_int (w->word, fd);
+ if (v == 0 || readonly_p (v) || noassign_p (v))
+ return BADVAR_REDIRECT;
+
+ return 0;
+}
+
+static int
+redir_varvalue (redir)
+ REDIRECT *redir;
+{
+ SHELL_VAR *v;
+ char *val;
+ intmax_t vmax;
+ int i;
+
+ /* XXX - handle set -u here? */
+ v = find_variable (redir->redirector.filename->word);
+ if (v == 0 || invisible_p (v))
+ return -1;
+
+ val = get_variable_value (v);
+ if (val == 0 || *val == 0)
+ return -1;
+
+ if (legal_number (val, &vmax) < 0)
+ return -1;
+
+ i = vmax; /* integer truncation */
+ return i;
+}
diff --git a/redir.h b/redir.h
new file mode 100644
index 0000000..474acda
--- /dev/null
+++ b/redir.h
@@ -0,0 +1,39 @@
+/* redir.h - functions from redir.c. */
+
+/* Copyright (C) 1997, 2001, 2005, 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_REDIR_H_)
+#define _REDIR_H_
+
+#include "stdc.h"
+
+/* Values for flags argument to do_redirections */
+#define RX_ACTIVE 0x01 /* do it; don't just go through the motions */
+#define RX_UNDOABLE 0x02 /* make a list to undo these redirections */
+#define RX_CLEXEC 0x04 /* set close-on-exec for opened fds > 2 */
+#define RX_INTERNAL 0x08
+#define RX_USER 0x10
+#define RX_SAVCLEXEC 0x20 /* set close-on-exec off in restored fd even though saved on has it on */
+
+extern void redirection_error __P((REDIRECT *, int));
+extern int do_redirections __P((REDIRECT *, int));
+extern char *redirection_expand __P((WORD_DESC *));
+extern int stdin_redirects __P((REDIRECT *));
+
+#endif /* _REDIR_H_ */
diff --git a/shell.c b/shell.c
new file mode 100644
index 0000000..8dadb0b
--- /dev/null
+++ b/shell.c
@@ -0,0 +1,1854 @@
+/* shell.c -- GNU's idea of the POSIX shell specification. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/*
+ Birthdate:
+ Sunday, January 10th, 1988.
+ Initial author: Brian Fox
+*/
+#define INSTALL_DEBUG_MODE
+
+#include "config.h"
+
+#include "bashtypes.h"
+#if !defined (_MINIX) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif
+#include "posixstat.h"
+#include "posixtime.h"
+#include "bashansi.h"
+#include <stdio.h>
+#include <signal.h>
+#include <errno.h>
+#include "filecntl.h"
+#include <pwd.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashintl.h"
+
+#define NEED_SH_SETLINEBUF_DECL /* used in externs.h */
+
+#include "shell.h"
+#include "flags.h"
+#include "trap.h"
+#include "mailcheck.h"
+#include "builtins.h"
+#include "builtins/common.h"
+
+#if defined (JOB_CONTROL)
+#include "jobs.h"
+#endif /* JOB_CONTROL */
+
+#include "input.h"
+#include "execute_cmd.h"
+#include "findcmd.h"
+
+#if defined (USING_BASH_MALLOC) && defined (DEBUG) && !defined (DISABLE_MALLOC_WRAPPERS)
+# include <malloc/shmalloc.h>
+#endif
+
+#if defined (HISTORY)
+# include "bashhist.h"
+# include <readline/history.h>
+#endif
+
+#if defined (READLINE)
+# include "bashline.h"
+#endif
+
+#include <tilde/tilde.h>
+#include <glob/strmatch.h>
+
+#if defined (__OPENNT)
+# include <opennt/opennt.h>
+#endif
+
+#if !defined (HAVE_GETPW_DECLS)
+extern struct passwd *getpwuid ();
+#endif /* !HAVE_GETPW_DECLS */
+
+#if !defined (errno)
+extern int errno;
+#endif
+
+#if defined (NO_MAIN_ENV_ARG)
+extern char **environ; /* used if no third argument to main() */
+#endif
+
+extern char *dist_version, *release_status;
+extern int patch_level, build_version;
+extern int shell_level;
+extern int subshell_environment;
+extern int last_command_exit_value;
+extern int line_number;
+extern int expand_aliases;
+extern int array_needs_making;
+extern int gnu_error_format;
+extern char *primary_prompt, *secondary_prompt;
+extern char *this_command_name;
+
+/* Non-zero means that this shell has already been run; i.e. you should
+ call shell_reinitialize () if you need to start afresh. */
+int shell_initialized = 0;
+
+COMMAND *global_command = (COMMAND *)NULL;
+
+/* Information about the current user. */
+struct user_info current_user =
+{
+ (uid_t)-1, (uid_t)-1, (gid_t)-1, (gid_t)-1,
+ (char *)NULL, (char *)NULL, (char *)NULL
+};
+
+/* The current host's name. */
+char *current_host_name = (char *)NULL;
+
+/* Non-zero means that this shell is a login shell.
+ Specifically:
+ 0 = not login shell.
+ 1 = login shell from getty (or equivalent fake out)
+ -1 = login shell from "--login" (or -l) flag.
+ -2 = both from getty, and from flag.
+ */
+int login_shell = 0;
+
+/* Non-zero means that at this moment, the shell is interactive. In
+ general, this means that the shell is at this moment reading input
+ from the keyboard. */
+int interactive = 0;
+
+/* Non-zero means that the shell was started as an interactive shell. */
+int interactive_shell = 0;
+
+/* Non-zero means to send a SIGHUP to all jobs when an interactive login
+ shell exits. */
+int hup_on_exit = 0;
+
+/* Non-zero means to list status of running and stopped jobs at shell exit */
+int check_jobs_at_exit = 0;
+
+/* Non-zero means to change to a directory name supplied as a command name */
+int autocd = 0;
+
+/* Tells what state the shell was in when it started:
+ 0 = non-interactive shell script
+ 1 = interactive
+ 2 = -c command
+ 3 = wordexp evaluation
+ This is a superset of the information provided by interactive_shell.
+*/
+int startup_state = 0;
+
+/* Special debugging helper. */
+int debugging_login_shell = 0;
+
+/* The environment that the shell passes to other commands. */
+char **shell_environment;
+
+/* Non-zero when we are executing a top-level command. */
+int executing = 0;
+
+/* The number of commands executed so far. */
+int current_command_number = 1;
+
+/* Non-zero is the recursion depth for commands. */
+int indirection_level = 0;
+
+/* The name of this shell, as taken from argv[0]. */
+char *shell_name = (char *)NULL;
+
+/* time in seconds when the shell was started */
+time_t shell_start_time;
+
+/* Are we running in an emacs shell window? */
+int running_under_emacs;
+
+/* Do we have /dev/fd? */
+#ifdef HAVE_DEV_FD
+int have_devfd = HAVE_DEV_FD;
+#else
+int have_devfd = 0;
+#endif
+
+/* The name of the .(shell)rc file. */
+static char *bashrc_file = "~/.bashrc";
+
+/* Non-zero means to act more like the Bourne shell on startup. */
+static int act_like_sh;
+
+/* Non-zero if this shell is being run by `su'. */
+static int su_shell;
+
+/* Non-zero if we have already expanded and sourced $ENV. */
+static int sourced_env;
+
+/* Is this shell running setuid? */
+static int running_setuid;
+
+/* Values for the long-winded argument names. */
+static int debugging; /* Do debugging things. */
+static int no_rc; /* Don't execute ~/.bashrc */
+static int no_profile; /* Don't execute .profile */
+static int do_version; /* Display interesting version info. */
+static int make_login_shell; /* Make this shell be a `-bash' shell. */
+static int want_initial_help; /* --help option */
+
+int debugging_mode = 0; /* In debugging mode with --debugger */
+int no_line_editing = 0; /* Don't do fancy line editing. */
+int dump_translatable_strings; /* Dump strings in $"...", don't execute. */
+int dump_po_strings; /* Dump strings in $"..." in po format */
+int wordexp_only = 0; /* Do word expansion only */
+int protected_mode = 0; /* No command substitution with --wordexp */
+
+#if defined (STRICT_POSIX)
+int posixly_correct = 1; /* Non-zero means posix.2 superset. */
+#else
+int posixly_correct = 0; /* Non-zero means posix.2 superset. */
+#endif
+
+
+/* Some long-winded argument names. These are obviously new. */
+#define Int 1
+#define Charp 2
+static const struct {
+ const char *name;
+ int type;
+ int *int_value;
+ char **char_value;
+} long_args[] = {
+ { "debug", Int, &debugging, (char **)0x0 },
+#if defined (DEBUGGER)
+ { "debugger", Int, &debugging_mode, (char **)0x0 },
+#endif
+ { "dump-po-strings", Int, &dump_po_strings, (char **)0x0 },
+ { "dump-strings", Int, &dump_translatable_strings, (char **)0x0 },
+ { "help", Int, &want_initial_help, (char **)0x0 },
+ { "init-file", Charp, (int *)0x0, &bashrc_file },
+ { "login", Int, &make_login_shell, (char **)0x0 },
+ { "noediting", Int, &no_line_editing, (char **)0x0 },
+ { "noprofile", Int, &no_profile, (char **)0x0 },
+ { "norc", Int, &no_rc, (char **)0x0 },
+ { "posix", Int, &posixly_correct, (char **)0x0 },
+ { "protected", Int, &protected_mode, (char **)0x0 },
+ { "rcfile", Charp, (int *)0x0, &bashrc_file },
+#if defined (RESTRICTED_SHELL)
+ { "restricted", Int, &restricted, (char **)0x0 },
+#endif
+ { "verbose", Int, &echo_input_at_read, (char **)0x0 },
+ { "version", Int, &do_version, (char **)0x0 },
+#if defined (WORDEXP_OPTION)
+ { "wordexp", Int, &wordexp_only, (char **)0x0 },
+#endif
+ { (char *)0x0, Int, (int *)0x0, (char **)0x0 }
+};
+
+/* These are extern so execute_simple_command can set them, and then
+ longjmp back to main to execute a shell script, instead of calling
+ main () again and resulting in indefinite, possibly fatal, stack
+ growth. */
+procenv_t subshell_top_level;
+int subshell_argc;
+char **subshell_argv;
+char **subshell_envp;
+
+#if defined (BUFFERED_INPUT)
+/* The file descriptor from which the shell is reading input. */
+int default_buffered_input = -1;
+#endif
+
+/* The following two variables are not static so they can show up in $-. */
+int read_from_stdin; /* -s flag supplied */
+int want_pending_command; /* -c flag supplied */
+
+/* This variable is not static so it can be bound to $BASH_EXECUTION_STRING */
+char *command_execution_string; /* argument to -c option */
+
+int malloc_trace_at_exit = 0;
+
+static int shell_reinitialized = 0;
+
+static FILE *default_input;
+
+static STRING_INT_ALIST *shopt_alist;
+static int shopt_ind = 0, shopt_len = 0;
+
+static int parse_long_options __P((char **, int, int));
+static int parse_shell_options __P((char **, int, int));
+static int bind_args __P((char **, int, int, int));
+
+static void start_debugger __P((void));
+
+static void add_shopt_to_alist __P((char *, int));
+static void run_shopt_alist __P((void));
+
+static void execute_env_file __P((char *));
+static void run_startup_files __P((void));
+static int open_shell_script __P((char *));
+static void set_bash_input __P((void));
+static int run_one_command __P((char *));
+#if defined (WORDEXP_OPTION)
+static int run_wordexp __P((char *));
+#endif
+
+static int uidget __P((void));
+
+static void init_interactive __P((void));
+static void init_noninteractive __P((void));
+static void init_interactive_script __P((void));
+
+static void set_shell_name __P((char *));
+static void shell_initialize __P((void));
+static void shell_reinitialize __P((void));
+
+static void show_shell_usage __P((FILE *, int));
+
+#ifdef __CYGWIN__
+static void
+_cygwin32_check_tmp ()
+{
+ struct stat sb;
+
+ if (stat ("/tmp", &sb) < 0)
+ internal_warning (_("could not find /tmp, please create!"));
+ else
+ {
+ if (S_ISDIR (sb.st_mode) == 0)
+ internal_warning (_("/tmp must be a valid directory name"));
+ }
+}
+#endif /* __CYGWIN__ */
+
+#if defined (NO_MAIN_ENV_ARG)
+/* systems without third argument to main() */
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+#else /* !NO_MAIN_ENV_ARG */
+int
+main (argc, argv, env)
+ int argc;
+ char **argv, **env;
+#endif /* !NO_MAIN_ENV_ARG */
+{
+ register int i;
+ int code, old_errexit_flag;
+#if defined (RESTRICTED_SHELL)
+ int saverst;
+#endif
+ volatile int locally_skip_execution;
+ volatile int arg_index, top_level_arg_index;
+#ifdef __OPENNT
+ char **env;
+
+ env = environ;
+#endif /* __OPENNT */
+
+ USE_VAR(argc);
+ USE_VAR(argv);
+ USE_VAR(env);
+ USE_VAR(code);
+ USE_VAR(old_errexit_flag);
+#if defined (RESTRICTED_SHELL)
+ USE_VAR(saverst);
+#endif
+
+ /* Catch early SIGINTs. */
+ code = setjmp (top_level);
+ if (code)
+ exit (2);
+
+ xtrace_init ();
+
+#if defined (USING_BASH_MALLOC) && defined (DEBUG) && !defined (DISABLE_MALLOC_WRAPPERS)
+# if 1
+ malloc_set_register (1);
+# endif
+#endif
+
+ check_dev_tty ();
+
+#ifdef __CYGWIN__
+ _cygwin32_check_tmp ();
+#endif /* __CYGWIN__ */
+
+ /* Wait forever if we are debugging a login shell. */
+ while (debugging_login_shell) sleep (3);
+
+ set_default_locale ();
+
+ running_setuid = uidget ();
+
+ if (getenv ("POSIXLY_CORRECT") || getenv ("POSIX_PEDANTIC"))
+ posixly_correct = 1;
+
+#if defined (USE_GNU_MALLOC_LIBRARY)
+ mcheck (programming_error, (void (*) ())0);
+#endif /* USE_GNU_MALLOC_LIBRARY */
+
+ if (setjmp (subshell_top_level))
+ {
+ argc = subshell_argc;
+ argv = subshell_argv;
+ env = subshell_envp;
+ sourced_env = 0;
+ }
+
+ shell_reinitialized = 0;
+
+ /* Initialize `local' variables for all `invocations' of main (). */
+ arg_index = 1;
+ if (arg_index > argc)
+ arg_index = argc;
+ command_execution_string = (char *)NULL;
+ want_pending_command = locally_skip_execution = read_from_stdin = 0;
+ default_input = stdin;
+#if defined (BUFFERED_INPUT)
+ default_buffered_input = -1;
+#endif
+
+ /* Fix for the `infinite process creation' bug when running shell scripts
+ from startup files on System V. */
+ login_shell = make_login_shell = 0;
+
+ /* If this shell has already been run, then reinitialize it to a
+ vanilla state. */
+ if (shell_initialized || shell_name)
+ {
+ /* Make sure that we do not infinitely recurse as a login shell. */
+ if (*shell_name == '-')
+ shell_name++;
+
+ shell_reinitialize ();
+ if (setjmp (top_level))
+ exit (2);
+ }
+
+ shell_environment = env;
+ set_shell_name (argv[0]);
+ shell_start_time = NOW; /* NOW now defined in general.h */
+
+ /* Parse argument flags from the input line. */
+
+ /* Find full word arguments first. */
+ arg_index = parse_long_options (argv, arg_index, argc);
+
+ if (want_initial_help)
+ {
+ show_shell_usage (stdout, 1);
+ exit (EXECUTION_SUCCESS);
+ }
+
+ if (do_version)
+ {
+ show_shell_version (1);
+ exit (EXECUTION_SUCCESS);
+ }
+
+ /* All done with full word options; do standard shell option parsing.*/
+ this_command_name = shell_name; /* for error reporting */
+ arg_index = parse_shell_options (argv, arg_index, argc);
+
+ /* If user supplied the "--login" (or -l) flag, then set and invert
+ LOGIN_SHELL. */
+ if (make_login_shell)
+ {
+ login_shell++;
+ login_shell = -login_shell;
+ }
+
+ set_login_shell ("login_shell", login_shell != 0);
+
+ if (dump_po_strings)
+ dump_translatable_strings = 1;
+
+ if (dump_translatable_strings)
+ read_but_dont_execute = 1;
+
+ if (running_setuid && privileged_mode == 0)
+ disable_priv_mode ();
+
+ /* Need to get the argument to a -c option processed in the
+ above loop. The next arg is a command to execute, and the
+ following args are $0...$n respectively. */
+ if (want_pending_command)
+ {
+ command_execution_string = argv[arg_index];
+ if (command_execution_string == 0)
+ {
+ report_error (_("%s: option requires an argument"), "-c");
+ exit (EX_BADUSAGE);
+ }
+ arg_index++;
+ }
+ this_command_name = (char *)NULL;
+
+ cmd_init(); /* initialize the command object caches */
+
+ /* First, let the outside world know about our interactive status.
+ A shell is interactive if the `-i' flag was given, or if all of
+ the following conditions are met:
+ no -c command
+ no arguments remaining or the -s flag given
+ standard input is a terminal
+ standard error is a terminal
+ Refer to Posix.2, the description of the `sh' utility. */
+
+ if (forced_interactive || /* -i flag */
+ (!command_execution_string && /* No -c command and ... */
+ wordexp_only == 0 && /* No --wordexp and ... */
+ ((arg_index == argc) || /* no remaining args or... */
+ read_from_stdin) && /* -s flag with args, and */
+ isatty (fileno (stdin)) && /* Input is a terminal and */
+ isatty (fileno (stderr)))) /* error output is a terminal. */
+ init_interactive ();
+ else
+ init_noninteractive ();
+
+#define CLOSE_FDS_AT_LOGIN
+#if defined (CLOSE_FDS_AT_LOGIN)
+ /*
+ * Some systems have the bad habit of starting login shells with lots of open
+ * file descriptors. For instance, most systems that have picked up the
+ * pre-4.0 Sun YP code leave a file descriptor open each time you call one
+ * of the getpw* functions, and it's set to be open across execs. That
+ * means one for login, one for xterm, one for shelltool, etc.
+ */
+ if (login_shell && interactive_shell)
+ {
+ for (i = 3; i < 20; i++)
+ close (i);
+ }
+#endif /* CLOSE_FDS_AT_LOGIN */
+
+ /* If we're in a strict Posix.2 mode, turn on interactive comments,
+ alias expansion in non-interactive shells, and other Posix.2 things. */
+ if (posixly_correct)
+ {
+ bind_variable ("POSIXLY_CORRECT", "y", 0);
+ sv_strict_posix ("POSIXLY_CORRECT");
+ }
+
+ /* Now we run the shopt_alist and process the options. */
+ if (shopt_alist)
+ run_shopt_alist ();
+
+ /* From here on in, the shell must be a normal functioning shell.
+ Variables from the environment are expected to be set, etc. */
+ shell_initialize ();
+
+ set_default_lang ();
+ set_default_locale_vars ();
+
+ /*
+ * M-x term -> TERM=eterm EMACS=22.1 (term:0.96) (eterm)
+ * M-x shell -> TERM=dumb EMACS=t (no line editing)
+ * M-x terminal -> TERM=emacs-em7955 EMACS= (line editing)
+ */
+ if (interactive_shell)
+ {
+ char *term, *emacs;
+
+ term = get_string_value ("TERM");
+ emacs = get_string_value ("EMACS");
+
+ /* Not sure any emacs terminal emulator sets TERM=emacs any more */
+ no_line_editing |= term && (STREQ (term, "emacs"));
+ no_line_editing |= emacs && emacs[0] == 't' && emacs[1] == '\0' && STREQ (term, "dumb");
+
+ /* running_under_emacs == 2 for `eterm' */
+ running_under_emacs = (emacs != 0) || (term && STREQN (term, "emacs", 5));
+ running_under_emacs += term && STREQN (term, "eterm", 5) && emacs && strstr (emacs, "term");
+
+ if (running_under_emacs)
+ gnu_error_format = 1;
+ }
+
+ top_level_arg_index = arg_index;
+ old_errexit_flag = exit_immediately_on_error;
+
+ /* Give this shell a place to longjmp to before executing the
+ startup files. This allows users to press C-c to abort the
+ lengthy startup. */
+ code = setjmp (top_level);
+ if (code)
+ {
+ if (code == EXITPROG || code == ERREXIT)
+ exit_shell (last_command_exit_value);
+ else
+ {
+#if defined (JOB_CONTROL)
+ /* Reset job control, since run_startup_files turned it off. */
+ set_job_control (interactive_shell);
+#endif
+ /* Reset value of `set -e', since it's turned off before running
+ the startup files. */
+ exit_immediately_on_error += old_errexit_flag;
+ locally_skip_execution++;
+ }
+ }
+
+ arg_index = top_level_arg_index;
+
+ /* Execute the start-up scripts. */
+
+ if (interactive_shell == 0)
+ {
+ unbind_variable ("PS1");
+ unbind_variable ("PS2");
+ interactive = 0;
+#if 0
+ /* This has already been done by init_noninteractive */
+ expand_aliases = posixly_correct;
+#endif
+ }
+ else
+ {
+ change_flag ('i', FLAG_ON);
+ interactive = 1;
+ }
+
+#if defined (RESTRICTED_SHELL)
+ /* Set restricted_shell based on whether the basename of $0 indicates that
+ the shell should be restricted or if the `-r' option was supplied at
+ startup. */
+ restricted_shell = shell_is_restricted (shell_name);
+
+ /* If the `-r' option is supplied at invocation, make sure that the shell
+ is not in restricted mode when running the startup files. */
+ saverst = restricted;
+ restricted = 0;
+#endif
+
+ /* The startup files are run with `set -e' temporarily disabled. */
+ if (locally_skip_execution == 0 && running_setuid == 0)
+ {
+ old_errexit_flag = exit_immediately_on_error;
+ exit_immediately_on_error = 0;
+
+ run_startup_files ();
+ exit_immediately_on_error += old_errexit_flag;
+ }
+
+ /* If we are invoked as `sh', turn on Posix mode. */
+ if (act_like_sh)
+ {
+ bind_variable ("POSIXLY_CORRECT", "y", 0);
+ sv_strict_posix ("POSIXLY_CORRECT");
+ }
+
+#if defined (RESTRICTED_SHELL)
+ /* Turn on the restrictions after executing the startup files. This
+ means that `bash -r' or `set -r' invoked from a startup file will
+ turn on the restrictions after the startup files are executed. */
+ restricted = saverst || restricted;
+ if (shell_reinitialized == 0)
+ maybe_make_restricted (shell_name);
+#endif /* RESTRICTED_SHELL */
+
+#if defined (WORDEXP_OPTION)
+ if (wordexp_only)
+ {
+ startup_state = 3;
+ last_command_exit_value = run_wordexp (argv[arg_index]);
+ exit_shell (last_command_exit_value);
+ }
+#endif
+
+ if (command_execution_string)
+ {
+ arg_index = bind_args (argv, arg_index, argc, 0);
+ startup_state = 2;
+
+ if (debugging_mode)
+ start_debugger ();
+
+#if defined (ONESHOT)
+ executing = 1;
+ run_one_command (command_execution_string);
+ exit_shell (last_command_exit_value);
+#else /* ONESHOT */
+ with_input_from_string (command_execution_string, "-c");
+ goto read_and_execute;
+#endif /* !ONESHOT */
+ }
+
+ /* Get possible input filename and set up default_buffered_input or
+ default_input as appropriate. */
+ if (arg_index != argc && read_from_stdin == 0)
+ {
+ open_shell_script (argv[arg_index]);
+ arg_index++;
+ }
+ else if (interactive == 0)
+ /* In this mode, bash is reading a script from stdin, which is a
+ pipe or redirected file. */
+#if defined (BUFFERED_INPUT)
+ default_buffered_input = fileno (stdin); /* == 0 */
+#else
+ setbuf (default_input, (char *)NULL);
+#endif /* !BUFFERED_INPUT */
+
+ set_bash_input ();
+
+ /* Bind remaining args to $1 ... $n */
+ arg_index = bind_args (argv, arg_index, argc, 1);
+
+ if (debugging_mode && locally_skip_execution == 0 && running_setuid == 0)
+ start_debugger ();
+
+ /* Do the things that should be done only for interactive shells. */
+ if (interactive_shell)
+ {
+ /* Set up for checking for presence of mail. */
+ reset_mail_timer ();
+ init_mail_dates ();
+
+#if defined (HISTORY)
+ /* Initialize the interactive history stuff. */
+ bash_initialize_history ();
+ /* Don't load the history from the history file if we've already
+ saved some lines in this session (e.g., by putting `history -s xx'
+ into one of the startup files). */
+ if (shell_initialized == 0 && history_lines_this_session == 0)
+ load_history ();
+#endif /* HISTORY */
+
+ /* Initialize terminal state for interactive shells after the
+ .bash_profile and .bashrc are interpreted. */
+ get_tty_state ();
+ }
+
+#if !defined (ONESHOT)
+ read_and_execute:
+#endif /* !ONESHOT */
+
+ shell_initialized = 1;
+
+ /* Read commands until exit condition. */
+ reader_loop ();
+ exit_shell (last_command_exit_value);
+}
+
+static int
+parse_long_options (argv, arg_start, arg_end)
+ char **argv;
+ int arg_start, arg_end;
+{
+ int arg_index, longarg, i;
+ char *arg_string;
+
+ arg_index = arg_start;
+ while ((arg_index != arg_end) && (arg_string = argv[arg_index]) &&
+ (*arg_string == '-'))
+ {
+ longarg = 0;
+
+ /* Make --login equivalent to -login. */
+ if (arg_string[1] == '-' && arg_string[2])
+ {
+ longarg = 1;
+ arg_string++;
+ }
+
+ for (i = 0; long_args[i].name; i++)
+ {
+ if (STREQ (arg_string + 1, long_args[i].name))
+ {
+ if (long_args[i].type == Int)
+ *long_args[i].int_value = 1;
+ else if (argv[++arg_index] == 0)
+ {
+ report_error (_("%s: option requires an argument"), long_args[i].name);
+ exit (EX_BADUSAGE);
+ }
+ else
+ *long_args[i].char_value = argv[arg_index];
+
+ break;
+ }
+ }
+ if (long_args[i].name == 0)
+ {
+ if (longarg)
+ {
+ report_error (_("%s: invalid option"), argv[arg_index]);
+ show_shell_usage (stderr, 0);
+ exit (EX_BADUSAGE);
+ }
+ break; /* No such argument. Maybe flag arg. */
+ }
+
+ arg_index++;
+ }
+
+ return (arg_index);
+}
+
+static int
+parse_shell_options (argv, arg_start, arg_end)
+ char **argv;
+ int arg_start, arg_end;
+{
+ int arg_index;
+ int arg_character, on_or_off, next_arg, i;
+ char *o_option, *arg_string;
+
+ arg_index = arg_start;
+ while (arg_index != arg_end && (arg_string = argv[arg_index]) &&
+ (*arg_string == '-' || *arg_string == '+'))
+ {
+ /* There are flag arguments, so parse them. */
+ next_arg = arg_index + 1;
+
+ /* A single `-' signals the end of options. From the 4.3 BSD sh.
+ An option `--' means the same thing; this is the standard
+ getopt(3) meaning. */
+ if (arg_string[0] == '-' &&
+ (arg_string[1] == '\0' ||
+ (arg_string[1] == '-' && arg_string[2] == '\0')))
+ return (next_arg);
+
+ i = 1;
+ on_or_off = arg_string[0];
+ while (arg_character = arg_string[i++])
+ {
+ switch (arg_character)
+ {
+ case 'c':
+ want_pending_command = 1;
+ break;
+
+ case 'l':
+ make_login_shell = 1;
+ break;
+
+ case 's':
+ read_from_stdin = 1;
+ break;
+
+ case 'o':
+ o_option = argv[next_arg];
+ if (o_option == 0)
+ {
+ list_minus_o_opts (-1, (on_or_off == '-') ? 0 : 1);
+ break;
+ }
+ if (set_minus_o_option (on_or_off, o_option) != EXECUTION_SUCCESS)
+ exit (EX_BADUSAGE);
+ next_arg++;
+ break;
+
+ case 'O':
+ /* Since some of these can be overridden by the normal
+ interactive/non-interactive shell initialization or
+ initializing posix mode, we save the options and process
+ them after initialization. */
+ o_option = argv[next_arg];
+ if (o_option == 0)
+ {
+ shopt_listopt (o_option, (on_or_off == '-') ? 0 : 1);
+ break;
+ }
+ add_shopt_to_alist (o_option, on_or_off);
+ next_arg++;
+ break;
+
+ case 'D':
+ dump_translatable_strings = 1;
+ break;
+
+ default:
+ if (change_flag (arg_character, on_or_off) == FLAG_ERROR)
+ {
+ report_error (_("%c%c: invalid option"), on_or_off, arg_character);
+ show_shell_usage (stderr, 0);
+ exit (EX_BADUSAGE);
+ }
+ }
+ }
+ /* Can't do just a simple increment anymore -- what about
+ "bash -abouo emacs ignoreeof -hP"? */
+ arg_index = next_arg;
+ }
+
+ return (arg_index);
+}
+
+/* Exit the shell with status S. */
+void
+exit_shell (s)
+ int s;
+{
+ fflush (stdout); /* XXX */
+ fflush (stderr);
+
+ /* Do trap[0] if defined. Allow it to override the exit status
+ passed to us. */
+ if (signal_is_trapped (0))
+ s = run_exit_trap ();
+
+#if defined (PROCESS_SUBSTITUTION)
+ unlink_fifo_list ();
+#endif /* PROCESS_SUBSTITUTION */
+
+#if defined (HISTORY)
+ if (interactive_shell)
+ maybe_save_shell_history ();
+#endif /* HISTORY */
+
+#if defined (COPROCESS_SUPPORT)
+ coproc_flush ();
+#endif
+
+#if defined (JOB_CONTROL)
+ /* If the user has run `shopt -s huponexit', hangup all jobs when we exit
+ an interactive login shell. ksh does this unconditionally. */
+ if (interactive_shell && login_shell && hup_on_exit)
+ hangup_all_jobs ();
+
+ /* If this shell is interactive, terminate all stopped jobs and
+ restore the original terminal process group. Don't do this if we're
+ in a subshell and calling exit_shell after, for example, a failed
+ word expansion. */
+ if (subshell_environment == 0)
+ end_job_control ();
+#endif /* JOB_CONTROL */
+
+ /* Always return the exit status of the last command to our parent. */
+ sh_exit (s);
+}
+
+/* A wrapper for exit that (optionally) can do other things, like malloc
+ statistics tracing. */
+void
+sh_exit (s)
+ int s;
+{
+#if defined (MALLOC_DEBUG) && defined (USING_BASH_MALLOC)
+ if (malloc_trace_at_exit)
+ trace_malloc_stats (get_name_for_error (), (char *)NULL);
+#endif
+
+ exit (s);
+}
+
+/* Source the bash startup files. If POSIXLY_CORRECT is non-zero, we obey
+ the Posix.2 startup file rules: $ENV is expanded, and if the file it
+ names exists, that file is sourced. The Posix.2 rules are in effect
+ for interactive shells only. (section 4.56.5.3) */
+
+/* Execute ~/.bashrc for most shells. Never execute it if
+ ACT_LIKE_SH is set, or if NO_RC is set.
+
+ If the executable file "/usr/gnu/src/bash/foo" contains:
+
+ #!/usr/gnu/bin/bash
+ echo hello
+
+ then:
+
+ COMMAND EXECUTE BASHRC
+ --------------------------------
+ bash -c foo NO
+ bash foo NO
+ foo NO
+ rsh machine ls YES (for rsh, which calls `bash -c')
+ rsh machine foo YES (for shell started by rsh) NO (for foo!)
+ echo ls | bash NO
+ login NO
+ bash YES
+*/
+
+static void
+execute_env_file (env_file)
+ char *env_file;
+{
+ char *fn;
+
+ if (env_file && *env_file)
+ {
+ fn = expand_string_unsplit_to_string (env_file, Q_DOUBLE_QUOTES);
+ if (fn && *fn)
+ maybe_execute_file (fn, 1);
+ FREE (fn);
+ }
+}
+
+static void
+run_startup_files ()
+{
+#if defined (JOB_CONTROL)
+ int old_job_control;
+#endif
+ int sourced_login, run_by_ssh;
+
+ /* get the rshd/sshd case out of the way first. */
+ if (interactive_shell == 0 && no_rc == 0 && login_shell == 0 &&
+ act_like_sh == 0 && command_execution_string)
+ {
+#ifdef SSH_SOURCE_BASHRC
+ run_by_ssh = (find_variable ("SSH_CLIENT") != (SHELL_VAR *)0) ||
+ (find_variable ("SSH2_CLIENT") != (SHELL_VAR *)0);
+#else
+ run_by_ssh = 0;
+#endif
+
+ /* If we were run by sshd or we think we were run by rshd, execute
+ ~/.bashrc if we are a top-level shell. */
+ if ((run_by_ssh || isnetconn (fileno (stdin))) && shell_level < 2)
+ {
+#ifdef SYS_BASHRC
+# if defined (__OPENNT)
+ maybe_execute_file (_prefixInstallPath(SYS_BASHRC, NULL, 0), 1);
+# else
+ maybe_execute_file (SYS_BASHRC, 1);
+# endif
+#endif
+ maybe_execute_file (bashrc_file, 1);
+ return;
+ }
+ }
+
+#if defined (JOB_CONTROL)
+ /* Startup files should be run without job control enabled. */
+ old_job_control = interactive_shell ? set_job_control (0) : 0;
+#endif
+
+ sourced_login = 0;
+
+ /* A shell begun with the --login (or -l) flag that is not in posix mode
+ runs the login shell startup files, no matter whether or not it is
+ interactive. If NON_INTERACTIVE_LOGIN_SHELLS is defined, run the
+ startup files if argv[0][0] == '-' as well. */
+#if defined (NON_INTERACTIVE_LOGIN_SHELLS)
+ if (login_shell && posixly_correct == 0)
+#else
+ if (login_shell < 0 && posixly_correct == 0)
+#endif
+ {
+ /* We don't execute .bashrc for login shells. */
+ no_rc++;
+
+ /* Execute /etc/profile and one of the personal login shell
+ initialization files. */
+ if (no_profile == 0)
+ {
+ maybe_execute_file (SYS_PROFILE, 1);
+
+ if (act_like_sh) /* sh */
+ maybe_execute_file ("~/.profile", 1);
+ else if ((maybe_execute_file ("~/.bash_profile", 1) == 0) &&
+ (maybe_execute_file ("~/.bash_login", 1) == 0)) /* bash */
+ maybe_execute_file ("~/.profile", 1);
+ }
+
+ sourced_login = 1;
+ }
+
+ /* A non-interactive shell not named `sh' and not in posix mode reads and
+ executes commands from $BASH_ENV. If `su' starts a shell with `-c cmd'
+ and `-su' as the name of the shell, we want to read the startup files.
+ No other non-interactive shells read any startup files. */
+ if (interactive_shell == 0 && !(su_shell && login_shell))
+ {
+ if (posixly_correct == 0 && act_like_sh == 0 && privileged_mode == 0 &&
+ sourced_env++ == 0)
+ execute_env_file (get_string_value ("BASH_ENV"));
+ return;
+ }
+
+ /* Interactive shell or `-su' shell. */
+ if (posixly_correct == 0) /* bash, sh */
+ {
+ if (login_shell && sourced_login++ == 0)
+ {
+ /* We don't execute .bashrc for login shells. */
+ no_rc++;
+
+ /* Execute /etc/profile and one of the personal login shell
+ initialization files. */
+ if (no_profile == 0)
+ {
+ maybe_execute_file (SYS_PROFILE, 1);
+
+ if (act_like_sh) /* sh */
+ maybe_execute_file ("~/.profile", 1);
+ else if ((maybe_execute_file ("~/.bash_profile", 1) == 0) &&
+ (maybe_execute_file ("~/.bash_login", 1) == 0)) /* bash */
+ maybe_execute_file ("~/.profile", 1);
+ }
+ }
+
+ /* bash */
+ if (act_like_sh == 0 && no_rc == 0)
+ {
+#ifdef SYS_BASHRC
+# if defined (__OPENNT)
+ maybe_execute_file (_prefixInstallPath(SYS_BASHRC, NULL, 0), 1);
+# else
+ maybe_execute_file (SYS_BASHRC, 1);
+# endif
+#endif
+ maybe_execute_file (bashrc_file, 1);
+ }
+ /* sh */
+ else if (act_like_sh && privileged_mode == 0 && sourced_env++ == 0)
+ execute_env_file (get_string_value ("ENV"));
+ }
+ else /* bash --posix, sh --posix */
+ {
+ /* bash and sh */
+ if (interactive_shell && privileged_mode == 0 && sourced_env++ == 0)
+ execute_env_file (get_string_value ("ENV"));
+ }
+
+#if defined (JOB_CONTROL)
+ set_job_control (old_job_control);
+#endif
+}
+
+#if defined (RESTRICTED_SHELL)
+/* Return 1 if the shell should be a restricted one based on NAME or the
+ value of `restricted'. Don't actually do anything, just return a
+ boolean value. */
+int
+shell_is_restricted (name)
+ char *name;
+{
+ char *temp;
+
+ if (restricted)
+ return 1;
+ temp = base_pathname (name);
+ if (*temp == '-')
+ temp++;
+ return (STREQ (temp, RESTRICTED_SHELL_NAME));
+}
+
+/* Perhaps make this shell a `restricted' one, based on NAME. If the
+ basename of NAME is "rbash", then this shell is restricted. The
+ name of the restricted shell is a configurable option, see config.h.
+ In a restricted shell, PATH, SHELL, ENV, and BASH_ENV are read-only
+ and non-unsettable.
+ Do this also if `restricted' is already set to 1; maybe the shell was
+ started with -r. */
+int
+maybe_make_restricted (name)
+ char *name;
+{
+ char *temp;
+
+ temp = base_pathname (name);
+ if (*temp == '-')
+ temp++;
+ if (restricted || (STREQ (temp, RESTRICTED_SHELL_NAME)))
+ {
+ set_var_read_only ("PATH");
+ set_var_read_only ("SHELL");
+ set_var_read_only ("ENV");
+ set_var_read_only ("BASH_ENV");
+ restricted = 1;
+ }
+ return (restricted);
+}
+#endif /* RESTRICTED_SHELL */
+
+/* Fetch the current set of uids and gids and return 1 if we're running
+ setuid or setgid. */
+static int
+uidget ()
+{
+ uid_t u;
+
+ u = getuid ();
+ if (current_user.uid != u)
+ {
+ FREE (current_user.user_name);
+ FREE (current_user.shell);
+ FREE (current_user.home_dir);
+ current_user.user_name = current_user.shell = current_user.home_dir = (char *)NULL;
+ }
+ current_user.uid = u;
+ current_user.gid = getgid ();
+ current_user.euid = geteuid ();
+ current_user.egid = getegid ();
+
+ /* See whether or not we are running setuid or setgid. */
+ return (current_user.uid != current_user.euid) ||
+ (current_user.gid != current_user.egid);
+}
+
+void
+disable_priv_mode ()
+{
+ setuid (current_user.uid);
+ setgid (current_user.gid);
+ current_user.euid = current_user.uid;
+ current_user.egid = current_user.gid;
+}
+
+#if defined (WORDEXP_OPTION)
+static int
+run_wordexp (words)
+ char *words;
+{
+ int code, nw, nb;
+ WORD_LIST *wl, *tl, *result;
+
+ code = setjmp (top_level);
+
+ if (code != NOT_JUMPED)
+ {
+ switch (code)
+ {
+ /* Some kind of throw to top_level has occured. */
+ case FORCE_EOF:
+ return last_command_exit_value = 127;
+ case ERREXIT:
+ case EXITPROG:
+ return last_command_exit_value;
+ case DISCARD:
+ return last_command_exit_value = 1;
+ default:
+ command_error ("run_wordexp", CMDERR_BADJUMP, code, 0);
+ }
+ }
+
+ /* Run it through the parser to get a list of words and expand them */
+ if (words && *words)
+ {
+ with_input_from_string (words, "--wordexp");
+ if (parse_command () != 0)
+ return (126);
+ if (global_command == 0)
+ {
+ printf ("0\n0\n");
+ return (0);
+ }
+ if (global_command->type != cm_simple)
+ return (126);
+ wl = global_command->value.Simple->words;
+ if (protected_mode)
+ for (tl = wl; tl; tl = tl->next)
+ tl->word->flags |= W_NOCOMSUB|W_NOPROCSUB;
+ result = wl ? expand_words_no_vars (wl) : (WORD_LIST *)0;
+ }
+ else
+ result = (WORD_LIST *)0;
+
+ last_command_exit_value = 0;
+
+ if (result == 0)
+ {
+ printf ("0\n0\n");
+ return (0);
+ }
+
+ /* Count up the number of words and bytes, and print them. Don't count
+ the trailing NUL byte. */
+ for (nw = nb = 0, wl = result; wl; wl = wl->next)
+ {
+ nw++;
+ nb += strlen (wl->word->word);
+ }
+ printf ("%u\n%u\n", nw, nb);
+ /* Print each word on a separate line. This will have to be changed when
+ the interface to glibc is completed. */
+ for (wl = result; wl; wl = wl->next)
+ printf ("%s\n", wl->word->word);
+
+ return (0);
+}
+#endif
+
+#if defined (ONESHOT)
+/* Run one command, given as the argument to the -c option. Tell
+ parse_and_execute not to fork for a simple command. */
+static int
+run_one_command (command)
+ char *command;
+{
+ int code;
+
+ code = setjmp (top_level);
+
+ if (code != NOT_JUMPED)
+ {
+#if defined (PROCESS_SUBSTITUTION)
+ unlink_fifo_list ();
+#endif /* PROCESS_SUBSTITUTION */
+ switch (code)
+ {
+ /* Some kind of throw to top_level has occured. */
+ case FORCE_EOF:
+ return last_command_exit_value = 127;
+ case ERREXIT:
+ case EXITPROG:
+ return last_command_exit_value;
+ case DISCARD:
+ return last_command_exit_value = 1;
+ default:
+ command_error ("run_one_command", CMDERR_BADJUMP, code, 0);
+ }
+ }
+ return (parse_and_execute (savestring (command), "-c", SEVAL_NOHIST));
+}
+#endif /* ONESHOT */
+
+static int
+bind_args (argv, arg_start, arg_end, start_index)
+ char **argv;
+ int arg_start, arg_end, start_index;
+{
+ register int i;
+ WORD_LIST *args;
+
+ for (i = arg_start, args = (WORD_LIST *)NULL; i < arg_end; i++)
+ args = make_word_list (make_word (argv[i]), args);
+ if (args)
+ {
+ args = REVERSE_LIST (args, WORD_LIST *);
+ if (start_index == 0) /* bind to $0...$n for sh -c command */
+ {
+ /* Posix.2 4.56.3 says that the first argument after sh -c command
+ becomes $0, and the rest of the arguments become $1...$n */
+ shell_name = savestring (args->word->word);
+ FREE (dollar_vars[0]);
+ dollar_vars[0] = savestring (args->word->word);
+ remember_args (args->next, 1);
+ push_args (args->next); /* BASH_ARGV and BASH_ARGC */
+ }
+ else /* bind to $1...$n for shell script */
+ {
+ remember_args (args, 1);
+ push_args (args); /* BASH_ARGV and BASH_ARGC */
+ }
+
+ dispose_words (args);
+ }
+
+ return (i);
+}
+
+void
+unbind_args ()
+{
+ remember_args ((WORD_LIST *)NULL, 1);
+ pop_args (); /* Reset BASH_ARGV and BASH_ARGC */
+}
+
+static void
+start_debugger ()
+{
+#if defined (DEBUGGER) && defined (DEBUGGER_START_FILE)
+ int old_errexit;
+
+ old_errexit = exit_immediately_on_error;
+ exit_immediately_on_error = 0;
+
+ maybe_execute_file (DEBUGGER_START_FILE, 1);
+ function_trace_mode = 1;
+
+ exit_immediately_on_error += old_errexit;
+#endif
+}
+
+static int
+open_shell_script (script_name)
+ char *script_name;
+{
+ int fd, e, fd_is_tty;
+ char *filename, *path_filename, *t;
+ char sample[80];
+ int sample_len;
+ struct stat sb;
+#if defined (ARRAY_VARS)
+ SHELL_VAR *funcname_v, *bash_source_v, *bash_lineno_v;
+ ARRAY *funcname_a, *bash_source_a, *bash_lineno_a;
+#endif
+
+ filename = savestring (script_name);
+
+ fd = open (filename, O_RDONLY);
+ if ((fd < 0) && (errno == ENOENT) && (absolute_program (filename) == 0))
+ {
+ e = errno;
+ /* If it's not in the current directory, try looking through PATH
+ for it. */
+ path_filename = find_path_file (script_name);
+ if (path_filename)
+ {
+ free (filename);
+ filename = path_filename;
+ fd = open (filename, O_RDONLY);
+ }
+ else
+ errno = e;
+ }
+
+ if (fd < 0)
+ {
+ e = errno;
+ file_error (filename);
+ exit ((e == ENOENT) ? EX_NOTFOUND : EX_NOINPUT);
+ }
+
+ free (dollar_vars[0]);
+ dollar_vars[0] = savestring (script_name);
+
+#if defined (ARRAY_VARS)
+ GET_ARRAY_FROM_VAR ("FUNCNAME", funcname_v, funcname_a);
+ GET_ARRAY_FROM_VAR ("BASH_SOURCE", bash_source_v, bash_source_a);
+ GET_ARRAY_FROM_VAR ("BASH_LINENO", bash_lineno_v, bash_lineno_a);
+
+ array_push (bash_source_a, filename);
+ if (bash_lineno_a)
+ {
+ t = itos (executing_line_number ());
+ array_push (bash_lineno_a, t);
+ free (t);
+ }
+ array_push (funcname_a, "main");
+#endif
+
+#ifdef HAVE_DEV_FD
+ fd_is_tty = isatty (fd);
+#else
+ fd_is_tty = 0;
+#endif
+
+ /* Only do this with non-tty file descriptors we can seek on. */
+ if (fd_is_tty == 0 && (lseek (fd, 0L, 1) != -1))
+ {
+ /* Check to see if the `file' in `bash file' is a binary file
+ according to the same tests done by execute_simple_command (),
+ and report an error and exit if it is. */
+ sample_len = read (fd, sample, sizeof (sample));
+ if (sample_len < 0)
+ {
+ e = errno;
+ if ((fstat (fd, &sb) == 0) && S_ISDIR (sb.st_mode))
+ internal_error (_("%s: is a directory"), filename);
+ else
+ {
+ errno = e;
+ file_error (filename);
+ }
+ exit (EX_NOEXEC);
+ }
+ else if (sample_len > 0 && (check_binary_file (sample, sample_len)))
+ {
+ internal_error (_("%s: cannot execute binary file"), filename);
+ exit (EX_BINARY_FILE);
+ }
+ /* Now rewind the file back to the beginning. */
+ lseek (fd, 0L, 0);
+ }
+
+ /* Open the script. But try to move the file descriptor to a randomly
+ large one, in the hopes that any descriptors used by the script will
+ not match with ours. */
+ fd = move_to_high_fd (fd, 1, -1);
+
+#if defined (__CYGWIN__) && defined (O_TEXT)
+ setmode (fd, O_TEXT);
+#endif
+
+#if defined (BUFFERED_INPUT)
+ default_buffered_input = fd;
+ SET_CLOSE_ON_EXEC (default_buffered_input);
+#else /* !BUFFERED_INPUT */
+ default_input = fdopen (fd, "r");
+
+ if (default_input == 0)
+ {
+ file_error (filename);
+ exit (EX_NOTFOUND);
+ }
+
+ SET_CLOSE_ON_EXEC (fd);
+ if (fileno (default_input) != fd)
+ SET_CLOSE_ON_EXEC (fileno (default_input));
+#endif /* !BUFFERED_INPUT */
+
+ /* Just about the only way for this code to be executed is if something
+ like `bash -i /dev/stdin' is executed. */
+ if (interactive_shell && fd_is_tty)
+ {
+ dup2 (fd, 0);
+ close (fd);
+ fd = 0;
+#if defined (BUFFERED_INPUT)
+ default_buffered_input = 0;
+#else
+ fclose (default_input);
+ default_input = stdin;
+#endif
+ }
+ else if (forced_interactive && fd_is_tty == 0)
+ /* But if a script is called with something like `bash -i scriptname',
+ we need to do a non-interactive setup here, since we didn't do it
+ before. */
+ init_interactive_script ();
+
+ free (filename);
+ return (fd);
+}
+
+/* Initialize the input routines for the parser. */
+static void
+set_bash_input ()
+{
+ /* Make sure the fd from which we are reading input is not in
+ no-delay mode. */
+#if defined (BUFFERED_INPUT)
+ if (interactive == 0)
+ sh_unset_nodelay_mode (default_buffered_input);
+ else
+#endif /* !BUFFERED_INPUT */
+ sh_unset_nodelay_mode (fileno (stdin));
+
+ /* with_input_from_stdin really means `with_input_from_readline' */
+ if (interactive && no_line_editing == 0)
+ with_input_from_stdin ();
+#if defined (BUFFERED_INPUT)
+ else if (interactive == 0)
+ with_input_from_buffered_stream (default_buffered_input, dollar_vars[0]);
+#endif /* BUFFERED_INPUT */
+ else
+ with_input_from_stream (default_input, dollar_vars[0]);
+}
+
+/* Close the current shell script input source and forget about it. This is
+ extern so execute_cmd.c:initialize_subshell() can call it. If CHECK_ZERO
+ is non-zero, we close default_buffered_input even if it's the standard
+ input (fd 0). */
+void
+unset_bash_input (check_zero)
+ int check_zero;
+{
+#if defined (BUFFERED_INPUT)
+ if ((check_zero && default_buffered_input >= 0) ||
+ (check_zero == 0 && default_buffered_input > 0))
+ {
+ close_buffered_fd (default_buffered_input);
+ default_buffered_input = bash_input.location.buffered_fd = -1;
+ bash_input.type = st_none; /* XXX */
+ }
+#else /* !BUFFERED_INPUT */
+ if (default_input)
+ {
+ fclose (default_input);
+ default_input = (FILE *)NULL;
+ }
+#endif /* !BUFFERED_INPUT */
+}
+
+
+#if !defined (PROGRAM)
+# define PROGRAM "bash"
+#endif
+
+static void
+set_shell_name (argv0)
+ char *argv0;
+{
+ /* Here's a hack. If the name of this shell is "sh", then don't do
+ any startup files; just try to be more like /bin/sh. */
+ shell_name = argv0 ? base_pathname (argv0) : PROGRAM;
+
+ if (argv0 && *argv0 == '-')
+ {
+ if (*shell_name == '-')
+ shell_name++;
+ login_shell++;
+ }
+
+ if (shell_name[0] == 's' && shell_name[1] == 'h' && shell_name[2] == '\0')
+ act_like_sh++;
+ if (shell_name[0] == 's' && shell_name[1] == 'u' && shell_name[2] == '\0')
+ su_shell++;
+
+ shell_name = argv0 ? argv0 : PROGRAM;
+ FREE (dollar_vars[0]);
+ dollar_vars[0] = savestring (shell_name);
+
+ /* A program may start an interactive shell with
+ "execl ("/bin/bash", "-", NULL)".
+ If so, default the name of this shell to our name. */
+ if (!shell_name || !*shell_name || (shell_name[0] == '-' && !shell_name[1]))
+ shell_name = PROGRAM;
+}
+
+static void
+init_interactive ()
+{
+ expand_aliases = interactive_shell = startup_state = 1;
+ interactive = 1;
+}
+
+static void
+init_noninteractive ()
+{
+#if defined (HISTORY)
+ bash_history_reinit (0);
+#endif /* HISTORY */
+ interactive_shell = startup_state = interactive = 0;
+ expand_aliases = posixly_correct; /* XXX - was 0 not posixly_correct */
+ no_line_editing = 1;
+#if defined (JOB_CONTROL)
+ set_job_control (0);
+#endif /* JOB_CONTROL */
+}
+
+static void
+init_interactive_script ()
+{
+ init_noninteractive ();
+ expand_aliases = interactive_shell = startup_state = 1;
+}
+
+void
+get_current_user_info ()
+{
+ struct passwd *entry;
+
+ /* Don't fetch this more than once. */
+ if (current_user.user_name == 0)
+ {
+ entry = getpwuid (current_user.uid);
+ if (entry)
+ {
+ current_user.user_name = savestring (entry->pw_name);
+ current_user.shell = (entry->pw_shell && entry->pw_shell[0])
+ ? savestring (entry->pw_shell)
+ : savestring ("/bin/sh");
+ current_user.home_dir = savestring (entry->pw_dir);
+ }
+ else
+ {
+ current_user.user_name = _("I have no name!");
+ current_user.user_name = savestring (current_user.user_name);
+ current_user.shell = savestring ("/bin/sh");
+ current_user.home_dir = savestring ("/");
+ }
+ endpwent ();
+ }
+}
+
+/* Do whatever is necessary to initialize the shell.
+ Put new initializations in here. */
+static void
+shell_initialize ()
+{
+ char hostname[256];
+
+ /* Line buffer output for stderr and stdout. */
+ if (shell_initialized == 0)
+ {
+ sh_setlinebuf (stderr);
+ sh_setlinebuf (stdout);
+ }
+
+ /* Sort the array of shell builtins so that the binary search in
+ find_shell_builtin () works correctly. */
+ initialize_shell_builtins ();
+
+ /* Initialize the trap signal handlers before installing our own
+ signal handlers. traps.c:restore_original_signals () is responsible
+ for restoring the original default signal handlers. That function
+ is called when we make a new child. */
+ initialize_traps ();
+ initialize_signals (0);
+
+ /* It's highly unlikely that this will change. */
+ if (current_host_name == 0)
+ {
+ /* Initialize current_host_name. */
+ if (gethostname (hostname, 255) < 0)
+ current_host_name = "??host??";
+ else
+ current_host_name = savestring (hostname);
+ }
+
+ /* Initialize the stuff in current_user that comes from the password
+ file. We don't need to do this right away if the shell is not
+ interactive. */
+ if (interactive_shell)
+ get_current_user_info ();
+
+ /* Initialize our interface to the tilde expander. */
+ tilde_initialize ();
+
+ /* Initialize internal and environment variables. Don't import shell
+ functions from the environment if we are running in privileged or
+ restricted mode or if the shell is running setuid. */
+#if defined (RESTRICTED_SHELL)
+ initialize_shell_variables (shell_environment, privileged_mode||restricted||running_setuid);
+#else
+ initialize_shell_variables (shell_environment, privileged_mode||running_setuid);
+#endif
+
+ /* Initialize the data structures for storing and running jobs. */
+ initialize_job_control (0);
+
+ /* Initialize input streams to null. */
+ initialize_bash_input ();
+
+ initialize_flags ();
+
+ /* Initialize the shell options. Don't import the shell options
+ from the environment variable $SHELLOPTS if we are running in
+ privileged or restricted mode or if the shell is running setuid. */
+#if defined (RESTRICTED_SHELL)
+ initialize_shell_options (privileged_mode||restricted||running_setuid);
+ initialize_bashopts (privileged_mode||restricted||running_setuid);
+#else
+ initialize_shell_options (privileged_mode||running_setuid);
+ initialize_bashopts (privileged_mode||running_setuid);
+#endif
+}
+
+/* Function called by main () when it appears that the shell has already
+ had some initialization performed. This is supposed to reset the world
+ back to a pristine state, as if we had been exec'ed. */
+static void
+shell_reinitialize ()
+{
+ /* The default shell prompts. */
+ primary_prompt = PPROMPT;
+ secondary_prompt = SPROMPT;
+
+ /* Things that get 1. */
+ current_command_number = 1;
+
+ /* We have decided that the ~/.bashrc file should not be executed
+ for the invocation of each shell script. If the variable $ENV
+ (or $BASH_ENV) is set, its value is used as the name of a file
+ to source. */
+ no_rc = no_profile = 1;
+
+ /* Things that get 0. */
+ login_shell = make_login_shell = interactive = executing = 0;
+ debugging = do_version = line_number = last_command_exit_value = 0;
+ forced_interactive = interactive_shell = subshell_environment = 0;
+ expand_aliases = 0;
+
+#if defined (HISTORY)
+ bash_history_reinit (0);
+#endif /* HISTORY */
+
+#if defined (RESTRICTED_SHELL)
+ restricted = 0;
+#endif /* RESTRICTED_SHELL */
+
+ /* Ensure that the default startup file is used. (Except that we don't
+ execute this file for reinitialized shells). */
+ bashrc_file = "~/.bashrc";
+
+ /* Delete all variables and functions. They will be reinitialized when
+ the environment is parsed. */
+ delete_all_contexts (shell_variables);
+ delete_all_variables (shell_functions);
+
+ reinit_special_variables ();
+
+#if defined (READLINE)
+ bashline_reinitialize ();
+#endif
+
+ shell_reinitialized = 1;
+}
+
+static void
+show_shell_usage (fp, extra)
+ FILE *fp;
+ int extra;
+{
+ int i;
+ char *set_opts, *s, *t;
+
+ if (extra)
+ fprintf (fp, _("GNU bash, version %s-(%s)\n"), shell_version_string (), MACHTYPE);
+ fprintf (fp, _("Usage:\t%s [GNU long option] [option] ...\n\t%s [GNU long option] [option] script-file ...\n"),
+ shell_name, shell_name);
+ fputs (_("GNU long options:\n"), fp);
+ for (i = 0; long_args[i].name; i++)
+ fprintf (fp, "\t--%s\n", long_args[i].name);
+
+ fputs (_("Shell options:\n"), fp);
+ fputs (_("\t-irsD or -c command or -O shopt_option\t\t(invocation only)\n"), fp);
+
+ for (i = 0, set_opts = 0; shell_builtins[i].name; i++)
+ if (STREQ (shell_builtins[i].name, "set"))
+ set_opts = savestring (shell_builtins[i].short_doc);
+ if (set_opts)
+ {
+ s = strchr (set_opts, '[');
+ if (s == 0)
+ s = set_opts;
+ while (*++s == '-')
+ ;
+ t = strchr (s, ']');
+ if (t)
+ *t = '\0';
+ fprintf (fp, _("\t-%s or -o option\n"), s);
+ free (set_opts);
+ }
+
+ if (extra)
+ {
+ fprintf (fp, _("Type `%s -c \"help set\"' for more information about shell options.\n"), shell_name);
+ fprintf (fp, _("Type `%s -c help' for more information about shell builtin commands.\n"), shell_name);
+ fprintf (fp, _("Use the `bashbug' command to report bugs.\n"));
+ }
+}
+
+static void
+add_shopt_to_alist (opt, on_or_off)
+ char *opt;
+ int on_or_off;
+{
+ if (shopt_ind >= shopt_len)
+ {
+ shopt_len += 8;
+ shopt_alist = (STRING_INT_ALIST *)xrealloc (shopt_alist, shopt_len * sizeof (shopt_alist[0]));
+ }
+ shopt_alist[shopt_ind].word = opt;
+ shopt_alist[shopt_ind].token = on_or_off;
+ shopt_ind++;
+}
+
+static void
+run_shopt_alist ()
+{
+ register int i;
+
+ for (i = 0; i < shopt_ind; i++)
+ if (shopt_setopt (shopt_alist[i].word, (shopt_alist[i].token == '-')) != EXECUTION_SUCCESS)
+ exit (EX_BADUSAGE);
+ free (shopt_alist);
+ shopt_alist = 0;
+ shopt_ind = shopt_len = 0;
+}
diff --git a/shell.h b/shell.h
new file mode 100644
index 0000000..5eb0caa
--- /dev/null
+++ b/shell.h
@@ -0,0 +1,167 @@
+/* shell.h -- The data structures used by the shell */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "bashjmp.h"
+
+#include "command.h"
+#include "syntax.h"
+#include "general.h"
+#include "error.h"
+#include "variables.h"
+#include "arrayfunc.h"
+#include "quit.h"
+#include "maxpath.h"
+#include "unwind_prot.h"
+#include "dispose_cmd.h"
+#include "make_cmd.h"
+#include "ocache.h"
+#include "subst.h"
+#include "sig.h"
+#include "pathnames.h"
+#include "externs.h"
+
+extern int EOF_Reached;
+
+#define NO_PIPE -1
+#define REDIRECT_BOTH -2
+
+#define NO_VARIABLE -1
+
+/* Values that can be returned by execute_command (). */
+#define EXECUTION_FAILURE 1
+#define EXECUTION_SUCCESS 0
+
+/* Usage messages by builtins result in a return status of 2. */
+#define EX_BADUSAGE 2
+
+/* Special exit statuses used by the shell, internally and externally. */
+#define EX_RETRYFAIL 124
+#define EX_WEXPCOMSUB 125
+#define EX_BINARY_FILE 126
+#define EX_NOEXEC 126
+#define EX_NOINPUT 126
+#define EX_NOTFOUND 127
+
+#define EX_SHERRBASE 256 /* all special error values are > this. */
+
+#define EX_BADSYNTAX 257 /* shell syntax error */
+#define EX_USAGE 258 /* syntax error in usage */
+#define EX_REDIRFAIL 259 /* redirection failed */
+#define EX_BADASSIGN 260 /* variable assignment error */
+#define EX_EXPFAIL 261 /* word expansion failed */
+
+/* Flag values that control parameter pattern substitution. */
+#define MATCH_ANY 0x000
+#define MATCH_BEG 0x001
+#define MATCH_END 0x002
+
+#define MATCH_TYPEMASK 0x003
+
+#define MATCH_GLOBREP 0x010
+#define MATCH_QUOTED 0x020
+#define MATCH_STARSUB 0x040
+
+/* Some needed external declarations. */
+extern char **shell_environment;
+extern WORD_LIST *rest_of_args;
+
+/* Generalized global variables. */
+extern int debugging_mode;
+extern int executing, login_shell;
+extern int interactive, interactive_shell;
+extern int startup_state;
+extern int subshell_environment;
+extern int shell_compatibility_level;
+
+/* Structure to pass around that holds a bitmap of file descriptors
+ to close, and the size of that structure. Used in execute_cmd.c. */
+struct fd_bitmap {
+ int size;
+ char *bitmap;
+};
+
+#define FD_BITMAP_SIZE 32
+
+#define CTLESC '\001'
+#define CTLNUL '\177'
+
+/* Information about the current user. */
+struct user_info {
+ uid_t uid, euid;
+ gid_t gid, egid;
+ char *user_name;
+ char *shell; /* shell from the password file */
+ char *home_dir;
+};
+
+extern struct user_info current_user;
+
+/* Force gcc to not clobber X on a longjmp(). Old versions of gcc mangle
+ this badly. */
+#if (__GNUC__ > 2) || (__GNUC__ == 2 && __GNUC_MINOR__ > 8)
+# define USE_VAR(x) ((void) &(x))
+#else
+# define USE_VAR(x)
+#endif
+
+/* Structure in which to save partial parsing state when doing things like
+ PROMPT_COMMAND and bash_execute_unix_command execution. */
+
+typedef struct _sh_parser_state_t {
+
+ /* parsing state */
+ int parser_state;
+ int *token_state;
+
+ /* input line state -- line number saved elsewhere */
+ int input_line_terminator;
+ int eof_encountered;
+
+#if defined (HANDLE_MULTIBYTE)
+ /* Nothing right now for multibyte state, but might want something later. */
+#endif
+
+ /* history state affecting or modified by the parser */
+ int current_command_line_count;
+#if defined (HISTORY)
+ int remember_on_history;
+ int history_expansion_inhibited;
+#endif
+
+ /* execution state possibly modified by the parser */
+ int last_command_exit_value;
+#if defined (ARRAY_VARS)
+ ARRAY *pipestatus;
+#endif
+ sh_builtin_func_t *last_shell_builtin, *this_shell_builtin;
+
+ /* flags state affecting the parser */
+ int expand_aliases;
+ int echo_input_at_read;
+
+} sh_parser_state_t;
+
+/* Let's try declaring these here. */
+extern sh_parser_state_t *save_parser_state __P((sh_parser_state_t *));
+extern void restore_parser_state __P((sh_parser_state_t *));
diff --git a/sig.c b/sig.c
new file mode 100644
index 0000000..a217b89
--- /dev/null
+++ b/sig.c
@@ -0,0 +1,664 @@
+/* sig.c - interface for shell signal handlers and signal initialization. */
+
+/* Copyright (C) 1994-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+
+#if defined (HAVE_UNISTD_H)
+# ifdef _MINIX
+# include <sys/types.h>
+# endif
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include <signal.h>
+
+#include "bashintl.h"
+
+#include "shell.h"
+#if defined (JOB_CONTROL)
+#include "jobs.h"
+#endif /* JOB_CONTROL */
+#include "siglist.h"
+#include "sig.h"
+#include "trap.h"
+
+#include "builtins/common.h"
+
+#if defined (READLINE)
+# include "bashline.h"
+#endif
+
+#if defined (HISTORY)
+# include "bashhist.h"
+#endif
+
+extern int last_command_exit_value;
+extern int last_command_exit_signal;
+extern int return_catch_flag;
+extern int loop_level, continuing, breaking;
+extern int executing_list;
+extern int comsub_ignore_return;
+extern int parse_and_execute_level, shell_initialized;
+
+/* Non-zero after SIGINT. */
+volatile int interrupt_state = 0;
+
+/* Non-zero after SIGWINCH */
+volatile int sigwinch_received = 0;
+
+/* Set to the value of any terminating signal received. */
+volatile int terminating_signal = 0;
+
+/* The environment at the top-level R-E loop. We use this in
+ the case of error return. */
+procenv_t top_level;
+
+#if defined (JOB_CONTROL) || defined (HAVE_POSIX_SIGNALS)
+/* The signal masks that this shell runs with. */
+sigset_t top_level_mask;
+#endif /* JOB_CONTROL */
+
+/* When non-zero, we throw_to_top_level (). */
+int interrupt_immediately = 0;
+
+/* When non-zero, we call the terminating signal handler immediately. */
+int terminate_immediately = 0;
+
+#if defined (SIGWINCH)
+static SigHandler *old_winch = (SigHandler *)SIG_DFL;
+#endif
+
+static void initialize_shell_signals __P((void));
+
+void
+initialize_signals (reinit)
+ int reinit;
+{
+ initialize_shell_signals ();
+ initialize_job_signals ();
+#if !defined (HAVE_SYS_SIGLIST) && !defined (HAVE_UNDER_SYS_SIGLIST) && !defined (HAVE_STRSIGNAL)
+ if (reinit == 0)
+ initialize_siglist ();
+#endif /* !HAVE_SYS_SIGLIST && !HAVE_UNDER_SYS_SIGLIST && !HAVE_STRSIGNAL */
+}
+
+/* A structure describing a signal that terminates the shell if not
+ caught. The orig_handler member is present so children can reset
+ these signals back to their original handlers. */
+struct termsig {
+ int signum;
+ SigHandler *orig_handler;
+ int orig_flags;
+};
+
+#define NULL_HANDLER (SigHandler *)SIG_DFL
+
+/* The list of signals that would terminate the shell if not caught.
+ We catch them, but just so that we can write the history file,
+ and so forth. */
+static struct termsig terminating_signals[] = {
+#ifdef SIGHUP
+{ SIGHUP, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGINT
+{ SIGINT, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGILL
+{ SIGILL, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGTRAP
+{ SIGTRAP, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGIOT
+{ SIGIOT, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGDANGER
+{ SIGDANGER, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGEMT
+{ SIGEMT, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGFPE
+{ SIGFPE, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGBUS
+{ SIGBUS, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGSEGV
+{ SIGSEGV, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGSYS
+{ SIGSYS, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGPIPE
+{ SIGPIPE, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGALRM
+{ SIGALRM, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGTERM
+{ SIGTERM, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGXCPU
+{ SIGXCPU, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGXFSZ
+{ SIGXFSZ, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGVTALRM
+{ SIGVTALRM, NULL_HANDLER, 0 },
+#endif
+
+#if 0
+#ifdef SIGPROF
+{ SIGPROF, NULL_HANDLER, 0 },
+#endif
+#endif
+
+#ifdef SIGLOST
+{ SIGLOST, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGUSR1
+{ SIGUSR1, NULL_HANDLER, 0 },
+#endif
+
+#ifdef SIGUSR2
+{ SIGUSR2, NULL_HANDLER, 0 },
+#endif
+};
+
+#define TERMSIGS_LENGTH (sizeof (terminating_signals) / sizeof (struct termsig))
+
+#define XSIG(x) (terminating_signals[x].signum)
+#define XHANDLER(x) (terminating_signals[x].orig_handler)
+#define XSAFLAGS(x) (terminating_signals[x].orig_flags)
+
+static int termsigs_initialized = 0;
+
+/* Initialize signals that will terminate the shell to do some
+ unwind protection. For non-interactive shells, we only call
+ this when a trap is defined for EXIT (0). */
+void
+initialize_terminating_signals ()
+{
+ register int i;
+#if defined (HAVE_POSIX_SIGNALS)
+ struct sigaction act, oact;
+#endif
+
+ if (termsigs_initialized)
+ return;
+
+ /* The following code is to avoid an expensive call to
+ set_signal_handler () for each terminating_signals. Fortunately,
+ this is possible in Posix. Unfortunately, we have to call signal ()
+ on non-Posix systems for each signal in terminating_signals. */
+#if defined (HAVE_POSIX_SIGNALS)
+ act.sa_handler = termsig_sighandler;
+ act.sa_flags = 0;
+ sigemptyset (&act.sa_mask);
+ sigemptyset (&oact.sa_mask);
+ for (i = 0; i < TERMSIGS_LENGTH; i++)
+ sigaddset (&act.sa_mask, XSIG (i));
+ for (i = 0; i < TERMSIGS_LENGTH; i++)
+ {
+ /* If we've already trapped it, don't do anything. */
+ if (signal_is_trapped (XSIG (i)))
+ continue;
+
+ sigaction (XSIG (i), &act, &oact);
+ XHANDLER(i) = oact.sa_handler;
+ XSAFLAGS(i) = oact.sa_flags;
+ /* Don't do anything with signals that are ignored at shell entry
+ if the shell is not interactive. */
+ if (!interactive_shell && XHANDLER (i) == SIG_IGN)
+ {
+ sigaction (XSIG (i), &oact, &act);
+ set_signal_ignored (XSIG (i));
+ }
+#if defined (SIGPROF) && !defined (_MINIX)
+ if (XSIG (i) == SIGPROF && XHANDLER (i) != SIG_DFL && XHANDLER (i) != SIG_IGN)
+ sigaction (XSIG (i), &oact, (struct sigaction *)NULL);
+#endif /* SIGPROF && !_MINIX */
+ }
+
+#else /* !HAVE_POSIX_SIGNALS */
+
+ for (i = 0; i < TERMSIGS_LENGTH; i++)
+ {
+ /* If we've already trapped it, don't do anything. */
+ if (signal_is_trapped (XSIG (i)))
+ continue;
+
+ XHANDLER(i) = signal (XSIG (i), termsig_sighandler);
+ XSAFLAGS(i) = 0;
+ /* Don't do anything with signals that are ignored at shell entry
+ if the shell is not interactive. */
+ if (!interactive_shell && XHANDLER (i) == SIG_IGN)
+ {
+ signal (XSIG (i), SIG_IGN);
+ set_signal_ignored (XSIG (i));
+ }
+#ifdef SIGPROF
+ if (XSIG (i) == SIGPROF && XHANDLER (i) != SIG_DFL && XHANDLER (i) != SIG_IGN)
+ signal (XSIG (i), XHANDLER (i));
+#endif
+ }
+
+#endif /* !HAVE_POSIX_SIGNALS */
+
+ termsigs_initialized = 1;
+}
+
+static void
+initialize_shell_signals ()
+{
+ if (interactive)
+ initialize_terminating_signals ();
+
+#if defined (JOB_CONTROL) || defined (HAVE_POSIX_SIGNALS)
+ /* All shells use the signal mask they inherit, and pass it along
+ to child processes. Children will never block SIGCHLD, though. */
+ sigemptyset (&top_level_mask);
+ sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &top_level_mask);
+# if defined (SIGCHLD)
+ sigdelset (&top_level_mask, SIGCHLD);
+# endif
+#endif /* JOB_CONTROL || HAVE_POSIX_SIGNALS */
+
+ /* And, some signals that are specifically ignored by the shell. */
+ set_signal_handler (SIGQUIT, SIG_IGN);
+
+ if (interactive)
+ {
+ set_signal_handler (SIGINT, sigint_sighandler);
+ set_signal_handler (SIGTERM, SIG_IGN);
+ set_sigwinch_handler ();
+ }
+}
+
+void
+reset_terminating_signals ()
+{
+ register int i;
+#if defined (HAVE_POSIX_SIGNALS)
+ struct sigaction act;
+#endif
+
+ if (termsigs_initialized == 0)
+ return;
+
+#if defined (HAVE_POSIX_SIGNALS)
+ act.sa_flags = 0;
+ sigemptyset (&act.sa_mask);
+ for (i = 0; i < TERMSIGS_LENGTH; i++)
+ {
+ /* Skip a signal if it's trapped or handled specially, because the
+ trap code will restore the correct value. */
+ if (signal_is_trapped (XSIG (i)) || signal_is_special (XSIG (i)))
+ continue;
+
+ act.sa_handler = XHANDLER (i);
+ act.sa_flags = XSAFLAGS (i);
+ sigaction (XSIG (i), &act, (struct sigaction *) NULL);
+ }
+#else /* !HAVE_POSIX_SIGNALS */
+ for (i = 0; i < TERMSIGS_LENGTH; i++)
+ {
+ if (signal_is_trapped (XSIG (i)) || signal_is_special (XSIG (i)))
+ continue;
+
+ signal (XSIG (i), XHANDLER (i));
+ }
+#endif /* !HAVE_POSIX_SIGNALS */
+}
+#undef XSIG
+#undef XHANDLER
+
+/* Run some of the cleanups that should be performed when we run
+ jump_to_top_level from a builtin command context. XXX - might want to
+ also call reset_parser here. */
+void
+top_level_cleanup ()
+{
+ /* Clean up string parser environment. */
+ while (parse_and_execute_level)
+ parse_and_execute_cleanup ();
+
+#if defined (PROCESS_SUBSTITUTION)
+ unlink_fifo_list ();
+#endif /* PROCESS_SUBSTITUTION */
+
+ run_unwind_protects ();
+ loop_level = continuing = breaking = 0;
+ executing_list = comsub_ignore_return = return_catch_flag = 0;
+}
+
+/* What to do when we've been interrupted, and it is safe to handle it. */
+void
+throw_to_top_level ()
+{
+ int print_newline = 0;
+
+ if (interrupt_state)
+ {
+ print_newline = 1;
+ DELINTERRUPT;
+ }
+
+ if (interrupt_state)
+ return;
+
+ last_command_exit_signal = (last_command_exit_value > 128) ?
+ (last_command_exit_value - 128) : 0;
+ last_command_exit_value |= 128;
+
+ /* Run any traps set on SIGINT. */
+ run_interrupt_trap ();
+
+ /* Clean up string parser environment. */
+ while (parse_and_execute_level)
+ parse_and_execute_cleanup ();
+
+#if defined (JOB_CONTROL)
+ give_terminal_to (shell_pgrp, 0);
+#endif /* JOB_CONTROL */
+
+#if defined (JOB_CONTROL) || defined (HAVE_POSIX_SIGNALS)
+ /* This should not be necessary on systems using sigsetjmp/siglongjmp. */
+ sigprocmask (SIG_SETMASK, &top_level_mask, (sigset_t *)NULL);
+#endif
+
+ reset_parser ();
+
+#if defined (READLINE)
+ if (interactive)
+ bashline_reset ();
+#endif /* READLINE */
+
+#if defined (PROCESS_SUBSTITUTION)
+ unlink_fifo_list ();
+#endif /* PROCESS_SUBSTITUTION */
+
+ run_unwind_protects ();
+ loop_level = continuing = breaking = 0;
+ executing_list = comsub_ignore_return = return_catch_flag = 0;
+
+ if (interactive && print_newline)
+ {
+ fflush (stdout);
+ fprintf (stderr, "\n");
+ fflush (stderr);
+ }
+
+ /* An interrupted `wait' command in a script does not exit the script. */
+ if (interactive || (interactive_shell && !shell_initialized) ||
+ (print_newline && signal_is_trapped (SIGINT)))
+ jump_to_top_level (DISCARD);
+ else
+ jump_to_top_level (EXITPROG);
+}
+
+/* This is just here to isolate the longjmp calls. */
+void
+jump_to_top_level (value)
+ int value;
+{
+ longjmp (top_level, value);
+}
+
+sighandler
+termsig_sighandler (sig)
+ int sig;
+{
+ /* If we get called twice with the same signal before handling it,
+ terminate right away. */
+ if (
+#ifdef SIGHUP
+ sig != SIGHUP &&
+#endif
+#ifdef SIGINT
+ sig != SIGINT &&
+#endif
+#ifdef SIGDANGER
+ sig != SIGDANGER &&
+#endif
+#ifdef SIGPIPE
+ sig != SIGPIPE &&
+#endif
+#ifdef SIGALRM
+ sig != SIGALRM &&
+#endif
+#ifdef SIGTERM
+ sig != SIGTERM &&
+#endif
+#ifdef SIGXCPU
+ sig != SIGXCPU &&
+#endif
+#ifdef SIGXFSZ
+ sig != SIGXFSZ &&
+#endif
+#ifdef SIGVTALRM
+ sig != SIGVTALRM &&
+#endif
+#ifdef SIGLOST
+ sig != SIGLOST &&
+#endif
+#ifdef SIGUSR1
+ sig != SIGUSR1 &&
+#endif
+#ifdef SIGUSR2
+ sig != SIGUSR2 &&
+#endif
+ sig == terminating_signal)
+ terminate_immediately = 1;
+
+ terminating_signal = sig;
+
+ /* XXX - should this also trigger when interrupt_immediately is set? */
+ if (terminate_immediately)
+ {
+ terminate_immediately = 0;
+ termsig_handler (sig);
+ }
+
+ SIGRETURN (0);
+}
+
+void
+termsig_handler (sig)
+ int sig;
+{
+ static int handling_termsig = 0;
+
+ /* Simple semaphore to keep this function from being executed multiple
+ times. Since we no longer are running as a signal handler, we don't
+ block multiple occurrences of the terminating signals while running. */
+ if (handling_termsig)
+ return;
+ handling_termsig = 1;
+ terminating_signal = 0; /* keep macro from re-testing true. */
+
+ /* I don't believe this condition ever tests true. */
+ if (sig == SIGINT && signal_is_trapped (SIGINT))
+ run_interrupt_trap ();
+
+#if defined (HISTORY)
+ if (interactive_shell && sig != SIGABRT)
+ maybe_save_shell_history ();
+#endif /* HISTORY */
+
+#if defined (JOB_CONTROL)
+ if (sig == SIGHUP && (interactive || (subshell_environment & (SUBSHELL_COMSUB|SUBSHELL_PROCSUB))))
+ hangup_all_jobs ();
+ end_job_control ();
+#endif /* JOB_CONTROL */
+
+#if defined (PROCESS_SUBSTITUTION)
+ unlink_fifo_list ();
+#endif /* PROCESS_SUBSTITUTION */
+
+ /* Reset execution context */
+ loop_level = continuing = breaking = 0;
+ executing_list = comsub_ignore_return = return_catch_flag = 0;
+
+ run_exit_trap ();
+ set_signal_handler (sig, SIG_DFL);
+ kill (getpid (), sig);
+}
+
+/* What we really do when SIGINT occurs. */
+sighandler
+sigint_sighandler (sig)
+ int sig;
+{
+#if defined (MUST_REINSTALL_SIGHANDLERS)
+ signal (sig, sigint_sighandler);
+#endif
+
+ /* interrupt_state needs to be set for the stack of interrupts to work
+ right. Should it be set unconditionally? */
+ if (interrupt_state == 0)
+ ADDINTERRUPT;
+
+ if (interrupt_immediately)
+ {
+ interrupt_immediately = 0;
+ last_command_exit_value = 128 + sig;
+ throw_to_top_level ();
+ }
+
+ SIGRETURN (0);
+}
+
+#if defined (SIGWINCH)
+sighandler
+sigwinch_sighandler (sig)
+ int sig;
+{
+#if defined (MUST_REINSTALL_SIGHANDLERS)
+ set_signal_handler (SIGWINCH, sigwinch_sighandler);
+#endif /* MUST_REINSTALL_SIGHANDLERS */
+ sigwinch_received = 1;
+ SIGRETURN (0);
+}
+#endif /* SIGWINCH */
+
+void
+set_sigwinch_handler ()
+{
+#if defined (SIGWINCH)
+ old_winch = set_signal_handler (SIGWINCH, sigwinch_sighandler);
+#endif
+}
+
+void
+unset_sigwinch_handler ()
+{
+#if defined (SIGWINCH)
+ set_signal_handler (SIGWINCH, old_winch);
+#endif
+}
+
+/* Signal functions used by the rest of the code. */
+#if !defined (HAVE_POSIX_SIGNALS)
+
+#if defined (JOB_CONTROL)
+/* Perform OPERATION on NEWSET, perhaps leaving information in OLDSET. */
+sigprocmask (operation, newset, oldset)
+ int operation, *newset, *oldset;
+{
+ int old, new;
+
+ if (newset)
+ new = *newset;
+ else
+ new = 0;
+
+ switch (operation)
+ {
+ case SIG_BLOCK:
+ old = sigblock (new);
+ break;
+
+ case SIG_SETMASK:
+ sigsetmask (new);
+ break;
+
+ default:
+ internal_error (_("sigprocmask: %d: invalid operation"), operation);
+ }
+
+ if (oldset)
+ *oldset = old;
+}
+#endif /* JOB_CONTROL */
+
+#else
+
+#if !defined (SA_INTERRUPT)
+# define SA_INTERRUPT 0
+#endif
+
+#if !defined (SA_RESTART)
+# define SA_RESTART 0
+#endif
+
+SigHandler *
+set_signal_handler (sig, handler)
+ int sig;
+ SigHandler *handler;
+{
+ struct sigaction act, oact;
+
+ act.sa_handler = handler;
+ act.sa_flags = 0;
+#if 0
+ if (sig == SIGALRM)
+ act.sa_flags |= SA_INTERRUPT; /* XXX */
+ else
+ act.sa_flags |= SA_RESTART; /* XXX */
+#endif
+ sigemptyset (&act.sa_mask);
+ sigemptyset (&oact.sa_mask);
+ sigaction (sig, &act, &oact);
+ return (oact.sa_handler);
+}
+#endif /* HAVE_POSIX_SIGNALS */
diff --git a/sig.h b/sig.h
new file mode 100644
index 0000000..d67f6cc
--- /dev/null
+++ b/sig.h
@@ -0,0 +1,137 @@
+/* sig.h -- header file for signal handler definitions. */
+
+/* Copyright (C) 1994-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Make sure that this is included *after* config.h! */
+
+#if !defined (_SIG_H_)
+# define _SIG_H_
+
+#include "stdc.h"
+
+#if !defined (SIGABRT) && defined (SIGIOT)
+# define SIGABRT SIGIOT
+#endif
+
+#define sighandler RETSIGTYPE
+typedef RETSIGTYPE SigHandler __P((int));
+
+#if defined (VOID_SIGHANDLER)
+# define SIGRETURN(n) return
+#else
+# define SIGRETURN(n) return(n)
+#endif /* !VOID_SIGHANDLER */
+
+/* Here is a definition for set_signal_handler () which simply expands to
+ a call to signal () for non-Posix systems. The code for set_signal_handler
+ in the Posix case resides in general.c. */
+#if !defined (HAVE_POSIX_SIGNALS)
+# define set_signal_handler(sig, handler) (SigHandler *)signal (sig, handler)
+#else
+extern SigHandler *set_signal_handler __P((int, SigHandler *)); /* in sig.c */
+#endif /* _POSIX_VERSION */
+
+/* Definitions used by the job control code. */
+#if defined (JOB_CONTROL)
+
+#if !defined (SIGCHLD) && defined (SIGCLD)
+# define SIGCHLD SIGCLD
+#endif
+
+#if !defined (HAVE_POSIX_SIGNALS) && !defined (sigmask)
+# define sigmask(x) (1 << ((x)-1))
+#endif /* !HAVE_POSIX_SIGNALS && !sigmask */
+
+#if !defined (HAVE_POSIX_SIGNALS)
+# if !defined (SIG_BLOCK)
+# define SIG_BLOCK 2
+# define SIG_SETMASK 3
+# endif /* SIG_BLOCK */
+
+/* sigset_t defined in config.h */
+
+/* Make sure there is nothing inside the signal set. */
+# define sigemptyset(set) (*(set) = 0)
+
+/* Initialize the signal set to hold all signals. */
+# define sigfillset(set) (*set) = sigmask (NSIG) - 1
+
+/* Add SIG to the contents of SET. */
+# define sigaddset(set, sig) *(set) |= sigmask (sig)
+
+/* Delete SIG from signal set SET. */
+# define sigdelset(set, sig) *(set) &= ~sigmask (sig)
+
+/* Is SIG a member of the signal set SET? */
+# define sigismember(set, sig) ((*(set) & sigmask (sig)) != 0)
+
+/* Suspend the process until the reception of one of the signals
+ not present in SET. */
+# define sigsuspend(set) sigpause (*(set))
+#endif /* !HAVE_POSIX_SIGNALS */
+
+/* These definitions are used both in POSIX and non-POSIX implementations. */
+
+#define BLOCK_SIGNAL(sig, nvar, ovar) \
+do { \
+ sigemptyset (&nvar); \
+ sigaddset (&nvar, sig); \
+ sigemptyset (&ovar); \
+ sigprocmask (SIG_BLOCK, &nvar, &ovar); \
+} while (0)
+
+#if defined (HAVE_POSIX_SIGNALS)
+# define BLOCK_CHILD(nvar, ovar) \
+ BLOCK_SIGNAL (SIGCHLD, nvar, ovar)
+# define UNBLOCK_CHILD(ovar) \
+ sigprocmask (SIG_SETMASK, &ovar, (sigset_t *) NULL)
+#else /* !HAVE_POSIX_SIGNALS */
+# define BLOCK_CHILD(nvar, ovar) ovar = sigblock (sigmask (SIGCHLD))
+# define UNBLOCK_CHILD(ovar) sigsetmask (ovar)
+#endif /* !HAVE_POSIX_SIGNALS */
+
+#endif /* JOB_CONTROL */
+
+/* Extern variables */
+extern volatile int sigwinch_received;
+
+extern int interrupt_immediately;
+extern int terminate_immediately;
+
+/* Functions from sig.c. */
+extern sighandler termsig_sighandler __P((int));
+extern void termsig_handler __P((int));
+extern sighandler sigint_sighandler __P((int));
+extern void initialize_signals __P((int));
+extern void initialize_terminating_signals __P((void));
+extern void reset_terminating_signals __P((void));
+extern void top_level_cleanup __P((void));
+extern void throw_to_top_level __P((void));
+extern void jump_to_top_level __P((int)) __attribute__((__noreturn__));
+
+extern sighandler sigwinch_sighandler __P((int));
+extern void set_sigwinch_handler __P((void));
+extern void unset_sigwinch_handler __P((void));
+
+/* Functions defined in trap.c. */
+extern SigHandler *set_sigint_handler __P((void));
+extern SigHandler *trap_to_sighandler __P((int));
+extern sighandler trap_handler __P((int));
+
+#endif /* _SIG_H_ */
diff --git a/siglist.c b/siglist.c
new file mode 100644
index 0000000..0e51b83
--- /dev/null
+++ b/siglist.c
@@ -0,0 +1,229 @@
+/* siglist.c -- signal list for those machines that don't have one. */
+
+/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#if !defined (HAVE_SYS_SIGLIST) && !defined (HAVE_UNDER_SYS_SIGLIST) && !defined (HAVE_STRSIGNAL)
+
+#include <stdio.h>
+#include "bashtypes.h"
+#include <signal.h>
+
+#include "siglist.h"
+
+#if !defined (NSIG)
+# include "trap.h"
+#endif
+
+#include "bashintl.h"
+#include "xmalloc.h"
+
+char *sys_siglist[NSIG];
+
+void
+initialize_siglist ()
+{
+ register int i;
+
+ for (i = 0; i < NSIG; i++)
+ sys_siglist[i] = (char *)0x0;
+
+ sys_siglist[0] = _("Bogus signal");
+
+#if defined (SIGHUP)
+ sys_siglist[SIGHUP] = _("Hangup");
+#endif
+
+#if defined (SIGINT)
+ sys_siglist[SIGINT] = _("Interrupt");
+#endif
+
+#if defined (SIGQUIT)
+ sys_siglist[SIGQUIT] = _("Quit");
+#endif
+
+#if defined (SIGILL)
+ sys_siglist[SIGILL] = _("Illegal instruction");
+#endif
+
+#if defined (SIGTRAP)
+ sys_siglist[SIGTRAP] = _("BPT trace/trap");
+#endif
+
+#if defined (SIGIOT) && !defined (SIGABRT)
+#define SIGABRT SIGIOT
+#endif
+
+#if defined (SIGABRT)
+ sys_siglist[SIGABRT] = _("ABORT instruction");
+#endif
+
+#if defined (SIGEMT)
+ sys_siglist[SIGEMT] = _("EMT instruction");
+#endif
+
+#if defined (SIGFPE)
+ sys_siglist[SIGFPE] = _("Floating point exception");
+#endif
+
+#if defined (SIGKILL)
+ sys_siglist[SIGKILL] = _("Killed");
+#endif
+
+#if defined (SIGBUS)
+ sys_siglist[SIGBUS] = _("Bus error");
+#endif
+
+#if defined (SIGSEGV)
+ sys_siglist[SIGSEGV] = _("Segmentation fault");
+#endif
+
+#if defined (SIGSYS)
+ sys_siglist[SIGSYS] = _("Bad system call");
+#endif
+
+#if defined (SIGPIPE)
+ sys_siglist[SIGPIPE] = _("Broken pipe");
+#endif
+
+#if defined (SIGALRM)
+ sys_siglist[SIGALRM] = _("Alarm clock");
+#endif
+
+#if defined (SIGTERM)
+ sys_siglist[SIGTERM] = _("Terminated");
+#endif
+
+#if defined (SIGURG)
+ sys_siglist[SIGURG] = _("Urgent IO condition");
+#endif
+
+#if defined (SIGSTOP)
+ sys_siglist[SIGSTOP] = _("Stopped (signal)");
+#endif
+
+#if defined (SIGTSTP)
+ sys_siglist[SIGTSTP] = _("Stopped");
+#endif
+
+#if defined (SIGCONT)
+ sys_siglist[SIGCONT] = _("Continue");
+#endif
+
+#if !defined (SIGCHLD) && defined (SIGCLD)
+#define SIGCHLD SIGCLD
+#endif
+
+#if defined (SIGCHLD)
+ sys_siglist[SIGCHLD] = _("Child death or stop");
+#endif
+
+#if defined (SIGTTIN)
+ sys_siglist[SIGTTIN] = _("Stopped (tty input)");
+#endif
+
+#if defined (SIGTTOU)
+ sys_siglist[SIGTTOU] = _("Stopped (tty output)");
+#endif
+
+#if defined (SIGIO)
+ sys_siglist[SIGIO] = _("I/O ready");
+#endif
+
+#if defined (SIGXCPU)
+ sys_siglist[SIGXCPU] = _("CPU limit");
+#endif
+
+#if defined (SIGXFSZ)
+ sys_siglist[SIGXFSZ] = _("File limit");
+#endif
+
+#if defined (SIGVTALRM)
+ sys_siglist[SIGVTALRM] = _("Alarm (virtual)");
+#endif
+
+#if defined (SIGPROF)
+ sys_siglist[SIGPROF] = _("Alarm (profile)");
+#endif
+
+#if defined (SIGWINCH)
+ sys_siglist[SIGWINCH] = _("Window changed");
+#endif
+
+#if defined (SIGLOST)
+ sys_siglist[SIGLOST] = _("Record lock");
+#endif
+
+#if defined (SIGUSR1)
+ sys_siglist[SIGUSR1] = _("User signal 1");
+#endif
+
+#if defined (SIGUSR2)
+ sys_siglist[SIGUSR2] = _("User signal 2");
+#endif
+
+#if defined (SIGMSG)
+ sys_siglist[SIGMSG] = _("HFT input data pending");
+#endif
+
+#if defined (SIGPWR)
+ sys_siglist[SIGPWR] = _("power failure imminent");
+#endif
+
+#if defined (SIGDANGER)
+ sys_siglist[SIGDANGER] = _("system crash imminent");
+#endif
+
+#if defined (SIGMIGRATE)
+ sys_siglist[SIGMIGRATE] = _("migrate process to another CPU");
+#endif
+
+#if defined (SIGPRE)
+ sys_siglist[SIGPRE] = _("programming error");
+#endif
+
+#if defined (SIGGRANT)
+ sys_siglist[SIGGRANT] = _("HFT monitor mode granted");
+#endif
+
+#if defined (SIGRETRACT)
+ sys_siglist[SIGRETRACT] = _("HFT monitor mode retracted");
+#endif
+
+#if defined (SIGSOUND)
+ sys_siglist[SIGSOUND] = _("HFT sound sequence has completed");
+#endif
+
+#if defined (SIGINFO)
+ sys_siglist[SIGINFO] = _("Information request");
+#endif
+
+ for (i = 0; i < NSIG; i++)
+ {
+ if (!sys_siglist[i])
+ {
+ sys_siglist[i] =
+ (char *)xmalloc (10 + strlen (_("Unknown Signal #")));
+
+ sprintf (sys_siglist[i], _("Unknown Signal #%d"), i);
+ }
+ }
+}
+#endif /* !HAVE_SYS_SIGLIST && !HAVE_UNDER_SYS_SIGLIST && !HAVE_STRSIGNAL */
diff --git a/siglist.h b/siglist.h
new file mode 100644
index 0000000..4cb6530
--- /dev/null
+++ b/siglist.h
@@ -0,0 +1,44 @@
+/* siglist.h -- encapsulate various definitions for sys_siglist */
+
+/* Copyright (C) 1993, 2001, 2005, 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_SIGLIST_H_)
+#define _SIGLIST_H_
+
+#if !defined (SYS_SIGLIST_DECLARED) && !defined (HAVE_STRSIGNAL)
+
+#if defined (HAVE_UNDER_SYS_SIGLIST) && !defined (HAVE_SYS_SIGLIST) && !defined (sys_siglist)
+# define sys_siglist _sys_siglist
+#endif /* HAVE_UNDER_SYS_SIGLIST && !HAVE_SYS_SIGLIST && !sys_siglist */
+
+#if !defined (sys_siglist)
+extern char *sys_siglist[];
+#endif /* !sys_siglist */
+
+#endif /* !SYS_SIGLIST_DECLARED && !HAVE_STRSIGNAL */
+
+#if !defined (strsignal) && !defined (HAVE_STRSIGNAL)
+# define strsignal(sig) (char *)sys_siglist[sig]
+#endif /* !strsignal && !HAVE_STRSIGNAL */
+
+#if !defined (strsignal) && !HAVE_DECL_STRSIGNAL
+extern char *strsignal __P((int));
+#endif
+
+#endif /* _SIGLIST_H */
diff --git a/stringlib.c b/stringlib.c
new file mode 100644
index 0000000..0a612ca
--- /dev/null
+++ b/stringlib.c
@@ -0,0 +1,287 @@
+/* stringlib.c - Miscellaneous string functions. */
+
+/* Copyright (C) 1996-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+#include <stdio.h>
+#include "chartypes.h"
+
+#include "shell.h"
+#include "pathexp.h"
+
+#include <glob/glob.h>
+
+#if defined (EXTENDED_GLOB)
+# include <glob/strmatch.h>
+#endif
+
+/* **************************************************************** */
+/* */
+/* Functions to manage arrays of strings */
+/* */
+/* **************************************************************** */
+
+/* Find STRING in ALIST, a list of string key/int value pairs. If FLAGS
+ is 1, STRING is treated as a pattern and matched using strmatch. */
+int
+find_string_in_alist (string, alist, flags)
+ char *string;
+ STRING_INT_ALIST *alist;
+ int flags;
+{
+ register int i;
+ int r;
+
+ for (i = r = 0; alist[i].word; i++)
+ {
+#if defined (EXTENDED_GLOB)
+ if (flags)
+ r = strmatch (alist[i].word, string, FNM_EXTMATCH) != FNM_NOMATCH;
+ else
+#endif
+ r = STREQ (string, alist[i].word);
+
+ if (r)
+ return (alist[i].token);
+ }
+ return -1;
+}
+
+/* Find TOKEN in ALIST, a list of string/int value pairs. Return the
+ corresponding string. Allocates memory for the returned
+ string. FLAGS is currently ignored, but reserved. */
+char *
+find_token_in_alist (token, alist, flags)
+ int token;
+ STRING_INT_ALIST *alist;
+ int flags;
+{
+ register int i;
+
+ for (i = 0; alist[i].word; i++)
+ {
+ if (alist[i].token == token)
+ return (savestring (alist[i].word));
+ }
+ return ((char *)NULL);
+}
+
+int
+find_index_in_alist (string, alist, flags)
+ char *string;
+ STRING_INT_ALIST *alist;
+ int flags;
+{
+ register int i;
+ int r;
+
+ for (i = r = 0; alist[i].word; i++)
+ {
+#if defined (EXTENDED_GLOB)
+ if (flags)
+ r = strmatch (alist[i].word, string, FNM_EXTMATCH) != FNM_NOMATCH;
+ else
+#endif
+ r = STREQ (string, alist[i].word);
+
+ if (r)
+ return (i);
+ }
+
+ return -1;
+}
+
+/* **************************************************************** */
+/* */
+/* String Management Functions */
+/* */
+/* **************************************************************** */
+
+/* Cons a new string from STRING starting at START and ending at END,
+ not including END. */
+char *
+substring (string, start, end)
+ const char *string;
+ int start, end;
+{
+ register int len;
+ register char *result;
+
+ len = end - start;
+ result = (char *)xmalloc (len + 1);
+ strncpy (result, string + start, len);
+ result[len] = '\0';
+ return (result);
+}
+
+/* Replace occurrences of PAT with REP in STRING. If GLOBAL is non-zero,
+ replace all occurrences, otherwise replace only the first.
+ This returns a new string; the caller should free it. */
+char *
+strsub (string, pat, rep, global)
+ char *string, *pat, *rep;
+ int global;
+{
+ int patlen, replen, templen, tempsize, repl, i;
+ char *temp, *r;
+
+ patlen = strlen (pat);
+ replen = strlen (rep);
+ for (temp = (char *)NULL, i = templen = tempsize = 0, repl = 1; string[i]; )
+ {
+ if (repl && STREQN (string + i, pat, patlen))
+ {
+ if (replen)
+ RESIZE_MALLOCED_BUFFER (temp, templen, replen, tempsize, (replen * 2));
+
+ for (r = rep; *r; )
+ temp[templen++] = *r++;
+
+ i += patlen ? patlen : 1; /* avoid infinite recursion */
+ repl = global != 0;
+ }
+ else
+ {
+ RESIZE_MALLOCED_BUFFER (temp, templen, 1, tempsize, 16);
+ temp[templen++] = string[i++];
+ }
+ }
+ if (temp)
+ temp[templen] = 0;
+ else
+ temp = savestring (string);
+ return (temp);
+}
+
+/* Replace all instances of C in STRING with TEXT. TEXT may be empty or
+ NULL. If DO_GLOB is non-zero, we quote the replacement text for
+ globbing. Backslash may be used to quote C. */
+char *
+strcreplace (string, c, text, do_glob)
+ char *string;
+ int c;
+ char *text;
+ int do_glob;
+{
+ char *ret, *p, *r, *t;
+ int len, rlen, ind, tlen;
+
+ len = STRLEN (text);
+ rlen = len + strlen (string) + 2;
+ ret = (char *)xmalloc (rlen);
+
+ for (p = string, r = ret; p && *p; )
+ {
+ if (*p == c)
+ {
+ if (len)
+ {
+ ind = r - ret;
+ if (do_glob && (glob_pattern_p (text) || strchr (text, '\\')))
+ {
+ t = quote_globbing_chars (text);
+ tlen = strlen (t);
+ RESIZE_MALLOCED_BUFFER (ret, ind, tlen, rlen, rlen);
+ r = ret + ind; /* in case reallocated */
+ strcpy (r, t);
+ r += tlen;
+ free (t);
+ }
+ else
+ {
+ RESIZE_MALLOCED_BUFFER (ret, ind, len, rlen, rlen);
+ r = ret + ind; /* in case reallocated */
+ strcpy (r, text);
+ r += len;
+ }
+ }
+ p++;
+ continue;
+ }
+
+ if (*p == '\\' && p[1] == c)
+ p++;
+
+ ind = r - ret;
+ RESIZE_MALLOCED_BUFFER (ret, ind, 2, rlen, rlen);
+ r = ret + ind; /* in case reallocated */
+ *r++ = *p++;
+ }
+ *r = '\0';
+
+ return ret;
+}
+
+#ifdef INCLUDE_UNUSED
+/* Remove all leading whitespace from STRING. This includes
+ newlines. STRING should be terminated with a zero. */
+void
+strip_leading (string)
+ char *string;
+{
+ char *start = string;
+
+ while (*string && (whitespace (*string) || *string == '\n'))
+ string++;
+
+ if (string != start)
+ {
+ int len = strlen (string);
+ FASTCOPY (string, start, len);
+ start[len] = '\0';
+ }
+}
+#endif
+
+/* Remove all trailing whitespace from STRING. This includes
+ newlines. If NEWLINES_ONLY is non-zero, only trailing newlines
+ are removed. STRING should be terminated with a zero. */
+void
+strip_trailing (string, len, newlines_only)
+ char *string;
+ int len;
+ int newlines_only;
+{
+ while (len >= 0)
+ {
+ if ((newlines_only && string[len] == '\n') ||
+ (!newlines_only && whitespace (string[len])))
+ len--;
+ else
+ break;
+ }
+ string[len + 1] = '\0';
+}
+
+/* A wrapper for bcopy that can be prototyped in general.h */
+void
+xbcopy (s, d, n)
+ char *s, *d;
+ int n;
+{
+ FASTCOPY (s, d, n);
+}
diff --git a/subst.c b/subst.c
new file mode 100644
index 0000000..81a3256
--- /dev/null
+++ b/subst.c
@@ -0,0 +1,9070 @@
+/* subst.c -- The part of the shell that does parameter, command, arithmetic,
+ and globbing substitutions. */
+
+/* ``Have a little faith, there's magic in the night. You ain't a
+ beauty, but, hey, you're alright.'' */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+#include <stdio.h>
+#include "chartypes.h"
+#if defined (HAVE_PWD_H)
+# include <pwd.h>
+#endif
+#include <signal.h>
+#include <errno.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+#include "posixstat.h"
+#include "bashintl.h"
+
+#include "shell.h"
+#include "flags.h"
+#include "jobs.h"
+#include "execute_cmd.h"
+#include "filecntl.h"
+#include "trap.h"
+#include "pathexp.h"
+#include "mailcheck.h"
+
+#include "shmbutil.h"
+
+#include "builtins/getopt.h"
+#include "builtins/common.h"
+
+#include "builtins/builtext.h"
+
+#include <tilde/tilde.h>
+#include <glob/strmatch.h>
+
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+/* The size that strings change by. */
+#define DEFAULT_INITIAL_ARRAY_SIZE 112
+#define DEFAULT_ARRAY_SIZE 128
+
+/* Variable types. */
+#define VT_VARIABLE 0
+#define VT_POSPARMS 1
+#define VT_ARRAYVAR 2
+#define VT_ARRAYMEMBER 3
+#define VT_ASSOCVAR 4
+
+#define VT_STARSUB 128 /* $* or ${array[*]} -- used to split */
+
+/* Flags for quoted_strchr */
+#define ST_BACKSL 0x01
+#define ST_CTLESC 0x02
+#define ST_SQUOTE 0x04 /* unused yet */
+#define ST_DQUOTE 0x08 /* unused yet */
+
+/* Flags for the `pflags' argument to param_expand() */
+#define PF_NOCOMSUB 0x01 /* Do not perform command substitution */
+#define PF_IGNUNBOUND 0x02 /* ignore unbound vars even if -u set */
+#define PF_NOSPLIT2 0x04 /* same as W_NOSPLIT2 */
+
+/* These defs make it easier to use the editor. */
+#define LBRACE '{'
+#define RBRACE '}'
+#define LPAREN '('
+#define RPAREN ')'
+
+#if defined (HANDLE_MULTIBYTE)
+#define WLPAREN L'('
+#define WRPAREN L')'
+#endif
+
+/* Evaluates to 1 if C is one of the shell's special parameters whose length
+ can be taken, but is also one of the special expansion characters. */
+#define VALID_SPECIAL_LENGTH_PARAM(c) \
+ ((c) == '-' || (c) == '?' || (c) == '#')
+
+/* Evaluates to 1 if C is one of the shell's special parameters for which an
+ indirect variable reference may be made. */
+#define VALID_INDIR_PARAM(c) \
+ ((c) == '#' || (c) == '?' || (c) == '@' || (c) == '*')
+
+/* Evaluates to 1 if C is one of the OP characters that follows the parameter
+ in ${parameter[:]OPword}. */
+#define VALID_PARAM_EXPAND_CHAR(c) (sh_syntaxtab[(unsigned char)c] & CSUBSTOP)
+
+/* Evaluates to 1 if this is one of the shell's special variables. */
+#define SPECIAL_VAR(name, wi) \
+ ((DIGIT (*name) && all_digits (name)) || \
+ (name[1] == '\0' && (sh_syntaxtab[(unsigned char)*name] & CSPECVAR)) || \
+ (wi && name[2] == '\0' && VALID_INDIR_PARAM (name[1])))
+
+/* An expansion function that takes a string and a quoted flag and returns
+ a WORD_LIST *. Used as the type of the third argument to
+ expand_string_if_necessary(). */
+typedef WORD_LIST *EXPFUNC __P((char *, int));
+
+/* Process ID of the last command executed within command substitution. */
+pid_t last_command_subst_pid = NO_PID;
+pid_t current_command_subst_pid = NO_PID;
+
+/* Variables used to keep track of the characters in IFS. */
+SHELL_VAR *ifs_var;
+char *ifs_value;
+unsigned char ifs_cmap[UCHAR_MAX + 1];
+
+#if defined (HANDLE_MULTIBYTE)
+unsigned char ifs_firstc[MB_LEN_MAX];
+size_t ifs_firstc_len;
+#else
+unsigned char ifs_firstc;
+#endif
+
+/* Sentinel to tell when we are performing variable assignments preceding a
+ command name and putting them into the environment. Used to make sure
+ we use the temporary environment when looking up variable values. */
+int assigning_in_environment;
+
+/* Used to hold a list of variable assignments preceding a command. Global
+ so the SIGCHLD handler in jobs.c can unwind-protect it when it runs a
+ SIGCHLD trap and so it can be saved and restored by the trap handlers. */
+WORD_LIST *subst_assign_varlist = (WORD_LIST *)NULL;
+
+/* Extern functions and variables from different files. */
+extern int last_command_exit_value, last_command_exit_signal;
+extern int subshell_environment, line_number;
+extern int subshell_level, parse_and_execute_level, sourcelevel;
+extern int eof_encountered;
+extern int return_catch_flag, return_catch_value;
+extern pid_t dollar_dollar_pid;
+extern int posixly_correct;
+extern char *this_command_name;
+extern struct fd_bitmap *current_fds_to_close;
+extern int wordexp_only;
+extern int expanding_redir;
+extern int tempenv_assign_error;
+
+#if !defined (HAVE_WCSDUP) && defined (HANDLE_MULTIBYTE)
+extern wchar_t *wcsdup __P((const wchar_t *));
+#endif
+
+/* Non-zero means to allow unmatched globbed filenames to expand to
+ a null file. */
+int allow_null_glob_expansion;
+
+/* Non-zero means to throw an error when globbing fails to match anything. */
+int fail_glob_expansion;
+
+#if 0
+/* Variables to keep track of which words in an expanded word list (the
+ output of expand_word_list_internal) are the result of globbing
+ expansions. GLOB_ARGV_FLAGS is used by execute_cmd.c.
+ (CURRENTLY UNUSED). */
+char *glob_argv_flags;
+static int glob_argv_flags_size;
+#endif
+
+static WORD_LIST expand_word_error, expand_word_fatal;
+static WORD_DESC expand_wdesc_error, expand_wdesc_fatal;
+static char expand_param_error, expand_param_fatal;
+static char extract_string_error, extract_string_fatal;
+
+/* Tell the expansion functions to not longjmp back to top_level on fatal
+ errors. Enabled when doing completion and prompt string expansion. */
+static int no_longjmp_on_fatal_error = 0;
+
+/* Set by expand_word_unsplit; used to inhibit splitting and re-joining
+ $* on $IFS, primarily when doing assignment statements. */
+static int expand_no_split_dollar_star = 0;
+
+/* A WORD_LIST of words to be expanded by expand_word_list_internal,
+ without any leading variable assignments. */
+static WORD_LIST *garglist = (WORD_LIST *)NULL;
+
+static char *quoted_substring __P((char *, int, int));
+static int quoted_strlen __P((char *));
+static char *quoted_strchr __P((char *, int, int));
+
+static char *expand_string_if_necessary __P((char *, int, EXPFUNC *));
+static inline char *expand_string_to_string_internal __P((char *, int, EXPFUNC *));
+static WORD_LIST *call_expand_word_internal __P((WORD_DESC *, int, int, int *, int *));
+static WORD_LIST *expand_string_internal __P((char *, int));
+static WORD_LIST *expand_string_leave_quoted __P((char *, int));
+static WORD_LIST *expand_string_for_rhs __P((char *, int, int *, int *));
+
+static WORD_LIST *list_quote_escapes __P((WORD_LIST *));
+static char *make_quoted_char __P((int));
+static WORD_LIST *quote_list __P((WORD_LIST *));
+
+static int unquoted_substring __P((char *, char *));
+static int unquoted_member __P((int, char *));
+
+#if defined (ARRAY_VARS)
+static SHELL_VAR *do_compound_assignment __P((char *, char *, int));
+#endif
+static int do_assignment_internal __P((const WORD_DESC *, int));
+
+static char *string_extract_verbatim __P((char *, size_t, int *, char *, int));
+static char *string_extract __P((char *, int *, char *, int));
+static char *string_extract_double_quoted __P((char *, int *, int));
+static inline char *string_extract_single_quoted __P((char *, int *));
+static inline int skip_single_quoted __P((const char *, size_t, int));
+static int skip_double_quoted __P((char *, size_t, int));
+static char *extract_delimited_string __P((char *, int *, char *, char *, char *, int));
+static char *extract_dollar_brace_string __P((char *, int *, int, int));
+static int skip_matched_pair __P((const char *, int, int, int, int));
+
+static char *pos_params __P((char *, int, int, int));
+
+static unsigned char *mb_getcharlens __P((char *, int));
+
+static char *remove_upattern __P((char *, char *, int));
+#if defined (HANDLE_MULTIBYTE)
+static wchar_t *remove_wpattern __P((wchar_t *, size_t, wchar_t *, int));
+#endif
+static char *remove_pattern __P((char *, char *, int));
+
+static int match_pattern_char __P((char *, char *));
+static int match_upattern __P((char *, char *, int, char **, char **));
+#if defined (HANDLE_MULTIBYTE)
+static int match_pattern_wchar __P((wchar_t *, wchar_t *));
+static int match_wpattern __P((wchar_t *, char **, size_t, wchar_t *, int, char **, char **));
+#endif
+static int match_pattern __P((char *, char *, int, char **, char **));
+static int getpatspec __P((int, char *));
+static char *getpattern __P((char *, int, int));
+static char *variable_remove_pattern __P((char *, char *, int, int));
+static char *list_remove_pattern __P((WORD_LIST *, char *, int, int, int));
+static char *parameter_list_remove_pattern __P((int, char *, int, int));
+#ifdef ARRAY_VARS
+static char *array_remove_pattern __P((SHELL_VAR *, char *, int, char *, int));
+#endif
+static char *parameter_brace_remove_pattern __P((char *, char *, char *, int, int));
+
+static char *process_substitute __P((char *, int));
+
+static char *read_comsub __P((int, int, int *));
+
+#ifdef ARRAY_VARS
+static arrayind_t array_length_reference __P((char *));
+#endif
+
+static int valid_brace_expansion_word __P((char *, int));
+static int chk_atstar __P((char *, int, int *, int *));
+static int chk_arithsub __P((const char *, int));
+
+static WORD_DESC *parameter_brace_expand_word __P((char *, int, int, int));
+static WORD_DESC *parameter_brace_expand_indir __P((char *, int, int, int *, int *));
+static WORD_DESC *parameter_brace_expand_rhs __P((char *, char *, int, int, int *, int *));
+static void parameter_brace_expand_error __P((char *, char *));
+
+static int valid_length_expression __P((char *));
+static intmax_t parameter_brace_expand_length __P((char *));
+
+static char *skiparith __P((char *, int));
+static int verify_substring_values __P((SHELL_VAR *, char *, char *, int, intmax_t *, intmax_t *));
+static int get_var_and_type __P((char *, char *, int, SHELL_VAR **, char **));
+static char *mb_substring __P((char *, int, int));
+static char *parameter_brace_substring __P((char *, char *, char *, int));
+
+static char *pos_params_pat_subst __P((char *, char *, char *, int));
+
+static char *parameter_brace_patsub __P((char *, char *, char *, int));
+
+static char *pos_params_casemod __P((char *, char *, int, int));
+static char *parameter_brace_casemod __P((char *, char *, int, char *, int));
+
+static WORD_DESC *parameter_brace_expand __P((char *, int *, int, int, int *, int *));
+static WORD_DESC *param_expand __P((char *, int *, int, int *, int *, int *, int *, int));
+
+static WORD_LIST *expand_word_internal __P((WORD_DESC *, int, int, int *, int *));
+
+static WORD_LIST *word_list_split __P((WORD_LIST *));
+
+static void exp_jump_to_top_level __P((int));
+
+static WORD_LIST *separate_out_assignments __P((WORD_LIST *));
+static WORD_LIST *glob_expand_word_list __P((WORD_LIST *, int));
+#ifdef BRACE_EXPANSION
+static WORD_LIST *brace_expand_word_list __P((WORD_LIST *, int));
+#endif
+#if defined (ARRAY_VARS)
+static int make_internal_declare __P((char *, char *));
+#endif
+static WORD_LIST *shell_expand_word_list __P((WORD_LIST *, int));
+static WORD_LIST *expand_word_list_internal __P((WORD_LIST *, int));
+
+/* **************************************************************** */
+/* */
+/* Utility Functions */
+/* */
+/* **************************************************************** */
+
+#if defined (DEBUG)
+void
+dump_word_flags (flags)
+ int flags;
+{
+ int f;
+
+ f = flags;
+ fprintf (stderr, "%d -> ", f);
+ if (f & W_ASSIGNASSOC)
+ {
+ f &= ~W_ASSIGNASSOC;
+ fprintf (stderr, "W_ASSIGNASSOC%s", f ? "|" : "");
+ }
+ if (f & W_HASCTLESC)
+ {
+ f &= ~W_HASCTLESC;
+ fprintf (stderr, "W_HASCTLESC%s", f ? "|" : "");
+ }
+ if (f & W_NOPROCSUB)
+ {
+ f &= ~W_NOPROCSUB;
+ fprintf (stderr, "W_NOPROCSUB%s", f ? "|" : "");
+ }
+ if (f & W_DQUOTE)
+ {
+ f &= ~W_DQUOTE;
+ fprintf (stderr, "W_DQUOTE%s", f ? "|" : "");
+ }
+ if (f & W_HASQUOTEDNULL)
+ {
+ f &= ~W_HASQUOTEDNULL;
+ fprintf (stderr, "W_HASQUOTEDNULL%s", f ? "|" : "");
+ }
+ if (f & W_ASSIGNARG)
+ {
+ f &= ~W_ASSIGNARG;
+ fprintf (stderr, "W_ASSIGNARG%s", f ? "|" : "");
+ }
+ if (f & W_ASSNBLTIN)
+ {
+ f &= ~W_ASSNBLTIN;
+ fprintf (stderr, "W_ASSNBLTIN%s", f ? "|" : "");
+ }
+ if (f & W_COMPASSIGN)
+ {
+ f &= ~W_COMPASSIGN;
+ fprintf (stderr, "W_COMPASSIGN%s", f ? "|" : "");
+ }
+ if (f & W_NOEXPAND)
+ {
+ f &= ~W_NOEXPAND;
+ fprintf (stderr, "W_NOEXPAND%s", f ? "|" : "");
+ }
+ if (f & W_ITILDE)
+ {
+ f &= ~W_ITILDE;
+ fprintf (stderr, "W_ITILDE%s", f ? "|" : "");
+ }
+ if (f & W_NOTILDE)
+ {
+ f &= ~W_NOTILDE;
+ fprintf (stderr, "W_NOTILDE%s", f ? "|" : "");
+ }
+ if (f & W_ASSIGNRHS)
+ {
+ f &= ~W_ASSIGNRHS;
+ fprintf (stderr, "W_ASSIGNRHS%s", f ? "|" : "");
+ }
+ if (f & W_NOCOMSUB)
+ {
+ f &= ~W_NOCOMSUB;
+ fprintf (stderr, "W_NOCOMSUB%s", f ? "|" : "");
+ }
+ if (f & W_DOLLARSTAR)
+ {
+ f &= ~W_DOLLARSTAR;
+ fprintf (stderr, "W_DOLLARSTAR%s", f ? "|" : "");
+ }
+ if (f & W_DOLLARAT)
+ {
+ f &= ~W_DOLLARAT;
+ fprintf (stderr, "W_DOLLARAT%s", f ? "|" : "");
+ }
+ if (f & W_TILDEEXP)
+ {
+ f &= ~W_TILDEEXP;
+ fprintf (stderr, "W_TILDEEXP%s", f ? "|" : "");
+ }
+ if (f & W_NOSPLIT2)
+ {
+ f &= ~W_NOSPLIT2;
+ fprintf (stderr, "W_NOSPLIT2%s", f ? "|" : "");
+ }
+ if (f & W_NOGLOB)
+ {
+ f &= ~W_NOGLOB;
+ fprintf (stderr, "W_NOGLOB%s", f ? "|" : "");
+ }
+ if (f & W_NOSPLIT)
+ {
+ f &= ~W_NOSPLIT;
+ fprintf (stderr, "W_NOSPLIT%s", f ? "|" : "");
+ }
+ if (f & W_GLOBEXP)
+ {
+ f &= ~W_GLOBEXP;
+ fprintf (stderr, "W_GLOBEXP%s", f ? "|" : "");
+ }
+ if (f & W_ASSIGNMENT)
+ {
+ f &= ~W_ASSIGNMENT;
+ fprintf (stderr, "W_ASSIGNMENT%s", f ? "|" : "");
+ }
+ if (f & W_QUOTED)
+ {
+ f &= ~W_QUOTED;
+ fprintf (stderr, "W_QUOTED%s", f ? "|" : "");
+ }
+ if (f & W_HASDOLLAR)
+ {
+ f &= ~W_HASDOLLAR;
+ fprintf (stderr, "W_HASDOLLAR%s", f ? "|" : "");
+ }
+ fprintf (stderr, "\n");
+ fflush (stderr);
+}
+#endif
+
+#ifdef INCLUDE_UNUSED
+static char *
+quoted_substring (string, start, end)
+ char *string;
+ int start, end;
+{
+ register int len, l;
+ register char *result, *s, *r;
+
+ len = end - start;
+
+ /* Move to string[start], skipping quoted characters. */
+ for (s = string, l = 0; *s && l < start; )
+ {
+ if (*s == CTLESC)
+ {
+ s++;
+ continue;
+ }
+ l++;
+ if (*s == 0)
+ break;
+ }
+
+ r = result = (char *)xmalloc (2*len + 1); /* save room for quotes */
+
+ /* Copy LEN characters, including quote characters. */
+ s = string + l;
+ for (l = 0; l < len; s++)
+ {
+ if (*s == CTLESC)
+ *r++ = *s++;
+ *r++ = *s;
+ l++;
+ if (*s == 0)
+ break;
+ }
+ *r = '\0';
+ return result;
+}
+#endif
+
+#ifdef INCLUDE_UNUSED
+/* Return the length of S, skipping over quoted characters */
+static int
+quoted_strlen (s)
+ char *s;
+{
+ register char *p;
+ int i;
+
+ i = 0;
+ for (p = s; *p; p++)
+ {
+ if (*p == CTLESC)
+ {
+ p++;
+ if (*p == 0)
+ return (i + 1);
+ }
+ i++;
+ }
+
+ return i;
+}
+#endif
+
+/* Find the first occurrence of character C in string S, obeying shell
+ quoting rules. If (FLAGS & ST_BACKSL) is non-zero, backslash-escaped
+ characters are skipped. If (FLAGS & ST_CTLESC) is non-zero, characters
+ escaped with CTLESC are skipped. */
+static char *
+quoted_strchr (s, c, flags)
+ char *s;
+ int c, flags;
+{
+ register char *p;
+
+ for (p = s; *p; p++)
+ {
+ if (((flags & ST_BACKSL) && *p == '\\')
+ || ((flags & ST_CTLESC) && *p == CTLESC))
+ {
+ p++;
+ if (*p == '\0')
+ return ((char *)NULL);
+ continue;
+ }
+ else if (*p == c)
+ return p;
+ }
+ return ((char *)NULL);
+}
+
+/* Return 1 if CHARACTER appears in an unquoted portion of
+ STRING. Return 0 otherwise. CHARACTER must be a single-byte character. */
+static int
+unquoted_member (character, string)
+ int character;
+ char *string;
+{
+ size_t slen;
+ int sindex, c;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+ sindex = 0;
+ while (c = string[sindex])
+ {
+ if (c == character)
+ return (1);
+
+ switch (c)
+ {
+ default:
+ ADVANCE_CHAR (string, slen, sindex);
+ break;
+
+ case '\\':
+ sindex++;
+ if (string[sindex])
+ ADVANCE_CHAR (string, slen, sindex);
+ break;
+
+ case '\'':
+ sindex = skip_single_quoted (string, slen, ++sindex);
+ break;
+
+ case '"':
+ sindex = skip_double_quoted (string, slen, ++sindex);
+ break;
+ }
+ }
+ return (0);
+}
+
+/* Return 1 if SUBSTR appears in an unquoted portion of STRING. */
+static int
+unquoted_substring (substr, string)
+ char *substr, *string;
+{
+ size_t slen;
+ int sindex, c, sublen;
+ DECLARE_MBSTATE;
+
+ if (substr == 0 || *substr == '\0')
+ return (0);
+
+ slen = strlen (string);
+ sublen = strlen (substr);
+ for (sindex = 0; c = string[sindex]; )
+ {
+ if (STREQN (string + sindex, substr, sublen))
+ return (1);
+
+ switch (c)
+ {
+ case '\\':
+ sindex++;
+
+ if (string[sindex])
+ ADVANCE_CHAR (string, slen, sindex);
+ break;
+
+ case '\'':
+ sindex = skip_single_quoted (string, slen, ++sindex);
+ break;
+
+ case '"':
+ sindex = skip_double_quoted (string, slen, ++sindex);
+ break;
+
+ default:
+ ADVANCE_CHAR (string, slen, sindex);
+ break;
+ }
+ }
+ return (0);
+}
+
+/* Most of the substitutions must be done in parallel. In order
+ to avoid using tons of unclear goto's, I have some functions
+ for manipulating malloc'ed strings. They all take INDX, a
+ pointer to an integer which is the offset into the string
+ where manipulation is taking place. They also take SIZE, a
+ pointer to an integer which is the current length of the
+ character array for this string. */
+
+/* Append SOURCE to TARGET at INDEX. SIZE is the current amount
+ of space allocated to TARGET. SOURCE can be NULL, in which
+ case nothing happens. Gets rid of SOURCE by freeing it.
+ Returns TARGET in case the location has changed. */
+INLINE char *
+sub_append_string (source, target, indx, size)
+ char *source, *target;
+ int *indx, *size;
+{
+ if (source)
+ {
+ int srclen, n;
+
+ srclen = STRLEN (source);
+ if (srclen >= (int)(*size - *indx))
+ {
+ n = srclen + *indx;
+ n = (n + DEFAULT_ARRAY_SIZE) - (n % DEFAULT_ARRAY_SIZE);
+ target = (char *)xrealloc (target, (*size = n));
+ }
+
+ FASTCOPY (source, target + *indx, srclen);
+ *indx += srclen;
+ target[*indx] = '\0';
+
+ free (source);
+ }
+ return (target);
+}
+
+#if 0
+/* UNUSED */
+/* Append the textual representation of NUMBER to TARGET.
+ INDX and SIZE are as in SUB_APPEND_STRING. */
+char *
+sub_append_number (number, target, indx, size)
+ intmax_t number;
+ int *indx, *size;
+ char *target;
+{
+ char *temp;
+
+ temp = itos (number);
+ return (sub_append_string (temp, target, indx, size));
+}
+#endif
+
+/* Extract a substring from STRING, starting at SINDEX and ending with
+ one of the characters in CHARLIST. Don't make the ending character
+ part of the string. Leave SINDEX pointing at the ending character.
+ Understand about backslashes in the string. If (flags & SX_VARNAME)
+ is non-zero, and array variables have been compiled into the shell,
+ everything between a `[' and a corresponding `]' is skipped over.
+ If (flags & SX_NOALLOC) is non-zero, don't return the substring, just
+ update SINDEX. If (flags & SX_REQMATCH) is non-zero, the string must
+ contain a closing character from CHARLIST. */
+static char *
+string_extract (string, sindex, charlist, flags)
+ char *string;
+ int *sindex;
+ char *charlist;
+ int flags;
+{
+ register int c, i;
+ int found;
+ size_t slen;
+ char *temp;
+ DECLARE_MBSTATE;
+
+ slen = (MB_CUR_MAX > 1) ? strlen (string + *sindex) + *sindex : 0;
+ i = *sindex;
+ found = 0;
+ while (c = string[i])
+ {
+ if (c == '\\')
+ {
+ if (string[i + 1])
+ i++;
+ else
+ break;
+ }
+#if defined (ARRAY_VARS)
+ else if ((flags & SX_VARNAME) && c == '[')
+ {
+ int ni;
+ /* If this is an array subscript, skip over it and continue. */
+ ni = skipsubscript (string, i, 0);
+ if (string[ni] == ']')
+ i = ni;
+ }
+#endif
+ else if (MEMBER (c, charlist))
+ {
+ found = 1;
+ break;
+ }
+
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+ /* If we had to have a matching delimiter and didn't find one, return an
+ error and let the caller deal with it. */
+ if ((flags & SX_REQMATCH) && found == 0)
+ {
+ *sindex = i;
+ return (&extract_string_error);
+ }
+
+ temp = (flags & SX_NOALLOC) ? (char *)NULL : substring (string, *sindex, i);
+ *sindex = i;
+
+ return (temp);
+}
+
+/* Extract the contents of STRING as if it is enclosed in double quotes.
+ SINDEX, when passed in, is the offset of the character immediately
+ following the opening double quote; on exit, SINDEX is left pointing after
+ the closing double quote. If STRIPDQ is non-zero, unquoted double
+ quotes are stripped and the string is terminated by a null byte.
+ Backslashes between the embedded double quotes are processed. If STRIPDQ
+ is zero, an unquoted `"' terminates the string. */
+static char *
+string_extract_double_quoted (string, sindex, stripdq)
+ char *string;
+ int *sindex, stripdq;
+{
+ size_t slen;
+ char *send;
+ int j, i, t;
+ unsigned char c;
+ char *temp, *ret; /* The new string we return. */
+ int pass_next, backquote, si; /* State variables for the machine. */
+ int dquote;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string + *sindex) + *sindex;
+ send = string + slen;
+
+ pass_next = backquote = dquote = 0;
+ temp = (char *)xmalloc (1 + slen - *sindex);
+
+ j = 0;
+ i = *sindex;
+ while (c = string[i])
+ {
+ /* Process a character that was quoted by a backslash. */
+ if (pass_next)
+ {
+ /* Posix.2 sez:
+
+ ``The backslash shall retain its special meaning as an escape
+ character only when followed by one of the characters:
+ $ ` " \ <newline>''.
+
+ If STRIPDQ is zero, we handle the double quotes here and let
+ expand_word_internal handle the rest. If STRIPDQ is non-zero,
+ we have already been through one round of backslash stripping,
+ and want to strip these backslashes only if DQUOTE is non-zero,
+ indicating that we are inside an embedded double-quoted string. */
+
+ /* If we are in an embedded quoted string, then don't strip
+ backslashes before characters for which the backslash
+ retains its special meaning, but remove backslashes in
+ front of other characters. If we are not in an
+ embedded quoted string, don't strip backslashes at all.
+ This mess is necessary because the string was already
+ surrounded by double quotes (and sh has some really weird
+ quoting rules).
+ The returned string will be run through expansion as if
+ it were double-quoted. */
+ if ((stripdq == 0 && c != '"') ||
+ (stripdq && ((dquote && (sh_syntaxtab[c] & CBSDQUOTE)) || dquote == 0)))
+ temp[j++] = '\\';
+ pass_next = 0;
+
+add_one_character:
+ COPY_CHAR_I (temp, j, string, send, i);
+ continue;
+ }
+
+ /* A backslash protects the next character. The code just above
+ handles preserving the backslash in front of any character but
+ a double quote. */
+ if (c == '\\')
+ {
+ pass_next++;
+ i++;
+ continue;
+ }
+
+ /* Inside backquotes, ``the portion of the quoted string from the
+ initial backquote and the characters up to the next backquote
+ that is not preceded by a backslash, having escape characters
+ removed, defines that command''. */
+ if (backquote)
+ {
+ if (c == '`')
+ backquote = 0;
+ temp[j++] = c;
+ i++;
+ continue;
+ }
+
+ if (c == '`')
+ {
+ temp[j++] = c;
+ backquote++;
+ i++;
+ continue;
+ }
+
+ /* Pass everything between `$(' and the matching `)' or a quoted
+ ${ ... } pair through according to the Posix.2 specification. */
+ if (c == '$' && ((string[i + 1] == LPAREN) || (string[i + 1] == LBRACE)))
+ {
+ int free_ret = 1;
+
+ si = i + 2;
+ if (string[i + 1] == LPAREN)
+ ret = extract_command_subst (string, &si, 0);
+ else
+ ret = extract_dollar_brace_string (string, &si, 1, 0);
+
+ temp[j++] = '$';
+ temp[j++] = string[i + 1];
+
+ /* Just paranoia; ret will not be 0 unless no_longjmp_on_fatal_error
+ is set. */
+ if (ret == 0 && no_longjmp_on_fatal_error)
+ {
+ free_ret = 0;
+ ret = string + i + 2;
+ }
+
+ for (t = 0; ret[t]; t++, j++)
+ temp[j] = ret[t];
+ temp[j] = string[si];
+
+ if (string[si])
+ {
+ j++;
+ i = si + 1;
+ }
+ else
+ i = si;
+
+ if (free_ret)
+ free (ret);
+ continue;
+ }
+
+ /* Add any character but a double quote to the quoted string we're
+ accumulating. */
+ if (c != '"')
+ goto add_one_character;
+
+ /* c == '"' */
+ if (stripdq)
+ {
+ dquote ^= 1;
+ i++;
+ continue;
+ }
+
+ break;
+ }
+ temp[j] = '\0';
+
+ /* Point to after the closing quote. */
+ if (c)
+ i++;
+ *sindex = i;
+
+ return (temp);
+}
+
+/* This should really be another option to string_extract_double_quoted. */
+static int
+skip_double_quoted (string, slen, sind)
+ char *string;
+ size_t slen;
+ int sind;
+{
+ int c, i;
+ char *ret;
+ int pass_next, backquote, si;
+ DECLARE_MBSTATE;
+
+ pass_next = backquote = 0;
+ i = sind;
+ while (c = string[i])
+ {
+ if (pass_next)
+ {
+ pass_next = 0;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else if (c == '\\')
+ {
+ pass_next++;
+ i++;
+ continue;
+ }
+ else if (backquote)
+ {
+ if (c == '`')
+ backquote = 0;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else if (c == '`')
+ {
+ backquote++;
+ i++;
+ continue;
+ }
+ else if (c == '$' && ((string[i + 1] == LPAREN) || (string[i + 1] == LBRACE)))
+ {
+ si = i + 2;
+ if (string[i + 1] == LPAREN)
+ ret = extract_command_subst (string, &si, SX_NOALLOC);
+ else
+ ret = extract_dollar_brace_string (string, &si, 1, SX_NOALLOC);
+
+ i = si + 1;
+ continue;
+ }
+ else if (c != '"')
+ {
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else
+ break;
+ }
+
+ if (c)
+ i++;
+
+ return (i);
+}
+
+/* Extract the contents of STRING as if it is enclosed in single quotes.
+ SINDEX, when passed in, is the offset of the character immediately
+ following the opening single quote; on exit, SINDEX is left pointing after
+ the closing single quote. */
+static inline char *
+string_extract_single_quoted (string, sindex)
+ char *string;
+ int *sindex;
+{
+ register int i;
+ size_t slen;
+ char *t;
+ DECLARE_MBSTATE;
+
+ /* Don't need slen for ADVANCE_CHAR unless multibyte chars possible. */
+ slen = (MB_CUR_MAX > 1) ? strlen (string + *sindex) + *sindex : 0;
+ i = *sindex;
+ while (string[i] && string[i] != '\'')
+ ADVANCE_CHAR (string, slen, i);
+
+ t = substring (string, *sindex, i);
+
+ if (string[i])
+ i++;
+ *sindex = i;
+
+ return (t);
+}
+
+static inline int
+skip_single_quoted (string, slen, sind)
+ const char *string;
+ size_t slen;
+ int sind;
+{
+ register int c;
+ DECLARE_MBSTATE;
+
+ c = sind;
+ while (string[c] && string[c] != '\'')
+ ADVANCE_CHAR (string, slen, c);
+
+ if (string[c])
+ c++;
+ return c;
+}
+
+/* Just like string_extract, but doesn't hack backslashes or any of
+ that other stuff. Obeys CTLESC quoting. Used to do splitting on $IFS. */
+static char *
+string_extract_verbatim (string, slen, sindex, charlist, flags)
+ char *string;
+ size_t slen;
+ int *sindex;
+ char *charlist;
+ int flags;
+{
+ register int i;
+#if defined (HANDLE_MULTIBYTE)
+ size_t clen;
+ wchar_t *wcharlist;
+#endif
+ int c;
+ char *temp;
+ DECLARE_MBSTATE;
+
+ if (charlist[0] == '\'' && charlist[1] == '\0')
+ {
+ temp = string_extract_single_quoted (string, sindex);
+ --*sindex; /* leave *sindex at separator character */
+ return temp;
+ }
+
+ i = *sindex;
+#if 0
+ /* See how the MBLEN and ADVANCE_CHAR macros work to understand why we need
+ this only if MB_CUR_MAX > 1. */
+ slen = (MB_CUR_MAX > 1) ? strlen (string + *sindex) + *sindex : 1;
+#endif
+#if defined (HANDLE_MULTIBYTE)
+ clen = strlen (charlist);
+ wcharlist = 0;
+#endif
+ while (c = string[i])
+ {
+#if defined (HANDLE_MULTIBYTE)
+ size_t mblength;
+#endif
+ if ((flags & SX_NOCTLESC) == 0 && c == CTLESC)
+ {
+ i += 2;
+ continue;
+ }
+ /* Even if flags contains SX_NOCTLESC, we let CTLESC quoting CTLNUL
+ through, to protect the CTLNULs from later calls to
+ remove_quoted_nulls. */
+ else if ((flags & SX_NOESCCTLNUL) == 0 && c == CTLESC && string[i+1] == CTLNUL)
+ {
+ i += 2;
+ continue;
+ }
+
+#if defined (HANDLE_MULTIBYTE)
+ mblength = MBLEN (string + i, slen - i);
+ if (mblength > 1)
+ {
+ wchar_t wc;
+ mblength = mbtowc (&wc, string + i, slen - i);
+ if (MB_INVALIDCH (mblength))
+ {
+ if (MEMBER (c, charlist))
+ break;
+ }
+ else
+ {
+ if (wcharlist == 0)
+ {
+ size_t len;
+ len = mbstowcs (wcharlist, charlist, 0);
+ if (len == -1)
+ len = 0;
+ wcharlist = (wchar_t *)xmalloc (sizeof (wchar_t) * (len + 1));
+ mbstowcs (wcharlist, charlist, len + 1);
+ }
+
+ if (wcschr (wcharlist, wc))
+ break;
+ }
+ }
+ else
+#endif
+ if (MEMBER (c, charlist))
+ break;
+
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+#if defined (HANDLE_MULTIBYTE)
+ FREE (wcharlist);
+#endif
+
+ temp = substring (string, *sindex, i);
+ *sindex = i;
+
+ return (temp);
+}
+
+/* Extract the $( construct in STRING, and return a new string.
+ Start extracting at (SINDEX) as if we had just seen "$(".
+ Make (SINDEX) get the position of the matching ")". )
+ XFLAGS is additional flags to pass to other extraction functions. */
+char *
+extract_command_subst (string, sindex, xflags)
+ char *string;
+ int *sindex;
+ int xflags;
+{
+ if (string[*sindex] == LPAREN)
+ return (extract_delimited_string (string, sindex, "$(", "(", ")", xflags|SX_COMMAND)); /*)*/
+ else
+ {
+ xflags |= (no_longjmp_on_fatal_error ? SX_NOLONGJMP : 0);
+ return (xparse_dolparen (string, string+*sindex, sindex, xflags));
+ }
+}
+
+/* Extract the $[ construct in STRING, and return a new string. (])
+ Start extracting at (SINDEX) as if we had just seen "$[".
+ Make (SINDEX) get the position of the matching "]". */
+char *
+extract_arithmetic_subst (string, sindex)
+ char *string;
+ int *sindex;
+{
+ return (extract_delimited_string (string, sindex, "$[", "[", "]", 0)); /*]*/
+}
+
+#if defined (PROCESS_SUBSTITUTION)
+/* Extract the <( or >( construct in STRING, and return a new string.
+ Start extracting at (SINDEX) as if we had just seen "<(".
+ Make (SINDEX) get the position of the matching ")". */ /*))*/
+char *
+extract_process_subst (string, starter, sindex)
+ char *string;
+ char *starter;
+ int *sindex;
+{
+ return (extract_delimited_string (string, sindex, starter, "(", ")", 0));
+}
+#endif /* PROCESS_SUBSTITUTION */
+
+#if defined (ARRAY_VARS)
+/* This can be fooled by unquoted right parens in the passed string. If
+ each caller verifies that the last character in STRING is a right paren,
+ we don't even need to call extract_delimited_string. */
+char *
+extract_array_assignment_list (string, sindex)
+ char *string;
+ int *sindex;
+{
+ int slen;
+ char *ret;
+
+ slen = strlen (string); /* ( */
+ if (string[slen - 1] == ')')
+ {
+ ret = substring (string, *sindex, slen - 1);
+ *sindex = slen - 1;
+ return ret;
+ }
+ return 0;
+}
+#endif
+
+/* Extract and create a new string from the contents of STRING, a
+ character string delimited with OPENER and CLOSER. SINDEX is
+ the address of an int describing the current offset in STRING;
+ it should point to just after the first OPENER found. On exit,
+ SINDEX gets the position of the last character of the matching CLOSER.
+ If OPENER is more than a single character, ALT_OPENER, if non-null,
+ contains a character string that can also match CLOSER and thus
+ needs to be skipped. */
+static char *
+extract_delimited_string (string, sindex, opener, alt_opener, closer, flags)
+ char *string;
+ int *sindex;
+ char *opener, *alt_opener, *closer;
+ int flags;
+{
+ int i, c, si;
+ size_t slen;
+ char *t, *result;
+ int pass_character, nesting_level, in_comment;
+ int len_closer, len_opener, len_alt_opener;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string + *sindex) + *sindex;
+ len_opener = STRLEN (opener);
+ len_alt_opener = STRLEN (alt_opener);
+ len_closer = STRLEN (closer);
+
+ pass_character = in_comment = 0;
+
+ nesting_level = 1;
+ i = *sindex;
+
+ while (nesting_level)
+ {
+ c = string[i];
+
+ if (c == 0)
+ break;
+
+ if (in_comment)
+ {
+ if (c == '\n')
+ in_comment = 0;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+
+ if (pass_character) /* previous char was backslash */
+ {
+ pass_character = 0;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+
+ /* Not exactly right yet; should handle shell metacharacters and
+ multibyte characters, too. See COMMENT_BEGIN define in parse.y */
+ if ((flags & SX_COMMAND) && c == '#' && (i == 0 || string[i - 1] == '\n' || shellblank (string[i - 1])))
+ {
+ in_comment = 1;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+
+ if (c == CTLESC || c == '\\')
+ {
+ pass_character++;
+ i++;
+ continue;
+ }
+
+#if 0
+ /* Process a nested command substitution, but only if we're parsing a
+ command substitution. XXX - for bash-4.2 */
+ if ((flags & SX_COMMAND) && string[i] == '$' && string[i+1] == LPAREN)
+ {
+ si = i + 2;
+ t = extract_command_subst (string, &si, flags);
+ i = si + 1;
+ continue;
+ }
+#endif
+
+ /* Process a nested OPENER. */
+ if (STREQN (string + i, opener, len_opener))
+ {
+ si = i + len_opener;
+ t = extract_delimited_string (string, &si, opener, alt_opener, closer, flags|SX_NOALLOC);
+ i = si + 1;
+ continue;
+ }
+
+ /* Process a nested ALT_OPENER */
+ if (len_alt_opener && STREQN (string + i, alt_opener, len_alt_opener))
+ {
+ si = i + len_alt_opener;
+ t = extract_delimited_string (string, &si, alt_opener, alt_opener, closer, flags|SX_NOALLOC);
+ i = si + 1;
+ continue;
+ }
+
+ /* If the current substring terminates the delimited string, decrement
+ the nesting level. */
+ if (STREQN (string + i, closer, len_closer))
+ {
+ i += len_closer - 1; /* move to last byte of the closer */
+ nesting_level--;
+ if (nesting_level == 0)
+ break;
+ }
+
+ /* Pass old-style command substitution through verbatim. */
+ if (c == '`')
+ {
+ si = i + 1;
+ t = string_extract (string, &si, "`", flags|SX_NOALLOC);
+ i = si + 1;
+ continue;
+ }
+
+ /* Pass single-quoted and double-quoted strings through verbatim. */
+ if (c == '\'' || c == '"')
+ {
+ si = i + 1;
+ i = (c == '\'') ? skip_single_quoted (string, slen, si)
+ : skip_double_quoted (string, slen, si);
+ continue;
+ }
+
+ /* move past this character, which was not special. */
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+ if (c == 0 && nesting_level)
+ {
+ if (no_longjmp_on_fatal_error == 0)
+ {
+ report_error (_("bad substitution: no closing `%s' in %s"), closer, string);
+ last_command_exit_value = EXECUTION_FAILURE;
+ exp_jump_to_top_level (DISCARD);
+ }
+ else
+ {
+ *sindex = i;
+ return (char *)NULL;
+ }
+ }
+
+ si = i - *sindex - len_closer + 1;
+ if (flags & SX_NOALLOC)
+ result = (char *)NULL;
+ else
+ {
+ result = (char *)xmalloc (1 + si);
+ strncpy (result, string + *sindex, si);
+ result[si] = '\0';
+ }
+ *sindex = i;
+
+ return (result);
+}
+
+/* Extract a parameter expansion expression within ${ and } from STRING.
+ Obey the Posix.2 rules for finding the ending `}': count braces while
+ skipping over enclosed quoted strings and command substitutions.
+ SINDEX is the address of an int describing the current offset in STRING;
+ it should point to just after the first `{' found. On exit, SINDEX
+ gets the position of the matching `}'. QUOTED is non-zero if this
+ occurs inside double quotes. */
+/* XXX -- this is very similar to extract_delimited_string -- XXX */
+static char *
+extract_dollar_brace_string (string, sindex, quoted, flags)
+ char *string;
+ int *sindex, quoted, flags;
+{
+ register int i, c;
+ size_t slen;
+ int pass_character, nesting_level, si;
+ char *result, *t;
+ DECLARE_MBSTATE;
+
+ pass_character = 0;
+ nesting_level = 1;
+ slen = strlen (string + *sindex) + *sindex;
+
+ i = *sindex;
+ while (c = string[i])
+ {
+ if (pass_character)
+ {
+ pass_character = 0;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+
+ /* CTLESCs and backslashes quote the next character. */
+ if (c == CTLESC || c == '\\')
+ {
+ pass_character++;
+ i++;
+ continue;
+ }
+
+ if (string[i] == '$' && string[i+1] == LBRACE)
+ {
+ nesting_level++;
+ i += 2;
+ continue;
+ }
+
+ if (c == RBRACE)
+ {
+ nesting_level--;
+ if (nesting_level == 0)
+ break;
+ i++;
+ continue;
+ }
+
+ /* Pass the contents of old-style command substitutions through
+ verbatim. */
+ if (c == '`')
+ {
+ si = i + 1;
+ t = string_extract (string, &si, "`", flags|SX_NOALLOC);
+ i = si + 1;
+ continue;
+ }
+
+ /* Pass the contents of new-style command substitutions and
+ arithmetic substitutions through verbatim. */
+ if (string[i] == '$' && string[i+1] == LPAREN)
+ {
+ si = i + 2;
+ t = extract_command_subst (string, &si, flags|SX_NOALLOC);
+ i = si + 1;
+ continue;
+ }
+
+ /* Pass the contents of single-quoted and double-quoted strings
+ through verbatim. */
+ if (c == '\'' || c == '"')
+ {
+ si = i + 1;
+ i = (c == '\'') ? skip_single_quoted (string, slen, si)
+ : skip_double_quoted (string, slen, si);
+ /* skip_XXX_quoted leaves index one past close quote */
+ continue;
+ }
+
+ /* move past this character, which was not special. */
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+ if (c == 0 && nesting_level)
+ {
+ if (no_longjmp_on_fatal_error == 0)
+ { /* { */
+ report_error (_("bad substitution: no closing `%s' in %s"), "}", string);
+ last_command_exit_value = EXECUTION_FAILURE;
+ exp_jump_to_top_level (DISCARD);
+ }
+ else
+ {
+ *sindex = i;
+ return ((char *)NULL);
+ }
+ }
+
+ result = (flags & SX_NOALLOC) ? (char *)NULL : substring (string, *sindex, i);
+ *sindex = i;
+
+ return (result);
+}
+
+/* Remove backslashes which are quoting backquotes from STRING. Modifies
+ STRING, and returns a pointer to it. */
+char *
+de_backslash (string)
+ char *string;
+{
+ register size_t slen;
+ register int i, j, prev_i;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+ i = j = 0;
+
+ /* Loop copying string[i] to string[j], i >= j. */
+ while (i < slen)
+ {
+ if (string[i] == '\\' && (string[i + 1] == '`' || string[i + 1] == '\\' ||
+ string[i + 1] == '$'))
+ i++;
+ prev_i = i;
+ ADVANCE_CHAR (string, slen, i);
+ if (j < prev_i)
+ do string[j++] = string[prev_i++]; while (prev_i < i);
+ else
+ j = i;
+ }
+ string[j] = '\0';
+
+ return (string);
+}
+
+#if 0
+/*UNUSED*/
+/* Replace instances of \! in a string with !. */
+void
+unquote_bang (string)
+ char *string;
+{
+ register int i, j;
+ register char *temp;
+
+ temp = (char *)xmalloc (1 + strlen (string));
+
+ for (i = 0, j = 0; (temp[j] = string[i]); i++, j++)
+ {
+ if (string[i] == '\\' && string[i + 1] == '!')
+ {
+ temp[j] = '!';
+ i++;
+ }
+ }
+ strcpy (string, temp);
+ free (temp);
+}
+#endif
+
+#define CQ_RETURN(x) do { no_longjmp_on_fatal_error = 0; return (x); } while (0)
+
+/* This function assumes s[i] == open; returns with s[ret] == close; used to
+ parse array subscripts. FLAGS & 1 means to not attempt to skip over
+ matched pairs of quotes or backquotes, or skip word expansions; it is
+ intended to be used after expansion has been performed and during final
+ assignment parsing (see arrayfunc.c:assign_compound_array_list()). */
+static int
+skip_matched_pair (string, start, open, close, flags)
+ const char *string;
+ int start, open, close, flags;
+{
+ int i, pass_next, backq, si, c, count;
+ size_t slen;
+ char *temp, *ss;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string + start) + start;
+ no_longjmp_on_fatal_error = 1;
+
+ i = start + 1; /* skip over leading bracket */
+ count = 1;
+ pass_next = backq = 0;
+ ss = (char *)string;
+ while (c = string[i])
+ {
+ if (pass_next)
+ {
+ pass_next = 0;
+ if (c == 0)
+ CQ_RETURN(i);
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else if (c == '\\')
+ {
+ pass_next = 1;
+ i++;
+ continue;
+ }
+ else if (backq)
+ {
+ if (c == '`')
+ backq = 0;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else if ((flags & 1) == 0 && c == '`')
+ {
+ backq = 1;
+ i++;
+ continue;
+ }
+ else if ((flags & 1) == 0 && c == open)
+ {
+ count++;
+ i++;
+ continue;
+ }
+ else if (c == close)
+ {
+ count--;
+ if (count == 0)
+ break;
+ i++;
+ continue;
+ }
+ else if ((flags & 1) == 0 && (c == '\'' || c == '"'))
+ {
+ i = (c == '\'') ? skip_single_quoted (ss, slen, ++i)
+ : skip_double_quoted (ss, slen, ++i);
+ /* no increment, the skip functions increment past the closing quote. */
+ }
+ else if ((flags&1) == 0 && c == '$' && (string[i+1] == LPAREN || string[i+1] == LBRACE))
+ {
+ si = i + 2;
+ if (string[si] == '\0')
+ CQ_RETURN(si);
+
+ if (string[i+1] == LPAREN)
+ temp = extract_delimited_string (ss, &si, "$(", "(", ")", SX_NOALLOC|SX_COMMAND); /* ) */
+ else
+ temp = extract_dollar_brace_string (ss, &si, 0, SX_NOALLOC);
+ i = si;
+ if (string[i] == '\0') /* don't increment i past EOS in loop */
+ break;
+ i++;
+ continue;
+ }
+ else
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+ CQ_RETURN(i);
+}
+
+#if defined (ARRAY_VARS)
+int
+skipsubscript (string, start, flags)
+ const char *string;
+ int start, flags;
+{
+ return (skip_matched_pair (string, start, '[', ']', flags));
+}
+#endif
+
+/* Skip characters in STRING until we find a character in DELIMS, and return
+ the index of that character. START is the index into string at which we
+ begin. This is similar in spirit to strpbrk, but it returns an index into
+ STRING and takes a starting index. This little piece of code knows quite
+ a lot of shell syntax. It's very similar to skip_double_quoted and other
+ functions of that ilk. */
+int
+skip_to_delim (string, start, delims, flags)
+ char *string;
+ int start;
+ char *delims;
+ int flags;
+{
+ int i, pass_next, backq, si, c, invert, skipquote, skipcmd;
+ size_t slen;
+ char *temp;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string + start) + start;
+ if (flags & SD_NOJMP)
+ no_longjmp_on_fatal_error = 1;
+ invert = (flags & SD_INVERT);
+ skipcmd = (flags & SD_NOSKIPCMD) == 0;
+
+ i = start;
+ pass_next = backq = 0;
+ while (c = string[i])
+ {
+ /* If this is non-zero, we should not let quote characters be delimiters
+ and the current character is a single or double quote. We should not
+ test whether or not it's a delimiter until after we skip single- or
+ double-quoted strings. */
+ skipquote = ((flags & SD_NOQUOTEDELIM) && (c == '\'' || c =='"'));
+ if (pass_next)
+ {
+ pass_next = 0;
+ if (c == 0)
+ CQ_RETURN(i);
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else if (c == '\\')
+ {
+ pass_next = 1;
+ i++;
+ continue;
+ }
+ else if (backq)
+ {
+ if (c == '`')
+ backq = 0;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else if (c == '`')
+ {
+ backq = 1;
+ i++;
+ continue;
+ }
+ else if (skipquote == 0 && invert == 0 && member (c, delims))
+ break;
+ else if (c == '\'' || c == '"')
+ {
+ i = (c == '\'') ? skip_single_quoted (string, slen, ++i)
+ : skip_double_quoted (string, slen, ++i);
+ /* no increment, the skip functions increment past the closing quote. */
+ }
+ else if (c == '$' && ((skipcmd && string[i+1] == LPAREN) || string[i+1] == LBRACE))
+ {
+ si = i + 2;
+ if (string[si] == '\0')
+ CQ_RETURN(si);
+
+ if (string[i+1] == LPAREN)
+ temp = extract_delimited_string (string, &si, "$(", "(", ")", SX_NOALLOC|SX_COMMAND); /* ) */
+ else
+ temp = extract_dollar_brace_string (string, &si, 0, SX_NOALLOC);
+ i = si;
+ if (string[i] == '\0') /* don't increment i past EOS in loop */
+ break;
+ i++;
+ continue;
+ }
+#if defined (PROCESS_SUBSTITUTION)
+ else if (skipcmd && (c == '<' || c == '>') && string[i+1] == LPAREN)
+ {
+ si = i + 2;
+ if (string[si] == '\0')
+ CQ_RETURN(si);
+ temp = extract_process_subst (string, (c == '<') ? "<(" : ">(", &si);
+ i = si;
+ if (string[i] == '\0')
+ break;
+ i++;
+ continue;
+ }
+#endif /* PROCESS_SUBSTITUTION */
+ else if ((skipquote || invert) && (member (c, delims) == 0))
+ break;
+ else
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+ CQ_RETURN(i);
+}
+
+#if defined (READLINE)
+/* Return 1 if the portion of STRING ending at EINDEX is quoted (there is
+ an unclosed quoted string), or if the character at EINDEX is quoted
+ by a backslash. NO_LONGJMP_ON_FATAL_ERROR is used to flag that the various
+ single and double-quoted string parsing functions should not return an
+ error if there are unclosed quotes or braces. The characters that this
+ recognizes need to be the same as the contents of
+ rl_completer_quote_characters. */
+
+int
+char_is_quoted (string, eindex)
+ char *string;
+ int eindex;
+{
+ int i, pass_next, c;
+ size_t slen;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+ no_longjmp_on_fatal_error = 1;
+ i = pass_next = 0;
+ while (i <= eindex)
+ {
+ c = string[i];
+
+ if (pass_next)
+ {
+ pass_next = 0;
+ if (i >= eindex) /* XXX was if (i >= eindex - 1) */
+ CQ_RETURN(1);
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else if (c == '\\')
+ {
+ pass_next = 1;
+ i++;
+ continue;
+ }
+ else if (c == '\'' || c == '"')
+ {
+ i = (c == '\'') ? skip_single_quoted (string, slen, ++i)
+ : skip_double_quoted (string, slen, ++i);
+ if (i > eindex)
+ CQ_RETURN(1);
+ /* no increment, the skip_xxx functions go one past end */
+ }
+ else
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+ CQ_RETURN(0);
+}
+
+int
+unclosed_pair (string, eindex, openstr)
+ char *string;
+ int eindex;
+ char *openstr;
+{
+ int i, pass_next, openc, olen;
+ size_t slen;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+ olen = strlen (openstr);
+ i = pass_next = openc = 0;
+ while (i <= eindex)
+ {
+ if (pass_next)
+ {
+ pass_next = 0;
+ if (i >= eindex) /* XXX was if (i >= eindex - 1) */
+ return 0;
+ ADVANCE_CHAR (string, slen, i);
+ continue;
+ }
+ else if (string[i] == '\\')
+ {
+ pass_next = 1;
+ i++;
+ continue;
+ }
+ else if (STREQN (string + i, openstr, olen))
+ {
+ openc = 1 - openc;
+ i += olen;
+ }
+ else if (string[i] == '\'' || string[i] == '"')
+ {
+ i = (string[i] == '\'') ? skip_single_quoted (string, slen, i)
+ : skip_double_quoted (string, slen, i);
+ if (i > eindex)
+ return 0;
+ }
+ else
+ ADVANCE_CHAR (string, slen, i);
+ }
+ return (openc);
+}
+
+/* Split STRING (length SLEN) at DELIMS, and return a WORD_LIST with the
+ individual words. If DELIMS is NULL, the current value of $IFS is used
+ to split the string, and the function follows the shell field splitting
+ rules. SENTINEL is an index to look for. NWP, if non-NULL,
+ gets the number of words in the returned list. CWP, if non-NULL, gets
+ the index of the word containing SENTINEL. Non-whitespace chars in
+ DELIMS delimit separate fields. */
+WORD_LIST *
+split_at_delims (string, slen, delims, sentinel, flags, nwp, cwp)
+ char *string;
+ int slen;
+ char *delims;
+ int sentinel, flags;
+ int *nwp, *cwp;
+{
+ int ts, te, i, nw, cw, ifs_split, dflags;
+ char *token, *d, *d2;
+ WORD_LIST *ret, *tl;
+
+ if (string == 0 || *string == '\0')
+ {
+ if (nwp)
+ *nwp = 0;
+ if (cwp)
+ *cwp = 0;
+ return ((WORD_LIST *)NULL);
+ }
+
+ d = (delims == 0) ? ifs_value : delims;
+ ifs_split = delims == 0;
+
+ /* Make d2 the non-whitespace characters in delims */
+ d2 = 0;
+ if (delims)
+ {
+ size_t slength;
+#if defined (HANDLE_MULTIBYTE)
+ size_t mblength = 1;
+#endif
+ DECLARE_MBSTATE;
+
+ slength = strlen (delims);
+ d2 = (char *)xmalloc (slength + 1);
+ i = ts = 0;
+ while (delims[i])
+ {
+#if defined (HANDLE_MULTIBYTE)
+ mbstate_t state_bak;
+ state_bak = state;
+ mblength = MBRLEN (delims + i, slength, &state);
+ if (MB_INVALIDCH (mblength))
+ state = state_bak;
+ else if (mblength > 1)
+ {
+ memcpy (d2 + ts, delims + i, mblength);
+ ts += mblength;
+ i += mblength;
+ slength -= mblength;
+ continue;
+ }
+#endif
+ if (whitespace (delims[i]) == 0)
+ d2[ts++] = delims[i];
+
+ i++;
+ slength--;
+ }
+ d2[ts] = '\0';
+ }
+
+ ret = (WORD_LIST *)NULL;
+
+ /* Remove sequences of whitespace characters at the start of the string, as
+ long as those characters are delimiters. */
+ for (i = 0; member (string[i], d) && spctabnl (string[i]); i++)
+ ;
+ if (string[i] == '\0')
+ return (ret);
+
+ ts = i;
+ nw = 0;
+ cw = -1;
+ dflags = flags|SD_NOJMP;
+ while (1)
+ {
+ te = skip_to_delim (string, ts, d, dflags);
+
+ /* If we have a non-whitespace delimiter character, use it to make a
+ separate field. This is just about what $IFS splitting does and
+ is closer to the behavior of the shell parser. */
+ if (ts == te && d2 && member (string[ts], d2))
+ {
+ te = ts + 1;
+ /* If we're using IFS splitting, the non-whitespace delimiter char
+ and any additional IFS whitespace delimits a field. */
+ if (ifs_split)
+ while (member (string[te], d) && spctabnl (string[te]))
+ te++;
+ else
+ while (member (string[te], d2))
+ te++;
+ }
+
+ token = substring (string, ts, te);
+
+ ret = add_string_to_list (token, ret);
+ free (token);
+ nw++;
+
+ if (sentinel >= ts && sentinel <= te)
+ cw = nw;
+
+ /* If the cursor is at whitespace just before word start, set the
+ sentinel word to the current word. */
+ if (cwp && cw == -1 && sentinel == ts-1)
+ cw = nw;
+
+ /* If the cursor is at whitespace between two words, make a new, empty
+ word, add it before (well, after, since the list is in reverse order)
+ the word we just added, and set the current word to that one. */
+ if (cwp && cw == -1 && sentinel < ts)
+ {
+ tl = make_word_list (make_word (""), ret->next);
+ ret->next = tl;
+ cw = nw;
+ nw++;
+ }
+
+ if (string[te] == 0)
+ break;
+
+ i = te;
+ while (member (string[i], d) && (ifs_split || spctabnl(string[i])))
+ i++;
+
+ if (string[i])
+ ts = i;
+ else
+ break;
+ }
+
+ /* Special case for SENTINEL at the end of STRING. If we haven't found
+ the word containing SENTINEL yet, and the index we're looking for is at
+ the end of STRING (or past the end of the previously-found token,
+ possible if the end of the line is composed solely of IFS whitespace)
+ add an additional null argument and set the current word pointer to that. */
+ if (cwp && cw == -1 && (sentinel >= slen || sentinel >= te))
+ {
+ if (whitespace (string[sentinel - 1]))
+ {
+ token = "";
+ ret = add_string_to_list (token, ret);
+ nw++;
+ }
+ cw = nw;
+ }
+
+ if (nwp)
+ *nwp = nw;
+ if (cwp)
+ *cwp = cw;
+
+ return (REVERSE_LIST (ret, WORD_LIST *));
+}
+#endif /* READLINE */
+
+#if 0
+/* UNUSED */
+/* Extract the name of the variable to bind to from the assignment string. */
+char *
+assignment_name (string)
+ char *string;
+{
+ int offset;
+ char *temp;
+
+ offset = assignment (string, 0);
+ if (offset == 0)
+ return (char *)NULL;
+ temp = substring (string, 0, offset);
+ return (temp);
+}
+#endif
+
+/* **************************************************************** */
+/* */
+/* Functions to convert strings to WORD_LISTs and vice versa */
+/* */
+/* **************************************************************** */
+
+/* Return a single string of all the words in LIST. SEP is the separator
+ to put between individual elements of LIST in the output string. */
+char *
+string_list_internal (list, sep)
+ WORD_LIST *list;
+ char *sep;
+{
+ register WORD_LIST *t;
+ char *result, *r;
+ int word_len, sep_len, result_size;
+
+ if (list == 0)
+ return ((char *)NULL);
+
+ /* Short-circuit quickly if we don't need to separate anything. */
+ if (list->next == 0)
+ return (savestring (list->word->word));
+
+ /* This is nearly always called with either sep[0] == 0 or sep[1] == 0. */
+ sep_len = STRLEN (sep);
+ result_size = 0;
+
+ for (t = list; t; t = t->next)
+ {
+ if (t != list)
+ result_size += sep_len;
+ result_size += strlen (t->word->word);
+ }
+
+ r = result = (char *)xmalloc (result_size + 1);
+
+ for (t = list; t; t = t->next)
+ {
+ if (t != list && sep_len)
+ {
+ if (sep_len > 1)
+ {
+ FASTCOPY (sep, r, sep_len);
+ r += sep_len;
+ }
+ else
+ *r++ = sep[0];
+ }
+
+ word_len = strlen (t->word->word);
+ FASTCOPY (t->word->word, r, word_len);
+ r += word_len;
+ }
+
+ *r = '\0';
+ return (result);
+}
+
+/* Return a single string of all the words present in LIST, separating
+ each word with a space. */
+char *
+string_list (list)
+ WORD_LIST *list;
+{
+ return (string_list_internal (list, " "));
+}
+
+/* An external interface that can be used by the rest of the shell to
+ obtain a string containing the first character in $IFS. Handles all
+ the multibyte complications. If LENP is non-null, it is set to the
+ length of the returned string. */
+char *
+ifs_firstchar (lenp)
+ int *lenp;
+{
+ char *ret;
+ int len;
+
+ ret = xmalloc (MB_LEN_MAX + 1);
+#if defined (HANDLE_MULTIBYTE)
+ if (ifs_firstc_len == 1)
+ {
+ ret[0] = ifs_firstc[0];
+ ret[1] = '\0';
+ len = ret[0] ? 1 : 0;
+ }
+ else
+ {
+ memcpy (ret, ifs_firstc, ifs_firstc_len);
+ ret[len = ifs_firstc_len] = '\0';
+ }
+#else
+ ret[0] = ifs_firstc;
+ ret[1] = '\0';
+ len = ret[0] ? 0 : 1;
+#endif
+
+ if (lenp)
+ *lenp = len;
+
+ return ret;
+}
+
+/* Return a single string of all the words present in LIST, obeying the
+ quoting rules for "$*", to wit: (P1003.2, draft 11, 3.5.2) "If the
+ expansion [of $*] appears within a double quoted string, it expands
+ to a single field with the value of each parameter separated by the
+ first character of the IFS variable, or by a <space> if IFS is unset." */
+char *
+string_list_dollar_star (list)
+ WORD_LIST *list;
+{
+ char *ret;
+#if defined (HANDLE_MULTIBYTE)
+# if defined (__GNUC__)
+ char sep[MB_CUR_MAX + 1];
+# else
+ char *sep = 0;
+# endif
+#else
+ char sep[2];
+#endif
+
+#if defined (HANDLE_MULTIBYTE)
+# if !defined (__GNUC__)
+ sep = (char *)xmalloc (MB_CUR_MAX + 1);
+# endif /* !__GNUC__ */
+ if (ifs_firstc_len == 1)
+ {
+ sep[0] = ifs_firstc[0];
+ sep[1] = '\0';
+ }
+ else
+ {
+ memcpy (sep, ifs_firstc, ifs_firstc_len);
+ sep[ifs_firstc_len] = '\0';
+ }
+#else
+ sep[0] = ifs_firstc;
+ sep[1] = '\0';
+#endif
+
+ ret = string_list_internal (list, sep);
+#if defined (HANDLE_MULTIBYTE) && !defined (__GNUC__)
+ free (sep);
+#endif
+ return ret;
+}
+
+/* Turn $@ into a string. If (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ is non-zero, the $@ appears within double quotes, and we should quote
+ the list before converting it into a string. If IFS is unset, and the
+ word is not quoted, we just need to quote CTLESC and CTLNUL characters
+ in the words in the list, because the default value of $IFS is
+ <space><tab><newline>, IFS characters in the words in the list should
+ also be split. If IFS is null, and the word is not quoted, we need
+ to quote the words in the list to preserve the positional parameters
+ exactly. */
+char *
+string_list_dollar_at (list, quoted)
+ WORD_LIST *list;
+ int quoted;
+{
+ char *ifs, *ret;
+#if defined (HANDLE_MULTIBYTE)
+# if defined (__GNUC__)
+ char sep[MB_CUR_MAX + 1];
+# else
+ char *sep = 0;
+# endif /* !__GNUC__ */
+#else
+ char sep[2];
+#endif
+ WORD_LIST *tlist;
+
+ /* XXX this could just be ifs = ifs_value; */
+ ifs = ifs_var ? value_cell (ifs_var) : (char *)0;
+
+#if defined (HANDLE_MULTIBYTE)
+# if !defined (__GNUC__)
+ sep = (char *)xmalloc (MB_CUR_MAX + 1);
+# endif /* !__GNUC__ */
+ if (ifs && *ifs)
+ {
+ if (ifs_firstc_len == 1)
+ {
+ sep[0] = ifs_firstc[0];
+ sep[1] = '\0';
+ }
+ else
+ {
+ memcpy (sep, ifs_firstc, ifs_firstc_len);
+ sep[ifs_firstc_len] = '\0';
+ }
+ }
+ else
+ {
+ sep[0] = ' ';
+ sep[1] = '\0';
+ }
+#else
+ sep[0] = (ifs == 0 || *ifs == 0) ? ' ' : *ifs;
+ sep[1] = '\0';
+#endif
+
+ /* XXX -- why call quote_list if ifs == 0? we can get away without doing
+ it now that quote_escapes quotes spaces */
+#if 0
+ tlist = ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (ifs && *ifs == 0))
+#else
+ tlist = (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES|Q_PATQUOTE))
+#endif
+ ? quote_list (list)
+ : list_quote_escapes (list);
+
+ ret = string_list_internal (tlist, sep);
+#if defined (HANDLE_MULTIBYTE) && !defined (__GNUC__)
+ free (sep);
+#endif
+ return ret;
+}
+
+/* Turn the positional paramters into a string, understanding quoting and
+ the various subtleties of using the first character of $IFS as the
+ separator. Calls string_list_dollar_at, string_list_dollar_star, and
+ string_list as appropriate. */
+char *
+string_list_pos_params (pchar, list, quoted)
+ int pchar;
+ WORD_LIST *list;
+ int quoted;
+{
+ char *ret;
+ WORD_LIST *tlist;
+
+ if (pchar == '*' && (quoted & Q_DOUBLE_QUOTES))
+ {
+ tlist = quote_list (list);
+ word_list_remove_quoted_nulls (tlist);
+ ret = string_list_dollar_star (tlist);
+ }
+ else if (pchar == '*' && (quoted & Q_HERE_DOCUMENT))
+ {
+ tlist = quote_list (list);
+ word_list_remove_quoted_nulls (tlist);
+ ret = string_list (tlist);
+ }
+ else if (pchar == '*')
+ {
+ /* Even when unquoted, string_list_dollar_star does the right thing
+ making sure that the first character of $IFS is used as the
+ separator. */
+ ret = string_list_dollar_star (list);
+ }
+ else if (pchar == '@' && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ /* We use string_list_dollar_at, but only if the string is quoted, since
+ that quotes the escapes if it's not, which we don't want. We could
+ use string_list (the old code did), but that doesn't do the right
+ thing if the first character of $IFS is not a space. We use
+ string_list_dollar_star if the string is unquoted so we make sure that
+ the elements of $@ are separated by the first character of $IFS for
+ later splitting. */
+ ret = string_list_dollar_at (list, quoted);
+ else if (pchar == '@')
+ ret = string_list_dollar_star (list);
+ else
+ ret = string_list ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ? quote_list (list) : list);
+
+ return ret;
+}
+
+/* Return the list of words present in STRING. Separate the string into
+ words at any of the characters found in SEPARATORS. If QUOTED is
+ non-zero then word in the list will have its quoted flag set, otherwise
+ the quoted flag is left as make_word () deemed fit.
+
+ This obeys the P1003.2 word splitting semantics. If `separators' is
+ exactly <space><tab><newline>, then the splitting algorithm is that of
+ the Bourne shell, which treats any sequence of characters from `separators'
+ as a delimiter. If IFS is unset, which results in `separators' being set
+ to "", no splitting occurs. If separators has some other value, the
+ following rules are applied (`IFS white space' means zero or more
+ occurrences of <space>, <tab>, or <newline>, as long as those characters
+ are in `separators'):
+
+ 1) IFS white space is ignored at the start and the end of the
+ string.
+ 2) Each occurrence of a character in `separators' that is not
+ IFS white space, along with any adjacent occurrences of
+ IFS white space delimits a field.
+ 3) Any nonzero-length sequence of IFS white space delimits a field.
+ */
+
+/* BEWARE! list_string strips null arguments. Don't call it twice and
+ expect to have "" preserved! */
+
+/* This performs word splitting and quoted null character removal on
+ STRING. */
+#define issep(c) \
+ (((separators)[0]) ? ((separators)[1] ? isifs(c) \
+ : (c) == (separators)[0]) \
+ : 0)
+
+WORD_LIST *
+list_string (string, separators, quoted)
+ register char *string, *separators;
+ int quoted;
+{
+ WORD_LIST *result;
+ WORD_DESC *t;
+ char *current_word, *s;
+ int sindex, sh_style_split, whitesep, xflags;
+ size_t slen;
+
+ if (!string || !*string)
+ return ((WORD_LIST *)NULL);
+
+ sh_style_split = separators && separators[0] == ' ' &&
+ separators[1] == '\t' &&
+ separators[2] == '\n' &&
+ separators[3] == '\0';
+ for (xflags = 0, s = ifs_value; s && *s; s++)
+ {
+ if (*s == CTLESC) xflags |= SX_NOCTLESC;
+ else if (*s == CTLNUL) xflags |= SX_NOESCCTLNUL;
+ }
+
+ slen = 0;
+ /* Remove sequences of whitespace at the beginning of STRING, as
+ long as those characters appear in IFS. Do not do this if
+ STRING is quoted or if there are no separator characters. */
+ if (!quoted || !separators || !*separators)
+ {
+ for (s = string; *s && spctabnl (*s) && issep (*s); s++);
+
+ if (!*s)
+ return ((WORD_LIST *)NULL);
+
+ string = s;
+ }
+
+ /* OK, now STRING points to a word that does not begin with white space.
+ The splitting algorithm is:
+ extract a word, stopping at a separator
+ skip sequences of spc, tab, or nl as long as they are separators
+ This obeys the field splitting rules in Posix.2. */
+ slen = (MB_CUR_MAX > 1) ? strlen (string) : 1;
+ for (result = (WORD_LIST *)NULL, sindex = 0; string[sindex]; )
+ {
+ /* Don't need string length in ADVANCE_CHAR or string_extract_verbatim
+ unless multibyte chars are possible. */
+ current_word = string_extract_verbatim (string, slen, &sindex, separators, xflags);
+ if (current_word == 0)
+ break;
+
+ /* If we have a quoted empty string, add a quoted null argument. We
+ want to preserve the quoted null character iff this is a quoted
+ empty string; otherwise the quoted null characters are removed
+ below. */
+ if (QUOTED_NULL (current_word))
+ {
+ t = alloc_word_desc ();
+ t->word = make_quoted_char ('\0');
+ t->flags |= W_QUOTED|W_HASQUOTEDNULL;
+ result = make_word_list (t, result);
+ }
+ else if (current_word[0] != '\0')
+ {
+ /* If we have something, then add it regardless. However,
+ perform quoted null character removal on the current word. */
+ remove_quoted_nulls (current_word);
+ result = add_string_to_list (current_word, result);
+ result->word->flags &= ~W_HASQUOTEDNULL; /* just to be sure */
+ if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))
+ result->word->flags |= W_QUOTED;
+ }
+
+ /* If we're not doing sequences of separators in the traditional
+ Bourne shell style, then add a quoted null argument. */
+ else if (!sh_style_split && !spctabnl (string[sindex]))
+ {
+ t = alloc_word_desc ();
+ t->word = make_quoted_char ('\0');
+ t->flags |= W_QUOTED|W_HASQUOTEDNULL;
+ result = make_word_list (t, result);
+ }
+
+ free (current_word);
+
+ /* Note whether or not the separator is IFS whitespace, used later. */
+ whitesep = string[sindex] && spctabnl (string[sindex]);
+
+ /* Move past the current separator character. */
+ if (string[sindex])
+ {
+ DECLARE_MBSTATE;
+ ADVANCE_CHAR (string, slen, sindex);
+ }
+
+ /* Now skip sequences of space, tab, or newline characters if they are
+ in the list of separators. */
+ while (string[sindex] && spctabnl (string[sindex]) && issep (string[sindex]))
+ sindex++;
+
+ /* If the first separator was IFS whitespace and the current character
+ is a non-whitespace IFS character, it should be part of the current
+ field delimiter, not a separate delimiter that would result in an
+ empty field. Look at POSIX.2, 3.6.5, (3)(b). */
+ if (string[sindex] && whitesep && issep (string[sindex]) && !spctabnl (string[sindex]))
+ {
+ sindex++;
+ /* An IFS character that is not IFS white space, along with any
+ adjacent IFS white space, shall delimit a field. (SUSv3) */
+ while (string[sindex] && spctabnl (string[sindex]) && isifs (string[sindex]))
+ sindex++;
+ }
+ }
+ return (REVERSE_LIST (result, WORD_LIST *));
+}
+
+/* Parse a single word from STRING, using SEPARATORS to separate fields.
+ ENDPTR is set to the first character after the word. This is used by
+ the `read' builtin. This is never called with SEPARATORS != $IFS;
+ it should be simplified.
+
+ XXX - this function is very similar to list_string; they should be
+ combined - XXX */
+char *
+get_word_from_string (stringp, separators, endptr)
+ char **stringp, *separators, **endptr;
+{
+ register char *s;
+ char *current_word;
+ int sindex, sh_style_split, whitesep, xflags;
+ size_t slen;
+
+ if (!stringp || !*stringp || !**stringp)
+ return ((char *)NULL);
+
+ sh_style_split = separators && separators[0] == ' ' &&
+ separators[1] == '\t' &&
+ separators[2] == '\n' &&
+ separators[3] == '\0';
+ for (xflags = 0, s = ifs_value; s && *s; s++)
+ {
+ if (*s == CTLESC) xflags |= SX_NOCTLESC;
+ if (*s == CTLNUL) xflags |= SX_NOESCCTLNUL;
+ }
+
+ s = *stringp;
+ slen = 0;
+
+ /* Remove sequences of whitespace at the beginning of STRING, as
+ long as those characters appear in IFS. */
+ if (sh_style_split || !separators || !*separators)
+ {
+ for (; *s && spctabnl (*s) && isifs (*s); s++);
+
+ /* If the string is nothing but whitespace, update it and return. */
+ if (!*s)
+ {
+ *stringp = s;
+ if (endptr)
+ *endptr = s;
+ return ((char *)NULL);
+ }
+ }
+
+ /* OK, S points to a word that does not begin with white space.
+ Now extract a word, stopping at a separator, save a pointer to
+ the first character after the word, then skip sequences of spc,
+ tab, or nl as long as they are separators.
+
+ This obeys the field splitting rules in Posix.2. */
+ sindex = 0;
+ /* Don't need string length in ADVANCE_CHAR or string_extract_verbatim
+ unless multibyte chars are possible. */
+ slen = (MB_CUR_MAX > 1) ? strlen (s) : 1;
+ current_word = string_extract_verbatim (s, slen, &sindex, separators, xflags);
+
+ /* Set ENDPTR to the first character after the end of the word. */
+ if (endptr)
+ *endptr = s + sindex;
+
+ /* Note whether or not the separator is IFS whitespace, used later. */
+ whitesep = s[sindex] && spctabnl (s[sindex]);
+
+ /* Move past the current separator character. */
+ if (s[sindex])
+ {
+ DECLARE_MBSTATE;
+ ADVANCE_CHAR (s, slen, sindex);
+ }
+
+ /* Now skip sequences of space, tab, or newline characters if they are
+ in the list of separators. */
+ while (s[sindex] && spctabnl (s[sindex]) && isifs (s[sindex]))
+ sindex++;
+
+ /* If the first separator was IFS whitespace and the current character is
+ a non-whitespace IFS character, it should be part of the current field
+ delimiter, not a separate delimiter that would result in an empty field.
+ Look at POSIX.2, 3.6.5, (3)(b). */
+ if (s[sindex] && whitesep && isifs (s[sindex]) && !spctabnl (s[sindex]))
+ {
+ sindex++;
+ /* An IFS character that is not IFS white space, along with any adjacent
+ IFS white space, shall delimit a field. */
+ while (s[sindex] && spctabnl (s[sindex]) && isifs (s[sindex]))
+ sindex++;
+ }
+
+ /* Update STRING to point to the next field. */
+ *stringp = s + sindex;
+ return (current_word);
+}
+
+/* Remove IFS white space at the end of STRING. Start at the end
+ of the string and walk backwards until the beginning of the string
+ or we find a character that's not IFS white space and not CTLESC.
+ Only let CTLESC escape a white space character if SAW_ESCAPE is
+ non-zero. */
+char *
+strip_trailing_ifs_whitespace (string, separators, saw_escape)
+ char *string, *separators;
+ int saw_escape;
+{
+ char *s;
+
+ s = string + STRLEN (string) - 1;
+ while (s > string && ((spctabnl (*s) && isifs (*s)) ||
+ (saw_escape && *s == CTLESC && spctabnl (s[1]))))
+ s--;
+ *++s = '\0';
+ return string;
+}
+
+#if 0
+/* UNUSED */
+/* Split STRING into words at whitespace. Obeys shell-style quoting with
+ backslashes, single and double quotes. */
+WORD_LIST *
+list_string_with_quotes (string)
+ char *string;
+{
+ WORD_LIST *list;
+ char *token, *s;
+ size_t s_len;
+ int c, i, tokstart, len;
+
+ for (s = string; s && *s && spctabnl (*s); s++)
+ ;
+ if (s == 0 || *s == 0)
+ return ((WORD_LIST *)NULL);
+
+ s_len = strlen (s);
+ tokstart = i = 0;
+ list = (WORD_LIST *)NULL;
+ while (1)
+ {
+ c = s[i];
+ if (c == '\\')
+ {
+ i++;
+ if (s[i])
+ i++;
+ }
+ else if (c == '\'')
+ i = skip_single_quoted (s, s_len, ++i);
+ else if (c == '"')
+ i = skip_double_quoted (s, s_len, ++i);
+ else if (c == 0 || spctabnl (c))
+ {
+ /* We have found the end of a token. Make a word out of it and
+ add it to the word list. */
+ token = substring (s, tokstart, i);
+ list = add_string_to_list (token, list);
+ free (token);
+ while (spctabnl (s[i]))
+ i++;
+ if (s[i])
+ tokstart = i;
+ else
+ break;
+ }
+ else
+ i++; /* normal character */
+ }
+ return (REVERSE_LIST (list, WORD_LIST *));
+}
+#endif
+
+/********************************************************/
+/* */
+/* Functions to perform assignment statements */
+/* */
+/********************************************************/
+
+#if defined (ARRAY_VARS)
+static SHELL_VAR *
+do_compound_assignment (name, value, flags)
+ char *name, *value;
+ int flags;
+{
+ SHELL_VAR *v;
+ int mklocal, mkassoc;
+ WORD_LIST *list;
+
+ mklocal = flags & ASS_MKLOCAL;
+ mkassoc = flags & ASS_MKASSOC;
+
+ if (mklocal && variable_context)
+ {
+ v = find_variable (name);
+ list = expand_compound_array_assignment (v, value, flags);
+ if (mkassoc)
+ v = make_local_assoc_variable (name);
+ else if (v == 0 || (array_p (v) == 0 && assoc_p (v) == 0) || v->context != variable_context)
+ v = make_local_array_variable (name);
+ assign_compound_array_list (v, list, flags);
+ }
+ else
+ v = assign_array_from_string (name, value, flags);
+
+ return (v);
+}
+#endif
+
+/* Given STRING, an assignment string, get the value of the right side
+ of the `=', and bind it to the left side. If EXPAND is true, then
+ perform parameter expansion, command substitution, and arithmetic
+ expansion on the right-hand side. Perform tilde expansion in any
+ case. Do not perform word splitting on the result of expansion. */
+static int
+do_assignment_internal (word, expand)
+ const WORD_DESC *word;
+ int expand;
+{
+ int offset, tlen, appendop, assign_list, aflags, retval;
+ char *name, *value;
+ SHELL_VAR *entry;
+#if defined (ARRAY_VARS)
+ char *t;
+ int ni;
+#endif
+ const char *string;
+
+ if (word == 0 || word->word == 0)
+ return 0;
+
+ appendop = assign_list = aflags = 0;
+ string = word->word;
+ offset = assignment (string, 0);
+ name = savestring (string);
+ value = (char *)NULL;
+
+ if (name[offset] == '=')
+ {
+ char *temp;
+
+ if (name[offset - 1] == '+')
+ {
+ appendop = 1;
+ name[offset - 1] = '\0';
+ }
+
+ name[offset] = 0; /* might need this set later */
+ temp = name + offset + 1;
+ tlen = STRLEN (temp);
+
+#if defined (ARRAY_VARS)
+ if (expand && (word->flags & W_COMPASSIGN))
+ {
+ assign_list = ni = 1;
+ value = extract_array_assignment_list (temp, &ni);
+ }
+ else
+#endif
+ if (expand && temp[0])
+ value = expand_string_if_necessary (temp, 0, expand_string_assignment);
+ else
+ value = savestring (temp);
+ }
+
+ if (value == 0)
+ {
+ value = (char *)xmalloc (1);
+ value[0] = '\0';
+ }
+
+ if (echo_command_at_execute)
+ {
+ if (appendop)
+ name[offset - 1] = '+';
+ xtrace_print_assignment (name, value, assign_list, 1);
+ if (appendop)
+ name[offset - 1] = '\0';
+ }
+
+#define ASSIGN_RETURN(r) do { FREE (value); free (name); return (r); } while (0)
+
+ if (appendop)
+ aflags |= ASS_APPEND;
+
+#if defined (ARRAY_VARS)
+ if (t = mbschr (name, '[')) /*]*/
+ {
+ if (assign_list)
+ {
+ report_error (_("%s: cannot assign list to array member"), name);
+ ASSIGN_RETURN (0);
+ }
+ entry = assign_array_element (name, value, aflags);
+ if (entry == 0)
+ ASSIGN_RETURN (0);
+ }
+ else if (assign_list)
+ {
+ if (word->flags & W_ASSIGNARG)
+ aflags |= ASS_MKLOCAL;
+ if (word->flags & W_ASSIGNASSOC)
+ aflags |= ASS_MKASSOC;
+ entry = do_compound_assignment (name, value, aflags);
+ }
+ else
+#endif /* ARRAY_VARS */
+ entry = bind_variable (name, value, aflags);
+
+ stupidly_hack_special_variables (name);
+
+#if 1
+ /* Return 1 if the assignment seems to have been performed correctly. */
+ if (entry == 0 || readonly_p (entry))
+ retval = 0; /* assignment failure */
+ else if (noassign_p (entry))
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ retval = 1; /* error status, but not assignment failure */
+ }
+ else
+ retval = 1;
+
+ if (entry && retval != 0 && noassign_p (entry) == 0)
+ VUNSETATTR (entry, att_invisible);
+
+ ASSIGN_RETURN (retval);
+#else
+ if (entry)
+ VUNSETATTR (entry, att_invisible);
+
+ ASSIGN_RETURN (entry ? ((readonly_p (entry) == 0) && noassign_p (entry) == 0) : 0);
+#endif
+}
+
+/* Perform the assignment statement in STRING, and expand the
+ right side by doing tilde, command and parameter expansion. */
+int
+do_assignment (string)
+ char *string;
+{
+ WORD_DESC td;
+
+ td.flags = W_ASSIGNMENT;
+ td.word = string;
+
+ return do_assignment_internal (&td, 1);
+}
+
+int
+do_word_assignment (word)
+ WORD_DESC *word;
+{
+ return do_assignment_internal (word, 1);
+}
+
+/* Given STRING, an assignment string, get the value of the right side
+ of the `=', and bind it to the left side. Do not perform any word
+ expansions on the right hand side. */
+int
+do_assignment_no_expand (string)
+ char *string;
+{
+ WORD_DESC td;
+
+ td.flags = W_ASSIGNMENT;
+ td.word = string;
+
+ return (do_assignment_internal (&td, 0));
+}
+
+/***************************************************
+ * *
+ * Functions to manage the positional parameters *
+ * *
+ ***************************************************/
+
+/* Return the word list that corresponds to `$*'. */
+WORD_LIST *
+list_rest_of_args ()
+{
+ register WORD_LIST *list, *args;
+ int i;
+
+ /* Break out of the loop as soon as one of the dollar variables is null. */
+ for (i = 1, list = (WORD_LIST *)NULL; i < 10 && dollar_vars[i]; i++)
+ list = make_word_list (make_bare_word (dollar_vars[i]), list);
+
+ for (args = rest_of_args; args; args = args->next)
+ list = make_word_list (make_bare_word (args->word->word), list);
+
+ return (REVERSE_LIST (list, WORD_LIST *));
+}
+
+int
+number_of_args ()
+{
+ register WORD_LIST *list;
+ int n;
+
+ for (n = 0; n < 9 && dollar_vars[n+1]; n++)
+ ;
+ for (list = rest_of_args; list; list = list->next)
+ n++;
+ return n;
+}
+
+/* Return the value of a positional parameter. This handles values > 10. */
+char *
+get_dollar_var_value (ind)
+ intmax_t ind;
+{
+ char *temp;
+ WORD_LIST *p;
+
+ if (ind < 10)
+ temp = dollar_vars[ind] ? savestring (dollar_vars[ind]) : (char *)NULL;
+ else /* We want something like ${11} */
+ {
+ ind -= 10;
+ for (p = rest_of_args; p && ind--; p = p->next)
+ ;
+ temp = p ? savestring (p->word->word) : (char *)NULL;
+ }
+ return (temp);
+}
+
+/* Make a single large string out of the dollar digit variables,
+ and the rest_of_args. If DOLLAR_STAR is 1, then obey the special
+ case of "$*" with respect to IFS. */
+char *
+string_rest_of_args (dollar_star)
+ int dollar_star;
+{
+ register WORD_LIST *list;
+ char *string;
+
+ list = list_rest_of_args ();
+ string = dollar_star ? string_list_dollar_star (list) : string_list (list);
+ dispose_words (list);
+ return (string);
+}
+
+/* Return a string containing the positional parameters from START to
+ END, inclusive. If STRING[0] == '*', we obey the rules for $*,
+ which only makes a difference if QUOTED is non-zero. If QUOTED includes
+ Q_HERE_DOCUMENT or Q_DOUBLE_QUOTES, this returns a quoted list, otherwise
+ no quoting chars are added. */
+static char *
+pos_params (string, start, end, quoted)
+ char *string;
+ int start, end, quoted;
+{
+ WORD_LIST *save, *params, *h, *t;
+ char *ret;
+ int i;
+
+ /* see if we can short-circuit. if start == end, we want 0 parameters. */
+ if (start == end)
+ return ((char *)NULL);
+
+ save = params = list_rest_of_args ();
+ if (save == 0)
+ return ((char *)NULL);
+
+ if (start == 0) /* handle ${@:0[:x]} specially */
+ {
+ t = make_word_list (make_word (dollar_vars[0]), params);
+ save = params = t;
+ }
+
+ for (i = start ? 1 : 0; params && i < start; i++)
+ params = params->next;
+ if (params == 0)
+ return ((char *)NULL);
+ for (h = t = params; params && i < end; i++)
+ {
+ t = params;
+ params = params->next;
+ }
+
+ t->next = (WORD_LIST *)NULL;
+
+ ret = string_list_pos_params (string[0], h, quoted);
+
+ if (t != params)
+ t->next = params;
+
+ dispose_words (save);
+ return (ret);
+}
+
+/******************************************************************/
+/* */
+/* Functions to expand strings to strings or WORD_LISTs */
+/* */
+/******************************************************************/
+
+#if defined (PROCESS_SUBSTITUTION)
+#define EXP_CHAR(s) (s == '$' || s == '`' || s == '<' || s == '>' || s == CTLESC || s == '~')
+#else
+#define EXP_CHAR(s) (s == '$' || s == '`' || s == CTLESC || s == '~')
+#endif
+
+/* If there are any characters in STRING that require full expansion,
+ then call FUNC to expand STRING; otherwise just perform quote
+ removal if necessary. This returns a new string. */
+static char *
+expand_string_if_necessary (string, quoted, func)
+ char *string;
+ int quoted;
+ EXPFUNC *func;
+{
+ WORD_LIST *list;
+ size_t slen;
+ int i, saw_quote;
+ char *ret;
+ DECLARE_MBSTATE;
+
+ /* Don't need string length for ADVANCE_CHAR unless multibyte chars possible. */
+ slen = (MB_CUR_MAX > 1) ? strlen (string) : 0;
+ i = saw_quote = 0;
+ while (string[i])
+ {
+ if (EXP_CHAR (string[i]))
+ break;
+ else if (string[i] == '\'' || string[i] == '\\' || string[i] == '"')
+ saw_quote = 1;
+ ADVANCE_CHAR (string, slen, i);
+ }
+
+ if (string[i])
+ {
+ list = (*func) (string, quoted);
+ if (list)
+ {
+ ret = string_list (list);
+ dispose_words (list);
+ }
+ else
+ ret = (char *)NULL;
+ }
+ else if (saw_quote && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0))
+ ret = string_quote_removal (string, quoted);
+ else
+ ret = savestring (string);
+
+ return ret;
+}
+
+static inline char *
+expand_string_to_string_internal (string, quoted, func)
+ char *string;
+ int quoted;
+ EXPFUNC *func;
+{
+ WORD_LIST *list;
+ char *ret;
+
+ if (string == 0 || *string == '\0')
+ return ((char *)NULL);
+
+ list = (*func) (string, quoted);
+ if (list)
+ {
+ ret = string_list (list);
+ dispose_words (list);
+ }
+ else
+ ret = (char *)NULL;
+
+ return (ret);
+}
+
+char *
+expand_string_to_string (string, quoted)
+ char *string;
+ int quoted;
+{
+ return (expand_string_to_string_internal (string, quoted, expand_string));
+}
+
+char *
+expand_string_unsplit_to_string (string, quoted)
+ char *string;
+ int quoted;
+{
+ return (expand_string_to_string_internal (string, quoted, expand_string_unsplit));
+}
+
+char *
+expand_assignment_string_to_string (string, quoted)
+ char *string;
+ int quoted;
+{
+ return (expand_string_to_string_internal (string, quoted, expand_string_assignment));
+}
+
+char *
+expand_arith_string (string, quoted)
+ char *string;
+ int quoted;
+{
+ return (expand_string_if_necessary (string, quoted, expand_string));
+}
+
+#if defined (COND_COMMAND)
+/* Just remove backslashes in STRING. Returns a new string. */
+char *
+remove_backslashes (string)
+ char *string;
+{
+ char *r, *ret, *s;
+
+ r = ret = (char *)xmalloc (strlen (string) + 1);
+ for (s = string; s && *s; )
+ {
+ if (*s == '\\')
+ s++;
+ if (*s == 0)
+ break;
+ *r++ = *s++;
+ }
+ *r = '\0';
+ return ret;
+}
+
+/* This needs better error handling. */
+/* Expand W for use as an argument to a unary or binary operator in a
+ [[...]] expression. If SPECIAL is 1, this is the rhs argument
+ to the != or == operator, and should be treated as a pattern. In
+ this case, we quote the string specially for the globbing code. If
+ SPECIAL is 2, this is an rhs argument for the =~ operator, and should
+ be quoted appropriately for regcomp/regexec. The caller is responsible
+ for removing the backslashes if the unquoted word is needed later. */
+char *
+cond_expand_word (w, special)
+ WORD_DESC *w;
+ int special;
+{
+ char *r, *p;
+ WORD_LIST *l;
+ int qflags;
+
+ if (w->word == 0 || w->word[0] == '\0')
+ return ((char *)NULL);
+
+ w->flags |= W_NOSPLIT2;
+ l = call_expand_word_internal (w, 0, 0, (int *)0, (int *)0);
+ if (l)
+ {
+ if (special == 0)
+ {
+ dequote_list (l);
+ r = string_list (l);
+ }
+ else
+ {
+ qflags = QGLOB_CVTNULL;
+ if (special == 2)
+ qflags |= QGLOB_REGEXP;
+ p = string_list (l);
+ r = quote_string_for_globbing (p, qflags);
+ free (p);
+ }
+ dispose_words (l);
+ }
+ else
+ r = (char *)NULL;
+
+ return r;
+}
+#endif
+
+/* Call expand_word_internal to expand W and handle error returns.
+ A convenience function for functions that don't want to handle
+ any errors or free any memory before aborting. */
+static WORD_LIST *
+call_expand_word_internal (w, q, i, c, e)
+ WORD_DESC *w;
+ int q, i, *c, *e;
+{
+ WORD_LIST *result;
+
+ result = expand_word_internal (w, q, i, c, e);
+ if (result == &expand_word_error || result == &expand_word_fatal)
+ {
+ /* By convention, each time this error is returned, w->word has
+ already been freed (it sometimes may not be in the fatal case,
+ but that doesn't result in a memory leak because we're going
+ to exit in most cases). */
+ w->word = (char *)NULL;
+ last_command_exit_value = EXECUTION_FAILURE;
+ exp_jump_to_top_level ((result == &expand_word_error) ? DISCARD : FORCE_EOF);
+ /* NOTREACHED */
+ }
+ else
+ return (result);
+}
+
+/* Perform parameter expansion, command substitution, and arithmetic
+ expansion on STRING, as if it were a word. Leave the result quoted. */
+static WORD_LIST *
+expand_string_internal (string, quoted)
+ char *string;
+ int quoted;
+{
+ WORD_DESC td;
+ WORD_LIST *tresult;
+
+ if (string == 0 || *string == 0)
+ return ((WORD_LIST *)NULL);
+
+ td.flags = 0;
+ td.word = savestring (string);
+
+ tresult = call_expand_word_internal (&td, quoted, 0, (int *)NULL, (int *)NULL);
+
+ FREE (td.word);
+ return (tresult);
+}
+
+/* Expand STRING by performing parameter expansion, command substitution,
+ and arithmetic expansion. Dequote the resulting WORD_LIST before
+ returning it, but do not perform word splitting. The call to
+ remove_quoted_nulls () is in here because word splitting normally
+ takes care of quote removal. */
+WORD_LIST *
+expand_string_unsplit (string, quoted)
+ char *string;
+ int quoted;
+{
+ WORD_LIST *value;
+
+ if (string == 0 || *string == '\0')
+ return ((WORD_LIST *)NULL);
+
+ expand_no_split_dollar_star = 1;
+ value = expand_string_internal (string, quoted);
+ expand_no_split_dollar_star = 0;
+
+ if (value)
+ {
+ if (value->word)
+ {
+ remove_quoted_nulls (value->word->word);
+ value->word->flags &= ~W_HASQUOTEDNULL;
+ }
+ dequote_list (value);
+ }
+ return (value);
+}
+
+/* Expand the rhs of an assignment statement */
+WORD_LIST *
+expand_string_assignment (string, quoted)
+ char *string;
+ int quoted;
+{
+ WORD_DESC td;
+ WORD_LIST *value;
+
+ if (string == 0 || *string == '\0')
+ return ((WORD_LIST *)NULL);
+
+ expand_no_split_dollar_star = 1;
+
+ td.flags = W_ASSIGNRHS;
+ td.word = savestring (string);
+ value = call_expand_word_internal (&td, quoted, 0, (int *)NULL, (int *)NULL);
+ FREE (td.word);
+
+ expand_no_split_dollar_star = 0;
+
+ if (value)
+ {
+ if (value->word)
+ {
+ remove_quoted_nulls (value->word->word);
+ value->word->flags &= ~W_HASQUOTEDNULL;
+ }
+ dequote_list (value);
+ }
+ return (value);
+}
+
+
+/* Expand one of the PS? prompt strings. This is a sort of combination of
+ expand_string_unsplit and expand_string_internal, but returns the
+ passed string when an error occurs. Might want to trap other calls
+ to jump_to_top_level here so we don't endlessly loop. */
+WORD_LIST *
+expand_prompt_string (string, quoted, wflags)
+ char *string;
+ int quoted;
+ int wflags;
+{
+ WORD_LIST *value;
+ WORD_DESC td;
+
+ if (string == 0 || *string == 0)
+ return ((WORD_LIST *)NULL);
+
+ td.flags = wflags;
+ td.word = savestring (string);
+
+ no_longjmp_on_fatal_error = 1;
+ value = expand_word_internal (&td, quoted, 0, (int *)NULL, (int *)NULL);
+ no_longjmp_on_fatal_error = 0;
+
+ if (value == &expand_word_error || value == &expand_word_fatal)
+ {
+ value = make_word_list (make_bare_word (string), (WORD_LIST *)NULL);
+ return value;
+ }
+ FREE (td.word);
+ if (value)
+ {
+ if (value->word)
+ {
+ remove_quoted_nulls (value->word->word);
+ value->word->flags &= ~W_HASQUOTEDNULL;
+ }
+ dequote_list (value);
+ }
+ return (value);
+}
+
+/* Expand STRING just as if you were expanding a word, but do not dequote
+ the resultant WORD_LIST. This is called only from within this file,
+ and is used to correctly preserve quoted characters when expanding
+ things like ${1+"$@"}. This does parameter expansion, command
+ substitution, arithmetic expansion, and word splitting. */
+static WORD_LIST *
+expand_string_leave_quoted (string, quoted)
+ char *string;
+ int quoted;
+{
+ WORD_LIST *tlist;
+ WORD_LIST *tresult;
+
+ if (string == 0 || *string == '\0')
+ return ((WORD_LIST *)NULL);
+
+ tlist = expand_string_internal (string, quoted);
+
+ if (tlist)
+ {
+ tresult = word_list_split (tlist);
+ dispose_words (tlist);
+ return (tresult);
+ }
+ return ((WORD_LIST *)NULL);
+}
+
+/* This does not perform word splitting or dequote the WORD_LIST
+ it returns. */
+static WORD_LIST *
+expand_string_for_rhs (string, quoted, dollar_at_p, has_dollar_at)
+ char *string;
+ int quoted, *dollar_at_p, *has_dollar_at;
+{
+ WORD_DESC td;
+ WORD_LIST *tresult;
+
+ if (string == 0 || *string == '\0')
+ return (WORD_LIST *)NULL;
+
+ td.flags = 0;
+ td.word = string;
+ tresult = call_expand_word_internal (&td, quoted, 1, dollar_at_p, has_dollar_at);
+ return (tresult);
+}
+
+/* Expand STRING just as if you were expanding a word. This also returns
+ a list of words. Note that filename globbing is *NOT* done for word
+ or string expansion, just when the shell is expanding a command. This
+ does parameter expansion, command substitution, arithmetic expansion,
+ and word splitting. Dequote the resultant WORD_LIST before returning. */
+WORD_LIST *
+expand_string (string, quoted)
+ char *string;
+ int quoted;
+{
+ WORD_LIST *result;
+
+ if (string == 0 || *string == '\0')
+ return ((WORD_LIST *)NULL);
+
+ result = expand_string_leave_quoted (string, quoted);
+ return (result ? dequote_list (result) : result);
+}
+
+/***************************************************
+ * *
+ * Functions to handle quoting chars *
+ * *
+ ***************************************************/
+
+/* Conventions:
+
+ A string with s[0] == CTLNUL && s[1] == 0 is a quoted null string.
+ The parser passes CTLNUL as CTLESC CTLNUL. */
+
+/* Quote escape characters in string s, but no other characters. This is
+ used to protect CTLESC and CTLNUL in variable values from the rest of
+ the word expansion process after the variable is expanded (word splitting
+ and filename generation). If IFS is null, we quote spaces as well, just
+ in case we split on spaces later (in the case of unquoted $@, we will
+ eventually attempt to split the entire word on spaces). Corresponding
+ code exists in dequote_escapes. Even if we don't end up splitting on
+ spaces, quoting spaces is not a problem. This should never be called on
+ a string that is quoted with single or double quotes or part of a here
+ document (effectively double-quoted). */
+char *
+quote_escapes (string)
+ char *string;
+{
+ register char *s, *t;
+ size_t slen;
+ char *result, *send;
+ int quote_spaces, skip_ctlesc, skip_ctlnul;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+ send = string + slen;
+
+ quote_spaces = (ifs_value && *ifs_value == 0);
+
+ for (skip_ctlesc = skip_ctlnul = 0, s = ifs_value; s && *s; s++)
+ skip_ctlesc |= *s == CTLESC, skip_ctlnul |= *s == CTLNUL;
+
+ t = result = (char *)xmalloc ((slen * 2) + 1);
+ s = string;
+
+ while (*s)
+ {
+ if ((skip_ctlesc == 0 && *s == CTLESC) || (skip_ctlnul == 0 && *s == CTLNUL) || (quote_spaces && *s == ' '))
+ *t++ = CTLESC;
+ COPY_CHAR_P (t, s, send);
+ }
+ *t = '\0';
+ return (result);
+}
+
+static WORD_LIST *
+list_quote_escapes (list)
+ WORD_LIST *list;
+{
+ register WORD_LIST *w;
+ char *t;
+
+ for (w = list; w; w = w->next)
+ {
+ t = w->word->word;
+ w->word->word = quote_escapes (t);
+ free (t);
+ }
+ return list;
+}
+
+/* Inverse of quote_escapes; remove CTLESC protecting CTLESC or CTLNUL.
+
+ The parser passes us CTLESC as CTLESC CTLESC and CTLNUL as CTLESC CTLNUL.
+ This is necessary to make unquoted CTLESC and CTLNUL characters in the
+ data stream pass through properly.
+
+ We need to remove doubled CTLESC characters inside quoted strings before
+ quoting the entire string, so we do not double the number of CTLESC
+ characters.
+
+ Also used by parts of the pattern substitution code. */
+char *
+dequote_escapes (string)
+ char *string;
+{
+ register char *s, *t, *s1;
+ size_t slen;
+ char *result, *send;
+ int quote_spaces;
+ DECLARE_MBSTATE;
+
+ if (string == 0)
+ return string;
+
+ slen = strlen (string);
+ send = string + slen;
+
+ t = result = (char *)xmalloc (slen + 1);
+
+ if (strchr (string, CTLESC) == 0)
+ return (strcpy (result, string));
+
+ quote_spaces = (ifs_value && *ifs_value == 0);
+
+ s = string;
+ while (*s)
+ {
+ if (*s == CTLESC && (s[1] == CTLESC || s[1] == CTLNUL || (quote_spaces && s[1] == ' ')))
+ {
+ s++;
+ if (*s == '\0')
+ break;
+ }
+ COPY_CHAR_P (t, s, send);
+ }
+ *t = '\0';
+ return result;
+}
+
+/* Return a new string with the quoted representation of character C.
+ This turns "" into QUOTED_NULL, so the W_HASQUOTEDNULL flag needs to be
+ set in any resultant WORD_DESC where this value is the word. */
+static char *
+make_quoted_char (c)
+ int c;
+{
+ char *temp;
+
+ temp = (char *)xmalloc (3);
+ if (c == 0)
+ {
+ temp[0] = CTLNUL;
+ temp[1] = '\0';
+ }
+ else
+ {
+ temp[0] = CTLESC;
+ temp[1] = c;
+ temp[2] = '\0';
+ }
+ return (temp);
+}
+
+/* Quote STRING, returning a new string. This turns "" into QUOTED_NULL, so
+ the W_HASQUOTEDNULL flag needs to be set in any resultant WORD_DESC where
+ this value is the word. */
+char *
+quote_string (string)
+ char *string;
+{
+ register char *t;
+ size_t slen;
+ char *result, *send;
+
+ if (*string == 0)
+ {
+ result = (char *)xmalloc (2);
+ result[0] = CTLNUL;
+ result[1] = '\0';
+ }
+ else
+ {
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+ send = string + slen;
+
+ result = (char *)xmalloc ((slen * 2) + 1);
+
+ for (t = result; string < send; )
+ {
+ *t++ = CTLESC;
+ COPY_CHAR_P (t, string, send);
+ }
+ *t = '\0';
+ }
+ return (result);
+}
+
+/* De-quote quoted characters in STRING. */
+char *
+dequote_string (string)
+ char *string;
+{
+ register char *s, *t;
+ size_t slen;
+ char *result, *send;
+ DECLARE_MBSTATE;
+
+ slen = strlen (string);
+
+ t = result = (char *)xmalloc (slen + 1);
+
+ if (QUOTED_NULL (string))
+ {
+ result[0] = '\0';
+ return (result);
+ }
+
+ /* If no character in the string can be quoted, don't bother examining
+ each character. Just return a copy of the string passed to us. */
+ if (strchr (string, CTLESC) == NULL)
+ return (strcpy (result, string));
+
+ send = string + slen;
+ s = string;
+ while (*s)
+ {
+ if (*s == CTLESC)
+ {
+ s++;
+ if (*s == '\0')
+ break;
+ }
+ COPY_CHAR_P (t, s, send);
+ }
+
+ *t = '\0';
+ return (result);
+}
+
+/* Quote the entire WORD_LIST list. */
+static WORD_LIST *
+quote_list (list)
+ WORD_LIST *list;
+{
+ register WORD_LIST *w;
+ char *t;
+
+ for (w = list; w; w = w->next)
+ {
+ t = w->word->word;
+ w->word->word = quote_string (t);
+ if (*t == 0)
+ w->word->flags |= W_HASQUOTEDNULL; /* XXX - turn on W_HASQUOTEDNULL here? */
+ w->word->flags |= W_QUOTED;
+ free (t);
+ }
+ return list;
+}
+
+/* De-quote quoted characters in each word in LIST. */
+WORD_LIST *
+dequote_list (list)
+ WORD_LIST *list;
+{
+ register char *s;
+ register WORD_LIST *tlist;
+
+ for (tlist = list; tlist; tlist = tlist->next)
+ {
+ s = dequote_string (tlist->word->word);
+ if (QUOTED_NULL (tlist->word->word))
+ tlist->word->flags &= ~W_HASQUOTEDNULL;
+ free (tlist->word->word);
+ tlist->word->word = s;
+ }
+ return list;
+}
+
+/* Remove CTLESC protecting a CTLESC or CTLNUL in place. Return the passed
+ string. */
+char *
+remove_quoted_escapes (string)
+ char *string;
+{
+ char *t;
+
+ if (string)
+ {
+ t = dequote_escapes (string);
+ strcpy (string, t);
+ free (t);
+ }
+
+ return (string);
+}
+
+/* Perform quoted null character removal on STRING. We don't allow any
+ quoted null characters in the middle or at the ends of strings because
+ of how expand_word_internal works. remove_quoted_nulls () turns
+ STRING into an empty string iff it only consists of a quoted null,
+ and removes all unquoted CTLNUL characters. */
+char *
+remove_quoted_nulls (string)
+ char *string;
+{
+ register size_t slen;
+ register int i, j, prev_i;
+ DECLARE_MBSTATE;
+
+ if (strchr (string, CTLNUL) == 0) /* XXX */
+ return string; /* XXX */
+
+ slen = strlen (string);
+ i = j = 0;
+
+ while (i < slen)
+ {
+ if (string[i] == CTLESC)
+ {
+ /* Old code had j++, but we cannot assume that i == j at this
+ point -- what if a CTLNUL has already been removed from the
+ string? We don't want to drop the CTLESC or recopy characters
+ that we've already copied down. */
+ i++; string[j++] = CTLESC;
+ if (i == slen)
+ break;
+ }
+ else if (string[i] == CTLNUL)
+ i++;
+
+ prev_i = i;
+ ADVANCE_CHAR (string, slen, i);
+ if (j < prev_i)
+ {
+ do string[j++] = string[prev_i++]; while (prev_i < i);
+ }
+ else
+ j = i;
+ }
+ string[j] = '\0';
+
+ return (string);
+}
+
+/* Perform quoted null character removal on each element of LIST.
+ This modifies LIST. */
+void
+word_list_remove_quoted_nulls (list)
+ WORD_LIST *list;
+{
+ register WORD_LIST *t;
+
+ for (t = list; t; t = t->next)
+ {
+ remove_quoted_nulls (t->word->word);
+ t->word->flags &= ~W_HASQUOTEDNULL;
+ }
+}
+
+/* **************************************************************** */
+/* */
+/* Functions for Matching and Removing Patterns */
+/* */
+/* **************************************************************** */
+
+#if defined (HANDLE_MULTIBYTE)
+#if 0 /* Currently unused */
+static unsigned char *
+mb_getcharlens (string, len)
+ char *string;
+ int len;
+{
+ int i, offset, last;
+ unsigned char *ret;
+ char *p;
+ DECLARE_MBSTATE;
+
+ i = offset = 0;
+ last = 0;
+ ret = (unsigned char *)xmalloc (len);
+ memset (ret, 0, len);
+ while (string[last])
+ {
+ ADVANCE_CHAR (string, len, offset);
+ ret[last] = offset - last;
+ last = offset;
+ }
+ return ret;
+}
+#endif
+#endif
+
+/* Remove the portion of PARAM matched by PATTERN according to OP, where OP
+ can have one of 4 values:
+ RP_LONG_LEFT remove longest matching portion at start of PARAM
+ RP_SHORT_LEFT remove shortest matching portion at start of PARAM
+ RP_LONG_RIGHT remove longest matching portion at end of PARAM
+ RP_SHORT_RIGHT remove shortest matching portion at end of PARAM
+*/
+
+#define RP_LONG_LEFT 1
+#define RP_SHORT_LEFT 2
+#define RP_LONG_RIGHT 3
+#define RP_SHORT_RIGHT 4
+
+static char *
+remove_upattern (param, pattern, op)
+ char *param, *pattern;
+ int op;
+{
+ register int len;
+ register char *end;
+ register char *p, *ret, c;
+
+ len = STRLEN (param);
+ end = param + len;
+
+ switch (op)
+ {
+ case RP_LONG_LEFT: /* remove longest match at start */
+ for (p = end; p >= param; p--)
+ {
+ c = *p; *p = '\0';
+ if (strmatch (pattern, param, FNMATCH_EXTFLAG) != FNM_NOMATCH)
+ {
+ *p = c;
+ return (savestring (p));
+ }
+ *p = c;
+
+ }
+ break;
+
+ case RP_SHORT_LEFT: /* remove shortest match at start */
+ for (p = param; p <= end; p++)
+ {
+ c = *p; *p = '\0';
+ if (strmatch (pattern, param, FNMATCH_EXTFLAG) != FNM_NOMATCH)
+ {
+ *p = c;
+ return (savestring (p));
+ }
+ *p = c;
+ }
+ break;
+
+ case RP_LONG_RIGHT: /* remove longest match at end */
+ for (p = param; p <= end; p++)
+ {
+ if (strmatch (pattern, p, FNMATCH_EXTFLAG) != FNM_NOMATCH)
+ {
+ c = *p; *p = '\0';
+ ret = savestring (param);
+ *p = c;
+ return (ret);
+ }
+ }
+ break;
+
+ case RP_SHORT_RIGHT: /* remove shortest match at end */
+ for (p = end; p >= param; p--)
+ {
+ if (strmatch (pattern, p, FNMATCH_EXTFLAG) != FNM_NOMATCH)
+ {
+ c = *p; *p = '\0';
+ ret = savestring (param);
+ *p = c;
+ return (ret);
+ }
+ }
+ break;
+ }
+
+ return (savestring (param)); /* no match, return original string */
+}
+
+#if defined (HANDLE_MULTIBYTE)
+static wchar_t *
+remove_wpattern (wparam, wstrlen, wpattern, op)
+ wchar_t *wparam;
+ size_t wstrlen;
+ wchar_t *wpattern;
+ int op;
+{
+ wchar_t wc, *ret;
+ int n;
+
+ switch (op)
+ {
+ case RP_LONG_LEFT: /* remove longest match at start */
+ for (n = wstrlen; n >= 0; n--)
+ {
+ wc = wparam[n]; wparam[n] = L'\0';
+ if (wcsmatch (wpattern, wparam, FNMATCH_EXTFLAG) != FNM_NOMATCH)
+ {
+ wparam[n] = wc;
+ return (wcsdup (wparam + n));
+ }
+ wparam[n] = wc;
+ }
+ break;
+
+ case RP_SHORT_LEFT: /* remove shortest match at start */
+ for (n = 0; n <= wstrlen; n++)
+ {
+ wc = wparam[n]; wparam[n] = L'\0';
+ if (wcsmatch (wpattern, wparam, FNMATCH_EXTFLAG) != FNM_NOMATCH)
+ {
+ wparam[n] = wc;
+ return (wcsdup (wparam + n));
+ }
+ wparam[n] = wc;
+ }
+ break;
+
+ case RP_LONG_RIGHT: /* remove longest match at end */
+ for (n = 0; n <= wstrlen; n++)
+ {
+ if (wcsmatch (wpattern, wparam + n, FNMATCH_EXTFLAG) != FNM_NOMATCH)
+ {
+ wc = wparam[n]; wparam[n] = L'\0';
+ ret = wcsdup (wparam);
+ wparam[n] = wc;
+ return (ret);
+ }
+ }
+ break;
+
+ case RP_SHORT_RIGHT: /* remove shortest match at end */
+ for (n = wstrlen; n >= 0; n--)
+ {
+ if (wcsmatch (wpattern, wparam + n, FNMATCH_EXTFLAG) != FNM_NOMATCH)
+ {
+ wc = wparam[n]; wparam[n] = L'\0';
+ ret = wcsdup (wparam);
+ wparam[n] = wc;
+ return (ret);
+ }
+ }
+ break;
+ }
+
+ return (wcsdup (wparam)); /* no match, return original string */
+}
+#endif /* HANDLE_MULTIBYTE */
+
+static char *
+remove_pattern (param, pattern, op)
+ char *param, *pattern;
+ int op;
+{
+ if (param == NULL)
+ return (param);
+ if (*param == '\0' || pattern == NULL || *pattern == '\0') /* minor optimization */
+ return (savestring (param));
+
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1)
+ {
+ wchar_t *ret, *oret;
+ size_t n;
+ wchar_t *wparam, *wpattern;
+ mbstate_t ps;
+ char *xret;
+
+ n = xdupmbstowcs (&wpattern, NULL, pattern);
+ if (n == (size_t)-1)
+ return (remove_upattern (param, pattern, op));
+ n = xdupmbstowcs (&wparam, NULL, param);
+ if (n == (size_t)-1)
+ {
+ free (wpattern);
+ return (remove_upattern (param, pattern, op));
+ }
+ oret = ret = remove_wpattern (wparam, n, wpattern, op);
+
+ free (wparam);
+ free (wpattern);
+
+ n = strlen (param);
+ xret = (char *)xmalloc (n + 1);
+ memset (&ps, '\0', sizeof (mbstate_t));
+ n = wcsrtombs (xret, (const wchar_t **)&ret, n, &ps);
+ xret[n] = '\0'; /* just to make sure */
+ free (oret);
+ return xret;
+ }
+ else
+#endif
+ return (remove_upattern (param, pattern, op));
+}
+
+/* Return 1 of the first character of STRING could match the first
+ character of pattern PAT. Used to avoid n2 calls to strmatch(). */
+static int
+match_pattern_char (pat, string)
+ char *pat, *string;
+{
+ char c;
+
+ if (*string == 0)
+ return (0);
+
+ switch (c = *pat++)
+ {
+ default:
+ return (*string == c);
+ case '\\':
+ return (*string == *pat);
+ case '?':
+ return (*pat == LPAREN ? 1 : (*string != '\0'));
+ case '*':
+ return (1);
+ case '+':
+ case '!':
+ case '@':
+ return (*pat == LPAREN ? 1 : (*string == c));
+ case '[':
+ return (*string != '\0');
+ }
+}
+
+/* Match PAT anywhere in STRING and return the match boundaries.
+ This returns 1 in case of a successful match, 0 otherwise. SP
+ and EP are pointers into the string where the match begins and
+ ends, respectively. MTYPE controls what kind of match is attempted.
+ MATCH_BEG and MATCH_END anchor the match at the beginning and end
+ of the string, respectively. The longest match is returned. */
+static int
+match_upattern (string, pat, mtype, sp, ep)
+ char *string, *pat;
+ int mtype;
+ char **sp, **ep;
+{
+ int c, len;
+ register char *p, *p1, *npat;
+ char *end;
+
+ /* If the pattern doesn't match anywhere in the string, go ahead and
+ short-circuit right away. A minor optimization, saves a bunch of
+ unnecessary calls to strmatch (up to N calls for a string of N
+ characters) if the match is unsuccessful. To preserve the semantics
+ of the substring matches below, we make sure that the pattern has
+ `*' as first and last character, making a new pattern if necessary. */
+ /* XXX - check this later if I ever implement `**' with special meaning,
+ since this will potentially result in `**' at the beginning or end */
+ len = STRLEN (pat);
+ if (pat[0] != '*' || (pat[0] == '*' && pat[1] == LPAREN && extended_glob) || pat[len - 1] != '*')
+ {
+ p = npat = (char *)xmalloc (len + 3);
+ p1 = pat;
+ if (*p1 != '*' || (*p1 == '*' && p1[1] == LPAREN && extended_glob))
+ *p++ = '*';
+ while (*p1)
+ *p++ = *p1++;
+ if (p1[-1] != '*' || p[-2] == '\\')
+ *p++ = '*';
+ *p = '\0';
+ }
+ else
+ npat = pat;
+ c = strmatch (npat, string, FNMATCH_EXTFLAG);
+ if (npat != pat)
+ free (npat);
+ if (c == FNM_NOMATCH)
+ return (0);
+
+ len = STRLEN (string);
+ end = string + len;
+
+ switch (mtype)
+ {
+ case MATCH_ANY:
+ for (p = string; p <= end; p++)
+ {
+ if (match_pattern_char (pat, p))
+ {
+ for (p1 = end; p1 >= p; p1--)
+ {
+ c = *p1; *p1 = '\0';
+ if (strmatch (pat, p, FNMATCH_EXTFLAG) == 0)
+ {
+ *p1 = c;
+ *sp = p;
+ *ep = p1;
+ return 1;
+ }
+ *p1 = c;
+ }
+ }
+ }
+
+ return (0);
+
+ case MATCH_BEG:
+ if (match_pattern_char (pat, string) == 0)
+ return (0);
+
+ for (p = end; p >= string; p--)
+ {
+ c = *p; *p = '\0';
+ if (strmatch (pat, string, FNMATCH_EXTFLAG) == 0)
+ {
+ *p = c;
+ *sp = string;
+ *ep = p;
+ return 1;
+ }
+ *p = c;
+ }
+
+ return (0);
+
+ case MATCH_END:
+ for (p = string; p <= end; p++)
+ {
+ if (strmatch (pat, p, FNMATCH_EXTFLAG) == 0)
+ {
+ *sp = p;
+ *ep = end;
+ return 1;
+ }
+
+ }
+
+ return (0);
+ }
+
+ return (0);
+}
+
+#if defined (HANDLE_MULTIBYTE)
+/* Return 1 of the first character of WSTRING could match the first
+ character of pattern WPAT. Wide character version. */
+static int
+match_pattern_wchar (wpat, wstring)
+ wchar_t *wpat, *wstring;
+{
+ wchar_t wc;
+
+ if (*wstring == 0)
+ return (0);
+
+ switch (wc = *wpat++)
+ {
+ default:
+ return (*wstring == wc);
+ case L'\\':
+ return (*wstring == *wpat);
+ case L'?':
+ return (*wpat == LPAREN ? 1 : (*wstring != L'\0'));
+ case L'*':
+ return (1);
+ case L'+':
+ case L'!':
+ case L'@':
+ return (*wpat == LPAREN ? 1 : (*wstring == wc));
+ case L'[':
+ return (*wstring != L'\0');
+ }
+}
+
+/* Match WPAT anywhere in WSTRING and return the match boundaries.
+ This returns 1 in case of a successful match, 0 otherwise. Wide
+ character version. */
+static int
+match_wpattern (wstring, indices, wstrlen, wpat, mtype, sp, ep)
+ wchar_t *wstring;
+ char **indices;
+ size_t wstrlen;
+ wchar_t *wpat;
+ int mtype;
+ char **sp, **ep;
+{
+ wchar_t wc, *wp, *nwpat, *wp1;
+ int len;
+#if 0
+ size_t n, n1; /* Apple's gcc seems to miscompile this badly */
+#else
+ int n, n1;
+#endif
+
+ /* If the pattern doesn't match anywhere in the string, go ahead and
+ short-circuit right away. A minor optimization, saves a bunch of
+ unnecessary calls to strmatch (up to N calls for a string of N
+ characters) if the match is unsuccessful. To preserve the semantics
+ of the substring matches below, we make sure that the pattern has
+ `*' as first and last character, making a new pattern if necessary. */
+ /* XXX - check this later if I ever implement `**' with special meaning,
+ since this will potentially result in `**' at the beginning or end */
+ len = wcslen (wpat);
+ if (wpat[0] != L'*' || (wpat[0] == L'*' && wpat[1] == WLPAREN && extended_glob) || wpat[len - 1] != L'*')
+ {
+ wp = nwpat = (wchar_t *)xmalloc ((len + 3) * sizeof (wchar_t));
+ wp1 = wpat;
+ if (*wp1 != L'*' || (*wp1 == '*' && wp1[1] == WLPAREN && extended_glob))
+ *wp++ = L'*';
+ while (*wp1 != L'\0')
+ *wp++ = *wp1++;
+ if (wp1[-1] != L'*' || wp1[-2] == L'\\')
+ *wp++ = L'*';
+ *wp = '\0';
+ }
+ else
+ nwpat = wpat;
+ len = wcsmatch (nwpat, wstring, FNMATCH_EXTFLAG);
+ if (nwpat != wpat)
+ free (nwpat);
+ if (len == FNM_NOMATCH)
+ return (0);
+
+ switch (mtype)
+ {
+ case MATCH_ANY:
+ for (n = 0; n <= wstrlen; n++)
+ {
+ if (match_pattern_wchar (wpat, wstring + n))
+ {
+ for (n1 = wstrlen; n1 >= n; n1--)
+ {
+ wc = wstring[n1]; wstring[n1] = L'\0';
+ if (wcsmatch (wpat, wstring + n, FNMATCH_EXTFLAG) == 0)
+ {
+ wstring[n1] = wc;
+ *sp = indices[n];
+ *ep = indices[n1];
+ return 1;
+ }
+ wstring[n1] = wc;
+ }
+ }
+ }
+
+ return (0);
+
+ case MATCH_BEG:
+ if (match_pattern_wchar (wpat, wstring) == 0)
+ return (0);
+
+ for (n = wstrlen; n >= 0; n--)
+ {
+ wc = wstring[n]; wstring[n] = L'\0';
+ if (wcsmatch (wpat, wstring, FNMATCH_EXTFLAG) == 0)
+ {
+ wstring[n] = wc;
+ *sp = indices[0];
+ *ep = indices[n];
+ return 1;
+ }
+ wstring[n] = wc;
+ }
+
+ return (0);
+
+ case MATCH_END:
+ for (n = 0; n <= wstrlen; n++)
+ {
+ if (wcsmatch (wpat, wstring + n, FNMATCH_EXTFLAG) == 0)
+ {
+ *sp = indices[n];
+ *ep = indices[wstrlen];
+ return 1;
+ }
+ }
+
+ return (0);
+ }
+
+ return (0);
+}
+#endif /* HANDLE_MULTIBYTE */
+
+static int
+match_pattern (string, pat, mtype, sp, ep)
+ char *string, *pat;
+ int mtype;
+ char **sp, **ep;
+{
+#if defined (HANDLE_MULTIBYTE)
+ int ret;
+ size_t n;
+ wchar_t *wstring, *wpat;
+ char **indices;
+#endif
+
+ if (string == 0 || *string == 0 || pat == 0 || *pat == 0)
+ return (0);
+
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1)
+ {
+ n = xdupmbstowcs (&wpat, NULL, pat);
+ if (n == (size_t)-1)
+ return (match_upattern (string, pat, mtype, sp, ep));
+ n = xdupmbstowcs (&wstring, &indices, string);
+ if (n == (size_t)-1)
+ {
+ free (wpat);
+ return (match_upattern (string, pat, mtype, sp, ep));
+ }
+ ret = match_wpattern (wstring, indices, n, wpat, mtype, sp, ep);
+
+ free (wpat);
+ free (wstring);
+ free (indices);
+
+ return (ret);
+ }
+ else
+#endif
+ return (match_upattern (string, pat, mtype, sp, ep));
+}
+
+static int
+getpatspec (c, value)
+ int c;
+ char *value;
+{
+ if (c == '#')
+ return ((*value == '#') ? RP_LONG_LEFT : RP_SHORT_LEFT);
+ else /* c == '%' */
+ return ((*value == '%') ? RP_LONG_RIGHT : RP_SHORT_RIGHT);
+}
+
+/* Posix.2 says that the WORD should be run through tilde expansion,
+ parameter expansion, command substitution and arithmetic expansion.
+ This leaves the result quoted, so quote_string_for_globbing () has
+ to be called to fix it up for strmatch (). If QUOTED is non-zero,
+ it means that the entire expression was enclosed in double quotes.
+ This means that quoting characters in the pattern do not make any
+ special pattern characters quoted. For example, the `*' in the
+ following retains its special meaning: "${foo#'*'}". */
+static char *
+getpattern (value, quoted, expandpat)
+ char *value;
+ int quoted, expandpat;
+{
+ char *pat, *tword;
+ WORD_LIST *l;
+#if 0
+ int i;
+#endif
+ /* There is a problem here: how to handle single or double quotes in the
+ pattern string when the whole expression is between double quotes?
+ POSIX.2 says that enclosing double quotes do not cause the pattern to
+ be quoted, but does that leave us a problem with @ and array[@] and their
+ expansions inside a pattern? */
+#if 0
+ if (expandpat && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && *tword)
+ {
+ i = 0;
+ pat = string_extract_double_quoted (tword, &i, 1);
+ free (tword);
+ tword = pat;
+ }
+#endif
+
+ /* expand_string_for_rhs () leaves WORD quoted and does not perform
+ word splitting. */
+ l = *value ? expand_string_for_rhs (value,
+ (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) ? Q_PATQUOTE : quoted,
+ (int *)NULL, (int *)NULL)
+ : (WORD_LIST *)0;
+ pat = string_list (l);
+ dispose_words (l);
+ if (pat)
+ {
+ tword = quote_string_for_globbing (pat, QGLOB_CVTNULL);
+ free (pat);
+ pat = tword;
+ }
+ return (pat);
+}
+
+#if 0
+/* Handle removing a pattern from a string as a result of ${name%[%]value}
+ or ${name#[#]value}. */
+static char *
+variable_remove_pattern (value, pattern, patspec, quoted)
+ char *value, *pattern;
+ int patspec, quoted;
+{
+ char *tword;
+
+ tword = remove_pattern (value, pattern, patspec);
+
+ return (tword);
+}
+#endif
+
+static char *
+list_remove_pattern (list, pattern, patspec, itype, quoted)
+ WORD_LIST *list;
+ char *pattern;
+ int patspec, itype, quoted;
+{
+ WORD_LIST *new, *l;
+ WORD_DESC *w;
+ char *tword;
+
+ for (new = (WORD_LIST *)NULL, l = list; l; l = l->next)
+ {
+ tword = remove_pattern (l->word->word, pattern, patspec);
+ w = alloc_word_desc ();
+ w->word = tword ? tword : savestring ("");
+ new = make_word_list (w, new);
+ }
+
+ l = REVERSE_LIST (new, WORD_LIST *);
+ tword = string_list_pos_params (itype, l, quoted);
+ dispose_words (l);
+
+ return (tword);
+}
+
+static char *
+parameter_list_remove_pattern (itype, pattern, patspec, quoted)
+ int itype;
+ char *pattern;
+ int patspec, quoted;
+{
+ char *ret;
+ WORD_LIST *list;
+
+ list = list_rest_of_args ();
+ if (list == 0)
+ return ((char *)NULL);
+ ret = list_remove_pattern (list, pattern, patspec, itype, quoted);
+ dispose_words (list);
+ return (ret);
+}
+
+#if defined (ARRAY_VARS)
+static char *
+array_remove_pattern (var, pattern, patspec, varname, quoted)
+ SHELL_VAR *var;
+ char *pattern;
+ int patspec;
+ char *varname; /* so we can figure out how it's indexed */
+ int quoted;
+{
+ ARRAY *a;
+ HASH_TABLE *h;
+ int itype;
+ char *ret;
+ WORD_LIST *list;
+ SHELL_VAR *v;
+
+ /* compute itype from varname here */
+ v = array_variable_part (varname, &ret, 0);
+ itype = ret[0];
+
+ a = (v && array_p (v)) ? array_cell (v) : 0;
+ h = (v && assoc_p (v)) ? assoc_cell (v) : 0;
+
+ list = a ? array_to_word_list (a) : (h ? assoc_to_word_list (h) : 0);
+ if (list == 0)
+ return ((char *)NULL);
+ ret = list_remove_pattern (list, pattern, patspec, itype, quoted);
+ dispose_words (list);
+
+ return ret;
+}
+#endif /* ARRAY_VARS */
+
+static char *
+parameter_brace_remove_pattern (varname, value, patstr, rtype, quoted)
+ char *varname, *value, *patstr;
+ int rtype, quoted;
+{
+ int vtype, patspec, starsub;
+ char *temp1, *val, *pattern;
+ SHELL_VAR *v;
+
+ if (value == 0)
+ return ((char *)NULL);
+
+ this_command_name = varname;
+
+ vtype = get_var_and_type (varname, value, quoted, &v, &val);
+ if (vtype == -1)
+ return ((char *)NULL);
+
+ starsub = vtype & VT_STARSUB;
+ vtype &= ~VT_STARSUB;
+
+ patspec = getpatspec (rtype, patstr);
+ if (patspec == RP_LONG_LEFT || patspec == RP_LONG_RIGHT)
+ patstr++;
+
+ /* Need to pass getpattern newly-allocated memory in case of expansion --
+ the expansion code will free the passed string on an error. */
+ temp1 = savestring (patstr);
+ pattern = getpattern (temp1, quoted, 1);
+ free (temp1);
+
+ temp1 = (char *)NULL; /* shut up gcc */
+ switch (vtype)
+ {
+ case VT_VARIABLE:
+ case VT_ARRAYMEMBER:
+ temp1 = remove_pattern (val, pattern, patspec);
+ if (vtype == VT_VARIABLE)
+ FREE (val);
+ if (temp1)
+ {
+ val = (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ ? quote_string (temp1)
+ : quote_escapes (temp1);
+ free (temp1);
+ temp1 = val;
+ }
+ break;
+#if defined (ARRAY_VARS)
+ case VT_ARRAYVAR:
+ temp1 = array_remove_pattern (v, pattern, patspec, varname, quoted);
+ if (temp1 && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0))
+ {
+ val = quote_escapes (temp1);
+ free (temp1);
+ temp1 = val;
+ }
+ break;
+#endif
+ case VT_POSPARMS:
+ temp1 = parameter_list_remove_pattern (varname[0], pattern, patspec, quoted);
+ if (temp1 && ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) == 0))
+ {
+ val = quote_escapes (temp1);
+ free (temp1);
+ temp1 = val;
+ }
+ break;
+ }
+
+ FREE (pattern);
+ return temp1;
+}
+
+/*******************************************
+ * *
+ * Functions to expand WORD_DESCs *
+ * *
+ *******************************************/
+
+/* Expand WORD, performing word splitting on the result. This does
+ parameter expansion, command substitution, arithmetic expansion,
+ word splitting, and quote removal. */
+
+WORD_LIST *
+expand_word (word, quoted)
+ WORD_DESC *word;
+ int quoted;
+{
+ WORD_LIST *result, *tresult;
+
+ tresult = call_expand_word_internal (word, quoted, 0, (int *)NULL, (int *)NULL);
+ result = word_list_split (tresult);
+ dispose_words (tresult);
+ return (result ? dequote_list (result) : result);
+}
+
+/* Expand WORD, but do not perform word splitting on the result. This
+ does parameter expansion, command substitution, arithmetic expansion,
+ and quote removal. */
+WORD_LIST *
+expand_word_unsplit (word, quoted)
+ WORD_DESC *word;
+ int quoted;
+{
+ WORD_LIST *result;
+
+ expand_no_split_dollar_star = 1;
+#if defined (HANDLE_MULTIBYTE)
+ if (ifs_firstc[0] == 0)
+#else
+ if (ifs_firstc == 0)
+#endif
+ word->flags |= W_NOSPLIT;
+ result = call_expand_word_internal (word, quoted, 0, (int *)NULL, (int *)NULL);
+ expand_no_split_dollar_star = 0;
+
+ return (result ? dequote_list (result) : result);
+}
+
+/* Perform shell expansions on WORD, but do not perform word splitting or
+ quote removal on the result. Virtually identical to expand_word_unsplit;
+ could be combined if implementations don't diverge. */
+WORD_LIST *
+expand_word_leave_quoted (word, quoted)
+ WORD_DESC *word;
+ int quoted;
+{
+ WORD_LIST *result;
+
+ expand_no_split_dollar_star = 1;
+#if defined (HANDLE_MULTIBYTE)
+ if (ifs_firstc[0] == 0)
+#else
+ if (ifs_firstc == 0)
+#endif
+ word->flags |= W_NOSPLIT;
+ word->flags |= W_NOSPLIT2;
+ result = call_expand_word_internal (word, quoted, 0, (int *)NULL, (int *)NULL);
+ expand_no_split_dollar_star = 0;
+
+ return result;
+}
+
+#if defined (PROCESS_SUBSTITUTION)
+
+/*****************************************************************/
+/* */
+/* Hacking Process Substitution */
+/* */
+/*****************************************************************/
+
+#if !defined (HAVE_DEV_FD)
+/* Named pipes must be removed explicitly with `unlink'. This keeps a list
+ of FIFOs the shell has open. unlink_fifo_list will walk the list and
+ unlink all of them. add_fifo_list adds the name of an open FIFO to the
+ list. NFIFO is a count of the number of FIFOs in the list. */
+#define FIFO_INCR 20
+
+struct temp_fifo {
+ char *file;
+ pid_t proc;
+};
+
+static struct temp_fifo *fifo_list = (struct temp_fifo *)NULL;
+static int nfifo;
+static int fifo_list_size;
+
+static void
+add_fifo_list (pathname)
+ char *pathname;
+{
+ if (nfifo >= fifo_list_size - 1)
+ {
+ fifo_list_size += FIFO_INCR;
+ fifo_list = (struct temp_fifo *)xrealloc (fifo_list,
+ fifo_list_size * sizeof (struct temp_fifo));
+ }
+
+ fifo_list[nfifo].file = savestring (pathname);
+ nfifo++;
+}
+
+void
+unlink_fifo_list ()
+{
+ int saved, i, j;
+
+ if (nfifo == 0)
+ return;
+
+ for (i = saved = 0; i < nfifo; i++)
+ {
+ if ((fifo_list[i].proc == -1) || (kill(fifo_list[i].proc, 0) == -1))
+ {
+ unlink (fifo_list[i].file);
+ free (fifo_list[i].file);
+ fifo_list[i].file = (char *)NULL;
+ fifo_list[i].proc = -1;
+ }
+ else
+ saved++;
+ }
+
+ /* If we didn't remove some of the FIFOs, compact the list. */
+ if (saved)
+ {
+ for (i = j = 0; i < nfifo; i++)
+ if (fifo_list[i].file)
+ {
+ fifo_list[j].file = fifo_list[i].file;
+ fifo_list[j].proc = fifo_list[i].proc;
+ j++;
+ }
+ nfifo = j;
+ }
+ else
+ nfifo = 0;
+}
+
+int
+fifos_pending ()
+{
+ return nfifo;
+}
+
+static char *
+make_named_pipe ()
+{
+ char *tname;
+
+ tname = sh_mktmpname ("sh-np", MT_USERANDOM|MT_USETMPDIR);
+ if (mkfifo (tname, 0600) < 0)
+ {
+ free (tname);
+ return ((char *)NULL);
+ }
+
+ add_fifo_list (tname);
+ return (tname);
+}
+
+#else /* HAVE_DEV_FD */
+
+/* DEV_FD_LIST is a bitmap of file descriptors attached to pipes the shell
+ has open to children. NFDS is a count of the number of bits currently
+ set in DEV_FD_LIST. TOTFDS is a count of the highest possible number
+ of open files. */
+static char *dev_fd_list = (char *)NULL;
+static int nfds;
+static int totfds; /* The highest possible number of open files. */
+
+static void
+add_fifo_list (fd)
+ int fd;
+{
+ if (!dev_fd_list || fd >= totfds)
+ {
+ int ofds;
+
+ ofds = totfds;
+ totfds = getdtablesize ();
+ if (totfds < 0 || totfds > 256)
+ totfds = 256;
+ if (fd >= totfds)
+ totfds = fd + 2;
+
+ dev_fd_list = (char *)xrealloc (dev_fd_list, totfds);
+ memset (dev_fd_list + ofds, '\0', totfds - ofds);
+ }
+
+ dev_fd_list[fd] = 1;
+ nfds++;
+}
+
+int
+fifos_pending ()
+{
+ return 0; /* used for cleanup; not needed with /dev/fd */
+}
+
+void
+unlink_fifo_list ()
+{
+ register int i;
+
+ if (nfds == 0)
+ return;
+
+ for (i = 0; nfds && i < totfds; i++)
+ if (dev_fd_list[i])
+ {
+ close (i);
+ dev_fd_list[i] = 0;
+ nfds--;
+ }
+
+ nfds = 0;
+}
+
+#if defined (NOTDEF)
+print_dev_fd_list ()
+{
+ register int i;
+
+ fprintf (stderr, "pid %ld: dev_fd_list:", (long)getpid ());
+ fflush (stderr);
+
+ for (i = 0; i < totfds; i++)
+ {
+ if (dev_fd_list[i])
+ fprintf (stderr, " %d", i);
+ }
+ fprintf (stderr, "\n");
+}
+#endif /* NOTDEF */
+
+static char *
+make_dev_fd_filename (fd)
+ int fd;
+{
+ char *ret, intbuf[INT_STRLEN_BOUND (int) + 1], *p;
+
+ ret = (char *)xmalloc (sizeof (DEV_FD_PREFIX) + 8);
+
+ strcpy (ret, DEV_FD_PREFIX);
+ p = inttostr (fd, intbuf, sizeof (intbuf));
+ strcpy (ret + sizeof (DEV_FD_PREFIX) - 1, p);
+
+ add_fifo_list (fd);
+ return (ret);
+}
+
+#endif /* HAVE_DEV_FD */
+
+/* Return a filename that will open a connection to the process defined by
+ executing STRING. HAVE_DEV_FD, if defined, means open a pipe and return
+ a filename in /dev/fd corresponding to a descriptor that is one of the
+ ends of the pipe. If not defined, we use named pipes on systems that have
+ them. Systems without /dev/fd and named pipes are out of luck.
+
+ OPEN_FOR_READ_IN_CHILD, if 1, means open the named pipe for reading or
+ use the read end of the pipe and dup that file descriptor to fd 0 in
+ the child. If OPEN_FOR_READ_IN_CHILD is 0, we open the named pipe for
+ writing or use the write end of the pipe in the child, and dup that
+ file descriptor to fd 1 in the child. The parent does the opposite. */
+
+static char *
+process_substitute (string, open_for_read_in_child)
+ char *string;
+ int open_for_read_in_child;
+{
+ char *pathname;
+ int fd, result;
+ pid_t old_pid, pid;
+#if defined (HAVE_DEV_FD)
+ int parent_pipe_fd, child_pipe_fd;
+ int fildes[2];
+#endif /* HAVE_DEV_FD */
+#if defined (JOB_CONTROL)
+ pid_t old_pipeline_pgrp;
+#endif
+
+ if (!string || !*string || wordexp_only)
+ return ((char *)NULL);
+
+#if !defined (HAVE_DEV_FD)
+ pathname = make_named_pipe ();
+#else /* HAVE_DEV_FD */
+ if (pipe (fildes) < 0)
+ {
+ sys_error (_("cannot make pipe for process substitution"));
+ return ((char *)NULL);
+ }
+ /* If OPEN_FOR_READ_IN_CHILD == 1, we want to use the write end of
+ the pipe in the parent, otherwise the read end. */
+ parent_pipe_fd = fildes[open_for_read_in_child];
+ child_pipe_fd = fildes[1 - open_for_read_in_child];
+ /* Move the parent end of the pipe to some high file descriptor, to
+ avoid clashes with FDs used by the script. */
+ parent_pipe_fd = move_to_high_fd (parent_pipe_fd, 1, 64);
+
+ pathname = make_dev_fd_filename (parent_pipe_fd);
+#endif /* HAVE_DEV_FD */
+
+ if (pathname == 0)
+ {
+ sys_error (_("cannot make pipe for process substitution"));
+ return ((char *)NULL);
+ }
+
+ old_pid = last_made_pid;
+
+#if defined (JOB_CONTROL)
+ old_pipeline_pgrp = pipeline_pgrp;
+ pipeline_pgrp = shell_pgrp;
+ save_pipeline (1);
+#endif /* JOB_CONTROL */
+
+ pid = make_child ((char *)NULL, 1);
+ if (pid == 0)
+ {
+ reset_terminating_signals (); /* XXX */
+ free_pushed_string_input ();
+ /* Cancel traps, in trap.c. */
+ restore_original_signals ();
+ setup_async_signals ();
+ subshell_environment |= SUBSHELL_COMSUB|SUBSHELL_PROCSUB;
+ }
+
+#if defined (JOB_CONTROL)
+ set_sigchld_handler ();
+ stop_making_children ();
+ /* XXX - should we only do this in the parent? (as in command subst) */
+ pipeline_pgrp = old_pipeline_pgrp;
+#endif /* JOB_CONTROL */
+
+ if (pid < 0)
+ {
+ sys_error (_("cannot make child for process substitution"));
+ free (pathname);
+#if defined (HAVE_DEV_FD)
+ close (parent_pipe_fd);
+ close (child_pipe_fd);
+#endif /* HAVE_DEV_FD */
+ return ((char *)NULL);
+ }
+
+ if (pid > 0)
+ {
+#if defined (JOB_CONTROL)
+ restore_pipeline (1);
+#endif
+
+#if !defined (HAVE_DEV_FD)
+ fifo_list[nfifo-1].proc = pid;
+#endif
+
+ last_made_pid = old_pid;
+
+#if defined (JOB_CONTROL) && defined (PGRP_PIPE)
+ close_pgrp_pipe ();
+#endif /* JOB_CONTROL && PGRP_PIPE */
+
+#if defined (HAVE_DEV_FD)
+ close (child_pipe_fd);
+#endif /* HAVE_DEV_FD */
+
+ return (pathname);
+ }
+
+ set_sigint_handler ();
+
+#if defined (JOB_CONTROL)
+ set_job_control (0);
+#endif /* JOB_CONTROL */
+
+#if !defined (HAVE_DEV_FD)
+ /* Open the named pipe in the child. */
+ fd = open (pathname, open_for_read_in_child ? O_RDONLY|O_NONBLOCK : O_WRONLY);
+ if (fd < 0)
+ {
+ /* Two separate strings for ease of translation. */
+ if (open_for_read_in_child)
+ sys_error (_("cannot open named pipe %s for reading"), pathname);
+ else
+ sys_error (_("cannot open named pipe %s for writing"), pathname);
+
+ exit (127);
+ }
+ if (open_for_read_in_child)
+ {
+ if (sh_unset_nodelay_mode (fd) < 0)
+ {
+ sys_error (_("cannot reset nodelay mode for fd %d"), fd);
+ exit (127);
+ }
+ }
+#else /* HAVE_DEV_FD */
+ fd = child_pipe_fd;
+#endif /* HAVE_DEV_FD */
+
+ if (dup2 (fd, open_for_read_in_child ? 0 : 1) < 0)
+ {
+ sys_error (_("cannot duplicate named pipe %s as fd %d"), pathname,
+ open_for_read_in_child ? 0 : 1);
+ exit (127);
+ }
+
+ if (fd != (open_for_read_in_child ? 0 : 1))
+ close (fd);
+
+ /* Need to close any files that this process has open to pipes inherited
+ from its parent. */
+ if (current_fds_to_close)
+ {
+ close_fd_bitmap (current_fds_to_close);
+ current_fds_to_close = (struct fd_bitmap *)NULL;
+ }
+
+#if defined (HAVE_DEV_FD)
+ /* Make sure we close the parent's end of the pipe and clear the slot
+ in the fd list so it is not closed later, if reallocated by, for
+ instance, pipe(2). */
+ close (parent_pipe_fd);
+ dev_fd_list[parent_pipe_fd] = 0;
+#endif /* HAVE_DEV_FD */
+
+ result = parse_and_execute (string, "process substitution", (SEVAL_NONINT|SEVAL_NOHIST));
+
+#if !defined (HAVE_DEV_FD)
+ /* Make sure we close the named pipe in the child before we exit. */
+ close (open_for_read_in_child ? 0 : 1);
+#endif /* !HAVE_DEV_FD */
+
+ exit (result);
+ /*NOTREACHED*/
+}
+#endif /* PROCESS_SUBSTITUTION */
+
+/***********************************/
+/* */
+/* Command Substitution */
+/* */
+/***********************************/
+
+static char *
+read_comsub (fd, quoted, rflag)
+ int fd, quoted;
+ int *rflag;
+{
+ char *istring, buf[128], *bufp, *s;
+ int istring_index, istring_size, c, tflag, skip_ctlesc, skip_ctlnul;
+ ssize_t bufn;
+
+ istring = (char *)NULL;
+ istring_index = istring_size = bufn = tflag = 0;
+
+ for (skip_ctlesc = skip_ctlnul = 0, s = ifs_value; s && *s; s++)
+ skip_ctlesc |= *s == CTLESC, skip_ctlnul |= *s == CTLNUL;
+
+#ifdef __CYGWIN__
+ setmode (fd, O_TEXT); /* we don't want CR/LF, we want Unix-style */
+#endif
+
+ /* Read the output of the command through the pipe. This may need to be
+ changed to understand multibyte characters in the future. */
+ while (1)
+ {
+ if (fd < 0)
+ break;
+ if (--bufn <= 0)
+ {
+ bufn = zread (fd, buf, sizeof (buf));
+ if (bufn <= 0)
+ break;
+ bufp = buf;
+ }
+ c = *bufp++;
+
+ if (c == 0)
+ {
+#if 0
+ internal_warning ("read_comsub: ignored null byte in input");
+#endif
+ continue;
+ }
+
+ /* Add the character to ISTRING, possibly after resizing it. */
+ RESIZE_MALLOCED_BUFFER (istring, istring_index, 2, istring_size, DEFAULT_ARRAY_SIZE);
+
+ /* This is essentially quote_string inline */
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) /* || c == CTLESC || c == CTLNUL */)
+ istring[istring_index++] = CTLESC;
+ /* Escape CTLESC and CTLNUL in the output to protect those characters
+ from the rest of the word expansions (word splitting and globbing.)
+ This is essentially quote_escapes inline. */
+ else if (skip_ctlesc == 0 && c == CTLESC)
+ {
+ tflag |= W_HASCTLESC;
+ istring[istring_index++] = CTLESC;
+ }
+ else if ((skip_ctlnul == 0 && c == CTLNUL) || (c == ' ' && (ifs_value && *ifs_value == 0)))
+ istring[istring_index++] = CTLESC;
+
+ istring[istring_index++] = c;
+
+#if 0
+#if defined (__CYGWIN__)
+ if (c == '\n' && istring_index > 1 && istring[istring_index - 2] == '\r')
+ {
+ istring_index--;
+ istring[istring_index - 1] = '\n';
+ }
+#endif
+#endif
+ }
+
+ if (istring)
+ istring[istring_index] = '\0';
+
+ /* If we read no output, just return now and save ourselves some
+ trouble. */
+ if (istring_index == 0)
+ {
+ FREE (istring);
+ if (rflag)
+ *rflag = tflag;
+ return (char *)NULL;
+ }
+
+ /* Strip trailing newlines from the output of the command. */
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ {
+ while (istring_index > 0)
+ {
+ if (istring[istring_index - 1] == '\n')
+ {
+ --istring_index;
+
+ /* If the newline was quoted, remove the quoting char. */
+ if (istring[istring_index - 1] == CTLESC)
+ --istring_index;
+ }
+ else
+ break;
+ }
+ istring[istring_index] = '\0';
+ }
+ else
+ strip_trailing (istring, istring_index - 1, 1);
+
+ if (rflag)
+ *rflag = tflag;
+ return istring;
+}
+
+/* Perform command substitution on STRING. This returns a WORD_DESC * with the
+ contained string possibly quoted. */
+WORD_DESC *
+command_substitute (string, quoted)
+ char *string;
+ int quoted;
+{
+ pid_t pid, old_pid, old_pipeline_pgrp, old_async_pid;
+ char *istring;
+ int result, fildes[2], function_value, pflags, rc, tflag;
+ WORD_DESC *ret;
+
+ istring = (char *)NULL;
+
+ /* Don't fork () if there is no need to. In the case of no command to
+ run, just return NULL. */
+ if (!string || !*string || (string[0] == '\n' && !string[1]))
+ return ((WORD_DESC *)NULL);
+
+ if (wordexp_only && read_but_dont_execute)
+ {
+ last_command_exit_value = EX_WEXPCOMSUB;
+ jump_to_top_level (EXITPROG);
+ }
+
+ /* We're making the assumption here that the command substitution will
+ eventually run a command from the file system. Since we'll run
+ maybe_make_export_env in this subshell before executing that command,
+ the parent shell and any other shells it starts will have to remake
+ the environment. If we make it before we fork, other shells won't
+ have to. Don't bother if we have any temporary variable assignments,
+ though, because the export environment will be remade after this
+ command completes anyway, but do it if all the words to be expanded
+ are variable assignments. */
+ if (subst_assign_varlist == 0 || garglist == 0)
+ maybe_make_export_env (); /* XXX */
+
+ /* Flags to pass to parse_and_execute() */
+ pflags = (interactive && sourcelevel == 0) ? SEVAL_RESETLINE : 0;
+
+ /* Pipe the output of executing STRING into the current shell. */
+ if (pipe (fildes) < 0)
+ {
+ sys_error (_("cannot make pipe for command substitution"));
+ goto error_exit;
+ }
+
+ old_pid = last_made_pid;
+#if defined (JOB_CONTROL)
+ old_pipeline_pgrp = pipeline_pgrp;
+ /* Don't reset the pipeline pgrp if we're already a subshell in a pipeline. */
+ if ((subshell_environment & SUBSHELL_PIPE) == 0)
+ pipeline_pgrp = shell_pgrp;
+ cleanup_the_pipeline ();
+#endif /* JOB_CONTROL */
+
+ old_async_pid = last_asynchronous_pid;
+ pid = make_child ((char *)NULL, subshell_environment&SUBSHELL_ASYNC);
+ last_asynchronous_pid = old_async_pid;
+
+ if (pid == 0)
+ /* Reset the signal handlers in the child, but don't free the
+ trap strings. */
+ reset_signal_handlers ();
+
+#if defined (JOB_CONTROL)
+ /* XXX DO THIS ONLY IN PARENT ? XXX */
+ set_sigchld_handler ();
+ stop_making_children ();
+ if (pid != 0)
+ pipeline_pgrp = old_pipeline_pgrp;
+#else
+ stop_making_children ();
+#endif /* JOB_CONTROL */
+
+ if (pid < 0)
+ {
+ sys_error (_("cannot make child for command substitution"));
+ error_exit:
+
+ FREE (istring);
+ close (fildes[0]);
+ close (fildes[1]);
+ return ((WORD_DESC *)NULL);
+ }
+
+ if (pid == 0)
+ {
+ set_sigint_handler (); /* XXX */
+
+ free_pushed_string_input ();
+
+ if (dup2 (fildes[1], 1) < 0)
+ {
+ sys_error (_("command_substitute: cannot duplicate pipe as fd 1"));
+ exit (EXECUTION_FAILURE);
+ }
+
+ /* If standard output is closed in the parent shell
+ (such as after `exec >&-'), file descriptor 1 will be
+ the lowest available file descriptor, and end up in
+ fildes[0]. This can happen for stdin and stderr as well,
+ but stdout is more important -- it will cause no output
+ to be generated from this command. */
+ if ((fildes[1] != fileno (stdin)) &&
+ (fildes[1] != fileno (stdout)) &&
+ (fildes[1] != fileno (stderr)))
+ close (fildes[1]);
+
+ if ((fildes[0] != fileno (stdin)) &&
+ (fildes[0] != fileno (stdout)) &&
+ (fildes[0] != fileno (stderr)))
+ close (fildes[0]);
+
+ /* The currently executing shell is not interactive. */
+ interactive = 0;
+
+ /* This is a subshell environment. */
+ subshell_environment |= SUBSHELL_COMSUB;
+
+ /* When not in POSIX mode, command substitution does not inherit
+ the -e flag. */
+ if (posixly_correct == 0)
+ exit_immediately_on_error = 0;
+
+ remove_quoted_escapes (string);
+
+ startup_state = 2; /* see if we can avoid a fork */
+ /* Give command substitution a place to jump back to on failure,
+ so we don't go back up to main (). */
+ result = setjmp (top_level);
+
+ /* If we're running a command substitution inside a shell function,
+ trap `return' so we don't return from the function in the subshell
+ and go off to never-never land. */
+ if (result == 0 && return_catch_flag)
+ function_value = setjmp (return_catch);
+ else
+ function_value = 0;
+
+ if (result == ERREXIT)
+ rc = last_command_exit_value;
+ else if (result == EXITPROG)
+ rc = last_command_exit_value;
+ else if (result)
+ rc = EXECUTION_FAILURE;
+ else if (function_value)
+ rc = return_catch_value;
+ else
+ {
+ subshell_level++;
+ rc = parse_and_execute (string, "command substitution", pflags|SEVAL_NOHIST);
+ subshell_level--;
+ }
+
+ last_command_exit_value = rc;
+ rc = run_exit_trap ();
+#if defined (PROCESS_SUBSTITUTION)
+ unlink_fifo_list ();
+#endif
+ exit (rc);
+ }
+ else
+ {
+#if defined (JOB_CONTROL) && defined (PGRP_PIPE)
+ close_pgrp_pipe ();
+#endif /* JOB_CONTROL && PGRP_PIPE */
+
+ close (fildes[1]);
+
+ tflag = 0;
+ istring = read_comsub (fildes[0], quoted, &tflag);
+
+ close (fildes[0]);
+
+ current_command_subst_pid = pid;
+ last_command_exit_value = wait_for (pid);
+ last_command_subst_pid = pid;
+ last_made_pid = old_pid;
+
+#if defined (JOB_CONTROL)
+ /* If last_command_exit_value > 128, then the substituted command
+ was terminated by a signal. If that signal was SIGINT, then send
+ SIGINT to ourselves. This will break out of loops, for instance. */
+ if (last_command_exit_value == (128 + SIGINT) && last_command_exit_signal == SIGINT)
+ kill (getpid (), SIGINT);
+
+ /* wait_for gives the terminal back to shell_pgrp. If some other
+ process group should have it, give it away to that group here.
+ pipeline_pgrp is non-zero only while we are constructing a
+ pipline, so what we are concerned about is whether or not that
+ pipeline was started in the background. A pipeline started in
+ the background should never get the tty back here. */
+#if 0
+ if (interactive && pipeline_pgrp != (pid_t)0 && pipeline_pgrp != last_asynchronous_pid)
+#else
+ if (interactive && pipeline_pgrp != (pid_t)0 && (subshell_environment & SUBSHELL_ASYNC) == 0)
+#endif
+ give_terminal_to (pipeline_pgrp, 0);
+#endif /* JOB_CONTROL */
+
+ ret = alloc_word_desc ();
+ ret->word = istring;
+ ret->flags = tflag;
+
+ return ret;
+ }
+}
+
+/********************************************************
+ * *
+ * Utility functions for parameter expansion *
+ * *
+ ********************************************************/
+
+#if defined (ARRAY_VARS)
+
+static arrayind_t
+array_length_reference (s)
+ char *s;
+{
+ int len;
+ arrayind_t ind;
+ char *akey;
+ char *t, c;
+ ARRAY *array;
+ SHELL_VAR *var;
+
+ var = array_variable_part (s, &t, &len);
+
+ /* If unbound variables should generate an error, report one and return
+ failure. */
+ if ((var == 0 || (assoc_p (var) == 0 && array_p (var) == 0)) && unbound_vars_is_error)
+ {
+ c = *--t;
+ *t = '\0';
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (s);
+ *t = c;
+ return (-1);
+ }
+ else if (var == 0)
+ return 0;
+
+ /* We support a couple of expansions for variables that are not arrays.
+ We'll return the length of the value for v[0], and 1 for v[@] or
+ v[*]. Return 0 for everything else. */
+
+ array = array_p (var) ? array_cell (var) : (ARRAY *)NULL;
+
+ if (ALL_ELEMENT_SUB (t[0]) && t[1] == ']')
+ {
+ if (assoc_p (var))
+ return (assoc_num_elements (assoc_cell (var)));
+ else if (array_p (var))
+ return (array_num_elements (array));
+ else
+ return 1;
+ }
+
+ if (assoc_p (var))
+ {
+ t[len - 1] = '\0';
+ akey = expand_assignment_string_to_string (t, 0); /* [ */
+ t[len - 1] = ']';
+ if (akey == 0 || *akey == 0)
+ {
+ err_badarraysub (t);
+ return (-1);
+ }
+ t = assoc_reference (assoc_cell (var), akey);
+ }
+ else
+ {
+ ind = array_expand_index (t, len);
+ if (ind < 0)
+ {
+ err_badarraysub (t);
+ return (-1);
+ }
+ if (array_p (var))
+ t = array_reference (array, ind);
+ else
+ t = (ind == 0) ? value_cell (var) : (char *)NULL;
+ }
+
+ len = MB_STRLEN (t);
+ return (len);
+}
+#endif /* ARRAY_VARS */
+
+static int
+valid_brace_expansion_word (name, var_is_special)
+ char *name;
+ int var_is_special;
+{
+ if (DIGIT (*name) && all_digits (name))
+ return 1;
+ else if (var_is_special)
+ return 1;
+#if defined (ARRAY_VARS)
+ else if (valid_array_reference (name))
+ return 1;
+#endif /* ARRAY_VARS */
+ else if (legal_identifier (name))
+ return 1;
+ else
+ return 0;
+}
+
+static int
+chk_atstar (name, quoted, quoted_dollar_atp, contains_dollar_at)
+ char *name;
+ int quoted;
+ int *quoted_dollar_atp, *contains_dollar_at;
+{
+ char *temp1;
+
+ if (name == 0)
+ {
+ if (quoted_dollar_atp)
+ *quoted_dollar_atp = 0;
+ if (contains_dollar_at)
+ *contains_dollar_at = 0;
+ return 0;
+ }
+
+ /* check for $@ and $* */
+ if (name[0] == '@' && name[1] == 0)
+ {
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp)
+ *quoted_dollar_atp = 1;
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+ return 1;
+ }
+ else if (name[0] == '*' && name[1] == '\0' && quoted == 0)
+ {
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+ return 1;
+ }
+
+ /* Now check for ${array[@]} and ${array[*]} */
+#if defined (ARRAY_VARS)
+ else if (valid_array_reference (name))
+ {
+ temp1 = mbschr (name, '[');
+ if (temp1 && temp1[1] == '@' && temp1[2] == ']')
+ {
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp)
+ *quoted_dollar_atp = 1;
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+ return 1;
+ } /* [ */
+ /* ${array[*]}, when unquoted, should be treated like ${array[@]},
+ which should result in separate words even when IFS is unset. */
+ if (temp1 && temp1[1] == '*' && temp1[2] == ']' && quoted == 0)
+ {
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+ return 1;
+ }
+ }
+#endif
+ return 0;
+}
+
+/* Parameter expand NAME, and return a new string which is the expansion,
+ or NULL if there was no expansion.
+ VAR_IS_SPECIAL is non-zero if NAME is one of the special variables in
+ the shell, e.g., "@", "$", "*", etc. QUOTED, if non-zero, means that
+ NAME was found inside of a double-quoted expression. */
+static WORD_DESC *
+parameter_brace_expand_word (name, var_is_special, quoted, pflags)
+ char *name;
+ int var_is_special, quoted, pflags;
+{
+ WORD_DESC *ret;
+ char *temp, *tt;
+ intmax_t arg_index;
+ SHELL_VAR *var;
+ int atype, rflags;
+
+ ret = 0;
+ temp = 0;
+ rflags = 0;
+
+ /* Handle multiple digit arguments, as in ${11}. */
+ if (legal_number (name, &arg_index))
+ {
+ tt = get_dollar_var_value (arg_index);
+ if (tt)
+ temp = (*tt && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+ ? quote_string (tt)
+ : quote_escapes (tt);
+ else
+ temp = (char *)NULL;
+ FREE (tt);
+ }
+ else if (var_is_special) /* ${@} */
+ {
+ int sindex;
+ tt = (char *)xmalloc (2 + strlen (name));
+ tt[sindex = 0] = '$';
+ strcpy (tt + 1, name);
+
+ ret = param_expand (tt, &sindex, quoted, (int *)NULL, (int *)NULL,
+ (int *)NULL, (int *)NULL, pflags);
+ free (tt);
+ }
+#if defined (ARRAY_VARS)
+ else if (valid_array_reference (name))
+ {
+ temp = array_value (name, quoted, &atype);
+ if (atype == 0 && temp)
+ temp = (*temp && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+ ? quote_string (temp)
+ : quote_escapes (temp);
+ else if (atype == 1 && temp && QUOTED_NULL (temp) && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+ rflags |= W_HASQUOTEDNULL;
+ }
+#endif
+ else if (var = find_variable (name))
+ {
+ if (var_isset (var) && invisible_p (var) == 0)
+ {
+#if defined (ARRAY_VARS)
+ if (assoc_p (var))
+ temp = assoc_reference (assoc_cell (var), "0");
+ else if (array_p (var))
+ temp = array_reference (array_cell (var), 0);
+ else
+ temp = value_cell (var);
+#else
+ temp = value_cell (var);
+#endif
+
+ if (temp)
+ temp = (*temp && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+ ? quote_string (temp)
+ : quote_escapes (temp);
+ }
+ else
+ temp = (char *)NULL;
+ }
+ else
+ temp = (char *)NULL;
+
+ if (ret == 0)
+ {
+ ret = alloc_word_desc ();
+ ret->word = temp;
+ ret->flags |= rflags;
+ }
+ return ret;
+}
+
+/* Expand an indirect reference to a variable: ${!NAME} expands to the
+ value of the variable whose name is the value of NAME. */
+static WORD_DESC *
+parameter_brace_expand_indir (name, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at)
+ char *name;
+ int var_is_special, quoted;
+ int *quoted_dollar_atp, *contains_dollar_at;
+{
+ char *temp, *t;
+ WORD_DESC *w;
+
+ w = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND);
+ t = w->word;
+ /* Have to dequote here if necessary */
+ if (t)
+ {
+ temp = (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))
+ ? dequote_string (t)
+ : dequote_escapes (t);
+ free (t);
+ t = temp;
+ }
+ dispose_word_desc (w);
+
+ chk_atstar (t, quoted, quoted_dollar_atp, contains_dollar_at);
+ if (t == 0)
+ return (WORD_DESC *)NULL;
+
+ w = parameter_brace_expand_word (t, SPECIAL_VAR(t, 0), quoted, 0);
+ free (t);
+
+ return w;
+}
+
+/* Expand the right side of a parameter expansion of the form ${NAMEcVALUE},
+ depending on the value of C, the separating character. C can be one of
+ "-", "+", or "=". QUOTED is true if the entire brace expression occurs
+ between double quotes. */
+static WORD_DESC *
+parameter_brace_expand_rhs (name, value, c, quoted, qdollaratp, hasdollarat)
+ char *name, *value;
+ int c, quoted, *qdollaratp, *hasdollarat;
+{
+ WORD_DESC *w;
+ WORD_LIST *l;
+ char *t, *t1, *temp;
+ int hasdol;
+
+ /* If the entire expression is between double quotes, we want to treat
+ the value as a double-quoted string, with the exception that we strip
+ embedded unescaped double quotes (for sh backwards compatibility). */
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && *value)
+ {
+ hasdol = 0;
+ temp = string_extract_double_quoted (value, &hasdol, 1);
+ }
+ else
+ temp = value;
+
+ w = alloc_word_desc ();
+ hasdol = 0;
+ /* XXX was 0 not quoted */
+ l = *temp ? expand_string_for_rhs (temp, quoted, &hasdol, (int *)NULL)
+ : (WORD_LIST *)0;
+ if (hasdollarat)
+ *hasdollarat = hasdol || (l && l->next);
+ if (temp != value)
+ free (temp);
+ if (l)
+ {
+ /* The expansion of TEMP returned something. We need to treat things
+ slightly differently if HASDOL is non-zero. If we have "$@", the
+ individual words have already been quoted. We need to turn them
+ into a string with the words separated by the first character of
+ $IFS without any additional quoting, so string_list_dollar_at won't
+ do the right thing. We use string_list_dollar_star instead. */
+ temp = (hasdol || l->next) ? string_list_dollar_star (l) : string_list (l);
+
+ /* If l->next is not null, we know that TEMP contained "$@", since that
+ is the only expansion that creates more than one word. */
+ if (qdollaratp && ((hasdol && quoted) || l->next))
+ *qdollaratp = 1;
+ dispose_words (l);
+ }
+ else if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && hasdol)
+ {
+ /* The brace expansion occurred between double quotes and there was
+ a $@ in TEMP. It does not matter if the $@ is quoted, as long as
+ it does not expand to anything. In this case, we want to return
+ a quoted empty string. */
+ temp = make_quoted_char ('\0');
+ w->flags |= W_HASQUOTEDNULL;
+ }
+ else
+ temp = (char *)NULL;
+
+ if (c == '-' || c == '+')
+ {
+ w->word = temp;
+ return w;
+ }
+
+ /* c == '=' */
+ t = temp ? savestring (temp) : savestring ("");
+ t1 = dequote_string (t);
+ free (t);
+#if defined (ARRAY_VARS)
+ if (valid_array_reference (name))
+ assign_array_element (name, t1, 0);
+ else
+#endif /* ARRAY_VARS */
+ bind_variable (name, t1, 0);
+ free (t1);
+
+ w->word = temp;
+ return w;
+}
+
+/* Deal with the right hand side of a ${name:?value} expansion in the case
+ that NAME is null or not set. If VALUE is non-null it is expanded and
+ used as the error message to print, otherwise a standard message is
+ printed. */
+static void
+parameter_brace_expand_error (name, value)
+ char *name, *value;
+{
+ WORD_LIST *l;
+ char *temp;
+
+ if (value && *value)
+ {
+ l = expand_string (value, 0);
+ temp = string_list (l);
+ report_error ("%s: %s", name, temp ? temp : ""); /* XXX was value not "" */
+ FREE (temp);
+ dispose_words (l);
+ }
+ else
+ report_error (_("%s: parameter null or not set"), name);
+
+ /* Free the data we have allocated during this expansion, since we
+ are about to longjmp out. */
+ free (name);
+ FREE (value);
+}
+
+/* Return 1 if NAME is something for which parameter_brace_expand_length is
+ OK to do. */
+static int
+valid_length_expression (name)
+ char *name;
+{
+ return (name[1] == '\0' || /* ${#} */
+ ((sh_syntaxtab[(unsigned char) name[1]] & CSPECVAR) && name[2] == '\0') || /* special param */
+ (DIGIT (name[1]) && all_digits (name + 1)) || /* ${#11} */
+#if defined (ARRAY_VARS)
+ valid_array_reference (name + 1) || /* ${#a[7]} */
+#endif
+ legal_identifier (name + 1)); /* ${#PS1} */
+}
+
+#if defined (HANDLE_MULTIBYTE)
+size_t
+mbstrlen (s)
+ const char *s;
+{
+ size_t clen, nc;
+ mbstate_t mbs, mbsbak;
+
+ nc = 0;
+ memset (&mbs, 0, sizeof (mbs));
+ mbsbak = mbs;
+ while ((clen = mbrlen(s, MB_CUR_MAX, &mbs)) != 0)
+ {
+ if (MB_INVALIDCH(clen))
+ {
+ clen = 1; /* assume single byte */
+ mbs = mbsbak;
+ }
+
+ s += clen;
+ nc++;
+ mbsbak = mbs;
+ }
+ return nc;
+}
+#endif
+
+
+/* Handle the parameter brace expansion that requires us to return the
+ length of a parameter. */
+static intmax_t
+parameter_brace_expand_length (name)
+ char *name;
+{
+ char *t, *newname;
+ intmax_t number, arg_index;
+ WORD_LIST *list;
+#if defined (ARRAY_VARS)
+ SHELL_VAR *var;
+#endif
+
+ if (name[1] == '\0') /* ${#} */
+ number = number_of_args ();
+ else if ((name[1] == '@' || name[1] == '*') && name[2] == '\0') /* ${#@}, ${#*} */
+ number = number_of_args ();
+ else if ((sh_syntaxtab[(unsigned char) name[1]] & CSPECVAR) && name[2] == '\0')
+ {
+ /* Take the lengths of some of the shell's special parameters. */
+ switch (name[1])
+ {
+ case '-':
+ t = which_set_flags ();
+ break;
+ case '?':
+ t = itos (last_command_exit_value);
+ break;
+ case '$':
+ t = itos (dollar_dollar_pid);
+ break;
+ case '!':
+ if (last_asynchronous_pid == NO_PID)
+ t = (char *)NULL;
+ else
+ t = itos (last_asynchronous_pid);
+ break;
+ case '#':
+ t = itos (number_of_args ());
+ break;
+ }
+ number = STRLEN (t);
+ FREE (t);
+ }
+#if defined (ARRAY_VARS)
+ else if (valid_array_reference (name + 1))
+ number = array_length_reference (name + 1);
+#endif /* ARRAY_VARS */
+ else
+ {
+ number = 0;
+
+ if (legal_number (name + 1, &arg_index)) /* ${#1} */
+ {
+ t = get_dollar_var_value (arg_index);
+ number = MB_STRLEN (t);
+ FREE (t);
+ }
+#if defined (ARRAY_VARS)
+ else if ((var = find_variable (name + 1)) && (invisible_p (var) == 0) && (array_p (var) || assoc_p (var)))
+ {
+ if (assoc_p (var))
+ t = assoc_reference (assoc_cell (var), "0");
+ else
+ t = array_reference (array_cell (var), 0);
+ number = MB_STRLEN (t);
+ }
+#endif
+ else /* ${#PS1} */
+ {
+ newname = savestring (name);
+ newname[0] = '$';
+ list = expand_string (newname, Q_DOUBLE_QUOTES);
+ t = list ? string_list (list) : (char *)NULL;
+ free (newname);
+ if (list)
+ dispose_words (list);
+
+ number = MB_STRLEN (t);
+ FREE (t);
+ }
+ }
+
+ return (number);
+}
+
+/* Skip characters in SUBSTR until DELIM. SUBSTR is an arithmetic expression,
+ so we do some ad-hoc parsing of an arithmetic expression to find
+ the first DELIM, instead of using strchr(3). Two rules:
+ 1. If the substring contains a `(', read until closing `)'.
+ 2. If the substring contains a `?', read past one `:' for each `?'.
+*/
+
+static char *
+skiparith (substr, delim)
+ char *substr;
+ int delim;
+{
+ size_t sublen;
+ int skipcol, pcount, i;
+ DECLARE_MBSTATE;
+
+ sublen = strlen (substr);
+ i = skipcol = pcount = 0;
+ while (substr[i])
+ {
+ /* Balance parens */
+ if (substr[i] == LPAREN)
+ {
+ pcount++;
+ i++;
+ continue;
+ }
+ if (substr[i] == RPAREN && pcount)
+ {
+ pcount--;
+ i++;
+ continue;
+ }
+ if (pcount)
+ {
+ ADVANCE_CHAR (substr, sublen, i);
+ continue;
+ }
+
+ /* Skip one `:' for each `?' */
+ if (substr[i] == ':' && skipcol)
+ {
+ skipcol--;
+ i++;
+ continue;
+ }
+ if (substr[i] == delim)
+ break;
+ if (substr[i] == '?')
+ {
+ skipcol++;
+ i++;
+ continue;
+ }
+ ADVANCE_CHAR (substr, sublen, i);
+ }
+
+ return (substr + i);
+}
+
+/* Verify and limit the start and end of the desired substring. If
+ VTYPE == 0, a regular shell variable is being used; if it is 1,
+ then the positional parameters are being used; if it is 2, then
+ VALUE is really a pointer to an array variable that should be used.
+ Return value is 1 if both values were OK, 0 if there was a problem
+ with an invalid expression, or -1 if the values were out of range. */
+static int
+verify_substring_values (v, value, substr, vtype, e1p, e2p)
+ SHELL_VAR *v;
+ char *value, *substr;
+ int vtype;
+ intmax_t *e1p, *e2p;
+{
+ char *t, *temp1, *temp2;
+ arrayind_t len;
+ int expok;
+#if defined (ARRAY_VARS)
+ ARRAY *a;
+ HASH_TABLE *h;
+#endif
+
+ /* duplicate behavior of strchr(3) */
+ t = skiparith (substr, ':');
+ if (*t && *t == ':')
+ *t = '\0';
+ else
+ t = (char *)0;
+
+ temp1 = expand_arith_string (substr, Q_DOUBLE_QUOTES);
+ *e1p = evalexp (temp1, &expok);
+ free (temp1);
+ if (expok == 0)
+ return (0);
+
+ len = -1; /* paranoia */
+ switch (vtype)
+ {
+ case VT_VARIABLE:
+ case VT_ARRAYMEMBER:
+ len = MB_STRLEN (value);
+ break;
+ case VT_POSPARMS:
+ len = number_of_args () + 1;
+ if (*e1p == 0)
+ len++; /* add one arg if counting from $0 */
+ break;
+#if defined (ARRAY_VARS)
+ case VT_ARRAYVAR:
+ /* For arrays, the first value deals with array indices. Negative
+ offsets count from one past the array's maximum index. Associative
+ arrays treat the number of elements as the maximum index. */
+ if (assoc_p (v))
+ {
+ h = assoc_cell (v);
+ len = assoc_num_elements (h) + (*e1p < 0);
+ }
+ else
+ {
+ a = (ARRAY *)value;
+ len = array_max_index (a) + (*e1p < 0); /* arrays index from 0 to n - 1 */
+ }
+ break;
+#endif
+ }
+
+ if (len == -1) /* paranoia */
+ return -1;
+
+ if (*e1p < 0) /* negative offsets count from end */
+ *e1p += len;
+
+ if (*e1p > len || *e1p < 0)
+ return (-1);
+
+#if defined (ARRAY_VARS)
+ /* For arrays, the second offset deals with the number of elements. */
+ if (vtype == VT_ARRAYVAR)
+ len = assoc_p (v) ? assoc_num_elements (h) : array_num_elements (a);
+#endif
+
+ if (t)
+ {
+ t++;
+ temp2 = savestring (t);
+ temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES);
+ free (temp2);
+ t[-1] = ':';
+ *e2p = evalexp (temp1, &expok);
+ free (temp1);
+ if (expok == 0)
+ return (0);
+ if (*e2p < 0)
+ {
+ internal_error (_("%s: substring expression < 0"), t);
+ return (0);
+ }
+#if defined (ARRAY_VARS)
+ /* In order to deal with sparse arrays, push the intelligence about how
+ to deal with the number of elements desired down to the array-
+ specific functions. */
+ if (vtype != VT_ARRAYVAR)
+#endif
+ {
+ *e2p += *e1p; /* want E2 chars starting at E1 */
+ if (*e2p > len)
+ *e2p = len;
+ }
+ }
+ else
+ *e2p = len;
+
+ return (1);
+}
+
+/* Return the type of variable specified by VARNAME (simple variable,
+ positional param, or array variable). Also return the value specified
+ by VARNAME (value of a variable or a reference to an array element).
+ If this returns VT_VARIABLE, the caller assumes that CTLESC and CTLNUL
+ characters in the value are quoted with CTLESC and takes appropriate
+ steps. For convenience, *VALP is set to the dequoted VALUE. */
+static int
+get_var_and_type (varname, value, quoted, varp, valp)
+ char *varname, *value;
+ int quoted;
+ SHELL_VAR **varp;
+ char **valp;
+{
+ int vtype;
+ char *temp;
+#if defined (ARRAY_VARS)
+ SHELL_VAR *v;
+#endif
+
+ /* This sets vtype to VT_VARIABLE or VT_POSPARMS */
+ vtype = (varname[0] == '@' || varname[0] == '*') && varname[1] == '\0';
+ if (vtype == VT_POSPARMS && varname[0] == '*')
+ vtype |= VT_STARSUB;
+ *varp = (SHELL_VAR *)NULL;
+
+#if defined (ARRAY_VARS)
+ if (valid_array_reference (varname))
+ {
+ v = array_variable_part (varname, &temp, (int *)0);
+ if (v && (array_p (v) || assoc_p (v)))
+ { /* [ */
+ if (ALL_ELEMENT_SUB (temp[0]) && temp[1] == ']')
+ {
+ /* Callers have to differentiate betwen indexed and associative */
+ vtype = VT_ARRAYVAR;
+ if (temp[0] == '*')
+ vtype |= VT_STARSUB;
+ *valp = array_p (v) ? (char *)array_cell (v) : (char *)assoc_cell (v);
+ }
+ else
+ {
+ vtype = VT_ARRAYMEMBER;
+ *valp = array_value (varname, 1, (int *)NULL);
+ }
+ *varp = v;
+ }
+ else if (v && (ALL_ELEMENT_SUB (temp[0]) && temp[1] == ']'))
+ {
+ vtype = VT_VARIABLE;
+ *varp = v;
+ if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))
+ *valp = dequote_string (value);
+ else
+ *valp = dequote_escapes (value);
+ }
+ else
+ {
+ vtype = VT_ARRAYMEMBER;
+ *varp = v;
+ *valp = array_value (varname, 1, (int *)NULL);
+ }
+ }
+ else if ((v = find_variable (varname)) && (invisible_p (v) == 0) && (assoc_p (v) || array_p (v)))
+ {
+ vtype = VT_ARRAYMEMBER;
+ *varp = v;
+ *valp = assoc_p (v) ? assoc_reference (assoc_cell (v), "0") : array_reference (array_cell (v), 0);
+ }
+ else
+#endif
+ {
+ if (value && vtype == VT_VARIABLE)
+ {
+ if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))
+ *valp = dequote_string (value);
+ else
+ *valp = dequote_escapes (value);
+ }
+ else
+ *valp = value;
+ }
+
+ return vtype;
+}
+
+/******************************************************/
+/* */
+/* Functions to extract substrings of variable values */
+/* */
+/******************************************************/
+
+#if defined (HANDLE_MULTIBYTE)
+/* Character-oriented rather than strictly byte-oriented substrings. S and
+ E, rather being strict indices into STRING, indicate character (possibly
+ multibyte character) positions that require calculation.
+ Used by the ${param:offset[:length]} expansion. */
+static char *
+mb_substring (string, s, e)
+ char *string;
+ int s, e;
+{
+ char *tt;
+ int start, stop, i, slen;
+ DECLARE_MBSTATE;
+
+ start = 0;
+ /* Don't need string length in ADVANCE_CHAR unless multibyte chars possible. */
+ slen = (MB_CUR_MAX > 1) ? STRLEN (string) : 0;
+
+ i = s;
+ while (string[start] && i--)
+ ADVANCE_CHAR (string, slen, start);
+ stop = start;
+ i = e - s;
+ while (string[stop] && i--)
+ ADVANCE_CHAR (string, slen, stop);
+ tt = substring (string, start, stop);
+ return tt;
+}
+#endif
+
+/* Process a variable substring expansion: ${name:e1[:e2]}. If VARNAME
+ is `@', use the positional parameters; otherwise, use the value of
+ VARNAME. If VARNAME is an array variable, use the array elements. */
+
+static char *
+parameter_brace_substring (varname, value, substr, quoted)
+ char *varname, *value, *substr;
+ int quoted;
+{
+ intmax_t e1, e2;
+ int vtype, r, starsub;
+ char *temp, *val, *tt, *oname;
+ SHELL_VAR *v;
+
+ if (value == 0)
+ return ((char *)NULL);
+
+ oname = this_command_name;
+ this_command_name = varname;
+
+ vtype = get_var_and_type (varname, value, quoted, &v, &val);
+ if (vtype == -1)
+ {
+ this_command_name = oname;
+ return ((char *)NULL);
+ }
+
+ starsub = vtype & VT_STARSUB;
+ vtype &= ~VT_STARSUB;
+
+ r = verify_substring_values (v, val, substr, vtype, &e1, &e2);
+ this_command_name = oname;
+ if (r <= 0)
+ return ((r == 0) ? &expand_param_error : (char *)NULL);
+
+ switch (vtype)
+ {
+ case VT_VARIABLE:
+ case VT_ARRAYMEMBER:
+#if defined (HANDLE_MULTIBYTE)
+ if (MB_CUR_MAX > 1)
+ tt = mb_substring (val, e1, e2);
+ else
+#endif
+ tt = substring (val, e1, e2);
+
+ if (vtype == VT_VARIABLE)
+ FREE (val);
+ if (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT))
+ temp = quote_string (tt);
+ else
+ temp = tt ? quote_escapes (tt) : (char *)NULL;
+ FREE (tt);
+ break;
+ case VT_POSPARMS:
+ tt = pos_params (varname, e1, e2, quoted);
+ if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) == 0)
+ {
+ temp = tt ? quote_escapes (tt) : (char *)NULL;
+ FREE (tt);
+ }
+ else
+ temp = tt;
+ break;
+#if defined (ARRAY_VARS)
+ case VT_ARRAYVAR:
+ if (assoc_p (v))
+ /* we convert to list and take first e2 elements starting at e1th
+ element -- officially undefined for now */
+ temp = assoc_subrange (assoc_cell (v), e1, e2, starsub, quoted);
+ else
+ /* We want E2 to be the number of elements desired (arrays can be sparse,
+ so verify_substring_values just returns the numbers specified and we
+ rely on array_subrange to understand how to deal with them). */
+ temp = array_subrange (array_cell (v), e1, e2, starsub, quoted);
+ /* array_subrange now calls array_quote_escapes as appropriate, so the
+ caller no longer needs to. */
+ break;
+#endif
+ default:
+ temp = (char *)NULL;
+ }
+
+ return temp;
+}
+
+/****************************************************************/
+/* */
+/* Functions to perform pattern substitution on variable values */
+/* */
+/****************************************************************/
+
+char *
+pat_subst (string, pat, rep, mflags)
+ char *string, *pat, *rep;
+ int mflags;
+{
+ char *ret, *s, *e, *str;
+ int rsize, rptr, l, replen, mtype;
+
+ mtype = mflags & MATCH_TYPEMASK;
+
+ /* Special cases:
+ * 1. A null pattern with mtype == MATCH_BEG means to prefix STRING
+ * with REP and return the result.
+ * 2. A null pattern with mtype == MATCH_END means to append REP to
+ * STRING and return the result.
+ */
+ if ((pat == 0 || *pat == 0) && (mtype == MATCH_BEG || mtype == MATCH_END))
+ {
+ replen = STRLEN (rep);
+ l = strlen (string);
+ ret = (char *)xmalloc (replen + l + 2);
+ if (replen == 0)
+ strcpy (ret, string);
+ else if (mtype == MATCH_BEG)
+ {
+ strcpy (ret, rep);
+ strcpy (ret + replen, string);
+ }
+ else
+ {
+ strcpy (ret, string);
+ strcpy (ret + l, rep);
+ }
+ return (ret);
+ }
+
+ ret = (char *)xmalloc (rsize = 64);
+ ret[0] = '\0';
+
+ for (replen = STRLEN (rep), rptr = 0, str = string;;)
+ {
+ if (match_pattern (str, pat, mtype, &s, &e) == 0)
+ break;
+ l = s - str;
+ RESIZE_MALLOCED_BUFFER (ret, rptr, (l + replen), rsize, 64);
+
+ /* OK, now copy the leading unmatched portion of the string (from
+ str to s) to ret starting at rptr (the current offset). Then copy
+ the replacement string at ret + rptr + (s - str). Increment
+ rptr (if necessary) and str and go on. */
+ if (l)
+ {
+ strncpy (ret + rptr, str, l);
+ rptr += l;
+ }
+ if (replen)
+ {
+ strncpy (ret + rptr, rep, replen);
+ rptr += replen;
+ }
+ str = e; /* e == end of match */
+
+ if (((mflags & MATCH_GLOBREP) == 0) || mtype != MATCH_ANY)
+ break;
+
+ if (s == e)
+ {
+ /* On a zero-length match, make sure we copy one character, since
+ we increment one character to avoid infinite recursion. */
+ RESIZE_MALLOCED_BUFFER (ret, rptr, 1, rsize, 64);
+ ret[rptr++] = *str++;
+ e++; /* avoid infinite recursion on zero-length match */
+ }
+ }
+
+ /* Now copy the unmatched portion of the input string */
+ if (*str)
+ {
+ RESIZE_MALLOCED_BUFFER (ret, rptr, STRLEN(str) + 1, rsize, 64);
+ strcpy (ret + rptr, str);
+ }
+ else
+ ret[rptr] = '\0';
+
+ return ret;
+}
+
+/* Do pattern match and replacement on the positional parameters. */
+static char *
+pos_params_pat_subst (string, pat, rep, mflags)
+ char *string, *pat, *rep;
+ int mflags;
+{
+ WORD_LIST *save, *params;
+ WORD_DESC *w;
+ char *ret;
+ int pchar, qflags;
+
+ save = params = list_rest_of_args ();
+ if (save == 0)
+ return ((char *)NULL);
+
+ for ( ; params; params = params->next)
+ {
+ ret = pat_subst (params->word->word, pat, rep, mflags);
+ w = alloc_word_desc ();
+ w->word = ret ? ret : savestring ("");
+ dispose_word (params->word);
+ params->word = w;
+ }
+
+ pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@';
+ qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0;
+
+#if 0
+ if ((mflags & (MATCH_QUOTED|MATCH_STARSUB)) == (MATCH_QUOTED|MATCH_STARSUB))
+ ret = string_list_dollar_star (quote_list (save));
+ else if ((mflags & MATCH_STARSUB) == MATCH_STARSUB)
+ ret = string_list_dollar_star (save);
+ else if ((mflags & MATCH_QUOTED) == MATCH_QUOTED)
+ ret = string_list_dollar_at (save, qflags);
+ else
+ ret = string_list_dollar_star (save);
+#else
+ ret = string_list_pos_params (pchar, save, qflags);
+#endif
+
+ dispose_words (save);
+
+ return (ret);
+}
+
+/* Perform pattern substitution on VALUE, which is the expansion of
+ VARNAME. PATSUB is an expression supplying the pattern to match
+ and the string to substitute. QUOTED is a flags word containing
+ the type of quoting currently in effect. */
+static char *
+parameter_brace_patsub (varname, value, patsub, quoted)
+ char *varname, *value, *patsub;
+ int quoted;
+{
+ int vtype, mflags, starsub, delim;
+ char *val, *temp, *pat, *rep, *p, *lpatsub, *tt;
+ SHELL_VAR *v;
+
+ if (value == 0)
+ return ((char *)NULL);
+
+ this_command_name = varname;
+
+ vtype = get_var_and_type (varname, value, quoted, &v, &val);
+ if (vtype == -1)
+ return ((char *)NULL);
+
+ starsub = vtype & VT_STARSUB;
+ vtype &= ~VT_STARSUB;
+
+ mflags = 0;
+ if (patsub && *patsub == '/')
+ {
+ mflags |= MATCH_GLOBREP;
+ patsub++;
+ }
+
+ /* Malloc this because expand_string_if_necessary or one of the expansion
+ functions in its call chain may free it on a substitution error. */
+ lpatsub = savestring (patsub);
+
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ mflags |= MATCH_QUOTED;
+
+ if (starsub)
+ mflags |= MATCH_STARSUB;
+
+ /* If the pattern starts with a `/', make sure we skip over it when looking
+ for the replacement delimiter. */
+#if 0
+ if (rep = quoted_strchr ((*patsub == '/') ? lpatsub+1 : lpatsub, '/', ST_BACKSL))
+ *rep++ = '\0';
+ else
+ rep = (char *)NULL;
+#else
+ delim = skip_to_delim (lpatsub, ((*patsub == '/') ? 1 : 0), "/", 0);
+ if (lpatsub[delim] == '/')
+ {
+ lpatsub[delim] = 0;
+ rep = lpatsub + delim + 1;
+ }
+ else
+ rep = (char *)NULL;
+#endif
+
+ if (rep && *rep == '\0')
+ rep = (char *)NULL;
+
+ /* Perform the same expansions on the pattern as performed by the
+ pattern removal expansions. */
+ pat = getpattern (lpatsub, quoted, 1);
+
+ if (rep)
+ {
+ if ((mflags & MATCH_QUOTED) == 0)
+ rep = expand_string_if_necessary (rep, quoted, expand_string_unsplit);
+ else
+ rep = expand_string_to_string_internal (rep, quoted, expand_string_unsplit);
+ }
+
+ /* ksh93 doesn't allow the match specifier to be a part of the expanded
+ pattern. This is an extension. Make sure we don't anchor the pattern
+ at the beginning or end of the string if we're doing global replacement,
+ though. */
+ p = pat;
+ if (mflags & MATCH_GLOBREP)
+ mflags |= MATCH_ANY;
+ else if (pat && pat[0] == '#')
+ {
+ mflags |= MATCH_BEG;
+ p++;
+ }
+ else if (pat && pat[0] == '%')
+ {
+ mflags |= MATCH_END;
+ p++;
+ }
+ else
+ mflags |= MATCH_ANY;
+
+ /* OK, we now want to substitute REP for PAT in VAL. If
+ flags & MATCH_GLOBREP is non-zero, the substitution is done
+ everywhere, otherwise only the first occurrence of PAT is
+ replaced. The pattern matching code doesn't understand
+ CTLESC quoting CTLESC and CTLNUL so we use the dequoted variable
+ values passed in (VT_VARIABLE) so the pattern substitution
+ code works right. We need to requote special chars after
+ we're done for VT_VARIABLE and VT_ARRAYMEMBER, and for the
+ other cases if QUOTED == 0, since the posparams and arrays
+ indexed by * or @ do special things when QUOTED != 0. */
+
+ switch (vtype)
+ {
+ case VT_VARIABLE:
+ case VT_ARRAYMEMBER:
+ temp = pat_subst (val, p, rep, mflags);
+ if (vtype == VT_VARIABLE)
+ FREE (val);
+ if (temp)
+ {
+ tt = (mflags & MATCH_QUOTED) ? quote_string (temp) : quote_escapes (temp);
+ free (temp);
+ temp = tt;
+ }
+ break;
+ case VT_POSPARMS:
+ temp = pos_params_pat_subst (val, p, rep, mflags);
+ if (temp && (mflags & MATCH_QUOTED) == 0)
+ {
+ tt = quote_escapes (temp);
+ free (temp);
+ temp = tt;
+ }
+ break;
+#if defined (ARRAY_VARS)
+ case VT_ARRAYVAR:
+ temp = assoc_p (v) ? assoc_patsub (assoc_cell (v), p, rep, mflags)
+ : array_patsub (array_cell (v), p, rep, mflags);
+ /* Don't call quote_escapes anymore; array_patsub calls
+ array_quote_escapes as appropriate before adding the
+ space separators; ditto for assoc_patsub. */
+ break;
+#endif
+ }
+
+ FREE (pat);
+ FREE (rep);
+ free (lpatsub);
+
+ return temp;
+}
+
+/****************************************************************/
+/* */
+/* Functions to perform case modification on variable values */
+/* */
+/****************************************************************/
+
+/* Do case modification on the positional parameters. */
+
+static char *
+pos_params_modcase (string, pat, modop, mflags)
+ char *string, *pat;
+ int modop;
+ int mflags;
+{
+ WORD_LIST *save, *params;
+ WORD_DESC *w;
+ char *ret;
+ int pchar, qflags;
+
+ save = params = list_rest_of_args ();
+ if (save == 0)
+ return ((char *)NULL);
+
+ for ( ; params; params = params->next)
+ {
+ ret = sh_modcase (params->word->word, pat, modop);
+ w = alloc_word_desc ();
+ w->word = ret ? ret : savestring ("");
+ dispose_word (params->word);
+ params->word = w;
+ }
+
+ pchar = (mflags & MATCH_STARSUB) == MATCH_STARSUB ? '*' : '@';
+ qflags = (mflags & MATCH_QUOTED) == MATCH_QUOTED ? Q_DOUBLE_QUOTES : 0;
+
+ ret = string_list_pos_params (pchar, save, qflags);
+ dispose_words (save);
+
+ return (ret);
+}
+
+/* Perform case modification on VALUE, which is the expansion of
+ VARNAME. MODSPEC is an expression supplying the type of modification
+ to perform. QUOTED is a flags word containing the type of quoting
+ currently in effect. */
+static char *
+parameter_brace_casemod (varname, value, modspec, patspec, quoted)
+ char *varname, *value;
+ int modspec;
+ char *patspec;
+ int quoted;
+{
+ int vtype, starsub, modop, mflags, x;
+ char *val, *temp, *pat, *p, *lpat, *tt;
+ SHELL_VAR *v;
+
+ if (value == 0)
+ return ((char *)NULL);
+
+ this_command_name = varname;
+
+ vtype = get_var_and_type (varname, value, quoted, &v, &val);
+ if (vtype == -1)
+ return ((char *)NULL);
+
+ starsub = vtype & VT_STARSUB;
+ vtype &= ~VT_STARSUB;
+
+ modop = 0;
+ mflags = 0;
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ mflags |= MATCH_QUOTED;
+ if (starsub)
+ mflags |= MATCH_STARSUB;
+
+ p = patspec;
+ if (modspec == '^')
+ {
+ x = p && p[0] == modspec;
+ modop = x ? CASE_UPPER : CASE_UPFIRST;
+ p += x;
+ }
+ else if (modspec == ',')
+ {
+ x = p && p[0] == modspec;
+ modop = x ? CASE_LOWER : CASE_LOWFIRST;
+ p += x;
+ }
+ else if (modspec == '~')
+ {
+ x = p && p[0] == modspec;
+ modop = x ? CASE_TOGGLEALL : CASE_TOGGLE;
+ p += x;
+ }
+
+ lpat = p ? savestring (p) : 0;
+ /* Perform the same expansions on the pattern as performed by the
+ pattern removal expansions. FOR LATER */
+ pat = lpat ? getpattern (lpat, quoted, 1) : 0;
+
+ /* OK, now we do the case modification. */
+ switch (vtype)
+ {
+ case VT_VARIABLE:
+ case VT_ARRAYMEMBER:
+ temp = sh_modcase (val, pat, modop);
+ if (vtype == VT_VARIABLE)
+ FREE (val);
+ if (temp)
+ {
+ tt = (mflags & MATCH_QUOTED) ? quote_string (temp) : quote_escapes (temp);
+ free (temp);
+ temp = tt;
+ }
+ break;
+
+ case VT_POSPARMS:
+ temp = pos_params_modcase (val, pat, modop, mflags);
+ if (temp && (mflags & MATCH_QUOTED) == 0)
+ {
+ tt = quote_escapes (temp);
+ free (temp);
+ temp = tt;
+ }
+ break;
+
+#if defined (ARRAY_VARS)
+ case VT_ARRAYVAR:
+ temp = assoc_p (v) ? assoc_modcase (assoc_cell (v), pat, modop, mflags)
+ : array_modcase (array_cell (v), pat, modop, mflags);
+ /* Don't call quote_escapes; array_modcase calls array_quote_escapes
+ as appropriate before adding the space separators; ditto for
+ assoc_modcase. */
+ break;
+#endif
+ }
+
+ FREE (pat);
+ free (lpat);
+
+ return temp;
+}
+
+/* Check for unbalanced parens in S, which is the contents of $(( ... )). If
+ any occur, this must be a nested command substitution, so return 0.
+ Otherwise, return 1. A valid arithmetic expression must always have a
+ ( before a matching ), so any cases where there are more right parens
+ means that this must not be an arithmetic expression, though the parser
+ will not accept it without a balanced total number of parens. */
+static int
+chk_arithsub (s, len)
+ const char *s;
+ int len;
+{
+ int i, count;
+ DECLARE_MBSTATE;
+
+ i = count = 0;
+ while (i < len)
+ {
+ if (s[i] == LPAREN)
+ count++;
+ else if (s[i] == RPAREN)
+ {
+ count--;
+ if (count < 0)
+ return 0;
+ }
+
+ switch (s[i])
+ {
+ default:
+ ADVANCE_CHAR (s, len, i);
+ break;
+
+ case '\\':
+ i++;
+ if (s[i])
+ ADVANCE_CHAR (s, len, i);
+ break;
+
+ case '\'':
+ i = skip_single_quoted (s, len, ++i);
+ break;
+
+ case '"':
+ i = skip_double_quoted ((char *)s, len, ++i);
+ break;
+ }
+ }
+
+ return (count == 0);
+}
+
+/****************************************************************/
+/* */
+/* Functions to perform parameter expansion on a string */
+/* */
+/****************************************************************/
+
+/* ${[#][!]name[[:][^[^]][,[,]]#[#]%[%]-=?+[word][:e1[:e2]]]} */
+static WORD_DESC *
+parameter_brace_expand (string, indexp, quoted, pflags, quoted_dollar_atp, contains_dollar_at)
+ char *string;
+ int *indexp, quoted, *quoted_dollar_atp, *contains_dollar_at, pflags;
+{
+ int check_nullness, var_is_set, var_is_null, var_is_special;
+ int want_substring, want_indir, want_patsub, want_casemod;
+ char *name, *value, *temp, *temp1;
+ WORD_DESC *tdesc, *ret;
+ int t_index, sindex, c, tflag, modspec;
+ intmax_t number;
+
+ temp = temp1 = value = (char *)NULL;
+ var_is_set = var_is_null = var_is_special = check_nullness = 0;
+ want_substring = want_indir = want_patsub = want_casemod = 0;
+
+ sindex = *indexp;
+ t_index = ++sindex;
+ /* ${#var} doesn't have any of the other parameter expansions on it. */
+ if (string[t_index] == '#' && legal_variable_starter (string[t_index+1])) /* {{ */
+ name = string_extract (string, &t_index, "}", SX_VARNAME);
+ else
+#if defined (CASEMOD_EXPANSIONS)
+ /* To enable case-toggling expansions using the `~' operator character
+ change the 1 to 0. */
+# if defined (CASEMOD_CAPCASE)
+ name = string_extract (string, &t_index, "#%^,~:-=?+/}", SX_VARNAME);
+# else
+ name = string_extract (string, &t_index, "#%^,:-=?+/}", SX_VARNAME);
+# endif /* CASEMOD_CAPCASE */
+#else
+ name = string_extract (string, &t_index, "#%:-=?+/}", SX_VARNAME);
+#endif /* CASEMOD_EXPANSIONS */
+
+ ret = 0;
+ tflag = 0;
+
+ /* If the name really consists of a special variable, then make sure
+ that we have the entire name. We don't allow indirect references
+ to special variables except `#', `?', `@' and `*'. */
+ if ((sindex == t_index &&
+ (string[t_index] == '-' ||
+ string[t_index] == '?' ||
+ string[t_index] == '#')) ||
+ (sindex == t_index - 1 && string[sindex] == '!' &&
+ (string[t_index] == '#' ||
+ string[t_index] == '?' ||
+ string[t_index] == '@' ||
+ string[t_index] == '*')))
+ {
+ t_index++;
+ free (name);
+ temp1 = string_extract (string, &t_index, "#%:-=?+/}", 0);
+ name = (char *)xmalloc (3 + (strlen (temp1)));
+ *name = string[sindex];
+ if (string[sindex] == '!')
+ {
+ /* indirect reference of $#, $?, $@, or $* */
+ name[1] = string[sindex + 1];
+ strcpy (name + 2, temp1);
+ }
+ else
+ strcpy (name + 1, temp1);
+ free (temp1);
+ }
+ sindex = t_index;
+
+ /* Find out what character ended the variable name. Then
+ do the appropriate thing. */
+ if (c = string[sindex])
+ sindex++;
+
+ /* If c is followed by one of the valid parameter expansion
+ characters, move past it as normal. If not, assume that
+ a substring specification is being given, and do not move
+ past it. */
+ if (c == ':' && VALID_PARAM_EXPAND_CHAR (string[sindex]))
+ {
+ check_nullness++;
+ if (c = string[sindex])
+ sindex++;
+ }
+ else if (c == ':' && string[sindex] != RBRACE)
+ want_substring = 1;
+ else if (c == '/' && string[sindex] != RBRACE)
+ want_patsub = 1;
+#if defined (CASEMOD_EXPANSIONS)
+ else if (c == '^' || c == ',' || c == '~')
+ {
+ modspec = c;
+ want_casemod = 1;
+ }
+#endif
+
+ /* Catch the valid and invalid brace expressions that made it through the
+ tests above. */
+ /* ${#-} is a valid expansion and means to take the length of $-.
+ Similarly for ${#?} and ${##}... */
+ if (name[0] == '#' && name[1] == '\0' && check_nullness == 0 &&
+ VALID_SPECIAL_LENGTH_PARAM (c) && string[sindex] == RBRACE)
+ {
+ name = (char *)xrealloc (name, 3);
+ name[1] = c;
+ name[2] = '\0';
+ c = string[sindex++];
+ }
+
+ /* ...but ${#%}, ${#:}, ${#=}, ${#+}, and ${#/} are errors. */
+ if (name[0] == '#' && name[1] == '\0' && check_nullness == 0 &&
+ member (c, "%:=+/") && string[sindex] == RBRACE)
+ {
+ temp = (char *)NULL;
+ goto bad_substitution;
+ }
+
+ /* Indirect expansion begins with a `!'. A valid indirect expansion is
+ either a variable name, one of the positional parameters or a special
+ variable that expands to one of the positional parameters. */
+ want_indir = *name == '!' &&
+ (legal_variable_starter ((unsigned char)name[1]) || DIGIT (name[1])
+ || VALID_INDIR_PARAM (name[1]));
+
+ /* Determine the value of this variable. */
+
+ /* Check for special variables, directly referenced. */
+ if (SPECIAL_VAR (name, want_indir))
+ var_is_special++;
+
+ /* Check for special expansion things, like the length of a parameter */
+ if (*name == '#' && name[1])
+ {
+ /* If we are not pointing at the character just after the
+ closing brace, then we haven't gotten all of the name.
+ Since it begins with a special character, this is a bad
+ substitution. Also check NAME for validity before trying
+ to go on. */
+ if (string[sindex - 1] != RBRACE || (valid_length_expression (name) == 0))
+ {
+ temp = (char *)NULL;
+ goto bad_substitution;
+ }
+
+ number = parameter_brace_expand_length (name);
+ free (name);
+
+ *indexp = sindex;
+ if (number < 0)
+ return (&expand_wdesc_error);
+ else
+ {
+ ret = alloc_word_desc ();
+ ret->word = itos (number);
+ return ret;
+ }
+ }
+
+ /* ${@} is identical to $@. */
+ if (name[0] == '@' && name[1] == '\0')
+ {
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp)
+ *quoted_dollar_atp = 1;
+
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+ }
+
+ /* Process ${!PREFIX*} expansion. */
+ if (want_indir && string[sindex - 1] == RBRACE &&
+ (string[sindex - 2] == '*' || string[sindex - 2] == '@') &&
+ legal_variable_starter ((unsigned char) name[1]))
+ {
+ char **x;
+ WORD_LIST *xlist;
+
+ temp1 = savestring (name + 1);
+ number = strlen (temp1);
+ temp1[number - 1] = '\0';
+ x = all_variables_matching_prefix (temp1);
+ xlist = strvec_to_word_list (x, 0, 0);
+ if (string[sindex - 2] == '*')
+ temp = string_list_dollar_star (xlist);
+ else
+ {
+ temp = string_list_dollar_at (xlist, quoted);
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp)
+ *quoted_dollar_atp = 1;
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+ }
+ free (x);
+ dispose_words (xlist);
+ free (temp1);
+ *indexp = sindex;
+
+ ret = alloc_word_desc ();
+ ret->word = temp;
+ return ret;
+ }
+
+#if defined (ARRAY_VARS)
+ /* Process ${!ARRAY[@]} and ${!ARRAY[*]} expansion. */ /* [ */
+ if (want_indir && string[sindex - 1] == RBRACE &&
+ string[sindex - 2] == ']' && valid_array_reference (name+1))
+ {
+ char *x, *x1;
+
+ temp1 = savestring (name + 1);
+ x = array_variable_name (temp1, &x1, (int *)0); /* [ */
+ FREE (x);
+ if (ALL_ELEMENT_SUB (x1[0]) && x1[1] == ']')
+ {
+ temp = array_keys (temp1, quoted); /* handles assoc vars too */
+ if (x1[0] == '@')
+ {
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp)
+ *quoted_dollar_atp = 1;
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+ }
+
+ free (temp1);
+ *indexp = sindex;
+
+ ret = alloc_word_desc ();
+ ret->word = temp;
+ return ret;
+ }
+
+ free (temp1);
+ }
+#endif /* ARRAY_VARS */
+
+ /* Make sure that NAME is valid before trying to go on. */
+ if (valid_brace_expansion_word (want_indir ? name + 1 : name,
+ var_is_special) == 0)
+ {
+ temp = (char *)NULL;
+ goto bad_substitution;
+ }
+
+ if (want_indir)
+ tdesc = parameter_brace_expand_indir (name + 1, var_is_special, quoted, quoted_dollar_atp, contains_dollar_at);
+ else
+ tdesc = parameter_brace_expand_word (name, var_is_special, quoted, PF_IGNUNBOUND|(pflags&PF_NOSPLIT2));
+
+ if (tdesc)
+ {
+ temp = tdesc->word;
+ tflag = tdesc->flags;
+ dispose_word_desc (tdesc);
+ }
+ else
+ temp = (char *)0;
+
+#if defined (ARRAY_VARS)
+ if (valid_array_reference (name))
+ chk_atstar (name, quoted, quoted_dollar_atp, contains_dollar_at);
+#endif
+
+ var_is_set = temp != (char *)0;
+ var_is_null = check_nullness && (var_is_set == 0 || *temp == 0);
+
+ /* Get the rest of the stuff inside the braces. */
+ if (c && c != RBRACE)
+ {
+ /* Extract the contents of the ${ ... } expansion
+ according to the Posix.2 rules. */
+ value = extract_dollar_brace_string (string, &sindex, quoted, 0);
+ if (string[sindex] == RBRACE)
+ sindex++;
+ else
+ goto bad_substitution;
+ }
+ else
+ value = (char *)NULL;
+
+ *indexp = sindex;
+
+ /* If this is a substring spec, process it and add the result. */
+ if (want_substring)
+ {
+ temp1 = parameter_brace_substring (name, temp, value, quoted);
+ FREE (name);
+ FREE (value);
+ FREE (temp);
+
+ if (temp1 == &expand_param_error)
+ return (&expand_wdesc_error);
+ else if (temp1 == &expand_param_fatal)
+ return (&expand_wdesc_fatal);
+
+ ret = alloc_word_desc ();
+ ret->word = temp1;
+ if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
+ return ret;
+ }
+ else if (want_patsub)
+ {
+ temp1 = parameter_brace_patsub (name, temp, value, quoted);
+ FREE (name);
+ FREE (value);
+ FREE (temp);
+
+ if (temp1 == &expand_param_error)
+ return (&expand_wdesc_error);
+ else if (temp1 == &expand_param_fatal)
+ return (&expand_wdesc_fatal);
+
+ ret = alloc_word_desc ();
+ ret->word = temp1;
+ ret = alloc_word_desc ();
+ ret->word = temp1;
+ if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
+ return ret;
+ }
+#if defined (CASEMOD_EXPANSIONS)
+ else if (want_casemod)
+ {
+ temp1 = parameter_brace_casemod (name, temp, modspec, value, quoted);
+ FREE (name);
+ FREE (value);
+ FREE (temp);
+
+ if (temp1 == &expand_param_error)
+ return (&expand_wdesc_error);
+ else if (temp1 == &expand_param_fatal)
+ return (&expand_wdesc_fatal);
+
+ ret = alloc_word_desc ();
+ ret->word = temp1;
+ if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
+ return ret;
+ }
+#endif
+
+ /* Do the right thing based on which character ended the variable name. */
+ switch (c)
+ {
+ default:
+ case '\0':
+ bad_substitution:
+ report_error (_("%s: bad substitution"), string ? string : "??");
+ FREE (value);
+ FREE (temp);
+ free (name);
+ return &expand_wdesc_error;
+
+ case RBRACE:
+ if (var_is_set == 0 && unbound_vars_is_error && ((name[0] != '@' && name[0] != '*') || name[1]))
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (name);
+ FREE (value);
+ FREE (temp);
+ free (name);
+ return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
+ }
+ break;
+
+ case '#': /* ${param#[#]pattern} */
+ case '%': /* ${param%[%]pattern} */
+ if (value == 0 || *value == '\0' || temp == 0 || *temp == '\0')
+ {
+ FREE (value);
+ break;
+ }
+ temp1 = parameter_brace_remove_pattern (name, temp, value, c, quoted);
+ free (temp);
+ free (value);
+
+ ret = alloc_word_desc ();
+ ret->word = temp1;
+ if (temp1 && QUOTED_NULL (temp1) && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ret->flags |= W_QUOTED|W_HASQUOTEDNULL;
+ return ret;
+
+ case '-':
+ case '=':
+ case '?':
+ case '+':
+ if (var_is_set && var_is_null == 0)
+ {
+ /* If the operator is `+', we don't want the value of the named
+ variable for anything, just the value of the right hand side. */
+
+ if (c == '+')
+ {
+ /* XXX -- if we're double-quoted and the named variable is "$@",
+ we want to turn off any special handling of "$@" --
+ we're not using it, so whatever is on the rhs applies. */
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp)
+ *quoted_dollar_atp = 0;
+ if (contains_dollar_at)
+ *contains_dollar_at = 0;
+
+ FREE (temp);
+ if (value)
+ {
+ ret = parameter_brace_expand_rhs (name, value, c,
+ quoted,
+ quoted_dollar_atp,
+ contains_dollar_at);
+ /* XXX - fix up later, esp. noting presence of
+ W_HASQUOTEDNULL in ret->flags */
+ free (value);
+ }
+ else
+ temp = (char *)NULL;
+ }
+ else
+ {
+ FREE (value);
+ }
+ /* Otherwise do nothing; just use the value in TEMP. */
+ }
+ else /* VAR not set or VAR is NULL. */
+ {
+ FREE (temp);
+ temp = (char *)NULL;
+ if (c == '=' && var_is_special)
+ {
+ report_error (_("$%s: cannot assign in this way"), name);
+ free (name);
+ free (value);
+ return &expand_wdesc_error;
+ }
+ else if (c == '?')
+ {
+ parameter_brace_expand_error (name, value);
+ return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
+ }
+ else if (c != '+')
+ {
+ /* XXX -- if we're double-quoted and the named variable is "$@",
+ we want to turn off any special handling of "$@" --
+ we're not using it, so whatever is on the rhs applies. */
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && quoted_dollar_atp)
+ *quoted_dollar_atp = 0;
+ if (contains_dollar_at)
+ *contains_dollar_at = 0;
+
+ ret = parameter_brace_expand_rhs (name, value, c, quoted,
+ quoted_dollar_atp,
+ contains_dollar_at);
+ /* XXX - fix up later, esp. noting presence of
+ W_HASQUOTEDNULL in tdesc->flags */
+ }
+ free (value);
+ }
+
+ break;
+ }
+ free (name);
+
+ if (ret == 0)
+ {
+ ret = alloc_word_desc ();
+ ret->flags = tflag;
+ ret->word = temp;
+ }
+ return (ret);
+}
+
+/* Expand a single ${xxx} expansion. The braces are optional. When
+ the braces are used, parameter_brace_expand() does the work,
+ possibly calling param_expand recursively. */
+static WORD_DESC *
+param_expand (string, sindex, quoted, expanded_something,
+ contains_dollar_at, quoted_dollar_at_p, had_quoted_null_p,
+ pflags)
+ char *string;
+ int *sindex, quoted, *expanded_something, *contains_dollar_at;
+ int *quoted_dollar_at_p, *had_quoted_null_p, pflags;
+{
+ char *temp, *temp1, uerror[3];
+ int zindex, t_index, expok;
+ unsigned char c;
+ intmax_t number;
+ SHELL_VAR *var;
+ WORD_LIST *list;
+ WORD_DESC *tdesc, *ret;
+ int tflag;
+
+ zindex = *sindex;
+ c = string[++zindex];
+
+ temp = (char *)NULL;
+ ret = tdesc = (WORD_DESC *)NULL;
+ tflag = 0;
+
+ /* Do simple cases first. Switch on what follows '$'. */
+ switch (c)
+ {
+ /* $0 .. $9? */
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ temp1 = dollar_vars[TODIGIT (c)];
+ if (unbound_vars_is_error && temp1 == (char *)NULL)
+ {
+ uerror[0] = '$';
+ uerror[1] = c;
+ uerror[2] = '\0';
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (uerror);
+ return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
+ }
+ if (temp1)
+ temp = (*temp1 && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ? quote_string (temp1)
+ : quote_escapes (temp1);
+ else
+ temp = (char *)NULL;
+
+ break;
+
+ /* $$ -- pid of the invoking shell. */
+ case '$':
+ temp = itos (dollar_dollar_pid);
+ break;
+
+ /* $# -- number of positional parameters. */
+ case '#':
+ temp = itos (number_of_args ());
+ break;
+
+ /* $? -- return value of the last synchronous command. */
+ case '?':
+ temp = itos (last_command_exit_value);
+ break;
+
+ /* $- -- flags supplied to the shell on invocation or by `set'. */
+ case '-':
+ temp = which_set_flags ();
+ break;
+
+ /* $! -- Pid of the last asynchronous command. */
+ case '!':
+ /* If no asynchronous pids have been created, expand to nothing.
+ If `set -u' has been executed, and no async processes have
+ been created, this is an expansion error. */
+ if (last_asynchronous_pid == NO_PID)
+ {
+ if (expanded_something)
+ *expanded_something = 0;
+ temp = (char *)NULL;
+ if (unbound_vars_is_error)
+ {
+ uerror[0] = '$';
+ uerror[1] = c;
+ uerror[2] = '\0';
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (uerror);
+ return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
+ }
+ }
+ else
+ temp = itos (last_asynchronous_pid);
+ break;
+
+ /* The only difference between this and $@ is when the arg is quoted. */
+ case '*': /* `$*' */
+ list = list_rest_of_args ();
+
+#if 0
+ /* According to austin-group posix proposal by Geoff Clare in
+ <20090505091501.GA10097@squonk.masqnet> of 5 May 2009:
+
+ "The shell shall write a message to standard error and
+ immediately exit when it tries to expand an unset parameter
+ other than the '@' and '*' special parameters."
+ */
+
+ if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0)
+ {
+ uerror[0] = '$';
+ uerror[1] = '*';
+ uerror[2] = '\0';
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (uerror);
+ return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
+ }
+#endif
+
+ /* If there are no command-line arguments, this should just
+ disappear if there are other characters in the expansion,
+ even if it's quoted. */
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && list == 0)
+ temp = (char *)NULL;
+ else if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES|Q_PATQUOTE))
+ {
+ /* If we have "$*" we want to make a string of the positional
+ parameters, separated by the first character of $IFS, and
+ quote the whole string, including the separators. If IFS
+ is unset, the parameters are separated by ' '; if $IFS is
+ null, the parameters are concatenated. */
+ temp = (quoted & (Q_DOUBLE_QUOTES|Q_PATQUOTE)) ? string_list_dollar_star (list) : string_list (list);
+ temp1 = quote_string (temp);
+ if (*temp == 0)
+ tflag |= W_HASQUOTEDNULL;
+ free (temp);
+ temp = temp1;
+ }
+ else
+ {
+ /* We check whether or not we're eventually going to split $* here,
+ for example when IFS is empty and we are processing the rhs of
+ an assignment statement. In that case, we don't separate the
+ arguments at all. Otherwise, if the $* is not quoted it is
+ identical to $@ */
+#if 1
+# if defined (HANDLE_MULTIBYTE)
+ if (expand_no_split_dollar_star && ifs_firstc[0] == 0)
+# else
+ if (expand_no_split_dollar_star && ifs_firstc == 0)
+# endif
+ temp = string_list_dollar_star (list);
+ else
+ temp = string_list_dollar_at (list, quoted);
+#else
+ temp = string_list_dollar_at (list, quoted);
+#endif
+ if (expand_no_split_dollar_star == 0 && contains_dollar_at)
+ *contains_dollar_at = 1;
+ }
+
+ dispose_words (list);
+ break;
+
+ /* When we have "$@" what we want is "$1" "$2" "$3" ... This
+ means that we have to turn quoting off after we split into
+ the individually quoted arguments so that the final split
+ on the first character of $IFS is still done. */
+ case '@': /* `$@' */
+ list = list_rest_of_args ();
+
+#if 0
+ /* According to austin-group posix proposal by Geoff Clare in
+ <20090505091501.GA10097@squonk.masqnet> of 5 May 2009:
+
+ "The shell shall write a message to standard error and
+ immediately exit when it tries to expand an unset parameter
+ other than the '@' and '*' special parameters."
+ */
+
+ if (list == 0 && unbound_vars_is_error && (pflags & PF_IGNUNBOUND) == 0)
+ {
+ uerror[0] = '$';
+ uerror[1] = '@';
+ uerror[2] = '\0';
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (uerror);
+ return (interactive_shell ? &expand_wdesc_error : &expand_wdesc_fatal);
+ }
+#endif
+
+ /* We want to flag the fact that we saw this. We can't turn
+ off quoting entirely, because other characters in the
+ string might need it (consider "\"$@\""), but we need some
+ way to signal that the final split on the first character
+ of $IFS should be done, even though QUOTED is 1. */
+ /* XXX - should this test include Q_PATQUOTE? */
+ if (quoted_dollar_at_p && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ *quoted_dollar_at_p = 1;
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+
+#if 0
+ if (pflags & PF_NOSPLIT2)
+ temp = string_list_internal (quoted ? quote_list (list) : list, " ");
+ else
+#endif
+ /* We want to separate the positional parameters with the first
+ character of $IFS in case $IFS is something other than a space.
+ We also want to make sure that splitting is done no matter what --
+ according to POSIX.2, this expands to a list of the positional
+ parameters no matter what IFS is set to. */
+ temp = string_list_dollar_at (list, quoted);
+
+ dispose_words (list);
+ break;
+
+ case LBRACE:
+ tdesc = parameter_brace_expand (string, &zindex, quoted, pflags,
+ quoted_dollar_at_p,
+ contains_dollar_at);
+
+ if (tdesc == &expand_wdesc_error || tdesc == &expand_wdesc_fatal)
+ return (tdesc);
+ temp = tdesc ? tdesc->word : (char *)0;
+
+ /* XXX */
+ /* Quoted nulls should be removed if there is anything else
+ in the string. */
+ /* Note that we saw the quoted null so we can add one back at
+ the end of this function if there are no other characters
+ in the string, discard TEMP, and go on. The exception to
+ this is when we have "${@}" and $1 is '', since $@ needs
+ special handling. */
+ if (tdesc && tdesc->word && (tdesc->flags & W_HASQUOTEDNULL) && QUOTED_NULL (temp))
+ {
+ if (had_quoted_null_p)
+ *had_quoted_null_p = 1;
+ if (*quoted_dollar_at_p == 0)
+ {
+ free (temp);
+ tdesc->word = temp = (char *)NULL;
+ }
+
+ }
+
+ ret = tdesc;
+ goto return0;
+
+ /* Do command or arithmetic substitution. */
+ case LPAREN:
+ /* We have to extract the contents of this paren substitution. */
+ t_index = zindex + 1;
+ temp = extract_command_subst (string, &t_index, 0);
+ zindex = t_index;
+
+ /* For Posix.2-style `$(( ))' arithmetic substitution,
+ extract the expression and pass it to the evaluator. */
+ if (temp && *temp == LPAREN)
+ {
+ char *temp2;
+ temp1 = temp + 1;
+ temp2 = savestring (temp1);
+ t_index = strlen (temp2) - 1;
+
+ if (temp2[t_index] != RPAREN)
+ {
+ free (temp2);
+ goto comsub;
+ }
+
+ /* Cut off ending `)' */
+ temp2[t_index] = '\0';
+
+ if (chk_arithsub (temp2, t_index) == 0)
+ {
+ free (temp2);
+#if 0
+ internal_warning (_("future versions of the shell will force evaluation as an arithmetic substitution"));
+#endif
+ goto comsub;
+ }
+
+ /* Expand variables found inside the expression. */
+ temp1 = expand_arith_string (temp2, Q_DOUBLE_QUOTES);
+ free (temp2);
+
+arithsub:
+ /* No error messages. */
+ this_command_name = (char *)NULL;
+ number = evalexp (temp1, &expok);
+ free (temp);
+ free (temp1);
+ if (expok == 0)
+ {
+ if (interactive_shell == 0 && posixly_correct)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ return (&expand_wdesc_fatal);
+ }
+ else
+ return (&expand_wdesc_error);
+ }
+ temp = itos (number);
+ break;
+ }
+
+comsub:
+ if (pflags & PF_NOCOMSUB)
+ /* we need zindex+1 because string[zindex] == RPAREN */
+ temp1 = substring (string, *sindex, zindex+1);
+ else
+ {
+ tdesc = command_substitute (temp, quoted);
+ temp1 = tdesc ? tdesc->word : (char *)NULL;
+ if (tdesc)
+ dispose_word_desc (tdesc);
+ }
+ FREE (temp);
+ temp = temp1;
+ break;
+
+ /* Do POSIX.2d9-style arithmetic substitution. This will probably go
+ away in a future bash release. */
+ case '[':
+ /* Extract the contents of this arithmetic substitution. */
+ t_index = zindex + 1;
+ temp = extract_arithmetic_subst (string, &t_index);
+ zindex = t_index;
+ if (temp == 0)
+ {
+ temp = savestring (string);
+ if (expanded_something)
+ *expanded_something = 0;
+ goto return0;
+ }
+
+ /* Do initial variable expansion. */
+ temp1 = expand_arith_string (temp, Q_DOUBLE_QUOTES);
+
+ goto arithsub;
+
+ default:
+ /* Find the variable in VARIABLE_LIST. */
+ temp = (char *)NULL;
+
+ for (t_index = zindex; (c = string[zindex]) && legal_variable_char (c); zindex++)
+ ;
+ temp1 = (zindex > t_index) ? substring (string, t_index, zindex) : (char *)NULL;
+
+ /* If this isn't a variable name, then just output the `$'. */
+ if (temp1 == 0 || *temp1 == '\0')
+ {
+ FREE (temp1);
+ temp = (char *)xmalloc (2);
+ temp[0] = '$';
+ temp[1] = '\0';
+ if (expanded_something)
+ *expanded_something = 0;
+ goto return0;
+ }
+
+ /* If the variable exists, return its value cell. */
+ var = find_variable (temp1);
+
+ if (var && invisible_p (var) == 0 && var_isset (var))
+ {
+#if defined (ARRAY_VARS)
+ if (assoc_p (var) || array_p (var))
+ {
+ temp = array_p (var) ? array_reference (array_cell (var), 0)
+ : assoc_reference (assoc_cell (var), "0");
+ if (temp)
+ temp = (*temp && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ? quote_string (temp)
+ : quote_escapes (temp);
+ else if (unbound_vars_is_error)
+ goto unbound_variable;
+ }
+ else
+#endif
+ {
+ temp = value_cell (var);
+
+ temp = (*temp && (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)))
+ ? quote_string (temp)
+ : quote_escapes (temp);
+ }
+
+ free (temp1);
+
+ goto return0;
+ }
+
+ temp = (char *)NULL;
+
+unbound_variable:
+ if (unbound_vars_is_error)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ err_unboundvar (temp1);
+ }
+ else
+ {
+ free (temp1);
+ goto return0;
+ }
+
+ free (temp1);
+ last_command_exit_value = EXECUTION_FAILURE;
+ return ((unbound_vars_is_error && interactive_shell == 0)
+ ? &expand_wdesc_fatal
+ : &expand_wdesc_error);
+ }
+
+ if (string[zindex])
+ zindex++;
+
+return0:
+ *sindex = zindex;
+
+ if (ret == 0)
+ {
+ ret = alloc_word_desc ();
+ ret->flags = tflag; /* XXX */
+ ret->word = temp;
+ }
+ return ret;
+}
+
+/* Make a word list which is the result of parameter and variable
+ expansion, command substitution, arithmetic substitution, and
+ quote removal of WORD. Return a pointer to a WORD_LIST which is
+ the result of the expansion. If WORD contains a null word, the
+ word list returned is also null.
+
+ QUOTED contains flag values defined in shell.h.
+
+ ISEXP is used to tell expand_word_internal that the word should be
+ treated as the result of an expansion. This has implications for
+ how IFS characters in the word are treated.
+
+ CONTAINS_DOLLAR_AT and EXPANDED_SOMETHING are return values; when non-null
+ they point to an integer value which receives information about expansion.
+ CONTAINS_DOLLAR_AT gets non-zero if WORD contained "$@", else zero.
+ EXPANDED_SOMETHING get non-zero if WORD contained any parameter expansions,
+ else zero.
+
+ This only does word splitting in the case of $@ expansion. In that
+ case, we split on ' '. */
+
+/* Values for the local variable quoted_state. */
+#define UNQUOTED 0
+#define PARTIALLY_QUOTED 1
+#define WHOLLY_QUOTED 2
+
+static WORD_LIST *
+expand_word_internal (word, quoted, isexp, contains_dollar_at, expanded_something)
+ WORD_DESC *word;
+ int quoted, isexp;
+ int *contains_dollar_at;
+ int *expanded_something;
+{
+ WORD_LIST *list;
+ WORD_DESC *tword;
+
+ /* The intermediate string that we build while expanding. */
+ char *istring;
+
+ /* The current size of the above object. */
+ int istring_size;
+
+ /* Index into ISTRING. */
+ int istring_index;
+
+ /* Temporary string storage. */
+ char *temp, *temp1;
+
+ /* The text of WORD. */
+ register char *string;
+
+ /* The size of STRING. */
+ size_t string_size;
+
+ /* The index into STRING. */
+ int sindex;
+
+ /* This gets 1 if we see a $@ while quoted. */
+ int quoted_dollar_at;
+
+ /* One of UNQUOTED, PARTIALLY_QUOTED, or WHOLLY_QUOTED, depending on
+ whether WORD contains no quoting characters, a partially quoted
+ string (e.g., "xx"ab), or is fully quoted (e.g., "xxab"). */
+ int quoted_state;
+
+ /* State flags */
+ int had_quoted_null;
+ int has_dollar_at;
+ int tflag;
+ int pflags; /* flags passed to param_expand */
+
+ int assignoff; /* If assignment, offset of `=' */
+
+ register unsigned char c; /* Current character. */
+ int t_index; /* For calls to string_extract_xxx. */
+
+ char twochars[2];
+
+ DECLARE_MBSTATE;
+
+ istring = (char *)xmalloc (istring_size = DEFAULT_INITIAL_ARRAY_SIZE);
+ istring[istring_index = 0] = '\0';
+ quoted_dollar_at = had_quoted_null = has_dollar_at = 0;
+ quoted_state = UNQUOTED;
+
+ string = word->word;
+ if (string == 0)
+ goto finished_with_string;
+ /* Don't need the string length for the SADD... and COPY_ macros unless
+ multibyte characters are possible. */
+ string_size = (MB_CUR_MAX > 1) ? strlen (string) : 1;
+
+ if (contains_dollar_at)
+ *contains_dollar_at = 0;
+
+ assignoff = -1;
+
+ /* Begin the expansion. */
+
+ for (sindex = 0; ;)
+ {
+ c = string[sindex];
+
+ /* Case on toplevel character. */
+ switch (c)
+ {
+ case '\0':
+ goto finished_with_string;
+
+ case CTLESC:
+ sindex++;
+#if HANDLE_MULTIBYTE
+ if (MB_CUR_MAX > 1 && string[sindex])
+ {
+ SADD_MBQCHAR_BODY(temp, string, sindex, string_size);
+ }
+ else
+#endif
+ {
+ temp = (char *)xmalloc (3);
+ temp[0] = CTLESC;
+ temp[1] = c = string[sindex];
+ temp[2] = '\0';
+ }
+
+dollar_add_string:
+ if (string[sindex])
+ sindex++;
+
+add_string:
+ if (temp)
+ {
+ istring = sub_append_string (temp, istring, &istring_index, &istring_size);
+ temp = (char *)0;
+ }
+
+ break;
+
+#if defined (PROCESS_SUBSTITUTION)
+ /* Process substitution. */
+ case '<':
+ case '>':
+ {
+ if (string[++sindex] != LPAREN || (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (word->flags & (W_DQUOTE|W_NOPROCSUB)) || posixly_correct)
+ {
+ sindex--; /* add_character: label increments sindex */
+ goto add_character;
+ }
+ else
+ t_index = sindex + 1; /* skip past both '<' and LPAREN */
+
+ temp1 = extract_process_subst (string, (c == '<') ? "<(" : ">(", &t_index); /*))*/
+ sindex = t_index;
+
+ /* If the process substitution specification is `<()', we want to
+ open the pipe for writing in the child and produce output; if
+ it is `>()', we want to open the pipe for reading in the child
+ and consume input. */
+ temp = temp1 ? process_substitute (temp1, (c == '>')) : (char *)0;
+
+ FREE (temp1);
+
+ goto dollar_add_string;
+ }
+#endif /* PROCESS_SUBSTITUTION */
+
+ case '=':
+ /* Posix.2 section 3.6.1 says that tildes following `=' in words
+ which are not assignment statements are not expanded. If the
+ shell isn't in posix mode, though, we perform tilde expansion
+ on `likely candidate' unquoted assignment statements (flags
+ include W_ASSIGNMENT but not W_QUOTED). A likely candidate
+ contains an unquoted :~ or =~. Something to think about: we
+ now have a flag that says to perform tilde expansion on arguments
+ to `assignment builtins' like declare and export that look like
+ assignment statements. We now do tilde expansion on such words
+ even in POSIX mode. */
+ if (word->flags & (W_ASSIGNRHS|W_NOTILDE))
+ {
+ if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c))
+ goto add_ifs_character;
+ else
+ goto add_character;
+ }
+ /* If we're not in posix mode or forcing assignment-statement tilde
+ expansion, note where the `=' appears in the word and prepare to
+ do tilde expansion following the first `='. */
+ if ((word->flags & W_ASSIGNMENT) &&
+ (posixly_correct == 0 || (word->flags & W_TILDEEXP)) &&
+ assignoff == -1 && sindex > 0)
+ assignoff = sindex;
+ if (sindex == assignoff && string[sindex+1] == '~') /* XXX */
+ word->flags |= W_ITILDE;
+#if 0
+ else if ((word->flags & W_ASSIGNMENT) &&
+ (posixly_correct == 0 || (word->flags & W_TILDEEXP)) &&
+ string[sindex+1] == '~')
+ word->flags |= W_ITILDE;
+#endif
+ if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c))
+ goto add_ifs_character;
+ else
+ goto add_character;
+
+ case ':':
+ if (word->flags & W_NOTILDE)
+ {
+ if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c))
+ goto add_ifs_character;
+ else
+ goto add_character;
+ }
+
+ if ((word->flags & (W_ASSIGNMENT|W_ASSIGNRHS|W_TILDEEXP)) &&
+ string[sindex+1] == '~')
+ word->flags |= W_ITILDE;
+
+ if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c))
+ goto add_ifs_character;
+ else
+ goto add_character;
+
+ case '~':
+ /* If the word isn't supposed to be tilde expanded, or we're not
+ at the start of a word or after an unquoted : or = in an
+ assignment statement, we don't do tilde expansion. */
+ if ((word->flags & (W_NOTILDE|W_DQUOTE)) ||
+ (sindex > 0 && ((word->flags & W_ITILDE) == 0)) ||
+ (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+ {
+ word->flags &= ~W_ITILDE;
+ if (isexp == 0 && (word->flags & (W_NOSPLIT|W_NOSPLIT2)) == 0 && isifs (c) && (quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) == 0)
+ goto add_ifs_character;
+ else
+ goto add_character;
+ }
+
+ if (word->flags & W_ASSIGNRHS)
+ tflag = 2;
+ else if (word->flags & (W_ASSIGNMENT|W_TILDEEXP))
+ tflag = 1;
+ else
+ tflag = 0;
+
+ temp = bash_tilde_find_word (string + sindex, tflag, &t_index);
+
+ word->flags &= ~W_ITILDE;
+
+ if (temp && *temp && t_index > 0)
+ {
+ temp1 = bash_tilde_expand (temp, tflag);
+ if (temp1 && *temp1 == '~' && STREQ (temp, temp1))
+ {
+ FREE (temp);
+ FREE (temp1);
+ goto add_character; /* tilde expansion failed */
+ }
+ free (temp);
+ temp = temp1;
+ sindex += t_index;
+ goto add_quoted_string; /* XXX was add_string */
+ }
+ else
+ {
+ FREE (temp);
+ goto add_character;
+ }
+
+ case '$':
+ if (expanded_something)
+ *expanded_something = 1;
+
+ has_dollar_at = 0;
+ pflags = (word->flags & W_NOCOMSUB) ? PF_NOCOMSUB : 0;
+ if (word->flags & W_NOSPLIT2)
+ pflags |= PF_NOSPLIT2;
+ tword = param_expand (string, &sindex, quoted, expanded_something,
+ &has_dollar_at, &quoted_dollar_at,
+ &had_quoted_null, pflags);
+
+ if (tword == &expand_wdesc_error || tword == &expand_wdesc_fatal)
+ {
+ free (string);
+ free (istring);
+ return ((tword == &expand_wdesc_error) ? &expand_word_error
+ : &expand_word_fatal);
+ }
+ if (contains_dollar_at && has_dollar_at)
+ *contains_dollar_at = 1;
+
+ if (tword && (tword->flags & W_HASQUOTEDNULL))
+ had_quoted_null = 1;
+
+ temp = tword->word;
+ dispose_word_desc (tword);
+
+ goto add_string;
+ break;
+
+ case '`': /* Backquoted command substitution. */
+ {
+ t_index = sindex++;
+
+ temp = string_extract (string, &sindex, "`", SX_REQMATCH);
+ /* The test of sindex against t_index is to allow bare instances of
+ ` to pass through, for backwards compatibility. */
+ if (temp == &extract_string_error || temp == &extract_string_fatal)
+ {
+ if (sindex - 1 == t_index)
+ {
+ sindex = t_index;
+ goto add_character;
+ }
+ report_error (_("bad substitution: no closing \"`\" in %s") , string+t_index);
+ free (string);
+ free (istring);
+ return ((temp == &extract_string_error) ? &expand_word_error
+ : &expand_word_fatal);
+ }
+
+ if (expanded_something)
+ *expanded_something = 1;
+
+ if (word->flags & W_NOCOMSUB)
+ /* sindex + 1 because string[sindex] == '`' */
+ temp1 = substring (string, t_index, sindex + 1);
+ else
+ {
+ de_backslash (temp);
+ tword = command_substitute (temp, quoted);
+ temp1 = tword ? tword->word : (char *)NULL;
+ if (tword)
+ dispose_word_desc (tword);
+ }
+ FREE (temp);
+ temp = temp1;
+ goto dollar_add_string;
+ }
+
+ case '\\':
+ if (string[sindex + 1] == '\n')
+ {
+ sindex += 2;
+ continue;
+ }
+
+ c = string[++sindex];
+
+ if (quoted & Q_HERE_DOCUMENT)
+ tflag = CBSHDOC;
+ else if (quoted & Q_DOUBLE_QUOTES)
+ tflag = CBSDQUOTE;
+ else
+ tflag = 0;
+
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) && ((sh_syntaxtab[c] & tflag) == 0))
+ {
+ SCOPY_CHAR_I (twochars, '\\', c, string, sindex, string_size);
+ }
+ else if (c == 0)
+ {
+ c = CTLNUL;
+ sindex--; /* add_character: label increments sindex */
+ goto add_character;
+ }
+ else
+ {
+ SCOPY_CHAR_I (twochars, CTLESC, c, string, sindex, string_size);
+ }
+
+ sindex++;
+add_twochars:
+ /* BEFORE jumping here, we need to increment sindex if appropriate */
+ RESIZE_MALLOCED_BUFFER (istring, istring_index, 2, istring_size,
+ DEFAULT_ARRAY_SIZE);
+ istring[istring_index++] = twochars[0];
+ istring[istring_index++] = twochars[1];
+ istring[istring_index] = '\0';
+
+ break;
+
+ case '"':
+#if 0
+ if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) || (word->flags & W_DQUOTE))
+#else
+ if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+#endif
+ goto add_character;
+
+ t_index = ++sindex;
+ temp = string_extract_double_quoted (string, &sindex, 0);
+
+ /* If the quotes surrounded the entire string, then the
+ whole word was quoted. */
+ quoted_state = (t_index == 1 && string[sindex] == '\0')
+ ? WHOLLY_QUOTED
+ : PARTIALLY_QUOTED;
+
+ if (temp && *temp)
+ {
+ tword = alloc_word_desc ();
+ tword->word = temp;
+
+ temp = (char *)NULL;
+
+ has_dollar_at = 0;
+ /* Need to get W_HASQUOTEDNULL flag through this function. */
+ list = expand_word_internal (tword, Q_DOUBLE_QUOTES, 0, &has_dollar_at, (int *)NULL);
+
+ if (list == &expand_word_error || list == &expand_word_fatal)
+ {
+ free (istring);
+ free (string);
+ /* expand_word_internal has already freed temp_word->word
+ for us because of the way it prints error messages. */
+ tword->word = (char *)NULL;
+ dispose_word (tword);
+ return list;
+ }
+
+ dispose_word (tword);
+
+ /* "$@" (a double-quoted dollar-at) expands into nothing,
+ not even a NULL word, when there are no positional
+ parameters. */
+ if (list == 0 && has_dollar_at)
+ {
+ quoted_dollar_at++;
+ break;
+ }
+
+ /* If we get "$@", we know we have expanded something, so we
+ need to remember it for the final split on $IFS. This is
+ a special case; it's the only case where a quoted string
+ can expand into more than one word. It's going to come back
+ from the above call to expand_word_internal as a list with
+ a single word, in which all characters are quoted and
+ separated by blanks. What we want to do is to turn it back
+ into a list for the next piece of code. */
+ if (list)
+ dequote_list (list);
+
+ if (list && list->word && (list->word->flags & W_HASQUOTEDNULL))
+ had_quoted_null = 1;
+
+ if (has_dollar_at)
+ {
+ quoted_dollar_at++;
+ if (contains_dollar_at)
+ *contains_dollar_at = 1;
+ if (expanded_something)
+ *expanded_something = 1;
+ }
+ }
+ else
+ {
+ /* What we have is "". This is a minor optimization. */
+ FREE (temp);
+ list = (WORD_LIST *)NULL;
+ }
+
+ /* The code above *might* return a list (consider the case of "$@",
+ where it returns "$1", "$2", etc.). We can't throw away the
+ rest of the list, and we have to make sure each word gets added
+ as quoted. We test on tresult->next: if it is non-NULL, we
+ quote the whole list, save it to a string with string_list, and
+ add that string. We don't need to quote the results of this
+ (and it would be wrong, since that would quote the separators
+ as well), so we go directly to add_string. */
+ if (list)
+ {
+ if (list->next)
+ {
+#if 0
+ if (quoted_dollar_at && word->flags & W_NOSPLIT2)
+ temp = string_list_internal (quote_list (list), " ");
+ else
+#endif
+ /* Testing quoted_dollar_at makes sure that "$@" is
+ split correctly when $IFS does not contain a space. */
+ temp = quoted_dollar_at
+ ? string_list_dollar_at (list, Q_DOUBLE_QUOTES)
+ : string_list (quote_list (list));
+ dispose_words (list);
+ goto add_string;
+ }
+ else
+ {
+ temp = savestring (list->word->word);
+ tflag = list->word->flags;
+ dispose_words (list);
+
+ /* If the string is not a quoted null string, we want
+ to remove any embedded unquoted CTLNUL characters.
+ We do not want to turn quoted null strings back into
+ the empty string, though. We do this because we
+ want to remove any quoted nulls from expansions that
+ contain other characters. For example, if we have
+ x"$*"y or "x$*y" and there are no positional parameters,
+ the $* should expand into nothing. */
+ /* We use the W_HASQUOTEDNULL flag to differentiate the
+ cases: a quoted null character as above and when
+ CTLNUL is contained in the (non-null) expansion
+ of some variable. We use the had_quoted_null flag to
+ pass the value through this function to its caller. */
+ if ((tflag & W_HASQUOTEDNULL) && QUOTED_NULL (temp) == 0)
+ remove_quoted_nulls (temp); /* XXX */
+ }
+ }
+ else
+ temp = (char *)NULL;
+
+ /* We do not want to add quoted nulls to strings that are only
+ partially quoted; we can throw them away. */
+ if (temp == 0 && quoted_state == PARTIALLY_QUOTED)
+ continue;
+
+ add_quoted_string:
+
+ if (temp)
+ {
+ temp1 = temp;
+ temp = quote_string (temp);
+ free (temp1);
+ goto add_string;
+ }
+ else
+ {
+ /* Add NULL arg. */
+ c = CTLNUL;
+ sindex--; /* add_character: label increments sindex */
+ goto add_character;
+ }
+
+ /* break; */
+
+ case '\'':
+#if 0
+ if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) || (word->flags & W_DQUOTE))
+#else
+ if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)))
+#endif
+ goto add_character;
+
+ t_index = ++sindex;
+ temp = string_extract_single_quoted (string, &sindex);
+
+ /* If the entire STRING was surrounded by single quotes,
+ then the string is wholly quoted. */
+ quoted_state = (t_index == 1 && string[sindex] == '\0')
+ ? WHOLLY_QUOTED
+ : PARTIALLY_QUOTED;
+
+ /* If all we had was '', it is a null expansion. */
+ if (*temp == '\0')
+ {
+ free (temp);
+ temp = (char *)NULL;
+ }
+ else
+ remove_quoted_escapes (temp); /* ??? */
+
+ /* We do not want to add quoted nulls to strings that are only
+ partially quoted; such nulls are discarded. */
+ if (temp == 0 && (quoted_state == PARTIALLY_QUOTED))
+ continue;
+
+ /* If we have a quoted null expansion, add a quoted NULL to istring. */
+ if (temp == 0)
+ {
+ c = CTLNUL;
+ sindex--; /* add_character: label increments sindex */
+ goto add_character;
+ }
+ else
+ goto add_quoted_string;
+
+ /* break; */
+
+ default:
+ /* This is the fix for " $@ " */
+ add_ifs_character:
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || (isexp == 0 && isifs (c)))
+ {
+ if (string[sindex]) /* from old goto dollar_add_string */
+ sindex++;
+ if (c == 0)
+ {
+ c = CTLNUL;
+ goto add_character;
+ }
+ else
+ {
+#if HANDLE_MULTIBYTE
+ if (MB_CUR_MAX > 1)
+ sindex--;
+
+ if (MB_CUR_MAX > 1)
+ {
+ SADD_MBQCHAR_BODY(temp, string, sindex, string_size);
+ }
+ else
+#endif
+ {
+ twochars[0] = CTLESC;
+ twochars[1] = c;
+ goto add_twochars;
+ }
+ }
+ }
+
+ SADD_MBCHAR (temp, string, sindex, string_size);
+
+ add_character:
+ RESIZE_MALLOCED_BUFFER (istring, istring_index, 1, istring_size,
+ DEFAULT_ARRAY_SIZE);
+ istring[istring_index++] = c;
+ istring[istring_index] = '\0';
+
+ /* Next character. */
+ sindex++;
+ }
+ }
+
+finished_with_string:
+ /* OK, we're ready to return. If we have a quoted string, and
+ quoted_dollar_at is not set, we do no splitting at all; otherwise
+ we split on ' '. The routines that call this will handle what to
+ do if nothing has been expanded. */
+
+ /* Partially and wholly quoted strings which expand to the empty
+ string are retained as an empty arguments. Unquoted strings
+ which expand to the empty string are discarded. The single
+ exception is the case of expanding "$@" when there are no
+ positional parameters. In that case, we discard the expansion. */
+
+ /* Because of how the code that handles "" and '' in partially
+ quoted strings works, we need to make ISTRING into a QUOTED_NULL
+ if we saw quoting characters, but the expansion was empty.
+ "" and '' are tossed away before we get to this point when
+ processing partially quoted strings. This makes "" and $xxx""
+ equivalent when xxx is unset. We also look to see whether we
+ saw a quoted null from a ${} expansion and add one back if we
+ need to. */
+
+ /* If we expand to nothing and there were no single or double quotes
+ in the word, we throw it away. Otherwise, we return a NULL word.
+ The single exception is for $@ surrounded by double quotes when
+ there are no positional parameters. In that case, we also throw
+ the word away. */
+
+ if (*istring == '\0')
+ {
+ if (quoted_dollar_at == 0 && (had_quoted_null || quoted_state == PARTIALLY_QUOTED))
+ {
+ istring[0] = CTLNUL;
+ istring[1] = '\0';
+ tword = make_bare_word (istring);
+ tword->flags |= W_HASQUOTEDNULL; /* XXX */
+ list = make_word_list (tword, (WORD_LIST *)NULL);
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ tword->flags |= W_QUOTED;
+ }
+ /* According to sh, ksh, and Posix.2, if a word expands into nothing
+ and a double-quoted "$@" appears anywhere in it, then the entire
+ word is removed. */
+ else if (quoted_state == UNQUOTED || quoted_dollar_at)
+ list = (WORD_LIST *)NULL;
+#if 0
+ else
+ {
+ tword = make_bare_word (istring);
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ tword->flags |= W_QUOTED;
+ list = make_word_list (tword, (WORD_LIST *)NULL);
+ }
+#else
+ else
+ list = (WORD_LIST *)NULL;
+#endif
+ }
+ else if (word->flags & W_NOSPLIT)
+ {
+ tword = make_bare_word (istring);
+ if (word->flags & W_ASSIGNMENT)
+ tword->flags |= W_ASSIGNMENT; /* XXX */
+ if (word->flags & W_COMPASSIGN)
+ tword->flags |= W_COMPASSIGN; /* XXX */
+ if (word->flags & W_NOGLOB)
+ tword->flags |= W_NOGLOB; /* XXX */
+ if (word->flags & W_NOEXPAND)
+ tword->flags |= W_NOEXPAND; /* XXX */
+ if (quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES))
+ tword->flags |= W_QUOTED;
+ if (had_quoted_null)
+ tword->flags |= W_HASQUOTEDNULL;
+ list = make_word_list (tword, (WORD_LIST *)NULL);
+ }
+ else
+ {
+ char *ifs_chars;
+
+ ifs_chars = (quoted_dollar_at || has_dollar_at) ? ifs_value : (char *)NULL;
+
+ /* If we have $@, we need to split the results no matter what. If
+ IFS is unset or NULL, string_list_dollar_at has separated the
+ positional parameters with a space, so we split on space (we have
+ set ifs_chars to " \t\n" above if ifs is unset). If IFS is set,
+ string_list_dollar_at has separated the positional parameters
+ with the first character of $IFS, so we split on $IFS. */
+ if (has_dollar_at && ifs_chars)
+ list = list_string (istring, *ifs_chars ? ifs_chars : " ", 1);
+ else
+ {
+ tword = make_bare_word (istring);
+ if ((quoted & (Q_DOUBLE_QUOTES|Q_HERE_DOCUMENT)) || (quoted_state == WHOLLY_QUOTED))
+ tword->flags |= W_QUOTED;
+ if (word->flags & W_ASSIGNMENT)
+ tword->flags |= W_ASSIGNMENT;
+ if (word->flags & W_COMPASSIGN)
+ tword->flags |= W_COMPASSIGN;
+ if (word->flags & W_NOGLOB)
+ tword->flags |= W_NOGLOB;
+ if (word->flags & W_NOEXPAND)
+ tword->flags |= W_NOEXPAND;
+ if (had_quoted_null)
+ tword->flags |= W_HASQUOTEDNULL; /* XXX */
+ list = make_word_list (tword, (WORD_LIST *)NULL);
+ }
+ }
+
+ free (istring);
+ return (list);
+}
+
+/* **************************************************************** */
+/* */
+/* Functions for Quote Removal */
+/* */
+/* **************************************************************** */
+
+/* Perform quote removal on STRING. If QUOTED > 0, assume we are obeying the
+ backslash quoting rules for within double quotes or a here document. */
+char *
+string_quote_removal (string, quoted)
+ char *string;
+ int quoted;
+{
+ size_t slen;
+ char *r, *result_string, *temp, *send;
+ int sindex, tindex, dquote;
+ unsigned char c;
+ DECLARE_MBSTATE;
+
+ /* The result can be no longer than the original string. */
+ slen = strlen (string);
+ send = string + slen;
+
+ r = result_string = (char *)xmalloc (slen + 1);
+
+ for (dquote = sindex = 0; c = string[sindex];)
+ {
+ switch (c)
+ {
+ case '\\':
+ c = string[++sindex];
+ if (c == 0)
+ {
+ *r++ = '\\';
+ break;
+ }
+ if (((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || dquote) && (sh_syntaxtab[c] & CBSDQUOTE) == 0)
+ *r++ = '\\';
+ /* FALLTHROUGH */
+
+ default:
+ SCOPY_CHAR_M (r, string, send, sindex);
+ break;
+
+ case '\'':
+ if ((quoted & (Q_HERE_DOCUMENT|Q_DOUBLE_QUOTES)) || dquote)
+ {
+ *r++ = c;
+ sindex++;
+ break;
+ }
+ tindex = sindex + 1;
+ temp = string_extract_single_quoted (string, &tindex);
+ if (temp)
+ {
+ strcpy (r, temp);
+ r += strlen (r);
+ free (temp);
+ }
+ sindex = tindex;
+ break;
+
+ case '"':
+ dquote = 1 - dquote;
+ sindex++;
+ break;
+ }
+ }
+ *r = '\0';
+ return (result_string);
+}
+
+#if 0
+/* UNUSED */
+/* Perform quote removal on word WORD. This allocates and returns a new
+ WORD_DESC *. */
+WORD_DESC *
+word_quote_removal (word, quoted)
+ WORD_DESC *word;
+ int quoted;
+{
+ WORD_DESC *w;
+ char *t;
+
+ t = string_quote_removal (word->word, quoted);
+ w = alloc_word_desc ();
+ w->word = t ? t : savestring ("");
+ return (w);
+}
+
+/* Perform quote removal on all words in LIST. If QUOTED is non-zero,
+ the members of the list are treated as if they are surrounded by
+ double quotes. Return a new list, or NULL if LIST is NULL. */
+WORD_LIST *
+word_list_quote_removal (list, quoted)
+ WORD_LIST *list;
+ int quoted;
+{
+ WORD_LIST *result, *t, *tresult, *e;
+
+ for (t = list, result = (WORD_LIST *)NULL; t; t = t->next)
+ {
+ tresult = make_word_list (word_quote_removal (t->word, quoted), (WORD_LIST *)NULL);
+#if 0
+ result = (WORD_LIST *) list_append (result, tresult);
+#else
+ if (result == 0)
+ result = e = tresult;
+ else
+ {
+ e->next = tresult;
+ while (e->next)
+ e = e->next;
+ }
+#endif
+ }
+ return (result);
+}
+#endif
+
+/*******************************************
+ * *
+ * Functions to perform word splitting *
+ * *
+ *******************************************/
+
+void
+setifs (v)
+ SHELL_VAR *v;
+{
+ char *t;
+ unsigned char uc;
+
+ ifs_var = v;
+ ifs_value = (v && value_cell (v)) ? value_cell (v) : " \t\n";
+
+ /* Should really merge ifs_cmap with sh_syntaxtab. XXX - doesn't yet
+ handle multibyte chars in IFS */
+ memset (ifs_cmap, '\0', sizeof (ifs_cmap));
+ for (t = ifs_value ; t && *t; t++)
+ {
+ uc = *t;
+ ifs_cmap[uc] = 1;
+ }
+
+#if defined (HANDLE_MULTIBYTE)
+ if (ifs_value == 0)
+ {
+ ifs_firstc[0] = '\0';
+ ifs_firstc_len = 1;
+ }
+ else
+ {
+ size_t ifs_len;
+ ifs_len = strnlen (ifs_value, MB_CUR_MAX);
+ ifs_firstc_len = MBLEN (ifs_value, ifs_len);
+ if (ifs_firstc_len == 1 || ifs_firstc_len == 0 || MB_INVALIDCH (ifs_firstc_len))
+ {
+ ifs_firstc[0] = ifs_value[0];
+ ifs_firstc[1] = '\0';
+ ifs_firstc_len = 1;
+ }
+ else
+ memcpy (ifs_firstc, ifs_value, ifs_firstc_len);
+ }
+#else
+ ifs_firstc = ifs_value ? *ifs_value : 0;
+#endif
+}
+
+char *
+getifs ()
+{
+ return ifs_value;
+}
+
+/* This splits a single word into a WORD LIST on $IFS, but only if the word
+ is not quoted. list_string () performs quote removal for us, even if we
+ don't do any splitting. */
+WORD_LIST *
+word_split (w, ifs_chars)
+ WORD_DESC *w;
+ char *ifs_chars;
+{
+ WORD_LIST *result;
+
+ if (w)
+ {
+ char *xifs;
+
+ xifs = ((w->flags & W_QUOTED) || ifs_chars == 0) ? "" : ifs_chars;
+ result = list_string (w->word, xifs, w->flags & W_QUOTED);
+ }
+ else
+ result = (WORD_LIST *)NULL;
+
+ return (result);
+}
+
+/* Perform word splitting on LIST and return the RESULT. It is possible
+ to return (WORD_LIST *)NULL. */
+static WORD_LIST *
+word_list_split (list)
+ WORD_LIST *list;
+{
+ WORD_LIST *result, *t, *tresult, *e;
+
+ for (t = list, result = (WORD_LIST *)NULL; t; t = t->next)
+ {
+ tresult = word_split (t->word, ifs_value);
+ if (result == 0)
+ result = e = tresult;
+ else
+ {
+ e->next = tresult;
+ while (e->next)
+ e = e->next;
+ }
+ }
+ return (result);
+}
+
+/**************************************************
+ * *
+ * Functions to expand an entire WORD_LIST *
+ * *
+ **************************************************/
+
+/* Do any word-expansion-specific cleanup and jump to top_level */
+static void
+exp_jump_to_top_level (v)
+ int v;
+{
+ set_pipestatus_from_exit (last_command_exit_value);
+
+ /* Cleanup code goes here. */
+ expand_no_split_dollar_star = 0; /* XXX */
+ expanding_redir = 0;
+ assigning_in_environment = 0;
+
+ if (parse_and_execute_level == 0)
+ top_level_cleanup (); /* from sig.c */
+
+ jump_to_top_level (v);
+}
+
+/* Put NLIST (which is a WORD_LIST * of only one element) at the front of
+ ELIST, and set ELIST to the new list. */
+#define PREPEND_LIST(nlist, elist) \
+ do { nlist->next = elist; elist = nlist; } while (0)
+
+/* Separate out any initial variable assignments from TLIST. If set -k has
+ been executed, remove all assignment statements from TLIST. Initial
+ variable assignments and other environment assignments are placed
+ on SUBST_ASSIGN_VARLIST. */
+static WORD_LIST *
+separate_out_assignments (tlist)
+ WORD_LIST *tlist;
+{
+ register WORD_LIST *vp, *lp;
+
+ if (tlist == 0)
+ return ((WORD_LIST *)NULL);
+
+ if (subst_assign_varlist)
+ dispose_words (subst_assign_varlist); /* Clean up after previous error */
+
+ subst_assign_varlist = (WORD_LIST *)NULL;
+ vp = lp = tlist;
+
+ /* Separate out variable assignments at the start of the command.
+ Loop invariant: vp->next == lp
+ Loop postcondition:
+ lp = list of words left after assignment statements skipped
+ tlist = original list of words
+ */
+ while (lp && (lp->word->flags & W_ASSIGNMENT))
+ {
+ vp = lp;
+ lp = lp->next;
+ }
+
+ /* If lp != tlist, we have some initial assignment statements.
+ We make SUBST_ASSIGN_VARLIST point to the list of assignment
+ words and TLIST point to the remaining words. */
+ if (lp != tlist)
+ {
+ subst_assign_varlist = tlist;
+ /* ASSERT(vp->next == lp); */
+ vp->next = (WORD_LIST *)NULL; /* terminate variable list */
+ tlist = lp; /* remainder of word list */
+ }
+
+ /* vp == end of variable list */
+ /* tlist == remainder of original word list without variable assignments */
+ if (!tlist)
+ /* All the words in tlist were assignment statements */
+ return ((WORD_LIST *)NULL);
+
+ /* ASSERT(tlist != NULL); */
+ /* ASSERT((tlist->word->flags & W_ASSIGNMENT) == 0); */
+
+ /* If the -k option is in effect, we need to go through the remaining
+ words, separate out the assignment words, and place them on
+ SUBST_ASSIGN_VARLIST. */
+ if (place_keywords_in_env)
+ {
+ WORD_LIST *tp; /* tp == running pointer into tlist */
+
+ tp = tlist;
+ lp = tlist->next;
+
+ /* Loop Invariant: tp->next == lp */
+ /* Loop postcondition: tlist == word list without assignment statements */
+ while (lp)
+ {
+ if (lp->word->flags & W_ASSIGNMENT)
+ {
+ /* Found an assignment statement, add this word to end of
+ subst_assign_varlist (vp). */
+ if (!subst_assign_varlist)
+ subst_assign_varlist = vp = lp;
+ else
+ {
+ vp->next = lp;
+ vp = lp;
+ }
+
+ /* Remove the word pointed to by LP from TLIST. */
+ tp->next = lp->next;
+ /* ASSERT(vp == lp); */
+ lp->next = (WORD_LIST *)NULL;
+ lp = tp->next;
+ }
+ else
+ {
+ tp = lp;
+ lp = lp->next;
+ }
+ }
+ }
+ return (tlist);
+}
+
+#define WEXP_VARASSIGN 0x001
+#define WEXP_BRACEEXP 0x002
+#define WEXP_TILDEEXP 0x004
+#define WEXP_PARAMEXP 0x008
+#define WEXP_PATHEXP 0x010
+
+/* All of the expansions, including variable assignments at the start of
+ the list. */
+#define WEXP_ALL (WEXP_VARASSIGN|WEXP_BRACEEXP|WEXP_TILDEEXP|WEXP_PARAMEXP|WEXP_PATHEXP)
+
+/* All of the expansions except variable assignments at the start of
+ the list. */
+#define WEXP_NOVARS (WEXP_BRACEEXP|WEXP_TILDEEXP|WEXP_PARAMEXP|WEXP_PATHEXP)
+
+/* All of the `shell expansions': brace expansion, tilde expansion, parameter
+ expansion, command substitution, arithmetic expansion, word splitting, and
+ quote removal. */
+#define WEXP_SHELLEXP (WEXP_BRACEEXP|WEXP_TILDEEXP|WEXP_PARAMEXP)
+
+/* Take the list of words in LIST and do the various substitutions. Return
+ a new list of words which is the expanded list, and without things like
+ variable assignments. */
+
+WORD_LIST *
+expand_words (list)
+ WORD_LIST *list;
+{
+ return (expand_word_list_internal (list, WEXP_ALL));
+}
+
+/* Same as expand_words (), but doesn't hack variable or environment
+ variables. */
+WORD_LIST *
+expand_words_no_vars (list)
+ WORD_LIST *list;
+{
+ return (expand_word_list_internal (list, WEXP_NOVARS));
+}
+
+WORD_LIST *
+expand_words_shellexp (list)
+ WORD_LIST *list;
+{
+ return (expand_word_list_internal (list, WEXP_SHELLEXP));
+}
+
+static WORD_LIST *
+glob_expand_word_list (tlist, eflags)
+ WORD_LIST *tlist;
+ int eflags;
+{
+ char **glob_array, *temp_string;
+ register int glob_index;
+ WORD_LIST *glob_list, *output_list, *disposables, *next;
+ WORD_DESC *tword;
+
+ output_list = disposables = (WORD_LIST *)NULL;
+ glob_array = (char **)NULL;
+ while (tlist)
+ {
+ /* For each word, either globbing is attempted or the word is
+ added to orig_list. If globbing succeeds, the results are
+ added to orig_list and the word (tlist) is added to the list
+ of disposable words. If globbing fails and failed glob
+ expansions are left unchanged (the shell default), the
+ original word is added to orig_list. If globbing fails and
+ failed glob expansions are removed, the original word is
+ added to the list of disposable words. orig_list ends up
+ in reverse order and requires a call to REVERSE_LIST to
+ be set right. After all words are examined, the disposable
+ words are freed. */
+ next = tlist->next;
+
+ /* If the word isn't an assignment and contains an unquoted
+ pattern matching character, then glob it. */
+ if ((tlist->word->flags & W_NOGLOB) == 0 &&
+ unquoted_glob_pattern_p (tlist->word->word))
+ {
+ glob_array = shell_glob_filename (tlist->word->word);
+
+ /* Handle error cases.
+ I don't think we should report errors like "No such file
+ or directory". However, I would like to report errors
+ like "Read failed". */
+
+ if (glob_array == 0 || GLOB_FAILED (glob_array))
+ {
+ glob_array = (char **)xmalloc (sizeof (char *));
+ glob_array[0] = (char *)NULL;
+ }
+
+ /* Dequote the current word in case we have to use it. */
+ if (glob_array[0] == NULL)
+ {
+ temp_string = dequote_string (tlist->word->word);
+ free (tlist->word->word);
+ tlist->word->word = temp_string;
+ }
+
+ /* Make the array into a word list. */
+ glob_list = (WORD_LIST *)NULL;
+ for (glob_index = 0; glob_array[glob_index]; glob_index++)
+ {
+ tword = make_bare_word (glob_array[glob_index]);
+ tword->flags |= W_GLOBEXP; /* XXX */
+ glob_list = make_word_list (tword, glob_list);
+ }
+
+ if (glob_list)
+ {
+ output_list = (WORD_LIST *)list_append (glob_list, output_list);
+ PREPEND_LIST (tlist, disposables);
+ }
+ else if (fail_glob_expansion != 0)
+ {
+ report_error (_("no match: %s"), tlist->word->word);
+ exp_jump_to_top_level (DISCARD);
+ }
+ else if (allow_null_glob_expansion == 0)
+ {
+ /* Failed glob expressions are left unchanged. */
+ PREPEND_LIST (tlist, output_list);
+ }
+ else
+ {
+ /* Failed glob expressions are removed. */
+ PREPEND_LIST (tlist, disposables);
+ }
+ }
+ else
+ {
+ /* Dequote the string. */
+ temp_string = dequote_string (tlist->word->word);
+ free (tlist->word->word);
+ tlist->word->word = temp_string;
+ PREPEND_LIST (tlist, output_list);
+ }
+
+ strvec_dispose (glob_array);
+ glob_array = (char **)NULL;
+
+ tlist = next;
+ }
+
+ if (disposables)
+ dispose_words (disposables);
+
+ if (output_list)
+ output_list = REVERSE_LIST (output_list, WORD_LIST *);
+
+ return (output_list);
+}
+
+#if defined (BRACE_EXPANSION)
+static WORD_LIST *
+brace_expand_word_list (tlist, eflags)
+ WORD_LIST *tlist;
+ int eflags;
+{
+ register char **expansions;
+ char *temp_string;
+ WORD_LIST *disposables, *output_list, *next;
+ WORD_DESC *w;
+ int eindex;
+
+ for (disposables = output_list = (WORD_LIST *)NULL; tlist; tlist = next)
+ {
+ next = tlist->next;
+
+ if ((tlist->word->flags & (W_COMPASSIGN|W_ASSIGNARG)) == (W_COMPASSIGN|W_ASSIGNARG))
+ {
+/*itrace("brace_expand_word_list: %s: W_COMPASSIGN|W_ASSIGNARG", tlist->word->word);*/
+ PREPEND_LIST (tlist, output_list);
+ continue;
+ }
+
+ /* Only do brace expansion if the word has a brace character. If
+ not, just add the word list element to BRACES and continue. In
+ the common case, at least when running shell scripts, this will
+ degenerate to a bunch of calls to `mbschr', and then what is
+ basically a reversal of TLIST into BRACES, which is corrected
+ by a call to REVERSE_LIST () on BRACES when the end of TLIST
+ is reached. */
+ if (mbschr (tlist->word->word, LBRACE))
+ {
+ expansions = brace_expand (tlist->word->word);
+
+ for (eindex = 0; temp_string = expansions[eindex]; eindex++)
+ {
+ w = make_word (temp_string);
+ /* If brace expansion didn't change the word, preserve
+ the flags. We may want to preserve the flags
+ unconditionally someday -- XXX */
+ if (STREQ (temp_string, tlist->word->word))
+ w->flags = tlist->word->flags;
+ output_list = make_word_list (w, output_list);
+ free (expansions[eindex]);
+ }
+ free (expansions);
+
+ /* Add TLIST to the list of words to be freed after brace
+ expansion has been performed. */
+ PREPEND_LIST (tlist, disposables);
+ }
+ else
+ PREPEND_LIST (tlist, output_list);
+ }
+
+ if (disposables)
+ dispose_words (disposables);
+
+ if (output_list)
+ output_list = REVERSE_LIST (output_list, WORD_LIST *);
+
+ return (output_list);
+}
+#endif
+
+#if defined (ARRAY_VARS)
+/* Take WORD, a compound associative array assignment, and internally run
+ 'declare -A w', where W is the variable name portion of WORD. */
+static int
+make_internal_declare (word, option)
+ char *word;
+ char *option;
+{
+ int t;
+ WORD_LIST *wl;
+ WORD_DESC *w;
+
+ w = make_word (word);
+
+ t = assignment (w->word, 0);
+ w->word[t] = '\0';
+
+ wl = make_word_list (w, (WORD_LIST *)NULL);
+ wl = make_word_list (make_word (option), wl);
+
+ return (declare_builtin (wl));
+}
+#endif
+
+static WORD_LIST *
+shell_expand_word_list (tlist, eflags)
+ WORD_LIST *tlist;
+ int eflags;
+{
+ WORD_LIST *expanded, *orig_list, *new_list, *next, *temp_list;
+ int expanded_something, has_dollar_at;
+ char *temp_string;
+
+ /* We do tilde expansion all the time. This is what 1003.2 says. */
+ new_list = (WORD_LIST *)NULL;
+ for (orig_list = tlist; tlist; tlist = next)
+ {
+ temp_string = tlist->word->word;
+
+ next = tlist->next;
+
+#if defined (ARRAY_VARS)
+ /* If this is a compound array assignment to a builtin that accepts
+ such assignments (e.g., `declare'), take the assignment and perform
+ it separately, handling the semantics of declarations inside shell
+ functions. This avoids the double-evaluation of such arguments,
+ because `declare' does some evaluation of compound assignments on
+ its own. */
+ if ((tlist->word->flags & (W_COMPASSIGN|W_ASSIGNARG)) == (W_COMPASSIGN|W_ASSIGNARG))
+ {
+ int t;
+
+ if (tlist->word->flags & W_ASSIGNASSOC)
+ make_internal_declare (tlist->word->word, "-A");
+
+ t = do_word_assignment (tlist->word);
+ if (t == 0)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ exp_jump_to_top_level (DISCARD);
+ }
+
+ /* Now transform the word as ksh93 appears to do and go on */
+ t = assignment (tlist->word->word, 0);
+ tlist->word->word[t] = '\0';
+ tlist->word->flags &= ~(W_ASSIGNMENT|W_NOSPLIT|W_COMPASSIGN|W_ASSIGNARG|W_ASSIGNASSOC);
+ }
+#endif
+
+ expanded_something = 0;
+ expanded = expand_word_internal
+ (tlist->word, 0, 0, &has_dollar_at, &expanded_something);
+
+ if (expanded == &expand_word_error || expanded == &expand_word_fatal)
+ {
+ /* By convention, each time this error is returned,
+ tlist->word->word has already been freed. */
+ tlist->word->word = (char *)NULL;
+
+ /* Dispose our copy of the original list. */
+ dispose_words (orig_list);
+ /* Dispose the new list we're building. */
+ dispose_words (new_list);
+
+ last_command_exit_value = EXECUTION_FAILURE;
+ if (expanded == &expand_word_error)
+ exp_jump_to_top_level (DISCARD);
+ else
+ exp_jump_to_top_level (FORCE_EOF);
+ }
+
+ /* Don't split words marked W_NOSPLIT. */
+ if (expanded_something && (tlist->word->flags & W_NOSPLIT) == 0)
+ {
+ temp_list = word_list_split (expanded);
+ dispose_words (expanded);
+ }
+ else
+ {
+ /* If no parameter expansion, command substitution, process
+ substitution, or arithmetic substitution took place, then
+ do not do word splitting. We still have to remove quoted
+ null characters from the result. */
+ word_list_remove_quoted_nulls (expanded);
+ temp_list = expanded;
+ }
+
+ expanded = REVERSE_LIST (temp_list, WORD_LIST *);
+ new_list = (WORD_LIST *)list_append (expanded, new_list);
+ }
+
+ if (orig_list)
+ dispose_words (orig_list);
+
+ if (new_list)
+ new_list = REVERSE_LIST (new_list, WORD_LIST *);
+
+ return (new_list);
+}
+
+/* The workhorse for expand_words () and expand_words_no_vars ().
+ First arg is LIST, a WORD_LIST of words.
+ Second arg EFLAGS is a flags word controlling which expansions are
+ performed.
+
+ This does all of the substitutions: brace expansion, tilde expansion,
+ parameter expansion, command substitution, arithmetic expansion,
+ process substitution, word splitting, and pathname expansion, according
+ to the bits set in EFLAGS. Words with the W_QUOTED or W_NOSPLIT bits
+ set, or for which no expansion is done, do not undergo word splitting.
+ Words with the W_NOGLOB bit set do not undergo pathname expansion. */
+static WORD_LIST *
+expand_word_list_internal (list, eflags)
+ WORD_LIST *list;
+ int eflags;
+{
+ WORD_LIST *new_list, *temp_list;
+ int tint;
+
+ if (list == 0)
+ return ((WORD_LIST *)NULL);
+
+ garglist = new_list = copy_word_list (list);
+ if (eflags & WEXP_VARASSIGN)
+ {
+ garglist = new_list = separate_out_assignments (new_list);
+ if (new_list == 0)
+ {
+ if (subst_assign_varlist)
+ {
+ /* All the words were variable assignments, so they are placed
+ into the shell's environment. */
+ for (temp_list = subst_assign_varlist; temp_list; temp_list = temp_list->next)
+ {
+ this_command_name = (char *)NULL; /* no arithmetic errors */
+ tint = do_word_assignment (temp_list->word);
+ /* Variable assignment errors in non-interactive shells
+ running in Posix.2 mode cause the shell to exit. */
+ if (tint == 0)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ if (interactive_shell == 0 && posixly_correct)
+ exp_jump_to_top_level (FORCE_EOF);
+ else
+ exp_jump_to_top_level (DISCARD);
+ }
+ }
+ dispose_words (subst_assign_varlist);
+ subst_assign_varlist = (WORD_LIST *)NULL;
+ }
+ return ((WORD_LIST *)NULL);
+ }
+ }
+
+ /* Begin expanding the words that remain. The expansions take place on
+ things that aren't really variable assignments. */
+
+#if defined (BRACE_EXPANSION)
+ /* Do brace expansion on this word if there are any brace characters
+ in the string. */
+ if ((eflags & WEXP_BRACEEXP) && brace_expansion && new_list)
+ new_list = brace_expand_word_list (new_list, eflags);
+#endif /* BRACE_EXPANSION */
+
+ /* Perform the `normal' shell expansions: tilde expansion, parameter and
+ variable substitution, command substitution, arithmetic expansion,
+ and word splitting. */
+ new_list = shell_expand_word_list (new_list, eflags);
+
+ /* Okay, we're almost done. Now let's just do some filename
+ globbing. */
+ if (new_list)
+ {
+ if ((eflags & WEXP_PATHEXP) && disallow_filename_globbing == 0)
+ /* Glob expand the word list unless globbing has been disabled. */
+ new_list = glob_expand_word_list (new_list, eflags);
+ else
+ /* Dequote the words, because we're not performing globbing. */
+ new_list = dequote_list (new_list);
+ }
+
+ if ((eflags & WEXP_VARASSIGN) && subst_assign_varlist)
+ {
+ sh_wassign_func_t *assign_func;
+
+ /* If the remainder of the words expand to nothing, Posix.2 requires
+ that the variable and environment assignments affect the shell's
+ environment. */
+ assign_func = new_list ? assign_in_env : do_word_assignment;
+ tempenv_assign_error = 0;
+
+ for (temp_list = subst_assign_varlist; temp_list; temp_list = temp_list->next)
+ {
+ this_command_name = (char *)NULL;
+ assigning_in_environment = (assign_func == assign_in_env);
+ tint = (*assign_func) (temp_list->word);
+ assigning_in_environment = 0;
+ /* Variable assignment errors in non-interactive shells running
+ in Posix.2 mode cause the shell to exit. */
+ if (tint == 0)
+ {
+ if (assign_func == do_word_assignment)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ if (interactive_shell == 0 && posixly_correct)
+ exp_jump_to_top_level (FORCE_EOF);
+ else
+ exp_jump_to_top_level (DISCARD);
+ }
+ else
+ tempenv_assign_error++;
+ }
+ }
+
+ dispose_words (subst_assign_varlist);
+ subst_assign_varlist = (WORD_LIST *)NULL;
+ }
+
+#if 0
+ tint = list_length (new_list) + 1;
+ RESIZE_MALLOCED_BUFFER (glob_argv_flags, 0, tint, glob_argv_flags_size, 16);
+ for (tint = 0, temp_list = new_list; temp_list; temp_list = temp_list->next)
+ glob_argv_flags[tint++] = (temp_list->word->flags & W_GLOBEXP) ? '1' : '0';
+ glob_argv_flags[tint] = '\0';
+#endif
+
+ return (new_list);
+}
diff --git a/subst.h b/subst.h
new file mode 100644
index 0000000..7628939
--- /dev/null
+++ b/subst.h
@@ -0,0 +1,302 @@
+/* subst.h -- Names of externally visible functions in subst.c. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_SUBST_H_)
+#define _SUBST_H_
+
+#include "stdc.h"
+
+/* Constants which specify how to handle backslashes and quoting in
+ expand_word_internal (). Q_DOUBLE_QUOTES means to use the function
+ slashify_in_quotes () to decide whether the backslash should be
+ retained. Q_HERE_DOCUMENT means slashify_in_here_document () to
+ decide whether to retain the backslash. Q_KEEP_BACKSLASH means
+ to unconditionally retain the backslash. Q_PATQUOTE means that we're
+ expanding a pattern ${var%#[#%]pattern} in an expansion surrounded
+ by double quotes. */
+#define Q_DOUBLE_QUOTES 0x01
+#define Q_HERE_DOCUMENT 0x02
+#define Q_KEEP_BACKSLASH 0x04
+#define Q_PATQUOTE 0x08
+#define Q_QUOTED 0x10
+#define Q_ADDEDQUOTES 0x20
+#define Q_QUOTEDNULL 0x40
+
+/* Flag values controlling how assignment statements are treated. */
+#define ASS_APPEND 0x01
+#define ASS_MKLOCAL 0x02
+#define ASS_MKASSOC 0x04
+
+/* Flags for the string extraction functions. */
+#define SX_NOALLOC 0x01 /* just skip; don't return substring */
+#define SX_VARNAME 0x02 /* variable name; for string_extract () */
+#define SX_REQMATCH 0x04 /* closing/matching delimiter required */
+#define SX_COMMAND 0x08 /* extracting a shell script/command */
+#define SX_NOCTLESC 0x10 /* don't honor CTLESC quoting */
+#define SX_NOESCCTLNUL 0x20 /* don't let CTLESC quote CTLNUL */
+#define SX_NOLONGJMP 0x40 /* don't longjmp on fatal error */
+#define SX_ARITHSUB 0x80 /* extracting $(( ... )) (currently unused) */
+
+/* Remove backslashes which are quoting backquotes from STRING. Modifies
+ STRING, and returns a pointer to it. */
+extern char * de_backslash __P((char *));
+
+/* Replace instances of \! in a string with !. */
+extern void unquote_bang __P((char *));
+
+/* Extract the $( construct in STRING, and return a new string.
+ Start extracting at (SINDEX) as if we had just seen "$(".
+ Make (SINDEX) get the position just after the matching ")".
+ XFLAGS is additional flags to pass to other extraction functions, */
+extern char *extract_command_subst __P((char *, int *, int));
+
+/* Extract the $[ construct in STRING, and return a new string.
+ Start extracting at (SINDEX) as if we had just seen "$[".
+ Make (SINDEX) get the position just after the matching "]". */
+extern char *extract_arithmetic_subst __P((char *, int *));
+
+#if defined (PROCESS_SUBSTITUTION)
+/* Extract the <( or >( construct in STRING, and return a new string.
+ Start extracting at (SINDEX) as if we had just seen "<(".
+ Make (SINDEX) get the position just after the matching ")". */
+extern char *extract_process_subst __P((char *, char *, int *));
+#endif /* PROCESS_SUBSTITUTION */
+
+/* Extract the name of the variable to bind to from the assignment string. */
+extern char *assignment_name __P((char *));
+
+/* Return a single string of all the words present in LIST, separating
+ each word with SEP. */
+extern char *string_list_internal __P((WORD_LIST *, char *));
+
+/* Return a single string of all the words present in LIST, separating
+ each word with a space. */
+extern char *string_list __P((WORD_LIST *));
+
+/* Turn $* into a single string, obeying POSIX rules. */
+extern char *string_list_dollar_star __P((WORD_LIST *));
+
+/* Expand $@ into a single string, obeying POSIX rules. */
+extern char *string_list_dollar_at __P((WORD_LIST *, int));
+
+/* Turn the positional paramters into a string, understanding quoting and
+ the various subtleties of using the first character of $IFS as the
+ separator. Calls string_list_dollar_at, string_list_dollar_star, and
+ string_list as appropriate. */
+extern char *string_list_pos_params __P((int, WORD_LIST *, int));
+
+/* Perform quoted null character removal on each element of LIST.
+ This modifies LIST. */
+extern void word_list_remove_quoted_nulls __P((WORD_LIST *));
+
+/* This performs word splitting and quoted null character removal on
+ STRING. */
+extern WORD_LIST *list_string __P((char *, char *, int));
+
+extern char *ifs_firstchar __P((int *));
+extern char *get_word_from_string __P((char **, char *, char **));
+extern char *strip_trailing_ifs_whitespace __P((char *, char *, int));
+
+/* Given STRING, an assignment string, get the value of the right side
+ of the `=', and bind it to the left side. If EXPAND is true, then
+ perform tilde expansion, parameter expansion, command substitution,
+ and arithmetic expansion on the right-hand side. Do not perform word
+ splitting on the result of expansion. */
+extern int do_assignment __P((char *));
+extern int do_assignment_no_expand __P((char *));
+extern int do_word_assignment __P((WORD_DESC *));
+
+/* Append SOURCE to TARGET at INDEX. SIZE is the current amount
+ of space allocated to TARGET. SOURCE can be NULL, in which
+ case nothing happens. Gets rid of SOURCE by free ()ing it.
+ Returns TARGET in case the location has changed. */
+extern char *sub_append_string __P((char *, char *, int *, int *));
+
+/* Append the textual representation of NUMBER to TARGET.
+ INDEX and SIZE are as in SUB_APPEND_STRING. */
+extern char *sub_append_number __P((intmax_t, char *, int *, int *));
+
+/* Return the word list that corresponds to `$*'. */
+extern WORD_LIST *list_rest_of_args __P((void));
+
+/* Make a single large string out of the dollar digit variables,
+ and the rest_of_args. If DOLLAR_STAR is 1, then obey the special
+ case of "$*" with respect to IFS. */
+extern char *string_rest_of_args __P((int));
+
+extern int number_of_args __P((void));
+
+/* Expand STRING by performing parameter expansion, command substitution,
+ and arithmetic expansion. Dequote the resulting WORD_LIST before
+ returning it, but do not perform word splitting. The call to
+ remove_quoted_nulls () is made here because word splitting normally
+ takes care of quote removal. */
+extern WORD_LIST *expand_string_unsplit __P((char *, int));
+
+/* Expand the rhs of an assignment statement. */
+extern WORD_LIST *expand_string_assignment __P((char *, int));
+
+/* Expand a prompt string. */
+extern WORD_LIST *expand_prompt_string __P((char *, int, int));
+
+/* Expand STRING just as if you were expanding a word. This also returns
+ a list of words. Note that filename globbing is *NOT* done for word
+ or string expansion, just when the shell is expanding a command. This
+ does parameter expansion, command substitution, arithmetic expansion,
+ and word splitting. Dequote the resultant WORD_LIST before returning. */
+extern WORD_LIST *expand_string __P((char *, int));
+
+/* Convenience functions that expand strings to strings, taking care of
+ converting the WORD_LIST * returned by the expand_string* functions
+ to a string and deallocating the WORD_LIST *. */
+extern char *expand_string_to_string __P((char *, int));
+extern char *expand_string_unsplit_to_string __P((char *, int));
+extern char *expand_assignment_string_to_string __P((char *, int));
+
+/* Expand an arithmetic expression string */
+extern char *expand_arith_string __P((char *, int));
+
+/* De-quote quoted characters in STRING. */
+extern char *dequote_string __P((char *));
+
+/* De-quote CTLESC-escaped CTLESC or CTLNUL characters in STRING. */
+extern char *dequote_escapes __P((char *));
+
+/* De-quote quoted characters in each word in LIST. */
+extern WORD_LIST *dequote_list __P((WORD_LIST *));
+
+/* Expand WORD, performing word splitting on the result. This does
+ parameter expansion, command substitution, arithmetic expansion,
+ word splitting, and quote removal. */
+extern WORD_LIST *expand_word __P((WORD_DESC *, int));
+
+/* Expand WORD, but do not perform word splitting on the result. This
+ does parameter expansion, command substitution, arithmetic expansion,
+ and quote removal. */
+extern WORD_LIST *expand_word_unsplit __P((WORD_DESC *, int));
+extern WORD_LIST *expand_word_leave_quoted __P((WORD_DESC *, int));
+
+/* Return the value of a positional parameter. This handles values > 10. */
+extern char *get_dollar_var_value __P((intmax_t));
+
+/* Quote a string to protect it from word splitting. */
+extern char *quote_string __P((char *));
+
+/* Quote escape characters (characters special to interals of expansion)
+ in a string. */
+extern char *quote_escapes __P((char *));
+
+/* And remove such quoted special characters. */
+extern char *remove_quoted_escapes __P((char *));
+
+/* Remove CTLNUL characters from STRING unless they are quoted with CTLESC. */
+extern char *remove_quoted_nulls __P((char *));
+
+/* Perform quote removal on STRING. If QUOTED > 0, assume we are obeying the
+ backslash quoting rules for within double quotes. */
+extern char *string_quote_removal __P((char *, int));
+
+/* Perform quote removal on word WORD. This allocates and returns a new
+ WORD_DESC *. */
+extern WORD_DESC *word_quote_removal __P((WORD_DESC *, int));
+
+/* Perform quote removal on all words in LIST. If QUOTED is non-zero,
+ the members of the list are treated as if they are surrounded by
+ double quotes. Return a new list, or NULL if LIST is NULL. */
+extern WORD_LIST *word_list_quote_removal __P((WORD_LIST *, int));
+
+/* Called when IFS is changed to maintain some private variables. */
+extern void setifs __P((SHELL_VAR *));
+
+/* Return the value of $IFS, or " \t\n" if IFS is unset. */
+extern char *getifs __P((void));
+
+/* This splits a single word into a WORD LIST on $IFS, but only if the word
+ is not quoted. list_string () performs quote removal for us, even if we
+ don't do any splitting. */
+extern WORD_LIST *word_split __P((WORD_DESC *, char *));
+
+/* Take the list of words in LIST and do the various substitutions. Return
+ a new list of words which is the expanded list, and without things like
+ variable assignments. */
+extern WORD_LIST *expand_words __P((WORD_LIST *));
+
+/* Same as expand_words (), but doesn't hack variable or environment
+ variables. */
+extern WORD_LIST *expand_words_no_vars __P((WORD_LIST *));
+
+/* Perform the `normal shell expansions' on a WORD_LIST. These are
+ brace expansion, tilde expansion, parameter and variable substitution,
+ command substitution, arithmetic expansion, and word splitting. */
+extern WORD_LIST *expand_words_shellexp __P((WORD_LIST *));
+
+extern WORD_DESC *command_substitute __P((char *, int));
+extern char *pat_subst __P((char *, char *, char *, int));
+
+extern int fifos_pending __P((void));
+extern void unlink_fifo_list __P((void));
+
+extern WORD_LIST *list_string_with_quotes __P((char *));
+
+#if defined (ARRAY_VARS)
+extern char *extract_array_assignment_list __P((char *, int *));
+#endif
+
+#if defined (COND_COMMAND)
+extern char *remove_backslashes __P((char *));
+extern char *cond_expand_word __P((WORD_DESC *, int));
+#endif
+
+/* Flags for skip_to_delim */
+#define SD_NOJMP 0x01 /* don't longjmp on fatal error. */
+#define SD_INVERT 0x02 /* look for chars NOT in passed set */
+#define SD_NOQUOTEDELIM 0x04 /* don't let single or double quotes act as delimiters */
+#define SD_NOSKIPCMD 0x08 /* don't skip over $(, <(, or >( command/process substitution */
+
+extern int skip_to_delim __P((char *, int, char *, int));
+
+#if defined (READLINE)
+extern int char_is_quoted __P((char *, int));
+extern int unclosed_pair __P((char *, int, char *));
+extern WORD_LIST *split_at_delims __P((char *, int, char *, int, int, int *, int *));
+#endif
+
+/* Variables used to keep track of the characters in IFS. */
+extern SHELL_VAR *ifs_var;
+extern char *ifs_value;
+extern unsigned char ifs_cmap[];
+
+#if defined (HANDLE_MULTIBYTE)
+extern unsigned char ifs_firstc[];
+extern size_t ifs_firstc_len;
+#else
+extern unsigned char ifs_firstc;
+#endif
+
+/* Evaluates to 1 if C is a character in $IFS. */
+#define isifs(c) (ifs_cmap[(unsigned char)(c)] != 0)
+
+/* How to determine the quoted state of the character C. */
+#define QUOTED_CHAR(c) ((c) == CTLESC)
+
+/* Is the first character of STRING a quoted NULL character? */
+#define QUOTED_NULL(string) ((string)[0] == CTLNUL && (string)[1] == '\0')
+
+#endif /* !_SUBST_H_ */
diff --git a/support/Makefile.in b/support/Makefile.in
new file mode 100644
index 0000000..1ff3f1a
--- /dev/null
+++ b/support/Makefile.in
@@ -0,0 +1,87 @@
+#
+# Simple Makefile for the support programs.
+#
+# documentation support: man2html
+# testing support: printenv recho zecho xcase
+#
+# bashbug lives here but is created by the top-level makefile
+#
+# Currently only man2html is built
+#
+# Copyright (C) 1998-2009 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#
+# Boilerplate
+#
+topdir = @top_srcdir@
+srcdir = @srcdir@
+VPATH = .:@srcdir@
+BUILD_DIR = @BUILD_DIR@
+
+RM = rm -f
+SHELL = @MAKE_SHELL@
+CC = @CC@
+CC_FOR_BUILD = @CC_FOR_BUILD@
+
+EXEEXT = @EXEEXT@
+
+#
+# Compiler options:
+#
+PROFILE_FLAGS = @PROFILE_FLAGS@
+
+CFLAGS = @CFLAGS@
+CFLAGS_FOR_BUILD = @CFLAGS_FOR_BUILD@
+CPPFLAGS = @CPPFLAGS@
+CPPFLAGS_FOR_BUILD = @CPPFLAGS_FOR_BUILD@
+LOCAL_CFLAGS = @LOCAL_CFLAGS@
+DEFS = @DEFS@
+LOCAL_DEFS = @LOCAL_DEFS@
+
+LIBS = @LIBS@
+LIBS_FOR_BUILD = ${LIBS} # XXX
+
+LOCAL_LDFLAGS = @LOCAL_LDFLAGS@
+LDFLAGS = @LDFLAGS@ $(LOCAL_LDFLAGS) $(CFLAGS)
+LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ $(LOCAL_LDFLAGS) $(CFLAGS_FOR_BUILD)
+
+INCLUDES = -I${BUILD_DIR} -I${topdir}
+
+BASE_CCFLAGS = ${PROFILE_FLAGS} $(DEFS) $(LOCAL_DEFS) $(SYSTEM_FLAGS) \
+ ${INCLUDES} $(LOCAL_CFLAGS)
+
+CCFLAGS = $(BASE_CCFLAGS) $(CPPFLAGS) $(CFLAGS)
+CCFLAGS_FOR_BUILD = $(BASE_CCFLAGS) $(CPPFLAGS_FOR_BUILD) $(CFLAGS_FOR_BUILD)
+
+SRC1 = man2html.c
+OBJ1 = man2html.o
+
+.c.o:
+ $(RM) $@
+ $(CC_FOR_BUILD) -c $(CCFLAGS_FOR_BUILD) $<
+
+all: man2html$(EXEEXT)
+
+man2html$(EXEEXT): $(OBJ1)
+ $(CC_FOR_BUILD) $(CCFLAGS_FOR_BUILD) $(OBJ1) -o $@ ${LIBS_FOR_BUILD}
+
+clean:
+ $(RM) man2html$(EXEEXT)
+
+distclean maintainer-clean mostlyclean: clean
+ $(RM) $(OBJ1)
+
+man2html.o: man2html.c
diff --git a/support/SYMLINKS b/support/SYMLINKS
new file mode 100644
index 0000000..06bbed7
--- /dev/null
+++ b/support/SYMLINKS
@@ -0,0 +1,18 @@
+#
+# symlink map for bash source tree
+#
+# link name link target
+#
+lib/readline/tilde.c ../tilde/tilde.c
+lib/readline/tilde.h ../tilde/tilde.h
+#
+lib/readline/ansi_stdlib.h ../../include/ansi_stdlib.h
+lib/readline/posixdir.h ../../include/posixdir.h
+lib/readline/posixjmp.h ../../include/posixjmp.h
+lib/readline/posixselect.h ../../include/posixselect.h
+lib/readline/posixstat.h ../../include/posixstat.h
+#lib/readline/rlstdc.h ../../include/stdc.h
+#lib/readline/xmalloc.c ../malloc/xmalloc.c
+#
+#lib/tilde/memalloc.h ../../include/memalloc.h
+#
diff --git a/support/bash.xbm b/support/bash.xbm
new file mode 100644
index 0000000..14bbe6a
--- /dev/null
+++ b/support/bash.xbm
@@ -0,0 +1,60 @@
+From: Simon Marshall <sm2@sequent.cc.hull.ac.uk>
+Date: Wed, 8 May 91 17:15:58 +0100
+To: bug-bash@ai.mit.edu
+Subject: X bitmap for bash
+
+ Since other GNU software comes with its very own X bitmap, I
+ thought it was about time bash had one too & here it is! To use,
+ stick the stuff after my signature in a file <path>/bash.xbm. If
+ using a twm window manager, insert the lines:
+
+IconDirectory "<path>"
+Icons {
+ "<xterm title>" "bash.xbm"
+}
+ in your ~/.twmrc file. The <xterm title> can be a prefix, so if
+ you have titles "bash@machine", the prefix "bash" will do. I'm not
+ familiar enough with other window managers, but they should be
+ similar.
+
+ If you like it, you're welcome to it...
+
+ Simon.
+
+Copyright (C) 1992 Simon Marshall
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+#define bash_width 64
+#define bash_height 48
+static char bash_bits[] = {
+ 0x00, 0x60, 0x06, 0x30, 0x04, 0x00, 0x00, 0x00, 0x60, 0x98, 0x01, 0x40,
+ 0x03, 0x00, 0x00, 0x00, 0x19, 0x00, 0xa0, 0x80, 0x80, 0xff, 0x00, 0x00,
+ 0x06, 0x00, 0x1c, 0x03, 0xe1, 0x5f, 0x03, 0x00, 0x02, 0x00, 0x22, 0x0c,
+ 0x5d, 0xf4, 0x0e, 0x00, 0xe1, 0x02, 0x09, 0x19, 0x17, 0x91, 0x3d, 0x00,
+ 0xf8, 0x87, 0x40, 0x90, 0x88, 0x88, 0x6e, 0x00, 0x8e, 0x9b, 0x04, 0x62,
+ 0x22, 0x22, 0xd6, 0x00, 0x02, 0xee, 0x4c, 0x68, 0x44, 0x44, 0x6c, 0x01,
+ 0x02, 0xf8, 0xa1, 0x4a, 0x11, 0x11, 0xb1, 0x02, 0x05, 0xa0, 0x22, 0xe0,
+ 0x88, 0x88, 0x68, 0x03, 0x42, 0x50, 0x5d, 0x40, 0x22, 0x22, 0xa2, 0x05,
+ 0x11, 0x81, 0x00, 0x44, 0x44, 0x44, 0x44, 0x07, 0x02, 0x20, 0x84, 0x60,
+ 0x11, 0x11, 0xd1, 0x0d, 0x02, 0x0a, 0x02, 0xc0, 0x88, 0x88, 0x48, 0x0b,
+ 0x44, 0x40, 0x00, 0x42, 0x22, 0x22, 0xa2, 0x1d, 0x24, 0x08, 0x02, 0x64,
+ 0x44, 0x44, 0xc4, 0x1a, 0x08, 0x00, 0x20, 0x20, 0x11, 0x11, 0x91, 0x15,
+ 0x88, 0x00, 0x00, 0xe1, 0xff, 0xff, 0xff, 0x1a, 0x10, 0x08, 0x22, 0x10,
+ 0x00, 0x00, 0xc0, 0x15, 0x31, 0x40, 0x00, 0xf2, 0x03, 0xc0, 0xc1, 0x1a,
+ 0x41, 0x24, 0x48, 0x6c, 0x06, 0x80, 0xc1, 0x15, 0x82, 0x01, 0x00, 0x66,
+ 0x06, 0x80, 0xc1, 0x1a, 0x04, 0x22, 0x12, 0x67, 0x06, 0x80, 0xc1, 0x15,
+ 0x0a, 0x04, 0xe0, 0x66, 0xe6, 0xb8, 0xc7, 0x1a, 0x09, 0xf0, 0x17, 0xee,
+ 0xb3, 0xa5, 0xcf, 0x15, 0x30, 0x00, 0x00, 0x6e, 0x86, 0x8d, 0xcd, 0x1a,
+ 0x00, 0x01, 0x80, 0x67, 0xe6, 0xbd, 0xcd, 0x15, 0x00, 0x46, 0x40, 0x66,
+ 0xb6, 0xb1, 0xcd, 0x1a, 0x00, 0x38, 0x3c, 0x66, 0xb6, 0xa5, 0xcd, 0x15,
+ 0x00, 0x00, 0x02, 0xf6, 0xe3, 0x9d, 0xdd, 0x1a, 0x00, 0x04, 0x60, 0x06,
+ 0x00, 0x00, 0xc0, 0x15, 0x00, 0x04, 0x40, 0xfe, 0xff, 0xff, 0xff, 0x1a,
+ 0x00, 0x02, 0x80, 0x12, 0x11, 0x11, 0x91, 0x15, 0x00, 0x00, 0x00, 0x8a,
+ 0x88, 0x88, 0x88, 0x1a, 0x00, 0x00, 0x00, 0x22, 0x22, 0x22, 0xa2, 0x15,
+ 0x00, 0x00, 0x00, 0x46, 0x44, 0x44, 0xc4, 0x9a, 0x00, 0x00, 0x00, 0x12,
+ 0x11, 0x11, 0x91, 0xb5, 0x00, 0x00, 0x10, 0x8a, 0x88, 0x88, 0x88, 0xba,
+ 0x00, 0x00, 0x10, 0x22, 0x22, 0x22, 0xa2, 0xd5, 0x00, 0x00, 0x30, 0xc6,
+ 0x44, 0x44, 0xcc, 0xdf, 0x00, 0x20, 0x39, 0x96, 0x15, 0x51, 0x99, 0xf5,
+ 0x80, 0xf2, 0x56, 0x8b, 0x9a, 0xea, 0x9b, 0xff, 0xc1, 0xad, 0x5e, 0xaf,
+ 0xbb, 0xfa, 0xba, 0xdf, 0x22, 0x9b, 0xae, 0xd7, 0x54, 0x5d, 0xd7, 0xbf,
+ 0x3b, 0x32, 0xce, 0xff, 0xff, 0xff, 0xff, 0xab, 0xae, 0x2b, 0x59, 0xaf,
+ 0xd4, 0xae, 0x2e, 0xc3, 0xdd, 0x43, 0xa9, 0xd1, 0xba, 0xae, 0x2c, 0xcd};
diff --git a/support/bashbug.sh b/support/bashbug.sh
new file mode 100644
index 0000000..7b36d40
--- /dev/null
+++ b/support/bashbug.sh
@@ -0,0 +1,271 @@
+#!/bin/sh -
+#
+# bashbug - create a bug report and mail it to the bug address
+#
+# The bug address depends on the release status of the shell. Versions
+# with status `devel', `alpha', `beta', or `rc' mail bug reports to
+# chet@cwru.edu and, optionally, to bash-testers@cwru.edu.
+# Other versions send mail to bug-bash@gnu.org.
+#
+# Copyright (C) 1996-2004 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+#
+# configuration section:
+# these variables are filled in by the make target in Makefile
+#
+MACHINE="!MACHINE!"
+OS="!OS!"
+CC="!CC!"
+CFLAGS="!CFLAGS!"
+RELEASE="!RELEASE!"
+PATCHLEVEL="!PATCHLEVEL!"
+RELSTATUS="!RELSTATUS!"
+MACHTYPE="!MACHTYPE!"
+
+PATH=/bin:/usr/bin:/usr/local/bin:$PATH
+export PATH
+
+# Check if TMPDIR is set, default to /tmp
+: ${TMPDIR:=/tmp}
+
+#Securely create a temporary directory for the temporary files
+TEMPDIR=$TMPDIR/bbug.$$
+(umask 077 && mkdir $TEMPDIR) || {
+ echo "$0: could not create temporary directory" >&2
+ exit 1
+}
+
+TEMPFILE1=$TEMPDIR/bbug1
+TEMPFILE2=$TEMPDIR/bbug2
+
+USAGE="Usage: $0 [--help] [--version] [bug-report-email-address]"
+VERSTR="GNU bashbug, version ${RELEASE}.${PATCHLEVEL}-${RELSTATUS}"
+
+do_help= do_version=
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ --help) shift ; do_help=y ;;
+ --version) shift ; do_version=y ;;
+ --) shift ; break ;;
+ -*) echo "bashbug: ${1}: invalid option" >&2
+ echo "$USAGE" >& 2
+ exit 2 ;;
+ *) break ;;
+ esac
+done
+
+if [ -n "$do_version" ]; then
+ echo "${VERSTR}"
+ exit 0
+fi
+
+if [ -n "$do_help" ]; then
+ echo "${VERSTR}"
+ echo "${USAGE}"
+ echo
+ cat << HERE_EOF
+Bashbug is used to send mail to the Bash maintainers
+for when Bash doesn't behave like you'd like, or expect.
+
+Bashbug will start up your editor (as defined by the shell's
+EDITOR environment variable) with a preformatted bug report
+template for you to fill in. The report will be mailed to the
+bug-bash mailing list by default. See the manual for details.
+
+If you invoke bashbug by accident, just quit your editor without
+saving any changes to the template, and no bug report will be sent.
+HERE_EOF
+ exit 0
+fi
+
+# Figure out how to echo a string without a trailing newline
+N=`echo 'hi there\c'`
+case "$N" in
+*c) n=-n c= ;;
+*) n= c='\c' ;;
+esac
+
+BASHTESTERS="bash-testers@cwru.edu"
+
+case "$RELSTATUS" in
+alpha*|beta*|devel*|rc*) BUGBASH=chet@cwru.edu ;;
+*) BUGBASH=bug-bash@gnu.org ;;
+esac
+
+case "$RELSTATUS" in
+alpha*|beta*|devel*|rc*)
+ echo "$0: This is a testing release. Would you like your bug report"
+ echo "$0: to be sent to the bash-testers mailing list?"
+ echo $n "$0: Send to bash-testers? $c"
+ read ans
+ case "$ans" in
+ y*|Y*) BUGBASH="${BUGBASH},${BASHTESTERS}" ;;
+ esac ;;
+esac
+
+BUGADDR="${1-$BUGBASH}"
+
+if [ -z "$DEFEDITOR" ] && [ -z "$EDITOR" ]; then
+ if [ -x /usr/bin/editor ]; then
+ DEFEDITOR=editor
+ elif [ -x /usr/local/bin/ce ]; then
+ DEFEDITOR=ce
+ elif [ -x /usr/local/bin/emacs ]; then
+ DEFEDITOR=emacs
+ elif [ -x /usr/contrib/bin/emacs ]; then
+ DEFEDITOR=emacs
+ elif [ -x /usr/bin/emacs ]; then
+ DEFEDITOR=emacs
+ elif [ -x /usr/bin/xemacs ]; then
+ DEFEDITOR=xemacs
+ elif [ -x /usr/contrib/bin/jove ]; then
+ DEFEDITOR=jove
+ elif [ -x /usr/local/bin/jove ]; then
+ DEFEDITOR=jove
+ elif [ -x /usr/bin/vi ]; then
+ DEFEDITOR=vi
+ else
+ echo "$0: No default editor found: attempting to use vi" >&2
+ DEFEDITOR=vi
+ fi
+fi
+
+
+: ${EDITOR=$DEFEDITOR}
+
+: ${USER=${LOGNAME-`whoami`}}
+
+trap 'rm -rf "$TEMPDIR"; exit 1' 1 2 3 13 15
+trap 'rm -rf "$TEMPDIR"' 0
+
+UN=
+if (uname) >/dev/null 2>&1; then
+ UN=`uname -a`
+fi
+
+if [ -f /usr/lib/sendmail ] ; then
+ RMAIL="/usr/lib/sendmail"
+ SMARGS="-i -t"
+elif [ -f /usr/sbin/sendmail ] ; then
+ RMAIL="/usr/sbin/sendmail"
+ SMARGS="-i -t"
+else
+ RMAIL=rmail
+ SMARGS="$BUGADDR"
+fi
+
+INITIAL_SUBJECT='[50 character or so descriptive subject here (for reference)]'
+
+cat > "$TEMPFILE1" <<EOF
+From: ${USER}
+To: ${BUGADDR}
+Subject: ${INITIAL_SUBJECT}
+
+Configuration Information [Automatically generated, do not change]:
+Machine: $MACHINE
+OS: $OS
+Compiler: $CC
+Compilation CFLAGS: $CFLAGS
+uname output: $UN
+Machine Type: $MACHTYPE
+
+Bash Version: $RELEASE
+Patch Level: $PATCHLEVEL
+Release Status: $RELSTATUS
+
+Description:
+ [Detailed description of the problem, suggestion, or complaint.]
+
+Repeat-By:
+ [Describe the sequence of events that causes the problem
+ to occur.]
+
+Fix:
+ [Description of how to fix the problem. If you don't know a
+ fix for the problem, don't include this section.]
+EOF
+
+cp "$TEMPFILE1" "$TEMPFILE2"
+chmod u+w "$TEMPFILE1"
+
+trap '' 2 # ignore interrupts while in editor
+
+edstat=1
+while [ $edstat -ne 0 ]; do
+ $EDITOR "$TEMPFILE1"
+ edstat=$?
+
+ if [ $edstat -ne 0 ]; then
+ echo "$0: editor \`$EDITOR' exited with nonzero status."
+ echo "$0: Perhaps it was interrupted."
+ echo "$0: Type \`y' to give up, and lose your bug report;"
+ echo "$0: type \`n' to re-enter the editor."
+ echo $n "$0: Do you want to give up? $c"
+
+ read ans
+ case "$ans" in
+ [Yy]*) exit 1 ;;
+ esac
+
+ continue
+ fi
+
+ # find the subject from the temp file and see if it's been changed
+ CURR_SUB=`grep '^Subject: ' "$TEMPFILE1" | sed 's|^Subject:[ ]*||' | sed 1q`
+
+ case "$CURR_SUB" in
+ "${INITIAL_SUBJECT}")
+ echo
+ echo "$0: You have not changed the subject from the default."
+ echo "$0: Please use a more descriptive subject header."
+ echo "$0: Type \`y' to give up, and lose your bug report;"
+ echo "$0: type \`n' to re-enter the editor."
+ echo $n "$0: Do you want to give up? $c"
+
+ read ans
+ case "$ans" in
+ [Yy]*) exit 1 ;;
+ esac
+
+ echo "$0: The editor will be restarted in five seconds."
+ sleep 5
+ edstat=1
+ ;;
+ esac
+
+done
+
+trap 'rm -rf "$TEMPDIR"; exit 1' 2 # restore trap on SIGINT
+
+if cmp -s "$TEMPFILE1" "$TEMPFILE2"
+then
+ echo "File not changed, no bug report submitted."
+ exit
+fi
+
+echo $n "Send bug report to ${BUGADDR}? [y/n] $c"
+read ans
+case "$ans" in
+[Nn]*) exit 0 ;;
+esac
+
+${RMAIL} $SMARGS < "$TEMPFILE1" || {
+ cat "$TEMPFILE1" >> $HOME/dead.bashbug
+ echo "$0: mail failed: report saved in $HOME/dead.bashbug" >&2
+}
+
+exit 0
diff --git a/support/bashversion.c b/support/bashversion.c
new file mode 100644
index 0000000..59c2321
--- /dev/null
+++ b/support/bashversion.c
@@ -0,0 +1,148 @@
+/* bashversion.c -- Display bash version information. */
+
+/* Copyright (C) 2001 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "stdc.h"
+
+#include <stdio.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashansi.h"
+
+#include "version.h"
+#include "conftypes.h"
+
+#define RFLAG 0x0001
+#define VFLAG 0x0002
+#define MFLAG 0x0004
+#define PFLAG 0x0008
+#define SFLAG 0x0010
+#define LFLAG 0x0020
+#define XFLAG 0x0040
+
+extern int optind;
+extern char *optarg;
+
+extern char *dist_version;
+extern int patch_level;
+
+extern char *shell_version_string __P((void));
+extern void show_shell_version __P((int));
+
+char *shell_name = "bash";
+char *progname;
+
+static void
+usage()
+{
+ fprintf(stderr, "%s: usage: %s [-hrvpmlsx]\n", progname, progname);
+}
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ int opt, oflags;
+ char dv[128], *rv;
+
+ if (progname = strrchr (argv[0], '/'))
+ progname++;
+ else
+ progname = argv[0];
+
+ oflags = 0;
+ while ((opt = getopt(argc, argv, "hrvmpslx")) != EOF)
+ {
+ switch (opt)
+ {
+ case 'h':
+ usage ();
+ exit (0);
+ case 'r':
+ oflags |= RFLAG; /* release */
+ break;
+ case 'v':
+ oflags |= VFLAG; /* version */
+ break;
+ case 'm':
+ oflags |= MFLAG; /* machtype */
+ break;
+ case 'p':
+ oflags |= PFLAG; /* patchlevel */
+ break;
+ case 's': /* short version string */
+ oflags |= SFLAG;
+ break;
+ case 'l': /* long version string */
+ oflags |= LFLAG;
+ break;
+ case 'x': /* extended version information */
+ oflags |= XFLAG;
+ break;
+ default:
+ usage ();
+ exit (2);
+ }
+ }
+
+ argc -= optind;
+ argv += optind;
+
+ if (argc > 0)
+ {
+ usage ();
+ exit (2);
+ }
+
+ /* default behavior */
+ if (oflags == 0)
+ oflags = SFLAG;
+
+ if (oflags & (RFLAG|VFLAG))
+ {
+ strcpy (dv, dist_version);
+ rv = strchr (dv, '.');
+ if (rv)
+ *rv++ = '\0';
+ else
+ rv = "00";
+ }
+ if (oflags & RFLAG)
+ printf ("%s\n", dv);
+ else if (oflags & VFLAG)
+ printf ("%s\n", rv);
+ else if (oflags & MFLAG)
+ printf ("%s\n", MACHTYPE);
+ else if (oflags & PFLAG)
+ printf ("%d\n", patch_level);
+ else if (oflags & SFLAG)
+ printf ("%s\n", shell_version_string ());
+ else if (oflags & LFLAG)
+ show_shell_version (0);
+ else if (oflags & XFLAG)
+ show_shell_version (1);
+
+ exit (0);
+}
diff --git a/support/checkbashisms b/support/checkbashisms
new file mode 100755
index 0000000..ea6cc14
--- /dev/null
+++ b/support/checkbashisms
@@ -0,0 +1,170 @@
+#! /usr/bin/perl -w
+
+# This script is essentially copied from /usr/share/lintian/checks/scripts,
+# which is:
+# Copyright (C) 1998 Richard Braakman
+# Copyright (C) 2002 Josip Rodin
+# This version is
+# Copyright (C) 2003 Julian Gilbey
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+use strict;
+
+(my $progname = $0) =~ s|.*/||;
+
+my $usage = <<"EOF";
+Usage: $progname [-n] script ...
+ or: $progname --help
+ or: $progname --version
+This script performs basic checks for the presence of bashisms
+in /bin/sh scripts.
+EOF
+
+my $version = <<"EOF";
+This is $progname, from the Debian devscripts package, version 2.10.7ubuntu5
+This code is copyright 2003 by Julian Gilbey <jdg\@debian.org>,
+based on original code which is copyright 1998 by Richard Braakman
+and copyright 2002 by Josip Rodin.
+This program comes with ABSOLUTELY NO WARRANTY.
+You are free to redistribute this code under the terms of the
+GNU General Public License, version 3, or (at your option) any later version.
+EOF
+
+my $opt_echo = 0;
+
+##
+## handle command-line options
+##
+if (int(@ARGV) == 0 or $ARGV[0] =~ /^(--help|-h)$/) { print $usage; exit 0; }
+if (@ARGV and $ARGV[0] =~ /^(--version|-v)$/) { print $version; exit 0; }
+if (@ARGV and $ARGV[0] =~ /^(--newline|-n)$/) { $opt_echo = 1; }
+
+
+my $status = 0;
+
+foreach my $filename (@ARGV) {
+ if ($filename eq '-n' or $filename eq '--newline') {
+ next;
+ }
+ unless (open C, "$filename") {
+ warn "cannot open script $filename for reading: $!\n";
+ $status |= 2;
+ next;
+ }
+
+ my $cat_string = "";
+
+ while (<C>) {
+ if ($. == 1) { # This should be an interpreter line
+ if (m,^\#!\s*(\S+),) {
+ my $interpreter = $1;
+ if ($interpreter =~ m,/bash$,) {
+ warn "script $filename is already a bash script; skipping\n";
+ $status |= 2;
+ last; # end this file
+ }
+ elsif ($interpreter !~ m,/(sh|ash|dash)$,) {
+ warn "script $filename does not appear to be a /bin/sh script; skipping\n";
+ $status |= 2;
+ last;
+ }
+ } else {
+ warn "script $filename does not appear to have a \#! interpreter line;\nyou may get strange results\n";
+ }
+ }
+
+ next if m,^\s*\#,; # skip comment lines
+ chomp;
+ my $orig_line = $_;
+
+ s/(?<!\\)\#.*$//; # eat comments
+
+ if (m/(?:^|\s+)cat\s*\<\<\s*(\w+)/) {
+ $cat_string = $1;
+ }
+ elsif ($cat_string ne "" and m/^$cat_string/) {
+ $cat_string = "";
+ }
+ my $within_another_shell = 0;
+ if (m,(^|\s+)((/usr)?/bin/)?((b|d)?a|k|z|t?c)sh\s+-c\s*.+,) {
+ $within_another_shell = 1;
+ }
+ # if cat_string is set, we are in a HERE document and need not
+ # check for things
+ if ($cat_string eq "" and !$within_another_shell) {
+ my $found = 0;
+ my $match = '';
+ my $explanation = '';
+ my %bashisms = (
+ '(?:^|\s+)function\s+\w+' => q<'function' is useless>,
+ '(?:^|\s+)select\s+\w+' => q<'select' is not POSIX>,
+ '(?:^|\s+)source\s+(?:\.\/|\/|\$)[^\s]+' =>
+ q<should be '.', not 'source'>,
+ '(\[|test|-o|-a)\s*[^\s]+\s+==\s' =>
+ q<should be 'b = a'>,
+ '\s\|\&' => q<pipelining is not POSIX>,
+ '\$\[\w+\]' => q<arithmetic not allowed>,
+ '\$\{\w+\:\d+(?::\d+)?\}' => q<${foo:3[:1]}>,
+ '\$\{!\w+[@*]\}' => q<${!prefix[*|@]>,
+ '\$\{!\w+\}' => q<${!name}>,
+ '\$\{\w+(/.+?){1,2}\}' => q<${parm/?/pat[/str]}>,
+ '[^\\\]\{([^\s]+?,)+[^\\\}\s]+\}' =>
+ q<brace expansion>,
+ '(?:^|\s+)\w+\[\d+\]=' => q<bash arrays, H[0]>,
+ '\$\{\#?\w+\[[0-9\*\@]+\]\}' => q<bash arrays, ${name[0|*|@]}>,
+ '(?:^|\s+)(read\s*(?:;|$))' => q<read without variable>,
+ '\$\(\([A-Za-z]' => q<cnt=$((cnt + 1)) does not work in dash>,
+ 'echo\s+-[e]' => q<echo -e>,
+ 'exec\s+-[acl]' => q<exec -c/-l/-a name>,
+ '\blet\s' => q<let ...>,
+ '\$RANDOM\b' => q<$RANDOM>,
+ '(?<!\$)\(\(' => q<'((' should be '$(('>,
+ );
+
+ if ($opt_echo) {
+ $bashisms{'echo\s+-[n]'} = 'q<echo -n>';
+ }
+
+ while (my ($re,$expl) = each %bashisms) {
+ if (m/($re)/) {
+ $found = 1;
+ $match = $1;
+ $explanation = $expl;
+ last;
+ }
+ }
+ # since this test is ugly, I have to do it by itself
+ # detect source (.) trying to pass args to the command it runs
+ if (not $found and m/^\s*(\.\s+[^\s]+\s+([^\s]+))/) {
+ if ($2 eq '&&' || $2 eq '||') {
+ # everything is ok
+ ;
+ } else {
+ $found = 1;
+ $match = $1;
+ }
+ }
+ unless ($found == 0) {
+ warn "possible bashism in $filename line $. ($explanation):\n$orig_line\n";
+ $status |= 1;
+ }
+ }
+ }
+
+ close C;
+}
+
+exit $status;
diff --git a/support/config.guess b/support/config.guess
new file mode 100644
index 0000000..994d98a
--- /dev/null
+++ b/support/config.guess
@@ -0,0 +1,1529 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
+
+timestamp='2008-03-12'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008,2009 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[456])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T | authenticamd)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ IA64)
+ echo ia64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
+ echo i586-pc-haiku
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
+and
+ http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/support/config.rpath b/support/config.rpath
new file mode 100755
index 0000000..b6c4d8f
--- /dev/null
+++ b/support/config.rpath
@@ -0,0 +1,547 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+# Copyright 1996-2003 Free Software Foundation, Inc.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+# than 256 bytes, otherwise the compiler driver will dump core. The only
+# known workaround is to choose shorter directory names for the build
+# directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+ wl='-Wl,'
+else
+ case "$host_os" in
+ aix*)
+ wl='-Wl,'
+ ;;
+ mingw* | pw32* | os2*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ wl='-Wl,'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ wl='-Wl,'
+ ;;
+ newsos6)
+ ;;
+ linux*)
+ case $CC in
+ icc|ecc)
+ wl='-Wl,'
+ ;;
+ ccc)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ osf3* | osf4* | osf5*)
+ wl='-Wl,'
+ ;;
+ sco3.2v5*)
+ ;;
+ solaris*)
+ wl='-Wl,'
+ ;;
+ sunos4*)
+ wl='-Qoption ld '
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ wl='-Wl,'
+ ;;
+ sysv4*MP*)
+ ;;
+ uts4*)
+ ;;
+ esac
+fi
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ case "$host_os" in
+ aix3* | aix4* | aix5*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we can use
+ # them.
+ ld_shlibs=no
+ ;;
+ beos*)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ cygwin* | mingw* | pw32*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ netbsd*)
+ ;;
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ sunos4*)
+ hardcode_direct=yes
+ ;;
+ *)
+ if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ if test "$ld_shlibs" = yes; then
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ fi
+else
+ case "$host_os" in
+ aix3*)
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+ aix4* | aix5*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ else
+ aix_use_runtimelinking=no
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ esac
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ hardcode_direct=yes
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ esac
+ fi
+ # Begin _LT_AC_SYS_LIBPATH_AIX.
+ echo 'int main () { return 0; }' > conftest.c
+ ${CC} ${LDFLAGS} conftest.c -o conftest
+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ fi
+ if test -z "$aix_libpath"; then
+ aix_libpath="/usr/lib:/lib"
+ fi
+ rm -f conftest.c conftest
+ # End _LT_AC_SYS_LIBPATH_AIX.
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ else
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ fi
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
+ bsdi4*)
+ ;;
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ libext=lib
+ ;;
+ darwin* | rhapsody*)
+ if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
+ hardcode_direct=no
+ fi
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+ freebsd2.2*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ freebsd2*)
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ freebsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ hpux9*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ hpux10* | hpux11*)
+ if test "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=no
+ ;;
+ ia64*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=no
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+ irix5* | irix6* | nonstopux*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ netbsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ newsos6)
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ openbsd*)
+ hardcode_direct=yes
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ osf3*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ osf4* | osf5*)
+ if test "$GCC" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ # Both cc and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ hardcode_libdir_separator=:
+ ;;
+ sco3.2v5*)
+ ;;
+ solaris*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ sunos4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ sysv4)
+ case $host_vendor in
+ sni)
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ hardcode_direct=no
+ ;;
+ motorola)
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ ;;
+ sysv4.3*)
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ ld_shlibs=yes
+ fi
+ ;;
+ sysv4.2uw2*)
+ hardcode_direct=yes
+ hardcode_minus_L=no
+ ;;
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
+ ;;
+ sysv5*)
+ hardcode_libdir_flag_spec=
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
+libname_spec='lib$name'
+case "$host_os" in
+ aix3*)
+ ;;
+ aix4* | aix5*)
+ ;;
+ amigaos*)
+ ;;
+ beos*)
+ ;;
+ bsdi4*)
+ ;;
+ cygwin* | mingw* | pw32*)
+ shrext=.dll
+ ;;
+ darwin* | rhapsody*)
+ shrext=.dylib
+ ;;
+ dgux*)
+ ;;
+ freebsd1*)
+ ;;
+ freebsd*)
+ ;;
+ gnu*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case "$host_cpu" in
+ ia64*)
+ shrext=.so
+ ;;
+ hppa*64*)
+ shrext=.sl
+ ;;
+ *)
+ shrext=.sl
+ ;;
+ esac
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case "$host_os" in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+ *) libsuff= shlibsuff= ;;
+ esac
+ ;;
+ esac
+ ;;
+ linux*oldld* | linux*aout* | linux*coff*)
+ ;;
+ linux*)
+ ;;
+ netbsd*)
+ ;;
+ newsos6)
+ ;;
+ nto-qnx)
+ ;;
+ openbsd*)
+ ;;
+ os2*)
+ libname_spec='$name'
+ shrext=.dll
+ ;;
+ osf3* | osf4* | osf5*)
+ ;;
+ sco3.2v5*)
+ ;;
+ solaris*)
+ ;;
+ sunos4*)
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ ;;
+ sysv4*MP*)
+ ;;
+ uts4*)
+ ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/support/config.sub b/support/config.sub
new file mode 100644
index 0000000..d07267e
--- /dev/null
+++ b/support/config.sub
@@ -0,0 +1,1665 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 20098
+# Free Software Foundation, Inc.
+
+timestamp='2008-03-26'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008,2009 Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | mt \
+ | msp430 \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nse-tandem)
+ basic_machine=nse-tandem
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tile*)
+ basic_machine=tile-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/support/fixlinks b/support/fixlinks
new file mode 100755
index 0000000..73b0fa3
--- /dev/null
+++ b/support/fixlinks
@@ -0,0 +1,89 @@
+#! /bin/sh
+#
+# fixlinks - make symlinks in the bash source tree so that there is
+# exactly one version of any given source file.
+#
+# Copyright (C) 1996-2002 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+SRCDIR=.
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -s) shift; SRCDIR=$1 ;;
+ -u) unfix=yes ;;
+ -h) hardlinks=yes ;;
+ -*) echo "$0: $1: bad option" 1>&2
+ echo "$0: usage: $0 [-hu] [-s srcdir] [linkmap]" 1>&2
+ exit 1;;
+ *) break ;;
+ esac
+ shift
+done
+
+if [ ! -d $SRCDIR/builtins ]; then
+ echo "$0: must be run with valid -s argument or from source directory" 1>&2
+ exit 1
+fi
+
+if [ $# -eq 0 ]; then
+ linkfile=$SRCDIR/support/SYMLINKS
+else
+ linkfile=$1
+fi
+
+if [ ! -f "$linkfile" ]; then
+ echo "$0: symlink map file \`$linkfile' does not exist"
+ exit 1
+fi
+
+rm_ltmp=false
+LINKTEMP=`mktemp -t linktmp.XXXXXXXX 2>/dev/null`
+if [ -z "$LINKTEMP" ]; then
+ : ${TMPDIR:=/tmp}
+ LINKTEMP=${TMPDIR}/linktmp.$$
+ rm_ltmp=true
+fi
+
+$rm_ltmp && rm -f ${LINKTEMP}
+# if the user specified hard links, then do that. otherwise, try to use
+# symlinks if they're present
+if [ -n "$hardlinks" ]; then
+ LN=ln
+elif (ln -s /dev/null ${LINKTEMP}) >/dev/null 2>&1; then
+ LN="ln -s"
+else
+ LN=ln
+fi
+rm -f ${LINKTEMP}
+
+while read name target
+do
+ case "$name" in
+ \#*) continue;;
+ esac
+
+ rm -f $name
+ case "$unfix" in
+ yes) dirname=`expr "$name" ':' '^\(.*\)/[^/]*'`
+ [ -z "$dirname" ] && dirname=.
+ cp $dirname/$target $name
+ echo $target copied to $name ;;
+ *) $LN $target $name ; echo "$name -> $target" ;;
+ esac
+
+done < $linkfile
+
+exit 0
diff --git a/support/install.sh b/support/install.sh
new file mode 100755
index 0000000..0cac004
--- /dev/null
+++ b/support/install.sh
@@ -0,0 +1,247 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5.
+#
+# $XConsortium: install.sh,v 1.2 89/12/18 14:47:22 jim Exp $
+#
+# Copyright 1991 by the Massachusetts Institute of Technology
+#
+# Permission to use, copy, modify, distribute, and sell this software and its
+# documentation for any purpose is hereby granted without fee, provided that
+# the above copyright notice appear in all copies and that both that
+# copyright notice and this permission notice appear in supporting
+# documentation, and that the name of M.I.T. not be used in advertising or
+# publicity pertaining to distribution of the software without specific,
+# written prior permission. M.I.T. makes no representations about the
+# suitability of this software for any purpose. It is provided "as is"
+# without express or implied warranty.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+#
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+tranformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+else
+ true
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d $dst ]; then
+ instcmd=:
+ else
+ instcmd=mkdir
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f $src -o -d $src ]
+ then
+ true
+ else
+ echo "install: $src does not exist"
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "install: no destination specified"
+ exit 1
+ else
+ true
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d $dst ]
+ then
+ dst="$dst"/`basename $src`
+ else
+ true
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp="${pathcomp}${1}"
+ shift
+
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $mkdirprog "${pathcomp}"
+ else
+ true
+ fi
+
+ pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd $dst &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ dstfile=`basename $dst $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ true
+ fi
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd $src $dsttmp &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+
+fi &&
+
+
+exit 0
diff --git a/support/man2html.c b/support/man2html.c
new file mode 100644
index 0000000..2432c13
--- /dev/null
+++ b/support/man2html.c
@@ -0,0 +1,4073 @@
+/*
+ * This program was written by Richard Verhoeven (NL:5482ZX35)
+ * at the Eindhoven University of Technology. Email: rcb5@win.tue.nl
+ *
+ * Permission is granted to distribute, modify and use this program as long
+ * as this comment is not removed or changed.
+ *
+ * THIS IS A MODIFIED VERSION. IT WAS MODIFIED BY chet@po.cwru.edu FOR
+ * USE BY BASH.
+ */
+
+/*
+ * man2html will add links to the converted manpages. The function add_links
+ * is used for that. At the moment it will add links as follows, where
+ * indicates what should match to start with:
+ * ^^^
+ * Recognition Item Link
+ * ----------------------------------------------------------
+ * name(*) Manpage ../man?/name.*
+ * ^
+ * name@hostname Email address mailto:name@hostname
+ * ^
+ * method://string URL method://string
+ * ^^^
+ * www.host.name WWW server http://www.host.name
+ * ^^^^
+ * ftp.host.name FTP server ftp://ftp.host.name
+ * ^^^^
+ * <file.h> Include file file:/usr/include/file.h
+ * ^^^
+ *
+ * Since man2html does not check if manpages, hosts or email addresses exist,
+ * some links might not work. For manpages, some extra checks are performed
+ * to make sure not every () pair creates a link. Also out of date pages
+ * might point to incorrect places.
+ *
+ * The program will not allow users to get system specific files, such as
+ * /etc/passwd. It will check that "man" is part of the specified file and
+ * that "/../" isn't. Even if someone manages to get such file, man2html will
+ * handle it like a manpage and will usually not produce any output (or crash).
+ *
+ * If you find any bugs when normal manpages are converted, please report
+ * them to me (rcb5@win.tue.nl) after you have checked that man(1) can handle
+ * the manpage correct.
+ *
+ * Known bugs and missing features:
+ *
+ * * Equations are not converted at all.
+ * * Tables are converted but some features are not possible in html.
+ * * The tabbing environment is converted by counting characters and adding
+ * spaces. This might go wrong (outside <PRE>)
+ * * Some pages look beter if man2html works in troff mode, especially pages
+ * with tables. You can deside at compile time which made you want to use.
+ *
+ * -DNROFF=0 troff mode
+ * -DNROFF=1 nroff mode (default)
+ *
+ * if you install both modes, you should compile with the correct CGIBASE.
+ * * Some manpages rely on the fact that troff/nroff is used to convert
+ * them and use features which are not descripted in the man manpages.
+ * (definitions, calculations, conditionals, requests). I can't guarantee
+ * that all these features work on all manpages. (I didn't have the
+ * time to look through all the available manpages.)
+ */
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#define NROFF 0
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <ctype.h>
+#include <sys/types.h>
+#include <time.h>
+#include <sys/time.h>
+#include <errno.h>
+
+#define NULL_TERMINATED(n) ((n) + 1)
+
+#define HUGE_STR_MAX 10000
+#define LARGE_STR_MAX 2000
+#define MED_STR_MAX 500
+#define SMALL_STR_MAX 100
+#define TINY_STR_MAX 10
+
+#define MAX_MAN_PATHS 100 /* Max number of directories */
+#define MAX_ZCATS 10 /* Max number of zcat style programs */
+#define MAX_WORDLIST 100
+
+#ifndef EXIT_SUCCESS
+#define EXIT_SUCCESS 0
+#endif
+#ifndef EXIT_FAILURE
+#define EXIT_FAILURE 1
+#endif
+#ifndef EXIT_USAGE
+#define EXIT_USAGE 2
+#endif
+
+static char location_base[NULL_TERMINATED(MED_STR_MAX)] = "";
+
+static char th_page_and_sec[128] = { '\0' };
+static char th_datestr[128] = { '\0' };
+static char th_version[128] = { '\0' };
+
+char *signature = "<HR>\nThis document was created by man2html from %s.<BR>\nTime: %s\n";
+
+/* timeformat for signature */
+#define TIMEFORMAT "%d %B %Y %T %Z"
+
+char *manpage;
+
+/* BSD mandoc Bl/El lists to HTML list types */
+#define BL_DESC_LIST 1
+#define BL_BULLET_LIST 2
+#define BL_ENUM_LIST 4
+
+/* BSD mandoc Bd/Ed example(?) blocks */
+#define BD_LITERAL 1
+#define BD_INDENT 2
+
+#ifndef HAVE_STRERROR
+static char *
+strerror(int e)
+{
+ static char emsg[40];
+
+#if defined (HAVE_SYS_ERRLIST)
+ extern int sys_nerr;
+ extern char *sys_errlist[];
+
+ if (e > 0 && e < sys_nerr)
+ return (sys_errlist[e]);
+ else
+#endif /* HAVE_SYS_ERRLIST */
+ {
+ sprintf(emsg, "Unknown system error %d", e);
+ return (&emsg[0]);
+ }
+}
+#endif /* !HAVE_STRERROR */
+
+static char *
+strgrow(char *old, int len)
+{
+ char *new = realloc(old, (strlen(old) + len + 1) * sizeof(char));
+
+ if (!new) {
+ fprintf(stderr, "man2html: out of memory");
+ exit(EXIT_FAILURE);
+ }
+ return new;
+}
+
+static char *
+stralloc(int len)
+{
+ /* allocate enough for len + NULL */
+ char *new = malloc((len + 1) * sizeof(char));
+
+ if (!new) {
+ fprintf(stderr, "man2html: out of memory");
+ exit(EXIT_FAILURE);
+ }
+ return new;
+}
+
+/*
+ * Some systems don't have strdup so lets use our own - which can also
+ * check for out of memory.
+ */
+static char *
+strduplicate(char *from)
+{
+ char *new = stralloc(strlen(from));
+
+ strcpy(new, from);
+ return new;
+}
+
+/* Assumes space for n plus a null */
+static char *
+strmaxcpy(char *to, char *from, int n)
+{
+ int len = strlen(from);
+
+ strncpy(to, from, n);
+ to[(len <= n) ? len : n] = '\0';
+ return to;
+}
+
+static char *
+strmaxcat(char *to, char *from, int n)
+{
+ int to_len = strlen(to);
+
+ if (to_len < n) {
+ int from_len = strlen(from);
+ int cp = (to_len + from_len <= n) ? from_len : n - to_len;
+
+ strncpy(to + to_len, from, cp);
+ to[to_len + cp] = '\0';
+ }
+ return to;
+}
+
+/* Assumes space for limit plus a null */
+static char *
+strlimitcpy(char *to, char *from, int n, int limit)
+{
+ int len = n > limit ? limit : n;
+
+ strmaxcpy(to, from, len);
+ to[len] = '\0';
+ return to;
+}
+
+/*
+ * takes string and escapes all metacharacters. should be used before
+ * including string in system() or similar call.
+ */
+static char *
+escape_input(char *str)
+{
+ int i, j = 0;
+ static char new[NULL_TERMINATED(MED_STR_MAX)];
+
+ if (strlen(str) * 2 + 1 > MED_STR_MAX) {
+ fprintf(stderr,
+ "man2html: escape_input - str too long:\n%-80s...\n",
+ str);
+ exit(EXIT_FAILURE);
+ }
+ for (i = 0; i < strlen(str); i++) {
+ if (!(((str[i] >= 'A') && (str[i] <= 'Z')) ||
+ ((str[i] >= 'a') && (str[i] <= 'z')) ||
+ ((str[i] >= '0') && (str[i] <= '9')))) {
+ new[j] = '\\';
+ j++;
+ }
+ new[j] = str[i];
+ j++;
+ }
+ new[j] = '\0';
+ return new;
+}
+
+static void
+usage(void)
+{
+ fprintf(stderr, "man2html: usage: man2html filename\n");
+}
+
+
+
+/*
+ * below this you should not change anything unless you know a lot
+ * about this program or about troff.
+ */
+
+typedef struct STRDEF STRDEF;
+struct STRDEF {
+ int nr, slen;
+ char *st;
+ STRDEF *next;
+};
+
+typedef struct INTDEF INTDEF;
+struct INTDEF {
+ int nr;
+ int val;
+ int incr;
+ INTDEF *next;
+};
+
+static char NEWLINE[2] = "\n";
+static char idxlabel[6] = "ixAAA";
+
+#define INDEXFILE "/tmp/manindex.list"
+
+static char *fname;
+static FILE *idxfile;
+
+static STRDEF *chardef, *strdef, *defdef;
+static INTDEF *intdef;
+
+#define V(A,B) ((A)*256+(B))
+
+static INTDEF standardint[] = {
+ {V('n', ' '), NROFF, 0, NULL},
+ {V('t', ' '), 1 - NROFF, 0, NULL},
+ {V('o', ' '), 1, 0, NULL},
+ {V('e', ' '), 0, 0, NULL},
+ {V('.', 'l'), 70, 0, NULL},
+ {V('.', '$'), 0, 0, NULL},
+ {V('.', 'A'), NROFF, 0, NULL},
+ {V('.', 'T'), 1 - NROFF, 0, NULL},
+ {V('.', 'V'), 1, 0, NULL}, /* the me package tests for this */
+{0, 0, 0, NULL}};
+
+static STRDEF standardstring[] = {
+ {V('R', ' '), 1, "&#174;", NULL},
+ {V('l', 'q'), 2, "``", NULL},
+ {V('r', 'q'), 2, "''", NULL},
+ {0, 0, NULL, NULL}
+};
+
+
+static STRDEF standardchar[] = {
+ {V('*', '*'), 1, "*", NULL},
+ {V('*', 'A'), 1, "A", NULL},
+ {V('*', 'B'), 1, "B", NULL},
+ {V('*', 'C'), 2, "Xi", NULL},
+ {V('*', 'D'), 5, "Delta", NULL},
+ {V('*', 'E'), 1, "E", NULL},
+ {V('*', 'F'), 3, "Phi", NULL},
+ {V('*', 'G'), 5, "Gamma", NULL},
+ {V('*', 'H'), 5, "Theta", NULL},
+ {V('*', 'I'), 1, "I", NULL},
+ {V('*', 'K'), 1, "K", NULL},
+ {V('*', 'L'), 6, "Lambda", NULL},
+ {V('*', 'M'), 1, "M", NULL},
+ {V('*', 'N'), 1, "N", NULL},
+ {V('*', 'O'), 1, "O", NULL},
+ {V('*', 'P'), 2, "Pi", NULL},
+ {V('*', 'Q'), 3, "Psi", NULL},
+ {V('*', 'R'), 1, "P", NULL},
+ {V('*', 'S'), 5, "Sigma", NULL},
+ {V('*', 'T'), 1, "T", NULL},
+ {V('*', 'U'), 1, "Y", NULL},
+ {V('*', 'W'), 5, "Omega", NULL},
+ {V('*', 'X'), 1, "X", NULL},
+ {V('*', 'Y'), 1, "H", NULL},
+ {V('*', 'Z'), 1, "Z", NULL},
+ {V('*', 'a'), 5, "alpha", NULL},
+ {V('*', 'b'), 4, "beta", NULL},
+ {V('*', 'c'), 2, "xi", NULL},
+ {V('*', 'd'), 5, "delta", NULL},
+ {V('*', 'e'), 7, "epsilon", NULL},
+ {V('*', 'f'), 3, "phi", NULL},
+ {V('*', 'g'), 5, "gamma", NULL},
+ {V('*', 'h'), 5, "theta", NULL},
+ {V('*', 'i'), 4, "iota", NULL},
+ {V('*', 'k'), 5, "kappa", NULL},
+ {V('*', 'l'), 6, "lambda", NULL},
+ {V('*', 'm'), 1, "&#181;", NULL},
+ {V('*', 'n'), 2, "nu", NULL},
+ {V('*', 'o'), 1, "o", NULL},
+ {V('*', 'p'), 2, "pi", NULL},
+ {V('*', 'q'), 3, "psi", NULL},
+ {V('*', 'r'), 3, "rho", NULL},
+ {V('*', 's'), 5, "sigma", NULL},
+ {V('*', 't'), 3, "tau", NULL},
+ {V('*', 'u'), 7, "upsilon", NULL},
+ {V('*', 'w'), 5, "omega", NULL},
+ {V('*', 'x'), 3, "chi", NULL},
+ {V('*', 'y'), 3, "eta", NULL},
+ {V('*', 'z'), 4, "zeta", NULL},
+ {V('t', 's'), 5, "sigma", NULL},
+ {V('+', '-'), 1, "&#177;", NULL},
+ {V('1', '2'), 1, "&#189;", NULL},
+ {V('1', '4'), 1, "&#188;", NULL},
+ {V('3', '4'), 1, "&#190;", NULL},
+ {V('F', 'i'), 3, "ffi", NULL},
+ {V('F', 'l'), 3, "ffl", NULL},
+ {V('a', 'a'), 1, "&#180;", NULL},
+ {V('a', 'p'), 1, "~", NULL},
+ {V('b', 'r'), 1, "|", NULL},
+ {V('b', 'u'), 1, "*", NULL},
+ {V('b', 'v'), 1, "|", NULL},
+ {V('c', 'i'), 1, "o", NULL},
+ {V('c', 'o'), 1, "&#169;", NULL},
+ {V('c', 't'), 1, "&#162;", NULL},
+ {V('d', 'e'), 1, "&#176;", NULL},
+ {V('d', 'g'), 1, "+", NULL},
+ {V('d', 'i'), 1, "&#247;", NULL},
+ {V('e', 'm'), 1, "-", NULL},
+ {V('e', 'm'), 3, "---", NULL},
+ {V('e', 'q'), 1, "=", NULL},
+ {V('e', 's'), 1, "&#216;", NULL},
+ {V('f', 'f'), 2, "ff", NULL},
+ {V('f', 'i'), 2, "fi", NULL},
+ {V('f', 'l'), 2, "fl", NULL},
+ {V('f', 'm'), 1, "&#180;", NULL},
+ {V('g', 'a'), 1, "`", NULL},
+ {V('h', 'y'), 1, "-", NULL},
+ {V('l', 'c'), 2, "|&#175;", NULL},
+ {V('l', 'f'), 2, "|_", NULL},
+ {V('l', 'k'), 1, "<FONT SIZE=+2>{</FONT>", NULL},
+ {V('m', 'i'), 1, "-", NULL},
+ {V('m', 'u'), 1, "&#215;", NULL},
+ {V('n', 'o'), 1, "&#172;", NULL},
+ {V('o', 'r'), 1, "|", NULL},
+ {V('p', 'l'), 1, "+", NULL},
+ {V('r', 'c'), 2, "&#175;|", NULL},
+ {V('r', 'f'), 2, "_|", NULL},
+ {V('r', 'g'), 1, "&#174;", NULL},
+ {V('r', 'k'), 1, "<FONT SIZE=+2>}</FONT>", NULL},
+ {V('r', 'n'), 1, "&#175;", NULL},
+ {V('r', 'u'), 1, "_", NULL},
+ {V('s', 'c'), 1, "&#167;", NULL},
+ {V('s', 'l'), 1, "/", NULL},
+ {V('s', 'q'), 2, "[]", NULL},
+ {V('u', 'l'), 1, "_", NULL},
+ {0, 0, NULL, NULL}
+};
+
+/* default: print code */
+
+
+static char eqndelimopen = 0, eqndelimclose = 0;
+static char escapesym = '\\', nobreaksym = '\'', controlsym = '.', fieldsym = 0, padsym = 0;
+
+static char *buffer = NULL;
+static int buffpos = 0, buffmax = 0;
+static int scaninbuff = 0;
+static int itemdepth = 0;
+static int dl_set[20] = {0};
+static int still_dd = 0;
+static int tabstops[20] = {8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96};
+static int maxtstop = 12;
+static int curpos = 0;
+
+static char *scan_troff(char *c, int san, char **result);
+static char *scan_troff_mandoc(char *c, int san, char **result);
+
+static char **argument = NULL;
+
+static char charb[TINY_STR_MAX];
+
+static void
+print_sig(void)
+{
+ char datbuf[NULL_TERMINATED(MED_STR_MAX)];
+ struct tm *timetm;
+ time_t clock;
+
+ datbuf[0] = '\0';
+ clock = time(NULL);
+ timetm = localtime(&clock);
+ strftime(datbuf, MED_STR_MAX, TIMEFORMAT, timetm);
+ printf(signature, manpage, datbuf);
+}
+
+static char *
+expand_char(int nr)
+{
+ STRDEF *h;
+
+ h = chardef;
+ if (!nr)
+ return NULL;
+ while (h)
+ if (h->nr == nr) {
+ curpos += h->slen;
+ return h->st;
+ } else
+ h = h->next;
+ charb[0] = nr / 256;
+ charb[1] = nr % 256;
+ charb[2] = '\0';
+ if (charb[0] == '<') { /* Fix up <= */
+ charb[4] = charb[1];
+ strncpy(charb, "&lt;", 4);
+ charb[5] = '\0';
+ }
+ curpos += 2;
+ return charb;
+}
+
+static char *
+expand_string(int nr)
+{
+ STRDEF *h = strdef;
+
+ if (!nr)
+ return NULL;
+ while (h)
+ if (h->nr == nr) {
+ curpos += h->slen;
+ return h->st;
+ } else
+ h = h->next;
+ return NULL;
+}
+
+static char *
+read_man_page(char *filename)
+{
+ char *man_buf = NULL;
+ int i;
+ FILE *man_stream = NULL;
+ struct stat stbuf;
+ int buf_size;
+
+ if (stat(filename, &stbuf) == -1)
+ return NULL;
+
+ buf_size = stbuf.st_size;
+ man_buf = stralloc(buf_size + 5);
+ man_stream = fopen(filename, "r");
+ if (man_stream) {
+ man_buf[0] = '\n';
+ if (fread(man_buf + 1, 1, buf_size, man_stream) == buf_size) {
+ man_buf[buf_size] = '\n';
+ man_buf[buf_size + 1] = man_buf[buf_size + 2] = '\0';
+ } else {
+ man_buf = NULL;
+ }
+ fclose(man_stream);
+ }
+ return man_buf;
+}
+
+
+static char outbuffer[NULL_TERMINATED(HUGE_STR_MAX)];
+static int obp = 0;
+static int no_newline_output = 0;
+static int newline_for_fun = 0;
+static int output_possible = 0;
+static int out_length = 0;
+
+/*
+ * Add the links to the output. At the moment the following are
+ * recognized:
+ *
+#if 0
+ * name(*) -> ../man?/name.*
+#endif
+ * method://string -> method://string
+ * www.host.name -> http://www.host.name
+ * ftp.host.name -> ftp://ftp.host.name
+ * name@host -> mailto:name@host
+ * <name.h> -> file:/usr/include/name.h (guess)
+ *
+ * Other possible links to add in the future:
+ *
+ * /dir/dir/file -> file:/dir/dir/file
+ */
+static void
+add_links(char *c)
+{
+ int i, j, nr;
+ char *f, *g, *h;
+ char *idtest[6]; /* url, mailto, www, ftp, manpage */
+
+ out_length += strlen(c);
+ /* search for (section) */
+ nr = 0;
+ idtest[0] = strstr(c + 1, "://");
+ idtest[1] = strchr(c + 1, '@');
+ idtest[2] = strstr(c, "www.");
+ idtest[3] = strstr(c, "ftp.");
+#if 0
+ idtest[4] = strchr(c + 1, '(');
+#else
+ idtest[4] = 0;
+#endif
+ idtest[5] = strstr(c + 1, ".h&gt;");
+ for (i = 0; i < 6; i++)
+ nr += (idtest[i] != NULL);
+ while (nr) {
+ j = -1;
+ for (i = 0; i < 6; i++)
+ if (idtest[i] && (j < 0 || idtest[i] < idtest[j]))
+ j = i;
+ switch (j) {
+ case 5: /* <name.h> */
+ f = idtest[5];
+ h = f + 2;
+ g = f;
+ while (g > c && g[-1] != ';')
+ g--;
+ if (g != c) {
+ char t;
+
+ t = *g;
+ *g = '\0';
+ fputs(c, stdout);
+ *g = t;
+ *h = '\0';
+ printf("<A HREF=\"file:/usr/include/%s\">%s</A>&gt;", g, g);
+ c = f + 6;
+ } else {
+ f[5] = '\0';
+ fputs(c, stdout);
+ f[5] = ';';
+ c = f + 5;
+ }
+ break;
+ case 4: /* manpage */
+#if 0
+ f = idtest[j];
+ /* check section */
+ g = strchr(f, ')');
+ if (g && f - g < 6 && (isalnum(f[-1]) || f[-1] == '>') &&
+ ((isdigit(f[1]) && f[1] != '0' &&
+ (f[2] == ')' || (isalpha(f[2]) && f[3] == ')') || f[2] == 'X')) ||
+ (f[2] == ')' && (f[1] == 'n' || f[1] == 'l')))) {
+ /* this might be a link */
+ h = f - 1;
+ /* skip html makeup */
+ while (h > c && *h == '>') {
+ while (h != c && *h != '<')
+ h--;
+ if (h != c)
+ h--;
+ }
+ if (isalnum(*h)) {
+ char t, sec, subsec, *e;
+
+ e = h + 1;
+ sec = f[1];
+ subsec = f[2];
+ if ((subsec == 'X' && f[3] != ')') || subsec == ')')
+ subsec = '\0';
+ while (h > c && (isalnum(h[-1]) || h[-1] == '_' ||
+ h[-1] == '-' || h[-1] == '.'))
+ h--;
+ t = *h;
+ *h = '\0';
+ fputs(c, stdout);
+ *h = t;
+ t = *e;
+ *e = '\0';
+ if (subsec)
+ printf("<A HREF=\""
+ CGIBASE
+ "?man%c/%s.%c%c\">%s</A>",
+ sec, h, sec, tolower(subsec), h);
+ else
+ printf("<A HREF=\""
+ CGIBASE
+ "?man%c/%s.%c\">%s</A>",
+ sec, h, sec, h);
+ *e = t;
+ c = e;
+ }
+ }
+ *f = '\0';
+ fputs(c, stdout);
+ *f = '(';
+ idtest[4] = f - 1;
+ c = f;
+#endif
+ break; /* manpage */
+ case 3: /* ftp */
+ case 2: /* www */
+ g = f = idtest[j];
+ while (*g && (isalnum(*g) || *g == '_' || *g == '-' || *g == '+' ||
+ *g == '.'))
+ g++;
+ if (g[-1] == '.')
+ g--;
+ if (g - f > 4) {
+ char t;
+
+ t = *f;
+ *f = '\0';
+ fputs(c, stdout);
+ *f = t;
+ t = *g;
+ *g = '\0';
+ printf("<A HREF=\"%s://%s\">%s</A>", (j == 3 ? "ftp" : "http"),
+ f, f);
+ *g = t;
+ c = g;
+ } else {
+ f[3] = '\0';
+ fputs(c, stdout);
+ c = f + 3;
+ f[3] = '.';
+ }
+ break;
+ case 1: /* mailto */
+ g = f = idtest[1];
+ while (g > c && (isalnum(g[-1]) || g[-1] == '_' || g[-1] == '-' ||
+ g[-1] == '+' || g[-1] == '.' || g[-1] == '%'))
+ g--;
+ h = f + 1;
+ while (*h && (isalnum(*h) || *h == '_' || *h == '-' || *h == '+' ||
+ *h == '.'))
+ h++;
+ if (*h == '.')
+ h--;
+ if (h - f > 4 && f - g > 1) {
+ char t;
+
+ t = *g;
+ *g = '\0';
+ fputs(c, stdout);
+ *g = t;
+ t = *h;
+ *h = '\0';
+ printf("<A HREF=\"mailto:%s\">%s</A>", g, g);
+ *h = t;
+ c = h;
+ } else {
+ *f = '\0';
+ fputs(c, stdout);
+ *f = '@';
+ idtest[1] = c;
+ c = f;
+ }
+ break;
+ case 0: /* url */
+ g = f = idtest[0];
+ while (g > c && isalpha(g[-1]) && islower(g[-1]))
+ g--;
+ h = f + 3;
+ while (*h && !isspace(*h) && *h != '<' && *h != '>' && *h != '"' &&
+ *h != '&')
+ h++;
+ if (f - g > 2 && f - g < 7 && h - f > 3) {
+ char t;
+
+ t = *g;
+ *g = '\0';
+ fputs(c, stdout);
+ *g = t;
+ t = *h;
+ *h = '\0';
+ printf("<A HREF=\"%s\">%s</A>", g, g);
+ *h = t;
+ c = h;
+ } else {
+ f[1] = '\0';
+ fputs(c, stdout);
+ f[1] = '/';
+ c = f + 1;
+ }
+ break;
+ default:
+ break;
+ }
+ nr = 0;
+ if (idtest[0] && idtest[0] < c)
+ idtest[0] = strstr(c + 1, "://");
+ if (idtest[1] && idtest[1] < c)
+ idtest[1] = strchr(c + 1, '@');
+ if (idtest[2] && idtest[2] < c)
+ idtest[2] = strstr(c, "www.");
+ if (idtest[3] && idtest[3] < c)
+ idtest[3] = strstr(c, "ftp.");
+ if (idtest[4] && idtest[4] < c)
+ idtest[4] = strchr(c + 1, '(');
+ if (idtest[5] && idtest[5] < c)
+ idtest[5] = strstr(c + 1, ".h&gt;");
+ for (i = 0; i < 6; i++)
+ nr += (idtest[i] != NULL);
+ }
+ fputs(c, stdout);
+}
+
+static int current_font = 0;
+static int current_size = 0;
+static int fillout = 1;
+
+static void
+out_html(char *c)
+{
+ if (!c)
+ return;
+ if (no_newline_output) {
+ int i = 0;
+
+ no_newline_output = 1;
+ while (c[i]) {
+ if (!no_newline_output)
+ c[i - 1] = c[i];
+ if (c[i] == '\n')
+ no_newline_output = 1;
+ i++;
+ }
+ if (!no_newline_output)
+ c[i - 1] = 0;
+ }
+ if (scaninbuff) {
+ while (*c) {
+ if (buffpos >= buffmax) {
+ char *h;
+
+ h = realloc(buffer, buffmax * 2);
+ if (!h)
+ return;
+ buffer = h;
+ buffmax *= 2;
+ }
+ buffer[buffpos++] = *c++;
+ }
+ } else if (output_possible) {
+ while (*c) {
+ outbuffer[obp++] = *c;
+ if (*c == '\n' || obp > HUGE_STR_MAX) {
+ outbuffer[obp] = '\0';
+ add_links(outbuffer);
+ obp = 0;
+ }
+ c++;
+ }
+ }
+}
+
+#define FO0 ""
+#define FC0 ""
+#define FO1 "<I>"
+#define FC1 "</I>"
+#define FO2 "<B>"
+#define FC2 "</B>"
+#define FO3 "<TT>"
+#define FC3 "</TT>"
+
+static char *switchfont[16] = {
+ "", FC0 FO1, FC0 FO2, FC0 FO3,
+ FC1 FO0, "", FC1 FO2, FC1 FO3,
+ FC2 FO0, FC2 FO1, "", FC2 FO3,
+ FC3 FO0, FC3 FO1, FC3 FO2, ""
+};
+
+static char *
+change_to_font(int nr)
+{
+ int i;
+
+ switch (nr) {
+ case '0':
+ nr++;
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ nr = nr - '1';
+ break;
+ case V('C', 'W'):
+ nr = 3;
+ break;
+ case 'L':
+ nr = 3;
+ break;
+ case 'B':
+ nr = 2;
+ break;
+ case 'I':
+ nr = 1;
+ break;
+ case 'P':
+ case 'R':
+ nr = 0;
+ break;
+ case 0:
+ case 1:
+ case 2:
+ case 3:
+ break;
+ default:
+ nr = 0;
+ break;
+ }
+ i = current_font * 4 + nr % 4;
+ current_font = nr % 4;
+ return switchfont[i];
+}
+
+static char sizebuf[200];
+
+static char *
+change_to_size(int nr)
+{
+ int i;
+
+ switch (nr) {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ nr = nr - '0';
+ break;
+ case '\0':
+ break;
+ default:
+ nr = current_size + nr;
+ if (nr > 9)
+ nr = 9;
+ if (nr < -9)
+ nr = -9;
+ break;
+ }
+ if (nr == current_size)
+ return "";
+ i = current_font;
+ sizebuf[0] = '\0';
+ strcat(sizebuf, change_to_font(0));
+ if (current_size)
+ strcat(sizebuf, "</FONT>");
+ current_size = nr;
+ if (nr) {
+ int l;
+
+ strcat(sizebuf, "<FONT SIZE=");
+ l = strlen(sizebuf);
+ if (nr > 0)
+ sizebuf[l++] = '+';
+ else
+ sizebuf[l++] = '-', nr = -nr;
+ sizebuf[l++] = nr + '0';
+ sizebuf[l++] = '>';
+ sizebuf[l] = '\0';
+ }
+ strcat(sizebuf, change_to_font(i));
+ return sizebuf;
+}
+
+static int asint = 0;
+static int intresult = 0;
+
+#define SKIPEOL while (*c && *c++!='\n')
+
+static int skip_escape = 0;
+static int single_escape = 0;
+
+static char *
+scan_escape(char *c)
+{
+ char *h = NULL;
+ char b[5];
+ INTDEF *intd;
+ int exoutputp, exskipescape;
+ int i, j;
+
+ intresult = 0;
+ switch (*c) {
+ case 'e':
+ h = "\\";
+ curpos++;
+ break;
+ case '0':
+ case ' ':
+ h = "&nbsp;";
+ curpos++;
+ break;
+ case '|':
+ h = "";
+ break;
+ case '"':
+ SKIPEOL;
+ c--;
+ h = "";
+ break;
+ case '$':
+ if (argument) {
+ c++;
+ i = (*c - '1');
+ if (!(h = argument[i]))
+ h = "";
+ }
+ break;
+ case 'z':
+ c++;
+ if (*c == '\\') {
+ c = scan_escape(c + 1);
+ c--;
+ h = "";
+ } else {
+ b[0] = *c;
+ b[1] = '\0';
+ h = "";
+ }
+ break;
+ case 'k':
+ c++;
+ if (*c == '(')
+ c += 2;
+ case '^':
+ case '!':
+ case '%':
+ case 'a':
+ case 'd':
+ case 'r':
+ case 'u':
+ case '\n':
+ case '&':
+ h = "";
+ break;
+ case '(':
+ c++;
+ i = c[0] * 256 + c[1];
+ c++;
+ h = expand_char(i);
+ break;
+ case '*':
+ c++;
+ if (*c == '(') {
+ c++;
+ i = c[0] * 256 + c[1];
+ c++;
+ } else
+ i = *c * 256 + ' ';
+ h = expand_string(i);
+ break;
+ case 'f':
+ c++;
+ if (*c == '\\') {
+ c++;
+ c = scan_escape(c);
+ c--;
+ i = intresult;
+ } else if (*c != '(')
+ i = *c;
+ else {
+ c++;
+ i = c[0] * 256 + c[1];
+ c++;
+ }
+ if (!skip_escape)
+ h = change_to_font(i);
+ else
+ h = "";
+ break;
+ case 's':
+ c++;
+ j = 0;
+ i = 0;
+ if (*c == '-') {
+ j = -1;
+ c++;
+ } else if (*c == '+') {
+ j = 1;
+ c++;
+ }
+ if (*c == '0')
+ c++;
+ else if (*c == '\\') {
+ c++;
+ c = scan_escape(c);
+ i = intresult;
+ if (!j)
+ j = 1;
+ } else
+ while (isdigit(*c) && (!i || (!j && i < 4)))
+ i = i * 10 + (*c++) - '0';
+ if (!j) {
+ j = 1;
+ if (i)
+ i = i - 10;
+ }
+ if (!skip_escape)
+ h = change_to_size(i * j);
+ else
+ h = "";
+ c--;
+ break;
+ case 'n':
+ c++;
+ j = 0;
+ switch (*c) {
+ case '+':
+ j = 1;
+ c++;
+ break;
+ case '-':
+ j = -1;
+ c++;
+ break;
+ default:
+ break;
+ }
+ if (*c == '(') {
+ c++;
+ i = V(c[0], c[1]);
+ c = c + 1;
+ } else {
+ i = V(c[0], ' ');
+ }
+ intd = intdef;
+ while (intd && intd->nr != i)
+ intd = intd->next;
+ if (intd) {
+ intd->val = intd->val + j * intd->incr;
+ intresult = intd->val;
+ } else {
+ switch (i) {
+ case V('.', 's'):
+ intresult = current_size;
+ break;
+ case V('.', 'f'):
+ intresult = current_font;
+ break;
+ default:
+ intresult = 0;
+ break;
+ }
+ }
+ h = "";
+ break;
+ case 'w':
+ c++;
+ i = *c;
+ c++;
+ exoutputp = output_possible;
+ exskipescape = skip_escape;
+ output_possible = 0;
+ skip_escape = 1;
+ j = 0;
+ while (*c != i) {
+ j++;
+ if (*c == escapesym)
+ c = scan_escape(c + 1);
+ else
+ c++;
+ }
+ output_possible = exoutputp;
+ skip_escape = exskipescape;
+ intresult = j;
+ break;
+ case 'l':
+ h = "<HR>";
+ curpos = 0;
+ case 'b':
+ case 'v':
+ case 'x':
+ case 'o':
+ case 'L':
+ case 'h':
+ c++;
+ i = *c;
+ c++;
+ exoutputp = output_possible;
+ exskipescape = skip_escape;
+ output_possible = 0;
+ skip_escape = 1;
+ while (*c != i)
+ if (*c == escapesym)
+ c = scan_escape(c + 1);
+ else
+ c++;
+ output_possible = exoutputp;
+ skip_escape = exskipescape;
+ break;
+ case 'c':
+ no_newline_output = 1;
+ break;
+ case '{':
+ newline_for_fun++;
+ h = "";
+ break;
+ case '}':
+ if (newline_for_fun)
+ newline_for_fun--;
+ h = "";
+ break;
+ case 'p':
+ h = "<BR>\n";
+ curpos = 0;
+ break;
+ case 't':
+ h = "\t";
+ curpos = (curpos + 8) & 0xfff8;
+ break;
+ case '<':
+ h = "&lt;";
+ curpos++;
+ break;
+ case '>':
+ h = "&gt;";
+ curpos++;
+ break;
+ case '\\':
+ if (single_escape) {
+ c--;
+ break;
+ }
+ default:
+ b[0] = *c;
+ b[1] = 0;
+ h = b;
+ curpos++;
+ break;
+ }
+ c++;
+ if (!skip_escape)
+ out_html(h);
+ return c;
+}
+
+typedef struct TABLEITEM TABLEITEM;
+
+struct TABLEITEM {
+ char *contents;
+ int size, align, valign, colspan, rowspan, font, vleft, vright, space,
+ width;
+ TABLEITEM *next;
+};
+
+static TABLEITEM emptyfield = {NULL, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, NULL};
+
+typedef struct TABLEROW TABLEROW;
+
+struct TABLEROW {
+ TABLEITEM *first;
+ TABLEROW *prev, *next;
+};
+
+static char *tableopt[] = {
+ "center", "expand", "box", "allbox", "doublebox",
+ "tab", "linesize", "delim", NULL
+};
+static int tableoptl[] = {6, 6, 3, 6, 9, 3, 8, 5, 0};
+
+static void
+clear_table(TABLEROW * table)
+{
+ TABLEROW *tr1, *tr2;
+ TABLEITEM *ti1, *ti2;
+
+ tr1 = table;
+ while (tr1->prev)
+ tr1 = tr1->prev;
+ while (tr1) {
+ ti1 = tr1->first;
+ while (ti1) {
+ ti2 = ti1->next;
+ if (ti1->contents)
+ free(ti1->contents);
+ free(ti1);
+ ti1 = ti2;
+ }
+ tr2 = tr1;
+ tr1 = tr1->next;
+ free(tr2);
+ }
+}
+
+static char *scan_expression(char *c, int *result);
+
+static char *
+scan_format(char *c, TABLEROW ** result, int *maxcol)
+{
+ TABLEROW *layout, *currow;
+ TABLEITEM *curfield;
+ int i, j;
+
+ if (*result) {
+ clear_table(*result);
+ }
+ layout = currow = (TABLEROW *) malloc(sizeof(TABLEROW));
+ currow->next = currow->prev = NULL;
+ currow->first = curfield = (TABLEITEM *) malloc(sizeof(TABLEITEM));
+ *curfield = emptyfield;
+ while (*c && *c != '.') {
+ switch (*c) {
+ case 'C':
+ case 'c':
+ case 'N':
+ case 'n':
+ case 'R':
+ case 'r':
+ case 'A':
+ case 'a':
+ case 'L':
+ case 'l':
+ case 'S':
+ case 's':
+ case '^':
+ case '_':
+ if (curfield->align) {
+ curfield->next = (TABLEITEM *) malloc(sizeof(TABLEITEM));
+ curfield = curfield->next;
+ *curfield = emptyfield;
+ }
+ curfield->align = toupper(*c);
+ c++;
+ break;
+ case 'i':
+ case 'I':
+ case 'B':
+ case 'b':
+ curfield->font = toupper(*c);
+ c++;
+ break;
+ case 'f':
+ case 'F':
+ c++;
+ curfield->font = toupper(*c);
+ c++;
+ if (!isspace(*c))
+ c++;
+ break;
+ case 't':
+ case 'T':
+ curfield->valign = 't';
+ c++;
+ break;
+ case 'p':
+ case 'P':
+ c++;
+ i = j = 0;
+ if (*c == '+') {
+ j = 1;
+ c++;
+ }
+ if (*c == '-') {
+ j = -1;
+ c++;
+ }
+ while (isdigit(*c))
+ i = i * 10 + (*c++) - '0';
+ if (j)
+ curfield->size = i * j;
+ else
+ curfield->size = j - 10;
+ break;
+ case 'v':
+ case 'V':
+ case 'w':
+ case 'W':
+ c = scan_expression(c + 2, &curfield->width);
+ break;
+ case '|':
+ if (curfield->align)
+ curfield->vleft++;
+ else
+ curfield->vright++;
+ c++;
+ break;
+ case 'e':
+ case 'E':
+ c++;
+ break;
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ i = 0;
+ while (isdigit(*c))
+ i = i * 10 + (*c++) - '0';
+ curfield->space = i;
+ break;
+ case ',':
+ case '\n':
+ currow->next = (TABLEROW *) malloc(sizeof(TABLEROW));
+ currow->next->prev = currow;
+ currow = currow->next;
+ currow->next = NULL;
+ curfield = currow->first = (TABLEITEM *) malloc(sizeof(TABLEITEM));
+ *curfield = emptyfield;
+ c++;
+ break;
+ default:
+ c++;
+ break;
+ }
+ }
+ if (*c == '.')
+ while (*c++ != '\n');
+ *maxcol = 0;
+ currow = layout;
+ while (currow) {
+ curfield = layout->first;
+ i = 0;
+ while (curfield) {
+ i++;
+ curfield = curfield->next;
+ }
+ if (i > *maxcol)
+ *maxcol = i;
+ currow = currow->next;
+ }
+ *result = layout;
+ return c;
+}
+
+static TABLEROW *
+next_row(TABLEROW * tr)
+{
+ if (tr->next) {
+ tr = tr->next;
+ if (!tr->next)
+ next_row(tr);
+ return tr;
+ } else {
+ TABLEITEM *ti, *ti2;
+
+ tr->next = (TABLEROW *) malloc(sizeof(TABLEROW));
+ tr->next->prev = tr;
+ ti = tr->first;
+ tr = tr->next;
+ tr->next = NULL;
+ if (ti)
+ tr->first = ti2 = (TABLEITEM *) malloc(sizeof(TABLEITEM));
+ else
+ tr->first = ti2 = NULL;
+ while (ti != ti2) {
+ *ti2 = *ti;
+ ti2->contents = NULL;
+ if ((ti = ti->next)) {
+ ti2->next = (TABLEITEM *) malloc(sizeof(TABLEITEM));
+ }
+ ti2 = ti2->next;
+ }
+ return tr;
+ }
+}
+
+static char itemreset[20] = "\\fR\\s0";
+
+static char *
+scan_table(char *c)
+{
+ char *t, *h, *g;
+ int center = 0, expand = 0, box = 0, border = 0, linesize = 1;
+ int i, j, maxcol = 0, finished = 0;
+ int oldfont, oldsize, oldfillout;
+ char itemsep = '\t';
+ TABLEROW *layout = NULL, *currow, *ftable;
+ TABLEITEM *curfield;
+
+ while (*c++ != '\n');
+ h = c;
+ if (*h == '.')
+ return c - 1;
+ oldfont = current_font;
+ oldsize = current_size;
+ oldfillout = fillout;
+ out_html(change_to_font(0));
+ out_html(change_to_size(0));
+ if (!fillout) {
+ fillout = 1;
+ out_html("</PRE>");
+ }
+ while (*h && *h != '\n')
+ h++;
+ if (h[-1] == ';') {
+ /* scan table options */
+ while (c < h) {
+ while (isspace(*c))
+ c++;
+ for (i = 0; tableopt[i] && strncmp(tableopt[i], c, tableoptl[i]); i++);
+ c = c + tableoptl[i];
+ switch (i) {
+ case 0:
+ center = 1;
+ break;
+ case 1:
+ expand = 1;
+ break;
+ case 2:
+ box = 1;
+ break;
+ case 3:
+ border = 1;
+ break;
+ case 4:
+ box = 2;
+ break;
+ case 5:
+ while (*c++ != '(');
+ itemsep = *c++;
+ break;
+ case 6:
+ while (*c++ != '(');
+ linesize = 0;
+ while (isdigit(*c))
+ linesize = linesize * 10 + (*c++) - '0';
+ break;
+ case 7:
+ while (*c != ')')
+ c++;
+ default:
+ break;
+ }
+ c++;
+ }
+ c = h + 1;
+ }
+ /* scan layout */
+ c = scan_format(c, &layout, &maxcol);
+ currow = layout;
+ next_row(currow);
+ curfield = layout->first;
+ i = 0;
+ while (!finished) {
+ /* search item */
+ h = c;
+ if ((*c == '_' || *c == '=') && (c[1] == itemsep || c[1] == '\n')) {
+ if (c[-1] == '\n' && c[1] == '\n') {
+ if (currow->prev) {
+ currow->prev->next = (TABLEROW *) malloc(sizeof(TABLEROW));
+ currow->prev->next->next = currow;
+ currow->prev->next->prev = currow->prev;
+ currow->prev = currow->prev->next;
+ } else {
+ currow->prev = layout = (TABLEROW *) malloc(sizeof(TABLEROW));
+ currow->prev->prev = NULL;
+ currow->prev->next = currow;
+ }
+ curfield = currow->prev->first =
+ (TABLEITEM *) malloc(sizeof(TABLEITEM));
+ *curfield = emptyfield;
+ curfield->align = *c;
+ curfield->colspan = maxcol;
+ curfield = currow->first;
+ c = c + 2;
+ } else {
+ if (curfield) {
+ curfield->align = *c;
+ do {
+ curfield = curfield->next;
+ } while (curfield && curfield->align == 'S');
+ }
+ if (c[1] == '\n') {
+ currow = next_row(currow);
+ curfield = currow->first;
+ }
+ c = c + 2;
+ }
+ } else if (*c == 'T' && c[1] == '{') {
+ h = c + 2;
+ c = strstr(h, "\nT}");
+ c++;
+ *c = '\0';
+ g = NULL;
+ scan_troff(h, 0, &g);
+ scan_troff(itemreset, 0, &g);
+ *c = 'T';
+ c += 3;
+ if (curfield) {
+ curfield->contents = g;
+ do {
+ curfield = curfield->next;
+ } while (curfield && curfield->align == 'S');
+ } else if (g)
+ free(g);
+ if (c[-1] == '\n') {
+ currow = next_row(currow);
+ curfield = currow->first;
+ }
+ } else if (*c == '.' && c[1] == 'T' && c[2] == '&' && c[-1] == '\n') {
+ TABLEROW *hr;
+
+ while (*c++ != '\n');
+ hr = currow;
+ currow = currow->prev;
+ hr->prev = NULL;
+ c = scan_format(c, &hr, &i);
+ hr->prev = currow;
+ currow->next = hr;
+ currow = hr;
+ next_row(currow);
+ curfield = currow->first;
+ } else if (*c == '.' && c[1] == 'T' && c[2] == 'E' && c[-1] == '\n') {
+ finished = 1;
+ while (*c++ != '\n');
+ if (currow->prev)
+ currow->prev->next = NULL;
+ currow->prev = NULL;
+ clear_table(currow);
+ } else if (*c == '.' && c[-1] == '\n' && !isdigit(c[1])) {
+ /*
+ * skip troff request inside table (usually only .sp
+ * )
+ */
+ while (*c++ != '\n');
+ } else {
+ h = c;
+ while (*c && (*c != itemsep || c[-1] == '\\') &&
+ (*c != '\n' || c[-1] == '\\'))
+ c++;
+ i = 0;
+ if (*c == itemsep) {
+ i = 1;
+ *c = '\n';
+ }
+ if (h[0] == '\\' && h[2] == '\n' &&
+ (h[1] == '_' || h[1] == '^')) {
+ if (curfield) {
+ curfield->align = h[1];
+ do {
+ curfield = curfield->next;
+ } while (curfield && curfield->align == 'S');
+ }
+ h = h + 3;
+ } else {
+ g = NULL;
+ h = scan_troff(h, 1, &g);
+ scan_troff(itemreset, 0, &g);
+ if (curfield) {
+ curfield->contents = g;
+ do {
+ curfield = curfield->next;
+ } while (curfield && curfield->align == 'S');
+ } else if (g)
+ free(g);
+ }
+ if (i)
+ *c = itemsep;
+ c = h;
+ if (c[-1] == '\n') {
+ currow = next_row(currow);
+ curfield = currow->first;
+ }
+ }
+ }
+ /* calculate colspan and rowspan */
+ currow = layout;
+ while (currow->next)
+ currow = currow->next;
+ while (currow) {
+ TABLEITEM *ti, *ti1 = NULL, *ti2 = NULL;
+
+ ti = currow->first;
+ if (currow->prev)
+ ti1 = currow->prev->first;
+ while (ti) {
+ switch (ti->align) {
+ case 'S':
+ if (ti2) {
+ ti2->colspan++;
+ if (ti2->rowspan < ti->rowspan)
+ ti2->rowspan = ti->rowspan;
+ }
+ break;
+ case '^':
+ if (ti1)
+ ti1->rowspan++;
+ default:
+ if (!ti2)
+ ti2 = ti;
+ else {
+ do {
+ ti2 = ti2->next;
+ } while (ti2 && curfield->align == 'S');
+ }
+ break;
+ }
+ ti = ti->next;
+ if (ti1)
+ ti1 = ti1->next;
+ }
+ currow = currow->prev;
+ }
+ /* produce html output */
+ if (center)
+ out_html("<CENTER>");
+ if (box == 2)
+ out_html("<TABLE BORDER><TR><TD>");
+ out_html("<TABLE");
+ if (box || border) {
+ out_html(" BORDER");
+ if (!border)
+ out_html("><TR><TD><TABLE");
+ if (expand)
+ out_html(" WIDTH=100%");
+ }
+ out_html(">\n");
+ currow = layout;
+ while (currow) {
+ j = 0;
+ out_html("<TR VALIGN=top>");
+ curfield = currow->first;
+ while (curfield) {
+ if (curfield->align != 'S' && curfield->align != '^') {
+ out_html("<TD");
+ switch (curfield->align) {
+ case 'N':
+ curfield->space += 4;
+ case 'R':
+ out_html(" ALIGN=right");
+ break;
+ case 'C':
+ out_html(" ALIGN=center");
+ default:
+ break;
+ }
+ if (!curfield->valign && curfield->rowspan > 1)
+ out_html(" VALIGN=center");
+ if (curfield->colspan > 1) {
+ char buf[5];
+
+ out_html(" COLSPAN=");
+ sprintf(buf, "%i", curfield->colspan);
+ out_html(buf);
+ }
+ if (curfield->rowspan > 1) {
+ char buf[5];
+
+ out_html(" ROWSPAN=");
+ sprintf(buf, "%i", curfield->rowspan);
+ out_html(buf);
+ }
+ j = j + curfield->colspan;
+ out_html(">");
+ if (curfield->size)
+ out_html(change_to_size(curfield->size));
+ if (curfield->font)
+ out_html(change_to_font(curfield->font));
+ switch (curfield->align) {
+ case '=':
+ out_html("<HR><HR>");
+ break;
+ case '_':
+ out_html("<HR>");
+ break;
+ default:
+ if (curfield->contents)
+ out_html(curfield->contents);
+ break;
+ }
+ if (curfield->space)
+ for (i = 0; i < curfield->space; i++)
+ out_html("&nbsp;");
+ if (curfield->font)
+ out_html(change_to_font(0));
+ if (curfield->size)
+ out_html(change_to_size(0));
+ if (j >= maxcol && curfield->align > '@' && curfield->align != '_')
+ out_html("<BR>");
+ out_html("</TD>");
+ }
+ curfield = curfield->next;
+ }
+ out_html("</TR>\n");
+ currow = currow->next;
+ }
+ if (box && !border)
+ out_html("</TABLE>");
+ out_html("</TABLE>");
+ if (box == 2)
+ out_html("</TABLE>");
+ if (center)
+ out_html("</CENTER>\n");
+ else
+ out_html("\n");
+ if (!oldfillout)
+ out_html("<PRE>");
+ fillout = oldfillout;
+ out_html(change_to_size(oldsize));
+ out_html(change_to_font(oldfont));
+ return c;
+}
+
+static char *
+scan_expression(char *c, int *result)
+{
+ int value = 0, value2, j = 0, sign = 1, opex = 0;
+ char oper = 'c';
+
+ if (*c == '!') {
+ c = scan_expression(c + 1, &value);
+ value = (!value);
+ } else if (*c == 'n') {
+ c++;
+ value = NROFF;
+ } else if (*c == 't') {
+ c++;
+ value = 1 - NROFF;
+ } else if (*c == '\'' || *c == '"' || *c < ' ' || (*c == '\\' && c[1] == '(')) {
+ /*
+ * ?string1?string2? test if string1 equals string2.
+ */
+ char *st1 = NULL, *st2 = NULL, *h;
+ char *tcmp = NULL;
+ char sep;
+
+ sep = *c;
+ if (sep == '\\') {
+ tcmp = c;
+ c = c + 3;
+ }
+ c++;
+ h = c;
+ while (*c != sep && (!tcmp || strncmp(c, tcmp, 4)))
+ c++;
+ *c = '\n';
+ scan_troff(h, 1, &st1);
+ *c = sep;
+ if (tcmp)
+ c = c + 3;
+ c++;
+ h = c;
+ while (*c != sep && (!tcmp || strncmp(c, tcmp, 4)))
+ c++;
+ *c = '\n';
+ scan_troff(h, 1, &st2);
+ *c = sep;
+ if (!st1 && !st2)
+ value = 1;
+ else if (!st1 || !st2)
+ value = 0;
+ else
+ value = (!strcmp(st1, st2));
+ if (st1)
+ free(st1);
+ if (st2)
+ free(st2);
+ if (tcmp)
+ c = c + 3;
+ c++;
+ } else {
+ while (*c && !isspace(*c) && *c != ')') {
+ opex = 0;
+ switch (*c) {
+ case '(':
+ c = scan_expression(c + 1, &value2);
+ value2 = sign * value2;
+ opex = 1;
+ break;
+ case '.':
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':{
+ int num = 0, denum = 1;
+
+ value2 = 0;
+ while (isdigit(*c))
+ value2 = value2 * 10 + ((*c++) - '0');
+ if (*c == '.') {
+ c++;
+ while (isdigit(*c)) {
+ num = num * 10 + ((*c++) - '0');
+ denum = denum * 10;
+ }
+ }
+ if (isalpha(*c)) {
+ /* scale indicator */
+ switch (*c) {
+ case 'i': /* inch -> 10pt */
+ value2 = value2 * 10 + (num * 10 + denum / 2) / denum;
+ num = 0;
+ break;
+ default:
+ break;
+ }
+ c++;
+ }
+ value2 = value2 + (num + denum / 2) / denum;
+ value2 = sign * value2;
+ opex = 1;
+ break;
+ }
+ case '\\':
+ c = scan_escape(c + 1);
+ value2 = intresult * sign;
+ if (isalpha(*c))
+ c++; /* scale indicator */
+ opex = 1;
+ break;
+ case '-':
+ if (oper) {
+ sign = -1;
+ c++;
+ break;
+ }
+ case '>':
+ case '<':
+ case '+':
+ case '/':
+ case '*':
+ case '%':
+ case '&':
+ case '=':
+ case ':':
+ if (c[1] == '=')
+ oper = (*c++) + 16;
+ else
+ oper = *c;
+ c++;
+ break;
+ default:
+ c++;
+ break;
+ }
+ if (opex) {
+ sign = 1;
+ switch (oper) {
+ case 'c':
+ value = value2;
+ break;
+ case '-':
+ value = value - value2;
+ break;
+ case '+':
+ value = value + value2;
+ break;
+ case '*':
+ value = value * value2;
+ break;
+ case '/':
+ if (value2)
+ value = value / value2;
+ break;
+ case '%':
+ if (value2)
+ value = value % value2;
+ break;
+ case '<':
+ value = (value < value2);
+ break;
+ case '>':
+ value = (value > value2);
+ break;
+ case '>' + 16:
+ value = (value >= value2);
+ break;
+ case '<' + 16:
+ value = (value <= value2);
+ break;
+ case '=':
+ case '=' + 16:
+ value = (value == value2);
+ break;
+ case '&':
+ value = (value && value2);
+ break;
+ case ':':
+ value = (value || value2);
+ break;
+ default:
+ fprintf(stderr, "man2html: unknown operator %c.\n", oper);
+ }
+ oper = 0;
+ }
+ }
+ if (*c == ')')
+ c++;
+ }
+ *result = value;
+ return c;
+}
+
+static void
+trans_char(char *c, char s, char t)
+{
+ char *sl = c;
+ int slash = 0;
+
+ while (*sl != '\n' || slash) {
+ if (!slash) {
+ if (*sl == escapesym)
+ slash = 1;
+ else if (*sl == s)
+ *sl = t;
+ } else
+ slash = 0;
+ sl++;
+ }
+}
+
+/* Remove \a from C in place. Return modified C. */
+static char *
+unescape (char *c)
+{
+ int i, l;
+
+ l = strlen (c);
+ i = 0;
+ while (i < l && c[i]) {
+ if (c[i] == '\a') {
+ if (c[i+1])
+ strcpy(c + i, c + i + 1); /* should be memmove */
+ else {
+ c[i] = '\0';
+ break;
+ }
+ }
+ i++;
+ }
+ return c;
+}
+
+static char *
+fill_words(char *c, char *words[], int *n)
+{
+ char *sl = c;
+ int slash = 0;
+ int skipspace = 0;
+
+ *n = 0;
+ words[*n] = sl;
+ while (*sl && (*sl != '\n' || slash)) {
+ if (!slash) {
+ if (*sl == '"') {
+ *sl = '\a';
+ skipspace = !skipspace;
+ } else if (*sl == '\a') {
+ /* handle already-translated " */
+ skipspace = !skipspace;
+ } else if (*sl == escapesym)
+ slash = 1;
+ else if ((*sl == ' ' || *sl == '\t') && !skipspace) {
+ *sl = '\n';
+ if (words[*n] != sl)
+ (*n)++;
+ words[*n] = sl + 1;
+ }
+ } else {
+ if (*sl == '"') {
+ sl--;
+ *sl = '\n';
+ if (words[*n] != sl)
+ (*n)++;
+ sl++;
+ while (*sl && *sl != '\n')
+ sl++;
+ words[*n] = sl;
+ sl--;
+ }
+ slash = 0;
+ }
+ sl++;
+ }
+ if (sl != words[*n])
+ (*n)++;
+ return sl;
+}
+
+static char *abbrev_list[] = {
+ "GSBG", "Getting Started ",
+ "SUBG", "Customizing SunOS",
+ "SHBG", "Basic Troubleshooting",
+ "SVBG", "SunView User's Guide",
+ "MMBG", "Mail and Messages",
+ "DMBG", "Doing More with SunOS",
+ "UNBG", "Using the Network",
+ "GDBG", "Games, Demos &amp; Other Pursuits",
+ "CHANGE", "SunOS 4.1 Release Manual",
+ "INSTALL", "Installing SunOS 4.1",
+ "ADMIN", "System and Network Administration",
+ "SECUR", "Security Features Guide",
+ "PROM", "PROM User's Manual",
+ "DIAG", "Sun System Diagnostics",
+ "SUNDIAG", "Sundiag User's Guide",
+ "MANPAGES", "SunOS Reference Manual",
+ "REFMAN", "SunOS Reference Manual",
+ "SSI", "Sun System Introduction",
+ "SSO", "System Services Overview",
+ "TEXT", "Editing Text Files",
+ "DOCS", "Formatting Documents",
+ "TROFF", "Using <B>nroff</B> and <B>troff</B>",
+ "INDEX", "Global Index",
+ "CPG", "C Programmer's Guide",
+ "CREF", "C Reference Manual",
+ "ASSY", "Assembly Language Reference",
+ "PUL", "Programming Utilities and Libraries",
+ "DEBUG", "Debugging Tools",
+ "NETP", "Network Programming",
+ "DRIVER", "Writing Device Drivers",
+ "STREAMS", "STREAMS Programming",
+ "SBDK", "SBus Developer's Kit",
+ "WDDS", "Writing Device Drivers for the SBus",
+ "FPOINT", "Floating-Point Programmer's Guide",
+ "SVPG", "SunView 1 Programmer's Guide",
+ "SVSPG", "SunView 1 System Programmer's Guide",
+ "PIXRCT", "Pixrect Reference Manual",
+ "CGI", "SunCGI Reference Manual",
+ "CORE", "SunCore Reference Manual",
+ "4ASSY", "Sun-4 Assembly Language Reference",
+ "SARCH", "<FONT SIZE=-1>SPARC</FONT> Architecture Manual",
+ "KR", "The C Programming Language",
+NULL, NULL};
+
+static char *
+lookup_abbrev(char *c)
+{
+ int i = 0;
+
+ if (!c)
+ return "";
+ while (abbrev_list[i] && strcmp(c, abbrev_list[i]))
+ i = i + 2;
+ if (abbrev_list[i])
+ return abbrev_list[i + 1];
+ else
+ return c;
+}
+
+static char manidx[NULL_TERMINATED(HUGE_STR_MAX)];
+static int subs = 0;
+static int mip = 0;
+static char label[5] = "lbAA";
+
+static void
+add_to_index(int level, char *item)
+{
+ char *c = NULL;
+
+ label[3]++;
+ if (label[3] > 'Z') {
+ label[3] = 'A';
+ label[2]++;
+ }
+ if (level != subs) {
+ if (subs) {
+ strmaxcpy(manidx + mip, "</DL>\n", HUGE_STR_MAX - mip);
+ mip += 6;
+ } else {
+ strmaxcpy(manidx + mip, "<DL>\n", HUGE_STR_MAX - mip);
+ mip += 5;
+ }
+ }
+ subs = level;
+ scan_troff(item, 1, &c);
+ sprintf(manidx + mip, "<DT><A HREF=\"#%s\">%s</A><DD>\n", label, c);
+ if (c)
+ free(c);
+ while (manidx[mip])
+ mip++;
+}
+
+static char *
+skip_till_newline(char *c)
+{
+ int lvl = 0;
+
+ while (*c && *c != '\n' || lvl > 0) {
+ if (*c == '\\') {
+ c++;
+ if (*c == '}')
+ lvl--;
+ else if (*c == '{')
+ lvl++;
+ }
+ c++;
+ }
+ c++;
+ if (lvl < 0 && newline_for_fun) {
+ newline_for_fun = newline_for_fun + lvl;
+ if (newline_for_fun < 0)
+ newline_for_fun = 0;
+ }
+ return c;
+}
+
+static void
+outputPageHeader(char *l, char *c, char *r)
+{
+ out_html("<TABLE WIDTH=100%>\n<TR>\n");
+ out_html("<TH ALIGN=LEFT width=33%>");
+ out_html(l);
+ out_html("<TH ALIGN=CENTER width=33%>");
+ out_html(c);
+ out_html("<TH ALIGN=RIGHT width=33%>");
+ out_html(r);
+ out_html("\n</TR>\n</TABLE>\n");
+}
+
+static void
+outputPageFooter(char *l, char *c, char *r)
+{
+ out_html("<HR>\n");
+ outputPageHeader(l, c, r);
+}
+
+static int ifelseval = 0;
+
+static char *
+scan_request(char *c)
+{
+ /* BSD Mandoc stuff */
+ static int mandoc_synopsis = 0; /* True if we are in the synopsis
+ * section */
+ static int mandoc_command = 0; /* True if this is mandoc page */
+ static int mandoc_bd_options; /* Only copes with non-nested Bd's */
+
+ int i, j, mode = 0;
+ char *h;
+ char *wordlist[MAX_WORDLIST];
+ int words;
+ char *sl;
+ STRDEF *owndef;
+
+ while (*c == ' ' || *c == '\t')
+ c++;
+ if (c[0] == '\n')
+ return c + 1;
+ if (c[1] == '\n')
+ j = 1;
+ else
+ j = 2;
+ while (c[j] == ' ' || c[j] == '\t')
+ j++;
+ if (c[0] == escapesym) {
+ /* some pages use .\" .\$1 .\} */
+ /* .\$1 is too difficult/stupid */
+ if (c[1] == '$')
+ c = skip_till_newline(c);
+ else
+ c = scan_escape(c + 1);
+ } else {
+ i = V(c[0], c[1]);
+ switch (i) {
+ case V('a', 'b'):
+ h = c + j;
+ while (*h && *h != '\n')
+ h++;
+ *h = '\0';
+ if (scaninbuff && buffpos) {
+ buffer[buffpos] = '\0';
+ puts(buffer);
+ }
+ /* fprintf(stderr, "%s\n", c+2); */
+ exit(0);
+ break;
+ case V('d', 'i'):
+ {
+ STRDEF *de;
+ int oldcurpos = curpos;
+
+ c = c + j;
+ i = V(c[0], c[1]);
+ if (*c == '\n') {
+ c++;
+ break;
+ }
+ while (*c && *c != '\n')
+ c++;
+ c++;
+ h = c;
+ while (*c && strncmp(c, ".di", 3))
+ while (*c && *c++ != '\n');
+ *c = '\0';
+ de = strdef;
+ while (de && de->nr != i)
+ de = de->next;
+ if (!de) {
+ de = (STRDEF *) malloc(sizeof(STRDEF));
+ de->nr = i;
+ de->slen = 0;
+ de->next = strdef;
+ de->st = NULL;
+ strdef = de;
+ } else {
+ if (de->st)
+ free(de->st);
+ de->slen = 0;
+ de->st = NULL;
+ }
+ scan_troff(h, 0, &de->st);
+ *c = '.';
+ while (*c && *c++ != '\n');
+ break;
+ }
+ case V('d', 's'):
+ mode = 1;
+ case V('a', 's'):
+ {
+ STRDEF *de;
+ int oldcurpos = curpos;
+
+ c = c + j;
+ i = V(c[0], c[1]);
+ j = 0;
+ while (c[j] && c[j] != '\n')
+ j++;
+ if (j < 3) {
+ c = c + j;
+ break;
+ }
+ if (c[1] == ' ')
+ c = c + 1;
+ else
+ c = c + 2;
+ while (isspace(*c))
+ c++;
+ if (*c == '"')
+ c++;
+ de = strdef;
+ while (de && de->nr != i)
+ de = de->next;
+ single_escape = 1;
+ curpos = 0;
+ if (!de) {
+ char *h;
+
+ de = (STRDEF *) malloc(sizeof(STRDEF));
+ de->nr = i;
+ de->slen = 0;
+ de->next = strdef;
+ de->st = NULL;
+ strdef = de;
+ h = NULL;
+ c = scan_troff(c, 1, &h);
+ de->st = h;
+ de->slen = curpos;
+ } else {
+ if (mode) {
+ char *h = NULL;
+
+ c = scan_troff(c, 1, &h);
+ free(de->st);
+ de->slen = 0;
+ de->st = h;
+ } else
+ c = scan_troff(c, 1, &de->st);
+ de->slen += curpos;
+ }
+ single_escape = 0;
+ curpos = oldcurpos;
+ }
+ break;
+ case V('b', 'r'):
+ if (still_dd)
+ out_html("<DD>");
+ else
+ out_html("<BR>\n");
+ curpos = 0;
+ c = c + j;
+ if (c[0] == escapesym) {
+ c = scan_escape(c + 1);
+ }
+ c = skip_till_newline(c);
+ break;
+ case V('c', '2'):
+ c = c + j;
+ if (*c != '\n') {
+ nobreaksym = *c;
+ } else
+ nobreaksym = '\'';
+ c = skip_till_newline(c);
+ break;
+ case V('c', 'c'):
+ c = c + j;
+ if (*c != '\n') {
+ controlsym = *c;
+ } else
+ controlsym = '.';
+ c = skip_till_newline(c);
+ break;
+ case V('c', 'e'):
+ c = c + j;
+ if (*c == '\n') {
+ i = 1;
+ } else {
+ i = 0;
+ while ('0' <= *c && *c <= '9') {
+ i = i * 10 + *c - '0';
+ c++;
+ }
+ }
+ c = skip_till_newline(c);
+ /* center next i lines */
+ if (i > 0) {
+ out_html("<CENTER>\n");
+ while (i && *c) {
+ char *line = NULL;
+
+ c = scan_troff(c, 1, &line);
+ if (line && strncmp(line, "<BR>", 4)) {
+ out_html(line);
+ out_html("<BR>\n");
+ i--;
+ }
+ }
+ out_html("</CENTER>\n");
+ curpos = 0;
+ }
+ break;
+ case V('e', 'c'):
+ c = c + j;
+ if (*c != '\n') {
+ escapesym = *c;
+ } else
+ escapesym = '\\';
+ break;
+ c = skip_till_newline(c);
+ case V('e', 'o'):
+ escapesym = '\0';
+ c = skip_till_newline(c);
+ break;
+ case V('e', 'x'):
+ exit(0);
+ break;
+ case V('f', 'c'):
+ c = c + j;
+ if (*c == '\n') {
+ fieldsym = padsym = '\0';
+ } else {
+ fieldsym = c[0];
+ padsym = c[1];
+ }
+ c = skip_till_newline(c);
+ break;
+ case V('f', 'i'):
+ if (!fillout) {
+ out_html(change_to_font(0));
+ out_html(change_to_size('0'));
+ out_html("</PRE>\n");
+ }
+ curpos = 0;
+ fillout = 1;
+ c = skip_till_newline(c);
+ break;
+ case V('f', 't'):
+ c = c + j;
+ if (*c == '\n') {
+ out_html(change_to_font(0));
+ } else {
+ if (*c == escapesym) {
+ int fn;
+
+ c = scan_expression(c, &fn);
+ c--;
+ out_html(change_to_font(fn));
+ } else {
+ out_html(change_to_font(*c));
+ c++;
+ }
+ }
+ c = skip_till_newline(c);
+ break;
+ case V('e', 'l'):
+ /* .el anything : else part of if else */
+ if (ifelseval) {
+ c = c + j;
+ c[-1] = '\n';
+ c = scan_troff(c, 1, NULL);
+ } else
+ c = skip_till_newline(c + j);
+ break;
+ case V('i', 'e'):
+ /* .ie c anything : then part of if else */
+ case V('i', 'f'):
+ /*
+ * .if c anything .if !c anything .if N anything .if
+ * !N anything .if 'string1'string2' anything .if
+ * !'string1'string2' anything
+ */
+ c = c + j;
+ c = scan_expression(c, &i);
+ ifelseval = !i;
+ if (i) {
+ *c = '\n';
+ c++;
+ c = scan_troff(c, 1, NULL);
+ } else
+ c = skip_till_newline(c);
+ break;
+ case V('i', 'g'):
+ {
+ char *endwith = "..\n";
+
+ i = 3;
+ c = c + j;
+ if (*c != '\n') {
+ endwith = c - 1;
+ i = 1;
+ c[-1] = '.';
+ while (*c && *c != '\n')
+ c++, i++;
+ }
+ c++;
+ while (*c && strncmp(c, endwith, i))
+ while (*c++ != '\n');
+ while (*c++ != '\n');
+ break;
+ }
+ case V('n', 'f'):
+ if (fillout) {
+ out_html(change_to_font(0));
+ out_html(change_to_size('0'));
+ out_html("<PRE>\n");
+ }
+ curpos = 0;
+ fillout = 0;
+ c = skip_till_newline(c);
+ break;
+ case V('p', 's'):
+ c = c + j;
+ if (*c == '\n') {
+ out_html(change_to_size('0'));
+ } else {
+ j = 0;
+ i = 0;
+ if (*c == '-') {
+ j = -1;
+ c++;
+ } else if (*c == '+') {
+ j = 1;
+ c++;
+ }
+ c = scan_expression(c, &i);
+ if (!j) {
+ j = 1;
+ if (i > 5)
+ i = i - 10;
+ }
+ out_html(change_to_size(i * j));
+ }
+ c = skip_till_newline(c);
+ break;
+ case V('s', 'p'):
+ c = c + j;
+ if (fillout)
+ out_html("<P>");
+ else {
+ out_html(NEWLINE);
+ NEWLINE[0] = '\n';
+ }
+ curpos = 0;
+ c = skip_till_newline(c);
+ break;
+ case V('s', 'o'):
+ {
+ FILE *f;
+ struct stat stbuf;
+ int l = 0;
+ char *buf;
+ char *name = NULL;
+
+ curpos = 0;
+ c = c + j;
+ if (*c == '/') {
+ h = c;
+ } else {
+ h = c - 3;
+ h[0] = '.';
+ h[1] = '.';
+ h[2] = '/';
+ }
+ while (*c != '\n')
+ c++;
+ *c = '\0';
+ scan_troff(h, 1, &name);
+ if (name[3] == '/')
+ h = name + 3;
+ else
+ h = name;
+ if (stat(h, &stbuf) != -1)
+ l = stbuf.st_size;
+ buf = stralloc(l + 4);
+#if NOCGI
+ if (!out_length) {
+ char *t, *s;
+
+ t = strrchr(fname, '/');
+ if (!t)
+ t = fname;
+ fprintf(stderr, "ln -s %s.html %s.html\n", h, t);
+ s = strrchr(t, '.');
+ if (!s)
+ s = t;
+ printf("<HTML><HEAD><TITLE> Manpage of %s</TITLE>\n"
+ "</HEAD><BODY>\n"
+ "See the manpage for <A HREF=\"%s.html\">%s</A>.\n"
+ "</BODY></HTML>\n",
+ s, h, h);
+ } else
+#endif
+ {
+ /*
+ * this works alright, except for
+ * section 3
+ */
+ buf = read_man_page(h);
+ if (!buf) {
+
+ fprintf(stderr, "man2html: unable to open or read file %s.\n",
+ h);
+ out_html("<BLOCKQUOTE>"
+ "man2html: unable to open or read file.\n");
+ out_html(h);
+ out_html("</BLOCKQUOTE>\n");
+ } else {
+ buf[0] = buf[l] = '\n';
+ buf[l + 1] = buf[l + 2] = '\0';
+ scan_troff(buf + 1, 0, NULL);
+ }
+ if (buf)
+ free(buf);
+ }
+ *c++ = '\n';
+ break;
+ }
+ case V('t', 'a'):
+ c = c + j;
+ j = 0;
+ while (*c != '\n') {
+ sl = scan_expression(c, &tabstops[j]);
+ if (*c == '-' || *c == '+')
+ tabstops[j] += tabstops[j - 1];
+ c = sl;
+ while (*c == ' ' || *c == '\t')
+ c++;
+ j++;
+ }
+ maxtstop = j;
+ curpos = 0;
+ break;
+ case V('t', 'i'):
+ /*
+ * while (itemdepth || dl_set[itemdepth]) {
+ * out_html("</DL>\n"); if (dl_set[itemdepth])
+ * dl_set[itemdepth]=0; else itemdepth--; }
+ */
+ out_html("<BR>\n");
+ c = c + j;
+ c = scan_expression(c, &j);
+ for (i = 0; i < j; i++)
+ out_html("&nbsp;");
+ curpos = j;
+ c = skip_till_newline(c);
+ break;
+ case V('t', 'm'):
+ c = c + j;
+ h = c;
+ while (*c != '\n')
+ c++;
+ *c = '\0';
+ /* fprintf(stderr,"%s\n", h); */
+ *c = '\n';
+ break;
+ case V('B', ' '):
+ case V('B', '\n'):
+ case V('I', ' '):
+ case V('I', '\n'):
+ /* parse one line in a certain font */
+ out_html(change_to_font(*c));
+ trans_char(c, '"', '\a');
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ c = scan_troff(c, 1, NULL);
+ out_html(change_to_font('R'));
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('O', 'P'): /* groff manpages use this
+ * construction */
+ /* .OP a b : [ <B>a</B> <I>b</I> ] */
+ mode = 1;
+ c[0] = 'B';
+ c[1] = 'I';
+ out_html(change_to_font('R'));
+ out_html("[");
+ curpos++;
+ case V('B', 'R'):
+ case V('B', 'I'):
+ case V('I', 'B'):
+ case V('I', 'R'):
+ case V('R', 'B'):
+ case V('R', 'I'):
+ {
+ char font[2];
+
+ font[0] = c[0];
+ font[1] = c[1];
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ sl = fill_words(c, wordlist, &words);
+ c = sl + 1;
+ /*
+ * .BR name (section) indicates a link. It
+ * will be added in the output routine.
+ */
+ for (i = 0; i < words; i++) {
+ if (mode) {
+ out_html(" ");
+ curpos++;
+ }
+ wordlist[i][-1] = ' ';
+ out_html(change_to_font(font[i & 1]));
+ scan_troff(wordlist[i], 1, NULL);
+ }
+ out_html(change_to_font('R'));
+ if (mode) {
+ out_html(" ]");
+ curpos++;
+ }
+ out_html(NEWLINE);
+ if (!fillout)
+ curpos = 0;
+ else
+ curpos++;
+ }
+ break;
+ case V('D', 'T'):
+ for (j = 0; j < 20; j++)
+ tabstops[j] = (j + 1) * 8;
+ maxtstop = 20;
+ c = skip_till_newline(c);
+ break;
+ case V('I', 'P'):
+ sl = fill_words(c + j, wordlist, &words);
+ c = sl + 1;
+ if (!dl_set[itemdepth]) {
+ out_html("<DL COMPACT>\n");
+ dl_set[itemdepth] = 1;
+ }
+ out_html("<DT>");
+ if (words) {
+ scan_troff(wordlist[0], 1, NULL);
+ }
+ out_html("<DD>");
+ curpos = 0;
+ break;
+ case V('T', 'P'):
+ if (!dl_set[itemdepth]) {
+ out_html("<DL COMPACT>\n");
+ dl_set[itemdepth] = 1;
+ }
+ out_html("<DT>");
+ c = skip_till_newline(c);
+ /* somewhere a definition ends with '.TP' */
+ if (!*c)
+ still_dd = 1;
+ else {
+ c = scan_troff(c, 1, NULL);
+ out_html("<DD>");
+ }
+ curpos = 0;
+ break;
+ case V('I', 'X'):
+ /* general index */
+ sl = fill_words(c + j, wordlist, &words);
+ c = sl + 1;
+ j = 4;
+ while (idxlabel[j] == 'Z')
+ idxlabel[j--] = 'A';
+ idxlabel[j]++;
+#ifdef MAKEINDEX
+ fprintf(idxfile, "%s@%s@", fname, idxlabel);
+ for (j = 0; j < words; j++) {
+ h = NULL;
+ scan_troff(wordlist[j], 1, &h);
+ fprintf(idxfile, "_\b@%s", h);
+ free(h);
+ }
+ fprintf(idxfile, "\n");
+#endif
+ out_html("<A NAME=\"");
+ out_html(idxlabel);
+ /*
+ * this will not work in mosaic (due to a bug).
+ * Adding '&nbsp;' between '>' and '<' solves it, but
+ * creates some space. A normal space does not work.
+ */
+ out_html("\"></A>");
+ break;
+ case V('L', 'P'):
+ case V('P', 'P'):
+ if (dl_set[itemdepth]) {
+ out_html("</DL>\n");
+ dl_set[itemdepth] = 0;
+ }
+ if (fillout)
+ out_html("<P>\n");
+ else {
+ out_html(NEWLINE);
+ NEWLINE[0] = '\n';
+ }
+ curpos = 0;
+ c = skip_till_newline(c);
+ break;
+ case V('H', 'P'):
+ if (!dl_set[itemdepth]) {
+ out_html("<DL COMPACT>");
+ dl_set[itemdepth] = 1;
+ }
+ out_html("<DT>\n");
+ still_dd = 1;
+ c = skip_till_newline(c);
+ curpos = 0;
+ break;
+ case V('P', 'D'):
+ c = skip_till_newline(c);
+ break;
+ case V('R', 's'): /* BSD mandoc */
+ case V('R', 'S'):
+ sl = fill_words(c + j, wordlist, &words);
+ j = 1;
+ if (words > 0)
+ scan_expression(wordlist[0], &j);
+ if (j >= 0) {
+ itemdepth++;
+ dl_set[itemdepth] = 0;
+ out_html("<DL COMPACT><DT><DD>");
+ c = skip_till_newline(c);
+ curpos = 0;
+ break;
+ }
+ case V('R', 'e'): /* BSD mandoc */
+ case V('R', 'E'):
+ if (itemdepth > 0) {
+ if (dl_set[itemdepth])
+ out_html("</DL>");
+ out_html("</DL>\n");
+ itemdepth--;
+ }
+ c = skip_till_newline(c);
+ curpos = 0;
+ break;
+ case V('S', 'B'):
+ out_html(change_to_size(-1));
+ out_html(change_to_font('B'));
+ c = scan_troff(c + j, 1, NULL);
+ out_html(change_to_font('R'));
+ out_html(change_to_size('0'));
+ break;
+ case V('S', 'M'):
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ out_html(change_to_size(-1));
+ trans_char(c, '"', '\a');
+ c = scan_troff(c, 1, NULL);
+ out_html(change_to_size('0'));
+ break;
+ case V('S', 's'): /* BSD mandoc */
+ mandoc_command = 1;
+ case V('S', 'S'):
+ mode = 1;
+ case V('S', 'h'): /* BSD mandoc */
+ /* hack for fallthru from above */
+ mandoc_command = !mode || mandoc_command;
+ case V('S', 'H'):
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ while (itemdepth || dl_set[itemdepth]) {
+ out_html("</DL>\n");
+ if (dl_set[itemdepth])
+ dl_set[itemdepth] = 0;
+ else if (itemdepth > 0)
+ itemdepth--;
+ }
+ out_html(change_to_font(0));
+ out_html(change_to_size(0));
+ if (!fillout) {
+ fillout = 1;
+ out_html("</PRE>");
+ }
+ trans_char(c, '"', '\a');
+ add_to_index(mode, c);
+ out_html("<A NAME=\"");
+ out_html(label);
+ /* &nbsp; for mosaic users */
+ if (mode)
+ out_html("\">&nbsp;</A>\n<H4>");
+ else
+ out_html("\">&nbsp;</A>\n<H3>");
+ mandoc_synopsis = strncmp(c, "SYNOPSIS", 8) == 0;
+ c = mandoc_command ? scan_troff_mandoc(c, 1, NULL) : scan_troff(c, 1, NULL);
+ if (mode)
+ out_html("</H4>\n");
+ else
+ out_html("</H3>\n");
+ curpos = 0;
+ break;
+ case V('T', 'S'):
+ c = scan_table(c);
+ break;
+ case V('D', 't'): /* BSD mandoc */
+ mandoc_command = 1;
+ case V('T', 'H'):
+ if (!output_possible) {
+ sl = fill_words(c + j, wordlist, &words);
+ if (words > 1) {
+ char *t;
+ for (i = 1; i < words; i++)
+ wordlist[i][-1] = '\0';
+ *sl = '\0';
+ output_possible = 1;
+ sprintf(th_page_and_sec, "%s(%s)", wordlist[0], wordlist[1]);
+ if (words > 2) {
+ t = unescape(wordlist[2]);
+ strncpy(th_datestr, t, sizeof(th_datestr));
+ th_datestr[sizeof(th_datestr) - 1] = '\0';
+ } else
+ th_datestr[0] = '\0';
+ if (words > 3) {
+ t = unescape(wordlist[3]);
+ strncpy(th_version, t, sizeof(th_version));
+ th_version[sizeof(th_version) - 1] = '\0';
+ } else
+ th_version[0] = '\0';
+ out_html("<HTML><HEAD>\n<TITLE>");
+ out_html(th_page_and_sec);
+ out_html(" Manual Page");
+ out_html("</TITLE>\n</HEAD>\n<BODY>");
+
+ outputPageHeader(th_page_and_sec, th_datestr, th_page_and_sec);
+
+ out_html("<BR><A HREF=\"#index\">Index</A>\n");
+ *sl = '\n';
+ out_html("<HR>\n");
+ if (mandoc_command)
+ out_html("<BR>BSD mandoc<BR>");
+ }
+ c = sl + 1;
+ } else
+ c = skip_till_newline(c);
+ curpos = 0;
+ break;
+ case V('T', 'X'):
+ sl = fill_words(c + j, wordlist, &words);
+ *sl = '\0';
+ out_html(change_to_font('I'));
+ if (words > 1)
+ wordlist[1][-1] = '\0';
+ c = lookup_abbrev(wordlist[0]);
+ curpos += strlen(c);
+ out_html(c);
+ out_html(change_to_font('R'));
+ if (words > 1)
+ out_html(wordlist[1]);
+ *sl = '\n';
+ c = sl + 1;
+ break;
+ case V('r', 'm'):
+ /* .rm xx : Remove request, macro or string */
+ case V('r', 'n'):
+ /*
+ * .rn xx yy : Rename request, macro or string xx to
+ * yy
+ */
+ {
+ STRDEF *de;
+
+ c = c + j;
+ i = V(c[0], c[1]);
+ c = c + 2;
+ while (isspace(*c) && *c != '\n')
+ c++;
+ j = V(c[0], c[1]);
+ while (*c && *c != '\n')
+ c++;
+ c++;
+ de = strdef;
+ while (de && de->nr != j)
+ de = de->next;
+ if (de) {
+ if (de->st)
+ free(de->st);
+ de->nr = 0;
+ }
+ de = strdef;
+ while (de && de->nr != i)
+ de = de->next;
+ if (de)
+ de->nr = j;
+ break;
+ }
+ case V('n', 'x'):
+ /* .nx filename : next file. */
+ case V('i', 'n'):
+ /* .in +-N : Indent */
+ c = skip_till_newline(c);
+ break;
+ case V('n', 'r'):
+ /*
+ * .nr R +-N M: define and set number register R by
+ * +-N; auto-increment by M
+ */
+ {
+ INTDEF *intd;
+
+ c = c + j;
+ i = V(c[0], c[1]);
+ c = c + 2;
+ intd = intdef;
+ while (intd && intd->nr != i)
+ intd = intd->next;
+ if (!intd) {
+ intd = (INTDEF *) malloc(sizeof(INTDEF));
+ intd->nr = i;
+ intd->val = 0;
+ intd->incr = 0;
+ intd->next = intdef;
+ intdef = intd;
+ }
+ while (*c == ' ' || *c == '\t')
+ c++;
+ c = scan_expression(c, &intd->val);
+ if (*c != '\n') {
+ while (*c == ' ' || *c == '\t')
+ c++;
+ c = scan_expression(c, &intd->incr);
+ }
+ c = skip_till_newline(c);
+ break;
+ }
+ case V('a', 'm'):
+ /* .am xx yy : append to a macro. */
+ /* define or handle as .ig yy */
+ mode = 1;
+ case V('d', 'e'):
+ /*
+ * .de xx yy : define or redefine macro xx; end at
+ * .yy (..)
+ */
+ /* define or handle as .ig yy */
+ {
+ STRDEF *de;
+ int olen = 0;
+
+ c = c + j;
+ sl = fill_words(c, wordlist, &words);
+ i = V(c[0], c[1]);
+ j = 2;
+ if (words == 1)
+ wordlist[1] = "..";
+ else {
+ wordlist[1]--;
+ wordlist[1][0] = '.';
+ j = 3;
+ }
+ c = sl + 1;
+ sl = c;
+ while (*c && strncmp(c, wordlist[1], j))
+ c = skip_till_newline(c);
+ de = defdef;
+ while (de && de->nr != i)
+ de = de->next;
+ if (mode && de)
+ olen = strlen(de->st);
+ j = olen + c - sl;
+ h = stralloc(j * 2 + 4);
+ if (h) {
+ for (j = 0; j < olen; j++)
+ h[j] = de->st[j];
+ if (!j || h[j - 1] != '\n')
+ h[j++] = '\n';
+ while (sl != c) {
+ if (sl[0] == '\\' && sl[1] == '\\') {
+ h[j++] = '\\';
+ sl++;
+ } else
+ h[j++] = *sl;
+ sl++;
+ }
+ h[j] = '\0';
+ if (de) {
+ if (de->st)
+ free(de->st);
+ de->st = h;
+ } else {
+ de = (STRDEF *) malloc(sizeof(STRDEF));
+ de->nr = i;
+ de->next = defdef;
+ de->st = h;
+ defdef = de;
+ }
+ }
+ }
+ c = skip_till_newline(c);
+ break;
+ case V('B', 'l'): /* BSD mandoc */
+ {
+ char list_options[NULL_TERMINATED(MED_STR_MAX)];
+ char *nl = strchr(c, '\n');
+
+ c = c + j;
+ if (dl_set[itemdepth]) { /* These things can
+ * nest. */
+ itemdepth++;
+ }
+ if (nl) { /* Parse list options */
+ strlimitcpy(list_options, c, nl - c, MED_STR_MAX);
+ }
+ if (strstr(list_options, "-bullet")) { /* HTML Unnumbered List */
+ dl_set[itemdepth] = BL_BULLET_LIST;
+ out_html("<UL>\n");
+ } else if (strstr(list_options, "-enum")) { /* HTML Ordered List */
+ dl_set[itemdepth] = BL_ENUM_LIST;
+ out_html("<OL>\n");
+ } else { /* HTML Descriptive List */
+ dl_set[itemdepth] = BL_DESC_LIST;
+ out_html("<DL COMPACT>\n");
+ }
+ if (fillout)
+ out_html("<P>\n");
+ else {
+ out_html(NEWLINE);
+ NEWLINE[0] = '\n';
+ }
+ curpos = 0;
+ c = skip_till_newline(c);
+ break;
+ }
+ case V('E', 'l'): /* BSD mandoc */
+ c = c + j;
+ if (dl_set[itemdepth] & BL_DESC_LIST) {
+ out_html("</DL>\n");
+ } else if (dl_set[itemdepth] & BL_BULLET_LIST) {
+ out_html("</UL>\n");
+ } else if (dl_set[itemdepth] & BL_ENUM_LIST) {
+ out_html("</OL>\n");
+ }
+ dl_set[itemdepth] = 0;
+ if (itemdepth > 0)
+ itemdepth--;
+ if (fillout)
+ out_html("<P>\n");
+ else {
+ out_html(NEWLINE);
+ NEWLINE[0] = '\n';
+ }
+ curpos = 0;
+ c = skip_till_newline(c);
+ break;
+ case V('I', 't'): /* BSD mandoc */
+ c = c + j;
+ if (strncmp(c, "Xo", 2) == 0 && isspace(*(c + 2))) {
+ c = skip_till_newline(c);
+ }
+ if (dl_set[itemdepth] & BL_DESC_LIST) {
+ out_html("<DT>");
+ out_html(change_to_font('B'));
+ if (*c == '\n') { /* Don't allow embedded
+ * comms after a newline */
+ c++;
+ c = scan_troff(c, 1, NULL);
+ } else { /* Do allow embedded comms on
+ * the same line. */
+ c = scan_troff_mandoc(c, 1, NULL);
+ }
+ out_html(change_to_font('R'));
+ out_html(NEWLINE);
+ out_html("<DD>");
+ } else if (dl_set[itemdepth] & (BL_BULLET_LIST | BL_ENUM_LIST)) {
+ out_html("<LI>");
+ c = scan_troff_mandoc(c, 1, NULL);
+ out_html(NEWLINE);
+ }
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('B', 'k'): /* BSD mandoc */
+ case V('E', 'k'): /* BSD mandoc */
+ case V('D', 'd'): /* BSD mandoc */
+ case V('O', 's'): /* BSD mandoc */
+ trans_char(c, '"', '\a');
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ c = scan_troff_mandoc(c, 1, NULL);
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('B', 't'): /* BSD mandoc */
+ trans_char(c, '"', '\a');
+ c = c + j;
+ out_html(" is currently in beta test.");
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('B', 'x'): /* BSD mandoc */
+ trans_char(c, '"', '\a');
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ out_html("BSD ");
+ c = scan_troff_mandoc(c, 1, NULL);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('D', 'l'): /* BSD mandoc */
+ c = c + j;
+ out_html(NEWLINE);
+ out_html("<BLOCKQUOTE>");
+ out_html(change_to_font('L'));
+ if (*c == '\n')
+ c++;
+ c = scan_troff_mandoc(c, 1, NULL);
+ out_html(change_to_font('R'));
+ out_html("</BLOCKQUOTE>");
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('B', 'd'): /* BSD mandoc */
+ { /* Seems like a kind of example/literal mode */
+ char bd_options[NULL_TERMINATED(MED_STR_MAX)];
+ char *nl = strchr(c, '\n');
+
+ c = c + j;
+ if (nl) {
+ strlimitcpy(bd_options, c, nl - c, MED_STR_MAX);
+ }
+ out_html(NEWLINE);
+ mandoc_bd_options = 0; /* Remember options for
+ * terminating Bl */
+ if (strstr(bd_options, "-offset indent")) {
+ mandoc_bd_options |= BD_INDENT;
+ out_html("<BLOCKQUOTE>\n");
+ }
+ if (strstr(bd_options, "-literal")
+ || strstr(bd_options, "-unfilled")) {
+ if (fillout) {
+ mandoc_bd_options |= BD_LITERAL;
+ out_html(change_to_font(0));
+ out_html(change_to_size('0'));
+ out_html("<PRE>\n");
+ }
+ curpos = 0;
+ fillout = 0;
+ }
+ c = skip_till_newline(c);
+ break;
+ }
+ case V('E', 'd'): /* BSD mandoc */
+ if (mandoc_bd_options & BD_LITERAL) {
+ if (!fillout) {
+ out_html(change_to_font(0));
+ out_html(change_to_size('0'));
+ out_html("</PRE>\n");
+ }
+ }
+ if (mandoc_bd_options & BD_INDENT)
+ out_html("</BLOCKQUOTE>\n");
+ curpos = 0;
+ fillout = 1;
+ c = skip_till_newline(c);
+ break;
+ case V('B', 'e'): /* BSD mandoc */
+ c = c + j;
+ if (fillout)
+ out_html("<P>");
+ else {
+ out_html(NEWLINE);
+ NEWLINE[0] = '\n';
+ }
+ curpos = 0;
+ c = skip_till_newline(c);
+ break;
+ case V('X', 'r'): /* BSD mandoc */
+ {
+ /*
+ * Translate xyz 1 to xyz(1) Allow for
+ * multiple spaces. Allow the section to be
+ * missing.
+ */
+ char buff[NULL_TERMINATED(MED_STR_MAX)];
+ char *bufptr;
+
+ trans_char(c, '"', '\a');
+ bufptr = buff;
+ c = c + j;
+ if (*c == '\n')
+ c++; /* Skip spaces */
+ while (isspace(*c) && *c != '\n')
+ c++;
+ while (isalnum(*c)) { /* Copy the xyz part */
+ *bufptr = *c;
+ bufptr++;
+ if (bufptr >= buff + MED_STR_MAX)
+ break;
+ c++;
+ }
+ while (isspace(*c) && *c != '\n')
+ c++; /* Skip spaces */
+ if (isdigit(*c)) { /* Convert the number if
+ * there is one */
+ *bufptr = '(';
+ bufptr++;
+ if (bufptr < buff + MED_STR_MAX) {
+ while (isalnum(*c)) {
+ *bufptr = *c;
+ bufptr++;
+ if (bufptr >= buff + MED_STR_MAX)
+ break;
+ c++;
+ }
+ if (bufptr < buff + MED_STR_MAX) {
+ *bufptr = ')';
+ bufptr++;
+ }
+ }
+ }
+ while (*c != '\n') { /* Copy the remainder */
+ if (!isspace(*c)) {
+ *bufptr = *c;
+ bufptr++;
+ if (bufptr >= buff + MED_STR_MAX)
+ break;
+ }
+ c++;
+ }
+ *bufptr = '\n';
+ scan_troff_mandoc(buff, 1, NULL);
+
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ }
+ break;
+ case V('F', 'l'): /* BSD mandoc */
+ trans_char(c, '"', '\a');
+ c = c + j;
+ out_html("-");
+ if (*c != '\n') {
+ out_html(change_to_font('B'));
+ c = scan_troff_mandoc(c, 1, NULL);
+ out_html(change_to_font('R'));
+ }
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('P', 'a'): /* BSD mandoc */
+ case V('P', 'f'): /* BSD mandoc */
+ trans_char(c, '"', '\a');
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ c = scan_troff_mandoc(c, 1, NULL);
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('P', 'p'): /* BSD mandoc */
+ if (fillout)
+ out_html("<P>\n");
+ else {
+ out_html(NEWLINE);
+ NEWLINE[0] = '\n';
+ }
+ curpos = 0;
+ c = skip_till_newline(c);
+ break;
+ case V('D', 'q'): /* BSD mandoc */
+ trans_char(c, '"', '\a');
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ out_html("``");
+ c = scan_troff_mandoc(c, 1, NULL);
+ out_html("''");
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('O', 'p'): /* BSD mandoc */
+ trans_char(c, '"', '\a');
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ out_html(change_to_font('R'));
+ out_html("[");
+ c = scan_troff_mandoc(c, 1, NULL);
+ out_html(change_to_font('R'));
+ out_html("]");
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('O', 'o'): /* BSD mandoc */
+ trans_char(c, '"', '\a');
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ out_html(change_to_font('R'));
+ out_html("[");
+ c = scan_troff_mandoc(c, 1, NULL);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('O', 'c'): /* BSD mandoc */
+ trans_char(c, '"', '\a');
+ c = c + j;
+ c = scan_troff_mandoc(c, 1, NULL);
+ out_html(change_to_font('R'));
+ out_html("]");
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('P', 'q'): /* BSD mandoc */
+ trans_char(c, '"', '\a');
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ out_html("(");
+ c = scan_troff_mandoc(c, 1, NULL);
+ out_html(")");
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('Q', 'l'): /* BSD mandoc */
+ { /* Single quote first word in the line */
+ char *sp;
+
+ trans_char(c, '"', '\a');
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ sp = c;
+ do { /* Find first whitespace after the
+ * first word that isn't a mandoc
+ * macro */
+ while (*sp && isspace(*sp))
+ sp++;
+ while (*sp && !isspace(*sp))
+ sp++;
+ } while (*sp && isupper(*(sp - 2)) && islower(*(sp - 1)));
+
+ /*
+ * Use a newline to mark the end of text to
+ * be quoted
+ */
+ if (*sp)
+ *sp = '\n';
+ out_html("`"); /* Quote the text */
+ c = scan_troff_mandoc(c, 1, NULL);
+ out_html("'");
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ }
+ case V('S', 'q'): /* BSD mandoc */
+ trans_char(c, '"', '\a');
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ out_html("`");
+ c = scan_troff_mandoc(c, 1, NULL);
+ out_html("'");
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('A', 'r'): /* BSD mandoc */
+ /* parse one line in italics */
+ out_html(change_to_font('I'));
+ trans_char(c, '"', '\a');
+ c = c + j;
+ if (*c == '\n') { /* An empty Ar means "file
+ * ..." */
+ out_html("file ...");
+ } else {
+ c = scan_troff_mandoc(c, 1, NULL);
+ }
+ out_html(change_to_font('R'));
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('A', 'd'): /* BSD mandoc */
+ case V('E', 'm'): /* BSD mandoc */
+ case V('V', 'a'): /* BSD mandoc */
+ case V('X', 'c'): /* BSD mandoc */
+ /* parse one line in italics */
+ out_html(change_to_font('I'));
+ trans_char(c, '"', '\a');
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ c = scan_troff_mandoc(c, 1, NULL);
+ out_html(change_to_font('R'));
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('N', 'd'): /* BSD mandoc */
+ trans_char(c, '"', '\a');
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ out_html(" - ");
+ c = scan_troff_mandoc(c, 1, NULL);
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('N', 'm'): /* BSD mandoc */
+ {
+ static char mandoc_name[NULL_TERMINATED(SMALL_STR_MAX)] = "";
+
+ trans_char(c, '"', '\a');
+ c = c + j;
+ if (mandoc_synopsis) { /* Break lines only in
+ * the Synopsis. The
+ * Synopsis section
+ * seems to be treated
+ * as a special case -
+ * Bummer! */
+ static int count = 0; /* Don't break on the
+ * first Nm */
+
+ if (count) {
+ out_html("<BR>");
+ } else {
+ char *end = strchr(c, '\n');
+
+ if (end) { /* Remember the name for
+ * later. */
+ strlimitcpy(mandoc_name, c, end - c, SMALL_STR_MAX);
+ }
+ }
+ count++;
+ }
+ out_html(change_to_font('B'));
+ while (*c == ' ' || *c == '\t')
+ c++;
+ if (*c == '\n') { /* If Nm has no
+ * argument, use one
+ * from an earlier Nm
+ * command that did have
+ * one. Hope there
+ * aren't too many
+ * commands that do
+ * this. */
+ out_html(mandoc_name);
+ } else {
+ c = scan_troff_mandoc(c, 1, NULL);
+ }
+ out_html(change_to_font('R'));
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ }
+ case V('C', 'd'): /* BSD mandoc */
+ case V('C', 'm'): /* BSD mandoc */
+ case V('I', 'c'): /* BSD mandoc */
+ case V('M', 's'): /* BSD mandoc */
+ case V('O', 'r'): /* BSD mandoc */
+ case V('S', 'y'): /* BSD mandoc */
+ /* parse one line in bold */
+ out_html(change_to_font('B'));
+ trans_char(c, '"', '\a');
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ c = scan_troff_mandoc(c, 1, NULL);
+ out_html(change_to_font('R'));
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('D', 'v'): /* BSD mandoc */
+ case V('E', 'v'): /* BSD mandoc */
+ case V('F', 'r'): /* BSD mandoc */
+ case V('L', 'i'): /* BSD mandoc */
+ case V('N', 'o'): /* BSD mandoc */
+ case V('N', 's'): /* BSD mandoc */
+ case V('T', 'n'): /* BSD mandoc */
+ case V('n', 'N'): /* BSD mandoc */
+ trans_char(c, '"', '\a');
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ out_html(change_to_font('B'));
+ c = scan_troff_mandoc(c, 1, NULL);
+ out_html(change_to_font('R'));
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('%', 'A'): /* BSD mandoc biblio stuff */
+ case V('%', 'D'):
+ case V('%', 'N'):
+ case V('%', 'O'):
+ case V('%', 'P'):
+ case V('%', 'Q'):
+ case V('%', 'V'):
+ c = c + j;
+ if (*c == '\n')
+ c++;
+ c = scan_troff(c, 1, NULL); /* Don't allow embedded
+ * mandoc coms */
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ case V('%', 'B'):
+ case V('%', 'J'):
+ case V('%', 'R'):
+ case V('%', 'T'):
+ c = c + j;
+ out_html(change_to_font('I'));
+ if (*c == '\n')
+ c++;
+ c = scan_troff(c, 1, NULL); /* Don't allow embedded
+ * mandoc coms */
+ out_html(change_to_font('R'));
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ break;
+ default:
+ /* search macro database of self-defined macros */
+ owndef = defdef;
+ while (owndef && owndef->nr != i)
+ owndef = owndef->next;
+ if (owndef) {
+ char **oldargument;
+ int deflen;
+ int onff;
+
+ sl = fill_words(c + j, wordlist, &words);
+ c = sl + 1;
+ *sl = '\0';
+ for (i = 1; i < words; i++)
+ wordlist[i][-1] = '\0';
+ for (i = 0; i < words; i++) {
+ char *h = NULL;
+
+ if (mandoc_command) {
+ scan_troff_mandoc(wordlist[i], 1, &h);
+ } else {
+ scan_troff(wordlist[i], 1, &h);
+ }
+ wordlist[i] = h;
+ }
+ for (i = words; i < 20; i++)
+ wordlist[i] = NULL;
+ deflen = strlen(owndef->st);
+ for (i = 0; owndef->st[deflen + 2 + i] = owndef->st[i]; i++);
+ oldargument = argument;
+ argument = wordlist;
+ onff = newline_for_fun;
+ if (mandoc_command) {
+ scan_troff_mandoc(owndef->st + deflen + 2, 0, NULL);
+ } else {
+ scan_troff(owndef->st + deflen + 2, 0, NULL);
+ }
+ newline_for_fun = onff;
+ argument = oldargument;
+ for (i = 0; i < words; i++)
+ if (wordlist[i])
+ free(wordlist[i]);
+ *sl = '\n';
+ } else if (mandoc_command &&
+ ((isupper(*c) && islower(*(c + 1)))
+ || (islower(*c) && isupper(*(c + 1))))
+ ) { /* Let through any BSD mandoc
+ * commands that haven't been delt
+ * with. I don't want to miss
+ * anything out of the text. */
+ char buf[4];
+
+ strncpy(buf, c, 2);
+ buf[2] = ' ';
+ buf[3] = '\0';
+ out_html(buf); /* Print the command (it
+ * might just be text). */
+ c = c + j;
+ trans_char(c, '"', '\a');
+ if (*c == '\n')
+ c++;
+ out_html(change_to_font('R'));
+ c = scan_troff(c, 1, NULL);
+ out_html(NEWLINE);
+ if (fillout)
+ curpos++;
+ else
+ curpos = 0;
+ } else {
+ c = skip_till_newline(c);
+ }
+ break;
+ }
+ }
+ if (fillout) {
+ out_html(NEWLINE);
+ curpos++;
+ }
+ NEWLINE[0] = '\n';
+ return c;
+}
+
+static void
+flush(void)
+{
+}
+
+static int contained_tab = 0;
+static int mandoc_line = 0; /* Signals whether to look for embedded
+ * mandoc commands. */
+
+/* san : stop at newline */
+static char *
+scan_troff(char *c, int san, char **result)
+{
+ char *h;
+ char intbuff[NULL_TERMINATED(MED_STR_MAX)];
+ int ibp = 0;
+ int i;
+ char *exbuffer;
+ int exbuffpos, exbuffmax, exscaninbuff, exnewline_for_fun;
+ int usenbsp = 0;
+
+#define FLUSHIBP if (ibp) { intbuff[ibp]=0; out_html(intbuff); ibp=0; }
+
+ exbuffer = buffer;
+ exbuffpos = buffpos;
+ exbuffmax = buffmax;
+ exnewline_for_fun = newline_for_fun;
+ exscaninbuff = scaninbuff;
+ newline_for_fun = 0;
+ if (result) {
+ if (*result) {
+ buffer = *result;
+ buffpos = strlen(buffer);
+ buffmax = buffpos;
+ } else {
+ buffer = stralloc(LARGE_STR_MAX);
+ buffpos = 0;
+ buffmax = LARGE_STR_MAX;
+ }
+ scaninbuff = 1;
+ }
+ h = c;
+ /* start scanning */
+
+ while (*h && (!san || newline_for_fun || *h != '\n')) {
+
+ if (*h == escapesym) {
+ h++;
+ FLUSHIBP;
+ h = scan_escape(h);
+ } else if (*h == controlsym && h[-1] == '\n') {
+ h++;
+ FLUSHIBP;
+ h = scan_request(h);
+ if (san && h[-1] == '\n')
+ h--;
+ } else if (mandoc_line
+ && *(h) && isupper(*(h))
+ && *(h + 1) && islower(*(h + 1))
+ && *(h + 2) && isspace(*(h + 2))) {
+ /*
+ * BSD imbedded command eg ".It Fl Ar arg1 Fl Ar
+ * arg2"
+ */
+ FLUSHIBP;
+ h = scan_request(h);
+ if (san && h[-1] == '\n')
+ h--;
+ } else if (*h == nobreaksym && h[-1] == '\n') {
+ h++;
+ FLUSHIBP;
+ h = scan_request(h);
+ if (san && h[-1] == '\n')
+ h--;
+ } else {
+ int mx;
+
+ if (h[-1] == '\n' && still_dd && isalnum(*h)) {
+ /*
+ * sometimes a .HP request is not followed by
+ * a .br request
+ */
+ FLUSHIBP;
+ out_html("<DD>");
+ curpos = 0;
+ still_dd = 0;
+ }
+ switch (*h) {
+ case '&':
+ intbuff[ibp++] = '&';
+ intbuff[ibp++] = 'a';
+ intbuff[ibp++] = 'm';
+ intbuff[ibp++] = 'p';
+ intbuff[ibp++] = ';';
+ curpos++;
+ break;
+ case '<':
+ intbuff[ibp++] = '&';
+ intbuff[ibp++] = 'l';
+ intbuff[ibp++] = 't';
+ intbuff[ibp++] = ';';
+ curpos++;
+ break;
+ case '>':
+ intbuff[ibp++] = '&';
+ intbuff[ibp++] = 'g';
+ intbuff[ibp++] = 't';
+ intbuff[ibp++] = ';';
+ curpos++;
+ break;
+ case '"':
+ intbuff[ibp++] = '&';
+ intbuff[ibp++] = 'q';
+ intbuff[ibp++] = 'u';
+ intbuff[ibp++] = 'o';
+ intbuff[ibp++] = 't';
+ intbuff[ibp++] = ';';
+ curpos++;
+ break;
+ case '\n':
+ if (h[-1] == '\n' && fillout) {
+ intbuff[ibp++] = '<';
+ intbuff[ibp++] = 'P';
+ intbuff[ibp++] = '>';
+ }
+ if (contained_tab && fillout) {
+ intbuff[ibp++] = '<';
+ intbuff[ibp++] = 'B';
+ intbuff[ibp++] = 'R';
+ intbuff[ibp++] = '>';
+ }
+ contained_tab = 0;
+ curpos = 0;
+ usenbsp = 0;
+ intbuff[ibp++] = '\n';
+ break;
+ case '\t':
+ {
+ int curtab = 0;
+
+ contained_tab = 1;
+ FLUSHIBP;
+ /* like a typewriter, not like TeX */
+ tabstops[19] = curpos + 1;
+ while (curtab < maxtstop && tabstops[curtab] <= curpos)
+ curtab++;
+ if (curtab < maxtstop) {
+ if (!fillout) {
+ while (curpos < tabstops[curtab]) {
+ intbuff[ibp++] = ' ';
+ if (ibp > 480) {
+ FLUSHIBP;
+ }
+ curpos++;
+ }
+ } else {
+ out_html("<TT>");
+ while (curpos < tabstops[curtab]) {
+ out_html("&nbsp;");
+ curpos++;
+ }
+ out_html("</TT>");
+ }
+ }
+ }
+ break;
+ default:
+ if (*h == ' ' && (h[-1] == '\n' || usenbsp)) {
+ FLUSHIBP;
+ if (!usenbsp && fillout) {
+ out_html("<BR>");
+ curpos = 0;
+ }
+ usenbsp = fillout;
+ if (usenbsp)
+ out_html("&nbsp;");
+ else
+ intbuff[ibp++] = ' ';
+ } else if (*h > 31 && *h < 127)
+ intbuff[ibp++] = *h;
+ else if (((unsigned char) (*h)) > 127) {
+ intbuff[ibp++] = '&';
+ intbuff[ibp++] = '#';
+ intbuff[ibp++] = '0' + ((unsigned char) (*h)) / 100;
+ intbuff[ibp++] = '0' + (((unsigned char) (*h)) % 100) / 10;
+ intbuff[ibp++] = '0' + ((unsigned char) (*h)) % 10;
+ intbuff[ibp++] = ';';
+ }
+ curpos++;
+ break;
+ }
+ if (ibp > (MED_STR_MAX - 20))
+ FLUSHIBP;
+ h++;
+ }
+ }
+ FLUSHIBP;
+ if (buffer)
+ buffer[buffpos] = '\0';
+ if (san && *h)
+ h++;
+ newline_for_fun = exnewline_for_fun;
+ if (result) {
+ *result = buffer;
+ buffer = exbuffer;
+ buffpos = exbuffpos;
+ buffmax = exbuffmax;
+ scaninbuff = exscaninbuff;
+ }
+ return h;
+}
+
+
+static char *
+scan_troff_mandoc(char *c, int san, char **result)
+{
+ char *ret, *end = c;
+ int oldval = mandoc_line;
+
+ mandoc_line = 1;
+ while (*end && *end != '\n') {
+ end++;
+ }
+
+ if (end > c + 2
+ && ispunct(*(end - 1))
+ && isspace(*(end - 2)) && *(end - 2) != '\n') {
+ /*
+ * Don't format lonely punctuation E.g. in "xyz ," format the
+ * xyz and then append the comma removing the space.
+ */
+ *(end - 2) = '\n';
+ ret = scan_troff(c, san, result);
+ *(end - 2) = *(end - 1);
+ *(end - 1) = ' ';
+ } else {
+ ret = scan_troff(c, san, result);
+ }
+ mandoc_line = oldval;
+ return ret;
+}
+
+main(int argc, char **argv)
+{
+ FILE *f;
+ char *t;
+ int l, i;
+ char *buf;
+ char *h, *fullname;
+ STRDEF *stdf;
+
+ t = NULL;
+ while ((i = getopt(argc, argv, "")) != EOF) {
+ switch (i) {
+ default:
+ usage();
+ exit(EXIT_USAGE);
+ }
+ }
+
+ if (argc != 2) {
+ usage();
+ exit(EXIT_USAGE);
+ }
+ manpage = h = t = argv[1];
+ i = 0;
+
+ buf = read_man_page(h);
+ if (!buf) {
+ fprintf(stderr, "man2html: cannot read %s: %s\n", h, strerror(errno));
+ exit(1);
+ }
+#ifdef MAKEINDEX
+ idxfile = fopen(INDEXFILE, "a");
+#endif
+ stdf = &standardchar[0];
+ i = 0;
+ while (stdf->nr) {
+ stdf->next = &standardchar[i];
+ stdf = stdf->next;
+ i++;
+ }
+ chardef = &standardchar[0];
+
+ stdf = &standardstring[0];
+ i = 0;
+ while (stdf->nr) {
+ stdf->next = &standardstring[i];
+ stdf = stdf->next;
+ i++;
+ }
+ strdef = &standardstring[0];
+
+ intdef = &standardint[0];
+ i = 0;
+ while (intdef->nr) {
+ intdef->next = &standardint[i];
+ intdef = intdef->next;
+ i++;
+ }
+ intdef = &standardint[0];
+
+ defdef = NULL;
+
+ scan_troff(buf + 1, 0, NULL);
+
+ while (itemdepth || dl_set[itemdepth]) {
+ out_html("</DL>\n");
+ if (dl_set[itemdepth])
+ dl_set[itemdepth] = 0;
+ else if (itemdepth > 0)
+ itemdepth--;
+ }
+
+ out_html(change_to_font(0));
+ out_html(change_to_size(0));
+ if (!fillout) {
+ fillout = 1;
+ out_html("</PRE>");
+ }
+ out_html(NEWLINE);
+
+ if (output_possible) {
+ outputPageFooter(th_version, th_datestr, th_page_and_sec);
+ /* &nbsp; for mosaic users */
+ fputs("<HR>\n<A NAME=\"index\">&nbsp;</A><H2>Index</H2>\n<DL>\n", stdout);
+ manidx[mip] = 0;
+ fputs(manidx, stdout);
+ if (subs)
+ fputs("</DL>\n", stdout);
+ fputs("</DL>\n", stdout);
+ print_sig();
+ fputs("</BODY>\n</HTML>\n", stdout);
+ } else
+ fprintf(stderr, "man2html: no output produced\n");
+#ifdef MAKEINDEX
+ if (idxfile)
+ fclose(idxfile);
+#endif
+ exit(EXIT_SUCCESS);
+}
diff --git a/support/missing b/support/missing
new file mode 100755
index 0000000..31977a1
--- /dev/null
+++ b/support/missing
@@ -0,0 +1,187 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
+# Franc,ois Pinard <pinard@iro.umontreal.ca>, 1996.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+if test $# -eq 0; then
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+fi
+
+case "$1" in
+
+ -h|--h|--he|--hel|--help)
+ echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+ -h, --help display this help and exit
+ -v, --version output version information and exit
+
+Supported PROGRAM values:
+ aclocal touch file \`aclocal.m4'
+ autoconf touch file \`configure'
+ autoheader touch file \`config.h.in'
+ automake touch all \`Makefile.in' files
+ bison create \`y.tab.[ch]', if possible, from existing .[ch]
+ flex create \`lex.yy.c', if possible, from existing .c
+ lex create \`lex.yy.c', if possible, from existing .c
+ makeinfo touch the output file
+ yacc create \`y.tab.[ch]', if possible, from existing .[ch]"
+ ;;
+
+ -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+ echo "missing - GNU libit 0.0"
+ ;;
+
+ -*)
+ echo 1>&2 "$0: Unknown \`$1' option"
+ echo 1>&2 "Try \`$0 --help' for more information"
+ exit 1
+ ;;
+
+ aclocal)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acinclude.m4' or \`configure.in'. You might want
+ to install the \`Automake' and \`Perl' packages. Grab them from
+ any GNU archive site."
+ touch aclocal.m4
+ ;;
+
+ autoconf)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`configure.in'. You might want to install the
+ \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
+ archive site."
+ touch configure
+ ;;
+
+ autoheader)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`acconfig.h' or \`configure.in'. You might want
+ to install the \`Autoconf' and \`GNU m4' packages. Grab them
+ from any GNU archive site."
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER([^):]*:\([^)]*\)).*/\1/p' configure.in`
+ if test -z "$files"; then
+ files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in`
+ test -z "$files" || files="$files.in"
+ else
+ files=`echo "$files" | sed -e 's/:/ /g'`
+ fi
+ test -z "$files" && files="config.h.in"
+ touch $files
+ ;;
+
+ automake)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified \`Makefile.am', \`acinclude.m4' or \`configure.in'.
+ You might want to install the \`Automake' and \`Perl' packages.
+ Grab them from any GNU archive site."
+ find . -type f -name Makefile.am -print \
+ | sed 's/^\(.*\).am$/touch \1.in/' \
+ | sh
+ ;;
+
+ bison|yacc)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.y' file. You may need the \`Bison' package
+ in order for those modifications to take effect. You can get
+ \`Bison' from any GNU archive site."
+ rm -f y.tab.c y.tab.h
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.y)
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.c
+ fi
+ SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" y.tab.h
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f y.tab.h ]; then
+ echo >y.tab.h
+ fi
+ if [ ! -f y.tab.c ]; then
+ echo 'main() { return 0; }' >y.tab.c
+ fi
+ ;;
+
+ lex|flex)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.l' file. You may need the \`Flex' package
+ in order for those modifications to take effect. You can get
+ \`Flex' from any GNU archive site."
+ rm -f lex.yy.c
+ if [ $# -ne 1 ]; then
+ eval LASTARG="\${$#}"
+ case "$LASTARG" in
+ *.l)
+ SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+ if [ -f "$SRCFILE" ]; then
+ cp "$SRCFILE" lex.yy.c
+ fi
+ ;;
+ esac
+ fi
+ if [ ! -f lex.yy.c ]; then
+ echo 'main() { return 0; }' >lex.yy.c
+ fi
+ ;;
+
+ makeinfo)
+ echo 1>&2 "\
+WARNING: \`$1' is missing on your system. You should only need it if
+ you modified a \`.texi' or \`.texinfo' file, or any other file
+ indirectly affecting the aspect of the manual. The spurious
+ call might also be the consequence of using a buggy \`make' (AIX,
+ DU, IRIX). You might want to install the \`Texinfo' package or
+ the \`GNU make' package. Grab either from any GNU archive site."
+ file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+ if test -z "$file"; then
+ file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+ file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+ fi
+ touch $file
+ ;;
+
+ *)
+ echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+ system. You might have modified some files without having the
+ proper tools for further handling them. Check the \`README' file,
+ it often tells you about the needed prerequirements for installing
+ this package. You may also peek at any GNU archive site, in case
+ some other package would contain this missing \`$1' program."
+ exit 1
+ ;;
+esac
+
+exit 0
diff --git a/support/mkclone b/support/mkclone
new file mode 100755
index 0000000..1840b03
--- /dev/null
+++ b/support/mkclone
@@ -0,0 +1,122 @@
+#! /bin/bash
+#
+# mkclone - symlink every file appearing in $src/MANIFEST to a corresponding
+# file in the target directory ($1). Directories specified in
+# MANIFEST are created in the target directory
+#
+# Copyright (C) 1996-2002 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+prog=`basename $0`
+
+SRCDIR=src
+
+USAGE="usage: $prog [-m manifest] [-s srcdir] [-v] [-d] [-h] target"
+while getopts dhm:s:v opt
+do
+ case "$opt" in
+ m) MANIFEST=$OPTARG ;;
+ s) SRCDIR=$OPTARG ;;
+ v) verbose=y ;;
+ d) ECHO=echo debug=y ;;
+ h) hardlinks=y ;;
+ ?) echo $USAGE >&2
+ exit 2;;
+ esac
+done
+
+: ${MANIFEST:=${SRCDIR}/MANIFEST}
+
+[ -n "$debug" ] && verbose=
+
+shift $(( $OPTIND - 1 ))
+
+if [ $# -lt 1 ]; then
+ echo $USAGE >&2
+ exit 2
+fi
+
+if [ ! -f $MANIFEST ]; then
+ echo "$prog: $MANIFEST: no such file or directory" >&2
+ echo "$prog: must be run with valid -s argument or from source directory" >&2
+ exit 1
+fi
+
+rm_ltmp=false
+LINKTEMP=`mktemp -t linktmp.XXXXXXXX 2>/dev/null`
+if [ -z "$LINKTEMP" ]; then
+ : ${TMPDIR:=/tmp}
+ LINKTEMP=${TMPDIR}/linktmp.$$
+ rm_ltmp=true
+fi
+
+$rm_ltmp && rm -f ${LINKTEMP}
+# if the user specified hard links, then do that. otherwise, try to use
+# symlinks if they're present
+if [ -n "$hardlinks" ]; then
+ LN=ln
+elif (ln -s /dev/null ${LINKTEMP}) >/dev/null 2>&1; then
+ LN="ln -s"
+else
+ LN=ln
+fi
+rm -f ${LINKTEMP}
+
+TARGET=$1
+
+if [ ! -d "$TARGET" ]; then
+ mkdir "$TARGET"
+fi
+
+echo "${prog}: creating clone of bash source tree (from $SRCDIR) in $TARGET"
+
+cd "$TARGET" || { echo "${prog}: cannot cd to $TARGET" >&2 ; exit 1; }
+
+while read fname type mode
+do
+ [ -z "$fname" ] && continue
+
+ case "$fname" in
+ \#*) continue ;;
+ esac
+
+ case "$type" in
+ d) [ -n "$verbose" ] && echo mkdir $fname
+ $ECHO mkdir $fname ;; # already in $TARGET
+ f) fn=${fname##*/}
+ case "$fname" in
+ */*) dn=${fname%/*} ;;
+ *) dn=. ;;
+ esac
+ if [ -n "$verbose" ] || [ -n "$debug" ]; then
+ echo "( cd $dn && $LN $SRCDIR/$fname $fn )"
+ fi
+ [ -z "$debug" ] && ( cd $dn && $LN $SRCDIR/$fname $fn )
+ ;;
+ *) echo "${prog}: ${fname}: unknown file type $type" 1>&2 ;;
+ esac
+done < $MANIFEST
+
+# special
+SPECIAL="parser-built y.tab.c y.tab.h"
+
+rm -f $SPECIAL
+for sf in $SPECIAL
+do
+ [ -n "$verbose" ] && echo cp -p $SRCDIR/$sf $TARGET
+ $ECHO cp -p $SRCDIR/$sf $TARGET
+done
+
+exit 0
diff --git a/support/mkconffiles b/support/mkconffiles
new file mode 100755
index 0000000..9eb2231
--- /dev/null
+++ b/support/mkconffiles
@@ -0,0 +1,79 @@
+#! /bin/sh
+#
+# mkconffiles - create _distribution and _patchlevel files in preparation
+# for recreating `configure' from `configure.in'
+#
+# options:
+# -s srcdir directory where `configure' resides (defaults to `.')
+# -d outdir directory where the files should be written (defaults
+# to "$srcdir")
+# -v verbose
+# -n nocreate - don't create the output files
+#
+# Chet Ramey
+# chet@po.cwru.edu
+
+# Copyright (C) 1996-2002 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+PROG=`basename $0`
+
+# defaults
+srcdir=.
+
+distname="_distribution"
+patchname="_patchlevel"
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -s) shift; srcdir="$1"; shift;;
+ -d) shift; outdir="$1"; shift;;
+ -v) shift; verbose=yes ;;
+ -n) shift; nocreate=yes;;
+ --) shift; break;;
+ *) echo "${PROG}: usage: ${PROG} [-s srcdir] [-d outdir] [-nv]" >&2; exit 2;;
+ esac
+done
+
+if [ ! -f ${srcdir}/configure ]; then
+ echo "${PROG}: ${srcdir}/configure not found" >&2
+ exit 1
+fi
+
+# default output directory to source directory
+if [ -z "$outdir" ]; then
+ outdir=${srcdir}
+fi
+
+DISTRIB=`grep '^BASHVERS' ${srcdir}/configure | sed 's:.*=::'`
+PATCH=`grep '^BASHPATCH' ${srcdir}/configure | sed 's:.*=::'`
+
+if [ -n "$verbose" ]; then
+ echo "${PROG}: creating new distribution files for bash-${DISTRIB}.${PATCH} in ${outdir}"
+fi
+
+distout=${outdir}/${distname}
+patchout=${outdir}/${patchname}
+
+if [ -z "$nocreate" ]; then
+ echo "$DISTRIB" > $distout
+ echo "$PATCH" > $patchout
+fi
+
+if [ -n "$verbose" ]; then
+ echo "${PROG}: created $distout and $patchout"
+fi
+
+exit 0
diff --git a/support/mkdirs b/support/mkdirs
new file mode 100755
index 0000000..46f656e
--- /dev/null
+++ b/support/mkdirs
@@ -0,0 +1,47 @@
+#! /bin/sh
+#
+# mkdirs - a work-alike for `mkdir -p'
+#
+# Chet Ramey
+# chet@po.cwru.edu
+
+# Copyright (C) 1996-2002 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+for dir
+do
+
+ test -d "$dir" && continue
+
+ tomake=$dir
+ while test -n "$dir" ; do
+ # dir=${dir%/*}
+ # dir=`expr "$dir" ':' '\(/.*\)/[^/]*'`
+ if dir=`expr "$dir" ':' '\(.*\)/[^/]*'`; then
+ tomake="$dir $tomake"
+ else
+ dir=
+ fi
+ done
+
+ for d in $tomake
+ do
+ test -d "$d" && continue
+ echo mkdir "$d"
+ mkdir "$d"
+ done
+done
+
+exit 0
diff --git a/support/mkinstalldirs b/support/mkinstalldirs
new file mode 100755
index 0000000..d2d5f21
--- /dev/null
+++ b/support/mkinstalldirs
@@ -0,0 +1,111 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman@prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+errstatus=0
+dirmode=""
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+
+# process command line arguments
+while test $# -gt 0 ; do
+ case $1 in
+ -h | --help | --h*) # -h for help
+ echo "$usage" 1>&2
+ exit 0
+ ;;
+ -m) # -m PERM arg
+ shift
+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+ dirmode=$1
+ shift
+ ;;
+ --) # stop option processing
+ shift
+ break
+ ;;
+ -*) # unknown option
+ echo "$usage" 1>&2
+ exit 1
+ ;;
+ *) # first non-opt arg
+ break
+ ;;
+ esac
+done
+
+for file
+do
+ if test -d "$file"; then
+ shift
+ else
+ break
+ fi
+done
+
+case $# in
+ 0) exit 0 ;;
+esac
+
+case $dirmode in
+ '')
+ if mkdir -p -- . 2>/dev/null; then
+ echo "mkdir -p -- $*"
+ exec mkdir -p -- "$@"
+ fi
+ ;;
+ *)
+ if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+ echo "mkdir -m $dirmode -p -- $*"
+ exec mkdir -m "$dirmode" -p -- "$@"
+ fi
+ ;;
+esac
+
+for file
+do
+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+ shift
+
+ pathcomp=
+ for d
+ do
+ pathcomp="$pathcomp$d"
+ case $pathcomp in
+ -*) pathcomp=./$pathcomp ;;
+ esac
+
+ if test ! -d "$pathcomp"; then
+ echo "mkdir $pathcomp"
+
+ mkdir "$pathcomp" || lasterr=$?
+
+ if test ! -d "$pathcomp"; then
+ errstatus=$lasterr
+ else
+ if test ! -z "$dirmode"; then
+ echo "chmod $dirmode $pathcomp"
+ lasterr=""
+ chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+ if test ! -z "$lasterr"; then
+ errstatus=$lasterr
+ fi
+ fi
+ fi
+ fi
+
+ pathcomp="$pathcomp/"
+ done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# End:
+# mkinstalldirs ends here
diff --git a/support/mksignames.c b/support/mksignames.c
new file mode 100644
index 0000000..5618879
--- /dev/null
+++ b/support/mksignames.c
@@ -0,0 +1,111 @@
+/* mksignames.c -- Create and write `signames.h', which contains an array of
+ signal names. */
+
+/* Copyright (C) 1992-2006 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#include <stdio.h>
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+/* Duplicated from signames.c */
+#if !defined (NSIG)
+# define NSIG 64
+#endif
+
+#define LASTSIG NSIG+2
+
+/* Imported from signames.c */
+extern void initialize_signames ();
+extern char *signal_names[];
+
+char *progname;
+
+void
+write_signames (stream)
+ FILE *stream;
+{
+ register int i;
+
+ fprintf (stream, "/* This file was automatically created by %s.\n",
+ progname);
+ fprintf (stream, " Do not edit. Edit support/mksignames.c instead. */\n\n");
+ fprintf (stream,
+ "/* A translation list so we can be polite to our users. */\n");
+#if defined (CROSS_COMPILING)
+ fprintf (stream, "extern char *signal_names[];\n\n");
+ fprintf (stream, "extern void initialize_signames __P((void));\n\n");
+#else
+ fprintf (stream, "char *signal_names[NSIG + 4] = {\n");
+
+ for (i = 0; i <= LASTSIG; i++)
+ fprintf (stream, " \"%s\",\n", signal_names[i]);
+
+ fprintf (stream, " (char *)0x0\n");
+ fprintf (stream, "};\n\n");
+ fprintf (stream, "#define initialize_signames()\n\n");
+#endif
+}
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ char *stream_name;
+ FILE *stream;
+
+ progname = argv[0];
+
+ if (argc == 1)
+ {
+ stream_name = "stdout";
+ stream = stdout;
+ }
+ else if (argc == 2)
+ {
+ stream_name = argv[1];
+ stream = fopen (stream_name, "w");
+ }
+ else
+ {
+ fprintf (stderr, "Usage: %s [output-file]\n", progname);
+ exit (1);
+ }
+
+ if (!stream)
+ {
+ fprintf (stderr, "%s: %s: cannot open for writing\n",
+ progname, stream_name);
+ exit (2);
+ }
+
+#if !defined (CROSS_COMPILING)
+ initialize_signames ();
+#endif
+ write_signames (stream);
+ exit (0);
+}
diff --git a/support/mkversion.sh b/support/mkversion.sh
new file mode 100755
index 0000000..08a5d98
--- /dev/null
+++ b/support/mkversion.sh
@@ -0,0 +1,168 @@
+#! /bin/sh
+
+# Simple program to make new version numbers for the shell.
+# Big deal, but it was getting out of hand to do everything
+# in the makefile. This creates a file named by the -o option,
+# otherwise everything is echoed to the standard output.
+
+# Copyright (C) 1996-2002 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+PROGNAME=`basename $0`
+USAGE="$PROGNAME [-b] [-S srcdir] -d version -p patchlevel [-s status] [-o outfile]"
+
+source_dir="."
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -o) shift; OUTFILE=$1; shift ;;
+ -b) shift; inc_build=yes ;;
+ -s) shift; rel_status=$1; shift ;;
+ -p) shift; patch_level=$1; shift ;;
+ -d) shift; dist_version=$1; shift ;;
+ -S) shift; source_dir="$1"; shift ;;
+ *) echo "$PROGNAME: usage: $USAGE" >&2 ; exit 2 ;;
+ esac
+done
+
+# Required arguments
+if [ -z "$dist_version" ]; then
+ echo "${PROGNAME}: required argument -d missing" >&2
+ echo "$PROGNAME: usage: $USAGE" >&2
+ exit 1
+fi
+
+#if [ -z "$patch_level" ]; then
+# echo "${PROGNAME}: required argument -p missing" >&2
+# echo "$PROGNAME: usage: $USAGE" >&2
+# exit 1
+#fi
+
+# Defaults
+if [ -z "$rel_status" ]; then
+ rel_status="release"
+fi
+
+build_ver=
+if [ -r .build ]; then
+ build_ver=`cat .build`
+fi
+if [ -z "$build_ver" ]; then
+ build_ver=0
+fi
+
+# increment the build version if that's what's required
+
+if [ -n "$inc_build" ]; then
+ build_ver=`expr 1 + $build_ver`
+fi
+
+# what's the patch level?
+if [ -z "$patch_level" ]; then
+ patchlevel_h=$source_dir/patchlevel.h
+ if [ -s $patchlevel_h ]; then
+ patch_level=`cat $patchlevel_h | grep '^#define[ ]*PATCHLEVEL' | awk '{print $NF}'`
+ fi
+fi
+if [ -z "$patch_level" ]; then
+ patch_level=0
+fi
+
+# If we have an output file specified, make it the standard output
+if [ -n "$OUTFILE" ]; then
+ if exec >$OUTFILE; then
+ :
+ else
+ echo "${PROGNAME}: cannot redirect standard output to $OUTFILE" >&2
+ exit 1
+ fi
+fi
+
+# Output the leading comment.
+echo "/* Version control for the shell. This file gets changed when you say"
+echo " \`make version.h' to the Makefile. It is created by mkversion. */"
+
+# Output the distribution version. Single numbers are converted to x.00.
+# Allow, as a special case, `[:digit:].[:digit:][:alpha:]' for
+# intermediate versions (e.g., `2.5a').
+# Any characters other than digits and `.' are invalid.
+case "$dist_version" in
+[0-9].[0-9][a-z]) ;; # special case
+*[!0-9.]*) echo "mkversion.sh: ${dist_version}: bad distribution version" >&2
+ exit 1 ;;
+*.*) ;;
+*) dist_version=${dist_version}.00 ;;
+esac
+
+dist_major=`echo $dist_version | sed 's:\..*$::'`
+[ -z "${dist_major}" ] && dist_major=0
+
+dist_minor=`echo $dist_version | sed 's:^.*\.::'`
+case "$dist_minor" in
+"") dist_minor=0 ;;
+[a-z]) dist_minor=0${dist_minor} ;;
+?) dist_minor=${dist_minor} ;;
+*) ;;
+esac
+
+#float_dist=`echo $dist_version | awk '{printf "%.2f\n", $1}'`
+float_dist=${dist_major}.${dist_minor}
+
+echo
+echo "/* The distribution version number of this shell. */"
+echo "#define DISTVERSION \"${float_dist}\""
+
+# Output the patch level
+#echo
+#echo "/* The patch level of this version of the shell. */"
+#echo "#define PATCHLEVEL ${patch_level}"
+
+# Output the build version
+echo
+echo "/* The last built version of this shell. */"
+echo "#define BUILDVERSION ${build_ver}"
+
+# Output the release status
+echo
+echo "/* The release status of this shell. */"
+echo "#define RELSTATUS \"${rel_status}\""
+
+echo
+echo "/* The default shell compatibility-level (the current version) */"
+echo "#define DEFAULT_COMPAT_LEVEL ${dist_major}${dist_minor}"
+
+# Output the SCCS version string
+sccs_string="${float_dist}.${patch_level}(${build_ver}) ${rel_status} GNU"
+echo
+echo "/* A version string for use by sccs and the what command. */"
+echo "#define SCCSVERSION \"@(#)Bash version ${sccs_string}\""
+
+# extern function declarations
+#echo
+#echo '/* Functions from version.c. */'
+#echo 'extern char *shell_version_string __P((void));'
+#echo 'extern void show_shell_version __P((int));'
+
+if [ -n "$inc_build" ]; then
+ # Make sure we can write to .build
+ if [ -f .build ] && [ ! -w .build ]; then
+ echo "$PROGNAME: cannot write to .build, not incrementing build version" >&2
+ else
+ echo "$build_ver" > .build
+ fi
+fi
+
+exit 0
diff --git a/support/printenv.c b/support/printenv.c
new file mode 100644
index 0000000..b45e4c7
--- /dev/null
+++ b/support/printenv.c
@@ -0,0 +1,71 @@
+/* printenv -- minimal clone of BSD printenv(1).
+
+ usage: printenv [varname]
+
+ Chet Ramey
+ chet@po.cwru.edu
+*/
+
+/* Copyright (C) 1997-2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include "bashansi.h"
+
+extern char **environ;
+
+int
+main (argc, argv)
+ int argc;
+ char **argv;
+{
+ register char **envp, *eval;
+ int len;
+
+ argv++;
+ argc--;
+
+ /* printenv */
+ if (argc == 0)
+ {
+ for (envp = environ; *envp; envp++)
+ puts (*envp);
+ exit (0);
+ }
+
+ /* printenv varname */
+ len = strlen (*argv);
+ for (envp = environ; *envp; envp++)
+ {
+ if (**argv == **envp && strncmp (*envp, *argv, len) == 0)
+ {
+ eval = *envp + len;
+ /* If the environment variable doesn't have an `=', ignore it. */
+ if (*eval == '=')
+ {
+ puts (eval + 1);
+ exit (0);
+ }
+ }
+ }
+ exit (1);
+}
+
diff --git a/support/printenv.sh b/support/printenv.sh
new file mode 100755
index 0000000..32b7ee8
--- /dev/null
+++ b/support/printenv.sh
@@ -0,0 +1,27 @@
+#! /bin/sh -
+
+# Copyright (C) 1996-2002 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+if [ $# -eq 0 ]; then
+ env
+ exit
+elif eval [ "\${$1-unset}" = "unset" ]; then
+ exit 1
+else
+ eval echo \$$1
+ exit 0
+fi
diff --git a/support/recho.c b/support/recho.c
new file mode 100644
index 0000000..7e3c6bc
--- /dev/null
+++ b/support/recho.c
@@ -0,0 +1,67 @@
+/*
+ recho -- really echo args, bracketed with <> and with invisible chars
+ made visible.
+
+ Chet Ramey
+ chet@po.cwru.edu
+*/
+
+/* Copyright (C) 2002-2005 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include "bashansi.h"
+#include <stdio.h>
+
+void strprint();
+
+int
+main(argc, argv)
+int argc;
+char **argv;
+{
+ register int i;
+
+ for (i = 1; i < argc; i++) {
+ printf("argv[%d] = <", i);
+ strprint(argv[i]);
+ printf(">\n");
+ }
+ exit(0);
+}
+
+void
+strprint(str)
+char *str;
+{
+ register unsigned char *s;
+
+ for (s = (unsigned char *)str; s && *s; s++) {
+ if (*s < ' ') {
+ putchar('^');
+ putchar(*s+64);
+ } else if (*s == 127) {
+ putchar('^');
+ putchar('?');
+ } else
+ putchar(*s);
+ }
+}
diff --git a/support/rlvers.sh b/support/rlvers.sh
new file mode 100755
index 0000000..64cadc7
--- /dev/null
+++ b/support/rlvers.sh
@@ -0,0 +1,113 @@
+#! /bin/sh
+#
+# rlvers.sh -- run a program that prints out the readline version number
+# using locally-installed readline libraries
+#
+
+# Copyright (C) 1996-2002 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+PROGNAME=`basename $0`
+
+: ${TMPDIR:=/tmp}
+TDIR=$TMPDIR/rlvers
+
+# defaults
+CC=cc
+RL_LIBDIR=/usr/local/lib
+RL_INCDIR=/usr/local/include
+
+TERMCAP_LIB="-ltermcap"
+
+# cannot rely on the presence of getopts
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -C) shift ; CC="$1"; shift ;;
+ -I) shift ; RL_INCDIR="$1" ; shift ;;
+ -L) shift ; RL_LIBDIR="$1" ; shift ;;
+ -T) shift ; TERMCAP_LIB="$1" ; shift ;;
+ -v) shift ; verbose=y ;;
+ --) shift ; break ;;
+ *) echo "${PROGNAME}: usage: $PROGNAME [-C compiler] [-L libdir] [-v]" >&2 ; exit 2;;
+ esac
+done
+
+# if someone happened to install examples/rlversion, use it (it's not
+# installed by default)
+if test -f ${RL_LIBDIR}/rlversion ; then
+ if [ -n "$verbose" ]; then
+ echo "${PROGNAME}: using installed rlversion from ${RL_LIBDIR}/rlversion"
+ fi
+ v=`${RL_LIBDIR}/rlversion 2>/dev/null`
+ case "$v" in
+ unknown | "") echo 0 ;;
+ *) echo "$v" ;;
+ esac
+ exit 0
+fi
+
+if [ -n "$verbose" ]; then
+ echo "${PROGNAME}: using ${RL_LIBDIR} to find libreadline"
+ echo "${PROGNAME}: attempting program compilation"
+fi
+
+# make $TDIR mode 0700
+mkdir $TDIR || {
+ echo "${PROGNAME}: ${TDIR}: file exists" >&2
+ echo 0
+ exit 1
+}
+chmod 700 $TDIR
+
+trap 'rm -f $TDIR/rlvers $TDIR/rlvers.? ; rmdir $TDIR' 0 1 2 3 6 15
+
+cat > $TDIR/rlvers.c << EOF
+#include <stdio.h>
+extern char *rl_library_version;
+
+main()
+{
+ printf("%s\n", rl_library_version ? rl_library_version : "0");
+ exit(0);
+}
+EOF
+
+opwd=`pwd`
+
+cd $TDIR || {
+ echo "${PROGNAME}: cannot cd to $TDIR" >&2
+ echo 0
+ exit 1
+}
+
+if eval ${CC} -L${RL_LIBDIR} -I${RL_INCDIR} -o $TDIR/rlvers $TDIR/rlvers.c -lreadline ${TERMCAP_LIB};
+then
+ v=`$TDIR/rlvers`
+else
+ if [ -n "$verbose" ] ; then
+ echo "${PROGNAME}: compilation failed: status $?"
+ echo "${PROGNAME}: using version 0"
+ fi
+ v=0
+fi
+
+case "$v" in
+unknown | "") echo 0 ;;
+*) echo "$v" ;;
+esac
+
+cd $opwd
+exit 0
diff --git a/support/shobj-conf b/support/shobj-conf
new file mode 100755
index 0000000..5a63e80
--- /dev/null
+++ b/support/shobj-conf
@@ -0,0 +1,579 @@
+#! /bin/sh
+#
+# shobj-conf -- output a series of variable assignments to be substituted
+# into a Makefile by configure which specify system-dependent
+# information for creating shared objects that may be loaded
+# into bash with `enable -f'
+#
+# usage: shobj-conf [-C compiler] -c host_cpu -o host_os -v host_vendor
+#
+# Chet Ramey
+# chet@po.cwru.edu
+
+# Copyright (C) 1996-2009 Free Software Foundation, Inc.
+#
+# This file is part of GNU Bash, the Bourne Again SHell.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+#
+# defaults
+#
+SHOBJ_STATUS=supported
+SHLIB_STATUS=supported
+
+SHOBJ_CC=cc
+SHOBJ_CFLAGS=
+SHOBJ_LD=
+SHOBJ_LDFLAGS=
+SHOBJ_XLDFLAGS=
+SHOBJ_LIBS=
+
+SHLIB_XLDFLAGS=
+SHLIB_LIBS=
+
+SHLIB_DOT='.'
+SHLIB_LIBPREF='lib'
+SHLIB_LIBSUFF='so'
+
+SHLIB_LIBVERSION='$(SHLIB_LIBSUFF)'
+SHLIB_DLLVERSION='$(SHLIB_MAJOR)'
+
+PROGNAME=`basename $0`
+USAGE="$PROGNAME [-C compiler] -c host_cpu -o host_os -v host_vendor"
+
+while [ $# -gt 0 ]; do
+ case "$1" in
+ -C) shift; SHOBJ_CC="$1"; shift ;;
+ -c) shift; host_cpu="$1"; shift ;;
+ -o) shift; host_os="$1"; shift ;;
+ -v) shift; host_vendor="$1"; shift ;;
+ *) echo "$USAGE" >&2 ; exit 2;;
+ esac
+done
+
+case "${host_os}-${SHOBJ_CC}-${host_vendor}" in
+sunos4*-*gcc*)
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD=/usr/bin/ld
+ SHOBJ_LDFLAGS='-assert pure-text'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ ;;
+
+sunos4*)
+ SHOBJ_CFLAGS=-pic
+ SHOBJ_LD=/usr/bin/ld
+ SHOBJ_LDFLAGS='-assert pure-text'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ ;;
+
+sunos5*-*gcc*|solaris2*-*gcc*)
+ SHOBJ_LD='${CC}'
+ ld_used=`gcc -print-prog-name=ld`
+ if ${ld_used} -V 2>&1 | grep GNU >/dev/null 2>&1; then
+ # This line works for the GNU ld
+ SHOBJ_LDFLAGS='-shared -Wl,-h,$@'
+ # http://sourceware.org/ml/binutils/2001-08/msg00361.html
+ SHOBJ_CFLAGS=-fPIC
+ else
+ # This line works for the Solaris linker in /usr/ccs/bin/ld
+ SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@'
+ SHOBJ_CFLAGS=-fpic
+ fi
+
+# SHLIB_XLDFLAGS='-R $(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sunos5*|solaris2*)
+ SHOBJ_CFLAGS='-K pic'
+ SHOBJ_LD=/usr/ccs/bin/ld
+ SHOBJ_LDFLAGS='-G -dy -z text -i -h $@'
+
+# SHLIB_XLDFLAGS='-R $(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+# All versions of Linux (including Gentoo/FreeBSD) or the semi-mythical GNU Hurd.
+linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo)
+ SHOBJ_CFLAGS=-fPIC
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
+
+ SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir) -Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ ;;
+
+freebsd2*)
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-x -Bshareable'
+
+ SHLIB_XLDFLAGS='-R$(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ ;;
+
+# FreeBSD-3.x ELF
+freebsd3*|freebsdaout*)
+ SHOBJ_CFLAGS=-fPIC
+ SHOBJ_LD='${CC}'
+
+ if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then
+ SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
+
+ SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ else
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_XLDFLAGS='-R$(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ fi
+ ;;
+
+# FreeBSD-4.x and later have only ELF
+freebsd[4-9]*|freebsdelf*|dragonfly*)
+ SHOBJ_CFLAGS=-fPIC
+ SHOBJ_LD='${CC}'
+
+ SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
+ SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+# Darwin/MacOS X
+darwin[89]*|darwin10*)
+ SHOBJ_STATUS=supported
+ SHLIB_STATUS=supported
+
+ SHOBJ_CFLAGS='-fno-common'
+
+ SHOBJ_LD='MACOSX_DEPLOYMENT_TARGET=10.3 ${CC}'
+
+ SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)'
+ SHLIB_LIBSUFF='dylib'
+
+ SHOBJ_LDFLAGS='-dynamiclib -dynamic -undefined dynamic_lookup -arch_only `/usr/bin/arch`'
+ SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
+
+ SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1
+ ;;
+
+darwin*|macosx*)
+ SHOBJ_STATUS=unsupported
+ SHLIB_STATUS=supported
+
+ SHOBJ_CFLAGS='-fno-common'
+
+ SHOBJ_LD='${CC}'
+
+ SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)'
+ SHLIB_LIBSUFF='dylib'
+
+ case "${host_os}" in
+ darwin[789]*|darwin10*) SHOBJ_LDFLAGS=''
+ SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
+ ;;
+ *) SHOBJ_LDFLAGS='-dynamic'
+ SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v'
+ ;;
+ esac
+
+ SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1
+ ;;
+
+openbsd*|netbsd*)
+ SHOBJ_CFLAGS=-fPIC
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_XLDFLAGS='-R$(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ ;;
+
+bsdi2*)
+ SHOBJ_CC=shlicc2
+ SHOBJ_CFLAGS=
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS=-r
+ SHOBJ_LIBS=-lc_s.2.1.0
+
+ # BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in
+ # the ass -- they require changing {/usr/lib,etc}/shlib.map on
+ # each system, and the library creation process is byzantine
+ SHLIB_STATUS=unsupported
+ ;;
+
+bsdi3*)
+ SHOBJ_CC=shlicc2
+ SHOBJ_CFLAGS=
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS=-r
+ SHOBJ_LIBS=-lc_s.3.0.0
+
+ # BSD/OS 2.x and 3.x `shared libraries' are too much of a pain in
+ # the ass -- they require changing {/usr/lib,etc}/shlib.map on
+ # each system, and the library creation process is byzantine
+ SHLIB_STATUS=unsupported
+ ;;
+
+bsdi4*)
+ # BSD/OS 4.x now supports ELF and SunOS-style dynamically-linked
+ # shared libraries. gcc 2.x is the standard compiler, and the
+ # `normal' gcc options should work as they do in Linux.
+
+ SHOBJ_CFLAGS=-fPIC
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
+
+ SHLIB_XLDFLAGS='-Wl,-soname,`basename $@ $(SHLIB_MINOR)`'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)'
+ ;;
+
+osf*-*gcc*)
+ # Fix to use gcc linker driver from bfischer@TechFak.Uni-Bielefeld.DE
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
+
+ SHLIB_XLDFLAGS='-rpath $(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+osf*)
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-shared -soname $@ -expect_unresolved "*"'
+
+ SHLIB_XLDFLAGS='-rpath $(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+aix4.[2-9]*-*gcc*|aix[5-9].*-*gcc*) # lightly tested by jik@cisco.com
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD='ld'
+ SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall'
+ SHOBJ_XLDFLAGS='-G'
+
+ SHLIB_XLDFLAGS='-bM:SRE'
+ SHLIB_LIBS='-lcurses -lc'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+aix4.[2-9]*|aix[5-9].*)
+ SHOBJ_CFLAGS=-K
+ SHOBJ_LD='ld'
+ SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall'
+ SHOBJ_XLDFLAGS='-G'
+
+ SHLIB_XLDFLAGS='-bM:SRE'
+ SHLIB_LIBS='-lcurses -lc'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+#
+# THE FOLLOWING ARE UNTESTED -- and some may not support the dlopen interface
+#
+irix[56]*-*gcc*)
+ SHOBJ_CFLAGS='-fpic'
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared -Wl,-soname,$@'
+
+ SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+irix[56]*)
+ SHOBJ_CFLAGS='-K PIC'
+ SHOBJ_LD=ld
+# SHOBJ_LDFLAGS='-call_shared -hidden_symbol -no_unresolved -soname $@'
+# Change from David Kaelbling <drk@sgi.com>. If you have problems,
+# remove the `-no_unresolved'
+ SHOBJ_LDFLAGS='-shared -no_unresolved -soname $@'
+
+ SHLIB_XLDFLAGS='-rpath $(libdir)'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+hpux9*-*gcc*)
+ # must use gcc; the bundled cc cannot compile PIC code
+ SHOBJ_CFLAGS='-fpic'
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s'
+
+ SHLIB_XLDFLAGS='-Wl,+b,$(libdir)'
+ SHLIB_LIBSUFF='sl'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+hpux9*)
+ SHOBJ_STATUS=unsupported
+ SHLIB_STATUS=unsupported
+
+ # If you are using the HP ANSI C compiler, you can uncomment and use
+ # this code (I have not tested it)
+# SHOBJ_STATUS=supported
+# SHLIB_STATUS=supported
+#
+# SHOBJ_CFLAGS='+z'
+# SHOBJ_LD='ld'
+# SHOBJ_LDFLAGS='-b +s'
+#
+# SHLIB_XLDFLAGS='+b $(libdir)'
+# SHLIB_LIBSUFF='sl'
+# SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+
+ ;;
+
+hpux10*-*gcc*)
+ # must use gcc; the bundled cc cannot compile PIC code
+ SHOBJ_CFLAGS='-fpic'
+ SHOBJ_LD='${CC}'
+ # if you have problems linking here, moving the `-Wl,+h,$@' from
+ # SHLIB_XLDFLAGS to SHOBJ_LDFLAGS has been reported to work
+ SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s'
+
+ SHLIB_XLDFLAGS='-Wl,+h,$@ -Wl,+b,$(libdir)'
+ SHLIB_LIBSUFF='sl'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+hpux10*)
+ SHOBJ_STATUS=unsupported
+ SHLIB_STATUS=unsupported
+
+ # If you are using the HP ANSI C compiler, you can uncomment and use
+ # this code (I have not tested it)
+# SHOBJ_STATUS=supported
+# SHLIB_STATUS=supported
+#
+# SHOBJ_CFLAGS='+z'
+# SHOBJ_LD='ld'
+# SHOBJ_LDFLAGS='-b +s +h $@'
+#
+# SHLIB_XLDFLAGS='+b $(libdir)'
+# SHLIB_LIBSUFF='sl'
+# SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+
+ ;;
+
+hpux11*-*gcc*)
+ # must use gcc; the bundled cc cannot compile PIC code
+ SHOBJ_CFLAGS='-fpic'
+ SHOBJ_LD='${CC}'
+# SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,-B,symbolic -Wl,+s -Wl,+std -Wl,+h,$@'
+ SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s -Wl,+h,$@'
+
+ SHLIB_XLDFLAGS='-Wl,+b,$(libdir)'
+ SHLIB_LIBSUFF='sl'
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+hpux11*)
+ SHOBJ_STATUS=unsupported
+ SHLIB_STATUS=unsupported
+
+ # If you are using the HP ANSI C compiler, you can uncomment and use
+ # this code (I have not tested it)
+# SHOBJ_STATUS=supported
+# SHLIB_STATUS=supported
+#
+# SHOBJ_CFLAGS='+z'
+# SHOBJ_LD='ld'
+# SHOBJ_LDFLAGS='-b +s +h $@'
+#
+# SHLIB_XLDFLAGS='+b $(libdir)'
+# SHLIB_LIBSUFF='sl'
+# SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+
+ ;;
+
+sysv4*-*gcc*)
+ SHOBJ_CFLAGS=-shared
+ SHOBJ_LDFLAGS='-shared -h $@'
+ SHOBJ_LD='${CC}'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sysv4*)
+ SHOBJ_CFLAGS='-K PIC'
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-dy -z text -G -h $@'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sco3.2v5*-*gcc*)
+ SHOBJ_CFLAGS='-fpic' # DEFAULTS TO ELF
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sco3.2v5*)
+ SHOBJ_CFLAGS='-K pic -b elf'
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-G -b elf -dy -z text -h $@'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sysv5uw7*-*gcc*)
+ SHOBJ_CFLAGS='-fpic'
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sysv5uw7*)
+ SHOBJ_CFLAGS='-K PIC'
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-G -dy -z text -h $@'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sysv5UnixWare*-*gcc*)
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sysv5UnixWare*)
+ SHOBJ_CFLAGS='-K PIC'
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-G -dy -z text -h $@'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sysv5OpenUNIX*-*gcc*)
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+sysv5OpenUNIX*)
+ SHOBJ_CFLAGS='-K PIC'
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-G -dy -z text -h $@'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+dgux*-*gcc*)
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+dgux*)
+ SHOBJ_CFLAGS='-K pic'
+ SHOBJ_LD=ld
+ SHOBJ_LDFLAGS='-G -dy -h $@'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+msdos*)
+ SHOBJ_STATUS=unsupported
+ SHLIB_STATUS=unsupported
+ ;;
+
+cygwin*)
+ SHOBJ_LD='$(CC)'
+ SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a'
+ SHLIB_LIBPREF='cyg'
+ SHLIB_LIBSUFF='dll'
+ SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)'
+ SHLIB_LIBS='$(TERMCAP_LIB)'
+
+ SHLIB_DOT=
+ # For official cygwin releases, DLLVERSION will be defined in the
+ # environment of configure, and will be incremented any time the API
+ # changes in a non-backwards compatible manner. Otherwise, it is just
+ # SHLIB_MAJOR.
+ if [ -n "$DLLVERSION" ] ; then
+ SHLIB_DLLVERSION="$DLLVERSION"
+ fi
+ ;;
+
+mingw*)
+ SHOBJ_LD='$(CC)'
+ SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a'
+ SHLIB_LIBSUFF='dll'
+ SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)'
+ SHLIB_LIBS='$(TERMCAP_LIB)'
+
+ SHLIB_DOT=
+ # For official cygwin releases, DLLVERSION will be defined in the
+ # environment of configure, and will be incremented any time the API
+ # changes in a non-backwards compatible manner. Otherwise, it is just
+ # SHLIB_MAJOR.
+ if [ -n "$DLLVERSION" ] ; then
+ SHLIB_DLLVERSION="$DLLVERSION"
+ fi
+ ;;
+
+#
+# Rely on correct gcc configuration for everything else
+#
+*-*gcc*)
+ SHOBJ_CFLAGS=-fpic
+ SHOBJ_LD='${CC}'
+ SHOBJ_LDFLAGS='-shared'
+
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)'
+ ;;
+
+*)
+ SHOBJ_STATUS=unsupported
+ SHLIB_STATUS=unsupported
+ ;;
+
+esac
+
+echo SHOBJ_CC=\'"$SHOBJ_CC"\'
+echo SHOBJ_CFLAGS=\'"$SHOBJ_CFLAGS"\'
+echo SHOBJ_LD=\'"$SHOBJ_LD"\'
+echo SHOBJ_LDFLAGS=\'"$SHOBJ_LDFLAGS"\'
+echo SHOBJ_XLDFLAGS=\'"$SHOBJ_XLDFLAGS"\'
+echo SHOBJ_LIBS=\'"$SHOBJ_LIBS"\'
+
+echo SHLIB_XLDFLAGS=\'"$SHLIB_XLDFLAGS"\'
+echo SHLIB_LIBS=\'"$SHLIB_LIBS"\'
+
+echo SHLIB_DOT=\'"$SHLIB_DOT"\'
+
+echo SHLIB_LIBPREF=\'"$SHLIB_LIBPREF"\'
+echo SHLIB_LIBSUFF=\'"$SHLIB_LIBSUFF"\'
+
+echo SHLIB_LIBVERSION=\'"$SHLIB_LIBVERSION"\'
+echo SHLIB_DLLVERSION=\'"$SHLIB_DLLVERSION"\'
+
+echo SHOBJ_STATUS=\'"$SHOBJ_STATUS"\'
+echo SHLIB_STATUS=\'"$SHLIB_STATUS"\'
+
+exit 0
diff --git a/support/signames.c b/support/signames.c
new file mode 100644
index 0000000..137826f
--- /dev/null
+++ b/support/signames.c
@@ -0,0 +1,393 @@
+/* signames.c -- Create an array of signal names. */
+
+/* Copyright (C) 2006 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include <sys/types.h>
+#include <signal.h>
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#if !defined (NSIG)
+# define NSIG 64
+#endif
+
+/*
+ * Special traps:
+ * EXIT == 0
+ * DEBUG == NSIG
+ * ERR == NSIG+1
+ * RETURN == NSIG+2
+ */
+#define LASTSIG NSIG+2
+
+char *signal_names[2 * (LASTSIG)];
+
+#define signal_names_size (sizeof(signal_names)/sizeof(signal_names[0]))
+
+/* AIX 4.3 defines SIGRTMIN and SIGRTMAX as 888 and 999 respectively.
+ I don't want to allocate so much unused space for the intervening signal
+ numbers, so we just punt if SIGRTMAX is past the bounds of the
+ signal_names array (handled in configure). */
+#if defined (SIGRTMAX) && defined (UNUSABLE_RT_SIGNALS)
+# undef SIGRTMAX
+# undef SIGRTMIN
+#endif
+
+#if defined (SIGRTMAX) || defined (SIGRTMIN)
+# define RTLEN 14
+# define RTLIM 256
+#endif
+
+#if defined (BUILDTOOL)
+extern char *progname;
+#endif
+
+void
+initialize_signames ()
+{
+ register int i;
+#if defined (SIGRTMAX) || defined (SIGRTMIN)
+ int rtmin, rtmax, rtcnt;
+#endif
+
+ for (i = 1; i < signal_names_size; i++)
+ signal_names[i] = (char *)NULL;
+
+ /* `signal' 0 is what we do on exit. */
+ signal_names[0] = "EXIT";
+
+ /* Place signal names which can be aliases for more common signal
+ names first. This allows (for example) SIGABRT to overwrite SIGLOST. */
+
+ /* POSIX 1003.1b-1993 real time signals, but take care of incomplete
+ implementations. Acoording to the standard, both, SIGRTMIN and
+ SIGRTMAX must be defined, SIGRTMIN must be stricly less than
+ SIGRTMAX, and the difference must be at least 7, that is, there
+ must be at least eight distinct real time signals. */
+
+ /* The generated signal names are SIGRTMIN, SIGRTMIN+1, ...,
+ SIGRTMIN+x, SIGRTMAX-x, ..., SIGRTMAX-1, SIGRTMAX. If the number
+ of RT signals is odd, there is an extra SIGRTMIN+(x+1).
+ These names are the ones used by ksh and /usr/xpg4/bin/sh on SunOS5. */
+
+#if defined (SIGRTMIN)
+ rtmin = SIGRTMIN;
+ signal_names[rtmin] = "SIGRTMIN";
+#endif
+
+#if defined (SIGRTMAX)
+ rtmax = SIGRTMAX;
+ signal_names[rtmax] = "SIGRTMAX";
+#endif
+
+#if defined (SIGRTMAX) && defined (SIGRTMIN)
+ if (rtmax > rtmin)
+ {
+ rtcnt = (rtmax - rtmin - 1) / 2;
+ /* croak if there are too many RT signals */
+ if (rtcnt >= RTLIM/2)
+ {
+ rtcnt = RTLIM/2-1;
+#ifdef BUILDTOOL
+ fprintf(stderr, "%s: error: more than %d real time signals, fix `%s'\n",
+ progname, RTLIM, progname);
+#endif
+ }
+
+ for (i = 1; i <= rtcnt; i++)
+ {
+ signal_names[rtmin+i] = (char *)malloc(RTLEN);
+ if (signal_names[rtmin+i])
+ sprintf (signal_names[rtmin+i], "SIGRTMIN+%d", i);
+ signal_names[rtmax-i] = (char *)malloc(RTLEN);
+ if (signal_names[rtmax-i])
+ sprintf (signal_names[rtmax-i], "SIGRTMAX-%d", i);
+ }
+
+ if (rtcnt < RTLIM/2-1 && rtcnt != (rtmax-rtmin)/2)
+ {
+ /* Need an extra RTMIN signal */
+ signal_names[rtmin+rtcnt+1] = (char *)malloc(RTLEN);
+ if (signal_names[rtmin+rtcnt+1])
+ sprintf (signal_names[rtmin+rtcnt+1], "SIGRTMIN+%d", rtcnt+1);
+ }
+ }
+#endif /* SIGRTMIN && SIGRTMAX */
+
+#if defined (SIGLOST) /* resource lost (eg, record-lock lost) */
+ signal_names[SIGLOST] = "SIGLOST";
+#endif
+
+/* AIX */
+#if defined (SIGMSG) /* HFT input data pending */
+ signal_names[SIGMSG] = "SIGMSG";
+#endif
+
+#if defined (SIGDANGER) /* system crash imminent */
+ signal_names[SIGDANGER] = "SIGDANGER";
+#endif
+
+#if defined (SIGMIGRATE) /* migrate process to another CPU */
+ signal_names[SIGMIGRATE] = "SIGMIGRATE";
+#endif
+
+#if defined (SIGPRE) /* programming error */
+ signal_names[SIGPRE] = "SIGPRE";
+#endif
+
+#if defined (SIGVIRT) /* AIX virtual time alarm */
+ signal_names[SIGVIRT] = "SIGVIRT";
+#endif
+
+#if defined (SIGALRM1) /* m:n condition variables */
+ signal_names[SIGALRM1] = "SIGALRM1";
+#endif
+
+#if defined (SIGWAITING) /* m:n scheduling */
+ signal_names[SIGWAITING] = "SIGWAITING";
+#endif
+
+#if defined (SIGGRANT) /* HFT monitor mode granted */
+ signal_names[SIGGRANT] = "SIGGRANT";
+#endif
+
+#if defined (SIGKAP) /* keep alive poll from native keyboard */
+ signal_names[SIGKAP] = "SIGKAP";
+#endif
+
+#if defined (SIGRETRACT) /* HFT monitor mode retracted */
+ signal_names[SIGRETRACT] = "SIGRETRACT";
+#endif
+
+#if defined (SIGSOUND) /* HFT sound sequence has completed */
+ signal_names[SIGSOUND] = "SIGSOUND";
+#endif
+
+#if defined (SIGSAK) /* Secure Attention Key */
+ signal_names[SIGSAK] = "SIGSAK";
+#endif
+
+/* SunOS5 */
+#if defined (SIGLWP) /* special signal used by thread library */
+ signal_names[SIGLWP] = "SIGLWP";
+#endif
+
+#if defined (SIGFREEZE) /* special signal used by CPR */
+ signal_names[SIGFREEZE] = "SIGFREEZE";
+#endif
+
+#if defined (SIGTHAW) /* special signal used by CPR */
+ signal_names[SIGTHAW] = "SIGTHAW";
+#endif
+
+#if defined (SIGCANCEL) /* thread cancellation signal used by libthread */
+ signal_names[SIGCANCEL] = "SIGCANCEL";
+#endif
+
+#if defined (SIGXRES) /* resource control exceeded */
+ signal_names[SIGXRES] = "SIGXRES";
+#endif
+
+/* HP-UX */
+#if defined (SIGDIL) /* DIL signal (?) */
+ signal_names[SIGDIL] = "SIGDIL";
+#endif
+
+/* System V */
+#if defined (SIGCLD) /* Like SIGCHLD. */
+ signal_names[SIGCLD] = "SIGCLD";
+#endif
+
+#if defined (SIGPWR) /* power state indication */
+ signal_names[SIGPWR] = "SIGPWR";
+#endif
+
+#if defined (SIGPOLL) /* Pollable event (for streams) */
+ signal_names[SIGPOLL] = "SIGPOLL";
+#endif
+
+/* Unknown */
+#if defined (SIGWINDOW)
+ signal_names[SIGWINDOW] = "SIGWINDOW";
+#endif
+
+/* Linux */
+#if defined (SIGSTKFLT)
+ signal_names[SIGSTKFLT] = "SIGSTKFLT";
+#endif
+
+/* FreeBSD */
+#if defined (SIGTHR) /* thread interrupt */
+ signal_names[SIGTHR] = "SIGTHR";
+#endif
+
+/* Common */
+#if defined (SIGHUP) /* hangup */
+ signal_names[SIGHUP] = "SIGHUP";
+#endif
+
+#if defined (SIGINT) /* interrupt */
+ signal_names[SIGINT] = "SIGINT";
+#endif
+
+#if defined (SIGQUIT) /* quit */
+ signal_names[SIGQUIT] = "SIGQUIT";
+#endif
+
+#if defined (SIGILL) /* illegal instruction (not reset when caught) */
+ signal_names[SIGILL] = "SIGILL";
+#endif
+
+#if defined (SIGTRAP) /* trace trap (not reset when caught) */
+ signal_names[SIGTRAP] = "SIGTRAP";
+#endif
+
+#if defined (SIGIOT) /* IOT instruction */
+ signal_names[SIGIOT] = "SIGIOT";
+#endif
+
+#if defined (SIGABRT) /* Cause current process to dump core. */
+ signal_names[SIGABRT] = "SIGABRT";
+#endif
+
+#if defined (SIGEMT) /* EMT instruction */
+ signal_names[SIGEMT] = "SIGEMT";
+#endif
+
+#if defined (SIGFPE) /* floating point exception */
+ signal_names[SIGFPE] = "SIGFPE";
+#endif
+
+#if defined (SIGKILL) /* kill (cannot be caught or ignored) */
+ signal_names[SIGKILL] = "SIGKILL";
+#endif
+
+#if defined (SIGBUS) /* bus error */
+ signal_names[SIGBUS] = "SIGBUS";
+#endif
+
+#if defined (SIGSEGV) /* segmentation violation */
+ signal_names[SIGSEGV] = "SIGSEGV";
+#endif
+
+#if defined (SIGSYS) /* bad argument to system call */
+ signal_names[SIGSYS] = "SIGSYS";
+#endif
+
+#if defined (SIGPIPE) /* write on a pipe with no one to read it */
+ signal_names[SIGPIPE] = "SIGPIPE";
+#endif
+
+#if defined (SIGALRM) /* alarm clock */
+ signal_names[SIGALRM] = "SIGALRM";
+#endif
+
+#if defined (SIGTERM) /* software termination signal from kill */
+ signal_names[SIGTERM] = "SIGTERM";
+#endif
+
+#if defined (SIGURG) /* urgent condition on IO channel */
+ signal_names[SIGURG] = "SIGURG";
+#endif
+
+#if defined (SIGSTOP) /* sendable stop signal not from tty */
+ signal_names[SIGSTOP] = "SIGSTOP";
+#endif
+
+#if defined (SIGTSTP) /* stop signal from tty */
+ signal_names[SIGTSTP] = "SIGTSTP";
+#endif
+
+#if defined (SIGCONT) /* continue a stopped process */
+ signal_names[SIGCONT] = "SIGCONT";
+#endif
+
+#if defined (SIGCHLD) /* to parent on child stop or exit */
+ signal_names[SIGCHLD] = "SIGCHLD";
+#endif
+
+#if defined (SIGTTIN) /* to readers pgrp upon background tty read */
+ signal_names[SIGTTIN] = "SIGTTIN";
+#endif
+
+#if defined (SIGTTOU) /* like TTIN for output if (tp->t_local&LTOSTOP) */
+ signal_names[SIGTTOU] = "SIGTTOU";
+#endif
+
+#if defined (SIGIO) /* input/output possible signal */
+ signal_names[SIGIO] = "SIGIO";
+#endif
+
+#if defined (SIGXCPU) /* exceeded CPU time limit */
+ signal_names[SIGXCPU] = "SIGXCPU";
+#endif
+
+#if defined (SIGXFSZ) /* exceeded file size limit */
+ signal_names[SIGXFSZ] = "SIGXFSZ";
+#endif
+
+#if defined (SIGVTALRM) /* virtual time alarm */
+ signal_names[SIGVTALRM] = "SIGVTALRM";
+#endif
+
+#if defined (SIGPROF) /* profiling time alarm */
+ signal_names[SIGPROF] = "SIGPROF";
+#endif
+
+#if defined (SIGWINCH) /* window changed */
+ signal_names[SIGWINCH] = "SIGWINCH";
+#endif
+
+/* 4.4 BSD */
+#if defined (SIGINFO) && !defined (_SEQUENT_) /* information request */
+ signal_names[SIGINFO] = "SIGINFO";
+#endif
+
+#if defined (SIGUSR1) /* user defined signal 1 */
+ signal_names[SIGUSR1] = "SIGUSR1";
+#endif
+
+#if defined (SIGUSR2) /* user defined signal 2 */
+ signal_names[SIGUSR2] = "SIGUSR2";
+#endif
+
+#if defined (SIGKILLTHR) /* BeOS: Kill Thread */
+ signal_names[SIGKILLTHR] = "SIGKILLTHR";
+#endif
+
+ for (i = 0; i < NSIG; i++)
+ if (signal_names[i] == (char *)NULL)
+ {
+ signal_names[i] = (char *)malloc (18);
+ if (signal_names[i])
+ sprintf (signal_names[i], "SIGJUNK(%d)", i);
+ }
+
+ signal_names[NSIG] = "DEBUG";
+ signal_names[NSIG+1] = "ERR";
+ signal_names[NSIG+2] = "RETURN";
+}
diff --git a/support/texi2dvi b/support/texi2dvi
new file mode 100755
index 0000000..83c0842
--- /dev/null
+++ b/support/texi2dvi
@@ -0,0 +1,658 @@
+#! /bin/sh
+# texi2dvi --- produce DVI (or PDF) files from Texinfo (or LaTeX) sources.
+# $Id: texi2dvi,v 1.14 2003/02/05 00:42:33 karl Exp $
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2001,
+# 2002, 2003 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Original author: Noah Friedman <friedman@gnu.org>.
+#
+# Please send bug reports, etc. to bug-texinfo@gnu.org.
+# If possible, please send a copy of the output of the script called with
+# the `--debug' option when making a bug report.
+
+# This string is expanded by rcs automatically when this file is checked out.
+rcs_revision='$Revision: 1.14 $'
+rcs_version=`set - $rcs_revision; echo $2`
+program=`echo $0 | sed -e 's!.*/!!'`
+version="texi2dvi (GNU Texinfo 4.5) $rcs_version
+
+Copyright (C) 2003 Free Software Foundation, Inc.
+There is NO warranty. You may redistribute this software
+under the terms of the GNU General Public License.
+For more information about these matters, see the files named COPYING."
+
+usage="Usage: $program [OPTION]... FILE...
+
+Run each Texinfo or LaTeX FILE through TeX in turn until all
+cross-references are resolved, building all indices. The directory
+containing each FILE is searched for included files. The suffix of FILE
+is used to determine its language (LaTeX or Texinfo).
+
+Makeinfo is used to perform Texinfo macro expansion before running TeX
+when needed.
+
+Operation modes:
+ -b, --batch no interaction
+ -c, --clean remove all auxiliary files
+ -D, --debug turn on shell debugging (set -x)
+ -h, --help display this help and exit successfully
+ -o, --output=OFILE leave output in OFILE (implies --clean);
+ Only one input FILE may be specified in this case
+ -q, --quiet no output unless errors (implies --batch)
+ -s, --silent same as --quiet
+ -v, --version display version information and exit successfully
+ -V, --verbose report on what is done
+
+TeX tuning:
+ -@ use @input instead of \input; for preloaded Texinfo
+ -e, -E, --expand force macro expansion using makeinfo
+ -I DIR search DIR for Texinfo files
+ -l, --language=LANG specify the LANG of FILE (LaTeX or Texinfo)
+ -p, --pdf use pdftex or pdflatex for processing
+ -t, --texinfo=CMD insert CMD after @setfilename in copy of input file
+ multiple values accumulate
+
+The values of the BIBTEX, LATEX (or PDFLATEX), MAKEINDEX, MAKEINFO,
+TEX (or PDFTEX), and TEXINDEX environment variables are used to run
+those commands, if they are set.
+
+Email bug reports to <bug-texinfo@gnu.org>,
+general questions and discussion to <help-texinfo@gnu.org>.
+Texinfo home page: http://www.gnu.org/software/texinfo/"
+
+# Initialize variables for option overriding and otherwise.
+# Don't use `unset' since old bourne shells don't have this command.
+# Instead, assign them an empty value.
+batch=false # eval for batch mode
+clean=
+debug=
+escape='\'
+expand= # t for expansion via makeinfo
+miincludes= # makeinfo include path
+oformat=dvi
+oname= # --output
+quiet= # by default let the tools' message be displayed
+set_language=
+textra=
+tmpdir=${TMPDIR:-/tmp}/t2d$$ # avoid collisions on 8.3 filesystems.
+txincludes= # TEXINPUTS extensions, with trailing colon
+txiprereq=19990129 # minimum texinfo.tex version to have macro expansion
+verbose=false # echo for verbose mode
+
+orig_pwd=`pwd`
+
+# Systems which define $COMSPEC or $ComSpec use semicolons to separate
+# directories in TEXINPUTS.
+if test -n "$COMSPEC$ComSpec"; then
+ path_sep=";"
+else
+ path_sep=":"
+fi
+
+# Pacify verbose cds.
+CDPATH=${ZSH_VERSION+.}$path_sep
+
+# In case someone crazy insists on using grep -E.
+: ${EGREP=egrep}
+
+# Save this so we can construct a new TEXINPUTS path for each file.
+TEXINPUTS_orig="$TEXINPUTS"
+# Unfortunately makeindex does not read TEXINPUTS.
+INDEXSTYLE_orig="$INDEXSTYLE"
+export TEXINPUTS INDEXSTYLE
+
+# Push a token among the arguments that will be used to notice when we
+# ended options/arguments parsing.
+# Use "set dummy ...; shift" rather than 'set - ..." because on
+# Solaris set - turns off set -x (but keeps set -e).
+# Use ${1+"$@"} rather than "$@" because Digital Unix and Ultrix 4.3
+# still expand "$@" to a single argument (the empty string) rather
+# than nothing at all.
+arg_sep="$$--$$"
+set dummy ${1+"$@"} "$arg_sep"; shift
+
+#
+# Parse command line arguments.
+while test x"$1" != x"$arg_sep"; do
+
+ # Handle --option=value by splitting apart and putting back on argv.
+ case "$1" in
+ --*=*)
+ opt=`echo "$1" | sed -e 's/=.*//'`
+ val=`echo "$1" | sed -e 's/[^=]*=//'`
+ shift
+ set dummy "$opt" "$val" ${1+"$@"}; shift
+ ;;
+ esac
+
+ # This recognizes --quark as --quiet. So what.
+ case "$1" in
+ -@ ) escape=@;;
+ # Silently and without documentation accept -b and --b[atch] as synonyms.
+ -b | --b*) batch=eval;;
+ -q | -s | --q* | --s*) quiet=t; batch=eval;;
+ -c | --c*) clean=t;;
+ -D | --d*) debug=t;;
+ -e | -E | --e*) expand=t;;
+ -h | --h*) echo "$usage"; exit 0;;
+ -I | --I*)
+ shift
+ miincludes="$miincludes -I $1"
+ txincludes="$txincludes$1$path_sep"
+ ;;
+ -l | --l*) shift; set_language=$1;;
+ -o | --o*)
+ shift
+ clean=t
+ case "$1" in
+ /* | ?:/*) oname=$1;;
+ *) oname="$orig_pwd/$1";;
+ esac;;
+ -p | --p*) oformat=pdf;;
+ -t | --t*) shift; textra="$textra\\
+$1";;
+ -v | --vers*) echo "$version"; exit 0;;
+ -V | --verb*) verbose=echo;;
+ --) # What remains are not options.
+ shift
+ while test x"$1" != x"$arg_sep"; do
+ set dummy ${1+"$@"} "$1"; shift
+ shift
+ done
+ break;;
+ -*)
+ echo "$0: Unknown or ambiguous option \`$1'." >&2
+ echo "$0: Try \`--help' for more information." >&2
+ exit 1;;
+ *) set dummy ${1+"$@"} "$1"; shift;;
+ esac
+ shift
+done
+# Pop the token
+shift
+
+# Interpret remaining command line args as filenames.
+case $# in
+ 0)
+ echo "$0: Missing file arguments." >&2
+ echo "$0: Try \`--help' for more information." >&2
+ exit 2
+ ;;
+ 1) ;;
+ *)
+ if test -n "$oname"; then
+ echo "$0: Can't use option \`--output' with more than one argument." >&2
+ exit 2
+ fi
+ ;;
+esac
+
+# Prepare the temporary directory. Remove it at exit, unless debugging.
+if test -z "$debug"; then
+ trap "cd / && rm -rf $tmpdir" 0 1 2 15
+fi
+
+# Create the temporary directory with strict rights
+(umask 077 && mkdir $tmpdir) || exit 1
+
+# Prepare the tools we might need. This may be extra work in some
+# cases, but improves the readibility of the script.
+utildir=$tmpdir/utils
+mkdir $utildir || exit 1
+
+# A sed script that preprocesses Texinfo sources in order to keep the
+# iftex sections only. We want to remove non TeX sections, and
+# comment (with `@c texi2dvi') TeX sections so that makeinfo does not
+# try to parse them. Nevertheless, while commenting TeX sections,
+# don't comment @macro/@end macro so that makeinfo does propagate
+# them. Unfortunately makeinfo --iftex --no-ifhtml --no-ifinfo
+# doesn't work well enough (yet) to use that, so work around with sed.
+comment_iftex_sed=$utildir/comment.sed
+cat <<EOF >$comment_iftex_sed
+/^@tex/,/^@end tex/{
+ s/^/@c texi2dvi/
+}
+/^@iftex/,/^@end iftex/{
+ s/^/@c texi2dvi/
+ /^@c texi2dvi@macro/,/^@c texi2dvi@end macro/{
+ s/^@c texi2dvi//
+ }
+}
+/^@html/,/^@end html/{
+ s/^/@c (texi2dvi)/
+}
+/^@ifhtml/,/^@end ifhtml/{
+ s/^/@c (texi2dvi)/
+}
+/^@ifnottex/,/^@end ifnottex/{
+ s/^/@c (texi2dvi)/
+}
+/^@ifinfo/,/^@end ifinfo/{
+ /^@node/p
+ /^@menu/,/^@end menu/p
+ t
+ s/^/@c (texi2dvi)/
+}
+s/^@ifnotinfo/@c texi2dvi@ifnotinfo/
+s/^@end ifnotinfo/@c texi2dvi@end ifnotinfo/
+EOF
+# Uncommenting is simple: Remove any leading `@c texi2dvi'.
+uncomment_iftex_sed=$utildir/uncomment.sed
+cat <<EOF >$uncomment_iftex_sed
+s/^@c texi2dvi//
+EOF
+
+# A shell script that computes the list of xref files.
+# Takes the filename (without extension) of which we look for xref
+# files as argument. The index files must be reported last.
+get_xref_files=$utildir/get_xref.sh
+cat <<\EOF >$get_xref_files
+#! /bin/sh
+
+# Get list of xref files (indexes, tables and lists).
+# Find all files having root filename with a two-letter extension,
+# saves the ones that are really Texinfo-related files. .?o? catches
+# many files: .toc, .log, LaTeX tables and lists, FiXme's .lox, maybe more.
+for this_file in "$1".?o? "$1".aux "$1".?? "$1".idx; do
+ # If file is empty, skip it.
+ test -s "$this_file" || continue
+ # If the file is not suitable to be an index or xref file, don't
+ # process it. The file can't be if its first character is not a
+ # backslash or single quote.
+ first_character=`sed -n '1s/^\(.\).*$/\1/p;q' $this_file`
+ if test "x$first_character" = "x\\" \
+ || test "x$first_character" = "x'"; then
+ xref_files="$xref_files ./$this_file"
+ fi
+done
+echo "$xref_files"
+EOF
+chmod 500 $get_xref_files
+
+# File descriptor usage:
+# 0 standard input
+# 1 standard output (--verbose messages)
+# 2 standard error
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 5 tools output (turned off by --quiet)
+
+# Tools' output. If quiet, discard, else redirect to the message flow.
+if test "$quiet" = t; then
+ exec 5>/dev/null
+else
+ exec 5>&1
+fi
+
+# Enable tracing
+test "$debug" = t && set -x
+
+#
+# TeXify files.
+
+for command_line_filename in ${1+"$@"}; do
+ $verbose "Processing $command_line_filename ..."
+
+ # If the COMMAND_LINE_FILENAME is not absolute (e.g., --debug.tex),
+ # prepend `./' in order to avoid that the tools take it as an option.
+ echo "$command_line_filename" | $EGREP '^(/|[A-z]:/)' >/dev/null \
+ || command_line_filename="./$command_line_filename"
+
+ # See if the file exists. If it doesn't we're in trouble since, even
+ # though the user may be able to reenter a valid filename at the tex
+ # prompt (assuming they're attending the terminal), this script won't
+ # be able to find the right xref files and so forth.
+ if test ! -r "$command_line_filename"; then
+ echo "$0: Could not read $command_line_filename, skipping." >&2
+ continue
+ fi
+
+ # Get the name of the current directory. We want the full path
+ # because in clean mode we are in tmp, in which case a relative
+ # path has no meaning.
+ filename_dir=`echo $command_line_filename | sed 's!/[^/]*$!!;s!^$!.!'`
+ filename_dir=`cd "$filename_dir" >/dev/null && pwd`
+
+ # Strip directory part but leave extension.
+ filename_ext=`basename "$command_line_filename"`
+ # Strip extension.
+ filename_noext=`echo "$filename_ext" | sed 's/\.[^.]*$//'`
+ ext=`echo "$filename_ext" | sed 's/^.*\.//'`
+
+ # _src. Use same basename since we want to generate aux files with
+ # the same basename as the manual. If --expand, then output the
+ # macro-expanded file to here, else copy the original file.
+ tmpdir_src=$tmpdir/src
+ filename_src=$tmpdir_src/$filename_noext.$ext
+
+ # _xtr. The file with the user's extra commands.
+ tmpdir_xtr=$tmpdir/xtr
+ filename_xtr=$tmpdir_xtr/$filename_noext.$ext
+
+ # _bak. Copies of the previous xref files (another round is run if
+ # they differ from the new one).
+ tmpdir_bak=$tmpdir/bak
+
+ # Make all those directories and give up if we can't succeed.
+ mkdir $tmpdir_src $tmpdir_xtr $tmpdir_bak || exit 1
+
+ # Source file might include additional sources.
+ # We want `.:$orig_pwd' before anything else. (We'll add `.:' later
+ # after all other directories have been turned into absolute paths.)
+ # `.' goes first to ensure that any old .aux, .cps,
+ # etc. files in ${directory} don't get used in preference to fresher
+ # files in `.'. Include orig_pwd in case we are in clean mode, where
+ # we've cd'd to a temp directory.
+ common="$orig_pwd$path_sep$filename_dir$path_sep$txincludes"
+ TEXINPUTS="$common$TEXINPUTS_orig"
+ INDEXSTYLE="$common$INDEXSTYLE_orig"
+
+ # Convert relative paths to absolute paths, so we can run in another
+ # directory (e.g., in --clean mode, or during the macro-support
+ # detection.)
+ #
+ # Empty path components are meaningful to tex. We rewrite them
+ # as `EMPTY' so they don't get lost when we split on $path_sep.
+ TEXINPUTS=`echo $TEXINPUTS |sed 's/^:/EMPTY:/;s/:$/:EMPTY/;s/::/:EMPTY:/g'`
+ INDEXSTYLE=`echo $INDEXSTYLE |sed 's/^:/EMPTY:/;s/:$/:EMPTY/;s/::/:EMPTY:/g'`
+ save_IFS=$IFS
+ IFS=$path_sep
+ set x $TEXINPUTS; shift
+ TEXINPUTS=.
+ for dir
+ do
+ case $dir in
+ EMPTY)
+ TEXINPUTS=$TEXINPUTS$path_sep
+ ;;
+ [\\/]* | ?:[\\/]*) # Absolute paths don't need to be expansed.
+ TEXINPUTS=$TEXINPUTS$path_sep$dir
+ ;;
+ *)
+ abs=`cd "$dir" && pwd` && TEXINPUTS=$TEXINPUTS$path_sep$abs
+ ;;
+ esac
+ done
+ set x $INDEXSTYLE; shift
+ INDEXSTYLE=.
+ for dir
+ do
+ case $dir in
+ EMPTY)
+ INDEXSTYLE=$INDEXSTYLE$path_sep
+ ;;
+ [\\/]* | ?:[\\/]*) # Absolute paths don't need to be expansed.
+ INDEXSTYLE=$INDEXSTYLE$path_sep$dir
+ ;;
+ *)
+ abs=`cd "$dir" && pwd` && INDEXSTYLE=$INDEXSTYLE$path_sep$abs
+ ;;
+ esac
+ done
+ IFS=$save_IFS
+
+ # If the user explicitly specified the language, use that.
+ # Otherwise, if the first line is \input texinfo, assume it's texinfo.
+ # Otherwise, guess from the file extension.
+ if test -n "$set_language"; then
+ language=$set_language
+ elif sed 1q "$command_line_filename" | grep 'input texinfo' >/dev/null; then
+ language=texinfo
+ else
+ language=
+ fi
+
+ # Get the type of the file (latex or texinfo) from the given language
+ # we just guessed, or from the file extension if not set yet.
+ case ${language:-$filename_ext} in
+ [lL]a[tT]e[xX] | *.ltx | *.tex)
+ # Assume a LaTeX file. LaTeX needs bibtex and uses latex for
+ # compilation. No makeinfo.
+ bibtex=${BIBTEX:-bibtex}
+ makeinfo= # no point in running makeinfo on latex source.
+ texindex=${MAKEINDEX:-makeindex}
+ if test $oformat = dvi; then
+ tex=${LATEX:-latex}
+ else
+ tex=${PDFLATEX:-pdflatex}
+ fi
+ ;;
+
+ *)
+ # Assume a Texinfo file. Texinfo files need makeinfo, texindex and tex.
+ bibtex=
+ texindex=${TEXINDEX:-texindex}
+ if test $oformat = dvi; then
+ tex=${TEX:-tex}
+ else
+ tex=${PDFTEX:-pdftex}
+ fi
+ # Unless required by the user, makeinfo expansion is wanted only
+ # if texinfo.tex is too old.
+ if test "$expand" = t; then
+ makeinfo=${MAKEINFO:-makeinfo}
+ else
+ # Check if texinfo.tex performs macro expansion by looking for
+ # its version. The version is a date of the form YEAR-MO-DA.
+ # We don't need to use [0-9] to match the digits since anyway
+ # the comparison with $txiprereq, a number, will fail with non
+ # digits.
+ txiversion_tex=txiversion.tex
+ echo '\input texinfo.tex @bye' >$tmpdir/$txiversion_tex
+ # Run in the tmpdir to avoid leaving files.
+ eval `cd $tmpdir >/dev/null &&
+ $tex $txiversion_tex 2>/dev/null |
+ sed -n 's/^.*\[\(.*\)version \(....\)-\(..\)-\(..\).*$/txiformat=\1 txiversion="\2\3\4"/p'`
+ $verbose "texinfo.tex preloaded as \`$txiformat', version is \`$txiversion' ..."
+ if test "$txiprereq" -le "$txiversion" >/dev/null 2>&1; then
+ makeinfo=
+ else
+ makeinfo=${MAKEINFO:-makeinfo}
+ fi
+ # As long as we had to run TeX, offer the user this convenience
+ if test "$txiformat" = Texinfo; then
+ escape=@
+ fi
+ fi
+ ;;
+ esac
+
+ # Expand macro commands in the original source file using Makeinfo.
+ # Always use `end' footnote style, since the `separate' style
+ # generates different output (arguably this is a bug in -E).
+ # Discard main info output, the user asked to run TeX, not makeinfo.
+ if test -n "$makeinfo"; then
+ $verbose "Macro-expanding $command_line_filename to $filename_src ..."
+ sed -f $comment_iftex_sed "$command_line_filename" \
+ | $makeinfo --footnote-style=end -I "$filename_dir" $miincludes \
+ -o /dev/null --macro-expand=- \
+ | sed -f $uncomment_iftex_sed >"$filename_src"
+ filename_input=$filename_src
+ fi
+
+ # If makeinfo failed (or was not even run), use the original file as input.
+ if test $? -ne 0 \
+ || test ! -r "$filename_src"; then
+ $verbose "Reverting to $command_line_filename ..."
+ filename_input=$filename_dir/$filename_ext
+ fi
+
+ # Used most commonly for @finalout, @smallbook, etc.
+ if test -n "$textra"; then
+ $verbose "Inserting extra commands: $textra"
+ sed '/^@setfilename/a\
+'"$textra" "$filename_input" >$filename_xtr
+ filename_input=$filename_xtr
+ fi
+
+ # If clean mode was specified, then move to the temporary directory.
+ if test "$clean" = t; then
+ $verbose "cd $tmpdir_src"
+ cd "$tmpdir_src" || exit 1
+ fi
+
+ while :; do # will break out of loop below
+ orig_xref_files=`$get_xref_files "$filename_noext"`
+
+ # Save copies of originals for later comparison.
+ if test -n "$orig_xref_files"; then
+ $verbose "Backing up xref files: `echo $orig_xref_files | sed 's|\./||g'`"
+ cp $orig_xref_files $tmpdir_bak
+ fi
+
+ # Run bibtex on current file.
+ # - If its input (AUX) exists.
+ # - If AUX contains both `\bibdata' and `\bibstyle'.
+ # - If some citations are missing (LOG contains `Citation').
+ # or the LOG complains of a missing .bbl
+ #
+ # We run bibtex first, because I can see reasons for the indexes
+ # to change after bibtex is run, but I see no reason for the
+ # converse.
+ #
+ # Don't try to be too smart. Running bibtex only if the bbl file
+ # exists and is older than the LaTeX file is wrong, since the
+ # document might include files that have changed. Because there
+ # can be several AUX (if there are \include's), but a single LOG,
+ # looking for missing citations in LOG is easier, though we take
+ # the risk to match false messages.
+ if test -n "$bibtex" \
+ && test -r "$filename_noext.aux" \
+ && test -r "$filename_noext.log" \
+ && (grep '^\\bibdata[{]' "$filename_noext.aux" \
+ && grep '^\\bibstyle[{]' "$filename_noext.aux" \
+ && (grep 'Warning:.*Citation.*undefined' "$filename_noext.log" \
+ || grep 'No file .*\.bbl\.' "$filename_noext.log")) \
+ >/dev/null 2>&1; \
+ then
+ $verbose "Running $bibtex $filename_noext ..."
+ if $bibtex "$filename_noext" >&5; then :; else
+ echo "$0: $bibtex exited with bad status, quitting." >&2
+ exit 1
+ fi
+ fi
+
+ # What we'll run texindex on -- exclude non-index files.
+ # Since we know index files are last, it is correct to remove everything
+ # before .aux and .?o?. But don't really do <anything>o<anything>
+ # -- don't match whitespace as <anything>.
+ # Otherwise, if orig_xref_files contains something like
+ # foo.xo foo.whatever
+ # the space after the o will get matched.
+ index_files=`echo "$orig_xref_files" \
+ | sed "s!.*\.aux!!g;
+ s!./$filename_noext\.[^ ]o[^ ]!!g;
+ s/^[ ]*//;s/[ ]*$//"`
+ # Run texindex (or makeindex) on current index files. If they
+ # already exist, and after running TeX a first time the index
+ # files don't change, then there's no reason to run TeX again.
+ # But we won't know that if the index files are out of date or
+ # nonexistent.
+ if test -n "$texindex" && test -n "$index_files"; then
+ $verbose "Running $texindex $index_files ..."
+ if $texindex $index_files 2>&5 1>&2; then :; else
+ echo "$0: $texindex exited with bad status, quitting." >&2
+ exit 1
+ fi
+ fi
+
+ # Finally, run TeX.
+ # Prevent $ESCAPE from being interpreted by the shell if it happens
+ # to be `/'.
+ $batch tex_args="\\${escape}nonstopmode\ \\${escape}input"
+ cmd="$tex $tex_args $filename_input"
+ $verbose "Running $cmd ..."
+ if $cmd >&5; then :; else
+ echo "$0: $tex exited with bad status, quitting." >&2
+ echo "$0: see $filename_noext.log for errors." >&2
+ test "$clean" = t \
+ && cp "$filename_noext.log" "$orig_pwd"
+ exit 1
+ fi
+
+
+ # Decide if looping again is needed.
+ finished=t
+
+ # LaTeX (and the package changebar) report in the LOG file if it
+ # should be rerun. This is needed for files included from
+ # subdirs, since texi2dvi does not try to compare xref files in
+ # subdirs. Performing xref files test is still good since LaTeX
+ # does not report changes in xref files.
+ if grep "Rerun to get" "$filename_noext.log" >/dev/null 2>&1; then
+ finished=
+ fi
+
+ # Check if xref files changed.
+ new_xref_files=`$get_xref_files "$filename_noext"`
+ $verbose "Original xref files = `echo $orig_xref_files | sed 's|\./||g'`"
+ $verbose "New xref files = `echo $new_xref_files | sed 's|\./||g'`"
+
+ # If old and new lists don't at least have the same file list,
+ # then one file or another has definitely changed.
+ test "x$orig_xref_files" != "x$new_xref_files" && finished=
+
+ # File list is the same. We must compare each file until we find
+ # a difference.
+ if test -n "$finished"; then
+ for this_file in $new_xref_files; do
+ $verbose "Comparing xref file `echo $this_file | sed 's|\./||g'` ..."
+ # cmp -s returns nonzero exit status if files differ.
+ if cmp -s "$this_file" "$tmpdir_bak/$this_file"; then :; else
+ # We only need to keep comparing until we find one that
+ # differs, because we'll have to run texindex & tex again no
+ # matter how many more there might be.
+ finished=
+ $verbose "xref file `echo $this_file | sed 's|\./||g'` differed ..."
+ test "$debug" = t && diff -c "$tmpdir_bak/$this_file" "$this_file"
+ break
+ fi
+ done
+ fi
+
+ # If finished, exit the loop, else rerun the loop.
+ test -n "$finished" && break
+ done
+
+ # If we were in clean mode, compilation was in a tmp directory.
+ # Copy the DVI (or PDF) file into the directory where the compilation
+ # has been done. (The temp dir is about to get removed anyway.)
+ # We also return to the original directory so that
+ # - the next file is processed in correct conditions
+ # - the temporary file can be removed
+ if test -n "$clean"; then
+ if test -n "$oname"; then
+ dest=$oname
+ else
+ dest=$orig_pwd
+ fi
+ $verbose "Copying $oformat file from `pwd` to $dest"
+ cp -p "./$filename_noext.$oformat" "$dest"
+ cd / # in case $orig_pwd is on a different drive (for DOS)
+ cd $orig_pwd || exit 1
+ fi
+
+ # Remove temporary files.
+ if test "x$debug" = "x"; then
+ $verbose "Removing $tmpdir_src $tmpdir_xtr $tmpdir_bak ..."
+ cd /
+ rm -rf $tmpdir_src $tmpdir_xtr $tmpdir_bak
+ fi
+done
+
+$verbose "$0 done."
+exit 0 # exit successfully, not however we ended the loop.
diff --git a/support/texi2html b/support/texi2html
new file mode 100755
index 0000000..13b5588
--- /dev/null
+++ b/support/texi2html
@@ -0,0 +1,5428 @@
+#! /usr/bin/perl
+'di ';
+'ig 00 ';
+#+##############################################################################
+#
+# texi2html: Program to transform Texinfo documents to HTML
+#
+# Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+#-##############################################################################
+
+# This requires perl version 5 or higher
+require 5.0;
+
+#++##############################################################################
+#
+# NOTE FOR DEBUGGING THIS SCRIPT:
+# You can run 'perl texi2html.pl' directly, provided you have
+# the environment variable T2H_HOME set to the directory containing
+# the texi2html.init file
+#
+#--##############################################################################
+
+# CVS version:
+# $Id: texi2html.pl,v 1.55 2000/07/27 14:39:41 obachman Exp $
+
+# Homepage:
+$T2H_HOMEPAGE = <<EOT;
+http://www.mathematik.uni-kl.de/~obachman/Texi2html
+EOT
+
+# Authors:
+$T2H_AUTHORS = <<EOT;
+Written by: Lionel Cons <Lionel.Cons\@cern.ch> (original author)
+ Karl Berry <karl\@freefriends.org>
+ Olaf Bachmann <obachman\@mathematik.uni-kl.de>
+ and many others.
+Maintained by: Olaf Bachmann <obachman\@mathematik.uni-kl.de>
+Send bugs and suggestions to <texi2html\@mathematik.uni-kl.de>
+EOT
+
+# Version: set in configure.in
+$THISVERSION = '1.64';
+$THISPROG = "texi2html $THISVERSION"; # program name and version
+
+# The man page for this program is included at the end of this file and can be
+# viewed using the command 'nroff -man texi2html'.
+
+# Identity:
+
+$T2H_TODAY = &pretty_date; # like "20 September 1993"
+# the eval prevents this from breaking on system which do not have
+# a proper getpwuid implemented
+eval { ($T2H_USER = (getpwuid ($<))[6]) =~ s/,.*//;}; # Who am i
+
+#+++############################################################################
+# #
+# Initialization #
+# Pasted content of File $(srcdir)/texi2html.init: Default initializations #
+# #
+#---############################################################################
+
+# leave this within comments, and keep the require statement
+# This way, you can directly run texi2html.pl, if $ENV{T2H_HOME}/texi2html.init
+# exists.
+
+#
+# -*-perl-*-
+######################################################################
+# File: texi2html.init
+#
+# Sets default values for command-line arguments and for various customizable
+# procedures
+#
+# A copy of this file is pasted into the beginning of texi2html by
+# 'make texi2html'
+#
+# Copy this file and make changes to it, if you like.
+# Afterwards, either, load it with command-line option -init_file <your_init_file>
+#
+# $Id: texi2html.init,v 1.34 2000/07/27 14:09:02 obachman Exp $
+
+######################################################################
+# stuff which can also be set by command-line options
+#
+#
+# Note: values set here, overwrite values set by the command-line
+# options before -init_file and might still be overwritten by
+# command-line arguments following the -init_file option
+#
+
+# T2H_OPTIONS is a hash whose keys are the (long) names of valid
+# command-line options and whose values are a hash with the following keys:
+# type ==> one of !|=i|:i|=s|:s (see GetOpt::Long for more info)
+# linkage ==> ref to scalar, array, or subroutine (see GetOpt::Long for more info)
+# verbose ==> short description of option (displayed by -h)
+# noHelp ==> if 1 -> for "not so important options": only print description on -h 1
+# 2 -> for obsolete options: only print description on -h 2
+
+$T2H_DEBUG = 0;
+$T2H_OPTIONS -> {debug} =
+{
+ type => '=i',
+ linkage => \$main::T2H_DEBUG,
+ verbose => 'output HTML with debuging information',
+};
+
+$T2H_DOCTYPE = '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">';
+$T2H_OPTIONS -> {doctype} =
+{
+ type => '=s',
+ linkage => \$main::T2H_DOCTYPE,
+ verbose => 'document type which is output in header of HTML files',
+ noHelp => 1
+};
+
+$T2H_CHECK = 0;
+$T2H_OPTIONS -> {check} =
+{
+ type => '!',
+ linkage => \$main::T2H_CHECK,
+ verbose => 'if set, only check files and output all things that may be Texinfo commands',
+ noHelp => 1
+};
+
+# -expand
+# if set to "tex" (or, "info") expand @iftex and @tex (or, @ifinfo) sections
+# else, neither expand @iftex, @tex, nor @ifinfo sections
+$T2H_EXPAND = "info";
+$T2H_OPTIONS -> {expand} =
+{
+ type => '=s',
+ linkage => \$T2H_EXPAND,
+ verbose => 'Expand info|tex|none section of texinfo source',
+};
+
+# - glossary
+#if set, uses section named `Footnotes' for glossary
+$T2H_USE_GLOSSARY = 0;
+T2H_OPTIONS -> {glossary} =
+{
+ type => '!',
+ linkage => \$T2H_USE_GLOSSARY,
+ verbose => "if set, uses section named `Footnotes' for glossary",
+ noHelp => 1,
+};
+
+
+# -invisible
+# $T2H_INVISIBLE_MARK is the text used to create invisible destination
+# anchors for index links (you can for instance use the invisible.xbm
+# file shipped with this program). This is a workaround for a known
+# bug of many WWW browsers, including netscape.
+# For me, it works fine without it -- on the contrary: if there, it
+# inserts space between headers and start of text (obachman 3/99)
+$T2H_INVISIBLE_MARK = '';
+# $T2H_INVISIBLE_MARK = '&#160;';
+$T2H_OPTIONS -> {invisible} =
+{
+ type => '=s',
+ linkage => \$T2H_INVISIBLE_MARK,
+ verbose => 'use text in invisble anchot',
+ noHelp => 1,
+};
+
+# -iso
+# if set, ISO8879 characters are used for special symbols (like copyright, etc)
+$T2H_USE_ISO = 0;
+$T2H_OPTIONS -> {iso} =
+{
+ type => 'iso',
+ linkage => \$T2H_USE_ISO,
+ verbose => 'if set, ISO8879 characters are used for special symbols (like copyright, etc)',
+ noHelp => 1,
+};
+
+# -I
+# list directories where @include files are searched for (besides the
+# directory of the doc file) additional '-I' args add to this list
+@T2H_INCLUDE_DIRS = (".");
+$T2H_OPTIONS -> {I} =
+{
+ type => '=s',
+ linkage => \@T2H_INCLUDE_DIRS,
+ verbose => 'append $s to the @include search path',
+};
+
+# -top_file
+# uses file of this name for top-level file
+# extension is manipulated appropriately, if necessary.
+# If empty, <basename of document>.html is used
+# Typically, you would set this to "index.html".
+$T2H_TOP_FILE = '';
+$T2H_OPTIONS -> {top_file} =
+{
+ type => '=s',
+ linkage => \$T2H_TOP_FILE,
+ verbose => 'use $s as top file, instead of <docname>.html',
+};
+
+
+# -toc_file
+# uses file of this name for table of contents file
+# extension is manipulated appropriately, if necessary.
+# If empty, <basename of document>_toc.html is used
+$T2H_TOC_FILE = '';
+$T2H_OPTIONS -> {toc_file} =
+{
+ type => '=s',
+ linkage => \$T2H_TOC_FILE,
+ verbose => 'use $s as ToC file, instead of <docname>_toc.html',
+};
+
+# -frames
+# if set, output two additional files which use HTML 4.0 "frames".
+$T2H_FRAMES = 0;
+$T2H_OPTIONS -> {frames} =
+{
+ type => '!',
+ linkage => \$T2H_FRAMES,
+ verbose => 'output files which use HTML 4.0 frames (experimental)',
+ noHelp => 1,
+};
+
+
+# -menu | -nomenu
+# if set, show the Texinfo menus
+$T2H_SHOW_MENU = 1;
+$T2H_OPTIONS -> {menu} =
+{
+ type => '!',
+ linkage => \$T2H_SHOW_MENU,
+ verbose => 'ouput Texinfo menus',
+};
+
+# -number | -nonumber
+# if set, number sections and show section names and numbers in references
+# and menus
+$T2H_NUMBER_SECTIONS = 1;
+$T2H_OPTIONS -> {number} =
+{
+ type => '!',
+ linkage => \$T2H_NUMBER_SECTIONS,
+ verbose => 'use numbered sections'
+};
+
+# if set, and T2H_NUMBER_SECTIONS is set, then use node names in menu
+# entries, instead of section names
+$T2H_NODE_NAME_IN_MENU = 0;
+
+# if set and menu entry equals menu descr, then do not print menu descr.
+# Likewise, if node name equals entry name, do not print entry name.
+$T2H_AVOID_MENU_REDUNDANCY = 1;
+
+# -split section|chapter|none
+# if set to 'section' (resp. 'chapter') create one html file per (sub)section
+# (resp. chapter) and separate pages for Top, ToC, Overview, Index,
+# Glossary, About.
+# otherwise, create monolithic html file which contains whole document
+#$T2H_SPLIT = 'section';
+$T2H_SPLIT = '';
+$T2H_OPTIONS -> {split} =
+{
+ type => '=s',
+ linkage => \$T2H_SPLIT,
+ verbose => 'split document on section|chapter else no splitting',
+};
+
+# -section_navigation|-no-section_navigation
+# if set, then navigation panels are printed at the beginning of each section
+# and, possibly at the end (depending on whether or not there were more than
+# $T2H_WORDS_IN_PAGE words on page
+# This is most useful if you do not want to have section navigation
+# on -split chapter
+$T2H_SECTION_NAVIGATION = 1;
+$T2H_OPTIONS -> {sec_nav} =
+{
+ type => '!',
+ linkage => \$T2H_SECTION_NAVIGATION,
+ verbose => 'output navigation panels for each section',
+};
+
+# -subdir
+# if set put result files in this directory
+# if not set result files are put into current directory
+#$T2H_SUBDIR = 'html';
+$T2H_SUBDIR = '';
+$T2H_OPTIONS -> {subdir} =
+{
+ type => '=s',
+ linkage => \$T2H_SUBDIR,
+ verbose => 'put HTML files in directory $s, instead of $cwd',
+};
+
+# -short_extn
+# If this is set all HTML file will have extension ".htm" instead of
+# ".html". This is helpful when shipping the document to PC systems.
+$T2H_SHORTEXTN = 0;
+$T2H_OPTIONS -> {short_ext} =
+{
+ type => '!',
+ linkage => \$T2H_SHORTEXTN,
+ verbose => 'use "htm" extension for output HTML files',
+};
+
+
+# -prefix
+# Set the output file prefix, prepended to all .html, .gif and .pl files.
+# By default, this is the basename of the document
+$T2H_PREFIX = '';
+$T2H_OPTIONS -> {prefix} =
+{
+ type => '=s',
+ linkage => \$T2H_PREFIX,
+ verbose => 'use as prefix for output files, instead of <docname>',
+};
+
+# -o filename
+# If set, generate monolithic document output html into $filename
+$T2H_OUT = '';
+$T2H_OPTIONS -> {out_file} =
+{
+ type => '=s',
+ linkage => sub {$main::T2H_OUT = @_[1]; $T2H_SPLIT = '';},
+ verbose => 'if set, all HTML output goes into file $s',
+};
+
+# -short_ref
+#if set cross-references are given without section numbers
+$T2H_SHORT_REF = '';
+$T2H_OPTIONS -> {short_ref} =
+{
+ type => '!',
+ linkage => \$T2H_SHORT_REF,
+ verbose => 'if set, references are without section numbers',
+};
+
+# -idx_sum
+# if value is set, then for each @prinindex $what
+# $docu_name_$what.idx is created which contains lines of the form
+# $key\t$ref sorted alphabetically (case matters)
+$T2H_IDX_SUMMARY = 0;
+$T2H_OPTIONS -> {idx_sum} =
+{
+ type => '!',
+ linkage => \$T2H_IDX_SUMMARY,
+ verbose => 'if set, also output index summary',
+ noHelp => 1,
+};
+
+# -verbose
+# if set, chatter about what we are doing
+$T2H_VERBOSE = '';
+$T2H_OPTIONS -> {Verbose} =
+{
+ type => '!',
+ linkage => \$T2H_VERBOSE,
+ verbose => 'print progress info to stdout',
+};
+
+# -lang
+# For page titles use $T2H_WORDS->{$T2H_LANG}->{...} as title.
+# To add a new language, supply list of titles (see $T2H_WORDS below).
+# and use ISO 639 language codes (see e.g. perl module Locale-Codes-1.02
+# for definitions)
+# Default's to 'en' if not set or no @documentlanguage is specified
+$T2H_LANG = '';
+$T2H_OPTIONS -> {lang} =
+{
+ type => '=s',
+ linkage => sub {SetDocumentLanguage($_[1])},
+ verbose => 'use $s as document language (ISO 639 encoding)',
+};
+
+# -l2h
+# if set, uses latex2html for generation of math content
+$T2H_L2H = '';
+$T2H_OPTIONS -> {l2h} =
+{
+ type => '!',
+ linkage => \$T2H_L2H,
+ verbose => 'if set, uses latex2html for @math and @tex',
+};
+
+######################
+# The following options are only relevant if $T2H_L2H is set
+#
+# -l2h_l2h
+# name/location of latex2html progam
+$T2H_L2H_L2H = "latex2html";
+$T2H_OPTIONS -> {l2h_l2h} =
+{
+ type => '=s',
+ linkage => \$T2H_L2H_L2H,
+ verbose => 'program to use for latex2html translation',
+ noHelp => 1,
+};
+
+# -l2h_skip
+# if set, skips actual call to latex2html tries to reuse previously generated
+# content, instead
+$T2H_L2H_SKIP = '';
+$T2H_OPTIONS -> {l2h_skip} =
+{
+ type => '!',
+ linkage => \$T2H_L2H_SKIP,
+ verbose => 'if set, tries to reuse previously latex2html output',
+ noHelp => 1,
+};
+
+# -l2h_tmp
+# if set, l2h uses this directory for temporarary files. The path
+# leading to this directory may not contain a dot (i.e., a "."),
+# otherwise, l2h will fail
+$T2H_L2H_TMP = '';
+$T2H_OPTIONS -> {l2h_tmp} =
+{
+ type => '=s',
+ linkage => \$T2H_L2H_TMP,
+ verbose => 'if set, uses $s as temporary latex2html directory',
+ noHelp => 1,
+};
+
+# if set, cleans intermediate files (they all have the prefix $doc_l2h_)
+# of l2h
+$T2H_L2H_CLEAN = 1;
+$T2H_OPTIONS -> {l2h_clean} =
+{
+ type => '!',
+ linkage => \$T2H_L2H_CLEAN,
+ verbose => 'if set, do not keep intermediate latex2html files for later reuse',
+ noHelp => 1,
+};
+
+$T2H_OPTIONS -> {D} =
+{
+ type => '=s',
+ linkage => sub {$main::value{@_[1]} = 1;},
+ verbose => 'equivalent to Texinfo "@set $s 1"',
+ noHelp => 1,
+};
+
+$T2H_OPTIONS -> {init_file} =
+{
+ type => '=s',
+ linkage => \&LoadInitFile,
+ verbose => 'load init file $s'
+};
+
+
+##############################################################################
+#
+# The following can only be set in the init file
+#
+##############################################################################
+
+# if set, center @image by default
+# otherwise, do not center by default
+$T2H_CENTER_IMAGE = 1;
+
+# used as identation for block enclosing command @example, etc
+# If not empty, must be enclosed in <td></td>
+$T2H_EXAMPLE_INDENT_CELL = '<td>&nbsp;</td>';
+# same as above, only for @small
+$T2H_SMALL_EXAMPLE_INDENT_CELL = '<td>&nbsp;</td>';
+# font size for @small
+$T2H_SMALL_FONT_SIZE = '-1';
+
+# if non-empty, and no @..heading appeared in Top node, then
+# use this as header for top node/section, otherwise use value of
+# @settitle or @shorttitle (in that order)
+$T2H_TOP_HEADING = '';
+
+# if set, use this chapter for 'Index' button, else
+# use first chapter whose name matches 'index' (case insensitive)
+$T2H_INDEX_CHAPTER = '';
+
+# if set and $T2H_SPLIT is set, then split index pages at the next letter
+# after they have more than that many entries
+$T2H_SPLIT_INDEX = 100;
+
+# if set (e.g., to index.html) replace hrefs to this file
+# (i.e., to index.html) by ./
+$T2H_HREF_DIR_INSTEAD_FILE = '';
+
+########################################################################
+# Language dependencies:
+# To add a new language extend T2H_WORDS hash and create $T2H_<...>_WORDS hash
+# To redefine one word, simply do:
+# $T2H_WORDS->{<language>}->{<word>} = 'whatever' in your personal init file.
+#
+$T2H_WORDS_EN =
+{
+ # titles of pages
+ 'ToC_Title' => 'Table of Contents',
+ 'Overview_Title' => 'Short Table of Contents',
+ 'Index_Title' => 'Index',
+ 'About_Title' => 'About this document',
+ 'Footnotes_Title' => 'Footnotes',
+ 'See' => 'See',
+ 'see' => 'see',
+ 'section' => 'section',
+# If necessary, we could extend this as follows:
+# # text for buttons
+# 'Top_Button' => 'Top',
+# 'ToC_Button' => 'Contents',
+# 'Overview_Button' => 'Overview',
+# 'Index_button' => 'Index',
+# 'Back_Button' => 'Back',
+# 'FastBack_Button' => 'FastBack',
+# 'Prev_Button' => 'Prev',
+# 'Up_Button' => 'Up',
+# 'Next_Button' => 'Next',
+# 'Forward_Button' =>'Forward',
+# 'FastWorward_Button' => 'FastForward',
+# 'First_Button' => 'First',
+# 'Last_Button' => 'Last',
+# 'About_Button' => 'About'
+};
+
+$T2H_WORD_DE =
+{
+ 'ToC_Title' => 'Inhaltsverzeichniss',
+ 'Overview_Title' => 'Kurzes Inhaltsverzeichniss',
+ 'Index_Title' => 'Index',
+ 'About_Title' => '&Uuml;ber dieses Dokument',
+ 'Footnotes_Title' => 'Fu&szlig;noten',
+ 'See' => 'Siehe',
+ 'see' => 'siehe',
+ 'section' => 'Abschnitt',
+};
+
+$T2H_WORD_NL =
+{
+ 'ToC_Title' => 'Inhoudsopgave',
+ 'Overview_Title' => 'Korte inhoudsopgave',
+ 'Index_Title' => 'Index', #Not sure ;-)
+ 'About_Title' => 'No translation available!', #No translation available!
+ 'Footnotes_Title' => 'No translation available!', #No translation available!
+ 'See' => 'Zie',
+ 'see' => 'zie',
+ 'section' => 'sectie',
+};
+
+$T2H_WORD_ES =
+{
+ 'ToC_Title' => '&iacute;ndice General',
+ 'Overview_Title' => 'Resumen del Contenido',
+ 'Index_Title' => 'Index', #Not sure ;-)
+ 'About_Title' => 'No translation available!', #No translation available!
+ 'Footnotes_Title' => 'Fu&szlig;noten',
+ 'See' => 'V&eacute;ase',
+ 'see' => 'v&eacute;ase',
+ 'section' => 'secci&oacute;n',
+};
+
+$T2H_WORD_NO =
+{
+ 'ToC_Title' => 'Innholdsfortegnelse',
+ 'Overview_Title' => 'Kort innholdsfortegnelse',
+ 'Index_Title' => 'Indeks', #Not sure ;-)
+ 'About_Title' => 'No translation available!', #No translation available!
+ 'Footnotes_Title' => 'No translation available!',
+ 'See' => 'Se',
+ 'see' => 'se',
+ 'section' => 'avsnitt',
+};
+
+$T2H_WORD_PT =
+{
+ 'ToC_Title' => 'Sum&aacute;rio',
+ 'Overview_Title' => 'Breve Sum&aacute;rio',
+ 'Index_Title' => '&Iacute;ndice', #Not sure ;-)
+ 'About_Title' => 'No translation available!', #No translation available!
+ 'Footnotes_Title' => 'No translation available!',
+ 'See' => 'Veja',
+ 'see' => 'veja',
+ 'section' => 'Se&ccedil;&atilde;o',
+};
+
+$T2H_WORDS =
+{
+ 'en' => $T2H_WORDS_EN,
+ 'de' => $T2H_WORDS_DE,
+ 'nl' => $T2H_WORDS_NL,
+ 'es' => $T2H_WORDS_ES,
+ 'no' => $T2H_WORDS_NO,
+ 'pt' => $T2H_WORDS_PT
+};
+
+@MONTH_NAMES_EN =
+(
+ 'January', 'February', 'March', 'April', 'May',
+ 'June', 'July', 'August', 'September', 'October',
+ 'November', 'December'
+);
+
+@MONTH_NAMES_DE =
+(
+ 'Januar', 'Februar', 'M&auml;rz', 'April', 'Mai',
+ 'Juni', 'Juli', 'August', 'September', 'Oktober',
+ 'November', 'Dezember'
+);
+
+@MONTH_NAMES_NL =
+(
+ 'Januari', 'Februari', 'Maart', 'April', 'Mei',
+ 'Juni', 'Juli', 'Augustus', 'September', 'Oktober',
+ 'November', 'December'
+);
+
+@MONTH_NAMES_ES =
+(
+ 'enero', 'febrero', 'marzo', 'abril', 'mayo',
+ 'junio', 'julio', 'agosto', 'septiembre', 'octubre',
+ 'noviembre', 'diciembre'
+);
+
+@MONTH_NAMES_NO =
+(
+
+ 'januar', 'februar', 'mars', 'april', 'mai',
+ 'juni', 'juli', 'august', 'september', 'oktober',
+ 'november', 'desember'
+);
+
+@MONTH_NAMES_PT =
+(
+ 'Janeiro', 'Fevereiro', 'Mar&ccedil;o', 'Abril', 'Maio',
+ 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro',
+ 'Novembro', 'Dezembro'
+);
+
+
+$MONTH_NAMES =
+{
+ 'en' => \@MONTH_NAMES_EN,
+ 'de' => \@MONTH_NAMES_DE,
+ 'es' => \@MONTH_NAMES_ES,
+ 'nl' => \@MONTH_NAMES_NL,
+ 'no' => \@MONTH_NAMES_NO,
+ 'pt' => \@MONTH_NAMES_PT
+};
+########################################################################
+# Control of Page layout:
+# You can make changes of the Page layout at two levels:
+# 1.) For small changes, it is often enough to change the value of
+# some global string/hash/array variables
+# 2.) For larger changes, reimplement one of the T2H_DEFAULT_<fnc>* routines,
+# give them another name, and assign them to the respective
+# $T2H_<fnc> variable.
+
+# As a general interface, the hashes T2H_HREF, T2H_NAME, T2H_NODE hold
+# href, html-name, node-name of
+# This -- current section (resp. html page)
+# Top -- top page ($T2H_TOP_FILE)
+# Contents -- Table of contents
+# Overview -- Short table of contents
+# Index -- Index page
+# About -- page which explain "navigation buttons"
+# First -- first node
+# Last -- last node
+#
+# Whether or not the following hash values are set, depends on the context
+# (all values are w.r.t. 'This' section)
+# Next -- next node of texinfo
+# Prev -- previous node of texinfo
+# Up -- up node of texinfo
+# Forward -- next node in reading order
+# Back -- previous node in reading order
+# FastForward -- if leave node, up and next, else next node
+# FastBackward-- if leave node, up and prev, else prev node
+#
+# Furthermore, the following global variabels are set:
+# $T2H_THISDOC{title} -- title as set by @setttile
+# $T2H_THISDOC{fulltitle} -- full title as set by @title...
+# $T2H_THISDOC{subtitle} -- subtitle as set by @subtitle
+# $T2H_THISDOC{author} -- author as set by @author
+#
+# and pointer to arrays of lines which need to be printed by t2h_print_lines
+# $T2H_OVERVIEW -- lines of short table of contents
+# $T2H_TOC -- lines of table of contents
+# $T2H_TOP -- lines of Top texinfo node
+# $T2H_THIS_SECTION -- lines of 'This' section
+
+#
+# There are the following subs which control the layout:
+#
+$T2H_print_section = \&T2H_DEFAULT_print_section;
+$T2H_print_Top_header = \&T2H_DEFAULT_print_Top_header;
+$T2H_print_Top_footer = \&T2H_DEFAULT_print_Top_footer;
+$T2H_print_Top = \&T2H_DEFAULT_print_Top;
+$T2H_print_Toc = \&T2H_DEFAULT_print_Toc;
+$T2H_print_Overview = \&T2H_DEFAULT_print_Overview;
+$T2H_print_Footnotes = \&T2H_DEFAULT_print_Footnotes;
+$T2H_print_About = \&T2H_DEFAULT_print_About;
+$T2H_print_misc_header = \&T2H_DEFAULT_print_misc_header;
+$T2H_print_misc_footer = \&T2H_DEFAULT_print_misc_footer;
+$T2H_print_misc = \&T2H_DEFAULT_print_misc;
+$T2H_print_chapter_header = \&T2H_DEFAULT_print_chapter_header;
+$T2H_print_chapter_footer = \&T2H_DEFAULT_print_chapter_footer;
+$T2H_print_page_head = \&T2H_DEFAULT_print_page_head;
+$T2H_print_page_foot = \&T2H_DEFAULT_print_page_foot;
+$T2H_print_head_navigation = \&T2H_DEFAULT_print_head_navigation;
+$T2H_print_foot_navigation = \&T2H_DEFAULT_print_foot_navigation;
+$T2H_button_icon_img = \&T2H_DEFAULT_button_icon_img;
+$T2H_print_navigation = \&T2H_DEFAULT_print_navigation;
+$T2H_about_body = \&T2H_DEFAULT_about_body;
+$T2H_print_frame = \&T2H_DEFAULT_print_frame;
+$T2H_print_toc_frame = \&T2H_DEFAULT_print_toc_frame;
+
+########################################################################
+# Layout for html for every sections
+#
+sub T2H_DEFAULT_print_section
+{
+ my $fh = shift;
+ local $T2H_BUTTONS = \@T2H_SECTION_BUTTONS;
+ &$T2H_print_head_navigation($fh) if $T2H_SECTION_NAVIGATION;
+ my $nw = t2h_print_lines($fh);
+ if ($T2H_SPLIT eq 'section' && $T2H_SECTION_NAVIGATION)
+ {
+ &$T2H_print_foot_navigation($fh, $nw);
+ }
+ else
+ {
+ print $fh '<HR SIZE="6">' . "\n";
+ }
+}
+
+###################################################################
+# Layout of top-page I recommend that you use @ifnothtml, @ifhtml,
+# @html within the Top texinfo node to specify content of top-level
+# page.
+#
+# If you enclose everything in @ifnothtml, then title, subtitle,
+# author and overview is printed
+# T2H_HREF of Next, Prev, Up, Forward, Back are not defined
+# if $T2H_SPLIT then Top page is in its own html file
+sub T2H_DEFAULT_print_Top_header
+{
+ &$T2H_print_page_head(@_) if $T2H_SPLIT;
+ t2h_print_label(@_); # this needs to be called, otherwise no label set
+ &$T2H_print_head_navigation(@_);
+}
+sub T2H_DEFAULT_print_Top_footer
+{
+ &$T2H_print_foot_navigation(@_);
+ &$T2H_print_page_foot(@_) if $T2H_SPLIT;
+}
+sub T2H_DEFAULT_print_Top
+{
+ my $fh = shift;
+
+ # for redefining navigation buttons use:
+ # local $T2H_BUTTONS = [...];
+ # as it is, 'Top', 'Contents', 'Index', 'About' are printed
+ local $T2H_BUTTONS = \@T2H_MISC_BUTTONS;
+ &$T2H_print_Top_header($fh);
+ if ($T2H_THIS_SECTION)
+ {
+ # if top-level node has content, then print it with extra header
+ print $fh "<H1>$T2H_NAME{Top}</H1>"
+ unless ($T2H_HAS_TOP_HEADING);
+ t2h_print_lines($fh, $T2H_THIS_SECTION)
+ }
+ else
+ {
+ # top-level node is fully enclosed in @ifnothtml
+ # print fulltitle, subtitle, author, Overview
+ print $fh
+ "<CENTER>\n<H1>" .
+ join("</H1>\n<H1>", split(/\n/, $T2H_THISDOC{fulltitle})) .
+ "</H1>\n";
+ print $fh "<H2>$T2H_THISDOC{subtitle}</H2>\n" if $T2H_THISDOC{subtitle};
+ print $fh "$T2H_THISDOC{author}\n" if $T2H_THISDOC{author};
+ print $fh <<EOT;
+</CENTER>
+<HR>
+<P></P>
+<H2> Overview: </H2>
+<BLOCKQUOTE>
+EOT
+ t2h_print_lines($fh, $T2H_OVERVIEW);
+ print $fh "</BLOCKQUOTE>\n";
+ }
+ &$T2H_print_Top_footer($fh);
+}
+
+###################################################################
+# Layout of Toc, Overview, and Footnotes pages
+# By default, we use "normal" layout
+# T2H_HREF of Next, Prev, Up, Forward, Back, etc are not defined
+# use: local $T2H_BUTTONS = [...] to redefine navigation buttons
+sub T2H_DEFAULT_print_Toc
+{
+ return &$T2H_print_misc(@_);
+}
+sub T2H_DEFAULT_print_Overview
+{
+ return &$T2H_print_misc(@_);
+}
+sub T2H_DEFAULT_print_Footnotes
+{
+ return &$T2H_print_misc(@_);
+}
+sub T2H_DEFAULT_print_About
+{
+ return &$T2H_print_misc(@_);
+}
+
+sub T2H_DEFAULT_print_misc_header
+{
+ &$T2H_print_page_head(@_) if $T2H_SPLIT;
+ # this needs to be called, otherwise, no labels are set
+ t2h_print_label(@_);
+ &$T2H_print_head_navigation(@_);
+}
+sub T2H_DEFAULT_print_misc_footer
+{
+ &$T2H_print_foot_navigation(@_);
+ &$T2H_print_page_foot(@_) if $T2H_SPLIT;
+}
+sub T2H_DEFAULT_print_misc
+{
+ my $fh = shift;
+ local $T2H_BUTTONS = \@T2H_MISC_BUTTONS;
+ &$T2H_print_misc_header($fh);
+ print $fh "<H1>$T2H_NAME{This}</H1>\n";
+ t2h_print_lines($fh);
+ &$T2H_print_misc_footer($fh);
+}
+
+###################################################################
+# chapter_header and chapter_footer are only called if
+# T2H_SPLIT eq 'chapter'
+# chapter_header: after print_page_header, before print_section
+# chapter_footer: after print_section of last section, before print_page_footer
+#
+# If you want to get rid of navigation stuff after each section,
+# redefine print_section such that it does not call print_navigation,
+# and put print_navigation into print_chapter_header
+@T2H_CHAPTER_BUTTONS =
+ (
+ 'FastBack', 'FastForward', ' ',
+ ' ', ' ', ' ', ' ',
+ 'Top', 'Contents', 'Index', 'About',
+ );
+
+sub T2H_DEFAULT_print_chapter_header
+{
+ # nothing to do there, by default
+ if (! $T2H_SECTION_NAVIGATION)
+ {
+ my $fh = shift;
+ local $T2H_BUTTONS = \@T2H_CHAPTER_BUTTONS;
+ &$T2H_print_navigation($fh);
+ print $fh "\n<HR SIZE=2>\n";
+ }
+}
+
+sub T2H_DEFAULT_print_chapter_footer
+{
+ local $T2H_BUTTONS = \@T2H_CHAPTER_BUTTONS;
+ &$T2H_print_navigation(@_);
+}
+###################################################################
+$T2H_TODAY = &pretty_date; # like "20 September 1993"
+
+sub pretty_date {
+ local($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst);
+
+ ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
+ $year += ($year < 70) ? 2000 : 1900;
+ # obachman: Let's do it as the Americans do
+ return($MONTH_NAMES->{$T2H_LANG}[$mon] . ", " . $mday . " " . $year);
+}
+
+
+###################################################################
+# Layout of standard header and footer
+#
+
+# Set the default body text, inserted between <BODY ... >
+###$T2H_BODYTEXT = 'LANG="EN" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"';
+$T2H_BODYTEXT = 'LANG="' . $T2H_LANG . '" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080" ALINK="#FF0000"';
+# text inserted after <BODY ...>
+$T2H_AFTER_BODY_OPEN = '';
+#text inserted before </BODY>
+$T2H_PRE_BODY_CLOSE = '';
+# this is used in footer
+$T2H_ADDRESS = "by <I>$T2H_USER</I> " if $T2H_USER;
+$T2H_ADDRESS .= "on <I>$T2H_TODAY</I>";
+# this is added inside <HEAD></HEAD> after <TITLE> and some META NAME stuff
+# can be used for <style> <script>, <meta> tags
+$T2H_EXTRA_HEAD = '';
+
+sub T2H_DEFAULT_print_page_head
+{
+ my $fh = shift;
+ my $longtitle = "$T2H_THISDOC{title}: $T2H_NAME{This}";
+ print $fh <<EOT;
+<HTML>
+$T2H_DOCTYPE
+<!-- Created on $T2H_TODAY by $THISPROG -->
+<!--
+$T2H_AUTHORS
+-->
+<HEAD>
+<TITLE>$longtitle</TITLE>
+
+<META NAME="description" CONTENT="$longtitle">
+<META NAME="keywords" CONTENT="$longtitle">
+<META NAME="resource-type" CONTENT="document">
+<META NAME="distribution" CONTENT="global">
+<META NAME="Generator" CONTENT="$THISPROG">
+$T2H_EXTRA_HEAD
+</HEAD>
+
+<BODY $T2H_BODYTEXT>
+$T2H_AFTER_BODY_OPEN
+EOT
+}
+
+sub T2H_DEFAULT_print_page_foot
+{
+ my $fh = shift;
+ print $fh <<EOT;
+<BR>
+<FONT SIZE="-1">
+This document was generated
+$T2H_ADDRESS
+using <A HREF="$T2H_HOMEPAGE"><I>texi2html</I></A>
+$T2H_PRE_BODY_CLOSE
+</BODY>
+</HTML>
+EOT
+}
+
+###################################################################
+# Layout of navigation panel
+
+# if this is set, then a vertical navigation panel is used
+$T2H_VERTICAL_HEAD_NAVIGATION = 0;
+sub T2H_DEFAULT_print_head_navigation
+{
+ my $fh = shift;
+ if ($T2H_VERTICAL_HEAD_NAVIGATION)
+ {
+ print $fh <<EOT;
+<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0">
+<TR VALIGN="TOP">
+<TD ALIGN="LEFT">
+EOT
+ }
+ &$T2H_print_navigation($fh, $T2H_VERTICAL_HEAD_NAVIGATION);
+ if ($T2H_VERTICAL_HEAD_NAVIGATION)
+ {
+ print $fh <<EOT;
+</TD>
+<TD ALIGN="LEFT">
+EOT
+ }
+ elsif ($T2H_SPLIT eq 'section')
+ {
+ print $fh "<HR SIZE=1>\n";
+ }
+}
+
+# Specifies the minimum page length required before a navigation panel
+# is placed at the bottom of a page (the default is that of latex2html)
+# T2H_THIS_WORDS_IN_PAGE holds number of words of current page
+$T2H_WORDS_IN_PAGE = 300;
+sub T2H_DEFAULT_print_foot_navigation
+{
+ my $fh = shift;
+ my $nwords = shift;
+ if ($T2H_VERTICAL_HEAD_NAVIGATION)
+ {
+ print $fh <<EOT;
+</TD>
+</TR>
+</TABLE>
+EOT
+ }
+ print $fh "<HR SIZE=1>\n";
+ &$T2H_print_navigation($fh) if ($nwords >= $T2H_WORDS_IN_PAGE)
+}
+
+######################################################################
+# navigation panel
+#
+# specify in this array which "buttons" should appear in which order
+# in the navigation panel for sections; use ' ' for empty buttons (space)
+@T2H_SECTION_BUTTONS =
+ (
+ 'Back', 'Forward', ' ', 'FastBack', 'Up', 'FastForward',
+ ' ', ' ', ' ', ' ',
+ 'Top', 'Contents', 'Index', 'About',
+ );
+
+# buttons for misc stuff
+@T2H_MISC_BUTTONS = ('Top', 'Contents', 'Index', 'About');
+
+# insert here name of icon images for buttons
+# Icons are used, if $T2H_ICONS and resp. value are set
+%T2H_ACTIVE_ICONS =
+ (
+ 'Top', '',
+ 'Contents', '',
+ 'Overview', '',
+ 'Index', '',
+ 'Back', '',
+ 'FastBack', '',
+ 'Prev', '',
+ 'Up', '',
+ 'Next', '',
+ 'Forward', '',
+ 'FastForward', '',
+ 'About' , '',
+ 'First', '',
+ 'Last', '',
+ ' ', ''
+ );
+
+# insert here name of icon images for these, if button is inactive
+%T2H_PASSIVE_ICONS =
+ (
+ 'Top', '',
+ 'Contents', '',
+ 'Overview', '',
+ 'Index', '',
+ 'Back', '',
+ 'FastBack', '',
+ 'Prev', '',
+ 'Up', '',
+ 'Next', '',
+ 'Forward', '',
+ 'FastForward', '',
+ 'About', '',
+ 'First', '',
+ 'Last', '',
+ );
+
+# how to create IMG tag
+sub T2H_DEFAULT_button_icon_img
+{
+ my $button = shift;
+ my $icon = shift;
+ my $name = shift;
+ return qq{<IMG SRC="$icon" BORDER="0" ALT="$button: $name" ALIGN="MIDDLE">};
+}
+
+# Names of text as alternative for icons
+%T2H_NAVIGATION_TEXT =
+ (
+ 'Top', 'Top',
+ 'Contents', 'Contents',
+ 'Overview', 'Overview',
+ 'Index', 'Index',
+ ' ', ' &nbsp; ',
+ 'Back', ' &lt; ',
+ 'FastBack', ' &lt;&lt; ',
+ 'Prev', 'Prev',
+ 'Up', ' Up ',
+ 'Next', 'Next',
+ 'Forward', ' &gt; ',
+ 'FastForward', ' &gt;&gt; ',
+ 'About', ' ? ',
+ 'First', ' |&lt; ',
+ 'Last', ' &gt;| '
+ );
+
+sub T2H_DEFAULT_print_navigation
+{
+ my $fh = shift;
+ my $vertical = shift;
+ my $spacing = 1;
+ print $fh "<TABLE CELLPADDING=$spacing CELLSPACING=$spacing BORDER=0>\n";
+
+ print $fh "<TR>" unless $vertical;
+ for $button (@$T2H_BUTTONS)
+ {
+ print $fh qq{<TR VALIGN="TOP" ALIGN="LEFT">\n} if $vertical;
+ print $fh qq{<TD VALIGN="MIDDLE" ALIGN="LEFT">};
+
+ if (ref($button) eq 'CODE')
+ {
+ &$button($fh, $vertical);
+ }
+ elsif ($button eq ' ')
+ { # handle space button
+ print $fh
+ $T2H_ICONS && $T2H_ACTIVE_ICONS{' '} ?
+ &$T2H_button_icon_img($button, $T2H_ACTIVE_ICONS{' '}) :
+ $T2H_NAVIGATION_TEXT{' '};
+ next;
+ }
+ elsif ($T2H_HREF{$button})
+ { # button is active
+ print $fh
+ $T2H_ICONS && $T2H_ACTIVE_ICONS{$button} ? # use icon ?
+ t2h_anchor('', $T2H_HREF{$button}, # yes
+ &$T2H_button_icon_img($button,
+ $T2H_ACTIVE_ICONS{$button},
+ $T2H_NAME{$button}))
+ : # use text
+ "[" .
+ t2h_anchor('', $T2H_HREF{$button}, $T2H_NAVIGATION_TEXT{$button}) .
+ "]";
+ }
+ else
+ { # button is passive
+ print $fh
+ $T2H_ICONS && $T2H_PASSIVE_ICONS{$button} ?
+ &$T2H_button_icon_img($button,
+ $T2H_PASSIVE_ICONS{$button},
+ $T2H_NAME{$button}) :
+
+ "[" . $T2H_NAVIGATION_TEXT{$button} . "]";
+ }
+ print $fh "</TD>\n";
+ print $fh "</TR>\n" if $vertical;
+ }
+ print $fh "</TR>" unless $vertical;
+ print $fh "</TABLE>\n";
+}
+
+######################################################################
+# Frames: this is from "Richard Y. Kim" <ryk@coho.net>
+# Should be improved to be more conforming to other _print* functions
+
+sub T2H_DEFAULT_print_frame
+{
+ my $fh = shift;
+ print $fh <<EOT;
+<HTML>
+<HEAD><TITLE>$T2H_THISDOC{title}</TITLE></HEAD>
+<FRAMESET cols="140,*">
+ <FRAME name=toc src="$docu_toc_frame_file">
+ <FRAME name=main src="$docu_doc">
+</FRAMESET>
+</HTML>
+EOT
+}
+
+sub T2H_DEFAULT_print_toc_frame
+{
+ my $fh = shift;
+ &$T2H_print_page_head($fh);
+ print $fh <<EOT;
+<H2>Content</H2>
+EOT
+ print $fh map {s/HREF=/target=\"main\" HREF=/; $_;} @stoc_lines;
+ print $fh "</BODY></HTML>\n";
+}
+
+######################################################################
+# About page
+#
+
+# T2H_PRE_ABOUT might be a function
+$T2H_PRE_ABOUT = <<EOT;
+This document was generated $T2H_ADDRESS
+using <A HREF="$T2H_HOMEPAGE"><I>texi2html</I></A>
+<P></P>
+EOT
+$T2H_AFTER_ABOUT = '';
+
+sub T2H_DEFAULT_about_body
+{
+ my $about;
+ if (ref($T2H_PRE_ABOUT) eq 'CODE')
+ {
+ $about = &$T2H_PRE_ABOUT();
+ }
+ else
+ {
+ $about = $T2H_PRE_ABOUT;
+ }
+ $about .= <<EOT;
+The buttons in the navigation panels have the following meaning:
+<P></P>
+<table border = "1">
+<TR>
+<TH> Button </TH>
+<TH> Name </TH>
+<TH> Go to </TH>
+<TH> From 1.2.3 go to</TH>
+</TR>
+EOT
+
+ for $button (@T2H_SECTION_BUTTONS)
+ {
+ next if $button eq ' ' || ref($button) eq 'CODE';
+ $about .= <<EOT;
+<TR>
+<TD ALIGN="CENTER">
+EOT
+ $about .=
+ ($T2H_ICONS && $T2H_ACTIVE_ICONS{$button} ?
+ &$T2H_button_icon_img($button, $T2H_ACTIVE_ICONS{$button}) :
+ " [" . $T2H_NAVIGATION_TEXT{$button} . "] ");
+ $about .= <<EOT;
+</TD>
+<TD ALIGN="CENTER">
+$button
+</TD>
+<TD>
+$T2H_BUTTONS_GOTO{$button}
+</TD>
+<TD>
+$T2H_BUTTONS_EXAMPLE{$button}
+</TD>
+</TR>
+EOT
+ }
+
+ $about .= <<EOT;
+</TABLE>
+<P></P>
+where the <STRONG> Example </STRONG> assumes that the current position
+is at <STRONG> Subsubsection One-Two-Three </STRONG> of a document of
+the following structure:
+<UL>
+<LI> 1. Section One </LI>
+<UL>
+<LI>1.1 Subsection One-One</LI>
+<UL>
+<LI> ... </LI>
+</UL>
+<LI>1.2 Subsection One-Two</LI>
+<UL>
+<LI>1.2.1 Subsubsection One-Two-One
+</LI><LI>1.2.2 Subsubsection One-Two-Two
+</LI><LI>1.2.3 Subsubsection One-Two-Three &nbsp; &nbsp; <STRONG>
+&lt;== Current Position </STRONG>
+</LI><LI>1.2.4 Subsubsection One-Two-Four
+</LI></UL>
+<LI>1.3 Subsection One-Three</LI>
+<UL>
+<LI> ... </LI>
+</UL>
+<LI>1.4 Subsection One-Four</LI>
+</UL>
+</UL>
+$T2H_AFTER_ABOUT
+EOT
+ return $about;
+}
+
+
+%T2H_BUTTONS_GOTO =
+ (
+ 'Top', 'cover (top) of document',
+ 'Contents', 'table of contents',
+ 'Overview', 'short table of contents',
+ 'Index', 'concept index',
+ 'Back', 'previous section in reading order',
+ 'FastBack', 'previous or up-and-previous section ',
+ 'Prev', 'previous section same level',
+ 'Up', 'up section',
+ 'Next', 'next section same level',
+ 'Forward', 'next section in reading order',
+ 'FastForward', 'next or up-and-next section',
+ 'About' , 'this page',
+ 'First', 'first section in reading order',
+ 'Last', 'last section in reading order',
+ );
+
+%T2H_BUTTONS_EXAMPLE =
+(
+ 'Top', ' &nbsp; ',
+ 'Contents', ' &nbsp; ',
+ 'Overview', ' &nbsp; ',
+ 'Index', ' &nbsp; ',
+ 'Back', '1.2.2',
+ 'FastBack', '1.1',
+ 'Prev', '1.2.2',
+ 'Up', '1.2',
+ 'Next', '1.2.4',
+ 'Forward', '1.2.4',
+ 'FastForward', '1.3',
+ 'About', ' &nbsp; ',
+ 'First', '1.',
+ 'Last', '1.2.4',
+);
+
+
+######################################################################
+# from here on, its l2h init stuff
+#
+
+## initialization for latex2html as for Singular manual generation
+## obachman 3/99
+
+#
+# Options controlling Titles, File-Names, Tracing and Sectioning
+#
+$TITLE = '';
+
+$SHORTEXTN = 0;
+
+$LONG_TITLES = 0;
+
+$DESTDIR = ''; # should be overwritten by cmd-line argument
+
+$NO_SUBDIR = 0;# should be overwritten by cmd-line argument
+
+$PREFIX = ''; # should be overwritten by cmd-line argument
+
+$AUTO_PREFIX = 0; # this is needed, so that prefix settings are used
+
+$AUTO_LINK = 0;
+
+$SPLIT = 0;
+
+$MAX_LINK_DEPTH = 0;
+
+$TMP = ''; # should be overwritten by cmd-line argument
+
+$DEBUG = 0;
+
+$VERBOSE = 1;
+
+#
+# Options controlling Extensions and Special Features
+#
+$HTML_VERSION = "3.2";
+
+$TEXDEFS = 1; # we absolutely need that
+
+$EXTERNAL_FILE = '';
+
+$SCALABLE_FONTS = 1;
+
+$NO_SIMPLE_MATH = 1;
+
+$LOCAL_ICONS = 1;
+
+$SHORT_INDEX = 0;
+
+$NO_FOOTNODE = 1;
+
+$ADDRESS = '';
+
+$INFO = '';
+
+#
+# Switches controlling Image Generation
+#
+$ASCII_MODE = 0;
+
+$NOLATEX = 0;
+
+$EXTERNAL_IMAGES = 0;
+
+$PS_IMAGES = 0;
+
+$NO_IMAGES = 0;
+
+$IMAGES_ONLY = 0;
+
+$REUSE = 2;
+
+$ANTI_ALIAS = 1;
+
+$ANTI_ALIAS_TEXT = 1;
+
+#
+#Switches controlling Navigation Panels
+#
+$NO_NAVIGATION = 1;
+$ADDRESS = '';
+$INFO = 0; # 0 = do not make a "About this document..." section
+
+#
+#Switches for Linking to other documents
+#
+# actuall -- we don't care
+
+$MAX_SPLIT_DEPTH = 0; # Stop making separate files at this depth
+
+$MAX_LINK_DEPTH = 0; # Stop showing child nodes at this depth
+
+$NOLATEX = 0; # 1 = do not pass unknown environments to Latex
+
+$EXTERNAL_IMAGES = 0; # 1 = leave the images outside the document
+
+$ASCII_MODE = 0; # 1 = do not use any icons or internal images
+
+# 1 = use links to external postscript images rather than inlined bitmap
+# images.
+$PS_IMAGES = 0;
+$SHOW_SECTION_NUMBERS = 0;
+
+### Other global variables ###############################################
+$CHILDLINE = "";
+
+# This is the line width measured in pixels and it is used to right justify
+# equations and equation arrays;
+$LINE_WIDTH = 500;
+
+# Used in conjunction with AUTO_NAVIGATION
+$WORDS_IN_PAGE = 300;
+
+# Affects ONLY the way accents are processed
+$default_language = 'english';
+
+# The value of this variable determines how many words to use in each
+# title that is added to the navigation panel (see below)
+#
+$WORDS_IN_NAVIGATION_PANEL_TITLES = 0;
+
+# This number will determine the size of the equations, special characters,
+# and anything which will be converted into an inlined image
+# *except* "image generating environments" such as "figure", "table"
+# or "minipage".
+# Effective values are those greater than 0.
+# Sensible values are between 0.1 - 4.
+$MATH_SCALE_FACTOR = 1.5;
+
+# This number will determine the size of
+# image generating environments such as "figure", "table" or "minipage".
+# Effective values are those greater than 0.
+# Sensible values are between 0.1 - 4.
+$FIGURE_SCALE_FACTOR = 1.6;
+
+
+# If both of the following two variables are set then the "Up" button
+# of the navigation panel in the first node/page of a converted document
+# will point to $EXTERNAL_UP_LINK. $EXTERNAL_UP_TITLE should be set
+# to some text which describes this external link.
+$EXTERNAL_UP_LINK = "";
+$EXTERNAL_UP_TITLE = "";
+
+# If this is set then the resulting HTML will look marginally better if viewed
+# with Netscape.
+$NETSCAPE_HTML = 1;
+
+# Valid paper sizes are "letter", "legal", "a4","a3","a2" and "a0"
+# Paper sizes has no effect other than in the time it takes to create inlined
+# images and in whether large images can be created at all ie
+# - larger paper sizes *MAY* help with large image problems
+# - smaller paper sizes are quicker to handle
+$PAPERSIZE = "a4";
+
+# Replace "english" with another language in order to tell LaTeX2HTML that you
+# want some generated section titles (eg "Table of Contents" or "References")
+# to appear in a different language. Currently only "english" and "french"
+# is supported but it is very easy to add your own. See the example in the
+# file "latex2html.config"
+$TITLES_LANGUAGE = "english";
+
+1; # This must be the last non-comment line
+
+# End File texi2html.init
+######################################################################
+
+
+require "$ENV{T2H_HOME}/texi2html.init"
+ if ($0 =~ /\.pl$/ &&
+ -e "$ENV{T2H_HOME}/texi2html.init" && -r "$ENV{T2H_HOME}/texi2html.init");
+
+#+++############################################################################
+# #
+# Initialization #
+# Pasted content of File $(srcdir)/MySimple.pm: Command-line processing #
+# #
+#---############################################################################
+
+# leave this within comments, and keep the require statement
+# This way, you can directly run texi2html.pl, if $ENV{T2H_HOME}/texi2html.init
+# exists.
+
+#
+package Getopt::MySimple;
+
+# Name:
+# Getopt::MySimple.
+#
+# Documentation:
+# POD-style (incomplete) documentation is in file MySimple.pod
+#
+# Tabs:
+# 4 spaces || die.
+#
+# Author:
+# Ron Savage rpsavage@ozemail.com.au.
+# 1.00 19-Aug-97 Initial version.
+# 1.10 13-Oct-97 Add arrays of switches (eg '=s@').
+# 1.20 3-Dec-97 Add 'Help' on a per-switch basis.
+# 1.30 11-Dec-97 Change 'Help' to 'verbose'. Make all hash keys lowercase.
+# 1.40 10-Nov-98 Change width of help report. Restructure tests.
+# 1-Jul-00 Modifications for Texi2html
+
+# --------------------------------------------------------------------------
+# Locally modified by obachman (Display type instead of env, order by cmp)
+# $Id: MySimple.pm,v 1.1 2000/07/03 08:44:13 obachman Exp $
+
+# use strict;
+# no strict 'refs';
+
+use vars qw(@EXPORT @EXPORT_OK @ISA);
+use vars qw($fieldWidth $opt $VERSION);
+
+use Exporter();
+use Getopt::Long;
+
+@ISA = qw(Exporter);
+@EXPORT = qw();
+@EXPORT_OK = qw($opt); # An alias for $self -> {'opt'}.
+
+# --------------------------------------------------------------------------
+
+$fieldWidth = 20;
+$VERSION = '1.41';
+
+# --------------------------------------------------------------------------
+
+sub byOrder
+{
+ my($self) = @_;
+
+ return uc($a) cmp (uc($b));
+}
+
+# --------------------------------------------------------------------------
+
+sub dumpOptions
+{
+ my($self) = @_;
+
+ print 'Option', ' ' x ($fieldWidth - length('Option') ), "Value\n";
+
+ for (sort byOrder keys(%{$self -> {'opt'} }) )
+ {
+ print "-$_", ' ' x ($fieldWidth - (1 + length) ), "${$self->{'opt'} }{$_}\n";
+ }
+
+ print "\n";
+
+} # End of dumpOptions.
+
+# --------------------------------------------------------------------------
+# Return:
+# 0 -> Error.
+# 1 -> Ok.
+
+sub getOptions
+{
+ push(@_, 0) if ($#_ == 2); # Default for $ignoreCase is 0.
+ push(@_, 1) if ($#_ == 3); # Default for $helpThenExit is 1.
+
+ my($self, $default, $helpText, $versionText,
+ $helpThenExit, $versionThenExit, $ignoreCase) = @_;
+
+ $helpThenExit = 1 unless (defined($helpThenExit));
+ $versionThenExit = 1 unless (defined($versionThenExit));
+ $ignoreCase = 0 unless (defined($ignoreCase));
+
+ $self -> {'default'} = $default;
+ $self -> {'helpText'} = $helpText;
+ $self -> {'versionText'} = $versionText;
+ $Getopt::Long::ignorecase = $ignoreCase;
+
+ unless (defined($self -> {'default'}{'help'}))
+ {
+ $self -> {'default'}{'help'} =
+ {
+ type => ':i',
+ default => '',
+ linkage => sub {$self->helpOptions($_[1]); exit (0) if $helpThenExit;},
+ verbose => "print help and exit"
+ };
+ }
+
+ unless (defined($self -> {'default'}{'version'}))
+ {
+ $self -> {'default'}{'version'} =
+ {
+ type => '',
+ default => '',
+ linkage => sub {print $self->{'versionText'}; exit (0) if versionTheExit;},
+ verbose => "print version and exit"
+ };
+ }
+
+ for (keys(%{$self -> {'default'} }) )
+ {
+ my $type = ${$self -> {'default'} }{$_}{'type'};
+ push(@{$self -> {'type'} }, "$_$type");
+ $self->{'opt'}->{$_} = ${$self -> {'default'} }{$_}{'linkage'}
+ if ${$self -> {'default'} }{$_}{'linkage'};
+ }
+
+ my($result) = &GetOptions($self -> {'opt'}, @{$self -> {'type'} });
+
+ return $result unless $result;
+
+ for (keys(%{$self -> {'default'} }) )
+ {
+ if (! defined(${$self -> {'opt'} }{$_})) #{
+ {
+ ${$self -> {'opt'} }{$_} = ${$self -> {'default'} }{$_}{'default'};
+ }
+ }
+
+ $result;
+} # End of getOptions.
+
+# --------------------------------------------------------------------------
+
+sub helpOptions
+{
+ my($self) = shift;
+ my($noHelp) = shift;
+ $noHelp = 0 unless $noHelp;
+ my($optwidth, $typewidth, $defaultwidth, $maxlinewidth, $valind, $valwidth)
+ = (10, 5, 9, 78, 4, 11);
+
+ print "$self->{'helpText'}" if ($self -> {'helpText'});
+
+ print ' Option', ' ' x ($optwidth - length('Option') -1 ),
+ 'Type', ' ' x ($typewidth - length('Type') + 1),
+ 'Default', ' ' x ($defaultwidth - length('Default') ),
+ "Description\n";
+
+ for (sort byOrder keys(%{$self -> {'default'} }) )
+ {
+ my($line, $help, $option, $val);
+ $option = $_;
+ next if ${$self->{'default'} }{$_}{'noHelp'} && ${$self->{'default'} }{$_}{'noHelp'} > $noHelp;
+ $line = " -$_ " . ' ' x ($optwidth - (2 + length) ) .
+ "${$self->{'default'} }{$_}{'type'} ".
+ ' ' x ($typewidth - (1+length(${$self -> {'default'} }{$_}{'type'}) ));
+
+ $val = ${$self->{'default'} }{$_}{'linkage'};
+ if ($val)
+ {
+ if (ref($val) eq 'SCALAR')
+ {
+ $val = $$val;
+ }
+ else
+ {
+ $val = '';
+ }
+ }
+ else
+ {
+ $val = ${$self->{'default'} }{$_}{'default'};
+ }
+ $line .= "$val ";
+ $line .= ' ' x ($optwidth + $typewidth + $defaultwidth + 1 - length($line));
+
+ if (defined(${$self -> {'default'} }{$_}{'verbose'}) &&
+ ${$self -> {'default'} }{$_}{'verbose'} ne '')
+ {
+ $help = "${$self->{'default'} }{$_}{'verbose'}";
+ }
+ else
+ {
+ $help = ' ';
+ }
+ if ((length("$line") + length($help)) < $maxlinewidth)
+ {
+ print $line , $help, "\n";
+ }
+ else
+ {
+ print $line, "\n", ' ' x $valind, $help, "\n";
+ }
+ for $val (sort byOrder keys(%{${$self->{'default'}}{$option}{'values'}}))
+ {
+ print ' ' x ($valind + 2);
+ print $val, ' ', ' ' x ($valwidth - length($val) - 2);
+ print ${$self->{'default'}}{$option}{'values'}{$val}, "\n";
+ }
+ }
+
+ print <<EOT;
+Note: 'Options' may be abbreviated. 'Type' specifications mean:
+ <none>| ! no argument: variable is set to 1 on -foo (or, to 0 on -nofoo)
+ =s | :s mandatory (or, optional) string argument
+ =i | :i mandatory (or, optional) integer argument
+EOT
+} # End of helpOptions.
+
+#-------------------------------------------------------------------
+
+sub new
+{
+ my($class) = @_;
+ my($self) = {};
+ $self -> {'default'} = {};
+ $self -> {'helpText'} = '';
+ $self -> {'opt'} = {};
+ $opt = $self -> {'opt'}; # An alias for $self -> {'opt'}.
+ $self -> {'type'} = ();
+
+ return bless $self, $class;
+
+} # End of new.
+
+# --------------------------------------------------------------------------
+
+1;
+
+# End MySimple.pm
+
+require "$ENV{T2H_HOME}/MySimple.pm"
+ if ($0 =~ /\.pl$/ &&
+ -e "$ENV{T2H_HOME}/texi2html.init" && -r "$ENV{T2H_HOME}/texi2html.init");
+
+package main;
+
+#+++############################################################################
+# #
+# Constants #
+# #
+#---############################################################################
+
+$DEBUG_TOC = 1;
+$DEBUG_INDEX = 2;
+$DEBUG_BIB = 4;
+$DEBUG_GLOSS = 8;
+$DEBUG_DEF = 16;
+$DEBUG_HTML = 32;
+$DEBUG_USER = 64;
+$DEBUG_L2H = 128;
+
+
+$BIBRE = '\[[\w\/-]+\]'; # RE for a bibliography reference
+$FILERE = '[\/\w.+-]+'; # RE for a file name
+$VARRE = '[^\s\{\}]+'; # RE for a variable name
+$NODERE = '[^,:]+'; # RE for a node name
+$NODESRE = '[^:]+'; # RE for a list of node names
+
+$ERROR = "***"; # prefix for errors
+$WARN = "**"; # prefix for warnings
+
+ # program home page
+$PROTECTTAG = "_ThisIsProtected_"; # tag to recognize protected sections
+
+$CHAPTEREND = "<!-- End chapter -->\n"; # to know where a chpater ends
+$SECTIONEND = "<!-- End section -->\n"; # to know where section ends
+$TOPEND = "<!-- End top -->\n"; # to know where top ends
+
+
+
+#
+# pre-defined indices
+#
+$index_properties =
+{
+ 'c' => { name => 'cp'},
+ 'f' => { name => 'fn', code => 1},
+ 'v' => { name => 'vr', code => 1},
+ 'k' => { name => 'ky', code => 1},
+ 'p' => { name => 'pg', code => 1},
+ 't' => { name => 'tp', code => 1}
+};
+
+
+%predefined_index = (
+ 'cp', 'c',
+ 'fn', 'f',
+ 'vr', 'v',
+ 'ky', 'k',
+ 'pg', 'p',
+ 'tp', 't',
+ );
+
+#
+# valid indices
+#
+%valid_index = (
+ 'c', 1,
+ 'f', 1,
+ 'v', 1,
+ 'k', 1,
+ 'p', 1,
+ 't', 1,
+ );
+
+#
+# texinfo section names to level
+#
+%sec2level = (
+ 'top', 0,
+ 'chapter', 1,
+ 'unnumbered', 1,
+ 'majorheading', 1,
+ 'chapheading', 1,
+ 'appendix', 1,
+ 'section', 2,
+ 'unnumberedsec', 2,
+ 'heading', 2,
+ 'appendixsec', 2,
+ 'appendixsection', 2,
+ 'subsection', 3,
+ 'unnumberedsubsec', 3,
+ 'subheading', 3,
+ 'appendixsubsec', 3,
+ 'subsubsection', 4,
+ 'unnumberedsubsubsec', 4,
+ 'subsubheading', 4,
+ 'appendixsubsubsec', 4,
+ );
+
+#
+# accent map, TeX command to ISO name
+#
+%accent_map = (
+ '"', 'uml',
+ '~', 'tilde',
+ '^', 'circ',
+ '`', 'grave',
+ '\'', 'acute',
+ );
+
+#
+# texinfo "simple things" (@foo) to HTML ones
+#
+%simple_map = (
+ # cf. makeinfo.c
+ "*", "<BR>", # HTML+
+ " ", " ",
+ "\t", " ",
+ "-", "&#173;", # soft hyphen
+ "\n", "\n",
+ "|", "",
+ 'tab', '<\/TD><TD>',
+ # spacing commands
+ ":", "",
+ "!", "!",
+ "?", "?",
+ ".", ".",
+ "-", "",
+ );
+
+#
+# texinfo "things" (@foo{}) to HTML ones
+#
+%things_map = (
+ 'TeX', 'TeX',
+ 'br', '<P>', # paragraph break
+ 'bullet', '*',
+ 'copyright', '(C)',
+ 'dots', '<small>...<\/small>',
+ 'enddots', '<small>....<\/small>',
+ 'equiv', '==',
+ 'error', 'error-->',
+ 'expansion', '==>',
+ 'minus', '-',
+ 'point', '-!-',
+ 'print', '-|',
+ 'result', '=>',
+ 'today', $T2H_TODAY,
+ 'aa', '&aring;',
+ 'AA', '&Aring;',
+ 'ae', '&aelig;',
+ 'oe', '&#156;',
+ 'AE', '&AElig;',
+ 'OE', '&#140;',
+ 'o', '&oslash;',
+ 'O', '&Oslash;',
+ 'ss', '&szlig;',
+ 'l', '\/l',
+ 'L', '\/L',
+ 'exclamdown', '&iexcl;',
+ 'questiondown', '&iquest;',
+ 'pounds', '&pound;'
+ );
+
+#
+# texinfo styles (@foo{bar}) to HTML ones
+#
+%style_map = (
+ 'acronym', '&do_acronym',
+ 'asis', '',
+ 'b', 'B',
+ 'cite', 'CITE',
+ 'code', 'CODE',
+ 'command', 'CODE',
+ 'ctrl', '&do_ctrl', # special case
+ 'dfn', 'EM', # DFN tag is illegal in the standard
+ 'dmn', '', # useless
+ 'email', '&do_email', # insert a clickable email address
+ 'emph', 'EM',
+ 'env', 'CODE',
+ 'file', '"TT', # will put quotes, cf. &apply_style
+ 'i', 'I',
+ 'kbd', 'KBD',
+ 'key', 'KBD',
+ 'math', '&do_math',
+ 'option', '"SAMP', # will put quotes, cf. &apply_style
+ 'r', '', # unsupported
+ 'samp', '"SAMP', # will put quotes, cf. &apply_style
+ 'sc', '&do_sc', # special case
+ 'strong', 'STRONG',
+ 't', 'TT',
+ 'titlefont', '', # useless
+ 'uref', '&do_uref', # insert a clickable URL
+ 'url', '&do_url', # insert a clickable URL
+ 'var', 'VAR',
+ 'w', '', # unsupported
+ 'H', '&do_accent',
+ 'dotaccent', '&do_accent',
+ 'ringaccent','&do_accent',
+ 'tieaccent', '&do_accent',
+ 'u','&do_accent',
+ 'ubaraccent','&do_accent',
+ 'udotaccent','&do_accent',
+ 'v', '&do_accent',
+ ',', '&do_accent',
+ 'dotless', '&do_accent'
+ );
+
+#
+# texinfo format (@foo/@end foo) to HTML ones
+#
+%format_map = (
+ 'quotation', 'BLOCKQUOTE',
+ # lists
+ 'itemize', 'UL',
+ 'enumerate', 'OL',
+ # poorly supported
+ 'flushleft', 'PRE',
+ 'flushright', 'PRE',
+ );
+
+#
+# an eval of these $complex_format_map->{what}->[0] yields beginning
+# an eval of these $complex_format_map->{what}->[1] yieleds end
+$complex_format_map =
+{
+ example =>
+ [
+ q{"<TABLE><tr>$T2H_EXAMPLE_INDENT_CELL<td class=example><pre>"},
+ q{'</pre></td></tr></table>'}
+ ],
+ smallexample =>
+ [
+ q{"<TABLE><tr>$T2H_SMALL_EXAMPLE_INDENT_CELL<td class=smallexample><FONT SIZE=$T2H_SMALL_FONT_SIZE><pre>"},
+ q{'</FONT></pre></td></tr></table>'}
+ ],
+ display =>
+ [
+ q{"<TABLE><tr>$T2H_EXAMPLE_INDENT_CELL<td class=display><pre " . 'style="font-family: serif">'},
+ q{'</pre></td></tr></table>'}
+ ],
+ smalldisplay =>
+ [
+ q{"<TABLE><tr>$T2H_SMALL_EXAMPLE_INDENT_CELL<td class=smalldisplay><FONT SIZE=$T2H_SMALL_FONT_SIZE><pre " . 'style="font-family: serif">'},
+ q{'</pre></FONT></td></tr></table>'}
+ ]
+};
+
+$complex_format_map->{lisp} = $complex_format_map->{example};
+$complex_format_map->{smalllisp} = $complex_format_map->{smallexample};
+$complex_format_map->{format} = $complex_format_map->{display};
+$complex_format_map->{smallformat} = $complex_format_map->{smalldisplay};
+
+#
+# texinfo definition shortcuts to real ones
+#
+%def_map = (
+ # basic commands
+ 'deffn', 0,
+ 'defvr', 0,
+ 'deftypefn', 0,
+ 'deftypevr', 0,
+ 'defcv', 0,
+ 'defop', 0,
+ 'deftp', 0,
+ # basic x commands
+ 'deffnx', 0,
+ 'defvrx', 0,
+ 'deftypefnx', 0,
+ 'deftypevrx', 0,
+ 'defcvx', 0,
+ 'defopx', 0,
+ 'deftpx', 0,
+ # shortcuts
+ 'defun', 'deffn Function',
+ 'defmac', 'deffn Macro',
+ 'defspec', 'deffn {Special Form}',
+ 'defvar', 'defvr Variable',
+ 'defopt', 'defvr {User Option}',
+ 'deftypefun', 'deftypefn Function',
+ 'deftypevar', 'deftypevr Variable',
+ 'defivar', 'defcv {Instance Variable}',
+ 'deftypeivar', 'defcv {Instance Variable}', # NEW: FIXME
+ 'defmethod', 'defop Method',
+ 'deftypemethod', 'defop Method', # NEW:FIXME
+ # x shortcuts
+ 'defunx', 'deffnx Function',
+ 'defmacx', 'deffnx Macro',
+ 'defspecx', 'deffnx {Special Form}',
+ 'defvarx', 'defvrx Variable',
+ 'defoptx', 'defvrx {User Option}',
+ 'deftypefunx', 'deftypefnx Function',
+ 'deftypevarx', 'deftypevrx Variable',
+ 'defivarx', 'defcvx {Instance Variable}',
+ 'defmethodx', 'defopx Method',
+ );
+
+#
+# things to skip
+#
+%to_skip = (
+ # comments
+ 'c', 1,
+ 'comment', 1,
+ 'ifnotinfo', 1,
+ 'ifnottex', 1,
+ 'ifhtml', 1,
+ 'end ifhtml', 1,
+ 'end ifnotinfo', 1,
+ 'end ifnottex', 1,
+ # useless
+ 'detailmenu', 1,
+ 'direntry', 1,
+ 'contents', 1,
+ 'shortcontents', 1,
+ 'summarycontents', 1,
+ 'footnotestyle', 1,
+ 'end ifclear', 1,
+ 'end ifset', 1,
+ 'titlepage', 1,
+ 'end titlepage', 1,
+ # unsupported commands (formatting)
+ 'afourpaper', 1,
+ 'cropmarks', 1,
+ 'finalout', 1,
+ 'headings', 1,
+ 'sp', 1,
+ 'need', 1,
+ 'page', 1,
+ 'setchapternewpage', 1,
+ 'everyheading', 1,
+ 'everyfooting', 1,
+ 'evenheading', 1,
+ 'evenfooting', 1,
+ 'oddheading', 1,
+ 'oddfooting', 1,
+ 'smallbook', 1,
+ 'vskip', 1,
+ 'filbreak', 1,
+ 'paragraphindent', 1,
+ # unsupported formats
+ 'cartouche', 1,
+ 'end cartouche', 1,
+ 'group', 1,
+ 'end group', 1,
+ );
+
+#+++############################################################################
+# #
+# Argument parsing, initialisation #
+# #
+#---############################################################################
+
+#
+# flush stdout and stderr after every write
+#
+select(STDERR);
+$| = 1;
+select(STDOUT);
+$| = 1;
+
+
+%value = (); # hold texinfo variables, see also -D
+$use_bibliography = 1;
+$use_acc = 1;
+
+#
+# called on -init-file
+sub LoadInitFile
+{
+ my $init_file = shift;
+ # second argument is value of options
+ $init_file = shift;
+ if (-f $init_file)
+ {
+ print "# reading initialization file from $init_file\n"
+ if ($T2H_VERBOSE);
+ require($init_file);
+ }
+ else
+ {
+ print "$ERROR Error: can't read init file $int_file\n";
+ $init_file = '';
+ }
+}
+
+#
+# called on -lang
+sub SetDocumentLanguage
+{
+ my $lang = shift;
+ if (! exists($T2H_WORDS->{$lang}))
+ {
+ warn "$ERROR: Language specs for '$lang' do not exists. Reverting to '" .
+ ($T2H_LANG ? T2H_LANG : "en") . "'\n";
+ }
+ else
+ {
+ print "# using '$lang' as document language\n" if ($T2H_VERBOSE);
+ $T2H_LANG = $lang;
+ }
+}
+
+##
+## obsolete cmd line options
+##
+$T2H_OBSOLETE_OPTIONS -> {'no-section_navigation'} =
+{
+ type => '!',
+ linkage => sub {$main::T2H_SECTION_NAVIGATION = 0;},
+ verbose => 'obsolete, use -nosec_nav',
+ noHelp => 2,
+};
+$T2H_OBSOLETE_OPTIONS -> {use_acc} =
+{
+ type => '!',
+ linkage => \$use_acc,
+ verbose => 'obsolete',
+ noHelp => 2
+};
+$T2H_OBSOLETE_OPTIONS -> {expandinfo} =
+{
+ type => '!',
+ linkage => sub {$main::T2H_EXPAND = 'info';},
+ verbose => 'obsolete, use "-expand info" instead',
+ noHelp => 2,
+};
+$T2H_OBSOLETE_OPTIONS -> {expandtex} =
+{
+ type => '!',
+ linkage => sub {$main::T2H_EXPAND = 'tex';},
+ verbose => 'obsolete, use "-expand tex" instead',
+ noHelp => 2,
+};
+$T2H_OBSOLETE_OPTIONS -> {monolithic} =
+{
+ type => '!',
+ linkage => sub {$main::T2H_SPLIT = '';},
+ verbose => 'obsolete, use "-split no" instead',
+ noHelp => 2
+};
+$T2H_OBSOLETE_OPTIONS -> {split_node} =
+{
+ type => '!',
+ linkage => sub{$main::T2H_SPLIT = 'section';},
+ verbose => 'obsolete, use "-split section" instead',
+ noHelp => 2,
+};
+$T2H_OBSOLETE_OPTIONS -> {split_chapter} =
+{
+ type => '!',
+ linkage => sub{$main::T2H_SPLIT = 'chapter';},
+ verbose => 'obsolete, use "-split chapter" instead',
+ noHelp => 2,
+};
+$T2H_OBSOLETE_OPTIONS -> {no_verbose} =
+{
+ type => '!',
+ linkage => sub {$main::T2H_VERBOSE = 0;},
+ verbose => 'obsolete, use -noverbose instead',
+ noHelp => 2,
+};
+$T2H_OBSOLETE_OPTIONS -> {output_file} =
+{
+ type => '=s',
+ linkage => sub {$main::T2H_OUT = @_[1]; $T2H_SPLIT = '';},
+ verbose => 'obsolete, use -out_file instead',
+ noHelp => 2
+};
+
+$T2H_OBSOLETE_OPTIONS -> {section_navigation} =
+{
+ type => '!',
+ linkage => \$T2H_SECTION_NAVIGATION,
+ verbose => 'obsolete, use -sec_nav instead',
+ noHelp => 2,
+};
+
+$T2H_OBSOLETE_OPTIONS -> {verbose} =
+{
+ type => '!',
+ linkage => \$T2H_VERBOSE,
+ verbose => 'obsolete, use -Verbose instead',
+ noHelp => 2
+};
+
+# read initialzation from $sysconfdir/texi2htmlrc or $HOME/.texi2htmlrc
+my $home = $ENV{HOME};
+defined($home) or $home = '';
+foreach $i ('/usr/local/etc/texi2htmlrc', "$home/.texi2htmlrc") {
+ if (-f $i) {
+ print "# reading initialization file from $i\n"
+ if ($T2H_VERBOSE);
+ require($i);
+ }
+}
+
+
+#+++############################################################################
+# #
+# parse command-line options
+# #
+#---############################################################################
+$T2H_USAGE_TEXT = <<EOT;
+Usage: texi2html [OPTIONS] TEXINFO-FILE
+Translates Texinfo source documentation to HTML.
+EOT
+$T2H_FAILURE_TEXT = <<EOT;
+Try 'texi2html -help' for usage instructions.
+EOT
+$options = new Getopt::MySimple;
+
+# some older version of GetOpt::Long don't have
+# Getopt::Long::Configure("pass_through")
+eval {Getopt::Long::Configure("pass_through");};
+$Configure_failed = $@ && <<EOT;
+**WARNING: Parsing of obsolete command-line options could have failed.
+ Consider to use only documented command-line options (run
+ 'texi2html -help 2' for a complete list) or upgrade to perl
+ version 5.005 or higher.
+EOT
+
+if (! $options->getOptions($T2H_OPTIONS, $T2H_USAGE_TEXT, "$THISVERSION\n"))
+{
+ print $Configure_failed if $Configure_failed;
+ die $T2H_FAILURE_TEXT;
+}
+
+if (@ARGV > 1)
+{
+ eval {Getopt::Long::Configure("no_pass_through");};
+ if (! $options->getOptions($T2H_OBSOLETE_OPTIONS, $T2H_USAGE_TEXT, "$THISVERSION\n"))
+ {
+ print $Configure_failed if $Configure_failed;
+ die $T2H_FAILURE_TEXT;
+ }
+}
+
+if ($T2H_CHECK) {
+ die "Need file to check\n$T2H_FAILURE_TEXT" unless @ARGV > 0;
+ &check;
+ exit;
+}
+
+#+++############################################################################
+# #
+# evaluation of cmd line options
+# #
+#---############################################################################
+
+if ($T2H_EXPAND eq 'info')
+{
+ $to_skip{'ifinfo'} = 1;
+ $to_skip{'end ifinfo'} = 1;
+}
+elsif ($T2H_EXPAND eq 'tex')
+{
+ $to_skip{'iftex'} = 1;
+ $to_skip{'end iftex'} = 1;
+
+}
+
+$T2H_INVISIBLE_MARK = '<IMG SRC="invisible.xbm">' if $T2H_INVISIBLE_MARK eq 'xbm';
+
+#
+# file name buisness
+#
+die "Need exactly one file to translate\n$T2H_FAILURE_TEXT" unless @ARGV == 1;
+$docu = shift(@ARGV);
+if ($docu =~ /.*\//) {
+ chop($docu_dir = $&);
+ $docu_name = $';
+} else {
+ $docu_dir = '.';
+ $docu_name = $docu;
+}
+unshift(@T2H_INCLUDE_DIRS, $docu_dir);
+$docu_name =~ s/\.te?x(i|info)?$//; # basename of the document
+$docu_name = $T2H_PREFIX if ($T2H_PREFIX);
+
+# subdir
+if ($T2H_SUBDIR && ! $T2H_OUT)
+{
+ $T2H_SUBDIR =~ s|/*$||;
+ unless (-d "$T2H_SUBDIR" && -w "$T2H_SUBDIR")
+ {
+ if ( mkdir($T2H_SUBDIR, oct(755)))
+ {
+ print "# created directory $T2H_SUBDIR\n" if ($T2H_VERBOSE);
+ }
+ else
+ {
+ warn "$ERROR can't create directory $T2H_SUBDIR. Put results into current directory\n";
+ $T2H_SUBDIR = '';
+ }
+ }
+}
+
+if ($T2H_SUBDIR && ! $T2H_OUT)
+{
+ $docu_rdir = "$T2H_SUBDIR/";
+ print "# putting result files into directory $docu_rdir\n" if ($T2H_VERBOSE);
+}
+else
+{
+ if ($T2H_OUT && $T2H_OUT =~ m|(.*)/|)
+ {
+ $docu_rdir = "$1/";
+ print "# putting result files into directory $docu_rdir\n" if ($T2H_VERBOSE);
+ }
+ else
+ {
+ print "# putting result files into current directory \n" if ($T2H_VERBOSE);
+ $docu_rdir = '';
+ }
+}
+
+# extension
+if ($T2H_SHORTEXTN)
+{
+ $docu_ext = "htm";
+}
+else
+{
+ $docu_ext = "html";
+}
+if ($T2H_TOP_FILE =~ /\..*$/)
+{
+ $T2H_TOP_FILE = $`.".$docu_ext";
+}
+
+# result files
+if (! $T2H_OUT && ($T2H_SPLIT =~ /section/i || $T2H_SPLIT =~ /node/i))
+{
+ $T2H_SPLIT = 'section';
+}
+elsif (! $T2H_OUT && $T2H_SPLIT =~ /chapter/i)
+{
+ $T2H_SPLIT = 'chapter'
+}
+else
+{
+ undef $T2H_SPLIT;
+}
+
+$docu_doc = "$docu_name.$docu_ext"; # document's contents
+$docu_doc_file = "$docu_rdir$docu_doc";
+if ($T2H_SPLIT)
+{
+ $docu_toc = $T2H_TOC_FILE || "${docu_name}_toc.$docu_ext"; # document's table of contents
+ $docu_stoc = "${docu_name}_ovr.$docu_ext"; # document's short toc
+ $docu_foot = "${docu_name}_fot.$docu_ext"; # document's footnotes
+ $docu_about = "${docu_name}_abt.$docu_ext"; # about this document
+ $docu_top = $T2H_TOP_FILE || $docu_doc;
+}
+else
+{
+ if ($T2H_OUT)
+ {
+ $docu_doc = $T2H_OUT;
+ $docu_doc =~ s|.*/||;
+ }
+ $docu_toc = $docu_foot = $docu_stoc = $docu_about = $docu_top = $docu_doc;
+}
+
+$docu_toc_file = "$docu_rdir$docu_toc";
+$docu_stoc_file = "$docu_rdir$docu_stoc";
+$docu_foot_file = "$docu_rdir$docu_foot";
+$docu_about_file = "$docu_rdir$docu_about";
+$docu_top_file = "$docu_rdir$docu_top";
+
+$docu_frame_file = "$docu_rdir${docu_name}_frame.$docu_ext";
+$docu_toc_frame_file = "$docu_rdir${docu_name}_toc_frame.$docu_ext";
+
+#
+# variables
+#
+$value{'html'} = 1; # predefine html (the output format)
+$value{'texi2html'} = $THISVERSION; # predefine texi2html (the translator)
+# _foo: internal to track @foo
+foreach ('_author', '_title', '_subtitle',
+ '_settitle', '_setfilename', '_shorttitle') {
+ $value{$_} = ''; # prevent -w warnings
+}
+%node2sec = (); # node to section name
+%sec2node = (); # section to node name
+%sec2number = (); # section to number
+%number2sec = (); # number to section
+%idx2node = (); # index keys to node
+%node2href = (); # node to HREF
+%node2next = (); # node to next
+%node2prev = (); # node to prev
+%node2up = (); # node to up
+%bib2href = (); # bibliography reference to HREF
+%gloss2href = (); # glossary term to HREF
+@sections = (); # list of sections
+%tag2pro = (); # protected sections
+
+#
+# initial indexes
+#
+$bib_num = 0;
+$foot_num = 0;
+$gloss_num = 0;
+$idx_num = 0;
+$sec_num = 0;
+$doc_num = 0;
+$html_num = 0;
+
+#
+# can I use ISO8879 characters? (HTML+)
+#
+if ($T2H_USE_ISO) {
+ $things_map{'bullet'} = "&bull;";
+ $things_map{'copyright'} = "&copy;";
+ $things_map{'dots'} = "&hellip;";
+ $things_map{'equiv'} = "&equiv;";
+ $things_map{'expansion'} = "&rarr;";
+ $things_map{'point'} = "&lowast;";
+ $things_map{'result'} = "&rArr;";
+}
+
+#
+# read texi2html extensions (if any)
+#
+$extensions = 'texi2html.ext'; # extensions in working directory
+if (-f $extensions) {
+ print "# reading extensions from $extensions\n" if $T2H_VERBOSE;
+ require($extensions);
+}
+($progdir = $0) =~ s/[^\/]+$//;
+if ($progdir && ($progdir ne './')) {
+ $extensions = "${progdir}texi2html.ext"; # extensions in texi2html directory
+ if (-f $extensions) {
+ print "# reading extensions from $extensions\n" if $T2H_VERBOSE;
+ require($extensions);
+ }
+}
+
+
+print "# reading from $docu\n" if $T2H_VERBOSE;
+
+#########################################################################
+#
+# latex2html stuff
+#
+# latex2html conversions consist of three stages:
+# 1) ToLatex: Put "latex" code into a latex file
+# 2) ToHtml: Use latex2html to generate corresponding html code and images
+# 3) FromHtml: Extract generated code and images from latex2html run
+#
+
+##########################
+# default settings
+#
+
+# defaults for files and names
+
+sub l2h_Init
+{
+ local($root) = @_;
+
+ return 0 unless ($root);
+
+ $l2h_name = "${root}_l2h";
+
+ $l2h_latex_file = "$docu_rdir${l2h_name}.tex";
+ $l2h_cache_file = "${docu_rdir}l2h_cache.pm";
+ $T2H_L2H_L2H = "latex2html" unless ($T2H_L2H_L2H);
+
+ # destination dir -- generated images are put there, should be the same
+ # as dir of enclosing html document --
+ $l2h_html_file = "$docu_rdir${l2h_name}.html";
+ $l2h_prefix = "${l2h_name}_";
+ return 1;
+}
+
+
+##########################
+#
+# First stage: Generation of Latex file
+# Initialize with: l2h_InitToLatex
+# Add content with: l2h_ToLatex($text) --> HTML placeholder comment
+# Finish with: l2h_FinishToLatex
+#
+
+$l2h_latex_preample = <<EOT;
+% This document was automatically generated by the l2h extenstion of texi2html
+% DO NOT EDIT !!!
+\\documentclass{article}
+\\usepackage{html}
+\\begin{document}
+EOT
+
+$l2h_latex_closing = <<EOT;
+\\end{document}
+EOT
+
+# return used latex 1, if l2h could be initalized properly, 0 otherwise
+sub l2h_InitToLatex
+{
+ %l2h_to_latex = ();
+ unless ($T2H_L2H_SKIP)
+ {
+ unless (open(L2H_LATEX, ">$l2h_latex_file"))
+ {
+ warn "$ERROR Error l2h: Can't open latex file '$latex_file' for writing\n";
+ return 0;
+ }
+ print "# l2h: use ${l2h_latex_file} as latex file\n" if ($T2H_VERBOSE);
+ print L2H_LATEX $l2h_latex_preample;
+ }
+ # open database for caching
+ l2h_InitCache();
+ $l2h_latex_count = 0;
+ $l2h_to_latex_count = 0;
+ $l2h_cached_count = 0;
+ return 1;
+}
+
+# print text (1st arg) into latex file (if not already there), return
+# HTML commentary which can be later on replaced by the latex2html
+# generated text
+sub l2h_ToLatex
+{
+ my($text) = @_;
+ my($count);
+
+ $l2h_to_latex_count++;
+ $text =~ s/(\s*)$//;
+
+ # try whether we can cache it
+ my $cached_text = l2h_FromCache($text);
+ if ($cached_text)
+ {
+ $l2h_cached_count++;
+ return $cached_text;
+ }
+
+ # try whether we have text already on things to do
+ unless ($count = $l2h_to_latex{$text})
+ {
+ $count = $l2h_latex_count;
+ $l2h_latex_count++;
+ $l2h_to_latex{$text} = $count;
+ $l2h_to_latex[$count] = $text;
+ unless ($T2H_L2H_SKIP)
+ {
+ print L2H_LATEX "\\begin{rawhtml}\n";
+ print L2H_LATEX "<!-- l2h_begin ${l2h_name} ${count} -->\n";
+ print L2H_LATEX "\\end{rawhtml}\n";
+
+ print L2H_LATEX "$text\n";
+
+ print L2H_LATEX "\\begin{rawhtml}\n";
+ print L2H_LATEX "<!-- l2h_end ${l2h_name} ${count} -->\n";
+ print L2H_LATEX "\\end{rawhtml}\n";
+ }
+ }
+ return "<!-- l2h_replace ${l2h_name} ${count} -->";
+}
+
+# print closing into latex file and close it
+sub l2h_FinishToLatex
+{
+ local ($reused);
+
+ $reused = $l2h_to_latex_count - $l2h_latex_count - $l2h_cached_count;
+ unless ($T2H_L2H_SKIP)
+ {
+ print L2H_LATEX $l2h_latex_closing;
+ close(L2H_LATEX);
+ }
+ print "# l2h: finished to latex ($l2h_cached_count cached, $reused reused, $l2h_latex_count contents)\n" if ($T2H_VERBOSE);
+ unless ($l2h_latex_count)
+ {
+ l2h_Finish();
+ return 0;
+ }
+ return 1;
+}
+
+###################################
+# Second stage: Use latex2html to generate corresponding html code and images
+#
+# l2h_ToHtml([$l2h_latex_file, [$l2h_html_dir]]):
+# Call latex2html on $l2h_latex_file
+# Put images (prefixed with $l2h_name."_") and html file(s) in $l2h_html_dir
+# Return 1, on success
+# 0, otherwise
+#
+sub l2h_ToHtml
+{
+ local($call, $ext, $root, $dotbug);
+
+ if ($T2H_L2H_SKIP)
+ {
+ print "# l2h: skipping latex2html run\n" if ($T2H_VERBOSE);
+ return 1;
+ }
+
+ # Check for dot in directory where dvips will work
+ if ($T2H_L2H_TMP)
+ {
+ if ($T2H_L2H_TMP =~ /\./)
+ {
+ warn "$ERROR Warning l2h: l2h_tmp dir contains a dot. Use /tmp, instead\n";
+ $dotbug = 1;
+ }
+ }
+ else
+ {
+ if (&getcwd =~ /\./)
+ {
+ warn "$ERROR Warning l2h: current dir contains a dot. Use /tmp as l2h_tmp dir \n";
+ $dotbug = 1;
+ }
+ }
+ # fix it, if necessary and hope that it works
+ $T2H_L2H_TMP = "/tmp" if ($dotbug);
+
+ $call = $T2H_L2H_L2H;
+ # use init file, if specified
+ $call = $call . " -init_file " . $init_file if ($init_file && -f $init_file);
+ # set output dir
+ $call .= ($docu_rdir ? " -dir $docu_rdir" : " -no_subdir");
+ # use l2h_tmp, if specified
+ $call = $call . " -tmp $T2H_L2H_TMP" if ($T2H_L2H_TMP);
+ # options we want to be sure of
+ $call = $call ." -address 0 -info 0 -split 0 -no_navigation -no_auto_link";
+ $call = $call ." -prefix ${l2h_prefix} $l2h_latex_file";
+
+ print "# l2h: executing '$call'\n" if ($T2H_VERBOSE);
+ if (system($call))
+ {
+ warn "l2h ***Error: '${call}' did not succeed\n";
+ return 0;
+ }
+ else
+ {
+ print "# l2h: latex2html finished successfully\n" if ($T2H_VERBOSE);
+ return 1;
+ }
+}
+
+# this is directly pasted over from latex2html
+sub getcwd {
+ local($_) = `pwd`;
+
+ die "'pwd' failed (out of memory?)\n"
+ unless length;
+ chop;
+ $_;
+}
+
+
+##########################
+# Third stage: Extract generated contents from latex2html run
+# Initialize with: l2h_InitFromHtml
+# open $l2h_html_file for reading
+# reads in contents into array indexed by numbers
+# return 1, on success -- 0, otherwise
+# Extract Html code with: l2h_FromHtml($text)
+# replaces in $text all previosuly inserted comments by generated html code
+# returns (possibly changed) $text
+# Finish with: l2h_FinishFromHtml
+# closes $l2h_html_dir/$l2h_name.".$docu_ext"
+
+sub l2h_InitFromHtml
+{
+ local($h_line, $h_content, $count, %l2h_img);
+
+ if (! open(L2H_HTML, "<${l2h_html_file}"))
+ {
+ print "$ERROR Error l2h: Can't open ${l2h_html_file} for reading\n";
+ return 0;
+ }
+ print "# l2h: use ${l2h_html_file} as html file\n" if ($T2H_VERBOSE);
+
+ $l2h_html_count = 0;
+
+ while ($h_line = <L2H_HTML>)
+ {
+ if ($h_line =~ /^<!-- l2h_begin $l2h_name ([0-9]+) -->/)
+ {
+ $count = $1;
+ $h_content = "";
+ while ($h_line = <L2H_HTML>)
+ {
+ if ($h_line =~ /^<!-- l2h_end $l2h_name $count -->/)
+ {
+ chomp $h_content;
+ chomp $h_content;
+ $l2h_html_count++;
+ $h_content = l2h_ToCache($count, $h_content);
+ $l2h_from_html[$count] = $h_content;
+ $h_content = '';
+ last;
+ }
+ $h_content = $h_content.$h_line;
+ }
+ if ($hcontent)
+ {
+ print "$ERROR Warning l2h: l2h_end $l2h_name $count not found\n"
+ if ($T2H_VERBOSE);
+ close(L2H_HTML);
+ return 0;
+ }
+ }
+ }
+ print "# l2h: Got $l2h_html_count of $l2h_latex_count html contents\n"
+ if ($T2H_VERBOSE);
+
+ close(L2H_HTML);
+ return 1;
+}
+
+sub l2h_FromHtml
+{
+ local($text) = @_;
+ local($done, $to_do, $count);
+
+ $to_do = $text;
+
+ while ($to_do =~ /([^\000]*)<!-- l2h_replace $l2h_name ([0-9]+) -->([^\000]*)/)
+ {
+ $to_do = $1;
+ $count = $2;
+ $done = $3.$done;
+
+ $done = "<!-- l2h_end $l2h_name $count -->".$done
+ if ($T2H_DEBUG & $DEBUG_L2H);
+
+ $done = &l2h_ExtractFromHtml($count) . $done;
+
+ $done = "<!-- l2h_begin $l2h_name $count -->".$done
+ if ($T2H_DEBUG & $DEBUG_L2H);
+ }
+ return $to_do.$done;
+}
+
+
+sub l2h_ExtractFromHtml
+{
+ local($count) = @_;
+
+ return $l2h_from_html[$count] if ($l2h_from_html[$count]);
+
+ if ($count >= 0 && $count < $l2h_latex_count)
+ {
+ # now we are in trouble
+ local($l_l2h, $_);
+
+ $l2h_extract_error++;
+ print "$ERROR l2h: can't extract content $count from html\n"
+ if ($T2H_VERBOSE);
+ # try simple (ordinary) substition (without l2h)
+ $l_l2h = $T2H_L2H;
+ $T2H_L2H = 0;
+ $_ = $l2h_to_latex{$count};
+ $_ = &substitute_style($_);
+ &unprotect_texi;
+ $_ = "<!-- l2h: ". __LINE__ . " use texi2html -->" . $_
+ if ($T2H_DEBUG & $DEBUG_L2H);
+ $T2H_L2H = $l_l2h;
+ return $_;
+ }
+ else
+ {
+ # now we have been incorrectly called
+ $l2h_range_error++;
+ print "$ERROR l2h: Request of $count content which is out of valide range [0,$l2h_latex_count)\n";
+ return "<!-- l2h: ". __LINE__ . " out of range count $count -->"
+ if ($T2H_DEBUG & $DEBUG_L2H);
+ return "<!-- l2h: out of range count $count -->";
+ }
+}
+
+sub l2h_FinishFromHtml
+{
+ if ($T2H_VERBOSE)
+ {
+ if ($l2h_extract_error + $l2h_range_error)
+ {
+ print "# l2h: finished from html ($l2h_extract_error extract and $l2h_range_error errors)\n";
+ }
+ else
+ {
+ print "# l2h: finished from html (no errors)\n";
+ }
+ }
+}
+
+sub l2h_Finish
+{
+ l2h_StoreCache();
+ if ($T2H_L2H_CLEAN)
+ {
+ print "# l2h: removing temporary files generated by l2h extension\n"
+ if $T2H_VERBOSE;
+ while (<"$docu_rdir$l2h_name"*>)
+ {
+ unlink $_;
+ }
+ }
+ print "# l2h: Finished\n" if $T2H_VERBOSE;
+ return 1;
+}
+
+##############################
+# stuff for l2h caching
+#
+
+# I tried doing this with a dbm data base, but it did not store all
+# keys/values. Hence, I did as latex2html does it
+sub l2h_InitCache
+{
+ if (-r "$l2h_cache_file")
+ {
+ my $rdo = do "$l2h_cache_file";
+ warn("$ERROR l2h Error: could not load $docu_rdir$l2h_cache_file: $@\n")
+ unless ($rdo);
+ }
+}
+
+sub l2h_StoreCache
+{
+ return unless $l2h_latex_count;
+
+ my ($key, $value);
+ open(FH, ">$l2h_cache_file") || return warn"$ERROR l2h Error: could not open $docu_rdir$l2h_cache_file for writing: $!\n";
+
+
+ while (($key, $value) = each %l2h_cache)
+ {
+ # escape stuff
+ $key =~ s|/|\\/|g;
+ $key =~ s|\\\\/|\\/|g;
+ # weird, a \ at the end of the key results in an error
+ # maybe this also broke the dbm database stuff
+ $key =~ s|\\$|\\\\|;
+ $value =~ s/\|/\\\|/g;
+ $value =~ s/\\\\\|/\\\|/g;
+ $value =~ s|\\\\|\\\\\\\\|g;
+ print FH "\n\$l2h_cache_key = q/$key/;\n";
+ print FH "\$l2h_cache{\$l2h_cache_key} = q|$value|;\n";
+ }
+ print FH "1;";
+ close(FH);
+}
+
+# return cached html, if it exists for text, and if all pictures
+# are there, as well
+sub l2h_FromCache
+{
+ my $text = shift;
+ my $cached = $l2h_cache{$text};
+ if ($cached)
+ {
+ while ($cached =~ m/SRC="(.*?)"/g)
+ {
+ unless (-e "$docu_rdir$1")
+ {
+ return undef;
+ }
+ }
+ return $cached;
+ }
+ return undef;
+}
+
+# insert generated html into cache, move away images,
+# return transformed html
+$maximage = 1;
+sub l2h_ToCache
+{
+ my $count = shift;
+ my $content = shift;
+ my @images = ($content =~ /SRC="(.*?)"/g);
+ my ($src, $dest);
+
+ for $src (@images)
+ {
+ $dest = $l2h_img{$src};
+ unless ($dest)
+ {
+ my $ext;
+ if ($src =~ /.*\.(.*)$/ && $1 ne $docu_ext)
+ {
+ $ext = $1;
+ }
+ else
+ {
+ warn "$ERROR: L2h image $src has invalid extension\n";
+ next;
+ }
+ while (-e "$docu_rdir${docu_name}_$maximage.$ext") { $maximage++;}
+ $dest = "${docu_name}_$maximage.$ext";
+ system("cp -f $docu_rdir$src $docu_rdir$dest");
+ $l2h_img{$src} = $dest;
+ unlink "$docu_rdir$src" unless ($DEBUG & DEBUG_L2H);
+ }
+ $content =~ s/$src/$dest/g;
+ }
+ $l2h_cache{$l2h_to_latex[$count]} = $content;
+ return $content;
+}
+
+
+#+++############################################################################
+# #
+# Pass 1: read source, handle command, variable, simple substitution #
+# #
+#---############################################################################
+
+@lines = (); # whole document
+@toc_lines = (); # table of contents
+@stoc_lines = (); # table of contents
+$curlevel = 0; # current level in TOC
+$node = ''; # current node name
+$node_next = ''; # current node next name
+$node_prev = ''; # current node prev name
+$node_up = ''; # current node up name
+$in_table = 0; # am I inside a table
+$table_type = ''; # type of table ('', 'f', 'v', 'multi')
+@tables = (); # nested table support
+$in_bibliography = 0; # am I inside a bibliography
+$in_glossary = 0; # am I inside a glossary
+$in_top = 0; # am I inside the top node
+$has_top = 0; # did I see a top node?
+$has_top_command = 0; # did I see @top for automatic pointers?
+$in_pre = 0; # am I inside a preformatted section
+$in_list = 0; # am I inside a list
+$in_html = 0; # am I inside an HTML section
+$first_line = 1; # is it the first line
+$dont_html = 0; # don't protect HTML on this line
+$deferred_ref = ''; # deferred reference for indexes
+@html_stack = (); # HTML elements stack
+$html_element = ''; # current HTML element
+&html_reset;
+%macros = (); # macros
+
+# init l2h
+$T2H_L2H = &l2h_Init($docu_name) if ($T2H_L2H);
+$T2H_L2H = &l2h_InitToLatex if ($T2H_L2H);
+
+# build code for simple substitutions
+# the maps used (%simple_map and %things_map) MUST be aware of this
+# watch out for regexps, / and escaped characters!
+$subst_code = '';
+foreach (keys(%simple_map)) {
+ ($re = $_) =~ s/(\W)/\\$1/g; # protect regexp chars
+ $subst_code .= "s/\\\@$re/$simple_map{$_}/g;\n";
+}
+foreach (keys(%things_map)) {
+ $subst_code .= "s/\\\@$_\\{\\}/$things_map{$_}/g;\n";
+}
+if ($use_acc) {
+ # accentuated characters
+ foreach (keys(%accent_map)) {
+ if ($_ eq "`") {
+ $subst_code .= "s/$;3";
+ } elsif ($_ eq "'") {
+ $subst_code .= "s/$;4";
+ } else {
+ $subst_code .= "s/\\\@\\$_";
+ }
+ $subst_code .= "([a-z])/&\${1}$accent_map{$_};/gi;\n";
+ }
+}
+eval("sub simple_substitutions { $subst_code }");
+
+&init_input;
+INPUT_LINE: while ($_ = &next_line) {
+ #
+ # remove \input on the first lines only
+ #
+ if ($first_line) {
+ next if /^\\input/;
+ $first_line = 0;
+ }
+ # non-@ substitutions cf. texinfmt.el
+ #
+ # parse texinfo tags
+ #
+ $tag = '';
+ $end_tag = '';
+ if (/^\s*\@end\s+(\w+)\b/) {
+ $end_tag = $1;
+ } elsif (/^\s*\@(\w+)\b/) {
+ $tag = $1;
+ }
+ #
+ # handle @html / @end html
+ #
+ if ($in_html) {
+ if ($end_tag eq 'html') {
+ $in_html = 0;
+ } else {
+ $tag2pro{$in_html} .= $_;
+ }
+ next;
+ } elsif ($tag eq 'html') {
+ $in_html = $PROTECTTAG . ++$html_num;
+ push(@lines, $in_html);
+ next;
+ }
+
+ #
+ # try to remove inlined comments
+ # syntax from tex-mode.el comment-start-skip
+ #
+ s/((^|[^\@])(\@\@)*)\@c(omment | |\{|$).*/$1/;
+
+# Sometimes I use @c right at the end of a line ( to suppress the line feed )
+# s/((^|[^\@])(\@\@)*)\@c(omment)?$/$1/;
+# s/((^|[^\@])(\@\@)*)\@c(omment)? .*/$1/;
+# s/(.*)\@c{.*?}(.*)/$1$2/;
+# s/(.*)\@comment{.*?}(.*)/$1$2/;
+# s/^(.*)\@c /$1/;
+# s/^(.*)\@comment /$1/;
+
+ #############################################################
+ # value substitution before macro expansion, so that
+ # it works in macro arguments
+ s/\@value{($VARRE)}/$value{$1}/eg;
+
+ #############################################################
+ # macro substitution
+ while (/\@(\w+)/g)
+ {
+ if (exists($macros->{$1}))
+ {
+ my $before = $`;
+ my $name = $1;
+ my $after = $';
+ my @args;
+ my $args;
+ if ($after =~ /^\s*{(.*?[^\\])}(.*)/)
+ {
+ $args = $1;
+ $after = $2;
+ }
+ elsif (@{$macros->{$name}->{Args}} == 1)
+ {
+ $args = $after;
+ $args =~ s/^\s*//;
+ $args =~ s/\s*$//;
+ $after = '';
+ }
+ $args =~ s|\\\\|\\|g;
+ $args =~ s|\\{|{|g;
+ $args =~ s|\\}|}|g;
+ if (@{$macros->{$name}->{Args}} > 1)
+ {
+ $args =~ s/(^|[^\\]),/$1$;/g ;
+ $args =~ s|\\,|,|g;
+ @args = split(/$;\s*/, $args) if (@{$macros->{$name}->{Args}} > 1);
+ }
+ else
+ {
+ $args =~ s|\\,|,|g;
+ @args = ($args);
+ }
+ my $macrobody = $macros->{$name}->{Body};
+ for ($i=0; $i<=$#args; $i++)
+ {
+ $macrobody =~ s|\\$macros->{$name}->{Args}->[$i]\\|$args[$i]|g;
+ }
+ $macrobody =~ s|\\\\|\\|g;
+ $_ = $before . $macrobody . $after;
+ unshift @input_spool, map {$_ = $_."\n"} split(/\n/, $_);
+ next INPUT_LINE;
+ }
+ } #
+
+
+ #
+ # try to skip the line
+ #
+ if ($end_tag) {
+ $in_titlepage = 0 if $end_tag eq 'titlepage';
+ next if $to_skip{"end $end_tag"};
+ } elsif ($tag) {
+ $in_titlepage = 1 if $tag eq 'titlepage';
+ next if $to_skip{$tag};
+ last if $tag eq 'bye';
+ }
+ if ($in_top) {
+ # parsing the top node
+ if ($tag eq 'node' ||
+ ($sec2level{$tag} && $tag !~ /unnumbered/ && $tag !~ /heading/))
+ {
+ # no more in top
+ $in_top = 0;
+ push(@lines, $TOPEND);
+ }
+ }
+ unless ($in_pre) {
+ s/``/\"/g;
+ s/''/\"/g;
+ s/([\w ])---([\w ])/$1--$2/g;
+ }
+ #
+ # analyze the tag
+ #
+ if ($tag) {
+ # skip lines
+ &skip_until($tag), next if $tag eq 'ignore';
+ &skip_until($tag), next if $tag eq 'ifnothtml';
+ if ($tag eq 'ifinfo')
+ {
+ &skip_until($tag), next unless $T2H_EXPAND eq 'info';
+ }
+ if ($tag eq 'iftex')
+ {
+ &skip_until($tag), next unless $T2H_EXPAND eq 'tex';
+ }
+ if ($tag eq 'tex')
+ {
+ # add to latex2html file
+ if ($T2H_EXPAND eq 'tex' && $T2H_L2H && ! $in_pre)
+ {
+ # add space to the end -- tex(i2dvi) does this, as well
+ push(@lines, &l2h_ToLatex(&string_until($tag) . " "));
+ }
+ else
+ {
+ &skip_until($tag);
+ }
+ next;
+ }
+ if ($tag eq 'titlepage')
+ {
+ next;
+ }
+ # handle special tables
+ if ($tag =~ /^(|f|v|multi)table$/) {
+ $table_type = $1;
+ $tag = 'table';
+ }
+ # special cases
+ if ($tag eq 'top' || ($tag eq 'node' && /^\@node\s+top\s*,/i)) {
+ $in_top = 1;
+ $has_top = 1;
+ $has_top_command = 1 if $tag eq 'top';
+ @lines = (); # ignore all lines before top (title page garbage)
+ next;
+ } elsif ($tag eq 'node') {
+ if ($in_top)
+ {
+ $in_top = 0;
+ push(@lines, $TOPEND);
+ }
+ warn "$ERROR Bad node line: $_" unless $_ =~ /^\@node\s$NODESRE$/o;
+ # request of "Richard Y. Kim" <ryk@ap.com>
+ s/^\@node\s+//;
+ $_ = &protect_html($_); # if node contains '&' for instance
+ ($node, $node_next, $node_prev, $node_up) = split(/,/);
+ &normalise_node($node);
+ &normalise_node($node_next);
+ &normalise_node($node_prev);
+ &normalise_node($node_up);
+ $node =~ /\"/ ?
+ push @lines, &html_debug("<A NAME='$node'></A>\n", __LINE__) :
+ push @lines, &html_debug("<A NAME=\"$node\"></A>\n", __LINE__);
+ next;
+ } elsif ($tag eq 'include') {
+ if (/^\@include\s+($FILERE)\s*$/o) {
+ $file = LocateIncludeFile($1);
+ if ($file && -e $file) {
+ &open($file);
+ print "# including $file\n" if $T2H_VERBOSE;
+ } else {
+ warn "$ERROR Can't find $1, skipping";
+ }
+ } else {
+ warn "$ERROR Bad include line: $_";
+ }
+ next;
+ } elsif ($tag eq 'ifclear') {
+ if (/^\@ifclear\s+($VARRE)\s*$/o) {
+ next unless defined($value{$1});
+ &skip_until($tag);
+ } else {
+ warn "$ERROR Bad ifclear line: $_";
+ }
+ next;
+ } elsif ($tag eq 'ifset') {
+ if (/^\@ifset\s+($VARRE)\s*$/o) {
+ next if defined($value{$1});
+ &skip_until($tag);
+ } else {
+ warn "$ERROR Bad ifset line: $_";
+ }
+ next;
+ } elsif ($tag eq 'menu') {
+ unless ($T2H_SHOW_MENU) {
+ &skip_until($tag);
+ next;
+ }
+ &html_push_if($tag);
+ push(@lines, &html_debug('', __LINE__));
+ } elsif ($format_map{$tag}) {
+ $in_pre = 1 if $format_map{$tag} eq 'PRE';
+ &html_push_if($format_map{$tag});
+ push(@lines, &html_debug('', __LINE__));
+ $in_list++ if $format_map{$tag} eq 'UL' || $format_map{$tag} eq 'OL' ;
+# push(@lines, &debug("<BLOCKQUOTE>\n", __LINE__))
+# if $tag =~ /example/i;
+ # sunshine@sunshineco.com: <PRE>bla</PRE> looks better than
+ # <PRE>\nbla</PRE> (at least on NeXTstep browser
+ push(@lines, &debug("<$format_map{$tag}>" .
+ ($in_pre ? '' : "\n"), __LINE__));
+ next;
+ }
+ elsif (exists $complex_format_map->{$tag})
+ {
+ my $start = eval $complex_format_map->{$tag}->[0];
+ if ($@)
+ {
+ print "$ERROR: eval of complex_format_map->{$tag}->[0] $complex_format_map->{$tag}->[0]: $@";
+ $start = '<pre>'
+ }
+ $in_pre = 1 if $start =~ /<pre/;
+ push(@lines, html_debug($start. ($in_pre ? '' : "\n"), __LINE__));
+ next;
+ } elsif ($tag eq 'table') {
+ # anorland@hem2.passagen.se
+ # if (/^\s*\@(|f|v|multi)table\s+\@(\w+)/) {
+ if (/^\s*\@(|f|v|multi)table\s+\@(\w+)|(\{[^\}]*\})/) {
+ $in_table = $2;
+ unshift(@tables, join($;, $table_type, $in_table));
+ if ($table_type eq "multi") {
+ # don't use borders -- gets confused by empty cells
+ push(@lines, &debug("<TABLE>\n", __LINE__));
+ &html_push_if('TABLE');
+ } else {
+ push(@lines, &debug("<DL COMPACT>\n", __LINE__));
+ &html_push_if('DL');
+ }
+ push(@lines, &html_debug('', __LINE__));
+ } else {
+ warn "$ERROR Bad table line: $_";
+ }
+ next;
+ }
+ elsif ($tag eq 'synindex' || $tag eq 'syncodeindex')
+ {
+ if (/^\@$tag\s+(\w+)\s+(\w+)\s*$/)
+ {
+ my $from = $1;
+ my $to = $2;
+ my $prefix_from = IndexName2Prefix($from);
+ my $prefix_to = IndexName2Prefix($to);
+
+ warn("$ERROR unknown from index name $from ind syn*index line: $_"), next
+ unless $prefix_from;
+ warn("$ERROR unknown to index name $to ind syn*index line: $_"), next
+ unless $prefix_to;
+
+ if ($tag eq 'syncodeindex')
+ {
+ $index_properties->{$prefix_to}->{'from_code'}->{$prefix_from} = 1;
+ }
+ else
+ {
+ $index_properties->{$prefix_to}->{'from'}->{$prefix_from} = 1;
+ }
+ }
+ else
+ {
+ warn "$ERROR Bad syn*index line: $_";
+ }
+ next;
+ }
+ elsif ($tag eq 'defindex' || $tag eq 'defcodeindex')
+ {
+ if (/^\@$tag\s+(\w+)\s*$/)
+ {
+ my $name = $1;
+ $index_properties->{$name}->{name} = $name;
+ $index_properties->{$name}->{code} = 1 if $tag eq 'defcodeindex';
+ }
+ else
+ {
+ warn "$ERROR Bad defindex line: $_";
+ }
+ next;
+ }
+ elsif (/^\@printindex/)
+ {
+ push (@lines, "<!--::${section}::-->$_");
+ next;
+ }
+ elsif ($tag eq 'sp') {
+ push(@lines, &debug("<P>\n", __LINE__));
+ next;
+ } elsif ($tag eq 'center') {
+ push(@lines, &debug("<center>\n", __LINE__));
+ s/\@center//;
+ } elsif ($tag eq 'setref') {
+ &protect_html; # if setref contains '&' for instance
+ if (/^\@$tag\s*{($NODERE)}\s*$/) {
+ $setref = $1;
+ $setref =~ s/\s+/ /g; # normalize
+ $setref =~ s/ $//;
+ $node2sec{$setref} = $name;
+ $sec2node{$name} = $setref;
+ $node2href{$setref} = "$docu_doc#$docid";
+ } else {
+ warn "$ERROR Bad setref line: $_";
+ }
+ next;
+ } elsif ($tag eq 'lowersections') {
+ local ($sec, $level);
+ while (($sec, $level) = each %sec2level) {
+ $sec2level{$sec} = $level + 1;
+ }
+ next;
+ } elsif ($tag eq 'raisesections') {
+ local ($sec, $level);
+ while (($sec, $level) = each %sec2level) {
+ $sec2level{$sec} = $level - 1;
+ }
+ next;
+ }
+ elsif ($tag eq 'macro' || $tag eq 'rmacro')
+ {
+ if (/^\@$tag\s*(\w+)\s*(.*)/)
+ {
+ my $name = $1;
+ my @args;
+ @args = split(/\s*,\s*/ , $1)
+ if ($2 =~ /^\s*{(.*)}\s*/);
+
+ $macros->{$name}->{Args} = \@args;
+ $macros->{$name}->{Body} = '';
+ while (($_ = &next_line) && $_ !~ /\@end $tag/)
+ {
+ $macros->{$name}->{Body} .= $_;
+ }
+ die "ERROR: No closing '\@end $tag' found for macro definition of '$name'\n"
+ unless (/\@end $tag/);
+ chomp $macros->{$name}->{Body};
+ }
+ else
+ {
+ warn "$ERROR: Bad macro defintion $_"
+ }
+ next;
+ }
+ elsif ($tag eq 'unmacro')
+ {
+ delete $macros->{$1} if (/^\@unmacro\s*(\w+)/);
+ next;
+ }
+ elsif ($tag eq 'documentlanguage')
+ {
+ SetDocumentLanguage($1) if (!$T2H_LANG && /documentlanguage\s*(\w+)/);
+ }
+ elsif (defined($def_map{$tag})) {
+ if ($def_map{$tag}) {
+ s/^\@$tag\s+//;
+ $tag = $def_map{$tag};
+ $_ = "\@$tag $_";
+ $tag =~ s/\s.*//;
+ }
+ } elsif (defined($user_sub{$tag})) {
+ s/^\@$tag\s+//;
+ $sub = $user_sub{$tag};
+ print "# user $tag = $sub, arg: $_" if $T2H_DEBUG & $DEBUG_USER;
+ if (defined(&$sub)) {
+ chop($_);
+ &$sub($_);
+ } else {
+ warn "$ERROR Bad user sub for $tag: $sub\n";
+ }
+ next;
+ }
+ if (defined($def_map{$tag})) {
+ s/^\@$tag\s+//;
+ if ($tag =~ /x$/) {
+ # extra definition line
+ $tag = $`;
+ $is_extra = 1;
+ } else {
+ $is_extra = 0;
+ }
+ while (/\{([^\{\}]*)\}/) {
+ # this is a {} construct
+ ($before, $contents, $after) = ($`, $1, $');
+ # protect spaces
+ $contents =~ s/\s+/$;9/g;
+ # restore $_ protecting {}
+ $_ = "$before$;7$contents$;8$after";
+ }
+ @args = split(/\s+/, &protect_html($_));
+ foreach (@args) {
+ s/$;9/ /g; # unprotect spaces
+ s/$;7/\{/g; # ... {
+ s/$;8/\}/g; # ... }
+ }
+ $type = shift(@args);
+ $type =~ s/^\{(.*)\}$/$1/;
+ print "# def ($tag): {$type} ", join(', ', @args), "\n"
+ if $T2H_DEBUG & $DEBUG_DEF;
+ $type .= ':'; # it's nicer like this
+ my $name = shift(@args);
+ $name =~ s/^\{(.*)\}$/$1/;
+ if ($is_extra) {
+ $_ = &debug("<DT>", __LINE__);
+ } else {
+ $_ = &debug("<DL>\n<DT>", __LINE__);
+ }
+ if ($tag eq 'deffn' || $tag eq 'defvr' || $tag eq 'deftp') {
+ $_ .= "<U>$type</U> <B>$name</B>";
+ $_ .= " <I>@args</I>" if @args;
+ } elsif ($tag eq 'deftypefn' || $tag eq 'deftypevr'
+ || $tag eq 'defcv' || $tag eq 'defop') {
+ $ftype = $name;
+ $name = shift(@args);
+ $name =~ s/^\{(.*)\}$/$1/;
+ $_ .= "<U>$type</U> $ftype <B>$name</B>";
+ $_ .= " <I>@args</I>" if @args;
+ } else {
+ warn "$ERROR Unknown definition type: $tag\n";
+ $_ .= "<U>$type</U> <B>$name</B>";
+ $_ .= " <I>@args</I>" if @args;
+ }
+ $_ .= &debug("\n<DD>", __LINE__);
+ $name = &unprotect_html($name);
+ if ($tag eq 'deffn' || $tag eq 'deftypefn') {
+ EnterIndexEntry('f', $name, $docu_doc, $section, \@lines);
+# unshift(@input_spool, "\@findex $name\n");
+ } elsif ($tag eq 'defop') {
+ EnterIndexEntry('f', "$name on $ftype", $docu_doc, $section, \@lines);
+# unshift(@input_spool, "\@findex $name on $ftype\n");
+ } elsif ($tag eq 'defvr' || $tag eq 'deftypevr' || $tag eq 'defcv') {
+ EnterIndexEntry('v', $name, $docu_doc, $section, \@lines);
+# unshift(@input_spool, "\@vindex $name\n");
+ } else {
+ EnterIndexEntry('t', $name, $docu_doc, $section, \@lines);
+# unshift(@input_spool, "\@tindex $name\n");
+ }
+ $dont_html = 1;
+ }
+ } elsif ($end_tag) {
+ if ($format_map{$end_tag}) {
+ $in_pre = 0 if $format_map{$end_tag} eq 'PRE';
+ $in_list-- if $format_map{$end_tag} eq 'UL' || $format_map{$end_tag} eq 'OL' ;
+ &html_pop_if('P');
+ &html_pop_if('LI');
+ &html_pop_if();
+ push(@lines, &debug("</$format_map{$end_tag}>\n", __LINE__));
+ push(@lines, &html_debug('', __LINE__));
+ }
+ elsif (exists $complex_format_map->{$end_tag})
+ {
+ my $end = eval $complex_format_map->{$end_tag}->[1];
+ if ($@)
+ {
+ print "$ERROR: eval of complex_format_map->{$end_tag}->[1] $complex_format_map->{$end_tag}->[0]: $@";
+ $end = '</pre>'
+ }
+ $in_pre = 0 if $end =~ m|</pre>|;
+ push(@lines, html_debug($end, __LINE__));
+ } elsif ($end_tag =~ /^(|f|v|multi)table$/) {
+ unless (@tables) {
+ warn "$ERROR \@end $end_tag without \@*table\n";
+ next;
+ }
+ &html_pop_if('P');
+ ($table_type, $in_table) = split($;, shift(@tables));
+ unless ($1 eq $table_type) {
+ warn "$ERROR \@end $end_tag without matching \@$end_tag\n";
+ next;
+ }
+ if ($table_type eq "multi") {
+ push(@lines, "</TR></TABLE>\n");
+ &html_pop_if('TR');
+ } else {
+ push(@lines, "</DL>\n");
+ &html_pop_if('DD');
+ }
+ &html_pop_if();
+ if (@tables) {
+ ($table_type, $in_table) = split($;, $tables[0]);
+ } else {
+ $in_table = 0;
+ }
+ } elsif (defined($def_map{$end_tag})) {
+ push(@lines, &debug("</DL>\n", __LINE__));
+ } elsif ($end_tag eq 'menu') {
+ &html_pop_if();
+ push(@lines, $_); # must keep it for pass 2
+ }
+ next;
+ }
+ #############################################################
+ # anchor insertion
+ while (/\@anchor\s*\{(.*?)\}/)
+ {
+ $_ = $`.$';
+ my $anchor = $1;
+ $anchor = &normalise_node($anchor);
+ push @lines, &html_debug("<A NAME=\"$anchor\"></A>\n");
+ $node2href{$anchor} = "$docu_doc#$anchor";
+ next INPUT_LINE if $_ =~ /^\s*$/;
+ }
+
+ #############################################################
+ # index entry generation, after value substitutions
+ if (/^\@(\w+?)index\s+/)
+ {
+ EnterIndexEntry($1, $', $docu_doc, $section, \@lines);
+ next;
+ }
+ #
+ # protect texi and HTML things
+ &protect_texi;
+ $_ = &protect_html($_) unless $dont_html;
+ $dont_html = 0;
+ # substitution (unsupported things)
+ s/^\@exdent\s+//g;
+ s/\@noindent\s+//g;
+ s/\@refill\s+//g;
+ # other substitutions
+ &simple_substitutions;
+ s/\@footnote\{/\@footnote$docu_doc\{/g; # mark footnotes, cf. pass 4
+ #
+ # analyze the tag again
+ #
+ if ($tag) {
+ if (defined($sec2level{$tag}) && $sec2level{$tag} > 0) {
+ if (/^\@$tag\s+(.+)$/) {
+ $name = $1;
+ $name = &normalise_node($name);
+ $level = $sec2level{$tag};
+ # check for index
+ $first_index_chapter = $node
+ if ($level == 1 && !$first_index_chapter &&
+ $name =~ /index/i);
+ if ($in_top && /heading/){
+ $T2H_HAS_TOP_HEADING = 1;
+ $_ = &debug("<H$level>$name</H$level>\n", __LINE__);
+ &html_push_if('body');
+ print "# top heading, section $name, level $level\n"
+ if $T2H_DEBUG & $DEBUG_TOC;
+ }
+ else
+ {
+ unless (/^\@\w*heading/)
+ {
+ unless (/^\@unnumbered/)
+ {
+ my $number = &update_sec_num($tag, $level);
+ $name = $number. ' ' . $name if $T2H_NUMBER_SECTIONS;
+ $sec2number{$name} = $number;
+ $number2sec{$number} = $name;
+ }
+ if (defined($toplevel))
+ {
+ push @lines, ($level==$toplevel ? $CHAPTEREND : $SECTIONEND);
+ }
+ else
+ {
+ # first time we see a "section"
+ unless ($level == 1)
+ {
+ warn "$WARN The first section found is not of level 1: $_";
+ }
+ $toplevel = $level;
+ }
+ push(@sections, $name);
+ next_doc() if ($T2H_SPLIT eq 'section' ||
+ $T2H_SPLIT && $level == $toplevel);
+ }
+ $sec_num++;
+ $docid = "SEC$sec_num";
+ $tocid = (/^\@\w*heading/ ? undef : "TOC$sec_num");
+ # check biblio and glossary
+ $in_bibliography = ($name =~ /^([A-Z]|\d+)?(\.\d+)*\s*bibliography$/i);
+ $in_glossary = ($name =~ /^([A-Z]|\d+)?(\.\d+)*\s*glossary$/i);
+ # check node
+ if ($node)
+ {
+ warn "$ERROR Duplicate node found: $node\n"
+ if ($node2sec{$node});
+ }
+ else
+ {
+ $name .= ' ' while ($node2sec{$name});
+ $node = $name;
+ }
+ $name .= ' ' while ($sec2node{$name});
+ $section = $name;
+ $node2sec{$node} = $name;
+ $sec2node{$name} = $node;
+ $node2href{$node} = "$docu_doc#$docid";
+ $node2next{$node} = $node_next;
+ $node2prev{$node} = $node_prev;
+ $node2up{$node} = $node_up;
+ print "# node $node, section $name, level $level\n"
+ if $T2H_DEBUG & $DEBUG_TOC;
+
+ $node = '';
+ $node_next = '';
+ $node_prev = '';
+ $node_next = '';
+ if ($tocid)
+ {
+ # update TOC
+ while ($level > $curlevel) {
+ $curlevel++;
+ push(@toc_lines, "<UL>\n");
+ }
+ while ($level < $curlevel) {
+ $curlevel--;
+ push(@toc_lines, "</UL>\n");
+ }
+ $_ = &t2h_anchor($tocid, "$docu_doc#$docid", $name, 1);
+ $_ = &substitute_style($_);
+ push(@stoc_lines, "$_<BR>\n") if ($level == 1);
+ if ($T2H_NUMBER_SECTIONS)
+ {
+ push(@toc_lines, $_ . "<BR>\n")
+ }
+ else
+ {
+ push(@toc_lines, "<LI>" . $_ ."</LI>");
+ }
+ }
+ else
+ {
+ push(@lines, &html_debug("<A NAME=\"$docid\"></A>\n",
+ __LINE__));
+ }
+ # update DOC
+ push(@lines, &html_debug('', __LINE__));
+ &html_reset;
+ $_ = "<H$level> $name </H$level>\n<!--docid::${docid}::-->\n";
+ $_ = &debug($_, __LINE__);
+ push(@lines, &html_debug('', __LINE__));
+ }
+ # update DOC
+ foreach $line (split(/\n+/, $_)) {
+ push(@lines, "$line\n");
+ }
+ next;
+ } else {
+ warn "$ERROR Bad section line: $_";
+ }
+ } else {
+ # track variables
+ $value{$1} = Unprotect_texi($2), next if /^\@set\s+($VARRE)\s+(.*)$/o;
+ delete $value{$1}, next if /^\@clear\s+($VARRE)\s*$/o;
+ # store things
+ $value{'_shorttitle'} = Unprotect_texi($1), next if /^\@shorttitle\s+(.*)$/;
+ $value{'_setfilename'} = Unprotect_texi($1), next if /^\@setfilename\s+(.*)$/;
+ $value{'_settitle'} = Unprotect_texi($1), next if /^\@settitle\s+(.*)$/;
+ $value{'_author'} .= Unprotect_texi($1)."\n", next if /^\@author\s+(.*)$/;
+ $value{'_subtitle'} .= Unprotect_texi($1)."\n", next if /^\@subtitle\s+(.*)$/;
+ $value{'_title'} .= Unprotect_texi($1)."\n", next if /^\@title\s+(.*)$/;
+
+ # list item
+ if (/^\s*\@itemx?\s+/) {
+ $what = $';
+ $what =~ s/\s+$//;
+ if ($in_bibliography && $use_bibliography) {
+ if ($what =~ /^$BIBRE$/o) {
+ $id = 'BIB' . ++$bib_num;
+ $bib2href{$what} = "$docu_doc#$id";
+ print "# found bibliography for '$what' id $id\n"
+ if $T2H_DEBUG & $DEBUG_BIB;
+ $what = &t2h_anchor($id, '', $what);
+ }
+ } elsif ($in_glossary && $T2H_USE_GLOSSARY) {
+ $id = 'GLOSS' . ++$gloss_num;
+ $entry = $what;
+ $entry =~ tr/A-Z/a-z/ unless $entry =~ /^[A-Z\s]+$/;
+ $gloss2href{$entry} = "$docu_doc#$id";
+ print "# found glossary for '$entry' id $id\n"
+ if $T2H_DEBUG & $DEBUG_GLOSS;
+ $what = &t2h_anchor($id, '', $what);
+ }
+ elsif ($in_table && ($table_type eq 'f' || $table_type eq 'v'))
+ {
+ EnterIndexEntry($table_type, $what, $docu_doc, $section, \@lines);
+ }
+ &html_pop_if('P');
+ if ($html_element eq 'DL' || $html_element eq 'DD') {
+ if ($things_map{$in_table} && !$what) {
+ # special case to allow @table @bullet for instance
+ push(@lines, &debug("<DT>$things_map{$in_table}\n", __LINE__));
+ } else {
+ push(@lines, &debug("<DT>\@$in_table\{$what\}\n", __LINE__));
+ }
+ push(@lines, "<DD>");
+ &html_push('DD') unless $html_element eq 'DD';
+ if ($table_type) { # add also an index
+ unshift(@input_spool, "\@${table_type}index $what\n");
+ }
+ } elsif ($html_element eq 'TABLE') {
+ push(@lines, &debug("<TR><TD>$what</TD>\n", __LINE__));
+ &html_push('TR');
+ } elsif ($html_element eq 'TR') {
+ push(@lines, &debug("</TR>\n", __LINE__));
+ push(@lines, &debug("<TR><TD>$what</TD>\n", __LINE__));
+ } else {
+ push(@lines, &debug("<LI>$what\n", __LINE__));
+ &html_push('LI') unless $html_element eq 'LI';
+ }
+ push(@lines, &html_debug('', __LINE__));
+ if ($deferred_ref) {
+ push(@lines, &debug("$deferred_ref\n", __LINE__));
+ $deferred_ref = '';
+ }
+ next;
+ } elsif (/^\@tab\s+(.*)$/) {
+ push(@lines, "<TD>$1</TD>\n");
+ next;
+ }
+ }
+ }
+ # paragraph separator
+ if ($_ eq "\n" && ! $in_pre) {
+ next if $#lines >= 0 && $lines[$#lines] eq "\n";
+ if ($html_element eq 'P') {
+ push (@lines, &debug("</P><P>\n", __LINE__));
+ }
+# else
+# {
+# push(@lines, "<P></P>\n");
+# $_ = &debug("<P></P>\n", __LINE__);
+# }
+ elsif ($html_element eq 'body' || $html_element eq 'BLOCKQUOTE' || $html_element eq 'DD' || $html_element eq 'LI')
+ {
+ &html_push('P');
+ push(@lines, &debug("<P>\n", __LINE__));
+ }
+ }
+ # otherwise
+ push(@lines, $_) unless $in_titlepage;
+ push(@lines, &debug("</center>\n", __LINE__)) if ($tag eq 'center');
+}
+
+# finish TOC
+$level = 0;
+while ($level < $curlevel) {
+ $curlevel--;
+ push(@toc_lines, "</UL>\n");
+}
+
+print "# end of pass 1\n" if $T2H_VERBOSE;
+
+SetDocumentLanguage('en') unless ($T2H_LANG);
+#+++############################################################################
+# #
+# Stuff related to Index generation #
+# #
+#---############################################################################
+
+sub EnterIndexEntry
+{
+ my $prefix = shift;
+ my $key = shift;
+ my $docu_doc = shift;
+ my $section = shift;
+ my $lines = shift;
+ local $_;
+
+ warn "$ERROR Undefined index command: $_", next
+ unless (exists ($index_properties->{$prefix}));
+ $key =~ s/\s+$//;
+ $_ = $key;
+ &protect_texi;
+ $key = $_;
+ $_ = &protect_html($_);
+ my $html_key = substitute_style($_);
+ my $id;
+ $key = remove_style($key);
+ $key = remove_things($key);
+ $_ = $key;
+ &unprotect_texi;
+ $key = $_;
+ while (exists $index->{$prefix}->{$key}) {$key .= ' '};
+ if ($lines->[$#lines] =~ /^<!--docid::(.+)::-->$/)
+ {
+ $id = $1;
+ }
+ else
+ {
+ $id = 'IDX' . ++$idx_num;
+ push(@$lines, &t2h_anchor($id, '', $T2H_INVISIBLE_MARK, !$in_pre));
+ }
+ $index->{$prefix}->{$key}->{html_key} = $html_key;
+ $index->{$prefix}->{$key}->{section} = $section;
+ $index->{$prefix}->{$key}->{href} = "$docu_doc#$id";
+ print "# found ${prefix}index for '$key' with id $id\n"
+ if $T2H_DEBUG & $DEBUG_INDEX;
+}
+
+sub IndexName2Prefix
+{
+ my $name = shift;
+ my $prefix;
+
+ for $prefix (keys %$index_properties)
+ {
+ return $prefix if ($index_properties->{$prefix}->{name} eq $name);
+ }
+ return undef;
+}
+
+sub GetIndexEntries
+{
+ my $normal = shift;
+ my $code = shift;
+ my ($entries, $prefix, $key) = ({});
+
+ for $prefix (keys %$normal)
+ {
+ for $key (keys %{$index->{$prefix}})
+ {
+ $entries->{$key} = {%{$index->{$prefix}->{$key}}};
+ }
+ }
+
+ if (defined($code))
+ {
+ for $prefix (keys %$code)
+ {
+ unless (exists $normal->{$keys})
+ {
+ for $key (keys %{$index->{$prefix}})
+ {
+ $entries->{$key} = {%{$index->{$prefix}->{$key}}};
+ $entries->{$key}->{html_key} = "<CODE>$entries->{$key}->{html_key}</CODE>";
+ }
+ }
+ }
+ }
+ return $entries;
+}
+
+sub byAlpha
+{
+ if ($a =~ /^[A-Za-z]/)
+ {
+ if ($b =~ /^[A-Za-z]/)
+ {
+ return lc($a) cmp lc($b);
+ }
+ else
+ {
+ return 1;
+ }
+ }
+ elsif ($b =~ /^[A-Za-z]/)
+ {
+ return -1;
+ }
+ else
+ {
+ return lc($a) cmp lc($b);
+ }
+}
+
+sub GetIndexPages
+{
+ my $entries = shift;
+ my (@Letters, $key);
+ my ($EntriesByLetter, $Pages, $page) = ({}, [], {});
+ my @keys = sort byAlpha keys %$entries;
+
+ for $key (@keys)
+ {
+ push @{$EntriesByLetter->{uc(substr($key,0, 1))}} , $entries->{$key};
+ }
+ @Letters = sort byAlpha keys %$EntriesByLetter;
+
+ $T2H_SPLIT_INDEX = 0 unless ($T2H_SPLIT);
+
+ unless ($T2H_SPLIT_INDEX)
+ {
+ $page->{First} = $Letters[0];
+ $page->{Last} = $Letters[$#Letters];
+ $page->{Letters} = \@Letters;
+ $page->{EntriesByLetter} = $EntriesByLetter;
+ push @$Pages, $page;
+ return $Pages;
+ }
+
+ if ($T2H_SPLIT_INDEX =~ /^\d+$/)
+ {
+ my $i = 0;
+ my ($prev_letter, $letter);
+ $page->{First} = $Letters[0];
+ for $letter (@Letters)
+ {
+ if ($i > $T2H_SPLIT_INDEX)
+ {
+ $page->{Last} = $prev_letter;
+ push @$Pages, {%$page};
+ $page->{Letters} = [];
+ $page->{EntriesByLetter} = {};
+ $page->{First} = $letter;
+ $i=0;
+ }
+ push @{$page->{Letters}}, $letter;
+ $page->{EntriesByLetter}->{$letter} = [@{$EntriesByLetter->{$letter}}];
+ $i += scalar(@{$EntriesByLetter->{$letter}});
+ $prev_letter = $letter;
+ }
+ $page->{Last} = $Letters[$#Letters];
+ push @$Pages, {%$page};
+ }
+ return $Pages;
+}
+
+sub GetIndexSummary
+{
+ my $first_page = shift;
+ my $Pages = shift;
+ my $name = shift;
+ my ($page, $letter, $summary, $i, $l1, $l2, $l);
+
+ $i = 0;
+ $summary = '<table><tr><th valign=top>Jump to: &nbsp; </th><td>';
+
+ for $page ($first_page, @$Pages)
+ {
+ for $letter (@{$page->{Letters}})
+ {
+ $l = t2h_anchor('', "$page->{href}#${name}_$letter", "<b>$letter</b>",
+ 0, 'style="text-decoration:none"') . "\n &nbsp; \n";
+
+ if ($letter =~ /^[A-Za-z]/)
+ {
+ $l2 .= $l;
+ }
+ else
+ {
+ $l1 .= $l;
+ }
+ }
+ }
+ $summary .= $l1 . "<BR>\n" if ($l1);
+ $summary .= $l2 . '</td></tr></table><br>';
+ return $summary;
+}
+
+sub PrintIndexPage
+{
+ my $lines = shift;
+ my $summary = shift;
+ my $page = shift;
+ my $name = shift;
+
+ push @$lines, $summary;
+
+ push @$lines , <<EOT;
+<P></P>
+<TABLE border=0>
+<TR><TD></TD><TH ALIGN=LEFT>Index Entry</TH><TH ALIGN=LEFT> Section</TH></TR>
+<TR><TD COLSPAN=3> <HR></TD></TR>
+EOT
+
+ for $letter (@{$page->{Letters}})
+ {
+ push @$lines, "<TR><TH><A NAME=\"${name}_$letter\"></A>$letter</TH><TD></TD><TD></TD></TR>\n";
+ for $entry (@{$page->{EntriesByLetter}->{$letter}})
+ {
+ push @$lines,
+ "<TR><TD></TD><TD valign=top>" .
+ t2h_anchor('', $entry->{href}, $entry->{html_key}) .
+ "</TD><TD valign=top>" .
+ t2h_anchor('', sec_href($entry->{section}), clean_name($entry->{section})) .
+ "</TD></TR>\n";
+ }
+ push @$lines, "<TR><TD COLSPAN=3> <HR></TD></TR>\n";
+ }
+ push @$lines, "</TABLE><P></P>";
+ push @$lines, $summary;
+}
+
+sub PrintIndex
+{
+ my $lines = shift;
+ my $name = shift;
+ my $section = shift;
+ $section = 'Top' unless $section;
+ my $prefix = IndexName2Prefix($name);
+
+ warn ("$ERROR printindex: bad index name: $name"), return
+ unless $prefix;
+
+ if ($index_properties->{$prefix}->{code})
+ {
+ $index_properties->{$prefix}->{from_code}->{$prefix} = 1;
+ }
+ else
+ {
+ $index_properties->{$prefix}->{from}->{$prefix}= 1;
+ }
+
+ my $Entries = GetIndexEntries($index_properties->{$prefix}->{from},
+ $index_properties->{$prefix}->{from_code});
+ return unless %$Entries;
+
+ if ($T2H_IDX_SUMMARY)
+ {
+ my $key;
+ open(FHIDX, ">$docu_rdir$docu_name" . "_$name.idx")
+ || die "Can't open > $docu_rdir$docu_name" . "_$name.idx for writing: $!\n";
+ print "# writing $name index summary in $docu_rdir$docu_name" . "_$name.idx...\n" if $T2H_VERBOSE;
+
+ for $key (sort keys %$Entries)
+ {
+ print FHIDX "$key\t$Entries->{$key}->{href}\n";
+ }
+ }
+
+ my $Pages = GetIndexPages($Entries);
+ my $page;
+ my $first_page = shift @$Pages;
+ my $sec_name = $section;
+ # remove section number
+ $sec_name =~ s/.*? // if $sec_name =~ /^([A-Z]|\d+)\./;
+
+ ($first_page->{href} = sec_href($section)) =~ s/\#.*$//;
+ # Update tree structure of document
+ if (@$Pages)
+ {
+ my $sec;
+ my @after;
+
+ while (@sections && $sections[$#sections] ne $section)
+ {
+ unshift @after, pop @sections;
+ }
+
+ for $page (@$Pages)
+ {
+ my $node = ($page->{First} ne $page->{Last} ?
+ "$sec_name: $page->{First} -- $page->{Last}" :
+ "$sec_name: $page->{First}");
+ push @sections, $node;
+ $node2sec{$node} = $node;
+ $sec2node{$node} = $node;
+ $node2up{$node} = $section;
+ $page->{href} = next_doc();
+ $page->{name} = $node;
+ $node2href{$node} = $page->{href};
+ if ($prev_node)
+ {
+ $node2next{$prev_node} = $node;
+ $node2prev{$node} = $prev_node;
+ }
+ $prev_node = $node;
+ }
+ push @sections, @after;
+ }
+
+ my $summary = GetIndexSummary($first_page, $Pages, $name);
+ PrintIndexPage($lines, $summary, $first_page, $name);
+ for $page (@$Pages)
+ {
+ push @$lines, ($T2H_SPLIT eq 'chapter' ? $CHAPTEREND : $SECTIONEND);
+ push @$lines, "<H2 ALIGN=\"Left\">$page->{name}</H2>\n";
+ PrintIndexPage($lines, $summary, $page, $name);
+ }
+}
+
+
+#+++############################################################################
+# #
+# Pass 2/3: handle style, menu, index, cross-reference #
+# #
+#---############################################################################
+
+@lines2 = (); # whole document (2nd pass)
+@lines3 = (); # whole document (3rd pass)
+$in_menu = 0; # am I inside a menu
+
+while (@lines) {
+ $_ = shift(@lines);
+ #
+ # special case (protected sections)
+ #
+ if (/^$PROTECTTAG/o) {
+ push(@lines2, $_);
+ next;
+ }
+ #
+ # menu
+ #
+ if (/^\@menu\b/)
+ {
+ $in_menu = 1;
+ $in_menu_listing = 1;
+ push(@lines2, &debug("<BLOCKQUOTE><TABLE BORDER=0 CELLSPACING=0> \n", __LINE__));
+ next;
+ }
+ if (/^\@end\s+menu\b/)
+ {
+ if ($in_menu_listing)
+ {
+ push(@lines2, &debug("</TABLE></BLOCKQUOTE>\n", __LINE__));
+ }
+ else
+ {
+ push(@lines2, &debug("</BLOCKQUOTE>\n", __LINE__));
+ }
+ $in_menu = 0;
+ $in_menu_listing = 0;
+ next;
+ }
+ if ($in_menu)
+ {
+ my ($node, $name, $descr);
+ if (/^\*\s+($NODERE)::/o)
+ {
+ $node = $1;
+ $descr = $';
+ }
+ elsif (/^\*\s+(.+):\s+([^\t,\.\n]+)[\t,\.\n]/)
+ {
+ $name = $1;
+ $node = $2;
+ $descr = $';
+ }
+ elsif (/^\*/)
+ {
+ warn "$ERROR Bad menu line: $_";
+ }
+ else
+ {
+ if ($in_menu_listing)
+ {
+ $in_menu_listing = 0;
+ push(@lines2, &debug("</TABLE>\n", __LINE__));
+ }
+ # should be like verbatim -- preseve spaces, etc
+ s/ /\&nbsp;/g;
+ $_ .= "<br>\n";
+ push(@lines2, $_);
+ }
+ if ($node)
+ {
+ if (! $in_menu_listing)
+ {
+ $in_menu_listing = 1;
+ push(@lines2, &debug("<TABLE BORDER=0 CELLSPACING=0>\n", __LINE__));
+ }
+ # look for continuation
+ while ($lines[0] =~ /^\s+\w+/)
+ {
+ $descr .= shift(@lines);
+ }
+ &menu_entry($node, $name, $descr);
+ }
+ next;
+ }
+ #
+ # printindex
+ #
+ PrintIndex(\@lines2, $2, $1), next
+ if (/^<!--::(.*)::-->\@printindex\s+(\w+)/);
+ #
+ # simple style substitutions
+ #
+ $_ = &substitute_style($_);
+ #
+ # xref
+ #
+ while (/\@(x|px|info|)ref{([^{}]+)(}?)/) {
+ # note: Texinfo may accept other characters
+ ($type, $nodes, $full) = ($1, $2, $3);
+ ($before, $after) = ($`, $');
+ if (! $full && $after) {
+ warn "$ERROR Bad xref (no ending } on line): $_";
+ $_ = "$before$;0${type}ref\{$nodes$after";
+ next; # while xref
+ }
+ if ($type eq 'x') {
+ $type = "$T2H_WORDS->{$T2H_LANG}->{'See'} ";
+ } elsif ($type eq 'px') {
+ $type = "$T2H_WORDS->{$T2H_LANG}->{'see'} ";
+ } elsif ($type eq 'info') {
+ $type = "$T2H_WORDS->{$T2H_LANG}->{'See'} Info";
+ } else {
+ $type = '';
+ }
+ unless ($full) {
+ $next = shift(@lines);
+ $next = &substitute_style($next);
+ chop($nodes); # remove final newline
+ if ($next =~ /\}/) { # split on 2 lines
+ $nodes .= " $`";
+ $after = $';
+ } else {
+ $nodes .= " $next";
+ $next = shift(@lines);
+ $next = &substitute_style($next);
+ chop($nodes);
+ if ($next =~ /\}/) { # split on 3 lines
+ $nodes .= " $`";
+ $after = $';
+ } else {
+ warn "$ERROR Bad xref (no ending }): $_";
+ $_ = "$before$;0xref\{$nodes$after";
+ unshift(@lines, $next);
+ next; # while xref
+ }
+ }
+ }
+ $nodes =~ s/\s+/ /g; # remove useless spaces
+ @args = split(/\s*,\s*/, $nodes);
+ $node = $args[0]; # the node is always the first arg
+ $node = &normalise_node($node);
+ $sec = $args[2] || $args[1] || $node2sec{$node};
+ $href = $node2href{$node};
+ if (@args == 5) { # reference to another manual
+ $sec = $args[2] || $node;
+ $man = $args[4] || $args[3];
+ $_ = "${before}${type}$T2H_WORDS->{$T2H_LANG}->{'section'} `$sec' in \@cite{$man}$after";
+ } elsif ($type =~ /Info/) { # inforef
+ warn "$ERROR Wrong number of arguments: $_" unless @args == 3;
+ ($nn, $_, $in) = @args;
+ $_ = "${before}${type} file `$in', node `$nn'$after";
+ } elsif ($sec && $href && ! $T2H_SHORT_REF) {
+ $_ = "${before}${type}";
+ $_ .= "$T2H_WORDS->{$T2H_LANG}->{'section'} " if ${type};
+ $_ .= &t2h_anchor('', $href, $sec) . $after;
+ }
+ elsif ($href)
+ {
+ $_ = "${before}${type} " .
+ &t2h_anchor('', $href, $args[2] || $args[1] || $node) .
+ $after;
+ }
+ else {
+ warn "$ERROR Undefined node ($node): $_";
+ $_ = "$before$;0xref{$nodes}$after";
+ }
+ }
+
+ # replace images
+ s[\@image\s*{(.+?)}]
+ {
+ my @args = split (/\s*,\s*/, $1);
+ my $base = $args[0];
+ my $image =
+ LocateIncludeFile("$base.png") ||
+ LocateIncludeFile("$base.jpg") ||
+ LocateIncludeFile("$base.gif");
+ warn "$ERROR no image file for $base: $_" unless ($image && -e $image);
+ "<IMG SRC=\"$image\" ALT=\"$base\">";
+ ($T2H_CENTER_IMAGE ?
+ "<CENTER><IMG SRC=\"$image\" ALT=\"$base\"></CENTER>" :
+ "<IMG SRC=\"$image\" ALT=\"$base\">");
+ }eg;
+
+ #
+ # try to guess bibliography references or glossary terms
+ #
+ unless (/^<H\d><A NAME=\"SEC\d/) {
+ if ($use_bibliography) {
+ $done = '';
+ while (/$BIBRE/o) {
+ ($pre, $what, $post) = ($`, $&, $');
+ $href = $bib2href{$what};
+ if (defined($href) && $post !~ /^[^<]*<\/A>/) {
+ $done .= $pre . &t2h_anchor('', $href, $what);
+ } else {
+ $done .= "$pre$what";
+ }
+ $_ = $post;
+ }
+ $_ = $done . $_;
+ }
+ if ($T2H_USE_GLOSSARY) {
+ $done = '';
+ while (/\b\w+\b/) {
+ ($pre, $what, $post) = ($`, $&, $');
+ $entry = $what;
+ $entry =~ tr/A-Z/a-z/ unless $entry =~ /^[A-Z\s]+$/;
+ $href = $gloss2href{$entry};
+ if (defined($href) && $post !~ /^[^<]*<\/A>/) {
+ $done .= $pre . &t2h_anchor('', $href, $what);
+ } else {
+ $done .= "$pre$what";
+ }
+ $_ = $post;
+ }
+ $_ = $done . $_;
+ }
+ }
+ # otherwise
+ push(@lines2, $_);
+}
+print "# end of pass 2\n" if $T2H_VERBOSE;
+
+#
+# split style substitutions
+#
+while (@lines2) {
+ $_ = shift(@lines2);
+ #
+ # special case (protected sections)
+ #
+ if (/^$PROTECTTAG/o) {
+ push(@lines3, $_);
+ next;
+ }
+ #
+ # split style substitutions
+ #
+ $old = '';
+ while ($old ne $_) {
+ $old = $_;
+ if (/\@(\w+)\{/) {
+ ($before, $style, $after) = ($`, $1, $');
+ if (defined($style_map{$style})) {
+ $_ = $after;
+ $text = '';
+ $after = '';
+ $failed = 1;
+ while (@lines2) {
+ if (/\}/) {
+ $text .= $`;
+ $after = $';
+ $failed = 0;
+ last;
+ } else {
+ $text .= $_;
+ $_ = shift(@lines2);
+ }
+ }
+ if ($failed) {
+ die "* Bad syntax (\@$style) after: $before\n";
+ } else {
+ $text = &apply_style($style, $text);
+ $_ = "$before$text$after";
+ }
+ }
+ }
+ }
+ # otherwise
+ push(@lines3, $_);
+}
+print "# end of pass 3\n" if $T2H_VERBOSE;
+
+#+++############################################################################
+# #
+# Pass 4: foot notes, final cleanup #
+# #
+#---############################################################################
+
+@foot_lines = (); # footnotes
+@doc_lines = (); # final document
+$end_of_para = 0; # true if last line is <P>
+
+while (@lines3) {
+ $_ = shift(@lines3);
+ #
+ # special case (protected sections)
+ #
+ if (/^$PROTECTTAG/o) {
+ push(@doc_lines, $_);
+ $end_of_para = 0;
+ next;
+ }
+ #
+ # footnotes
+ #
+ while (/\@footnote([^\{\s]+)\{/) {
+ ($before, $d, $after) = ($`, $1, $');
+ $_ = $after;
+ $text = '';
+ $after = '';
+ $failed = 1;
+ while (@lines3) {
+ if (/\}/) {
+ $text .= $`;
+ $after = $';
+ $failed = 0;
+ last;
+ } else {
+ $text .= $_;
+ $_ = shift(@lines3);
+ }
+ }
+ if ($failed) {
+ die "* Bad syntax (\@footnote) after: $before\n";
+ } else {
+ $foot_num++;
+ $docid = "DOCF$foot_num";
+ $footid = "FOOT$foot_num";
+ $foot = "($foot_num)";
+ push(@foot_lines, "<H3>" . &t2h_anchor($footid, "$d#$docid", $foot) . "</H3>\n");
+ $text = "<P>$text" unless $text =~ /^\s*<P>/;
+ push(@foot_lines, "$text\n");
+ $_ = $before . &t2h_anchor($docid, "$docu_foot#$footid", $foot) . $after;
+ }
+ }
+ #
+ # remove unnecessary <P>
+ #
+ if (/^\s*<P>\s*$/) {
+ next if $end_of_para++;
+ } else {
+ $end_of_para = 0;
+ }
+ # otherwise
+ push(@doc_lines, $_);
+}
+
+print "# end of pass 4\n" if $T2H_VERBOSE;
+
+#+++############################################################################
+# #
+# Pass 5: print things #
+# #
+#---############################################################################
+
+$T2H_L2H = &l2h_FinishToLatex if ($T2H_L2H);
+$T2H_L2H = &l2h_ToHtml if ($T2H_L2H);
+$T2H_L2H = &l2h_InitFromHtml if ($T2H_L2H);
+
+# fix node2up, node2prev, node2next, if desired
+if ($has_top_command)
+{
+ for $section (keys %sec2number)
+ {
+ $node = $sec2node{$section};
+ $node2up{$node} = Sec2UpNode($section) unless $node2up{$node};
+ $node2prev{$node} = Sec2PrevNode($section) unless $node2prev{$node};
+ $node2next{$node} = Sec2NextNode($section) unless $node2next{$node};
+ }
+}
+
+# prepare %T2H_THISDOC
+$T2H_THISDOC{fulltitle} = $value{'_title'} || $value{'_settitle'} || "Untitled Document";
+$T2H_THISDOC{title} = $value{'_settitle'} || $T2H_THISDOC{fulltitle};
+$T2H_THISDOC{author} = $value{'_author'};
+$T2H_THISDOC{subtitle} = $value{'_subtitle'};
+$T2H_THISDOC{shorttitle} = $value{'_shorttitle'};
+for $key (keys %T2H_THISDOC)
+{
+ $_ = &substitute_style($T2H_THISDOC{$key});
+ &unprotect_texi;
+ s/\s*$//;
+ $T2H_THISDOC{$key} = $_;
+}
+
+# if no sections, then simply print document as is
+unless (@sections)
+{
+ print "# Writing content into $docu_top_file \n" if $T2H_VERBOSE;
+ open(FILE, "> $docu_top_file")
+ || die "$ERROR: Can't open $docu_top_file for writing: $!\n";
+
+ &$T2H_print_page_head(\*FILE);
+ $T2H_THIS_SECTION = \@doc_lines;
+ t2h_print_lines(\*FILE);
+ &$T2H_print_foot_navigation(\*FILE);
+ &$T2H_print_page_foot(\*FILE);
+ close(FILE);
+ goto Finish;
+}
+
+# initialize $T2H_HREF, $T2H_NAME
+%T2H_HREF =
+ (
+ 'First' , sec_href($sections[0]),
+ 'Last', sec_href($sections[$#sections]),
+ 'About', $docu_about. '#SEC_About',
+ );
+
+# prepare TOC, OVERVIEW, TOP
+$T2H_TOC = \@toc_lines;
+$T2H_OVERVIEW = \@stoc_lines;
+if ($has_top)
+{
+ while (1)
+ {
+ $_ = shift @doc_lines;
+ last if /$TOPEND/;
+ push @$T2H_TOP, $_;
+ }
+ $T2H_HREF{'Top'} = $docu_top . '#SEC_Top';
+}
+else
+{
+ $T2H_HREF{'Top'} = $T2H_HREF{First};
+}
+
+$node2href{Top} = $T2H_HREF{Top};
+$T2H_HREF{Contents} = $docu_toc.'#SEC_Contents' if @toc_lines;
+$T2H_HREF{Overview} = $docu_stoc.'#SEC_OVERVIEW' if @stoc_lines;
+
+# settle on index
+if ($T2H_INDEX_CHAPTER)
+{
+ $T2H_HREF{Index} = $node2href{normalise_node($T2H_INDEX_CHAPTER)};
+ warn "$ERROR T2H_INDEX_CHAPTER '$T2H_INDEX_CHAPTER' not found\n"
+ unless $T2H_HREF{Index};
+}
+if (! $T2H_HREF{Index} && $first_index_chapter)
+{
+ $T2H_INDEX_CHAPTER = $first_index_chapter;
+ $T2H_HREF{Index} = $node2href{$T2H_INDEX_CHAPTER};
+}
+
+print "# Using '" . clean_name($T2H_INDEX_CHAPTER) . "' as index page\n"
+ if ($T2H_VERBOSE && $T2H_HREF{Index});
+
+%T2H_NAME =
+ (
+ 'First', clean_name($sec2node{$sections[0]}),
+ 'Last', clean_name($sec2node{$sections[$#sections]}),
+ 'About', $T2H_WORDS->{$T2H_LANG}->{'About_Title'},
+ 'Contents', $T2H_WORDS->{$T2H_LANG}->{'ToC_Title'},
+ 'Overview', $T2H_WORDS->{$T2H_LANG}->{'Overview_Title'},
+ 'Index' , clean_name($T2H_INDEX_CHAPTER),
+ 'Top', clean_name($T2H_TOP_HEADING || $T2H_THISDOC{'title'} || $T2H_THISDOC{'shorttitle'}),
+ );
+
+#############################################################################
+# print frame and frame toc file
+#
+if ( $T2H_FRAMES )
+{
+ open(FILE, "> $docu_frame_file")
+ || die "$ERROR: Can't open $docu_frame_file for writing: $!\n";
+ print "# Creating frame in $docu_frame_file ...\n" if $T2H_VERBOSE;
+ &$T2H_print_frame(\*FILE);
+ close(FILE);
+
+ open(FILE, "> $docu_toc_frame_file")
+ || die "$ERROR: Can't open $docu_toc_frame_file for writing: $!\n";
+ print "# Creating toc frame in $docu_frame_file ...\n" if $T2H_VERBOSE;
+ &$T2H_print_toc_frame(\*FILE);
+ close(FILE);
+}
+
+
+#############################################################################
+# print Top
+#
+open(FILE, "> $docu_top_file")
+ || die "$ERROR: Can't open $docu_top_file for writing: $!\n";
+&$T2H_print_page_head(\*FILE) unless ($T2H_SPLIT);
+
+if ($has_top)
+{
+ print "# Creating Top in $docu_top_file ...\n" if $T2H_VERBOSE;
+ $T2H_THIS_SECTION = $T2H_TOP;
+ $T2H_HREF{This} = $T2H_HREF{Top};
+ $T2H_NAME{This} = $T2H_NAME{Top};
+ &$T2H_print_Top(\*FILE);
+}
+
+close(FILE) if $T2H_SPLIT;
+
+#############################################################################
+# Print sections
+#
+$T2H_NODE{Forward} = $sec2node{$sections[0]};
+$T2H_NAME{Forward} = &clean_name($sec2node{$sections[0]});
+$T2H_HREF{Forward} = sec_href($sections[0]);
+$T2H_NODE{This} = 'Top';
+$T2H_NAME{This} = $T2H_NAME{Top};
+$T2H_HREF{This} = $T2H_HREF{Top};
+if ($T2H_SPLIT)
+{
+ print "# writing " . scalar(@sections) .
+ " sections in $docu_rdir$docu_name"."_[1..$doc_num]"
+ if $T2H_VERBOSE;
+ $previous = ($T2H_SPLIT eq 'chapter' ? $CHAPTEREND : $SECTIONEND);
+ undef $FH;
+ $doc_num = 0;
+}
+else
+{
+ print "# writing " . scalar(@sections) . " sections in $docu_top_file ..."
+ if $T2H_VERBOSE;
+ $FH = \*FILE;
+ $previous = '';
+}
+
+$counter = 0;
+# loop through sections
+while ($section = shift(@sections))
+{
+ if ($T2H_SPLIT && ($T2H_SPLIT eq 'section' || $previous eq $CHAPTEREND))
+ {
+ if ($FH)
+ {
+ #close previous page
+ &$T2H_print_chapter_footer($FH) if $T2H_SPLIT eq 'chapter';
+ &$T2H_print_page_foot($FH);
+ close($FH);
+ undef $FH;
+ }
+ }
+ $T2H_NAME{Back} = $T2H_NAME{This};
+ $T2H_HREF{Back} = $T2H_HREF{This};
+ $T2H_NODE{Back} = $T2H_NODE{This};
+ $T2H_NAME{This} = $T2H_NAME{Forward};
+ $T2H_HREF{This} = $T2H_HREF{Forward};
+ $T2H_NODE{This} = $T2H_NODE{Forward};
+ if ($sections[0])
+ {
+ $T2H_NODE{Forward} = $sec2node{$sections[0]};
+ $T2H_NAME{Forward} = &clean_name($T2H_NODE{Forward});
+ $T2H_HREF{Forward} = sec_href($sections[0]);
+ }
+ else
+ {
+ undef $T2H_HREF{Forward}, $T2H_NODE{Forward}, $T2H_NAME{Forward};
+ }
+
+ $node = $node2up{$T2H_NODE{This}};
+ $T2H_HREF{Up} = $node2href{$node};
+ if ($T2H_HREF{Up} eq $T2H_HREF{This} || ! $T2H_HREF{Up})
+ {
+ $T2H_NAME{Up} = $T2H_NAME{Top};
+ $T2H_HREF{Up} = $T2H_HREF{Top};
+ $T2H_NODE{Up} = 'Up';
+ }
+ else
+ {
+ $T2H_NAME{Up} = &clean_name($node);
+ $T2H_NODE{Up} = $node;
+ }
+
+ $node = $T2H_NODE{This};
+ $node = $node2prev{$node};
+ $T2H_NAME{Prev} = &clean_name($node);
+ $T2H_HREF{Prev} = $node2href{$node};
+ $T2H_NODE{Prev} = $node;
+
+ $node = $T2H_NODE{This};
+ if ($node2up{$node} && $node2up{$node} ne 'Top'&&
+ ($node2prev{$node} eq $T2H_NODE{Back} || ! $node2prev{$node}))
+ {
+ $node = $node2up{$node};
+ while ($node && $node ne $node2up{$node} && ! $node2prev{$node})
+ {
+ $node = $node2up{$node};
+ }
+ $node = $node2prev{$node}
+ unless $node2up{$node} eq 'Top' || ! $node2up{$node};
+ }
+ else
+ {
+ $node = $node2prev{$node};
+ }
+ $T2H_NAME{FastBack} = &clean_name($node);
+ $T2H_HREF{FastBack} = $node2href{$node};
+ $T2H_NODE{FastBack} = $node;
+
+ $node = $T2H_NODE{This};
+ $node = $node2next{$node};
+ $T2H_NAME{Next} = &clean_name($node);
+ $T2H_HREF{Next} = $node2href{$node};
+ $T2H_NODE{Next} = $node;
+
+ $node = $T2H_NODE{This};
+ if ($node2up{$node} && $node2up{$node} ne 'Top'&&
+ ($node2next{$node} eq $T2H_NODE{Forward} || ! $node2next{$node}))
+ {
+ $node = $node2up{$node};
+ while ($node && $node ne $node2up{$node} && ! $node2next{$node})
+ {
+ $node = $node2up{$node};
+ }
+ }
+ $node = $node2next{$node};
+ $T2H_NAME{FastForward} = &clean_name($node);
+ $T2H_HREF{FastForward} = $node2href{$node};
+ $T2H_NODE{FastForward} = $node;
+
+ if (! defined($FH))
+ {
+ my $file = $T2H_HREF{This};
+ $file =~ s/\#.*$//;
+ open(FILE, "> $docu_rdir$file") ||
+ die "$ERROR: Can't open $docu_rdir$file for writing: $!\n";
+ $FH = \*FILE;
+ &$T2H_print_page_head($FH);
+ t2h_print_label($FH);
+ &$T2H_print_chapter_header($FH) if $T2H_SPLIT eq 'chapter';
+ }
+ else
+ {
+ t2h_print_label($FH);
+ }
+
+ $T2H_THIS_SECTION = [];
+ while (@doc_lines) {
+ $_ = shift(@doc_lines);
+ last if ($_ eq $SECTIONEND || $_ eq $CHAPTEREND);
+ push(@$T2H_THIS_SECTION, $_);
+ }
+ $previous = $_;
+ &$T2H_print_section($FH);
+
+ if ($T2H_VERBOSE)
+ {
+ $counter++;
+ print "." if $counter =~ /00$/;
+ }
+}
+if ($T2H_SPLIT)
+{
+ &$T2H_print_chapter_footer($FH) if $T2H_SPLIT eq 'chapter';
+ &$T2H_print_page_foot($FH);
+ close($FH);
+}
+print "\n" if $T2H_VERBOSE;
+
+#############################################################################
+# Print ToC, Overview, Footnotes
+#
+undef $T2H_HREF{Prev};
+undef $T2H_HREF{Next};
+undef $T2H_HREF{Back};
+undef $T2H_HREF{Forward};
+undef $T2H_HREF{Up};
+
+if (@foot_lines)
+{
+ print "# writing Footnotes in $docu_foot_file...\n" if $T2H_VERBOSE;
+ open (FILE, "> $docu_foot_file") || die "$ERROR: Can't open $docu_foot_file for writing: $!\n"
+ if $T2H_SPLIT;
+ $T2H_HREF{This} = $docu_foot;
+ $T2H_NAME{This} = $T2H_WORDS->{$T2H_LANG}->{'Footnotes_Title'};
+ $T2H_THIS_SECTION = \@foot_lines;
+ &$T2H_print_Footnotes(\*FILE);
+ close(FILE) if $T2H_SPLIT;
+}
+
+if (@toc_lines)
+{
+ print "# writing Toc in $docu_toc_file...\n" if $T2H_VERBOSE;
+ open (FILE, "> $docu_toc_file") || die "$ERROR: Can't open $docu_toc_file for writing: $!\n"
+ if $T2H_SPLIT;
+ $T2H_HREF{This} = $T2H_HREF{Contents};
+ $T2H_NAME{This} = $T2H_NAME{Contents};
+ $T2H_THIS_SECTION = \@toc_lines;
+ &$T2H_print_Toc(\*FILE);
+ close(FILE) if $T2H_SPLIT;
+}
+
+if (@stoc_lines)
+{
+ print "# writing Overview in $docu_stoc_file...\n" if $T2H_VERBOSE;
+ open (FILE, "> $docu_stoc_file") || die "$ERROR: Can't open $docu_stoc_file for writing: $!\n"
+ if $T2H_SPLIT;
+
+ $T2H_HREF{This} = $T2H_HREF{Overview};
+ $T2H_NAME{This} = $T2H_NAME{Overview};
+ $T2H_THIS_SECTION = \@stoc_lines;
+ unshift @$T2H_THIS_SECTION, "<BLOCKQUOTE>\n";
+ push @$T2H_THIS_SECTION, "\n</BLOCKQUOTE>\n";
+ &$T2H_print_Overview(\*FILE);
+ close(FILE) if $T2H_SPLIT;
+}
+
+if ($about_body = &$T2H_about_body())
+{
+ print "# writing About in $docu_about_file...\n" if $T2H_VERBOSE;
+ open (FILE, "> $docu_about_file") || die "$ERROR: Can't open $docu_about_file for writing: $!\n"
+ if $T2H_SPLIT;
+
+ $T2H_HREF{This} = $T2H_HREF{About};
+ $T2H_NAME{This} = $T2H_NAME{About};
+ $T2H_THIS_SECTION = [$about_body];
+ &$T2H_print_About(\*FILE);
+ close(FILE) if $T2H_SPLIT;
+}
+
+unless ($T2H_SPLIT)
+{
+ &$T2H_print_page_foot(\*FILE);
+ close (FILE);
+}
+
+Finish:
+&l2h_FinishFromHtml if ($T2H_L2H);
+&l2h_Finish if($T2H_L2H);
+print "# that's all folks\n" if $T2H_VERBOSE;
+
+exit(0);
+
+#+++############################################################################
+# #
+# Low level functions #
+# #
+#---############################################################################
+
+sub LocateIncludeFile
+{
+ my $file = shift;
+ my $dir;
+
+ return $file if (-e $file && -r $file);
+ foreach $dir (@T2H_INCLUDE_DIRS)
+ {
+ return "$dir/$file" if (-e "$dir/$file" && -r "$dir/$file");
+ }
+ return undef;
+}
+
+sub clean_name
+{
+ local ($_);
+ $_ = &remove_style($_[0]);
+ &unprotect_texi;
+ return $_;
+}
+
+sub update_sec_num {
+ local($name, $level) = @_;
+ my $ret;
+
+ $level--; # here we start at 0
+ if ($name =~ /^appendix/ || defined(@appendix_sec_num)) {
+ # appendix style
+ if (defined(@appendix_sec_num)) {
+ &incr_sec_num($level, @appendix_sec_num);
+ } else {
+ @appendix_sec_num = ('A', 0, 0, 0);
+ }
+ $ret = join('.', @appendix_sec_num[0..$level]);
+ } else {
+ # normal style
+ if (defined(@normal_sec_num))
+ {
+ &incr_sec_num($level, @normal_sec_num);
+ }
+ else
+ {
+ @normal_sec_num = (1, 0, 0, 0);
+ }
+ $ret = join('.', @normal_sec_num[0..$level]);
+ }
+
+ $ret .= "." if $level == 0;
+ return $ret;
+}
+
+sub incr_sec_num {
+ local($level, $l);
+ $level = shift(@_);
+ $_[$level]++;
+ foreach $l ($level+1 .. 3) {
+ $_[$l] = 0;
+ }
+}
+
+sub Sec2UpNode
+{
+ my $sec = shift;
+ my $num = $sec2number{$sec};
+
+ return '' unless $num;
+ return 'Top' unless $num =~ /\.\d+/;
+ $num =~ s/\.[^\.]*$//;
+ $num = $num . '.' unless $num =~ /\./;
+ return $sec2node{$number2sec{$num}};
+}
+
+sub Sec2PrevNode
+{
+ my $sec = shift;
+ my $num = $sec2number{$sec};
+ my ($i, $post);
+
+ if ($num =~ /(\w+)(\.$|$)/)
+ {
+ $num = $`;
+ $i = $1;
+ $post = $2;
+ if ($i eq 'A')
+ {
+ $i = $normal_sec_num[0];
+ }
+ elsif ($i ne '1')
+ {
+ # unfortunately, -- operator is not magical
+ $i = chr(ord($i) + 1);
+ }
+ else
+ {
+ return '';
+ }
+ return $sec2node{$number2sec{$num . $i . $post}}
+ }
+ return '';
+}
+
+sub Sec2NextNode
+{
+ my $sec = shift;
+ my $num = $sec2number{$sec};
+ my $i;
+
+ if ($num =~ /(\w+)(\.$|$)/)
+ {
+ $num = $`;
+ $i = $1;
+ $post = $2;
+ if ($post eq '.' && $i eq $normal_sec_num[0])
+ {
+ $i = 'A';
+ }
+ else
+ {
+ $i++;
+ }
+ return $sec2node{$number2sec{$num . $i . $post}}
+ }
+ return '';
+}
+
+sub check {
+ local($_, %seen, %context, $before, $match, $after);
+
+ while (<>) {
+ if (/\@(\*|\.|\:|\@|\{|\})/) {
+ $seen{$&}++;
+ $context{$&} .= "> $_" if $T2H_VERBOSE;
+ $_ = "$`XX$'";
+ redo;
+ }
+ if (/\@(\w+)/) {
+ ($before, $match, $after) = ($`, $&, $');
+ if ($before =~ /\b[\w-]+$/ && $after =~ /^[\w-.]*\b/) { # e-mail address
+ $seen{'e-mail address'}++;
+ $context{'e-mail address'} .= "> $_" if $T2H_VERBOSE;
+ } else {
+ $seen{$match}++;
+ $context{$match} .= "> $_" if $T2H_VERBOSE;
+ }
+ $match =~ s/^\@/X/;
+ $_ = "$before$match$after";
+ redo;
+ }
+ }
+
+ foreach (sort(keys(%seen))) {
+ if ($T2H_VERBOSE) {
+ print "$_\n";
+ print $context{$_};
+ } else {
+ print "$_ ($seen{$_})\n";
+ }
+ }
+}
+
+sub open {
+ local($name) = @_;
+
+ ++$fh_name;
+ if (open($fh_name, $name)) {
+ unshift(@fhs, $fh_name);
+ } else {
+ warn "$ERROR Can't read file $name: $!\n";
+ }
+}
+
+sub init_input {
+ @fhs = (); # hold the file handles to read
+ @input_spool = (); # spooled lines to read
+ $fh_name = 'FH000';
+ &open($docu);
+}
+
+sub next_line {
+ local($fh, $line);
+
+ if (@input_spool) {
+ $line = shift(@input_spool);
+ return($line);
+ }
+ while (@fhs) {
+ $fh = $fhs[0];
+ $line = <$fh>;
+ return($line) if $line;
+ close($fh);
+ shift(@fhs);
+ }
+ return(undef);
+}
+
+# used in pass 1, use &next_line
+sub skip_until {
+ local($tag) = @_;
+ local($_);
+
+ while ($_ = &next_line) {
+ return if /^\@end\s+$tag\s*$/;
+ }
+ die "* Failed to find '$tag' after: " . $lines[$#lines];
+}
+
+# used in pass 1 for l2h use &next_line
+sub string_until {
+ local($tag) = @_;
+ local($_, $string);
+
+ while ($_ = &next_line) {
+ return $string if /^\@end\s+$tag\s*$/;
+# $_ =~ s/hbox/mbox/g;
+ $string = $string.$_;
+ }
+ die "* Failed to find '$tag' after: " . $lines[$#lines];
+}
+
+#
+# HTML stacking to have a better HTML output
+#
+
+sub html_reset {
+ @html_stack = ('html');
+ $html_element = 'body';
+}
+
+sub html_push {
+ local($what) = @_;
+ push(@html_stack, $html_element);
+ $html_element = $what;
+}
+
+sub html_push_if {
+ local($what) = @_;
+ push(@html_stack, $html_element)
+ if ($html_element && $html_element ne 'P');
+ $html_element = $what;
+}
+
+sub html_pop {
+ $html_element = pop(@html_stack);
+}
+
+sub html_pop_if {
+ local($elt);
+
+ if (@_) {
+ foreach $elt (@_) {
+ if ($elt eq $html_element) {
+ $html_element = pop(@html_stack) if @html_stack;
+ last;
+ }
+ }
+ } else {
+ $html_element = pop(@html_stack) if @html_stack;
+ }
+}
+
+sub html_debug {
+ local($what, $line) = @_;
+ if ($T2H_DEBUG & $DEBUG_HTML)
+ {
+ $what = "\n" unless $what;
+ return("<!-- $line @html_stack, $html_element -->$what")
+ }
+ return($what);
+}
+
+# to debug the output...
+sub debug {
+ local($what, $line) = @_;
+ return("<!-- $line -->$what")
+ if $T2H_DEBUG & $DEBUG_HTML;
+ return($what);
+}
+
+sub SimpleTexi2Html
+{
+ local $_ = $_[0];
+ &protect_texi;
+ &protect_html;
+ $_ = substitute_style($_);
+ $_[0] = $_;
+}
+
+sub normalise_node {
+ local $_ = $_[0];
+ s/\s+/ /g;
+ s/ $//;
+ s/^ //;
+ &protect_texi;
+ &protect_html;
+ $_ = substitute_style($_);
+ $_[0] = $_;
+}
+
+sub menu_entry
+{
+ my ($node, $name, $descr) = @_;
+ my ($href, $entry);
+
+ &normalise_node($node);
+ $href = $node2href{$node};
+ if ($href)
+ {
+ $descr =~ s/^\s+//;
+ $descr =~ s/\s*$//;
+ $descr = SimpleTexi2Html($descr);
+ if ($T2H_NUMBER_SECTIONS && !$T2H_NODE_NAME_IN_MENU && $node2sec{$node})
+ {
+ $entry = $node2sec{$node};
+ $name = '';
+ }
+ else
+ {
+ &normalise_node($name);
+ $entry = ($name && ($name ne $node || ! $T2H_AVOID_MENU_REDUNDANCY)
+ ? "$name : $node" : $node);
+ }
+
+ if ($T2H_AVOID_MENU_REDUNDANCY && $descr)
+ {
+ my $clean_entry = $entry;
+ $clean_entry =~ s/^.*? // if ($clean_entry =~ /^([A-Z]|\d+)\.[\d\.]* /);
+ $clean_entry =~ s/[^\w]//g;
+ my $clean_descr = $descr;
+ $clean_descr =~ s/[^\w]//g;
+ $descr = '' if ($clean_entry eq $clean_descr)
+ }
+ push(@lines2,&debug('<TR><TD ALIGN="left" VALIGN="TOP">' .
+ &t2h_anchor('', $href, $entry) .
+ '</TD><TD>&nbsp;&nbsp;</TD><TD ALIGN="left" VALIGN="TOP">' .
+ $descr .
+ "</TD></TR>\n", __LINE__));
+ }
+ elsif ($node =~ /^\(.*\)\w+/)
+ {
+ push(@lines2,&debug('<TR><TD ALIGN="left" VALIGN="TOP">' .
+ $entry .
+ '</TD><TD ALIGN="left" VALIGN="TOP">' . $descr .
+ "</TD></TR>\n", __LINE__))
+ }
+ else
+ {
+ warn "$ERROR Undefined node of menu_entry ($node): $_";
+ }
+}
+
+sub do_ctrl { "^$_[0]" }
+
+sub do_email {
+ local($addr, $text) = split(/,\s*/, $_[0]);
+
+ $text = $addr unless $text;
+ &t2h_anchor('', "mailto:$addr", $text);
+}
+
+sub do_sc
+{
+ # l2h does this much better
+ return &l2h_ToLatex("{\\sc ".&unprotect_html($_[0])."}") if ($T2H_L2H);
+ return "\U$_[0]\E";
+}
+
+sub do_math
+{
+ return &l2h_ToLatex("\$".&unprotect_html($_[0])."\$") if ($T2H_L2H);
+ return "<EM>".$text."</EM>";
+}
+
+sub do_uref {
+ local($url, $text, $only_text) = split(/,\s*/, $_[0]);
+
+ $text = $only_text if $only_text;
+ $text = $url unless $text;
+ &t2h_anchor('', $url, $text);
+}
+
+sub do_url { &t2h_anchor('', $_[0], $_[0]) }
+
+sub do_acronym
+{
+ return '<FONT SIZE="-1">' . $_[0] . '</FONT>';
+}
+
+sub do_accent
+{
+ return "&$_[0]acute;" if $_[1] eq 'H';
+ return "$_[0]." if $_[1] eq 'dotaccent';
+ return "$_[0]*" if $_[1] eq 'ringaccent';
+ return "$_[0]".'[' if $_[1] eq 'tieaccent';
+ return "$_[0]".'(' if $_[1] eq 'u';
+ return "$_[0]_" if $_[1] eq 'ubaraccent';
+ return ".$_[0]" if $_[1] eq 'udotaccent';
+ return "$_[0]&lt;" if $_[1] eq 'v';
+ return "&$_[0]cedil;" if $_[1] eq ',';
+ return "$_[0]" if $_[1] eq 'dotless';
+ return undef;
+}
+
+sub apply_style {
+ local($texi_style, $text) = @_;
+ local($style);
+
+ $style = $style_map{$texi_style};
+ if (defined($style)) { # known style
+ if ($style =~ /^\"/) { # add quotes
+ $style = $';
+ $text = "\`$text\'";
+ }
+ if ($style =~ /^\&/) { # custom
+ $style = $';
+ $text = &$style($text, $texi_style);
+ } elsif ($style) { # good style
+ $text = "<$style>$text</$style>";
+ } else { # no style
+ }
+ } else { # unknown style
+ $text = undef;
+ }
+ return($text);
+}
+
+# remove Texinfo styles
+sub remove_style {
+ local($_) = @_;
+ 1 while(s/\@\w+{([^\{\}]+)}/$1/g);
+ return($_);
+}
+
+sub remove_things
+{
+ local ($_) = @_;
+ s|\@(\w+)\{\}|$1|g;
+ return $_;
+}
+
+sub substitute_style {
+ local($_) = @_;
+ local($changed, $done, $style, $text);
+
+ &simple_substitutions;
+ $changed = 1;
+ while ($changed) {
+ $changed = 0;
+ $done = '';
+ while (/\@(\w+){([^\{\}]+)}/ || /\@(,){([^\{\}]+)}/) {
+ $text = &apply_style($1, $2);
+ if ($text) {
+ $_ = "$`$text$'";
+ $changed = 1;
+ } else {
+ $done .= "$`\@$1";
+ $_ = "{$2}$'";
+ }
+ }
+ $_ = $done . $_;
+ }
+ return($_);
+}
+
+sub t2h_anchor {
+ local($name, $href, $text, $newline, $extra_attribs) = @_;
+ local($result);
+
+ $result = "<A";
+ $result .= " NAME=\"$name\"" if $name;
+ if ($href)
+ {
+ $href =~ s|^$T2H_HREF_DIR_INSTEAD_FILE|./|
+ if ($T2H_HREF_DIR_INSTEAD_FILE);
+ $result .= ($href =~ /\"/ ? " HREF='$href'" : " HREF=\"$href\"");
+ }
+ $result .= " $extra_attribs" if $extra_attribs;
+ $result .= ">$text</A>";
+ $result .= "\n" if $newline;
+ return($result);
+}
+
+sub pretty_date {
+ local(@MoY, $sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst);
+
+ @MoY = ('January', 'February', 'March', 'April', 'May', 'June',
+ 'July', 'August', 'September', 'October', 'November', 'December');
+ ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime(time);
+ $year += ($year < 70) ? 2000 : 1900;
+ # obachman: Let's do it as the Americans do
+ return("$MoY[$mon], $mday $year");
+}
+
+sub doc_href {
+ local($num) = @_;
+
+ return("${docu_name}_$num.$docu_ext");
+}
+
+sub sec_href
+{
+ return $node2href{$sec2node{$_[0]}};
+}
+
+sub next_doc {
+ $docu_doc = &doc_href(++$doc_num);
+}
+
+sub t2h_print_lines {
+ my ($fh, $lines) = @_;
+ local($_);
+ $lines = $T2H_THIS_SECTION unless $lines;
+ my $cnt = 0;
+ for (@$lines)
+ {
+ $_ = l2h_FromHtml($_) if ($T2H_L2H);
+ if (/^$PROTECTTAG/o) {
+ $_ = $tag2pro{$_};
+ } else {
+ &unprotect_texi;
+ }
+ print $fh $_;
+ $cnt += split(/\W*\s+\W*/);
+ }
+ return $cnt;
+}
+
+sub protect_texi {
+ # protect @ { } ` '
+ s/\@\@/$;0/go;
+ s/\@\{/$;1/go;
+ s/\@\}/$;2/go;
+ s/\@\`/$;3/go;
+ s/\@\'/$;4/go;
+}
+
+sub protect_html {
+ local($what) = @_;
+ # protect & < >
+ $what =~ s/\&/\&\#38;/g;
+ $what =~ s/\</\&\#60;/g;
+ $what =~ s/\>/\&\#62;/g;
+ # restore anything in quotes
+ # this fixes my problem where I had:
+ # < IMG SRC="leftarrow.gif" ALT="<--" > but what if I wanted &#60; in my ALT text ??
+ # maybe byte stuffing or some other technique should be used.
+ $what =~ s/\"([^\&]+)\&\#60;(.*)\"/"$1<$2"/g;
+ $what =~ s/\"([^\&]+)\&\#62;(.*)\"/"$1>$2"/g;
+ $what =~ s/\"([^\&]+)\&\#38;(.*)\"/"$1&$2"/g;
+ # but recognize some HTML things
+ $what =~ s/\&\#60;\/A\&\#62;/<\/A>/g; # </A>
+ $what =~ s/\&\#60;A ([^\&]+)\&\#62;/<A $1>/g; # <A [^&]+>
+ $what =~ s/\&\#60;IMG ([^\&]+)\&\#62;/<IMG $1>/g; # <IMG [^&]+>
+ return($what);
+}
+
+sub unprotect_texi {
+ s/$;0/\@/go;
+ s/$;1/\{/go;
+ s/$;2/\}/go;
+ s/$;3/\`/go;
+ s/$;4/\'/go;
+}
+
+sub Unprotect_texi
+{
+ local $_ = shift;
+ &unprotect_texi;
+ return($_);
+}
+
+sub unprotect_html {
+ local($what) = @_;
+ $what =~ s/\&\#38;/\&/g;
+ $what =~ s/\&\#60;/\</g;
+ $what =~ s/\&\#62;/\>/g;
+ return($what);
+}
+
+sub t2h_print_label
+{
+ my $fh = shift;
+ my $href = shift || $T2H_HREF{This};
+ $href =~ s/.*#(.*)$/$1/;
+ print $fh qq{<A NAME="$href"></A>\n};
+}
+
+##############################################################################
+
+ # These next few lines are legal in both Perl and nroff.
+
+.00 ; # finish .ig
+
+'di \" finish diversion--previous line must be blank
+.nr nl 0-1 \" fake up transition to first page again
+.nr % 0 \" start at page 1
+'; __END__ ############# From here on it's a standard manual page ############
+.so /usr/local/man/man1/texi2html.1
diff --git a/support/xcase.c b/support/xcase.c
new file mode 100644
index 0000000..efd11be
--- /dev/null
+++ b/support/xcase.c
@@ -0,0 +1,95 @@
+/* xcase - change uppercase characters to lowercase or vice versa. */
+
+/* Copyright (C) 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <stdio.h>
+#include <ctype.h>
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#include "bashansi.h"
+#include <errno.h>
+
+#ifndef errno
+extern int errno;
+#endif
+
+#define LOWER 1
+#define UPPER 2
+
+main(ac, av)
+int ac;
+char **av;
+{
+ int c, x;
+ int op;
+ FILE *inf;
+
+ op = 0;
+ while ((c = getopt(ac, av, "lnu")) != EOF) {
+ switch (c) {
+ case 'n':
+ setbuf (stdout, (char *)NULL);
+ break;
+ case 'u':
+ op = UPPER;
+ break;
+ case 'l':
+ op = LOWER;
+ break;
+ default:
+ fprintf(stderr, "casemod: usage: casemod [-lnu] [file]\n");
+ exit(2);
+ }
+ }
+ av += optind;
+ ac -= optind;
+
+ if (av[0] && (av[0][0] != '-' || av[0][1])) {
+ inf = fopen(av[0], "r");
+ if (inf == 0) {
+ fprintf(stderr, "casemod: %s: cannot open: %s\n", av[0], strerror(errno));
+ exit(1);
+ }
+ } else
+ inf = stdin;
+
+ while ((c = getc(inf)) != EOF) {
+ switch (op) {
+ case UPPER:
+ x = islower(c) ? toupper(c) : c;
+ break;
+ case LOWER:
+ x = isupper(c) ? tolower(c) : c;
+ break;
+ default:
+ x = c;
+ break;
+ }
+ putchar(x);
+ }
+
+ exit(0);
+}
diff --git a/support/xenix-link.sh b/support/xenix-link.sh
new file mode 100755
index 0000000..4d82e00
--- /dev/null
+++ b/support/xenix-link.sh
@@ -0,0 +1,84 @@
+:
+# link bash for Xenix under SCO Unix
+#
+# For xenix 2.2:
+# CC="cc -xenix -lx" ./configure
+# edit config.h:
+# comment out the define for HAVE_DIRENT_H
+# enable the define for HAVE_SYS_NDIR_H to 1
+# make
+# CC="cc -xenix -lx" ./link.sh
+#
+# For xenix 2.3:
+# CC="cc -x2.3" ./configure
+# make
+# CC="cc -x2.3" ./link.sh
+
+# Copyright (C) 1989-2002 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+
+set -x
+
+rm -f bash
+
+if [ -z "$CC" ]
+then
+ if [ -f /unix ] && [ ! -f /xenix ]
+ then
+ CC="cc -xenix"
+ else
+ CC=gcc
+ fi
+fi
+
+try_dir=no
+try_23=no
+try_x=yes
+
+case "$CC" in
+*-ldir*) try_dir=yes ;;
+esac
+
+case "$CC" in
+*-lx*) try_23=no ; try_x=yes ;;
+esac
+
+case "$CC" in
+*-x2.3*|*-l2.3*) try_23=yes ; try_dir=yes ;;
+esac
+
+libs=
+try="socket"
+if [ $try_dir = yes ] ; then try="$try dir" ; fi
+if [ $try_23 = yes ] ; then try="$try 2.3" ; fi
+if [ $try_x = yes ] ; then try="$try x" ; fi
+for name in $try
+do
+ if [ -r "/lib/386/Slib${name}.a" ] ; then libs="$libs -l$name" ; fi
+done
+
+$CC -o bash shell.o eval.o y.tab.o \
+general.o make_cmd.o print_cmd.o dispose_cmd.o execute_cmd.o variables.o \
+copy_cmd.o error.o expr.o flags.o nojobs.o subst.o hashcmd.o hashlib.o \
+mailcheck.o trap.o input.o unwind_prot.o pathexp.o sig.o test.o \
+version.o alias.o array.o braces.o bracecomp.o bashhist.o bashline.o \
+getcwd.o siglist.o vprint.o oslib.o list.o stringlib.o locale.o \
+xmalloc.o builtins/libbuiltins.a \
+lib/readline/libreadline.a lib/readline/libhistory.a \
+-ltermcap lib/glob/libglob.a lib/tilde/libtilde.a lib/malloc/libmalloc.a \
+$libs
+
+ls -l bash
diff --git a/support/zecho.c b/support/zecho.c
new file mode 100644
index 0000000..f3a4fe0
--- /dev/null
+++ b/support/zecho.c
@@ -0,0 +1,43 @@
+/* zecho - bare-bones echo */
+
+/* Copyright (C) 1996-2002 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include "bashansi.h"
+#include <stdio.h>
+
+int
+main(argc, argv)
+int argc;
+char **argv;
+{
+ argv++;
+
+ while (*argv) {
+ (void)printf("%s", *argv);
+ if (*++argv)
+ putchar(' ');
+ }
+
+ putchar('\n');
+ exit(0);
+}
diff --git a/syntax.h b/syntax.h
new file mode 100644
index 0000000..e01110e
--- /dev/null
+++ b/syntax.h
@@ -0,0 +1,104 @@
+/* syntax.h -- Syntax definitions for the shell */
+
+/* Copyright (C) 2000, 2001, 2005, 2008,2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _SYNTAX_H_
+#define _SYNTAX_H_
+
+/* Defines for use by mksyntax.c */
+
+#define slashify_in_quotes "\\`$\"\n"
+#define slashify_in_here_document "\\`$"
+
+#define shell_meta_chars "()<>;&|"
+#define shell_break_chars "()<>;&| \t\n"
+
+#define shell_quote_chars "\"`'"
+
+#if defined (PROCESS_SUBSTITUTION)
+# define shell_exp_chars "$<>"
+#else
+# define shell_exp_chars "$"
+#endif
+
+#if defined (EXTENDED_GLOB)
+# define ext_glob_chars "@*+?!"
+#else
+# define ext_glob_chars ""
+#endif
+#define shell_glob_chars "*?[]^"
+
+/* Defines shared by mksyntax.c and the rest of the shell code. */
+
+/* Values for character flags in syntax tables */
+
+#define CWORD 0x0000 /* nothing special; an ordinary character */
+#define CSHMETA 0x0001 /* shell meta character */
+#define CSHBRK 0x0002 /* shell break character */
+#define CBACKQ 0x0004 /* back quote */
+#define CQUOTE 0x0008 /* shell quote character */
+#define CSPECL 0x0010 /* special character that needs quoting */
+#define CEXP 0x0020 /* shell expansion character */
+#define CBSDQUOTE 0x0040 /* characters escaped by backslash in double quotes */
+#define CBSHDOC 0x0080 /* characters escaped by backslash in here doc */
+#define CGLOB 0x0100 /* globbing characters */
+#define CXGLOB 0x0200 /* extended globbing characters */
+#define CXQUOTE 0x0400 /* cquote + backslash */
+#define CSPECVAR 0x0800 /* single-character shell variable name */
+#define CSUBSTOP 0x1000 /* values of OP for ${word[:]OPstuff} */
+#define CBLANK 0x2000 /* whitespace (blank) character */
+
+/* Defines for use by the rest of the shell. */
+extern int sh_syntaxtab[];
+extern int sh_syntabsiz;
+
+#define shellmeta(c) (sh_syntaxtab[(unsigned char)(c)] & CSHMETA)
+#define shellbreak(c) (sh_syntaxtab[(unsigned char)(c)] & CSHBRK)
+#define shellquote(c) (sh_syntaxtab[(unsigned char)(c)] & CQUOTE)
+#define shellxquote(c) (sh_syntaxtab[(unsigned char)(c)] & CXQUOTE)
+
+#define shellblank(c) (sh_syntaxtab[(unsigned char)(c)] & CBLANK)
+
+#define issyntype(c, t) ((sh_syntaxtab[(unsigned char)(c)] & (t)) != 0)
+#define notsyntype(c,t) ((sh_syntaxtab[(unsigned char)(c)] & (t)) == 0)
+
+#if defined (PROCESS_SUBSTITUTION)
+# define shellexp(c) ((c) == '$' || (c) == '<' || (c) == '>')
+#else
+# define shellexp(c) ((c) == '$')
+#endif
+
+#if defined (EXTENDED_GLOB)
+# define PATTERN_CHAR(c) \
+ ((c) == '@' || (c) == '*' || (c) == '+' || (c) == '?' || (c) == '!')
+#else
+# define PATTERN_CHAR(c) 0
+#endif
+
+#define GLOB_CHAR(c) \
+ ((c) == '*' || (c) == '?' || (c) == '[' || (c) == ']' || (c) == '^')
+
+#define CTLESC '\001'
+#define CTLNUL '\177'
+
+#if !defined (HAVE_ISBLANK) && !defined (isblank)
+# define isblank(x) ((x) == ' ' || (x) == '\t')
+#endif
+
+#endif /* _SYNTAX_H_ */
diff --git a/test.c b/test.c
new file mode 100644
index 0000000..180940c
--- /dev/null
+++ b/test.c
@@ -0,0 +1,830 @@
+/* test.c - GNU test program (ksb and mjb) */
+
+/* Modified to run with the GNU shell Apr 25, 1988 by bfox. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* Define PATTERN_MATCHING to get the csh-like =~ and !~ pattern-matching
+ binary operators. */
+/* #define PATTERN_MATCHING */
+
+#if defined (HAVE_CONFIG_H)
+# include <config.h>
+#endif
+
+#include <stdio.h>
+
+#include "bashtypes.h"
+
+#if !defined (HAVE_LIMITS_H)
+# include <sys/param.h>
+#endif
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <errno.h>
+#if !defined (errno)
+extern int errno;
+#endif /* !errno */
+
+#if !defined (_POSIX_VERSION) && defined (HAVE_SYS_FILE_H)
+# include <sys/file.h>
+#endif /* !_POSIX_VERSION */
+#include "posixstat.h"
+#include "filecntl.h"
+
+#include "bashintl.h"
+
+#include "shell.h"
+#include "pathexp.h"
+#include "test.h"
+#include "builtins/common.h"
+
+#include <glob/strmatch.h>
+
+#if !defined (STRLEN)
+# define STRLEN(s) ((s)[0] ? ((s)[1] ? ((s)[2] ? strlen(s) : 2) : 1) : 0)
+#endif
+
+#if !defined (STREQ)
+# define STREQ(a, b) ((a)[0] == (b)[0] && strcmp ((a), (b)) == 0)
+#endif /* !STREQ */
+#define STRCOLLEQ(a, b) ((a)[0] == (b)[0] && strcoll ((a), (b)) == 0)
+
+#if !defined (R_OK)
+#define R_OK 4
+#define W_OK 2
+#define X_OK 1
+#define F_OK 0
+#endif /* R_OK */
+
+#define EQ 0
+#define NE 1
+#define LT 2
+#define GT 3
+#define LE 4
+#define GE 5
+
+#define NT 0
+#define OT 1
+#define EF 2
+
+/* The following few defines control the truth and false output of each stage.
+ TRUE and FALSE are what we use to compute the final output value.
+ SHELL_BOOLEAN is the form which returns truth or falseness in shell terms.
+ Default is TRUE = 1, FALSE = 0, SHELL_BOOLEAN = (!value). */
+#define TRUE 1
+#define FALSE 0
+#define SHELL_BOOLEAN(value) (!(value))
+
+#define TEST_ERREXIT_STATUS 2
+
+static procenv_t test_exit_buf;
+static int test_error_return;
+#define test_exit(val) \
+ do { test_error_return = val; longjmp (test_exit_buf, 1); } while (0)
+
+extern int sh_stat __P((const char *, struct stat *));
+
+static int pos; /* The offset of the current argument in ARGV. */
+static int argc; /* The number of arguments present in ARGV. */
+static char **argv; /* The argument list. */
+static int noeval;
+
+static void test_syntax_error __P((char *, char *)) __attribute__((__noreturn__));
+static void beyond __P((void)) __attribute__((__noreturn__));
+static void integer_expected_error __P((char *)) __attribute__((__noreturn__));
+
+static int unary_operator __P((void));
+static int binary_operator __P((void));
+static int two_arguments __P((void));
+static int three_arguments __P((void));
+static int posixtest __P((void));
+
+static int expr __P((void));
+static int term __P((void));
+static int and __P((void));
+static int or __P((void));
+
+static int filecomp __P((char *, char *, int));
+static int arithcomp __P((char *, char *, int, int));
+static int patcomp __P((char *, char *, int));
+
+static void
+test_syntax_error (format, arg)
+ char *format, *arg;
+{
+ builtin_error (format, arg);
+ test_exit (TEST_ERREXIT_STATUS);
+}
+
+/*
+ * beyond - call when we're beyond the end of the argument list (an
+ * error condition)
+ */
+static void
+beyond ()
+{
+ test_syntax_error (_("argument expected"), (char *)NULL);
+}
+
+/* Syntax error for when an integer argument was expected, but
+ something else was found. */
+static void
+integer_expected_error (pch)
+ char *pch;
+{
+ test_syntax_error (_("%s: integer expression expected"), pch);
+}
+
+/* Increment our position in the argument list. Check that we're not
+ past the end of the argument list. This check is supressed if the
+ argument is FALSE. Made a macro for efficiency. */
+#define advance(f) do { ++pos; if (f && pos >= argc) beyond (); } while (0)
+#define unary_advance() do { advance (1); ++pos; } while (0)
+
+/*
+ * expr:
+ * or
+ */
+static int
+expr ()
+{
+ if (pos >= argc)
+ beyond ();
+
+ return (FALSE ^ or ()); /* Same with this. */
+}
+
+/*
+ * or:
+ * and
+ * and '-o' or
+ */
+static int
+or ()
+{
+ int value, v2;
+
+ value = and ();
+ if (pos < argc && argv[pos][0] == '-' && argv[pos][1] == 'o' && !argv[pos][2])
+ {
+ advance (0);
+ v2 = or ();
+ return (value || v2);
+ }
+
+ return (value);
+}
+
+/*
+ * and:
+ * term
+ * term '-a' and
+ */
+static int
+and ()
+{
+ int value, v2;
+
+ value = term ();
+ if (pos < argc && argv[pos][0] == '-' && argv[pos][1] == 'a' && !argv[pos][2])
+ {
+ advance (0);
+ v2 = and ();
+ return (value && v2);
+ }
+ return (value);
+}
+
+/*
+ * term - parse a term and return 1 or 0 depending on whether the term
+ * evaluates to true or false, respectively.
+ *
+ * term ::=
+ * '-'('a'|'b'|'c'|'d'|'e'|'f'|'g'|'h'|'k'|'p'|'r'|'s'|'u'|'w'|'x') filename
+ * '-'('G'|'L'|'O'|'S'|'N') filename
+ * '-t' [int]
+ * '-'('z'|'n') string
+ * '-o' option
+ * string
+ * string ('!='|'='|'==') string
+ * <int> '-'(eq|ne|le|lt|ge|gt) <int>
+ * file '-'(nt|ot|ef) file
+ * '(' <expr> ')'
+ * int ::=
+ * positive and negative integers
+ */
+static int
+term ()
+{
+ int value;
+
+ if (pos >= argc)
+ beyond ();
+
+ /* Deal with leading `not's. */
+ if (argv[pos][0] == '!' && argv[pos][1] == '\0')
+ {
+ value = 0;
+ while (pos < argc && argv[pos][0] == '!' && argv[pos][1] == '\0')
+ {
+ advance (1);
+ value = 1 - value;
+ }
+
+ return (value ? !term() : term());
+ }
+
+ /* A paren-bracketed argument. */
+ if (argv[pos][0] == '(' && argv[pos][1] == '\0') /* ) */
+ {
+ advance (1);
+ value = expr ();
+ if (argv[pos] == 0) /* ( */
+ test_syntax_error (_("`)' expected"), (char *)NULL);
+ else if (argv[pos][0] != ')' || argv[pos][1]) /* ( */
+ test_syntax_error (_("`)' expected, found %s"), argv[pos]);
+ advance (0);
+ return (value);
+ }
+
+ /* are there enough arguments left that this could be dyadic? */
+ if ((pos + 3 <= argc) && test_binop (argv[pos + 1]))
+ value = binary_operator ();
+
+ /* Might be a switch type argument */
+ else if (argv[pos][0] == '-' && argv[pos][2] == '\0')
+ {
+ if (test_unop (argv[pos]))
+ value = unary_operator ();
+ else
+ test_syntax_error (_("%s: unary operator expected"), argv[pos]);
+ }
+ else
+ {
+ value = argv[pos][0] != '\0';
+ advance (0);
+ }
+
+ return (value);
+}
+
+static int
+filecomp (s, t, op)
+ char *s, *t;
+ int op;
+{
+ struct stat st1, st2;
+ int r1, r2;
+
+ if ((r1 = sh_stat (s, &st1)) < 0)
+ {
+ if (op == EF)
+ return (FALSE);
+ }
+ if ((r2 = sh_stat (t, &st2)) < 0)
+ {
+ if (op == EF)
+ return (FALSE);
+ }
+
+ switch (op)
+ {
+ case OT: return (r1 < r2 || (r2 == 0 && st1.st_mtime < st2.st_mtime));
+ case NT: return (r1 > r2 || (r1 == 0 && st1.st_mtime > st2.st_mtime));
+ case EF: return (same_file (s, t, &st1, &st2));
+ }
+ return (FALSE);
+}
+
+static int
+arithcomp (s, t, op, flags)
+ char *s, *t;
+ int op, flags;
+{
+ intmax_t l, r;
+ int expok;
+
+ if (flags & TEST_ARITHEXP)
+ {
+ l = evalexp (s, &expok);
+ if (expok == 0)
+ return (FALSE); /* should probably longjmp here */
+ r = evalexp (t, &expok);
+ if (expok == 0)
+ return (FALSE); /* ditto */
+ }
+ else
+ {
+ if (legal_number (s, &l) == 0)
+ integer_expected_error (s);
+ if (legal_number (t, &r) == 0)
+ integer_expected_error (t);
+ }
+
+ switch (op)
+ {
+ case EQ: return (l == r);
+ case NE: return (l != r);
+ case LT: return (l < r);
+ case GT: return (l > r);
+ case LE: return (l <= r);
+ case GE: return (l >= r);
+ }
+
+ return (FALSE);
+}
+
+static int
+patcomp (string, pat, op)
+ char *string, *pat;
+ int op;
+{
+ int m;
+
+ m = strmatch (pat, string, FNMATCH_EXTFLAG|FNMATCH_IGNCASE);
+ return ((op == EQ) ? (m == 0) : (m != 0));
+}
+
+int
+binary_test (op, arg1, arg2, flags)
+ char *op, *arg1, *arg2;
+ int flags;
+{
+ int patmatch;
+
+ patmatch = (flags & TEST_PATMATCH);
+
+ if (op[0] == '=' && (op[1] == '\0' || (op[1] == '=' && op[2] == '\0')))
+ return (patmatch ? patcomp (arg1, arg2, EQ) : STREQ (arg1, arg2));
+ else if ((op[0] == '>' || op[0] == '<') && op[1] == '\0')
+ {
+ if (shell_compatibility_level > 40 && flags & TEST_LOCALE)
+ return ((op[0] == '>') ? (strcoll (arg1, arg2) > 0) : (strcoll (arg1, arg2) < 0));
+ else
+ return ((op[0] == '>') ? (strcmp (arg1, arg2) > 0) : (strcmp (arg1, arg2) < 0));
+ }
+ else if (op[0] == '!' && op[1] == '=' && op[2] == '\0')
+ return (patmatch ? patcomp (arg1, arg2, NE) : (STREQ (arg1, arg2) == 0));
+
+
+ else if (op[2] == 't')
+ {
+ switch (op[1])
+ {
+ case 'n': return (filecomp (arg1, arg2, NT)); /* -nt */
+ case 'o': return (filecomp (arg1, arg2, OT)); /* -ot */
+ case 'l': return (arithcomp (arg1, arg2, LT, flags)); /* -lt */
+ case 'g': return (arithcomp (arg1, arg2, GT, flags)); /* -gt */
+ }
+ }
+ else if (op[1] == 'e')
+ {
+ switch (op[2])
+ {
+ case 'f': return (filecomp (arg1, arg2, EF)); /* -ef */
+ case 'q': return (arithcomp (arg1, arg2, EQ, flags)); /* -eq */
+ }
+ }
+ else if (op[2] == 'e')
+ {
+ switch (op[1])
+ {
+ case 'n': return (arithcomp (arg1, arg2, NE, flags)); /* -ne */
+ case 'g': return (arithcomp (arg1, arg2, GE, flags)); /* -ge */
+ case 'l': return (arithcomp (arg1, arg2, LE, flags)); /* -le */
+ }
+ }
+
+ return (FALSE); /* should never get here */
+}
+
+
+static int
+binary_operator ()
+{
+ int value;
+ char *w;
+
+ w = argv[pos + 1];
+ if ((w[0] == '=' && (w[1] == '\0' || (w[1] == '=' && w[2] == '\0'))) || /* =, == */
+ ((w[0] == '>' || w[0] == '<') && w[1] == '\0') || /* <, > */
+ (w[0] == '!' && w[1] == '=' && w[2] == '\0')) /* != */
+ {
+ value = binary_test (w, argv[pos], argv[pos + 2], 0);
+ pos += 3;
+ return (value);
+ }
+
+#if defined (PATTERN_MATCHING)
+ if ((w[0] == '=' || w[0] == '!') && w[1] == '~' && w[2] == '\0')
+ {
+ value = patcomp (argv[pos], argv[pos + 2], w[0] == '=' ? EQ : NE);
+ pos += 3;
+ return (value);
+ }
+#endif
+
+ if ((w[0] != '-' || w[3] != '\0') || test_binop (w) == 0)
+ {
+ test_syntax_error (_("%s: binary operator expected"), w);
+ /* NOTREACHED */
+ return (FALSE);
+ }
+
+ value = binary_test (w, argv[pos], argv[pos + 2], 0);
+ pos += 3;
+ return value;
+}
+
+static int
+unary_operator ()
+{
+ char *op;
+ intmax_t r;
+
+ op = argv[pos];
+ if (test_unop (op) == 0)
+ return (FALSE);
+
+ /* the only tricky case is `-t', which may or may not take an argument. */
+ if (op[1] == 't')
+ {
+ advance (0);
+ if (pos < argc)
+ {
+ if (legal_number (argv[pos], &r))
+ {
+ advance (0);
+ return (unary_test (op, argv[pos - 1]));
+ }
+ else
+ return (FALSE);
+ }
+ else
+ return (unary_test (op, "1"));
+ }
+
+ /* All of the unary operators take an argument, so we first call
+ unary_advance (), which checks to make sure that there is an
+ argument, and then advances pos right past it. This means that
+ pos - 1 is the location of the argument. */
+ unary_advance ();
+ return (unary_test (op, argv[pos - 1]));
+}
+
+int
+unary_test (op, arg)
+ char *op, *arg;
+{
+ intmax_t r;
+ struct stat stat_buf;
+
+ switch (op[1])
+ {
+ case 'a': /* file exists in the file system? */
+ case 'e':
+ return (sh_stat (arg, &stat_buf) == 0);
+
+ case 'r': /* file is readable? */
+ return (sh_eaccess (arg, R_OK) == 0);
+
+ case 'w': /* File is writeable? */
+ return (sh_eaccess (arg, W_OK) == 0);
+
+ case 'x': /* File is executable? */
+ return (sh_eaccess (arg, X_OK) == 0);
+
+ case 'O': /* File is owned by you? */
+ return (sh_stat (arg, &stat_buf) == 0 &&
+ (uid_t) current_user.euid == (uid_t) stat_buf.st_uid);
+
+ case 'G': /* File is owned by your group? */
+ return (sh_stat (arg, &stat_buf) == 0 &&
+ (gid_t) current_user.egid == (gid_t) stat_buf.st_gid);
+
+ case 'N':
+ return (sh_stat (arg, &stat_buf) == 0 &&
+ stat_buf.st_atime <= stat_buf.st_mtime);
+
+ case 'f': /* File is a file? */
+ if (sh_stat (arg, &stat_buf) < 0)
+ return (FALSE);
+
+ /* -f is true if the given file exists and is a regular file. */
+#if defined (S_IFMT)
+ return (S_ISREG (stat_buf.st_mode) || (stat_buf.st_mode & S_IFMT) == 0);
+#else
+ return (S_ISREG (stat_buf.st_mode));
+#endif /* !S_IFMT */
+
+ case 'd': /* File is a directory? */
+ return (sh_stat (arg, &stat_buf) == 0 && (S_ISDIR (stat_buf.st_mode)));
+
+ case 's': /* File has something in it? */
+ return (sh_stat (arg, &stat_buf) == 0 && stat_buf.st_size > (off_t) 0);
+
+ case 'S': /* File is a socket? */
+#if !defined (S_ISSOCK)
+ return (FALSE);
+#else
+ return (sh_stat (arg, &stat_buf) == 0 && S_ISSOCK (stat_buf.st_mode));
+#endif /* S_ISSOCK */
+
+ case 'c': /* File is character special? */
+ return (sh_stat (arg, &stat_buf) == 0 && S_ISCHR (stat_buf.st_mode));
+
+ case 'b': /* File is block special? */
+ return (sh_stat (arg, &stat_buf) == 0 && S_ISBLK (stat_buf.st_mode));
+
+ case 'p': /* File is a named pipe? */
+#ifndef S_ISFIFO
+ return (FALSE);
+#else
+ return (sh_stat (arg, &stat_buf) == 0 && S_ISFIFO (stat_buf.st_mode));
+#endif /* S_ISFIFO */
+
+ case 'L': /* Same as -h */
+ case 'h': /* File is a symbolic link? */
+#if !defined (S_ISLNK) || !defined (HAVE_LSTAT)
+ return (FALSE);
+#else
+ return ((arg[0] != '\0') &&
+ (lstat (arg, &stat_buf) == 0) && S_ISLNK (stat_buf.st_mode));
+#endif /* S_IFLNK && HAVE_LSTAT */
+
+ case 'u': /* File is setuid? */
+ return (sh_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISUID) != 0);
+
+ case 'g': /* File is setgid? */
+ return (sh_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISGID) != 0);
+
+ case 'k': /* File has sticky bit set? */
+#if !defined (S_ISVTX)
+ /* This is not Posix, and is not defined on some Posix systems. */
+ return (FALSE);
+#else
+ return (sh_stat (arg, &stat_buf) == 0 && (stat_buf.st_mode & S_ISVTX) != 0);
+#endif
+
+ case 't': /* File fd is a terminal? */
+ if (legal_number (arg, &r) == 0)
+ return (FALSE);
+ return ((r == (int)r) && isatty ((int)r));
+
+ case 'n': /* True if arg has some length. */
+ return (arg[0] != '\0');
+
+ case 'z': /* True if arg has no length. */
+ return (arg[0] == '\0');
+
+ case 'o': /* True if option `arg' is set. */
+ return (minus_o_option_value (arg) == 1);
+ }
+
+ /* We can't actually get here, but this shuts up gcc. */
+ return (FALSE);
+}
+
+/* Return TRUE if OP is one of the test command's binary operators. */
+int
+test_binop (op)
+ char *op;
+{
+ if (op[0] == '=' && op[1] == '\0')
+ return (1); /* '=' */
+ else if ((op[0] == '<' || op[0] == '>') && op[1] == '\0') /* string <, > */
+ return (1);
+ else if ((op[0] == '=' || op[0] == '!') && op[1] == '=' && op[2] == '\0')
+ return (1); /* `==' and `!=' */
+#if defined (PATTERN_MATCHING)
+ else if (op[2] == '\0' && op[1] == '~' && (op[0] == '=' || op[0] == '!'))
+ return (1);
+#endif
+ else if (op[0] != '-' || op[2] == '\0' || op[3] != '\0')
+ return (0);
+ else
+ {
+ if (op[2] == 't')
+ switch (op[1])
+ {
+ case 'n': /* -nt */
+ case 'o': /* -ot */
+ case 'l': /* -lt */
+ case 'g': /* -gt */
+ return (1);
+ default:
+ return (0);
+ }
+ else if (op[1] == 'e')
+ switch (op[2])
+ {
+ case 'q': /* -eq */
+ case 'f': /* -ef */
+ return (1);
+ default:
+ return (0);
+ }
+ else if (op[2] == 'e')
+ switch (op[1])
+ {
+ case 'n': /* -ne */
+ case 'g': /* -ge */
+ case 'l': /* -le */
+ return (1);
+ default:
+ return (0);
+ }
+ else
+ return (0);
+ }
+}
+
+/* Return non-zero if OP is one of the test command's unary operators. */
+int
+test_unop (op)
+ char *op;
+{
+ if (op[0] != '-' || op[2] != 0)
+ return (0);
+
+ switch (op[1])
+ {
+ case 'a': case 'b': case 'c': case 'd': case 'e':
+ case 'f': case 'g': case 'h': case 'k': case 'n':
+ case 'o': case 'p': case 'r': case 's': case 't':
+ case 'u': case 'w': case 'x': case 'z':
+ case 'G': case 'L': case 'O': case 'S': case 'N':
+ return (1);
+ }
+
+ return (0);
+}
+
+static int
+two_arguments ()
+{
+ if (argv[pos][0] == '!' && argv[pos][1] == '\0')
+ return (argv[pos + 1][0] == '\0');
+ else if (argv[pos][0] == '-' && argv[pos][2] == '\0')
+ {
+ if (test_unop (argv[pos]))
+ return (unary_operator ());
+ else
+ test_syntax_error (_("%s: unary operator expected"), argv[pos]);
+ }
+ else
+ test_syntax_error (_("%s: unary operator expected"), argv[pos]);
+
+ return (0);
+}
+
+#define ANDOR(s) (s[0] == '-' && !s[2] && (s[1] == 'a' || s[1] == 'o'))
+
+/* This could be augmented to handle `-t' as equivalent to `-t 1', but
+ POSIX requires that `-t' be given an argument. */
+#define ONE_ARG_TEST(s) ((s)[0] != '\0')
+
+static int
+three_arguments ()
+{
+ int value;
+
+ if (test_binop (argv[pos+1]))
+ {
+ value = binary_operator ();
+ pos = argc;
+ }
+ else if (ANDOR (argv[pos+1]))
+ {
+ if (argv[pos+1][1] == 'a')
+ value = ONE_ARG_TEST(argv[pos]) && ONE_ARG_TEST(argv[pos+2]);
+ else
+ value = ONE_ARG_TEST(argv[pos]) || ONE_ARG_TEST(argv[pos+2]);
+ pos = argc;
+ }
+ else if (argv[pos][0] == '!' && argv[pos][1] == '\0')
+ {
+ advance (1);
+ value = !two_arguments ();
+ }
+ else if (argv[pos][0] == '(' && argv[pos+2][0] == ')')
+ {
+ value = ONE_ARG_TEST(argv[pos+1]);
+ pos = argc;
+ }
+ else
+ test_syntax_error (_("%s: binary operator expected"), argv[pos+1]);
+
+ return (value);
+}
+
+/* This is an implementation of a Posix.2 proposal by David Korn. */
+static int
+posixtest ()
+{
+ int value;
+
+ switch (argc - 1) /* one extra passed in */
+ {
+ case 0:
+ value = FALSE;
+ pos = argc;
+ break;
+
+ case 1:
+ value = ONE_ARG_TEST(argv[1]);
+ pos = argc;
+ break;
+
+ case 2:
+ value = two_arguments ();
+ pos = argc;
+ break;
+
+ case 3:
+ value = three_arguments ();
+ break;
+
+ case 4:
+ if (argv[pos][0] == '!' && argv[pos][1] == '\0')
+ {
+ advance (1);
+ value = !three_arguments ();
+ break;
+ }
+ /* FALLTHROUGH */
+ default:
+ value = expr ();
+ }
+
+ return (value);
+}
+
+/*
+ * [:
+ * '[' expr ']'
+ * test:
+ * test expr
+ */
+int
+test_command (margc, margv)
+ int margc;
+ char **margv;
+{
+ int value;
+ int code;
+
+ USE_VAR(margc);
+
+ code = setjmp (test_exit_buf);
+
+ if (code)
+ return (test_error_return);
+
+ argv = margv;
+
+ if (margv[0] && margv[0][0] == '[' && margv[0][1] == '\0')
+ {
+ --margc;
+
+ if (margv[margc] && (margv[margc][0] != ']' || margv[margc][1]))
+ test_syntax_error (_("missing `]'"), (char *)NULL);
+
+ if (margc < 2)
+ test_exit (SHELL_BOOLEAN (FALSE));
+ }
+
+ argc = margc;
+ pos = 1;
+
+ if (pos >= argc)
+ test_exit (SHELL_BOOLEAN (FALSE));
+
+ noeval = 0;
+ value = posixtest ();
+
+ if (pos != argc)
+ test_syntax_error (_("too many arguments"), (char *)NULL);
+
+ test_exit (SHELL_BOOLEAN (value));
+}
diff --git a/test.h b/test.h
new file mode 100644
index 0000000..626edc4
--- /dev/null
+++ b/test.h
@@ -0,0 +1,39 @@
+/* test.h -- external interface to the conditional command code. */
+
+/* Copyright (C) 1997-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef _TEST_H_
+#define _TEST_H_
+
+#include "stdc.h"
+
+/* Values for the flags argument to binary_test */
+#define TEST_PATMATCH 0x01
+#define TEST_ARITHEXP 0x02
+#define TEST_LOCALE 0x04
+
+extern int test_unop __P((char *));
+extern int test_binop __P((char *));
+
+extern int unary_test __P((char *, char *));
+extern int binary_test __P((char *, char *, char *, int));
+
+extern int test_command __P((int, char **));
+
+#endif /* _TEST_H_ */
diff --git a/tests/COPYRIGHT b/tests/COPYRIGHT
new file mode 100644
index 0000000..c69f297
--- /dev/null
+++ b/tests/COPYRIGHT
@@ -0,0 +1,6 @@
+Unless otherwise stated, all files in this directory are Copyright (C)
+1991,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,2003,
+2004,2005,2006,2007,2008,2009
+Free Software Foundation, Inc.
+
+The file ifs-posix.tests is Copyright (C) 2005 Glen Fowler.
diff --git a/tests/README b/tests/README
new file mode 100644
index 0000000..b023ef6
--- /dev/null
+++ b/tests/README
@@ -0,0 +1,3 @@
+Type `sh run-all'.
+
+Read COPYRIGHT for copyright information.
diff --git a/tests/alias.right b/tests/alias.right
new file mode 100644
index 0000000..a37080c
--- /dev/null
+++ b/tests/alias.right
@@ -0,0 +1,12 @@
+alias: 0
+alias: 0
+./alias.tests: line 25: qfoo: command not found
+quux
+bar
+value
+bar
+value
+OK
+OK
+OK
+OK
diff --git a/tests/alias.tests b/tests/alias.tests
new file mode 100644
index 0000000..a97d5ff
--- /dev/null
+++ b/tests/alias.tests
@@ -0,0 +1,39 @@
+# place holder for future alias testing
+shopt -s expand_aliases
+
+# alias/unalias tests originally in builtins.tests
+
+unalias -a
+# this should return success, according to POSIX.2
+alias
+echo alias: $?
+alias foo=bar
+unalias foo
+# this had better return success, according to POSIX.2
+alias
+echo alias: $?
+
+# bug in all versions through bash-2.05b
+
+unalias qfoo qbar qbaz quux 2>/dev/null
+
+alias qfoo=qbar
+alias qbar=qbaz
+alias qbaz=quux
+alias quux=qfoo
+
+qfoo
+
+unalias qfoo qbar qbaz quux
+
+unalias -a
+
+alias foo='echo '
+alias bar=baz
+alias baz=quux
+
+foo bar
+
+unalias foo bar baz
+
+${THIS_SH} ./alias1.sub
diff --git a/tests/alias1.sub b/tests/alias1.sub
new file mode 100644
index 0000000..ed03031
--- /dev/null
+++ b/tests/alias1.sub
@@ -0,0 +1,20 @@
+shopt -s expand_aliases
+
+alias foo=echo
+
+< /dev/null foo bar
+
+< /dev/null x=value
+echo $x
+
+< /dev/null x=newvalue foo bar
+echo $x
+
+# problem reported by Vincent Lefevre
+alias a="echo OK >&2"
+a
+> /dev/null a
+
+${THIS_SH} -c 'shopt -s expand_aliases; alias a="echo OK >&2"
+ a
+ > /dev/null a'
diff --git a/tests/appendop.right b/tests/appendop.right
new file mode 100644
index 0000000..1e24333
--- /dev/null
+++ b/tests/appendop.right
@@ -0,0 +1,18 @@
+14
+1 2 3 4 5 6
+1 2 3 4 51 6
+5
+14
+7
+42
+1 2 3 4 12
+18
+1 2 3 4 18
+1 2 7 4 5
+1 2 7 13 5 9
+14
+9
+4
+9
+16
+./appendop.tests: line 83: x: readonly variable
diff --git a/tests/appendop.tests b/tests/appendop.tests
new file mode 100644
index 0000000..7b61f3f
--- /dev/null
+++ b/tests/appendop.tests
@@ -0,0 +1,83 @@
+# basic cases
+a=1
+a+=4
+echo $a
+
+x=(1 2 3)
+x+=(4 5 6)
+
+echo ${x[@]}
+
+x[4]+=1
+echo ${x[@]}
+
+# trickier cases
+
+a+=5 printenv a
+echo $a
+
+# if the integer flag is set, ksh93 appears to do arithmetic += and evaluate
+# old value as an arithmetic expression
+a=
+typeset -i a
+a+=7
+echo $a
+
+b=4+1
+typeset -i b
+b+=37
+
+echo $b
+
+unset x
+x=(1 2 3 4 5)
+
+typeset -i x
+
+x[4]+=7
+
+echo ${x[@]}
+
+unset x
+typeset -i x
+
+x=([0]=7+11)
+echo ${x[@]}
+
+unset x
+x=(1 2 3 4 5)
+
+typeset -i x
+
+#x[4]=7+11
+
+x=(1 2 3 4 [4]=7+11 )
+echo ${x[@]}
+
+x=( 1 2 [2]+=7 4 5 )
+echo ${x[@]}
+
+x+=( [3]+=9 [5]=9 )
+echo ${x[@]}
+
+unset a
+a=1
+export a+=4
+printenv a
+printenv a+
+
+unset x
+typeset -i x=4+5
+echo $x
+
+unset x
+typeset x+=4
+echo $x
+
+typeset -i x+=5
+echo $x
+
+readonly x+=7
+echo $x
+
+x+=5
diff --git a/tests/arith-for.right b/tests/arith-for.right
new file mode 100644
index 0000000..4494110
--- /dev/null
+++ b/tests/arith-for.right
@@ -0,0 +1,74 @@
+0
+1
+2
+0
+1
+2
+0
+1
+2
+0
+2
+4
+fx is a function
+fx ()
+{
+ i=0;
+ for ((1; i < 3; i++ ))
+ do
+ echo $i;
+ done;
+ for ((i=0; 1; i++ ))
+ do
+ if (( i >= 3 )); then
+ break;
+ fi;
+ echo $i;
+ done;
+ for ((i=0; i<3; 1))
+ do
+ echo $i;
+ (( i++ ));
+ done;
+ i=0;
+ for ((1; 1; 1))
+ do
+ if (( i > 2 )); then
+ break;
+ fi;
+ echo $i;
+ (( i++ ));
+ done;
+ i=0;
+ for ((1; 1; 1))
+ do
+ if (( i > 2 )); then
+ break;
+ fi;
+ echo $i;
+ (( i++ ));
+ done
+}
+0
+1
+2
+0
+1
+2
+0
+1
+2
+0
+1
+2
+0
+1
+2
+./arith-for.tests: line 77: syntax error: arithmetic expression required
+./arith-for.tests: line 77: syntax error: `(( i=0; "i < 3" ))'
+2
+./arith-for.tests: line 83: syntax error: `;' unexpected
+./arith-for.tests: line 83: syntax error: `(( i=0; i < 3; i++; 7 ))'
+2
+20
+20
diff --git a/tests/arith-for.tests b/tests/arith-for.tests
new file mode 100644
index 0000000..585aa51
--- /dev/null
+++ b/tests/arith-for.tests
@@ -0,0 +1,94 @@
+fx()
+{
+i=0
+for (( ; i < 3; i++ ))
+do
+ echo $i
+done
+
+for (( i=0; ; i++ ))
+do
+ if (( i >= 3 )); then
+ break;
+ fi
+ echo $i
+done
+
+for (( i=0; i<3; ))
+do
+ echo $i
+ (( i++ ))
+done
+
+i=0
+for (( ; ; ))
+do
+ if (( i > 2 )); then
+ break;
+ fi
+ echo $i;
+ (( i++ ))
+done
+
+i=0
+for ((;;))
+do
+ if (( i > 2 )); then
+ break;
+ fi
+ echo $i;
+ (( i++ ))
+done
+}
+
+for (( i=0; "i < 3" ; i++ ))
+do
+ echo $i
+done
+
+i=0
+for (( ; "i < 3"; i++ ))
+do
+ echo $i
+done
+
+for (( i=0; ; i++ ))
+do
+ if (( i >= 3 )); then
+ break;
+ fi
+ echo $i
+done
+
+for ((i = 0; ;i++ ))
+do
+ echo $i
+ if (( i < 3 )); then
+ (( i++ ))
+ continue;
+ fi
+ break
+done
+
+type fx
+fx
+
+# errors
+for (( i=0; "i < 3" ))
+do
+ echo $i
+done
+echo $?
+
+for (( i=0; i < 3; i++; 7 ))
+do
+ echo $i
+done
+echo $?
+
+# one-liners added in post-bash-2.04
+for ((i=0; i < 20; i++)) do : ; done
+echo $i
+
+for ((i=0; i < 20; i++)) { : ; }
+echo $i
diff --git a/tests/arith.right b/tests/arith.right
new file mode 100644
index 0000000..51d740e
--- /dev/null
+++ b/tests/arith.right
@@ -0,0 +1,204 @@
+163
+166
+4
+16
+8
+2
+4
+2
+2
+1
+0
+0
+0
+1
+1
+2
+-3
+-2
+1
+0
+2
+131072
+29
+33
+49
+1
+1
+0
+0
+1
+1
+1
+2
+3
+1
+58
+2
+60
+1
+256
+16
+62
+4
+29
+5
+-4
+4
+1
+32
+32
+1
+1
+32
+4
+20
+1,i+=2
+30
+1,j+=2
+20
+1,i+=2
+30
+1,j+=2
+./arith.tests: line 114: 1 ? 20 : x+=2: attempted assignment to non-variable (error token is "+=2")
+20
+6
+6,5,3
+263
+255
+255
+127
+36
+40
+10
+10
+10
+10
+10
+10
+36
+36
+62
+63
+./arith.tests: line 149: 3425#56: invalid arithmetic base (error token is "3425#56")
+0
+./arith.tests: line 155: 7 = 43 : attempted assignment to non-variable (error token is "= 43 ")
+./arith.tests: line 156: 2#44: value too great for base (error token is "2#44")
+./arith.tests: line 157: 44 / 0 : division by 0 (error token is "0 ")
+./arith.tests: line 158: let: jv += $iv: syntax error: operand expected (error token is "$iv")
+./arith.tests: line 159: jv += $iv : syntax error: operand expected (error token is "$iv ")
+./arith.tests: line 160: let: rv = 7 + (43 * 6: missing `)' (error token is "6")
+./arith.tests: line 164: 0#4: invalid number (error token is "0#4")
+./arith.tests: line 165: 2#110#11: invalid number (error token is "2#110#11")
+abc
+def
+ghi
+ok
+6
+1
+0
+./arith.tests: line 183: 4 + : syntax error: operand expected (error token is "+ ")
+16
+./arith.tests: line 188: 4 ? : 3 + 5 : expression expected (error token is ": 3 + 5 ")
+./arith.tests: line 189: 1 ? 20 : `:' expected for conditional expression (error token is "20 ")
+./arith.tests: line 190: 4 ? 20 : : expression expected (error token is ": ")
+9
+./arith.tests: line 196: 0 && B=42 : attempted assignment to non-variable (error token is "=42 ")
+9
+./arith.tests: line 199: 1 || B=88 : attempted assignment to non-variable (error token is "=88 ")
+9
+0
+9
+0
+9
+1
+9
+7
+7
+4
+32767
+32768
+131072
+2147483647
+1
+4
+4
+5
+5
+4
+3
+3
+4
+4
+7
+./arith.tests: line 247: 7-- : syntax error: operand expected (error token is "- ")
+./arith.tests: line 249: --x=7 : attempted assignment to non-variable (error token is "=7 ")
+./arith.tests: line 250: ++x=7 : attempted assignment to non-variable (error token is "=7 ")
+./arith.tests: line 252: x++=7 : attempted assignment to non-variable (error token is "=7 ")
+./arith.tests: line 253: x--=7 : attempted assignment to non-variable (error token is "=7 ")
+4
+7
+-7
+7
+7
+./arith1.sub: line 2: 4-- : syntax error: operand expected (error token is "- ")
+./arith1.sub: line 3: 4++ : syntax error: operand expected (error token is "+ ")
+./arith1.sub: line 4: 4 -- : syntax error: operand expected (error token is "- ")
+./arith1.sub: line 5: 4 ++ : syntax error: operand expected (error token is "+ ")
+1
+2
+1
+2
+6
+3
+7
+4
+0
+3
+7
+2
+-2
+1
+./arith1.sub: line 35: ((: ++ : syntax error: operand expected (error token is "+ ")
+7
+7
+./arith1.sub: line 38: ((: -- : syntax error: operand expected (error token is "- ")
+7
+7
+7
+7
+1
+2
+1
+2
+1
+0
+5
+1
+6
+2
+3
+1
+4
+0
+./arith2.sub: line 33: ((: -- : syntax error: operand expected (error token is "- ")
+-7
+-7
+./arith2.sub: line 37: ((: ++ : syntax error: operand expected (error token is "+ ")
+7
+7
+-7
+-7
+7
+7
+8 12
+./arith.tests: line 274: ((: x=9 y=41 : syntax error in expression (error token is "y=41 ")
+./arith.tests: line 278: a b: syntax error in expression (error token is "b")
+./arith.tests: line 279: ((: a b: syntax error in expression (error token is "b")
+42
+42
+42
+42
+42
+42
+./arith.tests: line 290: b[c]d: syntax error in expression (error token is "d")
diff --git a/tests/arith.tests b/tests/arith.tests
new file mode 100644
index 0000000..9e82bb1
--- /dev/null
+++ b/tests/arith.tests
@@ -0,0 +1,290 @@
+set +o posix
+declare -i iv jv
+
+iv=$(( 3 + 5 * 32 ))
+echo $iv
+iv=iv+3
+echo $iv
+iv=2
+jv=iv
+
+let "jv *= 2"
+echo $jv
+jv=$(( $jv << 2 ))
+echo $jv
+
+let jv="$jv / 2"
+echo $jv
+jv="jv >> 2"
+echo $jv
+
+iv=$((iv+ $jv))
+echo $iv
+echo $((iv -= jv))
+echo $iv
+echo $(( iv == jv ))
+echo $(( iv != $jv ))
+echo $(( iv < jv ))
+echo $(( $iv > $jv ))
+echo $(( iv <= $jv ))
+echo $(( $iv >= jv ))
+
+echo $jv
+echo $(( ~$jv ))
+echo $(( ~1 ))
+echo $(( ! 0 ))
+
+echo $(( jv % 2 ))
+echo $(( $iv % 4 ))
+
+echo $(( iv <<= 16 ))
+echo $(( iv %= 33 ))
+
+echo $(( 33 & 55 ))
+echo $(( 33 | 17 ))
+
+echo $(( iv && $jv ))
+echo $(( $iv || jv ))
+
+echo $(( iv && 0 ))
+echo $(( iv & 0 ))
+echo $(( iv && 1 ))
+echo $(( iv & 1 ))
+
+echo $(( $jv || 0 ))
+echo $(( jv | 0 ))
+echo $(( jv | 1 ))
+echo $(( $jv || 1 ))
+
+let 'iv *= jv'
+echo $iv
+echo $jv
+let "jv += $iv"
+echo $jv
+
+echo $(( jv /= iv ))
+echo $(( jv <<= 8 ))
+echo $(( jv >>= 4 ))
+
+echo $(( iv |= 4 ))
+echo $(( iv &= 4 ))
+
+echo $(( iv += (jv + 9)))
+echo $(( (iv + 4) % 7 ))
+
+# unary plus, minus
+echo $(( +4 - 8 ))
+echo $(( -4 + 8 ))
+
+# conditional expressions
+echo $(( 4<5 ? 1 : 32))
+echo $(( 4>5 ? 1 : 32))
+echo $(( 4>(2+3) ? 1 : 32))
+echo $(( 4<(2+3) ? 1 : 32))
+echo $(( (2+2)<(2+3) ? 1 : 32))
+echo $(( (2+2)>(2+3) ? 1 : 32))
+
+# bug in bash versions through bash-3.2
+S=105
+W=$((S>99?4:S>9?3:S>0?2:0))
+echo $W
+unset W S
+
+# check that the unevaluated part of the ternary operator does not do
+# evaluation or assignment
+x=i+=2
+y=j+=2
+declare -i i=1 j=1
+echo $((1 ? 20 : (x+=2)))
+echo $i,$x
+echo $((0 ? (y+=2) : 30))
+echo $j,$y
+
+x=i+=2
+y=j+=2
+declare -i i=1 j=1
+echo $((1 ? 20 : (x+=2)))
+echo $i,$x
+echo $((0 ? (y+=2) : 30))
+echo $i,$y
+
+# check precedence of assignment vs. conditional operator
+# should be an error
+declare -i x=2
+y=$((1 ? 20 : x+=2))
+
+# check precedence of assignment vs. conditional operator
+declare -i x=2
+echo $((0 ? x+=2 : 20))
+
+# associativity of assignment-operator operator
+declare -i i=1 j=2 k=3
+echo $((i += j += k))
+echo $i,$j,$k
+
+# octal, hex
+echo $(( 0x100 | 007 ))
+echo $(( 0xff ))
+echo $(( 16#ff ))
+echo $(( 16#FF/2 ))
+echo $(( 8#44 ))
+
+echo $(( 8 ^ 32 ))
+
+# other bases
+echo $(( 16#a ))
+echo $(( 32#a ))
+echo $(( 56#a ))
+echo $(( 64#a ))
+
+echo $(( 16#A ))
+echo $(( 32#A ))
+echo $(( 56#A ))
+echo $(( 64#A ))
+
+echo $(( 64#@ ))
+echo $(( 64#_ ))
+
+# weird bases
+echo $(( 3425#56 ))
+
+# missing number after base
+echo $(( 2# ))
+
+# these should generate errors
+echo $(( 7 = 43 ))
+echo $(( 2#44 ))
+echo $(( 44 / 0 ))
+let 'jv += $iv'
+echo $(( jv += \$iv ))
+let 'rv = 7 + (43 * 6'
+
+# more errors
+declare -i i
+i=0#4
+i=2#110#11
+
+((echo abc; echo def;); echo ghi)
+
+if (((4+4) + (4 + 7))); then
+ echo ok
+fi
+
+(()) # make sure the null expression works OK
+
+a=(0 2 4 6)
+echo $(( a[1] + a[2] ))
+echo $(( (a[1] + a[2]) == a[3] ))
+(( (a[1] + a[2]) == a[3] )) ; echo $?
+
+# test pushing and popping the expression stack
+unset A
+A="4 + "
+echo $(( ( 4 + A ) + 4 ))
+A="3 + 5"
+echo $(( ( 4 + A ) + 4 ))
+
+# badly-formed conditional expressions
+echo $(( 4 ? : $A ))
+echo $(( 1 ? 20 ))
+echo $(( 4 ? 20 : ))
+
+# precedence and short-circuit evaluation
+B=9
+echo $B
+
+echo $(( 0 && B=42 ))
+echo $B
+
+echo $(( 1 || B=88 ))
+echo $B
+
+echo $(( 0 && (B=42) ))
+echo $B
+
+echo $(( (${$} - $$) && (B=42) ))
+echo $B
+
+echo $(( 1 || (B=88) ))
+echo $B
+
+# until command with (( )) command
+x=7
+
+echo $x
+until (( x == 4 ))
+do
+ echo $x
+ x=4
+done
+
+echo $x
+
+# exponentiation
+echo $(( 2**15 - 1))
+echo $(( 2**(16-1)))
+echo $(( 2**16*2 ))
+echo $(( 2**31-1))
+echo $(( 2**0 ))
+
+# {pre,post}-{inc,dec}rement and associated errors
+
+x=4
+
+echo $x
+echo $(( x++ ))
+echo $x
+echo $(( x-- ))
+echo $x
+
+echo $(( --x ))
+echo $x
+
+echo $(( ++x ))
+echo $x
+
+echo $(( ++7 ))
+echo $(( 7-- ))
+
+echo $(( --x=7 ))
+echo $(( ++x=7 ))
+
+echo $(( x++=7 ))
+echo $(( x--=7 ))
+
+echo $x
+
+echo $(( +7 ))
+echo $(( -7 ))
+
+echo $(( ++7 ))
+echo $(( --7 ))
+
+${THIS_SH} ./arith1.sub
+${THIS_SH} ./arith2.sub
+
+x=4
+y=7
+
+(( x=8 , y=12 ))
+
+echo $x $y
+
+# should be an error
+(( x=9 y=41 ))
+
+# These are errors
+unset b
+echo $((a b))
+((a b))
+
+n=42
+printf "%d\n" $n
+printf "%i\n" $n
+echo $(( 8#$(printf "%o\n" $n) ))
+printf "%u\n" $n
+echo $(( 16#$(printf "%x\n" $n) ))
+echo $(( 16#$(printf "%X\n" $n) ))
+
+# causes longjmp botches through bash-2.05b
+a[b[c]d]=e
diff --git a/tests/arith1.sub b/tests/arith1.sub
new file mode 100644
index 0000000..43cae80
--- /dev/null
+++ b/tests/arith1.sub
@@ -0,0 +1,38 @@
+# test of redone post-increment and post-decrement code
+echo $(( 4-- ))
+echo $(( 4++ ))
+echo $(( 4 -- ))
+echo $(( 4 ++ ))
+
+(( array[0]++ ))
+echo ${array}
+
+(( array[0] ++ ))
+echo ${array}
+
+(( a++ ))
+echo $a
+(( a ++ ))
+echo $a
+
+echo $(( a ++ + 4 ))
+echo $a
+
+echo $(( a+++4 ))
+echo $a
+
+echo $(( a---4 ))
+echo $a
+
+echo $(( a -- + 4 ))
+echo $a
+
+echo $(( a -- - 4 ))
+echo $a
+
+(( ++ + 7 ))
+
+(( ++ ))
+echo $(( +++7 ))
+echo $(( ++ + 7 ))
+(( -- ))
diff --git a/tests/arith2.sub b/tests/arith2.sub
new file mode 100644
index 0000000..7eac952
--- /dev/null
+++ b/tests/arith2.sub
@@ -0,0 +1,45 @@
+echo $(( --7 ))
+echo $(( ++7 ))
+echo $(( -- 7 ))
+echo $(( ++ 7 ))
+
+((++array[0] ))
+echo $array
+(( ++ array[0] ))
+echo $array
+
+(( ++a ))
+echo $a
+(( ++ a ))
+echo $a
+
+(( --a ))
+echo $a
+(( -- a ))
+echo $a
+
+echo $(( 4 + ++a ))
+echo $a
+
+echo $(( 4+++a ))
+echo $a
+
+echo $(( 4---a ))
+echo $a
+
+echo $(( 4 - -- a ))
+echo $a
+
+(( -- ))
+echo $(( ---7 ))
+echo $(( -- - 7 ))
+
+(( ++ ))
+echo $(( ++7 ))
+echo $(( ++ + 7 ))
+
+echo $(( ++-7 ))
+echo $(( ++ - 7 ))
+
+echo $(( +--7 ))
+echo $(( -- + 7 ))
diff --git a/tests/array-at-star b/tests/array-at-star
new file mode 100755
index 0000000..80f039d
--- /dev/null
+++ b/tests/array-at-star
@@ -0,0 +1,120 @@
+# test the expansion of ${array[@]} and ${array[*]}, both quoted and
+# unquoted. the expansions should be exactly analogous to the
+# expansions of $@ and $* quoted and unquoted
+A=(a b)
+
+recho "${A[*]}"
+
+# If IFS is null, the parameters are joined without separators
+IFS=''
+recho "${A[*]}"
+
+# If IFS is unset, the parameters are separated by spaces
+unset IFS
+recho "${A[*]}"
+
+recho "${A[@]}"
+recho ${A[@]}
+
+IFS='/'
+A=(bob 'tom dick harry' joe)
+set ${A[*]}
+recho $#
+recho $1
+recho $2
+recho $3
+
+A=(bob 'tom dick harry' joe)
+set ${A[*]}
+recho $#
+recho $1
+recho $2
+recho $3
+
+A=(bob 'tom dick harry' joe)
+set ${A[@]}
+recho $#
+recho $1
+recho $2
+recho $3
+
+A=(bob 'tom dick harry' joe)
+set ${A[@]}
+recho $#
+recho $1
+recho $2
+recho $3
+
+# according to POSIX.2, unquoted $* should expand to multiple words if
+# $IFS is null, just like unquoted $@
+IFS=''
+A=(bob 'tom dick harry' joe)
+set "${A[*]}"
+recho $#
+recho $1
+recho $2
+recho $3
+
+A=(bob 'tom dick harry' joe)
+set ${A[*]}
+recho $#
+recho $1
+recho $2
+recho $3
+
+A=(bob 'tom dick harry' joe)
+set ${A[@]}
+recho $#
+recho $1
+recho $2
+recho $3
+
+# if IFS is unset, the individual positional parameters are split on
+# " \t\n" if $* or $@ are unquoted
+unset IFS
+A=(bob 'tom dick harry' joe)
+set ${A[*]}
+recho $#
+recho $1
+recho $2
+recho $3
+
+A=(bob 'tom dick harry' joe)
+set ${A[@]}
+recho $#
+recho $1
+recho $2
+recho $3
+
+# but not for "$@" or "$*"
+A=(bob 'tom dick harry' joe)
+set "${A[*]}"
+recho $#
+recho $1
+recho $2
+recho $3
+
+A=(bob 'tom dick harry' joe)
+set "${A[@]}"
+recho $#
+recho $1
+recho $2
+recho $3
+
+# these should both expand the value of A to multiple words
+A=(a b c d e)
+IFS=""
+recho ${A[@]}
+recho "${A[@]}"
+
+# this example is straight from the POSIX.2 rationale and adapted to arrays
+A=(foo bar bam)
+
+recho "${A[@]}"
+recho "${A[*]}"
+
+unset IFS
+
+recho "${A[@]}"
+recho ${A[@]}
+recho "${A[*]}"
diff --git a/tests/array.right b/tests/array.right
new file mode 100644
index 0000000..fdc0793
--- /dev/null
+++ b/tests/array.right
@@ -0,0 +1,314 @@
+
+./array.tests: line 15: syntax error near unexpected token `&'
+./array.tests: line 15: `test=(first & second)'
+1
+abcde
+abcde
+abcde bdef
+abcde bdef
+declare -a BASH_ARGC='()'
+declare -a BASH_ARGV='()'
+declare -a BASH_LINENO='([0]="0")'
+declare -a BASH_SOURCE='([0]="./array.tests")'
+declare -a DIRSTACK='()'
+declare -a FUNCNAME='([0]="main")'
+declare -a a='([0]="abcde" [1]="" [2]="bdef")'
+declare -a b='()'
+declare -ar c='()'
+abcde bdef
+abcde bdef
+abcde
+abcde
+abcde
+
+bdef
+hello world
+11
+3
+bdef hello world test expression test 2
+./array.tests: line 76: readonly: `a[5]': not a valid identifier
+declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression" [15]="test 2")'
+declare -ar c='()'
+declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression" [15]="test 2")'
+declare -ar c='()'
+readonly -a a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression" [15]="test 2")'
+readonly -a c='()'
+a test
+declare -a BASH_ARGC='()'
+declare -a BASH_ARGV='()'
+declare -a BASH_LINENO='([0]="0")'
+declare -a BASH_SOURCE='([0]="./array.tests")'
+declare -a DIRSTACK='()'
+declare -a FUNCNAME='([0]="main")'
+declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression" [15]="test 2")'
+declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")'
+declare -ar c='()'
+declare -a d='([1]="" [2]="bdef" [5]="hello world" [6]="test" [9]="ninth element")'
+declare -a e='([0]="test")'
+declare -a f='([0]="" [1]="bdef" [2]="hello world" [3]="test" [4]="ninth element")'
+./array.tests: line 100: a: readonly variable
+./array.tests: line 102: b[]: bad array subscript
+./array.tests: line 103: b[*]: bad array subscript
+./array.tests: line 104: ${b[ ]}: bad substitution
+./array.tests: line 106: c[-2]: bad array subscript
+./array.tests: line 107: c: bad array subscript
+
+./array.tests: line 109: d[7]: cannot assign list to array member
+./array.tests: line 111: []=abcde: bad array subscript
+./array.tests: line 111: [*]=last: cannot assign to non-numeric index
+./array.tests: line 111: [-65]=negative: bad array subscript
+declare -a BASH_ARGC='()'
+declare -a BASH_ARGV='()'
+declare -a BASH_LINENO='([0]="0")'
+declare -a BASH_SOURCE='([0]="./array.tests")'
+declare -a DIRSTACK='()'
+declare -a FUNCNAME='([0]="main")'
+declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression" [15]="test 2")'
+declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")'
+declare -ar c='()'
+declare -a d='([1]="test test")'
+declare -a f='([0]="" [1]="bdef" [2]="hello world" [3]="test" [4]="ninth element")'
+./array.tests: line 119: unset: ps1: not an array variable
+./array.tests: line 123: declare: c: cannot destroy array variables in this way
+this of
+this is a test of read using arrays
+this test
+this is a test of arrays
+declare -a BASH_ARGC='()'
+declare -a BASH_ARGV='()'
+declare -a BASH_LINENO='([0]="0")'
+declare -a BASH_SOURCE='([0]="./array.tests")'
+declare -a DIRSTACK='()'
+declare -a FUNCNAME='([0]="main")'
+declare -ar a='([1]="" [2]="bdef" [5]="hello world" [6]="test expression" [15]="test 2")'
+declare -a b='([0]="this" [1]="is" [2]="a" [3]="test" [4]="" [5]="/etc/passwd")'
+declare -ar c='()'
+declare -a d='([1]="test test")'
+declare -a f='([0]="" [1]="bdef" [2]="hello world" [3]="test" [4]="ninth element")'
+declare -a rv='([0]="this" [1]="is" [2]="a" [3]="test" [4]="of" [5]="read" [6]="using" [7]="arrays")'
+abde
+abde
+bbb
+efgh
+wxyz
+wxyz
+./array.tests
+a
+b c
+d
+e f g
+h
+./array.tests
+a
+b c
+d
+e f g
+h
+/bin /usr/bin /usr/ucb /usr/local/bin . /sbin /usr/sbin
+bin bin ucb bin . sbin sbin
+bin
+/ / / / / /
+/
+argv[1] = <bin>
+argv[1] = </>
+argv[1] = <sbin>
+argv[1] = </>
+\bin \usr/bin \usr/ucb \usr/local/bin . \sbin \usr/sbin
+\bin \usr\bin \usr\ucb \usr\local\bin . \sbin \usr\sbin
+\bin \usr\bin \usr\ucb \usr\local\bin . \sbin \usr\sbin
+4 -- 4
+7 -- 7
+55
+49
+6 -- 6
+42 14 44
+grep [ 123 ] *
+6 7 9
+6 7 9 5
+length = 3
+value = new1 new2 new3
+./array.tests: line 239: narray: unbound variable
+./array1.sub: line 1: syntax error near unexpected token `('
+./array1.sub: line 1: `printf "%s\n" -a a=(a 'b c')'
+./array2.sub: line 1: syntax error near unexpected token `('
+./array2.sub: line 1: `declare -a ''=(a 'b c')'
+9
+9
+
+
+7 8 9
+8 11
+8 11
+6
+6
+nordholz
+8
+8
+8
+
+a b c d e f g
+for case if then else
+<> < > !
+12 14 16 18 20
+4414758999202
+aaa bbb
+./array.tests: line 289: syntax error near unexpected token `<>'
+./array.tests: line 289: `metas=( <> < > ! )'
+./array.tests: line 290: syntax error near unexpected token `<>'
+./array.tests: line 290: `metas=( [1]=<> [2]=< [3]=> [4]=! )'
+abc 3
+case 4
+abc case if then else 5
+abc case if then else 5
+0
+case 4
+case if then else 5
+case if then else 5
+argv[1] = <0>
+argv[2] = <1>
+argv[3] = <4>
+argv[4] = <10>
+argv[1] = <0>
+argv[2] = <1>
+argv[3] = <4>
+argv[4] = <10>
+argv[1] = <0>
+argv[2] = <1>
+argv[3] = <4>
+argv[4] = <10>
+argv[1] = <0 1 4 10>
+include null element -- expect one
+one
+include unset element -- expect three five
+three five
+start at unset element -- expect five seven
+five seven
+too many elements -- expect three five seven
+three five seven
+positive offset - expect five seven
+five seven
+negative offset to unset element - expect seven
+seven
+positive offset 2 - expect seven
+seven
+negative offset 2 - expect seven
+seven
+out-of-range offset
+
+e
+4
+1 4 7 10
+'b
+b c
+$0
+t
+[3]=abcde r s t u v
+e
+9
+2
+a b c
+argv[1] = <"-iname '"a>
+argv[2] = <"-iname '"b>
+argv[3] = <"-iname '"c>
+'hey'
+hey
+''hey
+'hey'
+argv[1] = <c>
+argv[2] = <d>
+argv[3] = <e>
+argv[4] = <f>
+argv[1] = <c d>
+argv[2] = <e f>
+argv[1] = <c d>
+argv[2] = <e f>
+argv[1] = <c d>
+argv[2] = <e f>
+argv[1] = <"-iname '"abc>
+argv[2] = <"-iname '"def>
+argv[1] = <-iname 'abc>
+argv[2] = <-iname 'def>
+argv[1] = <-iname \'abc>
+argv[2] = <-iname \'def>
+argv[1] = <-iname>
+argv[2] = <'abc>
+argv[3] = <-iname>
+argv[4] = <'def>
+argv[1] = <"-iname '"abc>
+argv[2] = <"-iname '"def>
+argv[1] = <-iname 'abc>
+argv[2] = <-iname 'def>
+*.* OK
+1
+a1 2 3c
+argv[1] = <var with spaces>
+argv[1] = <var with spaces>
+argv[1] = <var with spacesab>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[1] = <var with spacesab>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[1] = <var with spacesab>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[1] = <var with spacesab>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[1] = <var with spacesab>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[1] = <var with spacesab>
+argv[2] = <cd>
+argv[3] = <ef>
+2
+argv[1] = <element1 with spaces>
+argv[2] = <element2 with spaces>
+argv[1] = <element1 with spaces>
+argv[2] = <element2 with spaces>
+nord!olz
+
+rdholz
+
+rdholz
+rdho
+
+
+argv[1] = <fooq//barq/>
+argv[1] = <fooq>
+argv[2] = <>
+argv[3] = <barq>
+argv[4] = <>
+argv[1] = <foo!//bar!/>
+argv[1] = <foo!>
+argv[2] = <>
+argv[3] = <bar!>
+argv[4] = <>
+argv[1] = <ooq//arq/>
+argv[1] = <ooq>
+argv[2] = <>
+argv[3] = <arq>
+argv[4] = <>
+argv[1] = <Fooq//Barq/>
+argv[1] = <Fooq>
+argv[2] = <>
+argv[3] = <Barq>
+argv[4] = <>
+argv[1] = <FOOQ//BARQ/>
+argv[1] = <FOOQ>
+argv[2] = <>
+argv[3] = <BARQ>
+argv[4] = <>
+126
+127
+128
+argv[1] = <€>
+argv[1] = <~>
+argv[2] = <^?>
+argv[3] = <€>
+argv[1] = <~>
+argv[2] = <^?>
+argv[3] = <€>
+argv[1] = <~>
+argv[2] = <^?>
+argv[3] = <€>
diff --git a/tests/array.tests b/tests/array.tests
new file mode 100644
index 0000000..435ac15
--- /dev/null
+++ b/tests/array.tests
@@ -0,0 +1,388 @@
+# this is needed so that the bad assignments (b[]=bcde, for example) do not
+# cause fatal shell errors when in posix mode
+set +o posix
+
+set +a
+# The calls to egrep -v are to filter out builtin array variables that are
+# automatically set and possibly contain values that vary.
+
+# first make sure we handle the basics
+x=()
+echo ${x[@]}
+unset x
+
+# this should be an error
+test=(first & second)
+echo $?
+unset test
+
+# make sure declare -a converts an existing variable to an array
+unset a
+a=abcde
+declare -a a
+echo ${a[0]}
+
+unset a
+a=abcde
+a[2]=bdef
+
+unset b
+declare -a b[256]
+
+unset c[2]
+unset c[*]
+
+a[1]=
+
+_ENV=/bin/true
+x=${_ENV[(_$-=0)+(_=1)-_${-%%*i*}]}
+
+declare -r c[100]
+
+echo ${a[0]} ${a[4]}
+echo ${a[@]}
+
+echo ${a[*]}
+
+# this should print out values, too
+declare -a | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)'
+
+unset a[7]
+echo ${a[*]}
+
+unset a[4]
+echo ${a[*]}
+
+echo ${a}
+echo "${a}"
+echo $a
+
+unset a[0]
+echo ${a}
+
+echo ${a[@]}
+
+a[5]="hello world"
+echo ${a[5]}
+echo ${#a[5]}
+
+echo ${#a[@]}
+
+a[4+5/2]="test expression"
+declare a["7 + 8"]="test 2"
+a[7 + 8]="test 2"
+echo ${a[@]}
+
+readonly a[5]
+readonly a
+# these two lines should output `declare' commands
+readonly -a | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)'
+declare -ar | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)'
+# this line should output `readonly' commands, even for arrays
+set -o posix
+readonly -a | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)'
+set +o posix
+
+declare -a d='([1]="" [2]="bdef" [5]="hello world" "test")'
+d[9]="ninth element"
+
+declare -a e[10]=test # this works in post-bash-2.05 versions
+declare -a e[10]='(test)'
+
+pass=/etc/passwd
+declare -a f='("${d[@]}")'
+b=([0]=this [1]=is [2]=a [3]=test [4]="$PS1" [5]=$pass)
+
+echo ${b[@]:2:3}
+
+declare -pa | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)'
+
+a[3]="this is a test"
+
+b[]=bcde
+b[*]=aaa
+echo ${b[ ]}
+
+c[-2]=4
+echo ${c[-4]}
+
+d[7]=(abdedfegeee)
+
+d=([]=abcde [1]="test test" [*]=last [-65]=negative )
+
+unset d[12]
+unset e[*]
+
+declare -a | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)'
+
+ps1='hello'
+unset ps1[2]
+unset ${ps1[2]}
+
+declare +a ps1
+declare +a c
+
+# the prompt should not print when using a here doc
+read -p "array test: " -a rv <<!
+this is a test of read using arrays
+!
+
+echo ${rv[0]} ${rv[4]}
+echo ${rv[@]}
+
+# the variable should be converted to an array when `read -a' is done
+vv=1
+read -a vv <<!
+this is a test of arrays
+!
+echo ${vv[0]} ${vv[3]}
+echo ${vv[@]}
+unset vv
+
+declare -a | egrep -v '(BASH_VERSINFO|PIPESTATUS|GROUPS)'
+
+export rv
+#set
+
+x[4]=bbb
+x=abde
+echo $x
+echo ${x[0]}
+echo ${x[4]}
+echo efgh | ( read x[1] ; echo ${x[1]} )
+echo wxyz | ( declare -a x ; read x ; echo $x ; echo ${x[0]} )
+
+# Make sure that arrays can be used to save the positional paramters verbatim
+set -- a 'b c' d 'e f g' h
+
+ARGV=( [0]=$0 "$@" )
+
+for z in "${ARGV[@]}"
+do
+ echo "$z"
+done
+
+echo "$0"
+for z in "$@"
+do
+ echo "$z"
+done
+
+# do various pattern removal and length tests
+XPATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:.:/sbin:/usr/sbin
+
+xpath=( $( IFS=: ; echo $XPATH ) )
+
+echo ${xpath[@]}
+echo ${xpath[@]##*/}
+echo ${xpath[0]##*/}
+echo ${xpath[@]%%[!/]*}
+echo ${xpath[0]%%[!/]*}
+recho ${xpath##*/}
+recho ${xpath%%[!/]*}
+recho ${xpath[5]##*/}
+recho ${xpath[5]%%[!/]*}
+
+# let's try to make it a DOS-style path
+
+zecho "${xpath[@]/\//\\}"
+zecho "${xpath[@]//\//\\}"
+zecho "${xpath[@]//[\/]/\\}"
+
+# length of the first element of the array, since array without subscript
+# is equivalent to referencing first element
+echo ${#xpath} -- ${#xpath[0]}
+
+# number of elements in the array
+nelem=${#xpath[@]}
+echo ${#xpath[@]} -- $nelem
+
+# total length of all elements in the array, including space separators
+xx="${xpath[*]}"
+echo ${#xx}
+
+# total length of all elements in the array
+xx=$( IFS='' ; echo "${xpath[*]}" )
+echo ${#xx}
+
+unset xpath[nelem-1]
+
+nelem=${#xpath[@]}
+echo ${#xpath[@]} -- $nelem
+
+# arrays and things that look like index assignments
+array=(42 [1]=14 [2]=44)
+
+array2=(grep [ 123 ] \*)
+
+echo ${array[@]}
+echo "${array2[@]}"
+
+# arrays and implicit arithmetic evaluation
+declare -i -a iarray
+
+iarray=( 2+4 1+6 7+2 )
+echo ${iarray[@]}
+
+iarray[4]=4+1
+echo ${iarray[@]}
+
+# make sure assignment using the compound assignment syntax removes all
+# of the old elements from the array value
+barray=(old1 old2 old3 old4 old5)
+barray=(new1 new2 new3)
+echo "length = ${#barray[@]}"
+echo "value = ${barray[*]}"
+
+# make sure the array code behaves correctly with respect to unset variables
+set -u
+( echo ${#narray[4]} )
+
+${THIS_SH} ./array1.sub
+${THIS_SH} ./array2.sub
+
+# some old bugs and ksh93 compatibility tests
+${THIS_SH} ./array3.sub
+
+# some compound assingment parsing problems that showed up in bash-3.1-release
+${THIS_SH} ./array4.sub
+
+set +u
+cd /tmp
+
+touch 1=bar
+foo=([10]="bar")
+echo ${foo[0]}
+rm 1=bar
+
+cd $OLDPWD
+
+foo=(a b c d e f g)
+echo ${foo[@]}
+
+# quoted reserved words are ok
+foo=(\for \case \if \then \else)
+echo ${foo[@]}
+
+# quoted metacharacters are ok
+foo=( [1]='<>' [2]='<' [3]='>' [4]='!' )
+echo ${foo[@]}
+
+# numbers are just words when not in a redirection context
+foo=( 12 14 16 18 20 )
+echo ${foo[@]}
+
+foo=( 4414758999202 )
+echo ${foo[@]}
+
+# this was a bug in all versions of bash 2.x up to and including bash-2.04
+declare -a ddd=(aaa
+bbb)
+echo ${ddd[@]}
+
+# errors until post-bash-2.05a; now reserved words are OK
+foo=(a b c for case if then else)
+
+foo=(for case if then else)
+
+# errors
+metas=( <> < > ! )
+metas=( [1]=<> [2]=< [3]=> [4]=! )
+
+# various expansions that didn't really work right until post-bash-2.04
+foo='abc'
+echo ${foo[0]} ${#foo[0]}
+echo ${foo[1]} ${#foo[1]}
+echo ${foo[@]} ${#foo[@]}
+echo ${foo[*]} ${#foo[*]}
+
+foo=''
+echo ${foo[0]} ${#foo[0]}
+echo ${foo[1]} ${#foo[1]}
+echo ${foo[@]} ${#foo[@]}
+echo ${foo[*]} ${#foo[*]}
+
+# new expansions added after bash-2.05b
+x[0]=zero
+x[1]=one
+x[4]=four
+x[10]=ten
+
+recho ${!x[@]}
+recho "${!x[@]}"
+recho ${!x[*]}
+recho "${!x[*]}"
+
+# sparse array tests for code fixed in bash-3.0
+unset av
+av[1]='one'
+av[2]=''
+
+av[3]=three
+av[5]=five
+av[7]=seven
+
+echo include null element -- expect one
+echo ${av[@]:1:2} # what happens when we include a null element?
+echo include unset element -- expect three five
+echo ${av[@]:3:2} # what happens when we include an unset element?
+echo start at unset element -- expect five seven
+echo ${av[@]:4:2} # what happens when we start at an unset element?
+
+echo too many elements -- expect three five seven
+echo ${av[@]:3:5} # how about too many elements?
+
+echo positive offset - expect five seven
+echo ${av[@]:5:2}
+echo negative offset to unset element - expect seven
+echo ${av[@]: -2:2}
+
+echo positive offset 2 - expect seven
+echo ${av[@]: 6:2}
+echo negative offset 2 - expect seven
+echo ${av[@]: -1:2}
+
+echo out-of-range offset
+echo ${av[@]:12}
+
+# parsing problems and other inconsistencies not fixed until post bash-3.0
+unset x
+declare -a x=(')' $$)
+[ ${x[1]} -eq $$ ] || echo bad
+
+unset x
+declare -a x=(a b c d e)
+echo ${x[4]}
+
+z=([1]=one [4]=four [7]=seven [10]=ten)
+
+echo ${#z[@]}
+
+echo ${!z[@]}
+
+unset x
+declare -a x=(a \'b c\')
+
+echo "${x[1]}"
+
+unset x
+declare -a x=(a 'b c')
+
+echo "${x[1]}"
+
+unset x
+declare -a x=($0)
+[ "${x[@]}" = $0 ] || echo double expansion of \$0
+declare -a x=(\$0)
+echo "${x[@]}"
+
+# tests for bash-3.1 problems
+${THIS_SH} ./array5.sub
+
+# tests for post-bash-3.2 problems, most fixed in bash-3.2 patches
+${THIS_SH} ./array6.sub
+${THIS_SH} ./array7.sub
+
+${THIS_SH} ./array8.sub
+
+${THIS_SH} ./array9.sub
diff --git a/tests/array1.sub b/tests/array1.sub
new file mode 100644
index 0000000..86e9332
--- /dev/null
+++ b/tests/array1.sub
@@ -0,0 +1 @@
+printf "%s\n" -a a=(a 'b c')
diff --git a/tests/array2.right b/tests/array2.right
new file mode 100644
index 0000000..b5145c2
--- /dev/null
+++ b/tests/array2.right
@@ -0,0 +1,74 @@
+argv[1] = <a b>
+argv[1] = <ab>
+argv[1] = <a b>
+argv[1] = <a>
+argv[2] = <b>
+argv[1] = <a>
+argv[2] = <b>
+argv[1] = <3>
+argv[1] = <bob>
+argv[1] = <tom dick harry>
+argv[1] = <joe>
+argv[1] = <3>
+argv[1] = <bob>
+argv[1] = <tom dick harry>
+argv[1] = <joe>
+argv[1] = <3>
+argv[1] = <bob>
+argv[1] = <tom dick harry>
+argv[1] = <joe>
+argv[1] = <3>
+argv[1] = <bob>
+argv[1] = <tom dick harry>
+argv[1] = <joe>
+argv[1] = <1>
+argv[1] = <bobtom dick harryjoe>
+argv[1] = <3>
+argv[1] = <bob>
+argv[1] = <tom dick harry>
+argv[1] = <joe>
+argv[1] = <3>
+argv[1] = <bob>
+argv[1] = <tom dick harry>
+argv[1] = <joe>
+argv[1] = <5>
+argv[1] = <bob>
+argv[1] = <tom>
+argv[1] = <dick>
+argv[1] = <5>
+argv[1] = <bob>
+argv[1] = <tom>
+argv[1] = <dick>
+argv[1] = <1>
+argv[1] = <bob>
+argv[2] = <tom>
+argv[3] = <dick>
+argv[4] = <harry>
+argv[5] = <joe>
+argv[1] = <3>
+argv[1] = <bob>
+argv[1] = <tom>
+argv[2] = <dick>
+argv[3] = <harry>
+argv[1] = <joe>
+argv[1] = <a>
+argv[2] = <b>
+argv[3] = <c>
+argv[4] = <d>
+argv[5] = <e>
+argv[1] = <a>
+argv[2] = <b>
+argv[3] = <c>
+argv[4] = <d>
+argv[5] = <e>
+argv[1] = <foo>
+argv[2] = <bar>
+argv[3] = <bam>
+argv[1] = <foobarbam>
+argv[1] = <foo>
+argv[2] = <bar>
+argv[3] = <bam>
+argv[1] = <foo>
+argv[2] = <bar>
+argv[3] = <bam>
+argv[1] = <foo bar bam>
diff --git a/tests/array2.sub b/tests/array2.sub
new file mode 100644
index 0000000..0e6417d
--- /dev/null
+++ b/tests/array2.sub
@@ -0,0 +1 @@
+declare -a ''=(a 'b c')
diff --git a/tests/array3.sub b/tests/array3.sub
new file mode 100644
index 0000000..579b42b
--- /dev/null
+++ b/tests/array3.sub
@@ -0,0 +1,9 @@
+a=(0 1 2 3 4 5 6 7 8 9)
+
+echo ${a[@]: -1}
+
+echo ${a[@]:9}
+echo ${a[@]:10}
+echo ${a[@]:11}
+
+echo ${a[@]:7:3}
diff --git a/tests/array4.sub b/tests/array4.sub
new file mode 100644
index 0000000..97c766d
--- /dev/null
+++ b/tests/array4.sub
@@ -0,0 +1,32 @@
+# compound assignment parsing problems in bash-3.1-release
+func()
+{
+ local -a x=() y=()
+}
+
+a=() b=()
+eval foo=()
+eval foo=() bar=() qux=( "bash" )
+
+foo=( "bash" )
+eval foo=( "bash" )
+eval bar=( "bash" ) bax=( "bash" )
+
+let a=(5 + 3) b=(4 + 7)
+echo $a $b
+
+typeset -i a b
+a=(5+3) b=(4+7)
+echo $a $b
+
+let a=(4*3)/2
+echo $a
+a=(4*3)/2
+echo $a
+
+LNAME=nordholz
+echo ${LNAME}
+echo ${#LNAME}
+
+echo ${#LNAME[$(( 0 ))]}
+echo ${#LNAME[$(( 0+0 ))]}
diff --git a/tests/array5.sub b/tests/array5.sub
new file mode 100644
index 0000000..778a28d
--- /dev/null
+++ b/tests/array5.sub
@@ -0,0 +1,34 @@
+
+: ${TMPDIR:=/tmp}
+
+mkdir $TMPDIR/bash-test-$$
+cd $TMPDIR/bash-test-$$
+
+trap "cd / ; rm -rf $TMPDIR/bash-test-$$" 0 1 2 3 6 15
+
+touch '[3]=abcde'
+
+touch r s t u v
+
+declare -a x=(*)
+
+echo ${x[3]}
+echo ${x[@]}
+
+unset x
+x=(a b c d e)
+
+echo ${x[*]: -1}
+
+unset x[4]
+unset x[2]
+
+x[9]='9'
+
+echo ${x[*]: -1}
+
+TOOLKIT=(1 2 3 4 5 6 7 8 9 10)
+ARRAY="1"
+echo ${TOOLKIT["$ARRAY"]}
+
+exit 0
diff --git a/tests/array6.sub b/tests/array6.sub
new file mode 100644
index 0000000..5901326
--- /dev/null
+++ b/tests/array6.sub
@@ -0,0 +1,109 @@
+# test cases for array quoting and escaping fixed post bash-3.2-release
+
+oIFS="$IFS"
+
+a=(a b c)
+echo ${a[@]}
+
+a2=("${a[@]/#/"-iname '"}")
+recho "${a2[@]}"
+
+echo "${dbg-"'hey'"}"
+echo "${dbg-"hey"}"
+echo "${dbg-'"'hey}"
+echo "${dbg-'"hey'}"
+
+unset a a2
+
+IFS=
+a2=(${a[@]/#/"-iname '"})
+recho "${a2[@]}"
+
+IFS="$oIFS"
+unset a a2
+
+a=('a b' 'c d' 'e f')
+
+recho ${a[@]:1:2}
+recho "${a[@]:1:2}"
+
+IFS=
+recho ${a[@]:1:2}
+recho "${a[@]:1:2}"
+
+IFS="$oIFS"
+unset a a2
+
+a=(abc def)
+
+# Prevent word splitting
+#IFS=
+
+a2=("${a[@]/#/"-iname '"}")
+recho "${a2[@]}"
+
+eval a2=("${a[@]/#/"-iname '"}")
+recho "${a2[@]}"
+
+a2=("${a[@]/#/-iname \'}")
+recho "${a2[@]}"
+
+eval a2=("${a[@]/#/-iname \'}")
+recho "${a2[@]}"
+
+set -- abc def
+
+a2=("${@/#/"-iname '"}")
+recho "${a2[@]}"
+
+eval a2=("${@/#/"-iname '"}")
+recho "${a2[@]}"
+
+unset a a2
+
+IFS=
+pat=('*.*')
+case $(ls ${pat[@]} 2>/dev/null) in
+'') echo '*.* BAD' ;;
+*) echo '*.* OK' ;;
+esac
+
+IFS="$oIFS"
+unset a a2 pat
+
+IFS=
+
+s='abc'
+
+set - ${s/b/1 2 3}
+echo $#
+echo "$1"
+
+IFS="$oIFS"
+unset s
+
+set -- ab cd ef
+foo="var with spaces"
+
+IFS=
+recho $foo
+recho "$foo"
+
+recho ${foo}"$@"
+recho ${foo}$@
+
+array=(ab cd ef)
+recho ${foo}"${array[@]}"
+recho ${foo}${array[@]}
+
+recho $(echo $foo)"$@"
+recho $(echo $foo)$@
+
+a=('word1 with spaces' 'word2 with spaces')
+set - ${a[@]/word/element}
+echo $#
+recho "$@"
+recho $@
+
+IFS="$oIFS"
+unset a a2 array foo
diff --git a/tests/array7.sub b/tests/array7.sub
new file mode 100644
index 0000000..8935cc2
--- /dev/null
+++ b/tests/array7.sub
@@ -0,0 +1,14 @@
+# these didn't work in versions of bash before bash-4.0
+
+LNAME=nordholz
+
+echo ${LNAME[$(( 0 ))]//h/!}
+echo ${LNAME[$(( 2 ))]//h/!}
+
+echo ${LNAME[$(( 0 ))]##??}
+echo ${LNAME[$(( 2 ))]##??}
+
+echo ${LNAME[$(( 0 ))]:2}
+echo ${LNAME[$(( 0 ))]:2:4}
+echo ${LNAME[$(( 2 ))]:2}
+echo ${LNAME[$(( 2 ))]:2:4}
diff --git a/tests/array8.sub b/tests/array8.sub
new file mode 100644
index 0000000..481ccdb
--- /dev/null
+++ b/tests/array8.sub
@@ -0,0 +1,23 @@
+IFS=/
+declare -a i
+
+i[0]=fooq
+i[1]=
+i[2]=barq
+i[3]=
+recho "${i[*]:0}"
+recho "${i[@]:0}"
+
+recho "${i[*]/q/!}"
+recho "${i[@]/q/!}"
+
+recho "${i[*]#?}"
+recho "${i[@]#?}"
+
+# Need to complete this with case-modifying expansion examples
+recho "${i[*]^?}"
+recho "${i[@]^?}"
+
+recho "${i[*]^^?}"
+recho "${i[@]^^?}"
+
diff --git a/tests/array9.sub b/tests/array9.sub
new file mode 100644
index 0000000..444247f
--- /dev/null
+++ b/tests/array9.sub
@@ -0,0 +1,27 @@
+echo $(( 0x7e ))
+echo $(( 0x7f ))
+echo $(( 0x80 ))
+
+a=$'\x80'
+recho "$a"
+
+a=( $'\x7e' $'\x7f' $'\x80' )
+
+recho "${a[@]}"
+
+unset a
+a[0]=$'\x7e'
+a[1]=$'\x7f'
+a[2]=$'\x80'
+
+recho "${a[@]}"
+
+b1=$'\x7e'
+b2=$'\x7f'
+b3=$'\x80'
+
+unset a
+a=( "$b1" "$b2" "$b3" )
+
+recho "${a[@]}"
+
diff --git a/tests/assoc.right b/tests/assoc.right
new file mode 100644
index 0000000..8615519
--- /dev/null
+++ b/tests/assoc.right
@@ -0,0 +1,189 @@
+declare -A BASH_ALIASES='()'
+declare -A BASH_CMDS='()'
+declare -A fluff='()'
+declare -A BASH_ALIASES='()'
+declare -A BASH_CMDS='()'
+declare -A fluff='([bar]="two" [foo]="one" )'
+declare -A fluff='([bar]="two" [foo]="one" )'
+declare -A fluff='([bar]="two" )'
+declare -A fluff='([bar]="newval" [qux]="assigned" )'
+./assoc.tests: line 26: chaff: four: must use subscript when assigning associative array
+declare -A BASH_ALIASES='()'
+declare -A BASH_CMDS='()'
+declare -Ai chaff='([one]="10" [zero]="5" )'
+declare -Ar waste='([version]="4.0-devel" [source]="./assoc.tests" [lineno]="28" [pid]="42134" )'
+declare -A wheat='([one]="a" [zero]="0" [two]="b" [three]="c" )'
+declare -A chaff='([one]="10" ["hello world"]="flip" [zero]="5" )'
+./assoc.tests: line 38: unset: waste: cannot unset: readonly variable
+./assoc.tests: line 39: chaff[*]: bad array subscript
+./assoc.tests: line 40: [*]=12: invalid associative array key
+declare -A chaff='([one]="a" ["hello world"]="flip" )'
+flip
+argv[1] = <a>
+argv[2] = <flip>
+argv[3] = <multiple>
+argv[4] = <words>
+argv[1] = <a>
+argv[2] = <flip>
+argv[3] = <multiple words>
+argv[1] = <a>
+argv[2] = <flip>
+argv[3] = <multiple>
+argv[4] = <words>
+argv[1] = <a flip multiple words>
+./assoc.tests: line 57: declare: chaff: cannot destroy array variables in this way
+./assoc.tests: line 59: chaff[*]: bad array subscript
+./assoc.tests: line 60: [*]=12: invalid associative array key
+declare -A wheat='([six]="6" ["foo bar"]="qux qix" )'
+argv[1] = <qux>
+argv[2] = <qix>
+argv[1] = <qux qix>
+declare -A wheat='([six]="6" ["foo bar"]="qux qix" )'
+argv[1] = <2>
+argv[1] = <7>
+argv[1] = <qux>
+argv[2] = <qix>
+argv[3] = <blat>
+argv[1] = <qux qix blat>
+argv[1] = <16>
+argv[1] = <16>
+argv[1] = <flix>
+argv[2] = <6>
+argv[1] = <six>
+argv[2] = <foo>
+argv[3] = <bar>
+argv[1] = <six>
+argv[2] = <foo bar>
+8
+/usr/local/bin . /bin /sbin /usr/sbin /usr/bin /bin /usr/ucb
+bin . bin sbin sbin bin bin ucb
+bin
+/ / / / / / /
+/
+argv[1] = <bin>
+argv[1] = </>
+argv[1] = <sbin>
+argv[1] = </>
+8
+/usr/local/bin . /bin /sbin /usr/sbin /usr/bin /bin /usr/ucb
+bin . bin sbin sbin bin bin ucb
+/ / / / / / /
+8
+4 -- /bin
+^usr^local^bin . ^bin ^sbin ^usr^sbin ^usr^bin ^bin ^usr^ucb
+^usr^local^bin . ^bin ^sbin ^usr^sbin ^usr^bin ^bin ^usr^ucb
+\usr/local/bin . \bin \sbin \usr/sbin \usr/bin \bin \usr/ucb
+\usr\local\bin . \bin \sbin \usr\sbin \usr\bin \bin \usr\ucb
+\usr\local\bin . \bin \sbin \usr\sbin \usr\bin \bin \usr\ucb
+([a]=1)
+
+qux foo
+/usr/local/bin/qux /usr/sbin/foo
+hits command
+ 0 /sbin/blat
+ 0 /usr/local/bin/qux
+ 0 /bin/sh
+ 0 /usr/sbin/foo
+blat qux sh foo
+/sbin/blat /usr/local/bin/qux /bin/sh /usr/sbin/foo
+
+foo qux
+argv[1] = </usr/sbin/foo>
+argv[2] = </usr/local/bin/qux>
+argv[3] = <-l>
+alias blat='cd /blat ; echo $PWD'
+alias foo='/usr/sbin/foo'
+alias qux='/usr/local/bin/qux -l'
+alias sh='/bin/bash --login -o posix'
+sh foo blat qux
+argv[1] = </bin/bash --login -o posix>
+argv[2] = </usr/sbin/foo>
+argv[3] = <cd /blat ; echo $PWD>
+argv[4] = </usr/local/bin/qux -l>
+outside: outside
+declare -A BASH_ALIASES='()'
+declare -A BASH_CMDS='()'
+declare -A afoo='([six]="six" ["foo bar"]="foo quux" )'
+argv[1] = <inside:>
+argv[2] = <six>
+argv[3] = <foo quux>
+outside 2: outside
+argv[1] = <fooq//barq/>
+argv[1] = <fooq>
+argv[2] = <>
+argv[3] = <barq>
+argv[4] = <>
+argv[1] = <foo!//bar!/>
+argv[1] = <foo!>
+argv[2] = <>
+argv[3] = <bar!>
+argv[4] = <>
+argv[1] = <ooq//arq/>
+argv[1] = <ooq>
+argv[2] = <>
+argv[3] = <arq>
+argv[4] = <>
+argv[1] = <Fooq//Barq/>
+argv[1] = <Fooq>
+argv[2] = <>
+argv[3] = <Barq>
+argv[4] = <>
+argv[1] = <FOOQ//BARQ/>
+argv[1] = <FOOQ>
+argv[2] = <>
+argv[3] = <BARQ>
+argv[4] = <>
+abc
+def
+def
+./assoc5.sub: line 13: declare: `myarray[foo[bar]=bleh': not a valid identifier
+abc def bleh
+myarray=(["a]a"]="abc" ["]"]="def" ["a]=test1;#a"]="123" [foo]="bleh" )
+
+123
+myarray=(["a]a"]="abc" ["a]=test2;#a"]="def" ["]"]="def" ["a]=test1;#a"]="123" [foo]="bleh" )
+bar"bie
+doll
+declare -A foo='(["bar\"bie"]="doll" )'
+bar"bie
+doll
+declare -A foo='(["bar\"bie"]="doll" )'
+bar"bie
+doll
+declare -A foo='(["bar\"bie"]="doll" )'
+bar"bie
+doll
+declare -A foo='(["bar\"bie"]="doll" )'
+bar"bie
+doll
+declare -A foo='(["bar\"bie"]="doll" )'
+bar'bie
+doll
+declare -A foo='(["bar'\''bie"]="doll" )'
+bar'bie
+doll
+declare -A foo='(["bar'\''bie"]="doll" )'
+bar'bie
+doll
+declare -A foo='(["bar'\''bie"]="doll" )'
+bar'bie
+doll
+declare -A foo='(["bar'\''bie"]="doll" )'
+bar'bie
+doll
+declare -A foo='(["bar'\''bie"]="doll" )'
+bar$bie
+doll
+declare -A foo='(["bar\$bie"]="doll" )'
+bar[bie
+doll
+declare -A foo='(["bar[bie"]="doll" )'
+bar`bie
+doll
+declare -A foo='(["bar\`bie"]="doll" )'
+bar\]bie
+doll
+declare -A foo='(["bar\\]bie"]="doll" )'
+bar${foo}bie
+doll
+declare -A foo='(["bar\${foo}bie"]="doll" )'
diff --git a/tests/assoc.tests b/tests/assoc.tests
new file mode 100644
index 0000000..8b6fd55
--- /dev/null
+++ b/tests/assoc.tests
@@ -0,0 +1,186 @@
+# TEST - basic declaration and assignment
+typeset -A fluff
+declare -A
+
+fluff[foo]=one
+fluff[bar]=two
+
+declare -A
+declare -p fluff
+
+unset fluff[foo]
+declare -p fluff
+
+fluff[bar]=newval
+declare fluff[qux]=assigned
+
+declare -p fluff
+
+unset fluff
+
+# TEST - compount assignment and variable attributes
+declare -A wheat chaff
+wheat=( [zero]=0 [one]=a [two]=b [three]=c )
+
+declare -i chaff
+chaff=( [zero]=1+4 [one]=3+7 four )
+
+declare -A waste=( [pid]=42134 [version]=4.0-devel [source]=$0 [lineno]=$LINENO )
+declare -r waste
+
+declare -A
+
+declare +i chaff
+chaff[hello world]=flip
+declare -p chaff
+
+# TEST - errors
+unset waste
+chaff[*]=12
+chaff=( [one]=a [*]=12 )
+
+# TEST - key expansion -- no word splitting
+chaff[hello world]=flip
+declare -p chaff
+echo ${chaff[hello world]}
+
+chaff[box]="multiple words"
+
+recho ${chaff[@]}
+recho "${chaff[@]}"
+
+recho ${chaff[*]}
+recho "${chaff[*]}"
+
+unset chaff
+declare -A chaff[200]
+declare +A chaff
+
+chaff[*]=12
+chaff=( [one]=a [*]=12 )
+
+# TEST - keys and values containing spaces
+unset wheat
+declare -A wheat
+wheat=([six]=6 [foo bar]="qux qix" )
+
+declare -p wheat
+
+unset wheat
+declare -A wheat=([six]=6 [foo bar]="qux qix" )
+
+recho ${wheat[foo bar]}
+recho "${wheat[foo bar]}"
+
+declare -p wheat
+
+# TEST - basic expansions: number of elements and value length
+unset wheat
+typeset -A wheat
+wheat=([six]=6 [foo bar]="qux qix" )
+
+recho ${#wheat[@]}
+
+recho ${#wheat[foo bar]}
+
+# TEST - appending assignment operator
+unset wheat
+typeset -A wheat
+wheat=([six]=6 [foo bar]="qux qix" )
+
+wheat[foo bar]+=' blat'
+
+recho ${wheat[foo bar]}
+recho "${wheat[foo bar]}"
+unset wheat
+
+flix=9
+typeset -Ai wheat
+wheat=([six]=6 [foo bar]=flix )
+
+wheat[foo bar]+=7
+
+recho ${wheat[foo bar]}
+recho "${wheat[foo bar]}"
+unset flix wheat
+
+# TEST - index expansion: no word splitting or globbing
+typeset -A wheat
+cd /tmp
+touch '[sfiri]'
+wheat=([s*]=6 [foo bar]=flix )
+
+recho ${wheat[@]}
+rm '[sfiri]'
+cd $OLDPWD
+
+# TEST -- associative array keys expansion
+unset wheat
+typeset -A wheat
+
+wheat=([six]=6 [foo bar]=flix )
+
+recho ${!wheat[@]}
+recho "${!wheat[@]}"
+
+# TEST -- associative array pattern removal
+unset xpath
+typeset -A xpath
+
+xpath=( [0]=/bin [one]=/bin [two]=/usr/bin [three]=/usr/ucb [four]=/usr/local/bin)
+xpath+=( [five]=/sbin [six]=/usr/sbin [seven]=. )
+
+echo ${#xpath[@]}
+
+echo ${xpath[@]}
+echo ${xpath[@]##*/}
+echo ${xpath[0]##*/}
+echo ${xpath[@]%%[!/]*}
+echo ${xpath[0]%%[!/]*}
+recho ${xpath##*/}
+recho ${xpath%%[!/]*}
+recho ${xpath[five]##*/}
+recho ${xpath[five]%%[!/]*}
+
+echo ${#xpath[*]}
+
+echo ${xpath[*]}
+echo ${xpath[*]##*/}
+echo ${xpath[*]%%[!/]*}
+
+# TEST -- associative array pattern substitution
+unset xpath
+typeset -A xpath
+
+xpath=( [0]=/bin [one]=/bin [two]=/usr/bin [three]=/usr/ucb [four]=/usr/local/bin)
+xpath+=( [five]=/sbin [six]=/usr/sbin [seven]=. )
+
+echo ${#xpath[@]}
+# default element is "0" (as a string)
+echo ${#xpath} -- ${xpath["0"]}
+
+echo ${xpath[@]//\//^}
+echo "${xpath[@]//\//^}" | cat -v
+
+zecho "${xpath[@]/\//\\}"
+zecho "${xpath[@]//\//\\}"
+zecho "${xpath[@]//[\/]/\\}"
+
+# test assignment to key "0"
+unset T
+declare -A T
+T='([a]=1)'
+echo "${T[@]}"
+unset T
+
+${THIS_SH} ./assoc1.sub
+
+${THIS_SH} ./assoc2.sub
+
+${THIS_SH} ./assoc3.sub
+
+${THIS_SH} ./assoc4.sub
+
+${THIS_SH} ./assoc5.sub
+
+${THIS_SH} ./assoc6.sub
diff --git a/tests/assoc1.sub b/tests/assoc1.sub
new file mode 100644
index 0000000..a045bde
--- /dev/null
+++ b/tests/assoc1.sub
@@ -0,0 +1,16 @@
+hash -r
+echo ${BASH_CMDS[@]}
+
+hash -p /usr/sbin/foo foo
+hash -p /usr/local/bin/qux qux
+
+echo ${!BASH_CMDS[@]}
+echo ${BASH_CMDS[@]}
+
+BASH_CMDS[blat]=/sbin/blat
+BASH_CMDS[sh]=/bin/sh
+
+hash
+
+echo ${!BASH_CMDS[@]}
+echo "${BASH_CMDS[@]}"
diff --git a/tests/assoc2.sub b/tests/assoc2.sub
new file mode 100644
index 0000000..396b87a
--- /dev/null
+++ b/tests/assoc2.sub
@@ -0,0 +1,15 @@
+echo ${BASH_ALIASES[@]}
+
+alias foo=/usr/sbin/foo
+alias qux='/usr/local/bin/qux -l'
+
+echo ${!BASH_ALIASES[@]}
+recho ${BASH_ALIASES[@]}
+
+BASH_ALIASES[blat]='cd /blat ; echo $PWD'
+BASH_ALIASES[sh]='/bin/bash --login -o posix'
+
+alias -p
+
+echo ${!BASH_ALIASES[@]}
+recho "${BASH_ALIASES[@]}"
diff --git a/tests/assoc3.sub b/tests/assoc3.sub
new file mode 100644
index 0000000..9129ef1
--- /dev/null
+++ b/tests/assoc3.sub
@@ -0,0 +1,15 @@
+foo()
+{
+ declare -A afoo=([six]="six" [foo bar]="foo quux")
+
+ declare -A
+ recho inside: "${afoo[@]}"
+}
+
+declare -A afoo=([main]=outside)
+echo outside: "${afoo[@]}"
+
+foo
+
+echo outside 2: "${afoo[@]}"
+
diff --git a/tests/assoc4.sub b/tests/assoc4.sub
new file mode 100644
index 0000000..1516dc5
--- /dev/null
+++ b/tests/assoc4.sub
@@ -0,0 +1,22 @@
+IFS=/
+declare -A i
+
+i[0]=fooq
+i[1]=
+i[2]=barq
+i[3]=
+
+recho "${i[*]:0}"
+recho "${i[@]:0}"
+
+recho "${i[*]/q/!}"
+recho "${i[@]/q/!}"
+
+recho "${i[*]#?}"
+recho "${i[@]#?}"
+
+# Need to complete this with case-modifying expansion examples
+recho "${i[*]^?}"
+recho "${i[@]^?}"
+recho "${i[*]^^?}"
+recho "${i[@]^^?}"
diff --git a/tests/assoc5.sub b/tests/assoc5.sub
new file mode 100644
index 0000000..400f3d3
--- /dev/null
+++ b/tests/assoc5.sub
@@ -0,0 +1,27 @@
+declare -A myarray
+
+# this needs fixes to skipsubscript
+myarray["a]a"]="abc"
+
+echo ${myarray["a]a"]}
+
+myarray[$(echo ])]=def
+
+echo ${myarray[']']}
+echo ${myarray[\]]}
+
+declare myarray["foo[bar"]=bleh
+myarray["foo"]=bleh
+
+echo "${myarray[@]}"
+
+bar='a]=test1;#a'
+myarray[$bar]=123
+
+set | grep ^myarray=
+echo ${myarray[a]}
+
+echo "${myarray['a]=test1;#a']}"
+myarray['a]=test2;#a']="def"
+
+set | grep ^myarray=
diff --git a/tests/assoc6.sub b/tests/assoc6.sub
new file mode 100644
index 0000000..54112ee
--- /dev/null
+++ b/tests/assoc6.sub
@@ -0,0 +1,146 @@
+declare -A foo
+
+foo=([bar\"bie]=doll)
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -p foo
+
+unset foo
+declare -A foo=(["bar\"bie"]="doll")
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -p foo
+
+unset foo
+declare -A foo
+
+foo=(["bar\"bie"]="doll")
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -p foo
+
+unset foo
+declare -A foo
+
+foo["bar\"bie"]="doll"
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -p foo
+
+unset foo
+declare -A foo
+
+foo[bar\"bie]="doll"
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -p foo
+
+unset foo
+declare -A foo
+
+foo=([bar\'bie]=doll)
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -p foo
+
+unset foo
+declare -A foo=(["bar'bie"]="doll")
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -p foo
+
+unset foo
+declare -A foo
+
+foo=(["bar'bie"]="doll")
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -p foo
+
+unset foo
+declare -A foo
+
+foo["bar'bie"]="doll"
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -p foo
+
+unset foo
+declare -A foo
+
+foo[bar\'bie]="doll"
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -p foo
+
+unset foo
+declare -A foo
+
+foo=([bar\$bie]=doll)
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -p foo
+
+unset foo
+declare -A foo=(["bar[bie"]="doll")
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -p foo
+
+unset foo
+declare -A foo
+
+foo=(["bar\`bie"]="doll")
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -p foo
+
+unset foo
+declare -A foo
+
+# this doesn't work right without the backslash
+foo["bar\]bie"]="doll"
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -p foo
+
+unset foo
+declare -A foo
+
+foo[bar\${foo}bie]="doll"
+
+echo ${!foo[@]}
+echo ${foo[@]}
+
+declare -p foo
+
+unset foo
+declare -A foo
diff --git a/tests/braces.right b/tests/braces.right
new file mode 100644
index 0000000..a02bfc6
--- /dev/null
+++ b/tests/braces.right
@@ -0,0 +1,76 @@
+ffc ffb ffa
+fdg feg ffg
+lxyz nxyz mxyz
+{abc,def}
+{abc}
+{a,b,c,d,e}
+x} y} {a} b} c}
+x,y {abc} trie
+/usr/ucb/ex /usr/ucb/edit /usr/lib/ex /usr/lib/how_ex
+XXXX{a,b,c}
+XXXXa XXXXb XXXXc
+{}
+{ }
+}
+{
+abcd{efgh
+foo 1 2 bar
+foo 1 2 bar
+foo 1 2 bar
+foobar foobaz.
+foobar foobaz
+bazx bazy
+vx vy
+bazx bazy
+1 2 3 4 5 6 7 8 9 10
+0..10 braces
+0 1 2 3 4 5 6 7 8 9 10 braces
+x0y x1y x2y x3y x4y x5y x6y x7y x8y x9y x10y xbracesy
+3
+x3y
+10 9 8 7 6 5 4 3 2 1
+10y 9y 8y 7y 6y 5y 4y 3y 2y 1y
+x10y x9y x8y x7y x6y x5y x4y x3y x2y x1y
+a b c d e f
+f e d c b a
+a ` _ ^ ] [ Z Y X W V U T S R Q P O N M L K J I H G F E D C B A
+A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ ` a
+f
+{1..f}
+{f..1}
+01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20
+-1 -2 -3 -4 -5 -6 -7 -8 -9 -10
+-20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0
+a-{bd}-c a-{be}-c
+a-{bdef-g-c a-{bdef-i-c
+{klklkl}1 {klklkl}2 {klklkl}3
+{x,x}
+1 3 5 7 9
+-1 -3 -5 -7 -9
+-1 -3 -5 -7 -9
+10 8 6 4 2
+10 8 6 4 2
+1 3 5 7 9 11 13 15 17 19
+1
+100 95 90 85 80 75 70 65 60 55 50 45 40 35 30 25 20 15 10 5 0
+100 95 90 85 80 75 70 65 60 55 50 45 40 35 30 25 20 15 10 5 0
+a b c d e f g h i j k l m n o p q r s t u v w x y z
+a c e g i k m o q s u w y
+z x v t r p n l j h f d b
+10 8 6 4 2 0
+10 8 6 4 2 0
+-50 -45 -40 -35 -30 -25 -20 -15 -10 -5 0
+{1..10.f}
+{1..ff}
+{1..10..ff}
+{1.20..2}
+{1..20..f2}
+{1..20..2f}
+{1..2f..2}
+{1..ff..2}
+{1..ff}
+{1..f}
+{1..0f}
+{1..10f}
+{1..10.f}
+{1..10.f}
diff --git a/tests/braces.tests b/tests/braces.tests
new file mode 100644
index 0000000..c2b153e
--- /dev/null
+++ b/tests/braces.tests
@@ -0,0 +1,116 @@
+echo ff{c,b,a}
+echo f{d,e,f}g
+echo {l,n,m}xyz
+echo {abc\,def}
+echo {abc}
+
+echo \{a,b,c,d,e}
+echo {x,y,\{a,b,c}}
+echo {x\,y,\{abc\},trie}
+
+echo /usr/{ucb/{ex,edit},lib/{ex,how_ex}}
+
+echo XXXX\{`echo a b c | tr ' ' ','`\}
+eval echo XXXX\{`echo a b c | tr ' ' ','`\}
+
+echo {}
+echo { }
+echo }
+echo {
+echo abcd{efgh
+
+echo foo {1,2} bar
+echo `zecho foo {1,2} bar`
+echo $(zecho foo {1,2} bar)
+
+var=baz
+varx=vx
+vary=vy
+
+echo foo{bar,${var}.}
+echo foo{bar,${var}}
+
+echo "${var}"{x,y}
+echo $var{x,y}
+echo ${var}{x,y}
+
+unset var varx vary
+
+# new sequence brace operators
+echo {1..10}
+
+# this doesn't work yet
+echo {0..10,braces}
+# but this does
+echo {{0..10},braces}
+echo x{{0..10},braces}y
+
+echo {3..3}
+echo x{3..3}y
+echo {10..1}
+echo {10..1}y
+echo x{10..1}y
+
+echo {a..f}
+echo {f..a}
+
+echo {a..A}
+echo {A..a}
+
+echo {f..f}
+
+# mixes are incorrectly-formed brace expansions
+echo {1..f}
+echo {f..1}
+
+echo 0{1..9} {10..20}
+
+# do negative numbers work?
+echo {-1..-10}
+echo {-20..0}
+
+# weirdly-formed brace expansions -- fixed in post-bash-3.1
+echo a-{b{d,e}}-c
+
+echo a-{bdef-{g,i}-c
+
+echo {"klklkl"}{1,2,3}
+echo {"x,x"}
+
+echo {1..10..2}
+echo {-1..-10..2}
+echo {-1..-10..-2}
+
+echo {10..1..-2}
+echo {10..1..2}
+
+echo {1..20..2}
+echo {1..20..20}
+
+echo {100..0..5}
+echo {100..0..-5}
+
+echo {a..z}
+echo {a..z..2}
+echo {z..a..-2}
+
+# unwanted zero-padding -- fixed post-bash-4.0
+echo {10..0..2}
+echo {10..0..-2}
+echo {-50..-0..5}
+
+# bad
+echo {1..10.f}
+echo {1..ff}
+echo {1..10..ff}
+echo {1.20..2}
+echo {1..20..f2}
+echo {1..20..2f}
+echo {1..2f..2}
+echo {1..ff..2}
+echo {1..ff}
+echo {1..f}
+echo {1..0f}
+echo {1..10f}
+echo {1..10.f}
+echo {1..10.f}
diff --git a/tests/builtins.right b/tests/builtins.right
new file mode 100644
index 0000000..30e10ca
--- /dev/null
+++ b/tests/builtins.right
@@ -0,0 +1,141 @@
+a
+end-1
+a
+end-2
+a:x
+end-a
+b:x
+end-b
+c:x
+end-c
+end-3
+a:x
+end
+a
+b
+c
+end-1
+a
+b
+c
+end-2
+a:x
+a:y
+a:z
+end-a
+b:x
+b:y
+b:z
+end-b
+c:x
+c:y
+c:z
+end-c
+end-3
+a:x
+b:x
+c:x
+end
+$BVAR
+$BVAR
+$BVAR
+$BVAR
+foo
+bar
+xxx
+0022
+u=rwx,g=rx,o=rx
+0002
+u=rwx,g=rwx,o=rx
+umask 0002
+umask -S u=rwx,g=rwx,o=rx
+u=rwx,g=rwx,o=rwx
+enable .
+enable :
+enable break
+enable continue
+enable eval
+enable exec
+enable exit
+enable export
+enable readonly
+enable return
+enable set
+enable shift
+enable source
+enable times
+enable trap
+enable unset
+enable .
+enable :
+enable break
+enable continue
+enable eval
+enable exec
+enable exit
+enable export
+enable readonly
+enable return
+enable set
+enable shift
+enable source
+enable times
+enable trap
+enable unset
+enable -n test worked
+enable test worked
+specialname
+-specialname
+FOO=BAR
+FOO=BAR
+hash: hash table empty
+0
+AVAR
+foo
+in source.sub2, calling return
+5
+a b c
+a b c
+x y z
+a b c
+a b c
+m n o p
+a b c
+m n o p
+/tmp/bash-dir-a
+/tmp/bash-dir-a
+/tmp/bash-dir-a
+./source5.sub: line 10: /tmp/source-notthere: No such file or directory
+after bad source 1
+./source5.sub: line 17: /tmp/source-notthere: No such file or directory
+one - OK
+0
+0
+two - OK
+0
+three - OK
+0
+four - OK
+0
+AVAR
+foo
+foo
+AVAR
+foo
+foo
+AVAR
+foo
+declare -x foo=""
+declare -x FOO="\$\$"
+./builtins.tests: line 210: declare: FOO: not found
+declare -x FOO="\$\$"
+ok
+ok
+./builtins.tests: line 242: kill: 4096: invalid signal specification
+1
+a\n\n\nb
+a
+
+
+b
+./builtins.tests: line 251: exit: status: numeric argument required
diff --git a/tests/builtins.tests b/tests/builtins.tests
new file mode 100644
index 0000000..6d20ae9
--- /dev/null
+++ b/tests/builtins.tests
@@ -0,0 +1,253 @@
+# tests for miscellaneous builtins not tested elsewhere
+set +p
+set +o posix
+
+ulimit -c 0 2>/dev/null
+
+# check that break breaks loops
+for i in a b c; do echo $i; break; echo bad-$i; done
+echo end-1
+for i in a b c; do echo $i; break 1; echo bad-$i; done
+echo end-2
+for i in a b c; do
+ for j in x y z; do
+ echo $i:$j
+ break
+ echo bad-$i
+ done
+ echo end-$i
+done
+echo end-3
+
+# check that break breaks nested loops
+for i in a b c; do
+ for j in x y z; do
+ echo $i:$j
+ break 2
+ echo bad-$i
+ done
+ echo end-$i
+done
+echo end
+
+# check that continue continues loops
+for i in a b c; do echo $i; continue; echo bad-$i ; done
+echo end-1
+for i in a b c; do echo $i; continue 1; echo bad-$i; done
+echo end-2
+for i in a b c; do
+ for j in x y z; do
+ echo $i:$j
+ continue
+ echo bad-$i-$j
+ done
+ echo end-$i
+done
+echo end-3
+
+# check that continue breaks out of nested loops
+for i in a b c; do
+ for j in x y z; do
+ echo $i:$j
+ continue 2
+ echo bad-$i-$j
+ done
+ echo end-$i
+done
+echo end
+
+# check that `eval' re-evaluates arguments, but `builtin' and `command' do not
+AVAR='$BVAR'
+BVAR=foo
+
+echo $AVAR
+builtin echo $AVAR
+command echo $AVAR
+eval echo \$AVAR
+eval echo $AVAR
+
+# test out eval with a temp environment
+AVAR=bar eval echo \$AVAR
+BVAR=xxx eval echo $AVAR
+
+unset -v AVAR BVAR
+
+# test umask
+mask=$(umask)
+umask 022
+umask
+umask -S
+umask -S u=rwx,g=rwx,o=rx >/dev/null # 002
+umask
+umask -S
+umask -p
+umask -p -S
+umask 0
+umask -S
+umask ${mask} # restore original mask
+
+# builtin/command without arguments should do nothing. maybe someday they will
+builtin
+command
+
+# test enable
+enable -ps
+
+enable -aps ; enable -nps
+
+enable -n test
+case "$(type -t test)" in
+builtin) echo oops -- enable -n test failed ;;
+*) echo enable -n test worked ;;
+esac
+
+enable test
+case "$(type -t test)" in
+builtin) echo enable test worked ;;
+*) echo oops -- enable test failed ;;
+esac
+
+# test options to exec
+(exec -a specialname ${THIS_SH} -c 'echo $0' )
+(exec -l -a specialname ${THIS_SH} -c 'echo $0' )
+# test `clean' environment. if /bin/sh is bash, and the script version of
+# printenv is run, there will be variables in the environment that bash
+# sets on startup. Also test code that prefixes argv[0] with a dash.
+(export FOO=BAR ; exec -c -l printenv ) | grep FOO
+(FOO=BAR exec -c printenv ) | grep FOO
+
+(export FOO=BAR ; exec printenv ) | grep FOO
+(FOO=BAR exec printenv ) | grep FOO
+
+# ok, forget everything about hashed commands
+hash -r
+hash
+
+# this had better succeed, since command -p guarantees we will find the
+# standard utilties
+command -p hash rm
+
+# check out source/.
+
+# sourcing a zero-length-file had better not be an error
+rm -f /tmp/zero-length-file
+cp /dev/null /tmp/zero-length-file
+. /tmp/zero-length-file
+echo $?
+rm /tmp/zero-length-file
+
+AVAR=AVAR
+
+. ./source1.sub
+AVAR=foo . ./source1.sub
+
+. ./source2.sub
+echo $?
+
+set -- a b c
+. ./source3.sub
+
+# make sure source with arguments does not change the shell's positional
+# parameters, but that the sourced file sees the arguments as its
+# positional parameters
+echo "$@"
+. ./source3.sub x y z
+echo "$@"
+
+# but if the sourced script sets the positional parameters explicitly, they
+# should be reflected in the calling shell's positional parameters. this
+# also tests one of the shopt options that controls source using $PATH to
+# find the script
+echo "$@"
+shopt -u sourcepath
+. source4.sub
+echo "$@"
+
+# this is complicated when the sourced scripts gets its own positional
+# parameters from arguments to `.'
+set -- a b c
+echo "$@"
+. source4.sub x y z
+echo "$@"
+
+# test out cd and $CDPATH
+${THIS_SH} ./builtins1.sub
+
+# test behavior of `.' when given a non-existant file argument
+${THIS_SH} ./source5.sub
+
+# test bugs in sourcing non-regular files, fixed post-bash-3.2
+${THIS_SH} ./source6.sub
+
+# in posix mode, assignment statements preceding special builtins are
+# reflected in the shell environment. `.' and `eval' need special-case
+# code.
+set -o posix
+echo $AVAR
+AVAR=foo . ./source1.sub
+echo $AVAR
+
+AVAR=AVAR
+echo $AVAR
+AVAR=foo eval echo \$AVAR
+echo $AVAR
+
+AVAR=AVAR
+echo $AVAR
+AVAR=foo :
+echo $AVAR
+set +o posix
+
+# but assignment statements preceding `export' are always reflected in
+# the environment
+foo="" export foo
+declare -p foo
+unset foo
+
+# assignment statements preceding `declare' should be displayed correctly,
+# but not persist after the command
+FOO='$$' declare -p FOO
+declare -p FOO
+unset FOO
+
+# except for `declare -x', which should be equivalent to `export'
+FOO='$$' declare -x FOO
+declare -p FOO
+unset FOO
+
+# test out kill -l. bash versions prior to 2.01 did `kill -l num' wrong
+sigone=$(kill -l | sed -n 's:^ 1) *\([^ ]*\)[ ].*$:\1:p')
+
+case "$(kill -l 1)" in
+${sigone/SIG/}) echo ok;;
+*) echo oops -- kill -l failure;;
+esac
+
+# kill -l and trap -l should display exactly the same output
+sigonea=$(trap -l | sed -n 's:^ 1) *\([^ ]*\)[ ].*$:\1:p')
+
+if [ "$sigone" != "$sigonea" ]; then
+ echo oops -- kill -l and trap -l differ
+fi
+
+# POSIX.2 says that exit statuses > 128 are mapped to signal names by
+# subtracting 128 so you can find out what signal killed a process
+case "$(kill -l $(( 128 + 1)) )" in
+${sigone/SIG/}) echo ok;;
+*) echo oops -- kill -l 129 failure;;
+esac
+
+# out-of-range signal numbers should report the argument in the error
+# message, not 128 less than the argument
+kill -l 4096
+
+# kill -l NAME should return the signal number
+kill -l ${sigone/SIG/}
+
+# test behavior of shopt xpg_echo
+${THIS_SH} ./builtins2.sub
+
+# this must be last -- it is a fatal error
+exit status
+
+echo after bad exit
diff --git a/tests/builtins1.sub b/tests/builtins1.sub
new file mode 100644
index 0000000..52185b5
--- /dev/null
+++ b/tests/builtins1.sub
@@ -0,0 +1,14 @@
+unset CDPATH
+
+MYDIR=$(pwd -P)
+FULLDIR=/tmp/bash-dir-a
+DIR=${FULLDIR##*/}
+
+mkdir $FULLDIR
+CDPATH=.:/tmp
+cd $DIR
+pwd
+echo $PWD
+
+cd "$MYDIR"
+rmdir $FULLDIR
diff --git a/tests/builtins2.sub b/tests/builtins2.sub
new file mode 100644
index 0000000..e4cb32a
--- /dev/null
+++ b/tests/builtins2.sub
@@ -0,0 +1,10 @@
+# test behavior of shopt xpg_echo
+
+USG_ECHO=off
+shopt -q xpg_echo && USG_ECHO=on
+
+shopt -u xpg_echo
+echo 'a\n\n\nb'
+
+shopt -s xpg_echo
+echo 'a\n\n\nb'
diff --git a/tests/case.right b/tests/case.right
new file mode 100644
index 0000000..d579253
--- /dev/null
+++ b/tests/case.right
@@ -0,0 +1,6 @@
+fallthrough
+to here
+and here
+retest
+and match
+no more clauses
diff --git a/tests/case.tests b/tests/case.tests
new file mode 100644
index 0000000..7c50165
--- /dev/null
+++ b/tests/case.tests
@@ -0,0 +1,18 @@
+case foo in
+bar) echo skip ;;
+foo) echo fallthrough ;&
+bax) echo to here ;&
+qux) echo and here;;
+fop) echo but not here;;
+esac
+
+case foobar in
+bar) echo skip ;;
+foo*) echo retest ;;&
+*bar) echo and match ;;&
+qux) echo but not this ;;
+esac
+
+case a in
+a) echo no more clauses;&
+esac
diff --git a/tests/casemod.right b/tests/casemod.right
new file mode 100644
index 0000000..958b28d
--- /dev/null
+++ b/tests/casemod.right
@@ -0,0 +1,45 @@
+Acknowledgement
+ACKNOWLEDGEMENT
+Oenophile
+OEnOphIlE
+aCKNOWLEDGEMENT
+acknowledgement
+oENOPHILE
+oENOPHILE
+oeNoPHiLe
+Acknowledgement Oenophile
+AcknOwlEdgEmEnt OEnOphIlE
+aCKNOWLEDGEMENT oENOPHILE
+aCKNoWLeDGeMeNT oeNoPHiLe
+aCKNOWLEDGEMENT oENOPHILE
+acknowledgement oenophile
+Acknowledgement Oenophile
+ACKNOWLEDGEMENT OENOPHILE
+Acknowledgement Oenophile
+AcknOwlEdgEmEnt OEnOphIlE
+oENOPHILE aCKNOWLEDGEMENT
+oenophile acknowledgement
+oENOPHILE aCKNOWLEDGEMENT
+oeNoPHiLe aCKNoWLeDGeMeNT
+Acknowledgement Oenophile
+ACKNOWLEDGEMENT OENOPHILE
+acknowledgement oenophile
+ackNowLEdgEmENT oENophiLE
+acknowledgement oenophile
+ackNowLEdgEmENT oENophiLE
+acknowledgement oenophile
+acknowledgement oenophile
+acknowledgement oenophile
+acknowledgement oenophile
+Acknowledgement Oenophile
+ACKNOWLEDGEMENT OENOPHILE
+BE CONSERVATIVE IN WHAT YOU SEND AND LIBERAL IN WHAT YOU ACCEPT
+be conservative in what you send and liberal in what you accept
+Be conservative in what you send and liberal in what you accept
+Be conservative in what you send and liberal in what you accept
+be Conservative in what you send and Liberal in what you accept
+be conservative in what you send and liberal in what you accept
+Be Conservative in what you send and Liberal in what you accept
+BE CONSERVATIVE IN WHAT YOU SEND AND LIBERAL IN WHAT YOU ACCEPT
+Be conservative in what you send and liberal in what you accept
+BE CONSERVATIVE IN WHAT YOU SEND AND LIBERAL IN WHAT YOU ACCEPT
diff --git a/tests/casemod.tests b/tests/casemod.tests
new file mode 100644
index 0000000..3c7ad23
--- /dev/null
+++ b/tests/casemod.tests
@@ -0,0 +1,99 @@
+S1=acknowledgement
+S2=oenophile
+
+echo ${S1^}
+echo ${S1^^}
+
+echo ${S2^[aeiou]}
+echo ${S2^^[aeiou]}
+
+U1=${S1^^}
+U2=${S2^^}
+
+echo ${U1,}
+echo ${U1,,}
+
+echo ${U2,}
+echo ${U2,[AEIOU]}
+echo ${U2,,[AEIOU]}
+
+A1=( $S1 $S2 )
+
+echo ${A1[@]^[aeiou]}
+echo ${A1[@]^^[aeiou]}
+
+A2=( $U1 $U2 )
+
+echo ${A2[@],[AEIOU]}
+echo ${A2[@],,[AEIOU]}
+
+echo ${A2[@],?}
+echo ${A2[@],,?}
+
+declare -A AA1 AA2
+
+AA1[ack]=$S1
+AA1[oen]=$S2
+
+echo ${AA1[@]^}
+echo ${AA1[@]^^}
+
+echo ${AA1[@]^[aeiou]}
+echo ${AA1[@]^^[aeiou]}
+
+AA2[ACK]=$U1
+AA2[OEN]=$U2
+
+echo ${AA2[@],}
+echo ${AA2[@],,}
+
+echo ${AA2[@],[AEIOU]}
+echo ${AA2[@],,[AEIOU]}
+
+set -- $S1 $S2
+
+echo ${@^}
+echo ${@^^}
+
+
+echo ${S1^[rstlne]} ${S2^[rstlne]}
+echo ${S1^^[rstlne]} ${S2^^[rstlne]}
+
+echo ${@^[rstlne]}
+echo ${@^^[rstlne]}
+
+echo ${S1,[rstlne]} ${S2,[rstlne]}
+echo ${S1,,[rstlne]} ${S2,,[rstlne]}
+
+echo ${@,[rstlne]}
+echo ${@,,[rstlne]}
+
+echo ${@^?}
+echo ${@^^?}
+
+# make sure that multiple words in the string are handled as other expansions
+TEXT="Be Conservative in what you send and Liberal in what you accept"
+TEXT2="be conservative in what you send and liberal in what you accept"
+
+declare -u foo
+foo=$TEXT
+echo $foo
+
+declare -l bar
+bar=$TEXT
+echo $bar
+
+declare -c qux
+qux=$TEXT
+echo $qux
+qux=$TEXT2
+echo $qux
+
+echo ${TEXT,}
+echo ${TEXT,,}
+
+echo ${TEXT^}
+echo ${TEXT^^}
+
+echo ${TEXT2^}
+echo ${TEXT2^^}
diff --git a/tests/comsub-eof.right b/tests/comsub-eof.right
new file mode 100644
index 0000000..452a9c5
--- /dev/null
+++ b/tests/comsub-eof.right
@@ -0,0 +1,13 @@
+./comsub-eof0.sub: line 1: unexpected EOF while looking for matching `)'
+./comsub-eof0.sub: line 5: syntax error: unexpected end of file
+hi
+./comsub-eof2.sub: line 2: warning: here-document at line 1 delimited by end-of-file (wanted `EOF')
+hi
+./comsub-eof3.sub: line 1: unexpected EOF while looking for matching `)'
+./comsub-eof3.sub: line 5: syntax error: unexpected end of file
+./comsub-eof4.sub: line 6: warning: here-document at line 4 delimited by end-of-file (wanted `EOF')
+contents
+./comsub-eof5.sub: line 8: warning: here-document at line 6 delimited by end-of-file (wanted `)')
+hi
+./comsub-eof5.sub: line 13: warning: here-document at line 11 delimited by end-of-file (wanted `EOF')
+hi
diff --git a/tests/comsub-eof.tests b/tests/comsub-eof.tests
new file mode 100644
index 0000000..f96aeee
--- /dev/null
+++ b/tests/comsub-eof.tests
@@ -0,0 +1,11 @@
+${THIS_SH} ./comsub-eof0.sub
+
+${THIS_SH} ./comsub-eof1.sub
+
+${THIS_SH} ./comsub-eof2.sub
+
+${THIS_SH} ./comsub-eof3.sub
+
+${THIS_SH} ./comsub-eof4.sub
+
+${THIS_SH} ./comsub-eof5.sub
diff --git a/tests/comsub-eof0.sub b/tests/comsub-eof0.sub
new file mode 100644
index 0000000..7b0775f
--- /dev/null
+++ b/tests/comsub-eof0.sub
@@ -0,0 +1,4 @@
+foo=$(cat <<EOF
+hi
+EOF )
+echo $foo
diff --git a/tests/comsub-eof1.sub b/tests/comsub-eof1.sub
new file mode 100644
index 0000000..eaa0e97
--- /dev/null
+++ b/tests/comsub-eof1.sub
@@ -0,0 +1,4 @@
+foo=`cat <<EOF
+hi
+EOF`
+echo $foo
diff --git a/tests/comsub-eof2.sub b/tests/comsub-eof2.sub
new file mode 100644
index 0000000..e93e6c8
--- /dev/null
+++ b/tests/comsub-eof2.sub
@@ -0,0 +1,2 @@
+cat <<EOF
+hi
diff --git a/tests/comsub-eof3.sub b/tests/comsub-eof3.sub
new file mode 100644
index 0000000..f3038c7
--- /dev/null
+++ b/tests/comsub-eof3.sub
@@ -0,0 +1,4 @@
+foo=$(cat <<EOF
+hi
+)
+echo $foo
diff --git a/tests/comsub-eof4.sub b/tests/comsub-eof4.sub
new file mode 100644
index 0000000..870ede9
--- /dev/null
+++ b/tests/comsub-eof4.sub
@@ -0,0 +1,4 @@
+e=$(cat <<EOF
+contents
+EOF)
+echo $e
diff --git a/tests/comsub-eof5.sub b/tests/comsub-eof5.sub
new file mode 100644
index 0000000..3da9107
--- /dev/null
+++ b/tests/comsub-eof5.sub
@@ -0,0 +1,9 @@
+echo $(
+cat <<\)
+hi
+))
+
+echo $(
+cat <<\EOF
+hi
+EOF)
diff --git a/tests/comsub-posix.right b/tests/comsub-posix.right
new file mode 100644
index 0000000..a24f25f
--- /dev/null
+++ b/tests/comsub-posix.right
@@ -0,0 +1,57 @@
+abmnopyz
+abmnopyz
+ab
+
+
+abcd
+sh_352.26ax
+sh_352.26ay
+sh_352.25a sh_352.25b
+sh_352.27 ) ) )
+abc
+here doc with )
+)
+bad' syntax
+a
+sh_352.26a
+sh_352.26a
+sh_352.26
+sh_352.26
+sh_352.26
+1
+sh_352.28 )
+sh_352.28 )
+k
+abcd
+ab
+ab
+abcde
+
+argv[1] = <abcde^J >
+abcdefoo
+argv[1] = <abcde>
+argv[2] = <foo>
+argv[1] = <wxabcdeyz>
+argv[1] = <abcde>
+'
+after 1
+'
+after 2
+'
+after 3
+`
+after 4
+hello
+after 5
+'
+after 6
+x
+x
+quoted )
+comment
+here-doc with )
+here-doc terminated with a parenthesis
+' # or a single back- or doublequote
+./comsub-posix1.sub: command substitution: line 2: syntax error near unexpected token `)'
+./comsub-posix1.sub: command substitution: line 2: ` if x; then echo foo )'
+after
diff --git a/tests/comsub-posix.tests b/tests/comsub-posix.tests
new file mode 100644
index 0000000..d45cbf2
--- /dev/null
+++ b/tests/comsub-posix.tests
@@ -0,0 +1,207 @@
+
+# works right
+echo ab$(echo mnop)yz
+# works right
+echo ab$(echo mnop
+)yz
+#
+# works right
+echo $(echo ab
+ )
+# works right
+echo $(
+)
+echo $()
+echo ab$()cd
+
+echo $(case a in (a) echo sh_352.26ax; esac )
+echo $(case a in (a) echo sh_352.26ay; esac)
+
+echo $((echo sh_352.25a);(echo sh_352.25b))
+
+echo $(echo sh_352.27 ')' ")" \)
+ # ) comment
+ )
+
+echo $(
+echo abc # a comment with )
+)
+
+echo $(
+cat <<eof
+here doc with )
+eof
+)
+
+echo $(
+echo ')'
+)
+
+unset x
+x=$(cat <<"EOF"
+bad' syntax
+EOF
+)
+echo "$x"
+unset x
+
+echo $(for f in \); do echo a; done )
+echo $(case a in a) echo sh_352.26a; esac )
+echo $(case a in a) echo sh_352.26a; esac)
+
+echo $(case a in
+ (a) echo sh_352.26
+ ;;
+ esac
+ )
+
+echo $(case a in
+ a) echo sh_352.26
+ ;;
+ esac
+ )
+
+
+echo $(case a in
+ a) echo sh_352.26
+ ;;
+
+
+
+
+
+ esac
+
+ )
+
+echo $(( 4<(2+3) ? 1 : 32))
+
+echo $(cat << end
+sh_352.28 )
+end
+)
+
+echo $(cat <<- end
+sh_352.28 )
+ end
+)
+
+k=$(case x in x) echo k;; esac)
+echo $k
+
+x=$(
+ case $(ls) in
+ example) echo foobix;;
+ esac
+)
+
+echo $( echo ab\
+cd)
+
+echo `echo ab
+cd`
+
+echo `echo ab #xyz
+cd`
+
+echo "$(echo abcde)
+"
+
+recho "$(echo abcde)
+ "
+
+echo $(echo abcde)\
+foo
+
+recho $(echo abcde)\
+ foo
+
+recho "wx$(echo abcde)yz"
+recho "$(echo abcde)"
+
+echo $(cat <<eof
+'
+eof
+)
+
+echo after 1
+
+echo $(cat <<\eof
+'
+eof
+)
+
+echo after 2
+
+echo "$(cat <<\eof
+'
+eof
+)"
+
+echo after 3
+
+echo "$(cat <<\eof
+`
+eof
+)"
+
+echo after 4
+
+echo $(
+cat << ')'
+hello
+)
+)
+
+echo after 5
+
+echo $(cat <<'eof'
+'
+eof
+)
+
+echo after 6
+
+echo $(
+ case x in x) echo x;; esac
+)
+
+echo $(
+ case x in (x) echo x;; esac
+)
+
+echo $(
+ echo 'quoted )'
+)
+
+echo $(
+ echo comment # with )
+)
+
+echo $(
+cat <<\eof
+ here-doc with )
+eof
+)
+
+echo $(
+cat <<\)
+ here-doc terminated with a parenthesis
+)
+)
+
+echo $(
+cat <<\eof
+ ' # or a single back- or doublequote
+eof
+)
+
+${THIS_SH} ./comsub-posix1.sub
+
+# produced a parse error through bash-4.0-beta2
+: $(echo foo)"
+"
+
+# fixed after bash-4.0 released
+: $(case a in a) echo ;; # comment
+esac)
diff --git a/tests/comsub-posix1.sub b/tests/comsub-posix1.sub
new file mode 100644
index 0000000..bbcc60f
--- /dev/null
+++ b/tests/comsub-posix1.sub
@@ -0,0 +1,3 @@
+echo $( if x; then echo foo )
+
+echo after
diff --git a/tests/comsub.right b/tests/comsub.right
new file mode 100644
index 0000000..9894529
--- /dev/null
+++ b/tests/comsub.right
@@ -0,0 +1,29 @@
+./comsub.tests: line 7: hijkl: command not found
+argv[1] = <ab>
+argv[2] = <cd>
+argv[1] = <abmn>
+argv[2] = <opyz>
+argv[1] = <b>
+argv[1] = <a\>
+argv[2] = <b>
+argv[1] = <$>
+argv[2] = <bab>
+argv[1] = <`>
+argv[2] = <ab>
+argv[1] = <\>
+argv[2] = <ab>
+argv[1] = <foo \\^Jbar>
+argv[1] = <foo \^Jbar>
+argv[1] = <sed> argv[2] = <-e> argv[3] = <s/[^I:]/\^J/g>
+argv[1] = <sed> argv[2] = <-e> argv[3] = <s/[^I:]//g>
+argv[1] = <foo\^Jbar>
+argv[1] = <foobar>
+argv[1] = <foo\^Jbar>
+#esac
+a
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+ok 6
diff --git a/tests/comsub.tests b/tests/comsub.tests
new file mode 100644
index 0000000..493bbda
--- /dev/null
+++ b/tests/comsub.tests
@@ -0,0 +1,44 @@
+# command substution parsing tests
+
+TABSIZE=`grep -v '^[ #]' $CAPS </dev/null | grep -v "^$" | grep -v "^capalias"| grep -v "^infoalias" | wc -l`
+
+recho `echo ab cd #efg
+hijkl`
+
+recho ab$(echo mn; echo op)yz
+
+a=`echo 'a b c' | sed 's/ /\\
+/g' | grep 'b'`
+recho $a
+
+recho `echo 'a\' b`
+
+recho `echo '\$' bab`
+
+recho `echo '\`' ab`
+
+recho `echo '\\' ab`
+
+# old-style command substitution parsing compatibility tests -- post bash-3.1
+recho 'foo \\
+bar'
+
+recho 'foo \
+bar'
+
+echo `recho sed -e 's/[ :]/\\
+/g'`
+
+echo `recho sed -e 's/[ :]/\
+/g'`
+
+echo `recho 'foo\\
+bar'`
+
+echo `recho 'foo\
+bar'`
+
+echo $(recho 'foo\
+bar')
+
+${THIS_SH} ./comsub1.sub
diff --git a/tests/comsub1.sub b/tests/comsub1.sub
new file mode 100644
index 0000000..86565e2
--- /dev/null
+++ b/tests/comsub1.sub
@@ -0,0 +1,48 @@
+: $(echo \;)
+
+: $(case a in a) echo ;;# comment
+esac)
+
+: $(case a in a) echo ;; # comment
+esac)
+
+: $(: \;# not a comment )
+
+: $(: \ # not a comment)
+
+echo $(case a in a) echo \#esac ;;
+esac)
+
+: $(case a in a) : ;#esac ;;
+esac)
+
+: $(case a in a) : ;#esac comment )
+esac)
+
+: $(case a in a) : ;
+esac)
+
+echo $(#comment )
+echo a)
+
+echo $(case a in (a) echo ok 1;; # comment
+esac)
+
+echo $(case a in (a) echo ok 2;; # comment
+(b) echo moo;;
+esac)
+
+echo $(case a in (a) echo ok 3 # comment
+;;
+esac)
+
+echo $(case a in a) echo ok 4;; # comment
+esac)
+
+echo $(case a in a) echo ok 5;; # comment
+b) echo moo;;
+esac)
+
+echo $(case a in (a) echo ok 6 # comment
+;;
+esac)
diff --git a/tests/cond-regexp.sub b/tests/cond-regexp.sub
new file mode 100644
index 0000000..724957d
--- /dev/null
+++ b/tests/cond-regexp.sub
@@ -0,0 +1,42 @@
+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
diff --git a/tests/cond.right b/tests/cond.right
new file mode 100644
index 0000000..3775230
--- /dev/null
+++ b/tests/cond.right
@@ -0,0 +1,61 @@
+returns: 0
+returns: 0
+returns: 1
+returns: 0
+returns: 0
+returns: 0
+returns: 0
+returns: 0
+returns: 1
+returns: 0
+returns: 0
+returns: 1
+returns: 1
+returns: 1
+returns: 1
+returns: 0
+returns: 0
+returns: 0
+returns: 1
+returns: 0
+returns: 1
+returns: 0
+returns: 1
+returns: 1
+returns: 0
+./cond.tests: line 101: [[: 4+: syntax error: operand expected (error token is "+")
+returns: 1
+returns: 0
+returns: 0
+returns: 1
+returns: 0
+returns: 0
+returns: 1
+returns: 0
+ok
+jbig2dec
+
+found 1
+libc
+found 2
+libc
+ok 42
+ok 43
+match 1
+match 2
+match 3
+match 4
+match 5
+match 6
+yes 1
+yes 2
+yes 3
+yes 4
+yes 5
+yes 6
+Dog 01 is Wiggles
+Dog 01 is Wiggles
+rematch 1
+matches 7
+matches 8
+matches 9
diff --git a/tests/cond.tests b/tests/cond.tests
new file mode 100755
index 0000000..b053e48
--- /dev/null
+++ b/tests/cond.tests
@@ -0,0 +1,183 @@
+#
+# the test/[ code is tested elsewhere, and the [[...]] just uses the same
+# code. this tests the special features of [[...]]
+#
+TDIR=/usr/homes/chet
+
+# this one is straight out of the ksh88 book
+[[ foo > bar && $PWD -ef . ]]
+echo returns: $?
+
+# [[ x ]] is equivalent to [[ -n x ]]
+[[ x ]]
+echo returns: $?
+
+# [[ ! x ]] is equivalent to [[ ! -n x ]]
+[[ ! x ]]
+echo returns: $?
+
+# ! binds tighter than test/[ -- it binds to a term, not an expression
+[[ ! x || x ]]
+echo returns: $?
+
+# parenthesized terms didn't work right until post-2.04
+[[ a ]]
+echo returns: $?
+
+[[ (a) ]]
+echo returns: $?
+
+[[ -n a ]]
+echo returns: $?
+
+[[ (-n a) ]]
+echo returns: $?
+
+# unset variables don't need to be quoted
+[[ -n $UNSET ]]
+echo returns: $?
+
+[[ -z $UNSET ]]
+echo returns: $?
+
+# the ==/= and != operators do pattern matching
+[[ $TDIR == /usr/homes/* ]]
+echo returns: $?
+
+# ...but you can quote any part of the pattern to have it matched as a string
+[[ $TDIR == /usr/homes/\* ]]
+echo returns: $?
+
+[[ $TDIR == '/usr/homes/*' ]]
+echo returns: $?
+
+# if the first part of && fails, the second is not executed
+[[ -n $UNSET && $UNSET == foo ]]
+echo returns: $?
+
+[[ -z $UNSET && $UNSET == foo ]]
+echo returns: $?
+
+# if the first part of || succeeds, the second is not executed
+[[ -z $UNSET || -d $PWD ]]
+echo returns: $?
+
+# if the rhs were executed, it would be an error
+[[ -n $TDIR || $HOME -ef ${H*} ]]
+echo returns: $?
+
+[[ -n $TDIR && -z $UNSET || $HOME -ef ${H*} ]]
+echo returns: $?
+
+# && has a higher parsing precedence than ||
+[[ -n $TDIR && -n $UNSET || $TDIR -ef . ]]
+echo returns: $?
+
+# ...but expressions in parentheses may be used to override precedence rules
+[[ -n $TDIR || -n $UNSET && $PWD -ef xyz ]]
+echo returns: $?
+
+[[ ( -n $TDIR || -n $UNSET ) && $PWD -ef xyz ]]
+echo returns: $?
+
+# some arithmetic tests for completeness -- see what happens with missing
+# operands, bad expressions, makes sure arguments are evaluated as
+# arithmetic expressions, etc.
+
+unset IVAR A
+[[ 7 -gt $IVAR ]]
+echo returns: $?
+
+[[ $IVAR -gt 7 ]]
+echo returns: $?
+
+IVAR=4
+[[ $IVAR -gt 7 ]]
+echo returns: $?
+
+[[ 7 -eq 4+3 ]]
+echo returns: $?
+
+[[ 7 -eq 4+ ]]
+echo returns: $?
+
+IVAR=4+3
+[[ $IVAR -eq 7 ]]
+echo returns: $?
+
+A=7
+[[ $IVAR -eq A ]]
+echo returns: $?
+
+unset IVAR A
+
+# more pattern matching tests
+
+[[ $filename == *.c ]]
+echo returns: $?
+
+filename=patmatch.c
+
+[[ $filename == *.c ]]
+echo returns: $?
+
+# the extended globbing features may be used when matching patterns
+shopt -s extglob
+
+arg=-7
+
+[[ $arg == -+([0-9]) ]]
+echo returns: $?
+
+arg=-H
+
+[[ $arg == -+([0-9]) ]]
+echo returns: $?
+
+arg=+4
+[[ $arg == ++([0-9]) ]]
+echo returns: $?
+
+# make sure the null string is never matched if the string is not null
+STR=file.c
+PAT=
+
+if [[ $STR = $PAT ]]; then
+ echo oops
+fi
+
+# but that if the string is null, a null pattern is matched correctly
+STR=
+PAT=
+
+if [[ $STR = $PAT ]]; then
+ echo ok
+fi
+
+# test the regular expression conditional operator
+[[ jbig2dec-0.9-i586-001.tgz =~ ([^-]+)-([^-]+)-([^-]+)-0*([1-9][0-9]*)\.tgz ]]
+echo ${BASH_REMATCH[1]}
+
+# this shouldn't echo anything
+[[ jbig2dec-0.9-i586-001.tgz =~ \([^-]+\)-\([^-]+\)-\([^-]+\)-0*\([1-9][0-9]*\)\.tgz ]]
+echo ${BASH_REMATCH[1]}
+
+LDD_BASH=" linux-gate.so.1 => (0xffffe000)
+ libreadline.so.5 => /lib/libreadline.so.5 (0xb7f91000)
+ libhistory.so.5 => /lib/libhistory.so.5 (0xb7f8a000)
+ libncurses.so.5 => /lib/libncurses.so.5 (0xb7f55000)
+ libdl.so.2 => /lib/libdl.so.2 (0xb7f51000)
+ libc.so.6 => /lib/libc.so.6 (0xb7e34000)
+ /lib/ld-linux.so.2 (0xb7fd0000)"
+
+[[ "$LDD_BASH" =~ "libc" ]] && echo "found 1"
+echo ${BASH_REMATCH[@]}
+
+[[ "$LDD_BASH" =~ libc ]] && echo "found 2"
+echo ${BASH_REMATCH[@]}
+
+# bug in all versions up to and including bash-2.05b
+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
diff --git a/tests/coproc.right b/tests/coproc.right
new file mode 100644
index 0000000..6d9deaa
--- /dev/null
+++ b/tests/coproc.right
@@ -0,0 +1,13 @@
+84575
+63 60
+a b c
+84577
+63 60
+flop
+./coproc.tests: line 22: 84577 Terminated coproc REFLECT { cat -; }
+84579
+63 60
+FOO
+63 60
+root
+-1 -1
diff --git a/tests/coproc.tests b/tests/coproc.tests
new file mode 100644
index 0000000..8be3563
--- /dev/null
+++ b/tests/coproc.tests
@@ -0,0 +1,45 @@
+coproc { echo a b c; sleep 2; }
+
+echo $COPROC_PID
+echo ${COPROC[@]}
+
+read LINE <&${COPROC[0]}
+echo $LINE
+
+wait $COPROC_PID
+
+coproc REFLECT { cat - ; }
+
+echo $REFLECT_PID
+echo ${REFLECT[@]}
+
+echo flop >&${REFLECT[1]}
+read LINE <&${REFLECT[0]}
+
+echo $LINE
+
+kill $REFLECT_PID
+wait $REFLECT_PID
+
+coproc xcase -n -u
+
+echo $COPROC_PID
+echo ${COPROC[@]}
+
+echo foo >&${COPROC[1]}
+read <&${COPROC[0]}
+
+echo $REPLY
+echo ${COPROC[@]}
+
+cat /etc/passwd | grep root | awk -F: '{print $1;}' | sed 1q
+
+exec 4<&${COPROC[0]}-
+exec >&${COPROC[1]}-
+
+echo ${COPROC[@]}
+
+read foo <&4
+echo $foo >&2
+
+exit 0
diff --git a/tests/cprint.right b/tests/cprint.right
new file mode 100644
index 0000000..2000072
--- /dev/null
+++ b/tests/cprint.right
@@ -0,0 +1,72 @@
+tf is a function
+tf ()
+{
+ echo this is ${0##*/} > /dev/null;
+ echo a | cat - > /dev/null;
+ test -f ${0##*/} && echo ${0##*/} is a regular file;
+ test -d ${0##*/} || echo ${0##*/} is not a directory;
+ echo a;
+ echo b;
+ echo c;
+ echo background > /dev/null & ( exit 1 );
+ echo $?;
+ {
+ echo a
+ };
+ i=0;
+ while (( i < 3 )); do
+ test -r /dev/fd/$i;
+ i=$(( i + 1 ));
+ done;
+ [[ -r /dev/fd/0 && -w /dev/fd/1 ]] || echo oops > /dev/null;
+ for name in $( echo 1 2 3 );
+ do
+ test -r /dev/fd/$name;
+ done;
+ if [[ -r /dev/fd/0 && -w /dev/fd/1 ]]; then
+ echo ok > /dev/null;
+ else
+ if (( 7 > 40 )); then
+ echo oops;
+ else
+ echo done;
+ fi;
+ fi > /dev/null;
+ case $PATH in
+ *$PWD*)
+ echo \$PWD in \$PATH
+ ;;
+ *)
+ echo \$PWD not in \$PATH
+ ;;
+ esac > /dev/null;
+ while false; do
+ echo z;
+ done > /dev/null;
+ until true; do
+ echo z;
+ done > /dev/null;
+ echo \&\|'()' \{ echo abcde \; \};
+ eval fu\%nc'()' \{ echo abcde \; \};
+ type fu\%nc
+}
+tf2 is a function
+tf2 ()
+{
+ ( {
+ time -p echo a | cat - > /dev/null
+ } ) 2>&1
+}
+cprint.tests is a regular file
+cprint.tests is not a directory
+a
+b
+c
+1
+a
+&|() { echo abcde ; }
+fu%nc is a function
+fu%nc ()
+{
+ echo abcde
+}
diff --git a/tests/cprint.tests b/tests/cprint.tests
new file mode 100644
index 0000000..08ff1eb
--- /dev/null
+++ b/tests/cprint.tests
@@ -0,0 +1,67 @@
+#
+# a nonsense script and shell function to test out the command printing code
+#
+tf()
+{
+ # simple command with redir
+ echo this is ${0##*/} > /dev/null
+
+ # pipeline
+ echo a | cat - > /dev/null
+
+ test -f ${0##*/} && echo ${0##*/} is a regular file
+ test -d ${0##*/} || echo ${0##*/} is not a directory
+
+ echo a ; echo b ; echo c
+
+ echo background >/dev/null &
+
+ ( exit 1 )
+ echo $?
+
+ { echo a ; }
+
+ i=0
+ while (( i < 3 )); do
+ test -r /dev/fd/$i
+ i=$(( i + 1 ))
+ done
+
+ [[ -r /dev/fd/0 && -w /dev/fd/1 ]] || echo oops > /dev/null
+
+ for name in $( echo 1 2 3 ); do
+ test -r /dev/fd/$name
+ done
+
+ if [[ -r /dev/fd/0 && -w /dev/fd/1 ]] ; then
+ echo ok > /dev/null
+ elif (( 7 > 40 )) ; then
+ echo oops
+ else
+ echo done
+ fi > /dev/null
+
+ case $PATH in
+ *$PWD*) echo \$PWD in \$PATH ;;
+ *) echo \$PWD not in \$PATH ;;
+ esac > /dev/null
+
+ while false; do echo z; done > /dev/null
+
+ until true; do echo z ; done > /dev/null
+
+ echo \&\|'()' \{ echo abcde \; \}
+ # when not in POSIX mode, we can have weirdly-named functions
+ eval fu\%nc'()' \{ echo abcde \; \}
+ type fu\%nc
+}
+
+tf2()
+{
+ ( { time -p echo a | cat - > /dev/null ; } ) 2>&1
+}
+
+type tf
+type tf2
+
+tf
diff --git a/tests/dbg-support.right b/tests/dbg-support.right
new file mode 100644
index 0000000..c4a1609
--- /dev/null
+++ b/tests/dbg-support.right
@@ -0,0 +1,371 @@
+debug lineno: 63 main
+debug lineno: 66 main
+FUNCNAME main
+debug lineno: 70 main
+debug lineno: 17 fn1
+debug lineno: 18 fn1
+LINENO 18
+debug lineno: 19 fn1
+LINENO 19
+debug lineno: 20 fn1
+BASH_SOURCE[0] ./dbg-support.tests
+debug lineno: 21 fn1
+FUNCNAME[0] fn1
+debug lineno: 22 fn1
+debug lineno: 22 fn1 70 ./dbg-support.tests
+debug lineno: 23 fn1
+debug lineno: 23 fn1 70 main ./dbg-support.tests
+debug lineno: 24 fn1
+debug lineno: 24 fn1
+debug lineno: 25 fn1
+./dbg-support.tests: line 25: caller: foo: invalid number
+caller: usage: caller [expr]
+debug lineno: 25 fn1
+debug lineno: 17 fn1
+debug lineno: 12 print_return_trap
+debug lineno: 13 print_return_trap
+return lineno: 17 fn1
+debug lineno: 14 print_return_trap
+debug lineno: 71 main
+debug lineno: 28 fn2
+debug lineno: 29 fn2
+fn2 here. Calling fn1...
+debug lineno: 30 fn2
+debug lineno: 17 fn1
+debug lineno: 18 fn1
+LINENO 18
+debug lineno: 19 fn1
+LINENO 19
+debug lineno: 20 fn1
+BASH_SOURCE[0] ./dbg-support.tests
+debug lineno: 21 fn1
+FUNCNAME[0] fn1
+debug lineno: 22 fn1
+debug lineno: 22 fn1 30 ./dbg-support.tests
+debug lineno: 23 fn1
+debug lineno: 23 fn1 30 fn2 ./dbg-support.tests
+debug lineno: 24 fn1
+debug lineno: 24 fn1 71 main ./dbg-support.tests
+debug lineno: 25 fn1
+./dbg-support.tests: line 25: caller: foo: invalid number
+caller: usage: caller [expr]
+debug lineno: 25 fn1
+debug lineno: 17 fn1
+debug lineno: 12 print_return_trap
+debug lineno: 13 print_return_trap
+return lineno: 17 fn1
+debug lineno: 14 print_return_trap
+debug lineno: 28 fn2
+debug lineno: 12 print_return_trap
+debug lineno: 13 print_return_trap
+return lineno: 28 fn2
+debug lineno: 14 print_return_trap
+debug lineno: 72 main
+debug lineno: 33 fn3
+debug lineno: 34 fn3
+LINENO 34
+debug lineno: 35 fn3
+BASH_SOURCE[0] ./dbg-support.tests
+debug lineno: 38 fn3
+debug lineno: 39 fn3
+debug lineno: 40 fn3
+debug lineno: 40 fn3
+debug lineno: 41 fn3
+debug lineno: 42 fn3
+debug lineno: 43 fn3
+fn3 called from file `./dbg-support.tests' at line 0
+debug lineno: 40 fn3
+debug lineno: 40 fn3
+debug lineno: 41 fn3
+debug lineno: 42 fn3
+debug lineno: 42 fn3
+debug lineno: 43 fn3
+main called from file `./dbg-support.tests' at line 0
+debug lineno: 40 fn3
+debug lineno: 40 fn3
+debug lineno: 46 fn3
+debug lineno: 18 source
+SOURCED LINENO 18
+debug lineno: 19 source
+SOURCED BASH_SOURCE[0] ./dbg-support.sub
+debug lineno: 20 source
+debug lineno: 3 sourced_fn
+debug lineno: 4 sourced_fn
+debug lineno: 5 sourced_fn
+SOURCED FN LINENO 5
+debug lineno: 8 sourced_fn
+debug lineno: 9 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[1]: source called from ./dbg-support.tests at line 46
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[2]: fn3 called from ./dbg-support.tests at line 72
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[3]: main called from ./dbg-support.tests at line 0
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 3 sourced_fn
+debug lineno: 12 print_return_trap
+debug lineno: 13 print_return_trap
+return lineno: 3 sourced_fn
+debug lineno: 14 print_return_trap
+debug lineno: 46 fn3
+debug lineno: 12 print_return_trap
+debug lineno: 13 print_return_trap
+return lineno: 46 fn3
+debug lineno: 14 print_return_trap
+debug lineno: 33 fn3
+debug lineno: 12 print_return_trap
+debug lineno: 13 print_return_trap
+return lineno: 33 fn3
+debug lineno: 14 print_return_trap
+debug lineno: 73 main
+debug lineno: 18 source
+SOURCED LINENO 18
+debug lineno: 19 source
+SOURCED BASH_SOURCE[0] ./dbg-support.sub
+debug lineno: 20 source
+debug lineno: 3 sourced_fn
+debug lineno: 4 sourced_fn
+debug lineno: 5 sourced_fn
+SOURCED FN LINENO 5
+debug lineno: 8 sourced_fn
+debug lineno: 9 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[1]: source called from ./dbg-support.tests at line 73
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[2]: main called from ./dbg-support.tests at line 0
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 3 sourced_fn
+debug lineno: 12 print_return_trap
+debug lineno: 13 print_return_trap
+return lineno: 3 sourced_fn
+debug lineno: 14 print_return_trap
+debug lineno: 73 main
+debug lineno: 12 print_return_trap
+debug lineno: 13 print_return_trap
+return lineno: 73 main
+debug lineno: 14 print_return_trap
+debug lineno: 76 main
+debug lineno: 79 main
+LINENO 18
+LINENO 19
+BASH_SOURCE[0] ./dbg-support.tests
+FUNCNAME[0] fn1
+79 ./dbg-support.tests
+79 main ./dbg-support.tests
+
+./dbg-support.tests: line 25: caller: foo: invalid number
+caller: usage: caller [expr]
+
+debug lineno: 80 main
+fn2 here. Calling fn1...
+LINENO 18
+LINENO 19
+BASH_SOURCE[0] ./dbg-support.tests
+FUNCNAME[0] fn1
+30 ./dbg-support.tests
+30 fn2 ./dbg-support.tests
+80 main ./dbg-support.tests
+./dbg-support.tests: line 25: caller: foo: invalid number
+caller: usage: caller [expr]
+
+debug lineno: 81 main
+LINENO 34
+BASH_SOURCE[0] ./dbg-support.tests
+fn3 called from file `./dbg-support.tests' at line 0
+main called from file `./dbg-support.tests' at line 0
+SOURCED LINENO 18
+SOURCED BASH_SOURCE[0] ./dbg-support.sub
+SOURCED FN LINENO 5
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20
+FUNCNAME[1]: source called from ./dbg-support.tests at line 46
+FUNCNAME[2]: fn3 called from ./dbg-support.tests at line 81
+FUNCNAME[3]: main called from ./dbg-support.tests at line 0
+debug lineno: 82 main
+fn4 here. Calling fn3...
+LINENO 34
+BASH_SOURCE[0] ./dbg-support.tests
+fn3 called from file `./dbg-support.tests' at line 82
+fn4 called from file `./dbg-support.tests' at line 0
+main called from file `./dbg-support.tests' at line 0
+SOURCED LINENO 18
+SOURCED BASH_SOURCE[0] ./dbg-support.sub
+SOURCED FN LINENO 5
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20
+FUNCNAME[1]: source called from ./dbg-support.tests at line 46
+FUNCNAME[2]: fn3 called from ./dbg-support.tests at line 51
+FUNCNAME[3]: fn4 called from ./dbg-support.tests at line 82
+FUNCNAME[4]: main called from ./dbg-support.tests at line 0
+debug lineno: 83 main
+SOURCED LINENO 18
+SOURCED BASH_SOURCE[0] ./dbg-support.sub
+SOURCED FN LINENO 5
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20
+FUNCNAME[1]: source called from ./dbg-support.tests at line 83
+FUNCNAME[2]: main called from ./dbg-support.tests at line 0
+return lineno: 83 main
+debug lineno: 86 main
+debug lineno: 89 main
+debug lineno: 18 source
+SOURCED LINENO 18
+debug lineno: 19 source
+SOURCED BASH_SOURCE[0] ./dbg-support.sub
+debug lineno: 20 source
+debug lineno: 3 sourced_fn
+debug lineno: 4 sourced_fn
+debug lineno: 5 sourced_fn
+SOURCED FN LINENO 5
+debug lineno: 8 sourced_fn
+debug lineno: 9 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[0]: sourced_fn called from ./dbg-support.sub at line 20
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[1]: source called from ./dbg-support.tests at line 89
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[2]: main called from ./dbg-support.tests at line 0
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 3 sourced_fn
+debug lineno: 12 print_return_trap
+debug lineno: 13 print_return_trap
+return lineno: 3 sourced_fn
+debug lineno: 14 print_return_trap
+debug lineno: 89 main
+debug lineno: 12 print_return_trap
+debug lineno: 13 print_return_trap
+return lineno: 89 main
+debug lineno: 14 print_return_trap
+debug lineno: 90 main
+debug lineno: 93 main
+debug lineno: 93 main
+debug lineno: 94 main
+debug lineno: 97 main
+debug lineno: 93 main
+debug lineno: 93 main
+debug lineno: 94 main
+debug lineno: 97 main
+debug lineno: 93 main
+debug lineno: 93 main
+debug lineno: 94 main
+debug lineno: 95 main
+Hit 2
+debug lineno: 97 main
+debug lineno: 93 main
+debug lineno: 93 main
+debug lineno: 103 main
+SOURCED FN LINENO 5 FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 103 FUNCNAME[1]: main called from ./dbg-support.tests at line 0
+debug lineno: 104 main
+SOURCED FN LINENO 5 FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 104 FUNCNAME[1]: main called from ./dbg-support.tests at line 0
+debug lineno: 105 main
+debug lineno: 106 main
+SOURCED FN LINENO 5
+FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 106
+FUNCNAME[1]: main called from ./dbg-support.tests at line 0
+debug lineno: 110 main
+debug lineno: 111 main
+debug lineno: 3 sourced_fn
+debug lineno: 4 sourced_fn
+debug lineno: 5 sourced_fn
+SOURCED FN LINENO 5
+debug lineno: 8 sourced_fn
+debug lineno: 9 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[0]: sourced_fn called from ./dbg-support.tests at line 111
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 11 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 12 sourced_fn
+debug lineno: 13 sourced_fn
+FUNCNAME[1]: main called from ./dbg-support.tests at line 0
+debug lineno: 10 sourced_fn
+debug lineno: 10 sourced_fn
+debug lineno: 3 sourced_fn
+debug lineno: 12 print_return_trap
+debug lineno: 13 print_return_trap
+return lineno: 3 sourced_fn
+debug lineno: 14 print_return_trap
+debug lineno: 114 main
+debug lineno: 119 main
+debug lineno: 123 main
+got it
+debug lineno: 131 main
+debug lineno: 132 main
+debug lineno: 133 main
+debug lineno: 132 main
+debug lineno: 133 main
+debug lineno: 131 main
+debug lineno: 132 main
+debug lineno: 133 main
+debug lineno: 132 main
+debug lineno: 133 main
+debug lineno: 137 main
+main: calling f1
+f1: calling f2
+f2: calling f3
+f3: calling callstack
+deep 6
+0 z
+1 3
+2 y
+3 2
+4 x
+5 1
+FUNCNAME stack: f3 f2 f1 main
+26 f2 ./dbg-support3.sub
+f3: returning
+f2: return from f3
+f1: return from f2
+main: f1 returns
diff --git a/tests/dbg-support.sub b/tests/dbg-support.sub
new file mode 100644
index 0000000..f68f8d9
--- /dev/null
+++ b/tests/dbg-support.sub
@@ -0,0 +1,26 @@
+# This file is intended to be sourced from one of the bashdb test programs
+
+sourced_fn() {
+ name="fn2"
+ echo "SOURCED FN LINENO $LINENO"
+
+ # Print a stack trace
+ declare -i n
+ n=${#FUNCNAME[@]}
+ for (( i=0 ; (( i < $n )) ; i++ )) ; do
+ local -i j=i+1
+ [ $j -eq $n ] && j=i # main()'s file is the same as the first caller
+ echo "FUNCNAME[$i]: ${FUNCNAME[$i]} called from ${BASH_SOURCE[$j]}" \
+ "at line ${BASH_LINENO[$i]}"
+ done
+}
+
+echo "SOURCED LINENO $LINENO"
+echo "SOURCED BASH_SOURCE[0]" ${BASH_SOURCE[0]}
+sourced_fn
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
+
diff --git a/tests/dbg-support.tests b/tests/dbg-support.tests
new file mode 100755
index 0000000..ad06d01
--- /dev/null
+++ b/tests/dbg-support.tests
@@ -0,0 +1,142 @@
+#!../bash
+#
+# Test correct functioning bash debug support not via the bashdb
+# debugger but merely by printing via print_trap()
+# $Id: dbg-support.tests,v 1.13 2003/02/17 22:02:25 rockyb Exp $
+shopt -s extdebug
+print_debug_trap() {
+ echo "debug lineno: $1 ${FUNCNAME[1]}"
+ return
+}
+
+print_return_trap() {
+ echo "return lineno: $1 ${FUNCNAME[1]}"
+ return
+}
+
+fn1() {
+ echo "LINENO $LINENO"
+ echo "LINENO $LINENO"
+ echo "BASH_SOURCE[0]" ${BASH_SOURCE[0]}
+ echo "FUNCNAME[0]" ${FUNCNAME[0]}
+ echo `caller`
+ echo `caller 0`
+ echo `caller 1`
+ echo `caller foo`
+}
+
+fn2() {
+ echo "fn2 here. Calling fn1..."
+ fn1
+}
+
+fn3() {
+ echo "LINENO $LINENO"
+ echo "BASH_SOURCE[0]" ${BASH_SOURCE[0]}
+
+ # Print a stack trace
+ declare -i n
+ n=${#FUNCNAME[@]}
+ for (( i=0 ; (( i < $n )) ; i++ )) ; do
+ local -i j=i+1
+ [ $j -eq $n ] && j=i # main()'s file is the same as the first caller
+ echo "${FUNCNAME[$i]} called from file " \
+ "\`${BASH_SOURCE[$j]}' at line ${BASH_LINENO[$j]}"
+ done
+ source ./dbg-support.sub
+}
+
+fn4() {
+ echo "fn4 here. Calling fn3..."
+ fn3
+}
+
+
+#!../bash
+#
+# Test of support for debugging facilities in bash
+#
+# Test debugger set option functrace - set on. Not in vanilla Bash 2.05
+#
+set -o functrace
+trap 'print_debug_trap $LINENO' DEBUG
+trap 'print_return_trap $LINENO' RETURN
+
+# Funcname is now an array, but you still can't see it outside a function
+echo "FUNCNAME" ${FUNCNAME[0]:-main}
+
+# We should trace into the below.
+# Start easy with a simple function.
+fn1
+fn2
+fn3
+source ./dbg-support.sub
+
+# Test debugger set option functrace - set off
+set +T
+
+# We should not trace into this.
+fn1
+fn2
+fn3
+fn4
+source ./dbg-support.sub
+
+# Another way to say: set -o functrace
+set -T
+
+# We should trace into this.
+source ./dbg-support.sub
+set +T
+
+# Test that the line numbers in the presence of conditionals are correct.
+for (( i=0 ; (( i <= 2 )) ; i++ )) ; do
+ if [ $i -eq 2 ] ; then
+ echo "Hit 2"
+ fi
+ j=4
+done
+
+#
+# Check line numbers in command substitution
+#
+echo $(sourced_fn)
+echo `sourced_fn`
+x=$((sourced_fn))
+x={ sourced_fn }
+
+# Make sure we step into sourced_fn as a comand when we request to do so.
+# Vanilla bash 2.0 doesn't do.
+set -o functrace
+x={ sourced_fn }
+
+# Should see line number of xyzzy below. Vanilla bash 2.05b doesn't do
+case xyzzy in
+ a )
+ x=5
+ ;;
+ xyzz? )
+ case 3 in
+ 2 )
+ x=6 ;;
+ 3 )
+ echo "got it" ;;
+ * ) echo "no good" ;;
+ esac
+ ;;
+ * )
+esac
+
+# Should see line numbers for initial for lines.
+for i in 0 1 ; do
+ for j in 3 4 ; do
+ ((x=i+j))
+ done
+done
+
+${THIS_SH} ./dbg-support3.sub
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff --git a/tests/dbg-support2.right b/tests/dbg-support2.right
new file mode 100644
index 0000000..c9d884e
--- /dev/null
+++ b/tests/dbg-support2.right
@@ -0,0 +1,7 @@
+lineno: 17 (6) main
+lineno: 18 (6) main
+x is 1
+lineno: 19 (6) main
+lineno: 20 (6) main
+lineno: 21 (6) main
+x is 1
diff --git a/tests/dbg-support2.tests b/tests/dbg-support2.tests
new file mode 100755
index 0000000..fdc0f31
--- /dev/null
+++ b/tests/dbg-support2.tests
@@ -0,0 +1,26 @@
+#!../bash
+#
+# Test correct trap return codes = 2 means skip execution.
+shopt -s extdebug
+print_trap() {
+ echo "lineno: $1 ($LINENO) ${FUNCNAME[1]}"
+ if [[ $debug_exit == 2 ]] ; then
+ debug_exit=0
+ return 2
+ fi
+ return 0
+}
+
+debug_exit=0
+trap 'print_trap $LINENO' DEBUG
+
+x=1
+echo "x is $x"
+debug_exit=2
+x=2
+echo "x is $x"
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff --git a/tests/dbg-support3.sub b/tests/dbg-support3.sub
new file mode 100644
index 0000000..cc52c65
--- /dev/null
+++ b/tests/dbg-support3.sub
@@ -0,0 +1,39 @@
+shopt -s extdebug
+
+callstack(){
+ deep=${#BASH_ARGV[*]}
+ echo "deep $deep"
+ i=0
+ for ff in ${BASH_ARGV[@]}
+ do
+ echo "$i $ff"
+ i=$(($i+1))
+ done
+}
+
+f3()
+{
+ echo $FUNCNAME: calling callstack
+ callstack
+ echo FUNCNAME stack: ${FUNCNAME[@]}
+ caller 0
+ echo $FUNCNAME: returning
+}
+
+f2()
+{
+ echo $FUNCNAME: calling f3
+ f3 3 z
+ echo $FUNCNAME: return from f3
+}
+
+f1()
+{
+ echo $FUNCNAME: calling f2
+ f2 2 y
+ echo $FUNCNAME: return from f2
+}
+
+echo main: calling f1
+f1 1 x
+echo main: f1 returns
diff --git a/tests/dollar-at-star b/tests/dollar-at-star
new file mode 100755
index 0000000..54e499d
--- /dev/null
+++ b/tests/dollar-at-star
@@ -0,0 +1,238 @@
+# first, let's start with the basics
+
+recho "$@"
+recho "$*"
+
+recho $@
+recho $*
+
+set a b
+
+recho "$*"
+
+# If IFS is null, the parameters are joined without separators
+IFS=''
+recho "$*"
+
+# If IFS is unset, the parameters are separated by spaces
+unset IFS
+recho "${*}"
+
+recho "$@"
+recho $@
+
+IFS='/'
+set bob 'tom dick harry' joe
+set $*
+recho $#
+recho $1
+recho $2
+recho $3
+
+set bob 'tom dick harry' joe
+set ${*}
+recho $#
+recho $1
+recho $2
+recho $3
+
+set bob 'tom dick harry' joe
+set $@
+recho $#
+recho $1
+recho $2
+recho $3
+
+set bob 'tom dick harry' joe
+set ${@}
+recho $#
+recho $1
+recho $2
+recho $3
+
+# according to POSIX.2, unquoted $* should expand to multiple words if
+# $IFS is null, just like unquoted $@
+IFS=''
+set bob 'tom dick harry' joe
+set $*
+recho $#
+recho $1
+recho $2
+recho $3
+
+set bob 'tom dick harry' joe
+set $@
+recho $#
+recho $1
+recho $2
+recho $3
+
+# if IFS is unset, the individual positional parameters are split on
+# " \t\n" if $* or $@ are unquoted
+unset IFS
+set bob 'tom dick harry' joe
+set $*
+recho $#
+recho $1
+recho $2
+recho $3
+
+set bob 'tom dick harry' joe
+set $@
+recho $#
+recho $1
+recho $2
+recho $3
+
+# but not for "$@" or "$*"
+set bob 'tom dick harry' joe
+set "$*"
+recho $#
+recho $1
+recho $2
+recho $3
+
+set bob 'tom dick harry' joe
+set "$@"
+recho $#
+recho $1
+recho $2
+recho $3
+
+# POSIX.2 says these should both expand the positional parameters
+# to multiple words
+set a b c d e
+IFS=""
+recho $@
+recho "$@"
+
+# this example is straight from the POSIX.2 rationale
+set foo bar bam
+
+recho "$@"
+recho "$*"
+
+unset IFS
+
+recho "$@"
+recho $@
+recho "$*"
+
+IFS=:
+
+# special variables
+set -- 1 2 3 4 5 6 7 8 9 10
+
+bar=${*}
+foo=$*
+echo foo = "$foo"
+echo bar = "$bar"
+
+foo1=$@
+bar1=${@}
+
+echo foo1 = "$foo1"
+echo bar1 = "$bar1"
+
+foo2="$*"
+bar2="${*}"
+
+echo foo2 = "$foo2"
+echo bar2 = "$bar2"
+
+eval foo3='$*' bar3='${*}'
+echo foo3 = "$foo3"
+echo bar3 = "$bar3"
+
+case $* in
+*\:*) echo ok 1;;
+*) echo bad 1;;
+esac
+
+case $@ in
+*\:*) echo bad 2;;
+*) echo ok 2;;
+esac
+
+case "$*" in
+*\:*) echo ok 3;;
+*) echo bad 3;;
+esac
+
+case "$@" in
+*\:*) echo bad 4;;
+*) echo ok 4;;
+esac
+
+IFS=$' \t\n'
+
+bar=${*}
+foo=$*
+echo foo = "$foo"
+echo bar = "$bar"
+
+foo1=$@
+bar1=${@}
+
+echo foo1 = "$foo1"
+echo bar1 = "$bar1"
+
+foo2="$*"
+bar2="${*}"
+
+echo foo2 = "$foo2"
+echo bar2 = "$bar2"
+
+eval foo3='$*' bar3='${*}'
+echo foo3 = "$foo3"
+echo bar3 = "$bar3"
+
+case $* in
+*\ *) echo ok 1;;
+*) echo bad 1;;
+esac
+
+case $@ in
+*\ *) echo ok 2;;
+*) echo bad 2;;
+esac
+
+case "$*" in
+*\ *) echo ok 3;;
+*) echo bad 3;;
+esac
+
+case "$@" in
+*\ *) echo ok 4;;
+*) echo bad 4;;
+esac
+
+# tests for special expansion of "$*" and "${array[*]}" when used with other
+# expansions -- bugs through bash-2.05b
+${THIS_SH} ./dollar-star1.sub
+
+# tests for expansion of "$@" on rhs of things like ${param:+word}. Bugs
+# though bash-2.05b
+${THIS_SH} ./dollar-at1.sub
+
+# tests for expansion of other variables in double-quoted strings containing
+# $@. Bugs through bash-2.05b
+${THIS_SH} ./dollar-at2.sub
+
+# tests for various expansions of $* in different contexts -- word split,
+# no splitting, etc. when $IFS is NUL
+${THIS_SH} ./dollar-star2.sub
+
+# tests for expansions of "${array[*]}" and "${array[@]}" when $IFS is not the
+# default and the array contains null elements
+${THIS_SH} ./dollar-star3.sub
+
+# test for set -u and expansions of $@ when there are no positional parameters
+${THIS_SH} ./dollar-at3.sub
+# test for set -u and expansions of $* when there are no positional parameters
+${THIS_SH} ./dollar-star4.sub
+
+# tests for expansions of $* when IFS is null
+${THIS_SH} ./dollar-star5.sub
+
+exit 0
diff --git a/tests/dollar-at1.sub b/tests/dollar-at1.sub
new file mode 100644
index 0000000..6d40786
--- /dev/null
+++ b/tests/dollar-at1.sub
@@ -0,0 +1,29 @@
+echo_argc()
+{
+ echo $#
+}
+
+a()
+{
+ shift
+ echo_argc "$@"
+ echo_argc ${1:+"$@"}
+ echo_argc "${1:+$@}"
+ echo_argc 1 2 3
+}
+
+b()
+{
+ _IFS="$IFS"
+ IFS="$1"
+ shift
+ echo_argc "$@"
+ echo_argc ${1:+"$@"}
+ echo_argc "${1:+$@}"
+ echo_argc 1 2 3
+ IFS="$_IFS"
+}
+
+a "X" foo bar hoge
+
+b "X" foo bar hoge
diff --git a/tests/dollar-at2.sub b/tests/dollar-at2.sub
new file mode 100644
index 0000000..c079a29
--- /dev/null
+++ b/tests/dollar-at2.sub
@@ -0,0 +1,19 @@
+t1()
+{
+ xxx="echo $@"
+
+ recho "$xxx ; echo $@"
+}
+
+t2()
+{
+ xxx="echo $@"
+
+ recho "${xxx} ; echo $@"
+}
+
+t1 1
+t1 1 2
+
+t2 1
+t2 1 2
diff --git a/tests/dollar-at3.sub b/tests/dollar-at3.sub
new file mode 100644
index 0000000..76a65c1
--- /dev/null
+++ b/tests/dollar-at3.sub
@@ -0,0 +1,9 @@
+set -u
+
+echo ${#@}
+echo ${@:-bar}
+
+echo $@
+echo after 1
+echo ${@}
+echo after 2
diff --git a/tests/dollar-star1.sub b/tests/dollar-star1.sub
new file mode 100644
index 0000000..63a9ef8
--- /dev/null
+++ b/tests/dollar-star1.sub
@@ -0,0 +1,31 @@
+set -- a b c
+x=(a b c); IFS='|'
+
+echo "${*/#/x}"
+echo "${x[*]/#/x}"
+
+echo "$*"
+echo "${x[*]}"
+
+echo "$@"
+echo "${x[@]}"
+
+echo "${@/#/x}"
+echo "${x[@]/#/x}"
+
+echo "${*:1:2}"
+echo "${x[*]:1:2}"
+
+echo "${@:1:2}"
+echo "${x[@]:1:2}"
+
+IFS=$' \t\n'
+set -- xa xb xc
+x=(xa xb xc)
+IFS='|'
+
+echo "${*#x}"
+echo "${x[*]#x}"
+
+echo "$*"
+echo "${x[*]}"
diff --git a/tests/dollar-star2.sub b/tests/dollar-star2.sub
new file mode 100644
index 0000000..844a297
--- /dev/null
+++ b/tests/dollar-star2.sub
@@ -0,0 +1,26 @@
+set A B
+
+IFS=
+
+x=$*
+y="$*"
+
+recho "$x"
+recho "$y"
+
+IFS=$' \t\n'
+
+set 'A B' 'C D'
+
+IFS=
+
+x=$*
+y="$*"
+
+recho "$x"
+recho "$y"
+
+recho $x
+recho $*
+recho $y
+recho "$*"
diff --git a/tests/dollar-star3.sub b/tests/dollar-star3.sub
new file mode 100644
index 0000000..8cf4bb2
--- /dev/null
+++ b/tests/dollar-star3.sub
@@ -0,0 +1,18 @@
+IFS=/
+#file=/mnt/cdrom/RedHat/RPMS
+#recho "${file[*]:0:3}"
+
+i[0]=fooq
+i[1]=
+i[2]=barq
+i[3]=
+recho "${i[*]:0}"
+recho "${i[@]:0}"
+
+recho "${i[*]/q/!}"
+recho "${i[@]/q/!}"
+
+recho "${i[*]#?}"
+recho "${i[@]#?}"
+
+# Need to complete this with case-modifying expansion examples
diff --git a/tests/dollar-star4.sub b/tests/dollar-star4.sub
new file mode 100644
index 0000000..1b551f2
--- /dev/null
+++ b/tests/dollar-star4.sub
@@ -0,0 +1,9 @@
+set -u
+
+echo ${#*}
+echo ${*:-bar}
+
+echo $*
+echo after 1
+echo ${*}
+echo after 2
diff --git a/tests/dollar-star5.sub b/tests/dollar-star5.sub
new file mode 100644
index 0000000..8448bf3
--- /dev/null
+++ b/tests/dollar-star5.sub
@@ -0,0 +1,16 @@
+set -- a b
+IFS=
+
+echo $*
+echo "$*"
+
+a=abcd
+echo "${a#$*}"
+
+case ab in
+$*) echo ok 1;;
+esac
+
+case $* in
+ab) echo ok 2 ;;
+esac
diff --git a/tests/dollar.right b/tests/dollar.right
new file mode 100644
index 0000000..13db8e2
--- /dev/null
+++ b/tests/dollar.right
@@ -0,0 +1,168 @@
+argv[1] = <>
+argv[1] = <a b>
+argv[1] = <ab>
+argv[1] = <a b>
+argv[1] = <a>
+argv[2] = <b>
+argv[1] = <a>
+argv[2] = <b>
+argv[1] = <3>
+argv[1] = <bob>
+argv[1] = <tom dick harry>
+argv[1] = <joe>
+argv[1] = <3>
+argv[1] = <bob>
+argv[1] = <tom dick harry>
+argv[1] = <joe>
+argv[1] = <3>
+argv[1] = <bob>
+argv[1] = <tom dick harry>
+argv[1] = <joe>
+argv[1] = <3>
+argv[1] = <bob>
+argv[1] = <tom dick harry>
+argv[1] = <joe>
+argv[1] = <3>
+argv[1] = <bob>
+argv[1] = <tom dick harry>
+argv[1] = <joe>
+argv[1] = <3>
+argv[1] = <bob>
+argv[1] = <tom dick harry>
+argv[1] = <joe>
+argv[1] = <5>
+argv[1] = <bob>
+argv[1] = <tom>
+argv[1] = <dick>
+argv[1] = <5>
+argv[1] = <bob>
+argv[1] = <tom>
+argv[1] = <dick>
+argv[1] = <1>
+argv[1] = <bob>
+argv[2] = <tom>
+argv[3] = <dick>
+argv[4] = <harry>
+argv[5] = <joe>
+argv[1] = <3>
+argv[1] = <bob>
+argv[1] = <tom>
+argv[2] = <dick>
+argv[3] = <harry>
+argv[1] = <joe>
+argv[1] = <a>
+argv[2] = <b>
+argv[3] = <c>
+argv[4] = <d>
+argv[5] = <e>
+argv[1] = <a>
+argv[2] = <b>
+argv[3] = <c>
+argv[4] = <d>
+argv[5] = <e>
+argv[1] = <foo>
+argv[2] = <bar>
+argv[3] = <bam>
+argv[1] = <foobarbam>
+argv[1] = <foo>
+argv[2] = <bar>
+argv[3] = <bam>
+argv[1] = <foo>
+argv[2] = <bar>
+argv[3] = <bam>
+argv[1] = <foo bar bam>
+foo = 1:2:3:4:5:6:7:8:9:10
+bar = 1:2:3:4:5:6:7:8:9:10
+foo1 = 1 2 3 4 5 6 7 8 9 10
+bar1 = 1 2 3 4 5 6 7 8 9 10
+foo2 = 1:2:3:4:5:6:7:8:9:10
+bar2 = 1:2:3:4:5:6:7:8:9:10
+foo3 = 1:2:3:4:5:6:7:8:9:10
+bar3 = 1:2:3:4:5:6:7:8:9:10
+ok 1
+ok 2
+ok 3
+ok 4
+foo = 1 2 3 4 5 6 7 8 9 10
+bar = 1 2 3 4 5 6 7 8 9 10
+foo1 = 1 2 3 4 5 6 7 8 9 10
+bar1 = 1 2 3 4 5 6 7 8 9 10
+foo2 = 1 2 3 4 5 6 7 8 9 10
+bar2 = 1 2 3 4 5 6 7 8 9 10
+foo3 = 1 2 3 4 5 6 7 8 9 10
+bar3 = 1 2 3 4 5 6 7 8 9 10
+ok 1
+ok 2
+ok 3
+ok 4
+xa|xb|xc
+xa|xb|xc
+a|b|c
+a|b|c
+a b c
+a b c
+xa xb xc
+xa xb xc
+a|b
+b|c
+a b
+b c
+a|b|c
+a|b|c
+xa|xb|xc
+xa|xb|xc
+3
+3
+3
+3
+3
+3
+3
+3
+argv[1] = <echo 1 ; echo 1>
+argv[1] = <echo 1 2 ; echo 1>
+argv[2] = <2>
+argv[1] = <echo 1 ; echo 1>
+argv[1] = <echo 1 2 ; echo 1>
+argv[2] = <2>
+argv[1] = <AB>
+argv[1] = <AB>
+argv[1] = <A BC D>
+argv[1] = <A BC D>
+argv[1] = <A BC D>
+argv[1] = <A B>
+argv[2] = <C D>
+argv[1] = <A BC D>
+argv[1] = <A BC D>
+argv[1] = <fooq//barq/>
+argv[1] = <fooq>
+argv[2] = <>
+argv[3] = <barq>
+argv[4] = <>
+argv[1] = <foo!//bar!/>
+argv[1] = <foo!>
+argv[2] = <>
+argv[3] = <bar!>
+argv[4] = <>
+argv[1] = <ooq//arq/>
+argv[1] = <ooq>
+argv[2] = <>
+argv[3] = <arq>
+argv[4] = <>
+0
+bar
+
+after 1
+
+after 2
+0
+bar
+
+after 1
+
+after 2
+a b
+ab
+cd
+ok 1
+ok 2
diff --git a/tests/dstack.right b/tests/dstack.right
new file mode 100644
index 0000000..8f27d28
--- /dev/null
+++ b/tests/dstack.right
@@ -0,0 +1,55 @@
+./dstack.tests: line 6: pushd: /tmp/xxx-notthere: No such file or directory
+./dstack.tests: line 9: pushd: no other directory
+./dstack.tests: line 10: popd: directory stack empty
+./dstack.tests: line 13: pushd: -m: invalid number
+pushd: usage: pushd [-n] [+N | -N | dir]
+./dstack.tests: line 14: popd: -m: invalid number
+popd: usage: popd [-n] [+N | -N]
+./dstack.tests: line 15: dirs: -m: invalid number
+dirs: usage: dirs [-clpv] [+N] [-N]
+./dstack.tests: line 16: dirs: 7: invalid option
+dirs: usage: dirs [-clpv] [+N] [-N]
+/
+ok
+/usr /
+/usr /
+/usr /
+/usr /
+/usr /
+/
+/usr /
+/etc /usr /
+/etc /usr /
+/etc /usr /
+ 0 /etc
+ 1 /usr
+ 2 /
+/usr /etc /
+/etc /usr /
+/tmp /etc /usr /
+/tmp
+/tmp
+/usr
+/usr
+./dstack.tests: line 58: dirs: 9: directory stack index out of range
+./dstack.tests: line 58: dirs: 9: directory stack index out of range
+./dstack.tests: line 59: pushd: +9: directory stack index out of range
+./dstack.tests: line 59: pushd: -9: directory stack index out of range
+./dstack.tests: line 60: popd: +9: directory stack index out of range
+./dstack.tests: line 60: popd: -9: directory stack index out of range
+/tmp /etc /
+/tmp /etc /
+/tmp /etc /
+/tmp /usr /etc /
+/tmp
+/tmp /usr /etc /
+/tmp /usr /etc /
+/tmp
+/tmp /bin /etc /
+/tmp
+/tmp /bin /
+/tmp
+/bin / /tmp
+/bin / /tmp
+/bin
+/bin
diff --git a/tests/dstack.tests b/tests/dstack.tests
new file mode 100644
index 0000000..49b97d3
--- /dev/null
+++ b/tests/dstack.tests
@@ -0,0 +1,87 @@
+export LC_ALL=C
+export LANG=C
+
+dirs -c
+# error -- nonexistant directory
+pushd /tmp/xxx-notthere
+
+# errors -- empty stack
+pushd
+popd
+
+# errors -- bad numeric arguments -- should not cause the script to exit
+pushd -m
+popd -m
+dirs -m
+dirs 7
+
+MYDIR=$PWD
+unalias cd 2>/dev/null
+
+unalias -a
+
+command cd -P /
+command pwd -P # better be `/'
+
+case "$OLDPWD" in
+$MYDIR) echo ok ;;
+*) echo oops -- bad \$OLDPWD ;;
+esac
+
+pushd /usr
+echo $PWD $OLDPWD
+dirs
+echo ${DIRSTACK[@]}
+
+# this should not change the directory stack at all
+pushd -n +0
+dirs
+
+popd
+pushd /usr
+
+pushd /etc
+dirs
+dirs -l
+dirs -v
+
+# two consecutive `pushd's should swap the top two stack elements, then
+# swap them back, leaving the stack intact
+pushd
+pushd
+
+pushd /tmp
+echo ${DIRSTACK[0]} ; dirs +0
+echo ${DIRSTACK[2]} ; dirs +2
+
+# these should be errors, but not affect the directory stack
+dirs +9; dirs -9
+pushd +9 ; pushd -9
+popd +9 ; popd -9
+
+popd -n +2
+dirs
+echo ${DIRSTACK[@]}
+
+pushd -n /usr
+echo $PWD
+dirs
+echo ${DIRSTACK[@]}
+
+builtin pwd
+
+DIRSTACK[1]=/bin
+dirs
+
+builtin pwd
+popd +2
+builtin pwd -L
+pushd -1
+dirs
+echo ${DIRSTACK[0]}
+
+dirs -c
+dirs
+
+# this is for the benefit of pure coverage
+cd "$MYDIR"
diff --git a/tests/dstack2.right b/tests/dstack2.right
new file mode 100644
index 0000000..d682a27
--- /dev/null
+++ b/tests/dstack2.right
@@ -0,0 +1,24 @@
+expect ~1
+~1
+/usr /
+/tmp /usr /
+/tmp /usr /
+these lines should be the same
+/tmp
+/tmp /tmp
+these lines should be the same
+/usr
+/usr /usr
+these lines should be the same
+/
+/ /
+these lines should be the same
+/tmp
+/tmp /tmp
+these lines should be the same
+/usr
+/usr /usr
+ 1 /usr
+these lines should be the same
+/
+/ /
diff --git a/tests/dstack2.tests b/tests/dstack2.tests
new file mode 100644
index 0000000..d902bff
--- /dev/null
+++ b/tests/dstack2.tests
@@ -0,0 +1,33 @@
+cd /
+
+echo expect '~1'
+echo ~1
+
+pushd /usr
+pushd /tmp
+dirs
+
+echo these lines should be the same
+dirs +0
+echo ~0 ${DIRSTACK[0]}
+echo these lines should be the same
+dirs +1
+echo ~1 ${DIRSTACK[1]}
+echo these lines should be the same
+dirs +2
+echo ~2 ${DIRSTACK[2]}
+
+NDIRS=$(( ${#DIRSTACK[@]} - 1 ))
+
+echo these lines should be the same
+dirs -2
+echo ~-2 ${DIRSTACK[NDIRS-2]}
+
+echo these lines should be the same
+dirs -1
+echo ~-1 ${DIRSTACK[NDIRS-1]}
+dirs -v -1
+
+echo these lines should be the same
+dirs -0
+echo ~-0 ${DIRSTACK[NDIRS]}
diff --git a/tests/errors.right b/tests/errors.right
new file mode 100644
index 0000000..ae7bf29
--- /dev/null
+++ b/tests/errors.right
@@ -0,0 +1,101 @@
+./errors.tests: line 17: alias: -x: invalid option
+alias: usage: alias [-p] [name[=value] ... ]
+./errors.tests: line 18: unalias: -x: invalid option
+unalias: usage: unalias [-a] name [name ...]
+./errors.tests: line 19: alias: hoowah: not found
+./errors.tests: line 20: unalias: hoowah: not found
+./errors.tests: line 23: `1': not a valid identifier
+declare -fr func
+./errors.tests: line 36: func: readonly function
+./errors.tests: line 39: unset: -x: invalid option
+unset: usage: unset [-f] [-v] [name ...]
+./errors.tests: line 42: unset: func: cannot unset: readonly function
+./errors.tests: line 45: declare: func: readonly function
+./errors.tests: line 49: unset: XPATH: cannot unset: readonly variable
+./errors.tests: line 52: unset: `/bin/sh': not a valid identifier
+./errors.tests: line 55: unset: cannot simultaneously unset a function and a variable
+./errors.tests: line 58: declare: -z: invalid option
+declare: usage: declare [-aAfFilrtux] [-p] [name[=value] ...]
+./errors.tests: line 60: declare: `-z': not a valid identifier
+./errors.tests: line 61: declare: `/bin/sh': not a valid identifier
+./errors.tests: line 65: declare: cannot use `-f' to make functions
+./errors.tests: line 68: exec: -i: invalid option
+exec: usage: exec [-cl] [-a name] [command [arguments ...]] [redirection ...]
+./errors.tests: line 72: export: XPATH: not a function
+./errors.tests: line 75: break: only meaningful in a `for', `while', or `until' loop
+./errors.tests: line 76: continue: only meaningful in a `for', `while', or `until' loop
+./errors.tests: line 79: shift: label: numeric argument required
+./errors.tests: line 84: shift: too many arguments
+./errors.tests: line 90: let: expression expected
+./errors.tests: line 93: local: can only be used in a function
+./errors.tests: line 96: logout: not login shell: use `exit'
+./errors.tests: line 99: hash: notthere: not found
+./errors.tests: line 102: hash: -v: invalid option
+hash: usage: hash [-lr] [-p pathname] [-dt] [name ...]
+./errors.tests: line 106: hash: hashing disabled
+./errors.tests: line 109: export: `AA[4]': not a valid identifier
+./errors.tests: line 110: readonly: `AA[4]': not a valid identifier
+./errors.tests: line 113: [-2]: bad array subscript
+./errors.tests: line 117: AA: readonly variable
+./errors.tests: line 121: AA: readonly variable
+./errors.tests: line 129: shift: 5: shift count out of range
+./errors.tests: line 130: shift: -2: shift count out of range
+./errors.tests: line 133: shopt: no_such_option: invalid shell option name
+./errors.tests: line 134: shopt: no_such_option: invalid shell option name
+./errors.tests: line 137: umask: 09: octal number out of range
+./errors.tests: line 138: umask: `:': invalid symbolic mode character
+./errors.tests: line 139: umask: `:': invalid symbolic mode operator
+./errors.tests: line 142: umask: -i: invalid option
+umask: usage: umask [-p] [-S] [mode]
+./errors.tests: line 146: umask: `u': invalid symbolic mode character
+./errors.tests: line 155: VAR: readonly variable
+./errors.tests: line 158: declare: VAR: readonly variable
+./errors.tests: line 159: declare: VAR: readonly variable
+./errors.tests: line 161: declare: unset: not found
+./errors.tests: line 164: VAR: readonly variable
+./errors.tests: command substitution: line 168: syntax error near unexpected token `)'
+./errors.tests: command substitution: line 168: ` for z in 1 2 3; do )'
+./errors.tests: command substitution: line 169: syntax error near unexpected token `done'
+./errors.tests: command substitution: line 169: ` for z in 1 2 3; done )'
+./errors.tests: line 171: cd: HOME not set
+./errors.tests: line 172: cd: /tmp/xyz.bash: No such file or directory
+./errors.tests: line 174: cd: OLDPWD not set
+./errors.tests: line 175: cd: /bin/sh: Not a directory
+./errors.tests: line 177: cd: /tmp/cd-notthere: No such file or directory
+./errors.tests: line 180: .: filename argument required
+.: usage: . filename [arguments]
+./errors.tests: line 181: source: filename argument required
+source: usage: source filename [arguments]
+./errors.tests: line 184: .: -i: invalid option
+.: usage: . filename [arguments]
+./errors.tests: line 187: set: -q: invalid option
+set: usage: set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]
+./errors.tests: line 190: enable: sh: not a shell builtin
+./errors.tests: line 190: enable: bash: not a shell builtin
+./errors.tests: line 193: shopt: cannot set and unset shell options simultaneously
+./errors.tests: line 196: read: var: invalid timeout specification
+./errors.tests: line 199: read: `/bin/sh': not a valid identifier
+./errors.tests: line 202: VAR: readonly variable
+./errors.tests: line 205: readonly: -x: invalid option
+readonly: usage: readonly [-af] [name[=value] ...] or readonly -p
+./errors.tests: line 208: eval: -i: invalid option
+eval: usage: eval [arg ...]
+./errors.tests: line 209: command: -i: invalid option
+command: usage: command [-pVv] command [arg ...]
+./errors.tests: line 212: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
+./errors.tests: line 213: /bin/sh + 0: syntax error: operand expected (error token is "/bin/sh + 0")
+./errors.tests: line 216: trap: NOSIG: invalid signal specification
+./errors.tests: line 219: trap: -s: invalid option
+trap: usage: trap [-lp] [[arg] signal_spec ...]
+./errors.tests: line 225: return: can only `return' from a function or sourced script
+./errors.tests: line 229: break: 0: loop count out of range
+./errors.tests: line 233: continue: 0: loop count out of range
+./errors.tests: line 238: builtin: bash: not a shell builtin
+./errors.tests: line 242: bg: no job control
+./errors.tests: line 243: fg: no job control
+./errors.tests: line 246: kill: -s: option requires an argument
+./errors.tests: line 248: kill: S: invalid signal specification
+./errors.tests: line 250: kill: `': not a pid or valid job spec
+kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
+./errors.tests: line 255: set: trackall: invalid option name
+./errors.tests: line 262: `!!': not a valid identifier
diff --git a/tests/errors.tests b/tests/errors.tests
new file mode 100644
index 0000000..4ead467
--- /dev/null
+++ b/tests/errors.tests
@@ -0,0 +1,265 @@
+# These should all be safe
+LC_ALL=C
+LC_CTYPE=C
+LC_COLLATE=C
+LC_MESSAGES=C
+
+# these tests should all generate errors
+
+# make sure we don't exit prematurely
+set +e
+set +o posix
+
+# various alias/unalias errors
+
+# at some point, this may mean to `export' an alias, like ksh, but
+# for now it is an error
+alias -x foo=barz
+unalias -x fooaha
+alias hoowah
+unalias hoowah
+
+# the iteration variable must be a valid identifier
+for 1 in a b c; do echo $1; done
+
+# try to rebind a read-only function
+func()
+{
+ echo func
+}
+readonly -f func
+# make sure `readonly' and `declare' play well together
+declare -Fr
+func()
+{
+ echo bar
+}
+
+# bad option
+unset -x func
+
+# cannot unset readonly functions or variables
+unset -f func
+# or make them not readonly
+declare -fr func
+declare -f +r func
+
+XPATH=$PATH
+declare -r XPATH
+unset -v XPATH
+
+# cannot unset invalid identifiers
+unset /bin/sh
+
+# cannot unset function and variable at the same time
+unset -f -v SHELL
+
+# bad option
+declare -z
+# cannot declare invalid identifiers
+declare -- -z
+declare /bin/sh
+
+# this is the syntax used to export functions in the environment, but
+# it cannot be used with `declare'
+declare -f func='() { echo "this is func"; }'
+
+# bad option to exec -- this should not exit the script
+exec -i /bin/sh
+
+# try to export -f something that is not a function -- this should be
+# an error, not create an `invisible function'
+export -f XPATH
+
+# this depends on the setting of BREAK_COMPLAINS in config.h.in
+break
+continue
+
+# this should not exit the shell; it did in versions before 2.01
+shift label
+
+# other shells do not complain about the extra arguments; maybe someday
+# we won't either
+set -- a b c
+shift $# label
+# and get rid of the positional parameters
+shift $#
+
+# let without an expression is an error, though maybe it should just return
+# success
+let
+
+# local outside a function is an error
+local
+
+# logout of a non-login shell is an error
+logout
+
+# try to hash a non-existant command
+hash notthere
+
+# bad option to hash, although it may mean `verbose' at some future point
+hash -v
+
+# turn off hashing, then try to hash something
+set +o hashall
+hash -p ${THIS_SH} ${THIS_SH##*/}
+
+# bad identifiers to declare/readonly/export
+export AA[4]
+readonly AA[4]
+
+declare -a AA
+unset AA[-2]
+
+# try to assign to a readonly array
+declare -r AA
+AA=( one two three )
+
+# make sure `readonly -n' doesn't turn off readonly status
+readonly -n AA
+AA=(one two three)
+
+# try to assign a readonly array with bad assignment syntax
+# NOTE: this works in post-bash-2.05 (at least when I write this)
+# readonly -a ZZZ=bbb
+
+# bad counts to `shift'
+shopt -s shift_verbose
+shift $(( $# + 5 ))
+shift -2
+
+# bad shell options
+shopt -s no_such_option
+shopt no_such_option
+
+# non-octal digits for umask and other errors
+umask 09
+umask -S u=rwx:g=rwx:o=rx >/dev/null # 002
+umask -S u:rwx,g:rwx,o:rx >/dev/null # 002
+
+# at some point, this may mean `invert', but for now it is an error
+umask -i
+
+# bad assignments shouldn't change the umask
+mask=$(umask)
+umask g=u
+mask2=$(umask)
+if [ "$mask" != "$mask2" ]; then
+ echo "umask errors change process umask"
+fi
+
+# assignment to a readonly variable in environment
+VAR=4
+readonly VAR
+VAR=7 :
+
+# more readonly variable tests
+declare VAR=88
+declare +r VAR
+
+declare -p unset
+
+# iteration variable in a for statement being readonly
+for VAR in 1 2 3 ; do echo $VAR; done
+
+# parser errors
+: $( for z in 1 2 3; do )
+: $( for z in 1 2 3; done )
+
+# various `cd' errors
+( unset HOME ; cd )
+( HOME=/tmp/xyz.bash ; cd )
+# errors from cd
+cd -
+cd /bin/sh # error - not a directory
+OLDPWD=/tmp/cd-notthere
+cd -
+
+# various `source/.' errors
+.
+source
+
+# maybe someday this will work like in rc
+. -i /dev/tty
+
+# make sure that this gives an error rather than setting $1
+set -q
+
+# enable non-builtins
+enable sh bash
+
+# try to set and unset shell options simultaneously
+shopt -s -u checkhash
+
+# this is an error -- bad timeout spec
+read -t var < /dev/null
+
+# try to read into an invalid identifier
+read /bin/sh < /dev/null
+
+# try to read into a readonly variable
+read VAR < /dev/null
+
+# bad option to readonly/export
+readonly -x foo
+
+# someday these may mean something, but for now they're errors
+eval -i "echo $-"
+command -i "echo $-"
+
+# this caused a core dump in bash-2.01 (fixed in bash-2.01.1)
+eval echo \$[/bin/sh + 0]
+eval echo '$((/bin/sh + 0))'
+
+# error to list trap for an unknown signal
+trap -p NOSIG
+
+# maybe someday trap will take a -s argument like kill, but not now
+trap -p -s NOSIG
+
+# we have a ksh-like ERR trap, post-bash-2.05
+#trap 'echo [$LINENO] -- error' ERR
+
+# can only return from a function or sourced script
+return 2
+
+# break and continue with arguments <= 0
+for z in 1 2 3; do
+ break 0
+ echo $x
+done
+for z in 1 2 3; do
+ continue 0
+ echo $x
+done
+
+# builtin with non-builtin
+builtin bash
+
+# maybe someday you will be able to use fg/bg when job control is not really
+# active, but for now they are errors
+bg
+fg
+
+# argument required
+kill -s
+# bad argument
+kill -S
+# null argument
+kill -INT ''
+# argument required
+kill -INT
+
+# bad shell option names
+set -o trackall # bash is not ksh
+
+# this must be last!
+# in posix mode, a function name must be a valid identifier
+# this can't go in posix2.tests, since it causes the shell to exit
+# immediately
+set -o posix
+function !! () { fc -s "$@" ; }
+set +o posix
+
+echo end
diff --git a/tests/exec.right b/tests/exec.right
new file mode 100644
index 0000000..86a099c
--- /dev/null
+++ b/tests/exec.right
@@ -0,0 +1,55 @@
+before exec1.sub: one two three
+calling exec1.sub
+aa bb cc dd ee
+after exec1.sub with args: 0
+
+after exec1.sub without args: 0
+./execscript: line 20: notthere: command not found
+127
+/tmp/bash: notthere: No such file or directory
+127
+/bin/sh: /bin/sh: cannot execute binary file
+126
+./execscript: line 39: /: is a directory
+126
+/: /: is a directory
+126
+./execscript: line 46: .: /: is a directory
+1
+126
+0
+this is bashenv
+./exec3.sub: line 3: /tmp/bash-notthere: No such file or directory
+./exec3.sub: line 3: exec: /tmp/bash-notthere: cannot execute: No such file or directory
+126
+./execscript: line 70: notthere: No such file or directory
+127
+./execscript: line 73: notthere: No such file or directory
+127
+./execscript: line 76: notthere: command not found
+127
+this is sh
+this is sh
+unset
+ok
+5
+./exec5.sub: line 4: exec: bash-notthere: not found
+127
+this is ohio-state
+0
+1
+1
+0
+42
+42
+0
+1
+1
+0
+0
+1
+0
+1
+testb
+expand_aliases on
+after
diff --git a/tests/exec1.sub b/tests/exec1.sub
new file mode 100755
index 0000000..4a12501
--- /dev/null
+++ b/tests/exec1.sub
@@ -0,0 +1 @@
+echo "$@"
diff --git a/tests/exec2.sub b/tests/exec2.sub
new file mode 100644
index 0000000..c1caaea
--- /dev/null
+++ b/tests/exec2.sub
@@ -0,0 +1,5 @@
+# make sure an exit command in an exit trap sets the shell's exit status
+trap - 0
+trap 'exit 5' 0
+
+exit 0
diff --git a/tests/exec3.sub b/tests/exec3.sub
new file mode 100644
index 0000000..4f2f8e2
--- /dev/null
+++ b/tests/exec3.sub
@@ -0,0 +1,6 @@
+shopt -s execfail
+
+exec /tmp/bash-notthere
+# make sure we're still around
+echo $?
+
diff --git a/tests/exec4.sub b/tests/exec4.sub
new file mode 100644
index 0000000..a60d8b3
--- /dev/null
+++ b/tests/exec4.sub
@@ -0,0 +1,8 @@
+# let's test out the noexec code
+set -n
+
+fail
+whoops
+wow
+
+set +n
diff --git a/tests/exec5.sub b/tests/exec5.sub
new file mode 100644
index 0000000..1462f9e
--- /dev/null
+++ b/tests/exec5.sub
@@ -0,0 +1,9 @@
+# try exec'ing a command that cannot be found in $PATH
+shopt -s execfail
+
+exec bash-notthere
+# make sure we're still around
+echo $?
+
+# now we need to go away, but this should echo 'this is ohio-state'
+exec -a ohio-state ${THIS_SH} -c 'echo this is $0'
diff --git a/tests/exec6.sub b/tests/exec6.sub
new file mode 100644
index 0000000..50d0e70
--- /dev/null
+++ b/tests/exec6.sub
@@ -0,0 +1,54 @@
+# builtins with exit status inverted
+
+( true )
+echo $?
+( ! true )
+echo $?
+
+( false )
+echo $?
+( ! false )
+echo $?
+
+# inverting shouldn't affect exit
+(exit 42)
+echo $?
+
+( ! exit 42 )
+echo $?
+
+# commands requiring an exec with exit status inverted -- broken in bash-2.04
+
+( ls > /dev/null 2>&1 )
+echo $?
+( ! ls > /dev/null 2>&1 )
+echo $?
+
+touch /tmp/notwrite
+chmod 400 /tmp/notwrite
+
+# make sure redirection failures in commands whose exit status is inverted
+# are handled correctly
+
+( ls > /tmp/notwrite ) 2>/dev/null
+echo $?
+
+( ! ls > /tmp/notwrite ) 2>/dev/null
+echo $?
+
+# now add exit traps, true and false for commands with and without exit
+# status inversion
+
+(trap 'false' 0 ; ! ls > /tmp/notwrite ) 2>/dev/null
+echo $?
+
+(trap 'false' 0 ; ls > /tmp/notwrite ) 2>/dev/null
+echo $?
+
+(trap 'true' 0 ; ! ls > /tmp/notwrite ) 2>/dev/null
+echo $?
+
+(trap 'true' 0 ; ls > /tmp/notwrite ) 2>/dev/null
+echo $?
+
+rm -f /tmp/notwrite
diff --git a/tests/exec7.sub b/tests/exec7.sub
new file mode 100644
index 0000000..ea2fd06
--- /dev/null
+++ b/tests/exec7.sub
@@ -0,0 +1,20 @@
+# make sure that bash really checks the right things when deciding what
+# constitutes an executable file
+
+[ $UID -eq 0 ] && { echo "exec7.sub: the test suite should not be run as root" >&2 ; }
+
+: ${TMPDIR:=/tmp}
+
+cd $TMPDIR || { echo "cannot cd to $TMPDIR" >&2 ; exit 2; }
+
+mkdir testa testb
+
+echo 'echo "testa"' > testa/foo
+echo 'echo "testb"' > testb/foo
+
+chmod 655 testa/foo
+chmod 755 testb/foo
+
+PATH=$TMPDIR/testa:$TMPDIR/testb $THIS_SH -c foo
+
+rm -rf testa testb
diff --git a/tests/exec8.sub b/tests/exec8.sub
new file mode 100644
index 0000000..014726d
--- /dev/null
+++ b/tests/exec8.sub
@@ -0,0 +1 @@
+shopt expand_aliases
diff --git a/tests/execscript b/tests/execscript
new file mode 100644
index 0000000..3629c57
--- /dev/null
+++ b/tests/execscript
@@ -0,0 +1,114 @@
+export LC_ALL=C
+export LANG=C
+
+if [ $UID -eq 0 ]; then
+ echo "execscript: the test suite should not be run as root" >&2
+fi
+
+set -- one two three
+echo before exec1.sub: "$@"
+echo calling exec1.sub
+./exec1.sub aa bb cc dd ee
+echo after exec1.sub with args: $?
+./exec1.sub
+echo after exec1.sub without args: $?
+
+# set up a fixed path so we know notthere will not be found
+PATH=/usr/bin:/bin:/usr/local/bin:
+export PATH
+
+notthere
+echo $?
+
+# this is iffy, since the error messages may vary from system to system
+# and /tmp might not exist
+ln -s ${THIS_SH} /tmp/bash 2>/dev/null
+if [ -f /tmp/bash ]; then
+ /tmp/bash notthere
+else
+ ${THIS_SH} notthere
+fi
+echo $?
+rm -f /tmp/bash
+
+# /bin/sh should be there on all systems
+${THIS_SH} /bin/sh
+echo $?
+
+# try executing a directory
+/
+echo $?
+
+${THIS_SH} /
+echo $?
+
+# try sourcing a directory
+. /
+echo $?
+
+# try sourcing a binary file -- post-2.04 versions don't do the binary file
+# check, and will probably fail with `command not found', or status 127
+# bash-4.1 and later check for 256 NUL characters and fail as binary files
+# if there are more than that, it's probably binary
+. ${THIS_SH} 2>/dev/null
+echo $?
+
+# post-bash-2.05 versions allow sourcing non-regular files
+. /dev/null
+echo $?
+
+# kill two birds with one test -- test out the BASH_ENV code
+echo echo this is bashenv > /tmp/bashenv
+export BASH_ENV=/tmp/bashenv
+${THIS_SH} ./exec3.sub
+rm -f /tmp/bashenv
+unset BASH_ENV
+
+# we're resetting the $PATH to empty, so this should be last
+PATH=
+
+notthere
+echo $?
+
+command notthere
+echo $?
+
+command -p notthere
+echo $?
+
+# but -p should guarantee that we find all the standard utilities, even
+# with an empty or unset $PATH
+command -p sh -c 'echo this is $0'
+unset PATH
+command -p sh -c 'echo this is $0'
+
+# a bug in bash before bash-2.01 caused PATH to be set to the empty string
+# when command -p was run with PATH unset
+echo ${PATH-unset}
+
+echo "echo ok" | ${THIS_SH} -t
+
+${THIS_SH} ./exec2.sub
+echo $?
+
+${THIS_SH} ./exec4.sub
+
+# try exec'ing a command that cannot be found in $PATH
+${THIS_SH} ./exec5.sub
+
+# this was a bug in bash versions before bash-2.04
+${THIS_SH} -c 'cat </dev/null | cat >/dev/null' >&-
+
+# checks for proper return values in subshell commands with inverted return
+# values
+
+${THIS_SH} ./exec6.sub
+
+# checks for properly deciding what constitutes an executable file
+${THIS_SH} ./exec7.sub
+
+${THIS_SH} -i ./exec8.sub
+
+true | `echo true` &
+
+echo after
diff --git a/tests/exp.right b/tests/exp.right
new file mode 100644
index 0000000..d46a2a1
--- /dev/null
+++ b/tests/exp.right
@@ -0,0 +1,168 @@
+argv[1] = <^A>
+argv[1] = <^A>
+argv[1] = <^B>
+argv[1] = <^B>
+argv[1] = <^A>
+argv[1] = <^B>
+argv[1] = <abcdefgh>
+argv[1] = <abcdefgh>
+argv[1] = <abcdefgh>
+argv[1] = <abcdefgh>
+argv[1] = <abcd>
+argv[1] = <abcd>
+argv[1] = < >
+argv[1] = <-->
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <abc>
+argv[1] = <abc>
+argv[1] = <abc>
+argv[1] = <abc>
+argv[1] = <abcdef>
+argv[1] = <abcdef>
+argv[1] = <^A>
+argv[1] = <^B>
+argv[1] = <^A>
+argv[1] = <^B>
+argv[1] = <^A>
+argv[1] = <^B>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <Hello world!>
+argv[1] = <`>
+argv[1] = <">
+argv[1] = <\^A>
+argv[1] = <\$>
+argv[1] = <\\>
+argv[1] = <a>
+argv[2] = <b>
+argv[1] = <^A>
+argv[2] = <^B>
+argv[1] = <**>
+argv[1] = <\.\./*/>
+argv[1] = <^A^B^A^B>
+argv[1] = <^A^A>
+argv[1] = <^A^B>
+argv[1] = <^A^A^B>
+argv[1] = < abc>
+argv[2] = <def>
+argv[3] = <ghi>
+argv[4] = <jkl >
+argv[1] = < abc>
+argv[2] = <def>
+argv[3] = <ghi>
+argv[4] = <jkl >
+argv[1] = <--abc>
+argv[2] = <def>
+argv[3] = <ghi>
+argv[4] = <jkl-->
+argv[1] = <a b>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[4] = <gh>
+argv[1] = <a b>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[4] = <gh>
+argv[1] = <a b>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[4] = <gh>
+argv[1] = < >
+argv[1] = < - >
+argv[1] = </^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/>
+argv[1] = <foo bar>
+argv[1] = <foo>
+argv[2] = <bar>
+argv[1] = <abc>
+argv[1] = <abc>
+argv[1] = <posix>
+argv[1] = <10>
+argv[1] = <file.o>
+argv[1] = <posix>
+argv[1] = </src/cmd>
+argv[1] = <three>
+argv[1] = <abcdef>
+argv[1] = <abcdef>
+argv[1] = <abcdef>
+argv[1] = <abcdef>
+argv[1] = <\$x>
+argv[1] = <$x>
+argv[1] = <\$x>
+argv[1] = <abc>
+argv[2] = <def>
+argv[3] = <ghi>
+argv[4] = <jkl>
+argv[1] = <abc def ghi jkl>
+argv[1] = <abc:def ghi:jkl>
+argv[1] = <abc>
+argv[2] = <def ghi>
+argv[3] = <jkl>
+argv[1] = <xxabc>
+argv[2] = <def ghi>
+argv[3] = <jklyy>
+argv[1] = <abc>
+argv[2] = <def ghi>
+argv[3] = <jklabc>
+argv[4] = <def ghi>
+argv[5] = <jkl>
+argv[1] = <abcdef>
+argv[1] = <bar>
+argv[2] = <>
+argv[3] = <xyz>
+argv[4] = <>
+argv[5] = <abc>
+argv[1] = <$foo>
+argv[1] = <10>
+argv[1] = <newline expected>
+argv[1] = <got it>
+argv[1] = <got it>
+argv[1] = <one>
+argv[2] = <three>
+argv[3] = <five>
+argv[1] = <5>
+argv[2] = <5>
+argv[1] = <3>
+argv[1] = <1>
+argv[1] = <1>
+argv[1] = <5>
+argv[1] = <5>
+argv[1] = <5>
+argv[1] = <5>
+argv[1] = <42>
+argv[1] = <26>
+argv[1] = <\>
+argv[1] = <~>
+argv[1] = <a>
+argv[2] = <b>
+argv[3] = <c>
+argv[4] = <d>
+argv[5] = <e>
+a?b?c
+a b c
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = <^A>
+argv[2] = <^?>
+argv[1] = <^A^?>
+argv[1] = <^A^?^A^?>
+argv[1] = <^A^A^?>
+0.net
+0.net0
+
+0.net
+0.net
+0.net
+graph
+yes
+a
+a
diff --git a/tests/exp.tests b/tests/exp.tests
new file mode 100644
index 0000000..1f4a35b
--- /dev/null
+++ b/tests/exp.tests
@@ -0,0 +1,386 @@
+#
+# A suite of tests for bash word expansions
+#
+# This tests parameter and variable expansion, with an empahsis on
+# proper quoting behavior.
+#
+# Chet Ramey
+
+#
+# If you comment out the body of this function, you can do a diff against
+# `expansion-tests.right' to see if the shell is behaving correctly
+#
+expect()
+{
+ echo expect "$@"
+}
+
+# Test the substitution quoting characters (CTLESC and CTLNUL) in different
+# combinations
+
+expect "<^A>"
+recho `echo ''`
+expect "<^A>"
+recho `echo ""`
+expect "<^B>"
+recho `echo ''`
+expect "<^B>"
+recho `echo ""`
+expect "<^A>"
+recho `echo `
+expect "<^B>"
+recho `echo `
+
+# Test null strings without variable expansion
+expect "<abcdefgh>"
+recho abcd""efgh
+expect "<abcdefgh>"
+recho abcd''efgh
+expect "<abcdefgh>"
+recho ""abcdefgh
+expect "<abcdefgh>"
+recho ''abcdefgh
+expect "<abcd>"
+recho abcd""
+expect "<abcd>"
+recho abcd''
+
+# Test the quirky behavior of $@ in ""
+expect nothing
+recho "$@"
+expect "< >"
+recho " $@"
+expect "<-->"
+recho "-${@}-"
+
+# Test null strings with variable expansion that fails
+expect '<>'
+recho $xxx""
+expect '<>'
+recho ""$xxx
+expect '<>'
+recho $xxx''
+expect '<>'
+recho ''$xxx
+expect '<>'
+recho $xxx""$yyy
+expect '<>'
+recho $xxx''$yyy
+
+# Test null strings with variable expansion that succeeds
+xxx=abc
+yyy=def
+
+expect '<abc>'
+recho $xxx""
+expect '<abc>'
+recho ""$xxx
+expect '<abc>'
+recho $xxx''
+expect '<abc>'
+recho ''$xxx
+expect '<abcdef>'
+recho $xxx""$yyy
+expect '<abcdef>'
+recho $xxx''$yyy
+
+unset xxx yyy
+
+# Test the unquoted special quoting characters
+expect "<^A>"
+recho 
+expect "<^B>"
+recho 
+expect "<^A>"
+recho ""
+expect "<^B>"
+recho ""
+expect "<^A>"
+recho ''
+expect "<^B>"
+recho ''
+
+# Test expansion of a variable that is unset
+expect nothing
+recho $xxx
+expect '<>'
+recho "$xxx"
+
+expect nothing
+recho "$xxx${@}"
+
+# Test empty string expansion
+expect '<>'
+recho ""
+expect '<>'
+recho ''
+
+# Test command substitution with (disabled) history substitution
+expect '<Hello World!>'
+# set +H
+recho "`echo \"Hello world!\"`"
+
+# Test some shell special characters
+expect '<`>'
+recho "\`"
+expect '<">'
+recho "\""
+expect '<\^A>'
+recho "\"
+
+expect '<\$>'
+recho "\\$"
+
+expect '<\\>'
+recho "\\\\"
+
+# This should give argv[1] = a argv[2] = b
+expect '<a> <b>'
+FOO=`echo 'a b' | tr ' ' '\012'`
+recho $FOO
+
+# This should give argv[1] = ^A argv[2] = ^B
+expect '<^A> <^B>'
+FOO=`echo ' ' | tr ' ' '\012'`
+recho $FOO
+
+# Test quoted and unquoted globbing characters
+expect '<**>'
+recho "*"*
+
+expect '<\.\./*/>'
+recho "\.\./*/"
+
+# Test patterns that come up when the shell quotes funny character
+# combinations
+expect '<^A^B^A^B>'
+recho ''
+expect '<^A^A>'
+recho ''
+expect '<^A^B>'
+recho ''
+expect '<^A^A^B>'
+recho ''
+
+# More tests of "$@"
+set abc def ghi jkl
+expect '< abc> <def> <ghi> <jkl >'
+recho " $@ "
+expect '< abc> <def> <ghi> <jkl >'
+recho "${1+ $@ }"
+
+set abc def ghi jkl
+expect '<--abc> <def> <ghi> <jkl-->'
+recho "--$@--"
+
+set "a b" cd ef gh
+expect '<a b> <cd> <ef> <gh>'
+recho ${1+"$@"}
+expect '<a b> <cd> <ef> <gh>'
+recho ${foo:-"$@"}
+expect '<a b> <cd> <ef> <gh>'
+recho "${@}"
+
+expect '< >'
+recho " "
+expect '< - >'
+recho " - "
+
+# Test combinations of different types of quoting in a fully-quoted string
+# (so the WHOLLY_QUOTED tests fail and it doesn't get set)
+expect '</^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/>'
+recho "/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/"
+
+# Test the various Posix parameter expansions
+
+expect '<foo bar>'
+recho "${x:-$(echo "foo bar")}"
+expect '<foo> <bar>'
+recho ${x:-$(echo "foo bar")}
+
+unset X
+expect '<abc>'
+recho ${X:=abc}
+expect '<abc>'
+recho $X
+
+set a b c
+expect '<posix>'
+recho ${3:+posix}
+
+POSIX=/usr/posix
+expect '<10>'
+recho ${#POSIX}
+
+# remove shortest trailing match
+x=file.c
+expect '<file.o>'
+recho ${x%.c}.o
+
+# remove longest trailing match
+x=posix/src/std
+expect '<posix>'
+recho ${x%%/*}
+
+# remove shortest leading pattern
+x=$HOME/src/cmd
+expect '</src/cmd>'
+recho ${x#$HOME}
+
+# remove longest leading pattern
+x=/one/two/three
+expect '<three>'
+recho ${x##*/}
+
+# pattern removal of patterns that don't match
+z=abcdef
+
+expect '<abcdef>'
+recho ${z#xyz}
+expect '<abcdef>'
+recho ${z##xyz}
+
+expect '<abcdef>'
+recho ${z%xyz}
+expect '<abcdef>'
+recho ${z%%xyz}
+
+# Command substitution and the quirky differences between `` and $()
+
+expect '<\$x>'
+recho '\$x'
+
+expect '<$x>'
+recho `echo '\$x'`
+
+expect '<\$x>'
+recho $(echo '\$x')
+
+# The difference between $* "$*" and "$@"
+
+set "abc" "def ghi" "jkl"
+
+expect '<abc> <def> <ghi> <jkl>'
+recho $*
+
+expect '<abc def ghi jkl>'
+recho "$*"
+
+OIFS="$IFS"
+IFS=":$IFS"
+
+# The special behavior of "$*", using the first character of $IFS as separator
+expect '<abc:def ghi:jkl>'
+recho "$*"
+
+IFS="$OIFS"
+
+expect '<abc> <def ghi> <jkl>'
+recho "$@"
+
+expect '<xxabc> <def ghi> <jklyy>'
+recho "xx$@yy"
+
+expect '<abc> <def ghi> <jklabc> <def ghi> <jkl>'
+recho "$@$@"
+
+foo=abc
+bar=def
+
+expect '<abcdef>'
+recho "$foo""$bar"
+
+unset foo
+set $foo bar '' xyz "$foo" abc
+
+expect '<bar> <> <xyz> <> <abc>'
+recho "$@"
+
+# More tests of quoting and deferred evaluation
+
+foo=10 x=foo
+y='$'$x
+expect '<$foo>'
+recho $y
+eval y='$'$x
+expect '<10>'
+recho $y
+
+# case statements
+
+NL='
+'
+x='ab
+cd'
+
+expect '<newline expected>'
+case "$x" in
+*$NL*) recho "newline expected" ;;
+esac
+
+expect '<got it>'
+case \? in
+*"?"*) recho "got it" ;;
+esac
+
+expect '<got it>'
+case \? in
+*\?*) recho "got it" ;;
+esac
+
+set one two three four five
+expect '<one> <three> <five>'
+recho $1 $3 ${5} $8 ${9}
+
+# length tests on positional parameters and some special parameters
+
+expect '<5> <5>'
+recho $# ${#}
+expect '<3>'
+recho ${#1}
+expect '<1>'
+recho ${##}
+expect '<1>'
+recho ${#?}
+expect '<5>'
+recho ${#@}
+expect '<5>'
+recho ${#*}
+expect '<5>'
+recho "${#@}"
+expect '<5>'
+recho "${#*}"
+
+expect '<42>'
+recho $((28 + 14))
+expect '<26>'
+recho $[ 13 * 2 ]
+
+expect '<\>'
+recho `echo \\\\`
+
+expect '<~>'
+recho '~'
+
+expect nothing
+recho $!
+expect nothing
+recho ${!}
+
+# test word splitting of assignment statements not preceding a command
+a="a b c d e"
+declare b=$a
+expect '<a> <b> <c> <d> <e>'
+recho $b
+
+a="a?b?c"
+
+echo ${a//\\?/ }
+
+echo ${a//\?/ }
+
+${THIS_SH} ./exp1.sub
+
+${THIS_SH} ./exp2.sub
+
+${THIS_SH} ./exp3.sub
diff --git a/tests/exp1.sub b/tests/exp1.sub
new file mode 100644
index 0000000..3e40f2a
--- /dev/null
+++ b/tests/exp1.sub
@@ -0,0 +1,21 @@
+# Test the substitution quoting characters (CTLESC and CTLNUL) in different
+# combinations
+
+recho `echo ''`
+recho `echo ""`
+recho `echo `
+
+# Test the unquoted special quoting characters
+recho 
+recho ""
+recho ''
+
+# This should give argv[1] = ^A argv[2] = ^?
+FOO=`echo ' ' | tr ' ' '\012'`
+recho $FOO
+
+# Test patterns that come up when the shell quotes funny character
+# combinations
+recho ''
+recho ''
+recho ''
diff --git a/tests/exp2.sub b/tests/exp2.sub
new file mode 100644
index 0000000..a70179e
--- /dev/null
+++ b/tests/exp2.sub
@@ -0,0 +1,12 @@
+K=dvb0.net A=${K#dvb} eval echo \$A
+unset K A
+x=${K:=dvb0.net0} A=${K#dvb} eval echo \$A
+
+unset K A
+K=dvb0.net A=${K#dvb} echo "$A"
+unset K A
+K=dvb0.net A=${K#dvb} ; echo "$A"
+unset K A
+K=dvb0.net A=${K#dvb} eval echo '$A'
+unset K A
+K=dvb0.net A=${K#dvb} eval echo \$A
diff --git a/tests/exp3.sub b/tests/exp3.sub
new file mode 100644
index 0000000..212d579
--- /dev/null
+++ b/tests/exp3.sub
@@ -0,0 +1,7 @@
+IFS=:
+
+case A in ([[:graph:]]) echo graph;; *) echo non-graph;; esac
+[[ A == [[:graph:]] ]] && echo yes || echo no
+
+IFS="~"; read a b <<< a~q; echo $a
+IFS=':'; read a b <<< a:q; echo $a
diff --git a/tests/extglob.right b/tests/extglob.right
new file mode 100644
index 0000000..7b9cc94
--- /dev/null
+++ b/tests/extglob.right
@@ -0,0 +1,90 @@
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+ok 6
+ok 7
+ok 8
+ok 9
+ok 10
+ok 11
+ok 12
+ok 13
+ok 14
+ok 15
+ok 16
+ok 17
+ok 18
+ok 19
+ok 20
+ok 21
+ok 22
+ok 23
+ok 24
+ok 25
+ok 26
+ok 27
+ok 28
+ok 29
+ok 30
+ok 31
+ok 32
+ok 33
+ok 34
+ok 35
+ok 36
+!([*)*
++(a|b[)*
+[a*(]*)z
++()c
++()x
+abc
++(*)x
+abc
+no-file+(a|b)stuff
+no-file+(a*(c)|b)stuff
+abd acd
+acd
+abd
+no
+yes
+yes
+1: bcdef
+2: def
+3: abcde
+4: abc
+5: ef
+6: ef
+7: abcdef
+ab abef
+abcfef abef
+abcdef
+ab abcdef abcfef abef
+abcdef abcfef abef
+ok 37
+ok 38
+ok 39
+ok 40
+ok 41
+ok 42
+a b a,b a-b a.b a:b a;b a_b
+a b a,b a-b a.b a:b a;b a_b
+a b a,b a-b a.b a:b a;b a_b
+a b a,b a-b a.b a:b a;b a_b
+a.b
+a b a,b a-b a:b a;b a_b
+a b a,b a-b a.b a:b a;b a_b
+a b a,b a-b a.b a:b a;b a_b
+a b a,b a-b a.b a:b a;b a_b
+argv[1] = <ef>
+a,b
+a.c
+a.c
+a.c
+a.c
+a.c
+a.c
+ok 1
+ok 2
+ok 3
diff --git a/tests/extglob.tests b/tests/extglob.tests
new file mode 100644
index 0000000..f9c17c7
--- /dev/null
+++ b/tests/extglob.tests
@@ -0,0 +1,371 @@
+# test the ksh-like extended globbing features: [!@*?+](patlist)
+
+shopt -s extglob
+
+expect()
+{
+ echo expect "$@"
+}
+
+case "/dev/udp/129.22.8.102/45" in
+/dev/@(tcp|udp)/*/*) echo ok 1;;
+*) echo bad 1;;
+esac
+
+# valid numbers
+case 12 in
+0|[1-9]*([0-9])) echo ok 2;;
+*) echo bad 2;;
+esac
+
+case 12abc in
+0|[1-9]*([0-9])) echo bad 3;;
+*) echo ok 3;;
+esac
+
+case 1 in
+0|[1-9]*([0-9])) echo ok 4;;
+*) echo bad 4;;
+esac
+
+# octal numbers
+case 07 in
++([0-7])) echo ok 5;;
+*) echo bad 5;;
+esac
+
+case 0377 in
++([0-7])) echo ok 6;;
+*) echo bad 6;;
+esac
+
+case 09 in
++([0-7])) echo bad 7;;
+*) echo ok 7;;
+esac
+
+# stuff from korn's book
+case paragraph in
+para@(chute|graph)) echo ok 8;;
+*) echo bad 8;;
+esac
+
+case paramour in
+para@(chute|graph)) echo bad 9;;
+*) echo ok 9;;
+esac
+
+case para991 in
+para?([345]|99)1) echo ok 10;;
+*) echo bad 10;;
+esac
+
+case para381 in
+para?([345]|99)1) echo bad 11;;
+*) echo ok 11;;
+esac
+
+case paragraph in
+para*([0-9])) echo bad 12;;
+*) echo ok 12;;
+esac
+
+case para in
+para*([0-9])) echo ok 13;;
+*) echo bad 13;;
+esac
+
+case para13829383746592 in
+para*([0-9])) echo ok 14;;
+*) echo bad 14;;
+esac
+
+case paragraph in
+para*([0-9])) echo bad 15;;
+*) echo ok 15;;
+esac
+
+case para in
+para+([0-9])) echo bad 16;;
+*) echo ok 16;;
+esac
+
+case para987346523 in
+para+([0-9])) echo ok 17;;
+*) echo bad 17;;
+esac
+
+case paragraph in
+para!(*.[0-9])) echo ok 18;;
+*) echo bad 18;;
+esac
+
+case para.38 in
+para!(*.[0-9])) echo ok 19;;
+*) echo bad 19;;
+esac
+
+case para.graph in
+para!(*.[0-9])) echo ok 20;;
+*) echo bad 20;;
+esac
+
+case para39 in
+para!(*.[0-9])) echo ok 21;;
+*) echo bad 21;;
+esac
+
+# tests derived from those in rosenblatt's korn shell book
+
+case "" in
+*(0|1|3|5|7|9)) echo ok 22;;
+*) echo bad 22;
+esac
+
+case 137577991 in
+*(0|1|3|5|7|9)) echo ok 23;;
+*) echo bad 23;
+esac
+
+case 2468 in
+*(0|1|3|5|7|9)) echo bad 24;;
+*) echo ok 24;
+esac
+
+case file.c in
+*.c?(c)) echo ok 25;;
+*) echo bad 25;;
+esac
+
+case file.C in
+*.c?(c)) echo bad 26;;
+*) echo ok 26;;
+esac
+
+case file.cc in
+*.c?(c)) echo ok 27;;
+*) echo bad 27;;
+esac
+
+case file.ccc in
+*.c?(c)) echo bad 28;;
+*) echo ok 28;;
+esac
+
+case parse.y in
+!(*.c|*.h|Makefile.in|config*|README)) echo ok 29;;
+*) echo bad 29;;
+esac
+
+case shell.c in
+!(*.c|*.h|Makefile.in|config*|README)) echo bad 30;;
+*) echo ok 30;;
+esac
+
+case Makefile in
+!(*.c|*.h|Makefile.in|config*|README)) echo ok 31;;
+*) echo bad 31;;
+esac
+
+case "VMS.FILE;1" in
+*\;[1-9]*([0-9])) echo ok 32;;
+*) echo bad 32;;
+esac
+
+case "VMS.FILE;0" in
+*\;[1-9]*([0-9])) echo bad 33;;
+*) echo ok 33;;
+esac
+case "VMS.FILE;" in
+*\;[1-9]*([0-9])) echo bad 34;;
+*) echo ok 34;;
+esac
+case "VMS.FILE;139" in
+*\;[1-9]*([0-9])) echo ok 35;;
+*) echo bad 35;;
+esac
+case "VMS.FILE;1N" in
+*\;[1-9]*([0-9])) echo bad 36;;
+*) echo ok 36;;
+esac
+
+# tests derived from the pd-ksh test suite
+
+MYDIR=$PWD # save where we are
+
+: ${TMPDIR:=/var/tmp}
+TESTDIR=$TMPDIR/eglob-test-$$
+mkdir $TESTDIR
+builtin cd $TESTDIR || { echo $0: cannot cd to $TESTDIR >&2 ; exit 1; }
+rm -rf *
+
+touch abcx abcz bbc
+expect '!([*)*'
+echo !([*)*
+
+expect '+(a|b[)*'
+echo +(a|b[)*
+
+expect '[a*(]*z'
+echo [a*(]*)z
+
+rm -f abcx abcz bbc
+
+touch abc
+
+expect '+()c'
+echo +()c
+expect '+()x'
+echo +()x
+expect abc
+echo +(*)c
+expect '+(*)x'
+echo +(*)x
+
+# extended globbing should not be performed on the output of substitutions
+x='@(*)'
+expect '@(*)'
+echo $x
+
+expect 'no-file+(a|b)stuff'
+echo no-file+(a|b)stuff
+expect 'no-file+(a*(c)|b)stuff'
+echo no-file+(a*(c)|b)stuff
+
+touch abd acd
+
+expect 'abd acd'
+echo a+(b|c)d
+
+expect 'acd'
+echo a!(@(b|B))d
+
+expect 'abd'
+echo a[b*(foo|bar)]d
+
+# simple kleene star tests
+expect no
+case foo in *(a|b[)) echo yes;; *) echo no;; esac
+
+expect yes
+case foo in *(a|b[)|f*) echo yes;; *) echo no;; esac
+
+# this doesn't work right yet; it is an incorrectly formed pattern
+expect yes
+case '*(a|b[)' in *(a|b[)) echo yes;; *) echo no;; esac
+
+# check extended globbing in pattern removal -- these don't work right yet
+x=abcdef
+
+expect '1: bcdef'
+echo 1: ${x#+(a|abc)}
+expect '2: def'
+echo 2: ${x##+(a|abc)}
+expect '3: abcde'
+echo 3: ${x%+(def|f)}
+expect '4: abc'
+echo 4: ${x%%+(f|def)}
+
+# these work ok
+
+expect '5: ef'
+echo 5: ${x#*(a|b)cd}
+expect '6: ef'
+echo 6: "${x#*(a|b)cd}"
+expect '7: abcdef'
+echo 7: ${x#"*(a|b)cd"}
+
+# More tests derived from a bug report concerning extended glob patterns
+# following a *
+builtin cd $TESTDIR || { echo $0: cannot cd to $TESTDIR >&2 ; exit 1; }
+rm -rf *
+
+touch ab abcdef abef abcfef
+
+expect 'ab abef'
+echo ab*(e|f)
+
+expect 'abcfef abef'
+echo ab?*(e|f)
+
+expect abcdef
+echo ab*d+(e|f)
+
+expect 'ab abcdef abcfef abef'
+echo ab**(e|f)
+
+expect 'abcdef abcfef abef'
+echo ab*+(e|f)
+
+case 'abcfefg' in
+ab**(e|f)) echo ok 37;;
+*) echo bad 37;;
+esac
+
+case 'abcfefg' in
+ab**(e|f)g) echo ok 38;;
+*a) echo bad 38;;
+esac
+
+case ab in
+ab*+(e|f)) echo bad 39;;
+*) echo ok 39;;
+esac
+
+case abef in
+ab***ef) echo ok 40;;
+*) echo bad 40;;
+esac
+
+case abef in
+ab**) echo ok 41;;
+*) echo bad 41;;
+esac
+
+# bug in all versions up to and including bash-2.05b
+case "123abc" in
+*?(a)bc) echo ok 42;;
+*) echo bad 42;;
+esac
+
+# clean up and do the next one
+
+builtin cd /
+rm -rf $TESTDIR
+
+mkdir $TESTDIR
+builtin cd $TESTDIR
+
+LC_COLLATE=C # have to set this; it affects the sorting
+touch a.b a,b a:b a-b a\;b a\ b a_b
+
+echo a[^[:alnum:]]b
+echo a[-.,:\;\ _]b
+
+echo a@([^[:alnum:]])b
+echo a@([-.,:; _])b
+echo a@([.])b
+echo a@([^.])b
+echo a@([^x])b
+echo a+([^[:alnum:]])b
+
+echo a@(.|[^[:alnum:]])b
+
+builtin cd /
+rm -rf $TESTDIR
+
+x=abcdef
+recho "${x#*(a|b)cd}"
+
+TEST='a , b'
+shopt -s globstar
+echo ${TEST//*([[:space:]]),*([[:space:]])/,}
+shopt -u globstar
+
+# this is for the benefit of pure coverage, so it writes the pcv file
+# in the right place
+builtin cd "$MYDIR"
+
+${THIS_SH} ./extglob1.sub
+
+exit 0
diff --git a/tests/extglob1.sub b/tests/extglob1.sub
new file mode 100644
index 0000000..bf65a9e
--- /dev/null
+++ b/tests/extglob1.sub
@@ -0,0 +1,37 @@
+MYDIR=$PWD
+
+: ${TMPDIR:=/tmp}
+GDIR=$TMPDIR/gtest-$$
+
+shopt -s extglob
+
+mkdir $GDIR || exit 1
+cd $GDIR || exit 1
+
+touch a.c
+
+echo +([[:alpha:].])
+echo +([[:alpha:].])+([[:alpha:].])
+echo *([[:alpha:].])
+echo *([[:alpha:].])*([[:alpha:].])
+
+echo ?([[:alpha:].])?([[:alpha:].])?([[:alpha:].])
+echo @([[:alpha:].])@([[:alpha:].])@([[:alpha:].])
+
+case . in
+!([[:alpha:].]) ) echo bad 1;;
+*) echo ok 1;;
+esac
+
+case . in
+?([[:alpha:].]) ) echo ok 2;;
+*) echo bad 2;;
+esac
+
+case . in
+@([[:alpha:].]) ) echo ok 3;;
+*) echo bad 3;;
+esac
+
+cd "$MYDIR"
+rm -rf $GDIR
diff --git a/tests/extglob2.right b/tests/extglob2.right
new file mode 100644
index 0000000..f8a09df
--- /dev/null
+++ b/tests/extglob2.right
@@ -0,0 +1,70 @@
+0: [[ fofo = *(f*(o)) ]]
+0: [[ ffo = *(f*(o)) ]]
+0: [[ foooofo = *(f*(o)) ]]
+0: [[ foooofof = *(f*(o)) ]]
+0: [[ fooofoofofooo = *(f*(o)) ]]
+1: [[ foooofof = *(f+(o)) ]]
+1: [[ xfoooofof = *(f*(o)) ]]
+1: [[ foooofofx = *(f*(o)) ]]
+0: [[ ofxoofxo = *(*(of*(o)x)o) ]]
+1: [[ ofooofoofofooo = *(f*(o)) ]]
+0: [[ foooxfooxfoxfooox = *(f*(o)x) ]]
+1: [[ foooxfooxofoxfooox = *(f*(o)x) ]]
+0: [[ foooxfooxfxfooox = *(f*(o)x) ]]
+0: [[ ofxoofxo = *(*(of*(o)x)o) ]]
+0: [[ ofoooxoofxo = *(*(of*(o)x)o) ]]
+0: [[ ofoooxoofxoofoooxoofxo = *(*(of*(o)x)o) ]]
+0: [[ ofoooxoofxoofoooxoofxoo = *(*(of*(o)x)o) ]]
+1: [[ ofoooxoofxoofoooxoofxofo = *(*(of*(o)x)o) ]]
+0: [[ ofoooxoofxoofoooxoofxooofxofxo = *(*(of*(o)x)o) ]]
+0: [[ aac = *(@(a))a@(c) ]]
+0: [[ ac = *(@(a))a@(c) ]]
+1: [[ c = *(@(a))a@(c) ]]
+0: [[ aaac = *(@(a))a@(c) ]]
+1: [[ baaac = *(@(a))a@(c) ]]
+0: [[ abcd = ?@(a|b)*@(c)d ]]
+0: [[ abcd = @(ab|a*@(b))*(c)d ]]
+0: [[ acd = @(ab|a*(b))*(c)d ]]
+0: [[ abbcd = @(ab|a*(b))*(c)d ]]
+0: [[ effgz = @(b+(c)d|e*(f)g?|?(h)i@(j|k)) ]]
+0: [[ efgz = @(b+(c)d|e*(f)g?|?(h)i@(j|k)) ]]
+0: [[ egz = @(b+(c)d|e*(f)g?|?(h)i@(j|k)) ]]
+0: [[ egzefffgzbcdij = *(b+(c)d|e*(f)g?|?(h)i@(j|k)) ]]
+1: [[ egz = @(b+(c)d|e+(f)g?|?(h)i@(j|k)) ]]
+0: [[ ofoofo = *(of+(o)) ]]
+0: [[ oxfoxoxfox = *(oxf+(ox)) ]]
+1: [[ oxfoxfox = *(oxf+(ox)) ]]
+0: [[ ofoofo = *(of+(o)|f) ]]
+0: [[ foofoofo = @(foo|f|fo)*(f|of+(o)) ]]
+0: [[ oofooofo = *(of|oof+(o)) ]]
+0: [[ fffooofoooooffoofffooofff = *(*(f)*(o)) ]]
+0: [[ fofoofoofofoo = *(fo|foo) ]]
+0: [[ foo = !(x) ]]
+0: [[ foo = !(x)* ]]
+1: [[ foo = !(foo) ]]
+0: [[ foo = !(foo)* ]]
+0: [[ foobar = !(foo) ]]
+0: [[ foobar = !(foo)* ]]
+0: [[ moo.cow = !(*.*).!(*.*) ]]
+1: [[ mad.moo.cow = !(*.*).!(*.*) ]]
+1: [[ mucca.pazza = mu!(*(c))?.pa!(*(z))? ]]
+0: [[ fff = !(f) ]]
+0: [[ fff = *(!(f)) ]]
+0: [[ fff = +(!(f)) ]]
+0: [[ ooo = !(f) ]]
+0: [[ ooo = *(!(f)) ]]
+0: [[ ooo = +(!(f)) ]]
+0: [[ foo = !(f) ]]
+0: [[ foo = *(!(f)) ]]
+0: [[ foo = +(!(f)) ]]
+1: [[ f = !(f) ]]
+1: [[ f = *(!(f)) ]]
+1: [[ f = +(!(f)) ]]
+0: [[ foot = @(!(z*)|*x) ]]
+1: [[ zoot = @(!(z*)|*x) ]]
+0: [[ foox = @(!(z*)|*x) ]]
+0: [[ zoox = @(!(z*)|*x) ]]
+0: [[ foo = *(!(foo)) ]]
+1: [[ foob = !(foo)b* ]]
+0: [[ foobb = !(foo)b* ]]
+0 tests failed.
diff --git a/tests/extglob2.tests b/tests/extglob2.tests
new file mode 100755
index 0000000..f35c3e8
--- /dev/null
+++ b/tests/extglob2.tests
@@ -0,0 +1,90 @@
+#
+# More ksh-like extended globbing tests, cribbed from zsh-3.1.5
+#
+shopt -s extglob
+
+failed=0
+while read res str pat; do
+ [[ $res = '#' ]] && continue
+ [[ $str = ${pat} ]]
+ ts=$?
+ [[ $1 = -q ]] || echo "$ts: [[ $str = $pat ]]"
+ if [[ ( $ts -gt 0 && $res = t) || ($ts -eq 0 && $res = f) ]]; then
+ echo "Test failed: [[ $str = $pat ]]"
+ (( failed += 1 ))
+ fi
+done <<EOT
+t fofo *(f*(o))
+t ffo *(f*(o))
+t foooofo *(f*(o))
+t foooofof *(f*(o))
+t fooofoofofooo *(f*(o))
+f foooofof *(f+(o))
+f xfoooofof *(f*(o))
+f foooofofx *(f*(o))
+t ofxoofxo *(*(of*(o)x)o)
+f ofooofoofofooo *(f*(o))
+t foooxfooxfoxfooox *(f*(o)x)
+f foooxfooxofoxfooox *(f*(o)x)
+t foooxfooxfxfooox *(f*(o)x)
+t ofxoofxo *(*(of*(o)x)o)
+t ofoooxoofxo *(*(of*(o)x)o)
+t ofoooxoofxoofoooxoofxo *(*(of*(o)x)o)
+t ofoooxoofxoofoooxoofxoo *(*(of*(o)x)o)
+f ofoooxoofxoofoooxoofxofo *(*(of*(o)x)o)
+t ofoooxoofxoofoooxoofxooofxofxo *(*(of*(o)x)o)
+t aac *(@(a))a@(c)
+t ac *(@(a))a@(c)
+f c *(@(a))a@(c)
+t aaac *(@(a))a@(c)
+f baaac *(@(a))a@(c)
+t abcd ?@(a|b)*@(c)d
+t abcd @(ab|a*@(b))*(c)d
+t acd @(ab|a*(b))*(c)d
+t abbcd @(ab|a*(b))*(c)d
+t effgz @(b+(c)d|e*(f)g?|?(h)i@(j|k))
+t efgz @(b+(c)d|e*(f)g?|?(h)i@(j|k))
+t egz @(b+(c)d|e*(f)g?|?(h)i@(j|k))
+t egzefffgzbcdij *(b+(c)d|e*(f)g?|?(h)i@(j|k))
+f egz @(b+(c)d|e+(f)g?|?(h)i@(j|k))
+t ofoofo *(of+(o))
+t oxfoxoxfox *(oxf+(ox))
+f oxfoxfox *(oxf+(ox))
+t ofoofo *(of+(o)|f)
+# The following is supposed to match only as fo+ofo+ofo
+t foofoofo @(foo|f|fo)*(f|of+(o))
+t oofooofo *(of|oof+(o))
+t fffooofoooooffoofffooofff *(*(f)*(o))
+# The following tests backtracking in alternation matches
+t fofoofoofofoo *(fo|foo)
+# Exclusion
+t foo !(x)
+t foo !(x)*
+f foo !(foo)
+t foo !(foo)*
+t foobar !(foo)
+t foobar !(foo)*
+t moo.cow !(*.*).!(*.*)
+f mad.moo.cow !(*.*).!(*.*)
+f mucca.pazza mu!(*(c))?.pa!(*(z))?
+t fff !(f)
+t fff *(!(f))
+t fff +(!(f))
+t ooo !(f)
+t ooo *(!(f))
+t ooo +(!(f))
+t foo !(f)
+t foo *(!(f))
+t foo +(!(f))
+f f !(f)
+f f *(!(f))
+f f +(!(f))
+t foot @(!(z*)|*x)
+f zoot @(!(z*)|*x)
+t foox @(!(z*)|*x)
+t zoox @(!(z*)|*x)
+t foo *(!(foo))
+f foob !(foo)b*
+t foobb !(foo)b*
+EOT
+echo "$failed tests failed."
diff --git a/tests/extglob3.right b/tests/extglob3.right
new file mode 100644
index 0000000..db9447e
--- /dev/null
+++ b/tests/extglob3.right
@@ -0,0 +1,27 @@
+match 1
+match 2
+match 3
+match 4
+match 1a
+match 1b
+match 2a
+match 2b
+match 3a
+match 3b
+match 4a
+match 4b
+match 5
+match 6
+match 7
+match 8
+match 9
+match 10
+match 11
+match 12
+match 13
+match 14
+match 15
+match 16
+match 17
+match 18
+ok 19
diff --git a/tests/extglob3.tests b/tests/extglob3.tests
new file mode 100644
index 0000000..60454a2
--- /dev/null
+++ b/tests/extglob3.tests
@@ -0,0 +1,56 @@
+shopt -s extglob
+
+[[ ab/../ == @(ab|+([^/]))/..?(/) ]] && echo match 1
+
+[[ ab/../ == +([^/])/..?(/) ]] && echo match 2
+
+[[ ab/../ == @(ab|?b)/..?(/) ]] && echo match 3
+
+[[ ab/../ == +([^/])/../ ]] && echo match 4
+
+[[ ab/../ == +([!/])/..?(/) ]] && echo match 1a
+
+[[ ab/../ == @(ab|+([!/]))/..?(/) ]] && echo match 1b
+
+[[ ab/../ == +([!/])/../ ]] && echo match 2a
+
+[[ ab/../ == +([!/])/..?(/) ]] && echo match 2b
+
+[[ ab/../ == +([!/])/..@(/) ]] && echo match 3a
+
+[[ ab/../ == +(ab)/..?(/) ]] && echo match 3b
+
+[[ ab/../ == [!/][!/]/../ ]] && echo match 4a
+
+[[ ab/../ == @(ab|?b)/..?(/) ]] && echo match 4b
+
+[[ ab/../ == [^/][^/]/../ ]] && echo match 5
+
+[[ ab/../ == ?b/..?(/) ]] && echo match 6
+
+[[ ab/../ == +(?b)/..?(/) ]] && echo match 7
+
+[[ ab/../ == +(?b|?b)/..?(/) ]] && echo match 8
+
+[[ ab/../ == @(?b|?b)/..?(/) ]] && echo match 9
+
+[[ ab/../ == @(a?|?b)/..?(/) ]] && echo match 10
+
+[[ ab/../ == ?(ab)/..?(/) ]] && echo match 11
+
+[[ ab/../ == ?(ab|??)/..?(/) ]] && echo match 12
+
+[[ ab/../ == @(??)/..?(/) ]] && echo match 13
+
+[[ ab/../ == @(??|a*)/..?(/) ]] && echo match 14
+
+[[ ab/../ == @(a*)/..?(/) ]] && echo match 15
+
+[[ ab/../ == +(??)/..?(/) ]] && echo match 16
+
+[[ ab/../ == +(??|a*)/..?(/) ]] && echo match 17
+
+[[ ab/../ == +(a*)/..?(/) ]] && echo match 18
+
+#
+j="@(x)" ; [[ x == $j ]] && echo ok 19
diff --git a/tests/func.right b/tests/func.right
new file mode 100644
index 0000000..da8b45c
--- /dev/null
+++ b/tests/func.right
@@ -0,0 +1,156 @@
+a returns 5
+b returns 4
+c returns 3
+d returns 2
+in e
+e returned 25
+x is 25
+ZZ
+abcde
+defghi
+ZZ
+5
+0
+AVAR
+AVAR
+foo
+foo
+AVAR
+5
+5
+f1
+f1 ()
+{
+ ( return 5 );
+ status=$?;
+ echo $status;
+ return $status
+}
+before: try to assign to FUNCNAME
+outside: FUNCNAME =
+before: FUNCNAME = func
+FUNCNAME = func2
+after: FUNCNAME = func
+outside2: FUNCNAME =
+function
+zf is a function
+zf ()
+{
+ echo this is zf
+}
+f is a function
+f ()
+{
+ echo f-x;
+ echo f-y
+} 1>&2
+subshell
+f is a function
+f ()
+{
+ echo f-x;
+ echo f-y
+} 1>&2
+f2 is a function
+f2 ()
+{
+ echo f2-a;
+ function f3 ()
+ {
+ echo f3-a;
+ echo f3-b
+ } 1>&2;
+ f3
+}
+subshell
+f2 is a function
+f2 ()
+{
+ echo f2-a;
+ function f3 ()
+ {
+ echo f3-a;
+ echo f3-b
+ } 1>&2;
+ f3
+}
+f4 is a function
+f4 ()
+{
+ echo f4-a;
+ function f5 ()
+ {
+ echo f5-a;
+ echo f5-b
+ } 1>&2;
+ f5
+} 2>&1
+subshell
+f4 is a function
+f4 ()
+{
+ echo f4-a;
+ function f5 ()
+ {
+ echo f5-a;
+ echo f5-b
+ } 1>&2;
+ f5
+} 2>&1
+testgrp is a function
+testgrp ()
+{
+ echo testgrp-a;
+ {
+ echo tg-x;
+ echo tg-y
+ } 1>&2;
+ echo testgrp-b
+}
+subshell
+testgrp is a function
+testgrp ()
+{
+ echo testgrp-a;
+ {
+ echo tg-x;
+ echo tg-y
+ } 1>&2;
+ echo testgrp-b
+}
+funca is a function
+funca ()
+{
+ ( echo func-a )
+}
+funcb is a function
+funcb ()
+{
+ ( echo func-b )
+}
+funcc is a function
+funcc ()
+{
+ ( echo func-c ) 2>&1
+}
+func-a
+func-b
+func-c
+foo-bar
+foo-bar ()
+{
+ :
+}
+expect 5 10
+5 10
+expect 20
+20
+expect 5 20
+5 20
+expect 5 30
+5 30
+expect 2 40
+2 40
+expect 5 20
+5 20
+5
diff --git a/tests/func.tests b/tests/func.tests
new file mode 100644
index 0000000..23dff44
--- /dev/null
+++ b/tests/func.tests
@@ -0,0 +1,176 @@
+a()
+{
+ x=$((x - 1))
+ return 5
+}
+
+b()
+{
+ x=$((x - 1))
+ a
+ echo a returns $?
+ return 4
+}
+
+c()
+{
+ x=$((x - 1))
+ b
+ echo b returns $?
+ return 3
+}
+
+d()
+{
+ x=$((x - 1))
+ c
+ echo c returns $?
+ return 2
+}
+
+e()
+{
+ d
+ echo d returns $?
+ echo in e
+ x=$((x - 1))
+ return $x
+}
+
+f()
+{
+ e
+ echo e returned $?
+ echo x is $x
+ return 0
+}
+
+x=30
+f
+
+# make sure unsetting a local variable preserves the `local' attribute
+f1()
+{
+ local zz
+ zz=abcde
+ echo $zz
+ unset zz
+ zz=defghi
+ echo $zz
+}
+
+zz=ZZ
+echo $zz
+f1
+echo $zz
+
+unset -f f1
+f1()
+{
+ return 5
+}
+
+( f1 )
+echo $?
+
+unset -f f1
+f1()
+{
+ sleep 5
+ return 5
+}
+
+f1 &
+wait
+echo $?
+
+unset -f f1
+
+f1()
+{
+ echo $AVAR
+ printenv AVAR
+}
+
+AVAR=AVAR
+echo $AVAR
+f1
+AVAR=foo f1
+echo $AVAR
+
+unset -f f1
+# make sure subshells can do a `return' if we're executing in a function
+f1()
+{
+ ( return 5 )
+ status=$?
+ echo $status
+ return $status
+}
+
+f1
+echo $?
+
+declare -F f1 # should print just the name
+declare -f f1 # should print the definition, too
+
+# no functions should be exported, right?
+declare -xF
+declare -xf
+
+# FUNCNAME tests
+func2()
+{
+ echo FUNCNAME = $FUNCNAME
+}
+
+func()
+{
+ echo before: FUNCNAME = $FUNCNAME
+ func2
+ echo after: FUNCNAME = $FUNCNAME
+}
+
+echo before: try to assign to FUNCNAME
+FUNCNAME=7
+
+echo outside: FUNCNAME = $FUNCNAME
+func
+echo outside2: FUNCNAME = $FUNCNAME
+
+# test exported functions (and cached exportstr)
+zf()
+{
+ echo this is zf
+}
+export -f zf
+
+${THIS_SH} -c 'type -t zf'
+${THIS_SH} -c 'type zf'
+
+${THIS_SH} ./func1.sub
+
+# tests for functions whose bodies are not group commands, with and without
+# attached redirections
+${THIS_SH} ./func2.sub
+
+# test for some posix-specific function behavior
+${THIS_SH} ./func3.sub
+
+unset -f myfunction
+myfunction() {
+ echo "bad shell function redirection"
+} >> /dev/null
+
+myfunction
+myfunction | cat
+
+segv()
+{
+ echo foo | return 5
+}
+
+segv
+echo $?
+
+exit 0
diff --git a/tests/func1.sub b/tests/func1.sub
new file mode 100644
index 0000000..345645f
--- /dev/null
+++ b/tests/func1.sub
@@ -0,0 +1,55 @@
+#
+# Test that redirections attached to shell functions are printed correctly.
+# This was a bug in all bash versions before bash-2.04.
+#
+f()
+{
+ echo f-x
+ echo f-y
+} >&2
+
+type f
+export -f f
+${THIS_SH} -c 'echo subshell; type f'
+
+f2()
+{
+ echo f2-a
+ f3()
+ {
+ echo f3-a
+ echo f3-b
+ } >&2
+ f3
+}
+
+type f2
+
+export -f f2
+${THIS_SH} -c 'echo subshell; type f2'
+
+f4()
+{
+ echo f4-a
+ f5()
+ {
+ echo f5-a
+ echo f5-b
+ } >&2
+ f5
+} 2>&1
+
+type f4
+export -f f4
+${THIS_SH} -c 'echo subshell; type f4'
+
+testgrp()
+{
+ echo testgrp-a
+ { echo tg-x; echo tg-y; } >&2
+ echo testgrp-b
+}
+type testgrp
+
+export -f testgrp
+${THIS_SH} -c 'echo subshell; type testgrp'
diff --git a/tests/func2.sub b/tests/func2.sub
new file mode 100644
index 0000000..41a3844
--- /dev/null
+++ b/tests/func2.sub
@@ -0,0 +1,27 @@
+funca() (
+ echo func-a
+)
+
+funcb() ( echo func-b )
+
+funcc() (
+ echo func-c
+) 2>&1
+
+type funca
+type funcb
+type funcc
+
+funca
+funcb
+funcc
+
+# when not in posix mode, bash allows non-identifiers as function names
+set +o posix
+foo-bar()
+{
+ :;
+}
+
+declare -F foo-bar
+declare -f foo-bar
diff --git a/tests/func3.sub b/tests/func3.sub
new file mode 100644
index 0000000..9d3d069
--- /dev/null
+++ b/tests/func3.sub
@@ -0,0 +1,54 @@
+#
+# test some posix-mode-specific function behavior
+#
+set -o posix
+func()
+{
+ return 5
+}
+
+myfunction () {
+ var=20 return
+}
+var=10
+echo expect 5 10
+func
+echo $? $var
+
+myfunction
+echo expect 20
+echo $var
+
+echo expect 5 20
+func
+echo $? $var
+
+echo expect 5 30
+var=30 func
+echo $? $var
+
+: ${TMPDIR:=/tmp}
+TMPFILE=$TMPDIR/func3.sub.$$
+
+rm -f $TMPFILE
+echo 'var=40 return 2' > $TMPFILE
+
+# test the behavior of `return' and preceding variable assignments here
+# because it's convenient
+var=10
+echo expect 2 40
+. $TMPFILE
+echo $? $var
+
+rm -f $TMPFILE
+
+#set -o posix
+var=0
+func()
+{
+ var=20 return 5
+}
+
+echo expect 5 20
+var=30 func
+echo $? $var
diff --git a/tests/getopts.right b/tests/getopts.right
new file mode 100644
index 0000000..9226103
--- /dev/null
+++ b/tests/getopts.right
@@ -0,0 +1,56 @@
+getopts: usage: getopts optstring name [arg]
+2
+getopts: usage: getopts optstring name [arg]
+2
+./getopts.tests: line 10: getopts: -a: invalid option
+getopts: usage: getopts optstring name [arg]
+-a specified
+-b bval specified
+remaining args: one two three
+-a specified
+-b bval specified
+remaining args: one two three four five six seven eight nine ten eleven twelve
+./getopts1.sub: option requires an argument -- b
+Usage: ./getopts1.sub [-a] [-b value] args
+-a specified
+-c cval specified
+-d specified
+-a specified
+-b 3 specified
+remaining args: one two three four five
+-a specified
+-b bval specified
+remaining args: one two three
+-a specified
+-b bval specified
+remaining args: one two three
+./getopts4.sub: error: option `b' requires an argument
+Usage: ./getopts4.sub [-a] [-b value] args
+./getopts4.sub: error: illegal option character `c'
+Usage: ./getopts4.sub [-a] [-b value] args
+-a specified
+remaining args: -b bval one two three
+OPTERR=0
+a here
+something else here
+OPTIND=3
+getop: OPTERR=1
+a here
+./getopts5.sub: illegal option -- c
+something else here
+./getopts5.sub: illegal option -- d
+something else here
+./getopts5.sub: illegal option -- e
+something else here
+getop: OPTIND=5
+OPTIND=3
+OPTERR=0
+-a specified
+remaining args:
+-a specified
+remaining args:
+-a specified
+remaining args:
+0
+./getopts7.sub: line 4: getopts: `opt-var': not a valid identifier
+remaining args:
diff --git a/tests/getopts.tests b/tests/getopts.tests
new file mode 100644
index 0000000..1814d78
--- /dev/null
+++ b/tests/getopts.tests
@@ -0,0 +1,38 @@
+# getopts tests
+# this should fail
+getopts
+echo $?
+getopts opts
+echo $?
+
+# maybe someday we will have a ksh93-like -a argument to set the name
+# used in error messages, but not yet
+getopts -a opts name
+
+${THIS_SH} ./getopts1.sub -a -b bval one two three
+# make sure getopts works when there are more than 9 positional parameters
+${THIS_SH} ./getopts1.sub -a -b bval one two three four five six seven eight nine ten eleven twelve
+${THIS_SH} ./getopts1.sub -a -b
+
+${THIS_SH} ./getopts2.sub -ad -c cval three four five
+
+${THIS_SH} ./getopts3.sub
+
+# make sure that `-b bval' and `-bbval' are equivalent
+${THIS_SH} ./getopts4.sub -a -b bval one two three
+${THIS_SH} ./getopts4.sub -a -bbval one two three
+# this tests `silent' error reporting
+${THIS_SH} ./getopts4.sub -a -b
+${THIS_SH} ./getopts4.sub -a -c
+
+# make sure that `--' can be used to end the list of options
+${THIS_SH} ./getopts4.sub -a -- -b bval one two three
+
+${THIS_SH} ./getopts5.sub -a -c
+
+${THIS_SH} ./getopts6.sub -a
+${THIS_SH} ./getopts6.sub -a -c
+${THIS_SH} ./getopts6.sub -ac
+echo $? # this should be 2
+
+${THIS_SH} ./getopts7.sub -a
diff --git a/tests/getopts1.sub b/tests/getopts1.sub
new file mode 100644
index 0000000..df0a342
--- /dev/null
+++ b/tests/getopts1.sub
@@ -0,0 +1,26 @@
+aflag=
+bflag=
+
+while getopts ab: name
+do
+ case $name in
+ a) aflag=1 ;;
+ b) bflag=1
+ bval=$OPTARG;;
+ ?) echo Usage: $0 [-a] [-b value] args
+ exit 2;;
+ esac
+
+done
+
+if [ ! -z "$aflag" ] ; then echo -a specified ; fi
+if [ ! -z "$bflag" ] ; then echo -b $bval specified ; fi
+
+if [ "$OPTIND" -gt 1 ]
+then
+ shift $(( $OPTIND - 1 ))
+fi
+
+echo remaining args: "$*"
+
+exit 0
diff --git a/tests/getopts2.sub b/tests/getopts2.sub
new file mode 100644
index 0000000..d91fd26
--- /dev/null
+++ b/tests/getopts2.sub
@@ -0,0 +1,26 @@
+aflag=
+bflag=
+
+while getopts ab:c:de name "$@"
+do
+ case $name in
+ a) aflag=1 ;;
+ b) bflag=1
+ bval=$OPTARG;;
+ c) cflag=1
+ cval=$OPTARG ;;
+ d) dflag=1 ;;
+ e) eflag=1;;
+ ?) echo Usage: $0 [-a] [-b value] [-c value] -[de] args
+ exit 2;;
+ esac
+
+done
+
+[ ! -z "$aflag" ] && echo -a specified
+[ ! -z "$bflag" ] && echo -b $bval specified
+[ ! -z "$cflag" ] && echo -c $cval specified
+[ ! -z "$dflag" ] && echo -d specified
+[ ! -z "$eflag" ] && { echo -n - ; echo e specified; }
+
+exit 0
diff --git a/tests/getopts3.sub b/tests/getopts3.sub
new file mode 100644
index 0000000..2d8b316
--- /dev/null
+++ b/tests/getopts3.sub
@@ -0,0 +1,27 @@
+aflag=
+bflag=
+
+while getopts ab: name -a -b 1 -a -a -a -b 5 -b 3 -a one two three four five
+do
+ case $name in
+ a) aflag=1 ;;
+ b) bflag=1
+ bval=$OPTARG;;
+ ?) echo Usage: $0 [-a] [-b value] args
+ exit 2;;
+ esac
+
+done
+
+if [ ! -z "$aflag" ] ; then echo -a specified ; fi
+if [ ! -z "$bflag" ] ; then echo -b $bval specified ; fi
+
+set -- -a -b 1 -a -a -a -b 5 -b 3 -a one two three four five
+if [ "$OPTIND" -gt 1 ]
+then
+ shift $(( $OPTIND - 1 ))
+fi
+
+echo remaining args: "$*"
+
+exit 0
diff --git a/tests/getopts4.sub b/tests/getopts4.sub
new file mode 100644
index 0000000..9cd5aef
--- /dev/null
+++ b/tests/getopts4.sub
@@ -0,0 +1,30 @@
+aflag=
+bflag=
+
+while getopts :ab: name "$@"
+do
+ case $name in
+ a) aflag=1 ;;
+ b) bflag=1
+ bval=$OPTARG;;
+ :) echo $0: error: option \`$OPTARG\' requires an argument
+ echo Usage: $0 [-a] [-b value] args
+ exit 2;;
+ ?) echo $0: error: illegal option character \`$OPTARG\'
+ echo Usage: $0 [-a] [-b value] args
+ exit 2;;
+ esac
+
+done
+
+if [ ! -z "$aflag" ] ; then echo -a specified ; fi
+if [ ! -z "$bflag" ] ; then echo -b $bval specified ; fi
+
+if [ "$OPTIND" -gt 1 ]
+then
+ shift $(( $OPTIND - 1 ))
+fi
+
+echo remaining args: "$*"
+
+exit 0
diff --git a/tests/getopts5.sub b/tests/getopts5.sub
new file mode 100644
index 0000000..c6e3888
--- /dev/null
+++ b/tests/getopts5.sub
@@ -0,0 +1,50 @@
+#!/local/bin/bash
+#Time-stamp: <95/06/07 07:40:40 hrue@imf.unit.no>
+
+getop () {
+
+ local OPTIND
+ local OPTERR=1
+
+ echo getop: OPTERR=$OPTERR
+ while getopts ab arg "$@"; do
+ case $arg in
+ a)
+ echo a here
+ ;;
+ b)
+ echo b here
+ ;;
+ :|?|*)
+ echo something else here
+ ;;
+ esac
+ done
+ echo getop: OPTIND=$OPTIND
+}
+
+OPTIND=
+OPTERR=0
+
+echo OPTERR=$OPTERR
+while getopts ab arg; do
+ case $arg in
+ a)
+ echo a here
+ ;;
+ b)
+ echo b here
+ ;;
+ :|?|*)
+
+ echo something else here
+ ;;
+ esac
+done
+
+echo OPTIND=$OPTIND
+
+getop "$@" -d -e
+
+echo OPTIND=$OPTIND
+echo OPTERR=$OPTERR
diff --git a/tests/getopts6.sub b/tests/getopts6.sub
new file mode 100644
index 0000000..75d768c
--- /dev/null
+++ b/tests/getopts6.sub
@@ -0,0 +1,27 @@
+aflag=
+bflag=
+
+while getopts :ac name "$@"
+do
+ case $name in
+ a) aflag=1 ;;
+ c) cflag=1 ;;
+ ?) exit 2;;
+ esac
+
+ # this came in in a bug report -- it's really a usage error
+ # but it shouldn't cause the shell to crash
+ shift
+done
+
+if [ ! -z "$aflag" ] ; then echo -a specified ; fi
+if [ ! -z "$cflag" ] ; then echo -c specified ; fi
+
+if [ "$OPTIND" -gt 1 ]
+then
+ shift $(( $OPTIND - 1 ))
+fi
+
+echo remaining args: "$*"
+
+exit 0
diff --git a/tests/getopts7.sub b/tests/getopts7.sub
new file mode 100644
index 0000000..a20a6df
--- /dev/null
+++ b/tests/getopts7.sub
@@ -0,0 +1,30 @@
+aflag=
+bflag=
+
+while getopts :ab: opt-var "$@"
+do
+ case $name in
+ a) aflag=1 ;;
+ b) bflag=1
+ bval=$OPTARG;;
+ :) echo $0: error: option \`$OPTARG\' requires an argument
+ echo Usage: $0 [-a] [-b value] args
+ exit 2;;
+ ?) echo $0: error: illegal option character \`$OPTARG\'
+ echo Usage: $0 [-a] [-b value] args
+ exit 2;;
+ esac
+
+done
+
+if [ ! -z "$aflag" ] ; then echo -a specified ; fi
+if [ ! -z "$bflag" ] ; then echo -b $bval specified ; fi
+
+if [ "$OPTIND" -gt 1 ]
+then
+ shift $(( $OPTIND - 1 ))
+fi
+
+echo remaining args: "$*"
+
+exit 0
diff --git a/tests/glob.right b/tests/glob.right
new file mode 100644
index 0000000..04a0fd5
--- /dev/null
+++ b/tests/glob.right
@@ -0,0 +1,135 @@
+foo/bar foobar/bar
+argv[1] = <a>
+argv[2] = <abc>
+argv[3] = <abd>
+argv[4] = <abe>
+argv[5] = <X*>
+argv[1] = <a>
+argv[2] = <abc>
+argv[3] = <abd>
+argv[4] = <abe>
+argv[1] = <a>
+argv[2] = <abc>
+argv[3] = <abd>
+argv[4] = <abe>
+tmp/l1 tmp/l2 tmp/*4 tmp/l3
+./glob.tests: line 44: no match: tmp/*4
+argv[1] = <bdir/>
+argv[1] = <*>
+argv[1] = <a*>
+argv[1] = <a*>
+argv[1] = <c>
+argv[2] = <ca>
+argv[3] = <cb>
+argv[4] = <a*>
+argv[5] = <*q*>
+argv[1] = <**>
+argv[1] = <**>
+argv[1] = <\.\./*/>
+argv[1] = <s/\..*//>
+argv[1] = </^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/>
+argv[1] = <abc>
+argv[2] = <abd>
+argv[3] = <abe>
+argv[4] = <bb>
+argv[5] = <cb>
+argv[1] = <abd>
+argv[2] = <abe>
+argv[3] = <bb>
+argv[4] = <bcd>
+argv[5] = <bdir>
+argv[6] = <ca>
+argv[7] = <cb>
+argv[8] = <dd>
+argv[9] = <de>
+argv[1] = <abd>
+argv[2] = <abe>
+argv[1] = <a-b>
+argv[2] = <aXb>
+argv[1] = <Beware>
+argv[2] = <d>
+argv[3] = <dd>
+argv[4] = <de>
+argv[1] = <a*b/ooo>
+argv[1] = <a*b/ooo>
+no match
+not there
+argv[1] = <abc>
+argv[1] = <abc>
+argv[1] = <abc>
+argv[1] = <abc>
+match 1
+match 2
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+argv[1] = <man/man1/bash.1>
+argv[1] = <man/man1/bash.1>
+argv[1] = <man/man1/bash.1>
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+ok 6
+ok 7
+ok 8
+ok 9
+ok 10
+ok 11
+ok 20
+ok 21
+ok 22
+ok 23
+ok 24
+ok 25
+ok 26
+ok 27
+ok 28
+ok 29
+ok 30
+ok 31
+ok 32
+ok 33
+ok 34
+ok 35
+ok 36
+ok 37
+argv[1] = <b>
+argv[2] = <bb>
+argv[3] = <bcd>
+argv[4] = <bdir>
+argv[1] = <Beware>
+argv[2] = <b>
+argv[3] = <bb>
+argv[4] = <bcd>
+argv[5] = <bdir>
+argv[1] = <Beware>
+argv[2] = <b>
+argv[3] = <bb>
+argv[4] = <bcd>
+argv[5] = <bdir>
+argv[1] = <*>
+argv[1] = <a*b>
+argv[2] = <a-b>
+argv[3] = <aXb>
+argv[4] = <abd>
+argv[5] = <bb>
+argv[6] = <bcd>
+argv[7] = <bdir>
+argv[8] = <ca>
+argv[9] = <cb>
+argv[10] = <dd>
+argv[11] = <man>
+argv[1] = <Beware>
+argv[2] = <abc>
+argv[3] = <abe>
+argv[4] = <bdir>
+argv[5] = <ca>
+argv[6] = <de>
+argv[7] = <man>
+argv[1] = <*>
+argv[1] = <man/man1/bash.1>
+argv[1] = <man/man1/bash.1>
diff --git a/tests/glob.tests b/tests/glob.tests
new file mode 100644
index 0000000..d32988b
--- /dev/null
+++ b/tests/glob.tests
@@ -0,0 +1,388 @@
+export LC_COLLATE=C
+#
+# test the shell globbing
+#
+expect()
+{
+ echo expect "$@"
+}
+
+# First, a test that bash-2.01.1 fails
+${THIS_SH} ./glob1.sub
+
+MYDIR=$PWD # save where we are
+
+TESTDIR=/tmp/glob-test
+mkdir $TESTDIR
+builtin cd $TESTDIR || { echo $0: cannot cd to $TESTDIR >&2 ; exit 1; }
+rm -rf *
+
+touch a b c d abc abd abe bb bcd ca cb dd de Beware
+mkdir bdir
+
+# see if `regular' globbing works right
+expect '<a> <abc> <abd> <abe> <X*>'
+recho a* X*
+
+expect '<a> <abc> <abd> <abe>'
+recho \a*
+
+# see if null glob expansion works
+shopt -s nullglob
+
+expect '<a> <abc> <abd> <abe>'
+recho a* X*
+
+shopt -u nullglob
+
+# see if the failglob option works
+
+mkdir tmp
+touch tmp/l1 tmp/l2 tmp/l3
+builtin echo tmp/l[12] tmp/*4 tmp/*3
+shopt -s failglob
+builtin echo tmp/l[12] tmp/*4 tmp/*3
+rm -r tmp
+shopt -u failglob
+
+# see if the code that expands directories only works
+expect '<bdir/>'
+recho b*/
+
+# Test quoted and unquoted globbing characters
+expect '<*>'
+recho \*
+
+expect '<a*>'
+recho 'a*'
+
+expect '<a*>'
+recho a\*
+
+expect '<c> <ca> <cb> <a*> <*q*>'
+recho c* a\* *q*
+
+expect '<**>'
+recho "*"*
+
+expect '<**>'
+recho \**
+
+expect '<\.\./*/>'
+recho "\.\./*/"
+
+expect '<s/\..*//>'
+recho 's/\..*//'
+
+# Pattern from Larry Wall's Configure that caused bash to blow up
+expect '</^root:/{s/^[^:]*:[^:]*:\([^:]*\).*$/\1/>'
+recho "/^root:/{s/^[^:]*:[^:]*:\([^:]*\).*"'$'"/\1/"
+
+# Make sure character classes work properly
+
+expect '<abc> <abd> <abe> <bb> <cb>'
+recho [a-c]b*
+
+expect '<abd> <abe> <bb> <bcd> <bdir> <ca> <cb> <dd> <de>'
+recho [a-y]*[^c]
+
+expect '<abd> <abe>'
+recho a*[^c]
+
+touch a-b aXb
+expect '<a-b> <aXb>'
+recho a[X-]b
+
+touch .x .y
+expect '<Beware> <d> <dd> <de>'
+recho [^a-c]*
+
+# Make sure that filenames with embedded globbing characters are handled
+# properly
+mkdir a\*b
+> a\*b/ooo
+
+expect '<a*b/ooo>'
+recho a\*b/*
+
+expect '<a*b/ooo>'
+recho a\*?/*
+
+expect '<no match>'
+cmd='echo !7'
+case "$cmd" in
+*\\!*) echo match ;;
+*) echo no match ;;
+esac
+
+expect '<not there>'
+file='r.*'
+case $file in
+*.\*) echo not there ;;
+*) echo there ;;
+esac
+
+# examples from the Posix.2 spec (d11.2, p. 243)
+expect '<abc>'
+recho a[b]c
+
+expect '<abc>'
+recho a["b"]c
+
+expect '<abc>'
+recho a[\b]c
+
+expect '<abc>'
+recho a?c
+
+expect '<match 1>'
+case abc in
+a"b"c) echo 'match 1' ;;
+*) echo 'BAD match 1' ;;
+esac
+
+expect '<match 2>'
+case abc in
+a*c) echo 'match 2' ;;
+*) echo 'BAD match 2' ;;
+esac
+
+expect '<ok 1>'
+case abc in
+"a?c") echo 'bad 1' ;;
+*) echo 'ok 1' ;;
+esac
+
+expect '<ok 2>'
+case abc in
+a\*c) echo 'bad 2' ;;
+*) echo 'ok 2' ;;
+esac
+
+expect '<ok 3>'
+case abc in
+a\[b]c) echo 'bad 3' ;;
+*) echo 'ok 3' ;;
+esac
+
+expect '<ok 4>'
+case "$nosuchvar" in
+"") echo 'ok 4' ;;
+*) echo 'bad 4' ;;
+esac
+
+# This is very odd, but sh and ksh seem to agree
+expect '<ok 5>'
+case abc in
+a["\b"]c) echo 'ok 5' ;;
+*) echo 'bad 5' ;;
+esac
+
+mkdir man
+mkdir man/man1
+touch man/man1/bash.1
+expect '<man/man1/bash.1>'
+recho */man*/bash.*
+expect '<man/man1/bash.1>'
+recho $(echo */man*/bash.*)
+expect '<man/man1/bash.1>'
+recho "$(echo */man*/bash.*)"
+
+# tests with multiple `*'s
+case abc in
+a***c) echo ok 1;;
+esac
+
+case abc in
+a*****?c) echo ok 2;;
+esac
+
+case abc in
+?*****??) echo ok 3;;
+esac
+
+case abc in
+*****??) echo ok 4;;
+esac
+
+case abc in
+*****??c) echo ok 5;;
+esac
+
+case abc in
+?*****?c) echo ok 6;;
+esac
+
+case abc in
+?***?****c) echo ok 7;;
+esac
+
+case abc in
+?***?****?) echo ok 8;;
+esac
+
+case abc in
+?***?****) echo ok 9;;
+esac
+
+case abc in
+*******c) echo ok 10;;
+esac
+
+case abc in
+*******?) echo ok 11;;
+esac
+
+case abcdecdhjk in
+a*cd**?**??k) echo ok 20;;
+esac
+
+case abcdecdhjk in
+a**?**cd**?**??k) echo ok 21;;
+esac
+
+case abcdecdhjk in
+a**?**cd**?**??k***) echo ok 22;;
+esac
+
+case abcdecdhjk in
+a**?**cd**?**??***k) echo ok 23;;
+esac
+
+case abcdecdhjk in
+a**?**cd**?**??***k**) echo ok 24;;
+esac
+
+case abcdecdhjk in
+a****c**?**??*****) echo ok 25;;
+esac
+
+case '-' in
+[-abc]) echo ok 26 ;;
+esac
+
+case '-' in
+[abc-]) echo ok 27 ;;
+esac
+
+case '\' in
+\\) echo ok 28 ;;
+esac
+
+case '\' in
+[\\]) echo ok 29 ;;
+esac
+
+case '\' in
+'\') echo ok 30 ;;
+esac
+
+case '[' in
+[[]) echo ok 31 ;;
+esac
+
+# a `[' without a closing `]' is just another character to match, in the
+# bash implementation
+case '[' in
+[) echo ok 32 ;;
+esac
+
+case '[abc' in
+[*) echo 'ok 33';;
+esac
+
+# a right bracket shall lose its special meaning and represent itself in
+# a bracket expression if it occurs first in the list. -- POSIX.2 2.8.3.2
+case ']' in
+[]]) echo ok 34 ;;
+esac
+
+case '-' in
+[]-]) echo ok 35 ;;
+esac
+
+# a backslash should just escape the next character in this context
+case p in
+[a-\z]) echo ok 36 ;;
+esac
+
+# this was a bug in all versions up to bash-2.04-release
+case "/tmp" in
+[/\\]*) echo ok 37 ;;
+esac
+
+# none of these should output anything
+
+case abc in
+??**********?****?) echo bad 1;;
+esac
+
+case abc in
+??**********?****c) echo bad 2;;
+esac
+
+case abc in
+?************c****?****) echo bad 3;;
+esac
+
+case abc in
+*c*?**) echo bad 4;;
+esac
+
+case abc in
+a*****c*?**) echo bad 5;;
+esac
+
+case abc in
+a********???*******) echo bad 6;;
+esac
+
+case 'a' in
+[]) echo bad 7 ;;
+esac
+
+case '[' in
+[abc) echo bad 8;;
+esac
+
+# let's start testing the case-insensitive globbing code
+recho b*
+
+shopt -s nocaseglob
+recho b*
+
+recho [b]*
+shopt -u nocaseglob
+
+# make sure set -f works right
+set -f
+recho *
+set +f
+
+# test out the GLOBIGNORE code
+GLOBIGNORE='.*:*c:*e:?'
+recho *
+
+GLOBIGNORE='.*:*b:*d:?'
+recho *
+
+# see if GLOBIGNORE can substitute for `set -f'
+GLOBIGNORE='.*:*'
+recho *
+
+unset GLOBIGNORE
+expect '<man/man1/bash.1>'
+recho */man*/bash.*
+
+# make sure null values for GLOBIGNORE have no effect
+GLOBIGNORE=
+expect '<man/man1/bash.1>'
+recho */man*/bash.*
+
+# this is for the benefit of pure coverage, so it writes the pcv file
+# in the right place, and for gprof
+builtin cd $MYDIR
+
+rm -rf $TESTDIR
+
+exit 0
diff --git a/tests/glob1.sub b/tests/glob1.sub
new file mode 100644
index 0000000..8745cd9
--- /dev/null
+++ b/tests/glob1.sub
@@ -0,0 +1,14 @@
+# bash-2.01.1 failed this test
+FN=/tmp/bash-glob.$$
+mkdir $FN
+cd $FN
+mkdir foo
+mkdir foobar
+touch foo/bar
+touch foobar/bar
+chmod 311 foo foobar
+echo f*/bar
+
+chmod 777 foo foobar
+cd /
+rm -rf $FN
diff --git a/tests/globstar.right b/tests/globstar.right
new file mode 100644
index 0000000..b75d80b
--- /dev/null
+++ b/tests/globstar.right
@@ -0,0 +1,155 @@
+lib/glob/glob.o
+lib/glob/smatch.o
+lib/glob/strmatch.o
+lib/readline/bind.o
+lib/readline/callback.o
+lib/readline/compat.o
+lib/readline/complete.o
+lib/readline/display.o
+lib/sh/casemod.o
+lib/sh/clktck.o
+lib/sh/clock.o
+lib/sh/eaccess.o
+lib/sh/fdprintf.o
+lib/sh/fmtullong.o
+lib/sh/fmtulong.o
+lib/sh/fmtumax.o
+lib/sh/fpurge.o
+lib/sh/getenv.o
+lib/sh/input_avail.o
+lib/sh/itos.o
+
+lib/:
+glob
+readline
+sh
+
+lib/glob:
+glob.o
+smatch.o
+strmatch.o
+
+lib/readline:
+bind.o
+callback.o
+compat.o
+complete.o
+display.o
+
+lib/sh:
+casemod.o
+clktck.o
+clock.o
+eaccess.o
+fdprintf.o
+fmtullong.o
+fmtulong.o
+fmtumax.o
+fpurge.o
+getenv.o
+input_avail.o
+itos.o
+lib/glob/glob.o
+lib/glob/smatch.o
+lib/glob/strmatch.o
+lib/readline/bind.o
+lib/readline/callback.o
+lib/readline/compat.o
+lib/readline/complete.o
+lib/readline/display.o
+lib/sh/casemod.o
+lib/sh/clktck.o
+lib/sh/clock.o
+lib/sh/eaccess.o
+lib/sh/fdprintf.o
+lib/sh/fmtullong.o
+lib/sh/fmtulong.o
+lib/sh/fmtumax.o
+lib/sh/fpurge.o
+lib/sh/getenv.o
+lib/sh/input_avail.o
+lib/sh/itos.o
+alias.o builtins/history.o builtins/jobs.o builtins/kill.o builtins/let.o builtins/mapfile.o lib/glob/glob.o lib/glob/smatch.o lib/glob/strmatch.o lib/readline/bind.o lib/readline/callback.o lib/readline/compat.o lib/readline/complete.o lib/readline/display.o lib/sh/casemod.o lib/sh/clktck.o lib/sh/clock.o lib/sh/eaccess.o lib/sh/fdprintf.o lib/sh/fmtullong.o lib/sh/fmtulong.o lib/sh/fmtumax.o lib/sh/fpurge.o lib/sh/getenv.o lib/sh/input_avail.o lib/sh/itos.o pcomplib.o print_cmd.o redir.o shell.o sig.o stringlib.o subst.o syntax.o test.o trap.o unwind_prot.o variables.o version.o xmalloc.o y.tab.o
+alias.o
+builtins/history.o
+builtins/jobs.o
+builtins/kill.o
+builtins/let.o
+builtins/mapfile.o
+lib/glob/glob.o
+lib/glob/smatch.o
+lib/glob/strmatch.o
+lib/readline/bind.o
+lib/readline/callback.o
+lib/readline/compat.o
+lib/readline/complete.o
+lib/readline/display.o
+lib/sh/casemod.o
+lib/sh/clktck.o
+lib/sh/clock.o
+lib/sh/eaccess.o
+lib/sh/fdprintf.o
+lib/sh/fmtullong.o
+lib/sh/fmtulong.o
+lib/sh/fmtumax.o
+lib/sh/fpurge.o
+lib/sh/getenv.o
+lib/sh/input_avail.o
+lib/sh/itos.o
+pcomplib.o
+print_cmd.o
+redir.o
+shell.o
+sig.o
+stringlib.o
+subst.o
+syntax.o
+test.o
+trap.o
+unwind_prot.o
+variables.o
+version.o
+xmalloc.o
+y.tab.o
+
+builtins:
+history.o
+jobs.o
+kill.o
+let.o
+mapfile.o
+
+lib:
+glob
+readline
+sh
+
+lib/glob:
+glob.o
+smatch.o
+strmatch.o
+
+lib/readline:
+bind.o
+callback.o
+compat.o
+complete.o
+display.o
+
+lib/sh:
+casemod.o
+clktck.o
+clock.o
+eaccess.o
+fdprintf.o
+fmtullong.o
+fmtulong.o
+fmtumax.o
+fpurge.o
+getenv.o
+input_avail.o
+itos.o
+alias.o builtins builtins/history.o builtins/jobs.o builtins/kill.o builtins/let.o builtins/mapfile.o lib lib/glob lib/glob/glob.o lib/glob/smatch.o lib/glob/strmatch.o lib/readline lib/readline/bind.o lib/readline/callback.o lib/readline/compat.o lib/readline/complete.o lib/readline/display.o lib/sh lib/sh/casemod.o lib/sh/clktck.o lib/sh/clock.o lib/sh/eaccess.o lib/sh/fdprintf.o lib/sh/fmtullong.o lib/sh/fmtulong.o lib/sh/fmtumax.o lib/sh/fpurge.o lib/sh/getenv.o lib/sh/input_avail.o lib/sh/itos.o pcomplib.o print_cmd.o redir.o shell.o sig.o stringlib.o subst.o syntax.o test.o trap.o unwind_prot.o variables.o version.o xmalloc.o y.tab.o
+bar/foo foo
+bar/foo/ foo/
+bar/foo/e bar/foo/f foo/a foo/b
diff --git a/tests/globstar.tests b/tests/globstar.tests
new file mode 100644
index 0000000..9b1f9d2
--- /dev/null
+++ b/tests/globstar.tests
@@ -0,0 +1,41 @@
+: ${TMPDIR:=/var/tmp}
+dir=$PWD
+
+shopt -s globstar
+
+export LANG=C LC_ALL=C LC_COLLATE=C
+
+GDIR=$TMPDIR/globstar-$$
+
+mkdir $GDIR || exit 1
+cd $GDIR || exit 1
+
+mkdir lib builtins
+mkdir lib/glob lib/readline lib/sh
+
+touch builtins/history.o builtins/jobs.o builtins/kill.o builtins/let.o builtins/mapfile.o
+touch lib/glob/glob.o lib/glob/smatch.o lib/glob/strmatch.o
+touch lib/readline/bind.o lib/readline/callback.o lib/readline/compat.o lib/readline/complete.o lib/readline/display.o
+
+touch lib/sh/casemod.o lib/sh/clktck.o lib/sh/clock.o lib/sh/eaccess.o
+touch lib/sh/fdprintf.o lib/sh/fmtullong.o lib/sh/fmtulong.o lib/sh/fmtumax.o
+touch lib/sh/fpurge.o lib/sh/getenv.o lib/sh/input_avail.o lib/sh/itos.o
+
+touch alias.o
+touch pcomplib.o print_cmd.o redir.o shell.o sig.o stringlib.o subst.o syntax.o
+touch test.o trap.o unwind_prot.o variables.o version.o xmalloc.o y.tab.o
+
+ls lib/**
+
+ls lib/**/*.o
+
+echo **/*.o
+
+ls **
+
+echo **
+
+cd $dir
+rm -rf $GDIR
+
+${THIS_SH} ./globstar1.sub
diff --git a/tests/globstar1.sub b/tests/globstar1.sub
new file mode 100644
index 0000000..8b9e36d
--- /dev/null
+++ b/tests/globstar1.sub
@@ -0,0 +1,21 @@
+shopt -s globstar
+wdir=$PWD
+
+: ${TMPDIR:=/var/tmp}
+DIR=$TMPDIR/globstar-$$
+mkdir -p $DIR
+cd $DIR || {
+ echo "$DIR: cannot cd" >&2
+ exit 1
+}
+mkdir -p foo/{a,b} bar/{c,d,foo/{e,f}} baz/{g,h}
+
+
+echo **/foo*
+
+echo **/foo*/
+
+echo **/foo*/*
+
+cd $wdir
+rm -rf $DIR
diff --git a/tests/heredoc.right b/tests/heredoc.right
new file mode 100644
index 0000000..b8754de
--- /dev/null
+++ b/tests/heredoc.right
@@ -0,0 +1,64 @@
+there
+one - alpha
+two - beta
+three - gamma
+hi\
+there$a
+stuff
+hi\
+there
+EO\
+F
+hi
+hi
+tab 1
+tab 2
+tab 3
+abc
+def ghi
+jkl mno
+fff is a function
+fff ()
+{
+ ed /tmp/foo > /dev/null <<ENDOFINPUT
+/^name/d
+w
+q
+ENDOFINPUT
+
+ aa=1
+}
+fff is a function
+fff ()
+{
+ ed /tmp/foo > /dev/null <<ENDOFINPUT
+/^name/d
+w
+q
+ENDOFINPUT
+
+ aa=1
+}
+foo is a function
+foo ()
+{
+ echo;
+ cat <<END
+bar
+END
+
+ cat <<EOF
+qux
+EOF
+
+}
+
+bar
+qux
+
+bar
+qux
+comsub here-string
+./heredoc.tests: line 100: warning: here-document at line 98 delimited by end-of-file (wanted `EOF')
+hi
+there
diff --git a/tests/heredoc.tests b/tests/heredoc.tests
new file mode 100644
index 0000000..79bf4ce
--- /dev/null
+++ b/tests/heredoc.tests
@@ -0,0 +1,100 @@
+# check order and content of multiple here docs
+
+cat << EOF1 << EOF2
+hi
+EOF1
+there
+EOF2
+
+while read line1; do
+ read line2 <&3
+ echo $line1 - $line2
+done <<EOF1 3<<EOF2
+one
+two
+three
+EOF1
+alpha
+beta
+gamma
+EOF2
+
+
+# check quoted here-doc is protected
+
+a=foo
+cat << 'EOF'
+hi\
+there$a
+stuff
+EOF
+
+# check that quoted here-documents don't have \newline processing done
+
+cat << 'EOF'
+hi\
+there
+EO\
+F
+EOF
+true
+
+# check that \newline is removed at start of here-doc
+cat << EO\
+F
+hi
+EOF
+
+# check that \newline removal works for here-doc delimiter
+cat << EOF
+hi
+EO\
+F
+
+# check operation of tab removal in here documents
+cat <<- EOF
+ tab 1
+ tab 2
+ tab 3
+ EOF
+
+# check appending of text to file from here document
+rm -f /tmp/bash-zzz
+cat > /tmp/bash-zzz << EOF
+abc
+EOF
+cat >> /tmp/bash-zzz << EOF
+def ghi
+jkl mno
+EOF
+cat /tmp/bash-zzz
+rm -f /tmp/bash-zzz
+
+# make sure command printing puts the here-document as the last redirection
+# on the line, and the function export code preserves syntactic correctness
+fff()
+{
+ ed /tmp/foo <<ENDOFINPUT >/dev/null
+/^name/d
+w
+q
+ENDOFINPUT
+aa=1
+}
+
+type fff
+export -f fff
+${THIS_SH} -c 'type fff'
+
+${THIS_SH} ./heredoc1.sub
+
+echo $(
+ cat <<< "comsub here-string"
+)
+
+# check that end of file delimits a here-document
+# THIS MUST BE LAST!
+
+cat << EOF
+hi
+there
diff --git a/tests/heredoc1.sub b/tests/heredoc1.sub
new file mode 100644
index 0000000..3f85ead
--- /dev/null
+++ b/tests/heredoc1.sub
@@ -0,0 +1,16 @@
+foo()
+{
+ echo
+ cat <<END
+bar
+END
+ cat <<EOF
+qux
+EOF
+}
+
+type foo
+foo
+
+eval "$(type foo | sed 1d)"
+foo
diff --git a/tests/herestr.right b/tests/herestr.right
new file mode 100644
index 0000000..80b01cf
--- /dev/null
+++ b/tests/herestr.right
@@ -0,0 +1,28 @@
+abcde
+yo
+hot damn
+what a fabulous window treatment
+double"quote
+onetwothree
+first second third
+f1 ()
+{
+ cat <<< "abcde";
+ cat <<< "yo";
+ cat <<< "$a $b";
+ cat <<< 'what a fabulous window treatment';
+ cat <<< 'double"quote'
+}
+f2 ()
+{
+ cat <<< onetwothree
+}
+f3 ()
+{
+ cat <<< "$@"
+}
+echo $(echo hi)
+echo ho
+echo off to work we go
+declare -a uu='([0]="" [1]="kghfjk" [2]="jkfzuk" [3]="i
+")'
diff --git a/tests/herestr.tests b/tests/herestr.tests
new file mode 100644
index 0000000..f77b229
--- /dev/null
+++ b/tests/herestr.tests
@@ -0,0 +1,39 @@
+a=hot
+b=damn
+f1()
+{
+cat <<< "abcde"
+
+cat <<< "yo"
+
+cat <<< "$a $b"
+
+cat <<< 'what a fabulous window treatment'
+
+cat <<< 'double"quote'
+}
+
+f2()
+{
+cat <<< onetwothree
+}
+
+f3()
+{
+cat <<< "$@"
+}
+
+f1
+f2
+f3 first second third
+
+typeset -f
+
+cat <<< 'echo $(echo hi)'
+
+cat <<< "echo ho"
+
+cat <<< "echo $(echo off to work we go)"
+
+IFS="/" read -r -d $'\000' -a uu <<< /kghfjk/jkfzuk/i
+declare -p uu
diff --git a/tests/histexp.right b/tests/histexp.right
new file mode 100644
index 0000000..f1c9e9d
--- /dev/null
+++ b/tests/histexp.right
@@ -0,0 +1,129 @@
+echo $BASH_VERSION
+./histexp.tests: line 24: history: !!:z: history expansion failed
+ 1 for i in one two three; do echo $i; done
+ 2 /bin/sh -c 'echo this is $0'
+ 3 ls
+ 4 echo $BASH_VERSION
+ 1 for i in one two three; do echo $i; done
+ 2 /bin/sh -c 'echo this is $0'
+ 3 ls
+ 4 echo $BASH_VERSION
+ 5 HISTFILE=/tmp/newhistory
+ 6 echo line 2 for history
+echo line 2 for history
+echo line 2 for history
+set -H
+echo line 2 for history
+line 2 for history
+ 1 for i in one two three; do echo $i; done
+ 2 /bin/sh -c 'echo this is $0'
+ 3 ls
+ 4 echo $BASH_VERSION
+ 5 HISTFILE=/tmp/newhistory
+ 6 echo line 2 for history
+ 7 set -H
+ 8 echo line 2 for history
+a b c d e
+echo a b c d e
+a b c d e
+echo line 2 for history
+line 2 for history
+echo line 8 for history
+line 8 for history
+/bin/sh -c 'echo this is $0'
+this is /bin/sh
+echo sh
+sh
+echo /bin
+/bin
+echo e
+e
+a b c d e
+echo b c d e
+b c d e
+echo b c d
+b c d
+echo d e
+d e
+echo d e
+d e
+echo b c d
+b c d
+file.c
+echo file
+file
+echo .c
+.c
+echo 'file'
+file
+bax.c
+echo $file
+bax
+echo .c
+.c
+echo '$file'
+$file
+a b c d e
+echo 'a' 'b' 'c' 'd' 'e'
+a b c d e
+echo 'a b c d e'
+a b c d e
+foo.c foo.o foo.html foo.h
+echo bar.c foo.o foo.html foo.h
+bar.c foo.o foo.html foo.h
+echo bar.c bar.o bar.html bar.h
+bar.c bar.o bar.html bar.h
+echo xbar.c xbar.o xbar.html xbar.h
+xbar.c xbar.o xbar.html xbar.h
+echo xbar.c xbar.o xbar.html xbar.h
+xbar.c xbar.o xbar.html xbar.h
+echo xwhix.c xwhix.o xwhix.html xwhix.h
+xwhix.c xwhix.o xwhix.html xwhix.h
+echo xwhix.c xwhix.o xwhix.html xwhix.h
+echo 'xwhix'
+xwhix
+echo 'xwhix.h'
+xwhix.h
+echo 'xwhix.h'
+xwhix.h
+echo 'xwhix.h'
+xwhix.h
+ 7 set -H
+ 8 echo line 2 for history
+ 9 echo a b c d e
+ 10 echo line 2 for history
+ 11 echo line 8 for history
+ 12 /bin/sh -c 'echo this is $0'
+ 13 echo sh
+ 14 echo /bin
+ 15 echo e
+ 16 echo a b c d e
+ 17 echo b c d e
+ 18 echo b c d
+ 19 echo d e
+ 20 echo b c d
+ 21 echo file.c
+ 22 echo file
+ 23 echo .c
+ 24 echo 'file'
+ 25 echo $file.c
+ 26 echo $file
+ 27 echo .c
+ 28 echo '$file'
+ 29 echo a b c d e
+ 30 echo 'a' 'b' 'c' 'd' 'e'
+ 31 echo 'a b c d e'
+ 32 echo foo.c foo.o foo.html foo.h
+ 33 echo bar.c foo.o foo.html foo.h
+ 34 echo bar.c bar.o bar.html bar.h
+ 35 echo xbar.c xbar.o xbar.html xbar.h
+ 36 echo xwhix.c xwhix.o xwhix.html xwhix.h
+ 37 echo 'xwhix'
+ 38 echo 'xwhix.h'
+!!
+!!
+echo '!!' \!\!
+!! !!
+ok 1
+ok 2
+ok 3
diff --git a/tests/histexp.tests b/tests/histexp.tests
new file mode 100644
index 0000000..721208c
--- /dev/null
+++ b/tests/histexp.tests
@@ -0,0 +1,124 @@
+LC_ALL=C
+LANG=C
+trap 'rm /tmp/newhistory' 0
+
+file=bax
+histchars='!^#' # make sure history comment char is set correctly
+
+unset HISTFILESIZE
+
+history -c
+
+HISTFILE=history.list
+HISTCONTROL=ignoreboth
+HISTIGNORE='&:#*:history*:fc*'
+# we will end up exercising the history stifling code as a result
+HISTSIZE=32
+
+shopt -s cmdhist
+set -o history
+
+history -p '!!'
+
+# this should result in a failed history expansion error
+history -p '!!:z'
+
+history
+
+HISTFILE=/tmp/newhistory
+history -a
+
+history -w
+
+history -s "echo line 2 for history"
+history
+history -p '!e'
+history -p '!!'
+
+set -H
+!!
+!e
+
+history
+
+echo a b c d e
+!?ch?
+!-2
+^2^8
+
+!2
+
+# we're selecting /bin/sh -c ...; we want `sh'
+echo !-1:0:t
+# we're selecting /bin/sh -c ...; we want `/bin'
+echo !-2:0:h
+# we're selecting `echo a b c d e'; we want `e'
+echo !?d?:5
+
+echo a b c d e
+echo !-1:2-$
+echo !-2:2-4
+echo !-2:3*
+echo !!:*
+
+echo !?a?:2-
+
+echo file.c
+echo !!:$:r
+echo !-2:$:e
+echo !-3:$:r:q
+
+echo $file.c
+echo !!:$:r
+echo !-2:^:e
+echo !-3:$:r:q
+
+echo a b c d e
+echo !!:1-$:x
+echo !-2:1-$:q
+
+echo foo.c foo.o foo.html foo.h
+!!:s/foo/bar/
+!-2:gs/foo/bar/
+!!:gs/bar/x&/
+!-2:g&
+
+# make sure we can use any delimiter in the substitution, not just `/'
+!!:gs+bar+whix+
+
+!!:p
+
+# wow
+echo !?.o?:%:r:q
+
+!!:0 !?.h?:%:q
+!!:-$
+!:-$
+
+history
+
+# make sure single quotes inhibit history expansion
+echo '!!'
+
+# make sure backslashes can quote the history expansion character
+echo \!\!
+
+# but other expansions on the line should still be processed
+
+echo '!!' !!:*
+history -c
+unset HISTFILE
+
+# make sure that the special bash cases are not history expanded
+case p in
+[!A-Z]) echo ok 1;;
+esac
+
+var1='ok 2'
+var2=var1
+
+echo ${!var2}
+
+# Bash-2.01[.1] fails this test -- it attempts history expansion after the
+# history_expansion_char
+echo ok 3 # !1200
diff --git a/tests/history.list b/tests/history.list
new file mode 100644
index 0000000..2a4c222
--- /dev/null
+++ b/tests/history.list
@@ -0,0 +1,4 @@
+for i in one two three; do echo $i; done
+/bin/sh -c 'echo this is $0'
+ls
+echo $BASH_VERSION
diff --git a/tests/history.right b/tests/history.right
new file mode 100644
index 0000000..cb58f98
--- /dev/null
+++ b/tests/history.right
@@ -0,0 +1,146 @@
+./history.tests: line 4: history: -x: invalid option
+history: usage: history [-c] [-d offset] [n] or history -anrw [filename] or history -ps arg [arg...]
+./history.tests: line 6: history: cannot use more than one of -anrw
+./history.tests: line 9: fc: -v: invalid option
+fc: usage: fc [-e ename] [-lnr] [first] [last] or fc -s [pat=rep] [command]
+ 1 for i in one two three; do echo $i; done
+ 2 /bin/sh -c 'echo this is $0'
+ 3 ls
+ 4 echo $BASH_VERSION
+1 for i in one two three; do echo $i; done
+2 /bin/sh -c 'echo this is $0'
+3 ls
+4 echo $BASH_VERSION
+ for i in one two three; do echo $i; done
+ /bin/sh -c 'echo this is $0'
+ ls
+ echo $BASH_VERSION
+4 echo $BASH_VERSION
+3 ls
+2 /bin/sh -c 'echo this is $0'
+1 for i in one two three; do echo $i; done
+ echo $BASH_VERSION
+ ls
+ /bin/sh -c 'echo this is $0'
+ for i in one two three; do echo $i; done
+ 1 for i in one two three; do echo $i; done
+ 2 /bin/sh -c 'echo this is $0'
+ 3 ls
+ 4 echo $BASH_VERSION
+ 5 echo line for history
+echo line for history
+ for i in one two three; do echo $i; done
+ /bin/sh -c 'echo this is $0'
+ ls
+ echo $BASH_VERSION
+ echo line for history
+displaying $HISTFILE after history -a
+echo line for history
+HISTFILE=/tmp/newhistory
+ 1 for i in one two three; do echo $i; done
+ 2 /bin/sh -c 'echo this is $0'
+ 3 ls
+ 4 echo $BASH_VERSION
+ 5 echo line for history
+ 6 HISTFILE=/tmp/newhistory
+ 7 echo displaying \$HISTFILE after history -a
+ 8 cat $HISTFILE
+for i in one two three; do echo $i; done
+/bin/sh -c 'echo this is $0'
+ls
+echo $BASH_VERSION
+echo line for history
+HISTFILE=/tmp/newhistory
+echo displaying \$HISTFILE after history -a
+cat $HISTFILE
+ 1 for i in one two three; do echo $i; done
+ 2 /bin/sh -c 'echo this is $0'
+ 3 ls
+ 4 echo $BASH_VERSION
+ 5 echo line for history
+ 6 HISTFILE=/tmp/newhistory
+ 7 echo displaying \$HISTFILE after history -a
+ 8 cat $HISTFILE
+ 9 echo line 2 for history
+echo line 2 for history
+echo line 2 for history
+ 1 for i in one two three; do echo $i; done
+ 2 /bin/sh -c 'echo this is $0'
+ 3 ls
+ 4 echo $BASH_VERSION
+ 5 echo line for history
+ 6 HISTFILE=/tmp/newhistory
+ 7 echo displaying \$HISTFILE after history -a
+ 8 cat $HISTFILE
+ 9 echo line 2 for history
+ 10 # this should show up as one history entry
+ 11 for x in one two three; do :; done
+set -H
+echo line 2 for history
+line 2 for history
+4 echo $BASH_VERSION
+5 echo line for history
+6 HISTFILE=/tmp/newhistory
+7 echo displaying \$HISTFILE after history -a
+8 cat $HISTFILE
+9 echo line 2 for history
+10 # this should show up as one history entry
+11 for x in one two three; do :; done
+12 # just a basic test. a full test suite for history expansion should be
+13 # created
+14 set -H
+15 echo line 2 for history
+16 unset HISTSIZE
+17 unset HISTFILE
+4 echo $BASH_VERSION
+5 echo line for history
+6 HISTFILE=/tmp/newhistory
+7 echo displaying \$HISTFILE after history -a
+8 cat $HISTFILE
+./history.tests: line 75: fc: history specification out of range
+ 14 set -H
+ 15 echo line 2 for history
+ 16 unset HISTSIZE
+ 17 unset HISTFILE
+aa ab ac
+echo xx xb xc
+xx xb xc
+echo 44 48 4c
+44 48 4c
+./history.tests: line 90: fc: no command found
+aa
+bb
+cc
+echo cc
+echo cc
+cc
+aa
+bb
+cc
+echo cc
+echo cc
+cc
+1
+one
+two
+three
+ 1 cat <<!
+one
+two
+three
+!
+
+ 2 history
+cat <<!
+one
+two
+three
+!
+
+one
+two
+three
+4.1
+echo ${BASH_VERSION%\.*}
+4.1
+ echo ${BASH_VERSION%\.*}
diff --git a/tests/history.tests b/tests/history.tests
new file mode 100644
index 0000000..688095d
--- /dev/null
+++ b/tests/history.tests
@@ -0,0 +1,113 @@
+trap 'rm /tmp/newhistory' 0
+
+# bad options
+history -x
+# cannot use -r and -w at the same time
+history -r -w /dev/null
+
+# bad option
+fc -v
+
+unset HISTFILESIZE
+
+# all of these should result in an empty history list
+history -c
+history -r /dev/null
+history -n /dev/null
+history -c
+
+HISTFILE=history.list
+HISTCONTROL=ignoreboth
+HISTIGNORE='&:history*:fc*'
+HISTSIZE=32
+
+shopt -s cmdhist
+set -o history
+
+history
+
+fc -l
+fc -nl
+
+fc -lr
+fc -nlr
+
+history -s "echo line for history"
+history
+
+history -p '!!'
+
+fc -nl
+
+HISTFILE=/tmp/newhistory
+history -a
+echo displaying \$HISTFILE after history -a
+cat $HISTFILE
+
+history
+history -w
+cat $HISTFILE
+
+history -s "echo line 2 for history"
+history
+history -p '!e'
+history -p '!!'
+
+# this should show up as one history entry
+for x in one two three
+do
+ :
+done
+history
+
+# just a basic test. a full test suite for history expansion should be
+# created
+set -H
+!!
+!e
+
+unset HISTSIZE
+unset HISTFILE
+
+fc -l 4
+fc -l 4 8
+
+fc -l one=two three=four 502
+
+history 4
+
+shopt -so history
+shopt -s expand_aliases
+
+alias r="fc -s"
+
+echo aa ab ac
+
+r a=x
+r x=4 b=8
+
+# this had better fail with `no command found'
+r cc
+
+unalias -a
+alias
+
+# these two blocks had better both result in the same output
+echo aa
+echo bb
+echo cc
+fc -e cat
+
+echo aa
+echo bb
+echo cc
+fc -e cat -1
+
+set +o history
+
+shopt -q -o history
+echo $?
+
+${THIS_SH} ./history1.sub
+
+${THIS_SH} ./history2.sub
diff --git a/tests/history1.sub b/tests/history1.sub
new file mode 100644
index 0000000..543a3e8
--- /dev/null
+++ b/tests/history1.sub
@@ -0,0 +1,13 @@
+HISTFILE=foohist-$$
+unset HISTIGNORE HISTCONTROL
+set -o history
+
+history -c
+cat <<!
+one
+two
+three
+!
+
+history
+fc -s cat
diff --git a/tests/history2.sub b/tests/history2.sub
new file mode 100644
index 0000000..1a8e78c
--- /dev/null
+++ b/tests/history2.sub
@@ -0,0 +1,10 @@
+set -o history
+HISTSIZE=256
+HISTFILE=/dev/null
+
+# these two lines should be the same
+echo ${BASH_VERSION%\.*}
+echo $(fc -nl -1)
+
+echo ${BASH_VERSION%\.*}
+fc -nl -1
diff --git a/tests/ifs-posix.right b/tests/ifs-posix.right
new file mode 100644
index 0000000..f3bdccc
--- /dev/null
+++ b/tests/ifs-posix.right
@@ -0,0 +1 @@
+# tests 6856 passed 6856 failed 0
diff --git a/tests/ifs-posix.tests b/tests/ifs-posix.tests
new file mode 100644
index 0000000..cf9a898
--- /dev/null
+++ b/tests/ifs-posix.tests
@@ -0,0 +1,257 @@
+# Usage: $SHELL ifs.sh
+#
+# This script generates 6856 tests for the set(1) and read(1)
+# builtins w.r.t. IFS whitespace and non-whitespace characters.
+# Each failed test produces one line on the standard output that
+# contains the test along with the expected and actual results.
+# The last output line contains the test result counts. ordered>0
+# are the number of tests where IFS=": " produced different results
+# than IFS=" :". If a test fails the same way for IFS=": " and
+# IFS=" :" then the second output line is suppressed.
+
+TESTS=6856
+
+ksh_read=0
+echo 1 | read ksh_read
+ksh_arith=0
+eval '((ksh_arith+=1))' 2>/dev/null
+
+failed=0
+ordered=0
+passed=0
+
+split()
+{
+ i=$1 s=$2 r=$3 S='' R=''
+ for ifs in ': ' ' :'
+ do IFS=$ifs
+ set x $i
+ shift
+ IFS=' '
+ g="[$#]"
+ while :
+ do case $# in
+ 0) break ;;
+ esac
+ g="$g($1)"
+ shift
+ done
+ case $g in
+ "$s") case $ksh_arith in
+ 1) ((passed+=1)) ;;
+ *) passed=`expr $passed + 1` ;;
+ esac
+ case $S in
+ '') S=$g
+ ;;
+ "$g") ;;
+ *) case $ksh_arith in
+ 1) ((ordered+=1)) ;;
+ *) ordered=`expr $ordered + 1` ;;
+ esac
+ ;;
+ esac
+ ;;
+ "$S") case $ksh_arith in
+ 1) ((failed+=1)) ;;
+ *) failed=`expr $failed + 1` ;;
+ esac
+ ;;
+ *) case $ksh_arith in
+ 1) ((failed+=1)) ;;
+ *) failed=`expr $failed + 1` ;;
+ esac
+ case $s in
+ "$S") ;;
+ ?0*) echo "IFS=\"$ifs\"; x=\"$i\"; set x \$x; shift; echo \"[\$#]\" # expected \"$s\" got \"$g\"" ;;
+ ?1*) echo "IFS=\"$ifs\"; x=\"$i\"; set x \$x; shift; echo \"[\$#](\$1)\" # expected \"$s\" got \"$g\"" ;;
+ ?2*) echo "IFS=\"$ifs\"; x=\"$i\"; set x \$x; shift; echo \"[\$#](\$1)(\$2)\" # expected \"$s\" got \"$g\"" ;;
+ ?3*) echo "IFS=\"$ifs\"; x=\"$i\"; set x \$x; shift; echo \"[\$#](\$1)(\$2)(\$3)\" # expected \"$s\" got \"$g\"" ;;
+ *) echo TEST ERROR i="'$i'" s="'$s'" ;;
+ esac
+ case $S in
+ '') S=$g
+ ;;
+ "$g") ;;
+ *) case $ksh_arith in
+ 1) ((ordered+=1)) ;;
+ *) ordered=`expr $ordered + 1` ;;
+ esac
+ ;;
+ esac
+ esac
+ case $ksh_read in
+ 1) echo "$i" | IFS=$ifs read x y; g="($x)($y)" ;;
+ *) g=`export ifs; echo "$i" | ( IFS=$ifs; read x y; echo "($x)($y)" )` ;;
+ esac
+ case $g in
+ "$r") case $ksh_arith in
+ 1) ((passed+=1)) ;;
+ *) passed=`expr $passed + 1` ;;
+ esac
+ case $R in
+ '') R=$g
+ ;;
+ "$g") ;;
+ *) case $ksh_arith in
+ 1) ((ordered+=1)) ;;
+ *) ordered=`expr $ordered + 1` ;;
+ esac
+ ;;
+ esac
+ ;;
+ "$R") case $ksh_arith in
+ 1) ((failed+=1)) ;;
+ *) failed=`expr $failed + 1` ;;
+ esac
+ ;;
+ *) case $ksh_arith in
+ 1) ((failed+=1)) ;;
+ *) failed=`expr $failed + 1` ;;
+ esac
+ case $r in
+ "$R") ;;
+ *) echo "echo \"$i\" | ( IFS=\"$ifs\" read x y; echo \"(\$x)(\$y)\" ) # expected \"$r\" got \"$g\"" ;;
+ esac
+ case $R in
+ '') R=$g
+ ;;
+ "$g") ;;
+ *) case $ksh_arith in
+ 1) ((ordered+=1)) ;;
+ *) ordered=`expr $ordered + 1` ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+}
+
+for str in \
+ '-' \
+ 'a' \
+ '- -' \
+ '- a' \
+ 'a -' \
+ 'a b' \
+ '- - -' \
+ '- - a' \
+ '- a -' \
+ '- a b' \
+ 'a - -' \
+ 'a - b' \
+ 'a b -' \
+ 'a b c' \
+
+do
+ IFS=' '
+ set x $str
+
+ shift
+ case $# in
+ 0) continue ;;
+ esac
+
+ f1=$1
+ case $f1 in
+ '-') f1='' ;;
+ esac
+
+ shift
+ case $# in
+ 0) for d0 in '' ' '
+ do
+ for d1 in '' ' ' ':' ' :' ': ' ' : '
+ do
+ case $f1$d1 in
+ '') split "$d0$f1$d1" "[0]" "()()" ;;
+ ' ') ;;
+ *) split "$d0$f1$d1" "[1]($f1)" "($f1)()" ;;
+ esac
+ done
+ done
+ continue
+ ;;
+ esac
+ f2=$1
+ case $f2 in
+ '-') f2='' ;;
+ esac
+
+ shift
+ case $# in
+ 0) for d0 in '' ' '
+ do
+ for d1 in ' ' ':' ' :' ': ' ' : '
+ do
+ case ' ' in
+ $f1$d1|$d1$f2) continue ;;
+ esac
+ for d2 in '' ' ' ':' ' :' ': ' ' : '
+ do
+ case $f2$d2 in
+ '') split "$d0$f1$d1$f2$d2" "[1]($f1)" "($f1)()" ;;
+ ' ') ;;
+ *) split "$d0$f1$d1$f2$d2" "[2]($f1)($f2)" "($f1)($f2)" ;;
+ esac
+ done
+ done
+ done
+ continue
+ ;;
+ esac
+ f3=$1
+ case $f3 in
+ '-') f3='' ;;
+ esac
+
+ shift
+ case $# in
+ 0) for d0 in '' ' '
+ do
+ for d1 in ':' ' :' ': ' ' : '
+ do
+ case ' ' in
+ $f1$d1|$d1$f2) continue ;;
+ esac
+ for d2 in ' ' ':' ' :' ': ' ' : '
+ do
+ case $f2$d2 in
+ ' ') continue ;;
+ esac
+ case ' ' in
+ $f2$d2|$d2$f3) continue ;;
+ esac
+ for d3 in '' ' ' ':' ' :' ': ' ' : '
+ do
+ case $f3$d3 in
+ '') split "$d0$f1$d1$f2$d2$f3$d3" "[2]($f1)($f2)" "($f1)($f2)" ;;
+ ' ') ;;
+ *) x=$f2$d2$f3$d3
+ x=${x#' '}
+ x=${x%' '}
+ split "$d0$f1$d1$f2$d2$f3$d3" "[3]($f1)($f2)($f3)" "($f1)($x)"
+ ;;
+ esac
+ done
+ done
+ done
+ done
+ continue
+ ;;
+ esac
+done
+case $ksh_arith in
+1) ((tests=passed+failed)) ;;
+*) tests=`expr $passed + $failed` ;;
+esac
+case $ordered in
+0) ordered="" ;;
+*) ordered=" ordered $ordered" ;;
+esac
+case $tests in
+$TESTS) fatal="" ;;
+*) fatal=" -- fundamental IFS error -- $TESTS tests expected"
+esac
+echo "# tests $tests passed $passed failed $failed$ordered$fatal"
diff --git a/tests/ifs.right b/tests/ifs.right
new file mode 100644
index 0000000..512f6ee
--- /dev/null
+++ b/tests/ifs.right
@@ -0,0 +1,10 @@
+a:b:c
+a:b:c
+a:b:c
+a b c d e
+a:b:c:d:e
+a b c d e
+a:b:c:d:e
+a:b:c:d:e
+a b c d e
+a b c d e
diff --git a/tests/ifs.tests b/tests/ifs.tests
new file mode 100644
index 0000000..763e2a0
--- /dev/null
+++ b/tests/ifs.tests
@@ -0,0 +1,61 @@
+OIFS="$IFS"
+IFS=":$IFS"
+eval foo="a:b:c"
+IFS="$OIFS"
+echo $foo
+
+OIFS=$IFS
+IFS=":$IFS"
+foo=$(echo a:b:c)
+IFS=$OIFS
+
+for i in $foo
+do
+ echo $i
+done
+
+OIFS=$IFS
+IFS=":$IFS"
+foo=`echo a:b:c`
+IFS=$OIFS
+
+for i in $foo
+do
+ echo $i
+done
+
+DEFIFS=$' \t\n'
+
+# local copy of IFS that shadows global version
+function f
+{
+ typeset IFS=:
+
+ echo $1
+}
+
+function ff
+{
+ echo $1
+}
+
+f a:b:c:d:e
+x=a:b:c:d:e
+echo $x
+
+IFS=: ff a:b:c:d:e
+echo $x
+
+# doesn't get word split
+IFS=$DEFIFS
+# variable assignment doesn't use new value for word splitting
+IFS=: echo $x
+# but does this time because of the eval
+IFS=: eval echo \$x
+
+# in posix mode, assignments preceding special builtins and functions are global
+set -o posix
+IFS=: export x
+echo $x
+
+IFS="$DEFIFS"
diff --git a/tests/input-line.sh b/tests/input-line.sh
new file mode 100644
index 0000000..3f66c81
--- /dev/null
+++ b/tests/input-line.sh
@@ -0,0 +1,4 @@
+echo before calling input-line.sub
+${THIS_SH} ./input-line.sub
+this line for input-line.sub
+echo finished with input-line.sub
diff --git a/tests/input-line.sub b/tests/input-line.sub
new file mode 100644
index 0000000..7bc8df2
--- /dev/null
+++ b/tests/input-line.sub
@@ -0,0 +1,2 @@
+read line
+echo line read by $0 was \`$line\'
diff --git a/tests/input.right b/tests/input.right
new file mode 100644
index 0000000..8733feb
--- /dev/null
+++ b/tests/input.right
@@ -0,0 +1,3 @@
+before calling input-line.sub
+line read by ./input-line.sub was `this line for input-line.sub'
+finished with input-line.sub
diff --git a/tests/intl.right b/tests/intl.right
new file mode 100644
index 0000000..449d5b0
--- /dev/null
+++ b/tests/intl.right
@@ -0,0 +1,13 @@
+é
+1
+AéB
+B
+B
+ok 1
+ok 2
+aéb
+0000000 141 303 251 142
+0000004
+-абвгдежзиклмноп - 16
+-абвгдежзиклмноп- 15
+-абвгд- 5
diff --git a/tests/intl.tests b/tests/intl.tests
new file mode 100644
index 0000000..cd919df
--- /dev/null
+++ b/tests/intl.tests
@@ -0,0 +1,41 @@
+export LC_ALL=en_US.UTF-8
+
+a=$'\303\251'
+
+echo "$a"
+
+echo ${#a}
+
+b=$'A\303\251B'
+
+echo "$b"
+
+echo ${b: -1}
+
+c=AeB
+
+echo ${c: -1}
+
+unset a
+a=$(printf '%b' 'A\303\251B')
+IFS=$(printf '%b' '\303\251')
+
+case "$a" in
+"A${IFS}B") echo ok 1 ;;
+*) echo bad 1 ;;
+esac
+
+set $a
+
+case $1 in
+A) echo ok 2 ;;
+*) echo bad 2 ;;
+esac
+
+set a b
+
+printf '%s\n' "$*"
+printf '%s' "$*" | od -b
+
+# display differences make this problematic
+${THIS_SH} ./intl1.sub
diff --git a/tests/intl1.sub b/tests/intl1.sub
new file mode 100644
index 0000000..a03648f
--- /dev/null
+++ b/tests/intl1.sub
@@ -0,0 +1,11 @@
+LC_ALL=en_US.UTF-8
+LANG=en_US.UTF-8
+
+var='абвгдежзиклмноп '
+echo -"$var"- ${#var}
+
+read foo <<< "$var"
+echo -"$foo"- ${#foo}
+
+read -n 5 foo <<< "$var"
+echo -"$foo"- ${#foo}
diff --git a/tests/invert.right b/tests/invert.right
new file mode 100644
index 0000000..5a9239a
--- /dev/null
+++ b/tests/invert.right
@@ -0,0 +1,10 @@
+1
+1
+1
+0
+0
+1
+0
+1
+0
+1
diff --git a/tests/invert.tests b/tests/invert.tests
new file mode 100644
index 0000000..8393d95
--- /dev/null
+++ b/tests/invert.tests
@@ -0,0 +1,19 @@
+# tests of return value inversion
+# placeholder for future expansion
+
+# user subshells (...) did this wrong in bash versions before 2.04
+
+! ( echo hello | grep h >/dev/null 2>&1 ); echo $?
+! echo hello | grep h >/dev/null 2>&1 ; echo $?
+
+! true ; echo $?
+! false; echo $?
+
+! (false) ; echo $?
+! (true); echo $?
+
+! true | false ; echo $?
+! false | true ; echo $?
+
+! (true | false) ; echo $?
+! (false | true) ; echo $?
diff --git a/tests/iquote.right b/tests/iquote.right
new file mode 100644
index 0000000..d164f10
--- /dev/null
+++ b/tests/iquote.right
@@ -0,0 +1,61 @@
+argv[1] = <xxxyyy>
+argv[1] = <xxx^?yyy>
+argv[1] = <xy>
+argv[1] = <x^?y>
+argv[1] = <-->
+argv[1] = <-^?->
+argv[1] = <>
+argv[1] = <>
+argv[1] = <^?>
+argv[1] = <^?yy>
+0x7f
+0x7f
+0x7f
+argv[1] = <^?>
+argv[1] = <^?@>
+argv[1] = <@^?@>
+argv[1] = <@^?>
+argv[1] = <^?>
+argv[1] = <^?@>
+argv[1] = <@^?@>
+argv[1] = <@^?>
+argv[1] = <1>
+argv[2] = <^?>
+argv[3] = <^?>
+argv[1] = <2>
+argv[2] = <^?a>
+argv[3] = <^?a>
+argv[1] = <2>
+argv[2] = <^?a>
+argv[3] = <^?a>
+argv[1] = <3>
+argv[2] = <^?aa>
+argv[3] = <^?aa>
+argv[1] = <>
+argv[1] = <-->
+argv[1] = <-->
+argv[1] = <^?>
+argv[1] = <-^?->
+argv[1] = <^?>
+argv[1] = <-^?->
+ok
+argv[1] = <aaa^?bbb>
+argv[1] = <ccc^?ddd>
+argv[1] = <eee^?fff>
+argv[1] = <ggg^?hhh>
+argv[1] = <aaabbb>
+argv[1] = <cccddd>
+argv[1] = <eeefff>
+argv[1] = <ggghhh>
+argv[1] = <aaa^?bbb>
+argv[1] = <ccc^?ddd>
+argv[1] = <eee^?fff>
+argv[1] = <ggg^?hhh>
+argv[1] = <aaabbb>
+argv[1] = <cccddd>
+argv[1] = <eeefff>
+argv[1] = <ggghhh>
+argv[1] = <aaa^?bbb>
+argv[1] = <ccc^?ddd>
+argv[1] = <eee^?fff>
+argv[1] = <ggg^?hhh>
diff --git a/tests/iquote.tests b/tests/iquote.tests
new file mode 100644
index 0000000..a2cdf4f
--- /dev/null
+++ b/tests/iquote.tests
@@ -0,0 +1,143 @@
+# bug in bash up to and including bash-3.0 (including patches)
+#
+# problem is conflict between CTLNUL used internally to denote quoted null
+# characters and its value (0x7f) appearing in the expansion of a variable
+#
+unset x
+recho "xxx${x}yyy"
+
+y=$'\177'
+recho "xxx${y}yyy"
+
+unset y
+
+unset undef
+
+set ""
+recho ${undef-"x$*y"}
+
+set $'\177'
+recho ${undef-"x$*y"}
+
+shift $#
+
+f()
+{
+ recho "-${*-x}-"
+}
+
+f ''
+f $'\177'
+
+unset -f f
+
+x=12345
+
+recho "${x:6:1}"
+
+x=
+recho "${x:0:1}"
+
+y=$'\177'
+recho "${y:0:1}"
+
+y=xxx$'\177'yyy
+recho "${y:3:3}"
+
+unset x y
+
+eval tmp=`printf "$'\\\\\x%x'\n" 127`
+printf "%#1x\n" "'$tmp"
+
+x=$'\177'
+printf "%#1x\n" "'$x"
+
+a=127
+eval c=\$\'\\$(printf '%o' $a)\'
+printf "%#1x\n" "'$c"
+
+recho "$c"
+recho "$c"@
+recho @"$c"@
+recho @"$c"
+
+recho "$c"
+recho "$c@"
+recho "@$c@"
+recho "@$c"
+
+unset tmp x a c
+
+qtest()
+{
+ recho ${#q} "${q}" ${q}
+}
+
+q=$'\x7f'
+qtest
+
+q=${q}a
+qtest
+
+q=$'\x7fa'
+qtest
+
+q="${q}a"
+qtest
+
+unset -f qtest
+unset q
+
+set -- ''
+recho "${*:1}"
+recho ${*:1}
+recho -${*:1}-
+recho -"${*:1}"-
+
+set $'\177'
+recho "${*:1}"
+recho "-${*:1}-"
+
+recho ${*:1}
+recho -${*:1}-
+
+shift $#
+
+DEL=`awk 'END{printf("%c", 0+127)}' </dev/null`
+T1=a\ $DEL
+T2="a $DEL"
+set -- x $(echo $T1|wc -c) $(echo $T2|wc -c); shift
+L1=$1; L2=$2
+case "$L1/$L2" in
+4/4) echo ok;;
+*) echo CTLNUL bug: L1=$L1, L2=$L2;;
+esac
+
+x=$'\177'
+recho "aaa${x}bbb"
+recho ccc"${x}"ddd
+recho eee"$x"fff
+recho ggg"$(echo $x)"hhh
+
+x=
+recho "aaa${x}bbb"
+recho ccc"${x}"ddd
+recho eee"$x"fff
+recho ggg"$(echo $x)"hhh
+
+set -- $'\177'
+recho "aaa${1}bbb"
+recho ccc"${1}"ddd
+recho eee"$1"fff
+recho ggg"$(echo $1)"hhh
+
+set -- ""
+recho "aaa${1}bbb"
+recho ccc"${1}"ddd
+recho eee"$1"fff
+recho ggg"$(echo $1)"hhh
+
+recho aaa$'\177'bbb
+recho ccc""ddd
+recho "eeefff"
+recho ggg"$(echo $'\177')"hhh
diff --git a/tests/jobs.right b/tests/jobs.right
new file mode 100644
index 0000000..a4c8a7c
--- /dev/null
+++ b/tests/jobs.right
@@ -0,0 +1,105 @@
+./jobs2.sub: line 9: fg: job 1 started without job control
+fg: 1
+Waiting for job 0
+job 0 returns 0
+Waiting for job 1
+job 1 returns 0
+Waiting for job 2
+job 2 returns 0
+Waiting for job 3
+job 3 returns 0
+Waiting for job 4
+job 4 returns 0
+Waiting for job 5
+job 5 returns 0
+Waiting for job 6
+job 6 returns 0
+Waiting for job 7
+job 7 returns 0
+[1] Running sleep 5 &
+[2] Running sleep 5 &
+[3] Running sleep 5 &
+[4]- Running sleep 5 &
+[5]+ Running ( sleep 5; exit 4 ) &
+4
+0
+i killed it
+0
+./jobs.tests: line 19: wait: %1: no such job
+./jobs.tests: line 24: fg: no job control
+wait-for-pid
+wait-errors
+./jobs.tests: line 37: wait: `1-1': not a pid or valid job spec
+./jobs.tests: line 38: wait: `-4': not a pid or valid job spec
+wait-for-background-pids
+async list wait-for-background-pids
+async list wait for child
+forked
+wait-when-no-children
+wait-for-job
+./jobs.tests: line 60: wait: %2: no such job
+127
+async list wait-for-job
+forked
+fg-bg 1
+sleep 5
+fg-bg 2
+sleep 5
+fg-bg 3
+sleep 5
+fg-bg 4
+sleep 5
+fg-bg 5
+./jobs.tests: line 87: fg: %2: no such job
+./jobs.tests: line 88: bg: job 1 already in background
+fg-bg 6
+./jobs.tests: line 95: fg: -s: invalid option
+fg: usage: fg [job_spec]
+./jobs.tests: line 96: bg: -s: invalid option
+bg: usage: bg [job_spec ...]
+./jobs.tests: line 101: disown: -s: invalid option
+disown: usage: disown [-h] [-ar] [jobspec ...]
+./jobs.tests: line 105: disown: %1: no such job
+./jobs.tests: line 108: disown: %2: no such job
+wait-for-non-child
+./jobs.tests: line 111: wait: pid 1 is not a child of this shell
+127
+3 -- 1 2 3 -- 1 - 2 - 3
+[1] Running sleep 300 &
+[2]- Running sleep 350 &
+[3]+ Running sleep 400 &
+running jobs:
+[1] Running sleep 300 &
+[2]- Running sleep 350 &
+[3]+ Running sleep 400 &
+./jobs.tests: line 128: kill: %4: no such job
+./jobs.tests: line 130: jobs: %4: no such job
+current job:
+[3]+ Running sleep 400 &
+previous job:
+[2]- Running sleep 350 &
+after kill -STOP
+running jobs:
+[1] Running sleep 300 &
+[3]- Running sleep 400 &
+stopped jobs:
+[2]+ Stopped sleep 350
+after disown
+[2]+ Stopped sleep 350
+[3]- Running sleep 400 &
+running jobs:
+[3]- Running sleep 400 &
+stopped jobs:
+[2]+ Stopped sleep 350
+after kill -s CONT
+running jobs:
+[2]+ Running sleep 350 &
+[3]- Running sleep 400 &
+stopped jobs:
+after kill -STOP, backgrounding %3:
+[3]+ sleep 400 &
+killing...
+done
+after KILL -STOP, foregrounding %1
+sleep 10
+done
diff --git a/tests/jobs.tests b/tests/jobs.tests
new file mode 100644
index 0000000..e2acba5
--- /dev/null
+++ b/tests/jobs.tests
@@ -0,0 +1,185 @@
+# test out %+, jobs -p, and $! agreement in a subshell first
+${THIS_SH} ./jobs1.sub
+
+# test out fg/bg failure in a subshell
+${THIS_SH} ./jobs2.sub
+
+# test out behavior of waiting for background pids -- bug in versions
+# before 2.03
+${THIS_SH} ./jobs3.sub
+
+# test out behavior of using job control notation when job control is not
+# active
+${THIS_SH} ./jobs4.sub
+
+jobs
+echo $?
+
+# a no-such-job error, since we can use job control notation without job control
+wait %1
+
+# make sure we can't fg a job started when job control was not active
+sleep 30 &
+pid=$!
+fg %1
+# make sure the killed processes don't cause a message
+exec 5>&2
+exec 2>/dev/null
+kill -n 9 $pid
+wait # make sure we reap the processes while stderr is still redirected
+exec 2>&5
+
+echo wait-for-pid
+sleep 10 &
+wait $!
+
+echo wait-errors
+wait 1-1
+wait -- -4
+
+echo wait-for-background-pids
+sleep 5 &
+sleep 8 &
+wait
+
+echo async list wait-for-background-pids
+sleep 5 & sleep 8 &
+wait
+
+echo async list wait for child
+sleep 5 & echo forked
+wait
+
+echo wait-when-no-children
+wait
+
+set -m
+
+echo wait-for-job
+sleep 5 &
+wait %2 # this should be a no-such-job error
+echo $?
+wait %1
+
+echo async list wait-for-job
+sleep 5 & echo forked
+wait %1
+
+echo fg-bg 1
+sleep 5 &
+%1
+
+echo fg-bg 2
+sleep 5 &
+fg %%
+
+echo fg-bg 3
+sleep 5 &
+fg %s
+
+echo fg-bg 4
+sleep 5 &
+fg %?ee
+
+# these next two are error cases
+echo fg-bg 5
+sleep 15 &
+fg %2 # this should be a no-such-job error
+bg %1 # this should be a `bg background job?' error
+wait
+
+# these may someday mean to start the jobs, but not print the line
+# describing the status, but for now they are errors
+echo fg-bg 6
+sleep 5 &
+fg -s %1
+bg -s %1
+wait
+
+# someday this may mean to disown all stopped jobs, but for now it is
+# an error
+disown -s
+
+# this is an error -- the job with the pid that is the value of $! is
+# retained only until a `wait' is performed
+disown %1
+
+# this, however, is an error
+disown %2
+
+echo wait-for-non-child
+wait 1
+echo $?
+
+exit 1 | exit 2 | exit 3
+echo $? -- ${PIPESTATUS[@]} -- ${PIPESTATUS[0]} - ${PIPESTATUS[1]} - ${PIPESTATUS[2]}
+
+sleep 300 &
+sleep300pid=$!
+sleep 350 &
+sleep 400 &
+
+jobs
+
+echo running jobs:
+jobs -r
+
+# should be an error
+kill -n 1 %4
+# should be an error
+jobs %4
+echo current job:
+jobs %+
+echo previous job:
+jobs %-
+
+kill -STOP %2
+sleep 5 # give time for the shell to get the stop notification
+echo after kill -STOP
+echo running jobs:
+jobs -r
+echo stopped jobs:
+jobs -s
+
+disown %1
+
+echo after disown
+jobs
+echo running jobs:
+jobs -r
+echo stopped jobs:
+jobs -s
+
+kill -s CONT %2
+echo after kill -s CONT
+echo running jobs:
+jobs -r
+echo stopped jobs:
+jobs -s
+
+kill -STOP %3
+sleep 5 # give time for the shell to get the stop notification
+echo after kill -STOP, backgrounding %3:
+bg %3
+
+disown -h %2
+
+# make sure the killed processes don't cause a message
+exec 5>&2
+exec 2>/dev/null
+
+echo killing...
+kill -n 9 $sleep300pid
+kill -n 9 %2 %3
+wait # make sure we reap the processes while stderr is still redirected
+echo done
+
+exec 2>&5
+
+sleep 10 &
+kill -STOP %1
+sleep 5 # give time for the shell to get the stop notification
+echo after KILL -STOP, foregrounding %1
+fg %1
+
+echo done
diff --git a/tests/jobs1.sub b/tests/jobs1.sub
new file mode 100644
index 0000000..aa9a372
--- /dev/null
+++ b/tests/jobs1.sub
@@ -0,0 +1,17 @@
+# make sure that jobs -p, %+, and $! all agree
+set -m
+sleep 60 &
+
+FN=/tmp/jobs-pid.$$
+
+pid1=$!
+jobs -p %+ > $FN
+pid2=$(< $FN)
+rm $FN
+
+if [ $pid1 -ne $pid2 ]; then
+ echo 'oops - $! and jobs -p %+ disagree!'
+fi
+
+exec 2>/dev/null
+kill -9 $pid1
diff --git a/tests/jobs2.sub b/tests/jobs2.sub
new file mode 100644
index 0000000..496519b
--- /dev/null
+++ b/tests/jobs2.sub
@@ -0,0 +1,13 @@
+# make sure fg and bg don't work on jobs started without job control,
+# even if they are executed when job control is active
+set +o monitor
+
+sleep 30 &
+pid=$!
+
+set -m
+fg %1
+echo fg: $?
+
+exec 2>/dev/null
+kill -9 $pid
diff --git a/tests/jobs3.sub b/tests/jobs3.sub
new file mode 100644
index 0000000..6efd58b
--- /dev/null
+++ b/tests/jobs3.sub
@@ -0,0 +1,26 @@
+#! /bin/bash
+NJOB=8
+i=0
+
+while [ $i -lt $NJOB ]
+do
+ /bin/sh -c "sleep 4; exit 0" &
+ rv=$?
+ pid=$!
+ eval bg_pid_$i=$pid
+# echo $$: Job $i: pid is $pid rv=$rv
+ i=$((i + 1))
+done
+
+
+
+i=0
+while [ $i -lt $NJOB ]
+do
+ eval wpid=\$bg_pid_$i
+ echo Waiting for job $i #'('pid $wpid')'
+ wait $wpid
+ rv=$?
+ echo job $i returns $rv
+ i=$((i + 1))
+done
diff --git a/tests/jobs4.sub b/tests/jobs4.sub
new file mode 100644
index 0000000..2eb4197
--- /dev/null
+++ b/tests/jobs4.sub
@@ -0,0 +1,24 @@
+# test being able to use job control notation in jobs/kill/wait without
+# job control active, as the SUS requires
+
+sleep 5 &
+
+sleep 5 &
+sleep 5 &
+sleep 5 &
+(sleep 5 ; exit 4) &
+
+jobs
+
+wait %%
+echo $?
+
+wait %1
+echo $?
+
+wait
+
+# the sleep is intended to give the kill time to execute before the job
+# exits
+(sleep 1 ; cat ) &
+kill -1 %% && echo i killed it || echo could not kill it
diff --git a/tests/mapfile.data b/tests/mapfile.data
new file mode 100644
index 0000000..4f1d3ce
--- /dev/null
+++ b/tests/mapfile.data
@@ -0,0 +1,17 @@
+[0] Abcdefghijklmnop
+[1] aBcdefghijklmnop
+[2] abCdefghijklmnop
+[3] abcDefghijklmnop
+[4] abcdEfghijklmnop
+[5] abcdeFghijklmnop
+[6] abcdefGhijklmnop
+[7] abcdefgHijklmnop
+[8] abcdefghIjklmnop
+[9] abcdefghiJklmnop
+[a] abcdefghijKlmnop
+[b] abcdefghijkLmnop
+[c] abcdefghijklMnop
+[d] abcdefghijklmNop
+[e] abcdefghijklmnOp
+[f] abcdefghijklmnoP
+a \ No newline at end of file
diff --git a/tests/mapfile.right b/tests/mapfile.right
new file mode 100644
index 0000000..1e73eb1
--- /dev/null
+++ b/tests/mapfile.right
@@ -0,0 +1,138 @@
+[0] Abcdefghijklmnop
+[1] aBcdefghijklmnop
+[2] abCdefghijklmnop
+[3] abcDefghijklmnop
+[4] abcdEfghijklmnop
+[5] abcdeFghijklmnop
+[6] abcdefGhijklmnop
+[7] abcdefgHijklmnop
+[8] abcdefghIjklmnop
+[9] abcdefghiJklmnop
+[a] abcdefghijKlmnop
+[b] abcdefghijkLmnop
+[c] abcdefghijklMnop
+[d] abcdefghijklmNop
+[e] abcdefghijklmnOp
+[f] abcdefghijklmnoP
+a[0] Abcdefghijklmnop
+[1] aBcdefghijklmnop
+[2] abCdefghijklmnop
+[3] abcDefghijklmnop
+[4] abcdEfghijklmnop
+[5] abcdeFghijklmnop
+[6] abcdefGhijklmnop
+[7] abcdefgHijklmnop
+[8] abcdefghIjklmnop
+[9] abcdefghiJklmnop
+[a] abcdefghijKlmnop
+[b] abcdefghijkLmnop
+[c] abcdefghijklMnop
+[d] abcdefghijklmNop
+[e] abcdefghijklmnOp
+[f] abcdefghijklmnoP
+a
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+2
+5
+8
+11
+14
+[0] Abcdefghijklmnop
+[1] aBcdefghijklmnop
+[2] abCdefghijklmnop
+[3] abcDefghijklmnop
+[4] abcdEfghijklmnop
+[5] abcdeFghijklmnop
+[6] abcdefGhijklmnop
+[7] abcdefgHijklmnop
+[8] abcdefghIjklmnop
+[9] abcdefghiJklmnop
+[a] abcdefghijKlmnop
+[b] abcdefghijkLmnop
+[c] abcdefghijklMnop
+[d] abcdefghijklmNop
+[e] abcdefghijklmnOp
+[f] abcdefghijklmnoP
+a
+[0] aaa
+[1] aaa
+[2] aaa
+[3] aaa
+[4] aaa
+[5] aaa
+[6] aaa
+[7] aaa
+[8] aaa
+[9] aaa
+[0] Abcdefghijklmnop
+[1] aBcdefghijklmnop
+[2] abCdefghijklmnop
+[3] abcDefghijklmnop
+[4] abcdEfghijklmnop
+[5] abcdeFghijklmnop
+[6] abcdefGhijklmnop
+[7] abcdefgHijklmnop
+[8] abcdefghIjklmnop
+[9] abcdefghiJklmnop
+[a] abcdefghijKlmnop
+[b] abcdefghijkLmnop
+[c] abcdefghijklMnop
+[d] abcdefghijklmNop
+[e] abcdefghijklmnOp
+[f] abcdefghijklmnoP
+a
+[27] aaa
+[28] aaa
+[29] aaa
+[0] aaa
+[1] aaa
+[2] aaa
+[3] aaa
+[4] aaa
+[5] aaa
+[6] aaa
+[7] aaa
+[8] aaa
+[9] aaa
+[0] Abcdefghijklmnop
+[1] aBcdefghijklmnop
+[2] abCdefghijklmnop
+[3] abcDefghijklmnop
+[4] abcdEfghijklmnop
+[15] aaa
+[16] aaa
+[17] aaa
+[18] aaa
+[19] aaa
+[20] aaa
+[21] aaa
+[22] aaa
+[23] aaa
+[24] aaa
+[25] aaa
+[26] aaa
+[27] aaa
+[28] aaa
+[29] aaa
+1 2 3 4 5
+foo 0
+foo 1
+foo 2
+foo 3
+foo 4
diff --git a/tests/mapfile.tests b/tests/mapfile.tests
new file mode 100644
index 0000000..a9170c1
--- /dev/null
+++ b/tests/mapfile.tests
@@ -0,0 +1,42 @@
+declare -a A
+mapfile A < mapfile.data
+for (( i = 0 ; i < ${#A[@]} ; i++ )); do
+ echo -n "${A[${i}]}"
+done
+
+declare -a B
+mapfile -t B < mapfile.data
+for (( i = 0 ; i < ${#B[@]} ; i++ )); do
+ echo "${B[${i}]}"
+done
+
+mapfile -C "echo" -c 1 A < mapfile.data
+mapfile -C "echo" -c 3 A < mapfile.data
+mapfile -C "echo" -c 19 A < mapfile.data
+
+declare -a C
+mapfile -t -u 3 C 3< mapfile.data < mapfile.tests
+for (( i = 0 ; i < ${#C[@]} ; i++ )); do
+ echo "${C[${i}]}"
+done
+
+
+declare -a D
+for (( i = 0 ; i < 30; i++ )); do
+ D[${i}]="[$i] aaa"
+done
+mapfile -O 10 -t D < mapfile.data
+for (( i = 0 ; i < ${#D[@]} ; i++ )); do
+ echo "${D[${i}]}"
+done
+
+declare -a E
+for (( i = 0 ; i < 30; i++ )); do
+ E[${i}]="[$i] aaa"
+done
+mapfile -O 10 -n 5 -t E < mapfile.data
+for (( i = 0 ; i < ${#E[@]} ; i++ )); do
+ echo "${E[${i}]}"
+done
+
+${THIS_SH} ./mapfile1.sub
diff --git a/tests/mapfile1.sub b/tests/mapfile1.sub
new file mode 100644
index 0000000..b3d77f9
--- /dev/null
+++ b/tests/mapfile1.sub
@@ -0,0 +1,11 @@
+: ${TMPDIR:=/tmp}
+FILE=$TMPDIR/file
+
+trap 'rm -f $FILE' 0 1 2 3 6 15
+printf "%d\n" {1..20} > $FILE
+
+mapfile -n 5 array < $FILE
+echo ${array[@]}
+
+mapfile -n 5 -c 1 -C "echo foo" array < $FILE
+mapfile -n 5 -c 1 -C "echo foo" array < /dev/null
diff --git a/tests/misc/dev-tcp.tests b/tests/misc/dev-tcp.tests
new file mode 100644
index 0000000..0f3a228
--- /dev/null
+++ b/tests/misc/dev-tcp.tests
@@ -0,0 +1,16 @@
+exec 9<>/dev/tcp/129.22.8.162/25
+
+read banner <&9
+echo "$banner"
+
+echo quit >&9
+
+read msg <&9
+echo "$msg"
+
+exec 9<&-
+
+# nifty date command that queries the date/time server
+cat < /dev/tcp/129.22.8.102/13
+
+exit 0
diff --git a/tests/misc/perf-script b/tests/misc/perf-script
new file mode 100644
index 0000000..e1172a9
--- /dev/null
+++ b/tests/misc/perf-script
@@ -0,0 +1,81 @@
+#!/bin/bash
+
+typeset -i m2 m1 M n2 n1 N m n
+typeset -i MM=5 NN=5
+
+case $# in
+ 0) :
+ ;;
+ 1) MM=$1; NN=$1
+ ;;
+ 2) MM=$1; NN=$2
+ ;;
+ *) echo 1>&2 "Usage: $0 [m [n]]"
+ ;;
+esac
+
+EMPTYLINE=: # echo
+echo 'a = { ' # mathematica
+
+let "M=1" # for (M=1; M<=MM; M++)
+while let "M <= MM"; do
+ let "N=1" # for (N=1; N<=NN; N++)
+ while let "N <= NN"; do
+
+ let "m1 = M - 1"
+ let "m2 = M + 1"
+ let "n1 = N - 1"
+ let "n2 = N + 1"
+
+
+ echo -n '{ ' # math
+ let "m=1" # for(m=1; m<=MM; m++)
+ while let "m <= MM"; do
+ let "n=1" # for(n=1; n<=NN; n++)
+ while let "n <= NN"; do
+
+ let "x = (m-m1)*(m-M)*(m-m2)"
+ let "y = (n-n1)*(n-N)*(n-n2)"
+
+ if let "(x*x + (n-N)*(n-N)) * ((m-M)*(m-M) + y*y)"; then
+ echo -n "0,"
+ else # neighbour
+ echo -n "1,"
+ fi
+
+ let "n=n+1"
+ done
+ echo -n " "; let "m=m+1" # ". "
+ done
+ echo '},'
+
+
+ let "N=N+1"
+ $EMPTYLINE
+ done
+ $EMPTYLINE
+ let "M=M+1"
+done
+
+echo '}'
+
+
+
+echo -n 'o = { '
+let "m=1"
+while let "m <= MM"; do
+ let "n=1"
+ while let "n <= NN"; do
+ echo -n "1,"
+ let "n=n+1"
+ done
+ let "m=m+1"
+done
+echo " }"
+
+
+echo 'x = LinearSolve[a,o] '
+
+exit 0
+
+
diff --git a/tests/misc/perftest b/tests/misc/perftest
new file mode 100644
index 0000000..ee3f2c6
--- /dev/null
+++ b/tests/misc/perftest
@@ -0,0 +1,10 @@
+# originally from Mike Haertel
+foo() { case $1 in a*) ;; *) ;; esac ;}
+bar() { case $1 in [abc]*) ;; *);; esac ;}
+baz() { case $1 in xyzzy) ;; *) ;; esac ;}
+for x in /usr/lib/*/*
+do
+ foo $x
+ bar $x
+ baz $x
+done
diff --git a/tests/misc/read-nchars.tests b/tests/misc/read-nchars.tests
new file mode 100644
index 0000000..40b1f98
--- /dev/null
+++ b/tests/misc/read-nchars.tests
@@ -0,0 +1,11 @@
+# interactive
+
+# from tty
+read -n 3 -p 'enter three chars: ' xyz
+echo
+echo $xyz
+
+# using readline
+read -p 'enter 3 chars: ' -e -n 3 abc
+# readline outputs a newline for us, so we don't need the extra echo
+echo $abc
diff --git a/tests/misc/redir-t2.sh b/tests/misc/redir-t2.sh
new file mode 100644
index 0000000..44b2624
--- /dev/null
+++ b/tests/misc/redir-t2.sh
@@ -0,0 +1,17 @@
+read line1
+
+echo read line 1 \"$line1\"
+
+exec 4<&0
+
+exec 0</dev/tty
+
+read line2
+
+echo line read from tty = \"$line2\"
+
+exec 0<&4
+
+read line3
+
+echo read line 3 \"$line3\"
diff --git a/tests/misc/run-r2.sh b/tests/misc/run-r2.sh
new file mode 100755
index 0000000..0321a1b
--- /dev/null
+++ b/tests/misc/run-r2.sh
@@ -0,0 +1 @@
+../../bash ./redir-t2.sh < /etc/passwd
diff --git a/tests/misc/sigint-1.sh b/tests/misc/sigint-1.sh
new file mode 100755
index 0000000..7b74c30
--- /dev/null
+++ b/tests/misc/sigint-1.sh
@@ -0,0 +1,9 @@
+echo before trap
+trap 'echo caught sigint' 2
+echo after trap
+
+for i in 1 2 3
+do
+ echo $i
+ sleep 5
+done
diff --git a/tests/misc/sigint-2.sh b/tests/misc/sigint-2.sh
new file mode 100755
index 0000000..69eaf56
--- /dev/null
+++ b/tests/misc/sigint-2.sh
@@ -0,0 +1,7 @@
+echo before loop
+
+for i in 1 2 3
+do
+ echo $i
+ sleep 5
+done
diff --git a/tests/misc/sigint-3.sh b/tests/misc/sigint-3.sh
new file mode 100755
index 0000000..2627fe6
--- /dev/null
+++ b/tests/misc/sigint-3.sh
@@ -0,0 +1,11 @@
+sleep 5 &
+sleep 5 &
+sleep 5 &
+
+echo wait 1
+wait
+
+echo wait 2
+wait
+
+exit
diff --git a/tests/misc/sigint-4.sh b/tests/misc/sigint-4.sh
new file mode 100755
index 0000000..587dd26
--- /dev/null
+++ b/tests/misc/sigint-4.sh
@@ -0,0 +1,13 @@
+trap 'echo sigint' 2
+
+sleep 5 &
+sleep 5 &
+sleep 5 &
+
+echo wait 1
+wait
+
+echo wait 2
+wait
+
+exit
diff --git a/tests/misc/test-minus-e.1 b/tests/misc/test-minus-e.1
new file mode 100644
index 0000000..77cc3f2
--- /dev/null
+++ b/tests/misc/test-minus-e.1
@@ -0,0 +1,9 @@
+touch .file
+while set -e ; test -r .file ; do
+ echo -n "stop loop? "
+ read reply
+ case "$reply" in
+ y*) rm .file non-dash-file ;;
+ esac
+ set +e
+done
diff --git a/tests/misc/test-minus-e.2 b/tests/misc/test-minus-e.2
new file mode 100644
index 0000000..f66966e
--- /dev/null
+++ b/tests/misc/test-minus-e.2
@@ -0,0 +1,11 @@
+touch .file
+set -e
+while set +e ; test -r .file ; do
+ echo -n "stop loop? [yes to quit] "
+ read reply
+ if [ "$reply" = yes ] ; then
+ rm .file non-dash-file
+ fi
+ set -e
+done
+rm -f .file
diff --git a/tests/misc/wait-bg.tests b/tests/misc/wait-bg.tests
new file mode 100644
index 0000000..95c98b0
--- /dev/null
+++ b/tests/misc/wait-bg.tests
@@ -0,0 +1,25 @@
+#! /bin/bash
+
+i=0
+while [ $i -lt $1 ]
+do
+ /bin/sh -c "sleep 4; exit 0" &
+ rv=$?
+ pid=$!
+ eval bg_pid_$i=$pid
+ echo $$: Job $i: pid is $pid rv=$rv
+ i=$((i + 1))
+done
+
+
+
+i=0
+while [ $i -lt $1 ]
+do
+ eval wpid=\$bg_pid_$i
+ echo Waiting for job $i '('pid $wpid')'
+ wait $wpid
+ rv=$?
+ echo Return value is $rv
+ i=$((i + 1))
+done
diff --git a/tests/more-exp.right b/tests/more-exp.right
new file mode 100644
index 0000000..91a375c
--- /dev/null
+++ b/tests/more-exp.right
@@ -0,0 +1,214 @@
+argv[1] = <aaa bbb ccc>
+argv[1] = <aaa bbb ccc>
+argv[1] = <baz:bar>
+argv[1] = <baz:bar>
+argv[1] = <aaa bbb ccc>
+argv[1] = <bar>
+argv[1] = <bar>
+argv[1] = <bar>
+argv[1] = <abcde>
+argv[1] = <abcde>
+argv[1] = <xyz>
+argv[1] = <a b>
+argv[2] = <c>
+argv[3] = <d>
+argv[4] = <e>
+argv[5] = <f>
+argv[1] = <a b>
+argv[1] = <a>
+argv[2] = <b>
+argv[1] = <a b>
+argv[2] = <c>
+argv[3] = <d>
+argv[4] = <e>
+argv[5] = <f>
+argv[1] = <a b>
+argv[2] = <c>
+argv[3] = <d>
+argv[4] = <e>
+argv[5] = <f>
+argv[1] = </usr/homes/chet>
+argv[1] = <~>
+argv[1] = <~>
+argv[1] = <\~>
+argv[1] = <\ \~>
+argv[1] = <\ \ \~>
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+argv[1] = <$HOME>
+argv[1] = <\ $HOME>
+argv[1] = <\ \ $HOME>
+argv[1] = <'bar'>
+argv[1] = <'bar'>
+argv[1] = <*@>
+argv[1] = <*@>
+argv[1] = <*@>
+argv[1] = <*@>
+argv[1] = <*@*>
+argv[1] = <*@*>
+argv[1] = <*@*>
+argv[1] = <*@*>
+argv[1] = <abcd>
+argv[1] = <efghijkl>
+argv[1] = <4>
+argv[2] = <2>
+argv[1] = <1>
+argv[1] = <bar>
+argv[1] = <2>
+argv[1] = <bar>
+argv[1] = <2>
+argv[1] = <4>
+argv[1] = <--\>
+argv[2] = <-->
+argv[1] = <--\^J-->
+argv[1] = <--+\>
+argv[2] = <+-->
+argv[1] = <--+\^J+-->
+argv[1] = <-+\>
+argv[2] = <+-\>
+argv[3] = <->
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <x>
+argv[1] = <x>
+argv[1] = <>
+argv[1] = <x>
+argv[1] = <x>
+argv[1] = <x>
+argv[1] = <x>
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = <x>
+argv[1] = <x>
+argv[1] = <>
+argv[2] = <abd>
+argv[3] = <x>
+argv[1] = <>
+argv[2] = <abd>
+argv[3] = <>
+argv[1] = <a,b,c,d,e,f>
+argv[1] = <a>
+argv[2] = <b>
+argv[3] = <c>
+argv[4] = <d>
+argv[5] = <e>
+argv[6] = <f>
+./more-exp.tests: line 272: abc=def: command not found
+argv[1] = <a b c d e>
+argv[1] = <a>
+argv[2] = <b>
+argv[3] = <c>
+argv[4] = <d>
+argv[5] = <e>
+argv[1] = <foo)>
+argv[1] = <a>
+argv[1] = <\a>
+argv[1] = <\a>
+argv[1] = <\a>
+argv[1] = <\a>
+argv[1] = <\\a>
+argv[1] = <a>
+argv[1] = <\a>
+argv[1] = <\a>
+argv[1] = <\a>
+argv[1] = <\a>
+argv[1] = <\\a>
+argv[1] = <a>
+argv[1] = <a>
+argv[1] = <\a>
+argv[1] = <\a>
+argv[1] = <\a>
+argv[1] = <\a>
+argv[1] = <$a>
+argv[1] = <\foo>
+argv[1] = <$a>
+argv[1] = <\foo>
+argv[1] = <\$a>
+argv[1] = <\\$a>
+argv[1] = <a>
+argv[1] = <a>
+argv[1] = <\a>
+argv[1] = <\a>
+argv[1] = <\a>
+argv[1] = <\a>
+argv[1] = <G>
+argv[2] = <{>
+argv[3] = <I>
+argv[4] = <K>
+argv[5] = <}>
+argv[1] = <hi>
+argv[2] = <K>
+argv[3] = <}>
+argv[1] = <a*>
+Number of args: 0
+<${*-x}>: <x>
+<${@-x}>: <x>
+Number of args: 1
+<${*-x}>: <>
+<${@-x}>: <>
+Number of args: 2
+<${*-x}>: < >
+<${@-x}>: < >
+argv[1] = <5>
+argv[1] = <5>
+argv[1] = <5>
+argv[1] = <5>
+argv[1] = <5>
+argv[1] = <0>
+argv[1] = <0>
+argv[1] = <0>
+argv[1] = <0>
+argv[1] = <0>
+argv[1] = <0>
+argv[1] = <posparams>
+argv[1] = <posparams>
+argv[1] = <2>
+argv[1] = <0>
+argv[1] = <0>
+argv[1] = <1>
+argv[1] = <5>
+argv[1] = <5>
+argv[1] = <0>
+./more-exp.tests: line 423: ${#:}: bad substitution
+./more-exp.tests: line 425: ${#/}: bad substitution
+./more-exp.tests: line 427: ${#%}: bad substitution
+./more-exp.tests: line 429: ${#=}: bad substitution
+./more-exp.tests: line 431: ${#+}: bad substitution
+./more-exp.tests: line 433: ${#1xyz}: bad substitution
+./more-exp.tests: line 436: #: %: syntax error: operand expected (error token is "%")
+argv[1] = <0>
+argv[1] = <a+b>
+argv[1] = <+>
+argv[1] = <+>
+argv[1] = <+>
+argv[1] = <G { I >
+argv[2] = <K>
+argv[3] = <}>
+argv[1] = <hi>
+argv[2] = <K>
+argv[3] = <}>
+argv[1] = <xxx>
+argv[2] = <yyy>
+1
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <:a:>
+argv[1] = <:b:>
+argv[1] = <>
+argv[1] = <>
diff --git a/tests/more-exp.tests b/tests/more-exp.tests
new file mode 100644
index 0000000..4a3cb7f
--- /dev/null
+++ b/tests/more-exp.tests
@@ -0,0 +1,504 @@
+expect()
+{
+ echo expect "$@"
+}
+
+tool_var() {
+ eval $1=\"\${$1:-$2}\"
+ export $1
+}
+
+A="aaa bbb ccc"
+
+unset B
+
+tool_var B ${B:-"$A"}
+
+expect '<aaa bbb ccc>'
+recho "$A"
+expect '<aaa bbb ccc>'
+recho "$B"
+
+eto_prepend() {
+ eval $1=\'$2\''${'$1':+":"${'$1'}}'; export $1
+}
+
+foo=bar; export foo
+eto_prepend foo baz
+expect '<baz:bar>'
+recho $foo
+expect '<baz:bar>'
+recho ${foo-"bar"}
+
+aa='aaa bbb ccc'
+
+expect '<aaa bbb ccc>'
+recho ${zzz-"$aa"}
+expect '<bar>'
+recho ${zzz:-"bar"}
+expect '<bar>'
+recho "${zzz:-bar}"
+expect '<bar>'
+recho "${zzz:-"bar"}"
+
+var=abcde
+expect '<abcde>'
+recho "${var:-xyz}"
+expect '<abcde>'
+recho "${var:=xyz}"
+expect '<xyz>'
+recho "${var:+xyz}"
+
+set 'a b' c d e f
+expect '<a b> <c> <d> <e> <f>'
+recho ${1+"$@"}
+expect '<a b>'
+recho "${1-"$@"}"
+expect '<a> <b>'
+recho ${1-"$@"}
+expect '<a b> <c> <d> <e> <f>'
+recho "${1+$@}"
+expect '<a b> <c> <d> <e> <f>'
+recho "${1+"$@"}"
+
+HOME=/usr/homes/chet
+somevar=
+expect "<$HOME>"
+recho ${somevar:-~}
+# This changed after bash-3.0, when the tilde implementation was redone. It's
+# not backward compatible, but it's very hard to be backward-compatible here,
+# and I think the old behavior was a bug
+expect '<~>'
+recho "${somevar:-~}"
+expect '<~>'
+recho "${somevar:-"~"}"
+expect '<\~>'
+recho "${somevar:-\~}"
+expect '<\ \~>'
+recho "${somevar:-\ \~}"
+expect '<\ \ \~>'
+recho "${somevar:-\ \ \~}"
+
+expect "<$HOME>"
+recho ${somevar:-$HOME}
+expect "<$HOME>"
+recho "${somevar:-$HOME}"
+expect "<$HOME>"
+recho "${somevar:-"$HOME"}"
+expect '<$HOME>'
+recho "${somevar:-\$HOME}"
+expect '<\ $HOME>'
+recho "${somevar:-\ \$HOME}"
+expect '<\ \ $HOME>'
+recho "${somevar:-\ \ \$HOME}"
+
+foo=bar
+expect "<'bar'>"
+recho "${foo+'$foo'}"
+expect "<'bar'>"
+recho "${fox='$foo'}"
+
+P='*@*'
+expect '<*@>'
+recho "${P%"*"}"
+expect '<*@>'
+recho "${P%'*'}"
+
+expect '<*@>'
+recho ${P%"*"}
+expect '<*@>'
+recho ${P%'*'}
+
+expect '<*@*>'
+recho ${P%""}
+expect '<*@*>'
+recho ${P#""}
+
+expect '<*@*>'
+recho ${P#"$foobar"}
+expect '<*@*>'
+recho ${P%"$foobar"}
+
+s1=abcdefghijkl
+s2=efgh
+
+first=${s1/$s2*/}
+expect '<abcd>'
+recho $first
+
+last=${s1##$first}
+expect '<efghijkl>'
+recho $last
+
+shift $#
+UNAME_RELEASE=${1:-4.2MP}
+
+RELEASE=`expr "$UNAME_RELEASE" : '[^0-9]*\([0-9]*\)'` # 4
+case "$RELEASE" in
+"") RELEASE=0 ;;
+*) RELEASE=`expr "$RELEASE" + 0` ;;
+esac
+REL_LEVEL=`expr "$UNAME_RELEASE" : '[^0-9]*[0-9]*.\([0-9]*\)'` # 1
+REL_SUBLEVEL=`expr "$UNAME_RELEASE" : '[^0-9]*[0-9]*.[0-9]*.\([0-9]*\)'` # 2
+
+expect '<4> <2>'
+recho $RELEASE $REL_LEVEL $REL_SUBLEVEL
+
+b1()
+{
+ b2 ${1+"$@"}
+}
+
+b2()
+{
+ recho $*
+ recho $#
+}
+
+expect '<1>'
+b1 ''
+
+expect '<bar> <2>'
+b1 bar ''
+
+expect '<bar> <2>'
+b1 '' bar
+
+expect '<4>'
+b1 '' '' '' ''
+
+NL="\\
+"
+
+NNL="+$NL+"
+
+expect '<--\> <-->'
+recho --$NL--
+expect '<--\^J-->'
+recho "--$NL--"
+
+expect '<--+\> <+-->'
+recho --$NNL--
+expect '<--+\^J+-->'
+recho "--$NNL--"
+
+expect '<-+\> <+-\> <->'
+recho -$NNL-$NL-
+
+set ''
+expect '<xy>'
+recho "$*xy"
+expect '<xy>'
+recho "x$*y"
+expect '<xy>'
+recho "xy$*"
+expect '<xy>'
+recho x"$*"y
+expect '<xy>'
+recho xy"$*"
+expect '<xy>'
+recho "$*"xy
+expect '<>'
+recho "$*"
+expect nothing
+recho $*
+
+unset undef ; set ""
+
+expect '<>'
+recho ${undef-"$*"}
+expect '<xy>'
+recho ${undef-"x$*y"}
+expect '<xy>'
+recho ${undef-"$*xy"}
+expect '<xy>'
+recho ${undef-"xy$*"}
+expect '<xy>'
+recho ${undef-x"$*"y}
+expect '<xy>'
+recho ${undef-xy"$*"}
+expect '<xy>'
+recho ${undef-"$*"xy}
+expect '<>'
+recho "${undef-$*}"
+expect nothing
+recho ${undef-$*}
+
+expect '<>'
+recho ${undef-"$zzz"}
+expect '<x>'
+recho x${undef-"$zzz"}
+expect '<x>'
+recho x${undef-"$@"}
+expect nothing
+recho ${undef-"$@"}
+expect '<x>'
+recho ${undef-"$zzz"}x
+expect '<x>'
+recho ${undef-"$@"}x
+expect '<x>'
+recho "$@"x
+expect '<x>'
+recho "$zzz"x
+expect '<^?>'
+recho ${undef-}
+expect '<^?>'
+recho ${undef-""}
+
+yyy=""
+recho "$xxx"x
+recho "$yyy"x
+
+set "" "abd" ""
+recho "$@"x
+recho "$@"$xxx
+
+OIFS="$IFS"
+
+arg=a,b,c,d,e,f
+
+IFS=,
+
+export z=$arg
+
+eval z1=\"$arg\"
+
+IFS="$OIFS"
+
+recho $z
+recho $z1
+
+# should give an error
+abc\=def
+
+zz="a b c d e"
+declare a=$zz
+
+recho "$a"
+recho $a
+
+recho $(echo "foo$(echo ")")")
+
+# test backslash escapes
+
+recho \a
+recho \\a
+
+recho "\a"
+recho "\\a"
+
+recho '\a'
+recho '\\a'
+
+recho $(zecho \a)
+recho $(zecho \\a)
+
+recho $(zecho "\a")
+recho $(zecho "\\a")
+
+recho $(zecho '\a')
+recho $(zecho '\\a')
+
+recho `zecho \a`
+recho `zecho \\a`
+
+recho `zecho "\a"`
+recho `zecho "\\a"`
+
+recho `zecho '\a'`
+recho `zecho '\\a'`
+
+a=foo
+
+recho \$a
+recho \\$a
+
+recho "\$a"
+recho "\\$a"
+
+recho '\$a'
+recho '\\$a'
+
+recho $(zecho `zecho \a`)
+recho $(zecho `zecho \\a`)
+
+recho $(zecho `zecho "\a"`)
+recho $(zecho `zecho "\\a"`)
+
+recho $(zecho `zecho '\a'`)
+recho $(zecho `zecho '\\a'`)
+
+# should echo G { I K }
+recho ${abc:-G { I } K }
+
+abc=hi
+
+# should echo hi K }
+recho ${abc:-G { I } K }
+
+# should echo a*
+unset foo
+recho "${foo:-"a"}*"
+
+f ()
+{
+ echo "Number of args: $#"
+ echo "<\${*-x}>: <${*-x}>"
+ echo "<\${@-x}>: <${@-x}>"
+}
+
+f
+f ''
+f '' ''
+
+set 1 2 3 4 5
+
+expect '<5>'
+recho ${#}
+expect '<5>'
+recho ${#:foo}
+expect '<5>'
+recho ${#:-foo}
+expect '<5>'
+recho ${#-posparams}
+expect '<5>'
+recho ${#:-posparams}
+
+expect '<0>'
+recho ${#!}
+
+expect nothing
+recho $!
+expect nothing
+recho ${!}
+
+expect nothing
+recho $8
+expect nothing
+recho ${8}
+
+shift $#
+
+expect '<0>'
+recho ${#}
+expect '<0>'
+recho ${#:foo}
+expect '<0>'
+recho ${#:-foo}
+expect '<0>'
+recho ${#-posparams}
+expect '<0>'
+recho ${#:-posparams}
+
+expect '<posparams>'
+recho ${!-posparams}
+expect '<posparams>'
+recho ${!:-posparams}
+
+expect '<2>'
+recho ${#-}
+
+expect '<0>'
+recho ${#-posparams}
+
+expect '<0>'
+recho ${#?:-xyz}
+
+expect '<1>'
+recho ${#?}
+
+set a b c d e
+
+expect '<5>'
+recho ${#}
+expect '<5>'
+recho ${#?:-xyz}
+
+shift $#
+
+expect '<0>'
+recho ${#:-foo}
+
+expect a bad substitution error
+recho ${#:}
+expect a bad substitution error
+recho ${#/}
+expect a bad substitution error
+recho ${#%}
+expect a bad substitution error
+recho ${#=}
+expect a bad substitution error
+recho ${#+}
+expect a bad substitution error
+recho ${#1xyz}
+
+expect a math syntax error
+recho ${#:%}
+
+expect '<0>'
+recho ${#:-}
+
+set --
+unset a b
+
+x=a
+y=b
+
+IFS=+
+
+expect '<a+b>'
+recho $x+$y
+expect '<+>'
+recho $a+$b
+
+expect '<+>'
+recho + "$@"
+expect '<+>'
+recho +"$@"
+
+# variants of nested curly braces inside ${...} expressions
+
+# IFS is not the standard one
+
+expect '<G { I>' '<K>' '<}>'
+recho ${gik:-G { I } K }
+
+abc=hi
+
+expect '<hi>' '<K>' '<}>'
+recho ${abc:-G { I } K }
+
+# reset IFS to the default
+IFS='
+'
+
+# nested ${...} inside ${...} are handled specially
+unset XXX FOO BAR
+expect '<xxx>' '<yyy>'
+XXX=xxx
+FOO=${BAR:-${XXX} yyy}
+recho $FOO
+
+# this was a bug in versions of bash prior to bash-2.04-release
+set -- ''
+expect 1
+echo $#
+expect '<>'
+recho "${@}"
+expect '<>'
+recho "${@-}"
+expect '<>'
+recho "${@:-}"
+
+# this was a bug in bash-2.04, fixed in 2.05
+set -- a b
+expect '<:a:>' '<:b:>'
+for i in "${@-}"; do recho :$i:; done
+
+# I believe that ksh93 does these wrong -- we're using the rhs, so shouldn't
+# it behave the same as ""?
+set --
+expect '<>'
+recho "${@-}"
+expect '<>'
+recho "${@:-}"
diff --git a/tests/new-exp.right b/tests/new-exp.right
new file mode 100644
index 0000000..c86c546
--- /dev/null
+++ b/tests/new-exp.right
@@ -0,0 +1,542 @@
+argv[1] = <foo bar>
+argv[1] = <foo>
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+./new-exp.tests: line 24: HOME: }: syntax error: operand expected (error token is "}")
+unset
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+argv[1] = </usr/homes/chet>
+argv[1] = <*@>
+argv[1] = <*@>
+argv[1] = <@*>
+argv[1] = <)>
+argv[1] = <")">
+argv[1] = <-abcd>
+argv[2] = <->
+argv[1] = <-abcd>
+argv[2] = <->
+argv[1] = <-abcd->
+bar foo
+bar foo
+bar foo
+barfoo
+barfoo
+\x
+argv[1] = <abcd>
+argv[1] = <efg>
+argv[2] = <nop>
+argv[1] = <efg>
+argv[2] = <nop>
+argv[1] = <hijklmnop>
+argv[1] = <abcdefghijklmnop>
+argv[1] = <abcdefghijklmnop>
+argv[1] = <ab cd>
+argv[2] = <ef>
+argv[1] = <gh ij>
+argv[2] = <kl mn>
+argv[1] = <gh ij>
+argv[2] = <kl mn>
+argv[3] = <op>
+argv[1] = <ab cd>
+argv[2] = <ef>
+argv[3] = <gh ij>
+argv[4] = <kl mn>
+argv[5] = <op>
+argv[1] = </home/chet/foo//bar/abcabcabc>
+argv[1] = <home/chet/foo//bar/abcabcabc>
+argv[1] = <home>
+argv[1] = <home>
+argv[1] = <home>
+argv[1] = <home>
+argv[1] = <abcdefghijklmnop>
+argv[1] = <4>
+argv[1] = <op>
+argv[1] = <abcdefghijklmnop>
+argv[1] = <abcdefghijklmnop>
+./new-exp.tests: line 172: ABX: unbound variable
+./new-exp.tests: line 176: $6: cannot assign in this way
+argv[1] = <xxcde>
+argv[1] = <axxde>
+argv[1] = <abxyz>
+argv[1] = <abbcde>
+argv[1] = <abcde>
+argv[1] = <abcabe>
+argv[1] = <abcdlast>
+argv[1] = <abcde>
+argv[1] = <xxcd>
+argv[1] = <abxx>
+argv[1] = <xxgh>
+argv[1] = <efgh>
+argv[1] = <xxfgh>
+argv[1] = <zagh>
+argv[1] = <zaza>
+argv[1] = <zagh>
+argv[1] = <efza>
+argv[1] = <yyy>
+argv[2] = <yyy>
+argv[3] = <yyy>
+argv[4] = <yyy>
+argv[5] = <yyy>
+argv[6] = <yyy>
+argv[1] = <yyy>
+argv[2] = <yyy>
+argv[3] = <yyy>
+argv[4] = <yyy>
+argv[5] = <yyy>
+argv[6] = <yyy>
+argv[1] = <yyy>
+argv[2] = <yyy>
+argv[3] = <yyy>
+argv[4] = <yyy>
+argv[5] = <yyy>
+argv[6] = <yyy>
+argv[1] = <yyy>
+argv[2] = <efgh>
+argv[3] = <ijkl>
+argv[4] = <mnop>
+argv[5] = <qrst>
+argv[6] = <uvwx>
+argv[1] = <abxx>
+argv[2] = <efxx>
+argv[3] = <ijxx>
+argv[4] = <mnxx>
+argv[5] = <qrxx>
+argv[6] = <uvxx>
+argv[1] = <xxcd>
+argv[1] = <xxcd>
+argv[2] = <xxgh>
+argv[3] = <xxkl>
+argv[4] = <xxop>
+argv[5] = <xxst>
+argv[6] = <xxwx>
+argv[1] = <abxx>
+argv[2] = <efxx>
+argv[3] = <ijxx>
+argv[4] = <mnxx>
+argv[5] = <qrxx>
+argv[6] = <uvxx>
+argv[1] = <zaza>
+argv[1] = <ijza>
+argv[1] = <zaza>
+argv[2] = <zaza>
+argv[3] = <zaza>
+argv[4] = <zaza>
+argv[5] = <zaza>
+argv[6] = <zaza>
+argv[1] = <zacd>
+argv[2] = <zagh>
+argv[3] = <zakl>
+argv[4] = <zaop>
+argv[5] = <zast>
+argv[6] = <zawx>
+argv[1] = <yyy>
+argv[2] = <yyy>
+argv[3] = <yyy>
+argv[4] = <yyy>
+argv[5] = <yyy>
+argv[6] = <yyy>
+argv[1] = <yyy>
+argv[2] = <efgh>
+argv[3] = <ijkl>
+argv[4] = <mnop>
+argv[5] = <qrst>
+argv[6] = <uvwx>
+argv[1] = <abcd>
+argv[2] = <efgh>
+argv[3] = <ijkl>
+argv[4] = <mnop>
+argv[5] = <qrst>
+argv[6] = <uvwyyy>
+
+This
+string
+has
+multiple
+lines.
+This-string-has-multiple-lines.
+this is a test of proc subst
+this is test 2
+./new-exp2.sub: line 31: /tmp/bashtmp.x*: No such file or directory
+./new-exp2.sub: line 35: /tmp/redir-notthere: No such file or directory
+1
+argv[1] = <6>
+./new-exp.tests: line 277: ${#:}: bad substitution
+argv[1] = <'>
+argv[1] = <">
+argv[1] = <"hello">
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <abcdef>
+argv[1] = <abc def>
+argv[1] = <abcdef>
+argv[1] = <abc>
+argv[2] = <def>
+argv[1] = <abcdef>
+argv[1] = <abc def>
+argv[1] = <abcdef>
+argv[1] = <abc def>
+argv[1] = <ab>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[4] = <gh>
+argv[1] = <ab>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[4] = <gh>
+argv[1] = <ab>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[4] = <gh>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <hijklmnopqrstuv>
+argv[1] = <pqrstuv>
+argv[1] = <uvwxyz>
+argv[1] = <abcdefghijklmnopqrstuvwxyz>
+argv[1] = <abcdefghijklmnopqrst>
+argv[1] = <klmnopq>
+argv[1] = <klmnopq>
+argv[1] = <klmnopq>
+argv[1] = <"2 3">
+argv[1] = <"2:3">
+argv[1] = <"34">
+argv[1] = <"3456">
+argv[1] = <"3456">
+argv[1] = <"3456">
+argv[1] = <^A>
+argv[2] = <^B>
+argv[3] = <^?>
+argv[1] = <^A>
+argv[2] = <^B>
+argv[3] = <^?>
+argv[1] = <^A>
+argv[2] = <^B>
+argv[3] = <^?>
+argv[1] = <^A>
+argv[2] = <^B>
+argv[3] = <^?>
+argv[1] = <one/two>
+argv[1] = <one/two>
+argv[1] = <two>
+argv[1] = <oneonetwo>
+argv[1] = <onetwo>
+argv[1] = <two>
+argv[1] = <oneonetwo>
+./new-exp.tests: line 421: -2: substring expression < 0
+argv[1] = <defghi>
+argv[1] = <efghi>
+argv[1] = <e*docrine>
+argv[1] = <e*docri*e>
+argv[1] = <endocrine>
+argv[1] = <endocrine>
+argv[1] = <endocrine>
+argv[1] = <endocrine>
+argv[1] = <endocrine>
+argv[1] = <endocrine>
+argv[1] = </usr/bin>
+argv[2] = </bin>
+argv[3] = </usr/local/bin>
+argv[4] = </usr/gnu/bin>
+argv[5] = </usr/bin/X11>
+argv[6] = </sbin>
+argv[7] = </usr/sbin>
+argv[1] = <r>
+argv[2] = <s>
+argv[3] = <t>
+argv[4] = <u>
+argv[5] = <v>
+argv[6] = <w>
+argv[7] = <x>
+argv[8] = <y>
+argv[9] = <z>
+argv[1] = <r>
+argv[2] = <s>
+argv[3] = <t>
+argv[4] = <u>
+argv[5] = <v>
+argv[6] = <w>
+argv[7] = <x>
+argv[8] = <y>
+argv[9] = <z>
+argv[1] = <r>
+argv[2] = <s>
+argv[3] = <t>
+argv[4] = <u>
+argv[5] = <v>
+argv[6] = <w>
+argv[7] = <x>
+argv[8] = <y>
+argv[9] = <z>
+argv[1] = <r>
+argv[2] = <s>
+argv[3] = <t>
+argv[4] = <u>
+argv[5] = <v>
+argv[6] = <w>
+argv[7] = <x>
+argv[8] = <y>
+argv[9] = <z>
+argv[1] = <a>
+argv[2] = <a>
+argv[3] = <a>
+argv[4] = <a>
+argv[5] = <a>
+argv[6] = <a>
+argv[7] = <a>
+argv[8] = <a>
+argv[9] = <a>
+argv[1] = <a>
+argv[2] = <a>
+argv[3] = <a>
+argv[4] = <a>
+argv[5] = <a>
+argv[6] = <a>
+argv[7] = <a>
+argv[8] = <a>
+argv[9] = <a>
+argv[1] = <r>
+argv[2] = <s>
+argv[3] = <t>
+argv[4] = <u>
+argv[5] = <v>
+argv[6] = <w>
+argv[7] = <x>
+argv[8] = <y>
+argv[9] = <z>
+argv[1] = <r>
+argv[2] = <s>
+argv[3] = <t>
+argv[4] = <u>
+argv[5] = <v>
+argv[6] = <w>
+argv[7] = <x>
+argv[8] = <y>
+argv[9] = <z>
+argv[1] = <r>
+argv[2] = <s>
+argv[3] = <t>
+argv[4] = <u>
+argv[5] = <v>
+argv[6] = <w>
+argv[7] = <x>
+argv[8] = <y>
+argv[9] = <z>
+argv[1] = <r>
+argv[2] = <s>
+argv[3] = <t>
+argv[4] = <u>
+argv[5] = <v>
+argv[6] = <w>
+argv[7] = <x>
+argv[8] = <y>
+argv[9] = <z>
+argv[1] = <r>
+argv[2] = <s>
+argv[3] = <t>
+argv[4] = <u>
+argv[5] = <v>
+argv[6] = <w>
+argv[7] = <x>
+argv[8] = <y>
+argv[9] = <z>
+argv[1] = <r>
+argv[2] = <s>
+argv[3] = <t>
+argv[4] = <u>
+argv[5] = <v>
+argv[6] = <w>
+argv[7] = <x>
+argv[8] = <y>
+argv[9] = <z>
+argv[1] = <a>
+argv[2] = <a>
+argv[3] = <a>
+argv[4] = <a>
+argv[5] = <a>
+argv[6] = <a>
+argv[7] = <a>
+argv[8] = <a>
+argv[9] = <a>
+argv[1] = <a>
+argv[2] = <a>
+argv[3] = <a>
+argv[4] = <a>
+argv[5] = <a>
+argv[6] = <a>
+argv[7] = <a>
+argv[8] = <a>
+argv[9] = <a>
+argv[1] = <r>
+argv[2] = <s>
+argv[3] = <t>
+argv[4] = <u>
+argv[5] = <v>
+argv[6] = <w>
+argv[7] = <x>
+argv[8] = <y>
+argv[9] = <z>
+argv[1] = <r>
+argv[2] = <s>
+argv[3] = <t>
+argv[4] = <u>
+argv[5] = <v>
+argv[6] = <w>
+argv[7] = <x>
+argv[8] = <y>
+argv[9] = <z>
+./new-exp.tests: line 480: $9: unbound variable
+./new-exp.tests: line 481: 9: unbound variable
+./new-exp.tests: line 482: UNSET: unbound variable
+./new-exp.tests: line 483: UNSET: unbound variable
+./new-exp.tests: line 484: UNSET: unbound variable
+./new-exp.tests: line 485: UNSET: unbound variable
+./new-exp.tests: line 486: UNSET: unbound variable
+argv[1] = <5>
+argv[1] = <#>
+argv[1] = <#>
+argv[1] = <>
+argv[1] = <_QUANTITY>
+argv[2] = <_QUART>
+argv[3] = <_QUEST>
+argv[4] = <_QUILL>
+argv[5] = <_QUOTA>
+argv[6] = <_QUOTE>
+argv[1] = <_QUANTITY>
+argv[2] = <_QUART>
+argv[3] = <_QUEST>
+argv[4] = <_QUILL>
+argv[5] = <_QUOTA>
+argv[6] = <_QUOTE>
+argv[1] = <_QUANTITY-_QUART-_QUEST-_QUILL-_QUOTA-_QUOTE>
+./new-exp3.sub: line 19: ${!_Q* }: bad substitution
+./new-exp3.sub: line 24: ${!1*}: bad substitution
+./new-exp3.sub: line 26: ${!@*}: bad substitution
+Case01---3---A:B:C---
+Case02---1---A B C::---
+Case03---3---A:B:C---
+Case04---3---A:B:C---
+Case05---3---A:B:C---
+Case06---1---A B C::---
+Case07---3---A:B:C---
+Case08---3---A:B:C---
+./new-exp.tests: line 506: ${$(($#-1))}: bad substitution
+argv[1] = <a>
+argv[2] = <b>
+argv[3] = <c>
+argv[4] = <d>
+argv[5] = <e>
+argv[6] = <f>
+argv[7] = <g>
+argv[1] = <a>
+argv[2] = <b>
+argv[3] = <c>
+argv[4] = <d>
+argv[5] = <e>
+argv[1] = <a>
+argv[1] = <a>
+argv[2] = <b>
+argv[1] = <>
+./new-exp.tests: line 525: $(($# - 2)): substring expression < 0
+argv[1] = <bin>
+argv[2] = <bin>
+argv[3] = <ucb>
+argv[4] = <bin>
+argv[5] = <.>
+argv[6] = <sbin>
+argv[7] = <sbin>
+argv[1] = </>
+argv[2] = </>
+argv[3] = </>
+argv[4] = </>
+argv[5] = </>
+argv[6] = </>
+argv[1] = <bin>
+argv[2] = <usr/bin>
+argv[3] = <usr/ucb>
+argv[4] = <usr/local/bin>
+argv[5] = <.>
+argv[6] = <sbin>
+argv[7] = <usr/sbin>
+argv[1] = </bin>
+argv[2] = </usr/bin>
+argv[3] = </usr/ucb>
+argv[4] = </usr/local/bin>
+argv[5] = <.>
+argv[6] = </sbin>
+argv[7] = </usr/sbin>
+argv[1] = </full/path/to>
+argv[1] = </>
+argv[1] = <full/path/to/x16>
+argv[1] = <x16>
+two
+one
+ne
+one
+
+one
+one
+one
+1 2 3 4 5 6 7 8 9
+9
+9
+0
+9
+8 9
+123456789
+9
+9
+4, A B C D
+2, C D
+h
+h
+--blah
+--blah
+lah
+lah
+abcde abcfg abchi
+foode foofg foohi
+argv[1] = <>
+argv[1] = <+>
+argv[1] = <+^?>
+argv[1] = <+>
+argv[1] = <^?2>
+argv[1] = <^?2>
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <12>
+argv[1] = <>
+argv[1] = <>
+argv[1] = </tmp/test/TEST>
+foo is a function
+foo ()
+{
+ echo < <(cat x1)
+}
+foo ()
+{
+ echo < <(cat x1)
+}
+bar () { echo < <(cat x1) }
+bar is a function
+bar ()
+{
+ echo < <(cat x1)
+}
+argv[1] = </>
+argv[1] = </>
+./new-exp.tests: line 576: ABXD: parameter unset
diff --git a/tests/new-exp.tests b/tests/new-exp.tests
new file mode 100644
index 0000000..8c43b66
--- /dev/null
+++ b/tests/new-exp.tests
@@ -0,0 +1,576 @@
+# must do this because posix mode causes process substitution to be disabled
+# and flagged as a syntax error, which causes the shell to exit
+set +o posix
+
+expect()
+{
+ echo expect "$@"
+}
+
+HOME=/usr/homes/chet # to make the check against new-exp.right work
+expect '<foo bar>'
+recho "${undef-"foo bar"}" # should be foo bar
+expect '<foo>'
+recho "${und="foo"}" # should be foo
+
+expect "<$HOME>"
+recho ${HOME-"}"}
+expect "<$HOME>"
+recho "${HOME-'}'}"
+expect "<$HOME>"
+recho "${HOME-"}"}"
+
+expect $0: 'HOME: }: syntax error: operand expected (error token is "}")'
+recho "${HOME:`echo }`}" # should be a math error -- bad substring substitution
+
+expect unset
+_ENV=oops
+x=${_ENV[(_$-=0)+(_=1)-_${-%%*i*}]}
+echo ${x:-unset}
+
+expect "<$HOME>"
+recho ${HOME}
+expect "<$HOME>"
+recho ${HOME:-`echo }`}
+expect "<$HOME>"
+recho ${HOME:-`echo "}"`}
+expect "<$HOME>"
+recho "${HOME:-`echo "}"`}"
+expect "<$HOME>"
+recho "$(echo "${HOME}")"
+expect "<$HOME>"
+recho "$(echo "$(echo ${HOME})")"
+expect "<$HOME>"
+recho "$(echo "$(echo "${HOME}")")"
+
+P=*@*
+expect '<*@>'
+recho "${P%"*"}" #
+expect '<*@>'
+recho "${P%'*'}" #
+expect '<@*>'
+recho "${P#\*}" # should be @*
+
+expect '<)>'
+recho "$(echo ")")" # should be )
+expect '<")">'
+recho "$(echo "\")\"")" # should be ")"
+
+foo='abcd '
+expect '<-abcd> <->'
+recho -${foo}- # should be -abcd -
+expect '<-abcd> <->'
+recho -${foo% *}- # should be -abcd -
+expect '<-abcd->'
+recho -${foo%% *}- # should be -abcd-
+
+foo=bar
+expect '<bar foo>'
+echo -n $foo' ' ; echo foo
+
+expect '<bar foo>'
+echo -n $foo" " ; echo foo
+
+expect '<bar foo>'
+echo -n "$foo " ; echo foo
+
+expect '<barfoo>'
+echo -e "$foo\c " ; echo foo
+
+expect '<barfoo>'
+echo -e $foo"\c " ; echo foo
+
+# make sure backslashes are preserved in front of characters that are not
+# valid backslash escapes
+expect '<\x>'
+echo -e '\x'
+
+# substring tests
+z=abcdefghijklmnop
+expect '<abcd>'
+recho ${z:0:4}
+
+expect '<efg> <nop>'
+recho ${z:4:3} ${z:${#z}-3:3}
+
+expect '<efg> <nop>'
+recho ${z:4:3} ${z: -3:3}
+
+expect '<hijklmnop>'
+recho ${z:7:30}
+
+expect '<abcdefghijklmnop>'
+recho ${z:0:100}
+
+expect '<abcdefghijklmnop>'
+recho ${z:0:${#z}}
+
+set 'ab cd' 'ef' 'gh ij' 'kl mn' 'op'
+expect '<ab cd> <ef>'
+recho "${@:1:2}"
+
+expect '<gh ij> <kl mn>'
+recho "${@:3:2}"
+
+expect '<gh ij> <kl mn> <op>'
+recho "${@:3:4}"
+
+expect '<ab cd> <ef> <gh ij> <kl mn> <op>'
+recho "${@:1:$#}"
+
+# code to ad-hoc parse arithmetic expressions in substring expansions was
+# broken until post-2.04
+base=/home/chet/foo//bar
+string1=$base/abcabcabc
+x=1 j=4
+
+expect '</home/chet/foo//bar/abcabcabc>'
+recho ${string1:0}
+
+expect '<home/chet/foo//bar/abcabcabc>'
+recho ${string1:1}
+
+expect '<home>'
+recho ${string1:(j?1:0):j}
+
+expect '<home>'
+recho ${string1:j?1:0:j}
+
+expect '<home>'
+recho ${string1:(j?(x?1:0):0):j}
+
+expect '<home>'
+recho ${string1:j?(x?1:0):0:j}
+
+unset base string1 x j
+
+# indirect variable references
+expect '<abcdefghijklmnop>'
+recho ${!9:-$z}
+
+ef=4
+expect '<4>'
+recho ${!2}
+
+expect '<op>'
+recho ${!#}
+
+set a b c d e
+a=
+expect '<abcdefghijklmnop>'
+recho ${a:-$z}
+expect '<abcdefghijklmnop>'
+recho ${!1:-$z}
+
+expect nothing
+recho ${a-$z}
+expect nothing
+recho ${!1-$z}
+
+set -u
+expect $0: ABX: unbound variable
+( recho ${ABX} )
+set +u
+
+expect $0: '$6: cannot assign in this way'
+recho ${6="arg6"}
+
+v=abcde
+
+# sed-like variable substitution
+expect '<xxcde>'
+recho ${v/a[a-z]/xx}
+expect '<axxde>'
+recho ${v/a??/axx}
+expect '<abxyz>'
+recho ${v/c??/xyz}
+expect '<abbcde>'
+recho ${v/#a/ab}
+expect '<abcde>'
+recho ${v/#d/ab}
+expect '<abcabe>'
+recho ${v/d/ab}
+expect '<abcdlast>'
+recho ${v/%?/last}
+expect '<abcde>'
+recho ${v/%x/last}
+
+av=(abcd efgh ijkl mnop qrst uvwx)
+
+expect '<xxcd>'
+recho ${av/??/xx}
+expect '<abxx>'
+recho ${av/%??/xx}
+expect '<xxgh>'
+recho ${av[1]/??/xx}
+expect '<efgh>'
+recho ${av[1]/%ab/xx}
+expect '<xxfgh>'
+recho ${av[1]/#?/xx}
+expect '<zagh>'
+recho ${av[1]/??/za}
+expect '<zaza>'
+recho ${av[1]//??/za}
+expect '<zagh>'
+recho ${av[1]/#??/za}
+expect '<efza>'
+recho ${av[1]/%??/za}
+
+expect '<yyy> <yyy> <yyy> <yyy> <yyy> <yyy>'
+recho ${av[@]/*/yyy}
+expect '<yyy> <yyy> <yyy> <yyy> <yyy> <yyy>'
+recho ${av[@]/#*/yyy}
+expect '<yyy> <yyy> <yyy> <yyy> <yyy> <yyy>'
+recho ${av[@]/%*/yyy}
+expect '<yyy> <efgh> <ijkl> <mnop> <qrst> <uvwx>'
+recho ${av[@]/a*/yyy}
+expect '<abxx> <efxx> <ijxx> <mnxx> <qrxx> <uvxx>'
+recho ${av[@]/%??/xx}
+
+set abcd efgh ijkl mnop qrst uvwx
+
+expect '<xxcd>'
+recho ${1/??/xx}
+expect '<xxcd> <xxgh> <xxkl> <xxop> <xxst> <xxwx>'
+recho ${@/??/xx}
+expect '<xxcd> <xxgh> <xxkl> <xxop> <xxst> <xxwx>'
+recho ${@/%??/xx}
+expect '<zaza>'
+recho ${3//??/za}
+expect '<efza>'
+recho ${3/%??/za}
+expect '<zaza> <zaza> <zaza> <zaza> <zaza> <zaza>'
+recho ${@//??/za}
+expect '<zacd> <zagh> <zakl> <zaop> <zast> <zawx>'
+recho ${@/#??/za}
+expect '<yyy> <yyy> <yyy> <yyy> <yyy> <yyy>'
+recho ${@//*/yyy}
+expect '<yyy> <efgh> <ijkl> <mnop> <qrst> <uvwx>'
+recho ${@//a*/yyy}
+expect '<abcd> <efgh> <ijkl> <mnop> <qrst> <uvwyyy>'
+recho ${@/%x*/yyy}
+
+expect a newline
+echo $abmcde
+
+# sneaky way to replace a newline in a variable value with something else
+AVAR=$'This\nstring\nhas\nmultiple\nlines.'
+echo "${AVAR}"
+
+eval BVAR=\"\${AVAR//$'\n'/-}\"
+echo "$BVAR"
+
+unset AVAR BVAR
+
+# run process substitution tests in a subshell so that syntax errors
+# caused by a shell not implementing process substitution (e.g., one
+# built on a NeXT) will not cause the whole test to exit prematurely
+${THIS_SH} ./new-exp1.sub
+
+# run the tests of $(<filename) in a subshell to avoid cluttering up
+# this script
+${THIS_SH} ./new-exp2.sub
+
+expect '<6>'
+recho ${#:-foo}
+expect $0: '${#:}: bad substitution'
+echo ${#:}
+
+expect "<'>"
+recho "'"
+expect '<">'
+recho '"'
+expect '<"hello">'
+recho "\"hello\""
+
+shift $#
+unset foo
+z=abcdef
+z1='abc def'
+
+expect '<>'
+recho ${foo:-""}
+expect nothing
+recho ${foo:-"$@"}
+expect '<>'
+recho "${foo:-$@}"
+
+# unset var
+expect '<>'
+recho ${foo:-"$zbcd"}
+expect nothing
+recho ${foo:-$zbcd}
+
+# set var
+expect '<abcdef>'
+recho ${foo:-"$z"}
+expect '<abc def>'
+recho ${foo:-"$z1"}
+
+expect '<abcdef>'
+recho ${foo:-$z}
+expect '<abc> <def>'
+recho ${foo:-$z1}
+
+expect '<abcdef>'
+recho "${foo:-$z}"
+expect '<abc def>'
+recho "${foo:-$z1}"
+
+expect '<abcdef>'
+recho "${foo:-"$z"}"
+# this disagrees with sh and ksh, but I think it is right according
+# to posix.2.
+expect '<abc def>'
+recho "${foo:-"$z1"}"
+
+set ab cd ef gh
+expect '<ab> <cd> <ef> <gh>'
+recho ${foo:-"$@"}
+expect '<ab> <cd> <ef> <gh>'
+recho "${foo:-$@}"
+expect '<ab> <cd> <ef> <gh>'
+recho "${foo:-"$@"}"
+
+shift $#
+expect nothing
+recho $xxx"$@"
+expect nothing
+recho ${foo:-$xxx"$@"}
+expect '<>'
+recho "${foo:-$xxx$@}"
+expect '<>'
+recho "${foo:-$xxx"$@"}"
+
+expect nothing
+recho $xxx"$@"
+expect nothing
+recho "$xxx$@"
+expect nothing
+recho "$@"$xxx
+
+expect '<>'
+recho $xxx""
+expect '<>'
+recho $xxx''
+expect '<>'
+recho ''$xxx
+expect '<>'
+recho ""$xxx
+
+AB='abcdefghijklmnopqrstuvwxyz'
+
+recho ${AB:7:15}
+recho ${AB:15:7}
+
+recho ${AB:20}
+
+recho ${AB:0}
+recho ${AB:0:20}
+
+recho ${AB:10:7}
+recho ${AB:10:3+4}
+recho ${AB:20/2:3+4}
+
+set 1 2 3 4 5 6
+recho \""${*:2:2}"\"
+
+IFS=:
+recho \""${*:2:2}"\"
+
+IFS=$' \t\n'
+
+z=123456
+
+recho \""${z:2:2}"\"
+recho \""${z:2}"\"
+recho \""${z:2:4}"\"
+recho \""${z:2:6}"\"
+
+set $'\1' $'\2' $'\177'
+
+recho $*
+recho $@
+
+recho ${*}
+recho ${@}
+
+xx=one/two/two
+recho ${xx%/*}
+recho ${xx/\/two}
+
+yy=oneonetwo
+recho ${yy//one}
+recho ${yy/\/one}
+
+xx=oneonetwo
+
+recho ${xx/one}
+recho ${xx//one}
+recho ${xx/\/one}
+
+# out-of-range substrings
+var=abc
+c=${var:3}
+expect nothing
+recho $c
+c=${var:4}
+expect nothing
+recho $c
+expect '<./new-exp.tests: -2: substring expression < 0>'
+c=${var:0:-2}
+
+var=abcdefghi
+c=${var:3:12}
+recho $c
+c=${var:4:20}
+recho $c
+
+# make sure null patterns work
+xxx=endocrine
+yyy=n
+unset zzz
+
+recho ${xxx/$yyy/*}
+recho ${xxx//$yyy/*}
+
+recho ${xxx/$zzz/*}
+recho ${xxx//$zzz/*}
+
+recho ${xxx//%${zzz}/}
+recho ${xxx//%${zzz}}
+recho ${xxx//#${zzz}/}
+recho ${xxx//#${zzz}}
+
+# another case that caused a core dump in bash-2.0
+XPATH=/usr/bin:/bin:/usr/local/bin:/usr/gnu/bin::/usr/bin/X11:/sbin:/usr/sbin
+
+recho ${XPATH//:/ }
+
+xx=(ar as at au av aw ax ay az)
+
+recho ${xx[@]/a/}
+recho ${xx[@]//a/}
+
+recho ${xx[*]/a/}
+recho ${xx[*]//a/}
+
+recho ${xx[@]%?}
+recho ${xx[*]%?}
+
+recho ${xx[@]#?}
+recho ${xx[*]#?}
+
+set -- ar as at au av aw ax ay az
+
+recho ${@/a/}
+recho ${@//a/}
+
+recho ${*/a/}
+recho ${*//a/}
+
+recho ${@%?}
+recho ${*%?}
+
+recho ${@#?}
+recho ${*#?}
+
+shift $#
+set -u
+( recho $9 ; echo after 1)
+( recho ${9} ; echo after 2)
+( recho $UNSET ; echo after 3)
+( recho ${UNSET} ; echo after 4)
+( recho "$UNSET" ; echo after 5)
+( recho "${UNSET}" ; echo after 6)
+( recho "${#UNSET}" ; echo after 7)
+set +u
+
+RECEIVED="12345"
+recho "${RECEIVED:$((${#RECEIVED}-1)):1}"
+RECEIVED="12345#"
+recho "${RECEIVED:$((${#RECEIVED}-1)):1}"
+RECEIVED="#"
+recho "${RECEIVED:$((${#RECEIVED}-1)):1}"
+RECEIVED=""
+recho "${RECEIVED:$((${#RECEIVED}-1)):1}"
+
+# tests of new prefix expansion ${!prefix*}
+${THIS_SH} ./new-exp3.sub
+
+# bug with indirect expansion through bash-2.05b
+${THIS_SH} ./new-exp4.sub
+
+# these caused errors and core dumps in versions before bash-2.04
+c=""
+echo ${c//${$(($#-1))}/x/}
+
+set a b c d e f g
+recho "$@"
+
+set -- ${@:1:$(($# - 2))}
+recho "$@"
+
+set a b
+recho ${@:1:$(($# - 2))}
+
+recho ${@:1:0}
+recho ${@:1:1}
+recho ${@:1:2}
+
+recho "${*:1:0}"
+
+# this is an error -- negative expression
+set a
+recho ${@:1:$(($# - 2))}
+
+XPATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:.:/sbin:/usr/sbin
+set $( IFS=: ; echo $XPATH )
+
+recho ${@##*/}
+recho ${@%%[!/]*}
+
+recho ${@#/*}
+recho ${@%*/}
+
+set /full/path/to/x16 /another/full/path
+
+recho ${1%/*}
+recho ${1%%[!/]*}
+recho ${1#*/}
+recho ${1##*/}
+
+${THIS_SH} ./new-exp5.sub
+
+unset var
+var=blah
+
+# these had better agree
+echo ${var[@]:3}
+echo ${var:3}
+echo ${var[@]/#/--}
+echo ${var/#/--}
+echo ${var[@]##?}
+echo ${var##?}
+
+unset var
+var=(abcde abcfg abchi)
+
+# problems with anchoring pattern replacements
+echo ${var[*]//#abc/foo}
+echo ${var[*]/#abc/foo}
+unset var
+
+${THIS_SH} ./new-exp6.sub
+
+${THIS_SH} ./new-exp7.sub
+
+# problems with stray CTLNUL in bash-4.0-alpha
+unset a
+a=/a
+recho "/${a%/*}"
+recho "/${a///a/}"
+
+# this must be last!
+expect $0: 'ABXD: parameter unset'
+recho ${ABXD:?"parameter unset"}
diff --git a/tests/new-exp1.sub b/tests/new-exp1.sub
new file mode 100644
index 0000000..c015c22
--- /dev/null
+++ b/tests/new-exp1.sub
@@ -0,0 +1,11 @@
+expect()
+{
+ echo expect "$@"
+}
+
+expect this is a test of proc subst
+cat <(echo this is a test of proc subst)
+echo this is test 2 > /tmp/x
+expect this is test 2
+cat <(cat /tmp/x)
+rm -f /tmp/x
diff --git a/tests/new-exp2.sub b/tests/new-exp2.sub
new file mode 100644
index 0000000..5e922aa
--- /dev/null
+++ b/tests/new-exp2.sub
@@ -0,0 +1,36 @@
+export LC_ALL=C
+export LANG=C
+
+# test out the new $(< filename) code
+# it should be exactly equivalent to $(cat filename)
+
+FILENAME=/tmp/bashtmp.x$$
+
+trap 'rm -f $FILENAME' 0
+
+cat >$FILENAME << EOF
+line 1
+line 2
+line 3
+EOF
+
+LINES1=$(cat $FILENAME)
+LINES2=$(< $FILENAME)
+
+if [[ $LINES1 != $LINES2 ]]; then
+ echo 'whoops: $(< filename) failed'
+fi
+
+LINES2=$(< /tmp/bashtmp.x*)
+if [[ $LINES1 != $LINES2 ]]; then
+ echo 'whoops: $(< filename) with glob expansion failed'
+fi
+
+# but the glob expansion in the redirection should fail in posix mode
+set -o posix
+LINES2=$(< /tmp/bashtmp.x*)
+set +o posix
+
+# now see what happens when we try it with a non-existant file
+LINES3=$(< /tmp/redir-notthere)
+echo $?
diff --git a/tests/new-exp3.sub b/tests/new-exp3.sub
new file mode 100644
index 0000000..3107ef1
--- /dev/null
+++ b/tests/new-exp3.sub
@@ -0,0 +1,26 @@
+:
+# Set up some dummy variables beginning with _Q
+_QUANTITY=
+_QUOTA=
+_QUOTE=
+_QUILL=
+_QUEST=
+_QUART=
+
+recho ${!_Q*}
+
+IFS="-$IFS"
+
+recho ${!_Q*}
+recho "${!_Q*}"
+
+recho ${!_Y*}
+
+recho "${!_Q* }"
+
+IFS=$' \t\n'
+
+set a b c d e f g h i j k l m n o p
+recho ${!1*}
+
+recho ${!@*}
diff --git a/tests/new-exp4.sub b/tests/new-exp4.sub
new file mode 100644
index 0000000..45439a0
--- /dev/null
+++ b/tests/new-exp4.sub
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+arrayA=("A" "B" "C")
+
+arrayB=( ${arrayA[*]} )
+echo "Case01---${#arrayB[*]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---"
+
+arrayB=( "${arrayA[*]}" )
+echo "Case02---${#arrayB[*]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---"
+
+arrayB=( ${arrayA[@]} )
+echo "Case03---${#arrayB[@]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---"
+
+arrayB=( "${arrayA[@]}" )
+echo "Case04---${#arrayB[@]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---"
+
+xx="arrayA[*]"
+
+arrayB=( ${!xx} )
+echo "Case05---${#arrayB[*]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---"
+
+arrayB=( "${!xx}" )
+echo "Case06---${#arrayB[*]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---"
+
+xx="arrayA[@]"
+
+arrayB=( ${!xx} )
+echo "Case07---${#arrayB[@]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---"
+
+arrayB=( "${!xx}" )
+echo "Case08---${#arrayB[@]}---${arrayB[0]}:${arrayB[1]}:${arrayB[2]}---"
diff --git a/tests/new-exp5.sub b/tests/new-exp5.sub
new file mode 100644
index 0000000..0ee86e9
--- /dev/null
+++ b/tests/new-exp5.sub
@@ -0,0 +1,40 @@
+x=(one two)
+echo ${x[@]:1}
+echo ${x[@]:0:1}
+
+x=(one)
+echo ${x[0]:1}
+echo ${x[0]:0}
+echo ${x[@]:1}
+echo ${x[@]:0}
+
+echo ${x[@]: -1}
+echo ${x[@]: ${#x[@]}-1}
+
+x=(0 1 2 3 4 5 6 7 8 9)
+echo ${x[@]:1}
+
+echo ${x[@]: -1}
+echo ${x[@]: ${#x[@]}-1}
+
+set -- ${x[@]}
+
+echo $1
+echo ${@: -1}
+echo ${@: $#-1}
+
+a=0123456789
+
+echo ${a:1}
+echo ${a: -1}
+echo ${a: ${#a}-1}
+
+# problem with bash through 3.2.33
+oIFS="$IFS"
+IFS=$'\n'
+a=(A B C D)
+b=("${a[@]}")
+echo "${#b[@]}", "${b[@]}" # 4, A B C D -- OK
+b=("${a[@]:2}")
+echo "${#b[@]}", "${b[@]}" # 1, C D -- bug, should be 2, C D
+IFS="$oIFS"
diff --git a/tests/new-exp6.sub b/tests/new-exp6.sub
new file mode 100644
index 0000000..532ec1a
--- /dev/null
+++ b/tests/new-exp6.sub
@@ -0,0 +1,29 @@
+# quoted null problems in versions of bash prior to 3.2
+
+str='12'
+snul=$'\177'
+
+recho "${str:2}"
+recho "+${str:2}"
+recho "+${snul:0:1}"
+recho "+""${str:2}"
+
+recho "${str/?/$snul}"
+recho ${str/?/$snul}
+
+recho "${snul/x/y}"
+recho ${snul/x/y}
+
+recho "${snul/$snul/}"
+recho "${str/$str/}"
+
+recho "${snul##$snul}"
+recho "${str##$str}"
+recho "${str##$nul}"
+
+A=""
+B="${A:0}"
+
+recho "$B"
+recho "${A:0}"
+recho "/tmp/test/TEST${A:0}"
diff --git a/tests/new-exp7.sub b/tests/new-exp7.sub
new file mode 100644
index 0000000..970475c
--- /dev/null
+++ b/tests/new-exp7.sub
@@ -0,0 +1,13 @@
+foo()
+{
+ echo < <(cat x1)
+}
+
+type foo
+
+declare -f foo
+
+echo $(declare -f foo | sed 's:foo:bar:')
+eval "$(declare -f foo | sed 's:foo:bar:')"
+
+type bar
diff --git a/tests/nquote.right b/tests/nquote.right
new file mode 100644
index 0000000..267f0e7
--- /dev/null
+++ b/tests/nquote.right
@@ -0,0 +1,40 @@
+argv[1] = <^J^J^J>
+argv[1] = <++^J++>
+argv[1] = <>
+argv[1] = <^J^I >
+argv[1] = <abc>
+argv[1] = <^M^[^Gabc>
+argv[1] = <hello,>
+argv[2] = <world>
+argv[1] = <hello, world>
+argv[1] = <>
+argv[1] = <$hello, world>
+argv[1] = <hello, $world>
+argv[1] = <hello, "world">
+argv[1] = <hello, $"world">
+argv[1] = <hello, $"world">
+argv[1] = <$hello, chet>
+argv[1] = <hello, chet>
+ok
+'abcd'
+'abcd'
+\'abcd\'
+\'abcd\'
+argv[1] = <A\CB>
+argv[1] = <A\CB>
+argv[1] = <ab$cde>
+A\CB
+A\CB
+A\CB
+argv[1] = <hello, $"world">
+argv[1] = <hello, \$"world">
+argv[1] = <hello, $"world">
+argv[1] = <hello, $world>
+1
+1
+;foo
+argv[1] = <^I>
+argv[1] = <'A^IB'>
+hello' world
+hello world!
+hello' world!
diff --git a/tests/nquote.tests b/tests/nquote.tests
new file mode 100644
index 0000000..720c3e1
--- /dev/null
+++ b/tests/nquote.tests
@@ -0,0 +1,118 @@
+expect()
+{
+ echo expect "$@"
+}
+
+expect '<^J^J^J>'
+recho $'\n\n\n'
+
+expect '<++^J++>'
+f=$'\n'
+recho "++$f++"
+unset f
+
+z1=$''
+expect '<>'
+recho "$z1"
+
+ZIFS=$'\n'$'\t'$' '
+
+expect '<^J^I >'
+recho "$ZIFS"
+
+expect '<abc>'
+recho $'abc'
+
+expect '<^M^[^Gabc>'
+recho $'\r\e\aabc'
+
+D=$"hello"," "$"world"
+
+expect '<hello,> <world>'
+recho $D
+
+expect '<hello, world>'
+recho "$D"
+
+D=$""
+expect '<>'
+recho "$D"
+
+world=chet
+
+expect '<$hello, world>'
+recho \$"hello, world"
+
+expect '<hello, $world>'
+recho $"hello, \$world"
+
+expect '<hello, "world">'
+recho $"hello, \"world\""
+
+expect '<hello, $"world">'
+recho $"hello"', $"world"'
+
+expect '<hello, $"world">'
+recho $'hello, $"world"'
+
+expect '<$hello, chet>'
+recho \$"hello, $world"
+
+expect '<hello, chet>'
+recho $"hello, $world"
+
+z=$'\v\f\a\b'
+case "$z" in
+$'\v\f\a\b') echo ok;;
+*) echo bad;;
+esac
+
+# Dave Korn says this should be allowed and echo 'abcd'
+echo $'\'abcd\''
+
+# printf translates \' to ' ...
+printf "\'abcd\'\n"
+
+# but echo -e doesn't
+echo -e "\'abcd\'"
+echo -e "\\'abcd\\'"
+
+# and what do we do about unrecognized escape sequences?
+
+shopt -s xpg_echo
+
+recho $'A\CB'
+
+recho "A\CB"
+
+cde=c
+recho $'ab$cde'
+
+printf "%b\n" 'A\CB'
+printf 'A\CB\n'
+
+echo 'A\CB'
+
+world=chet
+
+recho $'hello, $"world"'
+recho $'hello, \$"world"'
+recho $'hello, $\"world"'
+
+recho "hello, $"world""
+
+# ansi quoting inside double-quoted command subst - bash-3.1 bug
+echo $(set -- $'a b'; echo $#)
+echo "$(set -- $'a b'; echo $#)"
+
+echo "$(echo $';foo')"
+
+args ()
+{
+ for a in "$@";do echo "'$a'";done
+}
+unset mytab
+recho "${mytab:-$'\t'}"
+recho "$( args $'A\tB' )"
+
+${THIS_SH} ./nquote1.sub
diff --git a/tests/nquote1.right b/tests/nquote1.right
new file mode 100644
index 0000000..26e16b9
--- /dev/null
+++ b/tests/nquote1.right
@@ -0,0 +1,121 @@
+argv[1] = <a>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <1>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <b>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <c>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <d>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <a>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <1>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <b>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <c>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <d>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <a>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <1>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <b>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <c>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <d>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <a>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <1>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <b>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <c>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <d>
+argv[2] = <a^Ab>
+argv[3] = <3>
+argv[1] = <e1>
+argv[2] = <v^A^A>
+argv[1] = <e2>
+argv[2] = <v^A^A>
+argv[1] = <e3>
+argv[2] = <v^A^A>
+argv[1] = <e4>
+argv[2] = <v^A^A>
+argv[1] = <a1>
+argv[2] = <uv^A^A>
+argv[1] = <a2>
+argv[2] = <uv^A^A>
+argv[1] = <a3>
+argv[2] = <uv^A^Awx>
+argv[3] = <uv^A^Awx>
+argv[1] = <a4>
+argv[2] = <uv^A^Awx>
+argv[3] = <uv^A^Awx>
+argv[1] = <p1>
+argv[2] = <uv^A^Awx>
+argv[3] = <uv^A^Awx>
+argv[1] = <p2>
+argv[2] = <uv^A^Awx>
+argv[3] = <uv^A^Awx>
+argv[1] = <p1>
+argv[2] = <uv^A^Awx>
+argv[3] = <uv^A^Awx>
+argv[1] = <p2>
+argv[2] = <uv^A^Awx uv^A^Awx>
+argv[1] = <uv^A^Awx>
+argv[1] = <uv^A^Awx>
+argv[1] = <uv^A^Awx>
+^A
+^A
+^B
+argv[1] = <f1>
+argv[2] = <v^Aw>
+argv[1] = <f2>
+argv[2] = <v^Aw>
+argv[1] = <a1>
+argv[2] = <uv^Aw>
+argv[1] = <a2>
+argv[2] = <uv^Aw>
+argv[1] = <a3>
+argv[2] = <uv^Aw>
+argv[1] = <a4>
+argv[2] = <uv^Aw>
+argv[1] = <e1>
+argv[2] = <uv^Aw>
+argv[1] = <e2>
+argv[2] = <uv^Aw>
+argv[1] = <d1>
+argv[2] = <^Aw>
+argv[1] = <d2>
+argv[2] = <^Aw>
+argv[1] = <@1>
+argv[2] = <uv^Aw^Axy>
+argv[3] = <uv^Aw^Axy>
+argv[1] = <@2>
+argv[2] = <uv^Aw^Axy>
+argv[3] = <uv^Aw^Axy>
diff --git a/tests/nquote1.sub b/tests/nquote1.sub
new file mode 100644
index 0000000..b3bc0db
--- /dev/null
+++ b/tests/nquote1.sub
@@ -0,0 +1,6 @@
+set -o history
+set -H
+
+echo $'hello\' world'
+echo $'hello world!'
+echo $'hello\' world!'
diff --git a/tests/nquote1.tests b/tests/nquote1.tests
new file mode 100644
index 0000000..0970e77
--- /dev/null
+++ b/tests/nquote1.tests
@@ -0,0 +1,97 @@
+a=$'a\001b'
+
+set $a
+
+b=$a
+c=$1
+d="$1"
+
+e=$'uv\001\001wx'
+
+recho a $a ${#a}
+recho 1 $1 ${#1}
+recho b $b ${#b}
+recho c $c ${#c}
+recho d $d ${#d}
+
+recho a ${a} ${#a}
+recho 1 ${1} ${#1}
+recho b ${b} ${#b}
+recho c ${c} ${#c}
+recho d ${d} ${#d}
+
+recho a "$a" ${#a}
+recho 1 "$1" ${#1}
+recho b "$b" ${#b}
+recho c "$c" ${#c}
+recho d "$d" ${#d}
+
+recho a "${a}" ${#a}
+recho 1 "${1}" ${#1}
+recho b "${b}" ${#b}
+recho c "${c}" ${#c}
+recho d "${d}" ${#d}
+
+set $e
+
+recho e1 ${e:1:3}
+recho e2 "${e:1:3}"
+recho e3 ${1:1:3}
+recho e4 "${1:1:3}"
+
+arr[0]=$e
+arr[1]=$e
+
+recho a1 ${arr:0:4}
+recho a2 "${arr:0:4}"
+
+recho a3 ${arr[@]:0:2}
+recho a4 "${arr[@]:0:2}"
+
+set $e $e
+
+recho p1 ${@:1:2}
+recho p2 "${@:1:2}"
+
+recho p1 ${*:1:2}
+recho p2 "${*:1:2}"
+
+recho $e
+
+recho 'uvwx'
+
+f='uvwx'
+
+recho $f
+
+echo -en "\01" | cat -v
+echo
+
+huhu() { echo "$1"; };
+
+huhu $(echo -en "\01") | cat -v
+huhu $(echo -en "\02") | cat -v
+
+f=$'uv\001w\001xy'
+
+set $f $f
+
+recho f1 ${f:1:3}
+recho f2 "${f:1:3}"
+
+arr[0]=$f
+arr[1]=$f
+
+recho a1 ${arr:0:4}
+recho a2 "${arr:0:4}"
+recho a3 ${arr[0]:0:4}
+recho a4 "${arr[0]:0:4}"
+
+recho e1 ${f:0:4}
+recho e2 "${f:0:4}"
+
+recho d1 ${1:2:2}
+recho d2 "${1:2:2}"
+
+recho @1 ${@:1:2}
+recho @2 "${@:1:2}"
diff --git a/tests/nquote2.right b/tests/nquote2.right
new file mode 100644
index 0000000..e7fb21e
--- /dev/null
+++ b/tests/nquote2.right
@@ -0,0 +1,76 @@
+argv[1] = <a^Ab>
+argv[1] = <uv^A^Awx>
+argv[1] = <aAb>
+argv[1] = <aAb>
+argv[1] = <uvA^Awx>
+argv[1] = <uvA^Awx>
+argv[1] = <a^AB>
+argv[1] = <a^AB>
+argv[1] = <uv^A^AWx>
+argv[1] = <uv^A^AWx>
+argv[1] = <aAb>
+argv[1] = <aAb>
+argv[1] = <uvAAwx>
+argv[1] = <uvAAwx>
+argv[1] = <a^AB>
+argv[1] = <a^AB>
+argv[1] = <uv^A^AWx>
+argv[1] = <uv^A^AWx>
+argv[1] = <uvA^Awx>
+argv[2] = <uvA^Awx>
+argv[1] = <uvA^Awx>
+argv[2] = <uvA^Awx>
+argv[1] = <uv^A^AWx>
+argv[2] = <uv^A^AWx>
+argv[1] = <uv^A^AWx>
+argv[2] = <uv^A^AWx>
+argv[1] = <uvAAwx>
+argv[2] = <uvAAwx>
+argv[1] = <uvAAwx>
+argv[2] = <uvAAwx>
+argv[1] = <uv^A^AWx>
+argv[2] = <uv^A^AWx>
+argv[1] = <uv^A^AWx>
+argv[2] = <uv^A^AWx>
+argv[1] = <a^Ab>
+argv[1] = <uv^A^Awx>
+argv[1] = <aAb>
+argv[1] = <aAb>
+argv[1] = <uvA^Awx>
+argv[1] = <uvA^Awx>
+argv[1] = <a^AB>
+argv[1] = <a^AB>
+argv[1] = <uv^A^AWx>
+argv[1] = <uv^A^AWx>
+argv[1] = <aAb>
+argv[1] = <aAb>
+argv[1] = <uvAAwx>
+argv[1] = <uvAAwx>
+argv[1] = <a^AB>
+argv[1] = <a^AB>
+argv[1] = <uv^A^AWx>
+argv[1] = <uv^A^AWx>
+argv[1] = <aAb>
+argv[2] = <uvA^Awx>
+argv[1] = <aAb>
+argv[2] = <uvA^Awx>
+argv[1] = <a^AB>
+argv[2] = <uv^A^Awx>
+argv[1] = <a^AB>
+argv[2] = <uv^A^Awx>
+argv[1] = <a^Ab>
+argv[2] = <uv^A^AWx>
+argv[1] = <a^Ab>
+argv[2] = <uv^A^AWx>
+argv[1] = <aAb>
+argv[2] = <uvAAwx>
+argv[1] = <aAb>
+argv[2] = <uvAAwx>
+argv[1] = <a^AB>
+argv[2] = <uv^A^Awx>
+argv[1] = <a^AB>
+argv[2] = <uv^A^Awx>
+argv[1] = <a^Ab>
+argv[2] = <uv^A^AWx>
+argv[1] = <a^Ab>
+argv[2] = <uv^A^AWx>
diff --git a/tests/nquote2.tests b/tests/nquote2.tests
new file mode 100644
index 0000000..c07bd9b
--- /dev/null
+++ b/tests/nquote2.tests
@@ -0,0 +1,82 @@
+a=$'a\001b'
+
+e=$'uv\001\001wx'
+
+recho $a
+recho $e
+
+recho ${a/$'\001'/A}
+recho "${a/$'\001'/A}"
+recho ${e/$'\001'/A}
+recho "${e/$'\001'/A}"
+
+recho ${a/b/B}
+recho "${a/b/B}"
+recho ${e/w/W}
+recho "${e/w/W}"
+
+recho ${a//$'\001'/A}
+recho "${a//$'\001'/A}"
+recho ${e//$'\001'/A}
+recho "${e//$'\001'/A}"
+
+recho ${a//b/B}
+recho "${a//b/B}"
+recho ${e//w/W}
+recho "${e//w/W}"
+
+# pos params pat subst
+
+set $e $e
+
+recho ${@/$'\001'/A}
+recho "${@/$'\001'/A}"
+recho ${@/w/W}
+recho "${@/w/W}"
+
+recho ${@//$'\001'/A}
+recho "${@//$'\001'/A}"
+recho ${@//w/W}
+recho "${@//w/W}"
+
+arr[0]=$a
+arr[1]=$e
+
+recho ${arr[0]}
+recho ${arr[1]}
+
+recho ${arr[0]/$'\001'/A}
+recho "${arr[0]/$'\001'/A}"
+recho ${arr[1]/$'\001'/A}
+recho "${arr[1]/$'\001'/A}"
+
+recho ${arr[0]/b/B}
+recho "${arr[0]/b/B}"
+recho ${arr[1]/w/W}
+recho "${arr[1]/w/W}"
+
+recho ${arr[0]//$'\001'/A}
+recho "${arr[0]//$'\001'/A}"
+recho ${arr[1]//$'\001'/A}
+recho "${arr[1]//$'\001'/A}"
+
+recho ${arr[0]//b/B}
+recho "${arr[0]//b/B}"
+recho ${arr[1]//w/W}
+recho "${arr[1]//w/W}"
+
+recho ${arr[@]/$'\001'/A}
+recho "${arr[@]/$'\001'/A}"
+
+recho ${arr[@]/b/B}
+recho "${arr[@]/b/B}"
+recho ${arr[@]/w/W}
+recho "${arr[@]/w/W}"
+
+recho ${arr[@]//$'\001'/A}
+recho "${arr[@]//$'\001'/A}"
+
+recho ${arr[@]//b/B}
+recho "${arr[@]//b/B}"
+recho ${arr[@]//w/W}
+recho "${arr[@]//w/W}"
diff --git a/tests/nquote3.right b/tests/nquote3.right
new file mode 100644
index 0000000..d01eecc
--- /dev/null
+++ b/tests/nquote3.right
@@ -0,0 +1,60 @@
+argv[1] = <uv^A^A>
+argv[1] = <uv^A^A>
+argv[1] = <uv^A>
+argv[1] = <uv^A>
+argv[1] = <^Ab>
+argv[1] = <^Ab>
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <uv^Aw^Axy>
+argv[1] = <uv^A>
+argv[1] = <uv^A>
+argv[1] = <^Awx>
+argv[1] = <^Awx>
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <uv^Aw^Axy>
+argv[1] = <uv^A>
+argv[1] = <uv^A>
+argv[1] = <^Awx>
+argv[1] = <^Awx>
+argv[1] = <uv^A>
+argv[1] = <uv^A>
+argv[1] = <^Awx>
+argv[1] = <^Awx>
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <xy>
+argv[1] = <uv^Aw^Axy>
+argv[1] = <uv^Aw^Axy>
+argv[1] = <uv^A>
+argv[1] = <uv^A>
+argv[1] = <^Awx>
+argv[1] = <^Awx>
+argv[1] = <uv^A>
+argv[2] = <uv^Aw>
+argv[1] = <uv^A>
+argv[2] = <uv^Aw>
+argv[1] = <^Awx>
+argv[2] = <w^Axy>
+argv[1] = <^Awx>
+argv[2] = <w^Axy>
+argv[1] = <wx>
+argv[2] = <xy>
+argv[1] = <uv^A^Awx>
+argv[2] = <uv^Aw^Axy>
+argv[1] = <uv^A>
+argv[2] = <uv^Aw>
+argv[1] = <uv^A>
+argv[2] = <uv^Aw>
+argv[1] = <^Awx>
+argv[2] = <w^Axy>
+argv[1] = <^Awx>
+argv[2] = <w^Axy>
+argv[1] = <wx>
+argv[2] = <xy>
+argv[1] = <uv^A^Awx>
+argv[2] = <uv^Aw^Axy>
diff --git a/tests/nquote3.tests b/tests/nquote3.tests
new file mode 100644
index 0000000..a83ff56
--- /dev/null
+++ b/tests/nquote3.tests
@@ -0,0 +1,85 @@
+a=$'a\001b'
+
+set $a
+
+b=$a
+c=$1
+d="$1"
+
+e=$'uv\001\001wx'
+f=$'uv\001w\001xy'
+
+set $e $e
+
+recho ${e%%??}
+recho "${e%%??}"
+
+recho ${e%%???}
+recho "${e%%???}"
+
+recho ${a#?}
+recho "${a#?}"
+
+# simple variables
+
+recho ${f##*$'\001'}
+recho "${f##*$'\001'}"
+recho ${f##*''} # literal ^A
+recho "${f##*'^A'}" # two characters, `^' and `A'
+
+recho ${e%$'\001'*}
+recho "${e%$'\001'*}"
+recho ${e#*$'\001'}
+recho "${e#*$'\001'}"
+
+# array members
+
+arr[0]=$e
+arr[1]=$f
+
+recho ${arr[1]##*$'\001'}
+recho "${arr[1]##*$'\001'}"
+recho ${arr[1]##*''} # literal ^A
+recho "${arr[1]##*'^A'}" # two characters, `^' and `A'
+
+recho ${arr[0]%$'\001'*}
+recho "${arr[0]%$'\001'*}"
+recho ${arr[0]#*$'\001'}
+recho "${arr[0]#*$'\001'}"
+
+recho ${arr%$'\001'*}
+recho "${arr%$'\001'*}"
+recho ${arr#*$'\001'}
+recho "${arr#*$'\001'}"
+
+# positional parameters
+
+set $e $f
+
+recho ${2##*$'\001'}
+recho "${2##*$'\001'}"
+recho ${2##*''} # literal ^A
+recho "${2##*''}" # literal ^A
+recho ${2##*'^A'} # two characters, `^' and `A'
+recho "${2##*'^A'}" # two characters, `^' and `A'
+
+recho ${1%$'\001'*}
+recho "${1%$'\001'*}"
+recho ${1#*$'\001'}
+recho "${1#*$'\001'}"
+
+recho ${@%$'\001'*}
+recho "${@%$'\001'*}"
+recho ${@#*$'\001'}
+recho "${@#*$'\001'}"
+recho ${@##*''} # literal ^A
+recho "${@##*'^A'}" # two characters, `^' and `A'
+
+# arrays treated as a whole
+
+recho ${arr[@]%$'\001'*}
+recho "${arr[@]%$'\001'*}"
+recho ${arr[@]#*$'\001'}
+recho "${arr[@]#*$'\001'}"
+recho ${arr[@]##*''} # literal ^A
+recho "${arr[@]##*'^A'}" # two characters, `^' and `A'
diff --git a/tests/nquote4.right b/tests/nquote4.right
new file mode 100644
index 0000000..1f7ae17
--- /dev/null
+++ b/tests/nquote4.right
@@ -0,0 +1,18 @@
+argv[1] = <ab>
+argv[1] = <abAcd>
+argv[1] = <abAcd>
+argv[1] = <ab^Dcd>
+argv[1] = <abLd>
+argv[1] = <abÞ>
+argv[1] = <abÞ>
+argv[1] = <abÍe>
+argv[1] = <ab^Lde>
+argv[1] = <¼X>
+argv[1] = <«cX>
+argv[1] = <>
+argv[1] = <>
+argv[1] = <gX>
+argv[1] = <Ab>
+argv[1] = <>
+argv[1] = <^Abcd>
+argv[1] = <Þ>
diff --git a/tests/nquote4.tests b/tests/nquote4.tests
new file mode 100644
index 0000000..ed73467
--- /dev/null
+++ b/tests/nquote4.tests
@@ -0,0 +1,24 @@
+recho $'ab\x{}cd'
+recho $'ab\x{41}cd'
+recho $'ab\x41cd'
+
+recho $'ab\x{4}cd'
+recho $'ab\x4cd'
+
+recho $'ab\x{cde'
+
+recho $'ab\x{cde'
+recho $'ab\x{cd}e'
+recho $'ab\x{c}de'
+
+recho $'\x{abcX'
+recho $'\x{ab}cX'
+recho $'\x{}X'
+recho $'\x{X'
+recho $'\x{01234567X'
+
+recho $'\x{41}b'
+recho $'\x{}bc'
+recho $'\x{1}bcd'
+
+recho $'\x{bde'
diff --git a/tests/nquote5.right b/tests/nquote5.right
new file mode 100644
index 0000000..a893329
--- /dev/null
+++ b/tests/nquote5.right
@@ -0,0 +1,86 @@
+argv[1] = <ab>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[1] = <ab>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[1] = <xxab>
+argv[2] = <cd>
+argv[3] = <efyy>
+argv[1] = <ab^Acd^Aef>
+argv[1] = <ab cd ef>
+argv[1] = <ab>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[1] = <ab>
+argv[2] = <cd>
+argv[1] = <ab^Acd^A>
+argv[1] = <ab>
+argv[2] = <cd>
+argv[3] = <e>
+argv[1] = <ab^Acd^Ae>
+argv[1] = <ab>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[1] = <ab>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[1] = <>
+argv[2] = <c>
+argv[1] = <ab>
+argv[2] = <-->
+argv[3] = <cd>
+argv[4] = <-->
+argv[5] = <ef>
+argv[1] = <ab>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[1] = <ab>
+argv[2] = <cd>
+argv[3] = <ef>
+argv[1] = <ab>
+argv[2] = <-->
+argv[3] = <cd>
+argv[4] = <-->
+argv[5] = <ef>
+argv[1] = <uv^?wx^?yz>
+argv[1] = <abyab^Acd^Aefz>
+argv[1] = <abyab>
+argv[2] = <cd>
+argv[3] = <efz>
+argv[1] = <abuv^?wx^?yzyab^Acd^Aefz>
+argv[1] = <abuv^?wx^?yzyab>
+argv[2] = <cd>
+argv[3] = <efz>
+argv[1] = <abuv^?wx^?yzyab>
+argv[2] = <-->
+argv[3] = <cd>
+argv[4] = <-->
+argv[5] = <efz>
+argv[6] = <-->
+argv[1] = <ab^Acd^Aef>
+argv[1] = <uv>
+argv[2] = <wx>
+argv[3] = <yz>
+argv[1] = <abyuv^?wx^?yzz>
+argv[1] = <abyuv>
+argv[2] = <wx>
+argv[3] = <yzz>
+argv[1] = <abuv^?wx^?yzyab^Acd^Aefz>
+argv[1] = <abuv>
+argv[2] = <wx>
+argv[3] = <yzyab^Acd^Aefz>
+argv[1] = <abuv^?wx^?yzyab>
+argv[2] = <-->
+argv[3] = <cd>
+argv[4] = <-->
+argv[5] = <efz>
+argv[6] = <-->
+argv[7] = <>
+argv[1] = <abuv>
+argv[2] = <-->
+argv[3] = <wx>
+argv[4] = <-->
+argv[5] = <yzyab^Acd^Aefz>
+argv[6] = <-->
+argv[7] = <>
diff --git a/tests/nquote5.tests b/tests/nquote5.tests
new file mode 100644
index 0000000..85a2ff6
--- /dev/null
+++ b/tests/nquote5.tests
@@ -0,0 +1,63 @@
+a=$'ab\001cd\001ef'
+IFS=$'\001'
+
+recho $a
+recho ${a}
+recho xx${a}yy
+recho "$a"
+
+recho $(echo $a)
+recho $(echo "$a")
+
+recho ${a%%??}
+recho "${a%%??}"
+
+recho ${a/f/}
+recho "${a/f/}"
+
+a1=("$a")
+recho ${a1[0]}
+recho ${a1}
+
+recho ${a:2:2}
+
+set -- $a
+recho $1 -- $2 -- $3
+
+set -- "$a"
+recho $1
+recho ${1}
+
+echo "$a" | { IFS=$'\001' read x y z; recho $x -- $y -- $z ; }
+unset x y z
+b=$'uv\177wx\177yz'
+
+recho $b
+
+recho "ab${x}y${a}z"
+recho ab${x}y${a}z
+
+recho "ab${b}y${a}z"
+recho ab${b}y${a}z
+
+echo "ab${b}y${a}z" | { IFS=$'\001' read l m n o ; recho $l -- $m -- $n -- $o; }
+unset l m n o
+
+a=$'ab\001cd\001ef'
+b=$'uv\177wx\177yz'
+
+IFS=$'\177'
+
+recho $a
+recho $b
+
+recho "ab${x}y${b}z"
+recho ab${x}y${b}z
+
+recho "ab${b}y${a}z"
+recho ab${b}y${a}z
+
+echo "ab${b}y${a}z" | { IFS=$'\001' read l m n o ; recho "$l" -- "$m" -- "$n" -- "$o"; }
+unset l m n o
+echo "ab${b}y${a}z" | { IFS=$'\177' read l m n o ; recho "$l" -- "$m" -- "$n" -- "$o"; }
+unset l m n o
diff --git a/tests/posix2.right b/tests/posix2.right
new file mode 100644
index 0000000..df30c4f
--- /dev/null
+++ b/tests/posix2.right
@@ -0,0 +1,2 @@
+Testing for POSIX.2 conformance
+All tests passed
diff --git a/tests/posix2.tests b/tests/posix2.tests
new file mode 100644
index 0000000..a186e78
--- /dev/null
+++ b/tests/posix2.tests
@@ -0,0 +1,179 @@
+#! /bin/sh
+# posix-2.sh - Simple identification tests for POSIX.2 features
+# commonly missing or incorrectly implemented.
+# Time-stamp: <96/04/10 16:43:48 gildea>
+# By Stephen Gildea <gildea@x.org> March 1995
+#
+# Copyright (c) 1995 Stephen Gildea
+# Permission is hereby granted to deal in this Software without restriction.
+# THIS SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND.
+#
+# MODIFIED BY chet@po.cwru.edu to make part of the bash test suite.
+# last change: Wed Jun 19 12:24:24 EDT 1996
+#
+# some of the tests:
+#
+# shell functions (do we care?)
+# var=${var:-val}
+# unset
+# set --
+# IFS parsing
+## not exiting with -e and failed "if", the way Ultrix does (Ultrix 4.2?)
+# "$@" expands to zero arguments if passed zero arguments
+# $SHELL -c 'echo $1' bad good
+# test -x
+# positional parameters greater than 9
+# arithmetic expansion $(( ... ))
+# getopts
+
+# For some tests we must run a sub-shell; $TESTSHELL says what to use.
+# If set, TESTSHELL must be an absolute pathname.
+# For example, on HP-UX 9, /bin/posix/sh is the supposedly-compliant shell.
+TESTSHELL=${THIS_SH:-$PWD/../bash}
+
+# these tests create temp files with names $TMPDIR/conf*
+: ${TMPDIR:=/tmp}
+
+exitval=0
+numtests=0
+
+echo "Testing for POSIX.2 conformance"
+
+newtest()
+{
+ numtests=$(($numtests + 1))
+}
+
+testfail()
+{
+ echo "$1 test failed"
+ exitval=$(($exitval + 1))
+}
+
+newtest
+empty=""
+test "${empty:-ok}" = ok || testfail "empty var colon"
+newtest
+test "${empty-bad}" = "" || testfail "got \"${empty-bad}\": empty var nocolon"
+newtest
+test "${unsetvar-ok}" = ok || testfail "unset var"
+newtest
+unset empty
+test "${empty-ok}" = ok || testfail "unset"
+
+newtest
+set -- -Z
+test "x$1" = x-Z || testfail '\"set -- arg\"'
+# this should empty the argument list
+newtest
+set --
+test $# = 0 || testfail "still $# args: \"set --\""
+
+# IFS parsing:
+newtest
+names=one/good/three
+saved_ifs="$IFS"
+IFS=/
+set $names lose
+test "$2" = good || testfail "got \"$2\": IFS parsing"
+IFS="$saved_ifs"
+
+# "$@" with 0 arguments should expand to 0 arguments
+newtest
+cat > $TMPDIR/conftest1 << EOF
+$TMPDIR/conftest2 "\$@"
+EOF
+cat > $TMPDIR/conftest2 << "EOF"
+#! /bin/sh
+echo $#
+EOF
+chmod +x $TMPDIR/conftest1 $TMPDIR/conftest2
+numargs=$($TESTSHELL $TMPDIR/conftest1)
+if [ "$?" != 0 ]; then
+ testfail 'running $@'
+else
+ test "$numargs" = 0 || testfail '"$@" got '"$numargs args: expansion w 0 args"
+fi
+rm -f $TMPDIR/conftest1 $TMPDIR/conftest2
+
+newtest
+val=$("$TESTSHELL" -c 'echo $1' csh good)
+test "$val" = good || testfail "got \"$val\": sh -c"
+
+newtest
+# do these tests in a sub-shell because failure will exit
+val=$("$TESTSHELL" -c 'echo ${10}' 0 1 2 3 4 5 6 7 8 9 ten 11 2> /dev/null)
+test "$val" = ten || testfail "accessing more than 9 positional params"
+
+a=abc_def_ghi
+export a
+newtest; val=`"$TESTSHELL" -c 'echo "${a%_*}"' 2> /dev/null`
+test "$val" = abc_def || testfail "parameter % op"
+newtest; val=`"$TESTSHELL" -c 'echo "${a%%_*}"' 2> /dev/null`
+test "$val" = abc || testfail "parameter %% op"
+newtest; val=`"$TESTSHELL" -c 'echo "${a#*_}"' 2> /dev/null`
+test "$val" = def_ghi || testfail "parameter # op"
+newtest; val=`"$TESTSHELL" -c 'echo "${a##*_}"' 2> /dev/null`
+test "$val" = ghi || testfail "parameter ## op"
+
+newtest
+"$TESTSHELL" -c 'export a=value' 2> /dev/null || testfail "export with value"
+
+newtest
+a=5; test "$(( ($a+1)/2 ))" = 3 || testfail "arithmetic expansion"
+
+# does "test" support the -x switch?
+newtest
+touch $TMPDIR/conftest
+chmod -x $TMPDIR/conftest
+test -x $TMPDIR/conftest && testfail "negative test -x"
+chmod +x $TMPDIR/conftest
+test -x $TMPDIR/conftest || testfail "positive test -x"
+rm -f $TMPDIR/conftest
+
+newtest
+test "$OPTIND" = 1 || testfail "OPTIND initial value"
+
+newtest
+getopts a: store -a aoptval
+if [ "$OPTIND" != 3 ] || [ "$store" != a ] || [ "$OPTARG" != aoptval ]; then
+ testfail "getopts"
+fi
+
+# if I change the default quoting style for variable values, these
+# next four must change
+
+newtest
+SQUOTE="'"
+val1=$(set | sed -n 's:^SQUOTE=::p')
+if [ "$val1" != "''\\'''" ]; then
+ testfail "variable quoting 1"
+fi
+
+newtest
+VTILDE='~'
+val1=$(set | sed -n 's:^VTILDE=::p')
+if [ "$val1" != "'~'" ]; then
+ testfail "variable quoting 2"
+fi
+
+newtest
+VHASH=ab#cd
+val1=$(set | sed -n 's:^VHASH=::p')
+if [ "$val1" != "ab#cd" ]; then
+ testfail "variable quoting 3"
+fi
+
+newtest
+VHASH2=#abcd
+val1=$(set | sed -n 's:^VHASH2=::p')
+if [ "$val1" != "'#abcd'" ]; then
+ testfail "variable quoting 4"
+fi
+
+if [ $exitval = 0 ]; then
+ echo "All tests passed"
+else
+ echo "$exitval of $numtests tests failed"
+fi
+exit $exitval
diff --git a/tests/posixpat.right b/tests/posixpat.right
new file mode 100644
index 0000000..deb01bf
--- /dev/null
+++ b/tests/posixpat.right
@@ -0,0 +1,42 @@
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+ok 6
+ok 7
+ok 8
+ok 9
+ok 10
+ok 11
+ok 12
+ok 13
+ok 14
+ok 15
+ok 16
+ok 17
+ok 18
+ok 19
+ok 20
+ok 21
+ok -- space
+ok -- blank
+ok 1
+ok 2
+ok 3
+ok 4
+ok 5
+ok 6
+ok 7
+ok 8
+ok 9
+ok 10
+ok 11
+ok 12
+ok 13
+ok 14
+ok 15
+ok 16
+ok 1
+ok 2
+ok 3
diff --git a/tests/posixpat.tests b/tests/posixpat.tests
new file mode 100644
index 0000000..91fac3b
--- /dev/null
+++ b/tests/posixpat.tests
@@ -0,0 +1,233 @@
+# A test suite for the POSIX.2 (BRE) pattern matching code
+LC_ALL=C
+LANG=C
+
+# First, test POSIX.2 character classes
+
+case e in
+[[:xdigit:]]) echo ok 1;;
+esac
+
+case a in
+[[:alpha:]123]) echo ok 2;;
+esac
+
+case 1 in
+[[:alpha:]123]) echo ok 3;;
+esac
+
+case 9 in
+[![:alpha:]]) echo ok 4;;
+esac
+
+# invalid character class expressions are just characters to be matched
+case a in
+[:al:]) echo ok 5;;
+esac
+
+case a in
+[[:al:]) echo ok 6;;
+esac
+
+case '!' in
+[abc[:punct:][0-9]) echo ok 7;;
+esac
+
+# let's try to match the start of a valid sh identifier
+case 'PATH' in
+[_[:alpha:]]*) echo ok 8;;
+esac
+
+# let's try to match the first two characters of a valid sh identifier
+case PATH in
+[_[:alpha:]][_[:alnum:]]*) echo ok 9;;
+esac
+
+# is ^C a cntrl character?
+case $'\003' in
+[[:cntrl:]]) echo ok 10;;
+esac
+
+# how about A?
+case A in
+[[:cntrl:]]) echo oops -- cntrl ;;
+*) echo ok 11;;
+esac
+
+case 9 in
+[[:digit:]]) echo ok 12;;
+esac
+
+case X in
+[[:digit:]]) echo oops -- digit;;
+*) echo ok 13;;
+esac
+
+case $'\033' in
+[[:graph:]]) echo oops -- graph;;
+*) echo ok 14;;
+esac
+
+case $'\040' in
+[[:graph:]]) echo oops -- graph 2;;
+*) echo ok 15;;
+esac
+
+case ' ' in
+[[:graph:]]) echo oops -- graph 3;;
+*) echo ok 16;;
+esac
+
+case 'aB' in
+[[:lower:]][[:upper:]]) echo ok 17;;
+esac
+
+case $'\040' in
+[[:print:]]) echo ok 18;;
+*) echo oops -- print;;
+esac
+
+case PS3 in
+[_[:alpha:]][_[:alnum:]][_[:alnum:]]*) echo ok 19;;
+esac
+
+case a in
+[[:alpha:][:digit:]]) echo ok 20;;
+*) echo oops - skip brackpat ;;
+esac
+
+case a in
+[[:alpha:]\]) echo oops -- dangling backslash in brackpat ;;
+*) echo ok 21 ;;
+esac
+
+# what's a newline? is it a blank? a space?
+case $'\n' in
+[[:blank:]]) echo ok -- blank ;;
+[[:space:]]) echo ok -- space ;;
+*) echo oops newline ;;
+esac
+
+# OK, what's a tab? is it a blank? a space?
+case $'\t' in
+[[:blank:]]) echo ok -- blank ;;
+[[:space:]]) echo ok -- space ;;
+*) echo oops newline ;;
+esac
+
+# let's check out characters in the ASCII range
+case $'\377' in
+[[:ascii:]]) echo oops -- ascii\?;;
+esac
+
+case 9 in
+[1[:alpha:]123]) echo oops 1;;
+esac
+
+# however, an unterminated brace expression containing a valid char class
+# that matches had better fail
+case a in
+[[:alpha:]) echo oops 2;;
+esac
+
+case $'\b' in
+[[:graph:]]) echo oops 3;;
+esac
+
+case $'\b' in
+[[:print:]]) echo oops 4;;
+esac
+
+case $' ' in
+[[:punct:]]) echo oops 5;;
+esac
+
+# Next, test POSIX.2 collating symbols
+
+case 'a' in
+[[.a.]]) echo ok 1;;
+esac
+
+case '-' in
+[[.hyphen.]-9]) echo ok 2;;
+esac
+
+case 'p' in
+[[.a.]-[.z.]]) echo ok 3;;
+esac
+
+case '-' in
+[[.-.]]) echo ok 4;;
+esac
+
+case ' ' in
+[[.space.]]) echo ok 5;;
+esac
+
+case ' ' in
+[[.grave-accent.]]) echo oops - grave;;
+*) echo ok 6;;
+esac
+
+case '4' in
+[[.-.]-9]) echo ok 7;;
+esac
+
+# an invalid collating symbol cannot be the first part of a range
+case 'c' in
+[[.yyz.]-[.z.]]) echo oops - yyz;;
+*) echo ok 8;;
+esac
+
+case 'c' in
+[[.yyz.][.a.]-z]) echo ok 9;;
+esac
+
+# but when not part of a range is not an error
+case 'c' in
+[[.yyz.][.a.]-[.z.]]) echo ok 10 ;;
+esac
+
+case 'p' in
+[[.a.]-[.Z.]]) echo oops -- bad range ;;
+*) echo ok 11;;
+esac
+
+case p in
+[[.a.]-[.zz.]p]) echo ok 12;;
+*) echo oops -- bad range 2;;
+esac
+
+case p in
+[[.aa.]-[.z.]p]) echo ok 13;;
+*) echo oops -- bad range 3;;
+esac
+
+case c in
+[[.yyz.]cde]) echo ok 14;;
+esac
+
+case abc in
+[[.cb.]a-Za]*) echo ok 15;;
+esac
+
+case $'\t' in
+[[.space.][.tab.][.newline.]]) echo ok 16;;
+esac
+
+# and finally, test POSIX.2 equivalence classes
+
+case "abc" in
+[[:alpha:]][[=b=]][[:ascii:]]) echo ok 1;;
+esac
+
+case "abc" in
+[[:alpha:]][[=B=]][[:ascii:]]) echo oops -- =B=;;
+*) echo ok 2 ;;
+esac
+
+case a in
+[[=b=]) echo oops;; # an incomplete equiv class is just a string
+*) echo ok 3;;
+esac
+
diff --git a/tests/prec.right b/tests/prec.right
new file mode 100644
index 0000000..e6af552
--- /dev/null
+++ b/tests/prec.right
@@ -0,0 +1,28 @@
+`Say' echos its argument. Its return value is of no interest.
+`Truth' echos its argument and returns a TRUE result.
+`False' echos its argument and returns a FALSE result.
+
+ Truth 1 && Truth 2 || Say 3 output=12
+( Truth 1 && Truth 2 ) || Say 3 output=12
+
+ Truth 1 && False 2 || Say 3 output=123
+( Truth 1 && False 2 ) || Say 3 output=123
+
+ False 1 && Truth 2 || Say 3 output=13
+( False 1 && Truth 2 ) || Say 3 output=13
+
+ False 1 && False 2 || Say 3 output=13
+( False 1 && False 2 ) || Say 3 output=13
+
+Truth 1 || Truth 2 && Say 3 output=13
+Truth 1 || ( Truth 2 && Say 3 ) output=1
+
+Truth 1 || False 2 && Say 3 output=13
+Truth 1 || ( False 2 && Say 3 ) output=1
+
+False 1 || Truth 2 && Say 3 output=123
+False 1 || ( Truth 2 && Say 3 ) output=123
+
+False 1 || False 2 && Say 3 output=12
+False 1 || ( False 2 && Say 3 ) output=12
+
diff --git a/tests/precedence b/tests/precedence
new file mode 100755
index 0000000..9bbdb97
--- /dev/null
+++ b/tests/precedence
@@ -0,0 +1,75 @@
+# @(#)precedence_test 1.0 91/07/24 Maarten Litmaath
+# test of relative precedences for `&&' and `||' operators
+
+echo "\`Say' echos its argument. Its return value is of no interest."
+case `echo -n` in
+ '') Say () { echo -n "$*" ; } ;;
+ *) Say () { echo "$*\c" ; } ;;
+esac
+
+echo "\`Truth' echos its argument and returns a TRUE result."
+Truth () {
+ Say $1;
+ return 0;
+}
+
+echo "\`False' echos its argument and returns a FALSE result."
+False () {
+ Say $1;
+ return 1;
+}
+
+echo ""
+
+cmd1='$open $test1 && $test2 $close || $test3'
+cmd2='$test1 || $open $test2 && $test3 $close'
+
+grouping_sh=
+grouping_C='( )'
+
+test3='Say 3'
+
+for i in 1 2
+do
+ eval proto=\$cmd$i
+
+ for test1 in 'Truth 1' 'False 1'
+ do
+ for test2 in 'Truth 2' 'False 2'
+ do
+ for precedence in sh C
+ do
+ eval set x \$grouping_$precedence
+ shift
+ open=${1-' '}
+ close=${2-' '}
+ eval cmd=\""$proto"\"
+ Say "$cmd output="
+ output=`eval "$cmd"`
+ Say "$output"
+ read correct || { echo 'Input fubar. Abort.' >&2; exit 1; }
+ test "X$output" = "X$correct" || echo " correct=$correct"
+ echo ''
+ done
+
+ echo ''
+ done
+ done
+done << EOF
+12
+12
+123
+123
+13
+13
+13
+13
+13
+1
+13
+1
+123
+123
+12
+12
+EOF
diff --git a/tests/printf.right b/tests/printf.right
new file mode 100644
index 0000000..a6bb04d
--- /dev/null
+++ b/tests/printf.right
Binary files differ
diff --git a/tests/printf.tests b/tests/printf.tests
new file mode 100644
index 0000000..3dd5248
--- /dev/null
+++ b/tests/printf.tests
@@ -0,0 +1,311 @@
+LC_ALL=C
+LC_NUMERIC=C
+
+# these should output error messages -- the format is required
+printf
+printf --
+
+# these should output nothing
+printf ""
+printf -- ""
+
+# in the future this may mean to put the output into VAR, but for
+# now it is an error
+# 2005-03-15 no longer an error
+unset var
+printf -v var "%10d" $RANDOM
+echo ${#var}
+
+# this should expand escape sequences in the format string, nothing else
+printf "\tone\n"
+
+# this should not cut off output after the \c
+printf "one\ctwo\n"
+
+# and unrecognized backslash escapes should have the backslash preserverd
+printf "4\.2\n"
+
+printf "no newline " ; printf "now newline\n"
+
+# %% -> %
+printf "%%\n"
+
+# this was a bug caused by pre-processing the string for backslash escapes
+# before doing the `%' format processing -- all versions before bash-2.04
+printf "\045" ; echo
+printf "\045d\n"
+
+# simple character output
+printf "%c\n" ABCD
+
+# test simple string output
+printf "%s\n" unquoted
+
+# test quoted string output
+printf "%s %q\n" unquoted quoted
+printf "%s%10q\n" unquoted quoted
+
+printf "%q\n" 'this&that'
+
+# make sure the format string is reused to use up arguments
+printf "%d " 1 2 3 4 5; printf "\n"
+
+# make sure that extra format characters get null arguments
+printf "%s %d %d %d\n" onestring
+
+printf "%s %d %u %4.2f\n" onestring
+
+printf -- "--%s %s--\n" 4.2 ''
+printf -- "--%s %s--\n" 4.2
+
+# test %b escapes
+
+# 8 is a non-octal digit, so the `81' should be output
+printf -- "--%b--\n" '\n\081'
+
+printf -- "--%b--\n" '\t\0101'
+printf -- "--%b--\n" '\t\101'
+
+# these should all display `A7'
+echo -e "\01017"
+echo -e "\x417"
+
+printf "%b\n" '\01017'
+printf "%b\n" '\1017'
+printf "%b\n" '\x417'
+
+printf -- "--%b--\n" '\"abcd\"'
+printf -- "--%b--\n" "\'abcd\'"
+
+printf -- "--%b--\n" 'a\\x'
+
+printf -- "--%b--\n" '\x'
+
+Z1=$(printf -- "%b\n" '\a\b\e\f\r\v')
+Z2=$'\a\b\e\f\r\v'
+
+if [ "$Z1" != "$Z2" ]; then
+ echo "whoops: printf %b and $'' differ" >&2
+fi
+unset Z1 Z2
+
+printf -- "--%b--\n" ''
+printf -- "--%b--\n"
+
+# the stuff following the \c should be ignored, as well as the rest
+# of the format string
+printf -- "--%b--\n" '4.2\c5.4\n'; printf "\n"
+
+# unrecognized escape sequences should by displayed unchanged
+printf -- "--%b--\n" '4\.2'
+
+# a bare \ should not be processed as an escape sequence
+printf -- "--%b--\n" '\'
+
+# make sure extra arguments are ignored if the format string doesn't
+# actually use them
+printf "\n" 4.4 BSD
+printf " " 4.4 BSD ; printf "\n"
+
+# make sure that a fieldwidth and precision of `*' are handled right
+printf "%10.8s\n" 4.4BSD
+printf "%*.*s\n" 10 8 4.4BSD
+
+printf "%10.8q\n" 4.4BSD
+printf "%*.*q\n" 10 8 4.4BSD
+
+printf "%6b\n" 4.4BSD
+printf "%*b\n" 6 4.4BSD
+
+# we handle this crap with homemade code in printf.def
+printf "%10b\n" 4.4BSD
+printf -- "--%-10b--\n" 4.4BSD
+printf "%4.2b\n" 4.4BSD
+printf "%.3b\n" 4.4BSD
+printf -- "--%-8b--\n" 4.4BSD
+
+# test numeric conversions -- these four lines should echo identically
+printf "%d %u %i 0%o 0x%x 0x%X\n" 255 255 255 255 255 255
+printf "%d %u %i %#o %#x %#X\n" 255 255 255 255 255 255
+
+printf "%ld %lu %li 0%o 0x%x 0x%X\n" 255 255 255 255 255 255
+printf "%ld %lu %li %#o %#x %#X\n" 255 255 255 255 255 255
+
+printf "%10d\n" 42
+printf "%10d\n" -42
+
+printf "%*d\n" 10 42
+printf "%*d\n" 10 -42
+
+# test some simple floating point formats
+printf "%4.2f\n" 4.2
+printf "%#4.2f\n" 4.2
+printf "%#4.1f\n" 4.2
+
+printf "%*.*f\n" 4 2 4.2
+printf "%#*.*f\n" 4 2 4.2
+printf "%#*.*f\n" 4 1 4.2
+
+printf "%E\n" 4.2
+printf "%e\n" 4.2
+printf "%6.1E\n" 4.2
+printf "%6.1e\n" 4.2
+
+printf "%G\n" 4.2
+printf "%g\n" 4.2
+printf "%6.2G\n" 4.2
+printf "%6.2g\n" 4.2
+
+# test some of the more esoteric features of POSIX.1 printf
+printf "%d\n" "'string'"
+printf "%d\n" '"string"'
+
+printf "%#o\n" "'string'"
+printf "%#o\n" '"string"'
+
+printf "%#x\n" "'string'"
+printf "%#X\n" '"string"'
+
+printf "%6.2f\n" "'string'"
+printf "%6.2f\n" '"string"'
+
+# output from these two lines had better be the same
+printf -- "--%6.4s--\n" abcdefghijklmnopqrstuvwxyz
+printf -- "--%6.4b--\n" abcdefghijklmnopqrstuvwxyz
+
+# and these two also
+printf -- "--%12.10s--\n" abcdefghijklmnopqrstuvwxyz
+printf -- "--%12.10b--\n" abcdefghijklmnopqrstuvwxyz
+
+# tests for translating \' to ' and \\ to \
+# printf translates \' to ' in the format string...
+printf "\'abcd\'\n"
+
+# but not when the %b format specification is used
+printf "%b\n" \\\'abcd\\\'
+
+# but both translate \\ to \
+printf '\\abcd\\\n'
+printf "%b\n" '\\abcd\\'
+
+# this was reported as a bug in bash-2.03
+# these three lines should all echo `26'
+printf "%d\n" 0x1a
+printf "%d\n" 032
+printf "%d\n" 26
+
+# error messages
+
+# this should be an overflow, but error messages vary between systems
+# printf "%lu\n" 4294967296
+
+# ...but we cannot use this because some systems (SunOS4, for example),
+# happily ignore overflow conditions in strtol(3)
+#printf "%ld\n" 4294967296
+
+printf "%10"
+printf "ab%Mcd\n"
+
+# this caused an infinite loop in older versions of printf
+printf "%y" 0
+
+# these should print a warning and `0', according to POSIX.2
+printf "%d\n" GNU
+printf "%o\n" GNU
+
+# failures in all bash versions through bash-2.05
+printf "%.0s" foo
+printf "%.*s" 0 foo
+
+printf '%.0b-%.0s\n' foo bar
+printf '(%*b)(%*s)\n' -4 foo -4 bar
+
+format='%'`printf '%0100384d' 0`'d\n'
+printf $format 0
+
+# failures in all bash versions through bash-3.0 - undercounted characters
+unset vv
+printf " %s %s %s \n%n" ab cd ef vv
+echo "$vv"
+
+# this doesn't work with printf(3) on all systems
+#printf "%'s\n" foo
+
+# test cases from an austin-group list discussion
+# prints ^G as an extension
+printf '%b\n' '\7'
+
+# prints ^G
+printf '%b\n' '\0007'
+
+# prints NUL then 7
+printf '\0007\n'
+
+# prints no more than two hex digits
+printf '\x07e\n'
+
+# additional backslash escapes
+printf '\"\?\n'
+
+# failures with decimal precisions until after bash-3.1
+printf '%0.5d\n' 1
+
+printf '%05d\n' 1
+printf '%5d\n' 1
+printf '%0d\n' 1
+
+# failures with various floating point formats and 0 after bash-3.2
+
+printf "%G\n" 0
+printf "%g\n" 0
+printf "%4.2G\n" 0
+printf "%4.2g\n" 0
+
+printf "%G\n" 4
+printf "%g\n" 4
+printf "%4.2G\n" 4
+printf "%4.2g\n" 4
+
+printf "%F\n" 0
+printf "%f\n" 0
+printf "%4.2F\n" 0
+printf "%4.2f\n" 0
+
+printf "%F\n" 4
+printf "%f\n" 4
+printf "%4.2F\n" 4
+printf "%4.2f\n" 4
+
+printf "%E\n" 0
+printf "%e\n" 0
+printf "%4.2E\n" 0
+printf "%4.2e\n" 0
+
+printf "%E\n" 4
+printf "%e\n" 4
+printf "%4.2E\n" 4
+printf "%4.2e\n" 4
+
+printf "%08X\n" 2604292517
+
+# make sure these format specifiers all output '' for empty string arguments
+echo q
+printf "%q\n" ""
+printf "%q\n"
+
+echo s
+printf "%s\n" ''
+printf "%s\n"
+
+echo b
+printf "%b\n" ''
+printf "%b\n"
+
+# bug in bash versions up to and including bash-3.2
+v=yyy
+printf -v var "%s" '/current/working/directory/*.@(m3|i3|ig|mg)'
+shopt -s nullglob extglob
+echo "x$(printf "%b" @(hugo))x"
+printf -v var "%b" @(hugo); echo "x${var}x"
+
+${THIS_SH} ./printf2.sub
diff --git a/tests/printf2.sub b/tests/printf2.sub
new file mode 100644
index 0000000..4cff30d
--- /dev/null
+++ b/tests/printf2.sub
@@ -0,0 +1,6 @@
+export LANG=en_US.UTF-8
+
+case $(printf %d\\n \'À) in
+192) exit 0;;
+*) echo "printf2.sub: multibyte character conversion failed" >&2 ; exit 2 ;;
+esac
diff --git a/tests/quote.right b/tests/quote.right
new file mode 100644
index 0000000..424d1a0
--- /dev/null
+++ b/tests/quote.right
@@ -0,0 +1,68 @@
+Single Quote
+foo
+bar
+foo
+bar
+foo\
+bar
+Double Quote
+foo
+bar
+foo
+bar
+foobar
+Backslash Single Quote
+foo bar
+foo bar
+foobar
+Backslash Double Quote
+foo bar
+foo bar
+foobar
+Double Quote Backslash Single Quote
+foo
+bar
+foo
+bar
+foobar
+Dollar Paren Single Quote
+foo bar
+foo bar
+foo\ bar
+Dollar Paren Double Quote
+foo bar
+foo bar
+foobar
+Double Quote Dollar Paren Single Quote
+foo
+bar
+foo
+bar
+foo\
+bar
+argv[1] = <foo \\^Jbar>
+argv[1] = <foo \^Jbar>
+argv[1] = <sed> argv[2] = <-e> argv[3] = <s/[^I:]/\^J/g>
+argv[1] = <sed> argv[2] = <-e> argv[3] = <s/[^I:]//g>
+argv[1] = <foo\^Jbar>
+argv[1] = <foobar>
+argv[1] = <foo\^Jbar>
+b
+a
+b
+c
+argv[1] = <a\>
+argv[2] = <b>
+argv[1] = <$>
+argv[2] = <bab>
+argv[1] = <$foo>
+argv[2] = <bab>
+argv[1] = <$foo>
+argv[2] = <bab>
+argv[1] = <`>
+argv[2] = <ab>
+argv[1] = <\>
+argv[2] = <ab>
+${
+argv[1] = <(")>
+argv[1] = <(")>
diff --git a/tests/quote.tests b/tests/quote.tests
new file mode 100644
index 0000000..46edea7
--- /dev/null
+++ b/tests/quote.tests
@@ -0,0 +1,111 @@
+echo "Single Quote"
+echo 'foo
+bar'
+echo 'foo
+bar'
+echo 'foo\
+bar'
+
+echo "Double Quote"
+echo "foo
+bar"
+echo "foo
+bar"
+echo "foo\
+bar"
+
+echo "Backslash Single Quote"
+echo `echo 'foo
+bar'`
+echo `echo 'foo
+bar'`
+echo `echo 'foo\
+bar'`
+
+echo "Backslash Double Quote"
+echo `echo "foo
+bar"`
+echo `echo "foo
+bar"`
+echo `echo "foo\
+bar"`
+
+echo "Double Quote Backslash Single Quote"
+echo "`echo 'foo
+bar'`"
+echo "`echo 'foo
+bar'`"
+echo "`echo 'foo\
+bar'`"
+
+echo "Dollar Paren Single Quote"
+echo $(echo 'foo
+bar')
+echo $(echo 'foo
+bar')
+echo $(echo 'foo\
+bar')
+
+echo "Dollar Paren Double Quote"
+echo $(echo "foo
+bar")
+echo $(echo "foo
+bar")
+echo $(echo "foo\
+bar")
+
+echo "Double Quote Dollar Paren Single Quote"
+echo "$(echo 'foo
+bar')"
+echo "$(echo 'foo
+bar')"
+echo "$(echo 'foo\
+bar')"
+
+# old-style command substitution parsing compatibility tests -- post bash-3.1
+recho 'foo \\
+bar'
+
+recho 'foo \
+bar'
+
+echo `recho sed -e 's/[ :]/\\
+/g'`
+
+echo `recho sed -e 's/[ :]/\
+/g'`
+
+echo `recho 'foo\\
+bar'`
+
+echo `recho 'foo\
+bar'`
+
+echo $(recho 'foo\
+bar')
+
+a=`echo 'a b c' | sed 's/ /\\
+/g' | grep 'b'`
+echo $a
+a=`echo 'a b c' | sed 's/ /\\
+/g'`
+echo "$a"
+
+recho `echo 'a\' b`
+
+recho `echo '\$' bab`
+recho `echo '\$foo' bab`
+recho `echo '$foo' bab`
+
+recho `echo '\`' ab`
+
+recho `echo '\\' ab`
+
+echo `echo '${'`
+
+recho `echo "(\\")"`
+# produces no output
+: `: "\\""`
+# ultimate workaround
+recho `echo "(\")"`
+
diff --git a/tests/read.right b/tests/read.right
new file mode 100644
index 0000000..b463825
--- /dev/null
+++ b/tests/read.right
@@ -0,0 +1,65 @@
+a.
+-a-b-
+-a-b -
+-a b-
+-a b-
+-a-b\-
+-a b\-
+-\-a b\-
+-\ a b\-
+-\-a b\-
+-\ a b\-
+argv[1] = <^A>
+argv[1] = <^A>
+argv[1] = <^?>
+argv[1] = <^?>
+argv[1] = <abcd>
+1: x[A] y[B] z[]
+1a:
+2: x[A B]
+[A B ]
+[ A B ]
+==aa==
+====
+====
+argv[1] = < foo>
+argv[1] = < foo>
+argv[1] = <foo>
+argv[1] = < foo>
+argv[1] = <foo>
+argv[1] = <foo>
+argv[1] = < foo>
+a = abcdefg
+a = xyz
+a = -xyz 123-
+a = abc
+timeout 1: ok
+
+timeout 2: ok
+
+./read2.sub: line 23: read: -3: invalid timeout specification
+1
+
+abcde
+./read3.sub: line 4: read: -1: invalid number
+abc
+ab
+#
+while read -u 3 var
+do
+echo "$var"
+done 3<$0
+argv[1] = <>
+argv[1] = <>
+argv[1] = <>
+FOO
+argv[1] = <>
+argv[1] = <3>
+argv[1] = <>
+argv[2] = <>
+argv[3] = <>
+FOO
+ 0 0 0
+0
+0
+1
diff --git a/tests/read.tests b/tests/read.tests
new file mode 100644
index 0000000..fe27dae
--- /dev/null
+++ b/tests/read.tests
@@ -0,0 +1,98 @@
+echo " a " | (read x; echo "$x.")
+
+echo " a b " | ( read x y ; echo -"$x"-"$y"- )
+echo " a b\ " | ( read x y ; echo -"$x"-"$y"- )
+echo " a b " | ( read x ; echo -"$x"- )
+echo " a b\ " | ( read x ; echo -"$x"- )
+
+echo " a b\ " | ( read -r x y ; echo -"$x"-"$y"- )
+echo " a b\ " | ( read -r x ; echo -"$x"- )
+
+echo "\ a b\ " | ( read -r x y ; echo -"$x"-"$y"- )
+echo "\ a b\ " | ( read -r x ; echo -"$x"- )
+echo " \ a b\ " | ( read -r x y ; echo -"$x"-"$y"- )
+echo " \ a b\ " | ( read -r x ; echo -"$x"- )
+
+# make sure that CTLESC and CTLNUL are passed through correctly
+echo $'\001' | ( read var ; recho "$var" )
+echo $'\001' | ( read ; recho "$REPLY" )
+
+echo $'\177' | ( read var ; recho "$var" )
+echo $'\177' | ( read ; recho "$REPLY" )
+
+# make sure a backslash-quoted \\n still disappears from the input when
+# we're not reading in `raw' mode, and no stray CTLESC chars are left in
+# the input stream
+echo $'ab\\\ncd' | ( read ; recho "$REPLY" )
+
+echo "A B " > /tmp/IN
+unset x y z
+read x y z < /tmp/IN
+echo 1: "x[$x] y[$y] z[$z]"
+echo 1a: ${z-z not set}
+read x < /tmp/IN
+echo 2: "x[$x]"
+rm /tmp/IN
+
+# this is where the bash `read' behavior with respect to $REPLY differs
+# from ksh93
+echo "A B " > /tmp/IN
+
+read < /tmp/IN
+echo "[$REPLY]"
+
+rm /tmp/IN
+
+echo " A B " > /tmp/IN
+
+read < /tmp/IN
+echo "[$REPLY]"
+
+rm /tmp/IN
+
+# make sure that read with more variables than words sets the extra
+# variables to the empty string
+
+bvar=bvar
+cvar=cvar
+echo aa > /tmp/IN
+read avar bvar cvar < /tmp/IN
+echo =="$avar"==
+echo =="$bvar"==
+echo =="$cvar"==
+
+rm /tmp/IN
+
+# test behavior of read with various settings of IFS
+
+echo " foo" | { IFS= read line; recho "$line"; }
+
+echo " foo" | { IFS= ; read line; recho "$line"; }
+
+echo " foo" | { unset IFS ; read line; recho "$line"; }
+
+echo " foo" | { IFS=$'\n' ; read line; recho "$line"; }
+
+echo " foo" | { IFS=$' \n' ; read line; recho "$line"; }
+
+echo " foo" | { IFS=$' \t\n' ; read line; recho "$line"; }
+
+echo " foo" | { IFS=$':' ; read line; recho "$line"; }
+
+# test read -d delim behavior
+${THIS_SH} ./read1.sub
+
+# test read -t timeout behavior
+${THIS_SH} ./read2.sub
+
+# test read -n nchars behavior
+${THIS_SH} ./read3.sub
+
+# test read -u fd behavior
+${THIS_SH} ./read4.sub
+
+# test behavior when IFS is not the default -- bug through bash-2.05b
+${THIS_SH} ./read5.sub
+
+# test behavior of read -t 0
+${THIS_SH} ./read6.sub
diff --git a/tests/read1.sub b/tests/read1.sub
new file mode 100644
index 0000000..2a36449
--- /dev/null
+++ b/tests/read1.sub
@@ -0,0 +1,23 @@
+a=7
+echo 'abcdefg|xyz' | {
+ read -d '|' a
+ echo a = "${a-unset}"
+}
+
+echo xyz 123 | {
+ read -d ' ' a
+ echo a = "${a-unset}"
+}
+
+echo xyz 123 | {
+ read -d $'\n' a
+ echo a = -"${a-unset}"-
+}
+
+a=44
+echo abcd | {
+ read -d d a
+ echo a = $a
+}
+
+exit 0
diff --git a/tests/read2.sub b/tests/read2.sub
new file mode 100644
index 0000000..c4a1f77
--- /dev/null
+++ b/tests/read2.sub
@@ -0,0 +1,32 @@
+a=4
+
+read -t 2 a < /dev/tty
+estat=$?
+if [ $estat -gt 128 ]; then
+ echo timeout 1: ok
+else
+ echo $estat
+fi
+
+echo $a
+
+sleep 5 | read -t 1 a
+estat=$?
+if [ $estat -gt 128 ]; then
+ echo timeout 2: ok
+else
+ echo $estat
+fi
+
+echo $a
+
+read -t -3 a < /dev/tty
+echo $?
+
+echo $a
+
+# the above should all time out
+echo abcde | {
+ read -t 2 a
+ echo $a
+}
diff --git a/tests/read3.sub b/tests/read3.sub
new file mode 100644
index 0000000..22088cb
--- /dev/null
+++ b/tests/read3.sub
@@ -0,0 +1,19 @@
+# non-interactive
+
+# error
+read -n -1
+
+# from pipe -- should work, but doesn't change tty attributes
+echo abcdefg | {
+ read -n 3 xyz
+ echo $xyz
+}
+
+# fewer chars than specified
+echo ab | {
+ read -n 3 xyz
+ echo $xyz
+}
+
+read -n 1 < $0
+echo "$REPLY"
diff --git a/tests/read4.sub b/tests/read4.sub
new file mode 100644
index 0000000..80bc9fc
--- /dev/null
+++ b/tests/read4.sub
@@ -0,0 +1,4 @@
+while read -u 3 var
+do
+ echo "$var"
+done 3<$0
diff --git a/tests/read5.sub b/tests/read5.sub
new file mode 100644
index 0000000..58b992d
--- /dev/null
+++ b/tests/read5.sub
@@ -0,0 +1,36 @@
+IFS=: read x y z << EOF
+:::
+EOF
+recho $x
+recho "$x"
+recho $y
+recho "$y"
+recho $z
+recho "$z"
+
+if [ -z "$x" ]; then
+ echo FOO
+else
+ echo BAR
+fi
+
+IFS=: read -a A << EOF
+:::
+EOF
+
+recho ${A[0]}
+recho "${A[0]}"
+
+recho ${#A[@]}
+
+recho "${A[@]}"
+
+if [ -z "${A[0]}" ]; then
+ echo FOO
+else
+ echo BAR
+fi
+
+echo -n ${A[0]} | cat -vet
+echo -n ${A[0]} | wc
+
diff --git a/tests/read6.sub b/tests/read6.sub
new file mode 100644
index 0000000..abfe89d
--- /dev/null
+++ b/tests/read6.sub
@@ -0,0 +1,10 @@
+# test read with a timeout of 0 -- input polling
+# sleep with fractional seconds argument is not universal
+echo abcde | { sleep 0.25 2>/dev/null ; read -t 0; }
+echo $?
+
+read -t 0 < $0
+echo $?
+
+read -t 0
+echo $?
diff --git a/tests/redir.right b/tests/redir.right
new file mode 100644
index 0000000..f816c63
--- /dev/null
+++ b/tests/redir.right
@@ -0,0 +1,141 @@
+abc
+./redir.tests: line 15: /tmp/redir-test: cannot overwrite existing file
+abc
+def
+def
+./redir.tests: line 31: $z: ambiguous redirect
+Point 1
+Point 2
+to a
+to b
+Point 3
+to a
+to a
+to b
+to b
+Point 4
+to c
+Point 5
+this is redir1.sub
+this is redir2.sub
+read line1 "ab"
+read line2 "root"
+read line3 "cd"
+read line4 "daemon"
+from stdin: aa
+to stdout
+./redir4.sub: line 32: $fd: ambiguous redirect
+./redir4.sub: line 33: $fd: ambiguous redirect
+/tmp/err-and-out:
+to stdout
+to stderr
+/tmp/err-and-out:
+to stdout
+to stderr
+0 -- 3 0
+0 -- 4 0
+ab
+cd
+ef
+gh
+ij
+kl
+0
+ab
+cd
+cd
+./redir.tests: line 154: redir1.*: No such file or directory
+# tests of ksh93-like dup-and-close redirection operators
+exec 9<$0
+
+f()
+{
+exec 5<$0
+
+exec 0<&5-
+
+while read line; do
+echo "$line"
+done
+}
+
+f
+
+typeset -f f
+
+# make sure it was closed
+read -u 5 foo
+echo after read
+
+exec 5<&0
+
+exec <&-
+
+read abcde
+
+exec 0<&9-
+read line
+echo $line
+f ()
+{
+ exec 5< $0;
+ exec 0<&5-;
+ while read line; do
+ echo "$line";
+ done
+}
+./redir5.sub: line 20: read: 5: invalid file descriptor: Bad file descriptor
+after read
+./redir5.sub: line 27: read: read error: 0: Bad file descriptor
+# tests of ksh93-like dup-and-close redirection operators
+/
+/
+/
+0
+0
+0
+before block
+after block
+c1 is 1
+c2 is 2
+c3 is 3
+c4 is 4
+fd 10
+fd 8
+fd 10
+fd 8
+1
+2
+3
+4
+1
+2
+3
+4
+cat /tmp/foo
+whatsis
+hey
+to stdout
+to stderr
+
+to stdout
+to stderr
+
+to stderr
+to stdout
+
+to stderr
+hey
+to stdout
+logfunc is a function
+logfunc ()
+{
+ echo "$@" &>>$TMPDIR/log
+}
+foo
+bix is a function
+bix ()
+{
+ echo foo 2>&1 | cat
+}
+foo
diff --git a/tests/redir.tests b/tests/redir.tests
new file mode 100644
index 0000000..37759b5
--- /dev/null
+++ b/tests/redir.tests
@@ -0,0 +1,189 @@
+: ${TMPDIR:=/tmp}
+
+export LC_ALL=C
+export LANG=C
+
+# catch-all for remaining untested redirection stuff
+set +o posix
+
+echo abc > /tmp/redir-test
+cat /tmp/redir-test
+
+set -o noclobber
+
+#this should be an error
+echo def > /tmp/redir-test
+cat /tmp/redir-test
+
+# but this should succeed
+echo def > /tmp/redir-test-2
+cat /tmp/redir-test-2
+
+# and so should this
+echo def >| /tmp/redir-test
+cat /tmp/redir-test
+
+set +o noclobber
+rm /tmp/redir-test /tmp/redir-test-2
+
+# this should be an error
+z="a b"
+cat < $z
+
+echo "Point 1"
+
+exec 3</etc/passwd
+exec 4>$TMPDIR/bash-a
+exec 5>$TMPDIR/bash-b
+echo "Point 2"
+
+echo to a 1>&4
+echo to b 1>&5
+cat $TMPDIR/bash-a
+cat $TMPDIR/bash-b
+exec 11</dev/null
+echo "Point 3"
+
+echo to a 1>&4
+echo to b 1>&5
+cat $TMPDIR/bash-a
+cat $TMPDIR/bash-b
+
+exec 11<&-
+echo "Point 4"
+
+exec 6<>$TMPDIR/bash-c
+echo to c 1>&6
+cat $TMPDIR/bash-c
+echo "Point 5"
+
+rm -f $TMPDIR/bash-a $TMPDIR/bash-b $TMPDIR/bash-c
+
+#
+# Test the effect of input buffering on the shell's input
+#
+${THIS_SH} < redir1.sub
+
+# more open, close, duplicate file descriptors
+${THIS_SH} ./redir3.sub < ./redir3.in1
+
+# still more redirections
+${THIS_SH} ./redir4.sub < redir4.in1
+
+# various forms of null redirection
+testf()
+{
+ if [ -f "$1" ]; then
+ rm -f "$1"
+ else
+ echo oops -- $1 not found
+ fi
+}
+
+> $TMPDIR/null-redir-a
+testf $TMPDIR/null-redir-a
+
+$EXIT > $TMPDIR/null-redir-b
+testf $TMPDIR/null-redir-b
+
+( > $TMPDIR/null-redir-c )
+testf $TMPDIR/null-redir-c
+
+$EXIT > $TMPDIR/null-redir-d &
+wait
+testf $TMPDIR/null-redir-d
+
+exit 3 | $EXIT > $TMPDIR/null-redir-e
+echo $? -- ${PIPESTATUS[@]}
+testf $TMPDIR/null-redir-e
+
+exit 4 | > $TMPDIR/null-redir-f
+echo $? -- ${PIPESTATUS[@]}
+testf $TMPDIR/null-redir-f
+
+> $TMPDIR/null-redir-g &
+wait
+testf $TMPDIR/null-redir-g
+
+exec >$TMPDIR/null-redir-h &
+wait
+testf $TMPDIR/null-redir-h
+
+# make sure async commands don't get /dev/null as stdin when an explicit
+# input redirection is supplied
+for x in 1 2 3; do
+ { read line ; echo $line ; } &
+ wait
+ { read line ; echo $line ; } &
+ wait
+done << EOF
+ab
+cd
+ef
+gh
+ij
+kl
+EOF
+
+# make sure async commands get /dev/null as stdin in the absence of any
+# input redirection
+/bin/cat &
+wait
+echo $?
+
+# make sure that loops work OK with here documents and are not run in
+# subshells
+while read line; do
+ echo $line
+ l2=$line
+done << EOF
+ab
+cd
+EOF
+echo $l2
+
+# These should not echo anything -- bug in versions before 2.04
+( ( echo hello 1>&3 ) 3>&1 ) >/dev/null 2>&1
+
+( ( echo hello 1>&3 ) 3>&1 ) >/dev/null 2>&1 | cat
+
+# in posix mode, non-interactive shells are not allowed to perform
+# filename expansion on input redirections, even if they expand to
+# a single filename
+set -o posix
+cat < redir1.*
+
+# test ksh93 dup-and-close (move fd) redirections
+${THIS_SH} ./redir5.sub
+
+# test behavior after a write error with a builtin command
+${THIS_SH} ./redir6.sub
+
+# problem with redirections using fds bash uses internally
+: ${TMPDIR:=$TMPDIR}
+
+trap 'rm -f $TMPDIR/bash-redir-$$' 0 1 2 3 6 15
+
+echo before block
+{
+ echo before redir
+ exec 10>&1
+ echo after redir
+} > $TMPDIR/bash-redir-$$
+
+echo after block
+
+${THIS_SH} ./redir7.sub
+
+${THIS_SH} ./redir8.sub
+
+exec 9>&2
+command exec 2>$TMPDIR/foo-$$
+echo whatsis >&2
+echo cat /tmp/foo
+cat $TMPDIR/foo-$$
+rm -f $TMPDIR/foo-$$
+exec 2>&9
+exec 9>&-
+
+${THIS_SH} ./redir9.sub
diff --git a/tests/redir1.sub b/tests/redir1.sub
new file mode 100644
index 0000000..f1082e9
--- /dev/null
+++ b/tests/redir1.sub
@@ -0,0 +1,8 @@
+#
+# Test the effect of input buffering on the shell's input
+#
+echo this is redir1.sub
+
+exec 0< redir2.sub
+
+echo BUG: after exec in redir1.sub
diff --git a/tests/redir2.sub b/tests/redir2.sub
new file mode 100644
index 0000000..0820f70
--- /dev/null
+++ b/tests/redir2.sub
@@ -0,0 +1 @@
+echo this is redir2.sub
diff --git a/tests/redir3.in1 b/tests/redir3.in1
new file mode 100644
index 0000000..dbd1fc3
--- /dev/null
+++ b/tests/redir3.in1
@@ -0,0 +1,2 @@
+ab
+cd
diff --git a/tests/redir3.in2 b/tests/redir3.in2
new file mode 100644
index 0000000..5a1c32b
--- /dev/null
+++ b/tests/redir3.in2
@@ -0,0 +1,2 @@
+root
+daemon
diff --git a/tests/redir3.sub b/tests/redir3.sub
new file mode 100644
index 0000000..c486253
--- /dev/null
+++ b/tests/redir3.sub
@@ -0,0 +1,26 @@
+read line1
+
+echo read line1 \"$line1\"
+
+exec 4<./redir3.in2
+
+exec 5<&0
+exec 0<&4
+
+read line2
+
+echo read line2 \"$line2\"
+
+exec 0<&5
+
+read line3
+
+echo read line3 \"$line3\"
+
+exec 0<&4
+
+read line4
+
+echo read line4 \"$line4\"
+
+exec 4<&-
diff --git a/tests/redir4.in1 b/tests/redir4.in1
new file mode 100644
index 0000000..e61ef7b
--- /dev/null
+++ b/tests/redir4.in1
@@ -0,0 +1 @@
+aa
diff --git a/tests/redir4.sub b/tests/redir4.sub
new file mode 100644
index 0000000..4734455
--- /dev/null
+++ b/tests/redir4.sub
@@ -0,0 +1,56 @@
+minus=-
+
+# standard input
+fd=0
+
+exec 3<&$fd
+
+read line <&3
+echo from stdin: $line
+
+# close fd 3
+exec 3<&${minus}
+
+# should give `bad fd', but exact error messages vary
+# read line <&3
+
+# standard output
+fd=1
+
+exec 4>&$fd
+
+echo to stdout >&4
+
+exec 4>&$minus
+
+# should give `bad fd', but exact error messages vary
+# echo to stdout >&4
+
+unset fd
+
+# these are ambiguous redirects
+exec 3<&$fd
+exec 4>&$fd
+
+exec 3>&1 4>&2
+
+exec >&/tmp/err-and-out
+echo to stdout
+echo to stderr >&2
+
+exec 1>&3 2>&4
+echo /tmp/err-and-out:
+cat /tmp/err-and-out
+
+rm /tmp/err-and-out
+
+fd=/tmp/err-and-out
+exec >&$fd
+echo to stdout
+echo to stderr >&2
+
+exec 1>&3 2>&4
+echo /tmp/err-and-out:
+cat /tmp/err-and-out
+
+rm /tmp/err-and-out
diff --git a/tests/redir5.sub b/tests/redir5.sub
new file mode 100644
index 0000000..5d59d39
--- /dev/null
+++ b/tests/redir5.sub
@@ -0,0 +1,31 @@
+# tests of ksh93-like dup-and-close redirection operators
+exec 9<$0
+
+f()
+{
+exec 5<$0
+
+exec 0<&5-
+
+while read line; do
+ echo "$line"
+done
+}
+
+f
+
+typeset -f f
+
+# make sure it was closed
+read -u 5 foo
+echo after read
+
+exec 5<&0
+
+exec <&-
+
+read abcde
+
+exec 0<&9-
+read line
+echo $line
diff --git a/tests/redir6.sub b/tests/redir6.sub
new file mode 100644
index 0000000..60cc68b
--- /dev/null
+++ b/tests/redir6.sub
@@ -0,0 +1,8 @@
+cd /
+pwd
+help >&-
+pwd
+pwd
+echo $?
+echo $?
+echo $?
diff --git a/tests/redir7.sub b/tests/redir7.sub
new file mode 100644
index 0000000..3fd371c
--- /dev/null
+++ b/tests/redir7.sub
@@ -0,0 +1,69 @@
+# weird redirections that caused trouble and were fixed in post-3.0 bash
+stuff()
+{
+ c=1
+ ( sleep 5 < /dev/null >/dev/null 2>&1 & ) &
+}
+
+exec 3>&1
+eval `
+exec 4>&1 >&3 3>&-
+{
+ stuff 4>&-
+ echo "c=$c" >&4
+}`
+echo c1 is $c
+
+unset -f stuff
+
+stuff()
+{
+ c=2
+ ( sleep 5 < /dev/null >/dev/null 2>&1 & )
+}
+
+exec 3>&1
+eval `
+exec 4>&1 >&3 3>&-
+{
+ stuff 4>&-
+ echo "c=$c" >&4
+}`
+echo c2 is $c
+
+unset -f stuff
+
+stuff()
+{
+ c=3
+ { sleep 5 < /dev/null >/dev/null 2>&1 & } &
+}
+
+exec 3>&1
+eval `
+exec 4>&1 >&3 3>&-
+{
+ stuff 4>&-
+ echo "c=$c" >&4
+}`
+echo c3 is $c
+
+unset -f stuff
+
+stuff()
+{
+ c=4
+ { sleep 5 < /dev/null >/dev/null 2>&1 & }
+}
+
+exec 3>&1
+eval `
+exec 4>&1 >&3 3>&-
+{
+ stuff 4>&-
+ echo "c=$c" >&4
+}`
+echo c4 is $c
+
+# fixed in bash-3.1
+echo 'exec <&3' | ${THIS_SH} 3<&0
diff --git a/tests/redir8.sub b/tests/redir8.sub
new file mode 100644
index 0000000..5f972a1
--- /dev/null
+++ b/tests/redir8.sub
@@ -0,0 +1,59 @@
+cd ${TMPDIR:=/var/tmp}
+rm -f u
+
+${THIS_SH} -c 'exec 10>&1; echo fd 10 >&10' 10>u
+cat u
+rm -f u
+
+${THIS_SH} -c 'exec 8>&1; echo fd 8 >&8' 8>u
+cat u
+rm -f u
+
+exec 10>u
+exec 10>&1; echo 'fd 10' >&10
+cat u
+rm -f u
+exec 10>&-
+
+exec 8>u
+exec 8>&1; echo 'fd 8' >&8
+cat u
+rm -f u
+exec 8>&-
+
+rm -f infile
+cat > infile <<EOF
+1
+2
+3
+4
+EOF
+
+exec 7<&0
+exec 10<infile
+exec 0<&10; cat <&10
+exec 0<&7
+exec 7<&-
+
+exec 7<&0
+exec 8<infile
+exec 0<&8 ; cat <&8
+exec 0<&7
+exec 7<&-
+
+exec 7<&0
+exec 0</dev/null
+exec 10<infile
+exec 10<&0; cat <&10
+exec 0<&7
+exec 7<&-
+
+exec 7<&0
+exec 0</dev/null
+exec 8<infile
+exec 8<&0; cat <&8
+exec 0<&7
+exec 7<&-
+
+rm -f infile
+exit 0
diff --git a/tests/redir9.sub b/tests/redir9.sub
new file mode 100644
index 0000000..386ae56
--- /dev/null
+++ b/tests/redir9.sub
@@ -0,0 +1,50 @@
+: ${TMPDIR:=/tmp}
+
+func()
+{
+ echo "to stdout"
+ echo "to stderr" >&2
+}
+
+TMPFN=$TMPDIR/foo-$$
+
+rm -f $TMPFN
+
+echo hey > $TMPFN
+func &>> $TMPFN
+
+cat $TMPFN
+
+echo
+func &> $TMPFN
+
+cat $TMPFN
+
+echo
+func >$TMPFN
+cat $TMPFN
+
+echo
+echo hey > $TMPFN
+func >> $TMPFN
+cat $TMPFN
+
+rm -f $TMPFN
+
+logfunc()
+{
+ echo "$@" &>> $TMPDIR/log
+}
+
+type logfunc
+
+echo foo 2>&1
+
+bix()
+{
+echo foo |& cat
+}
+
+type bix
+
+bix
diff --git a/tests/rhs-exp.right b/tests/rhs-exp.right
new file mode 100644
index 0000000..c5dca42
--- /dev/null
+++ b/tests/rhs-exp.right
@@ -0,0 +1,74 @@
+argv[1] = <TDEFAULTS = -DSELECT_VECS='&m68kcoff_vec'>
+argv[1] = <TDEFAULTS = -DSELECT_VECS=\'&m68kcoff_vec\'>
+argv[1] = <TDEFAULTS = -DSELECT_VECS=&m68kcoff_vec>
+argv[1] = <TDEFAULTS = -DSELECT_VECS="&m68kcoff_vec">
+argv[1] = <TDEFAULTS = -DSELECT_VECS=\&m68kcoff_vec\>
+argv[1] = <TDEFAULTS = -DSELECT_VECS=&m68kcoff_vec>
+argv[1] = <TDEFAULTS = -DSELECT_VECS=$selvecs>
+argv[1] = <TDEFAULTS = -DSELECT_VECS=$selvecs>
+argv[1] = <TDEFAULTS = -DSELECT_VECS='&m68kcoff_vec'>
+argv[1] = <TDEFAULTS = -DSELECT_VECS=\&m68kcoff_vec>
+argv[1] = <TDEFAULTS = -DSELECT_VECS='&m68kcoff_vec'>
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS=$selvecs>
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS='&m68kcoff_vec'>
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS=&m68kcoff_vec>
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS="&m68kcoff_vec">
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS=\&m68kcoff_vec\>
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS=&m68kcoff_vec>
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS=$selvecs>
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS=$selvecs>
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS=$selvecs>
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS=\&m68kcoff_vec>
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS=\'&m68kcoff_vec\'>
+argv[1] = <TDEFAULTS = -DSELECT_VECS=p>
+argv[1] = <TDEFAULTS = -DSELECT_VECS=\p>
+argv[1] = <TDEFAULTS = -DSELECT_VECS=\>
+argv[1] = <TDEFAULTS = -DSELECT_VECS=\>
+argv[1] = <TDEFAULTS = -DSELECT_VECS=\'>
+argv[1] = <TDEFAULTS = -DSELECT_VECS='>
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS=\p>
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS=p>
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS=\>
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS=\>
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS='>
+argv[1] = <TDEFAULTS>
+argv[2] = <=>
+argv[3] = <-DSELECT_VECS=\'>
+a*b
+ab
+a?b
+ab
+a/b
+ab
diff --git a/tests/rhs-exp.tests b/tests/rhs-exp.tests
new file mode 100644
index 0000000..d457198
--- /dev/null
+++ b/tests/rhs-exp.tests
@@ -0,0 +1,49 @@
+selvecs='&m68kcoff_vec'
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS='$selvecs'}"
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=\'$selvecs\'}"
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS="$selvecs"}"
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=\"$selvecs\"}"
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=\\$selvecs\\}"
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=$selvecs}"
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=\$selvecs}"
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS="\$selvecs"}"
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS='$selvecs'"$null"}"
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS="\\$selvecs"}"
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS="\'$selvecs\'"}"
+
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS='$selvecs'}
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS=\'$selvecs\'}
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS="$selvecs"}
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS=\"$selvecs\"}
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS=\\$selvecs\\}
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS=$selvecs}
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS=\$selvecs}
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS="\$selvecs"}
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS='$selvecs'"$null"}
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS="\\$selvecs"}
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS="\'$selvecs\'"}
+
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS="\p"}"
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=\p}"
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS="\\"}"
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=\\}"
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS=\'}"
+recho "TDEFAULTS = ${selvecs:+-DSELECT_VECS="\'"}"
+
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS="\p"}
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS=\p}
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS="\\"}
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS=\\}
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS=\'}
+recho TDEFAULTS = ${selvecs:+-DSELECT_VECS="\'"}
+
+# more tests for bash-3.0 behavior
+
+var="a*b" ; echo "${var//\\*/}"
+var="a*b" ; echo "${var//\*/}"
+
+var="a?b" ; echo "${var//\\?/}"
+var="a?b" ; echo "${var//\?/}"
+
+var="a/b" ; echo "${var//\\//}"
+var="a/b" ; echo "${var//\//}"
diff --git a/tests/rsh.right b/tests/rsh.right
new file mode 100644
index 0000000..04c6971
--- /dev/null
+++ b/tests/rsh.right
@@ -0,0 +1,13 @@
+./rsh.tests: line 9: cd: restricted
+./rsh.tests: line 10: PATH: readonly variable
+./rsh.tests: line 11: SHELL: readonly variable
+./rsh.tests: line 12: /bin/sh: restricted: cannot specify `/' in command names
+./rsh.tests: line 14: .: ./source.sub3: restricted
+./rsh.tests: line 17: /tmp/restricted: restricted: cannot redirect output
+./rsh.tests: line 21: /tmp/restricted: restricted: cannot redirect output
+./rsh.tests: line 26: command: -p: restricted
+./rsh.tests: line 28: set: +r: invalid option
+set: usage: set [--abefhkmnptuvxBCHP] [-o option-name] [arg ...]
+./rsh.tests: line 29: set: restricted: invalid option name
+./rsh.tests: line 31: exec: restricted
+./rsh.tests: after exec
diff --git a/tests/rsh.tests b/tests/rsh.tests
new file mode 100644
index 0000000..ffdf6e5
--- /dev/null
+++ b/tests/rsh.tests
@@ -0,0 +1,33 @@
+# test restricted shell mode -- these should all be errors
+#
+# things not tested for:
+# adding builtins dynamically with enable -f
+# importing function definitions from environment
+
+set -r
+
+cd /
+PATH=$PATH:/usr/local/bin
+SHELL=/bin/sh
+/bin/sh -c 'echo /bin/sh executed'
+
+. ./source.sub3
+
+rm -f /tmp/restricted
+echo abc > /tmp/restricted
+if [ -f /tmp/restricted ]; then
+ echo oops 1 -- output
+fi
+echo abc >> /tmp/restricted
+if [ -f /tmp/restricted ]; then
+ echo oops 2 -- append
+fi
+
+command -p date
+
+set +r
+set +o restricted
+
+exec /bin/date
+
+echo $0: after exec
diff --git a/tests/run-alias b/tests/run-alias
new file mode 100644
index 0000000..6a20b06
--- /dev/null
+++ b/tests/run-alias
@@ -0,0 +1,2 @@
+${THIS_SH} ./alias.tests > /tmp/xx 2>&1
+diff /tmp/xx alias.right && rm -f /tmp/xx
diff --git a/tests/run-all b/tests/run-all
new file mode 100644
index 0000000..d3f3a0e
--- /dev/null
+++ b/tests/run-all
@@ -0,0 +1,29 @@
+#! /bin/sh
+
+PATH=.:$PATH # just to get recho/zecho/printenv if not run via `make tests'
+export PATH
+
+# unset BASH_ENV only if it is set
+[ "${BASH_ENV+set}" = "set" ] && unset BASH_ENV
+# ditto for SHELLOPTS
+#[ "${SHELLOPTS+set}" = "set" ] && unset SHELLOPTS
+
+: ${THIS_SH:=../bash}
+export THIS_SH
+
+${THIS_SH} ./version
+
+rm -f /tmp/xx
+
+echo Any output from any test, unless otherwise noted, indicates a possible anomaly
+
+for x in run-*
+do
+ case $x in
+ $0|run-minimal|run-gprof) ;;
+ *.orig|*~) ;;
+ *) echo $x ; sh $x ;;
+ esac
+done
+
+exit 0
diff --git a/tests/run-appendop b/tests/run-appendop
new file mode 100644
index 0000000..c5bffbc
--- /dev/null
+++ b/tests/run-appendop
@@ -0,0 +1,2 @@
+${THIS_SH} ./appendop.tests > /tmp/xx 2>&1
+diff /tmp/xx appendop.right && rm -f /tmp/xx
diff --git a/tests/run-arith b/tests/run-arith
new file mode 100644
index 0000000..f9f573c
--- /dev/null
+++ b/tests/run-arith
@@ -0,0 +1,2 @@
+${THIS_SH} ./arith.tests > /tmp/xx 2>&1
+diff /tmp/xx arith.right && rm -f /tmp/xx
diff --git a/tests/run-arith-for b/tests/run-arith-for
new file mode 100644
index 0000000..1d13075
--- /dev/null
+++ b/tests/run-arith-for
@@ -0,0 +1,2 @@
+${THIS_SH} ./arith-for.tests > /tmp/xx 2>&1
+diff /tmp/xx arith-for.right && rm -f /tmp/xx
diff --git a/tests/run-array b/tests/run-array
new file mode 100644
index 0000000..6fdbae4
--- /dev/null
+++ b/tests/run-array
@@ -0,0 +1,6 @@
+echo "warning: all of these tests will fail if arrays have not" >&2
+echo "warning: been compiled into the shell" >&2
+echo "warning: the BASH_ARGC and BASH_ARGV tests will fail if debugging support" >&2
+echo "warning: has not been compiled into the shell" >&2
+${THIS_SH} ./array.tests > /tmp/xx 2>&1
+diff /tmp/xx array.right && rm -f /tmp/xx
diff --git a/tests/run-array2 b/tests/run-array2
new file mode 100644
index 0000000..dd94ec8
--- /dev/null
+++ b/tests/run-array2
@@ -0,0 +1,4 @@
+echo "warning: all of these tests will fail if arrays have not" >&2
+echo "warning: been compiled into the shell" >&2
+${THIS_SH} ./array-at-star > /tmp/xx 2>&1
+diff /tmp/xx array2.right && rm -f /tmp/xx
diff --git a/tests/run-assoc b/tests/run-assoc
new file mode 100644
index 0000000..18c3a9c
--- /dev/null
+++ b/tests/run-assoc
@@ -0,0 +1,4 @@
+echo "warning: all of these tests will fail if arrays have not" >&2
+echo "warning: been compiled into the shell" >&2
+${THIS_SH} ./assoc.tests > /tmp/xx 2>&1
+diff /tmp/xx assoc.right && rm -f /tmp/xx
diff --git a/tests/run-braces b/tests/run-braces
new file mode 100644
index 0000000..53d4f1b
--- /dev/null
+++ b/tests/run-braces
@@ -0,0 +1,2 @@
+${THIS_SH} ./braces.tests > /tmp/xx
+diff /tmp/xx braces.right && rm -f /tmp/xx
diff --git a/tests/run-builtins b/tests/run-builtins
new file mode 100644
index 0000000..db88c8c
--- /dev/null
+++ b/tests/run-builtins
@@ -0,0 +1,6 @@
+echo "warning: some of these tests may fail if process substitution has not" >&2
+echo "warning: been compiled into the shell or if the OS does not provide" >&2
+echo "warning: /dev/fd." >&2
+
+${THIS_SH} ./builtins.tests > /tmp/xx 2>&1
+diff /tmp/xx builtins.right && rm -f /tmp/xx
diff --git a/tests/run-case b/tests/run-case
new file mode 100644
index 0000000..71d9b83
--- /dev/null
+++ b/tests/run-case
@@ -0,0 +1,2 @@
+${THIS_SH} ./case.tests > /tmp/xx 2>&1
+diff /tmp/xx case.right && rm -f /tmp/xx
diff --git a/tests/run-casemod b/tests/run-casemod
new file mode 100644
index 0000000..83c1b5a
--- /dev/null
+++ b/tests/run-casemod
@@ -0,0 +1,2 @@
+${THIS_SH} ./casemod.tests > /tmp/xx 2>&1
+diff /tmp/xx casemod.right && rm -f /tmp/xx
diff --git a/tests/run-comsub b/tests/run-comsub
new file mode 100644
index 0000000..0bbcad5
--- /dev/null
+++ b/tests/run-comsub
@@ -0,0 +1,2 @@
+${THIS_SH} ./comsub.tests > /tmp/xx 2>&1
+diff /tmp/xx comsub.right && rm -f /tmp/xx
diff --git a/tests/run-comsub-eof b/tests/run-comsub-eof
new file mode 100644
index 0000000..5c006be
--- /dev/null
+++ b/tests/run-comsub-eof
@@ -0,0 +1,2 @@
+${THIS_SH} ./comsub-eof.tests > /tmp/xx 2>&1
+diff /tmp/xx comsub-eof.right && rm -f /tmp/xx
diff --git a/tests/run-comsub-posix b/tests/run-comsub-posix
new file mode 100644
index 0000000..38bf8ee
--- /dev/null
+++ b/tests/run-comsub-posix
@@ -0,0 +1,2 @@
+${THIS_SH} ./comsub-posix.tests > /tmp/xx 2>&1
+diff /tmp/xx comsub-posix.right && rm -f /tmp/xx
diff --git a/tests/run-cond b/tests/run-cond
new file mode 100644
index 0000000..6b119a6
--- /dev/null
+++ b/tests/run-cond
@@ -0,0 +1,7 @@
+echo "warning: all of these tests will fail if the conditional command has not" >&2
+echo "warning: been compiled into the shell" >&2
+echo "warning: some of these tests will fail if extended pattern matching has not" >&2
+echo "warning: been compiled into the shell" >&2
+
+${THIS_SH} ./cond.tests > /tmp/xx 2>&1
+diff /tmp/xx cond.right && rm -f /tmp/xx
diff --git a/tests/run-coproc b/tests/run-coproc
new file mode 100644
index 0000000..ce62474
--- /dev/null
+++ b/tests/run-coproc
@@ -0,0 +1,4 @@
+echo "warning: the process IDs printed will differ on every run" >&2
+echo "warning: and generate diffs" >&2
+${THIS_SH} ./coproc.tests > /tmp/xx 2>&1
+diff /tmp/xx coproc.right && rm -f /tmp/xx
diff --git a/tests/run-cprint b/tests/run-cprint
new file mode 100644
index 0000000..5f202e4
--- /dev/null
+++ b/tests/run-cprint
@@ -0,0 +1,2 @@
+${THIS_SH} ./cprint.tests > /tmp/xx 2>&1
+diff /tmp/xx cprint.right && rm -f /tmp/xx
diff --git a/tests/run-dbg-support b/tests/run-dbg-support
new file mode 100755
index 0000000..9e9c649
--- /dev/null
+++ b/tests/run-dbg-support
@@ -0,0 +1,11 @@
+#!../bash
+#$Id: run-dbg-support,v 1.5 2002/11/14 06:08:16 rockyb Exp $
+
+TEST_NAME='dbg-support'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null
+set -f
+diff $TEST_FILE ${TEST_NAME}.right && rm -f $TEST_FILE
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
diff --git a/tests/run-dbg-support2 b/tests/run-dbg-support2
new file mode 100755
index 0000000..f62583f
--- /dev/null
+++ b/tests/run-dbg-support2
@@ -0,0 +1,16 @@
+#!../bash
+#$Id: run-dbg-support2,v 1.3 2002/11/14 06:08:16 rockyb Exp $
+
+TEST_NAME='dbg-support2'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null
+set -f
+diff $TEST_FILE ${TEST_NAME}.right && rm -f $TEST_FILE
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
+
+#;;; Local Variables: ***
+#;;; mode:shell-script ***
+#;;; eval: (sh-set-shell "bash") ***
+#;;; End: ***
diff --git a/tests/run-dirstack b/tests/run-dirstack
new file mode 100644
index 0000000..6390d1b
--- /dev/null
+++ b/tests/run-dirstack
@@ -0,0 +1,5 @@
+${THIS_SH} ./dstack.tests > /tmp/xx 2>&1
+diff /tmp/xx dstack.right && rm -f /tmp/xx
+
+${THIS_SH} ./dstack2.tests > /tmp/xx 2>&1
+diff /tmp/xx dstack2.right && rm -f /tmp/xx
diff --git a/tests/run-dollars b/tests/run-dollars
new file mode 100644
index 0000000..0ced414
--- /dev/null
+++ b/tests/run-dollars
@@ -0,0 +1,2 @@
+${THIS_SH} ./dollar-at-star > /tmp/xx 2>&1
+diff /tmp/xx dollar.right && rm -f /tmp/xx
diff --git a/tests/run-errors b/tests/run-errors
new file mode 100644
index 0000000..6be4e0c
--- /dev/null
+++ b/tests/run-errors
@@ -0,0 +1,2 @@
+${THIS_SH} ./errors.tests > /tmp/xx 2>&1
+diff /tmp/xx errors.right && rm -f /tmp/xx
diff --git a/tests/run-execscript b/tests/run-execscript
new file mode 100644
index 0000000..f97ab21
--- /dev/null
+++ b/tests/run-execscript
@@ -0,0 +1,9 @@
+echo "warning: the text of a system error message may vary between systems and" >&2
+echo "warning: produce diff output." >&2
+echo "warning: if the text of the error messages concerning \`notthere' or" >&2
+echo "warning: \`/tmp/bash-notthere' not being found or \`/' being a directory" >&2
+echo "warning: produce diff output, please do not consider this a test failure" >&2
+echo "warning: if diff output differing only in the location of the bash" >&2
+echo "warning: binary appears, please do not consider this a test failure" >&2
+${THIS_SH} ./execscript > /tmp/xx 2>&1
+diff /tmp/xx exec.right && rm -f /tmp/xx
diff --git a/tests/run-exp-tests b/tests/run-exp-tests
new file mode 100644
index 0000000..cbabace
--- /dev/null
+++ b/tests/run-exp-tests
@@ -0,0 +1,2 @@
+${THIS_SH} ./exp.tests | grep -v '^expect' > /tmp/xx
+diff /tmp/xx exp.right && rm -f /tmp/xx
diff --git a/tests/run-extglob b/tests/run-extglob
new file mode 100644
index 0000000..06316ad
--- /dev/null
+++ b/tests/run-extglob
@@ -0,0 +1,4 @@
+PATH=$PATH:`pwd`
+export PATH
+${THIS_SH} ./extglob.tests | grep -v '^expect' > /tmp/xx
+diff /tmp/xx extglob.right && rm -f /tmp/xx
diff --git a/tests/run-extglob2 b/tests/run-extglob2
new file mode 100644
index 0000000..0a6f728
--- /dev/null
+++ b/tests/run-extglob2
@@ -0,0 +1,4 @@
+PATH=$PATH:`pwd`
+export PATH
+${THIS_SH} ./extglob2.tests | grep -v '^expect' > /tmp/xx
+diff /tmp/xx extglob2.right && rm -f /tmp/xx
diff --git a/tests/run-extglob3 b/tests/run-extglob3
new file mode 100644
index 0000000..2675196
--- /dev/null
+++ b/tests/run-extglob3
@@ -0,0 +1,4 @@
+PATH=$PATH:`pwd`
+export PATH
+${THIS_SH} ./extglob3.tests > /tmp/xx
+diff /tmp/xx extglob3.right && rm -f /tmp/xx
diff --git a/tests/run-func b/tests/run-func
new file mode 100644
index 0000000..f449eb8
--- /dev/null
+++ b/tests/run-func
@@ -0,0 +1,5 @@
+echo "warning: if you have exported functions defined in your environment," >&2
+echo "warning: they may show up as diff output." >&2
+echo "warning: if so, please do not consider this a test failure" >&2
+${THIS_SH} ./func.tests > /tmp/xx 2>&1
+diff /tmp/xx func.right && rm -f /tmp/xx
diff --git a/tests/run-getopts b/tests/run-getopts
new file mode 100644
index 0000000..1e8b5fb
--- /dev/null
+++ b/tests/run-getopts
@@ -0,0 +1,2 @@
+${THIS_SH} ./getopts.tests > /tmp/xx 2>&1
+diff /tmp/xx getopts.right && rm -f /tmp/xx
diff --git a/tests/run-glob-test b/tests/run-glob-test
new file mode 100644
index 0000000..7a12343
--- /dev/null
+++ b/tests/run-glob-test
@@ -0,0 +1,4 @@
+PATH=$PATH:`pwd`
+export PATH
+${THIS_SH} ./glob.tests 2>&1 | grep -v '^expect' > /tmp/xx
+diff /tmp/xx glob.right && rm -f /tmp/xx
diff --git a/tests/run-globstar b/tests/run-globstar
new file mode 100644
index 0000000..d12cce9
--- /dev/null
+++ b/tests/run-globstar
@@ -0,0 +1,4 @@
+PATH=$PATH:`pwd`
+export PATH
+${THIS_SH} ./globstar.tests > /tmp/xx 2>&1
+diff /tmp/xx globstar.right && rm -f /tmp/xx
diff --git a/tests/run-heredoc b/tests/run-heredoc
new file mode 100644
index 0000000..c4e3168
--- /dev/null
+++ b/tests/run-heredoc
@@ -0,0 +1,2 @@
+${THIS_SH} ./heredoc.tests > /tmp/xx 2>&1
+diff /tmp/xx heredoc.right && rm -f /tmp/xx
diff --git a/tests/run-herestr b/tests/run-herestr
new file mode 100644
index 0000000..8c5b36d
--- /dev/null
+++ b/tests/run-herestr
@@ -0,0 +1,2 @@
+${THIS_SH} ./herestr.tests > /tmp/xx 2>&1
+diff /tmp/xx herestr.right && rm -f /tmp/xx
diff --git a/tests/run-histexpand b/tests/run-histexpand
new file mode 100644
index 0000000..06a415b
--- /dev/null
+++ b/tests/run-histexpand
@@ -0,0 +1,4 @@
+echo "warning: all of these tests will fail if history has not been compiled" >&2
+echo "warning: into the shell" >&2
+${THIS_SH} ./histexp.tests > /tmp/xx 2>&1
+diff /tmp/xx histexp.right && rm -f /tmp/xx
diff --git a/tests/run-history b/tests/run-history
new file mode 100644
index 0000000..ea356b1
--- /dev/null
+++ b/tests/run-history
@@ -0,0 +1,4 @@
+echo "warning: all of these tests will fail if history has not been compiled" >&2
+echo "warning: into the shell" >&2
+${THIS_SH} ./history.tests > /tmp/xx 2>&1
+diff /tmp/xx history.right && rm -f /tmp/xx
diff --git a/tests/run-ifs b/tests/run-ifs
new file mode 100644
index 0000000..3f9d820
--- /dev/null
+++ b/tests/run-ifs
@@ -0,0 +1,2 @@
+${THIS_SH} ./ifs.tests > /tmp/xx 2>&1
+diff /tmp/xx ifs.right && rm -f /tmp/xx
diff --git a/tests/run-ifs-posix b/tests/run-ifs-posix
new file mode 100644
index 0000000..e578e8d
--- /dev/null
+++ b/tests/run-ifs-posix
@@ -0,0 +1,2 @@
+${THIS_SH} ./ifs-posix.tests > /tmp/xx 2>&1
+diff /tmp/xx ifs-posix.right && rm -f /tmp/xx
diff --git a/tests/run-input-test b/tests/run-input-test
new file mode 100644
index 0000000..aaa5d35
--- /dev/null
+++ b/tests/run-input-test
@@ -0,0 +1,2 @@
+${THIS_SH} < ./input-line.sh > /tmp/xx
+diff /tmp/xx input.right && rm -f /tmp/xx
diff --git a/tests/run-intl b/tests/run-intl
new file mode 100644
index 0000000..6a9234a
--- /dev/null
+++ b/tests/run-intl
@@ -0,0 +1,8 @@
+# See whether or not we can use `diff -a'
+( diff -a ./intl.right ./intl.right >/dev/null 2>&1 ) && AFLAG=-a
+
+echo "warning: some of these tests will fail if you do not have UTF-8" >&2
+echo "warning: locales installed on your system." >&2
+echo "warning: please ignore any differences consisting only of white space" >&2
+${THIS_SH} ./intl.tests > /tmp/xx
+diff $AFLAG /tmp/xx intl.right && rm -f /tmp/xx
diff --git a/tests/run-invert b/tests/run-invert
new file mode 100644
index 0000000..4949307
--- /dev/null
+++ b/tests/run-invert
@@ -0,0 +1,2 @@
+${THIS_SH} ./invert.tests 2>&1 | grep -v '^expect' > /tmp/xx
+diff /tmp/xx invert.right && rm -f /tmp/xx
diff --git a/tests/run-iquote b/tests/run-iquote
new file mode 100644
index 0000000..61a8aa7
--- /dev/null
+++ b/tests/run-iquote
@@ -0,0 +1,2 @@
+${THIS_SH} ./iquote.tests >/tmp/xx 2>&1
+diff /tmp/xx iquote.right && rm -f /tmp/xx
diff --git a/tests/run-jobs b/tests/run-jobs
new file mode 100644
index 0000000..bfd4fa0
--- /dev/null
+++ b/tests/run-jobs
@@ -0,0 +1,7 @@
+echo "warning: some of these tests may fail if job control has not been compiled" >&2
+echo "warning: into the shell" >&2
+echo "warning: there may be a message regarding a cat process dying due to a" >&2
+echo "warning: SIGHUP. Please disregard." >&2
+
+${THIS_SH} ./jobs.tests > /tmp/xx 2>&1
+diff /tmp/xx jobs.right && rm -f /tmp/xx
diff --git a/tests/run-mapfile b/tests/run-mapfile
new file mode 100644
index 0000000..a207f09
--- /dev/null
+++ b/tests/run-mapfile
@@ -0,0 +1,2 @@
+${THIS_SH} ./mapfile.tests > /tmp/xx 2>&1
+diff /tmp/xx mapfile.right && rm -f /tmp/xx
diff --git a/tests/run-minimal b/tests/run-minimal
new file mode 100644
index 0000000..0054cda
--- /dev/null
+++ b/tests/run-minimal
@@ -0,0 +1,36 @@
+#! /bin/sh
+#
+# run-minimal - a version of run-all for shells configured with
+# --enable-minimal-config
+#
+PATH=.:$PATH # just to get the right version of printenv
+export PATH
+
+# unset BASH_ENV only if it is set
+[ "${BASH_ENV+set}" = "set" ] && unset BASH_ENV
+# ditto for SHELLOPTS
+#[ "${SHELLOPTS+set}" = "set" ] && unset SHELLOPTS
+
+: ${THIS_SH:=../bash}
+export THIS_SH
+
+${THIS_SH} ./version.mini
+
+rm -f /tmp/xx
+
+echo Testing ${THIS_SH}
+echo Any output from any test, unless otherwise noted, indicates a possible anomaly
+for x in run-*
+do
+ case $x in
+ $0) ;;
+ *.orig|*~) ;;
+ run-dollars|run-execscript|run-func|run-getopts|run-heredoc) echo $x ; sh $x ;;
+ run-ifs-tests|run-input-test|run-invert|run-more-exp|run-nquote) echo $x ; sh $x ;;
+ run-ifs-posix|run-posix2|run-posixpat) echo $x ; sh $x ;;
+ run-precedence|run-quote|run-read|run-rhs-exp|run-strip|run-tilde) echo $x ; sh $x ;;
+ *) ;;
+ esac
+done
+
+exit 0
diff --git a/tests/run-more-exp b/tests/run-more-exp
new file mode 100644
index 0000000..60f55cb
--- /dev/null
+++ b/tests/run-more-exp
@@ -0,0 +1,2 @@
+${THIS_SH} ./more-exp.tests 2>&1 | grep -v '^expect' > /tmp/xx
+diff /tmp/xx more-exp.right && rm -f /tmp/xx
diff --git a/tests/run-new-exp b/tests/run-new-exp
new file mode 100644
index 0000000..2e3d7c9
--- /dev/null
+++ b/tests/run-new-exp
@@ -0,0 +1,10 @@
+echo "warning: two of these tests will fail if your OS does not support" >&2
+echo "warning: named pipes or the /dev/fd filesystem. If the tests of the" >&2
+echo "warning: process substitution mechanism fail, please do not consider" >&2
+echo "warning: this a test failure" >&2
+echo "warning: if you have exported variables beginning with the string _Q," >&2
+echo "warning: diff output may be generated. If so, please do not consider" >&2
+echo "warning: this a test failure" >&2
+
+${THIS_SH} ./new-exp.tests 2>&1 | grep -v '^expect' > /tmp/xx
+diff /tmp/xx new-exp.right && rm -f /tmp/xx
diff --git a/tests/run-nquote b/tests/run-nquote
new file mode 100644
index 0000000..006872c
--- /dev/null
+++ b/tests/run-nquote
@@ -0,0 +1,2 @@
+${THIS_SH} ./nquote.tests 2>&1 | grep -v '^expect' > /tmp/xx
+diff /tmp/xx nquote.right && rm -f /tmp/xx
diff --git a/tests/run-nquote1 b/tests/run-nquote1
new file mode 100644
index 0000000..a71740f
--- /dev/null
+++ b/tests/run-nquote1
@@ -0,0 +1,4 @@
+echo "warning: several of these tests will fail if arrays have not" >&2
+echo "warning: been compiled into the shell." >&2
+${THIS_SH} ./nquote1.tests 2>&1 | grep -v '^expect' > /tmp/xx
+diff /tmp/xx nquote1.right && rm -f /tmp/xx
diff --git a/tests/run-nquote2 b/tests/run-nquote2
new file mode 100644
index 0000000..80d1a8d
--- /dev/null
+++ b/tests/run-nquote2
@@ -0,0 +1,4 @@
+echo "warning: several of these tests will fail if arrays have not" >&2
+echo "warning: been compiled into the shell." >&2
+${THIS_SH} ./nquote2.tests 2>&1 | grep -v '^expect' > /tmp/xx
+diff /tmp/xx nquote2.right && rm -f /tmp/xx
diff --git a/tests/run-nquote3 b/tests/run-nquote3
new file mode 100644
index 0000000..45ba5f7
--- /dev/null
+++ b/tests/run-nquote3
@@ -0,0 +1,4 @@
+echo "warning: several of these tests will fail if arrays have not" >&2
+echo "warning: been compiled into the shell." >&2
+${THIS_SH} ./nquote3.tests 2>&1 | grep -v '^expect' > /tmp/xx
+diff /tmp/xx nquote3.right && rm -f /tmp/xx
diff --git a/tests/run-nquote4 b/tests/run-nquote4
new file mode 100644
index 0000000..493f4aa
--- /dev/null
+++ b/tests/run-nquote4
@@ -0,0 +1,4 @@
+echo warning: some of these tests will fail if you do not have UTF-8 >&2
+echo warning: locales installed on your system >&2
+${THIS_SH} ./nquote4.tests 2>&1 | grep -v '^expect' > /tmp/xx
+diff /tmp/xx nquote4.right && rm -f /tmp/xx
diff --git a/tests/run-nquote5 b/tests/run-nquote5
new file mode 100644
index 0000000..14cef64
--- /dev/null
+++ b/tests/run-nquote5
@@ -0,0 +1,2 @@
+${THIS_SH} ./nquote5.tests 2>&1 | grep -v '^expect' > /tmp/xx
+diff /tmp/xx nquote5.right && rm -f /tmp/xx
diff --git a/tests/run-posix2 b/tests/run-posix2
new file mode 100644
index 0000000..52eea2f
--- /dev/null
+++ b/tests/run-posix2
@@ -0,0 +1,2 @@
+${THIS_SH} ./posix2.tests 2>&1 | grep -v '^expect' > /tmp/xx
+diff /tmp/xx posix2.right && rm -f /tmp/xx
diff --git a/tests/run-posixpat b/tests/run-posixpat
new file mode 100644
index 0000000..ef2b140
--- /dev/null
+++ b/tests/run-posixpat
@@ -0,0 +1,2 @@
+${THIS_SH} ./posixpat.tests > /tmp/xx
+diff /tmp/xx posixpat.right && rm -f /tmp/xx
diff --git a/tests/run-precedence b/tests/run-precedence
new file mode 100644
index 0000000..d81a868
--- /dev/null
+++ b/tests/run-precedence
@@ -0,0 +1,2 @@
+${THIS_SH} ./precedence > /tmp/xx
+diff /tmp/xx prec.right && rm -f /tmp/xx
diff --git a/tests/run-printf b/tests/run-printf
new file mode 100644
index 0000000..4555c62
--- /dev/null
+++ b/tests/run-printf
@@ -0,0 +1,5 @@
+# See whether or not we can use `diff -a'
+( diff -a ./printf.tests ./printf.tests >/dev/null 2>&1 ) && AFLAG=-a
+
+${THIS_SH} ./printf.tests > /tmp/xx 2>&1
+diff $AFLAG /tmp/xx printf.right && rm -f /tmp/xx
diff --git a/tests/run-quote b/tests/run-quote
new file mode 100644
index 0000000..6905042
--- /dev/null
+++ b/tests/run-quote
@@ -0,0 +1,2 @@
+${THIS_SH} ./quote.tests >/tmp/xx 2>&1
+diff /tmp/xx quote.right && rm -f /tmp/xx
diff --git a/tests/run-read b/tests/run-read
new file mode 100644
index 0000000..47e4188
--- /dev/null
+++ b/tests/run-read
@@ -0,0 +1,4 @@
+echo "warning: please do not consider output differing only in the amount of" >&2
+echo "warning: white space to be an error." >&2
+${THIS_SH} ./read.tests > /tmp/xx 2>&1
+diff /tmp/xx read.right && rm -f /tmp/xx
diff --git a/tests/run-redir b/tests/run-redir
new file mode 100644
index 0000000..2be45dd
--- /dev/null
+++ b/tests/run-redir
@@ -0,0 +1,7 @@
+echo "warning: the text of a system error message may vary between systems and" >&2
+echo "warning: produce diff output." >&2
+echo "warning: if the text of an error message concerning \`redir1.*' not being" >&2
+echo "warning: found or messages concerning bad file descriptors produce diff" >&2
+echo "warning: output, please do not consider it a test failure" >&2
+${THIS_SH} ./redir.tests > /tmp/xx 2>&1
+diff /tmp/xx redir.right && rm -f /tmp/xx
diff --git a/tests/run-rhs-exp b/tests/run-rhs-exp
new file mode 100644
index 0000000..1f89d0b
--- /dev/null
+++ b/tests/run-rhs-exp
@@ -0,0 +1,2 @@
+${THIS_SH} ./rhs-exp.tests 2>&1 > /tmp/xx
+diff /tmp/xx rhs-exp.right && rm -f /tmp/xx
diff --git a/tests/run-rsh b/tests/run-rsh
new file mode 100644
index 0000000..ef23583
--- /dev/null
+++ b/tests/run-rsh
@@ -0,0 +1,2 @@
+${THIS_SH} ./rsh.tests > /tmp/xx 2>&1
+diff /tmp/xx rsh.right && rm -f /tmp/xx
diff --git a/tests/run-set-e b/tests/run-set-e
new file mode 100644
index 0000000..3389f11
--- /dev/null
+++ b/tests/run-set-e
@@ -0,0 +1,2 @@
+${THIS_SH} ./set-e.tests > /tmp/xx
+diff /tmp/xx set-e.right && rm -f /tmp/xx
diff --git a/tests/run-set-x b/tests/run-set-x
new file mode 100755
index 0000000..b999e69
--- /dev/null
+++ b/tests/run-set-x
@@ -0,0 +1,11 @@
+#!../bash
+#$Id: run-set-x,v 1.1 2002/12/09 13:12:37 rockyb Exp $
+
+TEST_NAME='set-x'
+TEST_FILE="/tmp/${TEST_NAME}.check"
+${THIS_SH} ./${TEST_NAME}.tests > $TEST_FILE 2>&1 < /dev/null
+set -f
+diff $TEST_FILE ${TEST_NAME}.right && rm -f $TEST_FILE
+
+# Return code tells testing mechanism whether passed or not.
+exit $?
diff --git a/tests/run-shopt b/tests/run-shopt
new file mode 100644
index 0000000..100a3de
--- /dev/null
+++ b/tests/run-shopt
@@ -0,0 +1,2 @@
+${THIS_SH} ./shopt.tests > /tmp/xx 2>&1
+diff /tmp/xx shopt.right && rm -f /tmp/xx
diff --git a/tests/run-strip b/tests/run-strip
new file mode 100644
index 0000000..0d32115
--- /dev/null
+++ b/tests/run-strip
@@ -0,0 +1,2 @@
+${THIS_SH} ./strip.tests > /tmp/xx
+diff /tmp/xx strip.right && rm -f /tmp/xx
diff --git a/tests/run-test b/tests/run-test
new file mode 100644
index 0000000..b2482c3
--- /dev/null
+++ b/tests/run-test
@@ -0,0 +1,4 @@
+unset GROUPS UID 2>/dev/null
+
+${THIS_SH} ./test.tests >/tmp/xx 2>&1
+diff /tmp/xx test.right && rm -f /tmp/xx
diff --git a/tests/run-tilde b/tests/run-tilde
new file mode 100644
index 0000000..b8569c1
--- /dev/null
+++ b/tests/run-tilde
@@ -0,0 +1,2 @@
+${THIS_SH} ./tilde.tests > /tmp/xx
+diff /tmp/xx tilde.right && rm -f /tmp/xx
diff --git a/tests/run-tilde2 b/tests/run-tilde2
new file mode 100644
index 0000000..4446989
--- /dev/null
+++ b/tests/run-tilde2
@@ -0,0 +1,2 @@
+${THIS_SH} ./tilde2.tests > /tmp/xx
+diff /tmp/xx tilde2.right && rm -f /tmp/xx
diff --git a/tests/run-trap b/tests/run-trap
new file mode 100644
index 0000000..14f6874
--- /dev/null
+++ b/tests/run-trap
@@ -0,0 +1,6 @@
+echo "warning: UNIX versions number signals and schedule processes differently." >&2
+echo "warning: If output differing only in line numbers is produced, please" >&2
+echo "warning: do not consider this a test failure." >&2
+
+${THIS_SH} ./trap.tests > /tmp/xx 2>&1
+diff /tmp/xx trap.right && rm -f /tmp/xx
diff --git a/tests/run-type b/tests/run-type
new file mode 100644
index 0000000..4d195b0
--- /dev/null
+++ b/tests/run-type
@@ -0,0 +1,2 @@
+${THIS_SH} ./type.tests > /tmp/xx 2>&1
+diff /tmp/xx type.right && rm -f /tmp/xx
diff --git a/tests/run-varenv b/tests/run-varenv
new file mode 100644
index 0000000..f0ce195
--- /dev/null
+++ b/tests/run-varenv
@@ -0,0 +1,2 @@
+${THIS_SH} ./varenv.sh | grep -v '^expect' > /tmp/xx
+diff /tmp/xx varenv.right && rm -f /tmp/xx
diff --git a/tests/run-vredir b/tests/run-vredir
new file mode 100644
index 0000000..9a96377
--- /dev/null
+++ b/tests/run-vredir
@@ -0,0 +1,2 @@
+${THIS_SH} ./vredir.tests > /tmp/xx 2>&1
+diff /tmp/xx vredir.right && rm -f /tmp/xx
diff --git a/tests/set-e.right b/tests/set-e.right
new file mode 100644
index 0000000..85a5986
--- /dev/null
+++ b/tests/set-e.right
@@ -0,0 +1,67 @@
+95
+96
+97
+98
+99
+0
+1
+2
+3
+4
+5
+6
+7
+8
+9
+1
+1
+ok
+hi
+while succeeded
+until succeeded: 4
+if succeeded
+AND list succeeded
+OR list succeeded
+! succeeded
+eval succeeded
+! eval succeeded -- 1
+! eval succeeded -- 2
+a
+0
+b
+0
+after 1
+a
+0
+non-posix foo
+after brace group failure: 1
+A 1
+B 0
+C 0
+D 0
+D 1
+A 1
+B 0
+C 0
+D 0
+D 1
+A 1
+B 0
+C 0
+A 1
+B 1
+C 0
+B 0
+C 0
+after negation 1: 0
+after negation 2: 0
+after negation 3: 1
+after negation 4: 0
+after brace pipeline
+foo
+after failure 1
+after failure 2
+after failure 3
+true || false no exit
+false || true no exit
+false && false no exit
diff --git a/tests/set-e.tests b/tests/set-e.tests
new file mode 100644
index 0000000..8c0cfcf
--- /dev/null
+++ b/tests/set-e.tests
@@ -0,0 +1,110 @@
+if : ; then
+ set -e
+ N=95
+ while :; do
+ # expr returns 1 if expression is null or 0
+ set +e
+ N_MOD_100=`expr $N % 100`
+ set -e
+ echo $N_MOD_100
+ N=`expr $N + 1`
+ if [ $N -eq 110 ]; then
+ break
+ fi
+ done
+ set +e
+fi
+
+(
+set -e
+false
+echo bad
+)
+echo $?
+
+x=$(
+set -e
+false
+echo bad
+)
+echo $? $x
+
+# command subst should not inherit -e
+set -e
+echo $(false; echo ok)
+
+if set +e
+then
+ false
+fi
+echo hi
+
+set -e
+
+# a failing command in the compound list following a while, until, or
+# if should not cause the shell to exit
+
+while false; do
+ echo hi
+done
+echo while succeeded
+
+x=1
+until (( x == 4 )); do
+ x=4
+done
+echo until succeeded: $x
+
+if false; then
+ echo oops
+fi
+echo if succeeded
+
+# failing commands that are part of an AND or OR list should not
+# cause the shell to exit
+false && echo AND list failed
+echo AND list succeeded
+
+false || echo OR list succeeded
+
+! false
+echo ! succeeded
+
+# make sure eval preserves the state of the -e flag and `!' reserved word
+set -e
+if eval false; then
+ echo oops
+fi
+echo eval succeeded
+
+! eval false
+echo ! eval succeeded -- 1
+
+! eval '(exit 5)'
+echo ! eval succeeded -- 2
+
+set -e
+until builtin false; do echo a; break; done
+echo $?
+
+until eval false; do echo b; break; done
+echo $?
+
+: ${TMPDIR:=/tmp}
+FN=$TMPDIR/set-e-$$
+cat > $FN << EOF
+false
+echo after 1
+false
+EOF
+
+set -e
+until . $FN; do echo a; break; done
+echo $?
+
+rm -f $FN
+
+set +e
+
+${THIS_SH} ./set-e1.sub
+${THIS_SH} ./set-e2.sub
diff --git a/tests/set-e1.sub b/tests/set-e1.sub
new file mode 100644
index 0000000..a800560
--- /dev/null
+++ b/tests/set-e1.sub
@@ -0,0 +1,59 @@
+# subshell failure should cause the shell to exit silently
+${THIS_SH} -ce '(exit 17) ; echo "after (exit 17): $?"'
+
+# pipeline failure should cause shell to exit silently
+${THIS_SH} -c 'set -e ; false | echo foo | while read x ; do ( exit 17 ) ; done; echo after pipeline subshell;'
+
+# should be silent in posix mode
+${THIS_SH} -c 'set -o posix; set -e ; z=$(false;echo posix foo) ; echo $z'
+# but echo foo in non-posix
+${THIS_SH} -c 'set -e ; z=$(false;echo non-posix foo) ; echo $z'
+
+${THIS_SH} -ce 'x=$(false) ; echo "x=\$(false) does not exit"'
+
+${THIS_SH} -ce '{ false; echo false in brace group does not exit; }'
+echo after brace group failure: $?
+
+${THIS_SH} -ce '(false ; echo A $?) && echo B $?; echo C $?'; echo D $?
+
+${THIS_SH} -ce '(false ; echo A $?) ; echo B $?; echo C $?'; echo D $?
+
+${THIS_SH} -ce 'f() (false ; echo A $?); f && echo B $?; echo C $?'; echo D $?
+
+${THIS_SH} -ce 'f() (false ; echo A $?) ; f; echo B $?; echo C $?'; echo D $?
+
+${THIS_SH} -ce 'if false; echo A $?; then echo B $?; fi'; echo C $?
+
+${THIS_SH} -ce '! { false; echo A $?; } | cat; echo B $?'; echo C $?
+
+${THIS_SH} -ce '{ false; echo A $?; } | cat ; echo B $?'; echo C $?
+
+set -e
+
+! false
+echo after negation 1: $?
+
+! false | false
+echo after negation 2: $?
+
+! true
+echo after negation 3: $?
+
+! (false)
+echo after negation 4: $?
+
+{ false ; echo foo; } | cat
+echo after brace pipeline
+
+false | echo foo | cat
+echo after failure 1
+
+false | (echo foo; false) | true
+echo after failure 2
+
+false | echo foo | while read x ; do ( exit 17 ) ; done | true
+echo after failure 3
+
+# this pipeline failure should cause the shell to exit
+false | echo foo | false
+echo after failure 4
diff --git a/tests/set-e2.sub b/tests/set-e2.sub
new file mode 100644
index 0000000..de04e99
--- /dev/null
+++ b/tests/set-e2.sub
@@ -0,0 +1,10 @@
+${THIS_SH} -ce 'true || false ; echo "true || false no exit"'
+${THIS_SH} -ce 'false || false ; echo "false || false no exit"'
+${THIS_SH} -ce 'false || true ; echo "false || true no exit"'
+
+${THIS_SH} -ce 'false && false ; echo "false && false no exit"'
+${THIS_SH} -ce 'true && false ; echo "true && false no exit"'
+
+${THIS_SH} -ce 'true && (exit 1) ; echo "true && (exit 1) no exit"'
+${THIS_SH} -ce 'true && true|false ; echo "true && true|false no exit"'
+${THIS_SH} -ce 'true && true|(false) ; echo "true && true|(false) no exit"'
diff --git a/tests/set-x.right b/tests/set-x.right
new file mode 100644
index 0000000..a41a382
--- /dev/null
+++ b/tests/set-x.right
@@ -0,0 +1,56 @@
++ (( i=0 ))
++ (( i<=5 ))
++ x=0
++ (( i++ ))
++ (( i<=5 ))
++ x=0
++ (( i++ ))
++ (( i<=5 ))
++ x=0
++ (( i++ ))
++ (( i<=5 ))
++ x=0
++ (( i++ ))
++ (( i<=5 ))
++ x=0
++ (( i++ ))
++ (( i<=5 ))
++ x=0
++ (( i++ ))
++ (( i<=5 ))
++ for i in 0 1 2
++ x=i
++ for i in 0 1 2
++ x=i
++ for i in 0 1 2
++ x=i
++ case x in
++ x=i
++ set +x
+1
+2
+3
+4
++ for f in a b c d e
++ echo a
+a
++ for f in a b c d e
++ echo b
+b
++ for f in a b c d e
++ echo c
+c
++ for f in a b c d e
++ echo d
+d
++ for f in a b c d e
++ echo e
+e
++ set +x
+TRACEFILE:
++ echo 1
++ echo 2
++ echo 3
++ echo 4
++ unset BASH_XTRACEFD
+=====
diff --git a/tests/set-x.tests b/tests/set-x.tests
new file mode 100755
index 0000000..648f0a9
--- /dev/null
+++ b/tests/set-x.tests
@@ -0,0 +1,20 @@
+#!../bash
+# $Id: set-x.tests,v 1.1 2002/12/09 13:12:37 rockyb Exp $
+#
+# Test that "set -x" shows what we think it should.
+#
+set -x
+for ((i=0; i<=5; i++ )) ; do
+ x=0
+done
+for i in 0 1 2 ; do
+ x=i
+done
+case x in
+ 0) x=i ;;
+ *) x=i ;;
+esac
+set +x
+
+# test BASH_XTRACEFD
+${THIS_SH} ./set-x1.sub
diff --git a/tests/set-x1.sub b/tests/set-x1.sub
new file mode 100644
index 0000000..b2aa216
--- /dev/null
+++ b/tests/set-x1.sub
@@ -0,0 +1,25 @@
+: ${TMPDIR:=/var/tmp}
+TRACEFILE=$TMPDIR/bash-trace-$$
+trap 'rm -f $TRACEFILE' 0 1 2 3 6 15
+
+exec 4>$TRACEFILE
+BASH_XTRACEFD=4
+
+set -x
+
+echo 1
+echo 2
+echo 3
+echo 4
+
+unset BASH_XTRACEFD
+
+for f in a b c d e; do echo $f ; done
+
+set +x
+
+echo TRACEFILE:
+cat $TRACEFILE
+echo =====
+
+exit 0
diff --git a/tests/shopt.right b/tests/shopt.right
new file mode 100644
index 0000000..7bacc0e
--- /dev/null
+++ b/tests/shopt.right
@@ -0,0 +1,259 @@
+./shopt.tests: line 2: shopt: -z: invalid option
+shopt: usage: shopt [-pqsu] [-o] [optname ...]
+--
+shopt -u autocd
+shopt -u cdable_vars
+shopt -s cdspell
+shopt -u checkhash
+shopt -u checkjobs
+shopt -u checkwinsize
+shopt -s cmdhist
+shopt -u compat31
+shopt -u compat32
+shopt -u compat40
+shopt -u dirspell
+shopt -u dotglob
+shopt -u execfail
+shopt -s expand_aliases
+shopt -u extdebug
+shopt -u extglob
+shopt -s extquote
+shopt -u failglob
+shopt -s force_fignore
+shopt -u globstar
+shopt -u gnu_errfmt
+shopt -u histappend
+shopt -u histreedit
+shopt -u histverify
+shopt -s hostcomplete
+shopt -u huponexit
+shopt -s interactive_comments
+shopt -u lithist
+shopt -u login_shell
+shopt -u mailwarn
+shopt -u no_empty_cmd_completion
+shopt -u nocaseglob
+shopt -u nocasematch
+shopt -u nullglob
+shopt -s progcomp
+shopt -s promptvars
+shopt -u restricted_shell
+shopt -u shift_verbose
+shopt -s sourcepath
+shopt -u xpg_echo
+--
+shopt -u huponexit
+shopt -u checkwinsize
+shopt -s sourcepath
+--
+shopt -s cdspell
+shopt -s cmdhist
+shopt -s expand_aliases
+shopt -s extquote
+shopt -s force_fignore
+shopt -s hostcomplete
+shopt -s interactive_comments
+shopt -s progcomp
+shopt -s promptvars
+shopt -s sourcepath
+--
+shopt -u autocd
+shopt -u cdable_vars
+shopt -u checkhash
+shopt -u checkjobs
+shopt -u checkwinsize
+shopt -u compat31
+shopt -u compat32
+shopt -u compat40
+shopt -u dirspell
+shopt -u dotglob
+shopt -u execfail
+shopt -u extdebug
+shopt -u extglob
+shopt -u failglob
+shopt -u globstar
+shopt -u gnu_errfmt
+shopt -u histappend
+shopt -u histreedit
+shopt -u histverify
+shopt -u huponexit
+shopt -u lithist
+shopt -u login_shell
+shopt -u mailwarn
+shopt -u no_empty_cmd_completion
+shopt -u nocaseglob
+shopt -u nocasematch
+shopt -u nullglob
+shopt -u restricted_shell
+shopt -u shift_verbose
+shopt -u xpg_echo
+--
+autocd off
+cdable_vars off
+checkhash off
+checkjobs off
+checkwinsize off
+compat31 off
+compat32 off
+compat40 off
+dirspell off
+dotglob off
+execfail off
+extdebug off
+extglob off
+failglob off
+globstar off
+gnu_errfmt off
+histappend off
+histreedit off
+histverify off
+huponexit off
+lithist off
+login_shell off
+mailwarn off
+no_empty_cmd_completion off
+nocaseglob off
+nocasematch off
+nullglob off
+restricted_shell off
+shift_verbose off
+xpg_echo off
+--
+set +o allexport
+set -o braceexpand
+set -o emacs
+set +o errexit
+set +o errtrace
+set +o functrace
+set -o hashall
+set -o histexpand
+set -o history
+set +o ignoreeof
+set -o interactive-comments
+set +o keyword
+set -o monitor
+set +o noclobber
+set +o noexec
+set +o noglob
+set +o nolog
+set +o notify
+set +o nounset
+set +o onecmd
+set +o physical
+set +o pipefail
+set +o posix
+set -o privileged
+set +o verbose
+set +o vi
+set +o xtrace
+--
+allexport off
+braceexpand on
+emacs on
+errexit off
+errtrace off
+functrace off
+hashall on
+histexpand on
+history on
+ignoreeof off
+interactive-comments on
+keyword off
+monitor on
+noclobber off
+noexec off
+noglob off
+nolog off
+notify off
+nounset off
+onecmd off
+physical off
+pipefail off
+posix off
+privileged on
+verbose off
+vi off
+xtrace off
+--
+set +o allexport
+set -o braceexpand
+set -o emacs
+set +o errexit
+set +o errtrace
+set +o functrace
+set -o hashall
+set -o histexpand
+set -o history
+set +o ignoreeof
+set -o interactive-comments
+set +o keyword
+set -o monitor
+set +o noclobber
+set +o noexec
+set +o noglob
+set +o nolog
+set +o notify
+set +o nounset
+set +o onecmd
+set +o physical
+set +o pipefail
+set +o posix
+set -o privileged
+set +o verbose
+set +o vi
+set +o xtrace
+--
+set -o history
+set +o verbose
+--
+set -o braceexpand
+set -o emacs
+set -o hashall
+set -o histexpand
+set -o history
+set -o interactive-comments
+set -o monitor
+set -o privileged
+--
+set +o allexport
+set +o errexit
+set +o errtrace
+set +o functrace
+set +o ignoreeof
+set +o keyword
+set +o noclobber
+set +o noexec
+set +o noglob
+set +o nolog
+set +o notify
+set +o nounset
+set +o onecmd
+set +o physical
+set +o pipefail
+set +o posix
+set +o verbose
+set +o vi
+set +o xtrace
+--
+allexport off
+errexit off
+errtrace off
+functrace off
+ignoreeof off
+keyword off
+noclobber off
+noexec off
+noglob off
+nolog off
+notify off
+nounset off
+onecmd off
+physical off
+pipefail off
+posix off
+verbose off
+vi off
+xtrace off
+--
+./shopt.tests: line 93: shopt: xyz1: invalid shell option name
+./shopt.tests: line 94: shopt: xyz1: invalid option name
diff --git a/tests/shopt.tests b/tests/shopt.tests
new file mode 100644
index 0000000..d4f2a8b
--- /dev/null
+++ b/tests/shopt.tests
@@ -0,0 +1,94 @@
+# let's try an error message first
+shopt -z
+
+# first, set up a known environment
+shopt -u cdable_vars
+shopt -s cdspell
+shopt -u checkhash
+shopt -u checkwinsize
+shopt -s cmdhist
+shopt -u dotglob
+shopt -u execfail
+shopt -s expand_aliases
+shopt -u extglob
+shopt -u histreedit
+shopt -u histappend
+shopt -u histverify
+shopt -s hostcomplete
+shopt -u huponexit
+shopt -s interactive_comments
+shopt -u lithist
+shopt -u mailwarn
+shopt -u nocaseglob
+shopt -u nullglob
+shopt -s promptvars
+shopt -u shift_verbose
+shopt -s sourcepath
+shopt -u xpg_echo
+
+# Now, start checking the output
+builtin printf -- "--\n"
+shopt -p # list 'em all
+builtin printf -- "--\n"
+# test specific variables
+shopt -p huponexit
+shopt -p checkwinsize
+shopt -p sourcepath
+
+builtin printf -- "--\n"
+shopt -s -p
+builtin printf -- "--\n"
+shopt -u -p
+builtin printf -- "--\n"
+shopt -u
+
+# Now set up another known environment
+set +o allexport
+set -o braceexpand
+set +o errexit
+set -o hashall
+set -o histexpand
+set +o keyword
+set -o monitor
+set +o noclobber
+set +o noexec
+set +o noglob
+set +o notify
+set +o nounset
+set +o onecmd
+set +o physical
+set -o privileged
+set +o verbose
+set +o xtrace
+set -o history
+set +o ignoreeof
+set -o interactive-comments
+set +o posix
+set -o emacs
+set +o vi
+
+# list 'em all
+builtin printf -- "--\n"
+shopt -o -p
+
+builtin printf -- "--\n"
+set -o
+builtin printf -- "--\n"
+set +o
+
+# test specific variables
+builtin printf -- "--\n"
+shopt -p -o history
+shopt -p -o verbose
+
+builtin printf -- "--\n"
+shopt -s -p -o
+builtin printf -- "--\n"
+shopt -u -p -o
+builtin printf -- "--\n"
+shopt -u -o
+
+# errors
+builtin printf -- "--\n"
+shopt -p xyz1
+shopt -o -p xyz1
diff --git a/tests/source1.sub b/tests/source1.sub
new file mode 100644
index 0000000..8b8586f
--- /dev/null
+++ b/tests/source1.sub
@@ -0,0 +1 @@
+echo $AVAR
diff --git a/tests/source2.sub b/tests/source2.sub
new file mode 100644
index 0000000..7a031a1
--- /dev/null
+++ b/tests/source2.sub
@@ -0,0 +1,5 @@
+echo in source.sub2, calling return
+
+return 5
+
+echo oops -- return in source.sub2 failed
diff --git a/tests/source3.sub b/tests/source3.sub
new file mode 100644
index 0000000..4a12501
--- /dev/null
+++ b/tests/source3.sub
@@ -0,0 +1 @@
+echo "$@"
diff --git a/tests/source4.sub b/tests/source4.sub
new file mode 100644
index 0000000..717c1ab
--- /dev/null
+++ b/tests/source4.sub
@@ -0,0 +1 @@
+set -- m n o p
diff --git a/tests/source5.sub b/tests/source5.sub
new file mode 100644
index 0000000..e618809
--- /dev/null
+++ b/tests/source5.sub
@@ -0,0 +1,19 @@
+LC_ALL=en_US.UTF-8
+unset LC_ALL
+unset LANG
+export LC_ALL=C
+export LANG=C
+
+set +o posix
+
+# attempting to source a non-existant file is not an error...
+. /tmp/source-notthere
+
+echo after bad source 1
+
+set -o posix
+
+# ...unless you're in posix mode
+. /tmp/source-notthere
+
+echo after bad source 2
diff --git a/tests/source6.sub b/tests/source6.sub
new file mode 100644
index 0000000..9e1cb64
--- /dev/null
+++ b/tests/source6.sub
@@ -0,0 +1,31 @@
+# tests sourcing non-regular files, fixed post-3.2
+
+: ${TMPDIR:=/tmp}
+
+TMPFN=$TMPDIR/foo-$$
+
+rm -f $TMPFN
+echo "echo one - OK" > $TMPFN
+. $TMPFN
+echo $?
+rm -f $TMPFN
+
+# non-regular readable file
+. /dev/null
+echo $?
+
+# FIFO or pipe via /dev/fd
+. <(echo "echo two - OK")
+echo $?
+
+# pipe
+echo "echo three - OK" | . /dev/stdin
+echo $?
+
+# FIFO
+mkfifo $TMPDIR/fifo-$$
+echo "echo four - OK" > $TMPDIR/fifo-$$ &
+sleep 1 # allow the child echo to execute
+. $TMPDIR/fifo-$$
+echo $?
+rm -f $TMPDIR/fifo-$$
diff --git a/tests/strip.right b/tests/strip.right
new file mode 100644
index 0000000..dfab897
--- /dev/null
+++ b/tests/strip.right
@@ -0,0 +1,12 @@
+''
+' ab '
+' '
+''
+''
+''
+'ababababababab'
+'ababababababab '
+'ababababababab '
+'abababa
+bababab '
+''
diff --git a/tests/strip.tests b/tests/strip.tests
new file mode 100644
index 0000000..b669b52
--- /dev/null
+++ b/tests/strip.tests
@@ -0,0 +1,22 @@
+v=`echo "" ; echo "" ; echo ""`
+echo "'$v'"
+v=`echo -n " ab "`
+echo "'$v'"
+v=`echo -n " "`
+echo "'$v'"
+v=`echo -n ""`
+echo "'$v'"
+v=`echo ""`
+echo "'$v'"
+v=`echo`
+echo "'$v'"
+v=`echo ababababababab`
+echo "'$v'"
+v=`echo "ababababababab "`
+echo "'$v'"
+v=`echo -n "ababababababab "`
+echo "'$v'"
+v=`echo -ne "abababa\nbababab "`
+echo "'$v'"
+v="`echo -e '\n\n\n\n'`"
+echo "'$v'"
diff --git a/tests/test.right b/tests/test.right
new file mode 100644
index 0000000..c5d7c90
--- /dev/null
+++ b/tests/test.right
@@ -0,0 +1,285 @@
+t -a noexist
+1
+t -a run-all
+0
+t -b run-all
+1
+t -b /dev/jb1a
+1
+t -c run-all
+1
+t -c /dev/tty
+0
+t -d run-all
+1
+t -d /etc
+0
+t -d ""
+1
+b -d ""
+1
+t -e noexist
+1
+t -e run-all
+0
+t -f noexist
+1
+t -f /dev/tty
+1
+t -f run-all
+0
+t -g run-all
+1
+t -g /tmp/test.setgid
+0
+t -k run-all
+1
+t -n ""
+1
+t -n "hello"
+0
+t -p run-all
+1
+t -r noexist
+1
+t -r /tmp/test.noread
+1
+t -r run-all
+0
+t -s noexist
+1
+t -s /dev/null
+1
+t -s run-all
+0
+t -t 20
+1
+t -t 0
+0
+t -u noexist
+1
+t -u run-all
+1
+t -u /tmp/test.setuid
+0
+t -w noexist
+1
+t -w /tmp/test.nowrite
+1
+t -w /dev/null
+0
+t -x noexist
+1
+t -x /tmp/test.exec
+0
+t -x /tmp/test.noexec
+1
+t -z ""
+0
+t -z "foo"
+1
+t "foo"
+0
+t ""
+1
+t -O /tmp/test.owner
+0
+t -S /tmp/test.socket
+1
+t -N /tmp/test.newer
+0
+t "hello" = "hello"
+0
+t "hello" = "goodbye"
+1
+t "hello" == "hello"
+0
+t "hello" == "goodbye"
+1
+t "hello" != "hello"
+1
+t "hello" != "goodbye"
+0
+t "hello" < "goodbye"
+1
+t "hello" > "goodbye"
+0
+t ! "hello" > "goodbye"
+1
+t 200 -eq 200
+0
+t 34 -eq 222
+1
+t -32 -eq 32
+1
+t 200 -ne 200
+1
+t 34 -ne 222
+0
+t 200 -gt 200
+1
+t 340 -gt 222
+0
+t 200 -ge 200
+0
+t 34 -ge 222
+1
+t 200 -lt 200
+1
+t 34 -lt 222
+0
+t 200 -le 200
+0
+t 340 -le 222
+1
+t 700 -le 1000 -a -n "1" -a "20" = "20"
+0
+t ! \( 700 -le 1000 -a -n "1" -a "20" = "20" \)
+1
+t /tmp/abc -nt /tmp/def
+1
+t /tmp/abc -ot /tmp/def
+0
+t /tmp/def -nt /tmp/abc
+0
+t /tmp/def -ot /tmp/abc
+1
+t /tmp/abc -ef /tmp/def
+1
+t /tmp/abc -ef /tmp/ghi
+0
+t -r /dev/fd/0
+0
+t -w /dev/fd/1
+0
+t -w /dev/fd/2
+0
+t -r /dev/stdin
+0
+t -w /dev/stdout
+0
+t -w /dev/stderr
+0
+t
+1
+b
+1
+t 12 -eq 34
+1
+t ! 12 -eq 34
+0
+t -n abcd -o aaa
+0
+t -n abcd -o -z aaa
+0
+t -n abcd -a aaa
+0
+t -n abcd -a -z aaa
+1
+t -o allexport
+1
+t ! -o allexport
+0
+t xx -a yy
+0
+t xx -o ""
+0
+t xx -a ""
+1
+t -X -a -X
+0
+t -X -o -X
+0
+t -X -o ""
+0
+t -X -a ""
+1
+t "" -a -X
+1
+t "" -o -X
+0
+t "" -a ""
+1
+t "" -o ""
+1
+t true -o -X
+0
+t true -a -X
+0
+t ( -E )
+0
+t ( "" )
+1
+t ! -z "$z"
+0
+t ! -n "$z"
+1
+t "$zero"
+1
+t ! "$zero"
+0
+b "$zero"
+1
+b ! "$zero"
+0
+t -G /tmp/test.group
+0
+t -h /tmp/test.symlink
+0
+t 4+3 -eq 7
+./test.tests: line 13: test: 4+3: integer expression expected
+2
+b 4-5 -eq 7
+./test.tests: line 7: [: 4+3: integer expression expected
+2
+t 9 -eq 4+5
+./test.tests: line 13: test: 4+5: integer expression expected
+2
+b 9 -eq 4+5
+./test.tests: line 7: [: 4+5: integer expression expected
+2
+t A -eq 7
+./test.tests: line 13: test: A: integer expression expected
+2
+b A -eq 7
+./test.tests: line 7: [: A: integer expression expected
+2
+t 9 -eq B
+./test.tests: line 13: test: B: integer expression expected
+2
+b 9 -eq B
+./test.tests: line 7: [: B: integer expression expected
+2
+t ( 1 = 2
+./test.tests: line 13: test: `)' expected
+2
+b ( 1 = 2
+./test.tests: line 7: [: `)' expected, found ]
+2
+./test.tests: line 13: test: a: unary operator expected
+2
+./test.tests: line 13: test: b: binary operator expected
+2
+./test.tests: line 13: test: -A: unary operator expected
+2
+./test.tests: line 13: test: too many arguments
+2
+./test.tests: line 13: test: too many arguments
+2
+./test.tests: line 406: [: missing `]'
+2
+./test.tests: line 13: test: (: unary operator expected
+2
+t -t a
+1
+t -t addsds
+1
+t -t 42
+1
+t -t /dev/tty
+1
+t -t /dev/tty4
+1
+t -t /dev/tty4444444...
+1
+1
diff --git a/tests/test.tests b/tests/test.tests
new file mode 100644
index 0000000..47ad9bb
--- /dev/null
+++ b/tests/test.tests
@@ -0,0 +1,426 @@
+if (( $UID == 0 )); then
+ echo "test-tests: the test suite should not be run as root" >&2
+fi
+
+b()
+{
+ [ "$@" ]
+ echo $?
+}
+
+t()
+{
+ test "$@"
+ echo $?
+}
+
+echo 't -a noexist'
+t -a noexist
+echo 't -a run-all'
+t -a run-all
+
+echo 't -b run-all'
+t -b run-all
+echo 't -b /dev/jb1a'
+t -b /dev/jb1a
+
+echo 't -c run-all'
+t -c run-all
+echo 't -c /dev/tty'
+t -c /dev/tty
+
+echo 't -d run-all'
+t -d run-all
+echo 't -d /etc'
+t -d /etc
+echo 't -d ""'
+t -d ""
+echo 'b -d ""'
+b -d ""
+
+echo 't -e noexist'
+t -e noexist
+echo 't -e run-all'
+t -e run-all
+
+echo 't -f noexist'
+t -f noexist
+echo 't -f /dev/tty'
+t -f /dev/tty
+echo 't -f run-all'
+t -f run-all
+
+echo 't -g run-all'
+t -g run-all
+
+touch /tmp/test.setgid
+chgrp ${GROUPS[0]} /tmp/test.setgid
+chmod ug+x /tmp/test.setgid
+chmod g+s /tmp/test.setgid
+echo 't -g /tmp/test.setgid'
+t -g /tmp/test.setgid
+rm -f /tmp/test.setgid
+
+echo 't -k run-all'
+t -k run-all
+
+echo 't -n ""'
+t -n ""
+echo 't -n "hello"'
+t -n "hello"
+
+echo 't -p run-all'
+t -p run-all
+
+echo 't -r noexist'
+t -r noexist
+
+if (( $UID != 0 )); then
+ touch /tmp/test.noread
+ chmod a-r /tmp/test.noread
+ echo 't -r /tmp/test.noread'
+ t -r /tmp/test.noread
+ rm -f /tmp/test.noread
+else
+ echo 't -r /tmp/test.noread'
+ echo 1
+fi
+
+echo 't -r run-all'
+t -r run-all
+
+echo 't -s noexist'
+t -s noexist
+echo 't -s /dev/null'
+t -s /dev/null
+echo 't -s run-all'
+t -s run-all
+
+echo 't -t 20'
+t -t 20
+echo 't -t 0'
+t -t 0 < /dev/tty
+
+echo 't -u noexist'
+t -u noexist
+
+echo 't -u run-all'
+t -u run-all
+
+touch /tmp/test.setuid
+chmod u+x /tmp/test.setuid # some systems require this to turn on setuid bit
+chmod u+s /tmp/test.setuid
+echo 't -u /tmp/test.setuid'
+t -u /tmp/test.setuid
+rm -f /tmp/test.setuid
+
+echo 't -w noexist'
+t -w noexist
+
+if (( $UID != 0 )); then
+ touch /tmp/test.nowrite
+ chmod a-w /tmp/test.nowrite
+ echo 't -w /tmp/test.nowrite'
+ t -w /tmp/test.nowrite
+ rm -f /tmp/test.nowrite
+else
+ echo 't -w /tmp/test.nowrite'
+ echo 1
+fi
+
+echo 't -w /dev/null'
+t -w /dev/null
+
+echo 't -x noexist'
+t -x noexist
+
+touch /tmp/test.exec
+chmod u+x /tmp/test.exec
+echo 't -x /tmp/test.exec'
+t -x /tmp/test.exec
+rm -f /tmp/test.exec
+
+touch /tmp/test.noexec
+chmod u-x /tmp/test.noexec
+echo 't -x /tmp/test.noexec'
+t -x /tmp/test.noexec
+rm -f /tmp/test.noexec
+
+echo 't -z ""'
+t -z ""
+echo 't -z "foo"'
+t -z "foo"
+
+echo 't "foo"'
+t "foo"
+echo 't ""'
+t ""
+
+touch /tmp/test.owner
+echo 't -O /tmp/test.owner'
+t -O /tmp/test.owner
+rm -f /tmp/test.owner
+
+touch /tmp/test.socket
+echo 't -S /tmp/test.socket'
+t -S /tmp/test.socket # false
+rm -f /tmp/test.socket
+
+touch /tmp/test.newer
+echo 't -N /tmp/test.newer'
+t -N /tmp/test.newer
+rm -f /tmp/test.newer
+
+echo 't "hello" = "hello"'
+t "hello" = "hello"
+echo 't "hello" = "goodbye"'
+t "hello" = "goodbye"
+
+echo 't "hello" == "hello"'
+t "hello" == "hello"
+echo 't "hello" == "goodbye"'
+t "hello" == "goodbye"
+
+echo 't "hello" != "hello"'
+t "hello" != "hello"
+echo 't "hello" != "goodbye"'
+t "hello" != "goodbye"
+
+echo 't "hello" < "goodbye"'
+t "hello" \< "goodbye"
+echo 't "hello" > "goodbye"'
+t "hello" \> "goodbye"
+
+echo 't ! "hello" > "goodbye"'
+t "! hello" \> "goodbye"
+
+echo 't 200 -eq 200'
+t 200 -eq 200
+echo 't 34 -eq 222'
+t 34 -eq 222
+echo 't -32 -eq 32'
+t -32 -eq 32
+
+echo 't 200 -ne 200'
+t 200 -ne 200
+echo 't 34 -ne 222'
+t 34 -ne 222
+
+echo 't 200 -gt 200'
+t 200 -gt 200
+echo 't 340 -gt 222'
+t 340 -gt 222
+
+echo 't 200 -ge 200'
+t 200 -ge 200
+echo 't 34 -ge 222'
+t 34 -ge 222
+
+echo 't 200 -lt 200'
+t 200 -lt 200
+echo 't 34 -lt 222'
+t 34 -lt 222
+
+echo 't 200 -le 200'
+t 200 -le 200
+echo 't 340 -le 222'
+t 340 -le 222
+
+echo 't 700 -le 1000 -a -n "1" -a "20" = "20"'
+t 700 -le 1000 -a -n "1" -a "20" = "20"
+echo 't ! \( 700 -le 1000 -a -n "1" -a "20" = "20" \)'
+t ! \( 700 -le 1000 -a -n "1" -a "20" = "20" \)
+
+touch /tmp/abc
+sleep 2
+touch /tmp/def
+
+echo 't /tmp/abc -nt /tmp/def'
+t /tmp/abc -nt /tmp/def
+echo 't /tmp/abc -ot /tmp/def'
+t /tmp/abc -ot /tmp/def
+echo 't /tmp/def -nt /tmp/abc'
+t /tmp/def -nt /tmp/abc
+echo 't /tmp/def -ot /tmp/abc'
+t /tmp/def -ot /tmp/abc
+
+echo 't /tmp/abc -ef /tmp/def'
+t /tmp/abc -ef /tmp/def
+ln /tmp/abc /tmp/ghi
+echo 't /tmp/abc -ef /tmp/ghi'
+t /tmp/abc -ef /tmp/ghi
+
+rm /tmp/abc /tmp/def /tmp/ghi
+
+echo 't -r /dev/fd/0'
+t -r /dev/fd/0
+echo 't -w /dev/fd/1'
+t -w /dev/fd/1
+echo 't -w /dev/fd/2'
+t -w /dev/fd/2
+
+echo 't -r /dev/stdin'
+t -r /dev/stdin
+echo 't -w /dev/stdout'
+t -w /dev/stdout
+echo 't -w /dev/stderr'
+t -w /dev/stderr
+
+echo 't'
+t
+echo 'b'
+b
+
+echo 't 12 -eq 34'
+t 12 -eq 34
+echo 't ! 12 -eq 34'
+t ! 12 -eq 34
+
+echo 't -n abcd -o aaa'
+t -n abcd -o aaa
+echo 't -n abcd -o -z aaa'
+t -n abcd -o -z aaa
+
+echo 't -n abcd -a aaa'
+t -n abcd -a aaa
+echo 't -n abcd -a -z aaa'
+t -n abcd -a -z aaa
+
+set +o allexport
+echo 't -o allexport'
+t -o allexport
+echo 't ! -o allexport'
+t ! -o allexport
+
+echo 't xx -a yy'
+t xx -a yy
+echo 't xx -o ""'
+t xx -o ""
+echo 't xx -a ""'
+t xx -a ""
+
+echo 't -X -a -X'
+t -X -a -X
+echo 't -X -o -X'
+t -X -o -X
+echo 't -X -o ""'
+t -X -o ""
+echo 't -X -a ""'
+t -X -a ""
+echo 't "" -a -X'
+t "" -a -X
+echo 't "" -o -X'
+t "" -o -X
+echo 't "" -a ""'
+t "" -a ""
+echo 't "" -o ""'
+t "" -o ""
+echo 't true -o -X'
+t true -o -X
+echo 't true -a -X'
+t true -a -X
+
+echo 't ( -E )'
+t \( -E \)
+echo 't ( "" )'
+t \( "" \)
+
+z=42
+
+echo 't ! -z "$z"'
+t ! -z "$z"
+
+echo 't ! -n "$z"'
+t ! -n "$z"
+
+zero=
+echo 't "$zero"'
+t "$zero"
+echo 't ! "$zero"'
+t ! "$zero"
+echo 'b "$zero"'
+b "$zero"
+echo 'b ! "$zero"'
+b ! "$zero"
+
+touch /tmp/test.group
+chgrp ${GROUPS[0]} /tmp/test.group
+echo 't -G /tmp/test.group'
+t -G /tmp/test.group
+rm /tmp/test.group
+
+case "${THIS_SH}" in
+/*) SHNAME=${THIS_SH} ;;
+*) SHNAME=${PWD}/${THIS_SH} ;;
+esac
+
+if ln -s ${SHNAME} /tmp/test.symlink 2>/dev/null; then
+ chgrp ${GROUPS[0]} /tmp/test.symlink 2>/dev/null
+ echo 't -h /tmp/test.symlink'
+ t -h /tmp/test.symlink
+ # some systems don't let you remove this
+ rm -f /tmp/test.symlink 2>/dev/null
+else
+ echo 't -h /tmp/test.symlink'
+ echo 0
+fi
+
+# arithmetic constant errors
+echo "t 4+3 -eq 7"
+t 4+3 -eq 7
+echo "b 4-5 -eq 7"
+b 4+3 -eq 7
+
+echo "t 9 -eq 4+5"
+t 9 -eq 4+5
+echo "b 9 -eq 4+5"
+b 9 -eq 4+5
+
+A=7
+echo "t A -eq 7"
+t A -eq 7
+echo "b A -eq 7"
+b A -eq 7
+
+B=9
+echo "t 9 -eq B"
+t 9 -eq B
+echo "b 9 -eq B"
+b 9 -eq B
+
+# badly formed expressions
+echo 't ( 1 = 2'
+t \( 1 = 2
+echo 'b ( 1 = 2'
+b \( 1 = 2
+
+# more errors
+t a b
+t a b c
+t -A v
+# too many arguments -- argument expected is also reasonable
+t 4 -eq 4 -a 2 -ne 5 -a 4 -ne
+# too many arguments
+t 4 -eq 4 -a 3 4
+
+[
+echo $?
+
+t \( \)
+
+# non-numeric arguments to `test -t' should return failure -- fix in 2.05
+echo 't -t a'
+t -t a
+echo 't -t addsds'
+t -t addsds
+echo 't -t 42'
+t -t 42
+echo 't -t /dev/tty'
+t -t /dev/tty
+echo 't -t /dev/tty4'
+t -t /dev/tty4
+echo 't -t /dev/tty4444444...'
+t -t /dev/tty4444444...
+
+# fixed in bash-4.0-beta
+t -t ' '
diff --git a/tests/tilde.right b/tests/tilde.right
new file mode 100644
index 0000000..fe58ae3
--- /dev/null
+++ b/tests/tilde.right
@@ -0,0 +1,25 @@
+~chet
+/usr/xyz/foo
+~chet/foo
+~chet/foo
+~chet/bar
+~chet/bar
+~chet/bar
+:~chet/
+abcd~chet
+SHELL=~/bash
+/usr/xyz/bash
+abcd:~chet
+/usr/ucb:/bin:/usr/xyz/bin:/usr/xyz/tmp/bin:/usr/bin
+/usr
+/tmp
+/bin:/usr/bin:.:/usr/xyz/bin
+/bin:/usr/bin:.:~/bin
+/bin:/usr/bin:.:/usr/xyz/bin
+/bin:/usr/bin:.:/usr/xyz/bin
+/bin:/usr/bin:.:~/bin
+/bin:/usr/bin:.:~/bin
+ok 1
+ok 2
+ok 3
+~root
diff --git a/tests/tilde.tests b/tests/tilde.tests
new file mode 100644
index 0000000..8b2bdb8
--- /dev/null
+++ b/tests/tilde.tests
@@ -0,0 +1,69 @@
+# this is needed because posix mode restricts tilde expansion to assignment
+# statements preceding a command, instead of the default of expanding all
+# assignment statements on the line (e.g., after `export'). Without this,
+# the next-to-last test fails
+set +o posix
+
+HOME=/usr/xyz
+SHELL=~/bash
+echo ~ch\et
+echo ~/"foo"
+echo "~chet"/"foo"
+echo \~chet/"foo"
+echo \~chet/bar
+echo ~\chet/bar
+echo ~chet""/bar
+echo ":~chet/"
+echo abcd~chet
+echo "SHELL=~/bash"
+echo $SHELL
+echo abcd:~chet
+path=/usr/ucb:/bin:~/bin:~/tmp/bin:/usr/bin
+echo $path
+
+cd /usr
+cd /tmp
+echo ~-
+echo ~+
+
+XPATH=/bin:/usr/bin:.
+
+# yes tilde expansion
+PPATH=$XPATH:~/bin
+echo "$PPATH"
+
+# no tilde expansion
+PPATH="$XPATH:~/bin"
+echo "$PPATH"
+
+# yes tilde expansion
+export PPATH=$XPATH:~/bin
+echo "$PPATH"
+declare -x PPATH=$XPATH:~/bin
+echo "$PPATH"
+
+# no tilde expansion
+export PPATH="$XPATH:~/bin"
+echo "$PPATH"
+declare -x PPATH="$XPATH:~/bin"
+echo "$PPATH"
+
+# more tests of tilde expansion when executing case commands
+case ~ in
+$HOME) echo ok 1;;
+*) echo bad 1 ;;
+esac
+
+case ~ in
+~) echo ok 2 ;;
+\~) echo bad 2a ;;
+*) echo bad 2b ;;
+esac
+
+case $unset in
+"") echo ok 3 ;;
+*) echo bad 3 ;;
+esac
+
+USER=root # should exist just about everywhere
+echo ~$USER
diff --git a/tests/tilde2.right b/tests/tilde2.right
new file mode 100644
index 0000000..fce0468
--- /dev/null
+++ b/tests/tilde2.right
@@ -0,0 +1,24 @@
+PATH=~/bin:/bin:/usr/bin:.
+/usr/xyz/bin:~/bin2:/bin:/usr/bin:.
+PATH=~/bin:~/bin2:/bin:/usr/bin:.
+~/bin
+~
+/usr/xyz
+~
+~
+~
+argv[1] = <\a>
+argv[1] = <\a>
+/usr/xyz/bash
+ok
+~
+~
+make -k FOO=/usr/xyz/mumble
+/usr/xyz/mumble
+HOME=~
+HOME=~
+/usr/$x/abc
+HOME=~
+/usr/$x/abc
+HOME=/usr/$x/abc
+/usr/$x/abc
diff --git a/tests/tilde2.tests b/tests/tilde2.tests
new file mode 100644
index 0000000..ff6c76f
--- /dev/null
+++ b/tests/tilde2.tests
@@ -0,0 +1,70 @@
+HOME=/usr/xyz
+XPATH=/bin:/usr/bin:.
+
+ADDPATH=PATH=~/bin:$XPATH
+
+echo $ADDPATH
+
+unset ADDPATH
+: ${ADDPATH:=~/bin:~/bin2:$XPATH}
+echo $ADDPATH
+
+unset ADDPATH
+: ${ADDPATH:=PATH=~/bin:~/bin2:$XPATH}
+echo $ADDPATH
+
+cat << !
+~/bin
+!
+
+echo "~"
+
+echo ${TPATH:-~}
+echo "${TPATH:-~}"
+echo "${TPATH:-"~"}"
+
+echo "${XPATH+~}"
+
+recho "\a"
+recho "${TPATH:-\a}"
+
+SHELL=~/bash
+echo $SHELL
+
+case $SHELL in
+~/bash) echo ok;;
+*) echo bad;;
+esac
+
+somevar=
+echo "${somevar:-~}"
+echo "${somevar:-"~"}"
+
+echo make -k FOO=~/mumble
+
+typeset FOO=~/mumble
+echo "$FOO"
+
+h=HOME=~
+echo $h
+
+export h=HOME=~
+echo $h
+
+x=1234
+HOME='/usr/$x/abc'
+
+echo ~
+
+# behavior differs here in posix mode
+set -o posix
+
+eval echo $h
+eval $h
+echo $HOME
+
+set +o posix
+
+eval echo $h
+eval $h
+echo $HOME
diff --git a/tests/trap.right b/tests/trap.right
new file mode 100644
index 0000000..c8417ac
--- /dev/null
+++ b/tests/trap.right
@@ -0,0 +1,85 @@
+subshell exit
+trap -- 'echo exiting' EXIT
+trap -- 'echo aborting' SIGHUP
+trap -- 'echo aborting' SIGINT
+trap -- 'echo aborting' SIGQUIT
+trap -- 'echo aborting' SIGABRT
+trap -- 'echo aborting' SIGTERM
+[20] debug
+debug line
+[22] debug
+trap -- 'echo exiting' EXIT
+trap -- 'echo aborting' SIGHUP
+trap -- 'echo aborting' SIGINT
+trap -- 'echo aborting' SIGQUIT
+trap -- 'echo aborting' SIGABRT
+trap -- 'echo aborting' SIGTERM
+trap -- 'echo [$LINENO] debug' DEBUG
+[24] debug
+func[16] funcdebug
+funcdebug line
+[26] debug
+trap -- 'echo exiting' EXIT
+trap -- 'echo aborting' SIGHUP
+trap -- 'echo aborting' SIGINT
+trap -- 'echo aborting' SIGQUIT
+trap -- 'echo aborting' SIGABRT
+trap -- 'echo aborting' SIGTERM
+trap -- 'echo [$LINENO] debug' DEBUG
+[28] debug
+./trap.tests[33] debug
+./trap.tests[34] debug
+func2[30] debug
+func2[31] debug
+func2debug line
+./trap.tests[36] debug
+./trap.tests[38] debug
+trap -- 'echo exiting' EXIT
+trap -- 'echo aborting' SIGHUP
+trap -- 'echo aborting' SIGINT
+trap -- 'echo aborting' SIGQUIT
+trap -- 'echo aborting' SIGABRT
+trap -- 'echo aborting' SIGTERM
+trap -- '' DEBUG
+trap -- 'echo exiting' EXIT
+trap -- 'echo aborting' SIGHUP
+trap -- 'echo aborting' SIGINT
+trap -- 'echo aborting' SIGQUIT
+trap -- 'echo aborting' SIGABRT
+trap -- 'echo aborting' SIGTERM
+trap -- 'echo exiting' EXIT
+trap -- '' SIGINT
+trap -- 'echo aborting' SIGQUIT
+trap -- 'echo aborting' SIGABRT
+trap -- 'echo aborting' SIGTERM
+0
+ERRTRAP
+ERRTRAP
+ERRTRAP
+after falses
+if negation ok
+after negation
+after while
+before false in trap2a.sub
+after false in trap2a.sub
+command substitution
++[6] echo 1
+1
++[7] echo 2
+2
++[8] echo 3
++[8] cat
++[8] false
+++[8] echo trap: 8
+trap: 8
++[9] echo 4
+4
+caught a child death
+caught a child death
+caught a child death
+trap -- 'echo caught a child death' SIGCHLD
+trap -- 'echo exiting' EXIT
+trap -- 'echo aborting' SIGABRT
+trap -- 'echo caught a child death' SIGCHLD
+trap -- '' SIGUSR2
+exiting
diff --git a/tests/trap.tests b/tests/trap.tests
new file mode 100644
index 0000000..ded1d70
--- /dev/null
+++ b/tests/trap.tests
@@ -0,0 +1,93 @@
+# test the trap code
+
+trap 'echo exiting' 0
+trap 'echo aborting' 1 2 3 6 15
+
+# make sure a user-specified subshell runs the exit trap, but does not
+# inherit the exit trap from a parent shell
+( trap 'echo subshell exit' 0; exit 0 )
+( exit 0 )
+
+trap
+
+func()
+{
+ trap 'echo ${FUNCNAME:-$0}[$LINENO] funcdebug' DEBUG
+ echo funcdebug line
+}
+
+trap 'echo [$LINENO] debug' DEBUG
+echo debug line
+
+trap
+
+func
+
+trap
+
+trap 'echo ${FUNCNAME:-$0}[$LINENO] debug' DEBUG
+func2()
+{
+ echo func2debug line
+}
+declare -ft func2
+func2
+
+unset -f func2
+
+trap '' DEBUG
+
+trap
+
+trap - debug
+
+trap
+
+trap - HUP
+trap hup
+trap '' INT
+trap '' int
+
+trap
+
+# exit 0 in exit trap should set exit status
+(
+set -e
+trap 'exit 0' EXIT
+false
+echo bad
+)
+echo $?
+
+# hmmm...should this set the handling to SIG_IGN for children, too?
+trap '' USR2
+./trap1.sub
+
+# test ERR trap
+./trap2.sub
+
+${THIS_SH} ./trap3.sub
+
+#
+# show that setting a trap on SIGCHLD is not disastrous.
+#
+set -o monitor
+
+trap 'echo caught a child death' SIGCHLD
+
+sleep 7 & sleep 6 & sleep 5 &
+
+# this will only catch the first, since there's a trap on SIGCHLD
+wait
+
+trap -p SIGCHLD
+
+# Now reset some of the signals the shell handles specially back to
+# their default values (with or without the SIG prefix)
+trap - SIGINT QUIT TERM
+
+trap
+
+trap - SIGCHLD
+wait
+
diff --git a/tests/trap1.sub b/tests/trap1.sub
new file mode 100755
index 0000000..48f8530
--- /dev/null
+++ b/tests/trap1.sub
@@ -0,0 +1,4 @@
+# signals ignored at shell startup cannot be trapped or reset
+trap 'echo USR2' USR2
+
+trap -p USR2
diff --git a/tests/trap2.sub b/tests/trap2.sub
new file mode 100755
index 0000000..73357df
--- /dev/null
+++ b/tests/trap2.sub
@@ -0,0 +1,25 @@
+set +e
+trap 'echo ERRTRAP' ERR
+
+false
+false
+false
+
+echo after falses
+
+if ! false; then
+ echo if negation ok
+fi
+
+! false
+echo after negation
+
+while false; do
+ echo while negation ok
+done
+
+echo after while
+
+./trap2a.sub
+
+echo $(false ; echo command substitution)
diff --git a/tests/trap2a.sub b/tests/trap2a.sub
new file mode 100755
index 0000000..44d6b50
--- /dev/null
+++ b/tests/trap2a.sub
@@ -0,0 +1,3 @@
+echo before false in trap2a.sub
+false
+echo after false in trap2a.sub
diff --git a/tests/trap3.sub b/tests/trap3.sub
new file mode 100644
index 0000000..0df4455
--- /dev/null
+++ b/tests/trap3.sub
@@ -0,0 +1,9 @@
+PS4='+[$LINENO] '
+trap 'echo trap: $LINENO' ERR
+
+set -x
+
+echo 1
+echo 2
+echo 3 | cat | false
+echo 4
diff --git a/tests/type.right b/tests/type.right
new file mode 100644
index 0000000..a628231
--- /dev/null
+++ b/tests/type.right
@@ -0,0 +1,82 @@
+./type.tests: line 9: type: -r: invalid option
+type: usage: type [-afptP] name [name ...]
+./type.tests: line 12: type: notthere: not found
+function
+keyword
+builtin
+file
+file
+file
+func is a function
+func ()
+{
+ echo this is func
+}
+while is a shell keyword
+while is a shell keyword
+builtin is a shell builtin
+/bin/sh is /bin/sh
+func
+func is a function
+func ()
+{
+ echo this is func
+}
+while
+while is a shell keyword
+./type.tests: line 43: type: m: not found
+alias m='more'
+alias m='more'
+m is aliased to `more'
+alias
+alias m='more'
+alias m='more'
+alias m='more'
+m is aliased to `more'
+builtin
+builtin is a shell builtin
+/bin/sh
+/bin/sh is /bin/sh
+./type.tests: line 65: type: func: not found
+./type.tests: line 67: type: m: not found
+/bin/sh
+/tmp/bash
+bash is hashed (/tmp/bash)
+file
+hits command
+ 3 /tmp/bash
+ 1 /bin/sh
+f is a function
+f ()
+{
+ v='^A'
+}
+foo is a function
+foo ()
+{
+ echo $(<x1)
+}
+bar is a function
+bar ()
+{
+ echo $(<x1)
+}
+foo is a function
+foo ()
+{
+ echo;
+ cat <<END
+bar
+END
+
+ cat <<EOF
+qux
+EOF
+
+}
+
+bar
+qux
+
+bar
+qux
diff --git a/tests/type.tests b/tests/type.tests
new file mode 100644
index 0000000..6caa243
--- /dev/null
+++ b/tests/type.tests
@@ -0,0 +1,93 @@
+set +o posix
+
+hash -r
+unalias -a
+
+# this should echo nothing
+type
+# this should be a usage error
+type -r ${THIS_SH}
+
+# these should behave identically
+type notthere
+command -v notthere
+
+alias m=more
+
+unset -f func 2>/dev/null
+func() { echo this is func; }
+
+type -t func
+type -t while
+type -t builtin
+type -t /bin/sh
+type -t ${THIS_SH}
+type -t mv
+
+type func
+# the following two should produce identical output
+type while
+type -a while
+type builtin
+type /bin/sh
+
+command -v func
+command -V func
+command -v while
+command -V while
+
+# the following two lines should produce the same output
+# post-3.0 patch makes command -v silent, as posix specifies
+# first test with alias expansion off (should all fail or produce no output)
+type -t m
+type m
+command -v m
+alias -p
+alias m
+
+# then test with alias expansion on
+shopt -s expand_aliases
+type m
+type -t m
+command -v m
+alias -p
+alias m
+
+command -V m
+shopt -u expand_aliases
+
+command -v builtin
+command -V builtin
+command -v /bin/sh
+command -V /bin/sh
+
+unset -f func
+type func
+unalias m
+type m
+
+hash -r
+
+hash -p /bin/sh sh
+type -p sh
+
+SHBASE=${THIS_SH##*/}
+hash -p /tmp/$SHBASE $SHBASE
+type -p $SHBASE
+type $SHBASE
+
+type -t $SHBASE
+
+# make sure the hash table looks right
+hash
+
+# bug in versions of bash up to and including bash-3.2
+f() {
+ v=$'\001'
+ }
+
+type f | cat -v
+
+${THIS_SH} type1.sub
+
+${THIS_SH} type2.sub
diff --git a/tests/type1.sub b/tests/type1.sub
new file mode 100644
index 0000000..95f96ae
--- /dev/null
+++ b/tests/type1.sub
@@ -0,0 +1,10 @@
+foo()
+{
+ echo $(<x1)
+}
+
+type foo
+
+eval "$(declare -f foo | sed 's:foo:bar:')"
+
+type bar
diff --git a/tests/type2.sub b/tests/type2.sub
new file mode 100644
index 0000000..3f85ead
--- /dev/null
+++ b/tests/type2.sub
@@ -0,0 +1,16 @@
+foo()
+{
+ echo
+ cat <<END
+bar
+END
+ cat <<EOF
+qux
+EOF
+}
+
+type foo
+foo
+
+eval "$(type foo | sed 1d)"
+foo
diff --git a/tests/varenv.right b/tests/varenv.right
new file mode 100644
index 0000000..df8086d
--- /dev/null
+++ b/tests/varenv.right
@@ -0,0 +1,56 @@
+3 4
+5 6 7 8 9
+7 8 9
+/usr/chet
+/usr/chet
+/usr/chet
+/a/b/c
+/usr/chet
+/usr/chet 7
+/a/b/c 9 /a/b/c
+/a/b/c 9 /a/b/c
+/a/b/c /a/b/c
+1 2
+1 1
+unset
+toronto airport
+AVAR
+song by rush
+BVAR
+toronto airport
+AVAR
+AVAR
+42
+/bin:/usr/bin:/usr/local/bin:.
+avar=([0]="/bin:/usr/bin:/usr/local/bin:.")
+z=yy
+42
+declare -i ivar="10"
+unset
+declare -x ivar="42"
+hB
+braceexpand:hashall:interactive-comments
+hBP
+braceexpand:hashall:interactive-comments:physical
+declare -r SHELLOPTS="braceexpand:hashall:interactive-comments:physical"
+abcde
+20
+30
+40
+50
+|0|10|
+10
+|0|10|
+10
+|0|10|
+10
+|4|
+4
+|0|11|
+after fff3: x=4
+|0|12|
+|y|
+|y|
+a=z
+a=b
+a=z
diff --git a/tests/varenv.sh b/tests/varenv.sh
new file mode 100644
index 0000000..77776f9
--- /dev/null
+++ b/tests/varenv.sh
@@ -0,0 +1,206 @@
+#
+# varenv.sh
+#
+# Test the behavior of the shell with respect to variable and environment
+# assignments
+#
+expect()
+{
+ echo expect "$@"
+}
+
+a=1
+b=2
+c=3
+d=4
+e=5
+f=6 g=7 h=8
+
+a=3 b=4 $CHMOD $MODE $FN
+
+# This should echo "3 4" according to Posix.2
+expect "3 4"
+echo $a $b
+
+set -k
+
+# Assignment statements made when no words are left affect the shell's
+# environment
+a=5 b=6 $CHMOD c=7 $MODE d=8 $FN e=9
+
+expect "5 6 7 8 9"
+echo $a $b $c $d $e
+
+$CHMOD f=7 $MODE g=8 $FN h=9
+expect "7 8 9"
+echo $f $g $h
+
+set +k
+
+# The temporary environment does not affect variable expansion, only the
+# environment given to the command
+
+export HOME=/usr/chet
+expect $HOME
+echo $HOME
+
+expect $HOME
+HOME=/a/b/c /bin/echo $HOME
+
+expect $HOME
+echo $HOME
+
+# This should echo /a/b/c
+expect /a/b/c
+HOME=/a/b/c printenv HOME
+
+set -k
+
+# This should echo $HOME 9, NOT /a/b/c 9
+
+expect "$HOME"
+HOME=/a/b/c /bin/echo $HOME c=9
+expect "$HOME 7"
+echo $HOME $c
+
+# I claim the next two echo calls should give identical output.
+# ksh agrees, the System V.3 sh does not
+
+expect "/a/b/c 9 /a/b/c"
+HOME=/a/b/c $ECHO a=$HOME c=9
+echo $HOME $c $a
+
+expect "/a/b/c 9 /a/b/c"
+HOME=/a/b/c a=$HOME c=9
+echo $HOME $c $a
+set +k
+
+# How do assignment statements affect subsequent assignments on the same
+# line?
+expect "/a/b/c /a/b/c"
+HOME=/a/b/c a=$HOME
+echo $HOME $a
+
+# The system V.3 sh does this wrong; the last echo should output "1 1",
+# but the system V.3 sh has it output "2 2". Posix.2 says the assignment
+# statements are processed left-to-right. bash and ksh output the right
+# thing
+c=1
+d=2
+expect "1 2"
+echo $c $d
+d=$c c=$d
+expect "1 1"
+echo $c $d
+
+# just for completeness
+unset d c
+expect unset
+echo ${d-unset}
+
+# no output
+export a
+a=bcde
+export a
+/bin/true 2>/dev/null
+
+func()
+{
+ local YYZ
+
+ YYZ="song by rush"
+ echo $YYZ
+ echo $A
+}
+
+YYZ="toronto airport"
+A="AVAR"
+echo $YYZ
+echo $A
+A=BVAR func
+echo $YYZ
+echo $A
+
+export A
+# Make sure expansion doesn't use assignment statements preceding a builtin
+A=ZVAR echo $A
+
+XPATH=/bin:/usr/bin:/usr/local/bin:.
+func2()
+{
+ local z=yy
+ local -a avar=( ${XPATH//: } )
+ echo ${avar[@]}
+ local
+}
+
+avar=42
+echo $avar
+func2
+echo $avar
+
+# try to set an attribute for an unset variable; make sure it persists
+# when the variable is assigned a value
+declare -i ivar
+
+ivar=10
+
+declare -p ivar
+unset ivar
+
+# export an unset variable, make sure it is not suddenly set, but make
+# sure the export attribute persists when the variable is assigned a
+# value
+export ivar
+echo ${ivar-unset}
+
+ivar=42
+declare -p ivar
+
+# make sure set [-+]o ignoreeof and $IGNOREEOF are reflected
+unset IGNOREEOF
+set +o ignoreeof
+set -o ignoreeof
+if [ "$IGNOREEOF" -ne 10 ]; then
+ echo "./varenv.sh: set -o ignoreeof is not reflected in IGNOREEOF" >&2
+fi
+unset IGNOREEOF
+set +o ignoreeof
+
+# older versions of bash used to not reset RANDOM in subshells correctly
+[[ $RANDOM -eq $(echo $RANDOM) ]] && echo "RANDOM: problem with subshells"
+
+# make sure that shopt -o is reflected in $SHELLOPTS
+# first, get rid of things that might be set automatically via shell
+# variables
+set +o posix
+set +o ignoreeof
+set +o monitor
+echo $-
+echo ${SHELLOPTS}
+shopt -so physical
+echo $-
+echo ${SHELLOPTS}
+
+# and make sure it is readonly
+readonly -p | grep SHELLOPTS
+
+# This was an error in bash versions prior to bash-2.04. The `set -a'
+# should cause the assignment statement that's an argument to typeset
+# to create an exported variable
+unset FOOFOO
+FOOFOO=bar
+set -a
+typeset FOOFOO=abcde
+
+printenv FOOFOO
+
+# test out export behavior of variable assignments preceding builtins and
+# functions
+$THIS_SH ./varenv1.sub
+
+# more tests; bugs in bash up to version 2.05a
+$THIS_SH ./varenv2.sub
+
+# make sure variable scoping is done right
+tt() { typeset a=b;echo a=$a; };a=z;echo a=$a;tt;echo a=$a
diff --git a/tests/varenv1.sub b/tests/varenv1.sub
new file mode 100644
index 0000000..168f87b
--- /dev/null
+++ b/tests/varenv1.sub
@@ -0,0 +1,28 @@
+# test out the export behavior of variable assignments preceding `eval', `.'
+# and shell functions
+
+func()
+{
+ printenv var
+}
+
+export var=10
+echo expect 20
+var=20 eval printenv var
+
+: ${TMPDIR:=/tmp}
+TMPFILE=$TMPDIR/evalsub.$$
+
+rm -f $TMPFILE
+echo 'printenv var' > $TMPFILE
+
+echo expect 30
+var=30 . $TMPFILE
+
+rm -f $TMPFILE
+
+echo expect 40
+var=40 func
+
+echo expect 50
+var=50 command printenv var
diff --git a/tests/varenv2.sub b/tests/varenv2.sub
new file mode 100644
index 0000000..b293572
--- /dev/null
+++ b/tests/varenv2.sub
@@ -0,0 +1,44 @@
+fff()
+{
+ typeset i=0 x=10
+ echo "|$i|$x|"
+ export x
+ printenv x
+}
+
+fff2()
+{
+ echo "|$x|"
+ export x
+ printenv x
+}
+
+fff3()
+{
+ typeset i=0 x="${x-10}"
+ echo "|$i|$x|"
+}
+
+fff4()
+{
+ typeset i=0 x
+ x="${x-10}"
+ echo "|$i|$x|"
+}
+
+fff5()
+{
+ z=y typeset z
+ echo "|$z|"
+}
+
+fff
+x=10 fff
+x=1 fff
+x=4 fff2
+x=11 fff3
+echo after fff3: x=$x
+x=12 fff4
+
+fff5
+z=42 fff5
diff --git a/tests/version b/tests/version
new file mode 100644
index 0000000..bd74020
--- /dev/null
+++ b/tests/version
@@ -0,0 +1,8 @@
+echo Testing ${THIS_SH}
+
+echo version: $BASH_VERSION
+echo versinfo: ${BASH_VERSINFO[@]}
+
+echo HOSTTYPE = $HOSTTYPE
+echo OSTYPE = $OSTYPE
+echo MACHTYPE = $MACHTYPE
diff --git a/tests/version.mini b/tests/version.mini
new file mode 100644
index 0000000..72e4bf9
--- /dev/null
+++ b/tests/version.mini
@@ -0,0 +1,8 @@
+echo Testing ${THIS_SH}
+
+echo version: $BASH_VERSION
+#echo versinfo: ${BASH_VERSINFO[@]}
+
+echo HOSTTYPE = $HOSTTYPE
+echo OSTYPE = $OSTYPE
+echo MACHTYPE = $MACHTYPE
diff --git a/tests/vredir.right b/tests/vredir.right
new file mode 100644
index 0000000..0e3b24b
--- /dev/null
+++ b/tests/vredir.right
@@ -0,0 +1,88 @@
+10
+foo 1
+foo 2
+foo 3
+bar is a function
+bar ()
+{
+ exec {v}> $TMPFILE;
+ echo $v
+}
+./vredir.tests: line 6: v: readonly variable
+./vredir.tests: line 6: v: cannot assign fd to variable
+42
+./vredir.tests: line 25: $v: Bad file descriptor
+./vredir.tests: line 26: $v: Bad file descriptor
+./vredir.tests: line 27: $v: Bad file descriptor
+bar is a function
+bar ()
+{
+ exec {v}> $TMPFILE;
+ echo $v
+}
+11
+line 1
+line 2
+line 3
+bar is a function
+bar ()
+{
+ exec {v}<<EOF
+line 1
+line 2
+line 3
+EOF
+
+ echo $v
+}
+11
+foo 1
+foo 2
+foo 3
+11
+/bin/bash
+/bin/csh
+/bin/ksh
+/bin/sh
+/bin/tcsh
+/bin/zsh
+oclosev is a function
+oclosev ()
+{
+ exec {v}>&-
+}
+iclosev is a function
+iclosev ()
+{
+ exec {v}>&-
+}
+/bin/bash
+/bin/csh
+/bin/ksh
+/bin/sh
+/bin/tcsh
+/bin/zsh
+./vredir3.sub: line 4: v: ambiguous redirect
+after
+11 12
+a
+a
+swizzle is a function
+swizzle ()
+{
+ fd0=0;
+ fd1=1;
+ exec {stdin}<&$fd0;
+ exec {stdout}>&$fd1
+}
+13 11
+a
+a
+swizzle is a function
+swizzle ()
+{
+ exec {fd0}<&0;
+ exec {fd1}>&1;
+ exec {stdin}<&$fd0-;
+ exec {stdout}>&$fd1-
+}
diff --git a/tests/vredir.tests b/tests/vredir.tests
new file mode 100644
index 0000000..df4fd8f
--- /dev/null
+++ b/tests/vredir.tests
@@ -0,0 +1,44 @@
+: ${TMPDIR:=/var/tmp}
+TMPFILE=$TMPDIR/foo
+
+bar()
+{
+exec {v}>$TMPFILE
+echo $v
+}
+
+bar
+
+echo foo 1 >&$v
+echo foo 2 >&$v
+echo foo 3 >&$v
+
+cat $TMPFILE
+rm -f $TMPFILE
+
+type bar
+exec {v}>&-
+
+readonly v=42
+bar
+
+echo foo 1 >&$v
+echo foo 2 >&$v
+echo foo 3 >&$v
+
+cat $TMPFILE
+rm -f $TMPFILE
+
+type bar
+
+${THIS_SH} ./vredir1.sub
+
+${THIS_SH} ./vredir2.sub
+
+${THIS_SH} ./vredir3.sub
+
+${THIS_SH} ./vredir4.sub
+
+${THIS_SH} ./vredir5.sub
+
+exit 0
diff --git a/tests/vredir1.sub b/tests/vredir1.sub
new file mode 100644
index 0000000..403734c
--- /dev/null
+++ b/tests/vredir1.sub
@@ -0,0 +1,17 @@
+bar()
+{
+exec {v}<<EOF
+line 1
+line 2
+line 3
+EOF
+echo $v
+}
+
+bar
+
+cat <&$v
+
+type bar
+
+exit 0
diff --git a/tests/vredir2.sub b/tests/vredir2.sub
new file mode 100644
index 0000000..e1a380d
--- /dev/null
+++ b/tests/vredir2.sub
@@ -0,0 +1,52 @@
+: ${TMPDIR:=/var/tmp}
+SHELLSFILE=$TMPDIR/shells-$$
+
+cat > $TMPDIR/shells-$$ <<EOF
+/bin/bash
+/bin/csh
+/bin/ksh
+/bin/sh
+/bin/tcsh
+/bin/zsh
+EOF
+
+oclosev()
+{
+exec {v}>&-
+}
+
+iclosev()
+{
+exec {v}<&-
+}
+
+exec {v}>&1
+echo $v
+
+echo foo 1 >&$v
+echo foo 2 >&$v
+echo foo 3 >&$v
+
+oclosev
+
+exec {v}<$SHELLSFILE
+echo $v
+
+while read line <&$v
+do
+ echo $line
+done
+
+iclosev
+
+type oclosev
+type iclosev
+
+while read -r -u ${fd}
+do
+ echo $REPLY
+done {fd}<$SHELLSFILE
+
+rm -f $SHELLSFILE
+
+exit 0
diff --git a/tests/vredir3.sub b/tests/vredir3.sub
new file mode 100644
index 0000000..358ded2
--- /dev/null
+++ b/tests/vredir3.sub
@@ -0,0 +1,8 @@
+# Right now, the {varname} mechanism does not honor set -u for compatibility
+unset v
+set -u
+exec {v}>&-
+
+echo after
+
+exit 0
diff --git a/tests/vredir4.sub b/tests/vredir4.sub
new file mode 100644
index 0000000..e1cef05
--- /dev/null
+++ b/tests/vredir4.sub
@@ -0,0 +1,22 @@
+swizzle()
+{
+fd0=0
+fd1=1
+
+exec {stdin}<&$fd0
+exec {stdout}>&$fd1
+}
+
+swizzle
+echo $stdin $stdout
+
+read line <&$stdin <<EOF
+a
+EOF
+
+echo $line
+echo $line >&$stdout
+
+type swizzle
+
+exit 0
diff --git a/tests/vredir5.sub b/tests/vredir5.sub
new file mode 100644
index 0000000..d1531e9
--- /dev/null
+++ b/tests/vredir5.sub
@@ -0,0 +1,23 @@
+swizzle()
+{
+exec {fd0}<&0
+exec {fd1}>&1
+
+exec {stdin}<&$fd0-
+exec {stdout}>&$fd1-
+}
+
+swizzle
+
+echo $stdin $stdout
+
+read line <&$stdin <<EOF
+a
+EOF
+
+echo $line
+echo $line >&$stdout
+
+type swizzle
+
+exit 0
diff --git a/trap.c b/trap.c
new file mode 100644
index 0000000..27a8aca
--- /dev/null
+++ b/trap.c
@@ -0,0 +1,1065 @@
+/* trap.c -- Not the trap command, but useful functions for manipulating
+ those objects. The trap command is in builtins/trap.def. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include "bashtypes.h"
+#include "bashansi.h"
+
+#include <stdio.h>
+#include <errno.h>
+
+#include "bashintl.h"
+
+#include "trap.h"
+
+#include "shell.h"
+#include "flags.h"
+#include "input.h" /* for save_token_state, restore_token_state */
+#include "jobs.h"
+#include "signames.h"
+#include "builtins.h"
+#include "builtins/common.h"
+#include "builtins/builtext.h"
+
+#ifndef errno
+extern int errno;
+#endif
+
+/* Flags which describe the current handling state of a signal. */
+#define SIG_INHERITED 0x0 /* Value inherited from parent. */
+#define SIG_TRAPPED 0x1 /* Currently trapped. */
+#define SIG_HARD_IGNORE 0x2 /* Signal was ignored on shell entry. */
+#define SIG_SPECIAL 0x4 /* Treat this signal specially. */
+#define SIG_NO_TRAP 0x8 /* Signal cannot be trapped. */
+#define SIG_INPROGRESS 0x10 /* Signal handler currently executing. */
+#define SIG_CHANGED 0x20 /* Trap value changed in trap handler. */
+#define SIG_IGNORED 0x40 /* The signal is currently being ignored. */
+
+#define SPECIAL_TRAP(s) ((s) == EXIT_TRAP || (s) == DEBUG_TRAP || (s) == ERROR_TRAP || (s) == RETURN_TRAP)
+
+/* An array of such flags, one for each signal, describing what the
+ shell will do with a signal. DEBUG_TRAP == NSIG; some code below
+ assumes this. */
+static int sigmodes[BASH_NSIG];
+
+static void free_trap_command __P((int));
+static void change_signal __P((int, char *));
+
+static void get_original_signal __P((int));
+
+static int _run_trap_internal __P((int, char *));
+
+static void free_trap_string __P((int));
+static void reset_signal __P((int));
+static void restore_signal __P((int));
+static void reset_or_restore_signal_handlers __P((sh_resetsig_func_t *));
+
+/* Variables used here but defined in other files. */
+extern int last_command_exit_value;
+extern int line_number;
+
+extern char *this_command_name;
+extern sh_builtin_func_t *this_shell_builtin;
+extern procenv_t wait_intr_buf;
+extern int return_catch_flag, return_catch_value;
+extern int subshell_level;
+extern WORD_LIST *subst_assign_varlist;
+
+/* The list of things to do originally, before we started trapping. */
+SigHandler *original_signals[NSIG];
+
+/* For each signal, a slot for a string, which is a command to be
+ executed when that signal is recieved. The slot can also contain
+ DEFAULT_SIG, which means do whatever you were going to do before
+ you were so rudely interrupted, or IGNORE_SIG, which says ignore
+ this signal. */
+char *trap_list[BASH_NSIG];
+
+/* A bitmap of signals received for which we have trap handlers. */
+int pending_traps[NSIG];
+
+/* Set to the number of the signal we're running the trap for + 1.
+ Used in execute_cmd.c and builtins/common.c to clean up when
+ parse_and_execute does not return normally after executing the
+ trap command (e.g., when `return' is executed in the trap command). */
+int running_trap;
+
+/* Set to last_command_exit_value before running a trap. */
+int trap_saved_exit_value;
+
+/* The (trapped) signal received while executing in the `wait' builtin */
+int wait_signal_received;
+
+/* A value which can never be the target of a trap handler. */
+#define IMPOSSIBLE_TRAP_HANDLER (SigHandler *)initialize_traps
+
+#define GETORIGSIG(sig) \
+ do { \
+ original_signals[sig] = (SigHandler *)set_signal_handler (sig, SIG_DFL); \
+ set_signal_handler (sig, original_signals[sig]); \
+ if (original_signals[sig] == SIG_IGN) \
+ sigmodes[sig] |= SIG_HARD_IGNORE; \
+ } while (0)
+
+#define GET_ORIGINAL_SIGNAL(sig) \
+ if (sig && sig < NSIG && original_signals[sig] == IMPOSSIBLE_TRAP_HANDLER) \
+ GETORIGSIG(sig)
+
+void
+initialize_traps ()
+{
+ register int i;
+
+ initialize_signames();
+
+ trap_list[EXIT_TRAP] = trap_list[DEBUG_TRAP] = trap_list[ERROR_TRAP] = trap_list[RETURN_TRAP] = (char *)NULL;
+ sigmodes[EXIT_TRAP] = sigmodes[DEBUG_TRAP] = sigmodes[ERROR_TRAP] = sigmodes[RETURN_TRAP] = SIG_INHERITED;
+ original_signals[EXIT_TRAP] = IMPOSSIBLE_TRAP_HANDLER;
+
+ for (i = 1; i < NSIG; i++)
+ {
+ pending_traps[i] = 0;
+ trap_list[i] = (char *)DEFAULT_SIG;
+ sigmodes[i] = SIG_INHERITED;
+ original_signals[i] = IMPOSSIBLE_TRAP_HANDLER;
+ }
+
+ /* Show which signals are treated specially by the shell. */
+#if defined (SIGCHLD)
+ GETORIGSIG (SIGCHLD);
+ sigmodes[SIGCHLD] |= (SIG_SPECIAL | SIG_NO_TRAP);
+#endif /* SIGCHLD */
+
+ GETORIGSIG (SIGINT);
+ sigmodes[SIGINT] |= SIG_SPECIAL;
+
+#if defined (__BEOS__)
+ /* BeOS sets SIGINT to SIG_IGN! */
+ original_signals[SIGINT] = SIG_DFL;
+ sigmodes[SIGINT] &= ~SIG_HARD_IGNORE;
+#endif
+
+ GETORIGSIG (SIGQUIT);
+ sigmodes[SIGQUIT] |= SIG_SPECIAL;
+
+ if (interactive)
+ {
+ GETORIGSIG (SIGTERM);
+ sigmodes[SIGTERM] |= SIG_SPECIAL;
+ }
+}
+
+#ifdef INCLUDE_UNUSED
+/* Return a printable representation of the trap handler for SIG. */
+static char *
+trap_handler_string (sig)
+ int sig;
+{
+ if (trap_list[sig] == (char *)DEFAULT_SIG)
+ return "DEFAULT_SIG";
+ else if (trap_list[sig] == (char *)IGNORE_SIG)
+ return "IGNORE_SIG";
+ else if (trap_list[sig] == (char *)IMPOSSIBLE_TRAP_HANDLER)
+ return "IMPOSSIBLE_TRAP_HANDLER";
+ else if (trap_list[sig])
+ return trap_list[sig];
+ else
+ return "NULL";
+}
+#endif
+
+/* Return the print name of this signal. */
+char *
+signal_name (sig)
+ int sig;
+{
+ char *ret;
+
+ /* on cygwin32, signal_names[sig] could be null */
+ ret = (sig >= BASH_NSIG || sig < 0 || signal_names[sig] == NULL)
+ ? _("invalid signal number")
+ : signal_names[sig];
+
+ return ret;
+}
+
+/* Turn a string into a signal number, or a number into
+ a signal number. If STRING is "2", "SIGINT", or "INT",
+ then (int)2 is returned. Return NO_SIG if STRING doesn't
+ contain a valid signal descriptor. */
+int
+decode_signal (string, flags)
+ char *string;
+ int flags;
+{
+ intmax_t sig;
+ char *name;
+
+ if (legal_number (string, &sig))
+ return ((sig >= 0 && sig < NSIG) ? (int)sig : NO_SIG);
+
+ /* A leading `SIG' may be omitted. */
+ for (sig = 0; sig < BASH_NSIG; sig++)
+ {
+ name = signal_names[sig];
+ if (name == 0 || name[0] == '\0')
+ continue;
+
+ /* Check name without the SIG prefix first case sensitivly or
+ insensitively depending on whether flags includes DSIG_NOCASE */
+ if (STREQN (name, "SIG", 3))
+ {
+ name += 3;
+
+ if ((flags & DSIG_NOCASE) && strcasecmp (string, name) == 0)
+ return ((int)sig);
+ else if ((flags & DSIG_NOCASE) == 0 && strcmp (string, name) == 0)
+ return ((int)sig);
+ /* If we can't use the `SIG' prefix to match, punt on this
+ name now. */
+ else if ((flags & DSIG_SIGPREFIX) == 0)
+ continue;
+ }
+
+ /* Check name with SIG prefix case sensitively or insensitively
+ depending on whether flags includes DSIG_NOCASE */
+ name = signal_names[sig];
+ if ((flags & DSIG_NOCASE) && strcasecmp (string, name) == 0)
+ return ((int)sig);
+ else if ((flags & DSIG_NOCASE) == 0 && strcmp (string, name) == 0)
+ return ((int)sig);
+ }
+
+ return (NO_SIG);
+}
+
+/* Non-zero when we catch a trapped signal. */
+static int catch_flag;
+
+void
+run_pending_traps ()
+{
+ register int sig;
+ int old_exit_value, *token_state;
+ WORD_LIST *save_subst_varlist;
+
+ if (catch_flag == 0) /* simple optimization */
+ return;
+
+ catch_flag = 0;
+
+ /* Preserve $? when running trap. */
+ old_exit_value = last_command_exit_value;
+
+ for (sig = 1; sig < NSIG; sig++)
+ {
+ /* XXX this could be made into a counter by using
+ while (pending_traps[sig]--) instead of the if statement. */
+ if (pending_traps[sig])
+ {
+#if defined (HAVE_POSIX_SIGNALS)
+ sigset_t set, oset;
+
+ sigemptyset (&set);
+ sigemptyset (&oset);
+
+ sigaddset (&set, sig);
+ sigprocmask (SIG_BLOCK, &set, &oset);
+#else
+# if defined (HAVE_BSD_SIGNALS)
+ int oldmask = sigblock (sigmask (sig));
+# endif
+#endif /* HAVE_POSIX_SIGNALS */
+
+ if (sig == SIGINT)
+ {
+ run_interrupt_trap ();
+ CLRINTERRUPT;
+ }
+#if defined (JOB_CONTROL) && defined (SIGCHLD)
+ else if (sig == SIGCHLD &&
+ trap_list[SIGCHLD] != (char *)IMPOSSIBLE_TRAP_HANDLER &&
+ (sigmodes[SIGCHLD] & SIG_INPROGRESS) == 0)
+ {
+ run_sigchld_trap (pending_traps[sig]); /* use as counter */
+ }
+#endif
+ else if (trap_list[sig] == (char *)DEFAULT_SIG ||
+ trap_list[sig] == (char *)IGNORE_SIG ||
+ trap_list[sig] == (char *)IMPOSSIBLE_TRAP_HANDLER)
+ {
+ /* This is possible due to a race condition. Say a bash
+ process has SIGTERM trapped. A subshell is spawned
+ using { list; } & and the parent does something and kills
+ the subshell with SIGTERM. It's possible for the subshell
+ to set pending_traps[SIGTERM] to 1 before the code in
+ execute_cmd.c eventually calls restore_original_signals
+ to reset the SIGTERM signal handler in the subshell. The
+ next time run_pending_traps is called, pending_traps[SIGTERM]
+ will be 1, but the trap handler in trap_list[SIGTERM] will
+ be invalid (probably DEFAULT_SIG, but it could be IGNORE_SIG).
+ Unless we catch this, the subshell will dump core when
+ trap_list[SIGTERM] == DEFAULT_SIG, because DEFAULT_SIG is
+ usually 0x0. */
+ internal_warning (_("run_pending_traps: bad value in trap_list[%d]: %p"),
+ sig, trap_list[sig]);
+ if (trap_list[sig] == (char *)DEFAULT_SIG)
+ {
+ internal_warning (_("run_pending_traps: signal handler is SIG_DFL, resending %d (%s) to myself"), sig, signal_name (sig));
+ kill (getpid (), sig);
+ }
+ }
+ else
+ {
+ token_state = save_token_state ();
+ save_subst_varlist = subst_assign_varlist;
+ subst_assign_varlist = 0;
+
+ parse_and_execute (savestring (trap_list[sig]), "trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE);
+ restore_token_state (token_state);
+ free (token_state);
+
+ subst_assign_varlist = save_subst_varlist;
+ }
+
+ pending_traps[sig] = 0;
+
+#if defined (HAVE_POSIX_SIGNALS)
+ sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL);
+#else
+# if defined (HAVE_BSD_SIGNALS)
+ sigsetmask (oldmask);
+# endif
+#endif /* POSIX_VERSION */
+ }
+ }
+
+ last_command_exit_value = old_exit_value;
+}
+
+sighandler
+trap_handler (sig)
+ int sig;
+{
+ int oerrno;
+
+ if ((sigmodes[sig] & SIG_TRAPPED) == 0)
+ {
+#if defined (DEBUG)
+ internal_warning ("trap_handler: signal %d: signal not trapped", sig);
+#endif
+ SIGRETURN (0);
+ }
+
+ if ((sig >= NSIG) ||
+ (trap_list[sig] == (char *)DEFAULT_SIG) ||
+ (trap_list[sig] == (char *)IGNORE_SIG))
+ programming_error (_("trap_handler: bad signal %d"), sig);
+ else
+ {
+ oerrno = errno;
+#if defined (MUST_REINSTALL_SIGHANDLERS)
+# if defined (JOB_CONTROL) && defined (SIGCHLD)
+ if (sig != SIGCHLD)
+# endif /* JOB_CONTROL && SIGCHLD */
+ set_signal_handler (sig, trap_handler);
+#endif /* MUST_REINSTALL_SIGHANDLERS */
+
+ catch_flag = 1;
+ pending_traps[sig]++;
+
+ if (interrupt_immediately && this_shell_builtin && (this_shell_builtin == wait_builtin))
+ {
+ wait_signal_received = sig;
+ longjmp (wait_intr_buf, 1);
+ }
+
+ if (interrupt_immediately)
+ run_pending_traps ();
+
+ errno = oerrno;
+ }
+
+ SIGRETURN (0);
+}
+
+#if defined (JOB_CONTROL) && defined (SIGCHLD)
+
+#ifdef INCLUDE_UNUSED
+/* Make COMMAND_STRING be executed when SIGCHLD is caught. */
+void
+set_sigchld_trap (command_string)
+ char *command_string;
+{
+ set_signal (SIGCHLD, command_string);
+}
+#endif
+
+/* Make COMMAND_STRING be executed when SIGCHLD is caught iff SIGCHLD
+ is not already trapped. IMPOSSIBLE_TRAP_HANDLER is used as a sentinel
+ to make sure that a SIGCHLD trap handler run via run_sigchld_trap can
+ reset the disposition to the default and not have the original signal
+ accidentally restored, undoing the user's command. */
+void
+maybe_set_sigchld_trap (command_string)
+ char *command_string;
+{
+ if ((sigmodes[SIGCHLD] & SIG_TRAPPED) == 0 && trap_list[SIGCHLD] == (char *)IMPOSSIBLE_TRAP_HANDLER)
+ set_signal (SIGCHLD, command_string);
+}
+
+/* Temporarily set the SIGCHLD trap string to IMPOSSIBLE_TRAP_HANDLER. Used
+ as a sentinel in run_sigchld_trap and maybe_set_sigchld_trap to see whether
+ or not a SIGCHLD trap handler reset SIGCHLD disposition to the default. */
+void
+set_impossible_sigchld_trap ()
+{
+ restore_default_signal (SIGCHLD);
+ change_signal (SIGCHLD, (char *)IMPOSSIBLE_TRAP_HANDLER);
+ sigmodes[SIGCHLD] &= ~SIG_TRAPPED; /* maybe_set_sigchld_trap checks this */
+}
+#endif /* JOB_CONTROL && SIGCHLD */
+
+void
+set_debug_trap (command)
+ char *command;
+{
+ set_signal (DEBUG_TRAP, command);
+}
+
+void
+set_error_trap (command)
+ char *command;
+{
+ set_signal (ERROR_TRAP, command);
+}
+
+void
+set_return_trap (command)
+ char *command;
+{
+ set_signal (RETURN_TRAP, command);
+}
+
+#ifdef INCLUDE_UNUSED
+void
+set_sigint_trap (command)
+ char *command;
+{
+ set_signal (SIGINT, command);
+}
+#endif
+
+/* Reset the SIGINT handler so that subshells that are doing `shellsy'
+ things, like waiting for command substitution or executing commands
+ in explicit subshells ( ( cmd ) ), can catch interrupts properly. */
+SigHandler *
+set_sigint_handler ()
+{
+ if (sigmodes[SIGINT] & SIG_HARD_IGNORE)
+ return ((SigHandler *)SIG_IGN);
+
+ else if (sigmodes[SIGINT] & SIG_IGNORED)
+ return ((SigHandler *)set_signal_handler (SIGINT, SIG_IGN)); /* XXX */
+
+ else if (sigmodes[SIGINT] & SIG_TRAPPED)
+ return ((SigHandler *)set_signal_handler (SIGINT, trap_handler));
+
+ /* The signal is not trapped, so set the handler to the shell's special
+ interrupt handler. */
+ else if (interactive) /* XXX - was interactive_shell */
+ return (set_signal_handler (SIGINT, sigint_sighandler));
+ else
+ return (set_signal_handler (SIGINT, termsig_sighandler));
+}
+
+/* Return the correct handler for signal SIG according to the values in
+ sigmodes[SIG]. */
+SigHandler *
+trap_to_sighandler (sig)
+ int sig;
+{
+ if (sigmodes[sig] & (SIG_IGNORED|SIG_HARD_IGNORE))
+ return (SIG_IGN);
+ else if (sigmodes[sig] & SIG_TRAPPED)
+ return (trap_handler);
+ else
+ return (SIG_DFL);
+}
+
+/* Set SIG to call STRING as a command. */
+void
+set_signal (sig, string)
+ int sig;
+ char *string;
+{
+ if (SPECIAL_TRAP (sig))
+ {
+ change_signal (sig, savestring (string));
+ if (sig == EXIT_TRAP && interactive == 0)
+ initialize_terminating_signals ();
+ return;
+ }
+
+ /* A signal ignored on entry to the shell cannot be trapped or reset, but
+ no error is reported when attempting to do so. -- Posix.2 */
+ if (sigmodes[sig] & SIG_HARD_IGNORE)
+ return;
+
+ /* Make sure we have original_signals[sig] if the signal has not yet
+ been trapped. */
+ if ((sigmodes[sig] & SIG_TRAPPED) == 0)
+ {
+ /* If we aren't sure of the original value, check it. */
+ if (original_signals[sig] == IMPOSSIBLE_TRAP_HANDLER)
+ GETORIGSIG (sig);
+ if (original_signals[sig] == SIG_IGN)
+ return;
+ }
+
+ /* Only change the system signal handler if SIG_NO_TRAP is not set.
+ The trap command string is changed in either case. The shell signal
+ handlers for SIGINT and SIGCHLD run the user specified traps in an
+ environment in which it is safe to do so. */
+ if ((sigmodes[sig] & SIG_NO_TRAP) == 0)
+ {
+ set_signal_handler (sig, SIG_IGN);
+ change_signal (sig, savestring (string));
+ set_signal_handler (sig, trap_handler);
+ }
+ else
+ change_signal (sig, savestring (string));
+}
+
+static void
+free_trap_command (sig)
+ int sig;
+{
+ if ((sigmodes[sig] & SIG_TRAPPED) && trap_list[sig] &&
+ (trap_list[sig] != (char *)IGNORE_SIG) &&
+ (trap_list[sig] != (char *)DEFAULT_SIG) &&
+ (trap_list[sig] != (char *)IMPOSSIBLE_TRAP_HANDLER))
+ free (trap_list[sig]);
+}
+
+/* If SIG has a string assigned to it, get rid of it. Then give it
+ VALUE. */
+static void
+change_signal (sig, value)
+ int sig;
+ char *value;
+{
+ if ((sigmodes[sig] & SIG_INPROGRESS) == 0)
+ free_trap_command (sig);
+ trap_list[sig] = value;
+
+ sigmodes[sig] |= SIG_TRAPPED;
+ if (value == (char *)IGNORE_SIG)
+ sigmodes[sig] |= SIG_IGNORED;
+ else
+ sigmodes[sig] &= ~SIG_IGNORED;
+ if (sigmodes[sig] & SIG_INPROGRESS)
+ sigmodes[sig] |= SIG_CHANGED;
+}
+
+static void
+get_original_signal (sig)
+ int sig;
+{
+ /* If we aren't sure the of the original value, then get it. */
+ if (sig > 0 && sig < NSIG && original_signals[sig] == (SigHandler *)IMPOSSIBLE_TRAP_HANDLER)
+ GETORIGSIG (sig);
+}
+
+/* Restore the default action for SIG; i.e., the action the shell
+ would have taken before you used the trap command. This is called
+ from trap_builtin (), which takes care to restore the handlers for
+ the signals the shell treats specially. */
+void
+restore_default_signal (sig)
+ int sig;
+{
+ if (SPECIAL_TRAP (sig))
+ {
+ if ((sig != DEBUG_TRAP && sig != ERROR_TRAP && sig != RETURN_TRAP) ||
+ (sigmodes[sig] & SIG_INPROGRESS) == 0)
+ free_trap_command (sig);
+ trap_list[sig] = (char *)NULL;
+ sigmodes[sig] &= ~SIG_TRAPPED;
+ if (sigmodes[sig] & SIG_INPROGRESS)
+ sigmodes[sig] |= SIG_CHANGED;
+ return;
+ }
+
+ GET_ORIGINAL_SIGNAL (sig);
+
+ /* A signal ignored on entry to the shell cannot be trapped or reset, but
+ no error is reported when attempting to do so. Thanks Posix.2. */
+ if (sigmodes[sig] & SIG_HARD_IGNORE)
+ return;
+
+ /* If we aren't trapping this signal, don't bother doing anything else. */
+ if ((sigmodes[sig] & SIG_TRAPPED) == 0)
+ return;
+
+ /* Only change the signal handler for SIG if it allows it. */
+ if ((sigmodes[sig] & SIG_NO_TRAP) == 0)
+ set_signal_handler (sig, original_signals[sig]);
+
+ /* Change the trap command in either case. */
+ change_signal (sig, (char *)DEFAULT_SIG);
+
+ /* Mark the signal as no longer trapped. */
+ sigmodes[sig] &= ~SIG_TRAPPED;
+}
+
+/* Make this signal be ignored. */
+void
+ignore_signal (sig)
+ int sig;
+{
+ if (SPECIAL_TRAP (sig) && ((sigmodes[sig] & SIG_IGNORED) == 0))
+ {
+ change_signal (sig, (char *)IGNORE_SIG);
+ return;
+ }
+
+ GET_ORIGINAL_SIGNAL (sig);
+
+ /* A signal ignored on entry to the shell cannot be trapped or reset.
+ No error is reported when the user attempts to do so. */
+ if (sigmodes[sig] & SIG_HARD_IGNORE)
+ return;
+
+ /* If already trapped and ignored, no change necessary. */
+ if (sigmodes[sig] & SIG_IGNORED)
+ return;
+
+ /* Only change the signal handler for SIG if it allows it. */
+ if ((sigmodes[sig] & SIG_NO_TRAP) == 0)
+ set_signal_handler (sig, SIG_IGN);
+
+ /* Change the trap command in either case. */
+ change_signal (sig, (char *)IGNORE_SIG);
+}
+
+/* Handle the calling of "trap 0". The only sticky situation is when
+ the command to be executed includes an "exit". This is why we have
+ to provide our own place for top_level to jump to. */
+int
+run_exit_trap ()
+{
+ char *trap_command;
+ int code, function_code, retval;
+
+ trap_saved_exit_value = last_command_exit_value;
+ function_code = 0;
+
+ /* Run the trap only if signal 0 is trapped and not ignored, and we are not
+ currently running in the trap handler (call to exit in the list of
+ commands given to trap 0). */
+ if ((sigmodes[EXIT_TRAP] & SIG_TRAPPED) &&
+ (sigmodes[EXIT_TRAP] & (SIG_IGNORED|SIG_INPROGRESS)) == 0)
+ {
+ trap_command = savestring (trap_list[EXIT_TRAP]);
+ sigmodes[EXIT_TRAP] &= ~SIG_TRAPPED;
+ sigmodes[EXIT_TRAP] |= SIG_INPROGRESS;
+
+ retval = trap_saved_exit_value;
+ running_trap = 1;
+
+ code = setjmp (top_level);
+
+ /* If we're in a function, make sure return longjmps come here, too. */
+ if (return_catch_flag)
+ function_code = setjmp (return_catch);
+
+ if (code == 0 && function_code == 0)
+ {
+ reset_parser ();
+ parse_and_execute (trap_command, "exit trap", SEVAL_NONINT|SEVAL_NOHIST|SEVAL_RESETLINE);
+ }
+ else if (code == ERREXIT)
+ retval = last_command_exit_value;
+ else if (code == EXITPROG)
+ retval = last_command_exit_value;
+ else if (function_code != 0)
+ retval = return_catch_value;
+ else
+ retval = trap_saved_exit_value;
+
+ running_trap = 0;
+ return retval;
+ }
+
+ return (trap_saved_exit_value);
+}
+
+void
+run_trap_cleanup (sig)
+ int sig;
+{
+ sigmodes[sig] &= ~(SIG_INPROGRESS|SIG_CHANGED);
+}
+
+/* Run a trap command for SIG. SIG is one of the signals the shell treats
+ specially. Returns the exit status of the executed trap command list. */
+static int
+_run_trap_internal (sig, tag)
+ int sig;
+ char *tag;
+{
+ char *trap_command, *old_trap;
+ int trap_exit_value, *token_state;
+ int save_return_catch_flag, function_code, flags;
+ procenv_t save_return_catch;
+ WORD_LIST *save_subst_varlist;
+
+ trap_exit_value = function_code = 0;
+ /* Run the trap only if SIG is trapped and not ignored, and we are not
+ currently executing in the trap handler. */
+ if ((sigmodes[sig] & SIG_TRAPPED) && ((sigmodes[sig] & SIG_IGNORED) == 0) &&
+ (trap_list[sig] != (char *)IMPOSSIBLE_TRAP_HANDLER) &&
+ ((sigmodes[sig] & SIG_INPROGRESS) == 0))
+ {
+ old_trap = trap_list[sig];
+ sigmodes[sig] |= SIG_INPROGRESS;
+ sigmodes[sig] &= ~SIG_CHANGED; /* just to be sure */
+ trap_command = savestring (old_trap);
+
+ running_trap = sig + 1;
+ trap_saved_exit_value = last_command_exit_value;
+
+ token_state = save_token_state ();
+ save_subst_varlist = subst_assign_varlist;
+ subst_assign_varlist = 0;
+
+ /* If we're in a function, make sure return longjmps come here, too. */
+ save_return_catch_flag = return_catch_flag;
+ if (return_catch_flag)
+ {
+ COPY_PROCENV (return_catch, save_return_catch);
+ function_code = setjmp (return_catch);
+ }
+
+ flags = SEVAL_NONINT|SEVAL_NOHIST;
+ if (sig != DEBUG_TRAP && sig != RETURN_TRAP && sig != ERROR_TRAP)
+ flags |= SEVAL_RESETLINE;
+ if (function_code == 0)
+ parse_and_execute (trap_command, tag, flags);
+
+ restore_token_state (token_state);
+ free (token_state);
+
+ subst_assign_varlist = save_subst_varlist;
+
+ trap_exit_value = last_command_exit_value;
+ last_command_exit_value = trap_saved_exit_value;
+ running_trap = 0;
+
+ sigmodes[sig] &= ~SIG_INPROGRESS;
+
+ if (sigmodes[sig] & SIG_CHANGED)
+ {
+#if 0
+ /* Special traps like EXIT, DEBUG, RETURN are handled explicitly in
+ the places where they can be changed using unwind-protects. For
+ example, look at execute_cmd.c:execute_function(). */
+ if (SPECIAL_TRAP (sig) == 0)
+#endif
+ free (old_trap);
+ sigmodes[sig] &= ~SIG_CHANGED;
+ }
+
+ if (save_return_catch_flag)
+ {
+ return_catch_flag = save_return_catch_flag;
+ return_catch_value = trap_exit_value;
+ COPY_PROCENV (save_return_catch, return_catch);
+ if (function_code)
+ longjmp (return_catch, 1);
+ }
+ }
+
+ return trap_exit_value;
+}
+
+int
+run_debug_trap ()
+{
+ int trap_exit_value;
+ pid_t save_pgrp;
+ int save_pipe[2];
+
+ /* XXX - question: should the DEBUG trap inherit the RETURN trap? */
+ trap_exit_value = 0;
+ if ((sigmodes[DEBUG_TRAP] & SIG_TRAPPED) && ((sigmodes[DEBUG_TRAP] & SIG_IGNORED) == 0) && ((sigmodes[DEBUG_TRAP] & SIG_INPROGRESS) == 0))
+ {
+#if defined (JOB_CONTROL)
+ save_pgrp = pipeline_pgrp;
+ pipeline_pgrp = 0;
+ save_pipeline (1);
+# if defined (PGRP_PIPE)
+ save_pgrp_pipe (save_pipe, 1);
+# endif
+ stop_making_children ();
+#endif
+
+ trap_exit_value = _run_trap_internal (DEBUG_TRAP, "debug trap");
+
+#if defined (JOB_CONTROL)
+ pipeline_pgrp = save_pgrp;
+ restore_pipeline (1);
+# if defined (PGRP_PIPE)
+ close_pgrp_pipe ();
+ restore_pgrp_pipe (save_pipe);
+# endif
+ if (pipeline_pgrp > 0)
+ give_terminal_to (pipeline_pgrp, 1);
+ notify_and_cleanup ();
+#endif
+
+#if defined (DEBUGGER)
+ /* If we're in the debugger and the DEBUG trap returns 2 while we're in
+ a function or sourced script, we force a `return'. */
+ if (debugging_mode && trap_exit_value == 2 && return_catch_flag)
+ {
+ return_catch_value = trap_exit_value;
+ longjmp (return_catch, 1);
+ }
+#endif
+ }
+ return trap_exit_value;
+}
+
+void
+run_error_trap ()
+{
+ if ((sigmodes[ERROR_TRAP] & SIG_TRAPPED) && ((sigmodes[ERROR_TRAP] & SIG_IGNORED) == 0) && (sigmodes[ERROR_TRAP] & SIG_INPROGRESS) == 0)
+ _run_trap_internal (ERROR_TRAP, "error trap");
+}
+
+void
+run_return_trap ()
+{
+ int old_exit_value;
+
+#if 0
+ if ((sigmodes[DEBUG_TRAP] & SIG_TRAPPED) && (sigmodes[DEBUG_TRAP] & SIG_INPROGRESS))
+ return;
+#endif
+
+ if ((sigmodes[RETURN_TRAP] & SIG_TRAPPED) && ((sigmodes[RETURN_TRAP] & SIG_IGNORED) == 0) && (sigmodes[RETURN_TRAP] & SIG_INPROGRESS) == 0)
+ {
+ old_exit_value = last_command_exit_value;
+ _run_trap_internal (RETURN_TRAP, "return trap");
+ last_command_exit_value = old_exit_value;
+ }
+}
+
+/* Run a trap set on SIGINT. This is called from throw_to_top_level (), and
+ declared here to localize the trap functions. */
+void
+run_interrupt_trap ()
+{
+ _run_trap_internal (SIGINT, "interrupt trap");
+}
+
+#ifdef INCLUDE_UNUSED
+/* Free all the allocated strings in the list of traps and reset the trap
+ values to the default. Intended to be called from subshells that want
+ to complete work done by reset_signal_handlers upon execution of a
+ subsequent `trap' command that changes a signal's disposition. */
+void
+free_trap_strings ()
+{
+ register int i;
+
+ for (i = 0; i < BASH_NSIG; i++)
+ free_trap_string (i);
+ trap_list[DEBUG_TRAP] = trap_list[EXIT_TRAP] = trap_list[ERROR_TRAP] = trap_list[RETURN_TRAP] = (char *)NULL;
+}
+
+/* Free a trap command string associated with SIG without changing signal
+ disposition. Intended to be called from free_trap_strings() */
+static void
+free_trap_string (sig)
+ int sig;
+{
+ change_signal (sig, (char *)DEFAULT_SIG);
+ sigmodes[sig] &= ~SIG_TRAPPED;
+}
+#endif
+
+/* Reset the handler for SIG to the original value. */
+static void
+reset_signal (sig)
+ int sig;
+{
+ set_signal_handler (sig, original_signals[sig]);
+ sigmodes[sig] &= ~SIG_TRAPPED;
+}
+
+/* Set the handler signal SIG to the original and free any trap
+ command associated with it. */
+static void
+restore_signal (sig)
+ int sig;
+{
+ set_signal_handler (sig, original_signals[sig]);
+ change_signal (sig, (char *)DEFAULT_SIG);
+ sigmodes[sig] &= ~SIG_TRAPPED;
+}
+
+static void
+reset_or_restore_signal_handlers (reset)
+ sh_resetsig_func_t *reset;
+{
+ register int i;
+
+ /* Take care of the exit trap first */
+ if (sigmodes[EXIT_TRAP] & SIG_TRAPPED)
+ {
+ sigmodes[EXIT_TRAP] &= ~SIG_TRAPPED;
+ if (reset != reset_signal)
+ {
+ free_trap_command (EXIT_TRAP);
+ trap_list[EXIT_TRAP] = (char *)NULL;
+ }
+ }
+
+ for (i = 1; i < NSIG; i++)
+ {
+ if (sigmodes[i] & SIG_TRAPPED)
+ {
+ if (trap_list[i] == (char *)IGNORE_SIG)
+ set_signal_handler (i, SIG_IGN);
+ else
+ (*reset) (i);
+ }
+ else if (sigmodes[i] & SIG_SPECIAL)
+ (*reset) (i);
+ }
+
+ /* Command substitution and other child processes don't inherit the
+ debug, error, or return traps. If we're in the debugger, and the
+ `functrace' or `errtrace' options have been set, then let command
+ substitutions inherit them. Let command substitution inherit the
+ RETURN trap if we're in the debugger and tracing functions. */
+ if (function_trace_mode == 0)
+ {
+ sigmodes[DEBUG_TRAP] &= ~SIG_TRAPPED;
+ sigmodes[RETURN_TRAP] &= ~SIG_TRAPPED;
+ }
+ if (error_trace_mode == 0)
+ sigmodes[ERROR_TRAP] &= ~SIG_TRAPPED;
+}
+
+/* Reset trapped signals to their original values, but don't free the
+ trap strings. Called by the command substitution code. */
+void
+reset_signal_handlers ()
+{
+ reset_or_restore_signal_handlers (reset_signal);
+}
+
+/* Reset all trapped signals to their original values. Signals set to be
+ ignored with trap '' SIGNAL should be ignored, so we make sure that they
+ are. Called by child processes after they are forked. */
+void
+restore_original_signals ()
+{
+ reset_or_restore_signal_handlers (restore_signal);
+}
+
+/* If a trap handler exists for signal SIG, then call it; otherwise just
+ return failure. */
+int
+maybe_call_trap_handler (sig)
+ int sig;
+{
+ /* Call the trap handler for SIG if the signal is trapped and not ignored. */
+ if ((sigmodes[sig] & SIG_TRAPPED) && ((sigmodes[sig] & SIG_IGNORED) == 0))
+ {
+ switch (sig)
+ {
+ case SIGINT:
+ run_interrupt_trap ();
+ break;
+ case EXIT_TRAP:
+ run_exit_trap ();
+ break;
+ case DEBUG_TRAP:
+ run_debug_trap ();
+ break;
+ case ERROR_TRAP:
+ run_error_trap ();
+ break;
+ default:
+ trap_handler (sig);
+ break;
+ }
+ return (1);
+ }
+ else
+ return (0);
+}
+
+int
+signal_is_trapped (sig)
+ int sig;
+{
+ return (sigmodes[sig] & SIG_TRAPPED);
+}
+
+int
+signal_is_special (sig)
+ int sig;
+{
+ return (sigmodes[sig] & SIG_SPECIAL);
+}
+
+int
+signal_is_ignored (sig)
+ int sig;
+{
+ return (sigmodes[sig] & SIG_IGNORED);
+}
+
+void
+set_signal_ignored (sig)
+ int sig;
+{
+ sigmodes[sig] |= SIG_HARD_IGNORE;
+ original_signals[sig] = SIG_IGN;
+}
+
+int
+signal_in_progress (sig)
+ int sig;
+{
+ return (sigmodes[sig] & SIG_INPROGRESS);
+}
diff --git a/trap.h b/trap.h
new file mode 100644
index 0000000..c34b7eb
--- /dev/null
+++ b/trap.h
@@ -0,0 +1,99 @@
+/* trap.h -- data structures used in the trap mechanism. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_TRAP_H_)
+#define _TRAP_H_
+
+#include "stdc.h"
+
+#if !defined (SIG_DFL)
+#include "bashtypes.h"
+#include <signal.h>
+#endif /* SIG_DFL */
+
+#if !defined (NSIG)
+#define NSIG 64
+#endif /* !NSIG */
+
+#define NO_SIG -1
+#define DEFAULT_SIG SIG_DFL
+#define IGNORE_SIG SIG_IGN
+
+/* Special shell trap names. */
+#define DEBUG_TRAP NSIG
+#define ERROR_TRAP NSIG+1
+#define RETURN_TRAP NSIG+2
+#define EXIT_TRAP 0
+
+/* system signals plus special bash traps */
+#define BASH_NSIG NSIG+3
+
+/* Flags values for decode_signal() */
+#define DSIG_SIGPREFIX 0x01 /* don't alllow `SIG' PREFIX */
+#define DSIG_NOCASE 0x02 /* case-insensitive comparison */
+
+#define signal_object_p(x,f) (decode_signal (x,f) != NO_SIG)
+
+#define TRAP_STRING(s) \
+ (signal_is_trapped (s) && signal_is_ignored (s) == 0) ? trap_list[s] \
+ : (char *)NULL
+
+extern char *trap_list[];
+
+/* Externally-visible functions declared in trap.c. */
+extern void initialize_traps __P((void));
+
+extern void run_pending_traps __P((void));
+
+extern void maybe_set_sigchld_trap __P((char *));
+extern void set_impossible_sigchld_trap __P((void));
+extern void set_sigchld_trap __P((char *));
+
+extern void set_debug_trap __P((char *));
+extern void set_error_trap __P((char *));
+extern void set_return_trap __P((char *));
+
+extern void set_sigint_trap __P((char *));
+extern void set_signal __P((int, char *));
+
+extern void restore_default_signal __P((int));
+extern void ignore_signal __P((int));
+extern int run_exit_trap __P((void));
+extern void run_trap_cleanup __P((int));
+extern int run_debug_trap __P((void));
+extern void run_error_trap __P((void));
+extern void run_return_trap __P((void));
+
+extern void free_trap_strings __P((void));
+extern void reset_signal_handlers __P((void));
+extern void restore_original_signals __P((void));
+
+extern char *signal_name __P((int));
+
+extern int decode_signal __P((char *, int));
+extern void run_interrupt_trap __P((void));
+extern int maybe_call_trap_handler __P((int));
+extern int signal_is_trapped __P((int));
+extern int signal_is_ignored __P((int));
+extern int signal_is_special __P((int));
+extern void set_signal_ignored __P((int));
+extern int signal_in_progress __P((int));
+
+#endif /* _TRAP_H_ */
diff --git a/unwind_prot.c b/unwind_prot.c
new file mode 100644
index 0000000..9e150a6
--- /dev/null
+++ b/unwind_prot.c
@@ -0,0 +1,326 @@
+/* unwind_prot.c - a simple unwind-protect system for internal variables */
+
+/* I can't stand it anymore! Please can't we just write the
+ whole Unix system in lisp or something? */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+/* **************************************************************** */
+/* */
+/* Unwind Protection Scheme for Bash */
+/* */
+/* **************************************************************** */
+#include "config.h"
+
+#include "bashtypes.h"
+#include "bashansi.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#if STDC_HEADERS
+# include <stddef.h>
+#endif
+
+#ifndef offsetof
+# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
+
+#include "command.h"
+#include "general.h"
+#include "unwind_prot.h"
+#include "quit.h"
+#include "sig.h"
+
+/* Structure describing a saved variable and the value to restore it to. */
+typedef struct {
+ char *variable;
+ int size;
+ char desired_setting[1]; /* actual size is `size' */
+} SAVED_VAR;
+
+/* If HEAD.CLEANUP is null, then ARG.V contains a tag to throw back to.
+ If HEAD.CLEANUP is restore_variable, then SV.V contains the saved
+ variable. Otherwise, call HEAD.CLEANUP (ARG.V) to clean up. */
+typedef union uwp {
+ struct uwp_head {
+ union uwp *next;
+ Function *cleanup;
+ } head;
+ struct {
+ struct uwp_head uwp_head;
+ char *v;
+ } arg;
+ struct {
+ struct uwp_head uwp_head;
+ SAVED_VAR v;
+ } sv;
+} UNWIND_ELT;
+
+
+static void without_interrupts __P((VFunction *, char *, char *));
+static void unwind_frame_discard_internal __P((char *, char *));
+static void unwind_frame_run_internal __P((char *, char *));
+static void add_unwind_protect_internal __P((Function *, char *));
+static void remove_unwind_protect_internal __P((char *, char *));
+static void run_unwind_protects_internal __P((char *, char *));
+static void clear_unwind_protects_internal __P((char *, char *));
+static inline void restore_variable __P((SAVED_VAR *));
+static void unwind_protect_mem_internal __P((char *, char *));
+
+static UNWIND_ELT *unwind_protect_list = (UNWIND_ELT *)NULL;
+
+#define uwpalloc(elt) (elt) = (UNWIND_ELT *)xmalloc (sizeof (UNWIND_ELT))
+#define uwpfree(elt) free(elt)
+
+/* Run a function without interrupts. This relies on the fact that the
+ FUNCTION cannot change the value of interrupt_immediately. (I.e., does
+ not call QUIT (). */
+static void
+without_interrupts (function, arg1, arg2)
+ VFunction *function;
+ char *arg1, *arg2;
+{
+ int old_interrupt_immediately;
+
+ old_interrupt_immediately = interrupt_immediately;
+ interrupt_immediately = 0;
+
+ (*function)(arg1, arg2);
+
+ interrupt_immediately = old_interrupt_immediately;
+}
+
+/* Start the beginning of a region. */
+void
+begin_unwind_frame (tag)
+ char *tag;
+{
+ add_unwind_protect ((Function *)NULL, tag);
+}
+
+/* Discard the unwind protects back to TAG. */
+void
+discard_unwind_frame (tag)
+ char *tag;
+{
+ if (unwind_protect_list)
+ without_interrupts (unwind_frame_discard_internal, tag, (char *)NULL);
+}
+
+/* Run the unwind protects back to TAG. */
+void
+run_unwind_frame (tag)
+ char *tag;
+{
+ if (unwind_protect_list)
+ without_interrupts (unwind_frame_run_internal, tag, (char *)NULL);
+}
+
+/* Add the function CLEANUP with ARG to the list of unwindable things. */
+void
+add_unwind_protect (cleanup, arg)
+ Function *cleanup;
+ char *arg;
+{
+ without_interrupts (add_unwind_protect_internal, (char *)cleanup, arg);
+}
+
+/* Remove the top unwind protect from the list. */
+void
+remove_unwind_protect ()
+{
+ if (unwind_protect_list)
+ without_interrupts
+ (remove_unwind_protect_internal, (char *)NULL, (char *)NULL);
+}
+
+/* Run the list of cleanup functions in unwind_protect_list. */
+void
+run_unwind_protects ()
+{
+ if (unwind_protect_list)
+ without_interrupts
+ (run_unwind_protects_internal, (char *)NULL, (char *)NULL);
+}
+
+/* Erase the unwind-protect list. If flags is 1, free the elements. */
+void
+clear_unwind_protect_list (flags)
+ int flags;
+{
+ char *flag;
+
+ if (unwind_protect_list)
+ {
+ flag = flags ? "" : (char *)NULL;
+ without_interrupts
+ (clear_unwind_protects_internal, flag, (char *)NULL);
+ }
+}
+
+int
+have_unwind_protects ()
+{
+ return (unwind_protect_list != 0);
+}
+
+/* **************************************************************** */
+/* */
+/* The Actual Functions */
+/* */
+/* **************************************************************** */
+
+static void
+add_unwind_protect_internal (cleanup, arg)
+ Function *cleanup;
+ char *arg;
+{
+ UNWIND_ELT *elt;
+
+ uwpalloc (elt);
+ elt->head.next = unwind_protect_list;
+ elt->head.cleanup = cleanup;
+ elt->arg.v = arg;
+ unwind_protect_list = elt;
+}
+
+static void
+remove_unwind_protect_internal (ignore1, ignore2)
+ char *ignore1, *ignore2;
+{
+ UNWIND_ELT *elt;
+
+ elt = unwind_protect_list;
+ if (elt)
+ {
+ unwind_protect_list = unwind_protect_list->head.next;
+ uwpfree (elt);
+ }
+}
+
+static void
+run_unwind_protects_internal (ignore1, ignore2)
+ char *ignore1, *ignore2;
+{
+ unwind_frame_run_internal ((char *) NULL, (char *) NULL);
+}
+
+static void
+clear_unwind_protects_internal (flag, ignore)
+ char *flag, *ignore;
+{
+ if (flag)
+ {
+ while (unwind_protect_list)
+ remove_unwind_protect_internal ((char *)NULL, (char *)NULL);
+ }
+ unwind_protect_list = (UNWIND_ELT *)NULL;
+}
+
+static void
+unwind_frame_discard_internal (tag, ignore)
+ char *tag, *ignore;
+{
+ UNWIND_ELT *elt;
+
+ while (elt = unwind_protect_list)
+ {
+ unwind_protect_list = unwind_protect_list->head.next;
+ if (elt->head.cleanup == 0 && (STREQ (elt->arg.v, tag)))
+ {
+ uwpfree (elt);
+ break;
+ }
+ else
+ uwpfree (elt);
+ }
+}
+
+/* Restore the value of a variable, based on the contents of SV.
+ sv->desired_setting is a block of memory SIZE bytes long holding the
+ value itself. This block of memory is copied back into the variable. */
+static inline void
+restore_variable (sv)
+ SAVED_VAR *sv;
+{
+ FASTCOPY (sv->desired_setting, sv->variable, sv->size);
+}
+
+static void
+unwind_frame_run_internal (tag, ignore)
+ char *tag, *ignore;
+{
+ UNWIND_ELT *elt;
+
+ while (elt = unwind_protect_list)
+ {
+ unwind_protect_list = elt->head.next;
+
+ /* If tag, then compare. */
+ if (!elt->head.cleanup)
+ {
+ if (tag && STREQ (elt->arg.v, tag))
+ {
+ uwpfree (elt);
+ break;
+ }
+ }
+ else
+ {
+ if (elt->head.cleanup == (Function *) restore_variable)
+ restore_variable (&elt->sv.v);
+ else
+ (*(elt->head.cleanup)) (elt->arg.v);
+ }
+
+ uwpfree (elt);
+ }
+}
+
+static void
+unwind_protect_mem_internal (var, psize)
+ char *var;
+ char *psize;
+{
+ int size, allocated;
+ UNWIND_ELT *elt;
+
+ size = *(int *) psize;
+ allocated = size + offsetof (UNWIND_ELT, sv.v.desired_setting[0]);
+ elt = (UNWIND_ELT *)xmalloc (allocated);
+ elt->head.next = unwind_protect_list;
+ elt->head.cleanup = (Function *) restore_variable;
+ elt->sv.v.variable = var;
+ elt->sv.v.size = size;
+ FASTCOPY (var, elt->sv.v.desired_setting, size);
+ unwind_protect_list = elt;
+}
+
+/* Save the value of a variable so it will be restored when unwind-protects
+ are run. VAR is a pointer to the variable. SIZE is the size in
+ bytes of VAR. */
+void
+unwind_protect_mem (var, size)
+ char *var;
+ int size;
+{
+ without_interrupts (unwind_protect_mem_internal, var, (char *) &size);
+}
diff --git a/unwind_prot.h b/unwind_prot.h
new file mode 100644
index 0000000..cc556f7
--- /dev/null
+++ b/unwind_prot.h
@@ -0,0 +1,49 @@
+/* unwind_prot.h - Macros and functions for hacking unwind protection. */
+
+/* Copyright (C) 1993-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_UNWIND_PROT_H)
+#define _UNWIND_PROT_H
+
+/* Run a function without interrupts. */
+extern void begin_unwind_frame __P((char *));
+extern void discard_unwind_frame __P((char *));
+extern void run_unwind_frame __P((char *));
+extern void add_unwind_protect (); /* Not portable to arbitrary C99 hosts. */
+extern void remove_unwind_protect __P((void));
+extern void run_unwind_protects __P((void));
+extern void clear_unwind_protect_list __P((int));
+extern int have_unwind_protects __P((void));
+extern void uwp_init __P((void));
+
+/* Define for people who like their code to look a certain way. */
+#define end_unwind_frame()
+
+/* How to protect a variable. */
+#define unwind_protect_var(X) unwind_protect_mem ((char *)&(X), sizeof (X))
+extern void unwind_protect_mem __P((char *, int));
+
+/* Backwards compatibility */
+#define unwind_protect_int unwind_protect_var
+#define unwind_protect_short unwind_protect_var
+#define unwind_protect_string unwind_protect_var
+#define unwind_protect_pointer unwind_protect_var
+#define unwind_protect_jmp_buf unwind_protect_var
+
+#endif /* _UNWIND_PROT_H */
diff --git a/variables.c b/variables.c
new file mode 100644
index 0000000..ebe4013
--- /dev/null
+++ b/variables.c
@@ -0,0 +1,4690 @@
+/* variables.c -- Functions for hacking shell variables. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "config.h"
+
+#include "bashtypes.h"
+#include "posixstat.h"
+#include "posixtime.h"
+
+#if defined (__QNX__)
+# if defined (__QNXNTO__)
+# include <sys/netmgr.h>
+# else
+# include <sys/vc.h>
+# endif /* !__QNXNTO__ */
+#endif /* __QNX__ */
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#include <stdio.h>
+#include "chartypes.h"
+#if defined (HAVE_PWD_H)
+# include <pwd.h>
+#endif
+#include "bashansi.h"
+#include "bashintl.h"
+
+#define NEED_XTRACE_SET_DECL
+
+#include "shell.h"
+#include "flags.h"
+#include "execute_cmd.h"
+#include "findcmd.h"
+#include "mailcheck.h"
+#include "input.h"
+#include "hashcmd.h"
+#include "pathexp.h"
+#include "alias.h"
+
+#include "builtins/getopt.h"
+#include "builtins/common.h"
+
+#if defined (READLINE)
+# include "bashline.h"
+# include <readline/readline.h>
+#else
+# include <tilde/tilde.h>
+#endif
+
+#if defined (HISTORY)
+# include "bashhist.h"
+# include <readline/history.h>
+#endif /* HISTORY */
+
+#if defined (PROGRAMMABLE_COMPLETION)
+# include "pcomplete.h"
+#endif
+
+#define TEMPENV_HASH_BUCKETS 4 /* must be power of two */
+
+#define ifsname(s) ((s)[0] == 'I' && (s)[1] == 'F' && (s)[2] == 'S' && (s)[3] == '\0')
+
+extern char **environ;
+
+/* Variables used here and defined in other files. */
+extern int posixly_correct;
+extern int line_number;
+extern int subshell_environment, indirection_level, subshell_level;
+extern int build_version, patch_level;
+extern int expanding_redir;
+extern char *dist_version, *release_status;
+extern char *shell_name;
+extern char *primary_prompt, *secondary_prompt;
+extern char *current_host_name;
+extern sh_builtin_func_t *this_shell_builtin;
+extern SHELL_VAR *this_shell_function;
+extern char *the_printed_command_except_trap;
+extern char *this_command_name;
+extern char *command_execution_string;
+extern time_t shell_start_time;
+extern int assigning_in_environment;
+extern int executing_builtin;
+
+#if defined (READLINE)
+extern int no_line_editing;
+extern int perform_hostname_completion;
+#endif
+
+/* The list of shell variables that the user has created at the global
+ scope, or that came from the environment. */
+VAR_CONTEXT *global_variables = (VAR_CONTEXT *)NULL;
+
+/* The current list of shell variables, including function scopes */
+VAR_CONTEXT *shell_variables = (VAR_CONTEXT *)NULL;
+
+/* The list of shell functions that the user has created, or that came from
+ the environment. */
+HASH_TABLE *shell_functions = (HASH_TABLE *)NULL;
+
+#if defined (DEBUGGER)
+/* The table of shell function definitions that the user defined or that
+ came from the environment. */
+HASH_TABLE *shell_function_defs = (HASH_TABLE *)NULL;
+#endif
+
+/* The current variable context. This is really a count of how deep into
+ executing functions we are. */
+int variable_context = 0;
+
+/* The set of shell assignments which are made only in the environment
+ for a single command. */
+HASH_TABLE *temporary_env = (HASH_TABLE *)NULL;
+
+/* Set to non-zero if an assignment error occurs while putting variables
+ into the temporary environment. */
+int tempenv_assign_error;
+
+/* Some funky variables which are known about specially. Here is where
+ "$*", "$1", and all the cruft is kept. */
+char *dollar_vars[10];
+WORD_LIST *rest_of_args = (WORD_LIST *)NULL;
+
+/* The value of $$. */
+pid_t dollar_dollar_pid;
+
+/* Non-zero means that we have to remake EXPORT_ENV. */
+int array_needs_making = 1;
+
+/* The number of times BASH has been executed. This is set
+ by initialize_variables (). */
+int shell_level = 0;
+
+/* An array which is passed to commands as their environment. It is
+ manufactured from the union of the initial environment and the
+ shell variables that are marked for export. */
+char **export_env = (char **)NULL;
+static int export_env_index;
+static int export_env_size;
+
+#if defined (READLINE)
+static int winsize_assignment; /* currently assigning to LINES or COLUMNS */
+static int winsize_assigned; /* assigned to LINES or COLUMNS */
+#endif
+
+/* Some forward declarations. */
+static void create_variable_tables __P((void));
+
+static void set_machine_vars __P((void));
+static void set_home_var __P((void));
+static void set_shell_var __P((void));
+static char *get_bash_name __P((void));
+static void initialize_shell_level __P((void));
+static void uidset __P((void));
+#if defined (ARRAY_VARS)
+static void make_vers_array __P((void));
+#endif
+
+static SHELL_VAR *null_assign __P((SHELL_VAR *, char *, arrayind_t, char *));
+#if defined (ARRAY_VARS)
+static SHELL_VAR *null_array_assign __P((SHELL_VAR *, char *, arrayind_t, char *));
+#endif
+static SHELL_VAR *get_self __P((SHELL_VAR *));
+
+#if defined (ARRAY_VARS)
+static SHELL_VAR *init_dynamic_array_var __P((char *, sh_var_value_func_t *, sh_var_assign_func_t *, int));
+static SHELL_VAR *init_dynamic_assoc_var __P((char *, sh_var_value_func_t *, sh_var_assign_func_t *, int));
+#endif
+
+static SHELL_VAR *assign_seconds __P((SHELL_VAR *, char *, arrayind_t, char *));
+static SHELL_VAR *get_seconds __P((SHELL_VAR *));
+static SHELL_VAR *init_seconds_var __P((void));
+
+static int brand __P((void));
+static void sbrand __P((unsigned long)); /* set bash random number generator. */
+static void seedrand __P((void)); /* seed generator randomly */
+static SHELL_VAR *assign_random __P((SHELL_VAR *, char *, arrayind_t, char *));
+static SHELL_VAR *get_random __P((SHELL_VAR *));
+
+static SHELL_VAR *assign_lineno __P((SHELL_VAR *, char *, arrayind_t, char *));
+static SHELL_VAR *get_lineno __P((SHELL_VAR *));
+
+static SHELL_VAR *assign_subshell __P((SHELL_VAR *, char *, arrayind_t, char *));
+static SHELL_VAR *get_subshell __P((SHELL_VAR *));
+
+static SHELL_VAR *get_bashpid __P((SHELL_VAR *));
+
+#if defined (HISTORY)
+static SHELL_VAR *get_histcmd __P((SHELL_VAR *));
+#endif
+
+#if defined (READLINE)
+static SHELL_VAR *get_comp_wordbreaks __P((SHELL_VAR *));
+static SHELL_VAR *assign_comp_wordbreaks __P((SHELL_VAR *, char *, arrayind_t, char *));
+#endif
+
+#if defined (PUSHD_AND_POPD) && defined (ARRAY_VARS)
+static SHELL_VAR *assign_dirstack __P((SHELL_VAR *, char *, arrayind_t, char *));
+static SHELL_VAR *get_dirstack __P((SHELL_VAR *));
+#endif
+
+#if defined (ARRAY_VARS)
+static SHELL_VAR *get_groupset __P((SHELL_VAR *));
+
+static SHELL_VAR *build_hashcmd __P((SHELL_VAR *));
+static SHELL_VAR *get_hashcmd __P((SHELL_VAR *));
+static SHELL_VAR *assign_hashcmd __P((SHELL_VAR *, char *, arrayind_t, char *));
+# if defined (ALIAS)
+static SHELL_VAR *build_aliasvar __P((SHELL_VAR *));
+static SHELL_VAR *get_aliasvar __P((SHELL_VAR *));
+static SHELL_VAR *assign_aliasvar __P((SHELL_VAR *, char *, arrayind_t, char *));
+# endif
+#endif
+
+static SHELL_VAR *get_funcname __P((SHELL_VAR *));
+static SHELL_VAR *init_funcname_var __P((void));
+
+static void initialize_dynamic_variables __P((void));
+
+static SHELL_VAR *hash_lookup __P((const char *, HASH_TABLE *));
+static SHELL_VAR *new_shell_variable __P((const char *));
+static SHELL_VAR *make_new_variable __P((const char *, HASH_TABLE *));
+static SHELL_VAR *bind_variable_internal __P((const char *, char *, HASH_TABLE *, int, int));
+
+static void dispose_variable_value __P((SHELL_VAR *));
+static void free_variable_hash_data __P((PTR_T));
+
+static VARLIST *vlist_alloc __P((int));
+static VARLIST *vlist_realloc __P((VARLIST *, int));
+static void vlist_add __P((VARLIST *, SHELL_VAR *, int));
+
+static void flatten __P((HASH_TABLE *, sh_var_map_func_t *, VARLIST *, int));
+
+static int qsort_var_comp __P((SHELL_VAR **, SHELL_VAR **));
+
+static SHELL_VAR **vapply __P((sh_var_map_func_t *));
+static SHELL_VAR **fapply __P((sh_var_map_func_t *));
+
+static int visible_var __P((SHELL_VAR *));
+static int visible_and_exported __P((SHELL_VAR *));
+static int export_environment_candidate __P((SHELL_VAR *));
+static int local_and_exported __P((SHELL_VAR *));
+static int variable_in_context __P((SHELL_VAR *));
+#if defined (ARRAY_VARS)
+static int visible_array_vars __P((SHELL_VAR *));
+#endif
+
+static SHELL_VAR *bind_tempenv_variable __P((const char *, char *));
+static void push_temp_var __P((PTR_T));
+static void propagate_temp_var __P((PTR_T));
+static void dispose_temporary_env __P((sh_free_func_t *));
+
+static inline char *mk_env_string __P((const char *, const char *));
+static char **make_env_array_from_var_list __P((SHELL_VAR **));
+static char **make_var_export_array __P((VAR_CONTEXT *));
+static char **make_func_export_array __P((void));
+static void add_temp_array_to_env __P((char **, int, int));
+
+static int n_shell_variables __P((void));
+static int set_context __P((SHELL_VAR *));
+
+static void push_func_var __P((PTR_T));
+static void push_exported_var __P((PTR_T));
+
+static inline int find_special_var __P((const char *));
+
+static void
+create_variable_tables ()
+{
+ if (shell_variables == 0)
+ {
+ shell_variables = global_variables = new_var_context ((char *)NULL, 0);
+ shell_variables->scope = 0;
+ shell_variables->table = hash_create (0);
+ }
+
+ if (shell_functions == 0)
+ shell_functions = hash_create (0);
+
+#if defined (DEBUGGER)
+ if (shell_function_defs == 0)
+ shell_function_defs = hash_create (0);
+#endif
+}
+
+/* Initialize the shell variables from the current environment.
+ If PRIVMODE is nonzero, don't import functions from ENV or
+ parse $SHELLOPTS. */
+void
+initialize_shell_variables (env, privmode)
+ char **env;
+ int privmode;
+{
+ char *name, *string, *temp_string;
+ int c, char_index, string_index, string_length;
+ SHELL_VAR *temp_var;
+
+ create_variable_tables ();
+
+ for (string_index = 0; string = env[string_index++]; )
+ {
+ char_index = 0;
+ name = string;
+ while ((c = *string++) && c != '=')
+ ;
+ if (string[-1] == '=')
+ char_index = string - name - 1;
+
+ /* If there are weird things in the environment, like `=xxx' or a
+ string without an `=', just skip them. */
+ if (char_index == 0)
+ continue;
+
+ /* ASSERT(name[char_index] == '=') */
+ name[char_index] = '\0';
+ /* Now, name = env variable name, string = env variable value, and
+ char_index == strlen (name) */
+
+ temp_var = (SHELL_VAR *)NULL;
+
+ /* If exported function, define it now. Don't import functions from
+ the environment in privileged mode. */
+ if (privmode == 0 && read_but_dont_execute == 0 && STREQN ("() {", string, 4))
+ {
+ string_length = strlen (string);
+ temp_string = (char *)xmalloc (3 + string_length + char_index);
+
+ strcpy (temp_string, name);
+ temp_string[char_index] = ' ';
+ strcpy (temp_string + char_index + 1, string);
+
+ parse_and_execute (temp_string, name, SEVAL_NONINT|SEVAL_NOHIST);
+
+ /* Ancient backwards compatibility. Old versions of bash exported
+ functions like name()=() {...} */
+ if (name[char_index - 1] == ')' && name[char_index - 2] == '(')
+ name[char_index - 2] = '\0';
+
+ if (temp_var = find_function (name))
+ {
+ VSETATTR (temp_var, (att_exported|att_imported));
+ array_needs_making = 1;
+ }
+ else
+ report_error (_("error importing function definition for `%s'"), name);
+
+ /* ( */
+ if (name[char_index - 1] == ')' && name[char_index - 2] == '\0')
+ name[char_index - 2] = '('; /* ) */
+ }
+#if defined (ARRAY_VARS)
+# if 0
+ /* Array variables may not yet be exported. */
+ else if (*string == '(' && string[1] == '[' && string[strlen (string) - 1] == ')')
+ {
+ string_length = 1;
+ temp_string = extract_array_assignment_list (string, &string_length);
+ temp_var = assign_array_from_string (name, temp_string);
+ FREE (temp_string);
+ VSETATTR (temp_var, (att_exported | att_imported));
+ array_needs_making = 1;
+ }
+# endif
+#endif
+#if 0
+ else if (legal_identifier (name))
+#else
+ else
+#endif
+ {
+ temp_var = bind_variable (name, string, 0);
+ if (legal_identifier (name))
+ VSETATTR (temp_var, (att_exported | att_imported));
+ else
+ VSETATTR (temp_var, (att_exported | att_imported | att_invisible));
+ array_needs_making = 1;
+ }
+
+ name[char_index] = '=';
+ /* temp_var can be NULL if it was an exported function with a syntax
+ error (a different bug, but it still shouldn't dump core). */
+ if (temp_var && function_p (temp_var) == 0) /* XXX not yet */
+ {
+ CACHE_IMPORTSTR (temp_var, name);
+ }
+ }
+
+ set_pwd ();
+
+ /* Set up initial value of $_ */
+ temp_var = set_if_not ("_", dollar_vars[0]);
+
+ /* Remember this pid. */
+ dollar_dollar_pid = getpid ();
+
+ /* Now make our own defaults in case the vars that we think are
+ important are missing. */
+ temp_var = set_if_not ("PATH", DEFAULT_PATH_VALUE);
+#if 0
+ set_auto_export (temp_var); /* XXX */
+#endif
+
+ temp_var = set_if_not ("TERM", "dumb");
+#if 0
+ set_auto_export (temp_var); /* XXX */
+#endif
+
+#if defined (__QNX__)
+ /* set node id -- don't import it from the environment */
+ {
+ char node_name[22];
+# if defined (__QNXNTO__)
+ netmgr_ndtostr(ND2S_LOCAL_STR, ND_LOCAL_NODE, node_name, sizeof(node_name));
+# else
+ qnx_nidtostr (getnid (), node_name, sizeof (node_name));
+# endif
+ temp_var = bind_variable ("NODE", node_name, 0);
+ set_auto_export (temp_var);
+ }
+#endif
+
+ /* set up the prompts. */
+ if (interactive_shell)
+ {
+#if defined (PROMPT_STRING_DECODE)
+ set_if_not ("PS1", primary_prompt);
+#else
+ if (current_user.uid == -1)
+ get_current_user_info ();
+ set_if_not ("PS1", current_user.euid == 0 ? "# " : primary_prompt);
+#endif
+ set_if_not ("PS2", secondary_prompt);
+ }
+ set_if_not ("PS4", "+ ");
+
+ /* Don't allow IFS to be imported from the environment. */
+ temp_var = bind_variable ("IFS", " \t\n", 0);
+ setifs (temp_var);
+
+ /* Magic machine types. Pretty convenient. */
+ set_machine_vars ();
+
+ /* Default MAILCHECK for interactive shells. Defer the creation of a
+ default MAILPATH until the startup files are read, because MAIL
+ names a mail file if MAILPATH is not set, and we should provide a
+ default only if neither is set. */
+ if (interactive_shell)
+ {
+ temp_var = set_if_not ("MAILCHECK", posixly_correct ? "600" : "60");
+ VSETATTR (temp_var, att_integer);
+ }
+
+ /* Do some things with shell level. */
+ initialize_shell_level ();
+
+ set_ppid ();
+
+ /* Initialize the `getopts' stuff. */
+ temp_var = bind_variable ("OPTIND", "1", 0);
+ VSETATTR (temp_var, att_integer);
+ getopts_reset (0);
+ bind_variable ("OPTERR", "1", 0);
+ sh_opterr = 1;
+
+ if (login_shell == 1 && posixly_correct == 0)
+ set_home_var ();
+
+ /* Get the full pathname to THIS shell, and set the BASH variable
+ to it. */
+ name = get_bash_name ();
+ temp_var = bind_variable ("BASH", name, 0);
+ free (name);
+
+ /* Make the exported environment variable SHELL be the user's login
+ shell. Note that the `tset' command looks at this variable
+ to determine what style of commands to output; if it ends in "csh",
+ then C-shell commands are output, else Bourne shell commands. */
+ set_shell_var ();
+
+ /* Make a variable called BASH_VERSION which contains the version info. */
+ bind_variable ("BASH_VERSION", shell_version_string (), 0);
+#if defined (ARRAY_VARS)
+ make_vers_array ();
+#endif
+
+ if (command_execution_string)
+ bind_variable ("BASH_EXECUTION_STRING", command_execution_string, 0);
+
+ /* Find out if we're supposed to be in Posix.2 mode via an
+ environment variable. */
+ temp_var = find_variable ("POSIXLY_CORRECT");
+ if (!temp_var)
+ temp_var = find_variable ("POSIX_PEDANTIC");
+ if (temp_var && imported_p (temp_var))
+ sv_strict_posix (temp_var->name);
+
+#if defined (HISTORY)
+ /* Set history variables to defaults, and then do whatever we would
+ do if the variable had just been set. Do this only in the case
+ that we are remembering commands on the history list. */
+ if (remember_on_history)
+ {
+ name = bash_tilde_expand (posixly_correct ? "~/.sh_history" : "~/.bash_history", 0);
+
+ set_if_not ("HISTFILE", name);
+ free (name);
+
+#if 0
+ set_if_not ("HISTSIZE", "500");
+ sv_histsize ("HISTSIZE");
+#endif
+ }
+#endif /* HISTORY */
+
+ /* Seed the random number generator. */
+ seedrand ();
+
+ /* Handle some "special" variables that we may have inherited from a
+ parent shell. */
+ if (interactive_shell)
+ {
+ temp_var = find_variable ("IGNOREEOF");
+ if (!temp_var)
+ temp_var = find_variable ("ignoreeof");
+ if (temp_var && imported_p (temp_var))
+ sv_ignoreeof (temp_var->name);
+ }
+
+#if defined (HISTORY)
+ if (interactive_shell && remember_on_history)
+ {
+ sv_history_control ("HISTCONTROL");
+ sv_histignore ("HISTIGNORE");
+ sv_histtimefmt ("HISTTIMEFORMAT");
+ }
+#endif /* HISTORY */
+
+#if defined (READLINE) && defined (STRICT_POSIX)
+ /* POSIXLY_CORRECT will only be 1 here if the shell was compiled
+ -DSTRICT_POSIX */
+ if (interactive_shell && posixly_correct && no_line_editing == 0)
+ rl_prefer_env_winsize = 1;
+#endif /* READLINE && STRICT_POSIX */
+
+ /*
+ * 24 October 2001
+ *
+ * I'm tired of the arguing and bug reports. Bash now leaves SSH_CLIENT
+ * and SSH2_CLIENT alone. I'm going to rely on the shell_level check in
+ * isnetconn() to avoid running the startup files more often than wanted.
+ * That will, of course, only work if the user's login shell is bash, so
+ * I've made that behavior conditional on SSH_SOURCE_BASHRC being defined
+ * in config-top.h.
+ */
+#if 0
+ temp_var = find_variable ("SSH_CLIENT");
+ if (temp_var && imported_p (temp_var))
+ {
+ VUNSETATTR (temp_var, att_exported);
+ array_needs_making = 1;
+ }
+ temp_var = find_variable ("SSH2_CLIENT");
+ if (temp_var && imported_p (temp_var))
+ {
+ VUNSETATTR (temp_var, att_exported);
+ array_needs_making = 1;
+ }
+#endif
+
+ /* Get the user's real and effective user ids. */
+ uidset ();
+
+ /* Initialize the dynamic variables, and seed their values. */
+ initialize_dynamic_variables ();
+}
+
+/* **************************************************************** */
+/* */
+/* Setting values for special shell variables */
+/* */
+/* **************************************************************** */
+
+static void
+set_machine_vars ()
+{
+ SHELL_VAR *temp_var;
+
+ temp_var = set_if_not ("HOSTTYPE", HOSTTYPE);
+ temp_var = set_if_not ("OSTYPE", OSTYPE);
+ temp_var = set_if_not ("MACHTYPE", MACHTYPE);
+
+ temp_var = set_if_not ("HOSTNAME", current_host_name);
+}
+
+/* Set $HOME to the information in the password file if we didn't get
+ it from the environment. */
+
+/* This function is not static so the tilde and readline libraries can
+ use it. */
+char *
+sh_get_home_dir ()
+{
+ if (current_user.home_dir == 0)
+ get_current_user_info ();
+ return current_user.home_dir;
+}
+
+static void
+set_home_var ()
+{
+ SHELL_VAR *temp_var;
+
+ temp_var = find_variable ("HOME");
+ if (temp_var == 0)
+ temp_var = bind_variable ("HOME", sh_get_home_dir (), 0);
+#if 0
+ VSETATTR (temp_var, att_exported);
+#endif
+}
+
+/* Set $SHELL to the user's login shell if it is not already set. Call
+ get_current_user_info if we haven't already fetched the shell. */
+static void
+set_shell_var ()
+{
+ SHELL_VAR *temp_var;
+
+ temp_var = find_variable ("SHELL");
+ if (temp_var == 0)
+ {
+ if (current_user.shell == 0)
+ get_current_user_info ();
+ temp_var = bind_variable ("SHELL", current_user.shell, 0);
+ }
+#if 0
+ VSETATTR (temp_var, att_exported);
+#endif
+}
+
+static char *
+get_bash_name ()
+{
+ char *name;
+
+ if ((login_shell == 1) && RELPATH(shell_name))
+ {
+ if (current_user.shell == 0)
+ get_current_user_info ();
+ name = savestring (current_user.shell);
+ }
+ else if (ABSPATH(shell_name))
+ name = savestring (shell_name);
+ else if (shell_name[0] == '.' && shell_name[1] == '/')
+ {
+ /* Fast path for common case. */
+ char *cdir;
+ int len;
+
+ cdir = get_string_value ("PWD");
+ if (cdir)
+ {
+ len = strlen (cdir);
+ name = (char *)xmalloc (len + strlen (shell_name) + 1);
+ strcpy (name, cdir);
+ strcpy (name + len, shell_name + 1);
+ }
+ else
+ name = savestring (shell_name);
+ }
+ else
+ {
+ char *tname;
+ int s;
+
+ tname = find_user_command (shell_name);
+
+ if (tname == 0)
+ {
+ /* Try the current directory. If there is not an executable
+ there, just punt and use the login shell. */
+ s = file_status (shell_name);
+ if (s & FS_EXECABLE)
+ {
+ tname = make_absolute (shell_name, get_string_value ("PWD"));
+ if (*shell_name == '.')
+ {
+ name = sh_canonpath (tname, PATH_CHECKDOTDOT|PATH_CHECKEXISTS);
+ if (name == 0)
+ name = tname;
+ else
+ free (tname);
+ }
+ else
+ name = tname;
+ }
+ else
+ {
+ if (current_user.shell == 0)
+ get_current_user_info ();
+ name = savestring (current_user.shell);
+ }
+ }
+ else
+ {
+ name = full_pathname (tname);
+ free (tname);
+ }
+ }
+
+ return (name);
+}
+
+void
+adjust_shell_level (change)
+ int change;
+{
+ char new_level[5], *old_SHLVL;
+ intmax_t old_level;
+ SHELL_VAR *temp_var;
+
+ old_SHLVL = get_string_value ("SHLVL");
+ if (old_SHLVL == 0 || *old_SHLVL == '\0' || legal_number (old_SHLVL, &old_level) == 0)
+ old_level = 0;
+
+ shell_level = old_level + change;
+ if (shell_level < 0)
+ shell_level = 0;
+ else if (shell_level > 1000)
+ {
+ internal_warning (_("shell level (%d) too high, resetting to 1"), shell_level);
+ shell_level = 1;
+ }
+
+ /* We don't need the full generality of itos here. */
+ if (shell_level < 10)
+ {
+ new_level[0] = shell_level + '0';
+ new_level[1] = '\0';
+ }
+ else if (shell_level < 100)
+ {
+ new_level[0] = (shell_level / 10) + '0';
+ new_level[1] = (shell_level % 10) + '0';
+ new_level[2] = '\0';
+ }
+ else if (shell_level < 1000)
+ {
+ new_level[0] = (shell_level / 100) + '0';
+ old_level = shell_level % 100;
+ new_level[1] = (old_level / 10) + '0';
+ new_level[2] = (old_level % 10) + '0';
+ new_level[3] = '\0';
+ }
+
+ temp_var = bind_variable ("SHLVL", new_level, 0);
+ set_auto_export (temp_var);
+}
+
+static void
+initialize_shell_level ()
+{
+ adjust_shell_level (1);
+}
+
+/* If we got PWD from the environment, update our idea of the current
+ working directory. In any case, make sure that PWD exists before
+ checking it. It is possible for getcwd () to fail on shell startup,
+ and in that case, PWD would be undefined. If this is an interactive
+ login shell, see if $HOME is the current working directory, and if
+ that's not the same string as $PWD, set PWD=$HOME. */
+
+void
+set_pwd ()
+{
+ SHELL_VAR *temp_var, *home_var;
+ char *temp_string, *home_string;
+
+ home_var = find_variable ("HOME");
+ home_string = home_var ? value_cell (home_var) : (char *)NULL;
+
+ temp_var = find_variable ("PWD");
+ if (temp_var && imported_p (temp_var) &&
+ (temp_string = value_cell (temp_var)) &&
+ same_file (temp_string, ".", (struct stat *)NULL, (struct stat *)NULL))
+ set_working_directory (temp_string);
+ else if (home_string && interactive_shell && login_shell &&
+ same_file (home_string, ".", (struct stat *)NULL, (struct stat *)NULL))
+ {
+ set_working_directory (home_string);
+ temp_var = bind_variable ("PWD", home_string, 0);
+ set_auto_export (temp_var);
+ }
+ else
+ {
+ temp_string = get_working_directory ("shell-init");
+ if (temp_string)
+ {
+ temp_var = bind_variable ("PWD", temp_string, 0);
+ set_auto_export (temp_var);
+ free (temp_string);
+ }
+ }
+
+ /* According to the Single Unix Specification, v2, $OLDPWD is an
+ `environment variable' and therefore should be auto-exported.
+ Make a dummy invisible variable for OLDPWD, and mark it as exported. */
+ temp_var = bind_variable ("OLDPWD", (char *)NULL, 0);
+ VSETATTR (temp_var, (att_exported | att_invisible));
+}
+
+/* Make a variable $PPID, which holds the pid of the shell's parent. */
+void
+set_ppid ()
+{
+ char namebuf[INT_STRLEN_BOUND(pid_t) + 1], *name;
+ SHELL_VAR *temp_var;
+
+ name = inttostr (getppid (), namebuf, sizeof(namebuf));
+ temp_var = find_variable ("PPID");
+ if (temp_var)
+ VUNSETATTR (temp_var, (att_readonly | att_exported));
+ temp_var = bind_variable ("PPID", name, 0);
+ VSETATTR (temp_var, (att_readonly | att_integer));
+}
+
+static void
+uidset ()
+{
+ char buff[INT_STRLEN_BOUND(uid_t) + 1], *b;
+ register SHELL_VAR *v;
+
+ b = inttostr (current_user.uid, buff, sizeof (buff));
+ v = find_variable ("UID");
+ if (v == 0)
+ {
+ v = bind_variable ("UID", b, 0);
+ VSETATTR (v, (att_readonly | att_integer));
+ }
+
+ if (current_user.euid != current_user.uid)
+ b = inttostr (current_user.euid, buff, sizeof (buff));
+
+ v = find_variable ("EUID");
+ if (v == 0)
+ {
+ v = bind_variable ("EUID", b, 0);
+ VSETATTR (v, (att_readonly | att_integer));
+ }
+}
+
+#if defined (ARRAY_VARS)
+static void
+make_vers_array ()
+{
+ SHELL_VAR *vv;
+ ARRAY *av;
+ char *s, d[32], b[INT_STRLEN_BOUND(int) + 1];
+
+ unbind_variable ("BASH_VERSINFO");
+
+ vv = make_new_array_variable ("BASH_VERSINFO");
+ av = array_cell (vv);
+ strcpy (d, dist_version);
+ s = strchr (d, '.');
+ if (s)
+ *s++ = '\0';
+ array_insert (av, 0, d);
+ array_insert (av, 1, s);
+ s = inttostr (patch_level, b, sizeof (b));
+ array_insert (av, 2, s);
+ s = inttostr (build_version, b, sizeof (b));
+ array_insert (av, 3, s);
+ array_insert (av, 4, release_status);
+ array_insert (av, 5, MACHTYPE);
+
+ VSETATTR (vv, att_readonly);
+}
+#endif /* ARRAY_VARS */
+
+/* Set the environment variables $LINES and $COLUMNS in response to
+ a window size change. */
+void
+sh_set_lines_and_columns (lines, cols)
+ int lines, cols;
+{
+ char val[INT_STRLEN_BOUND(int) + 1], *v;
+
+#if defined (READLINE)
+ /* If we are currently assigning to LINES or COLUMNS, don't do anything. */
+ if (winsize_assignment)
+ return;
+#endif
+
+ v = inttostr (lines, val, sizeof (val));
+ bind_variable ("LINES", v, 0);
+
+ v = inttostr (cols, val, sizeof (val));
+ bind_variable ("COLUMNS", v, 0);
+}
+
+/* **************************************************************** */
+/* */
+/* Printing variables and values */
+/* */
+/* **************************************************************** */
+
+/* Print LIST (a list of shell variables) to stdout in such a way that
+ they can be read back in. */
+void
+print_var_list (list)
+ register SHELL_VAR **list;
+{
+ register int i;
+ register SHELL_VAR *var;
+
+ for (i = 0; list && (var = list[i]); i++)
+ if (invisible_p (var) == 0)
+ print_assignment (var);
+}
+
+/* Print LIST (a list of shell functions) to stdout in such a way that
+ they can be read back in. */
+void
+print_func_list (list)
+ register SHELL_VAR **list;
+{
+ register int i;
+ register SHELL_VAR *var;
+
+ for (i = 0; list && (var = list[i]); i++)
+ {
+ printf ("%s ", var->name);
+ print_var_function (var);
+ printf ("\n");
+ }
+}
+
+/* Print the value of a single SHELL_VAR. No newline is
+ output, but the variable is printed in such a way that
+ it can be read back in. */
+void
+print_assignment (var)
+ SHELL_VAR *var;
+{
+ if (var_isset (var) == 0)
+ return;
+
+ if (function_p (var))
+ {
+ printf ("%s", var->name);
+ print_var_function (var);
+ printf ("\n");
+ }
+#if defined (ARRAY_VARS)
+ else if (array_p (var))
+ print_array_assignment (var, 0);
+ else if (assoc_p (var))
+ print_assoc_assignment (var, 0);
+#endif /* ARRAY_VARS */
+ else
+ {
+ printf ("%s=", var->name);
+ print_var_value (var, 1);
+ printf ("\n");
+ }
+}
+
+/* Print the value cell of VAR, a shell variable. Do not print
+ the name, nor leading/trailing newline. If QUOTE is non-zero,
+ and the value contains shell metacharacters, quote the value
+ in such a way that it can be read back in. */
+void
+print_var_value (var, quote)
+ SHELL_VAR *var;
+ int quote;
+{
+ char *t;
+
+ if (var_isset (var) == 0)
+ return;
+
+ if (quote && posixly_correct == 0 && ansic_shouldquote (value_cell (var)))
+ {
+ t = ansic_quote (value_cell (var), 0, (int *)0);
+ printf ("%s", t);
+ free (t);
+ }
+ else if (quote && sh_contains_shell_metas (value_cell (var)))
+ {
+ t = sh_single_quote (value_cell (var));
+ printf ("%s", t);
+ free (t);
+ }
+ else
+ printf ("%s", value_cell (var));
+}
+
+/* Print the function cell of VAR, a shell variable. Do not
+ print the name, nor leading/trailing newline. */
+void
+print_var_function (var)
+ SHELL_VAR *var;
+{
+ char *x;
+
+ if (function_p (var) && var_isset (var))
+ {
+ x = named_function_string ((char *)NULL, function_cell(var), FUNC_MULTILINE|FUNC_EXTERNAL);
+ printf ("%s", x);
+ }
+}
+
+/* **************************************************************** */
+/* */
+/* Dynamic Variables */
+/* */
+/* **************************************************************** */
+
+/* DYNAMIC VARIABLES
+
+ These are variables whose values are generated anew each time they are
+ referenced. These are implemented using a pair of function pointers
+ in the struct variable: assign_func, which is called from bind_variable
+ and, if arrays are compiled into the shell, some of the functions in
+ arrayfunc.c, and dynamic_value, which is called from find_variable.
+
+ assign_func is called from bind_variable_internal, if
+ bind_variable_internal discovers that the variable being assigned to
+ has such a function. The function is called as
+ SHELL_VAR *temp = (*(entry->assign_func)) (entry, value, ind)
+ and the (SHELL_VAR *)temp is returned as the value of bind_variable. It
+ is usually ENTRY (self). IND is an index for an array variable, and
+ unused otherwise.
+
+ dynamic_value is called from find_variable_internal to return a `new'
+ value for the specified dynamic varible. If this function is NULL,
+ the variable is treated as a `normal' shell variable. If it is not,
+ however, then this function is called like this:
+ tempvar = (*(var->dynamic_value)) (var);
+
+ Sometimes `tempvar' will replace the value of `var'. Other times, the
+ shell will simply use the string value. Pretty object-oriented, huh?
+
+ Be warned, though: if you `unset' a special variable, it loses its
+ special meaning, even if you subsequently set it.
+
+ The special assignment code would probably have been better put in
+ subst.c: do_assignment_internal, in the same style as
+ stupidly_hack_special_variables, but I wanted the changes as
+ localized as possible. */
+
+#define INIT_DYNAMIC_VAR(var, val, gfunc, afunc) \
+ do \
+ { \
+ v = bind_variable (var, (val), 0); \
+ v->dynamic_value = gfunc; \
+ v->assign_func = afunc; \
+ } \
+ while (0)
+
+#define INIT_DYNAMIC_ARRAY_VAR(var, gfunc, afunc) \
+ do \
+ { \
+ v = make_new_array_variable (var); \
+ v->dynamic_value = gfunc; \
+ v->assign_func = afunc; \
+ } \
+ while (0)
+
+#define INIT_DYNAMIC_ASSOC_VAR(var, gfunc, afunc) \
+ do \
+ { \
+ v = make_new_assoc_variable (var); \
+ v->dynamic_value = gfunc; \
+ v->assign_func = afunc; \
+ } \
+ while (0)
+
+static SHELL_VAR *
+null_assign (self, value, unused, key)
+ SHELL_VAR *self;
+ char *value;
+ arrayind_t unused;
+ char *key;
+{
+ return (self);
+}
+
+#if defined (ARRAY_VARS)
+static SHELL_VAR *
+null_array_assign (self, value, ind, key)
+ SHELL_VAR *self;
+ char *value;
+ arrayind_t ind;
+ char *key;
+{
+ return (self);
+}
+#endif
+
+/* Degenerate `dynamic_value' function; just returns what's passed without
+ manipulation. */
+static SHELL_VAR *
+get_self (self)
+ SHELL_VAR *self;
+{
+ return (self);
+}
+
+#if defined (ARRAY_VARS)
+/* A generic dynamic array variable initializer. Intialize array variable
+ NAME with dynamic value function GETFUNC and assignment function SETFUNC. */
+static SHELL_VAR *
+init_dynamic_array_var (name, getfunc, setfunc, attrs)
+ char *name;
+ sh_var_value_func_t *getfunc;
+ sh_var_assign_func_t *setfunc;
+ int attrs;
+{
+ SHELL_VAR *v;
+
+ v = find_variable (name);
+ if (v)
+ return (v);
+ INIT_DYNAMIC_ARRAY_VAR (name, getfunc, setfunc);
+ if (attrs)
+ VSETATTR (v, attrs);
+ return v;
+}
+
+static SHELL_VAR *
+init_dynamic_assoc_var (name, getfunc, setfunc, attrs)
+ char *name;
+ sh_var_value_func_t *getfunc;
+ sh_var_assign_func_t *setfunc;
+ int attrs;
+{
+ SHELL_VAR *v;
+
+ v = find_variable (name);
+ if (v)
+ return (v);
+ INIT_DYNAMIC_ASSOC_VAR (name, getfunc, setfunc);
+ if (attrs)
+ VSETATTR (v, attrs);
+ return v;
+}
+#endif
+
+/* The value of $SECONDS. This is the number of seconds since shell
+ invocation, or, the number of seconds since the last assignment + the
+ value of the last assignment. */
+static intmax_t seconds_value_assigned;
+
+static SHELL_VAR *
+assign_seconds (self, value, unused, key)
+ SHELL_VAR *self;
+ char *value;
+ arrayind_t unused;
+ char *key;
+{
+ if (legal_number (value, &seconds_value_assigned) == 0)
+ seconds_value_assigned = 0;
+ shell_start_time = NOW;
+ return (self);
+}
+
+static SHELL_VAR *
+get_seconds (var)
+ SHELL_VAR *var;
+{
+ time_t time_since_start;
+ char *p;
+
+ time_since_start = NOW - shell_start_time;
+ p = itos(seconds_value_assigned + time_since_start);
+
+ FREE (value_cell (var));
+
+ VSETATTR (var, att_integer);
+ var_setvalue (var, p);
+ return (var);
+}
+
+static SHELL_VAR *
+init_seconds_var ()
+{
+ SHELL_VAR *v;
+
+ v = find_variable ("SECONDS");
+ if (v)
+ {
+ if (legal_number (value_cell(v), &seconds_value_assigned) == 0)
+ seconds_value_assigned = 0;
+ }
+ INIT_DYNAMIC_VAR ("SECONDS", (v ? value_cell (v) : (char *)NULL), get_seconds, assign_seconds);
+ return v;
+}
+
+/* The random number seed. You can change this by setting RANDOM. */
+static unsigned long rseed = 1;
+static int last_random_value;
+static int seeded_subshell = 0;
+
+/* A linear congruential random number generator based on the example
+ one in the ANSI C standard. This one isn't very good, but a more
+ complicated one is overkill. */
+
+/* Returns a pseudo-random number between 0 and 32767. */
+static int
+brand ()
+{
+#if 0
+ rseed = rseed * 1103515245 + 12345;
+ return ((unsigned int)((rseed >> 16) & 32767)); /* was % 32768 */
+#else
+ /* From "Random number generators: good ones are hard to find",
+ Park and Miller, Communications of the ACM, vol. 31, no. 10,
+ October 1988, p. 1195. filtered through FreeBSD */
+ long h, l;
+
+ if (rseed == 0)
+ seedrand ();
+ h = rseed / 127773;
+ l = rseed % 127773;
+ rseed = 16807 * l - 2836 * h;
+#if 0
+ if (rseed < 0)
+ rseed += 0x7fffffff;
+#endif
+ return ((unsigned int)(rseed & 32767)); /* was % 32768 */
+#endif
+}
+
+/* Set the random number generator seed to SEED. */
+static void
+sbrand (seed)
+ unsigned long seed;
+{
+ rseed = seed;
+ last_random_value = 0;
+}
+
+static void
+seedrand ()
+{
+ struct timeval tv;
+
+ gettimeofday (&tv, NULL);
+ sbrand (tv.tv_sec ^ tv.tv_usec ^ getpid ());
+}
+
+static SHELL_VAR *
+assign_random (self, value, unused, key)
+ SHELL_VAR *self;
+ char *value;
+ arrayind_t unused;
+ char *key;
+{
+ sbrand (strtoul (value, (char **)NULL, 10));
+ if (subshell_environment)
+ seeded_subshell = getpid ();
+ return (self);
+}
+
+int
+get_random_number ()
+{
+ int rv, pid;
+
+ /* Reset for command and process substitution. */
+ pid = getpid ();
+ if (subshell_environment && seeded_subshell != pid)
+ {
+ seedrand ();
+ seeded_subshell = pid;
+ }
+
+ do
+ rv = brand ();
+ while (rv == last_random_value);
+ return rv;
+}
+
+static SHELL_VAR *
+get_random (var)
+ SHELL_VAR *var;
+{
+ int rv;
+ char *p;
+
+ rv = get_random_number ();
+ last_random_value = rv;
+ p = itos (rv);
+
+ FREE (value_cell (var));
+
+ VSETATTR (var, att_integer);
+ var_setvalue (var, p);
+ return (var);
+}
+
+static SHELL_VAR *
+assign_lineno (var, value, unused, key)
+ SHELL_VAR *var;
+ char *value;
+ arrayind_t unused;
+ char *key;
+{
+ intmax_t new_value;
+
+ if (value == 0 || *value == '\0' || legal_number (value, &new_value) == 0)
+ new_value = 0;
+ line_number = new_value;
+ return var;
+}
+
+/* Function which returns the current line number. */
+static SHELL_VAR *
+get_lineno (var)
+ SHELL_VAR *var;
+{
+ char *p;
+ int ln;
+
+ ln = executing_line_number ();
+ p = itos (ln);
+ FREE (value_cell (var));
+ var_setvalue (var, p);
+ return (var);
+}
+
+static SHELL_VAR *
+assign_subshell (var, value, unused, key)
+ SHELL_VAR *var;
+ char *value;
+ arrayind_t unused;
+ char *key;
+{
+ intmax_t new_value;
+
+ if (value == 0 || *value == '\0' || legal_number (value, &new_value) == 0)
+ new_value = 0;
+ subshell_level = new_value;
+ return var;
+}
+
+static SHELL_VAR *
+get_subshell (var)
+ SHELL_VAR *var;
+{
+ char *p;
+
+ p = itos (subshell_level);
+ FREE (value_cell (var));
+ var_setvalue (var, p);
+ return (var);
+}
+
+static SHELL_VAR *
+get_bashpid (var)
+ SHELL_VAR *var;
+{
+ int pid;
+ char *p;
+
+ pid = getpid ();
+ p = itos (pid);
+
+ FREE (value_cell (var));
+ VSETATTR (var, att_integer|att_readonly);
+ var_setvalue (var, p);
+ return (var);
+}
+
+static SHELL_VAR *
+get_bash_command (var)
+ SHELL_VAR *var;
+{
+ char *p;
+
+ if (the_printed_command_except_trap)
+ p = savestring (the_printed_command_except_trap);
+ else
+ {
+ p = (char *)xmalloc (1);
+ p[0] = '\0';
+ }
+ FREE (value_cell (var));
+ var_setvalue (var, p);
+ return (var);
+}
+
+#if defined (HISTORY)
+static SHELL_VAR *
+get_histcmd (var)
+ SHELL_VAR *var;
+{
+ char *p;
+
+ p = itos (history_number ());
+ FREE (value_cell (var));
+ var_setvalue (var, p);
+ return (var);
+}
+#endif
+
+#if defined (READLINE)
+/* When this function returns, VAR->value points to malloced memory. */
+static SHELL_VAR *
+get_comp_wordbreaks (var)
+ SHELL_VAR *var;
+{
+ /* If we don't have anything yet, assign a default value. */
+ if (rl_completer_word_break_characters == 0 && bash_readline_initialized == 0)
+ enable_hostname_completion (perform_hostname_completion);
+
+ FREE (value_cell (var));
+ var_setvalue (var, savestring (rl_completer_word_break_characters));
+
+ return (var);
+}
+
+/* When this function returns, rl_completer_word_break_characters points to
+ malloced memory. */
+static SHELL_VAR *
+assign_comp_wordbreaks (self, value, unused, key)
+ SHELL_VAR *self;
+ char *value;
+ arrayind_t unused;
+ char *key;
+{
+ if (rl_completer_word_break_characters &&
+ rl_completer_word_break_characters != rl_basic_word_break_characters)
+ free (rl_completer_word_break_characters);
+
+ rl_completer_word_break_characters = savestring (value);
+ return self;
+}
+#endif /* READLINE */
+
+#if defined (PUSHD_AND_POPD) && defined (ARRAY_VARS)
+static SHELL_VAR *
+assign_dirstack (self, value, ind, key)
+ SHELL_VAR *self;
+ char *value;
+ arrayind_t ind;
+ char *key;
+{
+ set_dirstack_element (ind, 1, value);
+ return self;
+}
+
+static SHELL_VAR *
+get_dirstack (self)
+ SHELL_VAR *self;
+{
+ ARRAY *a;
+ WORD_LIST *l;
+
+ l = get_directory_stack (0);
+ a = array_from_word_list (l);
+ array_dispose (array_cell (self));
+ dispose_words (l);
+ var_setarray (self, a);
+ return self;
+}
+#endif /* PUSHD AND POPD && ARRAY_VARS */
+
+#if defined (ARRAY_VARS)
+/* We don't want to initialize the group set with a call to getgroups()
+ unless we're asked to, but we only want to do it once. */
+static SHELL_VAR *
+get_groupset (self)
+ SHELL_VAR *self;
+{
+ register int i;
+ int ng;
+ ARRAY *a;
+ static char **group_set = (char **)NULL;
+
+ if (group_set == 0)
+ {
+ group_set = get_group_list (&ng);
+ a = array_cell (self);
+ for (i = 0; i < ng; i++)
+ array_insert (a, i, group_set[i]);
+ }
+ return (self);
+}
+
+static SHELL_VAR *
+build_hashcmd (self)
+ SHELL_VAR *self;
+{
+ HASH_TABLE *h;
+ int i;
+ char *k, *v;
+ BUCKET_CONTENTS *item;
+
+ h = assoc_cell (self);
+ if (h)
+ assoc_dispose (h);
+
+ if (hashed_filenames == 0 || HASH_ENTRIES (hashed_filenames) == 0)
+ {
+ var_setvalue (self, (char *)NULL);
+ return self;
+ }
+
+ h = assoc_create (hashed_filenames->nbuckets);
+ for (i = 0; i < hashed_filenames->nbuckets; i++)
+ {
+ for (item = hash_items (i, hashed_filenames); item; item = item->next)
+ {
+ k = savestring (item->key);
+ v = pathdata(item)->path;
+ assoc_insert (h, k, v);
+ }
+ }
+
+ var_setvalue (self, (char *)h);
+ return self;
+}
+
+static SHELL_VAR *
+get_hashcmd (self)
+ SHELL_VAR *self;
+{
+ build_hashcmd (self);
+ return (self);
+}
+
+static SHELL_VAR *
+assign_hashcmd (self, value, ind, key)
+ SHELL_VAR *self;
+ char *value;
+ arrayind_t ind;
+ char *key;
+{
+ phash_insert (key, value, 0, 0);
+ return (build_hashcmd (self));
+}
+
+#if defined (ALIAS)
+static SHELL_VAR *
+build_aliasvar (self)
+ SHELL_VAR *self;
+{
+ HASH_TABLE *h;
+ int i;
+ char *k, *v;
+ BUCKET_CONTENTS *item;
+
+ h = assoc_cell (self);
+ if (h)
+ assoc_dispose (h);
+
+ if (aliases == 0 || HASH_ENTRIES (aliases) == 0)
+ {
+ var_setvalue (self, (char *)NULL);
+ return self;
+ }
+
+ h = assoc_create (aliases->nbuckets);
+ for (i = 0; i < aliases->nbuckets; i++)
+ {
+ for (item = hash_items (i, aliases); item; item = item->next)
+ {
+ k = savestring (item->key);
+ v = ((alias_t *)(item->data))->value;
+ assoc_insert (h, k, v);
+ }
+ }
+
+ var_setvalue (self, (char *)h);
+ return self;
+}
+
+static SHELL_VAR *
+get_aliasvar (self)
+ SHELL_VAR *self;
+{
+ build_aliasvar (self);
+ return (self);
+}
+
+static SHELL_VAR *
+assign_aliasvar (self, value, ind, key)
+ SHELL_VAR *self;
+ char *value;
+ arrayind_t ind;
+ char *key;
+{
+ add_alias (key, value);
+ return (build_aliasvar (self));
+}
+#endif /* ALIAS */
+
+#endif /* ARRAY_VARS */
+
+/* If ARRAY_VARS is not defined, this just returns the name of any
+ currently-executing function. If we have arrays, it's a call stack. */
+static SHELL_VAR *
+get_funcname (self)
+ SHELL_VAR *self;
+{
+#if ! defined (ARRAY_VARS)
+ char *t;
+ if (variable_context && this_shell_function)
+ {
+ FREE (value_cell (self));
+ t = savestring (this_shell_function->name);
+ var_setvalue (self, t);
+ }
+#endif
+ return (self);
+}
+
+void
+make_funcname_visible (on_or_off)
+ int on_or_off;
+{
+ SHELL_VAR *v;
+
+ v = find_variable ("FUNCNAME");
+ if (v == 0 || v->dynamic_value == 0)
+ return;
+
+ if (on_or_off)
+ VUNSETATTR (v, att_invisible);
+ else
+ VSETATTR (v, att_invisible);
+}
+
+static SHELL_VAR *
+init_funcname_var ()
+{
+ SHELL_VAR *v;
+
+ v = find_variable ("FUNCNAME");
+ if (v)
+ return v;
+#if defined (ARRAY_VARS)
+ INIT_DYNAMIC_ARRAY_VAR ("FUNCNAME", get_funcname, null_array_assign);
+#else
+ INIT_DYNAMIC_VAR ("FUNCNAME", (char *)NULL, get_funcname, null_assign);
+#endif
+ VSETATTR (v, att_invisible|att_noassign);
+ return v;
+}
+
+static void
+initialize_dynamic_variables ()
+{
+ SHELL_VAR *v;
+
+ v = init_seconds_var ();
+
+ INIT_DYNAMIC_VAR ("BASH_COMMAND", (char *)NULL, get_bash_command, (sh_var_assign_func_t *)NULL);
+ INIT_DYNAMIC_VAR ("BASH_SUBSHELL", (char *)NULL, get_subshell, assign_subshell);
+
+ INIT_DYNAMIC_VAR ("RANDOM", (char *)NULL, get_random, assign_random);
+ VSETATTR (v, att_integer);
+ INIT_DYNAMIC_VAR ("LINENO", (char *)NULL, get_lineno, assign_lineno);
+ VSETATTR (v, att_integer);
+
+ INIT_DYNAMIC_VAR ("BASHPID", (char *)NULL, get_bashpid, null_assign);
+ VSETATTR (v, att_integer|att_readonly);
+
+#if defined (HISTORY)
+ INIT_DYNAMIC_VAR ("HISTCMD", (char *)NULL, get_histcmd, (sh_var_assign_func_t *)NULL);
+ VSETATTR (v, att_integer);
+#endif
+
+#if defined (READLINE)
+ INIT_DYNAMIC_VAR ("COMP_WORDBREAKS", (char *)NULL, get_comp_wordbreaks, assign_comp_wordbreaks);
+#endif
+
+#if defined (PUSHD_AND_POPD) && defined (ARRAY_VARS)
+ v = init_dynamic_array_var ("DIRSTACK", get_dirstack, assign_dirstack, 0);
+#endif /* PUSHD_AND_POPD && ARRAY_VARS */
+
+#if defined (ARRAY_VARS)
+ v = init_dynamic_array_var ("GROUPS", get_groupset, null_array_assign, att_noassign);
+
+# if defined (DEBUGGER)
+ v = init_dynamic_array_var ("BASH_ARGC", get_self, null_array_assign, att_noassign|att_nounset);
+ v = init_dynamic_array_var ("BASH_ARGV", get_self, null_array_assign, att_noassign|att_nounset);
+# endif /* DEBUGGER */
+ v = init_dynamic_array_var ("BASH_SOURCE", get_self, null_array_assign, att_noassign|att_nounset);
+ v = init_dynamic_array_var ("BASH_LINENO", get_self, null_array_assign, att_noassign|att_nounset);
+
+ v = init_dynamic_assoc_var ("BASH_CMDS", get_hashcmd, assign_hashcmd, att_nofree);
+# if defined (ALIAS)
+ v = init_dynamic_assoc_var ("BASH_ALIASES", get_aliasvar, assign_aliasvar, att_nofree);
+# endif
+#endif
+
+ v = init_funcname_var ();
+}
+
+/* **************************************************************** */
+/* */
+/* Retrieving variables and values */
+/* */
+/* **************************************************************** */
+
+/* How to get a pointer to the shell variable or function named NAME.
+ HASHED_VARS is a pointer to the hash table containing the list
+ of interest (either variables or functions). */
+
+static SHELL_VAR *
+hash_lookup (name, hashed_vars)
+ const char *name;
+ HASH_TABLE *hashed_vars;
+{
+ BUCKET_CONTENTS *bucket;
+
+ bucket = hash_search (name, hashed_vars, 0);
+ return (bucket ? (SHELL_VAR *)bucket->data : (SHELL_VAR *)NULL);
+}
+
+SHELL_VAR *
+var_lookup (name, vcontext)
+ const char *name;
+ VAR_CONTEXT *vcontext;
+{
+ VAR_CONTEXT *vc;
+ SHELL_VAR *v;
+
+ v = (SHELL_VAR *)NULL;
+ for (vc = vcontext; vc; vc = vc->down)
+ if (v = hash_lookup (name, vc->table))
+ break;
+
+ return v;
+}
+
+/* Look up the variable entry named NAME. If SEARCH_TEMPENV is non-zero,
+ then also search the temporarily built list of exported variables.
+ The lookup order is:
+ temporary_env
+ shell_variables list
+*/
+
+SHELL_VAR *
+find_variable_internal (name, force_tempenv)
+ const char *name;
+ int force_tempenv;
+{
+ SHELL_VAR *var;
+ int search_tempenv;
+
+ var = (SHELL_VAR *)NULL;
+
+ /* If explicitly requested, first look in the temporary environment for
+ the variable. This allows constructs such as "foo=x eval 'echo $foo'"
+ to get the `exported' value of $foo. This happens if we are executing
+ a function or builtin, or if we are looking up a variable in a
+ "subshell environment". */
+ search_tempenv = force_tempenv || (expanding_redir == 0 && subshell_environment);
+
+ if (search_tempenv && temporary_env)
+ var = hash_lookup (name, temporary_env);
+
+ if (var == 0)
+ var = var_lookup (name, shell_variables);
+
+ if (var == 0)
+ return ((SHELL_VAR *)NULL);
+
+ return (var->dynamic_value ? (*(var->dynamic_value)) (var) : var);
+}
+
+/* Look up the variable entry named NAME. Returns the entry or NULL. */
+SHELL_VAR *
+find_variable (name)
+ const char *name;
+{
+ return (find_variable_internal (name, (expanding_redir == 0 && (assigning_in_environment || executing_builtin))));
+}
+
+/* Look up the function entry whose name matches STRING.
+ Returns the entry or NULL. */
+SHELL_VAR *
+find_function (name)
+ const char *name;
+{
+ return (hash_lookup (name, shell_functions));
+}
+
+/* Find the function definition for the shell function named NAME. Returns
+ the entry or NULL. */
+FUNCTION_DEF *
+find_function_def (name)
+ const char *name;
+{
+#if defined (DEBUGGER)
+ return ((FUNCTION_DEF *)hash_lookup (name, shell_function_defs));
+#else
+ return ((FUNCTION_DEF *)0);
+#endif
+}
+
+/* Return the value of VAR. VAR is assumed to have been the result of a
+ lookup without any subscript, if arrays are compiled into the shell. */
+char *
+get_variable_value (var)
+ SHELL_VAR *var;
+{
+ if (var == 0)
+ return ((char *)NULL);
+#if defined (ARRAY_VARS)
+ else if (array_p (var))
+ return (array_reference (array_cell (var), 0));
+ else if (assoc_p (var))
+ return (assoc_reference (assoc_cell (var), "0"));
+#endif
+ else
+ return (value_cell (var));
+}
+
+/* Return the string value of a variable. Return NULL if the variable
+ doesn't exist. Don't cons a new string. This is a potential memory
+ leak if the variable is found in the temporary environment. Since
+ functions and variables have separate name spaces, returns NULL if
+ var_name is a shell function only. */
+char *
+get_string_value (var_name)
+ const char *var_name;
+{
+ SHELL_VAR *var;
+
+ var = find_variable (var_name);
+ return ((var) ? get_variable_value (var) : (char *)NULL);
+}
+
+/* This is present for use by the tilde and readline libraries. */
+char *
+sh_get_env_value (v)
+ const char *v;
+{
+ return get_string_value (v);
+}
+
+/* **************************************************************** */
+/* */
+/* Creating and setting variables */
+/* */
+/* **************************************************************** */
+
+/* Set NAME to VALUE if NAME has no value. */
+SHELL_VAR *
+set_if_not (name, value)
+ char *name, *value;
+{
+ SHELL_VAR *v;
+
+ if (shell_variables == 0)
+ create_variable_tables ();
+
+ v = find_variable (name);
+ if (v == 0)
+ v = bind_variable_internal (name, value, global_variables->table, HASH_NOSRCH, 0);
+ return (v);
+}
+
+/* Create a local variable referenced by NAME. */
+SHELL_VAR *
+make_local_variable (name)
+ const char *name;
+{
+ SHELL_VAR *new_var, *old_var;
+ VAR_CONTEXT *vc;
+ int was_tmpvar;
+ char *tmp_value;
+
+ /* local foo; local foo; is a no-op. */
+ old_var = find_variable (name);
+ if (old_var && local_p (old_var) && old_var->context == variable_context)
+ {
+ VUNSETATTR (old_var, att_invisible);
+ return (old_var);
+ }
+
+ was_tmpvar = old_var && tempvar_p (old_var);
+ if (was_tmpvar)
+ tmp_value = value_cell (old_var);
+
+ for (vc = shell_variables; vc; vc = vc->down)
+ if (vc_isfuncenv (vc) && vc->scope == variable_context)
+ break;
+
+ if (vc == 0)
+ {
+ internal_error (_("make_local_variable: no function context at current scope"));
+ return ((SHELL_VAR *)NULL);
+ }
+ else if (vc->table == 0)
+ vc->table = hash_create (TEMPENV_HASH_BUCKETS);
+
+ /* Since this is called only from the local/declare/typeset code, we can
+ call builtin_error here without worry (of course, it will also work
+ for anything that sets this_command_name). Variables with the `noassign'
+ attribute may not be made local. The test against old_var's context
+ level is to disallow local copies of readonly global variables (since I
+ believe that this could be a security hole). Readonly copies of calling
+ function local variables are OK. */
+ if (old_var && (noassign_p (old_var) ||
+ (readonly_p (old_var) && old_var->context == 0)))
+ {
+ if (readonly_p (old_var))
+ sh_readonly (name);
+ return ((SHELL_VAR *)NULL);
+ }
+
+ if (old_var == 0)
+ new_var = make_new_variable (name, vc->table);
+ else
+ {
+ new_var = make_new_variable (name, vc->table);
+
+ /* If we found this variable in one of the temporary environments,
+ inherit its value. Watch to see if this causes problems with
+ things like `x=4 local x'. */
+ if (was_tmpvar)
+ var_setvalue (new_var, savestring (tmp_value));
+
+ new_var->attributes = exported_p (old_var) ? att_exported : 0;
+ }
+
+ vc->flags |= VC_HASLOCAL;
+
+ new_var->context = variable_context;
+ VSETATTR (new_var, att_local);
+
+ if (ifsname (name))
+ setifs (new_var);
+
+ return (new_var);
+}
+
+/* Create a new shell variable with name NAME. */
+static SHELL_VAR *
+new_shell_variable (name)
+ const char *name;
+{
+ SHELL_VAR *entry;
+
+ entry = (SHELL_VAR *)xmalloc (sizeof (SHELL_VAR));
+
+ entry->name = savestring (name);
+ var_setvalue (entry, (char *)NULL);
+ CLEAR_EXPORTSTR (entry);
+
+ entry->dynamic_value = (sh_var_value_func_t *)NULL;
+ entry->assign_func = (sh_var_assign_func_t *)NULL;
+
+ entry->attributes = 0;
+
+ /* Always assume variables are to be made at toplevel!
+ make_local_variable has the responsibilty of changing the
+ variable context. */
+ entry->context = 0;
+
+ return (entry);
+}
+
+/* Create a new shell variable with name NAME and add it to the hash table
+ TABLE. */
+static SHELL_VAR *
+make_new_variable (name, table)
+ const char *name;
+ HASH_TABLE *table;
+{
+ SHELL_VAR *entry;
+ BUCKET_CONTENTS *elt;
+
+ entry = new_shell_variable (name);
+
+ /* Make sure we have a shell_variables hash table to add to. */
+ if (shell_variables == 0)
+ create_variable_tables ();
+
+ elt = hash_insert (savestring (name), table, HASH_NOSRCH);
+ elt->data = (PTR_T)entry;
+
+ return entry;
+}
+
+#if defined (ARRAY_VARS)
+SHELL_VAR *
+make_new_array_variable (name)
+ char *name;
+{
+ SHELL_VAR *entry;
+ ARRAY *array;
+
+ entry = make_new_variable (name, global_variables->table);
+ array = array_create ();
+
+ var_setarray (entry, array);
+ VSETATTR (entry, att_array);
+ return entry;
+}
+
+SHELL_VAR *
+make_local_array_variable (name)
+ char *name;
+{
+ SHELL_VAR *var;
+ ARRAY *array;
+
+ var = make_local_variable (name);
+ if (var == 0 || array_p (var))
+ return var;
+
+ array = array_create ();
+
+ dispose_variable_value (var);
+ var_setarray (var, array);
+ VSETATTR (var, att_array);
+ return var;
+}
+
+SHELL_VAR *
+make_new_assoc_variable (name)
+ char *name;
+{
+ SHELL_VAR *entry;
+ HASH_TABLE *hash;
+
+ entry = make_new_variable (name, global_variables->table);
+ hash = assoc_create (0);
+
+ var_setassoc (entry, hash);
+ VSETATTR (entry, att_assoc);
+ return entry;
+}
+
+SHELL_VAR *
+make_local_assoc_variable (name)
+ char *name;
+{
+ SHELL_VAR *var;
+ HASH_TABLE *hash;
+
+ var = make_local_variable (name);
+ if (var == 0 || assoc_p (var))
+ return var;
+
+ dispose_variable_value (var);
+ hash = assoc_create (0);
+
+ var_setassoc (var, hash);
+ VSETATTR (var, att_assoc);
+ return var;
+}
+#endif
+
+char *
+make_variable_value (var, value, flags)
+ SHELL_VAR *var;
+ char *value;
+ int flags;
+{
+ char *retval, *oval;
+ intmax_t lval, rval;
+ int expok, olen, op;
+
+ /* If this variable has had its type set to integer (via `declare -i'),
+ then do expression evaluation on it and store the result. The
+ functions in expr.c (evalexp()) and bind_int_variable() are responsible
+ for turning off the integer flag if they don't want further
+ evaluation done. */
+ if (integer_p (var))
+ {
+ if (flags & ASS_APPEND)
+ {
+ oval = value_cell (var);
+ lval = evalexp (oval, &expok); /* ksh93 seems to do this */
+ if (expok == 0)
+ {
+ top_level_cleanup ();
+ jump_to_top_level (DISCARD);
+ }
+ }
+ rval = evalexp (value, &expok);
+ if (expok == 0)
+ {
+ top_level_cleanup ();
+ jump_to_top_level (DISCARD);
+ }
+ if (flags & ASS_APPEND)
+ rval += lval;
+ retval = itos (rval);
+ }
+#if defined (CASEMOD_ATTRS)
+ else if (capcase_p (var) || uppercase_p (var) || lowercase_p (var))
+ {
+ if (flags & ASS_APPEND)
+ {
+ oval = get_variable_value (var);
+ if (oval == 0) /* paranoia */
+ oval = "";
+ olen = STRLEN (oval);
+ retval = (char *)xmalloc (olen + (value ? STRLEN (value) : 0) + 1);
+ strcpy (retval, oval);
+ if (value)
+ strcpy (retval+olen, value);
+ }
+ else if (*value)
+ retval = savestring (value);
+ else
+ {
+ retval = (char *)xmalloc (1);
+ retval[0] = '\0';
+ }
+ op = capcase_p (var) ? CASE_CAPITALIZE
+ : (uppercase_p (var) ? CASE_UPPER : CASE_LOWER);
+ oval = sh_modcase (retval, (char *)0, op);
+ free (retval);
+ retval = oval;
+ }
+#endif /* CASEMOD_ATTRS */
+ else if (value)
+ {
+ if (flags & ASS_APPEND)
+ {
+ oval = get_variable_value (var);
+ if (oval == 0) /* paranoia */
+ oval = "";
+ olen = STRLEN (oval);
+ retval = (char *)xmalloc (olen + (value ? STRLEN (value) : 0) + 1);
+ strcpy (retval, oval);
+ if (value)
+ strcpy (retval+olen, value);
+ }
+ else if (*value)
+ retval = savestring (value);
+ else
+ {
+ retval = (char *)xmalloc (1);
+ retval[0] = '\0';
+ }
+ }
+ else
+ retval = (char *)NULL;
+
+ return retval;
+}
+
+/* Bind a variable NAME to VALUE in the HASH_TABLE TABLE, which may be the
+ temporary environment (but usually is not). */
+static SHELL_VAR *
+bind_variable_internal (name, value, table, hflags, aflags)
+ const char *name;
+ char *value;
+ HASH_TABLE *table;
+ int hflags, aflags;
+{
+ char *newval;
+ SHELL_VAR *entry;
+
+ entry = (hflags & HASH_NOSRCH) ? (SHELL_VAR *)NULL : hash_lookup (name, table);
+
+ if (entry == 0)
+ {
+ entry = make_new_variable (name, table);
+ var_setvalue (entry, make_variable_value (entry, value, 0)); /* XXX */
+ }
+ else if (entry->assign_func) /* array vars have assign functions now */
+ {
+ INVALIDATE_EXPORTSTR (entry);
+ newval = (aflags & ASS_APPEND) ? make_variable_value (entry, value, aflags) : value;
+ if (assoc_p (entry))
+ entry = (*(entry->assign_func)) (entry, newval, -1, savestring ("0"));
+ else if (array_p (entry))
+ entry = (*(entry->assign_func)) (entry, newval, 0, 0);
+ else
+ entry = (*(entry->assign_func)) (entry, newval, -1, 0);
+ if (newval != value)
+ free (newval);
+ return (entry);
+ }
+ else
+ {
+ if (readonly_p (entry) || noassign_p (entry))
+ {
+ if (readonly_p (entry))
+ err_readonly (name);
+ return (entry);
+ }
+
+ /* Variables which are bound are visible. */
+ VUNSETATTR (entry, att_invisible);
+
+ newval = make_variable_value (entry, value, aflags); /* XXX */
+
+ /* Invalidate any cached export string */
+ INVALIDATE_EXPORTSTR (entry);
+
+#if defined (ARRAY_VARS)
+ /* XXX -- this bears looking at again -- XXX */
+ /* If an existing array variable x is being assigned to with x=b or
+ `read x' or something of that nature, silently convert it to
+ x[0]=b or `read x[0]'. */
+ if (array_p (entry))
+ {
+ array_insert (array_cell (entry), 0, newval);
+ free (newval);
+ }
+ else if (assoc_p (entry))
+ {
+ assoc_insert (assoc_cell (entry), savestring ("0"), newval);
+ free (newval);
+ }
+ else
+#endif
+ {
+ FREE (value_cell (entry));
+ var_setvalue (entry, newval);
+ }
+ }
+
+ if (mark_modified_vars)
+ VSETATTR (entry, att_exported);
+
+ if (exported_p (entry))
+ array_needs_making = 1;
+
+ return (entry);
+}
+
+/* Bind a variable NAME to VALUE. This conses up the name
+ and value strings. If we have a temporary environment, we bind there
+ first, then we bind into shell_variables. */
+
+SHELL_VAR *
+bind_variable (name, value, flags)
+ const char *name;
+ char *value;
+ int flags;
+{
+ SHELL_VAR *v;
+ VAR_CONTEXT *vc;
+
+ if (shell_variables == 0)
+ create_variable_tables ();
+
+ /* If we have a temporary environment, look there first for the variable,
+ and, if found, modify the value there before modifying it in the
+ shell_variables table. This allows sourced scripts to modify values
+ given to them in a temporary environment while modifying the variable
+ value that the caller sees. */
+ if (temporary_env)
+ bind_tempenv_variable (name, value);
+
+ /* XXX -- handle local variables here. */
+ for (vc = shell_variables; vc; vc = vc->down)
+ {
+ if (vc_isfuncenv (vc) || vc_isbltnenv (vc))
+ {
+ v = hash_lookup (name, vc->table);
+ if (v)
+ return (bind_variable_internal (name, value, vc->table, 0, flags));
+ }
+ }
+ return (bind_variable_internal (name, value, global_variables->table, 0, flags));
+}
+
+/* Make VAR, a simple shell variable, have value VALUE. Once assigned a
+ value, variables are no longer invisible. This is a duplicate of part
+ of the internals of bind_variable. If the variable is exported, or
+ all modified variables should be exported, mark the variable for export
+ and note that the export environment needs to be recreated. */
+SHELL_VAR *
+bind_variable_value (var, value, aflags)
+ SHELL_VAR *var;
+ char *value;
+ int aflags;
+{
+ char *t;
+
+ VUNSETATTR (var, att_invisible);
+
+ if (var->assign_func)
+ {
+ /* If we're appending, we need the old value, so use
+ make_variable_value */
+ t = (aflags & ASS_APPEND) ? make_variable_value (var, value, aflags) : value;
+ (*(var->assign_func)) (var, t, -1, 0);
+ if (t != value && t)
+ free (t);
+ }
+ else
+ {
+ t = make_variable_value (var, value, aflags);
+ FREE (value_cell (var));
+ var_setvalue (var, t);
+ }
+
+ INVALIDATE_EXPORTSTR (var);
+
+ if (mark_modified_vars)
+ VSETATTR (var, att_exported);
+
+ if (exported_p (var))
+ array_needs_making = 1;
+
+ return (var);
+}
+
+/* Bind/create a shell variable with the name LHS to the RHS.
+ This creates or modifies a variable such that it is an integer.
+
+ This used to be in expr.c, but it is here so that all of the
+ variable binding stuff is localized. Since we don't want any
+ recursive evaluation from bind_variable() (possible without this code,
+ since bind_variable() calls the evaluator for variables with the integer
+ attribute set), we temporarily turn off the integer attribute for each
+ variable we set here, then turn it back on after binding as necessary. */
+
+SHELL_VAR *
+bind_int_variable (lhs, rhs)
+ char *lhs, *rhs;
+{
+ register SHELL_VAR *v;
+ int isint, isarr;
+
+ isint = isarr = 0;
+#if defined (ARRAY_VARS)
+ if (valid_array_reference (lhs))
+ {
+ isarr = 1;
+ v = array_variable_part (lhs, (char **)0, (int *)0);
+ }
+ else
+#endif
+ v = find_variable (lhs);
+
+ if (v)
+ {
+ isint = integer_p (v);
+ VUNSETATTR (v, att_integer);
+ }
+
+#if defined (ARRAY_VARS)
+ if (isarr)
+ v = assign_array_element (lhs, rhs, 0);
+ else
+#endif
+ v = bind_variable (lhs, rhs, 0);
+
+ if (isint)
+ VSETATTR (v, att_integer);
+
+ return (v);
+}
+
+SHELL_VAR *
+bind_var_to_int (var, val)
+ char *var;
+ intmax_t val;
+{
+ char ibuf[INT_STRLEN_BOUND (intmax_t) + 1], *p;
+
+ p = fmtulong (val, 10, ibuf, sizeof (ibuf), 0);
+ return (bind_int_variable (var, p));
+}
+
+/* Do a function binding to a variable. You pass the name and
+ the command to bind to. This conses the name and command. */
+SHELL_VAR *
+bind_function (name, value)
+ const char *name;
+ COMMAND *value;
+{
+ SHELL_VAR *entry;
+
+ entry = find_function (name);
+ if (entry == 0)
+ {
+ BUCKET_CONTENTS *elt;
+
+ elt = hash_insert (savestring (name), shell_functions, HASH_NOSRCH);
+ entry = new_shell_variable (name);
+ elt->data = (PTR_T)entry;
+ }
+ else
+ INVALIDATE_EXPORTSTR (entry);
+
+ if (var_isset (entry))
+ dispose_command (function_cell (entry));
+
+ if (value)
+ var_setfunc (entry, copy_command (value));
+ else
+ var_setfunc (entry, 0);
+
+ VSETATTR (entry, att_function);
+
+ if (mark_modified_vars)
+ VSETATTR (entry, att_exported);
+
+ VUNSETATTR (entry, att_invisible); /* Just to be sure */
+
+ if (exported_p (entry))
+ array_needs_making = 1;
+
+#if defined (PROGRAMMABLE_COMPLETION)
+ set_itemlist_dirty (&it_functions);
+#endif
+
+ return (entry);
+}
+
+#if defined (DEBUGGER)
+/* Bind a function definition, which includes source file and line number
+ information in addition to the command, into the FUNCTION_DEF hash table.*/
+void
+bind_function_def (name, value)
+ const char *name;
+ FUNCTION_DEF *value;
+{
+ FUNCTION_DEF *entry;
+ BUCKET_CONTENTS *elt;
+ COMMAND *cmd;
+
+ entry = find_function_def (name);
+ if (entry)
+ {
+ dispose_function_def_contents (entry);
+ entry = copy_function_def_contents (value, entry);
+ }
+ else
+ {
+ cmd = value->command;
+ value->command = 0;
+ entry = copy_function_def (value);
+ value->command = cmd;
+
+ elt = hash_insert (savestring (name), shell_function_defs, HASH_NOSRCH);
+ elt->data = (PTR_T *)entry;
+ }
+}
+#endif /* DEBUGGER */
+
+/* Add STRING, which is of the form foo=bar, to the temporary environment
+ HASH_TABLE (temporary_env). The functions in execute_cmd.c are
+ responsible for moving the main temporary env to one of the other
+ temporary environments. The expansion code in subst.c calls this. */
+int
+assign_in_env (word)
+ WORD_DESC *word;
+{
+ int offset;
+ char *name, *temp, *value;
+ SHELL_VAR *var;
+ const char *string;
+
+ string = word->word;
+
+ offset = assignment (string, 0);
+ name = savestring (string);
+ value = (char *)NULL;
+
+ if (name[offset] == '=')
+ {
+ name[offset] = 0;
+
+ /* ignore the `+' when assigning temporary environment */
+ if (name[offset - 1] == '+')
+ name[offset - 1] = '\0';
+
+ var = find_variable (name);
+ if (var && (readonly_p (var) || noassign_p (var)))
+ {
+ if (readonly_p (var))
+ err_readonly (name);
+ free (name);
+ return (0);
+ }
+
+ temp = name + offset + 1;
+ value = expand_assignment_string_to_string (temp, 0);
+ }
+
+ if (temporary_env == 0)
+ temporary_env = hash_create (TEMPENV_HASH_BUCKETS);
+
+ var = hash_lookup (name, temporary_env);
+ if (var == 0)
+ var = make_new_variable (name, temporary_env);
+ else
+ FREE (value_cell (var));
+
+ if (value == 0)
+ {
+ value = (char *)xmalloc (1); /* like do_assignment_internal */
+ value[0] = '\0';
+ }
+
+ var_setvalue (var, value);
+ var->attributes |= (att_exported|att_tempvar);
+ var->context = variable_context; /* XXX */
+
+ INVALIDATE_EXPORTSTR (var);
+ var->exportstr = mk_env_string (name, value);
+
+ array_needs_making = 1;
+
+ if (ifsname (name))
+ setifs (var);
+
+ if (echo_command_at_execute)
+ /* The Korn shell prints the `+ ' in front of assignment statements,
+ so we do too. */
+ xtrace_print_assignment (name, value, 0, 1);
+
+ free (name);
+ return 1;
+}
+
+/* **************************************************************** */
+/* */
+/* Copying variables */
+/* */
+/* **************************************************************** */
+
+#ifdef INCLUDE_UNUSED
+/* Copy VAR to a new data structure and return that structure. */
+SHELL_VAR *
+copy_variable (var)
+ SHELL_VAR *var;
+{
+ SHELL_VAR *copy = (SHELL_VAR *)NULL;
+
+ if (var)
+ {
+ copy = (SHELL_VAR *)xmalloc (sizeof (SHELL_VAR));
+
+ copy->attributes = var->attributes;
+ copy->name = savestring (var->name);
+
+ if (function_p (var))
+ var_setfunc (copy, copy_command (function_cell (var)));
+#if defined (ARRAY_VARS)
+ else if (array_p (var))
+ var_setarray (copy, array_copy (array_cell (var)));
+ else if (assoc_p (var))
+ var_setassoc (copy, assoc_copy (assoc_cell (var)));
+#endif
+ else if (value_cell (var))
+ var_setvalue (copy, savestring (value_cell (var)));
+ else
+ var_setvalue (copy, (char *)NULL);
+
+ copy->dynamic_value = var->dynamic_value;
+ copy->assign_func = var->assign_func;
+
+ copy->exportstr = COPY_EXPORTSTR (var);
+
+ copy->context = var->context;
+ }
+ return (copy);
+}
+#endif
+
+/* **************************************************************** */
+/* */
+/* Deleting and unsetting variables */
+/* */
+/* **************************************************************** */
+
+/* Dispose of the information attached to VAR. */
+static void
+dispose_variable_value (var)
+ SHELL_VAR *var;
+{
+ if (function_p (var))
+ dispose_command (function_cell (var));
+#if defined (ARRAY_VARS)
+ else if (array_p (var))
+ array_dispose (array_cell (var));
+ else if (assoc_p (var))
+ assoc_dispose (assoc_cell (var));
+#endif
+ else
+ FREE (value_cell (var));
+}
+
+void
+dispose_variable (var)
+ SHELL_VAR *var;
+{
+ if (var == 0)
+ return;
+
+ if (nofree_p (var) == 0)
+ dispose_variable_value (var);
+
+ FREE_EXPORTSTR (var);
+
+ free (var->name);
+
+ if (exported_p (var))
+ array_needs_making = 1;
+
+ free (var);
+}
+
+/* Unset the shell variable referenced by NAME. */
+int
+unbind_variable (name)
+ const char *name;
+{
+ return makunbound (name, shell_variables);
+}
+
+/* Unset the shell function named NAME. */
+int
+unbind_func (name)
+ const char *name;
+{
+ BUCKET_CONTENTS *elt;
+ SHELL_VAR *func;
+
+ elt = hash_remove (name, shell_functions, 0);
+
+ if (elt == 0)
+ return -1;
+
+#if defined (PROGRAMMABLE_COMPLETION)
+ set_itemlist_dirty (&it_functions);
+#endif
+
+ func = (SHELL_VAR *)elt->data;
+ if (func)
+ {
+ if (exported_p (func))
+ array_needs_making++;
+ dispose_variable (func);
+ }
+
+ free (elt->key);
+ free (elt);
+
+ return 0;
+}
+
+#if defined (DEBUGGER)
+int
+unbind_function_def (name)
+ const char *name;
+{
+ BUCKET_CONTENTS *elt;
+ FUNCTION_DEF *funcdef;
+
+ elt = hash_remove (name, shell_function_defs, 0);
+
+ if (elt == 0)
+ return -1;
+
+ funcdef = (FUNCTION_DEF *)elt->data;
+ if (funcdef)
+ dispose_function_def (funcdef);
+
+ free (elt->key);
+ free (elt);
+
+ return 0;
+}
+#endif /* DEBUGGER */
+
+/* Make the variable associated with NAME go away. HASH_LIST is the
+ hash table from which this variable should be deleted (either
+ shell_variables or shell_functions).
+ Returns non-zero if the variable couldn't be found. */
+int
+makunbound (name, vc)
+ const char *name;
+ VAR_CONTEXT *vc;
+{
+ BUCKET_CONTENTS *elt, *new_elt;
+ SHELL_VAR *old_var;
+ VAR_CONTEXT *v;
+ char *t;
+
+ for (elt = (BUCKET_CONTENTS *)NULL, v = vc; v; v = v->down)
+ if (elt = hash_remove (name, v->table, 0))
+ break;
+
+ if (elt == 0)
+ return (-1);
+
+ old_var = (SHELL_VAR *)elt->data;
+
+ if (old_var && exported_p (old_var))
+ array_needs_making++;
+
+ /* If we're unsetting a local variable and we're still executing inside
+ the function, just mark the variable as invisible. The function
+ eventually called by pop_var_context() will clean it up later. This
+ must be done so that if the variable is subsequently assigned a new
+ value inside the function, the `local' attribute is still present.
+ We also need to add it back into the correct hash table. */
+ if (old_var && local_p (old_var) && variable_context == old_var->context)
+ {
+ if (nofree_p (old_var))
+ var_setvalue (old_var, (char *)NULL);
+#if defined (ARRAY_VARS)
+ else if (array_p (old_var))
+ array_dispose (array_cell (old_var));
+ else if (assoc_p (old_var))
+ assoc_dispose (assoc_cell (old_var));
+#endif
+ else
+ FREE (value_cell (old_var));
+ /* Reset the attributes. Preserve the export attribute if the variable
+ came from a temporary environment. Make sure it stays local, and
+ make it invisible. */
+ old_var->attributes = (exported_p (old_var) && tempvar_p (old_var)) ? att_exported : 0;
+ VSETATTR (old_var, att_local);
+ VSETATTR (old_var, att_invisible);
+ var_setvalue (old_var, (char *)NULL);
+ INVALIDATE_EXPORTSTR (old_var);
+
+ new_elt = hash_insert (savestring (old_var->name), v->table, 0);
+ new_elt->data = (PTR_T)old_var;
+ stupidly_hack_special_variables (old_var->name);
+
+ free (elt->key);
+ free (elt);
+ return (0);
+ }
+
+ /* Have to save a copy of name here, because it might refer to
+ old_var->name. If so, stupidly_hack_special_variables will
+ reference freed memory. */
+ t = savestring (name);
+
+ free (elt->key);
+ free (elt);
+
+ dispose_variable (old_var);
+ stupidly_hack_special_variables (t);
+ free (t);
+
+ return (0);
+}
+
+/* Get rid of all of the variables in the current context. */
+void
+kill_all_local_variables ()
+{
+ VAR_CONTEXT *vc;
+
+ for (vc = shell_variables; vc; vc = vc->down)
+ if (vc_isfuncenv (vc) && vc->scope == variable_context)
+ break;
+ if (vc == 0)
+ return; /* XXX */
+
+ if (vc->table && vc_haslocals (vc))
+ {
+ delete_all_variables (vc->table);
+ hash_dispose (vc->table);
+ }
+ vc->table = (HASH_TABLE *)NULL;
+}
+
+static void
+free_variable_hash_data (data)
+ PTR_T data;
+{
+ SHELL_VAR *var;
+
+ var = (SHELL_VAR *)data;
+ dispose_variable (var);
+}
+
+/* Delete the entire contents of the hash table. */
+void
+delete_all_variables (hashed_vars)
+ HASH_TABLE *hashed_vars;
+{
+ hash_flush (hashed_vars, free_variable_hash_data);
+}
+
+/* **************************************************************** */
+/* */
+/* Setting variable attributes */
+/* */
+/* **************************************************************** */
+
+#define FIND_OR_MAKE_VARIABLE(name, entry) \
+ do \
+ { \
+ entry = find_variable (name); \
+ if (!entry) \
+ { \
+ entry = bind_variable (name, "", 0); \
+ if (!no_invisible_vars) entry->attributes |= att_invisible; \
+ } \
+ } \
+ while (0)
+
+/* Make the variable associated with NAME be readonly.
+ If NAME does not exist yet, create it. */
+void
+set_var_read_only (name)
+ char *name;
+{
+ SHELL_VAR *entry;
+
+ FIND_OR_MAKE_VARIABLE (name, entry);
+ VSETATTR (entry, att_readonly);
+}
+
+#ifdef INCLUDE_UNUSED
+/* Make the function associated with NAME be readonly.
+ If NAME does not exist, we just punt, like auto_export code below. */
+void
+set_func_read_only (name)
+ const char *name;
+{
+ SHELL_VAR *entry;
+
+ entry = find_function (name);
+ if (entry)
+ VSETATTR (entry, att_readonly);
+}
+
+/* Make the variable associated with NAME be auto-exported.
+ If NAME does not exist yet, create it. */
+void
+set_var_auto_export (name)
+ char *name;
+{
+ SHELL_VAR *entry;
+
+ FIND_OR_MAKE_VARIABLE (name, entry);
+ set_auto_export (entry);
+}
+
+/* Make the function associated with NAME be auto-exported. */
+void
+set_func_auto_export (name)
+ const char *name;
+{
+ SHELL_VAR *entry;
+
+ entry = find_function (name);
+ if (entry)
+ set_auto_export (entry);
+}
+#endif
+
+/* **************************************************************** */
+/* */
+/* Creating lists of variables */
+/* */
+/* **************************************************************** */
+
+static VARLIST *
+vlist_alloc (nentries)
+ int nentries;
+{
+ VARLIST *vlist;
+
+ vlist = (VARLIST *)xmalloc (sizeof (VARLIST));
+ vlist->list = (SHELL_VAR **)xmalloc ((nentries + 1) * sizeof (SHELL_VAR *));
+ vlist->list_size = nentries;
+ vlist->list_len = 0;
+ vlist->list[0] = (SHELL_VAR *)NULL;
+
+ return vlist;
+}
+
+static VARLIST *
+vlist_realloc (vlist, n)
+ VARLIST *vlist;
+ int n;
+{
+ if (vlist == 0)
+ return (vlist = vlist_alloc (n));
+ if (n > vlist->list_size)
+ {
+ vlist->list_size = n;
+ vlist->list = (SHELL_VAR **)xrealloc (vlist->list, (vlist->list_size + 1) * sizeof (SHELL_VAR *));
+ }
+ return vlist;
+}
+
+static void
+vlist_add (vlist, var, flags)
+ VARLIST *vlist;
+ SHELL_VAR *var;
+ int flags;
+{
+ register int i;
+
+ for (i = 0; i < vlist->list_len; i++)
+ if (STREQ (var->name, vlist->list[i]->name))
+ break;
+ if (i < vlist->list_len)
+ return;
+
+ if (i >= vlist->list_size)
+ vlist = vlist_realloc (vlist, vlist->list_size + 16);
+
+ vlist->list[vlist->list_len++] = var;
+ vlist->list[vlist->list_len] = (SHELL_VAR *)NULL;
+}
+
+/* Map FUNCTION over the variables in VAR_HASH_TABLE. Return an array of the
+ variables for which FUNCTION returns a non-zero value. A NULL value
+ for FUNCTION means to use all variables. */
+SHELL_VAR **
+map_over (function, vc)
+ sh_var_map_func_t *function;
+ VAR_CONTEXT *vc;
+{
+ VAR_CONTEXT *v;
+ VARLIST *vlist;
+ SHELL_VAR **ret;
+ int nentries;
+
+ for (nentries = 0, v = vc; v; v = v->down)
+ nentries += HASH_ENTRIES (v->table);
+
+ if (nentries == 0)
+ return (SHELL_VAR **)NULL;
+
+ vlist = vlist_alloc (nentries);
+
+ for (v = vc; v; v = v->down)
+ flatten (v->table, function, vlist, 0);
+
+ ret = vlist->list;
+ free (vlist);
+ return ret;
+}
+
+SHELL_VAR **
+map_over_funcs (function)
+ sh_var_map_func_t *function;
+{
+ VARLIST *vlist;
+ SHELL_VAR **ret;
+
+ if (shell_functions == 0 || HASH_ENTRIES (shell_functions) == 0)
+ return ((SHELL_VAR **)NULL);
+
+ vlist = vlist_alloc (HASH_ENTRIES (shell_functions));
+
+ flatten (shell_functions, function, vlist, 0);
+
+ ret = vlist->list;
+ free (vlist);
+ return ret;
+}
+
+/* Flatten VAR_HASH_TABLE, applying FUNC to each member and adding those
+ elements for which FUNC succeeds to VLIST->list. FLAGS is reserved
+ for future use. Only unique names are added to VLIST. If FUNC is
+ NULL, each variable in VAR_HASH_TABLE is added to VLIST. If VLIST is
+ NULL, FUNC is applied to each SHELL_VAR in VAR_HASH_TABLE. If VLIST
+ and FUNC are both NULL, nothing happens. */
+static void
+flatten (var_hash_table, func, vlist, flags)
+ HASH_TABLE *var_hash_table;
+ sh_var_map_func_t *func;
+ VARLIST *vlist;
+ int flags;
+{
+ register int i;
+ register BUCKET_CONTENTS *tlist;
+ int r;
+ SHELL_VAR *var;
+
+ if (var_hash_table == 0 || (HASH_ENTRIES (var_hash_table) == 0) || (vlist == 0 && func == 0))
+ return;
+
+ for (i = 0; i < var_hash_table->nbuckets; i++)
+ {
+ for (tlist = hash_items (i, var_hash_table); tlist; tlist = tlist->next)
+ {
+ var = (SHELL_VAR *)tlist->data;
+
+ r = func ? (*func) (var) : 1;
+ if (r && vlist)
+ vlist_add (vlist, var, flags);
+ }
+ }
+}
+
+void
+sort_variables (array)
+ SHELL_VAR **array;
+{
+ qsort (array, strvec_len ((char **)array), sizeof (SHELL_VAR *), (QSFUNC *)qsort_var_comp);
+}
+
+static int
+qsort_var_comp (var1, var2)
+ SHELL_VAR **var1, **var2;
+{
+ int result;
+
+ if ((result = (*var1)->name[0] - (*var2)->name[0]) == 0)
+ result = strcmp ((*var1)->name, (*var2)->name);
+
+ return (result);
+}
+
+/* Apply FUNC to each variable in SHELL_VARIABLES, adding each one for
+ which FUNC succeeds to an array of SHELL_VAR *s. Returns the array. */
+static SHELL_VAR **
+vapply (func)
+ sh_var_map_func_t *func;
+{
+ SHELL_VAR **list;
+
+ list = map_over (func, shell_variables);
+ if (list /* && posixly_correct */)
+ sort_variables (list);
+ return (list);
+}
+
+/* Apply FUNC to each variable in SHELL_FUNCTIONS, adding each one for
+ which FUNC succeeds to an array of SHELL_VAR *s. Returns the array. */
+static SHELL_VAR **
+fapply (func)
+ sh_var_map_func_t *func;
+{
+ SHELL_VAR **list;
+
+ list = map_over_funcs (func);
+ if (list /* && posixly_correct */)
+ sort_variables (list);
+ return (list);
+}
+
+/* Create a NULL terminated array of all the shell variables. */
+SHELL_VAR **
+all_shell_variables ()
+{
+ return (vapply ((sh_var_map_func_t *)NULL));
+}
+
+/* Create a NULL terminated array of all the shell functions. */
+SHELL_VAR **
+all_shell_functions ()
+{
+ return (fapply ((sh_var_map_func_t *)NULL));
+}
+
+static int
+visible_var (var)
+ SHELL_VAR *var;
+{
+ return (invisible_p (var) == 0);
+}
+
+SHELL_VAR **
+all_visible_functions ()
+{
+ return (fapply (visible_var));
+}
+
+SHELL_VAR **
+all_visible_variables ()
+{
+ return (vapply (visible_var));
+}
+
+/* Return non-zero if the variable VAR is visible and exported. Array
+ variables cannot be exported. */
+static int
+visible_and_exported (var)
+ SHELL_VAR *var;
+{
+ return (invisible_p (var) == 0 && exported_p (var));
+}
+
+/* Candidate variables for the export environment are either valid variables
+ with the export attribute or invalid variables inherited from the initial
+ environment and simply passed through. */
+static int
+export_environment_candidate (var)
+ SHELL_VAR *var;
+{
+ return (exported_p (var) && (invisible_p (var) == 0 || imported_p (var)));
+}
+
+/* Return non-zero if VAR is a local variable in the current context and
+ is exported. */
+static int
+local_and_exported (var)
+ SHELL_VAR *var;
+{
+ return (invisible_p (var) == 0 && local_p (var) && var->context == variable_context && exported_p (var));
+}
+
+SHELL_VAR **
+all_exported_variables ()
+{
+ return (vapply (visible_and_exported));
+}
+
+SHELL_VAR **
+local_exported_variables ()
+{
+ return (vapply (local_and_exported));
+}
+
+static int
+variable_in_context (var)
+ SHELL_VAR *var;
+{
+ return (invisible_p (var) == 0 && local_p (var) && var->context == variable_context);
+}
+
+SHELL_VAR **
+all_local_variables ()
+{
+ VARLIST *vlist;
+ SHELL_VAR **ret;
+ VAR_CONTEXT *vc;
+
+ vc = shell_variables;
+ for (vc = shell_variables; vc; vc = vc->down)
+ if (vc_isfuncenv (vc) && vc->scope == variable_context)
+ break;
+
+ if (vc == 0)
+ {
+ internal_error (_("all_local_variables: no function context at current scope"));
+ return (SHELL_VAR **)NULL;
+ }
+ if (vc->table == 0 || HASH_ENTRIES (vc->table) == 0 || vc_haslocals (vc) == 0)
+ return (SHELL_VAR **)NULL;
+
+ vlist = vlist_alloc (HASH_ENTRIES (vc->table));
+
+ flatten (vc->table, variable_in_context, vlist, 0);
+
+ ret = vlist->list;
+ free (vlist);
+ if (ret)
+ sort_variables (ret);
+ return ret;
+}
+
+#if defined (ARRAY_VARS)
+/* Return non-zero if the variable VAR is visible and an array. */
+static int
+visible_array_vars (var)
+ SHELL_VAR *var;
+{
+ return (invisible_p (var) == 0 && array_p (var));
+}
+
+SHELL_VAR **
+all_array_variables ()
+{
+ return (vapply (visible_array_vars));
+}
+#endif /* ARRAY_VARS */
+
+char **
+all_variables_matching_prefix (prefix)
+ const char *prefix;
+{
+ SHELL_VAR **varlist;
+ char **rlist;
+ int vind, rind, plen;
+
+ plen = STRLEN (prefix);
+ varlist = all_visible_variables ();
+ for (vind = 0; varlist && varlist[vind]; vind++)
+ ;
+ if (varlist == 0 || vind == 0)
+ return ((char **)NULL);
+ rlist = strvec_create (vind + 1);
+ for (vind = rind = 0; varlist[vind]; vind++)
+ {
+ if (plen == 0 || STREQN (prefix, varlist[vind]->name, plen))
+ rlist[rind++] = savestring (varlist[vind]->name);
+ }
+ rlist[rind] = (char *)0;
+ free (varlist);
+
+ return rlist;
+}
+
+/* **************************************************************** */
+/* */
+/* Managing temporary variable scopes */
+/* */
+/* **************************************************************** */
+
+/* Make variable NAME have VALUE in the temporary environment. */
+static SHELL_VAR *
+bind_tempenv_variable (name, value)
+ const char *name;
+ char *value;
+{
+ SHELL_VAR *var;
+
+ var = temporary_env ? hash_lookup (name, temporary_env) : (SHELL_VAR *)NULL;
+
+ if (var)
+ {
+ FREE (value_cell (var));
+ var_setvalue (var, savestring (value));
+ INVALIDATE_EXPORTSTR (var);
+ }
+
+ return (var);
+}
+
+/* Find a variable in the temporary environment that is named NAME.
+ Return the SHELL_VAR *, or NULL if not found. */
+SHELL_VAR *
+find_tempenv_variable (name)
+ const char *name;
+{
+ return (temporary_env ? hash_lookup (name, temporary_env) : (SHELL_VAR *)NULL);
+}
+
+/* Push the variable described by (SHELL_VAR *)DATA down to the next
+ variable context from the temporary environment. */
+static void
+push_temp_var (data)
+ PTR_T data;
+{
+ SHELL_VAR *var, *v;
+ HASH_TABLE *binding_table;
+
+ var = (SHELL_VAR *)data;
+
+ binding_table = shell_variables->table;
+ if (binding_table == 0)
+ {
+ if (shell_variables == global_variables)
+ /* shouldn't happen */
+ binding_table = shell_variables->table = global_variables->table = hash_create (0);
+ else
+ binding_table = shell_variables->table = hash_create (TEMPENV_HASH_BUCKETS);
+ }
+
+ v = bind_variable_internal (var->name, value_cell (var), binding_table, 0, 0);
+
+ /* XXX - should we set the context here? It shouldn't matter because of how
+ assign_in_env works, but might want to check. */
+ if (binding_table == global_variables->table) /* XXX */
+ var->attributes &= ~(att_tempvar|att_propagate);
+ else
+ {
+ var->attributes |= att_propagate;
+ if (binding_table == shell_variables->table)
+ shell_variables->flags |= VC_HASTMPVAR;
+ }
+ v->attributes |= var->attributes;
+
+ dispose_variable (var);
+}
+
+static void
+propagate_temp_var (data)
+ PTR_T data;
+{
+ SHELL_VAR *var;
+
+ var = (SHELL_VAR *)data;
+ if (tempvar_p (var) && (var->attributes & att_propagate))
+ push_temp_var (data);
+ else
+ dispose_variable (var);
+}
+
+/* Free the storage used in the hash table for temporary
+ environment variables. PUSHF is a function to be called
+ to free each hash table entry. It takes care of pushing variables
+ to previous scopes if appropriate. */
+static void
+dispose_temporary_env (pushf)
+ sh_free_func_t *pushf;
+{
+ hash_flush (temporary_env, pushf);
+ hash_dispose (temporary_env);
+ temporary_env = (HASH_TABLE *)NULL;
+
+ array_needs_making = 1;
+
+ sv_ifs ("IFS"); /* XXX here for now */
+}
+
+void
+dispose_used_env_vars ()
+{
+ if (temporary_env)
+ {
+ dispose_temporary_env (propagate_temp_var);
+ maybe_make_export_env ();
+ }
+}
+
+/* Take all of the shell variables in the temporary environment HASH_TABLE
+ and make shell variables from them at the current variable context. */
+void
+merge_temporary_env ()
+{
+ if (temporary_env)
+ dispose_temporary_env (push_temp_var);
+}
+
+/* **************************************************************** */
+/* */
+/* Creating and manipulating the environment */
+/* */
+/* **************************************************************** */
+
+static inline char *
+mk_env_string (name, value)
+ const char *name, *value;
+{
+ int name_len, value_len;
+ char *p;
+
+ name_len = strlen (name);
+ value_len = STRLEN (value);
+ p = (char *)xmalloc (2 + name_len + value_len);
+ strcpy (p, name);
+ p[name_len] = '=';
+ if (value && *value)
+ strcpy (p + name_len + 1, value);
+ else
+ p[name_len + 1] = '\0';
+ return (p);
+}
+
+#ifdef DEBUG
+/* Debugging */
+static int
+valid_exportstr (v)
+ SHELL_VAR *v;
+{
+ char *s;
+
+ s = v->exportstr;
+ if (s == 0)
+ {
+ internal_error (_("%s has null exportstr"), v->name);
+ return (0);
+ }
+ if (legal_variable_starter ((unsigned char)*s) == 0)
+ {
+ internal_error (_("invalid character %d in exportstr for %s"), *s, v->name);
+ return (0);
+ }
+ for (s = v->exportstr + 1; s && *s; s++)
+ {
+ if (*s == '=')
+ break;
+ if (legal_variable_char ((unsigned char)*s) == 0)
+ {
+ internal_error (_("invalid character %d in exportstr for %s"), *s, v->name);
+ return (0);
+ }
+ }
+ if (*s != '=')
+ {
+ internal_error (_("no `=' in exportstr for %s"), v->name);
+ return (0);
+ }
+ return (1);
+}
+#endif
+
+static char **
+make_env_array_from_var_list (vars)
+ SHELL_VAR **vars;
+{
+ register int i, list_index;
+ register SHELL_VAR *var;
+ char **list, *value;
+
+ list = strvec_create ((1 + strvec_len ((char **)vars)));
+
+#define USE_EXPORTSTR (value == var->exportstr)
+
+ for (i = 0, list_index = 0; var = vars[i]; i++)
+ {
+#if defined (__CYGWIN__)
+ /* We don't use the exportstr stuff on Cygwin at all. */
+ INVALIDATE_EXPORTSTR (var);
+#endif
+ if (var->exportstr)
+ value = var->exportstr;
+ else if (function_p (var))
+ value = named_function_string ((char *)NULL, function_cell (var), 0);
+#if defined (ARRAY_VARS)
+ else if (array_p (var))
+# if 0
+ value = array_to_assignment_string (array_cell (var));
+# else
+ continue; /* XXX array vars cannot yet be exported */
+# endif
+ else if (assoc_p (var))
+# if 0
+ value = assoc_to_assignment_string (assoc_cell (var));
+# else
+ continue; /* XXX associative array vars cannot yet be exported */
+# endif
+#endif
+ else
+ value = value_cell (var);
+
+ if (value)
+ {
+ /* Gee, I'd like to get away with not using savestring() if we're
+ using the cached exportstr... */
+ list[list_index] = USE_EXPORTSTR ? savestring (value)
+ : mk_env_string (var->name, value);
+
+ if (USE_EXPORTSTR == 0)
+ SAVE_EXPORTSTR (var, list[list_index]);
+
+ list_index++;
+#undef USE_EXPORTSTR
+
+#if 0 /* not yet */
+#if defined (ARRAY_VARS)
+ if (array_p (var) || assoc_p (var))
+ free (value);
+#endif
+#endif
+ }
+ }
+
+ list[list_index] = (char *)NULL;
+ return (list);
+}
+
+/* Make an array of assignment statements from the hash table
+ HASHED_VARS which contains SHELL_VARs. Only visible, exported
+ variables are eligible. */
+static char **
+make_var_export_array (vcxt)
+ VAR_CONTEXT *vcxt;
+{
+ char **list;
+ SHELL_VAR **vars;
+
+#if 0
+ vars = map_over (visible_and_exported, vcxt);
+#else
+ vars = map_over (export_environment_candidate, vcxt);
+#endif
+
+ if (vars == 0)
+ return (char **)NULL;
+
+ list = make_env_array_from_var_list (vars);
+
+ free (vars);
+ return (list);
+}
+
+static char **
+make_func_export_array ()
+{
+ char **list;
+ SHELL_VAR **vars;
+
+ vars = map_over_funcs (visible_and_exported);
+ if (vars == 0)
+ return (char **)NULL;
+
+ list = make_env_array_from_var_list (vars);
+
+ free (vars);
+ return (list);
+}
+
+/* Add ENVSTR to the end of the exported environment, EXPORT_ENV. */
+#define add_to_export_env(envstr,do_alloc) \
+do \
+ { \
+ if (export_env_index >= (export_env_size - 1)) \
+ { \
+ export_env_size += 16; \
+ export_env = strvec_resize (export_env, export_env_size); \
+ environ = export_env; \
+ } \
+ export_env[export_env_index++] = (do_alloc) ? savestring (envstr) : envstr; \
+ export_env[export_env_index] = (char *)NULL; \
+ } while (0)
+
+/* Add ASSIGN to EXPORT_ENV, or supercede a previous assignment in the
+ array with the same left-hand side. Return the new EXPORT_ENV. */
+char **
+add_or_supercede_exported_var (assign, do_alloc)
+ char *assign;
+ int do_alloc;
+{
+ register int i;
+ int equal_offset;
+
+ equal_offset = assignment (assign, 0);
+ if (equal_offset == 0)
+ return (export_env);
+
+ /* If this is a function, then only supersede the function definition.
+ We do this by including the `=() {' in the comparison, like
+ initialize_shell_variables does. */
+ if (assign[equal_offset + 1] == '(' &&
+ strncmp (assign + equal_offset + 2, ") {", 3) == 0) /* } */
+ equal_offset += 4;
+
+ for (i = 0; i < export_env_index; i++)
+ {
+ if (STREQN (assign, export_env[i], equal_offset + 1))
+ {
+ free (export_env[i]);
+ export_env[i] = do_alloc ? savestring (assign) : assign;
+ return (export_env);
+ }
+ }
+ add_to_export_env (assign, do_alloc);
+ return (export_env);
+}
+
+static void
+add_temp_array_to_env (temp_array, do_alloc, do_supercede)
+ char **temp_array;
+ int do_alloc, do_supercede;
+{
+ register int i;
+
+ if (temp_array == 0)
+ return;
+
+ for (i = 0; temp_array[i]; i++)
+ {
+ if (do_supercede)
+ export_env = add_or_supercede_exported_var (temp_array[i], do_alloc);
+ else
+ add_to_export_env (temp_array[i], do_alloc);
+ }
+
+ free (temp_array);
+}
+
+/* Make the environment array for the command about to be executed, if the
+ array needs making. Otherwise, do nothing. If a shell action could
+ change the array that commands receive for their environment, then the
+ code should `array_needs_making++'.
+
+ The order to add to the array is:
+ temporary_env
+ list of var contexts whose head is shell_variables
+ shell_functions
+
+ This is the shell variable lookup order. We add only new variable
+ names at each step, which allows local variables and variables in
+ the temporary environments to shadow variables in the global (or
+ any previous) scope.
+*/
+
+static int
+n_shell_variables ()
+{
+ VAR_CONTEXT *vc;
+ int n;
+
+ for (n = 0, vc = shell_variables; vc; vc = vc->down)
+ n += HASH_ENTRIES (vc->table);
+ return n;
+}
+
+void
+maybe_make_export_env ()
+{
+ register char **temp_array;
+ int new_size;
+ VAR_CONTEXT *tcxt;
+
+ if (array_needs_making)
+ {
+ if (export_env)
+ strvec_flush (export_env);
+
+ /* Make a guess based on how many shell variables and functions we
+ have. Since there will always be array variables, and array
+ variables are not (yet) exported, this will always be big enough
+ for the exported variables and functions. */
+ new_size = n_shell_variables () + HASH_ENTRIES (shell_functions) + 1 +
+ HASH_ENTRIES (temporary_env);
+ if (new_size > export_env_size)
+ {
+ export_env_size = new_size;
+ export_env = strvec_resize (export_env, export_env_size);
+ environ = export_env;
+ }
+ export_env[export_env_index = 0] = (char *)NULL;
+
+ /* Make a dummy variable context from the temporary_env, stick it on
+ the front of shell_variables, call make_var_export_array on the
+ whole thing to flatten it, and convert the list of SHELL_VAR *s
+ to the form needed by the environment. */
+ if (temporary_env)
+ {
+ tcxt = new_var_context ((char *)NULL, 0);
+ tcxt->table = temporary_env;
+ tcxt->down = shell_variables;
+ }
+ else
+ tcxt = shell_variables;
+
+ temp_array = make_var_export_array (tcxt);
+ if (temp_array)
+ add_temp_array_to_env (temp_array, 0, 0);
+
+ if (tcxt != shell_variables)
+ free (tcxt);
+
+#if defined (RESTRICTED_SHELL)
+ /* Restricted shells may not export shell functions. */
+ temp_array = restricted ? (char **)0 : make_func_export_array ();
+#else
+ temp_array = make_func_export_array ();
+#endif
+ if (temp_array)
+ add_temp_array_to_env (temp_array, 0, 0);
+
+ array_needs_making = 0;
+ }
+}
+
+/* This is an efficiency hack. PWD and OLDPWD are auto-exported, so
+ we will need to remake the exported environment every time we
+ change directories. `_' is always put into the environment for
+ every external command, so without special treatment it will always
+ cause the environment to be remade.
+
+ If there is no other reason to make the exported environment, we can
+ just update the variables in place and mark the exported environment
+ as no longer needing a remake. */
+void
+update_export_env_inplace (env_prefix, preflen, value)
+ char *env_prefix;
+ int preflen;
+ char *value;
+{
+ char *evar;
+
+ evar = (char *)xmalloc (STRLEN (value) + preflen + 1);
+ strcpy (evar, env_prefix);
+ if (value)
+ strcpy (evar + preflen, value);
+ export_env = add_or_supercede_exported_var (evar, 0);
+}
+
+/* We always put _ in the environment as the name of this command. */
+void
+put_command_name_into_env (command_name)
+ char *command_name;
+{
+ update_export_env_inplace ("_=", 2, command_name);
+}
+
+#if 0 /* UNUSED -- it caused too many problems */
+void
+put_gnu_argv_flags_into_env (pid, flags_string)
+ intmax_t pid;
+ char *flags_string;
+{
+ char *dummy, *pbuf;
+ int l, fl;
+
+ pbuf = itos (pid);
+ l = strlen (pbuf);
+
+ fl = strlen (flags_string);
+
+ dummy = (char *)xmalloc (l + fl + 30);
+ dummy[0] = '_';
+ strcpy (dummy + 1, pbuf);
+ strcpy (dummy + 1 + l, "_GNU_nonoption_argv_flags_");
+ dummy[l + 27] = '=';
+ strcpy (dummy + l + 28, flags_string);
+
+ free (pbuf);
+
+ export_env = add_or_supercede_exported_var (dummy, 0);
+}
+#endif
+
+/* **************************************************************** */
+/* */
+/* Managing variable contexts */
+/* */
+/* **************************************************************** */
+
+/* Allocate and return a new variable context with NAME and FLAGS.
+ NAME can be NULL. */
+
+VAR_CONTEXT *
+new_var_context (name, flags)
+ char *name;
+ int flags;
+{
+ VAR_CONTEXT *vc;
+
+ vc = (VAR_CONTEXT *)xmalloc (sizeof (VAR_CONTEXT));
+ vc->name = name ? savestring (name) : (char *)NULL;
+ vc->scope = variable_context;
+ vc->flags = flags;
+
+ vc->up = vc->down = (VAR_CONTEXT *)NULL;
+ vc->table = (HASH_TABLE *)NULL;
+
+ return vc;
+}
+
+/* Free a variable context and its data, including the hash table. Dispose
+ all of the variables. */
+void
+dispose_var_context (vc)
+ VAR_CONTEXT *vc;
+{
+ FREE (vc->name);
+
+ if (vc->table)
+ {
+ delete_all_variables (vc->table);
+ hash_dispose (vc->table);
+ }
+
+ free (vc);
+}
+
+/* Set VAR's scope level to the current variable context. */
+static int
+set_context (var)
+ SHELL_VAR *var;
+{
+ return (var->context = variable_context);
+}
+
+/* Make a new variable context with NAME and FLAGS and a HASH_TABLE of
+ temporary variables, and push it onto shell_variables. This is
+ for shell functions. */
+VAR_CONTEXT *
+push_var_context (name, flags, tempvars)
+ char *name;
+ int flags;
+ HASH_TABLE *tempvars;
+{
+ VAR_CONTEXT *vc;
+
+ vc = new_var_context (name, flags);
+ vc->table = tempvars;
+ if (tempvars)
+ {
+ /* Have to do this because the temp environment was created before
+ variable_context was incremented. */
+ flatten (tempvars, set_context, (VARLIST *)NULL, 0);
+ vc->flags |= VC_HASTMPVAR;
+ }
+ vc->down = shell_variables;
+ shell_variables->up = vc;
+
+ return (shell_variables = vc);
+}
+
+static void
+push_func_var (data)
+ PTR_T data;
+{
+ SHELL_VAR *var, *v;
+
+ var = (SHELL_VAR *)data;
+
+ if (tempvar_p (var) && (posixly_correct || (var->attributes & att_propagate)))
+ {
+ /* Make sure we have a hash table to store the variable in while it is
+ being propagated down to the global variables table. Create one if
+ we have to */
+ if ((vc_isfuncenv (shell_variables) || vc_istempenv (shell_variables)) && shell_variables->table == 0)
+ shell_variables->table = hash_create (0);
+ /* XXX - should we set v->context here? */
+ v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0, 0);
+ if (shell_variables == global_variables)
+ var->attributes &= ~(att_tempvar|att_propagate);
+ else
+ shell_variables->flags |= VC_HASTMPVAR;
+ v->attributes |= var->attributes;
+ }
+ else
+ stupidly_hack_special_variables (var->name); /* XXX */
+
+ dispose_variable (var);
+}
+
+/* Pop the top context off of VCXT and dispose of it, returning the rest of
+ the stack. */
+void
+pop_var_context ()
+{
+ VAR_CONTEXT *ret, *vcxt;
+
+ vcxt = shell_variables;
+ if (vc_isfuncenv (vcxt) == 0)
+ {
+ internal_error (_("pop_var_context: head of shell_variables not a function context"));
+ return;
+ }
+
+ if (ret = vcxt->down)
+ {
+ ret->up = (VAR_CONTEXT *)NULL;
+ shell_variables = ret;
+ if (vcxt->table)
+ hash_flush (vcxt->table, push_func_var);
+ dispose_var_context (vcxt);
+ }
+ else
+ internal_error (_("pop_var_context: no global_variables context"));
+}
+
+/* Delete the HASH_TABLEs for all variable contexts beginning at VCXT, and
+ all of the VAR_CONTEXTs except GLOBAL_VARIABLES. */
+void
+delete_all_contexts (vcxt)
+ VAR_CONTEXT *vcxt;
+{
+ VAR_CONTEXT *v, *t;
+
+ for (v = vcxt; v != global_variables; v = t)
+ {
+ t = v->down;
+ dispose_var_context (v);
+ }
+
+ delete_all_variables (global_variables->table);
+ shell_variables = global_variables;
+}
+
+/* **************************************************************** */
+/* */
+/* Pushing and Popping temporary variable scopes */
+/* */
+/* **************************************************************** */
+
+VAR_CONTEXT *
+push_scope (flags, tmpvars)
+ int flags;
+ HASH_TABLE *tmpvars;
+{
+ return (push_var_context ((char *)NULL, flags, tmpvars));
+}
+
+static void
+push_exported_var (data)
+ PTR_T data;
+{
+ SHELL_VAR *var, *v;
+
+ var = (SHELL_VAR *)data;
+
+ /* If a temp var had its export attribute set, or it's marked to be
+ propagated, bind it in the previous scope before disposing it. */
+ /* XXX - This isn't exactly right, because all tempenv variables have the
+ export attribute set. */
+#if 0
+ if (exported_p (var) || (var->attributes & att_propagate))
+#else
+ if (tempvar_p (var) && exported_p (var) && (var->attributes & att_propagate))
+#endif
+ {
+ var->attributes &= ~att_tempvar; /* XXX */
+ v = bind_variable_internal (var->name, value_cell (var), shell_variables->table, 0, 0);
+ if (shell_variables == global_variables)
+ var->attributes &= ~att_propagate;
+ v->attributes |= var->attributes;
+ }
+ else
+ stupidly_hack_special_variables (var->name); /* XXX */
+
+ dispose_variable (var);
+}
+
+void
+pop_scope (is_special)
+ int is_special;
+{
+ VAR_CONTEXT *vcxt, *ret;
+
+ vcxt = shell_variables;
+ if (vc_istempscope (vcxt) == 0)
+ {
+ internal_error (_("pop_scope: head of shell_variables not a temporary environment scope"));
+ return;
+ }
+
+ ret = vcxt->down;
+ if (ret)
+ ret->up = (VAR_CONTEXT *)NULL;
+
+ shell_variables = ret;
+
+ /* Now we can take care of merging variables in VCXT into set of scopes
+ whose head is RET (shell_variables). */
+ FREE (vcxt->name);
+ if (vcxt->table)
+ {
+ if (is_special)
+ hash_flush (vcxt->table, push_func_var);
+ else
+ hash_flush (vcxt->table, push_exported_var);
+ hash_dispose (vcxt->table);
+ }
+ free (vcxt);
+
+ sv_ifs ("IFS"); /* XXX here for now */
+}
+
+/* **************************************************************** */
+/* */
+/* Pushing and Popping function contexts */
+/* */
+/* **************************************************************** */
+
+static WORD_LIST **dollar_arg_stack = (WORD_LIST **)NULL;
+static int dollar_arg_stack_slots;
+static int dollar_arg_stack_index;
+
+/* XXX - we might want to consider pushing and popping the `getopts' state
+ when we modify the positional parameters. */
+void
+push_context (name, is_subshell, tempvars)
+ char *name; /* function name */
+ int is_subshell;
+ HASH_TABLE *tempvars;
+{
+ if (is_subshell == 0)
+ push_dollar_vars ();
+ variable_context++;
+ push_var_context (name, VC_FUNCENV, tempvars);
+}
+
+/* Only called when subshell == 0, so we don't need to check, and can
+ unconditionally pop the dollar vars off the stack. */
+void
+pop_context ()
+{
+ pop_dollar_vars ();
+ variable_context--;
+ pop_var_context ();
+
+ sv_ifs ("IFS"); /* XXX here for now */
+}
+
+/* Save the existing positional parameters on a stack. */
+void
+push_dollar_vars ()
+{
+ if (dollar_arg_stack_index + 2 > dollar_arg_stack_slots)
+ {
+ dollar_arg_stack = (WORD_LIST **)
+ xrealloc (dollar_arg_stack, (dollar_arg_stack_slots += 10)
+ * sizeof (WORD_LIST **));
+ }
+ dollar_arg_stack[dollar_arg_stack_index++] = list_rest_of_args ();
+ dollar_arg_stack[dollar_arg_stack_index] = (WORD_LIST *)NULL;
+}
+
+/* Restore the positional parameters from our stack. */
+void
+pop_dollar_vars ()
+{
+ if (!dollar_arg_stack || dollar_arg_stack_index == 0)
+ return;
+
+ remember_args (dollar_arg_stack[--dollar_arg_stack_index], 1);
+ dispose_words (dollar_arg_stack[dollar_arg_stack_index]);
+ dollar_arg_stack[dollar_arg_stack_index] = (WORD_LIST *)NULL;
+ set_dollar_vars_unchanged ();
+}
+
+void
+dispose_saved_dollar_vars ()
+{
+ if (!dollar_arg_stack || dollar_arg_stack_index == 0)
+ return;
+
+ dispose_words (dollar_arg_stack[dollar_arg_stack_index]);
+ dollar_arg_stack[dollar_arg_stack_index] = (WORD_LIST *)NULL;
+}
+
+/* Manipulate the special BASH_ARGV and BASH_ARGC variables. */
+
+void
+push_args (list)
+ WORD_LIST *list;
+{
+#if defined (ARRAY_VARS) && defined (DEBUGGER)
+ SHELL_VAR *bash_argv_v, *bash_argc_v;
+ ARRAY *bash_argv_a, *bash_argc_a;
+ WORD_LIST *l;
+ arrayind_t i;
+ char *t;
+
+ GET_ARRAY_FROM_VAR ("BASH_ARGV", bash_argv_v, bash_argv_a);
+ GET_ARRAY_FROM_VAR ("BASH_ARGC", bash_argc_v, bash_argc_a);
+
+ for (l = list, i = 0; l; l = l->next, i++)
+ array_push (bash_argv_a, l->word->word);
+
+ t = itos (i);
+ array_push (bash_argc_a, t);
+ free (t);
+#endif /* ARRAY_VARS && DEBUGGER */
+}
+
+/* Remove arguments from BASH_ARGV array. Pop top element off BASH_ARGC
+ array and use that value as the count of elements to remove from
+ BASH_ARGV. */
+void
+pop_args ()
+{
+#if defined (ARRAY_VARS) && defined (DEBUGGER)
+ SHELL_VAR *bash_argv_v, *bash_argc_v;
+ ARRAY *bash_argv_a, *bash_argc_a;
+ ARRAY_ELEMENT *ce;
+ intmax_t i;
+
+ GET_ARRAY_FROM_VAR ("BASH_ARGV", bash_argv_v, bash_argv_a);
+ GET_ARRAY_FROM_VAR ("BASH_ARGC", bash_argc_v, bash_argc_a);
+
+ ce = array_shift (bash_argc_a, 1, 0);
+ if (ce == 0 || legal_number (element_value (ce), &i) == 0)
+ i = 0;
+
+ for ( ; i > 0; i--)
+ array_pop (bash_argv_a);
+ array_dispose_element (ce);
+#endif /* ARRAY_VARS && DEBUGGER */
+}
+
+/*************************************************
+ * *
+ * Functions to manage special variables *
+ * *
+ *************************************************/
+
+/* Extern declarations for variables this code has to manage. */
+extern int eof_encountered, eof_encountered_limit, ignoreeof;
+
+#if defined (READLINE)
+extern int hostname_list_initialized;
+#endif
+
+/* An alist of name.function for each special variable. Most of the
+ functions don't do much, and in fact, this would be faster with a
+ switch statement, but by the end of this file, I am sick of switch
+ statements. */
+
+#define SET_INT_VAR(name, intvar) intvar = find_variable (name) != 0
+
+/* This table will be sorted with qsort() the first time it's accessed. */
+struct name_and_function {
+ char *name;
+ sh_sv_func_t *function;
+};
+
+static struct name_and_function special_vars[] = {
+ { "BASH_XTRACEFD", sv_xtracefd },
+
+#if defined (READLINE)
+# if defined (STRICT_POSIX)
+ { "COLUMNS", sv_winsize },
+# endif
+ { "COMP_WORDBREAKS", sv_comp_wordbreaks },
+#endif
+
+ { "GLOBIGNORE", sv_globignore },
+
+#if defined (HISTORY)
+ { "HISTCONTROL", sv_history_control },
+ { "HISTFILESIZE", sv_histsize },
+ { "HISTIGNORE", sv_histignore },
+ { "HISTSIZE", sv_histsize },
+ { "HISTTIMEFORMAT", sv_histtimefmt },
+#endif
+
+#if defined (__CYGWIN__)
+ { "HOME", sv_home },
+#endif
+
+#if defined (READLINE)
+ { "HOSTFILE", sv_hostfile },
+#endif
+
+ { "IFS", sv_ifs },
+ { "IGNOREEOF", sv_ignoreeof },
+
+ { "LANG", sv_locale },
+ { "LC_ALL", sv_locale },
+ { "LC_COLLATE", sv_locale },
+ { "LC_CTYPE", sv_locale },
+ { "LC_MESSAGES", sv_locale },
+ { "LC_NUMERIC", sv_locale },
+ { "LC_TIME", sv_locale },
+
+#if defined (READLINE) && defined (STRICT_POSIX)
+ { "LINES", sv_winsize },
+#endif
+
+ { "MAIL", sv_mail },
+ { "MAILCHECK", sv_mail },
+ { "MAILPATH", sv_mail },
+
+ { "OPTERR", sv_opterr },
+ { "OPTIND", sv_optind },
+
+ { "PATH", sv_path },
+ { "POSIXLY_CORRECT", sv_strict_posix },
+
+#if defined (READLINE)
+ { "TERM", sv_terminal },
+ { "TERMCAP", sv_terminal },
+ { "TERMINFO", sv_terminal },
+#endif /* READLINE */
+
+ { "TEXTDOMAIN", sv_locale },
+ { "TEXTDOMAINDIR", sv_locale },
+
+#if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE)
+ { "TZ", sv_tz },
+#endif
+
+#if defined (HISTORY) && defined (BANG_HISTORY)
+ { "histchars", sv_histchars },
+#endif /* HISTORY && BANG_HISTORY */
+
+ { "ignoreeof", sv_ignoreeof },
+
+ { (char *)0, (sh_sv_func_t *)0 }
+};
+
+#define N_SPECIAL_VARS (sizeof (special_vars) / sizeof (special_vars[0]) - 1)
+
+static int
+sv_compare (sv1, sv2)
+ struct name_and_function *sv1, *sv2;
+{
+ int r;
+
+ if ((r = sv1->name[0] - sv2->name[0]) == 0)
+ r = strcmp (sv1->name, sv2->name);
+ return r;
+}
+
+static inline int
+find_special_var (name)
+ const char *name;
+{
+ register int i, r;
+
+ for (i = 0; special_vars[i].name; i++)
+ {
+ r = special_vars[i].name[0] - name[0];
+ if (r == 0)
+ r = strcmp (special_vars[i].name, name);
+ if (r == 0)
+ return i;
+ else if (r > 0)
+ /* Can't match any of rest of elements in sorted list. Take this out
+ if it causes problems in certain environments. */
+ break;
+ }
+ return -1;
+}
+
+/* The variable in NAME has just had its state changed. Check to see if it
+ is one of the special ones where something special happens. */
+void
+stupidly_hack_special_variables (name)
+ char *name;
+{
+ static int sv_sorted = 0;
+ int i;
+
+ if (sv_sorted == 0) /* shouldn't need, but it's fairly cheap. */
+ {
+ qsort (special_vars, N_SPECIAL_VARS, sizeof (special_vars[0]),
+ (QSFUNC *)sv_compare);
+ sv_sorted = 1;
+ }
+
+ i = find_special_var (name);
+ if (i != -1)
+ (*(special_vars[i].function)) (name);
+}
+
+/* Special variables that need hooks to be run when they are unset as part
+ of shell reinitialization should have their sv_ functions run here. */
+void
+reinit_special_variables ()
+{
+#if defined (READLINE)
+ sv_comp_wordbreaks ("COMP_WORDBREAKS");
+#endif
+ sv_globignore ("GLOBIGNORE");
+ sv_opterr ("OPTERR");
+}
+
+void
+sv_ifs (name)
+ char *name;
+{
+ SHELL_VAR *v;
+
+ v = find_variable ("IFS");
+ setifs (v);
+}
+
+/* What to do just after the PATH variable has changed. */
+void
+sv_path (name)
+ char *name;
+{
+ /* hash -r */
+ phash_flush ();
+}
+
+/* What to do just after one of the MAILxxxx variables has changed. NAME
+ is the name of the variable. This is called with NAME set to one of
+ MAIL, MAILCHECK, or MAILPATH. */
+void
+sv_mail (name)
+ char *name;
+{
+ /* If the time interval for checking the files has changed, then
+ reset the mail timer. Otherwise, one of the pathname vars
+ to the users mailbox has changed, so rebuild the array of
+ filenames. */
+ if (name[4] == 'C') /* if (strcmp (name, "MAILCHECK") == 0) */
+ reset_mail_timer ();
+ else
+ {
+ free_mail_files ();
+ remember_mail_dates ();
+ }
+}
+
+/* What to do when GLOBIGNORE changes. */
+void
+sv_globignore (name)
+ char *name;
+{
+ if (privileged_mode == 0)
+ setup_glob_ignore (name);
+}
+
+#if defined (READLINE)
+void
+sv_comp_wordbreaks (name)
+ char *name;
+{
+ SHELL_VAR *sv;
+
+ sv = find_variable (name);
+ if (sv == 0)
+ reset_completer_word_break_chars ();
+}
+
+/* What to do just after one of the TERMxxx variables has changed.
+ If we are an interactive shell, then try to reset the terminal
+ information in readline. */
+void
+sv_terminal (name)
+ char *name;
+{
+ if (interactive_shell && no_line_editing == 0)
+ rl_reset_terminal (get_string_value ("TERM"));
+}
+
+void
+sv_hostfile (name)
+ char *name;
+{
+ SHELL_VAR *v;
+
+ v = find_variable (name);
+ if (v == 0)
+ clear_hostname_list ();
+ else
+ hostname_list_initialized = 0;
+}
+
+#if defined (STRICT_POSIX)
+/* In strict posix mode, we allow assignments to LINES and COLUMNS (and values
+ found in the initial environment) to override the terminal size reported by
+ the kernel. */
+void
+sv_winsize (name)
+ char *name;
+{
+ SHELL_VAR *v;
+ intmax_t xd;
+ int d;
+
+ if (posixly_correct == 0 || interactive_shell == 0 || no_line_editing)
+ return;
+
+ v = find_variable (name);
+ if (v == 0 || var_isnull (v))
+ rl_reset_screen_size ();
+ else
+ {
+ if (legal_number (value_cell (v), &xd) == 0)
+ return;
+ winsize_assignment = winsize_assigned = 1;
+ d = xd; /* truncate */
+ if (name[0] == 'L') /* LINES */
+ rl_set_screen_size (d, -1);
+ else /* COLUMNS */
+ rl_set_screen_size (-1, d);
+ winsize_assignment = 0;
+ }
+}
+#endif /* STRICT_POSIX */
+#endif /* READLINE */
+
+/* Update the value of HOME in the export environment so tilde expansion will
+ work on cygwin. */
+#if defined (__CYGWIN__)
+sv_home (name)
+ char *name;
+{
+ array_needs_making = 1;
+ maybe_make_export_env ();
+}
+#endif
+
+#if defined (HISTORY)
+/* What to do after the HISTSIZE or HISTFILESIZE variables change.
+ If there is a value for this HISTSIZE (and it is numeric), then stifle
+ the history. Otherwise, if there is NO value for this variable,
+ unstifle the history. If name is HISTFILESIZE, and its value is
+ numeric, truncate the history file to hold no more than that many
+ lines. */
+void
+sv_histsize (name)
+ char *name;
+{
+ char *temp;
+ intmax_t num;
+ int hmax;
+
+ temp = get_string_value (name);
+
+ if (temp && *temp)
+ {
+ if (legal_number (temp, &num))
+ {
+ hmax = num;
+ if (name[4] == 'S')
+ {
+ stifle_history (hmax);
+ hmax = where_history ();
+ if (history_lines_this_session > hmax)
+ history_lines_this_session = hmax;
+ }
+ else
+ {
+ history_truncate_file (get_string_value ("HISTFILE"), hmax);
+ if (hmax <= history_lines_in_file)
+ history_lines_in_file = hmax;
+ }
+ }
+ }
+ else if (name[4] == 'S')
+ unstifle_history ();
+}
+
+/* What to do after the HISTIGNORE variable changes. */
+void
+sv_histignore (name)
+ char *name;
+{
+ setup_history_ignore (name);
+}
+
+/* What to do after the HISTCONTROL variable changes. */
+void
+sv_history_control (name)
+ char *name;
+{
+ char *temp;
+ char *val;
+ int tptr;
+
+ history_control = 0;
+ temp = get_string_value (name);
+
+ if (temp == 0 || *temp == 0)
+ return;
+
+ tptr = 0;
+ while (val = extract_colon_unit (temp, &tptr))
+ {
+ if (STREQ (val, "ignorespace"))
+ history_control |= HC_IGNSPACE;
+ else if (STREQ (val, "ignoredups"))
+ history_control |= HC_IGNDUPS;
+ else if (STREQ (val, "ignoreboth"))
+ history_control |= HC_IGNBOTH;
+ else if (STREQ (val, "erasedups"))
+ history_control |= HC_ERASEDUPS;
+
+ free (val);
+ }
+}
+
+#if defined (BANG_HISTORY)
+/* Setting/unsetting of the history expansion character. */
+void
+sv_histchars (name)
+ char *name;
+{
+ char *temp;
+
+ temp = get_string_value (name);
+ if (temp)
+ {
+ history_expansion_char = *temp;
+ if (temp[0] && temp[1])
+ {
+ history_subst_char = temp[1];
+ if (temp[2])
+ history_comment_char = temp[2];
+ }
+ }
+ else
+ {
+ history_expansion_char = '!';
+ history_subst_char = '^';
+ history_comment_char = '#';
+ }
+}
+#endif /* BANG_HISTORY */
+
+void
+sv_histtimefmt (name)
+ char *name;
+{
+ SHELL_VAR *v;
+
+ v = find_variable (name);
+ history_write_timestamps = (v != 0);
+}
+#endif /* HISTORY */
+
+#if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE)
+void
+sv_tz (name)
+ char *name;
+{
+ tzset ();
+}
+#endif
+
+/* If the variable exists, then the value of it can be the number
+ of times we actually ignore the EOF. The default is small,
+ (smaller than csh, anyway). */
+void
+sv_ignoreeof (name)
+ char *name;
+{
+ SHELL_VAR *tmp_var;
+ char *temp;
+
+ eof_encountered = 0;
+
+ tmp_var = find_variable (name);
+ ignoreeof = tmp_var != 0;
+ temp = tmp_var ? value_cell (tmp_var) : (char *)NULL;
+ if (temp)
+ eof_encountered_limit = (*temp && all_digits (temp)) ? atoi (temp) : 10;
+ set_shellopts (); /* make sure `ignoreeof' is/is not in $SHELLOPTS */
+}
+
+void
+sv_optind (name)
+ char *name;
+{
+ char *tt;
+ int s;
+
+ tt = get_string_value ("OPTIND");
+ if (tt && *tt)
+ {
+ s = atoi (tt);
+
+ /* According to POSIX, setting OPTIND=1 resets the internal state
+ of getopt (). */
+ if (s < 0 || s == 1)
+ s = 0;
+ }
+ else
+ s = 0;
+ getopts_reset (s);
+}
+
+void
+sv_opterr (name)
+ char *name;
+{
+ char *tt;
+
+ tt = get_string_value ("OPTERR");
+ sh_opterr = (tt && *tt) ? atoi (tt) : 1;
+}
+
+void
+sv_strict_posix (name)
+ char *name;
+{
+ SET_INT_VAR (name, posixly_correct);
+ posix_initialize (posixly_correct);
+#if defined (READLINE)
+ if (interactive_shell)
+ posix_readline_initialize (posixly_correct);
+#endif /* READLINE */
+ set_shellopts (); /* make sure `posix' is/is not in $SHELLOPTS */
+}
+
+void
+sv_locale (name)
+ char *name;
+{
+ char *v;
+
+ v = get_string_value (name);
+ if (name[0] == 'L' && name[1] == 'A') /* LANG */
+ set_lang (name, v);
+ else
+ set_locale_var (name, v); /* LC_*, TEXTDOMAIN* */
+}
+
+#if defined (ARRAY_VARS)
+void
+set_pipestatus_array (ps, nproc)
+ int *ps;
+ int nproc;
+{
+ SHELL_VAR *v;
+ ARRAY *a;
+ ARRAY_ELEMENT *ae;
+ register int i;
+ char *t, tbuf[INT_STRLEN_BOUND(int) + 1];
+
+ v = find_variable ("PIPESTATUS");
+ if (v == 0)
+ v = make_new_array_variable ("PIPESTATUS");
+ if (array_p (v) == 0)
+ return; /* Do nothing if not an array variable. */
+ a = array_cell (v);
+
+ if (a == 0 || array_num_elements (a) == 0)
+ {
+ for (i = 0; i < nproc; i++) /* was ps[i] != -1, not i < nproc */
+ {
+ t = inttostr (ps[i], tbuf, sizeof (tbuf));
+ array_insert (a, i, t);
+ }
+ return;
+ }
+
+ /* Fast case */
+ if (array_num_elements (a) == nproc && nproc == 1)
+ {
+ ae = element_forw (a->head);
+ free (element_value (ae));
+ ae->value = itos (ps[0]);
+ }
+ else if (array_num_elements (a) <= nproc)
+ {
+ /* modify in array_num_elements members in place, then add */
+ ae = a->head;
+ for (i = 0; i < array_num_elements (a); i++)
+ {
+ ae = element_forw (ae);
+ free (element_value (ae));
+ ae->value = itos (ps[i]);
+ }
+ /* add any more */
+ for ( ; i < nproc; i++)
+ {
+ t = inttostr (ps[i], tbuf, sizeof (tbuf));
+ array_insert (a, i, t);
+ }
+ }
+ else
+ {
+ /* deleting elements. it's faster to rebuild the array. */
+ array_flush (a);
+ for (i = 0; ps[i] != -1; i++)
+ {
+ t = inttostr (ps[i], tbuf, sizeof (tbuf));
+ array_insert (a, i, t);
+ }
+ }
+}
+#endif
+
+void
+set_pipestatus_from_exit (s)
+ int s;
+{
+#if defined (ARRAY_VARS)
+ static int v[2] = { 0, -1 };
+
+ v[0] = s;
+ set_pipestatus_array (v, 1);
+#endif
+}
+
+void
+sv_xtracefd (name)
+ char *name;
+{
+ SHELL_VAR *v;
+ char *t, *e;
+ int fd;
+ FILE *fp;
+
+ v = find_variable (name);
+ if (v == 0)
+ {
+ xtrace_reset ();
+ return;
+ }
+
+ t = value_cell (v);
+ if (t == 0 || *t == 0)
+ xtrace_reset ();
+ else
+ {
+ fd = (int)strtol (t, &e, 10);
+ if (e != t && *e == '\0' && sh_validfd (fd))
+ {
+ fp = fdopen (fd, "w");
+ if (fp == 0)
+ internal_error (_("%s: %s: cannot open as FILE"), name, value_cell (v));
+ else
+ xtrace_set (fd, fp);
+ }
+ else
+ internal_error (_("%s: %s: invalid value for trace file descriptor"), name, value_cell (v));
+ }
+}
diff --git a/variables.h b/variables.h
new file mode 100644
index 0000000..ec1bfdc
--- /dev/null
+++ b/variables.h
@@ -0,0 +1,386 @@
+/* variables.h -- data structures for shell variables. */
+
+/* Copyright (C) 1987-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_VARIABLES_H_)
+#define _VARIABLES_H_
+
+#include "stdc.h"
+#include "array.h"
+#include "assoc.h"
+
+/* Shell variables and functions are stored in hash tables. */
+#include "hashlib.h"
+
+#include "conftypes.h"
+
+/* A variable context. */
+typedef struct var_context {
+ char *name; /* empty or NULL means global context */
+ int scope; /* 0 means global context */
+ int flags;
+ struct var_context *up; /* previous function calls */
+ struct var_context *down; /* down towards global context */
+ HASH_TABLE *table; /* variables at this scope */
+} VAR_CONTEXT;
+
+/* Flags for var_context->flags */
+#define VC_HASLOCAL 0x01
+#define VC_HASTMPVAR 0x02
+#define VC_FUNCENV 0x04 /* also function if name != NULL */
+#define VC_BLTNENV 0x08 /* builtin_env */
+#define VC_TEMPENV 0x10 /* temporary_env */
+
+#define VC_TEMPFLAGS (VC_FUNCENV|VC_BLTNENV|VC_TEMPENV)
+
+/* Accessing macros */
+#define vc_isfuncenv(vc) (((vc)->flags & VC_FUNCENV) != 0)
+#define vc_isbltnenv(vc) (((vc)->flags & VC_BLTNENV) != 0)
+#define vc_istempenv(vc) (((vc)->flags & (VC_TEMPFLAGS)) == VC_TEMPENV)
+
+#define vc_istempscope(vc) (((vc)->flags & (VC_TEMPENV|VC_BLTNENV)) != 0)
+
+#define vc_haslocals(vc) (((vc)->flags & VC_HASLOCAL) != 0)
+#define vc_hastmpvars(vc) (((vc)->flags & VC_HASTMPVAR) != 0)
+
+/* What a shell variable looks like. */
+
+typedef struct variable *sh_var_value_func_t __P((struct variable *));
+typedef struct variable *sh_var_assign_func_t __P((struct variable *, char *, arrayind_t, char *));
+
+/* For the future */
+union _value {
+ char *s; /* string value */
+ intmax_t i; /* int value */
+ COMMAND *f; /* function */
+ ARRAY *a; /* array */
+ HASH_TABLE *h; /* associative array */
+ double d; /* floating point number */
+#if defined (HAVE_LONG_DOUBLE)
+ long double ld; /* long double */
+#endif
+ struct variable *v; /* possible indirect variable use */
+ void *opaque; /* opaque data for future use */
+};
+
+typedef struct variable {
+ char *name; /* Symbol that the user types. */
+ char *value; /* Value that is returned. */
+ char *exportstr; /* String for the environment. */
+ sh_var_value_func_t *dynamic_value; /* Function called to return a `dynamic'
+ value for a variable, like $SECONDS
+ or $RANDOM. */
+ sh_var_assign_func_t *assign_func; /* Function called when this `special
+ variable' is assigned a value in
+ bind_variable. */
+ int attributes; /* export, readonly, array, invisible... */
+ int context; /* Which context this variable belongs to. */
+} SHELL_VAR;
+
+typedef struct _vlist {
+ SHELL_VAR **list;
+ int list_size; /* allocated size */
+ int list_len; /* current number of entries */
+} VARLIST;
+
+/* The various attributes that a given variable can have. */
+/* First, the user-visible attributes */
+#define att_exported 0x0000001 /* export to environment */
+#define att_readonly 0x0000002 /* cannot change */
+#define att_array 0x0000004 /* value is an array */
+#define att_function 0x0000008 /* value is a function */
+#define att_integer 0x0000010 /* internal representation is int */
+#define att_local 0x0000020 /* variable is local to a function */
+#define att_assoc 0x0000040 /* variable is an associative array */
+#define att_trace 0x0000080 /* function is traced with DEBUG trap */
+#define att_uppercase 0x0000100 /* word converted to uppercase on assignment */
+#define att_lowercase 0x0000200 /* word converted to lowercase on assignment */
+#define att_capcase 0x0000400 /* word capitalized on assignment */
+
+#define user_attrs (att_exported|att_readonly|att_integer|att_local|att_trace|att_uppercase|att_lowercase|att_capcase)
+
+#define attmask_user 0x0000fff
+
+/* Internal attributes used for bookkeeping */
+#define att_invisible 0x0001000 /* cannot see */
+#define att_nounset 0x0002000 /* cannot unset */
+#define att_noassign 0x0004000 /* assignment not allowed */
+#define att_imported 0x0008000 /* came from environment */
+#define att_special 0x0010000 /* requires special handling */
+#define att_nofree 0x0020000 /* do not free value on unset */
+
+#define attmask_int 0x00ff000
+
+/* Internal attributes used for variable scoping. */
+#define att_tempvar 0x0100000 /* variable came from the temp environment */
+#define att_propagate 0x0200000 /* propagate to previous scope */
+
+#define attmask_scope 0x0f00000
+
+#define exported_p(var) ((((var)->attributes) & (att_exported)))
+#define readonly_p(var) ((((var)->attributes) & (att_readonly)))
+#define array_p(var) ((((var)->attributes) & (att_array)))
+#define function_p(var) ((((var)->attributes) & (att_function)))
+#define integer_p(var) ((((var)->attributes) & (att_integer)))
+#define local_p(var) ((((var)->attributes) & (att_local)))
+#define assoc_p(var) ((((var)->attributes) & (att_assoc)))
+#define trace_p(var) ((((var)->attributes) & (att_trace)))
+#define uppercase_p(var) ((((var)->attributes) & (att_uppercase)))
+#define lowercase_p(var) ((((var)->attributes) & (att_lowercase)))
+#define capcase_p(var) ((((var)->attributes) & (att_capcase)))
+
+#define invisible_p(var) ((((var)->attributes) & (att_invisible)))
+#define non_unsettable_p(var) ((((var)->attributes) & (att_nounset)))
+#define noassign_p(var) ((((var)->attributes) & (att_noassign)))
+#define imported_p(var) ((((var)->attributes) & (att_imported)))
+#define specialvar_p(var) ((((var)->attributes) & (att_special)))
+#define nofree_p(var) ((((var)->attributes) & (att_nofree)))
+
+#define tempvar_p(var) ((((var)->attributes) & (att_tempvar)))
+
+/* Acessing variable values: rvalues */
+#define value_cell(var) ((var)->value)
+#define function_cell(var) (COMMAND *)((var)->value)
+#define array_cell(var) (ARRAY *)((var)->value)
+#define assoc_cell(var) (HASH_TABLE *)((var)->value)
+
+#define var_isnull(var) ((var)->value == 0)
+#define var_isset(var) ((var)->value != 0)
+
+/* Assigning variable values: lvalues */
+#define var_setvalue(var, str) ((var)->value = (str))
+#define var_setfunc(var, func) ((var)->value = (char *)(func))
+#define var_setarray(var, arr) ((var)->value = (char *)(arr))
+#define var_setassoc(var, arr) ((var)->value = (char *)(arr))
+
+/* Make VAR be auto-exported. */
+#define set_auto_export(var) \
+ do { (var)->attributes |= att_exported; array_needs_making = 1; } while (0)
+
+#define SETVARATTR(var, attr, undo) \
+ ((undo == 0) ? ((var)->attributes |= (attr)) \
+ : ((var)->attributes &= ~(attr)))
+
+#define VSETATTR(var, attr) ((var)->attributes |= (attr))
+#define VUNSETATTR(var, attr) ((var)->attributes &= ~(attr))
+
+#define VGETFLAGS(var) ((var)->attributes)
+
+#define VSETFLAGS(var, flags) ((var)->attributes = (flags))
+#define VCLRFLAGS(var) ((var)->attributes = 0)
+
+/* Macros to perform various operations on `exportstr' member of a SHELL_VAR. */
+#define CLEAR_EXPORTSTR(var) (var)->exportstr = (char *)NULL
+#define COPY_EXPORTSTR(var) ((var)->exportstr) ? savestring ((var)->exportstr) : (char *)NULL
+#define SET_EXPORTSTR(var, value) (var)->exportstr = (value)
+#define SAVE_EXPORTSTR(var, value) (var)->exportstr = (value) ? savestring (value) : (char *)NULL
+
+#define FREE_EXPORTSTR(var) \
+ do { if ((var)->exportstr) free ((var)->exportstr); } while (0)
+
+#define CACHE_IMPORTSTR(var, value) \
+ (var)->exportstr = savestring (value)
+
+#define INVALIDATE_EXPORTSTR(var) \
+ do { \
+ if ((var)->exportstr) \
+ { \
+ free ((var)->exportstr); \
+ (var)->exportstr = (char *)NULL; \
+ } \
+ } while (0)
+
+/* Stuff for hacking variables. */
+typedef int sh_var_map_func_t __P((SHELL_VAR *));
+
+/* Where we keep the variables and functions */
+extern VAR_CONTEXT *global_variables;
+extern VAR_CONTEXT *shell_variables;
+
+extern HASH_TABLE *shell_functions;
+extern HASH_TABLE *temporary_env;
+
+extern int variable_context;
+extern char *dollar_vars[];
+extern char **export_env;
+
+extern void initialize_shell_variables __P((char **, int));
+extern SHELL_VAR *set_if_not __P((char *, char *));
+
+extern void sh_set_lines_and_columns __P((int, int));
+extern void set_pwd __P((void));
+extern void set_ppid __P((void));
+extern void make_funcname_visible __P((int));
+
+extern SHELL_VAR *var_lookup __P((const char *, VAR_CONTEXT *));
+
+extern SHELL_VAR *find_function __P((const char *));
+extern FUNCTION_DEF *find_function_def __P((const char *));
+extern SHELL_VAR *find_variable __P((const char *));
+extern SHELL_VAR *find_variable_internal __P((const char *, int));
+extern SHELL_VAR *find_tempenv_variable __P((const char *));
+extern SHELL_VAR *copy_variable __P((SHELL_VAR *));
+extern SHELL_VAR *make_local_variable __P((const char *));
+extern SHELL_VAR *bind_variable __P((const char *, char *, int));
+extern SHELL_VAR *bind_function __P((const char *, COMMAND *));
+
+extern void bind_function_def __P((const char *, FUNCTION_DEF *));
+
+extern SHELL_VAR **map_over __P((sh_var_map_func_t *, VAR_CONTEXT *));
+SHELL_VAR **map_over_funcs __P((sh_var_map_func_t *));
+
+extern SHELL_VAR **all_shell_variables __P((void));
+extern SHELL_VAR **all_shell_functions __P((void));
+extern SHELL_VAR **all_visible_variables __P((void));
+extern SHELL_VAR **all_visible_functions __P((void));
+extern SHELL_VAR **all_exported_variables __P((void));
+extern SHELL_VAR **local_exported_variables __P((void));
+extern SHELL_VAR **all_local_variables __P((void));
+#if defined (ARRAY_VARS)
+extern SHELL_VAR **all_array_variables __P((void));
+#endif
+extern char **all_variables_matching_prefix __P((const char *));
+
+extern char **make_var_array __P((HASH_TABLE *));
+extern char **add_or_supercede_exported_var __P((char *, int));
+
+extern char *get_variable_value __P((SHELL_VAR *));
+extern char *get_string_value __P((const char *));
+extern char *sh_get_env_value __P((const char *));
+extern char *make_variable_value __P((SHELL_VAR *, char *, int));
+
+extern SHELL_VAR *bind_variable_value __P((SHELL_VAR *, char *, int));
+extern SHELL_VAR *bind_int_variable __P((char *, char *));
+extern SHELL_VAR *bind_var_to_int __P((char *, intmax_t));
+
+extern int assign_in_env __P((WORD_DESC *));
+
+extern int unbind_variable __P((const char *));
+extern int unbind_func __P((const char *));
+extern int unbind_function_def __P((const char *));
+extern int makunbound __P((const char *, VAR_CONTEXT *));
+extern int kill_local_variable __P((const char *));
+extern void delete_all_variables __P((HASH_TABLE *));
+extern void delete_all_contexts __P((VAR_CONTEXT *));
+
+extern VAR_CONTEXT *new_var_context __P((char *, int));
+extern void dispose_var_context __P((VAR_CONTEXT *));
+extern VAR_CONTEXT *push_var_context __P((char *, int, HASH_TABLE *));
+extern void pop_var_context __P((void));
+extern VAR_CONTEXT *push_scope __P((int, HASH_TABLE *));
+extern void pop_scope __P((int));
+
+extern void push_context __P((char *, int, HASH_TABLE *));
+extern void pop_context __P((void));
+extern void push_dollar_vars __P((void));
+extern void pop_dollar_vars __P((void));
+extern void dispose_saved_dollar_vars __P((void));
+
+extern void push_args __P((WORD_LIST *));
+extern void pop_args __P((void));
+
+extern void adjust_shell_level __P((int));
+extern void non_unsettable __P((char *));
+extern void dispose_variable __P((SHELL_VAR *));
+extern void dispose_used_env_vars __P((void));
+extern void dispose_function_env __P((void));
+extern void dispose_builtin_env __P((void));
+extern void merge_temporary_env __P((void));
+extern void merge_builtin_env __P((void));
+extern void kill_all_local_variables __P((void));
+
+extern void set_var_read_only __P((char *));
+extern void set_func_read_only __P((const char *));
+extern void set_var_auto_export __P((char *));
+extern void set_func_auto_export __P((const char *));
+
+extern void sort_variables __P((SHELL_VAR **));
+
+extern void maybe_make_export_env __P((void));
+extern void update_export_env_inplace __P((char *, int, char *));
+extern void put_command_name_into_env __P((char *));
+extern void put_gnu_argv_flags_into_env __P((intmax_t, char *));
+
+extern void print_var_list __P((SHELL_VAR **));
+extern void print_func_list __P((SHELL_VAR **));
+extern void print_assignment __P((SHELL_VAR *));
+extern void print_var_value __P((SHELL_VAR *, int));
+extern void print_var_function __P((SHELL_VAR *));
+
+#if defined (ARRAY_VARS)
+extern SHELL_VAR *make_new_array_variable __P((char *));
+extern SHELL_VAR *make_local_array_variable __P((char *));
+
+extern SHELL_VAR *make_new_assoc_variable __P((char *));
+extern SHELL_VAR *make_local_assoc_variable __P((char *));
+
+extern void set_pipestatus_array __P((int *, int));
+#endif
+
+extern void set_pipestatus_from_exit __P((int));
+
+/* The variable in NAME has just had its state changed. Check to see if it
+ is one of the special ones where something special happens. */
+extern void stupidly_hack_special_variables __P((char *));
+
+/* Reinitialize some special variables that have external effects upon unset
+ when the shell reinitializes itself. */
+extern void reinit_special_variables __P((void));
+
+extern int get_random_number __P((void));
+
+/* The `special variable' functions that get called when a particular
+ variable is set. */
+extern void sv_ifs __P((char *));
+extern void sv_path __P((char *));
+extern void sv_mail __P((char *));
+extern void sv_globignore __P((char *));
+extern void sv_ignoreeof __P((char *));
+extern void sv_strict_posix __P((char *));
+extern void sv_optind __P((char *));
+extern void sv_opterr __P((char *));
+extern void sv_locale __P((char *));
+extern void sv_xtracefd __P((char *));
+
+#if defined (READLINE)
+extern void sv_comp_wordbreaks __P((char *));
+extern void sv_terminal __P((char *));
+extern void sv_hostfile __P((char *));
+extern void sv_winsize __P((char *));
+#endif
+
+#if defined (__CYGWIN__)
+extern void sv_home __P((char *));
+#endif
+
+#if defined (HISTORY)
+extern void sv_histsize __P((char *));
+extern void sv_histignore __P((char *));
+extern void sv_history_control __P((char *));
+# if defined (BANG_HISTORY)
+extern void sv_histchars __P((char *));
+# endif
+extern void sv_histtimefmt __P((char *));
+#endif /* HISTORY */
+
+#if defined (HAVE_TZSET) && defined (PROMPT_STRING_DECODE)
+extern void sv_tz __P((char *));
+#endif
+
+#endif /* !_VARIABLES_H_ */
diff --git a/version.c b/version.c
new file mode 100644
index 0000000..b97fa06
--- /dev/null
+++ b/version.c
@@ -0,0 +1,94 @@
+/* version.c -- distribution and version numbers. */
+
+/* Copyright (C) 1989-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "stdc.h"
+
+#include "version.h"
+#include "patchlevel.h"
+#include "conftypes.h"
+
+#include "bashintl.h"
+
+extern char *shell_name;
+
+/* Defines from version.h */
+const char * const dist_version = DISTVERSION;
+const int patch_level = PATCHLEVEL;
+const int build_version = BUILDVERSION;
+#ifdef RELSTATUS
+const char * const release_status = RELSTATUS;
+#else
+const char * const release_status = (char *)0;
+#endif
+const char * const sccs_version = SCCSVERSION;
+
+const char * const bash_copyright = N_("Copyright (C) 2009 Free Software Foundation, Inc.");
+const char * const bash_license = N_("License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>\n");
+
+/* If == 31, shell compatible with bash-3.1, == 32 with bash-3.2, and so on */
+int shell_compatibility_level = DEFAULT_COMPAT_LEVEL;
+
+/* Functions for getting, setting, and displaying the shell version. */
+
+/* Forward declarations so we don't have to include externs.h */
+extern char *shell_version_string __P((void));
+extern void show_shell_version __P((int));
+
+/* Give version information about this shell. */
+char *
+shell_version_string ()
+{
+ static char tt[32] = { '\0' };
+
+ if (tt[0] == '\0')
+ {
+ if (release_status)
+#if defined (HAVE_SNPRINTF)
+ snprintf (tt, sizeof (tt), "%s.%d(%d)-%s", dist_version, patch_level, build_version, release_status);
+#else
+ sprintf (tt, "%s.%d(%d)-%s", dist_version, patch_level, build_version, release_status);
+#endif
+ else
+#if defined (HAVE_SNPRINTF)
+ snprintf (tt, sizeof (tt), "%s.%d(%d)", dist_version, patch_level, build_version);
+#else
+ sprintf (tt, "%s.%d(%d)", dist_version, patch_level, build_version);
+#endif
+ }
+ return tt;
+}
+
+void
+show_shell_version (extended)
+ int extended;
+{
+ printf (_("GNU bash, version %s (%s)\n"), shell_version_string (), MACHTYPE);
+ if (extended)
+ {
+ printf ("%s\n", _(bash_copyright));
+ printf ("%s\n", _(bash_license));
+ printf (_("This is free software; you are free to change and redistribute it.\n"));
+ printf (_("There is NO WARRANTY, to the extent permitted by law.\n"));
+ }
+}
diff --git a/xmalloc.c b/xmalloc.c
new file mode 100644
index 0000000..2344d2d
--- /dev/null
+++ b/xmalloc.c
@@ -0,0 +1,223 @@
+/* xmalloc.c -- safe versions of malloc and realloc */
+
+/* Copyright (C) 1991-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the GNU Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if defined (HAVE_CONFIG_H)
+#include <config.h>
+#endif
+
+#include "bashtypes.h"
+#include <stdio.h>
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#if defined (HAVE_STDLIB_H)
+# include <stdlib.h>
+#else
+# include "ansi_stdlib.h"
+#endif /* HAVE_STDLIB_H */
+
+#include "error.h"
+
+#include "bashintl.h"
+
+#if !defined (PTR_T)
+# if defined (__STDC__)
+# define PTR_T void *
+# else
+# define PTR_T char *
+# endif /* !__STDC__ */
+#endif /* !PTR_T */
+
+#if defined (HAVE_SBRK) && !HAVE_DECL_SBRK
+extern char *sbrk();
+#endif
+
+static PTR_T lbreak;
+static int brkfound;
+static size_t allocated;
+
+/* **************************************************************** */
+/* */
+/* Memory Allocation and Deallocation. */
+/* */
+/* **************************************************************** */
+
+#if defined (HAVE_SBRK)
+#define FINDBRK() \
+do { \
+ if (brkfound == 0) \
+ { \
+ lbreak = (PTR_T)sbrk (0); \
+ brkfound++; \
+ } \
+} while (0)
+
+static size_t
+findbrk ()
+{
+ FINDBRK();
+ return (char *)sbrk (0) - (char *)lbreak;
+}
+#else
+#define FINDBRK()
+#endif
+
+static void
+allocerr (func, bytes)
+ const char *func;
+ size_t bytes;
+{
+#if defined (HAVE_SBRK)
+ allocated = findbrk ();
+ fatal_error (_("%s: cannot allocate %lu bytes (%lu bytes allocated)"), func, (unsigned long)bytes, (unsigned long)allocated);
+#else
+ fatal_error (_("%s: cannot allocate %lu bytes"), func, (unsigned long)bytes);
+#endif /* !HAVE_SBRK */
+}
+
+/* Return a pointer to free()able block of memory large enough
+ to hold BYTES number of bytes. If the memory cannot be allocated,
+ print an error message and abort. */
+PTR_T
+xmalloc (bytes)
+ size_t bytes;
+{
+ PTR_T temp;
+
+#if defined (DEBUG)
+ if (bytes == 0)
+ internal_warning("xmalloc: size argument is 0");
+#endif
+
+ FINDBRK();
+ temp = malloc (bytes);
+
+ if (temp == 0)
+ allocerr ("xmalloc", bytes);
+
+ return (temp);
+}
+
+PTR_T
+xrealloc (pointer, bytes)
+ PTR_T pointer;
+ size_t bytes;
+{
+ PTR_T temp;
+
+#if defined (DEBUG)
+ if (bytes == 0)
+ internal_warning("xrealloc: size argument is 0");
+#endif
+
+ FINDBRK();
+ temp = pointer ? realloc (pointer, bytes) : malloc (bytes);
+
+ if (temp == 0)
+ allocerr ("xrealloc", bytes);
+
+ return (temp);
+}
+
+/* Use this as the function to call when adding unwind protects so we
+ don't need to know what free() returns. */
+void
+xfree (string)
+ PTR_T string;
+{
+ if (string)
+ free (string);
+}
+
+#ifdef USING_BASH_MALLOC
+#include <malloc/shmalloc.h>
+
+static void
+sh_allocerr (func, bytes, file, line)
+ const char *func;
+ size_t bytes;
+ char *file;
+ int line;
+{
+#if defined (HAVE_SBRK)
+ allocated = findbrk ();
+ fatal_error (_("%s: %s:%d: cannot allocate %lu bytes (%lu bytes allocated)"), func, file, line, (unsigned long)bytes, (unsigned long)allocated);
+#else
+ fatal_error (_("%s: %s:%d: cannot allocate %lu bytes"), func, file, line, (unsigned long)bytes);
+#endif /* !HAVE_SBRK */
+}
+
+PTR_T
+sh_xmalloc (bytes, file, line)
+ size_t bytes;
+ char *file;
+ int line;
+{
+ PTR_T temp;
+
+#if defined (DEBUG)
+ if (bytes == 0)
+ internal_warning("xmalloc: %s:%d: size argument is 0", file, line);
+#endif
+
+ FINDBRK();
+ temp = sh_malloc (bytes, file, line);
+
+ if (temp == 0)
+ sh_allocerr ("xmalloc", bytes, file, line);
+
+ return (temp);
+}
+
+PTR_T
+sh_xrealloc (pointer, bytes, file, line)
+ PTR_T pointer;
+ size_t bytes;
+ char *file;
+ int line;
+{
+ PTR_T temp;
+
+#if defined (DEBUG)
+ if (bytes == 0)
+ internal_warning("xrealloc: %s:%d: size argument is 0", file, line);
+#endif
+
+ FINDBRK();
+ temp = pointer ? sh_realloc (pointer, bytes, file, line) : sh_malloc (bytes, file, line);
+
+ if (temp == 0)
+ sh_allocerr ("xrealloc", bytes, file, line);
+
+ return (temp);
+}
+
+void
+sh_xfree (string, file, line)
+ PTR_T string;
+ char *file;
+ int line;
+{
+ if (string)
+ sh_free (string, file, line);
+}
+#endif
diff --git a/xmalloc.h b/xmalloc.h
new file mode 100644
index 0000000..bea71fd
--- /dev/null
+++ b/xmalloc.h
@@ -0,0 +1,58 @@
+/* xmalloc.h -- defines for the `x' memory allocation functions */
+
+/* Copyright (C) 2001-2009 Free Software Foundation, Inc.
+
+ This file is part of GNU Bash, the Bourne Again SHell.
+
+ Bash is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Bash is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Bash. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#if !defined (_XMALLOC_H_)
+#define _XMALLOC_H_
+
+#include "stdc.h"
+#include "bashansi.h"
+
+/* Generic pointer type. */
+#ifndef PTR_T
+
+#if defined (__STDC__)
+# define PTR_T void *
+#else
+# define PTR_T char *
+#endif
+
+#endif /* PTR_T */
+
+/* Allocation functions in xmalloc.c */
+extern PTR_T xmalloc __P((size_t));
+extern PTR_T xrealloc __P((void *, size_t));
+extern void xfree __P((void *));
+
+#if defined(USING_BASH_MALLOC) && !defined (DISABLE_MALLOC_WRAPPERS)
+extern PTR_T sh_xmalloc __P((size_t, const char *, int));
+extern PTR_T sh_xrealloc __P((void *, size_t, const char *, int));
+extern void sh_xfree __P((void *, const char *, int));
+
+#define xmalloc(x) sh_xmalloc((x), __FILE__, __LINE__)
+#define xrealloc(x, n) sh_xrealloc((x), (n), __FILE__, __LINE__)
+#define xfree(x) sh_xfree((x), __FILE__, __LINE__)
+
+#ifdef free
+#undef free
+#endif
+#define free(x) sh_xfree((x), __FILE__, __LINE__)
+#endif /* USING_BASH_MALLOC */
+
+#endif /* _XMALLOC_H_ */
diff --git a/y.tab.c b/y.tab.c
new file mode 100644
index 0000000..d702554
--- /dev/null
+++ b/y.tab.c
@@ -0,0 +1,8246 @@
+/* A Bison parser, made by GNU Bison 2.3. */
+
+/* Skeleton implementation for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* C LALR(1) parser skeleton written by Richard Stallman, by
+ simplifying the original so-called "semantic" parser. */
+
+/* All symbols defined below should begin with yy or YY, to avoid
+ infringing on user name space. This should be done even for local
+ variables, as they might otherwise be expanded by user macros.
+ There are some unavoidable exceptions within include files to
+ define necessary library symbols; they are noted "INFRINGES ON
+ USER NAME SPACE" below. */
+
+/* Identify Bison output. */
+#define YYBISON 1
+
+/* Bison version. */
+#define YYBISON_VERSION "2.3"
+
+/* Skeleton name. */
+#define YYSKELETON_NAME "yacc.c"
+
+/* Pure parsers. */
+#define YYPURE 0
+
+/* Using locations. */
+#define YYLSP_NEEDED 0
+
+
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ IF = 258,
+ THEN = 259,
+ ELSE = 260,
+ ELIF = 261,
+ FI = 262,
+ CASE = 263,
+ ESAC = 264,
+ FOR = 265,
+ SELECT = 266,
+ WHILE = 267,
+ UNTIL = 268,
+ DO = 269,
+ DONE = 270,
+ FUNCTION = 271,
+ COPROC = 272,
+ COND_START = 273,
+ COND_END = 274,
+ COND_ERROR = 275,
+ IN = 276,
+ BANG = 277,
+ TIME = 278,
+ TIMEOPT = 279,
+ WORD = 280,
+ ASSIGNMENT_WORD = 281,
+ REDIR_WORD = 282,
+ NUMBER = 283,
+ ARITH_CMD = 284,
+ ARITH_FOR_EXPRS = 285,
+ COND_CMD = 286,
+ AND_AND = 287,
+ OR_OR = 288,
+ GREATER_GREATER = 289,
+ LESS_LESS = 290,
+ LESS_AND = 291,
+ LESS_LESS_LESS = 292,
+ GREATER_AND = 293,
+ SEMI_SEMI = 294,
+ SEMI_AND = 295,
+ SEMI_SEMI_AND = 296,
+ LESS_LESS_MINUS = 297,
+ AND_GREATER = 298,
+ AND_GREATER_GREATER = 299,
+ LESS_GREATER = 300,
+ GREATER_BAR = 301,
+ BAR_AND = 302,
+ yacc_EOF = 303
+ };
+#endif
+/* Tokens. */
+#define IF 258
+#define THEN 259
+#define ELSE 260
+#define ELIF 261
+#define FI 262
+#define CASE 263
+#define ESAC 264
+#define FOR 265
+#define SELECT 266
+#define WHILE 267
+#define UNTIL 268
+#define DO 269
+#define DONE 270
+#define FUNCTION 271
+#define COPROC 272
+#define COND_START 273
+#define COND_END 274
+#define COND_ERROR 275
+#define IN 276
+#define BANG 277
+#define TIME 278
+#define TIMEOPT 279
+#define WORD 280
+#define ASSIGNMENT_WORD 281
+#define REDIR_WORD 282
+#define NUMBER 283
+#define ARITH_CMD 284
+#define ARITH_FOR_EXPRS 285
+#define COND_CMD 286
+#define AND_AND 287
+#define OR_OR 288
+#define GREATER_GREATER 289
+#define LESS_LESS 290
+#define LESS_AND 291
+#define LESS_LESS_LESS 292
+#define GREATER_AND 293
+#define SEMI_SEMI 294
+#define SEMI_AND 295
+#define SEMI_SEMI_AND 296
+#define LESS_LESS_MINUS 297
+#define AND_GREATER 298
+#define AND_GREATER_GREATER 299
+#define LESS_GREATER 300
+#define GREATER_BAR 301
+#define BAR_AND 302
+#define yacc_EOF 303
+
+
+
+
+/* Copy the first part of user declarations. */
+#line 21 "/Users/chet/src/bash/src/parse.y"
+
+#include "config.h"
+
+#include "bashtypes.h"
+#include "bashansi.h"
+
+#include "filecntl.h"
+
+#if defined (HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+#if defined (HAVE_LOCALE_H)
+# include <locale.h>
+#endif
+
+#include <stdio.h>
+#include "chartypes.h"
+#include <signal.h>
+
+#include "memalloc.h"
+
+#include "bashintl.h"
+
+#define NEED_STRFTIME_DECL /* used in externs.h */
+
+#include "shell.h"
+#include "trap.h"
+#include "flags.h"
+#include "parser.h"
+#include "mailcheck.h"
+#include "test.h"
+#include "builtins.h"
+#include "builtins/common.h"
+#include "builtins/builtext.h"
+
+#include "shmbutil.h"
+
+#if defined (READLINE)
+# include "bashline.h"
+# include <readline/readline.h>
+#endif /* READLINE */
+
+#if defined (HISTORY)
+# include "bashhist.h"
+# include <readline/history.h>
+#endif /* HISTORY */
+
+#if defined (JOB_CONTROL)
+# include "jobs.h"
+#endif /* JOB_CONTROL */
+
+#if defined (ALIAS)
+# include "alias.h"
+#else
+typedef void *alias_t;
+#endif /* ALIAS */
+
+#if defined (PROMPT_STRING_DECODE)
+# ifndef _MINIX
+# include <sys/param.h>
+# endif
+# include <time.h>
+# if defined (TM_IN_SYS_TIME)
+# include <sys/types.h>
+# include <sys/time.h>
+# endif /* TM_IN_SYS_TIME */
+# include "maxpath.h"
+#endif /* PROMPT_STRING_DECODE */
+
+#define RE_READ_TOKEN -99
+#define NO_EXPANSION -100
+
+#ifdef DEBUG
+# define YYDEBUG 1
+#else
+# define YYDEBUG 0
+#endif
+
+#if defined (HANDLE_MULTIBYTE)
+# define last_shell_getc_is_singlebyte \
+ ((shell_input_line_index > 1) \
+ ? shell_input_line_property[shell_input_line_index - 1] \
+ : 1)
+# define MBTEST(x) ((x) && last_shell_getc_is_singlebyte)
+#else
+# define last_shell_getc_is_singlebyte 1
+# define MBTEST(x) ((x))
+#endif
+
+#if defined (EXTENDED_GLOB)
+extern int extended_glob;
+#endif
+
+extern int eof_encountered;
+extern int no_line_editing, running_under_emacs;
+extern int current_command_number;
+extern int sourcelevel, parse_and_execute_level;
+extern int posixly_correct;
+extern int last_command_exit_value;
+extern pid_t last_command_subst_pid;
+extern char *shell_name, *current_host_name;
+extern char *dist_version;
+extern int patch_level;
+extern int dump_translatable_strings, dump_po_strings;
+extern sh_builtin_func_t *last_shell_builtin, *this_shell_builtin;
+#if defined (BUFFERED_INPUT)
+extern int bash_input_fd_changed;
+#endif
+
+extern int errno;
+/* **************************************************************** */
+/* */
+/* "Forward" declarations */
+/* */
+/* **************************************************************** */
+
+#ifdef DEBUG
+static void debug_parser __P((int));
+#endif
+
+static int yy_getc __P((void));
+static int yy_ungetc __P((int));
+
+#if defined (READLINE)
+static int yy_readline_get __P((void));
+static int yy_readline_unget __P((int));
+#endif
+
+static int yy_string_get __P((void));
+static int yy_string_unget __P((int));
+static void rewind_input_string __P((void));
+static int yy_stream_get __P((void));
+static int yy_stream_unget __P((int));
+
+static int shell_getc __P((int));
+static void shell_ungetc __P((int));
+static void discard_until __P((int));
+
+#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
+static void push_string __P((char *, int, alias_t *));
+static void pop_string __P((void));
+static void free_string_list __P((void));
+#endif
+
+static char *read_a_line __P((int));
+
+static int reserved_word_acceptable __P((int));
+static int yylex __P((void));
+static int alias_expand_token __P((char *));
+static int time_command_acceptable __P((void));
+static int special_case_tokens __P((char *));
+static int read_token __P((int));
+static char *parse_matched_pair __P((int, int, int, int *, int));
+static char *parse_comsub __P((int, int, int, int *, int));
+#if defined (ARRAY_VARS)
+static char *parse_compound_assignment __P((int *));
+#endif
+#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND)
+static int parse_dparen __P((int));
+static int parse_arith_cmd __P((char **, int));
+#endif
+#if defined (COND_COMMAND)
+static void cond_error __P((void));
+static COND_COM *cond_expr __P((void));
+static COND_COM *cond_or __P((void));
+static COND_COM *cond_and __P((void));
+static COND_COM *cond_term __P((void));
+static int cond_skip_newlines __P((void));
+static COMMAND *parse_cond_command __P((void));
+#endif
+#if defined (ARRAY_VARS)
+static int token_is_assignment __P((char *, int));
+static int token_is_ident __P((char *, int));
+#endif
+static int read_token_word __P((int));
+static void discard_parser_constructs __P((int));
+
+static char *error_token_from_token __P((int));
+static char *error_token_from_text __P((void));
+static void print_offending_line __P((void));
+static void report_syntax_error __P((char *));
+
+static void handle_eof_input_unit __P((void));
+static void prompt_again __P((void));
+#if 0
+static void reset_readline_prompt __P((void));
+#endif
+static void print_prompt __P((void));
+
+#if defined (HANDLE_MULTIBYTE)
+static void set_line_mbstate __P((void));
+static char *shell_input_line_property = NULL;
+#else
+# define set_line_mbstate()
+#endif
+
+extern int yyerror __P((const char *));
+
+#ifdef DEBUG
+extern int yydebug;
+#endif
+
+/* Default prompt strings */
+char *primary_prompt = PPROMPT;
+char *secondary_prompt = SPROMPT;
+
+/* PROMPT_STRING_POINTER points to one of these, never to an actual string. */
+char *ps1_prompt, *ps2_prompt;
+
+/* Handle on the current prompt string. Indirectly points through
+ ps1_ or ps2_prompt. */
+char **prompt_string_pointer = (char **)NULL;
+char *current_prompt_string;
+
+/* Non-zero means we expand aliases in commands. */
+int expand_aliases = 0;
+
+/* If non-zero, the decoded prompt string undergoes parameter and
+ variable substitution, command substitution, arithmetic substitution,
+ string expansion, process substitution, and quote removal in
+ decode_prompt_string. */
+int promptvars = 1;
+
+/* If non-zero, $'...' and $"..." are expanded when they appear within
+ a ${...} expansion, even when the expansion appears within double
+ quotes. */
+int extended_quote = 1;
+
+/* The number of lines read from input while creating the current command. */
+int current_command_line_count;
+
+/* The token that currently denotes the end of parse. */
+int shell_eof_token;
+
+/* The token currently being read. */
+int current_token;
+
+/* The current parser state. */
+int parser_state;
+
+/* Variables to manage the task of reading here documents, because we need to
+ defer the reading until after a complete command has been collected. */
+static REDIRECT *redir_stack[10];
+int need_here_doc;
+
+/* Where shell input comes from. History expansion is performed on each
+ line when the shell is interactive. */
+static char *shell_input_line = (char *)NULL;
+static int shell_input_line_index;
+static int shell_input_line_size; /* Amount allocated for shell_input_line. */
+static int shell_input_line_len; /* strlen (shell_input_line) */
+
+/* Either zero or EOF. */
+static int shell_input_line_terminator;
+
+/* The line number in a script on which a function definition starts. */
+static int function_dstart;
+
+/* The line number in a script on which a function body starts. */
+static int function_bstart;
+
+/* The line number in a script at which an arithmetic for command starts. */
+static int arith_for_lineno;
+
+/* The decoded prompt string. Used if READLINE is not defined or if
+ editing is turned off. Analogous to current_readline_prompt. */
+static char *current_decoded_prompt;
+
+/* The last read token, or NULL. read_token () uses this for context
+ checking. */
+static int last_read_token;
+
+/* The token read prior to last_read_token. */
+static int token_before_that;
+
+/* The token read prior to token_before_that. */
+static int two_tokens_ago;
+
+static int global_extglob;
+
+/* The line number in a script where the word in a `case WORD', `select WORD'
+ or `for WORD' begins. This is a nested command maximum, since the array
+ index is decremented after a case, select, or for command is parsed. */
+#define MAX_CASE_NEST 128
+static int word_lineno[MAX_CASE_NEST];
+static int word_top = -1;
+
+/* If non-zero, it is the token that we want read_token to return
+ regardless of what text is (or isn't) present to be read. This
+ is reset by read_token. If token_to_read == WORD or
+ ASSIGNMENT_WORD, yylval.word should be set to word_desc_to_read. */
+static int token_to_read;
+static WORD_DESC *word_desc_to_read;
+
+static REDIRECTEE source;
+static REDIRECTEE redir;
+
+
+/* Enabling traces. */
+#ifndef YYDEBUG
+# define YYDEBUG 0
+#endif
+
+/* Enabling verbose error messages. */
+#ifdef YYERROR_VERBOSE
+# undef YYERROR_VERBOSE
+# define YYERROR_VERBOSE 1
+#else
+# define YYERROR_VERBOSE 0
+#endif
+
+/* Enabling the token table. */
+#ifndef YYTOKEN_TABLE
+# define YYTOKEN_TABLE 0
+#endif
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+#line 320 "/Users/chet/src/bash/src/parse.y"
+{
+ WORD_DESC *word; /* the word that we read. */
+ int number; /* the number that we read. */
+ WORD_LIST *word_list;
+ COMMAND *command;
+ REDIRECT *redirect;
+ ELEMENT element;
+ PATTERN_LIST *pattern;
+}
+/* Line 187 of yacc.c. */
+#line 501 "y.tab.c"
+ YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+
+
+/* Copy the second part of user declarations. */
+
+
+/* Line 216 of yacc.c. */
+#line 514 "y.tab.c"
+
+#ifdef short
+# undef short
+#endif
+
+#ifdef YYTYPE_UINT8
+typedef YYTYPE_UINT8 yytype_uint8;
+#else
+typedef unsigned char yytype_uint8;
+#endif
+
+#ifdef YYTYPE_INT8
+typedef YYTYPE_INT8 yytype_int8;
+#elif (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+typedef signed char yytype_int8;
+#else
+typedef short int yytype_int8;
+#endif
+
+#ifdef YYTYPE_UINT16
+typedef YYTYPE_UINT16 yytype_uint16;
+#else
+typedef unsigned short int yytype_uint16;
+#endif
+
+#ifdef YYTYPE_INT16
+typedef YYTYPE_INT16 yytype_int16;
+#else
+typedef short int yytype_int16;
+#endif
+
+#ifndef YYSIZE_T
+# ifdef __SIZE_TYPE__
+# define YYSIZE_T __SIZE_TYPE__
+# elif defined size_t
+# define YYSIZE_T size_t
+# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
+# define YYSIZE_T size_t
+# else
+# define YYSIZE_T unsigned int
+# endif
+#endif
+
+#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
+
+#ifndef YY_
+# if YYENABLE_NLS
+# if ENABLE_NLS
+# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
+# define YY_(msgid) dgettext ("bison-runtime", msgid)
+# endif
+# endif
+# ifndef YY_
+# define YY_(msgid) msgid
+# endif
+#endif
+
+/* Suppress unused-variable warnings by "using" E. */
+#if ! defined lint || defined __GNUC__
+# define YYUSE(e) ((void) (e))
+#else
+# define YYUSE(e) /* empty */
+#endif
+
+/* Identity function, used to suppress warnings about constant conditions. */
+#ifndef lint
+# define YYID(n) (n)
+#else
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static int
+YYID (int i)
+#else
+static int
+YYID (i)
+ int i;
+#endif
+{
+ return i;
+}
+#endif
+
+#if ! defined yyoverflow || YYERROR_VERBOSE
+
+/* The parser invokes alloca or malloc; define the necessary symbols. */
+
+# ifdef YYSTACK_USE_ALLOCA
+# if YYSTACK_USE_ALLOCA
+# ifdef __GNUC__
+# define YYSTACK_ALLOC __builtin_alloca
+# elif defined __BUILTIN_VA_ARG_INCR
+# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
+# elif defined _AIX
+# define YYSTACK_ALLOC __alloca
+# elif defined _MSC_VER
+# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
+# define alloca _alloca
+# else
+# define YYSTACK_ALLOC alloca
+# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# endif
+# endif
+# endif
+
+# ifdef YYSTACK_ALLOC
+ /* Pacify GCC's `empty if-body' warning. */
+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
+# ifndef YYSTACK_ALLOC_MAXIMUM
+ /* The OS might guarantee only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
+ to allow for a few compiler-allocated temporary stack slots. */
+# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
+# endif
+# else
+# define YYSTACK_ALLOC YYMALLOC
+# define YYSTACK_FREE YYFREE
+# ifndef YYSTACK_ALLOC_MAXIMUM
+# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
+# endif
+# if (defined __cplusplus && ! defined _STDLIB_H \
+ && ! ((defined YYMALLOC || defined malloc) \
+ && (defined YYFREE || defined free)))
+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
+# ifndef _STDLIB_H
+# define _STDLIB_H 1
+# endif
+# endif
+# ifndef YYMALLOC
+# define YYMALLOC malloc
+# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# ifndef YYFREE
+# define YYFREE free
+# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+void free (void *); /* INFRINGES ON USER NAME SPACE */
+# endif
+# endif
+# endif
+#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
+
+
+#if (! defined yyoverflow \
+ && (! defined __cplusplus \
+ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
+
+/* A type that is properly aligned for any stack member. */
+union yyalloc
+{
+ yytype_int16 yyss;
+ YYSTYPE yyvs;
+ };
+
+/* The size of the maximum gap between one aligned stack and the next. */
+# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
+
+/* The size of an array large to enough to hold all stacks, each with
+ N elements. */
+# define YYSTACK_BYTES(N) \
+ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ + YYSTACK_GAP_MAXIMUM)
+
+/* Copy COUNT objects from FROM to TO. The source and destination do
+ not overlap. */
+# ifndef YYCOPY
+# if defined __GNUC__ && 1 < __GNUC__
+# define YYCOPY(To, From, Count) \
+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
+# else
+# define YYCOPY(To, From, Count) \
+ do \
+ { \
+ YYSIZE_T yyi; \
+ for (yyi = 0; yyi < (Count); yyi++) \
+ (To)[yyi] = (From)[yyi]; \
+ } \
+ while (YYID (0))
+# endif
+# endif
+
+/* Relocate STACK from its old location to the new one. The
+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
+ elements in the stack, and YYPTR gives the new location of the
+ stack. Advance YYPTR to a properly aligned location for the next
+ stack. */
+# define YYSTACK_RELOCATE(Stack) \
+ do \
+ { \
+ YYSIZE_T yynewbytes; \
+ YYCOPY (&yyptr->Stack, Stack, yysize); \
+ Stack = &yyptr->Stack; \
+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
+ yyptr += yynewbytes / sizeof (*yyptr); \
+ } \
+ while (YYID (0))
+
+#endif
+
+/* YYFINAL -- State number of the termination state. */
+#define YYFINAL 113
+/* YYLAST -- Last index in YYTABLE. */
+#define YYLAST 760
+
+/* YYNTOKENS -- Number of terminals. */
+#define YYNTOKENS 60
+/* YYNNTS -- Number of nonterminals. */
+#define YYNNTS 38
+/* YYNRULES -- Number of rules. */
+#define YYNRULES 167
+/* YYNRULES -- Number of states. */
+#define YYNSTATES 344
+
+/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
+#define YYUNDEFTOK 2
+#define YYMAXUTOK 303
+
+#define YYTRANSLATE(YYX) \
+ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
+
+/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
+static const yytype_uint8 yytranslate[] =
+{
+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 50, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 48, 2,
+ 58, 59, 2, 2, 2, 55, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 49,
+ 54, 2, 53, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 56, 52, 57, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+ 2, 2, 2, 2, 2, 2, 1, 2, 3, 4,
+ 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 51
+};
+
+#if YYDEBUG
+/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in
+ YYRHS. */
+static const yytype_uint16 yyprhs[] =
+{
+ 0, 0, 3, 6, 8, 11, 13, 15, 18, 21,
+ 24, 28, 32, 36, 40, 43, 47, 51, 54, 58,
+ 62, 65, 69, 73, 76, 80, 84, 87, 91, 95,
+ 98, 102, 106, 109, 113, 117, 120, 124, 128, 131,
+ 135, 139, 142, 146, 150, 153, 157, 161, 164, 168,
+ 172, 175, 178, 180, 182, 184, 186, 189, 191, 194,
+ 196, 198, 201, 203, 205, 207, 209, 215, 221, 223,
+ 225, 227, 229, 231, 233, 235, 242, 249, 257, 265,
+ 276, 287, 297, 307, 315, 323, 329, 335, 342, 349,
+ 357, 365, 376, 387, 394, 402, 409, 415, 422, 427,
+ 429, 432, 436, 439, 443, 447, 452, 455, 461, 469,
+ 476, 480, 482, 486, 491, 498, 504, 506, 509, 514,
+ 519, 525, 531, 534, 538, 541, 545, 548, 552, 554,
+ 558, 561, 563, 566, 570, 574, 578, 583, 588, 593,
+ 598, 603, 605, 607, 609, 611, 613, 615, 616, 619,
+ 621, 624, 627, 632, 637, 641, 645, 647, 649, 652,
+ 655, 659, 663, 666, 671, 676, 678, 680
+};
+
+/* YYRHS -- A `-1'-separated list of the rules' RHS. */
+static const yytype_int8 yyrhs[] =
+{
+ 61, 0, -1, 93, 90, -1, 50, -1, 1, 50,
+ -1, 51, -1, 25, -1, 62, 25, -1, 53, 25,
+ -1, 54, 25, -1, 28, 53, 25, -1, 28, 54,
+ 25, -1, 27, 53, 25, -1, 27, 54, 25, -1,
+ 34, 25, -1, 28, 34, 25, -1, 27, 34, 25,
+ -1, 46, 25, -1, 28, 46, 25, -1, 27, 46,
+ 25, -1, 45, 25, -1, 28, 45, 25, -1, 27,
+ 45, 25, -1, 35, 25, -1, 28, 35, 25, -1,
+ 27, 35, 25, -1, 42, 25, -1, 28, 42, 25,
+ -1, 27, 42, 25, -1, 37, 25, -1, 28, 37,
+ 25, -1, 27, 37, 25, -1, 36, 28, -1, 28,
+ 36, 28, -1, 27, 36, 28, -1, 38, 28, -1,
+ 28, 38, 28, -1, 27, 38, 28, -1, 36, 25,
+ -1, 28, 36, 25, -1, 27, 36, 25, -1, 38,
+ 25, -1, 28, 38, 25, -1, 27, 38, 25, -1,
+ 38, 55, -1, 28, 38, 55, -1, 27, 38, 55,
+ -1, 36, 55, -1, 28, 36, 55, -1, 27, 36,
+ 55, -1, 43, 25, -1, 44, 25, -1, 25, -1,
+ 26, -1, 63, -1, 63, -1, 65, 63, -1, 64,
+ -1, 66, 64, -1, 66, -1, 68, -1, 68, 65,
+ -1, 73, -1, 76, -1, 69, -1, 72, -1, 12,
+ 87, 14, 87, 15, -1, 13, 87, 14, 87, 15,
+ -1, 71, -1, 77, -1, 75, -1, 78, -1, 79,
+ -1, 80, -1, 70, -1, 10, 25, 92, 14, 87,
+ 15, -1, 10, 25, 92, 56, 87, 57, -1, 10,
+ 25, 49, 92, 14, 87, 15, -1, 10, 25, 49,
+ 92, 56, 87, 57, -1, 10, 25, 92, 21, 62,
+ 91, 92, 14, 87, 15, -1, 10, 25, 92, 21,
+ 62, 91, 92, 56, 87, 57, -1, 10, 25, 92,
+ 21, 91, 92, 14, 87, 15, -1, 10, 25, 92,
+ 21, 91, 92, 56, 87, 57, -1, 10, 30, 91,
+ 92, 14, 87, 15, -1, 10, 30, 91, 92, 56,
+ 87, 57, -1, 10, 30, 14, 87, 15, -1, 10,
+ 30, 56, 87, 57, -1, 11, 25, 92, 14, 86,
+ 15, -1, 11, 25, 92, 56, 86, 57, -1, 11,
+ 25, 49, 92, 14, 86, 15, -1, 11, 25, 49,
+ 92, 56, 86, 57, -1, 11, 25, 92, 21, 62,
+ 91, 92, 14, 86, 15, -1, 11, 25, 92, 21,
+ 62, 91, 92, 56, 86, 57, -1, 8, 25, 92,
+ 21, 92, 9, -1, 8, 25, 92, 21, 84, 92,
+ 9, -1, 8, 25, 92, 21, 82, 9, -1, 25,
+ 58, 59, 92, 74, -1, 16, 25, 58, 59, 92,
+ 74, -1, 16, 25, 92, 74, -1, 68, -1, 68,
+ 65, -1, 58, 87, 59, -1, 17, 68, -1, 17,
+ 68, 65, -1, 17, 25, 68, -1, 17, 25, 68,
+ 65, -1, 17, 66, -1, 3, 87, 4, 87, 7,
+ -1, 3, 87, 4, 87, 5, 87, 7, -1, 3,
+ 87, 4, 87, 81, 7, -1, 56, 87, 57, -1,
+ 29, -1, 18, 31, 19, -1, 6, 87, 4, 87,
+ -1, 6, 87, 4, 87, 5, 87, -1, 6, 87,
+ 4, 87, 81, -1, 83, -1, 84, 83, -1, 92,
+ 85, 59, 87, -1, 92, 85, 59, 92, -1, 92,
+ 58, 85, 59, 87, -1, 92, 58, 85, 59, 92,
+ -1, 83, 39, -1, 84, 83, 39, -1, 83, 40,
+ -1, 84, 83, 40, -1, 83, 41, -1, 84, 83,
+ 41, -1, 25, -1, 85, 52, 25, -1, 92, 88,
+ -1, 86, -1, 92, 89, -1, 89, 50, 92, -1,
+ 89, 48, 92, -1, 89, 49, 92, -1, 89, 32,
+ 92, 89, -1, 89, 33, 92, 89, -1, 89, 48,
+ 92, 89, -1, 89, 49, 92, 89, -1, 89, 50,
+ 92, 89, -1, 95, -1, 50, -1, 51, -1, 50,
+ -1, 49, -1, 51, -1, -1, 92, 50, -1, 94,
+ -1, 94, 48, -1, 94, 49, -1, 94, 32, 92,
+ 94, -1, 94, 33, 92, 94, -1, 94, 48, 94,
+ -1, 94, 49, 94, -1, 95, -1, 96, -1, 22,
+ 96, -1, 97, 96, -1, 97, 22, 96, -1, 22,
+ 97, 96, -1, 97, 91, -1, 96, 52, 92, 96,
+ -1, 96, 47, 92, 96, -1, 67, -1, 23, -1,
+ 23, 24, -1
+};
+
+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
+static const yytype_uint16 yyrline[] =
+{
+ 0, 373, 373, 384, 393, 408, 418, 420, 424, 430,
+ 436, 442, 448, 454, 460, 466, 472, 478, 484, 490,
+ 496, 502, 508, 514, 521, 528, 535, 542, 549, 556,
+ 562, 568, 574, 580, 586, 592, 598, 604, 610, 616,
+ 622, 628, 634, 640, 646, 652, 658, 664, 670, 676,
+ 682, 688, 696, 698, 700, 704, 708, 719, 721, 725,
+ 727, 729, 745, 747, 751, 753, 755, 757, 759, 761,
+ 763, 765, 767, 769, 771, 775, 780, 785, 790, 795,
+ 800, 805, 810, 817, 822, 827, 832, 839, 844, 849,
+ 854, 859, 864, 871, 876, 881, 888, 891, 894, 898,
+ 900, 931, 938, 943, 960, 965, 982, 989, 991, 993,
+ 998, 1002, 1006, 1010, 1012, 1014, 1018, 1019, 1023, 1025,
+ 1027, 1029, 1033, 1035, 1037, 1039, 1041, 1043, 1047, 1049,
+ 1058, 1066, 1067, 1073, 1074, 1081, 1085, 1087, 1089, 1096,
+ 1098, 1100, 1104, 1105, 1108, 1110, 1112, 1116, 1117, 1126,
+ 1139, 1155, 1170, 1172, 1174, 1181, 1184, 1188, 1190, 1196,
+ 1202, 1208, 1214, 1234, 1236, 1259, 1263, 1265
+};
+#endif
+
+#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE
+/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM.
+ First, the terminals, then, starting at YYNTOKENS, nonterminals. */
+static const char *const yytname[] =
+{
+ "$end", "error", "$undefined", "IF", "THEN", "ELSE", "ELIF", "FI",
+ "CASE", "ESAC", "FOR", "SELECT", "WHILE", "UNTIL", "DO", "DONE",
+ "FUNCTION", "COPROC", "COND_START", "COND_END", "COND_ERROR", "IN",
+ "BANG", "TIME", "TIMEOPT", "WORD", "ASSIGNMENT_WORD", "REDIR_WORD",
+ "NUMBER", "ARITH_CMD", "ARITH_FOR_EXPRS", "COND_CMD", "AND_AND", "OR_OR",
+ "GREATER_GREATER", "LESS_LESS", "LESS_AND", "LESS_LESS_LESS",
+ "GREATER_AND", "SEMI_SEMI", "SEMI_AND", "SEMI_SEMI_AND",
+ "LESS_LESS_MINUS", "AND_GREATER", "AND_GREATER_GREATER", "LESS_GREATER",
+ "GREATER_BAR", "BAR_AND", "'&'", "';'", "'\\n'", "yacc_EOF", "'|'",
+ "'>'", "'<'", "'-'", "'{'", "'}'", "'('", "')'", "$accept", "inputunit",
+ "word_list", "redirection", "simple_command_element", "redirection_list",
+ "simple_command", "command", "shell_command", "for_command",
+ "arith_for_command", "select_command", "case_command", "function_def",
+ "function_body", "subshell", "coproc", "if_command", "group_command",
+ "arith_command", "cond_command", "elif_clause", "case_clause",
+ "pattern_list", "case_clause_sequence", "pattern", "list",
+ "compound_list", "list0", "list1", "simple_list_terminator",
+ "list_terminator", "newline_list", "simple_list", "simple_list1",
+ "pipeline_command", "pipeline", "timespec", 0
+};
+#endif
+
+# ifdef YYPRINT
+/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to
+ token YYLEX-NUM. */
+static const yytype_uint16 yytoknum[] =
+{
+ 0, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 279, 280, 281, 282, 283, 284,
+ 285, 286, 287, 288, 289, 290, 291, 292, 293, 294,
+ 295, 296, 297, 298, 299, 300, 301, 302, 38, 59,
+ 10, 303, 124, 62, 60, 45, 123, 125, 40, 41
+};
+# endif
+
+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
+static const yytype_uint8 yyr1[] =
+{
+ 0, 60, 61, 61, 61, 61, 62, 62, 63, 63,
+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ 63, 63, 63, 63, 63, 63, 63, 63, 63, 63,
+ 63, 63, 64, 64, 64, 65, 65, 66, 66, 67,
+ 67, 67, 67, 67, 68, 68, 68, 68, 68, 68,
+ 68, 68, 68, 68, 68, 69, 69, 69, 69, 69,
+ 69, 69, 69, 70, 70, 70, 70, 71, 71, 71,
+ 71, 71, 71, 72, 72, 72, 73, 73, 73, 74,
+ 74, 75, 76, 76, 76, 76, 76, 77, 77, 77,
+ 78, 79, 80, 81, 81, 81, 82, 82, 83, 83,
+ 83, 83, 84, 84, 84, 84, 84, 84, 85, 85,
+ 86, 87, 87, 88, 88, 88, 89, 89, 89, 89,
+ 89, 89, 90, 90, 91, 91, 91, 92, 92, 93,
+ 93, 93, 94, 94, 94, 94, 94, 95, 95, 95,
+ 95, 95, 95, 96, 96, 96, 97, 97
+};
+
+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
+static const yytype_uint8 yyr2[] =
+{
+ 0, 2, 2, 1, 2, 1, 1, 2, 2, 2,
+ 3, 3, 3, 3, 2, 3, 3, 2, 3, 3,
+ 2, 3, 3, 2, 3, 3, 2, 3, 3, 2,
+ 3, 3, 2, 3, 3, 2, 3, 3, 2, 3,
+ 3, 2, 3, 3, 2, 3, 3, 2, 3, 3,
+ 2, 2, 1, 1, 1, 1, 2, 1, 2, 1,
+ 1, 2, 1, 1, 1, 1, 5, 5, 1, 1,
+ 1, 1, 1, 1, 1, 6, 6, 7, 7, 10,
+ 10, 9, 9, 7, 7, 5, 5, 6, 6, 7,
+ 7, 10, 10, 6, 7, 6, 5, 6, 4, 1,
+ 2, 3, 2, 3, 3, 4, 2, 5, 7, 6,
+ 3, 1, 3, 4, 6, 5, 1, 2, 4, 4,
+ 5, 5, 2, 3, 2, 3, 2, 3, 1, 3,
+ 2, 1, 2, 3, 3, 3, 4, 4, 4, 4,
+ 4, 1, 1, 1, 1, 1, 1, 0, 2, 1,
+ 2, 2, 4, 4, 3, 3, 1, 1, 2, 2,
+ 3, 3, 2, 4, 4, 1, 1, 2
+};
+
+/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state
+ STATE-NUM when YYTABLE doesn't specify something else to do. Zero
+ means the default is an error. */
+static const yytype_uint8 yydefact[] =
+{
+ 0, 0, 147, 0, 0, 0, 147, 147, 0, 0,
+ 0, 0, 166, 52, 53, 0, 0, 111, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 3, 5,
+ 0, 0, 147, 147, 0, 54, 57, 59, 165, 60,
+ 64, 74, 68, 65, 62, 70, 63, 69, 71, 72,
+ 73, 0, 149, 156, 157, 0, 4, 131, 0, 0,
+ 147, 147, 0, 147, 0, 0, 147, 52, 106, 102,
+ 0, 158, 0, 167, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 14, 23, 38, 32, 47,
+ 29, 41, 35, 44, 26, 50, 51, 20, 17, 8,
+ 9, 0, 0, 1, 52, 58, 55, 61, 142, 143,
+ 2, 147, 147, 150, 151, 147, 147, 0, 145, 144,
+ 146, 162, 159, 147, 148, 130, 132, 141, 0, 147,
+ 0, 147, 147, 147, 147, 0, 147, 147, 0, 0,
+ 104, 103, 112, 161, 147, 16, 25, 40, 34, 49,
+ 31, 43, 37, 46, 28, 22, 19, 12, 13, 15,
+ 24, 39, 33, 48, 30, 42, 36, 45, 27, 21,
+ 18, 10, 11, 110, 101, 56, 0, 0, 154, 155,
+ 0, 0, 160, 0, 147, 147, 147, 147, 147, 147,
+ 0, 147, 0, 147, 0, 0, 0, 0, 147, 0,
+ 147, 0, 0, 147, 99, 98, 105, 0, 152, 153,
+ 0, 0, 164, 163, 147, 147, 107, 0, 0, 0,
+ 134, 135, 133, 0, 116, 147, 0, 147, 147, 0,
+ 6, 0, 147, 0, 85, 86, 147, 147, 147, 147,
+ 0, 0, 0, 0, 66, 67, 0, 100, 96, 0,
+ 0, 109, 136, 137, 138, 139, 140, 95, 122, 124,
+ 126, 117, 0, 93, 128, 0, 0, 0, 0, 75,
+ 7, 147, 0, 76, 0, 0, 0, 0, 87, 0,
+ 147, 88, 97, 108, 147, 147, 147, 147, 123, 125,
+ 127, 94, 0, 0, 147, 77, 78, 0, 147, 147,
+ 83, 84, 89, 90, 0, 113, 0, 0, 0, 147,
+ 129, 118, 119, 147, 147, 0, 0, 147, 147, 147,
+ 115, 120, 121, 0, 0, 81, 82, 0, 0, 114,
+ 79, 80, 91, 92
+};
+
+/* YYDEFGOTO[NTERM-NUM]. */
+static const yytype_int16 yydefgoto[] =
+{
+ -1, 34, 241, 35, 36, 117, 37, 38, 39, 40,
+ 41, 42, 43, 44, 215, 45, 46, 47, 48, 49,
+ 50, 227, 233, 234, 235, 276, 57, 58, 135, 136,
+ 120, 131, 59, 51, 188, 137, 54, 55
+};
+
+/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing
+ STATE-NUM. */
+#define YYPACT_NINF -212
+static const yytype_int16 yypact[] =
+{
+ 318, -40, -212, 11, 10, 32, -212, -212, 34, 661,
+ 39, 514, 52, 21, -212, 255, 706, -212, 65, 79,
+ 47, 98, 55, 133, 134, 139, 151, 152, -212, -212,
+ 156, 157, -212, -212, 142, -212, -212, 232, -212, 693,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, 49, 213, -212, -28, 367, -212, -212, 150, 416,
+ -212, 135, -3, 137, 184, 194, 158, 31, 232, 693,
+ 191, -28, 612, -212, 166, 199, 202, 69, 209, 128,
+ 210, 214, 218, 219, 225, 227, 247, 165, 248, 181,
+ 256, 257, 258, 259, 262, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, 237, 236, -212, -212, -212, -212, 693, -212, -212,
+ -212, -212, -212, 465, 465, -212, -212, 612, -212, -212,
+ -212, -212, -28, -212, -212, -212, 205, -212, -13, -212,
+ 116, -212, -212, -212, -212, 117, -212, -212, 240, 53,
+ 693, 693, -212, -28, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, -212, -212, -212, -212, 416, 416, 75, 75,
+ 563, 563, -28, 15, -212, -212, -212, -212, -212, -212,
+ 72, -212, 120, -212, 281, 249, 105, 118, -212, 279,
+ -212, 290, 292, -212, 693, -212, 693, 53, -212, -212,
+ 465, 465, -28, -28, -212, -212, -212, 303, 416, 416,
+ 416, 416, 416, 302, 174, -212, 0, -212, -212, 297,
+ -212, 179, -212, 263, -212, -212, -212, -212, -212, -212,
+ 299, 416, 179, 265, -212, -212, 53, 693, -212, 308,
+ 312, -212, -212, -212, 80, 80, 80, -212, -212, -212,
+ -212, 224, 43, -212, -212, 300, 33, 309, 270, -212,
+ -212, -212, 129, -212, 317, 276, 322, 282, -212, 205,
+ -212, -212, -212, -212, -212, -212, -212, -212, -212, -212,
+ -212, -212, 46, 313, -212, -212, -212, 149, -212, -212,
+ -212, -212, -212, -212, 161, 115, 416, 416, 416, -212,
+ -212, -212, 416, -212, -212, 327, 291, -212, -212, -212,
+ -212, -212, 416, 334, 293, -212, -212, 336, 301, -212,
+ -212, -212, -212, -212
+};
+
+/* YYPGOTO[NTERM-NUM]. */
+static const yytype_int16 yypgoto[] =
+{
+ -212, -212, 148, -36, 1, -62, 350, -212, -5, -212,
+ -212, -212, -212, -212, -211, -212, -212, -212, -212, -212,
+ -212, 50, -212, 131, -212, 92, -194, -6, -212, -200,
+ -212, -45, -48, -212, 5, 2, 12, 362
+};
+
+/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If
+ positive, shift that token. If negative, reduce the rule which
+ number is the opposite. If zero, do what YYDEFACT says.
+ If YYTABLE_NINF, syntax error. */
+#define YYTABLE_NINF -1
+static const yytype_uint16 yytable[] =
+{
+ 64, 65, 53, 116, 69, 52, 258, 151, 199, 273,
+ 56, 141, 138, 140, 250, 145, 253, 143, 149, 125,
+ 224, 225, 226, 71, 126, 274, 111, 112, 262, 263,
+ 264, 265, 266, 116, 2, 61, 60, 134, 115, 3,
+ 62, 4, 5, 6, 7, 292, 128, 129, 130, 10,
+ 134, 289, 301, 142, 286, 287, 2, 63, 275, 66,
+ 17, 3, 150, 4, 5, 6, 7, 132, 274, 115,
+ 70, 10, 97, 186, 187, 98, 73, 190, 191, 74,
+ 101, 185, 17, 102, 153, 303, 237, 32, 216, 33,
+ 95, 200, 304, 134, 157, 206, 207, 158, 303, 118,
+ 119, 275, 99, 134, 96, 319, 217, 121, 122, 32,
+ 103, 33, 194, 195, 116, 185, 264, 265, 266, 246,
+ 329, 225, 134, 100, 159, 53, 53, 193, 238, 189,
+ 201, 208, 248, 337, 338, 204, 205, 202, 209, 192,
+ 211, 212, 113, 308, 214, 240, 228, 229, 230, 231,
+ 232, 236, 257, 161, 133, 134, 162, 242, 104, 105,
+ 251, 247, 251, 323, 106, 256, 134, 134, 134, 128,
+ 129, 130, 203, 210, 249, 327, 107, 108, 116, 134,
+ 185, 109, 110, 163, 139, 309, 144, 272, 53, 53,
+ 171, 218, 219, 172, 282, 239, 281, 243, 146, 134,
+ 251, 251, 222, 223, 280, 324, 175, 290, 147, 176,
+ 152, 134, 214, 268, 269, 270, 148, 328, 259, 260,
+ 173, 185, 53, 53, 155, 154, 189, 156, 128, 129,
+ 130, 277, 278, 307, 160, 164, 177, 194, 195, 165,
+ 284, 285, 314, 166, 167, 121, 122, 316, 317, 318,
+ 168, 214, 169, 196, 197, 198, 322, 114, 14, 15,
+ 16, 123, 124, 298, 299, 300, 18, 19, 20, 21,
+ 22, 332, 170, 174, 23, 24, 25, 26, 27, 251,
+ 251, 178, 179, 180, 181, 30, 31, 182, 315, 75,
+ 76, 77, 78, 79, 183, 184, 244, 80, 321, 213,
+ 81, 82, 325, 326, 240, 254, 245, 255, 83, 84,
+ 261, 267, 279, 331, 288, 293, 294, 333, 334, 1,
+ 283, 2, 291, 339, 305, 274, 3, 306, 4, 5,
+ 6, 7, 310, 311, 8, 9, 10, 312, 320, 313,
+ 11, 12, 335, 13, 14, 15, 16, 17, 336, 340,
+ 341, 342, 18, 19, 20, 21, 22, 252, 343, 68,
+ 23, 24, 25, 26, 27, 330, 271, 302, 28, 29,
+ 2, 30, 31, 72, 32, 3, 33, 4, 5, 6,
+ 7, 0, 0, 8, 9, 10, 0, 0, 0, 127,
+ 0, 0, 13, 14, 15, 16, 17, 0, 0, 0,
+ 0, 18, 19, 20, 21, 22, 0, 0, 0, 23,
+ 24, 25, 26, 27, 0, 0, 128, 129, 130, 2,
+ 30, 31, 0, 32, 3, 33, 4, 5, 6, 7,
+ 0, 0, 8, 9, 10, 0, 0, 0, 11, 12,
+ 0, 13, 14, 15, 16, 17, 0, 0, 0, 0,
+ 18, 19, 20, 21, 22, 0, 0, 0, 23, 24,
+ 25, 26, 27, 0, 0, 0, 134, 0, 2, 30,
+ 31, 0, 32, 3, 33, 4, 5, 6, 7, 0,
+ 0, 8, 9, 10, 0, 0, 0, 11, 12, 0,
+ 13, 14, 15, 16, 17, 0, 0, 0, 0, 18,
+ 19, 20, 21, 22, 0, 0, 0, 23, 24, 25,
+ 26, 27, 0, 0, 0, 0, 0, 2, 30, 31,
+ 0, 32, 3, 33, 4, 5, 6, 7, 0, 0,
+ 8, 9, 10, 0, 0, 0, 0, 12, 0, 13,
+ 14, 15, 16, 17, 0, 0, 0, 0, 18, 19,
+ 20, 21, 22, 0, 0, 0, 23, 24, 25, 26,
+ 27, 0, 0, 0, 0, 0, 2, 30, 31, 0,
+ 32, 3, 33, 4, 5, 6, 7, 0, 0, 8,
+ 9, 10, 0, 0, 0, 0, 0, 0, 13, 14,
+ 15, 16, 17, 0, 0, 0, 0, 18, 19, 20,
+ 21, 22, 0, 0, 0, 23, 24, 25, 26, 27,
+ 0, 0, 0, 134, 0, 2, 30, 31, 0, 32,
+ 3, 33, 4, 5, 6, 7, 0, 0, 8, 9,
+ 10, 0, 0, 0, 0, 0, 0, 13, 14, 15,
+ 16, 17, 0, 0, 0, 0, 18, 19, 20, 21,
+ 22, 0, 0, 0, 23, 24, 25, 26, 27, 0,
+ 0, 0, 0, 0, 2, 30, 31, 0, 32, 3,
+ 33, 4, 5, 6, 7, 0, 0, 0, 0, 10,
+ 0, 0, 0, 0, 0, 0, 67, 14, 15, 16,
+ 17, 0, 0, 0, 0, 18, 19, 20, 21, 22,
+ 0, 0, 0, 23, 24, 25, 26, 27, 0, 0,
+ 0, 0, 0, 0, 30, 31, 0, 32, 0, 33,
+ 15, 16, 0, 0, 0, 0, 0, 18, 19, 20,
+ 21, 22, 0, 0, 0, 23, 24, 25, 26, 27,
+ 85, 86, 87, 88, 89, 0, 30, 31, 90, 0,
+ 0, 91, 92, 0, 0, 0, 0, 0, 0, 93,
+ 94
+};
+
+static const yytype_int16 yycheck[] =
+{
+ 6, 7, 0, 39, 9, 0, 217, 69, 21, 9,
+ 50, 14, 60, 61, 208, 63, 210, 62, 66, 47,
+ 5, 6, 7, 11, 52, 25, 32, 33, 228, 229,
+ 230, 231, 232, 69, 3, 25, 25, 50, 37, 8,
+ 30, 10, 11, 12, 13, 256, 49, 50, 51, 18,
+ 50, 251, 9, 56, 248, 249, 3, 25, 58, 25,
+ 29, 8, 67, 10, 11, 12, 13, 55, 25, 68,
+ 31, 18, 25, 121, 122, 28, 24, 125, 126, 58,
+ 25, 117, 29, 28, 72, 52, 14, 56, 150, 58,
+ 25, 139, 59, 50, 25, 143, 144, 28, 52, 50,
+ 51, 58, 55, 50, 25, 59, 154, 32, 33, 56,
+ 55, 58, 32, 33, 150, 151, 316, 317, 318, 14,
+ 5, 6, 50, 25, 55, 123, 124, 133, 56, 124,
+ 14, 14, 14, 327, 328, 141, 142, 21, 21, 127,
+ 146, 147, 0, 14, 149, 25, 194, 195, 196, 197,
+ 198, 199, 214, 25, 4, 50, 28, 202, 25, 25,
+ 208, 56, 210, 14, 25, 213, 50, 50, 50, 49,
+ 50, 51, 56, 56, 56, 14, 25, 25, 214, 50,
+ 216, 25, 25, 55, 49, 56, 49, 235, 186, 187,
+ 25, 186, 187, 28, 242, 201, 241, 203, 14, 50,
+ 248, 249, 190, 191, 25, 56, 25, 252, 14, 28,
+ 19, 50, 217, 39, 40, 41, 58, 56, 224, 225,
+ 55, 257, 220, 221, 25, 59, 221, 25, 49, 50,
+ 51, 237, 238, 281, 25, 25, 55, 32, 33, 25,
+ 246, 247, 290, 25, 25, 32, 33, 295, 296, 297,
+ 25, 256, 25, 48, 49, 50, 304, 25, 26, 27,
+ 28, 48, 49, 39, 40, 41, 34, 35, 36, 37,
+ 38, 319, 25, 25, 42, 43, 44, 45, 46, 327,
+ 328, 25, 25, 25, 25, 53, 54, 25, 294, 34,
+ 35, 36, 37, 38, 57, 59, 15, 42, 304, 59,
+ 45, 46, 308, 309, 25, 15, 57, 15, 53, 54,
+ 7, 9, 15, 319, 15, 7, 4, 323, 324, 1,
+ 57, 3, 57, 329, 15, 25, 8, 57, 10, 11,
+ 12, 13, 15, 57, 16, 17, 18, 15, 25, 57,
+ 22, 23, 15, 25, 26, 27, 28, 29, 57, 15,
+ 57, 15, 34, 35, 36, 37, 38, 209, 57, 9,
+ 42, 43, 44, 45, 46, 315, 235, 275, 50, 51,
+ 3, 53, 54, 11, 56, 8, 58, 10, 11, 12,
+ 13, -1, -1, 16, 17, 18, -1, -1, -1, 22,
+ -1, -1, 25, 26, 27, 28, 29, -1, -1, -1,
+ -1, 34, 35, 36, 37, 38, -1, -1, -1, 42,
+ 43, 44, 45, 46, -1, -1, 49, 50, 51, 3,
+ 53, 54, -1, 56, 8, 58, 10, 11, 12, 13,
+ -1, -1, 16, 17, 18, -1, -1, -1, 22, 23,
+ -1, 25, 26, 27, 28, 29, -1, -1, -1, -1,
+ 34, 35, 36, 37, 38, -1, -1, -1, 42, 43,
+ 44, 45, 46, -1, -1, -1, 50, -1, 3, 53,
+ 54, -1, 56, 8, 58, 10, 11, 12, 13, -1,
+ -1, 16, 17, 18, -1, -1, -1, 22, 23, -1,
+ 25, 26, 27, 28, 29, -1, -1, -1, -1, 34,
+ 35, 36, 37, 38, -1, -1, -1, 42, 43, 44,
+ 45, 46, -1, -1, -1, -1, -1, 3, 53, 54,
+ -1, 56, 8, 58, 10, 11, 12, 13, -1, -1,
+ 16, 17, 18, -1, -1, -1, -1, 23, -1, 25,
+ 26, 27, 28, 29, -1, -1, -1, -1, 34, 35,
+ 36, 37, 38, -1, -1, -1, 42, 43, 44, 45,
+ 46, -1, -1, -1, -1, -1, 3, 53, 54, -1,
+ 56, 8, 58, 10, 11, 12, 13, -1, -1, 16,
+ 17, 18, -1, -1, -1, -1, -1, -1, 25, 26,
+ 27, 28, 29, -1, -1, -1, -1, 34, 35, 36,
+ 37, 38, -1, -1, -1, 42, 43, 44, 45, 46,
+ -1, -1, -1, 50, -1, 3, 53, 54, -1, 56,
+ 8, 58, 10, 11, 12, 13, -1, -1, 16, 17,
+ 18, -1, -1, -1, -1, -1, -1, 25, 26, 27,
+ 28, 29, -1, -1, -1, -1, 34, 35, 36, 37,
+ 38, -1, -1, -1, 42, 43, 44, 45, 46, -1,
+ -1, -1, -1, -1, 3, 53, 54, -1, 56, 8,
+ 58, 10, 11, 12, 13, -1, -1, -1, -1, 18,
+ -1, -1, -1, -1, -1, -1, 25, 26, 27, 28,
+ 29, -1, -1, -1, -1, 34, 35, 36, 37, 38,
+ -1, -1, -1, 42, 43, 44, 45, 46, -1, -1,
+ -1, -1, -1, -1, 53, 54, -1, 56, -1, 58,
+ 27, 28, -1, -1, -1, -1, -1, 34, 35, 36,
+ 37, 38, -1, -1, -1, 42, 43, 44, 45, 46,
+ 34, 35, 36, 37, 38, -1, 53, 54, 42, -1,
+ -1, 45, 46, -1, -1, -1, -1, -1, -1, 53,
+ 54
+};
+
+/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing
+ symbol of state STATE-NUM. */
+static const yytype_uint8 yystos[] =
+{
+ 0, 1, 3, 8, 10, 11, 12, 13, 16, 17,
+ 18, 22, 23, 25, 26, 27, 28, 29, 34, 35,
+ 36, 37, 38, 42, 43, 44, 45, 46, 50, 51,
+ 53, 54, 56, 58, 61, 63, 64, 66, 67, 68,
+ 69, 70, 71, 72, 73, 75, 76, 77, 78, 79,
+ 80, 93, 94, 95, 96, 97, 50, 86, 87, 92,
+ 25, 25, 30, 25, 87, 87, 25, 25, 66, 68,
+ 31, 96, 97, 24, 58, 34, 35, 36, 37, 38,
+ 42, 45, 46, 53, 54, 34, 35, 36, 37, 38,
+ 42, 45, 46, 53, 54, 25, 25, 25, 28, 55,
+ 25, 25, 28, 55, 25, 25, 25, 25, 25, 25,
+ 25, 87, 87, 0, 25, 64, 63, 65, 50, 51,
+ 90, 32, 33, 48, 49, 47, 52, 22, 49, 50,
+ 51, 91, 96, 4, 50, 88, 89, 95, 92, 49,
+ 92, 14, 56, 91, 49, 92, 14, 14, 58, 92,
+ 68, 65, 19, 96, 59, 25, 25, 25, 28, 55,
+ 25, 25, 28, 55, 25, 25, 25, 25, 25, 25,
+ 25, 25, 28, 55, 25, 25, 28, 55, 25, 25,
+ 25, 25, 25, 57, 59, 63, 92, 92, 94, 94,
+ 92, 92, 96, 87, 32, 33, 48, 49, 50, 21,
+ 92, 14, 21, 56, 87, 87, 92, 92, 14, 21,
+ 56, 87, 87, 59, 68, 74, 65, 92, 94, 94,
+ 48, 49, 96, 96, 5, 6, 7, 81, 92, 92,
+ 92, 92, 92, 82, 83, 84, 92, 14, 56, 87,
+ 25, 62, 91, 87, 15, 57, 14, 56, 14, 56,
+ 86, 92, 62, 86, 15, 15, 92, 65, 74, 87,
+ 87, 7, 89, 89, 89, 89, 89, 9, 39, 40,
+ 41, 83, 92, 9, 25, 58, 85, 87, 87, 15,
+ 25, 91, 92, 57, 87, 87, 86, 86, 15, 89,
+ 91, 57, 74, 7, 4, 48, 49, 50, 39, 40,
+ 41, 9, 85, 52, 59, 15, 57, 92, 14, 56,
+ 15, 57, 15, 57, 92, 87, 92, 92, 92, 59,
+ 25, 87, 92, 14, 56, 87, 87, 14, 56, 5,
+ 81, 87, 92, 87, 87, 15, 57, 86, 86, 87,
+ 15, 57, 15, 57
+};
+
+#define yyerrok (yyerrstatus = 0)
+#define yyclearin (yychar = YYEMPTY)
+#define YYEMPTY (-2)
+#define YYEOF 0
+
+#define YYACCEPT goto yyacceptlab
+#define YYABORT goto yyabortlab
+#define YYERROR goto yyerrorlab
+
+
+/* Like YYERROR except do call yyerror. This remains here temporarily
+ to ease the transition to the new meaning of YYERROR, for GCC.
+ Once GCC version 2 has supplanted version 1, this can go. */
+
+#define YYFAIL goto yyerrlab
+
+#define YYRECOVERING() (!!yyerrstatus)
+
+#define YYBACKUP(Token, Value) \
+do \
+ if (yychar == YYEMPTY && yylen == 1) \
+ { \
+ yychar = (Token); \
+ yylval = (Value); \
+ yytoken = YYTRANSLATE (yychar); \
+ YYPOPSTACK (1); \
+ goto yybackup; \
+ } \
+ else \
+ { \
+ yyerror (YY_("syntax error: cannot back up")); \
+ YYERROR; \
+ } \
+while (YYID (0))
+
+
+#define YYTERROR 1
+#define YYERRCODE 256
+
+
+/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N].
+ If N is 0, then set CURRENT to the empty location which ends
+ the previous symbol: RHS[0] (always defined). */
+
+#define YYRHSLOC(Rhs, K) ((Rhs)[K])
+#ifndef YYLLOC_DEFAULT
+# define YYLLOC_DEFAULT(Current, Rhs, N) \
+ do \
+ if (YYID (N)) \
+ { \
+ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \
+ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \
+ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \
+ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \
+ } \
+ else \
+ { \
+ (Current).first_line = (Current).last_line = \
+ YYRHSLOC (Rhs, 0).last_line; \
+ (Current).first_column = (Current).last_column = \
+ YYRHSLOC (Rhs, 0).last_column; \
+ } \
+ while (YYID (0))
+#endif
+
+
+/* YY_LOCATION_PRINT -- Print the location on the stream.
+ This macro was not mandated originally: define only if we know
+ we won't break user code: when these are the locations we know. */
+
+#ifndef YY_LOCATION_PRINT
+# if YYLTYPE_IS_TRIVIAL
+# define YY_LOCATION_PRINT(File, Loc) \
+ fprintf (File, "%d.%d-%d.%d", \
+ (Loc).first_line, (Loc).first_column, \
+ (Loc).last_line, (Loc).last_column)
+# else
+# define YY_LOCATION_PRINT(File, Loc) ((void) 0)
+# endif
+#endif
+
+
+/* YYLEX -- calling `yylex' with the right arguments. */
+
+#ifdef YYLEX_PARAM
+# define YYLEX yylex (YYLEX_PARAM)
+#else
+# define YYLEX yylex ()
+#endif
+
+/* Enable debugging if requested. */
+#if YYDEBUG
+
+# ifndef YYFPRINTF
+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
+# define YYFPRINTF fprintf
+# endif
+
+# define YYDPRINTF(Args) \
+do { \
+ if (yydebug) \
+ YYFPRINTF Args; \
+} while (YYID (0))
+
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \
+do { \
+ if (yydebug) \
+ { \
+ YYFPRINTF (stderr, "%s ", Title); \
+ yy_symbol_print (stderr, \
+ Type, Value); \
+ YYFPRINTF (stderr, "\n"); \
+ } \
+} while (YYID (0))
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_value_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (!yyvaluep)
+ return;
+# ifdef YYPRINT
+ if (yytype < YYNTOKENS)
+ YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep);
+# else
+ YYUSE (yyoutput);
+# endif
+ switch (yytype)
+ {
+ default:
+ break;
+ }
+}
+
+
+/*--------------------------------.
+| Print this symbol on YYOUTPUT. |
+`--------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep)
+#else
+static void
+yy_symbol_print (yyoutput, yytype, yyvaluep)
+ FILE *yyoutput;
+ int yytype;
+ YYSTYPE const * const yyvaluep;
+#endif
+{
+ if (yytype < YYNTOKENS)
+ YYFPRINTF (yyoutput, "token %s (", yytname[yytype]);
+ else
+ YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]);
+
+ yy_symbol_value_print (yyoutput, yytype, yyvaluep);
+ YYFPRINTF (yyoutput, ")");
+}
+
+/*------------------------------------------------------------------.
+| yy_stack_print -- Print the state stack from its BOTTOM up to its |
+| TOP (included). |
+`------------------------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_stack_print (yytype_int16 *bottom, yytype_int16 *top)
+#else
+static void
+yy_stack_print (bottom, top)
+ yytype_int16 *bottom;
+ yytype_int16 *top;
+#endif
+{
+ YYFPRINTF (stderr, "Stack now");
+ for (; bottom <= top; ++bottom)
+ YYFPRINTF (stderr, " %d", *bottom);
+ YYFPRINTF (stderr, "\n");
+}
+
+# define YY_STACK_PRINT(Bottom, Top) \
+do { \
+ if (yydebug) \
+ yy_stack_print ((Bottom), (Top)); \
+} while (YYID (0))
+
+
+/*------------------------------------------------.
+| Report that the YYRULE is going to be reduced. |
+`------------------------------------------------*/
+
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yy_reduce_print (YYSTYPE *yyvsp, int yyrule)
+#else
+static void
+yy_reduce_print (yyvsp, yyrule)
+ YYSTYPE *yyvsp;
+ int yyrule;
+#endif
+{
+ int yynrhs = yyr2[yyrule];
+ int yyi;
+ unsigned long int yylno = yyrline[yyrule];
+ YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n",
+ yyrule - 1, yylno);
+ /* The symbols being reduced. */
+ for (yyi = 0; yyi < yynrhs; yyi++)
+ {
+ fprintf (stderr, " $%d = ", yyi + 1);
+ yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi],
+ &(yyvsp[(yyi + 1) - (yynrhs)])
+ );
+ fprintf (stderr, "\n");
+ }
+}
+
+# define YY_REDUCE_PRINT(Rule) \
+do { \
+ if (yydebug) \
+ yy_reduce_print (yyvsp, Rule); \
+} while (YYID (0))
+
+/* Nonzero means print parse trace. It is left uninitialized so that
+ multiple parsers can coexist. */
+int yydebug;
+#else /* !YYDEBUG */
+# define YYDPRINTF(Args)
+# define YY_SYMBOL_PRINT(Title, Type, Value, Location)
+# define YY_STACK_PRINT(Bottom, Top)
+# define YY_REDUCE_PRINT(Rule)
+#endif /* !YYDEBUG */
+
+
+/* YYINITDEPTH -- initial size of the parser's stacks. */
+#ifndef YYINITDEPTH
+# define YYINITDEPTH 200
+#endif
+
+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
+ if the built-in stack extension method is used).
+
+ Do not make this value too large; the results are undefined if
+ YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH)
+ evaluated with infinite-precision integer arithmetic. */
+
+#ifndef YYMAXDEPTH
+# define YYMAXDEPTH 10000
+#endif
+
+
+
+#if YYERROR_VERBOSE
+
+# ifndef yystrlen
+# if defined __GLIBC__ && defined _STRING_H
+# define yystrlen strlen
+# else
+/* Return the length of YYSTR. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static YYSIZE_T
+yystrlen (const char *yystr)
+#else
+static YYSIZE_T
+yystrlen (yystr)
+ const char *yystr;
+#endif
+{
+ YYSIZE_T yylen;
+ for (yylen = 0; yystr[yylen]; yylen++)
+ continue;
+ return yylen;
+}
+# endif
+# endif
+
+# ifndef yystpcpy
+# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE
+# define yystpcpy stpcpy
+# else
+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
+ YYDEST. */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static char *
+yystpcpy (char *yydest, const char *yysrc)
+#else
+static char *
+yystpcpy (yydest, yysrc)
+ char *yydest;
+ const char *yysrc;
+#endif
+{
+ char *yyd = yydest;
+ const char *yys = yysrc;
+
+ while ((*yyd++ = *yys++) != '\0')
+ continue;
+
+ return yyd - 1;
+}
+# endif
+# endif
+
+# ifndef yytnamerr
+/* Copy to YYRES the contents of YYSTR after stripping away unnecessary
+ quotes and backslashes, so that it's suitable for yyerror. The
+ heuristic is that double-quoting is unnecessary unless the string
+ contains an apostrophe, a comma, or backslash (other than
+ backslash-backslash). YYSTR is taken from yytname. If YYRES is
+ null, do not copy; instead, return the length of what the result
+ would have been. */
+static YYSIZE_T
+yytnamerr (char *yyres, const char *yystr)
+{
+ if (*yystr == '"')
+ {
+ YYSIZE_T yyn = 0;
+ char const *yyp = yystr;
+
+ for (;;)
+ switch (*++yyp)
+ {
+ case '\'':
+ case ',':
+ goto do_not_strip_quotes;
+
+ case '\\':
+ if (*++yyp != '\\')
+ goto do_not_strip_quotes;
+ /* Fall through. */
+ default:
+ if (yyres)
+ yyres[yyn] = *yyp;
+ yyn++;
+ break;
+
+ case '"':
+ if (yyres)
+ yyres[yyn] = '\0';
+ return yyn;
+ }
+ do_not_strip_quotes: ;
+ }
+
+ if (! yyres)
+ return yystrlen (yystr);
+
+ return yystpcpy (yyres, yystr) - yyres;
+}
+# endif
+
+/* Copy into YYRESULT an error message about the unexpected token
+ YYCHAR while in state YYSTATE. Return the number of bytes copied,
+ including the terminating null byte. If YYRESULT is null, do not
+ copy anything; just return the number of bytes that would be
+ copied. As a special case, return 0 if an ordinary "syntax error"
+ message will do. Return YYSIZE_MAXIMUM if overflow occurs during
+ size calculation. */
+static YYSIZE_T
+yysyntax_error (char *yyresult, int yystate, int yychar)
+{
+ int yyn = yypact[yystate];
+
+ if (! (YYPACT_NINF < yyn && yyn <= YYLAST))
+ return 0;
+ else
+ {
+ int yytype = YYTRANSLATE (yychar);
+ YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]);
+ YYSIZE_T yysize = yysize0;
+ YYSIZE_T yysize1;
+ int yysize_overflow = 0;
+ enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 };
+ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM];
+ int yyx;
+
+# if 0
+ /* This is so xgettext sees the translatable formats that are
+ constructed on the fly. */
+ YY_("syntax error, unexpected %s");
+ YY_("syntax error, unexpected %s, expecting %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s");
+ YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s");
+# endif
+ char *yyfmt;
+ char const *yyf;
+ static char const yyunexpected[] = "syntax error, unexpected %s";
+ static char const yyexpecting[] = ", expecting %s";
+ static char const yyor[] = " or %s";
+ char yyformat[sizeof yyunexpected
+ + sizeof yyexpecting - 1
+ + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2)
+ * (sizeof yyor - 1))];
+ char const *yyprefix = yyexpecting;
+
+ /* Start YYX at -YYN if negative to avoid negative indexes in
+ YYCHECK. */
+ int yyxbegin = yyn < 0 ? -yyn : 0;
+
+ /* Stay within bounds of both yycheck and yytname. */
+ int yychecklim = YYLAST - yyn + 1;
+ int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS;
+ int yycount = 1;
+
+ yyarg[0] = yytname[yytype];
+ yyfmt = yystpcpy (yyformat, yyunexpected);
+
+ for (yyx = yyxbegin; yyx < yyxend; ++yyx)
+ if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR)
+ {
+ if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM)
+ {
+ yycount = 1;
+ yysize = yysize0;
+ yyformat[sizeof yyunexpected - 1] = '\0';
+ break;
+ }
+ yyarg[yycount++] = yytname[yyx];
+ yysize1 = yysize + yytnamerr (0, yytname[yyx]);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+ yyfmt = yystpcpy (yyfmt, yyprefix);
+ yyprefix = yyor;
+ }
+
+ yyf = YY_(yyformat);
+ yysize1 = yysize + yystrlen (yyf);
+ yysize_overflow |= (yysize1 < yysize);
+ yysize = yysize1;
+
+ if (yysize_overflow)
+ return YYSIZE_MAXIMUM;
+
+ if (yyresult)
+ {
+ /* Avoid sprintf, as that infringes on the user's name space.
+ Don't have undefined behavior even if the translation
+ produced a string with the wrong number of "%s"s. */
+ char *yyp = yyresult;
+ int yyi = 0;
+ while ((*yyp = *yyf) != '\0')
+ {
+ if (*yyp == '%' && yyf[1] == 's' && yyi < yycount)
+ {
+ yyp += yytnamerr (yyp, yyarg[yyi++]);
+ yyf += 2;
+ }
+ else
+ {
+ yyp++;
+ yyf++;
+ }
+ }
+ }
+ return yysize;
+ }
+}
+#endif /* YYERROR_VERBOSE */
+
+
+/*-----------------------------------------------.
+| Release the memory associated to this symbol. |
+`-----------------------------------------------*/
+
+/*ARGSUSED*/
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+static void
+yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep)
+#else
+static void
+yydestruct (yymsg, yytype, yyvaluep)
+ const char *yymsg;
+ int yytype;
+ YYSTYPE *yyvaluep;
+#endif
+{
+ YYUSE (yyvaluep);
+
+ if (!yymsg)
+ yymsg = "Deleting";
+ YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp);
+
+ switch (yytype)
+ {
+
+ default:
+ break;
+ }
+}
+
+
+/* Prevent warnings from -Wmissing-prototypes. */
+
+#ifdef YYPARSE_PARAM
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void *YYPARSE_PARAM);
+#else
+int yyparse ();
+#endif
+#else /* ! YYPARSE_PARAM */
+#if defined __STDC__ || defined __cplusplus
+int yyparse (void);
+#else
+int yyparse ();
+#endif
+#endif /* ! YYPARSE_PARAM */
+
+
+
+/* The look-ahead symbol. */
+int yychar;
+
+/* The semantic value of the look-ahead symbol. */
+YYSTYPE yylval;
+
+/* Number of syntax errors so far. */
+int yynerrs;
+
+
+
+/*----------.
+| yyparse. |
+`----------*/
+
+#ifdef YYPARSE_PARAM
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void *YYPARSE_PARAM)
+#else
+int
+yyparse (YYPARSE_PARAM)
+ void *YYPARSE_PARAM;
+#endif
+#else /* ! YYPARSE_PARAM */
+#if (defined __STDC__ || defined __C99__FUNC__ \
+ || defined __cplusplus || defined _MSC_VER)
+int
+yyparse (void)
+#else
+int
+yyparse ()
+
+#endif
+#endif
+{
+
+ int yystate;
+ int yyn;
+ int yyresult;
+ /* Number of tokens to shift before error messages enabled. */
+ int yyerrstatus;
+ /* Look-ahead token as an internal (translated) token number. */
+ int yytoken = 0;
+#if YYERROR_VERBOSE
+ /* Buffer for error messages, and its allocated size. */
+ char yymsgbuf[128];
+ char *yymsg = yymsgbuf;
+ YYSIZE_T yymsg_alloc = sizeof yymsgbuf;
+#endif
+
+ /* Three stacks and their tools:
+ `yyss': related to states,
+ `yyvs': related to semantic values,
+ `yyls': related to locations.
+
+ Refer to the stacks thru separate pointers, to allow yyoverflow
+ to reallocate them elsewhere. */
+
+ /* The state stack. */
+ yytype_int16 yyssa[YYINITDEPTH];
+ yytype_int16 *yyss = yyssa;
+ yytype_int16 *yyssp;
+
+ /* The semantic value stack. */
+ YYSTYPE yyvsa[YYINITDEPTH];
+ YYSTYPE *yyvs = yyvsa;
+ YYSTYPE *yyvsp;
+
+
+
+#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N))
+
+ YYSIZE_T yystacksize = YYINITDEPTH;
+
+ /* The variables used to return semantic value and location from the
+ action routines. */
+ YYSTYPE yyval;
+
+
+ /* The number of symbols on the RHS of the reduced rule.
+ Keep to zero when no symbol should be popped. */
+ int yylen = 0;
+
+ YYDPRINTF ((stderr, "Starting parse\n"));
+
+ yystate = 0;
+ yyerrstatus = 0;
+ yynerrs = 0;
+ yychar = YYEMPTY; /* Cause a token to be read. */
+
+ /* Initialize stack pointers.
+ Waste one element of value and location stack
+ so that they stay on the same level as the state stack.
+ The wasted elements are never initialized. */
+
+ yyssp = yyss;
+ yyvsp = yyvs;
+
+ goto yysetstate;
+
+/*------------------------------------------------------------.
+| yynewstate -- Push a new state, which is found in yystate. |
+`------------------------------------------------------------*/
+ yynewstate:
+ /* In all cases, when you get here, the value and location stacks
+ have just been pushed. So pushing a state here evens the stacks. */
+ yyssp++;
+
+ yysetstate:
+ *yyssp = yystate;
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ {
+ /* Get the current used size of the three stacks, in elements. */
+ YYSIZE_T yysize = yyssp - yyss + 1;
+
+#ifdef yyoverflow
+ {
+ /* Give user a chance to reallocate the stack. Use copies of
+ these so that the &'s don't force the real ones into
+ memory. */
+ YYSTYPE *yyvs1 = yyvs;
+ yytype_int16 *yyss1 = yyss;
+
+
+ /* Each stack pointer address is followed by the size of the
+ data in use in that stack, in bytes. This used to be a
+ conditional around just the two extra args, but that might
+ be undefined if yyoverflow is a macro. */
+ yyoverflow (YY_("memory exhausted"),
+ &yyss1, yysize * sizeof (*yyssp),
+ &yyvs1, yysize * sizeof (*yyvsp),
+
+ &yystacksize);
+
+ yyss = yyss1;
+ yyvs = yyvs1;
+ }
+#else /* no yyoverflow */
+# ifndef YYSTACK_RELOCATE
+ goto yyexhaustedlab;
+# else
+ /* Extend the stack our own way. */
+ if (YYMAXDEPTH <= yystacksize)
+ goto yyexhaustedlab;
+ yystacksize *= 2;
+ if (YYMAXDEPTH < yystacksize)
+ yystacksize = YYMAXDEPTH;
+
+ {
+ yytype_int16 *yyss1 = yyss;
+ union yyalloc *yyptr =
+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
+ if (! yyptr)
+ goto yyexhaustedlab;
+ YYSTACK_RELOCATE (yyss);
+ YYSTACK_RELOCATE (yyvs);
+
+# undef YYSTACK_RELOCATE
+ if (yyss1 != yyssa)
+ YYSTACK_FREE (yyss1);
+ }
+# endif
+#endif /* no yyoverflow */
+
+ yyssp = yyss + yysize - 1;
+ yyvsp = yyvs + yysize - 1;
+
+
+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
+ (unsigned long int) yystacksize));
+
+ if (yyss + yystacksize - 1 <= yyssp)
+ YYABORT;
+ }
+
+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
+
+ goto yybackup;
+
+/*-----------.
+| yybackup. |
+`-----------*/
+yybackup:
+
+ /* Do appropriate processing given the current state. Read a
+ look-ahead token if we need one and don't already have one. */
+
+ /* First try to decide what to do without reference to look-ahead token. */
+ yyn = yypact[yystate];
+ if (yyn == YYPACT_NINF)
+ goto yydefault;
+
+ /* Not known => get a look-ahead token if don't already have one. */
+
+ /* YYCHAR is either YYEMPTY or YYEOF or a valid look-ahead symbol. */
+ if (yychar == YYEMPTY)
+ {
+ YYDPRINTF ((stderr, "Reading a token: "));
+ yychar = YYLEX;
+ }
+
+ if (yychar <= YYEOF)
+ {
+ yychar = yytoken = YYEOF;
+ YYDPRINTF ((stderr, "Now at end of input.\n"));
+ }
+ else
+ {
+ yytoken = YYTRANSLATE (yychar);
+ YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc);
+ }
+
+ /* If the proper action on seeing token YYTOKEN is to reduce or to
+ detect an error, take that action. */
+ yyn += yytoken;
+ if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken)
+ goto yydefault;
+ yyn = yytable[yyn];
+ if (yyn <= 0)
+ {
+ if (yyn == 0 || yyn == YYTABLE_NINF)
+ goto yyerrlab;
+ yyn = -yyn;
+ goto yyreduce;
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ /* Count tokens shifted since error; after three, turn off error
+ status. */
+ if (yyerrstatus)
+ yyerrstatus--;
+
+ /* Shift the look-ahead token. */
+ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc);
+
+ /* Discard the shifted token unless it is eof. */
+ if (yychar != YYEOF)
+ yychar = YYEMPTY;
+
+ yystate = yyn;
+ *++yyvsp = yylval;
+
+ goto yynewstate;
+
+
+/*-----------------------------------------------------------.
+| yydefault -- do the default action for the current state. |
+`-----------------------------------------------------------*/
+yydefault:
+ yyn = yydefact[yystate];
+ if (yyn == 0)
+ goto yyerrlab;
+ goto yyreduce;
+
+
+/*-----------------------------.
+| yyreduce -- Do a reduction. |
+`-----------------------------*/
+yyreduce:
+ /* yyn is the number of a rule to reduce with. */
+ yylen = yyr2[yyn];
+
+ /* If YYLEN is nonzero, implement the default value of the action:
+ `$$ = $1'.
+
+ Otherwise, the following line sets YYVAL to garbage.
+ This behavior is undocumented and Bison
+ users should not rely upon it. Assigning to YYVAL
+ unconditionally makes the parser a bit smaller, and it avoids a
+ GCC warning that YYVAL may be used uninitialized. */
+ yyval = yyvsp[1-yylen];
+
+
+ YY_REDUCE_PRINT (yyn);
+ switch (yyn)
+ {
+ case 2:
+#line 374 "/Users/chet/src/bash/src/parse.y"
+ {
+ /* Case of regular command. Discard the error
+ safety net,and return the command just parsed. */
+ global_command = (yyvsp[(1) - (2)].command);
+ eof_encountered = 0;
+ /* discard_parser_constructs (0); */
+ if (parser_state & PST_CMDSUBST)
+ parser_state |= PST_EOFTOKEN;
+ YYACCEPT;
+ }
+ break;
+
+ case 3:
+#line 385 "/Users/chet/src/bash/src/parse.y"
+ {
+ /* Case of regular command, but not a very
+ interesting one. Return a NULL command. */
+ global_command = (COMMAND *)NULL;
+ if (parser_state & PST_CMDSUBST)
+ parser_state |= PST_EOFTOKEN;
+ YYACCEPT;
+ }
+ break;
+
+ case 4:
+#line 394 "/Users/chet/src/bash/src/parse.y"
+ {
+ /* Error during parsing. Return NULL command. */
+ global_command = (COMMAND *)NULL;
+ eof_encountered = 0;
+ /* discard_parser_constructs (1); */
+ if (interactive && parse_and_execute_level == 0)
+ {
+ YYACCEPT;
+ }
+ else
+ {
+ YYABORT;
+ }
+ }
+ break;
+
+ case 5:
+#line 409 "/Users/chet/src/bash/src/parse.y"
+ {
+ /* Case of EOF seen by itself. Do ignoreeof or
+ not. */
+ global_command = (COMMAND *)NULL;
+ handle_eof_input_unit ();
+ YYACCEPT;
+ }
+ break;
+
+ case 6:
+#line 419 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(1) - (1)].word), (WORD_LIST *)NULL); }
+ break;
+
+ case 7:
+#line 421 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(2) - (2)].word), (yyvsp[(1) - (2)].word_list)); }
+ break;
+
+ case 8:
+#line 425 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+ redir.filename = (yyvsp[(2) - (2)].word);
+ (yyval.redirect) = make_redirection (source, r_output_direction, redir, 0);
+ }
+ break;
+
+ case 9:
+#line 431 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+ redir.filename = (yyvsp[(2) - (2)].word);
+ (yyval.redirect) = make_redirection (source, r_input_direction, redir, 0);
+ }
+ break;
+
+ case 10:
+#line 437 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_output_direction, redir, 0);
+ }
+ break;
+
+ case 11:
+#line 443 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_input_direction, redir, 0);
+ }
+ break;
+
+ case 12:
+#line 449 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_output_direction, redir, REDIR_VARASSIGN);
+ }
+ break;
+
+ case 13:
+#line 455 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_input_direction, redir, REDIR_VARASSIGN);
+ }
+ break;
+
+ case 14:
+#line 461 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+ redir.filename = (yyvsp[(2) - (2)].word);
+ (yyval.redirect) = make_redirection (source, r_appending_to, redir, 0);
+ }
+ break;
+
+ case 15:
+#line 467 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_appending_to, redir, 0);
+ }
+ break;
+
+ case 16:
+#line 473 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_appending_to, redir, REDIR_VARASSIGN);
+ }
+ break;
+
+ case 17:
+#line 479 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+ redir.filename = (yyvsp[(2) - (2)].word);
+ (yyval.redirect) = make_redirection (source, r_output_force, redir, 0);
+ }
+ break;
+
+ case 18:
+#line 485 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_output_force, redir, 0);
+ }
+ break;
+
+ case 19:
+#line 491 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_output_force, redir, REDIR_VARASSIGN);
+ }
+ break;
+
+ case 20:
+#line 497 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+ redir.filename = (yyvsp[(2) - (2)].word);
+ (yyval.redirect) = make_redirection (source, r_input_output, redir, 0);
+ }
+ break;
+
+ case 21:
+#line 503 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_input_output, redir, 0);
+ }
+ break;
+
+ case 22:
+#line 509 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_input_output, redir, REDIR_VARASSIGN);
+ }
+ break;
+
+ case 23:
+#line 515 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+ redir.filename = (yyvsp[(2) - (2)].word);
+ (yyval.redirect) = make_redirection (source, r_reading_until, redir, 0);
+ redir_stack[need_here_doc++] = (yyval.redirect);
+ }
+ break;
+
+ case 24:
+#line 522 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_reading_until, redir, 0);
+ redir_stack[need_here_doc++] = (yyval.redirect);
+ }
+ break;
+
+ case 25:
+#line 529 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_reading_until, redir, REDIR_VARASSIGN);
+ redir_stack[need_here_doc++] = (yyval.redirect);
+ }
+ break;
+
+ case 26:
+#line 536 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+ redir.filename = (yyvsp[(2) - (2)].word);
+ (yyval.redirect) = make_redirection (source, r_deblank_reading_until, redir, 0);
+ redir_stack[need_here_doc++] = (yyval.redirect);
+ }
+ break;
+
+ case 27:
+#line 543 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_deblank_reading_until, redir, 0);
+ redir_stack[need_here_doc++] = (yyval.redirect);
+ }
+ break;
+
+ case 28:
+#line 550 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_deblank_reading_until, redir, REDIR_VARASSIGN);
+ redir_stack[need_here_doc++] = (yyval.redirect);
+ }
+ break;
+
+ case 29:
+#line 557 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+ redir.filename = (yyvsp[(2) - (2)].word);
+ (yyval.redirect) = make_redirection (source, r_reading_string, redir, 0);
+ }
+ break;
+
+ case 30:
+#line 563 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_reading_string, redir, 0);
+ }
+ break;
+
+ case 31:
+#line 569 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_reading_string, redir, REDIR_VARASSIGN);
+ }
+ break;
+
+ case 32:
+#line 575 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+ redir.dest = (yyvsp[(2) - (2)].number);
+ (yyval.redirect) = make_redirection (source, r_duplicating_input, redir, 0);
+ }
+ break;
+
+ case 33:
+#line 581 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.dest = (yyvsp[(3) - (3)].number);
+ (yyval.redirect) = make_redirection (source, r_duplicating_input, redir, 0);
+ }
+ break;
+
+ case 34:
+#line 587 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.dest = (yyvsp[(3) - (3)].number);
+ (yyval.redirect) = make_redirection (source, r_duplicating_input, redir, REDIR_VARASSIGN);
+ }
+ break;
+
+ case 35:
+#line 593 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+ redir.dest = (yyvsp[(2) - (2)].number);
+ (yyval.redirect) = make_redirection (source, r_duplicating_output, redir, 0);
+ }
+ break;
+
+ case 36:
+#line 599 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.dest = (yyvsp[(3) - (3)].number);
+ (yyval.redirect) = make_redirection (source, r_duplicating_output, redir, 0);
+ }
+ break;
+
+ case 37:
+#line 605 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.dest = (yyvsp[(3) - (3)].number);
+ (yyval.redirect) = make_redirection (source, r_duplicating_output, redir, REDIR_VARASSIGN);
+ }
+ break;
+
+ case 38:
+#line 611 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+ redir.filename = (yyvsp[(2) - (2)].word);
+ (yyval.redirect) = make_redirection (source, r_duplicating_input_word, redir, 0);
+ }
+ break;
+
+ case 39:
+#line 617 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_duplicating_input_word, redir, 0);
+ }
+ break;
+
+ case 40:
+#line 623 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_duplicating_input_word, redir, REDIR_VARASSIGN);
+ }
+ break;
+
+ case 41:
+#line 629 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+ redir.filename = (yyvsp[(2) - (2)].word);
+ (yyval.redirect) = make_redirection (source, r_duplicating_output_word, redir, 0);
+ }
+ break;
+
+ case 42:
+#line 635 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_duplicating_output_word, redir, 0);
+ }
+ break;
+
+ case 43:
+#line 641 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.filename = (yyvsp[(3) - (3)].word);
+ (yyval.redirect) = make_redirection (source, r_duplicating_output_word, redir, REDIR_VARASSIGN);
+ }
+ break;
+
+ case 44:
+#line 647 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+ redir.dest = 0;
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, 0);
+ }
+ break;
+
+ case 45:
+#line 653 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.dest = 0;
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, 0);
+ }
+ break;
+
+ case 46:
+#line 659 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.dest = 0;
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, REDIR_VARASSIGN);
+ }
+ break;
+
+ case 47:
+#line 665 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = 0;
+ redir.dest = 0;
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, 0);
+ }
+ break;
+
+ case 48:
+#line 671 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = (yyvsp[(1) - (3)].number);
+ redir.dest = 0;
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, 0);
+ }
+ break;
+
+ case 49:
+#line 677 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.filename = (yyvsp[(1) - (3)].word);
+ redir.dest = 0;
+ (yyval.redirect) = make_redirection (source, r_close_this, redir, REDIR_VARASSIGN);
+ }
+ break;
+
+ case 50:
+#line 683 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+ redir.filename = (yyvsp[(2) - (2)].word);
+ (yyval.redirect) = make_redirection (source, r_err_and_out, redir, 0);
+ }
+ break;
+
+ case 51:
+#line 689 "/Users/chet/src/bash/src/parse.y"
+ {
+ source.dest = 1;
+ redir.filename = (yyvsp[(2) - (2)].word);
+ (yyval.redirect) = make_redirection (source, r_append_err_and_out, redir, 0);
+ }
+ break;
+
+ case 52:
+#line 697 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.element).word = (yyvsp[(1) - (1)].word); (yyval.element).redirect = 0; }
+ break;
+
+ case 53:
+#line 699 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.element).word = (yyvsp[(1) - (1)].word); (yyval.element).redirect = 0; }
+ break;
+
+ case 54:
+#line 701 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.element).redirect = (yyvsp[(1) - (1)].redirect); (yyval.element).word = 0; }
+ break;
+
+ case 55:
+#line 705 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.redirect) = (yyvsp[(1) - (1)].redirect);
+ }
+ break;
+
+ case 56:
+#line 709 "/Users/chet/src/bash/src/parse.y"
+ {
+ register REDIRECT *t;
+
+ for (t = (yyvsp[(1) - (2)].redirect); t->next; t = t->next)
+ ;
+ t->next = (yyvsp[(2) - (2)].redirect);
+ (yyval.redirect) = (yyvsp[(1) - (2)].redirect);
+ }
+ break;
+
+ case 57:
+#line 720 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_simple_command ((yyvsp[(1) - (1)].element), (COMMAND *)NULL); }
+ break;
+
+ case 58:
+#line 722 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_simple_command ((yyvsp[(2) - (2)].element), (yyvsp[(1) - (2)].command)); }
+ break;
+
+ case 59:
+#line 726 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = clean_simple_command ((yyvsp[(1) - (1)].command)); }
+ break;
+
+ case 60:
+#line 728 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 61:
+#line 730 "/Users/chet/src/bash/src/parse.y"
+ {
+ COMMAND *tc;
+
+ tc = (yyvsp[(1) - (2)].command);
+ if (tc->redirects)
+ {
+ register REDIRECT *t;
+ for (t = tc->redirects; t->next; t = t->next)
+ ;
+ t->next = (yyvsp[(2) - (2)].redirect);
+ }
+ else
+ tc->redirects = (yyvsp[(2) - (2)].redirect);
+ (yyval.command) = (yyvsp[(1) - (2)].command);
+ }
+ break;
+
+ case 62:
+#line 746 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 63:
+#line 748 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 64:
+#line 752 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 65:
+#line 754 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 66:
+#line 756 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_while_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command)); }
+ break;
+
+ case 67:
+#line 758 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_until_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command)); }
+ break;
+
+ case 68:
+#line 760 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 69:
+#line 762 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 70:
+#line 764 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 71:
+#line 766 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 72:
+#line 768 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 73:
+#line 770 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 74:
+#line 772 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 75:
+#line 776 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 76:
+#line 781 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 77:
+#line 786 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 78:
+#line 791 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 79:
+#line 796 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 80:
+#line 801 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 81:
+#line 806 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (9)].word), (WORD_LIST *)NULL, (yyvsp[(8) - (9)].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 82:
+#line 811 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_for_command ((yyvsp[(2) - (9)].word), (WORD_LIST *)NULL, (yyvsp[(8) - (9)].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 83:
+#line 818 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (7)].word_list), (yyvsp[(6) - (7)].command), arith_for_lineno);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 84:
+#line 823 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (7)].word_list), (yyvsp[(6) - (7)].command), arith_for_lineno);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 85:
+#line 828 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (5)].word_list), (yyvsp[(4) - (5)].command), arith_for_lineno);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 86:
+#line 833 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_arith_for_command ((yyvsp[(2) - (5)].word_list), (yyvsp[(4) - (5)].command), arith_for_lineno);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 87:
+#line 840 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 88:
+#line 845 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (6)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(5) - (6)].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 89:
+#line 850 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 90:
+#line 855 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (7)].word), add_string_to_list ("\"$@\"", (WORD_LIST *)NULL), (yyvsp[(6) - (7)].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 91:
+#line 860 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 92:
+#line 865 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_select_command ((yyvsp[(2) - (10)].word), REVERSE_LIST ((yyvsp[(5) - (10)].word_list), WORD_LIST *), (yyvsp[(9) - (10)].command), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 93:
+#line 872 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[(2) - (6)].word), (PATTERN_LIST *)NULL, word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 94:
+#line 877 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[(2) - (7)].word), (yyvsp[(5) - (7)].pattern), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 95:
+#line 882 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_case_command ((yyvsp[(2) - (6)].word), (yyvsp[(5) - (6)].pattern), word_lineno[word_top]);
+ if (word_top > 0) word_top--;
+ }
+ break;
+
+ case 96:
+#line 889 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[(1) - (5)].word), (yyvsp[(5) - (5)].command), function_dstart, function_bstart); }
+ break;
+
+ case 97:
+#line 892 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[(2) - (6)].word), (yyvsp[(6) - (6)].command), function_dstart, function_bstart); }
+ break;
+
+ case 98:
+#line 895 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_function_def ((yyvsp[(2) - (4)].word), (yyvsp[(4) - (4)].command), function_dstart, function_bstart); }
+ break;
+
+ case 99:
+#line 899 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 100:
+#line 901 "/Users/chet/src/bash/src/parse.y"
+ {
+ COMMAND *tc;
+
+ tc = (yyvsp[(1) - (2)].command);
+ /* According to Posix.2 3.9.5, redirections
+ specified after the body of a function should
+ be attached to the function and performed when
+ the function is executed, not as part of the
+ function definition command. */
+ /* XXX - I don't think it matters, but we might
+ want to change this in the future to avoid
+ problems differentiating between a function
+ definition with a redirection and a function
+ definition containing a single command with a
+ redirection. The two are semantically equivalent,
+ though -- the only difference is in how the
+ command printing code displays the redirections. */
+ if (tc->redirects)
+ {
+ register REDIRECT *t;
+ for (t = tc->redirects; t->next; t = t->next)
+ ;
+ t->next = (yyvsp[(2) - (2)].redirect);
+ }
+ else
+ tc->redirects = (yyvsp[(2) - (2)].redirect);
+ (yyval.command) = (yyvsp[(1) - (2)].command);
+ }
+ break;
+
+ case 101:
+#line 932 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_subshell_command ((yyvsp[(2) - (3)].command));
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL;
+ }
+ break;
+
+ case 102:
+#line 939 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_coproc_command ("COPROC", (yyvsp[(2) - (2)].command));
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+ break;
+
+ case 103:
+#line 944 "/Users/chet/src/bash/src/parse.y"
+ {
+ COMMAND *tc;
+
+ tc = (yyvsp[(2) - (3)].command);
+ if (tc->redirects)
+ {
+ register REDIRECT *t;
+ for (t = tc->redirects; t->next; t = t->next)
+ ;
+ t->next = (yyvsp[(3) - (3)].redirect);
+ }
+ else
+ tc->redirects = (yyvsp[(3) - (3)].redirect);
+ (yyval.command) = make_coproc_command ("COPROC", (yyvsp[(2) - (3)].command));
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+ break;
+
+ case 104:
+#line 961 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_coproc_command ((yyvsp[(2) - (3)].word)->word, (yyvsp[(3) - (3)].command));
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+ break;
+
+ case 105:
+#line 966 "/Users/chet/src/bash/src/parse.y"
+ {
+ COMMAND *tc;
+
+ tc = (yyvsp[(3) - (4)].command);
+ if (tc->redirects)
+ {
+ register REDIRECT *t;
+ for (t = tc->redirects; t->next; t = t->next)
+ ;
+ t->next = (yyvsp[(4) - (4)].redirect);
+ }
+ else
+ tc->redirects = (yyvsp[(4) - (4)].redirect);
+ (yyval.command) = make_coproc_command ((yyvsp[(2) - (4)].word)->word, (yyvsp[(3) - (4)].command));
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+ break;
+
+ case 106:
+#line 983 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = make_coproc_command ("COPROC", clean_simple_command ((yyvsp[(2) - (2)].command)));
+ (yyval.command)->flags |= CMD_WANT_SUBSHELL|CMD_COPROC_SUBSHELL;
+ }
+ break;
+
+ case 107:
+#line 990 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command), (COMMAND *)NULL); }
+ break;
+
+ case 108:
+#line 992 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (7)].command), (yyvsp[(4) - (7)].command), (yyvsp[(6) - (7)].command)); }
+ break;
+
+ case 109:
+#line 994 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (6)].command), (yyvsp[(4) - (6)].command), (yyvsp[(5) - (6)].command)); }
+ break;
+
+ case 110:
+#line 999 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_group_command ((yyvsp[(2) - (3)].command)); }
+ break;
+
+ case 111:
+#line 1003 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_arith_command ((yyvsp[(1) - (1)].word_list)); }
+ break;
+
+ case 112:
+#line 1007 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(2) - (3)].command); }
+ break;
+
+ case 113:
+#line 1011 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (4)].command), (yyvsp[(4) - (4)].command), (COMMAND *)NULL); }
+ break;
+
+ case 114:
+#line 1013 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (6)].command), (yyvsp[(4) - (6)].command), (yyvsp[(6) - (6)].command)); }
+ break;
+
+ case 115:
+#line 1015 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = make_if_command ((yyvsp[(2) - (5)].command), (yyvsp[(4) - (5)].command), (yyvsp[(5) - (5)].command)); }
+ break;
+
+ case 117:
+#line 1020 "/Users/chet/src/bash/src/parse.y"
+ { (yyvsp[(2) - (2)].pattern)->next = (yyvsp[(1) - (2)].pattern); (yyval.pattern) = (yyvsp[(2) - (2)].pattern); }
+ break;
+
+ case 118:
+#line 1024 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(2) - (4)].word_list), (yyvsp[(4) - (4)].command)); }
+ break;
+
+ case 119:
+#line 1026 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(2) - (4)].word_list), (COMMAND *)NULL); }
+ break;
+
+ case 120:
+#line 1028 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(3) - (5)].word_list), (yyvsp[(5) - (5)].command)); }
+ break;
+
+ case 121:
+#line 1030 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = make_pattern_list ((yyvsp[(3) - (5)].word_list), (COMMAND *)NULL); }
+ break;
+
+ case 122:
+#line 1034 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
+ break;
+
+ case 123:
+#line 1036 "/Users/chet/src/bash/src/parse.y"
+ { (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
+ break;
+
+ case 124:
+#line 1038 "/Users/chet/src/bash/src/parse.y"
+ { (yyvsp[(1) - (2)].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
+ break;
+
+ case 125:
+#line 1040 "/Users/chet/src/bash/src/parse.y"
+ { (yyvsp[(2) - (3)].pattern)->flags |= CASEPAT_FALLTHROUGH; (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
+ break;
+
+ case 126:
+#line 1042 "/Users/chet/src/bash/src/parse.y"
+ { (yyvsp[(1) - (2)].pattern)->flags |= CASEPAT_TESTNEXT; (yyval.pattern) = (yyvsp[(1) - (2)].pattern); }
+ break;
+
+ case 127:
+#line 1044 "/Users/chet/src/bash/src/parse.y"
+ { (yyvsp[(2) - (3)].pattern)->flags |= CASEPAT_TESTNEXT; (yyvsp[(2) - (3)].pattern)->next = (yyvsp[(1) - (3)].pattern); (yyval.pattern) = (yyvsp[(2) - (3)].pattern); }
+ break;
+
+ case 128:
+#line 1048 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(1) - (1)].word), (WORD_LIST *)NULL); }
+ break;
+
+ case 129:
+#line 1050 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.word_list) = make_word_list ((yyvsp[(3) - (3)].word), (yyvsp[(1) - (3)].word_list)); }
+ break;
+
+ case 130:
+#line 1059 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[(2) - (2)].command);
+ if (need_here_doc)
+ gather_here_documents ();
+ }
+ break;
+
+ case 132:
+#line 1068 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[(2) - (2)].command);
+ }
+ break;
+
+ case 134:
+#line 1075 "/Users/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[(1) - (3)].command)->type == cm_connection)
+ (yyval.command) = connect_async_list ((yyvsp[(1) - (3)].command), (COMMAND *)NULL, '&');
+ else
+ (yyval.command) = command_connect ((yyvsp[(1) - (3)].command), (COMMAND *)NULL, '&');
+ }
+ break;
+
+ case 136:
+#line 1086 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), AND_AND); }
+ break;
+
+ case 137:
+#line 1088 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), OR_OR); }
+ break;
+
+ case 138:
+#line 1090 "/Users/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[(1) - (4)].command)->type == cm_connection)
+ (yyval.command) = connect_async_list ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), '&');
+ else
+ (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), '&');
+ }
+ break;
+
+ case 139:
+#line 1097 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), ';'); }
+ break;
+
+ case 140:
+#line 1099 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), ';'); }
+ break;
+
+ case 141:
+#line 1101 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 144:
+#line 1109 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.number) = '\n'; }
+ break;
+
+ case 145:
+#line 1111 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.number) = ';'; }
+ break;
+
+ case 146:
+#line 1113 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.number) = yacc_EOF; }
+ break;
+
+ case 149:
+#line 1127 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[(1) - (1)].command);
+ if (need_here_doc)
+ gather_here_documents ();
+ if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token)
+ {
+ global_command = (yyvsp[(1) - (1)].command);
+ eof_encountered = 0;
+ rewind_input_string ();
+ YYACCEPT;
+ }
+ }
+ break;
+
+ case 150:
+#line 1140 "/Users/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[(1) - (2)].command)->type == cm_connection)
+ (yyval.command) = connect_async_list ((yyvsp[(1) - (2)].command), (COMMAND *)NULL, '&');
+ else
+ (yyval.command) = command_connect ((yyvsp[(1) - (2)].command), (COMMAND *)NULL, '&');
+ if (need_here_doc)
+ gather_here_documents ();
+ if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token)
+ {
+ global_command = (yyvsp[(1) - (2)].command);
+ eof_encountered = 0;
+ rewind_input_string ();
+ YYACCEPT;
+ }
+ }
+ break;
+
+ case 151:
+#line 1156 "/Users/chet/src/bash/src/parse.y"
+ {
+ (yyval.command) = (yyvsp[(1) - (2)].command);
+ if (need_here_doc)
+ gather_here_documents ();
+ if ((parser_state & PST_CMDSUBST) && current_token == shell_eof_token)
+ {
+ global_command = (yyvsp[(1) - (2)].command);
+ eof_encountered = 0;
+ rewind_input_string ();
+ YYACCEPT;
+ }
+ }
+ break;
+
+ case 152:
+#line 1171 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), AND_AND); }
+ break;
+
+ case 153:
+#line 1173 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), OR_OR); }
+ break;
+
+ case 154:
+#line 1175 "/Users/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[(1) - (3)].command)->type == cm_connection)
+ (yyval.command) = connect_async_list ((yyvsp[(1) - (3)].command), (yyvsp[(3) - (3)].command), '&');
+ else
+ (yyval.command) = command_connect ((yyvsp[(1) - (3)].command), (yyvsp[(3) - (3)].command), '&');
+ }
+ break;
+
+ case 155:
+#line 1182 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (3)].command), (yyvsp[(3) - (3)].command), ';'); }
+ break;
+
+ case 156:
+#line 1185 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 157:
+#line 1189 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 158:
+#line 1191 "/Users/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[(2) - (2)].command))
+ (yyvsp[(2) - (2)].command)->flags |= CMD_INVERT_RETURN;
+ (yyval.command) = (yyvsp[(2) - (2)].command);
+ }
+ break;
+
+ case 159:
+#line 1197 "/Users/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[(2) - (2)].command))
+ (yyvsp[(2) - (2)].command)->flags |= (yyvsp[(1) - (2)].number);
+ (yyval.command) = (yyvsp[(2) - (2)].command);
+ }
+ break;
+
+ case 160:
+#line 1203 "/Users/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[(3) - (3)].command))
+ (yyvsp[(3) - (3)].command)->flags |= (yyvsp[(1) - (3)].number)|CMD_INVERT_RETURN;
+ (yyval.command) = (yyvsp[(3) - (3)].command);
+ }
+ break;
+
+ case 161:
+#line 1209 "/Users/chet/src/bash/src/parse.y"
+ {
+ if ((yyvsp[(3) - (3)].command))
+ (yyvsp[(3) - (3)].command)->flags |= (yyvsp[(2) - (3)].number)|CMD_INVERT_RETURN;
+ (yyval.command) = (yyvsp[(3) - (3)].command);
+ }
+ break;
+
+ case 162:
+#line 1215 "/Users/chet/src/bash/src/parse.y"
+ {
+ ELEMENT x;
+
+ /* Boy, this is unclean. `time' by itself can
+ time a null command. We cheat and push a
+ newline back if the list_terminator was a newline
+ to avoid the double-newline problem (one to
+ terminate this, one to terminate the command) */
+ x.word = 0;
+ x.redirect = 0;
+ (yyval.command) = make_simple_command (x, (COMMAND *)NULL);
+ (yyval.command)->flags |= (yyvsp[(1) - (2)].number);
+ /* XXX - let's cheat and push a newline back */
+ if ((yyvsp[(2) - (2)].number) == '\n')
+ token_to_read = '\n';
+ }
+ break;
+
+ case 163:
+#line 1235 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), '|'); }
+ break;
+
+ case 164:
+#line 1237 "/Users/chet/src/bash/src/parse.y"
+ {
+ /* Make cmd1 |& cmd2 equivalent to cmd1 2>&1 | cmd2 */
+ COMMAND *tc;
+ REDIRECTEE rd, sd;
+ REDIRECT *r;
+
+ tc = (yyvsp[(1) - (4)].command)->type == cm_simple ? (COMMAND *)(yyvsp[(1) - (4)].command)->value.Simple : (yyvsp[(1) - (4)].command);
+ sd.dest = 2;
+ rd.dest = 1;
+ r = make_redirection (sd, r_duplicating_output, rd, 0);
+ if (tc->redirects)
+ {
+ register REDIRECT *t;
+ for (t = tc->redirects; t->next; t = t->next)
+ ;
+ t->next = r;
+ }
+ else
+ tc->redirects = r;
+
+ (yyval.command) = command_connect ((yyvsp[(1) - (4)].command), (yyvsp[(4) - (4)].command), '|');
+ }
+ break;
+
+ case 165:
+#line 1260 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.command) = (yyvsp[(1) - (1)].command); }
+ break;
+
+ case 166:
+#line 1264 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE; }
+ break;
+
+ case 167:
+#line 1266 "/Users/chet/src/bash/src/parse.y"
+ { (yyval.number) = CMD_TIME_PIPELINE|CMD_TIME_POSIX; }
+ break;
+
+
+/* Line 1267 of yacc.c. */
+#line 3383 "y.tab.c"
+ default: break;
+ }
+ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc);
+
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+
+ *++yyvsp = yyval;
+
+
+ /* Now `shift' the result of the reduction. Determine what state
+ that goes to, based on the state we popped back to and the rule
+ number reduced by. */
+
+ yyn = yyr1[yyn];
+
+ yystate = yypgoto[yyn - YYNTOKENS] + *yyssp;
+ if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp)
+ yystate = yytable[yystate];
+ else
+ yystate = yydefgoto[yyn - YYNTOKENS];
+
+ goto yynewstate;
+
+
+/*------------------------------------.
+| yyerrlab -- here on detecting error |
+`------------------------------------*/
+yyerrlab:
+ /* If not already recovering from an error, report this error. */
+ if (!yyerrstatus)
+ {
+ ++yynerrs;
+#if ! YYERROR_VERBOSE
+ yyerror (YY_("syntax error"));
+#else
+ {
+ YYSIZE_T yysize = yysyntax_error (0, yystate, yychar);
+ if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM)
+ {
+ YYSIZE_T yyalloc = 2 * yysize;
+ if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM))
+ yyalloc = YYSTACK_ALLOC_MAXIMUM;
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+ yymsg = (char *) YYSTACK_ALLOC (yyalloc);
+ if (yymsg)
+ yymsg_alloc = yyalloc;
+ else
+ {
+ yymsg = yymsgbuf;
+ yymsg_alloc = sizeof yymsgbuf;
+ }
+ }
+
+ if (0 < yysize && yysize <= yymsg_alloc)
+ {
+ (void) yysyntax_error (yymsg, yystate, yychar);
+ yyerror (yymsg);
+ }
+ else
+ {
+ yyerror (YY_("syntax error"));
+ if (yysize != 0)
+ goto yyexhaustedlab;
+ }
+ }
+#endif
+ }
+
+
+
+ if (yyerrstatus == 3)
+ {
+ /* If just tried and failed to reuse look-ahead token after an
+ error, discard it. */
+
+ if (yychar <= YYEOF)
+ {
+ /* Return failure if at end of input. */
+ if (yychar == YYEOF)
+ YYABORT;
+ }
+ else
+ {
+ yydestruct ("Error: discarding",
+ yytoken, &yylval);
+ yychar = YYEMPTY;
+ }
+ }
+
+ /* Else will try to reuse look-ahead token after shifting the error
+ token. */
+ goto yyerrlab1;
+
+
+/*---------------------------------------------------.
+| yyerrorlab -- error raised explicitly by YYERROR. |
+`---------------------------------------------------*/
+yyerrorlab:
+
+ /* Pacify compilers like GCC when the user code never invokes
+ YYERROR and the label yyerrorlab therefore never appears in user
+ code. */
+ if (/*CONSTCOND*/ 0)
+ goto yyerrorlab;
+
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYERROR. */
+ YYPOPSTACK (yylen);
+ yylen = 0;
+ YY_STACK_PRINT (yyss, yyssp);
+ yystate = *yyssp;
+ goto yyerrlab1;
+
+
+/*-------------------------------------------------------------.
+| yyerrlab1 -- common code for both syntax error and YYERROR. |
+`-------------------------------------------------------------*/
+yyerrlab1:
+ yyerrstatus = 3; /* Each real token shifted decrements this. */
+
+ for (;;)
+ {
+ yyn = yypact[yystate];
+ if (yyn != YYPACT_NINF)
+ {
+ yyn += YYTERROR;
+ if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR)
+ {
+ yyn = yytable[yyn];
+ if (0 < yyn)
+ break;
+ }
+ }
+
+ /* Pop the current state because it cannot handle the error token. */
+ if (yyssp == yyss)
+ YYABORT;
+
+
+ yydestruct ("Error: popping",
+ yystos[yystate], yyvsp);
+ YYPOPSTACK (1);
+ yystate = *yyssp;
+ YY_STACK_PRINT (yyss, yyssp);
+ }
+
+ if (yyn == YYFINAL)
+ YYACCEPT;
+
+ *++yyvsp = yylval;
+
+
+ /* Shift the error token. */
+ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp);
+
+ yystate = yyn;
+ goto yynewstate;
+
+
+/*-------------------------------------.
+| yyacceptlab -- YYACCEPT comes here. |
+`-------------------------------------*/
+yyacceptlab:
+ yyresult = 0;
+ goto yyreturn;
+
+/*-----------------------------------.
+| yyabortlab -- YYABORT comes here. |
+`-----------------------------------*/
+yyabortlab:
+ yyresult = 1;
+ goto yyreturn;
+
+#ifndef yyoverflow
+/*-------------------------------------------------.
+| yyexhaustedlab -- memory exhaustion comes here. |
+`-------------------------------------------------*/
+yyexhaustedlab:
+ yyerror (YY_("memory exhausted"));
+ yyresult = 2;
+ /* Fall through. */
+#endif
+
+yyreturn:
+ if (yychar != YYEOF && yychar != YYEMPTY)
+ yydestruct ("Cleanup: discarding lookahead",
+ yytoken, &yylval);
+ /* Do not reclaim the symbols of the rule which action triggered
+ this YYABORT or YYACCEPT. */
+ YYPOPSTACK (yylen);
+ YY_STACK_PRINT (yyss, yyssp);
+ while (yyssp != yyss)
+ {
+ yydestruct ("Cleanup: popping",
+ yystos[*yyssp], yyvsp);
+ YYPOPSTACK (1);
+ }
+#ifndef yyoverflow
+ if (yyss != yyssa)
+ YYSTACK_FREE (yyss);
+#endif
+#if YYERROR_VERBOSE
+ if (yymsg != yymsgbuf)
+ YYSTACK_FREE (yymsg);
+#endif
+ /* Make sure YYID is used. */
+ return YYID (yyresult);
+}
+
+
+#line 1268 "/Users/chet/src/bash/src/parse.y"
+
+
+/* Initial size to allocate for tokens, and the
+ amount to grow them by. */
+#define TOKEN_DEFAULT_INITIAL_SIZE 496
+#define TOKEN_DEFAULT_GROW_SIZE 512
+
+/* Should we call prompt_again? */
+#define SHOULD_PROMPT() \
+ (interactive && (bash_input.type == st_stdin || bash_input.type == st_stream))
+
+#if defined (ALIAS)
+# define expanding_alias() (pushed_string_list && pushed_string_list->expander)
+#else
+# define expanding_alias() 0
+#endif
+
+/* Global var is non-zero when end of file has been reached. */
+int EOF_Reached = 0;
+
+#ifdef DEBUG
+static void
+debug_parser (i)
+ int i;
+{
+#if YYDEBUG != 0
+ yydebug = i;
+#endif
+}
+#endif
+
+/* yy_getc () returns the next available character from input or EOF.
+ yy_ungetc (c) makes `c' the next character to read.
+ init_yy_io (get, unget, type, location) makes the function GET the
+ installed function for getting the next character, makes UNGET the
+ installed function for un-getting a character, sets the type of stream
+ (either string or file) from TYPE, and makes LOCATION point to where
+ the input is coming from. */
+
+/* Unconditionally returns end-of-file. */
+int
+return_EOF ()
+{
+ return (EOF);
+}
+
+/* Variable containing the current get and unget functions.
+ See ./input.h for a clearer description. */
+BASH_INPUT bash_input;
+
+/* Set all of the fields in BASH_INPUT to NULL. Free bash_input.name if it
+ is non-null, avoiding a memory leak. */
+void
+initialize_bash_input ()
+{
+ bash_input.type = st_none;
+ FREE (bash_input.name);
+ bash_input.name = (char *)NULL;
+ bash_input.location.file = (FILE *)NULL;
+ bash_input.location.string = (char *)NULL;
+ bash_input.getter = (sh_cget_func_t *)NULL;
+ bash_input.ungetter = (sh_cunget_func_t *)NULL;
+}
+
+/* Set the contents of the current bash input stream from
+ GET, UNGET, TYPE, NAME, and LOCATION. */
+void
+init_yy_io (get, unget, type, name, location)
+ sh_cget_func_t *get;
+ sh_cunget_func_t *unget;
+ enum stream_type type;
+ const char *name;
+ INPUT_STREAM location;
+{
+ bash_input.type = type;
+ FREE (bash_input.name);
+ bash_input.name = name ? savestring (name) : (char *)NULL;
+
+ /* XXX */
+#if defined (CRAY)
+ memcpy((char *)&bash_input.location.string, (char *)&location.string, sizeof(location));
+#else
+ bash_input.location = location;
+#endif
+ bash_input.getter = get;
+ bash_input.ungetter = unget;
+}
+
+char *
+yy_input_name ()
+{
+ return (bash_input.name ? bash_input.name : "stdin");
+}
+
+/* Call this to get the next character of input. */
+static int
+yy_getc ()
+{
+ return (*(bash_input.getter)) ();
+}
+
+/* Call this to unget C. That is, to make C the next character
+ to be read. */
+static int
+yy_ungetc (c)
+ int c;
+{
+ return (*(bash_input.ungetter)) (c);
+}
+
+#if defined (BUFFERED_INPUT)
+#ifdef INCLUDE_UNUSED
+int
+input_file_descriptor ()
+{
+ switch (bash_input.type)
+ {
+ case st_stream:
+ return (fileno (bash_input.location.file));
+ case st_bstream:
+ return (bash_input.location.buffered_fd);
+ case st_stdin:
+ default:
+ return (fileno (stdin));
+ }
+}
+#endif
+#endif /* BUFFERED_INPUT */
+
+/* **************************************************************** */
+/* */
+/* Let input be read from readline (). */
+/* */
+/* **************************************************************** */
+
+#if defined (READLINE)
+char *current_readline_prompt = (char *)NULL;
+char *current_readline_line = (char *)NULL;
+int current_readline_line_index = 0;
+
+static int
+yy_readline_get ()
+{
+ SigHandler *old_sigint;
+ int line_len;
+ unsigned char c;
+
+ if (!current_readline_line)
+ {
+ if (!bash_readline_initialized)
+ initialize_readline ();
+
+#if defined (JOB_CONTROL)
+ if (job_control)
+ give_terminal_to (shell_pgrp, 0);
+#endif /* JOB_CONTROL */
+
+ old_sigint = (SigHandler *)NULL;
+ if (signal_is_ignored (SIGINT) == 0)
+ {
+ old_sigint = (SigHandler *)set_signal_handler (SIGINT, sigint_sighandler);
+ interrupt_immediately++;
+ }
+ terminate_immediately = 1;
+
+ current_readline_line = readline (current_readline_prompt ?
+ current_readline_prompt : "");
+
+ terminate_immediately = 0;
+ if (signal_is_ignored (SIGINT) == 0 && old_sigint)
+ {
+ interrupt_immediately--;
+ set_signal_handler (SIGINT, old_sigint);
+ }
+
+#if 0
+ /* Reset the prompt to the decoded value of prompt_string_pointer. */
+ reset_readline_prompt ();
+#endif
+
+ if (current_readline_line == 0)
+ return (EOF);
+
+ current_readline_line_index = 0;
+ line_len = strlen (current_readline_line);
+
+ current_readline_line = (char *)xrealloc (current_readline_line, 2 + line_len);
+ current_readline_line[line_len++] = '\n';
+ current_readline_line[line_len] = '\0';
+ }
+
+ if (current_readline_line[current_readline_line_index] == 0)
+ {
+ free (current_readline_line);
+ current_readline_line = (char *)NULL;
+ return (yy_readline_get ());
+ }
+ else
+ {
+ c = current_readline_line[current_readline_line_index++];
+ return (c);
+ }
+}
+
+static int
+yy_readline_unget (c)
+ int c;
+{
+ if (current_readline_line_index && current_readline_line)
+ current_readline_line[--current_readline_line_index] = c;
+ return (c);
+}
+
+void
+with_input_from_stdin ()
+{
+ INPUT_STREAM location;
+
+ if (bash_input.type != st_stdin && stream_on_stack (st_stdin) == 0)
+ {
+ location.string = current_readline_line;
+ init_yy_io (yy_readline_get, yy_readline_unget,
+ st_stdin, "readline stdin", location);
+ }
+}
+
+#else /* !READLINE */
+
+void
+with_input_from_stdin ()
+{
+ with_input_from_stream (stdin, "stdin");
+}
+#endif /* !READLINE */
+
+/* **************************************************************** */
+/* */
+/* Let input come from STRING. STRING is zero terminated. */
+/* */
+/* **************************************************************** */
+
+static int
+yy_string_get ()
+{
+ register char *string;
+ register unsigned char c;
+
+ string = bash_input.location.string;
+
+ /* If the string doesn't exist, or is empty, EOF found. */
+ if (string && *string)
+ {
+ c = *string++;
+ bash_input.location.string = string;
+ return (c);
+ }
+ else
+ return (EOF);
+}
+
+static int
+yy_string_unget (c)
+ int c;
+{
+ *(--bash_input.location.string) = c;
+ return (c);
+}
+
+void
+with_input_from_string (string, name)
+ char *string;
+ const char *name;
+{
+ INPUT_STREAM location;
+
+ location.string = string;
+ init_yy_io (yy_string_get, yy_string_unget, st_string, name, location);
+}
+
+/* Count the number of characters we've consumed from bash_input.location.string
+ and read into shell_input_line, but have not returned from shell_getc.
+ That is the true input location. Rewind bash_input.location.string by
+ that number of characters, so it points to the last character actually
+ consumed by the parser. */
+static void
+rewind_input_string ()
+{
+ int xchars;
+
+ /* number of unconsumed characters in the input -- XXX need to take newlines
+ into account, e.g., $(...\n) */
+ xchars = shell_input_line_len - shell_input_line_index;
+ if (bash_input.location.string[-1] == '\n')
+ xchars++;
+
+ /* XXX - how to reflect bash_input.location.string back to string passed to
+ parse_and_execute or xparse_dolparen? xparse_dolparen needs to know how
+ far into the string we parsed. parse_and_execute knows where bash_input.
+ location.string is, and how far from orig_string that is -- that's the
+ number of characters the command consumed. */
+
+ /* bash_input.location.string - xchars should be where we parsed to */
+ /* need to do more validation on xchars value for sanity -- test cases. */
+ bash_input.location.string -= xchars;
+}
+
+/* **************************************************************** */
+/* */
+/* Let input come from STREAM. */
+/* */
+/* **************************************************************** */
+
+/* These two functions used to test the value of the HAVE_RESTARTABLE_SYSCALLS
+ define, and just use getc/ungetc if it was defined, but since bash
+ installs its signal handlers without the SA_RESTART flag, some signals
+ (like SIGCHLD, SIGWINCH, etc.) received during a read(2) will not cause
+ the read to be restarted. We need to restart it ourselves. */
+
+static int
+yy_stream_get ()
+{
+ int result;
+
+ result = EOF;
+ if (bash_input.location.file)
+ {
+ if (interactive)
+ {
+ interrupt_immediately++;
+ terminate_immediately++;
+ }
+ result = getc_with_restart (bash_input.location.file);
+ if (interactive)
+ {
+ interrupt_immediately--;
+ terminate_immediately--;
+ }
+ }
+ return (result);
+}
+
+static int
+yy_stream_unget (c)
+ int c;
+{
+ return (ungetc_with_restart (c, bash_input.location.file));
+}
+
+void
+with_input_from_stream (stream, name)
+ FILE *stream;
+ const char *name;
+{
+ INPUT_STREAM location;
+
+ location.file = stream;
+ init_yy_io (yy_stream_get, yy_stream_unget, st_stream, name, location);
+}
+
+typedef struct stream_saver {
+ struct stream_saver *next;
+ BASH_INPUT bash_input;
+ int line;
+#if defined (BUFFERED_INPUT)
+ BUFFERED_STREAM *bstream;
+#endif /* BUFFERED_INPUT */
+} STREAM_SAVER;
+
+/* The globally known line number. */
+int line_number = 0;
+
+#if defined (COND_COMMAND)
+static int cond_lineno;
+static int cond_token;
+#endif
+
+STREAM_SAVER *stream_list = (STREAM_SAVER *)NULL;
+
+void
+push_stream (reset_lineno)
+ int reset_lineno;
+{
+ STREAM_SAVER *saver = (STREAM_SAVER *)xmalloc (sizeof (STREAM_SAVER));
+
+ xbcopy ((char *)&bash_input, (char *)&(saver->bash_input), sizeof (BASH_INPUT));
+
+#if defined (BUFFERED_INPUT)
+ saver->bstream = (BUFFERED_STREAM *)NULL;
+ /* If we have a buffered stream, clear out buffers[fd]. */
+ if (bash_input.type == st_bstream && bash_input.location.buffered_fd >= 0)
+ saver->bstream = set_buffered_stream (bash_input.location.buffered_fd,
+ (BUFFERED_STREAM *)NULL);
+#endif /* BUFFERED_INPUT */
+
+ saver->line = line_number;
+ bash_input.name = (char *)NULL;
+ saver->next = stream_list;
+ stream_list = saver;
+ EOF_Reached = 0;
+ if (reset_lineno)
+ line_number = 0;
+}
+
+void
+pop_stream ()
+{
+ if (!stream_list)
+ EOF_Reached = 1;
+ else
+ {
+ STREAM_SAVER *saver = stream_list;
+
+ EOF_Reached = 0;
+ stream_list = stream_list->next;
+
+ init_yy_io (saver->bash_input.getter,
+ saver->bash_input.ungetter,
+ saver->bash_input.type,
+ saver->bash_input.name,
+ saver->bash_input.location);
+
+#if defined (BUFFERED_INPUT)
+ /* If we have a buffered stream, restore buffers[fd]. */
+ /* If the input file descriptor was changed while this was on the
+ save stack, update the buffered fd to the new file descriptor and
+ re-establish the buffer <-> bash_input fd correspondence. */
+ if (bash_input.type == st_bstream && bash_input.location.buffered_fd >= 0)
+ {
+ if (bash_input_fd_changed)
+ {
+ bash_input_fd_changed = 0;
+ if (default_buffered_input >= 0)
+ {
+ bash_input.location.buffered_fd = default_buffered_input;
+ saver->bstream->b_fd = default_buffered_input;
+ SET_CLOSE_ON_EXEC (default_buffered_input);
+ }
+ }
+ /* XXX could free buffered stream returned as result here. */
+ set_buffered_stream (bash_input.location.buffered_fd, saver->bstream);
+ }
+#endif /* BUFFERED_INPUT */
+
+ line_number = saver->line;
+
+ FREE (saver->bash_input.name);
+ free (saver);
+ }
+}
+
+/* Return 1 if a stream of type TYPE is saved on the stack. */
+int
+stream_on_stack (type)
+ enum stream_type type;
+{
+ register STREAM_SAVER *s;
+
+ for (s = stream_list; s; s = s->next)
+ if (s->bash_input.type == type)
+ return 1;
+ return 0;
+}
+
+/* Save the current token state and return it in a malloced array. */
+int *
+save_token_state ()
+{
+ int *ret;
+
+ ret = (int *)xmalloc (4 * sizeof (int));
+ ret[0] = last_read_token;
+ ret[1] = token_before_that;
+ ret[2] = two_tokens_ago;
+ ret[3] = current_token;
+ return ret;
+}
+
+void
+restore_token_state (ts)
+ int *ts;
+{
+ if (ts == 0)
+ return;
+ last_read_token = ts[0];
+ token_before_that = ts[1];
+ two_tokens_ago = ts[2];
+ current_token = ts[3];
+}
+
+/*
+ * This is used to inhibit alias expansion and reserved word recognition
+ * inside case statement pattern lists. A `case statement pattern list' is:
+ *
+ * everything between the `in' in a `case word in' and the next ')'
+ * or `esac'
+ * everything between a `;;' and the next `)' or `esac'
+ */
+
+#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
+
+#define END_OF_ALIAS 0
+
+/*
+ * Pseudo-global variables used in implementing token-wise alias expansion.
+ */
+
+/*
+ * Pushing and popping strings. This works together with shell_getc to
+ * implement alias expansion on a per-token basis.
+ */
+
+typedef struct string_saver {
+ struct string_saver *next;
+ int expand_alias; /* Value to set expand_alias to when string is popped. */
+ char *saved_line;
+#if defined (ALIAS)
+ alias_t *expander; /* alias that caused this line to be pushed. */
+#endif
+ int saved_line_size, saved_line_index, saved_line_terminator;
+} STRING_SAVER;
+
+STRING_SAVER *pushed_string_list = (STRING_SAVER *)NULL;
+
+/*
+ * Push the current shell_input_line onto a stack of such lines and make S
+ * the current input. Used when expanding aliases. EXPAND is used to set
+ * the value of expand_next_token when the string is popped, so that the
+ * word after the alias in the original line is handled correctly when the
+ * alias expands to multiple words. TOKEN is the token that was expanded
+ * into S; it is saved and used to prevent infinite recursive expansion.
+ */
+static void
+push_string (s, expand, ap)
+ char *s;
+ int expand;
+ alias_t *ap;
+{
+ STRING_SAVER *temp = (STRING_SAVER *)xmalloc (sizeof (STRING_SAVER));
+
+ temp->expand_alias = expand;
+ temp->saved_line = shell_input_line;
+ temp->saved_line_size = shell_input_line_size;
+ temp->saved_line_index = shell_input_line_index;
+ temp->saved_line_terminator = shell_input_line_terminator;
+#if defined (ALIAS)
+ temp->expander = ap;
+#endif
+ temp->next = pushed_string_list;
+ pushed_string_list = temp;
+
+#if defined (ALIAS)
+ if (ap)
+ ap->flags |= AL_BEINGEXPANDED;
+#endif
+
+ shell_input_line = s;
+ shell_input_line_size = strlen (s);
+ shell_input_line_index = 0;
+ shell_input_line_terminator = '\0';
+#if 0
+ parser_state &= ~PST_ALEXPNEXT; /* XXX */
+#endif
+
+ set_line_mbstate ();
+}
+
+/*
+ * Make the top of the pushed_string stack be the current shell input.
+ * Only called when there is something on the stack. Called from shell_getc
+ * when it thinks it has consumed the string generated by an alias expansion
+ * and needs to return to the original input line.
+ */
+static void
+pop_string ()
+{
+ STRING_SAVER *t;
+
+ FREE (shell_input_line);
+ shell_input_line = pushed_string_list->saved_line;
+ shell_input_line_index = pushed_string_list->saved_line_index;
+ shell_input_line_size = pushed_string_list->saved_line_size;
+ shell_input_line_terminator = pushed_string_list->saved_line_terminator;
+
+ if (pushed_string_list->expand_alias)
+ parser_state |= PST_ALEXPNEXT;
+ else
+ parser_state &= ~PST_ALEXPNEXT;
+
+ t = pushed_string_list;
+ pushed_string_list = pushed_string_list->next;
+
+#if defined (ALIAS)
+ if (t->expander)
+ t->expander->flags &= ~AL_BEINGEXPANDED;
+#endif
+
+ free ((char *)t);
+
+ set_line_mbstate ();
+}
+
+static void
+free_string_list ()
+{
+ register STRING_SAVER *t, *t1;
+
+ for (t = pushed_string_list; t; )
+ {
+ t1 = t->next;
+ FREE (t->saved_line);
+#if defined (ALIAS)
+ if (t->expander)
+ t->expander->flags &= ~AL_BEINGEXPANDED;
+#endif
+ free ((char *)t);
+ t = t1;
+ }
+ pushed_string_list = (STRING_SAVER *)NULL;
+}
+
+#endif /* ALIAS || DPAREN_ARITHMETIC */
+
+void
+free_pushed_string_input ()
+{
+#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
+ free_string_list ();
+#endif
+}
+
+/* Return a line of text, taken from wherever yylex () reads input.
+ If there is no more input, then we return NULL. If REMOVE_QUOTED_NEWLINE
+ is non-zero, we remove unquoted \<newline> pairs. This is used by
+ read_secondary_line to read here documents. */
+static char *
+read_a_line (remove_quoted_newline)
+ int remove_quoted_newline;
+{
+ static char *line_buffer = (char *)NULL;
+ static int buffer_size = 0;
+ int indx, c, peekc, pass_next;
+
+#if defined (READLINE)
+ if (no_line_editing && SHOULD_PROMPT ())
+#else
+ if (SHOULD_PROMPT ())
+#endif
+ print_prompt ();
+
+ pass_next = indx = 0;
+ while (1)
+ {
+ /* Allow immediate exit if interrupted during input. */
+ QUIT;
+
+ c = yy_getc ();
+
+ /* Ignore null bytes in input. */
+ if (c == 0)
+ {
+#if 0
+ internal_warning ("read_a_line: ignored null byte in input");
+#endif
+ continue;
+ }
+
+ /* If there is no more input, then we return NULL. */
+ if (c == EOF)
+ {
+ if (interactive && bash_input.type == st_stream)
+ clearerr (stdin);
+ if (indx == 0)
+ return ((char *)NULL);
+ c = '\n';
+ }
+
+ /* `+2' in case the final character in the buffer is a newline. */
+ RESIZE_MALLOCED_BUFFER (line_buffer, indx, 2, buffer_size, 128);
+
+ /* IF REMOVE_QUOTED_NEWLINES is non-zero, we are reading a
+ here document with an unquoted delimiter. In this case,
+ the line will be expanded as if it were in double quotes.
+ We allow a backslash to escape the next character, but we
+ need to treat the backslash specially only if a backslash
+ quoting a backslash-newline pair appears in the line. */
+ if (pass_next)
+ {
+ line_buffer[indx++] = c;
+ pass_next = 0;
+ }
+ else if (c == '\\' && remove_quoted_newline)
+ {
+ peekc = yy_getc ();
+ if (peekc == '\n')
+ {
+ line_number++;
+ continue; /* Make the unquoted \<newline> pair disappear. */
+ }
+ else
+ {
+ yy_ungetc (peekc);
+ pass_next = 1;
+ line_buffer[indx++] = c; /* Preserve the backslash. */
+ }
+ }
+ else
+ line_buffer[indx++] = c;
+
+ if (c == '\n')
+ {
+ line_buffer[indx] = '\0';
+ return (line_buffer);
+ }
+ }
+}
+
+/* Return a line as in read_a_line (), but insure that the prompt is
+ the secondary prompt. This is used to read the lines of a here
+ document. REMOVE_QUOTED_NEWLINE is non-zero if we should remove
+ newlines quoted with backslashes while reading the line. It is
+ non-zero unless the delimiter of the here document was quoted. */
+char *
+read_secondary_line (remove_quoted_newline)
+ int remove_quoted_newline;
+{
+ char *ret;
+ int n, c;
+
+ prompt_string_pointer = &ps2_prompt;
+ if (SHOULD_PROMPT())
+ prompt_again ();
+ ret = read_a_line (remove_quoted_newline);
+#if defined (HISTORY)
+ if (ret && remember_on_history && (parser_state & PST_HEREDOC))
+ {
+ /* To make adding the the here-document body right, we need to rely
+ on history_delimiting_chars() returning \n for the first line of
+ the here-document body and the null string for the second and
+ subsequent lines, so we avoid double newlines.
+ current_command_line_count == 2 for the first line of the body. */
+
+ current_command_line_count++;
+ maybe_add_history (ret);
+ }
+#endif /* HISTORY */
+ return ret;
+}
+
+/* **************************************************************** */
+/* */
+/* YYLEX () */
+/* */
+/* **************************************************************** */
+
+/* Reserved words. These are only recognized as the first word of a
+ command. */
+STRING_INT_ALIST word_token_alist[] = {
+ { "if", IF },
+ { "then", THEN },
+ { "else", ELSE },
+ { "elif", ELIF },
+ { "fi", FI },
+ { "case", CASE },
+ { "esac", ESAC },
+ { "for", FOR },
+#if defined (SELECT_COMMAND)
+ { "select", SELECT },
+#endif
+ { "while", WHILE },
+ { "until", UNTIL },
+ { "do", DO },
+ { "done", DONE },
+ { "in", IN },
+ { "function", FUNCTION },
+#if defined (COMMAND_TIMING)
+ { "time", TIME },
+#endif
+ { "{", '{' },
+ { "}", '}' },
+ { "!", BANG },
+#if defined (COND_COMMAND)
+ { "[[", COND_START },
+ { "]]", COND_END },
+#endif
+#if defined (COPROCESS_SUPPORT)
+ { "coproc", COPROC },
+#endif
+ { (char *)NULL, 0}
+};
+
+/* other tokens that can be returned by read_token() */
+STRING_INT_ALIST other_token_alist[] = {
+ /* Multiple-character tokens with special values */
+ { "-p", TIMEOPT },
+ { "&&", AND_AND },
+ { "||", OR_OR },
+ { ">>", GREATER_GREATER },
+ { "<<", LESS_LESS },
+ { "<&", LESS_AND },
+ { ">&", GREATER_AND },
+ { ";;", SEMI_SEMI },
+ { ";&", SEMI_AND },
+ { ";;&", SEMI_SEMI_AND },
+ { "<<-", LESS_LESS_MINUS },
+ { "<<<", LESS_LESS_LESS },
+ { "&>", AND_GREATER },
+ { "&>>", AND_GREATER_GREATER },
+ { "<>", LESS_GREATER },
+ { ">|", GREATER_BAR },
+ { "|&", BAR_AND },
+ { "EOF", yacc_EOF },
+ /* Tokens whose value is the character itself */
+ { ">", '>' },
+ { "<", '<' },
+ { "-", '-' },
+ { "{", '{' },
+ { "}", '}' },
+ { ";", ';' },
+ { "(", '(' },
+ { ")", ')' },
+ { "|", '|' },
+ { "&", '&' },
+ { "newline", '\n' },
+ { (char *)NULL, 0}
+};
+
+/* others not listed here:
+ WORD look at yylval.word
+ ASSIGNMENT_WORD look at yylval.word
+ NUMBER look at yylval.number
+ ARITH_CMD look at yylval.word_list
+ ARITH_FOR_EXPRS look at yylval.word_list
+ COND_CMD look at yylval.command
+*/
+
+/* These are used by read_token_word, but appear up here so that shell_getc
+ can use them to decide when to add otherwise blank lines to the history. */
+
+/* The primary delimiter stack. */
+struct dstack dstack = { (char *)NULL, 0, 0 };
+
+/* A temporary delimiter stack to be used when decoding prompt strings.
+ This is needed because command substitutions in prompt strings (e.g., PS2)
+ can screw up the parser's quoting state. */
+static struct dstack temp_dstack = { (char *)NULL, 0, 0 };
+
+/* Macro for accessing the top delimiter on the stack. Returns the
+ delimiter or zero if none. */
+#define current_delimiter(ds) \
+ (ds.delimiter_depth ? ds.delimiters[ds.delimiter_depth - 1] : 0)
+
+#define push_delimiter(ds, character) \
+ do \
+ { \
+ if (ds.delimiter_depth + 2 > ds.delimiter_space) \
+ ds.delimiters = (char *)xrealloc \
+ (ds.delimiters, (ds.delimiter_space += 10) * sizeof (char)); \
+ ds.delimiters[ds.delimiter_depth] = character; \
+ ds.delimiter_depth++; \
+ } \
+ while (0)
+
+#define pop_delimiter(ds) ds.delimiter_depth--
+
+/* Return the next shell input character. This always reads characters
+ from shell_input_line; when that line is exhausted, it is time to
+ read the next line. This is called by read_token when the shell is
+ processing normal command input. */
+
+/* This implements one-character lookahead/lookbehind across physical input
+ lines, to avoid something being lost because it's pushed back with
+ shell_ungetc when we're at the start of a line. */
+static int eol_ungetc_lookahead = 0;
+
+static int
+shell_getc (remove_quoted_newline)
+ int remove_quoted_newline;
+{
+ register int i;
+ int c;
+ unsigned char uc;
+
+ QUIT;
+
+ if (sigwinch_received)
+ {
+ sigwinch_received = 0;
+ get_new_window_size (0, (int *)0, (int *)0);
+ }
+
+ if (eol_ungetc_lookahead)
+ {
+ c = eol_ungetc_lookahead;
+ eol_ungetc_lookahead = 0;
+ return (c);
+ }
+
+#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
+ /* If shell_input_line[shell_input_line_index] == 0, but there is
+ something on the pushed list of strings, then we don't want to go
+ off and get another line. We let the code down below handle it. */
+
+ if (!shell_input_line || ((!shell_input_line[shell_input_line_index]) &&
+ (pushed_string_list == (STRING_SAVER *)NULL)))
+#else /* !ALIAS && !DPAREN_ARITHMETIC */
+ if (!shell_input_line || !shell_input_line[shell_input_line_index])
+#endif /* !ALIAS && !DPAREN_ARITHMETIC */
+ {
+ line_number++;
+
+ restart_read:
+
+ /* Allow immediate exit if interrupted during input. */
+ QUIT;
+
+ i = 0;
+ shell_input_line_terminator = 0;
+
+ /* If the shell is interatctive, but not currently printing a prompt
+ (interactive_shell && interactive == 0), we don't want to print
+ notifies or cleanup the jobs -- we want to defer it until we do
+ print the next prompt. */
+ if (interactive_shell == 0 || SHOULD_PROMPT())
+ {
+#if defined (JOB_CONTROL)
+ /* This can cause a problem when reading a command as the result
+ of a trap, when the trap is called from flush_child. This call
+ had better not cause jobs to disappear from the job table in
+ that case, or we will have big trouble. */
+ notify_and_cleanup ();
+#else /* !JOB_CONTROL */
+ cleanup_dead_jobs ();
+#endif /* !JOB_CONTROL */
+ }
+
+#if defined (READLINE)
+ if (no_line_editing && SHOULD_PROMPT())
+#else
+ if (SHOULD_PROMPT())
+#endif
+ print_prompt ();
+
+ if (bash_input.type == st_stream)
+ clearerr (stdin);
+
+ while (1)
+ {
+ c = yy_getc ();
+
+ /* Allow immediate exit if interrupted during input. */
+ QUIT;
+
+ if (c == '\0')
+ {
+#if 0
+ internal_warning ("shell_getc: ignored null byte in input");
+#endif
+ continue;
+ }
+
+ RESIZE_MALLOCED_BUFFER (shell_input_line, i, 2, shell_input_line_size, 256);
+
+ if (c == EOF)
+ {
+ if (bash_input.type == st_stream)
+ clearerr (stdin);
+
+ if (i == 0)
+ shell_input_line_terminator = EOF;
+
+ shell_input_line[i] = '\0';
+ break;
+ }
+
+ shell_input_line[i++] = c;
+
+ if (c == '\n')
+ {
+ shell_input_line[--i] = '\0';
+ current_command_line_count++;
+ break;
+ }
+ }
+
+ shell_input_line_index = 0;
+ shell_input_line_len = i; /* == strlen (shell_input_line) */
+
+ set_line_mbstate ();
+
+#if defined (HISTORY)
+ if (remember_on_history && shell_input_line && shell_input_line[0])
+ {
+ char *expansions;
+# if defined (BANG_HISTORY)
+ int old_hist;
+
+ /* If the current delimiter is a single quote, we should not be
+ performing history expansion, even if we're on a different
+ line from the original single quote. */
+ old_hist = history_expansion_inhibited;
+ if (current_delimiter (dstack) == '\'')
+ history_expansion_inhibited = 1;
+# endif
+ expansions = pre_process_line (shell_input_line, 1, 1);
+# if defined (BANG_HISTORY)
+ history_expansion_inhibited = old_hist;
+# endif
+ if (expansions != shell_input_line)
+ {
+ free (shell_input_line);
+ shell_input_line = expansions;
+ shell_input_line_len = shell_input_line ?
+ strlen (shell_input_line) : 0;
+ if (!shell_input_line_len)
+ current_command_line_count--;
+
+ /* We have to force the xrealloc below because we don't know
+ the true allocated size of shell_input_line anymore. */
+ shell_input_line_size = shell_input_line_len;
+
+ set_line_mbstate ();
+ }
+ }
+ /* Try to do something intelligent with blank lines encountered while
+ entering multi-line commands. XXX - this is grotesque */
+ else if (remember_on_history && shell_input_line &&
+ shell_input_line[0] == '\0' &&
+ current_command_line_count > 1)
+ {
+ if (current_delimiter (dstack))
+ /* We know shell_input_line[0] == 0 and we're reading some sort of
+ quoted string. This means we've got a line consisting of only
+ a newline in a quoted string. We want to make sure this line
+ gets added to the history. */
+ maybe_add_history (shell_input_line);
+ else
+ {
+ char *hdcs;
+ hdcs = history_delimiting_chars ();
+ if (hdcs && hdcs[0] == ';')
+ maybe_add_history (shell_input_line);
+ }
+ }
+
+#endif /* HISTORY */
+
+ if (shell_input_line)
+ {
+ /* Lines that signify the end of the shell's input should not be
+ echoed. */
+ if (echo_input_at_read && (shell_input_line[0] ||
+ shell_input_line_terminator != EOF))
+ fprintf (stderr, "%s\n", shell_input_line);
+ }
+ else
+ {
+ shell_input_line_size = 0;
+ prompt_string_pointer = &current_prompt_string;
+ if (SHOULD_PROMPT ())
+ prompt_again ();
+ goto restart_read;
+ }
+
+ /* Add the newline to the end of this string, iff the string does
+ not already end in an EOF character. */
+ if (shell_input_line_terminator != EOF)
+ {
+ if (shell_input_line_len + 3 > shell_input_line_size)
+ shell_input_line = (char *)xrealloc (shell_input_line,
+ 1 + (shell_input_line_size += 2));
+
+ shell_input_line[shell_input_line_len] = '\n';
+ shell_input_line[shell_input_line_len + 1] = '\0';
+
+ set_line_mbstate ();
+ }
+ }
+
+ uc = shell_input_line[shell_input_line_index];
+
+ if (uc)
+ shell_input_line_index++;
+
+#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
+ /* If UC is NULL, we have reached the end of the current input string. If
+ pushed_string_list is non-empty, it's time to pop to the previous string
+ because we have fully consumed the result of the last alias expansion.
+ Do it transparently; just return the next character of the string popped
+ to. */
+pop_alias:
+ if (!uc && (pushed_string_list != (STRING_SAVER *)NULL))
+ {
+ pop_string ();
+ uc = shell_input_line[shell_input_line_index];
+ if (uc)
+ shell_input_line_index++;
+ }
+#endif /* ALIAS || DPAREN_ARITHMETIC */
+
+ if MBTEST(uc == '\\' && remove_quoted_newline && shell_input_line[shell_input_line_index] == '\n')
+ {
+ if (SHOULD_PROMPT ())
+ prompt_again ();
+ line_number++;
+ /* XXX - what do we do here if we're expanding an alias whose definition
+ ends with a newline? Recall that we inhibit the appending of a
+ space in mk_alexpansion() if newline is the last character. */
+#if 0 /* XXX - bash-4.2 (jonathan@claggett.org) */
+ if (expanding_alias () && shell_input_line[shell_input_line_index+1] == '\0')
+ {
+ uc = 0;
+ goto pop_alias;
+ }
+#endif
+
+ goto restart_read;
+ }
+
+ if (!uc && shell_input_line_terminator == EOF)
+ return ((shell_input_line_index != 0) ? '\n' : EOF);
+
+ return (uc);
+}
+
+/* Put C back into the input for the shell. This might need changes for
+ HANDLE_MULTIBYTE around EOLs. Since we (currently) never push back a
+ character different than we read, shell_input_line_property doesn't need
+ to change when manipulating shell_input_line. The define for
+ last_shell_getc_is_singlebyte should take care of it, though. */
+static void
+shell_ungetc (c)
+ int c;
+{
+ if (shell_input_line && shell_input_line_index)
+ shell_input_line[--shell_input_line_index] = c;
+ else
+ eol_ungetc_lookahead = c;
+}
+
+#ifdef INCLUDE_UNUSED
+/* Back the input pointer up by one, effectively `ungetting' a character. */
+static void
+shell_ungetchar ()
+{
+ if (shell_input_line && shell_input_line_index)
+ shell_input_line_index--;
+}
+#endif
+
+/* Discard input until CHARACTER is seen, then push that character back
+ onto the input stream. */
+static void
+discard_until (character)
+ int character;
+{
+ int c;
+
+ while ((c = shell_getc (0)) != EOF && c != character)
+ ;
+
+ if (c != EOF)
+ shell_ungetc (c);
+}
+
+void
+execute_variable_command (command, vname)
+ char *command, *vname;
+{
+ char *last_lastarg;
+ sh_parser_state_t ps;
+
+ save_parser_state (&ps);
+ last_lastarg = get_string_value ("_");
+ if (last_lastarg)
+ last_lastarg = savestring (last_lastarg);
+
+ parse_and_execute (savestring (command), vname, SEVAL_NONINT|SEVAL_NOHIST);
+
+ restore_parser_state (&ps);
+ bind_variable ("_", last_lastarg, 0);
+ FREE (last_lastarg);
+
+ if (token_to_read == '\n') /* reset_parser was called */
+ token_to_read = 0;
+}
+
+/* Place to remember the token. We try to keep the buffer
+ at a reasonable size, but it can grow. */
+static char *token = (char *)NULL;
+
+/* Current size of the token buffer. */
+static int token_buffer_size;
+
+/* Command to read_token () explaining what we want it to do. */
+#define READ 0
+#define RESET 1
+#define prompt_is_ps1 \
+ (!prompt_string_pointer || prompt_string_pointer == &ps1_prompt)
+
+/* Function for yyparse to call. yylex keeps track of
+ the last two tokens read, and calls read_token. */
+static int
+yylex ()
+{
+ if (interactive && (current_token == 0 || current_token == '\n'))
+ {
+ /* Before we print a prompt, we might have to check mailboxes.
+ We do this only if it is time to do so. Notice that only here
+ is the mail alarm reset; nothing takes place in check_mail ()
+ except the checking of mail. Please don't change this. */
+ if (prompt_is_ps1 && time_to_check_mail ())
+ {
+ check_mail ();
+ reset_mail_timer ();
+ }
+
+ /* Avoid printing a prompt if we're not going to read anything, e.g.
+ after resetting the parser with read_token (RESET). */
+ if (token_to_read == 0 && SHOULD_PROMPT ())
+ prompt_again ();
+ }
+
+ two_tokens_ago = token_before_that;
+ token_before_that = last_read_token;
+ last_read_token = current_token;
+ current_token = read_token (READ);
+
+ if ((parser_state & PST_EOFTOKEN) && current_token == shell_eof_token)
+ {
+ current_token = yacc_EOF;
+ if (bash_input.type == st_string)
+ rewind_input_string ();
+ }
+ parser_state &= ~PST_EOFTOKEN;
+
+ return (current_token);
+}
+
+/* When non-zero, we have read the required tokens
+ which allow ESAC to be the next one read. */
+static int esacs_needed_count;
+
+void
+gather_here_documents ()
+{
+ int r;
+
+ r = 0;
+ while (need_here_doc)
+ {
+ parser_state |= PST_HEREDOC;
+ make_here_document (redir_stack[r++], line_number);
+ parser_state &= ~PST_HEREDOC;
+ need_here_doc--;
+ }
+}
+
+/* When non-zero, an open-brace used to create a group is awaiting a close
+ brace partner. */
+static int open_brace_count;
+
+#define command_token_position(token) \
+ (((token) == ASSIGNMENT_WORD) || (parser_state&PST_REDIRLIST) || \
+ ((token) != SEMI_SEMI && (token) != SEMI_AND && (token) != SEMI_SEMI_AND && reserved_word_acceptable(token)))
+
+#define assignment_acceptable(token) \
+ (command_token_position(token) && ((parser_state & PST_CASEPAT) == 0))
+
+/* Check to see if TOKEN is a reserved word and return the token
+ value if it is. */
+#define CHECK_FOR_RESERVED_WORD(tok) \
+ do { \
+ if (!dollar_present && !quoted && \
+ reserved_word_acceptable (last_read_token)) \
+ { \
+ int i; \
+ for (i = 0; word_token_alist[i].word != (char *)NULL; i++) \
+ if (STREQ (tok, word_token_alist[i].word)) \
+ { \
+ if ((parser_state & PST_CASEPAT) && (word_token_alist[i].token != ESAC)) \
+ break; \
+ if (word_token_alist[i].token == TIME && time_command_acceptable () == 0) \
+ break; \
+ if (word_token_alist[i].token == ESAC) \
+ parser_state &= ~(PST_CASEPAT|PST_CASESTMT); \
+ else if (word_token_alist[i].token == CASE) \
+ parser_state |= PST_CASESTMT; \
+ else if (word_token_alist[i].token == COND_END) \
+ parser_state &= ~(PST_CONDCMD|PST_CONDEXPR); \
+ else if (word_token_alist[i].token == COND_START) \
+ parser_state |= PST_CONDCMD; \
+ else if (word_token_alist[i].token == '{') \
+ open_brace_count++; \
+ else if (word_token_alist[i].token == '}' && open_brace_count) \
+ open_brace_count--; \
+ return (word_token_alist[i].token); \
+ } \
+ } \
+ } while (0)
+
+#if defined (ALIAS)
+
+ /* OK, we have a token. Let's try to alias expand it, if (and only if)
+ it's eligible.
+
+ It is eligible for expansion if EXPAND_ALIASES is set, and
+ the token is unquoted and the last token read was a command
+ separator (or expand_next_token is set), and we are currently
+ processing an alias (pushed_string_list is non-empty) and this
+ token is not the same as the current or any previously
+ processed alias.
+
+ Special cases that disqualify:
+ In a pattern list in a case statement (parser_state & PST_CASEPAT). */
+
+static char *
+mk_alexpansion (s)
+ char *s;
+{
+ int l;
+ char *r;
+
+ l = strlen (s);
+ r = xmalloc (l + 2);
+ strcpy (r, s);
+#if 0 /* XXX - bash-4.2 */
+ if (r[l -1] != ' ' && r[l -1] != '\n')
+#else
+ if (r[l -1] != ' ')
+#endif
+ r[l++] = ' ';
+ r[l] = '\0';
+ return r;
+}
+
+static int
+alias_expand_token (tokstr)
+ char *tokstr;
+{
+ char *expanded;
+ alias_t *ap;
+
+ if (((parser_state & PST_ALEXPNEXT) || command_token_position (last_read_token)) &&
+ (parser_state & PST_CASEPAT) == 0)
+ {
+ ap = find_alias (tokstr);
+
+ /* Currently expanding this token. */
+ if (ap && (ap->flags & AL_BEINGEXPANDED))
+ return (NO_EXPANSION);
+
+ /* mk_alexpansion puts an extra space on the end of the alias expansion,
+ so the lookahead by the parser works right. If this gets changed,
+ make sure the code in shell_getc that deals with reaching the end of
+ an expanded alias is changed with it. */
+ expanded = ap ? mk_alexpansion (ap->value) : (char *)NULL;
+
+ if (expanded)
+ {
+ push_string (expanded, ap->flags & AL_EXPANDNEXT, ap);
+ return (RE_READ_TOKEN);
+ }
+ else
+ /* This is an eligible token that does not have an expansion. */
+ return (NO_EXPANSION);
+ }
+ return (NO_EXPANSION);
+}
+#endif /* ALIAS */
+
+static int
+time_command_acceptable ()
+{
+#if defined (COMMAND_TIMING)
+ switch (last_read_token)
+ {
+ case 0:
+ case ';':
+ case '\n':
+ case AND_AND:
+ case OR_OR:
+ case '&':
+ case DO:
+ case THEN:
+ case ELSE:
+ case '{': /* } */
+ case '(': /* ) */
+ return 1;
+ default:
+ return 0;
+ }
+#else
+ return 0;
+#endif /* COMMAND_TIMING */
+}
+
+/* Handle special cases of token recognition:
+ IN is recognized if the last token was WORD and the token
+ before that was FOR or CASE or SELECT.
+
+ DO is recognized if the last token was WORD and the token
+ before that was FOR or SELECT.
+
+ ESAC is recognized if the last token caused `esacs_needed_count'
+ to be set
+
+ `{' is recognized if the last token as WORD and the token
+ before that was FUNCTION, or if we just parsed an arithmetic
+ `for' command.
+
+ `}' is recognized if there is an unclosed `{' present.
+
+ `-p' is returned as TIMEOPT if the last read token was TIME.
+
+ ']]' is returned as COND_END if the parser is currently parsing
+ a conditional expression ((parser_state & PST_CONDEXPR) != 0)
+
+ `time' is returned as TIME if and only if it is immediately
+ preceded by one of `;', `\n', `||', `&&', or `&'.
+*/
+
+static int
+special_case_tokens (tokstr)
+ char *tokstr;
+{
+ if ((last_read_token == WORD) &&
+#if defined (SELECT_COMMAND)
+ ((token_before_that == FOR) || (token_before_that == CASE) || (token_before_that == SELECT)) &&
+#else
+ ((token_before_that == FOR) || (token_before_that == CASE)) &&
+#endif
+ (tokstr[0] == 'i' && tokstr[1] == 'n' && tokstr[2] == 0))
+ {
+ if (token_before_that == CASE)
+ {
+ parser_state |= PST_CASEPAT;
+ esacs_needed_count++;
+ }
+ return (IN);
+ }
+
+ if (last_read_token == WORD &&
+#if defined (SELECT_COMMAND)
+ (token_before_that == FOR || token_before_that == SELECT) &&
+#else
+ (token_before_that == FOR) &&
+#endif
+ (tokstr[0] == 'd' && tokstr[1] == 'o' && tokstr[2] == '\0'))
+ return (DO);
+
+ /* Ditto for ESAC in the CASE case.
+ Specifically, this handles "case word in esac", which is a legal
+ construct, certainly because someone will pass an empty arg to the
+ case construct, and we don't want it to barf. Of course, we should
+ insist that the case construct has at least one pattern in it, but
+ the designers disagree. */
+ if (esacs_needed_count)
+ {
+ esacs_needed_count--;
+ if (STREQ (tokstr, "esac"))
+ {
+ parser_state &= ~PST_CASEPAT;
+ return (ESAC);
+ }
+ }
+
+ /* The start of a shell function definition. */
+ if (parser_state & PST_ALLOWOPNBRC)
+ {
+ parser_state &= ~PST_ALLOWOPNBRC;
+ if (tokstr[0] == '{' && tokstr[1] == '\0') /* } */
+ {
+ open_brace_count++;
+ function_bstart = line_number;
+ return ('{'); /* } */
+ }
+ }
+
+ /* We allow a `do' after a for ((...)) without an intervening
+ list_terminator */
+ if (last_read_token == ARITH_FOR_EXPRS && tokstr[0] == 'd' && tokstr[1] == 'o' && !tokstr[2])
+ return (DO);
+ if (last_read_token == ARITH_FOR_EXPRS && tokstr[0] == '{' && tokstr[1] == '\0') /* } */
+ {
+ open_brace_count++;
+ return ('{'); /* } */
+ }
+
+ if (open_brace_count && reserved_word_acceptable (last_read_token) && tokstr[0] == '}' && !tokstr[1])
+ {
+ open_brace_count--; /* { */
+ return ('}');
+ }
+
+#if defined (COMMAND_TIMING)
+ /* Handle -p after `time'. */
+ if (last_read_token == TIME && tokstr[0] == '-' && tokstr[1] == 'p' && !tokstr[2])
+ return (TIMEOPT);
+#endif
+
+#if 0
+#if defined (COMMAND_TIMING)
+ if (STREQ (token, "time") && ((parser_state & PST_CASEPAT) == 0) && time_command_acceptable ())
+ return (TIME);
+#endif /* COMMAND_TIMING */
+#endif
+
+#if defined (COND_COMMAND) /* [[ */
+ if ((parser_state & PST_CONDEXPR) && tokstr[0] == ']' && tokstr[1] == ']' && tokstr[2] == '\0')
+ return (COND_END);
+#endif
+
+ return (-1);
+}
+
+/* Called from shell.c when Control-C is typed at top level. Or
+ by the error rule at top level. */
+void
+reset_parser ()
+{
+ dstack.delimiter_depth = 0; /* No delimiters found so far. */
+ open_brace_count = 0;
+
+#if defined (EXTENDED_GLOB)
+ /* Reset to global value of extended glob */
+ if (parser_state & PST_EXTPAT)
+ extended_glob = global_extglob;
+#endif
+
+ parser_state = 0;
+
+#if defined (ALIAS) || defined (DPAREN_ARITHMETIC)
+ if (pushed_string_list)
+ free_string_list ();
+#endif /* ALIAS || DPAREN_ARITHMETIC */
+
+ if (shell_input_line)
+ {
+ free (shell_input_line);
+ shell_input_line = (char *)NULL;
+ shell_input_line_size = shell_input_line_index = 0;
+ }
+
+ FREE (word_desc_to_read);
+ word_desc_to_read = (WORD_DESC *)NULL;
+
+ current_token = '\n'; /* XXX */
+ last_read_token = '\n';
+ token_to_read = '\n';
+}
+
+/* Read the next token. Command can be READ (normal operation) or
+ RESET (to normalize state). */
+static int
+read_token (command)
+ int command;
+{
+ int character; /* Current character. */
+ int peek_char; /* Temporary look-ahead character. */
+ int result; /* The thing to return. */
+
+ if (command == RESET)
+ {
+ reset_parser ();
+ return ('\n');
+ }
+
+ if (token_to_read)
+ {
+ result = token_to_read;
+ if (token_to_read == WORD || token_to_read == ASSIGNMENT_WORD)
+ {
+ yylval.word = word_desc_to_read;
+ word_desc_to_read = (WORD_DESC *)NULL;
+ }
+ token_to_read = 0;
+ return (result);
+ }
+
+#if defined (COND_COMMAND)
+ if ((parser_state & (PST_CONDCMD|PST_CONDEXPR)) == PST_CONDCMD)
+ {
+ cond_lineno = line_number;
+ parser_state |= PST_CONDEXPR;
+ yylval.command = parse_cond_command ();
+ if (cond_token != COND_END)
+ {
+ cond_error ();
+ return (-1);
+ }
+ token_to_read = COND_END;
+ parser_state &= ~(PST_CONDEXPR|PST_CONDCMD);
+ return (COND_CMD);
+ }
+#endif
+
+#if defined (ALIAS)
+ /* This is a place to jump back to once we have successfully expanded a
+ token with an alias and pushed the string with push_string () */
+ re_read_token:
+#endif /* ALIAS */
+
+ /* Read a single word from input. Start by skipping blanks. */
+ while ((character = shell_getc (1)) != EOF && shellblank (character))
+ ;
+
+ if (character == EOF)
+ {
+ EOF_Reached = 1;
+ return (yacc_EOF);
+ }
+
+ if MBTEST(character == '#' && (!interactive || interactive_comments))
+ {
+ /* A comment. Discard until EOL or EOF, and then return a newline. */
+ discard_until ('\n');
+ shell_getc (0);
+ character = '\n'; /* this will take the next if statement and return. */
+ }
+
+ if (character == '\n')
+ {
+ /* If we're about to return an unquoted newline, we can go and collect
+ the text of any pending here document. */
+ if (need_here_doc)
+ gather_here_documents ();
+
+#if defined (ALIAS)
+ parser_state &= ~PST_ALEXPNEXT;
+#endif /* ALIAS */
+
+ parser_state &= ~PST_ASSIGNOK;
+
+ return (character);
+ }
+
+ if (parser_state & PST_REGEXP)
+ goto tokword;
+
+ /* Shell meta-characters. */
+ if MBTEST(shellmeta (character) && ((parser_state & PST_DBLPAREN) == 0))
+ {
+#if defined (ALIAS)
+ /* Turn off alias tokenization iff this character sequence would
+ not leave us ready to read a command. */
+ if (character == '<' || character == '>')
+ parser_state &= ~PST_ALEXPNEXT;
+#endif /* ALIAS */
+
+ parser_state &= ~PST_ASSIGNOK;
+
+ peek_char = shell_getc (1);
+ if (character == peek_char)
+ {
+ switch (character)
+ {
+ case '<':
+ /* If '<' then we could be at "<<" or at "<<-". We have to
+ look ahead one more character. */
+ peek_char = shell_getc (1);
+ if MBTEST(peek_char == '-')
+ return (LESS_LESS_MINUS);
+ else if MBTEST(peek_char == '<')
+ return (LESS_LESS_LESS);
+ else
+ {
+ shell_ungetc (peek_char);
+ return (LESS_LESS);
+ }
+
+ case '>':
+ return (GREATER_GREATER);
+
+ case ';':
+ parser_state |= PST_CASEPAT;
+#if defined (ALIAS)
+ parser_state &= ~PST_ALEXPNEXT;
+#endif /* ALIAS */
+
+ peek_char = shell_getc (1);
+ if MBTEST(peek_char == '&')
+ return (SEMI_SEMI_AND);
+ else
+ {
+ shell_ungetc (peek_char);
+ return (SEMI_SEMI);
+ }
+
+ case '&':
+ return (AND_AND);
+
+ case '|':
+ return (OR_OR);
+
+#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND)
+ case '(': /* ) */
+ result = parse_dparen (character);
+ if (result == -2)
+ break;
+ else
+ return result;
+#endif
+ }
+ }
+ else if MBTEST(character == '<' && peek_char == '&')
+ return (LESS_AND);
+ else if MBTEST(character == '>' && peek_char == '&')
+ return (GREATER_AND);
+ else if MBTEST(character == '<' && peek_char == '>')
+ return (LESS_GREATER);
+ else if MBTEST(character == '>' && peek_char == '|')
+ return (GREATER_BAR);
+ else if MBTEST(character == '&' && peek_char == '>')
+ {
+ peek_char = shell_getc (1);
+ if MBTEST(peek_char == '>')
+ return (AND_GREATER_GREATER);
+ else
+ {
+ shell_ungetc (peek_char);
+ return (AND_GREATER);
+ }
+ }
+ else if MBTEST(character == '|' && peek_char == '&')
+ return (BAR_AND);
+ else if MBTEST(character == ';' && peek_char == '&')
+ {
+ parser_state |= PST_CASEPAT;
+#if defined (ALIAS)
+ parser_state &= ~PST_ALEXPNEXT;
+#endif /* ALIAS */
+ return (SEMI_AND);
+ }
+
+ shell_ungetc (peek_char);
+
+ /* If we look like we are reading the start of a function
+ definition, then let the reader know about it so that
+ we will do the right thing with `{'. */
+ if MBTEST(character == ')' && last_read_token == '(' && token_before_that == WORD)
+ {
+ parser_state |= PST_ALLOWOPNBRC;
+#if defined (ALIAS)
+ parser_state &= ~PST_ALEXPNEXT;
+#endif /* ALIAS */
+ function_dstart = line_number;
+ }
+
+ /* case pattern lists may be preceded by an optional left paren. If
+ we're not trying to parse a case pattern list, the left paren
+ indicates a subshell. */
+ if MBTEST(character == '(' && (parser_state & PST_CASEPAT) == 0) /* ) */
+ parser_state |= PST_SUBSHELL;
+ /*(*/
+ else if MBTEST((parser_state & PST_CASEPAT) && character == ')')
+ parser_state &= ~PST_CASEPAT;
+ /*(*/
+ else if MBTEST((parser_state & PST_SUBSHELL) && character == ')')
+ parser_state &= ~PST_SUBSHELL;
+
+#if defined (PROCESS_SUBSTITUTION)
+ /* Check for the constructs which introduce process substitution.
+ Shells running in `posix mode' don't do process substitution. */
+ if MBTEST(posixly_correct || ((character != '>' && character != '<') || peek_char != '(')) /*)*/
+#endif /* PROCESS_SUBSTITUTION */
+ return (character);
+ }
+
+ /* Hack <&- (close stdin) case. Also <&N- (dup and close). */
+ if MBTEST(character == '-' && (last_read_token == LESS_AND || last_read_token == GREATER_AND))
+ return (character);
+
+tokword:
+ /* Okay, if we got this far, we have to read a word. Read one,
+ and then check it against the known ones. */
+ result = read_token_word (character);
+#if defined (ALIAS)
+ if (result == RE_READ_TOKEN)
+ goto re_read_token;
+#endif
+ return result;
+}
+
+/*
+ * Match a $(...) or other grouping construct. This has to handle embedded
+ * quoted strings ('', ``, "") and nested constructs. It also must handle
+ * reprompting the user, if necessary, after reading a newline, and returning
+ * correct error values if it reads EOF.
+ */
+#define P_FIRSTCLOSE 0x01
+#define P_ALLOWESC 0x02
+#define P_DQUOTE 0x04
+#define P_COMMAND 0x08 /* parsing a command, so look for comments */
+#define P_BACKQUOTE 0x10 /* parsing a backquoted command substitution */
+#define P_ARRAYSUB 0x20 /* parsing a [...] array subscript for assignment */
+
+/* Lexical state while parsing a grouping construct or $(...). */
+#define LEX_WASDOL 0x001
+#define LEX_CKCOMMENT 0x002
+#define LEX_INCOMMENT 0x004
+#define LEX_PASSNEXT 0x008
+#define LEX_RESWDOK 0x010
+#define LEX_CKCASE 0x020
+#define LEX_INCASE 0x040
+#define LEX_INHEREDOC 0x080
+#define LEX_HEREDELIM 0x100 /* reading here-doc delimiter */
+#define LEX_STRIPDOC 0x200 /* <<- strip tabs from here doc delim */
+#define LEX_INWORD 0x400
+
+#define COMSUB_META(ch) ((ch) == ';' || (ch) == '&' || (ch) == '|')
+
+#define CHECK_NESTRET_ERROR() \
+ do { \
+ if (nestret == &matched_pair_error) \
+ { \
+ free (ret); \
+ return &matched_pair_error; \
+ } \
+ } while (0)
+
+#define APPEND_NESTRET() \
+ do { \
+ if (nestlen) \
+ { \
+ RESIZE_MALLOCED_BUFFER (ret, retind, nestlen, retsize, 64); \
+ strcpy (ret + retind, nestret); \
+ retind += nestlen; \
+ } \
+ } while (0)
+
+static char matched_pair_error;
+
+static char *
+parse_matched_pair (qc, open, close, lenp, flags)
+ int qc; /* `"' if this construct is within double quotes */
+ int open, close;
+ int *lenp, flags;
+{
+ int count, ch, tflags;
+ int nestlen, ttranslen, start_lineno;
+ char *ret, *nestret, *ttrans;
+ int retind, retsize, rflags;
+
+/*itrace("parse_matched_pair[%d]: open = %c close = %c flags = %d", line_number, open, close, flags);*/
+ count = 1;
+ tflags = 0;
+
+ if ((flags & P_COMMAND) && qc != '`' && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0)
+ tflags |= LEX_CKCOMMENT;
+
+ /* RFLAGS is the set of flags we want to pass to recursive calls. */
+ rflags = (qc == '"') ? P_DQUOTE : (flags & P_DQUOTE);
+
+ ret = (char *)xmalloc (retsize = 64);
+ retind = 0;
+
+ start_lineno = line_number;
+ while (count)
+ {
+ ch = shell_getc (qc != '\'' && (tflags & LEX_PASSNEXT) == 0);
+
+ if (ch == EOF)
+ {
+ free (ret);
+ parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), close);
+ EOF_Reached = 1; /* XXX */
+ return (&matched_pair_error);
+ }
+
+ /* Possible reprompting. */
+ if (ch == '\n' && SHOULD_PROMPT ())
+ prompt_again ();
+
+ /* Don't bother counting parens or doing anything else if in a comment
+ or part of a case statement */
+ if (tflags & LEX_INCOMMENT)
+ {
+ /* Add this character. */
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+
+ if (ch == '\n')
+ tflags &= ~LEX_INCOMMENT;
+
+ continue;
+ }
+
+ /* Not exactly right yet, should handle shell metacharacters, too. If
+ any changes are made to this test, make analogous changes to subst.c:
+ extract_delimited_string(). */
+ else if MBTEST((tflags & LEX_CKCOMMENT) && (tflags & LEX_INCOMMENT) == 0 && ch == '#' && (retind == 0 || ret[retind-1] == '\n' || shellblank (ret[retind - 1])))
+ tflags |= LEX_INCOMMENT;
+
+ if (tflags & LEX_PASSNEXT) /* last char was backslash */
+ {
+ tflags &= ~LEX_PASSNEXT;
+ if (qc != '\'' && ch == '\n') /* double-quoted \<newline> disappears. */
+ {
+ if (retind > 0)
+ retind--; /* swallow previously-added backslash */
+ continue;
+ }
+
+ RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
+ if MBTEST(ch == CTLESC || ch == CTLNUL)
+ ret[retind++] = CTLESC;
+ ret[retind++] = ch;
+ continue;
+ }
+ /* If we're reparsing the input (e.g., from parse_string_to_word_list),
+ we've already prepended CTLESC to single-quoted results of $'...'.
+ We may want to do this for other CTLESC-quoted characters in
+ reparse, too. */
+ else if MBTEST((parser_state & PST_REPARSE) && open == '\'' && (ch == CTLESC || ch == CTLNUL))
+ {
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+ continue;
+ }
+ else if MBTEST(ch == CTLESC || ch == CTLNUL) /* special shell escapes */
+ {
+ RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
+ ret[retind++] = CTLESC;
+ ret[retind++] = ch;
+ continue;
+ }
+ else if MBTEST(ch == close) /* ending delimiter */
+ count--;
+ /* handle nested ${...} specially. */
+ else if MBTEST(open != close && (tflags & LEX_WASDOL) && open == '{' && ch == open) /* } */
+ count++;
+ else if MBTEST(((flags & P_FIRSTCLOSE) == 0) && ch == open) /* nested begin */
+ count++;
+
+ /* Add this character. */
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+
+ /* If we just read the ending character, don't bother continuing. */
+ if (count == 0)
+ break;
+
+ if (open == '\'') /* '' inside grouping construct */
+ {
+ if MBTEST((flags & P_ALLOWESC) && ch == '\\')
+ tflags |= LEX_PASSNEXT;
+ continue;
+ }
+
+ if MBTEST(ch == '\\') /* backslashes */
+ tflags |= LEX_PASSNEXT;
+
+#if 0
+ /* The big hammer. Single quotes aren't special in double quotes. The
+ problem is that Posix says the single quotes are semi-special:
+ within a double-quoted ${...} construct "an even number of
+ unescaped double-quotes or single-quotes, if any, shall occur." */
+ if MBTEST(open == '{' && (flags & P_DQUOTE) && ch == '\'') /* } */
+ continue;
+#endif
+
+ /* Could also check open == '`' if we want to parse grouping constructs
+ inside old-style command substitution. */
+ if (open != close) /* a grouping construct */
+ {
+ if MBTEST(shellquote (ch))
+ {
+ /* '', ``, or "" inside $(...) or other grouping construct. */
+ push_delimiter (dstack, ch);
+ if MBTEST((tflags & LEX_WASDOL) && ch == '\'') /* $'...' inside group */
+ nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC|rflags);
+ else
+ nestret = parse_matched_pair (ch, ch, ch, &nestlen, rflags);
+ pop_delimiter (dstack);
+ CHECK_NESTRET_ERROR ();
+
+ if MBTEST((tflags & LEX_WASDOL) && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0))
+ {
+ /* Translate $'...' here. */
+ ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen);
+ xfree (nestret);
+
+ if ((rflags & P_DQUOTE) == 0)
+ {
+ nestret = sh_single_quote (ttrans);
+ free (ttrans);
+ nestlen = strlen (nestret);
+ }
+ else
+ {
+ nestret = ttrans;
+ nestlen = ttranslen;
+ }
+ retind -= 2; /* back up before the $' */
+ }
+ else if MBTEST((tflags & LEX_WASDOL) && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0))
+ {
+ /* Locale expand $"..." here. */
+ ttrans = localeexpand (nestret, 0, nestlen - 1, start_lineno, &ttranslen);
+ xfree (nestret);
+
+ nestret = sh_mkdoublequoted (ttrans, ttranslen, 0);
+ free (ttrans);
+ nestlen = ttranslen + 2;
+ retind -= 2; /* back up before the $" */
+ }
+
+ APPEND_NESTRET ();
+ FREE (nestret);
+ }
+ else if ((flags & P_ARRAYSUB) && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
+ goto parse_dollar_word;
+ }
+ /* Parse an old-style command substitution within double quotes as a
+ single word. */
+ /* XXX - sh and ksh93 don't do this - XXX */
+ else if MBTEST(open == '"' && ch == '`')
+ {
+ nestret = parse_matched_pair (0, '`', '`', &nestlen, rflags);
+
+ CHECK_NESTRET_ERROR ();
+ APPEND_NESTRET ();
+
+ FREE (nestret);
+ }
+ else if MBTEST(open != '`' && (tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
+ /* check for $(), $[], or ${} inside quoted string. */
+ {
+parse_dollar_word:
+ if (open == ch) /* undo previous increment */
+ count--;
+ if (ch == '(') /* ) */
+ nestret = parse_comsub (0, '(', ')', &nestlen, (rflags|P_COMMAND) & ~P_DQUOTE);
+ else if (ch == '{') /* } */
+ nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags);
+ else if (ch == '[') /* ] */
+ nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags);
+
+ CHECK_NESTRET_ERROR ();
+ APPEND_NESTRET ();
+
+ FREE (nestret);
+ }
+ if MBTEST(ch == '$')
+ tflags |= LEX_WASDOL;
+ else
+ tflags &= ~LEX_WASDOL;
+ }
+
+ ret[retind] = '\0';
+ if (lenp)
+ *lenp = retind;
+/*itrace("parse_matched_pair[%d]: returning %s", line_number, ret);*/
+ return ret;
+}
+
+/* Parse a $(...) command substitution. This is messier than I'd like, and
+ reproduces a lot more of the token-reading code than I'd like. */
+static char *
+parse_comsub (qc, open, close, lenp, flags)
+ int qc; /* `"' if this construct is within double quotes */
+ int open, close;
+ int *lenp, flags;
+{
+ int count, ch, peekc, tflags, lex_rwlen, lex_wlen, lex_firstind;
+ int nestlen, ttranslen, start_lineno;
+ char *ret, *nestret, *ttrans, *heredelim;
+ int retind, retsize, rflags, hdlen;
+
+/*itrace("parse_comsub: qc = `%c' open = %c close = %c", qc, open, close);*/
+ count = 1;
+ tflags = LEX_RESWDOK;
+
+ if ((flags & P_COMMAND) && qc != '\'' && qc != '"' && (flags & P_DQUOTE) == 0)
+ tflags |= LEX_CKCASE;
+ if ((tflags & LEX_CKCASE) && (interactive == 0 || interactive_comments))
+ tflags |= LEX_CKCOMMENT;
+
+ /* RFLAGS is the set of flags we want to pass to recursive calls. */
+ rflags = (flags & P_DQUOTE);
+
+ ret = (char *)xmalloc (retsize = 64);
+ retind = 0;
+
+ start_lineno = line_number;
+ lex_rwlen = lex_wlen = 0;
+
+ heredelim = 0;
+ lex_firstind = -1;
+
+ while (count)
+ {
+comsub_readchar:
+ ch = shell_getc (qc != '\'' && (tflags & LEX_PASSNEXT) == 0);
+
+ if (ch == EOF)
+ {
+eof_error:
+ free (ret);
+ FREE (heredelim);
+ parser_error (start_lineno, _("unexpected EOF while looking for matching `%c'"), close);
+ EOF_Reached = 1; /* XXX */
+ return (&matched_pair_error);
+ }
+
+ /* If we hit the end of a line and are reading the contents of a here
+ document, and it's not the same line that the document starts on,
+ check for this line being the here doc delimiter. Otherwise, if
+ we're in a here document, mark the next character as the beginning
+ of a line. */
+ if (ch == '\n')
+ {
+ if ((tflags & LEX_HEREDELIM) && heredelim)
+ {
+ tflags &= ~LEX_HEREDELIM;
+ tflags |= LEX_INHEREDOC;
+ lex_firstind = retind + 1;
+ }
+ else if (tflags & LEX_INHEREDOC)
+ {
+ int tind;
+ tind = lex_firstind;
+ while ((tflags & LEX_STRIPDOC) && ret[tind] == '\t')
+ tind++;
+ if (STREQN (ret + tind, heredelim, hdlen))
+ {
+ tflags &= ~(LEX_STRIPDOC|LEX_INHEREDOC);
+/*itrace("parse_comsub:%d: found here doc end `%s'", line_number, ret + tind);*/
+ free (heredelim);
+ heredelim = 0;
+ lex_firstind = -1;
+ }
+ else
+ lex_firstind = retind + 1;
+ }
+ }
+
+ /* Possible reprompting. */
+ if (ch == '\n' && SHOULD_PROMPT ())
+ prompt_again ();
+
+ /* XXX -- possibly allow here doc to be delimited by ending right
+ paren. */
+ if ((tflags & LEX_INHEREDOC) && ch == close && count == 1)
+ {
+ int tind;
+/*itrace("parse_comsub: in here doc, ch == close, retind - firstind = %d hdlen = %d retind = %d", retind-lex_firstind, hdlen, retind);*/
+ tind = lex_firstind;
+ while ((tflags & LEX_STRIPDOC) && ret[tind] == '\t')
+ tind++;
+ if (retind-tind == hdlen && STREQN (ret + tind, heredelim, hdlen))
+ {
+ tflags &= ~(LEX_STRIPDOC|LEX_INHEREDOC);
+/*itrace("parse_comsub:%d: found here doc end `%s'", line_number, ret + tind);*/
+ free (heredelim);
+ heredelim = 0;
+ lex_firstind = -1;
+ }
+ }
+
+ /* Don't bother counting parens or doing anything else if in a comment */
+ if (tflags & (LEX_INCOMMENT|LEX_INHEREDOC))
+ {
+ /* Add this character. */
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+
+ if ((tflags & LEX_INCOMMENT) && ch == '\n')
+{
+/*itrace("parse_comsub:%d: lex_incomment -> 0 ch = `%c'", line_number, ch);*/
+ tflags &= ~LEX_INCOMMENT;
+}
+
+ continue;
+ }
+
+ if (tflags & LEX_PASSNEXT) /* last char was backslash */
+ {
+/*itrace("parse_comsub:%d: lex_passnext -> 0 ch = `%c' (%d)", line_number, ch, __LINE__);*/
+ tflags &= ~LEX_PASSNEXT;
+ if (qc != '\'' && ch == '\n') /* double-quoted \<newline> disappears. */
+ {
+ if (retind > 0)
+ retind--; /* swallow previously-added backslash */
+ continue;
+ }
+
+ RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
+ if MBTEST(ch == CTLESC || ch == CTLNUL)
+ ret[retind++] = CTLESC;
+ ret[retind++] = ch;
+ continue;
+ }
+
+ /* If this is a shell break character, we are not in a word. If not,
+ we either start or continue a word. */
+ if MBTEST(shellbreak (ch))
+ {
+ tflags &= ~LEX_INWORD;
+/*itrace("parse_comsub:%d: lex_inword -> 0 ch = `%c' (%d)", line_number, ch, __LINE__);*/
+ }
+ else
+ {
+ if (tflags & LEX_INWORD)
+ {
+ lex_wlen++;
+/*itrace("parse_comsub:%d: lex_inword == 1 ch = `%c' lex_wlen = %d (%d)", line_number, ch, lex_wlen, __LINE__);*/
+ }
+ else
+ {
+/*itrace("parse_comsub:%d: lex_inword -> 1 ch = `%c' (%d)", line_number, ch, __LINE__);*/
+ tflags |= LEX_INWORD;
+ lex_wlen = 0;
+ }
+ }
+
+ /* Skip whitespace */
+ if MBTEST(shellblank (ch) && lex_rwlen == 0)
+ {
+ /* Add this character. */
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+ continue;
+ }
+
+ /* Either we are looking for the start of the here-doc delimiter
+ (lex_firstind == -1) or we are reading one (lex_firstind >= 0).
+ If this character is a shell break character and we are reading
+ the delimiter, save it and note that we are now reading a here
+ document. If we've found the start of the delimiter, note it by
+ setting lex_firstind. Backslashes can quote shell metacharacters
+ in here-doc delimiters. */
+ if (tflags & LEX_HEREDELIM)
+ {
+ if (lex_firstind == -1 && shellbreak (ch) == 0)
+ lex_firstind = retind;
+#if 0
+ else if (heredelim && (tflags & LEX_PASSNEXT) == 0 && ch == '\n')
+ {
+ tflags |= LEX_INHEREDOC;
+ tflags &= ~LEX_HEREDELIM;
+ lex_firstind = retind + 1;
+ }
+#endif
+ else if (lex_firstind >= 0 && (tflags & LEX_PASSNEXT) == 0 && shellbreak (ch))
+ {
+ if (heredelim == 0)
+ {
+ nestret = substring (ret, lex_firstind, retind);
+ heredelim = string_quote_removal (nestret, 0);
+ free (nestret);
+ hdlen = STRLEN(heredelim);
+/*itrace("parse_comsub:%d: found here doc delimiter `%s' (%d)", line_number, heredelim, hdlen);*/
+ }
+ if (ch == '\n')
+ {
+ tflags |= LEX_INHEREDOC;
+ tflags &= ~LEX_HEREDELIM;
+ lex_firstind = retind + 1;
+ }
+ else
+ lex_firstind = -1;
+ }
+ }
+
+ /* Meta-characters that can introduce a reserved word. Not perfect yet. */
+ if MBTEST((tflags & LEX_RESWDOK) == 0 && (tflags & LEX_CKCASE) && (tflags & LEX_INCOMMENT) == 0 && (shellmeta(ch) || ch == '\n'))
+ {
+ /* Add this character. */
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+ peekc = shell_getc (1);
+ if (ch == peekc && (ch == '&' || ch == '|' || ch == ';')) /* two-character tokens */
+ {
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = peekc;
+/*itrace("parse_comsub:%d: set lex_reswordok = 1, ch = `%c'", line_number, ch);*/
+ tflags |= LEX_RESWDOK;
+ lex_rwlen = 0;
+ continue;
+ }
+ else if (ch == '\n' || COMSUB_META(ch))
+ {
+ shell_ungetc (peekc);
+/*itrace("parse_comsub:%d: set lex_reswordok = 1, ch = `%c'", line_number, ch);*/
+ tflags |= LEX_RESWDOK;
+ lex_rwlen = 0;
+ continue;
+ }
+ else if (ch == EOF)
+ goto eof_error;
+ else
+ {
+ /* `unget' the character we just added and fall through */
+ retind--;
+ shell_ungetc (peekc);
+ }
+ }
+
+ /* If we can read a reserved word, try to read one. */
+ if (tflags & LEX_RESWDOK)
+ {
+ if MBTEST(islower (ch))
+ {
+ /* Add this character. */
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+ lex_rwlen++;
+ continue;
+ }
+ else if MBTEST(lex_rwlen == 4 && shellbreak (ch))
+ {
+ if (STREQN (ret + retind - 4, "case", 4))
+{
+ tflags |= LEX_INCASE;
+/*itrace("parse_comsub:%d: found `case', lex_incase -> 1 lex_reswdok -> 0", line_number);*/
+}
+ else if (STREQN (ret + retind - 4, "esac", 4))
+{
+ tflags &= ~LEX_INCASE;
+/*itrace("parse_comsub:%d: found `esac', lex_incase -> 0 lex_reswdok -> 0", line_number);*/
+}
+ tflags &= ~LEX_RESWDOK;
+ }
+ else if MBTEST((tflags & LEX_CKCOMMENT) && ch == '#' && (lex_rwlen == 0 || ((tflags & LEX_INWORD) && lex_wlen == 0)))
+ ; /* don't modify LEX_RESWDOK if we're starting a comment */
+ else if MBTEST((tflags & LEX_INCASE) && ch != '\n')
+ /* If we can read a reserved word and we're in case, we're at the
+ point where we can read a new pattern list or an esac. We
+ handle the esac case above. If we read a newline, we want to
+ leave LEX_RESWDOK alone. If we read anything else, we want to
+ turn off LEX_RESWDOK, since we're going to read a pattern list. */
+{
+ tflags &= ~LEX_RESWDOK;
+/*itrace("parse_comsub:%d: lex_incase == 1 found `%c', lex_reswordok -> 0", line_number, ch);*/
+}
+ else if MBTEST(shellbreak (ch) == 0)
+{
+ tflags &= ~LEX_RESWDOK;
+/*itrace("parse_comsub:%d: found `%c', lex_reswordok -> 0", line_number, ch);*/
+}
+ }
+
+ /* Might be the start of a here-doc delimiter */
+ if MBTEST((tflags & LEX_INCOMMENT) == 0 && (tflags & LEX_CKCASE) && ch == '<')
+ {
+ /* Add this character. */
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+ peekc = shell_getc (1);
+ if (peekc == EOF)
+ goto eof_error;
+ if (peekc == ch)
+ {
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = peekc;
+ peekc = shell_getc (1);
+ if (peekc == EOF)
+ goto eof_error;
+ if (peekc == '-')
+ {
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = peekc;
+ tflags |= LEX_STRIPDOC;
+ }
+ else
+ shell_ungetc (peekc);
+ if (peekc != '<')
+ {
+ tflags |= LEX_HEREDELIM;
+ lex_firstind = -1;
+ }
+ continue;
+ }
+ else
+ ch = peekc; /* fall through and continue XXX */
+ }
+ else if MBTEST((tflags & LEX_CKCOMMENT) && (tflags & LEX_INCOMMENT) == 0 && ch == '#' && (((tflags & LEX_RESWDOK) && lex_rwlen == 0) || ((tflags & LEX_INWORD) && lex_wlen == 0)))
+{
+/*itrace("parse_comsub:%d: lex_incomment -> 1 (%d)", line_number, __LINE__);*/
+ tflags |= LEX_INCOMMENT;
+}
+
+ if MBTEST(ch == CTLESC || ch == CTLNUL) /* special shell escapes */
+ {
+ RESIZE_MALLOCED_BUFFER (ret, retind, 2, retsize, 64);
+ ret[retind++] = CTLESC;
+ ret[retind++] = ch;
+ continue;
+ }
+#if 0
+ else if MBTEST((tflags & LEX_INCASE) && ch == close && close == ')')
+ tflags &= ~LEX_INCASE; /* XXX */
+#endif
+ else if MBTEST(ch == close && (tflags & LEX_INCASE) == 0) /* ending delimiter */
+{
+ count--;
+/*itrace("parse_comsub:%d: found close: count = %d", line_number, count);*/
+}
+ else if MBTEST(((flags & P_FIRSTCLOSE) == 0) && (tflags & LEX_INCASE) == 0 && ch == open) /* nested begin */
+{
+ count++;
+/*itrace("parse_comsub:%d: found open: count = %d", line_number, count);*/
+}
+
+ /* Add this character. */
+ RESIZE_MALLOCED_BUFFER (ret, retind, 1, retsize, 64);
+ ret[retind++] = ch;
+
+ /* If we just read the ending character, don't bother continuing. */
+ if (count == 0)
+ break;
+
+ if MBTEST(ch == '\\') /* backslashes */
+ tflags |= LEX_PASSNEXT;
+
+ if MBTEST(shellquote (ch))
+ {
+ /* '', ``, or "" inside $(...). */
+ push_delimiter (dstack, ch);
+ if MBTEST((tflags & LEX_WASDOL) && ch == '\'') /* $'...' inside group */
+ nestret = parse_matched_pair (ch, ch, ch, &nestlen, P_ALLOWESC|rflags);
+ else
+ nestret = parse_matched_pair (ch, ch, ch, &nestlen, rflags);
+ pop_delimiter (dstack);
+ CHECK_NESTRET_ERROR ();
+
+ if MBTEST((tflags & LEX_WASDOL) && ch == '\'' && (extended_quote || (rflags & P_DQUOTE) == 0))
+ {
+ /* Translate $'...' here. */
+ ttrans = ansiexpand (nestret, 0, nestlen - 1, &ttranslen);
+ xfree (nestret);
+
+ if ((rflags & P_DQUOTE) == 0)
+ {
+ nestret = sh_single_quote (ttrans);
+ free (ttrans);
+ nestlen = strlen (nestret);
+ }
+ else
+ {
+ nestret = ttrans;
+ nestlen = ttranslen;
+ }
+ retind -= 2; /* back up before the $' */
+ }
+ else if MBTEST((tflags & LEX_WASDOL) && ch == '"' && (extended_quote || (rflags & P_DQUOTE) == 0))
+ {
+ /* Locale expand $"..." here. */
+ ttrans = localeexpand (nestret, 0, nestlen - 1, start_lineno, &ttranslen);
+ xfree (nestret);
+
+ nestret = sh_mkdoublequoted (ttrans, ttranslen, 0);
+ free (ttrans);
+ nestlen = ttranslen + 2;
+ retind -= 2; /* back up before the $" */
+ }
+
+ APPEND_NESTRET ();
+ FREE (nestret);
+ }
+ else if MBTEST((tflags & LEX_WASDOL) && (ch == '(' || ch == '{' || ch == '[')) /* ) } ] */
+ /* check for $(), $[], or ${} inside command substitution. */
+ {
+ if ((tflags & LEX_INCASE) == 0 && open == ch) /* undo previous increment */
+ count--;
+ if (ch == '(') /* ) */
+ nestret = parse_comsub (0, '(', ')', &nestlen, (rflags|P_COMMAND) & ~P_DQUOTE);
+ else if (ch == '{') /* } */
+ nestret = parse_matched_pair (0, '{', '}', &nestlen, P_FIRSTCLOSE|rflags);
+ else if (ch == '[') /* ] */
+ nestret = parse_matched_pair (0, '[', ']', &nestlen, rflags);
+
+ CHECK_NESTRET_ERROR ();
+ APPEND_NESTRET ();
+
+ FREE (nestret);
+ }
+ if MBTEST(ch == '$')
+ tflags |= LEX_WASDOL;
+ else
+ tflags &= ~LEX_WASDOL;
+ }
+
+ FREE (heredelim);
+ ret[retind] = '\0';
+ if (lenp)
+ *lenp = retind;
+/*itrace("parse_comsub:%d: returning `%s'", line_number, ret);*/
+ return ret;
+}
+
+/* XXX - this needs to handle functionality like subst.c:no_longjmp_on_fatal_error;
+ maybe extract_command_subst should handle it. */
+char *
+xparse_dolparen (base, string, indp, flags)
+ char *base;
+ char *string;
+ int *indp;
+ int flags;
+{
+ sh_parser_state_t ps;
+ int orig_ind, nc, sflags;
+ char *ret, *s, *ep, *ostring;
+
+ /*yydebug = 1;*/
+ orig_ind = *indp;
+ ostring = string;
+
+ sflags = SEVAL_NONINT|SEVAL_NOHIST|SEVAL_NOFREE;
+ if (flags & SX_NOLONGJMP)
+ sflags |= SEVAL_NOLONGJMP;
+ save_parser_state (&ps);
+
+ /*(*/
+ parser_state |= PST_CMDSUBST|PST_EOFTOKEN; /* allow instant ')' */ /*(*/
+ shell_eof_token = ')';
+ parse_string (string, "command substitution", sflags, &ep);
+
+ restore_parser_state (&ps);
+ reset_parser ();
+ if (interactive)
+ token_to_read = 0;
+
+ /* Need to find how many characters parse_and_execute consumed, update
+ *indp, if flags != 0, copy the portion of the string parsed into RET
+ and return it. If flags & 1 (EX_NOALLOC) we can return NULL. */
+
+ /*(*/
+ if (ep[-1] != ')')
+ {
+#if DEBUG
+ if (ep[-1] != '\n')
+ itrace("xparse_dolparen:%d: ep[-1] != RPAREN (%d), ep = `%s'", line_number, ep[-1], ep);
+#endif
+ while (ep > ostring && ep[-1] == '\n') ep--;
+ }
+
+ nc = ep - ostring;
+ *indp = ep - base - 1;
+
+ /*(*/
+#if DEBUG
+ if (base[*indp] != ')')
+ itrace("xparse_dolparen:%d: base[%d] != RPAREN (%d), base = `%s'", line_number, *indp, base[*indp], base);
+#endif
+
+ if (flags & SX_NOALLOC)
+ return (char *)NULL;
+
+ if (nc == 0)
+ {
+ ret = xmalloc (1);
+ ret[0] = '\0';
+ }
+ else
+ ret = substring (ostring, 0, nc - 1);
+
+ return ret;
+}
+
+#if defined (DPAREN_ARITHMETIC) || defined (ARITH_FOR_COMMAND)
+/* Parse a double-paren construct. It can be either an arithmetic
+ command, an arithmetic `for' command, or a nested subshell. Returns
+ the parsed token, -1 on error, or -2 if we didn't do anything and
+ should just go on. */
+static int
+parse_dparen (c)
+ int c;
+{
+ int cmdtyp, sline;
+ char *wval;
+ WORD_DESC *wd;
+
+#if defined (ARITH_FOR_COMMAND)
+ if (last_read_token == FOR)
+ {
+ arith_for_lineno = line_number;
+ cmdtyp = parse_arith_cmd (&wval, 0);
+ if (cmdtyp == 1)
+ {
+ wd = alloc_word_desc ();
+ wd->word = wval;
+ yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL);
+ return (ARITH_FOR_EXPRS);
+ }
+ else
+ return -1; /* ERROR */
+ }
+#endif
+
+#if defined (DPAREN_ARITHMETIC)
+ if (reserved_word_acceptable (last_read_token))
+ {
+ sline = line_number;
+
+ cmdtyp = parse_arith_cmd (&wval, 0);
+ if (cmdtyp == 1) /* arithmetic command */
+ {
+ wd = alloc_word_desc ();
+ wd->word = wval;
+ wd->flags = W_QUOTED|W_NOSPLIT|W_NOGLOB|W_DQUOTE;
+ yylval.word_list = make_word_list (wd, (WORD_LIST *)NULL);
+ return (ARITH_CMD);
+ }
+ else if (cmdtyp == 0) /* nested subshell */
+ {
+ push_string (wval, 0, (alias_t *)NULL);
+ if ((parser_state & PST_CASEPAT) == 0)
+ parser_state |= PST_SUBSHELL;
+ return (c);
+ }
+ else /* ERROR */
+ return -1;
+ }
+#endif
+
+ return -2; /* XXX */
+}
+
+/* We've seen a `(('. Look for the matching `))'. If we get it, return 1.
+ If not, assume it's a nested subshell for backwards compatibility and
+ return 0. In any case, put the characters we've consumed into a locally-
+ allocated buffer and make *ep point to that buffer. Return -1 on an
+ error, for example EOF. */
+static int
+parse_arith_cmd (ep, adddq)
+ char **ep;
+ int adddq;
+{
+ int exp_lineno, rval, c;
+ char *ttok, *tokstr;
+ int ttoklen;
+
+ exp_lineno = line_number;
+ ttok = parse_matched_pair (0, '(', ')', &ttoklen, 0);
+ rval = 1;
+ if (ttok == &matched_pair_error)
+ return -1;
+ /* Check that the next character is the closing right paren. If
+ not, this is a syntax error. ( */
+ c = shell_getc (0);
+ if MBTEST(c != ')')
+ rval = 0;
+
+ tokstr = (char *)xmalloc (ttoklen + 4);
+
+ /* if ADDDQ != 0 then (( ... )) -> "..." */
+ if (rval == 1 && adddq) /* arith cmd, add double quotes */
+ {
+ tokstr[0] = '"';
+ strncpy (tokstr + 1, ttok, ttoklen - 1);
+ tokstr[ttoklen] = '"';
+ tokstr[ttoklen+1] = '\0';
+ }
+ else if (rval == 1) /* arith cmd, don't add double quotes */
+ {
+ strncpy (tokstr, ttok, ttoklen - 1);
+ tokstr[ttoklen-1] = '\0';
+ }
+ else /* nested subshell */
+ {
+ tokstr[0] = '(';
+ strncpy (tokstr + 1, ttok, ttoklen - 1);
+ tokstr[ttoklen] = ')';
+ tokstr[ttoklen+1] = c;
+ tokstr[ttoklen+2] = '\0';
+ }
+
+ *ep = tokstr;
+ FREE (ttok);
+ return rval;
+}
+#endif /* DPAREN_ARITHMETIC || ARITH_FOR_COMMAND */
+
+#if defined (COND_COMMAND)
+static void
+cond_error ()
+{
+ char *etext;
+
+ if (EOF_Reached && cond_token != COND_ERROR) /* [[ */
+ parser_error (cond_lineno, _("unexpected EOF while looking for `]]'"));
+ else if (cond_token != COND_ERROR)
+ {
+ if (etext = error_token_from_token (cond_token))
+ {
+ parser_error (cond_lineno, _("syntax error in conditional expression: unexpected token `%s'"), etext);
+ free (etext);
+ }
+ else
+ parser_error (cond_lineno, _("syntax error in conditional expression"));
+ }
+}
+
+static COND_COM *
+cond_expr ()
+{
+ return (cond_or ());
+}
+
+static COND_COM *
+cond_or ()
+{
+ COND_COM *l, *r;
+
+ l = cond_and ();
+ if (cond_token == OR_OR)
+ {
+ r = cond_or ();
+ l = make_cond_node (COND_OR, (WORD_DESC *)NULL, l, r);
+ }
+ return l;
+}
+
+static COND_COM *
+cond_and ()
+{
+ COND_COM *l, *r;
+
+ l = cond_term ();
+ if (cond_token == AND_AND)
+ {
+ r = cond_and ();
+ l = make_cond_node (COND_AND, (WORD_DESC *)NULL, l, r);
+ }
+ return l;
+}
+
+static int
+cond_skip_newlines ()
+{
+ while ((cond_token = read_token (READ)) == '\n')
+ {
+ if (SHOULD_PROMPT ())
+ prompt_again ();
+ }
+ return (cond_token);
+}
+
+#define COND_RETURN_ERROR() \
+ do { cond_token = COND_ERROR; return ((COND_COM *)NULL); } while (0)
+
+static COND_COM *
+cond_term ()
+{
+ WORD_DESC *op;
+ COND_COM *term, *tleft, *tright;
+ int tok, lineno;
+ char *etext;
+
+ /* Read a token. It can be a left paren, a `!', a unary operator, or a
+ word that should be the first argument of a binary operator. Start by
+ skipping newlines, since this is a compound command. */
+ tok = cond_skip_newlines ();
+ lineno = line_number;
+ if (tok == COND_END)
+ {
+ COND_RETURN_ERROR ();
+ }
+ else if (tok == '(')
+ {
+ term = cond_expr ();
+ if (cond_token != ')')
+ {
+ if (term)
+ dispose_cond_node (term); /* ( */
+ if (etext = error_token_from_token (cond_token))
+ {
+ parser_error (lineno, _("unexpected token `%s', expected `)'"), etext);
+ free (etext);
+ }
+ else
+ parser_error (lineno, _("expected `)'"));
+ COND_RETURN_ERROR ();
+ }
+ term = make_cond_node (COND_EXPR, (WORD_DESC *)NULL, term, (COND_COM *)NULL);
+ (void)cond_skip_newlines ();
+ }
+ else if (tok == BANG || (tok == WORD && (yylval.word->word[0] == '!' && yylval.word->word[1] == '\0')))
+ {
+ if (tok == WORD)
+ dispose_word (yylval.word); /* not needed */
+ term = cond_term ();
+ if (term)
+ term->flags |= CMD_INVERT_RETURN;
+ }
+ else if (tok == WORD && yylval.word->word[0] == '-' && yylval.word->word[2] == 0 && test_unop (yylval.word->word))
+ {
+ op = yylval.word;
+ tok = read_token (READ);
+ if (tok == WORD)
+ {
+ tleft = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL);
+ term = make_cond_node (COND_UNARY, op, tleft, (COND_COM *)NULL);
+ }
+ else
+ {
+ dispose_word (op);
+ if (etext = error_token_from_token (tok))
+ {
+ parser_error (line_number, _("unexpected argument `%s' to conditional unary operator"), etext);
+ free (etext);
+ }
+ else
+ parser_error (line_number, _("unexpected argument to conditional unary operator"));
+ COND_RETURN_ERROR ();
+ }
+
+ (void)cond_skip_newlines ();
+ }
+ else if (tok == WORD) /* left argument to binary operator */
+ {
+ /* lhs */
+ tleft = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL);
+
+ /* binop */
+ tok = read_token (READ);
+ if (tok == WORD && test_binop (yylval.word->word))
+ {
+ op = yylval.word;
+ if (op->word[0] == '=' && (op->word[1] == '\0' || (op->word[1] == '=' && op->word[2] == '\0')))
+ parser_state |= PST_EXTPAT;
+ else if (op->word[0] == '!' && op->word[1] == '=' && op->word[2] == '\0')
+ parser_state |= PST_EXTPAT;
+ }
+#if defined (COND_REGEXP)
+ else if (tok == WORD && STREQ (yylval.word->word, "=~"))
+ {
+ op = yylval.word;
+ parser_state |= PST_REGEXP;
+ }
+#endif
+ else if (tok == '<' || tok == '>')
+ op = make_word_from_token (tok); /* ( */
+ /* There should be a check before blindly accepting the `)' that we have
+ seen the opening `('. */
+ else if (tok == COND_END || tok == AND_AND || tok == OR_OR || tok == ')')
+ {
+ /* Special case. [[ x ]] is equivalent to [[ -n x ]], just like
+ the test command. Similarly for [[ x && expr ]] or
+ [[ x || expr ]] or [[ (x) ]]. */
+ op = make_word ("-n");
+ term = make_cond_node (COND_UNARY, op, tleft, (COND_COM *)NULL);
+ cond_token = tok;
+ return (term);
+ }
+ else
+ {
+ if (etext = error_token_from_token (tok))
+ {
+ parser_error (line_number, _("unexpected token `%s', conditional binary operator expected"), etext);
+ free (etext);
+ }
+ else
+ parser_error (line_number, _("conditional binary operator expected"));
+ dispose_cond_node (tleft);
+ COND_RETURN_ERROR ();
+ }
+
+ /* rhs */
+ if (parser_state & PST_EXTPAT)
+ extended_glob = 1;
+ tok = read_token (READ);
+ if (parser_state & PST_EXTPAT)
+ extended_glob = global_extglob;
+ parser_state &= ~(PST_REGEXP|PST_EXTPAT);
+
+ if (tok == WORD)
+ {
+ tright = make_cond_node (COND_TERM, yylval.word, (COND_COM *)NULL, (COND_COM *)NULL);
+ term = make_cond_node (COND_BINARY, op, tleft, tright);
+ }
+ else
+ {
+ if (etext = error_token_from_token (tok))
+ {
+ parser_error (line_number, _("unexpected argument `%s' to conditional binary operator"), etext);
+ free (etext);
+ }
+ else
+ parser_error (line_number, _("unexpected argument to conditional binary operator"));
+ dispose_cond_node (tleft);
+ dispose_word (op);
+ COND_RETURN_ERROR ();
+ }
+
+ (void)cond_skip_newlines ();
+ }
+ else
+ {
+ if (tok < 256)
+ parser_error (line_number, _("unexpected token `%c' in conditional command"), tok);
+ else if (etext = error_token_from_token (tok))
+ {
+ parser_error (line_number, _("unexpected token `%s' in conditional command"), etext);
+ free (etext);
+ }
+ else
+ parser_error (line_number, _("unexpected token %d in conditional command"), tok);
+ COND_RETURN_ERROR ();
+ }
+ return (term);
+}
+
+/* This is kind of bogus -- we slip a mini recursive-descent parser in
+ here to handle the conditional statement syntax. */
+static COMMAND *
+parse_cond_command ()
+{
+ COND_COM *cexp;
+
+ global_extglob = extended_glob;
+ cexp = cond_expr ();
+ return (make_cond_command (cexp));
+}
+#endif
+
+#if defined (ARRAY_VARS)
+/* When this is called, it's guaranteed that we don't care about anything
+ in t beyond i. We do save and restore the chars, though. */
+static int
+token_is_assignment (t, i)
+ char *t;
+ int i;
+{
+ unsigned char c, c1;
+ int r;
+
+ c = t[i]; c1 = t[i+1];
+ t[i] = '='; t[i+1] = '\0';
+ r = assignment (t, (parser_state & PST_COMPASSIGN) != 0);
+ t[i] = c; t[i+1] = c1;
+ return r;
+}
+
+/* XXX - possible changes here for `+=' */
+static int
+token_is_ident (t, i)
+ char *t;
+ int i;
+{
+ unsigned char c;
+ int r;
+
+ c = t[i];
+ t[i] = '\0';
+ r = legal_identifier (t);
+ t[i] = c;
+ return r;
+}
+#endif
+
+static int
+read_token_word (character)
+ int character;
+{
+ /* The value for YYLVAL when a WORD is read. */
+ WORD_DESC *the_word;
+
+ /* Index into the token that we are building. */
+ int token_index;
+
+ /* ALL_DIGITS becomes zero when we see a non-digit. */
+ int all_digit_token;
+
+ /* DOLLAR_PRESENT becomes non-zero if we see a `$'. */
+ int dollar_present;
+
+ /* COMPOUND_ASSIGNMENT becomes non-zero if we are parsing a compound
+ assignment. */
+ int compound_assignment;
+
+ /* QUOTED becomes non-zero if we see one of ("), ('), (`), or (\). */
+ int quoted;
+
+ /* Non-zero means to ignore the value of the next character, and just
+ to add it no matter what. */
+ int pass_next_character;
+
+ /* The current delimiting character. */
+ int cd;
+ int result, peek_char;
+ char *ttok, *ttrans;
+ int ttoklen, ttranslen;
+ intmax_t lvalue;
+
+ if (token_buffer_size < TOKEN_DEFAULT_INITIAL_SIZE)
+ token = (char *)xrealloc (token, token_buffer_size = TOKEN_DEFAULT_INITIAL_SIZE);
+
+ token_index = 0;
+ all_digit_token = DIGIT (character);
+ dollar_present = quoted = pass_next_character = compound_assignment = 0;
+
+ for (;;)
+ {
+ if (character == EOF)
+ goto got_token;
+
+ if (pass_next_character)
+ {
+ pass_next_character = 0;
+ goto got_escaped_character;
+ }
+
+ cd = current_delimiter (dstack);
+
+ /* Handle backslashes. Quote lots of things when not inside of
+ double-quotes, quote some things inside of double-quotes. */
+ if MBTEST(character == '\\')
+ {
+ peek_char = shell_getc (0);
+
+ /* Backslash-newline is ignored in all cases except
+ when quoted with single quotes. */
+ if (peek_char == '\n')
+ {
+ character = '\n';
+ goto next_character;
+ }
+ else
+ {
+ shell_ungetc (peek_char);
+
+ /* If the next character is to be quoted, note it now. */
+ if (cd == 0 || cd == '`' ||
+ (cd == '"' && peek_char >= 0 && (sh_syntaxtab[peek_char] & CBSDQUOTE)))
+ pass_next_character++;
+
+ quoted = 1;
+ goto got_character;
+ }
+ }
+
+ /* Parse a matched pair of quote characters. */
+ if MBTEST(shellquote (character))
+ {
+ push_delimiter (dstack, character);
+ ttok = parse_matched_pair (character, character, character, &ttoklen, (character == '`') ? P_COMMAND : 0);
+ pop_delimiter (dstack);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+ RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2,
+ token_buffer_size, TOKEN_DEFAULT_GROW_SIZE);
+ token[token_index++] = character;
+ strcpy (token + token_index, ttok);
+ token_index += ttoklen;
+ all_digit_token = 0;
+ quoted = 1;
+ dollar_present |= (character == '"' && strchr (ttok, '$') != 0);
+ FREE (ttok);
+ goto next_character;
+ }
+
+#ifdef COND_REGEXP
+ /* When parsing a regexp as a single word inside a conditional command,
+ we need to special-case characters special to both the shell and
+ regular expressions. Right now, that is only '(' and '|'. */ /*)*/
+ if MBTEST((parser_state & PST_REGEXP) && (character == '(' || character == '|')) /*)*/
+ {
+ if (character == '|')
+ goto got_character;
+
+ push_delimiter (dstack, character);
+ ttok = parse_matched_pair (cd, '(', ')', &ttoklen, 0);
+ pop_delimiter (dstack);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+ RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2,
+ token_buffer_size, TOKEN_DEFAULT_GROW_SIZE);
+ token[token_index++] = character;
+ strcpy (token + token_index, ttok);
+ token_index += ttoklen;
+ FREE (ttok);
+ dollar_present = all_digit_token = 0;
+ goto next_character;
+ }
+#endif /* COND_REGEXP */
+
+#ifdef EXTENDED_GLOB
+ /* Parse a ksh-style extended pattern matching specification. */
+ if MBTEST(extended_glob && PATTERN_CHAR (character))
+ {
+ peek_char = shell_getc (1);
+ if MBTEST(peek_char == '(') /* ) */
+ {
+ push_delimiter (dstack, peek_char);
+ ttok = parse_matched_pair (cd, '(', ')', &ttoklen, 0);
+ pop_delimiter (dstack);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+ RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2,
+ token_buffer_size,
+ TOKEN_DEFAULT_GROW_SIZE);
+ token[token_index++] = character;
+ token[token_index++] = peek_char;
+ strcpy (token + token_index, ttok);
+ token_index += ttoklen;
+ FREE (ttok);
+ dollar_present = all_digit_token = 0;
+ goto next_character;
+ }
+ else
+ shell_ungetc (peek_char);
+ }
+#endif /* EXTENDED_GLOB */
+
+ /* If the delimiter character is not single quote, parse some of
+ the shell expansions that must be read as a single word. */
+ if (shellexp (character))
+ {
+ peek_char = shell_getc (1);
+ /* $(...), <(...), >(...), $((...)), ${...}, and $[...] constructs */
+ if MBTEST(peek_char == '(' || \
+ ((peek_char == '{' || peek_char == '[') && character == '$')) /* ) ] } */
+ {
+ if (peek_char == '{') /* } */
+ ttok = parse_matched_pair (cd, '{', '}', &ttoklen, P_FIRSTCLOSE);
+ else if (peek_char == '(') /* ) */
+ {
+ /* XXX - push and pop the `(' as a delimiter for use by
+ the command-oriented-history code. This way newlines
+ appearing in the $(...) string get added to the
+ history literally rather than causing a possibly-
+ incorrect `;' to be added. ) */
+ push_delimiter (dstack, peek_char);
+ ttok = parse_comsub (cd, '(', ')', &ttoklen, P_COMMAND);
+ pop_delimiter (dstack);
+ }
+ else
+ ttok = parse_matched_pair (cd, '[', ']', &ttoklen, 0);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+ RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2,
+ token_buffer_size,
+ TOKEN_DEFAULT_GROW_SIZE);
+ token[token_index++] = character;
+ token[token_index++] = peek_char;
+ strcpy (token + token_index, ttok);
+ token_index += ttoklen;
+ FREE (ttok);
+ dollar_present = 1;
+ all_digit_token = 0;
+ goto next_character;
+ }
+ /* This handles $'...' and $"..." new-style quoted strings. */
+ else if MBTEST(character == '$' && (peek_char == '\'' || peek_char == '"'))
+ {
+ int first_line;
+
+ first_line = line_number;
+ push_delimiter (dstack, peek_char);
+ ttok = parse_matched_pair (peek_char, peek_char, peek_char,
+ &ttoklen,
+ (peek_char == '\'') ? P_ALLOWESC : 0);
+ pop_delimiter (dstack);
+ if (ttok == &matched_pair_error)
+ return -1;
+ if (peek_char == '\'')
+ {
+ ttrans = ansiexpand (ttok, 0, ttoklen - 1, &ttranslen);
+ free (ttok);
+
+ /* Insert the single quotes and correctly quote any
+ embedded single quotes (allowed because P_ALLOWESC was
+ passed to parse_matched_pair). */
+ ttok = sh_single_quote (ttrans);
+ free (ttrans);
+ ttranslen = strlen (ttok);
+ ttrans = ttok;
+ }
+ else
+ {
+ /* Try to locale-expand the converted string. */
+ ttrans = localeexpand (ttok, 0, ttoklen - 1, first_line, &ttranslen);
+ free (ttok);
+
+ /* Add the double quotes back */
+ ttok = sh_mkdoublequoted (ttrans, ttranslen, 0);
+ free (ttrans);
+ ttranslen += 2;
+ ttrans = ttok;
+ }
+
+ RESIZE_MALLOCED_BUFFER (token, token_index, ttranslen + 2,
+ token_buffer_size,
+ TOKEN_DEFAULT_GROW_SIZE);
+ strcpy (token + token_index, ttrans);
+ token_index += ttranslen;
+ FREE (ttrans);
+ quoted = 1;
+ all_digit_token = 0;
+ goto next_character;
+ }
+ /* This could eventually be extended to recognize all of the
+ shell's single-character parameter expansions, and set flags.*/
+ else if MBTEST(character == '$' && peek_char == '$')
+ {
+ ttok = (char *)xmalloc (3);
+ ttok[0] = ttok[1] = '$';
+ ttok[2] = '\0';
+ RESIZE_MALLOCED_BUFFER (token, token_index, 3,
+ token_buffer_size,
+ TOKEN_DEFAULT_GROW_SIZE);
+ strcpy (token + token_index, ttok);
+ token_index += 2;
+ dollar_present = 1;
+ all_digit_token = 0;
+ FREE (ttok);
+ goto next_character;
+ }
+ else
+ shell_ungetc (peek_char);
+ }
+
+#if defined (ARRAY_VARS)
+ /* Identify possible array subscript assignment; match [...]. If
+ parser_state&PST_COMPASSIGN, we need to parse [sub]=words treating
+ `sub' as if it were enclosed in double quotes. */
+ else if MBTEST(character == '[' && /* ] */
+ ((token_index > 0 && assignment_acceptable (last_read_token) && token_is_ident (token, token_index)) ||
+ (token_index == 0 && (parser_state&PST_COMPASSIGN))))
+ {
+ ttok = parse_matched_pair (cd, '[', ']', &ttoklen, P_ARRAYSUB);
+ if (ttok == &matched_pair_error)
+ return -1; /* Bail immediately. */
+ RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 2,
+ token_buffer_size,
+ TOKEN_DEFAULT_GROW_SIZE);
+ token[token_index++] = character;
+ strcpy (token + token_index, ttok);
+ token_index += ttoklen;
+ FREE (ttok);
+ all_digit_token = 0;
+ goto next_character;
+ }
+ /* Identify possible compound array variable assignment. */
+ else if MBTEST(character == '=' && token_index > 0 && (assignment_acceptable (last_read_token) || (parser_state & PST_ASSIGNOK)) && token_is_assignment (token, token_index))
+ {
+ peek_char = shell_getc (1);
+ if MBTEST(peek_char == '(') /* ) */
+ {
+ ttok = parse_compound_assignment (&ttoklen);
+
+ RESIZE_MALLOCED_BUFFER (token, token_index, ttoklen + 4,
+ token_buffer_size,
+ TOKEN_DEFAULT_GROW_SIZE);
+
+ token[token_index++] = '=';
+ token[token_index++] = '(';
+ if (ttok)
+ {
+ strcpy (token + token_index, ttok);
+ token_index += ttoklen;
+ }
+ token[token_index++] = ')';
+ FREE (ttok);
+ all_digit_token = 0;
+ compound_assignment = 1;
+#if 1
+ goto next_character;
+#else
+ goto got_token; /* ksh93 seems to do this */
+#endif
+ }
+ else
+ shell_ungetc (peek_char);
+ }
+#endif
+
+ /* When not parsing a multi-character word construct, shell meta-
+ characters break words. */
+ if MBTEST(shellbreak (character))
+ {
+ shell_ungetc (character);
+ goto got_token;
+ }
+
+ got_character:
+
+ if (character == CTLESC || character == CTLNUL)
+ token[token_index++] = CTLESC;
+
+ got_escaped_character:
+
+ all_digit_token &= DIGIT (character);
+ dollar_present |= character == '$';
+
+ token[token_index++] = character;
+
+ RESIZE_MALLOCED_BUFFER (token, token_index, 1, token_buffer_size,
+ TOKEN_DEFAULT_GROW_SIZE);
+
+ next_character:
+ if (character == '\n' && SHOULD_PROMPT ())
+ prompt_again ();
+
+ /* We want to remove quoted newlines (that is, a \<newline> pair)
+ unless we are within single quotes or pass_next_character is
+ set (the shell equivalent of literal-next). */
+ cd = current_delimiter (dstack);
+ character = shell_getc (cd != '\'' && pass_next_character == 0);
+ } /* end for (;;) */
+
+got_token:
+
+ token[token_index] = '\0';
+
+ /* Check to see what thing we should return. If the last_read_token
+ is a `<', or a `&', or the character which ended this token is
+ a '>' or '<', then, and ONLY then, is this input token a NUMBER.
+ Otherwise, it is just a word, and should be returned as such. */
+ if MBTEST(all_digit_token && (character == '<' || character == '>' || \
+ last_read_token == LESS_AND || \
+ last_read_token == GREATER_AND))
+ {
+ if (legal_number (token, &lvalue) && (int)lvalue == lvalue)
+ yylval.number = lvalue;
+ else
+ yylval.number = -1;
+ return (NUMBER);
+ }
+
+ /* Check for special case tokens. */
+ result = (last_shell_getc_is_singlebyte) ? special_case_tokens (token) : -1;
+ if (result >= 0)
+ return result;
+
+#if defined (ALIAS)
+ /* Posix.2 does not allow reserved words to be aliased, so check for all
+ of them, including special cases, before expanding the current token
+ as an alias. */
+ if MBTEST(posixly_correct)
+ CHECK_FOR_RESERVED_WORD (token);
+
+ /* Aliases are expanded iff EXPAND_ALIASES is non-zero, and quoting
+ inhibits alias expansion. */
+ if (expand_aliases && quoted == 0)
+ {
+ result = alias_expand_token (token);
+ if (result == RE_READ_TOKEN)
+ return (RE_READ_TOKEN);
+ else if (result == NO_EXPANSION)
+ parser_state &= ~PST_ALEXPNEXT;
+ }
+
+ /* If not in Posix.2 mode, check for reserved words after alias
+ expansion. */
+ if MBTEST(posixly_correct == 0)
+#endif
+ CHECK_FOR_RESERVED_WORD (token);
+
+ the_word = (WORD_DESC *)xmalloc (sizeof (WORD_DESC));
+ the_word->word = (char *)xmalloc (1 + token_index);
+ the_word->flags = 0;
+ strcpy (the_word->word, token);
+ if (dollar_present)
+ the_word->flags |= W_HASDOLLAR;
+ if (quoted)
+ the_word->flags |= W_QUOTED; /*(*/
+ if (compound_assignment && token[token_index-1] == ')')
+ the_word->flags |= W_COMPASSIGN;
+ /* A word is an assignment if it appears at the beginning of a
+ simple command, or after another assignment word. This is
+ context-dependent, so it cannot be handled in the grammar. */
+ if (assignment (token, (parser_state & PST_COMPASSIGN) != 0))
+ {
+ the_word->flags |= W_ASSIGNMENT;
+ /* Don't perform word splitting on assignment statements. */
+ if (assignment_acceptable (last_read_token) || (parser_state & PST_COMPASSIGN) != 0)
+ the_word->flags |= W_NOSPLIT;
+ }
+
+ if (command_token_position (last_read_token))
+ {
+ struct builtin *b;
+ b = builtin_address_internal (token, 0);
+ if (b && (b->flags & ASSIGNMENT_BUILTIN))
+ parser_state |= PST_ASSIGNOK;
+ else if (STREQ (token, "eval") || STREQ (token, "let"))
+ parser_state |= PST_ASSIGNOK;
+ }
+
+ yylval.word = the_word;
+
+ if (token[0] == '{' && token[token_index-1] == '}' &&
+ (character == '<' || character == '>'))
+ {
+ /* can use token; already copied to the_word */
+ token[token_index-1] = '\0';
+ if (legal_identifier (token+1))
+ {
+ strcpy (the_word->word, token+1);
+/*itrace("read_token_word: returning REDIR_WORD for %s", the_word->word);*/
+ return (REDIR_WORD);
+ }
+ }
+
+ result = ((the_word->flags & (W_ASSIGNMENT|W_NOSPLIT)) == (W_ASSIGNMENT|W_NOSPLIT))
+ ? ASSIGNMENT_WORD : WORD;
+
+ switch (last_read_token)
+ {
+ case FUNCTION:
+ parser_state |= PST_ALLOWOPNBRC;
+ function_dstart = line_number;
+ break;
+ case CASE:
+ case SELECT:
+ case FOR:
+ if (word_top < MAX_CASE_NEST)
+ word_top++;
+ word_lineno[word_top] = line_number;
+ break;
+ }
+
+ return (result);
+}
+
+/* Return 1 if TOKSYM is a token that after being read would allow
+ a reserved word to be seen, else 0. */
+static int
+reserved_word_acceptable (toksym)
+ int toksym;
+{
+ switch (toksym)
+ {
+ case '\n':
+ case ';':
+ case '(':
+ case ')':
+ case '|':
+ case '&':
+ case '{':
+ case '}': /* XXX */
+ case AND_AND:
+ case BANG:
+ case BAR_AND:
+ case DO:
+ case DONE:
+ case ELIF:
+ case ELSE:
+ case ESAC:
+ case FI:
+ case IF:
+ case OR_OR:
+ case SEMI_SEMI:
+ case SEMI_AND:
+ case SEMI_SEMI_AND:
+ case THEN:
+ case TIME:
+ case TIMEOPT:
+ case COPROC:
+ case UNTIL:
+ case WHILE:
+ case 0:
+ return 1;
+ default:
+#if defined (COPROCESS_SUPPORT)
+ if (last_read_token == WORD && token_before_that == COPROC)
+ return 1;
+#endif
+ return 0;
+ }
+}
+
+/* Return the index of TOKEN in the alist of reserved words, or -1 if
+ TOKEN is not a shell reserved word. */
+int
+find_reserved_word (tokstr)
+ char *tokstr;
+{
+ int i;
+ for (i = 0; word_token_alist[i].word; i++)
+ if (STREQ (tokstr, word_token_alist[i].word))
+ return i;
+ return -1;
+}
+
+#if 0
+#if defined (READLINE)
+/* Called after each time readline is called. This insures that whatever
+ the new prompt string is gets propagated to readline's local prompt
+ variable. */
+static void
+reset_readline_prompt ()
+{
+ char *temp_prompt;
+
+ if (prompt_string_pointer)
+ {
+ temp_prompt = (*prompt_string_pointer)
+ ? decode_prompt_string (*prompt_string_pointer)
+ : (char *)NULL;
+
+ if (temp_prompt == 0)
+ {
+ temp_prompt = (char *)xmalloc (1);
+ temp_prompt[0] = '\0';
+ }
+
+ FREE (current_readline_prompt);
+ current_readline_prompt = temp_prompt;
+ }
+}
+#endif /* READLINE */
+#endif /* 0 */
+
+#if defined (HISTORY)
+/* A list of tokens which can be followed by newlines, but not by
+ semi-colons. When concatenating multiple lines of history, the
+ newline separator for such tokens is replaced with a space. */
+static const int no_semi_successors[] = {
+ '\n', '{', '(', ')', ';', '&', '|',
+ CASE, DO, ELSE, IF, SEMI_SEMI, SEMI_AND, SEMI_SEMI_AND, THEN, UNTIL,
+ WHILE, AND_AND, OR_OR, IN,
+ 0
+};
+
+/* If we are not within a delimited expression, try to be smart
+ about which separators can be semi-colons and which must be
+ newlines. Returns the string that should be added into the
+ history entry. */
+char *
+history_delimiting_chars ()
+{
+ register int i;
+
+ if (dstack.delimiter_depth != 0)
+ return ("\n");
+
+ /* We look for current_command_line_count == 2 because we are looking to
+ add the first line of the body of the here document (the second line
+ of the command). */
+ if (parser_state & PST_HEREDOC)
+ return (current_command_line_count == 2 ? "\n" : "");
+
+ /* First, handle some special cases. */
+ /*(*/
+ /* If we just read `()', assume it's a function definition, and don't
+ add a semicolon. If the token before the `)' was not `(', and we're
+ not in the midst of parsing a case statement, assume it's a
+ parenthesized command and add the semicolon. */
+ /*)(*/
+ if (token_before_that == ')')
+ {
+ if (two_tokens_ago == '(') /*)*/ /* function def */
+ return " ";
+ /* This does not work for subshells inside case statement
+ command lists. It's a suboptimal solution. */
+ else if (parser_state & PST_CASESTMT) /* case statement pattern */
+ return " ";
+ else
+ return "; "; /* (...) subshell */
+ }
+ else if (token_before_that == WORD && two_tokens_ago == FUNCTION)
+ return " "; /* function def using `function name' without `()' */
+
+ else if (token_before_that == WORD && two_tokens_ago == FOR)
+ {
+ /* Tricky. `for i\nin ...' should not have a semicolon, but
+ `for i\ndo ...' should. We do what we can. */
+ for (i = shell_input_line_index; whitespace (shell_input_line[i]); i++)
+ ;
+ if (shell_input_line[i] && shell_input_line[i] == 'i' && shell_input_line[i+1] == 'n')
+ return " ";
+ return ";";
+ }
+ else if (two_tokens_ago == CASE && token_before_that == WORD && (parser_state & PST_CASESTMT))
+ return " ";
+
+ for (i = 0; no_semi_successors[i]; i++)
+ {
+ if (token_before_that == no_semi_successors[i])
+ return (" ");
+ }
+
+ return ("; ");
+}
+#endif /* HISTORY */
+
+/* Issue a prompt, or prepare to issue a prompt when the next character
+ is read. */
+static void
+prompt_again ()
+{
+ char *temp_prompt;
+
+ if (interactive == 0 || expanding_alias ()) /* XXX */
+ return;
+
+ ps1_prompt = get_string_value ("PS1");
+ ps2_prompt = get_string_value ("PS2");
+
+ if (!prompt_string_pointer)
+ prompt_string_pointer = &ps1_prompt;
+
+ temp_prompt = *prompt_string_pointer
+ ? decode_prompt_string (*prompt_string_pointer)
+ : (char *)NULL;
+
+ if (temp_prompt == 0)
+ {
+ temp_prompt = (char *)xmalloc (1);
+ temp_prompt[0] = '\0';
+ }
+
+ current_prompt_string = *prompt_string_pointer;
+ prompt_string_pointer = &ps2_prompt;
+
+#if defined (READLINE)
+ if (!no_line_editing)
+ {
+ FREE (current_readline_prompt);
+ current_readline_prompt = temp_prompt;
+ }
+ else
+#endif /* READLINE */
+ {
+ FREE (current_decoded_prompt);
+ current_decoded_prompt = temp_prompt;
+ }
+}
+
+int
+get_current_prompt_level ()
+{
+ return ((current_prompt_string && current_prompt_string == ps2_prompt) ? 2 : 1);
+}
+
+void
+set_current_prompt_level (x)
+ int x;
+{
+ prompt_string_pointer = (x == 2) ? &ps2_prompt : &ps1_prompt;
+ current_prompt_string = *prompt_string_pointer;
+}
+
+static void
+print_prompt ()
+{
+ fprintf (stderr, "%s", current_decoded_prompt);
+ fflush (stderr);
+}
+
+/* Return a string which will be printed as a prompt. The string
+ may contain special characters which are decoded as follows:
+
+ \a bell (ascii 07)
+ \d the date in Day Mon Date format
+ \e escape (ascii 033)
+ \h the hostname up to the first `.'
+ \H the hostname
+ \j the number of active jobs
+ \l the basename of the shell's tty device name
+ \n CRLF
+ \r CR
+ \s the name of the shell
+ \t the time in 24-hour hh:mm:ss format
+ \T the time in 12-hour hh:mm:ss format
+ \@ the time in 12-hour hh:mm am/pm format
+ \A the time in 24-hour hh:mm format
+ \D{fmt} the result of passing FMT to strftime(3)
+ \u your username
+ \v the version of bash (e.g., 2.00)
+ \V the release of bash, version + patchlevel (e.g., 2.00.0)
+ \w the current working directory
+ \W the last element of $PWD
+ \! the history number of this command
+ \# the command number of this command
+ \$ a $ or a # if you are root
+ \nnn character code nnn in octal
+ \\ a backslash
+ \[ begin a sequence of non-printing chars
+ \] end a sequence of non-printing chars
+*/
+#define PROMPT_GROWTH 48
+char *
+decode_prompt_string (string)
+ char *string;
+{
+ WORD_LIST *list;
+ char *result, *t;
+ struct dstack save_dstack;
+ int last_exit_value, last_comsub_pid;
+#if defined (PROMPT_STRING_DECODE)
+ int result_size, result_index;
+ int c, n, i;
+ char *temp, octal_string[4];
+ struct tm *tm;
+ time_t the_time;
+ char timebuf[128];
+ char *timefmt;
+
+ result = (char *)xmalloc (result_size = PROMPT_GROWTH);
+ result[result_index = 0] = 0;
+ temp = (char *)NULL;
+
+ while (c = *string++)
+ {
+ if (posixly_correct && c == '!')
+ {
+ if (*string == '!')
+ {
+ temp = savestring ("!");
+ goto add_string;
+ }
+ else
+ {
+#if !defined (HISTORY)
+ temp = savestring ("1");
+#else /* HISTORY */
+ temp = itos (history_number ());
+#endif /* HISTORY */
+ string--; /* add_string increments string again. */
+ goto add_string;
+ }
+ }
+ if (c == '\\')
+ {
+ c = *string;
+
+ switch (c)
+ {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ strncpy (octal_string, string, 3);
+ octal_string[3] = '\0';
+
+ n = read_octal (octal_string);
+ temp = (char *)xmalloc (3);
+
+ if (n == CTLESC || n == CTLNUL)
+ {
+ temp[0] = CTLESC;
+ temp[1] = n;
+ temp[2] = '\0';
+ }
+ else if (n == -1)
+ {
+ temp[0] = '\\';
+ temp[1] = '\0';
+ }
+ else
+ {
+ temp[0] = n;
+ temp[1] = '\0';
+ }
+
+ for (c = 0; n != -1 && c < 3 && ISOCTAL (*string); c++)
+ string++;
+
+ c = 0; /* tested at add_string: */
+ goto add_string;
+
+ case 'd':
+ case 't':
+ case 'T':
+ case '@':
+ case 'A':
+ /* Make the current time/date into a string. */
+ (void) time (&the_time);
+ tm = localtime (&the_time);
+
+ if (c == 'd')
+ n = strftime (timebuf, sizeof (timebuf), "%a %b %d", tm);
+ else if (c == 't')
+ n = strftime (timebuf, sizeof (timebuf), "%H:%M:%S", tm);
+ else if (c == 'T')
+ n = strftime (timebuf, sizeof (timebuf), "%I:%M:%S", tm);
+ else if (c == '@')
+ n = strftime (timebuf, sizeof (timebuf), "%I:%M %p", tm);
+ else if (c == 'A')
+ n = strftime (timebuf, sizeof (timebuf), "%H:%M", tm);
+
+ if (n == 0)
+ timebuf[0] = '\0';
+ else
+ timebuf[sizeof(timebuf) - 1] = '\0';
+
+ temp = savestring (timebuf);
+ goto add_string;
+
+ case 'D': /* strftime format */
+ if (string[1] != '{') /* } */
+ goto not_escape;
+
+ (void) time (&the_time);
+ tm = localtime (&the_time);
+ string += 2; /* skip { */
+ timefmt = xmalloc (strlen (string) + 3);
+ for (t = timefmt; *string && *string != '}'; )
+ *t++ = *string++;
+ *t = '\0';
+ c = *string; /* tested at add_string */
+ if (timefmt[0] == '\0')
+ {
+ timefmt[0] = '%';
+ timefmt[1] = 'X'; /* locale-specific current time */
+ timefmt[2] = '\0';
+ }
+ n = strftime (timebuf, sizeof (timebuf), timefmt, tm);
+ free (timefmt);
+
+ if (n == 0)
+ timebuf[0] = '\0';
+ else
+ timebuf[sizeof(timebuf) - 1] = '\0';
+
+ if (promptvars || posixly_correct)
+ /* Make sure that expand_prompt_string is called with a
+ second argument of Q_DOUBLE_QUOTES if we use this
+ function here. */
+ temp = sh_backslash_quote_for_double_quotes (timebuf);
+ else
+ temp = savestring (timebuf);
+ goto add_string;
+
+ case 'n':
+ temp = (char *)xmalloc (3);
+ temp[0] = no_line_editing ? '\n' : '\r';
+ temp[1] = no_line_editing ? '\0' : '\n';
+ temp[2] = '\0';
+ goto add_string;
+
+ case 's':
+ temp = base_pathname (shell_name);
+ temp = savestring (temp);
+ goto add_string;
+
+ case 'v':
+ case 'V':
+ temp = (char *)xmalloc (16);
+ if (c == 'v')
+ strcpy (temp, dist_version);
+ else
+ sprintf (temp, "%s.%d", dist_version, patch_level);
+ goto add_string;
+
+ case 'w':
+ case 'W':
+ {
+ /* Use the value of PWD because it is much more efficient. */
+ char t_string[PATH_MAX];
+ int tlen;
+
+ temp = get_string_value ("PWD");
+
+ if (temp == 0)
+ {
+ if (getcwd (t_string, sizeof(t_string)) == 0)
+ {
+ t_string[0] = '.';
+ tlen = 1;
+ }
+ else
+ tlen = strlen (t_string);
+ }
+ else
+ {
+ tlen = sizeof (t_string) - 1;
+ strncpy (t_string, temp, tlen);
+ }
+ t_string[tlen] = '\0';
+
+#if defined (MACOSX)
+ /* Convert from "fs" format to "input" format */
+ temp = fnx_fromfs (t_string, strlen (t_string));
+ if (temp != t_string)
+ strcpy (t_string, temp);
+#endif
+
+#define ROOT_PATH(x) ((x)[0] == '/' && (x)[1] == 0)
+#define DOUBLE_SLASH_ROOT(x) ((x)[0] == '/' && (x)[1] == '/' && (x)[2] == 0)
+ /* Abbreviate \W as ~ if $PWD == $HOME */
+ if (c == 'W' && (((t = get_string_value ("HOME")) == 0) || STREQ (t, t_string) == 0))
+ {
+ if (ROOT_PATH (t_string) == 0 && DOUBLE_SLASH_ROOT (t_string) == 0)
+ {
+ t = strrchr (t_string, '/');
+ if (t)
+ strcpy (t_string, t + 1);
+ }
+ }
+#undef ROOT_PATH
+#undef DOUBLE_SLASH_ROOT
+ else
+ /* polite_directory_format is guaranteed to return a string
+ no longer than PATH_MAX - 1 characters. */
+ strcpy (t_string, polite_directory_format (t_string));
+
+ temp = trim_pathname (t_string, PATH_MAX - 1);
+ /* If we're going to be expanding the prompt string later,
+ quote the directory name. */
+ if (promptvars || posixly_correct)
+ /* Make sure that expand_prompt_string is called with a
+ second argument of Q_DOUBLE_QUOTES if we use this
+ function here. */
+ temp = sh_backslash_quote_for_double_quotes (t_string);
+ else
+ temp = savestring (t_string);
+
+ goto add_string;
+ }
+
+ case 'u':
+ if (current_user.user_name == 0)
+ get_current_user_info ();
+ temp = savestring (current_user.user_name);
+ goto add_string;
+
+ case 'h':
+ case 'H':
+ temp = savestring (current_host_name);
+ if (c == 'h' && (t = (char *)strchr (temp, '.')))
+ *t = '\0';
+ goto add_string;
+
+ case '#':
+ temp = itos (current_command_number);
+ goto add_string;
+
+ case '!':
+#if !defined (HISTORY)
+ temp = savestring ("1");
+#else /* HISTORY */
+ temp = itos (history_number ());
+#endif /* HISTORY */
+ goto add_string;
+
+ case '$':
+ t = temp = (char *)xmalloc (3);
+ if ((promptvars || posixly_correct) && (current_user.euid != 0))
+ *t++ = '\\';
+ *t++ = current_user.euid == 0 ? '#' : '$';
+ *t = '\0';
+ goto add_string;
+
+ case 'j':
+ temp = itos (count_all_jobs ());
+ goto add_string;
+
+ case 'l':
+#if defined (HAVE_TTYNAME)
+ temp = (char *)ttyname (fileno (stdin));
+ t = temp ? base_pathname (temp) : "tty";
+ temp = savestring (t);
+#else
+ temp = savestring ("tty");
+#endif /* !HAVE_TTYNAME */
+ goto add_string;
+
+#if defined (READLINE)
+ case '[':
+ case ']':
+ if (no_line_editing)
+ {
+ string++;
+ break;
+ }
+ temp = (char *)xmalloc (3);
+ n = (c == '[') ? RL_PROMPT_START_IGNORE : RL_PROMPT_END_IGNORE;
+ i = 0;
+ if (n == CTLESC || n == CTLNUL)
+ temp[i++] = CTLESC;
+ temp[i++] = n;
+ temp[i] = '\0';
+ goto add_string;
+#endif /* READLINE */
+
+ case '\\':
+ case 'a':
+ case 'e':
+ case 'r':
+ temp = (char *)xmalloc (2);
+ if (c == 'a')
+ temp[0] = '\07';
+ else if (c == 'e')
+ temp[0] = '\033';
+ else if (c == 'r')
+ temp[0] = '\r';
+ else /* (c == '\\') */
+ temp[0] = c;
+ temp[1] = '\0';
+ goto add_string;
+
+ default:
+not_escape:
+ temp = (char *)xmalloc (3);
+ temp[0] = '\\';
+ temp[1] = c;
+ temp[2] = '\0';
+
+ add_string:
+ if (c)
+ string++;
+ result =
+ sub_append_string (temp, result, &result_index, &result_size);
+ temp = (char *)NULL; /* Freed in sub_append_string (). */
+ result[result_index] = '\0';
+ break;
+ }
+ }
+ else
+ {
+ RESIZE_MALLOCED_BUFFER (result, result_index, 3, result_size, PROMPT_GROWTH);
+ result[result_index++] = c;
+ result[result_index] = '\0';
+ }
+ }
+#else /* !PROMPT_STRING_DECODE */
+ result = savestring (string);
+#endif /* !PROMPT_STRING_DECODE */
+
+ /* Save the delimiter stack and point `dstack' to temp space so any
+ command substitutions in the prompt string won't result in screwing
+ up the parser's quoting state. */
+ save_dstack = dstack;
+ dstack = temp_dstack;
+ dstack.delimiter_depth = 0;
+
+ /* Perform variable and parameter expansion and command substitution on
+ the prompt string. */
+ if (promptvars || posixly_correct)
+ {
+ last_exit_value = last_command_exit_value;
+ last_comsub_pid = last_command_subst_pid;
+ list = expand_prompt_string (result, Q_DOUBLE_QUOTES, 0);
+ free (result);
+ result = string_list (list);
+ dispose_words (list);
+ last_command_exit_value = last_exit_value;
+ last_command_subst_pid = last_comsub_pid;
+ }
+ else
+ {
+ t = dequote_string (result);
+ free (result);
+ result = t;
+ }
+
+ dstack = save_dstack;
+
+ return (result);
+}
+
+/************************************************
+ * *
+ * ERROR HANDLING *
+ * *
+ ************************************************/
+
+/* Report a syntax error, and restart the parser. Call here for fatal
+ errors. */
+int
+yyerror (msg)
+ const char *msg;
+{
+ report_syntax_error ((char *)NULL);
+ reset_parser ();
+ return (0);
+}
+
+static char *
+error_token_from_token (tok)
+ int tok;
+{
+ char *t;
+
+ if (t = find_token_in_alist (tok, word_token_alist, 0))
+ return t;
+
+ if (t = find_token_in_alist (tok, other_token_alist, 0))
+ return t;
+
+ t = (char *)NULL;
+ /* This stuff is dicy and needs closer inspection */
+ switch (current_token)
+ {
+ case WORD:
+ case ASSIGNMENT_WORD:
+ if (yylval.word)
+ t = savestring (yylval.word->word);
+ break;
+ case NUMBER:
+ t = itos (yylval.number);
+ break;
+ case ARITH_CMD:
+ if (yylval.word_list)
+ t = string_list (yylval.word_list);
+ break;
+ case ARITH_FOR_EXPRS:
+ if (yylval.word_list)
+ t = string_list_internal (yylval.word_list, " ; ");
+ break;
+ case COND_CMD:
+ t = (char *)NULL; /* punt */
+ break;
+ }
+
+ return t;
+}
+
+static char *
+error_token_from_text ()
+{
+ char *msg, *t;
+ int token_end, i;
+
+ t = shell_input_line;
+ i = shell_input_line_index;
+ token_end = 0;
+ msg = (char *)NULL;
+
+ if (i && t[i] == '\0')
+ i--;
+
+ while (i && (whitespace (t[i]) || t[i] == '\n'))
+ i--;
+
+ if (i)
+ token_end = i + 1;
+
+ while (i && (member (t[i], " \n\t;|&") == 0))
+ i--;
+
+ while (i != token_end && (whitespace (t[i]) || t[i] == '\n'))
+ i++;
+
+ /* Return our idea of the offending token. */
+ if (token_end || (i == 0 && token_end == 0))
+ {
+ if (token_end)
+ msg = substring (t, i, token_end);
+ else /* one-character token */
+ {
+ msg = (char *)xmalloc (2);
+ msg[0] = t[i];
+ msg[1] = '\0';
+ }
+ }
+
+ return (msg);
+}
+
+static void
+print_offending_line ()
+{
+ char *msg;
+ int token_end;
+
+ msg = savestring (shell_input_line);
+ token_end = strlen (msg);
+ while (token_end && msg[token_end - 1] == '\n')
+ msg[--token_end] = '\0';
+
+ parser_error (line_number, "`%s'", msg);
+ free (msg);
+}
+
+/* Report a syntax error with line numbers, etc.
+ Call here for recoverable errors. If you have a message to print,
+ then place it in MESSAGE, otherwise pass NULL and this will figure
+ out an appropriate message for you. */
+static void
+report_syntax_error (message)
+ char *message;
+{
+ char *msg;
+
+ if (message)
+ {
+ parser_error (line_number, "%s", message);
+ if (interactive && EOF_Reached)
+ EOF_Reached = 0;
+ last_command_exit_value = parse_and_execute_level ? EX_BADSYNTAX : EX_BADUSAGE;
+ return;
+ }
+
+ /* If the line of input we're reading is not null, try to find the
+ objectionable token. First, try to figure out what token the
+ parser's complaining about by looking at current_token. */
+ if (current_token != 0 && EOF_Reached == 0 && (msg = error_token_from_token (current_token)))
+ {
+ parser_error (line_number, _("syntax error near unexpected token `%s'"), msg);
+ free (msg);
+
+ if (interactive == 0)
+ print_offending_line ();
+
+ last_command_exit_value = parse_and_execute_level ? EX_BADSYNTAX : EX_BADUSAGE;
+ return;
+ }
+
+ /* If looking at the current token doesn't prove fruitful, try to find the
+ offending token by analyzing the text of the input line near the current
+ input line index and report what we find. */
+ if (shell_input_line && *shell_input_line)
+ {
+ msg = error_token_from_text ();
+ if (msg)
+ {
+ parser_error (line_number, _("syntax error near `%s'"), msg);
+ free (msg);
+ }
+
+ /* If not interactive, print the line containing the error. */
+ if (interactive == 0)
+ print_offending_line ();
+ }
+ else
+ {
+ msg = EOF_Reached ? _("syntax error: unexpected end of file") : _("syntax error");
+ parser_error (line_number, "%s", msg);
+ /* When the shell is interactive, this file uses EOF_Reached
+ only for error reporting. Other mechanisms are used to
+ decide whether or not to exit. */
+ if (interactive && EOF_Reached)
+ EOF_Reached = 0;
+ }
+
+ last_command_exit_value = parse_and_execute_level ? EX_BADSYNTAX : EX_BADUSAGE;
+}
+
+/* ??? Needed function. ??? We have to be able to discard the constructs
+ created during parsing. In the case of error, we want to return
+ allocated objects to the memory pool. In the case of no error, we want
+ to throw away the information about where the allocated objects live.
+ (dispose_command () will actually free the command.) */
+static void
+discard_parser_constructs (error_p)
+ int error_p;
+{
+}
+
+/************************************************
+ * *
+ * EOF HANDLING *
+ * *
+ ************************************************/
+
+/* Do that silly `type "bye" to exit' stuff. You know, "ignoreeof". */
+
+/* A flag denoting whether or not ignoreeof is set. */
+int ignoreeof = 0;
+
+/* The number of times that we have encountered an EOF character without
+ another character intervening. When this gets above the limit, the
+ shell terminates. */
+int eof_encountered = 0;
+
+/* The limit for eof_encountered. */
+int eof_encountered_limit = 10;
+
+/* If we have EOF as the only input unit, this user wants to leave
+ the shell. If the shell is not interactive, then just leave.
+ Otherwise, if ignoreeof is set, and we haven't done this the
+ required number of times in a row, print a message. */
+static void
+handle_eof_input_unit ()
+{
+ if (interactive)
+ {
+ /* shell.c may use this to decide whether or not to write out the
+ history, among other things. We use it only for error reporting
+ in this file. */
+ if (EOF_Reached)
+ EOF_Reached = 0;
+
+ /* If the user wants to "ignore" eof, then let her do so, kind of. */
+ if (ignoreeof)
+ {
+ if (eof_encountered < eof_encountered_limit)
+ {
+ fprintf (stderr, _("Use \"%s\" to leave the shell.\n"),
+ login_shell ? "logout" : "exit");
+ eof_encountered++;
+ /* Reset the parsing state. */
+ last_read_token = current_token = '\n';
+ /* Reset the prompt string to be $PS1. */
+ prompt_string_pointer = (char **)NULL;
+ prompt_again ();
+ return;
+ }
+ }
+
+ /* In this case EOF should exit the shell. Do it now. */
+ reset_parser ();
+ exit_builtin ((WORD_LIST *)NULL);
+ }
+ else
+ {
+ /* We don't write history files, etc., for non-interactive shells. */
+ EOF_Reached = 1;
+ }
+}
+
+/************************************************
+ * *
+ * STRING PARSING FUNCTIONS *
+ * *
+ ************************************************/
+
+/* It's very important that these two functions treat the characters
+ between ( and ) identically. */
+
+static WORD_LIST parse_string_error;
+
+/* Take a string and run it through the shell parser, returning the
+ resultant word list. Used by compound array assignment. */
+WORD_LIST *
+parse_string_to_word_list (s, flags, whom)
+ char *s;
+ int flags;
+ const char *whom;
+{
+ WORD_LIST *wl;
+ int tok, orig_current_token, orig_line_number, orig_input_terminator;
+ int orig_line_count;
+ int old_echo_input, old_expand_aliases;
+#if defined (HISTORY)
+ int old_remember_on_history, old_history_expansion_inhibited;
+#endif
+
+#if defined (HISTORY)
+ old_remember_on_history = remember_on_history;
+# if defined (BANG_HISTORY)
+ old_history_expansion_inhibited = history_expansion_inhibited;
+# endif
+ bash_history_disable ();
+#endif
+
+ orig_line_number = line_number;
+ orig_line_count = current_command_line_count;
+ orig_input_terminator = shell_input_line_terminator;
+ old_echo_input = echo_input_at_read;
+ old_expand_aliases = expand_aliases;
+
+ push_stream (1);
+ last_read_token = WORD; /* WORD to allow reserved words here */
+ current_command_line_count = 0;
+ echo_input_at_read = expand_aliases = 0;
+
+ with_input_from_string (s, whom);
+ wl = (WORD_LIST *)NULL;
+
+ if (flags & 1)
+ parser_state |= PST_COMPASSIGN|PST_REPARSE;
+
+ while ((tok = read_token (READ)) != yacc_EOF)
+ {
+ if (tok == '\n' && *bash_input.location.string == '\0')
+ break;
+ if (tok == '\n') /* Allow newlines in compound assignments */
+ continue;
+ if (tok != WORD && tok != ASSIGNMENT_WORD)
+ {
+ line_number = orig_line_number + line_number - 1;
+ orig_current_token = current_token;
+ current_token = tok;
+ yyerror (NULL); /* does the right thing */
+ current_token = orig_current_token;
+ if (wl)
+ dispose_words (wl);
+ wl = &parse_string_error;
+ break;
+ }
+ wl = make_word_list (yylval.word, wl);
+ }
+
+ last_read_token = '\n';
+ pop_stream ();
+
+#if defined (HISTORY)
+ remember_on_history = old_remember_on_history;
+# if defined (BANG_HISTORY)
+ history_expansion_inhibited = old_history_expansion_inhibited;
+# endif /* BANG_HISTORY */
+#endif /* HISTORY */
+
+ echo_input_at_read = old_echo_input;
+ expand_aliases = old_expand_aliases;
+
+ current_command_line_count = orig_line_count;
+ shell_input_line_terminator = orig_input_terminator;
+
+ if (flags & 1)
+ parser_state &= ~(PST_COMPASSIGN|PST_REPARSE);
+
+ if (wl == &parse_string_error)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ if (interactive_shell == 0 && posixly_correct)
+ jump_to_top_level (FORCE_EOF);
+ else
+ jump_to_top_level (DISCARD);
+ }
+
+ return (REVERSE_LIST (wl, WORD_LIST *));
+}
+
+static char *
+parse_compound_assignment (retlenp)
+ int *retlenp;
+{
+ WORD_LIST *wl, *rl;
+ int tok, orig_line_number, orig_token_size, orig_last_token, assignok;
+ char *saved_token, *ret;
+
+ saved_token = token;
+ orig_token_size = token_buffer_size;
+ orig_line_number = line_number;
+ orig_last_token = last_read_token;
+
+ last_read_token = WORD; /* WORD to allow reserved words here */
+
+ token = (char *)NULL;
+ token_buffer_size = 0;
+
+ assignok = parser_state&PST_ASSIGNOK; /* XXX */
+
+ wl = (WORD_LIST *)NULL; /* ( */
+ parser_state |= PST_COMPASSIGN;
+
+ while ((tok = read_token (READ)) != ')')
+ {
+ if (tok == '\n') /* Allow newlines in compound assignments */
+ {
+ if (SHOULD_PROMPT ())
+ prompt_again ();
+ continue;
+ }
+ if (tok != WORD && tok != ASSIGNMENT_WORD)
+ {
+ current_token = tok; /* for error reporting */
+ if (tok == yacc_EOF) /* ( */
+ parser_error (orig_line_number, _("unexpected EOF while looking for matching `)'"));
+ else
+ yyerror(NULL); /* does the right thing */
+ if (wl)
+ dispose_words (wl);
+ wl = &parse_string_error;
+ break;
+ }
+ wl = make_word_list (yylval.word, wl);
+ }
+
+ FREE (token);
+ token = saved_token;
+ token_buffer_size = orig_token_size;
+
+ parser_state &= ~PST_COMPASSIGN;
+
+ if (wl == &parse_string_error)
+ {
+ last_command_exit_value = EXECUTION_FAILURE;
+ last_read_token = '\n'; /* XXX */
+ if (interactive_shell == 0 && posixly_correct)
+ jump_to_top_level (FORCE_EOF);
+ else
+ jump_to_top_level (DISCARD);
+ }
+
+ last_read_token = orig_last_token; /* XXX - was WORD? */
+
+ if (wl)
+ {
+ rl = REVERSE_LIST (wl, WORD_LIST *);
+ ret = string_list (rl);
+ dispose_words (rl);
+ }
+ else
+ ret = (char *)NULL;
+
+ if (retlenp)
+ *retlenp = (ret && *ret) ? strlen (ret) : 0;
+
+ if (assignok)
+ parser_state |= PST_ASSIGNOK;
+
+ return ret;
+}
+
+/************************************************
+ * *
+ * SAVING AND RESTORING PARTIAL PARSE STATE *
+ * *
+ ************************************************/
+
+sh_parser_state_t *
+save_parser_state (ps)
+ sh_parser_state_t *ps;
+{
+#if defined (ARRAY_VARS)
+ SHELL_VAR *v;
+#endif
+
+ if (ps == 0)
+ ps = (sh_parser_state_t *)xmalloc (sizeof (sh_parser_state_t));
+ if (ps == 0)
+ return ((sh_parser_state_t *)NULL);
+
+ ps->parser_state = parser_state;
+ ps->token_state = save_token_state ();
+
+ ps->input_line_terminator = shell_input_line_terminator;
+ ps->eof_encountered = eof_encountered;
+
+ ps->current_command_line_count = current_command_line_count;
+
+#if defined (HISTORY)
+ ps->remember_on_history = remember_on_history;
+# if defined (BANG_HISTORY)
+ ps->history_expansion_inhibited = history_expansion_inhibited;
+# endif
+#endif
+
+ ps->last_command_exit_value = last_command_exit_value;
+#if defined (ARRAY_VARS)
+ v = find_variable ("PIPESTATUS");
+ if (v && array_p (v) && array_cell (v))
+ ps->pipestatus = array_copy (array_cell (v));
+ else
+ ps->pipestatus = (ARRAY *)NULL;
+#endif
+
+ ps->last_shell_builtin = last_shell_builtin;
+ ps->this_shell_builtin = this_shell_builtin;
+
+ ps->expand_aliases = expand_aliases;
+ ps->echo_input_at_read = echo_input_at_read;
+
+ return (ps);
+}
+
+void
+restore_parser_state (ps)
+ sh_parser_state_t *ps;
+{
+#if defined (ARRAY_VARS)
+ SHELL_VAR *v;
+#endif
+
+ if (ps == 0)
+ return;
+
+ parser_state = ps->parser_state;
+ if (ps->token_state)
+ {
+ restore_token_state (ps->token_state);
+ free (ps->token_state);
+ }
+
+ shell_input_line_terminator = ps->input_line_terminator;
+ eof_encountered = ps->eof_encountered;
+
+ current_command_line_count = ps->current_command_line_count;
+
+#if defined (HISTORY)
+ remember_on_history = ps->remember_on_history;
+# if defined (BANG_HISTORY)
+ history_expansion_inhibited = ps->history_expansion_inhibited;
+# endif
+#endif
+
+ last_command_exit_value = ps->last_command_exit_value;
+#if defined (ARRAY_VARS)
+ v = find_variable ("PIPESTATUS");
+ if (v && array_p (v) && array_cell (v))
+ {
+ array_dispose (array_cell (v));
+ var_setarray (v, ps->pipestatus);
+ }
+#endif
+
+ last_shell_builtin = ps->last_shell_builtin;
+ this_shell_builtin = ps->this_shell_builtin;
+
+ expand_aliases = ps->expand_aliases;
+ echo_input_at_read = ps->echo_input_at_read;
+}
+
+/************************************************
+ * *
+ * MULTIBYTE CHARACTER HANDLING *
+ * *
+ ************************************************/
+
+#if defined (HANDLE_MULTIBYTE)
+static void
+set_line_mbstate ()
+{
+ int i, previ, len, c;
+ mbstate_t mbs, prevs;
+ size_t mbclen;
+
+ if (shell_input_line == NULL)
+ return;
+ len = strlen (shell_input_line); /* XXX - shell_input_line_len ? */
+ FREE (shell_input_line_property);
+ shell_input_line_property = (char *)xmalloc (len + 1);
+
+ memset (&prevs, '\0', sizeof (mbstate_t));
+ for (i = previ = 0; i < len; i++)
+ {
+ mbs = prevs;
+
+ c = shell_input_line[i];
+ if (c == EOF)
+ {
+ int j;
+ for (j = i; j < len; j++)
+ shell_input_line_property[j] = 1;
+ break;
+ }
+
+ mbclen = mbrlen (shell_input_line + previ, i - previ + 1, &mbs);
+ if (mbclen == 1 || mbclen == (size_t)-1)
+ {
+ mbclen = 1;
+ previ = i + 1;
+ }
+ else if (mbclen == (size_t)-2)
+ mbclen = 0;
+ else if (mbclen > 1)
+ {
+ mbclen = 0;
+ previ = i + 1;
+ prevs = mbs;
+ }
+ else
+ {
+ /* XXX - what to do if mbrlen returns 0? (null wide character) */
+ int j;
+ for (j = i; j < len; j++)
+ shell_input_line_property[j] = 1;
+ break;
+ }
+
+ shell_input_line_property[i] = mbclen;
+ }
+}
+#endif /* HANDLE_MULTIBYTE */
+
diff --git a/y.tab.h b/y.tab.h
new file mode 100644
index 0000000..13e8550
--- /dev/null
+++ b/y.tab.h
@@ -0,0 +1,162 @@
+/* A Bison parser, made by GNU Bison 2.3. */
+
+/* Skeleton interface for Bison's Yacc-like parsers in C
+
+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+ Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2, or (at your option)
+ any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA. */
+
+/* As a special exception, you may create a larger work that contains
+ part or all of the Bison parser skeleton and distribute that work
+ under terms of your choice, so long as that work isn't itself a
+ parser generator using the skeleton or a modified version thereof
+ as a parser skeleton. Alternatively, if you modify or redistribute
+ the parser skeleton itself, you may (at your option) remove this
+ special exception, which will cause the skeleton and the resulting
+ Bison output files to be licensed under the GNU General Public
+ License without this special exception.
+
+ This special exception was added by the Free Software Foundation in
+ version 2.2 of Bison. */
+
+/* Tokens. */
+#ifndef YYTOKENTYPE
+# define YYTOKENTYPE
+ /* Put the tokens into the symbol table, so that GDB and other debuggers
+ know about them. */
+ enum yytokentype {
+ IF = 258,
+ THEN = 259,
+ ELSE = 260,
+ ELIF = 261,
+ FI = 262,
+ CASE = 263,
+ ESAC = 264,
+ FOR = 265,
+ SELECT = 266,
+ WHILE = 267,
+ UNTIL = 268,
+ DO = 269,
+ DONE = 270,
+ FUNCTION = 271,
+ COPROC = 272,
+ COND_START = 273,
+ COND_END = 274,
+ COND_ERROR = 275,
+ IN = 276,
+ BANG = 277,
+ TIME = 278,
+ TIMEOPT = 279,
+ WORD = 280,
+ ASSIGNMENT_WORD = 281,
+ REDIR_WORD = 282,
+ NUMBER = 283,
+ ARITH_CMD = 284,
+ ARITH_FOR_EXPRS = 285,
+ COND_CMD = 286,
+ AND_AND = 287,
+ OR_OR = 288,
+ GREATER_GREATER = 289,
+ LESS_LESS = 290,
+ LESS_AND = 291,
+ LESS_LESS_LESS = 292,
+ GREATER_AND = 293,
+ SEMI_SEMI = 294,
+ SEMI_AND = 295,
+ SEMI_SEMI_AND = 296,
+ LESS_LESS_MINUS = 297,
+ AND_GREATER = 298,
+ AND_GREATER_GREATER = 299,
+ LESS_GREATER = 300,
+ GREATER_BAR = 301,
+ BAR_AND = 302,
+ yacc_EOF = 303
+ };
+#endif
+/* Tokens. */
+#define IF 258
+#define THEN 259
+#define ELSE 260
+#define ELIF 261
+#define FI 262
+#define CASE 263
+#define ESAC 264
+#define FOR 265
+#define SELECT 266
+#define WHILE 267
+#define UNTIL 268
+#define DO 269
+#define DONE 270
+#define FUNCTION 271
+#define COPROC 272
+#define COND_START 273
+#define COND_END 274
+#define COND_ERROR 275
+#define IN 276
+#define BANG 277
+#define TIME 278
+#define TIMEOPT 279
+#define WORD 280
+#define ASSIGNMENT_WORD 281
+#define REDIR_WORD 282
+#define NUMBER 283
+#define ARITH_CMD 284
+#define ARITH_FOR_EXPRS 285
+#define COND_CMD 286
+#define AND_AND 287
+#define OR_OR 288
+#define GREATER_GREATER 289
+#define LESS_LESS 290
+#define LESS_AND 291
+#define LESS_LESS_LESS 292
+#define GREATER_AND 293
+#define SEMI_SEMI 294
+#define SEMI_AND 295
+#define SEMI_SEMI_AND 296
+#define LESS_LESS_MINUS 297
+#define AND_GREATER 298
+#define AND_GREATER_GREATER 299
+#define LESS_GREATER 300
+#define GREATER_BAR 301
+#define BAR_AND 302
+#define yacc_EOF 303
+
+
+
+
+#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
+typedef union YYSTYPE
+#line 320 "/Users/chet/src/bash/src/parse.y"
+{
+ WORD_DESC *word; /* the word that we read. */
+ int number; /* the number that we read. */
+ WORD_LIST *word_list;
+ COMMAND *command;
+ REDIRECT *redirect;
+ ELEMENT element;
+ PATTERN_LIST *pattern;
+}
+/* Line 1489 of yacc.c. */
+#line 155 "y.tab.h"
+ YYSTYPE;
+# define yystype YYSTYPE /* obsolescent; will be withdrawn */
+# define YYSTYPE_IS_DECLARED 1
+# define YYSTYPE_IS_TRIVIAL 1
+#endif
+
+extern YYSTYPE yylval;
+